commit ceaa837f96adb69c0df0397937cd74991d5d821a Author: Linus Torvalds Date: Sun Feb 12 14:10:17 2023 -0800 Linux 6.2-rc8 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80510b63f7b6bdd30e07b3a42115d0a324e20cd6 Author: John Paul Adrian Glaubitz Date: Tue Feb 7 17:57:15 2023 +0100 MAINTAINERS: Add myself as maintainer for arch/sh (SUPERH) Both Rich Felker and Yoshinori Sato haven't done any work on arch/sh for a while. As I have been maintaining Debian's sh4 port since 2014, I am interested to keep the architecture alive. Signed-off-by: John Paul Adrian Glaubitz Acked-by: Yoshinori Sato Acked-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 5e98e916f95bdc50e90f3199d7f3d74b94fa5976 Merge: 711e9a4d52bf b6c7abd1c28a Author: Linus Torvalds Date: Sun Feb 12 13:52:17 2023 -0800 Merge tag 'trace-v6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fix from Steven Rostedt: "Fix showing of TASK_COMM_LEN instead of its value The TASK_COMM_LEN was converted from a macro into an enum so that BTF would have access to it. But this unfortunately caused TASK_COMM_LEN to display in the format fields of trace events, as they are created by the TRACE_EVENT() macro and such, macros convert to their values, where as enums do not. To handle this, instead of using the field itself to be display, save the value of the array size as another field in the trace_event_fields structure, and use that instead. Not only does this fix the issue, but also converts the other trace events that have this same problem (but were not breaking tooling). With this change, the original work around b3bc8547d3be6 ("tracing: Have TRACE_DEFINE_ENUM affect trace event types as well") could be reverted (but that should be done in the merge window)" * tag 'trace-v6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Fix TASK_COMM_LEN in trace event format file commit 711e9a4d52bf4e477e51c7135e1e6188c42018d0 Merge: e2bca0ebf775 5f58d783fd78 Author: Linus Torvalds Date: Sun Feb 12 11:26:36 2023 -0800 Merge tag 'for-6.2-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - one more fix for a tree-log 'write time corruption' report, update the last dir index directly and don't keep in the log context - do VFS-level inode lock around FIEMAP to prevent a deadlock with concurrent fsync, the extent-level lock is not sufficient - don't cache a single-device filesystem device to avoid cases when a loop device is reformatted and the entry gets stale * tag 'for-6.2-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: free device in btrfs_close_devices for a single device filesystem btrfs: lock the inode in shared mode before starting fiemap btrfs: simplify update of last_dir_index_offset when logging a directory commit e2bca0ebf775453bb3c6b9c2149fb4712621493a Merge: dd78af9fde7a 303e724d7b1e Author: Linus Torvalds Date: Sun Feb 12 11:18:57 2023 -0800 Merge tag 'usb-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are 2 small USB driver fixes that resolve some reported regressions and one new device quirk. Specifically these are: - new quirk for Alcor Link AK9563 smartcard reader - revert of u_ether gadget change in 6.2-rc1 that caused problems - typec pin probe fix All of these have been in linux-next with no reported problems" * tag 'usb-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: core: add quirk for Alcor Link AK9563 smartcard reader usb: typec: altmodes/displayport: Fix probe pin assign check Revert "usb: gadget: u_ether: Do not make UDC parent of the net device" commit dd78af9fde7aeae427adf4bac6cf62ed84e8f898 Merge: 49a0bdb0a38e 190233164cd7 Author: Linus Torvalds Date: Sun Feb 12 11:13:29 2023 -0800 Merge tag 'efi-fixes-for-v6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fix from Ard Biesheuvel: "A fix from Darren to widen the SMBIOS match for detecting Ampere Altra machines with problematic firmware. In the mean time, we are working on a more precise check, but this is still work in progress" * tag 'efi-fixes-for-v6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: arm64: efi: Force the use of SetVirtualAddressMap() on eMAG and Altra Max machines commit 49a0bdb0a38e222d35c50644468856e2408764f0 Merge: 462a8e08e0e6 2ea31e2e62bb Author: Linus Torvalds Date: Sun Feb 12 11:08:15 2023 -0800 Merge tag 'powerpc-6.2-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix interrupt exit race with security mitigation switching. - Don't select ARCH_WANTS_NO_INSTR until warnings are fixed. - Build fix for CONFIG_NUMA=n. Thanks to Nicholas Piggin, Randy Dunlap, and Sachin Sant. * tag 'powerpc-6.2-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s/interrupt: Fix interrupt exit race with security mitigation switch powerpc/kexec_file: fix implicit decl error powerpc: Don't select ARCH_WANTS_NO_INSTR commit 462a8e08e0e6287e5ce13187257edbf24213ed03 Author: David Chen Date: Thu Feb 9 17:48:28 2023 +0000 Fix page corruption caused by racy check in __free_pages When we upgraded our kernel, we started seeing some page corruption like the following consistently: BUG: Bad page state in process ganesha.nfsd pfn:1304ca page:0000000022261c55 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x1304ca flags: 0x17ffffc0000000() raw: 0017ffffc0000000 ffff8a513ffd4c98 ffffeee24b35ec08 0000000000000000 raw: 0000000000000000 0000000000000001 00000000ffffff7f 0000000000000000 page dumped because: nonzero mapcount CPU: 0 PID: 15567 Comm: ganesha.nfsd Kdump: loaded Tainted: P B O 5.10.158-1.nutanix.20221209.el7.x86_64 #1 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/05/2016 Call Trace: dump_stack+0x74/0x96 bad_page.cold+0x63/0x94 check_new_page_bad+0x6d/0x80 rmqueue+0x46e/0x970 get_page_from_freelist+0xcb/0x3f0 ? _cond_resched+0x19/0x40 __alloc_pages_nodemask+0x164/0x300 alloc_pages_current+0x87/0xf0 skb_page_frag_refill+0x84/0x110 ... Sometimes, it would also show up as corruption in the free list pointer and cause crashes. After bisecting the issue, we found the issue started from commit e320d3012d25 ("mm/page_alloc.c: fix freeing non-compound pages"): if (put_page_testzero(page)) free_the_page(page, order); else if (!PageHead(page)) while (order-- > 0) free_the_page(page + (1 << order), order); So the problem is the check PageHead is racy because at this point we already dropped our reference to the page. So even if we came in with compound page, the page can already be freed and PageHead can return false and we will end up freeing all the tail pages causing double free. Fixes: e320d3012d25 ("mm/page_alloc.c: fix freeing non-compound pages") Link: https://lore.kernel.org/lkml/BYAPR02MB448855960A9656EEA81141FC94D99@BYAPR02MB4488.namprd02.prod.outlook.com/ Cc: Andrew Morton Cc: stable@vger.kernel.org Signed-off-by: Chunwei Chen Reviewed-by: Vlastimil Babka Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Linus Torvalds mm/page_alloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b6c7abd1c28a63ad633433d037ee15a1bc3023ba Author: Yafang Shao Date: Sun Feb 12 15:13:03 2023 +0000 tracing: Fix TASK_COMM_LEN in trace event format file After commit 3087c61ed2c4 ("tools/testing/selftests/bpf: replace open-coded 16 with TASK_COMM_LEN"), the content of the format file under /sys/kernel/tracing/events/task/task_newtask was changed from field:char comm[16]; offset:12; size:16; signed:0; to field:char comm[TASK_COMM_LEN]; offset:12; size:16; signed:0; John reported that this change breaks older versions of perfetto. Then Mathieu pointed out that this behavioral change was caused by the use of __stringify(_len), which happens to work on macros, but not on enum labels. And he also gave the suggestion on how to fix it: :One possible solution to make this more robust would be to extend :struct trace_event_fields with one more field that indicates the length :of an array as an actual integer, without storing it in its stringified :form in the type, and do the formatting in f_show where it belongs. The result as follows after this change, $ cat /sys/kernel/tracing/events/task/task_newtask/format field:char comm[16]; offset:12; size:16; signed:0; Link: https://lore.kernel.org/lkml/Y+QaZtz55LIirsUO@google.com/ Link: https://lore.kernel.org/linux-trace-kernel/20230210155921.4610-1-laoar.shao@gmail.com/ Link: https://lore.kernel.org/linux-trace-kernel/20230212151303.12353-1-laoar.shao@gmail.com Cc: stable@vger.kernel.org Cc: Alexei Starovoitov Cc: Kajetan Puchalski CC: Qais Yousef Fixes: 3087c61ed2c4 ("tools/testing/selftests/bpf: replace open-coded 16 with TASK_COMM_LEN") Reported-by: John Stultz Debugged-by: Mathieu Desnoyers Suggested-by: Mathieu Desnoyers Suggested-by: Steven Rostedt Signed-off-by: Yafang Shao Signed-off-by: Steven Rostedt (Google) include/linux/trace_events.h | 1 + include/trace/stages/stage4_event_fields.h | 3 ++- kernel/trace/trace.h | 1 + kernel/trace/trace_events.c | 39 +++++++++++++++++++++++------- kernel/trace/trace_export.c | 3 ++- 5 files changed, 36 insertions(+), 11 deletions(-) commit f339c2597ebb00e738f2b6328c14804ed19f5d57 Merge: 47e9aa14ce5a eede42c9459b Author: Linus Torvalds Date: Sat Feb 11 16:39:05 2023 -0800 Merge tag 'spi-fix-v6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A couple of hopefully final fixes for spi: one driver specific fix for an issue with very large transfers and a fix for an issue with the locking fixes in spidev merged earlier this release cycle which was missed" * tag 'spi-fix-v6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spidev: fix a recursive locking error spi: dw: Fix wrong FIFO level setting for long xfers commit 47e9aa14ce5abca70d6584a8d8213707d197c38e Merge: 338c84730406 f545e8831e70 Author: Linus Torvalds Date: Sat Feb 11 11:17:21 2023 -0800 Merge tag 'x86-urgent-2023-02-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Fix a kprobes bug, plus add a new Intel model number to the upstream header for drivers to use" * tag 'x86-urgent-2023-02-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Add Lunar Lake M x86/kprobes: Fix 1 byte conditional jump target commit 338c84730406c30185d54b565d670e7e7c96967b Merge: d12aca5c0cee db370a8b9f67 Author: Linus Torvalds Date: Sat Feb 11 11:11:18 2023 -0800 Merge tag 'locking-urgent-2023-02-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Ingo Molnar: "Fix an rtmutex missed-wakeup bug" * tag 'locking-urgent-2023-02-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rtmutex: Ensure that the top waiter is always woken up commit d12aca5c0cee0da197ca55241bcc5ec55dd5ae58 Merge: 95232dd9ae13 711442e29f16 Author: Linus Torvalds Date: Sat Feb 11 11:03:25 2023 -0800 Merge tag 'cxl-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull cxl fixes from Dan Williams: "Two fixups for CXL (Compute Express Link) in presence of passthrough decoders. This primarily helps developers using the QEMU CXL emulation, but with the impending arrival of CXL switches these types of topologies will be of interest to end users. - Fix a crash when shutting down regions in the presence of passthrough decoders - Fix region creation to understand passthrough decoders instead of the narrower definition of passthrough ports" * tag 'cxl-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/region: Fix passthrough-decoder detection cxl/region: Fix null pointer dereference for resetting decoder commit 95232dd9ae13d6bb52ebd0c295e5dde30acd0d02 Merge: 230809c14509 c91d71363084 Author: Linus Torvalds Date: Sat Feb 11 10:58:36 2023 -0800 Merge tag 'libnvdimm-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A fix for an issue that could causes users to inadvertantly reserve too much capacity when debugging the KMSAN and persistent memory namespace, a lockdep fix, and a kernel-doc build warning: - Resolve the conflict between KMSAN and NVDIMM with respect to reserving pmem namespace / volume capacity for larger sizeof(struct page) - Fix a lockdep warning in the the NFIT code - Fix a kernel-doc build warning" * tag 'libnvdimm-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE ACPI: NFIT: fix a potential deadlock during NFIT teardown dax: super.c: fix kernel-doc bad line warning commit 230809c145091e5cfd948bd2db98e67a1a0571de Merge: 420b2d431d18 647037adcad0 Author: Linus Torvalds Date: Sat Feb 11 10:51:45 2023 -0800 Merge tag 'fixes-2023-02-11' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock revert from Mike Rapoport: "Revert 'mm: Always release pages to the buddy allocator in memblock_free_late()' The pages being freed by memblock_free_late() have already been initialized, but if they are in the deferred init range, __free_one_page() might access nearby uninitialized pages when trying to coalesce buddies, which will cause a crash. A proper fix will be more involved so revert this change for the time being" * tag 'fixes-2023-02-11' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: Revert "mm: Always release pages to the buddy allocator in memblock_free_late()." commit 420b2d431d18a2572c8e86579e78105cb5ed45b0 Merge: 545c80ab3428 ecfb9f404771 Author: Linus Torvalds Date: Fri Feb 10 15:28:08 2023 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "Two clk driver fixes - Use devm_kasprintf() to avoid overflows when forming clk names in the Microchip PolarFire driver - Fix the pretty broken Ingenic JZ4760 M/N/OD calculation to actually work and find proper divisors" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: ingenic: jz4760: Update M/N/OD calculation algorithm clk: microchip: mpfs-ccc: Use devm_kasprintf() for allocating formatted strings commit 545c80ab3428df0d693f6b99b57f3c6ada34494d Merge: 4cfd5afcd87e a8520be3ffef Author: Linus Torvalds Date: Fri Feb 10 15:02:16 2023 -0800 Merge tag 'pinctrl-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Some assorted pin control fixes, the most interesting will be the Intel patch fixing a classic problem: laptop touchpad IRQs... - Some pin drive register fixes in the Mediatek driver. - Return proper error code in the Aspeed driver, and revert and ill-advised force-disablement patch that needs to be reworked. - Fix AMD driver debug output. - Fix potential NULL dereference in the Single driver. - Fix a group definition error in the Qualcomm SM8450 LPASS driver. - Restore pins used in direct IRQ mode in the Intel driver (This fixes some laptop touchpads!)" * tag 'pinctrl-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: intel: Restore the pins that used to be in Direct IRQ mode pinctrl: qcom: sm8450-lpass-lpi: correct swr_rx_data group pinctrl: aspeed: Revert "Force to disable the function's signal" pinctrl: single: fix potential NULL dereference pinctrl: amd: Fix debug output for debounce time pinctrl: aspeed: Fix confusing types in return value pinctrl: mediatek: Fix the drive register definition of some Pins commit 4cfd5afcd87eb213f08863b6f34944978b0a678d Merge: 4f72a263e162 ff209ecc376a Author: Linus Torvalds Date: Fri Feb 10 14:18:48 2023 -0800 Merge tag 'pci-v6.2-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull PCI fixes from Bjorn Helgaas: - Move to a shared PCI git tree (Bjorn Helgaas) - Add Krzysztof Wilczyński as another PCI maintainer (Lorenzo Pieralisi) - Revert a couple ASPM patches to fix suspend/resume regressions (Bjorn Helgaas) * tag 'pci-v6.2-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: Revert "PCI/ASPM: Refactor L1 PM Substates Control Register programming" Revert "PCI/ASPM: Save L1 PM Substates Capability for suspend/resume" MAINTAINERS: Promote Krzysztof to PCI controller maintainer MAINTAINERS: Move to shared PCI tree commit ff209ecc376a2ea8dd106a1f594427a5d94b7dd3 Author: Bjorn Helgaas Date: Fri Feb 3 13:57:39 2023 -0600 Revert "PCI/ASPM: Refactor L1 PM Substates Control Register programming" This reverts commit 5e85eba6f50dc288c22083a7e213152bcc4b8208. Thomas Witt reported that 5e85eba6f50d ("PCI/ASPM: Refactor L1 PM Substates Control Register programming") broke suspend/resume on a Tuxedo Infinitybook S 14 v5, which seems to use a Clevo L140CU Mainboard. The main symptom is: iwlwifi 0000:02:00.0: Unable to change power state from D3hot to D0, device inaccessible nvme 0000:03:00.0: Unable to change power state from D3hot to D0, device inaccessible and the machine is only partially usable after resume. It can't run dmesg and can't do a clean reboot. This happens on every suspend/resume cycle. Revert 5e85eba6f50d until we can figure out the root cause. Fixes: 5e85eba6f50d ("PCI/ASPM: Refactor L1 PM Substates Control Register programming") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216877 Reported-by: Thomas Witt Tested-by: Thomas Witt Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v6.1+ Cc: Vidya Sagar drivers/pci/pcie/aspm.c | 74 +++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 40 deletions(-) commit a7152be79b627428c628da2a887ca4b2512a78fd Author: Bjorn Helgaas Date: Fri Feb 3 13:57:29 2023 -0600 Revert "PCI/ASPM: Save L1 PM Substates Capability for suspend/resume" This reverts commit 4ff116d0d5fd8a025604b0802d93a2d5f4e465d1. Tasev Nikola and Mark Enriquez reported that resume from suspend was broken in v6.1-rc1. Tasev bisected to a47126ec29f5 ("PCI/PTM: Cache PTM Capability offset"), but we can't figure out how that could be related. Mark saw the same symptoms and bisected to 4ff116d0d5fd ("PCI/ASPM: Save L1 PM Substates Capability for suspend/resume"), which does have a connection: it restores L1 Substates configuration while ASPM L1 may be enabled: pci_restore_state pci_restore_aspm_l1ss_state aspm_program_l1ss pci_write_config_dword(PCI_L1SS_CTL1, ctl1) # L1SS restore pci_restore_pcie_state pcie_capability_write_word(PCI_EXP_LNKCTL, cap[i++]) # L1 restore which is a problem because PCIe r6.0, sec 5.5.4, requires that: If setting either or both of the enable bits for ASPM L1 PM Substates, both ports must be configured as described in this section while ASPM L1 is disabled. Separately, Thomas Witt reported that 5e85eba6f50d ("PCI/ASPM: Refactor L1 PM Substates Control Register programming") broke suspend/resume, and it depends on 4ff116d0d5fd. Revert 4ff116d0d5fd ("PCI/ASPM: Save L1 PM Substates Capability for suspend/resume") to fix the resume issue and enable revert of 5e85eba6f50d to fix the issue Thomas reported. Note that reverting 4ff116d0d5fd means L1 Substates config may be lost on suspend/resume. As far as we know the system will use more power but will still *work* correctly. Fixes: 4ff116d0d5fd ("PCI/ASPM: Save L1 PM Substates Capability for suspend/resume") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216782 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216877 Reported-by: Tasev Nikola Reported-by: Mark Enriquez Reported-by: Thomas Witt Tested-by: Mark Enriquez Tested-by: Thomas Witt Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v6.1+ Cc: Vidya Sagar drivers/pci/pci.c | 7 ------- drivers/pci/pci.h | 4 ---- drivers/pci/pcie/aspm.c | 37 ------------------------------------- 3 files changed, 48 deletions(-) commit 4f72a263e162938de26866b862ed6015f5725946 Merge: 8e9a8427a1f1 bc6772bbab9a Author: Linus Torvalds Date: Fri Feb 10 09:48:42 2023 -0800 Merge tag 'soc-fixes-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "All the changes this time are minor devicetree corrections, the majority being for 64-bit Rockchip SoC support. These are a couple of corrections for properties that are in violation of the binding, some that put the machine into safer operating points for the eMMC and thermal settings, and missing properties that prevented rk356x PCIe and ethernet from working correctly. The changes for amlogic and mediatek address incorrect properties that were preventing the display support on MT8195 and the MMC support on various Meson SoCs from working correctly. The stihxxx-b2120 change fixes the GPIO polarity for the DVB tuner to allow this to be used correctly after a futre driver change, though it has no effect on older kernels" * tag 'soc-fixes-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: arm64: dts: meson-gx: Make mmc host controller interrupts level-sensitive arm64: dts: meson-g12-common: Make mmc host controller interrupts level-sensitive arm64: dts: meson-axg: Make mmc host controller interrupts level-sensitive ARM: dts: stihxxx-b2120: fix polarity of reset line of tsin0 port arm64: dts: mediatek: mt8195: Fix vdosys* compatible strings arm64: dts: rockchip: align rk3399 DMC OPP table with bindings arm64: dts: rockchip: set sdmmc0 speed to sd-uhs-sdr50 on rock-3a arm64: dts: rockchip: fix probe of analog sound card on rock-3a arm64: dts: rockchip: add missing #interrupt-cells to rk356x pcie2x1 arm64: dts: rockchip: fix input enable pinconf on rk3399 ARM: dts: rockchip: add power-domains property to dp node on rk3288 arm64: dts: rockchip: add io domain setting to rk3566-box-demo arm64: dts: rockchip: remove unsupported property from sdmmc2 for rock-3a arm64: dts: rockchip: drop unused LED mode property from rk3328-roc-cc arm64: dts: rockchip: reduce thermal limits on rk3399-pinephone-pro arm64: dts: rockchip: use correct reset names for rk3399 crypto nodes commit 8e9a8427a1f1f39632e2b2ccd651e499c64f59b2 Merge: 3647d2d70640 950b879b7f02 Author: Linus Torvalds Date: Fri Feb 10 09:27:52 2023 -0800 Merge tag 'riscv-for-linus-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: "This is a little bigger that I'd hope for this late in the cycle, but they're all pretty concrete fixes and the only one that's bigger than a few lines is pmdp_collapse_flush() (which is almost all boilerplate/comment). It's also all bug fixes for issues that have been around for a while. So I think it's not all that scary, just bad timing. - avoid partial TLB fences for huge pages, which are disallowed by the ISA - avoid missing a frame when dumping stacks - avoid misaligned accesses (and possibly overflows) in kprobes - fix a race condition in tracking page dirtiness" * tag 'riscv-for-linus-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte riscv: kprobe: Fixup misaligned load text riscv: stacktrace: Fix missing the first frame riscv: mm: Implement pmdp_collapse_flush for THP commit 3647d2d70640ff85be60793fa4b204bdae26ca44 Merge: 29716680adbb e7d84c6a1296 Author: Linus Torvalds Date: Fri Feb 10 09:04:00 2023 -0800 Merge tag 'ceph-for-6.2-rc8' of https://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A fix for a pretty embarrassing omission in the session flush handler from Xiubo, marked for stable" * tag 'ceph-for-6.2-rc8' of https://github.com/ceph/ceph-client: ceph: flush cap releases when the session is flushed commit 29716680adbb221a5cd1604e11e81c6f2938e06f Merge: 4fe37223975c 38c33ece2320 Author: Linus Torvalds Date: Fri Feb 10 08:55:09 2023 -0800 Merge tag 'block-6.2-2023-02-10' of git://git.kernel.dk/linux Pull block fix from Jens Axboe: "A single fix for a smatch regression introduced in this merge window" * tag 'block-6.2-2023-02-10' of git://git.kernel.dk/linux: nvme-auth: mark nvme_auth_wq static commit 4fe37223975ce04c4a4ad0a136cd4e64b39bc3ca Merge: 38c1e0c65865 88d18b8896bd Author: Linus Torvalds Date: Fri Feb 10 08:37:48 2023 -0800 Merge tag 'sound-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Hopefully the last one for 6.2, a collection of the fixes that have been gathered since the last pull. All changes are small and trivial device-specific fixes" * tag 'sound-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Add Positivo N14KP6-TG ASoC: topology: Return -ENOMEM on memory allocation failure ALSA: emux: Avoid potential array out-of-bound in snd_emux_xg_control() ASoC: fsl_sai: fix getting version from VERID ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform. ALSA: hda/realtek: Add quirk for ASUS UM3402 using CS35L41 ASoC: codecs: es8326: Fix DTS properties reading ASoC: tas5805m: add missing page switch. ASoC: tas5805m: rework to avoid scheduling while atomic. ALSA: hda/realtek: Enable mute/micmute LEDs on HP Elitebook, 645 G9 ASoC: SOF: amd: Fix for handling spurious interrupts from DSP ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro 360 ALSA: pci: lx6464es: fix a debug loop ASoC: rt715-sdca: fix clock stop prepare timeout issue commit bc6772bbab9af6034f918624a40ac5c962df2bac Merge: 89e5dd41c444 66e45351f7d6 Author: Arnd Bergmann Date: Fri Feb 10 11:31:24 2023 +0100 Merge tag 'amlogic-fixes-v6.2-rc-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/fixes Amlogic fixes for v6.2-rc, take2: - Change MMC controllers interrupts flag to level on all families, fixes irq loss & performance issues when cpu loaded * tag 'amlogic-fixes-v6.2-rc-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: arm64: dts: meson-gx: Make mmc host controller interrupts level-sensitive arm64: dts: meson-g12-common: Make mmc host controller interrupts level-sensitive arm64: dts: meson-axg: Make mmc host controller interrupts level-sensitive Link: https://lore.kernel.org/r/761c2ebc-7c93-8504-35ae-3e84ad216bcf@linaro.org Signed-off-by: Arnd Bergmann commit 66e45351f7d6798751f98001d1fcd572024d87f0 Author: Heiner Kallweit Date: Thu Feb 9 21:11:47 2023 +0100 arm64: dts: meson-gx: Make mmc host controller interrupts level-sensitive The usage of edge-triggered interrupts lead to lost interrupts under load, see [0]. This was confirmed to be fixed by using level-triggered interrupts. The report was about SDIO. However, as the host controller is the same for SD and MMC, apply the change to all mmc controller instances. [0] https://www.spinics.net/lists/linux-mmc/msg73991.html Fixes: ef8d2ffedf18 ("ARM64: dts: meson-gxbb: add MMC support") Cc: stable@vger.kernel.org Signed-off-by: Heiner Kallweit Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/76e042e0-a610-5ed5-209f-c4d7f879df44@gmail.com Signed-off-by: Neil Armstrong arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ac8db4cceed218cca21c84f9d75ce88182d8b04f Author: Heiner Kallweit Date: Thu Feb 9 21:11:10 2023 +0100 arm64: dts: meson-g12-common: Make mmc host controller interrupts level-sensitive The usage of edge-triggered interrupts lead to lost interrupts under load, see [0]. This was confirmed to be fixed by using level-triggered interrupts. The report was about SDIO. However, as the host controller is the same for SD and MMC, apply the change to all mmc controller instances. [0] https://www.spinics.net/lists/linux-mmc/msg73991.html Fixes: 4759fd87b928 ("arm64: dts: meson: g12a: add mmc nodes") Tested-by: FUKAUMI Naoki Tested-by: Martin Blumenstingl Tested-by: Jerome Brunet Cc: stable@vger.kernel.org Signed-off-by: Heiner Kallweit Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/27d89baa-b8fa-baca-541b-ef17a97cde3c@gmail.com Signed-off-by: Neil Armstrong arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d182bcf300772d8b2e5f43e47fa0ebda2b767cc4 Author: Heiner Kallweit Date: Thu Feb 9 21:10:31 2023 +0100 arm64: dts: meson-axg: Make mmc host controller interrupts level-sensitive The usage of edge-triggered interrupts lead to lost interrupts under load, see [0]. This was confirmed to be fixed by using level-triggered interrupts. The report was about SDIO. However, as the host controller is the same for SD and MMC, apply the change to all mmc controller instances. [0] https://www.spinics.net/lists/linux-mmc/msg73991.html Fixes: 221cf34bac54 ("ARM64: dts: meson-axg: enable the eMMC controller") Reported-by: Peter Suti Tested-by: Vyacheslav Bocharov Tested-by: Peter Suti Cc: stable@vger.kernel.org Signed-off-by: Heiner Kallweit Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/c00655d3-02f8-6f5f-4239-ca2412420cad@gmail.com Signed-off-by: Neil Armstrong arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38c1e0c65865426676123cc9a127526fa02bcac6 Merge: 1424c3e309bb 777c1e01cb7e Author: Linus Torvalds Date: Thu Feb 9 17:52:00 2023 -0800 Merge tag 'drm-fixes-2023-02-10' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Weekly fixes. The amdgpu had a few small fixes to display flicker on certain configurations, however it was found the the flicker was lessened but there were other unintended consequences, so for now they've been reverted and replaced with an option for users to test with so future fixes can be developed. Otherwise apart from the usual bunch of i915 and amdgpu, there's a client, virtio-gpu and an nvidiafb fix that reorders its loading to avoid failure. client: - refcount fix amdgpu: - a bunch of attempted flicker fixes that regressed turned into a user workaround option for now - Properly fix S/G display with AGP aperture enabled - Fix cursor offset with 180 rotation - SMU13 fixes - Use TGID for GPUVM traces - Fix oops on in fence error path - Don't run IB tests on hw rings when sw rings are in use - memory leak fix i915: - Display watermark fix - fbdev fix for PSR, FBC, DRRS - Move fd_install after last use of fence - Initialize the obj flags for shmem objects - Fix VBT DSI DVO port handling virtio-gpu: - fence fix nvidiafb: - regression fix for driver load when no hw supported" * tag 'drm-fixes-2023-02-10' of git://anongit.freedesktop.org/drm/drm: (27 commits) Revert "drm/amd/display: disable S/G display on DCN 3.1.5" Revert "drm/amd/display: disable S/G display on DCN 2.1.0" Revert "drm/amd/display: disable S/G display on DCN 3.1.2/3" drm/amdgpu: add S/G display parameter drm/amdgpu/smu: skip pptable init under sriov amd/amdgpu: remove test ib on hw ring drm/amdgpu/fence: Fix oops due to non-matching drm_sched init/fini drm/amdgpu: Use the TGID for trace_amdgpu_vm_update_ptes drm/amdgpu: Add unique_id support for GC 11.0.1/2 drm/amd/pm: bump SMU 13.0.7 driver_if header version drm/amd/pm: bump SMU 13.0.0 driver_if header version drm/amd/pm: add SMU 13.0.7 missing GetPptLimit message mapping drm/amd/display: fix cursor offset on rotation 180 drm/amd/amdgpu: enable athub cg 11.0.3 Revert "drm/amd/display: disable S/G display on DCN 3.1.4" drm/amd/display: properly handling AGP aperture in vm setup drm/amd/display: disable S/G display on DCN 3.1.2/3 drm/amd/display: disable S/G display on DCN 2.1.0 drm/i915: Fix VBT DSI DVO port handling drm/client: fix circular reference counting issue ... commit 1424c3e309bbdcf2d93977bf2840cc00ef9b6208 Merge: e544a0743852 2de49fb1c9bb Author: Linus Torvalds Date: Thu Feb 9 17:34:14 2023 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "The usual collection of small driver bug fixes: - Fix error unwind bugs in hfi1, irdma rtrs - Old bug with IPoIB children interfaces possibly using the wrong number of queues - Really old bug in usnic calling iommu_map in an atomic context - Recent regression from the DMABUF locking rework - Missing user data validation in MANA" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/rtrs: Don't call kobject_del for srv_path->kobj RDMA/mana_ib: Prevent array underflow in mana_ib_create_qp_raw() IB/hfi1: Assign npages earlier RDMA/umem: Use dma-buf locked API to solve deadlock RDMA/usnic: use iommu_map_atomic() under spin_lock() RDMA/irdma: Fix potential NULL-ptr-dereference IB/IPoIB: Fix legacy IPoIB due to wrong number of queues IB/hfi1: Restore allocated resources on failed copyout commit 777c1e01cb7e1947765fb0c3b9b71dab18e53e46 Merge: 0ed904169f85 e7d636476ba7 Author: Dave Airlie Date: Fri Feb 10 09:49:12 2023 +1000 Merge tag 'amd-drm-fixes-6.2-2023-02-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.2-2023-02-09: amdgpu: - Add a parameter to disable S/G display - Re-enable S/G display on all DCNs Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230209174504.7577-1-alexander.deucher@amd.com commit 0ed904169f85efcf9f82bd960597aac46260537f Merge: 337d5b5edc3d 6a7ff131f17f Author: Dave Airlie Date: Fri Feb 10 09:47:20 2023 +1000 Merge tag 'drm-intel-fixes-2023-02-09' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Display watermark fix (Ville) - fbdev fix for PSR, FBC, DRRS (Jouni) - Move fd_install after last use of fence (Rob) - Initialize the obj flags for shmem objects (Aravind) - Fix VBT DSI DVO port handling (Ville) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y+UZ0rh2YlhTrE4t@intel.com commit 337d5b5edc3d03a30a972aead75cc6be5dcebbf6 Merge: 4684f5ce839a 85e26dd5100a Author: Dave Airlie Date: Fri Feb 10 09:15:52 2023 +1000 Merge tag 'drm-misc-fixes-2023-02-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes A fix for a circular refcounting in drm/client, one for a memory leak in amdgpu and a virtio fence fix when interrupted Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230209083600.7hi6roht6xxgldgz@houat commit 950b879b7f0251317d26bae0687e72592d607532 Author: Guo Ren Date: Thu Jan 26 22:53:06 2023 -0500 riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte In commit 588a513d3425 ("arm64: Fix race condition on PG_dcache_clean in __sync_icache_dcache()"), we found RISC-V has the same issue as the previous arm64. The previous implementation didn't guarantee the correct sequence of operations, which means flush_icache_all() hasn't been called when the PG_dcache_clean was set. That would cause a risk of page synchronization. Fixes: 08f051eda33b ("RISC-V: Flush I$ when making a dirty page executable") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Reviewed-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230127035306.1819561-1-guoren@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/mm/cacheflush.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit eb7423273cc9922ee2d05bf660c034d7d515bb91 Author: Guo Ren Date: Sat Feb 4 01:35:31 2023 -0500 riscv: kprobe: Fixup misaligned load text The current kprobe would cause a misaligned load for the probe point. This patch fixup it with two half-word loads instead. Fixes: c22b0bcb1dd0 ("riscv: Add kprobes supported") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Link: https://lore.kernel.org/linux-riscv/878rhig9zj.fsf@all.your.base.are.belong.to.us/ Reported-by: Bjorn Topel Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20230204063531.740220-1-guoren@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/probes/kprobes.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e544a07438522ab3688416e6e2e34bf0ee6d8755 Merge: 35674e787518 918c5765a154 Author: Linus Torvalds Date: Thu Feb 9 10:54:57 2023 -0800 Merge tag 'pm-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix the incorrect value returned by cpufreq driver's ->get() callback for Qualcomm platforms (Douglas Anderson)" * tag 'pm-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: qcom-hw: Fix cpufreq_driver->get() for non-LMH systems commit 35674e787518768626d3a0ffce1c13a7eeed922d Merge: 0b028189d101 3a082086aa20 Author: Linus Torvalds Date: Thu Feb 9 09:17:38 2023 -0800 Merge tag 'net-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from can and ipsec subtrees. Current release - regressions: - sched: fix off by one in htb_activate_prios() - eth: mana: fix accessing freed irq affinity_hint - eth: ice: fix out-of-bounds KASAN warning in virtchnl Current release - new code bugs: - eth: mtk_eth_soc: enable special tag when any MAC uses DSA Previous releases - always broken: - core: fix sk->sk_txrehash default - neigh: make sure used and confirmed times are valid - mptcp: be careful on subflow status propagation on errors - xfrm: prevent potential spectre v1 gadget in xfrm_xlate32_attr() - phylink: move phy_device_free() to correctly release phy device - eth: mlx5: - fix crash unsetting rx-vlan-filter in switchdev mode - fix hang on firmware reset - serialize module cleanup with reload and remove" * tag 'net-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (57 commits) selftests: forwarding: lib: quote the sysctl values net: mscc: ocelot: fix all IPv6 getting trapped to CPU when PTP timestamping is used rds: rds_rm_zerocopy_callback() use list_first_entry() net: txgbe: Update support email address selftests: Fix failing VXLAN VNI filtering test selftests: mptcp: stop tests earlier selftests: mptcp: allow more slack for slow test-case mptcp: be careful on subflow status propagation on errors mptcp: fix locking for in-kernel listener creation mptcp: fix locking for setsockopt corner-case mptcp: do not wait for bare sockets' timeout net: ethernet: mtk_eth_soc: fix DSA TX tag hwaccel for switch port 0 nfp: ethtool: fix the bug of setting unsupported port speed txhash: fix sk->sk_txrehash default net: ethernet: mtk_eth_soc: fix wrong parameters order in __xdp_rxq_info_reg() net: ethernet: mtk_eth_soc: enable special tag when any MAC uses DSA net: sched: sch: Fix off by one in htb_activate_prios() igc: Add ndo_tx_timeout support net: mana: Fix accessing freed irq affinity_hint hv_netvsc: Allocate memory in netvsc_dma_map() with GFP_ATOMIC ... commit 0b028189d1019ca352da108643b8f1503ee25a0e Merge: 94a1f56db688 ebebf05a4b06 Author: Linus Torvalds Date: Thu Feb 9 09:09:13 2023 -0800 Merge tag 'for-linus-2023020901' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Benjamin Tissoires: - fix potential infinite loop with a badly crafted HID device (Xin Zhao) - fix regression from 6.1 in USB logitech devices potentially making their mouse wheel not working (Bastien Nocera) - clean up in AMD sensors, which fixes a long time resume bug (Mario Limonciello) - few device small fixes and quirks * tag 'for-linus-2023020901' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: Ignore battery for ELAN touchscreen 29DF on HP HID: amd_sfh: if no sensors are enabled, clean up HID: logitech: Disable hi-res scrolling on USB HID: core: Fix deadloop in hid_apply_multiplier. HID: Ignore battery for Elan touchscreen on Asus TP420IA HID: elecom: add support for TrackBall 056E:011C commit 94a1f56db688f134c763a4b2a5926b437f1ab4b9 Merge: 0983f6bf2bfc aa5465aeca3c Author: Linus Torvalds Date: Thu Feb 9 09:00:26 2023 -0800 Merge tag '6.2-rc8-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6 Pull cifx fix from Steve French: "Small fix for use after free" * tag '6.2-rc8-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6: cifs: Fix use-after-free in rdata->read_into_pages() commit 5f58d783fd7823b2c2d5954d1126e702f94bfc4c Author: Anand Jain Date: Fri Jan 20 21:47:16 2023 +0800 btrfs: free device in btrfs_close_devices for a single device filesystem We have this check to make sure we don't accidentally add older devices that may have disappeared and re-appeared with an older generation from being added to an fs_devices (such as a replace source device). This makes sense, we don't want stale disks in our file system. However for single disks this doesn't really make sense. I've seen this in testing, but I was provided a reproducer from a project that builds btrfs images on loopback devices. The loopback device gets cached with the new generation, and then if it is re-used to generate a new file system we'll fail to mount it because the new fs is "older" than what we have in cache. Fix this by freeing the cache when closing the device for a single device filesystem. This will ensure that the mount command passed device path is scanned successfully during the next mount. CC: stable@vger.kernel.org # 5.10+ Reported-by: Daan De Meyer Signed-off-by: Josef Bacik Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 519b7e13b5ae8dd38da1e52275705343be6bb508 Author: Filipe Manana Date: Mon Jan 23 16:54:46 2023 +0000 btrfs: lock the inode in shared mode before starting fiemap Currently fiemap does not take the inode's lock (VFS lock), it only locks a file range in the inode's io tree. This however can lead to a deadlock if we have a concurrent fsync on the file and fiemap code triggers a fault when accessing the user space buffer with fiemap_fill_next_extent(). The deadlock happens on the inode's i_mmap_lock semaphore, which is taken both by fsync and btrfs_page_mkwrite(). This deadlock was recently reported by syzbot and triggers a trace like the following: task:syz-executor361 state:D stack:20264 pid:5668 ppid:5119 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5293 [inline] __schedule+0x995/0xe20 kernel/sched/core.c:6606 schedule+0xcb/0x190 kernel/sched/core.c:6682 wait_on_state fs/btrfs/extent-io-tree.c:707 [inline] wait_extent_bit+0x577/0x6f0 fs/btrfs/extent-io-tree.c:751 lock_extent+0x1c2/0x280 fs/btrfs/extent-io-tree.c:1742 find_lock_delalloc_range+0x4e6/0x9c0 fs/btrfs/extent_io.c:488 writepage_delalloc+0x1ef/0x540 fs/btrfs/extent_io.c:1863 __extent_writepage+0x736/0x14e0 fs/btrfs/extent_io.c:2174 extent_write_cache_pages+0x983/0x1220 fs/btrfs/extent_io.c:3091 extent_writepages+0x219/0x540 fs/btrfs/extent_io.c:3211 do_writepages+0x3c3/0x680 mm/page-writeback.c:2581 filemap_fdatawrite_wbc+0x11e/0x170 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] filemap_fdatawrite_range+0x175/0x200 mm/filemap.c:439 btrfs_fdatawrite_range fs/btrfs/file.c:3850 [inline] start_ordered_ops fs/btrfs/file.c:1737 [inline] btrfs_sync_file+0x4ff/0x1190 fs/btrfs/file.c:1839 generic_write_sync include/linux/fs.h:2885 [inline] btrfs_do_write_iter+0xcd3/0x1280 fs/btrfs/file.c:1684 call_write_iter include/linux/fs.h:2189 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7dc/0xc50 fs/read_write.c:584 ksys_write+0x177/0x2a0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f7d4054e9b9 RSP: 002b:00007f7d404fa2f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f7d405d87a0 RCX: 00007f7d4054e9b9 RDX: 0000000000000090 RSI: 0000000020000000 RDI: 0000000000000006 RBP: 00007f7d405a51d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 61635f65646f6e69 R13: 65646f7475616f6e R14: 7261637369646f6e R15: 00007f7d405d87a8 INFO: task syz-executor361:5697 blocked for more than 145 seconds. Not tainted 6.2.0-rc3-syzkaller-00376-g7c6984405241 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor361 state:D stack:21216 pid:5697 ppid:5119 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5293 [inline] __schedule+0x995/0xe20 kernel/sched/core.c:6606 schedule+0xcb/0x190 kernel/sched/core.c:6682 rwsem_down_read_slowpath+0x5f9/0x930 kernel/locking/rwsem.c:1095 __down_read_common+0x54/0x2a0 kernel/locking/rwsem.c:1260 btrfs_page_mkwrite+0x417/0xc80 fs/btrfs/inode.c:8526 do_page_mkwrite+0x19e/0x5e0 mm/memory.c:2947 wp_page_shared+0x15e/0x380 mm/memory.c:3295 handle_pte_fault mm/memory.c:4949 [inline] __handle_mm_fault mm/memory.c:5073 [inline] handle_mm_fault+0x1b79/0x26b0 mm/memory.c:5219 do_user_addr_fault+0x69b/0xcb0 arch/x86/mm/fault.c:1428 handle_page_fault arch/x86/mm/fault.c:1519 [inline] exc_page_fault+0x7a/0x110 arch/x86/mm/fault.c:1575 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 RIP: 0010:copy_user_short_string+0xd/0x40 arch/x86/lib/copy_user_64.S:233 Code: 74 0a 89 (...) RSP: 0018:ffffc9000570f330 EFLAGS: 00050202 RAX: ffffffff843e6601 RBX: 00007fffffffefc8 RCX: 0000000000000007 RDX: 0000000000000000 RSI: ffffc9000570f3e0 RDI: 0000000020000120 RBP: ffffc9000570f490 R08: 0000000000000000 R09: fffff52000ae1e83 R10: fffff52000ae1e83 R11: 1ffff92000ae1e7c R12: 0000000000000038 R13: ffffc9000570f3e0 R14: 0000000020000120 R15: ffffc9000570f3e0 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline] _copy_to_user+0xe9/0x130 lib/usercopy.c:34 copy_to_user include/linux/uaccess.h:169 [inline] fiemap_fill_next_extent+0x22e/0x410 fs/ioctl.c:144 emit_fiemap_extent+0x22d/0x3c0 fs/btrfs/extent_io.c:3458 fiemap_process_hole+0xa00/0xad0 fs/btrfs/extent_io.c:3716 extent_fiemap+0xe27/0x2100 fs/btrfs/extent_io.c:3922 btrfs_fiemap+0x172/0x1e0 fs/btrfs/inode.c:8209 ioctl_fiemap fs/ioctl.c:219 [inline] do_vfs_ioctl+0x185b/0x2980 fs/ioctl.c:810 __do_sys_ioctl fs/ioctl.c:868 [inline] __se_sys_ioctl+0x83/0x170 fs/ioctl.c:856 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:0x7f7d4054e9b9 RSP: 002b:00007f7d390d92f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f7d405d87b0 RCX: 00007f7d4054e9b9 RDX: 0000000020000100 RSI: 00000000c020660b RDI: 0000000000000005 RBP: 00007f7d405a51d0 R08: 00007f7d390d9700 R09: 0000000000000000 R10: 00007f7d390d9700 R11: 0000000000000246 R12: 61635f65646f6e69 R13: 65646f7475616f6e R14: 7261637369646f6e R15: 00007f7d405d87b8 What happens is the following: 1) Task A is doing an fsync, enters btrfs_sync_file() and flushes delalloc before locking the inode and the i_mmap_lock semaphore, that is, before calling btrfs_inode_lock(); 2) After task A flushes delalloc and before it calls btrfs_inode_lock(), another task dirties a page; 3) Task B starts a fiemap without FIEMAP_FLAG_SYNC, so the page dirtied at step 2 remains dirty and unflushed. Then when it enters extent_fiemap() and it locks a file range that includes the range of the page dirtied in step 2; 4) Task A calls btrfs_inode_lock() and locks the inode (VFS lock) and the inode's i_mmap_lock semaphore in write mode. Then it tries to flush delalloc by calling start_ordered_ops(), which will block, at find_lock_delalloc_range(), when trying to lock the range of the page dirtied at step 2, since this range was locked by the fiemap task (at step 3); 5) Task B generates a page fault when accessing the user space fiemap buffer with a call to fiemap_fill_next_extent(). The fault handler needs to call btrfs_page_mkwrite() for some other page of our inode, and there we deadlock when trying to lock the inode's i_mmap_lock semaphore in read mode, since the fsync task locked it in write mode (step 4) and the fsync task can not progress because it's waiting to lock a file range that is currently locked by us (the fiemap task, step 3). Fix this by taking the inode's lock (VFS lock) in shared mode when entering fiemap. This effectively serializes fiemap with fsync (except the most expensive part of fsync, the log sync), preventing this deadlock. Reported-by: syzbot+cc35f55c41e34c30dcb5@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/00000000000032dc7305f2a66f46@google.com/ CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 ++ 1 file changed, 2 insertions(+) commit e7d636476ba73e61460619bd8822e16af3cba509 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 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) commit 1b7ac7989ad82f8df6365cd6338df0d9937e0119 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 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) commit 9734a75cd99d448814e64feca133dc9a6e3f65f2 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 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+) commit 4693e852f19a1338a49e540fb99fe3b2898d8594 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 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 3 files changed, 15 insertions(+) commit 38c33ece232019c5b18b4d5ec0254807cac06b7c Merge: e02bbac74cdd 70daa5c8f001 Author: Jens Axboe Date: Thu Feb 9 08:12:06 2023 -0700 Merge tag 'nvme-6.2-2023-02-09' of git://git.infradead.org/nvme into block-6.2 Pull NVMe fix from Christoph: "nvme fixes for Linux 6.2 - fix a static checker warning for a variable introduces in the last pull request (Tom Rix)" * tag 'nvme-6.2-2023-02-09' of git://git.infradead.org/nvme: nvme-auth: mark nvme_auth_wq static commit 303e724d7b1e1a0a93daf0b1ab5f7c4f53543b34 Author: Mark Pearson Date: Wed Feb 8 13:12:23 2023 -0500 usb: core: add quirk for Alcor Link AK9563 smartcard reader The Alcor Link AK9563 smartcard reader used on some Lenovo platforms doesn't work. If LPM is enabled the reader will provide an invalid usb config descriptor. Added quirk to disable LPM. Verified fix on Lenovo P16 G1 and T14 G3 Tested-by: Miroslav Zatko Tested-by: Dennis Wassenberg Cc: stable@vger.kernel.org Signed-off-by: Dennis Wassenberg Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20230208181223.1092654-1-mpearson-lenovo@squebb.ca Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 54e5c00a4eb0a4c663445b245f641bbfab142430 Author: Prashant Malani Date: Wed Feb 8 20:53:19 2023 +0000 usb: typec: altmodes/displayport: Fix probe pin assign check While checking Pin Assignments of the port and partner during probe, we don't take into account whether the peripheral is a plug or receptacle. This manifests itself in a mode entry failure on certain docks and dongles with captive cables. For instance, the Startech.com Type-C to DP dongle (Model #CDP2DP) advertises its DP VDO as 0x405. This would fail the Pin Assignment compatibility check, despite it supporting Pin Assignment C as a UFP. Update the check to use the correct DP Pin Assign macros that take the peripheral's receptacle bit into account. Fixes: c1e5c2f0cb8a ("usb: typec: altmodes/displayport: correct pin assignment for UFP receptacles") Cc: stable@vger.kernel.org Reported-by: Diana Zigterman Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20230208205318.131385-1-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/altmodes/displayport.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bb07bd68fa0983e3915f83c471382868860389fe Author: Paul Cercueil Date: Thu Feb 9 10:56:26 2023 +0000 Revert "usb: gadget: u_ether: Do not make UDC parent of the net device" This reverts commit 321b59870f850a10dbb211ecd2bd87b41497ea6f. This commit broke USB networking on Ingenic SoCs and maybe elsewhere. The actual reason is unknown; and while a proper fix would be better, we're sitting at -rc7 now, so a revert is justified - and we can work on re-introducing this change for 6.3. Fixes: 321b59870f85 ("usb: gadget: u_ether: Do not make UDC parent of the net device") Signed-off-by: Paul Cercueil Acked-by: Sascha Hauer Link: https://lore.kernel.org/r/20230209105626.10597-1-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/u_ether.c | 4 ++++ 1 file changed, 4 insertions(+) commit 190233164cd77115f8dea718cbac561f557092c6 Author: Darren Hart Date: Wed Feb 8 16:28:21 2023 -0800 arm64: efi: Force the use of SetVirtualAddressMap() on eMAG and Altra Max machines Commit 550b33cfd445 ("arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines") identifies the Altra family via the family field in the type#1 SMBIOS record. eMAG and Altra Max machines are similarly affected but not detected with the strict strcmp test. The type1_family smbios string is not an entirely reliable means of identifying systems with this issue as OEMs can, and do, use their own strings for these fields. However, until we have a better solution, capture the bulk of these systems by adding strcmp matching for "eMAG" and "Altra Max". Fixes: 550b33cfd445 ("arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines") Cc: # 6.1.x Cc: Alexandru Elisei Signed-off-by: Darren Hart Tested-by: Justin He Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/arm64.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 3a082086aa200852545cf15159213582c0c80eba Author: Hangbin Liu Date: Wed Feb 8 11:21:10 2023 +0800 selftests: forwarding: lib: quote the sysctl values When set/restore sysctl value, we should quote the value as some keys may have multi values, e.g. net.ipv4.ping_group_range Fixes: f5ae57784ba8 ("selftests: forwarding: lib: Add sysctl_set(), sysctl_restore()") Signed-off-by: Hangbin Liu Reviewed-by: Petr Machata Link: https://lore.kernel.org/r/20230208032110.879205-1-liuhangbin@gmail.com Signed-off-by: Paolo Abeni tools/testing/selftests/net/forwarding/lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2fcde9fe258ec8b88d41def38e43ca4da32c0a9a Author: Vladimir Oltean Date: Tue Feb 7 20:31:17 2023 +0200 net: mscc: ocelot: fix all IPv6 getting trapped to CPU when PTP timestamping is used While running this selftest which usually passes: ~/selftests/drivers/net/dsa# ./local_termination.sh eno0 swp0 TEST: swp0: Unicast IPv4 to primary MAC address [ OK ] TEST: swp0: Unicast IPv4 to macvlan MAC address [ OK ] TEST: swp0: Unicast IPv4 to unknown MAC address [ OK ] TEST: swp0: Unicast IPv4 to unknown MAC address, promisc [ OK ] TEST: swp0: Unicast IPv4 to unknown MAC address, allmulti [ OK ] TEST: swp0: Multicast IPv4 to joined group [ OK ] TEST: swp0: Multicast IPv4 to unknown group [ OK ] TEST: swp0: Multicast IPv4 to unknown group, promisc [ OK ] TEST: swp0: Multicast IPv4 to unknown group, allmulti [ OK ] TEST: swp0: Multicast IPv6 to joined group [ OK ] TEST: swp0: Multicast IPv6 to unknown group [ OK ] TEST: swp0: Multicast IPv6 to unknown group, promisc [ OK ] TEST: swp0: Multicast IPv6 to unknown group, allmulti [ OK ] if I start PTP timestamping then run it again (debug prints added by me), the unknown IPv6 MC traffic is seen by the CPU port even when it should have been dropped: ~/selftests/drivers/net/dsa# ptp4l -i swp0 -2 -P -m ptp4l[225.410]: selected /dev/ptp1 as PTP clock [ 225.445746] mscc_felix 0000:00:00.5: ocelot_l2_ptp_trap_add: port 0 adding L2 PTP trap [ 225.453815] mscc_felix 0000:00:00.5: ocelot_ipv4_ptp_trap_add: port 0 adding IPv4 PTP event trap [ 225.462703] mscc_felix 0000:00:00.5: ocelot_ipv4_ptp_trap_add: port 0 adding IPv4 PTP general trap [ 225.471768] mscc_felix 0000:00:00.5: ocelot_ipv6_ptp_trap_add: port 0 adding IPv6 PTP event trap [ 225.480651] mscc_felix 0000:00:00.5: ocelot_ipv6_ptp_trap_add: port 0 adding IPv6 PTP general trap ptp4l[225.488]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[225.488]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ^C ~/selftests/drivers/net/dsa# ./local_termination.sh eno0 swp0 TEST: swp0: Unicast IPv4 to primary MAC address [ OK ] TEST: swp0: Unicast IPv4 to macvlan MAC address [ OK ] TEST: swp0: Unicast IPv4 to unknown MAC address [ OK ] TEST: swp0: Unicast IPv4 to unknown MAC address, promisc [ OK ] TEST: swp0: Unicast IPv4 to unknown MAC address, allmulti [ OK ] TEST: swp0: Multicast IPv4 to joined group [ OK ] TEST: swp0: Multicast IPv4 to unknown group [ OK ] TEST: swp0: Multicast IPv4 to unknown group, promisc [ OK ] TEST: swp0: Multicast IPv4 to unknown group, allmulti [ OK ] TEST: swp0: Multicast IPv6 to joined group [ OK ] TEST: swp0: Multicast IPv6 to unknown group [FAIL] reception succeeded, but should have failed TEST: swp0: Multicast IPv6 to unknown group, promisc [ OK ] TEST: swp0: Multicast IPv6 to unknown group, allmulti [ OK ] The PGID_MCIPV6 is configured correctly to not flood to the CPU, I checked that. Furthermore, when I disable back PTP RX timestamping (ptp4l doesn't do that when it exists), packets are RX filtered again as they should be: ~/selftests/drivers/net/dsa# hwstamp_ctl -i swp0 -r 0 [ 218.202854] mscc_felix 0000:00:00.5: ocelot_l2_ptp_trap_del: port 0 removing L2 PTP trap [ 218.212656] mscc_felix 0000:00:00.5: ocelot_ipv4_ptp_trap_del: port 0 removing IPv4 PTP event trap [ 218.222975] mscc_felix 0000:00:00.5: ocelot_ipv4_ptp_trap_del: port 0 removing IPv4 PTP general trap [ 218.233133] mscc_felix 0000:00:00.5: ocelot_ipv6_ptp_trap_del: port 0 removing IPv6 PTP event trap [ 218.242251] mscc_felix 0000:00:00.5: ocelot_ipv6_ptp_trap_del: port 0 removing IPv6 PTP general trap current settings: tx_type 1 rx_filter 12 new settings: tx_type 1 rx_filter 0 ~/selftests/drivers/net/dsa# ./local_termination.sh eno0 swp0 TEST: swp0: Unicast IPv4 to primary MAC address [ OK ] TEST: swp0: Unicast IPv4 to macvlan MAC address [ OK ] TEST: swp0: Unicast IPv4 to unknown MAC address [ OK ] TEST: swp0: Unicast IPv4 to unknown MAC address, promisc [ OK ] TEST: swp0: Unicast IPv4 to unknown MAC address, allmulti [ OK ] TEST: swp0: Multicast IPv4 to joined group [ OK ] TEST: swp0: Multicast IPv4 to unknown group [ OK ] TEST: swp0: Multicast IPv4 to unknown group, promisc [ OK ] TEST: swp0: Multicast IPv4 to unknown group, allmulti [ OK ] TEST: swp0: Multicast IPv6 to joined group [ OK ] TEST: swp0: Multicast IPv6 to unknown group [ OK ] TEST: swp0: Multicast IPv6 to unknown group, promisc [ OK ] TEST: swp0: Multicast IPv6 to unknown group, allmulti [ OK ] So it's clear that something in the PTP RX trapping logic went wrong. Looking a bit at the code, I can see that there are 4 typos, which populate "ipv4" VCAP IS2 key filter fields for IPv6 keys. VCAP IS2 keys of type OCELOT_VCAP_KEY_IPV4 and OCELOT_VCAP_KEY_IPV6 are handled by is2_entry_set(). OCELOT_VCAP_KEY_IPV4 looks at &filter->key.ipv4, and OCELOT_VCAP_KEY_IPV6 at &filter->key.ipv6. Simply put, when we populate the wrong key field, &filter->key.ipv6 fields "proto.mask" and "proto.value" remain all zeroes (or "don't care"). So is2_entry_set() will enter the "else" of this "if" condition: if (msk == 0xff && (val == IPPROTO_TCP || val == IPPROTO_UDP)) and proceed to ignore the "proto" field. The resulting rule will match on all IPv6 traffic, trapping it to the CPU. This is the reason why the local_termination.sh selftest sees it, because control traps are stronger than the PGID_MCIPV6 used for flooding (from the forwarding data path). But the problem is in fact much deeper. We trap all IPv6 traffic to the CPU, but if we're bridged, we set skb->offload_fwd_mark = 1, so software forwarding will not take place and IPv6 traffic will never reach its destination. The fix is simple - correct the typos. I was intentionally inaccurate in the commit message about the breakage occurring when any PTP timestamping is enabled. In fact it only happens when L4 timestamping is requested (HWTSTAMP_FILTER_PTP_V2_EVENT or HWTSTAMP_FILTER_PTP_V2_L4_EVENT). But ptp4l requests a larger RX timestamping filter than it needs for "-2": HWTSTAMP_FILTER_PTP_V2_EVENT. I wanted people skimming through git logs to not think that the bug doesn't affect them because they only use ptp4l in L2 mode. Fixes: 96ca08c05838 ("net: mscc: ocelot: set up traps for PTP packets") Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230207183117.1745754-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni drivers/net/ethernet/mscc/ocelot_ptp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f753a68980cf4b59a80fe677619da2b1804f526d Author: Pietro Borrello Date: Tue Feb 7 18:26:34 2023 +0000 rds: rds_rm_zerocopy_callback() use list_first_entry() rds_rm_zerocopy_callback() uses list_entry() on the head of a list causing a type confusion. Use list_first_entry() to actually access the first element of the rs_zcookie_queue list. Fixes: 9426bbc6de99 ("rds: use list structure to track information for zerocopy completion notification") Reviewed-by: Willem de Bruijn Signed-off-by: Pietro Borrello Link: https://lore.kernel.org/r/20230202-rds-zerocopy-v3-1-83b0df974f9a@diag.uniroma1.it Signed-off-by: Paolo Abeni net/rds/message.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4684f5ce839ab27f5f0414c08084468098363d27 Merge: 04119ab1a49f c6ac406cd8ff Author: Dave Airlie Date: Thu Feb 9 17:04:25 2023 +1000 Merge tag 'amd-drm-fixes-6.2-2023-02-08' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.2-2023-02-08: amdgpu: - Flickering fixes for DCN 2.1, 3.1.2/3 - Re-enable S/G display on DCN 3.1.4 - Properly fix S/G display with AGP aperture enabled - Fix cursor offset with 180 rotation - SMU13 fixes - Use TGID for GPUVM traces - Fix oops on in fence error path - Don't run IB tests on hw rings when sw rings are in use Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230209045321.565132-1-alexander.deucher@amd.com commit 646be03ec46cc736d78ca4db2e0b00fa84446d77 Merge: 363d7c2298e7 6028da3f125f Author: Jakub Kicinski Date: Wed Feb 8 21:35:38 2023 -0800 Merge tag 'ipsec-2023-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== ipsec 2023-02-08 1) Fix policy checks for nested IPsec tunnels when using xfrm interfaces. From Benedict Wong. 2) Fix netlink message expression on 32=>64-bit messages translators. From Anastasia Belova. 3) Prevent potential spectre v1 gadget in xfrm_xlate32_attr. From Eric Dumazet. 4) Always consistently use time64_t in xfrm_timer_handler. From Eric Dumazet. 5) Fix KCSAN reported bug: Multiple cpus can update use_time at the same time. From Eric Dumazet. 6) Fix SCP copy from IPv4 to IPv6 on interfamily tunnel. From Christian Hopps. * tag 'ipsec-2023-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec: xfrm: fix bug with DSCP copy to v6 from v4 tunnel xfrm: annotate data-race around use_time xfrm: consistently use time64_t in xfrm_timer_handler() xfrm/compat: prevent potential spectre v1 gadget in xfrm_xlate32_attr() xfrm: compat: change expression for switch in xfrm_xlate64 Fix XFRM-I support for nested ESP tunnels ==================== Link: https://lore.kernel.org/r/20230208114322.266510-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit 363d7c2298e730083df942446534825654d65c5e Author: Jiawen Wu Date: Wed Feb 8 10:30:35 2023 +0800 net: txgbe: Update support email address Update new email address for Wangxun 10Gb NIC support team. Signed-off-by: Jiawen Wu Link: https://lore.kernel.org/r/20230208023035.3371250-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski Documentation/networking/device_drivers/ethernet/wangxun/txgbe.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6ac406cd8ff610a2d5da298b1d3071acfcde7f0 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6c1a6d0b64e1a15016ba7450cce8629f94de56c7 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 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 5ad7bbf3dba5c4a684338df1f285080f2588b535 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 Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit e53448e0a1efa5133c7db78f1df1f4caf177676b 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 Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c108a18462949fe709ebd6b0be68398d643bc285 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 ++ 1 file changed, 2 insertions(+) commit dc38b996db968f51f0fe45845a519c5cd7f6bd04 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 Cc: stable@vger.kernel.org # 6.1.x .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h | 29 +++++++++++----------- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) commit 9874cc2df4e892c8744aa0472866cbf7c3cf1862 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 5 +++-- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 0e763afcb50814e256ecb780fcc0f3bade2e1a0c 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 1 + 1 file changed, 1 insertion(+) commit ff8ced4eefbff5f27a21015b20228ae0118d2f7d Merge: b963d9d5b943 8f0d1451ecf7 Author: Jakub Kicinski Date: Wed Feb 8 19:23:44 2023 -0800 Merge tag 'mlx5-fixes-2023-02-07' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2023-02-07 This series provides bug fixes to mlx5 driver. * tag 'mlx5-fixes-2023-02-07' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Serialize module cleanup with reload and remove net/mlx5: fw_tracer, Zero consumer index when reloading the tracer net/mlx5: fw_tracer, Clear load bit when freeing string DBs buffers net/mlx5: Expose SF firmware pages counter net/mlx5: Store page counters in a single array net/mlx5e: IPoIB, Show unknown speed instead of error net/mlx5e: Fix crash unsetting rx-vlan-filter in switchdev mode net/mlx5: Bridge, fix ageing of peer FDB entries net/mlx5: DR, Fix potential race in dr_rule_create_rule_nic net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change ==================== Link: https://lore.kernel.org/r/20230208030302.95378-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 49d0555976f0972af68397ed996375c135b38ba7 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 Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5630a35024d12432827bd7e7986dd60cfe2f983b 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 drivers/gpu/drm/amd/amdgpu/soc21.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7ece674cd9468ce740494f6108c39831cfc7eb4e 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) commit 5c4e8c71d1202cd84d870e7e5cb8d6b52f9c3507 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 42 +++++++++++++++-------- 1 file changed, 28 insertions(+), 14 deletions(-) commit 077e9659581acab70f2dcc04b5bc799aca3a056b 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 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 1 file changed, 2 deletions(-) commit 877f26bf3ca65447e923e86305a7f2a20d059e21 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 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) commit b963d9d5b9437a6b99504987310f98537c9e77d4 Author: Ido Schimmel Date: Tue Feb 7 16:18:19 2023 +0200 selftests: Fix failing VXLAN VNI filtering test iproute2 does not recognize the "group6" and "remote6" keywords. Fix by using "group" and "remote" instead. Before: # ./test_vxlan_vnifiltering.sh [...] Tests passed: 25 Tests failed: 2 After: # ./test_vxlan_vnifiltering.sh [...] Tests passed: 27 Tests failed: 0 Fixes: 3edf5f66c12a ("selftests: add new tests for vxlan vnifiltering") Signed-off-by: Ido Schimmel Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/20230207141819.256689-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski tools/testing/selftests/net/test_vxlan_vnifiltering.sh | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit f545e8831e70065e127f903fc7aca09aa50422c7 Author: Kan Liang Date: Wed Feb 8 09:23:40 2023 -0800 x86/cpu: Add Lunar Lake M Intel confirmed the existence of this CPU in Q4'2022 earnings presentation. Add the CPU model number. [ dhansen: Merging these as soon as possible makes it easier on all the folks developing model-specific features. ] Signed-off-by: Kan Liang Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230208172340.158548-1-tony.luck%40intel.com arch/x86/include/asm/intel-family.h | 2 ++ 1 file changed, 2 insertions(+) commit ae052e3ae09572194d7e574906db7272041577d3 Author: Nadav Amit Date: Wed Feb 8 07:17:08 2023 +0000 x86/kprobes: Fix 1 byte conditional jump target Commit 3bc753c06dd0 ("kbuild: treat char as always unsigned") broke kprobes. Setting a probe-point on 1 byte conditional jump can cause the kernel to crash when the (signed) relative jump offset gets treated as unsigned. Fix by replacing the unsigned 'immediate.bytes' (plus a cast) with the signed 'immediate.value' when assigning to the relative jump offset. [ dhansen: clarified changelog ] Fixes: 3bc753c06dd0 ("kbuild: treat char as always unsigned") Suggested-by: Masami Hiramatsu (Google) Suggested-by: Dave Hansen Signed-off-by: Nadav Amit Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230208071708.4048-1-namit%40vmware.com arch/x86/kernel/kprobes/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a7ff131f17f44c593173c5ee30e2c03ef211685 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: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_bios.c | 33 +++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) commit 965bffd2dd8a2c769ae17e5344545ba03d584176 Merge: 1a3245fe0cf8 070d6dafacba Author: David S. Miller Date: Wed Feb 8 09:39:34 2023 +0000 Merge branch 'mptcp-fixes' Matthieu Baerts says: ==================== mptcp: fixes for v6.2 Patch 1 clears resources earlier if there is no more reasons to keep MPTCP sockets alive. Patches 2 and 3 fix some locking issues visible in some rare corner cases: the linked issues should be quite hard to reproduce. Patch 4 makes sure subflows are correctly cleaned after the end of a connection. Patch 5 and 6 improve the selftests stability when running in a slow environment by transfering data for a longer period on one hand and by stopping the tests when all expected events have been observed on the other hand. All these patches fix issues introduced before v6.2. ==================== Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 070d6dafacbaa9d1f2e4e3edc263853d194af15e Author: Matthieu Baerts Date: Tue Feb 7 14:04:18 2023 +0100 selftests: mptcp: stop tests earlier These 'endpoint' tests from 'mptcp_join.sh' selftest start a transfer in the background and check the status during this transfer. Once the expected events have been recorded, there is no reason to wait for the data transfer to finish. It can be stopped earlier to reduce the execution time by more than half. For these tests, the exchanged data were not verified. Errors, if any, were ignored but that's fine, plenty of other tests are looking at that. It is then OK to mute stderr now that we are sure errors will be printed (and still ignored) because the transfer is stopped before the end. Fixes: e274f7154008 ("selftests: mptcp: add subflow limits test-cases") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller tools/testing/selftests/net/mptcp/mptcp_join.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit a635a8c3df66ab68dc088c08a4e9e955e22c0e64 Author: Paolo Abeni Date: Tue Feb 7 14:04:17 2023 +0100 selftests: mptcp: allow more slack for slow test-case A test-case is frequently failing on some extremely slow VMs. The mptcp transfer completes before the script is able to do all the required PM manipulation. Address the issue in the simplest possible way, making the transfer even more slow. Additionally dump more info in case of failures, to help debugging similar problems in the future and init dump_stats var. Fixes: e274f7154008 ("selftests: mptcp: add subflow limits test-cases") Cc: stable@vger.kernel.org Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/323 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1249db44a102d9d3541ed7798d4b01ffdcf03524 Author: Paolo Abeni Date: Tue Feb 7 14:04:16 2023 +0100 mptcp: be careful on subflow status propagation on errors Currently the subflow error report callback unconditionally propagates the fallback subflow status to the owning msk. If the msk is already orphaned, the above prevents the code from correctly tracking the msk moving to the TCP_CLOSE state and doing the appropriate cleanup. All the above causes increasing memory usage over time and sporadic self-tests failures. There is a great deal of infrastructure trying to propagate correctly the fallback subflow status to the owning mptcp socket, e.g. via mptcp_subflow_eof() and subflow_sched_work_if_closed(): in the error propagation path we need only to cope with unorphaned sockets. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/339 Fixes: 15cc10453398 ("mptcp: deliver ssk errors to msk") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller net/mptcp/subflow.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ad2171009d968104ccda9dc517f5a3ba891515db Author: Paolo Abeni Date: Tue Feb 7 14:04:15 2023 +0100 mptcp: fix locking for in-kernel listener creation For consistency, in mptcp_pm_nl_create_listen_socket(), we need to call the __mptcp_nmpc_socket() under the msk socket lock. Note that as a side effect, mptcp_subflow_create_socket() needs a 'nested' lockdep annotation, as it will acquire the subflow (kernel) socket lock under the in-kernel listener msk socket lock. The current lack of locking is almost harmless, because the relevant socket is not exposed to the user space, but in future we will add more complexity to the mentioned helper, let's play safe. Fixes: 1729cf186d8a ("mptcp: create the listening socket for new port") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller net/mptcp/pm_netlink.c | 10 ++++++---- net/mptcp/subflow.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) commit 21e43569685de4ad773fb060c11a15f3fd5e7ac4 Author: Paolo Abeni Date: Tue Feb 7 14:04:14 2023 +0100 mptcp: fix locking for setsockopt corner-case We need to call the __mptcp_nmpc_socket(), and later subflow socket access under the msk socket lock, or e.g. a racing connect() could change the socket status under the hood, with unexpected results. Fixes: 54635bd04701 ("mptcp: add TCP_FASTOPEN_CONNECT socket option") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller net/mptcp/sockopt.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit d4e85922e3e7ef2071f91f65e61629b60f3a9cf4 Author: Paolo Abeni Date: Tue Feb 7 14:04:13 2023 +0100 mptcp: do not wait for bare sockets' timeout If the peer closes all the existing subflows for a given mptcp socket and later the application closes it, the current implementation let it survive until the timewait timeout expires. While the above is allowed by the protocol specification it consumes resources for almost no reason and additionally causes sporadic self-tests failures. Let's move the mptcp socket to the TCP_CLOSE state when there are no alive subflows at close time, so that the allocated resources will be freed immediately. Fixes: e16163b6e2b7 ("mptcp: refactor shutdown and close") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller net/mptcp/protocol.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1a3245fe0cf84e630598da4ab110a5f8a2d6730d Author: Vladimir Oltean Date: Tue Feb 7 12:30:27 2023 +0200 net: ethernet: mtk_eth_soc: fix DSA TX tag hwaccel for switch port 0 Arınç reports that on his MT7621AT Unielec U7621-06 board and MT7623NI Bananapi BPI-R2, packets received by the CPU over mt7530 switch port 0 (of which this driver acts as the DSA master) are not processed correctly by software. More precisely, they arrive without a DSA tag (in packet or in the hwaccel area - skb_metadata_dst()), so DSA cannot demux them towards the switch's interface for port 0. Traffic from other ports receives a skb_metadata_dst() with the correct port and is demuxed properly. Looking at mtk_poll_rx(), it becomes apparent that this driver uses the skb vlan hwaccel area: union { u32 vlan_all; struct { __be16 vlan_proto; __u16 vlan_tci; }; }; as a temporary storage for the VLAN hwaccel tag, or the DSA hwaccel tag. If this is a DSA master it's a DSA hwaccel tag, and finally clears up the skb VLAN hwaccel header. I'm guessing that the problem is the (mis)use of API. skb_vlan_tag_present() looks like this: #define skb_vlan_tag_present(__skb) (!!(__skb)->vlan_all) So if both vlan_proto and vlan_tci are zeroes, skb_vlan_tag_present() returns precisely false. I don't know for sure what is the format of the DSA hwaccel tag, but I surely know that lowermost 3 bits of vlan_proto are 0 when receiving from port 0: unsigned int port = vlan_proto & GENMASK(2, 0); If the RX descriptor has no other bits set to non-zero values in RX_DMA_VTAG, then the call to __vlan_hwaccel_put_tag() will not, in fact, make the subsequent skb_vlan_tag_present() return true, because it's implemented like this: static inline void __vlan_hwaccel_put_tag(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci) { skb->vlan_proto = vlan_proto; skb->vlan_tci = vlan_tci; } What we need to do to fix this problem (assuming this is the problem) is to stop using skb->vlan_all as temporary storage for driver affairs, and just create some local variables that serve the same purpose, but hopefully better. Instead of calling skb_vlan_tag_present(), let's look at a boolean has_hwaccel_tag which we set to true when the RX DMA descriptors have something. Disambiguate based on netdev_uses_dsa() whether this is a VLAN or DSA hwaccel tag, and only call __vlan_hwaccel_put_tag() if we're certain it's a VLAN tag. Arınç confirms that the treatment works, so this validates the assumption. Link: https://lore.kernel.org/netdev/704f3a72-fc9e-714a-db54-272e17612637@arinc9.com/ Fixes: 2d7605a72906 ("net: ethernet: mtk_eth_soc: enable hardware DSA untagging") Reported-by: Arınç ÜNAL Tested-by: Arınç ÜNAL Signed-off-by: Vladimir Oltean Reviewed-by: Felix Fietkau Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 821de68c1f9c0236b0b9c10834cda900ae9b443c Author: Yu Xiao Date: Tue Feb 7 11:16:50 2023 +0100 nfp: ethtool: fix the bug of setting unsupported port speed Unsupported port speed can be set and cause error. Now fixing it and return an error if setting unsupported speed. This fix depends on the following, which was included in v6.2-rc1: commit a61474c41e8c ("nfp: ethtool: support reporting link modes"). Fixes: 7c698737270f ("nfp: add support for .set_link_ksettings()") Signed-off-by: Yu Xiao Signed-off-by: Simon Horman Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 194 +++++++++++++++++---- drivers/net/ethernet/netronome/nfp/nfp_port.h | 12 ++ 2 files changed, 170 insertions(+), 36 deletions(-) commit c11204c78d6966c5bda6dd05c3ac5cbb193f93e3 Author: Kevin Yang Date: Tue Feb 7 02:08:20 2023 +0000 txhash: fix sk->sk_txrehash default This code fix a bug that sk->sk_txrehash gets its default enable value from sysctl_txrehash only when the socket is a TCP listener. We should have sysctl_txrehash to set the default sk->sk_txrehash, no matter TCP, nor listerner/connector. Tested by following packetdrill: 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 socket(..., SOCK_DGRAM, IPPROTO_UDP) = 4 // SO_TXREHASH == 74, default to sysctl_txrehash == 1 +0 getsockopt(3, SOL_SOCKET, 74, [1], [4]) = 0 +0 getsockopt(4, SOL_SOCKET, 74, [1], [4]) = 0 Fixes: 26859240e4ee ("txhash: Add socket option to control TX hash rethink behavior") Signed-off-by: Kevin Yang Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/sock.c | 3 ++- net/ipv4/af_inet.c | 1 + net/ipv4/inet_connection_sock.c | 3 --- net/ipv6/af_inet6.c | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) commit c966153d120222cd4e85e1e1601584d7d4d91dcb Author: Tariq Toukan Date: Mon Feb 6 22:47:03 2023 +0200 net: ethernet: mtk_eth_soc: fix wrong parameters order in __xdp_rxq_info_reg() Parameters 'queue_index' and 'napi_id' are passed in a swapped order. Fix it here. Fixes: 23233e577ef9 ("net: ethernet: mtk_eth_soc: rely on page_pool for single page buffers") Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21386e692613702502f7c982d81e0dfa86d25cfd Author: Arınç ÜNAL Date: Sun Feb 5 20:53:31 2023 +0300 net: ethernet: mtk_eth_soc: enable special tag when any MAC uses DSA The special tag is only enabled when the first MAC uses DSA. However, it must be enabled when any MAC uses DSA. Change the check accordingly. This fixes hardware DSA untagging not working on the second MAC of the MT7621 and MT7623 SoCs, and likely other SoCs too. Therefore, remove the check that disables hardware DSA untagging for the second MAC of the MT7621 and MT7623 SoCs. Fixes: a1f47752fd62 ("net: ethernet: mtk_eth_soc: disable hardware DSA untagging for second MAC") Co-developed-by: Richard van Schagen Signed-off-by: Richard van Schagen Signed-off-by: Arınç ÜNAL Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 88d18b8896bd98e636b632f805b7e84e61458255 Author: Edson Juliano Drosdeck Date: Tue Feb 7 15:37:20 2023 -0300 ALSA: hda/realtek: Add Positivo N14KP6-TG Positivo N14KP6-TG (1c6c:1251) require quirk for enabling headset-mic Signed-off-by: Edson Juliano Drosdeck Cc: Link: https://lore.kernel.org/r/20230207183720.2519-1-edson.drosdeck@gmail.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 9cec2aaffe969f2a3e18b5ec105fc20bb908e475 Author: Dan Carpenter Date: Mon Feb 6 16:18:32 2023 +0300 net: sched: sch: Fix off by one in htb_activate_prios() The > needs be >= to prevent an out of bounds access. Fixes: de5ca4c3852f ("net: sched: sch: Bounds check priority") Signed-off-by: Dan Carpenter Reviewed-by: Simon Horman Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/Y+D+KN18FQI2DKLq@kili Signed-off-by: Jakub Kicinski net/sched/sch_htb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70daa5c8f001e351af174c40ac21eb0a25600483 Author: Tom Rix Date: Mon Feb 6 06:57:00 2023 -0800 nvme-auth: mark nvme_auth_wq static Fix a smatch report for the newly added nvme_auth_wq. Signed-off-by: Tom Rix Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91701f63d8e14fb86ec58bb0b5a6c9d2683d99b4 Merge: 9b275176270e 4a606ce68426 Author: Jakub Kicinski Date: Tue Feb 7 22:04:44 2023 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-02-06 (ice) This series contains updates to ice driver only. Ani removes WQ_MEM_RECLAIM flag from workqueue to resolve check_flush_dependency warning. Michal fixes KASAN out-of-bounds warning. Brett corrects behaviour for port VLAN Rx filters to prevent receiving of unintended traffic. Dan Carpenter fixes possible off by one issue. Zhang Changzhong adjusts error path for switch recipe to prevent memory leak. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: switch: fix potential memleak in ice_add_adv_recipe() ice: Fix off by one in ice_tc_forward_to_queue() ice: Fix disabling Rx VLAN filtering with port VLAN enabled ice: fix out-of-bounds KASAN warning in virtchnl ice: Do not use WQ_MEM_RECLAIM flag for workqueue ==================== Link: https://lore.kernel.org/r/20230206232934.634298-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 9b275176270efd18f2f4e328b32be1bad34c4c0d Author: Sasha Neftin Date: Mon Feb 6 15:58:18 2023 -0800 igc: Add ndo_tx_timeout support On some platforms, 100/1000/2500 speeds seem to have sometimes problems reporting false positive tx unit hang during stressful UDP traffic. Likely other Intel drivers introduce responses to a tx hang. Update the 'tx hang' comparator with the comparison of the head and tail of ring pointers and restore the tx_timeout_factor to the previous value (one). This can be test by using netperf or iperf3 applications. Example: iperf3 -s -p 5001 iperf3 -c 192.168.0.2 --udp -p 5001 --time 600 -b 0 netserver -p 16604 netperf -H 192.168.0.2 -l 600 -p 16604 -t UDP_STREAM -- -m 64000 Fixes: b27b8dc77b5e ("igc: Increase timeout value for Speed 100/1000/2500") Signed-off-by: Sasha Neftin Tested-by: Naama Meir Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20230206235818.662384-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/igc/igc_main.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 18a048370b06a3a521219e9e5b10bdc2178ef19c Author: Haiyang Zhang Date: Mon Feb 6 13:28:49 2023 -0800 net: mana: Fix accessing freed irq affinity_hint After calling irq_set_affinity_and_hint(), the cpumask pointer is saved in desc->affinity_hint, and will be used later when reading /proc/irq//affinity_hint. So the cpumask variable needs to be persistent. Otherwise, we are accessing freed memory when reading the affinity_hint file. Also, need to clear affinity_hint before free_irq(), otherwise there is a one-time warning and stack trace during module unloading: [ 243.948687] WARNING: CPU: 10 PID: 1589 at kernel/irq/manage.c:1913 free_irq+0x318/0x360 ... [ 243.948753] Call Trace: [ 243.948754] [ 243.948760] mana_gd_remove_irqs+0x78/0xc0 [mana] [ 243.948767] mana_gd_remove+0x3e/0x80 [mana] [ 243.948773] pci_device_remove+0x3d/0xb0 [ 243.948778] device_remove+0x46/0x70 [ 243.948782] device_release_driver_internal+0x1fe/0x280 [ 243.948785] driver_detach+0x4e/0xa0 [ 243.948787] bus_remove_driver+0x70/0xf0 [ 243.948789] driver_unregister+0x35/0x60 [ 243.948792] pci_unregister_driver+0x44/0x90 [ 243.948794] mana_driver_exit+0x14/0x3fe [mana] [ 243.948800] __do_sys_delete_module.constprop.0+0x185/0x2f0 To fix the bug, use the persistent mask, cpumask_of(cpu#), and set affinity_hint to NULL before freeing the IRQ, as required by free_irq(). Cc: stable@vger.kernel.org Fixes: 71fa6887eeca ("net: mana: Assign interrupts to CPUs based on NUMA nodes") Signed-off-by: Haiyang Zhang Reviewed-by: Michael Kelley Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/1675718929-19565-1-git-send-email-haiyangz@microsoft.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/microsoft/mana/gdma_main.c | 37 ++++++++----------------- 1 file changed, 11 insertions(+), 26 deletions(-) commit b1f4fbabbb912eb7061795461a498895bdc30f3c Merge: c6aa9d3b43cd 4ae5e1e97c44 Author: Jakub Kicinski Date: Tue Feb 7 20:50:30 2023 -0800 Merge tag 'linux-can-fixes-for-6.2-20230207' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== can 2023-02-07 The patch is from Devid Antonio Filoni and fixes an address claiming problem in the J1939 CAN protocol. * tag 'linux-can-fixes-for-6.2-20230207' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: j1939: do not wait 250 ms if the same addr was already claimed ==================== Link: https://lore.kernel.org/r/20230207140514.2885065-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit c6aa9d3b43cd11ac13a8220368a3b0483c6751d4 Author: Michael Kelley Date: Mon Feb 6 12:11:57 2023 -0800 hv_netvsc: Allocate memory in netvsc_dma_map() with GFP_ATOMIC Memory allocations in the network transmit path must use GFP_ATOMIC so they won't sleep. Reported-by: Paolo Abeni Link: https://lore.kernel.org/lkml/8a4d08f94d3e6fe8b6da68440eaa89a088ad84f9.camel@redhat.com/ Fixes: 846da38de0e8 ("net: netvsc: Add Isolation VM support for netvsc driver") Cc: stable@vger.kernel.org Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1675714317-48577-1-git-send-email-mikelley@microsoft.com Signed-off-by: Jakub Kicinski drivers/net/hyperv/netvsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f0d1451ecf7b3bd5a06ffc866c753d0f3ab4683 Author: Shay Drory Date: Wed Dec 14 22:16:23 2022 +0200 net/mlx5: Serialize module cleanup with reload and remove Currently, remove and reload flows can run in parallel to module cleanup. This design is error prone. For example: aux_drivers callbacks are called from both cleanup and remove flows with different lockings, which can cause a deadlock[1]. Hence, serialize module cleanup with reload and remove. [1] cleanup remove ------- ------ auxiliary_driver_unregister(); devl_lock() auxiliary_device_delete(mlx5e_aux) device_lock(mlx5e_aux) devl_lock() device_lock(mlx5e_aux) Fixes: 912cebf420c2 ("net/mlx5e: Connect ethernet part to auxiliary bus") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 184e1e4474dbcfebc4dbd1fa823a329978f25506 Author: Shay Drory Date: Wed Jan 25 17:39:36 2023 +0200 net/mlx5: fw_tracer, Zero consumer index when reloading the tracer When tracer is reloaded, the device will log the traces at the beginning of the log buffer. Also, driver is reading the log buffer in chunks in accordance to the consumer index. Hence, zero consumer index when reloading the tracer. Fixes: 4383cfcc65e7 ("net/mlx5: Add devlink reload") Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db561fed6b8fa3878e74d5df6512a4a38152b63e Author: Shay Drory Date: Mon Jan 9 15:27:40 2023 +0200 net/mlx5: fw_tracer, Clear load bit when freeing string DBs buffers Whenever the driver is reading the string DBs into buffers, the driver is setting the load bit, but the driver never clears this bit. As a result, in case load bit is on and the driver query the device for new string DBs, the driver won't read again the string DBs. Fix it by clearing the load bit when query the device for new string DBs. Fixes: 2d69356752ff ("net/mlx5: Add support for fw live patch event") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 1 + 1 file changed, 1 insertion(+) commit 9965bbebae59b3563a4d95e4aed121e8965dfdc2 Author: Maher Sanalla Date: Sun Jan 22 23:24:56 2023 +0200 net/mlx5: Expose SF firmware pages counter Currently, each core device has VF pages counter which stores number of fw pages used by its VFs and SFs. The current design led to a hang when performing firmware reset on DPU, where the DPU PFs stalled in sriov unload flow due to waiting on release of SFs pages instead of waiting on only VFs pages. Thus, Add a separate counter for SF firmware pages, which will prevent the stall scenario described above. Fixes: 1958fc2f0712 ("net/mlx5: SF, Add auxiliary device driver") Signed-off-by: Maher Sanalla Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 2 +- include/linux/mlx5/driver.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit c3bdbaea654d8df39112de33037106134a520dc7 Author: Maher Sanalla Date: Sun Jan 22 21:09:40 2023 +0200 net/mlx5: Store page counters in a single array Currently, an independent page counter is used for tracking memory usage for each function type such as VF, PF and host PF (DPU). For better code-readibilty, use a single array that stores the number of allocated memory pages for each function type. Signed-off-by: Maher Sanalla Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 4 +-- drivers/net/ethernet/mellanox/mlx5/core/ecpf.c | 2 +- .../net/ethernet/mellanox/mlx5/core/pagealloc.c | 37 ++++++++++++---------- drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 2 +- include/linux/mlx5/driver.h | 12 +++++-- 5 files changed, 34 insertions(+), 23 deletions(-) commit 8aa5f171d51c1cb69e5e3106df4dd1a446102823 Author: Dragos Tatulea Date: Mon Jan 23 16:06:32 2023 +0200 net/mlx5e: IPoIB, Show unknown speed instead of error ethtool is returning an error for unknown speeds for the IPoIB interface: $ ethtool ib0 netlink error: failed to retrieve link settings netlink error: Invalid argument netlink error: failed to retrieve link settings netlink error: Invalid argument Settings for ib0: Link detected: no After this change, ethtool will return success and show "unknown speed": $ ethtool ib0 Settings for ib0: Supported ports: [ ] Supported link modes: Not reported Supported pause frame use: No Supports auto-negotiation: No Supported FEC modes: Not reported Advertised link modes: Not reported Advertised pause frame use: No Advertised auto-negotiation: No Advertised FEC modes: Not reported Speed: Unknown! Duplex: Full Auto-negotiation: off Port: Other PHYAD: 0 Transceiver: internal Link detected: no Fixes: eb234ee9d541 ("net/mlx5e: IPoIB, Add support for get_link_ksettings in ethtool") Signed-off-by: Dragos Tatulea Reviewed-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 8974aa9638df557f4642acef707af15648a03555 Author: Amir Tzin Date: Sun Jan 8 15:54:46 2023 +0200 net/mlx5e: Fix crash unsetting rx-vlan-filter in switchdev mode Moving to switchdev mode with rx-vlan-filter on and then setting it off causes the kernel to crash since fs->vlan is freed during nic profile cleanup flow. RX VLAN filtering is not supported in switchdev mode so unset it when changing to switchdev and restore its value when switching back to legacy. trace: [] RIP: 0010:mlx5e_disable_cvlan_filter+0x43/0x70 [] set_feature_cvlan_filter+0x37/0x40 [mlx5_core] [] mlx5e_handle_feature+0x3a/0x60 [mlx5_core] [] mlx5e_set_features+0x6d/0x160 [mlx5_core] [] __netdev_update_features+0x288/0xa70 [] ethnl_set_features+0x309/0x380 [] ? __nla_parse+0x21/0x30 [] genl_family_rcv_msg_doit.isra.17+0x110/0x150 [] genl_rcv_msg+0x112/0x260 [] ? features_reply_size+0xe0/0xe0 [] ? genl_family_rcv_msg_doit.isra.17+0x150/0x150 [] netlink_rcv_skb+0x4e/0x100 [] genl_rcv+0x24/0x40 [] netlink_unicast+0x1ab/0x290 [] netlink_sendmsg+0x257/0x4f0 [] sock_sendmsg+0x5c/0x70 Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors") Signed-off-by: Amir Tzin Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit da0c52426cd23f8728eff72c2b2d2a3eb6b451f5 Author: Vlad Buslov Date: Thu Jan 26 14:47:12 2023 +0100 net/mlx5: Bridge, fix ageing of peer FDB entries SWITCHDEV_FDB_ADD_TO_BRIDGE event handler that updates FDB entry 'lastuse' field is only executed for eswitch that owns the entry. However, if peer entry processed packets at least once it will have hardware counter 'used' value greater than entry 'lastuse' from that point on, which will cause FDB entry not being aged out. Process the event on all eswitch instances. Fixes: ff9b7521468b ("net/mlx5: Bridge, support LAG") Signed-off-by: Vlad Buslov Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c | 4 ---- drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) commit 288d85e07fbca5ee35882a4884dd701e43637be1 Author: Yevgeny Kliteynik Date: Tue Jan 17 17:34:20 2023 +0200 net/mlx5: DR, Fix potential race in dr_rule_create_rule_nic Selecting builder should be protected by the lock to prevent the case where a new rule sets a builder in the nic_matcher while the previous rule is still using the nic_matcher. Fixing this issue and cleaning the error flow. Fixes: b9b81e1e9382 ("net/mlx5: DR, For short chains of STEs, avoid allocating ste_arr dynamically") Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/steering/dr_rule.c | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 1e66220948df815d7b37e0ff8b4627ce10433738 Author: Adham Faris Date: Sun Jan 8 18:09:32 2023 +0200 net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change rq->hw_mtu is used in function en_rx.c/mlx5e_skb_from_cqe_mpwrq_linear() to catch oversized packets. If FCS is concatenated to the end of the packet then the check should be updated accordingly. Rx rings initialization (mlx5e_init_rxq_rq()) invoked for every new set of channels, as part of mlx5e_safe_switch_params(), unknowingly if it runs with default configuration or not. Current rq->hw_mtu initialization assumes default configuration and ignores params->scatter_fcs_en flag state. Fix this, by accounting for params->scatter_fcs_en flag state during rq->hw_mtu initialization. In addition, updating rq->hw_mtu value during ingress traffic might lead to packets drop and oversize_pkts_sw_drop counter increase with no good reason. Hence we remove this optimization and switch the set of channels with a new one, to make sure we don't get false positives on the oversize_pkts_sw_drop counter. Fixes: 102722fc6832 ("net/mlx5e: Add support for RXFCS feature flag") Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 86 ++++------------------- 1 file changed, 15 insertions(+), 71 deletions(-) commit 0983f6bf2bfc0789b51ddf7315f644ff4da50acb Merge: 513c1a3d3f19 707344c8a188 Author: Linus Torvalds Date: Tue Feb 7 14:17:12 2023 -0800 Merge tag 'devicetree-fixes-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Fix handling of multiple OF framebuffer devices - Fix booting on Socionext Synquacer with bad 'dma-ranges' entries - Add DT binding .yamllint to .gitignore * tag 'devicetree-fixes-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: interrupt-controller: arm,gic-v3: Fix typo in description of msi-controller property dt-bindings: Fix .gitignore of/address: Return an error when no valid dma-ranges are found of: Make OF framebuffer device names unique commit 711442e29f16f0d39dd0e2460c9baacfccb9d5a7 Author: Dan Williams Date: Tue Feb 7 11:04:30 2023 -0800 cxl/region: Fix passthrough-decoder detection A passthrough decoder is a decoder that maps only 1 target. It is a special case because it does not impose any constraints on the interleave-math as compared to a decoder with multiple targets. Extend the passthrough case to multi-target-capable decoders that only have one target selected. I.e. the current code was only considering passthrough *ports* which are only a subset of the potential passthrough decoder scenarios. Fixes: e4f6dfa9ef75 ("cxl/region: Fix 'distance' calculation with passthrough ports") Cc: Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/167564540422.847146.13816934143225777888.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/region.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 02f64ed06670120d35b5352a67ebd7a4cc104546 Merge: 6a32425f953b c173ee5b2fa6 Author: Takashi Iwai Date: Tue Feb 7 18:04:44 2023 +0100 Merge tag 'asoc-fix-v6.2-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.2 A few more fixes for v6.2, all driver specific and small. It's larger than is ideal but we can't really control when people find problems. commit e7d84c6a1296d059389f7342d9b4b7defb518d3a Author: Xiubo Li Date: Tue Feb 7 13:04:52 2023 +0800 ceph: flush cap releases when the session is flushed MDS expects the completed cap release prior to responding to the session flush for cache drop. Cc: stable@vger.kernel.org Link: http://tracker.ceph.com/issues/38009 Signed-off-by: Xiubo Li Reviewed-by: Venky Shankar Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 513c1a3d3f1982fb850c910937099525b0d35e24 Merge: 05ecb680708a 3e46d910d8ac Author: Linus Torvalds Date: Tue Feb 7 07:54:40 2023 -0800 Merge tag 'trace-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fix from Steven Rostedt: "Fix regression in poll() and select() With the fix that made poll() and select() block if read would block caused a slight regression in rasdaemon, as it needed that kind of behavior. Add a way to make that behavior come back by writing zero into the 'buffer_percentage', which means to never block on read" * tag 'trace-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Fix poll() and select() do not work on per_cpu trace_pipe and trace_pipe_raw commit c173ee5b2fa6195066674d66d1d7e191010fb1ff Author: Amadeusz Sławiński Date: Tue Feb 7 22:04:28 2023 +0100 ASoC: topology: Return -ENOMEM on memory allocation failure When handling error path, ret needs to be set to correct value. Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: d29d41e28eea ("ASoC: topology: Add support for multiple kcontrol types to a widget") Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230207210428.2076354-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/soc-topology.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4ae5e1e97c44f4654516c1d41591a462ed62fa7b Author: Devid Antonio Filoni Date: Fri Nov 25 18:04:18 2022 +0100 can: j1939: do not wait 250 ms if the same addr was already claimed The ISO 11783-5 standard, in "4.5.2 - Address claim requirements", states: d) No CF shall begin, or resume, transmission on the network until 250 ms after it has successfully claimed an address except when responding to a request for address-claimed. But "Figure 6" and "Figure 7" in "4.5.4.2 - Address-claim prioritization" show that the CF begins the transmission after 250 ms from the first AC (address-claimed) message even if it sends another AC message during that time window to resolve the address contention with another CF. As stated in "4.4.2.3 - Address-claimed message": In order to successfully claim an address, the CF sending an address claimed message shall not receive a contending claim from another CF for at least 250 ms. As stated in "4.4.3.2 - NAME management (NM) message": 1) A commanding CF can d) request that a CF with a specified NAME transmit the address- claimed message with its current NAME. 2) A target CF shall d) send an address-claimed message in response to a request for a matching NAME Taking the above arguments into account, the 250 ms wait is requested only during network initialization. Do not restart the timer on AC message if both the NAME and the address match and so if the address has already been claimed (timer has expired) or the AC message has been sent to resolve the contention with another CF (timer is still running). Signed-off-by: Devid Antonio Filoni Acked-by: Oleksij Rempel Link: https://lore.kernel.org/all/20221125170418.34575-1-devid.filoni@egluetechnologies.com Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde net/can/j1939/address-claim.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 6a32425f953b955b4ff82f339d01df0b713caa5d Author: Artemii Karasev Date: Tue Feb 7 18:20:26 2023 +0500 ALSA: emux: Avoid potential array out-of-bound in snd_emux_xg_control() snd_emux_xg_control() can be called with an argument 'param' greater than size of 'control' array. It may lead to accessing 'control' array at a wrong index. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Artemii Karasev Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Link: https://lore.kernel.org/r/20230207132026.2870-1-karasev@ispras.ru Signed-off-by: Takashi Iwai sound/synth/emux/emux_nrpn.c | 3 +++ 1 file changed, 3 insertions(+) commit 565b4824c39fa335cba2028a09d7beb7112f3c9a Author: Jiri Pirko Date: Mon Feb 6 10:41:51 2023 +0100 devlink: change port event netdev notifier from per-net to global Currently only the network namespace of devlink instance is monitored for port events. If netdev is moved to a different namespace and then unregistered, NETDEV_PRE_UNINIT is missed which leads to trigger following WARN_ON in devl_port_unregister(). WARN_ON(devlink_port->type != DEVLINK_PORT_TYPE_NOTSET); Fix this by changing the netdev notifier from per-net to global so no event is missed. Fixes: 02a68a47eade ("net: devlink: track netdev with devlink_port assigned") Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20230206094151.2557264-1-jiri@resnulli.us Signed-off-by: Paolo Abeni net/core/devlink.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 29aab38823b61e482995c24644bd2d8acfe56185 Author: Shengjiu Wang Date: Tue Feb 7 17:04:24 2023 +0800 ASoC: fsl_sai: fix getting version from VERID The version information is at the bit31 ~ bit16 in the VERID register, so need to right shift 16bit to get it, otherwise the result of comparison "sai->verid.version >= 0x0301" is wrong. Fixes: 99c1e74f25d4 ("ASoC: fsl_sai: store full version instead of major/minor") Signed-off-by: Shengjiu Wang Reviewed-by: Iuliana Prodan Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1675760664-25193-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 1 + 1 file changed, 1 insertion(+) commit bbb253b206b9c417928a6c827d038e457f3012e9 Author: Vladimir Oltean Date: Sun Feb 5 21:24:09 2023 +0200 selftests: ocelot: tc_flower_chains: make test_vlan_ingress_modify() more comprehensive We have two IS1 filters of the OCELOT_VCAP_KEY_ANY key type (the one with "action vlan pop" and the one with "action vlan modify") and one of the OCELOT_VCAP_KEY_IPV4 key type (the one with "action skbedit priority"). But we have no IS1 filter with the OCELOT_VCAP_KEY_ETYPE key type, and there was an uncaught breakage there. To increase test coverage, convert one of the OCELOT_VCAP_KEY_ANY filters to OCELOT_VCAP_KEY_ETYPE, by making the filter also match on the MAC SA of the traffic sent by mausezahn, $h1_mac. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20230205192409.1796428-2-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f964f8399df29d3e3ced77177cf35131cd2491bf Author: Vladimir Oltean Date: Sun Feb 5 21:24:08 2023 +0200 net: mscc: ocelot: fix VCAP filters not matching on MAC with "protocol 802.1Q" Alternative short title: don't instruct the hardware to match on EtherType with "protocol 802.1Q" flower filters. It doesn't work for the reasons detailed below. With a command such as the following: tc filter add dev $swp1 ingress chain $(IS1 2) pref 3 \ protocol 802.1Q flower skip_sw vlan_id 200 src_mac $h1_mac \ action vlan modify id 300 \ action goto chain $(IS2 0 0) the created filter is set by ocelot_flower_parse_key() to be of type OCELOT_VCAP_KEY_ETYPE, and etype is set to {value=0x8100, mask=0xffff}. This gets propagated all the way to is1_entry_set() which commits it to hardware (the VCAP_IS1_HK_ETYPE field of the key). Compare this to the case where src_mac isn't specified - the key type is OCELOT_VCAP_KEY_ANY, and is1_entry_set() doesn't populate VCAP_IS1_HK_ETYPE. The problem is that for VLAN-tagged frames, the hardware interprets the ETYPE field as holding the encapsulated VLAN protocol. So the above filter will only match those packets which have an encapsulated protocol of 0x8100, rather than all packets with VLAN ID 200 and the given src_mac. The reason why this is allowed to occur is because, although we have a block of code in ocelot_flower_parse_key() which sets "match_protocol" to false when VLAN keys are present, that code executes too late. There is another block of code, which executes for Ethernet addresses, and has a "goto finished_key_parsing" and skips the VLAN header parsing. By skipping it, "match_protocol" remains with the value it was initialized with, i.e. "true", and "proto" is set to f->common.protocol, or 0x8100. The concept of ignoring some keys rather than erroring out when they are present but can't be offloaded is dubious in itself, but is present since the initial commit fe3490e6107e ("net: mscc: ocelot: Hardware ofload for tc flower filter"), and it's outside of the scope of this patch to change that. The problem was introduced when the driver started to interpret the flower filter's protocol, and populate the VCAP filter's ETYPE field based on it. To fix this, it is sufficient to move the code that parses the VLAN keys earlier than the "goto finished_key_parsing" instruction. This will ensure that if we have a flower filter with both VLAN and Ethernet address keys, it won't match on ETYPE 0x8100, because the VLAN key parsing sets "match_protocol = false". Fixes: 86b956de119c ("net: mscc: ocelot: support matching on EtherType") Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230205192409.1796428-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni drivers/net/ethernet/mscc/ocelot_flower.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 647037adcad00f2bab8828d3d41cd0553d41f3bd Author: Aaron Thompson Date: Tue Feb 7 08:21:51 2023 +0000 Revert "mm: Always release pages to the buddy allocator in memblock_free_late()." This reverts commit 115d9d77bb0f9152c60b6e8646369fa7f6167593. The pages being freed by memblock_free_late() have already been initialized, but if they are in the deferred init range, __free_one_page() might access nearby uninitialized pages when trying to coalesce buddies. This can, for example, trigger this BUG: BUG: unable to handle page fault for address: ffffe964c02580c8 RIP: 0010:__list_del_entry_valid+0x3f/0x70 __free_one_page+0x139/0x410 __free_pages_ok+0x21d/0x450 memblock_free_late+0x8c/0xb9 efi_free_boot_services+0x16b/0x25c efi_enter_virtual_mode+0x403/0x446 start_kernel+0x678/0x714 secondary_startup_64_no_verify+0xd2/0xdb A proper fix will be more involved so revert this change for the time being. Fixes: 115d9d77bb0f ("mm: Always release pages to the buddy allocator in memblock_free_late().") Signed-off-by: Aaron Thompson Link: https://lore.kernel.org/r/20230207082151.1303-1-dev@aaront.org Signed-off-by: Mike Rapoport (IBM) mm/memblock.c | 8 +------- tools/testing/memblock/internal.h | 4 ---- 2 files changed, 1 insertion(+), 11 deletions(-) commit 0b6d6425103a676e2b6a81f3fd35d7ea4f9b90ec Author: Vladimir Oltean Date: Sun Feb 5 16:07:13 2023 +0200 net: dsa: mt7530: don't change PVC_EG_TAG when CPU port becomes VLAN-aware Frank reports that in a mt7530 setup where some ports are standalone and some are in a VLAN-aware bridge, 8021q uppers of the standalone ports lose their VLAN tag on xmit, as seen by the link partner. This seems to occur because once the other ports join the VLAN-aware bridge, mt7530_port_vlan_filtering() also calls mt7530_port_set_vlan_aware(ds, cpu_dp->index), and this affects the way that the switch processes the traffic of the standalone port. Relevant is the PVC_EG_TAG bit. The MT7530 documentation says about it: EG_TAG: Incoming Port Egress Tag VLAN Attribution 0: disabled (system default) 1: consistent (keep the original ingress tag attribute) My interpretation is that this setting applies on the ingress port, and "disabled" is basically the normal behavior, where the egress tag format of the packet (tagged or untagged) is decided by the VLAN table (MT7530_VLAN_EGRESS_UNTAG or MT7530_VLAN_EGRESS_TAG). But there is also an option of overriding the system default behavior, and for the egress tagging format of packets to be decided not by the VLAN table, but simply by copying the ingress tag format (if ingress was tagged, egress is tagged; if ingress was untagged, egress is untagged; aka "consistent). This is useful in 2 scenarios: - VLAN-unaware bridge ports will always encounter a miss in the VLAN table. They should forward a packet as-is, though. So we use "consistent" there. See commit e045124e9399 ("net: dsa: mt7530: fix tagged frames pass-through in VLAN-unaware mode"). - Traffic injected from the CPU port. The operating system is in god mode; if it wants a packet to exit as VLAN-tagged, it sends it as VLAN-tagged. Otherwise it sends it as VLAN-untagged*. *This is true only if we don't consider the bridge TX forwarding offload feature, which mt7530 doesn't support. So for now, make the CPU port always stay in "consistent" mode to allow software VLANs to be forwarded to their egress ports with the VLAN tag intact, and not stripped. Link: https://lore.kernel.org/netdev/trinity-e6294d28-636c-4c40-bb8b-b523521b00be-1674233135062@3c-app-gmx-bs36/ Fixes: e045124e9399 ("net: dsa: mt7530: fix tagged frames pass-through in VLAN-unaware mode") Reported-by: Frank Wunderlich Tested-by: Frank Wunderlich Signed-off-by: Vladimir Oltean Tested-by: Arınç ÜNAL Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230205140713.1609281-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni drivers/net/dsa/mt7530.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 2de49fb1c9bb8bfe283070fef2e9304d9842a30c Author: Li Zhijian Date: Thu Feb 2 10:12:01 2023 +0000 RDMA/rtrs: Don't call kobject_del for srv_path->kobj As the mention in commmit f7452a7e96c1 ("RDMA/rtrs-srv: fix memory leak by missing kobject free"), it was intended to remove the kobject_del for srv_path->kobj. f7452a7e96c1 said: >This patch moves kobject_del() into free_sess() so that the kobject of > rtrs_srv_sess can be freed. This patch also move rtrs_srv_destroy_once_sysfs_root_folders back to 'if (srv_path->kobj.state_in_sysfs)' block to avoid a 'held lock freed!' A kernel panic will be triggered by following script ----------------------- $ while true do echo "sessname=foo path=ip: device_path=/dev/nvme0n1" > /sys/devices/virtual/rnbd-client/ctl/map_device echo "normal" > /sys/block/rnbd0/rnbd/unmap_device done ----------------------- The bisection pointed to commit 6af4609c18b3 ("RDMA/rtrs-srv: Fix several issues in rtrs_srv_destroy_path_files") at last. rnbd_server L777: : Opened device 'nvme0n1' general protection fault, probably for non-canonical address 0x765f766564753aea: 0000 [#1] PREEMPT SMP PTI CPU: 0 PID: 3558 Comm: systemd-udevd Kdump: loaded Not tainted 6.1.0-rc3-roce-flush+ #51 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:kernfs_dop_revalidate+0x36/0x180 Code: 00 00 41 55 41 54 55 53 48 8b 47 68 48 89 fb 48 85 c0 0f 84 db 00 00 00 48 8b a8 60 04 00 00 48 8b 45 30 48 85 c0 48 0f 44 c5 <4c> 8b 60 78 49 81 c4 d8 00 00 00 4c 89 e7 e8 b7 78 7b 00 8b 05 3d RSP: 0018:ffffaf1700b67c78 EFLAGS: 00010206 RAX: 765f766564753a72 RBX: ffff89e2830849c0 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff89e2830849c0 RBP: ffff89e280361bd0 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000065 R11: 0000000000000000 R12: ffff89e2830849c0 R13: ffff89e283084888 R14: d0d0d0d0d0d0d0d0 R15: 2f2f2f2f2f2f2f2f FS: 00007f13fbce7b40(0000) GS:ffff89e2bbc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f93e055d340 CR3: 0000000104664002 CR4: 00000000001706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lookup_fast+0x7b/0x100 walk_component+0x21/0x160 link_path_walk.part.0+0x24d/0x390 path_openat+0xad/0x9a0 do_filp_open+0xa9/0x150 ? lock_release+0x13c/0x2e0 ? _raw_spin_unlock+0x29/0x50 ? alloc_fd+0x124/0x1f0 do_sys_openat2+0x9b/0x160 __x64_sys_openat+0x54/0xa0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f13fc9d701b 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 54 24 28 64 48 2b 14 25 RSP: 002b:00007ffddf242640 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f13fc9d701b RDX: 0000000000080000 RSI: 00007ffddf2427c0 RDI: 00000000ffffff9c RBP: 00007ffddf2427c0 R08: 00007f13fcc5b440 R09: 21b2131aa64b1ef2 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080000 R13: 00007ffddf2427c0 R14: 000055ed13be8db0 R15: 0000000000000000 Fixes: 6af4609c18b3 ("RDMA/rtrs-srv: Fix several issues in rtrs_srv_destroy_path_files") Acked-by: Guoqing Jiang Signed-off-by: Li Zhijian Link: https://lore.kernel.org/r/1675332721-2-1-git-send-email-lizhijian@fujitsu.com Acked-by: Jack Wang Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6c4715aa5b0ab1c0d35780b7c552e952dbb5515d Author: Andy Chi Date: Tue Feb 7 16:30:09 2023 +0800 ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform. There is a HP platform needs ALC236_FIXUP_HP_GPIO_LED quirk to make mic-mute/audio-mute working. Signed-off-by: Andy Chi Cc: Link: https://lore.kernel.org/r/20230207083011.100189-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 5 +++++ 1 file changed, 5 insertions(+) commit a8520be3ffef3d25b53bf171a7ebe17ee0154175 Author: Andy Shevchenko Date: Mon Feb 6 16:15:59 2023 +0200 pinctrl: intel: Restore the pins that used to be in Direct IRQ mode If the firmware mangled the register contents too much, check the saved value for the Direct IRQ mode. If it matches, we will restore the pin state. Reported-by: Jim Minter Fixes: 6989ea4881c8 ("pinctrl: intel: Save and restore pins in "direct IRQ" mode") Tested-by: Jim Minter Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20230206141558.20916-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 85e26dd5100a182bf8448050427539c0a66ab793 Author: Christian König Date: Thu Jan 26 10:24:26 2023 +0100 drm/client: fix circular reference counting issue We reference dump buffers both by their handle as well as their object. The problem is now that when anybody iterates over the DRM framebuffers and exports the underlying GEM objects through DMA-buf we run into a circular reference count situation. The result is that the fbdev handling holds the GEM handle preventing the DMA-buf in the GEM object to be released. This DMA-buf in turn holds a reference to the driver module which on unload would release the fbdev. Break that loop by releasing the handle as soon as the DRM framebuffer object is created. The DRM framebuffer and the DRM client buffer structure still hold a reference to the underlying GEM object preventing its destruction. Signed-off-by: Christian König Fixes: c76f0f7cb546 ("drm: Begin an API for in-kernel clients") Cc: Reviewed-by: Thomas Zimmermann Tested-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230126102814.8722-1-christian.koenig@amd.com drivers/gpu/drm/drm_client.c | 33 ++++++++++++++++++++------------- include/drm/drm_client.h | 5 ----- 2 files changed, 20 insertions(+), 18 deletions(-) commit aa5465aeca3c66fecdf7efcf554aed79b4c4b211 Author: ZhaoLong Wang Date: Mon Feb 6 09:10:09 2023 +0800 cifs: Fix use-after-free in rdata->read_into_pages() When the network status is unstable, use-after-free may occur when read data from the server. BUG: KASAN: use-after-free in readpages_fill_pages+0x14c/0x7e0 Call Trace: dump_stack_lvl+0x38/0x4c print_report+0x16f/0x4a6 kasan_report+0xb7/0x130 readpages_fill_pages+0x14c/0x7e0 cifs_readv_receive+0x46d/0xa40 cifs_demultiplex_thread+0x121c/0x1490 kthread+0x16b/0x1a0 ret_from_fork+0x2c/0x50 Allocated by task 2535: kasan_save_stack+0x22/0x50 kasan_set_track+0x25/0x30 __kasan_kmalloc+0x82/0x90 cifs_readdata_direct_alloc+0x2c/0x110 cifs_readdata_alloc+0x2d/0x60 cifs_readahead+0x393/0xfe0 read_pages+0x12f/0x470 page_cache_ra_unbounded+0x1b1/0x240 filemap_get_pages+0x1c8/0x9a0 filemap_read+0x1c0/0x540 cifs_strict_readv+0x21b/0x240 vfs_read+0x395/0x4b0 ksys_read+0xb8/0x150 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Freed by task 79: kasan_save_stack+0x22/0x50 kasan_set_track+0x25/0x30 kasan_save_free_info+0x2e/0x50 __kasan_slab_free+0x10e/0x1a0 __kmem_cache_free+0x7a/0x1a0 cifs_readdata_release+0x49/0x60 process_one_work+0x46c/0x760 worker_thread+0x2a4/0x6f0 kthread+0x16b/0x1a0 ret_from_fork+0x2c/0x50 Last potentially related work creation: kasan_save_stack+0x22/0x50 __kasan_record_aux_stack+0x95/0xb0 insert_work+0x2b/0x130 __queue_work+0x1fe/0x660 queue_work_on+0x4b/0x60 smb2_readv_callback+0x396/0x800 cifs_abort_connection+0x474/0x6a0 cifs_reconnect+0x5cb/0xa50 cifs_readv_from_socket.cold+0x22/0x6c cifs_read_page_from_socket+0xc1/0x100 readpages_fill_pages.cold+0x2f/0x46 cifs_readv_receive+0x46d/0xa40 cifs_demultiplex_thread+0x121c/0x1490 kthread+0x16b/0x1a0 ret_from_fork+0x2c/0x50 The following function calls will cause UAF of the rdata pointer. readpages_fill_pages cifs_read_page_from_socket cifs_readv_from_socket cifs_reconnect __cifs_reconnect cifs_abort_connection mid->callback() --> smb2_readv_callback queue_work(&rdata->work) # if the worker completes first, # the rdata is freed cifs_readv_complete kref_put cifs_readdata_release kfree(rdata) return rdata->... # UAF in readpages_fill_pages() Similarly, this problem also occurs in the uncache_fill_pages(). Fix this by adjusts the order of condition judgment in the return statement. Signed-off-by: ZhaoLong Wang Cc: stable@vger.kernel.org Acked-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4fa4302d6dc7de7e8e74dc7405611a2efb4bf54b Author: Fan Ni Date: Thu Dec 15 17:09:14 2022 +0000 cxl/region: Fix null pointer dereference for resetting decoder Not all decoders have a reset callback. The CXL specification allows a host bridge with a single root port to have no explicit HDM decoders. Currently the region driver assumes there are none. As such the CXL core creates a special pass through decoder instance without a commit/reset callback. Prior to this patch, the ->reset() callback was called unconditionally when calling cxl_region_decode_reset. Thus a configuration with 1 Host Bridge, 1 Root Port, and one directly attached CXL type 3 device or multiple CXL type 3 devices attached to downstream ports of a switch can cause a null pointer dereference. Before the fix, a kernel crash was observed when we destroy the region, and a pass through decoder is reset. The issue can be reproduced as below, 1) create a region with a CXL setup which includes a HB with a single root port under which a memdev is attached directly. 2) destroy the region with cxl destroy-region regionX -f. Fixes: 176baefb2eb5 ("cxl/hdm: Commit decoder state to hardware") Cc: Signed-off-by: Fan Ni Reviewed-by: Davidlohr Bueso Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Tested-by: Gregory Price Reviewed-by: Gregory Price Link: https://lore.kernel.org/r/20221215170909.2650271-1-fan.ni@samsung.com Signed-off-by: Dan Williams drivers/cxl/core/region.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2ea31e2e62bbc4d11c411eeb36f1b02841dbcab1 Author: Nicholas Piggin Date: Mon Feb 6 14:22:40 2023 +1000 powerpc/64s/interrupt: Fix interrupt exit race with security mitigation switch The RFI and STF security mitigation options can flip the interrupt_exit_not_reentrant static branch condition concurrently with the interrupt exit code which tests that branch. Interrupt exit tests this condition to set MSR[EE|RI] for exit, then again in the case a soft-masked interrupt is found pending, to recover the MSR so the interrupt can be replayed before attempting to exit again. If the condition changes between these two tests, the MSR and irq soft-mask state will become corrupted, leading to warnings and possible crashes. For example, if the branch is initially true then false, MSR[EE] will be 0 but PACA_IRQ_HARD_DIS clear and EE may not get enabled, leading to warnings in irq_64.c. Fixes: 13799748b957 ("powerpc/64: use interrupt restart table to speed up return from interrupt") Cc: stable@vger.kernel.org # v5.14+ Reported-by: Sachin Sant Tested-by: Sachin Sant Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230206042240.92103-1-npiggin@gmail.com arch/powerpc/kernel/interrupt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4a606ce68426c88ff2563382b33cc34f3485fe57 Author: Zhang Changzhong Date: Mon Dec 12 15:11:26 2022 -0800 ice: switch: fix potential memleak in ice_add_adv_recipe() When ice_add_special_words() fails, the 'rm' is not released, which will lead to a memory leak. Fix this up by going to 'err_unroll' label. Compile tested only. Fixes: 8b032a55c1bd ("ice: low level support for tunnels") Signed-off-by: Zhang Changzhong Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen Reviewed-by: Leon Romanovsky drivers/net/ethernet/intel/ice/ice_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f4870df1b15d62665cb86ca116c8c9cf0e830b0 Author: Dan Carpenter Date: Fri Oct 28 18:02:24 2022 +0300 ice: Fix off by one in ice_tc_forward_to_queue() The > comparison should be >= to prevent reading one element beyond the end of the array. The "vsi->num_rxq" is not strictly speaking the number of elements in the vsi->rxq_map[] array. The array has "vsi->alloc_rxq" elements and "vsi->num_rxq" is less than or equal to the number of elements in the array. The array is allocated in ice_vsi_alloc_arrays(). It's still an off by one but it might not access outside the end of the array. Fixes: 143b86f346c7 ("ice: Enable RX queue selection using skbedit action") Signed-off-by: Dan Carpenter Acked-by: Amritha Nambiar Tested-by: Bharathi Sreenivas Signed-off-by: Tony Nguyen Reviewed-by: Leon Romanovsky drivers/net/ethernet/intel/ice/ice_tc_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c793f8ea15e312789b5b6b4a5e7b0b92315be5cb Author: Brett Creeley Date: Mon Jan 16 13:34:58 2023 +0100 ice: Fix disabling Rx VLAN filtering with port VLAN enabled If the user turns on the vf-true-promiscuous-support flag, then Rx VLAN filtering will be disabled if the VF requests to enable promiscuous mode. When the VF is in a port VLAN, this is the incorrect behavior because it will allow the VF to receive traffic outside of its port VLAN domain. Fortunately this only resulted in the VF(s) receiving broadcast traffic outside of the VLAN domain because all of the VLAN promiscuous rules are based on the port VLAN ID. Fix this by setting the .disable_rx_filtering VLAN op to a no-op when a port VLAN is enabled on the VF. Also, make sure to make this fix for both Single VLAN Mode and Double VLAN Mode enabled devices. Fixes: c31af68a1b94 ("ice: Add outer_vlan_ops and VSI specific VLAN ops implementations") Signed-off-by: Brett Creeley Signed-off-by: Karen Ostrowska Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_vf_vsi_vlan_ops.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit b2dbde3ad44f290ded319f00b71dccec90083a50 Author: Michal Swiatkowski Date: Wed Jan 4 09:25:17 2023 +0100 ice: fix out-of-bounds KASAN warning in virtchnl KASAN reported: [ 9793.708867] BUG: KASAN: global-out-of-bounds in ice_get_link_speed+0x16/0x30 [ice] [ 9793.709205] Read of size 4 at addr ffffffffc1271b1c by task kworker/6:1/402 [ 9793.709222] CPU: 6 PID: 402 Comm: kworker/6:1 Kdump: loaded Tainted: G B OE 6.1.0+ #3 [ 9793.709235] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.00.01.0014.070920180847 07/09/2018 [ 9793.709245] Workqueue: ice ice_service_task [ice] [ 9793.709575] Call Trace: [ 9793.709582] [ 9793.709588] dump_stack_lvl+0x44/0x5c [ 9793.709613] print_report+0x17f/0x47b [ 9793.709632] ? __cpuidle_text_end+0x5/0x5 [ 9793.709653] ? ice_get_link_speed+0x16/0x30 [ice] [ 9793.709986] ? ice_get_link_speed+0x16/0x30 [ice] [ 9793.710317] kasan_report+0xb7/0x140 [ 9793.710335] ? ice_get_link_speed+0x16/0x30 [ice] [ 9793.710673] ice_get_link_speed+0x16/0x30 [ice] [ 9793.711006] ice_vc_notify_vf_link_state+0x14c/0x160 [ice] [ 9793.711351] ? ice_vc_repr_cfg_promiscuous_mode+0x120/0x120 [ice] [ 9793.711698] ice_vc_process_vf_msg+0x7a7/0xc00 [ice] [ 9793.712074] __ice_clean_ctrlq+0x98f/0xd20 [ice] [ 9793.712534] ? ice_bridge_setlink+0x410/0x410 [ice] [ 9793.712979] ? __request_module+0x320/0x520 [ 9793.713014] ? ice_process_vflr_event+0x27/0x130 [ice] [ 9793.713489] ice_service_task+0x11cf/0x1950 [ice] [ 9793.713948] ? io_schedule_timeout+0xb0/0xb0 [ 9793.713972] process_one_work+0x3d0/0x6a0 [ 9793.714003] worker_thread+0x8a/0x610 [ 9793.714031] ? process_one_work+0x6a0/0x6a0 [ 9793.714049] kthread+0x164/0x1a0 [ 9793.714071] ? kthread_complete_and_exit+0x20/0x20 [ 9793.714100] ret_from_fork+0x1f/0x30 [ 9793.714137] [ 9793.714151] The buggy address belongs to the variable: [ 9793.714158] ice_aq_to_link_speed+0x3c/0xffffffffffff3520 [ice] [ 9793.714632] Memory state around the buggy address: [ 9793.714642] ffffffffc1271a00: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 00 02 f9 [ 9793.714656] ffffffffc1271a80: f9 f9 f9 f9 00 00 04 f9 f9 f9 f9 f9 00 00 00 00 [ 9793.714670] >ffffffffc1271b00: 00 00 00 04 f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 [ 9793.714680] ^ [ 9793.714690] ffffffffc1271b80: 00 00 00 00 00 04 f9 f9 f9 f9 f9 f9 00 00 00 00 [ 9793.714704] ffffffffc1271c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 The ICE_AQ_LINK_SPEED_UNKNOWN define is BIT(15). The value is bigger than both legacy and normal link speed tables. Add one element (0 - unknown) to both tables. There is no need to explicitly set table size, leave it empty. Fixes: 1d0e28a9be1f ("ice: Remove and replace ice speed defines with ethtool.h versions") Signed-off-by: Michal Swiatkowski Reviewed-by: Alexander Lobakin Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Reviewed-by: Leon Romanovsky drivers/net/ethernet/intel/ice/ice_common.c | 9 ++++----- drivers/net/ethernet/intel/ice/ice_vf_mbx.c | 21 ++++++++------------- 2 files changed, 12 insertions(+), 18 deletions(-) commit 4d159f7884f78b1aacb99b4fc37d1e3cb1194e39 Author: Anirudh Venkataramanan Date: Mon Jan 30 14:06:40 2023 -0800 ice: Do not use WQ_MEM_RECLAIM flag for workqueue When both ice and the irdma driver are loaded, a warning in check_flush_dependency is being triggered. This is due to ice driver workqueue being allocated with the WQ_MEM_RECLAIM flag and the irdma one is not. According to kernel documentation, this flag should be set if the workqueue will be involved in the kernel's memory reclamation flow. Since it is not, there is no need for the ice driver's WQ to have this flag set so remove it. Example trace: [ +0.000004] workqueue: WQ_MEM_RECLAIM ice:ice_service_task [ice] is flushing !WQ_MEM_RECLAIM infiniband:0x0 [ +0.000139] WARNING: CPU: 0 PID: 728 at kernel/workqueue.c:2632 check_flush_dependency+0x178/0x1a0 [ +0.000011] Modules linked in: bonding tls xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_cha in_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink bridge stp llc rfkill vfat fat intel_rapl_msr intel _rapl_common isst_if_common skx_edac nfit libnvdimm x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct1 0dif_pclmul crc32_pclmul ghash_clmulni_intel rapl intel_cstate rpcrdma sunrpc rdma_ucm ib_srpt ib_isert iscsi_target_mod target_ core_mod ib_iser libiscsi scsi_transport_iscsi rdma_cm ib_cm iw_cm iTCO_wdt iTCO_vendor_support ipmi_ssif irdma mei_me ib_uverbs ib_core intel_uncore joydev pcspkr i2c_i801 acpi_ipmi mei lpc_ich i2c_smbus intel_pch_thermal ioatdma ipmi_si acpi_power_meter acpi_pad xfs libcrc32c sd_mod t10_pi crc64_rocksoft crc64 sg ahci ixgbe libahci ice i40e igb crc32c_intel mdio i2c_algo_bit liba ta dca wmi dm_mirror dm_region_hash dm_log dm_mod ipmi_devintf ipmi_msghandler fuse [ +0.000161] [last unloaded: bonding] [ +0.000006] CPU: 0 PID: 728 Comm: kworker/0:2 Tainted: G S 6.2.0-rc2_next-queue-13jan-00458-gc20aabd57164 #1 [ +0.000006] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0010.010620200716 01/06/2020 [ +0.000003] Workqueue: ice ice_service_task [ice] [ +0.000127] RIP: 0010:check_flush_dependency+0x178/0x1a0 [ +0.000005] Code: 89 8e 02 01 e8 49 3d 40 00 49 8b 55 18 48 8d 8d d0 00 00 00 48 8d b3 d0 00 00 00 4d 89 e0 48 c7 c7 e0 3b 08 9f e8 bb d3 07 01 <0f> 0b e9 be fe ff ff 80 3d 24 89 8e 02 00 0f 85 6b ff ff ff e9 06 [ +0.000004] RSP: 0018:ffff88810a39f990 EFLAGS: 00010282 [ +0.000005] RAX: 0000000000000000 RBX: ffff888141bc2400 RCX: 0000000000000000 [ +0.000004] RDX: 0000000000000001 RSI: dffffc0000000000 RDI: ffffffffa1213a80 [ +0.000003] RBP: ffff888194bf3400 R08: ffffed117b306112 R09: ffffed117b306112 [ +0.000003] R10: ffff888bd983088b R11: ffffed117b306111 R12: 0000000000000000 [ +0.000003] R13: ffff888111f84d00 R14: ffff88810a3943ac R15: ffff888194bf3400 [ +0.000004] FS: 0000000000000000(0000) GS:ffff888bd9800000(0000) knlGS:0000000000000000 [ +0.000003] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0.000003] CR2: 000056035b208b60 CR3: 000000017795e005 CR4: 00000000007706f0 [ +0.000003] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ +0.000003] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ +0.000002] PKRU: 55555554 [ +0.000003] Call Trace: [ +0.000002] [ +0.000003] __flush_workqueue+0x203/0x840 [ +0.000006] ? mutex_unlock+0x84/0xd0 [ +0.000008] ? __pfx_mutex_unlock+0x10/0x10 [ +0.000004] ? __pfx___flush_workqueue+0x10/0x10 [ +0.000006] ? mutex_lock+0xa3/0xf0 [ +0.000005] ib_cache_cleanup_one+0x39/0x190 [ib_core] [ +0.000174] __ib_unregister_device+0x84/0xf0 [ib_core] [ +0.000094] ib_unregister_device+0x25/0x30 [ib_core] [ +0.000093] irdma_ib_unregister_device+0x97/0xc0 [irdma] [ +0.000064] ? __pfx_irdma_ib_unregister_device+0x10/0x10 [irdma] [ +0.000059] ? up_write+0x5c/0x90 [ +0.000005] irdma_remove+0x36/0x90 [irdma] [ +0.000062] auxiliary_bus_remove+0x32/0x50 [ +0.000007] device_release_driver_internal+0xfa/0x1c0 [ +0.000005] bus_remove_device+0x18a/0x260 [ +0.000007] device_del+0x2e5/0x650 [ +0.000005] ? __pfx_device_del+0x10/0x10 [ +0.000003] ? mutex_unlock+0x84/0xd0 [ +0.000004] ? __pfx_mutex_unlock+0x10/0x10 [ +0.000004] ? _raw_spin_unlock+0x18/0x40 [ +0.000005] ice_unplug_aux_dev+0x52/0x70 [ice] [ +0.000160] ice_service_task+0x1309/0x14f0 [ice] [ +0.000134] ? __pfx___schedule+0x10/0x10 [ +0.000006] process_one_work+0x3b1/0x6c0 [ +0.000008] worker_thread+0x69/0x670 [ +0.000005] ? __kthread_parkme+0xec/0x110 [ +0.000007] ? __pfx_worker_thread+0x10/0x10 [ +0.000005] kthread+0x17f/0x1b0 [ +0.000005] ? __pfx_kthread+0x10/0x10 [ +0.000004] ret_from_fork+0x29/0x50 [ +0.000009] Fixes: 940b61af02f4 ("ice: Initialize PF and setup miscellaneous interrupt") Signed-off-by: Anirudh Venkataramanan Signed-off-by: Marcin Szycik Tested-by: Jakub Andrysiak Signed-off-by: Tony Nguyen Reviewed-by: Leon Romanovsky drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04119ab1a49fc41cb70f0472be5455af268fa260 Author: Dave Airlie Date: Mon Feb 6 07:05:28 2023 +1000 nvidiafb: detect the hardware support before removing console. This driver removed the console, but hasn't yet decided if it could take over the console yet. Instead of doing that, probe the hw for support and then remove the console afterwards. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216859 Fixes: 145eed48de27 ("fbdev: Remove conflicting devices on PCI bus") Reported-by: Zeno Davatz Tested-by: Zeno Davatz Tested-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20230205210751.3842103-1-airlied@gmail.com drivers/video/fbdev/nvidia/nvidia.c | 81 +++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 39 deletions(-) commit 6afaed53cc9adde69d8a76ff5b4d740d5efbc54c Author: Filipe Manana Date: Tue Jan 10 14:56:39 2023 +0000 btrfs: simplify update of last_dir_index_offset when logging a directory When logging a directory, we always set the inode's last_dir_index_offset to the offset of the last dir index item we found. This is using an extra field in the log context structure, and it makes more sense to update it only after we insert dir index items, and we could directly update the inode's last_dir_index_offset field instead. So make this simpler by updating the inode's last_dir_index_offset only when we actually insert dir index keys in the log tree, and getting rid of the last_dir_item_offset field in the log context structure. Reported-by: David Arendt Link: https://lore.kernel.org/linux-btrfs/ae169fc6-f504-28f0-a098-6fa6a4dfb612@leemhuis.info/ Reported-by: Maxim Mikityanskiy Link: https://lore.kernel.org/linux-btrfs/Y8voyTXdnPDz8xwY@mail.gmail.com/ Reported-by: Hunter Wardlaw Link: https://bugzilla.suse.com/show_bug.cgi?id=1207231 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216851 CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 23 +++++++++++++++++------ fs/btrfs/tree-log.h | 2 -- 2 files changed, 17 insertions(+), 8 deletions(-) commit 05ecb680708a1dbe6554d6fc17e5d9a8a7cb5e6a Merge: 66fcf74e5c0d 7a2127e66a00 Author: Linus Torvalds Date: Mon Feb 6 14:07:38 2023 -0800 Merge tag 'cgroup-for-6.2-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "During the v6.2 cycle, there were a series of changes to task cpu affinity handling which fixed cpuset inadvertently clobbering user-configured affinity masks. Unfortunately, they broke the affinity handling on hybrid heterogeneous CPUs which have cores that can execute both 64 and 32bit along with cores that can only execute 32bit code. This contains two fix patches for the above issue. While reverting the changes that caused the regression is definitely an option, the origial patches do improve how cpuset behave signficantly in some cases and the fixes seem fairly safe, so I think it'd be better to try to fix them first" * tag 'cgroup-for-6.2-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cpuset: Call set_cpus_allowed_ptr() with appropriate mask for task cgroup/cpuset: Don't filter offline CPUs in cpuset_cpus_allowed() for top cpuset tasks commit 66fcf74e5c0d771a456b96ec9aebfb53d648eede Merge: d2d11f342b17 a9ad4d87aa26 Author: Linus Torvalds Date: Mon Feb 6 14:05:16 2023 -0800 Merge tag 'for-6.2-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - explicitly initialize zlib work memory to fix a KCSAN warning - limit number of send clones by maximum memory allocated - limit device size extent in case it device shrink races with chunk allocation - raid56 fixes: - fix copy&paste error in RAID6 stripe recovery - make error bitmap update atomic * tag 'for-6.2-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: raid56: make error_bitmap update atomic btrfs: send: limit number of clones and allocated memory size btrfs: zlib: zero-initialize zlib workspace btrfs: limit device extents to the device size btrfs: raid56: fix stripes if vertical errors are found commit 95ff4aadf1326633e157dbf9c59260465dde9513 Merge: fe1e7e8ce2c4 e0576cd642ce Author: Mark Brown Date: Mon Feb 6 21:36:47 2023 +0000 Two bug fixes for tas5805m codec driver Merge series from Daniel Beer : This pair of patches fixes two issues which crept in while revising the original submission, at a time when I no longer had access to test hardware. The fixes here have been tested and verified on hardware. commit 7a2127e66a00e073db8d90f9aac308f4a8a64226 Author: Will Deacon Date: Tue Jan 31 22:17:19 2023 +0000 cpuset: Call set_cpus_allowed_ptr() with appropriate mask for task set_cpus_allowed_ptr() will fail with -EINVAL if the requested affinity mask is not a subset of the task_cpu_possible_mask() for the task being updated. Consequently, on a heterogeneous system with cpusets spanning the different CPU types, updates to the cgroup hierarchy can silently fail to update task affinities when the effective affinity mask for the cpuset is expanded. For example, consider an arm64 system with 4 CPUs, where CPUs 2-3 are the only cores capable of executing 32-bit tasks. Attaching a 32-bit task to a cpuset containing CPUs 0-2 will correctly affine the task to CPU 2. Extending the cpuset to CPUs 0-3, however, will fail to extend the affinity mask of the 32-bit task because update_tasks_cpumask() will pass the full 0-3 mask to set_cpus_allowed_ptr(). Extend update_tasks_cpumask() to take a temporary 'cpumask' paramater and use it to mask the 'effective_cpus' mask with the possible mask for each task being updated. Fixes: 431c69fac05b ("cpuset: Honour task_cpu_possible_mask() in guarantee_online_cpus()") Signed-off-by: Will Deacon Acked-by: Waiman Long Signed-off-by: Tejun Heo kernel/cgroup/cpuset.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 3fb906e7fabbb5b76c3c5256b10dc46ef80a0bfe Author: Waiman Long Date: Sun Feb 5 22:48:53 2023 -0500 cgroup/cpuset: Don't filter offline CPUs in cpuset_cpus_allowed() for top cpuset tasks Since commit 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask"), relax_compatible_cpus_allowed_ptr() is calling __sched_setaffinity() unconditionally. This helps to expose a bug in the current cpuset hotplug code where the cpumasks of the tasks in the top cpuset are not updated at all when some CPUs become online or offline. It is likely caused by the fact that some of the tasks in the top cpuset, like percpu kthreads, cannot have their cpu affinity changed. One way to reproduce this as suggested by Peter is: - boot machine - offline all CPUs except one - taskset -p ffffffff $$ - online all CPUs Fix this by allowing cpuset_cpus_allowed() to return a wider mask that includes offline CPUs for those tasks that are in the top cpuset. For tasks not in the top cpuset, the old rule applies and only online CPUs will be returned in the mask since hotplug events will update their cpumasks accordingly. Fixes: 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask") Reported-by: Will Deacon Originally-from: Peter Zijlstra (Intel) Tested-by: Will Deacon Signed-off-by: Waiman Long Signed-off-by: Tejun Heo kernel/cgroup/cpuset.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit 89e5dd41c444cc2178be8d3090e386d02f4fccf3 Merge: 97801cfcf956 4722dd4029c6 Author: Arnd Bergmann Date: Mon Feb 6 20:47:13 2023 +0100 Merge tag 'sti-dt-for-6.3-round1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into arm/fixes Fix polarity of reset line of tsin0 port for stihxxx-b2120 * tag 'sti-dt-for-6.3-round1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: stihxxx-b2120: fix polarity of reset line of tsin0 port Link: https://lore.kernel.org/r/8e05c729-89bc-20f3-acf6-096fb85d7e36@foss.st.com Signed-off-by: Arnd Bergmann commit 918c5765a15420ad60730fbe5b5b67beb74ca7b6 Merge: 4ec5183ec486 51be2fffd65d Author: Rafael J. Wysocki Date: Mon Feb 6 18:54:35 2023 +0100 Merge tag 'cpufreq-arm-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull an ARM cpufreq fix for 6.2-rc8 from Viresh Kumar: - Fix the incorrect value returned by cpufreq driver's ->get() callback for Qualcomm platforms (Douglas Anderson). * tag 'cpufreq-arm-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: qcom-hw: Fix cpufreq_driver->get() for non-LMH systems commit 8f20660f053cefd4693e69cfff9cf58f4f7c4929 Author: Ryan Neph Date: Fri Feb 3 15:33:44 2023 -0800 drm/virtio: exbuf->fence_fd unmodified on interrupted wait An interrupted dma_fence_wait() becomes an -ERESTARTSYS returned to userspace ioctl(DRM_IOCTL_VIRTGPU_EXECBUFFER) calls, prompting to retry the ioctl(), but the passed exbuf->fence_fd has been reset to -1, making the retry attempt fail at sync_file_get_fence(). The uapi for DRM_IOCTL_VIRTGPU_EXECBUFFER is changed to retain the passed value for exbuf->fence_fd when returning anything besides a successful result from the ioctl. Fixes: 2cd7b6f08bc4 ("drm/virtio: add in/out fence support for explicit synchronization") Signed-off-by: Ryan Neph Reviewed-by: Rob Clark Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20230203233345.2477767-1-ryanneph@chromium.org drivers/gpu/drm/virtio/virtgpu_ioctl.c | 5 +---- include/uapi/drm/virtgpu_drm.h | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) commit 7a17e8423a133a6ac238462126d7f88faaccc681 Author: Stefan Binding Date: Mon Feb 6 15:00:19 2023 +0000 ALSA: hda/realtek: Add quirk for ASUS UM3402 using CS35L41 This Asus Zenbook laptop 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/20230206150019.3825120-1-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit ebebf05a4b06a1be49788ca0edf990de01c4b0d0 Author: Luka Guzenko Date: Fri Jan 20 23:37:41 2023 +0100 HID: Ignore battery for ELAN touchscreen 29DF on HP The touchscreen reports a battery status of 0% and jumps to 1% when a stylus is used. The device ID was added and the battery ignore quirk was enabled for it. Signed-off-by: Luka Guzenko Link: https://lore.kernel.org/r/20230120223741.3007-1-l.guzenko@web.de Signed-off-by: Benjamin Tissoires drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+) commit db370a8b9f67ae5f17e3d5482493294467784504 Author: Wander Lairson Costa Date: Thu Feb 2 09:30:20 2023 -0300 rtmutex: Ensure that the top waiter is always woken up Let L1 and L2 be two spinlocks. Let T1 be a task holding L1 and blocked on L2. T1, currently, is the top waiter of L2. Let T2 be the task holding L2. Let T3 be a task trying to acquire L1. The following events will lead to a state in which the wait queue of L2 isn't empty, but no task actually holds the lock. T1 T2 T3 == == == spin_lock(L1) | raw_spin_lock(L1->wait_lock) | rtlock_slowlock_locked(L1) | | task_blocks_on_rt_mutex(L1, T3) | | | orig_waiter->lock = L1 | | | orig_waiter->task = T3 | | | raw_spin_unlock(L1->wait_lock) | | | rt_mutex_adjust_prio_chain(T1, L1, L2, orig_waiter, T3) spin_unlock(L2) | | | | | rt_mutex_slowunlock(L2) | | | | | | raw_spin_lock(L2->wait_lock) | | | | | | wakeup(T1) | | | | | | raw_spin_unlock(L2->wait_lock) | | | | | | | | waiter = T1->pi_blocked_on | | | | waiter == rt_mutex_top_waiter(L2) | | | | waiter->task == T1 | | | | raw_spin_lock(L2->wait_lock) | | | | dequeue(L2, waiter) | | | | update_prio(waiter, T1) | | | | enqueue(L2, waiter) | | | | waiter != rt_mutex_top_waiter(L2) | | | | L2->owner == NULL | | | | wakeup(T1) | | | | raw_spin_unlock(L2->wait_lock) T1 wakes up T1 != top_waiter(L2) schedule_rtlock() If the deadline of T1 is updated before the call to update_prio(), and the new deadline is greater than the deadline of the second top waiter, then after the requeue, T1 is no longer the top waiter, and the wrong task is woken up which will then go back to sleep because it is not the top waiter. This can be reproduced in PREEMPT_RT with stress-ng: while true; do stress-ng --sched deadline --sched-period 1000000000 \ --sched-runtime 800000000 --sched-deadline \ 1000000000 --mmapfork 23 -t 20 done A similar issue was pointed out by Thomas versus the cases where the top waiter drops out early due to a signal or timeout, which is a general issue for all regular rtmutex use cases, e.g. futex. The problematic code is in rt_mutex_adjust_prio_chain(): // Save the top waiter before dequeue/enqueue prerequeue_top_waiter = rt_mutex_top_waiter(lock); rt_mutex_dequeue(lock, waiter); waiter_update_prio(waiter, task); rt_mutex_enqueue(lock, waiter); // Lock has no owner? if (!rt_mutex_owner(lock)) { // Top waiter changed ----> if (prerequeue_top_waiter != rt_mutex_top_waiter(lock)) ----> wake_up_state(waiter->task, waiter->wake_state); This only takes the case into account where @waiter is the new top waiter due to the requeue operation. But it fails to handle the case where @waiter is not longer the top waiter due to the requeue operation. Ensure that the new top waiter is woken up so in all cases so it can take over the ownerless lock. [ tglx: Amend changelog, add Fixes tag ] Fixes: c014ef69b3ac ("locking/rtmutex: Add wake_state to rt_mutex_waiter") Signed-off-by: Wander Lairson Costa Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230117172649.52465-1-wander@redhat.com Link: https://lore.kernel.org/r/20230202123020.14844-1-wander@redhat.com kernel/locking/rtmutex.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 44e4c5684fcc82d8f099656c4ea39d9571e2a8ac Author: Aravind Iddamsetty Date: Fri Feb 3 19:22:05 2023 +0530 drm/i915: Initialize the obj flags for shmem objects Obj flags for shmem objects is not being set correctly. Fixes in setting BO_ALLOC_USER flag which applies to shmem objs as well. v2: Add fixes tag (Tvrtko, Matt A) Fixes: 13d29c823738 ("drm/i915/ehl: unconditionally flush the pages on acquire") Cc: # v5.15+ Cc: Matthew Auld Cc: Tvrtko Ursulin Reviewed-by: Matthew Auld Signed-off-by: Aravind Iddamsetty Reviewed-by: Andrzej Hajda Signed-off-by: Tvrtko Ursulin [tursulin: Grouped all tags together.] Link: https://patchwork.freedesktop.org/patch/msgid/20230203135205.4051149-1-aravind.iddamsetty@intel.com (cherry picked from commit bca0d1d3ceeb07be45a51c0fa4d57a0ce31b6aed) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 251e8c5b1b1fadcc387a8e618c7437d330bdac3e Author: Rob Clark Date: Fri Feb 3 08:49:20 2023 -0800 drm/i915: Move fd_install after last use of fence Because eb_composite_fence_create() drops the fence_array reference after creation of the sync_file, only the sync_file holds a ref to the fence. But fd_install() makes that reference visable to userspace, so it must be the last thing we do with the fence. Signed-off-by: Rob Clark Fixes: 00dae4d3d35d ("drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)") Cc: # v5.15+ [tursulin: Added stable tag.] Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230203164937.4035503-1-robdclark@gmail.com (cherry picked from commit 960dafa30455450d318756a9896a02727f2639e0) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 039a72ce7e570c56713fe7758a0658034dc48c9b Author: Jouni Högander Date: Mon Jan 23 09:44:37 2023 +0200 drm/i915/fbdev: Implement fb_dirty for intel custom fb helper After disconnecting damage worker from update logic it's left to fbdev emulation implementation to have fb_dirty function. Currently intel fbdev doesn't have it. This is causing problems to features (PSR, FBC, DRRS) relying on dirty callback. Implement simple fb_dirty callback to deliver notifications about updates in fb console. v4: Add proper Fixes tag and modify commit message v3: Check damage clip v2: Improved commit message and added Fixes tag Fixes: f231af498c29 ("drm/fb-helper: Disconnect damage worker from update logic") Cc: Ville Syrjälä Cc: Thomas Zimmermann Cc: Jani Nikula Signed-off-by: Jouni Högander Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230123074437.475103-1-jouni.hogander@intel.com (cherry picked from commit 1af546c2cec6e28b6bbe01a4ad0c38e96e54fcb4) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_fbdev.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 90d5e8301ac24550be80d193aa5582cab56c29fc Author: Ville Syrjälä Date: Tue Jan 31 02:21:24 2023 +0200 drm/i915: Don't do the WM0->WM1 copy w/a if WM1 is already enabled Due to a workaround we have to make sure the WM1 watermarks block/lines values are sensible even when WM1 is disabled. To that end we copy those values from WM0. However since we now keep each wm level enabled on a per-plane basis it doesn't seem necessary to do that copy when we already have an enabled WM1 on the current plane. That is, we might be in a situation where another plane can only do WM0 (and thus needs the copy) but the current plane's WM1 is still perfectly valid (ie. fits into the current DDB allocation). Skipping the copy could avoid reprogramming the plane's registers needlessly in some cases. Fixes: a301cb0fca2d ("drm/i915: Keep plane watermarks enabled more aggressively") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230131002127.29305-1-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy (cherry picked from commit c580c2d27ac8754cc6f01da1d715b7272f5f9cbb) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/skl_watermark.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fe1e7e8ce2c47bd8fd9885eab63fca0a522e94c9 Author: Alexey Firago Date: Sat Feb 4 22:51:06 2023 +0300 ASoC: codecs: es8326: Fix DTS properties reading Seems like properties parsing and reading was copy-pasted, so "everest,interrupt-src" and "everest,interrupt-clk" are saved into the es8326->jack_pol variable. This might lead to wrong settings being saved into the reg 57 (ES8326_HP_DET). Fix this by using proper variables while reading properties. Signed-off-by: Alexey Firago Reviewed-by: Yang Yingliang sound/soc/codecs/es8326.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e0576cd642ced1ac65370b4516b7be9f536a0498 Author: Daniel Beer Date: Thu Oct 27 21:38:38 2022 +1300 ASoC: tas5805m: add missing page switch. In tas5805m_refresh, we switch pages to update the DSP volume control, but we need to switch back to page 0 before trying to alter the soft-mute control. This latter page-switch was missing. Fixes: ec45268467f4 ("ASoC: add support for TAS5805M digital amplifier") Signed-off-by: Daniel Beer Link: https://lore.kernel.org/r/1fea38a71ea6ab0225d19ab28d1fa12828d762d0.1675497326.git.daniel.beer@igorinstitute.com Signed-off-by: Mark Brown sound/soc/codecs/tas5805m.c | 3 +++ 1 file changed, 3 insertions(+) commit 147323792693bf013f60dca160be1d32bd4d180a Author: Daniel Beer Date: Thu Oct 27 21:28:31 2022 +1300 ASoC: tas5805m: rework to avoid scheduling while atomic. There's some setup we need to do in order to get the DSP initialized, and this can't be done until a bit-clock is ready. In an earlier version of this driver, this work was done in a DAPM callback. The DAPM callback doesn't guarantee that the bit-clock is running, so the work was moved instead to the trigger callback. Unfortunately this callback runs in atomic context, and the setup code needs to do I2C transactions. Here we use a work_struct to kick off the setup in a thread instead. Fixes: ec45268467f4 ("ASoC: add support for TAS5805M digital amplifier") Signed-off-by: Daniel Beer Link: https://lore.kernel.org/r/85d8ba405cb009a7a3249b556dc8f3bdb1754fdf.1675497326.git.daniel.beer@igorinstitute.com Signed-off-by: Mark Brown sound/soc/codecs/tas5805m.c | 128 ++++++++++++++++++++++++++++++-------------- 1 file changed, 87 insertions(+), 41 deletions(-) commit 5921b250f43870e7d8044ca14e402292ceb3e3a8 Author: Krzysztof Kozlowski Date: Fri Feb 3 17:50:54 2023 +0100 pinctrl: qcom: sm8450-lpass-lpi: correct swr_rx_data group According to hardware programming guide, the swr_rx_data pin group has only two pins (GPIO5 and GPIO6). This is also visible in "struct sm8450_groups" in the driver - GPIO15 does not have swr_rx_data function. Fixes: ec1652fc4d56 ("pinctrl: qcom: Add sm8450 lpass lpi pinctrl driver") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230203165054.390762-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97e45d469eb180a7bd2809e4e079331552c73e42 Author: Randy Dunlap Date: Sat Feb 4 09:22:06 2023 -0800 powerpc/kexec_file: fix implicit decl error kexec (PPC64) code calls memory_hotplug_max(). Add the header declaration for it from . Using does not work since the #include for depends on CONFIG_NUMA=y, which is not always set. Fixes this build error/warning: arch/powerpc/kexec/file_load_64.c: In function 'kexec_extra_fdt_size_ppc64': arch/powerpc/kexec/file_load_64.c:993:33: error: implicit declaration of function 'memory_hotplug_max' 993 | usm_entries = ((memory_hotplug_max() / drmem_lmb_size()) + | ^~~~~~~~~~~~~~~~~~ Fixes: fc546faa5595 ("powerpc/kexec_file: Count hot-pluggable memory in FDT estimate") Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230204172206.7662-1-rdunlap@infradead.org arch/powerpc/kexec/file_load_64.c | 1 + 1 file changed, 1 insertion(+) commit 563ca0e9eab8acc8a1309e8b440108ff8d23e951 Author: Dan Carpenter Date: Tue Jan 24 18:20:54 2023 +0300 RDMA/mana_ib: Prevent array underflow in mana_ib_create_qp_raw() The "port" comes from the user and if it is zero then the: ndev = mc->ports[port - 1]; assignment does an out of bounds read. I have changed the if statement to fix this and to mirror how it is done in mana_ib_create_qp_rss(). Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Y8/3Vn8qx00kE9Kk@kili Acked-by: Long Li Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mana/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bcfdab3f0c6672ca52be3cb65a0550d8b99554b Author: Mario Limonciello Date: Fri Feb 3 16:08:49 2023 -0600 HID: amd_sfh: if no sensors are enabled, clean up It was reported that commit b300667b33b2 ("HID: amd_sfh: Disable the interrupt for all command") had caused increased resume time on HP Envy x360. Before this commit 3 sensors were reported, but they were not actually functional. After this commit the sensors are no longer reported, but also the resume time increased. To avoid this problem explicitly look for the number of disabled sensors. If all the sensors are disabled, clean everything up. Fixes: b300667b33b2 ("HID: amd_sfh: Disable the interrupt for all command") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2115 Reported-by: Xaver Hugl Signed-off-by: Mario Limonciello Acked-by: Basavaraj Natikar Link: https://lore.kernel.org/r/20230203220850.13924-1-mario.limonciello@amd.com Signed-off-by: Benjamin Tissoires drivers/hid/amd-sfh-hid/amd_sfh_client.c | 13 +++++++++++-- drivers/hid/amd-sfh-hid/amd_sfh_hid.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) commit 811d581194f7412eda97acc03d17fc77824b561f 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/ Signed-off-by: David S. Miller drivers/net/usb/plusb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 690eb7dec72ae52d1d710d14a451844b4d0f4f19 Author: Bastien Nocera Date: Fri Feb 3 11:18:00 2023 +0100 HID: logitech: Disable hi-res scrolling on USB On some Logitech mice, such as the G903, and possibly the G403, the HID events are generated on a different interface to the HID++ one. If we enable hi-res through the HID++ interface, the HID interface wouldn't know anything about it, and handle the events as if they were regular scroll events, making the mouse unusable. Disable hi-res scrolling on those devices until we implement scroll events through HID++. Signed-off-by: Bastien Nocera Tested-by: Tobias Klausmann Link: https://bugzilla.kernel.org/show_bug.cgi?id=216885 Fixes: 908d325e1665 ("HID: logitech-hidpp: Detect hi-res scrolling support") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230203101800.139380-1-hadess@hadess.net Signed-off-by: Benjamin Tissoires drivers/hid/hid-logitech-hidpp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ea427a222d8bdf2bc1a8a6da3ebe247f7dced70c Author: Xin Zhao Date: Mon Jan 30 21:29:47 2023 +0000 HID: core: Fix deadloop in hid_apply_multiplier. The initial value of hid->collection[].parent_idx if 0. When Report descriptor doesn't contain "HID Collection", the value remains as 0. In the meanwhile, when the Report descriptor fullfill all following conditions, it will trigger hid_apply_multiplier function call. 1. Usage page is Generic Desktop Ctrls (0x01) 2. Usage is RESOLUTION_MULTIPLIER (0x48) 3. Contain any FEATURE items The while loop in hid_apply_multiplier will search the top-most collection by searching parent_idx == -1. Because all parent_idx is 0. The loop will run forever. There is a Report Descriptor triggerring the deadloop 0x05, 0x01, // Usage Page (Generic Desktop Ctrls) 0x09, 0x48, // Usage (0x48) 0x95, 0x01, // Report Count (1) 0x75, 0x08, // Report Size (8) 0xB1, 0x01, // Feature Signed-off-by: Xin Zhao Link: https://lore.kernel.org/r/20230130212947.1315941-1-xnzhao@google.com Signed-off-by: Benjamin Tissoires drivers/hid/hid-core.c | 3 +++ 1 file changed, 3 insertions(+) commit d7d94b2612f5dc25d61dc7bf58aafe7b31f40191 Author: Casper Andersson Date: Fri Feb 3 09:55:57 2023 +0100 net: microchip: sparx5: fix PTP init/deinit not checking all ports Check all ports instead of just port_count ports. PTP init was only checking ports 0 to port_count. If the hardware ports are not mapped starting from 0 then they would be missed, e.g. if only ports 20-30 were mapped it would attempt to init ports 0-10, resulting in NULL pointers when attempting to timestamp. Now it will init all mapped ports. Fixes: 70dfe25cd866 ("net: sparx5: Update extraction/injection for timestamping") Signed-off-by: Casper Andersson Reviewed-by: Horatiu Vultur Signed-off-by: David S. Miller drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 03702d4d29be4e2510ec80b248dbbde4e57030d9 Author: Herton R. Krzesinski Date: Fri Feb 3 13:04:48 2023 -0300 uapi: add missing ip/ipv6 header dependencies for linux/stddef.h Since commit 58e0be1ef6118 ("net: use struct_group to copy ip/ipv6 header addresses"), ip and ipv6 headers started to use the __struct_group definition, which is defined at include/uapi/linux/stddef.h. However, linux/stddef.h isn't explicitly included in include/uapi/linux/{ip,ipv6}.h, which breaks build of xskxceiver bpf selftest if you install the uapi headers in the system: $ make V=1 xskxceiver -C tools/testing/selftests/bpf ... make: Entering directory '(...)/tools/testing/selftests/bpf' gcc -g -O0 -rdynamic -Wall -Werror (...) In file included from xskxceiver.c:79: /usr/include/linux/ip.h:103:9: error: expected specifier-qualifier-list before ‘__struct_group’ 103 | __struct_group(/* no tag */, addrs, /* no attrs */, | ^~~~~~~~~~~~~~ ... Include the missing dependency in ip.h and do the same for the ipv6.h header. Fixes: 58e0be1ef611 ("net: use struct_group to copy ip/ipv6 header addresses") Signed-off-by: Herton R. Krzesinski Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell Signed-off-by: David S. Miller include/uapi/linux/ip.h | 1 + include/uapi/linux/ipv6.h | 1 + 2 files changed, 2 insertions(+) commit c1d2ecdf5e38e3489ce8328238b558b3b2866fe1 Author: Julian Anastasov Date: Thu Feb 2 17:25:51 2023 +0200 neigh: make sure used and confirmed times are valid Entries can linger in cache without timer for days, thanks to the gc_thresh1 limit. As result, without traffic, the confirmed time can be outdated and to appear to be in the future. Later, on traffic, NUD_STALE entries can switch to NUD_DELAY and start the timer which can see the invalid confirmed time and wrongly switch to NUD_REACHABLE state instead of NUD_PROBE. As result, timer is set many days in the future. This is more visible on 32-bit platforms, with higher HZ value. Why this is a problem? While we expect unused entries to expire, such entries stay in REACHABLE state for too long, locked in cache. They are not expired normally, only when cache is full. Problem and the wrong state change reported by Zhang Changzhong: 172.16.1.18 dev bond0 lladdr 0a:0e:0f:01:12:01 ref 1 used 350521/15994171/350520 probes 4 REACHABLE 350520 seconds have elapsed since this entry was last updated, but it is still in the REACHABLE state (base_reachable_time_ms is 30000), preventing lladdr from being updated through probe. Fix it by ensuring timer is started with valid used/confirmed times. Considering the valid time range is LONG_MAX jiffies, we try not to go too much in the past while we are in DELAY/PROBE state. There are also places that need used/updated times to be validated while timer is not running. Reported-by: Zhang Changzhong Signed-off-by: Julian Anastasov Tested-by: Zhang Changzhong Signed-off-by: David S. Miller net/core/neighbour.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 9a6804aa1c92cd28e89e746ace44d5ba101db76c Author: Elvis Angelaccio Date: Sun Feb 5 19:56:18 2023 +0100 ALSA: hda/realtek: Enable mute/micmute LEDs on HP Elitebook, 645 G9 The HP Elitebook 645 G9 laptop (with motherboard model 89D2) uses the ALC236 codec and requires the alc236_fixup_hp_mute_led_micmute_vref fixup in order to enable mute/micmute LEDs. Note: the alc236_fixup_hp_gpio_led fixup, which is used by the Elitebook 640 G9, does not work with the 645 G9. [ rearranged the entry in SSID order -- tiwai ] Signed-off-by: Elvis Angelaccio Cc: Link: https://lore.kernel.org/r/4055cb48-e228-8a13-524d-afbb7aaafebe@kde.org Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 51be2fffd65d9f9cb427030ab0ee85d791b4437d Author: Douglas Anderson Date: Thu Feb 2 14:00:23 2023 -0800 cpufreq: qcom-hw: Fix cpufreq_driver->get() for non-LMH systems On a sc7180-based Chromebook, when I go to /sys/devices/system/cpu/cpu0/cpufreq I can see: cpuinfo_cur_freq:2995200 cpuinfo_max_freq:1804800 scaling_available_frequencies:300000 576000 ... 1708800 1804800 scaling_cur_freq:1804800 scaling_max_freq:1804800 As you can see the `cpuinfo_cur_freq` is bogus. It turns out that this bogus info started showing up as of commit c72cf0cb1d77 ("cpufreq: qcom-hw: Fix the frequency returned by cpufreq_driver->get()"). That commit seems to assume that everyone is on the LMH bandwagon, but sc7180 isn't. Let's go back to the old code in the case where LMH isn't used. Fixes: c72cf0cb1d77 ("cpufreq: qcom-hw: Fix the frequency returned by cpufreq_driver->get()") Signed-off-by: Douglas Anderson Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam [ Viresh: Fixed the 'fixes' tag ] Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit d2d11f342b179f1894a901f143ec7c008caba43e Merge: 4ec5183ec486 9c7417b5ec44 Author: Linus Torvalds Date: Sun Feb 5 17:17:10 2023 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull ELF fix from Al Viro: "One of the many equivalent build warning fixes for !CONFIG_ELF_CORE configs. Geert's is the earliest one I've been able to find" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: coredump: Move dump_emit_page() to kill unused warning commit 4ec5183ec48656cec489c49f989c508b68b518e3 Author: Linus Torvalds Date: Sun Feb 5 13:13:28 2023 -0800 Linux 6.2-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c608f6b58f306ce0e4f459af69a196f5ed6ccf45 Merge: dc0ce181af6d f82060da749c Author: Linus Torvalds Date: Sun Feb 5 12:19:55 2023 -0800 Merge tag 'usb-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes that resolve some reported problems. These include: - gadget driver fixes - dwc3 driver fix - typec driver fix - MAINTAINERS file update. All of these have been in linux-next with no reported problems" * tag 'usb-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: ucsi: Don't attempt to resume the ports before they exist usb: gadget: udc: do not clear gadget driver.bus usb: gadget: f_uac2: Fix incorrect increment of bNumEndpoints usb: gadget: f_fs: Fix unbalanced spinlock in __ffs_ep0_queue_wait usb: dwc3: qcom: enable vbus override when in OTG dr-mode MAINTAINERS: Add myself as UVC Gadget Maintainer commit dc0ce181af6d1989192b973eae5f916cb6ce47f0 Merge: d3feaff4d949 226fae124b2d Author: Linus Torvalds Date: Sun Feb 5 12:06:29 2023 -0800 Merge tag 'tty-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are some small serial and vt fixes. These include: - 8250 driver fixes relating to dma issues - stm32 serial driver fix for threaded irqs - vc_screen bugfix for reported problems. All have been in linux-next for a while with no reported problems" * tag 'tty-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF serial: 8250_dma: Fix DMA Rx rearm race serial: 8250_dma: Fix DMA Rx completion race serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler commit d3feaff4d9492aa05b94167e170858da81159654 Merge: 870c3a9a2bc4 d83d7ed26028 Author: Linus Torvalds Date: Sun Feb 5 11:52:23 2023 -0800 Merge tag 'char-misc-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are a number of small char/misc/whatever driver fixes. They include: - IIO driver fixes for some reported problems - nvmem driver fixes - fpga driver fixes - debugfs memory leak fix in the hv_balloon and irqdomain code (irqdomain change was acked by the maintainer) All have been in linux-next with no reported problems" * tag 'char-misc-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (33 commits) kernel/irq/irqdomain.c: fix memory leak with using debugfs_lookup() HV: hv_balloon: fix memory leak with using debugfs_lookup() nvmem: qcom-spmi-sdam: fix module autoloading nvmem: core: fix return value nvmem: core: fix cell removal on error nvmem: core: fix device node refcounting nvmem: core: fix registration vs use race nvmem: core: fix cleanup after dev_set_name() nvmem: core: remove nvmem_config wp_gpio nvmem: core: initialise nvmem->id early nvmem: sunxi_sid: Always use 32-bit MMIO reads nvmem: brcm_nvram: Add check for kzalloc iio: imu: fxos8700: fix MAGN sensor scale and unit iio: imu: fxos8700: remove definition FXOS8700_CTRL_ODR_MIN iio: imu: fxos8700: fix failed initialization ODR mode assignment iio: imu: fxos8700: fix incorrect ODR mode readback iio: light: cm32181: Fix PM support on system with 2 I2C resources iio: hid: fix the retval in gyro_3d_capture_sample iio: hid: fix the retval in accel_3d_capture_sample iio: imu: st_lsm6dsx: fix build when CONFIG_IIO_TRIGGERED_BUFFER=m ... commit 870c3a9a2bc48bea0f954172aaff7ed489acaf64 Merge: 9e482602c594 2b09d5d36498 Author: Linus Torvalds Date: Sun Feb 5 11:43:00 2023 -0800 Merge tag 'fbdev-for-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes from Helge Deller: - fix fbcon to prevent fonts bigger than 32x32 pixels to avoid overflows reported by syzbot - switch omapfb to use kstrtobool() - switch some fbdev drivers to use the backlight helpers * tag 'fbdev-for-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbcon: Check font dimension limits fbdev: omapfb: Use kstrtobool() instead of strtobool() fbdev: fbmon: fix function name in kernel-doc fbdev: atmel_lcdfb: Rework backlight status updates fbdev: riva: Use backlight helper fbdev: omapfb: panel-dsi-cm: Use backlight helper fbdev: nvidia: Use backlight helper fbdev: mx3fb: Use backlight helper fbdev: radeon: Use backlight helper fbdev: atyfb: Use backlight helper fbdev: aty128fb: Use backlight helper commit 9e482602c59457374916d942b4ba6ff602b14fa4 Merge: de506eec89d8 9d2c7203ffdb Author: Linus Torvalds Date: Sun Feb 5 11:28:42 2023 -0800 Merge tag 'x86_urgent_for_v6.2_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Borislav Petkov: - Prevent the compiler from reordering accesses to debug regs which could cause a #VC exception in SEV-ES guests at the wrong place in the NMI handling path * tag 'x86_urgent_for_v6.2_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/debug: Fix stack recursion caused by wrongly ordered DR7 accesses commit de506eec89d8456dfe344fac5b72afce0dce07a3 Merge: 837c07cf68fe 4f64a6c9f6f1 Author: Linus Torvalds Date: Sun Feb 5 11:03:56 2023 -0800 Merge tag 'perf_urgent_for_v6.2_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Borislav Petkov: - Lock the proper critical section when dealing with perf event context * tag 'perf_urgent_for_v6.2_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: Fix perf_event_pmu_context serialization commit 837c07cf68fec9cad455d5fc86aab5350cc06c53 Merge: 95078069c1e7 1665c027afb2 Author: Linus Torvalds Date: Sat Feb 4 18:40:51 2023 -0800 Merge tag 'powerpc-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "It's a bit of a big batch for rc6, but just because I didn't send any fixes the last week or two while I was on vacation, next week should be quieter: - Fix a few objtool warnings since we recently enabled objtool. - Fix a deadlock with the hash MMU vs perf record. - Fix perf profiling of asynchronous interrupt handlers. - Revert the IMC PMU nest_init_lock to being a mutex. - Two commits fixing problems with the kexec_file FDT size estimation. - Two commits fixing problems with strict RWX vs kernels running at non-zero. - Reconnect tlb_flush() to hash__tlb_flush() Thanks to Kajol Jain, Nicholas Piggin, Sachin Sant Sathvika Vasireddy, and Sourabh Jain" * tag 'powerpc-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: Reconnect tlb_flush() to hash__tlb_flush() powerpc/kexec_file: Count hot-pluggable memory in FDT estimate powerpc/64s/radix: Fix RWX mapping with relocated kernel powerpc/64s/radix: Fix crash with unaligned relocated kernel powerpc/kexec_file: Fix division by zero in extra size estimation powerpc/imc-pmu: Revert nest_init_lock to being a mutex powerpc/64: Fix perf profiling asynchronous interrupt handlers powerpc/64s: Fix local irq disable when PMIs are disabled powerpc/kvm: Fix unannotated intra-function call warning powerpc/85xx: Fix unannotated intra-function call warning commit 95078069c1e70d1b3b141132d18d0c563acedd0c Merge: db27c22251e7 08279468a294 Author: Linus Torvalds Date: Sat Feb 4 13:46:37 2023 -0800 Merge tag 'rtc-6.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC fixes from Alexandre Belloni: "Here are a few fixes for 6.2. The EFI one is the most important as it allows some RTCs to actually work. The other two are warnings that are worth fixing. - efi: make WAKEUP services optional - sunplus: fix format string warning" * tag 'rtc-6.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: sunplus: fix format string for printing resource dt-bindings: rtc: qcom-pm8xxx: allow 'wakeup-source' property rtc: efi: Enable SET/GET WAKEUP services as optional commit db27c22251e7c8f3a9d5bfb55c9c8c701a70bbb3 Merge: c00f4ddde094 22e46f6480e8 Author: Linus Torvalds Date: Sat Feb 4 11:30:23 2023 -0800 Merge tag 'kbuild-fixes-v6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix two bugs (for building and for signing) when MODULE_SIG_KEY contains a PKCS#11 URI * tag 'kbuild-fixes-v6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: modinst: Fix build error when CONFIG_MODULE_SIG_KEY is a PKCS#11 URI certs: Fix build error when PKCS#11 URI contains semicolon commit c00f4ddde0943cf54499bc380ffca6376af2d945 Merge: 2ab2ba494db2 25b72cf7da9f Author: Linus Torvalds Date: Sat Feb 4 11:21:27 2023 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM64: - Yet another fix for non-CPU accesses to the memory backing the VGICv3 subsystem - A set of fixes for the setlftest checking for the S1PTW behaviour after the fix that went in ealier in the cycle" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: selftests: aarch64: Test read-only PT memory regions KVM: selftests: aarch64: Fix check of dirty log PT write KVM: selftests: aarch64: Do not default to dirty PTE pages on all S1PTWs KVM: selftests: aarch64: Relax userfaultfd read vs. write checks KVM: arm64: Allow no running vcpu on saving vgic3 pending table KVM: arm64: Allow no running vcpu on restoring vgic3 LPI pending status KVM: arm64: Add helper vgic_write_guest_lock() commit 2ab2ba494db2dbfbb541ae27f69317e1c089ea51 Merge: 583472ef2d17 316f1f42b5cc Author: Linus Torvalds Date: Sat Feb 4 11:15:00 2023 -0800 Merge tag 'parisc-for-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc architecture fixes from Helge Deller: - Fix PTRACE_GETREGS/PTRACE_SETREGS for 32-bit userspace on a 64-bit kernel - pdc_iodc_print() dropped chars for newline in strings - Drop constants in favour of PRIV_USER - use safer strscpy() function in pdc_stable driver * tag 'parisc-for-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case parisc: Replace hardcoded value with PRIV_USER constant in ptrace.c parisc: Fix return code of pdc_iodc_print() parisc: pdc_stable: use strscpy() to instead of strncpy() commit 583472ef2d176883596637a690602e6d76c5fee5 Merge: 0136d86b7852 0a2742bf5899 Author: Linus Torvalds Date: Sat Feb 4 10:14:50 2023 -0800 Merge tag 'for-linus' of https://github.com/openrisc/linux Pull OpenRISC mailing list update from Stafford Horne: "The old mailing list for OpenRISC died due to some infrastructure issues and the people in charge decided not to keep it running. We have migrated this and the users over to kernel.org infrastructure. Sending this out now to avoid kernel developers getting lots of bounced mails for using the old list" * tag 'for-linus' of https://github.com/openrisc/linux: MAINTAINERS: Update OpenRISC mailing list commit 25b72cf7da9f0d66eef3979187ddfda98d4efcd0 Merge: c2c46b10d526 08ddbbdf0b55 Author: Paolo Bonzini Date: Sat Feb 4 08:57:43 2023 -0500 Merge tag 'kvmarm-fixes-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.2, take #3 - Yet another fix for non-CPU accesses to the memory backing the VGICv3 subsystem - A set of fixes for the setlftest checking for the S1PTW behaviour after the fix that went in ealier in the cycle commit 2b09d5d364986f724f17001ccfe4126b9b43a0be Author: Samuel Thibault Date: Sun Jan 29 16:17:40 2023 +0100 fbcon: Check font dimension limits blit_x and blit_y are u32, so fbcon currently cannot support fonts larger than 32x32. The 32x32 case also needs shifting an unsigned int, to properly set bit 31, otherwise we get "UBSAN: shift-out-of-bounds in fbcon_set_font", as reported on: http://lore.kernel.org/all/IA1PR07MB98308653E259A6F2CE94A4AFABCE9@IA1PR07MB9830.namprd07.prod.outlook.com Kernel Branch: 6.2.0-rc5-next-20230124 Kernel config: https://drive.google.com/file/d/1F-LszDAizEEH0ZX0HcSR06v5q8FPl2Uv/view?usp=sharing Reproducer: https://drive.google.com/file/d/1mP1jcLBY7vWCNM60OMf-ogw-urQRjNrm/view?usp=sharing Reported-by: Sanan Hasanov Signed-off-by: Samuel Thibault Fixes: 2d2699d98492 ("fbcon: font setting should check limitation of driver") Cc: stable@vger.kernel.org Tested-by: Miko Larsson Reviewed-by: Greg Kroah-Hartman Signed-off-by: Helge Deller drivers/video/fbdev/core/fbcon.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a05e7a67986c6be900f7d3310fa5bb1e0c55bb4c Merge: 69ff53e4a4c9 b69585bfcece Author: Jakub Kicinski Date: Fri Feb 3 19:58:56 2023 -0800 Merge branch 'ionic-code-maintenance' Shannon Nelson says: ==================== ionic: code maintenance These are a few fixes for a hardware bug, a couple of sw bugs, and a little code cleanup. ==================== Link: https://lore.kernel.org/r/20230202215537.69756-1-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit b69585bfceceeffda940906cabfdaee4b47bde92 Author: Allen Hubbe Date: Thu Feb 2 13:55:37 2023 -0800 ionic: missed doorbell workaround In one version of the HW there is a remote possibility that it will miss the doorbell ring. This adds a bit of protection to be sure we don't stall a queue from a missed doorbell. Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling") Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_dev.c | 9 ++- drivers/net/ethernet/pensando/ionic/ionic_dev.h | 12 ++++ drivers/net/ethernet/pensando/ionic/ionic_lif.c | 41 ++++++++++- drivers/net/ethernet/pensando/ionic/ionic_lif.h | 2 + drivers/net/ethernet/pensando/ionic/ionic_main.c | 29 ++++++++ drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 87 +++++++++++++++++++++++- 6 files changed, 176 insertions(+), 4 deletions(-) commit 1fffb0254178de1d4d9e67f467a3460d10680b10 Author: Shannon Nelson Date: Thu Feb 2 13:55:36 2023 -0800 ionic: clear up notifyq alloc commentary Make sure the q+cq alloc for NotifyQ is clearly documented and don't bother with unnecessary local variables. Signed-off-by: Shannon Nelson Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_lif.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit e8797a058466b60fc5a3291b92430c93ba90eaff Author: Neel Patel Date: Thu Feb 2 13:55:35 2023 -0800 ionic: clean interrupt before enabling queue to avoid credit race Clear the interrupt credits before enabling the queue rather than after to be sure that the enabled queue starts at 0 and that we don't wipe away possible credits after enabling the queue. Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling") Signed-off-by: Neel Patel Signed-off-by: Shannon Nelson Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_lif.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 69ff53e4a4c9498eeed7d1441f68a1481dc69251 Author: Heiner Kallweit Date: Thu Feb 2 21:45:36 2023 +0100 net: phy: meson-gxl: use MMD access dummy stubs for GXL, internal PHY Jerome provided the information that also the GXL internal PHY doesn't support MMD register access and EEE. MMD reads return 0xffff, what results in e.g. completely wrong ethtool --show-eee output. Therefore use the MMD dummy stubs. Fixes: d853d145ea3e ("net: phy: add an option to disable EEE advertisement") Suggested-by: Jerome Brunet Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/84432fe4-0be4-bc82-4e5c-557206b40f56@gmail.com Signed-off-by: Jakub Kicinski drivers/net/phy/meson-gxl.c | 2 ++ 1 file changed, 2 insertions(+) commit c9011b028e956c3b6baa6f131d9eec43e4e52020 Author: Radhey Shyam Pandey Date: Thu Feb 2 17:56:19 2023 +0530 net: macb: Perform zynqmp dynamic configuration only for SGMII interface In zynqmp platforms where firmware supports dynamic SGMII configuration but has other non-SGMII ethernet devices, it fails them with no packets received at the RX interface. To fix this behaviour perform SGMII dynamic configuration only for the SGMII phy interface. Fixes: 32cee7818111 ("net: macb: Add zynqmp SGMII dynamic configuration support") Signed-off-by: Radhey Shyam Pandey Reviewed-by: Jiri Pirko Reported-by: Michal Simek Tested-by: Michal Simek Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/1675340779-27499-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/cadence/macb_main.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit cbe83191d40d8925b7a99969d037d2a0caf69294 Author: Qi Zheng Date: Thu Feb 2 17:32:55 2023 +0800 bonding: fix error checking in bond_debug_reregister() 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 Acked-by: Jay Vosburgh Link: https://lore.kernel.org/r/20230202093256.32458-1-zhengqi.arch@bytedance.com Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0136d86b78522bbd5755f8194c97a987f0586ba5 Merge: 7b753a909f42 e02bbac74cdd Author: Linus Torvalds Date: Fri Feb 3 11:35:42 2023 -0800 Merge tag 'block-6.2-2023-02-03' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "A bit bigger than I'd like at this point, but mostly a bunch of little fixes. In detail: - NVMe pull request via Christoph: - Fix a missing queue put in nvmet_fc_ls_create_association (Amit Engel) - Clear queue pointers on tag_set initialization failure (Maurizio Lombardi) - Use workqueue dedicated to authentication (Shin'ichiro Kawasaki) - Fix for an overflow in ublk (Liu) - Fix for leaking a queue reference in block cgroups (Ming) - Fix for a use-after-free in BFQ (Yu)" * tag 'block-6.2-2023-02-03' of git://git.kernel.dk/linux: blk-cgroup: don't update io stat for root cgroup nvme-auth: use workqueue dedicated to authentication nvme: clear the request_queue pointers on failure in nvme_alloc_io_tag_set nvme: clear the request_queue pointers on failure in nvme_alloc_admin_tag_set nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association block: Fix the blk_mq_destroy_queue() documentation block: ublk: extending queue_size to fix overflow block, bfq: fix uaf for bfqq in bic_set_bfqq() commit 9f8b3706eb23bed26f7898af3c6f7fe3858564a1 Author: Bert Karwatzki Date: Thu Feb 2 20:02:36 2023 +0100 drm/amdgpu: fix memory leak in amdgpu_cs_sync_rings amdgpu_sync_get_fence deletes the returned fence from the syncobj, so the refcount of fence needs to lowered to avoid a memory leak. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2360 Reviewed-by: Alex Deucher Tested-by: Mikhail Gavrilov Reviewed-by: Christian König Signed-off-by: Bert Karwatzki Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/3b590ba0f11d24b8c6c39c3d38250129c1116af4.camel@web.de drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7b753a909f426f2789d9db6f357c3d59180a9354 Merge: a0880c33794b a68e564adcaa Author: Linus Torvalds Date: Fri Feb 3 10:34:07 2023 -0800 Merge tag 'ceph-for-6.2-rc7' of https://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A safeguard to prevent the kernel client from further damaging the filesystem after running into a case of an invalid snap trace. The root cause of this metadata corruption is still being investigated but it appears to be stemming from the MDS. As such, this is the best we can do for now" * tag 'ceph-for-6.2-rc7' of https://github.com/ceph/ceph-client: ceph: blocklist the kclient when receiving corrupted snap trace ceph: move mount state enum to super.h commit a0880c33794ba417687822482ffb0d3b797f0a04 Merge: a30df1ea94ad 966d47e1f27c Author: Linus Torvalds Date: Fri Feb 3 10:25:41 2023 -0800 Merge tag 'efi-fixes-for-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: - handle potential mremap() failure gracefully - don't reject EFI memory attributes table version 2 * tag 'efi-fixes-for-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: fix potential NULL deref in efi_mem_reserve_persistent efi: Accept version 2 of memory attributes table commit a30df1ea94ad35c7b42d44199fe1376b4d648862 Merge: bffede38f82c 2f394c0e7d11 Author: Linus Torvalds Date: Fri Feb 3 10:18:39 2023 -0800 Merge tag 'riscv-for-linus-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A build fix to avoid static branches in cpu_relax(), which greatly inflates the jump tables and breaks at least CONFIG_CC_OPTIMIZE_FOR_SIZE=y. - A fix for a kernel panic when probing impossible instruction positions. - A fix to disable unwind tables, which are enabled by default for GCC-13 and result in unhandled relocations in modules. * tag 'riscv-for-linus-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: disable generation of unwind tables riscv: kprobe: Fixup kernel panic when probing an illegal position riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y commit bffede38f82c27cf5e203a2c659fcc9b581dd7b8 Merge: 0c272a1d3396 f1a9e82a1203 Author: Linus Torvalds Date: Fri Feb 3 10:09:55 2023 -0800 Merge tag 'drm-fixes-2023-02-03' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "A few more fixes this week, a bit more spread out though. We have a bunch of nouveau regression and stabilisation fixes, along with usual amdgpu, and i915. Otherwise just some minor misc ones: dma-fence: - fix signaling bit for private fences panel: - boe-tv101wum-nl6 disable fix nouveau: - gm20b acr regression fix - tu102 scrub status fix - tu102 wait for firmware fix i915: - Fixes for potential use-after-free and double-free - GuC locking and refcount fixes - Display's reference clock value fix amdgpu: - GC11 fixes - DCN 3.1.4 fixes - NBIO 4.3 fix - DCN 3.2 fixes - Properly handle additional cases where DCN is not supported - SMU13 fixes vc4: - fix CEC adapter names ssd130x: - fix display init regression" * tag 'drm-fixes-2023-02-03' of git://anongit.freedesktop.org/drm/drm: (23 commits) drm/amd/display: Properly handle additional cases where DCN is not supported drm/amdgpu: Enable vclk dclk node for gc11.0.3 drm/amd: Fix initialization for nbio 4.3.0 drm/amdgpu: enable HDP SD for gfx 11.0.3 drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11 drm/amd/display: Reset DMUB mailbox SW state after HW reset drm/amd/display: Unassign does_plane_fit_in_mall function from dcn3.2 drm/amd/display: Adjust downscaling limits for dcn314 drm/amd/display: Add missing brackets in calculation drm/amdgpu: update wave data type to 3 for gfx11 drm/panel: boe-tv101wum-nl6: Ensure DSI writes succeed during disable drm/nouveau/acr/gm20b: regression fixes drm/nouveau/fb/tu102-: fix register used to determine scrub status drm/nouveau/devinit/tu102-: wait for GFW_BOOT_PROGRESS == COMPLETED drm/i915/adlp: Fix typo for reference clock drm/i915: Fix potential bit_17 double-free drm/i915: Fix up locking around dumping requests lists drm/i915: Fix request ref counting during error capture & debugfs dump drm/i915/guc: Fix locking when searching for a hung request drm/i915: Avoid potential vm use-after-free ... commit 0c272a1d33965627653f4fafd6eab55d0d50f21f Merge: 66a87fff1a87 ac86f547ca10 Author: Linus Torvalds Date: Fri Feb 3 10:01:57 2023 -0800 Merge tag 'mm-hotfixes-stable-2023-02-02-19-24-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "25 hotfixes, mainly for MM. 13 are cc:stable" * tag 'mm-hotfixes-stable-2023-02-02-19-24-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (26 commits) mm: memcg: fix NULL pointer in mem_cgroup_track_foreign_dirty_slowpath() Kconfig.debug: fix the help description in SCHED_DEBUG mm/swapfile: add cond_resched() in get_swap_pages() mm: use stack_depot_early_init for kmemleak Squashfs: fix handling and sanity checking of xattr_ids count sh: define RUNTIME_DISCARD_EXIT highmem: round down the address passed to kunmap_flush_on_unmap() migrate: hugetlb: check for hugetlb shared PMD in node migration mm: hugetlb: proc: check for hugetlb shared PMD in /proc/PID/smaps mm/MADV_COLLAPSE: catch !none !huge !bad pmd lookups Revert "mm: kmemleak: alloc gray object for reserved region with direct map" freevxfs: Kconfig: fix spelling maple_tree: should get pivots boundary by type .mailmap: update e-mail address for Eugen Hristev mm, mremap: fix mremap() expanding for vma's with vm_ops->close() squashfs: harden sanity check in squashfs_read_xattr_id_table ia64: fix build error due to switch case label appearing next to declaration mm: multi-gen LRU: fix crash during cgroup migration Revert "mm: add nodes= arg to memory.reclaim" zsmalloc: fix a race with deferred_handles storing ... commit 966d47e1f27c45507c5df82b2a2157e5a4fd3909 Author: Anton Gusev Date: Fri Feb 3 16:22:13 2023 +0300 efi: fix potential NULL deref in efi_mem_reserve_persistent When iterating on a linked list, a result of memremap is dereferenced without checking it for NULL. This patch adds a check that falls back on allocating a new page in case memremap doesn't succeed. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 18df7577adae ("efi/memreserve: deal with memreserve entries in unmapped memory") Signed-off-by: Anton Gusev [ardb: return -ENOMEM instead of breaking out of the loop] Signed-off-by: Ard Biesheuvel drivers/firmware/efi/efi.c | 2 ++ 1 file changed, 2 insertions(+) commit 4722dd4029c63f10414ffd8d3ffdd6c748391cd7 Author: Dmitry Torokhov Date: Fri Sep 30 09:00:41 2022 -0700 ARM: dts: stihxxx-b2120: fix polarity of reset line of tsin0 port According to c8sectpfe driver code we first drive reset line low and then high to reset the port, therefore the reset line is supposed to be annotated as "active low". This will be important when we convert the driver to gpiod API. Reviewed-by: Patrice Chotard Signed-off-by: Dmitry Torokhov Signed-off-by: Patrice Chotard arch/arm/boot/dts/stihxxx-b2120.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97801cfcf9565247bcc53b67ea47fa87b1704375 Author: Chen-Yu Tsai Date: Thu Feb 2 18:40:14 2023 +0800 arm64: dts: mediatek: mt8195: Fix vdosys* compatible strings When vdosys1 was initially added, it was incorrectly assumed to be compatible with vdosys0, and thus both had the same mt8195-mmsys compatible attached. This has since been corrected in commit b237efd47df7 ("dt-bindings: arm: mediatek: mmsys: change compatible for MT8195") and commit 82219cfbef18 ("dt-bindings: arm: mediatek: mmsys: add vdosys1 compatible for MT8195"). The device tree needs to be fixed as well, otherwise the vdosys1 block fails to work, and causes its dependent power domain controller to not work either. Change the compatible string of vdosys1 to "mediatek,mt8195-vdosys1". While at it, also add the new "mediatek,mt8195-vdosys0" compatible to vdosys0. Fixes: 6aa5b46d1755 ("arm64: dts: mt8195: Add vdosys and vppsys clock nodes") Signed-off-by: Chen-Yu Tsai Tested-by: AngeloGioacchino Del Regno Reviewed-by: AngeloGioacchino Del Regno Acked-by: Matthias Brugger Link: https://lore.kernel.org/r/20230202104014.2931517-1-wenst@chromium.org Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/mediatek/mt8195.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 07975ef0faae2cf49aded78f907c84ee7d238ad6 Merge: 6d796c50f84c b67b09733d8a Author: Arnd Bergmann Date: Fri Feb 3 14:18:41 2023 +0100 Merge tag 'v6.2-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes Fixes to adapt to correct binding behaviour and fixes for devices on some boards Most notably may be the adaption of lower thermal limits for the pinephone pro, where the original hiher ones could result in (possibly permanent) display issues. * tag 'v6.2-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: align rk3399 DMC OPP table with bindings arm64: dts: rockchip: set sdmmc0 speed to sd-uhs-sdr50 on rock-3a arm64: dts: rockchip: fix probe of analog sound card on rock-3a arm64: dts: rockchip: add missing #interrupt-cells to rk356x pcie2x1 arm64: dts: rockchip: fix input enable pinconf on rk3399 ARM: dts: rockchip: add power-domains property to dp node on rk3288 arm64: dts: rockchip: add io domain setting to rk3566-box-demo arm64: dts: rockchip: remove unsupported property from sdmmc2 for rock-3a arm64: dts: rockchip: drop unused LED mode property from rk3328-roc-cc arm64: dts: rockchip: reduce thermal limits on rk3399-pinephone-pro arm64: dts: rockchip: use correct reset names for rk3399 crypto nodes Link: https://lore.kernel.org/r/3514663.mvXUDI8C0e@phil Signed-off-by: Arnd Bergmann commit ce93fdb5f2ca5c9e2a9668411cc39091507f8dc9 Author: Clément Léger Date: Tue Jan 31 11:02:42 2023 +0100 net: phylink: move phy_device_free() to correctly release phy device After calling fwnode_phy_find_device(), the phy device refcount is incremented. Then, when the phy device is attached to a netdev with phy_attach_direct(), the refcount is also incremented but only decremented in the caller if phy_attach_direct() fails. Move phy_device_free() before the "if" to always release it correctly. Indeed, either phy_attach_direct() failed and we don't want to keep a reference to the phydev or it succeeded and a reference has been taken internally. Fixes: 25396f680dd6 ("net: phylink: introduce phylink_fwnode_phy_connect()") Signed-off-by: Clément Léger Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d83d7ed260283560700d4034a80baad46620481b Author: Greg Kroah-Hartman Date: Thu Feb 2 16:15:54 2023 +0100 kernel/irq/irqdomain.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: Thomas Gleixner Cc: stable Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20230202151554.2310273-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman kernel/irq/irqdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6dfb0771429a63db8561d44147f2bb76f93e1c86 Author: Greg Kroah-Hartman Date: Thu Feb 2 15:09:18 2023 +0100 HV: hv_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: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Wei Liu Cc: Dexuan Cui Fixes: d180e0a1be6c ("Drivers: hv: Create debugfs file with hyper-v balloon usage information") Cc: stable Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20230202140918.2289522-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb80242cc679d6397e77d8a964deeb3ff218d2b5 Author: Liu Shixin Date: Wed Dec 7 10:50:38 2022 +0800 riscv: stacktrace: Fix missing the first frame When running kfence_test, I found some testcases failed like this: # test_out_of_bounds_read: EXPECTATION FAILED at mm/kfence/kfence_test.c:346 Expected report_matches(&expect) to be true, but is false not ok 1 - test_out_of_bounds_read The corresponding call-trace is: BUG: KFENCE: out-of-bounds read in kunit_try_run_case+0x38/0x84 Out-of-bounds read at 0x(____ptrval____) (32B right of kfence-#10): kunit_try_run_case+0x38/0x84 kunit_generic_run_threadfn_adapter+0x12/0x1e kthread+0xc8/0xde ret_from_exception+0x0/0xc The kfence_test using the first frame of call trace to check whether the testcase is succeed or not. Commit 6a00ef449370 ("riscv: eliminate unreliable __builtin_frame_address(1)") skip first frame for all case, which results the kfence_test failed. Indeed, we only need to skip the first frame for case (task==NULL || task==current). With this patch, the call-trace will be: BUG: KFENCE: out-of-bounds read in test_out_of_bounds_read+0x88/0x19e Out-of-bounds read at 0x(____ptrval____) (1B left of kfence-#7): test_out_of_bounds_read+0x88/0x19e kunit_try_run_case+0x38/0x84 kunit_generic_run_threadfn_adapter+0x12/0x1e kthread+0xc8/0xde ret_from_exception+0x0/0xc Fixes: 6a00ef449370 ("riscv: eliminate unreliable __builtin_frame_address(1)") Signed-off-by: Liu Shixin Tested-by: Samuel Holland Link: https://lore.kernel.org/r/20221207025038.1022045-1-liushixin2@huawei.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/stacktrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f1a9e82a1203802df3c917dd7ab1b5a5ded55793 Merge: 74d6c8ea183e 6fc547a5a2ef Author: Dave Airlie Date: Fri Feb 3 13:28:05 2023 +1000 Merge tag 'amd-drm-fixes-6.2-2023-02-01' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.2-2023-02-01: amdgpu: - GC11 fixes - DCN 3.1.4 fixes - NBIO 4.3 fix - DCN 3.2 fixes - Properly handle additional cases where DCN is not supported - SMU13 fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230202042309.24144-1-alexander.deucher@amd.com commit 74d6c8ea183e73031db635a96f67bc30ae1fc2ee Merge: abf301e14e42 47a2bd9d985b Author: Dave Airlie Date: Fri Feb 3 12:28:28 2023 +1000 Merge tag 'drm-intel-fixes-2023-02-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fixes for potential use-after-free and double-free (Rob) - GuC locking and refcount fixes (John) - Display's reference clock value fix (Chaitanya) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y9u5pHjOYcxzS5Z7@intel.com commit abf301e14e42702c11ab20331aa4d0ab87a777ca Merge: 6d796c50f84c a3ee9e0b57f8 Author: Dave Airlie Date: Fri Feb 3 11:57:23 2023 +1000 Merge tag 'drm-misc-fixes-2023-02-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes A fix for a non-unique CEC adapter name registration in vc4, a regression breaking the display in ssd130x, a signaling bit issue in dma-fence, a couple of fixes in nouveau for Turing and Ampere, and a disable fix for the boe-tv101wum-nl6 panel. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230202085724.pz22m7bmei3wyuzp@houat commit 66a87fff1a87c260452f5a57123891ca5258c449 Merge: edb9b8f380c3 69f2c9346313 Author: Linus Torvalds Date: Thu Feb 2 16:44:07 2023 -0800 Merge tag 'ata-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull libata fix from Damien Le Moal: "Fix device probe issues with some combination of adapters & devices that do not report a current link speed, leading to device probe failures if a link speed was not previously reported and saved (me)" * tag 'ata-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: libata: Fix sata_down_spd_limit() when no link speed is reported commit 707344c8a188bb1d6704d3546229fc7a07c01a63 Author: Lad Prabhakar Date: Mon Jan 30 23:43:35 2023 +0000 dt-bindings: interrupt-controller: arm,gic-v3: Fix typo in description of msi-controller property Fix typo functionnality -> functionality. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20230130234335.13952-1-prabhakar.csengg@gmail.com Signed-off-by: Rob Herring Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08f379d98731a7014ee6987508d1228cb56ce694 Author: Andy Shevchenko Date: Fri Jan 27 17:02:25 2023 +0200 dt-bindings: Fix .gitignore The tracked files should not be ignored. Fixes: 44ec8b20d1e9 ("dt-bindings: Add running yamllint to dt_binding_check") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230127150225.18148-1-andriy.shevchenko@linux.intel.com Signed-off-by: Rob Herring Documentation/devicetree/bindings/.gitignore | 5 +++++ 1 file changed, 5 insertions(+) commit f6933c01e42d2fc83b9133ed755609e4aac6eadd Author: Mark Brown Date: Sat Jan 28 17:47:50 2023 +0000 of/address: Return an error when no valid dma-ranges are found Commit 7a8b64d17e35 ("of/address: use range parser for of_dma_get_range") converted the parsing of dma-range properties to use code shared with the PCI range parser. The intent was to introduce no functional changes however in the case where we fail to translate the first resource instead of returning -EINVAL the new code we return 0. Restore the previous behaviour by returning an error if we find no valid ranges, the original code only handled the first range but subsequently support for parsing all supplied ranges was added. This avoids confusing code using the parsed ranges which doesn't expect to successfully parse ranges but have only a list terminator returned, this fixes breakage with so far as I can tell all DMA for on SoC devices on the Socionext Synquacer platform which has a firmware supplied DT. A bisect identified the original conversion as triggering the issues there. Fixes: 7a8b64d17e35 ("of/address: use range parser for of_dma_get_range") Signed-off-by: Mark Brown Cc: Luca Di Stefano Cc: 993612@bugs.debian.org Cc: stable@kernel.org Link: https://lore.kernel.org/r/20230126-synquacer-boot-v2-1-cb80fd23c4e2@kernel.org Signed-off-by: Rob Herring drivers/of/address.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 241d2fb56a18473af5f2ff0d512992a996eb64dd Author: Michal Suchanek Date: Wed Feb 1 10:22:47 2023 -0600 of: Make OF framebuffer device names unique Since Linux 5.19 this error is observed: sysfs: cannot create duplicate filename '/devices/platform/of-display' This is because multiple devices with the same name 'of-display' are created on the same bus. Update the code to create numbered device names for the displays. Also, fix a node refcounting issue when exiting the boot display loop. cc: linuxppc-dev@lists.ozlabs.org References: https://bugzilla.kernel.org/show_bug.cgi?id=216095 Fixes: 52b1b46c39ae ("of: Create platform devices for OF framebuffers") Reported-by: Erhard F. Suggested-by: Thomas Zimmermann Signed-off-by: Michal Suchanek Link: https://lore.kernel.org/r/20230201162247.3575506-1-robh@kernel.org [robh: Rework to avoid node refcount leaks] Signed-off-by: Rob Herring drivers/of/platform.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit edb9b8f380c3413bf783475279b1a941c7e5cec1 Merge: e7368fd30165 9983a2c98653 Author: Linus Torvalds Date: Thu Feb 2 14:03:31 2023 -0800 Merge tag 'net-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bpf, can and netfilter. Current release - regressions: - phy: fix null-deref in phy_attach_direct - mac802154: fix possible double free upon parsing error Previous releases - regressions: - bpf: preserve reg parent/live fields when copying range info, prevent mis-verification of programs as safe - ip6: fix GRE tunnels not generating IPv6 link local addresses - phy: dp83822: fix null-deref on DP83825/DP83826 devices - sctp: do not check hb_timer.expires when resetting hb_timer - eth: mtk_sock: fix SGMII configuration after phylink conversion Previous releases - always broken: - eth: xdp: execute xdp_do_flush() before napi_complete_done() - skb: do not mix page pool and page referenced frags in GRO - bpf: - fix a possible task gone issue with bpf_send_signal[_thread]() - fix an off-by-one bug in bpf_mem_cache_idx() to select the right cache - add missing btf_put to register_btf_id_dtor_kfuncs - sockmap: fon't let sock_map_{close,destroy,unhash} call itself - gso: fix null-deref in skb_segment_list() - mctp: purge receive queues on sk destruction - fix UaF caused by accept on already connected socket in exotic socket families - tls: don't treat list head as an entry in tls_is_tx_ready() - netfilter: br_netfilter: disable sabotage_in hook after first suppression - wwan: t7xx: fix runtime PM implementation Misc: - MAINTAINERS: spring cleanup of networking maintainers" * tag 'net-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (65 commits) 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() selftests: net: udpgso_bench_tx: Cater for pending datagrams zerocopy benchmarking selftests: net: udpgso_bench: Fix racing bug between the rx/tx programs selftests: net: udpgso_bench_rx/tx: Stop when wrong CLI args are provided selftests: net: udpgso_bench_rx: Fix 'used uninitialized' compiler warning can: mcp251xfd: mcp251xfd_ring_set_ringparam(): assign missing tx_obj_num_coalesce_irq can: isotp: split tx timer into transmission and timeout can: isotp: handle wait_event_interruptible() return values can: raw: fix CAN FD frame transmissions over CAN XL devices can: j1939: fix errant WARN_ON_ONCE in j1939_session_deactivate hv_netvsc: Fix missed pagebuf entries in netvsc_dma_map/unmap() ... commit 3e46d910d8acf94e5360126593b68bf4fee4c4a1 Author: Shiju Jose Date: Thu Feb 2 18:23:09 2023 +0000 tracing: Fix poll() and select() do not work on per_cpu trace_pipe and trace_pipe_raw poll() and select() on per_cpu trace_pipe and trace_pipe_raw do not work since kernel 6.1-rc6. This issue is seen after the commit 42fb0a1e84ff525ebe560e2baf9451ab69127e2b ("tracing/ring-buffer: Have polling block on watermark"). This issue is firstly detected and reported, when testing the CXL error events in the rasdaemon and also erified using the test application for poll() and select(). This issue occurs for the per_cpu case, when calling the ring_buffer_poll_wait(), in kernel/trace/ring_buffer.c, with the buffer_percent > 0 and then wait until the percentage of pages are available. The default value set for the buffer_percent is 50 in the kernel/trace/trace.c. As a fix, allow userspace application could set buffer_percent as 0 through the buffer_percent_fops, so that the task will wake up as soon as data is added to any of the specific cpu buffer. Link: https://lore.kernel.org/linux-trace-kernel/20230202182309.742-2-shiju.jose@huawei.com Cc: Cc: Cc: Cc: stable@vger.kernel.org Fixes: 42fb0a1e84ff5 ("tracing/ring-buffer: Have polling block on watermark") Signed-off-by: Shiju Jose Signed-off-by: Steven Rostedt (Google) kernel/trace/trace.c | 3 --- 1 file changed, 3 deletions(-) commit e7368fd30165ced757d64da48e2091c83815ce5c Merge: 42c78a5b29c4 254c71374a70 Author: Linus Torvalds Date: Thu Feb 2 13:08:18 2023 -0800 Merge tag 'linux-kselftest-kunit-fixes-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit fixes from Shuah Khan: "Three fixes to bugs that cause kernel crash, link error during build, and a third to fix kunit_test_init_section_suites() extra indirection issue" * tag 'linux-kselftest-kunit-fixes-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: fix kunit_test_init_section_suites(...) kunit: fix bug in KUNIT_EXPECT_MEMEQ kunit: Export kunit_running() commit 42c78a5b29c47ad913993bcf845bfc39e2ed8c8b Merge: addfba11b314 5efb648042a1 Author: Linus Torvalds Date: Thu Feb 2 13:02:45 2023 -0800 Merge tag 'soc-fixes-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "The majority of bugfixes is once more for the NXP i.MX platform, addressing issue with i.MX8M (UART, watchdog and ethernet) as well as imx8dxl power button and the USB modem on an imx7 board. The reason that i.MX always shows up here is obviously not that they are more buggy than the others, but they have the most boards and are good about getting fixes in quickly. The other DT fixes are for the Nuvoton wpcm450 flash controller and the i2c mux on an ASpeed board. Lastly, there are updates to the MAINTAINERS entries for Mediatek, AMD/Seattle and NXP SoCs, as well as a lone code fix for error handling in the allwinner 'rsb' bus driver" * tag 'soc-fixes-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: dts: wpcm450: Add nuvoton,shm = <&shm> to FIU node MAINTAINERS: Update entry for MediaTek SoC support MAINTAINERS: amd: drop inactive Brijesh Singh ARM: dts: imx7d-smegw01: Fix USB host over-current polarity arm64: dts: imx8mm-verdin: Do not power down eth-phy MAINTAINERS: match freescale ARM64 DT directory in i.MX entry arm64: dts: imx8mm: Fix pad control for UART1_DTE_RX ARM: dts: aspeed: Fix pca9849 compatible arm64: dts: freescale: imx8dxl: fix sc_pwrkey's property name linux,keycode arm64: dts: imx8m-venice: Remove incorrect 'uart-has-rtscts' arm64: dts: imx8mm: Reinstate GPIO watchdog always-running property on eDM SBC bus: sunxi-rsb: Fix error handling in sunxi_rsb_init() commit addfba11b314824e3b4fb70448b339dcb21be5bf Merge: 870bb7656ab2 7ab41c2c08a3 Author: Linus Torvalds Date: Thu Feb 2 12:52:47 2023 -0800 Merge tag 's390-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Heiko Carstens: - With CONFIG_VMAP_STACK enabled it is not possible to load the s390 specific diag288_wdt watchdog module. The reason is that a pointer to a string is passed to an inline assembly; this string however is located on the stack, while the instruction within the inline assembly expects a physicial address. Fix this by copying the string to a kmalloc'ed buffer. - The diag288_wdt watchdog module does not indicate that it accesses memory from an inline assembly, which it does. Add "memory" to the clobber list to prevent the compiler from optimizing code incorrectly away. - Pass size of the uncompressed kernel image to __decompress() call. Otherwise the kernel image decompressor may corrupt/overwrite an initrd. This was reported to happen on s390 after commit 2aa14b1ab2c4 ("zstd: import usptream v1.5.2"). * tag 's390-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/decompressor: specify __decompress() buf len to avoid overflow watchdog: diag288_wdt: fix __diag288() inline assembly watchdog: diag288_wdt: do not use stack buffers for hardware data commit 870bb7656ab247c000e9627e0da0db7ef8e9cf0c Merge: 9f266ccaa2f5 eecf2acd4a58 Author: Linus Torvalds Date: Thu Feb 2 12:47:08 2023 -0800 Merge tag 'platform-drivers-x86-v6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "A set of AMD PMF fixes + a few other small fixes" * tag 'platform-drivers-x86-v6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: touchscreen_dmi: Add Chuwi Vi8 (CWI501) DMI match platform/x86: thinkpad_acpi: Fix thinklight LED brightness returning 255 platform/x86/amd: pmc: add CONFIG_SERIO dependency platform/x86/amd/pmf: Ensure mutexes are initialized before use platform/x86/amd/pmf: Fix to update SPS thermals when power supply change platform/x86/amd/pmf: Fix to update SPS default pprof thermals platform/x86/amd/pmf: update to auto-mode limits only after AMT event platform/x86/amd/pmf: Add helper routine to check pprof is balanced platform/x86/amd/pmf: Add helper routine to update SPS thermals commit 9983a2c986534db004b50d95b7fe64bb9b925dca Merge: b0de13d3070b 3337a6e04ddf Author: Jakub Kicinski Date: Thu Feb 2 11:55:55 2023 -0800 Merge branch 'fixes-for-mtk_eth_soc' Bjørn Mork says: ==================== Fix mtk_eth_soc sgmii configuration. This has been tested on a MT7986 with a Maxlinear GPY211C phy permanently attached to the second SoC mac. ==================== Link: https://lore.kernel.org/r/20230201182331.943411-1-bjorn@mork.no Signed-off-by: Jakub Kicinski commit 3337a6e04ddf2923a1bdcf3d31b3b52412bf82dd Author: Alexander Couzens Date: Wed Feb 1 19:23:31 2023 +0100 mtk_sgmii: enable PCS polling to allow SFP work Currently there is no IRQ handling (even the SGMII supports it). Enable polling to support SFP ports. Fixes: 14a44ab0330d ("net: mtk_eth_soc: partially convert to phylink_pcs") Reviewed-by: Russell King (Oracle) Signed-off-by: Alexander Couzens [ bmork: changed "1" => "true" ] Signed-off-by: Bjørn Mork Acked-by: Daniel Golle Tested-by: Daniel Golle Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_sgmii.c | 1 + 1 file changed, 1 insertion(+) commit 9d32637122de88f1ef614c29703f0e050cad342e Author: Bjørn Mork Date: Wed Feb 1 19:23:30 2023 +0100 net: mediatek: sgmii: fix duplex configuration The logic of the duplex bit is inverted. Setting it means half duplex, not full duplex. Fix and rename macro to avoid confusion. Fixes: 7e538372694b ("net: ethernet: mediatek: Re-add support SGMII") Reviewed-by: Russell King (Oracle) Signed-off-by: Bjørn Mork Acked-by: Daniel Golle Tested-by: Daniel Golle Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +- drivers/net/ethernet/mediatek/mtk_sgmii.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7ff82416de8295c61423ef6fd75f052d3837d2f7 Author: Alexander Couzens Date: Wed Feb 1 19:23:29 2023 +0100 net: mediatek: sgmii: ensure the SGMII PHY is powered down on configuration The code expect the PHY to be in power down which is only true after reset. Allow changes of the SGMII parameters more than once. Only power down when reconfiguring to avoid bouncing the link when there's no reason to - based on code from Russell King. There are cases when the SGMII_PHYA_PWD register contains 0x9 which prevents SGMII from working. The SGMII still shows link but no traffic can flow. Writing 0x0 to the PHYA_PWD register fix the issue. 0x0 was taken from a good working state of the SGMII interface. Fixes: 42c03844e93d ("net-next: mediatek: add support for MediaTek MT7622 SoC") Suggested-by: Russell King (Oracle) Signed-off-by: Alexander Couzens [ bmork: rebased and squashed into one patch ] Reviewed-by: Russell King (Oracle) Signed-off-by: Bjørn Mork Acked-by: Daniel Golle Tested-by: Daniel Golle Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 ++ drivers/net/ethernet/mediatek/mtk_sgmii.c | 39 +++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 11 deletions(-) commit b0de13d3070bb1daab6e0d9410309fa5fa9d6295 Merge: 4b6e135e6bee 1613fff7a32e Author: Jakub Kicinski Date: Thu Feb 2 11:51:24 2023 -0800 Merge tag 'linux-can-fixes-for-6.2-20230202' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== can 2023-02-02 The first patch is by Ziyang Xuan and removes a errant WARN_ON_ONCE() in the CAN J1939 protocol. The next 3 patches are by Oliver Hartkopp. The first 2 target the CAN ISO-TP protocol and fix the state machine with respect to signals and a regression found by the syzbot. The last patch is by me an missing assignment during the ethtool ring configuration callback. * tag 'linux-can-fixes-for-6.2-20230202' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: mcp251xfd: mcp251xfd_ring_set_ringparam(): assign missing tx_obj_num_coalesce_irq can: isotp: split tx timer into transmission and timeout can: isotp: handle wait_event_interruptible() return values can: raw: fix CAN FD frame transmissions over CAN XL devices can: j1939: fix errant WARN_ON_ONCE in j1939_session_deactivate ==================== Link: https://lore.kernel.org/r/20230202094135.2293939-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 4b6e135e6bee02e29d27911ba0b9a045c9e489e8 Merge: 0c598aed445e cd101f40a419 Author: Jakub Kicinski Date: Thu Feb 2 11:35:35 2023 -0800 Merge branch 'maintainers-spring-refresh-of-networking-maintainers' Jakub Kicinski says: ==================== MAINTAINERS: spring refresh of networking maintainers Use Jon Corbet's script for generating statistics about maintainer coverage to identify inactive maintainers of relatively active code. Move them to CREDITS. ==================== Link: https://lore.kernel.org/r/20230201182014.2362044-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit cd101f40a419f72d54b517bc51ca710bc5b07d55 Author: Jakub Kicinski Date: Wed Feb 1 10:20:14 2023 -0800 MAINTAINERS: update SCTP maintainers Vlad has stepped away from SCTP related duties. Move him to CREDITS and add Xin Long. Subsystem SCTP PROTOCOL Changes 237 / 629 (37%) Last activity: 2022-12-12 Vlad Yasevich : Neil Horman : Author 20a785aa52c8 2020-05-19 00:00:00 4 Tags 20a785aa52c8 2020-05-19 00:00:00 84 Marcelo Ricardo Leitner : Author 557fb5862c92 2021-07-28 00:00:00 41 Tags da05cecc4939 2022-12-12 00:00:00 197 Top reviewers: [15]: lucien.xin@gmail.com INACTIVE MAINTAINER Vlad Yasevich Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski CREDITS | 4 ++++ MAINTAINERS | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit c71a70c267eb40455489c0df10ca986e3969b007 Author: Jakub Kicinski Date: Wed Feb 1 10:20:13 2023 -0800 MAINTAINERS: ipv6: retire Hideaki Yoshifuji We very rarely hear from Hideaki Yoshifuji and the IPv4/IPv6 entry covers a lot of code. Asking people to CC someone who rarely responds feels wrong. Note that Hideaki Yoshifuji already has an entry in CREDITS for IPv6 so not adding another one. Cc: Hideaki YOSHIFUJI Signed-off-by: Jakub Kicinski MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit a35965625649b5b65153d51aed466c4b3008ce2e Author: Jakub Kicinski Date: Wed Feb 1 10:20:12 2023 -0800 mailmap: add John Crispin's entry John has not been CCed on some of the fixes which perhaps resulted in the lack of review tags: Subsystem MEDIATEK ETHERNET DRIVER Changes 50 / 295 (16%) Last activity: 2023-01-17 Felix Fietkau : Author 8bd8dcc5e47f 2022-11-18 00:00:00 33 Tags 8bd8dcc5e47f 2022-11-18 00:00:00 38 John Crispin : Sean Wang : Author 880c2d4b2fdf 2019-06-03 00:00:00 7 Tags a5d75538295b 2020-04-07 00:00:00 10 Mark Lee : Author 8d66a8183d0c 2019-11-14 00:00:00 4 Tags 8d66a8183d0c 2019-11-14 00:00:00 4 Lorenzo Bianconi : Author 08a764a7c51b 2023-01-17 00:00:00 68 Tags 08a764a7c51b 2023-01-17 00:00:00 74 Top reviewers: [12]: leonro@nvidia.com [6]: f.fainelli@gmail.com [6]: andrew@lunn.ch INACTIVE MAINTAINER John Crispin map his old address to the up to date one. Acked-by: John Crispin Signed-off-by: Jakub Kicinski .mailmap | 1 + 1 file changed, 1 insertion(+) commit 57b24f8c30a0bdbe851f4a181d9c9c29f077e0a2 Author: Jakub Kicinski Date: Wed Feb 1 10:20:11 2023 -0800 MAINTAINERS: bonding: move Veaceslav Falico to CREDITS Veaceslav has stepped away from netdev: Subsystem BONDING DRIVER Changes 96 / 319 (30%) Last activity: 2022-12-01 Jay Vosburgh : Author 4f5d33f4f798 2022-08-11 00:00:00 3 Tags e5214f363dab 2022-12-01 00:00:00 48 Veaceslav Falico : Andy Gospodarek : Tags 47f706262f1d 2019-02-24 00:00:00 4 Top reviewers: [42]: jay.vosburgh@canonical.com [18]: jiri@nvidia.com [10]: jtoppins@redhat.com INACTIVE MAINTAINER Veaceslav Falico Signed-off-by: Jakub Kicinski CREDITS | 4 ++++ MAINTAINERS | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) commit 0c598aed445eb45b0ee7ba405f7ece99ee349c30 Author: Fedor Pchelkin Date: Thu Feb 2 00:02:18 2023 +0300 net: openvswitch: fix flow memory leak in ovs_flow_cmd_new Syzkaller reports a memory leak of new_flow in ovs_flow_cmd_new() as it is not freed when an allocation of a key fails. BUG: memory leak unreferenced object 0xffff888116668000 (size 632): comm "syz-executor231", pid 1090, jiffies 4294844701 (age 18.871s) 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: [<00000000defa3494>] kmem_cache_zalloc include/linux/slab.h:654 [inline] [<00000000defa3494>] ovs_flow_alloc+0x19/0x180 net/openvswitch/flow_table.c:77 [<00000000c67d8873>] ovs_flow_cmd_new+0x1de/0xd40 net/openvswitch/datapath.c:957 [<0000000010a539a8>] genl_family_rcv_msg_doit+0x22d/0x330 net/netlink/genetlink.c:739 [<00000000dff3302d>] genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] [<00000000dff3302d>] genl_rcv_msg+0x328/0x590 net/netlink/genetlink.c:800 [<000000000286dd87>] netlink_rcv_skb+0x153/0x430 net/netlink/af_netlink.c:2515 [<0000000061fed410>] genl_rcv+0x24/0x40 net/netlink/genetlink.c:811 [<000000009dc0f111>] netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] [<000000009dc0f111>] netlink_unicast+0x545/0x7f0 net/netlink/af_netlink.c:1339 [<000000004a5ee816>] netlink_sendmsg+0x8e7/0xde0 net/netlink/af_netlink.c:1934 [<00000000482b476f>] sock_sendmsg_nosec net/socket.c:651 [inline] [<00000000482b476f>] sock_sendmsg+0x152/0x190 net/socket.c:671 [<00000000698574ba>] ____sys_sendmsg+0x70a/0x870 net/socket.c:2356 [<00000000d28d9e11>] ___sys_sendmsg+0xf3/0x170 net/socket.c:2410 [<0000000083ba9120>] __sys_sendmsg+0xe5/0x1b0 net/socket.c:2439 [<00000000c00628f8>] do_syscall_64+0x30/0x40 arch/x86/entry/common.c:46 [<000000004abfdcf4>] entry_SYSCALL_64_after_hwframe+0x61/0xc6 To fix this the patch rearranges the goto labels to reflect the order of object allocations and adds appropriate goto statements on the error paths. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 68bb10101e6b ("openvswitch: Fix flow lookup to use unmasked key") Signed-off-by: Fedor Pchelkin Signed-off-by: Alexey Khoroshilov Acked-by: Eelco Chaudron Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230201210218.361970-1-pchelkin@ispras.ru Signed-off-by: Jakub Kicinski net/openvswitch/datapath.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a1f47752fd6275b2502fb075945022d6cf264855 Author: Arınç ÜNAL Date: Sat Jan 28 12:42:32 2023 +0300 net: ethernet: mtk_eth_soc: disable hardware DSA untagging for second MAC According to my tests on MT7621AT and MT7623NI SoCs, hardware DSA untagging won't work on the second MAC. Therefore, disable this feature when the second MAC of the MT7621 and MT7623 SoCs is being used. Fixes: 2d7605a72906 ("net: ethernet: mtk_eth_soc: enable hardware DSA untagging") Link: https://lore.kernel.org/netdev/6249fc14-b38a-c770-36b4-5af6d41c21d3@arinc9.com/ Tested-by: Arınç ÜNAL Signed-off-by: Arınç ÜNAL Link: https://lore.kernel.org/r/20230128094232.2451947-1-arinc.unal@arinc9.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 63b114042d8a9c02d9939889177c36dbdb17a588 Author: Parav Pandit Date: Thu Feb 2 18:35:16 2023 +0200 virtio-net: Keep stop() to follow mirror sequence of open() Cited commit in fixes tag frees rxq xdp info while RQ NAPI is still enabled and packet processing may be ongoing. Follow the mirror sequence of open() in the stop() callback. This ensures that when rxq info is unregistered, no rx packet processing is ongoing. Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") Acked-by: Michael S. Tsirkin Reviewed-by: Jiri Pirko Signed-off-by: Parav Pandit Link: https://lore.kernel.org/r/20230202163516.12559-1-parav@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e02bbac74cdde25f71a80978f5daa1d8a0aa6fc3 Merge: 0416f3be58c6 bd97a59da6a8 Author: Jens Axboe Date: Thu Feb 2 11:02:12 2023 -0700 Merge tag 'nvme-6.2-2023-02-02' of git://git.infradead.org/nvme into block-6.2 Pul NVMe fixes from Christoph: "nvme fixes for Linux 6.2 - fix a missing queue put in nvmet_fc_ls_create_association (Amit Engel) - clear queue pointers on tag_set initialization failure (Maurizio Lombardi) - use workqueue dedicated to authentication (Shin'ichiro Kawasaki)" * tag 'nvme-6.2-2023-02-02' of git://git.infradead.org/nvme: nvme-auth: use workqueue dedicated to authentication nvme: clear the request_queue pointers on failure in nvme_alloc_io_tag_set nvme: clear the request_queue pointers on failure in nvme_alloc_admin_tag_set nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association commit 636ab417a7aec4ee993916e688eb5c5977570836 Author: Ard Biesheuvel Date: Thu Feb 2 18:30:06 2023 +0100 efi: Accept version 2 of memory attributes table UEFI v2.10 introduces version 2 of the memory attributes table, which turns the reserved field into a flags field, but is compatible with version 1 in all other respects. So let's not complain about version 2 if we encounter it. Cc: Signed-off-by: Ard Biesheuvel drivers/firmware/efi/memattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e7c6652f9b86c01cbd4e988057a746a3a461969 Author: V sujith kumar Reddy Date: Fri Feb 3 18:02:52 2023 +0530 ASoC: SOF: amd: Fix for handling spurious interrupts from DSP As interrupts are Level-triggered,unless and until we deassert the register the interrupts are generated which causes spurious interrupts unhandled. Now we deasserted the interrupt at top half which solved the below "nobody cared" warning. warning reported in dmesg: irq 80: nobody cared (try booting with the "irqpoll" option) CPU: 5 PID: 2735 Comm: irq/80-AudioDSP Not tainted 5.15.86-15817-g4c19f3e06d49 #1 1bd3fd932cf58caacc95b0504d6ea1e3eab22289 Hardware name: Google Skyrim/Skyrim, BIOS Google_Skyrim.15303.0.0 01/03/2023 Call Trace: dump_stack_lvl+0x69/0x97 __report_bad_irq+0x3a/0xae note_interrupt+0x1a9/0x1e3 handle_irq_event_percpu+0x4b/0x6e handle_irq_event+0x36/0x5b handle_fasteoi_irq+0xae/0x171 __common_interrupt+0x48/0xc4 handlers: acp_irq_handler [snd_sof_amd_acp] threaded [<000000007e089f34>] acp_irq_thread [snd_sof_amd_acp] Disabling IRQ #80 Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20230203123254.1898794-1-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown sound/soc/sof/amd/acp.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) commit a68e564adcaa69b0930809fb64d9d5f7d9c32ba9 Author: Xiubo Li Date: Wed Feb 1 09:36:45 2023 +0800 ceph: blocklist the kclient when receiving corrupted snap trace When received corrupted snap trace we don't know what exactly has happened in MDS side. And we shouldn't continue IOs and metadatas access to MDS, which may corrupt or get incorrect contents. This patch will just block all the further IO/MDS requests immediately and then evict the kclient itself. The reason why we still need to evict the kclient just after blocking all the further IOs is that the MDS could revoke the caps faster. Link: https://tracker.ceph.com/issues/57686 Signed-off-by: Xiubo Li Reviewed-by: Venky Shankar Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 17 +++++++++++++++-- fs/ceph/caps.c | 16 +++++++++++++--- fs/ceph/file.c | 3 +++ fs/ceph/mds_client.c | 30 +++++++++++++++++++++++++++--- fs/ceph/snap.c | 36 ++++++++++++++++++++++++++++++++++-- fs/ceph/super.h | 1 + 6 files changed, 93 insertions(+), 10 deletions(-) commit b38b17b6a01ca4e738af097a1529910646ef4270 Author: Xiubo Li Date: Wed Feb 1 09:36:44 2023 +0800 ceph: move mount state enum to super.h These flags are only used in ceph filesystem in fs/ceph, so just move it to the place it should be. Signed-off-by: Xiubo Li Reviewed-by: Venky Shankar Signed-off-by: Ilya Dryomov fs/ceph/super.h | 10 ++++++++++ include/linux/ceph/libceph.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 329c9cd769c2e306957df031efff656c40922c76 Author: Andrei Gherzan Date: Wed Feb 1 00:16:16 2023 +0000 selftests: net: udpgso_bench_tx: Cater for pending datagrams zerocopy benchmarking The test tool can check that the zerocopy number of completions value is valid taking into consideration the number of datagram send calls. This can catch the system into a state where the datagrams are still in the system (for example in a qdisk, waiting for the network interface to return a completion notification, etc). This change adds a retry logic of computing the number of completions up to a configurable (via CLI) timeout (default: 2 seconds). Fixes: 79ebc3c26010 ("net/udpgso_bench_tx: options to exercise TX CMSG") Signed-off-by: Andrei Gherzan Cc: Willem de Bruijn Cc: Paolo Abeni Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20230201001612.515730-4-andrei.gherzan@canonical.com Signed-off-by: Paolo Abeni tools/testing/selftests/net/udpgso_bench_tx.c | 34 +++++++++++++++++++++------ 1 file changed, 27 insertions(+), 7 deletions(-) commit dafe93b9ee21028d625dce347118b82659652eff Author: Andrei Gherzan Date: Wed Feb 1 00:16:14 2023 +0000 selftests: net: udpgso_bench: Fix racing bug between the rx/tx programs "udpgro_bench.sh" invokes udpgso_bench_rx/udpgso_bench_tx programs subsequently and while doing so, there is a chance that the rx one is not ready to accept socket connections. This racing bug could fail the test with at least one of the following: ./udpgso_bench_tx: connect: Connection refused ./udpgso_bench_tx: sendmsg: Connection refused ./udpgso_bench_tx: write: Connection refused This change addresses this by making udpgro_bench.sh wait for the rx program to be ready before firing off the tx one - up to a 10s timeout. Fixes: 3a687bef148d ("selftests: udp gso benchmark") Signed-off-by: Andrei Gherzan Cc: Paolo Abeni Cc: Willem de Bruijn Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20230201001612.515730-3-andrei.gherzan@canonical.com Signed-off-by: Paolo Abeni tools/testing/selftests/net/udpgso_bench.sh | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit db9b47ee9f5f375ab0c5daeb20321c75b4fa657d Author: Andrei Gherzan Date: Wed Feb 1 00:16:12 2023 +0000 selftests: net: udpgso_bench_rx/tx: Stop when wrong CLI args are provided Leaving unrecognized arguments buried in the output, can easily hide a CLI/script typo. Avoid this by exiting when wrong arguments are provided to the udpgso_bench test programs. Fixes: 3a687bef148d ("selftests: udp gso benchmark") Signed-off-by: Andrei Gherzan Cc: Willem de Bruijn Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20230201001612.515730-2-andrei.gherzan@canonical.com Signed-off-by: Paolo Abeni tools/testing/selftests/net/udpgso_bench_rx.c | 2 ++ tools/testing/selftests/net/udpgso_bench_tx.c | 2 ++ 2 files changed, 4 insertions(+) commit c03c80e3a03ffb4f790901d60797e9810539d946 Author: Andrei Gherzan Date: Wed Feb 1 00:16:10 2023 +0000 selftests: net: udpgso_bench_rx: Fix 'used uninitialized' compiler warning This change fixes the following compiler warning: /usr/include/x86_64-linux-gnu/bits/error.h:40:5: warning: ‘gso_size’ may be used uninitialized [-Wmaybe-uninitialized] 40 | __error_noreturn (__status, __errnum, __format, __va_arg_pack ()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ udpgso_bench_rx.c: In function ‘main’: udpgso_bench_rx.c:253:23: note: ‘gso_size’ was declared here 253 | int ret, len, gso_size, budget = 256; Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO") Signed-off-by: Andrei Gherzan Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20230201001612.515730-1-andrei.gherzan@canonical.com Signed-off-by: Paolo Abeni tools/testing/selftests/net/udpgso_bench_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69f2c9346313ba3d3dfa4091ff99df26c67c9021 Author: Damien Le Moal Date: Mon Jan 30 12:27:41 2023 +0900 ata: libata: Fix sata_down_spd_limit() when no link speed is reported Commit 2dc0b46b5ea3 ("libata: sata_down_spd_limit should return if driver has not recorded sstatus speed") changed the behavior of sata_down_spd_limit() to return doing nothing if a drive does not report a current link speed, to avoid reducing the link speed to the lowest 1.5 Gbps speed. However, the change assumed that a speed was recorded before probing (e.g. before a suspend/resume) and set in link->sata_spd. This causes problems with adapters/drives combination failing to establish a link speed during probe autonegotiation. One example reported of this problem is an mvebu adapter with a 3Gbps port-multiplier box: autonegotiation fails, leaving no recorded link speed and no reported current link speed. Probe retries also fail as no action is taken by sata_set_spd() after each retry. Fix this by returning early in sata_down_spd_limit() only if we do have a recorded link speed, that is, if link->sata_spd is not 0. With this fix, a failed probe not leading to a recorded link speed is retried at the lower 1.5 Gbps speed, with the link speed potentially increased later on the second revalidate of the device if the device reports that it supports higher link speeds. Reported-by: Marius Dinu Fixes: 2dc0b46b5ea3 ("libata: sata_down_spd_limit should return if driver has not recorded sstatus speed") Reviewed-by: Niklas Cassel Tested-by: Marius Dinu Signed-off-by: Damien Le Moal drivers/ata/libata-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eecf2acd4a580e9364e5087daf0effca60a240b7 Author: Hans de Goede Date: Thu Feb 2 11:34:13 2023 +0100 platform/x86: touchscreen_dmi: Add Chuwi Vi8 (CWI501) DMI match Add a DMI match for the CWI501 version of the Chuwi Vi8 tablet, pointing to the same chuwi_vi8_data as the existing CWI506 version DMI match. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230202103413.331459-1-hdegoede@redhat.com drivers/platform/x86/touchscreen_dmi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e33416fca8a2313b8650bd5807aaf34354d39a4c Author: Michael Ellerman Date: Thu Feb 2 21:27:35 2023 +1100 powerpc: Don't select ARCH_WANTS_NO_INSTR Commit 41b7a347bf14 ("powerpc: Book3S 64-bit outline-only KASAN support") added a select of ARCH_WANTS_NO_INSTR, because it also added some uses of noinstr. However noinstr is always defined, regardless of ARCH_WANTS_NO_INSTR, so there's no need to select it just for that. As PeterZ says [1]: Note that by selecting ARCH_WANTS_NO_INSTR you effectively state to abide by its rules. As of now the powerpc code does not abide by those rules, and trips some new warnings added by Peter in linux-next. So until the code can be fixed to avoid those warnings, disable ARCH_WANTS_NO_INSTR. Note that ARCH_WANTS_NO_INSTR is also used to gate building KCOV and parts of KCSAN. However none of the noinstr annotations in powerpc were added for KCOV or KCSAN, instead instrumentation is blocked at the file level using KCOV_INSTRUMENT_foo.o := n. [1]: https://lore.kernel.org/linuxppc-dev/Y9t6yoafrO5YqVgM@hirez.programming.kicks-ass.net Reported-by: Sachin Sant Suggested-by: Peter Zijlstra Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit f82060da749c611ed427523b6d1605d87338aac1 Author: Heikki Krogerus Date: Tue Jan 31 16:15:18 2023 +0200 usb: typec: ucsi: Don't attempt to resume the ports before they exist This will fix null pointer dereference that was caused by the driver attempting to resume ports that were not yet registered. Fixes: e0dced9c7d47 ("usb: typec: ucsi: Resume in separate work") Cc: Link: https://bugzilla.kernel.org/show_bug.cgi?id=216697 Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230131141518.78215-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 1613fff7a32e1d9e2ac09db73feba0e71a188445 Author: Marc Kleine-Budde Date: Mon Jan 23 09:03:42 2023 +0100 can: mcp251xfd: mcp251xfd_ring_set_ringparam(): assign missing tx_obj_num_coalesce_irq If the a new ring layout is set, the max coalesced frames for RX and TX are re-calculated, too. Add the missing assignment of the newly calculated TX max coalesced frames. Fixes: 656fc12ddaf8 ("can: mcp251xfd: add TX IRQ coalescing ethtool support") Link: https://lore.kernel.org/all/20230130154334.1578518-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/spi/mcp251xfd/mcp251xfd-ethtool.c | 1 + 1 file changed, 1 insertion(+) commit 4f027cba8216f42a18b544842efab134f8b1f9f4 Author: Oliver Hartkopp Date: Wed Jan 4 15:57:01 2023 +0100 can: isotp: split tx timer into transmission and timeout The timer for the transmission of isotp PDUs formerly had two functions: 1. send two consecutive frames with a given time gap 2. monitor the timeouts for flow control frames and the echo frames This led to larger txstate checks and potentially to a problem discovered by syzbot which enabled the panic_on_warn feature while testing. The former 'txtimer' function is split into 'txfrtimer' and 'txtimer' to handle the two above functionalities with separate timer callbacks. The two simplified timers now run in one-shot mode and make the state transitions (especially with isotp_rcv_echo) better understandable. Fixes: 866337865f37 ("can: isotp: fix tx state handling for echo tx processing") Reported-by: syzbot+5aed6c3aaba661f5b917@syzkaller.appspotmail.com Cc: stable@vger.kernel.org # >= v6.0 Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/all/20230104145701.2422-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde net/can/isotp.c | 65 +++++++++++++++++++++++++-------------------------------- 1 file changed, 29 insertions(+), 36 deletions(-) commit 823b2e42720f96f277940c37ea438b7c5ead51a4 Author: Oliver Hartkopp Date: Thu Jan 12 20:23:47 2023 +0100 can: isotp: handle wait_event_interruptible() return values When wait_event_interruptible() has been interrupted by a signal the tx.state value might not be ISOTP_IDLE. Force the state machines into idle state to inhibit the timer handlers to continue working. Fixes: 866337865f37 ("can: isotp: fix tx state handling for echo tx processing") Cc: stable@vger.kernel.org Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/all/20230112192347.1944-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde net/can/isotp.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3793301cbaa4a62d83e21f685307da7671f812ab Author: Oliver Hartkopp Date: Tue Jan 31 11:56:13 2023 +0100 can: raw: fix CAN FD frame transmissions over CAN XL devices A CAN XL device is always capable to process CAN FD frames. The former check when sending CAN FD frames relied on the existence of a CAN FD device and did not check for a CAN XL device that would be correct too. With this patch the CAN FD feature is enabled automatically when CAN XL is switched on - and CAN FD cannot be switch off while CAN XL is enabled. This precondition also leads to a clean up and reduction of checks in the hot path in raw_rcv() and raw_sendmsg(). Some conditions are reordered to handle simple checks first. changes since v1: https://lore.kernel.org/all/20230131091012.50553-1-socketcan@hartkopp.net - fixed typo: devive -> device changes since v2: https://lore.kernel.org/all/20230131091824.51026-1-socketcan@hartkopp.net/ - reorder checks in if statements to handle simple checks first Fixes: 626332696d75 ("can: raw: add CAN XL support") Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/all/20230131105613.55228-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde net/can/raw.c | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) commit d0553680f94c49bbe0e39eb50d033ba563b4212d Author: Ziyang Xuan Date: Mon Sep 6 17:42:00 2021 +0800 can: j1939: fix errant WARN_ON_ONCE in j1939_session_deactivate The conclusion "j1939_session_deactivate() should be called with a session ref-count of at least 2" is incorrect. In some concurrent scenarios, j1939_session_deactivate can be called with the session ref-count less than 2. But there is not any problem because it will check the session active state before session putting in j1939_session_deactivate_locked(). Here is the concurrent scenario of the problem reported by syzbot and my reproduction log. cpu0 cpu1 j1939_xtp_rx_eoma j1939_xtp_rx_abort_one j1939_session_get_by_addr [kref == 2] j1939_session_get_by_addr [kref == 3] j1939_session_deactivate [kref == 2] j1939_session_put [kref == 1] j1939_session_completed j1939_session_deactivate WARN_ON_ONCE(kref < 2) ===================================================== WARNING: CPU: 1 PID: 21 at net/can/j1939/transport.c:1088 j1939_session_deactivate+0x5f/0x70 CPU: 1 PID: 21 Comm: ksoftirqd/1 Not tainted 5.14.0-rc7+ #32 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/2014 RIP: 0010:j1939_session_deactivate+0x5f/0x70 Call Trace: j1939_session_deactivate_activate_next+0x11/0x28 j1939_xtp_rx_eoma+0x12a/0x180 j1939_tp_recv+0x4a2/0x510 j1939_can_recv+0x226/0x380 can_rcv_filter+0xf8/0x220 can_receive+0x102/0x220 ? process_backlog+0xf0/0x2c0 can_rcv+0x53/0xf0 __netif_receive_skb_one_core+0x67/0x90 ? process_backlog+0x97/0x2c0 __netif_receive_skb+0x22/0x80 Fixes: 0c71437dd50d ("can: j1939: j1939_session_deactivate(): clarify lifetime of session object") Reported-by: syzbot+9981a614060dcee6eeca@syzkaller.appspotmail.com Signed-off-by: Ziyang Xuan Acked-by: Oleksij Rempel Link: https://lore.kernel.org/all/20210906094200.95868-1-william.xuanziyang@huawei.com Signed-off-by: Marc Kleine-Budde net/can/j1939/transport.c | 4 ---- 1 file changed, 4 deletions(-) commit 30d09b3131f5b1b9d54ad9b7ee171a45e21362b3 Author: Aaro Koskinen Date: Thu Feb 2 00:01:25 2023 +0200 usb: gadget: udc: do not clear gadget driver.bus Before the commit fc274c1e9973 ("USB: gadget: Add a new bus for gadgets") gadget driver.bus was unused. For whatever reason, many UDC drivers set this field explicitly to NULL in udc_start(). With the newly added gadget bus, doing this will crash the driver during the attach. The problem was first reported, fixed and tested with OMAP UDC and g_ether. Other drivers are changed based on code analysis only. Fixes: fc274c1e9973 ("USB: gadget: Add a new bus for gadgets") Cc: stable Signed-off-by: Aaro Koskinen Acked-by: Alan Stern Link: https://lore.kernel.org/r/20230201220125.GD2415@darkstar.musicnaut.iki.fi Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/fotg210-udc.c | 1 - drivers/usb/gadget/udc/bcm63xx_udc.c | 1 - drivers/usb/gadget/udc/fsl_qe_udc.c | 1 - drivers/usb/gadget/udc/fsl_udc_core.c | 1 - drivers/usb/gadget/udc/fusb300_udc.c | 1 - drivers/usb/gadget/udc/goku_udc.c | 1 - drivers/usb/gadget/udc/gr_udc.c | 1 - drivers/usb/gadget/udc/m66592-udc.c | 1 - drivers/usb/gadget/udc/max3420_udc.c | 1 - drivers/usb/gadget/udc/mv_u3d_core.c | 1 - drivers/usb/gadget/udc/mv_udc_core.c | 1 - drivers/usb/gadget/udc/net2272.c | 1 - drivers/usb/gadget/udc/net2280.c | 1 - drivers/usb/gadget/udc/omap_udc.c | 1 - drivers/usb/gadget/udc/pch_udc.c | 1 - drivers/usb/gadget/udc/snps_udc_core.c | 1 - 16 files changed, 16 deletions(-) commit 99f1c46011cc0feb47d4f4f7bee70a0341442d14 Author: Michael Kelley Date: Mon Jan 30 19:33:06 2023 -0800 hv_netvsc: Fix missed pagebuf entries in netvsc_dma_map/unmap() netvsc_dma_map() and netvsc_dma_unmap() currently check the cp_partial flag and adjust the page_count so that pagebuf entries for the RNDIS portion of the message are skipped when it has already been copied into a send buffer. But this adjustment has already been made by code in netvsc_send(). The duplicate adjustment causes some pagebuf entries to not be mapped. In a normal VM, this doesn't break anything because the mapping doesn’t change the PFN. But in a Confidential VM, dma_map_single() does bounce buffering and provides a different PFN. Failing to do the mapping causes the wrong PFN to be passed to Hyper-V, and various errors ensue. Fix this by removing the duplicate adjustment in netvsc_dma_map() and netvsc_dma_unmap(). Fixes: 846da38de0e8 ("net: netvsc: Add Isolation VM support for netvsc driver") Cc: stable@vger.kernel.org Signed-off-by: Michael Kelley Reviewed-by: Haiyang Zhang Link: https://lore.kernel.org/r/1675135986-254490-1-git-send-email-mikelley@microsoft.com Signed-off-by: Paolo Abeni drivers/net/hyperv/netvsc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 917d5e04d4dd2bbbf36fc6976ba442e284ccc42d Author: Ratheesh Kannoth Date: Tue Jan 31 11:46:59 2023 +0530 octeontx2-af: Fix devlink unregister Exact match feature is only available in CN10K-B. Unregister exact match devlink entry only for this silicon variant. Fixes: 87e4ea29b030 ("octeontx2-af: Debugsfs support for exact match.") Signed-off-by: Ratheesh Kannoth Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230131061659.1025137-1-rkannoth@marvell.com Signed-off-by: Jakub Kicinski .../ethernet/marvell/octeontx2/af/rvu_devlink.c | 35 +++++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) commit a2df8463e15c10a8a882090f3d7a760fdb7b189d Author: Tom Rix Date: Tue Jan 31 13:54:37 2023 -0800 igc: return an error if the mac type is unknown in igc_ptp_systim_to_hwtstamp() clang static analysis reports drivers/net/ethernet/intel/igc/igc_ptp.c:673:3: warning: The left operand of '+' is a garbage value [core.UndefinedBinaryOperatorResult] ktime_add_ns(shhwtstamps.hwtstamp, adjust); ^ ~~~~~~~~~~~~~~~~~~~~ igc_ptp_systim_to_hwtstamp() silently returns without setting the hwtstamp if the mac type is unknown. This should be treated as an error. Fixes: 81b055205e8b ("igc: Add support for RX timestamping") Signed-off-by: Tom Rix Reviewed-by: Simon Horman Acked-by: Sasha Neftin Tested-by: Naama Meir Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20230131215437.1528994-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/igc/igc_ptp.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit f0293cd1f4fcc4fbdcd65a5a7b3b318a6d471f78 Author: Mayuresh Chitale Date: Mon Jan 30 13:18:15 2023 +0530 riscv: mm: Implement pmdp_collapse_flush for THP When THP is enabled, 4K pages are collapsed into a single huge page using the generic pmdp_collapse_flush() which will further use flush_tlb_range() to shoot-down stale TLB entries. Unfortunately, the generic pmdp_collapse_flush() only invalidates cached leaf PTEs using address specific SFENCEs which results in repetitive (or unpredictable) page faults on RISC-V implementations which cache non-leaf PTEs. Provide a RISC-V specific pmdp_collapse_flush() which ensures both cached leaf and non-leaf PTEs are invalidated by using non-address specific SFENCEs as recommended by the RISC-V privileged specification. Fixes: e88b333142e4 ("riscv: mm: add THP support on 64-bit") Signed-off-by: Mayuresh Chitale Link: https://lore.kernel.org/r/20230130074815.1694055-1-mchitale@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/pgtable.h | 4 ++++ arch/riscv/mm/pgtable.c | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 2f394c0e7d1129a35156e492bc8f445fb20f43ac Author: Andreas Schwab Date: Wed Feb 1 10:29:45 2023 +0100 riscv: disable generation of unwind tables GCC 13 will enable -fasynchronous-unwind-tables by default on riscv. In the kernel, we don't have any use for unwind tables yet, so disable them. More importantly, the .eh_frame section brings relocations (R_RISC_32_PCREL, R_RISCV_SET{6,8,16}, R_RISCV_SUB{6,8,16}) into modules that we are not prepared to handle. Signed-off-by: Andreas Schwab Link: https://lore.kernel.org/r/mvmzg9xybqu.fsf@suse.de Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 87f48c7ccc73afc78630530d9af51f458f58cab8 Author: Guo Ren Date: Tue Jan 31 23:06:04 2023 -0500 riscv: kprobe: Fixup kernel panic when probing an illegal position The kernel would panic when probed for an illegal position. eg: (CONFIG_RISCV_ISA_C=n) echo 'p:hello kernel_clone+0x16 a0=%a0' >> kprobe_events echo 1 > events/kprobes/hello/enable cat trace Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: __do_sys_newfstatat+0xb8/0xb8 CPU: 0 PID: 111 Comm: sh Not tainted 6.2.0-rc1-00027-g2d398fe49a4d #490 Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x38/0x48 [] show_stack+0x50/0x68 [] dump_stack_lvl+0x60/0x84 [] dump_stack+0x20/0x30 [] panic+0x160/0x374 [] generic_handle_arch_irq+0x0/0xa8 [] sys_newstat+0x0/0x30 [] sys_clone+0x20/0x30 [] ret_from_syscall+0x0/0x4 ---[ end Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: __do_sys_newfstatat+0xb8/0xb8 ]--- That is because the kprobe's ebreak instruction broke the kernel's original code. The user should guarantee the correction of the probe position, but it couldn't make the kernel panic. This patch adds arch_check_kprobe in arch_prepare_kprobe to prevent an illegal position (Such as the middle of an instruction). Fixes: c22b0bcb1dd0 ("riscv: Add kprobes supported") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20230201040604.3390509-1-guoren@kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/probes/kprobes.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 9c6b9cbafdc010b38f4077c8252654381eb46028 Author: Yanguo Li Date: Tue Jan 31 09:03:13 2023 +0100 nfp: flower: avoid taking mutex in atomic context A mutex may sleep, which is not permitted in atomic context. Avoid a case where this may arise by moving the to nfp_flower_lag_get_info_from_netdev() in nfp_tun_write_neigh() spinlock. Fixes: abc210952af7 ("nfp: flower: tunnel neigh support bond offload") Reported-by: Dan Carpenter Signed-off-by: Yanguo Li Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20230131080313.2076060-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit cca6e9ff22f79e37da3d73f60c38a84d8ed0c162 Merge: 64466c407a73 30e2291f61f9 Author: Jakub Kicinski Date: Wed Feb 1 19:52:35 2023 -0800 Merge branch 'ip-ip6_gre-fix-gre-tunnels-not-generating-ipv6-link-local-addresses' Thomas Winter says: ==================== ip/ip6_gre: Fix GRE tunnels not generating IPv6 link local addresses For our point-to-point GRE tunnels, they have IN6_ADDR_GEN_MODE_NONE when they are created then we set IN6_ADDR_GEN_MODE_EUI64 when they come up to generate the IPv6 link local address for the interface. Recently we found that they were no longer generating IPv6 addresses. Also, non-point-to-point tunnels were not generating any IPv6 link local address and instead generating an IPv6 compat address, breaking IPv6 communication on the tunnel. These failures were caused by commit e5dd729460ca and this patch set aims to resolve these issues. ==================== Link: https://lore.kernel.org/r/20230131034646.237671-1-Thomas.Winter@alliedtelesis.co.nz Signed-off-by: Jakub Kicinski commit 30e2291f61f93f7132c060190f8360df52644ec1 Author: Thomas Winter Date: Tue Jan 31 16:46:46 2023 +1300 ip/ip6_gre: Fix non-point-to-point tunnel not generating IPv6 link local address We recently found that our non-point-to-point tunnels were not generating any IPv6 link local address and instead generating an IPv6 compat address, breaking IPv6 communication on the tunnel. Previously, addrconf_gre_config always would call addrconf_addr_gen and generate a EUI64 link local address for the tunnel. Then commit e5dd729460ca changed the code path so that add_v4_addrs is called but this only generates a compat IPv6 address for non-point-to-point tunnels. I assume the compat address is specifically for SIT tunnels so have kept that only for SIT - GRE tunnels now always generate link local addresses. Fixes: e5dd729460ca ("ip/ip6_gre: use the same logic as SIT interfaces when computing v6LL address") Signed-off-by: Thomas Winter Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 23ca0c2c93406bdb1150659e720bda1cec1fad04 Author: Thomas Winter Date: Tue Jan 31 16:46:45 2023 +1300 ip/ip6_gre: Fix changing addr gen mode not generating IPv6 link local address For our point-to-point GRE tunnels, they have IN6_ADDR_GEN_MODE_NONE when they are created then we set IN6_ADDR_GEN_MODE_EUI64 when they come up to generate the IPv6 link local address for the interface. Recently we found that they were no longer generating IPv6 addresses. This issue would also have affected SIT tunnels. Commit e5dd729460ca changed the code path so that GRE tunnels generate an IPv6 address based on the tunnel source address. It also changed the code path so GRE tunnels don't call addrconf_addr_gen in addrconf_dev_config which is called by addrconf_sysctl_addr_gen_mode when the IN6_ADDR_GEN_MODE is changed. This patch aims to fix this issue by moving the code in addrconf_notify which calls the addr gen for GRE and SIT into a separate function and calling it in the places that expect the IPv6 address to be generated. The previous addrconf_dev_config is renamed to addrconf_eth_config since it only expected eth type interfaces and follows the addrconf_gre/sit_config format. A part of this changes means that the loopback address will be attempted to be configured when changing addr_gen_mode for lo. This should not be a problem because the address should exist anyway and if does already exist then no error is produced. Fixes: e5dd729460ca ("ip/ip6_gre: use the same logic as SIT interfaces when computing v6LL address") Signed-off-by: Thomas Winter Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) commit 6fc547a5a2ef5ce05b16924106663ab92f8f87a7 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 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ac7170082c0e140663f0853d3de733a5341ce7b0 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 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5048fa1ebf89d03cf0ceca13fab8f800399e9ee3 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit bb25849c0fa550b26cecc9c476c519a927c66898 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 drivers/gpu/drm/amd/amdgpu/soc21.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1538709c9f1c207d30afd95ea41b3aeb973f67e7 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 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 154711aa5759ef9b45903124fa813c4c29ee681c 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 drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 275d8a1db261a1272a818d40ebc61b3b865b60e5 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 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd2db2dc4bd298f33dea50c80c3c11bee4e3b0a4 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 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ea062fd28f922cb118bfb33229f405b81aff7781 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 drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed8e793c65e4c6633e8577e40d574da8a56d2e0f 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0416f3be58c6b1ea066cd52e354b857693feb01e Author: Ming Lei Date: Thu Feb 2 10:18:04 2023 +0800 blk-cgroup: don't update io stat for root cgroup We source root cgroup stats from the system-wide stats, see blkcg_print_stat and blkcg_rstat_flush, so don't update io state for root cgroup. Fixes blkg leak issue introduced in commit 3b8cc6298724 ("blk-cgroup: Optimize blkcg_rstat_flush()") which starts to grab blkg's reference when adding iostat_cpu into percpu blkcg list, but this state won't be consumed by blkcg_rstat_flush() where the blkg reference is dropped. Tested-by: Bart van Assche Reported-by: Bart van Assche Fixes: 3b8cc6298724 ("blk-cgroup: Optimize blkcg_rstat_flush()") Cc: Tejun Heo Cc: Waiman Long Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230202021804.278582-1-ming.lei@redhat.com Signed-off-by: Jens Axboe block/blk-cgroup.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1665c027afb225882a5a0b014c45e84290b826c2 Author: Michael Ellerman Date: Tue Jan 31 22:14:07 2023 +1100 powerpc/64s: Reconnect tlb_flush() to hash__tlb_flush() Commit baf1ed24b27d ("powerpc/mm: Remove empty hash__ functions") removed some empty hash MMU flushing routines, but got a bit overeager and also removed the call to hash__tlb_flush() from tlb_flush(). In regular use this doesn't lead to any noticable breakage, which is a little concerning. Presumably there are flushes happening via other paths such as arch_leave_lazy_mmu_mode(), and/or a bit of luck. Fix it by reinstating the call to hash__tlb_flush(). Fixes: baf1ed24b27d ("powerpc/mm: Remove empty hash__ functions") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230131111407.806770-1-mpe@ellerman.id.au arch/powerpc/include/asm/book3s/64/tlbflush.h | 2 ++ 1 file changed, 2 insertions(+) commit 316f1f42b5cc1d95124c1f0387c867c1ba7b6d0e Author: Helge Deller Date: Wed Feb 1 16:41:54 2023 +0100 parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case Wire up the missing ptrace requests PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS and PTRACE_SETFPREGS when running 32-bit applications on 64-bit kernels. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # 4.7+ arch/parisc/kernel/ptrace.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 3f0c17809a098d3f0c1ec83f1fb3ca61638d3dcd Author: Helge Deller Date: Wed Feb 1 11:04:06 2023 +0100 parisc: Replace hardcoded value with PRIV_USER constant in ptrace.c Prefer usage of the PRIV_USER constant over the hard-coded value to set the lowest 2 bits for the userspace privilege. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # 5.16+ arch/parisc/kernel/ptrace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9f266ccaa2f5228bfe67ad58a94ca4e0109b954a Merge: ce18d3aa6a23 6b04456e2487 Author: Linus Torvalds Date: Wed Feb 1 10:31:53 2023 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "Just small bugfixes all over the place" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vdpa: ifcvf: Do proper cleanup if IFCVF init fails vhost-scsi: unbreak any layout for response tools/virtio: fix the vringh test for virtio ring changes vhost/net: Clear the pending messages when the backend is removed commit ce18d3aa6a232ec80ece60ad5d6eb17bcac1744e Merge: c0b67534c95c c7a806d9ce67 Author: Linus Torvalds Date: Wed Feb 1 10:26:23 2023 -0800 Merge tag 'sound-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A bit higher volume of changes than wished, but each change is relatively small and the fix targets are mostly device-specific, so those should be safe as a late stage merge. The most significant LoC is about the memalloc helper fix, which is applied only to Xen PV. The other major parts are ASoC Intel SOF and AVS fixes that are scattered as various small code changes. The rest are device-specific fixes and quirks for HD- and USB-audio, FireWire and ASoC AMD / HDMI" * tag 'sound-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (30 commits) ALSA: firewire-motu: fix unreleased lock warning in hwdep device ALSA: memalloc: Workaround for Xen PV ASoC: cs42l56: fix DT probe ASoC: codecs: wsa883x: correct playback min/max rates ALSA: hda/realtek: Add Acer Predator PH315-54 ASoC: amd: yc: Add Xiaomi Redmi Book Pro 15 2022 into DMI table ALSA: hda: Do not unset preset when cleaning up codec ASoC: SOF: sof-audio: prepare_widgets: Check swidget for NULL on sink failure ASoC: hdmi-codec: zero clear HDMI pdata ASoC: SOF: ipc4-mtrace: prevent underflow in sof_ipc4_priority_mask_dfs_write() ASoC: Intel: sof_ssp_amp: always set dpcm_capture for amplifiers ASoC: Intel: sof_nau8825: always set dpcm_capture for amplifiers ASoC: Intel: sof_cs42l42: always set dpcm_capture for amplifiers ASoC: Intel: sof_rt5682: always set dpcm_capture for amplifiers ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path() ALSA: usb-audio: Add FIXED_RATE quirk for JBL Quantum610 Wireless ALSA: hda/realtek: fix mute/micmute LEDs, speaker don't work for a HP platform ASoC: SOF: keep prepare/unprepare widgets in sink path ASoC: SOF: sof-audio: skip prepare/unprepare if swidget is NULL ASoC: SOF: sof-audio: unprepare when swidget->use_count > 0 ... commit 5efb648042a1c3d1734e69ebbae2fe9477f4fc4d Author: Jonathan Neuschäfer Date: Wed Feb 1 15:11:58 2023 +1030 ARM: dts: wpcm450: Add nuvoton,shm = <&shm> to FIU node The Flash Interface Unit (FIU) should have a reference to the Shared Memory controller (SHM) so that flash access from the host (x86 computer managed by the WPCM450 BMC) can be blocked during flash access by the FIU driver. Fixes: 38abcb0d68767 ("ARM: dts: wpcm450: Add FIU SPI controller node") Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20230129112611.1176517-1-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20230201044158.962417-1-joel@jms.id.au Signed-off-by: Arnd Bergmann arch/arm/boot/dts/nuvoton-wpcm450.dtsi | 1 + 1 file changed, 1 insertion(+) commit b459861783a909f66120814b34fa38d409d1e6af Author: Matthias Brugger Date: Wed Feb 1 16:22:56 2023 +0100 MAINTAINERS: Update entry for MediaTek SoC support The linux-mediatek IRC channel has moved to liber.chat for quite some time. Apart from that, not all patches are also send to LKML, so add this ML explicitly. And last but not least: Angelo does a wunderfull job in reviewing patches for all kind of devices from MediaTek. Cc: AngeloGioacchino Del Regno Signed-off-by: Matthias Brugger Link: https://lore.kernel.org/r/20230201152256.19514-1-matthias.bgg@kernel.org Signed-off-by: Arnd Bergmann MAINTAINERS | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit bd97a59da6a866e3dee5d2a2d582ec71dbbc84cd Author: Shin'ichiro Kawasaki Date: Tue Jan 31 18:26:44 2023 +0900 nvme-auth: use workqueue dedicated to authentication NVMe In-Band authentication uses two kinds of works: chap->auth_work and ctrl->dhchap_auth_work. The latter work flushes or cancels the former work. However, the both works are queued to the same workqueue nvme-wq. It results in the lockdep WARNING as follows: WARNING: possible recursive locking detected 6.2.0-rc4+ #1 Not tainted -------------------------------------------- kworker/u16:7/69 is trying to acquire lock: ffff902d52e65548 ((wq_completion)nvme-wq){+.+.}-{0:0}, at: start_flush_work+0x2c5/0x380 but task is already holding lock: ffff902d52e65548 ((wq_completion)nvme-wq){+.+.}-{0:0}, at: process_one_work+0x210/0x410 To avoid the WARNING, introduce a new workqueue nvme-auth-wq dedicated to chap->auth_work. Reported-by: Daniel Wagner Link: https://lore.kernel.org/linux-nvme/20230130110802.paafkiipmitwtnwr@carbon.lan/ Fixes: f50fff73d620 ("nvme: implement In-Band authentication") Signed-off-by: Shin'ichiro Kawasaki Tested-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit bd401fd730cbcb0717bbc5438f15084db10f9259 Author: Guillaume Pinot Date: Sun Jan 29 18:13:38 2023 +0100 ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro 360 Samsung Galaxy Book2 Pro 360 (13" 2022 NP930QED-KA1FR) with codec SSID 144d:ca03 requires the same workaround for enabling the speaker amp like other Samsung models with ALC298 codec. Cc: Signed-off-by: Guillaume Pinot Link: https://lore.kernel.org/r/20230129171338.17249-1-texitoi@texitoi.eu Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 6fbf13c0e24fd86ab2e4477cd8484a485b687421 Author: Maurizio Lombardi Date: Tue Jan 31 17:38:42 2023 +0100 nvme: clear the request_queue pointers on failure in nvme_alloc_io_tag_set In nvme_alloc_io_tag_set(), the connect_q pointer should be set to NULL in case of error to avoid potential invalid pointer dereferences. Signed-off-by: Maurizio Lombardi Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+) commit fd62678ab55cb01e11a404d302cdade222bf4022 Author: Maurizio Lombardi Date: Fri Jan 27 16:42:37 2023 +0100 nvme: clear the request_queue pointers on failure in nvme_alloc_admin_tag_set If nvme_alloc_admin_tag_set() fails, the admin_q and fabrics_q pointers are left with an invalid, non-NULL value. Other functions may then check the pointers and dereference them, e.g. in nvme_probe() -> out_disable: -> nvme_dev_remove_admin(). Fix the bug by setting admin_q and fabrics_q to NULL in case of error. Also use the set variable to free the tag_set as ctrl->admin_tagset isn't initialized yet. Signed-off-by: Maurizio Lombardi Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0cab4404874f2de52617de8400c844891c6ea1ce Author: Amit Engel Date: Mon Jan 23 14:37:28 2023 +0200 nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association As part of nvmet_fc_ls_create_association there is a case where nvmet_fc_alloc_target_queue fails right after a new association with an admin queue is created. In this case, no one releases the get taken in nvmet_fc_alloc_target_assoc. This fix is adding the missing put. Signed-off-by: Amit Engel Reviewed-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/target/fc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5dac9f8dc25fefd9d928b98f6477ff3daefd73e3 Author: Dan Carpenter Date: Tue Jan 31 13:02:13 2023 +0300 ALSA: pci: lx6464es: fix a debug loop This loop accidentally reuses the "i" iterator for both the inside and the outside loop. The value of MAX_STREAM_BUFFER is 5. I believe that chip->rmh.stat_len is in the 2-12 range. If the value of .stat_len is 4 or more then it will loop exactly one time, but if it's less then it is a forever loop. It looks like it was supposed to combined into one loop where conditions are checked. Fixes: 8e6320064c33 ("ALSA: lx_core: Remove useless #if 0 .. #endif") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Y9jnJTis/mRFJAQp@kili Signed-off-by: Takashi Iwai sound/pci/lx6464es/lx_core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit a3ee9e0b57f8ecca02d1c16fad4941e09bfe2941 Author: Stephen Boyd Date: Thu Jan 5 19:01:08 2023 -0800 drm/panel: boe-tv101wum-nl6: Ensure DSI writes succeed during disable The unprepare sequence has started to fail after moving to panel bridge code in the msm drm driver (commit 007ac0262b0d ("drm/msm/dsi: switch to DRM_PANEL_BRIDGE")). You'll see messages like this in the kernel logs: panel-boe-tv101wum-nl6 ae94000.dsi.0: failed to set panel off: -22 This is because boe_panel_enter_sleep_mode() needs an operating DSI link to set the panel into sleep mode. Performing those writes in the unprepare phase of bridge ops is too late, because the link has already been torn down by the DSI controller in post_disable, i.e. the PHY has been disabled, etc. See dsi_mgr_bridge_post_disable() for more details on the DSI . Split the unprepare function into a disable part and an unprepare part. For now, just the DSI writes to enter sleep mode are put in the disable function. This fixes the panel off routine and keeps the panel happy. My Wormdingler has an integrated touchscreen that stops responding to touch if the panel is only half disabled too. This patch fixes it. And finally, this saves power when the screen is off because without this fix the regulators for the panel are left enabled when nothing is being displayed on the screen. Fixes: 007ac0262b0d ("drm/msm/dsi: switch to DRM_PANEL_BRIDGE") Fixes: a869b9db7adf ("drm/panel: support for boe tv101wum-nl6 wuxga dsi video mode panel") Cc: yangcong Cc: Douglas Anderson Cc: Jitao Shi Cc: Sam Ravnborg Cc: Rob Clark Cc: Dmitry Baryshkov Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20230106030108.2542081-1-swboyd@chromium.org (cherry picked from commit c913cd5489930abbb557ef144a333846286754c3) Signed-off-by: Thomas Zimmermann drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 3c349eacc55996a57aaca5e3754edb6b83980237 Merge: c1d610586946 0b1d60d6dd9e Author: Palmer Dabbelt Date: Tue Jan 31 21:55:43 2023 -0800 Merge patch "riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y" This is a single fix, but it conflicts with some recent features. I'm merging it on top of the commit it fixes to ease backporting. * b4-shazam-merge: riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y Link: https://lore.kernel.org/r/20220922060958.44203-1-samuel@sholland.org Signed-off-by: Palmer Dabbelt commit 0b1d60d6dd9e2e867cc6e4277d73ea5a7ff2d4d0 Author: Samuel Holland Date: Thu Sep 22 01:09:58 2022 -0500 riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y commit 8eb060e10185 ("arch/riscv: add Zihintpause support") broke building with CONFIG_CC_OPTIMIZE_FOR_SIZE enabled (gcc 11.1.0): CC arch/riscv/kernel/vdso/vgettimeofday.o In file included from : ./arch/riscv/include/asm/jump_label.h: In function 'cpu_relax': ././include/linux/compiler_types.h:285:33: warning: 'asm' operand 0 probably does not match constraints 285 | #define asm_volatile_goto(x...) asm goto(x) | ^~~ ./arch/riscv/include/asm/jump_label.h:41:9: note: in expansion of macro 'asm_volatile_goto' 41 | asm_volatile_goto( | ^~~~~~~~~~~~~~~~~ ././include/linux/compiler_types.h:285:33: error: impossible constraint in 'asm' 285 | #define asm_volatile_goto(x...) asm goto(x) | ^~~ ./arch/riscv/include/asm/jump_label.h:41:9: note: in expansion of macro 'asm_volatile_goto' 41 | asm_volatile_goto( | ^~~~~~~~~~~~~~~~~ make[1]: *** [scripts/Makefile.build:249: arch/riscv/kernel/vdso/vgettimeofday.o] Error 1 make: *** [arch/riscv/Makefile:128: vdso_prepare] Error 2 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. Drop the static branch, which ends up being the same number of instructions anyway. If Zihintpause is supported, we trade the nop from the static branch for a div. If Zihintpause is unsupported, we trade the jump from the static branch for (what gets interpreted as) a nop. Fixes: 8eb060e10185 ("arch/riscv: add Zihintpause support") Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/hwcap.h | 3 --- arch/riscv/include/asm/vdso/processor.h | 25 ++++++++++--------------- 2 files changed, 10 insertions(+), 18 deletions(-) commit 64466c407a73e7c4fc49d50f4604cd22b53e50eb Merge: afc2336f89dc bd0e06f0def7 Author: Jakub Kicinski Date: Tue Jan 31 21:19:20 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Release bridge info once packet escapes the br_netfilter path, from Florian Westphal. 2) Revert incorrect fix for the SCTP connection tracking chunk iterator, also from Florian. First path fixes a long standing issue, the second path addresses a mistake in the previous pull request for net. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: Revert "netfilter: conntrack: fix bug in for_each_sctp_chunk" netfilter: br_netfilter: disable sabotage_in hook after first suppression ==================== Link: https://lore.kernel.org/r/20230131133158.4052-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit afc2336f89dc0fc0ef25b92366814524b0fd90fb Author: Chris Healy Date: Mon Jan 30 15:14:02 2023 -0800 net: phy: meson-gxl: Add generic dummy stubs for MMD register access The Meson G12A Internal PHY does not support standard IEEE MMD extended register access, therefore add generic dummy stubs to fail the read and write MMD calls. This is necessary to prevent the core PHY code from erroneously believing that EEE is supported by this PHY even though this PHY does not support EEE, as MMD register access returns all FFFFs. Fixes: 5c3407abb338 ("net: phy: meson-gxl: add g12a support") Reviewed-by: Heiner Kallweit Signed-off-by: Chris Healy Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/20230130231402.471493-1-cphealy@gmail.com Signed-off-by: Jakub Kicinski drivers/net/phy/meson-gxl.c | 2 ++ 1 file changed, 2 insertions(+) commit 876e8ca8366735a604bac86ff7e2732fc9d85d2d Author: Yan Zhai Date: Mon Jan 30 12:51:48 2023 -0800 net: fix NULL pointer in skb_segment_list Commit 3a1296a38d0c ("net: Support GRO/GSO fraglist chaining.") introduced UDP listifyed GRO. The segmentation relies on frag_list being untouched when passing through the network stack. This assumption can be broken sometimes, where frag_list itself gets pulled into linear area, leaving frag_list being NULL. When this happens it can trigger following NULL pointer dereference, and panic the kernel. Reverse the test condition should fix it. [19185.577801][ C1] BUG: kernel NULL pointer dereference, address: ... [19185.663775][ C1] RIP: 0010:skb_segment_list+0x1cc/0x390 ... [19185.834644][ C1] Call Trace: [19185.841730][ C1] [19185.848563][ C1] __udp_gso_segment+0x33e/0x510 [19185.857370][ C1] inet_gso_segment+0x15b/0x3e0 [19185.866059][ C1] skb_mac_gso_segment+0x97/0x110 [19185.874939][ C1] __skb_gso_segment+0xb2/0x160 [19185.883646][ C1] udp_queue_rcv_skb+0xc3/0x1d0 [19185.892319][ C1] udp_unicast_rcv_skb+0x75/0x90 [19185.900979][ C1] ip_protocol_deliver_rcu+0xd2/0x200 [19185.910003][ C1] ip_local_deliver_finish+0x44/0x60 [19185.918757][ C1] __netif_receive_skb_one_core+0x8b/0xa0 [19185.927834][ C1] process_backlog+0x88/0x130 [19185.935840][ C1] __napi_poll+0x27/0x150 [19185.943447][ C1] net_rx_action+0x27e/0x5f0 [19185.951331][ C1] ? mlx5_cq_tasklet_cb+0x70/0x160 [mlx5_core] [19185.960848][ C1] __do_softirq+0xbc/0x25d [19185.968607][ C1] irq_exit_rcu+0x83/0xb0 [19185.976247][ C1] common_interrupt+0x43/0xa0 [19185.984235][ C1] asm_common_interrupt+0x22/0x40 ... [19186.094106][ C1] Fixes: 3a1296a38d0c ("net: Support GRO/GSO fraglist chaining.") Suggested-by: Daniel Borkmann Reviewed-by: Willem de Bruijn Signed-off-by: Yan Zhai Acked-by: Daniel Borkmann Link: https://lore.kernel.org/r/Y9gt5EUizK1UImEP@debian Signed-off-by: Jakub Kicinski net/core/skbuff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit efec2e2a722ed609fc7b64feef720fd601633b73 Author: Vladimir Oltean Date: Mon Jan 30 21:30:51 2023 +0200 net: fman: memac: free mdio device if lynx_pcs_create() fails When memory allocation fails in lynx_pcs_create() and it returns NULL, there remains a dangling reference to the mdiodev returned by of_mdio_find_device() which is leaked as soon as memac_pcs_create() returns empty-handed. Fixes: a7c2a32e7f22 ("net: fman: memac: Use lynx pcs driver") Signed-off-by: Vladimir Oltean Reviewed-by: Sean Anderson Acked-by: Madalin Bucur Link: https://lore.kernel.org/r/20230130193051.563315-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/fman/fman_memac.c | 3 +++ 1 file changed, 3 insertions(+) commit 8f35ae17ef565a605de5f409e04bcd49a55d7646 Author: Xin Long Date: Mon Jan 30 11:25:33 2023 -0500 sctp: do not check hb_timer.expires when resetting hb_timer It tries to avoid the frequently hb_timer refresh in commit ba6f5e33bdbb ("sctp: avoid refreshing heartbeat timer too often"), and it only allows mod_timer when the new expires is after hb_timer.expires. It means even a much shorter interval for hb timer gets applied, it will have to wait until the current hb timer to time out. In sctp_do_8_2_transport_strike(), when a transport enters PF state, it expects to update the hb timer to resend a heartbeat every rto after calling sctp_transport_reset_hb_timer(), which will not work as the change mentioned above. The frequently hb_timer refresh was caused by sctp_transport_reset_timers() called in sctp_outq_flush() and it was already removed in the commit above. So we don't have to check hb_timer.expires when resetting hb_timer as it is now not called very often. Fixes: ba6f5e33bdbb ("sctp: avoid refreshing heartbeat timer too often") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Link: https://lore.kernel.org/r/d958c06985713ec84049a2d5664879802710179a.1675095933.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski net/sctp/transport.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fc546faa559538fb312c77e055243ece18ab3288 Author: Sourabh Jain Date: Tue Jan 31 08:36:15 2023 +0530 powerpc/kexec_file: Count hot-pluggable memory in FDT estimate On Systems where online memory is lesser compared to max memory, the kexec_file_load system call may fail to load the kdump kernel with the below errors: "Failed to update fdt with linux,drconf-usable-memory property" "Error setting up usable-memory property for kdump kernel" This happens because the size estimation for usable memory properties for the kdump kernel's FDT is based on the online memory whereas the usable memory properties include max memory. In short, the hot-pluggable memory is not accounted for while estimating the size of the usable memory properties. The issue is addressed by calculating usable memory property size using max hotplug address instead of the last online memory address. Fixes: 2377c92e37fe ("powerpc/kexec_file: fix FDT size estimation for kdump kernel") Signed-off-by: Sourabh Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230131030615.729894-1-sourabhjain@linux.ibm.com arch/powerpc/kexec/file_load_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac86f547ca1002aec2ef66b9e64d03f45bbbfbb9 Author: Kefeng Wang Date: Sun Jan 29 12:09:45 2023 +0800 mm: memcg: fix NULL pointer in mem_cgroup_track_foreign_dirty_slowpath() As commit 18365225f044 ("hwpoison, memcg: forcibly uncharge LRU pages"), hwpoison will forcibly uncharg a LRU hwpoisoned page, the folio_memcg could be NULl, then, mem_cgroup_track_foreign_dirty_slowpath() could occurs a NULL pointer dereference, let's do not record the foreign writebacks for folio memcg is null in mem_cgroup_track_foreign_dirty() to fix it. Link: https://lkml.kernel.org/r/20230129040945.180629-1-wangkefeng.wang@huawei.com Fixes: 97b27821b485 ("writeback, memcg: Implement foreign dirty flushing") Signed-off-by: Kefeng Wang Reported-by: Ma Wupeng Tested-by: Miko Larsson Acked-by: Michal Hocko Cc: Jan Kara Cc: Jens Axboe Cc: Kefeng Wang Cc: Ma Wupeng Cc: Naoya Horiguchi Cc: Shakeel Butt Cc: Tejun Heo Cc: Signed-off-by: Andrew Morton include/linux/memcontrol.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1e90e35b620587e82cf52f3b7ccd8270d824d840 Author: ye xingchen Date: Sun Jan 29 10:13:57 2023 +0800 Kconfig.debug: fix the help description in SCHED_DEBUG The correct file path for SCHED_DEBUG is /sys/kernel/debug/sched. Link: https://lkml.kernel.org/r/202301291013573466558@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 lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7717fc1a12f88701573f9ed897cc4f6699c661e3 Author: Longlong Xia Date: Sat Jan 28 09:47:57 2023 +0000 mm/swapfile: add cond_resched() in get_swap_pages() The softlockup still occurs in get_swap_pages() under memory pressure. 64 CPU cores, 64GB memory, and 28 zram devices, the disksize of each zram device is 50MB with same priority as si. Use the stress-ng tool to increase memory pressure, causing the system to oom frequently. The plist_for_each_entry_safe() loops in get_swap_pages() could reach tens of thousands of times to find available space (extreme case: cond_resched() is not called in scan_swap_map_slots()). Let's add cond_resched() into get_swap_pages() when failed to find available space to avoid softlockup. Link: https://lkml.kernel.org/r/20230128094757.1060525-1-xialonglong1@huawei.com Signed-off-by: Longlong Xia Reviewed-by: "Huang, Ying" Cc: Chen Wandun Cc: Huang Ying Cc: Kefeng Wang Cc: Nanyong Sun Cc: Hugh Dickins Cc: Signed-off-by: Andrew Morton mm/swapfile.c | 1 + 1 file changed, 1 insertion(+) commit 993f57e0277b78182eb9e4955d118cc8b086c83d Author: Zhaoyang Huang Date: Thu Jan 19 09:22:25 2023 +0800 mm: use stack_depot_early_init for kmemleak Mirsad report the below error which is caused by stack_depot_init() failure in kvcalloc. Solve this by having stackdepot use stack_depot_early_init(). On 1/4/23 17:08, Mirsad Goran Todorovac wrote: I hate to bring bad news again, but there seems to be a problem with the output of /sys/kernel/debug/kmemleak: [root@pc-mtodorov ~]# cat /sys/kernel/debug/kmemleak unreferenced object 0xffff951c118568b0 (size 16): comm "kworker/u12:2", pid 56, jiffies 4294893952 (age 4356.548s) hex dump (first 16 bytes): 6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0....... backtrace: [root@pc-mtodorov ~]# Apparently, backtrace of called functions on the stack is no longer printed with the list of memory leaks. This appeared on Lenovo desktop 10TX000VCR, with AlmaLinux 8.7 and BIOS version M22KT49A (11/10/2022) and 6.2-rc1 and 6.2-rc2 builds. This worked on 6.1 with the same CONFIG_KMEMLEAK=y and MGLRU enabled on a vanilla mainstream kernel from Mr. Torvalds' tree. I don't know if this is deliberate feature for some reason or a bug. Please find attached the config, lshw and kmemleak output. [vbabka@suse.cz: remove stack_depot_init() call] Link: https://lore.kernel.org/all/5272a819-ef74-65ff-be61-4d2d567337de@alu.unizg.hr/ Link: https://lkml.kernel.org/r/1674091345-14799-2-git-send-email-zhaoyang.huang@unisoc.com Fixes: 56a61617dd22 ("mm: use stack_depot for recording kmemleak's backtrace") Reported-by: Mirsad Todorovac Suggested-by: Vlastimil Babka Signed-off-by: Zhaoyang Huang Acked-by: Mike Rapoport (IBM) Acked-by: Catalin Marinas Acked-by: Vlastimil Babka Tested-by: Borislav Petkov (AMD) Cc: ke.wang Cc: Nathan Chancellor Cc: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton lib/Kconfig.debug | 1 + mm/kmemleak.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit f65c4bbbd682b0877b669828b4e033b8d5d0a2dc Author: Phillip Lougher Date: Fri Jan 27 06:18:42 2023 +0000 Squashfs: fix handling and sanity checking of xattr_ids count A Sysbot [1] corrupted filesystem exposes two flaws in the handling and sanity checking of the xattr_ids count in the filesystem. Both of these flaws cause computation overflow due to incorrect typing. In the corrupted filesystem the xattr_ids value is 4294967071, which stored in a signed variable becomes the negative number -225. Flaw 1 (64-bit systems only): The signed integer xattr_ids variable causes sign extension. This causes variable overflow in the SQUASHFS_XATTR_*(A) macros. The variable is first multiplied by sizeof(struct squashfs_xattr_id) where the type of the sizeof operator is "unsigned long". On a 64-bit system this is 64-bits in size, and causes the negative number to be sign extended and widened to 64-bits and then become unsigned. This produces the very large number 18446744073709548016 or 2^64 - 3600. This number when rounded up by SQUASHFS_METADATA_SIZE - 1 (8191 bytes) and divided by SQUASHFS_METADATA_SIZE overflows and produces a length of 0 (stored in len). Flaw 2 (32-bit systems only): On a 32-bit system the integer variable is not widened by the unsigned long type of the sizeof operator (32-bits), and the signedness of the variable has no effect due it always being treated as unsigned. The above corrupted xattr_ids value of 4294967071, when multiplied overflows and produces the number 4294963696 or 2^32 - 3400. This number when rounded up by SQUASHFS_METADATA_SIZE - 1 (8191 bytes) and divided by SQUASHFS_METADATA_SIZE overflows again and produces a length of 0. The effect of the 0 length computation: In conjunction with the corrupted xattr_ids field, the filesystem also has a corrupted xattr_table_start value, where it matches the end of filesystem value of 850. This causes the following sanity check code to fail because the incorrectly computed len of 0 matches the incorrect size of the table reported by the superblock (0 bytes). len = SQUASHFS_XATTR_BLOCK_BYTES(*xattr_ids); indexes = SQUASHFS_XATTR_BLOCKS(*xattr_ids); /* * The computed size of the index table (len bytes) should exactly * match the table start and end points */ start = table_start + sizeof(*id_table); end = msblk->bytes_used; if (len != (end - start)) return ERR_PTR(-EINVAL); Changing the xattr_ids variable to be "usigned int" fixes the flaw on a 64-bit system. This relies on the fact the computation is widened by the unsigned long type of the sizeof operator. Casting the variable to u64 in the above macro fixes this flaw on a 32-bit system. It also means 64-bit systems do not implicitly rely on the type of the sizeof operator to widen the computation. [1] https://lore.kernel.org/lkml/000000000000cd44f005f1a0f17f@google.com/ Link: https://lkml.kernel.org/r/20230127061842.10965-1-phillip@squashfs.org.uk Fixes: 506220d2ba21 ("squashfs: add more sanity checks in xattr id lookup") Signed-off-by: Phillip Lougher Reported-by: Cc: Alexey Khoroshilov Cc: Fedor Pchelkin Cc: Signed-off-by: Andrew Morton fs/squashfs/squashfs_fs.h | 2 +- fs/squashfs/squashfs_fs_sb.h | 2 +- fs/squashfs/xattr.h | 4 ++-- fs/squashfs/xattr_id.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit c1c551bebf928889e7a8fef7415b44f9a64975f4 Author: Tom Saeger Date: Mon Jan 23 17:09:35 2023 -0700 sh: define RUNTIME_DISCARD_EXIT sh vmlinux fails to link with GNU ld < 2.40 (likely < 2.36) since commit 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv"). This is similar to fixes for powerpc and s390: commit 4b9880dbf3bd ("powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT"). commit a494398bde27 ("s390: define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36"). $ sh4-linux-gnu-ld --version | head -n1 GNU ld (GNU Binutils for Debian) 2.35.2 $ make ARCH=sh CROSS_COMPILE=sh4-linux-gnu- microdev_defconfig $ make ARCH=sh CROSS_COMPILE=sh4-linux-gnu- `.exit.text' referenced in section `__bug_table' of crypto/algboss.o: defined in discarded section `.exit.text' of crypto/algboss.o `.exit.text' referenced in section `__bug_table' of drivers/char/hw_random/core.o: defined in discarded section `.exit.text' of drivers/char/hw_random/core.o make[2]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1 make[1]: *** [Makefile:1252: vmlinux] Error 2 arch/sh/kernel/vmlinux.lds.S keeps EXIT_TEXT: /* * .exit.text is discarded at runtime, not link time, to deal with * references from __bug_table */ .exit.text : AT(ADDR(.exit.text)) { EXIT_TEXT } However, EXIT_TEXT is thrown away by DISCARD(include/asm-generic/vmlinux.lds.h) because sh does not define RUNTIME_DISCARD_EXIT. GNU ld 2.40 does not have this issue and builds fine. This corresponds with Masahiro's comments in a494398bde27: "Nathan [Chancellor] also found that binutils commit 21401fc7bf67 ("Duplicate output sections in scripts") cured this issue, so we cannot reproduce it with binutils 2.36+, but it is better to not rely on it." Link: https://lkml.kernel.org/r/9166a8abdc0f979e50377e61780a4bba1dfa2f52.1674518464.git.tom.saeger@oracle.com Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Link: https://lore.kernel.org/all/Y7Jal56f6UBh1abE@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230123194218.47ssfzhrpnv3xfez@oracle.com/ Signed-off-by: Tom Saeger Tested-by: John Paul Adrian Glaubitz Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Dennis Gilmore Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Naresh Kamboju Cc: Nathan Chancellor Cc: Palmer Dabbelt Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/sh/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) commit 88d7b12068b95731c280af8ce88e8ee9561f96de Author: Matthew Wilcox (Oracle) Date: Thu Jan 26 20:07:27 2023 +0000 highmem: round down the address passed to kunmap_flush_on_unmap() We already round down the address in kunmap_local_indexed() which is the other implementation of __kunmap_local(). The only implementation of kunmap_flush_on_unmap() is PA-RISC which is expecting a page-aligned address. This may be causing PA-RISC to be flushing the wrong addresses currently. Link: https://lkml.kernel.org/r/20230126200727.1680362-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Fixes: 298fa1ad5571 ("highmem: Provide generic variant of kmap_atomic*") Reviewed-by: Ira Weiny Cc: "Fabio M. De Francesco" Cc: Al Viro Cc: Thomas Gleixner Cc: Helge Deller Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Bagas Sanjaya Cc: David Sterba Cc: Kees Cook Cc: Sebastian Andrzej Siewior Cc: Tony Luck Cc: Signed-off-by: Andrew Morton include/linux/highmem-internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73bdf65ea74857d7fb2ec3067a3cec0e261b1462 Author: Mike Kravetz Date: Thu Jan 26 14:27:21 2023 -0800 migrate: hugetlb: check for hugetlb shared PMD in node migration migrate_pages/mempolicy semantics state that CAP_SYS_NICE is required to move pages shared with another process to a different node. page_mapcount > 1 is being used to determine if a hugetlb page is shared. However, a hugetlb page will have a mapcount of 1 if mapped by multiple processes via a shared PMD. As a result, hugetlb pages shared by multiple processes and mapped with a shared PMD can be moved by a process without CAP_SYS_NICE. To fix, check for a shared PMD if mapcount is 1. If a shared PMD is found consider the page shared. Link: https://lkml.kernel.org/r/20230126222721.222195-3-mike.kravetz@oracle.com Fixes: e2d8cf405525 ("migrate: add hugepage migration code to migrate_pages()") Signed-off-by: Mike Kravetz Acked-by: Peter Xu Acked-by: David Hildenbrand Cc: James Houghton Cc: Matthew Wilcox Cc: Michal Hocko Cc: Muchun Song Cc: Naoya Horiguchi Cc: Vishal Moola (Oracle) Cc: Yang Shi Cc: Signed-off-by: Andrew Morton mm/mempolicy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3489dbb696d25602aea8c3e669a6d43b76bd5358 Author: Mike Kravetz Date: Thu Jan 26 14:27:20 2023 -0800 mm: hugetlb: proc: check for hugetlb shared PMD in /proc/PID/smaps Patch series "Fixes for hugetlb mapcount at most 1 for shared PMDs". This issue of mapcount in hugetlb pages referenced by shared PMDs was discussed in [1]. The following two patches address user visible behavior caused by this issue. [1] https://lore.kernel.org/linux-mm/Y9BF+OCdWnCSilEu@monkey/ This patch (of 2): A hugetlb page will have a mapcount of 1 if mapped by multiple processes via a shared PMD. This is because only the first process increases the map count, and subsequent processes just add the shared PMD page to their page table. page_mapcount is being used to decide if a hugetlb page is shared or private in /proc/PID/smaps. Pages referenced via a shared PMD were incorrectly being counted as private. To fix, check for a shared PMD if mapcount is 1. If a shared PMD is found count the hugetlb page as shared. A new helper to check for a shared PMD is added. [akpm@linux-foundation.org: simplification, per David] [akpm@linux-foundation.org: hugetlb.h: include page_ref.h for page_count()] Link: https://lkml.kernel.org/r/20230126222721.222195-2-mike.kravetz@oracle.com Fixes: 25ee01a2fca0 ("mm: hugetlb: proc: add hugetlb-related fields to /proc/PID/smaps") Signed-off-by: Mike Kravetz Acked-by: Peter Xu Cc: David Hildenbrand Cc: James Houghton Cc: Matthew Wilcox Cc: Michal Hocko Cc: Muchun Song Cc: Naoya Horiguchi Cc: Vishal Moola (Oracle) Cc: Yang Shi Cc: Signed-off-by: Andrew Morton fs/proc/task_mmu.c | 4 +--- include/linux/hugetlb.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) commit edb5d0cf5525357652aff6eacd9850b8ced07143 Author: Zach O'Keefe Date: Wed Jan 25 14:53:58 2023 -0800 mm/MADV_COLLAPSE: catch !none !huge !bad pmd lookups In commit 34488399fa08 ("mm/madvise: add file and shmem support to MADV_COLLAPSE") we make the following change to find_pmd_or_thp_or_none(): - if (!pmd_present(pmde)) - return SCAN_PMD_NULL; + if (pmd_none(pmde)) + return SCAN_PMD_NONE; This was for-use by MADV_COLLAPSE file/shmem codepaths, where MADV_COLLAPSE might identify a pte-mapped hugepage, only to have khugepaged race-in, free the pte table, and clear the pmd. Such codepaths include: A) If we find a suitably-aligned compound page of order HPAGE_PMD_ORDER already in the pagecache. B) In retract_page_tables(), if we fail to grab mmap_lock for the target mm/address. In these cases, collapse_pte_mapped_thp() really does expect a none (not just !present) pmd, and we want to suitably identify that case separate from the case where no pmd is found, or it's a bad-pmd (of course, many things could happen once we drop mmap_lock, and the pmd could plausibly undergo multiple transitions due to intervening fault, split, etc). Regardless, the code is prepared install a huge-pmd only when the existing pmd entry is either a genuine pte-table-mapping-pmd, or the none-pmd. However, the commit introduces a logical hole; namely, that we've allowed !none- && !huge- && !bad-pmds to be classified as genuine pte-table-mapping-pmds. One such example that could leak through are swap entries. The pmd values aren't checked again before use in pte_offset_map_lock(), which is expecting nothing less than a genuine pte-table-mapping-pmd. We want to put back the !pmd_present() check (below the pmd_none() check), but need to be careful to deal with subtleties in pmd transitions and treatments by various arch. The issue is that __split_huge_pmd_locked() temporarily clears the present bit (or otherwise marks the entry as invalid), but pmd_present() and pmd_trans_huge() still need to return true while the pmd is in this transitory state. For example, x86's pmd_present() also checks the _PAGE_PSE , riscv's version also checks the _PAGE_LEAF bit, and arm64 also checks a PMD_PRESENT_INVALID bit. Covering all 4 cases for x86 (all checks done on the same pmd value): 1) pmd_present() && pmd_trans_huge() All we actually know here is that the PSE bit is set. Either: a) We aren't racing with __split_huge_page(), and PRESENT or PROTNONE is set. => huge-pmd b) We are currently racing with __split_huge_page(). The danger here is that we proceed as-if we have a huge-pmd, but really we are looking at a pte-mapping-pmd. So, what is the risk of this danger? The only relevant path is: madvise_collapse() -> collapse_pte_mapped_thp() Where we might just incorrectly report back "success", when really the memory isn't pmd-backed. This is fine, since split could happen immediately after (actually) successful madvise_collapse(). So, it should be safe to just assume huge-pmd here. 2) pmd_present() && !pmd_trans_huge() Either: a) PSE not set and either PRESENT or PROTNONE is. => pte-table-mapping pmd (or PROT_NONE) b) devmap. This routine can be called immediately after unlocking/locking mmap_lock -- or called with no locks held (see khugepaged_scan_mm_slot()), so previous VMA checks have since been invalidated. 3) !pmd_present() && pmd_trans_huge() Not possible. 4) !pmd_present() && !pmd_trans_huge() Neither PRESENT nor PROTNONE set => not present I've checked all archs that implement pmd_trans_huge() (arm64, riscv, powerpc, longarch, x86, mips, s390) and this logic roughly translates (though devmap treatment is unique to x86 and powerpc, and (3) doesn't necessarily hold in general -- but that doesn't matter since !pmd_present() always takes failure path). Also, add a comment above find_pmd_or_thp_or_none() to help future travelers reason about the validity of the code; namely, the possible mutations that might happen out from under us, depending on how mmap_lock is held (if at all). Link: https://lkml.kernel.org/r/20230125225358.2576151-1-zokeefe@google.com Fixes: 34488399fa08 ("mm/madvise: add file and shmem support to MADV_COLLAPSE") Signed-off-by: Zach O'Keefe Reported-by: Hugh Dickins Reviewed-by: Yang Shi Cc: Signed-off-by: Andrew Morton mm/khugepaged.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8ef852f1cb426a5812aee700d3b4297aaa426acc Author: Isaac J. Manjarres Date: Tue Jan 24 15:02:54 2023 -0800 Revert "mm: kmemleak: alloc gray object for reserved region with direct map" This reverts commit 972fa3a7c17c9d60212e32ecc0205dc585b1e769. Kmemleak operates by periodically scanning memory regions for pointers to allocated memory blocks to determine if they are leaked or not. However, reserved memory regions can be used for DMA transactions between a device and a CPU, and thus, wouldn't contain pointers to allocated memory blocks, making them inappropriate for kmemleak to scan. Thus, revert this commit. Link: https://lkml.kernel.org/r/20230124230254.295589-1-isaacmanjarres@google.com Fixes: 972fa3a7c17c9 ("mm: kmemleak: alloc gray object for reserved region with direct map") Signed-off-by: Isaac J. Manjarres Acked-by: Catalin Marinas Cc: Calvin Zhang Cc: Frank Rowand Cc: Rob Herring Cc: Saravana Kannan Cc: [5.17+] Signed-off-by: Andrew Morton drivers/of/fdt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 0d7866eace86c174e2d4f4fe3a7eca7a3a31247a Author: Randy Dunlap Date: Tue Jan 24 10:16:38 2023 -0800 freevxfs: Kconfig: fix spelling Fix a spello in freevxfs Kconfig. (reported by codespell) Link: https://lkml.kernel.org/r/20230124181638.15604-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Christoph Hellwig Signed-off-by: Andrew Morton fs/freevxfs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab6ef70a8b0d314c2160af70b0de984664d675e0 Author: Wei Yang Date: Sat Nov 12 23:43:08 2022 +0000 maple_tree: should get pivots boundary by type We should get pivots boundary by type. Fixes a potential overindexing of mt_pivots[]. Link: https://lkml.kernel.org/r/20221112234308.23823-1-richard.weiyang@gmail.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Wei Yang Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton lib/maple_tree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 889a904fe34d90c4416dd403f5d3ad859180cf68 Author: Eugen Hristev Date: Thu Jan 19 09:22:29 2023 +0200 .mailmap: update e-mail address for Eugen Hristev Update e-mail address. Link: https://lkml.kernel.org/r/20230119072229.99603-1-eugen.hristev@collabora.com Signed-off-by: Eugen Hristev Signed-off-by: Andrew Morton .mailmap | 1 + 1 file changed, 1 insertion(+) commit d014cd7c1c358edc3ea82ebf327a036a42ed0164 Author: Vlastimil Babka Date: Tue Jan 17 11:19:39 2023 +0100 mm, mremap: fix mremap() expanding for vma's with vm_ops->close() Fabian has reported another regression in 6.1 due to ca3d76b0aa80 ("mm: add merging after mremap resize"). The problem is that vma_merge() can fail when vma has a vm_ops->close() method, causing is_mergeable_vma() test to be negative. This was happening for vma mapping a file from fuse-overlayfs, which does have the method. But when we are simply expanding the vma, we never remove it due to the "merge" with the added area, so the test should not prevent the expansion. As a quick fix, check for such vmas and expand them using vma_adjust() directly as was done before commit ca3d76b0aa80. For a more robust long term solution we should try to limit the check for vma_ops->close only to cases that actually result in vma removal, so that no merge would be prevented unnecessarily. [akpm@linux-foundation.org: fix indenting whitespace, reflow comment] Link: https://lkml.kernel.org/r/20230117101939.9753-1-vbabka@suse.cz Fixes: ca3d76b0aa80 ("mm: add merging after mremap resize") Signed-off-by: Vlastimil Babka Reported-by: Fabian Vogt Link: https://bugzilla.suse.com/show_bug.cgi?id=1206359#c35 Tested-by: Fabian Vogt Cc: Jakub Matěna Cc: Signed-off-by: Andrew Morton mm/mremap.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 72e544b1b28325fe78a4687b980871a7e4101f76 Author: Fedor Pchelkin Date: Tue Jan 17 13:52:26 2023 +0300 squashfs: harden sanity check in squashfs_read_xattr_id_table While mounting a corrupted filesystem, a signed integer '*xattr_ids' can become less than zero. This leads to the incorrect computation of 'len' and 'indexes' values which can cause null-ptr-deref in copy_bio_to_actor() or out-of-bounds accesses in the next sanity checks inside squashfs_read_xattr_id_table(). Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Link: https://lkml.kernel.org/r/20230117105226.329303-2-pchelkin@ispras.ru Fixes: 506220d2ba21 ("squashfs: add more sanity checks in xattr id lookup") Reported-by: Signed-off-by: Fedor Pchelkin Signed-off-by: Alexey Khoroshilov Cc: Phillip Lougher Signed-off-by: Andrew Morton fs/squashfs/xattr_id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f28a2613497fc587e347afa99fa2c52230678a7 Author: James Morse Date: Tue Jan 17 15:16:32 2023 +0000 ia64: fix build error due to switch case label appearing next to declaration Since commit aa06a9bd8533 ("ia64: fix clock_getres(CLOCK_MONOTONIC) to report ITC frequency"), gcc 10.1.0 fails to build ia64 with the gnomic: | ../arch/ia64/kernel/sys_ia64.c: In function 'ia64_clock_getres': | ../arch/ia64/kernel/sys_ia64.c:189:3: error: a label can only be part of a statement and a declaration is not a statement | 189 | s64 tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, local_cpu_data->itc_freq); This line appears immediately after a case label in a switch. Move the declarations out of the case, to the top of the function. Link: https://lkml.kernel.org/r/20230117151632.393836-1-james.morse@arm.com Fixes: aa06a9bd8533 ("ia64: fix clock_getres(CLOCK_MONOTONIC) to report ITC frequency") Signed-off-by: James Morse Reviewed-by: Sergei Trofimovich Cc: Émeric Maschino Cc: matoro Cc: John Paul Adrian Glaubitz Cc: Signed-off-by: Andrew Morton arch/ia64/kernel/sys_ia64.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit de08eaa6156405f2e9369f06ba5afae0e4ab3b62 Author: Yu Zhao Date: Sun Jan 15 20:44:05 2023 -0700 mm: multi-gen LRU: fix crash during cgroup migration lru_gen_migrate_mm() assumes lru_gen_add_mm() runs prior to itself. This isn't true for the following scenario: CPU 1 CPU 2 clone() cgroup_can_fork() cgroup_procs_write() cgroup_post_fork() task_lock() lru_gen_migrate_mm() task_unlock() task_lock() lru_gen_add_mm() task_unlock() And when the above happens, kernel crashes because of linked list corruption (mm_struct->lru_gen.list). Link: https://lore.kernel.org/r/20230115134651.30028-1-msizanoen@qtmlabs.xyz/ Link: https://lkml.kernel.org/r/20230116034405.2960276-1-yuzhao@google.com Fixes: bd74fdaea146 ("mm: multi-gen LRU: support page table walks") Signed-off-by: Yu Zhao Reported-by: msizanoen Tested-by: msizanoen Cc: [6.1+] Signed-off-by: Andrew Morton mm/vmscan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 55ab834a86a9934c4f17825c115f7dc16a89aae7 Author: Michal Hocko Date: Fri Dec 16 10:46:33 2022 +0100 Revert "mm: add nodes= arg to memory.reclaim" This reverts commit 12a5d3955227b0d7e04fb793ccceeb2a1dd275c5. Although it is recognized that a finer grained pro-active reclaim is something we need and want the semantic of this implementation is really ambiguous. In a follow up discussion it became clear that there are two essential usecases here. One is to use memory.reclaim to pro-actively reclaim memory and expectation is that the requested and reported amount of memory is uncharged from the memcg. Another usecase focuses on pro-active demotion when the memory is merely shuffled around to demotion targets while the overall charged memory stays unchanged. The current implementation considers demoted pages as reclaimed and that break both usecases. [1] has tried to address the reporting part but there are more issues with that summarized in [2] and follow up emails. Let's revert the nodemask based extension of the memcg pro-active reclaim for now until we settle with a more robust semantic. [1] http://lkml.kernel.org/r/http://lkml.kernel.org/r/20221206023406.3182800-1-almasrymina@google.com [2] http://lkml.kernel.org/r/Y5bsmpCyeryu3Zz1@dhcp22.suse.cz Link: https://lkml.kernel.org/r/Y5xASNe1x8cusiTx@dhcp22.suse.cz Fixes: 12a5d3955227b0d ("mm: add nodes= arg to memory.reclaim") Signed-off-by: Michal Hocko Cc: Bagas Sanjaya Cc: Huang Ying Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Mina Almasry Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Cc: Tejun Heo Cc: Wei Xu Cc: Yang Shi Cc: Yosry Ahmed Cc: zefan li Signed-off-by: Andrew Morton Documentation/admin-guide/cgroup-v2.rst | 15 +++----- include/linux/swap.h | 3 +- mm/memcontrol.c | 67 +++++++-------------------------- mm/vmscan.c | 4 +- 4 files changed, 21 insertions(+), 68 deletions(-) commit 85b325815b566e8e7472e0089c8cbb0d5ea274ec Author: Nhat Pham Date: Tue Jan 10 15:17:01 2023 -0800 zsmalloc: fix a race with deferred_handles storing Currently, there is a race between zs_free() and zs_reclaim_page(): zs_reclaim_page() finds a handle to an allocated object, but before the eviction happens, an independent zs_free() call to the same handle could come in and overwrite the object value stored at the handle with the last deferred handle. When zs_reclaim_page() finally gets to call the eviction handler, it will see an invalid object value (i.e the previous deferred handle instead of the original object value). This race happens quite infrequently. We only managed to produce it with out-of-tree developmental code that triggers zsmalloc writeback with a much higher frequency than usual. This patch fixes this race by storing the deferred handle in the object header instead. We differentiate the deferred handle from the other two cases (handle for allocated object, and linkage for free object) with a new tag. If zspage reclamation succeeds, we will free these deferred handles by walking through the zspage objects. On the other hand, if zspage reclamation fails, we reconstruct the zspage freelist (with the deferred handle tag and allocated tag) before trying again with the reclamation. [arnd@arndb.de: avoid unused-function warning] Link: https://lkml.kernel.org/r/20230117170507.2651972-1-arnd@kernel.org Link: https://lkml.kernel.org/r/20230110231701.326724-1-nphamcs@gmail.com Fixes: 9997bc017549 ("zsmalloc: implement writeback mechanism for zsmalloc") Signed-off-by: Nhat Pham Signed-off-by: Arnd Bergmann Suggested-by: Johannes Weiner Cc: Dan Streetman Cc: Minchan Kim Cc: Nitin Gupta Cc: Sergey Senozhatsky Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton mm/zsmalloc.c | 237 ++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 205 insertions(+), 32 deletions(-) commit 023f47a8250c6bdb4aebe744db4bf7f73414028b Author: Jann Horn Date: Wed Jan 11 14:33:51 2023 +0100 mm/khugepaged: fix ->anon_vma race If an ->anon_vma is attached to the VMA, collapse_and_free_pmd() requires it to be locked. Page table traversal is allowed under any one of the mmap lock, the anon_vma lock (if the VMA is associated with an anon_vma), and the mapping lock (if the VMA is associated with a mapping); and so to be able to remove page tables, we must hold all three of them. retract_page_tables() bails out if an ->anon_vma is attached, but does this check before holding the mmap lock (as the comment above the check explains). If we racily merged an existing ->anon_vma (shared with a child process) from a neighboring VMA, subsequent rmap traversals on pages belonging to the child will be able to see the page tables that we are concurrently removing while assuming that nothing else can access them. Repeat the ->anon_vma check once we hold the mmap lock to ensure that there really is no concurrent page table access. Hitting this bug causes a lockdep warning in collapse_and_free_pmd(), in the line "lockdep_assert_held_write(&vma->anon_vma->root->rwsem)". It can also lead to use-after-free access. Link: https://lore.kernel.org/linux-mm/CAG48ez3434wZBKFFbdx4M9j6eUwSUVPd4dxhzW_k_POneSDF+A@mail.gmail.com/ Link: https://lkml.kernel.org/r/20230111133351.807024-1-jannh@google.com Fixes: f3f0e1d2150b ("khugepaged: add support of collapse for tmpfs/shmem pages") Signed-off-by: Jann Horn Reported-by: Zach O'Keefe Acked-by: Kirill A. Shutemov Reviewed-by: Yang Shi Cc: David Hildenbrand Cc: Signed-off-by: Andrew Morton mm/khugepaged.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 7327e8111adb315423035fb5233533016dfd3f2e Author: Liam Howlett Date: Wed Jan 11 20:02:07 2023 +0000 maple_tree: fix mas_empty_area_rev() lower bound validation mas_empty_area_rev() was not correctly validating the start of a gap against the lower limit. This could lead to the range starting lower than the requested minimum. Fix the issue by better validating a gap once one is found. This commit also adds tests to the maple tree test suite for this issue and tests the mas_empty_area() function for similar bound checking. Link: https://lkml.kernel.org/r/20230111200136.1851322-1-Liam.Howlett@oracle.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=216911 Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Reported-by: Link: https://lore.kernel.org/linux-mm/0b9f5425-08d4-8013-aa4c-e620c3b10bb2@leemhuis.info/ Tested-by: Holger Hoffsttte Cc: Signed-off-by: Andrew Morton lib/maple_tree.c | 17 +++++----- lib/test_maple_tree.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 9 deletions(-) commit c0b67534c95c537f7a506a06b98e5e85d72e2b7d Merge: 58706f7fb045 e5ae8803847b Author: Linus Torvalds Date: Tue Jan 31 16:02:05 2023 -0800 Merge tag 'cgroup-for-6.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fix from Tejun Heo: "cpuset has a bug which can cause an oops after some configuration operations, introduced during the v6.1 cycle. This single commit fixes the bug" * tag 'cgroup-for-6.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup/cpuset: Fix wrong check in update_parent_subparts_cpumask() commit e5ae8803847b80fe9d744a3174abe2b7bfed222a Author: Waiman Long Date: Tue Jan 31 10:48:03 2023 -0500 cgroup/cpuset: Fix wrong check in update_parent_subparts_cpumask() It was found that the check to see if a partition could use up all the cpus from the parent cpuset in update_parent_subparts_cpumask() was incorrect. As a result, it is possible to leave parent with no effective cpu left even if there are tasks in the parent cpuset. This can lead to system panic as reported in [1]. Fix this probem by updating the check to fail the enabling the partition if parent's effective_cpus is a subset of the child's cpus_allowed. Also record the error code when an error happens in update_prstate() and add a test case where parent partition and child have the same cpu list and parent has task. Enabling partition in the child will fail in this case. [1] https://www.spinics.net/lists/cgroups/msg36254.html Fixes: f0af1bfc27b5 ("cgroup/cpuset: Relax constraints to partition & cpus changes") Cc: stable@vger.kernel.org # v6.1 Reported-by: Srinivas Pandruvada Signed-off-by: Waiman Long Signed-off-by: Tejun Heo kernel/cgroup/cpuset.c | 3 ++- tools/testing/selftests/cgroup/test_cpuset_prs.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 58706f7fb045b7019bada81fa17f372189315fe5 Merge: 88b356e19199 15600159bcc6 Author: Linus Torvalds Date: Tue Jan 31 11:39:08 2023 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two core fixes. One simply moves an annotation from put to release to avoid the warning triggering needlessly in alua, but to keep it in case release is ever called from that path (which we don't think will happen). The other reverts a change to the PQ=1 target scanning behaviour that's under intense discussion at the moment" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: Revert "scsi: core: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT" scsi: core: Fix the scsi_device_put() might_sleep annotation commit 4f64a6c9f6f11e8b7314f8e27e2c4568706009e6 Author: James Clark Date: Fri Jan 27 14:31:41 2023 +0000 perf: Fix perf_event_pmu_context serialization Syzkaller triggered a WARN in put_pmu_ctx(). WARNING: CPU: 1 PID: 2245 at kernel/events/core.c:4925 put_pmu_ctx+0x1f0/0x278 This is because there is no locking around the access of "if (!epc->ctx)" in find_get_pmu_context() and when it is set to NULL in put_pmu_ctx(). The decrement of the reference count in put_pmu_ctx() also happens outside of the spinlock, leading to the possibility of this order of events, and the context being cleared in put_pmu_ctx(), after its refcount is non zero: CPU0 CPU1 find_get_pmu_context() if (!epc->ctx) == false put_pmu_ctx() atomic_dec_and_test(&epc->refcount) == true epc->refcount == 0 atomic_inc(&epc->refcount); epc->refcount == 1 list_del_init(&epc->pmu_ctx_entry); epc->ctx = NULL; Another issue is that WARN_ON for no active PMU events in put_pmu_ctx() is outside of the lock. If the perf_event_pmu_context is an embedded one, even after clearing it, it won't be deleted and can be re-used. So the warning can trigger. For this reason it also needs to be moved inside the lock. The above warning is very quick to trigger on Arm by running these two commands at the same time: while true; do perf record -- ls; done while true; do perf record -- ls; done [peterz: atomic_dec_and_raw_lock*()] Fixes: bd2756811766 ("perf: Rewrite core context handling") Reported-by: syzbot+697196bc0265049822bd@syzkaller.appspotmail.com Signed-off-by: James Clark Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ravi Bangoria Link: https://lore.kernel.org/r/20230127143141.1782804-2-james.clark@arm.com include/linux/spinlock.h | 9 +++++++++ kernel/events/core.c | 39 +++++++++++++++++---------------------- lib/dec_and_lock.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 22 deletions(-) commit 88b356e19199dca700b1180adc0b843a3228d4a0 Merge: 22b8077d0fce 89c08aef8f8d Author: Linus Torvalds Date: Tue Jan 31 11:17:38 2023 -0800 Merge tag 'media/v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "A couple of v4l2 core fixes: - fix a regression on strings control support - fix a regression for some drivers that depend on an odd streaming behavior" * tag 'media/v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: videobuf2: set q->streaming later media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line commit 81ea42b9c3d61ea34d82d900ed93f4b4851f13b0 Author: Bart Van Assche Date: Mon Jan 30 13:12:33 2023 -0800 block: Fix the blk_mq_destroy_queue() documentation Commit 2b3f056f72e5 moved a blk_put_queue() call from blk_mq_destroy_queue() into its callers. Reflect this change in the documentation block above blk_mq_destroy_queue(). Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Cc: Keith Busch Fixes: 2b3f056f72e5 ("blk-mq: move the call to blk_put_queue out of blk_mq_destroy_queue") Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230130211233.831613-1-bvanassche@acm.org Signed-off-by: Jens Axboe block/blk-mq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7ab41c2c08a32132ba8c14624910e2fe8ce4ba4b Author: Vasily Gorbik Date: Sun Jan 29 23:47:23 2023 +0100 s390/decompressor: specify __decompress() buf len to avoid overflow Historically calls to __decompress() didn't specify "out_len" parameter on many architectures including s390, expecting that no writes beyond uncompressed kernel image are performed. This has changed since commit 2aa14b1ab2c4 ("zstd: import usptream v1.5.2") which includes zstd library commit 6a7ede3dfccb ("Reduce size of dctx by reutilizing dst buffer (#2751)"). Now zstd decompression code might store literal buffer in the unwritten portion of the destination buffer. Since "out_len" is not set, it is considered to be unlimited and hence free to use for optimization needs. On s390 this might corrupt initrd or ipl report which are often placed right after the decompressor buffer. Luckily the size of uncompressed kernel image is already known to the decompressor, so to avoid the problem simply specify it in the "out_len" parameter. Link: https://github.com/facebook/zstd/commit/6a7ede3dfccb Signed-off-by: Vasily Gorbik Tested-by: Alexander Egorenkov Link: https://lore.kernel.org/r/patch-1.thread-41c676.git-41c676c2d153.your-ad-here.call-01675030179-ext-9637@work.hours Signed-off-by: Heiko Carstens arch/s390/boot/decompressor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 254c71374a70051a043676b67ba4f7ad392b5fe6 Author: Brendan Higgins Date: Tue Jan 31 10:35:03 2023 +0800 kunit: fix kunit_test_init_section_suites(...) Looks like kunit_test_init_section_suites(...) was messed up in a merge conflict. This fixes it. kunit_test_init_section_suites(...) was not updated to avoid the extra level of indirection when .kunit_test_suites was flattened. Given no-one was actively using it, this went unnoticed for a long period of time. Fixes: e5857d396f35 ("kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites") Signed-off-by: Brendan Higgins Signed-off-by: David Gow Tested-by: Martin Fernandez Signed-off-by: Shuah Khan include/kunit/test.h | 1 - 1 file changed, 1 deletion(-) commit 0a2742bf5899bf3bc46d16e4cc7dd7352ce771fd Author: Stafford Horne Date: Wed Feb 1 00:48:30 2023 +0900 MAINTAINERS: Update OpenRISC mailing list The mailing list at librecores.org is being shut down due to infrastructure issues. Update the the newly created list on vger.kernel.org. Signed-off-by: Stafford Horne MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29baef789c838bd5c02f50c88adbbc6b955aaf61 Author: Liu Xiaodong Date: Tue Jan 31 02:05:52 2023 -0500 block: ublk: extending queue_size to fix overflow When validating drafted SPDK ublk target, in a case that assigning large queue depth to multiqueue ublk device, ublk target would run into a weird incorrect state. During rounds of review and debug, An overflow bug was found in ublk driver. In ublk_cmd.h, UBLK_MAX_QUEUE_DEPTH is 4096 which means each ublk queue depth can be set as large as 4096. But when setting qd for a ublk device, sizeof(struct ublk_queue) + depth * sizeof(struct ublk_io) will be larger than 65535 if qd is larger than 2728. Then queue_size is overflowed, and ublk_get_queue() references a wrong pointer position. The wrong content of ublk_queue elements will lead to out-of-bounds memory access. Extend queue_size in ublk_device as "unsigned int". Signed-off-by: Liu Xiaodong Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230131070552.115067-1-xiaodong.liu@intel.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9c47b2caa7ffc903ec950b454b59c209afe3182 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 Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/user_exp_rcv.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 226fae124b2dac217ea5436060d623ff3385bc34 Author: George Kennedy Date: Tue Jan 24 11:16:54 2023 -0500 vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF After a call to console_unlock() in vcs_read() the vc_data struct can be freed by vc_deallocate(). Because of that, the struct vc_data pointer load must be done at the top of while loop in vcs_read() to avoid a UAF when vcs_size() is called. Syzkaller reported a UAF in vcs_size(). BUG: KASAN: use-after-free in vcs_size (drivers/tty/vt/vc_screen.c:215) Read of size 4 at addr ffff8881137479a8 by task 4a005ed81e27e65/1537 CPU: 0 PID: 1537 Comm: 4a005ed81e27e65 Not tainted 6.2.0-rc5 #1 Hardware name: Red Hat KVM, BIOS 1.15.0-2.module Call Trace: __asan_report_load4_noabort (mm/kasan/report_generic.c:350) vcs_size (drivers/tty/vt/vc_screen.c:215) vcs_read (drivers/tty/vt/vc_screen.c:415) vfs_read (fs/read_write.c:468 fs/read_write.c:450) ... Allocated by task 1191: ... kmalloc_trace (mm/slab_common.c:1069) vc_allocate (./include/linux/slab.h:580 ./include/linux/slab.h:720 drivers/tty/vt/vt.c:1128 drivers/tty/vt/vt.c:1108) con_install (drivers/tty/vt/vt.c:3383) tty_init_dev (drivers/tty/tty_io.c:1301 drivers/tty/tty_io.c:1413 drivers/tty/tty_io.c:1390) tty_open (drivers/tty/tty_io.c:2080 drivers/tty/tty_io.c:2126) chrdev_open (fs/char_dev.c:415) do_dentry_open (fs/open.c:883) vfs_open (fs/open.c:1014) ... Freed by task 1548: ... kfree (mm/slab_common.c:1021) vc_port_destruct (drivers/tty/vt/vt.c:1094) tty_port_destructor (drivers/tty/tty_port.c:296) tty_port_put (drivers/tty/tty_port.c:312) vt_disallocate_all (drivers/tty/vt/vt_ioctl.c:662 (discriminator 2)) vt_ioctl (drivers/tty/vt/vt_ioctl.c:903) tty_ioctl (drivers/tty/tty_io.c:2776) ... The buggy address belongs to the object at ffff888113747800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 424 bytes inside of 1024-byte region [ffff888113747800, ffff888113747c00) The buggy address belongs to the physical page: page:00000000b3fe6c7c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113740 head:00000000b3fe6c7c order:3 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 anon flags: 0x17ffffc0010200(slab|head|node=0|zone=2|lastcpupid=0x1fffff) raw: 0017ffffc0010200 ffff888100042dc0 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888113747880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888113747900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb > ffff888113747980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888113747a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888113747a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Disabling lock debugging due to kernel taint Fixes: ac751efa6a0d ("console: rename acquire/release_console_sem() to console_lock/unlock()") Reported-by: syzkaller Suggested-by: Jiri Slaby Signed-off-by: George Kennedy Link: https://lore.kernel.org/r/1674577014-12374-1-git-send-email-george.kennedy@oracle.com Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vc_screen.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c956940a4ab73a87d0165e911c001dbdd2c8200f Author: Maor Gottlieb Date: Mon Jan 30 16:25:50 2023 +0200 RDMA/umem: Use dma-buf locked API to solve deadlock The cited commit moves umem to call the unlocked versions of dmabuf unmap/map attachment, but the lock is held while calling to these functions, hence move back to the locked versions of these APIs. Fixes: 21c9c5c0784f ("RDMA/umem: Prepare to dynamic dma-buf locking specification") Link: https://lore.kernel.org/r/311c2cb791f8af75486df446819071357353db1b.1675088709.git.leon@kernel.org Signed-off-by: Maor Gottlieb Reviewed-by: Christian König Signed-off-by: Leon Romanovsky Reviewed-by: Dmitry Osipenko Signed-off-by: Jason Gunthorpe drivers/infiniband/core/umem_dmabuf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bd0e06f0def75ba26572a94e5350324474a55562 Author: Florian Westphal Date: Thu Jan 26 02:35:21 2023 +0100 Revert "netfilter: conntrack: fix bug in for_each_sctp_chunk" There is no bug. If sch->length == 0, this would result in an infinite loop, but first caller, do_basic_checks(), errors out in this case. After this change, packets with bogus zero-length chunks are no longer detected as invalid, so revert & add comment wrt. 0 length check. Fixes: 98ee00774525 ("netfilter: conntrack: fix bug in for_each_sctp_chunk") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_sctp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2b272bb558f1d3a5aa95ed8a82253786fd1a48ba Author: Florian Westphal Date: Mon Jan 30 11:39:29 2023 +0100 netfilter: br_netfilter: disable sabotage_in hook after first suppression When using a xfrm interface in a bridged setup (the outgoing device is bridged), the incoming packets in the xfrm interface are only tracked in the outgoing direction. $ brctl show bridge name interfaces br_eth1 eth1 $ conntrack -L tcp 115 SYN_SENT src=192... dst=192... [UNREPLIED] ... If br_netfilter is enabled, the first (encrypted) packet is received onR eth1, conntrack hooks are called from br_netfilter emulation which allocates nf_bridge info for this skb. If the packet is for local machine, skb gets passed up the ip stack. The skb passes through ip prerouting a second time. br_netfilter ip_sabotage_in supresses the re-invocation of the hooks. After this, skb gets decrypted in xfrm layer and appears in network stack a second time (after decryption). Then, ip_sabotage_in is called again and suppresses netfilter hook invocation, even though the bridge layer never called them for the plaintext incarnation of the packet. Free the bridge info after the first suppression to avoid this. I was unable to figure out where the regression comes from, as far as i can see br_netfilter always had this problem; i did not expect that skb is looped again with different headers. Fixes: c4b0e771f906 ("netfilter: avoid using skb->nf_bridge directly") Reported-and-tested-by: Wolfgang Nothdurft Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/bridge/br_netfilter_hooks.c | 1 + 1 file changed, 1 insertion(+) commit 9d2c7203ffdb846399b82b0660563c89e918c751 Author: Joerg Roedel Date: Tue Jan 31 09:57:18 2023 +0100 x86/debug: Fix stack recursion caused by wrongly ordered DR7 accesses In kernels compiled with CONFIG_PARAVIRT=n, the compiler re-orders the DR7 read in exc_nmi() to happen before the call to sev_es_ist_enter(). This is problematic when running as an SEV-ES guest because in this environment the DR7 read might cause a #VC exception, and taking #VC exceptions is not safe in exc_nmi() before sev_es_ist_enter() has run. The result is stack recursion if the NMI was caused on the #VC IST stack, because a subsequent #VC exception in the NMI handler will overwrite the stack frame of the interrupted #VC handler. As there are no compiler barriers affecting the ordering of DR7 reads/writes, make the accesses to this register volatile, forbidding the compiler to re-order them. [ bp: Massage text, make them volatile too, to make sure some aggressive compiler optimization pass doesn't discard them. ] Fixes: 315562c9af3d ("x86/sev-es: Adjust #VC IST Stack on entering NMI handler") Reported-by: Alexey Kardashevskiy Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov (AMD) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230127035616.508966-1-aik@amd.com arch/x86/include/asm/debugreg.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 111bcb37385353f0510e5847d5abcd1c613dba23 Author: Michael Ellerman Date: Tue Jan 10 23:47:53 2023 +1100 powerpc/64s/radix: Fix RWX mapping with relocated kernel If a relocatable kernel is loaded at a non-zero address and told not to relocate to zero (kdump or RELOCATABLE_TEST), the mapping of the interrupt code at zero is left with RWX permissions. That is a security weakness, and leads to a warning at boot if CONFIG_DEBUG_WX is enabled: powerpc/mm: Found insecure W+X mapping at address 00000000056435bc/0xc000000000000000 WARNING: CPU: 1 PID: 1 at arch/powerpc/mm/ptdump/ptdump.c:193 note_page+0x484/0x4c0 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.2.0-rc1-00001-g8ae8e98aea82-dirty #175 Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1202 0xf000005 of:SLOF,git-dd0dca hv:linux,kvm pSeries NIP: c0000000004a1c34 LR: c0000000004a1c30 CTR: 0000000000000000 REGS: c000000003503770 TRAP: 0700 Not tainted (6.2.0-rc1-00001-g8ae8e98aea82-dirty) MSR: 8000000002029033 CR: 24000220 XER: 00000000 CFAR: c000000000545a58 IRQMASK: 0 ... NIP note_page+0x484/0x4c0 LR note_page+0x480/0x4c0 Call Trace: note_page+0x480/0x4c0 (unreliable) ptdump_pmd_entry+0xc8/0x100 walk_pgd_range+0x618/0xab0 walk_page_range_novma+0x74/0xc0 ptdump_walk_pgd+0x98/0x170 ptdump_check_wx+0x94/0x100 mark_rodata_ro+0x30/0x70 kernel_init+0x78/0x1a0 ret_from_kernel_thread+0x5c/0x64 The fix has two parts. Firstly the pages from zero up to the end of interrupts need to be marked read-only, so that they are left with R-X permissions. Secondly the mapping logic needs to be taught to ensure there is a page boundary at the end of the interrupt region, so that the permission change only applies to the interrupt text, and not the region following it. Fixes: c55d7b5e6426 ("powerpc: Remove STRICT_KERNEL_RWX incompatibility with RELOCATABLE") Reported-by: Sachin Sant Tested-by: Sachin Sant Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230110124753.1325426-2-mpe@ellerman.id.au arch/powerpc/mm/book3s64/radix_pgtable.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 98d0219e043e09013e883eacde3b93e0b2bf944d Author: Michael Ellerman Date: Tue Jan 10 23:47:52 2023 +1100 powerpc/64s/radix: Fix crash with unaligned relocated kernel If a relocatable kernel is loaded at an address that is not 2MB aligned and told not to relocate to zero, the kernel can crash due to mark_rodata_ro() incorrectly changing some read-write data to read-only. Scenarios where the misalignment can occur are when the kernel is loaded by kdump or using the RELOCATABLE_TEST config option. Example crash with the kernel loaded at 5MB: Run /sbin/init as init process BUG: Unable to handle kernel data access on write at 0xc000000000452000 Faulting instruction address: 0xc0000000005b6730 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries CPU: 1 PID: 1 Comm: init Not tainted 6.2.0-rc1-00011-g349188be4841 #166 Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1202 0xf000005 of:SLOF,git-5b4c5a hv:linux,kvm pSeries NIP: c0000000005b6730 LR: c000000000ae9ab8 CTR: 0000000000000380 REGS: c000000004503250 TRAP: 0300 Not tainted (6.2.0-rc1-00011-g349188be4841) MSR: 8000000000009033 CR: 44288480 XER: 00000000 CFAR: c0000000005b66ec DAR: c000000000452000 DSISR: 0a000000 IRQMASK: 0 ... NIP memset+0x68/0x104 LR zero_user_segments.constprop.0+0xa8/0xf0 Call Trace: ext4_mpage_readpages+0x7f8/0x830 ext4_readahead+0x48/0x60 read_pages+0xb8/0x380 page_cache_ra_unbounded+0x19c/0x250 filemap_fault+0x58c/0xae0 __do_fault+0x60/0x100 __handle_mm_fault+0x1230/0x1a40 handle_mm_fault+0x120/0x300 ___do_page_fault+0x20c/0xa80 do_page_fault+0x30/0xc0 data_access_common_virt+0x210/0x220 This happens because mark_rodata_ro() tries to change permissions on the range _stext..__end_rodata, but _stext sits in the middle of the 2MB page from 4MB to 6MB: radix-mmu: Mapped 0x0000000000000000-0x0000000000200000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000000200000-0x0000000000400000 with 2.00 MiB pages radix-mmu: Mapped 0x0000000000400000-0x0000000002400000 with 2.00 MiB pages (exec) The logic that changes the permissions assumes the linear mapping was split correctly at boot, so it marks the entire 2MB page read-only. That leads to the write fault above. To fix it, the boot time mapping logic needs to consider that if the kernel is running at a non-zero address then _stext is a boundary where it must split the mapping. That leads to the mapping being split correctly, allowing the rodata permission change to take happen correctly, with no spillover: radix-mmu: Mapped 0x0000000000000000-0x0000000000200000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000000200000-0x0000000000400000 with 2.00 MiB pages radix-mmu: Mapped 0x0000000000400000-0x0000000000500000 with 64.0 KiB pages radix-mmu: Mapped 0x0000000000500000-0x0000000000600000 with 64.0 KiB pages (exec) radix-mmu: Mapped 0x0000000000600000-0x0000000002400000 with 2.00 MiB pages (exec) If the kernel is loaded at a 2MB aligned address, the mapping continues to use 2MB pages as before: radix-mmu: Mapped 0x0000000000000000-0x0000000000200000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000000200000-0x0000000000400000 with 2.00 MiB pages radix-mmu: Mapped 0x0000000000400000-0x0000000002c00000 with 2.00 MiB pages (exec) radix-mmu: Mapped 0x0000000002c00000-0x0000000100000000 with 2.00 MiB pages Fixes: c55d7b5e6426 ("powerpc: Remove STRICT_KERNEL_RWX incompatibility with RELOCATABLE") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230110124753.1325426-1-mpe@ellerman.id.au arch/powerpc/mm/book3s64/radix_pgtable.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 7294194b47e994753a86eee8cf1c61f3f36458a3 Author: Michael Ellerman Date: Mon Jan 30 12:47:07 2023 +1100 powerpc/kexec_file: Fix division by zero in extra size estimation In kexec_extra_fdt_size_ppc64() there's logic to estimate how much extra space will be needed in the device tree for some memory related properties. That logic uses the size of RAM divided by drmem_lmb_size() to do the estimation. However drmem_lmb_size() can be zero if the machine has no hotpluggable memory configured, which is the case when booting with qemu and no maxmem=x parameter is passed (the default). The division by zero is reported by UBSAN, and can also lead to an overflow and a warning from kvmalloc, and kdump kernel loading fails: WARNING: CPU: 0 PID: 133 at mm/util.c:596 kvmalloc_node+0x15c/0x160 Modules linked in: CPU: 0 PID: 133 Comm: kexec Not tainted 6.2.0-rc5-03455-g07358bd97810 #223 Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1200 0xf000005 of:SLOF,git-dd0dca pSeries NIP: c00000000041ff4c LR: c00000000041fe58 CTR: 0000000000000000 REGS: c0000000096ef750 TRAP: 0700 Not tainted (6.2.0-rc5-03455-g07358bd97810) MSR: 800000000282b033 CR: 24248242 XER: 2004011e CFAR: c00000000041fed0 IRQMASK: 0 ... NIP kvmalloc_node+0x15c/0x160 LR kvmalloc_node+0x68/0x160 Call Trace: kvmalloc_node+0x68/0x160 (unreliable) of_kexec_alloc_and_setup_fdt+0xb8/0x7d0 elf64_load+0x25c/0x4a0 kexec_image_load_default+0x58/0x80 sys_kexec_file_load+0x5c0/0x920 system_call_exception+0x128/0x330 system_call_vectored_common+0x15c/0x2ec To fix it, skip the calculation if drmem_lmb_size() is zero. Fixes: 2377c92e37fe ("powerpc/kexec_file: fix FDT size estimation for kdump kernel") Cc: stable@vger.kernel.org # v5.12+ Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230130014707.541110-1-mpe@ellerman.id.au arch/powerpc/kexec/file_load_64.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 57e9af7831dcf211c5c689c2a6f209f4abdf0bce Author: Ilpo Järvinen Date: Mon Jan 30 13:48:41 2023 +0200 serial: 8250_dma: Fix DMA Rx rearm race As DMA Rx can be completed from two places, it is possible that DMA Rx completes before DMA completion callback had a chance to complete it. Once the previous DMA Rx has been completed, a new one can be started on the next UART interrupt. The following race is possible (uart_unlock_and_check_sysrq_irqrestore() replaced with spin_unlock_irqrestore() for simplicity/clarity): CPU0 CPU1 dma_rx_complete() serial8250_handle_irq() spin_lock_irqsave(&port->lock) handle_rx_dma() serial8250_rx_dma_flush() __dma_rx_complete() dma->rx_running = 0 // Complete DMA Rx spin_unlock_irqrestore(&port->lock) serial8250_handle_irq() spin_lock_irqsave(&port->lock) handle_rx_dma() serial8250_rx_dma() dma->rx_running = 1 // Setup a new DMA Rx spin_unlock_irqrestore(&port->lock) spin_lock_irqsave(&port->lock) // sees dma->rx_running = 1 __dma_rx_complete() dma->rx_running = 0 // Incorrectly complete // running DMA Rx This race seems somewhat theoretical to occur for real but handle it correctly regardless. Check what is the DMA status before complething anything in __dma_rx_complete(). Reported-by: Gilles BULOZ Tested-by: Gilles BULOZ Fixes: 9ee4b83e51f7 ("serial: 8250: Add support for dmaengine") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230130114841.25749-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dma.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 31352811e13dc2313f101b890fd4b1ce760b5fe7 Author: Ilpo Järvinen Date: Mon Jan 30 13:48:40 2023 +0200 serial: 8250_dma: Fix DMA Rx completion race __dma_rx_complete() is called from two places: - Through the DMA completion callback dma_rx_complete() - From serial8250_rx_dma_flush() after IIR_RLSI or IIR_RX_TIMEOUT The former does not hold port's lock during __dma_rx_complete() which allows these two to race and potentially insert the same data twice. Extend port's lock coverage in dma_rx_complete() to prevent the race and check if the DMA Rx is still pending completion before calling into __dma_rx_complete(). Reported-by: Gilles BULOZ Tested-by: Gilles BULOZ Fixes: 9ee4b83e51f7 ("serial: 8250: Add support for dmaengine") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230130114841.25749-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dma.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 3f6c02fa712bd453871877fe1d1969625617471e Author: Marek Vasut Date: Fri Jan 20 17:03:32 2023 +0100 serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler Requesting an interrupt with IRQF_ONESHOT will run the primary handler in the hard-IRQ context even in the force-threaded mode. The force-threaded mode is used by PREEMPT_RT in order to avoid acquiring sleeping locks (spinlock_t) in hard-IRQ context. This combination makes it impossible and leads to "sleeping while atomic" warnings. Use one interrupt handler for both handlers (primary and secondary) and drop the IRQF_ONESHOT flag which is not needed. Fixes: e359b4411c283 ("serial: stm32: fix threaded interrupt handling") Reviewed-by: Sebastian Andrzej Siewior Tested-by: Valentin Caron # V3 Signed-off-by: Marek Vasut Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230120160332.57930-1-marex@denx.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) commit 9944028659e638587c2c27aaaf5ebd7531ebe0fa Merge: bf29ce87ba13 2acd031347f6 Author: Greg Kroah-Hartman Date: Tue Jan 31 10:51:39 2023 +0100 Merge tag 'iio-fixes-for-6.2a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: "1st set of IIO fixes for the 6.2 cycle. The usual mixed bag - with a bunch of issues found by Carlos Song in the fxos8700 IMU driver dominating. hid-accel,gyro - Fix wrong returned value when read succeeds. marvell,berlin-adc - Missing of_node_put() in an error path. nxp,fxos8700 (freescale) - Wrong channel type match. - Swapped channel read back. - Incomplete channel read back (not enough bytes). - Missing shift of acceleration data. - Range selection didn't work (datasheet bug) - Wrong ODR mode read back due to wrong field offset. - Drop unused, but wrong define. - Fix issue with magnetometer scale an units. nxp,imx8qxp - Fix an irq flood due to not reading data early enough. st,lsm6dsx - Add CONFIG_IIO_TRIGGERED_BUFFER select. st,stm32-adc - Fix missing MODULE_DEVICE_TABLE() needed for module aliases. ti,twl6030 - Fix missing enable of some channels. - Fix a typo in previous patch that meant one channel still wasn't enabled. xilinx,xadc - Carrying on incorrectly after allocation error." * tag 'iio-fixes-for-6.2a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: imu: fxos8700: fix MAGN sensor scale and unit iio: imu: fxos8700: remove definition FXOS8700_CTRL_ODR_MIN iio: imu: fxos8700: fix failed initialization ODR mode assignment iio: imu: fxos8700: fix incorrect ODR mode readback iio: light: cm32181: Fix PM support on system with 2 I2C resources iio: hid: fix the retval in gyro_3d_capture_sample iio: hid: fix the retval in accel_3d_capture_sample iio: imu: st_lsm6dsx: fix build when CONFIG_IIO_TRIGGERED_BUFFER=m iio:adc:twl6030: Enable measurement of VAC iio: imu: fxos8700: fix ACCEL measurement range selection iio: imu: fxos8700: fix IMU data bits returned to user space iio: imu: fxos8700: fix incomplete ACCEL and MAGN channels readback iio: imu: fxos8700: fix swapped ACCEL and MAGN channels readback iio: imu: fxos8700: fix map label of channel type to MAGN sensor iio:adc:twl6030: Enable measurements of VUSB, VBAT and others iio: imx8qxp-adc: fix irq flood when call imx8qxp_adc_read_raw() iio: adc: xilinx-ams: fix devm_krealloc() return value check iio: adc: berlin2-adc: Add missing of_node_put() in error path iio: adc: stm32-dfsdm: fill module aliases commit de5ca4c3852f896cacac2bf259597aab5e17d9e3 Author: Kees Cook Date: Fri Jan 27 14:40:37 2023 -0800 net: sched: sch: Bounds check priority Nothing was explicitly bounds checking the priority index used to access clpriop[]. WARN and bail out early if it's pathological. Seen with GCC 13: ../net/sched/sch_htb.c: In function 'htb_activate_prios': ../net/sched/sch_htb.c:437:44: warning: array subscript [0, 31] is outside array bounds of 'struct htb_prio[8]' [-Warray-bounds=] 437 | if (p->inner.clprio[prio].feed.rb_node) | ~~~~~~~~~~~~~~~^~~~~~ ../net/sched/sch_htb.c:131:41: note: while referencing 'clprio' 131 | struct htb_prio clprio[TC_HTB_NUMPRIO]; | ^~~~~~ Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Simon Horman Reviewed-by: Cong Wang Link: https://lore.kernel.org/r/20230127224036.never.561-kees@kernel.org Signed-off-by: Paolo Abeni net/sched/sch_htb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f3eceaed9edd7c0e0d9fb057613131f92973626f Author: Kees Cook Date: Fri Jan 27 14:38:54 2023 -0800 net: ethernet: mtk_eth_soc: Avoid truncating allocation There doesn't appear to be a reason to truncate the allocation used for flow_info, so do a full allocation and remove the unused empty struct. GCC does not like having a reference to an object that has been partially allocated, as bounds checking may become impossible when such an object is passed to other code. Seen with GCC 13: ../drivers/net/ethernet/mediatek/mtk_ppe.c: In function 'mtk_foe_entry_commit_subflow': ../drivers/net/ethernet/mediatek/mtk_ppe.c:623:18: warning: array subscript 'struct mtk_flow_entry[0]' is partly outside array bounds of 'unsigned char[48]' [-Warray-bounds=] 623 | flow_info->l2_data.base_flow = entry; | ^~ Cc: Felix Fietkau Cc: John Crispin Cc: Sean Wang Cc: Mark Lee Cc: Lorenzo Bianconi Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Matthias Brugger Cc: netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Kees Cook Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230127223853.never.014-kees@kernel.org Signed-off-by: Paolo Abeni drivers/net/ethernet/mediatek/mtk_ppe.c | 3 +-- drivers/net/ethernet/mediatek/mtk_ppe.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 22e46f6480e83bcf49b6d5e6b66c81872c97a902 Author: Jan Luebbe Date: Tue Jan 31 09:43:23 2023 +0100 kbuild: modinst: Fix build error when CONFIG_MODULE_SIG_KEY is a PKCS#11 URI When CONFIG_MODULE_SIG_KEY is PKCS#11 URI (pkcs11:*), signing of modules fails: scripts/sign-file sha256 /.../linux/pkcs11:token=foo;object=bar;pin-value=1111 certs/signing_key.x509 /.../kernel/crypto/tcrypt.ko Usage: scripts/sign-file [-dp] [] scripts/sign-file -s [] First, we need to avoid adding the $(srctree)/ prefix to the URL. Second, since the kconfig string values no longer include quotes, we need to add them again when passing a PKCS#11 URI to sign-file. This avoids splitting by the shell if the URI contains semicolons. Fixes: 4db9c2e3d055 ("kbuild: stop using config_filename in scripts/Makefile.modsign") Fixes: 129ab0d2d9f3 ("kbuild: do not quote string values in include/config/auto.conf") Signed-off-by: Jan Luebbe Signed-off-by: Masahiro Yamada scripts/Makefile.modinst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b1c3d2beed8ef3699fab106340e33a79052df116 Author: Jan Luebbe Date: Tue Jan 31 09:43:22 2023 +0100 certs: Fix build error when PKCS#11 URI contains semicolon When CONFIG_MODULE_SIG_KEY is PKCS#11 URI (pkcs11:*) and contains a semicolon, signing_key.x509 fails to build: certs/extract-cert pkcs11:token=foo;object=bar;pin-value=1111 certs/signing_key.x509 Usage: extract-cert Add quotes to the extract-cert argument to avoid splitting by the shell. This approach was suggested by Masahiro Yamada . Fixes: 129ab0d2d9f3 ("kbuild: do not quote string values in include/config/auto.conf") Signed-off-by: Jan Luebbe Signed-off-by: Masahiro Yamada certs/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7a806d9ce6757ff56078674916e53bd859f242d Author: Takashi Sakamoto Date: Mon Jan 30 23:15:40 2023 +0900 ALSA: firewire-motu: fix unreleased lock warning in hwdep device Smatch static analysis tool detects that acquired lock is not released in hwdep device when condition branch is passed due to no event. It is unlikely to occur, while fulfilling is preferable for better coding. Reported-by: Dan Carpenter Fixes: 634ec0b2906e ("ALSA: firewire-motu: notify event for parameter change in register DSP model") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230130141540.102854-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai sound/firewire/motu/motu-hwdep.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9b3fc325c2a7e9e17e22b008357cb0ceb810d9b2 Merge: ffe2a2256244 71a06f1034b9 Author: Jakub Kicinski Date: Mon Jan 30 21:11:11 2023 -0800 Merge tag 'ieee802154-for-net-2023-01-30' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan Stefan Schmidt says: ==================== ieee802154 for net 2023-01-30 Only one fix this time around. Miquel Raynal fixed a potential double free spotted by Dan Carpenter. * tag 'ieee802154-for-net-2023-01-30' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan: mac802154: Fix possible double free upon parsing error ==================== Link: https://lore.kernel.org/r/20230130095646.301448-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit ffe2a22562444720b05bdfeb999c03e810d84cbb Author: Pietro Borrello Date: Sat Jan 28 16:29:17 2023 +0000 net/tls: tls_is_tx_ready() checked list_entry tls_is_tx_ready() checks that list_first_entry() does not return NULL. This condition can never happen. For empty lists, list_first_entry() returns the list_entry() of the head, which is a type confusion. Use list_first_entry_or_null() which returns NULL in case of empty lists. Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance") Signed-off-by: Pietro Borrello Link: https://lore.kernel.org/r/20230128-list-entry-null-check-tls-v1-1-525bbfe6f0d0@diag.uniroma1.it Signed-off-by: Jakub Kicinski net/tls/tls_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84115f0e74ea73eccc44842a125f242a02097493 Merge: 73a876022273 53b9b77dcf48 Author: Jakub Kicinski Date: Mon Jan 30 21:02:44 2023 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-01-27 (ice) This series contains updates to ice driver only. Dave prevents modifying channels when RDMA is active as this will break RDMA traffic. Michal fixes a broken URL. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: Fix broken link in ice NAPI doc ice: Prevent set_channel from changing queues while RDMA active ==================== Link: https://lore.kernel.org/r/20230127225333.1534783-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit ad53db4acb415976761d7302f5b02e97f2bd097e Author: Michael Ellerman Date: Mon Jan 30 12:44:01 2023 +1100 powerpc/imc-pmu: Revert nest_init_lock to being a mutex The recent commit 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section") fixed warnings (and possible deadlocks) in the IMC PMU driver by converting the locking to use spinlocks. It also converted the init-time nest_init_lock to a spinlock, even though it's not used at runtime in IRQ disabled sections or while holding other spinlocks. This leads to warnings such as: BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0 preempt_count: 1, expected: 0 CPU: 7 PID: 1 Comm: swapper/0 Not tainted 6.2.0-rc2-14719-gf12cd06109f4-dirty #1 Hardware name: Mambo,Simulated-System POWER9 0x4e1203 opal:v6.6.6 PowerNV Call Trace: dump_stack_lvl+0x74/0xa8 (unreliable) __might_resched+0x178/0x1a0 __cpuhp_setup_state+0x64/0x1e0 init_imc_pmu+0xe48/0x1250 opal_imc_counters_probe+0x30c/0x6a0 platform_probe+0x78/0x110 really_probe+0x104/0x420 __driver_probe_device+0xb0/0x170 driver_probe_device+0x58/0x180 __driver_attach+0xd8/0x250 bus_for_each_dev+0xb4/0x140 driver_attach+0x34/0x50 bus_add_driver+0x1e8/0x2d0 driver_register+0xb4/0x1c0 __platform_driver_register+0x38/0x50 opal_imc_driver_init+0x2c/0x40 do_one_initcall+0x80/0x360 kernel_init_freeable+0x310/0x3b8 kernel_init+0x30/0x1a0 ret_from_kernel_thread+0x5c/0x64 Fix it by converting nest_init_lock back to a mutex, so that we can call sleeping functions while holding it. There is no interaction between nest_init_lock and the runtime spinlocks used by the actual PMU routines. Fixes: 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section") Tested-by: Kajol Jain Reviewed-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230130014401.540543-1-mpe@ellerman.id.au arch/powerpc/perf/imc-pmu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 90741096769bd75152a5fe397343e5893c7d905a Author: Ben Skeggs Date: Tue Jan 31 08:37:15 2023 +1000 drm/nouveau/acr/gm20b: regression fixes Missed some Tegra-specific quirks when reworking ACR to support Ampere. Fixes: 2541626cfb79 ("drm/nouveau/acr: use common falcon HS FW code for ACR FWs") Signed-off-by: Ben Skeggs Tested-by: Diogo Ivo Tested-by: Nicolas Chauvet Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20230130223715.1831509-3-bskeggs@redhat.com drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c | 14 +++++++++++++- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) commit b480600988181c411d46a7f8da24d78d1e5ee151 Author: Ben Skeggs Date: Tue Jan 31 08:37:14 2023 +1000 drm/nouveau/fb/tu102-: fix register used to determine scrub status Turing apparently needs to use the same register we use on Ampere. Not executing the scrubber ucode when required would result in large areas of VRAM being inaccessible to the driver. Signed-off-by: Ben Skeggs Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20230130223715.1831509-2-bskeggs@redhat.com drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 10 ++--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/ga102.c | 8 +--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gv100.c | 5 --- drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/tu102.c | 55 +++++++++++++++++++++++ 7 files changed, 65 insertions(+), 17 deletions(-) commit d22915d22ded21fd5b24b60d174775789f173997 Author: Ben Skeggs Date: Tue Jan 31 08:37:13 2023 +1000 drm/nouveau/devinit/tu102-: wait for GFW_BOOT_PROGRESS == COMPLETED Starting from Turing, the driver is no longer responsible for initiating DEVINIT when required as the GPU started loading a FW image from ROM and executing DEVINIT itself after power-on. However - we apparently still need to wait for it to complete. This should correct some issues with runpm on some systems, where we get control of the HW before it's been fully reinitialised after resume from suspend. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20230130223715.1831509-1-bskeggs@redhat.com .../gpu/drm/nouveau/nvkm/subdev/devinit/tu102.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 606d4ef4922662ded34aa7218288c3043ce0a41a Author: Joel Stanley Date: Tue Jan 31 08:38:45 2023 +1030 pinctrl: aspeed: Revert "Force to disable the function's signal" This reverts commit cf517fef601b9dde151f0afc27164d13bf1fd907. The commit cf517fef601b ("pinctrl: aspeed: Force to disable the function's signal") exposed a problem with fetching the regmap for reading the GFX register. The Romulus machine the device tree contains a gpio hog for GPIO S7. With the patch applied: Muxing pin 151 for GPIO Disabling signal VPOB9 for VPO aspeed-g5-pinctrl 1e6e2080.pinctrl: Failed to acquire regmap for IP block 1 aspeed-g5-pinctrl 1e6e2080.pinctrl: request() failed for pin 151 The code path is aspeed-gpio -> pinmux-g5 -> regmap -> clk, and the of_clock code returns an error as it doesn't have a valid struct clk_hw pointer. The regmap call happens because pinmux wants to check the GFX node (IP block 1) to query bits there. For reference, before the offending patch: Muxing pin 151 for GPIO Disabling signal VPOB9 for VPO Want SCU8C[0x00000080]=0x1, got 0x0 from 0x00000000 Disabling signal VPOB9 for VPOOFF1 Want SCU8C[0x00000080]=0x1, got 0x0 from 0x00000000 Disabling signal VPOB9 for VPOOFF2 Want SCU8C[0x00000080]=0x1, got 0x0 from 0x00000000 Enabling signal GPIOS7 for GPIOS7 Muxed pin 151 as GPIOS7 gpio-943 (seq_cont): hogged as output/low We can't skip the clock check to allow pinmux to proceed, because the write to disable VPOB9 will try to set a bit in the GFX register space which will not stick when the IP is in reset. However, we do not want to enable the IP just so pinmux can do a disable-enable dance for the pin. For now, revert the offending patch while a correct solution is found. Fixes: cf517fef601b ("pinctrl: aspeed: Force to disable the function's signal") Link: https://github.com/openbmc/linux/issues/218 Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20230130220845.917985-1-joel@jms.id.au Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit dd2f0a0a2f751b7aafaea5cbba8e65a55fd12f94 Author: Rae Moar Date: Fri Jan 27 20:39:50 2023 +0000 kunit: fix bug in KUNIT_EXPECT_MEMEQ In KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ, add check if one of the inputs is NULL and fail if this is the case. Currently, the kernel crashes if one of the inputs is NULL. Instead, fail the test and add an appropriate error message. Fixes: b8a926bea8b1 ("kunit: Introduce KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ macros") This was found by the kernel test robot: https://lore.kernel.org/all/202212191448.D6EDPdOh-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan include/kunit/test.h | 5 +++-- lib/kunit/assert.c | 40 +++++++++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 17 deletions(-) commit 47a2bd9d985bfdb55900f313603619fc9234f317 Author: Chaitanya Kumar Borah Date: Thu Jan 12 15:11:31 2023 +0530 drm/i915/adlp: Fix typo for reference clock Fix typo for reference clock from 24400 to 24000. Bspec: 55409 Fixes: 626426ff9ce4 ("drm/i915/adl_p: Add cdclk support for ADL-P") Reviewed-by: Matt Roper Signed-off-by: Chaitanya Kumar Borah Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230112094131.550252-1-chaitanya.kumar.borah@intel.com (cherry picked from commit 2b6f7e39ccae065abfbe3b6e562ec95ccad09f1e) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_cdclk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7057a8f126f14f14b040faecfa220fd27c6c2f85 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 (cherry picked from commit 10e0cbaaf1104f449d695c80bcacf930dcd3c42e) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_tiling.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5bc4b43d5c6c9692ddc7b96116650cdf9406f3da 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 (cherry picked from commit a4be3dca53172d9d2091e4b474fb795c81ed3d6c) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_engine.h | 4 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 74 +++++++++++----------- .../gpu/drm/i915/gt/intel_execlists_submission.c | 27 ++++++++ .../gpu/drm/i915/gt/intel_execlists_submission.h | 4 ++ drivers/gpu/drm/i915/i915_gpu_error.c | 26 +------- 5 files changed, 73 insertions(+), 62 deletions(-) commit 86d8ddc74124c3fdfc139f246ba6da15e45e86e3 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 (cherry picked from commit 3700e353781e27f1bc7222f51f2cc36cbeb9b4ec) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_context.c | 4 +++- drivers/gpu/drm/i915/gt/intel_context.h | 3 +-- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 6 +++++- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 3 ++- drivers/gpu/drm/i915/i915_gpu_error.c | 13 ++++++------- 5 files changed, 17 insertions(+), 12 deletions(-) commit 87b04e53daf806945c415e94de9f90943d434aed 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 (cherry picked from commit d1c3717501bcf56536e8b8c1bdaf5cd5357f6bb2) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 41d419382ec7e257e54b7b6ff0d3623aafb1316d 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 (cherry picked from commit 99343c46d4e2b34c285d3d5f68ff04274c2f9fb4) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_context.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 22b8077d0fcec86c6ed0e0fce9f7e7e5a4c2d56a Merge: 6d796c50f84c 3288666c7256 Author: Linus Torvalds Date: Mon Jan 30 11:58:53 2023 -0800 Merge tag 'fscache-fixes-20230130' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull fscache fixes from David Howells: "Fix two problems in fscache volume handling: - wake_up_bit() is incorrectly paired with wait_var_event(). The latter selects the waitqueue to use differently. - Missing barriers ordering between state bit and task state" * tag 'fscache-fixes-20230130' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work() fscache: Use wait_on_bit() to wait for the freeing of relinquished volume commit 8a74191c899efd3a0e942632f31dad0ea7eb4c7f Merge: a6e6ceb28a26 1febf88ef907 Author: Arnd Bergmann Date: Mon Jan 30 17:44:27 2023 +0100 Merge tag 'imx-fixes-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 6.2, round 2: - Update MAINTAINERS i.MX entry to match arm64 freescale DTS. - Drop misused 'uart-has-rtscts' from imx8m-venice boards. - Fix USB host over-current polarity for imx7d-smegw01 board. - Fix a typo in i.MX8DXL sc_pwrkey property name. - Fix GPIO watchdog property for i.MX8MM eDM SBC board. - Keep Ethernet PHY powered on imx8mm-verdin to avoid kernel crash. - Fix configuration of i.MX8MM pad UART1_DTE_RX. * tag 'imx-fixes-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx7d-smegw01: Fix USB host over-current polarity arm64: dts: imx8mm-verdin: Do not power down eth-phy MAINTAINERS: match freescale ARM64 DT directory in i.MX entry arm64: dts: imx8mm: Fix pad control for UART1_DTE_RX arm64: dts: freescale: imx8dxl: fix sc_pwrkey's property name linux,keycode arm64: dts: imx8m-venice: Remove incorrect 'uart-has-rtscts' arm64: dts: imx8mm: Reinstate GPIO watchdog always-running property on eDM SBC Link: https://lore.kernel.org/r/20230130003614.GP20713@T480 Signed-off-by: Arnd Bergmann commit a6e6ceb28a268a2a0ec9a2ebe4081ec1d1799228 Merge: d2591298b9ab f71eaf2708be Author: Arnd Bergmann Date: Mon Jan 30 17:43:41 2023 +0100 Merge tag 'sunxi-fixes-for-6.2-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes - Fix error handling in RSB init * tag 'sunxi-fixes-for-6.2-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: bus: sunxi-rsb: Fix error handling in sunxi_rsb_init() Link: https://lore.kernel.org/r/Y9RWcDdO0nj98KVj@jernej-laptop Signed-off-by: Arnd Bergmann commit d2591298b9ab576b568f0c49d60a7f21d0c8d1e2 Author: Krzysztof Kozlowski Date: Fri Jan 27 11:59:35 2023 +0100 MAINTAINERS: amd: drop inactive Brijesh Singh Emails to Brijesh Singh bounce ("550 5.1.10 RESOLVER.ADR.RecipientNotFound; Recipient not found by SMTP address lookup"). Signed-off-by: Krzysztof Kozlowski Acked-by: Tom Lendacky Link: https://lore.kernel.org/r/20230127105935.99174-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 581e43ef5de6cc3369b2496362348e38bc85ded0 Author: Lorenzo Pieralisi Date: Mon Jan 30 11:08:50 2023 +0100 MAINTAINERS: Promote Krzysztof to PCI controller maintainer Krzysztof has contributed significantly to the PCI controller subsystem recently through reviews, tooling and submissions. Update the MAINTAINERS file to grant him the role he deserves. Link: https://lore.kernel.org/r/20230130100850.24994-1-lpieralisi@kernel.org Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Krzysztof Wilczyński MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32e40f9506b9e32917eb73154f93037b443124d1 Author: Alexander Egorenkov Date: Fri Jan 27 14:52:42 2023 +0100 watchdog: diag288_wdt: fix __diag288() inline assembly The DIAG 288 statement consumes an EBCDIC string the address of which is passed in a register. Use a "memory" clobber to tell the compiler that memory is accessed within the inline assembly. Signed-off-by: Alexander Egorenkov Reviewed-by: Heiko Carstens Cc: Signed-off-by: Heiko Carstens drivers/watchdog/diag288_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe8973a3ad0905cb9ba2d42db42ed51de14737df Author: Alexander Egorenkov Date: Fri Jan 27 14:52:41 2023 +0100 watchdog: diag288_wdt: do not use stack buffers for hardware data With CONFIG_VMAP_STACK=y the stack is allocated from the vmalloc space. Data passed to a hardware or a hypervisor interface that requires V=R can no longer be allocated on the stack. Use kmalloc() to get memory for a diag288 command. Signed-off-by: Alexander Egorenkov Reviewed-by: Heiko Carstens Cc: Signed-off-by: Heiko Carstens drivers/watchdog/diag288_wdt.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit eebf82012dddbdcb09e4e49d3cdfafb93bc66eb2 Author: Hans de Goede Date: Sat Jan 28 00:57:23 2023 +0100 platform/x86: thinkpad_acpi: Fix thinklight LED brightness returning 255 Reading the thinklight LED brightnes while the LED is on returns 255 (LED_FULL) but we advertise a max_brightness of 1, so this should be 1 (LED_ON). Fixes: db5e2a4ca0a7 ("platform/x86: thinkpad_acpi: Fix max_brightness of thinklight") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230127235723.412864-1-hdegoede@redhat.com drivers/platform/x86/thinkpad_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abce209d18fd26e865b2406cc68819289db973f9 Author: Arnd Bergmann Date: Fri Jan 27 10:39:44 2023 +0100 platform/x86/amd: pmc: add CONFIG_SERIO dependency Using the serio subsystem now requires the code to be reachable: x86_64-linux-ld: drivers/platform/x86/amd/pmc.o: in function `amd_pmc_suspend_handler': pmc.c:(.text+0x86c): undefined reference to `serio_bus' Add the usual dependency: as other users of serio use 'select' rather than 'depends on', use the same here. Fixes: 8e60615e8932 ("platform/x86/amd: pmc: Disable IRQ1 wakeup for RN/CZN") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230127093950.2368575-1-arnd@kernel.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e0c40529ff942a985eb0f3dacf18d35ee4dbb03d Author: Hans de Goede Date: Mon Jan 30 14:25:54 2023 +0100 platform/x86/amd/pmf: Ensure mutexes are initialized before use As soon as the first handler or sysfs file is registered the mutex may get used. Move the initialization to before any handler registration / sysfs file creation. Likewise move the destruction of the mutex to after all the de-initialization is done. Fixes: da5ce22df5fe ("platform/x86/amd/pmf: Add support for PMF core layer") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230130132554.696025-1-hdegoede@redhat.com drivers/platform/x86/amd/pmf/core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f21bf62290dd4d769594dcf0e6a688783d74f6a0 Author: Shyam Sundar S K Date: Wed Jan 25 15:29:36 2023 +0530 platform/x86/amd/pmf: Fix to update SPS thermals when power supply change Every power mode of static power slider has its own AC and DC power settings. When the power source changes from AC to DC, corresponding DC thermals were not updated from PMF config store and this leads the system to always run on AC power settings. Fix it by registering with power_supply notifier and apply DC settings upon getting notified by the power_supply handler. Fixes: da5ce22df5fe ("platform/x86/amd/pmf: Add support for PMF core layer") Suggested-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20230125095936.3292883-6-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmf/core.c | 23 +++++++++++++++++++++++ drivers/platform/x86/amd/pmf/pmf.h | 1 + 2 files changed, 24 insertions(+) commit 635f79bc73cf3d40c4198a20b3a0e7016dd6f0d3 Author: Shyam Sundar S K Date: Wed Jan 25 15:29:35 2023 +0530 platform/x86/amd/pmf: Fix to update SPS default pprof thermals By design PMF static slider will be set to BALANCED during init, but updating to corresponding thermal values from the PMF config store was missed, leading to improper settings getting propagated to PMFW. Fixes: 4c71ae414474 ("platform/x86/amd/pmf: Add support SPS PMF feature") Suggested-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20230125095936.3292883-5-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmf/sps.c | 3 +++ 1 file changed, 3 insertions(+) commit 3dfe28c936f87373a2b6ada750be4c52c0f249f3 Author: Shyam Sundar S K Date: Wed Jan 25 15:29:34 2023 +0530 platform/x86/amd/pmf: update to auto-mode limits only after AMT event Auto-mode thermal limits should be updated only after receiving the AMT event. But due to a bug in the older commit, these settings were getting applied during the auto-mode init. Fix this by removing amd_pmf_set_automode() during auto-mode initialization. Fixes: 3f5571d99524 ("platform/x86/amd/pmf: Add support for Auto mode feature") Suggested-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20230125095936.3292883-4-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmf/auto-mode.c | 2 -- 1 file changed, 2 deletions(-) commit 16909aa8c9cc284085f1202c6403ecb9814af812 Author: Shyam Sundar S K Date: Wed Jan 25 15:29:33 2023 +0530 platform/x86/amd/pmf: Add helper routine to check pprof is balanced Add helper routine to check if the current platform profile is balanced mode and remove duplicate code occurrences. Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20230125095936.3292883-3-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmf/cnqf.c | 6 +++--- drivers/platform/x86/amd/pmf/pmf.h | 1 + drivers/platform/x86/amd/pmf/sps.c | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) commit c5258d39fc4cbed37e20945715e7eb102f26d65b Author: Shyam Sundar S K Date: Wed Jan 25 15:29:32 2023 +0530 platform/x86/amd/pmf: Add helper routine to update SPS thermals Add helper routine to update the static slider information and remove the duplicate code occurrences after this change. Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20230125095936.3292883-2-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmf/auto-mode.c | 7 +------ drivers/platform/x86/amd/pmf/cnqf.c | 8 ++------ drivers/platform/x86/amd/pmf/pmf.h | 1 + drivers/platform/x86/amd/pmf/sps.c | 20 ++++++++++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) commit 2036890282d56bcbf7f915ba9e04bf77967ab231 Author: Jack Yu Date: Mon Jan 30 02:43:25 2023 +0000 ASoC: rt715-sdca: fix clock stop prepare timeout issue Modify clock_stop_timeout value for rt715-sdca according to the requirement of internal clock trimming. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/574b6586267a458cac78c5ac4d5b10bd@realtek.com Signed-off-by: Mark Brown sound/soc/codecs/rt715-sdca-sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3288666c72568fe1cc7f5c5ae33dfd3ab18004c8 Author: Hou Tao Date: Fri Jan 13 19:52:11 2023 +0800 fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work() fscache_create_volume_work() uses wake_up_bit() to wake up the processes which are waiting for the completion of volume creation. According to comments in wake_up_bit() and waitqueue_active(), an extra smp_mb() is needed to guarantee the memory order between FSCACHE_VOLUME_CREATING flag and waitqueue_active() before invoking wake_up_bit(). Fixing it by using clear_and_wake_up_bit() to add the missing memory barrier. Reviewed-by: Jingbo Xu Signed-off-by: Hou Tao Signed-off-by: David Howells Reviewed-by: Jeff Layton Link: https://lore.kernel.org/r/20230113115211.2895845-3-houtao@huaweicloud.com/ # v3 fs/fscache/volume.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8226e37d82f43657da34dd770e2b38f20242ada7 Author: Hou Tao Date: Fri Jan 13 19:52:10 2023 +0800 fscache: Use wait_on_bit() to wait for the freeing of relinquished volume The freeing of relinquished volume will wake up the pending volume acquisition by using wake_up_bit(), however it is mismatched with wait_var_event() used in fscache_wait_on_volume_collision() and it will never wake up the waiter in the wait-queue because these two functions operate on different wait-queues. According to the implementation in fscache_wait_on_volume_collision(), if the wake-up of pending acquisition is delayed longer than 20 seconds (e.g., due to the delay of on-demand fd closing), the first wait_var_event_timeout() will timeout and the following wait_var_event() will hang forever as shown below: FS-Cache: Potential volume collision new=00000024 old=00000022 ...... INFO: task mount:1148 blocked for more than 122 seconds. Not tainted 6.1.0-rc6+ #1 task:mount state:D stack:0 pid:1148 ppid:1 Call Trace: __schedule+0x2f6/0xb80 schedule+0x67/0xe0 fscache_wait_on_volume_collision.cold+0x80/0x82 __fscache_acquire_volume+0x40d/0x4e0 erofs_fscache_register_volume+0x51/0xe0 [erofs] erofs_fscache_register_fs+0x19c/0x240 [erofs] erofs_fc_fill_super+0x746/0xaf0 [erofs] vfs_get_super+0x7d/0x100 get_tree_nodev+0x16/0x20 erofs_fc_get_tree+0x20/0x30 [erofs] vfs_get_tree+0x24/0xb0 path_mount+0x2fa/0xa90 do_mount+0x7c/0xa0 __x64_sys_mount+0x8b/0xe0 do_syscall_64+0x30/0x60 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Considering that wake_up_bit() is more selective, so fix it by using wait_on_bit() instead of wait_var_event() to wait for the freeing of relinquished volume. In addition because waitqueue_active() is used in wake_up_bit() and clear_bit() doesn't imply any memory barrier, use clear_and_wake_up_bit() to add the missing memory barrier between cursor->flags and waitqueue_active(). Fixes: 62ab63352350 ("fscache: Implement volume registration") Reviewed-by: Jingbo Xu Signed-off-by: Hou Tao Signed-off-by: David Howells Reviewed-by: Jeff Layton Link: https://lore.kernel.org/r/20230113115211.2895845-2-houtao@huaweicloud.com/ # v3 fs/fscache/volume.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6028da3f125fec34425dbd5fec18e85d372b2af6 Author: Christian Hopps Date: Thu Jan 26 11:33:50 2023 -0500 xfrm: fix bug with DSCP copy to v6 from v4 tunnel When copying the DSCP bits for decap-dscp into IPv6 don't assume the outer encap is always IPv6. Instead, as with the inner IPv4 case, copy the DSCP bits from the correctly saved "tos" value in the control block. Fixes: 227620e29509 ("[IPSEC]: Separate inner/outer mode processing on input") Signed-off-by: Christian Hopps Acked-by: Herbert Xu Signed-off-by: Steffen Klassert net/xfrm/xfrm_input.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b7e08a5a63a11627601915473c3b569c1f6c6c06 Author: Yang Yingliang Date: Sun Jan 29 17:37:57 2023 +0800 RDMA/usnic: use iommu_map_atomic() under spin_lock() usnic_uiom_map_sorted_intervals() is called under spin_lock(), iommu_map() might sleep, use iommu_map_atomic() to avoid potential sleep in atomic context. Fixes: e3cf00d0a87f ("IB/usnic: Add Cisco VIC low-level hardware driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20230129093757.637354-1-yangyingliang@huawei.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/usnic/usnic_uiom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 73a876022273cbc9c1db7869a54444ce8b9d085e Author: Colin Foster Date: Fri Jan 27 09:14:27 2023 -0800 net: phy: fix null dereference in phy_attach_direct Commit bc66fa87d4fd ("net: phy: Add link between phy dev and mac dev") introduced a link between net devices and phy devices. It fails to check whether dev is NULL, leading to a NULL dereference error. Fixes: bc66fa87d4fd ("net: phy: Add link between phy dev and mac dev") Signed-off-by: Colin Foster Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c28548012ee2bac55772ef7685138bd1124b80c3 Author: Nicholas Piggin Date: Sat Jan 21 20:01:56 2023 +1000 powerpc/64: Fix perf profiling asynchronous interrupt handlers Interrupt entry sets the soft mask to IRQS_ALL_DISABLED to match the hard irq disabled state. So when should_hard_irq_enable() returns true because we want PMI interrupts in irq handlers, MSR[EE] is enabled but PMIs just get soft-masked. Fix this by clearing IRQS_PMI_DISABLED before enabling MSR[EE]. This also tidies some of the warnings, no need to duplicate them in both should_hard_irq_enable() and do_hard_irq_enable(). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230121100156.2824054-1-npiggin@gmail.com arch/powerpc/include/asm/hw_irq.h | 41 +++++++++++++++++++++++++++------------ arch/powerpc/kernel/dbell.c | 2 +- arch/powerpc/kernel/irq.c | 2 +- arch/powerpc/kernel/time.c | 2 +- 4 files changed, 32 insertions(+), 15 deletions(-) commit bc88ef663265676419555df2dc469a471c0add31 Author: Nicholas Piggin Date: Sat Jan 21 19:53:52 2023 +1000 powerpc/64s: Fix local irq disable when PMIs are disabled When PMI interrupts are soft-masked, local_irq_save() will clear the PMI mask bit, allowing PMIs in and causing a race condition. This causes a deadlock in native_hpte_insert via hash_preload, which depends on PMIs being disabled since commit 8b91cee5eadd ("powerpc/64s/hash: Make hash faults work in NMI context"). native_hpte_insert calls local_irq_save(). It's possible the lpar hash code is also affected when tracing is enabled because __trace_hcall_entry() calls local_irq_save(). Fix this by making arch_local_irq_save() _or_ the IRQS_DISABLED bit into the mask. This was found with the stress_hpt option with a kbuild workload running together with `perf record -g`. Fixes: f442d004806e ("powerpc/64s: Add support to mask perf interrupts and replay them") Fixes: 8b91cee5eadd ("powerpc/64s/hash: Make hash faults work in NMI context") Signed-off-by: Nicholas Piggin [mpe: Just take the fix without the new warning] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230121095352.2823517-1-npiggin@gmail.com arch/powerpc/include/asm/hw_irq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 611792920925fb088ddccbe2783c7f92fdfb6b64 Author: Hyunwoo Kim Date: Thu Jan 26 18:32:50 2023 -0800 netrom: Fix use-after-free caused by accept on already connected socket If you call listen() and accept() on an already connect()ed AF_NETROM socket, accept() can successfully connect. This is because when the peer socket sends data to sendmsg, the skb with its own sk stored in the connected socket's sk->sk_receive_queue is connected, and nr_accept() dequeues the skb waiting in the sk->sk_receive_queue. As a result, nr_accept() allocates and returns a sock with the sk of the parent AF_NETROM socket. And here use-after-free can happen through complex race conditions: ``` cpu0 cpu1 1. socket_2 = socket(AF_NETROM) . . listen(socket_2) accepted_socket = accept(socket_2) 2. socket_1 = socket(AF_NETROM) nr_create() // sk refcount : 1 connect(socket_1) 3. write(accepted_socket) nr_sendmsg() nr_output() nr_kick() nr_send_iframe() nr_transmit_buffer() nr_route_frame() nr_loopback_queue() nr_loopback_timer() nr_rx_frame() nr_process_rx_frame(sk, skb); // sk : socket_1's sk nr_state3_machine() nr_queue_rx_frame() sock_queue_rcv_skb() sock_queue_rcv_skb_reason() __sock_queue_rcv_skb() __skb_queue_tail(list, skb); // list : socket_1's sk->sk_receive_queue 4. listen(socket_1) nr_listen() uaf_socket = accept(socket_1) nr_accept() skb_dequeue(&sk->sk_receive_queue); 5. close(accepted_socket) nr_release() nr_write_internal(sk, NR_DISCREQ) nr_transmit_buffer() // NR_DISCREQ nr_route_frame() nr_loopback_queue() nr_loopback_timer() nr_rx_frame() // sk : socket_1's sk nr_process_rx_frame() // NR_STATE_3 nr_state3_machine() // NR_DISCREQ nr_disconnect() nr_sk(sk)->state = NR_STATE_0; 6. close(socket_1) // sk refcount : 3 nr_release() // NR_STATE_0 sock_put(sk); // sk refcount : 0 sk_free(sk); close(uaf_socket) nr_release() sock_hold(sk); // UAF ``` KASAN report by syzbot: ``` BUG: KASAN: use-after-free in nr_release+0x66/0x460 net/netrom/af_netrom.c:520 Write of size 4 at addr ffff8880235d8080 by task syz-executor564/5128 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/0x461 mm/kasan/report.c:417 kasan_report+0xbf/0x1f0 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_write include/linux/instrumented.h:102 [inline] atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:116 [inline] __refcount_add include/linux/refcount.h:193 [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] nr_release+0x66/0x460 net/netrom/af_netrom.c:520 __sock_release+0xcd/0x280 net/socket.c:650 sock_close+0x1c/0x20 net/socket.c:1365 __fput+0x27c/0xa90 fs/file_table.c:320 task_work_run+0x16f/0x270 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xaa8/0x2950 kernel/exit.c:867 do_group_exit+0xd4/0x2a0 kernel/exit.c:1012 get_signal+0x21c3/0x2450 kernel/signal.c:2859 arch_do_signal_or_restart+0x79/0x5c0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x15f/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:0x7f6c19e3c9b9 Code: Unable to access opcode bytes at 0x7f6c19e3c98f. RSP: 002b:00007fffd4ba2ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: 0000000000000116 RBX: 0000000000000003 RCX: 00007f6c19e3c9b9 RDX: 0000000000000318 RSI: 00000000200bd000 RDI: 0000000000000006 RBP: 0000000000000003 R08: 000000000000000d R09: 000000000000000d R10: 0000000000000000 R11: 0000000000000246 R12: 000055555566a2c0 R13: 0000000000000011 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 5128: 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:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa3/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc+0x5a/0xd0 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] sk_prot_alloc+0x140/0x290 net/core/sock.c:2038 sk_alloc+0x3a/0x7a0 net/core/sock.c:2091 nr_create+0xb6/0x5f0 net/netrom/af_netrom.c:433 __sock_create+0x359/0x790 net/socket.c:1515 sock_create net/socket.c:1566 [inline] __sys_socket_create net/socket.c:1603 [inline] __sys_socket_create net/socket.c:1588 [inline] __sys_socket+0x133/0x250 net/socket.c:1636 __do_sys_socket net/socket.c:1649 [inline] __se_sys_socket net/socket.c:1647 [inline] __x64_sys_socket+0x73/0xb0 net/socket.c:1647 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 Freed by task 5128: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:518 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x13b/0x1a0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:177 [inline] __cache_free mm/slab.c:3394 [inline] __do_kmem_cache_free mm/slab.c:3580 [inline] __kmem_cache_free+0xcd/0x3b0 mm/slab.c:3587 sk_prot_free net/core/sock.c:2074 [inline] __sk_destruct+0x5df/0x750 net/core/sock.c:2166 sk_destruct net/core/sock.c:2181 [inline] __sk_free+0x175/0x460 net/core/sock.c:2192 sk_free+0x7c/0xa0 net/core/sock.c:2203 sock_put include/net/sock.h:1991 [inline] nr_release+0x39e/0x460 net/netrom/af_netrom.c:554 __sock_release+0xcd/0x280 net/socket.c:650 sock_close+0x1c/0x20 net/socket.c:1365 __fput+0x27c/0xa90 fs/file_table.c:320 task_work_run+0x16f/0x270 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xaa8/0x2950 kernel/exit.c:867 do_group_exit+0xd4/0x2a0 kernel/exit.c:1012 get_signal+0x21c3/0x2450 kernel/signal.c:2859 arch_do_signal_or_restart+0x79/0x5c0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x15f/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 ``` To fix this issue, nr_listen() returns -EINVAL for sockets that successfully nr_connect(). Reported-by: syzbot+caa188bdfc1eeafeb418@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Hyunwoo Kim Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/netrom/af_netrom.c | 5 +++++ 1 file changed, 5 insertions(+) commit 54aa39a513dbf2164ca462a19f04519b2407a224 Author: Andrey Konovalov Date: Fri Jan 27 00:35:39 2023 +0300 net: stmmac: do not stop RX_CLK in Rx LPI state for qcs404 SoC Currently in phy_init_eee() the driver unconditionally configures the PHY to stop RX_CLK after entering Rx LPI state. This causes an LPI interrupt storm on my qcs404-base board. Change the PHY initialization so that for "qcom,qcs404-ethqos" compatible device RX_CLK continues to run even in Rx LPI state. Signed-off-by: Andrey Konovalov Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- include/linux/stmmac.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) commit fe6de81b610e5d0b9d2231acff2de74a35482e7d Author: Sathvika Vasireddy Date: Sat Jan 28 18:11:58 2023 +0530 powerpc/kvm: Fix unannotated intra-function call warning objtool throws the following warning: arch/powerpc/kvm/booke.o: warning: objtool: kvmppc_fill_pt_regs+0x30: unannotated intra-function call Fix the warning by setting the value of 'nip' using the _THIS_IP_ macro, without using an assembly bl/mflr sequence to save the instruction pointer. Reported-by: kernel test robot Suggested-by: Michael Ellerman Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230128124158.1066251-1-sv@linux.ibm.com arch/powerpc/kvm/booke.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8afffce6aa3bddc940ac1909627ff1e772b6cbf1 Author: Sathvika Vasireddy Date: Sat Jan 28 18:11:38 2023 +0530 powerpc/85xx: Fix unannotated intra-function call warning objtool throws the following warning: arch/powerpc/kernel/head_85xx.o: warning: objtool: .head.text+0x1a6c: unannotated intra-function call Fix the warning by annotating KernelSPE symbol with SYM_FUNC_START_LOCAL and SYM_FUNC_END macros. Reported-by: kernel test robot Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230128124138.1066176-1-sv@linux.ibm.com arch/powerpc/kernel/head_85xx.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b600de2d7d3a16f9007fad1bdae82a3951a26af2 Author: Yu Kuai Date: Mon Jan 30 09:41:36 2023 +0800 block, bfq: fix uaf for bfqq in bic_set_bfqq() After commit 64dc8c732f5c ("block, bfq: fix possible uaf for 'bfqq->bic'"), bic->bfqq will be accessed in bic_set_bfqq(), however, in some context bic->bfqq will be freed, and bic_set_bfqq() is called with the freed bic->bfqq. Fix the problem by always freeing bfqq after bic_set_bfqq(). Fixes: 64dc8c732f5c ("block, bfq: fix possible uaf for 'bfqq->bic'") Reported-and-tested-by: Shinichiro Kawasaki Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230130014136.591038-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-cgroup.c | 2 +- block/bfq-iosched.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit b67b09733d8a41eec33d5d37be2f8cff8af82a5e Author: Krzysztof Kozlowski Date: Thu Jan 19 13:46:31 2023 +0100 arm64: dts: rockchip: align rk3399 DMC OPP table with bindings Bindings expect certain pattern for OPP table node name and underscores are not allowed: rk3399-rock-pi-4a-plus.dtb: dmc_opp_table: $nodename:0: 'dmc_opp_table' does not match '^opp-table(-[a-z0-9]+)?$' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230119124631.91080-1-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc121b707e816616567683e51fd9194c2309977a Author: Dan Johansen Date: Sat Jan 28 12:24:32 2023 +0100 arm64: dts: rockchip: set sdmmc0 speed to sd-uhs-sdr50 on rock-3a As other rk336x based devices, the Rock 3 Model A has issues with high speed SD cards, so lower the speed to 50 instead of 104 in the same manor has the Quartz64 Model B has. Fixes: 22a442e6586c ("arm64: dts: rockchip: add basic dts for the radxa rock3 model a") Signed-off-by: Dan Johansen Link: https://lore.kernel.org/r/20230128112432.132302-1-strit@manjaro.org Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d796c50f84ca79f1722bb131799e5a5710c4700 Author: Linus Torvalds Date: Sun Jan 29 13:59:43 2023 -0800 Linux 6.2-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab072681eabe1ce0a9a32d4baa1a27a2d046bc4a Merge: bc6bc34b1095 ac8f29aef2f1 Author: Linus Torvalds Date: Sun Jan 29 11:26:49 2023 -0800 Merge tag 'irq_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Borislav Petkov: - Cleanup the firmware node for the new IRQ MSI domain properly, to avoid leaking memory * tag 'irq_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/msi: Free the fwnode created by msi_create_device_irq_domain() commit bc6bc34b1095b64840308fa0fc325c028bd9b89a Merge: 80826e9020af 27b5de622ea3 Author: Linus Torvalds Date: Sun Jan 29 11:17:34 2023 -0800 Merge tag 'x86_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Start checking for -mindirect-branch-cs-prefix clang support too now that LLVM 16 will support it - Fix a NULL ptr deref when suspending with Xen PV - Have a SEV-SNP guest check explicitly for features enabled by the hypervisor and fail gracefully if some are unsupported by the guest instead of failing in a non-obvious and hard-to-debug way - Fix a MSI descriptor leakage under Xen - Mark Xen's MSI domain as supporting MSI-X - Prevent legacy PIC interrupts from being resent in software by marking them level triggered, as they should be, which lead to a NULL ptr deref * tag 'x86_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block acpi: Fix suspend with Xen PV x86/sev: Add SEV-SNP guest feature negotiation support x86/pci/xen: Fixup fallout from the PCI/MSI overhaul x86/pci/xen: Set MSI_FLAG_PCI_MSIX support in Xen MSI domain x86/i8259: Mark legacy PIC interrupts with IRQ_LEVEL commit 80826e9020afc7b8243df302a13521e0020fa9d8 Merge: 803929285af4 9c445d2637c9 Author: Linus Torvalds Date: Sun Jan 29 11:06:47 2023 -0800 Merge tag 'input-for-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - touchpads on HP 15-* laptops switched back to PS/2 emulation mode - a quirk for Clevo PCX0DX/TUXEDO XP1511 to make sure keyboard is responding after resume * tag 'input-for-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add Clevo PCX0DX to i8042 quirk table Revert "Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode" commit 08ddbbdf0b55839ca93a12677a30a1ef24634969 Author: Ricardo Koller Date: Fri Jan 27 21:43:53 2023 +0000 KVM: selftests: aarch64: Test read-only PT memory regions Extend the read-only memslot tests in page_fault_test to test read-only PT (Page table) memslots. Note that this was not allowed before commit 406504c7b040 ("KVM: arm64: Fix S1PTW handling on RO memslots") as all S1PTW faults were treated as writes which resulted in an (unrecoverable) exception inside the guest. Signed-off-by: Ricardo Koller Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230127214353.245671-5-ricarkol@google.com tools/testing/selftests/kvm/aarch64/page_fault_test.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 8b03c97fa6fd442b949b71aeb7545b970b968fe3 Author: Ricardo Koller Date: Fri Jan 27 21:43:52 2023 +0000 KVM: selftests: aarch64: Fix check of dirty log PT write The dirty log checks are mistakenly testing the first page in the page table (PT) memory region instead of the page holding the test data page PTE. This wasn't an issue before commit 406504c7b040 ("KVM: arm64: Fix S1PTW handling on RO memslots") as all PT pages (including the first page) were treated as writes. Fix the page_fault_test dirty logging tests by checking for the right page: the one for the PTE of the data test page. Fixes: a4edf25b3e25 ("KVM: selftests: aarch64: Add dirty logging tests into page_fault_test") Signed-off-by: Ricardo Koller Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230127214353.245671-4-ricarkol@google.com tools/testing/selftests/kvm/aarch64/page_fault_test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 42561751ea918d8f3f54412622735e1f887cb360 Author: Ricardo Koller Date: Fri Jan 27 21:43:51 2023 +0000 KVM: selftests: aarch64: Do not default to dirty PTE pages on all S1PTWs Only Stage1 Page table walks (S1PTW) trying to write into a PTE should result in the PTE page being dirty in the log. However, the dirty log tests in page_fault_test default to treat all S1PTW accesses as writes. Fix the relevant tests by asserting dirty pages only for S1PTW writes, which in these tests only applies to when Hardware management of the Access Flag is enabled. Signed-off-by: Ricardo Koller Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230127214353.245671-3-ricarkol@google.com .../selftests/kvm/aarch64/page_fault_test.c | 93 ++++++++++++++-------- 1 file changed, 60 insertions(+), 33 deletions(-) commit 0dd8d22a887a473f6f11abf556c4f7944ab5ef1d Author: Ricardo Koller Date: Fri Jan 27 21:43:50 2023 +0000 KVM: selftests: aarch64: Relax userfaultfd read vs. write checks Only Stage1 Page table walks (S1PTW) writing a PTE on an unmapped page should result in a userfaultfd write. However, the userfaultfd tests in page_fault_test wrongly assert that any S1PTW is a PTE write. Fix this by relaxing the read vs. write checks in all userfaultfd handlers. Note that this is also an attempt to focus less on KVM (and userfaultfd) behavior, and more on architectural behavior. Also note that after commit 406504c7b040 ("KVM: arm64: Fix S1PTW handling on RO memslots"), the userfaultfd fault (S1PTW with AF on an unmaped PTE page) is actually a read: the translation fault that comes before the permission fault. Signed-off-by: Ricardo Koller Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230127214353.245671-2-ricarkol@google.com .../selftests/kvm/aarch64/page_fault_test.c | 83 +++++++++------------- 1 file changed, 34 insertions(+), 49 deletions(-) commit 803929285af4194d490d5652a64731d613e78b8b Merge: 95e7a450b819 19398821b25a Author: Linus Torvalds Date: Sun Jan 29 10:47:22 2023 -0800 Merge tag 'cxl-fixes-for-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull cxl fixes from Dan Williams: "A couple of fixes for bugs introduced during the merge window. One is a regression, the other was a bug in the CXL AER handler: - Fix a crash regression due to module load order of cxl_pmem.ko - Fix wrong register offset read in CXL AER handling path" * tag 'cxl-fixes-for-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/pmem: Fix nvdimm unregistration when cxl_pmem driver is absent cxl: fix cxl_report_and_clear() RAS UE addr mis-assignment commit 6028acbe3a5f2119a2a6ddd3e06453c87c09cae0 Author: Gavin Shan Date: Fri Jan 27 07:54:51 2023 +0800 KVM: arm64: Allow no running vcpu on saving vgic3 pending table We don't have a running VCPU context to save vgic3 pending table due to KVM_DEV_ARM_VGIC_{GRP_CTRL, SAVE_PENDING_TABLES} command on KVM device "kvm-arm-vgic-v3". The unknown case is caught by kvm-unit-tests. # ./kvm-unit-tests/tests/its-pending-migration WARNING: CPU: 120 PID: 7973 at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3325 \ mark_page_dirty_in_slot+0x60/0xe0 : mark_page_dirty_in_slot+0x60/0xe0 __kvm_write_guest_page+0xcc/0x100 kvm_write_guest+0x7c/0xb0 vgic_v3_save_pending_tables+0x148/0x2a0 vgic_set_common_attr+0x158/0x240 vgic_v3_set_attr+0x4c/0x5c kvm_device_ioctl+0x100/0x160 __arm64_sys_ioctl+0xa8/0xf0 invoke_syscall.constprop.0+0x7c/0xd0 el0_svc_common.constprop.0+0x144/0x160 do_el0_svc+0x34/0x60 el0_svc+0x3c/0x1a0 el0t_64_sync_handler+0xb4/0x130 el0t_64_sync+0x178/0x17c Use vgic_write_guest_lock() to save vgic3 pending table. Reported-by: Zenghui Yu Signed-off-by: Gavin Shan Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230126235451.469087-5-gshan@redhat.com Documentation/virt/kvm/api.rst | 4 +++- arch/arm64/kvm/vgic/vgic-v3.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) commit 2f8b1ad2228a7f1f1e2458864f4bfc1cbdf511ed Author: Gavin Shan Date: Fri Jan 27 07:54:50 2023 +0800 KVM: arm64: Allow no running vcpu on restoring vgic3 LPI pending status We don't have a running VCPU context to restore vgic3 LPI pending status due to command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_RESTORE_TABLES} on KVM device "kvm-arm-vgic-its". Use vgic_write_guest_lock() to restore vgic3 LPI pending status. Signed-off-by: Gavin Shan Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230126235451.469087-4-gshan@redhat.com Documentation/virt/kvm/api.rst | 8 +++++--- arch/arm64/kvm/vgic/vgic-v3.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) commit a23eaf9368aafa4defcc8904b20391b6ea07bb1e Author: Gavin Shan Date: Fri Jan 27 07:54:48 2023 +0800 KVM: arm64: Add helper vgic_write_guest_lock() Currently, the unknown no-running-vcpu sites are reported when a dirty page is tracked by mark_page_dirty_in_slot(). Until now, the only known no-running-vcpu site is saving vgic/its tables through KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_SAVE_TABLES} command on KVM device "kvm-arm-vgic-its". Unfortunately, there are more unknown sites to be handled and no-running-vcpu context will be allowed in these sites: (1) KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_RESTORE_TABLES} command on KVM device "kvm-arm-vgic-its" to restore vgic/its tables. The vgic3 LPI pending status could be restored. (2) Save vgic3 pending table through KVM_DEV_ARM_{VGIC_GRP_CTRL, VGIC_SAVE_PENDING_TABLES} command on KVM device "kvm-arm-vgic-v3". In order to handle those unknown cases, we need a unified helper vgic_write_guest_lock(). struct vgic_dist::save_its_tables_in_progress is also renamed to struct vgic_dist::save_tables_in_progress. No functional change intended. Suggested-by: Oliver Upton Signed-off-by: Gavin Shan Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230126235451.469087-3-gshan@redhat.com arch/arm64/kvm/vgic/vgic-its.c | 13 +++++-------- arch/arm64/kvm/vgic/vgic.h | 14 ++++++++++++++ include/kvm/arm_vgic.h | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) commit 95e7a450b8190673675836bfef236262ceff084a Author: Vlastimil Babka Date: Fri Jan 13 18:33:45 2023 +0100 Revert "mm/compaction: fix set skip in fast_find_migrateblock" This reverts commit 7efc3b7261030da79001c00d92bc3392fd6c664c. We have got openSUSE reports (Link 1) for 6.1 kernel with khugepaged stalling CPU for long periods of time. Investigation of tracepoint data shows that compaction is stuck in repeating fast_find_migrateblock() based migrate page isolation, and then fails to migrate all isolated pages. Commit 7efc3b726103 ("mm/compaction: fix set skip in fast_find_migrateblock") was suspected as it was merged in 6.1 and in theory can indeed remove a termination condition for fast_find_migrateblock() under certain conditions, as it removes a place that always marks a scanned pageblock from being re-scanned. There are other such places, but those can be skipped under certain conditions, which seems to match the tracepoint data. Testing of revert also appears to have resolved the issue, thus revert the commit until a more robust solution for the original problem is developed. It's also likely this will fix qemu stalls with 6.1 kernel reported in Link 2, but that is not yet confirmed. Link: https://bugzilla.suse.com/show_bug.cgi?id=1206848 Link: https://lore.kernel.org/kvm/b8017e09-f336-3035-8344-c549086c2340@kernel.org/ Link: https://lore.kernel.org/lkml/20230125134434.18017-1-mgorman@techsingularity.net/ Fixes: 7efc3b726103 ("mm/compaction: fix set skip in fast_find_migrateblock") Cc: Tested-by: Pedro Falcato Acked-by: Mel Gorman Signed-off-by: Vlastimil Babka Signed-off-by: Linus Torvalds mm/compaction.c | 1 + 1 file changed, 1 insertion(+) commit 5d9745cead1f121974322b94ceadfb4d1e67960e Author: Nikita Zhandarovich Date: Thu Jan 26 10:52:30 2023 -0800 RDMA/irdma: Fix potential NULL-ptr-dereference in_dev_get() can return NULL which will cause a failure once idev is dereferenced in in_dev_for_each_ifa_rtnl(). This patch adds a check for NULL value in idev beforehand. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 146b9756f14c ("RDMA/irdma: Add connection manager") Signed-off-by: Nikita Zhandarovich Link: https://lore.kernel.org/r/20230126185230.62464-1-n.zhandarovich@fintech.ru Reviewed-by: Sindhu Devale Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/cm.c | 3 +++ 1 file changed, 3 insertions(+) commit c91d713630848460de8669e6570307b7e559863b Author: Dan Williams Date: Wed Jan 25 12:23:46 2023 -0800 nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE Commit 6e9f05dc66f9 ("libnvdimm/pfn_dev: increase MAX_STRUCT_PAGE_SIZE") ...updated MAX_STRUCT_PAGE_SIZE to account for sizeof(struct page) potentially doubling in the case of CONFIG_KMSAN=y. Unfortunately this doubles the amount of capacity stolen from user addressable capacity for everyone, regardless of whether they are using the debug option. Revert that change, mandate that MAX_STRUCT_PAGE_SIZE never exceed 64, but allow for debug scenarios to proceed with creating debug sized page maps with a compile option to support debug scenarios. Note that this only applies to cases where the page map is permanent, i.e. stored in a reservation of the pmem itself ("--map=dev" in "ndctl create-namespace" terms). For the "--map=mem" case, since the allocation is ephemeral for the lifespan of the namespace, there are no explicit restriction. However, the implicit restriction, of having enough available "System RAM" to store the page map for the typically large pmem, still applies. Fixes: 6e9f05dc66f9 ("libnvdimm/pfn_dev: increase MAX_STRUCT_PAGE_SIZE") Cc: Cc: Alexander Potapenko Cc: Marco Elver Reported-by: Jeff Moyer Acked-by: Yu Zhao Link: https://lore.kernel.org/r/167467815773.463042.7022545814443036382.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/nvdimm/Kconfig | 19 +++++++++++++++++++ drivers/nvdimm/nd.h | 2 +- drivers/nvdimm/pfn_devs.c | 42 +++++++++++++++++++++++++++--------------- 3 files changed, 47 insertions(+), 16 deletions(-) commit c96618275234ad03d44eafe9f8844305bb44fda4 Author: Linus Torvalds Date: Sat Jan 28 11:17:57 2023 -0800 Fix up more non-executable files marked executable Joe found another DT file that shouldn't be executable, and that frustrated me enough that I went hunting with this script: git ls-files -s | grep '^100755' | cut -f2 | xargs grep -L '^#!' and that found another file that shouldn't have been marked executable either, despite being in the scripts directory. Maybe these two are the last ones at least for now. But I'm sure we'll be back in a few years, fixing things up again. Fixes: 8c6789f4e2d4 ("ASoC: dt-bindings: Add Everest ES8326 audio CODEC") Fixes: 4d8e5cd233db ("locking/atomics: Fix scripts/atomic/ script permissions") Reported-by: Joe Perches Signed-off-by: Linus Torvalds Documentation/devicetree/bindings/sound/everest,es8326.yaml | 0 scripts/atomic/atomics.tbl | 0 2 files changed, 0 insertions(+), 0 deletions(-) commit 2543fdbd5cd3bb7d72a6c810b431ba17778a607d Merge: 5af6ce704936 a34dc4a9b9e2 Author: Linus Torvalds Date: Sat Jan 28 10:52:51 2023 -0800 Merge tag '6.2-rc5-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull ksmbd server fixes from Steve French: "Four smb3 server fixes, all also for stable: - fix for signing bug - fix to more strictly check packet length - add a max connections parm to limit simultaneous connections - fix error message flood that can occur with newer Samba xattr format" * tag '6.2-rc5-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: downgrade ndr version error message to debug ksmbd: limit pdu length size according to connection status ksmbd: do not sign response to session request for guest login ksmbd: add max connections parameter commit bf29ce87ba137307a4465c45be5bfe633ccf6074 Merge: 1ca7fca34931 60ce26d10e58 Author: Greg Kroah-Hartman Date: Sat Jan 28 19:18:37 2023 +0100 Merge tag 'fpga-for-6.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-linus Xy writes: FPGA Manager changes for 6.2-final stratix10-soc: - Zheng's change fixes return value check Intel m10 bmc secure update: - Ilpo's change fixes probe rollback All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-6.2 branch) Signed-off-by: Xu Yilun * tag 'fpga-for-6.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: m10bmc-sec: Fix probe rollback fpga: stratix10-soc: Fix return value check in s10_ops_write_init() commit a6efc42a86c0c87cfe2f1c3d1f09a4c9b13ba890 Author: Andrei Gherzan Date: Thu Jan 26 16:55:48 2023 +0000 selftest: net: Improve IPV6_TCLASS/IPV6_HOPLIMIT tests apparmor compatibility "tcpdump" is used to capture traffic in these tests while using a random, temporary and not suffixed file for it. This can interfere with apparmor configuration where the tool is only allowed to read from files with 'known' extensions. The MINE type application/vnd.tcpdump.pcap was registered with IANA for pcap files and .pcap is the extension that is both most common but also aligned with standard apparmor configurations. See TCPDUMP(8) for more details. This improves compatibility with standard apparmor configurations by using ".pcap" as the file extension for the tests' temporary files. Signed-off-by: Andrei Gherzan Signed-off-by: David S. Miller tools/testing/selftests/net/cmsg_ipv6.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ca7fca349316231bbaa68d16f819a08d683c5a7 Author: Johan Hovold Date: Fri Jan 27 10:40:15 2023 +0000 nvmem: qcom-spmi-sdam: fix module autoloading Add the missing module device table so that the driver can be autoloaded when built as a module. Fixes: 40ce9798794f ("nvmem: add QTI SDAM driver") Cc: stable@vger.kernel.org # 5.6 Reviewed-by: Bjorn Andersson Signed-off-by: Johan Hovold Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230127104015.23839-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/qcom-spmi-sdam.c | 1 + 1 file changed, 1 insertion(+) commit 0c4862b1c1465e473bc961a02765490578bf5c20 Author: Russell King (Oracle) Date: Fri Jan 27 10:40:14 2023 +0000 nvmem: core: fix return value Dan Carpenter points out that the return code was not set in commit 60c8b4aebd8e ("nvmem: core: fix cleanup after dev_set_name()"), but this is not the only issue - we also need to zero wp_gpio to prevent gpiod_put() being called on an error value. Fixes: 560181d3ace6 ("nvmem: core: fix cleanup after dev_set_name()") Cc: stable@vger.kernel.org Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Russell King (Oracle) Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230127104015.23839-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 1 + 1 file changed, 1 insertion(+) commit db3546d58b5a0fa581d9c9f2bdc2856fa6c5e43e Author: Michael Walle Date: Fri Jan 27 10:40:13 2023 +0000 nvmem: core: fix cell removal on error nvmem_add_cells() could return an error after some cells are already added to the provider. In this case, the added cells are not removed. Remove any registered cells if nvmem_add_cells() fails. Fixes: fa72d847d68d7 ("nvmem: check the return value of nvmem_add_cells()") Cc: stable@vger.kernel.org Signed-off-by: Michael Walle Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230127104015.23839-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit edcf2fb660526b5ed29f93bd17328a2b4835c8b2 Author: Michael Walle Date: Fri Jan 27 10:40:12 2023 +0000 nvmem: core: fix device node refcounting In of_nvmem_cell_get(), of_get_next_parent() is used on cell_np. This will decrement the refcount on cell_np, but cell_np is still used later in the code. Use of_get_parent() instead and of_node_put() in the appropriate places. Fixes: 69aba7948cbe ("nvmem: Add a simple NVMEM framework for consumers") Fixes: 7ae6478b304b ("nvmem: core: rework nvmem cell instance creation") Cc: stable@vger.kernel.org Signed-off-by: Michael Walle Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230127104015.23839-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit ab3428cfd9aa2f3463ee4b2909b5bb2193bd0c4a Author: Russell King (Oracle) Date: Fri Jan 27 10:40:11 2023 +0000 nvmem: core: fix registration vs use race The i.MX6 CPU frequency driver sometimes fails to register at boot time due to nvmem_cell_read_u32() sporadically returning -ENOENT. This happens because there is a window where __nvmem_device_get() in of_nvmem_cell_get() is able to return the nvmem device, but as cells have been setup, nvmem_find_cell_entry_by_node() returns NULL. The occurs because the nvmem core registration code violates one of the fundamental principles of kernel programming: do not publish data structures before their setup is complete. Fix this by making nvmem core code conform with this principle. Fixes: eace75cfdcf7 ("nvmem: Add a simple NVMEM framework for nvmem providers") Cc: stable@vger.kernel.org Signed-off-by: Russell King (Oracle) Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230127104015.23839-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 560181d3ace61825f4ca9dd3481d6c0ee6709fa8 Author: Russell King (Oracle) Date: Fri Jan 27 10:40:10 2023 +0000 nvmem: core: fix cleanup after dev_set_name() If dev_set_name() fails, we leak nvmem->wp_gpio as the cleanup does not put this. While a minimal fix for this would be to add the gpiod_put() call, we can do better if we split device_register(), and use the tested nvmem_release() cleanup code by initialising the device early, and putting the device. This results in a slightly larger fix, but results in clear code. Note: this patch depends on "nvmem: core: initialise nvmem->id early" and "nvmem: core: remove nvmem_config wp_gpio". Fixes: 5544e90c8126 ("nvmem: core: add error handling for dev_set_name") Cc: stable@vger.kernel.org Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Russell King (Oracle) [Srini: Fixed subject line and error code handing with wp_gpio while applying.] Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230127104015.23839-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 569653f022a29a1a44ea9de5308b657228303fa5 Author: Russell King (Oracle) Date: Fri Jan 27 10:40:09 2023 +0000 nvmem: core: remove nvmem_config wp_gpio No one provides wp_gpio, so let's remove it to avoid issues with the nvmem core putting this gpio. Cc: stable@vger.kernel.org Signed-off-by: Russell King (Oracle) Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230127104015.23839-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 4 +--- include/linux/nvmem-provider.h | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) commit 3bd747c7ea13cb145f0d84444e00df928b0842d9 Author: Russell King (Oracle) Date: Fri Jan 27 10:40:08 2023 +0000 nvmem: core: initialise nvmem->id early The error path for wp_gpio attempts to free the IDA nvmem->id, but this has yet to be assigned, so will always be zero - leaking the ID allocated by ida_alloc(). Fix this by moving the initialisation of nvmem->id earlier. Fixes: f7d8d7dcd978 ("nvmem: fix memory leak in error path") Cc: stable@vger.kernel.org Signed-off-by: Russell King (Oracle) Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230127104015.23839-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c151d5ed8e8fe0474bd61dce7f2076ca5916c683 Author: Samuel Holland Date: Fri Jan 27 10:40:07 2023 +0000 nvmem: sunxi_sid: Always use 32-bit MMIO reads The SID SRAM on at least some SoCs (A64 and D1) returns different values when read with bus cycles narrower than 32 bits. This is not immediately obvious, because memcpy_fromio() uses word-size accesses as long as enough data is being copied. The vendor driver always uses 32-bit MMIO reads, so do the same here. This is faster than the register-based method, which is currently used as a workaround on A64. And it fixes the values returned on D1, where the SRAM method was being used. The special case for the last word is needed to maintain .word_size == 1 for sysfs ABI compatibility, as noted previously in commit de2a3eaea552 ("nvmem: sunxi_sid: Optimize register read-out method"). Fixes: 07ae4fde9efa ("nvmem: sunxi_sid: Add support for D1 variant") Cc: stable@vger.kernel.org Tested-by: Heiko Stuebner Signed-off-by: Samuel Holland Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230127104015.23839-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/sunxi_sid.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit b0576ade3aaf24b376ea1a4406ae138e2a22b0c0 Author: Jiasheng Jiang Date: Fri Jan 27 10:40:06 2023 +0000 nvmem: brcm_nvram: Add check for kzalloc Add the check for the return value of kzalloc in order to avoid NULL pointer dereference. Fixes: 6e977eaa8280 ("nvmem: brcm_nvram: parse NVRAM content into NVMEM cells") Cc: stable@vger.kernel.org Signed-off-by: Jiasheng Jiang Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230127104015.23839-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/brcm_nvram.c | 3 +++ 1 file changed, 3 insertions(+) commit 906ad3c9bf66e3c6dd4ebe14a7af1b339a2afacf Merge: 60bd1d9008a5 e3d6d152a1cb Author: David S. Miller Date: Sat Jan 28 13:20:21 2023 +0000 Merge branch 't7xx-pm-fixes' Kornel Dulęba says: ==================== net: wwan: t7xx: Fix Runtime PM implementation d10b3a695ba0 ("net: wwan: t7xx: Runtime PM") introduced support for Runtime PM for this driver, but due to a bug in the initialization logic the usage refcount would never reach 0, leaving the feature unused. This patchset addresses that, together with a bug found after runtime suspend was enabled. ==================== Signed-off-by: David S. Miller commit e3d6d152a1cbdee25f2e3962009a2751b54e2297 Author: Kornel Dulęba Date: Thu Jan 26 13:25:35 2023 +0000 net: wwan: t7xx: Fix Runtime PM initialization For PCI devices the Runtime PM refcount is incremented twice: 1. During device enumeration with a call to pm_runtime_forbid. 2. Just before a driver probe logic is called. Because of that in order to enable Runtime PM on a given device we have to call both pm_runtime_allow and pm_runtime_put_noidle, once it's ready to be runtime suspended. The former was missing causing the pm refcount to never reach 0. Fixes: d10b3a695ba0 ("net: wwan: t7xx: Runtime PM") Signed-off-by: Kornel Dulęba Signed-off-by: David S. Miller drivers/net/wwan/t7xx/t7xx_pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 364d0221f1788e5225006ba7a0026e5968431c29 Author: Kornel Dulęba Date: Thu Jan 26 13:25:34 2023 +0000 net: wwan: t7xx: Fix Runtime PM resume sequence Resume device before calling napi_schedule, instead of doing in the napi poll routine. Polling is done in softrq context. We can't call the PM resume logic from there as it's blocking and not irq safe. In order to make it work modify the interrupt handler to be run from irq handler thread. Fixes: 5545b7b9f294 ("net: wwan: t7xx: Add NAPI support") Signed-off-by: Kornel Dulęba Signed-off-by: David S. Miller drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c | 11 ++++++++++- drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c | 29 ++++++++++++++++++++--------- drivers/net/wwan/t7xx/t7xx_netdev.c | 16 +++++++++++++++- 3 files changed, 45 insertions(+), 11 deletions(-) commit 60bd1d9008a50cc78c4033a16a6f5d78210d481c Author: Jeremy Kerr Date: Thu Jan 26 14:45:51 2023 +0800 net: mctp: purge receive queues on sk destruction We may have pending skbs in the receive queue when the sk is being destroyed; add a destructor to purge the queue. MCTP doesn't use the error queue, so only the receive_queue is purged. Fixes: 833ef3b91de6 ("mctp: Populate socket implementation") Signed-off-by: Jeremy Kerr Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20230126064551.464468-1-jk@codeconstruct.com.au Signed-off-by: Jakub Kicinski net/mctp/af_mctp.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 422ae7d9c7221e8d4c8526d0f54106307d69d2dc Author: Andre Kalb Date: Wed Jan 25 19:23:26 2023 +0100 net: phy: dp83822: Fix null pointer access on DP83825/DP83826 devices The probe() function is only used for the DP83822 PHY, leaving the private data pointer uninitialized for the smaller DP83825/26 models. While all uses of the private data structure are hidden in 82822 specific callbacks, configuring the interrupt is shared across all models. This causes a NULL pointer dereference on the smaller PHYs as it accesses the private data unchecked. Verifying the pointer avoids that. Fixes: 5dc39fd5ef35 ("net: phy: DP83822: Add ability to advertise Fiber connection") Signed-off-by: Andre Kalb Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/Y9FzniUhUtbaGKU7@pc6682 Signed-off-by: Jakub Kicinski drivers/net/phy/dp83822.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4f876bfdb731a320089c5a64f8fa15fbba14418c Merge: 53466ebdec61 e18c6da62edc Author: Takashi Iwai Date: Sat Jan 28 09:21:36 2023 +0100 Merge tag 'asoc-fix-v6.2-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.2 An unfortunately large batch of fixes here, the numbers amplified by several repeated fixes for patterns of bugs in multiple drivers. Most of this is in the x86 drivers which are very actively developed, the implementation of PCI shutdown is a fix for issues with spamming warnings into the logs with a leaked reference to the i915 driver. commit 29de68c2b32ce58d64dea496d281e25ad0f551bd Author: Natalia Petrova Date: Wed Jan 25 16:48:31 2023 +0300 net: qrtr: free memory on error path in radix_tree_insert() Function radix_tree_insert() returns errors if the node hasn't been initialized and added to the tree. "kfree(node)" and return value "NULL" of node_get() help to avoid using unclear node in other calls. Found by Linux Verification Center (linuxtesting.org) with SVACE. Cc: # 5.7 Fixes: 0c2204a4ad71 ("net: qrtr: Migrate nameservice to kernel from userspace") Signed-off-by: Natalia Petrova Reviewed-by: Simon Horman Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230125134831.8090-1-n.petrova@fintech.ru Signed-off-by: Jakub Kicinski net/qrtr/ns.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 14caefcf9837a2be765a566005ad82cd0d2a429f Author: Hyunwoo Kim Date: Wed Jan 25 02:59:44 2023 -0800 net/rose: Fix to not accept on connected socket If you call listen() and accept() on an already connect()ed rose socket, accept() can successfully connect. This is because when the peer socket sends data to sendmsg, the skb with its own sk stored in the connected socket's sk->sk_receive_queue is connected, and rose_accept() dequeues the skb waiting in the sk->sk_receive_queue. This creates a child socket with the sk of the parent rose socket, which can cause confusion. Fix rose_listen() to return -EINVAL if the socket has already been successfully connected, and add lock_sock to prevent this issue. Signed-off-by: Hyunwoo Kim Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230125105944.GA133314@ubuntu Signed-off-by: Jakub Kicinski net/rose/af_rose.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ffffd2454a7a1bc9f7242b12c4cc0b05c12692b4 Author: Íñigo Huguet Date: Wed Jan 25 15:35:13 2023 +0100 sfc: correctly advertise tunneled IPv6 segmentation Recent sfc NICs are TSO capable for some tunnel protocols. However, it was not working properly because the feature was not advertised in hw_enc_features, but in hw_features only. Setting up a GENEVE tunnel and using iperf3 to send IPv4 and IPv6 traffic to the tunnel show, with tcpdump, that the IPv4 packets still had ~64k size but the IPv6 ones had only ~1500 bytes (they had been segmented by software, not offloaded). With this patch segmentation is offloaded as expected and the traffic is correctly received at the other end. Fixes: 24b2c3751aa3 ("sfc: advertise encapsulated offloads on EF10") Reported-by: Tianhao Zhao Signed-off-by: Íñigo Huguet Acked-by: Martin Habets Link: https://lore.kernel.org/r/20230125143513.25841-1-ihuguet@redhat.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/efx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0548c5f26a0fefa721b29be2bfff1c44f15b6d73 Merge: 7d2c89b32587 5416c9aea832 Author: Jakub Kicinski Date: Fri Jan 27 23:32:02 2023 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== bpf 2023-01-27 We've added 10 non-merge commits during the last 9 day(s) which contain a total of 10 files changed, 170 insertions(+), 59 deletions(-). The main changes are: 1) Fix preservation of register's parent/live fields when copying range-info, from Eduard Zingerman. 2) Fix an off-by-one bug in bpf_mem_cache_idx() to select the right cache, from Hou Tao. 3) Fix stack overflow from infinite recursion in sock_map_close(), from Jakub Sitnicki. 4) Fix missing btf_put() in register_btf_id_dtor_kfuncs()'s error path, from Jiri Olsa. 5) Fix a splat from bpf_setsockopt() via lsm_cgroup/socket_sock_rcv_skb, from Kui-Feng Lee. 6) Fix bpf_send_signal[_thread]() helpers to hold a reference on the task, from Yonghong Song. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Fix the kernel crash caused by bpf_setsockopt(). selftests/bpf: Cover listener cloning with progs attached to sockmap selftests/bpf: Pass BPF skeleton to sockmap_listen ops tests bpf, sockmap: Check for any of tcp_bpf_prots when cloning a listener bpf, sockmap: Don't let sock_map_{close,destroy,unhash} call itself bpf: Add missing btf_put to register_btf_id_dtor_kfuncs selftests/bpf: Verify copy_register_state() preserves parent/live fields bpf: Fix to preserve reg parent/live fields when copying range info bpf: Fix a possible task gone issue with bpf_send_signal[_thread]() helpers bpf: Fix off-by-one error in bpf_mem_cache_idx() ==================== Link: https://lore.kernel.org/r/20230127215820.4993-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 7d2c89b325874a35564db5630a459966afab04cc Author: Alexander Duyck Date: Thu Jan 26 11:06:59 2023 -0800 skb: Do mix page pool and page referenced frags in GRO GSO should not merge page pool recycled frames with standard reference counted frames. Traditionally this didn't occur, at least not often. However as we start looking at adding support for wireless adapters there becomes the potential to mix the two due to A-MSDU repartitioning frames in the receive path. There are possibly other places where this may have occurred however I suspect they must be few and far between as we have not seen this issue until now. Fixes: 53e0961da1c7 ("page_pool: add frag page recycling support in page pool") Reported-by: Felix Fietkau Signed-off-by: Alexander Duyck Acked-by: Ilias Apalodimas Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/167475990764.1934330.11960904198087757911.stgit@localhost.localdomain Signed-off-by: Jakub Kicinski net/core/gro.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ff445b8397745ea94675162faa0e9b0079ca521d Author: Arınç ÜNAL Date: Thu Jan 26 22:01:11 2023 +0300 net: dsa: mt7530: fix tristate and help description Fix description for tristate and help sections which include inaccurate information. Signed-off-by: Arınç ÜNAL Link: https://lore.kernel.org/r/20230126190110.9124-1-arinc.unal@arinc9.com Signed-off-by: Jakub Kicinski drivers/net/dsa/Kconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3ac77ecd9a8356c11754def95d657df026c6c135 Merge: 28b4387f0ec0 a3191c4d86c5 Author: Jakub Kicinski Date: Fri Jan 27 22:28:01 2023 -0800 Merge branch 'net-xdp-execute-xdp_do_flush-before-napi_complete_done' Magnus Karlsson says: ==================== net: xdp: execute xdp_do_flush() before napi_complete_done() Make sure that xdp_do_flush() is always executed before napi_complete_done(). This is important for two reasons. First, a redirect to an XSKMAP assumes that a call to xdp_do_redirect() from napi context X on CPU Y will be followed by a xdp_do_flush() from the same napi context and CPU. This is not guaranteed if the napi_complete_done() is executed before xdp_do_flush(), as it tells the napi logic that it is fine to schedule napi context X on another CPU. Details from a production system triggering this bug using the veth driver can be found in [1]. The second reason is that the XDP_REDIRECT logic in itself relies on being inside a single NAPI instance through to the xdp_do_flush() call for RCU protection of all in-kernel data structures. Details can be found in [2]. The drivers have only been compile-tested since I do not own any of the HW below. So if you are a maintainer, it would be great if you could take a quick look to make sure I did not mess something up. Note that these were the drivers I found that violated the ordering by running a simple script and manually checking the ones that came up as potential offenders. But the script was not perfect in any way. There might still be offenders out there, since the script can generate false negatives. [1] https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com [2] https://lore.kernel.org/all/20210624160609.292325-1-toke@redhat.com/ ==================== Link: https://lore.kernel.org/r/20230125074901.2737-1-magnus.karlsson@gmail.com Signed-off-by: Jakub Kicinski commit a3191c4d86c5d3bd35b00dfde6910b88391436a0 Author: Magnus Karlsson Date: Wed Jan 25 08:49:01 2023 +0100 dpaa2-eth: execute xdp_do_flush() before napi_complete_done() Make sure that xdp_do_flush() is always executed before napi_complete_done(). This is important for two reasons. First, a redirect to an XSKMAP assumes that a call to xdp_do_redirect() from napi context X on CPU Y will be followed by a xdp_do_flush() from the same napi context and CPU. This is not guaranteed if the napi_complete_done() is executed before xdp_do_flush(), as it tells the napi logic that it is fine to schedule napi context X on another CPU. Details from a production system triggering this bug using the veth driver can be found following the first link below. The second reason is that the XDP_REDIRECT logic in itself relies on being inside a single NAPI instance through to the xdp_do_flush() call for RCU protection of all in-kernel data structures. Details can be found in the second link below. Fixes: d678be1dc1ec ("dpaa2-eth: add XDP_REDIRECT support") Signed-off-by: Magnus Karlsson Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com Link: https://lore.kernel.org/all/20210624160609.292325-1-toke@redhat.com/ Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b534013798b77f81a36f36dafd59bab9de837619 Author: Magnus Karlsson Date: Wed Jan 25 08:49:00 2023 +0100 dpaa_eth: execute xdp_do_flush() before napi_complete_done() Make sure that xdp_do_flush() is always executed before napi_complete_done(). This is important for two reasons. First, a redirect to an XSKMAP assumes that a call to xdp_do_redirect() from napi context X on CPU Y will be followed by a xdp_do_flush() from the same napi context and CPU. This is not guaranteed if the napi_complete_done() is executed before xdp_do_flush(), as it tells the napi logic that it is fine to schedule napi context X on another CPU. Details from a production system triggering this bug using the veth driver can be found following the first link below. The second reason is that the XDP_REDIRECT logic in itself relies on being inside a single NAPI instance through to the xdp_do_flush() call for RCU protection of all in-kernel data structures. Details can be found in the second link below. Fixes: a1e031ffb422 ("dpaa_eth: add XDP_REDIRECT support") Signed-off-by: Magnus Karlsson Acked-by: Toke Høiland-Jørgensen 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: Camelia Groza Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ad7e615f646c9b5b2cf655cdfb9d91a28db4f25a Author: Magnus Karlsson Date: Wed Jan 25 08:48:59 2023 +0100 virtio-net: execute xdp_do_flush() before napi_complete_done() Make sure that xdp_do_flush() is always executed before napi_complete_done(). This is important for two reasons. First, a redirect to an XSKMAP assumes that a call to xdp_do_redirect() from napi context X on CPU Y will be followed by a xdp_do_flush() from the same napi context and CPU. This is not guaranteed if the napi_complete_done() is executed before xdp_do_flush(), as it tells the napi logic that it is fine to schedule napi context X on another CPU. Details from a production system triggering this bug using the veth driver can be found following the first link below. The second reason is that the XDP_REDIRECT logic in itself relies on being inside a single NAPI instance through to the xdp_do_flush() call for RCU protection of all in-kernel data structures. Details can be found in the second link below. Fixes: 186b3c998c50 ("virtio-net: support XDP_REDIRECT") Signed-off-by: Magnus Karlsson Acked-by: Toke Høiland-Jørgensen 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: Michael S. Tsirkin Signed-off-by: Jakub Kicinski drivers/net/virtio_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 12b5717990c81fc2f6f2aa9d53d960b916478d4f Author: Magnus Karlsson Date: Wed Jan 25 08:48:58 2023 +0100 lan966x: execute xdp_do_flush() before napi_complete_done() Make sure that xdp_do_flush() is always executed before napi_complete_done(). This is important for two reasons. First, a redirect to an XSKMAP assumes that a call to xdp_do_redirect() from napi context X on CPU Y will be followed by a xdp_do_flush() from the same napi context and CPU. This is not guaranteed if the napi_complete_done() is executed before xdp_do_flush(), as it tells the napi logic that it is fine to schedule napi context X on another CPU. Details from a production system triggering this bug using the veth driver can be found following the first link below. The second reason is that the XDP_REDIRECT logic in itself relies on being inside a single NAPI instance through to the xdp_do_flush() call for RCU protection of all in-kernel data structures. Details can be found in the second link below. Fixes: a825b611c7c1 ("net: lan966x: Add support for XDP_REDIRECT") Signed-off-by: Magnus Karlsson Acked-by: Toke Høiland-Jørgensen Acked-by: Steen Hegelund Link: https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com Link: https://lore.kernel.org/all/20210624160609.292325-1-toke@redhat.com/ Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2ccce20d51faa0178086163ccb6c84a099a87ab4 Author: Magnus Karlsson Date: Wed Jan 25 08:48:57 2023 +0100 qede: execute xdp_do_flush() before napi_complete_done() Make sure that xdp_do_flush() is always executed before napi_complete_done(). This is important for two reasons. First, a redirect to an XSKMAP assumes that a call to xdp_do_redirect() from napi context X on CPU Y will be followed by a xdp_do_flush() from the same napi context and CPU. This is not guaranteed if the napi_complete_done() is executed before xdp_do_flush(), as it tells the napi logic that it is fine to schedule napi context X on another CPU. Details from a production system triggering this bug using the veth driver can be found following the first link below. The second reason is that the XDP_REDIRECT logic in itself relies on being inside a single NAPI instance through to the xdp_do_flush() call for RCU protection of all in-kernel data structures. Details can be found in the second link below. Fixes: d1b25b79e162b ("qede: add .ndo_xdp_xmit() and XDP_REDIRECT support") Signed-off-by: Magnus Karlsson Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com Link: https://lore.kernel.org/all/20210624160609.292325-1-toke@redhat.com/ Signed-off-by: Jakub Kicinski drivers/net/ethernet/qlogic/qede/qede_fp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5af6ce7049365952f7f023155234fe091693ead1 Merge: 90aaef4e35c4 b7ab9161cf5d Author: Linus Torvalds Date: Fri Jan 27 17:41:47 2023 -0800 Merge tag '6.2-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fix from Steve French: "Fix for reconnect oops in smbdirect (RDMA), also is marked for stable" * tag '6.2-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Fix oops due to uncleared server->smbd_conn in reconnect commit 90aaef4e35c4a74b0f1593d06e39eda867ef13d3 Merge: f851453bf195 db3ba974c2bc Author: Linus Torvalds Date: Fri Jan 27 16:16:57 2023 -0800 Merge tag 'block-6.2-2023-01-27' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "Minor tweaks for this release: - NVMe pull request via Christoph: - Flush initial scan_work for async probe (Keith Busch) - Fix passthrough csi check (Keith Busch) - Fix nvme-fc initialization order (Ross Lagerwall) - Fix for tearing down non-started device in ublk (Ming)" * tag 'block-6.2-2023-01-27' of git://git.kernel.dk/linux: block: ublk: move ublk_chr_class destroying after devices are removed nvme: fix passthrough csi check nvme-pci: flush initial scan_work for async probe nvme-fc: fix initialization order commit f851453bf19554a42eb480b65436b9500c3cf392 Merge: 28cca23da724 ef5c600adb1d Author: Linus Torvalds Date: Fri Jan 27 16:15:06 2023 -0800 Merge tag 'io_uring-6.2-2023-01-27' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "Two small fixes for this release: - Sanitize how async prep is done for drain requests, so we ensure that it always gets done (Dylan) - A ring provided buffer recycling fix for multishot receive (me)" * tag 'io_uring-6.2-2023-01-27' of git://git.kernel.dk/linux: io_uring: always prep_async for drain requests io_uring/net: cache provided buffer group value for multishot receives commit 28cca23da7240df597240a492a7a7d4ce990026b Merge: d786f0fe5e54 be0d8f48ad97 Author: Linus Torvalds Date: Fri Jan 27 16:09:12 2023 -0800 Merge tag 'hardening-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening fixes from Kees Cook: - Split slow memcpy tests into MEMCPY_SLOW_KUNIT_TEST - Reorganize gcc-plugin includes for GCC 13 - Silence bcache memcpy run-time false positive warnings * tag 'hardening-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: bcache: Silence memcpy() run-time false positive warnings gcc-plugins: Reorganize gimple includes for GCC 13 kunit: memcpy: Split slow memcpy tests into MEMCPY_SLOW_KUNIT_TEST commit d786f0fe5e5490682cc05dce6bea0b32964d5088 Merge: e6f2f6ac500c 780202334185 Author: Linus Torvalds Date: Fri Jan 27 16:03:32 2023 -0800 Merge tag 'trace-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Fix filter memory leak by calling ftrace_free_filter() - Initialize trace_printk() earlier so that ftrace_dump_on_oops shows data on early crashes. - Update the outdated instructions in scripts/tracing/ftrace-bisect.sh - Add lockdep_is_held() to fix lockdep warning - Add allocation failure check in create_hist_field() - Don't initialize pointer that gets set right away in enabled_monitors_write() - Update MAINTAINER entries - Fix help messages in Kconfigs - Fix kernel-doc header for update_preds() * tag 'trace-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: bootconfig: Update MAINTAINERS file to add tree and mailing list rv: remove redundant initialization of pointer ptr ftrace: Maintain samples/ftrace tracing/filter: fix kernel-doc warnings lib: Kconfig: fix spellos trace_events_hist: add check for return value of 'create_hist_field' tracing/osnoise: Use built-in RCU list checking tracing: Kconfig: Fix spelling/grammar/punctuation ftrace/scripts: Update the instructions for ftrace-bisect.sh tracing: Make sure trace_printk() can output as soon as it can be used ftrace: Export ftrace_free_filter() to modules commit e6f2f6ac500c67164f6f6b47299aece579277c14 Merge: 37d0be6a7d7d 0582d984793d Author: Linus Torvalds Date: Fri Jan 27 13:52:38 2023 -0800 Merge tag 'i2c-for-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "A bunch of driver fixes with a tiny bit of new IDs" * tag 'i2c-for-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: rk3x: fix a bunch of kernel-doc warnings i2c: axxia: use 'struct' for kernel-doc notation dt-bindings: i2c: renesas,rzv2m: Fix SoC specific string i2c: mxs: suppress probe-deferral error message i2c: designware-pci: Add new PCI IDs for AMD NAVI GPU i2c: designware: Fix unbalanced suspended flag i2c: designware: use casting of u64 in clock multiplication to avoid overflow commit 37d0be6a7d7d6fede952c439f8d8b9d1df5c756f Merge: 4d1483a99e9c 677d85e1a1ee Author: Linus Torvalds Date: Fri Jan 27 13:47:40 2023 -0800 Merge tag 'gpio-fixes-for-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix the -c option in the gpio-event-mode user-space example program - fix the irq number translation in gpio-ep93xx and make its irqchip immutable - add a missing spin_unlock in error path in gpio-mxc - fix a suspend breakage on System76 and Lenovo Gen2a introduced in GPIO ACPI * tag 'gpio-fixes-for-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: tools: gpio: fix -c option of gpio-event-mon gpio: ep93xx: remove unused variable gpio: ep93xx: Make irqchip immutable gpio: ep93xx: Fix port F hwirq numbers in handler gpio: mxc: Unlock on error path in mxc_flip_edge() gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode commit 4d1483a99e9cdf2775ae93c49982042a0a103c29 Merge: 0acffb235fbf 4bb3d82a1820 Author: Linus Torvalds Date: Fri Jan 27 13:43:46 2023 -0800 Merge tag 'regulator-fix-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "A fix for the DT binding documentation which dropped a property when being converted to YAML format causing spurious errors validating device trees for platforms using the device" * tag 'regulator-fix-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: dt-bindings: samsung,s2mps14: add lost samsung,ext-control-gpios commit 0acffb235fbf57f11a3da1098f9134825ac7c1c9 Merge: 76e26e3c6a49 4f11ada10d0a Author: Linus Torvalds Date: Fri Jan 27 13:39:30 2023 -0800 Merge tag 'ovl-fixes-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Fix two bugs, a recent one introduced in the last cycle, and an older one from v5.11" * tag 'ovl-fixes-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: fail on invalid uid/gid mapping at copy up ovl: fix tmpfile leak commit 76e26e3c6a49b368a6fd38e2da2b1b164470cc52 Merge: 04ad927cacc6 d23db8988396 Author: Linus Torvalds Date: Fri Jan 27 13:18:14 2023 -0800 Merge tag 'drm-fixes-2023-01-27' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Fairly small this week as well, i915 has a memory leak fix and some minor changes, and amdgpu has some MST fixes, and some other minor ones: drm: - DP MST kref fix - fb_helper: check return value i915: - Fix BSC default context for Meteor Lake - Fix selftest-scheduler's modify_type - memory leak fix amdgpu: - GC11.x fixes - SMU13.0.0 fix - Freesync video fix - DP MST fixes - build fix" * tag 'drm-fixes-2023-01-27' of git://anongit.freedesktop.org/drm/drm: amdgpu: fix build on non-DCN platforms. drm/amd/display: Fix timing not changning when freesync video is enabled drm/display/dp_mst: Correct the kref of port. drm/amdgpu/display/mst: update mst_mgr relevant variable when long HPD drm/amdgpu/display/mst: limit payload to be updated one by one drm/amdgpu/display/mst: Fix mst_state->pbn_div and slot count assignments drm/amdgpu: declare firmware for new MES 11.0.4 drm/amdgpu: enable imu firmware for GC 11.0.4 drm/amd/pm: add missing AllowIHInterrupt message mapping for SMU13.0.0 drm/amdgpu: remove unconditional trap enable on add gfx11 queues drm/fb-helper: Use a per-driver FB deferred I/O handler drm/fb-helper: Check fb_deferred_io_init() return value drm/i915/selftest: fix intel_selftest_modify_policy argument types drm/i915/mtl: Fix bcs default context drm/i915: Fix a memory leak with reused mmap_offset drm/drm_vma_manager: Add drm_vma_node_allow_once() commit 04ad927cacc678371ea9b187cd7e6eb71894b422 Merge: 274d2f8b0c03 e6b3086fddc0 Author: Linus Torvalds Date: Fri Jan 27 13:11:19 2023 -0800 Merge tag 'acpi-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "Add ACPI backlight handling quirks for 3 machines (Hans de Goede)" * tag 'acpi-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: video: Add backlight=native DMI quirk for Asus U46E ACPI: video: Add backlight=native DMI quirk for HP EliteBook 8460p ACPI: video: Add backlight=native DMI quirk for HP Pavilion g6-1d80nr commit 274d2f8b0c032ca3c1ae88194b75edd2669368b0 Merge: 0d1e013fd924 acd7e9ee57c8 Author: Linus Torvalds Date: Fri Jan 27 13:01:36 2023 -0800 Merge tag 'thermal-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fixes from Rafael Wysocki: "Add locking to the Intel int340x thermal control driver to prevent its thermal zone callbacks from racing with firmware-induced thermal trip point updates (Srinivas Pandruvada, Rafael Wysocki)" * tag 'thermal-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: intel: int340x: Add locking to int340x_thermal_get_trip_type() thermal: intel: int340x: Protect trip temperature from concurrent updates commit 0d1e013fd9246fcf73a078999487ba47d1dd1bb9 Merge: db7c4673bbd3 a428eb4b99ab Author: Linus Torvalds Date: Fri Jan 27 12:56:45 2023 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Will Deacon: - Fix event counting regression in Arm CMN PMU driver due to broken optimisation * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: Partially revert "perf/arm-cmn: Optimise DTC counter accesses" commit db7c4673bbd30e54e28a3274dd50fe6a5e28a8b8 Merge: e5eb2b22f0f4 c1d610586946 Author: Linus Torvalds Date: Fri Jan 27 12:52:45 2023 -0800 Merge tag 'riscv-for-linus-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A few DT bindings fixes to more closely align the ISA string requirements between the bindings and the ISA manual. - A handful of build error/warning fixes. - A fix to move init_cpu_topology() later in the boot flow, so it can allocate memory. - The IRC channel is now in the MAINTAINERS file, so it's easier to find. * tag 'riscv-for-linus-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: 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 commit e5eb2b22f0f4a1f0b98bc9b7efb352b0841a3bd2 Merge: 9f4d0bd24e6b 2f62847cf6ae Author: Linus Torvalds Date: Fri Jan 27 12:49:00 2023 -0800 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: - fix nommu assignment build warning - fix -Wundef preprocessor warning - reduce __thumb2__ definitions for crypto files that require it * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9287/1: Reduce __thumb2__ definition to crypto files that require it ARM: 9284/1: include from proc-macros.S to fix -Wundef warnings ARM: 9280/1: mm: fix warning on phys_addr_t to void pointer assignment commit 9f4d0bd24e6b42555c02e137763f12c106572e63 Merge: 83abd4d4c4be a49fb7218ed8 Author: Linus Torvalds Date: Fri Jan 27 12:41:09 2023 -0800 Merge tag 'linux-kselftest-fixes-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: "A single fix to a amd-pstate test Makefile bug that deletes source files during make clean run" * tag 'linux-kselftest-fixes-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: amd-pstate: Don't delete source files via Makefile commit 53b9b77dcf48dad1c6111b0c0a7310b3f9364776 Author: Michal Wilczynski Date: Fri Nov 25 14:34:39 2022 +0100 ice: Fix broken link in ice NAPI doc Current link for NAPI documentation in ice driver doesn't work - it returns 404. Update the link to the working one. Signed-off-by: Michal Wilczynski Acked-by: Jesse Brandeburg Signed-off-by: Tony Nguyen Documentation/networking/device_drivers/ethernet/intel/ice.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6a0974aae4209d039ba81226ded5246eea14961 Author: Dave Ertman Date: Tue Jan 24 09:19:43 2023 -0800 ice: Prevent set_channel from changing queues while RDMA active The PF controls the set of queues that the RDMA auxiliary_driver requests resources from. The set_channel command will alter that pool and trigger a reconfiguration of the VSI, which breaks RDMA functionality. Prevent set_channel from executing when RDMA driver bound to auxiliary device. Adding a locked variable to pass down the call chain to avoid double locking the device_lock. Fixes: 348048e724a0 ("ice: Implement iidc operations") Signed-off-by: Dave Ertman Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice.h | 2 +- drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 23 +++++++++++++---------- drivers/net/ethernet/intel/ice/ice_dcb_lib.h | 4 ++-- drivers/net/ethernet/intel/ice/ice_ethtool.c | 28 ++++++++++++++++++++++++---- drivers/net/ethernet/intel/ice/ice_main.c | 5 +++-- 5 files changed, 43 insertions(+), 19 deletions(-) commit eede42c9459b58b71edc99303dad65216a655810 Author: Bartosz Golaszewski Date: Mon Jan 16 15:41:49 2023 +0100 spi: spidev: fix a recursive locking error When calling spidev_message() from the one of the ioctl() callbacks, the spi_lock is already taken. When we then end up calling spidev_sync(), we get the following splat: [ 214.047619] [ 214.049198] ============================================ [ 214.054533] WARNING: possible recursive locking detected [ 214.059858] 6.2.0-rc3-0.0.0-devel+git.97ec4d559d93 #1 Not tainted [ 214.065969] -------------------------------------------- [ 214.071290] spidev_test/1454 is trying to acquire lock: [ 214.076530] c4925dbc (&spidev->spi_lock){+.+.}-{3:3}, at: spidev_ioctl+0x8e0/0xab8 [ 214.084164] [ 214.084164] but task is already holding lock: [ 214.090007] c4925dbc (&spidev->spi_lock){+.+.}-{3:3}, at: spidev_ioctl+0x44/0xab8 [ 214.097537] [ 214.097537] other info that might help us debug this: [ 214.104075] Possible unsafe locking scenario: [ 214.104075] [ 214.110004] CPU0 [ 214.112461] ---- [ 214.114916] lock(&spidev->spi_lock); [ 214.118687] lock(&spidev->spi_lock); [ 214.122457] [ 214.122457] *** DEADLOCK *** [ 214.122457] [ 214.128386] May be due to missing lock nesting notation [ 214.128386] [ 214.135183] 2 locks held by spidev_test/1454: [ 214.139553] #0: c4925dbc (&spidev->spi_lock){+.+.}-{3:3}, at: spidev_ioctl+0x44/0xab8 [ 214.147524] #1: c4925e14 (&spidev->buf_lock){+.+.}-{3:3}, at: spidev_ioctl+0x70/0xab8 [ 214.155493] [ 214.155493] stack backtrace: [ 214.159861] CPU: 0 PID: 1454 Comm: spidev_test Not tainted 6.2.0-rc3-0.0.0-devel+git.97ec4d559d93 #1 [ 214.169012] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 214.175555] unwind_backtrace from show_stack+0x10/0x14 [ 214.180819] show_stack from dump_stack_lvl+0x60/0x90 [ 214.185900] dump_stack_lvl from __lock_acquire+0x874/0x2858 [ 214.191584] __lock_acquire from lock_acquire+0xfc/0x378 [ 214.196918] lock_acquire from __mutex_lock+0x9c/0x8a8 [ 214.202083] __mutex_lock from mutex_lock_nested+0x1c/0x24 [ 214.207597] mutex_lock_nested from spidev_ioctl+0x8e0/0xab8 [ 214.213284] spidev_ioctl from sys_ioctl+0x4d0/0xe2c [ 214.218277] sys_ioctl from ret_fast_syscall+0x0/0x1c [ 214.223351] Exception stack(0xe75cdfa8 to 0xe75cdff0) [ 214.228422] dfa0: 00000000 00001000 00000003 40206b00 bee266e8 bee266e0 [ 214.236617] dfc0: 00000000 00001000 006a71a0 00000036 004c0040 004bfd18 00000000 00000003 [ 214.244809] dfe0: 00000036 bee266c8 b6f16dc5 b6e8e5f6 Fix it by introducing an unlocked variant of spidev_sync() and calling it from spidev_message() while other users who don't check the spidev->spi's existence keep on using the locking flavor. Reported-by: Francesco Dolcini Fixes: 1f4d2dd45b6e ("spi: spidev: fix a race condition when accessing spidev->spi") Signed-off-by: Bartosz Golaszewski Tested-by: Max Krummenacher Link: https://lore.kernel.org/r/20230116144149.305560-1-brgl@bgdev.pl Signed-off-by: Mark Brown drivers/spi/spidev.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit c63b8fd14a7db719f8252038a790638728c4eb66 Author: Serge Semin Date: Fri Jan 13 21:59:42 2023 +0300 spi: dw: Fix wrong FIFO level setting for long xfers Due to using the u16 type in the min_t() macros the SPI transfer length will be cast to word before participating in the conditional statement implied by the macro. Thus if the transfer length is greater than 64KB the Tx/Rx FIFO threshold level value will be determined by the leftover of the truncated after the type-case length. In the worst case it will cause the dramatical performance drop due to the "Tx FIFO Empty" or "Rx FIFO Full" interrupts triggered on each xfer word sent/received to/from the bus. The problem can be easily fixed by specifying the unsigned int type in the min_t() macros thus preventing the possible data loss. Fixes: ea11370fffdf ("spi: dw: get TX level without an additional variable") Reported-by: Sergey Nazarov Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230113185942.2516-1-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown drivers/spi/spi-dw-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f11ada10d0ad3fd53e2bd67806351de63a4f9c3 Author: Miklos Szeredi Date: Tue Jan 24 16:41:18 2023 +0100 ovl: fail on invalid uid/gid mapping at copy up If st_uid/st_gid doesn't have a mapping in the mounter's user_ns, then copy-up should fail, just like it would fail if the mounter task was doing the copy using "cp -a". There's a corner case where the "cp -a" would succeed but copy up fail: if there's a mapping of the invalid uid/gid (65534 by default) in the user namespace. This is because stat(2) will return this value if the mapping doesn't exist in the current user_ns and "cp -a" will in turn be able to create a file with this uid/gid. This behavior would be inconsistent with POSIX ACL's, which return -1 for invalid uid/gid which result in a failed copy. For consistency and simplicity fail the copy of the st_uid/st_gid are invalid. Fixes: 459c7c565ac3 ("ovl: unprivieged mounts") Cc: # v5.11 Signed-off-by: Miklos Szeredi Reviewed-by: Christian Brauner Reviewed-by: Seth Forshee fs/overlayfs/copy_up.c | 4 ++++ 1 file changed, 4 insertions(+) commit baabaa505563362b71f2637aedd7b807d270656c Author: Miklos Szeredi Date: Tue Jan 24 16:41:18 2023 +0100 ovl: fix tmpfile leak Missed an error cleanup. Reported-by: syzbot+fd749a7ea127a84e0ffd@syzkaller.appspotmail.com Fixes: 2b1a77461f16 ("ovl: use vfs_tmpfile_open() helper") Cc: # v6.1 Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9ad4d87aa263de36895402b66115a3a4b88bf1c Author: Qu Wenruo Date: Sat Jan 21 16:06:11 2023 +0800 btrfs: raid56: make error_bitmap update atomic In the rework of raid56 code, there is very limited concurrency in the endio context. Most of the work is done inside the sectors arrays, which different bios will never touch the same sector. But there is a concurrency here for error_bitmap. Both read and write endio functions need to touch them, and we can have multiple write bios touching the same error bitmap if they all hit some errors. Here we fix the unprotected bitmap operation by going set_bit() in a loop. Since we have a very small ceiling of the sectors (at most 16 sectors), such set_bit() in a loop should be very acceptable. Fixes: 2942a50dea74 ("btrfs: raid56: introduce btrfs_raid_bio::error_bitmap") Reviewed-by: Christoph Hellwig Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 33e17b3f5ab74af12aca58c515bc8424ff69a343 Author: David Sterba Date: Tue Jan 24 20:32:10 2023 +0100 btrfs: send: limit number of clones and allocated memory size The arg->clone_sources_count is u64 and can trigger a warning when a huge value is passed from user space and a huge array is allocated. Limit the allocated memory to 8MiB (can be increased if needed), which in turn limits the number of clone sources to 8M / sizeof(struct clone_root) = 8M / 40 = 209715. Real world number of clones is from tens to hundreds, so this is future proof. Reported-by: syzbot+4376a9a073770c173269@syzkaller.appspotmail.com Signed-off-by: David Sterba fs/btrfs/send.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ef5c600adb1d985513d2b612cc90403a148ff287 Author: Dylan Yudaken Date: Fri Jan 27 02:59:11 2023 -0800 io_uring: always prep_async for drain requests Drain requests all go through io_drain_req, which has a quick exit in case there is nothing pending (ie the drain is not useful). In that case it can run the issue the request immediately. However for safety it queues it through task work. The problem is that in this case the request is run asynchronously, but the async work has not been prepared through io_req_prep_async. This has not been a problem up to now, as the task work always would run before returning to userspace, and so the user would not have a chance to race with it. However - with IORING_SETUP_DEFER_TASKRUN - this is no longer the case and the work might be defered, giving userspace a chance to change data being referred to in the request. Instead _always_ prep_async for drain requests, which is simpler anyway and removes this issue. Cc: stable@vger.kernel.org Fixes: c0e0d6ba25f1 ("io_uring: add IORING_SETUP_DEFER_TASKRUN") Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20230127105911.2420061-1-dylany@meta.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit d2ceea0eb6e17bb37d8b85cb4c16797c0d683d1c 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. Cc: # v6.1 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 drivers/dma-buf/dma-fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 677d85e1a1ee69fa05ccea83847309484be3781c Author: Ivo Borisov Shopov Date: Thu Jan 26 15:10:33 2023 +0200 tools: gpio: fix -c option of gpio-event-mon Following line should listen for a rising edge and exit after the first one since '-c 1' is provided. # gpio-event-mon -n gpiochip1 -o 0 -r -c 1 It works with kernel 4.19 but it doesn't work with 5.10. In 5.10 the above command doesn't exit after the first rising edge it keep listening for an event forever. The '-c 1' is not taken into an account. The problem is in commit 62757c32d5db ("tools: gpio: add multi-line monitoring to gpio-event-mon"). Before this commit the iterator 'i' in monitor_device() is used for counting of the events (loops). In the case of the above command (-c 1) we should start from 0 and increment 'i' only ones and hit the 'break' statement and exit the process. But after the above commit counting doesn't start from 0, it start from 1 when we listen on one line. It is because 'i' is used from one more purpose, counting of lines (num_lines) and it isn't restore to 0 after following code for (i = 0; i < num_lines; i++) gpiotools_set_bit(&values.mask, i); Restore the initial value of the iterator to 0 in order to allow counting of loops to work for any cases. Fixes: 62757c32d5db ("tools: gpio: add multi-line monitoring to gpio-event-mon") Signed-off-by: Ivo Borisov Shopov Reviewed-by: Andy Shevchenko [Bartosz: tweak the commit message] Signed-off-by: Bartosz Golaszewski tools/gpio/gpio-event-mon.c | 1 + 1 file changed, 1 insertion(+) commit b710ef411048cdbd0fb279b9529af2731fe97022 Author: Arnd Bergmann Date: Fri Jan 27 10:35:05 2023 +0100 gpio: ep93xx: remove unused variable This one was left behind by a previous cleanup patch: drivers/gpio/gpio-ep93xx.c: In function 'ep93xx_gpio_add_bank': drivers/gpio/gpio-ep93xx.c:366:34: error: unused variable 'ic' [-Werror=unused-variable] Fixes: 216f37366e86 ("gpio: ep93xx: Make irqchip immutable") Signed-off-by: Arnd Bergmann Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-ep93xx.c | 2 -- 1 file changed, 2 deletions(-) commit d2d73e6d4822140445ad4a7b1c6091e0f5fe703b Author: Maxim Korotkov Date: Fri Nov 18 13:43:32 2022 +0300 pinctrl: single: fix potential NULL dereference Added checking of pointer "function" in pcs_set_mux(). pinmux_generic_get_function() can return NULL and the pointer "function" was dereferenced without checking against NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 571aec4df5b7 ("pinctrl: single: Use generic pinmux helpers for managing functions") Signed-off-by: Maxim Korotkov Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20221118104332.943-1-korotkov.maxim.s@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-single.c | 2 ++ 1 file changed, 2 insertions(+) commit c6e0679b8381bf03315e6660cf5370f916c1a1c6 Author: Mario Limonciello Date: Sat Jan 21 07:48:10 2023 -0600 pinctrl: amd: Fix debug output for debounce time If one GPIO has debounce enabled but future GPIOs in the list don't have debounce the time never gets reset and shows wrong value. Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20230121134812.16637-2-mario.limonciello@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 1 + 1 file changed, 1 insertion(+) commit 287a344a11f1ebd31055cf9b22c88d7005f108d7 Author: Joel Stanley Date: Fri Jan 20 09:48:56 2023 +1030 pinctrl: aspeed: Fix confusing types in return value The function signature is int, but we return a bool. Instead return a negative errno as the kerneldoc suggests. Fixes: 4d3d0e4272d8 ("pinctrl: Add core support for Aspeed SoCs") Signed-off-by: Joel Stanley Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20230119231856.52014-1-joel@jms.id.au Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b04456e248761cf68f562f2fd7c04e591fcac94 Author: Tanmay Bhushan <007047221b@gmail.com> Date: Tue Dec 27 22:02:16 2022 +0100 vdpa: ifcvf: Do proper cleanup if IFCVF init fails ifcvf_mgmt_dev leaks memory if it is not freed before returning. Call is made to correct return statement so memory does not leak. ifcvf_init_hw does not take care of this so it is needed to do it here. Signed-off-by: Tanmay Bhushan <007047221b@gmail.com> Message-Id: <772e9fe133f21fa78fb98a2ebe8969efbbd58e3c.camel@gmail.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Acked-by: Zhu Lingshan drivers/vdpa/ifcvf/ifcvf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6dd88fd59da84631b5fe5c8176931c38cfa3b265 Author: Jason Wang Date: Thu Jan 19 15:36:47 2023 +0800 vhost-scsi: unbreak any layout for response Al Viro said: """ Since "vhost/scsi: fix reuse of &vq->iov[out] in response" we have this: cmd->tvc_resp_iov = vq->iov[vc.out]; cmd->tvc_in_iovs = vc.in; combined with iov_iter_init(&iov_iter, ITER_DEST, &cmd->tvc_resp_iov, cmd->tvc_in_iovs, sizeof(v_rsp)); in vhost_scsi_complete_cmd_work(). We used to have ->tvc_resp_iov _pointing_ to vq->iov[vc.out]; back then iov_iter_init() asked to set an iovec-backed iov_iter over the tail of vq->iov[], with length being the amount of iovecs in the tail. Now we have a copy of one element of that array. Fortunately, the members following it in the containing structure are two non-NULL kernel pointers, so copy_to_iter() will not copy anything beyond the first iovec - kernel pointer is not (on the majority of architectures) going to be accepted by access_ok() in copyout() and it won't be skipped since the "length" (in reality - another non-NULL kernel pointer) won't be zero. So it's not going to give a guest-to-qemu escalation, but it's definitely a bug. Frankly, my preference would be to verify that the very first iovec is long enough to hold rsp_size. Due to the above, any users that try to give us vq->iov[vc.out].iov_len < sizeof(struct virtio_scsi_cmd_resp) would currently get a failure in vhost_scsi_complete_cmd_work() anyway. """ However, the spec doesn't say anything about the legacy descriptor layout for the respone. So this patch tries to not assume the response to reside in a single separate descriptor which is what commit 79c14141a487 ("vhost/scsi: Convert completion path to use") tries to achieve towards to ANY_LAYOUT. This is done by allocating and using dedicate resp iov in the command. To be safety, start with UIO_MAXIOV to be consistent with the limitation that we advertise to the vhost_get_vq_desc(). Testing with the hacked virtio-scsi driver that use 1 descriptor for 1 byte in the response. Reported-by: Al Viro Cc: Benjamin Coddington Cc: Nicholas Bellinger Fixes: a77ec83a5789 ("vhost/scsi: fix reuse of &vq->iov[out] in response") Signed-off-by: Jason Wang Message-Id: <20230119073647.76467-1-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi drivers/vhost/scsi.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 3f7b75abf41cc4143aa295f62acbb060a012868d Author: Shunsuke Mie Date: Tue Jan 10 12:43:10 2023 +0900 tools/virtio: fix the vringh test for virtio ring changes Fix the build caused by missing kmsan_handle_dma() and is_power_of_2() that are used in drivers/virtio/virtio_ring.c. Signed-off-by: Shunsuke Mie Message-Id: <20230110034310.779744-1-mie@igel.co.jp> Signed-off-by: Michael S. Tsirkin tools/virtio/linux/bug.h | 8 +++----- tools/virtio/linux/build_bug.h | 7 +++++++ tools/virtio/linux/cpumask.h | 7 +++++++ tools/virtio/linux/gfp.h | 7 +++++++ tools/virtio/linux/kernel.h | 1 + tools/virtio/linux/kmsan.h | 12 ++++++++++++ tools/virtio/linux/scatterlist.h | 1 + tools/virtio/linux/topology.h | 7 +++++++ 8 files changed, 45 insertions(+), 5 deletions(-) commit 9526f9a2b762af16be94a72aca5d65c677d28f50 Author: Eric Auger Date: Tue Jan 17 10:15:18 2023 -0500 vhost/net: Clear the pending messages when the backend is removed When the vhost iotlb is used along with a guest virtual iommu and the guest gets rebooted, some MISS messages may have been recorded just before the reboot and spuriously executed by the virtual iommu after the reboot. As vhost does not have any explicit reset user API, VHOST_NET_SET_BACKEND looks a reasonable point where to clear the pending messages, in case the backend is removed. Export vhost_clear_msg() and call it in vhost_net_set_backend() when fd == -1. Signed-off-by: Eric Auger Suggested-by: Jason Wang Fixes: 6b1e6cc7855b0 ("vhost: new device IOTLB API") Message-Id: <20230117151518.44725-3-eric.auger@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vhost/net.c | 3 +++ drivers/vhost/vhost.c | 3 ++- drivers/vhost/vhost.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) commit 0a9e5794b21e2d1303759ff8fe5f9215db7757ba Author: Eric Dumazet Date: Thu Jan 26 11:21:30 2023 +0000 xfrm: annotate data-race around use_time KCSAN reported multiple cpus can update use_time at the same time. Adds READ_ONCE()/WRITE_ONCE() annotations. Note that 32bit arches are not fully protected, but they will probably no longer be supported/used in 2106. BUG: KCSAN: data-race in __xfrm_policy_check / __xfrm_policy_check write to 0xffff88813e7ec108 of 8 bytes by interrupt on cpu 0: __xfrm_policy_check+0x6ae/0x17f0 net/xfrm/xfrm_policy.c:3664 __xfrm_policy_check2 include/net/xfrm.h:1174 [inline] xfrm_policy_check include/net/xfrm.h:1179 [inline] xfrm6_policy_check+0x2e9/0x320 include/net/xfrm.h:1189 udpv6_queue_rcv_one_skb+0x48/0xa30 net/ipv6/udp.c:703 udpv6_queue_rcv_skb+0x2d6/0x310 net/ipv6/udp.c:792 udp6_unicast_rcv_skb+0x16b/0x190 net/ipv6/udp.c:935 __udp6_lib_rcv+0x84b/0x9b0 net/ipv6/udp.c:1020 udpv6_rcv+0x4b/0x50 net/ipv6/udp.c:1133 ip6_protocol_deliver_rcu+0x99e/0x1020 net/ipv6/ip6_input.c:439 ip6_input_finish net/ipv6/ip6_input.c:484 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ip6_input+0xca/0x180 net/ipv6/ip6_input.c:493 dst_input include/net/dst.h:454 [inline] ip6_rcv_finish+0x1e9/0x2d0 net/ipv6/ip6_input.c:79 NF_HOOK include/linux/netfilter.h:302 [inline] ipv6_rcv+0x85/0x140 net/ipv6/ip6_input.c:309 __netif_receive_skb_one_core net/core/dev.c:5482 [inline] __netif_receive_skb+0x8b/0x1b0 net/core/dev.c:5596 process_backlog+0x23f/0x3b0 net/core/dev.c:5924 __napi_poll+0x65/0x390 net/core/dev.c:6485 napi_poll net/core/dev.c:6552 [inline] net_rx_action+0x37e/0x730 net/core/dev.c:6663 __do_softirq+0xf2/0x2c7 kernel/softirq.c:571 do_softirq+0xb1/0xf0 kernel/softirq.c:472 __local_bh_enable_ip+0x6f/0x80 kernel/softirq.c:396 __raw_read_unlock_bh include/linux/rwlock_api_smp.h:257 [inline] _raw_read_unlock_bh+0x17/0x20 kernel/locking/spinlock.c:284 wg_socket_send_skb_to_peer+0x107/0x120 drivers/net/wireguard/socket.c:184 wg_packet_create_data_done drivers/net/wireguard/send.c:251 [inline] wg_packet_tx_worker+0x142/0x360 drivers/net/wireguard/send.c:276 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289 worker_thread+0x618/0xa70 kernel/workqueue.c:2436 kthread+0x1a9/0x1e0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 write to 0xffff88813e7ec108 of 8 bytes by interrupt on cpu 1: __xfrm_policy_check+0x6ae/0x17f0 net/xfrm/xfrm_policy.c:3664 __xfrm_policy_check2 include/net/xfrm.h:1174 [inline] xfrm_policy_check include/net/xfrm.h:1179 [inline] xfrm6_policy_check+0x2e9/0x320 include/net/xfrm.h:1189 udpv6_queue_rcv_one_skb+0x48/0xa30 net/ipv6/udp.c:703 udpv6_queue_rcv_skb+0x2d6/0x310 net/ipv6/udp.c:792 udp6_unicast_rcv_skb+0x16b/0x190 net/ipv6/udp.c:935 __udp6_lib_rcv+0x84b/0x9b0 net/ipv6/udp.c:1020 udpv6_rcv+0x4b/0x50 net/ipv6/udp.c:1133 ip6_protocol_deliver_rcu+0x99e/0x1020 net/ipv6/ip6_input.c:439 ip6_input_finish net/ipv6/ip6_input.c:484 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ip6_input+0xca/0x180 net/ipv6/ip6_input.c:493 dst_input include/net/dst.h:454 [inline] ip6_rcv_finish+0x1e9/0x2d0 net/ipv6/ip6_input.c:79 NF_HOOK include/linux/netfilter.h:302 [inline] ipv6_rcv+0x85/0x140 net/ipv6/ip6_input.c:309 __netif_receive_skb_one_core net/core/dev.c:5482 [inline] __netif_receive_skb+0x8b/0x1b0 net/core/dev.c:5596 process_backlog+0x23f/0x3b0 net/core/dev.c:5924 __napi_poll+0x65/0x390 net/core/dev.c:6485 napi_poll net/core/dev.c:6552 [inline] net_rx_action+0x37e/0x730 net/core/dev.c:6663 __do_softirq+0xf2/0x2c7 kernel/softirq.c:571 do_softirq+0xb1/0xf0 kernel/softirq.c:472 __local_bh_enable_ip+0x6f/0x80 kernel/softirq.c:396 __raw_read_unlock_bh include/linux/rwlock_api_smp.h:257 [inline] _raw_read_unlock_bh+0x17/0x20 kernel/locking/spinlock.c:284 wg_socket_send_skb_to_peer+0x107/0x120 drivers/net/wireguard/socket.c:184 wg_packet_create_data_done drivers/net/wireguard/send.c:251 [inline] wg_packet_tx_worker+0x142/0x360 drivers/net/wireguard/send.c:276 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289 worker_thread+0x618/0xa70 kernel/workqueue.c:2436 kthread+0x1a9/0x1e0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 value changed: 0x0000000063c62d6f -> 0x0000000063c62d70 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 4185 Comm: kworker/1:2 Tainted: G W 6.2.0-rc4-syzkaller-00009-gd532dd102151-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: wg-crypt-wg0 wg_packet_tx_worker Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Steffen Klassert Cc: Arnd Bergmann Acked-by: Arnd Bergmann Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 11 +++++++---- net/xfrm/xfrm_state.c | 10 +++++----- 2 files changed, 12 insertions(+), 9 deletions(-) commit 195e4aac74ce67385f95432301da6db3c2cfc72a Author: Eric Dumazet Date: Thu Jan 26 11:21:29 2023 +0000 xfrm: consistently use time64_t in xfrm_timer_handler() For some reason, blamed commit did the right thing in xfrm_policy_timer() but did not in xfrm_timer_handler() Fixes: 386c5680e2e8 ("xfrm: use time64_t for in-kernel timestamps") Signed-off-by: Eric Dumazet Cc: Arnd Bergmann Cc: Steffen Klassert Acked-by: Arnd Bergmann Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 53466ebdec614f915c691809b0861acecb941e30 Author: Takashi Iwai Date: Wed Jan 25 16:31:04 2023 +0100 ALSA: memalloc: Workaround for Xen PV We change recently the memalloc helper to use dma_alloc_noncontiguous() and the fallback to get_pages(). Although lots of issues with IOMMU (or non-IOMMU) have been addressed, but there seems still a regression on Xen PV. Interestingly, the only proper way to work is use dma_alloc_coherent(). The use of dma_alloc_coherent() for SG buffer was dropped as it's problematic on IOMMU systems. OTOH, Xen PV has a different way, and it's fine to use the dma_alloc_coherent(). This patch is a workaround for Xen PV. It consists of the following changes: - For Xen PV, use only the fallback allocation without dma_alloc_noncontiguous() - In the fallback allocation, use dma_alloc_coherent(); the DMA address from dma_alloc_coherent() is returned in get_addr ops - The DMA addresses are stored in an array; the first entry stores the number of allocated pages in lower bits, which are referred at releasing pages again Reported-by: Marek Marczykowski-Górecki Tested-by: Marek Marczykowski-Górecki Fixes: a8d302a0b770 ("ALSA: memalloc: Revive x86-specific WC page allocations again") Fixes: 9736a325137b ("ALSA: memalloc: Don't fall back for SG-buffer with IOMMU") Link: https://lore.kernel.org/r/87tu256lqs.wl-tiwai@suse.de Link: https://lore.kernel.org/r/20230125153104.5527-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/memalloc.c | 87 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 69 insertions(+), 18 deletions(-) commit 5416c9aea8323583e8696f0500b6142dfae80821 Author: Kui-Feng Lee Date: Thu Jan 26 16:17:32 2023 -0800 bpf: Fix the kernel crash caused by bpf_setsockopt(). The kernel crash was caused by a BPF program attached to the "lsm_cgroup/socket_sock_rcv_skb" hook, which performed a call to `bpf_setsockopt()` in order to set the TCP_NODELAY flag as an example. Flags like TCP_NODELAY can prompt the kernel to flush a socket's outgoing queue, and this hook "lsm_cgroup/socket_sock_rcv_skb" is frequently triggered by softirqs. The issue was that in certain circumstances, when `tcp_write_xmit()` was called to flush the queue, it would also allow BH (bottom-half) to run. This could lead to our program attempting to flush the same socket recursively, which caused a `skbuff` to be unlinked twice. `security_sock_rcv_skb()` is triggered by `tcp_filter()`. This occurs before the sock ownership is checked in `tcp_v4_rcv()`. Consequently, if a bpf program runs on `security_sock_rcv_skb()` while under softirq conditions, it may not possess the lock needed for `bpf_setsockopt()`, thus presenting an issue. The patch fixes this issue by ensuring that a BPF program attached to the "lsm_cgroup/socket_sock_rcv_skb" hook is not allowed to call `bpf_setsockopt()`. The differences from v1 are - changing commit log to explain holding the lock of the sock, - emphasizing that TCP_NODELAY is not the only flag, and - adding the fixes tag. v1: https://lore.kernel.org/bpf/20230125000244.1109228-1-kuifeng@meta.com/ Signed-off-by: Kui-Feng Lee Fixes: 9113d7e48e91 ("bpf: expose bpf_{g,s}etsockopt to lsm cgroup") Link: https://lore.kernel.org/r/20230127001732.4162630-1-kuifeng@meta.com Signed-off-by: Martin KaFai Lau kernel/bpf/bpf_lsm.c | 1 - 1 file changed, 1 deletion(-) commit 15600159bcc6abbeae6b33a849bef90dca28b78f Author: Martin K. Petersen Date: Thu Jan 26 22:06:08 2023 -0500 scsi: Revert "scsi: core: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT" This reverts commit 948e922fc44611ee2de0c89583ca958cb5307d36. Not all targets that return PQ=1 and PDT=0 should be ignored. While the SCSI spec is vague in this department, there appears to be a critical mass of devices which rely on devices being accessible with this combination of reported values. Fixes: 948e922fc446 ("scsi: core: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT") Link: https://lore.kernel.org/r/yq1lelrleqr.fsf@ca-mkp.ca.oracle.com Acked-by: Bart Van Assche Acked-by: Martin Wilck Acked-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_scan.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2542fc9578d49b3b376231269d4c7c7d4cffd62a Author: Bart Van Assche Date: Wed Jan 25 11:43:11 2023 -0800 scsi: core: Fix the scsi_device_put() might_sleep annotation Although most calls of scsi_device_put() happen from non-atomic context, alua_rtpg_queue() calls this function from atomic context if alua_rtpg_queue() itself is called from atomic context. alua_rtpg_queue() is always called from contexts where the caller must hold at least one reference to the scsi device in question. This means that the reference taken by alua_rtpg_queue() itself can't be the last one, and thus can be dropped without entering the code path in which scsi_device_put() might actually sleep. Hence move the might_sleep() annotation from scsi_device_put() into scsi_device_dev_release(). [1] https://lore.kernel.org/linux-scsi/b49e37d5-edfb-4c56-3eeb-62c7d5855c00@linux.ibm.com/ [2] https://lore.kernel.org/linux-scsi/55c35e64-a7d4-9072-46fd-e8eae6a90e96@linux.ibm.com/ Note: a significant part of the above description was written by Martin Wilck. Fixes: f93ed747e2c7 ("scsi: core: Release SCSI devices synchronously") Cc: Martin Wilck Cc: Steffen Maier Cc: Hannes Reinecke Cc: Sachin Sant Cc: Benjamin Block Reported-by: Steffen Maier Signed-off-by: Bart Van Assche Reviewed-by: Martin Wilck Link: https://lore.kernel.org/r/20230125194311.249553-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 2 -- drivers/scsi/scsi_sysfs.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit d23db89883962d9b4cb3ad03dfd02e525ed2cc03 Merge: f439a959dcfb d6591da5f3ff Author: Dave Airlie Date: Fri Jan 27 12:31:02 2023 +1000 Merge tag 'drm-misc-fixes-2023-01-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes A fix and a preliminary patch to fix a memory leak in i915, and a use after free fix for fbdev deferred io Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230126104018.cbrcjxl5wefdbb2f@houat commit f439a959dcfb6b39d6fd4b85ca1110a1d1de1587 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 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1d65bd6b6f6f1e57430787682e6fa791108f1b05 Merge: af0af9087a07 4b069553246f Author: Dave Airlie Date: Fri Jan 27 11:50:08 2023 +1000 Merge tag 'amd-drm-fixes-6.2-2023-01-25' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.2-2023-01-25: amdgpu: - GC11.x fixes - SMU13.0.0 fix - Freesync video fix - DP MST fixes drm: - DP MST kref fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230125220153.320248-1-alexander.deucher@amd.com commit af0af9087a071c68cc9be3f3875772b41068e03b Merge: 2241ab53cbb5 2255bbcdc39d Author: Dave Airlie Date: Fri Jan 27 11:39:55 2023 +1000 Merge tag 'drm-intel-fixes-2023-01-26' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix BSC default context for Meteor Lake (Lucas) - Fix selftest-scheduler's modify_type (Andi) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y9LKD2J5bmICTyIP@intel.com commit ad34656db3b959421621c4e239d7e0dc710ec04c Author: Bjorn Helgaas Date: Thu Jan 26 15:10:03 2023 -0600 MAINTAINERS: Move to shared PCI tree Move PCI subsystem maintenance to a shared git tree to make it easier for maintainers to collaborate. Update MAINTAINERS accordingly. No change to patch submission and patchwork tracking. Link: https://lore.kernel.org/r/20230126211003.1310916-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas MAINTAINERS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e632291a2dbce45a24cddeb5fe28fe71d724ba43 Author: Dragos Tatulea Date: Tue Jan 24 20:24:18 2023 +0200 IB/IPoIB: Fix legacy IPoIB due to wrong number of queues The cited commit creates child PKEY interfaces over netlink will multiple tx and rx queues, but some devices doesn't support more than 1 tx and 1 rx queues. This causes to a crash when traffic is sent over the PKEY interface due to the parent having a single queue but the child having multiple queues. This patch fixes the number of queues to 1 for legacy IPoIB at the earliest possible point in time. BUG: kernel NULL pointer dereference, address: 000000000000036b PGD 0 P4D 0 Oops: 0000 [#1] SMP CPU: 4 PID: 209665 Comm: python3 Not tainted 6.1.0_for_upstream_min_debug_2022_12_12_17_02 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:kmem_cache_alloc+0xcb/0x450 Code: ce 7e 49 8b 50 08 49 83 78 10 00 4d 8b 28 0f 84 cb 02 00 00 4d 85 ed 0f 84 c2 02 00 00 41 8b 44 24 28 48 8d 4a 01 49 8b 3c 24 <49> 8b 5c 05 00 4c 89 e8 65 48 0f c7 0f 0f 94 c0 84 c0 74 b8 41 8b RSP: 0018:ffff88822acbbab8 EFLAGS: 00010202 RAX: 0000000000000070 RBX: ffff8881c28e3e00 RCX: 00000000064f8dae RDX: 00000000064f8dad RSI: 0000000000000a20 RDI: 0000000000030d00 RBP: 0000000000000a20 R08: ffff8882f5d30d00 R09: ffff888104032f40 R10: ffff88810fade828 R11: 736f6d6570736575 R12: ffff88810081c000 R13: 00000000000002fb R14: ffffffff817fc865 R15: 0000000000000000 FS: 00007f9324ff9700(0000) GS:ffff8882f5d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000036b CR3: 00000001125af004 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: skb_clone+0x55/0xd0 ip6_finish_output2+0x3fe/0x690 ip6_finish_output+0xfa/0x310 ip6_send_skb+0x1e/0x60 udp_v6_send_skb+0x1e5/0x420 udpv6_sendmsg+0xb3c/0xe60 ? ip_mc_finish_output+0x180/0x180 ? __switch_to_asm+0x3a/0x60 ? __switch_to_asm+0x34/0x60 sock_sendmsg+0x33/0x40 __sys_sendto+0x103/0x160 ? _copy_to_user+0x21/0x30 ? kvm_clock_get_cycles+0xd/0x10 ? ktime_get_ts64+0x49/0xe0 __x64_sys_sendto+0x25/0x30 do_syscall_64+0x3d/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f9374f1ed14 Code: 42 41 f8 ff 44 8b 4c 24 2c 4c 8b 44 24 20 89 c5 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 34 89 ef 48 89 44 24 08 e8 68 41 f8 ff 48 8b RSP: 002b:00007f9324ff7bd0 EFLAGS: 00000293 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f9324ff7cc8 RCX: 00007f9374f1ed14 RDX: 00000000000002fb RSI: 00007f93000052f0 RDI: 0000000000000030 RBP: 0000000000000000 R08: 00007f9324ff7d40 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 000000012a05f200 R14: 0000000000000001 R15: 00007f9374d57bdc Fixes: dbc94a0fb817 ("IB/IPoIB: Fix queue count inconsistency for PKEY child interfaces") Signed-off-by: Dragos Tatulea Link: https://lore.kernel.org/r/95eb6b74c7cf49fa46281f9d056d685c9fa11d38.1674584576.git.leon@kernel.org Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 343c700480982214dc4f834f536a49a4098e556a Author: Javier Martinez Canillas Date: Wed Jan 25 19:42:30 2023 +0100 drm/ssd130x: Init display before the SSD130X_DISPLAY_ON command Commit 622113b9f11f ("drm/ssd130x: Replace simple display helpers with the atomic helpers") changed the driver to just use the atomic helpers instead of the simple KMS abstraction layer. But the commit also made a subtle change on the display power sequence and initialization order, by moving the ssd130x_power_on() call to the encoder .atomic_enable handler and the ssd130x_init() call to CRTC .reset handler. Before this change, both ssd130x_power_on() and ssd130x_init() were called in the simple display pipeline .enable handler, so the display was already initialized by the time the SSD130X_DISPLAY_ON command was sent. For some reasons, it only made the ssd130x SPI driver to fail but the I2C was still working. That is the reason why the bug was not noticed before. To revert to the old driver behavior, move the ssd130x_init() call to the encoder .atomic_enable as well. Besides fixing the panel not being turned on when using SPI, it also gets rid of the custom CRTC .reset callback. Fixes: 622113b9f11f ("drm/ssd130x: Replace simple display helpers with the atomic helpers") Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230125184230.3343206-1-javierm@redhat.com drivers/gpu/drm/solomon/ssd130x.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit db3ba974c2bc895ba39689a364cb7a49c0fe779f Merge: 8e4ff684762b 85eee6341abb Author: Jens Axboe Date: Thu Jan 26 11:43:33 2023 -0700 Merge tag 'nvme-6.2-2023-01-26' of git://git.infradead.org/nvme into block-6.2 Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.2 - flush initial scan_work for async probe (Keith Busch) - fix passthrough csi check (Keith Busch) - fix nvme-fc initialization order (Ross Lagerwall)" * tag 'nvme-6.2-2023-01-26' of git://git.infradead.org/nvme: nvme: fix passthrough csi check nvme-pci: flush initial scan_work for async probe nvme-fc: fix initialization order commit 83abd4d4c4be8984ba5a3a813ccfedba79c7d6ad Merge: 28b4387f0ec0 1bc5d819f0b9 Author: Linus Torvalds Date: Thu Jan 26 10:29:49 2023 -0800 Merge tag 'platform-drivers-x86-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - Fix false positive apple_gmux backlight detection on older iGPU only MacBook models - Various other small fixes and hardware-id additions * tag 'platform-drivers-x86-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: thinkpad_acpi: Fix profile modes on Intel platforms ACPI: video: Fix apple gmux detection platform/x86: apple-gmux: Add apple_gmux_detect() helper platform/x86: apple-gmux: Move port defines to apple-gmux.h platform/x86: hp-wmi: Fix cast to smaller integer type warning platform/x86/amd: pmc: Add a module parameter to disable workarounds platform/x86/amd: pmc: Disable IRQ1 wakeup for RN/CZN platform/x86: asus-wmi: Fix kbd_dock_devid tablet-switch reporting platform/x86: gigabyte-wmi: add support for B450M DS3H WIFI-CF platform/x86: hp-wmi: Handle Omen Key event platform/x86: dell-wmi: Add a keymap for KEY_MUTE in type 0x0010 table commit 28b4387f0ec08d48634fcc3e3687c93edc1503f9 Merge: 262b42e02d1e 7083df59abbc Author: Linus Torvalds Date: Thu Jan 26 10:20:12 2023 -0800 Merge tag 'net-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from netfilter. Current release - regressions: - sched: sch_taprio: do not schedule in taprio_reset() Previous releases - regressions: - core: fix UaF in netns ops registration error path - ipv4: prevent potential spectre v1 gadgets - ipv6: fix reachability confirmation with proxy_ndp - netfilter: fix for the set rbtree - eth: fec: use page_pool_put_full_page when freeing rx buffers - eth: iavf: fix temporary deadlock and failure to set MAC address Previous releases - always broken: - netlink: prevent potential spectre v1 gadgets - netfilter: fixes for SCTP connection tracking - mctp: struct sock lifetime fixes - eth: ravb: fix possible hang if RIS2_QFF1 happen - eth: tg3: resolve deadlock in tg3_reset_task() during EEH Misc: - Mat stepped out as MPTCP co-maintainer" * tag 'net-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (40 commits) net: mdio-mux-meson-g12a: force internal PHY off on mux switch docs: networking: Fix bridge documentation URL tsnep: Fix TX queue stop/wake for multiple queues net/tg3: resolve deadlock in tg3_reset_task() during EEH net: mctp: mark socks as dead on unhash, prevent re-add net: mctp: hold key reference when looking up a general key net: mctp: move expiry timer delete to unhash net: mctp: add an explicit reference from a mctp_sk_key to sock net: ravb: Fix possible hang if RIS2_QFF1 happen net: ravb: Fix lack of register setting after system resumed for Gen3 net/x25: Fix to not accept on connected socket ice: move devlink port creation/deletion sctp: fail if no bound addresses can be used for a given scope net/sched: sch_taprio: do not schedule in taprio_reset() Revert "Merge branch 'ethtool-mac-merge'" netrom: Fix use-after-free of a listening socket. netfilter: conntrack: unify established states for SCTP paths Revert "netfilter: conntrack: add sctp DATA_SENT state" netfilter: conntrack: fix bug in for_each_sctp_chunk netfilter: conntrack: fix vtag checks for ABORT/SHUTDOWN_COMPLETE ... commit 262b42e02d1e0b5ad1b33e9b9842e178c16231de Author: Linus Torvalds Date: Thu Jan 26 10:05:39 2023 -0800 treewide: fix up files incorrectly marked executable I'm not exactly clear on what strange workflow causes people to do it, but clearly occasionally some files end up being committed as executable even though they clearly aren't. This is a reprise of commit 90fda63fa115 ("treewide: fix up files incorrectly marked executable"), just with a different set of files (but with the same trivial shell scripting). So apparently we need to re-do this every five years or so, and Joe needs to just keep reminding me to do so ;) Reported-by: Joe Perches Fixes: 523375c943e5 ("drm/vmwgfx: Port vmwgfx to arm64") Fixes: 5c439937775d ("ASoC: codecs: add support for ES8326") Signed-off-by: Linus Torvalds drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h | 0 sound/soc/codecs/es8326.c | 0 sound/soc/codecs/es8326.h | 0 3 files changed, 0 insertions(+), 0 deletions(-) commit e18c6da62edc780e4f4f3c9ce07bdacd69505182 Author: Arnd Bergmann Date: Thu Jan 26 17:21:24 2023 +0100 ASoC: cs42l56: fix DT probe While looking through legacy platform data users, I noticed that the DT probing never uses data from the DT properties, as the platform_data structure gets overwritten directly after it is initialized. There have never been any boards defining the platform_data in the mainline kernel either, so this driver so far only worked with patched kernels or with the default values. For the benefit of possible downstream users, fix the DT probe by no longer overwriting the data. Signed-off-by: Arnd Bergmann Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230126162203.2986339-1-arnd@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/cs42l56.c | 6 ------ 1 file changed, 6 deletions(-) commit 8e4ff684762b6503db45e8906e258faee080c336 Author: Ming Lei Date: Thu Jan 26 19:53:46 2023 +0800 block: ublk: move ublk_chr_class destroying after devices are removed The 'ublk_chr_class' is needed when deleting ublk char devices in ublk_exit(), so move it after devices(idle) are removed. Fixes the following warning reported by Harris, James R: [ 859.178950] sysfs group 'power' not found for kobject 'ublkc0' [ 859.178962] WARNING: CPU: 3 PID: 1109 at fs/sysfs/group.c:278 sysfs_remove_group+0x9c/0xb0 Reported-by: "Harris, James R" Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Link: https://lore.kernel.org/linux-block/Y9JlFmSgDl3+zy3N@T590/T/#t Signed-off-by: Ming Lei Tested-by: Jim Harris Link: https://lore.kernel.org/r/20230126115346.263344-1-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a428eb4b99ab80454f06ad256b25e930fe8a4954 Author: Robin Murphy Date: Mon Jan 23 18:30:38 2023 +0000 Partially revert "perf/arm-cmn: Optimise DTC counter accesses" It turns out the optimisation implemented by commit 4f2c3872dde5 is totally broken, since all the places that consume hw->dtcs_used for events other than cycle count are still not expecting it to be sparsely populated, and fail to read all the relevant DTC counters correctly if so. If implemented correctly, the optimisation potentially saves up to 3 register reads per event update, which is reasonably significant for events targeting a single node, but still not worth a massive amount of additional code complexity overall. Getting it right within the current design looks a fair bit more involved than it was ever intended to be, so let's just make a functional revert which restores the old behaviour while still backporting easily. Fixes: 4f2c3872dde5 ("perf/arm-cmn: Optimise DTC counter accesses") Reported-by: Ilkka Koskinen Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/b41bb4ed7283c3d8400ce5cf5e6ec94915e6750f.1674498637.git.robin.murphy@arm.com Signed-off-by: Will Deacon drivers/perf/arm-cmn.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5754a1c98b18009cb3030dc391aa37b77428a0bd Author: Guodong Liu Date: Wed Jan 18 14:21:16 2023 +0800 pinctrl: mediatek: Fix the drive register definition of some Pins The drive adjustment register definition of gpio13 and gpio81 is wrong: "the start address for the range" of gpio18 is corrected to 0x000, "the start bit for the first register within the range" of gpio81 is corrected to 24. Fixes: 6cf5e9ef362a ("pinctrl: add pinctrl driver on mt8195") Signed-off-by: Guodong Liu Link: https://lore.kernel.org/r/20230118062116.26315-1-Guodong.Liu@mediatek.com Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt8195.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51128c3f2a7c98055ea1d27e34910dc10977f618 Author: Hans Verkuil Date: Thu Jan 19 10:02:19 2023 +0100 drm/vc4: hdmi: make CEC adapter name unique The bcm2711 has two HDMI outputs, each with their own CEC adapter. The CEC adapter name has to be unique, but it is currently hardcoded to "vc4" for both outputs. Change this to use the card_name from the variant information in order to make the adapter name unique. Signed-off-by: Hans Verkuil Fixes: 15b4511a4af6 ("drm/vc4: add HDMI CEC support") Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/dcf1db75-d9cc-62cc-fa12-baf1b2b3bf31@xs4all.nl drivers/gpu/drm/vc4/vc4_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1febf88ef907b142fdde34f7c64ed3535d9339e4 Author: Fabio Estevam Date: Tue Jan 17 08:25:10 2023 -0300 ARM: dts: imx7d-smegw01: Fix USB host over-current polarity Currently, when resetting the USB modem via AT commands, the modem is no longer re-connected. This problem is caused by the incorrect description of the USB_OTG2_OC pad. It should have pull-up enabled, hysteresis enabled and the property 'over-current-active-low' should be passed. With this change, the USB modem can be successfully re-connected after a reset. Cc: stable@vger.kernel.org Fixes: 9ac0ae97e349 ("ARM: dts: imx7d-smegw01: Add support for i.MX7D SMEGW01 board") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-smegw01.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 39c95d0c357d7ef76aea958c1bece6b24f9b2e7e Author: Philippe Schenker Date: Mon Jan 16 15:01:52 2023 +0100 arm64: dts: imx8mm-verdin: Do not power down eth-phy Currently if suspending using either freeze or memory state, the fec driver tries to power down the phy which leads to crash of the kernel and non-responsible kernel with the following call trace: [ 24.839889 ] Call trace: [ 24.839892 ] phy_error+0x18/0x60 [ 24.839898 ] kszphy_handle_interrupt+0x6c/0x80 [ 24.839903 ] phy_interrupt+0x20/0x2c [ 24.839909 ] irq_thread_fn+0x30/0xa0 [ 24.839919 ] irq_thread+0x178/0x2c0 [ 24.839925 ] kthread+0x154/0x160 [ 24.839932 ] ret_from_fork+0x10/0x20 Since there is currently no functionality in the phy subsystem to power down phys let's just disable the feature of powering-down the ethernet phy. Fixes: 6a57f224f734 ("arm64: dts: freescale: add initial support for verdin imx8m mini") Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 1 + 1 file changed, 1 insertion(+) commit 52219e719f53c792cc10296178e7e38e9e1412aa Author: Ahmad Fatoum Date: Mon Jan 16 12:25:06 2023 +0100 MAINTAINERS: match freescale ARM64 DT directory in i.MX entry The majority of device trees in arch/arm64/boot/dts/freescale/ are built around i.MX SoCs with the rest being for Layerscape. Yet, calling get_maintainers.pl -f on this directory will not match the MAINTAINERS entry, because the directory name doesn't contain the substring "imx". Add an explicit file match for the directory and exclude the Layerscape specific files. This ensures To/Cc is not only generated from git history, but takes e.g. the R: entries into account as well. Signed-off-by: Ahmad Fatoum Signed-off-by: Shawn Guo MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit 7083df59abbc2b7500db312cac706493be0273ff Author: Jerome Brunet Date: Tue Jan 24 11:11:57 2023 +0100 net: mdio-mux-meson-g12a: force internal PHY off on mux switch Force the internal PHY off then on when switching to the internal path. This fixes problems where the PHY ID is not properly set. Fixes: 7090425104db ("net: phy: add amlogic g12a mdio mux support") Suggested-by: Qi Duan Co-developed-by: Heiner Kallweit Signed-off-by: Heiner Kallweit Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20230124101157.232234-1-jbrunet@baylibre.com Signed-off-by: Jakub Kicinski drivers/net/mdio/mdio-mux-meson-g12a.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit aee2770d199a969b205e7b60125d5af47e3bdee0 Author: Ivan Vecera Date: Tue Jan 24 15:51:26 2023 +0100 docs: networking: Fix bridge documentation URL Current documentation URL [1] is no longer valid. [1] https://www.linuxfoundation.org/collaborate/workgroups/networking/bridge Signed-off-by: Ivan Vecera Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20230124145127.189221-1-ivecera@redhat.com Signed-off-by: Jakub Kicinski Documentation/networking/bridge.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d53aaef4332245044b2f3688ac0ea10436c719c Author: Gerhard Engleder Date: Tue Jan 24 20:14:40 2023 +0100 tsnep: Fix TX queue stop/wake for multiple queues netif_stop_queue() and netif_wake_queue() act on TX queue 0. This is ok as long as only a single TX queue is supported. But support for multiple TX queues was introduced with 762031375d5c and I missed to adapt stop and wake of TX queues. Use netif_stop_subqueue() and netif_tx_wake_queue() to act on specific TX queue. Fixes: 762031375d5c ("tsnep: Support multiple TX/RX queue pairs") Signed-off-by: Gerhard Engleder Link: https://lore.kernel.org/r/20230124191440.56887-1-gerhard@engleder-embedded.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/engleder/tsnep_main.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 6c4ca03bd890566d873e3593b32d034bf2f5a087 Author: David Christensen Date: Tue Jan 24 13:53:39 2023 -0500 net/tg3: resolve deadlock in tg3_reset_task() during EEH During EEH error injection testing, a deadlock was encountered in the tg3 driver when tg3_io_error_detected() was attempting to cancel outstanding reset tasks: crash> foreach UN bt ... PID: 159 TASK: c0000000067c6000 CPU: 8 COMMAND: "eehd" ... #5 [c00000000681f990] __cancel_work_timer at c00000000019fd18 #6 [c00000000681fa30] tg3_io_error_detected at c00800000295f098 [tg3] #7 [c00000000681faf0] eeh_report_error at c00000000004e25c ... PID: 290 TASK: c000000036e5f800 CPU: 6 COMMAND: "kworker/6:1" ... #4 [c00000003721fbc0] rtnl_lock at c000000000c940d8 #5 [c00000003721fbe0] tg3_reset_task at c008000002969358 [tg3] #6 [c00000003721fc60] process_one_work at c00000000019e5c4 ... PID: 296 TASK: c000000037a65800 CPU: 21 COMMAND: "kworker/21:1" ... #4 [c000000037247bc0] rtnl_lock at c000000000c940d8 #5 [c000000037247be0] tg3_reset_task at c008000002969358 [tg3] #6 [c000000037247c60] process_one_work at c00000000019e5c4 ... PID: 655 TASK: c000000036f49000 CPU: 16 COMMAND: "kworker/16:2" ...:1 #4 [c0000000373ebbc0] rtnl_lock at c000000000c940d8 #5 [c0000000373ebbe0] tg3_reset_task at c008000002969358 [tg3] #6 [c0000000373ebc60] process_one_work at c00000000019e5c4 ... Code inspection shows that both tg3_io_error_detected() and tg3_reset_task() attempt to acquire the RTNL lock at the beginning of their code blocks. If tg3_reset_task() should happen to execute between the times when tg3_io_error_deteced() acquires the RTNL lock and tg3_reset_task_cancel() is called, a deadlock will occur. Moving tg3_reset_task_cancel() call earlier within the code block, prior to acquiring RTNL, prevents this from happening, but also exposes another deadlock issue where tg3_reset_task() may execute AFTER tg3_io_error_detected() has executed: crash> foreach UN bt PID: 159 TASK: c0000000067d2000 CPU: 9 COMMAND: "eehd" ... #4 [c000000006867a60] rtnl_lock at c000000000c940d8 #5 [c000000006867a80] tg3_io_slot_reset at c0080000026c2ea8 [tg3] #6 [c000000006867b00] eeh_report_reset at c00000000004de88 ... PID: 363 TASK: c000000037564000 CPU: 6 COMMAND: "kworker/6:1" ... #3 [c000000036c1bb70] msleep at c000000000259e6c #4 [c000000036c1bba0] napi_disable at c000000000c6b848 #5 [c000000036c1bbe0] tg3_reset_task at c0080000026d942c [tg3] #6 [c000000036c1bc60] process_one_work at c00000000019e5c4 ... This issue can be avoided by aborting tg3_reset_task() if EEH error recovery is already in progress. Fixes: db84bf43ef23 ("tg3: tg3_reset_task() needs to use rtnl_lock to synchronize") Signed-off-by: David Christensen Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20230124185339.225806-1-drc@linux.vnet.ibm.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/tg3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 47123900f3e4a7f769631d6ec15abf44086276f6 Author: Pierluigi Passaro Date: Sun Jan 15 22:35:03 2023 +0100 arm64: dts: imx8mm: Fix pad control for UART1_DTE_RX According section     8.2.5.313 Select Input Register (IOMUXC_UART1_RXD_SELECT_INPUT) of      i.MX 8M Mini Applications Processor Reference Manual, Rev. 3, 11/2020 the required setting for this specific pin configuration is "1" Signed-off-by: Pierluigi Passaro Reviewed-by: Fabio Estevam Fixes: c1c9d41319c3 ("dt-bindings: imx: Add pinctrl binding doc for imx8mm") Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-pinfunc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a34dc4a9b9e2fb3a45c179a60bb0b26539c96189 Author: Namjae Jeon Date: Wed Jan 25 00:09:02 2023 +0900 ksmbd: downgrade ndr version error message to debug When user switch samba to ksmbd, The following message flood is coming when accessing files. Samba seems to changs dos attribute version to v5. This patch downgrade ndr version error message to debug. $ dmesg ... [68971.766914] ksmbd: v5 version is not supported [68971.779808] ksmbd: v5 version is not supported [68971.871544] ksmbd: v5 version is not supported [68971.910135] ksmbd: v5 version is not supported ... Cc: stable@vger.kernel.org Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/ndr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 62c487b53a7ff31e322cf2874d3796b8202c54a5 Author: Namjae Jeon Date: Wed Jan 25 00:13:20 2023 +0900 ksmbd: limit pdu length size according to connection status Stream protocol length will never be larger than 16KB until session setup. After session setup, the size of requests will not be larger than 16KB + SMB2 MAX WRITE size. This patch limits these invalidly oversized requests and closes the connection immediately. Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers") Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-18259 Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/connection.c | 17 +++++++++++++++-- fs/ksmbd/smb2pdu.h | 5 +++-- 2 files changed, 18 insertions(+), 4 deletions(-) commit ecfb9f404771dde909ce7743df954370933c3be2 Author: Paul Cercueil Date: Wed Dec 14 13:37:04 2022 +0100 clk: ingenic: jz4760: Update M/N/OD calculation algorithm The previous algorithm was pretty broken. - The inner loop had a '(m > m_max)' condition, and the value of 'm' would increase in each iteration; - Each iteration would actually multiply 'm' by two, so it is not needed to re-compute the whole equation at each iteration; - It would loop until (m & 1) == 0, which means it would loop at most once. - The outer loop would divide the 'n' value by two at the end of each iteration. This meant that for a 12 MHz parent clock and a 1.2 GHz requested clock, it would first try n=12, then n=6, then n=3, then n=1, none of which would work; the only valid value is n=2 in this case. Simplify this algorithm with a single for loop, which decrements 'n' after each iteration, addressing all of the above problems. Fixes: bdbfc029374f ("clk: ingenic: Add support for the JZ4760") Cc: Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20221214123704.7305-1-paul@crapouillou.net Signed-off-by: Stephen Boyd drivers/clk/ingenic/jz4760-cgu.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 19398821b25a9cde564265262e680ae1c2351be7 Author: Dan Williams Date: Fri Jan 20 16:26:12 2023 -0800 cxl/pmem: Fix nvdimm unregistration when cxl_pmem driver is absent The cxl_pmem.ko module houses the driver for both cxl_nvdimm_bridge objects and cxl_nvdimm objects. When the core creates a cxl_nvdimm it arranges for it to be autoremoved when the bridge goes down. However, if the bridge never initialized because the cxl_pmem.ko module never loaded, it sets up a the following crash scenario: BUG: kernel NULL pointer dereference, address: 0000000000000478 [..] RIP: 0010:cxl_nvdimm_probe+0x99/0x140 [cxl_pmem] [..] Call Trace: cxl_bus_probe+0x17/0x50 [cxl_core] really_probe+0xde/0x380 __driver_probe_device+0x78/0x170 driver_probe_device+0x1f/0x90 __driver_attach+0xd2/0x1c0 bus_for_each_dev+0x79/0xc0 bus_add_driver+0x1b1/0x200 driver_register+0x89/0xe0 cxl_pmem_init+0x50/0xff0 [cxl_pmem] It turns out the recent rework to simplify nvdimm probing obviated the need to unregister cxl_nvdimm objects at cxl_nvdimm_bridge ->remove() time. Leave the cxl_nvdimm device registered until the hosting cxl_memdev departs. The alternative is that the cxl_memdev needs to be reattached whenever the cxl_nvdimm_bridge attach state cycles, which is awkward and unnecessary. The only requirement is to make sure that when the cxl_nvdimm_bridge goes away any dependent cxl_nvdimm objects are shutdown. Handle that in unregister_nvdimm_bus(). With these registration entanglements removed there is no longer a need to pre-load the cxl_pmem module in cxl_acpi. Fixes: cb9cfff82f6a ("cxl/acpi: Simplify cxl_nvdimm_bridge probing") Reported-by: Gregory Price Debugged-by: Jonathan Cameron Tested-by: Jonathan Cameron Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/167426077263.3955046.9695309346988027311.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 1 - drivers/cxl/core/pmem.c | 42 ++++-------------------------------------- drivers/cxl/pmem.c | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 39 deletions(-) commit fb6df4366f86dd252bfa3049edffa52d17e7b895 Author: Vishal Verma Date: Wed Jan 25 11:34:18 2023 -0700 ACPI: NFIT: fix a potential deadlock during NFIT teardown Lockdep reports that acpi_nfit_shutdown() may deadlock against an opportune acpi_nfit_scrub(). acpi_nfit_scrub () is run from inside a 'work' and therefore has already acquired workqueue-internal locks. It also acquiires acpi_desc->init_mutex. acpi_nfit_shutdown() first acquires init_mutex, and was subsequently attempting to cancel any pending workqueue items. This reversed locking order causes a potential deadlock: ====================================================== WARNING: possible circular locking dependency detected 6.2.0-rc3 #116 Tainted: G O N ------------------------------------------------------ libndctl/1958 is trying to acquire lock: ffff888129b461c0 ((work_completion)(&(&acpi_desc->dwork)->work)){+.+.}-{0:0}, at: __flush_work+0x43/0x450 but task is already holding lock: ffff888129b460e8 (&acpi_desc->init_mutex){+.+.}-{3:3}, at: acpi_nfit_shutdown+0x87/0xd0 [nfit] which lock already depends on the new lock. ... Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&acpi_desc->init_mutex); lock((work_completion)(&(&acpi_desc->dwork)->work)); lock(&acpi_desc->init_mutex); lock((work_completion)(&(&acpi_desc->dwork)->work)); *** DEADLOCK *** Since the workqueue manipulation is protected by its own internal locking, the cancellation of pending work doesn't need to be done under acpi_desc->init_mutex. Move cancel_delayed_work_sync() outside the init_mutex to fix the deadlock. Any work that starts after acpi_nfit_shutdown() drops the lock will see ARS_CANCEL, and the cancel_delayed_work_sync() will safely flush it out. Reported-by: Dan Williams Signed-off-by: Vishal Verma Link: https://lore.kernel.org/r/20230112-acpi_nfit_lockdep-v1-1-660be4dd10be@intel.com Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c88b9ba6b126080a9c121abd943b25e20cd7ac1 Author: Randy Dunlap Date: Mon Jan 16 23:02:49 2023 -0800 dax: super.c: fix kernel-doc bad line warning Convert an empty line to " *" to avoid a kernel-doc warning: drivers/dax/super.c:478: warning: bad line: Signed-off-by: Randy Dunlap Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: nvdimm@lists.linux.dev Link: https://lore.kernel.org/r/20230117070249.31934-1-rdunlap@infradead.org Signed-off-by: Dan Williams drivers/dax/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be0d8f48ad97f5b775b0af3310343f676dbf318a Author: Kees Cook Date: Thu Jan 5 22:02:33 2023 -0800 bcache: Silence memcpy() run-time false positive warnings struct bkey has internal padding in a union, but it isn't always named the same (e.g. key ## _pad, key_p, etc). This makes it extremely hard for the compiler to reason about the available size of copies done against such keys. Use unsafe_memcpy() for now, to silence the many run-time false positive warnings: memcpy: detected field-spanning write (size 264) of single field "&i->j" at drivers/md/bcache/journal.c:152 (size 240) memcpy: detected field-spanning write (size 24) of single field "&b->key" at drivers/md/bcache/btree.c:939 (size 16) memcpy: detected field-spanning write (size 24) of single field "&temp.key" at drivers/md/bcache/extents.c:428 (size 16) Reported-by: Alexandre Pereira Link: https://bugzilla.kernel.org/show_bug.cgi?id=216785 Acked-by: Coly Li Cc: Kent Overstreet Cc: linux-bcache@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230106060229.never.047-kees@kernel.org drivers/md/bcache/bcache_ondisk.h | 3 ++- drivers/md/bcache/journal.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit e6a71160cc145e18ab45195abf89884112e02dfb Author: Kees Cook Date: Wed Jan 18 12:21:35 2023 -0800 gcc-plugins: Reorganize gimple includes for GCC 13 The gimple-iterator.h header must be included before gimple-fold.h starting with GCC 13. Reorganize gimple headers to work for all GCC versions. Reported-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/all/20230113173033.4380-1-palmer@rivosinc.com/ Cc: linux-hardening@vger.kernel.org Signed-off-by: Kees Cook scripts/gcc-plugins/gcc-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4acf1de35f41549e60c3c02a8defa7cb95eabdf2 Author: Kees Cook Date: Fri Jan 6 19:47:05 2023 -0800 kunit: memcpy: Split slow memcpy tests into MEMCPY_SLOW_KUNIT_TEST Since the long memcpy tests may stall a system for tens of seconds in virtualized architecture environments, split those tests off under CONFIG_MEMCPY_SLOW_KUNIT_TEST so they can be separately disabled. Reported-by: Guenter Roeck Link: https://lore.kernel.org/lkml/20221226195206.GA2626419@roeck-us.net Reviewed-by: Nick Desaulniers Reviewed-and-tested-by: Guenter Roeck Reviewed-by: David Gow Cc: Andrew Morton Cc: Nathan Chancellor Cc: linux-hardening@vger.kernel.org Signed-off-by: Kees Cook lib/Kconfig.debug | 9 +++++++++ lib/memcpy_kunit.c | 2 ++ 2 files changed, 11 insertions(+) commit 4b069553246f993c4221e382d0d0ae34f5ba730e 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 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit eadd7deca0ad8a83edb2b894d8326c78e78635d6 Author: Alexander Potapenko Date: Tue Jan 24 12:32:34 2023 +0100 btrfs: zlib: zero-initialize zlib workspace KMSAN reports uses of uninitialized memory in zlib's longest_match() called on memory originating from zlib_alloc_workspace(). This issue is known by zlib maintainers and is claimed to be harmless, but to be on the safe side we'd better initialize the memory. Link: https://zlib.net/zlib_faq.html#faq36 Reported-by: syzbot+14d9e7602ebdf7ec0a60@syzkaller.appspotmail.com CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Alexander Potapenko Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/zlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c538de0f2a74d50aff7278c092f88ae59cee688 Author: Josef Bacik Date: Wed Jan 18 16:35:13 2023 -0500 btrfs: limit device extents to the device size There was a recent regression in btrfs/177 that started happening with the size class patches ("btrfs: introduce size class to block group allocator"). This however isn't a regression introduced by those patches, but rather the bug was uncovered by a change in behavior in these patches. The patches triggered more chunk allocations in the ^free-space-tree case, which uncovered a race with device shrink. The problem is we will set the device total size to the new size, and use this to find a hole for a device extent. However during shrink we may have device extents allocated past this range, so we could potentially find a hole in a range past our new shrink size. We don't actually limit our found extent to the device size anywhere, we assume that we will not find a hole past our device size. This isn't true with shrink as we're relocating block groups and thus creating holes past the device size. Fix this by making sure we do not search past the new device size, and if we wander into any device extents that start after our device size simply break from the loop and use whatever hole we've already found. CC: stable@vger.kernel.org # 4.14+ Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/volumes.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f7c11affde9e29316d24b6736d16faeaac8278f2 Author: Tanmay Bhushan <007047221b@gmail.com> Date: Sun Jan 15 21:32:15 2023 +0100 btrfs: raid56: fix stripes if vertical errors are found We take two stripe numbers if vertical errors are found. In case it is just a pstripe it does not matter but in case of raid 6 it matters as both stripes need to be fixed. Fixes: 7a3150723061 ("btrfs: raid56: do data csum verification during RMW cycle") Reviewed-by: Qu Wenruo Signed-off-by: Tanmay Bhushan <007047221b@gmail.com> Signed-off-by: David Sterba fs/btrfs/raid56.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8bf2df715bb8ac964f91fe8bf67c37c5d916463 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 drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f85c5e25fd28fe0bf6d6d0563cf83758a4e05c8f 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 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit cb1e0b015f56b8f3c7f5ce33ff4b782ee5674512 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 .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 51 +++++++++++++++++----- 1 file changed, 39 insertions(+), 12 deletions(-) commit 1119e1f9636b76aef14068c7fd0b4d55132b86b8 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 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 24 ++++++++++++++++++++++ .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 5 ----- 2 files changed, 24 insertions(+), 5 deletions(-) commit f0f7743624e77abe419ff1971b50e44ac1482421 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 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ 1 file changed, 2 insertions(+) commit 08fbe3c24fd2f0706c0eb907c71e26f10e5d8c6a 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 drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 1 + 1 file changed, 1 insertion(+) commit 15b207d0abdcbb2271774aa99d9a290789159e75 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 1 + 1 file changed, 1 insertion(+) commit 2de3769830346e68b3de0f4abc0d8e2625ad9dac 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 1 - 1 file changed, 1 deletion(-) commit 7c46948a6e9cf47ed03b0d489fde894ad46f1437 Merge: 948ef7bb70c4 facd61053cff Author: Linus Torvalds Date: Wed Jan 25 09:15:15 2023 -0800 Merge tag 'fs.fuse.acl.v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull fuse ACL fix from Christian Brauner: "The new posix acl API doesn't depend on the xattr handler infrastructure anymore and instead only relies on the posix acl inode operations. As a result daemons without FUSE_POSIX_ACL are unable to use posix acls like they used to. Fix this by copying what we did for overlayfs during the posix acl api conversion. Make fuse implement a dedicated ->get_inode_acl() method as does overlayfs. Fuse can then also uses this to express different needs for vfs permission checking during lookup and acl based retrieval via the regular system call path. This allows fuse to continue to refuse retrieving posix acls for daemons that don't set FUSE_POSXI_ACL for permission checking while also allowing a fuse server to retrieve it via the usual system calls" * tag 'fs.fuse.acl.v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: fuse: fixes after adapting to new posix acl api commit a49fb7218ed84a4c5e6c56b9fd933498b9730912 Author: Doug Smythies Date: Sat Jan 21 08:41:35 2023 -0800 selftests: amd-pstate: Don't delete source files via Makefile Revert the portion of a recent Makefile change that incorrectly deletes source files when doing "make clean". Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus") Reported-by: Sedat Dilek Tested-by: Sedat Dilek Reviewed-by: Sedat Dilek Acked-by: Huang Rui Signed-off-by: Doug Smythies Signed-off-by: Shuah Khan tools/testing/selftests/amd-pstate/Makefile | 5 ----- 1 file changed, 5 deletions(-) commit b7ab9161cf5ddc42a288edf9d1a61f3bdffe17c7 Author: David Howells Date: Wed Jan 25 14:02:13 2023 +0000 cifs: Fix oops due to uncleared server->smbd_conn in reconnect In smbd_destroy(), clear the server->smbd_conn pointer after freeing the smbd_connection struct that it points to so that reconnection doesn't get confused. Fixes: 8ef130f9ec27 ("CIFS: SMBD: Implement function to destroy a SMB Direct connection") Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Acked-by: Tom Talpey Signed-off-by: David Howells Cc: Long Li Cc: Pavel Shilovsky Cc: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/smbdirect.c | 1 + 1 file changed, 1 insertion(+) commit 78020233418518faa72fba11f40e1d53b9e88a2e Author: Masami Hiramatsu (Google) Date: Fri Jan 20 08:36:24 2023 +0900 bootconfig: Update MAINTAINERS file to add tree and mailing list Since the bootconfig related changes will be handled on linux-trace tree, add the tree and mailing lists for EXTRA BOOT CONFIG. Link: https://lkml.kernel.org/r/167417138436.2333752.6988808113120359923.stgit@devnote3 Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) commit ae3edea88e6c1bbb8b41ef958f79a7a44ab45f7c Author: Colin Ian King Date: Mon Jan 16 16:16:12 2023 +0000 rv: remove redundant initialization of pointer ptr The pointer ptr is being initialized with a value that is never read, it is being updated later on a call to strim. Remove the extraneous initialization. Link: https://lkml.kernel.org/r/20230116161612.77192-1-colin.i.king@gmail.com Cc: Daniel Bristot de Oliveira Cc: Masami Hiramatsu Signed-off-by: Colin Ian King Signed-off-by: Steven Rostedt (Google) kernel/trace/rv/rv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34226fc6889e0e2fe8480bf3a0b43ac992bbee94 Author: Mark Rutland Date: Tue Jan 3 12:49:10 2023 +0000 ftrace: Maintain samples/ftrace There's no entry in MAINTAINERS for samples/ftrace. Add one so that the FTRACE maintainers are kept in the loop. Link: https://lkml.kernel.org/r/20230103124912.2948963-2-mark.rutland@arm.com Acked-by: Masami Hiramatsu (Google) Signed-off-by: Mark Rutland Signed-off-by: Steven Rostedt (Google) MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit d5090d91ec929a79b52e5a98144d85dea40d4438 Author: Randy Dunlap Date: Sat Jan 7 18:12:38 2023 -0800 tracing/filter: fix kernel-doc warnings Use the 'struct' keyword for a struct's kernel-doc notation and use the correct function parameter name to eliminate kernel-doc warnings: kernel/trace/trace_events_filter.c:136: warning: cannot understand function prototype: 'struct prog_entry ' kerne/trace/trace_events_filter.c:155: warning: Excess function parameter 'when_to_branch' description in 'update_preds' Also correct some trivial punctuation problems. Link: https://lkml.kernel.org/r/20230108021238.16398-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_filter.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c1d6105869464635d8a2bcf87a43c05f4c0cfca4 Author: Ley Foon Tan Date: Thu Jan 5 11:37:05 2023 +0800 riscv: Move call to init_cpu_topology() to later initialization stage If "capacity-dmips-mhz" is present in a CPU DT node, topology_parse_cpu_capacity() will fail to allocate memory. arm64, with which this code path is shared, does not call topology_parse_cpu_capacity() until later in boot where memory allocation is available. While "capacity-dmips-mhz" is not yet a valid property on RISC-V, invalid properties should be ignored rather than cause issues. Move init_cpu_topology(), which calls topology_parse_cpu_capacity(), to a later initialization stage, to match arm64. As a side effect of this change, RISC-V is "protected" from changes to core topology code that would work on arm64 where memory allocation is safe but on RISC-V isn't. Fixes: 03f11f03dbfe ("RISC-V: Parse cpu topology during boot.") Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Signed-off-by: Ley Foon Tan Link: https://lore.kernel.org/r/20230105033705.3946130-1-leyfoon.tan@starfivetech.com [Palmer: use Conor's commit text] Link: https://lore.kernel.org/linux-riscv/20230104183033.755668-1-pierre.gondois@arm.com/T/#me592d4c8b9508642954839f0077288a353b0b9b2 Signed-off-by: Palmer Dabbelt arch/riscv/kernel/smpboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2fa89458af9993fab8054daf827f38881e2ad473 Author: Pratham Pratap Date: Wed Jan 25 12:57:25 2023 +0530 usb: gadget: f_uac2: Fix incorrect increment of bNumEndpoints Currently connect/disconnect of USB cable calls afunc_bind and eventually increments the bNumEndpoints. Performing multiple plugin/plugout will increment bNumEndpoints incorrectly, and on the next plug-in it leads to invalid configuration of descriptor and hence enumeration fails. Fix this by resetting the value of bNumEndpoints to 1 on every afunc_bind call. Fixes: 40c73b30546e ("usb: gadget: f_uac2: add adaptive sync support for capture") Cc: stable Signed-off-by: Pratham Pratap Signed-off-by: Prashanth K Link: https://lore.kernel.org/r/1674631645-28888-1-git-send-email-quic_prashk@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_uac2.c | 1 + 1 file changed, 1 insertion(+) commit cb963b2c011a62838852c902eccb3f72e5d3dbb6 Author: marco.rodolfi@tuta.io Date: Tue Jan 10 15:54:26 2023 +0100 HID: Ignore battery for Elan touchscreen on Asus TP420IA This device has a touchscreen thats report a battery even if it doesn't have one. Ask Linux to ignore the battery so it will not always report it as low. [jkosina@suse.cz: fix whitespace damage] Signed-off-by: Marco Rodolfi Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+) commit acd7e9ee57c880b99671dd99680cb707b7b5b0ee Author: Rafael J. Wysocki Date: Wed Jan 25 13:17:42 2023 +0100 thermal: intel: int340x: Add locking to int340x_thermal_get_trip_type() In order to prevent int340x_thermal_get_trip_type() from possibly racing with int340x_thermal_read_trips() invoked by int3403_notify() add locking to it in analogy with int340x_thermal_get_trip_temp(). Fixes: 6757a7abe47b ("thermal: intel: int340x: Protect trip temperature from concurrent updates") Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit ac8d986cbf0b0ffdbf2c707fe59cf4a71d933a18 Merge: a9e9b78d53b9 b98e1a04e27f Author: David S. Miller Date: Wed Jan 25 13:07:38 2023 +0000 Merge branch 'mptcp-fixes' Jeremy Kerr says: ==================== net: mctp: struct sock lifetime fixes This series is a set of fixes for the sock lifetime handling in the AF_MCTP code, fixing a uaf reported by Noam Rathaus . The Fixes: tags indicate the original patches affected, but some tweaking to backport to those commits may be needed; I have a separate branch with backports to 5.15 if that helps with stable trees. Of course, any comments/queries most welcome. ==================== Signed-off-by: David S. Miller commit b98e1a04e27fddfdc808bf46fe78eca30db89ab3 Author: Jeremy Kerr Date: Tue Jan 24 10:01:06 2023 +0800 net: mctp: mark socks as dead on unhash, prevent re-add Once a socket has been unhashed, we want to prevent it from being re-used in a sk_key entry as part of a routing operation. This change marks the sk as SOCK_DEAD on unhash, which prevents addition into the net's key list. We need to do this during the key add path, rather than key lookup, as we release the net keys_lock between those operations. Fixes: 4a992bbd3650 ("mctp: Implement message fragmentation & reassembly") Signed-off-by: Jeremy Kerr Signed-off-by: David S. Miller net/mctp/af_mctp.c | 1 + net/mctp/route.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 6e54ea37e344f145665c2dc3cc534b92529e8de5 Author: Paolo Abeni Date: Tue Jan 24 10:01:05 2023 +0800 net: mctp: hold key reference when looking up a general key Currently, we have a race where we look up a sock through a "general" (ie, not directly associated with the (src,dest,tag) tuple) key, then drop the key reference while still holding the key's sock. This change expands the key reference until we've finished using the sock, and hence the sock reference too. Commit message changes from Jeremy Kerr . Reported-by: Noam Rathaus Fixes: 73c618456dc5 ("mctp: locking, lifetime and validity changes for sk_keys") Signed-off-by: Paolo Abeni Signed-off-by: Jeremy Kerr Signed-off-by: David S. Miller net/mctp/route.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5f41ae6fca9d40ab3cb9b0507931ef7a9b3ea50b Author: Jeremy Kerr Date: Tue Jan 24 10:01:04 2023 +0800 net: mctp: move expiry timer delete to unhash Currently, we delete the key expiry timer (in sk->close) before unhashing the sk. This means that another thread may find the sk through its presence on the key list, and re-queue the timer. This change moves the timer deletion to the unhash, after we have made the key no longer observable, so the timer cannot be re-queued. Fixes: 7b14e15ae6f4 ("mctp: Implement a timeout for tags") Signed-off-by: Jeremy Kerr Signed-off-by: David S. Miller net/mctp/af_mctp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit de8a6b15d9654c3e4f672d76da9d9df8ee06331d Author: Jeremy Kerr Date: Tue Jan 24 10:01:03 2023 +0800 net: mctp: add an explicit reference from a mctp_sk_key to sock Currently, we correlate the mctp_sk_key lifetime to the sock lifetime through the sock hash/unhash operations, but this is pretty tenuous, and there are cases where we may have a temporary reference to an unhashed sk. This change makes the reference more explicit, by adding a hold on the sock when it's associated with a mctp_sk_key, released on final key unref. Fixes: 73c618456dc5 ("mctp: locking, lifetime and validity changes for sk_keys") Signed-off-by: Jeremy Kerr Signed-off-by: David S. Miller net/mctp/route.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a9e9b78d53b91e6e52a2580aafece542655685b7 Merge: f2b0b5210f67 f3c07758c900 Author: David S. Miller Date: Wed Jan 25 13:00:27 2023 +0000 Merge branch 'ravb-fixes' Yoshihiro Shimoda says: ==================== net: ravb: Fix potential issues Fix potentiall issues on the ravb driver. Changes from v2: https://lore.kernel.org/all/20230123131331.1425648-1-yoshihiro.shimoda.uh@renesas.com/ - Add Reviewed-by in the patch [2/2]. - Add a commit description in the patch [2/2]. Changes from v1: https://lore.kernel.org/all/20230119043920.875280-1-yoshihiro.shimoda.uh@renesas.com/ - Fix typo in the patch [1/2]. - Add Reviewed-by in the patch [1/2]. - Fix "Fixed" tag in the patch [2/2]. - Fix a comment indentation of the code in the patch [2/2]. ==================== Signed-off-by: David S. Miller commit f3c07758c9007a6bfff5290d9e19d3c41930c897 Author: Yoshihiro Shimoda Date: Tue Jan 24 09:02:11 2023 +0900 net: ravb: Fix possible hang if RIS2_QFF1 happen Since this driver enables the interrupt by RIC2_QFE1, this driver should clear the interrupt flag if it happens. Otherwise, the interrupt causes to hang the system. Note that this also fix a minor coding style (a comment indentation) around the fixed code. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Sergey Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2b6cdee1d13ffbb24baca3c9b8a572d6b541e4e Author: Yoshihiro Shimoda Date: Tue Jan 24 09:02:10 2023 +0900 net: ravb: Fix lack of register setting after system resumed for Gen3 After system entered Suspend to RAM, registers setting of this hardware is reset because the SoC will be turned off. On R-Car Gen3 (info->ccc_gac), ravb_ptp_init() is called in ravb_probe() only. So, after system resumed, it lacks of the initial settings for ptp. So, add ravb_ptp_{init,stop}() into ravb_{resume,suspend}(). Fixes: f5d7837f96e5 ("ravb: ptp: Add CONFIG mode support") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Sergey Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 216f37366e86a6ddd34ed842cac3354f579ef48e Author: Nikita Shubin Date: Wed Jan 25 11:30:25 2023 +0300 gpio: ep93xx: Make irqchip immutable This turns the Cirrus ep93xx gpio irqchip immutable. Preserve per-chip labels by adding an ->irq_print_chip() callback. Signed-off-by: Nikita Shubin Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-ep93xx.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 0f04cdbdb210000a97c773b28b598fa8ac3aafa4 Author: Nikita Shubin Date: Wed Jan 25 11:30:24 2023 +0300 gpio: ep93xx: Fix port F hwirq numbers in handler Fix wrong translation of irq numbers in port F handler, as ep93xx hwirqs increased by 1, we should simply decrease them by 1 in translation. Fixes: 482c27273f52 ("ARM: ep93xx: renumber interrupts") Signed-off-by: Nikita Shubin Acked-by: Arnd Bergmann Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-ep93xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 100c94ffde489ee11e23400f2a07b236144b048f Author: Krzysztof Kozlowski Date: Tue Jan 24 13:30:49 2023 +0100 ASoC: codecs: wsa883x: correct playback min/max rates Correct reversed values used in min/max rates, leading to incorrect playback constraints. Cc: Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230124123049.285395-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/wsa883x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 37870358616ca7fdb1e90ad1cdd791655ec54414 Author: Dan Carpenter Date: Tue Jan 24 18:20:26 2023 +0300 gpio: mxc: Unlock on error path in mxc_flip_edge() We recently added locking to this function but one error path was over looked. Drop the lock before returning. Fixes: e5464277625c ("gpio: mxc: Protect GPIO irqchip RMW with bgpio spinlock") Signed-off-by: Dan Carpenter Acked-by: Marek Vasut Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-mxc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1bc5d819f0b9784043ea08570e1b21107aa35739 Author: Mark Pearson Date: Tue Jan 24 10:36:23 2023 -0500 platform/x86: thinkpad_acpi: Fix profile modes on Intel platforms My last commit to fix profile mode displays on AMD platforms caused an issue on Intel platforms - sorry! In it I was reading the current functional mode (MMC, PSC, AMT) from the BIOS but didn't account for the fact that on some of our Intel platforms I use a different API which returns just the profile and not the functional mode. This commit fixes it so that on Intel platforms it knows the functional mode is always MMC. I also fixed a potential problem that a platform may try to set the mode for both MMC and PSC - which was incorrect. Tested on X1 Carbon 9 (Intel) and Z13 (AMD). Link: https://bugzilla.kernel.org/show_bug.cgi?id=216963 Fixes: fde5f74ccfc7 ("platform/x86: thinkpad_acpi: Fix profile mode display in AMT mode") Cc: stable@vger.kernel.org Reviewed-by: Mario Limonciello Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20230124153623.145188-1-mpearson-lenovo@squebb.ca Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit f2b0b5210f67c56a3bcdf92ff665fb285d6e0067 Author: Hyunwoo Kim Date: Mon Jan 23 11:43:23 2023 -0800 net/x25: Fix to not accept on connected socket When listen() and accept() are called on an x25 socket that connect() succeeds, accept() succeeds immediately. This is because x25_connect() queues the skb to sk->sk_receive_queue, and x25_accept() dequeues it. This creates a child socket with the sk of the parent x25 socket, which can cause confusion. Fix x25_listen() to return -EINVAL if the socket has already been successfully connect()ed to avoid this issue. Signed-off-by: Hyunwoo Kim Signed-off-by: David S. Miller net/x25/af_x25.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 85eee6341abb81ac6a35062ffd5c3029eb53be6b Author: Keith Busch Date: Tue Jan 24 13:29:14 2023 -0800 nvme: fix passthrough csi check The namespace head saves the Command Set Indicator enum, so use that instead of the Command Set Selected. The two values are not the same. Fixes: 831ed60c2aca2d ("nvme: also return I/O command effects from nvme_command_effects") Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca0254998be4d74cf6add70ccfab0d2dbd362a10 Author: Liao Chang Date: Mon Jan 16 14:43:42 2023 +0800 riscv/kprobe: Fix instruction simulation of JALR Set kprobe at 'jalr 1140(ra)' of vfs_write results in the following crash: [ 32.092235] Unable to handle kernel access to user memory without uaccess routines at virtual address 00aaaaaad77b1170 [ 32.093115] Oops [#1] [ 32.093251] Modules linked in: [ 32.093626] CPU: 0 PID: 135 Comm: ftracetest Not tainted 6.2.0-rc2-00013-gb0aa5e5df0cb-dirty #16 [ 32.093985] Hardware name: riscv-virtio,qemu (DT) [ 32.094280] epc : ksys_read+0x88/0xd6 [ 32.094855] ra : ksys_read+0xc0/0xd6 [ 32.095016] epc : ffffffff801cda80 ra : ffffffff801cdab8 sp : ff20000000d7bdc0 [ 32.095227] gp : ffffffff80f14000 tp : ff60000080f9cb40 t0 : ffffffff80f13e80 [ 32.095500] t1 : ffffffff8000c29c t2 : ffffffff800dbc54 s0 : ff20000000d7be60 [ 32.095716] s1 : 0000000000000000 a0 : ffffffff805a64ae a1 : ffffffff80a83708 [ 32.095921] a2 : ffffffff80f160a0 a3 : 0000000000000000 a4 : f229b0afdb165300 [ 32.096171] a5 : f229b0afdb165300 a6 : ffffffff80eeebd0 a7 : 00000000000003ff [ 32.096411] s2 : ff6000007ff76800 s3 : fffffffffffffff7 s4 : 00aaaaaad77b1170 [ 32.096638] s5 : ffffffff80f160a0 s6 : ff6000007ff76800 s7 : 0000000000000030 [ 32.096865] s8 : 00ffffffc3d97be0 s9 : 0000000000000007 s10: 00aaaaaad77c9410 [ 32.097092] s11: 0000000000000000 t3 : ffffffff80f13e48 t4 : ffffffff8000c29c [ 32.097317] t5 : ffffffff8000c29c t6 : ffffffff800dbc54 [ 32.097505] status: 0000000200000120 badaddr: 00aaaaaad77b1170 cause: 000000000000000d [ 32.098011] [] ksys_write+0x6c/0xd6 [ 32.098222] [] sys_write+0x2a/0x38 [ 32.098405] [] ret_from_syscall+0x0/0x2 Since the rs1 and rd might be the same one, such as 'jalr 1140(ra)', hence it requires obtaining the target address from rs1 followed by updating rd. Fixes: c22b0bcb1dd0 ("riscv: Add kprobes supported") Signed-off-by: Liao Chang Reviewed-by: Guo Ren Link: https://lore.kernel.org/r/20230116064342.2092136-1-liaochang1@huawei.com [Palmer: Pick Guo's cleanup] Signed-off-by: Palmer Dabbelt arch/riscv/kernel/probes/simulate-insn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e8c8fd9b8393d7064152c8806f5ac446d760a23e Merge: 74bc3a5acc82 c88ea16a8f89 Author: Alexei Starovoitov Date: Tue Jan 24 21:32:55 2023 -0800 Merge branch 'bpf, sockmap: Fix infinite recursion in sock_map_close' Jakub Sitnicki says: ==================== This patch set addresses the syzbot report in [1]. Patch #1 has been suggested by Eric [2]. I extended it to cover the rest of sock_map proto callbacks. Otherwise we would still overflow the stack. Patch #2 contains the actual fix and bug analysis. Patches #3 & #4 add coverage to selftests to trigger the bug. [1] https://lore.kernel.org/all/00000000000073b14905ef2e7401@google.com/ [2] https://lore.kernel.org/all/CANn89iK2UN1FmdUcH12fv_xiZkv2G+Nskvmq7fG6aA_6VKRf6g@mail.gmail.com/ --- v1 -> v2: v1: https://lore.kernel.org/r/20230113-sockmap-fix-v1-0-d3cad092ee10@cloudflare.com [v1 didn't hit bpf@ ML by mistake] * pull in Eric's patch to protect against recursion loop bugs (Eric) * add a macro helper to check if pointer is inside a memory range (Eric) ==================== Signed-off-by: Alexei Starovoitov commit c88ea16a8f892bce3bfb3f6a0d91b2bb27df8f59 Author: Jakub Sitnicki Date: Sat Jan 21 13:41:46 2023 +0100 selftests/bpf: Cover listener cloning with progs attached to sockmap Today we test if a child socket is cloned properly from a listening socket inside a sockmap only when there are no BPF programs attached to the map. A bug has been reported [1] for the case when sockmap has a verdict program attached. So cover this case as well to prevent regressions. [1]: https://lore.kernel.org/r/00000000000073b14905ef2e7401@google.com Signed-off-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/r/20230113-sockmap-fix-v2-4-1e0ee7ac2f90@cloudflare.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/prog_tests/sockmap_listen.c | 30 ++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit b4ea530d024ca6095fc80290075893a5b7136516 Author: Jakub Sitnicki Date: Sat Jan 21 13:41:45 2023 +0100 selftests/bpf: Pass BPF skeleton to sockmap_listen ops tests Following patch extends the sockmap ops tests to cover the scenario when a sockmap with attached programs holds listening sockets. Pass the BPF skeleton to sockmap ops test so that the can access and attach the BPF programs. Signed-off-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/r/20230113-sockmap-fix-v2-3-1e0ee7ac2f90@cloudflare.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/prog_tests/sockmap_listen.c | 55 +++++++++++++++------- 1 file changed, 37 insertions(+), 18 deletions(-) commit ddce1e091757d0259107c6c0c7262df201de2b66 Author: Jakub Sitnicki Date: Sat Jan 21 13:41:44 2023 +0100 bpf, sockmap: Check for any of tcp_bpf_prots when cloning a listener A listening socket linked to a sockmap has its sk_prot overridden. It points to one of the struct proto variants in tcp_bpf_prots. The variant depends on the socket's family and which sockmap programs are attached. A child socket cloned from a TCP listener initially inherits their sk_prot. But before cloning is finished, we restore the child's proto to the listener's original non-tcp_bpf_prots one. This happens in tcp_create_openreq_child -> tcp_bpf_clone. Today, in tcp_bpf_clone we detect if the child's proto should be restored by checking only for the TCP_BPF_BASE proto variant. This is not correct. The sk_prot of listening socket linked to a sockmap can point to to any variant in tcp_bpf_prots. If the listeners sk_prot happens to be not the TCP_BPF_BASE variant, then the child socket unintentionally is left if the inherited sk_prot by tcp_bpf_clone. This leads to issues like infinite recursion on close [1], because the child state is otherwise not set up for use with tcp_bpf_prot operations. Adjust the check in tcp_bpf_clone to detect all of tcp_bpf_prots variants. Note that it wouldn't be sufficient to check the socket state when overriding the sk_prot in tcp_bpf_update_proto in order to always use the TCP_BPF_BASE variant for listening sockets. Since commit b8b8315e39ff ("bpf, sockmap: Remove unhash handler for BPF sockmap usage") it is possible for a socket to transition to TCP_LISTEN state while already linked to a sockmap, e.g. connect() -> insert into map -> connect(AF_UNSPEC) -> listen(). [1]: https://lore.kernel.org/all/00000000000073b14905ef2e7401@google.com/ Fixes: e80251555f0b ("tcp_bpf: Don't let child socket inherit parent protocol ops on copy") Reported-by: syzbot+04c21ed96d861dccc5cd@syzkaller.appspotmail.com Signed-off-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/r/20230113-sockmap-fix-v2-2-1e0ee7ac2f90@cloudflare.com Signed-off-by: Alexei Starovoitov include/linux/util_macros.h | 12 ++++++++++++ net/ipv4/tcp_bpf.c | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit 5b4a79ba65a1ab479903fff2e604865d229b70a9 Author: Jakub Sitnicki Date: Sat Jan 21 13:41:43 2023 +0100 bpf, sockmap: Don't let sock_map_{close,destroy,unhash} call itself sock_map proto callbacks should never call themselves by design. Protect against bugs like [1] and break out of the recursive loop to avoid a stack overflow in favor of a resource leak. [1] https://lore.kernel.org/all/00000000000073b14905ef2e7401@google.com/ Suggested-by: Eric Dumazet Signed-off-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/r/20230113-sockmap-fix-v2-1-1e0ee7ac2f90@cloudflare.com Signed-off-by: Alexei Starovoitov net/core/sock_map.c | 61 +++++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 27 deletions(-) commit 2a48216cff7a2e3964fbed16f84d33f68b3e5e42 Merge: 418e53401e47 a44b7651489f Author: Jakub Kicinski Date: Tue Jan 24 18:59:37 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Perform SCTP vtag verification for ABORT/SHUTDOWN_COMPLETE according to RFC 9260, Sect 8.5.1. 2) Fix infinite loop if SCTP chunk size is zero in for_each_sctp_chunk(). And remove useless check in this macro too. 3) Revert DATA_SENT state in the SCTP tracker, this was applied in the previous merge window. Next patch in this series provides a more simple approach to multihoming support. 4) Unify HEARTBEAT_ACKED and ESTABLISHED states for SCTP multihoming support, use default ESTABLISHED of 210 seconds based on heartbeat timeout * maximum number of retransmission + round-trip timeout. Otherwise, SCTP conntrack entry that represents secondary paths remain stale in the table for up to 5 days. This is a slightly large batch with fixes for the SCTP connection tracking helper, all patches from Sriram Yagnaraman. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: conntrack: unify established states for SCTP paths Revert "netfilter: conntrack: add sctp DATA_SENT state" netfilter: conntrack: fix bug in for_each_sctp_chunk netfilter: conntrack: fix vtag checks for ABORT/SHUTDOWN_COMPLETE ==================== Link: https://lore.kernel.org/r/20230124183933.4752-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 418e53401e478a743cf33b1c32ea0728f0afef66 Author: Paul M Stillwell Jr Date: Mon Jan 23 16:57:14 2023 -0800 ice: move devlink port creation/deletion Commit a286ba738714 ("ice: reorder PF/representor devlink port register/unregister flows") moved the code to create and destroy the devlink PF port. This was fine, but created a corner case issue in the case of ice_register_netdev() failing. In that case, the driver would end up calling ice_devlink_destroy_pf_port() twice. Additionally, it makes no sense to tie creation of the devlink PF port to the creation of the netdev so separate out the code to create/destroy the devlink PF port from the netdev code. This makes it a cleaner interface. Fixes: a286ba738714 ("ice: reorder PF/representor devlink port register/unregister flows") Signed-off-by: Paul M Stillwell Jr Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230124005714.3996270-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_lib.c | 3 --- drivers/net/ethernet/intel/ice/ice_main.c | 25 +++++++++++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) commit 458e279f861d3f61796894cd158b780765a1569f Author: Marcelo Ricardo Leitner Date: Mon Jan 23 14:59:33 2023 -0300 sctp: fail if no bound addresses can be used for a given scope Currently, if you bind the socket to something like: servaddr.sin6_family = AF_INET6; servaddr.sin6_port = htons(0); servaddr.sin6_scope_id = 0; inet_pton(AF_INET6, "::1", &servaddr.sin6_addr); And then request a connect to: connaddr.sin6_family = AF_INET6; connaddr.sin6_port = htons(20000); connaddr.sin6_scope_id = if_nametoindex("lo"); inet_pton(AF_INET6, "fe88::1", &connaddr.sin6_addr); What the stack does is: - bind the socket - create a new asoc - to handle the connect - copy the addresses that can be used for the given scope - try to connect But the copy returns 0 addresses, and the effect is that it ends up trying to connect as if the socket wasn't bound, which is not the desired behavior. This unexpected behavior also allows KASLR leaks through SCTP diag interface. The fix here then is, if when trying to copy the addresses that can be used for the scope used in connect() it returns 0 addresses, bail out. This is what TCP does with a similar reproducer. Reported-by: Pietro Borrello Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Marcelo Ricardo Leitner Reviewed-by: Xin Long Link: https://lore.kernel.org/r/9fcd182f1099f86c6661f3717f63712ddd1c676c.1674496737.git.marcelo.leitner@gmail.com Signed-off-by: Jakub Kicinski net/sctp/bind_addr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 948ef7bb70c4acaf74d87420ea3a1190862d4548 Merge: 246dc53fb246 0254127ab977 Author: Linus Torvalds Date: Tue Jan 24 18:19:44 2023 -0800 Merge tag 'modules-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull module fix from Luis Chamberlain: "Theis is a fix we have been delaying for v6.2 due to lack of early testing on linux-next. The commit has been sitting in linux-next since December and testing has also been now a bit extensive by a few developers. Since this is a fix which definitely will go to v6.3 it should also apply to v6.2 so if there are any issues we pick them up earlier rather than later. The fix fixes a regression since v5.3, prior to me helping with module maintenance, however, the issue is real in that in the worst case now can prevent boot. We've discussed all possible corner cases [0] and at last do feel this is ready for v6.2-rc6" Link https://lore.kernel.org/all/Y9A4fiobL6IHp%2F%2FP@bombadil.infradead.org/ [0] * tag 'modules-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: module: Don't wait for GOING modules commit ea4fdbaa2f7798cb25adbe4fd52ffc6356f097bb Author: Eric Dumazet Date: Mon Jan 23 08:45:52 2023 +0000 net/sched: sch_taprio: do not schedule in taprio_reset() As reported by syzbot and hinted by Vinicius, I should not have added a qdisc_synchronize() call in taprio_reset() taprio_reset() can be called with qdisc spinlock held (and BH disabled) as shown in included syzbot report [1]. Only taprio_destroy() needed this synchronization, as explained in the blamed commit changelog. [1] BUG: scheduling while atomic: syz-executor150/5091/0x00000202 2 locks held by syz-executor150/5091: Modules linked in: Preemption disabled at: [<0000000000000000>] 0x0 Kernel panic - not syncing: scheduling while atomic: panic_on_warn set ... CPU: 1 PID: 5091 Comm: syz-executor150 Not tainted 6.2.0-rc3-syzkaller-00219-g010a74f52203 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 panic+0x2cc/0x626 kernel/panic.c:318 check_panic_on_warn.cold+0x19/0x35 kernel/panic.c:238 __schedule_bug.cold+0xd5/0xfe kernel/sched/core.c:5836 schedule_debug kernel/sched/core.c:5865 [inline] __schedule+0x34e4/0x5450 kernel/sched/core.c:6500 schedule+0xde/0x1b0 kernel/sched/core.c:6682 schedule_timeout+0x14e/0x2a0 kernel/time/timer.c:2167 schedule_timeout_uninterruptible kernel/time/timer.c:2201 [inline] msleep+0xb6/0x100 kernel/time/timer.c:2322 qdisc_synchronize include/net/sch_generic.h:1295 [inline] taprio_reset+0x93/0x270 net/sched/sch_taprio.c:1703 qdisc_reset+0x10c/0x770 net/sched/sch_generic.c:1022 dev_reset_queue+0x92/0x130 net/sched/sch_generic.c:1285 netdev_for_each_tx_queue include/linux/netdevice.h:2464 [inline] dev_deactivate_many+0x36d/0x9f0 net/sched/sch_generic.c:1351 dev_deactivate+0xed/0x1b0 net/sched/sch_generic.c:1374 qdisc_graft+0xe4a/0x1380 net/sched/sch_api.c:1080 tc_modify_qdisc+0xb6b/0x19a0 net/sched/sch_api.c:1689 rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6141 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2564 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1932 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 ____sys_sendmsg+0x712/0x8c0 net/socket.c:2476 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2530 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2559 do_syscall_x64 arch/x86/entry/common.c:50 [inline] Fixes: 3a415d59c1db ("net/sched: sch_taprio: fix possible use-after-free") Link: https://lore.kernel.org/netdev/167387581653.2747.13878941339893288655.git-patchwork-notify@kernel.org/T/ Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Vinicius Costa Gomes Link: https://lore.kernel.org/r/20230123084552.574396-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/sched/sch_taprio.c | 1 - 1 file changed, 1 deletion(-) commit 246dc53fb2461dbcd66d4d1d914246a581edad29 Merge: b2f317173ed5 6618d69aa129 Author: Linus Torvalds Date: Tue Jan 24 17:54:25 2023 -0800 Merge tag 'rust-fixes-6.2' of https://github.com/Rust-for-Linux/linux Pull rust fix from Miguel Ojeda: - Avoid evaluating arguments in 'pr_*' macros in 'unsafe' blocks * tag 'rust-fixes-6.2' of https://github.com/Rust-for-Linux/linux: rust: print: avoid evaluating arguments in `pr_*` macros in `unsafe` blocks commit b2f317173ed5f00a00aedba71cc67454d9cde90f Merge: 02db81a787e3 c2c46b10d526 Author: Linus Torvalds Date: Tue Jan 24 17:48:09 2023 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM64: - Pass the correct address to mte_clear_page_tags() on initialising a tagged page - Plug a race against a GICv4.1 doorbell interrupt while saving the vgic-v3 pending state. x86: - A command line parsing fix and a clang compilation fix for selftests - A fix for a longstanding VMX issue, that surprisingly was only found now to affect real world guests" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: selftests: Make reclaim_period_ms input always be positive KVM: x86/vmx: Do not skip segment attributes if unusable bit is set selftests: kvm: move declaration at the beginning of main() KVM: arm64: GICv4.1: Fix race with doorbell on VPE activation/deactivation KVM: arm64: Pass the actual page address to mte_clear_page_tags() commit 02db81a787e304e5afaa31dc66522d39d3f89f1a Merge: fb6e71db53f3 0bfe63d07578 Author: Linus Torvalds Date: Tue Jan 24 17:42: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: "Six fixes, all in drivers. The biggest are the UFS devfreq fixes which address a lock inversion and the two iscsi_tcp fixes which try to prevent a use after free from userspace still accessing an area which the kernel has released (seen by KASAN)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: device_handler: alua: Remove a might_sleep() annotation scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress scsi: iscsi_tcp: Fix UAF during logout when accessing the shost ipaddress scsi: ufs: core: Fix devfreq deadlocks scsi: hpsa: Fix allocation size for scsi_host_alloc() scsi: target: core: Fix warning on RT kernels commit ca0f2cfc495d9b614ac6431d7029f1f140403155 Author: Randy Dunlap Date: Tue Jan 24 10:16:55 2023 -0800 lib: Kconfig: fix spellos Fix spelling in lib/ Kconfig files. (reported by codespell) Link: https://lkml.kernel.org/r/20230124181655.16269-1-rdunlap@infradead.org Cc: Andrew Morton Cc: Marco Elver Cc: Dmitry Vyukov Cc: kasan-dev@googlegroups.com Reviewed-by: Marco Elver Signed-off-by: Randy Dunlap Signed-off-by: Steven Rostedt (Google) lib/Kconfig.debug | 2 +- lib/Kconfig.kcsan | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8b152e9150d07a885f95e1fd401fc81af202d9a4 Author: Natalia Petrova Date: Wed Jan 11 15:04:09 2023 +0300 trace_events_hist: add check for return value of 'create_hist_field' Function 'create_hist_field' is called recursively at trace_events_hist.c:1954 and can return NULL-value that's why we have to check it to avoid null pointer dereference. Found by Linux Verification Center (linuxtesting.org) with SVACE. Link: https://lkml.kernel.org/r/20230111120409.4111-1-n.petrova@fintech.ru Cc: stable@vger.kernel.org Fixes: 30350d65ac56 ("tracing: Add variable support to hist triggers") Signed-off-by: Natalia Petrova Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_hist.c | 2 ++ 1 file changed, 2 insertions(+) commit 685b64e4d6da4be8b4595654a57db663b3d1dfc2 Author: Chuang Wang Date: Tue Dec 27 10:30:36 2022 +0800 tracing/osnoise: Use built-in RCU list checking list_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled. Execute as follow: [tracing]# echo osnoise > current_tracer [tracing]# echo 1 > tracing_on [tracing]# echo 0 > tracing_on The trace_types_lock is held when osnoise_tracer_stop() or timerlat_tracer_stop() are called in the non-RCU read side section. So, pass lockdep_is_held(&trace_types_lock) to silence false lockdep warning. Link: https://lkml.kernel.org/r/20221227023036.784337-1-nashuiliang@gmail.com Cc: Masami Hiramatsu Fixes: dae181349f1e ("tracing/osnoise: Support a list of trace_array *tr") Acked-by: Daniel Bristot de Oliveira Signed-off-by: Chuang Wang Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_osnoise.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d9b6c322fd33d55a254756b0269d644851899e5f Author: Eddie James Date: Wed Jan 18 15:47:36 2023 +1030 ARM: dts: aspeed: Fix pca9849 compatible Missed a digit in the PCA9849 compatible string. Signed-off-by: Eddie James Fixes: 65b697e5dec7 ("ARM: dts: aspeed: Add IBM Bonnell system BMC devicetree") Link: https://lore.kernel.org/r/20220826194457.164492-1-eajames@linux.ibm.com Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20230118051736.246714-1-joel@jms.id.au Signed-off-by: Arnd Bergmann arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb6e71db53f3d4351dada7c130fb652eecf994d6 Merge: 50306df38ac4 4bdbba54e9b1 Author: Linus Torvalds Date: Tue Jan 24 12:58:47 2023 -0800 Merge tag 'nfsd-6.2-5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fix from Chuck Lever: - Nail another UAF in NFSD's filecache * tag 'nfsd-6.2-5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: nfsd: don't free files unconditionally in __nfsd_file_cache_purge commit 50306df38ac4edbeb1eac29d68128f84630405d8 Merge: 5149394c8998 31e1be62abde Author: Linus Torvalds Date: Tue Jan 24 12:53:26 2023 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux Pull fscrypt MAINTAINERS entry update from Eric Biggers: "Update the MAINTAINERS file entry for fscrypt" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux: MAINTAINERS: update fscrypt git repo commit 0254127ab977e70798707a7a2b757c9f3c971210 Author: Petr Pavlu Date: Mon Dec 5 11:35:57 2022 +0100 module: Don't wait for GOING modules During a system boot, it can happen that the kernel receives a burst of requests to insert the same module but loading it eventually fails during its init call. For instance, udev can make a request to insert a frequency module for each individual CPU when another frequency module is already loaded which causes the init function of the new module to return an error. Since commit 6e6de3dee51a ("kernel/module.c: Only return -EEXIST for modules that have finished loading"), the kernel waits for modules in MODULE_STATE_GOING state to finish unloading before making another attempt to load the same module. This creates unnecessary work in the described scenario and delays the boot. In the worst case, it can prevent udev from loading drivers for other devices and might cause timeouts of services waiting on them and subsequently a failed boot. This patch attempts a different solution for the problem 6e6de3dee51a was trying to solve. Rather than waiting for the unloading to complete, it returns a different error code (-EBUSY) for modules in the GOING state. This should avoid the error situation that was described in 6e6de3dee51a (user space attempting to load a dependent module because the -EEXIST error code would suggest to user space that the first module had been loaded successfully), while avoiding the delay situation too. This has been tested on linux-next since December 2022 and passes all kmod selftests except test 0009 with module compression enabled but it has been confirmed that this issue has existed and has gone unnoticed since prior to this commit and can also be reproduced without module compression with a simple usleep(5000000) on tools/modprobe.c [0]. These failures are caused by hitting the kernel mod_concurrent_max and can happen either due to a self inflicted kernel module auto-loead DoS somehow or on a system with large CPU count and each CPU count incorrectly triggering many module auto-loads. Both of those issues need to be fixed in-kernel. [0] https://lore.kernel.org/all/Y9A4fiobL6IHp%2F%2FP@bombadil.infradead.org/ Fixes: 6e6de3dee51a ("kernel/module.c: Only return -EEXIST for modules that have finished loading") Co-developed-by: Martin Wilck Signed-off-by: Martin Wilck Signed-off-by: Petr Pavlu Cc: stable@vger.kernel.org Reviewed-by: Petr Mladek [mcgrof: enhance commit log with testing and kmod test result interpretation ] Signed-off-by: Luis Chamberlain kernel/module/main.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 5149394c899808667e0f8444d3d39cba1dfb42f7 Merge: 854f0912f813 ef7592e466ef Author: Linus Torvalds Date: Tue Jan 24 12:51:49 2023 -0800 Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux Pull fsverity MAINTAINERS entry update from Eric Biggers: "Update the MAINTAINERS file entry for fsverity" * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux: MAINTAINERS: update fsverity git repo, list, and patchwork commit 854f0912f813c3b7a4d35517658ca7f1511a69e2 Author: Linus Torvalds Date: Tue Jan 24 09:23:56 2023 -0800 ext4: make xattr char unsignedness in hash explicit Commit f3bbac32475b ("ext4: deal with legacy signed xattr name hash values") added a hashing function for the legacy case of having the xattr hash calculated using a signed 'char' type. It left the unsigned case alone, since it's all implicitly handled by the '-funsigned-char' compiler option. However, there's been some noise about back-porting it all into stable kernels that lack the '-funsigned-char', so let's just make that at least possible by making the whole 'this uses unsigned char' very explicit in the code itself. Whether such a back-port is really warranted or not, I'll leave to others, but at least together with this change it is technically sensible. Also, add a 'pr_warn_once()' for reporting the "hey, signedness for this hash calculation has changed" issue. Hopefully it never triggers except for that xfstests generic/454 test-case, but even if it does it's just good information to have. If for no other reason than "we can remove the legacy signed hash code entirely if nobody ever sees the message any more". Cc: Sasha Levin Cc: Eric Biggers Cc: Andreas Dilger Cc: Theodore Ts'o , Cc: Jason Donenfeld Cc: Masahiro Yamada Signed-off-by: Linus Torvalds fs/ext4/xattr.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6757a7abe47bcb12cb2d45661067e182424b0ee3 Author: Srinivas Pandruvada Date: Mon Jan 23 09:21:10 2023 -0800 thermal: intel: int340x: Protect trip temperature from concurrent updates Trip temperatures are read using ACPI methods and stored in the memory during zone initializtion and when the firmware sends a notification for change. This trip temperature is returned when the thermal core calls via callback get_trip_temp(). But it is possible that while updating the memory copy of the trips when the firmware sends a notification for change, thermal core is reading the trip temperature via the callback get_trip_temp(). This may return invalid trip temperature. To address this add a mutex to protect the invalid temperature reads in the callback get_trip_temp() and int340x_thermal_read_trips(). Fixes: 5fbf7f27fa3d ("Thermal/int340x: Add common thermal zone handler") Signed-off-by: Srinivas Pandruvada Cc: 5.0+ # 5.0+ Signed-off-by: Rafael J. Wysocki .../intel/int340x_thermal/int340x_thermal_zone.c | 18 +++++++++++++++--- .../intel/int340x_thermal/int340x_thermal_zone.h | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) commit 5a5754a4997c372292e57ed631807131c63cebaf Author: Keith Busch Date: Tue Jan 24 09:17:38 2023 -0800 nvme-pci: flush initial scan_work for async probe The nvme device may have a namespace with the root partition, so make sure we've completed scanning before returning from the async probe. Fixes: eac3ef262941 ("nvme-pci: split the initial probe from the rest path") Reported-by: Klaus Jensen Signed-off-by: Keith Busch Tested-by: Ville Syrjälä Tested-by: Klaus Jensen Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 1 + 1 file changed, 1 insertion(+) commit ac28d0a0f40782d216f6aaaf22e0d8bded06a435 Author: Randy Dunlap Date: Tue Jan 24 10:16:47 2023 -0800 tracing: Kconfig: Fix spelling/grammar/punctuation Fix some editorial nits in trace Kconfig. Link: https://lkml.kernel.org/r/20230124181647.15902-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Steven Rostedt (Google) kernel/trace/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7ae4ba7195b1bac04a4210a499da9d8c63b0ba9c Author: Steven Rostedt (Google) Date: Mon Jan 23 11:22:52 2023 -0500 ftrace/scripts: Update the instructions for ftrace-bisect.sh The instructions for the ftrace-bisect.sh script, which is used to find what function is being traced that is causing a kernel crash, and possibly a triple fault reboot, uses the old method. In 5.1, a new feature was added that let the user write in the index into available_filter_functions that maps to the function a user wants to set in set_ftrace_filter (or set_ftrace_notrace). This takes O(1) to set, as suppose to writing a function name, which takes O(n) (where n is the number of functions in available_filter_functions). The ftrace-bisect.sh requires setting half of the functions in available_filter_functions, which is O(n^2) using the name method to enable and can take several minutes to complete. The number method is O(n) which takes less than a second to complete. Using the number method for any kernel 5.1 and after is the proper way to do the bisect. Update the usage to reflect the new change, as well as using the /sys/kernel/tracing path instead of the obsolete debugfs path. Link: https://lkml.kernel.org/r/20230123112252.022003dd@gandalf.local.home Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Acked-by: Mark Rutland Fixes: f79b3f338564e ("ftrace: Allow enabling of filters via index of available_filter_functions") Signed-off-by: Steven Rostedt (Google) scripts/tracing/ftrace-bisect.sh | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit 921deb9da15851425ccbb6ee409dc2fd8fbdfe6b Author: Udipto Goswami Date: Tue Jan 24 14:41:49 2023 +0530 usb: gadget: f_fs: Fix unbalanced spinlock in __ffs_ep0_queue_wait __ffs_ep0_queue_wait executes holding the spinlock of &ffs->ev.waitq.lock and unlocks it after the assignments to usb_request are done. However in the code if the request is already NULL we bail out returning -EINVAL but never unlocked the spinlock. Fix this by adding spin_unlock_irq &ffs->ev.waitq.lock before returning. Fixes: 6a19da111057 ("usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait") Reviewed-by: John Keeping Signed-off-by: Udipto Goswami Link: https://lore.kernel.org/r/20230124091149.18647-1-quic_ugoswami@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_fs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit eb320f76e31dc835b9f57f04af1a2353b13bb7d8 Author: Neil Armstrong Date: Tue Jan 24 09:31:21 2023 +0100 usb: dwc3: qcom: enable vbus override when in OTG dr-mode With vbus override enabled when in OTG dr_mode, Host<->Peripheral switch now works on SM8550, otherwise the DWC3 seems to be stuck in Host mode only. Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Reviewed-by: Bryan O'Donoghue Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20230123-topic-sm8550-upstream-dwc3-qcom-otg-v2-1-2d400e598463@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa003a3c11efff1c42a0edbe8eee86fb1ebe6d7a Author: Daniel Scally Date: Tue Jan 24 15:39:09 2023 +0000 MAINTAINERS: Add myself as UVC Gadget Maintainer Add myself as a second maintainer for the UVC Gadget. Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230124153909.867202-1-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit d968117a7e8e5572762eacbdbca13bc96710e9a3 Author: Paolo Abeni Date: Tue Jan 24 17:44:14 2023 +0100 Revert "Merge branch 'ethtool-mac-merge'" This reverts commit 0ad999c1eec879f06cc52ef7df4d0dbee4a2d7eb, reversing changes made to e38553bdc377e3e7a6caa9dd9770d8b644d8dac3. It was not intended for net. Signed-off-by: Paolo Abeni net/ethtool/netlink.h | 26 -------------------------- 1 file changed, 26 deletions(-) commit 3bb06eb6e9acf7c4a3e1b5bc87aed398ff8e2253 Author: Steven Rostedt (Google) Date: Wed Jan 4 16:14:12 2023 -0500 tracing: Make sure trace_printk() can output as soon as it can be used Currently trace_printk() can be used as soon as early_trace_init() is called from start_kernel(). But if a crash happens, and "ftrace_dump_on_oops" is set on the kernel command line, all you get will be: [ 0.456075] -0 0dN.2. 347519us : Unknown type 6 [ 0.456075] -0 0dN.2. 353141us : Unknown type 6 [ 0.456075] -0 0dN.2. 358684us : Unknown type 6 This is because the trace_printk() event (type 6) hasn't been registered yet. That gets done via an early_initcall(), which may be early, but not early enough. Instead of registering the trace_printk() event (and other ftrace events, which are not trace events) via an early_initcall(), have them registered at the same time that trace_printk() can be used. This way, if there is a crash before early_initcall(), then the trace_printk()s will actually be useful. Link: https://lkml.kernel.org/r/20230104161412.019f6c55@gandalf.local.home Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Fixes: e725c731e3bb1 ("tracing: Split tracing initialization into two for early initialization") Reported-by: "Joel Fernandes (Google)" Tested-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/trace.c | 2 ++ kernel/trace/trace.h | 1 + kernel/trace/trace_output.c | 3 +-- 3 files changed, 4 insertions(+), 2 deletions(-) commit 8be9fbd5345da52f4a74f7f81d55ff9fa0a2958e Author: Mark Rutland Date: Tue Jan 3 12:49:11 2023 +0000 ftrace: Export ftrace_free_filter() to modules Setting filters on an ftrace ops results in some memory being allocated for the filter hashes, which must be freed before the ops can be freed. This can be done by removing every individual element of the hash by calling ftrace_set_filter_ip() or ftrace_set_filter_ips() with `remove` set, but this is somewhat error prone as it's easy to forget to remove an element. Make it easier to clean this up by exporting ftrace_free_filter(), which can be used to clean up all of the filter hashes after an ftrace_ops has been unregistered. Using this, fix the ftrace-direct* samples to free hashes prior to being unloaded. All other code either removes individual filters explicitly or is built-in and already calls ftrace_free_filter(). Link: https://lkml.kernel.org/r/20230103124912.2948963-3-mark.rutland@arm.com Cc: stable@vger.kernel.org Cc: Florent Revest Cc: Masami Hiramatsu Fixes: e1067a07cfbc ("ftrace/samples: Add module to test multi direct modify interface") Fixes: 5fae941b9a6f ("ftrace/samples: Add multi direct interface test module") Reviewed-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Signed-off-by: Mark Rutland Signed-off-by: Steven Rostedt (Google) kernel/trace/ftrace.c | 23 ++++++++++++++++++++++- samples/ftrace/ftrace-direct-multi-modify.c | 1 + samples/ftrace/ftrace-direct-multi.c | 1 + 3 files changed, 24 insertions(+), 1 deletion(-) commit 89c08aef8f8dcb5fc98ad8db7ca92c9dab1f26b0 Author: Hans Verkuil Date: Mon Jan 23 09:45:49 2023 +0100 media: videobuf2: set q->streaming later Commit a10b21532574 ("media: vb2: add (un)prepare_streaming queue ops") moved up the q->streaming = 1 assignment to before the call to vb2_start_streaming(). This does make sense since q->streaming indicates that VIDIOC_STREAMON is called, and the call to start_streaming happens either at that time or later if q->min_buffers_needed > 0. So q->streaming should be 1 before start_streaming is called. However, it turned out that some drivers use vb2_is_streaming() in buf_queue, and if q->min_buffers_needed == 0, then that will now return true instead of false. So for the time being revert to the original behavior. Signed-off-by: Hans Verkuil Fixes: a10b21532574 ("media: vb2: add (un)prepare_streaming queue ops") Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/videobuf2-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit facd61053cff100973921d4d45d47cf53c747ec6 Author: Christian Brauner Date: Fri Jan 20 12:55:04 2023 +0100 fuse: fixes after adapting to new posix acl api This cycle we ported all filesystems to the new posix acl api. While looking at further simplifications in this area to remove the last remnants of the generic dummy posix acl handlers we realized that we regressed fuse daemons that don't set FUSE_POSIX_ACL but still make use of posix acls. With the change to a dedicated posix acl api interacting with posix acls doesn't go through the old xattr codepaths anymore and instead only relies the get acl and set acl inode operations. Before this change fuse daemons that don't set FUSE_POSIX_ACL were able to get and set posix acl albeit with two caveats. First, that posix acls aren't cached. And second, that they aren't used for permission checking in the vfs. We regressed that use-case as we currently refuse to retrieve any posix acls if they aren't enabled via FUSE_POSIX_ACL. So older fuse daemons would see a change in behavior. We can restore the old behavior in multiple ways. We could change the new posix acl api and look for a dedicated xattr handler and if we find one prefer that over the dedicated posix acl api. That would break the consistency of the new posix acl api so we would very much prefer not to do that. We could introduce a new ACL_*_CACHE sentinel that would instruct the vfs permission checking codepath to not call into the filesystem and ignore acls. But a more straightforward fix for v6.2 is to do the same thing that Overlayfs does and give fuse a separate get acl method for permission checking. Overlayfs uses this to express different needs for vfs permission lookup and acl based retrieval via the regular system call path as well. Let fuse do the same for now. This way fuse can continue to refuse to retrieve posix acls for daemons that don't set FUSE_POSXI_ACL for permission checking while allowing a fuse server to retrieve it via the usual system calls. In the future, we could extend the get acl inode operation to not just pass a simple boolean to indicate rcu lookup but instead make it a flag argument. Then in addition to passing the information that this is an rcu lookup to the filesystem we could also introduce a flag that tells the filesystem that this is a request from the vfs to use these acls for permission checking. Then fuse could refuse the get acl request for permission checking when the daemon doesn't have FUSE_POSIX_ACL set in the same get acl method. This would also help Overlayfs and allow us to remove the second method for it as well. But since that change is more invasive as we need to update the get acl inode operation for multiple filesystems we should not do this as a fix for v6.2. Instead we will do this for the v6.3 merge window. Fwiw, since posix acls are now always correctly translated in the new posix acl api we could also allow them to be used for daemons without FUSE_POSIX_ACL that are not mounted on the host. But this is behavioral change and again if dones should be done for v6.3. For now, let's just restore the original behavior. A nice side-effect of this change is that for fuse daemons with and without FUSE_POSIX_ACL the same code is used for posix acls in a backwards compatible way. This also means we can remove the legacy xattr handlers completely. We've also added comments to explain the expected behavior for daemons without FUSE_POSIX_ACL into the code. Fixes: 318e66856dde ("xattr: use posix acl api") Signed-off-by: Seth Forshee (Digital Ocean) Reviewed-by: Miklos Szeredi Signed-off-by: Christian Brauner (Microsoft) fs/fuse/acl.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++------ fs/fuse/dir.c | 6 +++-- fs/fuse/fuse_i.h | 6 ++--- fs/fuse/inode.c | 21 +++++++++-------- fs/fuse/xattr.c | 51 ------------------------------------------ 5 files changed, 78 insertions(+), 74 deletions(-) commit b0935f110cff5d70da05c5cb1670bee0b07b631c Author: Hans de Goede Date: Tue Jan 24 11:57:54 2023 +0100 ACPI: video: Fix apple gmux detection Some apple laptop models have an ACPI device with a HID of APP000B and that device has an IO resource (so it does not describe the new unsupported MMIO based gmux type), but there actually is no gmux in the laptop at all. The gmux_probe() function of the actual apple-gmux driver has code to detect this, this code has been factored out into a new apple_gmux_detect() helper in apple-gmux.h. Use this new function to fix acpi_video_get_backlight_type() wrongly returning apple_gmux as type on the following laptops: MacBookPro5,4 https://pastebin.com/8Xjq7RhS MacBookPro8,1 https://linux-hardware.org/?probe=e513cfbadb&log=dmesg MacBookPro9,2 https://bugzilla.kernel.org/attachment.cgi?id=278961 MacBookPro10,2 https://lkml.org/lkml/2014/9/22/657 MacBookPro11,2 https://forums.fedora-fr.org/viewtopic.php?id=70142 MacBookPro11,4 https://raw.githubusercontent.com/im-0/investigate-card-reader-suspend-problem-on-mbp11.4/mast Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection") Link: https://lore.kernel.org/platform-driver-x86/20230123113750.462144-1-hdegoede@redhat.com/ Reported-by: Emmanouil Kouroupakis Acked-by: Rafael J. Wysocki Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230124105754.62167-4-hdegoede@redhat.com drivers/acpi/video_detect.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit d143908f80f3e5d164ac3342f73d6b9f536e8b4d Author: Hans de Goede Date: Tue Jan 24 11:57:53 2023 +0100 platform/x86: apple-gmux: Add apple_gmux_detect() helper Add a new (static inline) apple_gmux_detect() helper to apple-gmux.h which can be used for gmux detection instead of apple_gmux_present(). The latter is not really reliable since an ACPI device with a HID of APP000B is present on some devices without a gmux at all, as well as on devices with a newer (unsupported) MMIO based gmux model. This causes apple_gmux_present() to return false-positives on a number of different Apple laptop models. This new helper uses the same probing as the actual apple-gmux driver, so that it does not return false positives. To avoid code duplication the gmux_probe() function of the actual driver is also moved over to using the new apple_gmux_detect() helper. This avoids false positives (vs _HID + IO region detection) on: MacBookPro5,4 https://pastebin.com/8Xjq7RhS MacBookPro8,1 https://linux-hardware.org/?probe=e513cfbadb&log=dmesg MacBookPro9,2 https://bugzilla.kernel.org/attachment.cgi?id=278961 MacBookPro10,2 https://lkml.org/lkml/2014/9/22/657 MacBookPro11,2 https://forums.fedora-fr.org/viewtopic.php?id=70142 MacBookPro11,4 https://raw.githubusercontent.com/im-0/investigate-card-reader-suspend-problem-on-mbp11.4/master/test-16/dmesg Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection") Link: https://lore.kernel.org/platform-driver-x86/20230123113750.462144-1-hdegoede@redhat.com/ Reported-by: Emmanouil Kouroupakis Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230124105754.62167-3-hdegoede@redhat.com drivers/platform/x86/apple-gmux.c | 70 ++++++++----------------------- include/linux/apple-gmux.h | 86 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 102 insertions(+), 54 deletions(-) commit 39f5a81f7ad80eb3fbcbfd817c6552db9de5504d Author: Hans de Goede Date: Tue Jan 24 11:57:52 2023 +0100 platform/x86: apple-gmux: Move port defines to apple-gmux.h This is a preparation patch for adding a new static inline apple_gmux_detect() helper which actually checks a supported gmux is present, rather then only checking an ACPI device with the HID is there as apple_gmux_present() does. Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection") Link: https://lore.kernel.org/platform-driver-x86/20230123113750.462144-1-hdegoede@redhat.com/ Reported-by: Emmanouil Kouroupakis Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230124105754.62167-2-hdegoede@redhat.com drivers/platform/x86/apple-gmux.c | 23 ----------------------- include/linux/apple-gmux.h | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 23 deletions(-) commit ce95010ef62d4bf470928969bafc9070ae98cbb1 Author: Hans de Goede Date: Mon Jan 23 14:28:24 2023 +0100 platform/x86: hp-wmi: Fix cast to smaller integer type warning Fix the following compiler warning: drivers/platform/x86/hp/hp-wmi.c:551:24: warning: cast to smaller integer type 'enum hp_wmi_radio' from 'void *' [-Wvoid-pointer-to-enum-cast] Reported-by: kernel test robot Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230123132824.660062-1-hdegoede@redhat.com drivers/platform/x86/hp/hp-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 062c1394cbda95b0c51839b5221c7267e1e7f57e Author: Mario Limonciello Date: Fri Jan 20 13:15:19 2023 -0600 platform/x86/amd: pmc: Add a module parameter to disable workarounds Some users may want to live with the bugs that exist in platform firmware and have workarounds in AMD PMC driver. To allow them to bypass these workarounds, introduce a module parameter. Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20230120191519.15926-2-mario.limonciello@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 8e60615e8932167057b363c11a7835da7f007106 Author: Mario Limonciello Date: Fri Jan 20 13:15:18 2023 -0600 platform/x86/amd: pmc: Disable IRQ1 wakeup for RN/CZN By default when the system is configured for low power idle in the FADT the keyboard is set up as a wake source. This matches the behavior that Windows uses for Modern Standby as well. It has been reported that a variety of AMD based designs there are spurious wakeups are happening where two IRQ sources are active. For example: ``` PM: Triggering wakeup from IRQ 9 PM: Triggering wakeup from IRQ 1 ``` In these designs IRQ 9 is the ACPI SCI and IRQ 1 is the keyboard. One way to trigger this problem is to suspend the laptop and then unplug the AC adapter. The SOC will be in a hardware sleep state and plugging in the AC adapter returns control to the kernel's s2idle loop. Normally if just IRQ 9 was active the s2idle loop would advance any EC transactions and no other IRQ being active would cause the s2idle loop to put the SOC back into hardware sleep state. When this bug occurred IRQ 1 is also active even if no keyboard activity occurred. This causes the s2idle loop to break and the system to wake. This is a platform firmware bug triggering IRQ1 without keyboard activity. This occurs in Windows as well, but Windows will enter "SW DRIPS" and then with no activity enters back into "HW DRIPS" (hardware sleep state). This issue affects Renoir, Lucienne, Cezanne, and Barcelo platforms. It does not happen on newer systems such as Mendocino or Rembrandt. It's been fixed in newer platform firmware. To avoid triggering the bug on older systems check the SMU F/W version and adjust the policy at suspend time for s2idle wakeup from keyboard on these systems. A lot of thought and experimentation has been given around the timing of disabling IRQ1, and to make it work the "suspend" PM callback is restored. Reported-by: Kai-Heng Feng Reported-by: Xaver Hugl Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2115 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1951 Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20230120191519.15926-1-mario.limonciello@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmc.c | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit fdcc0602d64f22185f61c70747214b630049cc33 Author: Hans de Goede Date: Fri Jan 20 15:34:41 2023 +0100 platform/x86: asus-wmi: Fix kbd_dock_devid tablet-switch reporting Commit 1ea0d3b46798 ("platform/x86: asus-wmi: Simplify tablet-mode-switch handling") unified the asus-wmi tablet-switch handling, but it did not take into account that the value returned for the kbd_dock_devid WMI method is inverted where as the other ones are not inverted. This causes asus-wmi to report an inverted tablet-switch state for devices which use the kbd_dock_devid, which causes libinput to ignore touchpad events while the affected T10x model 2-in-1s are docked. Add inverting of the return value in the kbd_dock_devid case to fix this. Fixes: 1ea0d3b46798 ("platform/x86: asus-wmi: Simplify tablet-mode-switch handling") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230120143441.527334-1-hdegoede@redhat.com drivers/platform/x86/asus-wmi.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit a410429a3b7e748a9db9f357e71e2e085a21c902 Author: Kevin Kuriakose Date: Thu Jan 19 20:39:25 2023 +0530 platform/x86: gigabyte-wmi: add support for B450M DS3H WIFI-CF To the best of my knowledge this is the same board as the B450M DS3H-CF, but with an added WiFi card. Name obtained using dmidecode, tested with force_load on v6.1.6 Signed-off-by: Kevin Kuriakose Acked-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230119150925.31962-1-kevinmkuriakose@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/gigabyte-wmi.c | 1 + 1 file changed, 1 insertion(+) commit 3ee5447b2048c8389ed899838a40b40180d50906 Author: Rishit Bansal Date: Sat Jan 21 03:42:14 2023 +0530 platform/x86: hp-wmi: Handle Omen Key event Add support to map the "HP Omen Key" to KEY_PROG2. Laptops in the HP Omen Series open the HP Omen Command Center application on windows. But, on linux it fails with the following message from the hp-wmi driver: [ 5143.415714] hp_wmi: Unknown event_id - 29 - 0x21a5 Also adds support to map Fn+Esc to KEY_FN_ESC. This currently throws the following message on the hp-wmi driver: [ 6082.143785] hp_wmi: Unknown key code - 0x21a7 There is also a "Win-Lock" key on HP Omen Laptops which supports Enabling and Disabling the Windows key, which trigger commands 0x21a4 and 0x121a4 respectively, but I wasn't able to find any KEY in input.h to map this to. Signed-off-by: Rishit Bansal Link: https://lore.kernel.org/r/20230120221214.24426-1-rishitbansal0@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/hp/hp-wmi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 83bcf3e52e9cfc727df33f1055ef0618c91719d0 Author: Koba Ko Date: Tue Jan 17 20:34:36 2023 +0800 platform/x86: dell-wmi: Add a keymap for KEY_MUTE in type 0x0010 table Some platforms send the speaker-mute key from EC. dell-wmi can't recognize it. Add a new keymap for KEY_MUTE in type 0x0010 table. Signed-off-by: Koba Ko Link: https://lore.kernel.org/r/20230117123436.200440-1-koba.ko@canonical.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/dell/dell-wmi-base.c | 3 +++ 1 file changed, 3 insertions(+) commit 409db27e3a2eb5e8ef7226ca33be33361b3ed1c9 Author: Kuniyuki Iwashima Date: Fri Jan 20 15:19:27 2023 -0800 netrom: Fix use-after-free of a listening socket. syzbot reported a use-after-free in do_accept(), precisely nr_accept() as sk_prot_alloc() allocated the memory and sock_put() frees it. [0] The issue could happen if the heartbeat timer is fired and nr_heartbeat_expiry() calls nr_destroy_socket(), where a socket has SOCK_DESTROY or a listening socket has SOCK_DEAD. In this case, the first condition cannot be true. SOCK_DESTROY is flagged in nr_release() only when the file descriptor is close()d, but accept() is being called for the listening socket, so the second condition must be true. Usually, the AF_NETROM listener neither starts timers nor sets SOCK_DEAD. However, the condition is met if connect() fails before listen(). connect() starts the t1 timer and heartbeat timer, and t1timer calls nr_disconnect() when timeout happens. Then, SOCK_DEAD is set, and if we call listen(), the heartbeat timer calls nr_destroy_socket(). nr_connect nr_establish_data_link(sk) nr_start_t1timer(sk) nr_start_heartbeat(sk) nr_t1timer_expiry nr_disconnect(sk, ETIMEDOUT) nr_sk(sk)->state = NR_STATE_0 sk->sk_state = TCP_CLOSE sock_set_flag(sk, SOCK_DEAD) nr_listen if (sk->sk_state != TCP_LISTEN) sk->sk_state = TCP_LISTEN nr_heartbeat_expiry switch (nr->state) case NR_STATE_0 if (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD)) nr_destroy_socket(sk) This path seems expected, and nr_destroy_socket() is called to clean up resources. Initially, there was sock_hold() before nr_destroy_socket() so that the socket would not be freed, but the commit 517a16b1a88b ("netrom: Decrease sock refcount when sock timers expire") accidentally removed it. To fix use-after-free, let's add sock_hold(). [0]: BUG: KASAN: use-after-free in do_accept+0x483/0x510 net/socket.c:1848 Read of size 8 at addr ffff88807978d398 by task syz-executor.3/5315 CPU: 0 PID: 5315 Comm: syz-executor.3 Not tainted 6.2.0-rc3-syzkaller-00165-gd9fc1511728c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x461 mm/kasan/report.c:417 kasan_report+0xbf/0x1f0 mm/kasan/report.c:517 do_accept+0x483/0x510 net/socket.c:1848 __sys_accept4_file net/socket.c:1897 [inline] __sys_accept4+0x9a/0x120 net/socket.c:1927 __do_sys_accept net/socket.c:1944 [inline] __se_sys_accept net/socket.c:1941 [inline] __x64_sys_accept+0x75/0xb0 net/socket.c:1941 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:0x7fa436a8c0c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa437784168 EFLAGS: 00000246 ORIG_RAX: 000000000000002b RAX: ffffffffffffffda RBX: 00007fa436bac050 RCX: 00007fa436a8c0c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 00007fa436ae7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffebc6700df R14: 00007fa437784300 R15: 0000000000022000 Allocated by task 5294: 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:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa3/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc+0x5a/0xd0 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] sk_prot_alloc+0x140/0x290 net/core/sock.c:2038 sk_alloc+0x3a/0x7a0 net/core/sock.c:2091 nr_create+0xb6/0x5f0 net/netrom/af_netrom.c:433 __sock_create+0x359/0x790 net/socket.c:1515 sock_create net/socket.c:1566 [inline] __sys_socket_create net/socket.c:1603 [inline] __sys_socket_create net/socket.c:1588 [inline] __sys_socket+0x133/0x250 net/socket.c:1636 __do_sys_socket net/socket.c:1649 [inline] __se_sys_socket net/socket.c:1647 [inline] __x64_sys_socket+0x73/0xb0 net/socket.c:1647 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 Freed by task 14: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:518 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x13b/0x1a0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:177 [inline] __cache_free mm/slab.c:3394 [inline] __do_kmem_cache_free mm/slab.c:3580 [inline] __kmem_cache_free+0xcd/0x3b0 mm/slab.c:3587 sk_prot_free net/core/sock.c:2074 [inline] __sk_destruct+0x5df/0x750 net/core/sock.c:2166 sk_destruct net/core/sock.c:2181 [inline] __sk_free+0x175/0x460 net/core/sock.c:2192 sk_free+0x7c/0xa0 net/core/sock.c:2203 sock_put include/net/sock.h:1991 [inline] nr_heartbeat_expiry+0x1d7/0x460 net/netrom/nr_timer.c:148 call_timer_fn+0x1da/0x7c0 kernel/time/timer.c:1700 expire_timers+0x2c6/0x5c0 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/0xadc kernel/softirq.c:571 Fixes: 517a16b1a88b ("netrom: Decrease sock refcount when sock timers expire") Reported-by: syzbot+5fafd5cfe1fc91f6b352@syzkaller.appspotmail.com Signed-off-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230120231927.51711-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni net/netrom/nr_timer.c | 1 + 1 file changed, 1 insertion(+) commit d6591da5f3ff284a376d56b5f7a48a34e9cb159d Author: Javier Martinez Canillas Date: Sat Jan 21 20:24:18 2023 +0100 drm/fb-helper: Use a per-driver FB deferred I/O handler The DRM fbdev emulation layer sets the struct fb_info .fbdefio field to a struct fb_deferred_io pointer, that is shared across all drivers that use the generic drm_fbdev_generic_setup() helper function. It is a problem because the fbdev core deferred I/O logic assumes that the struct fb_deferred_io data is not shared between devices, and it's stored there state such as the list of pages touched and a mutex that is use to synchronize between the fb_deferred_io_track_page() function that track the dirty pages and fb_deferred_io_work() workqueue handler doing the actual deferred I/O. The latter can lead to the following error, since it may happen that two drivers are probed and then one is removed, which causes the mutex bo be destroyed and not existing anymore by the time the other driver tries to grab it for the fbdev deferred I/O logic: [ 369.756553] ------------[ cut here ]------------ [ 369.756604] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 369.756631] WARNING: CPU: 2 PID: 1023 at kernel/locking/mutex.c:582 __mutex_lock+0x348/0x424 [ 369.756744] Modules linked in: nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ip v6 nf_defrag_ipv4 ip_set nf_tables nfnetlink qrtr btsdio bluetooth sunrpc brcmfmac snd_soc_hdmi_codec cpufreq_dt cfg80211 vfat fat vc4 rfkill brcmutil raspberrypi_cpufreq i2c_bcm2835 iproc_rng200 bcm2711_thermal snd_soc_core snd_pcm_dmaen gine leds_gpio nvmem_rmem joydev hid_cherry uas usb_storage gpio_raspberrypi_exp v3d snd_pcm raspberrypi_hwmon gpu_sched bcm2835_wdt broadcom bcm_phy_lib snd_timer genet snd mdio_bcm_unimac clk_bcm2711_dvp soundcore drm_display_helper pci e_brcmstb cec ip6_tables ip_tables fuse [ 369.757400] CPU: 2 PID: 1023 Comm: fbtest Not tainted 5.19.0-rc6+ #94 [ 369.757455] Hardware name: raspberrypi,4-model-b Raspberry Pi 4 Model B Rev 1.4/Raspberry Pi 4 Model B Rev 1.4, BIOS 2022.10 10/01/2022 [ 369.757538] pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 369.757596] pc : __mutex_lock+0x348/0x424 [ 369.757635] lr : __mutex_lock+0x348/0x424 [ 369.757672] sp : ffff80000953bb00 [ 369.757703] x29: ffff80000953bb00 x28: ffff17fdc087c000 x27: 0000000000000002 [ 369.757771] x26: ffff17fdc349f9b0 x25: fffffc5ff72e0100 x24: 0000000000000000 [ 369.757838] x23: 0000000000000000 x22: 0000000000000002 x21: ffffa618df636f10 [ 369.757903] x20: ffff80000953bb68 x19: ffffa618e0f18138 x18: 0000000000000001 [ 369.757968] x17: 0000000020000000 x16: 0000000000000002 x15: 0000000000000000 [ 369.758032] x14: 0000000000000000 x13: 284e4f5f4e524157 x12: 5f534b434f4c5f47 [ 369.758097] x11: 00000000ffffdfff x10: ffffa618e0c79f88 x9 : ffffa618de472484 [ 369.758162] x8 : 000000000002ffe8 x7 : c0000000ffffdfff x6 : 00000000000affa8 [ 369.758227] x5 : 0000000000001fff x4 : 0000000000000000 x3 : 0000000000000027 [ 369.758292] x2 : 0000000000000001 x1 : ffff17fdc087c000 x0 : 0000000000000028 [ 369.758357] Call trace: [ 369.758383] __mutex_lock+0x348/0x424 [ 369.758420] mutex_lock_nested+0x4c/0x5c [ 369.758459] fb_deferred_io_mkwrite+0x78/0x1d8 [ 369.758507] do_page_mkwrite+0x5c/0x19c [ 369.758550] wp_page_shared+0x70/0x1a0 [ 369.758590] do_wp_page+0x3d0/0x510 [ 369.758628] handle_pte_fault+0x1c0/0x1e0 [ 369.758670] __handle_mm_fault+0x250/0x380 [ 369.758712] handle_mm_fault+0x17c/0x3a4 [ 369.758753] do_page_fault+0x158/0x530 [ 369.758792] do_mem_abort+0x50/0xa0 [ 369.758831] el0_da+0x78/0x19c [ 369.758864] el0t_64_sync_handler+0xbc/0x150 [ 369.758904] el0t_64_sync+0x190/0x194 [ 369.758942] irq event stamp: 11395 [ 369.758973] hardirqs last enabled at (11395): [] __up_console_sem+0x74/0x80 [ 369.759042] hardirqs last disabled at (11394): [] __up_console_sem+0x6c/0x80 [ 369.760554] softirqs last enabled at (11392): [] __do_softirq+0x4c4/0x6b8 [ 369.762060] softirqs last disabled at (11383): [] __irq_exit_rcu+0x104/0x214 [ 369.763564] ---[ end trace 0000000000000000 ]--- Fixes: d536540f304c ("drm/fb-helper: Add generic fbdev emulation .fb_probe function") Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230121192418.2814955-4-javierm@redhat.com drivers/gpu/drm/drm_fbdev_generic.c | 11 +++++------ include/drm/drm_fb_helper.h | 12 ++++++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) commit cc88ad784e42398b8845594fe3aa720d0cc1c40c Author: Javier Martinez Canillas Date: Sat Jan 21 20:24:17 2023 +0100 drm/fb-helper: Check fb_deferred_io_init() return value The fb_deferred_io_init() can fail and return an errno code but currently there is no check for its return value. Fix that and propagate to errno to the caller in the case of a failure. Fixes: d536540f304c ("drm/fb-helper: Add generic fbdev emulation .fb_probe function") Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230121192418.2814955-3-javierm@redhat.com drivers/gpu/drm/drm_fbdev_generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6a28a25d358079b7d0d144689f850aecacf63cba Author: Victor Shyba Date: Mon Jan 23 19:21:29 2023 -0300 ALSA: hda/realtek: Add Acer Predator PH315-54 Same issue as SP513-54N: Headset microphone does not work without ALC255_FIXUP_ACER_MIC_NO_PRESENCE fixup. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211853 Cc: Signed-off-by: Victor Shyba Link: https://lore.kernel.org/r/20230123222129.17589-1-victor1984@riseup.net Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit a44b7651489f26271ac784b70895e8a85d0cebf4 Author: Sriram Yagnaraman Date: Tue Jan 24 02:47:21 2023 +0100 netfilter: conntrack: unify established states for SCTP paths An SCTP endpoint can start an association through a path and tear it down over another one. That means the initial path will not see the shutdown sequence, and the conntrack entry will remain in ESTABLISHED state for 5 days. By merging the HEARTBEAT_ACKED and ESTABLISHED states into one ESTABLISHED state, there remains no difference between a primary or secondary path. The timeout for the merged ESTABLISHED state is set to 210 seconds (hb_interval * max_path_retrans + rto_max). So, even if a path doesn't see the shutdown sequence, it will expire in a reasonable amount of time. With this change in place, there is now more than one state from which we can transition to ESTABLISHED, COOKIE_ECHOED and HEARTBEAT_SENT, so handle the setting of ASSURED bit whenever a state change has happened and the new state is ESTABLISHED. Removed the check for dir==REPLY since the transition to ESTABLISHED can happen only in the reply direction. Fixes: 9fb9cbb1082d ("[NETFILTER]: Add nf_conntrack subsystem.") Signed-off-by: Sriram Yagnaraman Signed-off-by: Pablo Neira Ayuso Documentation/networking/nf_conntrack-sysctl.rst | 10 +-- include/uapi/linux/netfilter/nf_conntrack_sctp.h | 2 +- include/uapi/linux/netfilter/nfnetlink_cttimeout.h | 2 +- net/netfilter/nf_conntrack_proto_sctp.c | 93 +++++++++------------- net/netfilter/nf_conntrack_standalone.c | 8 -- 5 files changed, 44 insertions(+), 71 deletions(-) commit 13bd9b31a969b03c8ec1d4eb0f2b9aebd30ebfd8 Author: Sriram Yagnaraman Date: Tue Jan 24 02:47:20 2023 +0100 Revert "netfilter: conntrack: add sctp DATA_SENT state" This reverts commit (bff3d0534804: "netfilter: conntrack: add sctp DATA_SENT state") Using DATA/SACK to detect a new connection on secondary/alternate paths works only on new connections, while a HEARTBEAT is required on connection re-use. It is probably consistent to wait for HEARTBEAT to create a secondary connection in conntrack. Signed-off-by: Sriram Yagnaraman Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_conntrack_sctp.h | 1 - include/uapi/linux/netfilter/nfnetlink_cttimeout.h | 1 - net/netfilter/nf_conntrack_proto_sctp.c | 102 +++++++++------------ net/netfilter/nf_conntrack_standalone.c | 8 -- 4 files changed, 42 insertions(+), 70 deletions(-) commit 98ee0077452527f971567db01386de3c3d97ce13 Author: Sriram Yagnaraman Date: Tue Jan 24 02:47:19 2023 +0100 netfilter: conntrack: fix bug in for_each_sctp_chunk skb_header_pointer() will return NULL if offset + sizeof(_sch) exceeds skb->len, so this offset < skb->len test is redundant. if sch->length == 0, this will end up in an infinite loop, add a check for sch->length > 0 Fixes: 9fb9cbb1082d ("[NETFILTER]: Add nf_conntrack subsystem.") Suggested-by: Florian Westphal Signed-off-by: Sriram Yagnaraman Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_sctp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a9993591fa94246b16b444eea55d84c54608282a Author: Sriram Yagnaraman Date: Tue Jan 24 02:47:18 2023 +0100 netfilter: conntrack: fix vtag checks for ABORT/SHUTDOWN_COMPLETE RFC 9260, Sec 8.5.1 states that for ABORT/SHUTDOWN_COMPLETE, the chunk MUST be accepted if the vtag of the packet matches its own tag and the T bit is not set OR if it is set to its peer's vtag and the T bit is set in chunk flags. Otherwise the packet MUST be silently dropped. Update vtag verification for ABORT/SHUTDOWN_COMPLETE based on the above description. Fixes: 9fb9cbb1082d ("[NETFILTER]: Add nf_conntrack subsystem.") Signed-off-by: Sriram Yagnaraman Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_sctp.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 208a21107ef0ae86c92078caf84ce80053e73f7a Merge: 571cca79df0a e2b53ea5a7c1 Author: Jakub Kicinski Date: Mon Jan 23 22:36:58 2023 -0800 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-01-20 (iavf) This series contains updates to iavf driver only. Michal Schmidt converts single iavf workqueue to per adapter to avoid deadlock issues. Marcin moves setting of VLAN related netdev features to watchdog task to avoid RTNL deadlock. Stefan Assmann schedules immediate watchdog task execution on changing primary MAC to avoid excessive delay. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: iavf: schedule watchdog immediately when changing primary MAC iavf: Move netdev_update_features() into watchdog task iavf: fix temporary deadlock and failure to set MAC address ==================== Link: https://lore.kernel.org/r/20230120211036.430946-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 571cca79df0a6c0ae9f14be7381e13dad4078fbf Merge: bce4affe30b2 5d235d6ce75c Author: Jakub Kicinski Date: Mon Jan 23 21:50:58 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Fix overlap detection in rbtree set backend: Detect overlap by going through the ordered list of valid tree nodes. To shorten the number of visited nodes in the list, this algorithm descends the tree to search for an existing element greater than the key value to insert that is greater than the new element. 2) Fix for the rbtree set garbage collector: Skip inactive and busy elements when checking for expired elements to avoid interference with an ongoing transaction from control plane. This is a rather large fix coming at this stage of the 6.2-rc. Since 33c7aba0b4ff ("netfilter: nf_tables: do not set up extensions for end interval"), bogus overlap errors in the rbtree set occur more frequently. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nft_set_rbtree: skip elements in transaction from garbage collection netfilter: nft_set_rbtree: Switch to node list walk for overlap detection ==================== Link: https://lore.kernel.org/r/20230123211601.292930-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit bce4affe30b297bfa3092bb53e879c0bd86901ab Author: Mat Martineau Date: Fri Jan 20 15:11:21 2023 -0800 MAINTAINERS: Update MPTCP maintainer list and CREDITS My responsibilities at Intel have changed, so I'm handing off exclusive MPTCP subsystem maintainer duties to Matthieu. It has been a privilege to see MPTCP through its initial upstreaming and first few years in the upstream kernel! Acked-by: Matthieu Baerts Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20230120231121.36121-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski CREDITS | 7 +++++++ MAINTAINERS | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) commit 8a4f6d023221c4b052ddfa1db48b27871bad6e96 Author: Alexandru Tachici Date: Fri Jan 20 11:08:46 2023 +0200 net: ethernet: adi: adin1110: Fix multicast offloading Driver marked broadcast/multicast frames as offloaded incorrectly. Mark them as offloaded only when HW offloading has been enabled. This should happen only for ADIN2111 when both ports are bridged by the software. Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support") Signed-off-by: Alexandru Tachici Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230120090846.18172-1-alexandru.tachici@analog.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/adi/adin1110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 360fdc999d92db4a4adbba0db8641396dc9f1b13 Author: Ahmad Fatoum Date: Fri Jan 20 12:09:32 2023 +0100 net: dsa: microchip: fix probe of I2C-connected KSZ8563 Starting with commit eee16b147121 ("net: dsa: microchip: perform the compatibility check for dev probed"), the KSZ switch driver now bails out if it thinks the DT compatible doesn't match the actual chip ID read back from the hardware: ksz9477-switch 1-005f: Device tree specifies chip KSZ9893 but found KSZ8563, please fix it! For the KSZ8563, which used ksz_switch_chips[KSZ9893], this was fine at first, because it indeed shares the same chip id as the KSZ9893. Commit b44908095612 ("net: dsa: microchip: add separate struct ksz_chip_data for KSZ8563 chip") started differentiating KSZ9893 compatible chips by consulting the 0x1F register. The resulting breakage was fixed for the SPI driver in the same commit by introducing the appropriate ksz_switch_chips[KSZ8563], but not for the I2C driver. Fix this for I2C-connected KSZ8563 now to get it probing again. Fixes: b44908095612 ("net: dsa: microchip: add separate struct ksz_chip_data for KSZ8563 chip"). Reviewed-by: Andrew Lunn Signed-off-by: Ahmad Fatoum Acked-by: Arun Ramadoss Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230120110933.1151054-1-a.fatoum@pengutronix.de Signed-off-by: Jakub Kicinski drivers/net/dsa/microchip/ksz9477_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e9398a26a92fc402d82ce1f97cc67d832527da0 Author: Eric Dumazet Date: Fri Jan 20 13:31:40 2023 +0000 ipv4: prevent potential spectre v1 gadget in fib_metrics_match() if (!type) continue; if (type > RTAX_MAX) return false; ... fi_val = fi->fib_metrics->metrics[type - 1]; @type being used as an array index, we need to prevent cpu speculation or risk leaking kernel memory content. Fixes: 5f9ae3d9e7e4 ("ipv4: do metrics match when looking up and deleting a route") Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20230120133140.3624204-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/fib_semantics.c | 2 ++ 1 file changed, 2 insertions(+) commit 1d1d63b612801b3f0a39b7d4467cad0abd60e5c8 Author: Eric Dumazet Date: Fri Jan 20 13:30:40 2023 +0000 ipv4: prevent potential spectre v1 gadget in ip_metrics_convert() if (!type) continue; if (type > RTAX_MAX) return -EINVAL; ... metrics[type - 1] = val; @type being used as an array index, we need to prevent cpu speculation or risk leaking kernel memory content. Fixes: 6cf9dfd3bd62 ("net: fib: move metrics parsing to a helper") Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20230120133040.3623463-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/metrics.c | 2 ++ 1 file changed, 2 insertions(+) commit d6ab640c21ed3b471e42ea783223c396e102c02d Merge: 9f535c870e49 9b663b5cbb15 Author: Jakub Kicinski Date: Mon Jan 23 21:35:55 2023 -0800 Merge branch 'netlink-annotate-various-data-races' Eric Dumazet says: ==================== netlink: annotate various data races A recent syzbot report came to my attention. After addressing it, I also fixed other related races. ==================== Link: https://lore.kernel.org/r/20230120125955.3453768-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 9b663b5cbb15b494ef132a3c937641c90646eb73 Author: Eric Dumazet Date: Fri Jan 20 12:59:55 2023 +0000 netlink: annotate data races around sk_state netlink_getsockbyportid() reads sk_state while a concurrent netlink_connect() can change its value. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/netlink/af_netlink.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 004db64d185a5f23dfb891d7701e23713b2420ee Author: Eric Dumazet Date: Fri Jan 20 12:59:54 2023 +0000 netlink: annotate data races around dst_portid and dst_group netlink_getname(), netlink_sendmsg() and netlink_getsockbyportid() can read nlk->dst_portid and nlk->dst_group while another thread is changing them. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/netlink/af_netlink.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit c1bb9484e3b05166880da8574504156ccbd0549e Author: Eric Dumazet Date: Fri Jan 20 12:59:53 2023 +0000 netlink: annotate data races around nlk->portid syzbot reminds us netlink_getname() runs locklessly [1] This first patch annotates the race against nlk->portid. Following patches take care of the remaining races. [1] BUG: KCSAN: data-race in netlink_getname / netlink_insert write to 0xffff88814176d310 of 4 bytes by task 2315 on cpu 1: netlink_insert+0xf1/0x9a0 net/netlink/af_netlink.c:583 netlink_autobind+0xae/0x180 net/netlink/af_netlink.c:856 netlink_sendmsg+0x444/0x760 net/netlink/af_netlink.c:1895 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] ____sys_sendmsg+0x38f/0x500 net/socket.c:2476 ___sys_sendmsg net/socket.c:2530 [inline] __sys_sendmsg+0x19a/0x230 net/socket.c:2559 __do_sys_sendmsg net/socket.c:2568 [inline] __se_sys_sendmsg net/socket.c:2566 [inline] __x64_sys_sendmsg+0x42/0x50 net/socket.c:2566 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff88814176d310 of 4 bytes by task 2316 on cpu 0: netlink_getname+0xcd/0x1a0 net/netlink/af_netlink.c:1144 __sys_getsockname+0x11d/0x1b0 net/socket.c:2026 __do_sys_getsockname net/socket.c:2041 [inline] __se_sys_getsockname net/socket.c:2038 [inline] __x64_sys_getsockname+0x3e/0x50 net/socket.c:2038 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x00000000 -> 0xc9a49780 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 2316 Comm: syz-executor.2 Not tainted 6.2.0-rc3-syzkaller-00030-ge8f60cd7db24-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: Jakub Kicinski net/netlink/af_netlink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 08279468a294d8c996a657ecc9e51bd5c084c75d Author: Arnd Bergmann Date: Tue Jan 17 18:24:44 2023 +0100 rtc: sunplus: fix format string for printing resource On 32-bit architectures with 64-bit resource_size_t, sp_rtc_probe() causes a compiler warning: drivers/rtc/rtc-sunplus.c: In function 'sp_rtc_probe': drivers/rtc/rtc-sunplus.c:243:33: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=] 243 | dev_dbg(&plat_dev->dev, "res = 0x%x, reg_base = 0x%lx\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The best way to print a resource is the special %pR format string, and similarly to print a pointer we can use %p and avoid the cast. Fixes: fad6cbe9b2b4 ("rtc: Add driver for RTC in Sunplus SP7021") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230117172450.2938962-1-arnd@kernel.org Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sunplus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d235d6ce75c12a7fdee375eb211e4116f7ab01b Author: Pablo Neira Ayuso Date: Sat Jan 14 23:49:46 2023 +0100 netfilter: nft_set_rbtree: skip elements in transaction from garbage collection Skip interference with an ongoing transaction, do not perform garbage collection on inactive elements. Reset annotated previous end interval if the expired element is marked as busy (control plane removed the element right before expiration). Fixes: 8d8540c4f5e0 ("netfilter: nft_set_rbtree: add timeout support") Reviewed-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_rbtree.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit c9e6978e2725a7d4b6cd23b2facd3f11422c0643 Author: Pablo Neira Ayuso Date: Sat Jan 14 23:38:32 2023 +0100 netfilter: nft_set_rbtree: Switch to node list walk for overlap detection ...instead of a tree descent, which became overly complicated in an attempt to cover cases where expired or inactive elements would affect comparisons with the new element being inserted. Further, it turned out that it's probably impossible to cover all those cases, as inactive nodes might entirely hide subtrees consisting of a complete interval plus a node that makes the current insertion not overlap. To speed up the overlap check, descent the tree to find a greater element that is closer to the key value to insert. Then walk down the node list for overlap detection. Starting the overlap check from rb_first() unconditionally is slow, it takes 10 times longer due to the full linear traversal of the list. Moreover, perform garbage collection of expired elements when walking down the node list to avoid bogus overlap reports. For the insertion operation itself, this essentially reverts back to the implementation before commit 7c84d41416d8 ("netfilter: nft_set_rbtree: Detect partial overlaps on insertion"), except that cases of complete overlap are already handled in the overlap detection phase itself, which slightly simplifies the loop to find the insertion point. Based on initial patch from Stefano Brivio, including text from the original patch description too. Fixes: 7c84d41416d8 ("netfilter: nft_set_rbtree: Detect partial overlaps on insertion") Reviewed-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_rbtree.c | 316 ++++++++++++++++++++++++----------------- 1 file changed, 189 insertions(+), 127 deletions(-) commit e6b3086fddc0065a5ffb947d4d29dd0e6efc327b Author: Hans de Goede Date: Thu Jan 19 18:24:41 2023 +0100 ACPI: video: Add backlight=native DMI quirk for Asus U46E The Asus U46E backlight tables have a set of interesting problems: 1. Its ACPI tables do make _OSI ("Windows 2012") checks, so acpi_osi_is_win8() should return true. But the tables have 2 sets of _OSI calls, one from the usual global _INI method setting a global OSYS variable and a second set of _OSI calls from a MSOS method and the MSOS method is the only one calling _OSI ("Windows 2012"). The MSOS method only gets called in the following cases: 1. From some Asus specific WMI methods 2. From _DOD, which only runs after acpi_video_get_backlight_type() has already been called by the i915 driver 3. From other ACPI video bus methods which never run (see below) 4. From some EC query callbacks So when i915 calls acpi_video_get_backlight_type() MSOS has never run and acpi_osi_is_win8() returns false, so acpi_video_get_backlight_type() returns acpi_video as the desired backlight type, which causes the intel_backlight device to not register. 2. _DOD effectively does this: Return (Package (0x01) { 0x0400 }) causing acpi_video_device_in_dod() to return false, which causes the acpi_video backlight device to not register. Leaving the user with no backlight device at all. Note that before 6.1.y the i915 driver would register the intel_backlight device unconditionally and since that then was the only backlight device userspace would use that. Add a backlight=native DMI quirk for this special laptop to restore the old (and working) behavior of the intel_backlight device registering. Fixes: fb1836c91317 ("ACPI: video: Prefer native over vendor") Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9dcb34234b8235144c96103266317da33321077e Author: Hans de Goede Date: Thu Jan 19 17:37:44 2023 +0100 ACPI: video: Add backlight=native DMI quirk for HP EliteBook 8460p The HP EliteBook 8460p predates Windows 8, so it defaults to using acpi_video# for backlight control. Starting with the 6.1.y kernels the native radeon_bl0 backlight is hidden in this case instead of relying on userspace preferring acpi_video# over native backlight devices. It turns out that for the acpi_video# interface to work on the HP EliteBook 8460p, the brightness needs to be set at least once through the native interface, which now no longer is done breaking backlight control. The native interface however always works without problems, so add a quirk to use native backlight on the EliteBook 8460p to fix this. Fixes: fb1836c91317 ("ACPI: video: Prefer native over vendor") Link: https://bugzilla.redhat.com/show_bug.cgi?id=2161428 Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d77596d432cc4142520af32b5388d512e52e0edb Author: Hans de Goede Date: Thu Jan 19 17:37:43 2023 +0100 ACPI: video: Add backlight=native DMI quirk for HP Pavilion g6-1d80nr The HP Pavilion g6-1d80nr 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 drivers/acpi/video_detect.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7bf70dbb18820b37406fdfa2aaf14c2f5c71a11a Merge: 9946f0981ff8 51cdc8bc120e Author: Linus Torvalds Date: Mon Jan 23 11:56:07 2023 -0800 Merge tag 'vfio-v6.2-rc6' of https://github.com/awilliam/linux-vfio Pull VFIO fixes from Alex Williamson: - Honor reserved regions when testing for IOMMU find grained super page support, avoiding a regression on s390 for a firmware device where the existence of the mapping, even if unused can trigger an error state. (Niklas Schnelle) - Fix a deadlock in releasing KVM references by using the alternate .release() rather than .destroy() callback for the kvm-vfio device. (Yi Liu) * tag 'vfio-v6.2-rc6' of https://github.com/awilliam/linux-vfio: kvm/vfio: Fix potential deadlock on vfio group_lock vfio/type1: Respect IOMMU reserved regions in vfio_test_domain_fgsp() commit 9946f0981ff8698848ee79d739f432a2a3e68eed Merge: 2475bf0250de e1fabbc83cb1 Author: Linus Torvalds Date: Mon Jan 23 11:46:19 2023 -0800 Merge tag 'efi-fixes-for-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: "Another couple of EFI fixes, of which the first two were already in -next when I sent out the previous PR, but they caused some issues on non-EFI boots so I let them simmer for a bit longer. - ensure the EFI ResetSystem and ACPI PRM calls are recognized as users of the EFI runtime, and therefore protected against exceptions - account for the EFI runtime stack in the stacktrace code - remove Matthew Garrett's MAINTAINERS entry for efivarfs" * tag 'efi-fixes-for-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: Remove Matthew Garrett as efivarfs maintainer arm64: efi: Account for the EFI runtime stack in stack unwinder arm64: efi: Avoid workqueue to check whether EFI runtime is live commit 2255bbcdc39d5b0311968f86614ae4f25fdd465d 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 (cherry picked from commit 8d7eb8ed3f83f248e01a4f548d9c500a950a2c2d) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 75444cfffc12459273be70a56460035fb4c553f3 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 (cherry picked from commit ca54a9a32da0f0ef7e5cbcd111b66f3c9d78b7d2) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_lrc.c | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) commit 98e3528012cd571c48bbae7c7c0f868823254b6c Author: Ross Lagerwall Date: Fri Jan 20 17:43:54 2023 +0000 nvme-fc: fix initialization order ctrl->ops is used by nvme_alloc_admin_tag_set() but set by nvme_init_ctrl() so reorder the calls to avoid a NULL pointer dereference. Fixes: 6dfba1c09c10 ("nvme-fc: use the tagset alloc/free helpers") Signed-off-by: Ross Lagerwall Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit d63f11c02b8d3e54bdb65d8c309f73b7f474aec4 Author: Mario Limonciello Date: Sat Jan 21 07:48:11 2023 -0600 gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable") adjusted the policy to enable wakeup by default if the ACPI tables indicated that a device was wake capable. It was reported however that this broke suspend on at least two System76 systems in S3 mode and two Lenovo Gen2a systems, but only with S3. When the machines are set to s2idle, wakeup behaves properly. Configuring the GPIOs for wakeup with S3 doesn't work properly, so only set it when the system supports low power idle. Fixes: 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable") Fixes: b38f2d5d9615c ("i2c: acpi: Use ACPI wake capability bit to set wake_irq") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2357 Link: https://bugzilla.redhat.com/show_bug.cgi?id=2162013 Reported-by: Nathan Smythe Tested-by: Nathan Smythe Suggested-by: Raul Rangel Signed-off-by: Mario Limonciello Acked-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4bdbba54e9b1c769da8ded9abd209d765715e1d6 Author: Jeff Layton Date: Fri Jan 20 14:52:14 2023 -0500 nfsd: don't free files unconditionally in __nfsd_file_cache_purge nfsd_file_cache_purge is called when the server is shutting down, in which case, tearing things down is generally fine, but it also gets called when the exports cache is flushed. Instead of walking the cache and freeing everything unconditionally, handle it the same as when we have a notification of conflicting access. Fixes: ac3a2585f018 ("nfsd: rework refcounting in filecache") Reported-by: Ruben Vestergaard Reported-by: Torkil Svensgaard Reported-by: Shachar Kagan Signed-off-by: Jeff Layton Tested-by: Shachar Kagan Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 61 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 25 deletions(-) commit 2f62847cf6ae49a54515421f67b1badffaa805f3 Author: Nathan Chancellor Date: Wed Jan 18 20:29:02 2023 +0100 ARM: 9287/1: Reduce __thumb2__ definition to crypto files that require it Commit 1d2e9b67b001 ("ARM: 9265/1: pass -march= only to compiler") added a __thumb2__ define to ASFLAGS to avoid build errors in the crypto code, which relies on __thumb2__ for preprocessing. Commit 59e2cf8d21e0 ("ARM: 9275/1: Drop '-mthumb' from AFLAGS_ISA") followed up on this by removing -mthumb from AFLAGS so that __thumb2__ would not be defined when the default target was ARMv7 or newer. Unfortunately, the second commit's fix assumes that the toolchain defaults to -mno-thumb / -marm, which is not the case for Debian's arm-linux-gnueabihf target, which defaults to -mthumb: $ echo | arm-linux-gnueabihf-gcc -dM -E - | grep __thumb #define __thumb2__ 1 #define __thumb__ 1 This target is used by several CI systems, which will still see redefined macro warnings, despite '-mthumb' not being present in the flags: : warning: "__thumb2__" redefined : note: this is the location of the previous definition Remove the global AFLAGS __thumb2__ define and move it to the crypto folder where it is required by the imported OpenSSL algorithms; the rest of the kernel should use the internal CONFIG_THUMB2_KERNEL symbol to know whether or not Thumb2 is being used or not. Be sure that __thumb2__ is undefined first so that there are no macro redefinition warnings. Link: https://github.com/ClangBuiltLinux/linux/issues/1772 Reported-by: "kernelci.org bot" Suggested-by: Ard Biesheuvel Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Fixes: 59e2cf8d21e0 ("ARM: 9275/1: Drop '-mthumb' from AFLAGS_ISA") Fixes: 1d2e9b67b001 ("ARM: 9265/1: pass -march= only to compiler") Signed-off-by: Russell King (Oracle) arch/arm/Makefile | 2 +- arch/arm/crypto/Makefile | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit b00c51ef8f72ced0965d021a291b98ff822c5337 Author: Jens Axboe Date: Sun Jan 22 10:02:55 2023 -0700 io_uring/net: cache provided buffer group value for multishot receives If we're using ring provided buffers with multishot receive, and we end up doing an io-wq based issue at some points that also needs to select a buffer, we'll lose the initially assigned buffer group as io_ring_buffer_select() correctly clears the buffer group list as the issue isn't serialized by the ctx uring_lock. This is fine for normal receives as the request puts the buffer and finishes, but for multishot, we will re-arm and do further receives. On the next trigger for this multishot receive, the receive will try and pick from a buffer group whose value is the same as the buffer ID of the las receive. That is obviously incorrect, and will result in a premature -ENOUFS error for the receive even if we had available buffers in the correct group. Cache the buffer group value at prep time, so we can restore it for future receives. This only needs doing for the above mentioned case, but just do it by default to keep it easier to read. Cc: stable@vger.kernel.org Fixes: b3fdea6ecb55 ("io_uring: multishot recv") Fixes: 9bb66906f23e ("io_uring: support multishot in recvmsg") Cc: Dylan Yudaken Signed-off-by: Jens Axboe io_uring/net.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit dcff8b7ca92d724bdaf474a3fa37a7748377813a Author: fengwk Date: Sun Jan 22 01:51:06 2023 +0800 ASoC: amd: yc: Add Xiaomi Redmi Book Pro 15 2022 into DMI table This model requires an additional detection quirk to enable the internal microphone - BIOS doesn't seem to support AcpDmicConnected (nothing in acpidump output). Signed-off-by: fengwk Link: https://lore.kernel.org/r/Y8wmCutc74j/tyHP@arch Signed-off-by: Mark Brown sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9f535c870e493841ac7be390610ff2edec755762 Author: Gergely Risko Date: Thu Jan 19 14:40:41 2023 +0100 ipv6: fix reachability confirmation with proxy_ndp When proxying IPv6 NDP requests, the adverts to the initial multicast solicits are correct and working. On the other hand, when later a reachability confirmation is requested (on unicast), no reply is sent. This causes the neighbor entry expiring on the sending node, which is mostly a non-issue, as a new multicast request is sent. There are routers, where the multicast requests are intentionally delayed, and in these environments the current implementation causes periodic packet loss for the proxied endpoints. The root cause is the erroneous decrease of the hop limit, as this is checked in ndisc.c and no answer is generated when it's 254 instead of the correct 255. Cc: stable@vger.kernel.org Fixes: 46c7655f0b56 ("ipv6: decrease hop limit counter in ip6_forward()") Signed-off-by: Gergely Risko Tested-by: Gergely Risko Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 0ad999c1eec879f06cc52ef7df4d0dbee4a2d7eb Merge: e38553bdc377 7c494a7749a7 Author: David S. Miller Date: Mon Jan 23 10:58:12 2023 +0000 Merge branch 'ethtool-mac-merge' Vladimir Oltean say: ==================== 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 7c494a7749a7d6ee95cfae6a8c109c5d63103d88 Author: Vladimir Oltean Date: Thu Jan 19 14:26:53 2023 +0200 net: ethtool: netlink: introduce ethnl_update_bool() Due to the fact that the kernel-side data structures have been carried over from the ioctl-based ethtool, we are now in the situation where we have an ethnl_update_bool32() function, but the plain function that operates on a boolean value kept in an actual u8 netlink attribute doesn't exist. With new ethtool features that are exposed solely over netlink, the kernel data structures will use the "bool" type, so we will need this kind of helper. Introduce it now; it's needed for things like verify-disabled for the MAC merge configuration. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller net/ethtool/netlink.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit e38553bdc377e3e7a6caa9dd9770d8b644d8dac3 Author: Wei Fang Date: Thu Jan 19 12:37:47 2023 +0800 net: fec: Use page_pool_put_full_page when freeing rx buffers The page_pool_release_page was used when freeing rx buffers, and this function just unmaps the page (if mapped) and does not recycle the page. So after hundreds of down/up the eth0, the system will out of memory. For more details, please refer to the following reproduce steps and bug logs. To solve this issue and refer to the doc of page pool, the page_pool_put_full_page should be used to replace page_pool_release_page. Because this API will try to recycle the page if the page refcnt equal to 1. After testing 20000 times, the issue can not be reproduced anymore (about testing 391 times the issue will occur on i.MX8MN-EVK before). Reproduce steps: Create the test script and run the script. The script content is as follows: LOOPS=20000 i=1 while [ $i -le $LOOPS ] do echo "TINFO:ENET $curface up and down test $i times" org_macaddr=$(cat /sys/class/net/eth0/address) ifconfig eth0 down ifconfig eth0 hw ether $org_macaddr up i=$(expr $i + 1) done sleep 5 if cat /sys/class/net/eth0/operstate | grep 'up';then echo "TEST PASS" else echo "TEST FAIL" fi Bug detail logs: TINFO:ENET up and down test 391 times [ 850.471205] Qualcomm Atheros AR8031/AR8033 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=POLL) [ 853.535318] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 853.541694] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 870.590531] page_pool_release_retry() stalled pool shutdown 199 inflight 60 sec [ 931.006557] page_pool_release_retry() stalled pool shutdown 199 inflight 120 sec TINFO:ENET up and down test 392 times [ 991.426544] page_pool_release_retry() stalled pool shutdown 192 inflight 181 sec [ 1051.838531] page_pool_release_retry() stalled pool shutdown 170 inflight 241 sec [ 1093.751217] Qualcomm Atheros AR8031/AR8033 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=POLL) [ 1096.446520] page_pool_release_retry() stalled pool shutdown 308 inflight 60 sec [ 1096.831245] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 1096.839092] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 1112.254526] page_pool_release_retry() stalled pool shutdown 103 inflight 302 sec [ 1156.862533] page_pool_release_retry() stalled pool shutdown 308 inflight 120 sec [ 1172.674516] page_pool_release_retry() stalled pool shutdown 103 inflight 362 sec [ 1217.278532] page_pool_release_retry() stalled pool shutdown 308 inflight 181 sec TINFO:ENET up and down test 393 times [ 1233.086535] page_pool_release_retry() stalled pool shutdown 103 inflight 422 sec [ 1277.698513] page_pool_release_retry() stalled pool shutdown 308 inflight 241 sec [ 1293.502525] page_pool_release_retry() stalled pool shutdown 86 inflight 483 sec [ 1338.110518] page_pool_release_retry() stalled pool shutdown 308 inflight 302 sec [ 1353.918540] page_pool_release_retry() stalled pool shutdown 32 inflight 543 sec [ 1361.179205] Qualcomm Atheros AR8031/AR8033 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=POLL) [ 1364.255298] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 1364.263189] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 1371.998532] page_pool_release_retry() stalled pool shutdown 310 inflight 60 sec [ 1398.530542] page_pool_release_retry() stalled pool shutdown 308 inflight 362 sec [ 1414.334539] page_pool_release_retry() stalled pool shutdown 16 inflight 604 sec [ 1432.414520] page_pool_release_retry() stalled pool shutdown 310 inflight 120 sec [ 1458.942523] page_pool_release_retry() stalled pool shutdown 308 inflight 422 sec [ 1474.750521] page_pool_release_retry() stalled pool shutdown 16 inflight 664 sec TINFO:ENET up and down test 394 times [ 1492.830522] page_pool_release_retry() stalled pool shutdown 310 inflight 181 sec [ 1519.358519] page_pool_release_retry() stalled pool shutdown 308 inflight 483 sec [ 1535.166545] page_pool_release_retry() stalled pool shutdown 2 inflight 724 sec [ 1537.090278] eth_test2.sh invoked oom-killer: gfp_mask=0x400dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO), order=0, oom_score_adj=0 [ 1537.101192] CPU: 3 PID: 2379 Comm: eth_test2.sh Tainted: G C 6.1.1+g56321e101aca #1 [ 1537.110249] Hardware name: NXP i.MX8MNano EVK board (DT) [ 1537.115561] Call trace: [ 1537.118005] dump_backtrace.part.0+0xe0/0xf0 [ 1537.122289] show_stack+0x18/0x40 [ 1537.125608] dump_stack_lvl+0x64/0x80 [ 1537.129276] dump_stack+0x18/0x34 [ 1537.132592] dump_header+0x44/0x208 [ 1537.136083] oom_kill_process+0x2b4/0x2c0 [ 1537.140097] out_of_memory+0xe4/0x594 [ 1537.143766] __alloc_pages+0xb68/0xd00 [ 1537.147521] alloc_pages+0xac/0x160 [ 1537.151013] __get_free_pages+0x14/0x40 [ 1537.154851] pgd_alloc+0x1c/0x30 [ 1537.158082] mm_init+0xf8/0x1d0 [ 1537.161228] mm_alloc+0x48/0x60 [ 1537.164368] alloc_bprm+0x7c/0x240 [ 1537.167777] do_execveat_common.isra.0+0x70/0x240 [ 1537.172486] __arm64_sys_execve+0x40/0x54 [ 1537.176502] invoke_syscall+0x48/0x114 [ 1537.180255] el0_svc_common.constprop.0+0xcc/0xec [ 1537.184964] do_el0_svc+0x2c/0xd0 [ 1537.188280] el0_svc+0x2c/0x84 [ 1537.191340] el0t_64_sync_handler+0xf4/0x120 [ 1537.195613] el0t_64_sync+0x18c/0x190 [ 1537.199334] Mem-Info: [ 1537.201620] active_anon:342 inactive_anon:10343 isolated_anon:0 [ 1537.201620] active_file:54 inactive_file:112 isolated_file:0 [ 1537.201620] unevictable:0 dirty:0 writeback:0 [ 1537.201620] slab_reclaimable:2620 slab_unreclaimable:7076 [ 1537.201620] mapped:1489 shmem:2473 pagetables:466 [ 1537.201620] sec_pagetables:0 bounce:0 [ 1537.201620] kernel_misc_reclaimable:0 [ 1537.201620] free:136672 free_pcp:96 free_cma:129241 [ 1537.240419] Node 0 active_anon:1368kB inactive_anon:41372kB active_file:216kB inactive_file:5052kB unevictable:0kB isolated(anon):0kB isolated(file):0kB s [ 1537.271422] Node 0 DMA free:541636kB boost:0kB min:30000kB low:37500kB high:45000kB reserved_highatomic:0KB active_anon:1368kB inactive_anon:41372kB actiB [ 1537.300219] lowmem_reserve[]: 0 0 0 0 [ 1537.303929] Node 0 DMA: 1015*4kB (UMEC) 743*8kB (UMEC) 417*16kB (UMEC) 235*32kB (UMEC) 116*64kB (UMEC) 25*128kB (UMEC) 4*256kB (UC) 2*512kB (UC) 0*1024kBB [ 1537.323938] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB [ 1537.332708] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=32768kB [ 1537.341292] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB [ 1537.349776] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=64kB [ 1537.358087] 2939 total pagecache pages [ 1537.361876] 0 pages in swap cache [ 1537.365229] Free swap = 0kB [ 1537.368147] Total swap = 0kB [ 1537.371065] 516096 pages RAM [ 1537.373959] 0 pages HighMem/MovableOnly [ 1537.377834] 17302 pages reserved [ 1537.381103] 163840 pages cma reserved [ 1537.384809] 0 pages hwpoisoned [ 1537.387902] Tasks state (memory values in pages): [ 1537.392652] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name [ 1537.401356] [ 201] 993 201 1130 72 45056 0 0 rpcbind [ 1537.409772] [ 202] 0 202 4529 1640 77824 0 -250 systemd-journal [ 1537.418861] [ 222] 0 222 4691 801 69632 0 -1000 systemd-udevd [ 1537.427787] [ 248] 994 248 20914 130 65536 0 0 systemd-timesyn [ 1537.436884] [ 497] 0 497 620 31 49152 0 0 atd [ 1537.444938] [ 500] 0 500 854 77 53248 0 0 crond [ 1537.453165] [ 503] 997 503 1470 160 49152 0 -900 dbus-daemon [ 1537.461908] [ 505] 0 505 633 24 40960 0 0 firmwared [ 1537.470491] [ 513] 0 513 2507 180 61440 0 0 ofonod [ 1537.478800] [ 514] 990 514 69640 137 81920 0 0 parsec [ 1537.487120] [ 533] 0 533 599 39 40960 0 0 syslogd [ 1537.495518] [ 534] 0 534 4546 148 65536 0 0 systemd-logind [ 1537.504560] [ 535] 0 535 690 24 45056 0 0 tee-supplicant [ 1537.513564] [ 540] 996 540 2769 168 61440 0 0 systemd-network [ 1537.522680] [ 566] 0 566 3878 228 77824 0 0 connmand [ 1537.531168] [ 645] 998 645 1538 133 57344 0 0 avahi-daemon [ 1537.540004] [ 646] 998 646 1461 64 57344 0 0 avahi-daemon [ 1537.548846] [ 648] 992 648 781 41 45056 0 0 rpc.statd [ 1537.557415] [ 650] 64371 650 590 23 45056 0 0 ninfod [ 1537.565754] [ 653] 61563 653 555 24 45056 0 0 rdisc [ 1537.573971] [ 655] 0 655 374569 2999 290816 0 -999 containerd [ 1537.582621] [ 658] 0 658 1311 20 49152 0 0 agetty [ 1537.590922] [ 663] 0 663 1529 97 49152 0 0 login [ 1537.599138] [ 666] 0 666 3430 202 69632 0 0 wpa_supplicant [ 1537.608147] [ 667] 0 667 2344 96 61440 0 0 systemd-userdbd [ 1537.617240] [ 677] 0 677 2964 314 65536 0 100 systemd [ 1537.625651] [ 679] 0 679 3720 646 73728 0 100 (sd-pam) [ 1537.634138] [ 687] 0 687 1289 403 45056 0 0 sh [ 1537.642108] [ 789] 0 789 970 93 45056 0 0 eth_test2.sh [ 1537.650955] [ 2355] 0 2355 2346 94 61440 0 0 systemd-userwor [ 1537.660046] [ 2356] 0 2356 2346 94 61440 0 0 systemd-userwor [ 1537.669137] [ 2358] 0 2358 2346 95 57344 0 0 systemd-userwor [ 1537.678258] [ 2379] 0 2379 970 93 45056 0 0 eth_test2.sh [ 1537.687098] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-0.slice/user@0.service,tas0 [ 1537.703009] Out of memory: Killed process 679 ((sd-pam)) total-vm:14880kB, anon-rss:2584kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:72kB oom_score_ad0 [ 1553.246526] page_pool_release_retry() stalled pool shutdown 310 inflight 241 sec Fixes: 95698ff6177b ("net: fec: using page pool to manage RX buffers") Signed-off-by: Wei Fang Reviewed-by: shenwei wang Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87978e6ad45a16835cc58234451111091be3c59a Author: Cezary Rojewski Date: Thu Jan 19 15:32:35 2023 +0100 ALSA: hda: Do not unset preset when cleaning up codec Several functions that take part in codec's initialization and removal are re-used by ASoC codec drivers implementations. Drivers mimic the behavior of hda_codec_driver_probe/remove() found in sound/pci/hda/hda_bind.c with their component->probe/remove() instead. One of the reasons for that is the expectation of snd_hda_codec_device_new() to receive a valid pointer to an instance of struct snd_card. This expectation can be met only once sound card components probing commences. As ASoC sound card may be unbound without codec device being actually removed from the system, unsetting ->preset in snd_hda_codec_cleanup_for_unbind() interferes with module unload -> load scenario causing null-ptr-deref. Preset is assigned only once, during device/driver matching whereas ASoC codec driver's module reloading may occur several times throughout the lifetime of an audio stack. Suggested-by: Takashi Iwai Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20230119143235.1159814-1-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai sound/pci/hda/hda_bind.c | 2 ++ sound/pci/hda/hda_codec.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) commit b6ee896385380aa621102e8ea402ba12db1cabff Author: Eric Dumazet Date: Fri Jan 20 13:02:49 2023 +0000 xfrm/compat: prevent potential spectre v1 gadget in xfrm_xlate32_attr() int type = nla_type(nla); if (type > XFRMA_MAX) { return -EOPNOTSUPP; } @type is then used as an array index and can be used as a Spectre v1 gadget. if (nla_len(nla) < compat_policy[type].len) { array_index_nospec() can be used to prevent leaking content of kernel memory to malicious users. Fixes: 5106f4a8acff ("xfrm/compat: Add 32=>64-bit messages translator") Signed-off-by: Eric Dumazet Cc: Dmitry Safonov Cc: Steffen Klassert Reviewed-by: Dmitry Safonov Signed-off-by: Steffen Klassert net/xfrm/xfrm_compat.c | 2 ++ 1 file changed, 2 insertions(+) commit 2475bf0250dee99b477e0c56d7dc9d7ac3f04117 Merge: ab2f408731cc 5f5cc9ed992c Author: Linus Torvalds Date: Sun Jan 22 12:14:58 2023 -0800 Merge tag 'sched_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Borislav Petkov: - Make sure the scheduler doesn't use stale frequency scaling values when latter get disabled due to a value error - Fix a NULL pointer access on UP configs - Use the proper locking when updating CPU capacity * tag 'sched_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/aperfmperf: Erase stale arch_freq_scale values when disabling frequency invariance readings sched/core: Fix NULL pointer access fault in sched_setaffinity() with non-SMP configs sched/fair: Fixes for capacity inversion detection sched/uclamp: Fix a uninitialized variable warnings commit ab2f408731cc7e03ef2e5dc7dada649220e4dcd2 Merge: 2b299a1cd432 977c6ba624f2 Author: Linus Torvalds Date: Sun Jan 22 12:10:47 2023 -0800 Merge tag 'edac_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fixes from Borislav Petkov: - Respect user-supplied polling value in the EDAC device code - Fix a use-after-free issue in qcom_edac * tag 'edac_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/qcom: Do not pass llcc_driv_data as edac_device_ctl_info's pvt_info EDAC/device: Respect any driver-supplied workqueue polling value commit 2b299a1cd43271ffb582342a2a3c227aea0f32ac Merge: 3c006ad74d68 5a8a05f165fb Author: Linus Torvalds Date: Sun Jan 22 12:06:18 2023 -0800 Merge tag 'perf_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Borislav Petkov: - Add Emerald Rapids model support to more perf machinery * tag 'perf_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/cstate: Add Emerald Rapids perf/x86/intel: Add Emerald Rapids commit 3c006ad74d68be45ee36ca68fd9c053974fb6b0f Merge: 2241ab53cbb5 95ecbd0f162f Author: Linus Torvalds Date: Sun Jan 22 11:56:33 2023 -0800 Merge tag 'gfs2-v6.2-rc4-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 writepage fix from Andreas Gruenbacher: - Fix a regression introduced by commit "gfs2: stop using generic_writepages in gfs2_ail1_start_one". * tag 'gfs2-v6.2-rc4-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: Revert "gfs2: stop using generic_writepages in gfs2_ail1_start_one" commit 6601fc0d15ffc20654e39486f9bef35567106d68 Author: Dean Luick Date: Thu Jan 12 13:16:02 2023 -0500 IB/hfi1: Restore allocated resources on failed copyout Fix a resource leak if an error occurs. Fixes: f404ca4c7ea8 ("IB/hfi1: Refactor hfi_user_exp_rcv_setup() IOCTL") Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167354736291.2132367.10894218740150168180.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/file_ops.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 27b5de622ea3fe0ad5a31a0ebd9f7a0a276932d1 Author: Nathan Chancellor Date: Fri Jan 20 09:58:27 2023 -0700 x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block LLVM 16 will have support for this flag so move it out of the GCC-only block to allow LLVM builds to take advantage of it. Signed-off-by: Nathan Chancellor Signed-off-by: Ingo Molnar Tested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://github.com/ClangBuiltLinux/linux/issues/1665 Link: https://github.com/llvm/llvm-project/commit/6f867f9102838ebe314c1f3661fdf95700386e5a Link: https://lore.kernel.org/r/20230120165826.2469302-1-nathan@kernel.org arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2c46b10d52624376322b01654095a84611c7e09 Author: Vipin Sharma Date: Wed Jan 11 10:34:08 2023 -0800 KVM: selftests: Make reclaim_period_ms input always be positive reclaim_period_ms used to be positive only but the commit 0001725d0f9b ("KVM: selftests: Add atoi_positive() and atoi_non_negative() for input validation") incorrectly changed it to non-negative validation. Change validation to allow only positive input. Fixes: 0001725d0f9b ("KVM: selftests: Add atoi_positive() and atoi_non_negative() for input validation") Signed-off-by: Vipin Sharma Reported-by: Ben Gardon Reviewed-by: Ben Gardon Reviewed-by: Sean Christopherson Message-Id: <20230111183408.104491-1-vipinsh@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a44b331614e6f7e63902ed7dff7adc8c85edd8bc Author: Hendrik Borghorst Date: Mon Nov 14 16:48:23 2022 +0000 KVM: x86/vmx: Do not skip segment attributes if unusable bit is set When serializing and deserializing kvm_sregs, attributes of the segment descriptors are stored by user space. For unusable segments, vmx_segment_access_rights skips all attributes and sets them to 0. This means we zero out the DPL (Descriptor Privilege Level) for unusable entries. Unusable segments are - contrary to their name - usable in 64bit mode and are used by guests to for example create a linear map through the NULL selector. VMENTER checks if SS.DPL is correct depending on the CS segment type. For types 9 (Execute Only) and 11 (Execute Read), CS.DPL must be equal to SS.DPL [1]. We have seen real world guests setting CS to a usable segment with DPL=3 and SS to an unusable segment with DPL=3. Once we go through an sregs get/set cycle, SS.DPL turns to 0. This causes the virtual machine to crash reproducibly. This commit changes the attribute logic to always preserve attributes for unusable segments. According to [2] SS.DPL is always saved on VM exits, regardless of the unusable bit so user space applications should have saved the information on serialization correctly. [3] specifies that besides SS.DPL the rest of the attributes of the descriptors are undefined after VM entry if unusable bit is set. So, there should be no harm in setting them all to the previous state. [1] Intel SDM Vol 3C 26.3.1.2 Checks on Guest Segment Registers [2] Intel SDM Vol 3C 27.3.2 Saving Segment Registers and Descriptor-Table Registers [3] Intel SDM Vol 3C 26.3.2.2 Loading Guest Segment Registers and Descriptor-Table Registers Cc: Alexander Graf Cc: stable@vger.kernel.org Signed-off-by: Hendrik Borghorst Reviewed-by: Jim Mattson Reviewed-by: Alexander Graf Message-Id: <20221114164823.69555-1-hborghor@amazon.de> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 50aa870ba2f7735f556e52d15f61cd0f359c4c0b Author: Paolo Bonzini Date: Sun Jan 22 04:04:50 2023 -0500 selftests: kvm: move declaration at the beginning of main() Placing a declaration of evt_reset is pedantically invalid according to the C standard. While GCC does not really care and only warns with -Wpedantic, clang ignores the declaration altogether with an error: x86_64/xen_shinfo_test.c:965:2: error: expected expression struct kvm_xen_hvm_attr evt_reset = { ^ x86_64/xen_shinfo_test.c:969:38: error: use of undeclared identifier evt_reset vm_ioctl(vm, KVM_XEN_HVM_SET_ATTR, &evt_reset); ^ Reported-by: Yu Zhang Reported-by: Sean Christopherson Fixes: a79b53aaaab5 ("KVM: x86: fix deadlock for KVM_XEN_EVTCHN_RESET", 2022-12-28) Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 95ecbd0f162fc06ef4c4045a66f653f47b62a2d3 Author: Andreas Gruenbacher Date: Thu Jan 19 20:14:42 2023 +0100 Revert "gfs2: stop using generic_writepages in gfs2_ail1_start_one" Commit b2b0a5e97855 switched from generic_writepages() to filemap_fdatawrite_wbc() in gfs2_ail1_start_one() on the path to replacing ->writepage() with ->writepages() and eventually eliminating the former. Function gfs2_ail1_start_one() is called from gfs2_log_flush(), our main function for flushing the filesystem log. Unfortunately, at least as implemented today, ->writepage() and ->writepages() are entirely different operations for journaled data inodes: while the former creates and submits transactions covering the data to be written, the latter flushes dirty buffers out to disk. With gfs2_ail1_start_one() now calling ->writepages(), we end up creating filesystem transactions while we are in the course of a log flush, which immediately deadlocks on the sdp->sd_log_flush_lock semaphore. Work around that by going back to how things used to work before commit b2b0a5e97855 for now; figuring out a superior solution will take time we don't have available right now. However ... Since the removal of generic_writepages() is imminent, open-code it here. We're already inside a blk_start_plug() ... blk_finish_plug() section here, so skip that part of the original generic_writepages(). This reverts commit b2b0a5e978552e348f85ad9c7568b630a5ede659. Signed-off-by: Andreas Gruenbacher Acked-by: Christoph Hellwig fs/gfs2/log.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit d732cbf78d616c0b63201eb9e5e4af3fe9b90dc4 Merge: 2241ab53cbb5 ef3691683d7b Author: Paolo Bonzini Date: Sun Jan 22 03:46:14 2023 -0500 Merge tag 'kvmarm-fixes-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.2, take #2 - Pass the correct address to mte_clear_page_tags() on initialising a tagged page - Plug a race against a GICv4.1 doorbell interrupt while saving the vgic-v3 pending state. commit a1550700629f30c5bd554161524f14f14600d554 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 drivers/media/v4l2-core/v4l2-ctrls-api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2241ab53cbb5cdb08a6b2d4688feb13971058f65 Author: Linus Torvalds Date: Sat Jan 21 16:27:01 2023 -0800 Linux 6.2-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95f184d0e1e14e6fd4368a804db5f870e5f841d2 Merge: f67144022885 8caa03f10bf9 Author: Linus Torvalds Date: Sat Jan 21 16:21:56 2023 -0800 Merge tag 'io_uring-6.2-2023-01-21' of git://git.kernel.dk/linux Pull another io_uring fix from Jens Axboe: "Just a single fix for a regression that happened in this release due to a poll change. Normally I would've just deferred it to next week, but since the original fix got picked up by stable, I think it's better to just send this one off separately. The issue is around the poll race fix, and how it mistakenly also got applied to multishot polling. Those don't need the race fix, and we should not be doing any reissues for that case. Exhaustive test cases were written and committed to the liburing regression suite for the reported issue, and additions for similar issues" * tag 'io_uring-6.2-2023-01-21' of git://git.kernel.dk/linux: io_uring/poll: don't reissue in case of poll race on multishot request commit f67144022885344375ad03593e7a290cc614da34 Merge: c88a31147064 3daed6345d58 Author: Linus Torvalds Date: Sat Jan 21 11:20:55 2023 -0800 Merge tag 'char-misc-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char/misc and other subsystem driver fixes for 6.2-rc5 to resolve a few reported issues. They include: - long time pending fastrpc fixes (should have gone into 6.1, my fault) - mei driver/bus fixes and new device ids - interconnect driver fixes for reported problems - vmci bugfix - w1 driver bugfixes for reported problems Almost all of these have been in linux-next with no reported problems, the rest have all passed 0-day bot testing in my tree and on the mailing lists where they have sat too long due to me taking a long time to catch up on my pending patch queue" * tag 'char-misc-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: VMCI: Use threaded irqs instead of tasklets misc: fastrpc: Pass bitfield into qcom_scm_assign_mem gsmi: fix null-deref in gsmi_get_variable misc: fastrpc: Fix use-after-free race condition for maps misc: fastrpc: Don't remove map on creater_process and device_release misc: fastrpc: Fix use-after-free and race in fastrpc_map_find misc: fastrpc: fix error code in fastrpc_req_mmap() mei: me: add meteor lake point M DID mei: bus: fix unlink on bus in error path w1: fix WARNING after calling w1_process() w1: fix deadloop in __w1_remove_master_device() comedi: adv_pci1760: Fix PWM instruction handling interconnect: qcom: rpm: Use _optional func for provider clocks interconnect: qcom: msm8996: Fix regmap max_register values interconnect: qcom: msm8996: Provide UFS clocks to A2NoC dt-bindings: interconnect: Add UFS clocks to MSM8996 A2NoC commit c88a3114706429c9edf89e0bf2cd6757270c00f8 Merge: bb86d65775cc 739790605705 Author: Linus Torvalds Date: Sat Jan 21 11:17:23 2023 -0800 Merge tag 'driver-core-6.2-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 driver and kernel core fixes for 6.2-rc5. They include: - potential gadget fixup in do_prlimit - device property refcount leak fix - test_async_probe bugfix for reported problem" * tag 'driver-core-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: prlimit: do_prlimit needs to have a speculation check driver core: Fix test_async_probe_init saves device in wrong array device property: fix of node refcount leak in fwnode_graph_get_next_endpoint() commit bb86d65775cc3835152c08882384c2534b56f1d3 Merge: bd5cc6ee8f4e 7d83299351fe Author: Linus Torvalds Date: Sat Jan 21 11:15:21 2023 -0800 Merge tag 'staging-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fix from Greg KH: "Here is a single staging driver fix for 6.2-rc5. It resolves a build issue reported and Fixed by Arnd in the vc04_services driver. It's been in linux-next this week with no reported problems" * tag 'staging-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: vchiq_arm: fix enum vchiq_status return types commit bd5cc6ee8f4e823e466a075a79db3cd355cee28e Merge: e67da28898e9 14ee78d5932a Author: Linus Torvalds Date: Sat Jan 21 11:12:42 2023 -0800 Merge tag 'tty-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are some small tty and serial driver fixes for 6.2-rc5 that resolve a number of tiny reported issues and some new device ids. They include: - new device id for the exar serial driver - speakup tty driver bugfix - atmel serial driver baudrate fixup - stm32 serial driver bugfix and then revert as the bugfix broke the build. That will come back in a later pull request once it is all worked out properly. - amba-pl011 serial driver rs486 mode bugfix - qcom_geni serial driver bugfix Most of these have been in linux-next with no reported problems (well, other than the build breakage which generated the revert), the new device id passed 0-day testing" * tag 'tty-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: exar: Add support for Sealevel 7xxxC serial cards Revert "serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler" tty: serial: qcom_geni: avoid duplicate struct member init serial: atmel: fix incorrect baudrate setup tty: fix possible null-ptr-defer in spk_ttyio_release serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler serial: amba-pl011: fix high priority character transmission in rs486 mode serial: pch_uart: Pass correct sg to dma_unmap_sg() tty: serial: qcom-geni-serial: fix slab-out-of-bounds on RX FIFO buffer commit e67da28898e9e219176412f2fd2f415dece474ab Merge: 83cd5fd014c0 14ff7460bb58 Author: Linus Torvalds Date: Sat Jan 21 11:10:03 2023 -0800 Merge tag 'usb-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt fixes from Greg KH: "Here are a number of small USB and Thunderbolt driver fixes and new device id changes for 6.2-rc5. Included in here are: - thunderbolt bugfixes for reported problems - new usb-serial driver ids added - onboard_hub usb driver fixes for much-reported problems - xhci bugfixes - typec bugfixes - ehci-fsl driver module alias fix - iowarrior header size fix - usb gadget driver fixes All of these, except for the iowarrior fix, have been in linux-next with no reported issues. The iowarrior fix passed the 0-day testing and is a one digit change based on a reported problem in the driver (which was written to a spec, not the real device that is now available)" * tag 'usb-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (40 commits) USB: misc: iowarrior: fix up header size for USB_DEVICE_ID_CODEMERCS_IOW100 usb: host: ehci-fsl: Fix module alias usb: dwc3: fix extcon dependency usb: core: hub: disable autosuspend for TI TUSB8041 USB: fix misleading usb_set_intfdata() kernel doc usb: gadget: f_ncm: fix potential NULL ptr deref in ncm_bitrate() USB: gadget: Add ID numbers to configfs-gadget driver names usb: typec: tcpm: Fix altmode re-registration causes sysfs create fail usb: gadget: g_webcam: Send color matching descriptor per frame usb: typec: altmodes/displayport: Use proper macro for pin assignment check usb: typec: altmodes/displayport: Fix pin assignment calculation usb: typec: altmodes/displayport: Add pin assignment helper usb: gadget: f_fs: Ensure ep0req is dequeued before free_request usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait usb: misc: onboard_hub: Move 'attach' work to the driver usb: misc: onboard_hub: Invert driver registration order usb: ucsi: Ensure connector delayed work items are flushed usb: musb: fix error return code in omap2430_probe() usb: chipidea: core: fix possible constant 0 if use IS_ERR(ci->role_switch) xhci: Detect lpm incapable xHC USB3 roothub ports from ACPI tables ... commit 83cd5fd014c0abfd3cf6d8e4189333d099630845 Merge: f3bbac32475b 13e1df09284d Author: Linus Torvalds Date: Sat Jan 21 10:56:37 2023 -0800 Merge tag 'kbuild-fixes-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Hide LDFLAGS_vmlinux from decompressor Makefiles to fix error messages when GNU Make 4.4 is used. - Fix 'make modules' build error when CONFIG_DEBUG_INFO_BTF_MODULES=y. - Fix warnings emitted by GNU Make 4.4 in scripts/kconfig/Makefile. - Support GNU Make 4.4 for scripts/jobserver-exec. - Show clearer error message when kernel/gen_kheaders.sh fails due to missing cpio. * tag 'kbuild-fixes-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kheaders: explicitly validate existence of cpio command scripts: support GNU make 4.4 in jobserver-exec kconfig: Update all declared targets scripts: rpm: make clear that mkspec script contains 4.13 feature init/Kconfig: fix LOCALVERSION_AUTO help text kbuild: fix 'make modules' error when CONFIG_DEBUG_INFO_BTF_MODULES=y kbuild: export top-level LDFLAGS_vmlinux only to scripts/Makefile.vmlinux init/version-timestamp.c: remove unneeded #include docs: kbuild: remove mention to dropped $(objtree) feature commit 2acd031347f645871959a799238a7caf6803aa18 Author: Carlos Song Date: Wed Jan 18 15:42:27 2023 +0800 iio: imu: fxos8700: fix MAGN sensor scale and unit +/-1200uT is a MAGN sensor full measurement range. Magnetometer scale is the magnetic sensitivity parameter. It is referenced as 0.1uT according to datasheet and magnetometer channel unit is Gauss in sysfs-bus-iio documentation. Gauss and uTesla unit conversion relationship as follows: 0.1uT = 0.001Gs. Set magnetometer scale and available magnetometer scale as fixed 0.001Gs. Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU") Signed-off-by: Carlos Song Link: https://lore.kernel.org/r/20230118074227.1665098-5-carlos.song@nxp.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/fxos8700_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ff5e2cd92ffda9a25ffa2cbdb3a0cf17650172a6 Author: Carlos Song Date: Wed Jan 18 15:42:26 2023 +0800 iio: imu: fxos8700: remove definition FXOS8700_CTRL_ODR_MIN FXOS8700_CTRL_ODR_MIN is not used but value is probably wrong. Remove it for a good readability. Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU") Signed-off-by: Carlos Song Link: https://lore.kernel.org/r/20230118074227.1665098-4-carlos.song@nxp.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/fxos8700_core.c | 1 - 1 file changed, 1 deletion(-) commit eb6d8f8705bc19141bac81d8161461f9e256948a Author: Carlos Song Date: Wed Jan 18 15:42:25 2023 +0800 iio: imu: fxos8700: fix failed initialization ODR mode assignment The absence of correct offset leads a failed initialization ODR mode assignment. Select MAX ODR mode as the initialization ODR mode by field mask and FIELD_PREP. Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU") Signed-off-by: Carlos Song Link: https://lore.kernel.org/r/20230118074227.1665098-3-carlos.song@nxp.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/fxos8700_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 78ad6864e9e012cdba7c353d044d21ffcfd5f34b Author: Carlos Song Date: Wed Jan 18 15:42:24 2023 +0800 iio: imu: fxos8700: fix incorrect ODR mode readback The absence of a correct offset leads an incorrect ODR mode readback after use a hexadecimal number to mark the value from FXOS8700_CTRL_REG1. Get ODR mode by field mask and FIELD_GET clearly and conveniently. And attach other additional fix for keeping the original code logic and a good readability. Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU") Signed-off-by: Carlos Song Link: https://lore.kernel.org/r/20230118074227.1665098-2-carlos.song@nxp.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/fxos8700_core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f3bbac32475b27f49be201f896d98d4009de1562 Author: Linus Torvalds Date: Tue Jan 17 20:27:23 2023 -0800 ext4: deal with legacy signed xattr name hash values We potentially have old hashes of the xattr names generated on systems with signed 'char' types. Now that everybody uses '-funsigned-char', those hashes will no longer match. This only happens if you use xattrs names that have the high bit set, which probably doesn't happen in practice, but the xfstest generic/454 shows it. Instead of adding a new "signed xattr hash filesystem" bit and having to deal with all the possible combinations, just calculate the hash both ways if the first one fails, and always generate new hashes with the proper unsigned char version. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202212291509.704a11c9-oliver.sang@intel.com Link: https://lore.kernel.org/all/CAHk-=whUNjwqZXa-MH9KMmc_CpQpoFKFjAB9ZKHuu=TbsouT4A@mail.gmail.com/ Exposed-by: 3bc753c06dd0 ("kbuild: treat char as always unsigned") Cc: Eric Biggers Cc: Andreas Dilger Cc: Theodore Ts'o , Cc: Jason Donenfeld Cc: Masahiro Yamada Signed-off-by: Linus Torvalds fs/ext4/xattr.c | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) commit ee3c5b644a0fdcfed27515a39fb2dd3a016704c1 Author: Kai-Heng Feng Date: Thu Jan 19 01:04:22 2023 +0800 iio: light: cm32181: Fix PM support on system with 2 I2C resources Commit c1e62062ff54 ("iio: light: cm32181: Handle CM3218 ACPI devices with 2 I2C resources") creates a second client for the actual I2C address, but the "struct device" passed to PM ops is the first I2C client that can't talk to the sensor. That means the I2C transfers in both suspend and resume routines can fail and blocking the whole suspend process. Instead of using the first client for I2C transfer, use the I2C client stored in the cm32181 private struct so the PM ops can get the correct I2C client to really talk to the sensor device. Fixes: 68c1b3dd5c48 ("iio: light: cm32181: Add PM support") BugLink: https://bugs.launchpad.net/bugs/1988346 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2152281 Tested-by: Wahaj Signed-off-by: Kai-Heng Feng Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230118170422.339619-1-kai.heng.feng@canonical.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/light/cm32181.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 739790605705ddcf18f21782b9c99ad7d53a8c11 Author: Greg Kroah-Hartman Date: Fri Jan 20 11:03:20 2023 +0100 prlimit: do_prlimit needs to have a speculation check do_prlimit() adds the user-controlled resource value to a pointer that will subsequently be dereferenced. In order to help prevent this codepath from being used as a spectre "gadget" a barrier needs to be added after checking the range. Reported-by: Jordy Zomer Tested-by: Jordy Zomer Suggested-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman kernel/sys.c | 2 ++ 1 file changed, 2 insertions(+) commit ef3691683d7bfd0a2acf48812e4ffe894f10bfa8 Author: Marc Zyngier Date: Thu Jan 19 11:07:59 2023 +0000 KVM: arm64: GICv4.1: Fix race with doorbell on VPE activation/deactivation To save the vgic LPI pending state with GICv4.1, the VPEs must all be unmapped from the ITSs so that the sGIC caches can be flushed. The opposite is done once the state is saved. This is all done by using the activate/deactivate irqdomain callbacks directly from the vgic code. Crutially, this is done without holding the irqdesc lock for the interrupts that represent the VPE. And these callbacks are changing the state of the irqdesc. What could possibly go wrong? If a doorbell fires while we are messing with the irqdesc state, it will acquire the lock and change the interrupt state concurrently. Since we don't hole the lock, curruption occurs in on the interrupt state. Oh well. While acquiring the lock would fix this (and this was Shanker's initial approach), this is still a layering violation we could do without. A better approach is actually to free the VPE interrupt, do what we have to do, and re-request it. It is more work, but this usually happens only once in the lifetime of the VM and we don't really care about this sort of overhead. Fixes: f66b7b151e00 ("KVM: arm64: GICv4.1: Try to save VLPI state in save_pending_tables") Reported-by: Shanker Donthineni Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230118022348.4137094-1-sdonthineni@nvidia.com arch/arm64/kvm/vgic/vgic-v3.c | 25 +++++++++++-------------- arch/arm64/kvm/vgic/vgic-v4.c | 8 ++++++-- arch/arm64/kvm/vgic/vgic.h | 1 + 3 files changed, 18 insertions(+), 16 deletions(-) commit c3b37c2d77a2c735857c55492ee81e88e855497d Author: Catalin Marinas Date: Thu Jan 19 17:09:02 2023 +0000 KVM: arm64: Pass the actual page address to mte_clear_page_tags() Commit d77e59a8fccd ("arm64: mte: Lock a page for MTE tag initialisation") added a call to mte_clear_page_tags() in case a prior mte_copy_tags_from_user() failed in order to avoid stale tags in the guest page (it should have really been a separate commit). Unfortunately, the argument passed to this function was the address of the struct page rather than the actual page address. Fix this function call. Fixes: d77e59a8fccd ("arm64: mte: Lock a page for MTE tag initialisation") Signed-off-by: Catalin Marinas Cc: Marc Zyngier Reviewed-by: Oliver Upton Reviewed-by: Anshuman Khandual Reviewed-by: Cornelia Huck Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230119170902.1574756-1-catalin.marinas@arm.com arch/arm64/kvm/guest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71ab9c3e2253619136c31c89dbb2c69305cc89b1 Author: Paolo Abeni Date: Thu Jan 19 19:55:45 2023 +0100 net: fix UaF in netns ops registration error path If net_assign_generic() fails, the current error path in ops_init() tries to clear the gen pointer slot. Anyway, in such error path, the gen pointer itself has not been modified yet, and the existing and accessed one is smaller than the accessed index, causing an out-of-bounds error: BUG: KASAN: slab-out-of-bounds in ops_init+0x2de/0x320 Write of size 8 at addr ffff888109124978 by task modprobe/1018 CPU: 2 PID: 1018 Comm: modprobe Not tainted 6.2.0-rc2.mptcp_ae5ac65fbed5+ #1641 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.1-2.fc37 04/01/2014 Call Trace: dump_stack_lvl+0x6a/0x9f print_address_description.constprop.0+0x86/0x2b5 print_report+0x11b/0x1fb kasan_report+0x87/0xc0 ops_init+0x2de/0x320 register_pernet_operations+0x2e4/0x750 register_pernet_subsys+0x24/0x40 tcf_register_action+0x9f/0x560 do_one_initcall+0xf9/0x570 do_init_module+0x190/0x650 load_module+0x1fa5/0x23c0 __do_sys_finit_module+0x10d/0x1b0 do_syscall_64+0x58/0x80 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f42518f778d Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d cb 56 2c 00 f7 d8 64 89 01 48 RSP: 002b:00007fff96869688 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 00005568ef7f7c90 RCX: 00007f42518f778d RDX: 0000000000000000 RSI: 00005568ef41d796 RDI: 0000000000000003 RBP: 00005568ef41d796 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000000 R13: 00005568ef7f7d30 R14: 0000000000040000 R15: 0000000000000000 This change addresses the issue by skipping the gen pointer de-reference in the mentioned error-path. Found by code inspection and verified with explicit error injection on a kasan-enabled kernel. Fixes: d266935ac43d ("net: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed") Signed-off-by: Paolo Abeni Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/cec4e0f3bb2c77ac03a6154a8508d3930beb5f0f.1674154348.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski net/core/net_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd941bd64f0776e4c51d8934f8e666cfbe14406a Author: Yoshihiro Shimoda Date: Fri Jan 20 09:19:59 2023 +0900 net: ethernet: renesas: rswitch: Fix ethernet-ports handling If one of ports in the ethernet-ports was disabled, this driver failed to probe all ports. So, fix it. Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20230120001959.1059850-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/renesas/rswitch.c | 22 +++++++++++++--------- drivers/net/ethernet/renesas/rswitch.h | 12 ++++++++++++ 2 files changed, 25 insertions(+), 9 deletions(-) commit 20e3028c39a5bf882e91e717da96d14f1acec40e Author: Haiyang Zhang Date: Thu Jan 19 12:59:10 2023 -0800 net: mana: Fix IRQ name - add PCI and queue number The PCI and queue number info is missing in IRQ names. Add PCI and queue number to IRQ names, to allow CPU affinity tuning scripts to work. Cc: stable@vger.kernel.org Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)") Signed-off-by: Haiyang Zhang Reviewed-by: Jesse Brandeburg Link: https://lore.kernel.org/r/1674161950-19708-1-git-send-email-haiyangz@microsoft.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/microsoft/mana/gdma_main.c | 9 ++++++++- include/net/mana/gdma.h | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) commit f0950402e8c76e7dcb08563f1b4e8000fbc62455 Author: Eric Dumazet Date: Thu Jan 19 11:01:50 2023 +0000 netlink: prevent potential spectre v1 gadgets Most netlink attributes are parsed and validated from __nla_validate_parse() or validate_nla() u16 type = nla_type(nla); if (type == 0 || type > maxtype) { /* error or continue */ } @type is then used as an array index and can be used as a Spectre v1 gadget. array_index_nospec() can be used to prevent leaking content of kernel memory to malicious users. This should take care of vast majority of netlink uses, but an audit is needed to take care of others where validation is not yet centralized in core netlink functions. Fixes: bfa83a9e03cf ("[NETLINK]: Type-safe netlink messages/attributes interface") Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20230119110150.2678537-1-edumazet@google.com Signed-off-by: Jakub Kicinski lib/nlattr.c | 3 +++ 1 file changed, 3 insertions(+) commit f883675bf6522b52cd75dc3de791680375961769 Merge: 4e31badaa188 4cb786180dfb Author: Linus Torvalds Date: Fri Jan 20 17:13:55 2023 -0800 Merge tag 'gpio-fixes-for-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix a potential race condition and always set GPIOs used as interrupt source to input in gpio-mxc - fix a GPIO ACPI-related issue with system suspend on Clevo NL5xRU * tag 'gpio-fixes-for-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xRU gpiolib: acpi: Allow ignoring wake capability on pins that aren't in _AEI gpio: mxc: Always set GPIOs used as interrupt source to INPUT mode gpio: mxc: Protect GPIO irqchip RMW with bgpio spinlock commit 4e31badaa188d0e2923f5082c041083c05bda3ff Merge: 8440ffcd68c6 a1b7c8457ecc Author: Linus Torvalds Date: Fri Jan 20 14:28:49 2023 -0800 Merge tag '6.2-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: - important fix for packet signature calculation error - three fixes to correct DFS deadlock, and DFS refresh problem - remove an unused DFS function, and duplicate tcon refresh code - DFS cache lookup fix - uninitialized rc fix * tag '6.2-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: remove unused function cifs: do not include page data when checking signature cifs: fix return of uninitialized rc in dfs_cache_update_tgthint() cifs: handle cache lookup errors different than -ENOENT cifs: remove duplicate code in __refresh_tcon() cifs: don't take exclusive lock for updating target hints cifs: avoid re-lookups in dfs_cache_find() cifs: fix potential deadlock in cache_refresh_path() commit 8440ffcd68c644e846ce6b23ff13b348d49b2abf Merge: 8974efaa3385 431d15314660 Author: Linus Torvalds Date: Fri Jan 20 14:22:56 2023 -0800 Merge tag 'pinctrl-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Compilation fix for Sunplus sp7021 - Add some missing headers after a cleanup to the Nomadik driver - Fix pull type and mux routes on Rockchip RK3568 * tag 'pinctrl-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: rockchip: fix mux route data for rk3568 pinctrl: rockchip: fix reading pull type on rk3568 pinctrl: nomadik: Add missing header(s) pinctrl: sp7021: fix unused function warning commit efaeb5f9f83965010c83c59665840541a54bbaf4 Merge: 1b929c02afd3 86d884f5287f Author: Stephen Boyd Date: Fri Jan 20 14:19:25 2023 -0800 Merge tag 'clk-microchip-fixes-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into clk-fixes Pull a Microchip clock fix from Claudiu Beznea: Only one fix for Polarfire SoCs at this time as follows: - replace devm_kzalloc() with devm_kasprintf(); this has been marked as fix to avoid having registered 2 clocks with the same or invalid name in case device tree node addresses will be longer such that clocks registered with name patern "ccc_pll" will exeed the allocated space. * tag 'clk-microchip-fixes-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: clk: microchip: mpfs-ccc: Use devm_kasprintf() for allocating formatted strings commit 8974efaa3385959e7ea1019a4b63acff28631e6d Merge: edc00350d205 0f097f08c9b3 Author: Linus Torvalds Date: Fri Jan 20 14:15:51 2023 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: - Several hfi1 patches fixing some long standing driver bugs - Overflow when working with sg lists with elements greater than 4G - An rxe regression with object numbering after the mrs reach their limit - A theoretical problem with the scatterlist merging code * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: lib/scatterlist: Fix to calculate the last_pg properly IB/hfi1: Remove user expected buffer invalidate race IB/hfi1: Immediately remove invalid memory from hardware IB/hfi1: Fix expected receive setup error exit issues IB/hfi1: Reserve user expected TIDs IB/hfi1: Reject a zero-length user expected buffer RDMA/core: Fix ib block iterator counter overflow RDMA/rxe: Prevent faulty rkey generation RDMA/rxe: Fix inaccurate constants in rxe_type_info commit 8caa03f10bf92cb8657408a6ece6a8a73f96ce13 Author: Jens Axboe Date: Fri Jan 20 15:08:21 2023 -0700 io_uring/poll: don't reissue in case of poll race on multishot request A previous commit fixed a poll race that can occur, but it's only applicable for multishot requests. For a multishot request, we can safely ignore a spurious wakeup, as we never leave the waitqueue to begin with. A blunt reissue of a multishot armed request can cause us to leak a buffer, if they are ring provided. While this seems like a bug in itself, it's not really defined behavior to reissue a multishot request directly. It's less efficient to do so as well, and not required to rearm anything like it is for singleshot poll requests. Cc: stable@vger.kernel.org Fixes: 6e5aedb9324a ("io_uring/poll: attempt request issue after racy poll wakeup") Reported-and-tested-by: Olivier Langlois Link: https://github.com/axboe/liburing/issues/778 Signed-off-by: Jens Axboe io_uring/poll.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5fde3c21cf33830eda7bfd006dc7f4bf07ec9fe6 Author: Marios Makassikis Date: Wed Jan 11 17:39:02 2023 +0100 ksmbd: do not sign response to session request for guest login If ksmbd.mountd is configured to assign unknown users to the guest account ("map to guest = bad user" in the config), ksmbd signs the response. This is wrong according to MS-SMB2 3.3.5.5.3: 12. If the SMB2_SESSION_FLAG_IS_GUEST bit is not set in the SessionFlags field, and Session.IsAnonymous is FALSE, the server MUST sign the final session setup response before sending it to the client, as follows: [...] This fixes libsmb2 based applications failing to establish a session ("Wrong signature in received"). Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Signed-off-by: Marios Makassikis Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/smb2pdu.c | 2 ++ 1 file changed, 2 insertions(+) commit 0d0d4680db22eda1eea785c47bbf66a9b33a8b16 Author: Namjae Jeon Date: Thu Dec 29 18:33:25 2022 +0900 ksmbd: add max connections parameter Add max connections parameter to limit number of maximum simultaneous connections. Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers") Cc: stable@vger.kernel.org Reviewed-by: Sergey Senozhatsky Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/ksmbd_netlink.h | 3 ++- fs/ksmbd/server.h | 1 + fs/ksmbd/transport_ipc.c | 3 +++ fs/ksmbd/transport_tcp.c | 17 ++++++++++++++++- 4 files changed, 22 insertions(+), 2 deletions(-) commit edc00350d205d2de8871b514c8f9b403d588e5d1 Merge: 9c38747f0cdb 955bc12299b1 Author: Linus Torvalds Date: Fri Jan 20 12:44:41 2023 -0800 Merge tag 'block-6.2-2023-01-20' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "Various little tweaks all over the place: - NVMe pull request via Christoph: - fix controller shutdown regression in nvme-apple (Janne Grunau) - fix a polling on timeout regression in nvme-pci (Keith Busch) - Fix a bug in the read request side request allocation caching (Pavel) - pktcdvd was brought back after we configured a NULL return on bio splits, make it consistent with the others (me) - BFQ refcount fix (Yu) - Block cgroup policy activation fix (Yu) - Fix for an md regression introduced in the 6.2 cycle (Adrian)" * tag 'block-6.2-2023-01-20' of git://git.kernel.dk/linux: nvme-pci: fix timeout request state check nvme-apple: only reset the controller when RTKit is running nvme-apple: reset controller during shutdown block: fix hctx checks for batch allocation block/rnbd-clt: fix wrong max ID in ida_alloc_max blk-cgroup: fix missing pd_online_fn() while activating policy pktcdvd: check for NULL returna fter calling bio_split_to_limits() block, bfq: switch 'bfqg->ref' to use atomic refcount apis md: fix incorrect declaration about claim_rdev in md_import_device commit 9c38747f0cdb20516de3d708f39720762786750a Merge: 26e57507a0f0 8579538c89e3 Author: Linus Torvalds Date: Fri Jan 20 12:39:45 2023 -0800 Merge tag 'io_uring-6.2-2023-01-20' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "Fixes for the MSG_RING opcode. Nothing really major: - Fix an overflow missing serialization around posting CQEs to the target ring (me) - Disable MSG_RING on a ring that isn't enabled yet. There's nothing really wrong with allowing it, but 1) it's somewhat odd as nobody can receive them yet, and 2) it means that using the right delivery mechanism might change. As nobody should be sending CQEs to a ring that isn't enabled yet, let's just disable it (Pavel) - Tweak to when we decide to post remotely or not for MSG_RING (Pavel)" * tag 'io_uring-6.2-2023-01-20' of git://git.kernel.dk/linux: io_uring/msg_ring: fix remote queue to disabled ring io_uring/msg_ring: fix flagging remote execution io_uring/msg_ring: fix missing lock on overflow for IOPOLL io_uring/msg_ring: move double lock/unlock helpers higher up commit 26e57507a0f04ae0e472afe4799784e2ed19e1b0 Merge: d9166cb31cb0 b7adbf9ada35 Author: Linus Torvalds Date: Fri Jan 20 11:59:01 2023 -0800 Merge tag 'for-6.2-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fix potential out-of-bounds access to leaf data when seeking in an inline file - fix potential crash in quota when rescan races with disable - reimplement super block signature scratching by marking page/folio dirty and syncing block device, allow removing write_one_page * tag 'for-6.2-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix race between quota rescan and disable leading to NULL pointer deref btrfs: fix invalid leaf access due to inline extent during lseek btrfs: stop using write_one_page in btrfs_scratch_superblock btrfs: factor out scratching of one regular super block commit d9166cb31cb08f027011e8b6159966810bb514e3 Merge: dc18175938e6 9fdaca2c1e15 Author: Linus Torvalds Date: Fri Jan 20 11:35:21 2023 -0800 Merge tag 'linux-kselftest-fixes-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fix from Shuah Khan: "Fix an error seen during unconfigured LLVM builds" * tag 'linux-kselftest-fixes-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kselftest: Fix error message for unconfigured LLVM builds commit dc18175938e65e979b866f23dc5b93e81d649cc4 Merge: fe563a2c554c 6c54b7bc8a31 Author: Linus Torvalds Date: Fri Jan 20 11:14:41 2023 -0800 Merge tag 'thermal-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fix from Rafael Wysocki: "Modify __thermal_cooling_device_register() to make it call put_device() after invoking device_register() and fix up a few error paths calling thermal_cooling_device_destroy_sysfs() unnecessarily (Viresh Kumar)" * tag 'thermal-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: core: call put_device() only after device_register() fails commit fe563a2c554c8cd07078eb1dacd3ea6148bd4681 Merge: 1670d7e69b04 3bdd346ebda3 Author: Linus Torvalds Date: Fri Jan 20 11:11:35 2023 -0800 Merge tag 'acpi-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These update the ACPICA entry in MAINTAINERS, add a backlight handling quirk and fix the ACPI PRM (platform runtime) mechanism support. Specifics: - Update the ACPICA development list address in MAINTAINERS to the new one that does not bounce (Rafael Wysocki) - Check whether EFI runtime is available when registering the ACPI PRM address space handler and when running it (Ard Biesheuvel) - Add backlight=native DMI quirk for Acer Aspire 4810T to the ACPI video driver (Hans de Goede)" * tag 'acpi-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PRM: Check whether EFI runtime is available ACPI: video: Add backlight=native DMI quirk for Acer Aspire 4810T MAINTAINERS: Update the ACPICA development list address commit 1670d7e69b044e900bb6a3d57a03c9202ea387ae Merge: 1ed46384f85b 8509419758f2 Author: Linus Torvalds Date: Fri Jan 20 11:04:59 2023 -0800 Merge tag 'mmc-v6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - sunxi-mmc: Fix clock refcount imbalance during unbind - sdhci-esdhc-imx: Fix some tuning settings * tag 'mmc-v6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sunxi-mmc: Fix clock refcount imbalance during unbind mmc: sdhci-esdhc-imx: correct the tuning start tap and step setting commit 1ed46384f85bcf05fc9b6605f9fd54e1f81a331d Merge: ff83fec8179e d2c865553adb Author: Linus Torvalds Date: Fri Jan 20 11:00:03 2023 -0800 Merge tag 'soc-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC DT and driver fixes from Arnd Bergmann: "Lots of dts fixes for Qualcomm Snapdragon and NXP i.MX platforms, including: - A regression fix for SDHCI controllers on Inforce 6540, and another SDHCI fix on SM8350 - Reenable cluster idle on sm8250 after the the code fix is upstream - multiple fixes for the QMP PHY binding, needing an incompatible dt change - The reserved memory map is updated on Xiaomi Mi 4C and Huawei Nexus 6P, to avoid instabilities caused by use of protected memory regions - Fix i.MX8MP DT for missing GPC Interrupt, power-domain typo and USB clock error - A couple of verdin-imx8mm DT fixes for audio playback support - Fix pca9547 i2c-mux node name for i.MX and Vybrid device trees - Fix an imx93-11x11-evk uSDHC pad setting problem that causes Micron eMMC CMD8 CRC error in HS400ES/HS400 mode The remaining ARM and RISC-V platforms only have very few smaller dts bugfixes this time: - A fix for the SiFive unmatched board's PCI memory space - A revert to fix a regression with GPIO on Marvell Armada - A fix for the UART address on Marvell AC5 - Missing chip-select phandles for stm32 boards - Selecting the correct clock for the sam9x60 memory controller - Amlogic based Odroid-HC4 needs a revert to restore USB functionality. And finally, there are some minor code fixes: - Build fixes for OMAP1, pxa, riscpc, raspberry pi firmware, and zynq firmware - memory controller driver fixes for an OMAP regression and older bugs on tegra, atmel and mvebu - reset controller fixes for ti-sci and uniphier platforms - ARM SCMI firmware fixes for a couple of rare corner cases - Qualcomm platform driver fixes for incorrect error handling and a backwards compatibility fix for the apr driver using older dtb - NXP i.MX SoC driver fixes for HDMI output, error handling in the imx8 soc-id and missing reference counting on older cpuid code" * tag 'soc-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (60 commits) firmware: zynqmp: fix declarations for gcc-13 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 ARM: dts: at91: sam9x60: fix the ddr clock for sam9x60 ARM: omap1: fix building gpio15xx ARM: omap1: fix !ARCH_OMAP1_ANY link failures firmware: raspberrypi: Fix type assignment arm64: dts: qcom: msm8992-libra: Fix the memory map arm64: dts: qcom: msm8992: Don't use sfpb mutex PM: AVS: qcom-cpr: Fix an error handling path in cpr_probe() arm64: dts: msm8994-angler: fix the memory map arm64: dts: marvell: AC5/AC5X: Fix address for UART1 ARM: footbridge: drop unnecessary inclusion Revert "ARM: dts: armada-39x: Fix compatible string for gpios" Revert "ARM: dts: armada-38x: Fix compatible string for gpios" ARM: pxa: enable PXA310/PXA320 for DT-only build riscv: dts: sifive: fu740: fix size of pcie 32bit memory soc: qcom: apr: Make qcom,protection-domain optional again ... commit 977c6ba624f24ae20cf0faee871257a39348d4a9 Author: Manivannan Sadhasivam Date: Wed Jan 18 20:38:50 2023 +0530 EDAC/qcom: Do not pass llcc_driv_data as edac_device_ctl_info's pvt_info The memory for llcc_driv_data is allocated by the LLCC driver. But when it is passed as the private driver info to the EDAC core, it will get freed during the qcom_edac driver release. So when the qcom_edac driver gets probed again, it will try to use the freed data leading to the use-after-free bug. Hence, do not pass llcc_driv_data as pvt_info but rather reference it using the platform_data pointer in the qcom_edac driver. Fixes: 27450653f1db ("drivers: edac: Add EDAC driver support for QCOM SoCs") Reported-by: Steev Klimaszewski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Borislav Petkov (AMD) Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride Cc: # 4.20 Link: https://lore.kernel.org/r/20230118150904.26913-4-manivannan.sadhasivam@linaro.org drivers/edac/qcom_edac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ff83fec8179e392be2f472f0a9ec3da8f6d529c6 Merge: 35929dae7233 3f30a6e67ce4 Author: Linus Torvalds Date: Fri Jan 20 10:43:07 2023 -0800 Merge tag 'drm-fixes-2023-01-20' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Just a pretty regular week for this stage of things, amdgpu and i915, along with some msm and misc others. fb-helper: - switcheroo fix msm: - kexec shutdown fix - fix potential double free i915: - Reject display plane with height == 0 - re-disable RC6p on Sandy Bridge - Fix hugepages' selftest - DG2 hw workarounds - switcheroo fix vc4: - fix a memory leak panfrost: - Kconfig fix amdgpu: - Fix display scaling - Fix RN/CZN power reporting on some firmware versions - Colorspace fixes - Fix resource freeing in error case in CS IOCTL - Fix warning on driver unload - GC11 fixes - DCN 3.1.4/5 S/G display workarounds" * tag 'drm-fixes-2023-01-20' of git://anongit.freedesktop.org/drm/drm: (24 commits) drm/amd/display: disable S/G display on DCN 3.1.4 drm/amd/display: disable S/G display on DCN 3.1.5 drm/amdgpu: allow multipipe policy on ASICs with one MEC drm/amdgpu: correct MEC number for gfx11 APUs drm/amd/display: fix issues with driver unload drm/amdgpu: fix amdgpu_job_free_resources v2 drm/amd/display: Fix COLOR_SPACE_YCBCR2020_TYPE matrix drm/amd/display: Calculate output_color_space after pixel encoding adjustment drm/amdgpu: fix cleaning up reserved VMID on release drm/amdgpu: Correct the power calcultion for Renior/Cezanne. drm/amd/display: Fix set scaling doesn's work drm/i915: Remove unused variable drm/i915/dg2: Introduce Wa_18019271663 drm/i915/dg2: Introduce Wa_18018764978 drm/fb-helper: Set framebuffer for vga-switcheroo clients drm/i915: Allow switching away via vga-switcheroo if uninitialized drm/i915/selftests: Unwind hugepages to drop wakeref on error drm/i915: re-disable RC6p on Sandy Bridge drm/panfrost: fix GENERIC_ATOMIC64 dependency drm/i915/display: Check source height is > 0 ... commit 35929dae72332e41cb11b56439999fd0295d5a64 Merge: aaaf919c2ef5 95e5fda3b5f9 Author: Linus Torvalds Date: Fri Jan 20 10:23:14 2023 -0800 Merge tag 'dmaengine-fix-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: - email address Update for Jie Hai - fix double increment of client_count in dma_chan_get() - idxd driver fixes: use after free, probe error handling and callback on wq disable - fix for qcom gpi driver GO tre - ptdma locking fix - tegra & imx-sdma mem leak fix * tag 'dmaengine-fix-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: ptdma: pt_core_execute_cmd() should use spinlock dmaengine: tegra: Fix memory leak in terminate_all() dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node() dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init dmaengine: Fix double increment of client_count in dma_chan_get() dmaengine: tegra210-adma: fix global intr clear Add exception protection processing for vd in axi_chan_handle_err function dmaengine: lgm: Move DT parsing after initialization MAINTAINERS: update Jie Hai's email address dmaengine: ti: k3-udma: Do conditional decrement of UDMA_CHAN_RT_PEER_BCNT_REG dmaengine: idxd: Do not call DMX TX callbacks during workqueue disable dmaengine: idxd: Prevent use after free on completion memory dmaengine: idxd: Let probe fail when workqueue cannot be enabled dmaengine: qcom: gpi: Set link_rx bit on GO TRE for rx operation commit aaaf919c2ef595ab9a8a6810f53a6db685dbba40 Merge: 5deaa98587ac bc30c15f2754 Author: Linus Torvalds Date: Fri Jan 20 10:10:52 2023 -0800 Merge tag 'phy-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy fixes from Vinod Koul: - binding fix for g12a phys - Kconfig operator precedence for TI driver - renesas: register setting - sunplus: null deref fix - rockchip-inno fix for clk_disable_unprepare() - MDM9607 init sequence revert due to regression * tag 'phy-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: phy-can-transceiver: Skip warning if no "max-bitrate" dt-bindings: phy: g12a-usb2-phy: fix compatible string documentation dt-bindings: phy: g12a-usb3-pcie-phy: fix compatible string documentation phy: freescale: imx8m-pcie: Add one missing error return phy: Revert "phy: qualcomm: usb28nm: Add MDM9607 init sequence" phy: rockchip-inno-usb2: Fix missing clk_disable_unprepare() in rockchip_usb2phy_power_on() phy: renesas: r8a779f0-eth-serdes: Fix register setting phy: usb: sunplus: Fix potential null-ptr-deref in sp_usb_phy_probe() phy: ti: fix Kconfig warning and operator precedence commit 5deaa98587aca2f0e7605388e89cfa1df4bad5cb Merge: 4a0c7a6831a0 45a919bbb21c Author: Linus Torvalds Date: Fri Jan 20 09:58:44 2023 -0800 Merge tag 'net-6.2-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from wireless, bluetooth, bpf and netfilter. Current release - regressions: - Revert "net: team: use IFF_NO_ADDRCONF flag to prevent ipv6 addrconf", fix nsna_ping mode of team - wifi: mt76: fix bugs in Rx queue handling and DMA mapping - eth: mlx5: - add missing mutex_unlock in error reporter - protect global IPsec ASO with a lock Current release - new code bugs: - rxrpc: fix wrong error return in rxrpc_connect_call() Previous releases - regressions: - bluetooth: hci_sync: fix use of HCI_OP_LE_READ_BUFFER_SIZE_V2 - wifi: - mac80211: fix crashes on Rx due to incorrect initialization of rx->link and rx->link_sta - mac80211: fix bugs in iTXQ conversion - Tx stalls, incorrect aggregation handling, crashes - brcmfmac: fix regression for Broadcom PCIe wifi devices - rndis_wlan: prevent buffer overflow in rndis_query_oid - netfilter: conntrack: handle tcp challenge acks during connection reuse - sched: avoid grafting on htb_destroy_class_offload when destroying - virtio-net: correctly enable callback during start_xmit, fix stalls - tcp: avoid the lookup process failing to get sk in ehash table - ipa: disable ipa interrupt during suspend - eth: stmmac: enable all safety features by default Previous releases - always broken: - bpf: - fix pointer-leak due to insufficient speculative store bypass mitigation (Spectre v4) - skip task with pid=1 in send_signal_common() to avoid a splat - fix BPF program ID information in BPF_AUDIT_UNLOAD as well as PERF_BPF_EVENT_PROG_UNLOAD events - fix potential deadlock in htab_lock_bucket from same bucket index but different map_locked index - bluetooth: - fix a buffer overflow in mgmt_mesh_add() - hci_qca: fix driver shutdown on closed serdev - ISO: fix possible circular locking dependency - CIS: hci_event: fix invalid wait context - wifi: brcmfmac: fixes for survey dump handling - mptcp: explicitly specify sock family at subflow creation time - netfilter: nft_payload: incorrect arithmetics when fetching VLAN header bits - tcp: fix rate_app_limited to default to 1 - l2tp: close all race conditions in l2tp_tunnel_register() - eth: mlx5: fixes for QoS config and eswitch configuration - eth: enetc: avoid deadlock in enetc_tx_onestep_tstamp() - eth: stmmac: fix invalid call to mdiobus_get_phy() Misc: - ethtool: add netlink attr in rss get reply only if the value is not empty" * tag 'net-6.2-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (88 commits) Revert "Merge branch 'octeontx2-af-CPT'" tcp: fix rate_app_limited to default to 1 bnxt: Do not read past the end of test names net: stmmac: enable all safety features by default octeontx2-af: add mbox to return CPT_AF_FLT_INT info octeontx2-af: update cpt lf alloc mailbox octeontx2-af: restore rxc conf after teardown sequence octeontx2-af: optimize cpt pf identification octeontx2-af: modify FLR sequence for CPT octeontx2-af: add mbox for CPT LF reset octeontx2-af: recover CPT engine when it gets fault net: dsa: microchip: ksz9477: port map correction in ALU table entry register selftests/net: toeplitz: fix race on tpacket_v3 block close net/ulp: use consistent error code when blocking ULP octeontx2-pf: Fix the use of GFP_KERNEL in atomic context on rt tcp: avoid the lookup process failing to get sk in ehash table Revert "net: team: use IFF_NO_ADDRCONF flag to prevent ipv6 addrconf" MAINTAINERS: add networking entries for Willem net: sched: gred: prevent races when adding offloads to stats l2tp: prevent lockdep issue in l2tp_tunnel_register() ... commit 29f316a1d7e0a570be9a47fa283ece53a67cebb7 Author: Takahiro Fujii Date: Fri Jan 20 03:30:02 2023 +0900 HID: elecom: add support for TrackBall 056E:011C Make function buttons on ELECOM M-HT1DRBK trackball mouse work. This model has two devices with different device IDs (010D and 011C). Both of them misreports the number of buttons as 5 in the report descriptor, even though they have 8 buttons. hid-elecom overwrites the report to fix them, but supports only on 010D and does not work on 011C. This patch fixes 011C in the similar way but with specialized position parameters. In fact, it is sufficient to rewrite only 17th byte (05 -> 08). However I followed the existing way. Signed-off-by: Takahiro Fujii Signed-off-by: Jiri Kosina drivers/hid/hid-elecom.c | 16 ++++++++++++++-- drivers/hid/hid-ids.h | 3 ++- drivers/hid/hid-quirks.c | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) commit 3bdd346ebda37f4cb12461d5e83a5b9d575afc63 Merge: 81aae5cbd36d 182da6f2b81a 8ba5fc4c154a Author: Rafael J. Wysocki Date: Fri Jan 20 18:42:16 2023 +0100 Merge branches 'acpi-prm' and 'acpi-video' Merge an ACPI PRM (platform runtime) support fix and an ACPI backlight quirk for 6.2-rc5: - Check whether EFI runtime is available when registering the ACPI PRM address space handler and when running it (Ard Biesheuvel). - Add backlight=native DMI quirk for Acer Aspire 4810T to the ACPI video driver (Hans de Goede). * acpi-prm: ACPI: PRM: Check whether EFI runtime is available * acpi-video: ACPI: video: Add backlight=native DMI quirk for Acer Aspire 4810T commit db105c37a4d69d684c1edf2915557463d0ba172c Author: Arnd Bergmann Date: Tue Jan 17 17:50:26 2023 +0100 kunit: Export kunit_running() Using kunit_fail_current_test() in a loadable module causes a link error like: ERROR: modpost: "kunit_running" [drivers/gpu/drm/vc4/vc4.ko] undefined! Export the symbol to allow using it from modules. Fixes: da43ff045c3f ("drm/vc4: tests: Fail the current test if we access a register") Signed-off-by: Arnd Bergmann Reviewed-by: David Gow Signed-off-by: Shuah Khan lib/kunit/test.c | 1 + 1 file changed, 1 insertion(+) commit e2b53ea5a7c1fb484277ad12cd075f502cf03b04 Author: Stefan Assmann Date: Tue Jan 10 09:00:18 2023 +0100 iavf: schedule watchdog immediately when changing primary MAC iavf_replace_primary_mac() utilizes queue_work() to schedule the watchdog task but that only ensures that the watchdog task is queued to run. To make sure the watchdog is executed asap use mod_delayed_work(). Without this patch it may take up to 2s until the watchdog task gets executed, which may cause long delays when setting the MAC address. Fixes: a3e839d539e0 ("iavf: Add usage of new virtchnl format to set default MAC") Signed-off-by: Stefan Assmann Reviewed-by: Michal Schmidt Tested-by: Michal Schmidt Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7598f4b40bd60e4a4280de645eb2893eea80b59d Author: Marcin Szycik Date: Tue Jan 3 17:42:27 2023 +0100 iavf: Move netdev_update_features() into watchdog task Remove netdev_update_features() from iavf_adminq_task(), as it can cause deadlocks due to needing rtnl_lock. Instead use the IAVF_FLAG_SETUP_NETDEV_FEATURES flag to indicate that netdev features need to be updated in the watchdog task. iavf_set_vlan_offload_features() and iavf_set_queue_vlan_tag_loc() can be called directly from iavf_virtchnl_completion(). Suggested-by: Phani Burra Signed-off-by: Marcin Szycik Reviewed-by: Alexander Lobakin Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 27 +++++++++---------------- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 8 ++++++++ 2 files changed, 17 insertions(+), 18 deletions(-) commit 4411a608f7c8df000cb1a9f7881982dd8e10839a Author: Michal Schmidt Date: Thu Dec 15 23:50:48 2022 +0100 iavf: fix temporary deadlock and failure to set MAC address We are seeing an issue where setting the MAC address on iavf fails with EAGAIN after the 2.5s timeout expires in iavf_set_mac(). There is the following deadlock scenario: iavf_set_mac(), holding rtnl_lock, waits on: iavf_watchdog_task (within iavf_wq) to send a message to the PF, and iavf_adminq_task (within iavf_wq) to receive a response from the PF. In this adapter state (>=__IAVF_DOWN), these tasks do not need to take rtnl_lock, but iavf_wq is a global single-threaded workqueue, so they may get stuck waiting for another adapter's iavf_watchdog_task to run iavf_init_config_adapter(), which does take rtnl_lock. The deadlock resolves itself by the timeout in iavf_set_mac(), which results in EAGAIN returned to userspace. Let's break the deadlock loop by changing iavf_wq into a per-adapter workqueue, so that one adapter's tasks are not blocked by another's. Fixes: 35a2443d0910 ("iavf: Add waiting for response from PF in set mac") Co-developed-by: Ivan Vecera Signed-off-by: Ivan Vecera Signed-off-by: Michal Schmidt Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 10 +-- drivers/net/ethernet/intel/iavf/iavf_main.c | 86 ++++++++++++------------- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +- 4 files changed, 49 insertions(+), 51 deletions(-) commit 8579538c89e33ce78be2feb41e07489c8cbf8f31 Author: Pavel Begunkov Date: Fri Jan 20 16:38:06 2023 +0000 io_uring/msg_ring: fix remote queue to disabled ring IORING_SETUP_R_DISABLED rings don't have the submitter task set, so it's not always safe to use ->submitter_task. Disallow posting msg_ring messaged to disabled rings. Also add task NULL check for loosy sync around testing for IORING_SETUP_R_DISABLED. Cc: stable@vger.kernel.org Fixes: 6d043ee1164ca ("io_uring: do msg_ring in target task via tw") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe io_uring/io_uring.c | 4 ++-- io_uring/msg_ring.c | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) commit 56d8e3180c065c9b78ed77afcd0cf99677a4e22f Author: Pavel Begunkov Date: Fri Jan 20 16:38:05 2023 +0000 io_uring/msg_ring: fix flagging remote execution There is a couple of problems with queueing a tw in io_msg_ring_data() for remote execution. First, once we queue it the target ring can go away and so setting IORING_SQ_TASKRUN there is not safe. Secondly, the userspace might not expect IORING_SQ_TASKRUN. Extract a helper and uniformly use TWA_SIGNAL without TWA_SIGNAL_NO_IPI tricks for now, just as it was done in the original patch. Cc: stable@vger.kernel.org Fixes: 6d043ee1164ca ("io_uring: do msg_ring in target task via tw") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe io_uring/msg_ring.c | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) commit 45a919bbb21c642e0c34dac483d1e003560159dc Author: Jakub Kicinski Date: Fri Jan 20 08:38:16 2023 -0800 Revert "Merge branch 'octeontx2-af-CPT'" This reverts commit b4fbf0b27fa9dd2594b3371532341bd4636a00f9, reversing changes made to 6c977c5c2e4c5d8ad1b604724cc344e38f96fe9b. This seems like net-next material. Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 27 -- drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 8 - drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 18 -- .../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 309 ++++++--------------- .../net/ethernet/marvell/octeontx2/af/rvu_reg.h | 2 - 5 files changed, 87 insertions(+), 277 deletions(-) commit 74bc3a5acc82f020d2e126f56c535d02d1e74e37 Author: Jiri Olsa Date: Fri Jan 20 13:21:48 2023 +0100 bpf: Add missing btf_put to register_btf_id_dtor_kfuncs We take the BTF reference before we register dtors and we need to put it back when it's done. We probably won't se a problem with kernel BTF, but module BTF would stay loaded (because of the extra ref) even when its module is removed. Cc: Kumar Kartikeya Dwivedi Fixes: 5ce937d613a4 ("bpf: Populate pairs of btf_id and destructor kfunc in btf") Acked-by: Kumar Kartikeya Dwivedi Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20230120122148.1522359-1-jolsa@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/btf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51cdc8bc120ef6e42f6fb758341f5d91bc955952 Author: Yi Liu Date: Fri Jan 20 07:05:28 2023 -0800 kvm/vfio: Fix potential deadlock on vfio group_lock Currently it is possible that the final put of a KVM reference comes from vfio during its device close operation. This occurs while the vfio group lock is held; however, if the vfio device is still in the kvm device list, then the following call chain could result in a deadlock: VFIO holds group->group_lock/group_rwsem -> kvm_put_kvm -> kvm_destroy_vm -> kvm_destroy_devices -> kvm_vfio_destroy -> kvm_vfio_file_set_kvm -> vfio_file_set_kvm -> try to hold group->group_lock/group_rwsem The key function is the kvm_destroy_devices() which triggers destroy cb of kvm_device_ops. It calls back to vfio and try to hold group_lock. So if this path doesn't call back to vfio, this dead lock would be fixed. Actually, there is a way for it. KVM provides another point to free the kvm-vfio device which is the point when the device file descriptor is closed. This can be achieved by providing the release cb instead of the destroy cb. Also rename kvm_vfio_destroy() to be kvm_vfio_release(). /* * Destroy is responsible for freeing dev. * * Destroy may be called before or after destructors are called * on emulated I/O regions, depending on whether a reference is * held by a vcpu or other kvm component that gets destroyed * after the emulated I/O. */ void (*destroy)(struct kvm_device *dev); /* * Release is an alternative method to free the device. It is * called when the device file descriptor is closed. Once * release is called, the destroy method will not be called * anymore as the device is removed from the device list of * the VM. kvm->lock is held. */ void (*release)(struct kvm_device *dev); Fixes: 421cfe6596f6 ("vfio: remove VFIO_GROUP_NOTIFY_SET_KVM") Reported-by: Alex Williamson Suggested-by: Kevin Tian Reviewed-by: Jason Gunthorpe Signed-off-by: Yi Liu Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20230114000351.115444-1-mjrosato@linux.ibm.com Link: https://lore.kernel.org/r/20230120150528.471752-1-yi.l.liu@intel.com [aw: update comment as well, s/destroy/release/] Signed-off-by: Alex Williamson virt/kvm/vfio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 955bc12299b17aa60325e1748336e1fd1e664ed0 Merge: 774656479397 1c5842085851 Author: Jens Axboe Date: Fri Jan 20 08:08:29 2023 -0700 Merge tag 'nvme-6.2-2023-01-20' of git://git.infradead.org/nvme into block-6.2 Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.2 - fix controller shutdown regression in nvme-apple (Janne Grunau) - fix a polling on timeout regression in nvme-pci (Keith Busch)" * tag 'nvme-6.2-2023-01-20' of git://git.infradead.org/nvme: nvme-pci: fix timeout request state check nvme-apple: only reset the controller when RTKit is running nvme-apple: reset controller during shutdown commit 4bb3d82a1820c1b609ede8eb2332f3cb038c5840 Author: Krzysztof Kozlowski Date: Fri Jan 20 14:14:47 2023 +0100 regulator: dt-bindings: samsung,s2mps14: add lost samsung,ext-control-gpios The samsung,ext-control-gpios property was lost during conversion to DT schema: exynos3250-artik5-eval.dtb: pmic@66: regulators:LDO11: Unevaluated properties are not allowed ('samsung,ext-control-gpios' was unexpected) Fixes: ea98b9eba05c ("regulator: dt-bindings: samsung,s2m: convert to dtschema") Cc: Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230120131447.289702-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../bindings/regulator/samsung,s2mps14.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit fb4293600cc651cfe4d48ec489f1d175adf6e2f8 Author: Peter Ujfalusi Date: Fri Jan 20 12:21:25 2023 +0200 ASoC: SOF: sof-audio: prepare_widgets: Check swidget for NULL on sink failure If the swidget is NULL we skip the preparing of the widget and jump to handle the sink path of the widget. If the prepare fails in this case we would undo the prepare but the swidget is NULL (we skipped the prepare for the widget). To avoid NULL pointer dereference in this case we must check swidget against NULL pointer once again. Fixes: 0ad84b11f2f8 ("ASoC: SOF: sof-audio: skip prepare/unprepare if swidget is NULL") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Peter Ujfalusi Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230120102125.30653-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-audio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2855e16f47ae0ad881e724d4a619fdeebcff09fb Merge: 54650eb17132 b3c00316a2f8 Author: Mark Brown Date: Fri Jan 20 14:09:28 2023 +0000 ASoC: Intel: set dpcm_capture for amps Merge series from Kai Vehmanen : This series addresses problems with echo reference devices reported in: "[BUG][ADL-N] Kernel panic when echo reference stream is opened" https://github.com/thesofproject/linux/issues/4083 commit 14ff7460bb58662d86aa50298943cc7d25532e28 Author: Greg Kroah-Hartman Date: Fri Jan 20 14:53:30 2023 +0100 USB: misc: iowarrior: fix up header size for USB_DEVICE_ID_CODEMERCS_IOW100 The USB_DEVICE_ID_CODEMERCS_IOW100 header size was incorrect, it should be 12, not 13. Cc: stable Fixes: 17a82716587e ("USB: iowarrior: fix up report size handling for some devices") Reported-by: Christoph Jung Link: https://lore.kernel.org/r/20230120135330.3842518-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/iowarrior.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d3d01ae15d2f37ed0325c99ab47ef0ae5d05f3c Author: Alexander Stein Date: Fri Jan 20 13:27:14 2023 +0100 usb: host: ehci-fsl: Fix module alias Commit ca07e1c1e4a6 ("drivers:usb:fsl:Make fsl ehci drv an independent driver module") changed DRV_NAME which was used for MODULE_ALIAS as well. Starting from this the module alias didn't match the platform device name created in fsl-mph-dr-of.c Change DRV_NAME to match the driver name for host mode in fsl-mph-dr-of. This is needed for module autoloading on ls1021a. Fixes: ca07e1c1e4a6 ("drivers:usb:fsl:Make fsl ehci drv an independent driver module") Cc: stable Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20230120122714.3848784-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-fsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 300b655db1b5152d6101bcb6801d50899b20c2d6 Author: David Morley Date: Thu Jan 19 19:00:28 2023 +0000 tcp: fix rate_app_limited to default to 1 The initial default value of 0 for tp->rate_app_limited was incorrect, since a flow is indeed application-limited until it first sends data. Fixing the default to be 1 is generally correct but also specifically will help user-space applications avoid using the initial tcpi_delivery_rate value of 0 that persists until the connection has some non-zero bandwidth sample. Fixes: eb8329e0a04d ("tcp: export data delivery rate") Suggested-by: Yuchung Cheng Signed-off-by: David Morley Signed-off-by: Neal Cardwell Tested-by: David Morley Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 ++ 1 file changed, 2 insertions(+) commit d3e599c090fc6977331150c5f0a69ab8ce87da21 Author: Kees Cook Date: Wed Jan 18 12:35:01 2023 -0800 bnxt: Do not read past the end of test names Test names were being concatenated based on a offset beyond the end of the first name, which tripped the buffer overflow detection logic: detected buffer overflow in strnlen [...] Call Trace: bnxt_ethtool_init.cold+0x18/0x18 Refactor struct hwrm_selftest_qlist_output to use an actual array, and adjust the concatenation to use snprintf() rather than a series of strncat() calls. Reported-by: Niklas Cassel Link: https://lore.kernel.org/lkml/Y8F%2F1w1AZTvLglFX@x1-carbon/ Tested-by: Niklas Cassel Fixes: eb51365846bc ("bnxt_en: Add basic ethtool -t selftest support.") Cc: Michael Chan Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Michael Chan Reviewed-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 13 ++++--------- drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 9 +-------- 2 files changed, 5 insertions(+), 17 deletions(-) commit 14ee78d5932afeb710c8305196a676a715bfdea8 Author: Matthew Howell Date: Thu Jan 19 14:40:29 2023 -0500 serial: exar: Add support for Sealevel 7xxxC serial cards Add support for Sealevel 7xxxC serial cards. This patch: * Adds IDs to recognize 7xxxC cards from Sealevel Systems. * Updates exar_pci_probe() to set nr_ports to last two bytes of primary dev ID for these cards. Signed-off-by: Matthew Howell Cc: stable Link: https://lore.kernel.org/r/alpine.DEB.2.21.2301191440010.22558@tstest-VirtualBox Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 3daed6345d5880464f46adab871d208e1baa2f3a Author: Vishnu Dasa Date: Tue Nov 29 23:05:11 2022 -0800 VMCI: Use threaded irqs instead of tasklets The vmci_dispatch_dgs() tasklet function calls vmci_read_data() which uses wait_event() resulting in invalid sleep in an atomic context (and therefore potentially in a deadlock). Use threaded irqs to fix this issue and completely remove usage of tasklets. [ 20.264639] BUG: sleeping function called from invalid context at drivers/misc/vmw_vmci/vmci_guest.c:145 [ 20.264643] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 762, name: vmtoolsd [ 20.264645] preempt_count: 101, expected: 0 [ 20.264646] RCU nest depth: 0, expected: 0 [ 20.264647] 1 lock held by vmtoolsd/762: [ 20.264648] #0: ffff0000874ae440 (sk_lock-AF_VSOCK){+.+.}-{0:0}, at: vsock_connect+0x60/0x330 [vsock] [ 20.264658] Preemption disabled at: [ 20.264659] [] vmci_send_datagram+0x44/0xa0 [vmw_vmci] [ 20.264665] CPU: 0 PID: 762 Comm: vmtoolsd Not tainted 5.19.0-0.rc8.20220727git39c3c396f813.60.fc37.aarch64 #1 [ 20.264667] Hardware name: VMware, Inc. VBSA/VBSA, BIOS VEFI 12/31/2020 [ 20.264668] Call trace: [ 20.264669] dump_backtrace+0xc4/0x130 [ 20.264672] show_stack+0x24/0x80 [ 20.264673] dump_stack_lvl+0x88/0xb4 [ 20.264676] dump_stack+0x18/0x34 [ 20.264677] __might_resched+0x1a0/0x280 [ 20.264679] __might_sleep+0x58/0x90 [ 20.264681] vmci_read_data+0x74/0x120 [vmw_vmci] [ 20.264683] vmci_dispatch_dgs+0x64/0x204 [vmw_vmci] [ 20.264686] tasklet_action_common.constprop.0+0x13c/0x150 [ 20.264688] tasklet_action+0x40/0x50 [ 20.264689] __do_softirq+0x23c/0x6b4 [ 20.264690] __irq_exit_rcu+0x104/0x214 [ 20.264691] irq_exit_rcu+0x1c/0x50 [ 20.264693] el1_interrupt+0x38/0x6c [ 20.264695] el1h_64_irq_handler+0x18/0x24 [ 20.264696] el1h_64_irq+0x68/0x6c [ 20.264697] preempt_count_sub+0xa4/0xe0 [ 20.264698] _raw_spin_unlock_irqrestore+0x64/0xb0 [ 20.264701] vmci_send_datagram+0x7c/0xa0 [vmw_vmci] [ 20.264703] vmci_datagram_dispatch+0x84/0x100 [vmw_vmci] [ 20.264706] vmci_datagram_send+0x2c/0x40 [vmw_vmci] [ 20.264709] vmci_transport_send_control_pkt+0xb8/0x120 [vmw_vsock_vmci_transport] [ 20.264711] vmci_transport_connect+0x40/0x7c [vmw_vsock_vmci_transport] [ 20.264713] vsock_connect+0x278/0x330 [vsock] [ 20.264715] __sys_connect_file+0x8c/0xc0 [ 20.264718] __sys_connect+0x84/0xb4 [ 20.264720] __arm64_sys_connect+0x2c/0x3c [ 20.264721] invoke_syscall+0x78/0x100 [ 20.264723] el0_svc_common.constprop.0+0x68/0x124 [ 20.264724] do_el0_svc+0x38/0x4c [ 20.264725] el0_svc+0x60/0x180 [ 20.264726] el0t_64_sync_handler+0x11c/0x150 [ 20.264728] el0t_64_sync+0x190/0x194 Signed-off-by: Vishnu Dasa Suggested-by: Zack Rusin Reported-by: Nadav Amit Reported-by: Nathan Chancellor Tested-by: Nathan Chancellor Fixes: 463713eb6164 ("VMCI: dma dg: add support for DMA datagrams receive") Cc: # v5.18+ Cc: VMware PV-Drivers Reviewers Cc: Greg Kroah-Hartman Cc: Bryan Tan Reviewed-by: Bryan Tan Reviewed-by: Zack Rusin Link: https://lore.kernel.org/r/20221130070511.46558-1-vdasa@vmware.com Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_vmci/vmci_guest.c | 49 +++++++++++++++----------------------- 1 file changed, 19 insertions(+), 30 deletions(-) commit aaca766c77fcf5aabda846d3372a1d40b0d4735d Author: Elliot Berman Date: Thu Jan 12 10:23:12 2023 -0800 misc: fastrpc: Pass bitfield into qcom_scm_assign_mem The srcvm parameter of qcom_scm_assign_mem is a pointer to a bitfield of VMIDs. The bitfield is updated with which VMIDs have permissions after the qcom_scm_assign_mem call. This makes it simpler for clients to make qcom_scm_assign_mem calls later, they always pass in same srcvm bitfield and do not need to closely track whether memory was originally shared. When restoring permissions to HLOS, fastrpc is incorrectly using the first VMID directly -- neither the BIT nor the other possible VMIDs the memory was already assigned to. We already have a field intended for this purpose: "perms" in the struct fastrpc_channel_ctx, but it was never used. Start using the perms field. Cc: Abel Vesa Cc: Vamsi Krishna Gattupalli Cc: Srinivas Kandagatla Fixes: e90d91190619 ("misc: fastrpc: Add support to secure memory map") Fixes: 0871561055e6 ("misc: fastrpc: Add support for audiopd") Fixes: 532ad70c6d44 ("misc: fastrpc: Add mmap request assigning for static PD pool") Tested-by: Srinivas Kandagatla Signed-off-by: Elliot Berman drivers/misc/fastrpc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) Link: https://lore.kernel.org/r/20230112182313.521467-1-quic_eberman@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit a769b05eeed7accc4019a1ed9799dd72067f1ce8 Author: Khazhismel Kumykov Date: Tue Jan 17 17:02:12 2023 -0800 gsmi: fix null-deref in gsmi_get_variable We can get EFI variables without fetching the attribute, so we must allow for that in gsmi. commit 859748255b43 ("efi: pstore: Omit efivars caching EFI varstore access layer") added a new get_variable call with attr=NULL, which triggers panic in gsmi. Fixes: 74c5b31c6618 ("driver: Google EFI SMI") Cc: stable Signed-off-by: Khazhismel Kumykov Link: https://lore.kernel.org/r/20230118010212.1268474-1-khazhy@google.com Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/gsmi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 96b328d119eca7563c1edcc4e1039a62e6370ecb Author: Ola Jeppsson Date: Thu Nov 24 17:49:41 2022 +0000 misc: fastrpc: Fix use-after-free race condition for maps It is possible that in between calling fastrpc_map_get() until map->fl->lock is taken in fastrpc_free_map(), another thread can call fastrpc_map_lookup() and get a reference to a map that is about to be deleted. Rewrite fastrpc_map_get() to only increase the reference count of a map if it's non-zero. Propagate this to callers so they can know if a map is about to be deleted. Fixes this warning: refcount_t: addition on 0; use-after-free. WARNING: CPU: 5 PID: 10100 at lib/refcount.c:25 refcount_warn_saturate ... Call trace: refcount_warn_saturate [fastrpc_map_get inlined] [fastrpc_map_lookup inlined] fastrpc_map_create fastrpc_internal_invoke fastrpc_device_ioctl __arm64_sys_ioctl invoke_syscall Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method") Cc: stable Signed-off-by: Ola Jeppsson Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221124174941.418450-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5bb96c8f9268e2fdb0e5321cbc358ee5941efc15 Author: Abel Vesa Date: Thu Nov 24 17:49:40 2022 +0000 misc: fastrpc: Don't remove map on creater_process and device_release Do not remove the map from the list on error path in fastrpc_init_create_process, instead call fastrpc_map_put, to avoid use-after-free. Do not remove it on fastrpc_device_release either, call fastrpc_map_put instead. The fastrpc_free_map is the only proper place to remove the map. This is called only after the reference count is 0. Fixes: b49f6d83e290 ("misc: fastrpc: Fix a possible double free") Cc: stable Co-developed-by: Ola Jeppsson Signed-off-by: Ola Jeppsson Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221124174941.418450-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 9446fa1683a7e3937d9970248ced427c1983a1c5 Author: Abel Vesa Date: Thu Nov 24 17:49:39 2022 +0000 misc: fastrpc: Fix use-after-free and race in fastrpc_map_find Currently, there is a race window between the point when the mutex is unlocked in fastrpc_map_lookup and the reference count increasing (fastrpc_map_get) in fastrpc_map_find, which can also lead to use-after-free. So lets merge fastrpc_map_find into fastrpc_map_lookup which allows us to both protect the maps list by also taking the &fl->lock spinlock and the reference count, since the spinlock will be released only after. Add take_ref argument to make this suitable for all callers. Fixes: 8f6c1d8c4f0c ("misc: fastrpc: Add fdlist implementation") Cc: stable Co-developed-by: Ola Jeppsson Signed-off-by: Ola Jeppsson Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221124174941.418450-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 5023adc364df004bd8e57afe89a4bd8019485c3d Author: Dan Carpenter Date: Tue Nov 29 12:45:16 2022 +0300 misc: fastrpc: fix error code in fastrpc_req_mmap() The "err" variable shadows an earlier global variable so this code returns success instead of a negative error code. Fixes: 532ad70c6d44 ("misc: fastrpc: Add mmap request assigning for static PD pool") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Y4XUrMETCl1O6t0A@kili Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 1 - 1 file changed, 1 deletion(-) commit 0c4d68261717f89fa8c4f98a6967c3832fcb3ad0 Author: Alexander Usyskin Date: Tue Dec 13 00:02:47 2022 +0200 mei: me: add meteor lake point M DID Add Meteor Lake Point M device id. Cc: Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20221212220247.286019-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-me-regs.h | 2 ++ drivers/misc/mei/pci-me.c | 2 ++ 2 files changed, 4 insertions(+) commit a43866856125c3c432e2fbb6cc63cee1539ec4a7 Author: Alexander Usyskin Date: Tue Dec 13 00:02:46 2022 +0200 mei: bus: fix unlink on bus in error path Unconditional call to mei_cl_unlink in mei_cl_bus_dev_release leads to call of the mei_cl_unlink without corresponding mei_cl_link. This leads to miscalculation of open_handle_count (decrease without increase). Call unlink in mei_cldev_enable fail path and remove blanket unlink from mei_cl_bus_dev_release. Fixes: 34f1166afd67 ("mei: bus: need to unlink client before freeing") Cc: Signed-off-by: Alexander Usyskin Reviewed-by: Tomas Winkler Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20221212220247.286019-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 54650eb17132a099100264caf59bb2210f65085a Author: Kuninori Morimoto Date: Fri Jan 20 06:32:52 2023 +0000 ASoC: hdmi-codec: zero clear HDMI pdata commit f77a066f4ed307d ("ASoC: hdmi-codec: Allow playback and capture to be disabled") added new no_i2s_playback/capture. We need to zero clear HDMI pdata first, otherwise unexpected flag will be added. Fixes: f77a066f4ed3 ("ASoC: hdmi-codec: Allow playback and capture to be disabled") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k01hlnqj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 1 + 1 file changed, 1 insertion(+) commit ea57680af47587397f5005d7758022441ed66d54 Author: Dan Carpenter Date: Thu Jan 19 17:58:54 2023 +0300 ASoC: SOF: ipc4-mtrace: prevent underflow in sof_ipc4_priority_mask_dfs_write() The "id" comes from the user. Change the type to unsigned to prevent an array underflow. Fixes: f4ea22f7aa75 ("ASoC: SOF: ipc4: Add support for mtrace log extraction") Signed-off-by: Dan Carpenter Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/Y8laruWOEwOC/dx9@kili Signed-off-by: Mark Brown sound/soc/sof/ipc4-mtrace.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 732065df5deb5d565f66780a97990e77fc9bc49f Merge: 36225a7c72e9 dd42ec8ea5b9 Author: Greg Kroah-Hartman Date: Fri Jan 20 11:40:04 2023 +0100 Merge tag 'icc-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-linus Georgi writes: interconnect fixes for v6.2-rc This contains fixes for a rare boot hang issue that has been reported on the db820c dragonboard. - dt-bindings: interconnect: Add UFS clocks to MSM8996 A2NoC - interconnect: qcom: msm8996: Provide UFS clocks to A2NoC - interconnect: qcom: msm8996: Fix regmap max_register values - interconnect: qcom: rpm: Use _optional func for provider clocks Signed-off-by: Georgi Djakov * tag 'icc-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: rpm: Use _optional func for provider clocks interconnect: qcom: msm8996: Fix regmap max_register values interconnect: qcom: msm8996: Provide UFS clocks to A2NoC dt-bindings: interconnect: Add UFS clocks to MSM8996 A2NoC commit 2cbafffbf69addd7509072f4be5917f81d238cf6 Author: Greg Kroah-Hartman Date: Fri Jan 20 11:16:59 2023 +0100 Revert "serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler" This reverts commit f24771b62a83239f0dce816bddf0f6807f436235 as it is reported to break the build. Reported-by: kernel test robot Link: https://lore.kernel.org/r/202301200130.ttBiTzfO-lkp@intel.com Fixes: f24771b62a83 ("serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler") Cc: Sebastian Andrzej Siewior Cc: Valentin Caron # V3 Cc: Marek Vasut Cc: Johan Hovold Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit d2c865553adb7ad9abf3894cbb209cf1bc95484a Author: Arnd Bergmann Date: Tue Jan 17 17:41:14 2023 +0100 firmware: zynqmp: fix declarations for gcc-13 gcc-13.0.1 reports a type mismatch for two functions: drivers/firmware/xilinx/zynqmp.c:1228:5: error: conflicting types for 'zynqmp_pm_set_rpu_mode' due to enum/integer mismatch; have 'int(u32, enum rpu_oper_mode)' {aka 'int(unsigned int, enum rpu_oper_mode)'} [-Werror=enum-int-mismatch] 1228 | int zynqmp_pm_set_rpu_mode(u32 node_id, enum rpu_oper_mode rpu_mode) | ^~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/firmware/xilinx/zynqmp.c:25: include/linux/firmware/xlnx-zynqmp.h:552:5: note: previous declaration of 'zynqmp_pm_set_rpu_mode' with type 'int(u32, u32)' {aka 'int(unsigned int, unsigned int)'} 552 | int zynqmp_pm_set_rpu_mode(u32 node_id, u32 arg1); | ^~~~~~~~~~~~~~~~~~~~~~ drivers/firmware/xilinx/zynqmp.c:1246:5: error: conflicting types for 'zynqmp_pm_set_tcm_config' due to enum/integer mismatch; have 'int(u32, enum rpu_tcm_comb)' {aka 'int(unsigned int, enum rpu_tcm_comb)'} [-Werror=enum-int-mismatch] 1246 | int zynqmp_pm_set_tcm_config(u32 node_id, enum rpu_tcm_comb tcm_mode) | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/firmware/xlnx-zynqmp.h:553:5: note: previous declaration of 'zynqmp_pm_set_tcm_config' with type 'int(u32, u32)' {aka 'int(unsigned int, unsigned int)'} 553 | int zynqmp_pm_set_tcm_config(u32 node_id, u32 arg1); | ^~~~~~~~~~~~~~~~~~~~~~~~ Change the declaration in the header to match the function definition. Acked-by: Michal Simek Signed-off-by: Arnd Bergmann include/linux/firmware/xlnx-zynqmp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit aca5d87d934384f81cc948e34c01052367d67788 Merge: b7b0742883e0 9bfa2544dbd1 Author: Arnd Bergmann Date: Fri Jan 20 10:40:51 2023 +0100 Merge tag 'at91-fixes-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes AT91 fixes for 6.2: It contains: - fix the clock provided via DT for DDR controller on SAM9X60 * tag 'at91-fixes-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sam9x60: fix the ddr clock for sam9x60 Link: https://lore.kernel.org/r/20230119112101.42045-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit b7b0742883e0839e6d81f0538735bf9a9a1e7d6f Merge: e2f7096f1e76 175281f80695 Author: Arnd Bergmann Date: Fri Jan 20 10:39:42 2023 +0100 Merge tag 'stm32-dt-for-v6.2-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/fixes STM32 DT fixes for v6.2, round 1 Highlights: ----------- -STM32MP15: - Fix missing chip select phandle in several stm32mp15x based boards. * tag 'stm32-dt-for-v6.2-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: 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/3fe26bf9-297b-5c78-682b-37fa6d8b6190@foss.st.com Signed-off-by: Arnd Bergmann commit fdfc76a116b5e9d3e98e6c96fe83b42d011d21d4 Author: Andrew Halaney Date: Wed Jan 18 10:56:38 2023 -0600 net: stmmac: enable all safety features by default In the original implementation of dwmac5 commit 8bf993a5877e ("net: stmmac: Add support for DWMAC5 and implement Safety Features") all safety features were enabled by default. Later it seems some implementations didn't have support for all the features, so in commit 5ac712dcdfef ("net: stmmac: enable platform specific safety features") the safety_feat_cfg structure was added to the callback and defined for some platforms to selectively enable these safety features. The problem is that only certain platforms were given that software support. If the automotive safety package bit is set in the hardware features register the safety feature callback is called for the platform, and for platforms that didn't get a safety_feat_cfg defined this results in the following NULL pointer dereference: [ 7.933303] Call trace: [ 7.935812] dwmac5_safety_feat_config+0x20/0x170 [stmmac] [ 7.941455] __stmmac_open+0x16c/0x474 [stmmac] [ 7.946117] stmmac_open+0x38/0x70 [stmmac] [ 7.950414] __dev_open+0x100/0x1dc [ 7.954006] __dev_change_flags+0x18c/0x204 [ 7.958297] dev_change_flags+0x24/0x6c [ 7.962237] do_setlink+0x2b8/0xfa4 [ 7.965827] __rtnl_newlink+0x4ec/0x840 [ 7.969766] rtnl_newlink+0x50/0x80 [ 7.973353] rtnetlink_rcv_msg+0x12c/0x374 [ 7.977557] netlink_rcv_skb+0x5c/0x130 [ 7.981500] rtnetlink_rcv+0x18/0x2c [ 7.985172] netlink_unicast+0x2e8/0x340 [ 7.989197] netlink_sendmsg+0x1a8/0x420 [ 7.993222] ____sys_sendmsg+0x218/0x280 [ 7.997249] ___sys_sendmsg+0xac/0x100 [ 8.001103] __sys_sendmsg+0x84/0xe0 [ 8.004776] __arm64_sys_sendmsg+0x24/0x30 [ 8.008983] invoke_syscall+0x48/0x114 [ 8.012840] el0_svc_common.constprop.0+0xcc/0xec [ 8.017665] do_el0_svc+0x38/0xb0 [ 8.021071] el0_svc+0x2c/0x84 [ 8.024212] el0t_64_sync_handler+0xf4/0x120 [ 8.028598] el0t_64_sync+0x190/0x194 Go back to the original behavior, if the automotive safety package is found to be supported in hardware enable all the features unless safety_feat_cfg is passed in saying this particular platform only supports a subset of the features. Fixes: 5ac712dcdfef ("net: stmmac: enable platform specific safety features") Reported-by: Ning Cai Signed-off-by: Andrew Halaney Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac5.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 0582d984793d30442da88fe458674502bad1ad29 Author: Randy Dunlap Date: Thu Jan 12 22:38:05 2023 -0800 i2c: rk3x: fix a bunch of kernel-doc warnings Fix multiple W=1 kernel-doc warnings in i2c-rk3x.c: drivers/i2c/busses/i2c-rk3x.c:83: warning: missing initial short description on line: * struct i2c_spec_values: drivers/i2c/busses/i2c-rk3x.c:139: warning: missing initial short description on line: * struct rk3x_i2c_calced_timings: drivers/i2c/busses/i2c-rk3x.c:162: warning: missing initial short description on line: * struct rk3x_i2c_soc_data: drivers/i2c/busses/i2c-rk3x.c:242: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Generate a START condition, which triggers a REG_INT_START interrupt. drivers/i2c/busses/i2c-rk3x.c:261: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Generate a STOP condition, which triggers a REG_INT_STOP interrupt. drivers/i2c/busses/i2c-rk3x.c:304: warning: expecting prototype for Setup a read according to i2c(). Prototype was for rk3x_i2c_prepare_read() instead drivers/i2c/busses/i2c-rk3x.c:335: warning: expecting prototype for Fill the transmit buffer with data from i2c(). Prototype was for rk3x_i2c_fill_transmit_buf() instead drivers/i2c/busses/i2c-rk3x.c:535: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Get timing values of I2C specification drivers/i2c/busses/i2c-rk3x.c:552: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Calculate divider values for desired SCL frequency drivers/i2c/busses/i2c-rk3x.c:713: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Calculate timing values for desired SCL frequency drivers/i2c/busses/i2c-rk3x.c:963: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Setup I2C registers for an I2C operation specified by msgs, num. Signed-off-by: Randy Dunlap Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-rk3x.c | 44 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit e49560f02716839a74a7907200a589c1f990261b Author: Randy Dunlap Date: Thu Jan 12 22:37:56 2023 -0800 i2c: axxia: use 'struct' for kernel-doc notation Add "struct" to prevent this kernel-doc warning: drivers/i2c/busses/i2c-axxia.c:135: warning: cannot understand function prototype: 'struct axxia_i2c_dev ' Signed-off-by: Randy Dunlap Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-axxia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4fbf0b27fa9dd2594b3371532341bd4636a00f9 Merge: 6c977c5c2e4c 8299ffe3dc3d Author: David S. Miller Date: Fri Jan 20 09:00:08 2023 +0000 Merge branch 'octeontx2-af-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. --- v2: - Addressed a review comment. v1: - Dropped patch "octeontx2-af: Fix interrupt name strings completely" to submit to net. --- ==================== Signed-off-by: David S. Miller commit 8299ffe3dc3dc9ac2bd60e3a8332008f03156aca 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: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 17 +++++++++++ drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 4 +++ .../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 35 ++++++++++++++++++++++ 3 files changed, 56 insertions(+) commit c0688ec002a451d04a51d43b849765c5ce6cb36f 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: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 2 ++ drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit d5b2e0a299f36c6ccdda4830525ca20550243536 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: David S. Miller .../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 9adb04ff62f51265002c2c83e718bcf459e06e48 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: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 8 ++++++++ drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 2 ++ drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 13 ++++++++++--- 3 files changed, 20 insertions(+), 3 deletions(-) commit 1286c50ae9e0f5025b165c8f2321b3ce3b558002 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: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 12 +++ .../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 86 ++++++++++------------ .../net/ethernet/marvell/octeontx2/af/rvu_reg.h | 2 + 3 files changed, 53 insertions(+), 47 deletions(-) commit f58cf765e8f5f4860ea094aa12c156d9195a4c28 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: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 8 ++++++ .../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 33 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) commit 07ea567d84cdf0add274d66db7c02b55b818d517 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: David S. Miller .../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 110 +++++++++++++++------ 1 file changed, 80 insertions(+), 30 deletions(-) commit 0a4eecf96c640886226f1ca7fdbb11bb20bc55b9 Author: Fabrizio Castro Date: Tue Jan 17 17:50:17 2023 +0000 dt-bindings: i2c: renesas,rzv2m: Fix SoC specific string The preferred form for Renesas' compatible strings is: ",-" Somehow the compatible string for the r9a09g011 I2C IP was upstreamed as renesas,i2c-r9a09g011 instead of renesas,r9a09g011-i2c, which is really confusing, especially considering the generic fallback is renesas,rzv2m-i2c. The first user of renesas,i2c-r9a09g011 in the kernel is not yet in a kernel release, it will be in v6.1, therefore it can still be fixed in v6.1. Even if we don't fix it before v6.2, I don't think there is any harm in making such a change. s/renesas,i2c-r9a09g011/renesas,r9a09g011-i2c/g for consistency. Fixes: ba7a4d15e2c4 ("dt-bindings: i2c: Document RZ/V2M I2C controller") Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/renesas,rzv2m.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 24b5308cf5ee9f52dd22f3af78a5b0cdc9d35e72 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 tools/testing/selftests/filesystems/fat/run_fat_tests.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 3f30a6e67ce49c0068f8058893326db46b6db11f Merge: 6bb517df54bd a52287d66dfa Author: Dave Airlie Date: Fri Jan 20 11:21:19 2023 +1000 Merge tag 'amd-drm-fixes-6.2-2023-01-19' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.2-2023-01-19: amdgpu: - Fix display scaling - Fix RN/CZN power reporting on some firmware versions - Colorspace fixes - Fix resource freeing in error case in CS IOCTL - Fix warning on driver unload - GC11 fixes - DCN 3.1.4/5 S/G display workarounds Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230119195908.7670-1-alexander.deucher@amd.com commit 6bb517df54bd80106c38d001d7b2dd6101c195e6 Merge: d6cf886fbd90 2293a73ad4f3 Author: Dave Airlie Date: Fri Jan 20 11:17:11 2023 +1000 Merge tag 'drm-misc-fixes-2023-01-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes A fix for vc4 to address a memory leak when allocating a buffer, a Kconfig fix for panfrost and two fixes for i915 and fb-helper to address some bugs with vga-switcheroo. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230119082059.h32bs7zqoxmjbcvn@houat commit 5b89c6f9b2df2b7cf6da8e0b2b87c8995b378cad Author: Masahiro Yamada Date: Sat Jan 7 01:12:13 2023 +0900 riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT Since commit 80b6093b55e3 ("kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds"), building with W=1 detects misuse of #if. $ make W=1 ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- arch/riscv/kernel/ [snip] AS arch/riscv/kernel/head.o arch/riscv/kernel/head.S:329:5: warning: "CONFIG_RISCV_BOOT_SPINWAIT" is not defined, evaluates to 0 [-Wundef] 329 | #if CONFIG_RISCV_BOOT_SPINWAIT | ^~~~~~~~~~~~~~~~~~~~~~~~~~ CONFIG_RISCV_BOOT_SPINWAIT is a bool option. #ifdef should be used. Signed-off-by: Masahiro Yamada Fixes: 2ffc48fc7071 ("RISC-V: Move spinwait booting method to its own config") Link: https://lore.kernel.org/r/20230106161213.2374093-1-masahiroy@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/head.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d0cc1b1f22adb254408a42043d3939bed65545d Author: Conor Dooley Date: Fri Jan 6 12:53:45 2023 +0000 MAINTAINERS: add an IRC entry for RISC-V I remember being told "Just ping me on IRC" about patches, but googling at the time was not helpful. #riscv on libera is not linux specific, but a bunch of contributors etc do hang out there. Add a link to the maintainers entry to help others find it in the future! Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230106125344.1685266-1-conor@kernel.org Signed-off-by: Palmer Dabbelt MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit d374a16539b14dde0b8a3e69fb9169a7454a806c Author: Heiko Stuebner Date: Thu Jan 5 20:26:10 2023 +0100 RISC-V: fix compile error from deduplicated __ALTERNATIVE_CFG_2 On the non-assembler-side wrapping alternative-macros inside other macros to prevent duplication of code works, as the end result will just be a string that gets fed to the asm instruction. In real assembler code, wrapping .macro blocks inside other .macro blocks brings more restrictions on usage it seems and the optimization done by commit 2ba8c7dc71c0 ("riscv: Don't duplicate __ALTERNATIVE_CFG in __ALTERNATIVE_CFG_2") results in a compile error like: ../arch/riscv/lib/strcmp.S: Assembler messages: ../arch/riscv/lib/strcmp.S:15: Error: too many positional arguments ../arch/riscv/lib/strcmp.S:15: Error: backward ref to unknown label "886:" ../arch/riscv/lib/strcmp.S:15: Error: backward ref to unknown label "887:" ../arch/riscv/lib/strcmp.S:15: Error: backward ref to unknown label "886:" ../arch/riscv/lib/strcmp.S:15: Error: backward ref to unknown label "887:" ../arch/riscv/lib/strcmp.S:15: Error: backward ref to unknown label "886:" ../arch/riscv/lib/strcmp.S:15: Error: attempt to move .org backwards Wrapping the variables containing assembler code in quotes solves this issue, compilation and the code in question still works and objdump also shows sane decompiled results of the affected code. Fixes: 2ba8c7dc71c0 ("riscv: Don't duplicate __ALTERNATIVE_CFG in __ALTERNATIVE_CFG_2") Signed-off-by: Heiko Stuebner Reviewed-by: Palmer Dabbelt Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230105192610.1940841-1-heiko@sntech.de Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/alternative-macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6cf886fbd90efae3ec763e092a5f930037c0bd7 Merge: fc70e13dd1a6 afdecb232740 Author: Dave Airlie Date: Fri Jan 20 09:25:09 2023 +1000 Merge tag 'drm-intel-fixes-2023-01-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Reject display plane with height == 0 (Drew) - re-disable RC6p on Sandy Bridge (Sasa) - Fix hugepages' selftest (Chris) - DG2 hw workarounds (Matt Atwood) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y8mf3/ANNWctpc7R@intel.com commit 4a0c7a6831a0aa56db78a80f5a3e1ad5412d0fa8 Merge: d368967cb103 3d9c07c4cfc0 Author: Linus Torvalds Date: Thu Jan 19 15:22:28 2023 -0800 Merge tag 'perf-tools-fixes-for-v6.2-3-2023-01-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Prevent reading into undefined memory in the expression lexer, accounting for a trailer backslash followed by the null byte. - Fix file mode when copying files to the build id cache, the problem happens when the cache directory is in a different file system than the file being cached, otherwise the mode was preserved as only a hard link would be done to save space. - Fix a related build-id 'perf test' entry that checked that permission when caching PE (Portable Executable) files, used when profiling Windows executables under wine. - Sync the tools/ copies of kvm headers, build_bug.h, socket.h and arm64's cputype.h with the kernel sources. * tag 'perf-tools-fixes-for-v6.2-3-2023-01-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf test build-id: Fix test check for PE file perf buildid-cache: Fix the file mode with copyfile() while adding file to build-id cache perf expr: Prevent normalize() from reading into undefined memory in the expression lexer tools headers: Syncronize linux/build_bug.h with the kernel sources perf beauty: Update copy of linux/socket.h with the kernel sources tools headers arm64: Sync arm64's cputype.h with the kernel sources tools kvm headers arm64: Update KVM header from the kernel sources tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources tools headers UAPI: Sync linux/kvm.h with the kernel sources commit 2eecf81e149cd718754f52a4b688b237d2a8244d Merge: bdb7fdb0aca8 b9fa9bc83929 Author: Alexei Starovoitov Date: Thu Jan 19 15:19:23 2023 -0800 Merge branch 'bpf: Fix to preserve reg parent/live fields when copying range info' Eduard Zingerman says: ==================== Struct bpf_reg_state is copied directly in several places including: - check_stack_write_fixed_off() (via save_register_state()); - check_stack_read_fixed_off(); - find_equal_scalars(). However, a literal copy of this struct also copies the following fields: struct bpf_reg_state { ... struct bpf_reg_state *parent; ... enum bpf_reg_liveness live; ... }; This breaks register parentage chain and liveness marking logic. The commit message for the first patch has a detailed example. This patch-set replaces direct copies with a call to a function copy_register_state(dst,src), which preserves 'parent' and 'live' fields of the 'dst'. The fix comes with a significant verifier runtime penalty for some selftest binaries listed in tools/testing/selftests/bpf/veristat.cfg and cilium BPF binaries (see [1]): $ ./veristat -e file,prog,states -C -f 'states_diff>10' master-baseline.log current.log File Program States (A) States (B) States (DIFF) -------------------------- -------------------------------- ---------- ---------- --------------- bpf_host.o tail_handle_ipv4_from_host 231 299 +68 (+29.44%) bpf_host.o tail_handle_nat_fwd_ipv4 1088 1320 +232 (+21.32%) bpf_host.o tail_handle_nat_fwd_ipv6 716 729 +13 (+1.82%) bpf_host.o tail_nodeport_nat_ingress_ipv4 281 314 +33 (+11.74%) bpf_host.o tail_nodeport_nat_ingress_ipv6 245 256 +11 (+4.49%) bpf_lxc.o tail_handle_nat_fwd_ipv4 1088 1320 +232 (+21.32%) bpf_lxc.o tail_handle_nat_fwd_ipv6 716 729 +13 (+1.82%) bpf_lxc.o tail_ipv4_ct_egress 239 262 +23 (+9.62%) bpf_lxc.o tail_ipv4_ct_ingress 239 262 +23 (+9.62%) bpf_lxc.o tail_ipv4_ct_ingress_policy_only 239 262 +23 (+9.62%) bpf_lxc.o tail_ipv6_ct_egress 181 195 +14 (+7.73%) bpf_lxc.o tail_ipv6_ct_ingress 181 195 +14 (+7.73%) bpf_lxc.o tail_ipv6_ct_ingress_policy_only 181 195 +14 (+7.73%) bpf_lxc.o tail_nodeport_nat_ingress_ipv4 281 314 +33 (+11.74%) bpf_lxc.o tail_nodeport_nat_ingress_ipv6 245 256 +11 (+4.49%) bpf_overlay.o tail_handle_nat_fwd_ipv4 799 829 +30 (+3.75%) bpf_overlay.o tail_nodeport_nat_ingress_ipv4 281 314 +33 (+11.74%) bpf_overlay.o tail_nodeport_nat_ingress_ipv6 245 256 +11 (+4.49%) bpf_sock.o cil_sock4_connect 47 70 +23 (+48.94%) bpf_sock.o cil_sock4_sendmsg 45 68 +23 (+51.11%) bpf_sock.o cil_sock6_post_bind 31 42 +11 (+35.48%) bpf_xdp.o tail_lb_ipv4 4413 6457 +2044 (+46.32%) bpf_xdp.o tail_lb_ipv6 6876 7249 +373 (+5.42%) test_cls_redirect.bpf.o cls_redirect 4704 4799 +95 (+2.02%) test_tcp_hdr_options.bpf.o estab 180 206 +26 (+14.44%) xdp_synproxy_kern.bpf.o syncookie_tc 21059 21485 +426 (+2.02%) xdp_synproxy_kern.bpf.o syncookie_xdp 21857 23122 +1265 (+5.79%) -------------------------- -------------------------------- ---------- ---------- --------------- I looked through verification log for bpf_xdp.o tail_lb_ipv4 program in order to identify the reason for ~50% visited states increase. The slowdown is triggered by a difference in handling of three stack slots: fp-56, fp-72 and fp-80, with the main difference coming from fp-72. In fact the following change removes all the difference: @@ -3256,7 +3256,10 @@ static void save_register_state(struct bpf_func_state *state, { int i; - copy_register_state(&state->stack[spi].spilled_ptr, reg); + if ((spi == 6 /*56*/ || spi == 8 /*72*/ || spi == 9 /*80*/) && size != BPF_REG_SIZE) + state->stack[spi].spilled_ptr = *reg; + else + copy_register_state(&state->stack[spi].spilled_ptr, reg); For fp-56 I found the following pattern for divergences between verification logs with and w/o this patch: - At some point insn 1862 is reached and checkpoint is created; - At some other point insn 1862 is reached again: - with this patch: - the current state is considered *not* equivalent to the old checkpoint; - the reason for mismatch is the state of fp-56: - current state: fp-56=????mmmm - checkpoint: fp-56_rD=mmmmmmmm - without this patch the current state is considered equivalent to the checkpoint, the fp-56 is not present in the checkpoint. Here is a fragment of the verification log for when the checkpoint in question created at insn 1862: checkpoint 1862: ... fp-56=mmmmmmmm ... 1862: ... 1863: ... 1864: (61) r1 = *(u32 *)(r0 +0) 1865: ... 1866: (63) *(u32 *)(r10 -56) = r1 ; R1_w=scalar(...) R10=fp0 fp-56= 1867: (bf) r2 = r10 ; R2_w=fp0 R10=fp0 1868: (07) r2 += -56 ; R2_w=fp-56 ; return map_lookup_elem(&LB4_BACKEND_MAP_V2, &backend_id); 1869: (18) r1 = 0xffff888100286000 ; R1_w=map_ptr(off=0,ks=4,vs=8,imm=0) 1871: (85) call bpf_map_lookup_elem#1 - Without this patch: - at insn 1864 r1 liveness is set to REG_LIVE_WRITTEN; - at insn 1866 fp-56 liveness is set REG_LIVE_WRITTEN mark because of the direct r1 copy in save_register_state(); - at insn 1871 REG_LIVE_READ is not propagated to fp-56 at checkpoint 1862 because of the REG_LIVE_WRITTEN mark; - eventually fp-56 is pruned from checkpoint at 1862 in clean_func_state(). - With this patch: - at insn 1864 r1 liveness is set to REG_LIVE_WRITTEN; - at insn 1866 fp-56 liveness is *not* set to REG_LIVE_WRITTEN mark because write size is not equal to BPF_REG_SIZE; - at insn 1871 REG_LIVE_READ is propagated to fp-56 at checkpoint 1862. Hence more states have to be visited by verifier with this patch compared to current master. Similar patterns could be found for both fp-72 and fp-80, although these are harder to track trough the log because of a big number of insns between slot write and bpf_map_lookup_elem() call triggering read mark, boils down to the following C code: struct ipv4_frag_id frag_id = { .daddr = ip4->daddr, .saddr = ip4->saddr, .id = ip4->id, .proto = ip4->protocol, .pad = 0, }; ... map_lookup_elem(..., &frag_id); Where: - .id is mapped to fp-72, write of size u16; - .saddr is mapped to fp-80, write of size u32. This patch-set is a continuation of discussion from [2]. Changes v1 -> v2 (no changes in the code itself): - added analysis for the tail_lb_ipv4 verification slowdown; - rebase against fresh master branch. [1] git@github.com:anakryiko/cilium.git [2] https://lore.kernel.org/bpf/517af2c57ee4b9ce2d96a8cf33f7295f2d2dfe13.camel@gmail.com/ ==================== Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit b9fa9bc839291020b362ab5392e5f18ba79657ac Author: Eduard Zingerman Date: Fri Jan 6 16:22:14 2023 +0200 selftests/bpf: Verify copy_register_state() preserves parent/live fields A testcase to check that verifier.c:copy_register_state() preserves register parentage chain and livness information. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230106142214.1040390-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/verifier/search_pruning.c | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 71f656a50176915d6813751188b5758daa8d012b Author: Eduard Zingerman Date: Fri Jan 6 16:22:13 2023 +0200 bpf: Fix to preserve reg parent/live fields when copying range info Register range information is copied in several places. The intent is to transfer range/id information from one register/stack spill to another. Currently this is done using direct register assignment, e.g.: static void find_equal_scalars(..., struct bpf_reg_state *known_reg) { ... struct bpf_reg_state *reg; ... *reg = *known_reg; ... } However, such assignments also copy the following bpf_reg_state fields: struct bpf_reg_state { ... struct bpf_reg_state *parent; ... enum bpf_reg_liveness live; ... }; Copying of these fields is accidental and incorrect, as could be demonstrated by the following example: 0: call ktime_get_ns() 1: r6 = r0 2: call ktime_get_ns() 3: r7 = r0 4: if r0 > r6 goto +1 ; r0 & r6 are unbound thus generated ; branch states are identical 5: *(u64 *)(r10 - 8) = 0xdeadbeef ; 64-bit write to fp[-8] --- checkpoint --- 6: r1 = 42 ; r1 marked as written 7: *(u8 *)(r10 - 8) = r1 ; 8-bit write, fp[-8] parent & live ; overwritten 8: r2 = *(u64 *)(r10 - 8) 9: r0 = 0 10: exit This example is unsafe because 64-bit write to fp[-8] at (5) is conditional, thus not all bytes of fp[-8] are guaranteed to be set when it is read at (8). However, currently the example passes verification. First, the execution path 1-10 is examined by verifier. Suppose that a new checkpoint is created by is_state_visited() at (6). After checkpoint creation: - r1.parent points to checkpoint.r1, - fp[-8].parent points to checkpoint.fp[-8]. At (6) the r1.live is set to REG_LIVE_WRITTEN. At (7) the fp[-8].parent is set to r1.parent and fp[-8].live is set to REG_LIVE_WRITTEN, because of the following code called in check_stack_write_fixed_off(): static void save_register_state(struct bpf_func_state *state, int spi, struct bpf_reg_state *reg, int size) { ... state->stack[spi].spilled_ptr = *reg; // <--- parent & live copied if (size == BPF_REG_SIZE) state->stack[spi].spilled_ptr.live |= REG_LIVE_WRITTEN; ... } Note the intent to mark stack spill as written only if 8 bytes are spilled to a slot, however this intent is spoiled by a 'live' field copy. At (8) the checkpoint.fp[-8] should be marked as REG_LIVE_READ but this does not happen: - fp[-8] in a current state is already marked as REG_LIVE_WRITTEN; - fp[-8].parent points to checkpoint.r1, parentage chain is used by mark_reg_read() to mark checkpoint states. At (10) the verification is finished for path 1-10 and jump 4-6 is examined. The checkpoint.fp[-8] never gets REG_LIVE_READ mark and this spill is pruned from the cached states by clean_live_states(). Hence verifier state obtained via path 1-4,6 is deemed identical to one obtained via path 1-6 and program marked as safe. Note: the example should be executed with BPF_F_TEST_STATE_FREQ flag set to force creation of intermediate verifier states. This commit revisits the locations where bpf_reg_state instances are copied and replaces the direct copies with a call to a function copy_register_state(dst, src) that preserves 'parent' and 'live' fields of the 'dst'. Fixes: 679c782de14b ("bpf/verifier: per-register parent pointers") Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230106142214.1040390-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit fe0ba8c23f9a35b0307eb662f16dd3a75fcdae41 Author: Juergen Gross Date: Tue Jan 17 16:57:23 2023 +0100 acpi: Fix suspend with Xen PV Commit f1e525009493 ("x86/boot: Skip realmode init code when running as Xen PV guest") missed one code path accessing real_mode_header, leading to dereferencing NULL when suspending the system under Xen: [ 348.284004] PM: suspend entry (deep) [ 348.289532] Filesystems sync: 0.005 seconds [ 348.291545] Freezing user space processes ... (elapsed 0.000 seconds) done. [ 348.292457] OOM killer disabled. [ 348.292462] Freezing remaining freezable tasks ... (elapsed 0.104 seconds) done. [ 348.396612] printk: Suspending console(s) (use no_console_suspend to debug) [ 348.749228] PM: suspend devices took 0.352 seconds [ 348.769713] ACPI: EC: interrupt blocked [ 348.816077] BUG: kernel NULL pointer dereference, address: 000000000000001c [ 348.816080] #PF: supervisor read access in kernel mode [ 348.816081] #PF: error_code(0x0000) - not-present page [ 348.816083] PGD 0 P4D 0 [ 348.816086] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 348.816089] CPU: 0 PID: 6764 Comm: systemd-sleep Not tainted 6.1.3-1.fc32.qubes.x86_64 #1 [ 348.816092] Hardware name: Star Labs StarBook/StarBook, BIOS 8.01 07/03/2022 [ 348.816093] RIP: e030:acpi_get_wakeup_address+0xc/0x20 Fix that by adding an optional acpi callback allowing to skip setting the wakeup address, as in the Xen PV case this will be handled by the hypervisor anyway. Fixes: f1e525009493 ("x86/boot: Skip realmode init code when running as Xen PV guest") Reported-by: Marek Marczykowski-Górecki Signed-off-by: Juergen Gross Signed-off-by: Dave Hansen Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/all/20230117155724.22940-1-jgross%40suse.com arch/x86/include/asm/acpi.h | 8 ++++++++ drivers/acpi/sleep.c | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit fc70e13dd1a643565b7628dbe5b130c260a52cf8 Merge: 5dc4c995db9e a66f1efcf748 Author: Dave Airlie Date: Fri Jan 20 07:49:00 2023 +1000 Merge tag 'drm-msm-fixes-2023-01-16' of https://gitlab.freedesktop.org/drm/msm into drm-fixes msm-fixes for v6.3-rc5 Two GPU fixes which were meant to be part of the previous pull request, but I'd forgotten to fetch from gitlab after the MR was merged so that git tag was applied to the wrong commit. - kexec shutdown fix - fix potential double free Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGskguoVsz2wqAK2k+f32LwcVY5JC6+e2RwLqZswz3RY2Q@mail.gmail.com commit d368967cb1039b5c4cccb62b5a4b9468c50cd143 Merge: a03df4ec3729 21493c6e96e5 Author: Linus Torvalds Date: Thu Jan 19 12:32:07 2023 -0800 Merge tag 'printk-for-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk fixes from Petr Mladek: - Prevent a potential deadlock when configuring kgdb console - Fix a kernel doc warning * tag 'printk-for-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: kernel/printk/printk.c: Fix W=1 kernel-doc warning tty: serial: kgdboc: fix mutex locking order for configure_kgdboc() commit a03df4ec37291de74987e4fbfbbcaebb5a8f9a2e Merge: 46f0cba31ccc 41e1992665a2 Author: Linus Torvalds Date: Thu Jan 19 12:28:53 2023 -0800 Merge tag 's390-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 build fix from Heiko Carstens: - Workaround invalid gcc-11 out of bounds read warning caused by s390's S390_lowcore definition. This happens only with gcc 11.1.0 and 11.2.0. The code which causes this warning will be gone with the next merge window. Therefore just replace the memcpy() with a for loop to get rid of the warning. * tag 's390-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: workaround invalid gcc-11 out of bounds read warning commit 46f0cba31ccc28cfb3e65d0ab49a9a7e58c0ef9f Merge: 081edded9b38 cc2e9d2b26c8 Author: Linus Torvalds Date: Thu Jan 19 12:24:39 2023 -0800 Merge tag 'slab-for-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab fix from Vlastimil Babka: "Just a single fix, since the lkp report originally for a slub-tiny commit ended up being a gcov/compiler bug: - periodically resched in SLAB's drain_freelist(), by David Rientjes" * tag 'slab-for-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm, slab: periodically resched in drain_freelist() commit 6c54b7bc8a31ce0f7cc7f8deef05067df414f1d8 Author: Viresh Kumar Date: Wed Jan 18 14:08:24 2023 +0530 thermal: core: call put_device() only after device_register() fails put_device() shouldn't be called before a prior call to device_register(). __thermal_cooling_device_register() doesn't follow that properly and needs fixing. Also thermal_cooling_device_destroy_sysfs() is getting called unnecessarily on few error paths. Fix all this by placing the calls at the right place. Based on initial work done by Caleb Connolly. Fixes: 4748f9687caa ("thermal: core: fix some possible name leaks in error paths") Fixes: c408b3d1d9bb ("thermal: Validate new state in cur_state_store()") Reported-by: Caleb Connolly Signed-off-by: Viresh Kumar Tested-by: Frank Rowand Reviewed-by: Yang Yingliang Tested-by: Caleb Connolly Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_core.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit dcbf1742ed10ede31b2e68c1412503db9fc6cfaf Merge: 7d80dbd708c1 71dfd381a7c0 Author: Greg Kroah-Hartman Date: Thu Jan 19 20:03:14 2023 +0100 Merge tag 'usb-serial-6.2-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: "USB-serial fixes for 6.2-rc5 Here are some new device ids, mostly for Quectel modems. All have been in linux-next with no reported issues." * tag 'usb-serial-6.2-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add Quectel EM05CN modem USB: serial: option: add Quectel EM05CN (SG) modem USB: serial: cp210x: add SCALANCE LPE-9000 device id USB: serial: option: add Quectel EC200U modem USB: serial: option: add Quectel EM05-G (RS) modem USB: serial: option: add Quectel EM05-G (GR) modem USB: serial: option: add Quectel EM05-G (CS) modem commit 081edded9b38ba6a3a8fa045cfa0d374343da08a Merge: 7287904c8771 a608da3bd730 Author: Linus Torvalds Date: Thu Jan 19 09:54:08 2023 -0800 Merge tag 'zonefs-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs fix from Damien Le Moal: - A single patch to fix sync write operations to detect and handle errors due to external zone corruptions resulting in writes at invalid location, from me. * tag 'zonefs-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: Detect append writes at invalid locations commit e12d7a46f65ae4b7d58a5e0c1cbfa825cf8d830d Author: Jens Axboe Date: Thu Jan 19 09:04:40 2023 -0700 io_uring/msg_ring: fix missing lock on overflow for IOPOLL If the target ring is configured with IOPOLL, then we always need to hold the target ring uring_lock before posting CQEs. We could just grab it unconditionally, but since we don't expect many target rings to be of this type, make grabbing the uring_lock conditional on the ring type. Link: https://lore.kernel.org/io-uring/Y8krlYa52%2F0YGqkg@ip-172-31-85-199.ec2.internal/ Reported-by: Xingyuan Mo Signed-off-by: Jens Axboe io_uring/msg_ring.c | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) commit 6c977c5c2e4c5d8ad1b604724cc344e38f96fe9b Author: Rakesh Sankaranarayanan Date: Wed Jan 18 23:17:35 2023 +0530 net: dsa: microchip: ksz9477: port map correction in ALU table entry register ALU table entry 2 register in KSZ9477 have bit positions reserved for forwarding port map. This field is referred in ksz9477_fdb_del() for clearing forward port map and alu table. But current fdb_del refer ALU table entry 3 register for accessing forward port map. Update ksz9477_fdb_del() to get forward port map from correct alu table entry register. With this bug, issue can be observed while deleting static MAC entries. Delete any specific MAC entry using "bridge fdb del" command. This should clear all the specified MAC entries. But it is observed that entries with self static alone are retained. Tested on LAN9370 EVB since ksz9477_fdb_del() is used common across LAN937x and KSZ series. Fixes: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477") Signed-off-by: Rakesh Sankaranarayanan Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20230118174735.702377-1-rakesh.sankaranarayanan@microchip.com Signed-off-by: Jakub Kicinski drivers/net/dsa/microchip/ksz9477.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 903848249a781d76d59561d51676c95b3a4d7162 Author: Willem de Bruijn Date: Wed Jan 18 10:18:47 2023 -0500 selftests/net: toeplitz: fix race on tpacket_v3 block close Avoid race between process wakeup and tpacket_v3 block timeout. The test waits for cfg_timeout_msec for packets to arrive. Packets arrive in tpacket_v3 rings, which pass packets ("frames") to the process in batches ("blocks"). The sk waits for req3.tp_retire_blk_tov msec to release a block. Set the block timeout lower than the process waiting time, else the process may find that no block has been released by the time it scans the socket list. Convert to a ring of more than one, smaller, blocks with shorter timeouts. Blocks must be page aligned, so >= 64KB. Fixes: 5ebfb4cc3048 ("selftests/net: toeplitz test") Signed-off-by: Willem de Bruijn Link: https://lore.kernel.org/r/20230118151847.4124260-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski tools/testing/selftests/net/toeplitz.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 8ccc99362b60c6f27bb46f36fdaaccf4ef0303de Author: Paolo Abeni Date: Wed Jan 18 13:24:12 2023 +0100 net/ulp: use consistent error code when blocking ULP The referenced commit changed the error code returned by the kernel when preventing a non-established socket from attaching the ktls ULP. Before to such a commit, the user-space got ENOTCONN instead of EINVAL. The existing self-tests depend on such error code, and the change caused a failure: RUN global.non_established ... tls.c:1673:non_established:Expected errno (22) == ENOTCONN (107) non_established: Test failed at step #3 FAIL global.non_established In the unlikely event existing applications do the same, address the issue by restoring the prior error code in the above scenario. Note that the only other ULP performing similar checks at init time - smc_ulp_ops - also fails with ENOTCONN when trying to attach the ULP to a non-established socket. Reported-by: Sabrina Dubroca Fixes: 2c02d41d71f9 ("net/ulp: prevent ULP without clone op from entering the LISTEN status") Signed-off-by: Paolo Abeni Reviewed-by: Sabrina Dubroca Link: https://lore.kernel.org/r/7bb199e7a93317fb6f8bf8b9b2dc71c18f337cde.1674042685.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski net/ipv4/tcp_ulp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3c00316a2f847791bae395ea6dd91aa7a221471 Author: Pierre-Louis Bossart Date: Thu Jan 19 18:34:59 2023 +0200 ASoC: Intel: sof_ssp_amp: always set dpcm_capture for amplifiers The amplifier may provide hardware support for I/V feedback, or alternatively the firmware may generate an echo reference attached to the SSP and dailink used for the amplifier. To avoid any issues with invalid/NULL substreams in the latter case, always unconditionally set dpcm_capture. Link: https://github.com/thesofproject/linux/issues/4083 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20230119163459.2235843-5-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_ssp_amp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 36a71a0eb7cdb5ccf4b0214dbd41ab00dff18c7f Author: Pierre-Louis Bossart Date: Thu Jan 19 18:34:58 2023 +0200 ASoC: Intel: sof_nau8825: always set dpcm_capture for amplifiers The amplifier may provide hardware support for I/V feedback, or alternatively the firmware may generate an echo reference attached to the SSP and dailink used for the amplifier. To avoid any issues with invalid/NULL substreams in the latter case, always unconditionally set dpcm_capture. Link: https://github.com/thesofproject/linux/issues/4083 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20230119163459.2235843-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_nau8825.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e0a52220344ab7defe25b9cdd58fe1dc1122e67c Author: Pierre-Louis Bossart Date: Thu Jan 19 18:34:57 2023 +0200 ASoC: Intel: sof_cs42l42: always set dpcm_capture for amplifiers The amplifier may provide hardware support for I/V feedback, or alternatively the firmware may generate an echo reference attached to the SSP and dailink used for the amplifier. To avoid any issues with invalid/NULL substreams in the latter case, always unconditionally set dpcm_capture. Link: https://github.com/thesofproject/linux/issues/4083 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20230119163459.2235843-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_cs42l42.c | 3 +++ 1 file changed, 3 insertions(+) commit 324f065cdbaba1b879a63bf07e61ca156b789537 Author: Pierre-Louis Bossart Date: Thu Jan 19 18:34:56 2023 +0200 ASoC: Intel: sof_rt5682: always set dpcm_capture for amplifiers The amplifier may provide hardware support for I/V feedback, or alternatively the firmware may generate an echo reference attached to the SSP and dailink used for the amplifier. To avoid any issues with invalid/NULL substreams in the latter case, always unconditionally set dpcm_capture. Link: https://github.com/thesofproject/linux/issues/4083 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20230119163459.2235843-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8c29f016540532582721cec1dbf6d144873433ba Author: Nikunj A Dadhania Date: Wed Jan 18 11:49:43 2023 +0530 x86/sev: Add SEV-SNP guest feature negotiation support The hypervisor can enable various new features (SEV_FEATURES[1:63]) and start a SNP guest. Some of these features need guest side implementation. If any of these features are enabled without it, the behavior of the SNP guest will be undefined. It may fail booting in a non-obvious way making it difficult to debug. Instead of allowing the guest to continue and have it fail randomly later, detect this early and fail gracefully. The SEV_STATUS MSR indicates features which the hypervisor has enabled. While booting, SNP guests should ascertain that all the enabled features have guest side implementation. In case a feature is not implemented in the guest, the guest terminates booting with GHCB protocol Non-Automatic Exit(NAE) termination request event, see "SEV-ES Guest-Hypervisor Communication Block Standardization" document (currently at https://developer.amd.com/wp-content/resources/56421.pdf), section "Termination Request". Populate SW_EXITINFO2 with mask of unsupported features that the hypervisor can easily report to the user. More details in the AMD64 APM Vol 2, Section "SEV_STATUS MSR". [ bp: - Massage. - Move snp_check_features() call to C code. Note: the CC:stable@ aspect here is to be able to protect older, stable kernels when running on newer hypervisors. Or not "running" but fail reliably and in a well-defined manner instead of randomly. ] Fixes: cbd3d4f7c4e5 ("x86/sev: Check SEV-SNP features support") Signed-off-by: Nikunj A Dadhania Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Cc: Link: https://lore.kernel.org/r/20230118061943.534309-1-nikunj@amd.com Documentation/x86/amd-memory-encryption.rst | 36 +++++++++++++++ arch/x86/boot/compressed/ident_map_64.c | 6 +++ arch/x86/boot/compressed/misc.h | 2 + arch/x86/boot/compressed/sev.c | 70 +++++++++++++++++++++++++++++ arch/x86/include/asm/msr-index.h | 20 +++++++++ arch/x86/include/uapi/asm/svm.h | 6 +++ 6 files changed, 140 insertions(+) commit 9be182da0a7526f1b9a3777a336f83baa2e64d23 Author: Chen Zhongjin Date: Fri Nov 25 14:35:41 2022 +0800 driver core: Fix test_async_probe_init saves device in wrong array In test_async_probe_init, second set of asynchronous devices are saved in sync_dev[sync_id], which should be async_dev[async_id]. This makes these devices not unregistered when exit. > modprobe test_async_driver_probe && \ > modprobe -r test_async_driver_probe && \ > modprobe test_async_driver_probe ... > sysfs: cannot create duplicate filename '/devices/platform/test_async_driver.4' > kobject_add_internal failed for test_async_driver.4 with -EEXIST, don't try to register things with the same name in the same directory. Fixes: 57ea974fb871 ("driver core: Rewrite test_async_driver_probe to cover serialization and NUMA affinity") Signed-off-by: Chen Zhongjin Link: https://lore.kernel.org/r/20221125063541.241328-1-chenzhongjin@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/base/test/test_async_driver_probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36225a7c72e9e3e1ce4001b6ce72849f5c9a2d3b Author: Yang Yingliang Date: Mon Dec 5 18:15:58 2022 +0800 w1: fix WARNING after calling w1_process() I got the following WARNING message while removing driver(ds2482): ------------[ cut here ]------------ do not call blocking ops when !TASK_RUNNING; state=1 set at [<000000002d50bfb6>] w1_process+0x9e/0x1d0 [wire] WARNING: CPU: 0 PID: 262 at kernel/sched/core.c:9817 __might_sleep+0x98/0xa0 CPU: 0 PID: 262 Comm: w1_bus_master1 Tainted: G N 6.1.0-rc3+ #307 RIP: 0010:__might_sleep+0x98/0xa0 Call Trace: exit_signals+0x6c/0x550 do_exit+0x2b4/0x17e0 kthread_exit+0x52/0x60 kthread+0x16d/0x1e0 ret_from_fork+0x1f/0x30 The state of task is set to TASK_INTERRUPTIBLE in loop in w1_process(), set it to TASK_RUNNING when it breaks out of the loop to avoid the warning. Fixes: 3c52e4e62789 ("W1: w1_process, block or sleep") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221205101558.3599162-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/w1/w1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 25d5648802f12ae486076ceca5d7ddf1fef792b2 Author: Yang Yingliang Date: Mon Dec 5 16:04:34 2022 +0800 w1: fix deadloop in __w1_remove_master_device() I got a deadloop report while doing device(ds2482) add/remove test: [ 162.241881] w1_master_driver w1_bus_master1: Waiting for w1_bus_master1 to become free: refcnt=1. [ 163.272251] w1_master_driver w1_bus_master1: Waiting for w1_bus_master1 to become free: refcnt=1. [ 164.296157] w1_master_driver w1_bus_master1: Waiting for w1_bus_master1 to become free: refcnt=1. ... __w1_remove_master_device() can't return, because the dev->refcnt is not zero. w1_add_master_device() | w1_alloc_dev() | atomic_set(&dev->refcnt, 2) | kthread_run() | |__w1_remove_master_device() | kthread_stop() // KTHREAD_SHOULD_STOP is set, | // threadfn(w1_process) won't be | // called. | kthread() | | // refcnt will never be 0, it's deadloop. | while (atomic_read(&dev->refcnt)) {...} After calling w1_add_master_device(), w1_process() is not really invoked, before w1_process() starting, if kthread_stop() is called in __w1_remove_master_device(), w1_process() will never be called, the refcnt can not be decreased, then it causes deadloop in remove function because of non-zero refcnt. We need to make sure w1_process() is really started, so move the set refcnt into w1_process() to fix this problem. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221205080434.3149205-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/w1/w1.c | 2 ++ drivers/w1/w1_int.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit 2efb6edd52dc50273f5e68ad863dd1b1fb2f2d1c Author: Ian Abbott Date: Tue Jan 3 14:37:54 2023 +0000 comedi: adv_pci1760: Fix PWM instruction handling (Actually, this is fixing the "Read the Current Status" command sent to the device's outgoing mailbox, but it is only currently used for the PWM instructions.) The PCI-1760 is operated mostly by sending commands to a set of Outgoing Mailbox registers, waiting for the command to complete, and reading the result from the Incoming Mailbox registers. One of these commands is the "Read the Current Status" command. The number of this command is 0x07 (see the User's Manual for the PCI-1760 at . The `PCI1760_CMD_GET_STATUS` macro defined in the driver should expand to this command number 0x07, but unfortunately it currently expands to 0x03. (Command number 0x03 is not defined in the User's Manual.) Correct the definition of the `PCI1760_CMD_GET_STATUS` macro to fix it. This is used by all the PWM subdevice related instructions handled by `pci1760_pwm_insn_config()` which are probably all broken. The effect of sending the undefined command number 0x03 is not known. Fixes: 14b93bb6bbf0 ("staging: comedi: adv_pci_dio: separate out PCI-1760 support") Cc: # v4.5+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20230103143754.17564-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman drivers/comedi/drivers/adv_pci1760.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 423d5081d0451faa59a707e57373801da5b40141 Author: Jens Axboe Date: Thu Jan 19 09:01:27 2023 -0700 io_uring/msg_ring: move double lock/unlock helpers higher up In preparation for needing them somewhere else, move them and get rid of the unused 'issue_flags' for the unlock side. No functional changes in this patch. Signed-off-by: Jens Axboe io_uring/msg_ring.c | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) commit 5342ab0af45064cbdc773645b93ab70c24ee161f Author: Arnd Bergmann Date: Thu Dec 15 17:54:24 2022 +0100 tty: serial: qcom_geni: avoid duplicate struct member init When -Woverride-init is enabled in a build, gcc points out that qcom_geni_serial_pm_ops contains conflicting initializers: drivers/tty/serial/qcom_geni_serial.c:1586:20: error: initialized field overwritten [-Werror=override-init] 1586 | .restore = qcom_geni_serial_sys_hib_resume, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/tty/serial/qcom_geni_serial.c:1586:20: note: (near initialization for 'qcom_geni_serial_pm_ops.restore') drivers/tty/serial/qcom_geni_serial.c:1587:17: error: initialized field overwritten [-Werror=override-init] 1587 | .thaw = qcom_geni_serial_sys_hib_resume, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Open-code the initializers with the version that was already used, and use the pm_sleep_ptr() method to deal with unused ones, in place of the __maybe_unused annotation. Fixes: 35781d8356a2 ("tty: serial: qcom-geni-serial: Add support for Hibernation feature") Signed-off-by: Arnd Bergmann Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20221215165453.1864836-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/qcom_geni_serial.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 5bfdd3c654bd879bff50c2e85e42f85ae698b42f Author: Tobias Schramm Date: Mon Jan 9 08:29:40 2023 +0100 serial: atmel: fix incorrect baudrate setup Commit ba47f97a18f2 ("serial: core: remove baud_rates when serial console setup") changed uart_set_options to select the correct baudrate configuration based on the absolute error between requested baudrate and available standard baudrate settings. Prior to that commit the baudrate was selected based on which predefined standard baudrate did not exceed the requested baudrate. This change of selection logic was never reflected in the atmel serial driver. Thus the comment left in the atmel serial driver is no longer accurate. Additionally the manual rounding up described in that comment and applied via (quot - 1) requests an incorrect baudrate. Since uart_set_options uses tty_termios_encode_baud_rate to determine the appropriate baudrate flags this can cause baudrate selection to fail entirely because tty_termios_encode_baud_rate will only select a baudrate if relative error between requested and selected baudrate does not exceed +/-2%. Fix that by requesting actual, exact baudrate used by the serial. Fixes: ba47f97a18f2 ("serial: core: remove baud_rates when serial console setup") Cc: stable Signed-off-by: Tobias Schramm Acked-by: Richard Genoud Link: https://lore.kernel.org/r/20230109072940.202936-1-t.schramm@manjaro.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 5abbeebd8296c2301023b8dc4b5a6c0d5229b4f5 Author: Gaosheng Cui Date: Fri Dec 2 14:06:33 2022 +0800 tty: fix possible null-ptr-defer in spk_ttyio_release Run the following tests on the qemu platform: syzkaller:~# modprobe speakup_audptr input: Speakup as /devices/virtual/input/input4 initialized device: /dev/synth, node (MAJOR 10, MINOR 125) speakup 3.1.6: initialized synth name on entry is: (null) synth probe spk_ttyio_initialise_ldisc failed because tty_kopen_exclusive returned failed (errno -16), then remove the module, we will get a null-ptr-defer problem, as follow: syzkaller:~# modprobe -r speakup_audptr releasing synth audptr BUG: kernel NULL pointer dereference, address: 0000000000000080 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP PTI CPU: 2 PID: 204 Comm: modprobe Not tainted 6.1.0-rc6-dirty #1 RIP: 0010:mutex_lock+0x14/0x30 Call Trace: spk_ttyio_release+0x19/0x70 [speakup] synth_release.part.6+0xac/0xc0 [speakup] synth_remove+0x56/0x60 [speakup] __x64_sys_delete_module+0x156/0x250 ? fpregs_assert_state_consistent+0x1d/0x50 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Modules linked in: speakup_audptr(-) speakup Dumping ftrace buffer: in_synth->dev was not initialized during modprobe, so we add check for in_synth->dev to fix this bug. Fixes: 4f2a81f3a882 ("speakup: Reference synth from tty and tty from synth") Cc: stable Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20221202060633.217364-1-cuigaosheng1@huawei.com Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/spk_ttyio.c | 3 +++ 1 file changed, 3 insertions(+) commit 5c312574e683a3e59d86fa99f2822c0c7aa74be6 Merge: 55ba18dc62de 2c1e1b949024 Author: Paolo Abeni Date: Thu Jan 19 15:39:37 2023 +0100 Merge tag 'mlx5-fixes-2023-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== This series provides bug fixes to mlx5 driver. * tag 'mlx5-fixes-2023-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net: mlx5: eliminate anonymous module_init & module_exit net/mlx5: E-switch, Fix switchdev mode after devlink reload net/mlx5e: Protect global IPsec ASO net/mlx5e: Remove optimization which prevented update of ESN state net/mlx5e: Set decap action based on attr for sample net/mlx5e: QoS, Fix wrongfully setting parent_element_id on MODIFY_SCHEDULING_ELEMENT net/mlx5: E-switch, Fix setting of reserved fields on MODIFY_SCHEDULING_ELEMENT net/mlx5e: Remove redundant xsk pointer check in mlx5e_mpwrq_validate_xsk net/mlx5e: Avoid false lock dependency warning on tc_ht even more net/mlx5: fix missing mutex_unlock in mlx5_fw_fatal_reporter_err_work() ==================== Link: https://lore.kernel.org/r/ Signed-off-by: Paolo Abeni commit 21493c6e96e550509ead696ecca9f0d7196ee91c Merge: 98d0052d0d9d 4fe59a130c11 Author: Petr Mladek Date: Thu Jan 19 14:56:38 2023 +0100 Merge branch 'rework/console-list-lock' into for-linus commit f24771b62a83239f0dce816bddf0f6807f436235 Author: Marek Vasut Date: Thu Jan 12 19:04:17 2023 +0100 serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler Requesting an interrupt with IRQF_ONESHOT will run the primary handler in the hard-IRQ context even in the force-threaded mode. The force-threaded mode is used by PREEMPT_RT in order to avoid acquiring sleeping locks (spinlock_t) in hard-IRQ context. This combination makes it impossible and leads to "sleeping while atomic" warnings. Use one interrupt handler for both handlers (primary and secondary) and drop the IRQF_ONESHOT flag which is not needed. Fixes: e359b4411c283 ("serial: stm32: fix threaded interrupt handling") Reviewed-by: Sebastian Andrzej Siewior Tested-by: Valentin Caron # V3 Signed-off-by: Marek Vasut Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230112180417.25595-1-marex@denx.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) commit 4f39aca2360c82dccd2f5179d77e94aab665bea6 Author: Lino Sanfilippo Date: Sun Jan 8 19:17:35 2023 +0100 serial: amba-pl011: fix high priority character transmission in rs486 mode In RS485 mode the transmission of a high priority character fails since it is written to the data register before the transmitter is enabled. Fix this in pl011_tx_chars() by enabling RS485 transmission before writing the character. Fixes: 8d479237727c ("serial: amba-pl011: add RS485 support") Cc: stable@vger.kernel.org Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20230108181735.10937-1-LinoSanfilippo@gmx.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e8914b52e5b024e4af3d810a935fe0805eee8a36 Author: Ilpo Järvinen Date: Tue Jan 3 11:34:35 2023 +0200 serial: pch_uart: Pass correct sg to dma_unmap_sg() A local variable sg is used to store scatterlist pointer in pch_dma_tx_complete(). The for loop doing Tx byte accounting before dma_unmap_sg() alters sg in its increment statement. Therefore, the pointer passed into dma_unmap_sg() won't match to the one given to dma_map_sg(). To fix the problem, use priv->sg_tx_p directly in dma_unmap_sg() instead of the local variable. Fixes: da3564ee027e ("pch_uart: add multi-scatter processing") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230103093435.4396-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pch_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8caf69a6946e18ffebad49847e258f5b6d52ac2 Author: Krzysztof Kozlowski Date: Wed Dec 21 17:40:22 2022 +0100 tty: serial: qcom-geni-serial: fix slab-out-of-bounds on RX FIFO buffer Driver's probe allocates memory for RX FIFO (port->rx_fifo) based on default RX FIFO depth, e.g. 16. Later during serial startup the qcom_geni_serial_port_setup() updates the RX FIFO depth (port->rx_fifo_depth) to match real device capabilities, e.g. to 32. The RX UART handle code will read "port->rx_fifo_depth" number of words into "port->rx_fifo" buffer, thus exceeding the bounds. This can be observed in certain configurations with Qualcomm Bluetooth HCI UART device and KASAN: Bluetooth: hci0: QCA Product ID :0x00000010 Bluetooth: hci0: QCA SOC Version :0x400a0200 Bluetooth: hci0: QCA ROM Version :0x00000200 Bluetooth: hci0: QCA Patch Version:0x00000d2b Bluetooth: hci0: QCA controller version 0x02000200 Bluetooth: hci0: QCA Downloading qca/htbtfw20.tlv bluetooth hci0: Direct firmware load for qca/htbtfw20.tlv failed with error -2 Bluetooth: hci0: QCA Failed to request file: qca/htbtfw20.tlv (-2) Bluetooth: hci0: QCA Failed to download patch (-2) ================================================================== BUG: KASAN: slab-out-of-bounds in handle_rx_uart+0xa8/0x18c Write of size 4 at addr ffff279347d578c0 by task swapper/0/0 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.1.0-rt5-00350-gb2450b7e00be-dirty #26 Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT) Call trace: dump_backtrace.part.0+0xe0/0xf0 show_stack+0x18/0x40 dump_stack_lvl+0x8c/0xb8 print_report+0x188/0x488 kasan_report+0xb4/0x100 __asan_store4+0x80/0xa4 handle_rx_uart+0xa8/0x18c qcom_geni_serial_handle_rx+0x84/0x9c qcom_geni_serial_isr+0x24c/0x760 __handle_irq_event_percpu+0x108/0x500 handle_irq_event+0x6c/0x110 handle_fasteoi_irq+0x138/0x2cc generic_handle_domain_irq+0x48/0x64 If the RX FIFO depth changes after probe, be sure to resize the buffer. Fixes: f9d690b6ece7 ("tty: serial: qcom_geni_serial: Allocate port->rx_fifo buffer in probe") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221221164022.1087814-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/qcom_geni_serial.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 39af728649b05e88a2b40e714feeee6451c3f18e Author: Yang Yingliang Date: Wed Nov 23 10:25:42 2022 +0800 device property: fix of node refcount leak in fwnode_graph_get_next_endpoint() The 'parent' returned by fwnode_graph_get_port_parent() with refcount incremented when 'prev' is not NULL, it needs be put when finish using it. Because the parent is const, introduce a new variable to store the returned fwnode, then put it before returning from fwnode_graph_get_next_endpoint(). Fixes: b5b41ab6b0c1 ("device property: Check fwnode->secondary in fwnode_graph_get_next_endpoint()") Signed-off-by: Yang Yingliang Reviewed-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-and-tested-by: Daniel Scally Link: https://lore.kernel.org/r/20221123022542.2999510-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/base/property.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 95e5fda3b5f9ed8239b145da3fa01e641cf5d53c Author: Eric Pilmore Date: Wed Jan 18 19:39:08 2023 -0800 ptdma: pt_core_execute_cmd() should use spinlock The interrupt handler (pt_core_irq_handler()) of the ptdma driver can be called from interrupt context. The code flow in this function can lead down to pt_core_execute_cmd() which will attempt to grab a mutex, which is not appropriate in interrupt context and ultimately leads to a kernel panic. The fix here changes this mutex to a spinlock, which has been verified to resolve the issue. Fixes: fa5d823b16a9 ("dmaengine: ptdma: Initial driver for the AMD PTDMA") Signed-off-by: Eric Pilmore Link: https://lore.kernel.org/r/20230119033907.35071-1-epilmore@gigaio.com Signed-off-by: Vinod Koul drivers/dma/ptdma/ptdma-dev.c | 7 ++++--- drivers/dma/ptdma/ptdma.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) commit 7d80dbd708c18c683dd34f79b600a05307707ce8 Author: Arnd Bergmann Date: Wed Jan 18 10:01:41 2023 +0100 usb: dwc3: fix extcon dependency The dwc3 core support now links against the extcon subsystem, so it cannot be built-in when extcon is a loadable module: arm-linux-gnueabi-ld: drivers/usb/dwc3/core.o: in function `dwc3_get_extcon': core.c:(.text+0x572): undefined reference to `extcon_get_edev_by_phandle' arm-linux-gnueabi-ld: core.c:(.text+0x596): undefined reference to `extcon_get_extcon_dev' arm-linux-gnueabi-ld: core.c:(.text+0x5ea): undefined reference to `extcon_find_edev_by_node' There was already a Kconfig dependency in the dual-role support, but this is now needed for the entire dwc3 driver. It is still possible to build dwc3 without extcon, but this prevents it from being set to built-in when extcon is a loadable module. Fixes: d182c2e1bc92 ("usb: dwc3: Don't switch OTG -> peripheral if extcon is present") Signed-off-by: Arnd Bergmann Reviewed-by: Andy Shevchenko Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20230118090147.2126563-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0220e4fe178c3390eb0291cdb34912d66972db8a Author: Nirmoy Das Date: Tue Jan 17 18:52:36 2023 +0100 drm/i915: Fix a memory leak with reused mmap_offset drm_vma_node_allow() and drm_vma_node_revoke() should be called in balanced pairs. We call drm_vma_node_allow() once per-file everytime a user calls mmap_offset, but only call drm_vma_node_revoke once per-file on each mmap_offset. As the mmap_offset is reused by the client, the per-file vm_count may remain non-zero and the rbtree leaked. Call drm_vma_node_allow_once() instead to prevent that memory leak. Cc: Tvrtko Ursulin Cc: Andi Shyti Signed-off-by: Nirmoy Das Fixes: 786555987207 ("drm/i915/gem: Store mmap_offsets in an rbtree rather than a plain list") Reported-by: Chuansheng Liu Reported-by: Mirsad Todorovac Reviewed-by: Tvrtko Ursulin Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20230117175236.22317-2-nirmoy.das@intel.com Signed-off-by: Maxime Ripard drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 899d3a3c19ac0e5da013ce34833dccb97d19b5e4 Author: Nirmoy Das Date: Tue Jan 17 18:52:35 2023 +0100 drm/drm_vma_manager: Add drm_vma_node_allow_once() Currently there is no easy way for a drm driver to safely check and allow drm_vma_offset_node for a drm file just once. Allow drm drivers to call non-refcounted version of drm_vma_node_allow() so that a driver doesn't need to keep track of each drm_vma_node_allow() to call subsequent drm_vma_node_revoke() to prevent memory leak. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Tvrtko Ursulin Cc: Andi Shyti Suggested-by: Chris Wilson Signed-off-by: Nirmoy Das Reviewed-by: Tvrtko Ursulin Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20230117175236.22317-1-nirmoy.das@intel.com Signed-off-by: Maxime Ripard drivers/gpu/drm/drm_vma_manager.c | 76 +++++++++++++++++++++++++++------------ include/drm/drm_vma_manager.h | 1 + 2 files changed, 55 insertions(+), 22 deletions(-) commit 55ba18dc62deff5910c0fa64486dea1ff20832ff Author: Kevin Hao Date: Wed Jan 18 15:13:00 2023 +0800 octeontx2-pf: Fix the use of GFP_KERNEL in atomic context on rt The commit 4af1b64f80fb ("octeontx2-pf: Fix lmtst ID used in aura free") uses the get/put_cpu() to protect the usage of percpu pointer in ->aura_freeptr() callback, but it also unnecessarily disable the preemption for the blockable memory allocation. The commit 87b93b678e95 ("octeontx2-pf: Avoid use of GFP_KERNEL in atomic context") tried to fix these sleep inside atomic warnings. But it only fix the one for the non-rt kernel. For the rt kernel, we still get the similar warnings like below. BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by swapper/0/1: #0: ffff800009fc5fe8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x24/0x30 #1: ffff000100c276c0 (&mbox->lock){+.+.}-{3:3}, at: otx2_init_hw_resources+0x8c/0x3a4 #2: ffffffbfef6537e0 (&cpu_rcache->lock){+.+.}-{2:2}, at: alloc_iova_fast+0x1ac/0x2ac Preemption disabled at: [] otx2_rq_aura_pool_init+0x14c/0x284 CPU: 20 PID: 1 Comm: swapper/0 Tainted: G W 6.2.0-rc3-rt1-yocto-preempt-rt #1 Hardware name: Marvell OcteonTX CN96XX board (DT) Call trace: dump_backtrace.part.0+0xe8/0xf4 show_stack+0x20/0x30 dump_stack_lvl+0x9c/0xd8 dump_stack+0x18/0x34 __might_resched+0x188/0x224 rt_spin_lock+0x64/0x110 alloc_iova_fast+0x1ac/0x2ac iommu_dma_alloc_iova+0xd4/0x110 __iommu_dma_map+0x80/0x144 iommu_dma_map_page+0xe8/0x260 dma_map_page_attrs+0xb4/0xc0 __otx2_alloc_rbuf+0x90/0x150 otx2_rq_aura_pool_init+0x1c8/0x284 otx2_init_hw_resources+0xe4/0x3a4 otx2_open+0xf0/0x610 __dev_open+0x104/0x224 __dev_change_flags+0x1e4/0x274 dev_change_flags+0x2c/0x7c ic_open_devs+0x124/0x2f8 ip_auto_config+0x180/0x42c do_one_initcall+0x90/0x4dc do_basic_setup+0x10c/0x14c kernel_init_freeable+0x10c/0x13c kernel_init+0x2c/0x140 ret_from_fork+0x10/0x20 Of course, we can shuffle the get/put_cpu() to only wrap the invocation of ->aura_freeptr() as what commit 87b93b678e95 does. But there are only two ->aura_freeptr() callbacks, otx2_aura_freeptr() and cn10k_aura_freeptr(). There is no usage of perpcu variable in the otx2_aura_freeptr() at all, so the get/put_cpu() seems redundant to it. We can move the get/put_cpu() into the corresponding callback which really has the percpu variable usage and avoid the sprinkling of get/put_cpu() in several places. Fixes: 4af1b64f80fb ("octeontx2-pf: Fix lmtst ID used in aura free") Signed-off-by: Kevin Hao Link: https://lore.kernel.org/r/20230118071300.3271125-1-haokexin@gmail.com Signed-off-by: Paolo Abeni drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 11 ++--------- drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h | 2 ++ 2 files changed, 4 insertions(+), 9 deletions(-) commit 3f4ca5fafc08881d7a57daa20449d171f2887043 Author: Jason Xing Date: Wed Jan 18 09:59:41 2023 +0800 tcp: avoid the lookup process failing to get sk in ehash table While one cpu is working on looking up the right socket from ehash table, another cpu is done deleting the request socket and is about to add (or is adding) the big socket from the table. It means that we could miss both of them, even though it has little chance. Let me draw a call trace map of the server side. CPU 0 CPU 1 ----- ----- tcp_v4_rcv() syn_recv_sock() inet_ehash_insert() -> sk_nulls_del_node_init_rcu(osk) __inet_lookup_established() -> __sk_nulls_add_node_rcu(sk, list) Notice that the CPU 0 is receiving the data after the final ack during 3-way shakehands and CPU 1 is still handling the final ack. Why could this be a real problem? This case is happening only when the final ack and the first data receiving by different CPUs. Then the server receiving data with ACK flag tries to search one proper established socket from ehash table, but apparently it fails as my map shows above. After that, the server fetches a listener socket and then sends a RST because it finds a ACK flag in the skb (data), which obeys RST definition in RFC 793. Besides, Eric pointed out there's one more race condition where it handles tw socket hashdance. Only by adding to the tail of the list before deleting the old one can we avoid the race if the reader has already begun the bucket traversal and it would possibly miss the head. Many thanks to Eric for great help from beginning to end. Fixes: 5e0724d027f0 ("tcp/dccp: fix hashdance race for passive sessions") Suggested-by: Eric Dumazet Signed-off-by: Jason Xing Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/lkml/20230112065336.41034-1-kerneljasonxing@gmail.com/ Link: https://lore.kernel.org/r/20230118015941.1313-1-kerneljasonxing@gmail.com Signed-off-by: Paolo Abeni net/ipv4/inet_hashtables.c | 17 +++++++++++++++-- net/ipv4/inet_timewait_sock.c | 8 ++++---- 2 files changed, 19 insertions(+), 6 deletions(-) commit cec669ff716cc83505c77b242aecf6f7baad869d Author: Manivannan Sadhasivam Date: Wed Jan 18 20:38:48 2023 +0530 EDAC/device: Respect any driver-supplied workqueue polling value The EDAC drivers may optionally pass the poll_msec value. Use that value if available, else fall back to 1000ms. [ bp: Touchups. ] Fixes: e27e3dac6517 ("drivers/edac: add edac_device class") Reported-by: Luca Weiss Signed-off-by: Manivannan Sadhasivam Signed-off-by: Borislav Petkov (AMD) Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride Cc: # 4.9 Link: https://lore.kernel.org/r/COZYL8MWN97H.MROQ391BGA09@otso drivers/edac/edac_device.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit b9cee506da2b7920b5ea02ccd8e78a907d0ee7aa Author: Artemii Karasev Date: Thu Jan 19 00:22:59 2023 -0800 ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path() snd_hda_get_connections() can return a negative error code. It may lead to accessing 'conn' array at a negative index. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Artemii Karasev Fixes: 30b4503378c9 ("ALSA: hda - Expose secret DAC-AA connection of some VIA codecs") Link: https://lore.kernel.org/r/20230119082259.3634-1-karasev@ispras.ru Signed-off-by: Takashi Iwai sound/pci/hda/patch_via.c | 3 +++ 1 file changed, 3 insertions(+) commit 1104693cdfcd337e73ab585a225f05445ff7a864 Author: Jonas Karlman Date: Sun Jan 15 21:15:56 2023 +0000 arm64: dts: rockchip: fix probe of analog sound card on rock-3a The following was observed on my Radxa ROCK 3 Model A board: rockchip-pinctrl pinctrl: pin gpio1-9 already requested by vcc-cam-regulator; cannot claim for fe410000.i2s ... platform rk809-sound: deferred probe pending Fix this by supplying a board specific pinctrl with the i2s1 pins used by pmic codec according to the schematic [1]. [1] https://dl.radxa.com/rock3/docs/hw/3a/ROCK-3A-V1.3-SCH.pdf Signed-off-by: Jonas Karlman Acked-by: Michael Riesch Link: https://lore.kernel.org/r/20230115211553.445007-1-jonas@kwiboo.se Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 ++ 1 file changed, 2 insertions(+) commit 86d884f5287f4369c198811aaa4931a3a11f36d2 Author: Geert Uytterhoeven Date: Tue Jan 3 17:45:30 2023 +0100 clk: microchip: mpfs-ccc: Use devm_kasprintf() for allocating formatted strings In various places, string buffers of a fixed size are allocated, and filled using snprintf() with the same fixed size, which is error-prone. Replace this by calling devm_kasprintf() instead, which always uses the appropriate size. While at it, remove an unneeded intermediate variable, which allows us to drop a cast as a bonus. With the initial behavior it would have been possible to have a device tree with a node address that would make "ccc_pll" exceed 18 characters. If that happened, the would be cut off & both pll 0 & 1 would be named identically. If that happens, pll1 would fail to register. Thus, the fixes tag has been added to this commit. Fixes: d39fb172760e ("clk: microchip: add PolarFire SoC fabric clock support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Conor Dooley Tested-by: Conor Dooley [claudiu.beznea: added the rationale behind fixes tag] Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/f904fd28b2087d1463ea65f059924e3b1acc193c.1672764239.git.geert+renesas@glider.be drivers/clk/microchip/clk-mpfs-ccc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 1c5842085851f786eba24a39ecd02650ad892064 Author: Keith Busch Date: Wed Jan 18 08:44:16 2023 -0800 nvme-pci: fix timeout request state check Polling the completion can progress the request state to IDLE, either inline with the completion, or through softirq. Either way, the state may not be COMPLETED, so don't check for that. We only care if the state isn't IN_FLIGHT. This is fixing an issue where the driver aborts an IO that we just completed. Seeing the "aborting" message instead of "polled" is very misleading as to where the timeout problem resides. Fixes: bf392a5dc02a9b ("nvme-pci: Remove tag from process cq") Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0a4a1eafbd48e02829045bba3e6163c03037276 Author: Janne Grunau Date: Tue Jan 17 19:25:01 2023 +0100 nvme-apple: only reset the controller when RTKit is running NVMe controller register access hangs indefinitely when the co-processor is not running. A missed reset is preferable over a hanging thread since it could be recoverable. Signed-off-by: Janne Grunau Signed-off-by: Christoph Hellwig drivers/nvme/host/apple.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c06ba7b892a50b48522ad441a40053f483dfee9e Author: Janne Grunau Date: Tue Jan 17 19:25:00 2023 +0100 nvme-apple: reset controller during shutdown This is a functional revert of c76b8308e4c9 ("nvme-apple: fix controller shutdown in apple_nvme_disable"). The commit broke suspend/resume since apple_nvme_reset_work() tries to disable the controller on resume. This does not work for the apple NVMe controller since register access only works while the co-processor firmware is running. Disabling the NVMe controller in the shutdown path is also required for shutting the co-processor down. The original code was appropriate for this hardware. Add a comment to prevent a similar breaking changes in the future. Fixes: c76b8308e4c9 ("nvme-apple: fix controller shutdown in apple_nvme_disable") Reported-by: Janne Grunau Link: https://lore.kernel.org/all/20230110174745.GA3576@jannau.net/ Signed-off-by: Janne Grunau [hch: updated with a more descriptive comment from Hector Martin] Signed-off-by: Christoph Hellwig drivers/nvme/host/apple.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 4fb58ac3368c6058e61194ec047a5503059d90ae Author: Xin Long Date: Tue Jan 17 13:42:12 2023 -0500 Revert "net: team: use IFF_NO_ADDRCONF flag to prevent ipv6 addrconf" This reverts commit 0aa64df30b382fc71d4fb1827d528e0eb3eff854. Currently IFF_NO_ADDRCONF is used to prevent all ipv6 addrconf for the slave ports of team, bonding and failover devices and it means no ipv6 packets can be sent out through these slave ports. However, for team device, "nsna_ping" link_watch requires ipv6 addrconf. Otherwise, the link will be marked failure. This patch removes the IFF_NO_ADDRCONF flag set for team port, and we will fix the original issue in another patch, as Jakub suggested. Fixes: 0aa64df30b38 ("net: team: use IFF_NO_ADDRCONF flag to prevent ipv6 addrconf") Signed-off-by: Xin Long Link: https://lore.kernel.org/r/63e09531fc47963d2e4eff376653d3db21b97058.1673980932.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski drivers/net/team/team.c | 2 -- 1 file changed, 2 deletions(-) commit e0be11a833e8447f51f428b213c91a9b05601815 Author: Jakub Kicinski Date: Tue Jan 17 11:01:41 2023 -0800 MAINTAINERS: add networking entries for Willem We often have to ping Willem asking for reviews of patches because he doesn't get included in the CC list. Add MAINTAINERS entries for some of the areas he covers so that ./scripts/ will know to add him. Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/20230117190141.60795-1-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 339346d49ae0859fe19b860998867861d37f1a76 Author: Jakub Kicinski Date: Thu Jan 12 20:41:37 2023 -0800 net: sched: gred: prevent races when adding offloads to stats Naresh reports seeing a warning that gred is calling u64_stats_update_begin() with preemption enabled. Arnd points out it's coming from _bstats_update(). We should be holding the qdisc lock when writing to stats, they are also updated from the datapath. Reported-by: Linux Kernel Functional Testing Link: https://lore.kernel.org/all/CA+G9fYsTr9_r893+62u6UGD3dVaCE-kN9C-Apmb2m=hxjc1Cqg@mail.gmail.com/ Fixes: e49efd5288bd ("net: sched: gred: support reporting stats from offloads") Link: https://lore.kernel.org/r/20230113044137.1383067-1-kuba@kernel.org Signed-off-by: Jakub Kicinski net/sched/sch_gred.c | 2 ++ 1 file changed, 2 insertions(+) commit a52287d66dfa1cca32e6273623b63ba39d87f126 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) commit e78cc6a4c7486f50c2786d91dd7d9649a87d1dcb 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) commit dc88063b87775971be564d79dc1b05f7b8b5c135 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 3 +++ 1 file changed, 3 insertions(+) commit 0ddadc3a2208aedb1b27dbb76d0b4e722b5b527a 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit e433adc60f7f847e734c56246b09291532f29b6d 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 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ---- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 - 2 files changed, 5 deletions(-) commit 74ea8e78ab349514c9f4df0be1189d91267d750d 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 Cc: stable@vger.kernel.org # 6.1.x drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 973a9c810c785ac270a6d50d8cf862b0c1643a10 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 Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 79601b894849cb6f6d6122e6590f1887ac4a66b3 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 Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4463b1eea28ad733ca5cb53d89371132a57b1db3 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 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 1 + 1 file changed, 1 insertion(+) commit edb5b63e5673add742a860814a4f43ff213178ea Merge: b9fb10d131b8 80f8a66dede0 Author: Jakub Kicinski Date: Wed Jan 18 20:10:31 2023 -0800 Merge tag 'wireless-2023-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.2 Third set of fixes for v6.2. This time most of them are for drivers, only one revert for mac80211. For an important mt76 fix we had to cherry pick two commits from wireless-next. * tag 'wireless-2023-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: Revert "wifi: mac80211: fix memory leak in ieee80211_if_add()" wifi: mt76: dma: fix a regression in adding rx buffers wifi: mt76: handle possible mt76_rx_token_consume failures wifi: mt76: dma: do not increment queue head if mt76_dma_add_buf fails wifi: rndis_wlan: Prevent buffer overflow in rndis_query_oid wifi: brcmfmac: fix regression for Broadcom PCIe wifi devices wifi: brcmfmac: avoid NULL-deref in survey dump for 2G only device wifi: brcmfmac: avoid handling disabled channels for survey dump ==================== Link: https://lore.kernel.org/r/20230118073749.AF061C433EF@smtp.kernel.org Signed-off-by: Jakub Kicinski commit c7bae4aaa5609c1fa9761c35dbcc5fcc92915222 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 Cc: stable@vger.kernel.org drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 040625ab82ce6dca7772cb3867fe5c9eb279a344 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 Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bdb7fdb0aca8b96cef9995d3a57e251c2289322f Author: Yonghong Song Date: Wed Jan 18 12:48:15 2023 -0800 bpf: Fix a possible task gone issue with bpf_send_signal[_thread]() helpers In current bpf_send_signal() and bpf_send_signal_thread() helper implementation, irq_work is used to handle nmi context. Hao Sun reported in [1] that the current task at the entry of the helper might be gone during irq_work callback processing. To fix the issue, a reference is acquired for the current task before enqueuing into the irq_work so that the queued task is still available during irq_work callback processing. [1] https://lore.kernel.org/bpf/20230109074425.12556-1-sunhao.th@gmail.com/ Fixes: 8b401f9ed244 ("bpf: implement bpf_send_signal() helper") Tested-by: Hao Sun Reported-by: Hao Sun Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20230118204815.3331855-1-yhs@fb.com Signed-off-by: Alexei Starovoitov kernel/trace/bpf_trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 36024d023d139a0c8b552dc3b7f4dc7b4c139e8f Author: Hou Tao Date: Wed Jan 18 16:46:30 2023 +0800 bpf: Fix off-by-one error in bpf_mem_cache_idx() According to the definition of sizes[NUM_CACHES], when the size passed to bpf_mem_cache_size() is 256, it should return 6 instead 7. Fixes: 7c8199e24fa0 ("bpf: Introduce any context BPF specific memory allocator.") Signed-off-by: Hou Tao Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20230118084630.3750680-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/memalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ca2c535f5a07f01118a6a70bfab78576e02fcae Author: Peter Xu Date: Mon Jan 16 11:33:07 2023 -0500 selftests/vm: remove __USE_GNU in hugetlb-madvise.c __USE_GNU should be an internal macro only used inside glibc. Either memfd_create() or fallocate() requires _GNU_SOURCE per man page, where __USE_GNU will further be defined by glibc headers include/features.h: #ifdef _GNU_SOURCE # define __USE_GNU 1 #endif This fixes: >> hugetlb-madvise.c:20: warning: "__USE_GNU" redefined 20 | #define __USE_GNU | In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/include/stdlib.h:26, from hugetlb-madvise.c:16: /usr/include/features.h:407: note: this is the location of the previous definition 407 | # define __USE_GNU 1 | Link: https://lkml.kernel.org/r/Y8V9z+z6Tk7NetI3@x1n Signed-off-by: Peter Xu Reported-by: kernel test robot Cc: Mike Kravetz Signed-off-by: Andrew Morton tools/testing/selftests/vm/hugetlb-madvise.c | 1 - 1 file changed, 1 deletion(-) commit 7e3ce3f8d2d235f916baad1582f6cf12e0319013 Author: Peter Xu Date: Wed Dec 14 15:04:53 2022 -0500 mm: fix a few rare cases of using swapin error pte marker This patch should harden commit 15520a3f0469 ("mm: use pte markers for swap errors") on using pte markers for swapin errors on a few corner cases. 1. Propagate swapin errors across fork()s: if there're swapin errors in the parent mm, after fork()s the child should sigbus too when an error page is accessed. 2. Fix a rare condition race in pte_marker_clear() where a uffd-wp pte marker can be quickly switched to a swapin error. 3. Explicitly ignore swapin error pte markers in change_protection(). I mostly don't worry on (2) or (3) at all, but we should still have them. Case (1) is special because it can potentially cause silent data corrupt on child when parent has swapin error triggered with swapoff, but since swapin error is rare itself already it's probably not easy to trigger either. Currently there is a priority difference between the uffd-wp bit and the swapin error entry, in which the swapin error always has higher priority (e.g. we don't need to wr-protect a swapin error pte marker). If there will be a 3rd bit introduced, we'll probably need to consider a more involved approach so we may need to start operate on the bits. Let's leave that for later. This patch is tested with case (1) explicitly where we'll get corrupted data before in the child if there's existing swapin error pte markers, and after patch applied the child can be rightfully killed. We don't need to copy stable for this one since 15520a3f0469 just landed as part of v6.2-rc1, only "Fixes" applied. Link: https://lkml.kernel.org/r/20221214200453.1772655-3-peterx@redhat.com Fixes: 15520a3f0469 ("mm: use pte markers for swap errors") Signed-off-by: Peter Xu Acked-by: David Hildenbrand Reviewed-by: Miaohe Lin Cc: Andrea Arcangeli Cc: "Huang, Ying" Cc: Nadav Amit Cc: Pengfei Xu Signed-off-by: Andrew Morton mm/hugetlb.c | 3 +++ mm/memory.c | 8 ++++++-- mm/mprotect.c | 8 +++++++- 3 files changed, 16 insertions(+), 3 deletions(-) commit 49d6d7fb631345b0f2957a7c4be24ad63903150f Author: Peter Xu Date: Wed Dec 14 15:04:52 2022 -0500 mm/uffd: fix pte marker when fork() without fork event Patch series "mm: Fixes on pte markers". Patch 1 resolves the syzkiller report from Pengfei. Patch 2 further harden pte markers when used with the recent swapin error markers. The major case is we should persist a swapin error marker after fork(), so child shouldn't read a corrupted page. This patch (of 2): When fork(), dst_vma is not guaranteed to have VM_UFFD_WP even if src may have it and has pte marker installed. The warning is improper along with the comment. The right thing is to inherit the pte marker when needed, or keep the dst pte empty. A vague guess is this happened by an accident when there's the prior patch to introduce src/dst vma into this helper during the uffd-wp feature got developed and I probably messed up in the rebase, since if we replace dst_vma with src_vma the warning & comment it all makes sense too. Hugetlb did exactly the right here (copy_hugetlb_page_range()). Fix the general path. Reproducer: https://github.com/xupengfe/syzkaller_logs/blob/main/221208_115556_copy_page_range/repro.c Bugzilla report: https://bugzilla.kernel.org/show_bug.cgi?id=216808 Link: https://lkml.kernel.org/r/20221214200453.1772655-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20221214200453.1772655-2-peterx@redhat.com Fixes: c56d1b62cce8 ("mm/shmem: handle uffd-wp during fork()") Signed-off-by: Peter Xu Reported-by: Pengfei Xu Acked-by: David Hildenbrand Reviewed-by: Miaohe Lin Cc: Andrea Arcangeli Cc: "Huang, Ying" Cc: Nadav Amit Cc: # 5.19+ Signed-off-by: Andrew Morton mm/memory.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit bd86d2ea369be2e768b58cba590e70b8bdc6f86a Merge: 19fa92fb72f8 5dc4c995db9e Author: Andrew Morton Date: Wed Jan 18 16:52:20 2023 -0800 Sync with v6.2-rc4 Merge branch 'master' into mm-hotfixes-stable commit 0bfe63d075789456e9589457b29d6f9c279e3252 Author: Bart Van Assche Date: Wed Jan 18 10:05:57 2023 -0800 scsi: device_handler: alua: Remove a might_sleep() annotation The might_sleep() annotation in alua_rtpg_queue() is not correct since the command completion code may call this function from atomic context. Calling alua_rtpg_queue() from atomic context in the command completion path is fine since request submitters must hold an sdev reference until command execution has completed. This patch fixes the following kernel complaint: BUG: sleeping function called from invalid context at drivers/scsi/device_handler/scsi_dh_alua.c:992 Call Trace: dump_stack_lvl+0xac/0x100 __might_resched+0x284/0x2c8 alua_rtpg_queue+0x3c/0x98 [scsi_dh_alua] alua_check+0x122/0x250 [scsi_dh_alua] alua_check_sense+0x172/0x228 [scsi_dh_alua] scsi_check_sense+0x8a/0x2e0 scsi_decide_disposition+0x286/0x298 scsi_complete+0x6a/0x108 blk_complete_reqs+0x6e/0x88 __do_softirq+0x13e/0x6b8 __irq_exit_rcu+0x14a/0x170 irq_exit_rcu+0x22/0x50 do_ext_irq+0x10a/0x1d0 Link: https://lore.kernel.org/r/20230118180557.1212577-1-bvanassche@acm.org Reported-by: Steffen Maier Reviewed-by: Martin Wilck Tested-by: Steffen Maier Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f484a794e4ee2a9ce61f52a78e810ac45f3fe3b3 Author: Mike Christie Date: Tue Jan 17 13:39:37 2023 -0600 scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress If during iscsi_sw_tcp_session_create() iscsi_tcp_r2tpool_alloc() fails, userspace could be accessing the host's ipaddress attr. If we then free the session via iscsi_session_teardown() while userspace is still accessing the session we will hit a use after free bug. Set the tcp_sw_host->session after we have completed session creation and can no longer fail. Link: https://lore.kernel.org/r/20230117193937.21244-3-michael.christie@oracle.com Signed-off-by: Mike Christie Reviewed-by: Lee Duncan Acked-by: Ding Hui Signed-off-by: Martin K. Petersen drivers/scsi/iscsi_tcp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6f1d64b13097e85abda0f91b5638000afc5f9a06 Author: Mike Christie Date: Tue Jan 17 13:39:36 2023 -0600 scsi: iscsi_tcp: Fix UAF during logout when accessing the shost ipaddress Bug report and analysis from Ding Hui. During iSCSI session logout, if another task accesses the shost ipaddress attr, we can get a KASAN UAF report like this: [ 276.942144] BUG: KASAN: use-after-free in _raw_spin_lock_bh+0x78/0xe0 [ 276.942535] Write of size 4 at addr ffff8881053b45b8 by task cat/4088 [ 276.943511] CPU: 2 PID: 4088 Comm: cat Tainted: G E 6.1.0-rc8+ #3 [ 276.943997] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020 [ 276.944470] Call Trace: [ 276.944943] [ 276.945397] dump_stack_lvl+0x34/0x48 [ 276.945887] print_address_description.constprop.0+0x86/0x1e7 [ 276.946421] print_report+0x36/0x4f [ 276.947358] kasan_report+0xad/0x130 [ 276.948234] kasan_check_range+0x35/0x1c0 [ 276.948674] _raw_spin_lock_bh+0x78/0xe0 [ 276.949989] iscsi_sw_tcp_host_get_param+0xad/0x2e0 [iscsi_tcp] [ 276.951765] show_host_param_ISCSI_HOST_PARAM_IPADDRESS+0xe9/0x130 [scsi_transport_iscsi] [ 276.952185] dev_attr_show+0x3f/0x80 [ 276.953005] sysfs_kf_seq_show+0x1fb/0x3e0 [ 276.953401] seq_read_iter+0x402/0x1020 [ 276.954260] vfs_read+0x532/0x7b0 [ 276.955113] ksys_read+0xed/0x1c0 [ 276.955952] do_syscall_64+0x38/0x90 [ 276.956347] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 276.956769] RIP: 0033:0x7f5d3a679222 [ 276.957161] Code: c0 e9 b2 fe ff ff 50 48 8d 3d 32 c0 0b 00 e8 a5 fe 01 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24 [ 276.958009] RSP: 002b:00007ffc864d16a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 276.958431] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f5d3a679222 [ 276.958857] RDX: 0000000000020000 RSI: 00007f5d3a4fe000 RDI: 0000000000000003 [ 276.959281] RBP: 00007f5d3a4fe000 R08: 00000000ffffffff R09: 0000000000000000 [ 276.959682] R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000020000 [ 276.960126] R13: 0000000000000003 R14: 0000000000000000 R15: 0000557a26dada58 [ 276.960536] [ 276.961357] Allocated by task 2209: [ 276.961756] kasan_save_stack+0x1e/0x40 [ 276.962170] kasan_set_track+0x21/0x30 [ 276.962557] __kasan_kmalloc+0x7e/0x90 [ 276.962923] __kmalloc+0x5b/0x140 [ 276.963308] iscsi_alloc_session+0x28/0x840 [scsi_transport_iscsi] [ 276.963712] iscsi_session_setup+0xda/0xba0 [libiscsi] [ 276.964078] iscsi_sw_tcp_session_create+0x1fd/0x330 [iscsi_tcp] [ 276.964431] iscsi_if_create_session.isra.0+0x50/0x260 [scsi_transport_iscsi] [ 276.964793] iscsi_if_recv_msg+0xc5a/0x2660 [scsi_transport_iscsi] [ 276.965153] iscsi_if_rx+0x198/0x4b0 [scsi_transport_iscsi] [ 276.965546] netlink_unicast+0x4d5/0x7b0 [ 276.965905] netlink_sendmsg+0x78d/0xc30 [ 276.966236] sock_sendmsg+0xe5/0x120 [ 276.966576] ____sys_sendmsg+0x5fe/0x860 [ 276.966923] ___sys_sendmsg+0xe0/0x170 [ 276.967300] __sys_sendmsg+0xc8/0x170 [ 276.967666] do_syscall_64+0x38/0x90 [ 276.968028] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 276.968773] Freed by task 2209: [ 276.969111] kasan_save_stack+0x1e/0x40 [ 276.969449] kasan_set_track+0x21/0x30 [ 276.969789] kasan_save_free_info+0x2a/0x50 [ 276.970146] __kasan_slab_free+0x106/0x190 [ 276.970470] __kmem_cache_free+0x133/0x270 [ 276.970816] device_release+0x98/0x210 [ 276.971145] kobject_cleanup+0x101/0x360 [ 276.971462] iscsi_session_teardown+0x3fb/0x530 [libiscsi] [ 276.971775] iscsi_sw_tcp_session_destroy+0xd8/0x130 [iscsi_tcp] [ 276.972143] iscsi_if_recv_msg+0x1bf1/0x2660 [scsi_transport_iscsi] [ 276.972485] iscsi_if_rx+0x198/0x4b0 [scsi_transport_iscsi] [ 276.972808] netlink_unicast+0x4d5/0x7b0 [ 276.973201] netlink_sendmsg+0x78d/0xc30 [ 276.973544] sock_sendmsg+0xe5/0x120 [ 276.973864] ____sys_sendmsg+0x5fe/0x860 [ 276.974248] ___sys_sendmsg+0xe0/0x170 [ 276.974583] __sys_sendmsg+0xc8/0x170 [ 276.974891] do_syscall_64+0x38/0x90 [ 276.975216] entry_SYSCALL_64_after_hwframe+0x63/0xcd We can easily reproduce by two tasks: 1. while :; do iscsiadm -m node --login; iscsiadm -m node --logout; done 2. while :; do cat \ /sys/devices/platform/host*/iscsi_host/host*/ipaddress; done iscsid | cat --------------------------------+--------------------------------------- |- iscsi_sw_tcp_session_destroy | |- iscsi_session_teardown | |- device_release | |- iscsi_session_release ||- dev_attr_show |- kfree | |- show_host_param_ | ISCSI_HOST_PARAM_IPADDRESS | |- iscsi_sw_tcp_host_get_param | |- r/w tcp_sw_host->session (UAF) |- iscsi_host_remove | |- iscsi_host_free | Fix the above bug by splitting the session removal into 2 parts: 1. removal from iSCSI class which includes sysfs and removal from host tracking. 2. freeing of session. During iscsi_tcp host and session removal we can remove the session from sysfs then remove the host from sysfs. At this point we know userspace is not accessing the kernel via sysfs so we can free the session and host. Link: https://lore.kernel.org/r/20230117193937.21244-2-michael.christie@oracle.com Signed-off-by: Mike Christie Reviewed-by: Lee Duncan Acked-by: Ding Hui Signed-off-by: Martin K. Petersen drivers/scsi/iscsi_tcp.c | 11 +++++++++-- drivers/scsi/libiscsi.c | 38 +++++++++++++++++++++++++++++++------- include/scsi/libiscsi.h | 2 ++ 3 files changed, 42 insertions(+), 9 deletions(-) commit ba81043753fffbc2ad6e0c5ff2659f12ac2f46b4 Author: Johan Hovold Date: Mon Jan 16 17:12:01 2023 +0100 scsi: ufs: core: Fix devfreq deadlocks There is a lock inversion and rwsem read-lock recursion in the devfreq target callback which can lead to deadlocks. Specifically, ufshcd_devfreq_scale() already holds a clk_scaling_lock read lock when toggling the write booster, which involves taking the dev_cmd mutex before taking another clk_scaling_lock read lock. This can lead to a deadlock if another thread: 1) tries to acquire the dev_cmd and clk_scaling locks in the correct order, or 2) takes a clk_scaling write lock before the attempt to take the clk_scaling read lock a second time. Fix this by dropping the clk_scaling_lock before toggling the write booster as was done before commit 0e9d4ca43ba8 ("scsi: ufs: Protect some contexts from unexpected clock scaling"). While the devfreq callbacks are already serialised, add a second serialising mutex to handle the unlikely case where a callback triggered through the devfreq sysfs interface is racing with a request to disable clock scaling through the UFS controller 'clkscale_enable' sysfs attribute. This could otherwise lead to the write booster being left disabled after having disabled clock scaling. Also take the new mutex in ufshcd_clk_scaling_allow() to make sure that any pending write booster update has completed on return. Note that this currently only affects Qualcomm platforms since commit 87bd05016a64 ("scsi: ufs: core: Allow host driver to disable wb toggling during clock scaling"). The lock inversion (i.e. 1 above) was reported by lockdep as: ====================================================== WARNING: possible circular locking dependency detected 6.1.0-next-20221216 #211 Not tainted ------------------------------------------------------ kworker/u16:2/71 is trying to acquire lock: ffff076280ba98a0 (&hba->dev_cmd.lock){+.+.}-{3:3}, at: ufshcd_query_flag+0x50/0x1c0 but task is already holding lock: ffff076280ba9cf0 (&hba->clk_scaling_lock){++++}-{3:3}, at: ufshcd_devfreq_scale+0x2b8/0x380 which lock already depends on the new lock. [ +0.011606] the existing dependency chain (in reverse order) is: -> #1 (&hba->clk_scaling_lock){++++}-{3:3}: lock_acquire+0x68/0x90 down_read+0x58/0x80 ufshcd_exec_dev_cmd+0x70/0x2c0 ufshcd_verify_dev_init+0x68/0x170 ufshcd_probe_hba+0x398/0x1180 ufshcd_async_scan+0x30/0x320 async_run_entry_fn+0x34/0x150 process_one_work+0x288/0x6c0 worker_thread+0x74/0x450 kthread+0x118/0x120 ret_from_fork+0x10/0x20 -> #0 (&hba->dev_cmd.lock){+.+.}-{3:3}: __lock_acquire+0x12a0/0x2240 lock_acquire.part.0+0xcc/0x220 lock_acquire+0x68/0x90 __mutex_lock+0x98/0x430 mutex_lock_nested+0x2c/0x40 ufshcd_query_flag+0x50/0x1c0 ufshcd_query_flag_retry+0x64/0x100 ufshcd_wb_toggle+0x5c/0x120 ufshcd_devfreq_scale+0x2c4/0x380 ufshcd_devfreq_target+0xf4/0x230 devfreq_set_target+0x84/0x2f0 devfreq_update_target+0xc4/0xf0 devfreq_monitor+0x38/0x1f0 process_one_work+0x288/0x6c0 worker_thread+0x74/0x450 kthread+0x118/0x120 ret_from_fork+0x10/0x20 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&hba->clk_scaling_lock); lock(&hba->dev_cmd.lock); lock(&hba->clk_scaling_lock); lock(&hba->dev_cmd.lock); *** DEADLOCK *** Fixes: 0e9d4ca43ba8 ("scsi: ufs: Protect some contexts from unexpected clock scaling") Cc: stable@vger.kernel.org # 5.12 Cc: Can Guo Tested-by: Andrew Halaney Signed-off-by: Johan Hovold Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20230116161201.16923-1-johan+linaro@kernel.org Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 29 +++++++++++++++-------------- include/ufs/ufshcd.h | 2 ++ 2 files changed, 17 insertions(+), 14 deletions(-) commit bbbd25499100c810ceaf5193c3cfcab9f7402a33 Author: Alexey V. Vissarionov Date: Wed Jan 18 06:12:55 2023 +0300 scsi: hpsa: Fix allocation size for scsi_host_alloc() The 'h' is a pointer to struct ctlr_info, so it's just 4 or 8 bytes, while the structure itself is much bigger. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: edd163687ea5 ("hpsa: add driver for HP Smart Array controllers.") Link: https://lore.kernel.org/r/20230118031255.GE15213@altlinux.org Signed-off-by: Alexey V. Vissarionov Acked-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7287904c8771b77b9504f53623bb477065c19a58 Merge: 7026172bc334 3782c0d6edf6 Author: Linus Torvalds Date: Wed Jan 18 14:44:32 2023 -0800 Merge tag 'for-linus-2023011801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - fixes for potential empty list handling in HID core (Pietro Borrello) - fix for NULL pointer dereference in betop driver that could be triggered by malicious device (Pietro Borrello) - fixes for handling calibration data preventing division by zero in Playstation driver (Roderick Colenbrander) - fix for memory leak on error path in amd-sfh driver (Basavaraj Natikar) - other few assorted small fixes and device ID-specific handling * tag 'for-linus-2023011801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: betop: check shape of output reports HID: playstation: sanity check DualSense calibration data. HID: playstation: sanity check DualShock4 calibration data. HID: uclogic: Add support for XP-PEN Deco 01 V2 HID: revert CHERRY_MOUSE_000C quirk HID: check empty report_list in bigben_probe() HID: check empty report_list in hid_validate_values() HID: amd_sfh: Fix warning unwind goto HID: intel_ish-hid: Add check for ishtp_dma_tx_map commit a1b7c8457ecc062f612a1aca174c2e1c21f9ac10 Author: Paulo Alcantara Date: Wed Jan 18 13:55:01 2023 -0300 cifs: remove unused function Remove dfs_cache_update_tgthint() as it is not used anywhere. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/dfs_cache.c | 60 ----------------------------------------------------- fs/cifs/dfs_cache.h | 3 --- 2 files changed, 63 deletions(-) commit 30b2b2196d6e4cc24cbec633535a2404f258ce69 Author: Enzo Matsumiya Date: Wed Jan 18 14:06:57 2023 -0300 cifs: do not include page data when checking signature On async reads, page data is allocated before sending. When the response is received but it has no data to fill (e.g. STATUS_END_OF_FILE), __calc_signature() will still include the pages in its computation, leading to an invalid signature check. This patch fixes this by not setting the async read smb_rqst page data (zeroed by default) if its got_bytes is 0. This can be reproduced/verified with xfstests generic/465. Cc: Signed-off-by: Enzo Matsumiya Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/smb2pdu.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 182da6f2b81a78709c58021542fb694f8ed80774 Author: Ard Biesheuvel Date: Thu Jan 12 14:33:19 2023 +0100 ACPI: PRM: Check whether EFI runtime is available The ACPI PRM address space handler calls efi_call_virt_pointer() to execute PRM firmware code, but doing so is only permitted when the EFI runtime environment is available. Otherwise, such calls are guaranteed to result in a crash, and must therefore be avoided. Given that the EFI runtime services may become unavailable after a crash occurring in the firmware, we need to check this each time the PRM address space handler is invoked. If the EFI runtime services were not available at registration time to being with, don't install the address space handler at all. Fixes: cefc7ca46235 ("ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype") Signed-off-by: Ard Biesheuvel Cc: All applicable Signed-off-by: Rafael J. Wysocki drivers/acpi/prmt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2293a73ad4f3b6c37c06713ff1b67659d92ef43d Author: Nirmoy Das Date: Wed Jan 18 18:06:24 2023 +0100 drm/i915: Remove unused variable Removed unused i915 var. Fixes: a273e95721e9 ("drm/i915: Allow switching away via vga-switcheroo if uninitialized") Signed-off-by: Nirmoy Das Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230118170624.9326-1-nirmoy.das@intel.com Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_driver.c | 2 -- 1 file changed, 2 deletions(-) commit 7026172bc334300652cb36d59b392c1a6b20926a Merge: 5fbad44dddf5 eef034ac6690 Author: Linus Torvalds Date: Wed Jan 18 09:54:27 2023 -0800 Merge tag 'affs-for-6.2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull affs fix from David Sterba: "One minor fix for a KCSAN report" * tag 'affs-for-6.2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: affs: initialize fsdata in affs_truncate() commit 5fbad44dddf560ba03e247352e8040992c7e95e8 Merge: 84bd7e08a79a e02ac3e7329f Author: Linus Torvalds Date: Wed Jan 18 09:50:23 2023 -0800 Merge tag 'erofs-for-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: "Two patches fixes issues reported by syzbot, one fixes a missing `domain_id` mount option in documentation and a minor cleanup: - Fix wrong iomap->length calculation post EOF, which could cause a WARN_ON in iomap_iter_done() (Siddh) - Fix improper kvcalloc() use with __GFP_NOFAIL (me) - Add missing `domain_id` mount option in documentation (Jingbo) - Clean up fscache option parsing (Jingbo)" * tag 'erofs-for-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: clean up parsing of fscache related options erofs: add documentation for 'domain_id' mount option erofs: fix kvcalloc() misuse with __GFP_NOFAIL erofs/zmap.c: Fix incorrect offset calculation commit 84bd7e08a79a5d3153c3a5805a1347a8dc979f35 Merge: c1649ec55708 dc74a9e8a8c5 Author: Linus Torvalds Date: Wed Jan 18 09:32:54 2023 -0800 Merge tag 'loongarch-fixes-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Fix a missing elf_hwcap, fix some stack unwinder bugs and two trivial cleanups" * tag 'loongarch-fixes-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: Add generic ex-handler unwind in prologue unwinder LoongArch: Strip guess unwinder out from prologue unwinder LoongArch: Use correct sp value to get graph addr in stack unwinders LoongArch: Get frame info in unwind_start() when regs is not available LoongArch: Adjust PC value when unwind next frame in unwinder LoongArch: Simplify larch_insn_gen_xxx implementation LoongArch: Use common function sign_extend64() LoongArch: Add HWCAP_LOONGARCH_CPUCFG to elf_hwcap commit bc30c15f275484f9b9fe27c2fa0895f3022d9943 Author: Geert Uytterhoeven Date: Wed Jan 18 11:29:58 2023 +0100 phy: phy-can-transceiver: Skip warning if no "max-bitrate" According to the DT bindings, the "max-bitrate" property is optional. However, when it is not present, a warning is printed. Fix this by adding a missing check for -EINVAL. Fixes: a4a86d273ff1b6f7 ("phy: phy-can-transceiver: Add support for generic CAN transceiver driver") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/88e158f97dd52ebaa7126cd9631f34764b9c0795.1674037334.git.geert+renesas@glider.be Signed-off-by: Vinod Koul drivers/phy/phy-can-transceiver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c63835bf1c750c9b3aec1d5c23d811d6375fc23d Author: Heiner Kallweit Date: Mon Jan 16 21:17:39 2023 +0100 dt-bindings: phy: g12a-usb2-phy: fix compatible string documentation The compatible strings in the driver don't have the meson prefix. Fix this in the documentation and rename the file accordingly. Fixes: da86d286cce8 ("dt-bindings: phy: meson-g12a-usb2-phy: convert to yaml") Cc: stable@vger.kernel.org Signed-off-by: Heiner Kallweit Reviewed-by: Martin Blumenstingl Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/8d960029-e94d-224b-911f-03e5deb47ebc@gmail.com Signed-off-by: Vinod Koul ...mlogic,meson-g12a-usb2-phy.yaml => amlogic,g12a-usb2-phy.yaml} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e181119046a0ec16126b682163040e8e33f310c1 Author: Heiner Kallweit Date: Mon Jan 16 21:19:03 2023 +0100 dt-bindings: phy: g12a-usb3-pcie-phy: fix compatible string documentation The compatible string in the driver doesn't have the meson prefix. Fix this in the documentation and rename the file accordingly. Fixes: 87a55485f2fc ("dt-bindings: phy: meson-g12a-usb3-pcie-phy: convert to yaml") Cc: stable@vger.kernel.org Signed-off-by: Heiner Kallweit Reviewed-by: Martin Blumenstingl Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/0a82be92-ce85-da34-9d6f-4b33034473e5@gmail.com Signed-off-by: Vinod Koul ...eson-g12a-usb3-pcie-phy.yaml => amlogic,g12a-usb3-pcie-phy.yaml} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d6a49e8c4ca4d399ed65ac219585187fc8c2e2b1 Author: Paulo Alcantara Date: Wed Jan 18 13:36:31 2023 -0300 cifs: fix return of uninitialized rc in dfs_cache_update_tgthint() Fix this by initializing rc to 0 as cache_refresh_path() would not set it in case of success. Reported-by: kernel test robot Link: https://lore.kernel.org/all/202301190004.bEHvbKG6-lkp@intel.com/ Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/dfs_cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dfd5fe19db7dc7006642f8109ee8965e5d031897 Author: Takashi Iwai Date: Wed Jan 18 17:59:47 2023 +0100 ALSA: usb-audio: Add FIXED_RATE quirk for JBL Quantum610 Wireless JBL Quantum610 Wireless (0ecb:205c) requires the same workaround that was used for JBL Quantum810 for limiting the sample rate. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216798 Link: https://lore.kernel.org/r/20230118165947.22317-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/quirks.c | 2 ++ 1 file changed, 2 insertions(+) commit afdecb232740ae40b9384fa0ac8ed799d6546516 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 (cherry picked from commit 900a80c5836587d95db32742f66e1f34f7b40fcb) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_gt_regs.h | 7 ++++--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) commit ce38cb84c3e8d953f4e9beaa6ba270938242c72f 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 (cherry picked from commit 468a4e630c7da8cf586f85cc498d6097aed1ab4b) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_gt_regs.h | 3 +++ drivers/gpu/drm/i915/gt/intel_workarounds.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 858c54152658ccd4e305c1e12d3cc6825bc90504 Author: Jeremy Szu Date: Wed Jan 18 19:54:45 2023 +0800 ALSA: hda/realtek: fix mute/micmute LEDs, speaker don't work for 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/20230118115446.14902-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit a7a7ee6f5a019ad72852c001abbce50d35e992f2 Author: Akhil R Date: Wed Jan 18 17:28:01 2023 +0530 dmaengine: tegra: Fix memory leak in terminate_all() Terminate vdesc when terminating an ongoing transfer. This will ensure that the vdesc is present in the desc_terminated list The descriptor will be freed later in desc_free_list(). This fixes the memory leaks which can happen when terminating an ongoing transfer. Fixes: ee17028009d4 ("dmaengine: tegra: Add tegra gpcdma driver") Signed-off-by: Akhil R Link: https://lore.kernel.org/r/20230118115801.15210-1-akhilrajeev@nvidia.com Signed-off-by: Vinod Koul drivers/dma/tegra186-gpc-dma.c | 1 + 1 file changed, 1 insertion(+) commit 596b53ccc36a546ab28e8897315c5b4d1d5a0200 Author: Liu Shixin Date: Tue Nov 22 10:16:12 2022 +0800 dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node() Since for_each_child_of_node() will increase the refcount of node, we need to call of_node_put() manually when breaking out of the iteration. Fixes: 9cd4360de609 ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support") Signed-off-by: Liu Shixin Acked-by: Peter Korsgaard Link: https://lore.kernel.org/r/20221122021612.1908866-1-liushixin2@huawei.com Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3deddb77fdd932df92f3b6a27a9cffed82c4fe1a Author: Paulo Alcantara Date: Tue Jan 17 19:00:41 2023 -0300 cifs: handle cache lookup errors different than -ENOENT lookup_cache_entry() might return an error different than -ENOENT (e.g. from ->char2uni), so handle those as well in cache_refresh_path(). Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/dfs_cache.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 8064f711c6a4614a848009b5a773e8d7f055a4c5 Author: Paulo Alcantara Date: Tue Jan 17 19:00:40 2023 -0300 cifs: remove duplicate code in __refresh_tcon() The logic for creating or updating a cache entry in __refresh_tcon() could be simply done with cache_refresh_path(), so use it instead. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/dfs_cache.c | 71 +++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 38 deletions(-) commit 11c8b3f8493cb5253da42fcd178d9b4630063f96 Author: Paulo Alcantara Date: Tue Jan 17 19:00:39 2023 -0300 cifs: don't take exclusive lock for updating target hints Avoid contention while updating dfs target hints. This should be perfectly fine to update them under shared locks. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/dfs_cache.c | 47 ++++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) commit 48d240bf00af943db6f069a53f090e444e85f760 Author: Paulo Alcantara Date: Tue Jan 17 19:00:38 2023 -0300 cifs: avoid re-lookups in dfs_cache_find() Simply downgrade the write lock on cache updates from cache_refresh_path() and avoid unnecessary re-lookup in dfs_cache_find(). Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/dfs_cache.c | 58 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 24 deletions(-) commit 9fb0db40513e27537fde63287aea920b60557a69 Author: Paulo Alcantara Date: Tue Jan 17 19:00:37 2023 -0300 cifs: fix potential deadlock in cache_refresh_path() Avoid getting DFS referral from an exclusive lock in cache_refresh_path() because the tcon IPC used for getting the referral could be disconnected and thus causing a deadlock as shown below: task A task B ====== ====== cifs_demultiplex_thread() dfs_cache_find() cifs_handle_standard() cache_refresh_path() reconnect_dfs_server() down_write() dfs_cache_noreq_find() get_dfs_referral() down_read() <- deadlock smb2_get_dfs_refer() SMB2_ioctl() cifs_send_recv() compound_send_recv() wait_for_response() where task A cannot wake up task B because it is blocked on down_read() due to the exclusive lock held in cache_refresh_path() and therefore not being able to make progress. Fixes: c9f711039905 ("cifs: keep referral server sessions alive") Reviewed-by: Aurélien Aptel Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/dfs_cache.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit d1d5101452ab04e5a3f010bdd200971d78956e5a Author: Thomas Zimmermann Date: Mon Jan 16 12:54:24 2023 +0100 drm/fb-helper: Set framebuffer for vga-switcheroo clients Set the framebuffer info for drivers that support VGA switcheroo. Only affects the amdgpu and nouveau drivers, which use VGA switcheroo and generic fbdev emulation. For other drivers, this does nothing. This fixes a potential regression in the console code. Both, amdgpu and nouveau, invoked vga_switcheroo_client_fb_set() from their internal fbdev code. But the call got lost when the drivers switched to the generic emulation. Fixes: 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.") Fixes: 4a16dd9d18a0 ("drm/nouveau/kms: switch to drm fbdev helpers") Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Alex Deucher Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Laurent Pinchart Cc: Jani Nikula Cc: Dave Airlie Cc: Evan Quan Cc: Christian König Cc: Alex Deucher Cc: Hawking Zhang Cc: Likun Gao Cc: "Christian König" Cc: Stanley Yang Cc: "Tianci.Yin" Cc: Xiaojian Du Cc: Andrey Grodzovsky Cc: YiPeng Chai Cc: Somalapuram Amaranath Cc: Bokun Zhang Cc: Guchun Chen Cc: Hamza Mahfooz Cc: Aurabindo Pillai Cc: Mario Limonciello Cc: Solomon Chiu Cc: Kai-Heng Feng Cc: Felix Kuehling Cc: Daniel Vetter Cc: "Marek Olšák" Cc: Sam Ravnborg Cc: Hans de Goede Cc: "Ville Syrjälä" Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Cc: # v5.17+ Link: https://patchwork.freedesktop.org/patch/msgid/20230116115425.13484-3-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a273e95721e96885971a05f1b34cb6d093904d9d Author: Thomas Zimmermann Date: Mon Jan 16 12:54:23 2023 +0100 drm/i915: Allow switching away via vga-switcheroo if uninitialized Always allow switching away via vga-switcheroo if the display is uninitalized. Instead prevent switching to i915 if the device has not been initialized. This issue was introduced by commit 5df7bd130818 ("drm/i915: skip display initialization when there is no display") protected, which protects code paths from being executed on uninitialized devices. In the case of vga-switcheroo, we want to allow a switch away from i915's device. So run vga_switcheroo_process_delayed_switch() and test in the switcheroo callbacks if the i915 device is available. Fixes: 5df7bd130818 ("drm/i915: skip display initialization when there is no display") Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher Cc: Radhakrishna Sripada Cc: Lucas De Marchi Cc: José Roberto de Souza Cc: Jani Nikula Cc: Ville Syrjälä Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: "Ville Syrjälä" Cc: Manasi Navare Cc: Stanislav Lisovskiy Cc: Imre Deak Cc: "Jouni Högander" Cc: Uma Shankar Cc: Ankit Nautiyal Cc: "Jason A. Donenfeld" Cc: Matt Roper Cc: Ramalingam C Cc: Thomas Zimmermann Cc: Andi Shyti Cc: Andrzej Hajda Cc: "José Roberto de Souza" Cc: Julia Lawall Cc: intel-gfx@lists.freedesktop.org Cc: # v5.14+ Link: https://patchwork.freedesktop.org/patch/msgid/20230116115425.13484-2-tzimmermann@suse.de drivers/gpu/drm/i915/i915_driver.c | 3 +-- drivers/gpu/drm/i915/i915_switcheroo.c | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) commit 93eea624526fc7d070cdae463408665824075f54 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 (cherry picked from commit 14ec40a88210151296fff3e981c1a7196ad9bf55) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 67b0b4ed259e425b7eed09da75b42c80682ca003 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 (cherry picked from commit 0c8a6e9ea232c221976a0670256bd861408d9917) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3782c0d6edf658b71354a64d60aa7a296188fc90 Author: Pietro Borrello Date: Wed Jan 11 18:12:16 2023 +0000 HID: betop: check shape of output reports betopff_init() only checks the total sum of the report counts for each report field to be at least 4, but hid_betopff_play() expects 4 report fields. A device advertising an output report with one field and 4 report counts would pass the check but crash the kernel with a NULL pointer dereference in hid_betopff_play(). Fixes: 52cd7785f3cd ("HID: betop: add drivers/hid/hid-betopff.c") Signed-off-by: Pietro Borrello Signed-off-by: Jiri Kosina drivers/hid/hid-betopff.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit c1619ea22d9509cfbcf5c2c1cc65563179e9dc8e Merge: fcc4348adafe cc755b4377b0 Author: Mark Brown Date: Wed Jan 18 15:28:17 2023 +0000 ASoC: SOF: sof-audio: Fixes for widget prepare and Merge series from Peter Ujfalusi : This series contains one fix (first patch) followed by a nice to have safety belts in case we get a widget from topology which is not handled by SOF and will not have corresponding swidget associated with. commit b9fb10d131b8c84af9bb14e2078d5c63600c7dea Author: Eric Dumazet Date: Tue Jan 17 11:01:31 2023 +0000 l2tp: prevent lockdep issue in l2tp_tunnel_register() lockdep complains with the following lock/unlock sequence: lock_sock(sk); write_lock_bh(&sk->sk_callback_lock); [1] release_sock(sk); [2] write_unlock_bh(&sk->sk_callback_lock); We need to swap [1] and [2] to fix this issue. Fixes: 0b2c59720e65 ("l2tp: close all race conditions in l2tp_tunnel_register()") Reported-by: syzbot+bbd35b345c7cab0d9a08@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/netdev/20230114030137.672706-1-xiyou.wangcong@gmail.com/T/#m1164ff20628671b0f326a24cb106ab3239c70ce3 Cc: Cong Wang Cc: Guillaume Nault Reviewed-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4cb786180dfb5258ff3111181b5e4ecb1d4a297b Author: Mario Limonciello Date: Mon Jan 16 13:37:02 2023 -0600 gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xRU commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable") changed the policy such that I2C touchpads may be able to wake up the system by default if the system is configured as such. However on Clevo NL5xRU there is a mistake in the ACPI tables that the TP_ATTN# signal connected to GPIO 9 is configured as ActiveLow and level triggered but connected to a pull up. As soon as the system suspends the touchpad loses power and then the system wakes up. To avoid this problem, introduce a quirk for this model that will prevent the wakeup capability for being set for GPIO 9. Fixes: 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable") Reported-by: Werner Sembach Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1722#note_1720627 Co-developed-by: Werner Sembach Signed-off-by: Werner Sembach Signed-off-by: Mario Limonciello Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-acpi.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0e3b175f079247f0d40d2ab695999c309d3a7498 Author: Mario Limonciello Date: Mon Jan 16 13:37:01 2023 -0600 gpiolib: acpi: Allow ignoring wake capability on pins that aren't in _AEI Using the `ignore_wake` quirk or module parameter doesn't work for any pin that has been specified in the _CRS instead of _AEI. Extend the `acpi_gpio_irq_is_wake` check to cover both places. Suggested-by: Raul Rangel Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1722#note_1722335 Signed-off-by: Mario Limonciello Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d71ebe8114b4bf622804b810f5e274069060a174 Author: Jason Wang Date: Tue Jan 17 11:47:07 2023 +0800 virtio-net: correctly enable callback during start_xmit Commit a7766ef18b33("virtio_net: disable cb aggressively") enables virtqueue callback via the following statement: do { if (use_napi) virtqueue_disable_cb(sq->vq); free_old_xmit_skbs(sq, false); } while (use_napi && kick && unlikely(!virtqueue_enable_cb_delayed(sq->vq))); When NAPI is used and kick is false, the callback won't be enabled here. And when the virtqueue is about to be full, the tx will be disabled, but we still don't enable tx interrupt which will cause a TX hang. This could be observed when using pktgen with burst enabled. TO be consistent with the logic that tries to disable cb only for NAPI, fixing this by trying to enable delayed callback only when NAPI is enabled when the queue is about to be full. Fixes: a7766ef18b33 ("virtio_net: disable cb aggressively") Signed-off-by: Jason Wang Tested-by: Laurent Vivier Signed-off-by: David S. Miller drivers/net/virtio_net.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7b90f5a665acd46efbbfa677a3a3a18d01ad6487 Author: Robert Hancock Date: Mon Jan 16 15:41:33 2023 -0600 net: macb: fix PTP TX timestamp failure due to packet padding PTP TX timestamp handling was observed to be broken with this driver when using the raw Layer 2 PTP encapsulation. ptp4l was not receiving the expected TX timestamp after transmitting a packet, causing it to enter a failure state. The problem appears to be due to the way that the driver pads packets which are smaller than the Ethernet minimum of 60 bytes. If headroom space was available in the SKB, this caused the driver to move the data back to utilize it. However, this appears to cause other data references in the SKB to become inconsistent. In particular, this caused the ptp_one_step_sync function to later (in the TX completion path) falsely detect the packet as a one-step SYNC packet, even when it was not, which caused the TX timestamp to not be processed when it should be. Using the headroom for this purpose seems like an unnecessary complexity as this is not a hot path in the driver, and in most cases it appears that there is sufficient tailroom to not require using the headroom anyway. Remove this usage of headroom to prevent this inconsistency from occurring and causing other problems. Fixes: 653e92a9175e ("net: macb: add support for padding and fcs computation") Signed-off-by: Robert Hancock Reviewed-by: Jacob Keller Tested-by: Claudiu Beznea # on SAMA7G5 Reviewed-by: Claudiu Beznea Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 3d9c07c4cfc06cf7927cd00c04dffd1165d03c53 Author: Athira Rajeev Date: Mon Jan 16 10:31:31 2023 +0530 perf test build-id: Fix test check for PE file Perf test "build id cache operations" fails for PE executable. Logs below from powerpc system. Same is observed on x86 as well. <<>> Adding 5a0fd882b53084224ba47b624c55a469 ./tests/shell/../pe-file.exe: Ok build id: 5a0fd882b53084224ba47b624c55a469 link: /tmp/perf.debug.w0V/.build-id/5a/0fd882b53084224ba47b624c55a469 file: /tmp/perf.debug.w0V/.build-id/5a/../../root//linux/tools/perf/tests/pe-file.exe/5a0fd882b53084224ba47b624c55a469/elf failed: file /tmp/perf.debug.w0V/.build-id/5a/../../root//linux/tools/perf/tests/pe-file.exe/5a0fd882b53084224ba47b624c55a469/elf does not exist test child finished with -1 ---- end ---- build id cache operations: FAILED! <<>> The test tries to do: <<>> mkdir /tmp/perf.debug.TeY1 perf --buildid-dir /tmp/perf.debug.TeY1 buildid-cache -v -a ./tests/shell/../pe-file.exe <<>> The option "--buildid-dir" sets the build id cache directory as /tmp/perf.debug.TeY1. The option given to buildid-cahe, ie "-a ./tests/shell/../pe-file.exe", is to add the pe-file.exe to the cache. The testcase, sets buildid-dir and adds the file: pe-file.exe to build id cache. To check if the command is run successfully, "check" function looks for presence of the file in buildid cache directory. But the check here expects the added file to be executable. Snippet below: <<>> if [ ! -x $file ]; then echo "failed: file ${file} does not exist" exit 1 fi <<>> The buildid test is done for sha1 binary, md5 binary and also for PE file. The first two binaries are created at runtime by compiling with "--build-id" option and hence the check for sha1/md5 test should use [ ! -x ]. But in case of PE file, the permission for this input file is rw-r--r-- Hence the file added to build id cache has same permissoin Original file: ls tests/pe-file.exe | xargs stat --printf "%n %A \n" tests/pe-file.exe -rw-r--r-- buildid cache file: ls /tmp/perf.debug.w0V/.build-id/5a/../../root//linux/tools/perf/tests/pe-file.exe/5a0fd882b53084224ba47b624c55a469/elf | xargs stat --printf "%n %A \n" /tmp/perf.debug.w0V/.build-id/5a/../../root//linux/tools/perf/tests/pe-file.exe/5a0fd882b53084224ba47b624c55a469/elf -rw-r--r-- Fix the test to match with the permission of original file in case of FE file. ie if the "tests/pe-file.exe" file is not having exec permission, just check for existence of the buildid file using [ ! -e ] Signed-off-by: Athira Jajeev 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/20230116050131.17221-2-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/buildid.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 3e134696215f45740ef0ccd0fd67f409cb5009cc Merge: 010a74f52203 c410cb974f2b Author: David S. Miller Date: Wed Jan 18 13:45:06 2023 +0000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Niera Ayuso says: ==================== The following patchset contains Netfilter fixes for net: 1) Fix syn-retransmits until initiator gives up when connection is re-used due to rst marked as invalid, from Florian Westphal. ==================== Signed-off-by: David S. Miller commit 4b21b3e7ef86aff7ff961bf28b2c17ee4204da16 Author: Athira Rajeev Date: Mon Jan 16 10:31:30 2023 +0530 perf buildid-cache: Fix the file mode with copyfile() while adding file to build-id cache The test "build id cache operations" fails on powerpc as below: Adding 5a0fd882b53084224ba47b624c55a469 ./tests/shell/../pe-file.exe: Ok build id: 5a0fd882b53084224ba47b624c55a469 link: /tmp/perf.debug.ZTu/.build-id/5a/0fd882b53084224ba47b624c55a469 file: /tmp/perf.debug.ZTu/.build-id/5a/../../root/linux/tools/perf/tests/pe-file.exe/5a0fd882b53084224ba47b624c55a469/elf failed: file /tmp/perf.debug.ZTu/.build-id/5a/../../root/linux/tools/perf/tests/pe-file.exe/5a0fd882b53084224ba47b624c55a469/elf does not exist test child finished with -1 ---- end ---- build id cache operations: FAILED! The failing test is when trying to add pe-file.exe to build id cache. 'perf buildid-cache' can be used to add/remove/manage files from the build-id cache. "-a" option is used to add a file to the build-id cache. Simple command to do so for a PE exe file: # ls -ltr tests/pe-file.exe -rw-r--r--. 1 root root 75595 Jan 10 23:35 tests/pe-file.exe The file is in home directory. # mkdir /tmp/perf.debug.TeY1 # perf --buildid-dir /tmp/perf.debug.TeY1 buildid-cache -v -a tests/pe-file.exe The above will create ".build-id" folder in build id directory, which is /tmp/perf.debug.TeY1. Also adds file to this folder under build id. Example: # ls -ltr /tmp/perf.debug.TeY1/.build-id/5a/0fd882b53084224ba47b624c55a469/ total 76 -rw-r--r--. 1 root root 0 Jan 11 00:38 probes -rwxr-xr-x. 1 root root 75595 Jan 11 00:38 elf We can see in the results that file mode for original file and file in build id directory is different. ie, build id file has executable permission whereas original file doesn’t have. The code path and function (build_id_cache__add to add a file to the cache is in "util/build-id.c". In build_id_cache__add() function, it first attempts to link the original file to destination cache folder. If linking the file fails (which can happen if the destination and source is on a different mount points), it will copy the file to destination. Here copyfile() routine explicitly uses mode as "755" and hence file in the destination will have executable permission. Code snippet: if (link(realname, filename) && errno != EEXIST && copyfile(name, filename)) strace logs: 172285 link("/home//linux/tools/perf/tests/pe-file.exe", "/tmp/perf.debug.TeY1/home//linux/tools/perf/tests/pe-file.exe/5a0fd882b53084224ba47b624c55a469/elf") = -1 EXDEV (Invalid cross-device link) 172285 newfstatat(AT_FDCWD, "tests/pe-file.exe", {st_mode=S_IFREG|0644, st_size=75595, ...}, 0) = 0 172285 openat(AT_FDCWD, "/tmp/perf.debug.TeY1/home//linux/tools/perf/tests/pe-file.exe/5a0fd882b53084224ba47b624c55a469/.elf.KbAnsl", O_RDWR|O_CREAT|O_EXCL, 0600) = 3 172285 fchmod(3, 0755) = 0 172285 openat(AT_FDCWD, "tests/pe-file.exe", O_RDONLY) = 4 172285 mmap(NULL, 75595, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7fffa5cd0000 172285 pwrite64(3, "MZ\220\0\3\0\0\0\4\0\0\0\377\377\0\0\270\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 75595, 0) = 75595 Whereas if the link succeeds, it succeeds in the first attempt itself and the file in the build-id dir will have same permission as original file. Example, above uses /tmp. Instead if we use "--buildid-dir /home/build", linking will work here since mount points are same. Hence the destination file will not have executable permission. Since the testcase "tests/shell/buildid.sh" always looks for executable file, test fails in powerpc environment when test is run from /root. The patch adds a change in build_id_cache__add() to use copyfile_mode() which also passes the file’s original mode as argument. This way the destination file mode also will be same as original file. Signed-off-by: Athira Jajeev 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/20230116050131.17221-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/build-id.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 85c44913969bd27f15229c39383da1291800d7e9 Author: Sohom Datta Date: Sun Dec 4 16:28:35 2022 +0530 perf expr: Prevent normalize() from reading into undefined memory in the expression lexer The current implementation does not account for a trailing backslash followed by a null-byte. If a null-byte is encountered following a backslash, normalize() will continue reading (and potentially writing) into garbage memory ignoring the EOS null-byte. Signed-off-by: Sohom Datta Acked-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221204105836.1012885-1-sohomdatta1+git@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/expr.l | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c905ecfbb8e5d54bbcdd2a1706b925baf1728cfe Author: Arnaldo Carvalho de Melo Date: Wed Jan 18 10:27:48 2023 -0300 tools headers: Syncronize linux/build_bug.h with the kernel sources To pick up the changes in: 07a368b3f55a79d3 ("bug: introduce ASSERT_STRUCT_OFFSET") This cset only introduces a build time assert macro, that may be useful at some point for tooling, for now it silences this perf build warning: Warning: Kernel ABI header at 'tools/include/linux/build_bug.h' differs from latest version at 'include/linux/build_bug.h' diff -u tools/include/linux/build_bug.h include/linux/build_bug.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Maxim Levitsky Cc: Namhyung Kim Cc: Paolo Bonzini Link: http://lore.kernel.org/lkml/Y8f0jqQFYDAOBkHx@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/build_bug.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit d352588bbc990ba51f925f124946c42e604c502e Author: Arnaldo Carvalho de Melo Date: Wed Jan 18 10:12:23 2023 -0300 perf beauty: Update copy of linux/socket.h with the kernel sources To pick the changes in: b5f0de6df6dce8d6 ("net: dev: Convert sa_data to flexible array in struct sockaddr") That don't result in any changes in the tables generated from that header. This silences this perf build warning: Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h' diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h Signed-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/include/linux/socket.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8c51e8f4e9ec6b404a10c84055b8454eba9f42fb Author: Arnaldo Carvalho de Melo Date: Wed Jan 18 09:38:16 2023 -0300 tools headers arm64: Sync arm64's cputype.h with the kernel sources To get the changes in: decb17aeb8fa2148 ("KVM: arm64: vgic: Add Apple M2 cpus to the list of broken SEIS implementations") 07e39e60bbf0ccd5 ("arm64: Add Cortex-715 CPU part definition") 8ec8490a1950efec ("arm64: Fix bit-shifting UB in the MIDR_CPU_MODEL() macro") That addresses this perf build warning: Warning: Kernel ABI header at 'tools/arch/arm64/include/asm/cputype.h' differs from latest version at 'arch/arm64/include/asm/cputype.h' diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h Cc: Ali Saidi Cc: Anshuman Khandual Cc: Catalin Marinas Cc: D Scott Phillips Cc: German Gomez Cc: Leo Yan Cc: Marc Zyngier Cc: Will Deacon Link: http://lore.kernel.org/lkml/Y8fvEGCGn+227qW0@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/arm64/include/asm/cputype.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 7f2d4cdd2f32b66c452c958698fc287de4f68283 Author: Arnaldo Carvalho de Melo Date: Mon Jan 16 10:33:22 2023 -0300 tools kvm headers arm64: Update KVM header from the kernel sources To pick the changes from: 9cb1096f8590bc59 ("KVM: arm64: Enable ring-based dirty memory tracking") That doesn't result in any changes in tooling (built on a Libre Computer Firefly ROC-RK3399-PC-V1.1-A running Ubuntu 22.04), only addresses this perf build warning: 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: Adrian Hunter Cc: Gavin Shan Cc: Ian Rogers Cc: Jiri Olsa Cc: Marc Zyngier Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/Y8fmIT5PIfGaZuwa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/arm64/include/uapi/asm/kvm.h | 1 + 1 file changed, 1 insertion(+) commit 1417f59ac0b02130ee56c0c50794b9b257be3d17 Author: Hui Wang Date: Wed Nov 30 17:08:00 2022 +0800 dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init If the function sdma_load_context() fails, the sdma_desc will be freed, but the allocated desc->bd is forgot to be freed. We already met the sdma_load_context() failure case and the log as below: [ 450.699064] imx-sdma 30bd0000.dma-controller: Timeout waiting for CH0 ready ... In this case, the desc->bd will not be freed without this change. Signed-off-by: Hui Wang Reviewed-by: Sascha Hauer Link: https://lore.kernel.org/r/20221130090800.102035-1-hui.wang@canonical.com Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cc755b4377b0520d594ae573497cf0824baea648 Author: Bard Liao Date: Wed Jan 18 12:12:55 2023 +0200 ASoC: SOF: keep prepare/unprepare widgets in sink path The existing code return when a widget doesn't need to prepare/unprepare. This will prevent widgets in the sink path from being prepared/unprepared. Cc: # 6.1 Link: https://github.com/thesofproject/linux/issues/4021 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/20230118101255.29139-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-audio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0ad84b11f2f8dd19d62d0b2ffd95ece897e6c3dc Author: Ranjani Sridharan Date: Wed Jan 18 12:12:54 2023 +0200 ASoC: SOF: sof-audio: skip prepare/unprepare if swidget is NULL Skip preparing/unpreparing widgets if the swidget pointer is NULL. This will be true in the case of virtual widgets in topology that were added for reusing the legacy HDA machine driver with SOF. Fixes: 9862dcf70245 ("ASoC: SOF: don't unprepare widget used other pipelines") Cc: # 6.1 Signed-off-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230118101255.29139-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d2a67e02549c4b1feaac4d8b4151bf46424a047 Author: Bard Liao Date: Wed Jan 18 12:12:53 2023 +0200 ASoC: SOF: sof-audio: unprepare when swidget->use_count > 0 We should unprepare the widget if its use_count = 1. Fixes: 9862dcf70245 ("ASoC: SOF: don't unprepare widget used other pipelines") Cc: # 6.1 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/20230118101255.29139-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3dc1b3b4750851a94212dba249703dd0e50bb20 Author: Koba Ko Date: Thu Dec 1 11:00:50 2022 +0800 dmaengine: Fix double increment of client_count in dma_chan_get() The first time dma_chan_get() is called for a channel the channel client_count is incorrectly incremented twice for public channels, first in balance_ref_count(), and again prior to returning. This results in an incorrect client count which will lead to the channel resources not being freed when they should be. A simple test of repeated module load and unload of async_tx on a Dell Power Edge R7425 also shows this resulting in a kref underflow warning. [ 124.329662] async_tx: api initialized (async) [ 129.000627] async_tx: api initialized (async) [ 130.047839] ------------[ cut here ]------------ [ 130.052472] refcount_t: underflow; use-after-free. [ 130.057279] WARNING: CPU: 3 PID: 19364 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x110 [ 130.065811] Modules linked in: async_tx(-) rfkill intel_rapl_msr intel_rapl_common amd64_edac edac_mce_amd ipmi_ssif kvm_amd dcdbas kvm mgag200 drm_shmem_helper acpi_ipmi irqbypass drm_kms_helper ipmi_si syscopyarea sysfillrect rapl pcspkr ipmi_devintf sysimgblt fb_sys_fops k10temp i2c_piix4 ipmi_msghandler acpi_power_meter acpi_cpufreq vfat fat drm fuse xfs libcrc32c sd_mod t10_pi sg ahci crct10dif_pclmul libahci crc32_pclmul crc32c_intel ghash_clmulni_intel igb megaraid_sas i40e libata i2c_algo_bit ccp sp5100_tco dca dm_mirror dm_region_hash dm_log dm_mod [last unloaded: async_tx] [ 130.117361] CPU: 3 PID: 19364 Comm: modprobe Kdump: loaded Not tainted 5.14.0-185.el9.x86_64 #1 [ 130.126091] Hardware name: Dell Inc. PowerEdge R7425/02MJ3T, BIOS 1.18.0 01/17/2022 [ 130.133806] RIP: 0010:refcount_warn_saturate+0xba/0x110 [ 130.139041] Code: 01 01 e8 6d bd 55 00 0f 0b e9 72 9d 8a 00 80 3d 26 18 9c 01 00 75 85 48 c7 c7 f8 a3 03 9d c6 05 16 18 9c 01 01 e8 4a bd 55 00 <0f> 0b e9 4f 9d 8a 00 80 3d 01 18 9c 01 00 0f 85 5e ff ff ff 48 c7 [ 130.157807] RSP: 0018:ffffbf98898afe68 EFLAGS: 00010286 [ 130.163036] RAX: 0000000000000000 RBX: ffff9da06028e598 RCX: 0000000000000000 [ 130.170172] RDX: ffff9daf9de26480 RSI: ffff9daf9de198a0 RDI: ffff9daf9de198a0 [ 130.177316] RBP: ffff9da7cddf3970 R08: 0000000000000000 R09: 00000000ffff7fff [ 130.184459] R10: ffffbf98898afd00 R11: ffffffff9d9e8c28 R12: ffff9da7cddf1970 [ 130.191596] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 130.198739] FS: 00007f646435c740(0000) GS:ffff9daf9de00000(0000) knlGS:0000000000000000 [ 130.206832] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 130.212586] CR2: 00007f6463b214f0 CR3: 00000008ab98c000 CR4: 00000000003506e0 [ 130.219729] Call Trace: [ 130.222192] [ 130.224305] dma_chan_put+0x10d/0x110 [ 130.227988] dmaengine_put+0x7a/0xa0 [ 130.231575] __do_sys_delete_module.constprop.0+0x178/0x280 [ 130.237157] ? syscall_trace_enter.constprop.0+0x145/0x1d0 [ 130.242652] do_syscall_64+0x5c/0x90 [ 130.246240] ? exc_page_fault+0x62/0x150 [ 130.250178] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 130.255243] RIP: 0033:0x7f6463a3f5ab [ 130.258830] Code: 73 01 c3 48 8b 0d 75 a8 1b 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 45 a8 1b 00 f7 d8 64 89 01 48 [ 130.277591] RSP: 002b:00007fff22f972c8 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 130.285164] RAX: ffffffffffffffda RBX: 000055b6786edd40 RCX: 00007f6463a3f5ab [ 130.292303] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055b6786edda8 [ 130.299443] RBP: 000055b6786edd40 R08: 0000000000000000 R09: 0000000000000000 [ 130.306584] R10: 00007f6463b9eac0 R11: 0000000000000206 R12: 000055b6786edda8 [ 130.313731] R13: 0000000000000000 R14: 000055b6786edda8 R15: 00007fff22f995f8 [ 130.320875] [ 130.323081] ---[ end trace eff7156d56b5cf25 ]--- cat /sys/class/dma/dma0chan*/in_use would get the wrong result. 2 2 2 Fixes: d2f4f99db3e9 ("dmaengine: Rework dma_chan_get") Signed-off-by: Koba Ko Reviewed-by: Jie Hai Test-by: Jie Hai Reviewed-by: Jerry Snitselaar Reviewed-by: Dave Jiang Tested-by: Joel Savitz Link: https://lore.kernel.org/r/20221201030050.978595-1-koba.ko@canonical.com Signed-off-by: Vinod Koul drivers/dma/dmaengine.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9c7e355ccbb33d239360c876dbe49ad5ade65b47 Author: Mohan Kumar Date: Mon Jan 2 12:18:44 2023 +0530 dmaengine: tegra210-adma: fix global intr clear The current global interrupt clear programming register offset was not correct. Fix the programming with right offset Fixes: ded1f3db4cd6 ("dmaengine: tegra210-adma: prepare for supporting newer Tegra chips") Cc: stable@vger.kernel.org Signed-off-by: Mohan Kumar Link: https://lore.kernel.org/r/20230102064844.31306-1-mkumard@nvidia.com Signed-off-by: Vinod Koul drivers/dma/tegra210-adma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57054fe516d59d03a7bcf1888e82479ccc244f87 Author: Shawn.Shao Date: Thu Jan 12 13:58:02 2023 +0800 Add exception protection processing for vd in axi_chan_handle_err function Since there is no protection for vd, a kernel panic will be triggered here in exceptional cases. You can refer to the processing of axi_chan_block_xfer_complete function The triggered kernel panic is as follows: [ 67.848444] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000060 [ 67.848447] Mem abort info: [ 67.848449] ESR = 0x96000004 [ 67.848451] EC = 0x25: DABT (current EL), IL = 32 bits [ 67.848454] SET = 0, FnV = 0 [ 67.848456] EA = 0, S1PTW = 0 [ 67.848458] Data abort info: [ 67.848460] ISV = 0, ISS = 0x00000004 [ 67.848462] CM = 0, WnR = 0 [ 67.848465] user pgtable: 4k pages, 48-bit VAs, pgdp=00000800c4c0b000 [ 67.848468] [0000000000000060] pgd=0000000000000000, p4d=0000000000000000 [ 67.848472] Internal error: Oops: 96000004 [#1] SMP [ 67.848475] Modules linked in: dmatest [ 67.848479] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.100-emu_x2rc+ #11 [ 67.848483] pstate: 62000085 (nZCv daIf -PAN -UAO +TCO BTYPE=--) [ 67.848487] pc : axi_chan_handle_err+0xc4/0x230 [ 67.848491] lr : axi_chan_handle_err+0x30/0x230 [ 67.848493] sp : ffff0803fe55ae50 [ 67.848495] x29: ffff0803fe55ae50 x28: ffff800011212200 [ 67.848500] x27: ffff0800c42c0080 x26: ffff0800c097c080 [ 67.848504] x25: ffff800010d33880 x24: ffff80001139d850 [ 67.848508] x23: ffff0800c097c168 x22: 0000000000000000 [ 67.848512] x21: 0000000000000080 x20: 0000000000002000 [ 67.848517] x19: ffff0800c097c080 x18: 0000000000000000 [ 67.848521] x17: 0000000000000000 x16: 0000000000000000 [ 67.848525] x15: 0000000000000000 x14: 0000000000000000 [ 67.848529] x13: 0000000000000000 x12: 0000000000000040 [ 67.848533] x11: ffff0800c0400248 x10: ffff0800c040024a [ 67.848538] x9 : ffff800010576cd4 x8 : ffff0800c0400270 [ 67.848542] x7 : 0000000000000000 x6 : ffff0800c04003e0 [ 67.848546] x5 : ffff0800c0400248 x4 : ffff0800c4294480 [ 67.848550] x3 : dead000000000100 x2 : dead000000000122 [ 67.848555] x1 : 0000000000000100 x0 : ffff0800c097c168 [ 67.848559] Call trace: [ 67.848562] axi_chan_handle_err+0xc4/0x230 [ 67.848566] dw_axi_dma_interrupt+0xf4/0x590 [ 67.848569] __handle_irq_event_percpu+0x60/0x220 [ 67.848573] handle_irq_event+0x64/0x120 [ 67.848576] handle_fasteoi_irq+0xc4/0x220 [ 67.848580] __handle_domain_irq+0x80/0xe0 [ 67.848583] gic_handle_irq+0xc0/0x138 [ 67.848585] el1_irq+0xc8/0x180 [ 67.848588] arch_cpu_idle+0x14/0x2c [ 67.848591] default_idle_call+0x40/0x16c [ 67.848594] do_idle+0x1f0/0x250 [ 67.848597] cpu_startup_entry+0x2c/0x60 [ 67.848600] rest_init+0xc0/0xcc [ 67.848603] arch_call_rest_init+0x14/0x1c [ 67.848606] start_kernel+0x4cc/0x500 [ 67.848610] Code: eb0002ff 9a9f12d6 f2fbd5a2 f2fbd5a3 (a94602c1) [ 67.848613] ---[ end trace 585a97036f88203a ]--- Signed-off-by: Shawn.Shao Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230112055802.1764-1-shawn.shao@jaguarmicro.com Signed-off-by: Vinod Koul drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5a8a05f165fb18d37526062419774d9088c2a9b9 Author: Kan Liang Date: Fri Jan 6 08:04:47 2023 -0800 perf/x86/intel/cstate: Add Emerald Rapids From the perspective of Intel cstate residency counters, Emerald Rapids is the same as the Sapphire Rapids and Ice Lake. Add Emerald Rapids model. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230106160449.3566477-2-kan.liang@linux.intel.com arch/x86/events/intel/cstate.c | 1 + 1 file changed, 1 insertion(+) commit 6795e558e9cc6123c24e2100a2ebe88e58a792bc Author: Kan Liang Date: Fri Jan 6 08:04:46 2023 -0800 perf/x86/intel: Add Emerald Rapids From core PMU's perspective, Emerald Rapids is the same as the Sapphire Rapids. The only difference is the event list, which will be supported in the perf tool later. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230106160449.3566477-1-kan.liang@linux.intel.com arch/x86/events/intel/core.c | 1 + 1 file changed, 1 insertion(+) commit 6437a549ae178a3f5a5c03e983f291ebcdc2bbc7 Author: Arnd Bergmann Date: Tue Jan 17 17:44:43 2023 +0100 drm/panfrost: fix GENERIC_ATOMIC64 dependency On ARMv5 and earlier, a randconfig build can still run into WARNING: unmet direct dependencies detected for IOMMU_IO_PGTABLE_LPAE Depends on [n]: IOMMU_SUPPORT [=y] && (ARM [=y] || ARM64 || COMPILE_TEST [=y]) && !GENERIC_ATOMIC64 [=y] Selected by [y]: - DRM_PANFROST [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARM [=y] || ARM64 || COMPILE_TEST [=y] && !GENERIC_ATOMIC64 [=y]) && MMU [=y] Rework the dependencies to always require a working cmpxchg64. Fixes: db594ba3fcf9 ("drm/panfrost: depend on !GENERIC_ATOMIC64 when using COMPILE_TEST") Signed-off-by: Arnd Bergmann Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20230117164456.1591901-1-arnd@kernel.org drivers/gpu/drm/panfrost/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 96b3bb18f6cbe259ef4e0bed3135911b7e8d2af5 Author: Peter Harliman Liem Date: Thu Jan 5 11:05:51 2023 +0800 dmaengine: lgm: Move DT parsing after initialization ldma_cfg_init() will parse DT to retrieve certain configs. However, that is called before ldma_dma_init_vXX(), which will make some initialization to channel configs. It will thus incorrectly overwrite certain configs that are declared in DT. To fix that, we move DT parsing after initialization. Function name is renamed to better represent what it does. Fixes: 32d31c79a1a4 ("dmaengine: Add Intel LGM SoC DMA support.") Signed-off-by: Peter Harliman Liem Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/afef6fc1ed20098b684e0d53737d69faf63c125f.1672887183.git.pliem@maxlinear.com Signed-off-by: Vinod Koul drivers/dma/lgm/lgm-dma.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ccf1e1626d37745d0a697db67407beec9ae9d4b8 Author: Roderick Colenbrander Date: Thu Jan 5 17:59:08 2023 -0800 HID: playstation: sanity check DualSense calibration data. Make sure calibration values are defined to prevent potential kernel crashes. This fixes a hypothetical issue for virtual or clone devices inspired by a similar fix for DS4. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 74cb485f68eb3dff6802ee446a602607b03f4fc9 Author: Roderick Colenbrander Date: Thu Jan 5 17:59:07 2023 -0800 HID: playstation: sanity check DualShock4 calibration data. Some DualShock4 devices report invalid calibration data resulting in kernel oopses due to division by zero during report handling. The devices affected generally appear to be clone devices, which don't implement all reports properly and don't populate proper calibration data. The issue may have been seen on an official device with erased calibration reports. This patch prevents the crashes by essentially disabling calibration when invalid values are detected. Signed-off-by: Roderick Colenbrander Tested-by: Alain Carlucci Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit febb2c0d7c69c0396aa32d5ab425a4163473961a Author: José Expósito Date: Mon Dec 26 13:34:56 2022 +0100 HID: uclogic: Add support for XP-PEN Deco 01 V2 The XP-PEN Deco 01 V2 is a UGEE v2 device with a frame with 8 buttons. Its pen has 2 buttons, supports tilt and pressure. Add its ID in order to support the device. Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/839 Tested-by: Mark Waddoups Signed-off-by: José Expósito Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-uclogic-core.c | 2 ++ drivers/hid/hid-uclogic-params.c | 2 ++ 3 files changed, 5 insertions(+) commit e1fabbc83cb1dd4ba63932faa86c9cacb8bf791e Author: Ard Biesheuvel Date: Tue Jan 17 18:00:45 2023 +0100 efi: Remove Matthew Garrett as efivarfs maintainer Matthew Garrett is still listed as a efivarfs co-maintainer, but the email address bounces, and Matt is no longer involved in maintaining this code. So let's remove Matt as a efivarfs co-maintainer from MAINTAINERS. Thanks for all the hard work! Acked-by: Matthew Garrett Signed-off-by: Ard Biesheuvel MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 2c1e1b949024989e20907b84e11a731a50778416 Author: Randy Dunlap Date: Tue Aug 30 20:12:29 2022 -0700 net: mlx5: eliminate anonymous module_init & module_exit Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log. Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names. Example 1: (System.map) ffffffff832fc78c t init ffffffff832fc79e t init ffffffff832fc8f8 t init Example 2: (initcall_debug log) calling init+0x0/0x12 @ 1 initcall init+0x0/0x12 returned 0 after 15 usecs calling init+0x0/0x60 @ 1 initcall init+0x0/0x60 returned 0 after 2 usecs calling init+0x0/0x9a @ 1 initcall init+0x0/0x9a returned 0 after 74 usecs Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Randy Dunlap Cc: Eli Cohen Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: linux-rdma@vger.kernel.org Reviewed-by: Ira Weiny Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7c83d1f4c5adae9583e7fca1e3e830d6b061522d Author: Chris Mi Date: Wed Dec 21 11:14:37 2022 +0200 net/mlx5: E-switch, Fix switchdev mode after devlink reload The cited commit removes eswitch mode none. So after devlink reload in switchdev mode, eswitch mode is not changed. But actually eswitch is disabled during devlink reload. Fix it by setting eswitch mode to legacy when disabling eswitch which is called by reload_down. Fixes: f019679ea5f2 ("net/mlx5: E-switch, Remove dependency between sriov and eswitch mode") Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 1 + 1 file changed, 1 insertion(+) commit e4d38c454ae57e649f09a354d5a9dae063a26ee3 Author: Leon Romanovsky Date: Mon Jan 9 10:34:25 2023 +0200 net/mlx5e: Protect global IPsec ASO ASO operations are global to whole IPsec as they share one DMA address for all operations. As such all WQE operations need to be protected with lock. In this case, it must be spinlock to allow mlx5e_ipsec_aso_query() operate in atomic context. Fixes: 1ed78fc03307 ("net/mlx5e: Update IPsec soft and hard limits") Reviewed-by: Jianbo Liu Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 16bccbaa00b6127ed0ebfd77bd1f10341df8d498 Author: Leon Romanovsky Date: Mon Jan 9 10:43:13 2023 +0200 net/mlx5e: Remove optimization which prevented update of ESN state aso->use_cache variable introduced in commit 8c582ddfbb47 ("net/mlx5e: Handle hardware IPsec limits events") was an optimization to skip recurrent calls to mlx5e_ipsec_aso_query(). Such calls are possible when lifetime event is generated: -> mlx5e_ipsec_handle_event() -> mlx5e_ipsec_aso_query() - first call -> xfrm_state_check_expire() -> mlx5e_xfrm_update_curlft() -> mlx5e_ipsec_aso_query() - second call However, such optimization not really effective as mlx5e_ipsec_aso_query() is needed to be called for update ESN anyway, which was missed due to misplaced use_cache assignment. Fixes: cee137a63431 ("net/mlx5e: Handle ESN update events") Reviewed-by: Jianbo Liu Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 5 ----- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c | 5 ----- 2 files changed, 10 deletions(-) commit ffa99b534732f90077f346c62094cab3d1ccddce Author: Chris Mi Date: Thu Jan 12 04:30:27 2023 +0200 net/mlx5e: Set decap action based on attr for sample Currently decap action is set based on tunnel_id. That means it is set unconditionally. But for decap, ct and sample actions, decap is done before ct. No need to decap again in sample. And the actions are set correctly when parsing. So set decap action based on attr instead of tunnel_id. Fixes: 2741f2230905 ("net/mlx5e: TC, Support sample offload action for tunneled traffic") Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4ddf77f9bc76092d268bd3af447d60d9cc62b652 Author: Maor Dickman Date: Tue Dec 27 10:51:38 2022 +0200 net/mlx5e: QoS, Fix wrongfully setting parent_element_id on MODIFY_SCHEDULING_ELEMENT According to HW spec parent_element_id field should be reserved (0x0) when calling MODIFY_SCHEDULING_ELEMENT command. This patch remove the wrong initialization of reserved field, parent_element_id, on mlx5_qos_update_node. Fixes: 214baf22870c ("net/mlx5e: Support HTB offload") Signed-off-by: Maor Dickman Reviewed-by: Eli Cohen Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/htb.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/qos.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/qos.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) commit f51471d1935ce1f504fce6c115ce3bfbc32032b0 Author: Maor Dickman Date: Tue Dec 27 10:22:41 2022 +0200 net/mlx5: E-switch, Fix setting of reserved fields on MODIFY_SCHEDULING_ELEMENT According to HW spec element_type, element_attributes and parent_element_id fields should be reserved (0x0) when calling MODIFY_SCHEDULING_ELEMENT command. This patch remove initialization of these fields when calling the command. Fixes: bd77bf1cb595 ("net/mlx5: Add SRIOV VF max rate configuration support") Signed-off-by: Maor Dickman Reviewed-by: Eli Cohen Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 6624bfeecf019de114f8100f1468d025d13b77a1 Author: Adham Faris Date: Thu Jan 12 11:15:00 2023 +0200 net/mlx5e: Remove redundant xsk pointer check in mlx5e_mpwrq_validate_xsk This validation function is relevant only for XSK cases, hence it assumes to be called only with xsk != NULL. Thus checking for invalid xsk pointer is redundant and misleads static code analyzers. This commit removes redundant xsk pointer check. This solves the following smatch warning: drivers/net/ethernet/mellanox/mlx5/core/en/params.c:481 mlx5e_mpwrq_validate_xsk() error: we previously assumed 'xsk' could be null (see line 478) Fixes: 6470d2e7e8ed ("net/mlx5e: xsk: Use KSM for unaligned XSK") Signed-off-by: Adham Faris Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5aa56105930374928d567744595fd7ac525d0688 Author: Vlad Buslov Date: Thu Dec 15 16:44:33 2022 +0100 net/mlx5e: Avoid false lock dependency warning on tc_ht even more The cited commit changed class of tc_ht internal mutex in order to avoid false lock dependency with fs_core node and flow_table hash table structures. However, hash table implementation internally also includes a workqueue task with its own lockdep map which causes similar bogus lockdep splat[0]. Fix it by also adding dedicated class for hash table workqueue work structure of tc_ht. [0]: [ 1139.672465] ====================================================== [ 1139.673552] WARNING: possible circular locking dependency detected [ 1139.674635] 6.1.0_for_upstream_debug_2022_12_12_17_02 #1 Not tainted [ 1139.675734] ------------------------------------------------------ [ 1139.676801] modprobe/5998 is trying to acquire lock: [ 1139.677726] ffff88811e7b93b8 (&node->lock){++++}-{3:3}, at: down_write_ref_node+0x7c/0xe0 [mlx5_core] [ 1139.679662] but task is already holding lock: [ 1139.680703] ffff88813c1f96a0 (&tc_ht_lock_key){+.+.}-{3:3}, at: rhashtable_free_and_destroy+0x38/0x6f0 [ 1139.682223] which lock already depends on the new lock. [ 1139.683640] the existing dependency chain (in reverse order) is: [ 1139.684887] -> #2 (&tc_ht_lock_key){+.+.}-{3:3}: [ 1139.685975] __mutex_lock+0x12c/0x14b0 [ 1139.686659] rht_deferred_worker+0x35/0x1540 [ 1139.687405] process_one_work+0x7c2/0x1310 [ 1139.688134] worker_thread+0x59d/0xec0 [ 1139.688820] kthread+0x28f/0x330 [ 1139.689444] ret_from_fork+0x1f/0x30 [ 1139.690106] -> #1 ((work_completion)(&ht->run_work)){+.+.}-{0:0}: [ 1139.691250] __flush_work+0xe8/0x900 [ 1139.691915] __cancel_work_timer+0x2ca/0x3f0 [ 1139.692655] rhashtable_free_and_destroy+0x22/0x6f0 [ 1139.693472] del_sw_flow_table+0x22/0xb0 [mlx5_core] [ 1139.694592] tree_put_node+0x24c/0x450 [mlx5_core] [ 1139.695686] tree_remove_node+0x6e/0x100 [mlx5_core] [ 1139.696803] mlx5_destroy_flow_table+0x187/0x690 [mlx5_core] [ 1139.698017] mlx5e_tc_nic_cleanup+0x2f8/0x400 [mlx5_core] [ 1139.699217] mlx5e_cleanup_nic_rx+0x2b/0x210 [mlx5_core] [ 1139.700397] mlx5e_detach_netdev+0x19d/0x2b0 [mlx5_core] [ 1139.701571] mlx5e_suspend+0xdb/0x140 [mlx5_core] [ 1139.702665] mlx5e_remove+0x89/0x190 [mlx5_core] [ 1139.703756] auxiliary_bus_remove+0x52/0x70 [ 1139.704492] device_release_driver_internal+0x3c1/0x600 [ 1139.705360] bus_remove_device+0x2a5/0x560 [ 1139.706080] device_del+0x492/0xb80 [ 1139.706724] mlx5_rescan_drivers_locked+0x194/0x6a0 [mlx5_core] [ 1139.707961] mlx5_unregister_device+0x7a/0xa0 [mlx5_core] [ 1139.709138] mlx5_uninit_one+0x5f/0x160 [mlx5_core] [ 1139.710252] remove_one+0xd1/0x160 [mlx5_core] [ 1139.711297] pci_device_remove+0x96/0x1c0 [ 1139.722721] device_release_driver_internal+0x3c1/0x600 [ 1139.723590] unbind_store+0x1b1/0x200 [ 1139.724259] kernfs_fop_write_iter+0x348/0x520 [ 1139.725019] vfs_write+0x7b2/0xbf0 [ 1139.725658] ksys_write+0xf3/0x1d0 [ 1139.726292] do_syscall_64+0x3d/0x90 [ 1139.726942] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 1139.727769] -> #0 (&node->lock){++++}-{3:3}: [ 1139.728698] __lock_acquire+0x2cf5/0x62f0 [ 1139.729415] lock_acquire+0x1c1/0x540 [ 1139.730076] down_write+0x8e/0x1f0 [ 1139.730709] down_write_ref_node+0x7c/0xe0 [mlx5_core] [ 1139.731841] mlx5_del_flow_rules+0x6f/0x610 [mlx5_core] [ 1139.732982] __mlx5_eswitch_del_rule+0xdd/0x560 [mlx5_core] [ 1139.734207] mlx5_eswitch_del_offloaded_rule+0x14/0x20 [mlx5_core] [ 1139.735491] mlx5e_tc_rule_unoffload+0x104/0x2b0 [mlx5_core] [ 1139.736716] mlx5e_tc_unoffload_fdb_rules+0x10c/0x1f0 [mlx5_core] [ 1139.738007] mlx5e_tc_del_fdb_flow+0xc3c/0xfa0 [mlx5_core] [ 1139.739213] mlx5e_tc_del_flow+0x146/0xa20 [mlx5_core] [ 1139.740377] _mlx5e_tc_del_flow+0x38/0x60 [mlx5_core] [ 1139.741534] rhashtable_free_and_destroy+0x3be/0x6f0 [ 1139.742351] mlx5e_tc_ht_cleanup+0x1b/0x30 [mlx5_core] [ 1139.743512] mlx5e_cleanup_rep_tx+0x4a/0xe0 [mlx5_core] [ 1139.744683] mlx5e_detach_netdev+0x1ca/0x2b0 [mlx5_core] [ 1139.745860] mlx5e_netdev_change_profile+0xd9/0x1c0 [mlx5_core] [ 1139.747098] mlx5e_netdev_attach_nic_profile+0x1b/0x30 [mlx5_core] [ 1139.748372] mlx5e_vport_rep_unload+0x16a/0x1b0 [mlx5_core] [ 1139.749590] __esw_offloads_unload_rep+0xb1/0xd0 [mlx5_core] [ 1139.750813] mlx5_eswitch_unregister_vport_reps+0x409/0x5f0 [mlx5_core] [ 1139.752147] mlx5e_rep_remove+0x62/0x80 [mlx5_core] [ 1139.753293] auxiliary_bus_remove+0x52/0x70 [ 1139.754028] device_release_driver_internal+0x3c1/0x600 [ 1139.754885] driver_detach+0xc1/0x180 [ 1139.755553] bus_remove_driver+0xef/0x2e0 [ 1139.756260] auxiliary_driver_unregister+0x16/0x50 [ 1139.757059] mlx5e_rep_cleanup+0x19/0x30 [mlx5_core] [ 1139.758207] mlx5e_cleanup+0x12/0x30 [mlx5_core] [ 1139.759295] mlx5_cleanup+0xc/0x49 [mlx5_core] [ 1139.760384] __x64_sys_delete_module+0x2b5/0x450 [ 1139.761166] do_syscall_64+0x3d/0x90 [ 1139.761827] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 1139.762663] other info that might help us debug this: [ 1139.763925] Chain exists of: &node->lock --> (work_completion)(&ht->run_work) --> &tc_ht_lock_key [ 1139.765743] Possible unsafe locking scenario: [ 1139.766688] CPU0 CPU1 [ 1139.767399] ---- ---- [ 1139.768111] lock(&tc_ht_lock_key); [ 1139.768704] lock((work_completion)(&ht->run_work)); [ 1139.769869] lock(&tc_ht_lock_key); [ 1139.770770] lock(&node->lock); [ 1139.771326] *** DEADLOCK *** [ 1139.772345] 2 locks held by modprobe/5998: [ 1139.772994] #0: ffff88813c1ff0e8 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0x8d/0x600 [ 1139.774399] #1: ffff88813c1f96a0 (&tc_ht_lock_key){+.+.}-{3:3}, at: rhashtable_free_and_destroy+0x38/0x6f0 [ 1139.775822] stack backtrace: [ 1139.776579] CPU: 3 PID: 5998 Comm: modprobe Not tainted 6.1.0_for_upstream_debug_2022_12_12_17_02 #1 [ 1139.777935] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 1139.779529] Call Trace: [ 1139.779992] [ 1139.780409] dump_stack_lvl+0x57/0x7d [ 1139.781015] check_noncircular+0x278/0x300 [ 1139.781687] ? print_circular_bug+0x460/0x460 [ 1139.782381] ? rcu_read_lock_sched_held+0x3f/0x70 [ 1139.783121] ? lock_release+0x487/0x7c0 [ 1139.783759] ? orc_find.part.0+0x1f1/0x330 [ 1139.784423] ? mark_lock.part.0+0xef/0x2fc0 [ 1139.785091] __lock_acquire+0x2cf5/0x62f0 [ 1139.785754] ? register_lock_class+0x18e0/0x18e0 [ 1139.786483] lock_acquire+0x1c1/0x540 [ 1139.787093] ? down_write_ref_node+0x7c/0xe0 [mlx5_core] [ 1139.788195] ? lockdep_hardirqs_on_prepare+0x3f0/0x3f0 [ 1139.788978] ? register_lock_class+0x18e0/0x18e0 [ 1139.789715] down_write+0x8e/0x1f0 [ 1139.790292] ? down_write_ref_node+0x7c/0xe0 [mlx5_core] [ 1139.791380] ? down_write_killable+0x220/0x220 [ 1139.792080] ? find_held_lock+0x2d/0x110 [ 1139.792713] down_write_ref_node+0x7c/0xe0 [mlx5_core] [ 1139.793795] mlx5_del_flow_rules+0x6f/0x610 [mlx5_core] [ 1139.794879] __mlx5_eswitch_del_rule+0xdd/0x560 [mlx5_core] [ 1139.796032] ? __esw_offloads_unload_rep+0xd0/0xd0 [mlx5_core] [ 1139.797227] ? xa_load+0x11a/0x200 [ 1139.797800] ? __xa_clear_mark+0xf0/0xf0 [ 1139.798438] mlx5_eswitch_del_offloaded_rule+0x14/0x20 [mlx5_core] [ 1139.799660] mlx5e_tc_rule_unoffload+0x104/0x2b0 [mlx5_core] [ 1139.800821] mlx5e_tc_unoffload_fdb_rules+0x10c/0x1f0 [mlx5_core] [ 1139.802049] ? mlx5_eswitch_get_uplink_priv+0x25/0x80 [mlx5_core] [ 1139.803260] mlx5e_tc_del_fdb_flow+0xc3c/0xfa0 [mlx5_core] [ 1139.804398] ? __cancel_work_timer+0x1c2/0x3f0 [ 1139.805099] ? mlx5e_tc_unoffload_from_slow_path+0x460/0x460 [mlx5_core] [ 1139.806387] mlx5e_tc_del_flow+0x146/0xa20 [mlx5_core] [ 1139.807481] _mlx5e_tc_del_flow+0x38/0x60 [mlx5_core] [ 1139.808564] rhashtable_free_and_destroy+0x3be/0x6f0 [ 1139.809336] ? mlx5e_tc_del_flow+0xa20/0xa20 [mlx5_core] [ 1139.809336] ? mlx5e_tc_del_flow+0xa20/0xa20 [mlx5_core] [ 1139.810455] mlx5e_tc_ht_cleanup+0x1b/0x30 [mlx5_core] [ 1139.811552] mlx5e_cleanup_rep_tx+0x4a/0xe0 [mlx5_core] [ 1139.812655] mlx5e_detach_netdev+0x1ca/0x2b0 [mlx5_core] [ 1139.813768] mlx5e_netdev_change_profile+0xd9/0x1c0 [mlx5_core] [ 1139.814952] mlx5e_netdev_attach_nic_profile+0x1b/0x30 [mlx5_core] [ 1139.816166] mlx5e_vport_rep_unload+0x16a/0x1b0 [mlx5_core] [ 1139.817336] __esw_offloads_unload_rep+0xb1/0xd0 [mlx5_core] [ 1139.818507] mlx5_eswitch_unregister_vport_reps+0x409/0x5f0 [mlx5_core] [ 1139.819788] ? mlx5_eswitch_uplink_get_proto_dev+0x30/0x30 [mlx5_core] [ 1139.821051] ? kernfs_find_ns+0x137/0x310 [ 1139.821705] mlx5e_rep_remove+0x62/0x80 [mlx5_core] [ 1139.822778] auxiliary_bus_remove+0x52/0x70 [ 1139.823449] device_release_driver_internal+0x3c1/0x600 [ 1139.824240] driver_detach+0xc1/0x180 [ 1139.824842] bus_remove_driver+0xef/0x2e0 [ 1139.825504] auxiliary_driver_unregister+0x16/0x50 [ 1139.826245] mlx5e_rep_cleanup+0x19/0x30 [mlx5_core] [ 1139.827322] mlx5e_cleanup+0x12/0x30 [mlx5_core] [ 1139.828345] mlx5_cleanup+0xc/0x49 [mlx5_core] [ 1139.829382] __x64_sys_delete_module+0x2b5/0x450 [ 1139.830119] ? module_flags+0x300/0x300 [ 1139.830750] ? task_work_func_match+0x50/0x50 [ 1139.831440] ? task_work_cancel+0x20/0x20 [ 1139.832088] ? lockdep_hardirqs_on_prepare+0x273/0x3f0 [ 1139.832873] ? syscall_enter_from_user_mode+0x1d/0x50 [ 1139.833661] ? trace_hardirqs_on+0x2d/0x100 [ 1139.834328] do_syscall_64+0x3d/0x90 [ 1139.834922] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 1139.835700] RIP: 0033:0x7f153e71288b [ 1139.836302] Code: 73 01 c3 48 8b 0d 9d 75 0e 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 6d 75 0e 00 f7 d8 64 89 01 48 [ 1139.838866] RSP: 002b:00007ffe0a3ed938 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 1139.840020] RAX: ffffffffffffffda RBX: 0000564c2cbf8220 RCX: 00007f153e71288b [ 1139.841043] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 0000564c2cbf8288 [ 1139.842072] RBP: 0000564c2cbf8220 R08: 0000000000000000 R09: 0000000000000000 [ 1139.843094] R10: 00007f153e7a3ac0 R11: 0000000000000206 R12: 0000564c2cbf8288 [ 1139.844118] R13: 0000000000000000 R14: 0000564c2cbf7ae8 R15: 00007ffe0a3efcb8 Fixes: 9ba33339c043 ("net/mlx5e: Avoid false lock depenency warning on tc_ht") Signed-off-by: Vlad Buslov Reviewed-by: Eli Cohen Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 +++ 1 file changed, 3 insertions(+) commit 90e7cb78b81543998217b0eb446c067ce2191a79 Author: Yang Yingliang Date: Thu Jan 5 19:42:20 2023 +0800 net/mlx5: fix missing mutex_unlock in mlx5_fw_fatal_reporter_err_work() Add missing mutex_unlock() before returning from mlx5_fw_fatal_reporter_err_work(). Fixes: 9078e843efec ("net/mlx5: Avoid recovery in probe flows") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Yang Yingliang Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 1 + 1 file changed, 1 insertion(+) commit 13e1df09284da53ae5abdd3364c36caf8f0f8916 Author: Thomas Weißschuh Date: Tue Jan 17 05:30:43 2023 +0000 kheaders: explicitly validate existence of cpio command If the cpio command is not available the error emitted by gen_kheaders.so is not clear as all output of the call to cpio is discarded: GNU make 4.4: GEN kernel/kheaders_data.tar.xz find: 'standard output': Broken pipe find: write error make[2]: *** [kernel/Makefile:157: kernel/kheaders_data.tar.xz] Error 127 make[1]: *** [scripts/Makefile.build:504: kernel] Error 2 GNU make < 4.4: GEN kernel/kheaders_data.tar.xz make[2]: *** [kernel/Makefile:157: kernel/kheaders_data.tar.xz] Error 127 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [scripts/Makefile.build:504: kernel] Error 2 Add an explicit check that will trigger a clear message about the issue: CHK kernel/kheaders_data.tar.xz ./kernel/gen_kheaders.sh: line 17: type: cpio: not found The other commands executed by gen_kheaders.sh are part of a standard installation, so they are not checked. Reported-by: Amy Parker Link: https://lore.kernel.org/lkml/CAPOgqxFva=tOuh1UitCSN38+28q3BNXKq19rEsVNPRzRqKqZ+g@mail.gmail.com/ Signed-off-by: Thomas Weißschuh Reviewed-by: Nicolas Schier Signed-off-by: Masahiro Yamada kernel/gen_kheaders.sh | 2 ++ 1 file changed, 2 insertions(+) commit 010a74f52203eae037dd6aa111ba371f6a2dedc5 Merge: 423c1d363c46 1d80d57ffcb5 Author: Jakub Kicinski Date: Tue Jan 17 19:19:00 2023 -0800 Merge tag 'for-net-2023-01-17' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - Fix a buffer overflow in mgmt_mesh_add - Fix use HCI_OP_LE_READ_BUFFER_SIZE_V2 - Fix hci_qca shutdown on closed serdev - Fix possible circular locking dependencies on ISO code - Fix possible deadlock in rfcomm_sk_state_change * tag 'for-net-2023-01-17' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: Fix possible deadlock in rfcomm_sk_state_change Bluetooth: ISO: Fix possible circular locking dependency Bluetooth: hci_event: Fix Invalid wait context Bluetooth: ISO: Fix possible circular locking dependency Bluetooth: hci_sync: fix memory leak in hci_update_adv_data() Bluetooth: hci_qca: Fix driver shutdown on closed serdev Bluetooth: hci_conn: Fix memory leaks Bluetooth: hci_sync: Fix use HCI_OP_LE_READ_BUFFER_SIZE_V2 Bluetooth: Fix a buffer overflow in mgmt_mesh_add() ==================== Link: https://lore.kernel.org/r/20230118002944.1679845-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 423c1d363c4659fcaca321bcb5217c8f1e7efeba Merge: 441717b6fdf2 e4f4db47794c Author: Jakub Kicinski Date: Tue Jan 17 19:13:02 2023 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== bpf 2023-01-16 We've added 6 non-merge commits during the last 8 day(s) which contain a total of 6 files changed, 22 insertions(+), 24 deletions(-). The main changes are: 1) Mitigate a Spectre v4 leak in unprivileged BPF from speculative pointer-as-scalar type confusion, from Luis Gerhorst. 2) Fix a splat when pid 1 attaches a BPF program that attempts to send killing signal to itself, from Hao Sun. 3) Fix BPF program ID information in BPF_AUDIT_UNLOAD as well as PERF_BPF_EVENT_PROG_UNLOAD events, from Paul Moore. 4) Fix BPF verifier warning triggered from invalid kfunc call in backtrack_insn, also from Hao Sun. 5) Fix potential deadlock in htab_lock_bucket from same bucket index but different map_locked index, from Tonghao Zhang. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Fix pointer-leak due to insufficient speculative store bypass mitigation bpf: hash map, avoid deadlock with suitable hash mask bpf: remove the do_idr_lock parameter from bpf_prog_free_id() bpf: restore the ebpf program ID for BPF_AUDIT_UNLOAD and PERF_BPF_EVENT_PROG_UNLOAD bpf: Skip task with pid=1 in send_signal_common() bpf: Skip invalid kfunc call in backtrack_insn ==================== Link: https://lore.kernel.org/r/20230116230745.21742-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 441717b6fdf2f620475b5e410f73d55154bb6f30 Author: Shyam Sundar S K Date: Mon Jan 16 14:20:15 2023 +0530 MAINTAINERS: Update AMD XGBE driver maintainers Due to other additional responsibilities Tom would no longer be able to support AMD XGBE driver. Cc: Tom Lendacky Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20230116085015.443127-1-Shyam-sundar.S-k@amd.com Signed-off-by: Jakub Kicinski MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 9ec9b2a30853ba843b70ea16f196e5fe3327be5f Author: Caleb Connolly Date: Sun Jan 15 17:59:24 2023 +0000 net: ipa: disable ipa interrupt during suspend The IPA interrupt can fire when pm_runtime is disabled due to it racing with the PM suspend/resume code. This causes a splat in the interrupt handler when it tries to call pm_runtime_get(). Explicitly disable the interrupt in our ->suspend callback, and re-enable it in ->resume to avoid this. If there is an interrupt pending it will be handled after resuming. The interrupt is a wake_irq, as a result even when disabled if it fires it will cause the system to wake from suspend as well as cancel any suspend transition that may be in progress. If there is an interrupt pending, the ipa_isr_thread handler will be called after resuming. Fixes: 1aac309d3207 ("net: ipa: use autosuspend") Signed-off-by: Caleb Connolly Reviewed-by: Alex Elder Link: https://lore.kernel.org/r/20230115175925.465918-1-caleb.connolly@linaro.org Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_interrupt.c | 10 ++++++++++ drivers/net/ipa/ipa_interrupt.h | 16 ++++++++++++++++ drivers/net/ipa/ipa_power.c | 17 +++++++++++++++++ 3 files changed, 43 insertions(+) commit 1d80d57ffcb55488f0ec0b77928d4f82d16b6a90 Author: Ying Hsu Date: Wed Jan 11 03:16:14 2023 +0000 Bluetooth: Fix possible deadlock in rfcomm_sk_state_change syzbot reports a possible deadlock in rfcomm_sk_state_change [1]. While rfcomm_sock_connect acquires the sk lock and waits for the rfcomm lock, rfcomm_sock_release could have the rfcomm lock and hit a deadlock for acquiring the sk lock. Here's a simplified flow: rfcomm_sock_connect: lock_sock(sk) rfcomm_dlc_open: rfcomm_lock() rfcomm_sock_release: rfcomm_sock_shutdown: rfcomm_lock() __rfcomm_dlc_close: rfcomm_k_state_change: lock_sock(sk) This patch drops the sk lock before calling rfcomm_dlc_open to avoid the possible deadlock and holds sk's reference count to prevent use-after-free after rfcomm_dlc_open completes. Reported-by: syzbot+d7ce59...@syzkaller.appspotmail.com Fixes: 1804fdf6e494 ("Bluetooth: btintel: Combine setting up MSFT extension") Link: https://syzkaller.appspot.com/bug?extid=d7ce59b06b3eb14fd218 [1] Signed-off-by: Ying Hsu Signed-off-by: Luiz Augusto von Dentz net/bluetooth/rfcomm/sock.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 506d9b4099a0ce8249bba16b4d0b828fdcf69d9a Author: Luiz Augusto von Dentz Date: Tue Jan 10 17:18:13 2023 -0800 Bluetooth: ISO: Fix possible circular locking dependency This attempts to fix the following trace: iso-tester/52 is trying to acquire lock: ffff8880024e0070 (&hdev->lock){+.+.}-{3:3}, at: iso_sock_listen+0x29e/0x440 but task is already holding lock: ffff888001978130 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}, at: iso_sock_listen+0x8b/0x440 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}: lock_acquire+0x176/0x3d0 lock_sock_nested+0x32/0x80 iso_connect_cfm+0x1a3/0x630 hci_cc_le_setup_iso_path+0x195/0x340 hci_cmd_complete_evt+0x1ae/0x500 hci_event_packet+0x38e/0x7c0 hci_rx_work+0x34c/0x980 process_one_work+0x5a5/0x9a0 worker_thread+0x89/0x6f0 kthread+0x14e/0x180 ret_from_fork+0x22/0x30 -> #1 (hci_cb_list_lock){+.+.}-{3:3}: lock_acquire+0x176/0x3d0 __mutex_lock+0x13b/0xf50 hci_le_remote_feat_complete_evt+0x17e/0x320 hci_event_packet+0x38e/0x7c0 hci_rx_work+0x34c/0x980 process_one_work+0x5a5/0x9a0 worker_thread+0x89/0x6f0 kthread+0x14e/0x180 ret_from_fork+0x22/0x30 -> #0 (&hdev->lock){+.+.}-{3:3}: check_prev_add+0xfc/0x1190 __lock_acquire+0x1e27/0x2750 lock_acquire+0x176/0x3d0 __mutex_lock+0x13b/0xf50 iso_sock_listen+0x29e/0x440 __sys_listen+0xe6/0x160 __x64_sys_listen+0x25/0x30 do_syscall_64+0x42/0x90 entry_SYSCALL_64_after_hwframe+0x62/0xcc other info that might help us debug this: Chain exists of: &hdev->lock --> hci_cb_list_lock --> sk_lock-AF_BLUETOOTH-BTPROTO_ISO Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_BLUETOOTH-BTPROTO_ISO); lock(hci_cb_list_lock); lock(sk_lock-AF_BLUETOOTH-BTPROTO_ISO); lock(&hdev->lock); *** DEADLOCK *** 1 lock held by iso-tester/52: #0: ffff888001978130 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}, at: iso_sock_listen+0x8b/0x440 Fixes: f764a6c2c1e4 ("Bluetooth: ISO: Add broadcast support") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/iso.c | 3 --- 1 file changed, 3 deletions(-) commit e9d50f76fe1f7f6f251114919247445fb5cb3734 Author: Luiz Augusto von Dentz Date: Tue Jan 10 17:04:46 2023 -0800 Bluetooth: hci_event: Fix Invalid wait context This fixes the following trace caused by attempting to lock cmd_sync_work_lock while holding the rcu_read_lock: kworker/u3:2/212 is trying to lock: ffff888002600910 (&hdev->cmd_sync_work_lock){+.+.}-{3:3}, at: hci_cmd_sync_queue+0xad/0x140 other info that might help us debug this: context-{4:4} 4 locks held by kworker/u3:2/212: #0: ffff8880028c6530 ((wq_completion)hci0#2){+.+.}-{0:0}, at: process_one_work+0x4dc/0x9a0 #1: ffff888001aafde0 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x4dc/0x9a0 #2: ffff888002600070 (&hdev->lock){+.+.}-{3:3}, at: hci_cc_le_set_cig_params+0x64/0x4f0 #3: ffffffffa5994b00 (rcu_read_lock){....}-{1:2}, at: hci_cc_le_set_cig_params+0x2f9/0x4f0 Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_event.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6a5ad251b7cdb990a3705428aef408433f05614a Author: Luiz Augusto von Dentz Date: Tue Jan 10 13:24:51 2023 -0800 Bluetooth: ISO: Fix possible circular locking dependency This attempts to fix the following trace: kworker/u3:1/184 is trying to acquire lock: ffff888001888130 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}, at: iso_connect_cfm+0x2de/0x690 but task is already holding lock: ffff8880028d1c20 (&conn->lock){+.+.}-{2:2}, at: iso_connect_cfm+0x265/0x690 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&conn->lock){+.+.}-{2:2}: lock_acquire+0x176/0x3d0 _raw_spin_lock+0x2a/0x40 __iso_sock_close+0x1dd/0x4f0 iso_sock_release+0xa0/0x1b0 sock_close+0x5e/0x120 __fput+0x102/0x410 task_work_run+0xf1/0x160 exit_to_user_mode_prepare+0x170/0x180 syscall_exit_to_user_mode+0x19/0x50 do_syscall_64+0x4e/0x90 entry_SYSCALL_64_after_hwframe+0x62/0xcc -> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}: check_prev_add+0xfc/0x1190 __lock_acquire+0x1e27/0x2750 lock_acquire+0x176/0x3d0 lock_sock_nested+0x32/0x80 iso_connect_cfm+0x2de/0x690 hci_cc_le_setup_iso_path+0x195/0x340 hci_cmd_complete_evt+0x1ae/0x500 hci_event_packet+0x38e/0x7c0 hci_rx_work+0x34c/0x980 process_one_work+0x5a5/0x9a0 worker_thread+0x89/0x6f0 kthread+0x14e/0x180 ret_from_fork+0x22/0x30 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&conn->lock); lock(sk_lock-AF_BLUETOOTH-BTPROTO_ISO); lock(&conn->lock); lock(sk_lock-AF_BLUETOOTH-BTPROTO_ISO); *** DEADLOCK *** Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type") Fixes: f764a6c2c1e4 ("Bluetooth: ISO: Add broadcast support") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/iso.c | 61 +++++++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 35 deletions(-) commit 1ed8b37cbaf14574c779064ef1372af62e8ba6aa Author: Zhengchao Shao Date: Mon Jan 9 09:26:51 2023 +0800 Bluetooth: hci_sync: fix memory leak in hci_update_adv_data() When hci_cmd_sync_queue() failed in hci_update_adv_data(), inst_ptr is not freed, which will cause memory leak, convert to use ERR_PTR/PTR_ERR to pass the instance to callback so no memory needs to be allocated. Fixes: 651cd3d65b0f ("Bluetooth: convert hci_update_adv_data to hci_sync") Signed-off-by: Zhengchao Shao Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_sync.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 272970be3dabd24cbe50e393ffee8f04aec3b9a8 Author: Krzysztof Kozlowski Date: Thu Dec 29 11:28:29 2022 +0100 Bluetooth: hci_qca: Fix driver shutdown on closed serdev The driver shutdown callback (which sends EDL_SOC_RESET to the device over serdev) should not be invoked when HCI device is not open (e.g. if hci_dev_open_sync() failed), because the serdev and its TTY are not open either. Also skip this step if device is powered off (qca_power_shutdown()). The shutdown callback causes use-after-free during system reboot with Qualcomm Atheros Bluetooth: Unable to handle kernel paging request at virtual address 0072662f67726fd7 ... CPU: 6 PID: 1 Comm: systemd-shutdow Tainted: G W 6.1.0-rt5-00325-g8a5f56bcfcca #8 Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT) Call trace: tty_driver_flush_buffer+0x4/0x30 serdev_device_write_flush+0x24/0x34 qca_serdev_shutdown+0x80/0x130 [hci_uart] device_shutdown+0x15c/0x260 kernel_restart+0x48/0xac KASAN report: BUG: KASAN: use-after-free in tty_driver_flush_buffer+0x1c/0x50 Read of size 8 at addr ffff16270c2e0018 by task systemd-shutdow/1 CPU: 7 PID: 1 Comm: systemd-shutdow Not tainted 6.1.0-next-20221220-00014-gb85aaf97fb01-dirty #28 Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT) Call trace: dump_backtrace.part.0+0xdc/0xf0 show_stack+0x18/0x30 dump_stack_lvl+0x68/0x84 print_report+0x188/0x488 kasan_report+0xa4/0xf0 __asan_load8+0x80/0xac tty_driver_flush_buffer+0x1c/0x50 ttyport_write_flush+0x34/0x44 serdev_device_write_flush+0x48/0x60 qca_serdev_shutdown+0x124/0x274 device_shutdown+0x1e8/0x350 kernel_restart+0x48/0xb0 __do_sys_reboot+0x244/0x2d0 __arm64_sys_reboot+0x54/0x70 invoke_syscall+0x60/0x190 el0_svc_common.constprop.0+0x7c/0x160 do_el0_svc+0x44/0xf0 el0_svc+0x2c/0x6c el0t_64_sync_handler+0xbc/0x140 el0t_64_sync+0x190/0x194 Fixes: 7e7bbddd029b ("Bluetooth: hci_qca: Fix qca6390 enable failure after warm reboot") Cc: Signed-off-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_qca.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3aa21311f36d8a2730c7ccef37235e951f23927b Author: Zhengchao Shao Date: Wed Jan 4 14:46:23 2023 +0800 Bluetooth: hci_conn: Fix memory leaks When hci_cmd_sync_queue() failed in hci_le_terminate_big() or hci_le_big_terminate(), the memory pointed by variable d is not freed, which will cause memory leak. Add release process to error path. Fixes: eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS connections") Signed-off-by: Zhengchao Shao Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_conn.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 3a4d29b6d631bb00236a98887e1039bbfc1b6ab5 Author: Luiz Augusto von Dentz Date: Mon Dec 19 13:32:51 2022 -0800 Bluetooth: hci_sync: Fix use HCI_OP_LE_READ_BUFFER_SIZE_V2 Don't try to use HCI_OP_LE_READ_BUFFER_SIZE_V2 if controller don't support ISO channels, but in order to check if ISO channels are supported HCI_OP_LE_READ_LOCAL_FEATURES needs to be done earlier so the features bits can be checked on hci_le_read_buffer_size_sync. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216817 Fixes: c1631dbc00c1 ("Bluetooth: hci_sync: Fix hci_read_buffer_size_sync") Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_sync.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2185e0fdbb2137f22a9dd9fcbf6481400d56299b Author: Harshit Mogalapalli Date: Mon Dec 12 05:08:28 2022 -0800 Bluetooth: Fix a buffer overflow in mgmt_mesh_add() Smatch Warning: net/bluetooth/mgmt_util.c:375 mgmt_mesh_add() error: __memcpy() 'mesh_tx->param' too small (48 vs 50) Analysis: 'mesh_tx->param' is array of size 48. This is the destination. u8 param[sizeof(struct mgmt_cp_mesh_send) + 29]; // 19 + 29 = 48. But in the caller 'mesh_send' we reject only when len > 50. len > (MGMT_MESH_SEND_SIZE + 31) // 19 + 31 = 50. Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh") Signed-off-by: Harshit Mogalapalli Signed-off-by: Brian Gix Signed-off-by: Luiz Augusto von Dentz net/bluetooth/mgmt_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c410cb974f2ba562920ecb8492ee66945dcf88af Author: Florian Westphal Date: Wed Jan 11 14:42:32 2023 +0100 netfilter: conntrack: handle tcp challenge acks during connection reuse When a connection is re-used, following can happen: [ connection starts to close, fin sent in either direction ] > syn # initator quickly reuses connection < ack # peer sends a challenge ack > rst # rst, sequence number == ack_seq of previous challenge ack > syn # this syn is expected to pass Problem is that the rst will fail window validation, so it gets tagged as invalid. If ruleset drops such packets, we get repeated syn-retransmits until initator gives up or peer starts responding with syn/ack. Before the commit indicated in the "Fixes" tag below this used to work: The challenge-ack made conntrack re-init state based on the challenge ack itself, so the following rst would pass window validation. Add challenge-ack support: If we get ack for syn, record the ack_seq, and then check if the rst sequence number matches the last ack number seen in reverse direction. Fixes: c7aab4f17021 ("netfilter: nf_conntrack_tcp: re-init for syn packets only") Reported-by: Michal Tesar Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_tcp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ac8f29aef2f1695956ff6773b33f975290437f29 Author: Jason Gunthorpe Date: Tue Jan 17 15:16:17 2023 -0400 genirq/msi: Free the fwnode created by msi_create_device_irq_domain() msi_create_device_irq_domain() creates a firmware node for the new domain, which is never freed. kmemleak reports: unreferenced object 0xffff888120ba9a00 (size 96): comm "systemd-modules", pid 221, jiffies 4294893411 (age 635.732s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 e0 19 8b 83 ff ff ff ff ................ 00 00 00 00 00 00 00 00 18 9a ba 20 81 88 ff ff ........... .... backtrace: [<000000008cdbc98d>] __irq_domain_alloc_fwnode+0x51/0x2b0 [<00000000c57acf9d>] msi_create_device_irq_domain+0x283/0x670 [<000000009b567982>] __pci_enable_msix_range+0x49e/0xdb0 [<0000000077cc1445>] pci_alloc_irq_vectors_affinity+0x11f/0x1c0 [<00000000532e9ef5>] mlx5_irq_table_create+0x24c/0x940 [mlx5_core] [<00000000fabd2b80>] mlx5_load+0x1fa/0x680 [mlx5_core] [<000000006bb22ae4>] mlx5_init_one+0x485/0x670 [mlx5_core] [<00000000eaa5e1ad>] probe_one+0x4c2/0x720 [mlx5_core] [<00000000df8efb43>] local_pci_probe+0xd6/0x170 [<0000000085cb9924>] pci_device_probe+0x231/0x6e0 Use the proper free operation for the firmware wnode so the name is freed during error unwind of msi_create_device_irq_domain() and also free the node in msi_remove_device_irq_domain() if it was automatically allocated. To avoid extra NULL pointer checks make irq_domain_free_fwnode() tolerant of NULL. Fixes: 27a6dea3ebaa ("genirq/msi: Provide msi_create/free_device_irq_domain()") Reported-by: Omri Barazi Signed-off-by: Jason Gunthorpe Signed-off-by: Thomas Gleixner Tested-by: Kalle Valo Tested-by: Leon Romanovsky Link: https://lore.kernel.org/r/0-v2-24af6665e2da+c9-msi_leak_jgg@nvidia.com kernel/irq/irqdomain.c | 2 +- kernel/irq/msi.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit effa76856f2d7111f8c44de49f15ebdfccea8ccc Author: Arnaldo Carvalho de Melo Date: Mon Jan 16 10:22:13 2023 -0300 tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources To pick the changes in: 8aff460f216753d8 ("KVM: x86: Add a VALID_MASK for the flags in kvm_msr_filter_range") c1340fe3590ebbe7 ("KVM: x86: Add a VALID_MASK for the flag in kvm_msr_filter") be83794210e7020f ("KVM: x86: Disallow the use of KVM_MSR_FILTER_DEFAULT_ALLOW in the kernel") That just rebuilds kvm-stat.c on x86, no change in functionality. This silences these perf build warning: 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 Cc: Aaron Lewis Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paolo Bonzini Link: http://lore.kernel.org/lkml/Y8VR5wSAkd2A0HxS@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/uapi/asm/kvm.h | 5 +++++ 1 file changed, 5 insertions(+) commit 8026a31df6d59265553e7874cf3c2b560138a407 Author: Arnaldo Carvalho de Melo Date: Mon Jan 2 11:16:22 2023 -0300 tools headers UAPI: Sync linux/kvm.h with the kernel sources To pick the changes in: b0305c1e0e27ad91 ("KVM: x86/xen: Add KVM_XEN_INVALID_GPA and KVM_XEN_INVALID_GFN to uapi") That just rebuilds perf, as these patches don't add any new KVM ioctl to be harvested for the the 'perf trace' ioctl syscall argument beautifiers. This silences this perf build warning: 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 Cc: Adrian Hunter Cc: David Woodhouse Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paolo Bonzini Link: http://lore.kernel.org/lkml/Y7Loj5slB908QSXf@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/kvm.h | 3 +++ 1 file changed, 3 insertions(+) commit 7d83299351fe7c812c529f5e39fe63b5312e4233 Author: Arnd Bergmann Date: Tue Jan 17 17:39:32 2023 +0100 staging: vchiq_arm: fix enum vchiq_status return types gcc-13 notices a type mismatch between function declaration and definition for a few functions that have been converted from returning vchiq specific status values to regular error codes: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:662:5: error: conflicting types for 'vchiq_initialise' due to enum/integer mismatch; have 'int(struct vchiq_instance **)' [-Werror=enum-int-mismatch] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1411:1: error: conflicting types for 'vchiq_use_internal' due to enum/integer mismatch; have 'int(struct vchiq_state *, struct vchiq_service *, enum USE_TYPE_E)' [-Werror=enum-int-mismatch] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1468:1: error: conflicting types for 'vchiq_release_internal' due to enum/integer mismatch; have 'int(struct vchiq_state *, struct vchiq_service *)' [-Werror=enum-int-mismatch] Change the declarations to match the actual function definition. Fixes: a9fbd828be7f ("staging: vchiq_arm: drop enum vchiq_status from vchiq_*_internal") Cc: stable Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230117163957.1109872-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 41e1992665a2701fa025a8b76970c43b4148446f Author: Heiko Carstens Date: Tue Jan 17 19:00:59 2023 +0100 s390: workaround invalid gcc-11 out of bounds read warning GCC 11.1.0 and 11.2.0 generate a wrong warning when compiling the kernel e.g. with allmodconfig: arch/s390/kernel/setup.c: In function ‘setup_lowcore_dat_on’: ./include/linux/fortify-string.h:57:33: error: ‘__builtin_memcpy’ reading 128 bytes from a region of size 0 [-Werror=stringop-overread] ... arch/s390/kernel/setup.c:526:9: note: in expansion of macro ‘memcpy’ 526 | memcpy(abs_lc->cregs_save_area, S390_lowcore.cregs_save_area, | ^~~~~~ This could be addressed by using absolute_pointer() with the S390_lowcore macro, but this is not a good idea since this generates worse code for performance critical paths. Therefore simply use a for loop to copy the array in question and get rid of the warning. Reported-by: Geert Uytterhoeven Signed-off-by: Heiko Carstens arch/s390/kernel/setup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c1649ec55708ae42091a2f1bca1ab49ecd722d55 Merge: 2bbb0674c93f 7c24fa225081 Author: Linus Torvalds Date: Tue Jan 17 09:29:17 2023 -0800 Merge tag 'nfsd-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Fix recently introduced use-after-free bugs * tag 'nfsd-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: NFSD: replace delayed_work with work_struct for nfsd_client_shrinker NFSD: register/unregister of nfsd-client shrinker at nfsd startup/shutdown time NFSD: fix use-after-free in nfsd4_ssc_setup_dul() commit 2bbb0674c93f9373f12048786b4638b055243112 Merge: 6e50979a9c87 fa17087e2442 Author: Linus Torvalds Date: Tue Jan 17 09:20:50 2023 -0800 Merge tag 'tomoyo-pr-20230117' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1 Pull tomoyo fixes from Tetsuo Handa: "Makefile and Kconfig updates for TOMOYO" * tag 'tomoyo-pr-20230117' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1: tomoyo: Update website link tomoyo: Remove "select SRCU" tomoyo: Omit use of bin2c tomoyo: avoid unneeded creation of builtin-policy.h tomoyo: fix broken dependency on *.conf.default commit 531390a243ef47448f8bad01c186c2787666bf4d Author: Takashi Sakamoto Date: Tue Jan 17 18:06:10 2023 +0900 firewire: fix memory leak for payload of request subaction to IEC 61883-1 FCP region This patch is fix for Linux kernel v2.6.33 or later. For request subaction to IEC 61883-1 FCP region, Linux FireWire subsystem have had an issue of use-after-free. The subsystem allows multiple user space listeners to the region, while data of the payload was likely released before the listeners execute read(2) to access to it for copying to user space. The issue was fixed by a commit 281e20323ab7 ("firewire: core: fix use-after-free regression in FCP handler"). The object of payload is duplicated in kernel space for each listener. When the listener executes ioctl(2) with FW_CDEV_IOC_SEND_RESPONSE request, the object is going to be released. However, it causes memory leak since the commit relies on call of release_request() in drivers/firewire/core-cdev.c. Against the expectation, the function is never called due to the design of release_client_resource(). The function delegates release task to caller when called with non-NULL fourth argument. The implementation of ioctl_send_response() is the case. It should release the object explicitly. This commit fixes the bug. Cc: Fixes: 281e20323ab7 ("firewire: core: fix use-after-free regression in FCP handler") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230117090610.93792-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai drivers/firewire/core-cdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7746564793978fe2f43b18a302b22dca0ad3a0e8 Author: Pavel Begunkov Date: Tue Jan 17 11:42:15 2023 +0000 block: fix hctx checks for batch allocation When there are no read queues read requests will be assigned a default queue on allocation. However, blk_mq_get_cached_request() is not prepared for that and will fail all attempts to grab read requests from the cache. Worst case it doubles the number of requests allocated, roughly half of which will be returned by blk_mq_free_plug_rqs(). It only affects batched allocations and so is io_uring specific. For reference, QD8 t/io_uring benchmark improves by 20-35%. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/80d4511011d7d4751b4cf6375c4e38f237d935e3.1673955390.git.asml.silence@gmail.com Signed-off-by: Jens Axboe block/blk-mq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7171b0e261b17de96490adf053b8bb4b00061bcf Author: Flavio Suligoi Date: Mon Dec 19 13:47:59 2022 +0100 usb: core: hub: disable autosuspend for TI TUSB8041 The Texas Instruments TUSB8041 has an autosuspend problem at high temperature. If there is not USB traffic, after a couple of ms, the device enters in autosuspend mode. In this condition the external clock stops working, to save energy. When the USB activity turns on, ther hub exits the autosuspend state, the clock starts running again and all works fine. At ambient temperature all works correctly, but at high temperature, when the USB activity turns on, the external clock doesn't restart and the hub disappears from the USB bus. Disabling the autosuspend mode for this hub solves the issue. Signed-off-by: Flavio Suligoi Cc: stable Acked-by: Alan Stern Link: https://lore.kernel.org/r/20221219124759.3207032-1-f.suligoi@asem.it Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 11cefeb2058f9f2322713b2683be9301556705e2 Author: Johan Hovold Date: Mon Dec 12 16:20:35 2022 +0100 USB: fix misleading usb_set_intfdata() kernel doc The struct device driver-data pointer is used for any data that a driver may need in various callbacks while bound to the device. For convenience, subsystems typically provide wrappers such as usb_set_intfdata() of the generic accessor functions for use in bus callbacks. There is generally no longer any need for a driver to clear the pointer, but since commit 0998d0631001 ("device-core: Ensure drvdata = NULL when no driver is bound") the driver-data pointer is set to NULL by driver core post unbind anyway. For historical reasons, USB core also clears this pointer when an explicitly claimed interface is released. Due to a misunderstanding, a misleading kernel doc comment for usb_set_intfdata() was recently added which claimed that the driver data pointer must not be cleared during disconnect before "all actions [are] completed", which is both imprecise and incorrect. Specifically, drivers like cdc-acm which claim additional interfaces use the driver-data pointer as a flag which is cleared when the first interface is unbound. As long as a driver does not do something odd like dereference the pointer in, for example, completion callbacks, this can be done at any time during disconnect. And in any case this is no different than for any other resource, like the driver data itself, which may be freed by the disconnect callback. Note that the comment actually also claimed that the interface itself was somehow being set to NULL by driver core. Fix the kernel doc by removing incorrect, overly specific and misleading details and adding a comment about why some drivers do clear the driver-data pointer. Fixes: 27ef17849779 ("usb: add usb_set_intfdata() documentation") Signed-off-by: Johan Hovold Acked-by: Alan Stern Acked-by: Vincent Mailhol Link: https://lore.kernel.org/r/20221212152035.31806-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman include/linux/usb.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit c6ec929595c7443250b2a4faea988c62019d5cd2 Author: Maciej Żenczykowski Date: Tue Jan 17 05:18:39 2023 -0800 usb: gadget: f_ncm: fix potential NULL ptr deref in ncm_bitrate() In Google internal bug 265639009 we've received an (as yet) unreproducible crash report from an aarch64 GKI 5.10.149-android13 running device. AFAICT the source code is at: https://android.googlesource.com/kernel/common/+/refs/tags/ASB-2022-12-05_13-5.10 The call stack is: ncm_close() -> ncm_notify() -> ncm_do_notify() with the crash at: ncm_do_notify+0x98/0x270 Code: 79000d0b b9000a6c f940012a f9400269 (b9405d4b) Which I believe disassembles to (I don't know ARM assembly, but it looks sane enough to me...): // halfword (16-bit) store presumably to event->wLength (at offset 6 of struct usb_cdc_notification) 0B 0D 00 79 strh w11, [x8, #6] // word (32-bit) store presumably to req->Length (at offset 8 of struct usb_request) 6C 0A 00 B9 str w12, [x19, #8] // x10 (NULL) was read here from offset 0 of valid pointer x9 // IMHO we're reading 'cdev->gadget' and getting NULL // gadget is indeed at offset 0 of struct usb_composite_dev 2A 01 40 F9 ldr x10, [x9] // loading req->buf pointer, which is at offset 0 of struct usb_request 69 02 40 F9 ldr x9, [x19] // x10 is null, crash, appears to be attempt to read cdev->gadget->max_speed 4B 5D 40 B9 ldr w11, [x10, #0x5c] which seems to line up with ncm_do_notify() case NCM_NOTIFY_SPEED code fragment: event->wLength = cpu_to_le16(8); req->length = NCM_STATUS_BYTECOUNT; /* SPEED_CHANGE data is up/down speeds in bits/sec */ data = req->buf + sizeof *event; data[0] = cpu_to_le32(ncm_bitrate(cdev->gadget)); My analysis of registers and NULL ptr deref crash offset (Unable to handle kernel NULL pointer dereference at virtual address 000000000000005c) heavily suggests that the crash is due to 'cdev->gadget' being NULL when executing: data[0] = cpu_to_le32(ncm_bitrate(cdev->gadget)); which calls: ncm_bitrate(NULL) which then calls: gadget_is_superspeed(NULL) which reads ((struct usb_gadget *)NULL)->max_speed and hits a panic. AFAICT, if I'm counting right, the offset of max_speed is indeed 0x5C. (remember there's a GKI KABI reservation of 16 bytes in struct work_struct) It's not at all clear to me how this is all supposed to work... but returning 0 seems much better than panic-ing... Cc: Felipe Balbi Cc: Lorenzo Colitti Cc: Carlos Llamas Cc: stable@vger.kernel.org Signed-off-by: Maciej Żenczykowski Cc: stable Link: https://lore.kernel.org/r/20230117131839.1138208-1-maze@google.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_ncm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7c07553807c5125c89de242d35c10c206fd8e6bb Author: Chanh Nguyen Date: Wed Jan 11 13:51:05 2023 +0700 USB: gadget: Add ID numbers to configfs-gadget driver names It is unable to use configfs to attach more than one gadget. When attaching the second gadget, it always fails and the kernel message prints out: Error: Driver 'configfs-gadget' is already registered, aborting... UDC core: g1: driver registration failed: -16 This commit fixes the problem by using the gadget name as a suffix to each configfs_gadget's driver name, thus making the names distinct. Fixes: fc274c1e9973 ("USB: gadget: Add a new bus for gadgets") Cc: stable Signed-off-by: Chanh Nguyen Reviewed-by: Andrzej Pietrasiewicz Tested-by: Heikki Krogerus Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20230111065105.29205-1-chanh@os.amperecomputing.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/configfs.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 36f78477ac2c89e9a2eed4a31404a291a3450b5d Author: ChiYuan Huang Date: Mon Jan 9 15:19:50 2023 +0800 usb: typec: tcpm: Fix altmode re-registration causes sysfs create fail There's the altmode re-registeration issue after data role swap (DR_SWAP). Comparing to USBPD 2.0, in USBPD 3.0, it loose the limit that only DFP can initiate the VDM command to get partner identity information. For a USBPD 3.0 UFP device, it may already get the identity information from its port partner before DR_SWAP. If DR_SWAP send or receive at the mean time, 'send_discover' flag will be raised again. It causes discover identify action restart while entering ready state. And after all discover actions are done, the 'tcpm_register_altmodes' will be called. If old altmode is not unregistered, this sysfs create fail can be found. In 'DR_SWAP_CHANGE_DR' state case, only DFP will unregister altmodes. For UFP, the original altmodes keep registered. This patch fix the logic that after DR_SWAP, 'tcpm_unregister_altmodes' must be called whatever the current data role is. Reviewed-by: Macpaul Lin Fixes: ae8a2ca8a221 ("usb: typec: Group all TCPCI/TCPM code together") Reported-by: TommyYl Chen Cc: stable@vger.kernel.org Signed-off-by: ChiYuan Huang Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/1673248790-15794-1-git-send-email-cy_huang@richtek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e95765e97d9cb93258a4840440d410fa6ff7e819 Author: Daniel Scally Date: Fri Dec 16 16:05:28 2022 +0000 usb: gadget: g_webcam: Send color matching descriptor per frame Currently the color matching descriptor is only sent across the wire a single time, following the descriptors for each format and frame. According to the UVC 1.5 Specification 3.9.2.6 ("Color Matching Descriptors"): "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". Add another reference to the color matching descriptor after the yuyv frames so that it's correctly transmitted for that format too. Fixes: a9914127e834 ("USB gadget: Webcam device") Cc: stable Signed-off-by: Daniel Scally Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/r/20221216160528.479094-1-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/webcam.c | 3 +++ 1 file changed, 3 insertions(+) commit 85af23df903ee14bfcba60c53e4f3b640f2310f8 Author: Prashant Malani Date: Wed Jan 11 02:05:43 2023 +0000 usb: typec: altmodes/displayport: Use proper macro for pin assignment check While looking at the DP configuration VDO to determine the peripheral configuration, the spec (Table 8-5: DisplayPort Configurations, VESA DisplayPort Alt Mode Standard v2.0) lists the options as "UFP_U as a DP Source/Sink Device". So, use the correct macro while performing this check. Effectively it's the same as the existing code, but the proposed macro describes the state a little better. No functional changes introduced. Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230111020546.3384569-3-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/altmodes/displayport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9682b41e52cc9f42f5c33caf410464392adaef04 Author: Prashant Malani Date: Wed Jan 11 02:05:42 2023 +0000 usb: typec: altmodes/displayport: Fix pin assignment calculation Commit c1e5c2f0cb8a ("usb: typec: altmodes/displayport: correct pin assignment for UFP receptacles") fixed the pin assignment calculation to take into account whether the peripheral was a plug or a receptacle. But the "pin_assignments" sysfs logic was not updated. Address this by using the macros introduced in the aforementioned commit in the sysfs logic too. Fixes: c1e5c2f0cb8a ("usb: typec: altmodes/displayport: correct pin assignment for UFP receptacles") Cc: stable@vger.kernel.org Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230111020546.3384569-2-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/altmodes/displayport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 582836e3cfab4faafbdc93bbec96fce036a08ee1 Author: Prashant Malani Date: Wed Jan 11 02:05:41 2023 +0000 usb: typec: altmodes/displayport: Add pin assignment helper The code to extract a peripheral's currently supported Pin Assignments is repeated in a couple of locations. Factor it out into a separate function. This will also make it easier to add fixes (we only need to update 1 location instead of 2). Fixes: c1e5c2f0cb8a ("usb: typec: altmodes/displayport: correct pin assignment for UFP receptacles") Cc: stable@vger.kernel.org Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230111020546.3384569-1-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/altmodes/displayport.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit ce405d561b020e5a46340eb5146805a625dcacee Author: Udipto Goswami Date: Thu Dec 15 10:59:06 2022 +0530 usb: gadget: f_fs: Ensure ep0req is dequeued before free_request As per the documentation, function usb_ep_free_request guarantees the request will not be queued or no longer be re-queued (or otherwise used). However, with the current implementation it doesn't make sure that the request in ep0 isn't reused. Fix this by dequeuing the ep0req on functionfs_unbind before freeing the request to align with the definition. Fixes: ddf8abd25994 ("USB: f_fs: the FunctionFS driver") Signed-off-by: Udipto Goswami Tested-by: Krishna Kurapati Link: https://lore.kernel.org/r/20221215052906.8993-3-quic_ugoswami@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_fs.c | 2 ++ 1 file changed, 2 insertions(+) commit 6a19da111057f69214b97c62fb0ac59023970850 Author: Udipto Goswami Date: Thu Dec 15 10:59:05 2022 +0530 usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait While performing fast composition switch, there is a possibility that the process of ffs_ep0_write/ffs_ep0_read get into a race condition due to ep0req being freed up from functionfs_unbind. Consider the scenario that the ffs_ep0_write calls the ffs_ep0_queue_wait by taking a lock &ffs->ev.waitq.lock. However, the functionfs_unbind isn't bounded so it can go ahead and mark the ep0req to NULL, and since there is no NULL check in ffs_ep0_queue_wait we will end up in use-after-free. Fix this by making a serialized execution between the two functions using a mutex_lock(ffs->mutex). Fixes: ddf8abd25994 ("USB: f_fs: the FunctionFS driver") Signed-off-by: Udipto Goswami Tested-by: Krishna Kurapati Link: https://lore.kernel.org/r/20221215052906.8993-2-quic_ugoswami@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_fs.c | 5 +++++ 1 file changed, 5 insertions(+) commit cde37881e2e14590675d0acdfbad408300d9ca95 Author: Matthias Kaehlcke Date: Tue Jan 10 17:32:53 2023 +0000 usb: misc: onboard_hub: Move 'attach' work to the driver Currently each onboard_hub platform device owns an 'attach' work, which is scheduled when the device probes. With this deadlocks have been reported on a Raspberry Pi 3 B+ [1], which has nested onboard hubs. The flow of the deadlock is something like this (with the onboard_hub driver built as a module) [2]: - USB root hub is instantiated - core hub driver calls onboard_hub_create_pdevs(), which creates the 'raw' platform device for the 1st level hub - 1st level hub is probed by the core hub driver - core hub driver calls onboard_hub_create_pdevs(), which creates the 'raw' platform device for the 2nd level hub - onboard_hub platform driver is registered - platform device for 1st level hub is probed - schedules 'attach' work - platform device for 2nd level hub is probed - schedules 'attach' work - onboard_hub USB driver is registered - device (and parent) lock of hub is held while the device is re-probed with the onboard_hub driver - 'attach' work (running in another thread) calls driver_attach(), which blocks on one of the hub device locks - onboard_hub_destroy_pdevs() is called by the core hub driver when one of the hubs is detached - destroying the pdevs invokes onboard_hub_remove(), which waits for the 'attach' work to complete - waits forever, since the 'attach' work can't acquire the device lock Use a single work struct for the driver instead of having a work struct per onboard hub platform driver instance. With that it isn't necessary to cancel the work in onboard_hub_remove(), which fixes the deadlock. The work is only cancelled when the driver is unloaded. [1] https://lore.kernel.org/r/d04bcc45-3471-4417-b30b-5cf9880d785d@i2se.com/ [2] https://lore.kernel.org/all/Y6OrGbqaMy2iVDWB@google.com/ Cc: stable@vger.kernel.org Fixes: 8bc063641ceb ("usb: misc: Add onboard_usb_hub driver") Link: https://lore.kernel.org/r/d04bcc45-3471-4417-b30b-5cf9880d785d@i2se.com/ Link: https://lore.kernel.org/all/Y6OrGbqaMy2iVDWB@google.com/ Reported-by: Stefan Wahren Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20230110172954.v2.2.I16b51f32db0c32f8a8532900bfe1c70c8572881a@changeid Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/onboard_usb_hub.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e5854355d76b8d768cea8e4fc3ce6dfdba25518a Author: Matthias Kaehlcke Date: Tue Jan 10 17:32:52 2023 +0000 usb: misc: onboard_hub: Invert driver registration order The onboard_hub 'driver' consists of two drivers, a platform driver and a USB driver. Currently when the onboard hub driver is initialized it first registers the platform driver, then the USB driver. This results in a race condition when the 'attach' work is executed, which is scheduled when the platform device is probed. The purpose of fhe 'attach' work is to bind elegible USB hub devices to the onboard_hub USB driver. This fails if the work runs before the USB driver has been registered. Register the USB driver first, then the platform driver. This increases the chances that the onboard_hub USB devices are probed before their corresponding platform device, which the USB driver tries to locate in _probe(). The driver already handles this situation and defers probing if the onboard hub platform device doesn't exist yet. Cc: stable@vger.kernel.org Fixes: 8bc063641ceb ("usb: misc: Add onboard_usb_hub driver") Link: https://lore.kernel.org/lkml/Y6W00vQm3jfLflUJ@hovoldconsulting.com/T/#m0d64295f017942fd988f7c53425db302d61952b4 Reported-by: Alexander Stein Signed-off-by: Matthias Kaehlcke Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20230110172954.v2.1.I75494ebee7027a50235ce4b1e930fa73a578fbe2@changeid Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/onboard_usb_hub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fac4b8633fd682ecc8e9cff61cb3e33374a1c7e5 Author: Jack Pham Date: Mon Jan 9 23:12:18 2023 -0800 usb: ucsi: Ensure connector delayed work items are flushed During ucsi_unregister() when destroying a connector's workqueue, there may still be pending delayed work items that haven't been scheduled yet. Because queue_delayed_work() uses a separate timer to schedule a work item, the destroy_workqueue() call is not aware of any pending items. Hence when a pending item's timer expires it would then try to queue on a dangling workqueue pointer. Fix this by keeping track of all work items in a list, so that prior to destroying the workqueue any pending items can be flushed. Do this by calling mod_delayed_work() as that will cause pending items to get queued immediately, which then allows the ensuing destroy_workqueue() to implicitly drain all currently queued items to completion and free themselves. Fixes: b9aa02ca39a4 ("usb: typec: ucsi: Add polling mechanism for partner tasks like alt mode checking") Suggested-by: Heikki Krogerus Co-developed-by: Linyu Yuan Signed-off-by: Linyu Yuan Signed-off-by: Jack Pham Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230110071218.26261-1-quic_jackp@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi.c | 24 +++++++++++++++++++++--- drivers/usb/typec/ucsi/ucsi.h | 1 + 2 files changed, 22 insertions(+), 3 deletions(-) commit bd449ad8cee9d4b523abbdfa73e1a2a08333f331 Author: Yang Yingliang Date: Fri Dec 30 16:17:30 2022 +0800 usb: musb: fix error return code in omap2430_probe() Before calling platform_get_resource() in omap2430_probe(), the 'ret' is re-assgined to 0, it can't return an error code, if platform_get_resource fails. Set the error code to -EINVAL to fix this. Fixes: ffbe2feac59b ("usb: musb: omap2430: Fix probe regression for missing resources") Cc: stable Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221230081730.1655616-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/omap2430.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f96c0384047257365371a8ac217107c0371586f1 Author: Xu Yang Date: Thu Dec 15 13:54:09 2022 +0800 usb: chipidea: core: fix possible constant 0 if use IS_ERR(ci->role_switch) After successfully probed, ci->role_switch would only be NULL or a valid pointer. IS_ERR(ci->role_switch) will always return 0. So no need to wrap it with IS_ERR, otherwise the logic is wrong. Fixes: e1b5d2bed67c ("usb: chipidea: core: handle usb role switch in a common way") cc: Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20221215055409.3760523-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74622f0a81d0c2bcfc39f9192b788124e8c7f0af Author: Mathias Nyman Date: Mon Jan 16 16:22:16 2023 +0200 xhci: Detect lpm incapable xHC USB3 roothub ports from ACPI tables USB3 ports on xHC hosts may have retimers that cause too long exit latency to work with native USB3 U1/U2 link power management states. For now only use usb_acpi_port_lpm_incapable() to evaluate if port lpm should be disabled while setting up the USB3 roothub. Other ways to identify lpm incapable ports can be added here later if ACPI _DSM does not exist. Limit this to Intel hosts for now, this is to my knowledge only an Intel issue. Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230116142216.1141605-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit cd702d18c882d5a4ea44bbdb38edd5d5577ef640 Author: Mathias Nyman Date: Mon Jan 16 16:22:15 2023 +0200 usb: acpi: add helper to check port lpm capability using acpi _DSM Add a helper to evaluate ACPI usb device specific method (_DSM) provided in case the USB3 port shouldn't enter U1 and U2 link states. This _DSM was added as port specific retimer configuration may lead to exit latencies growing beyond U1/U2 exit limits, and OS needs a way to find which ports can't support U1/U2 link power management states. This _DSM is also used by windows: Link: https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/usb-device-specific-method---dsm- Some patch issues found in testing resolved by Ron Lee Cc: stable@vger.kernel.org Tested-by: Ron Lee Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230116142216.1141605-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/usb-acpi.c | 65 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/usb.h | 3 +++ 2 files changed, 68 insertions(+) commit 0522b9a1653048440da5f21747f21e498b9220d1 Author: Mathias Nyman Date: Mon Jan 16 16:22:14 2023 +0200 xhci: Add a flag to disable USB3 lpm on a xhci root port level. One USB3 roothub port may support link power management, while another root port on the same xHC can't due to different retimers used for the ports. This is the case with Intel Alder Lake, and possible future platforms where retimers used for USB4 ports cause too long exit latecy to enable native USB3 lpm U1 and U2 states. Add a flag in the xhci port structure to indicate if the port is lpm_incapable, and check it while calculating exit latency. Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230116142216.1141605-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 8 ++++++++ drivers/usb/host/xhci.h | 1 + 2 files changed, 9 insertions(+) commit 23a3b8d5a2365653fd9bc5a9454d1e7f4facbf85 Author: Mathias Nyman Date: Mon Jan 16 16:22:13 2023 +0200 xhci: Add update_hub_device override for PCI xHCI hosts Allow PCI hosts to check and tune roothub and port settings before the hub is up and running. This override is needed to turn off U1 and U2 LPM for some ports based on per port ACPI _DSM, _UPC, or possibly vendor specific mmio values for Intel xHC hosts. Usb core calls the host update_hub_device once it creates a hub. Entering U1 or U2 link power save state on ports with this limitation will cause link to fail, turning the usb device unusable in that setup. Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230116142216.1141605-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 9 +++++++++ drivers/usb/host/xhci.c | 5 ++++- drivers/usb/host/xhci.h | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) commit a2bc47c43e70cf904b1af49f76d572326c08bca7 Author: Mathias Nyman Date: Mon Jan 16 16:22:12 2023 +0200 xhci: Fix null pointer dereference when host dies Make sure xhci_free_dev() and xhci_kill_endpoint_urbs() do not race and cause null pointer dereference when host suddenly dies. Usb core may call xhci_free_dev() which frees the xhci->devs[slot_id] virt device at the same time that xhci_kill_endpoint_urbs() tries to loop through all the device's endpoints, checking if there are any cancelled urbs left to give back. hold the xhci spinlock while freeing the virt device Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230116142216.1141605-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 5 +++++ 1 file changed, 5 insertions(+) commit e8fb5bc76eb86437ab87002d4a36d6da02165654 Author: Jimmy Hu Date: Mon Jan 16 16:22:11 2023 +0200 usb: xhci: Check endpoint is valid before dereferencing it When the host controller is not responding, all URBs queued to all endpoints need to be killed. This can cause a kernel panic if we dereference an invalid endpoint. Fix this by using xhci_get_virt_ep() helper to find the endpoint and checking if the endpoint is valid before dereferencing it. [233311.853271] xhci-hcd xhci-hcd.1.auto: xHCI host controller not responding, assume dead [233311.853393] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000e8 [233311.853964] pc : xhci_hc_died+0x10c/0x270 [233311.853971] lr : xhci_hc_died+0x1ac/0x270 [233311.854077] Call trace: [233311.854085] xhci_hc_died+0x10c/0x270 [233311.854093] xhci_stop_endpoint_command_watchdog+0x100/0x1a4 [233311.854105] call_timer_fn+0x50/0x2d4 [233311.854112] expire_timers+0xac/0x2e4 [233311.854118] run_timer_softirq+0x300/0xabc [233311.854127] __do_softirq+0x148/0x528 [233311.854135] irq_exit+0x194/0x1a8 [233311.854143] __handle_domain_irq+0x164/0x1d0 [233311.854149] gic_handle_irq.22273+0x10c/0x188 [233311.854156] el1_irq+0xfc/0x1a8 [233311.854175] lpm_cpuidle_enter+0x25c/0x418 [msm_pm] [233311.854185] cpuidle_enter_state+0x1f0/0x764 [233311.854194] do_idle+0x594/0x6ac [233311.854201] cpu_startup_entry+0x7c/0x80 [233311.854209] secondary_start_kernel+0x170/0x198 Fixes: 50e8725e7c42 ("xhci: Refactor command watchdog and fix split string.") Cc: stable@vger.kernel.org Signed-off-by: Jimmy Hu Signed-off-by: Mathias Nyman Message-ID: <0fe978ed-8269-9774-1c40-f8a98c17e838@linux.intel.com> Link: https://lore.kernel.org/r/20230116142216.1141605-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 93915a4170e9defd56a767a18e6c4076f3d18609 Author: Ricardo Ribalda Date: Mon Jan 16 16:22:10 2023 +0200 xhci-pci: set the dma max_seg_size Allow devices to have dma operations beyond 64K, and avoid warnings such as: xhci_hcd 0000:00:14.0: mapping sg segment longer than device claims to support [len=98304] [max=65536] Cc: stable@vger.kernel.org Cc: Takashi Iwai Signed-off-by: Ricardo Ribalda Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230116142216.1141605-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 8565c502e7c156d190d8e6d36e443f51b257f165 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 (cherry picked from commit 0fe76b198d482b41771a8d17b45fb726d13083cf) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/skl_universal_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbd24ec17b85b45f4e823d1aa5607721920f2b05 Author: Juhyung Park Date: Tue Jan 17 17:51:54 2023 +0900 usb-storage: apply IGNORE_UAS only for HIKSEMI MD202 on RTL9210 The commit e00b488e813f ("usb-storage: Add Hiksemi USB3-FW to IGNORE_UAS") blacklists UAS for all of RTL9210 enclosures. The RTL9210 controller was advertised with UAS since its release back in 2019 and was shipped with a lot of enclosure products with different firmware combinations. Blacklist UAS only for HIKSEMI MD202. This should hopefully be replaced with more robust method than just comparing strings. But with limited information [1] provided thus far (dmesg when the device is plugged in, which includes manufacturer and product, but no lsusb -v to compare against), this is the best we can do for now. [1] https://lore.kernel.org/all/20230109115550.71688-1-qkrwngud825@gmail.com Fixes: e00b488e813f ("usb-storage: Add Hiksemi USB3-FW to IGNORE_UAS") Cc: Alan Stern Cc: Hongling Zeng Cc: stable@vger.kernel.org Signed-off-by: Juhyung Park Acked-by: Oliver Neukum Link: https://lore.kernel.org/r/20230117085154.123301-1-qkrwngud825@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/uas-detect.h | 13 +++++++++++++ drivers/usb/storage/unusual_uas.h | 7 ------- 2 files changed, 13 insertions(+), 7 deletions(-) commit d18dcfe9860e842f394e37ba01ca9440ab2178f4 Author: Alan Stern Date: Fri Dec 23 09:59:09 2022 -0500 USB: gadgetfs: Fix race between mounting and unmounting The syzbot fuzzer and Gerald Lee have identified a use-after-free bug in the gadgetfs driver, involving processes concurrently mounting and unmounting the gadgetfs filesystem. In particular, gadgetfs_fill_super() can race with gadgetfs_kill_sb(), causing the latter to deallocate the_device while the former is using it. The output from KASAN says, in part: BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:102 [inline] BUG: KASAN: use-after-free in atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:176 [inline] BUG: KASAN: use-after-free in __refcount_sub_and_test include/linux/refcount.h:272 [inline] BUG: KASAN: use-after-free in __refcount_dec_and_test include/linux/refcount.h:315 [inline] BUG: KASAN: use-after-free in refcount_dec_and_test include/linux/refcount.h:333 [inline] BUG: KASAN: use-after-free in put_dev drivers/usb/gadget/legacy/inode.c:159 [inline] BUG: KASAN: use-after-free in gadgetfs_kill_sb+0x33/0x100 drivers/usb/gadget/legacy/inode.c:2086 Write of size 4 at addr ffff8880276d7840 by task syz-executor126/18689 CPU: 0 PID: 18689 Comm: syz-executor126 Not tainted 6.1.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: ... atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:176 [inline] __refcount_sub_and_test include/linux/refcount.h:272 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] put_dev drivers/usb/gadget/legacy/inode.c:159 [inline] gadgetfs_kill_sb+0x33/0x100 drivers/usb/gadget/legacy/inode.c:2086 deactivate_locked_super+0xa7/0xf0 fs/super.c:332 vfs_get_super fs/super.c:1190 [inline] get_tree_single+0xd0/0x160 fs/super.c:1207 vfs_get_tree+0x88/0x270 fs/super.c:1531 vfs_fsconfig_locked fs/fsopen.c:232 [inline] The simplest solution is to ensure that gadgetfs_fill_super() and gadgetfs_kill_sb() are serialized by making them both acquire a new mutex. Signed-off-by: Alan Stern Reported-and-tested-by: syzbot+33d7ad66d65044b93f16@syzkaller.appspotmail.com Reported-and-tested-by: Gerald Lee Link: https://lore.kernel.org/linux-usb/CAO3qeMVzXDP-JU6v1u5Ags6Q-bb35kg3=C6d04DjzA9ffa5x1g@mail.gmail.com/ Fixes: e5d82a7360d1 ("vfs: Convert gadgetfs to use the new mount API") CC: Link: https://lore.kernel.org/r/Y6XCPXBpn3tmjdCC@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/inode.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit 1301c7b9f7efad2f11ef924e317c18ebd714fc9a Author: Pawel Laszczak Date: Tue Nov 15 05:00:39 2022 -0500 usb: cdns3: remove fetched trb from cache before dequeuing After doorbell DMA fetches the TRB. If during dequeuing request driver changes NORMAL TRB to LINK TRB but doesn't delete it from controller cache then controller will handle cached TRB and packet can be lost. The example scenario for this issue looks like: 1. queue request - set doorbell 2. dequeue request 3. send OUT data packet from host 4. Device will accept this packet which is unexpected 5. queue new request - set doorbell 6. Device lost the expected packet. By setting DFLUSH controller clears DRDY bit and stop DMA transfer. Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") cc: Signed-off-by: Pawel Laszczak Acked-by: Peter Chen Link: https://lore.kernel.org/r/20221115100039.441295-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman drivers/usb/cdns3/cdns3-gadget.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 9d6033e350694a67885605674244d43c9559dc36 Author: Guoqing Jiang Date: Fri Dec 30 09:09:26 2022 +0800 block/rnbd-clt: fix wrong max ID in ida_alloc_max We need to pass 'end - 1' to ida_alloc_max after switch from ida_simple_get to ida_alloc_max. Otherwise smatch warns. drivers/block/rnbd/rnbd-clt.c:1460 init_dev() error: Calling ida_alloc_max() with a 'max' argument which is a power of 2. -1 missing? Fixes: 24afc15dbe21 ("block/rnbd: Remove a useless mutex") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Guoqing Jiang Acked-by: Jack Wang Link: https://lore.kernel.org/r/20221230010926.32243-1-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe drivers/block/rnbd/rnbd-clt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcc4348adafe53928fda46d104c1798e5a4de4ff Author: Bard Liao Date: Tue Jan 17 14:35:34 2023 +0200 ASoC: SOF: sof-audio: start with the right widget type If there is a connection between a playback stream and a capture stream, all widgets that are connected to the playback stream and the capture stream will be in the list. So, we have to start with the exactly right widget type. snd_soc_dapm_aif_out is for capture stream and a playback stream should start with a snd_soc_dapm_aif_in widget. Contrarily, snd_soc_dapm_dai_in is for playback stream, and a capture stream should start with a snd_soc_dapm_dai_out widget. Signed-off-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230117123534.2075-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b1f02c6a26bc2cec3d2c4f9b7cc007d69a78aed6 Merge: b7bfaa761d76 84ee211c8321 Author: Greg Kroah-Hartman Date: Tue Jan 17 16:10:15 2023 +0100 Merge tag 'thunderbolt-for-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: "thunderbolt: Fixes for v6.2-rc5 This includes fixes for: - on-board retimer scan return value - runtime PM during tb_retimer_scan() - USB3 link rate calculation - XDomain lane bonding. All these have been in linux-next with no reported issues." * tag 'thunderbolt-for-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Disable XDomain lane 1 only in software connection manager thunderbolt: Use correct function to calculate maximum USB3 link rate thunderbolt: Do not call PM runtime functions in tb_retimer_scan() thunderbolt: Do not report errors if on-board retimers are found commit cbf44580ce6b310272a73e3e794233fd064330bd Author: Jiri Kosina Date: Tue Jan 17 15:41:40 2023 +0100 HID: revert CHERRY_MOUSE_000C quirk This partially reverts commit f6d910a89a2391 ("HID: usbhid: Add ALWAYS_POLL quirk for some mice"), as it turns out to break reboot on some platforms for reason yet to be understood. Fixes: f6d910a89a2391 ("HID: usbhid: Add ALWAYS_POLL quirk for some mice") Reported-by: Christian Zigotzky Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 - drivers/hid/hid-quirks.c | 1 - 2 files changed, 2 deletions(-) commit 175281f80695569c7f9cf062e5d0ddc4addc109f Author: Patrice Chotard Date: Mon Dec 12 09:51:42 2022 +0100 ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp151a-prtt1l Chip select pinctrl phandle was missing in several stm32mp15x based boards. Fixes: ea99a5a02ebc ("ARM: dts: stm32: Create separate pinmux for qspi cs pin in stm32mp15-pinctrl.dtsi") Signed-off-by: Patrice Chotard Cc: Oleksij Rempel Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp151a-prtt1l.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 732dbcf52f74b254a7ddd4226e0b9638e1e7aeff Author: Patrice Chotard Date: Mon Dec 12 09:51:41 2022 +0100 ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp157c-emstamp-argon Chip select pinctrl phandle was missing in several stm32mp15x based boards. Fixes: ea99a5a02ebc ("ARM: dts: stm32: Create separate pinmux for qspi cs pin in stm32mp15-pinctrl.dtsi") Signed-off-by: Patrice Chotard Cc: Reinhold Mueller Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 21d83512bf2bd25ebed467151fd2bcd0cca7dc9a Author: Patrice Chotard Date: Mon Dec 12 09:51:40 2022 +0100 ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp15xx-dhcom-som Chip select pinctrl phandle was missing in several stm32mp15x based boards. Fixes: ea99a5a02ebc ("ARM: dts: stm32: Create separate pinmux for qspi cs pin in stm32mp15-pinctrl.dtsi") Signed-off-by: Patrice Chotard Cc: Marek Vasut Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Marek Vasut Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 7ffd2266bd32d9f31a4e918443c733906cff0d19 Author: Patrice Chotard Date: Mon Dec 12 09:51:39 2022 +0100 ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp15xx-dhcor-som Chip select pinctrl phandle was missing in several stm32mp15x based boards. Fixes: ea99a5a02ebc ("ARM: dts: stm32: Create separate pinmux for qspi cs pin in stm32mp15-pinctrl.dtsi") Signed-off-by: Patrice Chotard Cc: Marek Vasut Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Marek Vasut Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 431d1531466033909d2e8c754a7dc3704b70843f Author: Jonas Karlman Date: Tue Jan 10 08:46:53 2023 +0000 pinctrl: rockchip: fix mux route data for rk3568 IO mux selection is configured in PMU_GRF_SOC_CON4 and GRF_IOFUNC_SEL0-5 regs on RK3568. pwm0-2 is configured in PMU_GRF reg and the rest is configured in GRF_IOFUNC regs according to TRM [1]. Update mux route data to reflect this and use proper detection pin for UART1 IO mux M1. This fixes HDMITX IO mux M1 selection and makes it possible to enable HDMI CEC on my Radxa ROCK 3 Model A v1.31 board. [1] http://opensource.rock-chips.com/images/2/26/Rockchip_RK3568_TRM_Part1_V1.3-20220930P.PDF Fixes: c0dadc0e47a8 ("pinctrl: rockchip: add support for rk3568") Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20230110084636.1141740-1-jonas@kwiboo.se Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 1f3bd64ad921f051254591fbed04fd30b306cde6 Author: Heiner Kallweit Date: Sun Jan 15 18:24:08 2023 +0100 net: stmmac: fix invalid call to mdiobus_get_phy() In a number of cases the driver assigns a default value of -1 to priv->plat->phy_addr. This may result in calling mdiobus_get_phy() with addr parameter being -1. Therefore check for this scenario and bail out before calling mdiobus_get_phy(). Fixes: 42e87024f727 ("net: stmmac: Fix case when PHY handle is not present") Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/669f9671-ecd1-a41b-2727-7b73e3003985@gmail.com Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8ba5fc4c154aeb3b4620f05543cce426c62ed2de Author: Hans de Goede Date: Fri Jan 13 12:41:26 2023 +0100 ACPI: video: Add backlight=native DMI quirk for Acer Aspire 4810T The Acer Aspire 4810T 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 drivers/acpi/video_detect.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 81aae5cbd36da836eb65025c798d15e5e28a019b Author: Rafael J. Wysocki Date: Thu Jan 12 20:53:39 2023 +0100 MAINTAINERS: Update the ACPICA development list address The previous ACPICA development list address, devel@acpica.org, started to bounce some time ago and it is not likely to be restored, so replace it with a new one, acpica-devel@lists.linuxfoundation.org. Signed-off-by: Rafael J. Wysocki MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7bf714f875531f227f2ef1fdcc8f4d44e7c7d9d Author: Pietro Borrello Date: Mon Jan 16 11:11:25 2023 +0000 HID: check empty report_list in bigben_probe() Add a check for empty report_list in bigben_probe(). The missing check causes a type confusion when issuing a list_entry() on an empty report_list. The problem is caused by the assumption that the device must have valid report_list. While this will be true for all normal HID devices, a suitably malicious device can violate the assumption. Fixes: 256a90ed9e46 ("HID: hid-bigbenff: driver for BigBen Interactive PS3OFMINIPAD gamepad") Signed-off-by: Pietro Borrello Signed-off-by: Jiri Kosina drivers/hid/hid-bigbenff.c | 5 +++++ 1 file changed, 5 insertions(+) commit b12fece4c64857e5fab4290bf01b2e0317a88456 Author: Pietro Borrello Date: Mon Jan 16 11:11:24 2023 +0000 HID: check empty report_list in hid_validate_values() Add a check for empty report_list in hid_validate_values(). The missing check causes a type confusion when issuing a list_entry() on an empty report_list. The problem is caused by the assumption that the device must have valid report_list. While this will be true for all normal HID devices, a suitably malicious device can violate the assumption. Fixes: 1b15d2e5b807 ("HID: core: fix validation of report id 0") Signed-off-by: Pietro Borrello Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 867dbe784c5010a466f00a7d1467c1c5ea569c75 Author: Heiner Kallweit Date: Sun Jan 15 11:54:06 2023 +0100 net: mdio: validate parameter addr in mdiobus_get_phy() The caller may pass any value as addr, what may result in an out-of-bounds access to array mdio_map. One existing case is stmmac_init_phy() that may pass -1 as addr. Therefore validate addr before using it. Fixes: 7f854420fbfe ("phy: Add API for {un}registering an mdio device to a bus.") Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/cdf664ea-3312-e915-73f8-021678d08887@gmail.com Signed-off-by: Paolo Abeni drivers/net/phy/mdio_bus.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ecf7cf8efb59789e2b21d2f9ab926142579092b2 Author: Szymon Heidrich Date: Sat Jan 14 19:23:26 2023 +0100 net: usb: sr9700: Handle negative len Packet len computed as difference of length word extracted from skb data and four may result in a negative value. In such case processing of the buffer should be interrupted rather than setting sr_skb->len to an unexpectedly large value (due to cast from signed to unsigned integer) and passing sr_skb to usbnet_skb_return. Fixes: e9da0b56fe27 ("sr9700: sanity check for packet length") Signed-off-by: Szymon Heidrich Link: https://lore.kernel.org/r/20230114182326.30479-1-szymon.heidrich@gmail.com Signed-off-by: Paolo Abeni drivers/net/usb/sr9700.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc74a9e8a8c57966a563ab078ba91c8b2c0d0a72 Author: Jinyang He Date: Tue Jan 17 11:42:16 2023 +0800 LoongArch: Add generic ex-handler unwind in prologue unwinder When exception is triggered, code flow go handle_\exception in some cases. One of stackframe in this case as follows, high -> +-------+ | REGS | <- a pt_regs | | | | <- ex trigger | REGS | <- ex pt_regs <-+ | | | | | | low -> +-------+ ->unwind-+ When unwinder unwinds to handler_\exception it cannot go on prologue analysis. Because it is an asynchronous code flow, we should get the next frame PC from regs->csr_era rather than regs->regs[1]. At init time we copy the handlers to eentry and also copy them to NUMA-affine memory named pcpu_handlers if NUMA is enabled. Thus, unwinder cannot unwind normally. To solve this, we try to give some hints in handler_\exception and fixup unwinders in unwind_next_frame(). Reported-by: Qing Zhang Signed-off-by: Jinyang He Signed-off-by: Huacai Chen arch/loongarch/include/asm/unwind.h | 2 +- arch/loongarch/kernel/genex.S | 3 + arch/loongarch/kernel/unwind_prologue.c | 101 ++++++++++++++++++++++++++++---- arch/loongarch/mm/tlb.c | 2 +- 4 files changed, 93 insertions(+), 15 deletions(-) commit c5ac25e0d78a6f63446b8fef4d8630ccd7a2663d Author: Jinyang He Date: Tue Jan 17 11:42:16 2023 +0800 LoongArch: Strip guess unwinder out from prologue unwinder The prolugue unwinder rely on symbol info. When PC is not in kernel text address, it cannot find relative symbol info and it will be broken. The guess unwinder will be used in this case. And the guess unwinder code in prolugue unwinder is redundant. Strip it out and set the unwinder type in unwind_state. Make guess_unwinder::unwind_next_frame() as default way when other unwinders cannot unwind in some extreme case. Signed-off-by: Jinyang He Signed-off-by: Huacai Chen arch/loongarch/include/asm/unwind.h | 29 ++++++ arch/loongarch/kernel/Makefile | 2 +- arch/loongarch/kernel/traps.c | 3 - arch/loongarch/kernel/unwind.c | 32 +++++++ arch/loongarch/kernel/unwind_guess.c | 52 +---------- arch/loongarch/kernel/unwind_prologue.c | 157 +++++++++++++------------------- 6 files changed, 129 insertions(+), 146 deletions(-) commit 5bb8d34449c4a2eb94d657b992170afafac274f9 Author: Jinyang He Date: Tue Jan 17 11:42:16 2023 +0800 LoongArch: Use correct sp value to get graph addr in stack unwinders The stack frame when function_graph enable like follows, --------- <- function sp_on_entry | | | FAKE_RA <- sp_on_entry - sizeof(pt_regs) + PT_R1 | --------- <- sp_on_entry - sizeof(pt_regs) So if we want to get the &FAKE_RA we should get sp_on_entry first. In the unwinder_prologue case, we can get the sp_on_entry as state->sp, because we try to calculate each CFA and the ra saved address. But in the unwinder_guess case, we cannot get it because we do not try to calculate the CFA. Although LoongArch have not fixed frame, the $ra is saved at CFA - 8 in most cases, we can try guess, too. As we store the pc in state, we not need to dereference state->sp, too. Signed-off-by: Jinyang He Signed-off-by: Huacai Chen arch/loongarch/include/asm/ftrace.h | 2 -- arch/loongarch/include/asm/unwind.h | 10 ++++++++++ arch/loongarch/kernel/unwind_guess.c | 11 ++++------- arch/loongarch/kernel/unwind_prologue.c | 21 ++++++--------------- 4 files changed, 20 insertions(+), 24 deletions(-) commit 429a9671f235c94fc4b5d6687308714b74adc820 Author: Jinyang He Date: Tue Jan 17 11:42:16 2023 +0800 LoongArch: Get frame info in unwind_start() when regs is not available At unwind_start(), it is better to get its frame info here rather than get them outside, even we don't have 'regs'. In this way we can simply use unwind_{start, next_frame, done} outside. Signed-off-by: Jinyang He Signed-off-by: Huacai Chen arch/loongarch/kernel/process.c | 12 +++--------- arch/loongarch/kernel/unwind_guess.c | 6 ++++++ arch/loongarch/kernel/unwind_prologue.c | 16 +++++++++++++--- 3 files changed, 22 insertions(+), 12 deletions(-) commit e2f27392275c7ffceb4afac1567eb325722b9ae1 Author: Jinyang He Date: Tue Jan 17 11:42:16 2023 +0800 LoongArch: Adjust PC value when unwind next frame in unwinder When state->first is not set, the PC is a return address in the previous frame. We need to adjust its value in case overflow to the next symbol. Signed-off-by: Jinyang He Signed-off-by: Huacai Chen arch/loongarch/kernel/unwind_prologue.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3200983fa8e2c8aa17ed911b617b4a248bcb1267 Author: Youling Tang Date: Tue Jan 17 11:42:16 2023 +0800 LoongArch: Simplify larch_insn_gen_xxx implementation Simplify larch_insn_gen_xxx implementation by reusing emit_xxx. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen arch/loongarch/include/asm/inst.h | 1 + arch/loongarch/kernel/inst.c | 45 ++++++--------------------------------- 2 files changed, 8 insertions(+), 38 deletions(-) commit 2959fce7fdb73fc784aefd58cc34b1ba700826aa Author: Tiezhu Yang Date: Tue Jan 17 11:42:16 2023 +0800 LoongArch: Use common function sign_extend64() There exists a common function sign_extend64() to sign extend a 64-bit value using specified bit as sign-bit in include/linux/bitops.h, it is more efficient, let us use it and remove the arch-specific sign_extend() under arch/loongarch. Suggested-by: Jinyang He Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen arch/loongarch/include/asm/inst.h | 8 -------- arch/loongarch/kernel/alternative.c | 6 +++--- 2 files changed, 3 insertions(+), 11 deletions(-) commit d52fec86a465355b379e839fa372ead0334d62e6 Author: Huacai Chen Date: Tue Jan 17 11:42:16 2023 +0800 LoongArch: Add HWCAP_LOONGARCH_CPUCFG to elf_hwcap HWCAP_LOONGARCH_CPUCFG is missing in elf_hwcap, so add it for glibc's later use. Cc: stable@vger.kernel.org Reported-by: Yinyu Cai Signed-off-by: Huacai Chen arch/loongarch/kernel/cpu-probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3ff8887e7db757360f97634e0d6f4b8e27a8c46 Author: Yu Kuai Date: Tue Jan 3 19:28:33 2023 +0800 blk-cgroup: fix missing pd_online_fn() while activating policy If the policy defines pd_online_fn(), it should be called after pd_init_fn(), like blkg_create(). Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230103112833.2013432-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/blk-cgroup.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6e50979a9c87371fdb85d16058f9b5cb40751501 Merge: d532dd102151 19fa92fb72f8 Author: Linus Torvalds Date: Mon Jan 16 16:36:39 2023 -0800 Merge tag 'mm-hotfixes-stable-2023-01-16-15-23' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc hotfixes from Andrew Morton: "21 hotfixes. Thirteen of these address pre-6.1 issues and hence have the cc:stable tag" * tag 'mm-hotfixes-stable-2023-01-16-15-23' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (21 commits) init/Kconfig: fix typo (usafe -> unsafe) nommu: fix split_vma() map_count error nommu: fix do_munmap() error path nommu: fix memory leak in do_mmap() error path MAINTAINERS: update Robert Foss' email address proc: fix PIE proc-empty-vm, proc-pid-vm tests mm: update mmap_sem comments to refer to mmap_lock include/linux/mm: fix release_pages_arg kernel doc comment lib/win_minmax: use /* notation for regular comments kasan: mark kasan_kunit_executing as static nilfs2: fix general protection fault in nilfs_btree_insert() Docs/admin-guide/mm/zswap: remove zsmalloc's lack of writeback warning mm/hugetlb: pre-allocate pgtable pages for uffd wr-protects hugetlb: unshare some PMDs when splitting VMAs mm: fix vma->anon_name memory leak for anonymous shmem VMAs mm/shmem: restore SHMEM_HUGE_DENY precedence over MADV_COLLAPSE mm/MADV_COLLAPSE: don't expand collapse when vm_end is past requested end mm/userfaultfd: enable writenotify while userfaultfd-wp is enabled for a VMA mm/khugepaged: fix collapse_pte_mapped_thp() to allow anon_vma mm/hugetlb: fix uffd-wp handling for migration entries in hugetlb_change_protection() ... commit 31e1be62abdebc28bd51d0999a25f0eea535b5af Author: Eric Biggers Date: Mon Jan 16 15:34:24 2023 -0800 MAINTAINERS: update fscrypt git repo fscrypt.git is being renamed to linux.git, so update MAINTAINERS accordingly. (The reasons for the rename are to match what I'm doing for the new fsverity repo, which also involves the branch names changing to be clearer; and to avoid ambiguity with userspace tools.) As long as I'm updating the fscrypt MAINTAINERS entry anyway, also: - Move my name to the top, so that people bother me first if they just choose the first person. (In practice I'm the primary maintainer, and Ted and Jaegeuk are backups.) - Remove an unnecessary wildcard. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230116233424.65657-1-ebiggers@kernel.org MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ef7592e466ef7b2595fdfdfd23559a779f4b211a Author: Eric Biggers Date: Mon Jan 16 15:22:57 2023 -0800 MAINTAINERS: update fsverity git repo, list, and patchwork We're moving fsverity development to use its own git repo, mailing list, and patchwork project, instead of reusing the fscrypt ones. Update the MAINTAINERS file accordingly. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230116232257.64377-1-ebiggers@kernel.org MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6c796996ee7033bcbbc3cd733513eb43f8160f5e Author: Thomas Gleixner Date: Mon Jan 16 19:11:32 2023 +0100 x86/pci/xen: Fixup fallout from the PCI/MSI overhaul David reported that the recent PCI/MSI rework results in MSI descriptor leakage under XEN. This is caused by: 1) The missing MSI_FLAG_FREE_MSI_DESCS flag in the XEN MSI domain info, which is required now that PCI/MSI delegates descriptor freeing to the core MSI code. 2) Not disassociating the interrupts on teardown, by setting the msi_desc::irq to 0. This was not required before because the teardown was unconditional and did not check whether a MSI descriptor was still connected to a Linux interrupt. On further inspection it came to light that the MSI_FLAG_DEV_SYSFS is missing in the XEN MSI domain info as well to restore the pre 6.2 status quo. Add the missing MSI flags and disassociate the MSI descriptor from the Linux interrupt in the XEN specific teardown function. Fixes: b2bdda205c0c ("PCI/MSI: Let the MSI core free descriptors") Fixes: 2f2940d16823 ("genirq/msi: Remove filter from msi_free_descs_free_range()") Fixes: ffd84485e6be ("PCI/MSI: Let the irq code handle sysfs groups") Reported-by: David Woodhouse Signed-off-by: Thomas Gleixner Tested-by: David Woodhouse Link: https://lore.kernel.org/r/871qnunycr.ffs@tglx arch/x86/pci/xen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0a3a58de319552525507a3497da86df039a5e4e0 Author: David Woodhouse Date: Sun Jan 15 22:14:19 2023 +0000 x86/pci/xen: Set MSI_FLAG_PCI_MSIX support in Xen MSI domain The Xen MSI → PIRQ magic does support MSI-X, so advertise it. (In fact it's better off with MSI-X than MSI, because it's actually broken by design for 32-bit MSI, since it puts the high bits of the PIRQ# into the high 32 bits of the MSI message address, instead of the Extended Destination ID field which is in bits 4-11. Strictly speaking, this really fixes a much older commit 2e4386eba0c0 ("x86/xen: Wrap XEN MSI management into irqdomain") which failed to set the flag. But that never really mattered until __pci_enable_msix_range() started to check and bail out early. So in 6.2-rc we see failures e.g. to bring up networking on an Amazon EC2 m4.16xlarge instance: [ 41.498694] ena 0000:00:03.0 (unnamed net_device) (uninitialized): Failed to enable MSI-X. irq_cnt -524 [ 41.498705] ena 0000:00:03.0: Can not reserve msix vectors [ 41.498712] ena 0000:00:03.0: Failed to enable and set the admin interrupts Side note: This is the first bug found, and first patch tested, by running Xen guests under QEMU/KVM instead of running under actual Xen. Fixes: 99f3d2797657 ("PCI/MSI: Reject MSI-X early") Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/4bffa69a949bfdc92c4a18e5a1c3cbb3b94a0d32.camel@infradead.org arch/x86/pci/xen.c | 1 + 1 file changed, 1 insertion(+) commit b7adbf9ada3513d2092362c8eac5cddc5b651f5c Author: Filipe Manana Date: Thu Jan 12 16:31:08 2023 +0000 btrfs: fix race between quota rescan and disable leading to NULL pointer deref If we have one task trying to start the quota rescan worker while another one is trying to disable quotas, we can end up hitting a race that results in the quota rescan worker doing a NULL pointer dereference. The steps for this are the following: 1) Quotas are enabled; 2) Task A calls the quota rescan ioctl and enters btrfs_qgroup_rescan(). It calls qgroup_rescan_init() which returns 0 (success) and then joins a transaction and commits it; 3) Task B calls the quota disable ioctl and enters btrfs_quota_disable(). It clears the bit BTRFS_FS_QUOTA_ENABLED from fs_info->flags and calls btrfs_qgroup_wait_for_completion(), which returns immediately since the rescan worker is not yet running. Then it starts a transaction and locks fs_info->qgroup_ioctl_lock; 4) Task A queues the rescan worker, by calling btrfs_queue_work(); 5) The rescan worker starts, and calls rescan_should_stop() at the start of its while loop, which results in 0 iterations of the loop, since the flag BTRFS_FS_QUOTA_ENABLED was cleared from fs_info->flags by task B at step 3); 6) Task B sets fs_info->quota_root to NULL; 7) The rescan worker tries to start a transaction and uses fs_info->quota_root as the root argument for btrfs_start_transaction(). This results in a NULL pointer dereference down the call chain of btrfs_start_transaction(). The stack trace is something like the one reported in Link tag below: general protection fault, probably for non-canonical address 0xdffffc0000000041: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000208-0x000000000000020f] CPU: 1 PID: 34 Comm: kworker/u4:2 Not tainted 6.1.0-syzkaller-13872-gb6bb9676f216 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: btrfs-qgroup-rescan btrfs_work_helper RIP: 0010:start_transaction+0x48/0x10f0 fs/btrfs/transaction.c:564 Code: 48 89 fb 48 (...) RSP: 0018:ffffc90000ab7ab0 EFLAGS: 00010206 RAX: 0000000000000041 RBX: 0000000000000208 RCX: ffff88801779ba80 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: dffffc0000000000 R08: 0000000000000001 R09: fffff52000156f5d R10: fffff52000156f5d R11: 1ffff92000156f5c R12: 0000000000000000 R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000003 FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2bea75b718 CR3: 000000001d0cc000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_qgroup_rescan_worker+0x3bb/0x6a0 fs/btrfs/qgroup.c:3402 btrfs_work_helper+0x312/0x850 fs/btrfs/async-thread.c:280 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:308 Modules linked in: So fix this by having the rescan worker function not attempt to start a transaction if it didn't do any rescan work. Reported-by: syzbot+96977faa68092ad382c4@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/000000000000e5454b05f065a803@google.com/ Fixes: e804861bd4e6 ("btrfs: fix deadlock between quota disable and qgroup rescan worker") CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/qgroup.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 1f55ee6d0901d915801618bda0af4e5b937e3db7 Author: Filipe Manana Date: Thu Jan 12 14:17:20 2023 +0000 btrfs: fix invalid leaf access due to inline extent during lseek During lseek, for SEEK_DATA and SEEK_HOLE modes, we access the disk_bytenr of an extent without checking its type. However inline extents have their data starting the offset of the disk_bytenr field, so accessing that field when we have an inline extent can result in either of the following: 1) Interpret the inline extent's data as a disk_bytenr value; 2) In case the inline data is less than 8 bytes, we access part of some other item in the leaf, or unused space in the leaf; 3) In case the inline data is less than 8 bytes and the extent item is the first item in the leaf, we can access beyond the leaf's limit. So fix this by not accessing the disk_bytenr field if we have an inline extent. Fixes: b6e833567ea1 ("btrfs: make hole and data seeking a lot more efficient") Reported-by: Matthias Schoepfer Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216908 Link: https://lore.kernel.org/linux-btrfs/7f25442f-b121-2a3a-5a3d-22bcaae83cd4@leemhuis.info/ CC: stable@vger.kernel.org # 6.1 Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 26ecf243e407be54807ad67210f7e83b9fad71ea Author: Christoph Hellwig Date: Mon Nov 21 18:47:49 2022 +0100 btrfs: stop using write_one_page in btrfs_scratch_superblock write_one_page is an awkward interface that expects the page locked and ->writepage to be implemented. Replace that by zeroing the signature bytes and synchronize the block device page using the proper bdev helpers. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba fs/btrfs/volumes.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 0e0078f72be81bbb2a02b229fd2cec8ad63e4fb1 Author: Christoph Hellwig Date: Mon Nov 21 18:47:48 2022 +0100 btrfs: factor out scratching of one regular super block btrfs_scratch_superblocks open codes scratching super block of a non-zoned super block. Split the code to read, zero and write the superblock for regular devices into a separate helper. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba fs/btrfs/volumes.c | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) commit d532dd102151cc69fcd00b13e5a9689b23c0c8d9 Merge: 5dc4c995db9e 09e44868f1e0 Author: Linus Torvalds Date: Mon Jan 16 10:03:33 2023 -0800 Merge tag 'for-6.2-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Another batch of fixes, dealing with fallouts from 6.1 reported by users: - tree-log fixes: - fix directory logging due to race with concurrent index key deletion - fix missing error handling when logging directory items - handle case of conflicting inodes being added to the log - remove transaction aborts for not so serious errors - fix qgroup accounting warning when rescan can be started at time with temporarily disable accounting - print more specific errors to system log when device scan ioctl fails - disable space overcommit for ZNS devices, causing heavy performance drop" * tag 'for-6.2-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: do not abort transaction on failure to update log root btrfs: do not abort transaction on failure to write log tree when syncing log btrfs: add missing setup of log for full commit at add_conflicting_inode() btrfs: fix directory logging due to race with concurrent index key deletion btrfs: fix missing error handling when logging directory items btrfs: zoned: enable metadata over-commit for non-ZNS setup btrfs: qgroup: do not warn on record without old_roots populated btrfs: add extra error messages to cover non-ENOMEM errors from device_add_list() commit 5fa55950729d0762a787451dc52862c3f850f859 Author: Thomas Gleixner Date: Mon Jan 9 22:57:13 2023 +0100 x86/i8259: Mark legacy PIC interrupts with IRQ_LEVEL Baoquan reported that after triggering a crash the subsequent crash-kernel fails to boot about half of the time. It triggers a NULL pointer dereference in the periodic tick code. This happens because the legacy timer interrupt (IRQ0) is resent in software which happens in soft interrupt (tasklet) context. In this context get_irq_regs() returns NULL which leads to the NULL pointer dereference. The reason for the resend is a spurious APIC interrupt on the IRQ0 vector which is captured and leads to a resend when the legacy timer interrupt is enabled. This is wrong because the legacy PIC interrupts are level triggered and therefore should never be resent in software, but nothing ever sets the IRQ_LEVEL flag on those interrupts, so the core code does not know about their trigger type. Ensure that IRQ_LEVEL is set when the legacy PCI interrupts are set up. Fixes: a4633adcdbc1 ("[PATCH] genirq: add genirq sw IRQ-retrigger") Reported-by: Baoquan He Signed-off-by: Thomas Gleixner Tested-by: Baoquan He Link: https://lore.kernel.org/r/87mt6rjrra.ffs@tglx arch/x86/kernel/i8259.c | 1 + arch/x86/kernel/irqinit.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 0f097f08c9b3c1fdb6cc9f2dd423abc17d13f1a2 Author: Yishai Hadas Date: Wed Jan 11 12:10:54 2023 +0200 lib/scatterlist: Fix to calculate the last_pg properly The last_pg is wrong, it is actually the first page of the last scatterlist element. To get the last page of the last scatterlist element we have to add prv->length. So it is checking mergability against the wrong page, Further, a SG element is not guaranteed to end on a page boundary, so we have to check the sub page location also for merge eligibility. Fix the above by checking physical contiguity based on PFNs, compute the actual last page and then call pages_are_mergable(). Fixes: 1567b49d1a40 ("lib/scatterlist: add check when merging zone device pages") Link: https://lore.kernel.org/r/20230111101054.188136-1-yishaih@nvidia.com Reported-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Reviewed-by: Chaitanya Kulkarni Signed-off-by: Jason Gunthorpe lib/scatterlist.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 4fe59a130c112460626a6a8b9232aa580d9b8efc Author: Anuradha Weeraman Date: Mon Jan 16 18:26:34 2023 +0530 kernel/printk/printk.c: Fix W=1 kernel-doc warning Fix W=1 kernel-doc warning: kernel/printk/printk.c: - Include function parameter in console_lock_spinning_disable_and_check() Signed-off-by: Anuradha Weeraman Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230116125635.374567-1-anuradha@debian.org kernel/printk/printk.c | 1 + 1 file changed, 1 insertion(+) commit 3e9900f3bd7ba30d60f82b162b70a1dffe4e8e24 Author: Jens Axboe Date: Mon Jan 16 08:51:05 2023 -0700 pktcdvd: check for NULL returna fter calling bio_split_to_limits() The revert of the removal of this driver happened after we fixed up the split limits for NOWAIT issue, hence it got missed. Ensure that we check for a NULL bio after splitting, in case it should be retried. Marking this as fixing both commits, so that stable backport will do this correctly. Cc: stable@vger.kernel.org Fixes: 9cea62b2cbab ("block: don't allow splitting of a REQ_NOWAIT bio") Fixes: 4b83e99ee709 ("Revert "pktcdvd: remove driver."") Signed-off-by: Jens Axboe drivers/block/pktcdvd.c | 2 ++ 1 file changed, 2 insertions(+) commit 3ef5abd9b5c738bc6fa9a65e40331ef2cb03ad9c Author: John Ogness Date: Thu Jan 12 17:18:13 2023 +0106 tty: serial: kgdboc: fix mutex locking order for configure_kgdboc() Several mutexes are taken while setting up console serial ports. In particular, the tty_port->mutex and @console_mutex are taken: serial_pnp_probe serial8250_register_8250_port uart_add_one_port (locks tty_port->mutex) uart_configure_port register_console (locks @console_mutex) In order to synchronize kgdb's tty_find_polling_driver() with register_console(), commit 6193bc90849a ("tty: serial: kgdboc: synchronize tty_find_polling_driver() and register_console()") takes the @console_mutex. However, this leads to the following call chain (with locking): platform_probe kgdboc_probe configure_kgdboc (locks @console_mutex) tty_find_polling_driver uart_poll_init (locks tty_port->mutex) uart_set_options This is clearly deadlock potential due to the reverse lock ordering. Since uart_set_options() requires holding @console_mutex in order to serialize early initialization of the serial-console lock, take the @console_mutex in uart_poll_init() instead of configure_kgdboc(). Since configure_kgdboc() was using @console_mutex for safe traversal of the console list, change it to use the SRCU iterator instead. Add comments to uart_set_options() kerneldoc mentioning that it requires holding @console_mutex (aka the console_list_lock). Fixes: 6193bc90849a ("tty: serial: kgdboc: synchronize tty_find_polling_driver() and register_console()") Signed-off-by: John Ogness Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek [pmladek@suse.com: Export console_srcu_read_lock_is_held() to fix build kgdboc as a module.] Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230112161213.1434854-1-john.ogness@linutronix.de drivers/tty/serial/kgdboc.c | 20 +++++--------------- drivers/tty/serial/serial_core.c | 5 +++++ kernel/printk/printk.c | 1 + 3 files changed, 11 insertions(+), 15 deletions(-) commit 80f8a66dede0a4b4e9e846765a97809c6fe49ce5 Author: Eric Dumazet Date: Fri Jan 13 12:43:26 2023 +0000 Revert "wifi: mac80211: fix memory leak in ieee80211_if_add()" This reverts commit 13e5afd3d773c6fc6ca2b89027befaaaa1ea7293. ieee80211_if_free() is already called from free_netdev(ndev) because ndev->priv_destructor == ieee80211_if_free syzbot reported: general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027] CPU: 0 PID: 10041 Comm: syz-executor.0 Not tainted 6.2.0-rc2-syzkaller-00388-g55b98837e37d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:pcpu_get_page_chunk mm/percpu.c:262 [inline] RIP: 0010:pcpu_chunk_addr_search mm/percpu.c:1619 [inline] RIP: 0010:free_percpu mm/percpu.c:2271 [inline] RIP: 0010:free_percpu+0x186/0x10f0 mm/percpu.c:2254 Code: 80 3c 02 00 0f 85 f5 0e 00 00 48 8b 3b 48 01 ef e8 cf b3 0b 00 48 ba 00 00 00 00 00 fc ff df 48 8d 78 20 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85 3b 0e 00 00 48 8b 58 20 48 b8 00 00 00 00 00 fc RSP: 0018:ffffc90004ba7068 EFLAGS: 00010002 RAX: 0000000000000000 RBX: ffff88823ffe2b80 RCX: 0000000000000004 RDX: dffffc0000000000 RSI: ffffffff81c1f4e7 RDI: 0000000000000020 RBP: ffffe8fffe8fc220 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 1ffffffff2179ab2 R12: ffff8880b983d000 R13: 0000000000000003 R14: 0000607f450fc220 R15: ffff88823ffe2988 FS: 00007fcb349de700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b32220000 CR3: 000000004914f000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: netdev_run_todo+0x6bf/0x1100 net/core/dev.c:10352 ieee80211_register_hw+0x2663/0x4040 net/mac80211/main.c:1411 mac80211_hwsim_new_radio+0x2537/0x4d80 drivers/net/wireless/mac80211_hwsim.c:4583 hwsim_new_radio_nl+0xa09/0x10f0 drivers/net/wireless/mac80211_hwsim.c:5176 genl_family_rcv_msg_doit.isra.0+0x1e6/0x2d0 net/netlink/genetlink.c:968 genl_family_rcv_msg net/netlink/genetlink.c:1048 [inline] genl_rcv_msg+0x4ff/0x7e0 net/netlink/genetlink.c:1065 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2564 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1076 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1932 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 ____sys_sendmsg+0x712/0x8c0 net/socket.c:2476 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2530 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2559 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 Fixes: 13e5afd3d773 ("wifi: mac80211: fix memory leak in ieee80211_if_add()") Signed-off-by: Eric Dumazet Cc: Zhengchao Shao Cc: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230113124326.3533978-1-edumazet@google.com net/mac80211/iface.c | 1 - 1 file changed, 1 deletion(-) commit 953519b35227d5dbbb5c5724f1f539735fbf7781 Author: Felix Fietkau Date: Fri Jan 13 11:58:48 2023 +0100 wifi: mt76: dma: fix a regression in adding rx buffers When adding WED support, mt76_dma_add_buf was accidentally changed to set the skip_buf0 flag for tx buffers on the wrong queue descriptor entry. Additionally, there is a rxwi leak when rx buffer allocation fails. Fix this and make the code more readable by adding a separate function for adding rx buffers. Reported-by: Mikhail Gavrilov Tested-by: Mikhail Gavrilov Link: https://lore.kernel.org/r/CABXGCsMEnQd=gYKTd1knRsWuxCb=Etv5nAre%2BXJS_s5FgVteYA@mail.gmail.com/ Reported-by: Mike Lothian Link: https://bugzilla.kernel.org/show_bug.cgi?id=216829 Reported-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/lkml/20230112171706.294550-1-angelogioacchino.delregno@collabora.com/ Fixes: cd372b8c99c5 ("wifi: mt76: add WED RX support to mt76_dma_{add,get}_buf") Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230113105848.34642-3-nbd@nbd.name drivers/net/wireless/mediatek/mt76/dma.c | 124 ++++++++++++++++++------------- 1 file changed, 72 insertions(+), 52 deletions(-) commit e5c3ac895750b39ef53b84ff4814617ecd69d556 Author: Lorenzo Bianconi Date: Fri Jan 13 11:58:47 2023 +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 (cherry picked from commit 96f134dc19645be4994e89a2f68fa89309becbee) Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230113105848.34642-2-nbd@nbd.name drivers/net/wireless/mediatek/mt76/dma.c | 10 +++++++++- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 7 +++++++ drivers/net/wireless/mediatek/mt76/tx.c | 7 ++++--- 3 files changed, 20 insertions(+), 4 deletions(-) commit 1132d1c834d6185c89aef07c860fc143a6f2db93 Author: Lorenzo Bianconi Date: Fri Jan 13 11:58:46 2023 +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 (cherry picked from commit fe13dad8992be0b26c1be390bcd111acf9892c17) Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230113105848.34642-1-nbd@nbd.name drivers/net/wireless/mediatek/mt76/dma.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit e02ac3e7329f76c5de40cba2746cbe165f571dff Author: Jingbo Xu Date: Thu Jan 12 14:54:31 2023 +0800 erofs: clean up parsing of fscache related options ... to avoid the mess of conditional preprocessing as we are continually adding fscache related mount options. Reviewd-by: Gao Xiang Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Jingbo Xu Link: https://lore.kernel.org/r/20230112065431.124926-3-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang fs/erofs/super.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit b22c7b97189d461d7143052da83b36390c623b54 Author: Jingbo Xu Date: Thu Jan 12 14:54:30 2023 +0800 erofs: add documentation for 'domain_id' mount option Since the EROFS share domain feature for fscache mode has been available since Linux v6.1, let's add documentation for 'domain_id' mount option. Cc: linux-doc@vger.kernel.org Reviewed-by: Jia Zhu Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230112065431.124926-2-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang Documentation/filesystems/erofs.rst | 2 ++ 1 file changed, 2 insertions(+) commit 7ea55715c421d22c1b63f7129cae6a654091b695 Author: Ard Biesheuvel Date: Fri Dec 9 12:10:13 2022 +0100 arm64: efi: Account for the EFI runtime stack in stack unwinder The EFI runtime services run from a dedicated stack now, and so the stack unwinder needs to be informed about this. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel arch/arm64/include/asm/stacktrace.h | 15 +++++++++++++++ arch/arm64/kernel/stacktrace.c | 12 ++++++++++++ 2 files changed, 27 insertions(+) commit 8a9a1a18731eb123e35f48176380a18b9782845e Author: Ard Biesheuvel Date: Fri Oct 28 16:39:14 2022 +0200 arm64: efi: Avoid workqueue to check whether EFI runtime is live Comparing current_work() against efi_rts_work.work is sufficient to decide whether current is currently running EFI runtime services code at any level in its call stack. However, there are other potential users of the EFI runtime stack, such as the ACPI subsystem, which may invoke efi_call_virt_pointer() directly, and so any sync exceptions occurring in firmware during those calls are currently misidentified. So instead, let's check whether the stashed value of the thread stack pointer points into current's thread stack. This can only be the case if current was interrupted while running EFI runtime code. Note that this implies that we should clear the stashed value after switching back, to avoid false positives. Reviewed-by: Mark Rutland Signed-off-by: Ard Biesheuvel arch/arm64/include/asm/efi.h | 9 +++++++++ arch/arm64/kernel/efi-rt-wrapper.S | 6 ++++++ arch/arm64/kernel/efi.c | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) commit 87b93b678e95c7d93fe6a55b0e0fbda26d8c7760 Author: Geetha sowjanya Date: Fri Jan 13 11:49:02 2023 +0530 octeontx2-pf: Avoid use of GFP_KERNEL in atomic context Using GFP_KERNEL in preemption disable context, causing below warning when CONFIG_DEBUG_ATOMIC_SLEEP is enabled. [ 32.542271] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274 [ 32.550883] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0 [ 32.558707] preempt_count: 1, expected: 0 [ 32.562710] RCU nest depth: 0, expected: 0 [ 32.566800] CPU: 3 PID: 1 Comm: swapper/0 Tainted: G W 6.2.0-rc2-00269-gae9dcb91c606 #7 [ 32.576188] Hardware name: Marvell CN106XX board (DT) [ 32.581232] Call trace: [ 32.583670] dump_backtrace.part.0+0xe0/0xf0 [ 32.587937] show_stack+0x18/0x30 [ 32.591245] dump_stack_lvl+0x68/0x84 [ 32.594900] dump_stack+0x18/0x34 [ 32.598206] __might_resched+0x12c/0x160 [ 32.602122] __might_sleep+0x48/0xa0 [ 32.605689] __kmem_cache_alloc_node+0x2b8/0x2e0 [ 32.610301] __kmalloc+0x58/0x190 [ 32.613610] otx2_sq_aura_pool_init+0x1a8/0x314 [ 32.618134] otx2_open+0x1d4/0x9d0 To avoid use of GFP_ATOMIC for memory allocation, disable preemption after all memory allocation is done. Fixes: 4af1b64f80fb ("octeontx2-pf: Fix lmtst ID used in aura free") Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Kovvuri Goutham Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4101971aaf0989b9ad04ea4c37c72645a6cc3ce4 Merge: 3a415d59c1db 0b2c59720e65 Author: David S. Miller Date: Mon Jan 16 13:40:55 2023 +0000 Merge branch 'l2tp-races' Cong Wang says: ==================== l2tp: fix race conditions in l2tp_tunnel_register() This patchset contains two patches, the first one is a preparation for the second one which is the actual fix. Please find more details in each patch description. I have ran the l2tp test (https://github.com/katalix/l2tp-ktest), all test cases are passed. v3: preserve EEXIST errno for user-space v2: move IDR allocation to l2tp_tunnel_register() ==================== Signed-off-by: David S. Miller commit 0b2c59720e65885a394a017d0cf9cab118914682 Author: Cong Wang Date: Fri Jan 13 19:01:37 2023 -0800 l2tp: close all race conditions in l2tp_tunnel_register() The code in l2tp_tunnel_register() is racy in several ways: 1. It modifies the tunnel socket _after_ publishing it. 2. It calls setup_udp_tunnel_sock() on an existing socket without locking. 3. It changes sock lock class on fly, which triggers many syzbot reports. This patch amends all of them by moving socket initialization code before publishing and under sock lock. As suggested by Jakub, the l2tp lockdep class is not necessary as we can just switch to bh_lock_sock_nested(). Fixes: 37159ef2c1ae ("l2tp: fix a lockdep splat") Fixes: 6b9f34239b00 ("l2tp: fix races in tunnel creation") Reported-by: syzbot+52866e24647f9a23403f@syzkaller.appspotmail.com Reported-by: syzbot+94cc2a66fc228b23f360@syzkaller.appspotmail.com Reported-by: Tetsuo Handa Cc: Guillaume Nault Cc: Jakub Sitnicki Cc: Eric Dumazet Cc: Tom Parkin Signed-off-by: Cong Wang Reviewed-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit c4d48a58f32c5972174a1d01c33b296fe378cce0 Author: Cong Wang Date: Fri Jan 13 19:01:36 2023 -0800 l2tp: convert l2tp_tunnel_list to idr l2tp uses l2tp_tunnel_list to track all registered tunnels and to allocate tunnel ID's. IDR can do the same job. More importantly, with IDR we can hold the ID before a successful registration so that we don't need to worry about late error handling, it is not easy to rollback socket changes. This is a preparation for the following fix. Cc: Tetsuo Handa Cc: Guillaume Nault Cc: Jakub Sitnicki Cc: Eric Dumazet Cc: Tom Parkin Signed-off-by: Cong Wang Reviewed-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 85 ++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 43 deletions(-) commit 3a415d59c1dbec9d772dbfab2d2520d98360caae Author: Eric Dumazet Date: Fri Jan 13 16:48:49 2023 +0000 net/sched: sch_taprio: fix possible use-after-free syzbot reported a nasty crash [1] in net_tx_action() which made little sense until we got a repro. This repro installs a taprio qdisc, but providing an invalid TCA_RATE attribute. qdisc_create() has to destroy the just initialized taprio qdisc, and taprio_destroy() is called. However, the hrtimer used by taprio had already fired, therefore advance_sched() called __netif_schedule(). Then net_tx_action was trying to use a destroyed qdisc. We can not undo the __netif_schedule(), so we must wait until one cpu serviced the qdisc before we can proceed. Many thanks to Alexander Potapenko for his help. [1] BUG: KMSAN: uninit-value in queued_spin_trylock include/asm-generic/qspinlock.h:94 [inline] BUG: KMSAN: uninit-value in do_raw_spin_trylock include/linux/spinlock.h:191 [inline] BUG: KMSAN: uninit-value in __raw_spin_trylock include/linux/spinlock_api_smp.h:89 [inline] BUG: KMSAN: uninit-value in _raw_spin_trylock+0x92/0xa0 kernel/locking/spinlock.c:138 queued_spin_trylock include/asm-generic/qspinlock.h:94 [inline] do_raw_spin_trylock include/linux/spinlock.h:191 [inline] __raw_spin_trylock include/linux/spinlock_api_smp.h:89 [inline] _raw_spin_trylock+0x92/0xa0 kernel/locking/spinlock.c:138 spin_trylock include/linux/spinlock.h:359 [inline] qdisc_run_begin include/net/sch_generic.h:187 [inline] qdisc_run+0xee/0x540 include/net/pkt_sched.h:125 net_tx_action+0x77c/0x9a0 net/core/dev.c:5086 __do_softirq+0x1cc/0x7fb kernel/softirq.c:571 run_ksoftirqd+0x2c/0x50 kernel/softirq.c:934 smpboot_thread_fn+0x554/0x9f0 kernel/smpboot.c:164 kthread+0x31b/0x430 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 Uninit was created at: slab_post_alloc_hook mm/slab.h:732 [inline] slab_alloc_node mm/slub.c:3258 [inline] __kmalloc_node_track_caller+0x814/0x1250 mm/slub.c:4970 kmalloc_reserve net/core/skbuff.c:358 [inline] __alloc_skb+0x346/0xcf0 net/core/skbuff.c:430 alloc_skb include/linux/skbuff.h:1257 [inline] nlmsg_new include/net/netlink.h:953 [inline] netlink_ack+0x5f3/0x12b0 net/netlink/af_netlink.c:2436 netlink_rcv_skb+0x55d/0x6c0 net/netlink/af_netlink.c:2507 rtnetlink_rcv+0x30/0x40 net/core/rtnetlink.c:6108 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0xf3b/0x1270 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x1288/0x1440 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] ____sys_sendmsg+0xabc/0xe90 net/socket.c:2482 ___sys_sendmsg+0x2a1/0x3f0 net/socket.c:2536 __sys_sendmsg net/socket.c:2565 [inline] __do_sys_sendmsg net/socket.c:2574 [inline] __se_sys_sendmsg net/socket.c:2572 [inline] __x64_sys_sendmsg+0x367/0x540 net/socket.c:2572 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: 0 PID: 13 Comm: ksoftirqd/0 Not tainted 6.0.0-rc2-syzkaller-47461-gac3859c02d7f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Fixes: 5a781ccbd19e ("tc: Add support for configuring the taprio scheduler") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Alexander Potapenko Cc: Vinicius Costa Gomes Signed-off-by: David S. Miller include/net/sch_generic.h | 7 +++++++ net/sched/sch_taprio.c | 3 +++ 2 files changed, 10 insertions(+) commit 21705c771934f24cab8beb554e3b7f40e3511ad7 Merge: c296c77efb66 696e1a48b1a1 Author: David S. Miller Date: Mon Jan 16 13:10:16 2023 +0000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pable Neira Ayuso says: ==================== The following patchset contains Netfilter fixes for net: 1) Increase timeout to 120 seconds for netfilter selftests to fix nftables transaction tests, from Florian Westphal. 2) Fix overflow in bitmap_ip_create() due to integer arithmetics in a 64-bit bitmask, from Gavrilov Ilia. 3) Fix incorrect arithmetics in nft_payload with double-tagged vlan matching. ==================== Signed-off-by: David S. Miller commit c296c77efb66994d94d9f706446a115581226550 Author: Kurt Kanzenbach Date: Sat Jan 14 13:04:37 2023 +0100 net: stmmac: Fix queue statistics reading Correct queue statistics reading. All queue statistics are stored as unsigned long values. The retrieval for ethtool fetches these values as u64. However, on some systems the size of the counters are 32 bit. That yields wrong queue statistic counters e.g., on arm32 systems such as the stm32mp157. Fix it by using the correct data type. Tested on Olimex STMP157-OLinuXino-LIME2 by simple running linuxptp for a short period of time: Non-patched kernel: |root@st1:~# ethtool -S eth0 | grep q0 | q0_tx_pkt_n: 3775276254951 # ??? | q0_tx_irq_n: 879 | q0_rx_pkt_n: 1194000908909 # ??? | q0_rx_irq_n: 278 Patched kernel: |root@st1:~# ethtool -S eth0 | grep q0 | q0_tx_pkt_n: 2434 | q0_tx_irq_n: 1274 | q0_rx_pkt_n: 1604 | q0_rx_irq_n: 846 Fixes: 68e9c5dee1cf ("net: stmmac: add ethtool per-queue statistic framework") Signed-off-by: Kurt Kanzenbach Cc: Vijayakannan Ayyathurai Cc: Wong Vee Khee Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 31b62a98de42cf65d76e4dcfb571af067d27d83a Author: Jonas Karlman Date: Tue Jan 10 17:29:58 2023 +0000 pinctrl: rockchip: fix reading pull type on rk3568 When reading pinconf-pins from debugfs it fails to get the configured pull type on RK3568, "unsupported pinctrl type" error messages is also reported. Fix this by adding support for RK3568 in rockchip_get_pull, including a reverse of the pull-up value swap applied in rockchip_set_pull so that pull-up is correctly reported in pinconf-pins. Also update the workaround comment to reflect affected pins, GPIO0_D3-D6. Fixes: c0dadc0e47a8 ("pinctrl: rockchip: add support for rk3568") Signed-off-by: Jonas Karlman Reviewed-by: Heiko Stuebner Reviewed-by: Jianqun Xu Link: https://lore.kernel.org/r/20230110172955.1258840-1-jonas@kwiboo.se Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit b870e73a56c4cccbec33224233eaf295839f228c Author: Szymon Heidrich Date: Wed Jan 11 18:50:31 2023 +0100 wifi: rndis_wlan: Prevent buffer overflow in rndis_query_oid Since resplen and respoffs are signed integers sufficiently large values of unsigned int len and offset members of RNDIS response will result in negative values of prior variables. This may be utilized to bypass implemented security checks to either extract memory contents by manipulating offset or overflow the data buffer via memcpy by manipulating both offset and len. Additionally assure that sum of resplen and respoffs does not overflow so buffer boundaries are kept. Fixes: 80f8c5b434f9 ("rndis_wlan: copy only useful data from rndis_command respond") Signed-off-by: Szymon Heidrich Reviewed-by: Alexander Duyck Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230111175031.7049-1-szymon.heidrich@gmail.com drivers/net/wireless/rndis_wlan.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit ed05cb177ae5cd7f02f1d6e7706ba627d30f1696 Author: Arend van Spriel Date: Wed Jan 11 12:24:19 2023 +0100 wifi: brcmfmac: fix regression for Broadcom PCIe wifi devices A sanity check was introduced considering maximum flowrings above 256 as insane and effectively aborting the device probe. This resulted in regression for number of users as the value turns out to be sane after all. Fixes: 2aca4f3734bd ("brcmfmac: return error when getting invalid max_flowrings from dongle") Reported-by: chainofflowers Link: https://lore.kernel.org/all/4781984.GXAFRqVoOG@luna/ Reported-by: Christian Marillat Link: https://bugzilla.kernel.org/show_bug.cgi?id=216894 Cc: stable@vger.kernel.org Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230111112419.24185-1-arend.vanspriel@broadcom.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aadb50d1571211c73248605bcc1f4b9f8e3d1364 Author: Arend van Spriel Date: Tue Jan 3 13:41:16 2023 +0100 wifi: brcmfmac: avoid NULL-deref in survey dump for 2G only device When dealing with a device for 2GHz band only the wiphy->bands for 5GHz will be NULL. This would result in a NULL-deref in the brcmf_cfg80211_dump_survey() function. Rework the code with a for-loop to make it easier to add another band. Fixes: 6c04deae1438 ("brcmfmac: Add dump_survey cfg80211 ops for HostApd AutoChannelSelection") Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230103124117.271988-3-arend.vanspriel@broadcom.com .../broadcom/brcm80211/brcmfmac/cfg80211.c | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit e5d1ab1a73ad275c0205cbc09a0a9f9f42bbb87f Author: Arend van Spriel Date: Tue Jan 3 13:41:15 2023 +0100 wifi: brcmfmac: avoid handling disabled channels for survey dump An issue was reported in which periodically error messages are printed in the kernel log: [ 26.303445] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6 [ 26.303554] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin failed with error -2 [ 26.516752] brcmfmac_wcc: brcmf_wcc_attach: executing [ 26.528264] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Jan 4 2021 19:56:29 version 7.45.229 (617f1f5 CY) FWID 01-2dbd9d2e [ 27.076829] Bluetooth: hci0: BCM: features 0x2f [ 27.078592] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+ [ 27.078601] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0342 [ 30.142104] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k SS [ 30.590017] Bluetooth: MGMT ver 1.22 [ 104.897615] brcmfmac: cfg80211_set_channel: set chanspec 0x100e fail, reason -52 [ 104.897992] brcmfmac: cfg80211_set_channel: set chanspec 0xd022 fail, reason -52 [ 105.007672] brcmfmac: cfg80211_set_channel: set chanspec 0xd026 fail, reason -52 [ 105.117654] brcmfmac: cfg80211_set_channel: set chanspec 0xd02a fail, reason -52 [ 105.227636] brcmfmac: cfg80211_set_channel: set chanspec 0xd02e fail, reason -52 [ 106.987552] brcmfmac: cfg80211_set_channel: set chanspec 0xd090 fail, reason -52 [ 106.987911] brcmfmac: cfg80211_set_channel: set chanspec 0xd095 fail, reason -52 [ 106.988233] brcmfmac: cfg80211_set_channel: set chanspec 0xd099 fail, reason -52 [ 106.988565] brcmfmac: cfg80211_set_channel: set chanspec 0xd09d fail, reason -52 [ 106.988909] brcmfmac: cfg80211_set_channel: set chanspec 0xd0a1 fail, reason -52 This happens in brcmf_cfg80211_dump_survey() because we try a disabled channel. When channel is marked as disabled we do not need to fill any other info so bail out. Fixes: 6c04deae1438 ("brcmfmac: Add dump_survey cfg80211 ops for HostApd AutoChannelSelection") Reported-by: Stefan Wahren Signed-off-by: Arend van Spriel Tested-by: Stefan Wahren Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230103124117.271988-2-arend.vanspriel@broadcom.com .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 8c0089882a62da2d75fb655e781cc33cc1351f6a Author: Martin Liska Date: Mon Jan 16 11:45:33 2023 +0100 scripts: support GNU make 4.4 in jobserver-exec Starting with GNU make 4.4, --jobserver-auth newly uses named pipe (fifo) instead of part of opened file descriptors: https://www.gnu.org/software/make/manual/html_node/POSIX-Jobserver.html Support also the new format. Signed-off-by: Martin Liska Signed-off-by: Masahiro Yamada scripts/jobserver-exec | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit e2f7096f1e76845cfa6e19b54f6f3674925fc28b Merge: 88bcc6fa5eae 43d5f5d63699 Author: Arnd Bergmann Date: Mon Jan 16 11:05:13 2023 +0100 Merge tag 'riscv-dt-fixes-for-v6.2-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes RISC-V DeviceTrees for v6.2 SiFive: A solitary fix for the PCI memory regions on the unmatched, triggered by an SM768. No-one must have tried one until just recently! Signed-off-by: Conor Dooley * tag 'riscv-dt-fixes-for-v6.2-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: sifive: fu740: fix size of pcie 32bit memory Link: https://lore.kernel.org/r/Y78rn+0fVNOxHLKt@spud Signed-off-by: Arnd Bergmann commit 88bcc6fa5eaea9b4b520c429f806eb87c639909b Merge: 45c734817847 80502ffab2fa Author: Arnd Bergmann Date: Mon Jan 16 11:04:28 2023 +0100 Merge tag 'mvebu-fixes-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/fixes mvebu fixes for 6.2 (part 1) Fix regression for gpio support on Armada 38x and Armada 38x Fix address for UART1 on AC5/AC5X * tag 'mvebu-fixes-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: dts: marvell: AC5/AC5X: Fix address for UART1 Revert "ARM: dts: armada-39x: Fix compatible string for gpios" Revert "ARM: dts: armada-38x: Fix compatible string for gpios" Link: https://lore.kernel.org/r/87mt6mg08k.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 8e88a0feebb241cab0253698b2f7358b6ebec802 Author: Marek Vasut Date: Mon Jan 16 10:49:57 2023 +0100 gpio: mxc: Always set GPIOs used as interrupt source to INPUT mode Always configure GPIO pins which are used as interrupt source as INPUTs. In case the default pin configuration is OUTPUT, or the prior stage does configure the pins as OUTPUT, then Linux will not reconfigure the pin as INPUT and no interrupts are received. Always configure the interrupt source GPIO pin as input to fix the above case. Reviewed-by: Linus Walleij Fixes: 07bd1a6cc7cbb ("MXC arch: Add gpio support for the whole platform") Signed-off-by: Marek Vasut Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-mxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5464277625c1aca5c002e0f470377cdd6816dcf Author: Marek Vasut Date: Mon Jan 16 10:49:56 2023 +0100 gpio: mxc: Protect GPIO irqchip RMW with bgpio spinlock The driver currently performs register read-modify-write without locking in its irqchip part, this could lead to a race condition when configuring interrupt mode setting. Add the missing bgpio spinlock lock/unlock around the register read-modify-write. Reviewed-by: Linus Walleij Reviewed-by: Marc Zyngier Fixes: 07bd1a6cc7cbb ("MXC arch: Add gpio support for the whole platform") Signed-off-by: Marek Vasut Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-mxc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5f5cc9ed992cbab6361f198966f0edba5fc52688 Author: Yair Podemsky Date: Tue Jan 10 18:02:06 2023 +0200 x86/aperfmperf: Erase stale arch_freq_scale values when disabling frequency invariance readings Once disable_freq_invariance_work is called the scale_freq_tick function will not compute or update the arch_freq_scale values. However the scheduler will still read these values and use them. The result is that the scheduler might perform unfair decisions based on stale values. This patch adds the step of setting the arch_freq_scale values for all cpus to the default (max) value SCHED_CAPACITY_SCALE, Once all cpus have the same arch_freq_scale value the scaling is meaningless. Signed-off-by: Yair Podemsky Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230110160206.75912-1-ypodemsk@redhat.com arch/x86/kernel/cpu/aperfmperf.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5657c116783545fb49cd7004994c187128552b12 Author: Waiman Long Date: Sun Jan 15 14:31:22 2023 -0500 sched/core: Fix NULL pointer access fault in sched_setaffinity() with non-SMP configs The kernel commit 9a5418bc48ba ("sched/core: Use kfree_rcu() in do_set_cpus_allowed()") introduces a bug for kernels built with non-SMP configs. Calling sched_setaffinity() on such a uniprocessor kernel will cause cpumask_copy() to be called with a NULL pointer leading to general protection fault. This is not really a problem in real use cases as there aren't that many uniprocessor kernel configs in use and calling sched_setaffinity() on such a uniprocessor system doesn't make sense. Fix this problem by making sure cpumask_copy() will not be called in such a case. Fixes: 9a5418bc48ba ("sched/core: Use kfree_rcu() in do_set_cpus_allowed()") Reported-by: kernel test robot Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230115193122.563036-1-longman@redhat.com kernel/sched/core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit ee9fffdc3887a46eab3209bc46b228b543c75fa6 Author: Christophe JAILLET Date: Sat Jan 14 09:54:04 2023 +0100 fbdev: omapfb: 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 Signed-off-by: Helge Deller drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c | 7 ++++--- drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c | 7 ++++--- drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c | 3 ++- drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c | 3 ++- 4 files changed, 12 insertions(+), 8 deletions(-) commit 67a90bccad3d20829bea35cb38ad744d9b6e30f4 Author: Randy Dunlap Date: Thu Jan 12 22:36:39 2023 -0800 fbdev: fbmon: fix function name in kernel-doc Fix a kernel-doc warning by correcting the function name in the kernel-doc comment: drivers/video/fbdev/core/fbmon.c:1073: warning: expecting prototype for fb_get_hblank_by_freq(). Prototype was for fb_get_hblank_by_hfreq() instead Signed-off-by: Randy Dunlap Cc: Daniel Vetter Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Helge Deller drivers/video/fbdev/core/fbmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71dfd381a7c051f16a61f82fbd38a4cca563bdca Author: Duke Xin(辛安文) Date: Sun Jan 15 18:33:28 2023 -0800 USB: serial: option: add Quectel EM05CN modem The EM05CN modem has 2 USB configurations that are configurable via the AT command AT+QCFG="usbnet",[ 0 | 2 ] which make the modem enumerate with the following interfaces, respectively: "MBIM" : AT + MBIM + DIAG + NMEA + MODEM "RMNET" : AT + DIAG + NMEA + Modem + QMI The detailed description of the USB configuration for each mode as follows: MBIM Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0312 Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-CN C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 1 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 2 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I:* If#= 2 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms RMNET Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0312 Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-CN C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Duke Xin(辛安文) Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+) commit 1541dd0097c0f8f470e76eddf5120fc55a7e3101 Author: Duke Xin(辛安文) Date: Sun Jan 15 18:07:27 2023 -0800 USB: serial: option: add Quectel EM05CN (SG) modem The EM05CN (SG) modem has 2 USB configurations that are configurable via the AT command AT+QCFG="usbnet",[ 0 | 2 ] which make the modem enumerate with the following interfaces, respectively: "MBIM" : AT + MBIM + DIAG + NMEA + MODEM "RMNET" : AT + DIAG + NMEA + Modem + QMI The detailed description of the USB configuration for each mode as follows: MBIM Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0310 Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-CN C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 1 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 2 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I:* If#= 2 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms RMNET Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0310 Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-CN C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Duke Xin(辛安文) Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+) commit 3f9e76e31704a325170e5aec2243c8d084d74854 Author: Michael Adler Date: Tue Jan 3 14:48:50 2023 +0100 USB: serial: cp210x: add SCALANCE LPE-9000 device id Add the USB serial console device ID for Siemens SCALANCE LPE-9000 which have a USB port for their serial console. Signed-off-by: Michael Adler Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit d9bbb15881046bd76f8710c76e26a740eee997ef Author: Ali Mirghasemi Date: Wed Dec 28 15:08:47 2022 +0330 USB: serial: option: add Quectel EC200U modem Add support for EC200U modem 0x0901: EC200U - AT + AP + CP + NMEA + DIAG + MOS usb-device output: T: Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0901 Rev= 3.18 S: Manufacturer=Android S: Product=Android C:* #Ifs= 9 Cfg#= 1 Atr=e0 MxPwr=400mA 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=81(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=82(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= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=03(Int.) MxPS= 512 Ivl=4096ms I:* If#= 3 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=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=86(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=87(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=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 7 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=03(Int.) MxPS= 512 Ivl=4096ms I:* If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Ali Mirghasemi Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) commit b72d13977689f0c717444010e108c4f20658dfee Author: Duke Xin(辛安文) Date: Tue Dec 27 01:51:27 2022 -0800 USB: serial: option: add Quectel EM05-G (RS) modem The EM05-G (RS) modem has 2 USB configurations that are configurable via the AT command AT+QCFG="usbnet",[ 0 | 2 ] which make the modem enumerate with the following interfaces, respectively: "RMNET" : AT + DIAG + NMEA + Modem + QMI "MBIM" : MBIM + AT + DIAG + NMEA + Modem The detailed description of the USB configuration for each mode as follows: RMNET Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 21 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0314 Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-G C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms MBIM Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 16 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0314 Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-G C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Duke Xin(辛安文) Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+) commit 216f764716f34fe68cedc7296ae2043a7727e640 Author: Yu Kuai Date: Tue Jan 3 16:47:55 2023 +0800 block, bfq: switch 'bfqg->ref' to use atomic refcount apis The updating of 'bfqg->ref' should be protected by 'bfqd->lock', however, during code review, we found that bfq_pd_free() update 'bfqg->ref' without holding the lock, which is problematic: 1) bfq_pd_free() triggered by removing cgroup is called asynchronously; 2) bfqq will grab bfqg reference, and exit bfqq will drop the reference, which can concurrent with 1). Unfortunately, 'bfqd->lock' can't be held here because 'bfqd' might already be freed in bfq_pd_free(). Fix the problem by using atomic refcount apis. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230103084755.1256479-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-cgroup.c | 8 +++----- block/bfq-iosched.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) commit 6618d69aa129a8fc613e64775d5019524c6f231b Author: Miguel Ojeda Date: Tue Dec 13 19:03:55 2022 +0100 rust: print: avoid evaluating arguments in `pr_*` macros in `unsafe` blocks At the moment it is possible to perform unsafe operations in the arguments of `pr_*` macros since they are evaluated inside an `unsafe` block: let x = &10u32 as *const u32; pr_info!("{}", *x); In other words, this is a soundness issue. Fix it so that it requires an explicit `unsafe` block. Reported-by: Wedson Almeida Filho Reported-by: Domen Puncer Kugler Link: https://github.com/Rust-for-Linux/linux/issues/479 Signed-off-by: Miguel Ojeda Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Reviewed-by: Björn Roy Baron Reviewed-by: Vincenzo Palazzo rust/kernel/print.rs | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit a608da3bd730d718f2d3ebec1c26f9865f8f17ce Author: Damien Le Moal Date: Fri Jan 6 17:43:06 2023 +0900 zonefs: Detect append writes at invalid locations Using REQ_OP_ZONE_APPEND operations for synchronous writes to sequential files succeeds regardless of the zone write pointer position, as long as the target zone is not full. This means that if an external (buggy) application writes to the zone of a sequential file underneath the file system, subsequent file write() operation will succeed but the file size will not be correct and the file will contain invalid data written by another application. Modify zonefs_file_dio_append() to check the written sector of an append write (returned in bio->bi_iter.bi_sector) and return -EIO if there is a mismatch with the file zone wp offset field. This change triggers a call to zonefs_io_error() and a zone check. Modify zonefs_io_error_cb() to not expose the unexpected data after the current inode size when the errors=remount-ro mode is used. Other error modes are correctly handled already. Fixes: 02ef12a663c7 ("zonefs: use REQ_OP_ZONE_APPEND for sync DIO") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn fs/zonefs/super.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 5dc4c995db9eb45f6373a956eb1f69460e69e6d4 Author: Linus Torvalds Date: Sun Jan 15 09:22:43 2023 -0600 Linux 6.2-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a323e6b5737bb6e3d3946369b97099abb7dde695 Author: Jensen Huang Date: Fri Jan 13 14:44:57 2023 +0800 arm64: dts: rockchip: add missing #interrupt-cells to rk356x pcie2x1 This fixes the following issue: pcieport 0000:00:00.0: of_irq_parse_pci: failed with rc=-22 Signed-off-by: Jensen Huang Link: https://lore.kernel.org/r/20230113064457.7105-1-jensenhuang@friendlyarm.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk356x.dtsi | 1 + 1 file changed, 1 insertion(+) commit f0f70ddb8f3bdbe670b1fab07271dd772e54c341 Merge: 8aa9761223af 26ce6ec364f1 Author: Linus Torvalds Date: Sun Jan 15 07:17:44 2023 -0600 Merge tag 'x86_urgent_for_v6.2_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Make sure the poking PGD is pinned for Xen PV as it requires it this way - Fixes for two resctrl races when moving a task or creating a new monitoring group - Fix SEV-SNP guests running under HyperV where MTRRs are disabled to not return a UC- type mapping type on memremap() and thus cause a serious slowdown - Fix insn mnemonics in bioscall.S now that binutils is starting to fix confusing insn suffixes * tag 'x86_urgent_for_v6.2_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: fix poking_init() for Xen PV guests x86/resctrl: Fix event counts regression in reused RMIDs x86/resctrl: Fix task CLOSID/RMID update race x86/pat: Fix pat_x_mtrr_type() for MTRR disabled case x86/boot: Avoid using Intel mnemonics in AT&T syntax asm commit 8aa9761223af6a075f9904d035b57cef9b26aaab Merge: b1d63f0c777b e7a293658c20 Author: Linus Torvalds Date: Sun Jan 15 07:12:58 2023 -0600 Merge tag 'edac_urgent_for_v6.2_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fixes from Borislav Petkov: - Fix the EDAC device's confusion in the polling setting units - Fix a memory leak in highbank's probing function * tag 'edac_urgent_for_v6.2_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/highbank: Fix memory leak in highbank_mc_probe() EDAC/device: Fix period calculation in edac_device_reset_delay_period() commit b1d63f0c777b6df1ab53c5597d5fc25753f52f07 Merge: 7c6984405241 f12cd06109f4 Author: Linus Torvalds Date: Sun Jan 15 07:09:41 2023 -0600 Merge tag 'powerpc-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix a build failure with some versions of ld that have an odd version string - Fix incorrect use of mutex in the IMC PMU driver Thanks to Kajol Jain, Michael Petlan, Ojaswin Mujoo, Peter Zijlstra, and Yang Yingliang. * tag 'powerpc-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s/hash: Make stress_hpt_timer_fn() static powerpc/imc-pmu: Fix use of mutex in IRQs disabled section powerpc/boot: Fix incorrect version calculation issue in ld_version commit 7c698440524117dca7534592db0e7f465ae4d0bb Merge: 4f43ade45dc5 142e821f68cf Author: Linus Torvalds Date: Sat Jan 14 10:48:15 2023 -0600 Merge tag 'iommu-fixes-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Core: Fix an iommu-group refcount leak - Fix overflow issue in IOVA alloc path - ARM-SMMU fixes from Will: - Fix VFIO regression on NXP SoCs by reporting IOMMU_CAP_CACHE_COHERENCY - Fix SMMU shutdown paths to avoid device unregistration race - Error handling fix for Mediatek IOMMU driver * tag 'iommu-fixes-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: 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 commit eb50cd5bfdac61627a5026566cf3b90ced7b141c Author: Dmitry Perchanov Date: Wed Jan 11 14:24:25 2023 +0200 iio: hid: fix the retval in gyro_3d_capture_sample Return value should be zero for success. This was forgotten for timestamp feature. Verified on RealSense cameras. Fixes: 4648cbd8fb92 ("iio: hid-sensor-gyro-3d: Add timestamp channel") Signed-off-by: Dmitry Perchanov Link: https://lore.kernel.org/r/7c1809dc74eb2f58a20595f4d02e76934f8e9219.camel@intel.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/gyro/hid-sensor-gyro-3d.c | 1 + 1 file changed, 1 insertion(+) commit f7b23d1c35d8b8de1425bdfccaefd01f3b7c9d1c Author: Dmitry Perchanov Date: Wed Jan 11 14:22:10 2023 +0200 iio: hid: fix the retval in accel_3d_capture_sample Return value should be zero for success. This was forgotten for timestamp feature. Verified on RealSense cameras. Fixes: a96cd0f901ee ("iio: accel: hid-sensor-accel-3d: Add timestamp") Signed-off-by: Dmitry Perchanov Link: https://lore.kernel.org/r/a6dc426498221c81fa71045b41adf782ebd42136.camel@intel.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/accel/hid-sensor-accel-3d.c | 1 + 1 file changed, 1 insertion(+) commit 4f43ade45dc57fc3b4a5cb598a6f4916dcc418ba Merge: 880ca43e5c33 115d9d77bb0f Author: Linus Torvalds Date: Sat Jan 14 10:08:08 2023 -0600 Merge tag 'fixes-2023-01-14' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock fix from Mike Rapoport: "memblock: always release pages to the buddy allocator in memblock_free_late() If CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, memblock_free_pages() only releases pages to the buddy allocator if they are not in the deferred range. This is correct for free pages (as defined by for_each_free_mem_pfn_range_in_zone()) because free pages in the deferred range will be initialized and released as part of the deferred init process. memblock_free_pages() is called by memblock_free_late(), which is used to free reserved ranges after memblock_free_all() has run. All pages in reserved ranges have been initialized at that point, and accordingly, those pages are not touched by the deferred init process. This means that currently, if the pages that memblock_free_late() intends to release are in the deferred range, they will never be released to the buddy allocator. They will forever be reserved. In addition, memblock_free_pages() calls kmsan_memblock_free_pages(), which is also correct for free pages but is not correct for reserved pages. KMSAN metadata for reserved pages is initialized by kmsan_init_shadow(), which runs shortly before memblock_free_all(). For both of these reasons, memblock_free_pages() should only be called for free pages, and memblock_free_late() should call __free_pages_core() directly instead. One case where this issue can occur in the wild is EFI boot on x86_64. The x86 EFI code reserves all EFI boot services memory ranges via memblock_reserve() and frees them later via memblock_free_late() (efi_reserve_boot_services() and efi_free_boot_services(), respectively). If any of those ranges happens to fall within the deferred init range, the pages will not be released and that memory will be unavailable. For example, on an Amazon EC2 t3.micro VM (1 GB) booting via EFI: v6.2-rc2: Node 0, zone DMA spanned 4095 present 3999 managed 3840 Node 0, zone DMA32 spanned 246652 present 245868 managed 178867 v6.2-rc2 + patch: Node 0, zone DMA spanned 4095 present 3999 managed 3840 Node 0, zone DMA32 spanned 246652 present 245868 managed 222816 # +43,949 pages" * tag 'fixes-2023-01-14' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: mm: Always release pages to the buddy allocator in memblock_free_late(). commit 880ca43e5c334c32a8af125e456d1a23314aa416 Merge: 8b7be52f3f0d 42633ed852de Author: Linus Torvalds Date: Sat Jan 14 10:04:00 2023 -0600 Merge tag 'hardening-v6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull kernel hardening fixes from Kees Cook: - Fix CFI hash randomization with KASAN (Sami Tolvanen) - Check size of coreboot table entry and use flex-array * tag 'hardening-v6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: kbuild: Fix CFI hash randomization with KASAN firmware: coreboot: Check size of table entry and use flex-array commit 8b7be52f3f0d0c24ee147ba7cab6c7fa4f9bcfbb Merge: b35ad63eecca da35048f2600 Author: Linus Torvalds Date: Sat Jan 14 08:17:27 2023 -0600 Merge tag 'modules-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull module fix from Luis Chamberlain: "Just one fix for modules by Nick" * tag 'modules-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: kallsyms: Fix scheduling with interrupts disabled in self-test commit b35ad63eeccadbcc83f295a64a029f7e7188444f Merge: 8e768130857d a152d05ae4a7 Author: Linus Torvalds Date: Sat Jan 14 08:08:25 2023 -0600 Merge tag '6.2-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: - memory leak and double free fix - two symlink fixes - minor cleanup fix - two smb1 fixes * tag '6.2-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Fix uninitialized memory read for smb311 posix symlink create cifs: fix potential memory leaks in session setup cifs: do not query ifaces on smb1 mounts cifs: fix double free on failed kerberos auth cifs: remove redundant assignment to the variable match cifs: fix file info setting in cifs_open_file() cifs: fix file info setting in cifs_query_path_info() commit 8e768130857d08a6765f3287ad3f89c1b7d50e53 Merge: 34cbf89afc86 f58c89700630 Author: Linus Torvalds Date: Sat Jan 14 07:57:25 2023 -0600 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two minor fixes in the hisi_sas driver which only impact enterprise style multi-expander and shared disk situations and no core changes" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: hisi_sas: Set a port invalid only if there are no devices attached when refreshing port id scsi: hisi_sas: Use abort task set to reset SAS disks when discovered commit 34cbf89afc866df36d6b9177e4f99160a4823382 Merge: 97ec4d559d93 22eebaa631c4 Author: Linus Torvalds Date: Sat Jan 14 07:52:11 2023 -0600 Merge tag 'ata-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ATA fix from Damien Le Moal: "A single fix to prevent building the pata_cs5535 driver with user mode linux as it uses msr operations that are not defined with UML" * tag 'ata-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: pata_cs5535: Don't build on UML commit a22b7388d658ecfcd226600c8c34ce4481e88655 Author: Rahul Rameshbabu Date: Thu Jan 12 16:55:29 2023 -0800 sch_htb: Avoid grafting on htb_destroy_class_offload when destroying htb Peek at old qdisc and graft only when deleting a leaf class in the htb, rather than when deleting the htb itself. Do not peek at the qdisc of the netdev queue when destroying the htb. The caller may already have grafted a new qdisc that is not part of the htb structure being destroyed. This fix resolves two use cases. 1. Using tc to destroy the htb. - Netdev was being prematurely activated before the htb was fully destroyed. 2. Using tc to replace the htb with another qdisc (which also leads to the htb being destroyed). - Premature netdev activation like previous case. Newly grafted qdisc was also getting accidentally overwritten when destroying the htb. Fixes: d03b195b5aa0 ("sch_htb: Hierarchical QoS hardware offload") Signed-off-by: Rahul Rameshbabu Reviewed-by: Saeed Mahameed Reviewed-by: Maxim Mikityanskiy Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20230113005528.302625-1-rrameshbabu@nvidia.com Signed-off-by: Jakub Kicinski net/sched/sch_htb.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit da263fcb86ae1ca40b5329e64ad7d7f69d260477 Merge: 925f3deb45df 4656d72c1efa Author: Jakub Kicinski Date: Fri Jan 13 21:55:49 2023 -0800 Merge branch 'mptcp-userspace-pm-create-sockets-for-the-right-family' Matthieu Baerts says: ==================== mptcp: userspace pm: create sockets for the right family Before these patches, the Userspace Path Manager would allow the creation of subflows with wrong families: taking the one of the MPTCP socket instead of the provided ones and resulting in the creation of subflows with likely not the right source and/or destination IPs. It would also allow the creation of subflows between different families or not respecting v4/v6-only socket attributes. Patch 1 lets the userspace PM select the proper family to avoid creating subflows with the wrong source and/or destination addresses because the family is not the expected one. Patch 2 makes sure the userspace PM doesn't allow the userspace to create subflows for a family that is not allowed. Patch 3 validates scenarios with a mix of v4 and v6 subflows for the same MPTCP connection. These patches fix issues introduced in v5.19 when the userspace path manager has been introduced. ==================== Link: https://lore.kernel.org/r/20230112-upstream-net-20230112-netlink-v4-v6-v1-0-6a8363a221d2@tessares.net Signed-off-by: Jakub Kicinski commit 4656d72c1efa495a58ad6d8b073a60907073e4e6 Author: Matthieu Baerts Date: Thu Jan 12 18:42:53 2023 +0100 selftests: mptcp: userspace: validate v4-v6 subflows mix MPTCP protocol supports having subflows in both IPv4 and IPv6. In Linux, it is possible to have that if the MPTCP socket has been created with AF_INET6 family without the IPV6_V6ONLY option. Here, a new IPv4 subflow is being added to the initial IPv6 connection, then being removed using Netlink commands. Cc: stable@vger.kernel.org # v5.19+ Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/userspace_pm.sh | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit fb00ee4f3343acb2b9222ca9b73b47dd1e1a8efc Author: Matthieu Baerts Date: Thu Jan 12 18:42:52 2023 +0100 mptcp: netlink: respect v4/v6-only sockets If an MPTCP socket has been created with AF_INET6 and the IPV6_V6ONLY option has been set, the userspace PM would allow creating subflows using IPv4 addresses, e.g. mapped in v6. The kernel side of userspace PM will also accept creating subflows with local and remote addresses having different families. Depending on the subflow socket's family, different behaviours are expected: - If AF_INET is forced with a v6 address, the kernel will take the last byte of the IP and try to connect to that: a new subflow is created but to a non expected address. - If AF_INET6 is forced with a v4 address, the kernel will try to connect to a v4 address (v4-mapped-v6). A -EBADF error from the connect() part is then expected. It is then required to check the given families can be accepted. This is done by using a new helper for addresses family matching, taking care of IPv4 vs IPv4-mapped-IPv6 addresses. This helper will be re-used later by the in-kernel path-manager to use mixed IPv4 and IPv6 addresses. While at it, a clear error message is now reported if there are some conflicts with the families that have been passed by the userspace. Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski net/mptcp/pm.c | 25 +++++++++++++++++++++++++ net/mptcp/pm_userspace.c | 7 +++++++ net/mptcp/protocol.h | 3 +++ 3 files changed, 35 insertions(+) commit 6bc1fe7dd748ba5e76e7917d110837cafe7b931c Author: Paolo Abeni Date: Thu Jan 12 18:42:51 2023 +0100 mptcp: explicitly specify sock family at subflow creation time Let the caller specify the to-be-created subflow family. For a given MPTCP socket created with the AF_INET6 family, the current userspace PM can already ask the kernel to create subflows in v4 and v6. If "plain" IPv4 addresses are passed to the kernel, they are automatically mapped in v6 addresses "by accident". This can be problematic because the userspace will need to pass different addresses, now the v4-mapped-v6 addresses to destroy this new subflow. On the other hand, if the MPTCP socket has been created with the AF_INET family, the command to create a subflow in v6 will be accepted but the result will not be the one as expected as new subflow will be created in IPv4 using part of the v6 addresses passed to the kernel: not creating the expected subflow then. No functional change intended for the in-kernel PM where an explicit enforcement is currently in place. This arbitrary enforcement will be leveraged by other patches in a future version. Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment") Cc: stable@vger.kernel.org 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: Jakub Kicinski net/mptcp/protocol.c | 2 +- net/mptcp/protocol.h | 3 ++- net/mptcp/subflow.c | 9 +++++---- 3 files changed, 8 insertions(+), 6 deletions(-) commit 925f3deb45df73173a33e1e81db77575f4ffde39 Author: Clément Léger Date: Thu Jan 12 17:13:11 2023 +0100 net: lan966x: add missing fwnode_handle_put() for ports node Since the "ethernet-ports" node is retrieved using device_get_named_child_node(), it should be release after using it. Add missing fwnode_handle_put() and move the code that retrieved the node from device-tree to avoid complicated handling in case of error. Fixes: db8bcaad5393 ("net: lan966x: add the basic lan966x driver") Signed-off-by: Clément Léger Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/20230112161311.495124-1-clement.leger@bootlin.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 3c463721a73bdb57a913e0d3124677a3758886fc Author: Vladimir Oltean Date: Thu Jan 12 12:54:40 2023 +0200 net: enetc: avoid deadlock in enetc_tx_onestep_tstamp() This lockdep splat says it better than I could: ================================ WARNING: inconsistent lock state 6.2.0-rc2-07010-ga9b9500ffaac-dirty #967 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. kworker/1:3/179 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff3ec4036ce098 (_xmit_ETHER#2){+.?.}-{3:3}, at: netif_freeze_queues+0x5c/0xc0 {IN-SOFTIRQ-W} state was registered at: _raw_spin_lock+0x5c/0xc0 sch_direct_xmit+0x148/0x37c __dev_queue_xmit+0x528/0x111c ip6_finish_output2+0x5ec/0xb7c ip6_finish_output+0x240/0x3f0 ip6_output+0x78/0x360 ndisc_send_skb+0x33c/0x85c ndisc_send_rs+0x54/0x12c addrconf_rs_timer+0x154/0x260 call_timer_fn+0xb8/0x3a0 __run_timers.part.0+0x214/0x26c run_timer_softirq+0x3c/0x74 __do_softirq+0x14c/0x5d8 ____do_softirq+0x10/0x20 call_on_irq_stack+0x2c/0x5c do_softirq_own_stack+0x1c/0x30 __irq_exit_rcu+0x168/0x1a0 irq_exit_rcu+0x10/0x40 el1_interrupt+0x38/0x64 irq event stamp: 7825 hardirqs last enabled at (7825): [] exit_to_kernel_mode+0x34/0x130 hardirqs last disabled at (7823): [] __do_softirq+0x550/0x5d8 softirqs last enabled at (7824): [] __do_softirq+0x46c/0x5d8 softirqs last disabled at (7811): [] ____do_softirq+0x10/0x20 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(_xmit_ETHER#2); lock(_xmit_ETHER#2); *** DEADLOCK *** 3 locks held by kworker/1:3/179: #0: ffff3ec400004748 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x1f4/0x6c0 #1: ffff80000a0bbdc8 ((work_completion)(&priv->tx_onestep_tstamp)){+.+.}-{0:0}, at: process_one_work+0x1f4/0x6c0 #2: ffff3ec4036cd438 (&dev->tx_global_lock){+.+.}-{3:3}, at: netif_tx_lock+0x1c/0x34 Workqueue: events enetc_tx_onestep_tstamp Call trace: print_usage_bug.part.0+0x208/0x22c mark_lock+0x7f0/0x8b0 __lock_acquire+0x7c4/0x1ce0 lock_acquire.part.0+0xe0/0x220 lock_acquire+0x68/0x84 _raw_spin_lock+0x5c/0xc0 netif_freeze_queues+0x5c/0xc0 netif_tx_lock+0x24/0x34 enetc_tx_onestep_tstamp+0x20/0x100 process_one_work+0x28c/0x6c0 worker_thread+0x74/0x450 kthread+0x118/0x11c but I'll say it anyway: the enetc_tx_onestep_tstamp() work item runs in process context, therefore with softirqs enabled (i.o.w., it can be interrupted by a softirq). If we hold the netif_tx_lock() when there is an interrupt, and the NET_TX softirq then gets scheduled, this will take the netif_tx_lock() a second time and deadlock the kernel. To solve this, use netif_tx_lock_bh(), which blocks softirqs from running. Fixes: 7294380c5211 ("enetc: support PTP Sync packet one-step timestamping") Signed-off-by: Vladimir Oltean Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/20230112105440.1786799-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/enetc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 488e0bf7f34af3d42d1d5e56f7a5a7beaff188a3 Author: Esina Ekaterina Date: Thu Jan 12 10:47:03 2023 +0300 net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs If uhdlc_priv_tsa != 1 then utdm is not initialized. And if ret != NULL then goto undo_uhdlc_init, where utdm is dereferenced. Same if dev == NULL. Found by Astra Linux on behalf of Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 8d68100ab4ad ("soc/fsl/qe: fix err handling of ucc_of_parse_tdm") Signed-off-by: Esina Ekaterina Link: https://lore.kernel.org/r/20230112074703.13558-1-eesina@astralinux.ru Signed-off-by: Jakub Kicinski drivers/net/wan/fsl_ucc_hdlc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4bb4db7f3187c6e3de6b229ffc87cdb30a2d22b6 Author: Jisoo Jang Date: Wed Jan 11 22:19:14 2023 +0900 net: nfc: Fix use-after-free in local_cleanup() Fix a use-after-free that occurs in kfree_skb() called from local_cleanup(). This could happen when killing nfc daemon (e.g. neard) after detaching an nfc device. When detaching an nfc device, local_cleanup() called from nfc_llcp_unregister_device() frees local->rx_pending and decreases local->ref by kref_put() in nfc_llcp_local_put(). In the terminating process, nfc daemon releases all sockets and it leads to decreasing local->ref. After the last release of local->ref, local_cleanup() called from local_release() frees local->rx_pending again, which leads to the bug. Setting local->rx_pending to NULL in local_cleanup() could prevent use-after-free when local_cleanup() is called twice. Found by a modified version of syzkaller. BUG: KASAN: use-after-free in kfree_skb() Call Trace: dump_stack_lvl (lib/dump_stack.c:106) print_address_description.constprop.0.cold (mm/kasan/report.c:306) kasan_check_range (mm/kasan/generic.c:189) kfree_skb (net/core/skbuff.c:955) local_cleanup (net/nfc/llcp_core.c:159) nfc_llcp_local_put.part.0 (net/nfc/llcp_core.c:172) nfc_llcp_local_put (net/nfc/llcp_core.c:181) llcp_sock_destruct (net/nfc/llcp_sock.c:959) __sk_destruct (net/core/sock.c:2133) sk_destruct (net/core/sock.c:2181) __sk_free (net/core/sock.c:2192) sk_free (net/core/sock.c:2203) llcp_sock_release (net/nfc/llcp_sock.c:646) __sock_release (net/socket.c:650) sock_close (net/socket.c:1365) __fput (fs/file_table.c:306) task_work_run (kernel/task_work.c:179) ptrace_notify (kernel/signal.c:2354) syscall_exit_to_user_mode_prepare (kernel/entry/common.c:278) syscall_exit_to_user_mode (kernel/entry/common.c:296) do_syscall_64 (arch/x86/entry/common.c:86) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:106) Allocated by task 4719: kasan_save_stack (mm/kasan/common.c:45) __kasan_slab_alloc (mm/kasan/common.c:325) slab_post_alloc_hook (mm/slab.h:766) kmem_cache_alloc_node (mm/slub.c:3497) __alloc_skb (net/core/skbuff.c:552) pn533_recv_response (drivers/nfc/pn533/usb.c:65) __usb_hcd_giveback_urb (drivers/usb/core/hcd.c:1671) usb_giveback_urb_bh (drivers/usb/core/hcd.c:1704) tasklet_action_common.isra.0 (kernel/softirq.c:797) __do_softirq (kernel/softirq.c:571) Freed by task 1901: kasan_save_stack (mm/kasan/common.c:45) kasan_set_track (mm/kasan/common.c:52) kasan_save_free_info (mm/kasan/genericdd.c:518) __kasan_slab_free (mm/kasan/common.c:236) kmem_cache_free (mm/slub.c:3809) kfree_skbmem (net/core/skbuff.c:874) kfree_skb (net/core/skbuff.c:931) local_cleanup (net/nfc/llcp_core.c:159) nfc_llcp_unregister_device (net/nfc/llcp_core.c:1617) nfc_unregister_device (net/nfc/core.c:1179) pn53x_unregister_nfc (drivers/nfc/pn533/pn533.c:2846) pn533_usb_disconnect (drivers/nfc/pn533/usb.c:579) usb_unbind_interface (drivers/usb/core/driver.c:458) device_release_driver_internal (drivers/base/dd.c:1279) bus_remove_device (drivers/base/bus.c:529) device_del (drivers/base/core.c:3665) usb_disable_device (drivers/usb/core/message.c:1420) usb_disconnect (drivers/usb/core.c:2261) hub_event (drivers/usb/core/hub.c:5833) process_one_work (arch/x86/include/asm/jump_label.h:27 include/linux/jump_label.h:212 include/trace/events/workqueue.h:108 kernel/workqueue.c:2281) worker_thread (include/linux/list.h:282 kernel/workqueue.c:2423) kthread (kernel/kthread.c:319) ret_from_fork (arch/x86/entry/entry_64.S:301) Fixes: 3536da06db0b ("NFC: llcp: Clean local timers and works when removing a device") Signed-off-by: Jisoo Jang Link: https://lore.kernel.org/r/20230111131914.3338838-1-jisoo.jang@yonsei.ac.kr Signed-off-by: Jakub Kicinski net/nfc/llcp_core.c | 1 + 1 file changed, 1 insertion(+) commit ee16c404f9bd03c6e083f76d45be0b6a774c0d14 Merge: 3d25b1e83692 b0907cadabca Author: Jens Axboe Date: Fri Jan 13 20:47:48 2023 -0700 Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-6.2 Pull MD fix from Song: "It fixes an issue introduced by recent code refactor." * 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: fix incorrect declaration about claim_rdev in md_import_device commit 84ed64b1a7a7fcd507598dee7708c1f225123711 Author: Maurizio Lombardi Date: Tue Jan 10 13:53:10 2023 +0100 scsi: target: core: Fix warning on RT kernels Calling spin_lock_irqsave() does not disable the interrupts on realtime kernels, remove the warning and replace assert_spin_locked() with lockdep_assert_held(). Signed-off-by: Maurizio Lombardi Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230110125310.55884-1-mlombard@redhat.com Signed-off-by: Martin K. Petersen drivers/target/target_core_tmr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 97ec4d559d939743e8af83628be5af8da610d9dc Merge: 2ce7592df99f 3d25b1e83692 Author: Linus Torvalds Date: Fri Jan 13 17:41:19 2023 -0600 Merge tag 'block-6.2-2023-01-13' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "Nothing major in here, just a collection of NVMe fixes and dropping a wrong might_sleep() that static checkers tripped over but which isn't valid" * tag 'block-6.2-2023-01-13' of git://git.kernel.dk/linux: MAINTAINERS: stop nvme matching for nvmem files nvme: don't allow unprivileged passthrough on partitions nvme: replace the "bool vec" arguments with flags in the ioctl path nvme: remove __nvme_ioctl nvme-pci: fix error handling in nvme_pci_enable() nvme-pci: add NVME_QUIRK_IDENTIFY_CNS quirk to Apple T2 controllers nvme-apple: add NVME_QUIRK_IDENTIFY_CNS quirk to fix regression block: Drop spurious might_sleep() from blk_put_queue() commit 2ce7592df99f7356cc8697ad10849987237abca4 Merge: 9e058c2952ca 544d163d659d Author: Linus Torvalds Date: Fri Jan 13 17:37:09 2023 -0600 Merge tag 'io_uring-6.2-2023-01-13' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "A fix for a regression that happened last week, rest is fixes that will be headed to stable as well. In detail: - Fix for a regression added with the leak fix from last week (me) - In writing a test case for that leak, inadvertently discovered a case where we a poll request can race. So fix that up and mark it for stable, and also ensure that fdinfo covers both the poll tables that we have. The latter was an oversight when the split poll table were added (me) - Fix for a lockdep reported issue with IOPOLL (Pavel)" * tag 'io_uring-6.2-2023-01-13' of git://git.kernel.dk/linux: io_uring: lock overflowing for IOPOLL io_uring/poll: attempt request issue after racy poll wakeup io_uring/fdinfo: include locked hash table in fdinfo output io_uring/poll: add hash if ready poll request can't complete inline io_uring/io-wq: only free worker if it was allocated for creation commit 9e058c2952cad4baca0464266c4b1fe68f77052b Merge: 92783a90bcbd fd3a8cff4d4a Author: Linus Torvalds Date: Fri Jan 13 17:32:22 2023 -0600 Merge tag 'pci-v6.2-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull pci fixes from Bjorn Helgaas: - Work around apparent firmware issue that made Linux reject MMCONFIG space, which broke PCI extended config space (Bjorn Helgaas) - Fix CONFIG_PCIE_BT1 dependency due to mid-air collision between a PCI_MSI_IRQ_DOMAIN -> PCI_MSI change and addition of PCIE_BT1 (Lukas Bulwahn) * tag 'pci-v6.2-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: x86/pci: Treat EfiMemoryMappedIO as reservation of ECAM space x86/pci: Simplify is_mmconf_reserved() messages PCI: dwc: Adjust to recent removal of PCI_MSI_IRQ_DOMAIN commit 42633ed852deadc14d44660ad71e2f6640239120 Author: Sami Tolvanen Date: Thu Jan 12 22:49:48 2023 +0000 kbuild: Fix CFI hash randomization with KASAN Clang emits a asan.module_ctor constructor to each object file when KASAN is enabled, and these functions are indirectly called in do_ctors. With CONFIG_CFI_CLANG, the compiler also emits a CFI type hash before each address-taken global function so they can pass indirect call checks. However, in commit 0c3e806ec0f9 ("x86/cfi: Add boot time hash randomization"), x86 implemented boot time hash randomization, which relies on the .cfi_sites section generated by objtool. As objtool is run against vmlinux.o instead of individual object files with X86_KERNEL_IBT (enabled by default), CFI types in object files that are not part of vmlinux.o end up not being included in .cfi_sites, and thus won't get randomized and trip CFI when called. Only .vmlinux.export.o and init/version-timestamp.o are linked into vmlinux separately from vmlinux.o. As these files don't contain any functions, disable KASAN for both of them to avoid breaking hash randomization. Link: https://github.com/ClangBuiltLinux/linux/issues/1742 Fixes: 0c3e806ec0f9 ("x86/cfi: Add boot time hash randomization") Signed-off-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230112224948.1479453-2-samitolvanen@google.com init/Makefile | 1 + scripts/Makefile.vmlinux | 1 + 2 files changed, 2 insertions(+) commit 3b293487b8752cc42c1cbf8a0447bc6076c075fa Author: Kees Cook Date: Thu Jan 12 15:03:16 2023 -0800 firmware: coreboot: Check size of table entry and use flex-array The memcpy() of the data following a coreboot_table_entry couldn't be evaluated by the compiler under CONFIG_FORTIFY_SOURCE. To make it easier to reason about, add an explicit flexible array member to struct coreboot_device so the entire entry can be copied at once. Additionally, validate the sizes before copying. Avoids this run-time false positive warning: memcpy: detected field-spanning write (size 168) of single field "&device->entry" at drivers/firmware/google/coreboot_table.c:103 (size 8) Reported-by: Paul Menzel Link: https://lore.kernel.org/all/03ae2704-8c30-f9f0-215b-7cdf4ad35a9a@molgen.mpg.de/ Cc: Jack Rosenthal Cc: Guenter Roeck Cc: Julius Werner Cc: Brian Norris Cc: Stephen Boyd Cc: Greg Kroah-Hartman Signed-off-by: Kees Cook Reviewed-by: Julius Werner Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230107031406.gonna.761-kees@kernel.org Reviewed-by: Stephen Boyd Reviewed-by: Jack Rosenthal Link: https://lore.kernel.org/r/20230112230312.give.446-kees@kernel.org drivers/firmware/google/coreboot_table.c | 9 +++++++-- drivers/firmware/google/coreboot_table.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) commit da35048f2600633a7f9ba5fa7d6e3b1d0195938b Author: Nicholas Piggin Date: Thu Jan 12 20:54:26 2023 +1000 kallsyms: Fix scheduling with interrupts disabled in self-test kallsyms_on_each* may schedule so must not be called with interrupts disabled. The iteration function could disable interrupts, but this also changes lookup_symbol() to match the change to the other timing code. Reported-by: Erhard F. Link: https://lore.kernel.org/all/bug-216902-206035@https.bugzilla.kernel.org%2F/ Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202212251728.8d0872ff-oliver.sang@intel.com Fixes: 30f3bb09778d ("kallsyms: Add self-test facility") Tested-by: "Erhard F." Signed-off-by: Nicholas Piggin Signed-off-by: Luis Chamberlain kernel/kallsyms_selftest.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit 22eebaa631c40f3dac169ba781e0de471b83bf45 Author: Peter Foley Date: Thu Jan 12 23:37:06 2023 -0500 ata: pata_cs5535: Don't build on UML This driver uses MSR functions that aren't implemented under UML. Avoid building it to prevent tripping up allyesconfig. e.g. /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: pata_cs5535.c:(.text+0x3a3): undefined reference to `__tracepoint_read_msr' /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: pata_cs5535.c:(.text+0x3d2): undefined reference to `__tracepoint_write_msr' /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: pata_cs5535.c:(.text+0x457): undefined reference to `__tracepoint_write_msr' /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: pata_cs5535.c:(.text+0x481): undefined reference to `do_trace_write_msr' /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: pata_cs5535.c:(.text+0x4d5): undefined reference to `do_trace_write_msr' /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: pata_cs5535.c:(.text+0x4f5): undefined reference to `do_trace_read_msr' /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: pata_cs5535.c:(.text+0x51c): undefined reference to `do_trace_write_msr' Signed-off-by: Peter Foley Reviewed-by: Randy Dunlap Signed-off-by: Damien Le Moal drivers/ata/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 92783a90bcbde8659dd4a160506c46c56db494d6 Merge: f5fe24ef17b5 310bc39546a4 Author: Linus Torvalds Date: Fri Jan 13 14:41:50 2023 -0600 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "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" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86/xen: Avoid deadlock by adding kvm->arch.xen.xen_lock leaf node lock KVM: Ensure lockdep knows about kvm->lock vs. vcpu->mutex ordering rule KVM: x86/xen: Fix potential deadlock in kvm_xen_update_runstate_guest() KVM: x86/xen: Fix lockdep warning on "recursive" gpc locking Documentation: kvm: fix SRCU locking order docs KVM: x86: Do not return host topology information from KVM_GET_SUPPORTED_CPUID KVM: nSVM: clarify recalc_intercepts() wrt CR8 MAINTAINERS: Remove myself as a KVM/arm64 reviewer MAINTAINERS: Add Zenghui Yu as a KVM/arm64 reviewer KVM: arm64: vgic: Add Apple M2 cpus to the list of broken SEIS implementations KVM: arm64: Convert FSC_* over to ESR_ELx_FSC_* KVM: arm64: Document the behaviour of S1PTW faults on RO memslots KVM: arm64: Fix S1PTW handling on RO memslots KVM: arm64: PMU: Fix PMCR_EL0 reset value commit f5fe24ef17b5fbe6db49534163e77499fb10ae8c Author: Mateusz Guzik Date: Fri Jan 13 19:44:47 2023 +0100 lockref: stop doing cpu_relax in the cmpxchg loop On the x86-64 architecture even a failing cmpxchg grants exclusive access to the cacheline, making it preferable to retry the failed op immediately instead of stalling with the pause instruction. To illustrate the impact, below are benchmark results obtained by running various will-it-scale tests on top of the 6.2-rc3 kernel and Cascade Lake (2 sockets * 24 cores * 2 threads) CPU. All results in ops/s. Note there is some variance in re-runs, but the code is consistently faster when contention is present. open3 ("Same file open/close"): proc stock no-pause 1 805603 814942 (+%1) 2 1054980 1054781 (-0%) 8 1544802 1822858 (+18%) 24 1191064 2199665 (+84%) 48 851582 1469860 (+72%) 96 609481 1427170 (+134%) fstat2 ("Same file fstat"): proc stock no-pause 1 3013872 3047636 (+1%) 2 4284687 4400421 (+2%) 8 3257721 5530156 (+69%) 24 2239819 5466127 (+144%) 48 1701072 5256609 (+209%) 96 1269157 6649326 (+423%) Additionally, a kernel with a private patch to help access() scalability: access2 ("Same file access"): proc stock patched patched +nopause 24 2378041 2005501 5370335 (-15% / +125%) That is, fixing the problems in access itself *reduces* scalability after the cacheline ping-pong only happens in lockref with the pause instruction. Note that fstat and access benchmarks are not currently integrated into will-it-scale, but interested parties can find them in pull requests to said project. Code at hand has a rather tortured history. First modification showed up in commit d472d9d98b46 ("lockref: Relax in cmpxchg loop"), written with Itanium in mind. Later it got patched up to use an arch-dependent macro to stop doing it on s390 where it caused a significant regression. Said macro had undergone revisions and was ultimately eliminated later, going back to cpu_relax. While I intended to only remove cpu_relax for x86-64, I got the following comment from Linus: I would actually prefer just removing it entirely and see if somebody else hollers. You have the numbers to prove it hurts on real hardware, and I don't think we have any numbers to the contrary. So I think it's better to trust the numbers and remove it as a failure, than say "let's just remove it on x86-64 and leave everybody else with the potentially broken code" Additionally, Will Deacon (maintainer of the arm64 port, one of the architectures previously benchmarked): So, from the arm64 side of the fence, I'm perfectly happy just removing the cpu_relax() calls from lockref. As such, come back full circle in history and whack it altogether. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/all/CAGudoHHx0Nqg6DE70zAVA75eV-HXfWyhVMWZ-aSeOofkA_=WdA@mail.gmail.com/ Acked-by: Tony Luck # ia64 Acked-by: Nicholas Piggin # powerpc Acked-by: Will Deacon # arm64 Acked-by: Peter Zijlstra Signed-off-by: Linus Torvalds lib/lockref.c | 1 - 1 file changed, 1 deletion(-) commit b574baa64cf84e7793fe79f4491ae36c16e65a0b Author: Richard Zhu Date: Mon Dec 19 15:12:21 2022 +0800 phy: freescale: imx8m-pcie: Add one missing error return There should be one error return when fail to fetch the perst reset. Add the missing error return. Fixes: dce9edff16ee ("phy: freescale: imx8m-pcie: Add i.MX8MP PCIe PHY support") Signed-off-by: Richard Zhu Reviewed-by: Marek Vasut Link: https://lore.kernel.org/r/1671433941-2037-1-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Vinod Koul drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd3a8cff4d4a4acb0af49dd947c822717c053cf7 Author: Bjorn Helgaas Date: Tue Jan 10 12:02:43 2023 -0600 x86/pci: Treat EfiMemoryMappedIO as reservation of ECAM space Normally we reject ECAM space unless it is reported as reserved in the E820 table or via a PNP0C02 _CRS method (PCI Firmware, r3.3, sec 4.1.2). 07eab0901ede ("efi/x86: Remove EfiMemoryMappedIO from E820 map"), removes E820 entries that correspond to EfiMemoryMappedIO regions because some other firmware uses EfiMemoryMappedIO for PCI host bridge windows, and the E820 entries prevent Linux from allocating BAR space for hot-added devices. Some firmware doesn't report ECAM space via PNP0C02 _CRS methods, but does mention it as an EfiMemoryMappedIO region via EFI GetMemoryMap(), which is normally converted to an E820 entry by a bootloader or EFI stub. After 07eab0901ede, that E820 entry is removed, so we reject this ECAM space, which makes PCI extended config space (offsets 0x100-0xfff) inaccessible. The lack of extended config space breaks anything that relies on it, including perf, VSEC telemetry, EDAC, QAT, SR-IOV, etc. Allow use of ECAM for extended config space when the region is covered by an EfiMemoryMappedIO region, even if it's not included in E820 or PNP0C02 _CRS. Link: https://lore.kernel.org/r/ac2693d8-8ba3-72e0-5b66-b3ae008d539d@linux.intel.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=216891 Fixes: 07eab0901ede ("efi/x86: Remove EfiMemoryMappedIO from E820 map") Link: https://lore.kernel.org/r/20230110180243.1590045-3-helgaas@kernel.org Reported-by: Kan Liang Reported-by: Tony Luck Reported-by: Giovanni Cabiddu Reported-by: Yunying Sun Reported-by: Baowen Zheng Reported-by: Zhenzhong Duan Reported-by: Yang Lixiao Tested-by: Tony Luck Tested-by: Giovanni Cabiddu Tested-by: Kan Liang Tested-by: Yunying Sun Signed-off-by: Bjorn Helgaas Reviewed-by: Dan Williams Reviewed-by: Rafael J. Wysocki arch/x86/pci/mmconfig-shared.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit d60c471a8670635b65b3d67b6e7aaa263d191cc3 Author: Marijn Suijten Date: Wed Dec 14 23:37:32 2022 +0100 phy: Revert "phy: qualcomm: usb28nm: Add MDM9607 init sequence" This reverts commit 557a28811c7e0286d3816842032db5eb7bb5f156. This commit introduced an init sequence from downstream DT [1] in the driver. As mentioned by the comment above the HSPHY_INIT_CFG macro for this sequence: /* * The macro is used to define an initialization sequence. Each tuple * is meant to program 'value' into phy register at 'offset' with 'delay' * in us followed. */ Instead of corresponding to offsets into the phy register, the sequence read by the downstream driver [2] is passed into ulpi_write [3] which crafts the address-value pair into a new value and writes it into the same register at USB_ULPI_VIEWPORT [4]. In other words, this init sequence is programmed into the hardware in a totally different way than downstream and is unlikely to achieve the desired result, if the hsphy is working at all. An alternative method needs to be found to write these init values at the desired location. Fortunately mdm9607 did not land upstream yet [5] and should have its compatible revised to use the generic one, instead of a compatible that writes wrong data to the wrong registers. [1]: https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/arch/arm/boot/dts/qcom/mdm9607.dtsi#585 [2]: https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/drivers/usb/phy/phy-msm-usb.c#4183 [3]: https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/drivers/usb/phy/phy-msm-usb.c#468 [4]: https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/drivers/usb/phy/phy-msm-usb.c#418 [5]: https://lore.kernel.org/linux-arm-msm/20210805222812.40731-1-konrad.dybcio@somainline.org/ Reported-by: Michael Srba Signed-off-by: Marijn Suijten Reviewed-by: Stephan Gerhold Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20221214223733.648167-1-marijn.suijten@somainline.org Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/qcom,usb-hs-28nm.yaml | 1 - drivers/phy/qualcomm/phy-qcom-usb-hs-28nm.c | 13 ------------- 2 files changed, 14 deletions(-) commit 5daba914da0e48950e9407ea4d75fa57029c9adc Author: Shang XiaoJing Date: Mon Dec 5 19:58:23 2022 +0800 phy: rockchip-inno-usb2: Fix missing clk_disable_unprepare() in rockchip_usb2phy_power_on() The clk_disable_unprepare() should be called in the error handling of rockchip_usb2phy_power_on(). Fixes: 0e08d2a727e6 ("phy: rockchip-inno-usb2: add a new driver for Rockchip usb2phy") Signed-off-by: Shang XiaoJing Link: https://lore.kernel.org/r/20221205115823.16957-1-shangxiaojing@huawei.com Signed-off-by: Vinod Koul drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 83a7f8e4899fb4cd77c787a3373f3e82b49a080f Author: Maxime Ripard Date: Fri Jan 13 16:46:37 2023 +0100 drm/vc4: bo: Fix unused variable warning Commit 07a2975c65f2 ("drm/vc4: bo: Fix drmm_mutex_init memory hog") removed the only use of the ret variable, but didn't remove the variable itself leading to a unused variable warning. Remove that variable. Reported-by: Stephen Rothwell Fixes: 07a2975c65f2 ("drm/vc4: bo: Fix drmm_mutex_init memory hog") Reviewed-by: Maíra Canal Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230113154637.1704116-1-maxime@cerno.tech drivers/gpu/drm/vc4/vc4_bo.c | 1 - 1 file changed, 1 deletion(-) commit 0bf913e07b377cfc288cfe488ca30b7d67059d8a Merge: 40d92fc4fa81 d3f450533bbc Author: Linus Torvalds Date: Fri Jan 13 10:37:10 2023 -0600 Merge tag 'efi-fixes-for-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: - avoid a potential crash on the efi_subsys_init() error path - use more appropriate error code for runtime services calls issued after a crash in the firmware occurred - avoid READ_ONCE() for accessing firmware tables that may appear misaligned in memory * tag 'efi-fixes-for-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: tpm: Avoid READ_ONCE() for accessing the event log efi: rt-wrapper: Add missing include efi: fix userspace infinite retry read efivars after EFI runtime services page fault efi: fix NULL-deref in init error path commit 40d92fc4fa81a93b4659b98512dcb9d0ccd94cfd Merge: 689968db7b61 a33ae832bf3f Author: Linus Torvalds Date: Fri Jan 13 10:35:26 2023 -0600 Merge tag 'docs-6.2-fixes' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "Three documentation fixes (or rather two and one warning): - Sphinx 6.0 broke our configuration mechanism, so fix it - I broke our configuration for non-Alabaster themes; Akira fixed it - Deprecate Sphinx < 2.4 with an eye toward future removal" * tag 'docs-6.2-fixes' of git://git.lwn.net/linux: docs/conf.py: Use about.html only in sidebar of alabaster theme docs: Deprecate use of Sphinx < 2.4.x docs: Fix the docs build with Sphinx 6.0 commit e4f4db47794c9f474b184ee1418f42e6a07412b6 Author: Luis Gerhorst Date: Mon Jan 9 16:05:46 2023 +0100 bpf: Fix pointer-leak due to insufficient speculative store bypass mitigation To mitigate Spectre v4, 2039f26f3aca ("bpf: Fix leakage due to insufficient speculative store bypass mitigation") inserts lfence instructions after 1) initializing a stack slot and 2) spilling a pointer to the stack. However, this does not cover cases where a stack slot is first initialized with a pointer (subject to sanitization) but then overwritten with a scalar (not subject to sanitization because the slot was already initialized). In this case, the second write may be subject to speculative store bypass (SSB) creating a speculative pointer-as-scalar type confusion. This allows the program to subsequently leak the numerical pointer value using, for example, a branch-based cache side channel. To fix this, also sanitize scalars if they write a stack slot that previously contained a pointer. Assuming that pointer-spills are only generated by LLVM on register-pressure, the performance impact on most real-world BPF programs should be small. The following unprivileged BPF bytecode drafts a minimal exploit and the mitigation: [...] // r6 = 0 or 1 (skalar, unknown user input) // r7 = accessible ptr for side channel // r10 = frame pointer (fp), to be leaked // r9 = r10 # fp alias to encourage ssb *(u64 *)(r9 - 8) = r10 // fp[-8] = ptr, to be leaked // lfence added here because of pointer spill to stack. // // Ommitted: Dummy bpf_ringbuf_output() here to train alias predictor // for no r9-r10 dependency. // *(u64 *)(r10 - 8) = r6 // fp[-8] = scalar, overwrites ptr // 2039f26f3aca: no lfence added because stack slot was not STACK_INVALID, // store may be subject to SSB // // fix: also add an lfence when the slot contained a ptr // r8 = *(u64 *)(r9 - 8) // r8 = architecturally a scalar, speculatively a ptr // // leak ptr using branch-based cache side channel: r8 &= 1 // choose bit to leak if r8 == 0 goto SLOW // no mispredict // architecturally dead code if input r6 is 0, // only executes speculatively iff ptr bit is 1 r8 = *(u64 *)(r7 + 0) # encode bit in cache (0: slow, 1: fast) SLOW: [...] After running this, the program can time the access to *(r7 + 0) to determine whether the chosen pointer bit was 0 or 1. Repeat this 64 times to recover the whole address on amd64. In summary, sanitization can only be skipped if one scalar is overwritten with another scalar. Scalar-confusion due to speculative store bypass can not lead to invalid accesses because the pointer bounds deducted during verification are enforced using branchless logic. See 979d63d50c0c ("bpf: prevent out of bounds speculation on pointer arithmetic") for details. Do not make the mitigation depend on !env->allow_{uninit_stack,ptr_leaks} because speculative leaks are likely unexpected if these were enabled. For example, leaking the address to a protected log file may be acceptable while disabling the mitigation might unintentionally leak the address into the cached-state of a map that is accessible to unprivileged processes. Fixes: 2039f26f3aca ("bpf: Fix leakage due to insufficient speculative store bypass mitigation") Signed-off-by: Luis Gerhorst Signed-off-by: Daniel Borkmann Acked-by: Henriette Hofmeier Link: https://lore.kernel.org/bpf/edc95bad-aada-9cfc-ffe2-fa9bb206583c@cs.fau.de Link: https://lore.kernel.org/bpf/20230109150544.41465-1-gerhorst@cs.fau.de kernel/bpf/verifier.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d3f450533bbcb6dd4d7d59cadc9b61b7321e4ac1 Author: Ard Biesheuvel Date: Mon Jan 9 10:44:31 2023 +0100 efi: tpm: Avoid READ_ONCE() for accessing the event log Nathan reports that recent kernels built with LTO will crash when doing EFI boot using Fedora's GRUB and SHIM. The culprit turns out to be a misaligned load from the TPM event log, which is annotated with READ_ONCE(), and under LTO, this gets translated into a LDAR instruction which does not tolerate misaligned accesses. Interestingly, this does not happen when booting the same kernel straight from the UEFI shell, and so the fact that the event log may appear misaligned in memory may be caused by a bug in GRUB or SHIM. However, using READ_ONCE() to access firmware tables is slightly unusual in any case, and here, we only need to ensure that 'event' is not dereferenced again after it gets unmapped, but this is already taken care of by the implicit barrier() semantics of the early_memunmap() call. Cc: Cc: Peter Jones Cc: Jarkko Sakkinen Cc: Matthew Garrett Reported-by: Nathan Chancellor Tested-by: Nathan Chancellor Link: https://github.com/ClangBuiltLinux/linux/issues/1782 Signed-off-by: Ard Biesheuvel include/linux/tpm_eventlog.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 544d163d659d45a206d8929370d5a2984e546cb7 Author: Pavel Begunkov Date: Thu Jan 12 13:08:56 2023 +0000 io_uring: lock overflowing for IOPOLL syzbot reports an issue with overflow filling for IOPOLL: WARNING: CPU: 0 PID: 28 at io_uring/io_uring.c:734 io_cqring_event_overflow+0x1c0/0x230 io_uring/io_uring.c:734 CPU: 0 PID: 28 Comm: kworker/u4:1 Not tainted 6.2.0-rc3-syzkaller-16369-g358a161a6a9e #0 Workqueue: events_unbound io_ring_exit_work Call trace:  io_cqring_event_overflow+0x1c0/0x230 io_uring/io_uring.c:734  io_req_cqe_overflow+0x5c/0x70 io_uring/io_uring.c:773  io_fill_cqe_req io_uring/io_uring.h:168 [inline]  io_do_iopoll+0x474/0x62c io_uring/rw.c:1065  io_iopoll_try_reap_events+0x6c/0x108 io_uring/io_uring.c:1513  io_uring_try_cancel_requests+0x13c/0x258 io_uring/io_uring.c:3056  io_ring_exit_work+0xec/0x390 io_uring/io_uring.c:2869  process_one_work+0x2d8/0x504 kernel/workqueue.c:2289  worker_thread+0x340/0x610 kernel/workqueue.c:2436  kthread+0x12c/0x158 kernel/kthread.c:376  ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:863 There is no real problem for normal IOPOLL as flush is also called with uring_lock taken, but it's getting more complicated for IOPOLL|SQPOLL, for which __io_cqring_overflow_flush() happens from the CQ waiting path. Reported-and-tested-by: syzbot+6805087452d72929404e@syzkaller.appspotmail.com Cc: stable@vger.kernel.org # 5.10+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe io_uring/rw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 689968db7b6145b2e4beb8b472d31162ffa5ad7d Merge: d863f0539b52 56b88b50565c Author: Linus Torvalds Date: Fri Jan 13 08:20:29 2023 -0600 Merge tag 'sound-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This became a slightly big update, but it's more or less expected, as the first batch after holidays. All changes (but for the last two last-minute fixes) have been stewed in linux-next long enough, so it's fairly safe to take: - PCM UAF fix in 32bit compat layer - ASoC board-specific fixes for Intel, AMD, Medathek, Qualcomm - SOF power management fixes - ASoC Intel link failure fixes - A series of fixes for USB-audio regressions - CS35L41 HD-audio codec regression fixes - HD-audio device-specific fixes / quirks Note that one SPI patch has been taken in ASoC subtree mistakenly, and the same fix is found in spi tree, but it should be OK to apply" * tag 'sound-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (39 commits) ALSA: pcm: Move rwsem lock inside snd_ctl_elem_read to prevent UAF ALSA: usb-audio: Fix possible NULL pointer dereference in snd_usb_pcm_has_fixed_rate() ALSA: hda/realtek: Enable mute/micmute LEDs on HP Spectre x360 13-aw0xxx ASoC: fsl-asoc-card: Fix naming of AC'97 CODEC widgets ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC ALSA: hda/hdmi: Add a HP device 0x8715 to force connect list ALSA: control-led: use strscpy in set_led_id() ALSA: usb-audio: Always initialize fixed_rate in snd_usb_find_implicit_fb_sync_format() ASoC: dt-bindings: qcom,lpass-tx-macro: correct clocks on SC7280 ASoC: dt-bindings: qcom,lpass-wsa-macro: correct clocks on SM8250 ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE ALSA: hda: cs35l41: Check runtime suspend capability at runtime_idle ALSA: hda: cs35l41: Don't return -EINVAL from system suspend/resume ASoC: fsl_micfil: Correct the number of steps on SX controls ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform Revert "ALSA: usb-audio: Drop superfluous interface setup at parsing" ALSA: usb-audio: More refactoring of hw constraint rules ALSA: usb-audio: Relax hw constraints for implicit fb sync ALSA: usb-audio: Make sure to stop endpoints before closing EPs ALSA: hda - Enable headset mic on another Dell laptop with ALC3254 ... commit fa17087e244263627a01d6a9b76b8fdaf410de34 Author: Tetsuo Handa Date: Fri Jan 13 23:11:38 2023 +0900 tomoyo: Update website link SourceForge.JP was renamed to OSDN in May 2015. Signed-off-by: Tetsuo Handa security/tomoyo/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ed8a46256771de283772d482403691807214cf7 Author: Paul E. McKenney Date: Fri Jan 13 23:08:04 2023 +0900 tomoyo: 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: Tetsuo Handa security/tomoyo/Kconfig | 1 - 1 file changed, 1 deletion(-) commit d863f0539b525ba714f85c15ea961b225a15dd21 Merge: cdbbca256cf3 4f3085f87b51 Author: Linus Torvalds Date: Fri Jan 13 07:38:14 2023 -0600 Merge tag 'pm-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix assorted issues in the ARM cpufreq drivers and in the AMD P-state driver. Specifics: - Fix cpufreq policy reference counting in amd-pstate to prevent it from crashing on removal (Perry Yuan) - Fix double initialization and set suspend-freq for Apple's cpufreq driver (Arnd Bergmann, Hector Martin) - Fix reading of "reg" property, update cpufreq-dt's blocklist and update DT documentation for Qualcomm's cpufreq driver (Konrad Dybcio, Krzysztof Kozlowski) - Replace 0 with NULL in the Armada cpufreq driver (Miles Chen) - Fix potential overflows in the CPPC cpufreq driver (Pierre Gondois) - Update blocklist for the Tegra234 Soc cpufreq driver (Sumit Gupta)" * tag 'pm-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: amd-pstate: fix kernel hang issue while amd-pstate unregistering cpufreq: armada-37xx: stop using 0 as NULL pointer cpufreq: apple-soc: Switch to the lowest frequency on suspend dt-bindings: cpufreq: cpufreq-qcom-hw: document interrupts cpufreq: Add SM6375 to cpufreq-dt-platdev blocklist cpufreq: Add Tegra234 to cpufreq-dt-platdev blocklist cpufreq: qcom-hw: Fix reading "reg" with address/size-cells != 2 cpufreq: CPPC: Add u64 casts to avoid overflowing cpufreq: apple: remove duplicate intializer commit cdbbca256cf3f8b1f3f37a7102b54bf99f2fa656 Merge: 0d0833e0399e df3a71aba40f Author: Linus Torvalds Date: Fri Jan 13 07:32:55 2023 -0600 Merge tag 'acpi-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These add one more ACPI IRQ override quirk, improve ACPI companion lookup for backlight devices and add missing kernel command line option values for backlight detection. Specifics: - Improve ACPI companion lookup for backlight devices in the cases when there is more than one candidate ACPI device object (Hans de Goede) - Add missing support for manual selection of NVidia-WMI-EC or Apple GMUX backlight in the kernel command line to the ACPI backlight driver (Hans de Goede) - Skip ACPI IRQ override on Asus Expertbook B2402CBA (Tamim Khan)" * tag 'acpi-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: Fix selecting wrong ACPI fwnode for the iGPU on some Dell laptops ACPI: video: Allow selecting NVidia-WMI-EC or Apple GMUX backlight from the cmdline ACPI: resource: Skip IRQ override on Asus Expertbook B2402CBA commit 0d0833e0399efecf3d75b54c3bc277660166d9a4 Merge: ff5ebafd51ec fde5f74ccfc7 Author: Linus Torvalds Date: Fri Jan 13 07:26:40 2023 -0600 Merge tag 'platform-drivers-x86-v6.2-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 set of assorted fixes and hardware-id additions" * tag 'platform-drivers-x86-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: thinkpad_acpi: Fix profile mode display in AMT mode platform/x86: int3472/discrete: Ensure the clk/power enable pins are in output mode platform/x86/amd: Fix refcount leak in amd_pmc_probe platform/x86: intel/pmc/core: Add Meteor Lake mobile support platform/x86: simatic-ipc: add another model platform/x86: simatic-ipc: correct name of a model platform/x86: dell-privacy: Only register SW_CAMERA_LENS_COVER if present platform/x86: dell-privacy: Fix SW_CAMERA_LENS_COVER reporting platform/x86: asus-wmi: Don't load fan curves without fan platform/x86: asus-wmi: Ignore fan on E410MA platform/x86: asus-wmi: Add quirk wmi_ignore_fan platform/x86: asus-nb-wmi: Add alternate mapping for KEY_SCREENLOCK platform/x86: asus-nb-wmi: Add alternate mapping for KEY_CAMERA platform/surface: aggregator: Add missing call to ssam_request_sync_free() platform/surface: aggregator: Ignore command messages not intended for us platform/x86: touchscreen_dmi: Add info for the CSL Panther Tab HD platform/x86: ideapad-laptop: Add Legion 5 15ARH05 DMI id to set_fn_lock_led_list[] platform/x86: sony-laptop: Don't turn off 0x153 keyboard backlight during probe commit ff5ebafd51ecc01014f1db510299eede60faf22a Merge: d45b832d6f41 e695bc7e5423 Author: Linus Torvalds Date: Fri Jan 13 07:18:59 2023 -0600 Merge tag 'drm-fixes-2023-01-13' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "There is a bit of a post-holiday build up here I expect, small fixes across the board, amdgpu and msm being the main leaders, with others having a few. One code removal patch for nouveau: buddy: - benchmark regression fix for top-down buddy allocation panel: - add Lenovo panel orientation quirk ttm: - fix kernel oops regression amdgpu: - fix missing fence references - fix missing pipeline sync fencing - SMU13 fan speed fix - SMU13 fix power cap handling - SMU13 BACO fix - Fix a possible segfault in bo validation error case - Delay removal of firmware framebuffer - Fix error when unloading amdkfd: - SVM fix when clearing vram - GC11 fix for multi-GPU i915: - Reserve enough fence slot for i915_vma_unbind_vsync - Fix potential use after free - Reset engines twice in case of reset failure - Use multi-cast registers for SVG Unit registers msm: - display: - doc warning fixes - dt attribs cleanups - memory leak fix - error handing in hdmi probe fix - dp_aux_isr incorrect signalling fix - shutdown path fix - accel: - a5xx: fix quirks to be a bitmask - a6xx: fix gx halt to avoid 1s hang - kexec shutdown fix - fix potential double free vmwgfx: - drop rcu usage to make code more robust virtio: - fix use-after-free in gem handle code nouveau: - drop unused nouveau_fbcon.c" * tag 'drm-fixes-2023-01-13' of git://anongit.freedesktop.org/drm/drm: (35 commits) drm: Optimize drm buddy top-down allocation method drm/ttm: Fix a regression causing kernel oops'es drm/i915/gt: Cover rest of SVG unit MCR registers drm/nouveau: Remove file nouveau_fbcon.c drm/amdkfd: Fix NULL pointer error for GC 11.0.1 on mGPU drm/amd/pm/smu13: BACO is supported when it's in BACO state drm/amdkfd: Add sync after creating vram bo drm/i915/gt: Reset twice drm/amdgpu: fix pipeline sync v2 drm/vmwgfx: Remove rcu locks from user resources drm/virtio: Fix GEM handle creation UAF drm/amdgpu: Fixed bug on error when unloading amdgpu drm/amd: Delay removal of the firmware framebuffer drm/amdgpu: Fix potential NULL dereference drm/i915: Fix potential context UAFs drm/i915: Reserve enough fence slot for i915_vma_unbind_async drm: Add orientation quirk for Lenovo ideapad D330-10IGL drm/msm/a6xx: Avoid gx gbit halt during rpm suspend drm/msm/adreno: Make adreno quirks not overwrite each other drm/msm: another fix for the headless Adreno GPU ... commit 56b88b50565cd8b946a2d00b0c83927b7ebb055e Author: Clement Lecigne Date: Fri Jan 13 13:07:45 2023 +0100 ALSA: pcm: Move rwsem lock inside snd_ctl_elem_read to prevent UAF Takes rwsem lock inside snd_ctl_elem_read instead of snd_ctl_elem_read_user like it was done for write in commit 1fa4445f9adf1 ("ALSA: control - introduce snd_ctl_notify_one() helper"). Doing this way we are also fixing the following locking issue happening in the compat path which can be easily triggered and turned into an use-after-free. 64-bits: snd_ctl_ioctl snd_ctl_elem_read_user [takes controls_rwsem] snd_ctl_elem_read [lock properly held, all good] [drops controls_rwsem] 32-bits: snd_ctl_ioctl_compat snd_ctl_elem_write_read_compat ctl_elem_write_read snd_ctl_elem_read [missing lock, not good] CVE-2023-0266 was assigned for this issue. Cc: stable@kernel.org # 5.13+ Signed-off-by: Clement Lecigne Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230113120745.25464-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/control.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit d45b832d6f41b003c1dee953096cfd4c6e5233b0 Merge: d9fc1511728c 68a63a412d18 Author: Linus Torvalds Date: Fri Jan 13 07:11:45 2023 -0600 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Here's a sizeable batch of Friday the 13th arm64 fixes for -rc4. What could possibly go wrong? The obvious reason we have so much here is because of the holiday season right after the merge window, but we've also brought back an erratum workaround that was previously dropped at the last minute and there's an MTE coredumping fix that strays outside of the arch/arm64 directory. Summary: - Fix PAGE_TABLE_CHECK failures on hugepage splitting path - Fix PSCI encoding of MEM_PROTECT_RANGE function in UAPI header - Fix NULL deref when accessing debugfs node if PSCI is not present - Fix MTE core dumping when VMA list is being updated concurrently - Fix SME signal frame handling when SVE is not implemented by the CPU - Fix asm constraints for cmpxchg_double() to hazard both words - Fix build failure with stack tracer and older versions of Clang - Bring back workaround for Cortex-A715 erratum 2645198" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y arm64/mm: Define dummy pud_user_exec() when using 2-level page-table arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption firmware/psci: Don't register with debugfs if PSCI isn't available firmware/psci: Fix MEM_PROTECT_RANGE function numbers arm64/signal: Always allocate SVE signal frames on SME only systems arm64/signal: Always accept SVE signal frames on SME only systems arm64/sme: Fix context switch for SME only systems arm64: cmpxchg_double*: hazard against entire exchange variable arm64/uprobes: change the uprobe_opcode_t typedef to fix the sparse warning arm64: mte: Avoid the racy walk of the vma list during core dump elfcore: Add a cprm parameter to elf_core_extra_{phdrs,data_size} arm64: mte: Fix double-freeing of the temporary tag storage during coredump arm64: ptrace: Use ARM64_SME to guard the SME register enumerations arm64/mm: add pud_user_exec() check in pud_user_accessible_page() arm64/mm: fix incorrect file_map_count for invalid pmd commit 142e821f68cf5da79ce722cb9c1323afae30e185 Author: Christophe JAILLET Date: Mon Dec 19 19:06:22 2022 +0100 iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe() A clk, prepared and enabled in mtk_iommu_v1_hw_init(), is not released in the error handling path of mtk_iommu_v1_probe(). Add the corresponding clk_disable_unprepare(), as already done in the remove function. Fixes: b17336c55d89 ("iommu/mediatek: add support for mtk iommu generation one HW") Signed-off-by: Christophe JAILLET Reviewed-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/593e7b7d97c6e064b29716b091a9d4fd122241fb.1671473163.git.christophe.jaillet@wanadoo.fr Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu_v1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dcdb3ba7e2a8caae7bfefd603bc22fd0ce9a389c Author: Yunfei Wang Date: Wed Jan 11 14:38:00 2023 +0800 iommu/iova: Fix alloc iova overflows issue In __alloc_and_insert_iova_range, there is an issue that retry_pfn overflows. The value of iovad->anchor.pfn_hi is ~0UL, then when iovad->cached_node is iovad->anchor, curr_iova->pfn_hi + 1 will overflow. As a result, if the retry logic is executed, low_pfn is updated to 0, and then new_pfn < low_pfn returns false to make the allocation successful. This issue occurs in the following two situations: 1. The first iova size exceeds the domain size. When initializing iova domain, iovad->cached_node is assigned as iovad->anchor. For example, the iova domain size is 10M, start_pfn is 0x1_F000_0000, and the iova size allocated for the first time is 11M. The following is the log information, new->pfn_lo is smaller than iovad->cached_node. Example log as follows: [ 223.798112][T1705487] sh: [name:iova&]__alloc_and_insert_iova_range start_pfn:0x1f0000,retry_pfn:0x0,size:0xb00,limit_pfn:0x1f0a00 [ 223.799590][T1705487] sh: [name:iova&]__alloc_and_insert_iova_range success start_pfn:0x1f0000,new->pfn_lo:0x1efe00,new->pfn_hi:0x1f08ff 2. The node with the largest iova->pfn_lo value in the iova domain is deleted, iovad->cached_node will be updated to iovad->anchor, and then the alloc iova size exceeds the maximum iova size that can be allocated in the domain. After judging that retry_pfn is less than limit_pfn, call retry_pfn+1 to fix the overflow issue. Signed-off-by: jianjiao zeng Signed-off-by: Yunfei Wang Cc: # 5.15.* Fixes: 4e89dce72521 ("iommu/iova: Retry from last rb tree node if iova search fails") Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20230111063801.25107-1-yf.wang@mediatek.com Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6a9a5da68084d5eac6ef85ad09df7fc9c971de4 Author: Miaoqian Lin Date: Fri Dec 30 12:31:00 2022 +0400 iommu: Fix refcount leak in iommu_device_claim_dma_owner iommu_group_get() returns the group with the reference incremented. Move iommu_group_get() after owner check to fix the refcount leak. Fixes: 89395ccedbc1 ("iommu: Add device-centric DMA ownership interfaces") Signed-off-by: Miaoqian Lin Reviewed-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221230083100.1489569-1-linmq006@gmail.com [ joro: Remove *group = NULL initialization ] Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 32ea2c57dc216b6ad8125fa680d31daa5d421c95 Author: Vladimir Oltean Date: Thu Dec 15 16:12:51 2022 +0200 iommu/arm-smmu-v3: Don't unregister on shutdown Similar to SMMUv2, this driver calls iommu_device_unregister() from the shutdown path, which removes the IOMMU groups with no coordination whatsoever with their users - shutdown methods are optional in device drivers. This can lead to NULL pointer dereferences in those drivers' DMA API calls, or worse. Instead of calling the full arm_smmu_device_remove() from arm_smmu_device_shutdown(), let's pick only the relevant function call - arm_smmu_device_disable() - more or less the reverse of arm_smmu_device_reset() - and call just that from the shutdown path. Fixes: 57365a04c921 ("iommu: Move bus setup to IOMMU device registration") Suggested-by: Robin Murphy Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20221215141251.3688780-2-vladimir.oltean@nxp.com Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ce31e6ca68bd7639bd3e5ef97be215031842bbab Author: Vladimir Oltean Date: Thu Dec 15 16:12:50 2022 +0200 iommu/arm-smmu: Don't unregister on shutdown Michael Walle says he noticed the following stack trace while performing a shutdown with "reboot -f". He suggests he got "lucky" and just hit the correct spot for the reboot while there was a packet transmission in flight. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000098 CPU: 0 PID: 23 Comm: kworker/0:1 Not tainted 6.1.0-rc5-00088-gf3600ff8e322 #1930 Hardware name: Kontron KBox A-230-LS (DT) pc : iommu_get_dma_domain+0x14/0x20 lr : iommu_dma_map_page+0x9c/0x254 Call trace: iommu_get_dma_domain+0x14/0x20 dma_map_page_attrs+0x1ec/0x250 enetc_start_xmit+0x14c/0x10b0 enetc_xmit+0x60/0xdc dev_hard_start_xmit+0xb8/0x210 sch_direct_xmit+0x11c/0x420 __dev_queue_xmit+0x354/0xb20 ip6_finish_output2+0x280/0x5b0 __ip6_finish_output+0x15c/0x270 ip6_output+0x78/0x15c NF_HOOK.constprop.0+0x50/0xd0 mld_sendpack+0x1bc/0x320 mld_ifc_work+0x1d8/0x4dc process_one_work+0x1e8/0x460 worker_thread+0x178/0x534 kthread+0xe0/0xe4 ret_from_fork+0x10/0x20 Code: d503201f f9416800 d503233f d50323bf (f9404c00) ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Oops: Fatal exception in interrupt This appears to be reproducible when the board has a fixed IP address, is ping flooded from another host, and "reboot -f" is used. The following is one more manifestation of the issue: $ reboot -f kvm: exiting hardware virtualization cfg80211: failed to load regulatory.db arm-smmu 5000000.iommu: disabling translation sdhci-esdhc 2140000.mmc: Removing from iommu group 11 sdhci-esdhc 2150000.mmc: Removing from iommu group 12 fsl-edma 22c0000.dma-controller: Removing from iommu group 17 dwc3 3100000.usb: Removing from iommu group 9 dwc3 3110000.usb: Removing from iommu group 10 ahci-qoriq 3200000.sata: Removing from iommu group 2 fsl-qdma 8380000.dma-controller: Removing from iommu group 20 platform f080000.display: Removing from iommu group 0 etnaviv-gpu f0c0000.gpu: Removing from iommu group 1 etnaviv etnaviv: Removing from iommu group 1 caam_jr 8010000.jr: Removing from iommu group 13 caam_jr 8020000.jr: Removing from iommu group 14 caam_jr 8030000.jr: Removing from iommu group 15 caam_jr 8040000.jr: Removing from iommu group 16 fsl_enetc 0000:00:00.0: Removing from iommu group 4 arm-smmu 5000000.iommu: Blocked unknown Stream ID 0x429; boot with "arm-smmu.disable_bypass=0" to allow, but this may have security implications arm-smmu 5000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000002, GFSYNR1 0x00000429, GFSYNR2 0x00000000 fsl_enetc 0000:00:00.1: Removing from iommu group 5 arm-smmu 5000000.iommu: Blocked unknown Stream ID 0x429; boot with "arm-smmu.disable_bypass=0" to allow, but this may have security implications arm-smmu 5000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000002, GFSYNR1 0x00000429, GFSYNR2 0x00000000 arm-smmu 5000000.iommu: Blocked unknown Stream ID 0x429; boot with "arm-smmu.disable_bypass=0" to allow, but this may have security implications arm-smmu 5000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000000, GFSYNR1 0x00000429, GFSYNR2 0x00000000 fsl_enetc 0000:00:00.2: Removing from iommu group 6 fsl_enetc_mdio 0000:00:00.3: Removing from iommu group 8 mscc_felix 0000:00:00.5: Removing from iommu group 3 fsl_enetc 0000:00:00.6: Removing from iommu group 7 pcieport 0001:00:00.0: Removing from iommu group 18 arm-smmu 5000000.iommu: Blocked unknown Stream ID 0x429; boot with "arm-smmu.disable_bypass=0" to allow, but this may have security implications arm-smmu 5000000.iommu: GFSR 0x00000002, GFSYNR0 0x00000000, GFSYNR1 0x00000429, GFSYNR2 0x00000000 pcieport 0002:00:00.0: Removing from iommu group 19 Unable to handle kernel NULL pointer dereference at virtual address 00000000000000a8 pc : iommu_get_dma_domain+0x14/0x20 lr : iommu_dma_unmap_page+0x38/0xe0 Call trace: iommu_get_dma_domain+0x14/0x20 dma_unmap_page_attrs+0x38/0x1d0 enetc_unmap_tx_buff.isra.0+0x6c/0x80 enetc_poll+0x170/0x910 __napi_poll+0x40/0x1e0 net_rx_action+0x164/0x37c __do_softirq+0x128/0x368 run_ksoftirqd+0x68/0x90 smpboot_thread_fn+0x14c/0x190 Code: d503201f f9416800 d503233f d50323bf (f9405400) ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Oops: Fatal exception in interrupt ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]--- The problem seems to be that iommu_group_remove_device() is allowed to run with no coordination whatsoever with the shutdown procedure of the enetc PCI device. In fact, it almost seems as if it implies that the pci_driver :: shutdown() method is mandatory if DMA is used with an IOMMU, otherwise this is inevitable. That was never the case; shutdown methods are optional in device drivers. This is the call stack that leads to iommu_group_remove_device() during reboot: kernel_restart -> device_shutdown -> platform_shutdown -> arm_smmu_device_shutdown -> arm_smmu_device_remove -> iommu_device_unregister -> bus_for_each_dev -> remove_iommu_group -> iommu_release_device -> iommu_group_remove_device I don't know much about the arm_smmu driver, but arm_smmu_device_shutdown() invoking arm_smmu_device_remove() looks suspicious, since it causes the IOMMU device to unregister and that's where everything starts to unravel. It forces all other devices which depend on IOMMU groups to also point their ->shutdown() to ->remove(), which will make reboot slower overall. There are 2 moments relevant to this behavior. First was commit b06c076ea962 ("Revert "iommu/arm-smmu: Make arm-smmu explicitly non-modular"") when arm_smmu_device_shutdown() was made to run the exact same thing as arm_smmu_device_remove(). Prior to that, there was no iommu_device_unregister() call in arm_smmu_device_shutdown(). However, that was benign until commit 57365a04c921 ("iommu: Move bus setup to IOMMU device registration"), which made iommu_device_unregister() call remove_iommu_group(). Restore the old shutdown behavior by making remove() call shutdown(), but shutdown() does not call the remove() specific bits. Fixes: 57365a04c921 ("iommu: Move bus setup to IOMMU device registration") Reported-by: Michael Walle Tested-by: Michael Walle # on kontron-sl28 Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20221215141251.3688780-1-vladimir.oltean@nxp.com Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit ac9c5e92dd15b9927e7355ccf79df76a58b44344 Author: Robin Murphy Date: Thu Dec 15 16:51:55 2022 +0000 iommu/arm-smmu: Report IOMMU_CAP_CACHE_COHERENCY even betterer Although it's vanishingly unlikely that anyone would integrate an SMMU within a coherent interconnect without also making the pagetable walk interface coherent, the same effect happens if a coherent SMMU fails to advertise CTTW correctly. This turns out to be the case on some popular NXP SoCs, where VFIO started failing the IOMMU_CAP_CACHE_COHERENCY test, even though IOMMU_CACHE *was* previously achieving the desired effect anyway thanks to the underlying integration. While those SoCs stand to gain some more general benefits from a firmware update to override CTTW correctly in DT/ACPI, it's also easy to work around this in Linux as well, to avoid imposing too much on affected users - since the upstream client devices *are* correctly marked as coherent, we can trivially infer their coherent paths through the SMMU as well. Reported-by: Vladimir Oltean Fixes: df198b37e72c ("iommu/arm-smmu: Report IOMMU_CAP_CACHE_COHERENCY better") Signed-off-by: Robin Murphy Tested-by: Vladimir Oltean Link: https://lore.kernel.org/r/d6dc41952961e5c7b21acac08a8bf1eb0f69e124.1671123115.git.robin.murphy@arm.com Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit f89d783d68dcc6b2ce4fe3bda972ae0f84df0dca Author: Amadeusz Sławiński Date: Fri Jan 13 20:03:08 2023 +0100 ASoC: Intel: avs: Implement PCI shutdown On shutdown reference to i915 driver needs to be released to not spam logs with unnecessary warnings. While at it do some additional cleanup to make sure DSP is powered down and interrupts from device are disabled. Fixes: 1affc44ea5dd ("ASoC: Intel: avs: PCI driver implementation") Reported-by: Kornel Dulęba Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20230113190310.1451693-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/core.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit fde5f74ccfc771941b018b5415fa9664426e10ad Author: Mark Pearson Date: Thu Jan 12 17:12:28 2023 -0500 platform/x86: thinkpad_acpi: Fix profile mode display in AMT mode Recently AMT mode was enabled (somewhat unexpectedly) on the Lenovo Z13 platform. The FW is advertising it is available and the driver tries to use it - unfortunately it reports the profile mode incorrectly. Note, there is also some extra work needed to enable the dynamic aspect of AMT support that I will be following up with; but more testing is needed first. This patch just fixes things so the profiles are reported correctly. Link: https://gitlab.freedesktop.org/hadess/power-profiles-daemon/-/issues/115 Fixes: 46dcbc61b739 ("platform/x86: thinkpad-acpi: Add support for automatic mode transitions") Reviewed-by: Mario Limonciello Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20230112221228.490946-1-mpearson-lenovo@squebb.ca Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit da07d2f9c153e457e845d4dcfdd13568d71d18a4 Author: Qais Yousef Date: Thu Jan 12 12:27:08 2023 +0000 sched/fair: Fixes for capacity inversion detection Traversing the Perf Domains requires rcu_read_lock() to be held and is conditional on sched_energy_enabled(). Ensure right protections applied. Also skip capacity inversion detection for our own pd; which was an error. Fixes: 44c7b80bffc3 ("sched/fair: Detect capacity inversion") Reported-by: Dietmar Eggemann Signed-off-by: Qais Yousef (Google) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20230112122708.330667-3-qyousef@layalina.io kernel/sched/fair.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit e26fd28db82899be71b4b949527373d0a6be1e65 Author: Qais Yousef Date: Thu Jan 12 12:27:07 2023 +0000 sched/uclamp: Fix a uninitialized variable warnings Addresses the following warnings: > config: riscv-randconfig-m031-20221111 > compiler: riscv64-linux-gcc (GCC) 12.1.0 > > smatch warnings: > kernel/sched/fair.c:7263 find_energy_efficient_cpu() error: uninitialized symbol 'util_min'. > kernel/sched/fair.c:7263 find_energy_efficient_cpu() error: uninitialized symbol 'util_max'. Fixes: 244226035a1f ("sched/uclamp: Fix fits_capacity() check in feec()") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Qais Yousef (Google) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20230112122708.330667-2-qyousef@layalina.io kernel/sched/fair.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit df3a71aba40fbe4bbd0842170e70c236eaed7c40 Merge: f64e4275ef74 77c724888238 420a1116aef0 Author: Rafael J. Wysocki Date: Fri Jan 13 11:11:05 2023 +0100 Merge branches 'acpi-resource' and 'acpi-video' Merge an ACPI resource management quirk and an ACPI backlight driver fix for 6.2-rc4: - Skip ACPI IRQ override on Asus Expertbook B2402CBA (Tamim Khan). - Add missing support for manual selection of NVidia-WMI-EC or Apple GMUX backlight in the kernel command line to the ACPI backlight driver (Hans de Goede). * acpi-resource: ACPI: resource: Skip IRQ override on Asus Expertbook B2402CBA * acpi-video: ACPI: video: Allow selecting NVidia-WMI-EC or Apple GMUX backlight from the cmdline commit 92a9c0ad86d47ff4cce899012e355c400f02cfb8 Author: Jaroslav Kysela Date: Fri Jan 13 09:53:11 2023 +0100 ALSA: usb-audio: Fix possible NULL pointer dereference in snd_usb_pcm_has_fixed_rate() The subs function argument may be NULL, so do not use it before the NULL check. Fixes: 291e9da91403 ("ALSA: usb-audio: Always initialize fixed_rate in snd_usb_find_implicit_fb_sync_format()") Reported-by: coverity-bot Link: https://lore.kernel.org/alsa-devel/202301121424.4A79A485@keescook/ Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230113085311.623325-1-perex@perex.cz Signed-off-by: Takashi Iwai sound/usb/pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aedee9e8d9224de35081e73e63333a402907c53c Author: Peter Foley Date: Thu Jan 12 23:23:59 2023 -0500 kconfig: Update all declared targets Currently qconf-cfg.sh is the only script that touches the "-bin" target, even though all of the conf_cfg rules declare that they do. Make the recipe unconditionally touch all declared targets to avoid incompatibilities with upcoming versions of GNU make: https://lists.gnu.org/archive/html/info-gnu/2022-10/msg00008.html e.g. scripts/kconfig/Makefile:215: warning: pattern recipe did not update peer target 'scripts/kconfig/nconf-bin'. scripts/kconfig/Makefile:215: warning: pattern recipe did not update peer target 'scripts/kconfig/mconf-bin'. scripts/kconfig/Makefile:215: warning: pattern recipe did not update peer target 'scripts/kconfig/gconf-bin'. Signed-off-by: Peter Foley Signed-off-by: Masahiro Yamada scripts/kconfig/.gitignore | 2 +- scripts/kconfig/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ea22f4319c3409d847d70eaaf149cc480a73220d Author: Sudheer Mogilappagari Date: Wed Jan 11 15:56:07 2023 -0800 ethtool: add netlink attr in rss get reply only if value is not null Current code for RSS_GET ethtool command includes netlink attributes in reply message to user space even if they are null. Added checks to include netlink attribute in reply message only if a value is received from driver. Drivers might return null for RSS indirection table or hash key. Instead of including attributes with empty value in the reply message, add netlink attribute only if there is content. Fixes: 7112a04664bf ("ethtool: add netlink based get rss support") Signed-off-by: Sudheer Mogilappagari Reviewed-by: Michal Kubecek Link: https://lore.kernel.org/r/20230111235607.85509-1-sudheer.mogilappagari@intel.com Signed-off-by: Jakub Kicinski net/ethtool/rss.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 01644a1f98ff45a4044395ce2bbfd534747e0676 Author: David Howells Date: Wed Jan 11 18:07:15 2023 +0000 rxrpc: Fix wrong error return in rxrpc_connect_call() Fix rxrpc_connect_call() to return -ENOMEM rather than 0 if it fails to look up a peer. This generated a smatch warning: net/rxrpc/call_object.c:303 rxrpc_connect_call() warn: missing error code 'ret' I think this also fixes a syzbot-found bug: rxrpc: Assertion failed - 1(0x1) == 11(0xb) is false ------------[ cut here ]------------ kernel BUG at net/rxrpc/call_object.c:645! where the call being put is in the wrong state - as would be the case if we failed to clear up correctly after the error in rxrpc_connect_call(). Fixes: 9d35d880e0e4 ("rxrpc: Move client call connection to the I/O thread") Reported-by: kernel test robot Reported-by: Dan Carpenter Reported-and-tested-by: syzbot+4bb6356bb29d6299360e@syzkaller.appspotmail.com Signed-off-by: David Howells Link: https://lore.kernel.org/r/202301111153.9eZRYLf1-lkp@intel.com/ Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/2438405.1673460435@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski net/rxrpc/call_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80c825296134a8285d970a868187fef32e7c2b9f Merge: 0ea90f36a1e1 926446ae24c0 Author: Jakub Kicinski Date: Thu Jan 12 21:50:43 2023 -0800 Merge branch 'amd-xgbe-pfc-and-kr-training-fixes' Raju Rangoju says: ==================== amd-xgbe: PFC and KR-Training fixes This patch series fixes the issues in kr-training and pfc 0001 - There is difference in the TX Flow Control registers (TFCR) between the revisions of the hardware. Update the driver to use the TFCR based on the reported version of the hardware. 0002 - AN restart triggered during KR training not only aborts the KR training process but also move the HW to unstable state. Add the necessary changes to fix kr-taining. ==================== Link: https://lore.kernel.org/r/20230111172852.1875384-1-Raju.Rangoju@amd.com Signed-off-by: Jakub Kicinski commit 926446ae24c03311a480fb96eb78f0ce7ea6d091 Author: Raju Rangoju Date: Wed Jan 11 22:58:52 2023 +0530 amd-xgbe: Delay AN timeout during KR training AN restart triggered during KR training not only aborts the KR training process but also move the HW to unstable state. Driver has to wait upto 500ms or until the KR training is completed before restarting AN cycle. Fixes: 7c12aa08779c ("amd-xgbe: Move the PHY support into amd-xgbe") Co-developed-by: Sudheesh Mavila Signed-off-by: Sudheesh Mavila Signed-off-by: Raju Rangoju Acked-by: Shyam Sundar S K Signed-off-by: Jakub Kicinski drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 24 ++++++++++++++++++++++++ drivers/net/ethernet/amd/xgbe/xgbe.h | 2 ++ 2 files changed, 26 insertions(+) commit 579923d84b04abb6cd4cd1fd9974096a2dd1832b Author: Raju Rangoju Date: Wed Jan 11 22:58:51 2023 +0530 amd-xgbe: TX Flow Ctrl Registers are h/w ver dependent There is difference in the TX Flow Control registers (TFCR) between the revisions of the hardware. The older revisions of hardware used to have single register per queue. Whereas, the newer revision of hardware (from ver 30H onwards) have one register per priority. Update the driver to use the TFCR based on the reported version of the hardware. Fixes: c5aa9e3b8156 ("amd-xgbe: Initial AMD 10GbE platform driver") Co-developed-by: Ajith Nayak Signed-off-by: Ajith Nayak Signed-off-by: Raju Rangoju Acked-by: Shyam Sundar S K Signed-off-by: Jakub Kicinski drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 0ea90f36a1e1f7a44580caed7ae1b96e5da14bb9 Merge: d9fc1511728c f216033d770f Author: Jakub Kicinski Date: Thu Jan 12 20:01:44 2023 -0800 Merge tag 'wireless-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Some fixes, stack only for now: * iTXQ conversion fixes, various bugs reported * properly reset multiple BSSID settings * fix for a link_sta crash * fix for AP VLAN checks * fix for MLO address translation * tag 'wireless-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: mac80211: fix MLO + AP_VLAN check mac80211: Fix MLO address translation for multiple bss case wifi: mac80211: reset multiple BSSID options in stop_ap() wifi: mac80211: Fix iTXQ AMPDU fragmentation handling wifi: mac80211: sdata can be NULL during AMPDU start wifi: mac80211: Proper mark iTXQs for resumption wifi: mac80211: fix initialization of rx->link and rx->link_sta ==================== Link: https://lore.kernel.org/r/20230112111941.82408-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit e695bc7e542358978434c8489a5a164d2bbefae8 Merge: 51883883acff f4a75b5933c9 Author: Dave Airlie Date: Fri Jan 13 13:01:22 2023 +1000 Merge tag 'drm-msm-fixes-2023-01-12' of https://gitlab.freedesktop.org/drm/msm into drm-fixes msm-fixes for v6.3-rc4 Display Fixes: - Fix the documentation for dpu_encoder_phys_wb_init() and dpu_encoder_phys_wb_setup_fb() APIs to address doc warnings - Remove vcca-supply and vdds-supply as mandatory for 14nm PHY and 10nm PHY DT schemas respectively as they are not present on some SOCs using these PHYs - Add the dsi-phy-regulator-ldo-mode to dsi-phy-28nm.yaml as it was missed out during txt to yaml migration - Remove operating-points-v2 and power-domain as a required property for the DSI controller as thats not the case for every SOC - Fix the description from display escape clock to display core clock in the dsi controller yaml - Fix the memory leak for mdp1-mem path for the cases when we return early after failing to get mdp0-mem ICC paths for msm - Fix error handling path in msm_hdmi_dev_probe() to release the phy ref count when devm_pm_runtime_enable() fails - Fix the dp_aux_isr() routine to make sure it doesnt incorrectly signal the aux transaction as complete if the ISR was not an AUX isr. This fixes a big hitter stability bug on chromebooks. - Add protection against null pointer dereference when there is no kms object as in the case of headless adreno GPU in the shutdown path. GPU Fixes: - a5xx: fix quirks to actually be a bitmask and not overwrite each other - a6xx: fix gx halt sequence to avoid 1000ms hang on some devices - kexec shutdown fix - fix potential double free Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGv7=in_MHW3kdkhqh7ZFoVCmnikmr29YYHCXR=7aOEneg@mail.gmail.com commit 9f907439dc80e4a2fcfb949927b36c036468dbb3 Author: Tonghao Zhang Date: Wed Jan 11 17:29:01 2023 +0800 bpf: hash map, avoid deadlock with suitable hash mask The deadlock still may occur while accessed in NMI and non-NMI context. Because in NMI, we still may access the same bucket but with different map_locked index. For example, on the same CPU, .max_entries = 2, we update the hash map, with key = 4, while running bpf prog in NMI nmi_handle(), to update hash map with key = 20, so it will have the same bucket index but have different map_locked index. To fix this issue, using min mask to hash again. Fixes: 20b6cc34ea74 ("bpf: Avoid hashtab deadlock with map_locked") Signed-off-by: Tonghao Zhang 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 Cc: Hou Tao Acked-by: Yonghong Song Acked-by: Hou Tao Link: https://lore.kernel.org/r/20230111092903.92389-1-tong@infragraf.org Signed-off-by: Martin KaFai Lau kernel/bpf/hashtab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51883883acff13df355ea60d4ede9f6e0e50a9d8 Merge: 28d31e1aeda0 58fc14e14d28 Author: Dave Airlie Date: Fri Jan 13 12:44:21 2023 +1000 Merge tag 'drm-intel-fixes-2023-01-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Reserve enough fence slot for i915_vma_unbind_vsync (Nirmoy) - Fix potential use after free (Rob Clark) - Reset engines twice in case of reset failure (Chris) - Use multi-cast registers for SVG Unit registers (Gustavo) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y8AbHelGeXc5eQ8U@intel.com commit 28d31e1aeda0687feffaf3613b56375afe09db9d Merge: a283773308a0 a6941f89d7c6 Author: Dave Airlie Date: Fri Jan 13 12:37:24 2023 +1000 Merge tag 'amd-drm-fixes-6.2-2023-01-11' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.2-2023-01-11: amdgpu: - SMU13 fan speed fix - SMU13 fix power cap handling - SMU13 BACO fix - Fix a possible segfault in bo validation error case - Delay removal of firmware framebuffer - Fix error when unloading amdkfd: - SVM fix when clearing vram - GC11 fix for multi-GPU Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230112033004.8184-1-alexander.deucher@amd.com commit a283773308a08c7009b3e095d188eb809a51425c Merge: b7bfaa761d76 5640e8160715 Author: Dave Airlie Date: Fri Jan 13 11:44:54 2023 +1000 Merge tag 'drm-misc-fixes-2023-01-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Several fixes for amdgpu (all addressing issues with fences), yet another orientation quirk for a Lenovo device, a use-after-free fix for virtio, a regression fix in TTM and a performance regression in drm buddy. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230112130954.pxt77g3a7rokha42@houat commit d9fc1511728c15df49ff18e49a494d00f78b7cd4 Merge: 5be413a6e2a1 be53771c87f4 Author: Linus Torvalds Date: Thu Jan 12 18:20:44 2023 -0600 Merge tag 'net-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from rxrpc. The rxrpc changes are noticeable large: to address a recent regression has been necessary completing the threaded refactor. Current release - regressions: - rxrpc: - only disconnect calls in the I/O thread - move client call connection to the I/O thread - fix incoming call setup race - eth: mlx5: - restore pkt rate policing support - fix memory leak on updating vport counters Previous releases - regressions: - gro: take care of DODGY packets - ipv6: deduct extension header length in rawv6_push_pending_frames - tipc: fix unexpected link reset due to discovery messages Previous releases - always broken: - sched: disallow noqueue for qdisc classes - eth: ice: fix potential memory leak in ice_gnss_tty_write() - eth: ixgbe: fix pci device refcount leak - eth: mlx5: - fix command stats access after free - fix macsec possible null dereference when updating MAC security entity (SecY)" * tag 'net-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (64 commits) r8152: add vendor/device ID pair for Microsoft Devkit net: stmmac: add aux timestamps fifo clearance wait bnxt: make sure we return pages to the pool net: hns3: fix wrong use of rss size during VF rss config ipv6: raw: Deduct extension header length in rawv6_push_pending_frames net: lan966x: check for ptp to be enabled in lan966x_ptp_deinit() net: sched: disallow noqueue for qdisc classes iavf/iavf_main: actually log ->src mask when talking about it igc: Fix PPS delta between two synchronized end-points ixgbe: fix pci device refcount leak octeontx2-pf: Fix resource leakage in VF driver unbind selftests/net: l2_tos_ttl_inherit.sh: Ensure environment cleanup on failure. selftests/net: l2_tos_ttl_inherit.sh: Run tests in their own netns. selftests/net: l2_tos_ttl_inherit.sh: Set IPv6 addresses with "nodad". net/mlx5e: Fix macsec possible null dereference when updating MAC security entity (SecY) net/mlx5e: Fix macsec ssci attribute handling in offload path net/mlx5: E-switch, Coverity: overlapping copy net/mlx5e: Don't support encap rules with gbp option net/mlx5: Fix ptp max frequency adjustment range net/mlx5e: Fix memory leak on updating vport counters ... commit 5be413a6e2a16e08c8f0f1b59794a7203b5eca2c Merge: bad8c4a850ea 1ecf7bd9c267 Author: Linus Torvalds Date: Thu Jan 12 17:09:20 2023 -0600 Merge tag 's390-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Heiko Carstens: - Add various missing READ_ONCE() to cmpxchg() loops prevent the compiler from potentially generating incorrect code. This includes a rather large change to the s390 specific hardware sampling code and its current use of cmpxchg_double(). Do the fix now to get it out of the way of Peter Zijlstra's cmpxchg128() work, and have something that can be backported. The added new code includes a private 128 bit cmpxchg variant which will be removed again after Peter's rework is available. Also note that this 128 bit cmpxchg variant is used to implement 128 bit READ_ONCE(), while strictly speaking it wouldn't be necessary, and _READ_ONCE() should also be sufficient; even though it isn't obvious for all converted locations that this is the case. Therefore use this implementation for for the sake of clarity and consistency for now. - Fix ipl report address handling to avoid kdump failures/hangs. - Fix misuse of #(el)if in kernel decompressor. - Define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36, caused by the recently changed discard behaviour. - Make sure _edata and _end symbols are always page aligned. - The current header guard DEBUG_H in one of the s390 specific header files is too generic and conflicts with the ath9k wireless driver. Add an _ASM_S390_ prefix to the guard to make it unique. - Update defconfigs. * tag 's390-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: update defconfigs KVM: s390: interrupt: use READ_ONCE() before cmpxchg() s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple() s390/cpum_sf: add READ_ONCE() semantics to compare and swap loops s390/kexec: fix ipl report address for kdump s390: fix -Wundef warning for CONFIG_KERNEL_ZSTD s390: define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36 s390: expicitly align _edata and _end symbols on page boundary s390/debug: add _ASM_S390_ prefix to header guard commit bad8c4a850eaf386df681d951e3afc06bf1c7cf8 Merge: 772d0e9144df f57034cedeb6 Author: Linus Torvalds Date: Thu Jan 12 17:02:20 2023 -0600 Merge tag 'for-linus-6.2-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - two cleanup patches - a fix of a memory leak in the Xen pvfront driver - a fix of a locking issue in the Xen hypervisor console driver * tag 'for-linus-6.2-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/pvcalls: free active map buffer on pvcalls_front_free_map hvc/xen: lock console list traversal x86/xen: Remove the unused function p2m_index() xen: make remove callback of xen driver void returned commit 772d0e9144df4fdf68b23f2136a512e2e5670e9a Merge: a7b19c603e0c f3cb80804b82 Author: Linus Torvalds Date: Thu Jan 12 16:53:39 2023 -0600 Merge tag 'timers-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer doc fixes from Ingo Molnar: - Fix various DocBook formatting errors in kernel/time/ that generated (justified) warnings during a kernel-doc build. * tag 'timers-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: time: Fix various kernel-doc problems commit a7b19c603e0ca156fb2422017a053d5d48fc769b Merge: ea66bf86536d 5268a2842066 Author: Linus Torvalds Date: Thu Jan 12 16:47:32 2023 -0600 Merge tag 'perf-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf events hw enablement from Ingo Molnar: - More hardware-enablement for Intel Meteor Lake & Emerald Rapid systems: pure model ID enumeration additions that do not affect other systems. * tag 'perf-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Add Emerald Rapids perf/x86/msr: Add Emerald Rapids perf/x86/msr: Add Meteor Lake support perf/x86/cstate: Add Meteor Lake support commit ea66bf86536d4d98932843896e9d940110a06701 Merge: cf4d5be89c0a 9a5418bc48ba Author: Linus Torvalds Date: Thu Jan 12 16:39:43 2023 -0600 Merge tag 'sched-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: - Fix scheduler frequency invariance bug related to overly long tickless periods triggering an integer overflow and disabling the feature. - Fix use-after-free bug in dup_user_cpus_ptr(). - Fix do_set_cpus_allowed() deadlock scenarios related to calling kfree() with the pi_lock held. NOTE: the rcu_free() is the 'lazy' solution here - we looked at patches to free the structure after the pi_lock got dropped, but that looked quite a bit messier - and none of this is truly performance critical. We can revisit this if it's too lazy of a solution ... * tag 'sched-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Use kfree_rcu() in do_set_cpus_allowed() sched/core: Fix use-after-free bug in dup_user_cpus_ptr() sched/core: Fix arch_scale_freq_tick() on tickless systems commit cf4d5be89c0ad339108e672a2f973bf276bd5d2c Merge: f129b61612af cad90e5381d8 Author: Linus Torvalds Date: Thu Jan 12 14:41:32 2023 -0600 Merge tag 'core-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Ingo Molnar: - Fix objtool to be more permissive with hand-written assembly that uses non-function symbols in executable sections. * tag 'core-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Tolerate STT_NOTYPE symbols at end of section commit f129b61612af0627fb208b5daf6666f7a3ad9e07 Merge: c757fc92a3f7 00b18da40893 Author: Linus Torvalds Date: Thu Jan 12 14:38:22 2023 -0600 Merge tag 'urgent-nolibc.2023.01.09a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull nolibc fixes from Paul McKenney: - The fd_set structure was incorrectly defined as arrays of u32 instead of long, which breaks BE64. Fix courtesy of Sven Schnelle. - S_ISxxx macros were incorrectly testing the bits after applying them instead of bitwise ANDing S_FMT with the value. Fix from Warner Losh. - The mips code was randomly broken due to an unprotected "noreorder" directive in the _start code that could prevent the assembler from filling delayed slots. This in turn resulted in random other instructions being placed into those slots. Fix courtesy of Willy Tarreau. - The current nolibc header layout refrains from including files that are not explicitly included by the code using nolibc. Unfortunately, this causes build failures when such files contain definitions that are used (for example) by libgcc. Example definitions include raise() and memset(), which are called by some architectures, but only at certain optimization levels. Fix courtesy of Willy Tarreau. - gcc 11.3 in ARM thumb2 mode at -O2 recognized a memset() construction inside the memset() definition. The compiler replaced this construction with a call to... memset(). Userland cannot be forced to build with -ffreestanding, so an empty asm() statement was introduced into the loop the loop in order to prevent the compiler from making this unproductive transformation. Fix courtesy of Willy Tarreau. - Most of the O_* macros were wrong on RISCV because their octal values were coded as hexadecimal. This resulted in the getdents64() selftest failing. Fix courtesy of Willy Tarreau. This was tested on x86_64, i386, armv5, armv7, thumb1, thumb2, mips and riscv, all at -O0, -Os and -O3. * tag 'urgent-nolibc.2023.01.09a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: tools/nolibc: fix the O_* fcntl/open macro definitions for riscv tools/nolibc: prevent gcc from making memset() loop over itself tools/nolibc: fix missing includes causing build issues at -O0 tools/nolibc: restore mips branch ordering in the _start block tools/nolibc: Fix S_ISxxx macros nolibc: fix fd_set type commit 9fdaca2c1e157dc0a3c0faecf3a6a68e7d8d0c7b Author: Mark Brown Date: Wed Jan 11 22:33:07 2023 +0000 kselftest: Fix error message for unconfigured LLVM builds We are missing a ) when we attempt to complain about not having enough configuration for clang, resulting in the rather inscrutable error: ../lib.mk:23: *** unterminated call to function 'error': missing ')'. Stop. Add the required ) so we print the message we were trying to print. Signed-off-by: Mark Brown Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf5ac2d45f6e4d11ad78e7b10ae9a4121ba5e995 Author: Hans de Goede Date: Wed Jan 11 21:14:26 2023 +0100 platform/x86: int3472/discrete: Ensure the clk/power enable pins are in output mode acpi_get_and_request_gpiod() does not take a gpio_lookup_flags argument specifying that the pins direction should be initialized to a specific value. This means that in some cases the pins might be left in input mode, causing the gpiod_set() calls made to enable the clk / regulator to not work. One example of this problem is the clk-enable GPIO for the ov01a1s sensor on a Dell Latitude 9420 being left in input mode causing the clk to never get enabled. Explicitly set the direction of the pins to output to fix this. Fixes: 5de691bffe57 ("platform/x86: Add intel_skl_int3472 driver") Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Reviewed-by: Daniel Scally Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20230111201426.947853-1-hdegoede@redhat.com drivers/platform/x86/intel/int3472/clk_and_regulator.c | 3 +++ drivers/platform/x86/intel/int3472/discrete.c | 4 ++++ 2 files changed, 7 insertions(+) commit ccb32e2be14271a60e9ba89c6d5660cc9998773c Author: Miaoqian Lin Date: Thu Dec 29 11:25:33 2022 +0400 platform/x86/amd: Fix refcount leak in amd_pmc_probe pci_get_domain_bus_and_slot() takes reference, the caller should release the reference by calling pci_dev_put() after use. Call pci_dev_put() in the error path to fix this. Fixes: 3d7d407dfb05 ("platform/x86: amd-pmc: Add support for AMD Spill to DRAM STB feature") Signed-off-by: Miaoqian Lin Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20221229072534.1381432-1-linmq006@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6aa5207838ccf79879f212034435a5606f890eea Author: Gayatri Kammela Date: Wed Dec 28 15:05:53 2022 -0800 platform/x86: intel/pmc/core: Add Meteor Lake mobile support Add Meteor Lake mobile support to pmc core driver. Meteor Lake mobile parts reuse all the Meteor Lake PCH IPs. Cc: David E Box Signed-off-by: Gayatri Kammela Link: https://lore.kernel.org/r/20221228230553.2497183-1-gayatri.kammela@linux.intel.com Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmc/core.c | 1 + 1 file changed, 1 insertion(+) commit d348b1d761e358a4ba03fb34aa7e3dbd278db236 Author: Henning Schild Date: Thu Dec 22 11:37:20 2022 +0100 platform/x86: simatic-ipc: add another model Add IPC PX-39A support. Signed-off-by: Henning Schild Link: https://lore.kernel.org/r/20221222103720.8546-3-henning.schild@siemens.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/simatic-ipc.c | 1 + include/linux/platform_data/x86/simatic-ipc.h | 1 + 2 files changed, 2 insertions(+) commit ed058eab22d64c00663563e8e1e112989c65c59f Author: Henning Schild Date: Thu Dec 22 11:37:19 2022 +0100 platform/x86: simatic-ipc: correct name of a model What we called IPC427G should be renamed to BX-39A to be more in line with the actual product name. Signed-off-by: Henning Schild Link: https://lore.kernel.org/r/20221222103720.8546-2-henning.schild@siemens.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/simatic-ipc.c | 2 +- include/linux/platform_data/x86/simatic-ipc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b0907cadabcae6f1248f37a32a6e777f9ff6d4aa Author: Adrian Huang Date: Tue Jan 10 09:45:12 2023 +0800 md: fix incorrect declaration about claim_rdev in md_import_device Commit fb541ca4c365 ("md: remove lock_bdev / unlock_bdev") removes wrappers for blkdev_get/blkdev_put. However, the uninitialized local static variable of pointer type 'claim_rdev' in md_import_device() is NULL, which leads to the following warning call trace: WARNING: CPU: 22 PID: 1037 at block/bdev.c:577 bd_prepare_to_claim+0x131/0x150 CPU: 22 PID: 1037 Comm: mdadm Not tainted 6.2.0-rc3+ #69 .. RIP: 0010:bd_prepare_to_claim+0x131/0x150 .. Call Trace: ? _raw_spin_unlock+0x15/0x30 ? iput+0x6a/0x220 blkdev_get_by_dev.part.0+0x4b/0x300 md_import_device+0x126/0x1d0 new_dev_store+0x184/0x240 md_attr_store+0x80/0xf0 kernfs_fop_write_iter+0x128/0x1c0 vfs_write+0x2be/0x3c0 ksys_write+0x5f/0xe0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc It turns out the md device cannot be used: md: could not open device unknown-block(259,0). md: md127 stopped. Fix the issue by declaring the local static variable of struct type and passing the pointer of the variable to blkdev_get_by_dev(). Fixes: fb541ca4c365 ("md: remove lock_bdev / unlock_bdev") Cc: Christoph Hellwig Signed-off-by: Adrian Huang Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu drivers/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6dc485f9940df8105ea729cbeb7a7d18d409dde5 Author: Hans de Goede Date: Wed Dec 21 23:07:24 2022 +0100 platform/x86: dell-privacy: Only register SW_CAMERA_LENS_COVER if present Unlike keys where userspace only reacts to keypresses, userspace may act on switches in both (0 and 1) of their positions. For example if a SW_TABLET_MODE switch is registered then GNOME will not automatically show the onscreen keyboard when a text field gets focus on touchscreen devices when SW_TABLET_MODE reports 0 and when SW_TABLET_MODE reports 1 libinput will block (filter out) builtin keyboard and touchpad events. So to avoid unwanted side-effects EV_SW type inputs should only be registered if they are actually present, only register SW_CAMERA_LENS_COVER if it is actually there. Fixes: 8af9fa37b8a3 ("platform/x86: dell-privacy: Add support for Dell hardware privacy") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20221221220724.119594-2-hdegoede@redhat.com drivers/platform/x86/dell/dell-wmi-privacy.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 1af7fef0d9d3fa075bf4e850f705df1fe97d33ce Author: Hans de Goede Date: Wed Dec 21 23:07:23 2022 +0100 platform/x86: dell-privacy: Fix SW_CAMERA_LENS_COVER reporting Use KE_VSW instead of KE_SW for the SW_CAMERA_LENS_COVER key_entry and get the value of the switch from the status field when handling SW_CAMERA_LENS_COVER events, instead of always reporting 0. Also correctly set the initial SW_CAMERA_LENS_COVER value. Fixes: 8af9fa37b8a3 ("platform/x86: dell-privacy: Add support for Dell hardware privacy") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20221221220724.119594-1-hdegoede@redhat.com drivers/platform/x86/dell/dell-wmi-privacy.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 01fd7e7851ba2275662f771ee17d1f80e7bbfa52 Author: Thomas Weißschuh Date: Wed Dec 21 17:59:51 2022 +0000 platform/x86: asus-wmi: Don't load fan curves without fan If we do not have a fan it does not make sense to load curves for it. This removes the following warnings from the kernel log: asus_wmi: fan_curve_get_factory_default (0x00110024) failed: -19 asus_wmi: fan_curve_get_factory_default (0x00110025) failed: -19 Fixes: a2bdf10ce96e ("platform/x86: asus-wmi: Increase FAN_CURVE_BUF_LEN to 32") Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20221221-asus-fan-v1-3-e07f3949725b@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/asus-wmi.c | 3 +++ 1 file changed, 3 insertions(+) commit 82cc5c6c624c63f7b57214e325e2ea685d924e89 Author: Thomas Weißschuh Date: Wed Dec 21 17:59:50 2022 +0000 platform/x86: asus-wmi: Ignore fan on E410MA The ASUS VivoBook has a fan device described in its ACPI tables but does not actually contain any physical fan. Use the quirk to inhibit fan handling. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20221221-asus-fan-v1-2-e07f3949725b@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/asus-nb-wmi.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c874b6de4cdfa2822a07b479887cd5f87fb5d078 Author: Thomas Weißschuh Date: Wed Dec 21 17:59:49 2022 +0000 platform/x86: asus-wmi: Add quirk wmi_ignore_fan Some laptops have a fan device listed in their ACPI tables but do not actually contain a fan. Introduce a quirk that can be used to override the fan detection logic. This was observed with a ASUS VivoBook E410MA running firmware E410MAB.304. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20221221-asus-fan-v1-1-e07f3949725b@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/asus-wmi.c | 4 +++- drivers/platform/x86/asus-wmi.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit ec4a1d9301100c011312357ea25627b98eb293d5 Author: Yoshihiro Shimoda Date: Mon Dec 26 15:42:16 2022 +0900 phy: renesas: r8a779f0-eth-serdes: Fix register setting Fix register setting which is typo in r8a779f0_eth_serdes_chan_setting(). Fixes: 742859441d44 ("phy: renesas: Add Renesas Ethernet SERDES driver for R-Car S4-8") Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221226064216.3895421-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul drivers/phy/renesas/r8a779f0-ether-serdes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db9494895b405bf318dc7e563dee6daa51b3b6ed Author: Hans de Goede Date: Thu Jan 12 19:18:41 2023 +0100 platform/x86: asus-nb-wmi: Add alternate mapping for KEY_SCREENLOCK The 0x33 keycode is emitted by Fn + F6 on a ASUS FX705GE laptop. Reported-by: Nemcev Aleksey Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230112181841.84652-1-hdegoede@redhat.com drivers/platform/x86/asus-nb-wmi.c | 1 + 1 file changed, 1 insertion(+) commit c78a4e191839edc1e8c3e51565cf2e71d40e8883 Author: Thomas Weißschuh Date: Wed Dec 21 03:49:59 2022 +0000 platform/x86: asus-nb-wmi: Add alternate mapping for KEY_CAMERA This keycode is emitted on a Asus VivoBook E410MAB with firmware E410MAB.304. The physical key has a strikken-through camera printed on it. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20221216-asus-key-v1-1-45da124119a3@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/asus-nb-wmi.c | 1 + 1 file changed, 1 insertion(+) commit 17eee264ef386ef30a69dd70e36f29893b85c170 Author: Shang XiaoJing Date: Fri Nov 25 10:12:22 2022 +0800 phy: usb: sunplus: Fix potential null-ptr-deref in sp_usb_phy_probe() sp_usb_phy_probe() will call platform_get_resource_byname() that may fail and return NULL. devm_ioremap() will use usbphy->moon4_res_mem->start as input, which may causes null-ptr-deref. Check the ret value of platform_get_resource_byname() to avoid the null-ptr-deref. Fixes: 99d9ccd97385 ("phy: usb: Add USB2.0 phy driver for Sunplus SP7021") Signed-off-by: Shang XiaoJing Link: https://lore.kernel.org/r/20221125021222.25687-1-shangxiaojing@huawei.com Signed-off-by: Vinod Koul drivers/phy/sunplus/phy-sunplus-usb2.c | 3 +++ 1 file changed, 3 insertions(+) commit c965daac370f08a9b71d573a71d13cda76f2a884 Author: Maximilian Luz Date: Tue Dec 20 18:56:07 2022 +0100 platform/surface: aggregator: Add missing call to ssam_request_sync_free() Although rare, ssam_request_sync_init() can fail. In that case, the request should be freed via ssam_request_sync_free(). Currently it is leaked instead. Fix this. Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20221220175608.1436273-1-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/aggregator/controller.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ae0fa0a3126a86c801c3220fcd8eefe03aa39f3e Author: Maximilian Luz Date: Fri Dec 2 23:33:19 2022 +0100 platform/surface: aggregator: Ignore command messages not intended for us It is possible that we (the host/kernel driver) receive command messages that are not intended for us. Ignore those for now. The whole story is a bit more complicated: It is possible to enable debug output on SAM, which is sent via SSH command messages. By default this output is sent to a debug connector, with its own target ID (TID=0x03). It is possible to override the target of the debug output and set it to the host/kernel driver. This, however, does not change the original target ID of the message. Meaning, we receive messages with TID=0x03 (debug) but expect to only receive messages with TID=0x00 (host). The problem is that the different target ID also comes with a different scope of request IDs. In particular, these do not follow the standard event rules (i.e. do not fall into a set of small reserved values). Therefore, current message handling interprets them as responses to pending requests and tries to match them up via the request ID. However, these debug output messages are not in fact responses, and therefore this will at best fail to find the request and at worst pass on the wrong data as response for a request. Therefore ignore any command messages not intended for us (host) for now. We can implement support for the debug messages once we have a better understanding of them. Note that this may also provide a bit more stability and avoid some driver confusion in case any other targets want to talk to us in the future, since we don't yet know what to do with those as well. A warning for the dropped messages should suffice for now and also give us a chance of discovering new targets if they come along without any potential for bugs/instabilities. Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20221202223327.690880-2-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/surface/aggregator/ssh_request_layer.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 3d25b1e8369273d76f5f2634f164236ba9e40d32 Merge: 49e4d04f0486 c7c0644ead24 Author: Jens Axboe Date: Thu Jan 12 10:36:35 2023 -0700 Merge tag 'nvme-6.2-2023-01-12' of git://git.infradead.org/nvme into block-6.2 Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.2 - Identify quirks for Apple controllers (Hector Martin) - fix error handling in nvme_pci_enable (Tong Zhang) - refuse unprivileged passthrough on partitions (Christoph Hellwig) - fix MAINTAINERS to not match nvmem subsystem headers (Russell King)" * tag 'nvme-6.2-2023-01-12' of git://git.infradead.org/nvme: MAINTAINERS: stop nvme matching for nvmem files nvme: don't allow unprivileged passthrough on partitions nvme: replace the "bool vec" arguments with flags in the ioctl path nvme: remove __nvme_ioctl nvme-pci: fix error handling in nvme_pci_enable() nvme-pci: add NVME_QUIRK_IDENTIFY_CNS quirk to Apple T2 controllers nvme-apple: add NVME_QUIRK_IDENTIFY_CNS quirk to fix regression commit 6e5aedb9324aab1c14a23fae3d8eeb64a679c20e Author: Jens Axboe Date: Tue Jan 10 10:44:37 2023 -0700 io_uring/poll: attempt request issue after racy poll wakeup If we have multiple requests waiting on the same target poll waitqueue, then it's quite possible to get a request triggered and get disappointed in not being able to make any progress with it. If we race in doing so, we'll potentially leave the poll request on the internal tables, but removed from the waitqueue. That means that any subsequent trigger of the poll waitqueue will not kick that request into action, causing an application to potentially wait for completion of a request that will never happen. Fix this by adding a new poll return state, IOU_POLL_REISSUE. Rather than have complicated logic for how to re-arm a given type of request, just punt it for a reissue. While in there, move the 'ret' variable to the only section where it gets used. This avoids confusion the scope of it. Cc: stable@vger.kernel.org Fixes: eb0089d629ba ("io_uring: single shot poll removal optimisation") Signed-off-by: Jens Axboe io_uring/poll.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit 36c2b9d6710427f802494ba070621cb415198293 Author: Michael Klein Date: Tue Dec 20 13:11:03 2022 +0100 platform/x86: touchscreen_dmi: Add info for the CSL Panther Tab HD Add touchscreen info for the CSL Panther Tab HD. Signed-off-by: Michael Klein Link: https://lore.kernel.org/r/20221220121103.uiwn5l7fii2iggct@LLGMVZLB-0037 Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/touchscreen_dmi.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 6c331f32e32ac71eb3e8b93fceda2802d7ecb889 Author: Duke Xin(辛安文) Date: Tue Dec 27 01:44:30 2022 -0800 USB: serial: option: add Quectel EM05-G (GR) modem The EM05-G (GR) modem has 2 USB configurations that are configurable via the AT command AT+QCFG="usbnet",[ 0 | 2 ] which make the modem enumerate with the following interfaces, respectively: "RMNET" : AT + DIAG + NMEA + Modem + QMI "MBIM" : MBIM + AT + DIAG + NMEA + Modem The detailed description of the USB configuration for each mode as follows: RMNET Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 21 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0313 Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-G C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms MBIM Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 16 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0313 Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-G C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Duke Xin(辛安文) Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+) commit bb78654b0b46316dac687fd4b7dc7cce636f46cd Author: Duke Xin(辛安文) Date: Tue Dec 27 01:28:25 2022 -0800 USB: serial: option: add Quectel EM05-G (CS) modem The EM05-G (CS) modem has 2 USB configurations that are configurable via the AT command AT+QCFG="usbnet",[ 0 | 2 ] which make the modem enumerate with the following interfaces, respectively: "RMNET" : AT + DIAG + NMEA + Modem + QMI "MBIM" : MBIM + AT + DIAG + NMEA + Modem The detailed description of the USB configuration for each mode as follows: RMNET Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 21 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=030C Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-G C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms MBIM Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 16 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=030C Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-G C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Duke Xin(辛安文) Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+) commit 64e57b2195725c1ae2246a8a2ce224abb60620ac Author: Andy Shevchenko Date: Thu Jan 12 13:28:52 2023 +0200 ASoC: Intel: sof_es8336: Drop reference count of ACPI device after use Theoretically the device might gone if its reference count drops to 0. This might be the case when we try to find the first physical node of the ACPI device. We need to keep reference to it until we get a result of the above mentioned call. Refactor the code to drop the reference count at the correct place. While at it, move to acpi_dev_put() as symmetrical call to the acpi_dev_get_first_match_dev(). Fixes: a164137ce91a ("ASoC: Intel: add machine driver for SOF+ES8336") Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230112112852.67714-6-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_es8336.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit c8aa49abdeda2ab587aadb083e670f6aa0236f93 Author: Andy Shevchenko Date: Thu Jan 12 13:28:51 2023 +0200 ASoC: Intel: bytcr_wm5102: Drop reference count of ACPI device after use Theoretically the device might gone if its reference count drops to 0. This might be the case when we try to find the first physical node of the ACPI device. We need to keep reference to it until we get a result of the above mentioned call. Refactor the code to drop the reference count at the correct place. While at it, move to acpi_dev_put() as symmetrical call to the acpi_dev_get_first_match_dev(). Fixes: 9a87fc1e0619 ("ASoC: Intel: bytcr_wm5102: Add machine driver for BYT/WM5102") Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230112112852.67714-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_wm5102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbf87bcf46e399e9a5288430d940efbad3551c68 Author: Andy Shevchenko Date: Thu Jan 12 13:28:50 2023 +0200 ASoC: Intel: bytcr_rt5640: Drop reference count of ACPI device after use Theoretically the device might gone if its reference count drops to 0. This might be the case when we try to find the first physical node of the ACPI device. We need to keep reference to it until we get a result of the above mentioned call. Refactor the code to drop the reference count at the correct place. While at it, move to acpi_dev_put() as symmetrical call to the acpi_dev_get_first_match_dev(). Fixes: a232b96dcece ("ASoC: Intel: bytcr_rt5640: use HID translation util") Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230112112852.67714-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 721858823d7cdc8f2a897579b040e935989f6f02 Author: Andy Shevchenko Date: Thu Jan 12 13:28:49 2023 +0200 ASoC: Intel: bytcr_rt5651: Drop reference count of ACPI device after use Theoretically the device might gone if its reference count drops to 0. This might be the case when we try to find the first physical node of the ACPI device. We need to keep reference to it until we get a result of the above mentioned call. Refactor the code to drop the reference count at the correct place. While at it, move to acpi_dev_put() as symmetrical call to the acpi_dev_get_first_match_dev(). Fixes: 02c0a3b3047f ("ASoC: Intel: bytcr_rt5651: add MCLK, quirks and cleanups") Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230112112852.67714-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b1c0bd6fdefbf3c3d75680c2708f5423ef72e46 Author: Andy Shevchenko Date: Thu Jan 12 13:28:48 2023 +0200 ASoC: Intel: bytcht_es8316: Drop reference count of ACPI device after use Theoretically the device might gone if its reference count drops to 0. This might be the case when we try to find the first physical node of the ACPI device. We need to keep reference to it until we get a result of the above mentioned call. Refactor the code to drop the reference count at the correct place. While at it, move to acpi_dev_put() as symmetrical call to the acpi_dev_get_first_match_dev(). Fixes: 3c22a73fb873 ("ASoC: Intel: bytcht_es8316: fix HID handling") Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230112112852.67714-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_es8316.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit a152d05ae4a71d802d50cf9177dba34e8bb09f68 Author: Volker Lendecke Date: Wed Jan 11 12:37:58 2023 +0100 cifs: Fix uninitialized memory read for smb311 posix symlink create If smb311 posix is enabled, we send the intended mode for file creation in the posix create context. Instead of using what's there on the stack, create the mfsymlink file with 0644. Fixes: ce558b0e17f8a ("smb3: Add posix create context for smb3.11 posix mounts") Cc: stable@vger.kernel.org Signed-off-by: Volker Lendecke Reviewed-by: Tom Talpey Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/link.c | 1 + 1 file changed, 1 insertion(+) commit 09e44868f1e03c7825ca4283256abedc95e249a3 Author: Filipe Manana Date: Tue Jan 10 14:56:38 2023 +0000 btrfs: do not abort transaction on failure to update log root When syncing a log, if we fail to update a log root in the log root tree, we are aborting the transaction if the failure was not -ENOSPC. This is excessive because there is a chance that a transaction commit can succeed, and therefore avoid to turn the filesystem into RO mode. All we need to be careful about is to mark the log for a full commit, which we already do, to make sure no one commits a super block pointing to an outdated log root tree. So don't abort the transaction if we fail to update a log root in the log root tree, and log an error if the failure is not -ENOSPC, so that it does not go completely unnoticed. CC: stable@vger.kernel.org # 6.0+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 16199ad9eb6db60a6b10794a09fc1ac6d09312ff Author: Filipe Manana Date: Tue Jan 10 14:56:37 2023 +0000 btrfs: do not abort transaction on failure to write log tree when syncing log When syncing the log, if we fail to write log tree extent buffers, we mark the log for a full commit and abort the transaction. However we don't need to abort the transaction, all we really need to do is to make sure no one can commit a superblock pointing to new log tree roots. Just because we got a failure writing extent buffers for a log tree, it does not mean we will also fail to do a transaction commit. One particular case is if due to a bug somewhere, when writing log tree extent buffers, the tree checker detects some corruption and the writeout fails because of that. Aborting the transaction can be very disruptive for a user, specially if the issue happened on a root filesystem. One example is the scenario in the Link tag below, where an isolated corruption on log tree leaves was causing transaction aborts when syncing the log. Link: https://lore.kernel.org/linux-btrfs/ae169fc6-f504-28f0-a098-6fa6a4dfb612@leemhuis.info/ CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/disk-io.c | 9 ++++++++- fs/btrfs/tree-log.c | 2 -- 2 files changed, 8 insertions(+), 3 deletions(-) commit 94cd63ae679973edeb5ea95ec25a54467c3e54c8 Author: Filipe Manana Date: Tue Jan 10 14:56:36 2023 +0000 btrfs: add missing setup of log for full commit at add_conflicting_inode() When logging conflicting inodes, if we reach the maximum limit of inodes, we return BTRFS_LOG_FORCE_COMMIT to force a transaction commit. However we don't mark the log for full commit (with btrfs_set_log_full_commit()), which means that once we leave the log transaction and before we commit the transaction, some other task may sync the log, which is incomplete as we have not logged all conflicting inodes, leading to some inconsistent in case that log ends up being replayed. So also call btrfs_set_log_full_commit() at add_conflicting_inode(). Fixes: e09d94c9e448 ("btrfs: log conflicting inodes without holding log mutex of the initial inode") CC: stable@vger.kernel.org # 6.1 Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8bb6898da6271d82d8e76d8088d66b971a7dcfa6 Author: Filipe Manana Date: Tue Jan 10 14:56:35 2023 +0000 btrfs: fix directory logging due to race with concurrent index key deletion Sometimes we log a directory without holding its VFS lock, so while we logging it, dir index entries may be added or removed. This typically happens when logging a dentry from a parent directory that points to a new directory, through log_new_dir_dentries(), or when while logging some other inode we also need to log its parent directories (through btrfs_log_all_parents()). This means that while we are at log_dir_items(), we may not find a dir index key we found before, because it was deleted in the meanwhile, so a call to btrfs_search_slot() may return 1 (key not found). In that case we return from log_dir_items() with a success value (the variable 'err' has a value of 0). This can lead to a few problems, specially in the case where the variable 'last_offset' has a value of (u64)-1 (and it's initialized to that when it was declared): 1) By returning from log_dir_items() with success (0) and a value of (u64)-1 for '*last_offset_ret', we end up not logging any other dir index keys that follow the missing, just deleted, index key. The (u64)-1 value makes log_directory_changes() not call log_dir_items() again; 2) Before returning with success (0), log_dir_items(), will log a dir index range item covering a range from the last old dentry index (stored in the variable 'last_old_dentry_offset') to the value of 'last_offset'. If 'last_offset' has a value of (u64)-1, then it means if the log is persisted and replayed after a power failure, it will cause deletion of all the directory entries that have an index number between last_old_dentry_offset + 1 and (u64)-1; 3) We can end up returning from log_dir_items() with ctx->last_dir_item_offset having a lower value than inode->last_dir_index_offset, because the former is set to the current key we are processing at process_dir_items_leaf(), and at the end of log_directory_changes() we set inode->last_dir_index_offset to the current value of ctx->last_dir_item_offset. So if for example a deletion of a lower dir index key happened, we set ctx->last_dir_item_offset to that index value, then if we return from log_dir_items() because btrfs_search_slot() returned 1, we end up returning from log_dir_items() with success (0) and then log_directory_changes() sets inode->last_dir_index_offset to a lower value than it had before. This can result in unpredictable and unexpected behaviour when we need to log again the directory in the same transaction, and can result in ending up with a log tree leaf that has duplicated keys, as we do batch insertions of dir index keys into a log tree. So fix this by making log_dir_items() move on to the next dir index key if it does not find the one it was looking for. Reported-by: David Arendt Link: https://lore.kernel.org/linux-btrfs/ae169fc6-f504-28f0-a098-6fa6a4dfb612@leemhuis.info/ CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 6d3d970b2735b967650d319be27268fedc5598d1 Author: Filipe Manana Date: Tue Jan 10 14:56:34 2023 +0000 btrfs: fix missing error handling when logging directory items When logging a directory, at log_dir_items(), if we get an error when attempting to search the subvolume tree for a dir index item, we end up returning 0 (success) from log_dir_items() because 'err' is left with a value of 0. This can lead to a few problems, specially in the case the variable 'last_offset' has a value of (u64)-1 (and it's initialized to that when it was declared): 1) By returning from log_dir_items() with success (0) and a value of (u64)-1 for '*last_offset_ret', we end up not logging any other dir index keys that follow the missing, just deleted, index key. The (u64)-1 value makes log_directory_changes() not call log_dir_items() again; 2) Before returning with success (0), log_dir_items(), will log a dir index range item covering a range from the last old dentry index (stored in the variable 'last_old_dentry_offset') to the value of 'last_offset'. If 'last_offset' has a value of (u64)-1, then it means if the log is persisted and replayed after a power failure, it will cause deletion of all the directory entries that have an index number between last_old_dentry_offset + 1 and (u64)-1; 3) We can end up returning from log_dir_items() with ctx->last_dir_item_offset having a lower value than inode->last_dir_index_offset, because the former is set to the current key we are processing at process_dir_items_leaf(), and at the end of log_directory_changes() we set inode->last_dir_index_offset to the current value of ctx->last_dir_item_offset. So if for example a deletion of a lower dir index key happened, we set ctx->last_dir_item_offset to that index value, then if we return from log_dir_items() because btrfs_search_slot() returned an error, we end up returning without any error from log_dir_items() and then log_directory_changes() sets inode->last_dir_index_offset to a lower value than it had before. This can result in unpredictable and unexpected behaviour when we need to log again the directory in the same transaction, and can result in ending up with a log tree leaf that has duplicated keys, as we do batch insertions of dir index keys into a log tree. Fix this by setting 'err' to the value of 'ret' in case btrfs_search_slot() or btrfs_previous_item() returned an error. That will result in falling back to a full transaction commit. Reported-by: David Arendt Link: https://lore.kernel.org/linux-btrfs/ae169fc6-f504-28f0-a098-6fa6a4dfb612@leemhuis.info/ Fixes: e02119d5a7b4 ("Btrfs: Add a write ahead tree log to optimize synchronous operations") CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7c24fa225081f31bc6da6a355c1ba801889ab29a Author: Dai Ngo Date: Wed Jan 11 16:06:51 2023 -0800 NFSD: replace delayed_work with work_struct for nfsd_client_shrinker Since nfsd4_state_shrinker_count always calls mod_delayed_work with 0 delay, we can replace delayed_work with work_struct to save some space and overhead. Also add the call to cancel_work after unregister the shrinker in nfs4_state_shutdown_net. Signed-off-by: Dai Ngo Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/netns.h | 2 +- fs/nfsd/nfs4state.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit be53771c87f4e322a9835d3faa9cd73a4ecdec5b Author: Andre Przywara Date: Wed Jan 11 13:32:28 2023 +0000 r8152: add vendor/device ID pair for Microsoft Devkit The Microsoft Devkit 2023 is a an ARM64 based machine featuring a Realtek 8153 USB3.0-to-GBit Ethernet adapter. As in their other machines, Microsoft uses a custom USB device ID. Add the respective ID values to the driver. This makes Ethernet work on the MS Devkit device. The chip has been visually confirmed to be a RTL8153. Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20230111133228.190801-1-andre.przywara@arm.com Signed-off-by: Paolo Abeni drivers/net/usb/r8152.c | 1 + 1 file changed, 1 insertion(+) commit 07a2975c65f2be2e22591d795a9c39b00f95fd11 Author: Maxime Ripard Date: Thu Jan 12 10:12:43 2023 +0100 drm/vc4: bo: Fix drmm_mutex_init memory hog Commit 374146cad469 ("drm/vc4: Switch to drmm_mutex_init") converted, among other functions, vc4_create_object() to use drmm_mutex_init(). However, that function is used to allocate a BO, and therefore the mutex needs to be freed much sooner than when the DRM device is removed from the system. For each buffer allocation we thus end up allocating a small structure as part of the DRM-managed mechanism that is never freed, eventually leading us to no longer having any free memory anymore. Let's switch back to mutex_init/mutex_destroy to deal with it properly. Fixes: 374146cad469 ("drm/vc4: Switch to drmm_mutex_init") Reviewed-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230112091243.490799-1-maxime@cerno.tech drivers/gpu/drm/vc4/vc4_bo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5640e81607152d7f2d2558227c0f6cb78b8f39cf Author: Arunpravin Paneer Selvam Date: Thu Jan 12 04:00:27 2023 -0800 drm: Optimize drm buddy top-down allocation method We are observing performance drop in many usecases which include games, 3D benchmark applications,etc.. To solve this problem, We are strictly not allowing top down flag enabled allocations to steal the memory space from cpu visible region. The idea is, we are sorting each order list entries in ascending order and compare the last entry of each order list in the freelist and return the max block. This patch improves the 3D benchmark scores and solves fragmentation issues. All drm buddy selftests are verfied. drm_buddy: pass:6 fail:0 skip:0 total:6 Signed-off-by: Arunpravin Paneer Selvam Acked-by: Christian König Acked-by: Alex Deucher Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230112120027.3072-1-Arunpravin.PaneerSelvam@amd.com Signed-off-by: Christian König CC: Cc: stable@vger.kernel.org # 5.18+ drivers/gpu/drm/drm_buddy.c | 81 ++++++++++++++++++++++++++++++--------------- 1 file changed, 54 insertions(+), 27 deletions(-) commit eb6c59b735aa6cca77cdbb59cc69d69a0d63d986 Author: Anastasia Belova Date: Tue Jan 10 12:14:50 2023 +0300 xfrm: compat: change expression for switch in xfrm_xlate64 Compare XFRM_MSG_NEWSPDINFO (value from netlink configuration messages enum) with nlh_src->nlmsg_type instead of nlh_src->nlmsg_type - XFRM_MSG_BASE. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 4e9505064f58 ("net/xfrm/compat: Copy xfrm_spdattr_type_t atributes") Signed-off-by: Anastasia Belova Acked-by: Dmitry Safonov <0x7f454c46@gmail.com> Tested-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: Steffen Klassert net/xfrm/xfrm_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 040b35c19bf2bdbb8ba5f8742b4e199ace3cbdc3 Author: Zack Rusin Date: Wed Jan 11 12:50:15 2023 -0500 drm/ttm: Fix a regression causing kernel oops'es The branch is explicitly taken if ttm == NULL which means that to avoid a null pointer reference the ttm object can not be used inside. Switch back to dst_mem to avoid kernel oops'es. This fixes kernel oops'es with any buffer objects which don't have ttm_tt, e.g. with vram based screen objects on vmwgfx. Signed-off-by: Zack Rusin Fixes: e3c92eb4a84f ("drm/ttm: rework on ttm_resource to use size_t type") Cc: Somalapuram Amaranath Cc: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230111175015.1134923-1-zack@kde.org Signed-off-by: Christian König drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d784fc8be6814b31854f7b529919ca4506ff8066 Author: Andy Shevchenko Date: Thu Jan 12 13:23:56 2023 +0200 ASoC: amd: acp-es8336: Drop reference count of ACPI device after use Theoretically the device might gone if its reference count drops to 0. This might be the case when we try to find the first physical node of the ACPI device. We need to keep reference to it until we get a result of the above mentioned call. Refactor the code to drop the reference count at the correct place. While at it, move to acpi_dev_put() as symmetrical call to the acpi_dev_get_first_match_dev(). Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform") Signed-off-by: Andy Shevchenko Acked-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230112112356.67643-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown sound/soc/amd/acp-es8336.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c757fc92a3f73734872c7793b97f06434773d65d Merge: cf9668a2f2a6 b442990d244b Author: Linus Torvalds Date: Thu Jan 12 06:10:45 2023 -0600 Merge tag 'spi-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: - Fixes for long standing issues with accesses to spidev->spi during teardown in the spidev userspace driver. - Rename the newly added spi-cs-setup-ns DT property to be more in line with our other delay properties before it becomes ABI. - A few driver specific fixes. * tag 'spi-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spidev: remove debug messages that access spidev->spi without locking spi: spidev: fix a race condition when accessing spidev->spi spi: Rename spi-cs-setup-ns property to spi-cs-setup-delay-ns spi: dt-bindings: Rename spi-cs-setup-ns to spi-cs-setup-delay-ns spi: cadence: Fix busy cycles calculation spi: mediatek: Enable irq before the spi registration commit cf9668a2f2a6a82d5b03894a5f5ae98d17596982 Merge: e58f087e9c57 f528fe213a6a Author: Linus Torvalds Date: Thu Jan 12 05:59:37 2023 -0600 Merge tag 'regulator-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A couple of small driver specific fixes, one of which I queued for 6.1 but didn't actually send out so has had *plenty* of testing in -next" * tag 'regulator-fix-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: qcom-rpmh: PM8550 ldo11 regulator is an nldo regulator: da9211: Use irq handler when ready commit e58f087e9c579a909e62600c3812801227cd564c Merge: 23025cbccada c0f7ae27539f Author: Linus Torvalds Date: Thu Jan 12 05:56:06 2023 -0600 Merge tag 'mtd/fixes-for-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD fixes from Miquel Raynal: - cfi: Allow building spi-intel standalone to avoid build issues - parsers: scpart: Fix __udivdi3 undefined on mips - parsers: tplink_safeloader: Fix potential memory leak during parsing - Update email of Tudor Ambarus * tag 'mtd/fixes-for-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: MAINTAINERS: Update email of Tudor Ambarus mtd: cfi: allow building spi-intel standalone mtd: parsers: scpart: fix __udivdi3 undefined on mips mtd: parsers: Fix potential memory leak in mtd_parser_tplink_safeloader_parse() commit 84aa3059f42ffd702b7ba2e94867eb670070bf40 Merge: ca88eeb308a2 242fc66ae6e1 Author: Takashi Iwai Date: Thu Jan 12 12:52:08 2023 +0100 Merge tag 'asoc-fix-v6.2-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.2 There's quite a few fixes here, mostly board specific apart from the SOF power management ones. We also have some new quirks and Kconfig tweaks to enable existing code on new platforms, and a one liner which exposes the SOF firmware state in debugfs to aid with debugging. There's also a SPI fix that I mistakenly put in the wrong queue and did some merges on top of before I noticed, it seemed more trouble than it was worth to unpick things. A copy of the same patch is also in the spi tree. commit 23025cbccada8908fc6cd4d09e851de66898d2d7 Merge: e8f60cd7db24 a67aad57d9ae Author: Linus Torvalds Date: Thu Jan 12 05:50:56 2023 -0600 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Ten small fixes (less the one that cleaned up a reverted removal), nine in drivers of which the ufs one is the most critical. The single core patch is a minor speedup to error handling" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: libsas: Grab the ATA port lock in sas_ata_device_link_abort() scsi: hisi_sas: Fix tag freeing for reserved tags scsi: ufs: core: WLUN suspend SSU/enter hibern8 fail recovery scsi: scsi_debug: Delete unreachable code in inquiry_vpd_b0() scsi: mpi3mr: Refer CONFIG_SCSI_MPI3MR in Makefile scsi: core: scsi_error: Do not queue pointless abort workqueue functions scsi: storvsc: Fix swiotlb bounce buffer leak in confidential VM scsi: iscsi: Fix multiple iSCSI session unbind events sent to userspace scsi: mpi3mr: Remove usage of dma_get_required_mask() API scsi: mpt3sas: Remove usage of dma_get_required_mask() API commit 9bfa2544dbd1133f0b0af4e967de3bb9c1e3a497 Author: Claudiu Beznea Date: Thu Dec 8 13:52:41 2022 +0200 ARM: dts: at91: sam9x60: fix the ddr clock for sam9x60 The 2nd DDR clock for sam9x60 DDR controller is peripheral clock with id 49. Fixes: 1e5f532c2737 ("ARM: dts: at91: sam9x60: add device tree for soc and board") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221208115241.36312-1-claudiu.beznea@microchip.com arch/arm/boot/dts/sam9x60.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca88eeb308a221c2dcd4a64031d2e5fcd3db9eaa Author: Luka Guzenko Date: Tue Jan 10 21:25:14 2023 +0100 ALSA: hda/realtek: Enable mute/micmute LEDs on HP Spectre x360 13-aw0xxx The HP Spectre x360 13-aw0xxx devices use the ALC285 codec with GPIO 0x04 controlling the micmute LED and COEF 0x0b index 8 controlling the mute LED. A quirk was added to make these work as well as a fixup. Signed-off-by: Luka Guzenko Cc: Link: https://lore.kernel.org/r/20230110202514.2792-1-l.guzenko@web.de Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 26ce6ec364f18d2915923bc05784084e54a5c4cc Author: Juergen Gross Date: Mon Jan 9 16:09:22 2023 +0100 x86/mm: fix poking_init() for Xen PV guests Commit 3f4c8211d982 ("x86/mm: Use mm_alloc() in poking_init()") broke the kernel for running as Xen PV guest. It seems as if the new address space is never activated before being used, resulting in Xen rejecting to accept the new CR3 value (the PGD isn't pinned). Fix that by adding the now missing call of paravirt_arch_dup_mmap() to poking_init(). That call was previously done by dup_mm()->dup_mmap() and it is a NOP for all cases but for Xen PV, where it is just doing the pinning of the PGD. Fixes: 3f4c8211d982 ("x86/mm: Use mm_alloc() in poking_init()") Signed-off-by: Juergen Gross Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230109150922.10578-1-jgross@suse.com arch/x86/mm/init.c | 4 ++++ 1 file changed, 4 insertions(+) commit ae9dcb91c6069e20b3b9505d79cbc89fd6e086f5 Author: Noor Azura Ahmad Tarmizi Date: Wed Jan 11 13:02:00 2023 +0800 net: stmmac: add aux timestamps fifo clearance wait Add timeout polling wait for auxiliary timestamps snapshot FIFO clear bit (ATSFC) to clear. This is to ensure no residue fifo value is being read erroneously. Fixes: f4da56529da6 ("net: stmmac: Add support for external trigger timestamping") Cc: # 5.10.x Signed-off-by: Noor Azura Ahmad Tarmizi Link: https://lore.kernel.org/r/20230111050200.2130-1-noor.azura.ahmad.tarmizi@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f58c89700630da6554b24fd3df293a24874c10c1 Author: Yihang Li Date: Wed Jan 4 12:03:20 2023 +0800 scsi: hisi_sas: Set a port invalid only if there are no devices attached when refreshing port id Currently the driver sets the port invalid if one phy in the port is not enabled, which may cause issues in expander situation. In directly attached situation, if phy up doesn't occur in time when refreshing port id, the port is incorrectly set to invalid which will also cause disk lost. Therefore set a port invalid only if there are no devices attached to the port. Signed-off-by: Yihang Li Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1672805000-141102-3-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 037b48057e8b485a8d72f808122796aeadbbee32 Author: Xingui Yang Date: Wed Jan 4 12:03:19 2023 +0800 scsi: hisi_sas: Use abort task set to reset SAS disks when discovered Currently clear task set is used to abort all commands remaining in the disk when the SAS disk is discovered, and if the disk is discovered by two initiators, other I_T nexuses are also affected. So use abort task set instead and take effect only on the specified I_T nexus. Signed-off-by: Xingui Yang Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1672805000-141102-2-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb25df88287b37a63b9fb9ca6d333af2f504407a Merge: 97f5e03a4a27 6650c8e906ce Author: Jakub Kicinski Date: Wed Jan 11 20:50:42 2023 -0800 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-01-10 (ixgbe, igc, iavf) This series contains updates to ixgbe, igc, and iavf drivers. Yang Yingliang adds calls to pci_dev_put() for proper ref count tracking on ixgbe. Christopher adds setting of Toggle on Target Time bits for proper pulse per second (PPS) synchronization for igc. Daniil Tatianin fixes, likely, copy/paste issue that misreported destination instead of source for IP mask for iavf error. * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: iavf/iavf_main: actually log ->src mask when talking about it igc: Fix PPS delta between two synchronized end-points ixgbe: fix pci device refcount leak ==================== Link: https://lore.kernel.org/r/20230110223825.648544-1-anthony.l.nguyen@intel.com Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 97f5e03a4a27d27ee4fed0cdb1658c81cf2784db Author: Jakub Kicinski Date: Tue Jan 10 20:25:47 2023 -0800 bnxt: make sure we return pages to the pool Before the commit under Fixes the page would have been released from the pool before the napi_alloc_skb() call, so normal page freeing was fine (released page == no longer in the pool). After the change we just mark the page for recycling so it's still in the pool if the skb alloc fails, we need to recycle. Same commit added the same bug in the new bnxt_rx_multi_page_skb(). Fixes: 1dc4c557bfed ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff") Reviewed-by: Andy Gospodarek Link: https://lore.kernel.org/r/20230111042547.987749-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae9f29fdfd827ad06c1ae8155c042245a9d00757 Author: Jie Wang Date: Tue Jan 10 19:53:59 2023 +0800 net: hns3: fix wrong use of rss size during VF rss config Currently, it used old rss size to get current tc mode. As a result, the rss size is updated, but the tc mode is still configured based on the old rss size. So this patch fixes it by using the new rss size in both process. Fixes: 93969dc14fcd ("net: hns3: refactor VF rss init APIs with new common rss init APIs") Signed-off-by: Jie Wang Signed-off-by: Hao Lan Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/20230110115359.10163-1-lanhao@huawei.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f385f7d244134246f984975ed34cd75f77de479f Author: Dai Ngo Date: Wed Jan 11 12:17:09 2023 -0800 NFSD: register/unregister of nfsd-client shrinker at nfsd startup/shutdown time Currently the nfsd-client shrinker is registered and unregistered at the time the nfsd module is loaded and unloaded. The problem with this is the shrinker is being registered before all of the relevant fields in nfsd_net are initialized when nfsd is started. This can lead to an oops when memory is low and the shrinker is called while nfsd is not running. This patch moves the register/unregister of nfsd-client shrinker from module load/unload time to nfsd startup/shutdown time. Fixes: 44df6f439a17 ("NFSD: add delegation reaper to react to low memory condition") Reported-by: Mike Galbraith Signed-off-by: Dai Ngo Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 22 +++++++++++----------- fs/nfsd/nfsctl.c | 7 +------ fs/nfsd/nfsd.h | 6 ++---- 3 files changed, 14 insertions(+), 21 deletions(-) commit e6cf91b7b47ff82b624bdfe2fdcde32bb52e71dd Author: Xingyuan Mo Date: Thu Jan 12 00:24:53 2023 +0800 NFSD: fix use-after-free in nfsd4_ssc_setup_dul() If signal_pending() returns true, schedule_timeout() will not be executed, causing the waiting task to remain in the wait queue. Fixed by adding a call to finish_wait(), which ensures that the waiting task will always be removed from the wait queue. Fixes: f4e44b393389 ("NFSD: delay unmount source's export after inter-server copy completed.") Signed-off-by: Xingyuan Mo Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 1 + 1 file changed, 1 insertion(+) commit 19fa92fb72f8bc542f1673862058f3b078114004 Author: Lizzy Fleckenstein Date: Mon Jan 9 21:18:37 2023 +0100 init/Kconfig: fix typo (usafe -> unsafe) Fix the help text for the PRINTK_SAFE_LOG_BUF_SHIFT setting. Link: https://lkml.kernel.org/r/20230109201837.23873-1-eliasfleckenstein@web.de Signed-off-by: Lizzy Fleckenstein Reviewed-by: Nick Desaulniers Cc: Masahiro Yamada Signed-off-by: Andrew Morton init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd9edbdbdcde6b489ce59f326755ef16a2ffadd7 Author: Liam Howlett Date: Mon Jan 9 20:58:20 2023 +0000 nommu: fix split_vma() map_count error During the maple tree conversion of nommu, an error in counting the VMAs was introduced by counting the existing VMA again. The counting used to be decremented by one and incremented by two, but now it only increments by two. Fix the counting error by moving the increment outside the setup_vma_to_mm() function to the callers. Link: https://lkml.kernel.org/r/20230109205809.956325-1-Liam.Howlett@oracle.com Fixes: 8220543df148 ("nommu: remove uses of VMA linked list") Signed-off-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yu Zhao Cc: Signed-off-by: Andrew Morton mm/nommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 80be727ec87225797771a39f3e6801baf291faaf Author: Liam Howlett Date: Mon Jan 9 20:57:21 2023 +0000 nommu: fix do_munmap() error path When removing a VMA from the tree fails due to no memory, do not free the VMA since a reference still exists. Link: https://lkml.kernel.org/r/20230109205708.956103-1-Liam.Howlett@oracle.com Fixes: 8220543df148 ("nommu: remove uses of VMA linked list") Signed-off-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yu Zhao Cc: Signed-off-by: Andrew Morton mm/nommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7f31cced5724e6d414fe750aa1cd7e7b578ec22f Author: Liam Howlett Date: Mon Jan 9 20:55:21 2023 +0000 nommu: fix memory leak in do_mmap() error path The preallocation of the maple tree nodes may leak if the error path to "error_just_free" is taken. Fix this by moving the freeing of the maple tree nodes to a shared location for all error paths. Link: https://lkml.kernel.org/r/20230109205507.955577-1-Liam.Howlett@oracle.com Fixes: 8220543df148 ("nommu: remove uses of VMA linked list") Signed-off-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yu Zhao Cc: Signed-off-by: Andrew Morton mm/nommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf61acbed8a8b38949a247333ee253899acdc35d Author: Robert Foss Date: Fri Jan 6 16:21:51 2023 +0100 MAINTAINERS: update Robert Foss' email address Update the email address for Robert's maintainer entries and fill in .mailmap accordingly. Link: https://lkml.kernel.org/r/20230106152151.115648-1-robert.foss@linaro.org Signed-off-by: Robert Foss Cc: Arnd Bergmann Cc: Baolin Wang Cc: Colin Ian King Cc: Kalle Valo Cc: Kirill Tkhai Cc: Qais Yousef Cc: Vasily Averin Signed-off-by: Andrew Morton .mailmap | 1 + MAINTAINERS | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit 5316a017d093f644675a56523bcf5787ba8f4fef Author: Alexey Dobriyan Date: Fri Jan 6 22:30:14 2023 +0300 proc: fix PIE proc-empty-vm, proc-pid-vm tests vsyscall detection code uses direct call to the beginning of the vsyscall page: asm ("call %P0" :: "i" (0xffffffffff600000)) It generates "call rel32" instruction but it is not relocated if binary is PIE, so binary segfaults into random userspace address and vsyscall page status is detected incorrectly. Do more direct: asm ("call *%rax") which doesn't do need any relocaltions. Mark g_vsyscall as volatile for a good measure, I didn't find instruction setting it to 0. Now the code is obviously correct: xor eax, eax mov rdi, rbp mov rsi, rbp mov DWORD PTR [rip+0x2d15], eax # g_vsyscall = 0 mov rax, 0xffffffffff600000 call rax mov DWORD PTR [rip+0x2d02], 1 # g_vsyscall = 1 mov eax, DWORD PTR ds:0xffffffffff600000 mov DWORD PTR [rip+0x2cf1], 2 # g_vsyscall = 2 mov edi, [rip+0x2ceb] # exit(g_vsyscall) call exit Note: fixed proc-empty-vm test oopses 5.19.0-28-generic kernel but this is separate story. Link: https://lkml.kernel.org/r/Y7h2xvzKLg36DSq8@p183 Fixes: 5bc73bb3451b9 ("proc: test how it holds up with mapping'less process") Signed-off-by: Alexey Dobriyan Reported-by: Mirsad Goran Todorovac Tested-by: Mirsad Goran Todorovac Cc: Signed-off-by: Andrew Morton tools/testing/selftests/proc/proc-empty-vm.c | 12 +++++++----- tools/testing/selftests/proc/proc-pid-vm.c | 9 +++++---- 2 files changed, 12 insertions(+), 9 deletions(-) commit 8651a137e62ebfde3df95cbb1ca055d013ec5b9e Author: Lorenzo Stoakes Date: Sat Jan 7 00:00:05 2023 +0000 mm: update mmap_sem comments to refer to mmap_lock The rename from mm->mmap_sem to mm->mmap_lock was performed in commit da1c55f1b272 ("mmap locking API: rename mmap_sem to mmap_lock") and commit c1e8d7c6a7a6 ("map locking API: convert mmap_sem comments"), however some incorrect comments remain. This patch simply corrects those comments which are obviously incorrect within mm itself. Link: https://lkml.kernel.org/r/33fba04389ab63fc4980e7ba5442f521df6dc657.1673048927.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Muchun Song Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/mm_types.h | 2 +- include/linux/page_ref.h | 2 +- mm/hugetlb.c | 4 ++-- mm/madvise.c | 2 +- mm/mmap.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) commit 0411d6ee50e3b74a793848e4f41f45860163f5cc Author: SeongJae Park Date: Fri Jan 6 20:33:31 2023 +0000 include/linux/mm: fix release_pages_arg kernel doc comment Commit 449c796768c9 ("mm: teach release_pages() to take an array of encoded page pointers too") added the kernel doc comment for release_pages() on top of 'union release_pages_arg', so making 'make htmldocs' complains as below: ./include/linux/mm.h:1268: warning: cannot understand function prototype: 'typedef union ' The kernel doc comment for the function is already on top of the function's definition in mm/swap.c, and the new comment is actually not for the function but indeed release_pages_arg. Fixing the comment to reflect the intent would be one option. But, kernel doc cannot parse the union as below due to the attribute. ./include/linux/mm.h:1272: error: Cannot parse struct or union! Modify the comment to reflect the intent but do not mark it as a kernel doc comment. Link: https://lkml.kernel.org/r/20230106203331.127532-1-sj@kernel.org Fixes: 449c796768c9 ("mm: teach release_pages() to take an array of encoded page pointers too") Signed-off-by: SeongJae Park Acked-by: Randy Dunlap Signed-off-by: Andrew Morton include/linux/mm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d09dce1fff8a9da10144e878ef4bbf90c65559e5 Author: Randy Dunlap Date: Mon Jan 2 13:16:14 2023 -0800 lib/win_minmax: use /* notation for regular comments Don't use kernel-doc "/**" notation for non-kernel-doc comments. Prevents a kernel-doc warning: lib/win_minmax.c:31: warning: expecting prototype for lib/minmax.c(). Prototype was for minmax_subwin_update() instead Link: https://lkml.kernel.org/r/20230102211614.26343-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Neal Cardwell Cc: Eric Dumazet Cc: David S. Miller Signed-off-by: Andrew Morton lib/win_minmax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0de4a7f5ba5744d1de5ce0b076bb73a86530c60c Author: Andrey Konovalov Date: Wed Jan 4 02:09:33 2023 +0100 kasan: mark kasan_kunit_executing as static Mark kasan_kunit_executing as static, as it is only used within mm/kasan/report.c. Link: https://lkml.kernel.org/r/f64778a4683b16a73bba72576f73bf4a2b45a82f.1672794398.git.andreyknvl@google.com Fixes: c8c7016f50c8 ("kasan: fail non-kasan KUnit tests on KASAN reports") Reported-by: kernel test robot Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton mm/kasan/report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7633355e5c7f29c049a9048e461427d1d8ed3051 Author: Ryusuke Konishi Date: Thu Jan 5 14:53:56 2023 +0900 nilfs2: fix general protection fault in nilfs_btree_insert() If nilfs2 reads a corrupted disk image and tries to reads a b-tree node block by calling __nilfs_btree_get_block() against an invalid virtual block address, it returns -ENOENT because conversion of the virtual block address to a disk block address fails. However, this return value is the same as the internal code that b-tree lookup routines return to indicate that the block being searched does not exist, so functions that operate on that b-tree may misbehave. When nilfs_btree_insert() receives this spurious 'not found' code from nilfs_btree_do_lookup(), it misunderstands that the 'not found' check was successful and continues the insert operation using incomplete lookup path data, causing the following crash: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] ... RIP: 0010:nilfs_btree_get_nonroot_node fs/nilfs2/btree.c:418 [inline] RIP: 0010:nilfs_btree_prepare_insert fs/nilfs2/btree.c:1077 [inline] RIP: 0010:nilfs_btree_insert+0x6d3/0x1c10 fs/nilfs2/btree.c:1238 Code: bc 24 80 00 00 00 4c 89 f8 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 ff e8 4b 02 92 fe 4d 8b 3f 49 83 c7 28 4c 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 08 4c 89 ff e8 2e 02 92 fe 4d 8b 3f 49 83 c7 02 ... Call Trace: nilfs_bmap_do_insert fs/nilfs2/bmap.c:121 [inline] nilfs_bmap_insert+0x20d/0x360 fs/nilfs2/bmap.c:147 nilfs_get_block+0x414/0x8d0 fs/nilfs2/inode.c:101 __block_write_begin_int+0x54c/0x1a80 fs/buffer.c:1991 __block_write_begin fs/buffer.c:2041 [inline] block_write_begin+0x93/0x1e0 fs/buffer.c:2102 nilfs_write_begin+0x9c/0x110 fs/nilfs2/inode.c:261 generic_perform_write+0x2e4/0x5e0 mm/filemap.c:3772 __generic_file_write_iter+0x176/0x400 mm/filemap.c:3900 generic_file_write_iter+0xab/0x310 mm/filemap.c:3932 call_write_iter include/linux/fs.h:2186 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7dc/0xc50 fs/read_write.c:584 ksys_write+0x177/0x2a0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd ... This patch fixes the root cause of this problem by replacing the error code that __nilfs_btree_get_block() returns on block address conversion failure from -ENOENT to another internal code -EINVAL which means that the b-tree metadata is corrupted. By returning -EINVAL, it propagates without glitches, and for all relevant b-tree operations, functions in the upper bmap layer output an error message indicating corrupted b-tree metadata via nilfs_bmap_convert_error(), and code -EIO will be eventually returned as it should be. Link: https://lkml.kernel.org/r/000000000000bd89e205f0e38355@google.com Link: https://lkml.kernel.org/r/20230105055356.8811-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: syzbot+ede796cecd5296353515@syzkaller.appspotmail.com Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton fs/nilfs2/btree.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 1beb8ae302a01fb487787f5a4fb97cf5338a86c1 Author: Nhat Pham Date: Fri Jan 6 14:00:16 2023 -0800 Docs/admin-guide/mm/zswap: remove zsmalloc's lack of writeback warning Writeback has been implemented for zsmalloc, so this warning no longer holds. Link: https://lkml.kernel.org/r/20230106220016.172303-1-nphamcs@gmail.com Fixes: 9997bc017549a ("zsmalloc: implement writeback mechanism for zsmalloc") Suggested-by: Thomas Weißschuh Signed-off-by: Nhat Pham Reviewed-by: Sergey Senozhatsky Cc: Johannes Weiner Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/zswap.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fed15f1345dc8a7fc8baa81e8b55c3ba010d7f4b Author: Peter Xu Date: Wed Jan 4 17:52:05 2023 -0500 mm/hugetlb: pre-allocate pgtable pages for uffd wr-protects Userfaultfd-wp uses pte markers to mark wr-protected pages for both shmem and hugetlb. Shmem has pre-allocation ready for markers, but hugetlb path was overlooked. Doing so by calling huge_pte_alloc() if the initial pgtable walk fails to find the huge ptep. It's possible that huge_pte_alloc() can fail with high memory pressure, in that case stop the loop immediately and fail silently. This is not the most ideal solution but it matches with what we do with shmem meanwhile it avoids the splat in dmesg. Link: https://lkml.kernel.org/r/20230104225207.1066932-2-peterx@redhat.com Fixes: 60dfaad65aa9 ("mm/hugetlb: allow uffd wr-protect none ptes") Signed-off-by: Peter Xu Reported-by: James Houghton Reviewed-by: Mike Kravetz Acked-by: David Hildenbrand Acked-by: James Houghton Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Muchun Song Cc: Nadav Amit Cc: [5.19+] Signed-off-by: Andrew Morton mm/hugetlb.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit b30c14cd61025eeea2f2e8569606cd167ba9ad2d Author: James Houghton Date: Wed Jan 4 23:19:10 2023 +0000 hugetlb: unshare some PMDs when splitting VMAs PMD sharing can only be done in PUD_SIZE-aligned pieces of VMAs; however, it is possible that HugeTLB VMAs are split without unsharing the PMDs first. Without this fix, it is possible to hit the uffd-wp-related WARN_ON_ONCE in hugetlb_change_protection [1]. The key there is that hugetlb_unshare_all_pmds will not attempt to unshare PMDs in non-PUD_SIZE-aligned sections of the VMA. It might seem ideal to unshare in hugetlb_vm_op_open, but we need to unshare in both the new and old VMAs, so unsharing in hugetlb_vm_op_split seems natural. [1]: https://lore.kernel.org/linux-mm/CADrL8HVeOkj0QH5VZZbRzybNE8CG-tEGFshnA+bG9nMgcWtBSg@mail.gmail.com/ Link: https://lkml.kernel.org/r/20230104231910.1464197-1-jthoughton@google.com Fixes: 6dfeaff93be1 ("hugetlb/userfaultfd: unshare all pmds for hugetlbfs when register wp") Signed-off-by: James Houghton Reviewed-by: Mike Kravetz Acked-by: Peter Xu Cc: Axel Rasmussen Cc: Muchun Song Cc: Signed-off-by: Andrew Morton mm/hugetlb.c | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) commit a1193de562f54c7c9f60ca9f2db96e50a7608de1 Author: Suren Baghdasaryan Date: Wed Jan 4 16:02:40 2023 -0800 mm: fix vma->anon_name memory leak for anonymous shmem VMAs free_anon_vma_name() is missing a check for anonymous shmem VMA which leads to a memory leak due to refcount not being dropped. Fix this by calling anon_vma_name_put() unconditionally. It will free vma->anon_name whenever it's non-NULL. Link: https://lkml.kernel.org/r/20230105000241.1450843-1-surenb@google.com Fixes: d09e8ca6cb93 ("mm: anonymous shared memory naming") Signed-off-by: Suren Baghdasaryan Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Reported-by: syzbot+91edf9178386a07d06a7@syzkaller.appspotmail.com Cc: Hugh Dickins Cc: Pasha Tatashin Signed-off-by: Andrew Morton include/linux/mm_inline.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3de0c269adc6c2fac0bb1fb11965f0de699dc32b Author: Zach O'Keefe Date: Sat Dec 24 00:20:35 2022 -0800 mm/shmem: restore SHMEM_HUGE_DENY precedence over MADV_COLLAPSE SHMEM_HUGE_DENY is for emergency use by the admin, to disable allocation of shmem huge pages if, for example, a dangerous bug is found in their usage: see "deny" in Documentation/mm/transhuge.rst. An app using madvise(,,MADV_COLLAPSE) should not be allowed to override it: restore its precedence over shmem_huge_force. Restore SHMEM_HUGE_DENY precedence over MADV_COLLAPSE. Link: https://lkml.kernel.org/r/20221224082035.3197140-2-zokeefe@google.com Fixes: 7c6c6cc4d3a2 ("mm/shmem: add flag to enforce shmem THP in hugepage_vma_check()") Signed-off-by: Zach O'Keefe Suggested-by: Hugh Dickins Acked-by: David Hildenbrand Cc: Yang Shi Cc: Signed-off-by: Andrew Morton mm/shmem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 52dc031088f00e323140ece4004e70c33153c6dd Author: Zach O'Keefe Date: Sat Dec 24 00:20:34 2022 -0800 mm/MADV_COLLAPSE: don't expand collapse when vm_end is past requested end MADV_COLLAPSE acts on one hugepage-aligned/sized region at a time, until it has collapsed all eligible memory contained within the bounds supplied by the user. At the top of each hugepage iteration we (re)lock mmap_lock and (re)validate the VMA for eligibility and update variables that might have changed while mmap_lock was dropped. One thing that might occur is that the VMA could be resized, and as such, we refetch vma->vm_end to make sure we don't collapse past the end of the VMA's new end. However, it's possible that when refetching vma->vm_end that we expand the region acted on by MADV_COLLAPSE if vma->vm_end is greater than size+len supplied by the user. The consequence here is that we may attempt to collapse more memory than requested, possibly yielding either "too much success" or "false failure" user-visible results. An example of the former is if we MADV_COLLAPSE the first 4MiB of a 2TiB mmap()'d file, the incorrect refetch would cause the operation to block for much longer than anticipated as we attempt to collapse the entire TiB region. An example of the latter is that applying MADV_COLLPSE to a 4MiB file mapped to the start of a 6MiB VMA will successfully collapse the first 4MiB, then incorrectly attempt to collapse the last hugepage-aligned/sized region -- fail (since readahead/page cache lookup will fail) -- and report a failure to the user. I don't believe there is a kernel stability concern here as we always (re)validate the VMA / region accordingly. Also as Hugh mentions, the user-visible effects are: we try to collapse more memory than requested by the user, and/or failing an operation that should have otherwise succeeded. An example is trying to collapse a 4MiB file contained within a 12MiB VMA. Don't expand the acted-on region when refetching vma->vm_end. Link: https://lkml.kernel.org/r/20221224082035.3197140-1-zokeefe@google.com Fixes: 4d24de9425f7 ("mm: MADV_COLLAPSE: refetch vm_end after reacquiring mmap_lock") Signed-off-by: Zach O'Keefe Reported-by: Hugh Dickins Cc: Yang Shi Cc: Signed-off-by: Andrew Morton mm/khugepaged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51d3d5eb74ff53b92dcff48b30ae2ed8edd85a32 Author: David Hildenbrand Date: Fri Dec 9 09:09:12 2022 +0100 mm/userfaultfd: enable writenotify while userfaultfd-wp is enabled for a VMA Currently, we don't enable writenotify when enabling userfaultfd-wp on a shared writable mapping (for now only shmem and hugetlb). The consequence is that vma->vm_page_prot will still include write permissions, to be set as default for all PTEs that get remapped (e.g., mprotect(), NUMA hinting, page migration, ...). So far, vma->vm_page_prot is assumed to be a safe default, meaning that we only add permissions (e.g., mkwrite) but not remove permissions (e.g., wrprotect). For example, when enabling softdirty tracking, we enable writenotify. With uffd-wp on shared mappings, that changed. More details on vma->vm_page_prot semantics were summarized in [1]. This is problematic for uffd-wp: we'd have to manually check for a uffd-wp PTEs/PMDs and manually write-protect PTEs/PMDs, which is error prone. Prone to such issues is any code that uses vma->vm_page_prot to set PTE permissions: primarily pte_modify() and mk_pte(). Instead, let's enable writenotify such that PTEs/PMDs/... will be mapped write-protected as default and we will only allow selected PTEs that are definitely safe to be mapped without write-protection (see can_change_pte_writable()) to be writable. In the future, we might want to enable write-bit recovery -- e.g., can_change_pte_writable() -- at more locations, for example, also when removing uffd-wp protection. This fixes two known cases: (a) remove_migration_pte() mapping uffd-wp'ed PTEs writable, resulting in uffd-wp not triggering on write access. (b) do_numa_page() / do_huge_pmd_numa_page() mapping uffd-wp'ed PTEs/PMDs writable, resulting in uffd-wp not triggering on write access. Note that do_numa_page() / do_huge_pmd_numa_page() can be reached even without NUMA hinting (which currently doesn't seem to be applicable to shmem), for example, by using uffd-wp with a PROT_WRITE shmem VMA. On such a VMA, userfaultfd-wp is currently non-functional. Note that when enabling userfaultfd-wp, there is no need to walk page tables to enforce the new default protection for the PTEs: we know that they cannot be uffd-wp'ed yet, because that can only happen after enabling uffd-wp for the VMA in general. Also note that this makes mprotect() on ranges with uffd-wp'ed PTEs not accidentally set the write bit -- which would result in uffd-wp not triggering on later write access. This commit makes uffd-wp on shmem behave just like uffd-wp on anonymous memory in that regard, even though, mixing mprotect with uffd-wp is controversial. [1] https://lkml.kernel.org/r/92173bad-caa3-6b43-9d1e-9a471fdbc184@redhat.com Link: https://lkml.kernel.org/r/20221209080912.7968-1-david@redhat.com Fixes: b1f9e876862d ("mm/uffd: enable write protection for shmem & hugetlbfs") Signed-off-by: David Hildenbrand Reported-by: Ives van Hoorne Debugged-by: Peter Xu Acked-by: Peter Xu Cc: Hugh Dickins Cc: Alistair Popple Cc: Mike Rapoport Cc: Nadav Amit Cc: Andrea Arcangeli Cc: Signed-off-by: Andrew Morton fs/userfaultfd.c | 28 ++++++++++++++++++++++------ mm/mmap.c | 4 ++++ 2 files changed, 26 insertions(+), 6 deletions(-) commit ab0c3f1251b4670978fde0bd54161795a139b060 Author: Hugh Dickins Date: Thu Dec 22 12:41:50 2022 -0800 mm/khugepaged: fix collapse_pte_mapped_thp() to allow anon_vma uprobe_write_opcode() uses collapse_pte_mapped_thp() to restore huge pmd, when removing a breakpoint from hugepage text: vma->anon_vma is always set in that case, so undo the prohibition. And MADV_COLLAPSE ought to be able to collapse some page tables in a vma which happens to have anon_vma set from CoWing elsewhere. Is anon_vma lock required? Almost not: if any page other than expected subpage of the non-anon huge page is found in the page table, collapse is aborted without making any change. However, it is possible that an anon page was CoWed from this extent in another mm or vma, in which case a concurrent lookup might look here: so keep it away while clearing pmd (but perhaps we shall go back to using pmd_lock() there in future). Note that collapse_pte_mapped_thp() is exceptional in freeing a page table without having cleared its ptes: I'm uneasy about that, and had thought pte_clear()ing appropriate; but exclusive i_mmap lock does fix the problem, and we would have to move the mmu_notification if clearing those ptes. What this fixes is not a dangerous instability. But I suggest Cc stable because uprobes "healing" has regressed in that way, so this should follow 8d3c106e19e8 into those stable releases where it was backported (and may want adjustment there - I'll supply backports as needed). Link: https://lkml.kernel.org/r/b740c9fb-edba-92ba-59fb-7a5592e5dfc@google.com Fixes: 8d3c106e19e8 ("mm/khugepaged: take the right locks for page table retraction") Signed-off-by: Hugh Dickins Acked-by: David Hildenbrand Cc: Jann Horn Cc: Yang Shi Cc: Zach O'Keefe Cc: Song Liu Cc: [5.4+] Signed-off-by: Andrew Morton mm/khugepaged.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 44f86392bdd165da7e43d3c772aeb1e128ffd6c8 Author: David Hildenbrand Date: Thu Dec 22 21:55:11 2022 +0100 mm/hugetlb: fix uffd-wp handling for migration entries in hugetlb_change_protection() We have to update the uffd-wp SWP PTE bit independent of the type of migration entry. Currently, if we're unlucky and we want to install/clear the uffd-wp bit just while we're migrating a read-only mapped hugetlb page, we would miss to set/clear the uffd-wp bit. Further, if we're processing a readable-exclusive migration entry and neither want to set or clear the uffd-wp bit, we could currently end up losing the uffd-wp bit. Note that the same would hold for writable migrating entries, however, having a writable migration entry with the uffd-wp bit set would already mean that something went wrong. Note that the change from !is_readable_migration_entry -> writable_migration_entry is harmless and actually cleaner, as raised by Miaohe Lin and discussed in [1]. [1] https://lkml.kernel.org/r/90dd6a93-4500-e0de-2bf0-bf522c311b0c@huawei.com Link: https://lkml.kernel.org/r/20221222205511.675832-3-david@redhat.com Fixes: 60dfaad65aa9 ("mm/hugetlb: allow uffd wr-protect none ptes") Signed-off-by: David Hildenbrand Reviewed-by: Mike Kravetz Cc: Miaohe Lin Cc: Muchun Song Cc: Peter Xu Cc: Signed-off-by: Andrew Morton mm/hugetlb.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 0e678153f5be7e6c8d28835f5a678618da4b7a9c Author: David Hildenbrand Date: Thu Dec 22 21:55:10 2022 +0100 mm/hugetlb: fix PTE marker handling in hugetlb_change_protection() Patch series "mm/hugetlb: uffd-wp fixes for hugetlb_change_protection()". Playing with virtio-mem and background snapshots (using uffd-wp) on hugetlb in QEMU, I managed to trigger a VM_BUG_ON(). Looking into the details, hugetlb_change_protection() seems to not handle uffd-wp correctly in all cases. Patch #1 fixes my test case. I don't have reproducers for patch #2, as it requires running into migration entries. I did not yet check in detail yet if !hugetlb code requires similar care. This patch (of 2): There are two problematic cases when stumbling over a PTE marker in hugetlb_change_protection(): (1) We protect an uffd-wp PTE marker a second time using uffd-wp: we will end up in the "!huge_pte_none(pte)" case and mess up the PTE marker. (2) We unprotect a uffd-wp PTE marker: we will similarly end up in the "!huge_pte_none(pte)" case even though we cleared the PTE, because the "pte" variable is stale. We'll mess up the PTE marker. For example, if we later stumble over such a "wrongly modified" PTE marker, we'll treat it like a present PTE that maps some garbage page. This can, for example, be triggered by mapping a memfd backed by huge pages, registering uffd-wp, uffd-wp'ing an unmapped page and (a) uffd-wp'ing it a second time; or (b) uffd-unprotecting it; or (c) unregistering uffd-wp. Then, ff we trigger fallocate(FALLOC_FL_PUNCH_HOLE) on that file range, we will run into a VM_BUG_ON: [ 195.039560] page:00000000ba1f2987 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x0 [ 195.039565] flags: 0x7ffffc0001000(reserved|node=0|zone=0|lastcpupid=0x1fffff) [ 195.039568] raw: 0007ffffc0001000 ffffe742c0000008 ffffe742c0000008 0000000000000000 [ 195.039569] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 [ 195.039569] page dumped because: VM_BUG_ON_PAGE(compound && !PageHead(page)) [ 195.039573] ------------[ cut here ]------------ [ 195.039574] kernel BUG at mm/rmap.c:1346! [ 195.039579] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [ 195.039581] CPU: 7 PID: 4777 Comm: qemu-system-x86 Not tainted 6.0.12-200.fc36.x86_64 #1 [ 195.039583] Hardware name: LENOVO 20WNS1F81N/20WNS1F81N, BIOS N35ET50W (1.50 ) 09/15/2022 [ 195.039584] RIP: 0010:page_remove_rmap+0x45b/0x550 [ 195.039588] Code: [...] [ 195.039589] RSP: 0018:ffffbc03c3633ba8 EFLAGS: 00010292 [ 195.039591] RAX: 0000000000000040 RBX: ffffe742c0000000 RCX: 0000000000000000 [ 195.039592] RDX: 0000000000000002 RSI: ffffffff8e7aac1a RDI: 00000000ffffffff [ 195.039592] RBP: 0000000000000001 R08: 0000000000000000 R09: ffffbc03c3633a08 [ 195.039593] R10: 0000000000000003 R11: ffffffff8f146328 R12: ffff9b04c42754b0 [ 195.039594] R13: ffffffff8fcc6328 R14: ffffbc03c3633c80 R15: ffff9b0484ab9100 [ 195.039595] FS: 00007fc7aaf68640(0000) GS:ffff9b0bbf7c0000(0000) knlGS:0000000000000000 [ 195.039596] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 195.039597] CR2: 000055d402c49110 CR3: 0000000159392003 CR4: 0000000000772ee0 [ 195.039598] PKRU: 55555554 [ 195.039599] Call Trace: [ 195.039600] [ 195.039602] __unmap_hugepage_range+0x33b/0x7d0 [ 195.039605] unmap_hugepage_range+0x55/0x70 [ 195.039608] hugetlb_vmdelete_list+0x77/0xa0 [ 195.039611] hugetlbfs_fallocate+0x410/0x550 [ 195.039612] ? _raw_spin_unlock_irqrestore+0x23/0x40 [ 195.039616] vfs_fallocate+0x12e/0x360 [ 195.039618] __x64_sys_fallocate+0x40/0x70 [ 195.039620] do_syscall_64+0x58/0x80 [ 195.039623] ? syscall_exit_to_user_mode+0x17/0x40 [ 195.039624] ? do_syscall_64+0x67/0x80 [ 195.039626] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 195.039628] RIP: 0033:0x7fc7b590651f [ 195.039653] Code: [...] [ 195.039654] RSP: 002b:00007fc7aaf66e70 EFLAGS: 00000293 ORIG_RAX: 000000000000011d [ 195.039655] RAX: ffffffffffffffda RBX: 0000558ef4b7f370 RCX: 00007fc7b590651f [ 195.039656] RDX: 0000000018000000 RSI: 0000000000000003 RDI: 000000000000000c [ 195.039657] RBP: 0000000008000000 R08: 0000000000000000 R09: 0000000000000073 [ 195.039658] R10: 0000000008000000 R11: 0000000000000293 R12: 0000000018000000 [ 195.039658] R13: 00007fb8bbe00000 R14: 000000000000000c R15: 0000000000001000 [ 195.039661] Fix it by not going into the "!huge_pte_none(pte)" case if we stumble over an exclusive marker. spin_unlock() + continue would get the job done. However, instead, make it clearer that there are no fall-through statements: we process each case (hwpoison, migration, marker, !none, none) and then unlock the page table to continue with the next PTE. Let's avoid "continue" statements and use a single spin_unlock() at the end. Link: https://lkml.kernel.org/r/20221222205511.675832-1-david@redhat.com Link: https://lkml.kernel.org/r/20221222205511.675832-2-david@redhat.com Fixes: 60dfaad65aa9 ("mm/hugetlb: allow uffd wr-protect none ptes") Signed-off-by: David Hildenbrand Reviewed-by: Peter Xu Reviewed-by: Mike Kravetz Cc: Miaohe Lin Cc: Muchun Song Cc: Signed-off-by: Andrew Morton mm/hugetlb.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit f12cd06109f47c2fb4b23a45ab55404c47ef7fae Author: Yang Yingliang Date: Wed Dec 28 17:36:03 2022 +0800 powerpc/64s/hash: Make stress_hpt_timer_fn() static stress_hpt_timer_fn() is only used in hash_utils.c, make it static. Fixes: 6b34a099faa1 ("powerpc/64s/hash: add stress_hpt kernel boot option to increase hash faults") Signed-off-by: Yang Yingliang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221228093603.3166599-1-yangyingliang@huawei.com arch/powerpc/mm/book3s64/hash_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8f60cd7db24f94f2dbed6bec30dd16a68fc0828 Merge: 7dd4b804e080 cf129830ee82 Author: Linus Torvalds Date: Wed Jan 11 17:12:14 2023 -0600 Merge tag 'perf-tools-fixes-for-v6.2-2-2023-01-11' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Make 'perf kmem' cope with the removal of some kmem:kmem_cache_alloc_node and kmem:kmalloc_node in the 11e9734bcb6a7361 ("mm/slab_common: unify NUMA and UMA version of tracepoints") commit, making sure it works with Linux >= 6.2 as well as with older kernels where those tracepoints are present. - Also make it handle the new "node" kmem:kmalloc and kmem:kmem_cache_alloc tracepoint field introduced in that same commit. - Fix hardware tracing PMU address filter duplicate symbol selection, that was preventing to match with static functions with the same name present in different object files. - Fix regression on what linux/types.h file gets used to build the "BPF prologue" 'perf test' entry, the system one lacks the fmode_t definition used in this test, so provide that type in the test itself. - Avoid build breakage with libbpf < 0.8.0 + LIBBPF_DYNAMIC=1. If the user asks for linking with the libbpf package provided by the distro, then it has to be >= 0.8.0. Using the libbpf supplied with the kernel would be a fallback in that case. - Fix the build when libbpf isn't available or explicitly disabled via NO_LIBBPF=1. - Don't try to install libtraceevent plugins as its not anymore in the kernel sources and will thus always fail. * tag 'perf-tools-fixes-for-v6.2-2-2023-01-11' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf auxtrace: Fix address filter duplicate symbol selection perf bpf: Avoid build breakage with libbpf < 0.8.0 + LIBBPF_DYNAMIC=1 perf build: Fix build error when NO_LIBBPF=1 perf tools: Don't install libtraceevent plugins as its not anymore in the kernel sources perf kmem: Support field "node" in evsel__process_alloc_event() coping with recent tracepoint restructuring perf kmem: Support legacy tracepoints perf build: Properly guard libbpf includes perf tests bpf prologue: Fix bpf-script-test-prologue test compile issue with clang commit 310bc39546a435c83cc27a0eba878afac0d74714 Author: David Woodhouse Date: Wed Jan 11 18:06:51 2023 +0000 KVM: x86/xen: Avoid deadlock by adding kvm->arch.xen.xen_lock leaf node lock In commit 14243b387137a ("KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and event channel delivery") the clever version of me left some helpful notes for those who would come after him: /* * For the irqfd workqueue, using the main kvm->lock mutex is * fine since this function is invoked from kvm_set_irq() with * no other lock held, no srcu. In future if it will be called * directly from a vCPU thread (e.g. on hypercall for an IPI) * then it may need to switch to using a leaf-node mutex for * serializing the shared_info mapping. */ mutex_lock(&kvm->lock); In commit 2fd6df2f2b47 ("KVM: x86/xen: intercept EVTCHNOP_send from guests") the other version of me ran straight past that comment without reading it, and introduced a potential deadlock by taking vcpu->mutex and kvm->lock in the wrong order. Solve this as originally suggested, by adding a leaf-node lock in the Xen state rather than using kvm->lock for it. Fixes: 2fd6df2f2b47 ("KVM: x86/xen: intercept EVTCHNOP_send from guests") Signed-off-by: David Woodhouse Message-Id: <20230111180651.14394-4-dwmw2@infradead.org> [Rebase, add docs. - Paolo] Signed-off-by: Paolo Bonzini Documentation/virt/kvm/locking.rst | 2 +- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/xen.c | 67 +++++++++++++++++--------------------- 3 files changed, 32 insertions(+), 38 deletions(-) commit a48fe6376919c182597b737984bb905a909727c2 Author: Bjorn Helgaas Date: Tue Jan 10 12:02:42 2023 -0600 x86/pci: Simplify is_mmconf_reserved() messages is_mmconf_reserved() takes a "with_e820" parameter that only determines the message logged if it finds the MMCONFIG region is reserved. Pass the message directly, which will simplify a future patch that adds a new way of looking for that reservation. No functional change intended. Link: https://lore.kernel.org/r/20230110180243.1590045-2-helgaas@kernel.org Tested-by: Tony Luck Tested-by: Giovanni Cabiddu Tested-by: Kan Liang Signed-off-by: Bjorn Helgaas Reviewed-by: Dan Williams arch/x86/pci/mmconfig-shared.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit a33ae832bf3f2ac33e2e44b99f76130d3be848c5 Author: Akira Yokosawa Date: Tue Jan 10 18:47:25 2023 +0900 docs/conf.py: Use about.html only in sidebar of alabaster theme "about.html" is available only for the alabaster theme [1]. Unconditionally putting it to html_sidebars prevents us from using other themes which respect html_sidebars. Remove about.html from the initialization and insert it at the front for the alabaster theme. Link: [1] https://alabaster.readthedocs.io/en/latest/installation.html#sidebars Fixes: d5389d3145ef ("docs: Switch the default HTML theme to alabaster") Signed-off-by: Akira Yokosawa Cc: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4b162dbe-2a7f-1710-93e0-754cf8680aae@gmail.com Signed-off-by: Jonathan Corbet Documentation/conf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1ecf7bd9c267ab85aff3c4a17fe56bc9754a13be Author: Heiko Carstens Date: Wed Jan 11 15:04:47 2023 +0100 s390: update defconfigs Signed-off-by: Heiko Carstens arch/s390/configs/debug_defconfig | 7 ++++--- arch/s390/configs/defconfig | 6 ++++-- arch/s390/configs/zfcpdump_defconfig | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) commit 85e79ec7b78f863178ca488fd8cb5b3de6347756 Author: Naohiro Aota Date: Tue Jan 10 15:04:32 2023 +0900 btrfs: zoned: enable metadata over-commit for non-ZNS setup The commit 79417d040f4f ("btrfs: zoned: disable metadata overcommit for zoned") disabled the metadata over-commit to track active zones properly. However, it also introduced a heavy overhead by allocating new metadata block groups and/or flushing dirty buffers to release the space reservations. Specifically, a workload (write only without any sync operations) worsen its performance from 343.77 MB/sec (v5.19) to 182.89 MB/sec (v6.0). The performance is still bad on current misc-next which is 187.95 MB/sec. And, with this patch applied, it improves back to 326.70 MB/sec (+73.82%). This patch introduces a new fs_info->flag BTRFS_FS_NO_OVERCOMMIT to indicate it needs to disable the metadata over-commit. The flag is enabled when a device with max active zones limit is loaded into a file-system. Fixes: 79417d040f4f ("btrfs: zoned: disable metadata overcommit for zoned") CC: stable@vger.kernel.org # 6.0+ Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/fs.h | 6 ++++++ fs/btrfs/space-info.c | 3 ++- fs/btrfs/zoned.c | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) commit 75181406b4eafacc531ff2ee5fb032bd93317e2b Author: Qu Wenruo Date: Tue Jan 10 15:14:17 2023 +0800 btrfs: qgroup: do not warn on record without old_roots populated [BUG] There are some reports from the mailing list that since v6.1 kernel, the WARN_ON() inside btrfs_qgroup_account_extent() gets triggered during rescan: WARNING: CPU: 3 PID: 6424 at fs/btrfs/qgroup.c:2756 btrfs_qgroup_account_extents+0x1ae/0x260 [btrfs] CPU: 3 PID: 6424 Comm: snapperd Tainted: P OE 6.1.2-1-default #1 openSUSE Tumbleweed 05c7a1b1b61d5627475528f71f50444637b5aad7 RIP: 0010:btrfs_qgroup_account_extents+0x1ae/0x260 [btrfs] Call Trace: btrfs_commit_transaction+0x30c/0xb40 [btrfs c39c9c546c241c593f03bd6d5f39ea1b676250f6] ? start_transaction+0xc3/0x5b0 [btrfs c39c9c546c241c593f03bd6d5f39ea1b676250f6] btrfs_qgroup_rescan+0x42/0xc0 [btrfs c39c9c546c241c593f03bd6d5f39ea1b676250f6] btrfs_ioctl+0x1ab9/0x25c0 [btrfs c39c9c546c241c593f03bd6d5f39ea1b676250f6] ? __rseq_handle_notify_resume+0xa9/0x4a0 ? mntput_no_expire+0x4a/0x240 ? __seccomp_filter+0x319/0x4d0 __x64_sys_ioctl+0x90/0xd0 do_syscall_64+0x5b/0x80 ? syscall_exit_to_user_mode+0x17/0x40 ? do_syscall_64+0x67/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fd9b790d9bf [CAUSE] Since commit e15e9f43c7ca ("btrfs: introduce BTRFS_QGROUP_RUNTIME_FLAG_NO_ACCOUNTING to skip qgroup accounting"), if our qgroup is already in inconsistent state, we will no longer do the time-consuming backref walk. This can leave some qgroup records without a valid old_roots ulist. Normally this is fine, as btrfs_qgroup_account_extents() would also skip those records if we have NO_ACCOUNTING flag set. But there is a small window, if we have NO_ACCOUNTING flag set, and inserted some qgroup_record without a old_roots ulist, but then the user triggered a qgroup rescan. During btrfs_qgroup_rescan(), we firstly clear NO_ACCOUNTING flag, then commit current transaction. And since we have a qgroup_record with old_roots = NULL, we trigger the WARN_ON() during btrfs_qgroup_account_extents(). [FIX] Unfortunately due to the introduction of NO_ACCOUNTING flag, the assumption that every qgroup_record would have its old_roots populated is no longer correct. Fix the false alerts and drop the WARN_ON(). Reported-by: Lukas Straub Reported-by: HanatoK Fixes: e15e9f43c7ca ("btrfs: introduce BTRFS_QGROUP_RUNTIME_FLAG_NO_ACCOUNTING to skip qgroup accounting") CC: stable@vger.kernel.org # 6.1 Link: https://lore.kernel.org/linux-btrfs/2403c697-ddaf-58ad-3829-0335fc89df09@gmail.com/ Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit ed02363fbbed52a3f5ea0d188edd09045a806eb5 Author: Qu Wenruo Date: Mon Dec 12 10:19:37 2022 +0800 btrfs: add extra error messages to cover non-ENOMEM errors from device_add_list() [BUG] When test case btrfs/219 (aka, mount a registered device but with a lower generation) failed, there is not any useful information for the end user to find out what's going wrong. The mount failure just looks like this: # mount -o loop /tmp/219.img2 /mnt/btrfs/ mount: /mnt/btrfs: mount(2) system call failed: File exists. dmesg(1) may have more information after failed mount system call. While the dmesg contains nothing but the loop device change: loop1: detected capacity change from 0 to 524288 [CAUSE] In device_list_add() we have a lot of extra checks to reject invalid cases. That function also contains the regular device scan result like the following prompt: BTRFS: device fsid 6222333e-f9f1-47e6-b306-55ddd4dcaef4 devid 1 transid 8 /dev/loop0 scanned by systemd-udevd (3027) But unfortunately not all errors have their own error messages, thus if we hit something wrong in device_add_list(), there may be no error messages at all. [FIX] Add errors message for all non-ENOMEM errors. For ENOMEM, I'd say we're in a much worse situation, and there should be some OOM messages way before our call sites. CC: stable@vger.kernel.org # 6.0+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 42a90008f890afc41837dfeec1f0b1e7bcecf94a Author: David Woodhouse Date: Wed Jan 11 18:06:50 2023 +0000 KVM: Ensure lockdep knows about kvm->lock vs. vcpu->mutex ordering rule Documentation/virt/kvm/locking.rst tells us that kvm->lock is taken outside vcpu->mutex. But that doesn't actually happen very often; it's only in some esoteric cases like migration with AMD SEV. This means that lockdep usually doesn't notice, and doesn't do its job of keeping us honest. Ensure that lockdep *always* knows about the ordering of these two locks, by briefly taking vcpu->mutex in kvm_vm_ioctl_create_vcpu() while kvm->lock is held. Signed-off-by: David Woodhouse Message-Id: <20230111180651.14394-3-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bbe17c625d6843e9cdf14d81fbece1b0f0c3fb2f Author: David Woodhouse Date: Wed Jan 11 18:06:49 2023 +0000 KVM: x86/xen: Fix potential deadlock in kvm_xen_update_runstate_guest() The kvm_xen_update_runstate_guest() function can be called when the vCPU is being scheduled out, from a preempt notifier. It *opportunistically* updates the runstate area in the guest memory, if the gfn_to_pfn_cache which caches the appropriate address is still valid. If there is *contention* when it attempts to obtain gpc->lock, then locking inside the priority inheritance checks may cause a deadlock. Lockdep reports: [13890.148997] Chain exists of: &gpc->lock --> &p->pi_lock --> &rq->__lock [13890.149002] Possible unsafe locking scenario: [13890.149003] CPU0 CPU1 [13890.149004] ---- ---- [13890.149005] lock(&rq->__lock); [13890.149007] lock(&p->pi_lock); [13890.149009] lock(&rq->__lock); [13890.149011] lock(&gpc->lock); [13890.149013] *** DEADLOCK *** In the general case, if there's contention for a read lock on gpc->lock, that's going to be because something else is either invalidating or revalidating the cache. Either way, we've raced with seeing it in an invalid state, in which case we would have aborted the opportunistic update anyway. So in the 'atomic' case when called from the preempt notifier, just switch to using read_trylock() and avoid the PI handling altogether. Signed-off-by: David Woodhouse Message-Id: <20230111180651.14394-2-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 23e60258aeafb04e5dd813f03cb0c8ab7b01462a Author: David Woodhouse Date: Wed Jan 11 18:06:48 2023 +0000 KVM: x86/xen: Fix lockdep warning on "recursive" gpc locking In commit 5ec3289b31 ("KVM: x86/xen: Compatibility fixes for shared runstate area") we declared it safe to obtain two gfn_to_pfn_cache locks at the same time: /* * The guest's runstate_info is split across two pages and we * need to hold and validate both GPCs simultaneously. We can * declare a lock ordering GPC1 > GPC2 because nothing else * takes them more than one at a time. */ However, we forgot to tell lockdep. Do so, by setting a subclass on the first lock before taking the second. Fixes: 5ec3289b31 ("KVM: x86/xen: Compatibility fixes for shared runstate area") Suggested-by: Peter Zijlstra Signed-off-by: David Woodhouse Message-Id: <20230111180651.14394-1-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 71d0393576e9e1ef536c3bc3cf11f661c58dded9 Merge: 3a9ae31ac26a de535c0234dd Author: Paolo Bonzini Date: Wed Jan 11 13:31:53 2023 -0500 Merge tag 'kvmarm-fixes-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master KVM/arm64 fixes for 6.2, take #1 - 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 step for not being able to correctly implement the vgic SEIS feature, just liek the M1 before it - Reviewer updates: Alex is stepping down, replaced by Zenghui commit 3a9ae31ac26a58d33008c42f6cd022afc2af2dc0 Author: Paolo Bonzini Date: Mon Jan 9 06:02:16 2023 -0500 Documentation: kvm: fix SRCU locking order docs kvm->srcu is taken in KVM_RUN and several other vCPU ioctls, therefore vcpu->mutex is susceptible to the same deadlock that is documented for kvm->slots_lock. The same holds for kvm->lock, since kvm->lock is held outside vcpu->mutex. Fix the documentation and rearrange it to highlight the difference between these locks and kvm->slots_arch_lock, and how kvm->slots_arch_lock can be useful while processing a vmexit. Signed-off-by: Paolo Bonzini Documentation/virt/kvm/locking.rst | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 696e1a48b1a1b01edad542a1ef293665864a4dd0 Author: Pablo Neira Ayuso Date: Wed Jan 11 17:07:33 2023 +0100 netfilter: nft_payload: incorrect arithmetics when fetching VLAN header bits If the offset + length goes over the ethernet + vlan header, then the length is adjusted to copy the bytes that are within the boundaries of the vlan_ethhdr scratchpad area. The remaining bytes beyond ethernet + vlan header are copied directly from the skbuff data area. Fix incorrect arithmetic operator: subtract, not add, the size of the vlan header in case of double-tagged packets to adjust the length accordingly to address CVE-2023-0179. Reported-by: Davide Ornaghi Fixes: f6ae9f120dad ("netfilter: nft_payload: add C-VLAN support") Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_payload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ea4b476cea1b7d461d16dda25ca3c7e616e2d15 Author: Gavrilov Ilia Date: Wed Jan 11 11:57:39 2023 +0000 netfilter: ipset: Fix overflow before widen in the bitmap_ip_create() function. When first_ip is 0, last_ip is 0xFFFFFFFF, and netmask is 31, the value of an arithmetic expression 2 << (netmask - mask_bits - 1) is subject to overflow due to a failure casting operands to a larger data type before performing the arithmetic. Note that it's harmless since the value will be checked at the next step. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE. Fixes: b9fed748185a ("netfilter: ipset: Check and reject crazy /0 input parameters") Signed-off-by: Ilia.Gavrilov Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/ip_set_bitmap_ip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c273289fac370b6488757236cd62cc2cf04830b7 Author: Florian Westphal Date: Wed Jan 4 12:54:42 2023 +0100 selftests: netfilter: fix transaction test script timeout handling The kselftest framework uses a default timeout of 45 seconds for all test scripts. Increase the timeout to two minutes for the netfilter tests, this should hopefully be enough, Make sure that, should the script be canceled, the net namespace and the spawned ping instances are removed. Fixes: 25d8bcedbf43 ("selftests: add script to stress-test nft packet path vs. control plane") Reported-by: Mirsad Goran Todorovac Signed-off-by: Florian Westphal Tested-by: Mirsad Goran Todorovac Signed-off-by: Pablo Neira Ayuso tools/testing/selftests/netfilter/nft_trans_stress.sh | 16 +++++++++------- tools/testing/selftests/netfilter/settings | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) commit cf129830ee820f7fc90b98df193cd49d49344d09 Author: Adrian Hunter Date: Tue Jan 10 20:56:59 2023 +0200 perf auxtrace: Fix address filter duplicate symbol selection When a match has been made to the nth duplicate symbol, return success not error. Example: Before: $ cat file.c cat: file.c: No such file or directory $ cat file1.c #include static void func(void) { printf("First func\n"); } void other(void); int main() { func(); other(); return 0; } $ cat file2.c #include static void func(void) { printf("Second func\n"); } void other(void) { func(); } $ gcc -Wall -Wextra -o test file1.c file2.c $ perf record -e intel_pt//u --filter 'filter func @ ./test' -- ./test Multiple symbols with name 'func' #1 0x1149 l func which is near main #2 0x1179 l func which is near other Disambiguate symbol name by inserting #n after the name e.g. func #2 Or select a global symbol by inserting #0 or #g or #G Failed to parse address filter: 'filter func @ ./test' Filter format is: filter|start|stop|tracestop [/ ] [@] Where multiple filters are separated by space or comma. $ perf record -e intel_pt//u --filter 'filter func #2 @ ./test' -- ./test Failed to parse address filter: 'filter func #2 @ ./test' Filter format is: filter|start|stop|tracestop [/ ] [@] Where multiple filters are separated by space or comma. After: $ perf record -e intel_pt//u --filter 'filter func #2 @ ./test' -- ./test First func Second func [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.016 MB perf.data ] $ perf script --itrace=b -Ftime,flags,ip,sym,addr --ns 1231062.526977619: tr strt 0 [unknown] => 558495708179 func 1231062.526977619: tr end call 558495708188 func => 558495708050 _init 1231062.526979286: tr strt 0 [unknown] => 55849570818d func 1231062.526979286: tr end return 55849570818f func => 55849570819d other Fixes: 1b36c03e356936d6 ("perf record: Add support for using symbols in address filters") Reported-by: Dmitrii Dolgov <9erthalion6@gmail.com> Signed-off-by: Adrian Hunter Tested-by: Dmitry Dolgov <9erthalion6@gmail.com> Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230110185659.15979-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/auxtrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a66f1efcf748febea7758c4c3c8b5bc5294949ef Author: Rob Clark Date: Tue Jan 10 13:28:59 2023 -0800 drm/msm/gpu: Fix potential double-free If userspace was calling the MSM_SET_PARAM ioctl on multiple threads to set the COMM or CMDLINE param, it could trigger a race causing the previous value to be kfree'd multiple times. Fix this by serializing on the gpu lock. Signed-off-by: Rob Clark Fixes: d4726d770068 ("drm/msm: Add a way to override processes comm/cmdline") Patchwork: https://patchwork.freedesktop.org/patch/517778/ Link: https://lore.kernel.org/r/20230110212903.1925878-1-robdclark@gmail.com drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 ++++ drivers/gpu/drm/msm/msm_gpu.c | 2 ++ drivers/gpu/drm/msm/msm_gpu.h | 12 ++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) commit e752e5454e6417da3f40ec1306a041ea96c56423 Author: Joel Fernandes (Google) Date: Mon Jan 9 22:25:47 2023 +0000 adreno: Shutdown the GPU properly During kexec on ARM device, we notice that device_shutdown() only calls pm_runtime_force_suspend() while shutting down the GPU. This means the GPU kthread is still running and further, there maybe active submits. This causes all kinds of issues during a kexec reboot: Warning from shutdown path: [ 292.509662] WARNING: CPU: 0 PID: 6304 at [...] adreno_runtime_suspend+0x3c/0x44 [ 292.509863] Hardware name: Google Lazor (rev3 - 8) with LTE (DT) [ 292.509872] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 292.509881] pc : adreno_runtime_suspend+0x3c/0x44 [ 292.509891] lr : pm_generic_runtime_suspend+0x30/0x44 [ 292.509905] sp : ffffffc014473bf0 [...] [ 292.510043] Call trace: [ 292.510051] adreno_runtime_suspend+0x3c/0x44 [ 292.510061] pm_generic_runtime_suspend+0x30/0x44 [ 292.510071] pm_runtime_force_suspend+0x54/0xc8 [ 292.510081] adreno_shutdown+0x1c/0x28 [ 292.510090] platform_shutdown+0x2c/0x38 [ 292.510104] device_shutdown+0x158/0x210 [ 292.510119] kernel_restart_prepare+0x40/0x4c And here from GPU kthread, an SError OOPs: [ 192.648789] el1h_64_error+0x7c/0x80 [ 192.648812] el1_interrupt+0x20/0x58 [ 192.648833] el1h_64_irq_handler+0x18/0x24 [ 192.648854] el1h_64_irq+0x7c/0x80 [ 192.648873] local_daif_inherit+0x10/0x18 [ 192.648900] el1h_64_sync_handler+0x48/0xb4 [ 192.648921] el1h_64_sync+0x7c/0x80 [ 192.648941] a6xx_gmu_set_oob+0xbc/0x1fc [ 192.648968] a6xx_hw_init+0x44/0xe38 [ 192.648991] msm_gpu_hw_init+0x48/0x80 [ 192.649013] msm_gpu_submit+0x5c/0x1a8 [ 192.649034] msm_job_run+0xb0/0x11c [ 192.649058] drm_sched_main+0x170/0x434 [ 192.649086] kthread+0x134/0x300 [ 192.649114] ret_from_fork+0x10/0x20 Fix by calling adreno_system_suspend() in the device_shutdown() path. [ Applied Rob Clark feedback on fixing adreno_unbind() similarly, also tested as above. ] Cc: Rob Clark Cc: Steven Rostedt Cc: Ricardo Ribalda Cc: Ross Zwisler Signed-off-by: Joel Fernandes (Google) Reviewed-by: Ricardo Ribalda Reviewed-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/517633/ Link: https://lore.kernel.org/r/20230109222547.1368644-1-joel@joelfernandes.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3cb0f23039e0e3395a96e0f52bd69910ced2f720 Author: Masahiro Yamada Date: Fri Jan 6 17:18:21 2023 +0100 ARM: 9284/1: include from proc-macros.S to fix -Wundef warnings Since commit 80b6093b55e3 ("kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds"), building with W=1 detects -Wundef warnings for assembly code. $ make W=1 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- arch/arm/mm/ [snip] AS arch/arm/mm/cache-v7.o In file included from arch/arm/mm/cache-v7.S:17: arch/arm/mm/proc-macros.S:109:5: warning: "L_PTE_SHARED" is not defined, evaluates to 0 [-Wundef] 109 | #if L_PTE_SHARED != PTE_EXT_SHARED | ^~~~~~~~~~~~ arch/arm/mm/proc-macros.S:109:21: warning: "PTE_EXT_SHARED" is not defined, evaluates to 0 [-Wundef] 109 | #if L_PTE_SHARED != PTE_EXT_SHARED | ^~~~~~~~~~~~~~ arch/arm/mm/proc-macros.S:113:10: warning: "L_PTE_XN" is not defined, evaluates to 0 [-Wundef] 113 | (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\ | ^~~~~~~~ arch/arm/mm/proc-macros.S:113:19: warning: "L_PTE_USER" is not defined, evaluates to 0 [-Wundef] 113 | (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\ | ^~~~~~~~~~ arch/arm/mm/proc-macros.S:113:30: warning: "L_PTE_RDONLY" is not defined, evaluates to 0 [-Wundef] 113 | (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\ | ^~~~~~~~~~~~ arch/arm/mm/proc-macros.S:113:43: warning: "L_PTE_DIRTY" is not defined, evaluates to 0 [-Wundef] 113 | (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\ | ^~~~~~~~~~~ arch/arm/mm/proc-macros.S:113:55: warning: "L_PTE_YOUNG" is not defined, evaluates to 0 [-Wundef] 113 | (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\ | ^~~~~~~~~~~ arch/arm/mm/proc-macros.S:114:10: warning: "L_PTE_PRESENT" is not defined, evaluates to 0 [-Wundef] 114 | L_PTE_PRESENT) > L_PTE_SHARED | ^~~~~~~~~~~~~ arch/arm/mm/proc-macros.S:114:27: warning: "L_PTE_SHARED" is not defined, evaluates to 0 [-Wundef] 114 | L_PTE_PRESENT) > L_PTE_SHARED | ^~~~~~~~~~~~ Include from proc-macros.S to fix the warnings. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King (Oracle) arch/arm/mm/proc-macros.S | 1 + 1 file changed, 1 insertion(+) commit a4e03921c1bb118e6718e0a3b0322a2c13ed172b Author: Giulio Benetti Date: Tue Dec 13 20:24:03 2022 +0100 ARM: 9280/1: mm: fix warning on phys_addr_t to void pointer assignment zero_page is a void* pointer but memblock_alloc() returns phys_addr_t type so this generates a warning while using clang and with -Wint-error enabled that becomes and error. So let's cast the return of memblock_alloc() to (void *). Cc: # 4.14.x + Fixes: 340a982825f7 ("ARM: 9266/1: mm: fix no-MMU ZERO_PAGE() implementation") Signed-off-by: Giulio Benetti Signed-off-by: Russell King (Oracle) arch/arm/mm/nommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fd26a27680aa9032920f798a5a8b38a2c61075f Author: Syed Saba Kareem Date: Wed Jan 11 15:51:23 2023 +0530 ASoC: amd: yc: Add DMI support for new acer/emdoor platforms Adding DMI entries to support new acer/emdoor platforms. Suggested-by: shanshengwang Signed-off-by: Syed Saba Kareem Link: https://lore.kernel.org/r/20230111102130.2276391-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown sound/soc/amd/yc/acp6x-mach.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 58fc14e14d288d728bf48377b81bb77fd17bfe3f 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 (cherry picked from commit 10903b0a0f4d4964b352fa3df12d3d2ef5fb7a3b) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_gt_regs.h | 4 ++-- drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 42400d99e9f0728c17240edb9645637ead40f6b9 Author: Heiko Carstens Date: Mon Jan 9 15:54:56 2023 +0100 KVM: s390: interrupt: use READ_ONCE() before cmpxchg() Use READ_ONCE() before cmpxchg() to prevent that the compiler generates code that fetches the to be compared old value several times from memory. Reviewed-by: Christian Borntraeger Acked-by: Christian Borntraeger Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20230109145456.2895385-1-hca@linux.ibm.com Signed-off-by: Heiko Carstens arch/s390/kvm/interrupt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit e3f360db08d55a14112bd27454e616a24296a8b0 Author: Heiko Carstens Date: Mon Jan 9 11:51:20 2023 +0100 s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple() Make sure that *ptr__ within arch_this_cpu_to_op_simple() is only dereferenced once by using READ_ONCE(). Otherwise the compiler could generate incorrect code. Cc: Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens arch/s390/include/asm/percpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82d3edb50a11bf3c5ef63294d5358ba230181413 Author: Heiko Carstens Date: Thu Jan 5 15:44:20 2023 +0100 s390/cpum_sf: add READ_ONCE() semantics to compare and swap loops The current cmpxchg_double() loops within the perf hw sampling code do not have READ_ONCE() semantics to read the old value from memory. This allows the compiler to generate code which reads the "old" value several times from memory, which again allows for inconsistencies. For example: /* Reset trailer (using compare-double-and-swap) */ do { te_flags = te->flags & ~SDB_TE_BUFFER_FULL_MASK; te_flags |= SDB_TE_ALERT_REQ_MASK; } while (!cmpxchg_double(&te->flags, &te->overflow, te->flags, te->overflow, te_flags, 0ULL)); The compiler could generate code where te->flags used within the cmpxchg_double() call may be refetched from memory and which is not necessarily identical to the previous read version which was used to generate te_flags. Which in turn means that an incorrect update could happen. Fix this by adding READ_ONCE() semantics to all cmpxchg_double() loops. Given that READ_ONCE() cannot generate code on s390 which atomically reads 16 bytes, use a private compare-and-swap-double implementation to achieve that. Also replace cmpxchg_double() with the private implementation to be able to re-use the old value within the loops. As a side effect this converts the whole code to only use bit fields to read and modify bits within the hws trailer header. Reported-by: Alexander Gordeev Acked-by: Alexander Gordeev Acked-by: Hendrik Brueckner Reviewed-by: Thomas Richter Cc: Link: https://lore.kernel.org/linux-s390/Y71QJBhNTIatvxUT@osiris/T/#ma14e2a5f7aa8ed4b94b6f9576799b3ad9c60f333 Signed-off-by: Heiko Carstens arch/s390/include/asm/cpu_mf.h | 31 ++++++------ arch/s390/kernel/perf_cpum_sf.c | 101 ++++++++++++++++++++++++---------------- 2 files changed, 77 insertions(+), 55 deletions(-) commit b442990d244ba2ffe926c6603c42deb6fcc3b0db Merge: 6b35b173dbc1 e0fe6a31cac8 Author: Mark Brown Date: Wed Jan 11 14:15:22 2023 +0000 spi: Merge rename of spi-cs-setup-ns DT property The newly added spi-cs-setup-ns doesn't really fit with the existing property names for delays, rename it so that it does before it makes it into a release and becomes ABI. commit 6b35b173dbc1711f8d272e3f322d2ad697015919 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 drivers/spi/spidev.c | 2 -- 1 file changed, 2 deletions(-) commit a720416d94634068951773cb9e9d6f1b73769e5b 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 drivers/spi/spidev.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 8fed75653a670a4d3be0ab9949aed5e2968a03ef Merge: cb3e9864cdbe 9828994ac492 Author: David S. Miller Date: Wed Jan 11 12:55:09 2023 +0000 Merge tag 'mlx5-fixes-2023-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux mlx5-fixes-2023-01-09 commit cb3e9864cdbe35ff6378966660edbcbac955fe17 Author: Herbert Xu Date: Tue Jan 10 08:59:06 2023 +0800 ipv6: raw: Deduct extension header length in rawv6_push_pending_frames The total cork length created by ip6_append_data includes extension headers, so we must exclude them when comparing them against the IPV6_CHECKSUM offset which does not include extension headers. Reported-by: Kyle Zeng Fixes: 357b40a18b04 ("[IPV6]: IPV6_CHECKSUM socket option can corrupt kernel memory") Signed-off-by: Herbert Xu Signed-off-by: David S. Miller net/ipv6/raw.c | 4 ++++ 1 file changed, 4 insertions(+) commit 169dd78043f7f4eabdef8d7ba0d4ddffe5cb3930 Author: Arend van Spriel Date: Wed Jan 11 11:11:56 2023 +0100 scripts: rpm: make clear that mkspec script contains 4.13 feature A fix was made in the mkspec script that uses a feature, ie. the OR expression, which requires RPM 4.13. However, the script indicates another minimum version. Lower versions may have success by using the --no-deps option as suggested, but feels like bumping the version to 4.13 is reasonable as it put me on the wrong track at first with RPM 4.11 on my Centos7 machine. Fixes: 02a893bc9975 ("kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires") Signed-off-by: Arend van Spriel Signed-off-by: Masahiro Yamada scripts/package/mkspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f9c608d4a1eb852d6769d2fc5906c71c02565ae Author: Rasmus Villemoes Date: Wed Jan 11 10:38:22 2023 +0100 init/Kconfig: fix LOCALVERSION_AUTO help text It was never guaranteed to be exactly eight, but since commit 548b8b5168c9 ("scripts/setlocalversion: make git describe output more reliable"), it has been exactly 12. Signed-off-by: Rasmus Villemoes Signed-off-by: Masahiro Yamada init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f515b663d49a14fb63f8c5d0a2a4ae53d44790a Author: Arnaud Ferraris Date: Thu Dec 15 11:19:47 2022 +0100 arm64: dts: rockchip: fix input enable pinconf on rk3399 When the input enable pinconf was introduced, a default drive-strength value of 2 was set for the pull up/down configs. However, this parameter is unneeded when configuring the pin as input, and having a single hardcoded value here is actually harmful: GPIOs on the RK3399 have various same drive-strength capabilities depending on the bank and port they belong to. As an example, trying to configure the GPIO4_PD3 pin as an input with pull-up enabled fails with the following output: [ 10.706542] rockchip-pinctrl pinctrl: unsupported driver strength 2 [ 10.713661] rockchip-pinctrl pinctrl: pin_config_set op failed for pin 155 (acceptable drive-strength values for this pin being 3, 6, 9 and 12) Let's drop the drive-strength property from all input pinconfs in order to solve this issue. Fixes: ec48c3e82ca3 ("arm64: dts: rockchip: add an input enable pinconf to rk3399") Signed-off-by: Arnaud Ferraris Reviewed-by: Caleb Connolly Link: https://lore.kernel.org/r/20221215101947.254896-1-arnaud.ferraris@collabora.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 80422339a75088322b4d3884bd12fa0fe5d11050 Author: Johan Jonker Date: Wed Dec 28 21:17:32 2022 +0100 ARM: dts: rockchip: add power-domains property to dp node on rk3288 The clocks in the Rockchip rk3288 DisplayPort node are included in the power-domain@RK3288_PD_VIO logic, but the power-domains property in the dp node is missing, so fix it. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/dab85bfb-9f55-86a1-5cd5-7388c43e0ec5@gmail.com Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 1 + 1 file changed, 1 insertion(+) commit 9554f023385825be4b1e3557398c82e25be83da4 Author: Andy Yan Date: Thu Dec 29 19:50:43 2022 +0800 arm64: dts: rockchip: add io domain setting to rk3566-box-demo Add the missing pmu_io_domains setting, the gmac can't work well without this. Fixes: 2e0537b16b25 ("arm64: dts: rockchip: Add dts for rockchip rk3566 box demo board") Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20221229115043.3899733-1-andyshrk@163.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4e2ec2500bfc5cf429ddcfe78b49cb76b36bc46d Author: Thomas Zimmermann Date: Tue Jan 10 13:35:26 2023 +0100 drm/nouveau: Remove file nouveau_fbcon.c Commit 4a16dd9d18a0 ("drm/nouveau/kms: switch to drm fbdev helpers") converted nouveau to generic fbdev emulation. The driver's internal implementation later got accidentally restored during a merge commit. Remove the file from the driver. No functional changes. v2: * point Fixes tag to merge commit (Alex) Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher Fixes: 4e291f2f5853 ("Merge tag 'drm-misc-next-2022-11-10-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next") Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Sam Ravnborg Cc: Jani Nikula Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20230110123526.28770-1-tzimmermann@suse.de drivers/gpu/drm/nouveau/nouveau_fbcon.c | 613 -------------------------------- 1 file changed, 613 deletions(-) commit b0e380b5d4275299adf43e249f18309331b6f54f Author: Clément Léger Date: Mon Jan 9 16:32:23 2023 +0100 net: lan966x: check for ptp to be enabled in lan966x_ptp_deinit() If ptp was not enabled due to missing IRQ for instance, lan966x_ptp_deinit() will dereference NULL pointers. Fixes: d096459494a8 ("net: lan966x: Add support for ptp clocks") Signed-off-by: Clément Léger Reviewed-by: Horatiu Vultur Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c | 3 +++ 1 file changed, 3 insertions(+) commit 7124c93887cc4e6c5b48920f83115e4a5892e870 Author: Randy Dunlap Date: Mon Jan 9 22:25:29 2023 -0800 phy: ti: fix Kconfig warning and operator precedence Fix Kconfig depends operator precedence to prevent a Kconfig warning: WARNING: unmet direct dependencies detected for MUX_MMIO Depends on [n]: MULTIPLEXER [=m] && OF [=n] Selected by [m]: - PHY_AM654_SERDES [=m] && (OF [=n] && ARCH_K3 || COMPILE_TEST [=y]) && COMMON_CLK [=y] Fixes: 71e2f5c5c224 ("phy: ti: Add a new SERDES driver for TI's AM654x SoC") Fixes: 091876cc355d ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC") Signed-off-by: Randy Dunlap Cc: Vinod Koul Cc: Kishon Vijay Abraham I Cc: linux-phy@lists.infradead.org Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20230110062529.22668-1-rdunlap@infradead.org Signed-off-by: Vinod Koul drivers/phy/ti/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76d588dddc459fefa1da96e0a081a397c5c8e216 Author: Kajol Jain Date: Fri Jan 6 12:21:57 2023 +0530 powerpc/imc-pmu: Fix use of mutex in IRQs disabled section Current imc-pmu code triggers a WARNING with CONFIG_DEBUG_ATOMIC_SLEEP and CONFIG_PROVE_LOCKING enabled, while running a thread_imc event. Command to trigger the warning: # perf stat -e thread_imc/CPM_CS_FROM_L4_MEM_X_DPTEG/ sleep 5 Performance counter stats for 'sleep 5': 0 thread_imc/CPM_CS_FROM_L4_MEM_X_DPTEG/ 5.002117947 seconds time elapsed 0.000131000 seconds user 0.001063000 seconds sys Below is snippet of the warning in dmesg: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 2869, name: perf-exec preempt_count: 2, expected: 0 4 locks held by perf-exec/2869: #0: c00000004325c540 (&sig->cred_guard_mutex){+.+.}-{3:3}, at: bprm_execve+0x64/0xa90 #1: c00000004325c5d8 (&sig->exec_update_lock){++++}-{3:3}, at: begin_new_exec+0x460/0xef0 #2: c0000003fa99d4e0 (&cpuctx_lock){-...}-{2:2}, at: perf_event_exec+0x290/0x510 #3: c000000017ab8418 (&ctx->lock){....}-{2:2}, at: perf_event_exec+0x29c/0x510 irq event stamp: 4806 hardirqs last enabled at (4805): [] _raw_spin_unlock_irqrestore+0x94/0xd0 hardirqs last disabled at (4806): [] perf_event_exec+0x394/0x510 softirqs last enabled at (0): [] copy_process+0xc34/0x1ff0 softirqs last disabled at (0): [<0000000000000000>] 0x0 CPU: 36 PID: 2869 Comm: perf-exec Not tainted 6.2.0-rc2-00011-g1247637727f2 #61 Hardware name: 8375-42A POWER9 0x4e1202 opal:v7.0-16-g9b85f7d961 PowerNV Call Trace: dump_stack_lvl+0x98/0xe0 (unreliable) __might_resched+0x2f8/0x310 __mutex_lock+0x6c/0x13f0 thread_imc_event_add+0xf4/0x1b0 event_sched_in+0xe0/0x210 merge_sched_in+0x1f0/0x600 visit_groups_merge.isra.92.constprop.166+0x2bc/0x6c0 ctx_flexible_sched_in+0xcc/0x140 ctx_sched_in+0x20c/0x2a0 ctx_resched+0x104/0x1c0 perf_event_exec+0x340/0x510 begin_new_exec+0x730/0xef0 load_elf_binary+0x3f8/0x1e10 ... do not call blocking ops when !TASK_RUNNING; state=2001 set at [<00000000fd63e7cf>] do_nanosleep+0x60/0x1a0 WARNING: CPU: 36 PID: 2869 at kernel/sched/core.c:9912 __might_sleep+0x9c/0xb0 CPU: 36 PID: 2869 Comm: sleep Tainted: G W 6.2.0-rc2-00011-g1247637727f2 #61 Hardware name: 8375-42A POWER9 0x4e1202 opal:v7.0-16-g9b85f7d961 PowerNV NIP: c000000000194a1c LR: c000000000194a18 CTR: c000000000a78670 REGS: c00000004d2134e0 TRAP: 0700 Tainted: G W (6.2.0-rc2-00011-g1247637727f2) MSR: 9000000000021033 CR: 48002824 XER: 00000000 CFAR: c00000000013fb64 IRQMASK: 1 The above warning triggered because the current imc-pmu code uses mutex lock in interrupt disabled sections. The function mutex_lock() internally calls __might_resched(), which will check if IRQs are disabled and in case IRQs are disabled, it will trigger the warning. Fix the issue by changing the mutex lock to spinlock. Fixes: 8f95faaac56c ("powerpc/powernv: Detect and create IMC device") Reported-by: Michael Petlan Reported-by: Peter Zijlstra Signed-off-by: Kajol Jain [mpe: Fix comments, trim oops in change log, add reported-by tags] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230106065157.182648-1-kjain@linux.ibm.com arch/powerpc/include/asm/imc-pmu.h | 2 +- arch/powerpc/perf/imc-pmu.c | 136 ++++++++++++++++++------------------- 2 files changed, 67 insertions(+), 71 deletions(-) commit 3287ebd7fd01e853ca4da8be675322429400e2bd Author: Ojaswin Mujoo Date: Thu Jan 5 01:54:37 2023 +0530 powerpc/boot: Fix incorrect version calculation issue in ld_version The ld_version() function computes the wrong version value for certain ld versions such as the following: $ ld --version GNU ld (GNU Binutils; SUSE Linux Enterprise 15) 2.37.20211103-150100.7.37 For input 2.37.20211103, the value computed is 202348030000 which is higher than the value for a later version like 2.39.0, which is 23900000. This issue was highlighted because with the above ld version, the powerpc kernel build started failing with ld error: "unrecognized option --no-warn-rwx-segments". This was caused due to the recent commit 579aee9fc594 ("powerpc: suppress some linker warnings in recent linker versions") which added the --no-warn-rwx-segments linker flag if the ld version is greater than 2.39. Due to the bug in ld_version(), ld version 2.37.20111103 is wrongly calculated to be greater than 2.39 and the unsupported flag is added. To fix it, if version is of the form x.y.z and length(z) == 8, then most probably it is a date [yyyymmdd] commonly used for release snapshots and not an actual new version. Hence, ignore the date part replacing it with 0. Fixes: 579aee9fc594 ("powerpc: suppress some linker warnings in recent linker versions") Signed-off-by: Ojaswin Mujoo [mpe: Tweak change log wording/formatting, add Fixes tag] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230104202437.90039-1-ojaswin@linux.ibm.com arch/powerpc/boot/wrapper | 4 ++++ 1 file changed, 4 insertions(+) commit 2fe58d977ee05da5bb89ef5dc4f5bf2dc15db46f Author: Paulo Alcantara Date: Tue Jan 10 20:35:46 2023 -0300 cifs: fix potential memory leaks in session setup Make sure to free cifs_ses::auth_key.response before allocating it as we might end up leaking memory in reconnect or mounting. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifsencrypt.c | 1 + fs/cifs/sess.c | 2 ++ fs/cifs/smb2pdu.c | 1 + 3 files changed, 4 insertions(+) commit 22aeb01db7080e18c6aeb4361cc2556c9887099a Author: Paulo Alcantara Date: Tue Jan 10 19:23:21 2023 -0300 cifs: do not query ifaces on smb1 mounts Users have reported the following error on every 600 seconds (SMB_INTERFACE_POLL_INTERVAL) when mounting SMB1 shares: CIFS: VFS: \\srv\share error -5 on ioctl to get interface list It's supported only by SMB2+, so do not query network interfaces on SMB1 mounts. Fixes: 6e1c1c08cdf3 ("cifs: periodically query network interfaces from server") Reviewed-by: Shyam Prasad N Reviewed-by: Tom Talpey Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/connect.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9c445d2637c938a800fcc8b5f0b10e60c94460c7 Author: Werner Sembach Date: Tue Jan 10 14:45:24 2023 +0100 Input: i8042 - add Clevo PCX0DX to i8042 quirk table The Clevo PCX0DX/TUXEDO XP1511, need quirks for the keyboard to not be occasionally unresponsive after resume. Signed-off-by: Werner Sembach Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20230110134524.553620-1-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-acpipnpio.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 0aa7d35f5d00f83db2d512bf9d17e6498a33be47 Merge: 96398560f26a 40543b3d9d2c Author: Jakub Kicinski Date: Tue Jan 10 18:26:33 2023 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-01-09 (ice) This series contains updates to ice driver only. Jiasheng Jiang frees allocated cmd_buf if write_buf allocation failed to prevent memory leak. Yuan Can adds check, and proper cleanup, of gnss_tty_port allocation call to avoid memory leaks. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: Add check for kzalloc ice: Fix potential memory leak in ice_gnss_tty_write() ==================== Link: https://lore.kernel.org/r/20230109225358.3478060-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 96398560f26aa07e8f2969d73c8197e6a6d10407 Author: Frederick Lawler Date: Mon Jan 9 10:39:06 2023 -0600 net: sched: disallow noqueue for qdisc classes While experimenting with applying noqueue to a classful queue discipline, we discovered a NULL pointer dereference in the __dev_queue_xmit() path that generates a kernel OOPS: # dev=enp0s5 # tc qdisc replace dev $dev root handle 1: htb default 1 # tc class add dev $dev parent 1: classid 1:1 htb rate 10mbit # tc qdisc add dev $dev parent 1:1 handle 10: noqueue # ping -I $dev -w 1 -c 1 1.1.1.1 [ 2.172856] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 2.173217] #PF: supervisor instruction fetch in kernel mode ... [ 2.178451] Call Trace: [ 2.178577] [ 2.178686] htb_enqueue+0x1c8/0x370 [ 2.178880] dev_qdisc_enqueue+0x15/0x90 [ 2.179093] __dev_queue_xmit+0x798/0xd00 [ 2.179305] ? _raw_write_lock_bh+0xe/0x30 [ 2.179522] ? __local_bh_enable_ip+0x32/0x70 [ 2.179759] ? ___neigh_create+0x610/0x840 [ 2.179968] ? eth_header+0x21/0xc0 [ 2.180144] ip_finish_output2+0x15e/0x4f0 [ 2.180348] ? dst_output+0x30/0x30 [ 2.180525] ip_push_pending_frames+0x9d/0xb0 [ 2.180739] raw_sendmsg+0x601/0xcb0 [ 2.180916] ? _raw_spin_trylock+0xe/0x50 [ 2.181112] ? _raw_spin_unlock_irqrestore+0x16/0x30 [ 2.181354] ? get_page_from_freelist+0xcd6/0xdf0 [ 2.181594] ? sock_sendmsg+0x56/0x60 [ 2.181781] sock_sendmsg+0x56/0x60 [ 2.181958] __sys_sendto+0xf7/0x160 [ 2.182139] ? handle_mm_fault+0x6e/0x1d0 [ 2.182366] ? do_user_addr_fault+0x1e1/0x660 [ 2.182627] __x64_sys_sendto+0x1b/0x30 [ 2.182881] do_syscall_64+0x38/0x90 [ 2.183085] entry_SYSCALL_64_after_hwframe+0x63/0xcd ... [ 2.187402] Previously in commit d66d6c3152e8 ("net: sched: register noqueue qdisc"), NULL was set for the noqueue discipline on noqueue init so that __dev_queue_xmit() falls through for the noqueue case. This also sets a bypass of the enqueue NULL check in the register_qdisc() function for the struct noqueue_disc_ops. Classful queue disciplines make it past the NULL check in __dev_queue_xmit() because the discipline is set to htb (in this case), and then in the call to __dev_xmit_skb(), it calls into htb_enqueue() which grabs a leaf node for a class and then calls qdisc_enqueue() by passing in a queue discipline which assumes ->enqueue() is not set to NULL. Fix this by not allowing classes to be assigned to the noqueue discipline. Linux TC Notes states that classes cannot be set to the noqueue discipline. [1] Let's enforce that here. Links: 1. https://linux-tc-notes.sourceforge.net/tc/doc/sch_noqueue.txt Fixes: d66d6c3152e8 ("net: sched: register noqueue qdisc") Cc: stable@vger.kernel.org Signed-off-by: Frederick Lawler Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/r/20230109163906.706000-1-fred@cloudflare.com Signed-off-by: Jakub Kicinski net/sched/sch_api.c | 5 +++++ 1 file changed, 5 insertions(+) commit 9c7417b5ec440242bb5b64521acd53d4e19130c1 Author: Geert Uytterhoeven Date: Mon Oct 3 11:06:57 2022 +0200 coredump: Move dump_emit_page() to kill unused warning If CONFIG_ELF_CORE is not set: fs/coredump.c:835:12: error: ‘dump_emit_page’ defined but not used [-Werror=unused-function] 835 | static int dump_emit_page(struct coredump_params *cprm, struct page *page) | ^~~~~~~~~~~~~~ Fix this by moving dump_emit_page() inside the existing section protected by #ifdef CONFIG_ELF_CORE. Fixes: 06bbaa6dc53cb720 ("[coredump] don't use __kernel_write() on kmap_local_page()") Signed-off-by: Geert Uytterhoeven Signed-off-by: Al Viro fs/coredump.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit a6941f89d7c6a6ba49316bbd7da2fb2f719119a7 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 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 972fb53d3605eb6cdf0d6ae9a52e910626a91ff7 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 Cc: stable@vger.kernel.org # 6.0, 6.1 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 ++++ 1 file changed, 4 insertions(+) commit ba029e9991d9be90a28b6a0ceb25e9a6fb348829 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 drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 45c734817847e580163d85635fb4ea442056d489 Merge: 42c18d13623d a1904fa4dfc9 Author: Arnd Bergmann Date: Tue Jan 10 23:09:43 2023 +0100 Merge tag 'arm-soc/for-6.2/drivers-fixes' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains Broadcom ARM/ARM64/MIPS SoCs drivers fixes for 6.2, please pull the following: - Maxime fixes a sparse annotation for one of the Raspberry Pi firmware clock request message * tag 'arm-soc/for-6.2/drivers-fixes' of https://github.com/Broadcom/stblinux: firmware: raspberrypi: Fix type assignment Link: https://lore.kernel.org/r/20230110215025.1008437-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 42c18d13623d863e1cea018042546b0bd5a5dd11 Merge: 23d39547655e 6049aae52392 Author: Arnd Bergmann Date: Tue Jan 10 23:09:09 2023 +0100 Merge tag 'qcom-driver-fixes-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes 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. * tag 'qcom-driver-fixes-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: PM: AVS: qcom-cpr: Fix an error handling path in cpr_probe() soc: qcom: apr: Make qcom,protection-domain optional again dt-bindings: soc: qcom: apr: Make qcom,protection-domain optional again Link: https://lore.kernel.org/r/20230110213946.2183982-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 23d39547655e9d4144fce073ee2e9b112e8aedc5 Merge: 985d7fef1121 69876bc6fd4d Author: Arnd Bergmann Date: Tue Jan 10 23:08:59 2023 +0100 Merge tag 'qcom-arm64-fixes-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes 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. * tag 'qcom-arm64-fixes-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: msm8992-libra: Fix the memory map arm64: dts: qcom: msm8992: Don't use sfpb mutex arm64: dts: msm8994-angler: fix the memory map arm64: dts: qcom: sm8350: correct SDHCI interconnect arguments Revert "arm64: dts: qcom: sm8250: Disable the not yet supported cluster idle state" arm64: dts: msm8992-bullhead: add memory hole region arm64: dts: qcom: sc8280xp: fix USB-DP PHY nodes arm64: dts: qcom: sc8280xp: fix primary USB-DP PHY reset Link: https://lore.kernel.org/r/20230110213724.2183668-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 985d7fef112120f4101ff1bf70ed89496b69a91b Merge: 6437c0291237 0154252a3b87 Author: Arnd Bergmann Date: Tue Jan 10 23:08:49 2023 +0100 Merge tag 'qcom-dts-fixes-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes 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. * tag 'qcom-dts-fixes-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: apq8084-ifc6540: fix overriding SDHCI Link: https://lore.kernel.org/r/20230110212750.2182904-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 6437c0291237227ed36f61ddd71e66ff983b4fe4 Merge: daec8b54e944 9d46ce57f4d1 Author: Arnd Bergmann Date: Tue Jan 10 23:08:10 2023 +0100 Merge branch 'armsoc-build-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc into arm/fixes ARM: SoC fixes These are three fixes for mistakes I discovered during the preparation of the boardfile removal. Robert noticed the accidental removal of PXA310 and PXA320 support because of a misplaced Kconfig statement, and the two OMAP patches were build failures that got introduced earlier but that I found while testing the removal. * 'armsoc-build-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: omap1: fix building gpio15xx ARM: omap1: fix !ARCH_OMAP1_ANY link failures ARM: pxa: enable PXA310/PXA320 for DT-only build commit 9d46ce57f4d1c626bb48170226ea5e35deb5877c Author: Arnd Bergmann Date: Tue Dec 13 22:06:49 2022 +0100 ARM: omap1: fix building gpio15xx In some randconfig builds, the asm/irq.h header is not included in gpio15xx.c, so add an explicit include to avoid a build fialure: In file included from arch/arm/mach-omap1/gpio15xx.c:15: arch/arm/mach-omap1/irqs.h:99:34: error: 'NR_IRQS_LEGACY' undeclared here (not in a function) 99 | #define IH2_BASE (NR_IRQS_LEGACY + 32) | ^~~~~~~~~~~~~~ arch/arm/mach-omap1/irqs.h:105:38: note: in expansion of macro 'IH2_BASE' 105 | #define INT_MPUIO (5 + IH2_BASE) | ^~~~~~~~ arch/arm/mach-omap1/gpio15xx.c:28:27: note: in expansion of macro 'INT_MPUIO' 28 | .start = INT_MPUIO, | ^~~~~~~~~ Acked-by: Aaro Koskinen Signed-off-by: Arnd Bergmann arch/arm/mach-omap1/gpio15xx.c | 1 + 1 file changed, 1 insertion(+) commit 980a637d11fe8dfc734f508a422185c2de55e669 Author: Arnd Bergmann Date: Wed Jan 4 09:35:09 2023 +0100 ARM: omap1: fix !ARCH_OMAP1_ANY link failures While compile-testing randconfig builds for the upcoming boardfile removal, I noticed that an earlier patch of mine was completely broken, and the introduction of CONFIG_ARCH_OMAP1_ANY only replaced one set of build failures with another one, now resulting in link failures like ld: drivers/video/fbdev/omap/omapfb_main.o: in function `omapfb_do_probe': drivers/video/fbdev/omap/omapfb_main.c:1703: undefined reference to `omap_set_dma_priority' ld: drivers/dma/ti/omap-dma.o: in function `omap_dma_free_chan_resources': drivers/dma/ti/omap-dma.c:777: undefined reference to `omap_free_dma' drivers/dma/ti/omap-dma.c:1685: undefined reference to `omap_get_plat_info' ld: drivers/usb/gadget/udc/omap_udc.o: in function `next_in_dma': drivers/usb/gadget/udc/omap_udc.c:820: undefined reference to `omap_get_dma_active_status' I tried reworking it, but the resulting patch ended up much bigger than simply avoiding the original problem of unused-function warnings like arch/arm/mach-omap1/mcbsp.c:76:30: error: unused variable 'omap1_mcbsp_ops' [-Werror,-Wunused-variable] As a result, revert the previous fix, and rearrange the code that produces warnings to hide them. For mcbsp, the #ifdef check can simply be removed as the cpu_is_omapxxx() checks already achieve the same result, while in the io.c the easiest solution appears to be to merge the common map bits into each soc specific portion. This gets cleaned in a nicer way after omap7xx support gets dropped, as the remaining SoCs all have the exact same I/O map. Fixes: 615dce5bf736 ("ARM: omap1: fix build with no SoC selected") Cc: stable@vger.kernel.org Acked-by: Aaro Koskinen Signed-off-by: Arnd Bergmann arch/arm/mach-omap1/Kconfig | 5 +---- arch/arm/mach-omap1/Makefile | 4 ---- arch/arm/mach-omap1/io.c | 32 +++++++++++++++----------------- arch/arm/mach-omap1/mcbsp.c | 21 --------------------- arch/arm/mach-omap1/pm.h | 7 ------- include/linux/soc/ti/omap1-io.h | 4 ++-- 6 files changed, 18 insertions(+), 55 deletions(-) commit a1904fa4dfc929e5ea36bd409cf0d800df56fb8b Author: Maxime Ripard Date: Mon Jan 2 12:52:55 2023 +0100 firmware: raspberrypi: Fix type assignment We silently cast an unsigned int into a __le32 which makes sparse complain. Moreover, we never actually convert endianness between the CPU's and the expected little-endian value. Fix both at once by calling cpu_to_le32(). Fixes: 40c31955e4e9 ("firmware: raspberrypi: Provide a helper to query a clock max rate") Reported-by: kernel test robot Link: https://lore.kernel.org/r/20221116091712.1309651-3-maxime@cerno.tech Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20230102115255.17802-1-maxime@cerno.tech Signed-off-by: Florian Fainelli include/soc/bcm2835/raspberrypi-firmware.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39e8db3c860e2678ce5a7d74193925876507c9eb Author: Paulo Alcantara Date: Tue Jan 10 17:55:20 2023 -0300 cifs: fix double free on failed kerberos auth If session setup failed with kerberos auth, we ended up freeing cifs_ses::auth_key.response twice in SMB2_auth_kerberos() and sesInfoFree(). Fix this by zeroing out cifs_ses::auth_key.response after freeing it in SMB2_auth_kerberos(). Fixes: a4e430c8c8ba ("cifs: replace kfree() with kfree_sensitive() for sensitive data") Signed-off-by: Paulo Alcantara (SUSE) Acked-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/smb2pdu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2f57e4464cddfceda850ae4224779d11b6eb171f Author: Colin Ian King Date: Thu Jan 5 13:41:11 2023 +0000 cifs: remove redundant assignment to the variable match The variable match is being assigned a value that is never read, it is being re-assigned a new value later on. The assignment is redundant and can be removed. Cleans up clang scan-build warning: fs/cifs/dfs_cache.c:1302:2: warning: Value stored to 'match' is never read Signed-off-by: Colin Ian King Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/dfs_cache.c | 1 - 1 file changed, 1 deletion(-) commit 7dd4b804e08041ff56c88bdd8da742d14b17ed25 Merge: 092f6239108d 5304930dbae8 Author: Linus Torvalds Date: Tue Jan 10 15:03:06 2023 -0600 Merge tag 'nfsd-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Fix a race when creating NFSv4 files - Revert the use of relaxed bitops * tag 'nfsd-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: NFSD: Use set_bit(RQ_DROPME) Revert "SUNRPC: Use RMW bitops in single-threaded hot paths" nfsd: fix handling of cached open files in nfsd4_open codepath commit 092f6239108d3c612f5e1c67d9cd0cc80461fc91 Merge: 40c18f363a08 4414c1f5c7a3 Author: Linus Torvalds Date: Tue Jan 10 14:48:12 2023 -0600 Merge tag 'xtensa-20230110' of https://github.com/jcmvbkbc/linux-xtensa Pull xtensa fixes from Max Filippov: - fix xtensa allmodconfig build broken by the kcsan test - drop unused members of struct thread_struct * tag 'xtensa-20230110' of https://github.com/jcmvbkbc/linux-xtensa: xtensa: drop unused members of struct thread_struct kcsan: test: don't put the expect array on the stack commit 6650c8e906ce58404bfdfceceeba7bd10d397d40 Author: Daniil Tatianin Date: Tue Dec 20 09:32:46 2022 +0300 iavf/iavf_main: actually log ->src mask when talking about it This fixes a copy-paste issue where dev_err would log the dst mask even though it is clearly talking about src. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: 0075fa0fadd0 ("i40evf: Add support to apply cloud filters") Signed-off-by: Daniil Tatianin Reviewed-by: Michal Swiatkowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e91c72e560cc85f7163bbe3d14197268de31383 Author: Christopher S Hall Date: Wed Dec 14 16:10:38 2022 +0800 igc: Fix PPS delta between two synchronized end-points This patch fix the pulse per second output delta between two synchronized end-points. Based on Intel Discrete I225 Software User Manual Section 4.2.15 TimeSync Auxiliary Control Register, ST0[Bit 4] and ST1[Bit 7] must be set to ensure that clock output will be toggles based on frequency value defined. This is to ensure that output of the PPS is aligned with the clock. How to test: 1) Running time synchronization on both end points. Ex: ptp4l --step_threshold=1 -m -f gPTP.cfg -i 2) Configure PPS output using below command for both end-points Ex: SDP0 on I225 REV4 SKU variant ./testptp -d /dev/ptp0 -L 0,2 ./testptp -d /dev/ptp0 -p 1000000000 3) Measure the output using analyzer for both end-points Fixes: 87938851b6ef ("igc: enable auxiliary PHC functions for the i225") Signed-off-by: Christopher S Hall Signed-off-by: Muhammad Husaini Zulkifli Acked-by: Sasha Neftin Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_defines.h | 2 ++ drivers/net/ethernet/intel/igc/igc_ptp.c | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) commit b93fb4405fcb5112c5739c5349afb52ec7f15c07 Author: Yang Yingliang Date: Tue Nov 29 09:57:48 2022 +0800 ixgbe: fix pci device refcount leak As the comment of pci_get_domain_bus_and_slot() says, it returns a PCI device with refcount incremented, when finish using it, the caller must decrement the reference count by calling pci_dev_put(). In ixgbe_get_first_secondary_devfn() and ixgbe_x550em_a_has_mii(), pci_dev_put() is called to avoid leak. Fixes: 8fa10ef01260 ("ixgbe: register a mdiobus") Signed-off-by: Yang Yingliang Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 4f3085f87b51a551a0647f218d4f324796ecb703 Author: Perry Yuan Date: Tue Jan 10 23:10:29 2023 +0800 cpufreq: amd-pstate: fix kernel hang issue while amd-pstate unregistering In the amd_pstate_adjust_perf(), there is one cpufreq_cpu_get() call to increase increments the kobject reference count of policy and make it as busy. Therefore, a corresponding call to cpufreq_cpu_put() is needed to decrement the kobject reference count back, it will resolve the kernel hang issue when unregistering the amd-pstate driver and register the `amd_pstate_epp` driver instance. Fixes: 1d215f0319 ("cpufreq: amd-pstate: Add fast switch function for AMD P-State") Acked-by: Huang Rui Reviewed-by: Mario Limonciello Tested-by: Wyes Karny Signed-off-by: Perry Yuan Cc: 5.17+ # 5.17+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/amd-pstate.c | 1 + 1 file changed, 1 insertion(+) commit 7e834ff13c4fcdf2bbd0eaf740781445d9c45d2e Merge: b7bfaa761d76 08f0adb193c0 Author: Rafael J. Wysocki Date: Tue Jan 10 20:27:13 2023 +0100 Merge tag 'cpufreq/arm/fixes-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull cpufreq ARM fixes for 6.2-rc4 from Viresh Kumar: "- Fix double initialization and set suspend-freq for Apple's cpufreq driver (Arnd Bergmann and Hector Martin). - Fix reading of "reg" property, update cpufreq-dt's blocklist and update DT documentation for Qualcomm's cpufreq driver (Konrad Dybcio and Krzysztof Kozlowski). - Replace 0 with NULL for Armada driver (Miles Chen). - Fix potential overflows in CPPC driver (Pierre Gondois). - Update blocklist for Tegra234 Soc (Sumit Gupta)." commit f64e4275ef7407d5c3eca20436519bbd1f796e40 Author: Hans de Goede Date: Tue Jan 10 16:30:28 2023 +0100 ACPI: Fix selecting wrong ACPI fwnode for the iGPU on some Dell laptops The Dell Latitude E6430 both with and without the optional NVidia dGPU has a bug in its ACPI tables which is causing Linux to assign the wrong ACPI fwnode / companion to the pci_device for the i915 iGPU. Specifically under the PCI root bridge there are these 2 ACPI Device()s : Scope (_SB.PCI0) { Device (GFX0) { Name (_ADR, 0x00020000) // _ADR: Address } ... Device (VID) { Name (_ADR, 0x00020000) // _ADR: Address ... Method (_DOS, 1, NotSerialized) // _DOS: Disable Output Switching { VDP8 = Arg0 VDP1 (One, VDP8) } Method (_DOD, 0, NotSerialized) // _DOD: Display Output Devices { ... } ... } } The non-functional GFX0 ACPI device is a problem, because this gets returned as ACPI companion-device by acpi_find_child_device() for the iGPU. This is a long standing problem and the i915 driver does use the ACPI companion for some things, but works fine without it. However since commit 63f534b8bad9 ("ACPI: PCI: Rework acpi_get_pci_dev()") acpi_get_pci_dev() relies on the physical-node pointer in the acpi_device and that is set on the wrong acpi_device because of the wrong acpi_find_child_device() return. This breaks the ACPI video code, leading to non working backlight control in some cases. Add a type.backlight flag, mark ACPI video bus devices with this and make find_child_checks() return a higher score for children with this flag set, so that it picks the right companion-device. Fixes: 63f534b8bad9 ("ACPI: PCI: Rework acpi_get_pci_dev()") Co-developed-by: Rafael J. Wysocki Signed-off-by: Hans de Goede Cc: 6.1+ # 6.1+ Signed-off-by: Rafael J. Wysocki drivers/acpi/glue.c | 14 ++++++++++++-- drivers/acpi/scan.c | 7 +++++-- include/acpi/acpi_bus.h | 3 ++- 3 files changed, 19 insertions(+), 5 deletions(-) commit 74d3320f6f7cf72de88a7e8df573821f6db90239 Author: Masahiro Yamada Date: Tue Jan 10 14:48:00 2023 +0900 kbuild: fix 'make modules' error when CONFIG_DEBUG_INFO_BTF_MODULES=y When CONFIG_DEBUG_INFO_BTF_MODULES=y, running 'make modules' in the clean kernel tree will get the following error. $ grep CONFIG_DEBUG_INFO_BTF_MODULES .config CONFIG_DEBUG_INFO_BTF_MODULES=y $ make -s clean $ make modules [snip] AR vmlinux.a ar: ./built-in.a: No such file or directory make: *** [Makefile:1241: vmlinux.a] Error 1 'modules' depends on 'vmlinux', but builtin objects are not built. Define KBUILD_BUILTIN. Fixes: f73edc8951b2 ("kbuild: unify two modpost invocations") Signed-off-by: Masahiro Yamada Makefile | 1 + 1 file changed, 1 insertion(+) commit 8debed3efe3a731451ad9a91a7a74eeb18a7f7eb Author: Masahiro Yamada Date: Mon Jan 9 04:23:17 2023 +0900 kbuild: export top-level LDFLAGS_vmlinux only to scripts/Makefile.vmlinux Nathan Chancellor reports that $(NM) emits an error message when GNU Make 4.4 is used to build the ARM zImage. $ make-4.4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- O=build defconfig zImage [snip] LD vmlinux NM System.map SORTTAB vmlinux OBJCOPY arch/arm/boot/Image Kernel: arch/arm/boot/Image is ready arm-linux-gnueabi-nm: 'arch/arm/boot/compressed/../../../../vmlinux': No such file /bin/sh: 1: arithmetic expression: expecting primary: " " LDS arch/arm/boot/compressed/vmlinux.lds AS arch/arm/boot/compressed/head.o GZIP arch/arm/boot/compressed/piggy_data AS arch/arm/boot/compressed/piggy.o CC arch/arm/boot/compressed/misc.o This occurs since GNU Make commit 98da874c4303 ("[SV 10593] Export variables to $(shell ...) commands"), and the O= option is needed to reproduce it. The generated zImage is correct despite the error message. As the commit description of 98da874c4303 [1] says, exported variables are passed down to $(shell ) functions, which means exported recursive variables might be expanded earlier than before, in the parse stage. The following test code demonstrates the change for GNU Make 4.4. [Test Makefile] $(shell echo hello > foo) export foo = $(shell cat bar/../foo) $(shell mkdir bar) all: @echo $(foo) [GNU Make 4.3] $ rm -rf bar; make-4.3 hello [GNU Make 4.4] $ rm -rf bar; make-4.4 cat: bar/../foo: No such file or directory hello The 'foo' is a resursively expanded (i.e. lazily expanded) variable. GNU Make 4.3 expands 'foo' just before running the recipe '@echo $(foo)', at this point, the directory 'bar' exists. GNU Make 4.4 expands 'foo' to evaluate $(shell mkdir bar) because it is exported. At this point, the directory 'bar' does not exit yet. The cat command cannot resolve the bar/../foo path, hence the error message. Let's get back to the kernel Makefile. In arch/arm/boot/compressed/Makefile, KBSS_SZ is referenced by LDFLAGS_vmlinux, which is recursive and also exported by the top Makefile. GNU Make 4.3 expands KBSS_SZ just before running the recipes, so no error message. GNU Make 4.4 expands KBSS_SZ in the parse stage, where the directory arm/arm/boot/compressed does not exit yet. When compiled with O=, the output directory is created by $(shell mkdir -p $(obj-dirs)) in scripts/Makefile.build. There are two ways to fix this particular issue: - change "$(obj)/../../../../vmlinux" in KBSS_SZ to "vmlinux" - unexport LDFLAGS_vmlinux This commit takes the latter course because it is what I originally intended. Commit 3ec8a5b33dea ("kbuild: do not export LDFLAGS_vmlinux") unexported LDFLAGS_vmlinux. Commit 5d4aeffbf709 ("kbuild: rebuild .vmlinux.export.o when its prerequisite is updated") accidentally exported it again. We can clean up arch/arm/boot/compressed/Makefile later. [1]: https://git.savannah.gnu.org/cgit/make.git/commit/?id=98da874c43035a490cdca81331724f233a3d0c9a Link: https://lore.kernel.org/all/Y7i8+EjwdnhHtlrr@dev-arch.thelio-3990X/ Fixes: 5d4aeffbf709 ("kbuild: rebuild .vmlinux.export.o when its prerequisite is updated") Reported-by: Nathan Chancellor Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 420a1116aef0e8e12c305508f45ce73e5ae30a09 Author: Hans de Goede Date: Mon Jan 9 20:18:11 2023 +0100 ACPI: video: Allow selecting NVidia-WMI-EC or Apple GMUX backlight from the cmdline The patches adding NVidia-WMI-EC and Apple GMUX backlight detection support to acpi_video_get_backlight_type(), forgot to update acpi_video_parse_cmdline() to allow manually selecting these from the commandline. Add support for these to acpi_video_parse_cmdline(). Fixes: fe7aebb40d42 ("ACPI: video: Add Nvidia WMI EC brightness control detection (v3)") Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection") Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 4 ++++ 1 file changed, 4 insertions(+) commit 77c7248882385397cd7dffe9e1437f59f32ce2de Author: Tamim Khan Date: Fri Dec 30 00:58:39 2022 -0500 ACPI: resource: Skip IRQ override on Asus Expertbook B2402CBA Like the Asus Expertbook B2502CBA and various Asus Vivobook laptops, the Asus Expertbook B2402CBA has an ACPI DSDT table that describes IRQ 1 as ActiveLow while the kernel overrides it to Edge_High. 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=216864 Tested-by: zelenat Signed-off-by: Tamim Khan Signed-off-by: Rafael J. Wysocki drivers/acpi/resource.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2a81160d29d65b5876ab3f824fda99ae0219f05e Author: Peter Newman Date: Tue Dec 20 17:41:31 2022 +0100 x86/resctrl: Fix event counts regression in reused RMIDs When creating a new monitoring group, the RMID allocated for it may have been used by a group which was previously removed. In this case, the hardware counters will have non-zero values which should be deducted from what is reported in the new group's counts. resctrl_arch_reset_rmid() initializes the prev_msr value for counters to 0, causing the initial count to be charged to the new group. Resurrect __rmid_read() and use it to initialize prev_msr correctly. Unlike before, __rmid_read() checks for error bits in the MSR read so that callers don't need to. Fixes: 1d81d15db39c ("x86/resctrl: Move mbm_overflow_count() into resctrl_arch_rmid_read()") Signed-off-by: Peter Newman Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221220164132.443083-1-peternewman@google.com arch/x86/kernel/cpu/resctrl/monitor.c | 49 +++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 16 deletions(-) commit fe1f0714385fbcf76b0cbceb02b7277d842014fc Author: Peter Newman Date: Tue Dec 20 17:11:23 2022 +0100 x86/resctrl: Fix task CLOSID/RMID update race When the user moves a running task to a new rdtgroup using the task's file interface or by deleting its rdtgroup, the resulting change in CLOSID/RMID must be immediately propagated to the PQR_ASSOC MSR on the task(s) CPUs. x86 allows reordering loads with prior stores, so if the task starts running between a task_curr() check that the CPU hoisted before the stores in the CLOSID/RMID update then it can start running with the old CLOSID/RMID until it is switched again because __rdtgroup_move_task() failed to determine that it needs to be interrupted to obtain the new CLOSID/RMID. Refer to the diagram below: CPU 0 CPU 1 ----- ----- __rdtgroup_move_task(): curr <- t1->cpu->rq->curr __schedule(): rq->curr <- t1 resctrl_sched_in(): t1->{closid,rmid} -> {1,1} t1->{closid,rmid} <- {2,2} if (curr == t1) // false IPI(t1->cpu) A similar race impacts rdt_move_group_tasks(), which updates tasks in a deleted rdtgroup. In both cases, use smp_mb() to order the task_struct::{closid,rmid} stores before the loads in task_curr(). In particular, in the rdt_move_group_tasks() case, simply execute an smp_mb() on every iteration with a matching task. It is possible to use a single smp_mb() in rdt_move_group_tasks(), but this would require two passes and a means of remembering which task_structs were updated in the first loop. However, benchmarking results below showed too little performance impact in the simple approach to justify implementing the two-pass approach. Times below were collected using `perf stat` to measure the time to remove a group containing a 1600-task, parallel workload. CPU: Intel(R) Xeon(R) Platinum P-8136 CPU @ 2.00GHz (112 threads) # mkdir /sys/fs/resctrl/test # echo $$ > /sys/fs/resctrl/test/tasks # perf bench sched messaging -g 40 -l 100000 task-clock time ranges collected using: # perf stat rmdir /sys/fs/resctrl/test Baseline: 1.54 - 1.60 ms smp_mb() every matching task: 1.57 - 1.67 ms [ bp: Massage commit message. ] Fixes: ae28d1aae48a ("x86/resctrl: Use an IPI instead of task_work_add() to update PQR_ASSOC MSR") Fixes: 0efc89be9471 ("x86/intel_rdt: Update task closid immediately on CPU in rmdir and unmount") Signed-off-by: Peter Newman Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Reviewed-by: Babu Moger Cc: Link: https://lore.kernel.org/r/20221220161123.432120-1-peternewman@google.com arch/x86/kernel/cpu/resctrl/rdtgroup.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 895c0747f726bb50c9b7a805613a61d1b6f9fa06 Author: Niklas Schnelle Date: Tue Jan 10 17:44:27 2023 +0100 vfio/type1: Respect IOMMU reserved regions in vfio_test_domain_fgsp() Since commit cbf7827bc5dc ("iommu/s390: Fix potential s390_domain aperture shrinking") the s390 IOMMU driver uses reserved regions for the system provided DMA ranges of PCI devices. Previously it reduced the size of the IOMMU aperture and checked it on each mapping operation. On current machines the system denies use of DMA addresses below 2^32 for all PCI devices. Usually mapping IOVAs in a reserved regions is harmless until a DMA actually tries to utilize the mapping. However on s390 there is a virtual PCI device called ISM which is implemented in firmware and used for cross LPAR communication. Unlike real PCI devices this device does not use the hardware IOMMU but inspects IOMMU translation tables directly on IOTLB flush (s390 RPCIT instruction). If it detects IOVA mappings outside the allowed ranges it goes into an error state. This error state then causes the device to be unavailable to the KVM guest. Analysing this we found that vfio_test_domain_fgsp() maps 2 pages at DMA address 0 irrespective of the IOMMUs reserved regions. Even if usually harmless this seems wrong in the general case so instead go through the freshly updated IOVA list and try to find a range that isn't reserved, and fits 2 pages, is PAGE_SIZE * 2 aligned. If found use that for testing for fine grained super pages. Fixes: af029169b8fd ("vfio/type1: Check reserved region conflict and update iova list") Signed-off-by: Niklas Schnelle Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230110164427.4051938-2-schnelle@linux.ibm.com Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit ea97cbebaf861d99c3e892275147e6fca6d2c1ca Author: Jens Axboe Date: Tue Jan 10 10:24:52 2023 -0700 io_uring/fdinfo: include locked hash table in fdinfo output A previous commit split the hash table for polled requests into two parts, but didn't get the fdinfo output updated. This means that it's less useful for debugging, as we may think a given request is not pending poll. Fix this up by dumping the locked hash table contents too. Fixes: 9ca9fb24d5fe ("io_uring: mutex locked poll hashing") Signed-off-by: Jens Axboe io_uring/fdinfo.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 90b926e68f500844dff16b5bcea178dc55cf580a Author: Juergen Gross Date: Tue Jan 10 07:54:27 2023 +0100 x86/pat: Fix pat_x_mtrr_type() for MTRR disabled case Since 72cbc8f04fe2 ("x86/PAT: Have pat_enabled() properly reflect state when running on Xen") PAT can be enabled without MTRR. This has resulted in problems e.g. for a SEV-SNP guest running under Hyper-V, when trying to establish a new mapping via memremap() with WB caching mode, as pat_x_mtrr_type() will call mtrr_type_lookup(), which in turn is returning MTRR_TYPE_INVALID due to MTRR being disabled in this configuration. The result is a mapping with UC- caching, leading to severe performance degradation. Fix that by handling MTRR_TYPE_INVALID the same way as MTRR_TYPE_WRBACK in pat_x_mtrr_type() because MTRR_TYPE_INVALID means MTRRs are disabled. [ bp: Massage commit message. ] Fixes: 72cbc8f04fe2 ("x86/PAT: Have pat_enabled() properly reflect state when running on Xen") Reported-by: Michael Kelley (LINUX) Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Michael Kelley Tested-by: Michael Kelley Cc: Link: https://lore.kernel.org/r/20230110065427.20767-1-jgross@suse.com arch/x86/mm/pat/memtype.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d3de5616d36462a646f5b360ba82d3b09ff668eb 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 (cherry picked from commit 3db9d590557da3aa2c952f2fecd3e9b703dad790) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_reset.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) commit 69876bc6fd4de3ad2dc7826fe269e91fa2c1807f Author: Konrad Dybcio Date: Mon Dec 19 14:19:18 2022 +0100 arm64: dts: qcom: msm8992-libra: Fix the memory map The memory map was wrong. Fix it to prevent the device from randomly rebooting. Fixes: 0f5cdb31e850 ("arm64: dts: qcom: Add Xiaomi Libra (Mi 4C) device tree") Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221219131918.446587-2-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dts | 77 ++++++++++++++++++----- 1 file changed, 60 insertions(+), 17 deletions(-) commit 2bd5ab93335bf2c4d22c8db427822ae637ed8dc3 Author: Konrad Dybcio Date: Mon Dec 19 14:19:17 2022 +0100 arm64: dts: qcom: msm8992: Don't use sfpb mutex MSM8992 uses the same mutex hardware as MSM8994. This was wrong from the start, but never presented as an issue until the sfpb compatible was given different driver data. Fixes: 6a6d1978f9c0 ("arm64: dts: msm8992 SoC and LG Bullhead (Nexus 5X) support") Reported-by: Eugene Lepshy Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221219131918.446587-1-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/msm8992.dtsi | 4 ---- 1 file changed, 4 deletions(-) commit 6049aae52392539e505bfb8ccbcff3c26f1d2f0b Author: Christophe JAILLET Date: Sat Dec 17 17:05:41 2022 +0100 PM: AVS: qcom-cpr: Fix an error handling path in cpr_probe() If an error occurs after a successful pm_genpd_init() call, it should be undone by a corresponding pm_genpd_remove(). Add the missing call in the error handling path, as already done in the remove function. Fixes: bf6910abf548 ("power: avs: Add support for CPR (Core Power Reduction)") Signed-off-by: Christophe JAILLET Reviewed-by: Ulf Hansson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/0f520597dbad89ab99c217c8986912fa53eaf5f9.1671293108.git.christophe.jaillet@wanadoo.fr drivers/soc/qcom/cpr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 380cd3a34b7f9825a60ccb045611af9cb4533b70 Author: Dominik Kobinski Date: Fri Dec 30 20:48:45 2022 +0100 arm64: dts: msm8994-angler: fix the memory map Add reserved regions for memory hole and tz app mem to prevent rebooting. Also enable cont_splash_mem, it is the same as the generic 8994 one. Reported-by: Petr Vorel Signed-off-by: Dominik Kobinski Reviewed-by: Petr Vorel Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221230194845.57780-1-dominikkobinski314@gmail.com .../boot/dts/qcom/msm8994-huawei-angler-rev-101.dts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 0b693c8f8b88d50114caaa4d2337932d4d172631 Author: Chukun Pan Date: Mon Dec 19 18:10:52 2022 +0800 arm64: dts: rockchip: remove unsupported property from sdmmc2 for rock-3a 'supports-sdio' is not part of the DT binding and not supported by the Linux driver. Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20221219101052.7899-1-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 1 - 1 file changed, 1 deletion(-) commit 14292a4ae1a37a7c97fda59b85cd625c77165ddf Author: Arnaldo Carvalho de Melo Date: Tue Jan 10 11:46:37 2023 -0300 perf bpf: Avoid build breakage with libbpf < 0.8.0 + LIBBPF_DYNAMIC=1 In 746bd29e348f99b4 ("perf build: Use tools/lib headers from install path") we stopped having the tools/lib/ directory from the kernel sources in the header include path unconditionally, which breaks the build on systems with older versions of libbpf-devel, in this case 0.7.0 as some of the structures and function declarations present in the newer version of libbpf included in the kernel sources (tools/lib/bpf) are not anymore used, just the ones in the system libbpf. So instead of trying to provide alternative functions when the libbpf-bpf_program__set_insns feature test fails, fail a LIBBPF_DYNAMIC=1 build (requesting the use of the system's libbpf) and emit this build error message: $ make LIBBPF_DYNAMIC=1 -C tools/perf Makefile.config:593: *** Error: libbpf devel library needs to be >= 0.8.0 to build with LIBBPF_DYNAMIC, update or build statically with the version that comes with the kernel sources. Stop. $ For v6.3 these tests will be revamped and we'll require libbpf 1.0 as a minimal version for using LIBBPF_DYNAMIC=1, most distros should have it by now or at v6.3 time. Fixes: 746bd29e348f99b4 ("perf build: Use tools/lib headers from install path") Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/CAP-5=fVa51_URGsdDFVTzpyGmdDRj_Dj2EKPuDHNQ0BYgMSzUA@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 ++ 1 file changed, 2 insertions(+) commit 1692bffec674551163a7a4be32f59fdde04ecd27 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:34 2022 +0100 arm64: dts: rockchip: drop unused LED mode property from rk3328-roc-cc GPIO LEDs do not have a 'mode' property: rockchip/rk3328-roc-pc.dtb: leds: led-0: Unevaluated properties are not allowed ('mode' was unexpected) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221125144135.477144-1-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 2 -- 1 file changed, 2 deletions(-) commit eef034ac6690118c88f357b00e2b3239c9d8575d Author: Alexander Potapenko Date: Tue Jan 10 13:49:30 2023 +0100 affs: initialize fsdata in affs_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. Fixes: f2b6a16eb8f5 ("fs: affs convert to new aops") Suggested-by: Eric Biggers Signed-off-by: Alexander Potapenko Reviewed-by: David Sterba Signed-off-by: David Sterba fs/affs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f00eccb447762c99675f3f5b0311a1216135af95 Author: Ian Rogers Date: Fri Jan 6 07:13:20 2023 -0800 perf build: Fix build error when NO_LIBBPF=1 The $(LIBBPF) target should only be a dependency of prepare if the static version of libbpf is needed. Add a new LIBBPF_STATIC variable that is set by Makefile.config. Use LIBBPF_STATIC to determine whether the CFLAGS, etc. need updating and for adding $(LIBBPF) as a prepare dependency. As Makefile.config isn't loaded for "clean" as a target, always set LIBBPF_OUTPUT regardless of whether it is needed for $(LIBBPF). This is done to minimize conditional logic for $(LIBBPF)-clean. This issue and an original fix was reported by Mike Leach in: https://lore.kernel.org/lkml/20230105172243.7238-1-mike.leach@linaro.org/ Fixes: 746bd29e348f99b4 ("perf build: Use tools/lib headers from install path") Reported-by: Mike Leach Signed-off-by: Ian Rogers Tested-by: Jiri Olsa Cc: Alexander Shishkin Cc: bpf@vger.kernel.org Cc: Ian Rogers Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20230106151320.619514-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 ++ tools/perf/Makefile.perf | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) commit 213b760fbc69f2d6aed8f64f006a17869f0d8da4 Author: Arnaldo Carvalho de Melo Date: Mon Jan 9 11:59:30 2023 -0300 perf tools: Don't install libtraceevent plugins as its not anymore in the kernel sources While doing 'make -C tools/perf build-test' one can notice error messages while trying to install libtraceevent plugins, stop doing that as libtraceevent isn't anymore a homie. These are the warnings dealt with: make_install_prefix_slash_O: make install prefix=/tmp/krava/ failed to find: /tmp/krava/etc/bash_completion.d/perf failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_cfg80211.so failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_scsi.so failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_xen.so failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_function.so failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_sched_switch.so failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_mac80211.so failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_kvm.so failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_kmem.so failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_hrtimer.so failed to find: /tmp/krava/lib64/traceevent/plugins/plugin_jbd2.so Fixes: 4171925aa9f3f7bf ("tools lib traceevent: Remove libtraceevent") Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Link: http://lore.kernel.org/lkml/Y7xXz+TSpiCbQGjw@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 8 -------- tools/perf/tests/make | 12 ------------ 2 files changed, 20 deletions(-) commit dce088ab0d51ae3b14fb2bd608e9c649aadfe5dc Author: Leo Yan Date: Sun Jan 8 14:24:00 2023 +0800 perf kmem: Support field "node" in evsel__process_alloc_event() coping with recent tracepoint restructuring Commit 11e9734bcb6a7361 ("mm/slab_common: unify NUMA and UMA version of tracepoints") adds the field "node" into the tracepoints 'kmalloc' and 'kmem_cache_alloc', so this patch modifies the event process function to support the field "node". If field "node" is detected by checking function evsel__field(), it stats the cross allocation. When the "node" value is NUMA_NO_NODE (-1), it means the memory can be allocated from any memory node, in this case, we don't account it as a cross allocation. Fixes: 11e9734bcb6a7361 ("mm/slab_common: unify NUMA and UMA version of tracepoints") Reported-by: Ravi Bangoria Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Vlastimil Babka Link: https://lore.kernel.org/r/20230108062400.250690-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kmem.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit b3719108ae60169eda5c941ca5e1be1faa371c57 Author: Leo Yan Date: Sun Jan 8 14:23:59 2023 +0800 perf kmem: Support legacy tracepoints Commit 11e9734bcb6a7361 ("mm/slab_common: unify NUMA and UMA version of tracepoints") removed tracepoints 'kmalloc_node' and 'kmem_cache_alloc_node', we need to consider the tool should be backward compatible. If it detect the tracepoint "kmem:kmalloc_node", this patch enables the legacy tracepoints, otherwise, it will ignore them. Fixes: 11e9734bcb6a7361 ("mm/slab_common: unify NUMA and UMA version of tracepoints") Reported-by: Ravi Bangoria Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Vlastimil Babka Link: https://lore.kernel.org/r/20230108062400.250690-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kmem.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit d891f2b724b39a2a41e3ad7b57110193993242ff Author: Ian Rogers Date: Fri Jan 6 07:13:19 2023 -0800 perf build: Properly guard libbpf includes Including libbpf header files should be guarded by HAVE_LIBBPF_SUPPORT. In bpf_counter.h, move the skeleton utilities under HAVE_BPF_SKEL. Fixes: d6a735ef3277c45f ("perf bpf_counter: Move common functions to bpf_counter.h") Reported-by: Mike Leach Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Tested-by: Jiri Olsa Tested-by: Mike Leach Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20230105172243.7238-1-mike.leach@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 2 ++ tools/perf/util/bpf_counter.h | 6 ++++++ 2 files changed, 8 insertions(+) commit 33e24f0738b922b6f5f4118dbdc26cac8400d7b9 Author: Jarrah Gosbell Date: Wed Dec 7 11:32:13 2022 +0000 arm64: dts: rockchip: reduce thermal limits on rk3399-pinephone-pro While this device uses the rk3399 it is also enclosed in a tight package and cooled through the screen and back case. The default rk3399 thermal limits can result in a burnt screen. These lower limits have resulted in the existing burn not expanding and will hopefully result in future devices not experiencing the issue. Signed-off-by: Jarrah Gosbell Link: https://lore.kernel.org/r/20221207113212.8216-1-kernel@undef.tools Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit c2337a40e04dde1692b5b0a46ecc59f89aaba8a1 Author: Alexander Egorenkov Date: Mon Nov 14 11:40:08 2022 +0100 s390/kexec: fix ipl report address for kdump This commit addresses the following erroneous situation with file-based kdump executed on a system with a valid IPL report. On s390, a kdump kernel, its initrd and IPL report if present are loaded into a special and reserved on boot memory region - crashkernel. When a system crashes and kdump was activated before, the purgatory code is entered first which swaps the crashkernel and [0 - crashkernel size] memory regions. Only after that the kdump kernel is entered. For this reason, the pointer to an IPL report in lowcore must point to the IPL report after the swap and not to the address of the IPL report that was located in crashkernel memory region before the swap. Failing to do so, makes the kdump's decompressor try to read memory from the crashkernel memory region which already contains the production's kernel memory. The situation described above caused spontaneous kdump failures/hangs on systems where the Secure IPL is activated because on such systems an IPL report is always present. In that case kdump's decompressor tried to parse an IPL report which frequently lead to illegal memory accesses because an IPL report contains addresses to various data. Cc: Fixes: 99feaa717e55 ("s390/kexec_file: Create ipl report and pass to next kernel") Reviewed-by: Vasily Gorbik Signed-off-by: Alexander Egorenkov Signed-off-by: Heiko Carstens arch/s390/kernel/machine_kexec_file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 242fc66ae6e1e2b8519daacc7590a73cd0e8a6e4 Author: Mark Brown Date: Fri Jan 6 23:15:07 2023 +0000 ASoC: fsl-asoc-card: Fix naming of AC'97 CODEC widgets The fsl-asoc-card AC'97 support currently tries to route to Playback and Capture widgets provided by the AC'97 CODEC. This doesn't work since the generic AC'97 driver registers with an "AC97" at the front of the stream and hence widget names, update to reflect reality. It's not clear to me if or how this ever worked. Acked-by: Shengjiu Wang Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230106-asoc-udoo-probe-v1-2-a5d7469d4f67@kernel.org Signed-off-by: Mark Brown sound/soc/fsl/fsl-asoc-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c6a42b5b0ed6f96624f56954e93eeae107440a6 Author: Mark Brown Date: Fri Jan 6 23:15:06 2023 +0000 ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC The SSI driver calls the AC'97 playback and transmit streams "AC97 Playback" and "AC97 Capture" respectively. This is the same name used by the generic AC'97 CODEC driver in ASoC, creating confusion for the Freescale ASoC card when it attempts to use these widgets in routing. Add a "CPU" in the name like the regular DAIs registered by the driver to disambiguate. Acked-by: Shengjiu Wang Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230106-asoc-udoo-probe-v1-1-a5d7469d4f67@kernel.org Signed-off-by: Mark Brown sound/soc/fsl/fsl-asoc-card.c | 8 ++++---- sound/soc/fsl/fsl_ssi.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit f216033d770f7ca0eda491fe01a9f02e7af59576 Author: Felix Fietkau Date: Wed Dec 14 14:03:26 2022 +0100 wifi: mac80211: fix MLO + AP_VLAN check Instead of preventing adding AP_VLAN to MLO enabled APs, this check was preventing adding more than one 4-addr AP_VLAN regardless of the MLO status. Fix this by adding missing extra checks. Fixes: ae960ee90bb1 ("wifi: mac80211: prevent VLANs on MLDs") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20221214130326.37756-1-nbd@nbd.name Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg net/mac80211/iface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fa22b51ace8aa106267636f36170e940e676809c Author: Sriram R Date: Thu Dec 8 09:30:50 2022 +0530 mac80211: Fix MLO address translation for multiple bss case When multiple interfaces are present in the local interface list, new skb copy is taken before rx processing except for the first interface. The address translation happens each time only on the original skb since the hdr pointer is not updated properly to the newly created skb. As a result frames start to drop in userspace when address based checks or search fails. Signed-off-by: Sriram R Link: https://lore.kernel.org/r/20221208040050.25922-1-quic_srirrama@quicinc.com Signed-off-by: Johannes Berg net/mac80211/rx.c | 3 +++ 1 file changed, 3 insertions(+) commit 0eb38842ada035d71bb06fb9116f26f24ee0f998 Author: Aloka Dixit Date: Wed Dec 21 10:56:16 2022 -0800 wifi: mac80211: reset multiple BSSID options in stop_ap() Reset multiple BSSID options when all AP related configurations are reset in ieee80211_stop_ap(). Stale values result in HWSIM test failures (e.g. p2p_group_cli_invalid), if run after 'he_ap_ema'. Reported-by: Jouni Malinen Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20221221185616.11514-1-quic_alokad@quicinc.com Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg net/mac80211/cfg.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 592234e941f1addaa598601c9227e3b72d608625 Author: Alexander Wetzel Date: Fri Jan 6 23:31:41 2023 +0100 wifi: mac80211: Fix iTXQ AMPDU fragmentation handling mac80211 must not enable aggregation wile transmitting a fragmented MPDU. Enforce that for mac80211 internal TX queues (iTXQs). Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202301021738.7cd3e6ae-oliver.sang@intel.com Signed-off-by: Alexander Wetzel Link: https://lore.kernel.org/r/20230106223141.98696-1-alexander@wetzel-home.de Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg net/mac80211/agg-tx.c | 2 -- net/mac80211/ht.c | 31 +++++++++++++++++++++++++++++++ net/mac80211/tx.c | 18 ++++++------------ 3 files changed, 37 insertions(+), 14 deletions(-) commit 69403bad97aa0162e3d7911b27e25abe774093df Author: Alexander Wetzel Date: Fri Dec 30 13:18:50 2022 +0100 wifi: mac80211: sdata can be NULL during AMPDU start ieee80211_tx_ba_session_handle_start() may get NULL for sdata when a deauthentication is ongoing. Here a trace triggering the race with the hostapd test multi_ap_fronthaul_on_ap: (gdb) list *drv_ampdu_action+0x46 0x8b16 is in drv_ampdu_action (net/mac80211/driver-ops.c:396). 391 int ret = -EOPNOTSUPP; 392 393 might_sleep(); 394 395 sdata = get_bss_sdata(sdata); 396 if (!check_sdata_in_driver(sdata)) 397 return -EIO; 398 399 trace_drv_ampdu_action(local, sdata, params); 400 wlan0: moving STA 02:00:00:00:03:00 to state 3 wlan0: associated wlan0: deauthenticating from 02:00:00:00:03:00 by local choice (Reason: 3=DEAUTH_LEAVING) wlan3.sta1: Open BA session requested for 02:00:00:00:00:00 tid 0 wlan3.sta1: dropped frame to 02:00:00:00:00:00 (unauthorized port) wlan0: moving STA 02:00:00:00:03:00 to state 2 wlan0: moving STA 02:00:00:00:03:00 to state 1 wlan0: Removed STA 02:00:00:00:03:00 wlan0: Destroyed STA 02:00:00:00:03:00 BUG: unable to handle page fault for address: fffffffffffffb48 PGD 11814067 P4D 11814067 PUD 11816067 PMD 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 2 PID: 133397 Comm: kworker/u16:1 Tainted: G W 6.1.0-rc8-wt+ #59 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-20220807_005459-localhost 04/01/2014 Workqueue: phy3 ieee80211_ba_session_work [mac80211] RIP: 0010:drv_ampdu_action+0x46/0x280 [mac80211] Code: 53 48 89 f3 be 89 01 00 00 e8 d6 43 bf ef e8 21 46 81 f0 83 bb a0 1b 00 00 04 75 0e 48 8b 9b 28 0d 00 00 48 81 eb 10 0e 00 00 <8b> 93 58 09 00 00 f6 c2 20 0f 84 3b 01 00 00 8b 05 dd 1c 0f 00 85 RSP: 0018:ffffc900025ebd20 EFLAGS: 00010287 RAX: 0000000000000000 RBX: fffffffffffff1f0 RCX: ffff888102228240 RDX: 0000000080000000 RSI: ffffffff918c5de0 RDI: ffff888102228b40 RBP: ffffc900025ebd40 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000000 R12: ffff888118c18ec0 R13: 0000000000000000 R14: ffffc900025ebd60 R15: ffff888018b7efb8 FS: 0000000000000000(0000) GS:ffff88817a600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffffffffffb48 CR3: 0000000105228006 CR4: 0000000000170ee0 Call Trace: ieee80211_tx_ba_session_handle_start+0xd0/0x190 [mac80211] ieee80211_ba_session_work+0xff/0x2e0 [mac80211] process_one_work+0x29f/0x620 worker_thread+0x4d/0x3d0 ? process_one_work+0x620/0x620 kthread+0xfb/0x120 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 Signed-off-by: Alexander Wetzel Link: https://lore.kernel.org/r/20221230121850.218810-2-alexander@wetzel-home.de Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg net/mac80211/agg-tx.c | 6 +++++- net/mac80211/driver-ops.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 4444bc2116aecdcde87dce80373540adc8bd478b Author: Alexander Wetzel Date: Fri Dec 30 13:18:49 2022 +0100 wifi: mac80211: Proper mark iTXQs for resumption When a running wake_tx_queue() call is aborted due to a hw queue stop the corresponding iTXQ is not always correctly marked for resumption: wake_tx_push_queue() can stops the queue run without setting @IEEE80211_TXQ_STOP_NETIF_TX. Without the @IEEE80211_TXQ_STOP_NETIF_TX flag __ieee80211_wake_txqs() will not schedule a new queue run and remaining frames in the queue get stuck till another frame is queued to it. Fix the issue for all drivers - also the ones with custom wake_tx_queue callbacks - by moving the logic into ieee80211_tx_dequeue() and drop the redundant @txqs_stopped. @IEEE80211_TXQ_STOP_NETIF_TX is also renamed to @IEEE80211_TXQ_DIRTY to better describe the flag. Fixes: c850e31f79f0 ("wifi: mac80211: add internal handler for wake_tx_queue") Signed-off-by: Alexander Wetzel Link: https://lore.kernel.org/r/20221230121850.218810-1-alexander@wetzel-home.de Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg include/net/mac80211.h | 4 ---- net/mac80211/debugfs_sta.c | 5 +++-- net/mac80211/driver-ops.h | 2 +- net/mac80211/ieee80211_i.h | 2 +- net/mac80211/tx.c | 20 +++++++++++++------- net/mac80211/util.c | 42 +++--------------------------------------- 6 files changed, 21 insertions(+), 54 deletions(-) commit e66b7920aa5ac5b1a1997a454004ba9246a3c005 Author: Felix Fietkau Date: Fri Dec 30 21:07:47 2022 +0100 wifi: mac80211: fix initialization of rx->link and rx->link_sta There are some codepaths that do not initialize rx->link_sta properly. This causes a crash in places which assume that rx->link_sta is valid if rx->sta is valid. One known instance is triggered by __ieee80211_rx_h_amsdu being called from fast-rx. It results in a crash like this one: BUG: kernel NULL pointer dereference, address: 00000000000000a8 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP PTI CPU: 1 PID: 506 Comm: mt76-usb-rx phy Tainted: G E 6.1.0-debian64x+1.7 #3 Hardware name: ZOTAC ZBOX-ID92/ZBOX-IQ01/ZBOX-ID92/ZBOX-IQ01, BIOS B220P007 05/21/2014 RIP: 0010:ieee80211_deliver_skb+0x62/0x1f0 [mac80211] Code: 00 48 89 04 24 e8 9e a7 c3 df 89 c0 48 03 1c c5 a0 ea 39 a1 4c 01 6b 08 48 ff 03 48 83 7d 28 00 74 11 48 8b 45 30 48 63 55 44 <48> 83 84 d0 a8 00 00 00 01 41 8b 86 c0 11 00 00 8d 50 fd 83 fa 01 RSP: 0018:ffff999040803b10 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffffb9903f496480 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff999040803ce0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8d21828ac900 R13: 000000000000004a R14: ffff8d2198ed89c0 R15: ffff8d2198ed8000 FS: 0000000000000000(0000) GS:ffff8d24afe80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000a8 CR3: 0000000429810002 CR4: 00000000001706e0 Call Trace: __ieee80211_rx_h_amsdu+0x1b5/0x240 [mac80211] ? ieee80211_prepare_and_rx_handle+0xcdd/0x1320 [mac80211] ? __local_bh_enable_ip+0x3b/0xa0 ieee80211_prepare_and_rx_handle+0xcdd/0x1320 [mac80211] ? prepare_transfer+0x109/0x1a0 [xhci_hcd] ieee80211_rx_list+0xa80/0xda0 [mac80211] mt76_rx_complete+0x207/0x2e0 [mt76] mt76_rx_poll_complete+0x357/0x5a0 [mt76] mt76u_rx_worker+0x4f5/0x600 [mt76_usb] ? mt76_get_min_avg_rssi+0x140/0x140 [mt76] __mt76_worker_fn+0x50/0x80 [mt76] kthread+0xed/0x120 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 Since the initialization of rx->link and rx->link_sta is rather convoluted and duplicated in many places, clean it up by using a helper function to set it. Fixes: ccdde7c74ffd ("wifi: mac80211: properly implement MLO key handling") Fixes: b320d6c456ff ("wifi: mac80211: use correct rx link_sta instead of default") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20221230200747.19040-1-nbd@nbd.name [remove unnecessary rx->sta->sta.mlo check] Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg net/mac80211/rx.c | 222 ++++++++++++++++++++++++------------------------------ 1 file changed, 99 insertions(+), 123 deletions(-) commit 7c6dd961d0c8e7e8f9fdc65071fb09ece702e18d Author: Peter Zijlstra Date: Tue Jan 10 12:15:40 2023 +0100 x86/boot: Avoid using Intel mnemonics in AT&T syntax asm With 'GNU assembler (GNU Binutils for Debian) 2.39.90.20221231' the build now reports: arch/x86/realmode/rm/../../boot/bioscall.S: Assembler messages: arch/x86/realmode/rm/../../boot/bioscall.S:35: Warning: found `movsd'; assuming `movsl' was meant arch/x86/realmode/rm/../../boot/bioscall.S:70: Warning: found `movsd'; assuming `movsl' was meant arch/x86/boot/bioscall.S: Assembler messages: arch/x86/boot/bioscall.S:35: Warning: found `movsd'; assuming `movsl' was meant arch/x86/boot/bioscall.S:70: Warning: found `movsd'; assuming `movsl' was meant Which is due to: PR gas/29525 Note that with the dropped CMPSD and MOVSD Intel Syntax string insn templates taking operands, mixed IsString/non-IsString template groups (with memory operands) cannot occur anymore. With that maybe_adjust_templates() becomes unnecessary (and is hence being removed). More details: https://sourceware.org/bugzilla/show_bug.cgi?id=29525 Borislav Petkov further explains: " the particular problem here is is that the 'd' suffix is "conflicting" in the sense that you can have SSE mnemonics like movsD %xmm... and the same thing also for string ops (which is the case here) so apparently the agreement in binutils land is to use the always accepted suffixes 'l' or 'q' and phase out 'd' slowly... " Fixes: 7a734e7dd93b ("x86, setup: "glove box" BIOS calls -- infrastructure") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/Y71I3Ex2pvIxMpsP@hirez.programming.kicks-ass.net arch/x86/boot/bioscall.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 40c18f363a0806d4f566e8a9a9bd2d7766a72cf5 Merge: 526970be53d5 83dcedd5540d Author: Linus Torvalds Date: Tue Jan 10 05:34:13 2023 -0600 Merge tag '6.2-rc3-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull ksmb server fixes from Steve French: - fix possible infinite loop in socket handler - fix possible panic in ntlmv2 authentication - fix error handling on tree connect * tag '6.2-rc3-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: fix infinite loop in ksmbd_conn_handler_loop() ksmbd: check nt_len to be at least CIFS_ENCPWD_SIZE in ksmbd_decode_ntlmssp_auth_blob ksmbd: send proper error response in smb2_tree_connect() commit 526970be53d5dd60122141540142fb0eeb0b22d8 Author: Peter Zijlstra Date: Tue Jan 10 11:44:51 2023 +0100 sh/mm: Fix pmd_t for real Because typing is hard... Fixes: 0862ff059c9e ("sh/mm: Make pmd_t similar to pte_t") Reported-by: Guenter Roeck Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Linus Torvalds arch/sh/include/asm/pgtable-3level.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bd68b32c911a3a610ad782bb04d1a7bfc440638 Author: Christian König Date: Mon Jan 9 09:06:03 2023 +0100 drm/amdgpu: fix pipeline sync v2 This fixes a potential memory leak of dma_fence objects in the CS code as well as glitches in firefox because of missing pipeline sync. v2: use the scheduler instead of the fence context Signed-off-by: Christian König Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2323 Tested-by: Michal Kubecek mkubecek@suse.cz Tested-by: Vlastimil Babka Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230109130120.73389-1-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 46 ++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 16 deletions(-) commit b3deec25847bda34e34d5d7be02f633caf000bd8 Author: Dean Luick Date: Mon Jan 9 12:31:31 2023 -0500 IB/hfi1: Remove user expected buffer invalidate race During setup, there is a possible race between a page invalidate and hardware programming. Add a covering invalidate over the user target range during setup. If anything within that range is invalidated during setup, fail the setup. Once set up, each TID will have its own invalidate callback and invalidate. Fixes: 3889551db212 ("RDMA/hfi1: Use mmu_interval_notifier_insert for user_exp_rcv") Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167328549178.1472310.9867497376936699488.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/user_exp_rcv.c | 58 ++++++++++++++++++++++++++++--- drivers/infiniband/hw/hfi1/user_exp_rcv.h | 2 ++ 2 files changed, 55 insertions(+), 5 deletions(-) commit 1c7edde1b5720ddb0aff5ca8c7f605a0f92526eb Author: Dean Luick Date: Mon Jan 9 12:31:26 2023 -0500 IB/hfi1: Immediately remove invalid memory from hardware When a user expected receive page is unmapped, it should be immediately removed from hardware rather than depend on a reaction from user space. Fixes: 2677a7680e77 ("IB/hfi1: Fix memory leak during unexpected shutdown") Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167328548663.1472310.7871808081861622659.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/user_exp_rcv.c | 43 +++++++++++++++++++++---------- drivers/infiniband/hw/hfi1/user_exp_rcv.h | 1 + 2 files changed, 30 insertions(+), 14 deletions(-) commit e0c4a422f5246abefbf7c178ef99a1f2dc3c5f62 Author: Dean Luick Date: Mon Jan 9 12:31:21 2023 -0500 IB/hfi1: Fix expected receive setup error exit issues Fix three error exit issues in expected receive setup. Re-arrange error exits to increase readability. Issues and fixes: 1. Possible missed page unpin if tidlist copyout fails and not all pinned pages where made part of a TID. Fix: Unpin the unused pages. 2. Return success with unset return values tidcnt and length when no pages were pinned. Fix: Return -ENOSPC if no pages were pinned. 3. Return success with unset return values tidcnt and length when no rcvarray entries available. Fix: Return -ENOSPC if no rcvarray entries are available. Fixes: 7e7a436ecb6e ("staging/hfi1: Add TID entry program function body") Fixes: 97736f36dbeb ("IB/hfi1: Validate page aligned for a given virtual addres") Fixes: f404ca4c7ea8 ("IB/hfi1: Refactor hfi_user_exp_rcv_setup() IOCTL") Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167328548150.1472310.1492305874804187634.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/user_exp_rcv.c | 83 +++++++++++++++++++------------ 1 file changed, 50 insertions(+), 33 deletions(-) commit ecf91551cdd2925ed6d9a9d99074fa5f67b90596 Author: Dean Luick Date: Mon Jan 9 12:31:16 2023 -0500 IB/hfi1: Reserve user expected TIDs To avoid a race, reserve the number of user expected TIDs before setup. Fixes: 7e7a436ecb6e ("staging/hfi1: Add TID entry program function body") Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167328547636.1472310.7419712824785353905.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/user_exp_rcv.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 0a0a6e80472c98947d73c3d13bcd7d101895f55d Author: Dean Luick Date: Mon Jan 9 12:31:11 2023 -0500 IB/hfi1: Reject a zero-length user expected buffer A zero length user buffer makes no sense and the code does not handle it correctly. Instead, reject a zero length as invalid. Fixes: 97736f36dbeb ("IB/hfi1: Validate page aligned for a given virtual addres") Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167328547120.1472310.6362802432127399257.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/user_exp_rcv.c | 2 ++ 1 file changed, 2 insertions(+) commit 0afec5e9cea732cb47014655685a2a47fb180c31 Author: Yonatan Nachum Date: Mon Jan 9 13:37:11 2023 +0000 RDMA/core: Fix ib block iterator counter overflow When registering a new DMA MR after selecting the best aligned page size for it, we iterate over the given sglist to split each entry to smaller, aligned to the selected page size, DMA blocks. In given circumstances where the sg entry and page size fit certain sizes and the sg entry is not aligned to the selected page size, the total size of the aligned pages we need to cover the sg entry is >= 4GB. Under this circumstances, while iterating page aligned blocks, the counter responsible for counting how much we advanced from the start of the sg entry is overflowed because its type is u32 and we pass 4GB in size. This can lead to an infinite loop inside the iterator function because the overflow prevents the counter to be larger than the size of the sg entry. Fix the presented problem by changing the advancement condition to eliminate overflow. Backtrace: [ 192.374329] efa_reg_user_mr_dmabuf [ 192.376783] efa_register_mr [ 192.382579] pgsz_bitmap 0xfffff000 rounddown 0x80000000 [ 192.386423] pg_sz [0x80000000] umem_length[0xc0000000] [ 192.392657] start 0x0 length 0xc0000000 params.page_shift 31 params.page_num 3 [ 192.399559] hp_cnt[3], pages_in_hp[524288] [ 192.403690] umem->sgt_append.sgt.nents[1] [ 192.407905] number entries: [1], pg_bit: [31] [ 192.411397] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.415601] biter->__sg_advance [665837568] sg_dma_len[3221225472] [ 192.419823] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.423976] biter->__sg_advance [2813321216] sg_dma_len[3221225472] [ 192.428243] biter->__sg_nents [1] biter->__sg [0000000008b0c5d8] [ 192.432397] biter->__sg_advance [665837568] sg_dma_len[3221225472] Fixes: a808273a495c ("RDMA/verbs: Add a DMA iterator to return aligned contiguous memory blocks") Signed-off-by: Yonatan Nachum Link: https://lore.kernel.org/r/20230109133711.13678-1-ynachum@amazon.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/verbs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 53da7aec32982f5ee775b69dce06d63992ce4af3 Author: Hariprasad Kelam Date: Mon Jan 9 11:43:25 2023 +0530 octeontx2-pf: Fix resource leakage in VF driver unbind resources allocated like mcam entries to support the Ntuple feature and hash tables for the tc feature are not getting freed in driver unbind. This patch fixes the issue. Fixes: 2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count") Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Link: https://lore.kernel.org/r/20230109061325.21395-1-hkelam@marvell.com Signed-off-by: Paolo Abeni drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 2 ++ 1 file changed, 2 insertions(+) commit 80502ffab2fa92ba9777e381efea2efddc348d13 Author: Chris Packham Date: Thu Dec 15 15:54:02 2022 +1300 arm64: dts: marvell: AC5/AC5X: Fix address for UART1 The correct address offset is 0x12100. Fixes: 31be791e26cf ("arm64: dts: marvell: Add UART1-3 for AC5/AC5X") Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74cf679547d6b735666f2ab41ea7c62b447c9692 Merge: 2ea26b4de6f4 d68ff8ad3351 Author: Paolo Abeni Date: Tue Jan 10 10:13:52 2023 +0100 Merge branch 'selftests-net-isolate-l2_tos_ttl_inherit-sh-in-its-own-netns' Guillaume Nault says: ==================== selftests/net: Isolate l2_tos_ttl_inherit.sh in its own netns. l2_tos_ttl_inherit.sh uses a veth pair to run its tests, but only one of the veth interfaces runs in a dedicated netns. The other one remains in the initial namespace where the existing network configuration can interfere with the setup used for the tests. Isolate both veth devices in their own netns and ensure everything gets cleaned up when the script exits. Link: https://lore.kernel.org/netdev/924f1062-ab59-9b88-3b43-c44e73a30387@alu.unizg.hr/ ==================== Link: https://lore.kernel.org/r/cover.1673191942.git.gnault@redhat.com Signed-off-by: Paolo Abeni commit d68ff8ad3351b8fc8d6f14b9a4f5cc8ba3e8bd13 Author: Guillaume Nault Date: Sun Jan 8 16:45:50 2023 +0100 selftests/net: l2_tos_ttl_inherit.sh: Ensure environment cleanup on failure. Use 'set -e' and an exit handler to stop the script if a command fails and ensure the test environment is cleaned up in any case. Also, handle the case where the script is interrupted by SIGINT. The only command that's expected to fail is 'wait $ping_pid', since it's killed by the script. Handle this case with '|| true' to make it play well with 'set -e'. Finally, return the Kselftest SKIP code (4) when the script breaks because of an environment problem or a command line failure. The 0 and 1 return codes should now reliably indicate that all tests have been run (0: all tests run and passed, 1: all tests run but at least one failed, 4: test script didn't run completely). Fixes: b690842d12fd ("selftests/net: test l2 tunnel TOS/TTL inheriting") Reported-by: Mirsad Goran Todorovac Tested-by: Mirsad Goran Todorovac Signed-off-by: Guillaume Nault Signed-off-by: Paolo Abeni tools/testing/selftests/net/l2_tos_ttl_inherit.sh | 40 ++++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) commit c53cb00f7983a5474f2d36967f84908b85af9159 Author: Guillaume Nault Date: Sun Jan 8 16:45:46 2023 +0100 selftests/net: l2_tos_ttl_inherit.sh: Run tests in their own netns. This selftest currently runs half in the current namespace and half in a netns of its own. Therefore, the test can fail if the current namespace is already configured with incompatible parameters (for example if it already has a veth0 interface). Adapt the script to put both ends of the veth pair in their own netns. Now veth0 is created in NS0 instead of the current namespace, while veth1 is set up in NS1 (instead of the 'testing' netns). The user visible netns names are randomised to minimise the risk of conflicts with already existing namespaces. The cleanup() function doesn't need to remove the virtual interface anymore: deleting NS0 and NS1 automatically removes the virtual interfaces they contained. We can remove $ns, which was only used to run ip commands in the 'testing' netns (let's use the builtin "-netns" option instead). However, we still need a similar functionality as ping and tcpdump now need to run in NS0. So we now have $RUN_NS0 for that. Fixes: b690842d12fd ("selftests/net: test l2 tunnel TOS/TTL inheriting") Reported-by: Mirsad Goran Todorovac Tested-by: Mirsad Goran Todorovac Signed-off-by: Guillaume Nault Signed-off-by: Paolo Abeni tools/testing/selftests/net/l2_tos_ttl_inherit.sh | 162 +++++++++++++--------- 1 file changed, 93 insertions(+), 69 deletions(-) commit e59370b2e96eb8e7e057a2a16e999ff385a3f2fb Author: Guillaume Nault Date: Sun Jan 8 16:45:41 2023 +0100 selftests/net: l2_tos_ttl_inherit.sh: Set IPv6 addresses with "nodad". The ping command can run before DAD completes. In that case, ping may fail and break the selftest. We don't need DAD here since we're working on isolated device pairs. Fixes: b690842d12fd ("selftests/net: test l2 tunnel TOS/TTL inheriting") Signed-off-by: Guillaume Nault Signed-off-by: Paolo Abeni tools/testing/selftests/net/l2_tos_ttl_inherit.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 12724ba38992bd045e92a9a88a868a530f89d13e Author: Gao Xiang Date: Tue Jan 10 15:49:27 2023 +0800 erofs: fix kvcalloc() misuse with __GFP_NOFAIL As reported by syzbot [1], kvcalloc() cannot work with __GFP_NOFAIL. Let's use kcalloc() instead. [1] https://lore.kernel.org/r/0000000000007796bd05f1852ec2@google.com Reported-by: syzbot+c3729cda01706a04fb98@syzkaller.appspotmail.com Fixes: fe3e5914e6dc ("erofs: try to leave (de)compressed_pages on stack if possible") Fixes: 4f05687fd703 ("erofs: introduce struct z_erofs_decompress_backend") Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20230110074927.41651-1-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6acd87d50998ef0afafc441613aeaf5a8f5c9eff Author: Siddh Raman Pant Date: Fri Dec 9 15:51:51 2022 +0530 erofs/zmap.c: Fix incorrect offset calculation Effective offset to add to length was being incorrectly calculated, which resulted in iomap->length being set to 0, triggering a WARN_ON in iomap_iter_done(). Fix that, and describe it in comments. This was reported as a crash by syzbot under an issue about a warning encountered in iomap_iter_done(), but unrelated to erofs. C reproducer: https://syzkaller.appspot.com/text?tag=ReproC&x=1037a6b2880000 Kernel config: https://syzkaller.appspot.com/text?tag=KernelConfig&x=e2021a61197ebe02 Dashboard link: https://syzkaller.appspot.com/bug?extid=a8e049cd3abd342936b6 Reported-by: syzbot+a8e049cd3abd342936b6@syzkaller.appspotmail.com Suggested-by: Gao Xiang Signed-off-by: Siddh Raman Pant Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20221209102151.311049-1-code@siddh.me Signed-off-by: Gao Xiang fs/erofs/zmap.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit de1ccb9e61728dd941fe0e955a7a129418657267 Author: Adrian Chan Date: Mon Jan 9 16:05:20 2023 -0500 ALSA: hda/hdmi: Add a HP device 0x8715 to force connect list Add the 'HP Engage Flex Mini' device to the force connect list to enable audio through HDMI. Signed-off-by: Adrian Chan Cc: Link: https://lore.kernel.org/r/20230109210520.16060-1-adchan@google.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit c7c0644ead24c59cc5e0f2ff0ade89b21783614a Author: Russell King (Oracle) Date: Tue Jan 3 17:02:05 2023 +0000 MAINTAINERS: stop nvme matching for nvmem files The nvme patterns detect all include files starting with nvme, which also picks up the nvmem subsystem header files. Fix this by using a more specific pattern. Signed-off-by: Russell King (Oracle) [hch: switched to a purely inclusive pattern instead of excluding nvmem*] Signed-off-by: Christoph Hellwig MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 313c08c72ee7f87c54e34baec5cc4f4005e8800d Author: Christoph Hellwig Date: Sun Jan 8 07:56:54 2023 +0100 nvme: don't allow unprivileged passthrough on partitions Passthrough commands can always access the entire device, and thus submitting them on partitions is an privelege escalation. In hindsight we should have never allowed any passthrough commands on partitions, but it's probably too late to change that decision now. Fixes: e4fbcf32c860 ("nvme: identify-namespace without CAP_SYS_ADMIN") Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/ioctl.c | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) commit 7b7fdb8e2dbc15ad4e81a328f1c60d1691c6d6be Author: Christoph Hellwig Date: Sun Jan 8 07:53:03 2023 +0100 nvme: replace the "bool vec" arguments with flags in the ioctl path To prepare for passing down more information, replace the boolean vec argument with a more extensible flags one. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/ioctl.c | 53 +++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 25 deletions(-) commit 2fa1dc8637b5f3397f22b2771f8a4fb8712c10dc Author: Christoph Hellwig Date: Sun Jan 8 07:45:30 2023 +0100 nvme: remove __nvme_ioctl Open code __nvme_ioctl in the two callers to make future changes that pass down additional paramters in the ioctl path easier. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/ioctl.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 09113abfb6ba981cb7cb4960b230251afd8966dc Author: Tong Zhang Date: Thu Dec 29 10:37:31 2022 -0800 nvme-pci: fix error handling in nvme_pci_enable() There are two issues in nvme_pci_enable(): 1) If pci_alloc_irq_vectors() fails, device is left enabled. Fix this by adding a goto disable statement. 2) nvme_pci_configure_admin_queue could return -ENODEV, in this case, we will need to free IRQ properly. Otherwise the following warning could be triggered: [ 5.286752] WARNING: CPU: 0 PID: 33 at kernel/irq/irqdomain.c:253 irq_domain_remove+0x12d/0x140 [ 5.290547] Call Trace: [ 5.290626] [ 5.290695] msi_remove_device_irq_domain+0xc9/0xf0 [ 5.290843] msi_device_data_release+0x15/0x80 [ 5.290978] release_nodes+0x58/0x90 [ 5.293788] WARNING: CPU: 0 PID: 33 at kernel/irq/msi.c:276 msi_device_data_release+0x76/0x80 [ 5.297573] Call Trace: [ 5.297651] [ 5.297719] release_nodes+0x58/0x90 [ 5.297831] devres_release_all+0xef/0x140 [ 5.298339] device_unbind_cleanup+0x11/0xc0 [ 5.298479] really_probe+0x296/0x320 Fixes: a6ee7f19ebfd ("nvme-pci: call nvme_pci_configure_admin_queue from nvme_pci_enable") Co-developed-by: Keith Busch Signed-off-by: Tong Zhang Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 453116a441f0e556fe8900c99a632529e48f18c9 Author: Hector Martin Date: Wed Jan 4 19:16:42 2023 +0900 nvme-pci: add NVME_QUIRK_IDENTIFY_CNS quirk to Apple T2 controllers This mirrors the quirk added to Apple Silicon controllers in apple.c. These controllers do not support the Active NS ID List command and behave identically to the SoC version judging by existing user reports/syslogs, so will need the same fix. This quirk reverts back to NVMe 1.0 behavior and disables the broken commands. Fixes: 811f4de0344d ("nvme: avoid fallback to sequential scan due to transient issues") Signed-off-by: Hector Martin Tested-by: Orlando Chamberlain Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aa96d6aa7563ec2948195d1f5892cb7a2caa88e3 Author: Hector Martin Date: Wed Jan 4 18:21:49 2023 +0900 nvme-apple: add NVME_QUIRK_IDENTIFY_CNS quirk to fix regression From the get-go, this driver and the ANS syslog have been complaining about namespace identification. In 6.2-rc1, commit 811f4de0344d ("nvme: avoid fallback to sequential scan due to transient issues") regressed the driver by no longer allowing fallback to sequential namespace scans, leaving us with no namespaces. It turns out that the real problem is that this controller claiming NVMe 1.1 compat is treating the CNS field as a binary field, as in NVMe 1.0. This already has a quirk, NVME_QUIRK_IDENTIFY_CNS, so set it for the controller to fix all this nonsense (including other errors triggered by other CNS commands). Fixes: 811f4de0344d ("nvme: avoid fallback to sequential scan due to transient issues") Fixes: 5bd2927aceba ("nvme-apple: Add initial Apple SoC NVMe driver") Signed-off-by: Hector Martin Reviewed-by: Sven Peter Signed-off-by: Christoph Hellwig drivers/nvme/host/apple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9828994ac492e8e7de47fe66097b7e665328f348 Author: Emeel Hakim Date: Sun Dec 11 13:22:23 2022 +0200 net/mlx5e: Fix macsec possible null dereference when updating MAC security entity (SecY) Upon updating MAC security entity (SecY) in hw offload path, the macsec security association (SA) initialization routine is called. In case of extended packet number (epn) is enabled the salt and ssci attributes are retrieved using the MACsec driver rx_sa context which is unavailable when updating a SecY property such as encoding-sa hence the null dereference. Fix by using the provided SA to set those attributes. Fixes: 4411a6c0abd3 ("net/mlx5e: Support MACsec offload extended packet number (EPN)") Signed-off-by: Emeel Hakim Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit f5e1ed04aa2ea665a796f0109091ca3f2b01024a Author: Emeel Hakim Date: Wed Dec 14 16:34:13 2022 +0200 net/mlx5e: Fix macsec ssci attribute handling in offload path Currently when macsec offload is set with extended packet number (epn) enabled, the driver wrongly deduce the short secure channel identifier (ssci) from the salt instead of the stand alone ssci attribute as it should, consequently creating a mismatch between the kernel and driver's ssci values. Fix by using the ssci value from the relevant attribute. Fixes: 4411a6c0abd3 ("net/mlx5e: Support MACsec offload extended packet number (EPN)") Signed-off-by: Emeel Hakim Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit cd4f186dc110a0f0b3484048b8ecd42ee006ca6d Author: Shay Drory Date: Thu Dec 15 15:33:38 2022 +0200 net/mlx5: E-switch, Coverity: overlapping copy When a capability is set via port function caps callbacks, a memcpy() is performed in which the source and the target are the same address, e.g.: the copy is redundant. Hence, Remove it. Discovered by Coverity. Fixes: 7db98396ef45 ("net/mlx5: E-Switch, Implement devlink port function cmds to control RoCE") Fixes: e5b9642a33be ("net/mlx5: E-Switch, Implement devlink port function cmds to control migratable") Signed-off-by: Shay Drory Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 4 ---- 1 file changed, 4 deletions(-) commit d515d63cae2cd186acf40deaa8ef33067bb7f637 Author: Gavin Li Date: Tue Dec 27 04:54:09 2022 +0200 net/mlx5e: Don't support encap rules with gbp option Previously, encap rules with gbp option would be offloaded by mistake but driver does not support gbp option offload. To fix this issue, check if the encap rule has gbp option and don't offload the rule Fixes: d8f9dfae49ce ("net: sched: allow flower to match vxlan options") Signed-off-by: Gavin Li Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c | 2 ++ 1 file changed, 2 insertions(+) commit fe91d57277eef8bb4aca05acfa337b4a51d0bba4 Author: Rahul Rameshbabu Date: Mon Dec 5 14:26:09 2022 -0800 net/mlx5: Fix ptp max frequency adjustment range .max_adj of ptp_clock_info acts as an absolute value for the amount in ppb that can be set for a single call of .adjfine. This means that a single call to .getfine cannot be greater than .max_adj or less than -(.max_adj). Provides correct value for max frequency adjustment value supported by devices. Fixes: 3d8c38af1493 ("net/mlx5e: Add PTP Hardware Clock (PHC) support") Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3099d2e62f9061ed57798e68e285d35837be686f Author: Aya Levin Date: Sun Jan 8 12:53:02 2023 +0200 net/mlx5e: Fix memory leak on updating vport counters When updating statistics driver queries the vport's counters. On fail, add error path releasing the allocated buffer avoiding memory leak. Fixes: 64b68e369649 ("net/mlx5: Refactor and expand rep vport stat group") Signed-off-by: Aya Levin Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c09502d54dc109530ccb9a8910ab286d0745f119 Author: Oz Shlomo Date: Thu Dec 8 08:31:48 2022 +0000 net/mlx5e: TC, Restore pkt rate policing support The offending commit removed the support for all packet rate metering. Restore the pkt rate metering support by removing the restriction. Fixes: 3603f26633e7 ("net/mlx5e: TC, allow meter jump control action") Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/police.c | 6 ------ 1 file changed, 6 deletions(-) commit 2414c9b7a29d237c9c40abd62853dbc08b4ba7df Author: Oz Shlomo Date: Wed Dec 7 11:05:02 2022 +0000 net/mlx5e: TC, ignore match level for post meter rules The post meter table only matches on reg_c5. As such, the inner/outer match levels are irrelevant for the match critieria. The cited patch only sets the outer criteria to none, thus setting the inner match level for encapsulated packets. This caused rules with police action on tunnel devices to not find an existing flow group for the match criteria, thus failing to offload the rule. Set both the inner and outer match levels to none for post_meter rules. Fixes: 0d8c38d44f33 ("net/mlx5e: TC, init post meter rules with branching attributes") Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.c | 1 + 1 file changed, 1 insertion(+) commit b5e23931c45a2f99f60a2f2b98a9e4d5a62a5b13 Author: Dragos Tatulea Date: Wed Nov 23 16:59:13 2022 +0200 net/mlx5e: IPoIB, Fix child PKEY interface stats on rx path The current code always does the accounting using the stats from the parent interface (linked in the rq). This doesn't work when there are child interfaces configured. Fix this behavior by always using the stats from the child interface priv. This will also work for parent only interfaces: the child (netdev) and parent netdev (rq->netdev) will point to the same thing. Fixes: be98737a4faa ("net/mlx5e: Use dynamic per-channel allocations in stats") Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31c70bfe58ef09fe36327ddcced9143a16e9e83d Author: Dragos Tatulea Date: Fri Nov 25 17:51:19 2022 +0200 net/mlx5e: IPoIB, Block PKEY interfaces with less rx queues than parent A user is able to configure an arbitrary number of rx queues when creating an interface via netlink. This doesn't work for child PKEY interfaces because the child interface uses the parent receive channels. Although the child shares the parent's receive channels, the number of rx queues is important for the channel_stats array: the parent's rx channel index is used to access the child's channel_stats. So the array has to be at least as large as the parent's rx queue size for the counting to work correctly and to prevent out of bound accesses. This patch checks for the mentioned scenario and returns an error when trying to create the interface. The error is propagated to the user. Fixes: be98737a4faa ("net/mlx5e: Use dynamic per-channel allocations in stats") Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 806a8df7126a8c05d60411eeb81057c2a8bbe7a7 Author: Dragos Tatulea Date: Thu Dec 15 13:02:38 2022 +0200 net/mlx5e: IPoIB, Block queue count configuration when sub interfaces are present PKEY sub interfaces share the receive queues with the parent interface. While setting the sub interface queue count is not supported, it is currently possible to change the number of queues of the parent interface. Thus we can end up with inconsistent queue sizes between the parent and its sub interfaces. This change disallows setting the queue count on the parent interface when sub interfaces are present. This is achieved by introducing an explicit reference to the parent netdev in the mlx5i_priv of the child interface. An additional counter is also required on the parent side to detect when sub interfaces are attached and for proper cleanup. The rtnl lock is taken during the ethtool op and the sub interface ndo_init/uninit ops. There is no race here around counting the sub interfaces, reading the sub interfaces and setting the number of channels. The ASSERT_RTNL was added to document that. Fixes: be98737a4faa ("net/mlx5e: Use dynamic per-channel allocations in stats") Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 16 +++++++-- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 38 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 6 ++++ .../ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 9 +++-- 4 files changed, 62 insertions(+), 7 deletions(-) commit ab4b01bfdaa69492fb36484026b0a0f0af02d75a Author: Roy Novich Date: Wed Jan 4 11:16:21 2023 +0200 net/mlx5e: Verify dev is present for fix features ndo The native NIC port net device instance is being used as Uplink representor. While changing profiles private resources are not available, fix features ndo does not check if the netdev is present. Add driver protection to verify private resources are ready. Fixes: 7a9fb35e8c3a ("net/mlx5e: Do not reload ethernet ports when changing eswitch mode") Signed-off-by: Roy Novich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +++ 1 file changed, 3 insertions(+) commit da2e552b469a0cd130ff70a88ccc4139da428a65 Author: Moshe Shemesh Date: Mon Nov 28 19:05:47 2022 +0200 net/mlx5: Fix command stats access after free Command may fail while driver is reloading and can't accept FW commands till command interface is reinitialized. Such command failure is being logged to command stats. This results in NULL pointer access as command stats structure is being freed and reallocated during mlx5 devlink reload (see kernel log below). Fix it by making command stats statically allocated on driver probe. Kernel log: [ 2394.808802] BUG: unable to handle kernel paging request at 000000000002a9c0 [ 2394.810610] PGD 0 P4D 0 [ 2394.811811] Oops: 0002 [#1] SMP NOPTI ... [ 2394.815482] RIP: 0010:native_queued_spin_lock_slowpath+0x183/0x1d0 ... [ 2394.829505] Call Trace: [ 2394.830667] _raw_spin_lock_irq+0x23/0x26 [ 2394.831858] cmd_status_err+0x55/0x110 [mlx5_core] [ 2394.833020] mlx5_access_reg+0xe7/0x150 [mlx5_core] [ 2394.834175] mlx5_query_port_ptys+0x78/0xa0 [mlx5_core] [ 2394.835337] mlx5e_ethtool_get_link_ksettings+0x74/0x590 [mlx5_core] [ 2394.836454] ? kmem_cache_alloc_trace+0x140/0x1c0 [ 2394.837562] __rh_call_get_link_ksettings+0x33/0x100 [ 2394.838663] ? __rtnl_unlock+0x25/0x50 [ 2394.839755] __ethtool_get_link_ksettings+0x72/0x150 [ 2394.840862] duplex_show+0x6e/0xc0 [ 2394.841963] dev_attr_show+0x1c/0x40 [ 2394.843048] sysfs_kf_seq_show+0x9b/0x100 [ 2394.844123] seq_read+0x153/0x410 [ 2394.845187] vfs_read+0x91/0x140 [ 2394.846226] ksys_read+0x4f/0xb0 [ 2394.847234] do_syscall_64+0x5b/0x1a0 [ 2394.848228] entry_SYSCALL_64_after_hwframe+0x65/0xca Fixes: 34f46ae0d4b3 ("net/mlx5: Add command failures data to debugfs") Signed-off-by: Moshe Shemesh Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 13 ++----------- include/linux/mlx5/driver.h | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) commit 5e72f3f1c558019082cfeedeed73748f35d780c6 Author: Ariel Levkovich Date: Tue Aug 30 00:32:30 2022 +0300 net/mlx5e: TC, Keep mod hdr actions after mod hdr alloc When offloading TC NIC rule which has mod_hdr action, the mod_hdr actions list is freed upon mod_hdr allocation. In the new format of handling multi table actions and CT in particular, the mod_hdr actions list is still relevant when setting the pre and post rules and therefore, freeing the list may cause adding rules which don't set the FTE_ID. Therefore, the mod_hdr actions list needs to be kept for the pre/post flows as well and should be left for these handler to be freed. Fixes: 8300f225268b ("net/mlx5e: Create new flow attr for multi table actions") Signed-off-by: Ariel Levkovich Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e0bf81bf0d3d4747c146e0bf44774d3d881d7137 Author: Ariel Levkovich Date: Tue Aug 16 23:19:11 2022 +0300 net/mlx5: check attr pointer validity before dereferencing it Fix attr pointer validity checks after it was already dereferenced. Fixes: cb0d54cbf948 ("net/mlx5e: Fix wrong source vport matching on tunnel rule") Signed-off-by: Ariel Levkovich Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17b3222e943701c408d6e03357967829aaea0550 Author: Yevgeny Kliteynik Date: Sun Nov 13 00:04:17 2022 +0200 net/mlx5: DR, Fix 'stack frame size exceeds limit' error in dr_rule If the kernel configuration asks the compiler to check frame limit of 1K, dr_rule_create_rule_nic exceed this limit: "stack frame size (1184) exceeds limit (1024)" Fixing this issue by checking configured frame limit and using the optimization STE array only for cases with the usual 2K (or larger) stack size warning. Fixes: b9b81e1e9382 ("net/mlx5: DR, For short chains of STEs, avoid allocating ste_arr dynamically") Reported-by: kernel test robot Signed-off-by: Yevgeny Kliteynik drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 2ea26b4de6f42b74a5f1701de41efa6bc9f12666 Author: Heiner Kallweit Date: Sun Jan 8 20:37:53 2023 +0100 Revert "r8169: disable detection of chip version 36" This reverts commit 42666b2c452ce87894786aae05e3fad3cfc6cb59. This chip version seems to be very rare, but it exits in consumer devices, see linked report. Link: https://stackoverflow.com/questions/75049473/cant-setup-a-wired-network-in-archlinux-fresh-install Fixes: 42666b2c452c ("r8169: disable detection of chip version 36") Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/42e9674c-d5d0-a65a-f578-e5c74f244739@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/realtek/r8169_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 08f0adb193c008de640fde34a2e00a666c01d77c Author: Miles Chen Date: Tue Jan 10 11:12:52 2023 +0800 cpufreq: armada-37xx: stop using 0 as NULL pointer Use NULL for NULL pointer to fix the following sparse warning: drivers/cpufreq/armada-37xx-cpufreq.c:448:32: sparse: warning: Using plain integer as NULL pointer Signed-off-by: Miles Chen Signed-off-by: Viresh Kumar drivers/cpufreq/armada-37xx-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7895f017b79410bf4591396a733b876dc1e0e9d Author: Paul Moore Date: Fri Jan 6 10:44:00 2023 -0500 bpf: remove the do_idr_lock parameter from bpf_prog_free_id() It was determined that the do_idr_lock parameter to bpf_prog_free_id() was not necessary as it should always be true. Suggested-by: Stanislav Fomichev Signed-off-by: Paul Moore Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230106154400.74211-2-paul@paul-moore.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 2 +- kernel/bpf/syscall.c | 20 ++++++-------------- 2 files changed, 7 insertions(+), 15 deletions(-) commit ef01f4e25c1760920e2c94f1c232350277ace69b Author: Paul Moore Date: Fri Jan 6 10:43:59 2023 -0500 bpf: restore the ebpf program ID for BPF_AUDIT_UNLOAD and PERF_BPF_EVENT_PROG_UNLOAD When changing the ebpf program put() routines to support being called from within IRQ context the program ID was reset to zero prior to calling the perf event and audit UNLOAD record generators, which resulted in problems as the ebpf program ID was bogus (always zero). This patch addresses this problem by removing an unnecessary call to bpf_prog_free_id() in __bpf_prog_offload_destroy() and adjusting __bpf_prog_put() to only call bpf_prog_free_id() after audit and perf have finished their bpf program unload tasks in bpf_prog_put_deferred(). For the record, no one can determine, or remember, why it was necessary to free the program ID, and remove it from the IDR, prior to executing bpf_prog_put_deferred(); regardless, both Stanislav and Alexei agree that the approach in this patch should be safe. It is worth noting that when moving the bpf_prog_free_id() call, the do_idr_lock parameter was forced to true as the ebpf devs determined this was the correct as the do_idr_lock should always be true. The do_idr_lock parameter will be removed in a follow-up patch, but it was kept here to keep the patch small in an effort to ease any stable backports. I also modified the bpf_audit_prog() logic used to associate the AUDIT_BPF record with other associated records, e.g. @ctx != NULL. Instead of keying off the operation, it now keys off the execution context, e.g. '!in_irg && !irqs_disabled()', which is much more appropriate and should help better connect the UNLOAD operations with the associated audit state (other audit records). Cc: stable@vger.kernel.org Fixes: d809e134be7a ("bpf: Prepare bpf_prog_put() to be called from irq context.") Reported-by: Burn Alting Reported-by: Jiri Olsa Suggested-by: Stanislav Fomichev Suggested-by: Alexei Starovoitov Signed-off-by: Paul Moore Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230106154400.74211-1-paul@paul-moore.com Signed-off-by: Alexei Starovoitov kernel/bpf/offload.c | 3 --- kernel/bpf/syscall.c | 6 ++---- 2 files changed, 2 insertions(+), 7 deletions(-) commit 9e17f99220d111ea031b44153fdfe364b0024ff2 Author: Ido Schimmel Date: Sat Jan 7 19:10:04 2023 +0200 net/sched: act_mpls: Fix warning during failed attribute validation The 'TCA_MPLS_LABEL' attribute is of 'NLA_U32' type, but has a validation type of 'NLA_VALIDATE_FUNCTION'. This is an invalid combination according to the comment above 'struct nla_policy': " Meaning of `validate' field, use via NLA_POLICY_VALIDATE_FN: NLA_BINARY Validation function called for the attribute. All other Unused - but note that it's a union " This can trigger the warning [1] in nla_get_range_unsigned() when validation of the attribute fails. Despite being of 'NLA_U32' type, the associated 'min'/'max' fields in the policy are negative as they are aliased by the 'validate' field. Fix by changing the attribute type to 'NLA_BINARY' which is consistent with the above comment and all other users of NLA_POLICY_VALIDATE_FN(). As a result, move the length validation to the validation function. No regressions in MPLS tests: # ./tdc.py -f tc-tests/actions/mpls.json [...] # echo $? 0 [1] WARNING: CPU: 0 PID: 17743 at lib/nlattr.c:118 nla_get_range_unsigned+0x1d8/0x1e0 lib/nlattr.c:117 Modules linked in: CPU: 0 PID: 17743 Comm: syz-executor.0 Not tainted 6.1.0-rc8 #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/01/2014 RIP: 0010:nla_get_range_unsigned+0x1d8/0x1e0 lib/nlattr.c:117 [...] Call Trace: __netlink_policy_dump_write_attr+0x23d/0x990 net/netlink/policy.c:310 netlink_policy_dump_write_attr+0x22/0x30 net/netlink/policy.c:411 netlink_ack_tlv_fill net/netlink/af_netlink.c:2454 [inline] netlink_ack+0x546/0x760 net/netlink/af_netlink.c:2506 netlink_rcv_skb+0x1b7/0x240 net/netlink/af_netlink.c:2546 rtnetlink_rcv+0x18/0x20 net/core/rtnetlink.c:6109 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x5e9/0x6b0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x739/0x860 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] ____sys_sendmsg+0x38f/0x500 net/socket.c:2482 ___sys_sendmsg net/socket.c:2536 [inline] __sys_sendmsg+0x197/0x230 net/socket.c:2565 __do_sys_sendmsg net/socket.c:2574 [inline] __se_sys_sendmsg net/socket.c:2572 [inline] __x64_sys_sendmsg+0x42/0x50 net/socket.c:2572 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Link: https://lore.kernel.org/netdev/CAO4mrfdmjvRUNbDyP0R03_DrD_eFCLCguz6OxZ2TYRSv0K9gxA@mail.gmail.com/ Fixes: 2a2ea50870ba ("net: sched: add mpls manipulation actions to TC") Reported-by: Wei Chen Tested-by: Wei Chen Signed-off-by: Ido Schimmel Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/20230107171004.608436-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski net/sched/act_mpls.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a309c7194e8a2f8bd4539b9449917913f6c2cd50 Author: Zack Rusin Date: Wed Dec 7 12:29:07 2022 -0500 drm/vmwgfx: Remove rcu locks from user resources User resource lookups used rcu to avoid two extra atomics. Unfortunately the rcu paths were buggy and it was easy to make the driver crash by submitting command buffers from two different threads. Because the lookups never show up in performance profiles replace them with a regular spin lock which fixes the races in accesses to those shared resources. Fixes kernel oops'es in IGT's vmwgfx execution_buffer stress test and seen crashes with apps using shared resources. Fixes: e14c02e6b699 ("drm/vmwgfx: Look up objects without taking a reference") Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Maaz Mombasawala Link: https://patchwork.freedesktop.org/patch/msgid/20221207172907.959037-1-zack@kde.org drivers/gpu/drm/vmwgfx/ttm_object.c | 41 +------ drivers/gpu/drm/vmwgfx/ttm_object.h | 14 --- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 38 ------- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 18 +--- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 176 ++++++++++++++----------------- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 33 ------ 6 files changed, 87 insertions(+), 233 deletions(-) commit 52531258318ed59a2dc5a43df2eaf0eb1d65438e Author: Rob Clark Date: Fri Dec 16 15:33:55 2022 -0800 drm/virtio: Fix GEM handle creation UAF Userspace can guess the handle value and try to race GEM object creation with handle close, resulting in a use-after-free if we dereference the object after dropping the handle's reference. For that reason, dropping the handle's reference must be done *after* we are done dereferencing the object. Signed-off-by: Rob Clark Reviewed-by: Chia-I Wu Fixes: 62fb7a5e1096 ("virtio-gpu: add 3d/virgl support") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221216233355.542197-2-robdclark@gmail.com drivers/gpu/drm/virtio/virtgpu_ioctl.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 5a41237ad1d4b62008f93163af1d9b1da90729d8 Author: Linus Torvalds Date: Mon Jan 9 17:04:49 2023 -0600 gcc: disable -Warray-bounds for gcc-11 too We had already disabled this warning for gcc-12 due to bugs in the value range analysis, but it turns out we end up having some similar problems with gcc-11.3 too, so let's disable it there too. Older gcc versions end up being increasingly less relevant, and hopefully clang and newer version of gcc (ie gcc-13) end up working reliably enough that we still get the build coverage even when we disable this for some versions. Link: https://lore.kernel.org/all/20221227002941.GA2691687@roeck-us.net/ Link: https://lore.kernel.org/all/D8BDBF66-E44C-45D4-9758-BAAA4F0C1998@kernel.org/ Cc: Kees Cook Cc: Vlastimil Babka Cc: Guenter Roeck Signed-off-by: Linus Torvalds init/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit febb985c06cb6f5fac63598c0bffd4fd823d110d Author: Jens Axboe Date: Mon Jan 9 14:46:10 2023 -0700 io_uring/poll: add hash if ready poll request can't complete inline If we don't, then we may lose access to it completely, leading to a request leak. This will eventually stall the ring exit process as well. Cc: stable@vger.kernel.org Fixes: 49f1c68e048f ("io_uring: optimise submission side poll_refs") Reported-and-tested-by: syzbot+6c95df01470a47fc3af4@syzkaller.appspotmail.com Link: https://lore.kernel.org/io-uring/0000000000009f829805f1ce87b2@google.com/ Suggested-by: Pavel Begunkov Signed-off-by: Jens Axboe io_uring/poll.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit daec8b54e9445566d003ac46e267e73755b5f55a Author: Alexandre Belloni Date: Mon Dec 12 14:59:52 2022 +0100 ARM: footbridge: drop unnecessary inclusion isa-rtc.c doesn't use any definition from bcd.h, remove its inclusion Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20221212135953.212303-1-alexandre.belloni@bootlin.com Signed-off-by: Arnd Bergmann arch/arm/mach-footbridge/isa-rtc.c | 1 - 1 file changed, 1 deletion(-) commit 33abcaef9888080af73a803d52199c4f45990948 Merge: 97bcdf24e000 490748874ebf Author: Arnd Bergmann Date: Mon Jan 9 23:16:38 2023 +0100 Merge tag 'imx-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 6.2: - Fix i.MX8MP DT for missing GPC Interrupt, power-domain typo and USB clock error. - Fix mach-imx cpu code to add missing of_node_put() call. - A couple of verdin-imx8mm DT fixes for audio playback support. - Fix pca9547 i2c-mux node name for i.MX and Vybrid device trees. - Fix an imx93-11x11-evk uSDHC pad setting problem that causes Micron eMMC CMD8 CRC error in HS400ES/HS400 mode. - A couple of imx8mp-blk-ctrl driver fixes from Lucas Stach, enabling pixclk with HDMI_TX_PHY PD, dropping power device name setting. - Fix the error check for of_clk_get_by_name() in soc-imx8m driver. - Other various DT fixes and cleanups. * tag 'imx-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (22 commits) soc: imx8m: Fix incorrect check for of_clk_get_by_name() arm64: dts: imx8mm-venice-gw7901: fix USB2 controller OC polarity arm64: dts: imx8mp-evk: pcie0-refclk cosmetic cleanup arm64: dts: imx8mp: Fix power-domain typo arm64: dts: imx8mp: Fix missing GPC Interrupt soc: imx: imx8mp-blk-ctrl: don't set power device name arm64: dts: imx8mm: Drop xtal clock specifier from eDM SBC ARM: imx: add missing of_node_put() arm64: dts: imx93-11x11-evk: correct clock and strobe pad setting arm64: dts: verdin-imx8mm: fix dev board audio playback arm64: dts: imx8mq-thor96: fix no-mmc property for SDHCI arm64: dts: imx8mm-beacon: Fix ecspi2 pinmux arm64: dts: freescale: Fix pca954x i2c-mux node names ARM: dts: vf610: Fix pca9548 i2c-mux node names ARM: dts: imx: Fix pca9547 i2c-mux node name arm64: dts: verdin-imx8mm: fix dahlia audio playback ARM: dts: imx6qdl-gw560x: Remove incorrect 'uart-has-rtscts' ARM: dts: imx7d-pico: Use 'clock-frequency' ARM: dts: imx6ul-pico-dwarf: Use 'clock-frequency' arm64: dts: imx8mp-phycore-som: Remove invalid PMIC property ... Link: https://lore.kernel.org/r/20230102132016.GA10699@T480 Signed-off-by: Arnd Bergmann commit 97bcdf24e00075cf37ee4cbd63f07f54e25c5265 Merge: 13d159553ef2 3a2390c6777e Author: Arnd Bergmann Date: Mon Jan 9 23:16:08 2023 +0100 Merge tag 'reset-fixes-for-v6.2' of git://git.pengutronix.de/pza/linux into arm/fixes Reset controller fixes for v6.2 Avoid a build error by disabling the invalid combination of building reset-ti-sci built-in but ti-sci as a module. Fix a possible NULL pointer dereference in reset-uniphier-glue in case platform_get_resource() fails. * tag 'reset-fixes-for-v6.2' of git://git.pengutronix.de/pza/linux: reset: uniphier-glue: Fix possible null-ptr-deref reset: ti-sci: honor TI_SCI_PROTOCOL setting when not COMPILE_TEST Link: https://lore.kernel.org/r/20230104095855.3809733-1-p.zabel@pengutronix.de Signed-off-by: Arnd Bergmann commit 13d159553ef2c2b68d5c643db4491999f8b6bbb1 Merge: a316877372f4 c45219cba101 Author: Arnd Bergmann Date: Mon Jan 9 23:15:44 2023 +0100 Merge tag 'amlogic-fixes-v6.2-rc' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/fixes Amlogic fixes for v6.2-rc: - Revert "arm64: dts: meson-sm1-odroid-hc4: disable unused USB PHY0" which breaks whole USB on Odroid-HC4 * tag 'amlogic-fixes-v6.2-rc' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: Revert "arm64: dts: meson-sm1-odroid-hc4: disable unused USB PHY0" Link: https://lore.kernel.org/r/7915c3f8-57bc-25e2-0314-c78af7a79d6a@linaro.org Signed-off-by: Arnd Bergmann commit a316877372f4f3062b132437cbc16f2fab8cc4c5 Merge: dc43354cb768 e325285de2cd Author: Arnd Bergmann Date: Mon Jan 9 23:15:08 2023 +0100 Merge tag 'scmi-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Arm SCMI fixes for v6.2 Few fixes addressing: 1. Possible compromise with the shorter message size from a misbheaving SCMI platform firmware. The shmem accesses are now hardened to handle the same in fetch_notification and fetch_response. 2. Possible unsafe locking scenario which is solved by calling virtio_break_device() before getting hold of vioch->lock. 3. Possible stale error status reported from a previous message being used again as it is not cleared. * tag 'scmi-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Fix virtio channels cleanup on shutdown firmware: arm_scmi: Harden shared memory access in fetch_notification firmware: arm_scmi: Harden shared memory access in fetch_response firmware: arm_scmi: Clear stale xfer->hdr.status Link: https://lore.kernel.org/r/20230106093909.652657-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit dc43354cb7689642f53a044e76509fa7e9a028d4 Merge: 88603b6dc419 cb8fd6f75775 Author: Arnd Bergmann Date: Mon Jan 9 23:14:09 2023 +0100 Merge tag 'memory-controller-drv-fixes-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/fixes Memory controller drivers - fixes for v6.2 Broken in v6.2: 1. OMAP GPMC: do not fail if "gpmc,wait-pin" optional property (introduced for v6.2) is missing. Broken earlier: 1. Tegra MC: Drop SID override programming as it is handled by bootloader and doing it in the kernel can cause unexpected results. 2. Atmel SDRAMC, MVEBU devbus: Add missing clock unprepare/disable in exit and error paths. * tag 'memory-controller-drv-fixes-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe() memory: atmel-sdramc: Fix missing clk_disable_unprepare in atmel_ramc_probe() memory: tegra: Remove clients SID override programming memory: omap-gpmc: fix wait pin validation Link: https://lore.kernel.org/r/20230109150322.329614-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 40543b3d9d2c13227ecd3aa90a713c201d1d7f09 Author: Jiasheng Jiang Date: Thu Dec 8 21:35:52 2022 +0800 ice: Add check for kzalloc Add the check for the return value of kzalloc in order to avoid NULL pointer dereference. Moreover, use the goto-label to share the clean code. Fixes: d6b98c8d242a ("ice: add write functionality for GNSS TTY") Signed-off-by: Jiasheng Jiang Reviewed-by: Jiri Pirko Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_gnss.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit f58985620f55580a07d40062c4115d8c9cf6ae27 Author: Yuan Can Date: Wed Dec 7 08:55:02 2022 +0000 ice: Fix potential memory leak in ice_gnss_tty_write() The ice_gnss_tty_write() return directly if the write_buf alloc failed, leaking the cmd_buf. Fix by free cmd_buf if write_buf alloc failed. Fixes: d6b98c8d242a ("ice: add write functionality for GNSS TTY") Signed-off-by: Yuan Can Reviewed-by: Leon Romanovsky Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_gnss.c | 1 + 1 file changed, 1 insertion(+) commit 99f1a36c90a7524972be5a028424c57fa17753ee 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 Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1923bc5a56daeeabd7e9093bad2febcd6af2416a 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 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) commit 0be7ed8e7eb15282b5d0f6fdfea884db594ea9bf 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 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 51b3802e79606b2326f4a8cac0f2766a2e15338b Author: Johan Hovold Date: Wed Jan 4 10:56:12 2023 +0100 dt-bindings: rtc: qcom-pm8xxx: allow 'wakeup-source' property The RTC can be used as a wakeup source on at least some platforms so allow it to be described as such. Signed-off-by: Johan Hovold Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230104095612.6756-1-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 101ca8d05913b7d1e6e8b9dd792193d4082fff86 Author: Shanker Donthineni Date: Mon Jan 2 17:06:30 2023 -0600 rtc: efi: Enable SET/GET WAKEUP services as optional The current implementation of rtc-efi is expecting all the 4 time services GET{SET}_TIME{WAKEUP} must be supported by UEFI firmware. As per the EFI_RT_PROPERTIES_TABLE, the platform specific implementations can choose to enable selective time services based on the RTC device capabilities. This patch does the following changes to provide GET/SET RTC services on platforms that do not support the WAKEUP feature. 1) Relax time services cap check when creating a platform device. 2) Clear RTC_FEATURE_ALARM bit in the absence of WAKEUP services. 3) Conditional alarm entries in '/proc/driver/rtc'. Cc: # v6.0+ Signed-off-by: Shanker Donthineni Link: https://lore.kernel.org/r/20230102230630.192911-1-sdonthineni@nvidia.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-efi.c | 48 +++++++++++++++++++++++++++--------------------- include/linux/efi.h | 3 ++- 2 files changed, 29 insertions(+), 22 deletions(-) commit 2ec1b17f745b08526220f3c169d2eb9799a9be39 Author: Dave Jiang Date: Fri Jan 6 09:39:49 2023 -0700 cxl: fix cxl_report_and_clear() RAS UE addr mis-assignment 'addr' that contains RAS UE register address is re-assigned to RAS_CAP_CONTROL offset if there are multiple UE errors. Use different addr variable to avoid the reassignment mistake. Fixes: 2905cb5236cb ("cxl/pci: Add (hopeful) error handling support") Reported-by: Jonathan Cameron Signed-off-by: Dave Jiang Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/167302318779.580155.15233596744650706167.stgit@djiang5-mobl3.local Signed-off-by: Dan Williams drivers/cxl/pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ee4202db16e59e792f570092ad1f440f2d31ea03 Author: Stephen Kitt Date: Mon Jan 9 21:02:38 2023 +0100 fbdev: atmel_lcdfb: Rework backlight status updates Instead of checking the state of various backlight_properties fields against the memorised state in atmel_lcdfb_info.bl_power, atmel_bl_update_status() should retrieve the desired state using backlight_get_brightness (which takes into account the power state, blanking etc.). This means the explicit checks using props.fb_blank and props.power can be dropped. The backlight framework ensures that backlight is never negative, so the test before reading the brightness from the hardware always ends up false and the whole block can be removed. The framework retrieves the brightness from the hardware through atmel_bl_get_brightness() when necessary. As a result, bl_power in struct atmel_lcdfb_info is no longer necessary, so remove that while we're at it. Since we only ever care about reading the current state in backlight_properties, drop the updates at the end of the function. Signed-off-by: Stephen Kitt Acked-by: Sam Ravnborg Signed-off-by: Helge Deller drivers/video/fbdev/atmel_lcdfb.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit a4d5d2ef5b1f6cddee0fec35d86404df148b9074 Author: Klaus Kudielka Date: Sat Jan 7 15:41:49 2023 +0100 Revert "ARM: dts: armada-39x: Fix compatible string for gpios" This reverts commit d10886a4e6f85ee18d47a1066a52168461370ded. If compatible = "marvell,armadaxp-gpio", the reg property requires a second (address, size) pair, which points to the per-CPU interrupt registers <0x18800 0x30> / <0x18840 0x30>. Furthermore: Commit 5f79c651e81e explains very well, why the gpio-mvebu driver does not work reliably with per-CPU interrupts. Commit 988c8c0cd04d deprecates compatible = marvell,armadaxp-gpio for this reason. Signed-off-by: Klaus Kudielka Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-39x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75b58cf5ce21650c1b3b88d8310f3415ce905018 Author: Klaus Kudielka Date: Sat Jan 7 15:41:48 2023 +0100 Revert "ARM: dts: armada-38x: Fix compatible string for gpios" This reverts commit c4de4667f15d04ef5920bacf41e514ec7d1ef03d, which causes a regression on Turris Omnia (Armada 385): GPIO interrupts cease to work, ending up in the DSA switch being non-functional. The blamed commit is incorrect in the first place: If compatible = "marvell,armadaxp-gpio", the second (address, size) pair of the reg property must to point to the per-CPU interrupt registers <0x18800 0x30> / <0x18840 0x30>, and not to the blink enable registers <0x181c0 0x08> / <0x181c8 0x08>. But even fixing that leaves the GPIO interrupts broken on the Omnia. Furthermore: Commit 5f79c651e81e explains very well, why the gpio-mvebu driver does not work reliably with per-CPU interrupts. Commit 988c8c0cd04d deprecates compatible = marvell,armadaxp-gpio for this reason. Fixes: c4de4667f15d ("ARM: dts: armada-38x: Fix compatible string for gpios") Reported-by: Klaus Kudielka Link: https://lore.kernel.org/r/f24474e70c1a4e9692bd596ef6d97ceda9511245.camel@gmail.com/ Signed-off-by: Klaus Kudielka Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-38x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba5d4c1596cada37793d405dd18d695cd3508902 Author: Paulo Alcantara Date: Fri Jan 6 13:34:36 2023 -0300 cifs: fix file info setting in cifs_open_file() In cifs_open_file(), @buf must hold a pointer to a cifs_open_info_data structure which is passed by cifs_nt_open(), so assigning @buf directly to @fi was obviously wrong. Fix this by passing a valid FILE_ALL_INFO structure to SMBLegacyOpen() and CIFS_open(), and then copy the set structure to the corresponding cifs_open_info_data::fi field with move_cifs_info_to_smb2() helper. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216889 Fixes: 76894f3e2f71 ("cifs: improve symlink handling for smb2+") Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/smb1ops.c | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) commit 29cf28235e3e57e0af01ae29db57a75f87a2ada8 Author: Paulo Alcantara Date: Fri Jan 6 20:28:30 2023 -0300 cifs: fix file info setting in cifs_query_path_info() We missed to set file info when CIFSSMBQPathInfo() returned 0, thus leaving cifs_open_info_data::fi unset. Fix this by setting cifs_open_info_data::fi when either CIFSSMBQPathInfo() or SMBQueryInformation() succeed. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216881 Fixes: 76894f3e2f71 ("cifs: improve symlink handling for smb2+") Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/smb1ops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 00b18da4089330196906b9fe075c581c17eb726c Author: Willy Tarreau Date: Mon Jan 9 08:54:42 2023 +0100 tools/nolibc: fix the O_* fcntl/open macro definitions for riscv When RISCV port was imported in 5.2, the O_* macros were taken with their octal value and written as-is in hex, resulting in the getdents64() to fail in nolibc-test. Fixes: 582e84f7b779 ("tool headers nolibc: add RISCV support") #5.2 Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/include/nolibc/arch-riscv.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 1bfbe1f3e96720daf185f03d101f072d69753f88 Author: Willy Tarreau Date: Mon Jan 9 08:54:41 2023 +0100 tools/nolibc: prevent gcc from making memset() loop over itself When building on ARM in thumb mode with gcc-11.3 at -O2 or -O3, nolibc-test segfaults during the select() tests. It turns out that at this level, gcc recognizes an opportunity for using memset() to zero the fd_set, but it miscompiles it because it also recognizes a memset pattern as well, and decides to call memset() from the memset() code: 000122bc : 122bc: b510 push {r4, lr} 122be: 0004 movs r4, r0 122c0: 2a00 cmp r2, #0 122c2: d003 beq.n 122cc 122c4: 23ff movs r3, #255 ; 0xff 122c6: 4019 ands r1, r3 122c8: f7ff fff8 bl 122bc 122cc: 0020 movs r0, r4 122ce: bd10 pop {r4, pc} Simply placing an empty asm() statement inside the loop suffices to avoid this. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/include/nolibc/string.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 55abdd1f5e1e07418bf4a46c233a92f83cb5ae97 Author: Willy Tarreau Date: Mon Jan 9 08:54:40 2023 +0100 tools/nolibc: fix missing includes causing build issues at -O0 After the nolibc includes were split to facilitate portability from standard libcs, programs that include only what they need may miss some symbols which are needed by libgcc. This is the case for raise() which is needed by the divide by zero code in some architectures for example. Regardless, being able to include only the apparently needed files is convenient. Instead of trying to move all exported definitions to a single file, since this can change over time, this patch takes another approach consisting in including the nolibc header at the end of all standard include files. This way their types and functions are already known at the moment of inclusion, and including any single one of them is sufficient to bring all the required ones. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/include/nolibc/ctype.h | 3 +++ tools/include/nolibc/errno.h | 3 +++ tools/include/nolibc/signal.h | 3 +++ tools/include/nolibc/stdio.h | 3 +++ tools/include/nolibc/stdlib.h | 3 +++ tools/include/nolibc/string.h | 3 +++ tools/include/nolibc/sys.h | 2 ++ tools/include/nolibc/time.h | 3 +++ tools/include/nolibc/types.h | 3 +++ tools/include/nolibc/unistd.h | 3 +++ 10 files changed, 29 insertions(+) commit 184177c3d6e023da934761e198c281344d7dd65b Author: Willy Tarreau Date: Mon Jan 9 08:54:39 2023 +0100 tools/nolibc: restore mips branch ordering in the _start block Depending on the compiler used and the optimization options, the sbrk() test was crashing, both on real hardware (mips-24kc) and in qemu. One such example is kernel.org toolchain in version 11.3 optimizing at -Os. Inspecting the sys_brk() call shows the following code: 0040047c : 40047c: 24020fcd li v0,4045 400480: 27bdffe0 addiu sp,sp,-32 400484: 0000000c syscall 400488: 27bd0020 addiu sp,sp,32 40048c: 10e00001 beqz a3,400494 400490: 00021023 negu v0,v0 400494: 03e00008 jr ra It is obviously wrong, the "negu" instruction is placed in beqz's delayed slot, and worse, there's no nop nor instruction after the return, so the next function's first instruction (addiu sip,sip,-32) will also be executed as part of the delayed slot that follows the return. This is caused by the ".set noreorder" directive in the _start block, that applies to the whole program. The compiler emits code without the delayed slots and relies on the compiler to swap instructions when this option is not set. Removing the option would require to change the startup code in a way that wouldn't make it look like the resulting code, which would not be easy to debug. Instead let's just save the default ordering before changing it, and restore it at the end of the _start block. Now the code is correct: 0040047c : 40047c: 24020fcd li v0,4045 400480: 27bdffe0 addiu sp,sp,-32 400484: 0000000c syscall 400488: 10e00002 beqz a3,400494 40048c: 27bd0020 addiu sp,sp,32 400490: 00021023 negu v0,v0 400494: 03e00008 jr ra 400498: 00000000 nop Fixes: 66b6f755ad45 ("rcutorture: Import a copy of nolibc") #5.0 Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/include/nolibc/arch-mips.h | 2 ++ 1 file changed, 2 insertions(+) commit 16f5cea74179b5795af7ce359971f5128d10f80e Author: Warner Losh Date: Mon Jan 9 08:54:38 2023 +0100 tools/nolibc: Fix S_ISxxx macros The mode field has the type encoded as an value in a field, not as a bit mask. Mask the mode with S_IFMT instead of each type to test. Otherwise, false positives are possible: eg S_ISDIR will return true for block devices because S_IFDIR = 0040000 and S_IFBLK = 0060000 since mode is masked with S_IFDIR instead of S_IFMT. These macros now match the similar definitions in tools/include/uapi/linux/stat.h. Signed-off-by: Warner Losh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/include/nolibc/types.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit feaf75658783a919410f8c2039dbc24b6a29603d Author: Sven Schnelle Date: Mon Jan 9 08:54:37 2023 +0100 nolibc: fix fd_set type The kernel uses unsigned long for the fd_set bitmap, but nolibc use u32. This works fine on little endian machines, but fails on big endian. Convert to unsigned long to fix this. Signed-off-by: Sven Schnelle Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/include/nolibc/types.h | 53 +++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 23 deletions(-) commit cad90e5381d840cf2296aaac9b3eff71a30b7c5b Author: Nicholas Piggin Date: Tue Dec 20 20:13:23 2022 +1000 objtool: Tolerate STT_NOTYPE symbols at end of section Hand-written asm often contains non-function symbols in executable sections. _end symbols for finding the size of instruction blocks for runtime processing is one such usage. optprobe_template_end is one example that causes the warning: objtool: optprobe_template_end(): can't find starting instruction This is because the symbol happens to be at the end of the file (and therefore end of a section in the object file). So ignore end-of-section STT_NOTYPE symbols instead of bailing out because an instruction can't be found. While we're here, add a more descriptive warning for STT_FUNC symbols found at the end of a section. [ This also solves a PowerPC regression reported by Sathvika Vasireddy. ] Reported-by: Naveen N. Rao Reported-by: Sathvika Vasireddy Signed-off-by: Nicholas Piggin Signed-off-by: Ingo Molnar Acked-by: Sathvika Vasireddy Link: https://lore.kernel.org/r/20221220101323.3119939-1-npiggin@gmail.com tools/objtool/check.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 70051cffb31b5ee09096351c3b41fcae6f89de31 Author: Jaroslav Kysela Date: Mon Jan 9 16:12:49 2023 +0100 ALSA: control-led: use strscpy in set_led_id() The use of strncpy() in the set_led_id() was incorrect. The len variable should use 'min(sizeof(buf2) - 1, count)' expression. Use strscpy() function to simplify things and handle the error gracefully. Fixes: a135dfb5de15 ("ALSA: led control - add sysfs kcontrol LED marking layer") Reported-by: yang.yang29@zte.com.cn Link: https://lore.kernel.org/alsa-devel/202301091945513559977@zte.com.cn/ Cc: Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai sound/core/control_led.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cd2d0d45a3d2c199344305a1e8fed42347cf4bec Author: Arnd Bergmann Date: Mon Jan 9 09:30:53 2023 +0100 ARM: pxa: enable PXA310/PXA320 for DT-only build After commit b5aaaa666a85 ("ARM: pxa: add Kconfig dependencies for ATAGS based boards"), the default PXA build no longer includes support for the board files that are considered unused. As a side-effect of this, the PXA310 and PXA320 support is not built into the kernel any more, even though it should work in principle as long as the symbols are enabled. As Robert points out, there are dts files for zylonite and cm-x300, though those have not made it into the mainline kernel. Link: https://lore.kernel.org/linux-arm-kernel/m2sfglh02h.fsf@free.fr/ Reported-by: Robert Jarzmik Signed-off-by: Arnd Bergmann arch/arm/mach-pxa/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 68a63a412d18bd2e2577c8928139f92541afa7a6 Author: James Clark Date: Mon Jan 9 12:27:43 2023 +0000 arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y commit 45bd8951806e ("arm64: Improve HAVE_DYNAMIC_FTRACE_WITH_REGS selection for clang") fixed the build with the above combination by splitting HAVE_DYNAMIC_FTRACE_WITH_REGS into separate checks for Clang and GCC. commit 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS") added the GCC only check "-fpatchable-function-entry=2" back in unconditionally which breaks the build. Remove the unconditional check, because the conditional ones were also updated to _ARGS in the above commit, so they work correctly on their own. Fixes: 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS") Signed-off-by: James Clark Link: https://lore.kernel.org/r/20230109122744.1904852-1-james.clark@arm.com Signed-off-by: Will Deacon arch/arm64/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit 4e4ff23a35ee3a145fbc8378ecfeaab2d235cddd Author: Will Deacon Date: Mon Jan 9 15:47:25 2023 +0000 arm64/mm: Define dummy pud_user_exec() when using 2-level page-table With only two levels of page-table, the generic 'pud_*' macros are implemented using dummy operations in pgtable-nopmd.h. Since commit 730a11f982e6 ("arm64/mm: add pud_user_exec() check in pud_user_accessible_page()"), pud_user_accessible_page() unconditionally calls pud_user_exec(), which is an arm64-specific helper and therefore isn't defined by pgtable-nopmd.h. This results in a build failure for configurations with only two levels of page table: arch/arm64/include/asm/pgtable.h: In function 'pud_user_accessible_page': >> arch/arm64/include/asm/pgtable.h:870:51: error: implicit declaration of function 'pud_user_exec'; did you mean 'pmd_user_exec'? [-Werror=implicit-function-declaration] 870 | return pud_leaf(pud) && (pud_user(pud) || pud_user_exec(pud)); | ^~~~~~~~~~~~~ | pmd_user_exec Fix the problem by defining pud_user_exec() as pud_user() in this case. Link: https://lore.kernel.org/r/202301080515.z6zEksU4-lkp@intel.com Reported-by: kernel test robot Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+) commit afce71ff6daa9c0f852df0727fe32c6fb107f0fa 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 (cherry picked from commit bed4b455cf5374e68879be56971c1da563bcd90c) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_context.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 476fdcdaaae7b06c780cdfc234c704107f16c529 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 (cherry picked from commit 4f0755c2faf7388616109717facc5bbde6850e60) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_vma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78a4471fa1a76a8bef4919105de67660a89a1e9b Author: Stefan Wahren Date: Sat Jan 7 13:32:29 2023 +0100 i2c: mxs: suppress probe-deferral error message During boot of I2SE Duckbill the kernel log contains a confusing error: Failed to request dma This is caused by i2c-mxs tries to request a not yet available DMA channel (-EPROBE_DEFER). So suppress this message by using dev_err_probe(). Signed-off-by: Stefan Wahren Reviewed-by: Fabio Estevam Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mxs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2ece0930ac5662bccce0ba4c59b84c98d2437200 Author: Basavaraj Natikar Date: Mon Jan 2 22:39:55 2023 +0530 i2c: designware-pci: Add new PCI IDs for AMD NAVI GPU Add additional supported PCI IDs for latest AMD NAVI GPU card which has an integrated Type-C controller and designware I2C with PCI interface. Signed-off-by: Basavaraj Natikar Tested-by: Sanath S Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-pcidrv.c | 2 ++ 1 file changed, 2 insertions(+) commit 291e9da91403e0e628d7692b5ed505100e7b7706 Author: Jaroslav Kysela Date: Mon Jan 9 15:11:33 2023 +0100 ALSA: usb-audio: Always initialize fixed_rate in snd_usb_find_implicit_fb_sync_format() Handle the fallback code path, too. Fixes: fd28941cff1c ("ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless") BugLink: https://lore.kernel.org/alsa-devel/Y7frf3N%2FxzvESEsN@kili/ Reported-by: Dan Carpenter Cc: Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230109141133.335543-1-perex@perex.cz Signed-off-by: Takashi Iwai sound/usb/implicit.c | 3 ++- sound/usb/pcm.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 6f9aba7f0d74e8dd085f9ac11fe8f3fdd7fde4ca Author: Athira Rajeev Date: Thu Jan 5 17:34:36 2023 +0530 perf tests bpf prologue: Fix bpf-script-test-prologue test compile issue with clang While running 'perf test' for bpf, observed that "BPF prologue generation" test case fails to compile with clang. Logs below from powerpc: :33:2: error: use of undeclared identifier 'fmode_t' fmode_t f_mode = (fmode_t)_f_mode; ^ :37:6: error: use of undeclared identifier 'f_mode'; did you mean '_f_mode'? if (f_mode & FMODE_WRITE) ^~~~~~ _f_mode :30:60: note: '_f_mode' declared here int bpf_func__null_lseek(void *ctx, int err, unsigned long _f_mode, ^ 2 errors generated. The test code tests/bpf-script-test-prologue.c uses fmode_t. And the error above is for "fmode_t" which is defined in include/linux/types.h as part of kernel build directory: "/lib/modules//build" that comes from kernel devel [ soft link to /usr/src/ ]. Clang picks this header file from "-working-directory" build option that specifies this build folder. But the commit 14e4b9f4289aed2c ("perf trace: Raw augmented syscalls fix libbpf 1.0+ compatibility") changed the include directory to use: "/usr/include". Post this change, types.h from /usr/include/ is getting picked upwhich doesn’t contain definition of "fmode_t" and hence fails to compile. Compilation command before this commit: /usr/bin/clang -D__KERNEL__ -D__NR_CPUS__=72 -DLINUX_VERSION_CODE=0x50e00 -xc -I/root/lib/perf/include/bpf -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 -Wno-unused-value -Wno-pointer-sign -working-directory /lib/modules//build -c - -target bpf -g -O2 -o - Compilation command after this commit: /usr/bin/clang -D__KERNEL__ -D__NR_CPUS__=72 -DLINUX_VERSION_CODE=0x50e00 -xc -I/usr/include/ -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 -Wno-unused-value -Wno-pointer-sign -working-directory /lib/modules//build -c - -target bpf -g -O2 -o - The difference is addition of -I/usr/include/ in the first line which is causing the error. Fix this by adding typedef for "fmode_t" in the testcase to solve the compile issue. Fixes: 14e4b9f4289aed2c ("perf trace: Raw augmented syscalls fix libbpf 1.0+ compatibility") Signed-off-by: Athira Jajeev Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Disha Goel Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: linuxppc-dev@lists.ozlabs.org Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nageswara R Sastry Cc: Namhyung Kim Link: https://lore.kernel.org/linux-perf-users/20230105120436.92051-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/bpf-script-test-prologue.c | 2 ++ 1 file changed, 2 insertions(+) commit 1aefe5c177c1922119afb4ee443ddd6ac3140b37 Author: Daisuke Matsuda Date: Tue Dec 20 17:08:48 2022 +0900 RDMA/rxe: Prevent faulty rkey generation If you create MRs more than 0x10000 times after loading the module, responder starts to reply NAKs for RDMA/Atomic operations because of rkey violation detected in check_rkey(). The root cause is that rkeys are incremented each time a new MR is created and the value overflows into the range reserved for MWs. This commit also increases the value of RXE_MAX_MW that has been limited unlike other parameters. Fixes: 0994a1bcd5f7 ("RDMA/rxe: Bump up default maximum values used via uverbs") Link: https://lore.kernel.org/r/20221220080848.253785-2-matsuda-daisuke@fujitsu.com Signed-off-by: Daisuke Matsuda Tested-by: Li Zhijian Reviewed-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_param.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3a73746b267e5c6a87c9ad26f8c6a48e44da609c Author: Daisuke Matsuda Date: Tue Dec 20 17:08:47 2022 +0900 RDMA/rxe: Fix inaccurate constants in rxe_type_info ibv_query_device() has reported incorrect device attributes, which are actually not used by the device. Make the constants correspond with the attributes shown to users. Fixes: 3ccffe8abf2f ("RDMA/rxe: Move max_elem into rxe_type_info") Fixes: 3225717f6dfa ("RDMA/rxe: Replace red-black trees by xarrays") Link: https://lore.kernel.org/r/20221220080848.253785-1-matsuda-daisuke@fujitsu.com Signed-off-by: Daisuke Matsuda Reviewed-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_pool.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit f993d24a948d22710148dae2c48b8a87155f6cb9 Author: Masahiro Yamada Date: Sat Jan 7 01:10:23 2023 +0900 s390: fix -Wundef warning for CONFIG_KERNEL_ZSTD Since commit 80b6093b55e3 ("kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds"), building with W=1 detects misuse of #(el)if. $ make W=1 ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- [snip] arch/s390/boot/decompressor.c:28:7: warning: "CONFIG_KERNEL_ZSTD" is not defined, evaluates to 0 [-Wundef] 28 | #elif CONFIG_KERNEL_ZSTD | ^~~~~~~~~~~~~~~~~~ This issue has been hidden because arch/s390/boot/Makefile overwrites KBUILD_CFLAGS, dropping -Wundef. CONFIG_KERNEL_ZSTD is a bool option. #elif defined() should be used. The line #ifdef CONFIG_KERNEL_BZIP2 is fine, but I changed it for consistency. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20230106161024.2373602-1-masahiroy@kernel.org Signed-off-by: Heiko Carstens arch/s390/boot/decompressor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c9fb35f685b2f8a2ead98e3f1b249a1d4e9c040e 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 Link: https://lore.kernel.org/r/20221225115907.55250-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 69568267c5b624eaa86afcafbca1c4765f63e112 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 Link: https://lore.kernel.org/r/20221225115907.55250-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../bindings/sound/qcom,lpass-wsa-macro.yaml | 58 ++++++++++++++++++---- 1 file changed, 47 insertions(+), 11 deletions(-) commit 0cbf1ecd8c4801ec7566231491f7ad9cec31098b Author: Stephan Gerhold Date: Sat Dec 31 12:55:06 2022 +0100 ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE Older Qualcomm platforms like APQ8016 do not have hardware support for SoundWire, so kernel configurations made specifically for those platforms will usually not have CONFIG_SOUNDWIRE enabled. Unfortunately commit 8d89cf6ff229 ("ASoC: qcom: cleanup and fix dependency of QCOM_COMMON") breaks those kernel configurations, because SOUNDWIRE is now a required dependency for SND_SOC_QCOM_COMMON (and in turn also SND_SOC_APQ8016_SBC). Trying to migrate such a kernel config silently disables SND_SOC_APQ8016_SBC and breaks audio functionality. The soundwire helpers in common.c are only used by two of the Qualcomm audio machine drivers, so building and requiring CONFIG_SOUNDWIRE for all platforms is unnecessary. There is no need to stuff all common code into a single module. Fix the issue by moving the soundwire helpers to a separate SND_SOC_QCOM_SDW module/option that is selected only by the machine drivers that make use of them. This also allows reverting the imply/depends changes from the previous fix because both SM8250 and SC8280XP already depend on SOUNDWIRE, so the soundwire helpers will be only built if SOUNDWIRE is really enabled. Cc: Srinivas Kandagatla Fixes: 8d89cf6ff229 ("ASoC: qcom: cleanup and fix dependency of QCOM_COMMON") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20221231115506.82991-1-stephan@gerhold.net Signed-off-by: Mark Brown sound/soc/qcom/Kconfig | 21 ++++---- sound/soc/qcom/Makefile | 2 + sound/soc/qcom/common.c | 114 ------------------------------------------ sound/soc/qcom/common.h | 10 ---- sound/soc/qcom/sc8280xp.c | 1 + sound/soc/qcom/sdw.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/qcom/sdw.h | 18 +++++++ sound/soc/qcom/sm8250.c | 1 + 8 files changed, 157 insertions(+), 133 deletions(-) commit 80f8be7af03ffe90dc4df998b16bfa212afbdde9 Author: Masahiro Yamada Date: Sun Jan 8 22:47:26 2023 +0900 tomoyo: Omit use of bin2c bin2c was, as its name implies, introduced to convert a binary file to C code. However, I did not see any good reason ever for using this tool because using the .incbin directive is much faster, and often results in simpler code. Most of the uses of bin2c have been killed, for example: - 13610aa908dc ("kernel/configs: use .incbin directive to embed config_data.gz") - 4c0f032d4963 ("s390/purgatory: Omit use of bin2c") security/tomoyo/Makefile has even less reason for using bin2c because the policy files are text data. So, sed is enough for converting them to C string literals, and what is nicer, generates human-readable builtin-policy.h. This is the last user of bin2c. After this commit lands, bin2c will be removed. Signed-off-by: Masahiro Yamada [penguin-kernel: Update sed script to also escape backslash and quote ] Signed-off-by: Tetsuo Handa security/tomoyo/Kconfig | 1 - security/tomoyo/Makefile | 15 ++++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) commit 75507a319876aba88932e2c7dab58b6c22d89f6b Author: Richard Fitzgerald Date: Mon Dec 19 13:01:45 2022 +0000 i2c: designware: Fix unbalanced suspended flag Ensure that i2c_mark_adapter_suspended() is always balanced by a call to i2c_mark_adapter_resumed(). dw_i2c_plat_resume() must always be called, so that i2c_mark_adapter_resumed() is called. This is not compatible with DPM_FLAG_MAY_SKIP_RESUME, so remove the flag. Since the controller is always resumed on system resume the dw_i2c_plat_complete() callback is redundant and has been removed. The unbalanced suspended flag was introduced by commit c57813b8b288 ("i2c: designware: Lock the adapter while setting the suspended flag") Before that commit, the system and runtime PM used the same functions. The DPM_FLAG_MAY_SKIP_RESUME was used to skip the system resume if the driver had been in runtime-suspend. If system resume was skipped, the suspended flag would be cleared by the next runtime resume. The check of the suspended flag was _after_ the call to pm_runtime_get_sync() in i2c_dw_xfer(). So either a system resume or a runtime resume would clear the flag before it was checked. Having introduced the unbalanced suspended flag with that commit, a further commit 80704a84a9f8 ("i2c: designware: Use the i2c_mark_adapter_suspended/resumed() helpers") changed from using a local suspended flag to using the i2c_mark_adapter_suspended/resumed() functions. These use a flag that is checked by I2C core code before issuing the transfer to the bus driver, so there was no opportunity for the bus driver to runtime resume itself before the flag check. Signed-off-by: Richard Fitzgerald Fixes: c57813b8b288 ("i2c: designware: Lock the adapter while setting the suspended flag") Reviewed-by: Hans de Goede Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) commit c8c37bc514514999e62a17e95160ed9ebf75ca8d Author: Lareine Khawaly Date: Wed Dec 21 19:59:00 2022 +0000 i2c: designware: use casting of u64 in clock multiplication to avoid overflow In functions i2c_dw_scl_lcnt() and i2c_dw_scl_hcnt() may have overflow by depending on the values of the given parameters including the ic_clk. For example in our use case where ic_clk is larger than one million, multiplication of ic_clk * 4700 will result in 32 bit overflow. Add cast of u64 to the calculation to avoid multiplication overflow, and use the corresponding define for divide. Fixes: 2373f6b9744d ("i2c-designware: split of i2c-designware.c into core and bus specific parts") Signed-off-by: Lareine Khawaly Signed-off-by: Hanna Hawa Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-common.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 18bba1843fc7f264f58c9345d00827d082f9c558 Author: Ard Biesheuvel Date: Mon Jan 9 12:41:46 2023 +0100 efi: rt-wrapper: Add missing include Add the missing #include of asm/assembler.h, which is where the ldr_l macro is defined. Fixes: ff7a167961d1b97e ("arm64: efi: Execute runtime services from a dedicated stack") Signed-off-by: Ard Biesheuvel arch/arm64/kernel/efi-rt-wrapper.S | 1 + 1 file changed, 1 insertion(+) commit 5268a2842066c227e6ccd94bac562f1e1000244f Author: Kan Liang Date: Fri Jan 6 08:04:49 2023 -0800 perf/x86/intel/uncore: Add Emerald Rapids From the perspective of the uncore PMU, the new Emerald Rapids is the same as the Sapphire Rapids. The only difference is the event list, which will be supported in the perf tool later. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230106160449.3566477-4-kan.liang@linux.intel.com arch/x86/events/intel/uncore.c | 1 + 1 file changed, 1 insertion(+) commit 69ced4160969025821f2999ff92163ed26568f1c Author: Kan Liang Date: Fri Jan 6 08:04:48 2023 -0800 perf/x86/msr: Add Emerald Rapids The same as Sapphire Rapids, the SMI_COUNT MSR is also supported on Emerald Rapids. Add Emerald Rapids model. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230106160449.3566477-3-kan.liang@linux.intel.com arch/x86/events/msr.c | 1 + 1 file changed, 1 insertion(+) commit 6887a4d3aede084bf08b70fbc9736c69fce05d7f 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 Link: https://lore.kernel.org/r/20230104201349.1451191-7-kan.liang@linux.intel.com arch/x86/events/msr.c | 2 ++ 1 file changed, 2 insertions(+) commit 01f2ea5bcf89dbd7a6530dbce7f2fb4e327e7006 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 Link: https://lore.kernel.org/r/20230104201349.1451191-6-kan.liang@linux.intel.com arch/x86/events/intel/cstate.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 9a5418bc48babb313d2a62df29ebe21ce8c06c59 Author: Waiman Long Date: Fri Dec 30 23:11:20 2022 -0500 sched/core: Use kfree_rcu() in do_set_cpus_allowed() Commit 851a723e45d1 ("sched: Always clear user_cpus_ptr in do_set_cpus_allowed()") may call kfree() if user_cpus_ptr was previously set. Unfortunately, some of the callers of do_set_cpus_allowed() may have pi_lock held when calling it. So the following splats may be printed especially when running with a PREEMPT_RT kernel: WARNING: possible circular locking dependency detected BUG: sleeping function called from invalid context To avoid these problems, kfree_rcu() is used instead. An internal cpumask_rcuhead union is created for the sole purpose of facilitating the use of kfree_rcu() to free the cpumask. Since user_cpus_ptr is not being used in non-SMP configs, the newly introduced alloc_user_cpus_ptr() helper will return NULL in this case and sched_setaffinity() is modified to handle this special case. Fixes: 851a723e45d1 ("sched: Always clear user_cpus_ptr in do_set_cpus_allowed()") Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Reviewed-by: Peter Zijlstra Link: https://lore.kernel.org/r/20221231041120.440785-3-longman@redhat.com kernel/sched/core.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit 87ca4f9efbd7cc649ff43b87970888f2812945b8 Author: Waiman Long Date: Fri Dec 30 23:11:19 2022 -0500 sched/core: Fix use-after-free bug in dup_user_cpus_ptr() Since commit 07ec77a1d4e8 ("sched: Allow task CPU affinity to be restricted on asymmetric systems"), the setting and clearing of user_cpus_ptr are done under pi_lock for arm64 architecture. However, dup_user_cpus_ptr() accesses user_cpus_ptr without any lock protection. Since sched_setaffinity() can be invoked from another process, the process being modified may be undergoing fork() at the same time. When racing with the clearing of user_cpus_ptr in __set_cpus_allowed_ptr_locked(), it can lead to user-after-free and possibly double-free in arm64 kernel. Commit 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask") fixes this problem as user_cpus_ptr, once set, will never be cleared in a task's lifetime. However, this bug was re-introduced in commit 851a723e45d1 ("sched: Always clear user_cpus_ptr in do_set_cpus_allowed()") which allows the clearing of user_cpus_ptr in do_set_cpus_allowed(). This time, it will affect all arches. Fix this bug by always clearing the user_cpus_ptr of the newly cloned/forked task before the copying process starts and check the user_cpus_ptr state of the source task under pi_lock. Note to stable, this patch won't be applicable to stable releases. Just copy the new dup_user_cpus_ptr() function over. Fixes: 07ec77a1d4e8 ("sched: Allow task CPU affinity to be restricted on asymmetric systems") Fixes: 851a723e45d1 ("sched: Always clear user_cpus_ptr in do_set_cpus_allowed()") Reported-by: David Wang 王标 Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Reviewed-by: Peter Zijlstra Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221231041120.440785-2-longman@redhat.com kernel/sched/core.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit 45e966fcca03ecdcccac7cb236e16eea38cc18af Author: Paolo Bonzini Date: Sat Oct 22 04:17:53 2022 -0400 KVM: x86: Do not return host topology information from KVM_GET_SUPPORTED_CPUID Passing the host topology to the guest is almost certainly wrong and will confuse the scheduler. In addition, several fields of these CPUID leaves vary on each processor; it is simply impossible to return the right values from KVM_GET_SUPPORTED_CPUID in such a way that they can be passed to KVM_SET_CPUID2. The values that will most likely prevent confusion are all zeroes. Userspace will have to override it anyway if it wishes to present a specific topology to the guest. Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 14 ++++++++++++++ arch/x86/kvm/cpuid.c | 32 ++++++++++++++++---------------- 2 files changed, 30 insertions(+), 16 deletions(-) commit 74905e3de8adf0e6b5d7f455dcd32cdec13dfb6c Author: Paolo Bonzini Date: Wed Nov 9 06:03:03 2022 -0500 KVM: nSVM: clarify recalc_intercepts() wrt CR8 The mysterious comment "We only want the cr8 intercept bits of L1" dates back to basically the introduction of nested SVM, back when the handling of "less typical" hypervisors was very haphazard. With the development of kvm-unit-tests for interrupt handling, the same code grew another vmcb_clr_intercept for the interrupt window (VINTR) vmexit, this time with a comment that is at least decent. It turns out however that the same comment applies to the CR8 write intercept, which is also a "recheck if an interrupt should be injected" intercept. The CR8 read intercept instead has not been used by KVM for 14 years (commit 649d68643ebf, "KVM: SVM: sync TPR value to V_TPR field in the VMCB"), so do not bother clearing it and let one comment describe both CR8 write and VINTR handling. Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/nested.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit cfb47bf5a470bdd80e8ac2f7b2f3a34563ecd4ea Author: Frank Li Date: Wed Jan 4 16:07:40 2023 -0500 arm64: dts: freescale: imx8dxl: fix sc_pwrkey's property name linux,keycode linux,keycode should be "linux,keycodes" according binding-doc Documentation/devicetree/bindings/input/fsl,scu-key.yaml Fixes: f537ee7f1e76 ("arm64: dts: freescale: add i.MX8DXL SoC support") Signed-off-by: Frank Li Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8dxl.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8791906e667e44eddd62b341196f93911da8a578 Author: Stephen Kitt Date: Tue Jun 7 21:23:35 2022 +0200 fbdev: riva: 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 Cc: Antonino Daplas Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Thompson Signed-off-by: Helge Deller drivers/video/fbdev/riva/fbdev.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 450afd92d9cb177e0337c9ac26677765aeeff81a Author: Stephen Kitt Date: Tue Jun 7 21:23:34 2022 +0200 fbdev: omapfb: panel-dsi-cm: 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 Cc: Helge Deller Cc: linux-omap@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Thompson Signed-off-by: Helge Deller drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 1cc17590ddfec590d7301f5e4cf6183ea19afa25 Author: Stephen Kitt Date: Tue Jun 7 21:23:33 2022 +0200 fbdev: nvidia: 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 Cc: Antonino Daplas Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Thompson Signed-off-by: Helge Deller drivers/video/fbdev/nvidia/nv_backlight.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 973fcf37c267f937fbec656f4643571d7bd09a37 Author: Stephen Kitt Date: Tue Jun 7 21:23:32 2022 +0200 fbdev: mx3fb: 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 Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Thompson Signed-off-by: Helge Deller drivers/video/fbdev/mx3fb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit c28509ef9c221378a586e72643fc43102f5512e9 Author: Stephen Kitt Date: Tue Jun 7 21:23:31 2022 +0200 fbdev: radeon: 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 Cc: Benjamin Herrenschmidt Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Thompson Signed-off-by: Helge Deller drivers/video/fbdev/aty/radeon_backlight.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1535ec976414d2ea8d29d40da6b5b99c91e0f2bf Author: Stephen Kitt Date: Tue Jun 7 21:23:30 2022 +0200 fbdev: atyfb: 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 Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Thompson Signed-off-by: Helge Deller drivers/video/fbdev/aty/atyfb_base.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 5b3fc9988d1e4be268d834c2aaae85c75fa34253 Author: Stephen Kitt Date: Tue Jun 7 21:23:29 2022 +0200 fbdev: aty128fb: 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 Cc: Paul Mackerras Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Helge Deller drivers/video/fbdev/aty/aty128fb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5d1335dabb3c493a3d6d5b233953b6ac7b6c1ff2 Author: Helge Deller Date: Mon Dec 19 20:56:36 2022 +0100 parisc: Fix return code of pdc_iodc_print() There is an off-by-one if the printed string includes a new-line char. Cc: stable@vger.kernel.org Signed-off-by: Helge Deller arch/parisc/kernel/firmware.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f2193bb2ee6e21d9c2da10ea3ce63b94aea69341 Author: Xu Panda Date: Fri Dec 23 10:40:56 2022 +0800 parisc: pdc_stable: 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: Helge Deller drivers/parisc/pdc_stable.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 84ee211c83212f4d35b56e0603acdcc41f860f1b Author: Mika Westerberg Date: Thu Sep 8 09:45:22 2022 +0300 thunderbolt: Disable XDomain lane 1 only in software connection manager When firmware connection manager is in use we should not touch the lane adapter (well or any) configuration space so do this only when we know that the software connection manager is active. Fixes: 8e1de7042596 ("thunderbolt: Add support for XDomain lane bonding") Cc: stable@vger.kernel.org Acked-by: Yehezkel Bernat Signed-off-by: Mika Westerberg drivers/thunderbolt/xdomain.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit e8ff07fb33026c5c1bb5b81293496faba5d68059 Author: Mika Westerberg Date: Fri May 20 13:35:19 2022 +0300 thunderbolt: Use correct function to calculate maximum USB3 link rate We need to take minimum of both sides of the USB3 link into consideration, not just the downstream port. Fix this by calling tb_usb3_max_link_rate() instead. Fixes: 0bd680cd900c ("thunderbolt: Add USB3 bandwidth management") Cc: stable@vger.kernel.org Acked-by: Yehezkel Bernat Signed-off-by: Mika Westerberg drivers/thunderbolt/tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23257cfc1cb7202fd0065e9f4a6a0aac1c04c4a9 Author: Mika Westerberg Date: Thu Dec 29 14:10:30 2022 +0200 thunderbolt: Do not call PM runtime functions in tb_retimer_scan() We cannot call PM runtime functions in tb_retimer_scan() because it will also be called when retimers are scanned from userspace (happens when there is no device connected on ChromeOS for instance) and at the same USB4 port runtime resume hook. This leads to hang because neither can proceed. Fix this by runtime resuming USB4 ports in tb_scan_port() instead. This makes sure the ports are runtime PM active when retimers are added under it while avoiding the reported hang as well. Reported-by: Utkarsh Patel Fixes: 1e56c88adecc ("thunderbolt: Runtime resume USB4 port when retimers are scanned") Cc: stable@vger.kernel.org Acked-by: Yehezkel Bernat Signed-off-by: Mika Westerberg drivers/thunderbolt/retimer.c | 17 +++-------------- drivers/thunderbolt/tb.c | 20 +++++++++++++++----- 2 files changed, 18 insertions(+), 19 deletions(-) commit 7d6ceeb1875cc08dc3d1e558e191434d94840cd5 Author: Mirsad Goran Todorovac Date: Sat Jan 7 04:40:20 2023 +0100 af_unix: selftest: Fix the size of the parameter to connect() Adjust size parameter in connect() to match the type of the parameter, to fix "No such file or directory" error in selftests/net/af_unix/ test_oob_unix.c:127. The existing code happens to work provided that the autogenerated pathname is shorter than sizeof (struct sockaddr), which is why it hasn't been noticed earlier. Visible from the trace excerpt: bind(3, {sa_family=AF_UNIX, sun_path="unix_oob_453059"}, 110) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fa6a6577a10) = 453060 [pid ] connect(6, {sa_family=AF_UNIX, sun_path="unix_oob_45305"}, 16) = -1 ENOENT (No such file or directory) BUG: The filename is trimmed to sizeof (struct sockaddr). Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Shuah Khan Cc: Kuniyuki Iwashima Cc: Florian Westphal Reviewed-by: Florian Westphal Fixes: 314001f0bf92 ("af_unix: Add OOB support") Signed-off-by: Mirsad Goran Todorovac Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller tools/testing/selftests/net/af_unix/test_unix_oob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76761babaa984fce8ecd87d87a68d920f24df438 Author: Horatiu Vultur Date: Fri Jan 6 21:15:07 2023 +0100 net: lan966x: Allow to add rules in TCAM even if not enabled The blamed commit implemented the vcap_operations to allow to add an entry in the TCAM. One of the callbacks is to validate the supported keysets. If the TCAM lookup was not enabled, then this will return failure so no entries could be added. This doesn't make much sense, as you can enable at a later point the TCAM. Therefore change it such to allow entries in TCAM even it is not enabled. Fixes: 4426b78c626d ("net: lan966x: Add port keyset config and callback interface") Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c | 3 --- 1 file changed, 3 deletions(-) commit 7871f54e3deed68a27111dda162c4fe9b9c65f8f Author: Eric Dumazet Date: Fri Jan 6 14:25:23 2023 +0000 gro: take care of DODGY packets Jaroslav reported a recent throughput regression with virtio_net caused by blamed commit. It is unclear if DODGY GSO packets coming from user space can be accepted by GRO engine in the future with minimal changes, and if there is any expected gain from it. In the meantime, make sure to detect and flush DODGY packets. Fixes: 5eddb24901ee ("gro: add support of (hw)gro packets to gro stack") Signed-off-by: Eric Dumazet Reported-and-bisected-by: Jaroslav Pulchart Cc: Coco Li Cc: Paolo Abeni Signed-off-by: David S. Miller net/core/gro.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9dab880d675b9d0dd56c6428e4e8352a3339371d Author: Minsuk Kang Date: Fri Jan 6 17:23:44 2023 +0900 nfc: pn533: Wait for out_urb's completion in pn533_usb_send_frame() Fix a use-after-free that occurs in hcd when in_urb sent from pn533_usb_send_frame() is completed earlier than out_urb. Its callback frees the skb data in pn533_send_async_complete() that is used as a transfer buffer of out_urb. Wait before sending in_urb until the callback of out_urb is called. To modify the callback of out_urb alone, separate the complete function of out_urb and ack_urb. Found by a modified version of syzkaller. BUG: KASAN: use-after-free in dummy_timer Call Trace: memcpy (mm/kasan/shadow.c:65) dummy_perform_transfer (drivers/usb/gadget/udc/dummy_hcd.c:1352) transfer (drivers/usb/gadget/udc/dummy_hcd.c:1453) dummy_timer (drivers/usb/gadget/udc/dummy_hcd.c:1972) arch_static_branch (arch/x86/include/asm/jump_label.h:27) static_key_false (include/linux/jump_label.h:207) timer_expire_exit (include/trace/events/timer.h:127) call_timer_fn (kernel/time/timer.c:1475) expire_timers (kernel/time/timer.c:1519) __run_timers (kernel/time/timer.c:1790) run_timer_softirq (kernel/time/timer.c:1803) Fixes: c46ee38620a2 ("NFC: pn533: add NXP pn533 nfc device driver") Signed-off-by: Minsuk Kang Signed-off-by: David S. Miller drivers/nfc/pn533/usb.c | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) commit 2ab6478d1266b522a0a6ce3697914d63529f9e7a Author: Kees Cook Date: Thu Jan 5 15:22:29 2023 -0800 mlxsw: spectrum_router: Replace 0-length array with flexible array Zero-length arrays are deprecated[1]. Replace struct mlxsw_sp_nexthop_group_info's "nexthops" 0-length array with a flexible array. Detected with GCC 13, using -fstrict-flex-arrays=3: drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c: In function 'mlxsw_sp_nexthop_group_hash_obj': drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3278:38: warning: array subscript i is outside array bounds of 'struct mlxsw_sp_nexthop[0]' [-Warray-bounds=] 3278 | val ^= jhash(&nh->ifindex, sizeof(nh->ifindex), seed); | ^~~~~~~~~~~~ drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:2954:33: note: while referencing 'nexthops' 2954 | struct mlxsw_sp_nexthop nexthops[0]; | ^~~~~~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Ido Schimmel Cc: Petr Machata Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: "Gustavo A. R. Silva" Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Ido Schimmel Reviewed-by: Gustavo A. R. Silva Tested-by: Petr Machata Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60ea6f00c57dae5e7ba2c52ed407cb24fdb11ebe Author: Alex Elder Date: Fri Jan 6 07:25:01 2023 -0600 net: ipa: correct IPA v4.7 IMEM offset Commit b310de784bacd ("net: ipa: add IPA v4.7 support") was merged despite an unresolved comment made by Konrad Dybcio. Konrad observed that the IMEM region specified for IPA v4.7 did not match that used downstream for the SM7225 SoC. In "lagoon.dtsi" present in a Sony Xperia source tree, a ipa_smmu_ap node was defined with a "qcom,additional-mapping" property that defined the IPA IMEM area starting at offset 0x146a8000 (not 0x146a9000 that was committed). The IPA v4.7 target system used for testing uses the SM7225 SoC, so we'll adhere what the downstream code specifies is the address of the IMEM region used for IPA. Link: https://lore.kernel.org/linux-arm-msm/20221208211529.757669-1-elder@linaro.org Fixes: b310de784bac ("net: ipa: add IPA v4.7 support") Tested-by: Luca Weiss Signed-off-by: Alex Elder Reviewed-by: Konrad Dybcio Signed-off-by: David S. Miller drivers/net/ipa/data/ipa_data-v4.7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fca053893e8d5be8173c92876c6329cbee78b880 Author: Fabio Estevam Date: Mon Jan 2 11:04:02 2023 -0300 arm64: dts: imx8m-venice: Remove incorrect 'uart-has-rtscts' The following build warnings are seen when running: make dtbs_check DT_SCHEMA_FILES=fsl-imx-uart.yaml arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dtb: serial@30860000: cts-gpios: False schema does not allow [[33, 3, 1]] From schema: Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dtb: serial@30860000: rts-gpios: False schema does not allow [[33, 5, 1]] From schema: Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml ... The imx8m Venice Gateworks boards do not expose the UART RTS and CTS as native UART pins, so 'uart-has-rtscts' should not be used. Using 'uart-has-rtscts' with 'rts-gpios' is an invalid combination detected by serial.yaml. Fix the problem by removing the incorrect 'uart-has-rtscts' property. Fixes: 27c8f4ccc1b9 ("arm64: dts: imx8mm-venice-gw72xx-0x: add dt overlays for serial modes") Fixes: d9a9a7cf32c9 ("arm64: dts: imx8m{m,n}-venice-*: add missing uart-has-rtscts property to UARTs") Fixes: 870f645b396b ("arm64: dts: imx8mp-venice-gw74xx: add WiFi/BT module support") Signed-off-by: Fabio Estevam Acked-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x-rs232-rts.dtso | 1 - arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x-rs232-rts.dtso | 1 - arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi | 1 - arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts | 3 --- arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts | 3 --- arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dts | 1 - arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dts | 1 - arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts | 1 - 8 files changed, 12 deletions(-) commit a5a36720c3f650f859f5e9535dd62d06f13f4f3b Author: Ivan T. Ivanov Date: Fri Jan 6 15:19:05 2023 +0200 brcmfmac: Prefer DT board type over DMI board type The introduction of support for Apple board types inadvertently changed the precedence order, causing hybrid SMBIOS+DT platforms to look up the firmware using the DMI information instead of the device tree compatible to generate the board type. Revert back to the old behavior, as affected platforms use firmwares named after the DT compatible. Fixes: 7682de8b3351 ("wifi: brcmfmac: of: Fetch Apple properties") [1] https://bugzilla.opensuse.org/show_bug.cgi?id=1206697#c13 Cc: stable@vger.kernel.org Signed-off-by: Ivan T. Ivanov Reviewed-by: Hector Martin Reviewed-by: Arend van Spriel Tested-by: Peter Robinson Signed-off-by: David S. Miller drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2f440c4f04ca28e3ddf4bb6f3d25f7613abe2873 Author: Marek Vasut Date: Fri Dec 16 01:05:52 2022 +0100 arm64: dts: imx8mm: Reinstate GPIO watchdog always-running property on eDM SBC The GPIO watchdog property name is 'always-running', not 'always-enabled'. Use the correct property name and reinstate it into the DT. Fixes: eff6b33c9ce9 ("arm64: dts: imx8mm: Remove watchdog always-enabled property from eDM SBC") Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts | 1 + 1 file changed, 1 insertion(+) commit f57034cedeb6e00256313a2a6ee67f974d709b0b Author: Oleksii Moisieiev Date: Tue Dec 20 14:50:13 2022 +0000 xen/pvcalls: free active map buffer on pvcalls_front_free_map Data buffer for active map is allocated in alloc_active_ring and freed in free_active_ring function, which is used only for the error cleanup. pvcalls_front_release is calling pvcalls_front_free_map which ends foreign access for this buffer, but doesn't free allocated pages. Call free_active_ring to clean all allocated resources. Signed-off-by: Oleksii Moisieiev Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/6a762ee32dd655cbb09a4aa0e2307e8919761311.1671531297.git.oleksii_moisieiev@epam.com Signed-off-by: Juergen Gross drivers/xen/pvcalls-front.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c0dccad87cf68fc6012aec7567e354353097ec1a Author: Roger Pau Monne Date: Wed Nov 30 17:36:02 2022 +0100 hvc/xen: lock console list traversal The currently lockless access to the xen console list in vtermno_to_xencons() is incorrect, as additions and removals from the list can happen anytime, and as such the traversal of the list to get the private console data for a given termno needs to happen with the lock held. Note users that modify the list already do so with the lock taken. Adjust current lock takers to use the _irq{save,restore} helpers, since the context in which vtermno_to_xencons() is called can have interrupts disabled. Use the _irq{save,restore} set of helpers to switch the current callers to disable interrupts in the locked region. I haven't checked if existing users could instead use the _irq variant, as I think it's safer to use _irq{save,restore} upfront. While there switch from using list_for_each_entry_safe to list_for_each_entry: the current entry cursor won't be removed as part of the code in the loop body, so using the _safe variant is pointless. Fixes: 02e19f9c7cac ('hvc_xen: implement multiconsole support') Signed-off-by: Roger Pau Monné Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/20221130163611.14686-1-roger.pau@citrix.com Signed-off-by: Juergen Gross drivers/tty/hvc/hvc_xen.c | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) commit 37c1785609833e626d344047a84e272b7879b2c3 Author: Jiapeng Chong Date: Thu Jan 5 17:01:41 2023 +0800 x86/xen: Remove the unused function p2m_index() The function p2m_index is defined in the p2m.c file, but not called elsewhere, so remove this unused function. arch/x86/xen/p2m.c:137:24: warning: unused function 'p2m_index'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3557 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20230105090141.36248-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Juergen Gross arch/x86/xen/p2m.c | 5 ----- 1 file changed, 5 deletions(-) commit b0355dbbf13c0052931dd14c38c789efed64d3de Author: Benedict Wong Date: Thu Jan 5 21:28:12 2023 +0000 Fix XFRM-I support for nested ESP tunnels This change adds support for nested IPsec tunnels by ensuring that XFRM-I verifies existing policies before decapsulating a subsequent policies. Addtionally, this clears the secpath entries after policies are verified, ensuring that previous tunnels with no-longer-valid do not pollute subsequent policy checks. This is necessary especially for nested tunnels, as the IP addresses, protocol and ports may all change, thus not matching the previous policies. In order to ensure that packets match the relevant inbound templates, the xfrm_policy_check should be done before handing off to the inner XFRM protocol to decrypt and decapsulate. Notably, raw ESP/AH packets did not perform policy checks inherently, whereas all other encapsulated packets (UDP, TCP encapsulated) do policy checks after calling xfrm_input handling in the respective encapsulation layer. Test: Verified with additional Android Kernel Unit tests Signed-off-by: Benedict Wong Signed-off-by: Steffen Klassert net/xfrm/xfrm_interface_core.c | 54 ++++++++++++++++++++++++++++++++++++++---- net/xfrm/xfrm_policy.c | 3 +++ 2 files changed, 53 insertions(+), 4 deletions(-) commit 49e4d04f0486117ac57a97890eb1db6d52bf82b3 Author: Tejun Heo Date: Fri Jan 6 10:34:10 2023 -1000 block: Drop spurious might_sleep() from blk_put_queue() Dan reports the following smatch detected the following: block/blk-cgroup.c:1863 blkcg_schedule_throttle() warn: sleeping in atomic context caused by blkcg_schedule_throttle() calling blk_put_queue() in an non-sleepable context. blk_put_queue() acquired might_sleep() in 63f93fd6fa57 ("block: mark blk_put_queue as potentially blocking") which transferred the might_sleep() from blk_free_queue(). blk_free_queue() acquired might_sleep() in e8c7d14ac6c3 ("block: revert back to synchronous request_queue removal") while turning request_queue removal synchronous. However, this isn't necessary as nothing in the free path actually requires sleeping. It's pretty unusual to require a sleeping context in a put operation and it's not needed in the first place. Let's drop it. Signed-off-by: Tejun Heo Reported-by: Dan Carpenter Link: https://lkml.kernel.org/r/Y7g3L6fntnTtOm63@kili Cc: Christoph Hellwig Cc: Luis Chamberlain Fixes: e8c7d14ac6c3 ("block: revert back to synchronous request_queue removal") # v5.9+ Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/Y7iFwjN+XzWvLv3y@slm.duckdns.org Signed-off-by: Jens Axboe block/blk-core.c | 3 --- 1 file changed, 3 deletions(-) commit b409ea4534204d4e6da3017d8713ce338f44b489 Author: Masahiro Yamada Date: Sun Jan 8 21:35:57 2023 +0900 init/version-timestamp.c: remove unneeded #include The kbuild test robot detected this by 'make versioncheck'. Fixes: 2df8220cc511 ("kbuild: build init/built-in.a just once") Reported-by: kernel test robot Signed-off-by: Masahiro Yamada init/version-timestamp.c | 1 - 1 file changed, 1 deletion(-) commit e3c9405ec56b6b0a75d993427bfc7f4194f73754 Author: Miguel Ojeda Date: Sat Jan 7 15:37:47 2023 +0100 docs: kbuild: remove mention to dropped $(objtree) feature Commit 8d613a1d048c ("kbuild: drop $(objtree)/ prefix support for clean-files") dropped support for prefixing with $(objtree). Thus update the documentation to match that change. Signed-off-by: Miguel Ojeda Signed-off-by: Masahiro Yamada Documentation/kbuild/makefiles.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f71eaf2708be7831428eacae7db25d8ec6b8b4c5 Author: Yuan Can Date: Wed Nov 23 09:42:00 2022 +0000 bus: sunxi-rsb: Fix error handling in sunxi_rsb_init() The sunxi_rsb_init() returns the platform_driver_register() directly without checking its return value, if platform_driver_register() failed, the sunxi_rsb_bus is not unregistered. Fix by unregister sunxi_rsb_bus when platform_driver_register() failed. Fixes: d787dcdb9c8f ("bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus") Signed-off-by: Yuan Can Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221123094200.12036-1-yuancan@huawei.com Signed-off-by: Jernej Skrabec drivers/bus/sunxi-rsb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1fe4fd6f5cad346e598593af36caeadc4f5d4fa9 Merge: b7bfaa761d76 601a27ea09a3 Author: Linus Torvalds Date: Sun Jan 8 12:11:45 2023 -0600 Merge tag 'xfs-6.2-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - Remove some incorrect assertions - Fix compiler warnings about variables that could be static - Fix an off by one error when computing the maximum btree height that can cause repair failures - Fix the bulkstat-single ioctl not returning the root inode when asked to do that - Convey NOFS state to inodegc workers to avoid recursion in reclaim - Fix unnecessary variable initializations - Fix a bug that could result in corruption of the busy extent tree * tag 'xfs-6.2-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix extent busy updating xfs: xfs_qm: remove unnecessary ‘0’ values from error xfs: Fix deadlock on xfs_inodegc_worker xfs: get root inode correctly at bulkstat xfs: fix off-by-one error in xfs_btree_space_to_height xfs: make xfs_iomap_page_ops static xfs: don't assert if cmap covers imap after cycling lock commit b7bfaa761d760e72a969d116517eaa12e404c262 Author: Linus Torvalds Date: Sun Jan 8 11:49:43 2023 -0600 Linux 6.2-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6db6f9398dadcbc06318a133d4c44a2d3844e61 Author: Jens Axboe Date: Sun Jan 8 10:39:17 2023 -0700 io_uring/io-wq: only free worker if it was allocated for creation We have two types of task_work based creation, one is using an existing worker to setup a new one (eg when going to sleep and we have no free workers), and the other is allocating a new worker. Only the latter should be freed when we cancel task_work creation for a new worker. Fixes: af82425c6a2d ("io_uring/io-wq: free worker if task_work creation is canceled") Reported-by: syzbot+d56ec896af3637bdb7e4@syzkaller.appspotmail.com Signed-off-by: Jens Axboe io_uring/io-wq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 115d9d77bb0f9152c60b6e8646369fa7f6167593 Author: Aaron Thompson Date: Fri Jan 6 22:22:44 2023 +0000 mm: Always release pages to the buddy allocator in memblock_free_late(). If CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, memblock_free_pages() only releases pages to the buddy allocator if they are not in the deferred range. This is correct for free pages (as defined by for_each_free_mem_pfn_range_in_zone()) because free pages in the deferred range will be initialized and released as part of the deferred init process. memblock_free_pages() is called by memblock_free_late(), which is used to free reserved ranges after memblock_free_all() has run. All pages in reserved ranges have been initialized at that point, and accordingly, those pages are not touched by the deferred init process. This means that currently, if the pages that memblock_free_late() intends to release are in the deferred range, they will never be released to the buddy allocator. They will forever be reserved. In addition, memblock_free_pages() calls kmsan_memblock_free_pages(), which is also correct for free pages but is not correct for reserved pages. KMSAN metadata for reserved pages is initialized by kmsan_init_shadow(), which runs shortly before memblock_free_all(). For both of these reasons, memblock_free_pages() should only be called for free pages, and memblock_free_late() should call __free_pages_core() directly instead. One case where this issue can occur in the wild is EFI boot on x86_64. The x86 EFI code reserves all EFI boot services memory ranges via memblock_reserve() and frees them later via memblock_free_late() (efi_reserve_boot_services() and efi_free_boot_services(), respectively). If any of those ranges happens to fall within the deferred init range, the pages will not be released and that memory will be unavailable. For example, on an Amazon EC2 t3.micro VM (1 GB) booting via EFI: v6.2-rc2: # grep -E 'Node|spanned|present|managed' /proc/zoneinfo Node 0, zone DMA spanned 4095 present 3999 managed 3840 Node 0, zone DMA32 spanned 246652 present 245868 managed 178867 v6.2-rc2 + patch: # grep -E 'Node|spanned|present|managed' /proc/zoneinfo Node 0, zone DMA spanned 4095 present 3999 managed 3840 Node 0, zone DMA32 spanned 246652 present 245868 managed 222816 # +43,949 pages Fixes: 3a80a7fa7989 ("mm: meminit: initialise a subset of struct pages if CONFIG_DEFERRED_STRUCT_PAGE_INIT is set") Signed-off-by: Aaron Thompson Link: https://lore.kernel.org/r/01010185892de53e-e379acfb-7044-4b24-b30a-e2657c1ba989-000000@us-west-2.amazonses.com Signed-off-by: Mike Rapoport (IBM) mm/memblock.c | 8 +++++++- tools/testing/memblock/internal.h | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 93928d485d9df12be724cbdf1caa7d197b65001e Merge: e9ffbf16caa6 be5f95c8779e Author: Linus Torvalds Date: Sun Jan 8 06:55:08 2023 -0700 Merge tag 'powerpc-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Three fixes for various bogosity in our linker script, revealed by the recent commit which changed discard behaviour with some toolchains. * tag 'powerpc-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/vmlinux.lds: Don't discard .comment powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT commit c9c1d6d82091f05b4dabf2c624bdaeba19bdf893 Author: Vladimir Oltean Date: Tue Jan 3 15:03:48 2023 +0200 iio: imu: st_lsm6dsx: fix build when CONFIG_IIO_TRIGGERED_BUFFER=m The following kernel linkage error: st_lsm6dsx_core.o: in function `st_lsm6dsx_sw_buffers_setup': st_lsm6dsx_core.c:2578: undefined reference to `devm_iio_triggered_buffer_setup_ext' is caused by the fact that the object owning devm_iio_triggered_buffer_setup_ext() (drivers/iio/buffer/industrialio-triggered-buffer.o) is allowed to be built as module when its user (drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c) is built-in. The st_lsm6dsx driver already has a "select IIO_BUFFER", so add another select for IIO_TRIGGERED_BUFFER, to make that option follow what is set for the st_lsm6dsx driver. This is similar to what other iio drivers do. Fixes: 2cfb2180c3e8 ("iio: imu: st_lsm6dsx: introduce sw trigger support") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20230103130348.1733467-1-vladimir.oltean@nxp.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e9ffbf16caa6cb596df7fd641bc6063a922c52e6 Merge: 9b43a525db12 fa81ab49bbe4 Author: Linus Torvalds Date: Sun Jan 8 02:54:24 2023 -0800 Merge tag 'fixes-2023-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock fixes from Mike Rapoport: "Small fixes in kernel-doc and tests: - Fix kernel-doc for memblock_phys_free() to use correct names for the counterpart allocation methods - Fix compilation error in memblock tests" * tag 'fixes-2023-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock: Fix doc for memblock_phys_free memblock tests: Fix compilation error. commit 571f3dd0d01b62ec63a4039320dbdbcd54ae8fb0 Merge: b4e9b8763e41 42f229c350f5 Author: David S. Miller Date: Sat Jan 7 23:10:33 2023 +0000 Merge tag 'rxrpc-fixes-20230107' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fix race between call connection, data transmit and call disconnect Here are patches to fix an oops[1] caused by a race between call connection, initial packet transmission and call disconnection which results in something like: kernel BUG at net/rxrpc/peer_object.c:413! when the syzbot test is run. The problem is that the connection procedure is effectively split across two threads and can get expanded by taking an interrupt, thereby adding the call to the peer error distribution list *after* it has been disconnected (say by the rxrpc socket shutting down). The easiest solution is to look at the fourth set of I/O thread conversion/SACK table expansion patches that didn't get applied[2] and take from it those patches that move call connection and disconnection into the I/O thread. Moving these things into the I/O thread means that the sequencing is managed by all being done in the same thread - and the race can no longer happen. This is preferable to introducing an extra lock as adding an extra lock would make the I/O thread have to wait for the app thread in yet another place. The changes can be considered as a number of logical parts: (1) Move all of the call state changes into the I/O thread. (2) Make client connection ID space per-local endpoint so that the I/O thread doesn't need locks to access it. (3) Move actual abort generation into the I/O thread and clean it up. If sendmsg or recvmsg want to cause an abort, they have to delegate it. (4) Offload the setting up of the security context on a connection to the thread of one of the apps that's starting a call. We don't want to be doing any sort of crypto in the I/O thread. (5) Connect calls (ie. assign them to channel slots on connections) in the I/O thread. Calls are set up by sendmsg/kafs and passed to the I/O thread to connect. Connections are allocated in the I/O thread after this. (6) Disconnect calls in the I/O thread. I've also added a patch for an unrelated bug that cropped up during testing, whereby a race can occur between an incoming call and socket shutdown. Note that whilst this fixes the original syzbot bug, another bug may get triggered if this one is fixed: INFO: rcu detected stall in corrupted rcu: INFO: rcu_preempt detected expedited stalls on CPUs/tasks: { P5792 } 2657 jiffies s: 2825 root: 0x0/T rcu: blocking rcu_node structures (internal RCU debug): It doesn't look this should be anything to do with rxrpc, though, as I've tested an additional patch[3] that removes practically all the RCU usage from rxrpc and it still occurs. It seems likely that it is being caused by something in the tunnelling setup that the syzbot test does, but there's not enough info to go on. It also seems unlikely to be anything to do with the afs driver as the test doesn't use that. ==================== Signed-off-by: David S. Miller commit 43d5f5d63699724d47f0d9e0eae516a260d232b4 Author: Ben Dooks Date: Fri Jan 6 13:44:56 2023 +0000 riscv: dts: sifive: fu740: fix size of pcie 32bit memory The 32-bit memory resource is needed for non-prefetchable memory allocations on the PCIe bus, however with some cards (such as the SM768) the system fails to allocate memory from this. Checking the allocation against the datasheet, it looks like there has been a mis-calcualation of the resource for the first memory region (0x0060090000..0x0070ffffff) which in the data-sheet for the fu740 (v1p2) is from 0x0060000000..0x007fffffff. Changing this to allocate from 0x0060090000..0x007fffffff fixes the probing issues. Fixes: ae80d5148085 ("riscv: dts: Add PCIe support for the SiFive FU740-C000 SoC") Cc: Paul Walmsley Cc: Greentime Hu Signed-off-by: Ben Dooks Cc: stable@vger.kernel.org Tested-by: Ron Economos # from IRC Reviewed-by: Conor Dooley Signed-off-by: Conor Dooley arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b43a525db125799df81e6fbef712a2ae50bfc5d Merge: f18fca98ac16 5e9a7b9c2ea1 Author: Linus Torvalds Date: Sat Jan 7 10:38:11 2023 -0800 Merge tag 'nfs-for-6.2-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client fixes from Trond Myklebust: - Fix a race in the RPCSEC_GSS upcall code that causes hung RPC calls - Fix a broken coalescing test in the pNFS file layout driver - Ensure that the access cache rcu path also applies the login test - Fix up for a sparse warning * tag 'nfs-for-6.2-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFS: Fix up a sparse warning NFS: Judge the file access cache's timestamp in rcu path pNFS/filelayout: Fix coalescing test for single DS SUNRPC: ensure the matching upcall is in-flight upon downcall commit f18fca98ac1622220dfdf795fefa91dc52d3707d Merge: 0007c04038e5 cc7d79d4fad6 Author: Linus Torvalds Date: Sat Jan 7 10:26:34 2023 -0800 Merge tag '6.2-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "cifs/smb3 client fixes: - two multichannel fixes - three reconnect fixes - unmap fix" * tag '6.2-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix interface count calculation during refresh cifs: refcount only the selected iface during interface update cifs: protect access of TCP_Server_Info::{dstaddr,hostname} cifs: fix race in assemble_neg_contexts() cifs: ignore ipc reconnect failures during dfs failover cifs: Fix kmap_local_page() unmapping commit 0007c04038e5a3111bea1c4588bfb6778a69131d Merge: c28bdeaf5d72 064e32dc5b03 Author: Linus Torvalds Date: Sat Jan 7 10:20:33 2023 -0800 Merge tag 'devicetree-fixes-for-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Fix DT memory scanning for some MIPS boards when memory is not specified in DT - Redo CONFIG_CMDLINE* handling for missing /chosen node. The first attempt broke PS3 (and possibly other PPC platforms). - Fix constraints in QCom Soundwire schema * tag 'devicetree-fixes-for-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: fdt: Honor CONFIG_CMDLINE* even without /chosen node, take 2 Revert "of: fdt: Honor CONFIG_CMDLINE* even without /chosen node" dt-bindings: soundwire: qcom,soundwire: correct sizes related to number of ports of/fdt: run soc memory setup when early_init_dt_scan_memory fails commit c28bdeaf5d723b40c8e2901662f4e8acd574e839 Merge: 4a4dcea08313 c4e3ef568539 Author: Linus Torvalds Date: Sat Jan 7 10:12:42 2023 -0800 Merge tag 'usb-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB driver fixes for 6.2-rc3 that resolve some reported issues. They include: - of-reported ulpi problem, so the offending commit is reverted - dwc3 driver bugfixes for recent changes - fotg210 fixes Most of these have been in linux-next for a while, the last few were on the mailing list for a long time and passed all the 0-day bot testing so all should be fine with them as well" * tag 'usb-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: dwc3: gadget: Ignore End Transfer delay on teardown usb: dwc3: xilinx: include linux/gpio/consumer.h usb: fotg210-udc: fix error return code in fotg210_udc_probe() usb: fotg210: fix OTG-only build Revert "usb: ulpi: defer ulpi_register on ulpi_read_id timeout" commit 4a4dcea0831394b876ae955ecf49ba072ffbf059 Merge: a7c4127a29ce e95d50d74b93 Author: Linus Torvalds Date: Sat Jan 7 10:06:47 2023 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Most noticeable is that Yishai found a big data corruption regression due to a change in the scatterlist: - Do not wrongly combine non-contiguous pages in scatterlist - Fix compilation warnings on gcc 13 - Oops when using some mlx5 stats - Bad enforcement of atomic responder resources in mlx5" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: lib/scatterlist: Fix to merge contiguous pages into the last SG properly RDMA/mlx5: Fix validation of max_rd_atomic caps for DC RDMA/mlx5: Fix mlx5_ib_get_hw_stats when used for device RDMA/srp: Move large values to a new enum for gcc13 commit a7c4127a29ce222c9fa4fb4ae5b15e182a1ee5c9 Merge: 0a71553536d2 735aec59afb1 Author: Linus Torvalds Date: Sat Jan 7 09:49:52 2023 -0800 Merge tag 'kbuild-fixes-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix single *.ko build - Fix module builds when vmlinux.o or Module.symver is missing * tag 'kbuild-fixes-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: readd -w option when vmlinux.o or Module.symver is missing kbuild: fix single *.ko build commit 5304930dbae82d259bcf7e5611db7c81e7a42eff Author: Chuck Lever Date: Sat Jan 7 10:15:35 2023 -0500 NFSD: Use set_bit(RQ_DROPME) The premise that "Once an svc thread is scheduled and executing an RPC, no other processes will touch svc_rqst::rq_flags" is false. svc_xprt_enqueue() examines the RQ_BUSY flag in scheduled nfsd threads when determining which thread to wake up next. Fixes: 9315564747cb ("NFSD: Use only RQ_DROPME to signal the need to drop a reply") Signed-off-by: Chuck Lever fs/nfsd/nfsproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c0f7ae27539fbac267384a7bfc58296ea7550d52 Author: Tudor Ambarus Date: Mon Dec 26 16:40:43 2022 +0200 MAINTAINERS: Update email of Tudor Ambarus My professional email will change and the microchip one will bounce after mid-november of 2022. Update the MAINTAINERS file, the YAML bindings, MODULE_AUTHOR entries and author mentions, and add an entry in the .mailmap file. Signed-off-by: Tudor Ambarus Acked-by: Rob Herring Acked-by: Pratyush Yadav Acked-by: Mark Brown Acked-by: Nicolas Ferre Acked-by: Herbert Xu Acked-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221226144043.367706-1-tudor.ambarus@linaro.org .mailmap | 1 + .../devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml | 2 +- .../devicetree/bindings/crypto/atmel,at91sam9g46-sha.yaml | 2 +- .../devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml | 2 +- .../devicetree/bindings/spi/atmel,at91rm9200-spi.yaml | 2 +- Documentation/devicetree/bindings/spi/atmel,quadspi.yaml | 2 +- MAINTAINERS | 10 +++++----- drivers/crypto/atmel-ecc.c | 4 ++-- drivers/crypto/atmel-i2c.c | 4 ++-- drivers/crypto/atmel-i2c.h | 2 +- 10 files changed, 16 insertions(+), 15 deletions(-) commit df4840c1b880136fea97a1d64724995778c2475f Author: Masahiro Yamada Date: Sat Jan 7 16:47:42 2023 +0900 tomoyo: avoid unneeded creation of builtin-policy.h When CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING=y, builtin-policy.h is unneeded. Signed-off-by: Masahiro Yamada Signed-off-by: Tetsuo Handa security/tomoyo/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit eaf2213ba563b2d74a1f2c13a6b258273f689802 Author: Masahiro Yamada Date: Sat Jan 7 16:47:41 2023 +0900 tomoyo: fix broken dependency on *.conf.default If *.conf.default is updated, builtin-policy.h should be rebuilt, but this does not work when compiled with O= option. [Without this commit] $ touch security/tomoyo/policy/exception_policy.conf.default $ make O=/tmp security/tomoyo/ make[1]: Entering directory '/tmp' GEN Makefile CALL /home/masahiro/ref/linux/scripts/checksyscalls.sh DESCEND objtool make[1]: Leaving directory '/tmp' [With this commit] $ touch security/tomoyo/policy/exception_policy.conf.default $ make O=/tmp security/tomoyo/ make[1]: Entering directory '/tmp' GEN Makefile CALL /home/masahiro/ref/linux/scripts/checksyscalls.sh DESCEND objtool POLICY security/tomoyo/builtin-policy.h CC security/tomoyo/common.o AR security/tomoyo/built-in.a make[1]: Leaving directory '/tmp' $(srctree)/ is essential because $(wildcard ) does not follow VPATH. Fixes: f02dee2d148b ("tomoyo: Do not generate empty policy files") Signed-off-by: Masahiro Yamada Signed-off-by: Tetsuo Handa security/tomoyo/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fb3ff22ad8772bbf0e3ce1ef3eb7b09f431807f Author: Yair Podemsky Date: Wed Nov 30 14:51:21 2022 +0200 sched/core: Fix arch_scale_freq_tick() on tickless systems In order for the scheduler to be frequency invariant we measure the ratio between the maximum CPU frequency and the actual CPU frequency. During long tickless periods of time the calculations that keep track of that might overflow, in the function scale_freq_tick(): if (check_shl_overflow(acnt, 2*SCHED_CAPACITY_SHIFT, &acnt)) goto error; eventually forcing the kernel to disable the feature for all CPUs, and show the warning message: "Scheduler frequency invariance went wobbly, disabling!". Let's avoid that by limiting the frequency invariant calculations to CPUs with regular tick. Fixes: e2b0d619b400 ("x86, sched: check for counters overflow in frequency invariant accounting") Suggested-by: "Peter Zijlstra (Intel)" Signed-off-by: Yair Podemsky Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Acked-by: Giovanni Gherdovich Link: https://lore.kernel.org/r/20221130125121.34407-1-ypodemsk@redhat.com kernel/sched/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a67aad57d9aee41180aff36e54cb72fe4b8d5a5a Author: Xingui Yang Date: Wed Dec 21 01:52:03 2022 +0000 scsi: libsas: Grab the ATA port lock in sas_ata_device_link_abort() Grab the ATA port lock in sas_ata_device_link_abort() before calling ata_link_abort() as outlined in this function's locking requirements. Fixes: 44112922674b ("scsi: libsas: Add sas_ata_device_link_abort()") Signed-off-by: Xingui Yang Reviewed-by: John Garry Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_ata.c | 3 +++ 1 file changed, 3 insertions(+) commit ea44242bbfcde2993fb27ec7c3ad5ab5cc39e438 Author: Jason Yan Date: Thu Dec 15 12:09:25 2022 +0800 scsi: hisi_sas: Fix tag freeing for reserved tags The reserved tags were put in the lower region of the tagset in commit f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset"). However, only the allocate function was changed, freeing was not handled. This resulted in a failure to boot: [ 33.467345] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]! [ 33.473413] sas: Executing internal abort failed 5000000000000603 (-132) [ 33.480088] hisi_sas_v3_hw 0000:b4:02.0: I_T nexus reset: internal abort (-132) [ 33.657336] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]! [ 33.663403] ata7.00: failed to IDENTIFY (I/O error, err_mask=0x40) [ 35.787344] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]! [ 35.793411] sas: Executing internal abort failed 5000000000000703 (-132) [ 35.800084] hisi_sas_v3_hw 0000:b4:04.0: I_T nexus reset: internal abort (-132) [ 35.977335] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]! [ 35.983403] ata10.00: failed to IDENTIFY (I/O error, err_mask=0x40) [ 35.989643] ata10.00: revalidation failed (errno=-5) Fixes: f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset") Cc: John Garry Cc: Xiang Chen Signed-off-by: Jason Yan Reviewed-by: John Garry Acked-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42f229c350f57a8e825f7591e17cbc5c87e50235 Author: David Howells Date: Fri Jan 6 13:03:18 2023 +0000 rxrpc: Fix incoming call setup race An incoming call can race with rxrpc socket destruction, leading to a leaked call. This may result in an oops when the call timer eventually expires: BUG: kernel NULL pointer dereference, address: 0000000000000874 RIP: 0010:_raw_spin_lock_irqsave+0x2a/0x50 Call Trace: try_to_wake_up+0x59/0x550 ? __local_bh_enable_ip+0x37/0x80 ? rxrpc_poke_call+0x52/0x110 [rxrpc] ? rxrpc_poke_call+0x110/0x110 [rxrpc] ? rxrpc_poke_call+0x110/0x110 [rxrpc] call_timer_fn+0x24/0x120 with a warning in the kernel log looking something like: rxrpc: Call 00000000ba5e571a still in use (1,SvAwtACK,1061d,0)! incurred during rmmod of rxrpc. The 1061d is the call flags: RECVMSG_READ_ALL, RX_HEARD, BEGAN_RX_TIMER, RX_LAST, EXPOSED, IS_SERVICE, RELEASED but no DISCONNECTED flag (0x800), so it's an incoming (service) call and it's still connected. The race appears to be that: (1) rxrpc_new_incoming_call() consults the service struct, checks sk_state and allocates a call - then pauses, possibly for an interrupt. (2) rxrpc_release_sock() sets RXRPC_CLOSE, nulls the service pointer, discards the prealloc and releases all calls attached to the socket. (3) rxrpc_new_incoming_call() resumes, launching the new call, including its timer and attaching it to the socket. Fix this by read-locking local->services_lock to access the AF_RXRPC socket providing the service rather than RCU in rxrpc_new_incoming_call(). There's no real need to use RCU here as local->services_lock is only write-locked by the socket side in two places: when binding and when shutting down. Fixes: 5e6ef4f1017c ("rxrpc: Make the I/O thread take over the call and local processor work") Reported-by: Marc Dionne Signed-off-by: David Howells cc: linux-afs@lists.infradead.org net/rxrpc/af_rxrpc.c | 8 ++++---- net/rxrpc/ar-internal.h | 2 +- net/rxrpc/call_accept.c | 14 +++++++------- net/rxrpc/security.c | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) commit ae50e2ab122cef68f46b7799fb9deffe3334f5e2 Author: Takashi Iwai Date: Thu Jan 5 10:35:31 2023 +0100 ALSA: hda: cs35l41: Check runtime suspend capability at runtime_idle The runtime PM core checks with runtime_idle callback whether it can goes to the runtime suspend or not, and we can put the boost type check there instead of runtime_suspend and _resume calls. This will reduce the unnecessary runtime_suspend() calls. Fixes: 1873ebd30cc8 ("ALSA: hda: cs35l41: Support Hibernation during Suspend") Cc: Link: https://lore.kernel.org/r/20230105093531.16960-2-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 15a59cb0a3d6ddf2cb79f8dc3081b3130aad3767 Author: Takashi Iwai Date: Thu Jan 5 10:35:30 2023 +0100 ALSA: hda: cs35l41: Don't return -EINVAL from system suspend/resume The recent commit to support the system suspend for CS35L41 caused a regression on the models with CS35L41_EXT_BOOST_NO_VSPK_SWITC boost type, as the suspend/resume callbacks just return -EINVAL. This is eventually handled as a fatal error and blocks the whole system suspend/resume. For avoiding the problem, this patch corrects the return code from cs35l41_system_suspend() and _resume() to 0, and replace dev_err() with dev_err_once() for stop spamming too much. Fixes: 88672826e2a4 ("ALSA: hda: cs35l41: Support System Suspend") Cc: Link: https://lore.kernel.org/all/e6751ac2-34f3-d13f-13db-8174fade8308@pm.me Link: https://lore.kernel.org/r/20230105093531.16960-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4414c1f5c7a375eaa108676a56e12cc8234eb647 Author: Max Filippov Date: Fri Jan 6 23:30:57 2023 -0800 xtensa: drop unused members of struct thread_struct bad_vaddr, bad_uaddr and error_code fields are set but never read by the xtensa arch-specific code. Drop them. Also drop the commented out info field. Signed-off-by: Max Filippov arch/xtensa/include/asm/processor.h | 9 --------- arch/xtensa/kernel/traps.c | 2 -- arch/xtensa/mm/fault.c | 4 ---- 3 files changed, 15 deletions(-) commit b4e9b8763e417db31c7088103cc557d55cb7a8f5 Author: Angela Czubak Date: Thu Jan 5 21:31:07 2023 +0530 octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable PF netdev can request AF to enable or disable reception and transmission on assigned CGX::LMAC. The current code instead of disabling or enabling 'reception and transmission' also disables/enable the LMAC. This patch fixes this issue. Fixes: 1435f66a28b4 ("octeontx2-af: CGX Rx/Tx enable/disable mbox handlers") Signed-off-by: Angela Czubak Signed-off-by: Hariprasad Kelam Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230105160107.17638-1-hkelam@marvell.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 4 ++-- drivers/net/ethernet/marvell/octeontx2/af/cgx.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) commit 0a71553536d270e988580a3daa9fc87535908221 Merge: 1382999aa054 5193326c4c5a Author: Linus Torvalds Date: Fri Jan 6 15:54:25 2023 -0800 Merge tag 'drm-fixes-2023-01-06' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Daniel Vetter: "Still not much, but more than last week. Dave should be back next week from the beaching. drivers: - i915-gvt fixes - amdgpu/kfd fixes - panfrost bo refcounting fix - meson afbc corruption fix - imx plane width fix core: - drm/sched fixes - drm/mm kunit test fix - dma-buf export error handling fixes" * tag 'drm-fixes-2023-01-06' of git://anongit.freedesktop.org/drm/drm: Revert "drm/amd/display: Enable Freesync Video Mode by default" drm/i915/gvt: fix double free bug in split_2MB_gtt_entry drm/i915/gvt: use atomic operations to change the vGPU status drm/i915/gvt: fix vgpu debugfs clean in remove drm/i915/gvt: fix gvt debugfs destroy drm/i915: unpin on error in intel_vgpu_shadow_mm_pin() drm/amd/display: Uninitialized variables causing 4k60 UCLK to stay at DPM1 and not DPM0 drm/amdkfd: Fix kernel warning during topology setup drm/scheduler: Fix lockup in drm_sched_entity_kill() drm/imx: ipuv3-plane: Fix overlay plane width drm/scheduler: Fix lockup in drm_sched_entity_kill() drm/virtio: Fix memory leak in virtio_gpu_object_create() drm/meson: Reduce the FIFO lines held when AFBC is not used drm/tests: reduce drm_mm_test stack usage drm/panfrost: Fix GEM handle creation ref-counting drm/plane-helper: Add the missing declaration of drm_atomic_state dma-buf: fix dma_buf_export init order v2 commit 1382999aa0548a171a272ca817f6c38e797c458c Author: Jason A. Donenfeld Date: Fri Jan 6 04:01:56 2023 +0100 tpm: Allow system suspend to continue when TPM suspend fails TPM 1 is sometimes broken across system suspends, due to races or locking issues or something else that haven't been diagnosed or fixed yet, most likely having to do with concurrent reads from the TPM's hardware random number generator driver. These issues prevent the system from actually suspending, with errors like: tpm tpm0: A TPM error (28) occurred continue selftest ... tpm tpm0: A TPM error (28) occurred attempting get random ... tpm tpm0: Error (28) sending savestate before suspend tpm_tis 00:08: PM: __pnp_bus_suspend(): tpm_pm_suspend+0x0/0x80 returns 28 tpm_tis 00:08: PM: dpm_run_callback(): pnp_bus_suspend+0x0/0x10 returns 28 tpm_tis 00:08: PM: failed to suspend: error 28 PM: Some devices failed to suspend, or early wake event detected This issue was partially fixed by 23393c646142 ("char: tpm: Protect tpm_pm_suspend with locks"), in a last minute 6.1 commit that Linus took directly because the TPM maintainers weren't available. However, it seems like this just addresses the most common cases of the bug, rather than addressing it entirely. So there are more things to fix still, apparently. In lieu of actually fixing the underlying bug, just allow system suspend to continue, so that laptops still go to sleep fine. Later, this can be reverted when the real bug is fixed. Link: https://lore.kernel.org/lkml/7cbe96cf-e0b5-ba63-d1b4-f63d2e826efa@suse.cz/ Cc: stable@vger.kernel.org # 6.1+ Reported-by: Vlastimil Babka Suggested-by: Linus Torvalds Acked-by: Luigi Semenzato Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: James Bottomley Cc: Johannes Altmanninger Signed-off-by: Jason A. Donenfeld Signed-off-by: Linus Torvalds drivers/char/tpm/tpm-interface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cb7a95af78d29442b8294683eca4897544b8ef46 Author: Linus Torvalds Date: Wed Jan 4 11:06:28 2023 -0800 hfs/hfsplus: avoid WARN_ON() for sanity check, use proper error handling Commit 55d1cbbbb29e ("hfs/hfsplus: use WARN_ON for sanity check") fixed a build warning by turning a comment into a WARN_ON(), but it turns out that syzbot then complains because it can trigger said warning with a corrupted hfs image. The warning actually does warn about a bad situation, but we are much better off just handling it as the error it is. So rather than warn about us doing bad things, stop doing the bad things and return -EIO. While at it, also fix a memory leak that was introduced by an earlier fix for a similar syzbot warning situation, and add a check for one case that historically wasn't handled at all (ie neither comment nor subsequent WARN_ON). Reported-by: syzbot+7bb7cd3595533513a9e7@syzkaller.appspotmail.com Fixes: 55d1cbbbb29e ("hfs/hfsplus: use WARN_ON for sanity check") Fixes: 8d824e69d9f3 ("hfs: fix OOB Read in __hfs_brec_find") Link: https://lore.kernel.org/lkml/000000000000dbce4e05f170f289@google.com/ Tested-by: Michael Schmitz Cc: Arnd Bergmann Cc: Matthew Wilcox Cc: Viacheslav Dubeyko Signed-off-by: Linus Torvalds fs/hfs/inode.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit a3d81bc1eaef48e34dd0b9b48eefed9e02a06451 Author: Hao Sun Date: Fri Jan 6 16:48:38 2023 +0800 bpf: Skip task with pid=1 in send_signal_common() The following kernel panic can be triggered when a task with pid=1 attaches a prog that attempts to send killing signal to itself, also see [1] for more details: Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b CPU: 3 PID: 1 Comm: systemd Not tainted 6.1.0-09652-g59fe41b5255f #148 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x100/0x178 lib/dump_stack.c:106 panic+0x2c4/0x60f kernel/panic.c:275 do_exit.cold+0x63/0xe4 kernel/exit.c:789 do_group_exit+0xd4/0x2a0 kernel/exit.c:950 get_signal+0x2460/0x2600 kernel/signal.c:2858 arch_do_signal_or_restart+0x78/0x5d0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x15f/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+0x44/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd So skip task with pid=1 in bpf_send_signal_common() to avoid the panic. [1] https://lore.kernel.org/bpf/20221222043507.33037-1-sunhao.th@gmail.com Signed-off-by: Hao Sun Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20230106084838.12690-1-sunhao.th@gmail.com kernel/trace/bpf_trace.c | 3 +++ 1 file changed, 3 insertions(+) commit a689b938df39ab513026c53fb7011fd7cd594943 Merge: ef1a4a770994 b2b50d572135 Author: Linus Torvalds Date: Fri Jan 6 13:12:42 2023 -0800 Merge tag 'block-2023-01-06' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "The big change here is obviously the revert of the pktcdvd driver removal. Outside of that, just minor tweaks. In detail: - Re-instate the pktcdvd driver, which necessitates adding back bio_copy_data_iter() and the fops->devnode() hook for now (me) - Fix for splitting of a bio marked as NOWAIT, causing either nowait reads or writes to error with EAGAIN even if parts of the IO completed (me) - Fix for ublk, punting management commands to io-wq as they can all easily block for extended periods of time (Ming) - Removal of SRCU dependency for the block layer (Paul)" * tag 'block-2023-01-06' of git://git.kernel.dk/linux: block: Remove "select SRCU" Revert "pktcdvd: remove driver." Revert "block: remove devnode callback from struct block_device_operations" Revert "block: bio_copy_data_iter" ublk: honor IO_URING_F_NONBLOCK for handling control command block: don't allow splitting of a REQ_NOWAIT bio block: handle bio_split_to_limits() NULL return commit ef1a4a770994b97a86988fd86f5a2784b87449f7 Merge: 93387d499e49 12521a5d5cb7 Author: Linus Torvalds Date: Fri Jan 6 13:05:13 2023 -0800 Merge tag 'io_uring-2023-01-06' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "A few minor fixes that should go into the 6.2 release: - Fix for a memory leak in io-wq worker creation, if we ultimately end up canceling the worker creation before it gets created (me) - lockdep annotations for the CQ locking (Pavel) - A regression fix for CQ timeout handling (Pavel) - Ring pinning around deferred task_work fix (Pavel) - A trivial member move in struct io_ring_ctx, saving us some memory (me)" * tag 'io_uring-2023-01-06' of git://git.kernel.dk/linux: io_uring: fix CQ waiting timeout handling io_uring: move 'poll_multi_queue' bool in io_ring_ctx io_uring: lockdep annotate CQ locking io_uring: pin context while queueing deferred tw io_uring/io-wq: free worker if task_work creation is canceled commit 93387d499e49429eef2c343ab6f9f5d92ec780a2 Merge: 5c1a712f7128 191f8453fc99 Author: Linus Torvalds Date: Fri Jan 6 12:54:51 2023 -0800 Merge tag 'tif-notify-signal-2023-01-06' of git://git.kernel.dk/linux Pull arm TIF_NOTIFY_SIGNAL fixup from Jens Axboe: "Hui Tang reported a performance regressions with _TIF_WORK_MASK in newer kernels, which he tracked to a change that went into 5.11. After this change, we'll call do_work_pending() more often than we need to, because we're now testing bits 0..15 rather than just 0..7. Shuffle the bits around to avoid this" * tag 'tif-notify-signal-2023-01-06' of git://git.kernel.dk/linux: ARM: renumber bits related to _TIF_WORK_MASK commit 5c1a712f71286b8435d48e3be5f8faf39a4cc837 Merge: 7b8c854cfe8c 8e1858710d9a Author: Linus Torvalds Date: Fri Jan 6 12:11:41 2023 -0800 Merge tag 'ceph-for-6.2-rc3' of https://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "Two file locking fixes from Xiubo" * tag 'ceph-for-6.2-rc3' of https://github.com/ceph/ceph-client: ceph: avoid use-after-free in ceph_fl_release_lock() ceph: switch to vfs_inode_has_locks() to fix file lock bug commit 7b8c854cfe8c94b2ec382a3632b1bd7c970c80b4 Merge: fc7b76c4a4d1 23970a1c9475 Author: Linus Torvalds Date: Fri Jan 6 12:07:00 2023 -0800 Merge tag 'fixes_for_v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull UDF fixes from Jan Kara: "Two fixups of the UDF changes that went into 6.2-rc1" * tag 'fixes_for_v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: initialize newblock to 0 udf: Fix extension of the last extent in the file commit 31abfdda65279a860b10a98038135501e4fc00a1 Author: Jonathan Corbet Date: Wed Jan 4 13:59:16 2023 -0700 docs: Deprecate use of Sphinx < 2.4.x The Sphinx 2.4 release is three years old, and it is becoming increasingly difficult to even find a system with an sufficiently archaic Python installation that can run versions older than that. I can no longer test changes against anything prior to 2.4.x. Move toward raising our minimum Sphinx requirement to 2.4.x so we can delete some older support code and claim to support a range of versions that we can actually test. In the absence of screams, the actual removal of support can happen later in 2023. Signed-off-by: Jonathan Corbet Documentation/conf.py | 6 ++++++ 1 file changed, 6 insertions(+) commit 0283189e8f3d0917e2ac399688df85211f48447b Author: Jonathan Corbet Date: Wed Jan 4 10:47:39 2023 -0700 docs: Fix the docs build with Sphinx 6.0 Sphinx 6.0 removed the execfile_() function, which we use as part of the configuration process. They *did* warn us... Just open-code the functionality as is done in Sphinx itself. Tested (using SPHINX_CONF, since this code is only executed with an alternative config file) on various Sphinx versions from 2.5 through 6.0. Reported-by: Martin Liška Cc: stable@vger.kernel.org Signed-off-by: Jonathan Corbet Documentation/sphinx/load_config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fc7b76c4a4d139ebcae2af3bd75215fc90834e3b Merge: a389e54642a8 2ba48b20049b Author: Linus Torvalds Date: Fri Jan 6 12:01:49 2023 -0800 Merge tag 'for-6.2-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more regression and regular fixes: - regressions: - fix assertion condition using = instead of == - fix false alert on bad tree level check - fix off-by-one error in delalloc search during lseek - fix compat ro feature check at read-write remount - handle case when read-repair happens with ongoing device replace - updated error messages" * tag 'for-6.2-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix compat_ro checks against remount btrfs: always report error in run_one_delayed_ref() btrfs: handle case when repair happens with dev-replace btrfs: fix off-by-one in delalloc search during lseek btrfs: fix false alert on bad tree level check btrfs: add error message for metadata level mismatch btrfs: fix ASSERT em->len condition in btrfs_get_extent commit a389e54642a86c91d683b2f0b248f1d2f4e52611 Merge: 56f814583923 b9b916aee671 Author: Linus Torvalds Date: Fri Jan 6 11:33:42 2023 -0800 Merge tag 'riscv-for-linus-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - use the correct mask for c.jr/c.jalr when decoding instructions - build fix for get_user() to avoid a sparse warning * tag 'riscv-for-linus-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: uaccess: fix type of 0 variable on error in get_user() riscv, kprobes: Stricter c.jr/c.jalr decoding commit 56f814583923a782f1cec43db32bc6da1d3cf7b5 Merge: d7a0853d650b 481028dbf1da Author: Linus Torvalds Date: Fri Jan 6 11:23:58 2023 -0800 Merge tag 'perf-tools-fixes-for-v6.2-1-2023-01-06' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix segfault when trying to process tracepoints present in a perf.data file and not linked with libtraceevent. - Fix build on uClibc systems by adding missing sys/types.h include, that was being obtained indirectly which stopped being the case when tools/lib/traceevent was removed. - Don't show commands in 'perf help' that depend on linking with libtraceevent when not building with that library, which is now a possibility since we no longer ship a copy in tools/lib/traceevent. - Fix failure in 'perf test' entry testing the combination of 'perf probe' user space function + 'perf record' + 'perf script' where it expects a backtrace leading to glibc's inet_pton() from 'ping' that now happens more than once with glibc 2.35 for IPv6 addreses. - Fix for the inet_pton perf test on s/390 where 'text_to_binary_address' now appears on the backtrace. - Fix build error on riscv due to missing header for 'struct perf_sample'. - Fix 'make -C tools perf_install' install variant by not propagating the 'subdir' to submakes for the 'install_headers' targets. - Fix handling of unsupported cgroup events when using BPF counters in 'perf stat'. - Count all cgroups, not just the last one when using 'perf stat' and combining --for-each-cgroup with --bpf-counters. This makes the output using BPF counters match the output without using it, which was the intention all along, the output should be the same using --bpf-counters or not. - Fix 'perf lock contention' core dump related to not finding the "__sched_text_end" symbol on s/390. - Fix build failure when HEAD is signed: exclude the signature from the version string. - Add missing closedir() calls to in perf_data__open_dir(), plugging a fd leak. * tag 'perf-tools-fixes-for-v6.2-1-2023-01-06' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf tools: Fix build on uClibc systems by adding missing sys/types.h include perf stat: Fix handling of --for-each-cgroup with --bpf-counters to match non BPF mode perf stat: Fix handling of unsupported cgroup events when using BPF counters perf test record_probe_libc_inet_pton: Fix test on s/390 where 'text_to_binary_address' now appears on the backtrace perf lock contention: Fix core dump related to not finding the "__sched_text_end" symbol on s/390 perf build: Don't propagate subdir to submakes for install_headers perf test record_probe_libc_inet_pton: Fix failure due to extra inet_pton() backtrace in glibc >= 2.35 perf tools: Fix segfault when trying to process tracepoints in perf.data and not linked with libtraceevent perf tools: Don't include signature in version strings perf help: Use HAVE_LIBTRACEEVENT to filter out unsupported commands perf tools riscv: Fix build error on riscv due to missing header for 'struct perf_sample' perf tools: Fix resources leak in perf_data__open_dir() commit d7a0853d650b381921732ff5bca618432a279033 Merge: 90bc52c525fd 57512b57dcfa Author: Linus Torvalds Date: Fri Jan 6 11:20:12 2023 -0800 Merge tag 'perf-urgent-2023-01-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Ingo Molnar: "Intel RAPL updates for new model IDs" * tag 'perf-urgent-2023-01-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/rapl: Add support for Intel Emerald Rapids perf/x86/rapl: Add support for Intel Meteor Lake perf/x86/rapl: Treat Tigerlake like Icelake commit 90bc52c525fdac4ed8cbf13c08c813ec2a4fc856 Merge: 1f5abbd77e2c 736f88689c69 Author: Linus Torvalds Date: Fri Jan 6 11:14:11 2023 -0800 Merge tag 'v6.2-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes a CFI crash in arm64/sm4 as well as a regression in the caam driver" * tag 'v6.2-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: arm64/sm4 - fix possible crash with CFI enabled crypto: caam - fix CAAM io mem access in blob_gen commit 6710e07f01b54b2d93e81cfe1c207d39d4fdb9a8 Merge: b9b916aee671 a943385aa801 Author: Palmer Dabbelt Date: Fri Jan 6 10:31:12 2023 -0800 Merge patch series "riscv,isa fixups" Conor Dooley says: From: Conor Dooley I noticed ~today~ while looking at the isa manual that I had not accounted for another couple of edge cases with my regex. As before, I think attempting to validate the canonical order for multiletter stuff makes no sense - but we should totally try to avoid false-positives for combinations that are known to be valid. * b4-shazam-merge: dt-bindings: riscv: fix single letter canonical order dt-bindings: riscv: fix underscore requirement for multi-letter extensions Link: https://lore.kernel.org/r/20221205174459.60195-1-conor@kernel.org Signed-off-by: Palmer Dabbelt commit a943385aa80151c6b2611d3a1cf8338af2b257a1 Author: Conor Dooley Date: Mon Dec 5 17:45:00 2022 +0000 dt-bindings: riscv: fix single letter canonical order I used the wikipedia table for ordering extensions when updating the pattern here in commit 299824e68bd0 ("dt-bindings: riscv: add new riscv,isa strings for emulators"). Unfortunately that table did not match canonical order, as defined by the RISC-V ISA Manual, which defines extension ordering in (what is currently) Table 41, "Standard ISA extension names". Fix things up by re-sorting v (vector) and adding p (packed-simd) & j (dynamic languages). The e (reduced integer) and g (general) extensions are still intentionally left out. Link: https://github.com/riscv/riscv-isa-manual/releases/tag/riscv-unpriv-pdf-from-asciidoc-15112022 # Chapter 29.5 Fixes: 299824e68bd0 ("dt-bindings: riscv: add new riscv,isa strings for emulators") Acked-by: Guo Ren Reviewed-by: Heiko Stuebner Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Signed-off-by: Conor Dooley Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221205174459.60195-3-conor@kernel.org Signed-off-by: Palmer Dabbelt Documentation/devicetree/bindings/riscv/cpus.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec64efc4966edf19fa1bc398a26bddfbadc1605f Author: Conor Dooley Date: Mon Dec 5 17:44:59 2022 +0000 dt-bindings: riscv: fix underscore requirement for multi-letter extensions The RISC-V ISA Manual allows the first multi-letter extension to avoid a leading underscore. Underscores are only required between multi-letter extensions. The dt-binding does not validate that a multi-letter extension is canonically ordered, as that'd need an even worse regex than is here, but it should not fail validation for valid ISA strings. Allow the first multi-letter extension to appear immediately after the single-letter extensions. Link: https://github.com/riscv/riscv-isa-manual/releases/tag/riscv-unpriv-pdf-from-asciidoc-15112022 # Chapter 29.5 Fixes: 299824e68bd0 ("dt-bindings: riscv: add new riscv,isa strings for emulators") Acked-by: Guo Ren Signed-off-by: Conor Dooley Acked-by: Rob Herring Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221205174459.60195-2-conor@kernel.org Signed-off-by: Palmer Dabbelt Documentation/devicetree/bindings/riscv/cpus.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7827c81f0248e3c2f40d438b020f3d222f002171 Author: Chuck Lever Date: Fri Jan 6 12:43:37 2023 -0500 Revert "SUNRPC: Use RMW bitops in single-threaded hot paths" The premise that "Once an svc thread is scheduled and executing an RPC, no other processes will touch svc_rqst::rq_flags" is false. svc_xprt_enqueue() examines the RQ_BUSY flag in scheduled nfsd threads when determining which thread to wake up next. Found via KCSAN. Fixes: 28df0988815f ("SUNRPC: Use RMW bitops in single-threaded hot paths") Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 7 +++---- fs/nfsd/nfs4xdr.c | 2 +- net/sunrpc/auth_gss/svcauth_gss.c | 4 ++-- net/sunrpc/svc.c | 6 +++--- net/sunrpc/svc_xprt.c | 2 +- net/sunrpc/svcsock.c | 8 ++++---- net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 +- 7 files changed, 15 insertions(+), 16 deletions(-) commit 0b3a551fa58b4da941efeb209b3770868e2eddd7 Author: Jeff Layton Date: Thu Jan 5 14:55:56 2023 -0500 nfsd: fix handling of cached open files in nfsd4_open codepath Commit fb70bf124b05 ("NFSD: Instantiate a struct file when creating a regular NFSv4 file") added the ability to cache an open fd over a compound. There are a couple of problems with the way this currently works: It's racy, as a newly-created nfsd_file can end up with its PENDING bit cleared while the nf is hashed, and the nf_file pointer is still zeroed out. Other tasks can find it in this state and they expect to see a valid nf_file, and can oops if nf_file is NULL. Also, there is no guarantee that we'll end up creating a new nfsd_file if one is already in the hash. If an extant entry is in the hash with a valid nf_file, nfs4_get_vfs_file will clobber its nf_file pointer with the value of op_file and the old nf_file will leak. Fix both issues by making a new nfsd_file_acquirei_opened variant that takes an optional file pointer. If one is present when this is called, we'll take a new reference to it instead of trying to open the file. If the nfsd_file already has a valid nf_file, we'll just ignore the optional file and pass the nfsd_file back as-is. Also rework the tracepoints a bit to allow for an "opened" variant and don't try to avoid counting acquisitions in the case where we already have a cached open file. Fixes: fb70bf124b05 ("NFSD: Instantiate a struct file when creating a regular NFSv4 file") Cc: Trond Myklebust Reported-by: Stanislav Saner Reported-and-Tested-by: Ruben Vestergaard Reported-and-Tested-by: Torkil Svensgaard Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 40 ++++++++++++++++++++++------------------ fs/nfsd/filecache.h | 5 +++-- fs/nfsd/nfs4state.c | 16 ++++------------ fs/nfsd/trace.h | 52 +++++++++++++--------------------------------------- 4 files changed, 42 insertions(+), 71 deletions(-) commit 599d41fb8ea8bd2a99ca9525dd69405020e43dda Author: Stephan Gerhold Date: Thu Dec 29 16:16:48 2022 +0100 soc: qcom: apr: Make qcom,protection-domain optional again APR should not fail if the service device tree node does not have the qcom,protection-domain property, since this functionality does not exist on older platforms such as MSM8916 and MSM8996. Ignore -EINVAL (returned when the property does not exist) to fix a regression on 6.2-rc1 that prevents audio from working: qcom,apr remoteproc0:smd-edge.apr_audio_svc.-1.-1: Failed to read second value of qcom,protection-domain qcom,apr remoteproc0:smd-edge.apr_audio_svc.-1.-1: Failed to add apr 3 svc Fixes: 6d7860f5750d ("soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index") Signed-off-by: Stephan Gerhold Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229151648.19839-3-stephan@gerhold.net drivers/soc/qcom/apr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 26658868354963afbff672ad6f7a85c44c311975 Author: Stephan Gerhold Date: Thu Dec 29 16:16:47 2022 +0100 dt-bindings: soc: qcom: apr: Make qcom,protection-domain optional again The protection domain functionality exists only in SoCs starting from MSM8998 [1], while the APR bindings are also used on older platforms. Commit 41288c305836 ("ASoC: dt-bindings: qcom,apr: Split services to shared schema") made the "qcom,protection-domain" required but it should remain optional to avoid dtbs_check warnings on older platforms, e.g.: arch/arm64/boot/dts/qcom/apq8096-db820c.dtb: apr: service@3: 'qcom,protection-domain' is a required property From schema: Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml [1]: https://lore.kernel.org/all/20200312120842.21991-1-sibis@codeaurora.org/ Fixes: 41288c305836 ("ASoC: dt-bindings: qcom,apr: Split services to shared schema") Signed-off-by: Stephan Gerhold Reviewed-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229151648.19839-2-stephan@gerhold.net Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d3178e8a434b58678d99257c0387810a24042fb6 Author: Hao Sun Date: Wed Jan 4 09:47:09 2023 +0800 bpf: Skip invalid kfunc call in backtrack_insn The verifier skips invalid kfunc call in check_kfunc_call(), which would be captured in fixup_kfunc_call() if such insn is not eliminated by dead code elimination. However, this can lead to the following warning in backtrack_insn(), also see [1]: ------------[ cut here ]------------ verifier backtracking bug WARNING: CPU: 6 PID: 8646 at kernel/bpf/verifier.c:2756 backtrack_insn kernel/bpf/verifier.c:2756 __mark_chain_precision kernel/bpf/verifier.c:3065 mark_chain_precision kernel/bpf/verifier.c:3165 adjust_reg_min_max_vals kernel/bpf/verifier.c:10715 check_alu_op kernel/bpf/verifier.c:10928 do_check kernel/bpf/verifier.c:13821 [inline] do_check_common kernel/bpf/verifier.c:16289 [...] So make backtracking conservative with this by returning ENOTSUPP. [1] https://lore.kernel.org/bpf/CACkBjsaXNceR8ZjkLG=dT3P=4A8SBsg0Z5h5PWLryF5=ghKq=g@mail.gmail.com/ Reported-by: syzbot+4da3ff23081bafe74fc2@syzkaller.appspotmail.com Signed-off-by: Hao Sun Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20230104014709.9375-1-sunhao.th@gmail.com kernel/bpf/verifier.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5db568e748f6fb7d0d2e1bff4c2698ad4f50b982 Author: Anshuman Khandual Date: Mon Jan 2 11:46:51 2023 +0530 arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption If a Cortex-A715 cpu sees a page mapping permissions change from executable to non-executable, it may corrupt the ESR_ELx and FAR_ELx registers, on the next instruction abort caused by permission fault. Only user-space does executable to non-executable permission transition via mprotect() system call which calls ptep_modify_prot_start() and ptep_modify _prot_commit() helpers, while changing the page mapping. The platform code can override these helpers via __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION. Work around the problem via doing a break-before-make TLB invalidation, for all executable user space mappings, that go through mprotect() system call. This overrides ptep_modify_prot_start() and ptep_modify_prot_commit(), via defining HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION on the platform thus giving an opportunity to intercept user space exec mappings, and do the necessary TLB invalidation. Similar interceptions are also implemented for HugeTLB. Cc: Catalin Marinas Cc: Will Deacon Cc: Jonathan Corbet Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Catalin Marinas Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/20230102061651.34745-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.rst | 2 ++ arch/arm64/Kconfig | 16 ++++++++++++++++ arch/arm64/include/asm/hugetlb.h | 9 +++++++++ arch/arm64/include/asm/pgtable.h | 9 +++++++++ arch/arm64/kernel/cpu_errata.c | 7 +++++++ arch/arm64/mm/hugetlbpage.c | 21 +++++++++++++++++++++ arch/arm64/mm/mmu.c | 21 +++++++++++++++++++++ arch/arm64/tools/cpucaps | 1 + 8 files changed, 86 insertions(+) commit cef139299fd86098c6e3dbd389d1d0b2462d7710 Author: Marc Zyngier Date: Thu Jan 5 09:08:34 2023 +0000 firmware/psci: Don't register with debugfs if PSCI isn't available Contrary to popular belief, PSCI is not a universal property of an ARM/arm64 system. There is a garden variety of systems out there that don't (or even cannot) implement it. I'm the first one deplore such a situation, but hey... On such systems, a "cat /sys/kernel/debug/psci" results in fireworks, as no invocation callback is registered. Check for the invoke_psci_fn and psci_ops.get_version pointers before registering with the debugfs subsystem, avoiding the issue altogether. Fixes: 3137f2e60098 ("firmware/psci: Add debugfs support to ease debugging") Reported-by: Hector Martin Signed-off-by: Marc Zyngier Cc: Dmitry Baryshkov Cc: Mark Brown Cc: Ulf Hansson Cc: Arnd Bergmann Cc: Mark Rutland Cc: Lorenzo Pieralisi Reviewed-by: Hector Martin Acked-by: Dmitry Baryshkov Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20230105090834.630238-1-maz@kernel.org Signed-off-by: Will Deacon drivers/firmware/psci/psci.c | 3 +++ 1 file changed, 3 insertions(+) commit f3dc61cde80d48751999c4cb46daf3b2185e6895 Author: Will Deacon Date: Fri Nov 25 10:18:26 2022 +0000 firmware/psci: Fix MEM_PROTECT_RANGE function numbers PSCI v1.1 offers 32-bit and 64-bit variants of the MEM_PROTECT_RANGE call using function identifier 20. Fix the incorrect definitions of the MEM_PROTECT_CHECK_RANGE calls in the PSCI UAPI header. Cc: Dmitry Baryshkov Cc: Lorenzo Pieralisi Cc: Arnd Bergmann Fixes: 3137f2e60098 ("firmware/psci: Add debugfs support to ease debugging") Acked-by: Marc Zyngier Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20221125101826.22404-1-will@kernel.org Signed-off-by: Will Deacon include/uapi/linux/psci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a494398bde273143c2352dd373cad8211f7d94b2 Author: Masahiro Yamada Date: Thu Jan 5 12:13:06 2023 +0900 s390: define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36 Nathan Chancellor reports that the s390 vmlinux fails to link with GNU ld < 2.36 since commit 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv"). It happens for defconfig, or more specifically for CONFIG_EXPOLINE=y. $ s390x-linux-gnu-ld --version | head -n1 GNU ld (GNU Binutils for Debian) 2.35.2 $ make -s ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- allnoconfig $ ./scripts/config -e CONFIG_EXPOLINE $ make -s ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- olddefconfig $ make -s ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- `.exit.text' referenced in section `.s390_return_reg' of drivers/base/dd.o: defined in discarded section `.exit.text' of drivers/base/dd.o make[1]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1 make: *** [Makefile:1252: vmlinux] Error 2 arch/s390/kernel/vmlinux.lds.S wants to keep EXIT_TEXT: .exit.text : { EXIT_TEXT } But, at the same time, EXIT_TEXT is thrown away by DISCARD because s390 does not define RUNTIME_DISCARD_EXIT. I still do not understand why the latter wins after 99cb0d917ffa, but defining RUNTIME_DISCARD_EXIT seems correct because the comment line in arch/s390/kernel/vmlinux.lds.S says: /* * .exit.text is discarded at runtime, not link time, * to deal with references from __bug_table */ Nathan also found that binutils commit 21401fc7bf67 ("Duplicate output sections in scripts") cured this issue, so we cannot reproduce it with binutils 2.36+, but it is better to not rely on it. Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Link: https://lore.kernel.org/all/Y7Jal56f6UBh1abE@dev-arch.thelio-3990X/ Reported-by: Nathan Chancellor Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20230105031306.1455409-1-masahiroy@kernel.org Signed-off-by: Heiko Carstens arch/s390/kernel/vmlinux.lds.S | 2 ++ 1 file changed, 2 insertions(+) commit 45d619bdaf799196d702a9ae464b07066d6db2f9 Author: Alexander Gordeev Date: Wed Dec 7 17:15:19 2022 +0100 s390: expicitly align _edata and _end symbols on page boundary Symbols _edata and _end in the linker script are the only unaligned expicitly on page boundary. Although _end is aligned implicitly by BSS_SECTION macro that is still inconsistent and could lead to a bug if a tool or function would assume that _edata is as aligned as others. For example, vmem_map_init() function does not align symbols _etext, _einittext etc. Should these symbols be unaligned as well, the size of ranges to update were short on one page. Instead of fixing every occurrence of this kind in the code and external tools just force the alignment on these two symbols. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens arch/s390/kernel/vmlinux.lds.S | 2 ++ 1 file changed, 2 insertions(+) commit 0d4d52361b6c29bf771acd4fa461f06d78fb2fac Author: Niklas Schnelle Date: Tue Jan 3 15:11:07 2023 +0100 s390/debug: add _ASM_S390_ prefix to header guard Using DEBUG_H without a prefix is very generic and inconsistent with other header guards in arch/s390/include/asm. In fact it collides with the same name in the ath9k wireless driver though that depends on !S390 via disabled wireless support. Let's just use a consistent header guard name and prevent possible future trouble. Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens arch/s390/include/asm/debug.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c4e3ef5685393c5051b52cf1e94b8891d49793ab Author: Thinh Nguyen Date: Thu Dec 8 16:50:35 2022 -0800 usb: dwc3: gadget: Ignore End Transfer delay on teardown If we delay sending End Transfer for Setup TRB to be prepared, we need to check if the End Transfer was in preparation for a driver teardown/soft-disconnect. In those cases, just send the End Transfer command without delay. In the case of soft-disconnect, there's a very small chance the command may not go through immediately. But should it happen, the Setup TRB will be prepared during the polling of the controller halted state, allowing the command to go through then. In the case of disabling endpoint due to reconfiguration (e.g. set_interface(alt-setting) or usb reset), then it's driven by the host. Typically the host wouldn't immediately cancel the control request and send another control transfer to trigger the End Transfer command timeout. Fixes: 4db0fbb60136 ("usb: dwc3: gadget: Don't delay End Transfer on delayed_status") Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/f1617a323e190b9cc408fb8b65456e32b5814113.1670546756.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/gadget.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e498a04443240c15c3c857165f7b652b87f4fd96 Author: Arnd Bergmann Date: Tue Jan 3 13:17:46 2023 +0100 usb: dwc3: xilinx: include linux/gpio/consumer.h The newly added gpio consumer calls cause a build failure in configurations that fail to include the right header implicitly: drivers/usb/dwc3/dwc3-xilinx.c: In function 'dwc3_xlnx_init_zynqmp': drivers/usb/dwc3/dwc3-xilinx.c:207:22: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_clk_get_optional'? [-Werror=implicit-function-declaration] 207 | reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); | ^~~~~~~~~~~~~~~~~~~~~~~ | devm_clk_get_optional Fixes: ca05b38252d7 ("usb: dwc3: xilinx: Add gpio-reset support") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230103121755.956027-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-xilinx.c | 1 + 1 file changed, 1 insertion(+) commit 2a33ad4a0ba5a527b92aeef9a313aefec197fe28 Author: Basavaraj Natikar Date: Mon Jan 2 22:00:42 2023 +0530 HID: amd_sfh: Fix warning unwind goto Return directly instead of using existing goto will not cleanup previously allocated resources. Hence replace return with goto to fix warning unwind goto which cleanups previously allocated resources. Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina drivers/hid/amd-sfh-hid/amd_sfh_client.c | 2 +- drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 23970a1c9475b305770fd37bebfec7a10f263787 Author: Tom Rix Date: Fri Dec 30 12:53:41 2022 -0500 udf: initialize newblock to 0 The clang build reports this error fs/udf/inode.c:805:6: error: variable 'newblock' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (*err < 0) ^~~~~~~~ newblock is never set before error handling jump. Initialize newblock to 0 and remove redundant settings. Fixes: d8b39db5fab8 ("udf: Handle error when adding extent to a file") Reported-by: Nathan Chancellor Signed-off-by: Tom Rix Signed-off-by: Jan Kara Message-Id: <20221230175341.1629734-1-trix@redhat.com> fs/udf/inode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 83c7423d1eb6806d13c521d1002cc1a012111719 Author: Jan Kara Date: Wed Dec 21 17:45:51 2022 +0100 udf: Fix extension of the last extent in the file When extending the last extent in the file within the last block, we wrongly computed the length of the last extent. This is mostly a cosmetical problem since the extent does not contain any data and the length will be fixed up by following operations but still. Fixes: 1f3868f06855 ("udf: Fix extending file within last block") Signed-off-by: Jan Kara fs/udf/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c244c092f1ed2acfb5af3d3da81e22367d3dd733 Author: Tung Nguyen Date: Thu Jan 5 06:02:51 2023 +0000 tipc: fix unexpected link reset due to discovery messages This unexpected behavior is observed: node 1 | node 2 ------ | ------ link is established | link is established reboot | link is reset up | send discovery message receive discovery message | link is established | link is established send discovery message | | receive discovery message | link is reset (unexpected) | send reset message link is reset | It is due to delayed re-discovery as described in function tipc_node_check_dest(): "this link endpoint has already reset and re-established contact with the peer, before receiving a discovery message from that node." However, commit 598411d70f85 has changed the condition for calling tipc_node_link_down() which was the acceptance of new media address. This commit fixes this by restoring the old and correct behavior. Fixes: 598411d70f85 ("tipc: make resetting of links non-atomic") Acked-by: Jon Maloy Signed-off-by: Tung Nguyen Signed-off-by: David S. Miller net/tipc/node.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 9d35d880e0e4a3ab32d8c12f9e4d76198aadd42d Author: David Howells Date: Wed Oct 19 09:45:43 2022 +0100 rxrpc: Move client call connection to the I/O thread Move the connection setup of client calls to the I/O thread so that a whole load of locking and barrierage can be eliminated. This necessitates the app thread waiting for connection to complete before it can begin encrypting data. This also completes the fix for a race that exists between call connection and call disconnection whereby the data transmission code adds the call to the peer error distribution list after the call has been disconnected (say by the rxrpc socket getting closed). The fix is to complete the process of moving call connection, data transmission and call disconnection into the I/O thread and thus forcibly serialising them. Note that the issue may predate the overhaul to an I/O thread model that were included in the merge window for v6.2, but the timing is very much changed by the change given below. Fixes: cf37b5987508 ("rxrpc: Move DATA transmission into call processor work item") Reported-by: syzbot+c22650d2844392afdcfd@syzkaller.appspotmail.com Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 5 +- net/rxrpc/ar-internal.h | 22 +- net/rxrpc/call_object.c | 58 +++-- net/rxrpc/call_state.c | 2 +- net/rxrpc/conn_client.c | 533 ++++++++++--------------------------------- net/rxrpc/conn_event.c | 49 +--- net/rxrpc/conn_object.c | 19 +- net/rxrpc/conn_service.c | 1 - net/rxrpc/io_thread.c | 13 +- net/rxrpc/local_object.c | 6 +- net/rxrpc/proc.c | 1 + net/rxrpc/rxkad.c | 21 +- net/rxrpc/security.c | 33 ++- net/rxrpc/sendmsg.c | 64 ++++++ 14 files changed, 297 insertions(+), 530 deletions(-) commit 0d6bf319bc5aba4535bb46e1b607973688a2248a Author: David Howells Date: Wed Nov 2 16:46:13 2022 +0000 rxrpc: Move the client conn cache management to the I/O thread Move the management of the client connection cache to the I/O thread rather than managing it from the namespace as an aggregate across all the local endpoints within the namespace. This will allow a load of locking to be got rid of in a future patch as only the I/O thread will be looking at the this. The downside is that the total number of cached connections on the system can get higher because the limit is now per-local rather than per-netns. We can, however, keep the number of client conns in use across the entire netfs and use that to reduce the expiration time of idle connection. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 17 ++++----- net/rxrpc/conn_client.c | 92 +++++++++++++++++------------------------------- net/rxrpc/conn_object.c | 1 - net/rxrpc/io_thread.c | 4 +++ net/rxrpc/local_object.c | 17 +++++++++ net/rxrpc/net_ns.c | 17 --------- 6 files changed, 62 insertions(+), 86 deletions(-) commit 96b4059f43ce69e9c590f77d6ce3e99888d5cfe6 Author: David Howells Date: Thu Oct 27 11:25:55 2022 +0100 rxrpc: Remove call->state_lock All the setters of call->state are now in the I/O thread and thus the state lock is now unnecessary. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 33 +++++++++++------ net/rxrpc/call_accept.c | 2 +- net/rxrpc/call_event.c | 42 +++++++++------------- net/rxrpc/call_object.c | 30 ++++++++-------- net/rxrpc/call_state.c | 87 +++++++++++++++++--------------------------- net/rxrpc/conn_client.c | 10 +++--- net/rxrpc/conn_event.c | 11 ++---- net/rxrpc/input.c | 96 +++++++++++++++++++++---------------------------- net/rxrpc/output.c | 4 +-- net/rxrpc/proc.c | 6 ++-- net/rxrpc/rxkad.c | 2 +- net/rxrpc/sendmsg.c | 3 -- 12 files changed, 142 insertions(+), 184 deletions(-) commit 93368b6bd58ac49d804fdc9ab041a6dc89ebf1cc Author: David Howells Date: Wed Oct 26 23:43:00 2022 +0100 rxrpc: Move call state changes from recvmsg to I/O thread Move the call state changes that are made in rxrpc_recvmsg() to the I/O thread. This means that, thenceforth, only the I/O thread does this and the call state lock can be removed. This requires the Rx phase to be ended when the last packet is received, not when it is processed. Since this now changes the rxrpc call state to SUCCEEDED before we've consumed all the data from it, rxrpc_kernel_check_life() mustn't say the call is dead until the recvmsg queue is empty (unless the call has failed). Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org fs/afs/rxrpc.c | 1 + net/rxrpc/af_rxrpc.c | 10 ++- net/rxrpc/ar-internal.h | 3 +- net/rxrpc/input.c | 38 ++++++++++- net/rxrpc/recvmsg.c | 168 ++++++++++++++++++------------------------------ 5 files changed, 109 insertions(+), 111 deletions(-) commit 2d689424b6184535890c251f937ccf815fde9cd2 Author: David Howells Date: Fri Nov 11 08:35:36 2022 +0000 rxrpc: Move call state changes from sendmsg to I/O thread Move all the call state changes that are made in rxrpc_sendmsg() to the I/O thread. This is a step towards removing the call state lock. This requires the switch to the RXRPC_CALL_CLIENT_AWAIT_REPLY and RXRPC_CALL_SERVER_SEND_REPLY states to be done when the last packet is decanted from ->tx_sendmsg to ->tx_buffer in the I/O thread, not when it is added to ->tx_sendmsg by sendmsg(). Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Documentation/networking/rxrpc.rst | 4 +-- net/rxrpc/call_event.c | 50 +++++++++++++++++++++++++-- net/rxrpc/sendmsg.c | 69 +++++++------------------------------- 3 files changed, 63 insertions(+), 60 deletions(-) commit d41b3f5b96881809c73f86e3ca436c9426610b7a Author: David Howells Date: Mon Dec 19 15:32:32 2022 +0000 rxrpc: Wrap accesses to get call state to put the barrier in one place Wrap accesses to get the state of a call from outside of the I/O thread in a single place so that the barrier needed to order wrt the error code and abort code is in just that place. Also use a barrier when setting the call state and again when reading the call state such that the auxiliary completion info (error code, abort code) can be read without taking a read lock on the call state lock. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/af_rxrpc.c | 2 +- net/rxrpc/ar-internal.h | 16 ++++++++++++++++ net/rxrpc/call_state.c | 3 ++- net/rxrpc/recvmsg.c | 12 ++++++------ net/rxrpc/sendmsg.c | 29 +++++++++++++---------------- 5 files changed, 38 insertions(+), 24 deletions(-) commit 0b9bb322f13d486d5b8630264ccbfb4794bb43a9 Author: David Howells Date: Thu Oct 27 00:16:55 2022 +0100 rxrpc: Split out the call state changing functions into their own file Split out the functions that change the state of an rxrpc call into their own file. The idea being to remove anything to do with changing the state of a call directly from the rxrpc sendmsg() and recvmsg() paths and have all that done in the I/O thread only, with the ultimate aim of removing the state lock entirely. Moving the code out of sendmsg.c and recvmsg.c makes that easier to manage. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/Makefile | 1 + net/rxrpc/ar-internal.h | 26 ++++++++++----- net/rxrpc/call_state.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/recvmsg.c | 81 -------------------------------------------- 4 files changed, 108 insertions(+), 89 deletions(-) commit 1bab27af6b88b5c811f99de4812b5590f20d1cb7 Author: David Howells Date: Fri Oct 21 09:30:23 2022 +0100 rxrpc: Set up a connection bundle from a call, not rxrpc_conn_parameters Use the information now stored in struct rxrpc_call to configure the connection bundle and thence the connection, rather than using the rxrpc_conn_parameters struct. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 3 +- net/rxrpc/af_rxrpc.c | 1 - net/rxrpc/ar-internal.h | 8 +-- net/rxrpc/call_object.c | 4 +- net/rxrpc/conn_client.c | 132 ++++++++++++++++++++++--------------------- net/rxrpc/conn_object.c | 2 +- net/rxrpc/sendmsg.c | 1 - 7 files changed, 76 insertions(+), 75 deletions(-) commit 2953d3b8d8fd1188034c54862b74402b0b846695 Author: David Howells Date: Fri Oct 21 08:54:03 2022 +0100 rxrpc: Offload the completion of service conn security to the I/O thread Offload the completion of the challenge/response cycle on a service connection to the I/O thread. After the RESPONSE packet has been successfully decrypted and verified by the work queue, offloading the changing of the call states to the I/O thread makes iteration over the conn's channel list simpler. Do this by marking the RESPONSE skbuff and putting it onto the receive queue for the I/O thread to collect. We put it on the front of the queue as we've already received the packet for it. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 2 ++ net/rxrpc/ar-internal.h | 1 + net/rxrpc/conn_event.c | 46 ++++++++++++++++++++++++++++++-------------- net/rxrpc/io_thread.c | 5 +++++ 4 files changed, 40 insertions(+), 14 deletions(-) commit f06cb29189361353e9ed12df936c8e1d7f69b730 Author: David Howells Date: Thu Oct 20 22:58:56 2022 +0100 rxrpc: Make the set of connection IDs per local endpoint Make the set of connection IDs per local endpoint so that endpoints don't cause each other's connections to get dismissed. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/af_rxrpc.c | 8 -------- net/rxrpc/ar-internal.h | 5 +++-- net/rxrpc/conn_client.c | 44 +++++++++++++++++++------------------------- net/rxrpc/conn_object.c | 6 +++--- net/rxrpc/local_object.c | 10 ++++++++++ 5 files changed, 35 insertions(+), 38 deletions(-) commit 57af281e5389b6fefedb3685f86847cbb0055f75 Author: David Howells Date: Thu Oct 6 21:45:42 2022 +0100 rxrpc: Tidy up abort generation infrastructure Tidy up the abort generation infrastructure in the following ways: (1) Create an enum and string mapping table to list the reasons an abort might be generated in tracing. (2) Replace the 3-char string with the values from (1) in the places that use that to log the abort source. This gets rid of a memcpy() in the tracepoint. (3) Subsume the rxrpc_rx_eproto tracepoint with the rxrpc_abort tracepoint and use values from (1) to indicate the trace reason. (4) Always make a call to an abort function at the point of the abort rather than stashing the values into variables and using goto to get to a place where it reported. The C optimiser will collapse the calls together as appropriate. The abort functions return a value that can be returned directly if appropriate. Note that this extends into afs also at the points where that generates an abort. To aid with this, the afs sources need to #define RXRPC_TRACE_ONLY_DEFINE_ENUMS before including the rxrpc tracing header because they don't have access to the rxrpc internal structures that some of the tracepoints make use of. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org fs/afs/cmservice.c | 6 +- fs/afs/rxrpc.c | 23 +++- include/net/af_rxrpc.h | 3 +- include/trace/events/rxrpc.h | 140 +++++++++++++++---- net/rxrpc/ar-internal.h | 51 ++++--- net/rxrpc/call_accept.c | 43 +++--- net/rxrpc/call_event.c | 13 +- net/rxrpc/call_object.c | 6 +- net/rxrpc/conn_event.c | 19 ++- net/rxrpc/input.c | 65 ++++----- net/rxrpc/insecure.c | 6 +- net/rxrpc/io_thread.c | 163 ++++++++++------------ net/rxrpc/recvmsg.c | 18 ++- net/rxrpc/rxkad.c | 321 ++++++++++++++++++------------------------- net/rxrpc/rxperf.c | 17 ++- net/rxrpc/security.c | 14 +- net/rxrpc/sendmsg.c | 20 +-- 17 files changed, 484 insertions(+), 444 deletions(-) commit a00ce28b1778fa3576575b43bdb17f60ded38b66 Author: David Howells Date: Thu Oct 20 09:56:36 2022 +0100 rxrpc: Clean up connection abort Clean up connection abort, using the connection state_lock to gate access to change that state, and use an rxrpc_call_completion value to indicate the difference between local and remote aborts as these can be pasted directly into the call state. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 2 + net/rxrpc/ar-internal.h | 46 +++++---- net/rxrpc/call_object.c | 8 +- net/rxrpc/conn_event.c | 233 +++++++++++++++---------------------------- net/rxrpc/insecure.c | 18 +--- net/rxrpc/output.c | 56 +++++++++++ net/rxrpc/proc.c | 10 +- net/rxrpc/rxkad.c | 28 ++---- 8 files changed, 188 insertions(+), 213 deletions(-) commit f2cce89a074e6d2991dddc94f6b6ebe1576b8459 Author: David Howells Date: Thu Oct 20 09:08:34 2022 +0100 rxrpc: Implement a mechanism to send an event notification to a connection Provide a means by which an event notification can be sent to a connection through such that the I/O thread can pick it up and handle it rather than doing it in a separate workqueue. This is then used to move the deferred final ACK of a call into the I/O thread rather than a separate work queue as part of the drive to do all transmission from the I/O thread. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 5 ++--- net/rxrpc/ar-internal.h | 5 +++++ net/rxrpc/conn_event.c | 14 ++++++++++---- net/rxrpc/conn_object.c | 20 +++++++++++++++++++- net/rxrpc/io_thread.c | 19 ++++++++++++++++++- net/rxrpc/local_object.c | 1 + 6 files changed, 55 insertions(+), 9 deletions(-) commit 03fc55adf8761c546d72798264b019c9f672c578 Author: David Howells Date: Wed Oct 12 17:01:25 2022 +0100 rxrpc: Only disconnect calls in the I/O thread Only perform call disconnection in the I/O thread to reduce the locking requirement. This is the first part of a fix for a race that exists between call connection and call disconnection whereby the data transmission code adds the call to the peer error distribution list after the call has been disconnected (say by the rxrpc socket getting closed). The fix is to complete the process of moving call connection, data transmission and call disconnection into the I/O thread and thus forcibly serialising them. Note that the issue may predate the overhaul to an I/O thread model that were included in the merge window for v6.2, but the timing is very much changed by the change given below. Fixes: cf37b5987508 ("rxrpc: Move DATA transmission into call processor work item") Reported-by: syzbot+c22650d2844392afdcfd@syzkaller.appspotmail.com Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 1 + net/rxrpc/call_event.c | 7 ++++++- net/rxrpc/call_object.c | 9 +-------- net/rxrpc/input.c | 6 ------ net/rxrpc/recvmsg.c | 1 + 5 files changed, 9 insertions(+), 15 deletions(-) commit a343b174b4bdde851033996960bca5ad1394d04b Author: David Howells Date: Wed Oct 12 22:17:56 2022 +0100 rxrpc: Only set/transmit aborts in the I/O thread Only set the abort call completion state in the I/O thread and only transmit ABORT packets from there. rxrpc_abort_call() can then be made to actually send the packet. Further, ABORT packets should only be sent if the call has been exposed to the network (ie. at least one attempted DATA transmission has occurred for it). Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 1 + net/rxrpc/ar-internal.h | 7 ++++++- net/rxrpc/call_event.c | 16 +++++++++++++--- net/rxrpc/call_object.c | 7 ++++--- net/rxrpc/input.c | 6 ++---- net/rxrpc/recvmsg.c | 2 ++ net/rxrpc/sendmsg.c | 29 ++++++++++++++++++++++------- 7 files changed, 50 insertions(+), 18 deletions(-) commit 30df927b936b2ef21eb07dce9c141c7897609643 Author: David Howells Date: Sat Oct 8 14:33:50 2022 +0100 rxrpc: Separate call retransmission from other conn events Call the rxrpc_conn_retransmit_call() directly from rxrpc_input_packet() rather than calling it via connection event handling. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/conn_event.c | 34 +++++----------------------------- net/rxrpc/io_thread.c | 2 +- 3 files changed, 8 insertions(+), 30 deletions(-) commit 5040011d073d3acdeb58af2b64f84e33bb03abd2 Author: David Howells Date: Wed Nov 2 10:24:29 2022 +0000 rxrpc: Make the local endpoint hold a ref on a connected call Make the local endpoint and it's I/O thread hold a reference on a connected call until that call is disconnected. Without this, we're reliant on either the AF_RXRPC socket to hold a ref (which is dropped when the call is released) or a queued work item to hold a ref (the work item is being replaced with the I/O thread). Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 3 +++ net/rxrpc/call_object.c | 2 ++ net/rxrpc/conn_client.c | 6 +++--- net/rxrpc/conn_object.c | 25 +++++++++++++++---------- 4 files changed, 23 insertions(+), 13 deletions(-) commit 8a758d98dba380a7d32a98b0840ad707e3036233 Author: David Howells Date: Thu Oct 20 23:17:06 2022 +0100 rxrpc: Stash the network namespace pointer in rxrpc_local Stash the network namespace pointer in the rxrpc_local struct in addition to a pointer to the rxrpc-specific net namespace info. Use this to remove some places where the socket is passed as a parameter. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 10 +++++----- net/rxrpc/call_accept.c | 2 +- net/rxrpc/conn_client.c | 2 +- net/rxrpc/local_object.c | 7 ++++--- net/rxrpc/peer_object.c | 23 ++++++++++------------- 5 files changed, 21 insertions(+), 23 deletions(-) commit 5193326c4c5a656c733b6d2c6537e3f36319bcac Merge: 93235bfd5a9c 87809d3196c2 Author: Daniel Vetter Date: Fri Jan 6 10:16:48 2023 +0100 Merge tag 'drm-intel-fixes-2023-01-05' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Only gvt-fixes: - debugfs fixes (Zhenyu) - fix up for vgpu status (Zhi) - double free fix in split_2MB_gtt_entry (Zheng) Signed-off-by: Daniel Vetter From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y7cszBkLRvAy6uao@intel.com commit 0688773f0710528e1ab302c3d6317e269f2e2e6e Author: Patrick Thompson Date: Tue Dec 20 15:58:26 2022 -0500 drm: Add orientation quirk for Lenovo ideapad D330-10IGL Panel is 800x1280 but mounted on a detachable form factor sideways. Signed-off-by: Patrick Thompson Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221220205826.178008-1-ptf@google.com drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1a5a23b9bdf6bde0e5185ca834ff6e806cc2aaaf Author: Yang Yingliang Date: Fri Dec 30 14:54:27 2022 +0800 usb: fotg210-udc: fix error return code in fotg210_udc_probe() After commit 5f217ccd520f ("fotg210-udc: Support optional external PHY"), the error code is re-assigned to 0 in fotg210_udc_probe(), if allocate or map memory fails after the assignment, it can't return an error code. Set the error code to -ENOMEM to fix this problem. Fixes: 5f217ccd520f ("fotg210-udc: Support optional external PHY") Signed-off-by: Yang Yingliang Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20221230065427.944586-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/fotg210-udc.c | 2 ++ 1 file changed, 2 insertions(+) commit c45219cba101f32853d011da2ba46a1b2338dc4c Author: Pierre-Olivier Mercier Date: Thu Jan 5 13:02:08 2023 +0100 Revert "arm64: dts: meson-sm1-odroid-hc4: disable unused USB PHY0" This reverts commit 703e84d6615a4a95fb504c8f2e4c9426b86f3930. USB device enumeration was not working on Odroid HC4 as both USB2 PHYs need to be enabled. This is inherited from the GLX USB design [1]. [1]: https://lore.kernel.org/all/20170814224542.18257-1-martin.blumenstingl@googlemail.com/T/ Signed-off-by: Pierre-Olivier Mercier Acked-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230105120206.28964-1-nemunaire@nemunai.re Signed-off-by: Neil Armstrong arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit eea8ce81fbb544e3caad1a1c876ba1af467b3d3c Author: Hui Wang Date: Thu Jan 5 11:42:49 2023 +0800 net: usb: cdc_ether: add support for Thales Cinterion PLS62-W modem This modem has 7 interfaces, 5 of them are serial interfaces and are driven by cdc_acm, while 2 of them are wwan interfaces and are driven by cdc_ether: If 0: Abstract (modem) If 1: Abstract (modem) If 2: Abstract (modem) If 3: Abstract (modem) If 4: Abstract (modem) If 5: Ethernet Networking If 6: Ethernet Networking Without this change, the 2 network interfaces will be named to usb0 and usb1, our QA think the names are confusing and filed a bug on it. After applying this change, the name will be wwan0 and wwan1, and they could work well with modem manager. Signed-off-by: Hui Wang Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20230105034249.10433-1-hui.wang@canonical.com Signed-off-by: Jakub Kicinski drivers/net/usb/cdc_ether.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c26de7507d1f5ffa5daf6a4980ef7896889691a9 Author: Biao Huang Date: Thu Jan 5 09:07:11 2023 +0800 stmmac: dwmac-mediatek: remove the dwmac_fix_mac_speed In current driver, MAC will always enable 2ns delay in RGMII mode, but that's not the correct usage. Remove the dwmac_fix_mac_speed() in driver, and recommend "rgmii-id" for phy-mode in device tree. Fixes: f2d356a6ab71 ("stmmac: dwmac-mediatek: add support for mt8195") Reviewed-by: Andrew Lunn Signed-off-by: Biao Huang Signed-off-by: Jakub Kicinski .../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 26 ---------------------- 1 file changed, 26 deletions(-) commit f4a75b5933c998e60fd812a7680e0971eb1c7cee Author: Akhil P Oommen Date: Fri Dec 16 22:33:14 2022 +0530 drm/msm/a6xx: Avoid gx gbit halt during rpm suspend As per the downstream driver, gx gbif halt is required only during recovery sequence. So lets avoid it during regular rpm suspend. Signed-off-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/515279/ Link: https://lore.kernel.org/r/20221216223253.1.Ice9c47bfeb1fddb8dc377a3491a043a3ee7fca7d@changeid Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 15 +++++++++------ drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 +++++++ drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 1 + 3 files changed, 17 insertions(+), 6 deletions(-) commit 13ef096e342b00e30b95a90c6c13eee1f0bec4c5 Author: Konrad Dybcio Date: Mon Jan 2 11:02:00 2023 +0100 drm/msm/adreno: Make adreno quirks not overwrite each other So far the adreno quirks have all been assigned with an OR operator, which is problematic, because they were assigned consecutive integer values, which makes checking them with an AND operator kind of no bueno.. Switch to using BIT(n) so that only the quirks that the programmer chose are taken into account when evaluating info->quirks & ADRENO_QUIRK_... Fixes: 370063ee427a ("drm/msm/adreno: Add A540 support") Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Reviewed-by: Rob Clark Signed-off-by: Konrad Dybcio Reviewed-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/516456/ Link: https://lore.kernel.org/r/20230102100201.77286-1-konrad.dybcio@linaro.org Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 1f5abbd77e2c1787e74b7c2caffac97def78ba52 Merge: 50011c32f421 b878d3ba9bb4 Author: Linus Torvalds Date: Thu Jan 5 13:48:49 2023 -0800 Merge tag 'thermal-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fix from Rafael Wysocki: "Add a missing sysfs attribute to the int340x thermal driver (Srinivas Pandruvada)" * tag 'thermal-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: int340x: Add missing attribute for data rate base commit 00dd060ab3cf95ca6ede7853bc14397014971b5e Author: Dmitry Baryshkov Date: Thu Jan 5 03:47:43 2023 +0200 drm/msm: another fix for the headless Adreno GPU Fix another oops reproducible when rebooting the board with the Adreno GPU working in the headless mode (e.g. iMX platforms). Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read [00000000] *pgd=74936831, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] ARM CPU: 0 PID: 51 Comm: reboot Not tainted 6.2.0-rc1-dirty #11 Hardware name: Freescale i.MX53 (Device Tree Support) PC is at msm_atomic_commit_tail+0x50/0x970 LR is at commit_tail+0x9c/0x188 pc : [] lr : [] psr: 600e0013 sp : e0851d30 ip : ee4eb7eb fp : 00090acc r10: 00000058 r9 : c2193014 r8 : c4310000 r7 : c4759380 r6 : 07bef61d r5 : 00000000 r4 : 00000000 r3 : c44cc440 r2 : 00000000 r1 : 00000000 r0 : 00000000 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 74910019 DAC: 00000051 Register r0 information: NULL pointer Register r1 information: NULL pointer Register r2 information: NULL pointer Register r3 information: slab kmalloc-1k start c44cc400 pointer offset 64 size 1024 Register r4 information: NULL pointer Register r5 information: NULL pointer Register r6 information: non-paged memory Register r7 information: slab kmalloc-128 start c4759380 pointer offset 0 size 128 Register r8 information: slab kmalloc-2k start c4310000 pointer offset 0 size 2048 Register r9 information: non-slab/vmalloc memory Register r10 information: non-paged memory Register r11 information: non-paged memory Register r12 information: non-paged memory Process reboot (pid: 51, stack limit = 0xc80046d9) Stack: (0xe0851d30 to 0xe0852000) 1d20: c4759380 fbd77200 000005ff 002b9c70 1d40: c4759380 c4759380 00000000 07bef61d 00000600 c0d6fe7c c2193014 00000058 1d60: 00090acc c067a214 00000000 c4759380 c4310000 00000000 c44cc854 c067a89c 1d80: 00000000 00000000 00000000 c4310468 00000000 c4759380 c4310000 c4310468 1da0: c4310470 c0643258 c4759380 00000000 00000000 c0c4ee24 00000000 c44cc810 1dc0: 00000000 c0c4ee24 00000000 c44cc810 00000000 0347d2a8 e0851e00 e0851e00 1de0: c4759380 c067ad20 c4310000 00000000 c44cc810 c27f8718 c44cc854 c067adb8 1e00: c4933000 00000002 00000001 00000000 00000000 c2130850 00000000 c2130854 1e20: c25fc488 00000000 c0ff162c 00000000 00000001 00000002 00000000 00000000 1e40: c43102c0 c43102c0 00000000 0347d2a8 c44cc810 c44cc814 c2133da8 c06d1a60 1e60: 00000000 00000000 00079028 c2012f24 fee1dead c4933000 00000058 c01431e4 1e80: 01234567 c0143a20 00000000 00000000 00000000 00000000 00000000 00000000 1ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1f20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1f40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1f80: 00000000 00000000 00000000 0347d2a8 00000002 00000004 00000078 00000058 1fa0: c010028c c0100060 00000002 00000004 fee1dead 28121969 01234567 00079028 1fc0: 00000002 00000004 00000078 00000058 0002fdc5 00000000 00000000 00090acc 1fe0: 00000058 becc9c64 b6e97e05 b6e0e5f6 600e0030 fee1dead 00000000 00000000 msm_atomic_commit_tail from commit_tail+0x9c/0x188 commit_tail from drm_atomic_helper_commit+0x160/0x188 drm_atomic_helper_commit from drm_atomic_commit+0xac/0xe0 drm_atomic_commit from drm_atomic_helper_disable_all+0x1b0/0x1c0 drm_atomic_helper_disable_all from drm_atomic_helper_shutdown+0x88/0x140 drm_atomic_helper_shutdown from device_shutdown+0x16c/0x240 device_shutdown from kernel_restart+0x38/0x90 kernel_restart from __do_sys_reboot+0x174/0x224 __do_sys_reboot from ret_fast_syscall+0x0/0x1c Exception stack(0xe0851fa8 to 0xe0851ff0) 1fa0: 00000002 00000004 fee1dead 28121969 01234567 00079028 1fc0: 00000002 00000004 00000078 00000058 0002fdc5 00000000 00000000 00090acc 1fe0: 00000058 becc9c64 b6e97e05 b6e0e5f6 Code: 15922088 1184421c e1500003 1afffff8 (e5953000) ---[ end trace 0000000000000000 ]--- Fixes: 0a58d2ae572a ("drm/msm: Make .remove and .shutdown HW shutdown consistent") Reported-by: kernel test robot Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Clark Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/516909/ Link: https://lore.kernel.org/r/20230105014743.1478110-1-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/msm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 654ffe4b793b42ed6b5909daff0b91809916d94e Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:10 2022 +0000 dt-bindings: msm: dsi-controller-main: Fix description of core clock There's a typo in describing the core clock as an 'escape' clock. The accurate description is 'core'. Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings") Reviewed-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Patchwork: https://patchwork.freedesktop.org/patch/515938/ Link: https://lore.kernel.org/r/20221223021025.1646636-4-bryan.odonoghue@linaro.org Signed-off-by: Abhinav Kumar Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6f033938beb31f893302a93f83ec0b6460c6cac Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:09 2022 +0000 dt-bindings: msm: dsi-controller-main: Fix power-domain constraint power-domain is required for the sc7180 dispcc GDSC but not every qcom SoC has a similar dependency for example the apq8064. Most Qcom SoC's using mdss-dsi-ctrl seem to have the ability to power-collapse the MDP without collapsing DSI. For example the qcom vendor kernel commit for apq8084, msm8226, msm8916, msm8974. https://review.carbonrom.org/plugins/gitiles/CarbonROM/android_kernel_oneplus_msm8994/+/7b5c011a770daa2811778937ed646237a28a8694 "ARM: dts: msm: add mdss gdsc supply to dsi controller device It is possible for the DSI controller to be active when MDP is power collapsed. DSI controller needs to have it's own vote for mdss gdsc to ensure that gdsc remains on in such cases." This however doesn't appear to be the case for the apq8064 so we shouldn't be marking power-domain as required in yaml checks. Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings") Reviewed-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Patchwork: https://patchwork.freedesktop.org/patch/515958/ Link: https://lore.kernel.org/r/20221223021025.1646636-3-bryan.odonoghue@linaro.org Signed-off-by: Abhinav Kumar Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml | 1 - 1 file changed, 1 deletion(-) commit cdf64343f91a1225e9e3d4ce4261962cd41b4ddd Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:08 2022 +0000 dt-bindings: msm: dsi-controller-main: Fix operating-points-v2 constraint The existing msm8916.dtsi does not depend on nor require operating points. Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings") Reviewed-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Patchwork: https://patchwork.freedesktop.org/patch/515940/ Link: https://lore.kernel.org/r/20221223021025.1646636-2-bryan.odonoghue@linaro.org Signed-off-by: Abhinav Kumar Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml | 1 - 1 file changed, 1 deletion(-) commit 50011c32f421215f6231996fcc84fd1fe81c4a48 Merge: aa01a183924f fe69230f0589 Author: Linus Torvalds Date: Thu Jan 5 12:40:50 2023 -0800 Merge tag 'net-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bpf, wifi, and netfilter. Current release - regressions: - bpf: fix nullness propagation for reg to reg comparisons, avoid null-deref - inet: control sockets should not use current thread task_frag - bpf: always use maximal size for copy_array() - eth: bnxt_en: don't link netdev to a devlink port for VFs Current release - new code bugs: - rxrpc: fix a couple of potential use-after-frees - netfilter: conntrack: fix IPv6 exthdr error check - wifi: iwlwifi: fw: skip PPAG for JF, avoid FW crashes - eth: dsa: qca8k: various fixes for the in-band register access - eth: nfp: fix schedule in atomic context when sync mc address - eth: renesas: rswitch: fix getting mac address from device tree - mobile: ipa: use proper endpoint mask for suspend Previous releases - regressions: - tcp: add TIME_WAIT sockets in bhash2, fix regression caught by Jiri / python tests - net: tc: don't intepret cls results when asked to drop, fix oob-access - vrf: determine the dst using the original ifindex for multicast - eth: bnxt_en: - fix XDP RX path if BPF adjusted packet length - fix HDS (header placement) and jumbo thresholds for RX packets - eth: ice: xsk: do not use xdp_return_frame() on tx_buf->raw_buf, avoid memory corruptions Previous releases - always broken: - ulp: prevent ULP without clone op from entering the LISTEN status - veth: fix race with AF_XDP exposing old or uninitialized descriptors - bpf: - pull before calling skb_postpull_rcsum() (fix checksum support and avoid a WARN()) - fix panic due to wrong pageattr of im->image (when livepatch and kretfunc coexist) - keep a reference to the mm, in case the task is dead - mptcp: fix deadlock in fastopen error path - netfilter: - nf_tables: perform type checking for existing sets - nf_tables: honor set timeout and garbage collection updates - ipset: fix hash:net,port,net hang with /0 subnet - ipset: avoid hung task warning when adding/deleting entries - selftests: net: - fix cmsg_so_mark.sh test hang on non-x86 systems - fix the arp_ndisc_evict_nocarrier test for IPv6 - usb: rndis_host: secure rndis_query check against int overflow - eth: r8169: fix dmar pte write access during suspend/resume with WOL - eth: lan966x: fix configuration of the PCS - eth: sparx5: fix reading of the MAC address - eth: qed: allow sleep in qed_mcp_trace_dump() - eth: hns3: - fix interrupts re-initialization after VF FLR - fix handling of promisc when MAC addr table gets full - refine the handling for VF heartbeat - eth: mlx5: - properly handle ingress QinQ-tagged packets on VST - fix io_eq_size and event_eq_size params validation on big endian - fix RoCE setting at HCA level if not supported at all - don't turn CQE compression on by default for IPoIB - eth: ena: - fix toeplitz initial hash key value - account for the number of XDP-processed bytes in interface stats - fix rx_copybreak value update Misc: - ethtool: harden phy stat handling against buggy drivers - docs: netdev: convert maintainer's doc from FAQ to a normal document" * tag 'net-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (112 commits) caif: fix memory leak in cfctrl_linkup_request() inet: control sockets should not use current thread task_frag net/ulp: prevent ULP without clone op from entering the LISTEN status qed: allow sleep in qed_mcp_trace_dump() MAINTAINERS: Update maintainers for ptp_vmw driver usb: rndis_host: Secure rndis_query check against int overflow net: dpaa: Fix dtsec check for PCS availability octeontx2-pf: Fix lmtst ID used in aura free drivers/net/bonding/bond_3ad: return when there's no aggregator netfilter: ipset: Rework long task execution when adding/deleting entries netfilter: ipset: fix hash:net,port,net hang with /0 subnet net: sparx5: Fix reading of the MAC address vxlan: Fix memory leaks in error path net: sched: htb: fix htb_classify() kernel-doc net: sched: cbq: dont intepret cls results when asked to drop net: sched: atm: dont intepret cls results when asked to drop dt-bindings: net: marvell,orion-mdio: Fix examples dt-bindings: net: sun8i-emac: Add phy-supply property net: ipa: use proper endpoint mask for suspend selftests: net: return non-zero for failures reported in arp_ndisc_evict_nocarrier ... commit b9b916aee6715cd7f3318af6dc360c4729417b94 Author: Ben Dooks Date: Thu Dec 29 17:05:45 2022 +0000 riscv: uaccess: fix type of 0 variable on error in get_user() If the get_user(x, ptr) has x as a pointer, then the setting of (x) = 0 is going to produce the following sparse warning, so fix this by forcing the type of 'x' when access_ok() fails. fs/aio.c:2073:21: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks Reviewed-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221229170545.718264-1-ben-linux@fluff.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2d473a6019ef9a54b0156ecdb2e0398c9fa6a24 Author: Björn Töpel Date: Mon Jan 2 17:07:48 2023 +0100 riscv, kprobes: Stricter c.jr/c.jalr decoding In the compressed instruction extension, c.jr, c.jalr, c.mv, and c.add is encoded the following way (each instruction is 16b): ---+-+-----------+-----------+-- 100 0 rs1[4:0]!=0 00000 10 : c.jr 100 1 rs1[4:0]!=0 00000 10 : c.jalr 100 0 rd[4:0]!=0 rs2[4:0]!=0 10 : c.mv 100 1 rd[4:0]!=0 rs2[4:0]!=0 10 : c.add The following logic is used to decode c.jr and c.jalr: insn & 0xf007 == 0x8002 => instruction is an c.jr insn & 0xf007 == 0x9002 => instruction is an c.jalr When 0xf007 is used to mask the instruction, c.mv can be incorrectly decoded as c.jr, and c.add as c.jalr. Correct the decoding by changing the mask from 0xf007 to 0xf07f. Fixes: c22b0bcb1dd0 ("riscv: Add kprobes supported") Signed-off-by: Björn Töpel Reviewed-by: Conor Dooley Reviewed-by: Guo Ren Link: https://lore.kernel.org/r/20230102160748.1307289-1-bjorn@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/probes/simulate-insn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa01a183924fdf2ab05eb6e44c256aaf8a786d3c Merge: 5e9af4b42660 694175cd8a16 Author: Linus Torvalds Date: Thu Jan 5 12:06:40 2023 -0800 Merge tag 'gpio-fixes-for-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: "A reference leak fix, two fixes for using uninitialized variables and more drivers converted to using immutable irqchips: - fix a reference leak in gpio-sifive - fix a potential use of an uninitialized variable in core gpiolib - fix a potential use of an uninitialized variable in gpio-pca953x - make GPIO irqchips immutable in gpio-pmic-eic-sprd, gpio-eic-sprd and gpio-sprd" * tag 'gpio-fixes-for-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: sifive: Fix refcount leak in sifive_gpio_probe gpio: sprd: Make the irqchip immutable gpio: pmic-eic-sprd: Make the irqchip immutable gpio: eic-sprd: Make the irqchip immutable gpio: pca953x: avoid to use uninitialized value pinctrl gpiolib: Fix using uninitialized lookup-flags on ACPI platforms commit e95d50d74b93a767a026f588e8de0b9718a0105e Author: Yishai Hadas Date: Thu Jan 5 13:23:39 2023 +0200 lib/scatterlist: Fix to merge contiguous pages into the last SG properly When sg_alloc_append_table_from_pages() calls to pages_are_mergeable() in its 'sgt_append->prv' flow to check whether it can merge contiguous pages into the last SG, it passes the page arguments in the wrong order. The first parameter should be the next candidate page to be merged to the last page and not the opposite. The current code leads to a corrupted SG which resulted in OOPs and unexpected errors when non-contiguous pages are merged wrongly. Fix to pass the page parameters in the right order. Fixes: 1567b49d1a40 ("lib/scatterlist: add check when merging zone device pages") Link: https://lore.kernel.org/r/20230105112339.107969-1-yishaih@nvidia.com Signed-off-by: Yishai Hadas Reviewed-by: Jason Gunthorpe Reviewed-by: Logan Gunthorpe Signed-off-by: Jason Gunthorpe lib/scatterlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41cc108b2451e0c65e8c9c9f6a3e103b62b60bb3 Author: Christian König Date: Thu Jan 5 11:27:16 2023 +0100 drm/amdgpu: fix missing dma_fence_put in error path When the fence can't be added we need to drop the reference. Suggested-by: Bert Karwatzki Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230105111703.52695-2-christian.koenig@amd.com Reviewed-by: Alex Deucher Reviewed-by: Luben Tuikov drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ed21f6c3fe423b17211fa5a85cd028621a749a2a Author: Christian König Date: Thu Jan 5 10:45:36 2023 +0100 drm/amdgpu: fix another missing fence reference in the CS code drm_sched_job_add_dependency() consumes the references of the gang members. Only triggered by mesh shaders. Signed-off-by: Christian König Fixes: 1728baa7e4e6 ("drm/amdgpu: use scheduler dependencies for CS") Tested-by: Mike Lothian Tested-by: Bert Karwatzki Link: https://patchwork.freedesktop.org/patch/msgid/20230105111703.52695-1-christian.koenig@amd.com Reviewed-by: Alex Deucher Reviewed-by: Luben Tuikov drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5e9af4b42660b2a8db067db8ff03db8a268d6a95 Merge: 41c03ba9beea 634cf6ead939 Author: Linus Torvalds Date: Thu Jan 5 11:24:33 2023 -0800 Merge tag 'fbdev-for-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes from Helge Deller: - Fix Matrox G200eW initialization failure - Fix build failure of offb driver when built as module - Optimize stack usage in omapfb * tag 'fbdev-for-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: omapfb: avoid stack overflow warning fbdev: matroxfb: G200eW: Increase max memory from 1 MB to 16 MB fbdev: atyfb: use strscpy() to instead of strncpy() fbdev: omapfb: use strscpy() to instead of strncpy() fbdev: make offb driver tristate commit 318ca20893c19ead02845a08204c3f9249bb74cd 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 Cc: stable@vger.kernel.org # 6.0.x, 6.1.x drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 1 + 2 files changed, 2 insertions(+) commit 6fea87637bf36bd285227f490132e83582ab7513 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 Cc: stable@vger.kernel.org # 6.0.x, 6.1.x drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e0fe6a31cac84735939c29d1e05055d58325c6c0 Author: Hector Martin Date: Wed Jan 4 18:36:28 2023 +0900 spi: Rename spi-cs-setup-ns property to spi-cs-setup-delay-ns As mentioned in the corresponding DT binding commit, the naming scheme for delay properties includes "delay" in the name, so let's keep that consistent. Fixes: 33a2fde5f77b ("spi: Introduce spi-cs-setup-ns property") Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20230104093631.15611-3-marcan@marcan.st Signed-off-by: Mark Brown drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38892ea4cefbb6ed3a91e76d3af84a1f8077d2d4 Author: Hector Martin Date: Wed Jan 4 18:36:27 2023 +0900 spi: dt-bindings: Rename spi-cs-setup-ns to spi-cs-setup-delay-ns Other delay values follow the delay-ns naming convention, so unify the newly introduced spi-cs-setup-ns property for consistency. Also fix a typo while we're here. Fixes: f6c911f3308c ("spi: dt-bindings: Introduce spi-cs-setup-ns property") Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20230104093631.15611-2-marcan@marcan.st Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cdfa92eb90f5770b26a79824ef213ebdbbd988b1 Author: Chancel Liu Date: Wed Jan 4 10:57:54 2023 +0800 ASoC: fsl_micfil: Correct the number of steps on SX controls The parameter "max" of SOC_SINGLE_SX_TLV() means the number of steps rather than maximum value. This patch corrects the minimum value to -8 and the number of steps to 15. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20230104025754.3019235-1-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_micfil.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b2b50d572135c5c6e10c2ff79cd828d5a8141ef6 Author: Paul E. McKenney Date: Wed Jan 4 16:37:53 2023 -0800 block: 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: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Jens Axboe block/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 601a27ea09a317d0fe2895df7d875381fb393041 Author: Wengang Wang Date: Wed Jan 4 10:05:43 2023 -0800 xfs: fix extent busy updating In xfs_extent_busy_update_extent() case 6 and 7, whenever bno is modified on extent busy, the relavent length has to be modified accordingly. Signed-off-by: Wengang Wang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_extent_busy.c | 1 + 1 file changed, 1 insertion(+) commit f26cd7372160da2eba31061d7943348ab9f2c01d Author: Mark Brown Date: Tue Dec 27 17:12:06 2022 +0000 arm64/signal: Always allocate SVE signal frames on SME only systems Currently we only allocate space for SVE signal frames on systems that support SVE, meaning that SME only systems do not allocate a signal frame for streaming mode SVE state. Change the check so space is allocated if either feature is supported. Fixes: 85ed24dad290 ("arm64/sme: Implement streaming SVE signal handling") Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221223-arm64-fix-sme-only-v1-3-938d663f69e5@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7dde62f0687c8856b6c0660066c7ee83a6a6f033 Author: Mark Brown Date: Tue Dec 27 17:12:05 2022 +0000 arm64/signal: Always accept SVE signal frames on SME only systems Currently we reject an attempt to restore a SVE signal frame on a system with SME but not SVE supported. This means that it is not possible to disable streaming mode via signal return as this is configured via the flags in the SVE signal context. Instead accept the signal frame, we will require it to have a vector length of 0 specified and no payload since the task will have no SVE vector length configured. Fixes: 85ed24dad290 ("arm64/sme: Implement streaming SVE signal handling") Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221223-arm64-fix-sme-only-v1-2-938d663f69e5@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/signal.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0cab5b4964c7064893e6ff5e81087a9206c63908 Author: Mark Brown Date: Tue Dec 27 17:12:04 2022 +0000 arm64/sme: Fix context switch for SME only systems When refactoring fpsimd_load() to support keeping SVE enabled over syscalls support for systems with SME but not SVE was broken. The code that selects between loading regular FPSIMD and SVE states was guarded by using system_supports_sve() but is also needed to handle the streaming SVE state in SME only systems where that check will be false. Fix this by also checking for system_supports_sme(). Fixes: a0136be443d5 ("arm64/fpsimd: Load FP state based on recorded data type") Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221223-arm64-fix-sme-only-v1-1-938d663f69e5@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd42ec8ea5b979edcebbf0ba05807d866884b567 Author: Konrad Dybcio Date: Sat Dec 10 21:03:52 2022 +0100 interconnect: qcom: rpm: Use _optional func for provider clocks It turned out that - very unfortunately - msm8996 needs a binding update, adding 2 more clocks to the A2NoC node. Use the _optional variant of devm_clk_get to make sure old DTs will still probe with newer versions of the driver. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov #db820c Link: https://lore.kernel.org/r/20221210200353.418391-5-konrad.dybcio@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/icc-rpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4be39d5d86c690c60e2afe55787fc5ec4409d0f0 Author: Konrad Dybcio Date: Sat Dec 10 21:03:51 2022 +0100 interconnect: qcom: msm8996: Fix regmap max_register values The device tree reg starts at BUS_BASE + QoS_OFFSET, but the regmap configs in the ICC driver had values suggesting the reg started at BUS_BASE. Shrink them down (where they haven't been already, so for providers where QoS_OFFSET = 0) to make sure they stay within their window. Fixes: 7add937f5222 ("interconnect: qcom: Add MSM8996 interconnect provider driver") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov #db820c Link: https://lore.kernel.org/r/20221210200353.418391-4-konrad.dybcio@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/msm8996.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 60426ff08af6a21275d9c879c0dfb09406469868 Author: Konrad Dybcio Date: Sat Dec 10 21:03:50 2022 +0100 interconnect: qcom: msm8996: Provide UFS clocks to A2NoC On eMMC devices the bootloader has no business enabling UFS clocks. That results in a platform hang and hard reboot when trying to vote on paths including MASTER_UFS and since sync_state guarantees that it's done at boot time, this effectively prevents such devices from booting. Fix that. Fixes: 7add937f5222 ("interconnect: qcom: Add MSM8996 interconnect provider driver") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov #db820c Link: https://lore.kernel.org/r/20221210200353.418391-3-konrad.dybcio@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/msm8996.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit df875276d8c69b27e1ed242d3cee6bc23d3b7f43 Author: Konrad Dybcio Date: Sat Dec 10 21:03:49 2022 +0100 dt-bindings: interconnect: Add UFS clocks to MSM8996 A2NoC MSM8996 A2NoC contains a UFS master, which means the UFS hardware is accessed every time sync_state is called within the interconnect framework. It's all good on devices where this clock is already enabled (most likely from the bootloader), but devices with eMMC storage are rather unlikely to have it like that. Add the missing 2 clocks to the binding. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Tested-by: Dmitry Baryshkov #db820c Link: https://lore.kernel.org/r/20221210200353.418391-2-konrad.dybcio@linaro.org Signed-off-by: Georgi Djakov .../devicetree/bindings/interconnect/qcom,rpm.yaml | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 031af50045ea97ed4386eb3751ca2c134d0fc911 Author: Mark Rutland Date: Wed Jan 4 15:16:26 2023 +0000 arm64: cmpxchg_double*: hazard against entire exchange variable The inline assembly for arm64's cmpxchg_double*() implementations use a +Q constraint to hazard against other accesses to the memory location being exchanged. However, the pointer passed to the constraint is a pointer to unsigned long, and thus the hazard only applies to the first 8 bytes of the location. GCC can take advantage of this, assuming that other portions of the location are unchanged, leading to a number of potential problems. This is similar to what we fixed back in commit: fee960bed5e857eb ("arm64: xchg: hazard against entire exchange variable") ... but we forgot to adjust cmpxchg_double*() similarly at the same time. The same problem applies, as demonstrated with the following test: | struct big { | u64 lo, hi; | } __aligned(128); | | unsigned long foo(struct big *b) | { | u64 hi_old, hi_new; | | hi_old = b->hi; | cmpxchg_double_local(&b->lo, &b->hi, 0x12, 0x34, 0x56, 0x78); | hi_new = b->hi; | | return hi_old ^ hi_new; | } ... which GCC 12.1.0 compiles as: | 0000000000000000 : | 0: d503233f paciasp | 4: aa0003e4 mov x4, x0 | 8: 1400000e b 40 | c: d2800240 mov x0, #0x12 // #18 | 10: d2800681 mov x1, #0x34 // #52 | 14: aa0003e5 mov x5, x0 | 18: aa0103e6 mov x6, x1 | 1c: d2800ac2 mov x2, #0x56 // #86 | 20: d2800f03 mov x3, #0x78 // #120 | 24: 48207c82 casp x0, x1, x2, x3, [x4] | 28: ca050000 eor x0, x0, x5 | 2c: ca060021 eor x1, x1, x6 | 30: aa010000 orr x0, x0, x1 | 34: d2800000 mov x0, #0x0 // #0 <--- BANG | 38: d50323bf autiasp | 3c: d65f03c0 ret | 40: d2800240 mov x0, #0x12 // #18 | 44: d2800681 mov x1, #0x34 // #52 | 48: d2800ac2 mov x2, #0x56 // #86 | 4c: d2800f03 mov x3, #0x78 // #120 | 50: f9800091 prfm pstl1strm, [x4] | 54: c87f1885 ldxp x5, x6, [x4] | 58: ca0000a5 eor x5, x5, x0 | 5c: ca0100c6 eor x6, x6, x1 | 60: aa0600a6 orr x6, x5, x6 | 64: b5000066 cbnz x6, 70 | 68: c8250c82 stxp w5, x2, x3, [x4] | 6c: 35ffff45 cbnz w5, 54 | 70: d2800000 mov x0, #0x0 // #0 <--- BANG | 74: d50323bf autiasp | 78: d65f03c0 ret Notice that at the lines with "BANG" comments, GCC has assumed that the higher 8 bytes are unchanged by the cmpxchg_double() call, and that `hi_old ^ hi_new` can be reduced to a constant zero, for both LSE and LL/SC versions of cmpxchg_double(). This patch fixes the issue by passing a pointer to __uint128_t into the +Q constraint, ensuring that the compiler hazards against the entire 16 bytes being modified. With this change, GCC 12.1.0 compiles the above test as: | 0000000000000000 : | 0: f9400407 ldr x7, [x0, #8] | 4: d503233f paciasp | 8: aa0003e4 mov x4, x0 | c: 1400000f b 48 | 10: d2800240 mov x0, #0x12 // #18 | 14: d2800681 mov x1, #0x34 // #52 | 18: aa0003e5 mov x5, x0 | 1c: aa0103e6 mov x6, x1 | 20: d2800ac2 mov x2, #0x56 // #86 | 24: d2800f03 mov x3, #0x78 // #120 | 28: 48207c82 casp x0, x1, x2, x3, [x4] | 2c: ca050000 eor x0, x0, x5 | 30: ca060021 eor x1, x1, x6 | 34: aa010000 orr x0, x0, x1 | 38: f9400480 ldr x0, [x4, #8] | 3c: d50323bf autiasp | 40: ca0000e0 eor x0, x7, x0 | 44: d65f03c0 ret | 48: d2800240 mov x0, #0x12 // #18 | 4c: d2800681 mov x1, #0x34 // #52 | 50: d2800ac2 mov x2, #0x56 // #86 | 54: d2800f03 mov x3, #0x78 // #120 | 58: f9800091 prfm pstl1strm, [x4] | 5c: c87f1885 ldxp x5, x6, [x4] | 60: ca0000a5 eor x5, x5, x0 | 64: ca0100c6 eor x6, x6, x1 | 68: aa0600a6 orr x6, x5, x6 | 6c: b5000066 cbnz x6, 78 | 70: c8250c82 stxp w5, x2, x3, [x4] | 74: 35ffff45 cbnz w5, 5c | 78: f9400480 ldr x0, [x4, #8] | 7c: d50323bf autiasp | 80: ca0000e0 eor x0, x7, x0 | 84: d65f03c0 ret ... sampling the high 8 bytes before and after the cmpxchg, and performing an EOR, as we'd expect. For backporting, I've tested this atop linux-4.9.y with GCC 5.5.0. Note that linux-4.9.y is oldest currently supported stable release, and mandates GCC 5.1+. Unfortunately I couldn't get a GCC 5.1 binary to run on my machines due to library incompatibilities. I've also used a standalone test to check that we can use a __uint128_t pointer in a +Q constraint at least as far back as GCC 4.8.5 and LLVM 3.9.1. Fixes: 5284e1b4bc8a ("arm64: xchg: Implement cmpxchg_double") Fixes: e9a4b795652f ("arm64: cmpxchg_dbl: patch in lse instructions when supported by the CPU") Reported-by: Boqun Feng Link: https://lore.kernel.org/lkml/Y6DEfQXymYVgL3oJ@boqun-archlinux/ Reported-by: Peter Zijlstra Link: https://lore.kernel.org/lkml/Y6GXoO4qmH9OIZ5Q@hirez.programming.kicks-ass.net/ Signed-off-by: Mark Rutland Cc: stable@vger.kernel.org Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Steve Capper Cc: Will Deacon Link: https://lore.kernel.org/r/20230104151626.3262137-1-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/atomic_ll_sc.h | 2 +- arch/arm64/include/asm/atomic_lse.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit de535c0234dd2dbd9c790790f2ca1c4ec8a52d2b Merge: afbb1b1caef7 7ed906e576a7 Author: Marc Zyngier Date: Thu Jan 5 15:26:53 2023 +0000 Merge branch kvm-arm64/MAINTAINERS into kvmarm-master/fixes * kvm-arm64/MAINTAINERS: : . : Update to the KVM/arm64 MAINTAINERS entry: : : - Remove Alexandru from the list of reviewers : - Add Zenghui to the list of reviewers : . MAINTAINERS: Remove myself as a KVM/arm64 reviewer MAINTAINERS: Add Zenghui Yu as a KVM/arm64 reviewer Signed-off-by: Marc Zyngier commit 7ed906e576a782b8272727f39c68a1762ea3ef98 Author: Alexandru Elisei Date: Tue Jan 3 12:07:36 2023 +0000 MAINTAINERS: Remove myself as a KVM/arm64 reviewer Haven't done any meaningful reviews for more than a year, and it doesn't look like I'll be able to do so in the future. Make it official and remove myself from the KVM/arm64 "Reviewers" list. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230103120736.116523-1-alexandru.elisei@arm.com MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 36d7546b56a254709a38f1904231e1a93f1c5717 Author: Marc Zyngier Date: Tue Jan 3 12:39:33 2023 +0000 MAINTAINERS: Add Zenghui Yu as a KVM/arm64 reviewer Zenghui has been around for quite some time, and has been instrumental in reviewing the GICv4/4.1 KVM support. I'm delighted that he's agreed to help with the patch review in a more official capacity! Acked-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230103123933.3234865-1-maz@kernel.org MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit ef08c0fadd8a17ebe429b85e23952dac3263ad34 Author: junhua huang Date: Wed Dec 28 09:54:12 2022 +0800 arm64/uprobes: change the uprobe_opcode_t typedef to fix the sparse warning After we fixed the uprobe inst endian in aarch_be, the sparse check report the following warning info: sparse warnings: (new ones prefixed by >>) >> kernel/events/uprobes.c:223:25: sparse: sparse: restricted __le32 degrades to integer >> kernel/events/uprobes.c:574:56: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected unsigned int [addressable] [usertype] opcode @@ got restricted __le32 [usertype] @@ kernel/events/uprobes.c:574:56: sparse: expected unsigned int [addressable] [usertype] opcode kernel/events/uprobes.c:574:56: sparse: got restricted __le32 [usertype] >> kernel/events/uprobes.c:1483:32: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] insn @@ got restricted __le32 [usertype] @@ kernel/events/uprobes.c:1483:32: sparse: expected unsigned int [usertype] insn kernel/events/uprobes.c:1483:32: sparse: got restricted __le32 [usertype] use the __le32 to u32 for uprobe_opcode_t, to keep the same. Fixes: 60f07e22a73d ("arm64:uprobe fix the uprobe SWBP_INSN in big-endian") Reported-by: kernel test robot Signed-off-by: junhua huang Link: https://lore.kernel.org/r/202212280954121197626@zte.com.cn Signed-off-by: Will Deacon arch/arm64/include/asm/uprobes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afbb1b1caef7fb8b23f31f32162dd5756d877dd5 Merge: d5b4d07bb361 b0803ba72b55 Author: Marc Zyngier Date: Thu Jan 5 15:25:54 2023 +0000 Merge branch kvm-arm64/s1ptw-write-fault into kvmarm-master/fixes * kvm-arm64/s1ptw-write-fault: : . : Fix S1PTW fault handling that was until then always taken : as a write. From the cover letter: : : `Recent developments on the EFI front have resulted in guests that : simply won't boot if the page tables are in a read-only memslot and : that you're a bit unlucky in the way S2 gets paged in... The core : issue is related to the fact that we treat a S1PTW as a write, which : is close enough to what needs to be done. Until to get to RO memslots. : : The first patch fixes this and is definitely a stable candidate. It : splits the faulting of page tables in two steps (RO translation fault, : followed by a writable permission fault -- should it even happen). : The second one documents the slightly odd behaviour of PTW writes to : RO memslot, which do not result in a KVM_MMIO exit. The last patch is : totally optional, only tangentially related, and randomly repainting : stuff (maybe that's contagious, who knows)." : : . KVM: arm64: Convert FSC_* over to ESR_ELx_FSC_* KVM: arm64: Document the behaviour of S1PTW faults on RO memslots KVM: arm64: Fix S1PTW handling on RO memslots Signed-off-by: Marc Zyngier commit d5b4d07bb361fa893244cf55ce5eb053e29b5562 Merge: decb17aeb8fa aff234839f8b Author: Marc Zyngier Date: Thu Jan 5 15:25:43 2023 +0000 Merge branch kvm-arm64/pmu-fixes-6.2 into kvmarm-master/fixes * kvm-arm64/pmu-fixes-6.2: : . : Fix for an incredibly stupid bug in the PMU rework that went into : 6.2. Brown paper bag time. : . KVM: arm64: PMU: Fix PMCR_EL0 reset value Signed-off-by: Marc Zyngier commit decb17aeb8fa21484a0140c0696dc5a477cc5c57 Author: Marc Zyngier Date: Tue Jan 3 09:50:20 2023 +0000 KVM: arm64: vgic: Add Apple M2 cpus to the list of broken SEIS implementations I really hoped that Apple had fixed their not-quite-a-vgic implementation when moving from M1 to M2. Alas, it seems they didn't, and running a buggy EFI version results in the vgic generating SErrors outside of the guest and taking the host down. Apply the same workaround as for M1. Yes, this is all a bit crap. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230103095022.3230946-2-maz@kernel.org arch/arm64/include/asm/cputype.h | 4 ++++ arch/arm64/kvm/vgic/vgic-v3.c | 2 ++ 2 files changed, 6 insertions(+) commit 4f4c549feb4ecca95ae9abb88887b941d196f83a Author: Catalin Marinas Date: Thu Dec 22 18:12:51 2022 +0000 arm64: mte: Avoid the racy walk of the vma list during core dump The MTE coredump code in arch/arm64/kernel/elfcore.c iterates over the vma list without the mmap_lock held. This can race with another process or userfaultfd concurrently modifying the vma list. Change the for_each_mte_vma macro and its callers to instead use the vma snapshot taken by dump_vma_snapshot() and stored in the cprm object. Fixes: 6dd8b1a0b6cb ("arm64: mte: Dump the MTE tags in the core file") Cc: # 5.18.x Signed-off-by: Catalin Marinas Reported-by: Seth Jenkins Suggested-by: Seth Jenkins Cc: Will Deacon Link: https://lore.kernel.org/r/20221222181251.1345752-4-catalin.marinas@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/elfcore.c | 56 +++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 30 deletions(-) commit 19e183b54528f11fafeca60fc6d0821e29ff281e Author: Catalin Marinas Date: Thu Dec 22 18:12:50 2022 +0000 elfcore: Add a cprm parameter to elf_core_extra_{phdrs,data_size} A subsequent fix for arm64 will use this parameter to parse the vma information from the snapshot created by dump_vma_snapshot() rather than traversing the vma list without the mmap_lock. Fixes: 6dd8b1a0b6cb ("arm64: mte: Dump the MTE tags in the core file") Cc: # 5.18.x Signed-off-by: Catalin Marinas Reported-by: Seth Jenkins Suggested-by: Seth Jenkins Cc: Will Deacon Cc: Eric Biederman Cc: Kees Cook Link: https://lore.kernel.org/r/20221222181251.1345752-3-catalin.marinas@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/elfcore.c | 4 ++-- arch/ia64/kernel/elfcore.c | 4 ++-- arch/x86/um/elfcore.c | 4 ++-- fs/binfmt_elf.c | 4 ++-- fs/binfmt_elf_fdpic.c | 4 ++-- include/linux/elfcore.h | 8 ++++---- 6 files changed, 14 insertions(+), 14 deletions(-) commit 736eedc974eaafbf4360e0ea85fc892cea72a223 Author: Catalin Marinas Date: Thu Dec 22 18:12:49 2022 +0000 arm64: mte: Fix double-freeing of the temporary tag storage during coredump Commit 16decce22efa ("arm64: mte: Fix the stack frame size warning in mte_dump_tag_range()") moved the temporary tag storage array from the stack to slab but it also introduced an error in double freeing this object. Remove the in-loop freeing. Fixes: 16decce22efa ("arm64: mte: Fix the stack frame size warning in mte_dump_tag_range()") Cc: # 5.18.x Signed-off-by: Catalin Marinas Reported-by: Seth Jenkins Cc: Will Deacon Link: https://lore.kernel.org/r/20221222181251.1345752-2-catalin.marinas@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/elfcore.c | 1 - 1 file changed, 1 deletion(-) commit eb9a85261e297292c4cc44b628c1373c996cedc2 Author: Zenghui Yu Date: Wed Dec 14 21:59:43 2022 +0800 arm64: ptrace: Use ARM64_SME to guard the SME register enumerations We currently guard REGSET_{SSVE, ZA} using ARM64_SVE for no good reason. Both enumerations would be pointless without ARM64_SME and create two empty entries in aarch64_regsets[] which would then become part of a process's native regset view (they should be ignored though). Switch to use ARM64_SME instead. Fixes: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers") Signed-off-by: Zenghui Yu Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20221214135943.379-1-yuzenghui@huawei.com Signed-off-by: Will Deacon arch/arm64/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 730a11f982e61aaef758ab552dfb7c30de79e99b Author: Liu Shixin Date: Tue Nov 22 20:31:37 2022 +0800 arm64/mm: add pud_user_exec() check in pud_user_accessible_page() Add check for the executable case in pud_user_accessible_page() too like what we did for pte and pmd. Fixes: 42b2547137f5 ("arm64/mm: enable ARCH_SUPPORTS_PAGE_TABLE_CHECK") Suggested-by: Will Deacon Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20221122123137.429686-1-liushixin2@huawei.com Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74c2f81054510d45b813548cb0a1c4ebf87cdd5f Author: Liu Shixin Date: Mon Nov 21 15:36:08 2022 +0800 arm64/mm: fix incorrect file_map_count for invalid pmd The page table check trigger BUG_ON() unexpectedly when split hugepage: ------------[ cut here ]------------ kernel BUG at mm/page_table_check.c:119! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 7 PID: 210 Comm: transhuge-stres Not tainted 6.1.0-rc3+ #748 Hardware name: linux,dummy-virt (DT) pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : page_table_check_set.isra.0+0x398/0x468 lr : page_table_check_set.isra.0+0x1c0/0x468 [...] Call trace: page_table_check_set.isra.0+0x398/0x468 __page_table_check_pte_set+0x160/0x1c0 __split_huge_pmd_locked+0x900/0x1648 __split_huge_pmd+0x28c/0x3b8 unmap_page_range+0x428/0x858 unmap_single_vma+0xf4/0x1c8 zap_page_range+0x2b0/0x410 madvise_vma_behavior+0xc44/0xe78 do_madvise+0x280/0x698 __arm64_sys_madvise+0x90/0xe8 invoke_syscall.constprop.0+0xdc/0x1d8 do_el0_svc+0xf4/0x3f8 el0_svc+0x58/0x120 el0t_64_sync_handler+0xb8/0xc0 el0t_64_sync+0x19c/0x1a0 [...] On arm64, pmd_leaf() will return true even if the pmd is invalid due to pmd_present_invalid() check. So in pmdp_invalidate() the file_map_count will not only decrease once but also increase once. Then in set_pte_at(), the file_map_count increase again, and so trigger BUG_ON() unexpectedly. Add !pmd_present_invalid() check in pmd_user_accessible_page() to fix the problem. Fixes: 42b2547137f5 ("arm64/mm: enable ARCH_SUPPORTS_PAGE_TABLE_CHECK") Reported-by: Denys Vlasenko Signed-off-by: Liu Shixin Acked-by: Pasha Tatashin Acked-by: David Hildenbrand Reviewed-by: Kefeng Wang Acked-by: Will Deacon Link: https://lore.kernel.org/r/20221121073608.4183459-1-liushixin2@huawei.com Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12521a5d5cb7ff0ad43eadfc9c135d86e1131fa8 Author: Pavel Begunkov Date: Thu Jan 5 10:49:15 2023 +0000 io_uring: fix CQ waiting timeout handling Jiffy to ktime CQ waiting conversion broke how we treat timeouts, in particular we rearm it anew every time we get into io_cqring_wait_schedule() without adjusting the timeout. Waiting for 2 CQEs and getting a task_work in the middle may double the timeout value, or even worse in some cases task may wait indefinitely. Cc: stable@vger.kernel.org Fixes: 228339662b398 ("io_uring: don't convert to jiffies for waiting on timeouts") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f7bffddd71b08f28a877d44d37ac953ddb01590d.1672915663.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit be5f95c8779e19779dd81927c8574fec5aaba36c Author: Michael Ellerman Date: Thu Jan 5 22:42:59 2023 +1100 powerpc/vmlinux.lds: Don't discard .comment Although the powerpc linker script mentions .comment in the DISCARD section, that has never actually caused it to be discarded, because the earlier ELF_DETAILS macro (previously STABS_DEBUG) explicitly includes .comment. However commit 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") introduced an earlier use of DISCARD as part of the RO_DATA macro. With binutils < 2.36 that causes the DISCARD directives later in the script to be applied earlier, causing .comment to actually be discarded. It's confusing to explicitly include and discard .comment, and even more so if the behaviour depends on the toolchain version. So don't discard .comment in order to maintain the existing behaviour in all cases. Fixes: 83a092cf95f2 ("powerpc: Link warning for orphan sections") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230105132349.384666-3-mpe@ellerman.id.au arch/powerpc/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07b050f9290ee012a407a0f64151db902a1520f5 Author: Michael Ellerman Date: Thu Jan 5 22:28:36 2023 +1100 powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds Relocatable kernels must not discard relocations, they need to be processed at runtime. As such they are included for CONFIG_RELOCATABLE builds in the powerpc linker script (line 340). However they are also unconditionally discarded later in the script (line 414). Previously that worked because the earlier inclusion superseded the discard. However commit 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") introduced an earlier use of DISCARD as part of the RO_DATA macro (line 137). With binutils < 2.36 that causes the DISCARD directives later in the script to be applied earlier, causing .rela* to actually be discarded at link time, leading to build warnings and a kernel that doesn't boot: ld: warning: discarding dynamic section .rela.init.rodata Fix it by conditionally discarding .rela* only when CONFIG_RELOCATABLE is disabled. Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230105132349.384666-2-mpe@ellerman.id.au arch/powerpc/kernel/vmlinux.lds.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4b9880dbf3bdba3a7c56445137c3d0e30aaa0a40 Author: Michael Ellerman Date: Thu Jan 5 22:05:04 2023 +1100 powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT The powerpc linker script explicitly includes .exit.text, because otherwise the link fails due to references from __bug_table and __ex_table. The code is freed (discarded) at runtime along with .init.text and data. That has worked in the past despite powerpc not defining RUNTIME_DISCARD_EXIT because DISCARDS appears late in the powerpc linker script (line 410), and the explicit inclusion of .exit.text earlier (line 280) supersedes the discard. However commit 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") introduced an earlier use of DISCARD as part of the RO_DATA macro (line 136). With binutils < 2.36 that causes the DISCARD directives later in the script to be applied earlier [1], causing .exit.text to actually be discarded at link time, leading to build errors: '.exit.text' referenced in section '__bug_table' of crypto/algboss.o: defined in discarded section '.exit.text' of crypto/algboss.o '.exit.text' referenced in section '__ex_table' of drivers/nvdimm/core.o: defined in discarded section '.exit.text' of drivers/nvdimm/core.o Fix it by defining RUNTIME_DISCARD_EXIT, which causes the generic DISCARDS macro to not include .exit.text at all. 1: https://lore.kernel.org/lkml/87fscp2v7k.fsf@igel.home/ Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230105132349.384666-1-mpe@ellerman.id.au arch/powerpc/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) commit 87809d3196c2a7a015ab80ca1cb8c19b659bc5f6 Merge: 88603b6dc419 4a61648af68f Author: Rodrigo Vivi Date: Thu Jan 5 08:03:38 2023 -0500 Merge tag 'gvt-fixes-2023-01-05' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2023-01-05 - Fix one missed unpin in error of intel_vgpu_shadow_mm_pin() - Fix two debugfs destroy oops issues for vgpu and gvt entries - Fix one potential double free issue in gtt shadow pt code - Fix to use atomic bit flag for vgpu status Signed-off-by: Rodrigo Vivi From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/Y7YWoFpz4plnSLCd@zhen-hp.sh.intel.com commit 93235bfd5a9c3329df31d1a4d7a93d138b3138c2 Merge: 83e79ae3216c 6fe6ece398f7 Author: Daniel Vetter Date: Thu Jan 5 12:13:51 2023 +0100 Merge tag 'amd-drm-fixes-6.2-2023-01-04' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.2-2023-01-04: amdgpu: - DCN 3.2 fix - Display fix amdkfd: - Fix kernel warning Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230105033839.23711-1-alexander.deucher@amd.com commit 634cf6ead93988b0da9ac054521ab63a3ba189db Author: Arnd Bergmann Date: Thu Dec 15 18:02:28 2022 +0100 fbdev: omapfb: avoid stack overflow warning The dsi_irq_stats structure is a little too big to fit on the stack of a 32-bit task, depending on the specific gcc options: fbdev/omap2/omapfb/dss/dsi.c: In function 'dsi_dump_dsidev_irqs': fbdev/omap2/omapfb/dss/dsi.c:1621:1: error: the frame size of 1064 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Since this is only a debugfs file, performance is not critical, so just dynamically allocate it, and print an error message in there in place of a failure code when the allocation fails. Signed-off-by: Arnd Bergmann Signed-off-by: Helge Deller drivers/video/fbdev/omap2/omapfb/dss/dsi.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit fe69230f05897b3de758427b574fc98025dfc907 Author: Zhengchao Shao Date: Wed Jan 4 14:51:46 2023 +0800 caif: fix memory leak in cfctrl_linkup_request() When linktype is unknown or kzalloc failed in cfctrl_linkup_request(), pkt is not released. Add release process to error path. Fixes: b482cd2053e3 ("net-caif: add CAIF core protocol stack") Fixes: 8d545c8f958f ("caif: Disconnect without waiting for response") Signed-off-by: Zhengchao Shao Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20230104065146.1153009-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni net/caif/cfctrl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9c694fbfe6f36017b060ad74c7565cb379852e40 Author: Jeremy Szu Date: Thu Jan 5 12:41:53 2023 +0800 ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform There is a HP platform uses ALC236 codec which using GPIO2 to control mute LED and GPIO1 to control micmute LED. Thus, add a quirk to make them work. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20230105044154.8242-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 83e79ae3216c70f2b63c935a4e089d1620e8ef01 Merge: c8de526215fd 69555549cfa4 Author: Daniel Vetter Date: Thu Jan 5 09:43:36 2023 +0100 Merge tag 'drm-misc-fixes-2023-01-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Several fixes to fix the error path of dma_buf_export, add a missing structure declaration resulting in a compiler warning, fix the GEM handle refcounting in panfrost, fix a corrupted image with AFBC on meson, a memleak in virtio, improper plane width for imx, and a lockup in drm_sched_entity_kill() Signed-off-by: Daniel Vetter From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230105074909.qd2h23hpxac4lxi7@houat commit 735aec59afb18c3e2da0a637037e69ad62dbda6a Author: Masahiro Yamada Date: Wed Jan 4 23:04:59 2023 +0900 kbuild: readd -w option when vmlinux.o or Module.symver is missing Commit 63ffe00d8c93 ("kbuild: Fix running modpost with musl libc") accidentally turned the unresolved symbol warnings into errors when vmlinux.o (for in-tree builds) or Module.symver (for external module builds) is missing. In those cases, unresolved symbols are expected, but the -w option is not set because 'missing-input' is referenced before set. Move $(missing-input) back to the original place. This should be fine for musl libc because vmlinux.o and -w are not added at the same time. With this change, -w may be passed twice, but it is not a big deal. Link: https://lore.kernel.org/all/b56a03b8-2a2a-f833-a5d2-cdc50a7ca2bb@cschramm.eu/ Fixes: 63ffe00d8c93 ("kbuild: Fix running modpost with musl libc") Reported-by: Christopher Schramm Signed-off-by: Masahiro Yamada Tested-by: Samuel Holland scripts/Makefile.modpost | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a53da43decaa3936998fa7dce2346855a6942166 Author: Masahiro Yamada Date: Sun Jan 1 15:07:09 2023 +0900 kbuild: fix single *.ko build The single *.ko build is broken since commit f65a486821cf ("kbuild: change module.order to list *.o instead of *.ko"). Fixes: f65a486821cf ("kbuild: change module.order to list *.o instead of *.ko") Reported-by: Marc Kleine-Budde Signed-off-by: Masahiro Yamada Tested-by: Marc Kleine-Budde Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc7d79d4fad6a4eab3f88c4bb237de72be4478f1 Author: Shyam Prasad N Date: Thu Dec 22 12:54:44 2022 +0000 cifs: fix interface count calculation during refresh The last fix to iface_count did fix the overcounting issue. However, during each refresh, we could end up undercounting the iface_count, if a match was found. Fixing this by doing increments and decrements instead of setting it to 0 before each parsing of server interfaces. Fixes: 096bbeec7bd6 ("smb3: interface count displayed incorrectly") Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/smb2ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7246210ecdd0cda97fa3e3bb15c32c6c2d9a23b5 Author: Shyam Prasad N Date: Tue Dec 27 11:29:28 2022 +0000 cifs: refcount only the selected iface during interface update When the server interface for a channel is not active anymore, we have the logic to select an alternative interface. However this was not breaking out of the loop as soon as a new alternative was found. As a result, some interfaces may get refcounted unintentionally. There was also a bug in checking if we found an alternate iface. Fixed that too. Fixes: b54034a73baf ("cifs: during reconnect, update interface if necessary") Cc: stable@vger.kernel.org # 5.19+ Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/sess.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1ac88557447088ccd15eb2f2520ce46d463c8e0b Author: Eric Dumazet Date: Tue Jan 3 19:27:36 2023 +0000 inet: control sockets should not use current thread task_frag Because ICMP handlers run from softirq contexts, they must not use current thread task_frag. Previously, all sockets allocated by inet_ctl_sock_create() would use the per-socket page fragment, with no chance of recursion. Fixes: 98123866fcf3 ("Treewide: Stop corrupting socket's task_frag") Reported-by: syzbot+bebc6f1acdf4cbb79b03@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Cc: Benjamin Coddington Acked-by: Guillaume Nault Link: https://lore.kernel.org/r/20230103192736.454149-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/af_inet.c | 1 + 1 file changed, 1 insertion(+) commit 2c02d41d71f90a5168391b6a5f2954112ba2307c Author: Paolo Abeni Date: Tue Jan 3 12:19:17 2023 +0100 net/ulp: prevent ULP without clone op from entering the LISTEN status When an ULP-enabled socket enters the LISTEN status, the listener ULP data pointer is copied inside the child/accepted sockets by sk_clone_lock(). The relevant ULP can take care of de-duplicating the context pointer via the clone() operation, but only MPTCP and SMC implement such op. Other ULPs may end-up with a double-free at socket disposal time. We can't simply clear the ULP data at clone time, as TLS replaces the socket ops with custom ones assuming a valid TLS ULP context is available. Instead completely prevent clone-less ULP sockets from entering the LISTEN status. Fixes: 734942cc4ea6 ("tcp: ULP infrastructure") Reported-by: slipper Signed-off-by: Paolo Abeni Link: https://lore.kernel.org/r/4b80c3d1dbe3d0ab072f80450c202d9bc88b4b03.1672740602.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski net/ipv4/inet_connection_sock.c | 14 ++++++++++++++ net/ipv4/tcp_ulp.c | 4 ++++ 2 files changed, 18 insertions(+) commit 5401c3e0992860b11fb4b25796e4c4f1921740df Author: Caleb Sander Date: Tue Jan 3 16:30:21 2023 -0700 qed: allow sleep in qed_mcp_trace_dump() By default, qed_mcp_cmd_and_union() delays 10us at a time in a loop that can run 500K times, so calls to qed_mcp_nvm_rd_cmd() may block the current thread for over 5s. We observed thread scheduling delays over 700ms in production, with stacktraces pointing to this code as the culprit. qed_mcp_trace_dump() is called from ethtool, so sleeping is permitted. It already can sleep in qed_mcp_halt(), which calls qed_mcp_cmd(). Add a "can sleep" parameter to qed_find_nvram_image() and qed_nvram_read() so they can sleep during qed_mcp_trace_dump(). qed_mcp_trace_get_meta_info() and qed_mcp_trace_read_meta(), called only by qed_mcp_trace_dump(), allow these functions to sleep. I can't tell if the other caller (qed_grc_dump_mcp_hw_dump()) can sleep, so keep b_can_sleep set to false when it calls these functions. An example stacktrace from a custom warning we added to the kernel showing a thread that has not scheduled despite long needing resched: [ 2745.362925,17] ------------[ cut here ]------------ [ 2745.362941,17] WARNING: CPU: 23 PID: 5640 at arch/x86/kernel/irq.c:233 do_IRQ+0x15e/0x1a0() [ 2745.362946,17] Thread not rescheduled for 744 ms after irq 99 [ 2745.362956,17] Modules linked in: ... [ 2745.363339,17] CPU: 23 PID: 5640 Comm: lldpd Tainted: P O 4.4.182+ #202104120910+6d1da174272d.61x [ 2745.363343,17] Hardware name: FOXCONN MercuryB/Quicksilver Controller, BIOS H11P1N09 07/08/2020 [ 2745.363346,17] 0000000000000000 ffff885ec07c3ed8 ffffffff8131eb2f ffff885ec07c3f20 [ 2745.363358,17] ffffffff81d14f64 ffff885ec07c3f10 ffffffff81072ac2 ffff88be98ed0000 [ 2745.363369,17] 0000000000000063 0000000000000174 0000000000000074 0000000000000000 [ 2745.363379,17] Call Trace: [ 2745.363382,17] [] dump_stack+0x8e/0xcf [ 2745.363393,17] [] warn_slowpath_common+0x82/0xc0 [ 2745.363398,17] [] warn_slowpath_fmt+0x4c/0x50 [ 2745.363404,17] [] ? rcu_irq_exit+0xae/0xc0 [ 2745.363408,17] [] do_IRQ+0x15e/0x1a0 [ 2745.363413,17] [] common_interrupt+0x89/0x89 [ 2745.363416,17] [] ? delay_tsc+0x24/0x50 [ 2745.363425,17] [] __udelay+0x34/0x40 [ 2745.363457,17] [] qed_mcp_cmd_and_union+0x36f/0x7d0 [qed] [ 2745.363473,17] [] qed_mcp_nvm_rd_cmd+0x4d/0x90 [qed] [ 2745.363490,17] [] qed_mcp_trace_dump+0x4a7/0x630 [qed] [ 2745.363504,17] [] ? qed_fw_asserts_dump+0x1d6/0x1f0 [qed] [ 2745.363520,17] [] qed_dbg_mcp_trace_get_dump_buf_size+0x37/0x80 [qed] [ 2745.363536,17] [] qed_dbg_feature_size+0x61/0xa0 [qed] [ 2745.363551,17] [] qed_dbg_all_data_size+0x247/0x260 [qed] [ 2745.363560,17] [] qede_get_regs_len+0x30/0x40 [qede] [ 2745.363566,17] [] ethtool_get_drvinfo+0xe3/0x190 [ 2745.363570,17] [] dev_ethtool+0x1362/0x2140 [ 2745.363575,17] [] ? finish_task_switch+0x76/0x260 [ 2745.363580,17] [] ? __schedule+0x3c6/0x9d0 [ 2745.363585,17] [] ? hrtimer_start_range_ns+0x1d0/0x370 [ 2745.363589,17] [] ? dev_get_by_name_rcu+0x6b/0x90 [ 2745.363594,17] [] dev_ioctl+0xe8/0x710 [ 2745.363599,17] [] sock_do_ioctl+0x48/0x60 [ 2745.363603,17] [] sock_ioctl+0x1c7/0x280 [ 2745.363608,17] [] ? seccomp_phase1+0x83/0x220 [ 2745.363612,17] [] do_vfs_ioctl+0x2b3/0x4e0 [ 2745.363616,17] [] SyS_ioctl+0x41/0x70 [ 2745.363619,17] [] entry_SYSCALL_64_fastpath+0x1e/0x79 [ 2745.363622,17] ---[ end trace f6954aa440266421 ]--- Fixes: c965db4446291 ("qed: Add support for debug data collection") Signed-off-by: Caleb Sander Acked-by: Alok Prasad Link: https://lore.kernel.org/r/20230103233021.1457646-1-csander@purestorage.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/qlogic/qed/qed_debug.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 49d9601b8187f202bb7f6f43026ef6acf4c7a178 Merge: 558016722e9d 45435d8da71f Author: Jakub Kicinski Date: Wed Jan 4 20:17:19 2023 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== bpf 2023-01-04 We've added 5 non-merge commits during the last 8 day(s) which contain a total of 5 files changed, 112 insertions(+), 18 deletions(-). The main changes are: 1) Always use maximal size for copy_array in the verifier to fix KASAN tracking, from Kees. 2) Fix bpf task iterator walking through dead tasks, from Kui-Feng. 3) Make sure livepatch and bpf fexit can coexist, from Chuang. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Always use maximal size for copy_array() selftests/bpf: add a test for iter/task_vma for short-lived processes bpf: keep a reference to the mm, in case the task is dead. selftests/bpf: Temporarily disable part of btf_dump:var_data test. bpf: Fix panic due to wrong pageattr of im->image ==================== Link: https://lore.kernel.org/r/20230104215500.79435-1-alexei.starovoitov@gmail.com Signed-off-by: Jakub Kicinski commit 064e32dc5b03114d0767893fecdaf7b5dfd8c286 Author: Rob Herring Date: Tue Jan 3 12:00:32 2023 -0600 of: fdt: Honor CONFIG_CMDLINE* even without /chosen node, take 2 I do not read a strict requirement on /chosen node in either ePAPR or in Documentation/devicetree. Help text for CONFIG_CMDLINE and CONFIG_CMDLINE_EXTEND doesn't make their behavior explicitly dependent on the presence of /chosen or the presense of /chosen/bootargs. However the early check for /chosen and bailing out in early_init_dt_scan_chosen() skips CONFIG_CMDLINE handling which is not really related to /chosen node or the particular method of passing cmdline from bootloader. This leads to counterintuitive combinations (assuming CONFIG_CMDLINE_EXTEND=y): a) bootargs="foo", CONFIG_CMDLINE="bar" => cmdline=="foo bar" b) /chosen missing, CONFIG_CMDLINE="bar" => cmdline=="" c) bootargs="", CONFIG_CMDLINE="bar" => cmdline==" bar" Rework early_init_dt_scan_chosen() so that the cmdline config options are always handled. [commit msg written by Alexander Sverdlin] Cc: Alexander Sverdlin Cc: Linus Walleij Cc: Arnd Bergmann Tested-by: Geoff Levand Reviewed-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20230103-dt-cmdline-fix-v1-2-7038e88b18b6@kernel.org Signed-off-by: Rob Herring drivers/of/fdt.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit bd0ddcfc83d85bc30c868f2c3457312c7f1ccee2 Author: Rob Herring Date: Tue Jan 3 12:00:31 2023 -0600 Revert "of: fdt: Honor CONFIG_CMDLINE* even without /chosen node" This reverts commit a7d550f82b445cf218b47a2c1a9c56e97ecb8c7a. Some arches (PPC at least) don't call early_init_dt_scan_nodes(), so moving the cmdline processing there breaks them. Reported-by: Geoff Levand Cc: Alexander Sverdlin Tested-by: Geoff Levand Reviewed-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20230103-dt-cmdline-fix-v1-1-7038e88b18b6@kernel.org Signed-off-by: Rob Herring drivers/of/fdt.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 6fe6ece398f7431784847e922a2c8c385dc58a35 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 Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 27 +++++++++++++++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++----- 3 files changed, 35 insertions(+), 5 deletions(-) commit 41c03ba9beea760bd2d2ac9250b09a2e192da2dc Merge: 512dee0c00ad a26116c1e740 Author: Linus Torvalds Date: Wed Jan 4 17:13:53 2023 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "Mostly fixes all over the place, a couple of cleanups" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (32 commits) virtio_blk: Fix signedness bug in virtblk_prep_rq() vdpa_sim_net: should not drop the multicast/broadcast packet vdpasim: fix memory leak when freeing IOTLBs vdpa: conditionally fill max max queue pair for stats vdpa/vp_vdpa: fix kfree a wrong pointer in vp_vdpa_remove vduse: Validate vq_num in vduse_validate_config() tools/virtio: remove smp_read_barrier_depends() tools/virtio: remove stray characters vhost_vdpa: fix the crash in unmap a large memory virtio: Implementing attribute show with sysfs_emit virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session() tools/virtio: Variable type completion vdpa_sim: fix vringh initialization in vdpasim_queue_ready() virtio_blk: use UINT_MAX instead of -1U vhost-vdpa: fix an iotlb memory leak vhost: fix range used in translate_desc() vringh: fix range used in iotlb_translate() vhost/vsock: Fix error handling in vhost_vsock_init() vdpa_sim: fix possible memory leak in vdpasim_net_init() and vdpasim_blk_init() tools: Delete the unneeded semicolon after curly braces ... commit 4b83e99ee7092df37a5cf292fde976ebc475ea63 Author: Jens Axboe Date: Wed Jan 4 14:44:13 2023 -0700 Revert "pktcdvd: remove driver." This reverts commit f40eb99897af665f11858dd7b56edcb62c3f3c67. There are apparently still users out there of this driver. While we'd love to remove it to ease the maintenance burden, let's reinstate it for now until better (userspace) solutions can be developed. Link: https://lore.kernel.org/lkml/20230104190115.ceglfefco475ev6c@pali/ Reported-by: Pali Rohár Signed-off-by: Jens Axboe Documentation/ABI/testing/debugfs-pktcdvd | 18 + Documentation/ABI/testing/sysfs-class-pktcdvd | 97 + MAINTAINERS | 7 + drivers/block/Kconfig | 43 + drivers/block/Makefile | 1 + drivers/block/pktcdvd.c | 2944 +++++++++++++++++++++++++ include/linux/pktcdvd.h | 197 ++ include/uapi/linux/pktcdvd.h | 112 + 8 files changed, 3419 insertions(+) commit 050a4f341f35bf51db321c7f68700f9e0b1a7552 Author: Jens Axboe Date: Wed Jan 4 14:44:02 2023 -0700 Revert "block: remove devnode callback from struct block_device_operations" This reverts commit 85d6ce58e493ac8b7122e2fbe3f41b94d6ebdc11. We're reinstating the pktcdvd driver, which needs this API. Signed-off-by: Jens Axboe block/genhd.c | 11 +++++++++++ include/linux/blkdev.h | 1 + 2 files changed, 12 insertions(+) commit ee4b4e2248565babfba807d82c0f3e00c392a4c0 Author: Jens Axboe Date: Wed Jan 4 14:43:27 2023 -0700 Revert "block: bio_copy_data_iter" This reverts commit db1c7d77976775483a8ef240b4c705f113e13ea1. We're reinstating the pktcdvd driver, which needs this API. Signed-off-by: Jens Axboe block/bio.c | 37 ++++++++++++++++++++++--------------- include/linux/bio.h | 2 ++ 2 files changed, 24 insertions(+), 15 deletions(-) commit 59b745bb4e0bd445366c45b8df6b51b69134f4f5 Author: Jens Axboe Date: Wed Jan 4 13:49:54 2023 -0700 io_uring: move 'poll_multi_queue' bool in io_ring_ctx The cacheline section holding this variable has two gaps, where one is caused by this bool not packing well with structs. This causes it to blow into the next cacheline. Move the variable, shrinking io_ring_ctx by a full cacheline in size. Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fa8e442e832a3647cdd90f3e606c473a51bc1b26 Author: Ming Lei Date: Wed Jan 4 21:32:35 2023 +0800 ublk: honor IO_URING_F_NONBLOCK for handling control command Most of control command handlers may sleep, so return -EAGAIN in case of IO_URING_F_NONBLOCK to defer the handling into io wq context. Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Reported-by: Jens Axboe Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230104133235.836536-1-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 3 +++ 1 file changed, 3 insertions(+) commit 9cea62b2cbabff8ed46f2df17778b624ad9dd25a Author: Jens Axboe Date: Wed Jan 4 08:52:06 2023 -0700 block: don't allow splitting of a REQ_NOWAIT bio If we split a bio marked with REQ_NOWAIT, then we can trigger spurious EAGAIN if constituent parts of that split bio end up failing request allocations. Parts will complete just fine, but just a single failure in one of the chained bios will yield an EAGAIN final result for the parent bio. Return EAGAIN early if we end up needing to split such a bio, which allows for saner recovery handling. Cc: stable@vger.kernel.org # 5.15+ Link: https://github.com/axboe/liburing/issues/766 Reported-by: Michael Kelley Reviewed-by: Keith Busch Signed-off-by: Jens Axboe block/blk-merge.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 512dee0c00ad9e9c7ae9f11fc6743702ea40caff Merge: 2ac44821a816 a664ec9158ee Author: Linus Torvalds Date: Wed Jan 4 12:11:29 2023 -0800 Merge tag 'x86-urgent-2023-01-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 fixes from Ingo Molnar: "Fix a double-free bug, a binutils warning, a header namespace clash and a bug in ib_prctl_set()" * tag 'x86-urgent-2023-01-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/bugs: Flush IBP in ib_prctl_set() x86/insn: Avoid namespace clash by separating instruction decoder MMIO type from MMIO trace type x86/asm: Fix an assembler warning with current binutils x86/kexec: Fix double-free of elf header buffer commit 2ac44821a81612317f4451b765986d8b9695d5d5 Merge: b61778fa5173 df9d44b645b8 Author: Linus Torvalds Date: Wed Jan 4 12:02:26 2023 -0800 Merge tag 'f2fs-fix-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs fixes from Jaegeuk Kim: - fix a null pointer dereference in f2fs_issue_flush, which occurs by the combination of mount/remount options. - fix a bug in per-block age-based extent_cache newly introduced in 6.2-rc1, which reported a wrong age information in extent_cache. - fix a kernel panic if extent_tree was not created, which was caught by a wrong BUG_ON * tag 'f2fs-fix-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: let's avoid panic if extent_tree is not created f2fs: should use a temp extent_info for lookup f2fs: don't mix to use union values in extent_info f2fs: initialize extent_cache parameter f2fs: fix to avoid NULL pointer dereference in f2fs_issue_flush() commit 57512b57dcfaf63c52d8ad2fb35321328cde31b0 Author: Zhang Rui Date: Wed Jan 4 22:58:31 2023 +0800 perf/x86/rapl: Add support for Intel Emerald Rapids Emerald Rapids RAPL support is the same as previous Sapphire Rapids. Add Emerald Rapids model for RAPL. Signed-off-by: Zhang Rui Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230104145831.25498-2-rui.zhang@intel.com arch/x86/events/rapl.c | 1 + 1 file changed, 1 insertion(+) commit f52853a668bfeddd79f319d536a506f68cc2b478 Author: Zhang Rui Date: Wed Jan 4 22:58:30 2023 +0800 perf/x86/rapl: Add support for Intel Meteor Lake Meteor Lake RAPL support is the same as previous Sky Lake. Add Meteor Lake model for RAPL. Signed-off-by: Zhang Rui Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230104145831.25498-1-rui.zhang@intel.com arch/x86/events/rapl.c | 2 ++ 1 file changed, 2 insertions(+) commit 481028dbf1daa2808e1be06f6a865b5fe5939efc Author: Jesus Sanchez-Palencia Date: Wed Jan 4 11:34:14 2023 -0800 perf tools: Fix build on uClibc systems by adding missing sys/types.h include Not all libc implementations define ssize_t as part of stdio.h like glibc does since the standard only requires this type to be defined by unistd.h and sys/types.h. For this reason the perf build is currently broken for toolchains based on uClibc, for instance. Include sys/types.h explicitly to fix that. Committer notes: In addition, in the past this worked in uClibc test systems as there was another way to get to sys/types.h that got removed in that cset: tools/perf/util/trace-event.h /usr/include/traceevent/event_parse.h # This got removed from util/trace-event.h in 378ef0f5d9d7f465 /usr/include/regex.h /usr/include/sys/types.h typedef __ssize_t ssize_t; So the size_t that is used in tools/perf/util/trace-event.h was being obtained indirectly, by chance. Fixes: 378ef0f5d9d7f465 ("perf build: Use libtraceevent from the system") Signed-off-by: Jesus Sanchez-Palencia Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20230104193414.606905-1-jesussanp@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/trace-event.h | 1 + 1 file changed, 1 insertion(+) commit b61778fa5173021e628b3c9372c9ceae01951b34 Merge: 69b41ac87e4a cad853374d85 Author: Linus Torvalds Date: Wed Jan 4 11:26:36 2023 -0800 Merge tag 'nfsd-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Fix a filecache UAF during NFSD shutdown - Avoid exposing automounted mounts on NFS re-exports * tag 'nfsd-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: nfsd: fix handling of readdir in v4root vs. mount upcall timeout nfsd: shut down the NFSv4 state objects before the filecache commit be79f805a1e1b95605c825f1c513bdd2c8b167ed Author: Bryan O'Donoghue Date: Thu Dec 29 12:44:38 2022 +0000 dt-bindings: msm: dsi-phy-28nm: Add missing qcom, dsi-phy-regulator-ldo-mode Add in missing qcom,dsi-phy-regulator-ldo-mode to the 28nm DSI PHY. When converting from .txt to .yaml we missed this one. Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings") Reviewed-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Patchwork: https://patchwork.freedesktop.org/patch/516205/ Link: https://lore.kernel.org/r/20221229124438.504770-2-bryan.odonoghue@linaro.org Signed-off-by: Abhinav Kumar Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 613b14884b8595e20b9fac4126bf627313827fbe Author: Jens Axboe Date: Wed Jan 4 08:51:19 2023 -0700 block: handle bio_split_to_limits() NULL return This can't happen right now, but in preparation for allowing bio_split_to_limits() returning NULL if it ended the bio, check for it in all the callers. Signed-off-by: Jens Axboe block/blk-merge.c | 4 +++- block/blk-mq.c | 5 ++++- drivers/block/drbd/drbd_req.c | 2 ++ drivers/block/ps3vram.c | 2 ++ drivers/md/dm.c | 2 ++ drivers/md/md.c | 2 ++ drivers/nvme/host/multipath.c | 2 ++ drivers/s390/block/dcssblk.c | 2 ++ 8 files changed, 19 insertions(+), 2 deletions(-) commit 4a61648af68f5ba4884f0e3b494ee1cabc4b6620 Author: Zheng Wang Date: Fri Dec 30 00:56:41 2022 +0800 drm/i915/gvt: fix double free bug in split_2MB_gtt_entry If intel_gvt_dma_map_guest_page failed, it will call ppgtt_invalidate_spt, which will finally free the spt. But the caller function ppgtt_populate_spt_by_guest_entry does not notice that, it will free spt again in its error path. Fix this by canceling the mapping of DMA address and freeing sub_spt. Besides, leave the handle of spt destroy to caller function instead of callee function when error occurs. Fixes: b901b252b6cf ("drm/i915/gvt: Add 2M huge gtt support") Signed-off-by: Zheng Wang Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20221229165641.1192455-1-zyytlz.wz@163.com drivers/gpu/drm/i915/gvt/gtt.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit a06d4b9e15c0ea4e05b200cfb1f1050e785a5e87 Author: Zhi Wang Date: Thu Nov 10 12:20:34 2022 +0000 drm/i915/gvt: use atomic operations to change the vGPU status Several vGPU status are used to decide the availability of GVT-g core logics when creating a vGPU. Use atomic operations on changing the vGPU status to avoid the racing. Cc: Zhenyu Wang Cc: Kevin Tian Cc: Jason Gunthorpe Cc: intel-gvt-dev@lists.freedesktop.org Suggested-by: Alex Williamson Signed-off-by: Zhi Wang Reviewed-by: Zhenyu Wang Reviewed-by: Kevin Tian Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20221110122034.3382-2-zhi.a.wang@intel.com drivers/gpu/drm/i915/gvt/debugfs.c | 19 ++++++++++++++++++- drivers/gpu/drm/i915/gvt/dmabuf.c | 3 ++- drivers/gpu/drm/i915/gvt/gtt.c | 4 ++-- drivers/gpu/drm/i915/gvt/gvt.h | 15 ++++++++++----- drivers/gpu/drm/i915/gvt/interrupt.c | 2 +- drivers/gpu/drm/i915/gvt/kvmgt.c | 35 +++++++++++++---------------------- drivers/gpu/drm/i915/gvt/scheduler.c | 3 ++- drivers/gpu/drm/i915/gvt/vgpu.c | 12 +++++------- 8 files changed, 53 insertions(+), 40 deletions(-) commit 704f3384f322b40ba24d958473edfb1c9750c8fd Author: Zhenyu Wang Date: Mon Dec 19 22:03:57 2022 +0800 drm/i915/gvt: fix vgpu debugfs clean in remove Check carefully on root debugfs available when destroying vgpu, e.g in remove case drm minor's debugfs root might already be destroyed, which led to kernel oops like below. Console: switching to colour dummy device 80x25 i915 0000:00:02.0: MDEV: Unregistering intel_vgpu_mdev b1338b2d-a709-4c23-b766-cc436c36cdf0: Removing from iommu group 14 BUG: kernel NULL pointer dereference, address: 0000000000000150 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP CPU: 3 PID: 1046 Comm: driverctl Not tainted 6.1.0-rc2+ #6 Hardware name: HP HP ProDesk 600 G3 MT/829D, BIOS P02 Ver. 02.44 09/13/2022 RIP: 0010:__lock_acquire+0x5e2/0x1f90 Code: 87 ad 09 00 00 39 05 e1 1e cc 02 0f 82 f1 09 00 00 ba 01 00 00 00 48 83 c4 48 89 d0 5b 5d 41 5c 41 5d 41 5e 41 5f c3 45 31 ff <48> 81 3f 60 9e c2 b6 45 0f 45 f8 83 fe 01 0f 87 55 fa ff ff 89 f0 RSP: 0018:ffff9f770274f948 EFLAGS: 00010046 RAX: 0000000000000003 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000150 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: ffff8895d1173300 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000150 R14: 0000000000000000 R15: 0000000000000000 FS: 00007fc9b2ba0740(0000) GS:ffff889cdfcc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000150 CR3: 000000010fd93005 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lock_acquire+0xbf/0x2b0 ? simple_recursive_removal+0xa5/0x2b0 ? lock_release+0x13d/0x2d0 down_write+0x2a/0xd0 ? simple_recursive_removal+0xa5/0x2b0 simple_recursive_removal+0xa5/0x2b0 ? start_creating.part.0+0x110/0x110 ? _raw_spin_unlock+0x29/0x40 debugfs_remove+0x40/0x60 intel_gvt_debugfs_remove_vgpu+0x15/0x30 [kvmgt] intel_gvt_destroy_vgpu+0x60/0x100 [kvmgt] intel_vgpu_release_dev+0xe/0x20 [kvmgt] device_release+0x30/0x80 kobject_put+0x79/0x1b0 device_release_driver_internal+0x1b8/0x230 bus_remove_device+0xec/0x160 device_del+0x189/0x400 ? up_write+0x9c/0x1b0 ? mdev_device_remove_common+0x60/0x60 [mdev] mdev_device_remove_common+0x22/0x60 [mdev] mdev_device_remove_cb+0x17/0x20 [mdev] device_for_each_child+0x56/0x80 mdev_unregister_parent+0x5a/0x81 [mdev] intel_gvt_clean_device+0x2d/0xe0 [kvmgt] intel_gvt_driver_remove+0x2e/0xb0 [i915] i915_driver_remove+0xac/0x100 [i915] i915_pci_remove+0x1a/0x30 [i915] pci_device_remove+0x31/0xa0 device_release_driver_internal+0x1b8/0x230 unbind_store+0xd8/0x100 kernfs_fop_write_iter+0x156/0x210 vfs_write+0x236/0x4a0 ksys_write+0x61/0xd0 do_syscall_64+0x55/0x80 ? find_held_lock+0x2b/0x80 ? lock_release+0x13d/0x2d0 ? up_read+0x17/0x20 ? lock_is_held_type+0xe3/0x140 ? asm_exc_page_fault+0x22/0x30 ? lockdep_hardirqs_on+0x7d/0x100 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fc9b2c9e0c4 Code: 15 71 7d 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 80 3d 3d 05 0e 00 00 74 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 48 83 ec 28 48 89 54 24 18 48 RSP: 002b:00007ffec29c81c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000000000d RCX: 00007fc9b2c9e0c4 RDX: 000000000000000d RSI: 0000559f8b5f48a0 RDI: 0000000000000001 RBP: 0000559f8b5f48a0 R08: 0000559f8b5f3540 R09: 00007fc9b2d76d30 R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000d R13: 00007fc9b2d77780 R14: 000000000000000d R15: 00007fc9b2d72a00 Modules linked in: sunrpc intel_rapl_msr intel_rapl_common intel_pmc_core_pltdrv intel_pmc_core intel_tcc_cooling x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel ee1004 igbvf rapl vfat fat intel_cstate intel_uncore pktcdvd i2c_i801 pcspkr wmi_bmof i2c_smbus acpi_pad vfio_pci vfio_pci_core vfio_virqfd zram fuse dm_multipath kvmgt mdev vfio_iommu_type1 vfio kvm irqbypass i915 nvme e1000e igb nvme_core crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni polyval_generic serio_raw ghash_clmulni_intel sha512_ssse3 dca drm_buddy intel_gtt video wmi drm_display_helper ttm CR2: 0000000000000150 ---[ end trace 0000000000000000 ]--- Cc: Wang Zhi Cc: He Yu Cc: Alex Williamson Cc: stable@vger.kernel.org Reviewed-by: Zhi Wang Tested-by: Yu He Fixes: bc7b0be316ae ("drm/i915/gvt: Add basic debugfs infrastructure") Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20221219140357.769557-2-zhenyuw@linux.intel.com drivers/gpu/drm/i915/gvt/debugfs.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c4b850d1f448a901fbf4f7f36dec38c84009b489 Author: Zhenyu Wang Date: Mon Dec 19 22:03:56 2022 +0800 drm/i915/gvt: fix gvt debugfs destroy When gvt debug fs is destroyed, need to have a sane check if drm minor's debugfs root is still available or not, otherwise in case like device remove through unbinding, drm minor's debugfs directory has already been removed, then intel_gvt_debugfs_clean() would act upon dangling pointer like below oops. i915 0000:00:02.0: Direct firmware load for i915/gvt/vid_0x8086_did_0x1926_rid_0x0a.golden_hw_state failed with error -2 i915 0000:00:02.0: MDEV: Registered Console: switching to colour dummy device 80x25 i915 0000:00:02.0: MDEV: Unregistering BUG: kernel NULL pointer dereference, address: 00000000000000a0 PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP PTI CPU: 2 PID: 2486 Comm: gfx-unbind.sh Tainted: G I 6.1.0-rc8+ #15 Hardware name: Dell Inc. XPS 13 9350/0JXC1H, BIOS 1.13.0 02/10/2020 RIP: 0010:down_write+0x1f/0x90 Code: 1d ff ff 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 53 48 89 fb e8 62 c0 ff ff bf 01 00 00 00 e8 28 5e 31 ff 31 c0 ba 01 00 00 00 48 0f b1 13 75 33 65 48 8b 04 25 c0 bd 01 00 48 89 43 08 bf 01 RSP: 0018:ffff9eb3036ffcc8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000000000a0 RCX: ffffff8100000000 RDX: 0000000000000001 RSI: 0000000000000064 RDI: ffffffffa48787a8 RBP: ffff9eb3036ffd30 R08: ffffeb1fc45a0608 R09: ffffeb1fc45a05c0 R10: 0000000000000002 R11: 0000000000000000 R12: 0000000000000000 R13: ffff91acc33fa328 R14: ffff91acc033f080 R15: ffff91acced533e0 FS: 00007f6947bba740(0000) GS:ffff91ae36d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000a0 CR3: 00000001133a2002 CR4: 00000000003706e0 Call Trace: simple_recursive_removal+0x9f/0x2a0 ? start_creating.part.0+0x120/0x120 ? _raw_spin_lock+0x13/0x40 debugfs_remove+0x40/0x60 intel_gvt_debugfs_clean+0x15/0x30 [kvmgt] intel_gvt_clean_device+0x49/0xe0 [kvmgt] intel_gvt_driver_remove+0x2f/0xb0 i915_driver_remove+0xa4/0xf0 i915_pci_remove+0x1a/0x30 pci_device_remove+0x33/0xa0 device_release_driver_internal+0x1b2/0x230 unbind_store+0xe0/0x110 kernfs_fop_write_iter+0x11b/0x1f0 vfs_write+0x203/0x3d0 ksys_write+0x63/0xe0 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6947cb5190 Code: 40 00 48 8b 15 71 9c 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 80 3d 51 24 0e 00 00 74 17 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83 ec 28 48 89 RSP: 002b:00007ffcbac45a28 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000000000d RCX: 00007f6947cb5190 RDX: 000000000000000d RSI: 0000555e35c866a0 RDI: 0000000000000001 RBP: 0000555e35c866a0 R08: 0000000000000002 R09: 0000555e358cb97c R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000001 R13: 000000000000000d R14: 0000000000000000 R15: 0000555e358cb8e0 Modules linked in: kvmgt CR2: 00000000000000a0 ---[ end trace 0000000000000000 ]--- Cc: Wang, Zhi Cc: He, Yu Cc: stable@vger.kernel.org Reviewed-by: Zhi Wang Fixes: bc7b0be316ae ("drm/i915/gvt: Add basic debugfs infrastructure") Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20221219140357.769557-1-zhenyuw@linux.intel.com drivers/gpu/drm/i915/gvt/debugfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3792fc508c095abd84b10ceae12bd773e61fdc36 Author: Dan Carpenter Date: Tue Nov 15 16:15:18 2022 +0300 drm/i915: unpin on error in intel_vgpu_shadow_mm_pin() Call intel_vgpu_unpin_mm() on this error path. Fixes: 418741480809 ("drm/i915/gvt: Adding ppgtt to GVT GEM context after shadow pdps settled.") Signed-off-by: Dan Carpenter Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/Y3OQ5tgZIVxyQ/WV@kili Reviewed-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 1 + 1 file changed, 1 insertion(+) commit 16f1f838442dc6430d32d51ddda347b8421ec34b Author: Takashi Iwai Date: Wed Jan 4 16:09:44 2023 +0100 Revert "ALSA: usb-audio: Drop superfluous interface setup at parsing" This reverts commit ac5e2fb425e1121ceef2b9d1b3ffccc195d55707. The commit caused a regression on Behringer UMC404HD (and likely others). As the change was meant only as a minor optimization, it's better to revert it to address the regression. Reported-and-tested-by: Michael Ralston Cc: Link: https://lore.kernel.org/r/CAC2975JXkS1A5Tj9b02G_sy25ZWN-ys+tc9wmkoS=qPgKCogSg@mail.gmail.com Link: https://lore.kernel.org/r/20230104150944.24918-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/stream.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 39a154fc2d172a3a5865e5a9fa2a2983eb7a99ac Author: Paulo Alcantara Date: Thu Dec 29 18:43:46 2022 -0300 cifs: protect access of TCP_Server_Info::{dstaddr,hostname} Use the appropriate locks to protect access of hostname and dstaddr fields in cifs_tree_connect() as they might get changed by other tasks. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Enzo Matsumiya Signed-off-by: Steve French fs/cifs/dfs.c | 22 +++++++++++----------- fs/cifs/misc.c | 2 ++ 2 files changed, 13 insertions(+), 11 deletions(-) commit 191f8453fc99a537ea78b727acea739782378b0d Author: Jens Axboe Date: Wed Jan 4 07:48:37 2023 -0700 ARM: renumber bits related to _TIF_WORK_MASK We want to ensure that the mask related to calling do_work_pending() is within the first 16 bits. Move bits unrelated to that outside of that range, to avoid spuriously calling do_work_pending() when we don't need to. Cc: stable@vger.kernel.org Fixes: 32d59773da38 ("arm: add support for TIF_NOTIFY_SIGNAL") Reported-and-tested-by: Hui Tang Suggested-by: Russell King (Oracle) Link: https://lore.kernel.org/lkml/7ecb8f3c-2aeb-a905-0d4a-aa768b9649b5@huawei.com/ Signed-off-by: Jens Axboe arch/arm/include/asm/thread_info.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 54b353a20c7e8be98414754f5aff98c8a68fcc1f Author: Namhyung Kim Date: Tue Jan 3 22:44:02 2023 -0800 perf stat: Fix handling of --for-each-cgroup with --bpf-counters to match non BPF mode The --for-each-cgroup can have the same cgroup multiple times, but this confuses BPF counters (since they have the same cgroup id), making only the last cgroup events to be counted. Let's check the cgroup name before adding a new entry to the cgroups list. Before: $ sudo ./perf stat -a --bpf-counters --for-each-cgroup /,/ sleep 1 Performance counter stats for 'system wide': msec cpu-clock / context-switches / cpu-migrations / page-faults / cycles / instructions / branches / branch-misses / 8,016.04 msec cpu-clock / # 7.998 CPUs utilized 6,152 context-switches / # 767.461 /sec 250 cpu-migrations / # 31.187 /sec 442 page-faults / # 55.139 /sec 613,111,487 cycles / # 0.076 GHz 280,599,604 instructions / # 0.46 insn per cycle 57,692,724 branches / # 7.197 M/sec 3,385,168 branch-misses / # 5.87% of all branches 1.002220125 seconds time elapsed After it becomes similar to the non-BPF mode: $ sudo ./perf stat -a --bpf-counters --for-each-cgroup /,/ sleep 1 Performance counter stats for 'system wide': 8,013.38 msec cpu-clock / # 7.998 CPUs utilized 6,859 context-switches / # 855.944 /sec 334 cpu-migrations / # 41.680 /sec 345 page-faults / # 43.053 /sec 782,326,119 cycles / # 0.098 GHz 471,645,724 instructions / # 0.60 insn per cycle 94,963,430 branches / # 11.851 M/sec 3,685,511 branch-misses / # 3.88% of all branches 1.001864539 seconds time elapsed Committer notes: As a reminder, to test with BPF counters one has to use BUILD_BPF_SKEL=1 in the make command line and have clang/llvm installed when building perf, otherwise the --bpf-counters option will not be available: # perf stat -a --bpf-counters --for-each-cgroup /,/ sleep 1 Error: unknown option `bpf-counters' Usage: perf stat [] [] -a, --all-cpus system-wide collection from all CPUs # Fixes: bb1c15b60b981d10 ("perf stat: Support regex pattern in --for-each-cgroup") Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: bpf@vger.kernel.org Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Link: https://lore.kernel.org/r/20230104064402.1551516-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 2d656b0f81b22101db0447f890e39fdd736b745e Author: Namhyung Kim Date: Tue Jan 3 22:44:01 2023 -0800 perf stat: Fix handling of unsupported cgroup events when using BPF counters When --for-each-cgroup option is used, it fails when any of events is not supported and exits immediately. This is not how 'perf stat' handles unsupported events. Let's ignore the failure and proceed with others so that the output is similar to when BPF counters are not used: Before: $ sudo ./perf stat -a --bpf-counters -e L1-icache-loads,L1-dcache-loads --for-each-cgroup system.slice,user.slice sleep 1 Failed to open first cgroup events $ After it shows output similat to when --bpf-counters isn't specified: $ sudo ./perf stat -a --bpf-counters -e L1-icache-loads,L1-dcache-loads --for-each-cgroup system.slice,user.slice sleep 1 Performance counter stats for 'system wide': L1-icache-loads system.slice 29,892,418 L1-dcache-loads system.slice L1-icache-loads user.slice 52,497,220 L1-dcache-loads user.slice $ Fixes: 944138f048f7d759 ("perf stat: Enable BPF counter with --for-each-cgroup") 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: Song Liu Link: https://lore.kernel.org/r/20230104064402.1551516-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_counter_cgroup.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit fb710ddee75fb96f50ee6d004ef777a0cf7ad5a3 Author: Thomas Richter Date: Wed Dec 28 15:57:03 2022 +0100 perf test record_probe_libc_inet_pton: Fix test on s/390 where 'text_to_binary_address' now appears on the backtrace perf test '84: probe libc's inet_pton & backtrace it with ping' fails on s390. Debugging revealed a changed stack trace for the ping command using probes: ping 35729 [002] 8006.365063: probe_libc:inet_pton: (3ff9603e7c0) 13e7c0 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6) ---> 104371 text_to_binary_address+0xef1 (inlined) 104371 gaih_inet+0xef1 (inlined) 104371 __GI_getaddrinfo+0xef1 (inlined) 5d4b main+0x139b (/usr/bin/ping) The line "---> text_to_binary_address ..." is new. It was introduced with glibc version 2.36.7.2 released with Fedora 37 for s390. Output before # perf test inet_pton 84: probe libc's inet_pton & backtrace it with ping : FAILED! # Output after: # perf test inet_pton 84: probe libc's inet_pton & backtrace it with ping : Ok # Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20221228145704.2702487-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 1 + 1 file changed, 1 insertion(+) commit 760d560f71c828a97c77596af5c3f9978aefd9d1 Author: Lukas Bulwahn Date: Thu Dec 15 11:34:52 2022 +0100 PCI: dwc: Adjust to recent removal of PCI_MSI_IRQ_DOMAIN a474d3fbe287 ("PCI/MSI: Get rid of PCI_MSI_IRQ_DOMAIN") removed PCI_MSI_IRQ_DOMAIN and changed all references to refer to PCI_MSI instead. ba6ed462dcf4 ("PCI: dwc: Add Baikal-T1 PCIe controller support") independently added PCIE_BT1, depending on PCI_MSI_IRQ_DOMAIN. Both commits appeared in v6.2-rc1, so the latter missed the conversion from PCI_MSI_IRQ_DOMAIN to PCI_MSI. Update PCIE_BT1 to depend on PCI_MSI instead. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20221215103452.23131-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Serge Semin drivers/pci/controller/dwc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c956541736b94944047ee52ebfc5ee4babcd6ca1 Author: Hector Martin Date: Wed Jan 4 19:21:49 2023 +0900 cpufreq: apple-soc: Switch to the lowest frequency on suspend Without this, the CPUs are left in a random pstate. Since we don't support deep idle yet (which powers down the CPUs), this results in significantly increased idle power consumption in suspend. Fixes: 6286bbb40576 ("cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states") Signed-off-by: Hector Martin Signed-off-by: Viresh Kumar drivers/cpufreq/apple-soc-cpufreq.c | 2 ++ 1 file changed, 2 insertions(+) commit fa81ab49bbe4e1ce756581c970486de0ddb14309 Author: Miaoqian Lin Date: Fri Dec 16 14:03:03 2022 +0400 memblock: Fix doc for memblock_phys_free memblock_phys_free() is the counterpart to memblock_phys_alloc. Change memblock_alloc_xx() with memblock_phys_alloc_xx() to keep consistency. Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20221216100304.688209-1-linmq006@gmail.com Signed-off-by: Mike Rapoport (IBM) mm/memblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 340726747336716350eb5a928b860a29db955f05 Author: Aaron Thompson Date: Wed Jan 4 10:07:37 2023 +0000 memblock tests: Fix compilation error. Commit cf4694be2b2cf ("tools: Add atomic_test_and_set_bit()") changed tools/arch/x86/include/asm/atomic.h to include , which causes 'make -C tools/testing/memblock' to fail with: In file included from ../../include/asm/atomic.h:6, from ../../include/linux/atomic.h:5, from ./linux/mmzone.h:5, from ../../include/linux/mm.h:5, from ../../include/linux/pfn.h:5, from ./linux/memory_hotplug.h:6, from ./linux/init.h:7, from ./linux/memblock.h:11, from tests/common.h:8, from tests/basic_api.h:5, from main.c:2: ../../include/asm/../../arch/x86/include/asm/atomic.h:11:10: fatal error: asm/asm.h: No such file or directory 11 | #include | ^~~~~~~~~~~ Create a symlink to asm/asm.h in the same manner as the existing one to asm/cmpxchg.h. Signed-off-by: Aaron Thompson Link: https://lore.kernel.org/r/010101857c402765-96e2dbc6-b82b-47e2-a437-4834dbe0b96b-000000@us-west-2.amazonses.com Signed-off-by: Mike Rapoport (IBM) tools/testing/memblock/.gitignore | 1 + tools/testing/memblock/Makefile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit a664ec9158eeddd75121d39c9a0758016097fa96 Author: Rodrigo Branco Date: Tue Jan 3 14:17:51 2023 -0600 x86/bugs: Flush IBP in ib_prctl_set() We missed the window between the TIF flag update and the next reschedule. Signed-off-by: Rodrigo Branco Reviewed-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Cc: arch/x86/kernel/cpu/bugs.c | 2 ++ 1 file changed, 2 insertions(+) commit 37b3e56d8911f9ec1e1aaa5cccdff33cb0a7a832 Author: Takashi Iwai Date: Mon Jan 2 18:07:59 2023 +0100 ALSA: usb-audio: More refactoring of hw constraint rules Although we applied a workaround for the hw constraints code with the implicit feedback sync, it still has a potential problem. Namely, as the code treats only the first matching (sync) endpoint, it might be too restrictive when multiple endpoints are listed in the substream's format list. This patch is another attempt to improve the hw constraint handling for the implicit feedback sync. The code is rewritten and the sync EP handling for the rate and the format is put inside the fmt_list loop in each hw_rule_*() function instead of the additional rules. The rules for the period size and periods are extended to loop over the fmt_list like others, and they apply the constraints only if needed. Link: https://lore.kernel.org/r/4e509aea-e563-e592-e652-ba44af6733fe@veniogames.com Link: https://lore.kernel.org/r/20230102170759.29610-4-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/pcm.c | 218 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 131 insertions(+), 87 deletions(-) commit d463ac1acb454fafed58f695cb3067fbf489f3a0 Author: Takashi Iwai Date: Mon Jan 2 18:07:58 2023 +0100 ALSA: usb-audio: Relax hw constraints for implicit fb sync The fix commit the commit e4ea77f8e53f ("ALSA: usb-audio: Always apply the hw constraints for implicit fb sync") tried to address the bug where an incorrect PCM parameter is chosen when two (implicit fb) streams are set up at the same time. This change had, however, some side effect: once when the sync endpoint is chosen and set up, this restriction is applied at the next hw params unless it's freed via hw free explicitly. This patch is a workaround for the problem by relaxing the hw constraints a bit for the implicit fb sync. We still keep applying the hw constraints for implicit fb sync, but only when the matching sync EP is being used by other streams. Fixes: e4ea77f8e53f ("ALSA: usb-audio: Always apply the hw constraints for implicit fb sync") Reported-by: Ruud van Asseldonk Link: https://lore.kernel.org/r/4e509aea-e563-e592-e652-ba44af6733fe@veniogames.com Link: https://lore.kernel.org/r/20230102170759.29610-3-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/pcm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0599313e26666e79f6e7fe1450588431b8cb25d5 Author: Takashi Iwai Date: Mon Jan 2 18:07:57 2023 +0100 ALSA: usb-audio: Make sure to stop endpoints before closing EPs At the PCM hw params, we may re-configure the endpoints and it's done by a temporary EP close followed by re-open. A potential problem there is that the EP might be already running internally at the PCM prepare stage; it's seen typically in the playback stream with the implicit feedback sync. As this stream start isn't tracked by the core PCM layer, we'd need to stop it explicitly, and that's the missing piece. This patch adds the stop_endpoints() call at snd_usb_hw_params() to assure the stream stop before closing the EPs. Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") Link: https://lore.kernel.org/r/4e509aea-e563-e592-e652-ba44af6733fe@veniogames.com Link: https://lore.kernel.org/r/20230102170759.29610-2-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/pcm.c | 2 ++ 1 file changed, 2 insertions(+) commit 558016722e9d5bc0ac79c246ccd14a8a4eb028d4 Author: Srivatsa S. Bhat (VMware) Date: Tue Jan 3 14:09:41 2023 -0800 MAINTAINERS: Update maintainers for ptp_vmw driver Vivek has decided to transfer the maintainership of the VMware virtual PTP clock driver (ptp_vmw) to Srivatsa and Deep. Update the MAINTAINERS file to reflect this change, and also add Alexey as a reviewer for the driver. Signed-off-by: Srivatsa S. Bhat (VMware) Acked-by: Vivek Thampi Acked-by: Deep Shah Acked-by: Alexey Makhalov Signed-off-by: David S. Miller MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 53cd37c1368d07649421517ed0aab94a49cca003 Author: Krzysztof Kozlowski Date: Tue Dec 27 15:42:02 2022 +0100 dt-bindings: cpufreq: cpufreq-qcom-hw: document interrupts The Qualcomm Soc cpufreq hardware engine has LMh/thermal throttling interrupts (already present in SM8250 and SM8450 DTS) and Linux driver uses them: sm8250-hdk.dtb: cpufreq@18591000: 'interrupt-names', 'interrupts' do not match any of the regexes: 'pinctrl-[0-9]+' sm8450-qrd.dtb: cpufreq@17d91000: 'interrupt-names', 'interrupts' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Viresh Kumar .../devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) commit faf28e240dd118d9521c68aeb9388b9b8f02d9d0 Author: Konrad Dybcio Date: Tue Jan 3 18:11:29 2023 +0100 cpufreq: Add SM6375 to cpufreq-dt-platdev blocklist The Qualcomm SM6375 platform uses the qcom-cpufreq-hw driver, so add it to the cpufreq-dt-platdev driver's blocklist. Signed-off-by: Konrad Dybcio Signed-off-by: Viresh Kumar drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+) commit 775e44d6d86dca400d614cbda5dab4def4951fe7 Author: Paulo Alcantara Date: Thu Dec 29 12:33:56 2022 -0300 cifs: fix race in assemble_neg_contexts() Serialise access of TCP_Server_Info::hostname in assemble_neg_contexts() by holding the server's mutex otherwise it might end up accessing an already-freed hostname pointer from cifs_reconnect() or cifs_resolve_server(). Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Enzo Matsumiya Signed-off-by: Steve French fs/cifs/smb2pdu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 9e6002c8738a9d5675ba706fcdbc0a544f814974 Author: Paulo Alcantara Date: Thu Dec 29 12:33:55 2022 -0300 cifs: ignore ipc reconnect failures during dfs failover If it failed to reconnect ipc used for getting referrals, we can just ignore it as it is not required for reconnecting the share. The worst case would be not being able to detect or chase nested links as long as dfs root server is unreachable. Before patch: $ mount.cifs //root/dfs/link /mnt -o echo_interval=10,... -> target share: /fs0/share disconnect root & fs0 $ ls /mnt ls: cannot access '/mnt': Host is down connect fs0 $ ls /mnt ls: cannot access '/mnt': Resource temporarily unavailable After patch: $ mount.cifs //root/dfs/link /mnt -o echo_interval=10,... -> target share: /fs0/share disconnect root & fs0 $ ls /mnt ls: cannot access '/mnt': Host is down connect fs0 $ ls /mnt bar.rtf dir1 foo Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Enzo Matsumiya Signed-off-by: Steve French fs/cifs/dfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 67fcb2c598bc7643f694e8194d5c300a52af5aa9 Author: Ira Weiny Date: Thu Dec 29 14:04:46 2022 -0800 cifs: Fix kmap_local_page() unmapping kmap_local_page() requires kunmap_local() to unmap the mapping. In addition memcpy_page() is provided to perform this common memcpy pattern. Replace the kmap_local_page() and broken kunmap() with memcpy_page() Fixes: d406d26745ab ("cifs: skip alloc when request has no pages") Reviewed-by: Paulo Alcantara Reviewed-by: "Fabio M. De Francesco" Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Ira Weiny Signed-off-by: Steve French fs/cifs/smb2ops.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 1cba0d150fa102439114a91b3e215909efc9f169 Author: Kuogee Hsieh Date: Tue Dec 27 18:16:24 2022 -0800 drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer There are 3 possible interrupt sources are handled by DP controller, HPDstatus, Controller state changes and Aux read/write transaction. At every irq, DP controller have to check isr status of every interrupt sources and service the interrupt if its isr status bits shows interrupts are pending. There is potential race condition may happen at current aux isr handler implementation since it is always complete dp_aux_cmd_fifo_tx() even irq is not for aux read or write transaction. This may cause aux read transaction return premature if host aux data read is in the middle of waiting for sink to complete transferring data to host while irq happen. This will cause host's receiving buffer contains unexpected data. This patch fixes this problem by checking aux isr and return immediately at aux isr handler if there are no any isr status bits set. Current there is a bug report regrading eDP edid corruption happen during system booting up. After lengthy debugging to found that VIDEO_READY interrupt was continuously firing during system booting up which cause dp_aux_isr() to complete dp_aux_cmd_fifo_tx() prematurely to retrieve data from aux hardware buffer which is not yet contains complete data transfer from sink. This cause edid corruption. Follows are the signature at kernel logs when problem happen, EDID has corrupt header panel-simple-dp-aux aux-aea0000.edp: Couldn't identify panel via EDID Changes in v2: -- do complete if (ret == IRQ_HANDLED) ay dp-aux_isr() -- add more commit text Changes in v3: -- add Stephen suggested -- dp_aux_isr() return IRQ_XXX back to caller -- dp_ctrl_isr() return IRQ_XXX back to caller Changes in v4: -- split into two patches Changes in v5: -- delete empty line between tags Changes in v6: -- remove extra "that" and fixed line more than 75 char at commit text Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Signed-off-by: Kuogee Hsieh Tested-by: Douglas Anderson Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/516121/ Link: https://lore.kernel.org/r/1672193785-11003-2-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/dp/dp_aux.c | 4 ++++ 1 file changed, 4 insertions(+) commit f26cc9593581bd734c846bf827401350b36dc3c9 Author: Pavel Begunkov Date: Wed Jan 4 01:34:57 2023 +0000 io_uring: lockdep annotate CQ locking Locking around CQE posting is complex and depends on options the ring is created with, add more thorough lockdep annotations checking all invariants. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/aa3770b4eacae3915d782cc2ab2f395a99b4b232.1672795976.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 5 ++--- io_uring/io_uring.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) commit 9ffa13ff78a0a55df968a72d6f0ebffccee5c9f4 Author: Pavel Begunkov Date: Wed Jan 4 01:34:02 2023 +0000 io_uring: pin context while queueing deferred tw Unlike normal tw, nothing prevents deferred tw to be executed right after an tw item added to ->work_llist in io_req_local_work_add(). For instance, the waiting task may get waken up by CQ posting or a normal tw. Thus we need to pin the ring for the rest of io_req_local_work_add() Cc: stable@vger.kernel.org Fixes: c0e0d6ba25f18 ("io_uring: add IORING_SETUP_DEFER_TASKRUN") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1a79362b9c10b8523ef70b061d96523650a23344.1672795998.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 937e7a39068d806c1a951f19e38e1326be20f1b0 Author: Andy Shevchenko Date: Thu Dec 29 12:07:46 2022 +0200 pinctrl: nomadik: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Fixes: e5530adc17a7 ("pinctrl: Clean up headers") Cc: Randy Dunlap Reported-by: Arnd Bergmann Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221229100746.35047-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/pinctrl-ab8500.c | 3 ++- drivers/pinctrl/nomadik/pinctrl-ab8505.c | 3 ++- drivers/pinctrl/nomadik/pinctrl-abx500.c | 32 +++++++++++++---------- drivers/pinctrl/nomadik/pinctrl-abx500.h | 4 +++ drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c | 3 +++ drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c | 3 +++ drivers/pinctrl/nomadik/pinctrl-nomadik.c | 32 ++++++++++++----------- drivers/pinctrl/nomadik/pinctrl-nomadik.h | 5 ++++ 8 files changed, 54 insertions(+), 31 deletions(-) commit 1d7a4a40bf76e2305c8beed4a019bf58af6121ac Author: Krzysztof Kozlowski Date: Fri Dec 23 14:21:59 2022 +0100 dt-bindings: soundwire: qcom,soundwire: correct sizes related to number of ports There are several properties depending on number of ports. Some of them had maximum limit of 5 and some of 8. SM8450 AudioReach comes with 8 ports, so fix the limits: sm8450-sony-xperia-nagara-pdx224.dtb: soundwire-controller@3250000: qcom,ports-word-length: 'oneOf' conditional failed, one must be fixed: [[255, 255, 255, 255, 255, 255, 255, 255]] is too short [255, 255, 255, 255, 255, 255, 255, 255] is too long Fixes: febc50b82bc9 ("dt-bindings: soundwire: Convert text bindings to DT Schema") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221223132159.81211-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring .../devicetree/bindings/soundwire/qcom,soundwire.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2a12187d5853d9fd5102278cecef7dac7c8ce7ea Author: Andreas Rammhold Date: Fri Dec 23 12:27:47 2022 +0100 of/fdt: run soc memory setup when early_init_dt_scan_memory fails If memory has been found early_init_dt_scan_memory now returns 1. If it hasn't found any memory it will return 0, allowing other memory setup mechanisms to carry on. Previously early_init_dt_scan_memory always returned 0 without distinguishing between any kind of memory setup being done or not. Any code path after the early_init_dt_scan memory call in the ramips plat_mem_setup code wouldn't be executed anymore. Making early_init_dt_scan_memory the only way to initialize the memory. Some boards, including my mt7621 based Cudy X6 board, depend on memory initialization being done via the soc_info.mem_detect function pointer. Those wouldn't be able to obtain memory and panic the kernel during early bootup with the message "early_init_dt_alloc_memory_arch: Failed to allocate 12416 bytes align=0x40". Fixes: 1f012283e936 ("of/fdt: Rework early_init_dt_scan_memory() to call directly") Cc: stable@vger.kernel.org Signed-off-by: Andreas Rammhold Link: https://lore.kernel.org/r/20221223112748.2935235-1-andreas@rammhold.de Signed-off-by: Rob Herring arch/mips/ralink/of.c | 2 +- drivers/of/fdt.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit f3c23bea598ab7e8e4b8c5ca66598921310f718e 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 Cc: stable@vger.kernel.org # 6.0.x, 6.1.x drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cf97eb7e47d4671084c7e114c5d88a3d0540ecbd 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 Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8de526215fdab9f2dd0d9675582cf9f1391a919 Merge: 88603b6dc419 03dec92c4f78 Author: Daniel Vetter Date: Tue Jan 3 21:02:28 2023 +0100 Merge tag 'drm-misc-next-fixes-2023-01-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Maxime writes: "The drm-misc-next-fixes leftovers. It addresses a bug in drm/scheduler ending up causing a lockup, and reduces the stack usage of some drm/mm kunit tests." Signed-off-by: Daniel Vetter From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230103144926.bmjjni3xnuis2jmq@houat commit d8d85ce86dc82de4f88b821a78f533b9d5b22a45 Author: Thomas Richter Date: Fri Dec 30 11:26:27 2022 +0100 perf lock contention: Fix core dump related to not finding the "__sched_text_end" symbol on s/390 The test case perf lock contention dumps core on s390. Run the following commands: # ./perf lock record -- ./perf bench sched messaging # Running 'sched/messaging' benchmark: # 20 sender and receiver processes per group # 10 groups == 400 processes run Total time: 2.799 [sec] [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.073 MB perf.data (100 samples) ] # # ./perf lock contention Segmentation fault (core dumped) # The function call stack is lengthy, here are the top 5 functions: # gdb ./perf core.24048 GNU gdb (GDB) Fedora Linux 12.1-6.fc37 Core was generated by `./perf lock contention'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00000000011dd25c in machine__is_lock_function (machine=0x3029e28, addr=1789230) at util/machine.c:3356 3356 machine->sched.text_end = kmap->unmap_ip(kmap, sym->start); (gdb) where #0 0x00000000011dd25c in machine__is_lock_function (machine=0x3029e28, addr=1789230) at util/machine.c:3356 #1 0x000000000109f244 in callchain_id (evsel=0x30313e0, sample=0x3ffea4f77d0) at builtin-lock.c:957 #2 0x000000000109e094 in get_key_by_aggr_mode (key=0x3ffea4f7290, addr=27758136, evsel=0x30313e0, sample=0x3ffea4f77d0) at builtin-lock.c:586 #3 0x000000000109f4d0 in report_lock_contention_begin_event (evsel=0x30313e0, sample=0x3ffea4f77d0) at builtin-lock.c:1004 #4 0x00000000010a00ae in evsel__process_contention_begin (evsel=0x30313e0, sample=0x3ffea4f77d0) at builtin-lock.c:1254 #5 0x00000000010a0e14 in process_sample_event (tool=0x3ffea4f8480, event=0x3ff85601ef8, sample=0x3ffea4f77d0, evsel=0x30313e0, machine=0x3029e28) at builtin-lock.c:1464 ..... The issue is in function machine__is_lock_function() in file ./util/machine.c lines 3355: /* should not fail from here */ sym = machine__find_kernel_symbol_by_name(machine, "__sched_text_end", &kmap); machine->sched.text_end = kmap->unmap_ip(kmap, sym->start) On s390 the symbol __sched_text_end is *NOT* in the symbol list and the resulting pointer sym is set to NULL. The sym->start is then a NULL pointer access and generates the core dump. The reason why __sched_text_end is not in the symbol list on s390 is simple: When the symbol list is created at perf start up with function calls dso__load +--> dso__load_vmlinux_path +--> dso__load_vmlinux +--> dso__load_sym +--> dso__load_sym_internal (reads kernel symbols) +--> symbols__fixup_end +--> symbols__fixup_duplicate The issue is in function symbols__fixup_duplicate(). It deletes all symbols with have the same address. On s390: # nm -g ~/linux/vmlinux| fgrep c68390 0000000000c68390 T __cpuidle_text_start 0000000000c68390 T __sched_text_end # two symbols have identical addresses and __sched_text_end is considered duplicate (in ascending sort order) and removed from the symbol list. Therefore it is missing and an invalid pointer reference occurs. The code checks for symbol __sched_text_start and when it exists assumes symbol __sched_text_end is also in the symbol table. However this is not the case on s390. Same situation exists for symbol __lock_text_start: 0000000000c68770 T __cpuidle_text_end 0000000000c68770 T __lock_text_start This symbol is also removed from the symbol table but used in function machine__is_lock_function(). To fix this and keep duplicate symbols in the symbol table, set symbol_conf.allow_aliases to true. This prevents the removal of duplicate symbols in function symbols__fixup_duplicate(). Output After: # ./perf lock contention contended total wait max wait avg wait type caller 48 124.39 ms 123.99 ms 2.59 ms rwsem:W unlink_anon_vmas+0x24a 47 83.68 ms 83.26 ms 1.78 ms rwsem:W free_pgtables+0x132 5 41.22 us 10.55 us 8.24 us rwsem:W free_pgtables+0x140 4 40.12 us 20.55 us 10.03 us rwsem:W copy_process+0x1ac8 # Fixes: 0d2997f750d1de39 ("perf lock: Look up callchain for the contended locks") Signed-off-by: Thomas Richter Acked-by: Namhyung Kim Cc: Heiko Carstens Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20221230102627.2410847-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 2 ++ 1 file changed, 2 insertions(+) commit f89fb55714b620ff1352141a9f9315611f16573e Author: Ian Rogers Date: Mon Jan 2 23:09:16 2023 -0800 perf build: Don't propagate subdir to submakes for install_headers subdir is added to the OUTPUT which fails as part of building install_headers when passed from "make -C tools perf_install". Committer testing: The original reporter (see the Link: below) had trouble with this: $ make -C tools perf_install That ended up with errors like this: /var/home/acme/git/perf-urgent/tools/scripts/Makefile.include:17: *** output directory "/var/home/acme/git/perf-urgent/tools/perf/libperf/perf/" does not exist. Stop. With this patch applied we now get it installed at: INSTALL /var/home/acme/git/perf-urgent/tools/perf/libperf/include/perf/bpf_perf.h As expected: $ ls -la /var/home/acme/git/perf-urgent/tools/perf/libperf/include/perf/bpf_perf.h -rw-r--r--. 1 acme acme 1146 Jan 3 15:42 /var/home/acme/git/perf-urgent/tools/perf/libperf/include/perf/bpf_perf.h And if we clean tools with: $ make -C tools clean it gets cleaned up: $ ls -la /var/home/acme/git/perf-urgent/tools/perf/libperf/include/perf/bpf_perf.h ls: cannot access '/var/home/acme/git/perf-urgent/tools/perf/libperf/include/perf/bpf_perf.h': No such file or directory $ Fixes: 746bd29e348f99b4 ("perf build: Use tools/lib headers from install path") Reported-by: Torsten Hilbrich Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/fa4b3115-d555-3d7f-54d1-018002e99350@secunet.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e195605ed28b5581dc2d509283cfea2e8635a251 Author: Li zeming Date: Tue Jan 3 09:54:28 2023 -0800 xfs: xfs_qm: remove unnecessary ‘0’ values from error error is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_qm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4da112513c01d7d0acf1025b8764349d46e177d6 Author: Wu Guanghao Date: Tue Dec 27 09:41:30 2022 -0800 xfs: Fix deadlock on xfs_inodegc_worker We are doing a test about deleting a large number of files when memory is low. A deadlock problem was found. [ 1240.279183] -> #1 (fs_reclaim){+.+.}-{0:0}: [ 1240.280450] lock_acquire+0x197/0x460 [ 1240.281548] fs_reclaim_acquire.part.0+0x20/0x30 [ 1240.282625] kmem_cache_alloc+0x2b/0x940 [ 1240.283816] xfs_trans_alloc+0x8a/0x8b0 [ 1240.284757] xfs_inactive_ifree+0xe4/0x4e0 [ 1240.285935] xfs_inactive+0x4e9/0x8a0 [ 1240.286836] xfs_inodegc_worker+0x160/0x5e0 [ 1240.287969] process_one_work+0xa19/0x16b0 [ 1240.289030] worker_thread+0x9e/0x1050 [ 1240.290131] kthread+0x34f/0x460 [ 1240.290999] ret_from_fork+0x22/0x30 [ 1240.291905] [ 1240.291905] -> #0 ((work_completion)(&gc->work)){+.+.}-{0:0}: [ 1240.293569] check_prev_add+0x160/0x2490 [ 1240.294473] __lock_acquire+0x2c4d/0x5160 [ 1240.295544] lock_acquire+0x197/0x460 [ 1240.296403] __flush_work+0x6bc/0xa20 [ 1240.297522] xfs_inode_mark_reclaimable+0x6f0/0xdc0 [ 1240.298649] destroy_inode+0xc6/0x1b0 [ 1240.299677] dispose_list+0xe1/0x1d0 [ 1240.300567] prune_icache_sb+0xec/0x150 [ 1240.301794] super_cache_scan+0x2c9/0x480 [ 1240.302776] do_shrink_slab+0x3f0/0xaa0 [ 1240.303671] shrink_slab+0x170/0x660 [ 1240.304601] shrink_node+0x7f7/0x1df0 [ 1240.305515] balance_pgdat+0x766/0xf50 [ 1240.306657] kswapd+0x5bd/0xd20 [ 1240.307551] kthread+0x34f/0x460 [ 1240.308346] ret_from_fork+0x22/0x30 [ 1240.309247] [ 1240.309247] other info that might help us debug this: [ 1240.309247] [ 1240.310944] Possible unsafe locking scenario: [ 1240.310944] [ 1240.312379] CPU0 CPU1 [ 1240.313363] ---- ---- [ 1240.314433] lock(fs_reclaim); [ 1240.315107] lock((work_completion)(&gc->work)); [ 1240.316828] lock(fs_reclaim); [ 1240.318088] lock((work_completion)(&gc->work)); [ 1240.319203] [ 1240.319203] *** DEADLOCK *** ... [ 2438.431081] Workqueue: xfs-inodegc/sda xfs_inodegc_worker [ 2438.432089] Call Trace: [ 2438.432562] __schedule+0xa94/0x1d20 [ 2438.435787] schedule+0xbf/0x270 [ 2438.436397] schedule_timeout+0x6f8/0x8b0 [ 2438.445126] wait_for_completion+0x163/0x260 [ 2438.448610] __flush_work+0x4c4/0xa40 [ 2438.455011] xfs_inode_mark_reclaimable+0x6ef/0xda0 [ 2438.456695] destroy_inode+0xc6/0x1b0 [ 2438.457375] dispose_list+0xe1/0x1d0 [ 2438.458834] prune_icache_sb+0xe8/0x150 [ 2438.461181] super_cache_scan+0x2b3/0x470 [ 2438.461950] do_shrink_slab+0x3cf/0xa50 [ 2438.462687] shrink_slab+0x17d/0x660 [ 2438.466392] shrink_node+0x87e/0x1d40 [ 2438.467894] do_try_to_free_pages+0x364/0x1300 [ 2438.471188] try_to_free_pages+0x26c/0x5b0 [ 2438.473567] __alloc_pages_slowpath.constprop.136+0x7aa/0x2100 [ 2438.482577] __alloc_pages+0x5db/0x710 [ 2438.485231] alloc_pages+0x100/0x200 [ 2438.485923] allocate_slab+0x2c0/0x380 [ 2438.486623] ___slab_alloc+0x41f/0x690 [ 2438.490254] __slab_alloc+0x54/0x70 [ 2438.491692] kmem_cache_alloc+0x23e/0x270 [ 2438.492437] xfs_trans_alloc+0x88/0x880 [ 2438.493168] xfs_inactive_ifree+0xe2/0x4e0 [ 2438.496419] xfs_inactive+0x4eb/0x8b0 [ 2438.497123] xfs_inodegc_worker+0x16b/0x5e0 [ 2438.497918] process_one_work+0xbf7/0x1a20 [ 2438.500316] worker_thread+0x8c/0x1060 [ 2438.504938] ret_from_fork+0x22/0x30 When the memory is insufficient, xfs_inonodegc_worker will trigger memory reclamation when memory is allocated, then flush_work() may be called to wait for the work to complete. This causes a deadlock. So use memalloc_nofs_save() to avoid triggering memory reclamation in xfs_inodegc_worker. Signed-off-by: Wu Guanghao Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_icache.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 817644fa4525258992f17fecf4f1d6cdd2e1b731 Author: Hironori Shiina Date: Mon Dec 26 10:11:19 2022 -0800 xfs: get root inode correctly at bulkstat The root inode number should be set to `breq->startino` for getting stat information of the root when XFS_BULK_IREQ_SPECIAL_ROOT is used. Otherwise, the inode search is started from 1 (XFS_BULK_IREQ_SPECIAL_ROOT) and the inode with the lowest number in a filesystem is returned. Fixes: bf3cb3944792 ("xfs: allow single bulkstat of special inodes") Signed-off-by: Hironori Shiina Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c0f399ff51495ac8d30367418f4f6292ecd61fbe Author: Darrick J. Wong Date: Mon Dec 26 10:11:18 2022 -0800 xfs: fix off-by-one error in xfs_btree_space_to_height Lately I've been stress-testing extreme-sized rmap btrees by using the (new) xfs_db bmap_inflate command to clone bmbt mappings billions of times and then using xfs_repair to build new rmap and refcount btrees. This of course is /much/ faster than actually FICLONEing a file billions of times. Unfortunately, xfs_repair fails in xfs_btree_bload_compute_geometry with EOVERFLOW, which indicates that xfs_mount.m_rmap_maxlevels is not sufficiently large for the test scenario. For a 1TB filesystem (~67 million AG blocks, 4 AGs) the btheight command reports: $ xfs_db -c 'btheight -n 4400801200 -w min rmapbt' /dev/sda rmapbt: worst case per 4096-byte block: 84 records (leaf) / 45 keyptrs (node) level 0: 4400801200 records, 52390491 blocks level 1: 52390491 records, 1164234 blocks level 2: 1164234 records, 25872 blocks level 3: 25872 records, 575 blocks level 4: 575 records, 13 blocks level 5: 13 records, 1 block 6 levels, 53581186 blocks total The AG is sufficiently large to build this rmap btree. Unfortunately, m_rmap_maxlevels is 5. Augmenting the loop in the space->height function to report height, node blocks, and blocks remaining produces this: ht 1 node_blocks 45 blockleft 67108863 ht 2 node_blocks 2025 blockleft 67108818 ht 3 node_blocks 91125 blockleft 67106793 ht 4 node_blocks 4100625 blockleft 67015668 final height: 5 The goal of this function is to compute the maximum height btree that can be stored in the given number of ondisk fsblocks. Starting with the top level of the tree, each iteration through the loop adds the fanout factor of the next level down until we run out of blocks. IOWs, maximum height is achieved by using the smallest fanout factor that can apply to that level. However, the loop setup is not correct. Top level btree blocks are allowed to contain fewer than minrecs items, so the computation is incorrect because the first time through the loop it should be using a fanout factor of 2. With this corrected, the above becomes: ht 1 node_blocks 2 blockleft 67108863 ht 2 node_blocks 90 blockleft 67108861 ht 3 node_blocks 4050 blockleft 67108771 ht 4 node_blocks 182250 blockleft 67104721 ht 5 node_blocks 8201250 blockleft 66922471 final height: 6 Fixes: 9ec691205e7d ("xfs: compute the maximum height of the rmap btree when reflink enabled") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_btree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c07311b5509f6035f1dd828db3e90ff4859cf3b9 Author: Chris Wilson Date: Wed Dec 28 06:34:54 2022 -0500 perf/x86/rapl: Treat Tigerlake like Icelake Since Tigerlake seems to have inherited its cstates and other RAPL power caps from Icelake, assume it also follows Icelake for its RAPL events. Signed-off-by: Chris Wilson Signed-off-by: Rodrigo Vivi Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Zhang Rui Link: https://lore.kernel.org/r/20221228113454.1199118-1-rodrigo.vivi@intel.com arch/x86/events/rapl.c | 2 ++ 1 file changed, 2 insertions(+) commit 72bb8f8cc088730c4d84117a6906f458c2fc64bb Author: Jason A. Donenfeld Date: Sun Jan 1 17:29:04 2023 +0100 x86/insn: Avoid namespace clash by separating instruction decoder MMIO type from MMIO trace type Both and define various MMIO_ enum constants, whose namespace overlaps. Rename the ones to have a INSN_ prefix, so that the headers can be used from the same source file. Signed-off-by: Jason A. Donenfeld Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230101162910.710293-2-Jason@zx2c4.com arch/x86/coco/tdx/tdx.c | 26 +++++++++++++------------- arch/x86/include/asm/insn-eval.h | 18 +++++++++--------- arch/x86/kernel/sev.c | 18 +++++++++--------- arch/x86/lib/insn-eval.c | 20 ++++++++++---------- 4 files changed, 41 insertions(+), 41 deletions(-) commit df9d44b645b83fffccfb4e28c1f93376585fdec8 Author: Jaegeuk Kim Date: Wed Dec 21 16:14:10 2022 -0800 f2fs: let's avoid panic if extent_tree is not created This patch avoids the below panic. pc : __lookup_extent_tree+0xd8/0x760 lr : f2fs_do_write_data_page+0x104/0x87c sp : ffffffc010cbb3c0 x29: ffffffc010cbb3e0 x28: 0000000000000000 x27: ffffff8803e7f020 x26: ffffff8803e7ed40 x25: ffffff8803e7f020 x24: ffffffc010cbb460 x23: ffffffc010cbb480 x22: 0000000000000000 x21: 0000000000000000 x20: ffffffff22e90900 x19: 0000000000000000 x18: ffffffc010c5d080 x17: 0000000000000000 x16: 0000000000000020 x15: ffffffdb1acdbb88 x14: ffffff888759e2b0 x13: 0000000000000000 x12: ffffff802da49000 x11: 000000000a001200 x10: ffffff8803e7ed40 x9 : ffffff8023195800 x8 : ffffff802da49078 x7 : 0000000000000001 x6 : 0000000000000000 x5 : 0000000000000006 x4 : ffffffc010cbba28 x3 : 0000000000000000 x2 : ffffffc010cbb480 x1 : 0000000000000000 x0 : ffffff8803e7ed40 Call trace: __lookup_extent_tree+0xd8/0x760 f2fs_do_write_data_page+0x104/0x87c f2fs_write_single_data_page+0x420/0xb60 f2fs_write_cache_pages+0x418/0xb1c __f2fs_write_data_pages+0x428/0x58c f2fs_write_data_pages+0x30/0x40 do_writepages+0x88/0x190 __writeback_single_inode+0x48/0x448 writeback_sb_inodes+0x468/0x9e8 __writeback_inodes_wb+0xb8/0x2a4 wb_writeback+0x33c/0x740 wb_do_writeback+0x2b4/0x400 wb_workfn+0xe4/0x34c process_one_work+0x24c/0x5bc worker_thread+0x3e8/0xa50 kthread+0x150/0x1b4 Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 22a341b43036415718f2d50f5f98b2f891fe17e9 Author: Jaegeuk Kim Date: Fri Dec 16 16:36:36 2022 -0800 f2fs: should use a temp extent_info for lookup Otherwise, __lookup_extent_tree() will override the given extent_info which will be used by caller. Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit ed2724765e58e3310d3de48f4a1761631b3dd640 Author: Jaegeuk Kim Date: Fri Dec 16 14:41:54 2022 -0800 f2fs: don't mix to use union values in extent_info Let's explicitly use the defined values in block_age case only. Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit fe59109ae5c0b34a8c7c07f693fc501b12b57787 Author: Jaegeuk Kim Date: Fri Dec 16 14:05:44 2022 -0800 f2fs: initialize extent_cache parameter This can avoid confusing tracepoint values. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 +- fs/f2fs/extent_cache.c | 2 +- fs/f2fs/file.c | 2 +- fs/f2fs/segment.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit b3d83066cbebc76dbac8a5fca931f64b4c6fff34 Author: Chao Yu Date: Fri Dec 30 23:43:32 2022 +0800 f2fs: fix to avoid NULL pointer dereference in f2fs_issue_flush() With below two cases, it will cause NULL pointer dereference when accessing SM_I(sbi)->fcc_info in f2fs_issue_flush(). a) If kthread_run() fails in f2fs_create_flush_cmd_control(), it will release SM_I(sbi)->fcc_info, - mount -o noflush_merge /dev/vda /mnt/f2fs - mount -o remount,flush_merge /dev/vda /mnt/f2fs -- kthread_run() fails - dd if=/dev/zero of=/mnt/f2fs/file bs=4k count=1 conv=fsync b) we will never allocate memory for SM_I(sbi)->fcc_info w/ below testcase, - mount -o ro /dev/vda /mnt/f2fs - mount -o rw,remount /dev/vda /mnt/f2fs - dd if=/dev/zero of=/mnt/f2fs/file bs=4k count=1 conv=fsync In order to fix this issue, let change as below: - fix error path handling in f2fs_create_flush_cmd_control(). - allocate SM_I(sbi)->fcc_info even if readonly is on. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 55d235361fccef573990dfa5724ab453866e7816 Author: Mikulas Patocka Date: Tue Jan 3 10:24:11 2023 -0500 x86/asm: Fix an assembler warning with current binutils Fix a warning: "found `movsd'; assuming `movsl' was meant" Signed-off-by: Mikulas Patocka Signed-off-by: Ingo Molnar Cc: linux-kernel@vger.kernel.org arch/x86/lib/iomap_copy_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e325285de2cd82fbdcc4df8898e4c6a597674816 Author: Cristian Marussi Date: Thu Dec 22 18:38:23 2022 +0000 firmware: arm_scmi: Fix virtio channels cleanup on shutdown When unloading the SCMI core stack module, configured to use the virtio SCMI transport, LOCKDEP reports the splat down below about unsafe locks dependencies. In order to avoid this possible unsafe locking scenario call upfront virtio_break_device() before getting hold of vioch->lock. ===================================================== WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected 6.1.0-00067-g6b934395ba07-dirty #4 Not tainted ----------------------------------------------------- rmmod/307 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: ffff000080c510e0 (&dev->vqs_list_lock){+.+.}-{3:3}, at: virtio_break_device+0x28/0x68 and this task is already holding: ffff00008288ada0 (&channels[i].lock){-.-.}-{3:3}, at: virtio_chan_free+0x60/0x168 [scmi_module] which would create a new lock dependency: (&channels[i].lock){-.-.}-{3:3} -> (&dev->vqs_list_lock){+.+.}-{3:3} but this new dependency connects a HARDIRQ-irq-safe lock: (&channels[i].lock){-.-.}-{3:3} ... which became HARDIRQ-irq-safe at: lock_acquire+0x128/0x398 _raw_spin_lock_irqsave+0x78/0x140 scmi_vio_complete_cb+0xb4/0x3b8 [scmi_module] vring_interrupt+0x84/0x120 vm_interrupt+0x94/0xe8 __handle_irq_event_percpu+0xb4/0x3d8 handle_irq_event_percpu+0x20/0x68 handle_irq_event+0x50/0xb0 handle_fasteoi_irq+0xac/0x138 generic_handle_domain_irq+0x34/0x50 gic_handle_irq+0xa0/0xd8 call_on_irq_stack+0x2c/0x54 do_interrupt_handler+0x8c/0x90 el1_interrupt+0x40/0x78 el1h_64_irq_handler+0x18/0x28 el1h_64_irq+0x64/0x68 _raw_write_unlock_irq+0x48/0x80 ep_start_scan+0xf0/0x128 do_epoll_wait+0x390/0x858 do_compat_epoll_pwait.part.34+0x1c/0xb8 __arm64_sys_epoll_pwait+0x80/0xd0 invoke_syscall+0x4c/0x110 el0_svc_common.constprop.3+0x98/0x120 do_el0_svc+0x34/0xd0 el0_svc+0x40/0x98 el0t_64_sync_handler+0x98/0xc0 el0t_64_sync+0x170/0x174 to a HARDIRQ-irq-unsafe lock: (&dev->vqs_list_lock){+.+.}-{3:3} ... which became HARDIRQ-irq-unsafe at: ... lock_acquire+0x128/0x398 _raw_spin_lock+0x58/0x70 __vring_new_virtqueue+0x130/0x1c0 vring_create_virtqueue+0xc4/0x2b8 vm_find_vqs+0x20c/0x430 init_vq+0x308/0x390 virtblk_probe+0x114/0x9b0 virtio_dev_probe+0x1a4/0x248 really_probe+0xc8/0x3a8 __driver_probe_device+0x84/0x190 driver_probe_device+0x44/0x110 __driver_attach+0x104/0x1e8 bus_for_each_dev+0x7c/0xd0 driver_attach+0x2c/0x38 bus_add_driver+0x1e4/0x258 driver_register+0x6c/0x128 register_virtio_driver+0x2c/0x48 virtio_blk_init+0x70/0xac do_one_initcall+0x84/0x420 kernel_init_freeable+0x2d0/0x340 kernel_init+0x2c/0x138 ret_from_fork+0x10/0x20 other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&dev->vqs_list_lock); local_irq_disable(); lock(&channels[i].lock); lock(&dev->vqs_list_lock); lock(&channels[i].lock); *** DEADLOCK *** ================ Fixes: 42e90eb53bf3f ("firmware: arm_scmi: Add a virtio channel refcount") Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222183823.518856-6-cristian.marussi@arm.com Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/virtio.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9bae076cd4e3e3c3dc185cae829d80b2dddec86e Author: Cristian Marussi Date: Thu Dec 22 18:38:21 2022 +0000 firmware: arm_scmi: Harden shared memory access in fetch_notification A misbheaving SCMI platform firmware could reply with out-of-spec notifications, shorter than the mimimum size comprising a header. Fixes: d5141f37c42e ("firmware: arm_scmi: Add notifications support in transport layer") Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222183823.518856-4-cristian.marussi@arm.com Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/shmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ad78b81a1077f7d956952cd8bdfe1e61504e3eb8 Author: Cristian Marussi Date: Thu Dec 22 18:38:20 2022 +0000 firmware: arm_scmi: Harden shared memory access in fetch_response A misbheaving SCMI platform firmware could reply with out-of-spec messages, shorter than the mimimum size comprising a header and a status field. Harden shmem_fetch_response to properly truncate such a bad messages. Fixes: 5c8a47a5a91d ("firmware: arm_scmi: Make scmi core independent of the transport type") Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222183823.518856-3-cristian.marussi@arm.com Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/shmem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f6ca5059dc0d6608dc46070f48e396d611f240d6 Author: Cristian Marussi Date: Thu Dec 22 18:38:19 2022 +0000 firmware: arm_scmi: Clear stale xfer->hdr.status Stale error status reported from a previous message transaction must be cleared before starting a new transaction to avoid being confusingly reported in the following SCMI message dump traces. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222183823.518856-2-cristian.marussi@arm.com Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/driver.c | 2 ++ 1 file changed, 2 insertions(+) commit e7a293658c20a7945014570e1921bf7d25d68a36 Author: Miaoqian Lin Date: Thu Dec 29 09:48:24 2022 +0400 EDAC/highbank: Fix memory leak in highbank_mc_probe() When devres_open_group() fails, it returns -ENOMEM without freeing memory allocated by edac_mc_alloc(). Call edac_mc_free() on the error handling path to avoid a memory leak. [ bp: Massage commit message. ] Fixes: a1b01edb2745 ("edac: add support for Calxeda highbank memory controller") Signed-off-by: Miaoqian Lin Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20221229054825.1361993-1-linmq006@gmail.com drivers/edac/highbank_mc_edac.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f528fe213a6ad21a6e8644dbd5de10dc264a89fd Author: Neil Armstrong Date: Mon Jan 2 12:23:20 2023 +0100 regulator: qcom-rpmh: PM8550 ldo11 regulator is an nldo This fixes the definition of the PM8550 ldo11 regulator matching it's capabilities since this LDO is designed to work between 1,2V and 1,5V. Fixes: e6e3776d682d ("regulator: qcom-rpmh: Add support for PM8550 regulators") Signed-off-by: Neil Armstrong Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230102-topic-sm8550-upstream-fixes-reg-l11b-nldo-v1-1-d97def246338@linaro.org Signed-off-by: Mark Brown drivers/regulator/qcom-rpmh-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ba48b20049b5a76f34a85f853c9496d1b10533a Author: Qu Wenruo Date: Thu Dec 22 07:59:17 2022 +0800 btrfs: fix compat_ro checks against remount [BUG] Even with commit 81d5d61454c3 ("btrfs: enhance unsupported compat RO flags handling"), btrfs can still mount a fs with unsupported compat_ro flags read-only, then remount it RW: # btrfs ins dump-super /dev/loop0 | grep compat_ro_flags -A 3 compat_ro_flags 0x403 ( FREE_SPACE_TREE | FREE_SPACE_TREE_VALID | unknown flag: 0x400 ) # mount /dev/loop0 /mnt/btrfs mount: /mnt/btrfs: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error. dmesg(1) may have more information after failed mount system call. ^^^ RW mount failed as expected ^^^ # dmesg -t | tail -n5 loop0: detected capacity change from 0 to 1048576 BTRFS: device fsid cb5b82f5-0fdd-4d81-9b4b-78533c324afa devid 1 transid 7 /dev/loop0 scanned by mount (1146) BTRFS info (device loop0): using crc32c (crc32c-intel) checksum algorithm BTRFS info (device loop0): using free space tree BTRFS error (device loop0): cannot mount read-write because of unknown compat_ro features (0x403) BTRFS error (device loop0): open_ctree failed # mount /dev/loop0 -o ro /mnt/btrfs # mount -o remount,rw /mnt/btrfs ^^^ RW remount succeeded unexpectedly ^^^ [CAUSE] Currently we use btrfs_check_features() to check compat_ro flags against our current mount flags. That function get reused between open_ctree() and btrfs_remount(). But for btrfs_remount(), the super block we passed in still has the old mount flags, thus btrfs_check_features() still believes we're mounting read-only. [FIX] Replace the existing @sb argument with @is_rw_mount. As originally we only use @sb to determine if the mount is RW. Now it's callers' responsibility to determine if the mount is RW, and since there are only two callers, the check is pretty simple: - caller in open_ctree() Just pass !sb_rdonly(). - caller in btrfs_remount() Pass !(*flags & SB_RDONLY), as our check should be against the new flags. Now we can correctly reject the RW remount: # mount /dev/loop0 -o ro /mnt/btrfs # mount -o remount,rw /mnt/btrfs mount: /mnt/btrfs: mount point not mounted or bad option. dmesg(1) may have more information after failed mount system call. # dmesg -t | tail -n 1 BTRFS error (device loop0: state M): cannot mount read-write because of unknown compat_ro features (0x403) Reported-by: Chung-Chiang Cheng Fixes: 81d5d61454c3 ("btrfs: enhance unsupported compat RO flags handling") CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 8 +++++--- fs/btrfs/disk-io.h | 2 +- fs/btrfs/super.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) commit 39f501d68ec1ed5cd5c66ac6ec2a7131c517bb92 Author: Qu Wenruo Date: Mon Dec 26 09:00:40 2022 +0800 btrfs: always report error in run_one_delayed_ref() Currently we have a btrfs_debug() for run_one_delayed_ref() failure, but if end users hit such problem, there will be no chance that btrfs_debug() is enabled. This can lead to very little useful info for debugging. This patch will: - Add extra info for error reporting Including: * logical bytenr * num_bytes * type * action * ref_mod - Replace the btrfs_debug() with btrfs_err() - Move the error reporting into run_one_delayed_ref() This is to avoid use-after-free, the @node can be freed in the caller. This error should only be triggered at most once. As if run_one_delayed_ref() failed, we trigger the error message, then causing the call chain to error out: btrfs_run_delayed_refs() `- btrfs_run_delayed_refs() `- btrfs_run_delayed_refs_for_head() `- run_one_delayed_ref() And we will abort the current transaction in btrfs_run_delayed_refs(). If we have to run delayed refs for the abort transaction, run_one_delayed_ref() will just cleanup the refs and do nothing, thus no new error messages would be output. Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a5751933a7f6abbdad90d98f25a25bb4b133a9e6 Author: Chris Chiu Date: Tue Jan 3 17:53:32 2023 +0800 ALSA: hda - Enable headset mic on another Dell laptop with ALC3254 There is another Dell Latitude laptop (1028:0c03) with Realtek codec ALC3254 which needs the ALC269_FIXUP_DELL4_MIC_NO_PRESENCE instead of the default matched ALC269_FIXUP_DELL1_MIC_NO_PRESENCE. Apply correct fixup for this particular model to enable headset mic. Signed-off-by: Chris Chiu Cc: Link: https://lore.kernel.org/r/20230103095332.730677-1-chris.chiu@canonical.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 1f680609bf1beac20e2a31ddcb1b88874123c39f Author: Yuchi Yang Date: Fri Dec 30 15:22:25 2022 +0800 ALSA: hda/realtek - Turn on power early Turn on power early to avoid wrong state for power relation register. This can earlier update JD state when resume back. Signed-off-by: Yuchi Yang Cc: Link: https://lore.kernel.org/r/e35d8f4fa18f4448a2315cc7d4a3715f@realtek.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit d73a27b86fc722c28a26ec64002e3a7dc86d1c07 Author: Qu Wenruo Date: Sun Jan 1 09:02:21 2023 +0800 btrfs: handle case when repair happens with dev-replace [BUG] There is a bug report that a BUG_ON() in btrfs_repair_io_failure() (originally repair_io_failure() in v6.0 kernel) got triggered when replacing a unreliable disk: BTRFS warning (device sda1): csum failed root 257 ino 2397453 off 39624704 csum 0xb0d18c75 expected csum 0x4dae9c5e mirror 3 kernel BUG at fs/btrfs/extent_io.c:2380! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 9 PID: 3614331 Comm: kworker/u257:2 Tainted: G OE 6.0.0-5-amd64 #1 Debian 6.0.10-2 Hardware name: Micro-Star International Co., Ltd. MS-7C60/TRX40 PRO WIFI (MS-7C60), BIOS 2.70 07/01/2021 Workqueue: btrfs-endio btrfs_end_bio_work [btrfs] RIP: 0010:repair_io_failure+0x24a/0x260 [btrfs] Call Trace: clean_io_failure+0x14d/0x180 [btrfs] end_bio_extent_readpage+0x412/0x6e0 [btrfs] ? __switch_to+0x106/0x420 process_one_work+0x1c7/0x380 worker_thread+0x4d/0x380 ? rescuer_thread+0x3a0/0x3a0 kthread+0xe9/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 [CAUSE] Before the BUG_ON(), we got some read errors from the replace target first, note the mirror number (3, which is beyond RAID1 duplication, thus it's read from the replace target device). Then at the BUG_ON() location, we are trying to writeback the repaired sectors back the failed device. The check looks like this: ret = btrfs_map_block(fs_info, BTRFS_MAP_WRITE, logical, &map_length, &bioc, mirror_num); if (ret) goto out_counter_dec; BUG_ON(mirror_num != bioc->mirror_num); But inside btrfs_map_block(), we can modify bioc->mirror_num especially for dev-replace: if (dev_replace_is_ongoing && mirror_num == map->num_stripes + 1 && !need_full_stripe(op) && dev_replace->tgtdev != NULL) { ret = get_extra_mirror_from_replace(fs_info, logical, *length, dev_replace->srcdev->devid, &mirror_num, &physical_to_patch_in_first_stripe); patch_the_first_stripe_for_dev_replace = 1; } Thus if we're repairing the replace target device, we're going to trigger that BUG_ON(). But in reality, the read failure from the replace target device may be that, our replace hasn't reached the range we're reading, thus we're reading garbage, but with replace running, the range would be properly filled later. Thus in that case, we don't need to do anything but let the replace routine to handle it. [FIX] Instead of a BUG_ON(), just skip the repair if we're repairing the device replace target device. Reported-by: 小太 Link: https://lore.kernel.org/linux-btrfs/CACsxjPYyJGQZ+yvjzxA1Nn2LuqkYqTCcUH43S=+wXhyf8S00Ag@mail.gmail.com/ CC: stable@vger.kernel.org # 6.0+ Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/bio.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 2f2e84ca60660402bd81d0859703567c59556e6a Author: Filipe Manana Date: Fri Dec 23 18:28:53 2022 +0000 btrfs: fix off-by-one in delalloc search during lseek During lseek, when searching for delalloc in a range that represents a hole and that range has a length of 1 byte, we end up not doing the actual delalloc search in the inode's io tree, resulting in not correctly reporting the offset with data or a hole. This actually only happens when the start offset is 0 because with any other start offset we round it down by sector size. Reproducer: $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt/sdc $ xfs_io -f -c "pwrite -q 0 1" /mnt/sdc/foo $ xfs_io -c "seek -d 0" /mnt/sdc/foo Whence Result DATA EOF It should have reported an offset of 0 instead of EOF. Fix this by updating btrfs_find_delalloc_in_range() and count_range_bits() to deal with inclusive ranges properly. These functions are already supposed to work with inclusive end offsets, they just got it wrong in a couple places due to off-by-one mistakes. A test case for fstests will be added later. Reported-by: Joan Bruguera Micó Link: https://lore.kernel.org/linux-btrfs/20221223020509.457113-1-joanbrugueram@gmail.com/ Fixes: b6e833567ea1 ("btrfs: make hole and data seeking a lot more efficient") CC: stable@vger.kernel.org # 6.1 Tested-by: Joan Bruguera Micó Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent-io-tree.c | 2 +- fs/btrfs/file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1d854e4fbabb0cb12ca4a7fcd784eb67a65de5f8 Author: Qu Wenruo Date: Thu Dec 29 07:32:24 2022 +0800 btrfs: fix false alert on bad tree level check [BUG] There is a bug report that on a RAID0 NVMe btrfs system, under heavy write load the filesystem can flip RO randomly. With extra debugging, it shows some tree blocks failed to pass their level checks, and if that happens at critical path of a transaction, we abort the transaction: BTRFS error (device nvme0n1p3): level verify failed on logical 5446121209856 mirror 1 wanted 0 found 1 BTRFS error (device nvme0n1p3: state A): Transaction aborted (error -5) BTRFS: error (device nvme0n1p3: state A) in btrfs_finish_ordered_io:3343: errno=-5 IO failure BTRFS info (device nvme0n1p3: state EA): forced readonly [CAUSE] The reporter has already bisected to commit 947a629988f1 ("btrfs: move tree block parentness check into validate_extent_buffer()"). And with extra debugging, it shows we can have btrfs_tree_parent_check filled with all zeros in the following call trace: submit_one_bio+0xd4/0xe0 submit_extent_page+0x142/0x550 read_extent_buffer_pages+0x584/0x9c0 ? __pfx_end_bio_extent_readpage+0x10/0x10 ? folio_unlock+0x1d/0x50 btrfs_read_extent_buffer+0x98/0x150 read_tree_block+0x43/0xa0 read_block_for_search+0x266/0x370 btrfs_search_slot+0x351/0xd30 ? lock_is_held_type+0xe8/0x140 btrfs_lookup_csum+0x63/0x150 btrfs_csum_file_blocks+0x197/0x6c0 ? sched_clock_cpu+0x9f/0xc0 ? lock_release+0x14b/0x440 ? _raw_read_unlock+0x29/0x50 btrfs_finish_ordered_io+0x441/0x860 btrfs_work_helper+0xfe/0x400 ? lock_is_held_type+0xe8/0x140 process_one_work+0x294/0x5b0 worker_thread+0x4f/0x3a0 ? __pfx_worker_thread+0x10/0x10 kthread+0xf5/0x120 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2c/0x50 Currently we only copy the btrfs_tree_parent_check structure into bbio at read_extent_buffer_pages() after we have assembled the bbio. But as shown above, submit_extent_page() itself can already submit the bbio, leaving the bbio->parent_check uninitialized, and cause the false alert. [FIX] Instead of copying @check into bbio after bbio is assembled, we pass @check in btrfs_bio_ctrl::parent_check, and copy the content of parent_check in submit_one_bio() for metadata read. By this we should be able to pass the needed info for metadata endio verification, and fix the false alert. Reported-by: Mikhail Gavrilov Link: https://lore.kernel.org/linux-btrfs/CABXGCsNzVxo4iq-tJSGm_kO1UggHXgq6CdcHDL=z5FL4njYXSQ@mail.gmail.com/ Fixes: 947a629988f1 ("btrfs: move tree block parentness check into validate_extent_buffer()") Tested-by: Mikhail Gavrilov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit 77177ed17d24ba060117bdb6efb8a01da7531676 Author: Qu Wenruo Date: Thu Dec 29 07:32:23 2022 +0800 btrfs: add error message for metadata level mismatch From a recent regression report, we found that after commit 947a629988f1 ("btrfs: move tree block parentness check into validate_extent_buffer()") if we have a level mismatch (false alert though), there is no error message at all. This makes later debugging harder. This patch will add the proper error message for such case. Link: https://lore.kernel.org/linux-btrfs/CABXGCsNzVxo4iq-tJSGm_kO1UggHXgq6CdcHDL=z5FL4njYXSQ@mail.gmail.com/ Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 3 +++ 1 file changed, 3 insertions(+) commit 946c2923e76327343e4460e8bb7ec7b4d4589397 Author: Tanmay Bhushan <007047221b@gmail.com> Date: Sat Dec 31 16:05:01 2022 +0100 btrfs: fix ASSERT em->len condition in btrfs_get_extent The em->len value is supposed to be verified in the assertion condition though we expect it to be same as the sectorsize. Fixes: a196a8944f77 ("btrfs: do not reset extent map members for inline extents read") Reviewed-by: Anand Jain Signed-off-by: Tanmay Bhushan <007047221b@gmail.com> Signed-off-by: David Sterba fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b963c1d6261eb7fba1ba14074fb447521be84add Author: Arnaldo Carvalho de Melo Date: Tue Jan 3 10:21:01 2023 -0300 perf test record_probe_libc_inet_pton: Fix failure due to extra inet_pton() backtrace in glibc >= 2.35 Starting with glibc 2.35 there are extra inet_pton() calls when doing a IPv6 ping as in one of the 'perf test' entry, which makes it fail: # perf test inet_pton 89: probe libc's inet_pton & backtrace it with ping : FAILED! # If we look at what this script is expecting (commenting out the removal of the temporary files in it): # cat /tmp/expected.aT6 ping[][0-9 \.:]+probe_libc:inet_pton: \([[:xdigit:]]+\) .*inet_pton\+0x[[:xdigit:]]+[[:space:]]\(/usr/lib64/libc.so.6|inlined\)$ getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\(/usr/lib64/libc.so.6\)$ .*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$ # And looking at what we are getting out of 'perf script', to match with the above: # cat /tmp/perf.script.IUC ping 623883 [006] 265438.471610: probe_libc:inet_pton: (7f32bcf314c0) 1314c0 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6) 29510 __libc_start_call_main+0x80 (/usr/lib64/libc.so.6) ping 623883 [006] 265438.471664: probe_libc:inet_pton: (7f32bcf314c0) 1314c0 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6) fa6c6 getaddrinfo+0x126 (/usr/lib64/libc.so.6) 491e [unknown] (/usr/bin/ping) # We see that its just the first call to inet_pton() that didn't came thru getaddrinfo(), so if we ignore the first the script matches what it expects, testing that using 'perf probe' + 'perf record' + 'perf script' with callchains on userspace targets is producing the expected results. Since we don't have a 'perf script --skip' to help us here, use tac + grep to do that, resulting in a one liner that makes this script work on both older glibc versions as well as with 2.35. With it, on fedora 36, x86, glibc 2.35: # perf test inet_pton 90: probe libc's inet_pton & backtrace it with ping : Ok # perf test -v inet_pton 90: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 627197 ping 627220 1 267956.962402: probe_libc:inet_pton_1: (7f488bf314c0) 1314c0 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6) fa6c6 getaddrinfo+0x126 (/usr/lib64/libc.so.6) 491e n (/usr/bin/ping) test child finished with 0 ---- end ---- probe libc's inet_pton & backtrace it with ping: Ok # And on Ubuntu 22.04.1 LTS on a Libre Computer ROC-RK3399-PC arm64 system: Before this patch it works (see that the script used has no 'tac' to remove the first event): root@roc-rk3399-pc:~# dpkg -l | grep libc-bin ii libc-bin 2.35-0ubuntu3.1 arm64 GNU C Library: Binaries root@roc-rk3399-pc:~# grep -w tac ~acme/libexec/perf-core/tests/shell/record+probe_libc_inet_pton.sh root@roc-rk3399-pc:~# perf test inet_pton 86: probe libc's inet_pton & backtrace it with ping : Ok root@roc-rk3399-pc:~# perf test -v inet_pton 86: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 1375 ping 1399 [000] 4114.417450: probe_libc:inet_pton: (ffffb3e26120) 106120 inet_pton+0x0 (/usr/lib/aarch64-linux-gnu/libc.so.6) d18bc getaddrinfo+0xec (/usr/lib/aarch64-linux-gnu/libc.so.6) 2b68 [unknown] (/usr/bin/ping) test child finished with 0 ---- end ---- probe libc's inet_pton & backtrace it with ping: Ok root@roc-rk3399-pc:~# And after it continues to work: root@roc-rk3399-pc:~# grep -w tac ~acme/libexec/perf-core/tests/shell/record+probe_libc_inet_pton.sh perf script -i $perf_data | tac | grep -m1 ^ping -B9 | tac > $perf_script root@roc-rk3399-pc:~# perf test inet_pton 86: probe libc's inet_pton & backtrace it with ping : Ok root@roc-rk3399-pc:~# perf test -v inet_pton 86: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 6995 ping 7019 [005] 4832.160741: probe_libc:inet_pton: (ffffa62e6120) 106120 inet_pton+0x0 (/usr/lib/aarch64-linux-gnu/libc.so.6) d18bc getaddrinfo+0xec (/usr/lib/aarch64-linux-gnu/libc.so.6) 2b68 [unknown] (/usr/bin/ping) test child finished with 0 ---- end ---- probe libc's inet_pton & backtrace it with ping: Ok root@roc-rk3399-pc:~# Reported-by: Thomas Richter Cc: Adrian Hunter Cc: Heiko Carstens Cc: Ian Rogers Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: http://lore.kernel.org/lkml/Y7QyPkPlDYip3cZH@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69555549cfa42e10f2fdd2699ed4e34d9d4f392b 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 Tested-by: Guilherme G. Piccoli # Steam Deck Link: https://patchwork.freedesktop.org/patch/msgid/20221123001303.533968-1-dmitry.osipenko@collabora.com drivers/gpu/drm/scheduler/sched_entity.c | 2 +- drivers/gpu/drm/scheduler/sched_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 3a2390c6777e3f6662980c6cfc25cafe9e4fef98 Author: Hui Tang Date: Mon Nov 14 08:49:58 2022 +0800 reset: uniphier-glue: Fix possible null-ptr-deref It will cause null-ptr-deref when resource_size(res) invoked, if platform_get_resource() returns NULL. Fixes: 499fef09a323 ("reset: uniphier: add USB3 core reset control") Signed-off-by: Hui Tang Reviewed-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20221114004958.258513-1-tanghui20@huawei.com Signed-off-by: Philipp Zabel drivers/reset/reset-uniphier-glue.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 13678f3feb3009b23aab424864fd0dac0765c83e Author: Randy Dunlap Date: Sat Oct 29 22:56:36 2022 -0700 reset: ti-sci: honor TI_SCI_PROTOCOL setting when not COMPILE_TEST There is a build error when COMPILE_TEST=y, TI_SCI_PROTOCOL=m, and RESET_TI_SCI=y: drivers/reset/reset-ti-sci.o: in function `ti_sci_reset_probe': reset-ti-sci.c:(.text+0x22c): undefined reference to `devm_ti_sci_get_handle' Fix this by making RESET_TI_SCI honor the Kconfig setting of TI_SCI_PROTOCOL when COMPILE_TEST is not set. When COMPILE_TEST is set, TI_SCI_PROTOCOL must be disabled (=n). Fixes: a6af504184c9 ("reset: ti-sci: Allow building under COMPILE_TEST") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Nishanth Menon Cc: Tero Kristo Cc: Santosh Shilimkar Cc: linux-arm-kernel@lists.infradead.org Cc: Philipp Zabel Reviewed-by: Nishanth Menon Link: https://lore.kernel.org/r/20221030055636.3139-1-rdunlap@infradead.org Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3cb80804b8295323919e031281768ba3bf5f8da Author: Randy Dunlap Date: Mon Jan 2 19:28:49 2023 -0800 time: Fix various kernel-doc problems Clean up kernel-doc complaints about function names and non-kernel-doc comments in kernel/time/. Fixes these warnings: kernel/time/time.c:479: warning: expecting prototype for set_normalized_timespec(). Prototype was for set_normalized_timespec64() instead kernel/time/time.c:553: warning: expecting prototype for msecs_to_jiffies(). Prototype was for __msecs_to_jiffies() instead kernel/time/timekeeping.c:1595: warning: contents before sections kernel/time/timekeeping.c:1705: warning: This comment starts with '/**', but isn't a kernel-doc comment. * We have three kinds of time sources to use for sleep time kernel/time/timekeeping.c:1726: warning: This comment starts with '/**', but isn't a kernel-doc comment. * 1) can be determined whether to use or not only when doing kernel/time/tick-oneshot.c:21: warning: missing initial short description on line: * tick_program_event kernel/time/tick-oneshot.c:107: warning: expecting prototype for tick_check_oneshot_mode(). Prototype was for tick_oneshot_mode_active() instead Signed-off-by: Randy Dunlap Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230103032849.12723-1-rdunlap@infradead.org kernel/time/tick-oneshot.c | 4 ++-- kernel/time/time.c | 8 ++++---- kernel/time/timekeeping.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) commit b0803ba72b558957fdcfe845939ee788b7ce5919 Author: Marc Zyngier Date: Tue Dec 20 14:49:30 2022 +0000 KVM: arm64: Convert FSC_* over to ESR_ELx_FSC_* The former is an AArch32 legacy, so let's move over to the verbose (and strictly identical) version. This involves moving some of the #defines that were private to KVM into the more generic esr.h. Signed-off-by: Marc Zyngier arch/arm64/include/asm/esr.h | 9 +++++++++ arch/arm64/include/asm/kvm_arm.h | 15 --------------- arch/arm64/include/asm/kvm_emulate.h | 20 ++++++++++---------- arch/arm64/kvm/hyp/include/hyp/fault.h | 2 +- arch/arm64/kvm/hyp/include/hyp/switch.h | 2 +- arch/arm64/kvm/mmu.c | 21 ++++++++++++--------- 6 files changed, 33 insertions(+), 36 deletions(-) commit b8f8d190fa8fa1909dda12d771df67125d6fbf0c Author: Marc Zyngier Date: Thu Dec 22 09:26:31 2022 +0000 KVM: arm64: Document the behaviour of S1PTW faults on RO memslots Although the KVM API says that a write to a RO memslot must result in a KVM_EXIT_MMIO describing the write, the arm64 architecture doesn't provide the *data* written by a Stage-1 page table walk (we only get the address). Since there isn't much userspace can do with so little information anyway, document the fact that such an access results in a guest exception, not an exit. This is consistent with the guest being terminally broken anyway. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Documentation/virt/kvm/api.rst | 8 ++++++++ 1 file changed, 8 insertions(+) commit 406504c7b0405d74d74c15a667cd4c4620c3e7a9 Author: Marc Zyngier Date: Tue Dec 20 14:03:52 2022 +0000 KVM: arm64: Fix S1PTW handling on RO memslots A recent development on the EFI front has resulted in guests having their page tables baked in the firmware binary, and mapped into the IPA space as part of a read-only memslot. Not only is this legitimate, but it also results in added security, so thumbs up. It is possible to take an S1PTW translation fault if the S1 PTs are unmapped at stage-2. However, KVM unconditionally treats S1PTW as a write to correctly handle hardware AF/DB updates to the S1 PTs. Furthermore, KVM injects an exception into the guest for S1PTW writes. In the aforementioned case this results in the guest taking an abort it won't recover from, as the S1 PTs mapping the vectors suffer from the same problem. So clearly our handling is... wrong. Instead, switch to a two-pronged approach: - On S1PTW translation fault, handle the fault as a read - On S1PTW permission fault, handle the fault as a write This is of no consequence to SW that *writes* to its PTs (the write will trigger a non-S1PTW fault), and SW that uses RO PTs will not use HW-assisted AF/DB anyway, as that'd be wrong. Only in the case described in c4ad98e4b72c ("KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch") do we end-up with two back-to-back faults (page being evicted and faulted back). I don't think this is a case worth optimising for. Fixes: c4ad98e4b72c ("KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch") Reviewed-by: Oliver Upton Reviewed-by: Ard Biesheuvel Regression-tested-by: Ard Biesheuvel Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org arch/arm64/include/asm/kvm_emulate.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit e006ac3003080177cf0b673441a4241f77aaecce Author: Ding Hui Date: Tue Dec 27 23:09:36 2022 +0800 efi: fix userspace infinite retry read efivars after EFI runtime services page fault After [1][2], if we catch exceptions due to EFI runtime service, we will clear EFI_RUNTIME_SERVICES bit to disable EFI runtime service, then the subsequent routine which invoke the EFI runtime service should fail. But the userspace cat efivars through /sys/firmware/efi/efivars/ will stuck and infinite loop calling read() due to efivarfs_file_read() return -EINTR. The -EINTR is converted from EFI_ABORTED by efi_status_to_err(), and is an improper return value in this situation, so let virt_efi_xxx() return EFI_DEVICE_ERROR and converted to -EIO to invoker. Cc: Fixes: 3425d934fc03 ("efi/x86: Handle page faults occurring while running EFI runtime services") Fixes: 23715a26c8d8 ("arm64: efi: Recover from synchronous exceptions occurring in firmware") Signed-off-by: Ding Hui Signed-off-by: Ard Biesheuvel drivers/firmware/efi/runtime-wrappers.c | 1 + 1 file changed, 1 insertion(+) commit 703c13fe3c9af557d312f5895ed6a5fda2711104 Author: Johan Hovold Date: Mon Dec 19 10:10:04 2022 +0100 efi: fix NULL-deref in init error path In cases where runtime services are not supported or have been disabled, the runtime services workqueue will never have been allocated. Do not try to destroy the workqueue unconditionally in the unlikely event that EFI initialisation fails to avoid dereferencing a NULL pointer. Fixes: 98086df8b70c ("efi: add missed destroy_workqueue when efisubsys_init fails") Cc: stable@vger.kernel.org Cc: Li Heng Signed-off-by: Johan Hovold Signed-off-by: Ard Biesheuvel drivers/firmware/efi/efi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit c7dd13805f8b8fc1ce3b6d40f6aff47e66b72ad2 Author: Szymon Heidrich Date: Tue Jan 3 10:17:09 2023 +0100 usb: rndis_host: Secure rndis_query check against int overflow Variables off and len typed as uint32 in rndis_query function are controlled by incoming RNDIS response message thus their value may be manipulated. Setting off to a unexpectetly large value will cause the sum with len and 8 to overflow and pass the implemented validation step. Consequently the response pointer will be referring to a location past the expected buffer boundaries allowing information leakage e.g. via RNDIS_OID_802_3_PERMANENT_ADDRESS OID. Fixes: ddda08624013 ("USB: rndis_host, various cleanups") Signed-off-by: Szymon Heidrich Signed-off-by: David S. Miller drivers/net/usb/rndis_host.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7dc61838541928895abae6d2355258e02a251bba Author: Sean Anderson Date: Tue Jan 3 01:50:38 2023 -0500 net: dpaa: Fix dtsec check for PCS availability We want to fail if the PCS is not available, not if it is available. Fix this condition. Fixes: 5d93cfcf7360 ("net: dpaa: Convert to phylink") Reported-by: Christian Zigotzky Signed-off-by: Sean Anderson Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_dtsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4af1b64f80fbe1275fb02c5f1c0cef099a4a231f Author: Geetha sowjanya Date: Tue Jan 3 09:20:12 2023 +0530 octeontx2-pf: Fix lmtst ID used in aura free Current code uses per_cpu pointer to get the lmtst_id mapped to the core on which aura_free() is executed. Using per_cpu pointer without preemption disable causing mismatch between lmtst_id and core on which pointer gets freed. This patch fixes the issue by disabling preemption around aura_free. Fixes: ef6c8da71eaf ("octeontx2-pf: cn10K: Reserve LMTST lines per core") Signed-off-by: Sunil Goutham Signed-off-by: Geetha sowjanya Signed-off-by: David S. Miller .../ethernet/marvell/octeontx2/nic/otx2_common.c | 30 +++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) commit 9c807965483f42df1d053b7436eedd6cf28ece6f Author: Daniil Tatianin Date: Mon Jan 2 12:53:35 2023 +0300 drivers/net/bonding/bond_3ad: return when there's no aggregator Otherwise we would dereference a NULL aggregator pointer when calling __set_agg_ports_ready on the line below. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Daniil Tatianin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 1 + 1 file changed, 1 insertion(+) commit d57609fad9579f20bbc21f73f7d507937118a79b Merge: 588ab2dc25f6 5e29dc36bd5e Author: David S. Miller Date: Tue Jan 3 09:12:22 2023 +0000 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) Use signed integer in ipv6_skip_exthdr() called from nf_confirm(). Reported by static analysis tooling, patch from Florian Westphal. 2) Missing set type checks in nf_tables: Validate that set declaration matches the an existing set type, otherwise bail out with EEXIST. Currently, nf_tables silently accepts the re-declaration with a different type but it bails out later with EINVAL when the user adds entries to the set. This fix is relatively large because it requires two preparation patches that are included in this batch. 3) Do not ignore updates of timeout and gc_interval parameters in existing sets. 4) Fix a hang when 0/0 subnets is added to a hash:net,port,net type of ipset. Except hash:net,port,net and hash:net,iface, the set types don't support 0/0 and the auxiliary functions rely on this fact. So 0/0 needs a special handling in hash:net,port,net which was missing (hash:net,iface was not affected by this bug), from Jozsef Kadlecsik. 5) When adding/deleting large number of elements in one step in ipset, it can take a reasonable amount of time and can result in soft lockup errors. This patch is a complete rework of the previous version in order to use a smaller internal batch limit and at the same time removing the external hard limit to add arbitrary number of elements in one step. Also from Jozsef Kadlecsik. Except for patch #1, which fixes a bug introduced in the previous net-next development cycle, anything else has been broken for several releases. ==================== Signed-off-by: David S. Miller commit 2c55d703391acf7e9101da596d0c15ee03b318a3 Merge: 92d43bd3bc97 88603b6dc419 Author: Maxime Ripard Date: Tue Jan 3 08:32:12 2023 +0100 Merge drm/drm-fixes into drm-misc-fixes Let's start the fixes cycle. Signed-off-by: Maxime Ripard commit af82425c6a2d2f347c79b63ce74fca6dc6be157f Author: Jens Axboe Date: Mon Jan 2 16:49:46 2023 -0700 io_uring/io-wq: free worker if task_work creation is canceled If we cancel the task_work, the worker will never come into existance. As this is the last reference to it, ensure that we get it freed appropriately. Cc: stable@vger.kernel.org Reported-by: 진호 Signed-off-by: Jens Axboe io_uring/io-wq.c | 1 + 1 file changed, 1 insertion(+) commit 69b41ac87e4a664de78a395ff97166f0b2943210 Merge: 0226635c304c fee4c1993743 Author: Linus Torvalds Date: Mon Jan 2 11:06:18 2023 -0800 Merge tag 'for-6.2-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "First batch of regression and regular fixes: - regressions: - fix error handling after conversion to qstr for paths - fix raid56/scrub recovery caused by uninitialized variable after conversion to error bitmaps - restore qgroup backref lookup behaviour after recent refactoring - fix leak of device lists at module exit time - fix resolving backrefs for inline extent followed by prealloc - reset defrag ioctl buffer on memory allocation error" * tag 'for-6.2-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix fscrypt name leak after failure to join log transaction btrfs: scrub: fix uninitialized return value in recover_scrub_rbio btrfs: fix resolving backrefs for inline extent followed by prealloc btrfs: fix trace event name typo for FLUSH_DELAYED_REFS btrfs: restore BTRFS_SEQ_LAST when looking up qgroup backref lookup btrfs: fix leak of fs devices after removing btrfs module btrfs: fix an error handling path in btrfs_defrag_leaves() btrfs: fix an error handling path in btrfs_rename() commit 0226635c304cfd5c9db9b78c259cb713819b057e Author: Tetsuo Handa Date: Mon Jan 2 23:05:33 2023 +0900 fs/ntfs3: don't hold ni_lock when calling truncate_setsize() syzbot is reporting hung task at do_user_addr_fault() [1], for there is a silent deadlock between PG_locked bit and ni_lock lock. Since filemap_update_page() calls filemap_read_folio() after calling folio_trylock() which will set PG_locked bit, ntfs_truncate() must not call truncate_setsize() which will wait for PG_locked bit to be cleared when holding ni_lock lock. Link: https://lore.kernel.org/all/00000000000060d41f05f139aa44@google.com/ Link: https://syzkaller.appspot.com/bug?extid=bed15dbf10294aa4f2ae [1] Reported-by: syzbot Debugged-by: Linus Torvalds Co-developed-by: Hillf Danton Signed-off-by: Hillf Danton Signed-off-by: Tetsuo Handa Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation") Signed-off-by: Linus Torvalds fs/ntfs3/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d00dd2f2645dca04cf399d8fc692f3f69b6dd996 Author: Takashi Iwai Date: Tue Nov 22 12:51:22 2022 +0100 x86/kexec: Fix double-free of elf header buffer After b3e34a47f989 ("x86/kexec: fix memory leak of elf header buffer"), freeing image->elf_headers in the error path of crash_load_segments() is not needed because kimage_file_post_load_cleanup() will take care of that later. And not clearing it could result in a double-free. Drop the superfluous vfree() call at the error path of crash_load_segments(). Fixes: b3e34a47f989 ("x86/kexec: fix memory leak of elf header buffer") Signed-off-by: Takashi Iwai Signed-off-by: Borislav Petkov (AMD) Acked-by: Baoquan He Acked-by: Vlastimil Babka Cc: Link: https://lore.kernel.org/r/20221122115122.13937-1-tiwai@suse.de arch/x86/kernel/crash.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5b24ac2dfd3eb3e36f794af3aa7f2828b19035bd Author: Max Filippov Date: Thu Dec 22 23:28:21 2022 -0800 kcsan: test: don't put the expect array on the stack Size of the 'expect' array in the __report_matches is 1536 bytes, which is exactly the default frame size warning limit of the xtensa architecture. As a result allmodconfig xtensa kernel builds with the gcc that does not support the compiler plugins (which otherwise would push the said warning limit to 2K) fail with the following message: kernel/kcsan/kcsan_test.c:257:1: error: the frame size of 1680 bytes is larger than 1536 bytes Fix it by dynamically allocating the 'expect' array. Signed-off-by: Max Filippov Reviewed-by: Marco Elver Tested-by: Marco Elver kernel/kcsan/kcsan_test.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 77fe30fed1c0cd282eadb0728999ea3d3350e0b0 Author: Arnaldo Carvalho de Melo Date: Mon Jan 2 13:06:45 2023 -0300 perf tools: Fix segfault when trying to process tracepoints in perf.data and not linked with libtraceevent When we have a perf.data file with tracepoints, such as: # perf evlist -f probe_perf:lzma_decompress_to_file # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events # We end up segfaulting when using perf built with NO_LIBTRACEEVENT=1 by trying to find an evsel with a NULL 'event_name' variable: (gdb) run report --stdio -f Starting program: /root/bin/perf report --stdio -f Program received signal SIGSEGV, Segmentation fault. 0x000000000055219d in find_evsel (evlist=0xfda7b0, event_name=0x0) at util/sort.c:2830 warning: Source file is more recent than executable. 2830 if (event_name[0] == '%') { Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.8-11.fc36.x86_64 cyrus-sasl-lib-2.1.27-18.fc36.x86_64 elfutils-debuginfod-client-0.188-3.fc36.x86_64 elfutils-libelf-0.188-3.fc36.x86_64 elfutils-libs-0.188-3.fc36.x86_64 glibc-2.35-20.fc36.x86_64 keyutils-libs-1.6.1-4.fc36.x86_64 krb5-libs-1.19.2-12.fc36.x86_64 libbrotli-1.0.9-7.fc36.x86_64 libcap-2.48-4.fc36.x86_64 libcom_err-1.46.5-2.fc36.x86_64 libcurl-7.82.0-12.fc36.x86_64 libevent-2.1.12-6.fc36.x86_64 libgcc-12.2.1-4.fc36.x86_64 libidn2-2.3.4-1.fc36.x86_64 libnghttp2-1.51.0-1.fc36.x86_64 libpsl-0.21.1-5.fc36.x86_64 libselinux-3.3-4.fc36.x86_64 libssh-0.9.6-4.fc36.x86_64 libstdc++-12.2.1-4.fc36.x86_64 libunistring-1.0-1.fc36.x86_64 libunwind-1.6.2-2.fc36.x86_64 libxcrypt-4.4.33-4.fc36.x86_64 libzstd-1.5.2-2.fc36.x86_64 numactl-libs-2.0.14-5.fc36.x86_64 opencsd-1.2.0-1.fc36.x86_64 openldap-2.6.3-1.fc36.x86_64 openssl-libs-3.0.5-2.fc36.x86_64 slang-2.3.2-11.fc36.x86_64 xz-libs-5.2.5-9.fc36.x86_64 zlib-1.2.11-33.fc36.x86_64 (gdb) bt #0 0x000000000055219d in find_evsel (evlist=0xfda7b0, event_name=0x0) at util/sort.c:2830 #1 0x0000000000552416 in add_dynamic_entry (evlist=0xfda7b0, tok=0xffb6eb "trace", level=2) at util/sort.c:2976 #2 0x0000000000552d26 in sort_dimension__add (list=0xf93e00 , tok=0xffb6eb "trace", evlist=0xfda7b0, level=2) at util/sort.c:3193 #3 0x0000000000552e1c in setup_sort_list (list=0xf93e00 , str=0xffb6eb "trace", evlist=0xfda7b0) at util/sort.c:3227 #4 0x00000000005532fa in __setup_sorting (evlist=0xfda7b0) at util/sort.c:3381 #5 0x0000000000553cdc in setup_sorting (evlist=0xfda7b0) at util/sort.c:3608 #6 0x000000000042eb9f in cmd_report (argc=0, argv=0x7fffffffe470) at builtin-report.c:1596 #7 0x00000000004aee7e in run_builtin (p=0xf64ca0 , argc=3, argv=0x7fffffffe470) at perf.c:330 #8 0x00000000004af0f2 in handle_internal_command (argc=3, argv=0x7fffffffe470) at perf.c:384 #9 0x00000000004af241 in run_argv (argcp=0x7fffffffe29c, argv=0x7fffffffe290) at perf.c:428 #10 0x00000000004af5fc in main (argc=3, argv=0x7fffffffe470) at perf.c:562 (gdb) So check if we have tracepoint events in add_dynamic_entry() and bail out instead: # perf report --stdio -f This perf binary isn't linked with libtraceevent, can't process probe_perf:lzma_decompress_to_file Error: Unknown --sort key: `trace' # Fixes: 378ef0f5d9d7f465 ("perf build: Use libtraceevent from the system") Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/Y7MDb7kRaHZB6APC@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit cad853374d85fe678d721512cecfabd7636e51f3 Author: Jeff Layton Date: Tue Dec 13 13:08:26 2022 -0500 nfsd: fix handling of readdir in v4root vs. mount upcall timeout If v4 READDIR operation hits a mountpoint and gets back an error, then it will include that entry in the reply and set RDATTR_ERROR for it to the error. That's fine for "normal" exported filesystems, but on the v4root, we need to be more careful to only expose the existence of dentries that lead to exports. If the mountd upcall times out while checking to see whether a mountpoint on the v4root is exported, then we have no recourse other than to fail the whole operation. Cc: Steve Dickson Link: https://bugzilla.kernel.org/show_bug.cgi?id=216777 Reported-by: JianHong Yin Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever Cc: fs/nfsd/nfs4xdr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f24fb53984cfba42ff72a47466eabfd772da647b Author: Ahelenia Ziemiańska Date: Tue Dec 27 21:58:00 2022 +0100 perf tools: Don't include signature in version strings This explodes the build if HEAD is signed, since the generated version is gpg: Signature made Mon 26 Dec 2022 20:34:48 CET, then a few more lines, then the SHA. Signed-off-by: Ahelenia Ziemiańska Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/7c9637711271f50ec2341fb8a7c29585335dab04.1672174189.git.nabijaczleweli@nabijaczleweli.xyz Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/Makefile | 2 +- tools/perf/util/PERF-VERSION-GEN | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 92d43bd3bc9728c1fb114d7011d46f5ea9489e28 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 Tested-by: Ian Ray (cherry picked from commit 4333472f8d7befe62359fecb1083cd57a6e07bfc) Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 8509419758f2cc28dd05370385af0d91573b76b4 Author: Samuel Holland Date: Tue Aug 9 21:25:09 2022 -0500 mmc: sunxi-mmc: Fix clock refcount imbalance during unbind If the controller is suspended by runtime PM, the clock is already disabled, so do not try to disable it again during removal. Use pm_runtime_disable() to flush any pending runtime PM transitions. Fixes: 9a8e1e8cc2c0 ("mmc: sunxi: Add runtime_pm support") Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220810022509.43743-1-samuel@sholland.org Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 55c41f2e4f7e81e48f3ecc9fba1e316e770213f2 Author: Yang Jihong Date: Mon Dec 26 08:57:03 2022 +0000 perf help: Use HAVE_LIBTRACEEVENT to filter out unsupported commands Commands such as kmem, kwork, lock, sched, trace and timechart depend on libtraceevent, these commands need to be isolated using HAVE_LIBTRACEEVENT macro when cmdlist generation. The output of the generate-cmdlist.sh script is as follows: # ./util/generate-cmdlist.sh /* Automatically generated by ./util/generate-cmdlist.sh */ struct cmdname_help { char name[16]; char help[80]; }; static struct cmdname_help common_cmds[] = { {"annotate", "Read perf.data (created by perf record) and display annotated code"}, {"archive", "Create archive with object files with build-ids found in perf.data file"}, {"bench", "General framework for benchmark suites"}, {"buildid-cache", "Manage build-id cache."}, {"buildid-list", "List the buildids in a perf.data file"}, {"c2c", "Shared Data C2C/HITM Analyzer."}, {"config", "Get and set variables in a configuration file."}, {"daemon", "Run record sessions on background"}, {"data", "Data file related processing"}, {"diff", "Read perf.data files and display the differential profile"}, {"evlist", "List the event names in a perf.data file"}, {"ftrace", "simple wrapper for kernel's ftrace functionality"}, {"inject", "Filter to augment the events stream with additional information"}, {"iostat", "Show I/O performance metrics"}, {"kallsyms", "Searches running kernel for symbols"}, {"kvm", "Tool to trace/measure kvm guest os"}, {"list", "List all symbolic event types"}, {"mem", "Profile memory accesses"}, {"record", "Run a command and record its profile into perf.data"}, {"report", "Read perf.data (created by perf record) and display the profile"}, {"script", "Read perf.data (created by perf record) and display trace output"}, {"stat", "Run a command and gather performance counter statistics"}, {"test", "Runs sanity tests."}, {"top", "System profiling tool."}, {"version", "display the version of perf binary"}, #ifdef HAVE_LIBELF_SUPPORT {"probe", "Define new dynamic tracepoints"}, #endif /* HAVE_LIBELF_SUPPORT */ #if defined(HAVE_LIBTRACEEVENT) && (defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE_SUPPORT)) {"trace", "strace inspired tool"}, #endif /* HAVE_LIBTRACEEVENT && (HAVE_LIBAUDIT_SUPPORT || HAVE_SYSCALL_TABLE_SUPPORT) */ #ifdef HAVE_LIBTRACEEVENT {"kmem", "Tool to trace/measure kernel memory properties"}, {"kwork", "Tool to trace/measure kernel work properties (latencies)"}, {"lock", "Analyze lock events"}, {"sched", "Tool to trace/measure scheduler properties (latencies)"}, {"timechart", "Tool to visualize total system behavior during a workload"}, #endif /* HAVE_LIBTRACEEVENT */ }; Fixes: 378ef0f5d9d7f465 ("perf build: Use libtraceevent from the system") Signed-off-by: Yang Jihong Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221226085703.95081-1-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/command-list.txt | 10 +++++----- tools/perf/util/generate-cmdlist.sh | 19 +++++++++++++++++-- 2 files changed, 22 insertions(+), 7 deletions(-) commit a8f54d940196c8bd9aced9c82557fdc63baefb02 Author: Eric Lin Date: Sat Dec 31 05:27:31 2022 +0000 perf tools riscv: Fix build error on riscv due to missing header for 'struct perf_sample' Since the definition of 'struct perf_sample' has been moved to sample.h, we need to include this header file to fix the build error as follows: arch/riscv/util/unwind-libdw.c: In function 'libdw__arch_set_initial_registers': arch/riscv/util/unwind-libdw.c:12:50: error: invalid use of undefined type 'struct perf_sample' 12 | struct regs_dump *user_regs = &ui->sample->user_regs; | ^~ Fixes: 9823147da6c893d9 ("perf tools: Move 'struct perf_sample' to a separate header file to disentangle headers") Signed-off-by: Eric Lin Cc: Alexander Shishkin Cc: greentime.hu@sifive.com Cc: Jiri Olsa Cc: linux-riscv@lists.infradead.org Cc: Namhyung Kim Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Vincent Chen Link: https://lore.kernel.org/r/20221231052731.24908-1-eric.lin@sifive.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/riscv/util/unwind-libdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f685dd7a8025f2554f73748cfdb8143a21fb92c7 Author: Paul Menzel Date: Mon Jan 2 14:57:30 2023 +0100 fbdev: matroxfb: G200eW: Increase max memory from 1 MB to 16 MB Commit 62d89a7d49af ("video: fbdev: matroxfb: set maxvram of vbG200eW to the same as vbG200 to avoid black screen") accidently decreases the maximum memory size for the Matrox G200eW (102b:0532) from 8 MB to 1 MB by missing one zero. This caused the driver initialization to fail with the messages below, as the minimum required VRAM size is 2 MB: [ 9.436420] matroxfb: Matrox MGA-G200eW (PCI) detected [ 9.444502] matroxfb: cannot determine memory size [ 9.449316] matroxfb: probe of 0000:0a:03.0 failed with error -1 So, add the missing 0 to make it the intended 16 MB. Successfully tested on the Dell PowerEdge R910/0KYD3D, BIOS 2.10.0 08/29/2013, that the warning is gone. While at it, add a leading 0 to the maxdisplayable entry, so it’s aligned properly. The value could probably also be increased from 8 MB to 16 MB, as the G200 uses the same values, but I have not checked any datasheet. Note, matroxfb is obsolete and superseded by the maintained DRM driver mga200, which is used by default on most systems where both drivers are available. Therefore, on most systems it was only a cosmetic issue. Fixes: 62d89a7d49af ("video: fbdev: matroxfb: set maxvram of vbG200eW to the same as vbG200 to avoid black screen") Link: https://lore.kernel.org/linux-fbdev/972999d3-b75d-5680-fcef-6e6905c52ac5@suse.de/T/#mb6953a9995ebd18acc8552f99d6db39787aec775 Cc: it+linux-fbdev@molgen.mpg.de Cc: Z. Liu Cc: Rich Felker Cc: stable@vger.kernel.org Signed-off-by: Paul Menzel Signed-off-by: Helge Deller drivers/video/fbdev/matrox/matroxfb_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a6564ebd953c4590663c9a3c99a3ea9920ade6f Author: Miaoqian Lin Date: Thu Dec 29 13:09:00 2022 +0400 perf tools: Fix resources leak in perf_data__open_dir() In perf_data__open_dir(), opendir() opens the directory stream. Add missing closedir() to release it after use. Fixes: eb6176709b235b96 ("perf data: Add perf_data__open_dir_data function") Reviewed-by: Adrian Hunter Signed-off-by: Miaoqian Lin Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221229090903.1402395-1-linmq006@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/data.c | 2 ++ 1 file changed, 2 insertions(+) commit 03dec92c4f788c54a7c01b40a018f601eb8a6c52 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 Tested-by: Guilherme G. Piccoli # Steam Deck Link: https://patchwork.freedesktop.org/patch/msgid/20221123001303.533968-1-dmitry.osipenko@collabora.com drivers/gpu/drm/scheduler/sched_entity.c | 2 +- drivers/gpu/drm/scheduler/sched_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit a764da46cd15f8b40292d2c0b29c4bf9a3e66c7e Author: Xiu Jianfeng Date: Wed Nov 9 17:19:05 2022 +0800 drm/virtio: Fix memory leak in virtio_gpu_object_create() The virtio_gpu_object_shmem_init() will alloc memory and save it in @ents, so when virtio_gpu_array_alloc() fails, this memory should be freed, this patch fixes it. Fixes: e7fef0923303 ("drm/virtio: Simplify error handling of virtio_gpu_object_create()") Signed-off-by: Xiu Jianfeng Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221109091905.55451-1-xiujianfeng@huawei.com drivers/gpu/drm/virtio/virtgpu_object.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5e29dc36bd5e2166b834ceb19990d9e68a734d7d Author: Jozsef Kadlecsik Date: Fri Dec 30 13:24:38 2022 +0100 netfilter: ipset: Rework long task execution when adding/deleting entries When adding/deleting large number of elements in one step in ipset, it can take a reasonable amount of time and can result in soft lockup errors. The patch 5f7b51bf09ba ("netfilter: ipset: Limit the maximal range of consecutive elements to add/delete") tried to fix it by limiting the max elements to process at all. However it was not enough, it is still possible that we get hung tasks. Lowering the limit is not reasonable, so the approach in this patch is as follows: rely on the method used at resizing sets and save the state when we reach a smaller internal batch limit, unlock/lock and proceed from the saved state. Thus we can avoid long continuous tasks and at the same time removed the limit to add/delete large number of elements in one step. The nfnl mutex is held during the whole operation which prevents one to issue other ipset commands in parallel. Fixes: 5f7b51bf09ba ("netfilter: ipset: Limit the maximal range of consecutive elements to add/delete") Reported-by: syzbot+9204e7399656300bf271@syzkaller.appspotmail.com Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/ipset/ip_set.h | 2 +- net/netfilter/ipset/ip_set_core.c | 7 ++++--- net/netfilter/ipset/ip_set_hash_ip.c | 14 +++++++------- net/netfilter/ipset/ip_set_hash_ipmark.c | 13 +++++++------ net/netfilter/ipset/ip_set_hash_ipport.c | 13 +++++++------ net/netfilter/ipset/ip_set_hash_ipportip.c | 13 +++++++------ net/netfilter/ipset/ip_set_hash_ipportnet.c | 13 ++++++++----- net/netfilter/ipset/ip_set_hash_net.c | 17 +++++++---------- net/netfilter/ipset/ip_set_hash_netiface.c | 15 ++++++--------- net/netfilter/ipset/ip_set_hash_netnet.c | 23 +++++++---------------- net/netfilter/ipset/ip_set_hash_netport.c | 19 +++++++------------ 11 files changed, 68 insertions(+), 81 deletions(-) commit a31d47be64b9b74f8cfedffe03e0a8a1f9e51f23 Author: Jozsef Kadlecsik Date: Fri Dec 30 13:24:37 2022 +0100 netfilter: ipset: fix hash:net,port,net hang with /0 subnet The hash:net,port,net set type supports /0 subnets. However, the patch commit 5f7b51bf09baca8e titled "netfilter: ipset: Limit the maximal range of consecutive elements to add/delete" did not take into account it and resulted in an endless loop. The bug is actually older but the patch 5f7b51bf09baca8e brings it out earlier. Handle /0 subnets properly in hash:net,port,net set types. Fixes: 5f7b51bf09ba ("netfilter: ipset: Limit the maximal range of consecutive elements to add/delete") Reported-by: Марк Коренберг Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/ip_set_hash_netportnet.c | 40 +++++++++++++++------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit 588ab2dc25f60efeb516b4abedb6c551949cc185 Author: Horatiu Vultur Date: Mon Jan 2 13:12:15 2023 +0100 net: sparx5: Fix reading of the MAC address There is an issue with the checking of the return value of 'of_get_mac_address', which returns 0 on success and negative value on failure. The driver interpretated the result the opposite way. Therefore if there was a MAC address defined in the DT, then the driver was generating a random MAC address otherwise it would use address 0. Fix this by checking correctly the return value of 'of_get_mac_address' Fixes: b74ef9f9cb91 ("net: sparx5: Do not use mac_addr uninitialized in mchp_sparx5_probe()") Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06bf62944144a92d83dd14fd1378d2a288259561 Author: Ido Schimmel Date: Mon Jan 2 08:55:56 2023 +0200 vxlan: Fix memory leaks in error path The memory allocated by vxlan_vnigroup_init() is not freed in the error path, leading to memory leaks [1]. Fix by calling vxlan_vnigroup_uninit() in the error path. The leaks can be reproduced by annotating gro_cells_init() with ALLOW_ERROR_INJECTION() and then running: # echo "100" > /sys/kernel/debug/fail_function/probability # echo "1" > /sys/kernel/debug/fail_function/times # echo "gro_cells_init" > /sys/kernel/debug/fail_function/inject # printf %#x -12 > /sys/kernel/debug/fail_function/gro_cells_init/retval # ip link add name vxlan0 type vxlan dstport 4789 external vnifilter RTNETLINK answers: Cannot allocate memory [1] unreferenced object 0xffff88810db84a00 (size 512): comm "ip", pid 330, jiffies 4295010045 (age 66.016s) hex dump (first 32 bytes): f8 d5 76 0e 81 88 ff ff 01 00 00 00 00 00 00 02 ..v............. 03 00 04 00 48 00 00 00 00 00 00 01 04 00 01 00 ....H........... backtrace: [] kmalloc_trace+0x2a/0x60 [] vxlan_vnigroup_init+0x4c/0x160 [] vxlan_init+0x1ae/0x280 [] register_netdevice+0x57a/0x16d0 [] __vxlan_dev_create+0x7c7/0xa50 [] vxlan_newlink+0xd6/0x130 [] __rtnl_newlink+0x112b/0x18a0 [] rtnl_newlink+0x6c/0xa0 [] rtnetlink_rcv_msg+0x43f/0xd40 [] netlink_rcv_skb+0x170/0x440 [] netlink_unicast+0x53f/0x810 [] netlink_sendmsg+0x958/0xe70 [] ____sys_sendmsg+0x78f/0xa90 [] ___sys_sendmsg+0x13a/0x1e0 [] __sys_sendmsg+0x11c/0x1f0 [] do_syscall_64+0x38/0x80 unreferenced object 0xffff88810e76d5f8 (size 192): comm "ip", pid 330, jiffies 4295010045 (age 66.016s) hex dump (first 32 bytes): 04 00 00 00 00 00 00 00 db e1 4f e7 00 00 00 00 ..........O..... 08 d6 76 0e 81 88 ff ff 08 d6 76 0e 81 88 ff ff ..v.......v..... backtrace: [] __kmalloc_node+0x4e/0x90 [] kvmalloc_node+0xa6/0x1f0 [] bucket_table_alloc.isra.0+0x83/0x460 [] rhashtable_init+0x43b/0x7c0 [] vxlan_vnigroup_init+0x6c/0x160 [] vxlan_init+0x1ae/0x280 [] register_netdevice+0x57a/0x16d0 [] __vxlan_dev_create+0x7c7/0xa50 [] vxlan_newlink+0xd6/0x130 [] __rtnl_newlink+0x112b/0x18a0 [] rtnl_newlink+0x6c/0xa0 [] rtnetlink_rcv_msg+0x43f/0xd40 [] netlink_rcv_skb+0x170/0x440 [] netlink_unicast+0x53f/0x810 [] netlink_sendmsg+0x958/0xe70 [] ____sys_sendmsg+0x78f/0xa90 Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device") Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller drivers/net/vxlan/vxlan_core.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 43d253781f6321c6a07a5fe4ee72103a679a5f6b Author: Randy Dunlap Date: Sun Jan 1 23:17:37 2023 -0800 net: sched: htb: fix htb_classify() kernel-doc Fix W=1 kernel-doc warning: net/sched/sch_htb.c:214: warning: expecting prototype for htb_classify(). Prototype was for HTB_DIRECT() instead by moving the HTB_DIRECT() macro above the function. Add kernel-doc notation for function parameters as well. Signed-off-by: Randy Dunlap Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Signed-off-by: David S. Miller net/sched/sch_htb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 819fcf4adfbd55e81c4325e11eccae16ccad4106 Merge: 91e2286160ed caa4b35b4317 Author: David S. Miller Date: Mon Jan 2 13:32:43 2023 +0000 Merge branch 'cls_drop-fix' Jamal Hadi Salim says: ==================== net: dont intepret cls results when asked to drop It is possible that an error in processing may occur in tcf_classify() which will result in res.classid being some garbage value. Example of such a code path is when the classifier goes into a loop due to bad policy. See patch 1/2 for a sample splat. While the core code reacts correctly and asks the caller to drop the packet (by returning TC_ACT_SHOT) some callers first intepret the res.class as a pointer to memory and end up dropping the packet only after some activity with the pointer. There is likelihood of this resulting in an exploit. So lets fix all the known qdiscs that behave this way. ==================== Signed-off-by: David S. Miller commit caa4b35b4317d5147b3ab0fbdc9c075c7d2e9c12 Author: Jamal Hadi Salim Date: Sun Jan 1 16:57:44 2023 -0500 net: sched: cbq: dont intepret cls results when asked to drop If asked to drop a packet via TC_ACT_SHOT it is unsafe to assume that res.class contains a valid pointer Sample splat reported by Kyle Zeng [ 5.405624] 0: reclassify loop, rule prio 0, protocol 800 [ 5.406326] ================================================================== [ 5.407240] BUG: KASAN: slab-out-of-bounds in cbq_enqueue+0x54b/0xea0 [ 5.407987] Read of size 1 at addr ffff88800e3122aa by task poc/299 [ 5.408731] [ 5.408897] CPU: 0 PID: 299 Comm: poc Not tainted 5.10.155+ #15 [ 5.409516] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 [ 5.410439] Call Trace: [ 5.410764] dump_stack+0x87/0xcd [ 5.411153] print_address_description+0x7a/0x6b0 [ 5.411687] ? vprintk_func+0xb9/0xc0 [ 5.411905] ? printk+0x76/0x96 [ 5.412110] ? cbq_enqueue+0x54b/0xea0 [ 5.412323] kasan_report+0x17d/0x220 [ 5.412591] ? cbq_enqueue+0x54b/0xea0 [ 5.412803] __asan_report_load1_noabort+0x10/0x20 [ 5.413119] cbq_enqueue+0x54b/0xea0 [ 5.413400] ? __kasan_check_write+0x10/0x20 [ 5.413679] __dev_queue_xmit+0x9c0/0x1db0 [ 5.413922] dev_queue_xmit+0xc/0x10 [ 5.414136] ip_finish_output2+0x8bc/0xcd0 [ 5.414436] __ip_finish_output+0x472/0x7a0 [ 5.414692] ip_finish_output+0x5c/0x190 [ 5.414940] ip_output+0x2d8/0x3c0 [ 5.415150] ? ip_mc_finish_output+0x320/0x320 [ 5.415429] __ip_queue_xmit+0x753/0x1760 [ 5.415664] ip_queue_xmit+0x47/0x60 [ 5.415874] __tcp_transmit_skb+0x1ef9/0x34c0 [ 5.416129] tcp_connect+0x1f5e/0x4cb0 [ 5.416347] tcp_v4_connect+0xc8d/0x18c0 [ 5.416577] __inet_stream_connect+0x1ae/0xb40 [ 5.416836] ? local_bh_enable+0x11/0x20 [ 5.417066] ? lock_sock_nested+0x175/0x1d0 [ 5.417309] inet_stream_connect+0x5d/0x90 [ 5.417548] ? __inet_stream_connect+0xb40/0xb40 [ 5.417817] __sys_connect+0x260/0x2b0 [ 5.418037] __x64_sys_connect+0x76/0x80 [ 5.418267] do_syscall_64+0x31/0x50 [ 5.418477] entry_SYSCALL_64_after_hwframe+0x61/0xc6 [ 5.418770] RIP: 0033:0x473bb7 [ 5.418952] 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 [ 5.420046] RSP: 002b:00007fffd20eb0f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002a [ 5.420472] RAX: ffffffffffffffda RBX: 00007fffd20eb578 RCX: 0000000000473bb7 [ 5.420872] RDX: 0000000000000010 RSI: 00007fffd20eb110 RDI: 0000000000000007 [ 5.421271] RBP: 00007fffd20eb150 R08: 0000000000000001 R09: 0000000000000004 [ 5.421671] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 5.422071] R13: 00007fffd20eb568 R14: 00000000004fc740 R15: 0000000000000002 [ 5.422471] [ 5.422562] Allocated by task 299: [ 5.422782] __kasan_kmalloc+0x12d/0x160 [ 5.423007] kasan_kmalloc+0x5/0x10 [ 5.423208] kmem_cache_alloc_trace+0x201/0x2e0 [ 5.423492] tcf_proto_create+0x65/0x290 [ 5.423721] tc_new_tfilter+0x137e/0x1830 [ 5.423957] rtnetlink_rcv_msg+0x730/0x9f0 [ 5.424197] netlink_rcv_skb+0x166/0x300 [ 5.424428] rtnetlink_rcv+0x11/0x20 [ 5.424639] netlink_unicast+0x673/0x860 [ 5.424870] netlink_sendmsg+0x6af/0x9f0 [ 5.425100] __sys_sendto+0x58d/0x5a0 [ 5.425315] __x64_sys_sendto+0xda/0xf0 [ 5.425539] do_syscall_64+0x31/0x50 [ 5.425764] entry_SYSCALL_64_after_hwframe+0x61/0xc6 [ 5.426065] [ 5.426157] The buggy address belongs to the object at ffff88800e312200 [ 5.426157] which belongs to the cache kmalloc-128 of size 128 [ 5.426955] The buggy address is located 42 bytes to the right of [ 5.426955] 128-byte region [ffff88800e312200, ffff88800e312280) [ 5.427688] The buggy address belongs to the page: [ 5.427992] page:000000009875fabc refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xe312 [ 5.428562] flags: 0x100000000000200(slab) [ 5.428812] raw: 0100000000000200 dead000000000100 dead000000000122 ffff888007843680 [ 5.429325] raw: 0000000000000000 0000000000100010 00000001ffffffff ffff88800e312401 [ 5.429875] page dumped because: kasan: bad access detected [ 5.430214] page->mem_cgroup:ffff88800e312401 [ 5.430471] [ 5.430564] Memory state around the buggy address: [ 5.430846] ffff88800e312180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 5.431267] ffff88800e312200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 5.431705] >ffff88800e312280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 5.432123] ^ [ 5.432391] ffff88800e312300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 5.432810] ffff88800e312380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 5.433229] ================================================================== [ 5.433648] Disabling lock debugging due to kernel taint Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Kyle Zeng Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/sch_cbq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2965c7be0522eaa18808684b7b82b248515511b Author: Jamal Hadi Salim Date: Sun Jan 1 16:57:43 2023 -0500 net: sched: atm: dont intepret cls results when asked to drop If asked to drop a packet via TC_ACT_SHOT it is unsafe to assume res.class contains a valid pointer Fixes: b0188d4dbe5f ("[NET_SCHED]: sch_atm: Lindent") Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/sch_atm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 490748874ebf1875420fc29b335bba2075dd1b5e Author: Miaoqian Lin Date: Sat Dec 31 13:58:48 2022 +0400 soc: imx8m: Fix incorrect check for of_clk_get_by_name() of_clk_get_by_name() returns error pointers instead of NULL. Use IS_ERR() checks the return value to catch errors. Fixes: 836fb30949d9 ("soc: imx8m: Enable OCOTP clock before reading the register") Signed-off-by: Miaoqian Lin Signed-off-by: Shawn Guo drivers/soc/imx/soc-imx8m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae066f374687d7dd06bb8c732f66d6ab3c3fd480 Author: Tim Harvey Date: Wed Dec 28 12:26:06 2022 -0800 arm64: dts: imx8mm-venice-gw7901: fix USB2 controller OC polarity The GW7901 has USB2 routed to a USB VBUS supply with over-current protection via an active-low pin. Define the OC pin polarity properly. Fixes: 2b1649a83afc ("arm64: dts: imx: Add i.mx8mm Gateworks gw7901 dts support") Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts | 1 + 1 file changed, 1 insertion(+) commit b3d40c3ec3dc4ad78017de6c3a38979f57aaaab8 Author: Jiasheng Jiang Date: Tue Nov 22 21:48:23 2022 +0800 HID: intel_ish-hid: Add check for ishtp_dma_tx_map As the kcalloc may return NULL pointer, it should be better to check the ishtp_dma_tx_map before use in order to avoid NULL pointer dereference. Fixes: 3703f53b99e4 ("HID: intel_ish-hid: ISH Transport layer") Signed-off-by: Jiasheng Jiang Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp/dma-if.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1e336aa0c0250ec84c6f16efac40c9f0138e367d Author: Haibo Chen Date: Wed Dec 7 19:23:15 2022 +0800 mmc: sdhci-esdhc-imx: correct the tuning start tap and step setting Current code logic may be impacted by the setting of ROM/Bootloader, so unmask these bits first, then setting these bits accordingly. Fixes: 2b16cf326b70 ("mmc: sdhci-esdhc-imx: move tuning static configuration into hwinit function") Signed-off-by: Haibo Chen Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221207112315.1812222-1-haibo.chen@nxp.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 694175cd8a1643cde3acb45c9294bca44a8e08e9 Author: Miaoqian Lin Date: Mon Jan 2 12:20:39 2023 +0400 gpio: sifive: Fix refcount leak in sifive_gpio_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: 96868dce644d ("gpio/sifive: Add GPIO driver for SiFive SoCs") Signed-off-by: Miaoqian Lin Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-sifive.c | 1 + 1 file changed, 1 insertion(+) commit 8e1858710d9a71d88acd922f2e95d1eddb90eea0 Author: Xiubo Li Date: Thu Nov 17 10:57:53 2022 +0800 ceph: avoid use-after-free in ceph_fl_release_lock() When ceph releasing the file_lock it will try to get the inode pointer from the fl->fl_file, which the memory could already be released by another thread in filp_close(). Because in VFS layer the fl->fl_file doesn't increase the file's reference counter. Will switch to use ceph dedicate lock info to track the inode. And in ceph_fl_release_lock() we should skip all the operations if the fl->fl_u.ceph.inode is not set, which should come from the request file_lock. And we will set fl->fl_u.ceph.inode when inserting it to the inode lock list, which is when copying the lock. Link: https://tracker.ceph.com/issues/57986 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/locks.c | 20 ++++++++++++++++++-- include/linux/fs.h | 3 +++ 2 files changed, 21 insertions(+), 2 deletions(-) commit 461ab10ef7e6ea9b41a0571a7fc6a72af9549a3c Author: Xiubo Li Date: Thu Nov 17 10:43:21 2022 +0800 ceph: switch to vfs_inode_has_locks() to fix file lock bug For the POSIX locks they are using the same owner, which is the thread id. And multiple POSIX locks could be merged into single one, so when checking whether the 'file' has locks may fail. For a file where some openers use locking and others don't is a really odd usage pattern though. Locks are like stoplights -- they only work if everyone pays attention to them. Just switch ceph_get_caps() to check whether any locks are set on the inode. If there are POSIX/OFD/FLOCK locks on the file at the time, we should set CHECK_FILELOCK, regardless of what fd was used to set the lock. Fixes: ff5d913dfc71 ("ceph: return -EIO if read/write against filp that lost file locks") Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 2 +- fs/ceph/locks.c | 4 ---- fs/ceph/super.h | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) commit d19ab1f785d0b6b9f709799f0938658903821ba1 Author: Arnd Bergmann Date: Tue Dec 20 15:13:34 2022 +0100 mtd: cfi: allow building spi-intel standalone When MTD or MTD_CFI_GEOMETRY is disabled, the spi-intel driver fails to build, as it includes the shared CFI header: include/linux/mtd/cfi.h:62:2: error: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Werror=cpp] 62 | #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. linux/mtd/spi-nor.h does not actually need to include cfi.h, so remove the inclusion here to fix the warning. This uncovers a missing #include in spi-nor/core.c so add that there to prevent a different build issue. Fixes: e23e5a05d1fd ("mtd: spi-nor: intel-spi: Convert to SPI MEM") Signed-off-by: Arnd Bergmann Reviewed-by: Mika Westerberg Reviewed-by: Tokunori Ikegami Acked-by: Pratyush Yadav Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221220141352.1486360-1-arnd@kernel.org drivers/mtd/spi-nor/core.c | 1 + include/linux/mtd/spi-nor.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 105c14b84d93168431abba5d55e6c26fa4b65abb Author: Mikhail Zhilkin Date: Thu Dec 8 23:28:29 2022 +0300 mtd: parsers: scpart: fix __udivdi3 undefined on mips This fixes the following compile error on mips architecture with clang version 16.0.0 reported by the 0-DAY CI Kernel Test Service: ld.lld: error: undefined symbol: __udivdi3 referenced by scpart.c mtd/parsers/scpart.o:(scpart_parse) in archive drivers/built-in.a As a workaround this makes 'offs' a 32-bit type. This is enough, because the mtd containing partition table practically does not exceed 1 MB. We can revert this when the [Link] has been resolved. Link: https://github.com/ClangBuiltLinux/linux/issues/1635 Fixes: 9b78ef0c7997 ("mtd: parsers: add support for Sercomm partitions") Reported-by: kernel test robot Suggested-by: Arnd Bergmann Signed-off-by: Mikhail Zhilkin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/805fe58e-690f-6a3f-5ebf-2f6f6e6e4599@gmail.com drivers/mtd/parsers/scpart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7adde5ac25fa50dbb1fb237042316685cafe976c Author: Yuan Can Date: Thu Dec 8 11:36:20 2022 +0000 mtd: parsers: Fix potential memory leak in mtd_parser_tplink_safeloader_parse() The parts needs to be freed with all its elements, otherwise it will be leaked. Fixes: 00a3588084be ("mtd: parsers: add TP-Link SafeLoader partitions table parser") Signed-off-by: Yuan Can Reviewed-by: Dan Carpenter Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221208113620.78855-1-yuancan@huawei.com drivers/mtd/parsers/tplink_safeloader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3b754ed6d1cd90017e66e5cc16f3923e4a952ffc Author: Carlo Caione Date: Mon Dec 19 09:43:05 2022 +0100 drm/meson: Reduce the FIFO lines held when AFBC is not used Having a bigger number of FIFO lines held after vsync is only useful to SoCs using AFBC to give time to the AFBC decoder to be reset, configured and enabled again. For SoCs not using AFBC this, on the contrary, is causing on some displays issues and a few pixels vertical offset in the displayed image. Conditionally increase the number of lines held after vsync only for SoCs using AFBC, leaving the default value for all the others. Fixes: 24e0d4058eff ("drm/meson: hold 32 lines after vsync to give time for AFBC start") Signed-off-by: Carlo Caione Acked-by: Martin Blumenstingl Acked-by: Neil Armstrong [narmstrong: added fixes tag] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221216-afbc_s905x-v1-0-033bebf780d9@baylibre.com drivers/gpu/drm/meson/meson_viu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cc2e9d2b26c86c1dd8687f6916e5f621bcacd6f7 Author: David Rientjes Date: Tue Dec 27 22:05:48 2022 -0800 mm, slab: periodically resched in drain_freelist() drain_freelist() can be called with a very large number of slabs to free, such as for kmem_cache_shrink(), or depending on various settings of the slab cache when doing periodic reaping. If there is a potentially long list of slabs to drain, periodically schedule to ensure we aren't saturating the cpu for too long. Signed-off-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka mm/slab.c | 2 ++ 1 file changed, 2 insertions(+) commit 83dcedd5540d4ac61376ddff5362f7d9f866a6ec Author: Namjae Jeon Date: Sat Dec 31 17:32:31 2022 +0900 ksmbd: fix infinite loop in ksmbd_conn_handler_loop() If kernel_recvmsg() return -EAGAIN in ksmbd_tcp_readv() and go round again, It will cause infinite loop issue. And all threads from next connections would be doing that. This patch add max retry count(2) to avoid it. kernel_recvmsg() will wait during 7sec timeout and try to retry two time if -EAGAIN is returned. And add flags of kvmalloc to __GFP_NOWARN and __GFP_NORETRY to disconnect immediately without retrying on memory alloation failure. Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers") Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-18259 Reviewed-by: Sergey Senozhatsky Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/connection.c | 7 +++++-- fs/ksmbd/transport_tcp.c | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) commit 797805d81baa814f76cf7bdab35f86408a79d707 Author: William Liu Date: Fri Dec 30 13:03:15 2022 +0900 ksmbd: check nt_len to be at least CIFS_ENCPWD_SIZE in ksmbd_decode_ntlmssp_auth_blob "nt_len - CIFS_ENCPWD_SIZE" is passed directly from ksmbd_decode_ntlmssp_auth_blob to ksmbd_auth_ntlmv2. Malicious requests can set nt_len to less than CIFS_ENCPWD_SIZE, which results in a negative number (or large unsigned value) used for a subsequent memcpy in ksmbd_auth_ntlvm2 and can cause a panic. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Signed-off-by: William Liu Signed-off-by: Hrvoje Mišetić Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/auth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cdfb2fef522d0c3f9cf293db51de88e9b3d46846 Author: Marios Makassikis Date: Fri Dec 23 11:59:31 2022 +0100 ksmbd: send proper error response in smb2_tree_connect() Currently, smb2_tree_connect doesn't send an error response packet on error. This causes libsmb2 to skip the specific error code and fail with the following: smb2_service failed with : Failed to parse fixed part of command payload. Unexpected size of Error reply. Expected 9, got 8 Signed-off-by: Marios Makassikis Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/smb2pdu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5e9a7b9c2ea18551759833146a181b14835bfe39 Author: Trond Myklebust Date: Sun Jan 1 20:17:23 2023 -0500 NFS: Fix up a sparse warning sparse is warning about an incorrect RCU dereference. fs/nfs/dir.c:2965:56: warning: incorrect type in argument 1 (different address spaces) fs/nfs/dir.c:2965:56: expected struct cred const * fs/nfs/dir.c:2965:56: got struct cred const [noderef] __rcu *const cred Signed-off-by: Trond Myklebust fs/nfs/dir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 029085b8949f5d269ae2bbd14915407dd0c7f902 Author: Chengen Du Date: Fri Dec 30 11:04:32 2022 +0800 NFS: Judge the file access cache's timestamp in rcu path If the user's login time is newer than the cache's timestamp, we expect the cache may be stale and need to clear. The stale cache will remain in the list's tail if no other users operate on that inode. Once the user accesses the inode, the stale cache will be returned in rcu path. Signed-off-by: Chengen Du Signed-off-by: Trond Myklebust fs/nfs/dir.c | 3 +++ 1 file changed, 3 insertions(+) commit 000bca8d706d1bf7cca01af75787247c5a2fdedf Author: Brian Norris Date: Fri Dec 30 22:15:45 2022 -0800 ASoC: qcom: lpass-cpu: Fix fallback SD line index handling These indices should reference the ID placed within the dai_driver array, not the indices of the array itself. This fixes commit 4ff028f6c108 ("ASoC: qcom: lpass-cpu: Make I2S SD lines configurable"), which among others, broke IPQ8064 audio (sound/soc/qcom/lpass-ipq806x.c) because it uses ID 4 but we'd stop initializing the mi2s_playback_sd_mode and mi2s_capture_sd_mode arrays at ID 0. Fixes: 4ff028f6c108 ("ASoC: qcom: lpass-cpu: Make I2S SD lines configurable") Cc: Signed-off-by: Brian Norris Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20221231061545.2110253-1-computersforpeace@gmail.com Signed-off-by: Mark Brown sound/soc/qcom/lpass-cpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 88603b6dc419445847923fcb7fe5080067a30f98 Author: Linus Torvalds Date: Sun Jan 1 13:53:16 2023 -0800 Linux 6.2-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 150aae354b817f540848476bace2b2ba9931b197 Merge: 5b129817aedb 0a041ebca495 Author: Linus Torvalds Date: Sun Jan 1 11:27:00 2023 -0800 Merge tag 'perf_urgent_for_v6.2_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Borislav Petkov: - Pass only an initialized perf event attribute to the LSM hook - Fix a use-after-free on the perf syscall's error path - A potential integer overflow fix in amd_core_pmu_init() - Fix the cgroup events tracking after the context handling rewrite - Return the proper value from the inherit_event() function on error * tag 'perf_urgent_for_v6.2_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Call LSM hook after copying perf_event_attr perf: Fix use-after-free in error path perf/x86/amd: fix potential integer overflow on shift of a int perf/core: Fix cgroup events tracking perf core: Return error pointer if inherit_event() fails to find pmu_ctx commit 5b129817aedb03d94fb960e7a34d0f5eaa20a2f2 Merge: 95d248d16f9c 63dc6325ff41 Author: Linus Torvalds Date: Sun Jan 1 11:19:50 2023 -0800 Merge tag 'x86_urgent_for_v6.2_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Two fixes to correct how kprobes handles INT3 now that they're added by other functionality like the rethunks and not only kgdb - Remove __init section markings of two functions which are referenced by a function in the .text section * tag 'x86_urgent_for_v6.2_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kprobes: Fix optprobe optimization check with CONFIG_RETHUNK x86/kprobes: Fix kprobes instruction boudary check with CONFIG_RETHUNK x86/calldepth: Fix incorrect init section references commit 95d248d16f9cb42de717367832cffa0f83e97fde Merge: 8b41948296b7 94cd8fa09f5f Author: Linus Torvalds Date: Sun Jan 1 11:15:05 2023 -0800 Merge tag 'locking_urgent_for_v6.2_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Borislav Petkov: - Prevent the leaking of a debug timer in futex_waitv() - A preempt-RT mutex locking fix, adding the proper acquire semantics * tag 'locking_urgent_for_v6.2_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Fix futex_waitv() hrtimer debug object leak on kcalloc error rtmutex: Add acquire semantics for rtmutex lock acquisition slow path commit 8b41948296b76588f5ebaf7cbc5be5c803ece70a Merge: e4cf7c25bae5 a9f5a752e86f Author: Linus Torvalds Date: Sun Jan 1 11:11:13 2023 -0800 Merge tag 'drm-fixes-2023-01-01' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Daniel Vetter: "I'm just back from the mountains, and Dave is out at the beach and should be back in a week again. Just i915 fixes and since Rodrigo bothered to make the pull last week I figured I should warm up gpg and forward this in a nice signed tag as a new years present! - i915 fixes for newer platforms - i915 locking rework to not give up in vm eviction fallback path too early" * tag 'drm-fixes-2023-01-01' of git://anongit.freedesktop.org/drm/drm: drm/i915/dsi: fix MIPI_BKLT_EN_1 native GPIO index drm/i915/dsi: add support for ICL+ native MIPI GPIO sequence drm/i915/uc: Fix two issues with over-size firmware files drm/i915: improve the catch-all evict to handle lock contention drm/i915: Remove __maybe_unused from mtl_info drm/i915: fix TLB invalidation for Gen12.50 video and compute engines commit 91e2286160edd29d3fea8efff2dcda7df321878d Author: Michał Grzelak Date: Thu Dec 29 15:22:19 2022 +0100 dt-bindings: net: marvell,orion-mdio: Fix examples As stated in marvell-orion-mdio.txt deleted in commit 0781434af811f ("dt-bindings: net: orion-mdio: Convert to JSON schema") if 'interrupts' property is present, width of 'reg' should be 0x84. Otherwise, width of 'reg' should be 0x4. Fix 'examples:' and add constraints checking whether 'interrupts' property is present and validate it against fixed values in reg. Signed-off-by: Michał Grzelak Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller .../bindings/net/marvell,orion-mdio.yaml | 30 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) commit a3542b0ccd58f9fd42f34afa9daea435279a7c1c Author: Samuel Holland Date: Sat Dec 31 16:05:46 2022 -0600 dt-bindings: net: sun8i-emac: Add phy-supply property This property has always been supported by the Linux driver; see commit 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i"). In fact, the original driver submission includes the phy-supply code but no mention of it in the binding, so the omission appears to be accidental. In addition, the property is documented in the binding for the previous hardware generation, allwinner,sun7i-a20-gmac. Document phy-supply in the binding to fix devicetree validation for the 25+ boards that already use this property. Fixes: 0441bde003be ("dt-bindings: net-next: Add DT bindings documentation for Allwinner dwmac-sun8i") Acked-by: Rob Herring Reviewed-by: Andre Przywara Signed-off-by: Samuel Holland Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml | 3 +++ 1 file changed, 3 insertions(+) commit d9d71a89f28d27ac772c429b37d52668d011df7a Author: Alex Elder Date: Fri Dec 30 16:33:04 2022 -0600 net: ipa: use proper endpoint mask for suspend It is now possible for a system to have more than 32 endpoints. As a result, registers related to endpoint suspend are parameterized, with 32 endpoints represented in one more registers. In ipa_interrupt_suspend_control(), the IPA_SUSPEND_EN register offset is determined properly, but the bit mask used still assumes the number of enpoints won't exceed 32. This is a bug. Fix it. Fixes: f298ba785e2d ("net: ipa: add a parameter to suspend registers") Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa_interrupt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1c429c10192c930fd358b0c9a777c222a352d945 Merge: 6d4cfcf97986 1856628baa17 Author: David S. Miller Date: Sun Jan 1 11:59:53 2023 +0000 Merge branch 'selftests-fix' Po-Hsu Lin says: ==================== selftests: net: fix for arp_ndisc_evict_nocarrier test This patchset will fix a false-positive issue caused by the command in cleanup_v6() of the arp_ndisc_evict_nocarrier test. Also, it will make the test to return a non-zero value for any failure reported in the test for us to avoid false-negative results. ==================== Signed-off-by: David S. Miller commit 1856628baa17032531916984808d1bdfd62700d4 Author: Po-Hsu Lin Date: Fri Dec 30 17:18:29 2022 +0800 selftests: net: return non-zero for failures reported in arp_ndisc_evict_nocarrier Return non-zero return value if there is any failure reported in this script during the test. Otherwise it can only reflect the status of the last command. Fixes: f86ca07eb531 ("selftests: net: add arp_ndisc_evict_nocarrier") Signed-off-by: Po-Hsu Lin Signed-off-by: David S. Miller tools/testing/selftests/net/arp_ndisc_evict_nocarrier.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 9c4d7f45d60745a1cea0e841fa5e3444c398d2f1 Author: Po-Hsu Lin Date: Fri Dec 30 17:18:28 2022 +0800 selftests: net: fix cleanup_v6() for arp_ndisc_evict_nocarrier The cleanup_v6() will cause the arp_ndisc_evict_nocarrier script exit with 255 (No such file or directory), even the tests are good: # selftests: net: arp_ndisc_evict_nocarrier.sh # run arp_evict_nocarrier=1 test # RTNETLINK answers: File exists # ok # run arp_evict_nocarrier=0 test # RTNETLINK answers: File exists # ok # run all.arp_evict_nocarrier=0 test # RTNETLINK answers: File exists # ok # run ndisc_evict_nocarrier=1 test # ok # run ndisc_evict_nocarrier=0 test # ok # run all.ndisc_evict_nocarrier=0 test # ok not ok 1 selftests: net: arp_ndisc_evict_nocarrier.sh # exit=255 This is because it's trying to modify the parameter for ipv4 instead. Also, tests for ipv6 (run_ndisc_evict_nocarrier_enabled() and run_ndisc_evict_nocarrier_disabled() are working on veth1, reflect this fact in cleanup_v6(). Fixes: f86ca07eb531 ("selftests: net: add arp_ndisc_evict_nocarrier") Signed-off-by: Po-Hsu Lin Signed-off-by: David S. Miller tools/testing/selftests/net/arp_ndisc_evict_nocarrier.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6d4cfcf97986cc67635630a2bc1f8d5c92ecdbba Author: Sean Anderson Date: Thu Dec 29 15:21:20 2022 -0500 net: phy: Update documentation for get_rate_matching Now that phylink no longer calls phy_get_rate_matching with PHY_INTERFACE_MODE_NA, phys no longer need to support it. Remove the documentation mandating support. Fixes: 7642cc28fd37 ("net: phylink: fix PHY validation with rate adaption") Signed-off-by: Sean Anderson Signed-off-by: David S. Miller include/linux/phy.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a9f5a752e86f1897c3b377b6b861576a4c1a2ff0 Merge: 1b929c02afd3 6217e9f05a74 Author: Daniel Vetter Date: Sun Jan 1 11:52:11 2023 +0100 Merge tag 'drm-intel-fixes-2022-12-30' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - fix TLB invalidation for DG2 and newer platforms. (Andrzej) - Remove __maybe_unused from mtl_info (Lucas) - improve the catch-all evict to handle lock contention (Matt Auld) - Fix two issues with over-size (GuC/HuC) firmware files (John) - Fix DSI resume issues on ICL+ (Jani) Signed-off-by: Daniel Vetter From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y662ijDHrZCjTFla@intel.com commit d02b8256183f3e6ebde5f685effabfbcd1d33cf6 Merge: d039535850ee a4165830ca23 Author: David S. Miller Date: Sun Jan 1 09:27:12 2023 +0000 Merge branch 'dsa-qca8k-fixes' Christian Marangi says: ==================== net: dsa: qca8k: multiple fix on mdio read/write Due to some problems in reading the Documentation and elaborating it some wrong assumption were done. The error was reported and notice only now due to how things are setup in the code flow. First 2 patch fix mgmt eth where the lenght calculation is very confusing and in step of word size. (the related commit description have an extensive description about how this mess works) Last 3 patch revert the broken mdio cache and apply a correct version that should still save some extra mdio in phy poll secnario. These 5 patch fix each related problem and apply what the Documentation actually say. Changes v2: - Add cover letter - Fix typo in revert patch ==================== Signed-off-by: David S. Miller commit a4165830ca237f2b3318faf62562bce8ce12a389 Author: Christian Marangi Date: Thu Dec 29 17:33:36 2022 +0100 net: dsa: qca8k: improve mdio master read/write by using single lo/hi Improve mdio master read/write by using singe mii read/write lo/hi. In a read and write we need to poll the mdio master regs in a busy loop to check for a specific bit present in the upper half of the reg. We can ignore the other half since it won't contain useful data. This will save an additional useless read for each read and write operation. In a read operation the returned data is present in the mdio master reg lower half. We can ignore the other half since it won't contain useful data. This will save an additional useless read for each read operation. In a read operation it's needed to just set the hi half of the mdio master reg as the lo half will be replaced by the result. This will save an additional useless write for each read operation. Tested-by: Ronald Wahl Signed-off-by: Christian Marangi Signed-off-by: David S. Miller drivers/net/dsa/qca/qca8k-8xxx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cfbd6de588ef659c198083205dc954a6d3ed2aec Author: Christian Marangi Date: Thu Dec 29 17:33:35 2022 +0100 net: dsa: qca8k: introduce single mii read/write lo/hi It may be useful to read/write just the lo or hi half of a reg. This is especially useful for phy poll with the use of mdio master. The mdio master reg is composed by the first 16 bit related to setup and the other half with the returned data or data to write. Refactor the mii function to permit single mii read/write of lo or hi half of the reg. Tested-by: Ronald Wahl Signed-off-by: Christian Marangi Signed-off-by: David S. Miller drivers/net/dsa/qca/qca8k-8xxx.c | 106 +++++++++++++++++++++++++++++++-------- 1 file changed, 84 insertions(+), 22 deletions(-) commit 03cb9e6d0b32b768e3d9d473c5c4ca1100877664 Author: Christian Marangi Date: Thu Dec 29 17:33:34 2022 +0100 Revert "net: dsa: qca8k: cache lo and hi for mdio write" This reverts commit 2481d206fae7884cd07014fd1318e63af35e99eb. The Documentation is very confusing about the topic. The cache logic for hi and lo is wrong and actually miss some regs to be actually written. What the Documentation actually intended was that it's possible to skip writing hi OR lo if half of the reg is not needed to be written or read. Revert the change in favor of a better and correct implementation. Reported-by: Ronald Wahl Signed-off-by: Christian Marangi Cc: stable@vger.kernel.org # v5.18+ Signed-off-by: David S. Miller drivers/net/dsa/qca/qca8k-8xxx.c | 61 ++++++++-------------------------------- drivers/net/dsa/qca/qca8k.h | 5 ---- 2 files changed, 12 insertions(+), 54 deletions(-) commit d9dba91be71f03cc75bcf39fc0d5d99ff33f1ae0 Author: Christian Marangi Date: Thu Dec 29 17:33:33 2022 +0100 net: dsa: tag_qca: fix wrong MGMT_DATA2 size It was discovered that MGMT_DATA2 can contain up to 28 bytes of data instead of the 12 bytes written in the Documentation by accounting the limit of 16 bytes declared in Documentation subtracting the first 4 byte in the packet header. Update the define with the real world value. Tested-by: Ronald Wahl Fixes: c2ee8181fddb ("net: dsa: tag_qca: add define for handling mgmt Ethernet packet") Signed-off-by: Christian Marangi Cc: stable@vger.kernel.org # v5.18+ Signed-off-by: David S. Miller include/linux/dsa/tag_qca.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9807ae69746196ee4bbffe7d22d22ab2b61c6ed0 Author: Christian Marangi Date: Thu Dec 29 17:33:32 2022 +0100 net: dsa: qca8k: fix wrong length value for mgmt eth packet The assumption that Documentation was right about how this value work was wrong. It was discovered that the length value of the mgmt header is in step of word size. As an example to process 4 byte of data the correct length to set is 2. To process 8 byte 4, 12 byte 6, 16 byte 8... Odd values will always return the next size on the ack packet. (length of 3 (6 byte) will always return 8 bytes of data) This means that a value of 15 (0xf) actually means reading/writing 32 bytes of data instead of 16 bytes. This behaviour is totally absent and not documented in the switch Documentation. In fact from Documentation the max value that mgmt eth can process is 16 byte of data while in reality it can process 32 bytes at once. To handle this we always round up the length after deviding it for word size. We check if the result is odd and we round another time to align to what the switch will provide in the ack packet. The workaround for the length limit of 15 is still needed as the length reg max value is 0xf(15) Reported-by: Ronald Wahl Tested-by: Ronald Wahl Fixes: 90386223f44e ("net: dsa: qca8k: add support for larger read/write size with mgmt Ethernet") Signed-off-by: Christian Marangi Cc: stable@vger.kernel.org # v5.18+ Signed-off-by: David S. Miller drivers/net/dsa/qca/qca8k-8xxx.c | 45 +++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 10 deletions(-) commit 8de8482fe5732fbef4f5af82bc0c0362c804cd1f Author: Maor Gottlieb Date: Wed Dec 28 14:56:10 2022 +0200 RDMA/mlx5: Fix validation of max_rd_atomic caps for DC Currently, when modifying DC, we validate max_rd_atomic user attribute against the RC cap, validate against DC. RC and DC QP types have different device limitations. This can cause userspace created DC QPs to malfunction. Fixes: c32a4f296e1d ("IB/mlx5: Add support for DC Initiator QP") Link: https://lore.kernel.org/r/0c5aee72cea188c3bb770f4207cce7abc9b6fc74.1672231736.git.leonro@nvidia.com Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/qp.c | 49 +++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 14 deletions(-) commit 38b50aa44495d5eb4218f0b82fc2da76505cec53 Author: Shay Drory Date: Wed Dec 28 14:56:09 2022 +0200 RDMA/mlx5: Fix mlx5_ib_get_hw_stats when used for device Currently, when mlx5_ib_get_hw_stats() is used for device (port_num = 0), there is a special handling in order to use the correct counters, but, port_num is being passed down the stack without any change. Also, some functions assume that port_num >=1. As a result, the following oops can occur. BUG: unable to handle page fault for address: ffff89510294f1a8 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP CPU: 8 PID: 1382 Comm: devlink Tainted: G W 6.1.0-rc4_for_upstream_base_2022_11_10_16_12 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:_raw_spin_lock+0xc/0x20 Call Trace: mlx5_ib_get_native_port_mdev+0x73/0xe0 [mlx5_ib] do_get_hw_stats.constprop.0+0x109/0x160 [mlx5_ib] mlx5_ib_get_hw_stats+0xad/0x180 [mlx5_ib] ib_setup_device_attrs+0xf0/0x290 [ib_core] ib_register_device+0x3bb/0x510 [ib_core] ? atomic_notifier_chain_register+0x67/0x80 __mlx5_ib_add+0x2b/0x80 [mlx5_ib] mlx5r_probe+0xb8/0x150 [mlx5_ib] ? auxiliary_match_id+0x6a/0x90 auxiliary_bus_probe+0x3c/0x70 ? driver_sysfs_add+0x6b/0x90 really_probe+0xcd/0x380 __driver_probe_device+0x80/0x170 driver_probe_device+0x1e/0x90 __device_attach_driver+0x7d/0x100 ? driver_allows_async_probing+0x60/0x60 ? driver_allows_async_probing+0x60/0x60 bus_for_each_drv+0x7b/0xc0 __device_attach+0xbc/0x200 bus_probe_device+0x87/0xa0 device_add+0x404/0x940 ? dev_set_name+0x53/0x70 __auxiliary_device_add+0x43/0x60 add_adev+0x99/0xe0 [mlx5_core] mlx5_attach_device+0xc8/0x120 [mlx5_core] mlx5_load_one_devl_locked+0xb2/0xe0 [mlx5_core] devlink_reload+0x133/0x250 devlink_nl_cmd_reload+0x480/0x570 ? devlink_nl_pre_doit+0x44/0x2b0 genl_family_rcv_msg_doit.isra.0+0xc2/0x110 genl_rcv_msg+0x180/0x2b0 ? devlink_nl_cmd_region_read_dumpit+0x540/0x540 ? devlink_reload+0x250/0x250 ? devlink_put+0x50/0x50 ? genl_family_rcv_msg_doit.isra.0+0x110/0x110 netlink_rcv_skb+0x54/0x100 genl_rcv+0x24/0x40 netlink_unicast+0x1f6/0x2c0 netlink_sendmsg+0x237/0x490 sock_sendmsg+0x33/0x40 __sys_sendto+0x103/0x160 ? handle_mm_fault+0x10e/0x290 ? do_user_addr_fault+0x1c0/0x5f0 __x64_sys_sendto+0x25/0x30 do_syscall_64+0x3d/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Fix it by setting port_num to 1 in order to get device status and remove unused variable. Fixes: aac4492ef23a ("IB/mlx5: Update counter implementation for dual port RoCE") Link: https://lore.kernel.org/r/98b82994c3cd3fa593b8a75ed3f3901e208beb0f.1672231736.git.leonro@nvidia.com Signed-off-by: Shay Drory Reviewed-by: Patrisious Haddad Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/counters.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9a65c759e4666476a6642ad87b4db8a67cb957d0 Author: Marco Felsch Date: Sun Jan 1 12:50:42 2023 +0800 arm64: dts: imx8mp-evk: pcie0-refclk cosmetic cleanup Use the correct indention. Fixes: d50650500064 ("arm64: dts: imx8mp-evk: Add PCIe support") Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 10e2f328bd900787fd2db24e474f87e1d525ccc4 Author: Adam Ford Date: Sat Dec 17 12:08:49 2022 -0600 arm64: dts: imx8mp: Fix power-domain typo dt_binding_check detects an issue with the pgc_hsiomix power domain: pgc: 'power-domains@17' does not match any of the regexes This is because 'power-domains' should be 'power-domain' Fixes: 2ae42e0c0b67 ("arm64: dts: imx8mp: add HSIO power-domains") Signed-off-by: Adam Ford Reviewed-by: Laurent Pinchart Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3b75ace2085aca623c57e04ea7218ae690090fb Author: Adam Ford Date: Sat Dec 17 12:08:48 2022 -0600 arm64: dts: imx8mp: Fix missing GPC Interrupt The GPC node references an interrupt parent, but it doesn't state the interrupt itself. According to the TRM, this IRQ is 87. This also eliminate an error detected from dt_binding_check Fixes: fc0f05124621 ("arm64: dts: imx8mp: add GPC node with GPU power domains") Signed-off-by: Adam Ford Reviewed-by: Laurent Pinchart Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 + 1 file changed, 1 insertion(+) commit 21b84ebeee79d91e405f87f051e9489ef30ecad6 Author: Lucas Stach Date: Fri Aug 26 21:13:03 2022 +0200 soc: imx: imx8mp-blk-ctrl: don't set power device name Setting the device name after it has been registered confuses the sysfs cleanup paths. This has already been fixed for the imx8m-blk-ctrl driver in b64b46fbaa1d ("Revert "soc: imx: imx8m-blk-ctrl: set power device name""), but the same problem exists in imx8mp-blk-ctrl. Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl") Signed-off-by: Lucas Stach Reviewed-by: Peng Fan Signed-off-by: Shawn Guo drivers/soc/imx/imx8mp-blk-ctrl.c | 1 - 1 file changed, 1 deletion(-) commit c10a5855488bbd9912ddae3ad2d1f2e4b1a3c275 Author: Marek Vasut Date: Fri Dec 16 01:05:26 2022 +0100 arm64: dts: imx8mm: Drop xtal clock specifier from eDM SBC The clk_xtal32k have clock-cells = <0>, drop the bogus specifier. Fixes: 9509593f327a ("arm64: dts: imx8mm: Model PMIC to SNVS RTC clock path on Data Modul i.MX8M Mini eDM SBC") Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4cf7c25bae5c3b5089a3c23a897f450149caef2 Merge: e39d9b9f89f2 6a5e25fc3e0b Author: Linus Torvalds Date: Sat Dec 31 10:21:47 2022 -0800 Merge tag 'kbuild-fixes-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix broken BuildID - Add srcrpm-pkg to the help message - Fix the option order for modpost built with musl libc - Fix the build dependency of rpm-pkg for openSUSE * tag 'kbuild-fixes-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: fixdep: remove unneeded inclusion kbuild: sort single-targets alphabetically again kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires kbuild: Fix running modpost with musl libc kbuild: add a missing line for help message .gitignore: ignore *.rpm arch: fix broken BuildID for arm64 and riscv kconfig: Add static text for search information in help menu commit e39d9b9f89f2efd653212064f941de6f53c3c060 Merge: c8451c141e07 37e14e4f3715 Author: Linus Torvalds Date: Sat Dec 31 10:01:44 2022 -0800 Merge tag 'ata-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ata fix from Damien Le Moal: "A single fix to address an issue with wake from suspend with PCS adapters, from Adam" * tag 'ata-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: ahci: Fix PCS quirk application for suspend commit 87b30c4b0efb6a194a7b8eac2568a3da520d905f Author: Dario Binacchi Date: Thu Dec 8 17:54:03 2022 +0100 ARM: imx: add missing of_node_put() Calling of_find_compatible_node() returns a node pointer with refcount incremented. Use of_node_put() on it when done. The patch fixes the same problem on different i.MX platforms. Fixes: 8b88f7ef31dde ("ARM: mx25: Retrieve IIM base from dt") Fixes: 94b2bec1b0e05 ("ARM: imx27: Retrieve the SYSCTRL base address from devicetree") Fixes: 3172225d45bd9 ("ARM: imx31: Retrieve the IIM base address from devicetree") Fixes: f68ea682d1da7 ("ARM: imx35: Retrieve the IIM base address from devicetree") Fixes: ee18a7154ee08 ("ARM: imx5: retrieve iim base from device tree") Signed-off-by: Dario Binacchi Reviewed-by: Fabio Estevam Reviewed-by: Martin Kaiser Signed-off-by: Shawn Guo arch/arm/mach-imx/cpu-imx25.c | 1 + arch/arm/mach-imx/cpu-imx27.c | 1 + arch/arm/mach-imx/cpu-imx31.c | 1 + arch/arm/mach-imx/cpu-imx35.c | 1 + arch/arm/mach-imx/cpu-imx5.c | 1 + 5 files changed, 5 insertions(+) commit 62f0147fd4d86620853bee027800f988d3013656 Author: Haibo Chen Date: Thu Dec 8 17:06:58 2022 +0800 arm64: dts: imx93-11x11-evk: correct clock and strobe pad setting For clock and strobe pad of usdhc, need to config as pull down. Current pad config set these pad as both pull up and pull down, this is wrong, so fix it here. Find this issue when enable HS400ES mode on one Micron eMMC chip, CMD8 always meet CRC error in HS400ES/HS400 mode. Fixes: e37907bd8294 ("arm64: dts: freescale: add i.MX93 11x11 EVK basic support") Signed-off-by: Haibo Chen Reviewed-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6c620a30515c494b5eeb3dc0e40d3220ea04c53b Author: Emanuele Ghidoli Date: Wed Dec 7 11:27:49 2022 +0100 arm64: dts: verdin-imx8mm: fix dev board audio playback Set optional `simple-audio-card,mclk-fs` parameter to ensure a proper clock to the nau8822 audio codec. Without this change with an audio stream rate of 44.1 kHz the playback is faster. Set the MCLK at the right frequency, codec can properly use it to generate 44.1 kHz I2S-FS. Fixes: 6a57f224f734 ("arm64: dts: freescale: add initial support for verdin imx8m mini") Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin-dev.dtsi | 1 + 1 file changed, 1 insertion(+) commit ef10d57936ead5e817ef7cea6a87531085e77773 Author: Krzysztof Kozlowski Date: Sun Dec 4 10:44:17 2022 +0100 arm64: dts: imx8mq-thor96: fix no-mmc property for SDHCI There is no "no-emmc" property, so intention for SD/SDIO only nodes was to use "no-mmc". Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq-thor96.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5225ba9db112ec4ed67da5e4d8b72e618573955e Author: Adam Ford Date: Fri Dec 2 13:10:37 2022 -0600 arm64: dts: imx8mm-beacon: Fix ecspi2 pinmux Early hardware did not support hardware handshaking on the UART, but final production hardware did. When the hardware was updated the chip select was changed to facilitate hardware handshaking on UART3. Fix the ecspi2 pin mux to eliminate a pin conflict with UART3 and allow the EEPROM to operate again. Fixes: 4ce01ce36d77 ("arm64: dts: imx8mm-beacon: Enable RTS-CTS on UART3") Signed-off-by: Adam Ford Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b025b4f5c288e29bbea421613a5b4eacf9261fbb Author: Geert Uytterhoeven Date: Fri Dec 2 17:49:22 2022 +0100 arm64: dts: freescale: Fix pca954x i2c-mux node names "make dtbs_check": arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dtb: pca9547@77: $nodename:0: 'pca9547@77' does not match '^(i2c-?)?mux' From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dtb: pca9547@77: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'i2c@4' 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 Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts | 2 +- arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-ls208xa-rdb.dtsi | 2 +- arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts | 2 +- arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts | 4 ++-- arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) commit 42825d1f269355d63554ab3c3762611e4d8053e9 Author: Geert Uytterhoeven Date: Fri Dec 2 17:49:21 2022 +0100 ARM: dts: vf610: Fix pca9548 i2c-mux node names "make dtbs_check": arch/arm/boot/dts/vf610-zii-dev-rev-b.dtb: tca9548@70: $nodename:0: 'tca9548@70' does not match '^(i2c-?)?mux' From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml arch/arm/boot/dts/vf610-zii-dev-rev-b.dtb: tca9548@70: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'i2c@0', 'i2c@1', 'i2c@2', 'i2c@3', 'i2c@4' were unexpected) From schema: /scratch/geert/linux/linux-renesas/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml ... Fix this by renaming PCA9548 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 Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 2 +- arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f78985f9f58380eec37f82c8a2c765aa7670fc29 Author: Geert Uytterhoeven Date: Fri Dec 2 17:49:18 2022 +0100 ARM: dts: imx: Fix pca9547 i2c-mux node name "make dtbs_check": arch/arm/boot/dts/imx53-ppd.dtb: i2c-switch@70: $nodename:0: 'i2c-switch@70' does not match '^(i2c-?)?mux' From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml arch/arm/boot/dts/imx53-ppd.dtb: i2c-switch@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 the PCA9547 node 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 Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-ppd.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d1d030f00f3f3eea04017cbd50ffe44a2842ebc Author: Emanuele Ghidoli Date: Thu Dec 1 13:55:48 2022 +0100 arm64: dts: verdin-imx8mm: fix dahlia audio playback Set optional `simple-audio-card,mclk-fs` parameter to ensure a proper clock to the wm8904 audio codec. Without this change with an audio stream rate of 44.1 kHz the playback is completely distorted. Fixes: 6a57f224f734 ("arm64: dts: freescale: add initial support for verdin imx8m mini") Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin-dahlia.dtsi | 1 + 1 file changed, 1 insertion(+) commit 9dfbc72256b5de608ad10989bcbafdbbd1ac8d4e Author: Fabio Estevam Date: Mon Nov 21 17:22:59 2022 -0300 ARM: dts: imx6qdl-gw560x: Remove incorrect 'uart-has-rtscts' The following build warning is seen when running: make dtbs_check DT_SCHEMA_FILES=fsl-imx-uart.yaml arch/arm/boot/dts/imx6dl-gw560x.dtb: serial@2020000: rts-gpios: False schema does not allow [[20, 1, 0]] From schema: Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml The imx6qdl-gw560x board does not expose the UART RTS and CTS as native UART pins, so 'uart-has-rtscts' should not be used. Using 'uart-has-rtscts' with 'rts-gpios' is an invalid combination detected by serial.yaml. Fix the problem by removing the incorrect 'uart-has-rtscts' property. Fixes: b8a559feffb2 ("ARM: dts: imx: add Gateworks Ventana GW5600 support") Signed-off-by: Fabio Estevam Acked-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-gw560x.dtsi | 1 - 1 file changed, 1 deletion(-) commit f4dd0845c4f1f5371f1e06fef0e4a1734a2db964 Author: Fabio Estevam Date: Mon Nov 21 13:31:24 2022 -0300 ARM: dts: imx7d-pico: Use 'clock-frequency' 'clock_frequency' is not a valid property. Use the correct 'clock-frequency' instead. Fixes: 8b646cfb84c3 ("ARM: dts: imx7d-pico: Add support for the dwarf baseboard") Fixes: 6418fd92417f ("ARM: dts: imx7d-pico: Add support for the nymph baseboard") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-pico-dwarf.dts | 4 ++-- arch/arm/boot/dts/imx7d-pico-nymph.dts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 94e2cf1e0db5b06c7a6ae0878c5cbec925819a8a Author: Fabio Estevam Date: Mon Nov 21 13:31:23 2022 -0300 ARM: dts: imx6ul-pico-dwarf: Use 'clock-frequency' 'clock_frequency' is not a valid property. Use the correct 'clock-frequency' instead. Fixes: 47246fafef84 ("ARM: dts: imx6ul-pico: Add support for the dwarf baseboard") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-pico-dwarf.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfd04dd1c4b6c33afc2a934b957d71cf8ddd1539 Author: Fabio Estevam Date: Mon Nov 21 13:29:11 2022 -0300 arm64: dts: imx8mp-phycore-som: Remove invalid PMIC property 'regulator-compatible' is not a valid property according to nxp,pca9450-regulator.yaml and causes the following warning: DTC_CHK arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk2.dtb ... pmic@25: regulators:LDO1: Unevaluated properties are not allowed ('regulator-compatible' was unexpected) Remove the invalid 'regulator-compatible' property. Cc: Teresa Remmet Fixes: 88f7f6bcca37 ("arm64: dts: freescale: Add support for phyBOARD-Pollux-i.MX8MP") Signed-off-by: Fabio Estevam Reviewed-by: Teresa Remmet Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi | 10 ---------- 1 file changed, 10 deletions(-) commit 8a1ed98fe0f2e7669f0409de0f46f317b275f8be Author: Li Jun Date: Fri Sep 30 22:54:23 2022 +0800 arm64: dts: imx8mp: correct usb clocks After commit cf7f3f4fa9e5 ("clk: imx8mp: fix usb_root_clk parent"), usb_root_clk is no longer for suspend clock so update dts accordingly to use right bus clock and suspend clock. Fixes: fb8587a2c165 ("arm64: dtsi: imx8mp: add usb nodes") Cc: stable@vger.kernel.org # ed1f4ccfe947: clk: imx: imx8mp: add shared clk gate for usb suspend clk Cc: stable@vger.kernel.org # v5.19+ Reviewed-by: Peng Fan Tested-by: Alexander Stein Signed-off-by: Li Jun Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b814eda949c324791580003303aa608761cfde3f Author: Lucas Stach Date: Sat Dec 31 13:40:25 2022 +0800 soc: imx: imx8mp-blk-ctrl: enable global pixclk with HDMI_TX_PHY PD NXP internal information shows that the PHY refclk is gated by the GLOBAL_TX_PIX_CLK_EN bit, so to allow the PHY PLL to lock without the LCDIF being already active, tie this bit to the HDMI_TX_PHY power domain. Fixes: e3442022f543 ("soc: imx: add i.MX8MP HDMI blk-ctrl") Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo drivers/soc/imx/imx8mp-blk-ctrl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b878d3ba9bb41cddb73ba4b56e5552f0a638daca Author: Srinivas Pandruvada Date: Tue Dec 27 16:10:05 2022 -0800 thermal: int340x: Add missing attribute for data rate base Commit 473be51142ad ("thermal: int340x: processor_thermal: Add RFIM driver")' added rfi_restriction_data_rate_base string, mmio details and documentation, but missed adding attribute to sysfs. Add missing sysfs attribute. Fixes: 473be51142ad ("thermal: int340x: processor_thermal: Add RFIM driver") Cc: 5.11+ # v5.11+ Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c | 4 ++++ 1 file changed, 4 insertions(+) commit c8451c141e07a8d05693f6c8d0e418fbb4b68bb7 Merge: 262eef26e350 0948a9ef1d59 Author: Linus Torvalds Date: Fri Dec 30 10:47:25 2022 -0800 Merge tag 'acpi-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These are new ACPI IRQ override quirks, low-power S0 idle (S0ix) support adjustments and ACPI backlight handling fixes, mostly for platforms using AMD chips. Specifics: - Add ACPI IRQ override quirks for Asus ExpertBook B2502, Lenovo 14ALC7, and XMG Core 15 (Hans de Goede, Adrian Freund, Erik Schumacher). - Adjust ACPI video detection fallback path to prevent non-operational ACPI backlight devices from being created on systems where the native driver does not detect a suitable panel (Mario Limonciello). - Fix Apple GMUX backlight detection (Hans de Goede). - Add a low-power S0 idle (S0ix) handling quirk for HP Elitebook 865 and stop using AMD-specific low-power S0 idle code path for systems with Rembrandt chips and newer (Mario Limonciello)" * tag 'acpi-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: x86: s2idle: Stop using AMD specific codepath for Rembrandt+ ACPI: x86: s2idle: Force AMD GUID/_REV 2 on HP Elitebook 865 ACPI: video: Fix Apple GMUX backlight detection ACPI: resource: Add Asus ExpertBook B2502 to Asus quirks ACPI: resource: do IRQ override on Lenovo 14ALC7 ACPI: resource: do IRQ override on XMG Core 15 ACPI: video: Don't enable fallback path for creating ACPI backlight by default drm/amd/display: Report to ACPI video if no panels were found ACPI: video: Allow GPU drivers to report no panels commit 262eef26e350181f8067072571f4918cad3c5e87 Merge: bff687b3dad6 090ddad4c7a9 Author: Linus Torvalds Date: Fri Dec 30 10:30:54 2022 -0800 Merge tag 'sound-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just a few small fixes: - A regression fix for HDMI audio on HD-audio AMD codecs - Fixes for LINE6 MIDI handling - HD-audio quirk for Dell laptops" * tag 'sound-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/hdmi: Static PCM mapping again with AMD HDMI codecs ALSA: hda/realtek: Apply dual codec fixup for Dell Latitude laptops ALSA: line6: fix stack overflow in line6_midi_transmit ALSA: line6: correct midi status byte when receiving data from podxt commit a1c7a7cde6c92e42eb2cc8a04a9529c3fe8f19c8 Merge: 6b1c374c4560 d347a951906b Author: Martin K. Petersen Date: Fri Dec 30 16:31:44 2022 +0000 Merge branch '6.2/mpt-mpi' into 6.2/scsi-fixes Pull in Broadcom MPI/MPT fixes that conflicted with patch resolution upstream. Signed-off-by: Martin K. Petersen commit 6b1c374c45605504ed32e855c4e0f9b652a1978e Merge: 1b929c02afd3 1a5665fc8d7a Author: Martin K. Petersen Date: Fri Dec 30 16:29:34 2022 +0000 Merge branch '6.2/scsi-queue' into 6.2/scsi-fixes Pull in remaining patches from the 6.2 queue. Signed-off-by: Martin K. Petersen commit 0948a9ef1d59d1bc7fae29f32058e463bbff4a6c Merge: e555c85792bd 7203481fd12b 3cf3b7f012f3 Author: Rafael J. Wysocki Date: Fri Dec 30 16:59:10 2022 +0100 Merge branches 'acpi-resource' and 'acpi-video' Merge ACPI resource handling quirks and ACPI backlight handling fixes for 6.2-rc2: - Add ACPI IRQ override quirks for Asus ExpertBook B2502, Lenovo 14ALC7, and XMG Core 15 (Hans de Goede, Adrian Freund, Erik Schumacher). - Adjust ACPI video detection fallback path to prevent non-operational ACPI backlight devices from being created on systems where the native driver does not detect a suitable panel (Mario Limonciello). - Fix Apple GMUX backlight detection (Hans de Goede). * acpi-resource: ACPI: resource: Add Asus ExpertBook B2502 to Asus quirks ACPI: resource: do IRQ override on Lenovo 14ALC7 ACPI: resource: do IRQ override on XMG Core 15 * acpi-video: ACPI: video: Fix Apple GMUX backlight detection ACPI: video: Don't enable fallback path for creating ACPI backlight by default drm/amd/display: Report to ACPI video if no panels were found ACPI: video: Allow GPU drivers to report no panels commit 9883ddf9d68db5332f08dfc7283db69f69f8d6d2 Author: Cixi Geng Date: Thu Dec 29 22:55:45 2022 +0800 gpio: sprd: Make the irqchip immutable Make the struct irq_chip const, flag it as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. Signed-off-by: Cixi Geng Reported-by: kernel test robot Reported-by: Julia Lawall Reviewed-by: Baolin Wang Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-sprd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit be43eea7de5a3977ac3d13fbfb9e505fab475e97 Author: Cixi Geng Date: Thu Dec 29 22:55:44 2022 +0800 gpio: pmic-eic-sprd: Make the irqchip immutable Remove the irq_chip from pmic_eic structure, use the various calls by defining the statically irq_chip structure. Signed-off-by: Cixi Geng Reviewed-by: Baolin Wang Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-pmic-eic-sprd.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 2788938b794633fc1865c805764bed196e01f97e Author: Cixi Geng Date: Thu Dec 29 22:55:43 2022 +0800 gpio: eic-sprd: Make the irqchip immutable Remove the irq_chip from pmic_eic structure, use the various calls by defining the statically irq_chip structure. Signed-off-by: Cixi Geng Reviewed-by: Baolin Wang Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-eic-sprd.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit e84077437902ec99eba0a6b516df772653f142c7 Author: Eliav Farber Date: Thu Oct 20 12:44:58 2022 +0000 EDAC/device: Fix period calculation in edac_device_reset_delay_period() Fix period calculation in case user sets a value of 1000. The input of round_jiffies_relative() should be in jiffies and not in milli-seconds. [ bp: Use the same code pattern as in edac_device_workq_setup() for clarity. ] Fixes: c4cf3b454eca ("EDAC: Rework workqueue handling") Signed-off-by: Eliav Farber Signed-off-by: Borislav Petkov (AMD) Cc: Link: https://lore.kernel.org/r/20221020124458.22153-1-farbere@amazon.com drivers/edac/edac_device.c | 17 ++++++++--------- drivers/edac/edac_module.h | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) commit 90fee3dd5bfc1b9f4c8c0ba6cd2a35c9d79ca4de Author: Haibo Chen Date: Sun Dec 11 00:05:58 2022 +0200 gpio: pca953x: avoid to use uninitialized value pinctrl There is a variable pinctrl declared without initializer. And then has the case (switch operation chose the default case) to directly use this uninitialized value, this is not a safe behavior. So here initialize the pinctrl as 0 to avoid this issue. 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 drivers/gpio/gpio-pca953x.c | 3 +++ 1 file changed, 3 insertions(+) commit ba2dc1cb5491712a6946d0595cf11ba463f50e64 Author: Hans de Goede Date: Thu Dec 29 17:45:01 2022 +0100 gpiolib: Fix using uninitialized lookup-flags on ACPI platforms Commit 8eb1f71e7acc ("gpiolib: consolidate GPIO lookups") refactors fwnode_get_named_gpiod() and gpiod_get_index() into a unified gpiod_find_and_request() helper. The old functions both initialized their local lookupflags variable to GPIO_LOOKUP_FLAGS_DEFAULT, but the new code leaves it uninitialized. This is a problem for at least ACPI platforms, where acpi_find_gpio() only does a bunch of *lookupflags |= GPIO_* statements and thus relies on the variable being initialized. The variable not being initialized leads to: 1. Potentially the wrong flags getting used 2. The check for conflicting lookup flags in gpiod_configure_flags(): "multiple pull-up, pull-down or pull-disable enabled, invalid config" sometimes triggering, making the GPIO unavailable Restore the initialization of lookupflags to GPIO_LOOKUP_FLAGS_DEFAULT to fix this. Fixes: 8eb1f71e7acc ("gpiolib: consolidate GPIO lookups") Signed-off-by: Hans de Goede Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 736f88689c6912f05d0116917910603a7ba97de7 Author: Tianjia Zhang Date: Wed Dec 21 15:32:32 2022 +0800 crypto: arm64/sm4 - fix possible crash with CFI enabled The SM4 CCM/GCM assembly functions for encryption and decryption is called via indirect function calls. Therefore they need to use SYM_TYPED_FUNC_START instead of SYM_FUNC_START to cause its type hash to be emitted when the kernel is built with CONFIG_CFI_CLANG=y. Otherwise, the code crashes with a CFI failure (if the compiler didn't happen to optimize out the indirect call). Fixes: 67fa3a7fdf80 ("crypto: arm64/sm4 - add CE implementation for CCM mode") Fixes: ae1b83c7d572 ("crypto: arm64/sm4 - add CE implementation for GCM mode") Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/sm4-ce-ccm-core.S | 5 +++-- arch/arm64/crypto/sm4-ce-gcm-core.S | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit a23529989a8f56d23680c4f2d14011bc9c9457c9 Author: Nikolaus Voss Date: Tue Dec 20 09:17:50 2022 +0100 crypto: caam - fix CAAM io mem access in blob_gen IO memory access has to be done with accessors defined in caam/regs.h as there are little-endian architectures with a big-endian CAAM unit. Fixes: 6a83830f649a ("crypto: caam - warn if blob_gen key is insecure") Signed-off-by: Nikolaus Voss Reviewed-by: Ahmad Fatoum Signed-off-by: Herbert Xu drivers/crypto/caam/blob_gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6217e9f05a74df48c77ee68993d587cdfdb1feb7 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: 963bbdb32b47 ("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 (cherry picked from commit a561933c571798868b5fa42198427a7e6df56c09) Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 963bbdb32b47cfa67a449e715e1dcc525fbd01fc 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 (cherry picked from commit f087cfe6fcff58044f7aa3b284965af47f472fb0) Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 94 +++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_irq.c | 3 + drivers/gpu/drm/i915/i915_reg.h | 1 + 3 files changed, 95 insertions(+), 3 deletions(-) commit 6a5e25fc3e0b94301734e8abb1d311a1e02d360d Author: Masahiro Yamada Date: Fri Dec 30 17:16:42 2022 +0900 fixdep: remove unneeded inclusion This is unneeded since commit 69304379ff03 ("fixdep: use fflush() and ferror() to ensure successful write to files"). Signed-off-by: Masahiro Yamada scripts/basic/fixdep.c | 1 - 1 file changed, 1 deletion(-) commit aa4847dbcdabfe80a1cff96480e4b3c8076a0356 Author: Masahiro Yamada Date: Thu Dec 29 21:16:42 2022 +0900 kbuild: sort single-targets alphabetically again This was previously alphabetically sorted. Sort it again. Signed-off-by: Masahiro Yamada Reviewed-by: Miguel Ojeda Reviewed-by: Nathan Chancellor Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02a893bc99757d75b7abb43b74f210dfa3df8c4b Author: Masahiro Yamada Date: Thu Dec 29 04:10:14 2022 +0900 kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires Guoqing Jiang reports that openSUSE cannot compile the kernel rpm due to "BuildRequires: elfutils-libelf-devel" added by commit 8818039f959b ("kbuild: add ability to make source rpm buildable using koji"). The relevant package name in openSUSE is libelf-devel. Add it as an alternative package. BTW, if it is impossible to solve the build requirement, the final resort would be: $ make RPMOPTS=--nodeps rpm-pkg This passes --nodeps to the rpmbuild command so it will not verify build dependencies. This is useful to test rpm builds on non-rpm system. On Debian/Ubuntu, for example, you can install rpmbuild by 'apt-get install rpm'. NOTE1: Likewise, it is possible to bypass the build dependency check for debian package builds: $ make DPKG_FLAGS=-d deb-pkg NOTE2: The 'or' operator is supported since RPM 4.13. So, old distros such as CentOS 7 will break. I suggest installing newer rpmbuild in such cases. Link: https://lore.kernel.org/linux-kbuild/ee227d24-9c94-bfa3-166a-4ee6b5dfea09@linux.dev/T/#u Fixes: 8818039f959b ("kbuild: add ability to make source rpm buildable using koji") Reported-by: Guoqing Jiang Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Tested-by: Guoqing Jiang Acked-by: Jonathan Toppins scripts/package/mkspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 63ffe00d8c939eda1a8fa87484ca4537e13a20b7 Author: Samuel Holland Date: Tue Dec 27 15:48:21 2022 -0600 kbuild: Fix running modpost with musl libc commit 3d57e1b7b1d4 ("kbuild: refactor the prerequisites of the modpost rule") moved 'vmlinux.o' inside modpost-args, possibly before some of the other options. However, getopt() in musl libc follows POSIX and stops looking for options upon reaching the first non-option argument. As a result, the '-T' option is misinterpreted as a positional argument, and the build fails: make -f ./scripts/Makefile.modpost scripts/mod/modpost -E -o Module.symvers vmlinux.o -T modules.order -T: No such file or directory make[1]: *** [scripts/Makefile.modpost:137: Module.symvers] Error 1 make: *** [Makefile:1960: modpost] Error 2 The fix is to move all options before 'vmlinux.o' in modpost-args. Fixes: 3d57e1b7b1d4 ("kbuild: refactor the prerequisites of the modpost rule") Signed-off-by: Samuel Holland Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada scripts/Makefile.modpost | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 9c9b55a59416a87fc73c479d78cb3218076dbc30 Author: Jun ASAKA Date: Tue Dec 27 17:21:57 2022 +0800 kbuild: add a missing line for help message The help message line for building the source RPM package was missing. Added it. Signed-off-by: Jun ASAKA Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada scripts/Makefile.package | 1 + 1 file changed, 1 insertion(+) commit 924d28b39e3b62ad5e97751585aed7c89f8c43ee Author: Masahiro Yamada Date: Tue Dec 27 03:54:44 2022 +0900 .gitignore: ignore *.rpm Previously, *.rpm files were created under $HOME/rpmbuild/, but since commit 8818039f959b ("kbuild: add ability to make source rpm buildable using koji"), srcrpm-pkg creates the source rpm in the kernel tree because it sets '_srcrpmdir'. Signed-off-by: Masahiro Yamada .gitignore | 1 + 1 file changed, 1 insertion(+) commit 99cb0d917ffa1ab628bb67364ca9b162c07699b1 Author: Masahiro Yamada Date: Tue Dec 27 03:45:37 2022 +0900 arch: fix broken BuildID for arm64 and riscv Dennis Gilmore reports that the BuildID is missing in the arm64 vmlinux since commit 994b7ac1697b ("arm64: remove special treatment for the link order of head.o"). The issue is that the type of .notes section, which contains the BuildID, changed from NOTES to PROGBITS. Ard Biesheuvel figured out that whichever object gets linked first gets to decide the type of a section. The PROGBITS type is the result of the compiler emitting .note.GNU-stack as PROGBITS rather than NOTE. While Ard provided a fix for arm64, I want to fix this globally because the same issue is happening on riscv since commit 2348e6bf4421 ("riscv: remove special treatment for the link order of head.o"). This problem will happen in general for other architectures if they start to drop unneeded entries from scripts/head-object-list.txt. Discard .note.GNU-stack in include/asm-generic/vmlinux.lds.h. Link: https://lore.kernel.org/lkml/CAABkxwuQoz1CTbyb57n0ZX65eSYiTonFCU8-LCQc=74D=xE=rA@mail.gmail.com/ Fixes: 994b7ac1697b ("arm64: remove special treatment for the link order of head.o") Fixes: 2348e6bf4421 ("riscv: remove special treatment for the link order of head.o") Reported-by: Dennis Gilmore Suggested-by: Ard Biesheuvel Signed-off-by: Masahiro Yamada Acked-by: Palmer Dabbelt include/asm-generic/vmlinux.lds.h | 5 +++++ 1 file changed, 5 insertions(+) commit 11ce8fd8fd8718247f17475802639cd7e2d3765c 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 (cherry picked from commit 4071d98b296a5bc5fd4b15ec651bd05800ec9510) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 42 +++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 14 deletions(-) commit 3f882f2d4f689627c1566c2c92087bc3ff734953 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 (cherry picked from commit 801fa7a81f6da533cc5442fc40e32c72b76cd42a) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 59 ++++++++++++++++++++----- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +- drivers/gpu/drm/i915/i915_gem_evict.c | 37 +++++++++++----- drivers/gpu/drm/i915/i915_gem_evict.h | 4 +- drivers/gpu/drm/i915/i915_vma.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 4 +- 6 files changed, 82 insertions(+), 26 deletions(-) commit fff758698842fb6722be37498d8773e0fb47f000 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 (cherry picked from commit 50490ce05b7a50b0bd4108fa7d6db3ca2972fa83) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_pci.c | 1 - 1 file changed, 1 deletion(-) commit c5bc073668206c73c20798eb6d978b5e9db5b16f 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 (cherry picked from commit 4d5cf7b1680a1e6db327e3c935ef58325cbedb2c) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_gt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d039535850ee47079d59527e96be18d8e0daa84b Author: Miaoqian Lin Date: Thu Dec 29 10:29:25 2022 +0400 net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe of_phy_find_device() return device node with refcount incremented. Call put_device() to relese it when not needed anymore. Fixes: ab4e6ee578e8 ("net: phy: xgmiitorgmii: Check phy_driver ready before accessing") Signed-off-by: Miaoqian Lin Signed-off-by: David S. Miller drivers/net/phy/xilinx_gmii2rgmii.c | 1 + 1 file changed, 1 insertion(+) commit 72f299b0ca3be44650a5607368329a5d9666c0e3 Merge: 1573c6882018 a8ee104f986e Author: David S. Miller Date: Fri Dec 30 07:43:44 2022 +0000 Merge branch 'ena-fixes' David Arinzon says: ==================== ENA driver bug fixes ==================== Signed-off-by: David S. Miller commit a8ee104f986e720cea52133885cc822d459398c7 Author: David Arinzon Date: Thu Dec 29 07:30:11 2022 +0000 net: ena: Update NUMA TPH hint register upon NUMA node update The device supports a PCIe optimization hint, which indicates on which NUMA the queue is currently processed. This hint is utilized by PCIe in order to reduce its access time by accessing the correct NUMA resources and maintaining cache coherence. The driver calls the register update for the hint (called TPH - TLP Processing Hint) during the NAPI loop. Though the update is expected upon a NUMA change (when a queue is moved from one NUMA to the other), the current logic performs a register update when the queue is moved to a different CPU, but the CPU is not necessarily in a different NUMA. The changes include: 1. Performing the TPH update only when the queue has switched a NUMA node. 2. Moving the TPH update call to be triggered only when NAPI was scheduled from interrupt context, as opposed to a busy-polling loop. This is due to the fact that during busy-polling, the frequency of CPU switches for a particular queue is significantly higher, thus, the likelihood to switch NUMA is much higher. Therefore, providing the frequent updates to the device upon a NUMA update are unlikely to be beneficial. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: David Arinzon Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 27 ++++++++++++++++++--------- drivers/net/ethernet/amazon/ena/ena_netdev.h | 6 ++++-- 2 files changed, 22 insertions(+), 11 deletions(-) commit e712f3e4920b3a1a5e6b536827d118e14862896c Author: David Arinzon Date: Thu Dec 29 07:30:10 2022 +0000 net: ena: Set default value for RX interrupt moderation RX ring can be NULL in XDP use cases where only TX queues are configured. In this scenario, the RX interrupt moderation value sent to the device remains in its default value of 0. In this change, setting the default value of the RX interrupt moderation to be the same as of the TX. Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action") Signed-off-by: David Arinzon Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c7062aaee099f2f43d6f07a71744b44b94b94b34 Author: David Arinzon Date: Thu Dec 29 07:30:09 2022 +0000 net: ena: Fix rx_copybreak value update Make the upper bound on rx_copybreak tighter, by making sure it is smaller than the minimum of mtu and ENA_PAGE_SIZE. With the current upper bound of mtu, rx_copybreak can be larger than a page. Such large rx_copybreak will not bring any performance benefit to the user and therefore makes no sense. In addition, the value update was only reflected in the adapter structure, but not applied for each ring, causing it to not take effect. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Osama Abboud Signed-off-by: Arthur Kiyanovski Signed-off-by: David Arinzon Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_ethtool.c | 6 +----- drivers/net/ethernet/amazon/ena/ena_netdev.c | 18 ++++++++++++++++++ drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 ++ 3 files changed, 21 insertions(+), 5 deletions(-) commit 59811faa2c54dbcf44d575b5a8f6e7077da88dc2 Author: David Arinzon Date: Thu Dec 29 07:30:08 2022 +0000 net: ena: Use bitmask to indicate packet redirection Redirecting packets with XDP Redirect is done in two phases: 1. A packet is passed by the driver to the kernel using xdp_do_redirect(). 2. After finishing polling for new packets the driver lets the kernel know that it can now process the redirected packet using xdp_do_flush_map(). The packets' redirection is handled in the napi context of the queue that called xdp_do_redirect() To avoid calling xdp_do_flush_map() each time the driver first checks whether any packets were redirected, using xdp_flags |= xdp_verdict; and if (xdp_flags & XDP_REDIRECT) xdp_do_flush_map() essentially treating XDP instructions as a bitmask, which isn't the case: enum xdp_action { XDP_ABORTED = 0, XDP_DROP, XDP_PASS, XDP_TX, XDP_REDIRECT, }; Given the current possible values of xdp_action, the current design doesn't have a bug (since XDP_REDIRECT = 100b), but it is still flawed. This patch makes the driver use a bitmask instead, to avoid future issues. Fixes: a318c70ad152 ("net: ena: introduce XDP redirect implementation") Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 26 ++++++++++++++++---------- drivers/net/ethernet/amazon/ena/ena_netdev.h | 9 +++++++++ 2 files changed, 25 insertions(+), 10 deletions(-) commit c7f5e34d906320fdc996afa616676161c029cc02 Author: David Arinzon Date: Thu Dec 29 07:30:07 2022 +0000 net: ena: Account for the number of processed bytes in XDP The size of packets that were forwarded or dropped by XDP wasn't added to the total processed bytes statistic. Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action") Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + 1 file changed, 1 insertion(+) commit 9c9e539956fa67efb8a65e32b72a853740b33445 Author: David Arinzon Date: Thu Dec 29 07:30:06 2022 +0000 net: ena: Don't register memory info on XDP exchange Since the queues aren't destroyed when we only exchange XDP programs, there's no need to re-register them again. Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action") Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 332b49ff637d6c1a75b971022a8b992cf3c57db1 Author: David Arinzon Date: Thu Dec 29 07:30:05 2022 +0000 net: ena: Fix toeplitz initial hash value On driver initialization, RSS hash initial value is set to zero, instead of the default value. This happens because we pass NULL as the RSS key parameter, which caused us to never initialize the RSS hash value. This patch fixes it by making sure the initial value is set, no matter what the value of the RSS key is. Fixes: 91a65b7d3ed8 ("net: ena: fix potential crash when rxfh key is NULL") Signed-off-by: Nati Koler Signed-off-by: David Arinzon Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit 1573c6882018f69991aead951d09423ce978adac Author: Po-Hsu Lin Date: Thu Dec 29 13:41:06 2022 +0800 selftests: net: fix cmsg_so_mark.sh test hang This cmsg_so_mark.sh test will hang on non-amd64 systems because of the infinity loop for argument parsing in cmsg_sender. Variable "o" in cs_parse_args() for taking getopt() should be an int, otherwise it will be 255 when getopt() returns -1 on non-amd64 system and thus causing infinity loop. Link: https://lore.kernel.org/lkml/CA+G9fYsM2k7mrF7W4V_TrZ-qDauWM394=8yEJ=-t1oUg8_40YA@mail.gmail.com/t/ Signed-off-by: Po-Hsu Lin Signed-off-by: David S. Miller tools/testing/selftests/net/cmsg_sender.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a512807c24bc561f5892ae05abdf360482fb3fe2 Merge: d530ece70f16 4d1c1379d717 Author: David S. Miller Date: Fri Dec 30 07:33:55 2022 +0000 Merge tag 'mlx5-fixes-2022-12-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux mlx5-fixes-2022-12-28 commit d530ece70f16f912e1d1bfeea694246ab78b0a4b Author: Jiguang Xiao Date: Wed Dec 28 16:14:47 2022 +0800 net: amd-xgbe: add missed tasklet_kill The driver does not call tasklet_kill in several places. Add the calls to fix it. Fixes: 85b85c853401 ("amd-xgbe: Re-issue interrupt if interrupt status not cleared") Signed-off-by: Jiguang Xiao Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 +++ drivers/net/ethernet/amd/xgbe/xgbe-i2c.c | 4 +++- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) commit fec7352117fa301bfbc31bacc14bb9a579376b36 Author: Jian Shen Date: Wed Dec 28 14:27:49 2022 +0800 net: hns3: refine the handling for VF heartbeat Currently, the PF check the VF alive by the KEEP_ALVE mailbox from VF. VF keep sending the mailbox per 2 seconds. Once PF lost the mailbox for more than 8 seconds, it will regards the VF is abnormal, and stop notifying the state change to VF, include link state, vf mac, reset, even though it receives the KEEP_ALIVE mailbox again. It's inreasonable. This patch fixes it. PF will record the state change which need to notify VF when lost the VF's KEEP_ALIVE mailbox. And notify VF when receive the mailbox again. Introduce a new flag HCLGE_VPORT_STATE_INITED, used to distinguish the case whether VF driver loaded or not. For VF will query these states when initializing, so it's unnecessary to notify it in this case. Fixes: aa5c4f175be6 ("net: hns3: add reset handling for VF when doing PF reset") Signed-off-by: Jian Shen Signed-off-by: Hao Lan Reported-by: kernel test robot Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 57 ++++++++++++----- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 7 +++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 71 +++++++++++++++++++--- 3 files changed, 112 insertions(+), 23 deletions(-) commit af691c94d022440476b76560d310d6fea790cc60 Author: Uwe Kleine-König Date: Tue Dec 27 22:45:08 2022 +0100 net: ethernet: freescale: enetc: 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: David S. Miller drivers/net/ethernet/freescale/enetc/enetc_ierb.c | 6 ------ 1 file changed, 6 deletions(-) commit 6b57bffa5f675a01c7981ed271e8521e87441abd Author: Uwe Kleine-König Date: Tue Dec 27 22:45:07 2022 +0100 net: ethernet: broadcom: bcm63xx_enet: 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: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 6 ------ 1 file changed, 6 deletions(-) commit 0798311cfd8739bbfba0b454dc828fe35dfa4d72 Merge: 40cab44b9089 2c042e8e54ef Author: David S. Miller Date: Fri Dec 30 07:25:53 2022 +0000 Merge branch 'tcp-bhash2-fixes' Kuniyuki Iwashima says: =================== tcp: Fix bhash2 and TIME_WAIT regression. We forgot to add twsk to bhash2. Therefore TIME_WAIT sockets cannot prevent bind() to the same local address and port. Changes: v1: * Patch 1: * Add tw_bind2_node in inet_timewait_sock instead of moving sk_bind2_node from struct sock to struct sock_common. ==================== Signed-off-by: David S. Miller commit 2c042e8e54efb2b8e25ed0cb28224e79948dc8ce Author: Kuniyuki Iwashima Date: Mon Dec 26 22:27:53 2022 +0900 tcp: Add selftest for bind() and TIME_WAIT. bhash2 split the bind() validation logic into wildcard and non-wildcard cases. Let's add a test to catch future regression. Before the previous patch: # ./bind_timewait TAP version 13 1..2 # Starting 2 tests from 3 test cases. # RUN bind_timewait.localhost.1 ... # bind_timewait.c:87:1:Expected ret (0) == -1 (-1) # 1: Test terminated by assertion # FAIL bind_timewait.localhost.1 not ok 1 bind_timewait.localhost.1 # RUN bind_timewait.addrany.1 ... # OK bind_timewait.addrany.1 ok 2 bind_timewait.addrany.1 # FAILED: 1 / 2 tests passed. # Totals: pass:1 fail:1 xfail:0 xpass:0 skip:0 error:0 After: # ./bind_timewait TAP version 13 1..2 # Starting 2 tests from 3 test cases. # RUN bind_timewait.localhost.1 ... # OK bind_timewait.localhost.1 ok 1 bind_timewait.localhost.1 # RUN bind_timewait.addrany.1 ... # OK bind_timewait.addrany.1 ok 2 bind_timewait.addrany.1 # PASSED: 2 / 2 tests passed. # Totals: pass:2 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Kuniyuki Iwashima Acked-by: Joanne Koong Signed-off-by: David S. Miller tools/testing/selftests/net/.gitignore | 1 + tools/testing/selftests/net/bind_timewait.c | 92 +++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) commit 936a192f974018b4f6040f6f77b1cc1e75bd8666 Author: Kuniyuki Iwashima Date: Mon Dec 26 22:27:52 2022 +0900 tcp: Add TIME_WAIT sockets in bhash2. Jiri Slaby reported regression of bind() with a simple repro. [0] The repro creates a TIME_WAIT socket and tries to bind() a new socket with the same local address and port. Before commit 28044fc1d495 ("net: Add a bhash2 table hashed by port and address"), the bind() failed with -EADDRINUSE, but now it succeeds. The cited commit should have put TIME_WAIT sockets into bhash2; otherwise, inet_bhash2_conflict() misses TIME_WAIT sockets when validating bind() requests if the address is not a wildcard one. The straight option is to move sk_bind2_node from struct sock to struct sock_common to add twsk to bhash2 as implemented as RFC. [1] However, the binary layout change in the struct sock could affect performances moving hot fields on different cachelines. To avoid that, we add another TIME_WAIT list in inet_bind2_bucket and check it while validating bind(). [0]: https://lore.kernel.org/netdev/6b971a4e-c7d8-411e-1f92-fda29b5b2fb9@kernel.org/ [1]: https://lore.kernel.org/netdev/20221221151258.25748-2-kuniyu@amazon.com/ Fixes: 28044fc1d495 ("net: Add a bhash2 table hashed by port and address") Reported-by: Jiri Slaby Suggested-by: Paolo Abeni Signed-off-by: Kuniyuki Iwashima Acked-by: Joanne Koong Signed-off-by: David S. Miller include/net/inet_hashtables.h | 4 ++++ include/net/inet_timewait_sock.h | 5 +++++ net/ipv4/inet_connection_sock.c | 26 ++++++++++++++++++++++---- net/ipv4/inet_hashtables.c | 8 +++++--- net/ipv4/inet_timewait_sock.c | 31 +++++++++++++++++++++++++++++-- 5 files changed, 65 insertions(+), 9 deletions(-) commit 60ce26d10e5850f33cc76fce52f5377045e75a15 Author: Ilpo Järvinen Date: Wed Dec 14 16:49:52 2022 +0200 fpga: m10bmc-sec: Fix probe rollback Handle probe error rollbacks properly to avoid leaks. Fixes: 5cd339b370e2 ("fpga: m10bmc-sec: add max10 secure update functions") Reviewed-by: Matthew Gerlach Reviewed-by: Russ Weight Reviewed-by: Marco Pagani Signed-off-by: Ilpo Järvinen Cc: stable@vger.kernel.org Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20221214144952.8392-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Xu Yilun drivers/fpga/intel-m10-bmc-sec-update.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 65ea840afd508194b0ee903256162aa87e46ec30 Author: Zheng Yongjun Date: Sat Nov 26 07:14:30 2022 +0000 fpga: stratix10-soc: Fix return value check in s10_ops_write_init() In case of error, the function stratix10_svc_allocate_memory() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: e7eef1d7633a ("fpga: add intel stratix10 soc fpga manager driver") Signed-off-by: Zheng Yongjun Reviewed-by: Russ Weight Cc: stable@vger.kernel.org Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20221126071430.19540-1-zhengyongjun3@huawei.com Signed-off-by: Xu Yilun drivers/fpga/stratix10-soc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bff687b3dad6e0e56b27f4d3ed8a9695f35c7b1a Merge: ac787ffa5a24 1551ed5a178c Author: Linus Torvalds Date: Thu Dec 29 16:57:29 2022 -0800 Merge tag 'block-6.2-2022-12-29' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "Mostly just NVMe, but also a single fixup for BFQ for a regression that happened during the merge window. In detail: - NVMe pull requests via Christoph: - Fix doorbell buffer value endianness (Klaus Jensen) - Fix Linux vs NVMe page size mismatch (Keith Busch) - Fix a potential use memory access beyong the allocation limit (Keith Busch) - Fix a multipath vs blktrace NULL pointer dereference (Yanjun Zhang) - Fix various problems in handling the Command Supported and Effects log (Christoph Hellwig) - Don't allow unprivileged passthrough of commands that don't transfer data but modify logical block content (Christoph Hellwig) - Add a features and quirks policy document (Christoph Hellwig) - Fix some really nasty code that was correct but made smatch complain (Sagi Grimberg) - Use-after-free regression in BFQ from this merge window (Yu)" * tag 'block-6.2-2022-12-29' of git://git.kernel.dk/linux: nvme-auth: fix smatch warning complaints nvme: consult the CSE log page for unprivileged passthrough nvme: also return I/O command effects from nvme_command_effects nvmet: don't defer passthrough commands with trivial effects to the workqueue nvmet: set the LBCC bit for commands that modify data nvmet: use NVME_CMD_EFFECTS_CSUPP instead of open coding it nvme: fix the NVME_CMD_EFFECTS_CSE_MASK definition docs, nvme: add a feature and quirk policy document nvme-pci: update sqsize when adjusting the queue depth nvme: fix setting the queue depth in nvme_alloc_io_tag_set block, bfq: fix uaf for bfqq in bfq_exit_icq_bfqq nvme: fix multipath crash caused by flush request when blktrace is enabled nvme-pci: fix page size checks nvme-pci: fix mempool alloc size nvme-pci: fix doorbell buffer value endianness commit ac787ffa5a246e53675ae93294420ea948600818 Merge: 69fb073b5ba6 9eb803402a2a Author: Linus Torvalds Date: Thu Dec 29 16:48:21 2022 -0800 Merge tag 'io_uring-6.2-2022-12-29' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Two fixes for mutex grabbing when the task state is != TASK_RUNNING (me) - Check for invalid opcode in io_uring_register() a bit earlier, to avoid going through the quiesce machinery just to return -EINVAL later in the process (me) - Fix for the uapi io_uring header, skipping including time_types.h when necessary (Stefan) * tag 'io_uring-6.2-2022-12-29' of git://git.kernel.dk/linux: uapi:io_uring.h: allow linux/time_types.h to be skipped io_uring: check for valid register opcode earlier io_uring/cancel: re-grab ctx mutex after finishing wait io_uring: finish waiting before flushing overflow entries commit 69fb073b5ba6d7c9358a04115ed61b78c73790ce Merge: 2258c2dc850b 93ef83050e59 Author: Linus Torvalds Date: Thu Dec 29 16:43:25 2022 -0800 Merge tag 'linux-kselftest-kunit-fixes-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit fix from Shuah Khan: - alloc_string_stream_fragment() error path fix to free before returning a failure. * tag 'linux-kselftest-kunit-fixes-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: alloc_string_stream_fragment error handling bug fix commit efd58edd8445685b5e7dcb81e5926e0865ece1ff Merge: 472a6309c646 2d3dd559751c Author: Mark Brown Date: Thu Dec 29 22:49:17 2022 +0000 Add new AMP MAX98360A for RT5682S Merge series from tongjian : Add MAX98360A for RT5682S, MAX98360A works same as rt1019. So, it can be supported. commit 472a6309c6467af89dbf660a8310369cc9cb041f Author: Emanuele Ghidoli Date: Fri Dec 23 09:02:47 2022 +0100 ASoC: wm8904: fix wrong outputs volume after power reactivation Restore volume after charge pump and PGA activation to ensure that volume settings are correctly applied when re-enabling codec from SND_SOC_BIAS_OFF state. CLASS_W, CHARGE_PUMP and POWER_MANAGEMENT_2 register configuration affect how the volume register are applied and must be configured first. Fixes: a91eb199e4dc ("ASoC: Initial WM8904 CODEC driver") Link: https://lore.kernel.org/all/c7864c35-738c-a867-a6a6-ddf9f98df7e7@gmail.com/ Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20221223080247.7258-1-francesco@dolcini.it Signed-off-by: Mark Brown sound/soc/codecs/wm8904.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2258c2dc850b8605cb66b3383e50b9dddd1c6580 Merge: 1b929c02afd3 a5496886eb13 Author: Linus Torvalds Date: Thu Dec 29 10:56:13 2022 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Changes that were posted too late for 6.1, or after the release. x86: - several fixes to nested VMX execution controls - fixes and clarification to the documentation for Xen emulation - do not unnecessarily release a pmu event with zero period - MMU fixes - fix Coverity warning in kvm_hv_flush_tlb() selftests: - fixes for the ucall mechanism in selftests - other fixes mostly related to compilation with clang" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (41 commits) KVM: selftests: restore special vmmcall code layout needed by the harness Documentation: kvm: clarify SRCU locking order KVM: x86: fix deadlock for KVM_XEN_EVTCHN_RESET KVM: x86/xen: Documentation updates and clarifications KVM: x86/xen: Add KVM_XEN_INVALID_GPA and KVM_XEN_INVALID_GFN to uapi KVM: x86/xen: Simplify eventfd IOCTLs KVM: x86/xen: Fix SRCU/RCU usage in readers of evtchn_ports KVM: x86/xen: Use kvm_read_guest_virt() instead of open-coding it badly KVM: x86/xen: Fix memory leak in kvm_xen_write_hypercall_page() KVM: Delete extra block of "};" in the KVM API documentation kvm: x86/mmu: Remove duplicated "be split" in spte.h kvm: Remove the unused macro KVM_MMU_READ_{,UN}LOCK() MAINTAINERS: adjust entry after renaming the vmx hyperv files KVM: selftests: Mark correct page as mapped in virt_map() KVM: arm64: selftests: Don't identity map the ucall MMIO hole KVM: selftests: document the default implementation of vm_vaddr_populate_bitmap KVM: selftests: Use magic value to signal ucall_alloc() failure KVM: selftests: Disable "gnu-variable-sized-type-not-at-end" warning KVM: selftests: Include lib.mk before consuming $(CC) KVM: selftests: Explicitly disable builtins for mem*() overrides ... commit 1551ed5a178ca030adc92b1eb29157b5e92bf134 Merge: 88d356ca41ba 76807fcd73b8 Author: Jens Axboe Date: Thu Dec 29 11:31:45 2022 -0700 Merge tag 'nvme-6.2-2022-12-29' of git://git.infradead.org/nvme into block-6.2 Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.2 - fix various problems in handling the Command Supported and Effects log (Christoph Hellwig) - don't allow unprivileged passthrough of commands that don't transfer data but modify logical block content (Christoph Hellwig) - add a features and quirks policy document (Christoph Hellwig) - fix some really nasty code that was correct but made smatch complain (Sagi Grimberg)" * tag 'nvme-6.2-2022-12-29' of git://git.infradead.org/nvme: nvme-auth: fix smatch warning complaints nvme: consult the CSE log page for unprivileged passthrough nvme: also return I/O command effects from nvme_command_effects nvmet: don't defer passthrough commands with trivial effects to the workqueue nvmet: set the LBCC bit for commands that modify data nvmet: use NVME_CMD_EFFECTS_CSUPP instead of open coding it nvme: fix the NVME_CMD_EFFECTS_CSE_MASK definition docs, nvme: add a feature and quirk policy document commit 74b91a1bdb994dfaed0074154ca7d493aeb735a6 Author: Krzysztof Kozlowski Date: Sat Dec 24 22:43:51 2022 +0100 arm64: dts: qcom: sm8350: correct SDHCI interconnect arguments The interconnect providers accept only one argument (cells == 1), so fix a copy&paste from SM8450: sm8350-hdk.dtb: mmc@8804000: interconnects: [[74, 9, 0], [75, 1, 0], [76, 2, 0], [77, 36, 0]] is too long Fixes: 60477435e4de ("arm64: dts: qcom: sm8350: Add SDHCI2") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221224214351.18215-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8350.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 810948f45d99c46b60852ef2a5a2777c12d6bb3e Author: Mars Chen Date: Wed Dec 28 18:38:12 2022 +0800 ASoC: support machine driver with max98360 Signed-off-by: Mars Chen Link: https://lore.kernel.org/r/20221228103812.450956-1-chenxiangrui@huaqin.corp-partner.google.com Signed-off-by: Mark Brown sound/soc/mediatek/Kconfig | 1 + 1 file changed, 1 insertion(+) commit a0dd7fcab5cd221fa960f594c586e1f9f16c02c0 Author: Aniol Martí Date: Tue Dec 27 23:49:32 2022 +0100 ASoC: amd: yc: Add ASUS M5402RA into DMI table ASUS VivoBook 13 OLED (M5402RA) needs this quirk to get the built-in microphone working properly. Signed-off-by: Aniol Martí Link: https://lore.kernel.org/r/20221227224932.9771-1-aniol@aniolmarti.cat Signed-off-by: Mark Brown sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7161bd540eebebae2bbe8c79de25d8caf12dbf78 Author: ChiYuan Huang Date: Thu Dec 29 16:03:53 2022 +0800 ASoC: rt9120: Make dev PM runtime bind AsoC component PM RT9120 uses PM runtime autosuspend to decrease the frequently on/off spent time. This exists one case, when pcm is closed and dev PM is waiting for autosuspend time expired to enter runtime suspend state. At the mean time, system is going to enter suspend, dev PM runtime suspend won't be called. It makes the rt9120 suspend consumption current not as expected. This patch can fix the rt9120 dev PM issue during runtime autosuspend and system suspend by binding dev PM runtime and ASoC component PM. Fixes: 80b949f332e3 ("ASoC: rt9120: Use pm_runtime and regcache to optimize 'pwdnn' logic") Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1672301033-3675-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/rt9120.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 8a54f666db581bbf07494cca44a0124acbced581 Author: Allen-KH Cheng Date: Wed Dec 28 19:57:56 2022 +0800 ASoC: mediatek: mt8186: Add machine support for max98357a Add support for mt8186 with mt6366 and max98357a. Signed-off-by: Allen-KH Cheng Link: https://lore.kernel.org/r/20221228115756.28014-1-allen-kh.cheng@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2d3dd559751ce19ba84f9690c6c7c5a4b39129df Author: tongjian Date: Wed Dec 28 20:22:30 2022 +0800 ASoC: dt-bindings: mt8186-mt6366: add new compatible for max98360a Adds new compatible string "mt8186-mt6366-rt5682s-max98360-sound" for machines with max98360a and rt5682s. Signed-off-by: tongjian Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221228122230.3818533-3-tongjian@huaqin.corp-partner.google.com Signed-off-by: Mark Brown .../devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml | 1 + 1 file changed, 1 insertion(+) commit 6e1dbf694d7cd1737ee14866e9e05016ccc9ac40 Author: tongjian Date: Wed Dec 28 20:22:29 2022 +0800 ASoC: mediatek: mt8186: support rt5682s_max98360 Add support for using the rt5682s codec together with max98360a on MT8186-MT6366-RT1019-RT5682S machines. Signed-off-by: tongjian Link: https://lore.kernel.org/r/20221228122230.3818533-2-tongjian@huaqin.corp-partner.google.com Signed-off-by: Mark Brown .../mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 56c5dab20a6391604df9521f812c01d1e3fe1bd0 Author: Jiri Slaby (SUSE) Date: Mon Dec 12 13:04:11 2022 +0100 RDMA/srp: Move large values to a new enum for gcc13 Since gcc13, each member of an enum has the same type as the enum [1]. And that is inherited from its members. Provided these two: SRP_TAG_NO_REQ = ~0U, SRP_TAG_TSK_MGMT = 1U << 31 all other members are unsigned ints. Esp. with SRP_MAX_SGE and SRP_TSK_MGMT_SQ_SIZE and their use in min(), this results in the following warnings: include/linux/minmax.h:20:35: error: comparison of distinct pointer types lacks a cast drivers/infiniband/ulp/srp/ib_srp.c:563:42: note: in expansion of macro 'min' include/linux/minmax.h:20:35: error: comparison of distinct pointer types lacks a cast drivers/infiniband/ulp/srp/ib_srp.c:2369:27: note: in expansion of macro 'min' So move the large values away to a separate enum, so that they don't affect other members. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36113 Link: https://lore.kernel.org/r/20221212120411.13750-1-jirislaby@kernel.org Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Bart Van Assche Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/srp/ib_srp.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit da8daff9405e55baa1f797b77a7c629a89f4d764 Author: Bhaskar Chowdhury Date: Sat Dec 17 11:21:48 2022 +0530 kconfig: Add static text for search information in help menu Add few static text to explain how one can bring up the search dialog box by pressing the forward slash key anywhere on this interface. Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Masahiro Yamada scripts/kconfig/mconf.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5626af8fc4322a972b59c7b1a6760767f7b58d4f Author: Arnd Bergmann Date: Thu Dec 15 17:38:10 2022 +0100 pinctrl: sp7021: fix unused function warning sppctl_gpio_inv_get is only used from the debugfs code inside of an #ifdef, so we get a warning without that: drivers/pinctrl/sunplus/sppctl.c:393:12: error: 'sppctl_gpio_inv_get' defined but not used [-Werror=unused-function] 393 | static int sppctl_gpio_inv_get(struct gpio_chip *chip, unsigned int offset) | ^~~~~~~~~~~~~~~~~~~ Replace the #ifdef with an IS_ENABLED() check that avoids the warning. Fixes: aa74c44be19c ("pinctrl: Add driver for Sunplus SP7021") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20221215163822.542622-1-arnd@kernel.org Signed-off-by: Linus Walleij drivers/pinctrl/sunplus/sppctl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 45435d8da71f9f3e6860e6e6ea9667b6ec17ec64 Author: Kees Cook Date: Fri Dec 23 10:28:44 2022 -0800 bpf: Always use maximal size for copy_array() Instead of counting on prior allocations to have sized allocations to the next kmalloc bucket size, always perform a krealloc that is at least ksize(dst) in size (which is a no-op), so the size can be correctly tracked by all the various allocation size trackers (KASAN, __alloc_size, etc). Reported-by: Hyunwoo Kim Link: https://lore.kernel.org/bpf/20221223094551.GA1439509@ubuntu Fixes: ceb35b666d42 ("bpf/verifier: Use kmalloc_size_roundup() to match ksize() usage") Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: John Fastabend Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: KP Singh Cc: Stanislav Fomichev Cc: Hao Luo Cc: Jiri Olsa Cc: bpf@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221223182836.never.866-kees@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f90dd663c492124b53bb28db6ff85b50c80ccc32 Merge: 8f161ca1105a b7793c8db7d9 Author: Alexei Starovoitov Date: Wed Dec 28 14:11:48 2022 -0800 Merge branch 'bpf: fix the crash caused by task iterators over vma' Kui-Feng Lee says: ==================== This issue is related to task iterators over vma. A system crash can occur when a task iterator travels through vma of tasks as the death of a task will clear the pointer to its mm, even though the task_struct is still held. As a result, an unexpected crash happens due to a null pointer. To address this problem, a reference to mm is kept on the iterator to make sure that the pointer is always valid. This patch set provides a solution for this crash by properly referencing mm on task iterators over vma. The major changes from v1 are: - Fix commit logs of the test case. - Use reverse Christmas tree coding style. - Remove unnecessary error handling for time(). v1: https://lore.kernel.org/bpf/20221216015912.991616-1-kuifeng@meta.com/ ==================== Signed-off-by: Alexei Starovoitov commit b7793c8db7d9beb903bb42f52872b5b46abdcb88 Author: Kui-Feng Lee Date: Fri Dec 16 14:18:55 2022 -0800 selftests/bpf: add a test for iter/task_vma for short-lived processes When a task iterator traverses vma(s), it is possible task->mm might become invalid in the middle of traversal and this may cause kernel misbehave (e.g., crash) This test case creates iterators repeatedly and forks short-lived processes in the background to detect this bug. The test will last for 3 seconds to get the chance to trigger the issue. Signed-off-by: Kui-Feng Lee Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221216221855.4122288-3-kuifeng@meta.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 73 +++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 7ff94f276f8ea05df82eb115225e9b26f47a3347 Author: Kui-Feng Lee Date: Fri Dec 16 14:18:54 2022 -0800 bpf: keep a reference to the mm, in case the task is dead. Fix the system crash that happens when a task iterator travel through vma of tasks. In task iterators, we used to access mm by following the pointer on the task_struct; however, the death of a task will clear the pointer, even though we still hold the task_struct. That can cause an unexpected crash for a null pointer when an iterator is visiting a task that dies during the visit. Keeping a reference of mm on the iterator ensures we always have a valid pointer to mm. Co-developed-by: Song Liu Signed-off-by: Song Liu Signed-off-by: Kui-Feng Lee Reported-by: Nathan Slingerland Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221216221855.4122288-2-kuifeng@meta.com Signed-off-by: Alexei Starovoitov kernel/bpf/task_iter.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) commit 8f161ca1105a6af6614333f13aa7be4aab8b633a Author: Alexei Starovoitov Date: Wed Dec 28 13:55:57 2022 -0800 selftests/bpf: Temporarily disable part of btf_dump:var_data test. Commit 7443b296e699 ("x86/percpu: Move cpu_number next to current_task") moved global per_cpu variable 'cpu_number' into pcpu_hot structure. Therefore this part of var_data test is no longer valid. Disable it until better solution is found. Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/btf_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ed1d9aeef5842ecacb660fce933613b58af1e00 Author: Chuang Wang Date: Sat Dec 24 21:31:46 2022 +0800 bpf: Fix panic due to wrong pageattr of im->image In the scenario where livepatch and kretfunc coexist, the pageattr of im->image is rox after arch_prepare_bpf_trampoline in bpf_trampoline_update, and then modify_fentry or register_fentry returns -EAGAIN from bpf_tramp_ftrace_ops_func, the BPF_TRAMP_F_ORIG_STACK flag will be configured, and arch_prepare_bpf_trampoline will be re-executed. At this time, because the pageattr of im->image is rox, arch_prepare_bpf_trampoline will read and write im->image, which causes a fault. as follows: insmod livepatch-sample.ko # samples/livepatch/livepatch-sample.c bpftrace -e 'kretfunc:cmdline_proc_show {}' BUG: unable to handle page fault for address: ffffffffa0206000 PGD 322d067 P4D 322d067 PUD 322e063 PMD 1297e067 PTE d428061 Oops: 0003 [#1] PREEMPT SMP PTI CPU: 2 PID: 270 Comm: bpftrace Tainted: G E K 6.1.0 #5 RIP: 0010:arch_prepare_bpf_trampoline+0xed/0x8c0 RSP: 0018:ffffc90001083ad8 EFLAGS: 00010202 RAX: ffffffffa0206000 RBX: 0000000000000020 RCX: 0000000000000000 RDX: ffffffffa0206001 RSI: ffffffffa0206000 RDI: 0000000000000030 RBP: ffffc90001083b70 R08: 0000000000000066 R09: ffff88800f51b400 R10: 000000002e72c6e5 R11: 00000000d0a15080 R12: ffff8880110a68c8 R13: 0000000000000000 R14: ffff88800f51b400 R15: ffffffff814fec10 FS: 00007f87bc0dc780(0000) GS:ffff88803e600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffa0206000 CR3: 0000000010b70000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bpf_trampoline_update+0x25a/0x6b0 __bpf_trampoline_link_prog+0x101/0x240 bpf_trampoline_link_prog+0x2d/0x50 bpf_tracing_prog_attach+0x24c/0x530 bpf_raw_tp_link_attach+0x73/0x1d0 __sys_bpf+0x100e/0x2570 __x64_sys_bpf+0x1c/0x30 do_syscall_64+0x5b/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd With this patch, when modify_fentry or register_fentry returns -EAGAIN from bpf_tramp_ftrace_ops_func, the pageattr of im->image will be reset to nx+rw. Cc: stable@vger.kernel.org Fixes: 00963a2e75a8 ("bpf: Support bpf_trampoline on functions with IPMODIFY (e.g. livepatch)") Signed-off-by: Chuang Wang Acked-by: Jiri Olsa Acked-by: Song Liu Link: https://lore.kernel.org/r/20221224133146.780578-1-nashuiliang@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/trampoline.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4d1c1379d71777ddeda3e54f8fc26e9ecbfd1009 Author: Eli Cohen Date: Thu Dec 15 14:28:34 2022 +0200 net/mlx5: Lag, fix failure to cancel delayed bond work Commit 0d4e8ed139d8 ("net/mlx5: Lag, avoid lockdep warnings") accidentally removed a call to cancel delayed bond work thus it may cause queued delay to expire and fall on an already destroyed work queue. Fix by restoring the call cancel_delayed_work_sync() before destroying the workqueue. This prevents call trace such as this: [ 329.230417] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 329.231444] #PF: supervisor write access in kernel mode [ 329.232233] #PF: error_code(0x0002) - not-present page [ 329.233007] PGD 0 P4D 0 [ 329.233476] Oops: 0002 [#1] SMP [ 329.234012] CPU: 5 PID: 145 Comm: kworker/u20:4 Tainted: G OE 6.0.0-rc5_mlnx #1 [ 329.235282] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 329.236868] Workqueue: mlx5_cmd_0000:08:00.1 cmd_work_handler [mlx5_core] [ 329.237886] RIP: 0010:_raw_spin_lock+0xc/0x20 [ 329.238585] Code: f0 0f b1 17 75 02 f3 c3 89 c6 e9 6f 3c 5f ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 31 c0 ba 01 00 00 00 0f b1 17 75 02 f3 c3 89 c6 e9 45 3c 5f ff 0f 1f 44 00 00 0f 1f [ 329.241156] RSP: 0018:ffffc900001b0e98 EFLAGS: 00010046 [ 329.241940] RAX: 0000000000000000 RBX: ffffffff82374ae0 RCX: 0000000000000000 [ 329.242954] RDX: 0000000000000001 RSI: 0000000000000014 RDI: 0000000000000000 [ 329.243974] RBP: ffff888106ccf000 R08: ffff8881004000c8 R09: ffff888100400000 [ 329.244990] R10: 0000000000000000 R11: ffffffff826669f8 R12: 0000000000002000 [ 329.246009] R13: 0000000000000005 R14: ffff888100aa7ce0 R15: ffff88852ca80000 [ 329.247030] FS: 0000000000000000(0000) GS:ffff88852ca80000(0000) knlGS:0000000000000000 [ 329.248260] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 329.249111] CR2: 0000000000000000 CR3: 000000016d675001 CR4: 0000000000770ee0 [ 329.250133] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 329.251152] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 329.252176] PKRU: 55555554 Fixes: 0d4e8ed139d8 ("net/mlx5: Lag, avoid lockdep warnings") Signed-off-by: Eli Cohen Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 1 + 1 file changed, 1 insertion(+) commit e54638a8380bd9c146a883035fffd0a821813682 Author: Maor Dickman Date: Sun Aug 1 14:45:17 2021 +0300 net/mlx5e: Set geneve_tlv_option_0_exist when matching on geneve option The cited patch added support of matching on geneve option by setting geneve_tlv_option_0_data mask and key but didn't set geneve_tlv_option_0_exist bit which is required on some HWs when matching geneve_tlv_option_0_data parameter, this may cause in some cases for packets to wrongly match on rules with different geneve option. Example of such case is packet with geneve_tlv_object class=789 and data=456 will wrongly match on rule with match geneve_tlv_object class=123 and data=456. Fix it by setting geneve_tlv_option_0_exist bit when supported by the HW when matching on geneve_tlv_option_0_data parameter. Fixes: 9272e3df3023 ("net/mlx5e: Geneve, Add support for encap/decap flows offload") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1e267ab88dc44c48f556218f7b7f14c76f7aa066 Author: Adham Faris Date: Wed Dec 14 16:02:57 2022 +0200 net/mlx5e: Fix hw mtu initializing at XDP SQ allocation Current xdp xmit functions logic (mlx5e_xmit_xdp_frame_mpwqe or mlx5e_xmit_xdp_frame), validates xdp packet length by comparing it to hw mtu (configured at xdp sq allocation) before xmiting it. This check does not account for ethernet fcs length (calculated and filled by the nic). Hence, when we try sending packets with length > (hw-mtu - ethernet-fcs-size), the device port drops it and tx_errors_phy is incremented. Desired behavior is to catch these packets and drop them by the driver. Fix this behavior in XDP SQ allocation function (mlx5e_alloc_xdpsq) by subtracting ethernet FCS header size (4 Bytes) from current hw mtu value, since ethernet FCS is calculated and written to ethernet frames by the nic. Fixes: d8bec2b29a82 ("net/mlx5e: Support bpf_xdp_adjust_head()") Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2951b2e142ecf6e0115df785ba91e91b6da74602 Author: Chris Mi Date: Mon Dec 5 09:22:50 2022 +0800 net/mlx5e: Always clear dest encap in neigh-update-del The cited commit introduced a bug for multiple encapsulations flow. If one dest encap becomes invalid, the flow is set slow path flag. But when other dests encap become invalid, they are not cleared due to slow path flag of the flow. When neigh-update-add is running, it will use invalid encap. Fix it by checking slow path flag after clearing dest encap. Fixes: 9a5f9cc794e1 ("net/mlx5e: Fix possible use-after-free deleting fdb rule") Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 849190e3e4ccf452fbe2240eace30a9ca83fb8d2 Author: Chris Mi Date: Mon Nov 28 13:54:29 2022 +0800 net/mlx5e: CT: Fix ct debugfs folder name Need to use sprintf to build a string instead of sscanf. Otherwise dirname is null and both "ct_nic" and "ct_fdb" won't be created. But its redundant anyway as driver could be in switchdev mode but still add nic rules. So use "ct" as folder name. Fixes: 77422a8f6f61 ("net/mlx5e: CT: Add ct driver counters") Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit f8c18a5749cf917096f75dd59885b7a0fe9298ba Author: Tariq Toukan Date: Sun Nov 27 09:21:28 2022 +0200 net/mlx5e: Fix RX reporter for XSK RQs RX reporter mistakenly reads from the regular (inactive) RQ when XSK RQ is active. Fix it here. Fixes: 3db4c85cde7a ("net/mlx5e: xsk: Use queue indices starting from 0 for XSK queues") Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b12d581e83e3ae1080c32ab83f123005bd89a840 Author: Dragos Tatulea Date: Mon Nov 28 15:24:21 2022 +0200 net/mlx5e: IPoIB, Don't allow CQE compression to be turned on by default mlx5e_build_nic_params will turn CQE compression on if the hardware capability is enabled and the slow_pci_heuristic condition is detected. As IPoIB doesn't support CQE compression, make sure to disable the feature in the IPoIB profile init. Please note that the feature is not exposed to the user for IPoIB interfaces, so it can't be subsequently turned on. Fixes: b797a684b0dd ("net/mlx5e: Enable CQE compression when PCI is slower than link") Signed-off-by: Dragos Tatulea Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 4 ++++ 1 file changed, 4 insertions(+) commit c4ad5f2bdad56265b23d3635494ecdb205431807 Author: Shay Drory Date: Wed Nov 9 14:42:59 2022 +0200 net/mlx5: Fix RoCE setting at HCA level mlx5 PF can disable RoCE for its VFs and SFs. In such case RoCE is marked as unsupported on those VFs/SFs. The cited patch added an option for disable (and enable) RoCE at HCA level. However, that commit didn't check whether RoCE is supported on the HCA and enabled user to try and set RoCE to on. Fix it by checking whether the HCA supports RoCE. Fixes: fbfa97b4d79f ("net/mlx5: Disable roce at HCA level") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9078e843efec530f279a155f262793c58b0746bd Author: Shay Drory Date: Thu Nov 24 13:34:12 2022 +0200 net/mlx5: Avoid recovery in probe flows Currently, recovery is done without considering whether the device is still in probe flow. This may lead to recovery before device have finished probed successfully. e.g.: while mlx5_init_one() is running. Recovery flow is using functionality that is loaded only by mlx5_init_one(), and there is no point in running recovery without mlx5_init_one() finished successfully. Fix it by waiting for probe flow to finish and checking whether the device is probed before trying to perform recovery. Fixes: 51d138c2610a ("net/mlx5: Fix health error state handling") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 44aee8ea15ac205490a41b00cbafcccbf9f7f82b Author: Shay Drory Date: Sun Dec 18 12:42:14 2022 +0200 net/mlx5: Fix io_eq_size and event_eq_size params validation io_eq_size and event_eq_size params are of param type DEVLINK_PARAM_TYPE_U32. But, the validation callback is addressing them as DEVLINK_PARAM_TYPE_U16. This cause mismatch in validation in big-endian systems, in which values in range were rejected while 268500991 was accepted. Fix it by checking the U32 value in the validation callback. Fixes: 0844fa5f7b89 ("net/mlx5: Let user configure io_eq_size param") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a35b2c2e6a252eda2134aae6a756861d9299531 Author: Jiri Pirko Date: Tue Oct 18 12:51:52 2022 +0200 net/mlx5: Add forgotten cleanup calls into mlx5_init_once() error path There are two cleanup calls missing in mlx5_init_once() error path. Add them making the error path flow to be the same as mlx5_cleanup_once(). Fixes: 52ec462eca9b ("net/mlx5: Add reserved-gids support") Fixes: 7c39afb394c7 ("net/mlx5: PTP code migration to driver core section") Signed-off-by: Jiri Pirko Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 ++ 1 file changed, 2 insertions(+) commit 1f0ae22ab470946143485a02cc1cd7e05c0f9120 Author: Moshe Shemesh Date: Mon Dec 12 10:42:15 2022 +0200 net/mlx5: E-Switch, properly handle ingress tagged packets on VST Fix SRIOV VST mode behavior to insert cvlan when a guest tag is already present in the frame. Previous VST mode behavior was to drop packets or override existing tag, depending on the device version. In this patch we fix this behavior by correctly building the HW steering rule with a push vlan action, or for older devices we ask the FW to stack the vlan when a vlan is already present. Fixes: 07bab9502641 ("net/mlx5: E-Switch, Refactor eswitch ingress acl codes") Fixes: dfcb1ed3c331 ("net/mlx5: E-Switch, Vport ingress/egress ACLs rules for VST mode") Signed-off-by: Moshe Shemesh Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/esw/acl/egress_lgcy.c | 7 ++++- .../mellanox/mlx5/core/esw/acl/ingress_lgcy.c | 33 ++++++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 30 ++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 6 ++++ include/linux/mlx5/device.h | 5 ++++ include/linux/mlx5/mlx5_ifc.h | 3 +- 6 files changed, 68 insertions(+), 16 deletions(-) commit 6c82b94d583a116faf99858379ee34844df963a1 Author: Ulf Hansson Date: Tue Nov 22 13:37:13 2022 +0100 Revert "arm64: dts: qcom: sm8250: Disable the not yet supported cluster idle state" Due to recent improvements of the cluster idle state support for Qcom based platforms, we are now able to support the deepest cluster idle state. Let's therefore revert the earlier workaround. This reverts commit cadaa773bcf1 ("arm64: dts: qcom: sm8250: Disable the not yet supported cluster idle state"), which is available from v6.1-rc6. Signed-off-by: Ulf Hansson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221122123713.65631-1-ulf.hansson@linaro.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 - 1 file changed, 1 deletion(-) commit bffb7d9d1a3dbd09e083b88aefd093b3b10abbfb Author: Andreas Kemnade Date: Sat Dec 17 23:13:05 2022 +0100 iio:adc:twl6030: Enable measurement of VAC VAC needs to be wired up to produce proper measurements, without this change only near zero values are reported. Reported-by: kernel test robot Reported-by: Julia Lawall Fixes: 1696f36482e7 ("iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver") Signed-off-by: Andreas Kemnade Link: https://lore.kernel.org/r/20221217221305.671117-1-andreas@kemnade.info Signed-off-by: Jonathan Cameron drivers/iio/adc/twl6030-gpadc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d61c1820598a5ea474576ed55318a6dadee37ed Author: Carlos Song Date: Thu Dec 8 15:19:09 2022 +0800 iio: imu: fxos8700: fix ACCEL measurement range selection When device is in active mode, it fails to set an ACCEL full-scale range(2g/4g/8g) in FXOS8700_XYZ_DATA_CFG. This is not align with the datasheet, but it is a fxos8700 chip behavior. Keep the device in standby mode before setting ACCEL full-scale range into FXOS8700_XYZ_DATA_CFG in chip initialization phase and setting scale phase. Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU") Signed-off-by: Carlos Song Link: https://lore.kernel.org/r/20221208071911.2405922-6-carlos.song@nxp.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/fxos8700_core.c | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) commit a53f945879c0cb9de3a4c05a665f5157884b5208 Author: Carlos Song Date: Thu Dec 8 15:19:08 2022 +0800 iio: imu: fxos8700: fix IMU data bits returned to user space ACCEL output data registers contain the X-axis, Y-axis, and Z-axis 14-bit left-justified sample data and MAGN output data registers contain the X-axis, Y-axis, and Z-axis 16-bit sample data. The ACCEL raw register output data should be divided by 4 before sent to userspace. Apply a 2 bits signed right shift to the raw data from ACCEL output data register but keep that from MAGN sensor as the origin. Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU") Signed-off-by: Carlos Song Link: https://lore.kernel.org/r/20221208071911.2405922-5-carlos.song@nxp.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/fxos8700_core.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 37a94d86d7050665d6d01378b2c916c28e454f10 Author: Carlos Song Date: Thu Dec 8 15:19:07 2022 +0800 iio: imu: fxos8700: fix incomplete ACCEL and MAGN channels readback The length of ACCEL and MAGN 3-axis channels output data is 6 byte individually. However block only read 3 bytes data into buffer from ACCEL or MAGN output data registers every time. It causes an incomplete ACCEL and MAGN channels readback. Set correct value count for regmap_bulk_read to get 6 bytes ACCEL and MAGN channels readback. Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU") Signed-off-by: Carlos Song Link: https://lore.kernel.org/r/20221208071911.2405922-4-carlos.song@nxp.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/fxos8700_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c68b44bc7d9b1469774a1c985ee71d2cbc5ebef5 Author: Carlos Song Date: Thu Dec 8 15:19:06 2022 +0800 iio: imu: fxos8700: fix swapped ACCEL and MAGN channels readback Because ACCEL and MAGN channels data register base address is swapped the accelerometer and magnetometer channels readback is swapped. Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU") Signed-off-by: Carlos Song Link: https://lore.kernel.org/r/20221208071911.2405922-3-carlos.song@nxp.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/fxos8700_core.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 429e1e8ec696e0e7a0742904e3dc2f83b7b23dfb Author: Carlos Song Date: Thu Dec 8 15:19:05 2022 +0800 iio: imu: fxos8700: fix map label of channel type to MAGN sensor FXOS8700 is an IMU sensor with ACCEL sensor and MAGN sensor. Sensor type is indexed by corresponding channel type in a switch. IIO_ANGL_VEL channel type mapped to MAGN sensor has caused confusion. Fix the mapping label of "IIO_MAGN" channel type instead of "IIO_ANGL_VEL" channel type to MAGN sensor. Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU") Signed-off-by: Carlos Song Link: https://lore.kernel.org/r/20221208071911.2405922-2-carlos.song@nxp.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/fxos8700_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f804bd0dc28683a93a60f271aaefb2fc5b0853dd Author: Andreas Kemnade Date: Thu Dec 1 19:16:35 2022 +0100 iio:adc:twl6030: Enable measurements of VUSB, VBAT and others Some inputs need to be wired up to produce proper measurements, without this change only near zero values are reported. Signed-off-by: Andreas Kemnade Fixes: 1696f36482e70 ("iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver") Link: https://lore.kernel.org/r/20221201181635.3522962-1-andreas@kemnade.info Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/twl6030-gpadc.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 0fc3562a993c3dc41d1177b3983d9300d0db1d4d Author: Frank Li Date: Thu Dec 1 09:01:10 2022 -0500 iio: imx8qxp-adc: fix irq flood when call imx8qxp_adc_read_raw() irq flood happen when run cat /sys/bus/iio/devices/iio:device0/in_voltage1_raw imx8qxp_adc_read_raw() { ... enable irq /* adc start */ writel(1, adc->regs + IMX8QXP_ADR_ADC_SWTRIG); ^^^^ trigger irq flood. wait_for_completion_interruptible_timeout(); readl(adc->regs + IMX8QXP_ADR_ADC_RESFIFO); ^^^^ clear irq here. ... } There is only FIFO watermark interrupt at this ADC controller. IRQ line will be assert until software read data from FIFO. So IRQ flood happen during wait_for_completion_interruptible_timeout(). Move FIFO read into irq handle to avoid irq flood. Fixes: 1e23dcaa1a9f ("iio: imx8qxp-adc: Add driver support for NXP IMX8QXP ADC") Cc: stable@vger.kernel.org Signed-off-by: Frank Li Reviewed-by: Cai Huoqing Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/20221201140110.2653501-1-Frank.Li@nxp.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/imx8qxp-adc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 6794ed0cfcc6ce737240eccc48b3e8190df36703 Author: Marco Pagani Date: Fri Nov 25 12:31:12 2022 +0100 iio: adc: xilinx-ams: fix devm_krealloc() return value check The clang-analyzer reported a warning: "Value stored to 'ret' is never read". Fix the return value check if devm_krealloc() fails to resize ams_channels. Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver") Signed-off-by: Marco Pagani Acked-by: Michal Simek Link: https://lore.kernel.org/r/20221125113112.219290-1-marpagan@redhat.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/xilinx-ams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbd3a0153cd18a2cbef6bf3cf31bb406c3fc9f55 Author: Xiongfeng Wang Date: Tue Nov 29 10:03:16 2022 +0800 iio: adc: berlin2-adc: Add missing of_node_put() in error path of_get_parent() will return a device_node pointer with refcount incremented. We need to use of_node_put() on it when done. Add the missing of_node_put() in the error path of berlin2_adc_probe(); Fixes: 70f1937911ca ("iio: adc: add support for Berlin") Signed-off-by: Xiongfeng Wang Link: https://lore.kernel.org/r/20221129020316.191731-1-wangxiongfeng2@huawei.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/berlin2-adc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cc3304052a89ab6ac887ed9224420a27e3d354e1 Author: Olivier Moysan Date: Fri Dec 2 16:28:48 2022 +0100 iio: adc: stm32-dfsdm: fill module aliases When STM32 DFSDM driver is built as module, no modalias information is available. This prevents module to be loaded by udev. Add MODULE_DEVICE_TABLE() to fill module aliases. Fixes: e2e6771c6462 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support") Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20221202152848.45585-1-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-dfsdm-adc.c | 1 + 1 file changed, 1 insertion(+) commit 0154252a3b87f77db1e44516d1ed2e82e2d29c30 Author: Krzysztof Kozlowski Date: Sun Dec 4 09:46:14 2022 +0100 ARM: dts: qcom: apq8084-ifc6540: fix overriding SDHCI While changing node names of APQ8084 SDHCI, the ones in IFC6540 board were not updated leading to disabled and misconfigured SDHCI. Cc: Fixes: 2477d81901a2 ("ARM: dts: qcom: Fix sdhci node names - use 'mmc@'") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204084614.12193-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8084-ifc6540.dts | 20 ++++++++++---------- arch/arm/boot/dts/qcom-apq8084.dtsi | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) commit 76807fcd73b818eb9f245ef1035aed34ecdd9813 Author: Sagi Grimberg Date: Sun Dec 25 13:28:51 2022 +0200 nvme-auth: fix smatch warning complaints When initializing auth context, there may be no secrets passed by the user. Make return code explicit when returning successfully. smatch warnings: drivers/nvme/host/auth.c:950 nvme_auth_init_ctrl() warn: missing error code? 'ret' Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f99ac04c469b5d0a180a4ccea99d25d5dc9d21c Author: Christoph Hellwig Date: Tue Dec 13 16:13:38 2022 +0100 nvme: consult the CSE log page for unprivileged passthrough Commands like Write Zeros can change the contents of a namespaces without actually transferring data. To protect against this, check the Commands Supported and Effects log is supported by the controller for any unprivileg command passthrough and refuse unprivileged passthrough if the command has any effects that can change data or metadata. Note: While the Commands Support and Effects log page has only been mandatory since NVMe 2.0, it is widely supported because Windows requires it for any command passthrough from userspace. Fixes: e4fbcf32c860 ("nvme: identify-namespace without CAP_SYS_ADMIN") Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi drivers/nvme/host/ioctl.c | 28 ++++++++++++++++++++++++---- include/linux/nvme.h | 1 + 2 files changed, 25 insertions(+), 4 deletions(-) commit 831ed60c2aca2d7c517b2da22897a90224a97d27 Author: Christoph Hellwig Date: Wed Dec 21 10:12:17 2022 +0100 nvme: also return I/O command effects from nvme_command_effects To be able to use the Commands Supported and Effects Log for allowing unprivileged passtrough, it needs to be corretly reported for I/O commands as well. Return the I/O command effects from nvme_command_effects, and also add a default list of effects for the NVM command set. For other command sets, the Commands Supported and Effects log is required to be present already. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Kanchan Joshi drivers/nvme/host/core.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit 2a459f6933e1c459bffb7cc73fd6c900edc714bd Author: Christoph Hellwig Date: Wed Dec 21 09:51:19 2022 +0100 nvmet: don't defer passthrough commands with trivial effects to the workqueue Mask out the "Command Supported" and "Logical Block Content Change" bits and only defer execution of commands that have non-trivial effects to the workqueue for synchronous execution. This allows to execute admin commands asynchronously on controllers that provide a Command Supported and Effects log page, and will keep allowing to execute Write commands asynchronously once command effects on I/O commands are taken into account. Fixes: c1fef73f793b ("nvmet: add passthru code to process commands") Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi drivers/nvme/target/passthru.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit f2d1421391bba0b15684d2379a47a089f0e561d0 Author: Christoph Hellwig Date: Mon Dec 12 15:20:56 2022 +0100 nvmet: set the LBCC bit for commands that modify data Write, Write Zeroes, Zone append and a Zone Reset through Zone Management Send modify the logical block content of a namespace, so make sure the LBCC bit is reported for them. Fixes: b5d0b38c0475 ("nvmet: add Command Set Identifier support") Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni drivers/nvme/target/admin-cmd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 61f37154c599cf9f2f84dcbd9be842f8645a7099 Author: Christoph Hellwig Date: Mon Dec 12 15:20:04 2022 +0100 nvmet: use NVME_CMD_EFFECTS_CSUPP instead of open coding it Use NVME_CMD_EFFECTS_CSUPP instead of open coding it and assign a single value to multiple array entries instead of repeated assignments. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni drivers/nvme/target/admin-cmd.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit 685e6311637e46f3212439ce2789f8a300e5050f Author: Christoph Hellwig Date: Wed Dec 21 10:30:45 2022 +0100 nvme: fix the NVME_CMD_EFFECTS_CSE_MASK definition 3 << 16 does not generate the correct mask for bits 16, 17 and 18. Use the GENMASK macro to generate the correct mask instead. Fixes: 84fef62d135b ("nvme: check admin passthru command effects") Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi include/linux/nvme.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8ca4fc323d2e4ab9dabbdd57633af40b0c7e6af9 Author: Christoph Hellwig Date: Mon Dec 12 11:09:55 2022 +0100 docs, nvme: add a feature and quirk policy document This adds a document about what specification features are supported by the Linux NVMe driver, and what qualifies for a quirk if an implementation has problems following the specification. Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Reviewed-by: Randy Dunlap Acked-by: Jonathan Corbet .../maintainer/maintainer-entry-profile.rst | 1 + Documentation/nvme/feature-and-quirk-policy.rst | 77 ++++++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 79 insertions(+) commit 090ddad4c7a9fefd647c762093a555870a19c8b2 Author: Takashi Iwai Date: Wed Dec 28 13:57:14 2022 +0100 ALSA: hda/hdmi: Static PCM mapping again with AMD HDMI codecs The recent code refactoring for HD-audio HDMI codec driver caused a regression on AMD/ATI HDMI codecs; namely, PulseAudioand pipewire don't recognize HDMI outputs any longer while the direct output via ALSA raw access still works. The problem turned out that, after the code refactoring, the driver assumes only the dynamic PCM assignment, and when a PCM stream that still isn't assigned to any pin gets opened, the driver tries to assign any free converter to the PCM stream. This behavior is OK for Intel and other codecs, as they have arbitrary connections between pins and converters. OTOH, on AMD chips that have a 1:1 mapping between pins and converters, this may end up with blocking the open of the next PCM stream for the pin that is tied with the formerly taken converter. Also, with the code refactoring, more PCM streams are exposed than necessary as we assume all converters can be used, while this isn't true for AMD case. This may change the PCM stream assignment and confuse users as well. This patch fixes those problems by: - Introducing a flag spec->static_pcm_mapping, and if it's set, the driver applies the static mapping between pins and converters at the probe time - Limiting the number of PCM streams per pins, too; this avoids the superfluous PCM streams Fixes: ef6f5494faf6 ("ALSA: hda/hdmi: Use only dynamic PCM device allocation") Cc: Link: https://bugzilla.kernel.org/show_bug.cgi?id=216836 Co-developed-by: Jaroslav Kysela Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20221228125714.16329-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit a5496886eb130ea08b1a5cd5c284543909bde749 Merge: 1b929c02afd3 129c48cde6c9 Author: Paolo Bonzini Date: Wed Dec 28 06:26:36 2022 -0500 Merge branch 'kvm-late-6.1-fixes' into HEAD x86: * several fixes to nested VMX execution controls * fixes and clarification to the documentation for Xen emulation * do not unnecessarily release a pmu event with zero period * MMU fixes * fix Coverity warning in kvm_hv_flush_tlb() selftests: * fixes for the ucall mechanism in selftests * other fixes mostly related to compilation with clang commit 129c48cde6c9e519d033305649665427c6cac494 Author: Paolo Bonzini Date: Wed Nov 30 13:11:47 2022 -0500 KVM: selftests: restore special vmmcall code layout needed by the harness Commit 8fda37cf3d41 ("KVM: selftests: Stuff RAX/RCX with 'safe' values in vmmcall()/vmcall()", 2022-11-21) broke the svm_nested_soft_inject_test because it placed a "pop rbp" instruction after vmmcall. While this is correct and mimics what is done in the VMX case, this particular test expects a ud2 instruction right after the vmmcall, so that it can skip over it in the L1 part of the test. Inline a suitably-modified version of vmmcall() to restore the functionality of the test. Fixes: 8fda37cf3d41 ("KVM: selftests: Stuff RAX/RCX with 'safe' values in vmmcall()/vmcall()" Cc: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Reviewed-by: Sean Christopherson Reviewed-by: Vitaly Kuznetsov Reviewed-by: Maxim Levitsky Message-Id: <20221130181147.9911-1-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/svm_nested_soft_inject_test.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 40cab44b9089a41f71bbd0eff753eb91d5dafd68 Author: Pedro Tammela Date: Tue Dec 27 11:04:59 2022 -0300 net/sched: fix retpoline wrapper compilation on configs without tc filters Rudi reports a compilation failure on x86_64 when CONFIG_NET_CLS or CONFIG_NET_CLS_ACT is not set but CONFIG_RETPOLINE is set. A misplaced '#endif' was causing the issue. Fixes: 7f0e810220e2 ("net/sched: add retpoline wrapper for tc") Tested-by: Rudi Heitbaum Signed-off-by: Pedro Tammela Signed-off-by: David S. Miller include/net/tc_wrapper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2052189f19bd98c80b5d46dc6e42330d2b3b35d Author: Xuezhi Zhang Date: Tue Dec 27 19:03:52 2022 +0800 s390/qeth: convert sysfs snprintf 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: Xuezhi Zhang Signed-off-by: David S. Miller drivers/s390/net/qeth_core_sys.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0e3d18359ac117f2285c41bdf791cdc76b0fb0bb Merge: e71460d4468f bb41c13c05c2 Author: David S. Miller Date: Wed Dec 28 11:58:08 2022 +0000 Merge branch 'r8169-fixes' Chunhao Lin says: ==================== r8169: fix dmar pte write access is not set error This series fixes dmar pte write access is not set error. Chunhao Lin (2): r8169: move rtl_wol_enable_rx() and rtl_prepare_power_down() r8169: fix dmar pte write access is not set error v2: -update commit message -adjust the code according to current kernel code v3: -update title and commit message -split the patch ==================== Signed-off-by: David S. Miller commit bb41c13c05c23d9bc46b4e37d8914078c6a40e3a Author: Chunhao Lin Date: Mon Dec 26 20:31:53 2022 +0800 r8169: fix dmar pte write access is not set error When close device, if wol is enabled, rx will be enabled. When open device it will cause rx packet to be dma to the wrong memory address after pci_set_master() and system log will show blow messages. DMAR: DRHD: handling fault status reg 3 DMAR: [DMA Write] Request device [02:00.0] PASID ffffffff fault addr ffdd4000 [fault reason 05] PTE Write access is not set In this patch, driver disable tx/rx when close device. If wol is enabled, only enable rx filter and disable rxdv_gate(if support) to let hardware only receive packet to fifo but not to dma it. Signed-off-by: Chunhao Lin Reviewed-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ad425666a1f05d9b215a84cf010c3789b2ea8206 Author: Chunhao Lin Date: Mon Dec 26 20:31:52 2022 +0800 r8169: move rtl_wol_enable_rx() and rtl_prepare_power_down() There is no functional change. Moving these two functions for following patch "r8169: fix dmar pte write access is not set error". Signed-off-by: Chunhao Lin Reviewed-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit e71460d4468fbd923b07056d7d18fd85f29c6ae2 Merge: 8ac718cc0e36 201ed315f967 Author: David S. Miller Date: Wed Dec 28 11:55:24 2022 +0000 Merge branch 'ethtool_gert_phy_stats-fixes' Daniil Tatianin says: ==================== net/ethtool/ioctl: split ethtool_get_phy_stats into multiple helpers This series fixes a potential NULL dereference in ethtool_get_phy_stats while also attempting to refactor/split said function into multiple helpers so that it's easier to reason about what's going on. I've taken Andrew Lunn's suggestions on the previous version of this patch and added a bit of my own. Changes since v1: - Remove an extra newline in the first patch - Move WARN_ON_ONCE into the if check as it already returns the result of the comparison - Actually split ethtool_get_phy_stats instead of attempting to refactor it ==================== Signed-off-by: David S. Miller commit 201ed315f9676809cd5b20a39206e964106d4f27 Author: Daniil Tatianin Date: Mon Dec 26 14:48:25 2022 +0300 net/ethtool/ioctl: split ethtool_get_phy_stats into multiple helpers So that it's easier to follow and make sense of the branching and various conditions. Stats retrieval has been split into two separate functions ethtool_get_phy_stats_phydev & ethtool_get_phy_stats_ethtool. The former attempts to retrieve the stats using phydev & phy_ops, while the latter uses ethtool_ops. Actual n_stats validation & array allocation has been moved into a new ethtool_vzalloc_stats_array helper. This also fixes a potential NULL dereference of ops->get_ethtool_phy_stats where it was getting called in an else branch unconditionally without making sure it was actually present. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Daniil Tatianin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/ethtool/ioctl.c | 102 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 69 insertions(+), 33 deletions(-) commit fd4778581d61d8848b532f8cdc9b325138748437 Author: Daniil Tatianin Date: Mon Dec 26 14:48:24 2022 +0300 net/ethtool/ioctl: remove if n_stats checks from ethtool_get_phy_stats Now that we always early return if we don't have any stats we can remove these checks as they're no longer necessary. Signed-off-by: Daniil Tatianin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/ethtool/ioctl.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 9deb1e9fb88b1120a908676fa33bdf9e2eeaefce Author: Daniil Tatianin Date: Mon Dec 26 14:48:23 2022 +0300 net/ethtool/ioctl: return -EOPNOTSUPP if we have no phy stats It's not very useful to copy back an empty ethtool_stats struct and return 0 if we didn't actually have any stats. This also allows for further simplification of this function in the future commits. Signed-off-by: Daniil Tatianin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/ethtool/ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f96a483f8e131de50ebf30589ffba1a4f6bd12f7 Author: Jie Hai Date: Sat Nov 26 14:49:38 2022 +0800 MAINTAINERS: update Jie Hai's email address Signed-off-by: Jie Hai Link: https://lore.kernel.org/r/20221126064938.50685-1-haijie1@huawei.com Signed-off-by: Vinod Koul MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efab25894a41a920d9581183741e7fadba00719c Author: Jayesh Choudhary Date: Mon Nov 28 14:20:05 2022 +0530 dmaengine: ti: k3-udma: Do conditional decrement of UDMA_CHAN_RT_PEER_BCNT_REG PSIL_EP_NATIVE endpoints may not have PEER registers for BCNT and thus udma_decrement_byte_counters() should not try to decrement these counters. This fixes the issue of crypto IPERF testing where the client side (EVM) hangs without transfer of packets to the server side, seen since this function was added. Fixes: 7c94dcfa8fcf ("dmaengine: ti: k3-udma: Reset UDMA_CHAN_RT byte counters to prevent overflow") Signed-off-by: Jayesh Choudhary Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221128085005.489964-1-j-choudhary@ti.com Signed-off-by: Vinod Koul drivers/dma/ti/k3-udma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 02d9a04da453984b16f4a585ad808cf961df495e Author: Paolo Bonzini Date: Wed Dec 28 06:00:22 2022 -0500 Documentation: kvm: clarify SRCU locking order Currently only the locking order of SRCU vs kvm->slots_arch_lock and kvm->slots_lock is documented. Extend this to kvm->lock since Xen emulation got it terribly wrong. Signed-off-by: Paolo Bonzini Documentation/virt/kvm/locking.rst | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 6744a030d81e456883bfbb627ac1f30465c1a989 Author: Reinette Chatre Date: Wed Dec 7 14:52:22 2022 -0800 dmaengine: idxd: Do not call DMX TX callbacks during workqueue disable On driver unload any pending descriptors are flushed and pending DMA descriptors are explicitly completed: idxd_dmaengine_drv_remove() -> drv_disable_wq() -> idxd_wq_free_irq() -> idxd_flush_pending_descs() -> idxd_dma_complete_txd() With this done during driver unload any remaining descriptor is likely stuck and can be dropped. Even so, the descriptor may still have a callback set that could no longer be accessible. An example of such a problem is when the dmatest fails and the dmatest module is unloaded. The failure of dmatest leaves descriptors with dma_async_tx_descriptor::callback pointing to code that no longer exist. This causes a page fault as below at the time the IDXD driver is unloaded when it attempts to run the callback: BUG: unable to handle page fault for address: ffffffffc0665190 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page Fix this by clearing the callback pointers on the transmit descriptors only when workqueue is disabled. Fixes: 403a2e236538 ("dmaengine: idxd: change MSIX allocation based on per wq activation") Signed-off-by: Reinette Chatre Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/37d06b772aa7f8863ca50f90930ea2fd80b38fc3.1670452419.git.reinette.chatre@intel.com Signed-off-by: Vinod Koul drivers/dma/idxd/device.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 1beeec45f9ac31eba52478379f70a5fa9c2ad005 Author: Reinette Chatre Date: Wed Dec 7 14:52:21 2022 -0800 dmaengine: idxd: Prevent use after free on completion memory On driver unload any pending descriptors are flushed at the time the interrupt is freed: idxd_dmaengine_drv_remove() -> drv_disable_wq() -> idxd_wq_free_irq() -> idxd_flush_pending_descs(). If there are any descriptors present that need to be flushed this flow triggers a "not present" page fault as below: BUG: unable to handle page fault for address: ff391c97c70c9040 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page The address that triggers the fault is the address of the descriptor that was freed moments earlier via: drv_disable_wq()->idxd_wq_free_resources() Fix the use after free by freeing the descriptors after any possible usage. This is done after idxd_wq_reset() to ensure that the memory remains accessible during possible completion writes by the device. Fixes: 63c14ae6c161 ("dmaengine: idxd: refactor wq driver enable/disable operations") Suggested-by: Dave Jiang Signed-off-by: Reinette Chatre Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/6c4657d9cff0a0a00501a7b928297ac966e9ec9d.1670452419.git.reinette.chatre@intel.com Signed-off-by: Vinod Koul drivers/dma/idxd/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b51b75f0604f17c0f6f3b6f68f1a521a5cc6b04f Author: Reinette Chatre Date: Wed Dec 7 14:52:20 2022 -0800 dmaengine: idxd: Let probe fail when workqueue cannot be enabled The workqueue is enabled when the appropriate driver is loaded and disabled when the driver is removed. When the driver is removed it assumes that the workqueue was enabled successfully and proceeds to free allocations made during workqueue enabling. Failure during workqueue enabling does not prevent the driver from being loaded. This is because the error path within drv_enable_wq() returns success unless a second failure is encountered during the error path. By returning success it is possible to load the driver even if the workqueue cannot be enabled and allocations that do not exist are attempted to be freed during driver remove. Some examples of problematic flows: (a) idxd_dmaengine_drv_probe() -> drv_enable_wq() -> idxd_wq_request_irq(): In above flow, if idxd_wq_request_irq() fails then idxd_wq_unmap_portal() is called on error exit path, but drv_enable_wq() returns 0 because idxd_wq_disable() succeeds. The driver is thus loaded successfully. idxd_dmaengine_drv_remove()->drv_disable_wq()->idxd_wq_unmap_portal() Above flow on driver unload triggers the WARN in devm_iounmap() because the device resource has already been removed during error path of drv_enable_wq(). (b) idxd_dmaengine_drv_probe() -> drv_enable_wq() -> idxd_wq_request_irq(): In above flow, if idxd_wq_request_irq() fails then idxd_wq_init_percpu_ref() is never called to initialize the percpu counter, yet the driver loads successfully because drv_enable_wq() returns 0. idxd_dmaengine_drv_remove()->__idxd_wq_quiesce()->percpu_ref_kill(): Above flow on driver unload triggers a BUG when attempting to drop the initial ref of the uninitialized percpu ref: BUG: kernel NULL pointer dereference, address: 0000000000000010 Fix the drv_enable_wq() error path by returning the original error that indicates failure of workqueue enabling. This ensures that the probe fails when an error is encountered and the driver remove paths are only attempted when the workqueue was enabled successfully. Fixes: 1f2bb40337f0 ("dmaengine: idxd: move wq_enable() to device.c") Signed-off-by: Reinette Chatre Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/e8d8116e5efa0fd14fadc5adae6ffd319f0e5ff1.1670452419.git.reinette.chatre@intel.com Signed-off-by: Vinod Koul drivers/dma/idxd/device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a79b53aaaab53de017517bf9579b6106397a523c Author: Paolo Bonzini Date: Wed Dec 28 05:33:41 2022 -0500 KVM: x86: fix deadlock for KVM_XEN_EVTCHN_RESET While KVM_XEN_EVTCHN_RESET is usually called with no vCPUs running, if that happened it could cause a deadlock. This is due to kvm_xen_eventfd_reset() doing a synchronize_srcu() inside a kvm->lock critical section. To avoid this, first collect all the evtchnfd objects in an array and free all of them once the kvm->lock critical section is over and th SRCU grace period has expired. Reported-by: Michal Luczaj Cc: David Woodhouse Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 30 +++++++++++++++++++--- .../testing/selftests/kvm/x86_64/xen_shinfo_test.c | 6 +++++ 2 files changed, 33 insertions(+), 3 deletions(-) commit a26116c1e74028914f281851488546c91cbae57d Author: Rafael Mendonca Date: Fri Oct 21 17:41:26 2022 -0300 virtio_blk: Fix signedness bug in virtblk_prep_rq() The virtblk_map_data() function returns negative error codes, however, the 'nents' field of vbr->sg_table is an unsigned int, which causes the error handling not to work correctly. Cc: stable@vger.kernel.org Fixes: 0e9911fa768f ("virtio-blk: support mq_ops->queue_rqs()") Signed-off-by: Rafael Mendonca Message-Id: <20221021204126.927603-1-rafaelmendsr@gmail.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella Reviewed-by: Suwan Kim Reviewed-by: Stefan Hajnoczi Acked-by: Jason Wang drivers/block/virtio_blk.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 72455a1142527e607e1d69439f3ffa2ef6d09e26 Author: Cindy Lu Date: Wed Dec 14 13:43:06 2022 +0800 vdpa_sim_net: should not drop the multicast/broadcast packet In the receive_filter(), should not drop the packet with the broadcast/multicast address. Add the check for this Signed-off-by: Cindy Lu Message-Id: <20221214054306.24145-1-lulu@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 3 +++ 1 file changed, 3 insertions(+) commit 0b7a04a30eef20e6b24926a45c0ce7906ae85bd6 Author: Jason Wang Date: Tue Dec 13 17:07:17 2022 +0800 vdpasim: fix memory leak when freeing IOTLBs After commit bda324fd037a ("vdpasim: control virtqueue support"), vdpasim->iommu became an array of IOTLB, so we should clean the mappings of each free one by one instead of just deleting the ranges in the first IOTLB which may leak maps. Fixes: bda324fd037a ("vdpasim: control virtqueue support") Cc: Gautam Dawar Signed-off-by: Jason Wang Message-Id: <20221213090717.61529-1-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Gautam Dawar drivers/vdpa/vdpa_sim/vdpa_sim.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1c96d5457f7251d1c62aacc04921557d56fc049a Author: Jason Wang Date: Wed Sep 7 14:01:10 2022 +0800 vdpa: conditionally fill max max queue pair for stats For the device without multiqueue feature, we will read 0 as max_virtqueue_pairs from the config. So if we fill VDPA_ATTR_DEV_NET_CFG_MAX_VQP with the value we read from the config we will confuse the user. Fixing this by only filling the value when multiqueue is offered by the device so userspace can assume 1 when the attr is not provided. Fixes: 13b00b135665c("vdpa: Add support for querying vendor statistics") Cc: Eli Cohen Signed-off-by: Jason Wang Message-Id: <20220907060110.4511-1-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Eli Cohen drivers/vdpa/vdpa.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit ed843d6ed7310a27cf7c8ee0a82a482eed0cb4a6 Author: Rong Wang Date: Wed Dec 7 20:08:13 2022 +0800 vdpa/vp_vdpa: fix kfree a wrong pointer in vp_vdpa_remove In vp_vdpa_remove(), the code kfree(&vp_vdpa_mgtdev->mgtdev.id_table) uses a reference of pointer as the argument of kfree, which is the wrong pointer and then may hit crash like this: Unable to handle kernel paging request at virtual address 00ffff003363e30c Internal error: Oops: 96000004 [#1] SMP Call trace: rb_next+0x20/0x5c ext4_readdir+0x494/0x5c4 [ext4] iterate_dir+0x168/0x1b4 __se_sys_getdents64+0x68/0x170 __arm64_sys_getdents64+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 Code: 54000220 f9400441 b4000161 aa0103e0 (f9400821) SMP: stopping secondary CPUs Starting crashdump kernel... Fixes: ffbda8e9df10 ("vdpa/vp_vdpa : add vdpa tool support in vp_vdpa") Signed-off-by: Rong Wang Signed-off-by: Nanyong Sun Message-Id: <20221207120813.2837529-1-sunnanyong@huawei.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Cindy Lu Acked-by: Jason Wang drivers/vdpa/virtio_pci/vp_vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 937c783aa3d8d77963ec91918d3298edb45b9161 Author: Harshit Mogalapalli Date: Mon Nov 28 07:57:15 2022 -0800 vduse: Validate vq_num in vduse_validate_config() Add a limit to 'config->vq_num' which is user controlled data which comes from an vduse_ioctl to prevent large memory allocations. Micheal says - This limit is somewhat arbitrary. However, currently virtio pci and ccw are limited to a 16 bit vq number. While MMIO isn't it is also isn't used with lots of VQs due to current lack of support for per-vq interrupts. Thus, the 0xffff limit on number of VQs corresponding to a 16-bit VQ number seems sufficient for now. This is found using static analysis with smatch. Suggested-by: Michael S. Tsirkin Signed-off-by: Harshit Mogalapalli Message-Id: <20221128155717.2579992-1-harshit.m.mogalapalli@oracle.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vdpa/vdpa_user/vduse_dev.c | 3 +++ 1 file changed, 3 insertions(+) commit 81931012bd7dc52fadf2b720605fce8a7148d4a7 Author: Davidlohr Bueso Date: Sun Nov 27 19:43:47 2022 -0800 tools/virtio: remove smp_read_barrier_depends() This gets rid of the last references to smp_read_barrier_depends() which for the kernel side was removed in v5.9. The serialization required for Alpha is done inside READ_ONCE() instead of having users deal with it. Simply use a full barrier, the architecture does not have rmb in the first place. Signed-off-by: Davidlohr Bueso Message-Id: <20221128034347.990-3-dave@stgolabs.net> Signed-off-by: Michael S. Tsirkin Reviewed-by: Xuan Zhuo tools/virtio/ringtest/main.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 8aeac42d60936046a00e67cdf7d27b061df2962f Author: Davidlohr Bueso Date: Sun Nov 27 19:43:46 2022 -0800 tools/virtio: remove stray characters __read_once_size() is not a macro, remove those '/'s. Signed-off-by: Davidlohr Bueso Message-Id: <20221128034347.990-2-dave@stgolabs.net> Signed-off-by: Michael S. Tsirkin Reviewed-by: Xuan Zhuo tools/virtio/ringtest/main.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit e794070af224ade46db368271896b2685ff4f96b Author: Cindy Lu Date: Mon Dec 19 15:33:31 2022 +0800 vhost_vdpa: fix the crash in unmap a large memory While testing in vIOMMU, sometimes Guest will unmap very large memory, which will cause the crash. To fix this, add a new function vhost_vdpa_general_unmap(). This function will only unmap the memory that saved in iotlb. Call Trace: [ 647.820144] ------------[ cut here ]------------ [ 647.820848] kernel BUG at drivers/iommu/intel/iommu.c:1174! [ 647.821486] invalid opcode: 0000 [#1] PREEMPT SMP PTI [ 647.822082] CPU: 10 PID: 1181 Comm: qemu-system-x86 Not tainted 6.0.0-rc1home_lulu_2452_lulu7_vhost+ #62 [ 647.823139] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.15.0-29-g6a62e0cb0dfe-prebuilt.qem4 [ 647.824365] RIP: 0010:domain_unmap+0x48/0x110 [ 647.825424] Code: 48 89 fb 8d 4c f6 1e 39 c1 0f 4f c8 83 e9 0c 83 f9 3f 7f 18 48 89 e8 48 d3 e8 48 85 c0 75 59 [ 647.828064] RSP: 0018:ffffae5340c0bbf0 EFLAGS: 00010202 [ 647.828973] RAX: 0000000000000001 RBX: ffff921793d10540 RCX: 000000000000001b [ 647.830083] RDX: 00000000080000ff RSI: 0000000000000001 RDI: ffff921793d10540 [ 647.831214] RBP: 0000000007fc0100 R08: ffffae5340c0bcd0 R09: 0000000000000003 [ 647.832388] R10: 0000007fc0100000 R11: 0000000000100000 R12: 00000000080000ff [ 647.833668] R13: ffffae5340c0bcd0 R14: ffff921793d10590 R15: 0000008000100000 [ 647.834782] FS: 00007f772ec90640(0000) GS:ffff921ce7a80000(0000) knlGS:0000000000000000 [ 647.836004] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 647.836990] CR2: 00007f02c27a3a20 CR3: 0000000101b0c006 CR4: 0000000000372ee0 [ 647.838107] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 647.839283] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 647.840666] Call Trace: [ 647.841437] [ 647.842107] intel_iommu_unmap_pages+0x93/0x140 [ 647.843112] __iommu_unmap+0x91/0x1b0 [ 647.844003] iommu_unmap+0x6a/0x95 [ 647.844885] vhost_vdpa_unmap+0x1de/0x1f0 [vhost_vdpa] [ 647.845985] vhost_vdpa_process_iotlb_msg+0xf0/0x90b [vhost_vdpa] [ 647.847235] ? _raw_spin_unlock+0x15/0x30 [ 647.848181] ? _copy_from_iter+0x8c/0x580 [ 647.849137] vhost_chr_write_iter+0xb3/0x430 [vhost] [ 647.850126] vfs_write+0x1e4/0x3a0 [ 647.850897] ksys_write+0x53/0xd0 [ 647.851688] do_syscall_64+0x3a/0x90 [ 647.852508] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 647.853457] RIP: 0033:0x7f7734ef9f4f [ 647.854408] Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 29 76 f8 ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c8 [ 647.857217] RSP: 002b:00007f772ec8f040 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 647.858486] RAX: ffffffffffffffda RBX: 00000000fef00000 RCX: 00007f7734ef9f4f [ 647.859713] RDX: 0000000000000048 RSI: 00007f772ec8f090 RDI: 0000000000000010 [ 647.860942] RBP: 00007f772ec8f1a0 R08: 0000000000000000 R09: 0000000000000000 [ 647.862206] R10: 0000000000000001 R11: 0000000000000293 R12: 0000000000000010 [ 647.863446] R13: 0000000000000002 R14: 0000000000000000 R15: ffffffff01100000 [ 647.864692] [ 647.865458] Modules linked in: rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache netfs v] [ 647.874688] ---[ end trace 0000000000000000 ]--- Cc: stable@vger.kernel.org Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") Signed-off-by: Cindy Lu Message-Id: <20221219073331.556140-1-lulu@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vhost/vdpa.c | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) commit c8e82e3877028381969779a86972d9a4f57a9ea0 Author: Dawei Li Date: Fri Nov 25 00:12:14 2022 +0800 virtio: Implementing attribute show with sysfs_emit Replace sprintf with sysfs_emit or its variants for their built-in PAGE_SIZE awareness. Signed-off-by: Dawei Li Message-Id: Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b1d65f717cd6305a396a8738e022c6f7c65cfbe8 Author: Wei Yongjun Date: Mon Nov 14 11:07:40 2022 +0000 virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session() 'vc_ctrl_req' is alloced in virtio_crypto_alg_skcipher_close_session(), and should be freed in the invalid ctrl_status->status error handling case. Otherwise there is a memory leak. Fixes: 0756ad15b1fe ("virtio-crypto: use private buffer for control request") Signed-off-by: Wei Yongjun Message-Id: <20221114110740.537276-1-weiyongjun@huaweicloud.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Gonglei Acked-by: zhenwei pi Acked-by: Jason Wang drivers/crypto/virtio/virtio_crypto_skcipher_algs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a4722f64f924a9992efc08d141c21b2da02b70f3 Author: wangjianli Date: Sun Nov 13 15:07:42 2022 +0800 tools/virtio: Variable type completion Replace "unsigned" with "unsigned int" Signed-off-by: wangjianli Message-Id: <20221113070742.48271-1-wangjianli@cdjrlc.com> Signed-off-by: Michael S. Tsirkin tools/virtio/virtio_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 794ec498c9fa79e6bfd71b931410d5897a9c00d4 Author: Stefano Garzarella Date: Thu Nov 10 15:13:35 2022 +0100 vdpa_sim: fix vringh initialization in vdpasim_queue_ready() When we initialize vringh, we should pass the features and the number of elements in the virtqueue negotiated with the driver, otherwise operations with vringh may fail. This was discovered in a case where the driver sets a number of elements in the virtqueue different from the value returned by .get_vq_num_max(). In vdpasim_vq_reset() is safe to initialize the vringh with default values, since the virtqueue will not be used until vdpasim_queue_ready() is called again. Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator") Signed-off-by: Stefano Garzarella Message-Id: <20221110141335.62171-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Acked-by: Eugenio Pérez drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f4e468f708386ce5fa6878a7ef43a9818ceeaecf Author: Angus Chen Date: Thu Nov 10 11:01:23 2022 +0800 virtio_blk: use UINT_MAX instead of -1U We use UINT_MAX to limit max_discard_sectors in virtblk_probe, we can use UINT_MAX to limit max_hw_sectors for consistencies. No functional change intended. Signed-off-by: Angus Chen Message-Id: <20221110030124.1986-1-angus.chen@jaguarmicro.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi drivers/block/virtio_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c070c1912a83432530cbb4271d5b9b11fa36b67a Author: Stefano Garzarella Date: Wed Nov 9 16:42:13 2022 +0100 vhost-vdpa: fix an iotlb memory leak Before commit 3d5698793897 ("vhost-vdpa: introduce asid based IOTLB") we called vhost_vdpa_iotlb_unmap(v, iotlb, 0ULL, 0ULL - 1) during release to free all the resources allocated when processing user IOTLB messages through vhost_vdpa_process_iotlb_update(). That commit changed the handling of IOTLB a bit, and we accidentally removed some code called during the release. We partially fixed this with commit 037d4305569a ("vhost-vdpa: call vhost_vdpa_cleanup during the release") but a potential memory leak is still there as showed by kmemleak if the application does not send VHOST_IOTLB_INVALIDATE or crashes: unreferenced object 0xffff888007fbaa30 (size 16): comm "blkio-bench", pid 914, jiffies 4294993521 (age 885.500s) hex dump (first 16 bytes): 40 73 41 07 80 88 ff ff 00 00 00 00 00 00 00 00 @sA............. backtrace: [<0000000087736d2a>] kmem_cache_alloc_trace+0x142/0x1c0 [<0000000060740f50>] vhost_vdpa_process_iotlb_msg+0x68c/0x901 [vhost_vdpa] [<0000000083e8e205>] vhost_chr_write_iter+0xc0/0x4a0 [vhost] [<000000008f2f414a>] vhost_vdpa_chr_write_iter+0x18/0x20 [vhost_vdpa] [<00000000de1cd4a0>] vfs_write+0x216/0x4b0 [<00000000a2850200>] ksys_write+0x71/0xf0 [<00000000de8e720b>] __x64_sys_write+0x19/0x20 [<0000000018b12cbb>] do_syscall_64+0x3f/0x90 [<00000000986ec465>] entry_SYSCALL_64_after_hwframe+0x63/0xcd Let's fix this calling vhost_vdpa_iotlb_unmap() on the whole range in vhost_vdpa_remove_as(). We move that call before vhost_dev_cleanup() since we need a valid v->vdev.mm in vhost_vdpa_pa_unmap(). vhost_iotlb_reset() call can be removed, since vhost_vdpa_iotlb_unmap() on the whole range removes all the entries. The kmemleak log reported was observed with a vDPA device that has `use_va` set to true (e.g. VDUSE). This patch has been tested with both types of devices. Fixes: 037d4305569a ("vhost-vdpa: call vhost_vdpa_cleanup during the release") Fixes: 3d5698793897 ("vhost-vdpa: introduce asid based IOTLB") Signed-off-by: Stefano Garzarella Message-Id: <20221109154213.146789-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vhost/vdpa.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 98047313cdb46828093894d0ac8b1183b8b317f9 Author: Stefano Garzarella Date: Wed Nov 9 11:25:03 2022 +0100 vhost: fix range used in translate_desc() vhost_iotlb_itree_first() requires `start` and `last` parameters to search for a mapping that overlaps the range. In translate_desc() we cyclically call vhost_iotlb_itree_first(), incrementing `addr` by the amount already translated, so rightly we move the `start` parameter passed to vhost_iotlb_itree_first(), but we should hold the `last` parameter constant. Let's fix it by saving the `last` parameter value before incrementing `addr` in the loop. Fixes: a9709d6874d5 ("vhost: convert pre sorted vhost memory array to interval tree") Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Message-Id: <20221109102503.18816-3-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f85efa9b0f5381874f727bd98f56787840313f0b Author: Stefano Garzarella Date: Wed Nov 9 11:25:02 2022 +0100 vringh: fix range used in iotlb_translate() vhost_iotlb_itree_first() requires `start` and `last` parameters to search for a mapping that overlaps the range. In iotlb_translate() we cyclically call vhost_iotlb_itree_first(), incrementing `addr` by the amount already translated, so rightly we move the `start` parameter passed to vhost_iotlb_itree_first(), but we should hold the `last` parameter constant. Let's fix it by saving the `last` parameter value before incrementing `addr` in the loop. Fixes: 9ad9c49cfe97 ("vringh: IOTLB support") Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Message-Id: <20221109102503.18816-2-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/vhost/vringh.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7a4efe182ca61fb3e5307e69b261c57cbf434cd4 Author: Yuan Can Date: Tue Nov 8 10:17:05 2022 +0000 vhost/vsock: Fix error handling in vhost_vsock_init() A problem about modprobe vhost_vsock failed is triggered with the following log given: modprobe: ERROR: could not insert 'vhost_vsock': Device or resource busy The reason is that vhost_vsock_init() returns misc_register() directly without checking its return value, if misc_register() failed, it returns without calling vsock_core_unregister() on vhost_transport, resulting the vhost_vsock can never be installed later. A simple call graph is shown as below: vhost_vsock_init() vsock_core_register() # register vhost_transport misc_register() device_create_with_groups() device_create_groups_vargs() dev = kzalloc(...) # OOM happened # return without unregister vhost_transport Fix by calling vsock_core_unregister() when misc_register() returns error. Fixes: 433fc58e6bf2 ("VSOCK: Introduce vhost_vsock.ko") Signed-off-by: Yuan Can Message-Id: <20221108101705.45981-1-yuancan@huawei.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella Acked-by: Jason Wang drivers/vhost/vsock.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit aeca7ff254843d49a8739f07f7dab1341450111d Author: ruanjinjie Date: Thu Nov 10 16:23:48 2022 +0800 vdpa_sim: fix possible memory leak in vdpasim_net_init() and vdpasim_blk_init() Inject fault while probing module, if device_register() fails in vdpasim_net_init() or vdpasim_blk_init(), but the refcount of kobject is not decreased to 0, the name allocated in dev_set_name() is leaked. Fix this by calling put_device(), so that name can be freed in callback function kobject_cleanup(). (vdpa_sim_net) unreferenced object 0xffff88807eebc370 (size 16): comm "modprobe", pid 3848, jiffies 4362982860 (age 18.153s) hex dump (first 16 bytes): 76 64 70 61 73 69 6d 5f 6e 65 74 00 6b 6b 6b a5 vdpasim_net.kkk. backtrace: [] __kmalloc_node_track_caller+0x4e/0x150 [] kstrdup+0x33/0x60 [] kobject_set_name_vargs+0x41/0x110 [] dev_set_name+0xab/0xe0 [] device_add+0xe3/0x1a80 [] 0xffffffffa0270013 [] do_one_initcall+0x87/0x2e0 [] do_init_module+0x1ab/0x640 [] load_module+0x5d00/0x77f0 [] __do_sys_finit_module+0x110/0x1b0 [] do_syscall_64+0x35/0x80 [] entry_SYSCALL_64_after_hwframe+0x46/0xb0 (vdpa_sim_blk) unreferenced object 0xffff8881070c1250 (size 16): comm "modprobe", pid 6844, jiffies 4364069319 (age 17.572s) hex dump (first 16 bytes): 76 64 70 61 73 69 6d 5f 62 6c 6b 00 6b 6b 6b a5 vdpasim_blk.kkk. backtrace: [] __kmalloc_node_track_caller+0x4e/0x150 [] kstrdup+0x33/0x60 [] kobject_set_name_vargs+0x41/0x110 [] dev_set_name+0xab/0xe0 [] device_add+0xe3/0x1a80 [] 0xffffffffa0220013 [] do_one_initcall+0x87/0x2e0 [] do_init_module+0x1ab/0x640 [] load_module+0x5d00/0x77f0 [] __do_sys_finit_module+0x110/0x1b0 [] do_syscall_64+0x35/0x80 [] entry_SYSCALL_64_after_hwframe+0x46/0xb0 Fixes: 899c4d187f6a ("vdpa_sim_blk: add support for vdpa management tool") Fixes: a3c06ae158dd ("vdpa_sim_net: Add support for user supported devices") Signed-off-by: ruanjinjie Reviewed-by: Stefano Garzarella Message-Id: <20221110082348.4105476-1-ruanjinjie@huawei.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 4 +++- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 75e4ab9735a5a70612dd06461ca372b897bf371c Author: Shaomin Deng Date: Sat Nov 5 11:51:51 2022 -0400 tools: Delete the unneeded semicolon after curly braces Unneeded semicolon after curly braces, so delete it. Signed-off-by: Shaomin Deng Message-Id: <20221105155151.12155-1-dengshaomin@cdjrlc.com> Signed-off-by: Michael S. Tsirkin tools/virtio/virtio-trace/trace-agent-ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b66ead2d0ecac00c3a06a6218af5411cb5fcb5d5 Author: Angus Chen Date: Tue Nov 1 19:16:54 2022 +0800 virtio_pci: modify ENOENT to EINVAL Virtio_crypto use max_data_queues+1 to setup vqs, we use vp_modern_get_num_queues to protect the vq range in setup_vq. We could enter index >= vp_modern_get_num_queues(mdev) in setup_vq if common->num_queues is not set well,and it return -ENOENT. It is better to use -EINVAL instead. Signed-off-by: Angus Chen Message-Id: <20221101111655.1947-1-angus.chen@jaguarmicro.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_modern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9f0a19ff7700cc8a30db2496f40d18490dcb9df Author: Colin Ian King Date: Mon Oct 24 14:37:56 2022 +0100 RDMA/mlx5: remove variable i Variable i is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Message-Id: <20221024133756.2158497-1-colin.i.king@gmail.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/mlx5/core/mr.c | 2 -- 1 file changed, 2 deletions(-) commit b9d978a89296c57fbbbd8ea647c303ce4d37028f Author: Shaoqin Huang Date: Thu Oct 20 23:27:34 2022 -0700 virtio_ring: use helper function is_power_of_2() Use helper function is_power_of_2() to check if num is power of two. Minor readability improvement. Signed-off-by: Shaoqin Huang Message-Id: <20221021062734.228881-3-shaoqin.huang@intel.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Xuan Zhuo drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 344686136d73501a18a9621de690ff7824a3d129 Author: Shaoqin Huang Date: Thu Oct 20 23:27:33 2022 -0700 virtio_pci: use helper function is_power_of_2() Use helper function is_power_of_2() to check if num is power of two. Minor readability improvement. Signed-off-by: Shaoqin Huang Message-Id: <20221021062734.228881-2-shaoqin.huang@intel.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Xuan Zhuo drivers/virtio/virtio_pci_modern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38fc462f57ef4e5dc722bab6824854b105de8aa2 Author: Eli Cohen Date: Mon Nov 14 15:17:56 2022 +0200 vdpa/mlx5: Avoid overwriting CVQ iotlb When qemu uses different address spaces for data and control virtqueues, the current code would overwrite the control virtqueue iotlb through the dup_iotlb call. Fix this by referring to the address space identifier and the group to asid mapping to determine which mapping needs to be updated. We also move the address space logic from mlx5 net to core directory. Reported-by: Eugenio Pérez Signed-off-by: Eli Cohen Message-Id: <20221114131759.57883-6-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Acked-by: Eugenio Pérez drivers/vdpa/mlx5/core/mlx5_vdpa.h | 5 ++-- drivers/vdpa/mlx5/core/mr.c | 44 ++++++++++++++++++++-------------- drivers/vdpa/mlx5/net/mlx5_vnet.c | 49 ++++++++------------------------------ 3 files changed, 39 insertions(+), 59 deletions(-) commit 0dbc1b4ae07d003b2e88ba9d4142846320f8e349 Author: Eli Cohen Date: Mon Nov 14 15:17:55 2022 +0200 vdpa/mlx5: Avoid using reslock in event_handler event_handler runs under atomic context and may not acquire reslock. We can still guarantee that the handler won't be called after suspend by clearing nb_registered, unregistering the handler and flushing the workqueue. Signed-off-by: Eli Cohen Message-Id: <20221114131759.57883-5-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/mlx5/net/mlx5_vnet.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 1ab53760d322c82fb4cb5e81b5817065801e3ec4 Author: Eli Cohen Date: Mon Nov 14 15:17:54 2022 +0200 vdpa/mlx5: Fix wrong mac address deletion Delete the old MAC from the table and not the new one which is not there yet. Fixes: baf2ad3f6a98 ("vdpa/mlx5: Add RX MAC VLAN filter support") Acked-by: Jason Wang Signed-off-by: Eli Cohen Message-Id: <20221114131759.57883-4-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5aec804936bbff182081f1cdc271fcb76af1a4ff Author: Eli Cohen Date: Mon Nov 14 15:17:53 2022 +0200 vdpa/mlx5: Return error on vlan ctrl commands if not supported Check if VIRTIO_NET_F_CTRL_VLAN is negotiated and return error if control VQ command is received. Signed-off-by: Eli Cohen Message-Id: <20221114131759.57883-3-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Acked-by: Eugenio Pérez drivers/vdpa/mlx5/net/mlx5_vnet.c | 3 +++ 1 file changed, 3 insertions(+) commit a6ce72c0fb6041f9871f880b2d02b294f7f49cb4 Author: Eli Cohen Date: Mon Nov 14 15:17:52 2022 +0200 vdpa/mlx5: Fix rule forwarding VLAN to TIR Set the VLAN id to the header values field instead of overwriting the headers criteria field. Before this fix, VLAN filtering would not really work and tagged packets would be forwarded unfiltered to the TIR. Fixes: baf2ad3f6a98 ("vdpa/mlx5: Add RX MAC VLAN filter support") Acked-by: Jason Wang Signed-off-by: Eli Cohen Message-Id: <20221114131759.57883-2-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/mlx5/net/mlx5_vnet.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2de5bba5890f6604a997c75e754df8082386c9f7 Author: Arnd Bergmann Date: Thu Dec 15 17:57:20 2022 +0100 usb: fotg210: fix OTG-only build The fotg210 module combines the HCD and OTG drivers, which then fails to build when only the USB gadget support is enabled in the kernel but host support is not: aarch64-linux-ld: drivers/usb/fotg210/fotg210-core.o: in function `fotg210_init': fotg210-core.c:(.init.text+0xc): undefined reference to `usb_disabled' Move the check for usb_disabled() after the check for the HCD module, and let the OTG driver still be probed in this configuration. A nicer approach might be to have the common portion built as a library module, with the two platform other files registering their own platform_driver instances separately. Fixes: ddacd6ef44ca ("usb: fotg210: Fix Kconfig for USB host modules") Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20221215165728.2062984-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/fotg210-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b659b613cea2ae39746ca8bd2b69d1985dd9d770 Author: Ferry Toth Date: Thu Dec 22 21:53:02 2022 +0100 Revert "usb: ulpi: defer ulpi_register on ulpi_read_id timeout" This reverts commit 8a7b31d545d3a15f0e6f5984ae16f0ca4fd76aac. This patch results in some qemu test failures, specifically xilinx-zynq-a9 machine and zynq-zc702 as well as zynq-zed devicetree files, when trying to boot from USB drive. Link: https://lore.kernel.org/lkml/20221220194334.GA942039@roeck-us.net/ Fixes: 8a7b31d545d3 ("usb: ulpi: defer ulpi_register on ulpi_read_id timeout") Cc: stable@vger.kernel.org Reported-by: Guenter Roeck Signed-off-by: Ferry Toth Link: https://lore.kernel.org/r/20221222205302.45761-1-ftoth@exalondelft.nl Signed-off-by: Greg Kroah-Hartman drivers/usb/common/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ac718cc0e36ef4046e2d6349727fecddc13ab9c Merge: 3ec3ebec7c76 a056ebcc30e2 Author: David S. Miller Date: Wed Dec 28 10:16:57 2022 +0000 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes This series fixes a devlink bug and several XDP related bugs. The devlink bug causes a kernel crash on VF devices. The XDP driver patches fix and clean up the RX XDP path and re-enable header-data split that was disabled by mistake when adding the XDP multi-buffer support. ==================== Signed-off-by: David S. Miller commit a056ebcc30e2f78451d66f615d2f6bdada3e6438 Author: Michael Chan Date: Mon Dec 26 22:19:40 2022 -0500 bnxt_en: Fix HDS and jumbo thresholds for RX packets The recent XDP multi-buffer feature has introduced regressions in the setting of HDS and jumbo thresholds. HDS was accidentally disabled in the nornmal mode without XDP. This patch restores jumbo HDS placement when not in XDP mode. In XDP multi-buffer mode, HDS should be disabled and the jumbo threshold should be set to the usable page size in the first page buffer. Fixes: 32861236190b ("bnxt: change receive ring space parameters") Reviewed-by: Mohammad Shuab Siddique Reviewed-by: Ajit Khaparde Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1abeacc1979fa4a756695f5030791d8f0fa934b9 Author: Michael Chan Date: Mon Dec 26 22:19:39 2022 -0500 bnxt_en: Fix first buffer size calculations for XDP multi-buffer The size of the first buffer is always page size, and the useable space is the page size minus the offset and the skb_shared_info size. Make sure SKB and XDP buf sizes match so that the skb_shared_info is at the same offset seen from the SKB and XDP_BUF. build_skb() should be passed PAGE_SIZE. xdp_init_buff() should be passed PAGE_SIZE as well. xdp_get_shared_info_from_buff() will automatically deduct the skb_shared_info size if the XDP buffer has frags. There is no need to keep bp->xdp_has_frags. Change BNXT_PAGE_MODE_BUF_SIZE to BNXT_MAX_PAGE_MODE_MTU_SBUF since this constant is really the MTU with ethernet header size subtracted. Also fix the BNXT_MAX_PAGE_MODE_MTU macro with proper parentheses. Fixes: 32861236190b ("bnxt: change receive ring space parameters") Reviewed-by: Somnath Kotur Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++++---- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 15 +++++++++++---- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 7 +------ 3 files changed, 17 insertions(+), 14 deletions(-) commit 9b3e607871ea5ee90f10f5be3965fc07f2aa3ef7 Author: Michael Chan Date: Mon Dec 26 22:19:38 2022 -0500 bnxt_en: Fix XDP RX path The XDP program can change the starting address of the RX data buffer and this information needs to be passed back from bnxt_rx_xdp() to bnxt_rx_pkt() for the XDP_PASS case so that the SKB can point correctly to the modified buffer address. Add back the data_ptr parameter to bnxt_rx_xdp() to make this work. Fixes: b231c3f3414c ("bnxt: refactor bnxt_rx_xdp to separate xdp_init_buff/xdp_prepare_buff") Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 7 +++++-- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) commit bbfc17e50ba2ed18dfef46b1c433d50a58566bf1 Author: Michael Chan Date: Mon Dec 26 22:19:37 2022 -0500 bnxt_en: Simplify bnxt_xdp_buff_init() bnxt_xdp_buff_init() does not modify the data_ptr or the len parameters, so no need to pass in the addresses of these parameters. Fixes: b231c3f3414c ("bnxt: refactor bnxt_rx_xdp to separate xdp_init_buff/xdp_prepare_buff") Reviewed-by: Andy Gospodarek Reviewed-by: Somnath Kotur Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 6 +++--- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 0020ae2a4aa81becd182231bf48acd66c86c86dd Author: Vikas Gupta Date: Mon Dec 26 22:19:36 2022 -0500 bnxt_en: fix devlink port registration to netdev We don't register a devlink port in case of a VF so avoid setting the devlink pointer to netdev. Also, SET_NETDEV_DEVLINK_PORT has to be moved so that we determine whether the device is PF/VF first. This fixes the NULL pointer dereference of devlink_port->devlink when creating VFs: BUG: kernel NULL pointer dereference, address: 0000000000000160 PGD 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 14 PID: 388 Comm: kworker/14:1 Kdump: loaded Not tainted 6.1.0-rc8 #5 Hardware name: Dell Inc. PowerEdge R750/06V45N, BIOS 1.3.8 08/31/2021 Workqueue: events work_for_cpu_fn RIP: 0010:devlink_nl_port_handle_size+0xb/0x50 Code: 83 c4 10 5b 5d c3 cc cc cc cc b8 a6 ff ff ff eb de e8 c9 59 21 00 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 53 48 8b 47 20 <48> 8b a8 60 01 00 00 48 8b 45 60 48 8b 38 e8 92 90 1a 00 48 8b 7d RSP: 0018:ff4fe5394846fcd8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000794 RCX: 0000000000000000 RDX: ff1f129683a30a40 RSI: 0000000000000008 RDI: ff1f1296bb496188 RBP: 0000000000000334 R08: 0000000000000cc0 R09: 0000000000000000 R10: ff1f1296bb494298 R11: ffffffffffffffc0 R12: 0000000000000000 R13: 0000000000000000 R14: ff1f1296bb494000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ff1f129e5fa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000160 CR3: 000000131f610006 CR4: 0000000000771ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: if_nlmsg_size+0x14a/0x220 rtmsg_ifinfo_build_skb+0x3c/0x100 rtmsg_ifinfo+0x9c/0xc0 register_netdevice+0x59d/0x670 register_netdev+0x1c/0x40 bnxt_init_one+0x674/0xa60 [bnxt_en] local_pci_probe+0x42/0x80 work_for_cpu_fn+0x13/0x20 process_one_work+0x1e2/0x3b0 ? rescuer_thread+0x390/0x390 worker_thread+0x1c4/0x3a0 ? rescuer_thread+0x390/0x390 kthread+0xd6/0x100 ? kthread_complete_and_exit+0x20/0x20 Fixes: ac73d4bf2cda ("net: make drivers to use SET_NETDEV_DEVLINK_PORT to set devlink_port") Cc: Jiri Pirko Signed-off-by: Vikas Gupta Reviewed-by: Andy Gospodarek Reviewed-by: Kalesh Anakkur Purayil Reviewed-by: Damodharam Ammepalli Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3ec3ebec7c767e6d19768cb262663645b3506c0b Merge: 81852018f240 bd2adfe3b3b8 Author: David S. Miller Date: Wed Dec 28 10:09:50 2022 +0000 Merge branch 'rswitch-fixes' Yoshihiro Shimoda says: ==================== net: ethernet: renesas: rswitch: Fix minor issues This patch series is based on v6.2-rc2. ==================== Signed-off-by: David S. Miller commit bd2adfe3b3b863c883309bcc915f13c831ca88da Author: Yoshihiro Shimoda Date: Mon Dec 26 16:13:28 2022 +0900 net: ethernet: renesas: rswitch: Fix getting mac address from device tree To get mac address from device tree which is from each ethernet-port, fix the first argument of of_get_ethdev_address(). Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller drivers/net/ethernet/renesas/rswitch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8e6a8d7a3dd93e93645be061692cb4ee6702dff0 Author: Yoshihiro Shimoda Date: Mon Dec 26 16:13:27 2022 +0900 net: ethernet: renesas: rswitch: Fix error path in renesas_eth_sw_probe() If rswitch_init() returns non-zero and this driver is re-probed, the following error happens: renesas_eth_sw e6880000.ethernet: Unbalanced pm_runtime_enable! So, fix error path in renesas_eth_sw_probe(). Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller drivers/net/ethernet/renesas/rswitch.c | 5 +++++ 1 file changed, 5 insertions(+) commit 258896fcc786b4e7db238eba26f6dd080e0ff41e Author: Dmitry Fomichev Date: Sat Oct 15 23:41:26 2022 -0400 virtio-blk: use a helper to handle request queuing errors Define a new helper function, virtblk_fail_to_queue(), to clean up the error handling code in virtio_queue_rq(). Signed-off-by: Dmitry Fomichev Message-Id: <20221016034127.330942-2-dmitry.fomichev@wdc.com> Signed-off-by: Michael S. Tsirkin drivers/block/virtio_blk.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit c262f75cb6bb5a63828e72ce3b8fe808e5029479 Author: Ricardo Cañuelo Date: Wed Oct 12 08:29:49 2022 +0200 tools/virtio: initialize spinlocks in vring_test.c The virtio_device vqs_list spinlocks must be initialized before use to prevent functions that manipulate the device virtualqueues, such as vring_new_virtqueue(), from blocking indefinitely. Signed-off-by: Ricardo Cañuelo Message-Id: <20221012062949.1526176-1-ricardo.canuelo@collabora.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Xuan Zhuo tools/virtio/vringh_test.c | 2 ++ 1 file changed, 2 insertions(+) commit b9e05399d9273c8c066e73db1e6e85364003030c Author: Si-Wei Liu Date: Mon Oct 10 10:27:03 2022 -0700 vdpa: merge functionally duplicated dev_features attributes We can merge VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES with VDPA_ATTR_DEV_FEATURES which is functionally equivalent. While at it, tweak the comment in header file to make user provioned device features distinguished from those supported by the parent mgmtdev device: the former of which can be inherited as a whole from the latter, or can be a subset of the latter if explicitly specified. Signed-off-by: Si-Wei Liu Message-Id: <1665422823-18364-1-git-send-email-si-wei.liu@oracle.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vdpa/vdpa.c | 2 +- include/uapi/linux/vdpa.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit 81852018f240f9382f5fab3582de0a42cd059d08 Merge: 0e50d999903c ff249be5cca9 Author: David S. Miller Date: Wed Dec 28 10:06:06 2022 +0000 Merge branch 'netdev-doc-defaq' Jakub Kicinski says: ==================== netdev doc de-FAQization We have outgrown the FAQ format for our process doc. I often find myself struggling to locate information in this doc, because the questions do not serve well as section headers. Reformat the document. v2: update the headers v1: https://lore.kernel.org/all/20221221184007.1170384-1-kuba@kernel.org/ ==================== Signed-off-by: David S. Miller commit ff249be5cca9f982e58936847ba6c30104abbcad Author: Jakub Kicinski Date: Thu Dec 22 11:22:48 2022 -0800 docs: netdev: convert to a non-FAQ document The netdev-FAQ document has grown over the years to the point where finding information in it is somewhat challenging. The length of the questions prevents readers from locating content that's relevant at a glance. Convert to a more standard documentation format with sections and sub-sections rather than questions and answers. The content edits are limited to what's necessary to change the format, and very minor clarifications. Reviewed-by: Randy Dunlap Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Documentation/process/maintainer-netdev.rst | 221 ++++++++++++++++------------ 1 file changed, 125 insertions(+), 96 deletions(-) commit f4ef681115f822daf7f36f8b1892d9f1e1a26fbf Author: Jakub Kicinski Date: Thu Dec 22 11:22:47 2022 -0800 docs: netdev: reshuffle sections in prep for de-FAQization Subsequent changes will reformat the doc away from FAQ. To make that more readable perform the pure section moves now. Reviewed-by: Randy Dunlap Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Documentation/process/maintainer-netdev.rst | 186 ++++++++++++++-------------- 1 file changed, 93 insertions(+), 93 deletions(-) commit 0e50d999903c009b6a9cd2277c82d6798d982e31 Author: David Howells Date: Sat Dec 24 14:49:00 2022 +0000 rxrpc: Fix a couple of potential use-after-frees At the end of rxrpc_recvmsg(), if a call is found, the call is put and then a trace line is emitted referencing that call in a couple of places - but the call may have been deallocated by the time those traces happen. Fix this by stashing the call debug_id in a variable and passing that to the tracepoint rather than the call pointer. Fixes: 849979051cbc ("rxrpc: Add a tracepoint to follow what recvmsg does") Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Signed-off-by: David S. Miller include/trace/events/rxrpc.h | 6 +++--- net/rxrpc/recvmsg.c | 14 ++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) commit 6b90032c73405cd4da29ab914df11fd1be960b99 Author: Xu Panda Date: Wed Dec 28 09:44:11 2022 +0800 fbdev: atyfb: 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: Helge Deller drivers/video/fbdev/aty/atyfb_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8d8cf163c8d8c93bccf0c70a133309693af9bf61 Author: Xu Panda Date: Wed Dec 28 09:40:01 2022 +0800 fbdev: omapfb: 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: Helge Deller drivers/video/fbdev/omap/omapfb_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 25e8ac233d24051e2c4ff64c34f60609b0988568 Author: Vijaya Krishna Nivarthi Date: Fri Dec 16 23:08:13 2022 +0530 dmaengine: qcom: gpi: Set link_rx bit on GO TRE for rx operation Rx operation on SPI GSI DMA is currently not working. As per GSI spec, link_rx bit is to be set on GO TRE on tx channel whenever there is going to be a DMA TRE on rx channel. This is currently set for duplex operation only. Set the bit for rx operation as well. This is part of changes required to bring up Rx. Fixes: 94b8f0e58fa1 ("dmaengine: qcom: gpi: set chain and link flag for duplex") Signed-off-by: Vijaya Krishna Nivarthi Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/1671212293-14767-1-git-send-email-quic_vnivarth@quicinc.com Signed-off-by: Vinod Koul drivers/dma/qcom/gpi.c | 1 + 1 file changed, 1 insertion(+) commit 22c7e1a0fa45cd7d028d6b4117161fd0e3427fe0 Author: Dominik Kobinski Date: Sun Dec 11 11:05:01 2022 +0100 arm64: dts: msm8992-bullhead: add memory hole region Add region for memory hole present on bullhead in order to fix a reboot issue on recent kernels Reported-by: Petr Vorel Signed-off-by: Dominik Kobinski Reviewed-by: Konrad Dybcio Tested-by: Petr Vorel Reviewed-by: Petr Vorel Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221211100501.82323-1-dominikkobinski314@gmail.com arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 4164843261d28f86910a5c2727faddce066334c5 Author: Christophe JAILLET Date: Tue Dec 13 07:15:33 2022 +0100 drm/msm/hdmi: Fix the error handling path of msm_hdmi_dev_probe() If an error occurs after a successful msm_hdmi_get_phy() call, it must be undone by a corresponding msm_hdmi_put_phy(), as already done in the remove function. Fixes: 437365464043 ("drm/msm/hdmi: move msm_hdmi_get_phy() to msm_hdmi_dev_probe()") Signed-off-by: Christophe JAILLET Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/514847/ Link: https://lore.kernel.org/r/b3f9da097851e2e42a40dc61458aa98c41c88d0d.1670741386.git.christophe.jaillet@wanadoo.fr Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/hdmi/hdmi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 45dac1352b55b1d8cb17f218936b2bc2bc1fb4ee Author: Miaoqian Lin Date: Wed Dec 7 10:59:22 2022 +0400 drm/msm/dpu: Fix memory leak in msm_mdss_parse_data_bus_icc_path of_icc_get() alloc resources for path1, we should release it when not need anymore. Early return when IS_ERR_OR_NULL(path0) may leak path1. Defer getting path1 to fix this. Fixes: b9364eed9232 ("drm/msm/dpu: Move min BW request and full BW disable back to mdss") Signed-off-by: Miaoqian Lin Reviewed-by: Douglas Anderson Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/514264/ Link: https://lore.kernel.org/r/20221207065922.2086368-1-linmq006@gmail.com Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/msm_mdss.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e5266ca38294c6eba48f5c9cd3d0402d619d7c05 Author: Adam Skladowski Date: Wed Nov 30 21:09:39 2022 +0100 dt-bindings: display: msm: Rename mdss node name in example Follow other YAMLs and replace mdss name into display-subystem. Signed-off-by: Adam Skladowski Acked-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Fixes: b93bdff44a85 ("dt-bindings: display/msm: add support for SM6115") Fixes: 06097b13ef97 ("dt-bindings: display/msm: split dpu-qcm2290 into DPU and MDSS parts") Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/513585/ Link: https://lore.kernel.org/r/20221130200950.144618-2-a39.skl@gmail.com Signed-off-by: Abhinav Kumar Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml | 2 +- Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ef11cb7a29c0e13031c968190ea8f86104e7fb6a Author: Konrad Dybcio Date: Wed Nov 16 17:32:18 2022 +0100 dt-bindings: msm/dsi: Don't require vdds-supply on 10nm PHY On some SoCs (hello SM6350) 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: Rob Herring Fixes: 8fc939e72ff8 ("dt-bindings: msm: dsi: add yaml schemas for DSI PHY bindings") Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/511889/ Link: https://lore.kernel.org/r/20221116163218.42449-1-konrad.dybcio@linaro.org Signed-off-by: Abhinav Kumar Documentation/devicetree/bindings/display/msm/dsi-phy-10nm.yaml | 1 - 1 file changed, 1 deletion(-) commit a2117773c839a8439a3771e0c040b5c505b083a7 Author: Konrad Dybcio Date: Wed Nov 30 14:58:07 2022 +0100 dt-bindings: msm/dsi: Don't require vcca-supply on 14nm PHY On some SoCs (hello SM6115) vcca-supply is not wired to any smd-rpm or rpmh regulator, but instead powered by the VDD_MX line, which is voted for in the DSI ctrl node. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Fixes: 8fc939e72ff8 ("dt-bindings: msm: dsi: add yaml schemas for DSI PHY bindings") Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/513555/ Link: https://lore.kernel.org/r/20221130135807.45028-1-konrad.dybcio@linaro.org Signed-off-by: Abhinav Kumar Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml | 1 - 1 file changed, 1 deletion(-) commit 1bdeb321d1f856346fe0078af09c9e7ffbd2ca7a Author: Yang Li Date: Tue Nov 15 09:49:02 2022 +0800 drm/msm/dpu: Fix some kernel-doc comments Make the description of @init to @p in dpu_encoder_phys_wb_init() and remove @wb_roi in dpu_encoder_phys_wb_setup_fb() to clear the below warnings: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c:139: warning: Excess function parameter 'wb_roi' description in 'dpu_encoder_phys_wb_setup_fb' drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c:699: warning: Function parameter or member 'p' not described in 'dpu_encoder_phys_wb_init' drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c:699: warning: Excess function parameter 'init' description in 'dpu_encoder_phys_wb_init' Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3067 Reported-by: Abaci Robot Signed-off-by: Yang Li Fixes: d7d0e73f7de3 ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback") Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/511605/ Link: https://lore.kernel.org/r/20221115014902.45240-1-yang.lee@linux.alibaba.com Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9d8b5376cc2848ca22314fdec9a7a45b1bf69189 Author: Randy Dunlap Date: Fri Nov 25 16:04:01 2022 -0800 fbdev: make offb driver tristate Make the offb (Open Firmware frame buffer) driver tristate, i.e., so that it can be built as a loadable module. However, it still depends on the setting of DRM_OFDRM so that both of these drivers cannot be builtin at the same time nor can one be builtin and the other one a loadable module. Build-tested successfully with all combination of DRM_OFDRM and FB_OF. This fixes a build issue that Michal reported when FB_OF=y and DRM_OFDRM=m: powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect' powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea' powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit' Signed-off-by: Randy Dunlap Suggested-by: Arnd Bergmann Cc: Masahiro Yamada Cc: Thomas Zimmermann Cc: Michal Suchánek Cc: linuxppc-dev@lists.ozlabs.org Cc: Daniel Vetter Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Acked-by: Thomas Zimmermann Signed-off-by: Helge Deller drivers/video/fbdev/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74ad47c9cecf12e647061107d9f3858d82e0e5c5 Merge: 1b929c02afd3 02228f6aa6a6 Author: Mark Brown Date: Tue Dec 27 17:42:08 2022 +0000 regulator: Merge up forgotten fix I forgot to send this fix during the 6.1 cycle, make sure it gets sent for 6.2. commit 721c0d68c0f882b6358102b52961ff6eb601839c Author: Johan Hovold Date: Mon Nov 21 09:50:58 2022 +0100 arm64: dts: qcom: sc8280xp: fix USB-DP PHY nodes Update the USB4-USB3-DP QMP PHY nodes to match the new binding which specifically includes the missing register regions (e.g. DP_PHY) and allows for supporting DisplayPort Alternate Mode. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221121085058.31213-16-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 77 ++++++++++------------------------ 1 file changed, 23 insertions(+), 54 deletions(-) commit ee4e530bdde29a69c58656a919545251a782674e Author: Johan Hovold Date: Mon Nov 21 09:50:57 2022 +0100 arm64: dts: qcom: sc8280xp: fix primary USB-DP PHY reset The vendor kernel is using the GCC_USB4_DP_PHY_PRIM_BCR and GCC_USB4_1_DP_PHY_PRIM_BCR resets for the USB4-USB3-DP QMP PHYs. Update the primary USB-DP PHY node to match. Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221121085058.31213-15-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eb803402a2a83400c6c6afd900e3b7c87c06816 Author: Stefan Metzmacher Date: Wed Nov 16 21:25:24 2022 +0100 uapi:io_uring.h: allow linux/time_types.h to be skipped include/uapi/linux/io_uring.h is synced 1:1 into liburing:src/include/liburing/io_uring.h. liburing has a configure check to detect the need for linux/time_types.h. It can opt-out by defining UAPI_LINUX_IO_URING_H_SKIP_LINUX_TIME_TYPES_H Fixes: 78a861b94959 ("io_uring: add sync cancelation API through io_uring_register()") Link: https://github.com/axboe/liburing/issues/708 Link: https://github.com/axboe/liburing/pull/709 Link: https://lore.kernel.org/io-uring/20221115212614.1308132-1-ammar.faizi@intel.com/T/#m9f5dd571cd4f6a5dee84452dbbca3b92ba7a4091 CC: Jens Axboe Cc: Ammar Faizi Signed-off-by: Stefan Metzmacher Reviewed-by: Ammar Faizi Link: https://lore.kernel.org/r/7071a0a1d751221538b20b63f9160094fc7e06f4.1668630247.git.metze@samba.org Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit b1e9c223736b1471287f0ac46a368676c3bd7727 Author: Ricardo Ribalda Date: Sun Dec 25 09:37:12 2022 +0100 spi: mediatek: Enable irq before the spi registration If the irq is enabled after the spi si registered, there can be a race with the initialization of the devices on the spi bus. Eg: mtk-spi 1100a000.spi: spi-mem transfer timeout spi-nor: probe of spi0.0 failed with error -110 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 ... Call trace: mtk_spi_can_dma+0x0/0x2c Fixes: c6f7874687f7 ("spi: mediatek: Enable irq when pdata is ready") Reported-by: Daniel Golle Signed-off-by: Ricardo Ribalda Tested-by: Daniel Golle Link: https://lore.kernel.org/r/20221225-mtk-spi-fixes-v1-0-bb6c14c232f8@chromium.org Signed-off-by: Mark Brown drivers/spi/spi-mt65xx.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 94cd8fa09f5f1ebdd4e90964b08b7f2cc4b36c43 Author: Mathieu Desnoyers Date: Wed Dec 14 17:20:08 2022 -0500 futex: Fix futex_waitv() hrtimer debug object leak on kcalloc error In a scenario where kcalloc() fails to allocate memory, the futex_waitv system call immediately returns -ENOMEM without invoking destroy_hrtimer_on_stack(). When CONFIG_DEBUG_OBJECTS_TIMERS=y, this results in leaking a timer debug object. Fixes: bf69bad38cf6 ("futex: Implement sys_futex_waitv()") Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Davidlohr Bueso Cc: stable@vger.kernel.org Cc: stable@vger.kernel.org # v5.16+ Link: https://lore.kernel.org/r/20221214222008.200393-1-mathieu.desnoyers@efficios.com kernel/futex/syscalls.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 63dc6325ff41ee9e570bde705ac34a39c5dbeb44 Author: Masami Hiramatsu (Google) Date: Mon Dec 19 23:35:19 2022 +0900 x86/kprobes: Fix optprobe optimization check with CONFIG_RETHUNK Since the CONFIG_RETHUNK and CONFIG_SLS will use INT3 for stopping speculative execution after function return, kprobe jump optimization always fails on the functions with such INT3 inside the function body. (It already checks the INT3 padding between functions, but not inside the function) To avoid this issue, as same as kprobes, check whether the INT3 comes from kgdb or not, and if so, stop decoding and make it fail. The other INT3 will come from CONFIG_RETHUNK/CONFIG_SLS and those can be treated as a one-byte instruction. Fixes: e463a09af2f0 ("x86: Add straight-line-speculation mitigation") Suggested-by: Peter Zijlstra Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/167146051929.1374301.7419382929328081706.stgit@devnote3 arch/x86/kernel/kprobes/opt.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit 1993bf97992df2d560287f3c4120eda57426843d Author: Masami Hiramatsu (Google) Date: Mon Dec 19 23:35:10 2022 +0900 x86/kprobes: Fix kprobes instruction boudary check with CONFIG_RETHUNK Since the CONFIG_RETHUNK and CONFIG_SLS will use INT3 for stopping speculative execution after RET instruction, kprobes always failes to check the probed instruction boundary by decoding the function body if the probed address is after such sequence. (Note that some conditional code blocks will be placed after function return, if compiler decides it is not on the hot path.) This is because kprobes expects kgdb puts the INT3 as a software breakpoint and it will replace the original instruction. But these INT3 are not such purpose, it doesn't need to recover the original instruction. To avoid this issue, kprobes checks whether the INT3 is owned by kgdb or not, and if so, stop decoding and make it fail. The other INT3 will come from CONFIG_RETHUNK/CONFIG_SLS and those can be treated as a one-byte instruction. Fixes: e463a09af2f0 ("x86: Add straight-line-speculation mitigation") Suggested-by: Peter Zijlstra Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/167146051026.1374301.392728975473572291.stgit@devnote3 arch/x86/kernel/kprobes/core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit ade8c20847fcc3f4de08b35f730ec04ef29ddbdc Author: Arnd Bergmann Date: Thu Dec 15 17:43:23 2022 +0100 x86/calldepth: Fix incorrect init section references The addition of callthunks_translate_call_dest means that skip_addr() and patch_dest() can no longer be discarded as part of the __init section freeing: WARNING: modpost: vmlinux.o: section mismatch in reference: callthunks_translate_call_dest.cold (section: .text.unlikely) -> skip_addr (section: .init.text) WARNING: modpost: vmlinux.o: section mismatch in reference: callthunks_translate_call_dest.cold (section: .text.unlikely) -> patch_dest (section: .init.text) WARNING: modpost: vmlinux.o: section mismatch in reference: is_callthunk.cold (section: .text.unlikely) -> skip_addr (section: .init.text) ERROR: modpost: Section mismatches detected. Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them. Fixes: b2e9dfe54be4 ("x86/bpf: Emit call depth accounting if required") Signed-off-by: Arnd Bergmann Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221215164334.968863-1-arnd@kernel.org arch/x86/kernel/callthunks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a041ebca4956292cadfb14a63ace3a9c1dcb0a3 Author: Namhyung Kim Date: Tue Dec 20 14:31:40 2022 -0800 perf/core: Call LSM hook after copying perf_event_attr It passes the attr struct to the security_perf_event_open() but it's not initialized yet. Fixes: da97e18458fb ("perf_event: Add support for LSM and SELinux checks") Signed-off-by: Namhyung Kim Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Joel Fernandes (Google) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20221220223140.4020470-1-namhyung@kernel.org kernel/events/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a551844e345ba2a1c533dee4b55cb0efddb1bcda Author: Peter Zijlstra Date: Mon Dec 19 15:40:04 2022 +0100 perf: Fix use-after-free in error path The syscall error path has a use-after-free; put_pmu_ctx() will reference ctx, therefore we must ensure ctx is destroyed after pmu_ctx is. Fixes: bd2756811766 ("perf: Rewrite core context handling") Reported-by: syzbot+b8e8c01c8ade4fe6e48f@syzkaller.appspotmail.com Signed-off-by: Peter Zijlstra (Intel) Tested-by: Chengming Zhou Link: https://lkml.kernel.org/r/Y6B3xEgkbmFUCeni@hirez.programming.kicks-ass.net kernel/events/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 08245672cdc6505550d1a5020603b0a8d4a6dcc7 Author: Colin Ian King Date: Fri Dec 2 13:51:49 2022 +0000 perf/x86/amd: fix potential integer overflow on shift of a int The left shift of int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then passed as a 64 bit function argument. In the case where i is 32 or more this can lead to an overflow. Avoid this by shifting using the BIT_ULL macro instead. Fixes: 471af006a747 ("perf/x86/amd: Constrain Large Increment per Cycle events") Signed-off-by: Colin Ian King Signed-off-by: Peter Zijlstra (Intel) Acked-by: Ian Rogers Acked-by: Kim Phillips Link: https://lore.kernel.org/r/20221202135149.1797974-1-colin.i.king@gmail.com arch/x86/events/amd/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f841b682baef90ee144df8b12e2c76aa460717c1 Author: Chengming Zhou Date: Wed Dec 7 20:40:23 2022 +0800 perf/core: Fix cgroup events tracking We encounter perf warnings when using cgroup events like: cd /sys/fs/cgroup mkdir test perf stat -e cycles -a -G test Which then triggers: WARNING: CPU: 0 PID: 690 at kernel/events/core.c:849 perf_cgroup_switch+0xb2/0xc0 Call Trace: __schedule+0x4ae/0x9f0 ? _raw_spin_unlock_irqrestore+0x23/0x40 ? __cond_resched+0x18/0x20 preempt_schedule_common+0x2d/0x70 __cond_resched+0x18/0x20 wait_for_completion+0x2f/0x160 ? cpu_stop_queue_work+0x9e/0x130 affine_move_task+0x18a/0x4f0 WARNING: CPU: 0 PID: 690 at kernel/events/core.c:829 ctx_sched_in+0x1cf/0x1e0 Call Trace: ? ctx_sched_out+0xb7/0x1b0 perf_cgroup_switch+0x88/0xc0 __schedule+0x4ae/0x9f0 ? _raw_spin_unlock_irqrestore+0x23/0x40 ? __cond_resched+0x18/0x20 preempt_schedule_common+0x2d/0x70 __cond_resched+0x18/0x20 wait_for_completion+0x2f/0x160 ? cpu_stop_queue_work+0x9e/0x130 affine_move_task+0x18a/0x4f0 The above two warnings are not complete here since I remove other unimportant information. The problem is caused by the perf cgroup events tracking: CPU0 CPU1 perf_event_open() perf_event_alloc() account_event() account_event_cpu() atomic_inc(perf_cgroup_events) __perf_event_task_sched_out() if (atomic_read(perf_cgroup_events)) perf_cgroup_switch() // kernel/events/core.c:849 WARN_ON_ONCE(cpuctx->ctx.nr_cgroups == 0) if (READ_ONCE(cpuctx->cgrp) == cgrp) // false return perf_ctx_lock() ctx_sched_out() cpuctx->cgrp = cgrp ctx_sched_in() perf_cgroup_set_timestamp() // kernel/events/core.c:829 WARN_ON_ONCE(!ctx->nr_cgroups) perf_ctx_unlock() perf_install_in_context() cpu_function_call() __perf_install_in_context() add_event_to_ctx() list_add_event() perf_cgroup_event_enable() ctx->nr_cgroups++ cpuctx->cgrp = X We can see from above that we wrongly use percpu atomic perf_cgroup_events to check if we need to perf_cgroup_switch(), which should only be used when we know this CPU has cgroup events enabled. The commit bd2756811766 ("perf: Rewrite core context handling") change to have only one context per-CPU, so we can just use cpuctx->cgrp to check if this CPU has cgroup events enabled. So percpu atomic perf_cgroup_events is not needed. Fixes: bd2756811766 ("perf: Rewrite core context handling") Signed-off-by: Chengming Zhou Signed-off-by: Peter Zijlstra (Intel) Tested-by: Ravi Bangoria Link: https://lkml.kernel.org/r/20221207124023.66252-1-zhouchengming@bytedance.com kernel/events/core.c | 42 ++++++++++-------------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) commit e2d371484653ac83b970d3ebcf343383f39f8b6b Author: Ravi Bangoria Date: Fri Nov 18 10:45:39 2022 +0530 perf core: Return error pointer if inherit_event() fails to find pmu_ctx inherit_event() returns NULL only when it finds orphaned events otherwise it returns either valid child_event pointer or an error pointer. Follow the same when it fails to find pmu_ctx. Fixes: bd2756811766 ("perf: Rewrite core context handling") Reported-by: Dan Carpenter Signed-off-by: Ravi Bangoria Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221118051539.820-1-ravi.bangoria@amd.com kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4b7f8febd4d9b615fbec2a06bf352b9c3729b11 Author: Hans de Goede Date: Thu Dec 15 16:43:57 2022 +0100 platform/x86: ideapad-laptop: Add Legion 5 15ARH05 DMI id to set_fn_lock_led_list[] The Lenovo Legion 5 15ARH05 needs ideapad-laptop to call SALS_FNLOCK_ON / SALS_FNLOCK_OFF on Fn-lock state change to get the LED in the Fn key to correctly reflect the Fn-lock state. Add a DMI match for the Legion 5 15ARH05 to the set_fn_lock_led_list[] table for this. Fixes: 81a5603a0f50 ("platform/x86: ideapad-laptop: Fix interrupt storm on fn-lock toggle on some Yoga laptops") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20221215154357.123876-1-hdegoede@redhat.com drivers/platform/x86/ideapad-laptop.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ad75bd85b1db69c97eefea07b375567821f6ef58 Author: Hans de Goede Date: Tue Dec 13 13:29:43 2022 +0100 platform/x86: sony-laptop: Don't turn off 0x153 keyboard backlight during probe The 0x153 version of the kbd backlight control SNC handle has no separate address to probe if the backlight is there. This turns the probe call into a set keyboard backlight call with a value of 0 turning off the keyboard backlight. Skip probing when there is no separate probe address to avoid this. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1583752 Fixes: 800f20170dcf ("Keyboard backlight control for some Vaio Fit models") Signed-off-by: Hans de Goede Reviewed-by: Mattia Dongili Link: https://lore.kernel.org/r/20221213122943.11123-1-hdegoede@redhat.com drivers/platform/x86/sony-laptop.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit af2808906aab0bf5786021d45b3ebfca6f4ad72f Author: David Woodhouse Date: Mon Dec 26 12:03:20 2022 +0000 KVM: x86/xen: Documentation updates and clarifications Most notably, the KVM_XEN_EVTCHN_RESET feature had escaped documentation entirely. Along with how to turn most stuff off on SHUTDOWN_soft_reset. Signed-off-by: David Woodhouse Message-Id: <20221226120320.1125390-6-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit b0305c1e0e27ad91187bc6d5ac3d502799faf239 Author: David Woodhouse Date: Mon Dec 26 12:03:19 2022 +0000 KVM: x86/xen: Add KVM_XEN_INVALID_GPA and KVM_XEN_INVALID_GFN to uapi These are (uint64_t)-1 magic values are a userspace ABI, allowing the shared info pages and other enlightenments to be disabled. This isn't a Xen ABI because Xen doesn't let the guest turn these off except with the full SHUTDOWN_soft_reset mechanism. Under KVM, the userspace VMM is expected to handle soft reset, and tear down the kernel parts of the enlightenments accordingly. Suggested-by: Sean Christopherson Signed-off-by: David Woodhouse Message-Id: <20221226120320.1125390-5-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 14 +++++++------- include/uapi/linux/kvm.h | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) commit 1c14faa5087db0a098c3ab1e183f2b5df4b0d3f2 Author: Michal Luczaj Date: Mon Dec 26 12:03:18 2022 +0000 KVM: x86/xen: Simplify eventfd IOCTLs Port number is validated in kvm_xen_setattr_evtchn(). Remove superfluous checks in kvm_xen_eventfd_assign() and kvm_xen_eventfd_update(). Signed-off-by: Michal Luczaj Message-Id: <20221222203021.1944101-3-mhal@rbox.co> Signed-off-by: Paolo Bonzini Signed-off-by: David Woodhouse Message-Id: <20221226120320.1125390-4-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 70eae03087a3101493d9a1cf60c86c5f65600822 Author: Paolo Bonzini Date: Mon Dec 26 12:03:17 2022 +0000 KVM: x86/xen: Fix SRCU/RCU usage in readers of evtchn_ports The evtchnfd structure itself must be protected by either kvm->lock or SRCU. Use the former in kvm_xen_eventfd_update(), since the lock is being taken anyway; kvm_xen_hcall_evtchn_send() instead is a reader and does not need kvm->lock, and is called in SRCU critical section from the kvm_x86_handle_exit function. It is also important to use rcu_read_{lock,unlock}() in kvm_xen_hcall_evtchn_send(), because idr_remove() will *not* use synchronize_srcu() to wait for readers to complete. Remove a superfluous if (kvm) check before calling synchronize_srcu() in kvm_xen_eventfd_deassign() where kvm has been dereferenced already. Co-developed-by: Michal Luczaj Signed-off-by: Michal Luczaj Signed-off-by: Paolo Bonzini Signed-off-by: David Woodhouse Message-Id: <20221226120320.1125390-3-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 92c58965e9656dc6e682a8ffe520fac0fb256d13 Author: David Woodhouse Date: Mon Dec 26 12:03:16 2022 +0000 KVM: x86/xen: Use kvm_read_guest_virt() instead of open-coding it badly In particular, we shouldn't assume that being contiguous in guest virtual address space means being contiguous in guest *physical* address space. In dropping the manual calls to kvm_mmu_gva_to_gpa_system(), also drop the srcu_read_lock() that was around them. All call sites are reached from kvm_xen_hypercall() which is called from the handle_exit function with the read lock already held. 536395260 ("KVM: x86/xen: handle PV timers oneshot mode") 1a65105a5 ("KVM: x86/xen: handle PV spinlocks slowpath") Fixes: 2fd6df2f2 ("KVM: x86/xen: intercept EVTCHNOP_send from guests") Signed-off-by: David Woodhouse Message-Id: <20221226120320.1125390-2-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 56 ++++++++++++++++++------------------------------------ 1 file changed, 18 insertions(+), 38 deletions(-) commit 385407a69d5140825d4cdab814cbf128ba63a64a Author: Michal Luczaj Date: Mon Dec 26 12:03:15 2022 +0000 KVM: x86/xen: Fix memory leak in kvm_xen_write_hypercall_page() Release page irrespectively of kvm_vcpu_write_guest() return value. Suggested-by: Paul Durrant Fixes: 23200b7a30de ("KVM: x86/xen: intercept xen hypercalls if enabled") Signed-off-by: Michal Luczaj Message-Id: <20221220151454.712165-1-mhal@rbox.co> Reviewed-by: Paul Durrant Signed-off-by: David Woodhouse Message-Id: <20221226120320.1125390-1-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 23e528d9bce2385967370ad95a7d52a3c7a0a016 Author: Sean Christopherson Date: Wed Dec 7 00:36:37 2022 +0000 KVM: Delete extra block of "};" in the KVM API documentation Delete an extra block of code/documentation that snuck in when KVM's documentation was converted to ReST format. Fixes: 106ee47dc633 ("docs: kvm: Convert api.txt to ReST format") Signed-off-by: Sean Christopherson Message-Id: <20221207003637.2041211-1-seanjc@google.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 5 ----- 1 file changed, 5 deletions(-) commit 562f5bc48a8d99a8898c734ecacf061a79a88fbf Author: Lai Jiangshan Date: Wed Dec 7 20:05:05 2022 +0800 kvm: x86/mmu: Remove duplicated "be split" in spte.h "be split be split" -> "be split" Signed-off-by: Lai Jiangshan Message-Id: <20221207120505.9175-1-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/spte.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a303def0fc18f0f2393b5c5f8ae3d2657a9713dc Author: Lai Jiangshan Date: Wed Dec 7 20:06:16 2022 +0800 kvm: Remove the unused macro KVM_MMU_READ_{,UN}LOCK() No code is using KVM_MMU_READ_LOCK() or KVM_MMU_READ_UNLOCK(). They used to be in virt/kvm/pfncache.c: KVM_MMU_READ_LOCK(kvm); retry = mmu_notifier_retry_hva(kvm, mmu_seq, uhva); KVM_MMU_READ_UNLOCK(kvm); However, since 58cd407ca4c6 ("KVM: Fix multiple races in gfn=>pfn cache refresh", 2022-05-25) the code is only relying on the MMU notifier's invalidation count and sequence number. Signed-off-by: Lai Jiangshan Message-Id: <20221207120617.9409-1-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_mm.h | 4 ---- 1 file changed, 4 deletions(-) commit e0a78525f540f9d9a44a296f307b8b74cee4c288 Author: Lukas Bulwahn Date: Mon Dec 5 09:20:44 2022 +0100 MAINTAINERS: adjust entry after renaming the vmx hyperv files Commit a789aeba4196 ("KVM: VMX: Rename "vmx/evmcs.{ch}" to "vmx/hyperv.{ch}"") renames the VMX specific Hyper-V files, but does not adjust the entry in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file reference in KVM X86 HYPER-V (KVM/hyper-v). Signed-off-by: Lukas Bulwahn Fixes: a789aeba4196 ("KVM: VMX: Rename "vmx/evmcs.{ch}" to "vmx/hyperv.{ch}"") Reviewed-by: Sean Christopherson Message-Id: <20221205082044.10141-1-lukas.bulwahn@gmail.com> Signed-off-by: Paolo Bonzini MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92c8191bb5d3f670ed806f91823381193288a4e1 Author: Oliver Upton Date: Fri Dec 9 01:53:02 2022 +0000 KVM: selftests: Mark correct page as mapped in virt_map() The loop marks vaddr as mapped after incrementing it by page size, thereby marking the *next* page as mapped. Set the bit in vpages_mapped first instead. Fixes: 56fc7732031d ("KVM: selftests: Fill in vm->vpages_mapped bitmap in virt_map() too") Signed-off-by: Oliver Upton Message-Id: <20221209015307.1781352-4-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/kvm_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a16142505cbb9b80d5e998e32b1d882e0f45d64 Author: Oliver Upton Date: Fri Dec 9 01:53:04 2022 +0000 KVM: arm64: selftests: Don't identity map the ucall MMIO hole Currently the ucall MMIO hole is placed immediately after slot0, which is a relatively safe address in the PA space. However, it is possible that the same address has already been used for something else (like the guest program image) in the VA space. At least in my own testing, building the vgic_irq test with clang leads to the MMIO hole appearing underneath gicv3_ops. Stop identity mapping the MMIO hole and instead find an unused VA to map to it. Yet another subtle detail of the KVM selftests library is that virt_pg_map() does not update vm->vpages_mapped. Switch over to virt_map() instead to guarantee that the chosen VA isn't to something else. Signed-off-by: Oliver Upton Message-Id: <20221209015307.1781352-6-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/aarch64/ucall.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit feb84f6daa7e7d51444d13fa65df7d5562fd0075 Author: Paolo Bonzini Date: Mon Dec 12 05:36:53 2022 -0500 KVM: selftests: document the default implementation of vm_vaddr_populate_bitmap Explain the meaning of the bit manipulations of vm_vaddr_populate_bitmap. These correspond to the "canonical addresses" of x86 and other architectures, but that is not obvious. Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/kvm_util.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2f5213b8fc311eaa8fc78de7ecbd27ead027993c Author: Sean Christopherson Date: Fri Dec 9 12:55:44 2022 -0800 KVM: selftests: Use magic value to signal ucall_alloc() failure Use a magic value to signal a ucall_alloc() failure instead of simply doing GUEST_ASSERT(). GUEST_ASSERT() relies on ucall_alloc() and so a failure puts the guest into an infinite loop. Use -1 as the magic value, as a real ucall struct should never wrap. Reported-by: Oliver Upton Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/ucall_common.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit db7b780dab6742a8358ae7ecb1d0e972ccea8737 Author: Sean Christopherson Date: Tue Dec 13 00:16:50 2022 +0000 KVM: selftests: Disable "gnu-variable-sized-type-not-at-end" warning Disable gnu-variable-sized-type-not-at-end so that tests and libraries can create overlays of variable sized arrays at the end of structs when using a fixed number of entries, e.g. to get/set a single MSR. It's possible to fudge around the warning, e.g. by defining a custom struct that hardcodes the number of entries, but that is a burden for both developers and readers of the code. lib/x86_64/processor.c:664:19: warning: field 'header' with variable sized type 'struct kvm_msrs' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct kvm_msrs header; ^ lib/x86_64/processor.c:772:19: warning: field 'header' with variable sized type 'struct kvm_msrs' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct kvm_msrs header; ^ lib/x86_64/processor.c:787:19: warning: field 'header' with variable sized type 'struct kvm_msrs' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct kvm_msrs header; ^ 3 warnings generated. x86_64/hyperv_tlb_flush.c:54:18: warning: field 'hv_vp_set' with variable sized type 'struct hv_vpset' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct hv_vpset hv_vp_set; ^ 1 warning generated. x86_64/xen_shinfo_test.c:137:25: warning: field 'info' with variable sized type 'struct kvm_irq_routing' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct kvm_irq_routing info; ^ 1 warning generated. Signed-off-by: Sean Christopherson Message-Id: <20221213001653.3852042-12-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 1 + 1 file changed, 1 insertion(+) commit 5efb946b9569abdfb8a42702d40a5c244096e932 Author: Sean Christopherson Date: Tue Dec 13 00:16:49 2022 +0000 KVM: selftests: Include lib.mk before consuming $(CC) Include lib.mk before consuming $(CC) and document that lib.mk overwrites $(CC) unless make was invoked with -e or $(CC) was specified after make (which makes the environment override the Makefile). Including lib.mk after using it for probing, e.g. for -no-pie, can lead to weirdness. Signed-off-by: Sean Christopherson Message-Id: <20221213001653.3852042-11-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7cf2e7373ab145bf972c3cbcb495fd1a9770c3b0 Author: Sean Christopherson Date: Tue Dec 13 00:16:48 2022 +0000 KVM: selftests: Explicitly disable builtins for mem*() overrides Explicitly disable the compiler's builtin memcmp(), memcpy(), and memset(). Because only lib/string_override.c is built with -ffreestanding, the compiler reserves the right to do what it wants and can try to link the non-freestanding code to its own crud. /usr/bin/x86_64-linux-gnu-ld: /lib/x86_64-linux-gnu/libc.a(memcmp.o): in function `memcmp_ifunc': (.text+0x0): multiple definition of `memcmp'; tools/testing/selftests/kvm/lib/string_override.o: tools/testing/selftests/kvm/lib/string_override.c:15: first defined here clang: error: linker command failed with exit code 1 (use -v to see invocation) Fixes: 6b6f71484bf4 ("KVM: selftests: Implement memcmp(), memcpy(), and memset() for guest use") Reported-by: Aaron Lewis Reported-by: Raghavendra Rao Ananta Signed-off-by: Sean Christopherson Message-Id: <20221213001653.3852042-10-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 1 + 1 file changed, 1 insertion(+) commit 2b2d8afc1acf6396bea14ef973d0029c4a5b33f4 Author: Sean Christopherson Date: Tue Dec 13 00:16:47 2022 +0000 KVM: selftests: Probe -no-pie with actual CFLAGS used to compile Probe -no-pie with the actual set of CFLAGS used to compile the tests, clang whines about -no-pie being unused if the tests are compiled with -static. clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument] Signed-off-by: Sean Christopherson Message-Id: <20221213001653.3852042-9-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5dc38777a7de15109a1d45b42cf2bb7f1bbe6010 Author: Sean Christopherson Date: Tue Dec 13 00:16:46 2022 +0000 KVM: selftests: Use proper function prototypes in probing code Make the main() functions in the probing code proper prototypes so that compiling the probing code with more strict flags won't generate false negatives. :1:5: error: function declaration isn’t a prototype [-Werror=strict-prototypes] Signed-off-by: Sean Christopherson Message-Id: <20221213001653.3852042-8-seanjc@google.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6a5db83adfd668b3c1092274ddf45903eb1fe435 Author: Sean Christopherson Date: Tue Dec 13 00:16:45 2022 +0000 KVM: selftests: Rename UNAME_M to ARCH_DIR, fill explicitly for x86 Rename UNAME_M to ARCH_DIR and explicitly set it directly for x86. At this point, the name of the arch directory really doesn't have anything to do with `uname -m`, and UNAME_M is unnecessarily confusing given that its purpose is purely to identify the arch specific directory. Signed-off-by: Sean Christopherson Message-Id: <20221213001653.3852042-7-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 47 ++++++++++-------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) commit 1525429fe5cb8e23b74c6dd473bb477a35906704 Author: Sean Christopherson Date: Tue Dec 13 00:16:44 2022 +0000 KVM: selftests: Fix a typo in x86-64's kvm_get_cpu_address_width() Fix a == vs. = typo in kvm_get_cpu_address_width() that results in @pa_bits being left unset if the CPU doesn't support enumerating its MAX_PHY_ADDR. Flagged by clang's unusued-value warning. lib/x86_64/processor.c:1034:51: warning: expression result unused [-Wunused-value] *pa_bits == kvm_cpu_has(X86_FEATURE_PAE) ? 36 : 32; Fixes: 3bd396353d18 ("KVM: selftests: Add X86_FEATURE_PAE and use it calc "fallback" MAXPHYADDR") Signed-off-by: Sean Christopherson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221213001653.3852042-6-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/x86_64/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43e96957e8b87bad8e4ba666750ff0cda9e03ffb Author: Sean Christopherson Date: Tue Dec 13 00:16:43 2022 +0000 KVM: selftests: Use pattern matching in .gitignore Use pattern matching to exclude everything except .c, .h, .S, and .sh files from Git. Manually adding every test target has an absurd maintenance cost, is comically error prone, and leads to bikeshedding over whether or not the targets should be listed in alphabetical order. Deliberately do not include the one-off assets, e.g. config, settings, .gitignore itself, etc as Git doesn't ignore files that are already in the repository. Adding the one-off assets won't prevent mistakes where developers forget to --force add files that don't match the "allowed". Signed-off-by: Sean Christopherson Message-Id: <20221213001653.3852042-5-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 91 +++------------------------------- 1 file changed, 6 insertions(+), 85 deletions(-) commit d61a12cb9af5b355a38e0c0106e91224b49195ce Author: Sean Christopherson Date: Tue Dec 13 00:16:42 2022 +0000 KVM: selftests: Fix divide-by-zero bug in memslot_perf_test Check that the number of pages per slot is non-zero in get_max_slots() prior to computing the remaining number of pages. clang generates code that uses an actual DIV for calculating the remaining, which causes a #DE if the total number of pages is less than the number of slots. traps: memslot_perf_te[97611] trap divide error ip:4030c4 sp:7ffd18ae58f0 error:0 in memslot_perf_test[401000+cb000] Fixes: a69170c65acd ("KVM: selftests: memslot_perf_test: Report optimal memory slots") Signed-off-by: Sean Christopherson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221213001653.3852042-4-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/memslot_perf_test.c | 3 +++ 1 file changed, 3 insertions(+) commit 73441efa36c253906057b8800bc9a3fdadbc2c41 Author: Sean Christopherson Date: Tue Dec 13 00:16:41 2022 +0000 KVM: selftests: Delete dead code in x86_64/vmx_tsc_adjust_test.c Delete an unused struct definition in x86_64/vmx_tsc_adjust_test.c. Signed-off-by: Sean Christopherson Message-Id: <20221213001653.3852042-3-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c | 5 ----- 1 file changed, 5 deletions(-) commit e779fd53b4aa0aa8704ae62eb56065b9877a540b Author: Sean Christopherson Date: Tue Dec 13 00:16:40 2022 +0000 KVM: selftests: Define literal to asm constraint in aarch64 as unsigned long Define a literal '0' asm input constraint to aarch64/page_fault_test's guest_cas() as an unsigned long to make clang happy. tools/testing/selftests/kvm/aarch64/page_fault_test.c:120:16: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths] :: "r" (0), "r" (TEST_DATA), "r" (guest_test_memory)); ^ tools/testing/selftests/kvm/aarch64/page_fault_test.c:119:15: note: use constraint modifier "w" "casal %0, %1, [%2]\n" ^~ %w0 Fixes: 35c581015712 ("KVM: selftests: aarch64: Add aarch64/page_fault_test") Cc: Ricardo Koller Signed-off-by: Sean Christopherson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221213001653.3852042-2-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/page_fault_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb8fd6f75775165390ededea8799b60d93d9fe3e Author: Gaosheng Cui Date: Sat Nov 26 12:49:11 2022 +0800 memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe() The clk_disable_unprepare() should be called in the error handling of devbus_get_timing_params() and of_platform_populate(), fix it by replacing devm_clk_get and clk_prepare_enable by devm_clk_get_enabled. Fixes: e81b6abebc87 ("memory: add a driver for atmel ram controllers") Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20221126044911.7226-1-cuigaosheng1@huawei.com Signed-off-by: Krzysztof Kozlowski drivers/memory/mvebu-devbus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 340cb392a038cf70540a4cdf2e98a247c66b6df4 Author: Gaosheng Cui Date: Fri Nov 25 15:37:57 2022 +0800 memory: atmel-sdramc: Fix missing clk_disable_unprepare in atmel_ramc_probe() The clk_disable_unprepare() should be called in the error handling of caps->has_mpddr_clk, fix it by replacing devm_clk_get and clk_prepare_enable by devm_clk_get_enabled. Fixes: e81b6abebc87 ("memory: add a driver for atmel ram controllers") Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20221125073757.3535219-1-cuigaosheng1@huawei.com Signed-off-by: Krzysztof Kozlowski drivers/memory/atmel-sdramc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ef86b2c2807f41c045e5534d8513a8b83f63bc39 Author: Ashish Mhetre Date: Fri Nov 25 09:37:52 2022 +0530 memory: tegra: Remove clients SID override programming On newer Tegra releases, early boot SID override programming and SID override programming during resume is handled by bootloader. In the function tegra186_mc_program_sid() which is getting removed, SID override register of all clients is written without checking if secure firmware has allowed write on it or not. If write is disabled by secure firmware then it can lead to errors coming from secure firmware and hang in kernel boot. Also, SID override is programmed on-demand during probe_finalize() call of IOMMU which is done in tegra186_mc_client_sid_override() in this same file. This function does it correctly by checking if write is permitted on SID override register. It also checks if SID override register is already written with correct value and skips re-writing it in that case. Fixes: 393d66fd2cac ("memory: tegra: Implement SID override programming") Signed-off-by: Ashish Mhetre Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20221125040752.12627-1-amhetre@nvidia.com Signed-off-by: Krzysztof Kozlowski drivers/memory/tegra/tegra186.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) commit 827e0920dbfb0d92416e56081d70745597403446 Author: Benedikt Niedermayr Date: Fri Dec 9 12:28:28 2022 +0100 memory: omap-gpmc: fix wait pin validation This bug has been introduced after switching from -1 to UINT_MAX for GPMC_WAITPIN_INVALID. The bug leads to an error when the optional gpmc,wait-pin dt-property is not used: ... gpmc_cs_program_settings: invalid wait-pin (-1) ... Signed-off-by: Benedikt Niedermayr Fixes: 8dd7e4af5853 ("memory: omap-gpmc: fix coverity issue "Control flow issues"") Acked-by: Roger Quadros Tested-by: Tony Lindgren Link: https://lore.kernel.org/r/20221209112828.581491-1-benedikt.niedermayr@siemens.com Signed-off-by: Krzysztof Kozlowski drivers/memory/omap-gpmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c28f3d80383571d3630df1a0e89500d23e855924 Author: Utkarsh Patel Date: Thu Dec 22 20:22:46 2022 -0800 thunderbolt: Do not report errors if on-board retimers are found Currently we return an error even if on-board retimers are found and that's not expected. Fix this to return an error only if there was one and 0 otherwise. Fixes: 1e56c88adecc ("thunderbolt: Runtime resume USB4 port when retimers are scanned") Cc: stable@vger.kernel.org Signed-off-by: Utkarsh Patel Signed-off-by: Mika Westerberg drivers/thunderbolt/retimer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 01c5bb0cc2a39fbc56ff9a5ef28b79447f0c2351 Author: Sumit Gupta Date: Tue Dec 20 21:32:37 2022 +0530 cpufreq: Add Tegra234 to cpufreq-dt-platdev blocklist Tegra234 platform uses the tegra194-cpufreq driver, so add it to the blocklist in cpufreq-dt-platdev driver to avoid the cpufreq driver registration from there. Signed-off-by: Sumit Gupta Signed-off-by: Viresh Kumar drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+) commit 1a6a8b0080b09bf14a7d45abfe8020bd63306c17 Author: Konrad Dybcio Date: Tue Dec 20 14:39:10 2022 +0100 cpufreq: qcom-hw: Fix reading "reg" with address/size-cells != 2 Commit 054a3ef683a1 ("cpufreq: qcom-hw: Allocate qcom_cpufreq_data during probe") assumed that every reg variable is 4*u32 wide (as most new qcom SoCs set #address- and #size-cells to <2>. That is not the case for all of them though. Check the cells values dynamically to ensure the proper region of the DTB is being read. Fixes: 054a3ef683a1 ("cpufreq: qcom-hw: Allocate qcom_cpufreq_data during probe") Signed-off-by: Konrad Dybcio Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit f5f94b9c8b805d87ff185caf9779c3a4d07819e3 Author: Pierre Gondois Date: Tue Dec 20 11:12:25 2022 +0100 cpufreq: CPPC: Add u64 casts to avoid overflowing The fields of the _CPC object are unsigned 32-bits values. To avoid overflows while using _CPC's values, add 'u64' casts. Signed-off-by: Pierre Gondois Signed-off-by: Viresh Kumar drivers/cpufreq/cppc_cpufreq.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 83749a2ee548f568ce2037749e19602fdc9f3ee3 Author: Arnd Bergmann Date: Thu Dec 15 17:55:15 2022 +0100 cpufreq: apple: remove duplicate intializer When -Woverride-init is enabled, gcc notices that the .attr field is initialized twice: drivers/cpufreq/apple-soc-cpufreq.c:331:27: error: initialized field overwritten [-Werror=override-init] 331 | .attr = apple_soc_cpufreq_hw_attr, | ^~~~~~~~~~~~~~~~~~~~~~~~~ Remove the first one, since this is not actually used. Signed-off-by: Arnd Bergmann Reviewed-by: Eric Curtin Signed-off-by: Viresh Kumar drivers/cpufreq/apple-soc-cpufreq.c | 1 - 1 file changed, 1 deletion(-) commit 37e14e4f3715428b809e4df9a9958baa64c77d51 Author: Adam Vodopjan Date: Fri Dec 9 09:26:34 2022 +0000 ata: ahci: Fix PCS quirk application for suspend Since kernel 5.3.4 my laptop (ICH8M controller) does not see Kingston SV300S37A60G SSD disk connected into a SATA connector on wake from suspend. The problem was introduced in c312ef176399 ("libata/ahci: Drop PCS quirk for Denverton and beyond"): the quirk is not applied on wake from suspend as it originally was. It is worth to mention the commit contained another bug: the quirk is not applied at all to controllers which require it. The fix commit 09d6ac8dc51a ("libata/ahci: Fix PCS quirk application") landed in 5.3.8. So testing my patch anywhere between commits c312ef176399 and 09d6ac8dc51a is pointless. Not all disks trigger the problem. For example nothing bad happens with Western Digital WD5000LPCX HDD. Test hardware: - Acer 5920G with ICH8M SATA controller - sda: some SATA HDD connnected into the DVD drive IDE port with a SATA-IDE caddy. It is a boot disk - sdb: Kingston SV300S37A60G SSD connected into the only SATA port Sample "dmesg --notime | grep -E '^(sd |ata)'" output on wake: sd 0:0:0:0: [sda] Starting disk sd 2:0:0:0: [sdb] Starting disk ata4: SATA link down (SStatus 4 SControl 300) ata3: SATA link down (SStatus 4 SControl 300) ata1.00: ACPI cmd ef/03:0c:00:00:00:a0 (SET FEATURES) filtered out ata1.00: ACPI cmd ef/03:42:00:00:00:a0 (SET FEATURES) filtered out ata1: FORCE: cable set to 80c ata5: SATA link down (SStatus 0 SControl 300) ata3: SATA link down (SStatus 4 SControl 300) ata3: SATA link down (SStatus 4 SControl 300) ata3.00: disabled sd 2:0:0:0: rejecting I/O to offline device ata3.00: detaching (SCSI 2:0:0:0) sd 2:0:0:0: [sdb] Start/Stop Unit failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK sd 2:0:0:0: [sdb] Synchronizing SCSI cache sd 2:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK sd 2:0:0:0: [sdb] Stopping disk sd 2:0:0:0: [sdb] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK Commit c312ef176399 dropped ahci_pci_reset_controller() which internally calls ahci_reset_controller() and applies the PCS quirk if needed after that. It was called each time a reset was required instead of just ahci_reset_controller(). This patch puts the function back in place. Fixes: c312ef176399 ("libata/ahci: Drop PCS quirk for Denverton and beyond") Signed-off-by: Adam Vodopjan Signed-off-by: Damien Le Moal drivers/ata/ahci.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit ce9ef749a2fa9048c1ebacc3194b17a9628512f5 Merge: 3e78986a840d 9a9134fd56f6 Author: Mark Brown Date: Tue Dec 27 00:03:16 2022 +0000 ASoC: SOF: Fixes for suspend after firmware crash Merge series from Peter Ujfalusi : This series contails 2 patches to fix device suspend after a firmware crash and another patch to allow reading the FW state from debugfs. commit e8bb8f19e73a1e855e54788f8673b9b49e46b5cd Author: Witold Sadowski Date: Mon Dec 19 06:42:48 2022 -0800 spi: cadence: Fix busy cycles calculation If xSPI is in x2/x4/x8 mode to calculate busy cycles, busy bits count must be divided by the number of lanes. If opcommand is using 8 busy bits, but SPI is in x4 mode, there will be only 2 busy cycles. Signed-off-by: Witold Sadowski Reviewed-by: Chandrakala Chavva Reviewed-by: Sunil Kovvuri Goutham Link: https://lore.kernel.org/r/20221219144254.20883-2-wsadowski@marvell.com Signed-off-by: Mark Brown drivers/spi/spi-cadence-xspi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b24cded8c065d7cef8690b2c7b82b828cce57708 Author: Ricardo Ribalda Date: Sun Dec 25 09:37:12 2022 +0100 spi: mediatek: Enable irq before the spi registration If the irq is enabled after the spi si registered, there can be a race with the initialization of the devices on the spi bus. Eg: mtk-spi 1100a000.spi: spi-mem transfer timeout spi-nor: probe of spi0.0 failed with error -110 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 ... Call trace: mtk_spi_can_dma+0x0/0x2c Fixes: c6f7874687f7 ("spi: mediatek: Enable irq when pdata is ready") Reported-by: Daniel Golle Signed-off-by: Ricardo Ribalda Tested-by: Daniel Golle Link: https://lore.kernel.org/r/20221225-mtk-spi-fixes-v1-0-bb6c14c232f8@chromium.org Signed-off-by: Mark Brown drivers/spi/spi-mt65xx.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 3e78986a840d59dd27e636eae3f52dc11125c835 Author: Arnd Bergmann Date: Wed Dec 21 14:24:56 2022 +0100 ASoC: Intel: sof-nau8825: fix module alias overflow The maximum name length for a platform_device_id entry is 20 characters including the trailing NUL byte. The sof_nau8825.c file exceeds that, which causes an obscure error message: sound/soc/intel/boards/snd-soc-sof_nau8825.mod.c:35:45: error: illegal character encoding in string literal [-Werror,-Winvalid-source-encoding] MODULE_ALIAS("platform:adl_max98373_nau8825"); ^~~~ include/linux/module.h:168:49: note: expanded from macro 'MODULE_ALIAS' ^~~~~~ include/linux/module.h:165:56: note: expanded from macro 'MODULE_INFO' ^~~~ include/linux/moduleparam.h:26:47: note: expanded from macro '__MODULE_INFO' = __MODULE_INFO_PREFIX __stringify(tag) "=" info I could not figure out how to make the module handling robust enough to handle this better, but as a quick fix, using slightly shorter names that are still unique avoids the build issue. Fixes: 8d0872f6239f ("ASoC: Intel: add sof-nau8825 machine driver") Signed-off-by: Arnd Bergmann Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221221132515.2363276-1-arnd@kernel.org Signed-off-by: Mark Brown sound/soc/intel/boards/sof_nau8825.c | 8 ++++---- sound/soc/intel/common/soc-acpi-intel-adl-match.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 63f3d99b7efe4c5404a9388c05780917099cecf4 Author: Arnd Bergmann Date: Wed Dec 21 14:25:48 2022 +0100 ASoC: Intel: fix sof-nau8825 link failure The snd-soc-sof_nau8825.ko module fails to link unless the sof_realtek_common support is also enabled: ERROR: modpost: "sof_rt1015p_codec_conf" [sound/soc/intel/boards/snd-soc-sof_nau8825.ko] undefined! ERROR: modpost: "sof_rt1015p_dai_link" [sound/soc/intel/boards/snd-soc-sof_nau8825.ko] undefined! Fixes: 8d0872f6239f ("ASoC: Intel: add sof-nau8825 machine driver") Signed-off-by: Arnd Bergmann Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221221132559.2402341-1-arnd@kernel.org Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ba7523bb0f494fc440d3a9bb0b665cfcaa192d0c Author: Ajye Huang Date: Thu Dec 22 12:26:24 2022 +0800 ASoC: Intel: sof_nau8825: add variant with nau8318 amplifier. This patch adds the driver data for two nau8318 speaker amplifiers on SSP1 and nau8825 on SSP0 for ADL platform. The nau8315 and nau8318 are both Nuvoton Amp chips. They use the same Amp driver nau8315.c. The acpi_device_id for nau8315 is "NVTN2010", for nau8318 is "NVTN2012". The nau8825 is one of Nuvoton headset codec, and its acpi_device_id is "10508825". Signed-off-by: Ajye Huang Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221222042624.557869-1-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 1 + sound/soc/intel/boards/sof_nau8825.c | 23 +++++++++++++++++++++++ sound/soc/intel/common/soc-acpi-intel-adl-match.c | 12 ++++++++++++ 3 files changed, 36 insertions(+) commit 68506a173dd700c2bd794dcc3489edcdb8ee35c6 Author: Wim Van Boven Date: Fri Dec 16 09:18:27 2022 +0100 ASoC: amd: yc: Add Razer Blade 14 2022 into DMI table Razer Blade 14 (2022) - RZ09-0427 needs the quirk to enable the built in microphone Signed-off-by: Wim Van Boven Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20221216081828.12382-1-wimvanboven@gmail.com Signed-off-by: Mark Brown sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b25a31b463391cc47a654594eb154ebf5dd0d60a Author: Gongjun Song Date: Mon Dec 26 09:09:17 2022 +0800 ASoC: Intel: soc-acpi: add configuration for variant of 0C11 product Support configuration with SoundWire RT1318 amplifiers on link1 and link2, and RT711 on link0 for headphone/headset. This product does not support local microphones. Signed-off-by: Gongjun Song Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221226010917.2632973-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-rpl-match.c | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 896c3dc21f1e84cb2f60d54572fc3377eb57e004 Author: Gongjun Song Date: Mon Dec 26 09:09:16 2022 +0800 ASoC: Intel: soc-acpi: add configuration for variant of 0C40 product Support configuration with SoundWire RT1316 amplifiers on link0 and link1, and RT711 on link2 for headphone/headset. This product does not support local microphones. Signed-off-by: Gongjun Song Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221226010917.2632973-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-rpl-match.c | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 93ef83050e597634d2c7dc838a28caf5137b9404 Author: YoungJun.park Date: Fri Oct 28 07:42:41 2022 -0700 kunit: alloc_string_stream_fragment error handling bug fix When it fails to allocate fragment, it does not free and return error. And check the pointer inappropriately. Fixed merge conflicts with commit 618887768bb7 ("kunit: update NULL vs IS_ERR() tests") Shuah Khan Signed-off-by: YoungJun.park Reviewed-by: David Gow Signed-off-by: Shuah Khan lib/kunit/string-stream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8c3313e8556b8a817e7b4bc9c249b58855a7e49c Author: Corentin Labbe Date: Mon Dec 12 12:44:23 2022 +0000 arm64: dts: rockchip: use correct reset names for rk3399 crypto nodes The reset names does not follow the binding, use the correct ones. Fixes: 8c701fa6e38c ("arm64: dts: rockchip: rk3399: add crypto node") Signed-off-by: Corentin Labbe Link: https://lore.kernel.org/r/20221212124423.1239748-1-clabbe@baylibre.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88d356ca41ba1c3effc2d4208dfbd4392f58cd6d Author: Christoph Hellwig Date: Sun Dec 25 11:32:32 2022 +0100 nvme-pci: update sqsize when adjusting the queue depth Update the core sqsize field in addition to the PCIe-specific q_depth field as the core tagset allocation helpers rely on it. Fixes: 0da7feaa5913 ("nvme-pci: use the tagset alloc/free helpers") Signed-off-by: Christoph Hellwig Acked-by: Hugh Dickins Link: https://lore.kernel.org/r/20221225103234.226794-3-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 33b93727ce90c8db916fb071ed13e90106339754 Author: Christoph Hellwig Date: Sun Dec 25 11:32:31 2022 +0100 nvme: fix setting the queue depth in nvme_alloc_io_tag_set While the CAP.MQES field in NVMe is a 0s based filed with a natural one off, we also need to account for the queue wrap condition and fix undo the one off again in nvme_alloc_io_tag_set. This was never properly done by the fabrics drivers, but they don't seem to care because there is no actual physical queue that can wrap around, but it became a problem when converting over the PCIe driver. Also add back the BLK_MQ_MAX_DEPTH check that was lost in the same commit. Fixes: 0da7feaa5913 ("nvme-pci: use the tagset alloc/free helpers") Reported-by: Hugh Dickins Signed-off-by: Christoph Hellwig Tested-by: Hugh Dickins Link: https://lore.kernel.org/r/20221225103234.226794-2-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 246cf66e300b76099b5dbd3fdd39e9a5dbc53f02 Author: Yu Kuai Date: Mon Dec 26 11:06:05 2022 +0800 block, bfq: fix uaf for bfqq in bfq_exit_icq_bfqq Commit 64dc8c732f5c ("block, bfq: fix possible uaf for 'bfqq->bic'") will access 'bic->bfqq' in bic_set_bfqq(), however, bfq_exit_icq_bfqq() can free bfqq first, and then call bic_set_bfqq(), which will cause uaf. Fix the problem by moving bfq_exit_bfqq() behind bic_set_bfqq(). Fixes: 64dc8c732f5c ("block, bfq: fix possible uaf for 'bfqq->bic'") Reported-by: Yi Zhang Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20221226030605.1437081-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4542f314507015ac0e25c6e8102b88293826a51 Author: Darrick J. Wong Date: Mon Dec 26 10:11:18 2022 -0800 xfs: make xfs_iomap_page_ops static Shut up the sparse warnings about this variable that isn't referenced anywhere else. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/xfs_iomap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26870c3f5b15187268bf183055c7b9f29fe66079 Author: Darrick J. Wong Date: Mon Dec 26 10:11:17 2022 -0800 xfs: don't assert if cmap covers imap after cycling lock In xfs_reflink_fill_cow_hole, there's a debugging assertion that trips if (after cycling the ILOCK to get a transaction) the requeried cow mapping overlaps the start of the area being written. IOWs, it trips if the hole in the cow fork that it's supposed to fill has been filled. This is trivially possible since we cycled ILOCK_EXCL. If we trip the assertion, then we know that cmap is a delalloc extent because @found is false. Fortunately, the bmapi_write call below will convert the delalloc extent to a real unwritten cow fork extent, so all we need to do here is remove the assertion. It turns out that generic/095 trips this pretty regularly with alwayscow mode enabled. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/xfs_reflink.c | 2 -- 1 file changed, 2 deletions(-) commit a4517c4f3423c7c448f2c359218f97c1173523a1 Author: Chris Chiu Date: Mon Dec 26 19:43:03 2022 +0800 ALSA: hda/realtek: Apply dual codec fixup for Dell Latitude laptops The Dell Latiture 3340/3440/3540 laptops with Realtek ALC3204 have dual codecs and need the ALC1220_FIXUP_GB_DUAL_CODECS to fix the conflicts of Master controls. The existing headset mic fixup for Dell is also required to enable the jack sense and the headset mic. Introduce a new fixup to fix the dual codec and headset mic issues for particular Dell laptops since other old Dell laptops with the same codec configuration are already well handled by the fixup in alc269_fallback_pin_fixup_tbl[]. Signed-off-by: Chris Chiu Cc: Link: https://lore.kernel.org/r/20221226114303.4027500-1-chris.chiu@canonical.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit d3805695fe1e7383517903715cefc9bbdcffdc90 Author: Anuradha Weeraman Date: Sun Dec 25 23:12:22 2022 +0530 net: ethernet: marvell: octeontx2: Fix uninitialized variable warning Fix for uninitialized variable warning. Addresses-Coverity: ("Uninitialized scalar variable") Signed-off-by: Anuradha Weeraman Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df49908f3c52d211aea5e2a14a93bbe67a2cb3af Author: Miaoqian Lin Date: Fri Dec 23 11:37:18 2022 +0400 nfc: Fix potential resource leaks nfc_get_device() take reference for the device, add missing nfc_put_device() to release it when not need anymore. Also fix the style warnning by use error EOPNOTSUPP instead of ENOTSUPP. Fixes: 5ce3f32b5264 ("NFC: netlink: SE API implementation") Fixes: 29e76924cf08 ("nfc: netlink: Add capability to reply to vendor_cmd with data") Signed-off-by: Miaoqian Lin Signed-off-by: David S. Miller net/nfc/netlink.c | 52 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 14 deletions(-) commit 30e725537546248bddc12eaac2fe0a258917f190 Author: Johnny S. Lee Date: Thu Dec 22 22:34:05 2022 +0800 net: dsa: mv88e6xxx: depend on PTP conditionally PTP hardware timestamping related objects are not linked when PTP support for MV88E6xxx (NET_DSA_MV88E6XXX_PTP) is disabled, therefore NET_DSA_MV88E6XXX should not depend on PTP_1588_CLOCK_OPTIONAL regardless of NET_DSA_MV88E6XXX_PTP. Instead, condition more strictly on how NET_DSA_MV88E6XXX_PTP's dependencies are met, making sure that it cannot be enabled when NET_DSA_MV88E6XXX=y and PTP_1588_CLOCK=m. In other words, this commit allows NET_DSA_MV88E6XXX to be built-in while PTP_1588_CLOCK is a module, as long as NET_DSA_MV88E6XXX_PTP is prevented from being enabled. Fixes: e5f31552674e ("ethernet: fix PTP_1588_CLOCK dependencies") Signed-off-by: Johnny S. Lee Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 13a7c8964afcd8ca43c0b6001ebb0127baa95362 Author: Daniil Tatianin Date: Thu Dec 22 14:52:28 2022 +0300 qlcnic: prevent ->dcb use-after-free on qlcnic_dcb_enable() failure adapter->dcb would get silently freed inside qlcnic_dcb_enable() in case qlcnic_dcb_attach() would return an error, which always happens under OOM conditions. This would lead to use-after-free because both of the existing callers invoke qlcnic_dcb_get_info() on the obtained pointer, which is potentially freed at that point. Propagate errors from qlcnic_dcb_enable(), and instead free the dcb pointer at callsite using qlcnic_dcb_free(). This also removes the now unused qlcnic_clear_dcb_ops() helper, which was a simple wrapper around kfree() also causing memory leaks for partially initialized dcb. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: 3c44bba1d270 ("qlcnic: Disable DCB operations from SR-IOV VFs") Reviewed-by: Michal Swiatkowski Signed-off-by: Daniil Tatianin Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 8 +++++++- drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h | 10 ++-------- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 8 +++++++- 3 files changed, 16 insertions(+), 10 deletions(-) commit 399ab7fe0fa0d846881685fd4e57e9a8ef7559f7 Author: Hawkins Jiawei Date: Thu Dec 22 11:51:19 2022 +0800 net: sched: fix memory leak in tcindex_set_parms Syzkaller reports a memory leak as follows: ==================================== BUG: memory leak unreferenced object 0xffff88810c287f00 (size 256): comm "syz-executor105", pid 3600, jiffies 4294943292 (age 12.990s) 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_trace+0x20/0x90 mm/slab_common.c:1046 [] kmalloc include/linux/slab.h:576 [inline] [] kmalloc_array include/linux/slab.h:627 [inline] [] kcalloc include/linux/slab.h:659 [inline] [] tcf_exts_init include/net/pkt_cls.h:250 [inline] [] tcindex_set_parms+0xa7/0xbe0 net/sched/cls_tcindex.c:342 [] tcindex_change+0xdf/0x120 net/sched/cls_tcindex.c:553 [] tc_new_tfilter+0x4f2/0x1100 net/sched/cls_api.c:2147 [] rtnetlink_rcv_msg+0x4dc/0x5d0 net/core/rtnetlink.c:6082 [] netlink_rcv_skb+0x87/0x1d0 net/netlink/af_netlink.c:2540 [] netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] [] netlink_unicast+0x397/0x4c0 net/netlink/af_netlink.c:1345 [] netlink_sendmsg+0x396/0x710 net/netlink/af_netlink.c:1921 [] sock_sendmsg_nosec net/socket.c:714 [inline] [] sock_sendmsg+0x56/0x80 net/socket.c:734 [] ____sys_sendmsg+0x178/0x410 net/socket.c:2482 [] ___sys_sendmsg+0xa8/0x110 net/socket.c:2536 [] __sys_sendmmsg+0x105/0x330 net/socket.c:2622 [] __do_sys_sendmmsg net/socket.c:2651 [inline] [] __se_sys_sendmmsg net/socket.c:2648 [inline] [] __x64_sys_sendmmsg+0x24/0x30 net/socket.c:2648 [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 [] entry_SYSCALL_64_after_hwframe+0x63/0xcd ==================================== Kernel uses tcindex_change() to change an existing filter properties. Yet the problem is that, during the process of changing, if `old_r` is retrieved from `p->perfect`, then kernel uses tcindex_alloc_perfect_hash() to newly allocate filter results, uses tcindex_filter_result_init() to clear the old filter result, without destroying its tcf_exts structure, which triggers the above memory leak. To be more specific, there are only two source for the `old_r`, according to the tcindex_lookup(). `old_r` is retrieved from `p->perfect`, or `old_r` is retrieved from `p->h`. * If `old_r` is retrieved from `p->perfect`, kernel uses tcindex_alloc_perfect_hash() to newly allocate the filter results. Then `r` is assigned with `cp->perfect + handle`, which is newly allocated. So condition `old_r && old_r != r` is true in this situation, and kernel uses tcindex_filter_result_init() to clear the old filter result, without destroying its tcf_exts structure * If `old_r` is retrieved from `p->h`, then `p->perfect` is NULL according to the tcindex_lookup(). Considering that `cp->h` is directly copied from `p->h` and `p->perfect` is NULL, `r` is assigned with `tcindex_lookup(cp, handle)`, whose value should be the same as `old_r`, so condition `old_r && old_r != r` is false in this situation, kernel ignores using tcindex_filter_result_init() to clear the old filter result. So only when `old_r` is retrieved from `p->perfect` does kernel use tcindex_filter_result_init() to clear the old filter result, which triggers the above memory leak. Considering that there already exists a tc_filter_wq workqueue to destroy the old tcindex_data by tcindex_partial_destroy_work() at the end of tcindex_set_parms(), this patch solves this memory leak bug by removing this old filter result clearing part and delegating it to the tc_filter_wq workqueue. Note that this patch doesn't introduce any other issues. If `old_r` is retrieved from `p->perfect`, this patch just delegates old filter result clearing part to the tc_filter_wq workqueue; If `old_r` is retrieved from `p->h`, kernel doesn't reach the old filter result clearing part, so removing this part has no effect. [Thanks to the suggestion from Jakub Kicinski, Cong Wang, Paolo Abeni and Dmitry Vyukov] Fixes: b9a24bb76bf6 ("net_sched: properly handle failure case of tcf_exts_init()") Link: https://lore.kernel.org/all/0000000000001de5c505ebc9ec59@google.com/ Reported-by: syzbot+232ebdbd36706c965ebf@syzkaller.appspotmail.com Tested-by: syzbot+232ebdbd36706c965ebf@syzkaller.appspotmail.com Cc: Cong Wang Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Dmitry Vyukov Acked-by: Paolo Abeni Signed-off-by: Hawkins Jiawei Signed-off-by: David S. Miller net/sched/cls_tcindex.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit b8800d324abb50160560c636bfafe2c81001b66c Author: Artem Egorkine Date: Sun Dec 25 12:57:28 2022 +0200 ALSA: line6: fix stack overflow in line6_midi_transmit Correctly calculate available space including the size of the chunk buffer. This fixes a buffer overflow when multiple MIDI sysex messages are sent to a PODxt device. Signed-off-by: Artem Egorkine Cc: Link: https://lore.kernel.org/r/20221225105728.1153989-2-arteme@gmail.com Signed-off-by: Takashi Iwai sound/usb/line6/midi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8508fa2e7472f673edbeedf1b1d2b7a6bb898ecc Author: Artem Egorkine Date: Sun Dec 25 12:57:27 2022 +0200 ALSA: line6: correct midi status byte when receiving data from podxt A PODxt device sends 0xb2, 0xc2 or 0xf2 as a status byte for MIDI messages over USB that should otherwise have a 0xb0, 0xc0 or 0xf0 status byte. This is usually corrected by the driver on other OSes. This fixes MIDI sysex messages sent by PODxt. [ tiwai: fixed white spaces ] Signed-off-by: Artem Egorkine Cc: Link: https://lore.kernel.org/r/20221225105728.1153989-1-arteme@gmail.com Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 3 ++- sound/usb/line6/midi.c | 3 ++- sound/usb/line6/midibuf.c | 25 +++++++++++++++++-------- sound/usb/line6/midibuf.h | 5 ++++- sound/usb/line6/pod.c | 3 ++- 5 files changed, 27 insertions(+), 12 deletions(-) commit 1b929c02afd37871d5afb9d498426f83432e71c2 Author: Linus Torvalds Date: Sun Dec 25 13:41:39 2022 -0800 Linux 6.2-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 292a089d78d3e2f7944e60bb897c977785a321e3 Author: Steven Rostedt (Google) Date: Tue Dec 20 13:45:19 2022 -0500 treewide: Convert del_timer*() to timer_shutdown*() Due to several bugs caused by timers being re-armed after they are shutdown and just before they are freed, a new state of timers was added called "shutdown". After a timer is set to this state, then it can no longer be re-armed. The following script was run to find all the trivial locations where del_timer() or del_timer_sync() is called in the same function that the object holding the timer is freed. It also ignores any locations where the timer->function is modified between the del_timer*() and the free(), as that is not considered a "trivial" case. This was created by using a coccinelle script and the following commands: $ cat timer.cocci @@ expression ptr, slab; identifier timer, rfield; @@ ( - del_timer(&ptr->timer); + timer_shutdown(&ptr->timer); | - del_timer_sync(&ptr->timer); + timer_shutdown_sync(&ptr->timer); ) ... when strict when != ptr->timer ( kfree_rcu(ptr, rfield); | kmem_cache_free(slab, ptr); | kfree(ptr); ) $ spatch timer.cocci . > /tmp/t.patch $ patch -p1 < /tmp/t.patch Link: https://lore.kernel.org/lkml/20221123201306.823305113@linutronix.de/ Signed-off-by: Steven Rostedt (Google) Acked-by: Pavel Machek [ LED ] Acked-by: Kalle Valo [ wireless ] Acked-by: Paolo Abeni [ networking ] Signed-off-by: Linus Torvalds arch/sh/drivers/push-switch.c | 2 +- block/blk-iocost.c | 2 +- block/blk-iolatency.c | 2 +- block/kyber-iosched.c | 2 +- drivers/acpi/apei/ghes.c | 2 +- drivers/atm/idt77252.c | 6 +++--- drivers/block/drbd/drbd_main.c | 2 +- drivers/block/loop.c | 2 +- drivers/bluetooth/hci_bcsp.c | 2 +- drivers/gpu/drm/i915/i915_sw_fence.c | 2 +- drivers/hid/hid-wiimote-core.c | 2 +- drivers/input/keyboard/locomokbd.c | 2 +- drivers/input/keyboard/omap-keypad.c | 2 +- drivers/input/mouse/alps.c | 2 +- drivers/isdn/mISDN/l1oip_core.c | 4 ++-- drivers/isdn/mISDN/timerdev.c | 4 ++-- drivers/leds/trigger/ledtrig-activity.c | 2 +- drivers/leds/trigger/ledtrig-heartbeat.c | 2 +- drivers/leds/trigger/ledtrig-pattern.c | 2 +- drivers/leds/trigger/ledtrig-transient.c | 2 +- drivers/media/pci/ivtv/ivtv-driver.c | 2 +- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 16 ++++++++-------- drivers/media/usb/s2255/s2255drv.c | 4 ++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +++--- drivers/net/ethernet/marvell/sky2.c | 2 +- drivers/net/ethernet/sun/sunvnet.c | 2 +- drivers/net/usb/sierra_net.c | 2 +- .../net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +- drivers/net/wireless/intersil/hostap/hostap_ap.c | 2 +- drivers/net/wireless/marvell/mwifiex/main.c | 2 +- drivers/net/wireless/microchip/wilc1000/hif.c | 6 +++--- drivers/nfc/pn533/pn533.c | 2 +- drivers/nfc/pn533/uart.c | 2 +- drivers/pcmcia/bcm63xx_pcmcia.c | 2 +- drivers/pcmcia/electra_cf.c | 2 +- drivers/pcmcia/omap_cf.c | 2 +- drivers/pcmcia/pd6729.c | 4 ++-- drivers/pcmcia/yenta_socket.c | 4 ++-- drivers/scsi/qla2xxx/qla_edif.c | 4 ++-- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 2 +- drivers/staging/wlan-ng/prism2usb.c | 6 +++--- drivers/tty/n_gsm.c | 2 +- drivers/tty/sysrq.c | 2 +- drivers/usb/gadget/udc/m66592-udc.c | 2 +- drivers/usb/serial/garmin_gps.c | 2 +- drivers/usb/serial/mos7840.c | 4 ++-- fs/ext4/super.c | 2 +- fs/nilfs2/segment.c | 2 +- net/802/garp.c | 2 +- net/802/mrp.c | 4 ++-- net/bridge/br_multicast.c | 8 ++++---- net/bridge/br_multicast_eht.c | 4 ++-- net/core/gen_estimator.c | 2 +- net/ipv4/ipmr.c | 2 +- net/ipv6/ip6mr.c | 2 +- net/mac80211/mesh_pathtbl.c | 2 +- net/netfilter/ipset/ip_set_list_set.c | 2 +- net/netfilter/ipvs/ip_vs_lblc.c | 2 +- net/netfilter/ipvs/ip_vs_lblcr.c | 2 +- net/netfilter/xt_IDLETIMER.c | 4 ++-- net/netfilter/xt_LED.c | 2 +- net/sched/cls_flow.c | 2 +- net/sunrpc/svc.c | 2 +- net/tipc/discover.c | 2 +- net/tipc/monitor.c | 2 +- sound/i2c/other/ak4117.c | 2 +- sound/synth/emux/emux.c | 2 +- 69 files changed, 97 insertions(+), 97 deletions(-) commit be1236fce5f4ac94915cdca8c61bb6e0e1503b81 Merge: 256cbafb0a9a fcbb408a1aaf Author: David S. Miller Date: Sat Dec 24 09:39:02 2022 +0000 Merge tag 'for-netdev' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== The following pull-request contains BPF updates for your *net* tree. We've added 7 non-merge commits during the last 5 day(s) which contain a total of 11 files changed, 231 insertions(+), 3 deletions(-). The main changes are: 1) Fix a splat in bpf_skb_generic_pop() under CHECKSUM_PARTIAL due to misuse of skb_postpull_rcsum(), from Jakub Kicinski with test case from Martin Lau. 2) Fix BPF verifier's nullness propagation when registers are of type PTR_TO_BTF_ID, from Hao Sun. 3) Fix bpftool build for JIT disassembler under statically built libllvm, from Anton Protopopov. 4) Fix warnings reported by resolve_btfids when building vmlinux with CONFIG_SECURITY_NETWORK disabled, from Hou Tao. 5) Minor fix up for BPF selftest gitignore, from Stanislav Fomichev. ==================== Signed-off-by: David S. Miller commit 72a85e2b0a1e1e6fb4ee51ae902730212b2de25c Merge: 0a023cbb11e3 3b553e0041a6 Author: Linus Torvalds Date: Fri Dec 23 14:44:08 2022 -0800 Merge tag 'spi-fix-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "One driver specific change here which handles the case where a SPI device for some reason tries to change the bus speed during a message on fsl_spi hardware, this should be very unusual" * tag 'spi-fix-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: fsl_spi: Don't change speed while chipselect is active commit 0a023cbb11e3d05c39dbb67317cb77ef22d47404 Merge: 2c91ce92c6d9 cb3543cff90a Author: Linus Torvalds Date: Fri Dec 23 14:38:00 2022 -0800 Merge tag 'regulator-fix-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "Two core fixes here, one for a long standing race which some Qualcomm systems have started triggering with their UFS driver and another fixing a problem with supply lookup introduced by the fixes for devm related use after free issues that were introduced in this merge window" * tag 'regulator-fix-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: core: fix deadlock on regulator enable regulator: core: Fix resolve supply lookup issue commit 523dfa96add75e60cfe6bf5a1c8f713635cd6b73 Author: Arnd Bergmann Date: Thu Dec 15 17:34:49 2022 +0100 drm/tests: reduce drm_mm_test stack usage The check_reserve_boundaries function uses a lot of kernel stack, and it gets inlined by clang, which makes __drm_test_mm_reserve use even more of it, to the point of hitting the warning limit: drivers/gpu/drm/tests/drm_mm_test.c:344:12: error: stack frame size (1048) exceeds limit (1024) in '__drm_test_mm_reserve' [-Werror,-Wframe-larger-than] When building with gcc, this does not happen, but the structleak plugin can similarly increase the stack usage and needs to be disabled, as we do for all other kunit users. Signed-off-by: Arnd Bergmann Reviewed-by: Maíra Canal Reviewed-by: Nathan Chancellor Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221215163511.266214-1-arnd@kernel.org drivers/gpu/drm/tests/Makefile | 2 ++ drivers/gpu/drm/tests/drm_mm_test.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit 2c91ce92c6d99fe8ed0fde2e67c19d40f062e8a3 Merge: 51094a24b85e 2d63e6a3d971 Author: Linus Torvalds Date: Fri Dec 23 13:56:41 2022 -0800 Merge tag 'coccinelle-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux Pull coccicheck update from Julia Lawall: "Modernize use of grep in coccicheck: Use 'grep -E' instead of 'egrep'" * tag 'coccinelle-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux: scripts: coccicheck: use "grep -E" instead of "egrep" commit fcbb408a1aaf426f88d8fb3b4c14e3625745b02f Author: Stanislav Fomichev Date: Thu Dec 22 13:39:58 2022 -0800 selftests/bpf: Add host-tools to gitignore Shows up when cross-compiling: HOST_SCRATCH_DIR := $(OUTPUT)/host-tools vs SCRATCH_DIR := $(OUTPUT)/tools HOST_SCRATCH_DIR := $(SCRATCH_DIR) Reported-by: John Sperbeck Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221222213958.2302320-1-sdf@google.com tools/testing/selftests/bpf/.gitignore | 1 + 1 file changed, 1 insertion(+) commit 51094a24b85e29138b7fa82ef1e1b4fe19c90046 Merge: edb23125fd4a cf8016408d88 Author: Linus Torvalds Date: Fri Dec 23 12:00:24 2022 -0800 Merge tag 'hardening-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull kernel hardening fixes from Kees Cook: - Fix CFI failure with KASAN (Sami Tolvanen) - Fix LKDTM + CFI under GCC 7 and 8 (Kristina Martsenko) - Limit CONFIG_ZERO_CALL_USED_REGS to Clang > 15.0.6 (Nathan Chancellor) - Ignore "contents" argument in LoadPin's LSM hook handling - Fix paste-o in /sys/kernel/warn_count API docs - Use READ_ONCE() consistently for oops/warn limit reading * tag 'hardening-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: cfi: Fix CFI failure with KASAN exit: Use READ_ONCE() for all oops/warn limit reads security: Restrict CONFIG_ZERO_CALL_USED_REGS to gcc or clang > 15.0.6 lkdtm: cfi: Make PAC test work with GCC 7 and 8 docs: Fix path paste-o for /sys/kernel/warn_count LoadPin: Ignore the "contents" argument of the LSM hooks commit 256cbafb0a9a3b340bd4798ad77bf0d93ee35ae8 Merge: 7fac54b93ad1 8ee57c7b8406 Author: Jakub Kicinski Date: Fri Dec 23 12:00:09 2022 -0800 Merge branch 'net-hns3-fix-some-bug-for-hns3' Hao Lan says: ==================== net: hns3: fix some bug for hns3 There are some bugfixes for the HNS3 ethernet driver. patch#1 fix miss checking for rx packet. patch#2 fixes VF promisc mode not update when mac table full bug, and patch#3 fixes a nterrupts not initialization in VF FLR bug. ==================== Link: https://lore.kernel.org/r/20221222064343.61537-1-lanhao@huawei.com Signed-off-by: Jakub Kicinski commit 8ee57c7b8406c7aa8ca31e014440c87c6383f429 Author: Jian Shen Date: Thu Dec 22 14:43:43 2022 +0800 net: hns3: fix VF promisc mode not update when mac table full Currently, it missed set HCLGE_VPORT_STATE_PROMISC_CHANGE flag for VF when vport->overflow_promisc_flags changed. So the VF won't check whether to update promisc mode in this case. So add it. Fixes: 1e6e76101fd9 ("net: hns3: configure promisc mode for VF asynchronously") Signed-off-by: Jian Shen Signed-off-by: Hao Lan Signed-off-by: Jakub Kicinski .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 75 +++++++++++++--------- 1 file changed, 43 insertions(+), 32 deletions(-) commit 7d89b53cea1a702f97117fb4361523519bb1e52c Author: Jian Shen Date: Thu Dec 22 14:43:42 2022 +0800 net: hns3: fix miss L3E checking for rx packet For device supports RXD advanced layout, the driver will return directly if the hardware finish the checksum calculate. It cause missing L3E checking for ip packets. Fixes it. Fixes: 1ddc028ac849 ("net: hns3: refactor out RX completion checksum") Signed-off-by: Jian Shen Signed-off-by: Hao Lan Signed-off-by: Jakub Kicinski drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 09e6b30eeb254f1818a008cace3547159e908dfd Author: Jie Wang Date: Thu Dec 22 14:43:41 2022 +0800 net: hns3: add interrupts re-initialization while doing VF FLR Currently keep alive message between PF and VF may be lost and the VF is unalive in PF. So the VF will not do reset during PF FLR reset process. This would make the allocated interrupt resources of VF invalid and VF would't receive or respond to PF any more. So this patch adds VF interrupts re-initialization during VF FLR for VF recovery in above cases. Fixes: 862d969a3a4d ("net: hns3: do VF's pci re-initialization while PF doing FLR") Signed-off-by: Jie Wang Signed-off-by: Hao Lan Signed-off-by: Jakub Kicinski drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit edb23125fd4a79003012bc619d2c604da922865e Merge: 59d2c635f6cf beca3e311a49 Author: Linus Torvalds Date: Fri Dec 23 11:55:54 2022 -0800 Merge tag 'pstore-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore fixes from Kees Cook: - Switch pmsg_lock to an rt_mutex to avoid priority inversion (John Stultz) - Correctly assign mem_type property (Luca Stefani) * tag 'pstore-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: Properly assign mem_type property pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion commit 59d2c635f6cfb0a8c7e5acb06b10c4e587fbfd1a Merge: e3b862ed893b 3622b86f49f8 Author: Linus Torvalds Date: Fri Dec 23 11:44:20 2022 -0800 Merge tag 'dma-mapping-2022-12-23' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: "Fix up the sound code to not pass __GFP_COMP to the non-coherent DMA allocator, as it copes with that just as badly as the coherent allocator, and then add a check to make sure no one passes the flag ever again" * tag 'dma-mapping-2022-12-23' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: reject GFP_COMP for noncoherent allocations ALSA: memalloc: don't use GFP_COMP for non-coherent dma allocations commit e3b862ed893bf030ebdd78ead99647374a2cfd47 Merge: a27405b2ed9c 1a4f69ef15ec Author: Linus Torvalds Date: Fri Dec 23 11:39:18 2022 -0800 Merge tag '9p-for-6.2-rc1' of https://github.com/martinetd/linux Pull 9p updates from Dominique Martinet: - improve p9_check_errors to check buffer size instead of msize when possible (e.g. not zero-copy) - some more syzbot and KCSAN fixes - minor headers include cleanup * tag '9p-for-6.2-rc1' of https://github.com/martinetd/linux: 9p/client: fix data race on req->status net/9p: fix response size check in p9_check_errors() net/9p: distinguish zero-copy requests 9p/xen: do not memcpy header into req->rc 9p: set req refcount to zero to avoid uninitialized usage 9p/net: Remove unneeded idr.h #include 9p/fs: Remove unneeded idr.h #include commit a27405b2ed9c7717ac1ea5587d465234a592c3b3 Merge: 55c7d6a91d42 6bf5f9a8b408 Author: Linus Torvalds Date: Fri Dec 23 11:15:48 2022 -0800 Merge tag 'sound-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull more sound updates from Takashi Iwai: "A few more updates for 6.2: most of changes are about ASoC device-specific fixes. - Lots of ASoC Intel AVS extensions and refactoring - Quirks for ASoC Intel SOF as well as regression fixes - ASoC Mediatek and Rockchip fixes - Intel HD-audio HDMI workarounds - Usual HD- and USB-audio device-specific quirks" * tag 'sound-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (54 commits) ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless ALSA: azt3328: Remove the unused function snd_azf3328_codec_outl() ASoC: lochnagar: Fix unused lochnagar_of_match warning ASoC: Intel: Add HP Stream 8 to bytcr_rt5640.c ASoC: SOF: mediatek: initialize panic_info to zero ASoC: rt5670: Remove unbalanced pm_runtime_put() ASoC: Intel: bytcr_rt5640: Add quirk for the Advantech MICA-071 tablet ASoC: Intel: soc-acpi: update codec addr on 0C11/0C4F product ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume() ASoC: wm8994: Fix potential deadlock ASoC: mediatek: mt8195: add sof be ops to check audio active ASoC: SOF: Revert: "core: unregister clients and machine drivers in .shutdown" ASoC: SOF: Intel: pci-tgl: unblock S5 entry if DMA stop has failed" ALSA: hda/hdmi: fix stream-id config keep-alive for rt suspend ALSA: hda/hdmi: set default audio parameters for KAE silent-stream ALSA: hda/hdmi: fix i915 silent stream programming flow ALSA: hda: Error out if invalid stream is being setup ASoC: dt-bindings: fsl-sai: Reinstate i.MX93 SAI compatible string ASoC: soc-pcm.c: Clear DAIs parameters after stream_active is updated ASoC: codecs: wcd-clsh: Remove the unused function ... commit 55c7d6a91d42ad98cbfb10da077ce8bb7084dc0e Merge: 06d65a6f6401 fe8f5b2f7bec Author: Linus Torvalds Date: Fri Dec 23 11:09:44 2022 -0800 Merge tag 'drm-next-2022-12-23' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Holiday fixes! Two batches from amd, and one group of i915 changes. amdgpu: - Spelling fix - BO pin fix - Properly handle polaris 10/11 overlap asics - GMC9 fix - SR-IOV suspend fix - DCN 3.1.4 fix - KFD userptr locking fix - SMU13.x fixes - GDS/GWS/OA handling fix - Reserved VMID handling fixes - FRU EEPROM fix - BO validation fixes - Avoid large variable on the stack - S0ix fixes - SMU 13.x fixes - VCN fix - Add missing fence reference amdkfd: - Fix init vm error handling - Fix double release of compute pasid i915 - Documentation fixes - OA-perf related fix - VLV/CHV HDMI/DP audio fix - Display DDI/Transcoder fix - Migrate fixes" * tag 'drm-next-2022-12-23' of git://anongit.freedesktop.org/drm/drm: (39 commits) drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency drm/amdgpu: enable VCN DPG for GC IP v11.0.4 drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0 drm/amd/pm: correct the fan speed retrieving in PWM for some SMU13 asics drm/amd/pm: bump SMU13.0.0 driver_if header to version 0x34 drm/amdgpu: skip MES for S0ix as well since it's part of GFX drm/amd/pm: avoid large variable on kernel stack drm/amdkfd: Fix double release compute pasid drm/amdkfd: Fix kfd_process_device_init_vm error handling drm/amd/pm: update SMU13.0.0 reported maximum shader clock drm/amd/pm: correct SMU13.0.0 pstate profiling clock settings drm/amd/pm: enable GPO dynamic control support for SMU13.0.7 drm/amd/pm: enable GPO dynamic control support for SMU13.0.0 drm/amdgpu: revert "generally allow over-commit during BO allocation" drm/amdgpu: Remove unnecessary domain argument drm/amdgpu: Fix size validation for non-exclusive domains (v4) drm/amdgpu: Check if fru_addr is not NULL (v2) drm/i915/ttm: consider CCS for backup objects drm/i915/migrate: fix corner case in CCS aux copying drm/amdgpu: rework reserved VMID handling ... commit 06d65a6f640118430b894273914aa8d62d2cf637 Merge: 699aee7b47db 24b333a866a1 Author: Linus Torvalds Date: Fri Dec 23 10:49:45 2022 -0800 Merge tag 'mips_6.2_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: "Fixes due to DT changes" * tag 'mips_6.2_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: dts: bcm63268: Add missing properties to the TWD node MIPS: ralink: mt7621: avoid to init common ralink reset controller commit 699aee7b47dbb1d3c30bf24f3c905eff366d9571 Merge: 8395ae05cb5a e96b95c2b7a6 Author: Linus Torvalds Date: Fri Dec 23 10:45:00 2022 -0800 Merge tag 'mm-hotfixes-stable-2022-12-22-14-34' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull hotfixes from Andrew Morton: "Eight fixes, all cc:stable. One is for gcov and the remainder are MM" * tag 'mm-hotfixes-stable-2022-12-22-14-34' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: 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 beca3e311a49cd3c55a056096531737d7afa4361 Author: Luca Stefani Date: Thu Dec 22 14:10:49 2022 +0100 pstore: Properly assign mem_type property If mem-type is specified in the device tree it would end up overriding the record_size field instead of populating mem_type. As record_size is currently parsed after the improper assignment with default size 0 it continued to work as expected regardless of the value found in the device tree. Simply changing the target field of the struct is enough to get mem-type working as expected. Fixes: 9d843e8fafc7 ("pstore: Add mem_type property DT parsing support") Cc: stable@vger.kernel.org Signed-off-by: Luca Stefani Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221222131049.286288-1-luca@osomprivacy.com fs/pstore/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f4fec5943407318b9523f01ce1f5d668c028332 Author: John Stultz Date: Wed Dec 21 05:18:55 2022 +0000 pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES In commit 76d62f24db07 ("pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion") I changed a lock to an rt_mutex. However, its possible that CONFIG_RT_MUTEXES is not enabled, which then results in a build failure, as the 0day bot detected: https://lore.kernel.org/linux-mm/202212211244.TwzWZD3H-lkp@intel.com/ Thus this patch changes CONFIG_PSTORE_PMSG to select CONFIG_RT_MUTEXES, which ensures the build will not fail. Cc: Wei Wang Cc: Midas Chien Cc: Connor O'Brien Cc: Kees Cook Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Cc: kernel test robot Cc: kernel-team@android.com Fixes: 76d62f24db07 ("pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion") Reported-by: kernel test robot Signed-off-by: John Stultz Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221221051855.15761-1-jstultz@google.com fs/pstore/Kconfig | 1 + 1 file changed, 1 insertion(+) commit cf8016408d880afe9c5dc495af40dc2932874e77 Author: Sami Tolvanen Date: Thu Dec 22 22:57:47 2022 +0000 cfi: Fix CFI failure with KASAN When CFI_CLANG and KASAN are both enabled, LLVM doesn't generate a CFI type hash for asan.module_ctor functions in translation units where CFI is disabled, which leads to a CFI failure during boot when do_ctors calls the affected constructors: CFI failure at do_basic_setup+0x64/0x90 (target: asan.module_ctor+0x0/0x28; expected type: 0xa540670c) Specifically, this happens because CFI is disabled for kernel/cfi.c. There's no reason to keep CFI disabled here anymore, so fix the failure by not filtering out CC_FLAGS_CFI for the file. Note that https://reviews.llvm.org/rG3b14862f0a96 fixed the issue where LLVM didn't emit CFI type hashes for any sanitizer constructors, but now type hashes are emitted correctly for TUs that use CFI. Link: https://github.com/ClangBuiltLinux/linux/issues/1742 Fixes: 89245600941e ("cfi: Switch to -fsanitize=kcfi") Reported-by: Mark Rutland Signed-off-by: Sami Tolvanen Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221222225747.3538676-1-samitolvanen@google.com kernel/Makefile | 3 --- 1 file changed, 3 deletions(-) commit 50a9ac25985c037d45ee6d7e3a7ae198a63b9266 Author: Sean Christopherson Date: Tue Dec 13 03:30:29 2022 +0000 KVM: x86/mmu: Don't install TDP MMU SPTE if SP has unexpected level Don't install a leaf TDP MMU SPTE if the parent page's level doesn't match the target level of the fault, and instead have the vCPU retry the faulting instruction after warning. Continuing on is completely unnecessary as the absolute worst case scenario of retrying is DoSing the vCPU, whereas continuing on all but guarantees bigger explosions, e.g. ------------[ cut here ]------------ kernel BUG at arch/x86/kvm/mmu/tdp_mmu.c:559! invalid opcode: 0000 [#1] SMP CPU: 1 PID: 1025 Comm: nx_huge_pages_t Tainted: G W 6.1.0-rc4+ #64 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:__handle_changed_spte.cold+0x95/0x9c RSP: 0018:ffffc9000072faf8 EFLAGS: 00010246 RAX: 00000000000000c1 RBX: ffffc90000731000 RCX: 0000000000000027 RDX: 0000000000000000 RSI: 00000000ffffdfff RDI: ffff888277c5b4c8 RBP: 0600000112400bf3 R08: ffff888277c5b4c0 R09: ffffc9000072f9a0 R10: 0000000000000001 R11: 0000000000000001 R12: 06000001126009f3 R13: 0000000000000002 R14: 0000000012600901 R15: 0000000012400b01 FS: 00007fba9f853740(0000) GS:ffff888277c40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000010aa7a003 CR4: 0000000000172ea0 Call Trace: kvm_tdp_mmu_map+0x3b0/0x510 kvm_tdp_page_fault+0x10c/0x130 kvm_mmu_page_fault+0x103/0x680 vmx_handle_exit+0x132/0x5a0 [kvm_intel] vcpu_enter_guest+0x60c/0x16f0 kvm_arch_vcpu_ioctl_run+0x1e2/0x9d0 kvm_vcpu_ioctl+0x271/0x660 __x64_sys_ioctl+0x80/0xb0 do_syscall_64+0x2b/0x50 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Modules linked in: kvm_intel ---[ end trace 0000000000000000 ]--- Signed-off-by: Sean Christopherson Message-Id: <20221213033030.83345-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/tdp_mmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 21a36ac6b6c7059965bac0cc73ef3cbb8ef576dd Author: Sean Christopherson Date: Tue Dec 13 03:30:28 2022 +0000 KVM: x86/mmu: Re-check under lock that TDP MMU SP hugepage is disallowed Re-check sp->nx_huge_page_disallowed under the tdp_mmu_pages_lock spinlock when adding a new shadow page in the TDP MMU. To ensure the NX reclaim kthread can't see a not-yet-linked shadow page, the page fault path links the new page table prior to adding the page to possible_nx_huge_pages. If the page is zapped by different task, e.g. because dirty logging is disabled, between linking the page and adding it to the list, KVM can end up triggering use-after-free by adding the zapped SP to the aforementioned list, as the zapped SP's memory is scheduled for removal via RCU callback. The bug is detected by the sanity checks guarded by CONFIG_DEBUG_LIST=y, i.e. the below splat is just one possible signature. ------------[ cut here ]------------ list_add corruption. prev->next should be next (ffffc9000071fa70), but was ffff88811125ee38. (prev=ffff88811125ee38). WARNING: CPU: 1 PID: 953 at lib/list_debug.c:30 __list_add_valid+0x79/0xa0 Modules linked in: kvm_intel CPU: 1 PID: 953 Comm: nx_huge_pages_t Tainted: G W 6.1.0-rc4+ #71 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:__list_add_valid+0x79/0xa0 RSP: 0018:ffffc900006efb68 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff888116cae8a0 RCX: 0000000000000027 RDX: 0000000000000027 RSI: 0000000100001872 RDI: ffff888277c5b4c8 RBP: ffffc90000717000 R08: ffff888277c5b4c0 R09: ffffc900006efa08 R10: 0000000000199998 R11: 0000000000199a20 R12: ffff888116cae930 R13: ffff88811125ee38 R14: ffffc9000071fa70 R15: ffff88810b794f90 FS: 00007fc0415d2740(0000) GS:ffff888277c40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000115201006 CR4: 0000000000172ea0 Call Trace: track_possible_nx_huge_page+0x53/0x80 kvm_tdp_mmu_map+0x242/0x2c0 kvm_tdp_page_fault+0x10c/0x130 kvm_mmu_page_fault+0x103/0x680 vmx_handle_exit+0x132/0x5a0 [kvm_intel] vcpu_enter_guest+0x60c/0x16f0 kvm_arch_vcpu_ioctl_run+0x1e2/0x9d0 kvm_vcpu_ioctl+0x271/0x660 __x64_sys_ioctl+0x80/0xb0 do_syscall_64+0x2b/0x50 entry_SYSCALL_64_after_hwframe+0x46/0xb0 ---[ end trace 0000000000000000 ]--- Fixes: 61f94478547b ("KVM: x86/mmu: Set disallowed_nx_huge_page in TDP MMU before setting SPTE") Reported-by: Greg Thelen Analyzed-by: David Matlack Cc: David Matlack Cc: Ben Gardon Cc: Mingwei Zhang Signed-off-by: Sean Christopherson Message-Id: <20221213033030.83345-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/tdp_mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 80a3e4ae962de33ff6a94e798c80e56e1fed4d10 Author: Sean Christopherson Date: Tue Dec 13 03:30:27 2022 +0000 KVM: x86/mmu: Map TDP MMU leaf SPTE iff target level is reached Map the leaf SPTE when handling a TDP MMU page fault if and only if the target level is reached. A recent commit reworked the retry logic and incorrectly assumed that walking SPTEs would never "fail", as the loop either bails (retries) or installs parent SPs. However, the iterator itself will bail early if it detects a frozen (REMOVED) SPTE when stepping down. The TDP iterator also rereads the current SPTE before stepping down specifically to avoid walking into a part of the tree that is being removed, which means it's possible to terminate the loop without the guts of the loop observing the frozen SPTE, e.g. if a different task zaps a parent SPTE between the initial read and try_step_down()'s refresh. Mapping a leaf SPTE at the wrong level results in all kinds of badness as page table walkers interpret the SPTE as a page table, not a leaf, and walk into the weeds. ------------[ cut here ]------------ WARNING: CPU: 1 PID: 1025 at arch/x86/kvm/mmu/tdp_mmu.c:1070 kvm_tdp_mmu_map+0x481/0x510 Modules linked in: kvm_intel CPU: 1 PID: 1025 Comm: nx_huge_pages_t Tainted: G W 6.1.0-rc4+ #64 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kvm_tdp_mmu_map+0x481/0x510 RSP: 0018:ffffc9000072fba8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffffc9000072fcc0 RCX: 0000000000000027 RDX: 0000000000000027 RSI: 00000000ffffdfff RDI: ffff888277c5b4c8 RBP: ffff888107d45a10 R08: ffff888277c5b4c0 R09: ffffc9000072fa48 R10: 0000000000000001 R11: 0000000000000001 R12: ffffc9000073a0e0 R13: ffff88810fc54800 R14: ffff888107d1ae60 R15: ffff88810fc54f90 FS: 00007fba9f853740(0000) GS:ffff888277c40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000010aa7a003 CR4: 0000000000172ea0 Call Trace: kvm_tdp_page_fault+0x10c/0x130 kvm_mmu_page_fault+0x103/0x680 vmx_handle_exit+0x132/0x5a0 [kvm_intel] vcpu_enter_guest+0x60c/0x16f0 kvm_arch_vcpu_ioctl_run+0x1e2/0x9d0 kvm_vcpu_ioctl+0x271/0x660 __x64_sys_ioctl+0x80/0xb0 do_syscall_64+0x2b/0x50 entry_SYSCALL_64_after_hwframe+0x46/0xb0 ---[ end trace 0000000000000000 ]--- Invalid SPTE change: cannot replace a present leaf SPTE with another present leaf SPTE mapping a different PFN! as_id: 0 gfn: 100200 old_spte: 600000112400bf3 new_spte: 6000001126009f3 level: 2 ------------[ cut here ]------------ kernel BUG at arch/x86/kvm/mmu/tdp_mmu.c:559! invalid opcode: 0000 [#1] SMP CPU: 1 PID: 1025 Comm: nx_huge_pages_t Tainted: G W 6.1.0-rc4+ #64 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:__handle_changed_spte.cold+0x95/0x9c RSP: 0018:ffffc9000072faf8 EFLAGS: 00010246 RAX: 00000000000000c1 RBX: ffffc90000731000 RCX: 0000000000000027 RDX: 0000000000000000 RSI: 00000000ffffdfff RDI: ffff888277c5b4c8 RBP: 0600000112400bf3 R08: ffff888277c5b4c0 R09: ffffc9000072f9a0 R10: 0000000000000001 R11: 0000000000000001 R12: 06000001126009f3 R13: 0000000000000002 R14: 0000000012600901 R15: 0000000012400b01 FS: 00007fba9f853740(0000) GS:ffff888277c40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000010aa7a003 CR4: 0000000000172ea0 Call Trace: kvm_tdp_mmu_map+0x3b0/0x510 kvm_tdp_page_fault+0x10c/0x130 kvm_mmu_page_fault+0x103/0x680 vmx_handle_exit+0x132/0x5a0 [kvm_intel] vcpu_enter_guest+0x60c/0x16f0 kvm_arch_vcpu_ioctl_run+0x1e2/0x9d0 kvm_vcpu_ioctl+0x271/0x660 __x64_sys_ioctl+0x80/0xb0 do_syscall_64+0x2b/0x50 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Modules linked in: kvm_intel ---[ end trace 0000000000000000 ]--- Fixes: 63d28a25e04c ("KVM: x86/mmu: simplify kvm_tdp_mmu_map flow when guest has to retry") Cc: Robert Hoo Signed-off-by: Sean Christopherson Message-Id: <20221213033030.83345-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/tdp_mmu.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit f5d16bb9be68b20c78fc3d93fa243eb1f0b9fa53 Author: Sean Christopherson Date: Tue Dec 13 03:30:26 2022 +0000 KVM: x86/mmu: Don't attempt to map leaf if target TDP MMU SPTE is frozen Hoist the is_removed_spte() check above the "level == goal_level" check when walking SPTEs during a TDP MMU page fault to avoid attempting to map a leaf entry if said entry is frozen by a different task/vCPU. ------------[ cut here ]------------ WARNING: CPU: 3 PID: 939 at arch/x86/kvm/mmu/tdp_mmu.c:653 kvm_tdp_mmu_map+0x269/0x4b0 Modules linked in: kvm_intel CPU: 3 PID: 939 Comm: nx_huge_pages_t Not tainted 6.1.0-rc4+ #67 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kvm_tdp_mmu_map+0x269/0x4b0 RSP: 0018:ffffc9000068fba8 EFLAGS: 00010246 RAX: 00000000000005a0 RBX: ffffc9000068fcc0 RCX: 0000000000000005 RDX: ffff88810741f000 RSI: ffff888107f04600 RDI: ffffc900006a3000 RBP: 060000010b000bf3 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 000ffffffffff000 R12: 0000000000000005 R13: ffff888113670000 R14: ffff888107464958 R15: 0000000000000000 FS: 00007f01c942c740(0000) GS:ffff888277cc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000117013006 CR4: 0000000000172ea0 Call Trace: kvm_tdp_page_fault+0x10c/0x130 kvm_mmu_page_fault+0x103/0x680 vmx_handle_exit+0x132/0x5a0 [kvm_intel] vcpu_enter_guest+0x60c/0x16f0 kvm_arch_vcpu_ioctl_run+0x1e2/0x9d0 kvm_vcpu_ioctl+0x271/0x660 __x64_sys_ioctl+0x80/0xb0 do_syscall_64+0x2b/0x50 entry_SYSCALL_64_after_hwframe+0x46/0xb0 ---[ end trace 0000000000000000 ]--- Fixes: 63d28a25e04c ("KVM: x86/mmu: simplify kvm_tdp_mmu_map flow when guest has to retry") Cc: Robert Hoo Signed-off-by: Sean Christopherson Reviewed-by: Robert Hoo Message-Id: <20221213033030.83345-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/tdp_mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a0860d68a25dee4e51e7d3e067a66ca765776fe8 Author: Sean Christopherson Date: Tue Dec 13 06:23:04 2022 +0000 KVM: nVMX: Don't stuff secondary execution control if it's not supported When stuffing the allowed secondary execution controls for nested VMX in response to CPUID updates, don't set the allowed-1 bit for a feature that isn't supported by KVM, i.e. isn't allowed by the canonical vmcs_config. WARN if KVM attempts to manipulate a feature that isn't supported. All features that are currently stuffed are always advertised to L1 for nested VMX if they are supported in KVM's base configuration, and no additional features should ever be added to the CPUID-induced stuffing (updating VMX MSRs in response to CPUID updates is a long-standing KVM flaw that is slowly being fixed). Signed-off-by: Sean Christopherson Message-Id: <20221213062306.667649-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 31de69f4eea77b28a9724b3fa55aae104fc91fc7 Author: Sean Christopherson Date: Tue Dec 13 06:23:03 2022 +0000 KVM: nVMX: Properly expose ENABLE_USR_WAIT_PAUSE control to L1 Set ENABLE_USR_WAIT_PAUSE in KVM's supported VMX MSR configuration if the feature is supported in hardware and enabled in KVM's base, non-nested configuration, i.e. expose ENABLE_USR_WAIT_PAUSE to L1 if it's supported. This fixes a bug where saving/restoring, i.e. migrating, a vCPU will fail if WAITPKG (the associated CPUID feature) is enabled for the vCPU, and obviously allows L1 to enable the feature for L2. KVM already effectively exposes ENABLE_USR_WAIT_PAUSE to L1 by stuffing the allowed-1 control ina vCPU's virtual MSR_IA32_VMX_PROCBASED_CTLS2 when updating secondary controls in response to KVM_SET_CPUID(2), but (a) that depends on flawed code (KVM shouldn't touch VMX MSRs in response to CPUID updates) and (b) runs afoul of vmx_restore_control_msr()'s restriction that the guest value must be a strict subset of the supported host value. Although no past commit explicitly enabled nested support for WAITPKG, doing so is safe and functionally correct from an architectural perspective as no additional KVM support is needed to virtualize TPAUSE, UMONITOR, and UMWAIT for L2 relative to L1, and KVM already forwards VM-Exits to L1 as necessary (commit bf653b78f960, "KVM: vmx: Introduce handle_unexpected_vmexit and handle WAITPKG vmexit"). Note, KVM always keeps the hosts MSR_IA32_UMWAIT_CONTROL resident in hardware, i.e. always runs both L1 and L2 with the host's power management settings for TPAUSE and UMWAIT. See commit bf09fb6cba4f ("KVM: VMX: Stop context switching MSR_IA32_UMWAIT_CONTROL") for more details. Fixes: e69e72faa3a0 ("KVM: x86: Add support for user wait instructions") Cc: stable@vger.kernel.org Reported-by: Aaron Lewis Reported-by: Yu Zhang Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Message-Id: <20221213062306.667649-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 057b18756b464729bc787ed4e6b44abb9f5c3a38 Author: Sean Christopherson Date: Tue Dec 20 15:42:24 2022 +0000 KVM: nVMX: Document that ignoring memory failures for VMCLEAR is deliberate Explicitly drop the result of kvm_vcpu_write_guest() when writing the "launch state" as part of VMCLEAR emulation, and add a comment to call out that KVM's behavior is architecturally valid. Intel's pseudocode effectively says that VMCLEAR is a nop if the target VMCS address isn't in memory, e.g. if the address points at MMIO. Add a FIXME to call out that suppressing failures on __copy_to_user() is wrong, as memory (a memslot) does exist in that case. Punt the issue to the future as open coding kvm_vcpu_write_guest() just to make sure the guest dies with -EFAULT isn't worth the extra complexity. The flaw will need to be addressed if KVM ever does something intelligent on uaccess failures, e.g. to support post-copy demand paging, but in that case KVM will need a more thorough overhaul, i.e. VMCLEAR shouldn't need to open code a core KVM helper. No functional change intended. Reported-by: coverity-bot Addresses-Coverity-ID: 1527765 ("Error handling issues") Fixes: 587d7e72aedc ("kvm: nVMX: VMCLEAR should not cause the vCPU to shut down") Cc: Jim Mattson Signed-off-by: Sean Christopherson Message-Id: <20221220154224.526568-1-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 53800f88d414525d3fdc5c84629faa0b6bc35b3b Author: Sean Christopherson Date: Mon Dec 19 22:04:16 2022 +0000 KVM: selftests: Zero out valid_bank_mask for "all" case in Hyper-V IPI test Zero out the valid_bank_mask when using the fast variant of HVCALL_SEND_IPI_EX to send IPIs to all vCPUs. KVM requires the "var_cnt" and "valid_bank_mask" inputs to be consistent even when targeting all vCPUs. See commit bd1ba5732bb9 ("KVM: x86: Get the number of Hyper-V sparse banks from the VARHEAD field"). Fixes: 998489245d84 ("KVM: selftests: Hyper-V PV IPI selftest") Cc: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Message-Id: <20221219220416.395329-1-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/hyperv_ipi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 77b1908e10eccf34310ffd95b0b455c01aa76286 Author: Sean Christopherson Date: Tue Dec 20 15:34:27 2022 +0000 KVM: x86: Sanity check inputs to kvm_handle_memory_failure() Add a sanity check in kvm_handle_memory_failure() to assert that a valid x86_exception structure is provided if the memory "failure" wants to propagate a fault into the guest. If a memory failure happens during a direct guest physical memory access, e.g. for nested VMX, KVM hardcodes the failure to X86EMUL_IO_NEEDED and doesn't provide an exception pointer (because the exception struct would just be filled with garbage). Signed-off-by: Sean Christopherson Message-Id: <20221220153427.514032-1-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 3 +++ 1 file changed, 3 insertions(+) commit 3c649918b764c0aaef22ea65d514bac5e2324ec0 Author: Peng Hao Date: Tue Dec 6 17:20:15 2022 +0800 KVM: x86: Simplify kvm_apic_hw_enabled kvm_apic_hw_enabled() only needs to return bool, there is no place to use the return value of MSR_IA32_APICBASE_ENABLE. Signed-off-by: Peng Hao Message-Id: Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b9e13d2de73b5513c2ceffe0f62eab40206a126 Author: Vitaly Kuznetsov Date: Thu Dec 8 11:27:00 2022 +0100 KVM: x86: hyper-v: Fix 'using uninitialized value' Coverity warning In kvm_hv_flush_tlb(), 'data_offset' and 'consumed_xmm_halves' variables are used in a mutually exclusive way: in 'hc->fast' we count in 'XMM halves' and increase 'data_offset' otherwise. Coverity discovered, that in one case both variables are incremented unconditionally. This doesn't seem to cause any issues as the only user of 'data_offset'/'consumed_xmm_halves' data is kvm_hv_get_tlb_flush_entries() -> kvm_hv_get_hc_data() which also takes into account 'hc->fast' but is still worth fixing. To make things explicit, put 'data_offset' and 'consumed_xmm_halves' to 'struct kvm_hv_hcall' as a union and use at call sites. This allows to remove explicit 'data_offset'/'consumed_xmm_halves' parameters from kvm_hv_get_hc_data()/kvm_get_sparse_vp_set()/kvm_hv_get_tlb_flush_entries() helpers. Note: 'struct kvm_hv_hcall' is allocated on stack in kvm_hv_hypercall() and is not zeroed, consumers are supposed to initialize the appropriate field if needed. Reported-by: coverity-bot Addresses-Coverity-ID: 1527764 ("Uninitialized variables") Fixes: 260970862c88 ("KVM: x86: hyper-v: Handle HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST{,EX} calls gently") Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221208102700.959630-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 63 +++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 27 deletions(-) commit fceb3a36c29a957515d5156e5e7844ea040dc43d Author: Adamos Ttofari Date: Thu Dec 8 09:44:14 2022 +0000 KVM: x86: ioapic: Fix level-triggered EOI and userspace I/OAPIC reconfigure race When scanning userspace I/OAPIC entries, intercept EOI for level-triggered IRQs if the current vCPU has a pending and/or in-service IRQ for the vector in its local API, even if the vCPU doesn't match the new entry's destination. This fixes a race between userspace I/OAPIC reconfiguration and IRQ delivery that results in the vector's bit being left set in the remote IRR due to the eventual EOI not being forwarded to the userspace I/OAPIC. Commit 0fc5a36dd6b3 ("KVM: x86: ioapic: Fix level-triggered EOI and IOAPIC reconfigure race") fixed the in-kernel IOAPIC, but not the userspace IOAPIC configuration, which has a similar race. Fixes: 0fc5a36dd6b3 ("KVM: x86: ioapic: Fix level-triggered EOI and IOAPIC reconfigure race") Signed-off-by: Adamos Ttofari Reviewed-by: Sean Christopherson Message-Id: <20221208094415.12723-1-attofari@amazon.de> Signed-off-by: Paolo Bonzini arch/x86/kvm/irq_comm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 55c590adfe18b5380f7c4ae3696468bc5c916ee5 Author: Like Xu Date: Wed Dec 7 15:15:05 2022 +0800 KVM: x86/pmu: Prevent zero period event from being repeatedly released The current vPMU can reuse the same pmc->perf_event for the same hardware event via pmc_pause/resume_counter(), but this optimization does not apply to a portion of the TSX events (e.g., "event=0x3c,in_tx=1, in_tx_cp=1"), where event->attr.sample_period is legally zero at creation, thus making the perf call to perf_event_period() meaningless (no need to adjust sample period in this case), and instead causing such reusable perf_events to be repeatedly released and created. Avoid releasing zero sample_period events by checking is_sampling_event() to follow the previously enable/disable optimization. Signed-off-by: Like Xu Message-Id: <20221207071506.15733-2-likexu@tencent.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 3 ++- arch/x86/kvm/pmu.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 343190841a1f22b96996d9f8cfab902a4d1bfd0e Author: Jens Axboe Date: Fri Dec 23 06:37:08 2022 -0700 io_uring: check for valid register opcode earlier We only check the register opcode value inside the restricted ring section, move it into the main io_uring_register() function instead and check it up front. Signed-off-by: Jens Axboe io_uring/io_uring.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7fac54b93ad13e5e7ac237af33eb2a0940eaeea0 Author: Rong Tao Date: Wed Dec 21 20:36:27 2022 +0800 atm: uapi: fix spelling typos in comments Fix the typo of 'Unsuported' in atmbr2684.h Signed-off-by: Rong Tao Link: https://lore.kernel.org/r/tencent_F1354BEC925C65EA357E741E91DF2044E805@qq.com Signed-off-by: Jakub Kicinski include/uapi/linux/atmbr2684.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d8bee13ae9e316443c6666286360126a19c8d94 Author: Sean Anderson Date: Fri Dec 16 12:29:37 2022 -0500 powerpc: dts: t208x: Disable 10G on MAC1 and MAC2 There aren't enough resources to run these ports at 10G speeds. Disable 10G for these ports, reverting to the previous speed. Fixes: 36926a7d70c2 ("powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G") Reported-by: Camelia Alexandra Groza Signed-off-by: Sean Anderson Reviewed-by: Camelia Groza Tested-by: Camelia Groza Link: https://lore.kernel.org/r/20221216172937.2960054-1-sean.anderson@seco.com Signed-off-by: Jakub Kicinski arch/powerpc/boot/dts/fsl/t2081si-post.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit cedebd74cf3883f0384af9ec26b4e6f8f1964dd4 Author: Hao Sun Date: Thu Dec 22 10:44:14 2022 +0800 selftests/bpf: check null propagation only neither reg is PTR_TO_BTF_ID Verify that nullness information is not porpagated in the branches of register to register JEQ and JNE operations if one of them is PTR_TO_BTF_ID. Implement this in C level so we can use CO-RE. Signed-off-by: Hao Sun Suggested-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20221222024414.29539-2-sunhao.th@gmail.com Signed-off-by: Martin KaFai Lau .../selftests/bpf/prog_tests/jeq_infer_not_null.c | 9 +++++ .../selftests/bpf/progs/jeq_infer_not_null_fail.c | 42 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) commit 8374bfd5a3c90a5b250f7c087c4d2b8ac467b12e Author: Hao Sun Date: Thu Dec 22 10:44:13 2022 +0800 bpf: fix nullness propagation for reg to reg comparisons After befae75856ab, the verifier would propagate null information after JEQ/JNE, e.g., if two pointers, one is maybe_null and the other is not, the former would be marked as non-null in eq path. However, as comment "PTR_TO_BTF_ID points to a kernel struct that does not need to be null checked by the BPF program ... The verifier must keep this in mind and can make no assumptions about null or non-null when doing branch ...". If one pointer is maybe_null and the other is PTR_TO_BTF, the former is incorrectly marked non-null. The following BPF prog can trigger a null-ptr-deref, also see this report for more details[1]: 0: (18) r1 = map_fd ; R1_w=map_ptr(ks=4, vs=4) 2: (79) r6 = *(u64 *)(r1 +8) ; R6_w=bpf_map->inner_map_data ; R6 is PTR_TO_BTF_ID ; equals to null at runtime 3: (bf) r2 = r10 4: (07) r2 += -4 5: (62) *(u32 *)(r2 +0) = 0 6: (85) call bpf_map_lookup_elem#1 ; R0_w=map_value_or_null 7: (1d) if r6 == r0 goto pc+1 8: (95) exit ; from 7 to 9: R0=map_value R6=ptr_bpf_map 9: (61) r0 = *(u32 *)(r0 +0) ; null-ptr-deref 10: (95) exit So, make the verifier propagate nullness information for reg to reg comparisons only if neither reg is PTR_TO_BTF_ID. [1] https://lore.kernel.org/bpf/CACkBjsaFJwjC5oiw-1KXvcazywodwXo4zGYsRHwbr2gSG9WcSw@mail.gmail.com/T/#u Fixes: befae75856ab ("bpf: propagate nullness information for reg to reg comparisons") Signed-off-by: Hao Sun Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221222024414.29539-1-sunhao.th@gmail.com Signed-off-by: Martin KaFai Lau kernel/bpf/verifier.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 8395ae05cb5a2e31d36106e8c85efa11cda849be Merge: ff75ec43a2f6 68ad83188d78 Author: Linus Torvalds Date: Thu Dec 22 11:22:31 2022 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "Mostly small bug fixes and small updates. The only things of note is a qla2xxx fix for crash on hotplug and timeout and the addition of a user exposed abstraction layer for persistent reservation error return handling (which necessitates the conversion of nvme.c as well as SCSI)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qla2xxx: Fix crash when I/O abort times out nvme: Convert NVMe errors to PR errors scsi: sd: Convert SCSI errors to PR errors scsi: core: Rename status_byte to sg_status_byte block: Add error codes for common PR failures scsi: sd: sd_zbc: Trace zone append emulation scsi: libfc: Include the correct header commit ff75ec43a2f6fbf7049472312bab322d77eb1bde Merge: d1ac1a2b1426 a9eb558a5bea Author: Linus Torvalds Date: Thu Dec 22 11:17:34 2022 -0800 Merge tag 'afs-next-20221222' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull afs update from David Howells: "A fix for a couple of missing resource counter decrements, two small cleanups of now-unused bits of code and a patch to remove writepage support from afs" * tag 'afs-next-20221222' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: 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 commit 55171f2930be98c8a49991435cdf3a8b574353b6 Author: Anton Protopopov Date: Thu Dec 22 10:26:27 2022 +0000 bpftool: Fix linkage with statically built libllvm Since the commit eb9d1acf634b ("bpftool: Add LLVM as default library for disassembling JIT-ed programs") we might link the bpftool program with the libllvm library. This works fine when a shared libllvm library is available, but fails if we want to link bpftool with a statically built LLVM: [...] /usr/bin/ld: /usr/local/lib/libLLVMSupport.a(CrashRecoveryContext.cpp.o): in function `llvm::CrashRecoveryContextCleanup::~CrashRecoveryContextCleanup()': CrashRecoveryContext.cpp:(.text._ZN4llvm27CrashRecoveryContextCleanupD0Ev+0x17): undefined reference to `operator delete(void*, unsigned long)' /usr/bin/ld: /usr/local/lib/libLLVMSupport.a(CrashRecoveryContext.cpp.o): in function `llvm::CrashRecoveryContext::~CrashRecoveryContext()': CrashRecoveryContext.cpp:(.text._ZN4llvm20CrashRecoveryContextD2Ev+0xc8): undefined reference to `operator delete(void*, unsigned long)' [...] So in the case of static libllvm we need to explicitly link bpftool with required libraries, namely, libstdc++ and those provided by the `llvm-config --system-libs` command. We can distinguish between the shared and static cases by using the `llvm-config --shared-mode` command. Fixes: eb9d1acf634b ("bpftool: Add LLVM as default library for disassembling JIT-ed programs") Signed-off-by: Anton Protopopov Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221222102627.1643709-1-aspsk@isovalent.com tools/bpf/bpftool/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit d1ac1a2b14264e98c24db6f8c2bd452e695c7238 Merge: 9d2f6060fe4c 09e6f9f98370 Author: Linus Torvalds Date: Thu Dec 22 11:07:29 2022 -0800 Merge tag 'perf-tools-for-v6.2-2-2022-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull more perf tools updates from Arnaldo Carvalho de Melo: "perf tools fixes and improvements: - Don't stop building perf if python setuptools isn't installed, just disable the affected perf feature. - Remove explicit reference to python 2.x devel files, that warning is about python-devel, no matter what version, being unavailable and thus disabling the linking with libpython. - Don't use -Werror=switch-enum when building the python support that handles libtraceevent enumerations, as there is no good way to test if some specific enum entry is available with the libtraceevent installed on the system. - Introduce 'perf lock contention' --type-filter and --lock-filter, to filter by lock type and lock name: $ sudo ./perf lock record -a -- ./perf bench sched messaging $ sudo ./perf lock contention -E 5 -Y spinlock contended total wait max wait avg wait type caller 802 1.26 ms 11.73 us 1.58 us spinlock __wake_up_common_lock+0x62 13 787.16 us 105.44 us 60.55 us spinlock remove_wait_queue+0x14 12 612.96 us 78.70 us 51.08 us spinlock prepare_to_wait+0x27 114 340.68 us 12.61 us 2.99 us spinlock try_to_wake_up+0x1f5 83 226.38 us 9.15 us 2.73 us spinlock folio_lruvec_lock_irqsave+0x5e $ sudo ./perf lock contention -l contended total wait max wait avg wait address symbol 57 1.11 ms 42.83 us 19.54 us ffff9f4140059000 15 280.88 us 23.51 us 18.73 us ffffffff9d007a40 jiffies_lock 1 20.49 us 20.49 us 20.49 us ffffffff9d0d50c0 rcu_state 1 9.02 us 9.02 us 9.02 us ffff9f41759e9ba0 $ sudo ./perf lock contention -L jiffies_lock,rcu_state contended total wait max wait avg wait type caller 15 280.88 us 23.51 us 18.73 us spinlock tick_sched_do_timer+0x93 1 20.49 us 20.49 us 20.49 us spinlock __softirqentry_text_start+0xeb $ sudo ./perf lock contention -L ffff9f4140059000 contended total wait max wait avg wait type caller 38 779.40 us 42.83 us 20.51 us spinlock worker_thread+0x50 11 216.30 us 39.87 us 19.66 us spinlock queue_work_on+0x39 8 118.13 us 20.51 us 14.77 us spinlock kthread+0xe5 - Fix splitting CC into compiler and options when checking if a option is present in clang to build the python binding, needed in systems such as yocto that set CC to, e.g.: "gcc --sysroot=/a/b/c". - Refresh metris and events for Intel systems: alderlake. alderlake-n, bonnell, broadwell, broadwellde, broadwellx, cascadelakex, elkhartlake, goldmont, goldmontplus, haswell, haswellx, icelake, icelakex, ivybridge, ivytown, jaketown, knightslanding, meteorlake, nehalemep, nehalemex, sandybridge, sapphirerapids, silvermont, skylake, skylakex, snowridgex, tigerlake, westmereep-dp, westmereep-sp, westmereex. - Add vendor events files (JSON) for AMD Zen 4, from sections 2.1.15.4 "Core Performance Monitor Counters", 2.1.15.5 "L3 Cache Performance Monitor Counter"s and Section 7.1 "Fabric Performance Monitor Counter (PMC) Events" in the Processor Programming Reference (PPR) for AMD Family 19h Model 11h Revision B1 processors. This constitutes events which capture op dispatch, execution and retirement, branch prediction, L1 and L2 cache activity, TLB activity, L3 cache activity and data bandwidth for various links and interfaces in the Data Fabric. - Also, from the same PPR are metrics taken from Section 2.1.15.2 "Performance Measurement", including pipeline utilization, which are new to Zen 4 processors and useful for finding performance bottlenecks by analyzing activity at different stages of the pipeline. - Greatly improve the 'srcline', 'srcline_from', 'srcline_to' and 'srcfile' sort keys performance by postponing calling the external addr2line utility to the collapse phase of histogram bucketing. - Fix 'perf test' "all PMU test" to skip parametrized events, that requires setting up and are not supported by this test. - Update tools/ copies of kernel headers: features, disabled-features, fscrypt.h, i915_drm.h, msr-index.h, power pc syscall table and kvm.h. - Add .DELETE_ON_ERROR special Makefile target to clean up partially updated files on error. - Simplify the mksyscalltbl script for arm64 by avoiding to run the host compiler to create the syscall table, do it all just with the shell script. - Further fixes to honour quiet mode (-q)" * tag 'perf-tools-for-v6.2-2-2022-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (67 commits) perf python: Fix splitting CC into compiler and options perf scripting python: Don't be strict at handling libtraceevent enumerations perf arm64: Simplify mksyscalltbl perf build: Remove explicit reference to python 2.x devel files perf vendor events amd: Add Zen 4 mapping perf vendor events amd: Add Zen 4 metrics perf vendor events amd: Add Zen 4 uncore events perf vendor events amd: Add Zen 4 core events perf vendor events intel: Refresh westmereex events perf vendor events intel: Refresh westmereep-sp events perf vendor events intel: Refresh westmereep-dp events perf vendor events intel: Refresh tigerlake metrics and events perf vendor events intel: Refresh snowridgex events perf vendor events intel: Refresh skylakex metrics and events perf vendor events intel: Refresh skylake metrics and events perf vendor events intel: Refresh silvermont events perf vendor events intel: Refresh sapphirerapids metrics and events perf vendor events intel: Refresh sandybridge metrics and events perf vendor events intel: Refresh nehalemex events perf vendor events intel: Refresh nehalemep events ... commit e555c85792bd5f9828a2fd2ca9761f70efb1c77b Author: Mario Limonciello Date: Thu Dec 15 13:16:16 2022 -0600 ACPI: x86: s2idle: Stop using AMD specific codepath for Rembrandt+ After we introduced a module parameter and quirk infrastructure for picking the Microsoft GUID over the SOC vendor GUID we discovered that lots and lots of systems are getting this wrong. The table continues to grow, and is becoming unwieldy. We don't really have any benefit to forcing vendors to populate the AMD GUID. This is just extra work, and more and more vendors seem to mess it up. As the Microsoft GUID is used by Windows as well, it's very likely that it won't be messed up like this. So drop all the quirks forcing it and the Rembrandt behavior. This means that Cezanne or later effectively only run the Microsoft GUID codepath with the exception of HP Elitebook 8*5 G9. Fixes: fd894f05cf30 ("ACPI: x86: s2idle: If a new AMD _HID is missing assume Rembrandt") Cc: stable@vger.kernel.org # 6.1 Reported-by: Benjamin Cheng Reported-by: bilkow@tutanota.com Reported-by: Paul Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2292 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216768 Signed-off-by: Mario Limonciello Reviewed-by: Philipp Zabel Tested-by: Philipp Zabel Signed-off-by: Rafael J. Wysocki drivers/acpi/x86/s2idle.c | 87 ++--------------------------------------------- 1 file changed, 3 insertions(+), 84 deletions(-) commit 3ea45390e9c0d35805ef8357ace55594fd4233d0 Author: Mario Limonciello Date: Thu Dec 15 13:16:15 2022 -0600 ACPI: x86: s2idle: Force AMD GUID/_REV 2 on HP Elitebook 865 HP Elitebook 865 supports both the AMD GUID w/ _REV 2 and Microsoft GUID with _REV 0. Both have very similar code but the AMD GUID has a special workaround that is specific to a problem with spurious wakeups on systems with Qualcomm WLAN. This is believed to be a bug in the Qualcomm WLAN F/W (it doesn't affect any other WLAN H/W). If this WLAN firmware is fixed this quirk can be dropped. Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki drivers/acpi/x86/s2idle.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 3cf3b7f012f3ea8bdc56196e367cf07c10424855 Author: Hans de Goede Date: Thu Dec 15 10:41:38 2022 +0100 ACPI: video: Fix Apple GMUX backlight detection The apple-gmux driver only binds to old GMUX devices which have an IORESOURCE_IO resource (using inb()/outb()) rather then memory-mapped IO (IORESOURCE_MEM). T2 MacBooks use the new style GMUX devices (with IORESOURCE_MEM access), so these are not supported by the apple-gmux driver. This is not a problem since they have working ACPI video backlight support. But the apple_gmux_present() helper only checks if an ACPI device with the "APP000B" HID is present, causing acpi_video_get_backlight_type() to return acpi_backlight_apple_gmux disabling the acpi_video backlight device. Add a new apple_gmux_backlight_present() helper which checks that the "APP000B" device actually is an old GMUX device with an IORESOURCE_IO resource. This fixes the acpi_video0 backlight no longer registering on T2 MacBooks. Note people are working to add support for the new style GMUX to Linux: https://github.com/kekrby/linux-t2/commits/wip/hybrid-graphics Once this lands this patch should be reverted so that acpi_video_get_backlight_type() also prefers the gmux on new style GMUX MacBooks, but for now this is necessary to avoid regressing backlight control on T2 Macs. Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection") Reported-and-tested-by: Aditya Garg Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 7203481fd12b1257938519efb2460ea02b9236ee Author: Hans de Goede Date: Thu Dec 15 10:44:43 2022 +0100 ACPI: resource: Add Asus ExpertBook B2502 to Asus quirks The Asus ExpertBook B2502 has the same keyboard issue as Asus Vivobook K3402ZA/K3502ZA. The kernel overrides IRQ 1 to Edge_High when it should be Active_Low. This patch adds the ExpertBook B2502 model to the existing quirk list of Asus laptops with this issue. Fixes: b5f9223a105d ("ACPI: resource: Skip IRQ override on Asus Vivobook S5602ZA") Link: https://bugzilla.redhat.com/show_bug.cgi?id=2142574 Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/resource.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f3cb9b740869712d448edf3b9ef5952b847caf8b Author: Adrian Freund Date: Tue Dec 13 21:13:11 2022 +0100 ACPI: resource: do IRQ override on Lenovo 14ALC7 Commit bfcdf58380b1 ("ACPI: resource: do IRQ override on LENOVO IdeaPad") added an override for Lenovo IdeaPad 5 16ALC7. The 14ALC7 variant also suffers from a broken touchscreen and trackpad. Fixes: 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen platforms") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216804 Signed-off-by: Adrian Freund Signed-off-by: Rafael J. Wysocki drivers/acpi/resource.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 7592b79ba4a91350b38469e05238308bcfe1019b Author: Erik Schumacher Date: Sun Dec 11 14:33:22 2022 +0100 ACPI: resource: do IRQ override on XMG Core 15 The Schenker XMG CORE 15 (M22) is Ryzen-6 based and needs IRQ overriding for the keyboard to work. Adding an entry for this laptop to the override_table makes the internal keyboard functional again. Signed-off-by: Erik Schumacher Signed-off-by: Rafael J. Wysocki drivers/acpi/resource.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5aa9d943e9b6bf6e6023645cbe7ce7d5ed84baf4 Author: Mario Limonciello Date: Thu Dec 8 10:42:07 2022 -0600 ACPI: video: Don't enable fallback path for creating ACPI backlight by default The ACPI video detection code has a module parameter `register_backlight_delay` which is currently configured to 8 seconds. This means that if after 8 seconds of booting no native driver has created a backlight device then the code will attempt to make an ACPI video backlight device. This was intended as a safety mechanism with the backlight overhaul that occurred in kernel 6.1, but as it doesn't appear necesssary set it to be disabled by default. Suggested-by: Hans de Goede Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c573e240609ff781a0246c0c8c8351abd0475287 Author: Mario Limonciello Date: Thu Dec 8 10:42:06 2022 -0600 drm/amd/display: Report to ACPI video if no panels were found On desktop APUs amdgpu doesn't create a native backlight device as no eDP panels are found. However if the BIOS has reported backlight control methods in the ACPI tables then an acpi_video0 backlight device will be made 8 seconds after boot. This has manifested in a power slider on a number of desktop APUs ranging from Ryzen 5000 through Ryzen 7000 on various motherboard manufacturers. To avoid this, report to the acpi video detection that the system does not have any panel connected in the native driver. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1783786 Reported-by: Hans de Goede Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 00a734104af7d878f1252d49eff9298785c6cbdc Author: Mario Limonciello Date: Thu Dec 8 10:42:05 2022 -0600 ACPI: video: Allow GPU drivers to report no panels The current logic for the ACPI backlight detection will create a backlight device if no native or vendor drivers have created 8 seconds after the system has booted if the ACPI tables included backlight control methods. If the GPU drivers have loaded, they may be able to report whether any LCD panels were found. Allow using this information to factor in whether to enable the fallback logic for making an acpi_video0 backlight device. Suggested-by: Hans de Goede Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 11 +++++++++++ include/acpi/video.h | 2 ++ 2 files changed, 13 insertions(+) commit fb857b0bb2c7eea22a896c53c849a75437d24ea8 Merge: 53eab8e76667 3659fb5ac29a Author: Jens Axboe Date: Thu Dec 22 09:22:35 2022 -0700 Merge tag 'nvme-6.2-2022-12-22' of git://git.infradead.org/nvme into block-6.2 Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.2 - fix doorbell buffer value endianness (Klaus Jensen) - fix Linux vs NVMe page size mismatch (Keith Busch) - fix a potential use memory access beyong the allocation limit (Keith Busch) - fix a multipath vs blktrace NULL pointer dereference (Yanjun Zhang)" * tag 'nvme-6.2-2022-12-22' of git://git.infradead.org/nvme: nvme: fix multipath crash caused by flush request when blktrace is enabled nvme-pci: fix page size checks nvme-pci: fix mempool alloc size nvme-pci: fix doorbell buffer value endianness commit 789e1e10f214c00ca18fc6610824c5b9876ba5f2 Author: Jeff Layton Date: Thu Dec 22 09:51:30 2022 -0500 nfsd: shut down the NFSv4 state objects before the filecache Currently, we shut down the filecache before trying to clean up the stateids that depend on it. This leads to the kernel trying to free an nfsd_file twice, and a refcount overput on the nf_mark. Change the shutdown procedure to tear down all of the stateids prior to shutting down the filecache. Reported-and-tested-by: Wang Yugui Signed-off-by: Jeff Layton Fixes: 5e113224c17e ("nfsd: nfsd_file cache entries should be per net namespace") Signed-off-by: Chuck Lever fs/nfsd/nfssvc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09e6f9f98370be9a9f8978139e0eb1be87d1125f Author: Arnaldo Carvalho de Melo Date: Thu Dec 22 10:56:25 2022 -0300 perf python: Fix splitting CC into compiler and options Noticed this build failure on archlinux:base when building with clang: clang-14: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument] In tools/perf/util/setup.py we check if clang supports that option, but since commit 3cad53a6f9cdbafa ("perf python: Account for multiple words in CC") this got broken as in the common case where CC="clang": >>> cc="clang" >>> print(cc.split()[0]) clang >>> option="-ffat-lto-objects" >>> print(str(cc.split()[1:]) + option) []-ffat-lto-objects >>> And then the Popen will call clang with that bogus option name that in turn will not produce the b"unknown argument" or b"is not supported" that this function uses to detect if the option is not available and thus later on clang will be called with an unknown/unsupported option. Fix it by looking if really there are options in the provided CC variable, and if so override 'cc' with the first token and append the options to the 'option' variable. Fixes: 3cad53a6f9cdbafa ("perf python: Account for multiple words in CC") Cc: Adrian Hunter Cc: Fangrui Song Cc: Florian Fainelli Cc: Ian Rogers Cc: Jiri Olsa Cc: John Keeping Cc: Khem Raj Cc: Leo Yan Cc: Michael Petlan Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Sedat Dilek Link: http://lore.kernel.org/lkml/Y6Rq5F5NI0v1QQHM@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/setup.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit fa349e396e4886d742fd6501c599ec627ef1353b Author: Shawn Bohrer Date: Tue Dec 20 12:59:03 2022 -0600 veth: Fix race with AF_XDP exposing old or uninitialized descriptors When AF_XDP is used on on a veth interface the RX ring is updated in two steps. veth_xdp_rcv() removes packet descriptors from the FILL ring fills them and places them in the RX ring updating the cached_prod pointer. Later xdp_do_flush() syncs the RX ring prod pointer with the cached_prod pointer allowing user-space to see the recently filled in descriptors. The rings are intended to be SPSC, however the existing order in veth_poll allows the xdp_do_flush() to run concurrently with another CPU creating a race condition that allows user-space to see old or uninitialized descriptors in the RX ring. This bug has been observed in production systems. To summarize, we are expecting this ordering: CPU 0 __xsk_rcv_zc() CPU 0 __xsk_map_flush() CPU 2 __xsk_rcv_zc() CPU 2 __xsk_map_flush() But we are seeing this order: CPU 0 __xsk_rcv_zc() CPU 2 __xsk_rcv_zc() CPU 0 __xsk_map_flush() CPU 2 __xsk_map_flush() This occurs because we rely on NAPI to ensure that only one napi_poll handler is running at a time for the given veth receive queue. napi_schedule_prep() will prevent multiple instances from getting scheduled. However calling napi_complete_done() signals that this napi_poll is complete and allows subsequent calls to napi_schedule_prep() and __napi_schedule() to succeed in scheduling a concurrent napi_poll before the xdp_do_flush() has been called. For the veth driver a concurrent call to napi_schedule_prep() and __napi_schedule() can occur on a different CPU because the veth xmit path can additionally schedule a napi_poll creating the race. The fix as suggested by Magnus Karlsson, is to simply move the xdp_do_flush() call before napi_complete_done(). This syncs the producer ring pointers before another instance of napi_poll can be scheduled on another CPU. It will also slightly improve performance by moving the flush closer to when the descriptors were placed in the RX ring. Fixes: d1396004dd86 ("veth: Add XDP TX and REDIRECT") Suggested-by: Magnus Karlsson Signed-off-by: Shawn Bohrer Link: https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com Signed-off-by: Paolo Abeni drivers/net/veth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a9eb558a5bea66cc43950632f5fffec6b5795233 Author: David Howells Date: Fri Nov 18 07:57:27 2022 +0000 afs: Stop implementing ->writepage() We're trying to get rid of the ->writepage() hook[1]. Stop afs from using it by unlocking the page and calling afs_writepages_region() rather than folio_write_one(). A flag is passed to afs_writepages_region() to indicate that it should only write a single region so that we don't flush the entire file in ->write_begin(), but do add other dirty data to the region being written to try and reduce the number of RPC ops. This requires ->migrate_folio() to be implemented, so point that at filemap_migrate_folio() for files and also for symlinks and directories. This can be tested by turning on the afs_folio_dirty tracepoint and then doing something like: xfs_io -c "w 2223 7000" -c "w 15000 22222" -c "w 23 7" /afs/my/test/foo and then looking in the trace to see if the write at position 15000 gets stored before page 0 gets dirtied for the write at position 23. Signed-off-by: David Howells cc: Marc Dionne cc: Christoph Hellwig cc: Matthew Wilcox cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20221113162902.883850-1-hch@lst.de/ [1] Link: https://lore.kernel.org/r/166876785552.222254.4403222906022558715.stgit@warthog.procyon.org.uk/ # v1 fs/afs/dir.c | 1 + fs/afs/file.c | 3 ++- fs/afs/write.c | 83 +++++++++++++++++++++++++++++++++------------------------- 3 files changed, 50 insertions(+), 37 deletions(-) commit b3d3ca556757577c95a6bc786a5b6a48c23f00fa Author: Gaosheng Cui Date: Fri Sep 9 15:03:53 2022 +0800 afs: remove afs_cache_netfs and afs_zap_permits() declarations afs_zap_permits() has been removed since commit be080a6f43c4 ("afs: Overhaul permit caching"). afs_cache_netfs has been removed since commit 523d27cda149 ("afs: Convert afs to use the new fscache API"). so remove the declare for them from header file. Signed-off-by: Gaosheng Cui Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20220909070353.1160228-1-cuigaosheng1@huawei.com/ fs/afs/internal.h | 8 -------- 1 file changed, 8 deletions(-) commit 318b83b71242998814a570c3420c042ee6165fca Author: Colin Ian King Date: Thu Oct 20 18:39:23 2022 +0100 afs: remove variable nr_servers Variable nr_servers is no longer being used, the last reference to it was removed in commit 45df8462730d ("afs: Fix server list handling") so clean up the code by removing it. Signed-off-by: Colin Ian King Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20221020173923.21342-1-colin.i.king@gmail.com/ fs/afs/volume.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 36f82c93ee0bd88f1c95a52537906b8178b537f1 Author: David Howells Date: Wed Dec 21 14:30:48 2022 +0000 afs: Fix lost servers_outstanding count The afs_fs_probe_dispatcher() work function is passed a count on net->servers_outstanding when it is scheduled (which may come via its timer). This is passed back to the work_item, passed to the timer or dropped at the end of the dispatcher function. But, at the top of the dispatcher function, there are two checks which skip the rest of the function: if the network namespace is being destroyed or if there are no fileservers to probe. These two return paths, however, do not drop the count passed to the dispatcher, and so, sometimes, the destruction of a network namespace, such as induced by rmmod of the kafs module, may get stuck in afs_purge_servers(), waiting for net->servers_outstanding to become zero. Fix this by adding the missing decrements in afs_fs_probe_dispatcher(). Fixes: f6cbb368bcb0 ("afs: Actively poll fileservers to maintain NAT or firewall openings") Reported-by: Marc Dionne Signed-off-by: David Howells Tested-by: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/167164544917.2072364.3759519569649459359.stgit@warthog.procyon.org.uk/ fs/afs/fs_probe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d717f9474e3fb7e6bd3e43ca16e131f04320ed6f Author: Horatiu Vultur Date: Wed Dec 21 10:33:15 2022 +0100 net: lan966x: Fix configuration of the PCS When the PCS was taken out of reset, we were changing by mistake also the speed to 100 Mbit. But in case the link was going down, the link up routine was setting correctly the link speed. If the link was not getting down then the speed was forced to run at 100 even if the speed was something else. On lan966x, to set the speed link to 1G or 2.5G a value of 1 needs to be written in DEV_CLOCK_CFG_LINK_SPEED. This is similar to the procedure in lan966x_port_init. The issue was reproduced using 1000base-x sfp module using the commands: ip link set dev eth2 up ip link addr add 10.97.10.2/24 dev eth2 ethtool -s eth2 speed 1000 autoneg off Fixes: d28d6d2e37d1 ("net: lan966x: add port module support") Signed-off-by: Horatiu Vultur Reviewed-by: Piotr Raczynski Link: https://lore.kernel.org/r/20221221093315.939133-1-horatiu.vultur@microchip.com Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/lan966x/lan966x_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42c7ded0eeacd2ba5db599205c71c279dc715de7 Author: Eric Dumazet Date: Tue Dec 20 13:08:31 2022 +0000 bonding: fix lockdep splat in bond_miimon_commit() bond_miimon_commit() is run while RTNL is held, not RCU. WARNING: suspicious RCU usage 6.1.0-syzkaller-09671-g89529367293c #0 Not tainted ----------------------------- drivers/net/bonding/bond_main.c:2704 suspicious rcu_dereference_check() usage! Fixes: e95cc44763a4 ("bonding: do failover when high prio link up") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Hangbin Liu Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Link: https://lore.kernel.org/r/20221220130831.1480888-1-edumazet@google.com Signed-off-by: Paolo Abeni drivers/net/bonding/bond_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 123b99619cca94bdca0bf7bde9abe28f0a0dfe06 Author: Pablo Neira Ayuso Date: Mon Dec 19 20:10:12 2022 +0100 netfilter: nf_tables: honor set timeout and garbage collection updates Set timeout and garbage collection interval updates are ignored on updates. Add transaction to update global set element timeout and garbage collection interval. Fixes: 96518518cc41 ("netfilter: add nftables") Suggested-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 13 +++++++- net/netfilter/nf_tables_api.c | 63 ++++++++++++++++++++++++++++----------- 2 files changed, 57 insertions(+), 19 deletions(-) commit 3659fb5ac29a5e6102bebe494ac789fd47fb78f4 Author: Yanjun Zhang Date: Thu Dec 22 09:57:21 2022 +0800 nvme: fix multipath crash caused by flush request when blktrace is enabled The flush request initialized by blk_kick_flush has NULL bio, and it may be dealt with nvme_end_req during io completion. When blktrace is enabled, nvme_trace_bio_complete with multipath activated trying to access NULL pointer bio from flush request results in the following crash: [ 2517.831677] BUG: kernel NULL pointer dereference, address: 000000000000001a [ 2517.835213] #PF: supervisor read access in kernel mode [ 2517.838724] #PF: error_code(0x0000) - not-present page [ 2517.842222] PGD 7b2d51067 P4D 0 [ 2517.845684] Oops: 0000 [#1] SMP NOPTI [ 2517.849125] CPU: 2 PID: 732 Comm: kworker/2:1H Kdump: loaded Tainted: G S 5.15.67-0.cl9.x86_64 #1 [ 2517.852723] Hardware name: XFUSION 2288H V6/BC13MBSBC, BIOS 1.13 07/27/2022 [ 2517.856358] Workqueue: nvme_tcp_wq nvme_tcp_io_work [nvme_tcp] [ 2517.859993] RIP: 0010:blk_add_trace_bio_complete+0x6/0x30 [ 2517.863628] Code: 1f 44 00 00 48 8b 46 08 31 c9 ba 04 00 10 00 48 8b 80 50 03 00 00 48 8b 78 50 e9 e5 fe ff ff 0f 1f 44 00 00 41 54 49 89 f4 55 <0f> b6 7a 1a 48 89 d5 e8 3e 1c 2b 00 48 89 ee 4c 89 e7 5d 89 c1 ba [ 2517.871269] RSP: 0018:ff7f6a008d9dbcd0 EFLAGS: 00010286 [ 2517.875081] RAX: ff3d5b4be00b1d50 RBX: 0000000002040002 RCX: ff3d5b0a270f2000 [ 2517.878966] RDX: 0000000000000000 RSI: ff3d5b0b021fb9f8 RDI: 0000000000000000 [ 2517.882849] RBP: ff3d5b0b96a6fa00 R08: 0000000000000001 R09: 0000000000000000 [ 2517.886718] R10: 000000000000000c R11: 000000000000000c R12: ff3d5b0b021fb9f8 [ 2517.890575] R13: 0000000002000000 R14: ff3d5b0b021fb1b0 R15: 0000000000000018 [ 2517.894434] FS: 0000000000000000(0000) GS:ff3d5b42bfc80000(0000) knlGS:0000000000000000 [ 2517.898299] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2517.902157] CR2: 000000000000001a CR3: 00000004f023e005 CR4: 0000000000771ee0 [ 2517.906053] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2517.909930] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2517.913761] PKRU: 55555554 [ 2517.917558] Call Trace: [ 2517.921294] [ 2517.924982] nvme_complete_rq+0x1c3/0x1e0 [nvme_core] [ 2517.928715] nvme_tcp_recv_pdu+0x4d7/0x540 [nvme_tcp] [ 2517.932442] nvme_tcp_recv_skb+0x4f/0x240 [nvme_tcp] [ 2517.936137] ? nvme_tcp_recv_pdu+0x540/0x540 [nvme_tcp] [ 2517.939830] tcp_read_sock+0x9c/0x260 [ 2517.943486] nvme_tcp_try_recv+0x65/0xa0 [nvme_tcp] [ 2517.947173] nvme_tcp_io_work+0x64/0x90 [nvme_tcp] [ 2517.950834] process_one_work+0x1e8/0x390 [ 2517.954473] worker_thread+0x53/0x3c0 [ 2517.958069] ? process_one_work+0x390/0x390 [ 2517.961655] kthread+0x10c/0x130 [ 2517.965211] ? set_kthread_struct+0x40/0x40 [ 2517.968760] ret_from_fork+0x1f/0x30 [ 2517.972285] To avoid this situation, add a NULL check for req->bio before calling trace_block_bio_complete. Signed-off-by: Yanjun Zhang Signed-off-by: Christoph Hellwig drivers/nvme/host/nvme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6bf5f9a8b408a6ce5aba6119f305b5b8f1238025 Merge: fd28941cff1c a12a383e59ce Author: Takashi Iwai Date: Thu Dec 22 09:18:38 2022 +0100 Merge tag 'asoc-v6.2-3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.2 Some more small fixes and board quirks that came in since my last update, the main one being the fixes from Kai for issues around the attempts to get kexec working well on SOF based systems. commit fd28941cff1cd9d8ffa59fe11eb64148e09b6ed6 Author: Jaroslav Kysela Date: Thu Dec 15 16:30:37 2022 +0100 ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless It seems that the firmware is broken and does not accept the UAC_EP_CS_ATTR_SAMPLE_RATE URB. There is only one rate (48000Hz) available in the descriptors for the output endpoint. Create a new quirk QUIRK_FLAG_FIXED_RATE to skip the rate setup when only one rate is available (fixed). BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216798 Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20221215153037.1163786-1-perex@perex.cz Signed-off-by: Takashi Iwai sound/usb/card.h | 1 + sound/usb/endpoint.c | 16 ++++++++++------ sound/usb/endpoint.h | 3 ++- sound/usb/implicit.c | 6 +++++- sound/usb/implicit.h | 2 +- sound/usb/pcm.c | 36 +++++++++++++++++++++++++++++++++--- sound/usb/pcm.h | 2 ++ sound/usb/quirks.c | 2 ++ sound/usb/usbaudio.h | 4 ++++ 9 files changed, 60 insertions(+), 12 deletions(-) commit a95e163a4bfa7780f64e589bbedc6bdeb7cf3839 Author: Jiapeng Chong Date: Tue Dec 13 14:13:55 2022 +0800 ALSA: azt3328: Remove the unused function snd_azf3328_codec_outl() The function snd_azf3328_codec_outl is defined in the azt3328.c file, but not called elsewhere, so remove this unused function. sound/pci/azt3328.c:367:1: warning: unused function 'snd_azf3328_codec_outl'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3432 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20221213061355.62856-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Takashi Iwai sound/pci/azt3328.c | 9 --------- 1 file changed, 9 deletions(-) commit 2d78eb0342dd2c9c5cde9ae9ada1d33f189a858b Merge: b47068b4aa53 ee0b089d6600 Author: Takashi Iwai Date: Thu Dec 22 09:11:48 2022 +0100 Merge branch 'for-next' into for-linus commit 9d2f6060fe4c3b49d0cdc1dce1c99296f33379c8 Merge: af9b3fa15d6d bfa87ac86ce9 Author: Linus Torvalds Date: Wed Dec 21 19:03:42 2022 -0800 Merge tag 'trace-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fix from Steven Rostedt: "I missed this minor hardening of the kernel in the first pull. - Make monitor structures read only" * tag 'trace-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: rv/monitors: Move monitor structure in rodata commit af9b3fa15d6d99d948bcaca5a036ad2b292c8e8a Merge: 7a5189c58b3c d4505aa6afae Author: Linus Torvalds Date: Wed Dec 21 18:57:24 2022 -0800 Merge tag 'trace-probes-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull trace probes updates from Steven Rostedt: - New "symstr" type for dynamic events that writes the name of the function+offset into the ring buffer and not just the address - Prevent kernel symbol processing on addresses in user space probes (uprobes). - And minor fixes and clean ups * tag 'trace-probes-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/probes: Reject symbol/symstr type for uprobe tracing/probes: Add symstr type for dynamic events kprobes: kretprobe events missing on 2-core KVM guest kprobes: Fix check for probe enabled in kill_kprobe() test_kprobes: Fix implicit declaration error of test_kprobes tracing: Fix race where eprobes can be called before the event commit 7a5189c58b3cf250e6f50ede724409c31795d5f1 Merge: 569c3a283c96 6ebbdecff6ae Author: Linus Torvalds Date: Wed Dec 21 18:52:15 2022 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull RISC-V kvm updates from Paolo Bonzini: - Allow unloading KVM module - Allow KVM user-space to set mvendorid, marchid, and mimpid - Several fixes and cleanups * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: RISC-V: KVM: Add ONE_REG interface for mvendorid, marchid, and mimpid RISC-V: KVM: Save mvendorid, marchid, and mimpid when creating VCPU RISC-V: Export sbi_get_mvendorid() and friends RISC-V: KVM: Move sbi related struct and functions to kvm_vcpu_sbi.h RISC-V: KVM: Use switch-case in kvm_riscv_vcpu_set/get_reg() RISC-V: KVM: Remove redundant includes of asm/csr.h RISC-V: KVM: Remove redundant includes of asm/kvm_vcpu_timer.h RISC-V: KVM: Fix reg_val check in kvm_riscv_vcpu_set_reg_config() RISC-V: KVM: Simplify kvm_arch_prepare_memory_region() RISC-V: KVM: Exit run-loop immediately if xfer_to_guest fails RISC-V: KVM: use vma_lookup() instead of find_vma_intersection() RISC-V: KVM: Add exit logic to main.c commit 43ae218f69a66a4998ca2f99b9a1887ccc61fd4f Merge: e20aa071cd95 fec3adfd754c Author: Jakub Kicinski Date: Wed Dec 21 18:06:01 2022 -0800 Merge branch 'mptcp-locking-fixes' Mat Martineau says: ==================== mptcp: Locking fixes Two separate locking fixes for the networking tree: Patch 1 addresses a MPTCP fastopen error-path deadlock that was found with syzkaller. Patch 2 works around a lockdep false-positive between MPTCP listening and non-listening sockets at socket destruct time. ==================== Link: https://lore.kernel.org/r/20221220195215.238353-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit fec3adfd754ccc99a7230e8ab9f105b65fb07bcc Author: Paolo Abeni Date: Tue Dec 20 11:52:15 2022 -0800 mptcp: fix lockdep false positive MattB reported a lockdep splat in the mptcp listener code cleanup: WARNING: possible circular locking dependency detected packetdrill/14278 is trying to acquire lock: ffff888017d868f0 ((work_completion)(&msk->work)){+.+.}-{0:0}, at: __flush_work (kernel/workqueue.c:3069) but task is already holding lock: ffff888017d84130 (sk_lock-AF_INET){+.+.}-{0:0}, at: mptcp_close (net/mptcp/protocol.c:2973) which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sk_lock-AF_INET){+.+.}-{0:0}: __lock_acquire (kernel/locking/lockdep.c:5055) lock_acquire (kernel/locking/lockdep.c:466) lock_sock_nested (net/core/sock.c:3463) mptcp_worker (net/mptcp/protocol.c:2614) process_one_work (kernel/workqueue.c:2294) worker_thread (include/linux/list.h:292) kthread (kernel/kthread.c:376) ret_from_fork (arch/x86/entry/entry_64.S:312) -> #0 ((work_completion)(&msk->work)){+.+.}-{0:0}: check_prev_add (kernel/locking/lockdep.c:3098) validate_chain (kernel/locking/lockdep.c:3217) __lock_acquire (kernel/locking/lockdep.c:5055) lock_acquire (kernel/locking/lockdep.c:466) __flush_work (kernel/workqueue.c:3070) __cancel_work_timer (kernel/workqueue.c:3160) mptcp_cancel_work (net/mptcp/protocol.c:2758) mptcp_subflow_queue_clean (net/mptcp/subflow.c:1817) __mptcp_close_ssk (net/mptcp/protocol.c:2363) mptcp_destroy_common (net/mptcp/protocol.c:3170) mptcp_destroy (include/net/sock.h:1495) __mptcp_destroy_sock (net/mptcp/protocol.c:2886) __mptcp_close (net/mptcp/protocol.c:2959) mptcp_close (net/mptcp/protocol.c:2974) inet_release (net/ipv4/af_inet.c:432) __sock_release (net/socket.c:651) sock_close (net/socket.c:1367) __fput (fs/file_table.c:320) task_work_run (kernel/task_work.c:181 (discriminator 1)) exit_to_user_mode_prepare (include/linux/resume_user_mode.h:49) syscall_exit_to_user_mode (kernel/entry/common.c:130) do_syscall_64 (arch/x86/entry/common.c:87) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_INET); lock((work_completion)(&msk->work)); lock(sk_lock-AF_INET); lock((work_completion)(&msk->work)); *** DEADLOCK *** The report is actually a false positive, since the only existing lock nesting is the msk socket lock acquired by the mptcp work. cancel_work_sync() is invoked without the relevant socket lock being held, but under a different (the msk listener) socket lock. We could silence the splat adding a per workqueue dynamic lockdep key, but that looks overkill. Instead just tell lockdep the msk socket lock is not held around cancel_work_sync(). Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/322 Fixes: 30e51b923e43 ("mptcp: fix unreleased socket in accept queue") Reported-by: Matthieu Baerts Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/protocol.c | 2 +- net/mptcp/protocol.h | 2 +- net/mptcp/subflow.c | 19 +++++++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) commit 7d803344fdc3e38079fabcf38b1e4cb6f8faa655 Author: Paolo Abeni Date: Tue Dec 20 11:52:14 2022 -0800 mptcp: fix deadlock in fastopen error path MatM reported a deadlock at fastopening time: INFO: task syz-executor.0:11454 blocked for more than 143 seconds. Tainted: G S 6.1.0-rc5-03226-gdb0157db5153 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.0 state:D stack:25104 pid:11454 ppid:424 flags:0x00004006 Call Trace: context_switch kernel/sched/core.c:5191 [inline] __schedule+0x5c2/0x1550 kernel/sched/core.c:6503 schedule+0xe8/0x1c0 kernel/sched/core.c:6579 __lock_sock+0x142/0x260 net/core/sock.c:2896 lock_sock_nested+0xdb/0x100 net/core/sock.c:3466 __mptcp_close_ssk+0x1a3/0x790 net/mptcp/protocol.c:2328 mptcp_destroy_common+0x16a/0x650 net/mptcp/protocol.c:3171 mptcp_disconnect+0xb8/0x450 net/mptcp/protocol.c:3019 __inet_stream_connect+0x897/0xa40 net/ipv4/af_inet.c:720 tcp_sendmsg_fastopen+0x3dd/0x740 net/ipv4/tcp.c:1200 mptcp_sendmsg_fastopen net/mptcp/protocol.c:1682 [inline] mptcp_sendmsg+0x128a/0x1a50 net/mptcp/protocol.c:1721 inet6_sendmsg+0x11f/0x150 net/ipv6/af_inet6.c:663 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xf7/0x190 net/socket.c:734 ____sys_sendmsg+0x336/0x970 net/socket.c:2476 ___sys_sendmsg+0x122/0x1c0 net/socket.c:2530 __sys_sendmmsg+0x18d/0x460 net/socket.c:2616 __do_sys_sendmmsg net/socket.c:2645 [inline] __se_sys_sendmmsg net/socket.c:2642 [inline] __x64_sys_sendmmsg+0x9d/0x110 net/socket.c:2642 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f5920a75e7d RSP: 002b:00007f59201e8028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f5920bb4f80 RCX: 00007f5920a75e7d RDX: 0000000000000001 RSI: 0000000020002940 RDI: 0000000000000005 RBP: 00007f5920ae7593 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020004050 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f5920bb4f80 R15: 00007f59201c8000 In the error path, tcp_sendmsg_fastopen() ends-up calling mptcp_disconnect(), and the latter tries to close each subflow, acquiring the socket lock on each of them. At fastopen time, we have a single subflow, and such subflow socket lock is already held by the called, causing the deadlock. We already track the 'fastopen in progress' status inside the msk socket. Use it to address the issue, making mptcp_disconnect() a no op when invoked from the fastopen (error) path and doing the relevant cleanup after releasing the subflow socket lock. While at the above, rename the fastopen status bit to something more meaningful. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/321 Fixes: fa9e57468aa1 ("mptcp: fix abba deadlock on fastopen") Reported-by: Mat Martineau Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/protocol.c | 18 +++++++++++++++--- net/mptcp/protocol.h | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) commit e20aa071cd955aabc15be0ec1e914283592ddef4 Author: Yinjun Zhang Date: Tue Dec 20 16:21:00 2022 +0100 nfp: fix schedule in atomic context when sync mc address The callback `.ndo_set_rx_mode` is called in atomic context, sleep is not allowed in the implementation. Now use workqueue mechanism to avoid this issue. Fixes: de6248644966 ("nfp: add support for multicast filter") Signed-off-by: Yinjun Zhang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20221220152100.1042774-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/nfp_net.h | 7 +++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 61 ++++++++++++++++++++-- 2 files changed, 64 insertions(+), 4 deletions(-) commit 3d8f2c4269d08f8793e946279dbdf5e972cc4911 Author: Ronak Doshi Date: Tue Dec 20 12:25:55 2022 -0800 vmxnet3: correctly report csum_level for encapsulated packet Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support") added support for encapsulation offload. However, the pathc did not report correctly the csum_level for encapsulated packet. This patch fixes this issue by reporting correct csum level for the encapsulated packet. Fixes: dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support") Signed-off-by: Ronak Doshi Acked-by: Peng Li Link: https://lore.kernel.org/r/20221220202556.24421-1-doshir@vmware.com Signed-off-by: Jakub Kicinski drivers/net/vmxnet3/vmxnet3_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 95637d91fefdb94d6e7389222ba9ddab0e9f5abe Author: Aaron Conole Date: Tue Dec 20 16:27:17 2022 -0500 net: openvswitch: release vport resources on failure A recent commit introducing upcall packet accounting failed to properly release the vport object when the per-cpu stats struct couldn't be allocated. This can cause dangling pointers to dp objects long after they've been released. Cc: wangchuanlei Fixes: 1933ea365aa7 ("net: openvswitch: Add support to count upcall packets") Reported-by: syzbot+8f4e2dcfcb3209ac35f9@syzkaller.appspotmail.com Signed-off-by: Aaron Conole Acked-by: Eelco Chaudron Reviewed-by: Michal Swiatkowski Link: https://lore.kernel.org/r/20221220212717.526780-1-aconole@redhat.com Signed-off-by: Jakub Kicinski net/openvswitch/datapath.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f2575c8f404911da83f25b688e12afcf4273e640 Author: Antoine Tenart Date: Tue Dec 20 18:18:25 2022 +0100 net: vrf: determine the dst using the original ifindex for multicast Multicast packets received on an interface bound to a VRF are marked as belonging to the VRF and the skb device is updated to point to the VRF device itself. This was fine even when a route was associated to a device as when performing a fib table lookup 'oif' in fib6_table_lookup (coming from 'skb->dev->ifindex' in ip6_route_input) was set to 0 when FLOWI_FLAG_SKIP_NH_OIF was set. With commit 40867d74c374 ("net: Add l3mdev index to flow struct and avoid oif reset for port devices") this is not longer true and multicast traffic is not received on the original interface. Instead of adding back a similar check in fib6_table_lookup determine the dst using the original ifindex for multicast VRF traffic. To make things consistent across the function do the above for all strict packets, which was the logic before commit 6f12fa775530 ("vrf: mark skb for multicast or link-local as enslaved to VRF"). Note that reverting to this behavior should be fine as the change was about marking packets belonging to the VRF, not about their dst. Fixes: 40867d74c374 ("net: Add l3mdev index to flow struct and avoid oif reset for port devices") Reported-by: Jianlin Shi Signed-off-by: Antoine Tenart Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20221220171825.1172237-1-atenart@kernel.org Signed-off-by: Jakub Kicinski drivers/net/vrf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 53fc61be273a1e76dd5e356f91805dce00ff2d2c Author: Maciej Fijalkowski Date: Tue Dec 20 09:54:48 2022 -0800 ice: xsk: do not use xdp_return_frame() on tx_buf->raw_buf Previously ice XDP xmit routine was changed in a way that it avoids xdp_buff->xdp_frame conversion as it is simply not needed for handling XDP_TX action and what is more it saves us CPU cycles. This routine is re-used on ZC driver to handle XDP_TX action. Although for XDP_TX on Rx ZC xdp_buff that comes from xsk_buff_pool is converted to xdp_frame, xdp_frame itself is not stored inside ice_tx_buf, we only store raw data pointer. Casting this pointer to xdp_frame and calling against it xdp_return_frame in ice_clean_xdp_tx_buf() results in undefined behavior. To fix this, simply call page_frag_free() on tx_buf->raw_buf. Later intention is to remove the buff->frame conversion in order to simplify the codebase and improve XDP_TX performance on ZC. Fixes: 126cdfe1007a ("ice: xsk: Improve AF_XDP ZC Tx and use batching API") Reported-and-tested-by: Robin Cowley Signed-off-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen Reviewed-by: Piotr Raczynski Link: https://lore.kernel.org/r/20221220175448.693999-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_xsk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe8f5b2f7bec504021b395d24f7efca415d21e2b Merge: 38624d2c972e c1c4a8b21721 Author: Dave Airlie Date: Thu Dec 22 11:02:55 2022 +1000 Merge tag 'amd-drm-fixes-6.2-2022-12-21' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.2-2022-12-21: amdgpu: - Avoid large variable on the stack - S0ix fixes - SMU 13.x fixes - VCN fix - Add missing fence reference amdkfd: - Fix init vm error handling - Fix double release of compute pasid Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20221221205828.6093-1-alexander.deucher@amd.com commit aa6c3961a3eef78a93a8f3a3760ae1dd7ebb94e8 Merge: 609d3bc62305 b7dc753fe33a Author: Jakub Kicinski Date: Wed Dec 21 16:44:55 2022 -0800 Merge tag 'wireless-2022-12-21' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.2 First set of fixes for v6.2. Fix for a link error in mt76, fix for an iwlwifi firmware crash and two cleanups. * tag 'wireless-2022-12-21' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: ath9k: use proper statements in conditionals wifi: mt76: mt7996: select CONFIG_RELAY wifi: iwlwifi: fw: skip PPAG for JF wifi: ti: remove obsolete lines in the Makefile ==================== Link: https://lore.kernel.org/r/20221221180808.96A8AC433EF@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 569c3a283c96a9efbf7ee32dda10905b8684de07 Merge: 5d4740fc787d 53eab8e76667 Author: Linus Torvalds Date: Wed Dec 21 16:35:26 2022 -0800 Merge tag 'block-6.2-2022-12-19' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - Various fixes for BFQ (Yu, Yuwei) - Fix for loop command line parsing (Isaac) - No need to specifically clear REQ_ALLOC_CACHE on IOPOLL downgrade anymore (me) - blk-iocost enum fix for newer gcc (Jiri) - UAF fix for queue release (Ming) - blk-iolatency error handling memory leak fix (Tejun) * tag 'block-6.2-2022-12-19' of git://git.kernel.dk/linux: block: don't clear REQ_ALLOC_CACHE for non-polled requests block: fix use-after-free of q->q_usage_counter block, bfq: only do counting of pending-request for BFQ_GROUP_IOSCHED blk-iolatency: Fix memory leak on add_disk() failures loop: Fix the max_loop commandline argument treatment when it is set to 0 block/blk-iocost (gcc13): keep large values in a new enum block, bfq: replace 0/1 with false/true in bic apis block, bfq: don't return bfqg from __bfq_bic_change_cgroup() block, bfq: fix possible uaf for 'bfqq->bic' commit 5d4740fc787db767811c4ac625665493314b382c Merge: 0a924817d2ed 5ad70eb27d2b Author: Linus Torvalds Date: Wed Dec 21 16:28:25 2022 -0800 Merge tag 'io_uring-6.2-2022-12-19' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Improve the locking for timeouts. This was originally queued up for the initial pull, but I messed up and it got missed. (Pavel) - Fix an issue with running task_work from the wait path, causing some inefficiencies (me) - Add a clear of ->free_iov upfront in the 32-bit compat data importing, so we ensure that it's always sane at completion time (me) - Use call_rcu_hurry() for the eventfd signaling (Dylan) - Ordering fix for multishot recv completions (Pavel) - Add the io_uring trace header to the MAINTAINERS entry (Ammar) * tag 'io_uring-6.2-2022-12-19' of git://git.kernel.dk/linux: MAINTAINERS: io_uring: Add include/trace/events/io_uring.h io_uring/net: fix cleanup after recycle io_uring/net: ensure compat import handlers clear free_iov io_uring: include task_work run after scheduling in wait for events io_uring: don't use TIF_NOTIFY_SIGNAL to test for availability of task_work io_uring: use call_rcu_hurry if signaling an eventfd io_uring: fix overflow handling regression io_uring: ease timeout flush locking requirements io_uring: revise completion_lock locking io_uring: protect cq_timeouts with timeout_lock commit 70a00e2f1dbae11dc3444444c6bd7555763d8421 Author: Martin KaFai Lau Date: Wed Dec 21 10:56:53 2022 -0800 selftests/bpf: Test bpf_skb_adjust_room on CHECKSUM_PARTIAL When the bpf_skb_adjust_room() shrinks the skb such that its csum_start is invalid, the skb->ip_summed should be reset from CHECKSUM_PARTIAL to CHECKSUM_NONE. The commit 54c3f1a81421 ("bpf: pull before calling skb_postpull_rcsum()") fixed it. This patch adds a test to ensure the skb->ip_summed changed from CHECKSUM_PARTIAL to CHECKSUM_NONE after bpf_skb_adjust_room(). Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221221185653.1589961-1-martin.lau@linux.dev tools/testing/selftests/bpf/DENYLIST.s390x | 1 + .../selftests/bpf/prog_tests/decap_sanity.c | 85 ++++++++++++++++++++++ .../testing/selftests/bpf/progs/bpf_tracing_net.h | 6 ++ tools/testing/selftests/bpf/progs/decap_sanity.c | 68 +++++++++++++++++ 4 files changed, 160 insertions(+) commit e96b95c2b7a63a454b6498e2df67aac14d046d13 Author: Rickard x Andersson Date: Tue Dec 20 11:23:18 2022 +0100 gcov: add support for checksum field In GCC version 12.1 a checksum field was added. This patch fixes a kernel crash occurring during boot when using gcov-kernel with GCC version 12.2. The crash occurred on a system running on i.MX6SX. Link: https://lkml.kernel.org/r/20221220102318.3418501-1-rickaran@axis.com Fixes: 977ef30a7d88 ("gcov: support GCC 12.1 and newer compilers") Signed-off-by: Rickard x Andersson Reviewed-by: Peter Oberparleiter Tested-by: Peter Oberparleiter Reviewed-by: Martin Liska Cc: Signed-off-by: Andrew Morton kernel/gcov/gcc_4_7.c | 5 +++++ 1 file changed, 5 insertions(+) commit c5651b31f51584bd1199b3a552c8211a8523d6e1 Author: Liam Howlett Date: Mon Dec 19 16:20:15 2022 +0000 test_maple_tree: add test for mas_spanning_rebalance() on insufficient data Add a test to the maple tree test suite for the spanning rebalance insufficient node issue does not go undetected again. Link: https://lkml.kernel.org/r/20221219161922.2708732-3-Liam.Howlett@oracle.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Cc: Andrei Vagin Cc: Mike Rapoport Cc: Muhammad Usama Anjum Cc: Signed-off-by: Andrew Morton lib/test_maple_tree.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 0abb964aae3da746ea2fd4301599a6fa26da58db Author: Liam Howlett Date: Mon Dec 19 16:20:15 2022 +0000 maple_tree: fix mas_spanning_rebalance() on insufficient data Mike Rapoport contacted me off-list with a regression in running criu. Periodic tests fail with an RCU stall during execution. Although rare, it is possible to hit this with other uses so this patch should be backported to fix the regression. This patchset adds the fix and a test case to the maple tree test suite. This patch (of 2): An insufficient node was causing an out-of-bounds access on the node in mas_leaf_max_gap(). The cause was the faulty detection of the new node being a root node when overwriting many entries at the end of the tree. Fix the detection of a new root and ensure there is sufficient data prior to entering the spanning rebalance loop. Link: https://lkml.kernel.org/r/20221219161922.2708732-1-Liam.Howlett@oracle.com Link: https://lkml.kernel.org/r/20221219161922.2708732-2-Liam.Howlett@oracle.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Reported-by: Mike Rapoport Tested-by: Mike Rapoport Cc: Andrei Vagin Cc: Mike Rapoport Cc: Muhammad Usama Anjum Cc: Signed-off-by: Andrew Morton lib/maple_tree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e700898fa075c69b3ae02b702ab57fb75e1a82ec Author: Mike Kravetz Date: Mon Dec 12 15:50:41 2022 -0800 hugetlb: really allocate vma lock for all sharable vmas Commit bbff39cc6cbc ("hugetlb: allocate vma lock for all sharable vmas") removed the pmd sharable checks in the vma lock helper routines. However, it left the functional version of helper routines behind #ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE. Therefore, the vma lock is not being used for sharable vmas on architectures that do not support pmd sharing. On these architectures, a potential fault/truncation race is exposed that could leave pages in a hugetlb file past i_size until the file is removed. Move the functional vma lock helpers outside the ifdef, and remove the non-functional stubs. Since the vma lock is not just for pmd sharing, rename the routine __vma_shareable_flags_pmd. Link: https://lkml.kernel.org/r/20221212235042.178355-1-mike.kravetz@oracle.com Fixes: bbff39cc6cbc ("hugetlb: allocate vma lock for all sharable vmas") 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 Cc: Signed-off-by: Andrew Morton mm/hugetlb.c | 333 ++++++++++++++++++++++++++--------------------------------- 1 file changed, 148 insertions(+), 185 deletions(-) commit 7ba594d700998bafa96a75360d2e060aa39156d2 Author: Arnd Bergmann Date: Thu Dec 15 17:26:57 2022 +0100 kmsan: export kmsan_handle_urb USB support can be in a loadable module, and this causes a link failure with KMSAN: ERROR: modpost: "kmsan_handle_urb" [drivers/usb/core/usbcore.ko] undefined! Export the symbol so it can be used by this module. Link: https://lkml.kernel.org/r/20221215162710.3802378-1-arnd@kernel.org Fixes: 553a80188a5d ("kmsan: handle memory sent to/from USB") Signed-off-by: Arnd Bergmann Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Cc: Signed-off-by: Andrew Morton mm/kmsan/hooks.c | 1 + 1 file changed, 1 insertion(+) commit aaa746ad8b30f38ef89a301faf339ef1c19cf33a Author: Arnd Bergmann Date: Thu Dec 15 17:30:17 2022 +0100 kmsan: include linux/vmalloc.h This is needed for the vmap/vunmap declarations: mm/kmsan/kmsan_test.c:316:9: error: implicit declaration of function 'vmap' is invalid in C99 [-Werror,-Wimplicit-function-declaration] vbuf = vmap(pages, npages, VM_MAP, PAGE_KERNEL); ^ mm/kmsan/kmsan_test.c:316:29: error: use of undeclared identifier 'VM_MAP' vbuf = vmap(pages, npages, VM_MAP, PAGE_KERNEL); ^ mm/kmsan/kmsan_test.c:322:3: error: implicit declaration of function 'vunmap' is invalid in C99 [-Werror,-Wimplicit-function-declaration] vunmap(vbuf); ^ Link: https://lkml.kernel.org/r/20221215163046.4079767-1-arnd@kernel.org Fixes: 8ed691b02ade ("kmsan: add tests for KMSAN") Signed-off-by: Arnd Bergmann Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Cc: Signed-off-by: Andrew Morton mm/kmsan/kmsan_test.c | 1 + 1 file changed, 1 insertion(+) commit 38ce7c9bdfc228c14d7621ba36d3eebedd9d4f76 Author: Mathieu Desnoyers Date: Thu Dec 15 14:46:21 2022 -0500 mm/mempolicy: fix memory leak in set_mempolicy_home_node system call When encountering any vma in the range with policy other than MPOL_BIND or MPOL_PREFERRED_MANY, an error is returned without issuing a mpol_put on the policy just allocated with mpol_dup(). This allows arbitrary users to leak kernel memory. Link: https://lkml.kernel.org/r/20221215194621.202816-1-mathieu.desnoyers@efficios.com Fixes: c6018b4b2549 ("mm/mempolicy: add set_mempolicy_home_node syscall") Signed-off-by: Mathieu Desnoyers Reviewed-by: Randy Dunlap Reviewed-by: "Huang, Ying" Reviewed-by: Aneesh Kumar K.V Acked-by: Michal Hocko 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 Cc: [5.17+] Signed-off-by: Andrew Morton mm/mempolicy.c | 1 + 1 file changed, 1 insertion(+) commit 6f12be792fde994ed934168f93c2a0d2a0cf0bc5 Author: Vlastimil Babka Date: Fri Dec 16 17:32:27 2022 +0100 mm, mremap: fix mremap() expanding vma with addr inside vma Since 6.1 we have noticed random rpm install failures that were tracked to mremap() returning -ENOMEM and to commit ca3d76b0aa80 ("mm: add merging after mremap resize"). The problem occurs when mremap() expands a VMA in place, but using an starting address that's not vma->vm_start, but somewhere in the middle. The extension_pgoff calculation introduced by the commit is wrong in that case, so vma_merge() fails due to pgoffs not being compatible. Fix the calculation. By the way it seems that the situations, where rpm now expands a vma from the middle, were made possible also due to that commit, thanks to the improved vma merging. Yet it should work just fine, except for the buggy calculation. Link: https://lkml.kernel.org/r/20221216163227.24648-1-vbabka@suse.cz Reported-by: Jiri Slaby Link: https://bugzilla.suse.com/show_bug.cgi?id=1206359 Fixes: ca3d76b0aa80 ("mm: add merging after mremap resize") Signed-off-by: Vlastimil Babka Cc: Jakub Matěna Cc: "Kirill A . Shutemov" Cc: Liam Howlett Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton mm/mremap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c1c4a8b217213c1924eabf4f28385bbee9cc50c1 Author: Christian König Date: Mon Dec 19 11:47:18 2022 +0100 drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency That function consumes the reference. Reviewed-by: Luben Tuikov Reported-by: Borislav Petkov (AMD) Tested-by: Borislav Petkov (AMD) Signed-off-by: Christian König Fixes: aab9cf7b6954 ("drm/amdgpu: use scheduler dependencies for VM updates") Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 2 ++ 1 file changed, 2 insertions(+) commit 23fffb2f09ce1145cbd751801d45ba74acaa6542 Author: Jens Axboe Date: Wed Dec 21 07:11:33 2022 -0700 io_uring/cancel: re-grab ctx mutex after finishing wait If we have a signal pending during cancelations, it'll cause the task_work run to return an error. Since we didn't run task_work, the current task is left in TASK_INTERRUPTIBLE state when we need to re-grab the ctx mutex, and the kernel will rightfully complain about that. Move the lock grabbing for the error cases outside the loop to avoid that issue. Reported-by: syzbot+7df055631cd1be4586fd@syzkaller.appspotmail.com Link: https://lore.kernel.org/io-uring/0000000000003a14a905f05050b0@google.com/ Signed-off-by: Jens Axboe io_uring/cancel.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit f257ba9c160f4cb13e88b9be83e39a0e94d45c70 Author: Arnaldo Carvalho de Melo Date: Wed Dec 21 17:30:38 2022 -0300 perf scripting python: Don't be strict at handling libtraceevent enumerations The build was failing on archlinux because it has a newer libtraceevent that added a new entry to the tep_print_arg_type enum: 19.72 archlinux:base : FAIL gcc version 12.2.0 (GCC) util/scripting-engines/trace-event-python.c: In function ‘define_event_symbols’: util/scripting-engines/trace-event-python.c:281:9: error: enumeration value ‘TEP_PRINT_CPUMASK’ not handled in switch [-Werror=switch-enum] 281 | switch (args->type) { | ^~~~~~ cc1: all warnings being treated as errors Since we build with distros that have different versions of libtraceevent and there is no way to easily test if these enum entries are available, just disable -Werror=switch-enum for that specific object. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1d900df63adcb748905131dd6258e570e11aed1 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 Cc: stable@vger.kernel.org # 6.0, 6.1 drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 1 file changed, 1 insertion(+) commit 9854e7ad35fecf3007d44e58484e05cf39a62bd6 Author: Hans-Peter Nilsson Date: Mon Dec 28 03:41:59 2020 +0100 perf arm64: Simplify mksyscalltbl This patch isn't intended to have any effect on the compiled code. It just removes one level of indirection: calling the *host* compiler to build and then run a program that just printf:s the numerical entries of the syscall-table. In other words, the generated syscalls.c changes from: [46] = "ftruncate", to: [__NR3264_ftruncate] = "ftruncate", The latter is as good as the former to the user of perf, and this can be done directly by the shell-script. The syscalls defined as non-literal values (like "#define __NR_ftruncate __NR3264_ftruncate") are trivially resolved at compile-time without namespace-leaking and/or collision for its sole user, perf/util/syscalltbl.c, that just #includes the generated file. A future "-mabi=32" support would probably have to handle this differently, but that is a pre-existing problem not affected by this simplification. Calling the *host* compiler only complicates things and accidentally can get a completely wrong set of files and syscall numbers, see earlier commits. Note that the script parameter hostcc is now unused. At the time of this patch, powerpc (the origin, see comments), and also e.g. x86 has moved on, from filtering "gcc -dM -E" output to reading separate specific text-file, a table of syscall numbers. IMHO should arm64 consider adopting this. Signed-off-by: Hans-Peter Nilsson Cc: Alexander Shishkin Reviewed-by: Leo Yan Tested-by: Leo Yan Acked-by: Arnd Bergmann Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20201228024159.2BB66203B5@pchp3.se.axis.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit 0a924817d2ed9396401e0557c6134276d2e26382 Merge: 6022ec6ee2c3 aacfc939cc42 Author: Linus Torvalds Date: Wed Dec 21 10:40:08 2022 -0800 Merge tag '6.2-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "cifs/smb3 client fixes, mostly related to reconnect and/or DFS: - two important reconnect fixes: cases where status of recently connected IPCs and shares were not being updated leaving them in an incorrect state - fix for older Windows servers that would return STATUS_OBJECT_NAME_INVALID to query info requests on DFS links in a namespace that contained non-ASCII characters, reducing number of wasted roundtrips. - fix for leaked -ENOMEM to userspace when cifs.ko couldn't perform I/O due to a disconnected server, expired or deleted session. - removal of all unneeded DFS related mount option string parsing (now using fs_context for automounts) - improve clarity/readability, moving various DFS related functions out of fs/cifs/connect.c (which was getting too big to be readable) to new file. - Fix problem when large number of DFS connections. Allow sharing of DFS connections and fix how the referral paths are matched - Referral caching fix: Instead of looking up ipc connections to refresh cached referrals, store direct dfs root server's IPC pointer in new sessions so it can simply be accessed to either refresh or create a new referral that such connections belong to. - Fix to allow dfs root server's connections to also failover - Optimized reconnect of nested DFS links - Set correct status of IPC connections marked for reconnect" * tag '6.2-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module number cifs: don't leak -ENOMEM in smb2_open_file() cifs: use origin fullpath for automounts cifs: set correct status of tcon ipc when reconnecting cifs: optimize reconnect of nested links cifs: fix source pathname comparison of dfs supers cifs: fix confusing debug message cifs: don't block in dfs_cache_noreq_update_tgthint() cifs: refresh root referrals cifs: fix refresh of cached referrals cifs: don't refresh cached referrals from unactive mounts cifs: share dfs connections and supers cifs: split out ses and tcon retrieval from mount_get_conns() cifs: set resolved ip in sockaddr cifs: remove unused smb3_fs_context::mount_options cifs: get rid of mount options string parsing cifs: use fs_context for automounts cifs: reduce roundtrips on create/qinfo requests cifs: set correct ipc status after initial tree connect cifs: set correct tcon status after initial tree connect commit 6022ec6ee2c3a16b26f218d7abb538afb839bd6d Merge: 04065c12072b 36963cf225f8 Author: Linus Torvalds Date: Wed Dec 21 10:18:17 2022 -0800 Merge tag 'ntfs3_for_6.2' of https://github.com/Paragon-Software-Group/linux-ntfs3 Pull ntfs3 updates from Konstantin Komarov: - added mount options 'hidedotfiles', 'nocase' and 'windows_names' - fixed xfstests (tested on x86_64): generic/083 generic/263 generic/307 generic/465 - fix some logic errors - code refactoring and dead code removal * tag 'ntfs3_for_6.2' of https://github.com/Paragon-Software-Group/linux-ntfs3: (61 commits) fs/ntfs3: Make if more readable fs/ntfs3: Improve checking of bad clusters fs/ntfs3: Fix wrong if in hdr_first_de fs/ntfs3: Use ALIGN kernel macro fs/ntfs3: Fix incorrect if in ntfs_set_acl_ex fs/ntfs3: Check fields while reading fs/ntfs3: Correct ntfs_check_for_free_space fs/ntfs3: Restore correct state after ENOSPC in attr_data_get_block fs/ntfs3: Changing locking in ntfs_rename fs/ntfs3: Fixing wrong logic in attr_set_size and ntfs_fallocate fs/ntfs3: atomic_open implementation fs/ntfs3: Fix wrong indentations fs/ntfs3: Change new sparse cluster processing fs/ntfs3: Fixing work with sparse clusters fs/ntfs3: Simplify ntfs_update_mftmirr function fs/ntfs3: Remove unused functions fs/ntfs3: Fix sparse problems fs/ntfs3: Add ntfs_bitmap_weight_le function and refactoring fs/ntfs3: Use _le variants of bitops functions fs/ntfs3: Add functions to modify LE bitmaps ... commit 04065c12072b6124475c7c4f6ad7484475a2f66e Merge: d264dd3bbbd1 11933cf1d91d Author: Linus Torvalds Date: Wed Dec 21 09:54:00 2022 -0800 Merge tag 'fs.mount.propagation.fix.v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull mount propagation fix from Christian Brauner: "The propagate_mnt() function handles mount propagation when creating mounts and propagates the source mount tree @source_mnt to all applicable nodes of the destination propagation mount tree headed by @dest_mnt. Unfortunately it contains a bug where it fails to terminate at peers of @source_mnt when looking up copies of the source mount that become masters for copies of the source mount tree mounted on top of slaves in the destination propagation tree causing a NULL dereference. This fixes that bug (with a long commit message for a seven character fix but hopefully it'll help us fix issues faster in the future rather than having to go through the pain of having to relearn everything once more)" * tag 'fs.mount.propagation.fix.v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: pnode: terminate at peers of source commit c3c2e8ebe365ae028ec82ceab039b2035875b6d5 Author: Arnaldo Carvalho de Melo Date: Wed Dec 21 14:08:20 2022 -0300 perf build: Remove explicit reference to python 2.x devel files If the libpython feature test (tools/build/feature/test-libpython.c) fails, then the python-devel is missing, it doesn't mattere if it is for python2 or 3, remove that explicit 2.x reference. Reported-by: Linus Torvalds Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fe089d3a3eb4c1cd416993cd4bc7e3c0c30297a Author: Sandipan Das Date: Wed Dec 14 13:56:52 2022 +0530 perf vendor events amd: Add Zen 4 mapping Add a regular expression in the map file so that appropriate JSON event files are used for AMD Zen 4 processors. Restrict the regular expression for AMD Zen 3 processors to known model ranges since they also belong to Family 19h. Signed-off-by: Sandipan Das Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Ingo Molnar Cc: Jiri Olsa Cc: Jirka Hladky Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221214082652.419965-5-sandipan.das@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aba4cb3eb5b8a7ad70a566a25f530c809993e556 Author: Sandipan Das Date: Wed Dec 14 13:56:51 2022 +0530 perf vendor events amd: Add Zen 4 metrics Add metrics taken from Section 2.1.15.2 "Performance Measurement" in the Processor Programming Reference (PPR) for AMD Family 19h Model 11h Revision B1 processors. The recommended metrics are sourced from Table 27 "Guidance for Common Performance Statistics with Complex Event Selects". The pipeline utilization metrics are sourced from Table 28 "Guidance for Pipeline Utilization Analysis Statistics". These are new to Zen 4 processors and useful for finding performance bottlenecks by analyzing activity at different stages of the pipeline. Metric groups have been added for Level 1 and Level 2 analysis. Signed-off-by: Sandipan Das Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Ingo Molnar Cc: Jiri Olsa Cc: Jirka Hladky Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221214082652.419965-4-sandipan.das@amd.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/amdzen4/pipeline.json | 98 ++++++ .../pmu-events/arch/x86/amdzen4/recommended.json | 334 +++++++++++++++++++++ 2 files changed, 432 insertions(+) commit 5b2ca349c313a0e03162e353d898c4f7046c7898 Author: Sandipan Das Date: Wed Dec 14 13:56:50 2022 +0530 perf vendor events amd: Add Zen 4 uncore events Add uncore events taken from Section 2.1.15.5 "L3 Cache Performance Monitor Counter"s and Section 7.1 "Fabric Performance Monitor Counter (PMC) Events" in the Processor Programming Reference (PPR) for AMD Family 19h Model 11h Revision B1 processors. This constitutes events which capture L3 cache activity and data bandwidth for various links and interfaces in the Data Fabric. Signed-off-by: Sandipan Das Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Ingo Molnar Cc: Jiri Olsa Cc: Jirka Hladky Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221214082652.419965-3-sandipan.das@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/amdzen4/cache.json | 119 +++ .../pmu-events/arch/x86/amdzen4/data-fabric.json | 1090 ++++++++++++++++++++ 2 files changed, 1209 insertions(+) commit 658448281d190c1467295914b2e9c1a4490e41b8 Author: Sandipan Das Date: Wed Dec 14 13:56:49 2022 +0530 perf vendor events amd: Add Zen 4 core events Add core events taken from Section 2.1.15.4 "Core Performance Monitor Counters" in the Processor Programming Reference (PPR) for AMD Family 19h Model 11h Revision B1 processors. This constitutes events which capture op dispatch, execution and retirement, branch prediction, L1 and L2 cache activity, TLB activity, etc. Signed-off-by: Sandipan Das Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Ingo Molnar Cc: Jiri Olsa Cc: Jirka Hladky Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221214082652.419965-2-sandipan.das@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/amdzen4/branch.json | 82 +++ tools/perf/pmu-events/arch/x86/amdzen4/cache.json | 653 ++++++++++++++++ tools/perf/pmu-events/arch/x86/amdzen4/core.json | 122 +++ .../arch/x86/amdzen4/floating-point.json | 818 +++++++++++++++++++++ tools/perf/pmu-events/arch/x86/amdzen4/memory.json | 174 +++++ tools/perf/pmu-events/arch/x86/amdzen4/other.json | 138 ++++ 6 files changed, 1987 insertions(+) commit 6abaa0204c34dc185783a23b0dbc35cdf9cc1399 Author: Ian Rogers Date: Wed Dec 14 22:55:10 2022 -0800 perf vendor events intel: Refresh westmereex events Update the westmereex events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but unused json values are removed. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-24-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/westmereex/cache.json | 516 --------------------- .../arch/x86/westmereex/floating-point.json | 28 -- .../pmu-events/arch/x86/westmereex/frontend.json | 3 - .../pmu-events/arch/x86/westmereex/memory.json | 135 ------ .../perf/pmu-events/arch/x86/westmereex/other.json | 22 - .../pmu-events/arch/x86/westmereex/pipeline.json | 129 +----- .../arch/x86/westmereex/virtual-memory.json | 21 - 7 files changed, 5 insertions(+), 849 deletions(-) commit bcea0838b9dbf70df424d4665feedad95be86d13 Author: Ian Rogers Date: Wed Dec 14 22:55:09 2022 -0800 perf vendor events intel: Refresh westmereep-sp events Update the westmereep-sp events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but unused json values are removed. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-23-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/westmereep-sp/cache.json | 517 --------------------- .../arch/x86/westmereep-sp/floating-point.json | 28 -- .../arch/x86/westmereep-sp/frontend.json | 3 - .../pmu-events/arch/x86/westmereep-sp/memory.json | 134 ------ .../pmu-events/arch/x86/westmereep-sp/other.json | 22 - .../arch/x86/westmereep-sp/pipeline.json | 129 +---- .../arch/x86/westmereep-sp/virtual-memory.json | 18 - 7 files changed, 5 insertions(+), 846 deletions(-) commit 598020743153cb4db77f7a1a0edc476a76a1e50a Author: Ian Rogers Date: Wed Dec 14 22:55:08 2022 -0800 perf vendor events intel: Refresh westmereep-dp events Update the westmereep-dp events using the new tooling from: https://github.com/intel/perfmon The events are unchanged, unused json values are removed and the version number bumped to v3 to match the perfmon mapfile.csv. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-22-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../pmu-events/arch/x86/westmereep-dp/cache.json | 445 --------------------- .../arch/x86/westmereep-dp/floating-point.json | 28 -- .../arch/x86/westmereep-dp/frontend.json | 3 - .../pmu-events/arch/x86/westmereep-dp/memory.json | 137 ------- .../pmu-events/arch/x86/westmereep-dp/other.json | 22 - .../arch/x86/westmereep-dp/pipeline.json | 129 +----- .../arch/x86/westmereep-dp/virtual-memory.json | 21 - 8 files changed, 6 insertions(+), 781 deletions(-) commit 69f685e0c125a9811b5489c2ece21708878fa6f9 Author: Ian Rogers Date: Wed Dec 14 22:55:07 2022 -0800 perf vendor events intel: Refresh tigerlake metrics and events Update the tigerlake metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The events are updated to version 1.08 and unused json values are removed. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-21-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../perf/pmu-events/arch/x86/tigerlake/cache.json | 210 +-------------- .../arch/x86/tigerlake/floating-point.json | 27 -- .../pmu-events/arch/x86/tigerlake/frontend.json | 125 --------- .../perf/pmu-events/arch/x86/tigerlake/memory.json | 77 ------ .../perf/pmu-events/arch/x86/tigerlake/other.json | 13 - .../pmu-events/arch/x86/tigerlake/pipeline.json | 287 +-------------------- .../pmu-events/arch/x86/tigerlake/tgl-metrics.json | 141 +++++----- .../arch/x86/tigerlake/uncore-other.json | 96 +++++-- .../arch/x86/tigerlake/virtual-memory.json | 60 ----- 10 files changed, 157 insertions(+), 881 deletions(-) commit 9b4240831af775ef0730a2fb8f529b4a66d4fc46 Author: Ian Rogers Date: Wed Dec 14 22:55:06 2022 -0800 perf vendor events intel: Refresh snowridgex events Update the snowridgex events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but unused json values are removed and descriptions improved. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-20-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/snowridgex/cache.json | 252 - .../arch/x86/snowridgex/floating-point.json | 11 - .../pmu-events/arch/x86/snowridgex/frontend.json | 36 - .../pmu-events/arch/x86/snowridgex/memory.json | 84 - .../perf/pmu-events/arch/x86/snowridgex/other.json | 143 - .../pmu-events/arch/x86/snowridgex/pipeline.json | 213 - .../arch/x86/snowridgex/uncore-memory.json | 624 +- .../arch/x86/snowridgex/uncore-other.json | 26334 ++++++++----------- .../arch/x86/snowridgex/uncore-power.json | 114 +- .../arch/x86/snowridgex/virtual-memory.json | 117 - 10 files changed, 11934 insertions(+), 15994 deletions(-) commit ecabdc6a7280f5714fcd978504af72de68e0f327 Author: Ian Rogers Date: Wed Dec 14 22:55:05 2022 -0800 perf vendor events intel: Refresh skylakex metrics and events Update the skylakex metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The order of metrics varies as TMA metrics are first converted and then removed if perfmon versions are found. The events are updated with fixes to uncore events and improved descriptions. uncore-other.json changes due to events now being sorted. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-19-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/skylakex/cache.json | 368 - .../arch/x86/skylakex/floating-point.json | 18 - .../pmu-events/arch/x86/skylakex/frontend.json | 109 - .../perf/pmu-events/arch/x86/skylakex/memory.json | 310 - tools/perf/pmu-events/arch/x86/skylakex/other.json | 30 - .../pmu-events/arch/x86/skylakex/pipeline.json | 194 - .../pmu-events/arch/x86/skylakex/skx-metrics.json | 2134 +- .../arch/x86/skylakex/uncore-memory.json | 2303 +- .../pmu-events/arch/x86/skylakex/uncore-other.json | 29356 +++++++++++-------- .../pmu-events/arch/x86/skylakex/uncore-power.json | 45 +- .../arch/x86/skylakex/virtual-memory.json | 56 - 11 files changed, 18426 insertions(+), 16497 deletions(-) commit 00ca782ec9f8d32ac65142f96a7423af78356818 Author: Ian Rogers Date: Wed Dec 14 22:55:04 2022 -0800 perf vendor events intel: Refresh skylake metrics and events Update the skylake metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The events are unchanged but unused json values are removed. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-18-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/skylake/cache.json | 660 --------------------- .../arch/x86/skylake/floating-point.json | 14 - .../perf/pmu-events/arch/x86/skylake/frontend.json | 109 ---- tools/perf/pmu-events/arch/x86/skylake/memory.json | 358 ----------- tools/perf/pmu-events/arch/x86/skylake/other.json | 4 - .../perf/pmu-events/arch/x86/skylake/pipeline.json | 192 ------ .../pmu-events/arch/x86/skylake/skl-metrics.json | 155 +++-- .../pmu-events/arch/x86/skylake/uncore-cache.json | 18 - .../pmu-events/arch/x86/skylake/uncore-other.json | 31 +- .../arch/x86/skylake/virtual-memory.json | 56 -- 10 files changed, 103 insertions(+), 1494 deletions(-) commit 1b91a994a2ac3cb374249b09bb818375267aea97 Author: Ian Rogers Date: Wed Dec 14 22:55:03 2022 -0800 perf vendor events intel: Refresh silvermont events Update the silvermont events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but unused json values are removed. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-17-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/silvermont/cache.json | 133 --------------------- .../arch/x86/silvermont/floating-point.json | 1 - .../pmu-events/arch/x86/silvermont/frontend.json | 8 -- .../pmu-events/arch/x86/silvermont/memory.json | 1 - .../perf/pmu-events/arch/x86/silvermont/other.json | 2 - .../pmu-events/arch/x86/silvermont/pipeline.json | 35 ------ .../arch/x86/silvermont/virtual-memory.json | 7 -- 7 files changed, 187 deletions(-) commit 400dd489d42faef3647d990dd67f553371ec204b Author: Ian Rogers Date: Wed Dec 14 22:55:02 2022 -0800 perf vendor events intel: Refresh sapphirerapids metrics and events Update the sapphirerapids metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The order of metrics varies as TMA metrics are first converted and then removed if perfmon versions are found. The events are updated to 1.09, in particular uncore, with fixes to uncore events and improved descriptions. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-16-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../pmu-events/arch/x86/sapphirerapids/cache.json | 350 +- .../arch/x86/sapphirerapids/floating-point.json | 63 - .../arch/x86/sapphirerapids/frontend.json | 144 - .../pmu-events/arch/x86/sapphirerapids/memory.json | 125 +- .../pmu-events/arch/x86/sapphirerapids/other.json | 91 +- .../arch/x86/sapphirerapids/pipeline.json | 424 +- .../arch/x86/sapphirerapids/spr-metrics.json | 2309 ++++--- .../arch/x86/sapphirerapids/uncore-memory.json | 526 +- .../arch/x86/sapphirerapids/uncore-other.json | 6606 +++++++++----------- .../arch/x86/sapphirerapids/uncore-power.json | 84 +- .../arch/x86/sapphirerapids/virtual-memory.json | 80 - 12 files changed, 4483 insertions(+), 6321 deletions(-) commit 28641ef5f387f2c8f57a7273d1ce35d168f14f86 Author: Ian Rogers Date: Wed Dec 14 22:55:01 2022 -0800 perf vendor events intel: Refresh sandybridge metrics and events Update the sandybridge metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The events are unchanged but unused json values are removed. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/sandybridge/cache.json | 441 --------------------- .../arch/x86/sandybridge/floating-point.json | 30 -- .../pmu-events/arch/x86/sandybridge/frontend.json | 64 --- .../pmu-events/arch/x86/sandybridge/memory.json | 108 ----- .../pmu-events/arch/x86/sandybridge/other.json | 12 - .../pmu-events/arch/x86/sandybridge/pipeline.json | 257 ------------ .../arch/x86/sandybridge/snb-metrics.json | 83 ++-- .../arch/x86/sandybridge/uncore-cache.json | 50 --- .../arch/x86/sandybridge/uncore-other.json | 28 +- .../arch/x86/sandybridge/virtual-memory.json | 32 -- 10 files changed, 57 insertions(+), 1048 deletions(-) commit d4e50e519ba0af3ab961de74bd88366ea11f3e62 Author: Ian Rogers Date: Wed Dec 14 22:55:00 2022 -0800 perf vendor events intel: Refresh nehalemex events Update the nehalemex events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but unused json values are removed. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-14-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/nehalemex/cache.json | 519 --------------------- .../arch/x86/nehalemex/floating-point.json | 28 -- .../pmu-events/arch/x86/nehalemex/frontend.json | 3 - .../perf/pmu-events/arch/x86/nehalemex/memory.json | 134 ------ .../perf/pmu-events/arch/x86/nehalemex/other.json | 18 - .../pmu-events/arch/x86/nehalemex/pipeline.json | 127 +---- .../arch/x86/nehalemex/virtual-memory.json | 13 - 7 files changed, 5 insertions(+), 837 deletions(-) commit 7e353370cd17547620a7757fb1a6c146f3287ea3 Author: Ian Rogers Date: Wed Dec 14 22:54:59 2022 -0800 perf vendor events intel: Refresh nehalemep events Update the nehalemep events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but unused json values are removed. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/nehalemep/cache.json | 524 --------------------- .../arch/x86/nehalemep/floating-point.json | 28 -- .../pmu-events/arch/x86/nehalemep/frontend.json | 3 - .../perf/pmu-events/arch/x86/nehalemep/memory.json | 134 ------ .../perf/pmu-events/arch/x86/nehalemep/other.json | 18 - .../pmu-events/arch/x86/nehalemep/pipeline.json | 127 +---- .../arch/x86/nehalemep/virtual-memory.json | 13 - 7 files changed, 5 insertions(+), 842 deletions(-) commit 5362e4d1f24ed4d4edd9dc1cbf846218c88eabc3 Author: Ian Rogers Date: Wed Dec 14 22:54:58 2022 -0800 perf vendor events intel: Refresh meteorlake events Update the meteorlake events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but they are sorted and unused json values are removed. This increases consistency across the json files. The CPUID matching regular expression is updated to match the perfmon one. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-12-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- .../perf/pmu-events/arch/x86/meteorlake/cache.json | 170 +++++----------- .../pmu-events/arch/x86/meteorlake/frontend.json | 6 - .../pmu-events/arch/x86/meteorlake/memory.json | 77 ++----- .../perf/pmu-events/arch/x86/meteorlake/other.json | 24 +-- .../pmu-events/arch/x86/meteorlake/pipeline.json | 222 +++++++-------------- .../arch/x86/meteorlake/virtual-memory.json | 28 +-- 7 files changed, 166 insertions(+), 363 deletions(-) commit 2c3fd22bb3ff166a072c083e6b7468259c37e46a Author: Ian Rogers Date: Wed Dec 14 22:54:57 2022 -0800 perf vendor events intel: Refresh knightslanding events Update the knightslanding events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but unused json values are removed. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/knightslanding/cache.json | 411 -------- .../arch/x86/knightslanding/floating-point.json | 3 - .../arch/x86/knightslanding/frontend.json | 7 - .../pmu-events/arch/x86/knightslanding/memory.json | 201 ---- .../arch/x86/knightslanding/pipeline.json | 44 - .../arch/x86/knightslanding/uncore-other.json | 1016 ++++++-------------- .../arch/x86/knightslanding/virtual-memory.json | 7 - 7 files changed, 287 insertions(+), 1402 deletions(-) commit e85af8a641ba3e8e4dab3e82f4a17f06378d47ff Author: Ian Rogers Date: Wed Dec 14 22:54:56 2022 -0800 perf vendor events intel: Refresh jaketown metrics and events Update the jaketown metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The events are unchanged but unused json values are removed. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/jaketown/cache.json | 289 --------------------- .../arch/x86/jaketown/floating-point.json | 30 --- .../pmu-events/arch/x86/jaketown/frontend.json | 64 ----- .../pmu-events/arch/x86/jaketown/jkt-metrics.json | 91 ++++--- .../perf/pmu-events/arch/x86/jaketown/memory.json | 103 -------- tools/perf/pmu-events/arch/x86/jaketown/other.json | 12 - .../pmu-events/arch/x86/jaketown/pipeline.json | 255 ------------------ .../pmu-events/arch/x86/jaketown/uncore-cache.json | 266 ++++--------------- .../arch/x86/jaketown/uncore-interconnect.json | 132 ---------- .../arch/x86/jaketown/uncore-memory.json | 58 ----- .../pmu-events/arch/x86/jaketown/uncore-other.json | 155 +---------- .../pmu-events/arch/x86/jaketown/uncore-power.json | 51 ---- .../arch/x86/jaketown/virtual-memory.json | 32 --- 13 files changed, 106 insertions(+), 1432 deletions(-) commit 8ee37818a0574fac9d42344595236099c153a494 Author: Ian Rogers Date: Wed Dec 14 22:54:55 2022 -0800 perf vendor events intel: Refresh ivytown metrics and events Update the ivytown metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The events are unchanged but unused json values are removed. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/ivytown/cache.json | 274 ----------- .../arch/x86/ivytown/floating-point.json | 34 -- .../perf/pmu-events/arch/x86/ivytown/frontend.json | 60 --- .../pmu-events/arch/x86/ivytown/ivt-metrics.json | 133 +++--- tools/perf/pmu-events/arch/x86/ivytown/memory.json | 121 ----- tools/perf/pmu-events/arch/x86/ivytown/other.json | 8 - .../perf/pmu-events/arch/x86/ivytown/pipeline.json | 250 ---------- .../pmu-events/arch/x86/ivytown/uncore-cache.json | 388 ++-------------- .../arch/x86/ivytown/uncore-interconnect.json | 505 ++++++++------------- .../pmu-events/arch/x86/ivytown/uncore-memory.json | 209 +-------- .../pmu-events/arch/x86/ivytown/uncore-other.json | 254 +---------- .../pmu-events/arch/x86/ivytown/uncore-power.json | 95 ---- .../arch/x86/ivytown/virtual-memory.json | 40 -- 13 files changed, 346 insertions(+), 2025 deletions(-) commit d86ac8d7cd31d9fc79aaac26cf2441e2fdfb6f3e Author: Ian Rogers Date: Wed Dec 14 22:54:54 2022 -0800 perf vendor events intel: Refresh ivybridge metrics and events Update the ivybridge metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The events are unchanged but the version number is 23 to match the perfmon version. In the events unused json values are removed. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/ivybridge/cache.json | 235 ------------------- .../arch/x86/ivybridge/floating-point.json | 34 --- .../pmu-events/arch/x86/ivybridge/frontend.json | 60 ----- .../pmu-events/arch/x86/ivybridge/ivb-metrics.json | 119 +++++----- .../perf/pmu-events/arch/x86/ivybridge/memory.json | 54 ----- .../perf/pmu-events/arch/x86/ivybridge/other.json | 8 - .../pmu-events/arch/x86/ivybridge/pipeline.json | 250 --------------------- .../arch/x86/ivybridge/uncore-cache.json | 50 ----- .../arch/x86/ivybridge/uncore-other.json | 28 +-- .../arch/x86/ivybridge/virtual-memory.json | 36 --- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 11 files changed, 76 insertions(+), 800 deletions(-) commit f8e23ad10520876fa9165425235867788383dbbc Author: Ian Rogers Date: Wed Dec 14 22:54:53 2022 -0800 perf vendor events intel: Refresh icelakex metrics and events Update the icelakex metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The order of metrics varies as TMA metrics are first converted and then removed if perfmon versions are found. The events are updated to 1.17, in particular uncore, with fixes to uncore events and improved descriptions. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/icelakex/cache.json | 316 +- .../arch/x86/icelakex/floating-point.json | 28 - .../pmu-events/arch/x86/icelakex/frontend.json | 140 - .../pmu-events/arch/x86/icelakex/icx-metrics.json | 2192 +- .../perf/pmu-events/arch/x86/icelakex/memory.json | 139 +- tools/perf/pmu-events/arch/x86/icelakex/other.json | 117 - .../pmu-events/arch/x86/icelakex/pipeline.json | 344 +- .../arch/x86/icelakex/uncore-memory.json | 1878 +- .../pmu-events/arch/x86/icelakex/uncore-other.json | 45144 +++++++++---------- .../pmu-events/arch/x86/icelakex/uncore-power.json | 115 +- .../arch/x86/icelakex/virtual-memory.json | 88 - tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 12 files changed, 22074 insertions(+), 28429 deletions(-) commit f8473086e3440a787c874531cdefb9bbf101f0cc Author: Ian Rogers Date: Wed Dec 14 22:54:52 2022 -0800 perf vendor events intel: Refresh icelake metrics and events Update the icelake metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The events are unchanged but unused json values are removed. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/icelake/cache.json | 412 --------------------- .../arch/x86/icelake/floating-point.json | 28 -- .../perf/pmu-events/arch/x86/icelake/frontend.json | 144 ------- .../pmu-events/arch/x86/icelake/icl-metrics.json | 151 ++++---- tools/perf/pmu-events/arch/x86/icelake/memory.json | 171 --------- tools/perf/pmu-events/arch/x86/icelake/other.json | 132 ------- .../perf/pmu-events/arch/x86/icelake/pipeline.json | 349 +---------------- .../pmu-events/arch/x86/icelake/uncore-other.json | 10 +- .../arch/x86/icelake/virtual-memory.json | 80 ---- 9 files changed, 89 insertions(+), 1388 deletions(-) commit 667433c4eb847731ce92af6894ffb095123eff30 Author: Ian Rogers Date: Wed Dec 14 22:54:51 2022 -0800 perf vendor events intel: Refresh haswellx metrics and events Update the haswellx metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The order of metrics varies as TMA metrics are first converted and then removed if perfmon versions are found. The events are updated with fixes to uncore events and improved descriptions. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/haswellx/cache.json | 217 -- .../arch/x86/haswellx/floating-point.json | 20 - .../pmu-events/arch/x86/haswellx/frontend.json | 58 - .../pmu-events/arch/x86/haswellx/hsx-metrics.json | 1467 ++++++------ .../perf/pmu-events/arch/x86/haswellx/memory.json | 170 -- tools/perf/pmu-events/arch/x86/haswellx/other.json | 8 - .../pmu-events/arch/x86/haswellx/pipeline.json | 258 --- .../pmu-events/arch/x86/haswellx/uncore-cache.json | 2448 ++++++++++---------- .../arch/x86/haswellx/uncore-interconnect.json | 722 +++--- .../arch/x86/haswellx/uncore-memory.json | 2037 ++++++++-------- .../pmu-events/arch/x86/haswellx/uncore-other.json | 1834 ++++++++------- .../pmu-events/arch/x86/haswellx/uncore-power.json | 150 +- .../arch/x86/haswellx/virtual-memory.json | 98 - 13 files changed, 4206 insertions(+), 5281 deletions(-) commit 8749311045ef5c727a540bbdfcf54f5b81683312 Author: Ian Rogers Date: Wed Dec 14 22:54:50 2022 -0800 perf vendor events intel: Refresh haswell metrics and events Update the haswell metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The events are unchanged but unused json values are removed. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/haswell/cache.json | 211 ----------------- .../arch/x86/haswell/floating-point.json | 20 -- .../perf/pmu-events/arch/x86/haswell/frontend.json | 58 ----- .../pmu-events/arch/x86/haswell/hsw-metrics.json | 117 ++++++---- tools/perf/pmu-events/arch/x86/haswell/memory.json | 149 ------------ tools/perf/pmu-events/arch/x86/haswell/other.json | 8 - .../perf/pmu-events/arch/x86/haswell/pipeline.json | 258 --------------------- .../pmu-events/arch/x86/haswell/uncore-cache.json | 50 ---- .../pmu-events/arch/x86/haswell/uncore-other.json | 21 +- .../arch/x86/haswell/virtual-memory.json | 98 -------- 10 files changed, 73 insertions(+), 917 deletions(-) commit a335420d32988f39e889b6ae3be2c965ec32a38e Author: Ian Rogers Date: Wed Dec 14 22:54:49 2022 -0800 perf vendor events intel: Refresh goldmontplus events Update the goldmontplus events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but unused json values are removed. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/goldmontplus/cache.json | 470 --------------------- .../arch/x86/goldmontplus/floating-point.json | 11 - .../pmu-events/arch/x86/goldmontplus/frontend.json | 32 -- .../pmu-events/arch/x86/goldmontplus/memory.json | 10 - .../pmu-events/arch/x86/goldmontplus/other.json | 20 - .../pmu-events/arch/x86/goldmontplus/pipeline.json | 143 ------- .../arch/x86/goldmontplus/virtual-memory.json | 69 --- 7 files changed, 755 deletions(-) commit 387bc79f83948e9f6eca6429d3ccdbc96a11228d Author: Ian Rogers Date: Wed Dec 14 22:54:48 2022 -0800 perf vendor events intel: Refresh goldmont events Update the goldmont events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but unused json values are removed. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/goldmont/cache.json | 288 --------------------- .../arch/x86/goldmont/floating-point.json | 6 - .../pmu-events/arch/x86/goldmont/frontend.json | 16 -- .../perf/pmu-events/arch/x86/goldmont/memory.json | 6 - tools/perf/pmu-events/arch/x86/goldmont/other.json | 10 - .../pmu-events/arch/x86/goldmont/pipeline.json | 77 ------ .../arch/x86/goldmont/virtual-memory.json | 14 - 7 files changed, 417 deletions(-) commit 5cebe49ce80391513faf0b9315ca93599407542c Author: Ian Rogers Date: Wed Dec 14 22:54:47 2022 -0800 perf vendor events intel: Refresh elkhartlake events Update the elkhartlake events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but unused json values are removed. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065510.1621979-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/elkhartlake/cache.json | 252 --------------------- .../arch/x86/elkhartlake/floating-point.json | 11 - .../pmu-events/arch/x86/elkhartlake/frontend.json | 36 --- .../pmu-events/arch/x86/elkhartlake/memory.json | 84 ------- .../pmu-events/arch/x86/elkhartlake/other.json | 143 ------------ .../pmu-events/arch/x86/elkhartlake/pipeline.json | 213 ----------------- .../arch/x86/elkhartlake/virtual-memory.json | 117 ---------- 7 files changed, 856 deletions(-) commit 8358b1222798f1eaec057d770ea43ad9d059abf9 Author: Ian Rogers Date: Wed Dec 14 22:49:53 2022 -0800 perf vendor events intel: Refresh cascadelakex metrics and events Update the cascadelakex metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The order of metrics varies as TMA metrics are first converted and then removed if perfmon versions are found. The events are updated with fixes to uncore events and improved descriptions. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065017.1621020-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/cascadelakex/cache.json | 3644 --- .../arch/x86/cascadelakex/clx-metrics.json | 2217 +- .../arch/x86/cascadelakex/floating-point.json | 24 - .../pmu-events/arch/x86/cascadelakex/frontend.json | 109 - .../pmu-events/arch/x86/cascadelakex/memory.json | 2194 -- .../pmu-events/arch/x86/cascadelakex/other.json | 490 - .../pmu-events/arch/x86/cascadelakex/pipeline.json | 194 - .../arch/x86/cascadelakex/uncore-memory.json | 3185 +- .../arch/x86/cascadelakex/uncore-other.json | 29770 +++++++++++-------- .../arch/x86/cascadelakex/uncore-power.json | 45 +- .../arch/x86/cascadelakex/virtual-memory.json | 56 - 11 files changed, 19060 insertions(+), 22868 deletions(-) commit 5e241aad62057b5b3a4fe8bd6ed2fdd906d38a90 Author: Ian Rogers Date: Wed Dec 14 22:49:52 2022 -0800 perf vendor events intel: Refresh broadwellx metrics and events Update the broadwellx metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The order of metrics varies as TMA metrics are first converted and then removed if perfmon versions are found. The events are updated with fixes to uncore events and improved descriptions. The formatting changes increase consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065017.1621020-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/broadwellx/bdx-metrics.json | 1703 +++++---- .../perf/pmu-events/arch/x86/broadwellx/cache.json | 191 - .../arch/x86/broadwellx/floating-point.json | 40 - .../pmu-events/arch/x86/broadwellx/frontend.json | 56 - .../pmu-events/arch/x86/broadwellx/memory.json | 143 - .../perf/pmu-events/arch/x86/broadwellx/other.json | 8 - .../pmu-events/arch/x86/broadwellx/pipeline.json | 272 -- .../arch/x86/broadwellx/uncore-cache.json | 3740 ++++++++++---------- .../arch/x86/broadwellx/uncore-interconnect.json | 1225 +++---- .../arch/x86/broadwellx/uncore-memory.json | 2052 ++++++----- .../arch/x86/broadwellx/uncore-other.json | 2410 +++++++------ .../arch/x86/broadwellx/uncore-power.json | 198 +- .../arch/x86/broadwellx/virtual-memory.json | 76 - 13 files changed, 5577 insertions(+), 6537 deletions(-) commit f6ee944ce4e857b7ba62218caf392f3cecc90c02 Author: Ian Rogers Date: Wed Dec 14 22:49:51 2022 -0800 perf vendor events intel: Refresh broadwellde metrics and events Update the broadwellde metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics vary as tma_false_sharing, MEM_Parallel_Requests and MEM_Request_Latency are explicitly dropped from having missing events: https://github.com/captain5050/perfmon/blob/main/scripts/create_perf_json.py#L934 The formulas also differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The events are unchanged but unused json values are removed and implicit umasks of 0 are dropped. This increases consistency across the json files. mapfile.csv's version number is set to match that in the perfmon repository. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215065017.1621020-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/broadwellde/bdwde-metrics.json | 143 +++--- .../pmu-events/arch/x86/broadwellde/cache.json | 153 ------- .../arch/x86/broadwellde/floating-point.json | 40 -- .../pmu-events/arch/x86/broadwellde/frontend.json | 56 --- .../pmu-events/arch/x86/broadwellde/memory.json | 86 ---- .../pmu-events/arch/x86/broadwellde/other.json | 8 - .../pmu-events/arch/x86/broadwellde/pipeline.json | 272 ------------ .../arch/x86/broadwellde/uncore-cache.json | 414 ++---------------- .../arch/x86/broadwellde/uncore-memory.json | 477 ++++----------------- .../arch/x86/broadwellde/uncore-other.json | 163 ++----- .../arch/x86/broadwellde/uncore-power.json | 57 --- .../arch/x86/broadwellde/virtual-memory.json | 76 ---- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 13 files changed, 211 insertions(+), 1736 deletions(-) commit fec57a8e4a2cede35adbd9d70f1826ea312c49b3 Author: Ian Rogers Date: Wed Dec 14 22:47:28 2022 -0800 perf vendor events intel: Refresh broadwell metrics and events Update the broadwell metrics and events using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". The events are unchanged but unused json values are removed, implicit umasks of 0 are dropped and duplicate short and long descriptions have the long one dropped. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215064755.1620246-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/broadwell/bdw-metrics.json | 137 +-- .../perf/pmu-events/arch/x86/broadwell/cache.json | 957 --------------------- .../arch/x86/broadwell/floating-point.json | 40 - .../pmu-events/arch/x86/broadwell/frontend.json | 56 -- .../perf/pmu-events/arch/x86/broadwell/memory.json | 890 ------------------- .../perf/pmu-events/arch/x86/broadwell/other.json | 8 - .../pmu-events/arch/x86/broadwell/pipeline.json | 272 ------ .../arch/x86/broadwell/uncore-cache.json | 19 - .../arch/x86/broadwell/uncore-other.json | 25 +- .../arch/x86/broadwell/virtual-memory.json | 76 -- 10 files changed, 84 insertions(+), 2396 deletions(-) commit 6fa91f645f6f17f96f99af9e968e4109f6eb8e72 Author: Ian Rogers Date: Wed Dec 14 22:47:27 2022 -0800 perf vendor events intel: Refresh bonnell events Update the bonnell events using the new tooling from: https://github.com/intel/perfmon The events are unchanged but unused json values are removed and implicit umasks of 0 are dropped. This increases consistency across the json files. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215064755.1620246-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/bonnell/cache.json | 93 ---------------------- .../arch/x86/bonnell/floating-point.json | 47 ++--------- .../perf/pmu-events/arch/x86/bonnell/frontend.json | 11 --- tools/perf/pmu-events/arch/x86/bonnell/memory.json | 19 ----- tools/perf/pmu-events/arch/x86/bonnell/other.json | 74 ++--------------- .../perf/pmu-events/arch/x86/bonnell/pipeline.json | 65 ++------------- .../arch/x86/bonnell/virtual-memory.json | 15 ---- 7 files changed, 18 insertions(+), 306 deletions(-) commit a5abef626f35378a7de2edc399902dc9648f69ef Author: Ian Rogers Date: Wed Dec 14 22:47:26 2022 -0800 perf vendor events intel: Refresh alderlake-n metrics Update the alderlake-n metrics using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215064755.1620246-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/alderlaken/adln-metrics.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 266b2ca72742269340aca6f34356bee277b59c7d Author: Ian Rogers Date: Wed Dec 14 22:47:25 2022 -0800 perf vendor events intel: Refresh alderlake metrics Update the alderlake metrics using the new tooling from: https://github.com/intel/perfmon The metrics are unchanged but the formulas differ due to parentheses, use of exponents and removal of redundant operations like "* 1". Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221215064755.1620246-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/alderlake/adl-metrics.json | 116 ++++++++++----------- 1 file changed, 58 insertions(+), 58 deletions(-) commit ed4c1778cc1abd18d491d0eecb7947c7cac3a598 Author: Ian Rogers Date: Wed Dec 14 22:47:24 2022 -0800 perf test pmu-events: Fake PMU metric workaround We test metrics with fake events with fake values. The fake values may yield division by zero and so we count both up and down to try to avoid this. Unfortunately this isn't sufficient for some metrics and so don't fail the test for them. Add the metric name to debug output. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20221215064755.1620246-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/pmu-events.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit ad9ef9eb64a2230c12fa5c6c98aed176428012e8 Author: Namhyung Kim Date: Thu Dec 15 11:28:17 2022 -0800 perf hist: Improve srcline_{from,to} sort key performance Likewise, modify ->cmp() callback to compare sample address and map address. And add ->collapse() and ->sort() to check the actual srcfile string. Also add ->init() to make sure it has the srcfile. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Milian Wolff Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221215192817.2734573-10-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit f0cdde28fecc0d7ff85c315b2abf206ef27c0174 Author: Namhyung Kim Date: Thu Dec 15 11:28:16 2022 -0800 perf hist: Improve srcfile sort key performance Likewise, modify ->cmp() callback to compare sample address and map address. And add ->collapse() and ->sort() to check the actual srcfile string. Also add ->init() to make sure it has the srcfile. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Milian Wolff Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221215192817.2734573-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit ec222d7e7cfd09276891ffdf57d75858fe148c9f Author: Namhyung Kim Date: Thu Dec 15 11:28:15 2022 -0800 perf hist: Improve srcline sort key performance The sort_entry->cmp() will be called for eventy sample data to find a matching entry. When it has 'srcline' sort key, that means it needs to call addr2line or libbfd everytime. This is not optimal because many samples will have same address and it just can call addr2line once. So postpone the actual srcline check to the sort_entry->collpase() and compare addresses in ->cmp(). Also it needs to add ->init() callback to make sure it has srcline info. If a sample has a unique data, chances are the entry can be sorted out by other (previous) keys and callbacks in sort_srcline never called. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Milian Wolff Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221215192817.2734573-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit cb6e92c764272ca288398ad6442bbb0f064c2da8 Author: Namhyung Kim Date: Thu Dec 15 11:28:14 2022 -0800 perf hist: Add perf_hpp_fmt->init() callback In __hists__insert_output_entry(), it calls fmt->sort() for dynamic entries with NULL to update column width for tracepoint fields. But it's a hacky abuse of the sort callback, better to have a proper callback for that. I'll add more use cases later. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Milian Wolff Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221215192817.2734573-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 10 +++++----- tools/perf/util/hist.h | 1 + tools/perf/util/sort.c | 31 ++++++++++++++++++++++++++----- tools/perf/util/sort.h | 1 + 4 files changed, 33 insertions(+), 10 deletions(-) commit d5e33ce06ba4a0fcf7815ff9edc3f651f7ae502e Author: Namhyung Kim Date: Thu Dec 15 11:28:13 2022 -0800 perf srcline: Conditionally suppress addr2line warnings It has symbol_conf.disable_add2line_warn to suppress some warnings. Let's make it consistent with others. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Milian Wolff Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221215192817.2734573-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/srcline.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 3b27222dd6cf7578c35b5903bf9d183a88d13744 Author: Namhyung Kim Date: Thu Dec 15 11:28:12 2022 -0800 perf srcline: Skip srcline if .debug_line is missing The srcline info is from the .debug_line section. No need to setup addr2line subprocess if the section is missing. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20221215192817.2734573-5-namhyung@kernel.org Cc: Peter Zijlstra Cc: Adrian Hunter Cc: Milian Wolff Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Ingo Molnar Cc: Leo Yan Cc: Andi Kleen Cc: LKML Cc: linux-perf-users@vger.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/srcline.c | 3 +++ 1 file changed, 3 insertions(+) commit 06ea72a42d96ddcbac53f3b08a1c56d13b1c014a Author: Namhyung Kim Date: Thu Dec 15 11:28:11 2022 -0800 perf symbol: Add filename__has_section() The filename__has_section() is to check if the given section name is in the binary. It'd be used for checking debug info for srcline. Committer notes: Added missing __maybe_unused to the unused filename__has_section() arguments in tools/perf/util/symbol-minimal.c. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Milian Wolff Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221215192817.2734573-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 28 ++++++++++++++++++++++++++++ tools/perf/util/symbol-minimal.c | 5 +++++ tools/perf/util/symbol.h | 1 + 3 files changed, 34 insertions(+) commit ea335ef3ddcdc17d616753743f92718e723341fb Author: Namhyung Kim Date: Thu Dec 15 11:28:09 2022 -0800 perf srcline: Do not return NULL for srcline The code assumes non-NULL srcline value always, let's return the usual SRCLINE_UNKNOWN ("??:0") string instead. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Milian Wolff Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221215192817.2734573-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/srcline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b50d691e50e600fab82b423be871860537d75dc9 Author: Michael Petlan Date: Mon Dec 19 17:30:08 2022 +0100 perf test: Fix "all PMU test" to skip parametrized events Parametrized events are not only a powerpc domain. They occur on other platforms too (e.g. aarch64). They should be ignored in this testcase, since proper setup of the parameters is out of scope of this script. Let's not filter them out by PMU name, but rather based on the fact that they expect a parameter. Fixes: 451ed8058c69a3fe ("perf test: Fix "all PMU test" to skip hv_24x7/hv_gpci tests on powerpc") Signed-off-by: Michael Petlan Cc: Athira Rajeev Cc: Disha Goel Cc: Ian Rogers Cc: Michael Ellerman Cc: Nageswara R Sastry Link: https://lore.kernel.org/r/20221219163008.9691-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/stat_all_pmu.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 0c0a0db87e1c159aa7a2a52bfbec0be604c65f86 Author: Changbin Du Date: Sun Dec 18 06:51:51 2022 +0800 perf tools: Add .DELETE_ON_ERROR special Makefile target to clean up partially updated files on error. As kbuild, this adds .DELETE_ON_ERROR special target to clean up partially updated files on error. A known issue is the empty vmlinux.h generted by bpftool if it failed to dump btf info. Reviewed-by: Leo Yan Signed-off-by: Changbin Du Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221217225151.90387-1-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 3 +++ 1 file changed, 3 insertions(+) commit cb459c89b734f9fcfd201a6ef993c063a703ec73 Author: Namhyung Kim Date: Mon Dec 19 12:17:32 2022 -0800 perf test: Update 'perf lock contention' test Add more tests for the new filters. $ sudo perf test contention -v 87: kernel lock contention analysis test : --- start --- test child forked, pid 412379 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 Testing perf lock contention --lock-filter test child finished with 0 ---- end ---- kernel lock contention analysis test: Ok Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Blake Jones 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/20221219201732.460111-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/lock_contention.sh | 58 ++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) commit 5e3febe7b7b99f942311ddfa05bb06910d06b14d Author: Namhyung Kim Date: Mon Dec 19 12:17:31 2022 -0800 perf lock contention: Support lock addr/name filtering for BPF Likewise, add addr_filter BPF hash map and check it with the lock address. $ sudo ./perf lock con -ab -L tasklist_lock -- ./perf bench sched messaging # Running 'sched/messaging' benchmark: # 20 sender and receiver processes per group # 10 groups == 400 processes run Total time: 0.169 [sec] contended total wait max wait avg wait type caller 18 174.09 us 25.31 us 9.67 us rwlock:W do_exit+0x36d 5 32.34 us 10.87 us 6.47 us rwlock:R do_wait+0x8b 4 15.41 us 4.73 us 3.85 us rwlock:W release_task+0x6e Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Blake Jones 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/20221219201732.460111-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_lock_contention.c | 42 +++++++++++++++++++++++++- tools/perf/util/bpf_skel/lock_contention.bpf.c | 17 +++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) commit 511e19b9e2112463c33a744ecb8a798056074408 Author: Namhyung Kim Date: Mon Dec 19 12:17:30 2022 -0800 perf lock contention: Add -L/--lock-filter option The -L/--lock-filter option is to filter only given locks. The locks can be specified by address or name (if exists). $ sudo ./perf lock record -a sleep 1 $ sudo ./perf lock con -l contended total wait max wait avg wait address symbol 57 1.11 ms 42.83 us 19.54 us ffff9f4140059000 15 280.88 us 23.51 us 18.73 us ffffffff9d007a40 jiffies_lock 1 20.49 us 20.49 us 20.49 us ffffffff9d0d50c0 rcu_state 1 9.02 us 9.02 us 9.02 us ffff9f41759e9ba0 $ sudo ./perf lock con -L jiffies_lock,rcu_state contended total wait max wait avg wait type caller 15 280.88 us 23.51 us 18.73 us spinlock tick_sched_do_timer+0x93 1 20.49 us 20.49 us 20.49 us spinlock __softirqentry_text_start+0xeb $ sudo ./perf lock con -L ffff9f4140059000 contended total wait max wait avg wait type caller 38 779.40 us 42.83 us 20.51 us spinlock worker_thread+0x50 11 216.30 us 39.87 us 19.66 us spinlock queue_work_on+0x39 8 118.13 us 20.51 us 14.77 us spinlock kthread+0xe5 Committer testing: # uname -a Linux quaco 6.0.12-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 8 17:15:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux # perf lock record ^C[ perf record: Woken up 1 times to write data ] # perf lock con -L jiffies_lock,rcu_state contended total wait max wait avg wait type caller # perf lock con contended total wait max wait avg wait type caller 1 9.06 us 9.06 us 9.06 us spinlock call_timer_fn+0x24 # perf lock con -L call ignore unknown symbol: call contended total wait max wait avg wait type caller 1 9.06 us 9.06 us 9.06 us spinlock call_timer_fn+0x24 # Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Blake Jones 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/20221219201732.460111-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-lock.txt | 4 + tools/perf/builtin-lock.c | 140 +++++++++++++++++++++++++++++++-- tools/perf/util/lock-contention.h | 4 + 3 files changed, 142 insertions(+), 6 deletions(-) commit 529772c4df286159fea453957a6052e20b90e8a8 Author: Namhyung Kim Date: Mon Dec 19 12:17:29 2022 -0800 perf lock contention: Support lock type filtering for BPF Likewise, add type_filter BPF hash map and check it when user gave a lock type filter. $ sudo ./perf lock con -ab -Y rwlock -- ./perf bench sched messaging # Running 'sched/messaging' benchmark: # 20 sender and receiver processes per group # 10 groups == 400 processes run Total time: 0.203 [sec] contended total wait max wait avg wait type caller 15 156.19 us 19.45 us 10.41 us rwlock:W do_exit+0x36d 1 11.12 us 11.12 us 11.12 us rwlock:R do_wait+0x8b 1 5.09 us 5.09 us 5.09 us rwlock:W release_task+0x6e Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Blake Jones 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/20221219201732.460111-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 1 + tools/perf/util/bpf_lock_contention.c | 15 ++++++++++++++- tools/perf/util/bpf_skel/lock_contention.bpf.c | 21 +++++++++++++++++++-- tools/perf/util/lock-contention.h | 1 + 4 files changed, 35 insertions(+), 3 deletions(-) commit b4a7eff93c39f985b33ac114f83ac5b325f42151 Author: Namhyung Kim Date: Mon Dec 19 12:17:28 2022 -0800 perf lock contention: Add -Y/--type-filter option The -Y/--type-filter option is to filter the result for specific lock types only. It can accept comma-separated values. Note that it would accept type names like one in the output. spinlock, mutex, rwsem:R and so on. For RW-variant lock types, it converts the name to the both variants. In other words, "rwsem" is same as "rwsem:R,rwsem:W". Also note that "mutex" has two different encoding - one for sleeping wait, another for optimistic spinning. Add "mutex-spin" entry for the lock_type_table so that we can add it for "mutex" under the table. $ sudo ./perf lock record -a -- ./perf bench sched messaging $ sudo ./perf lock con -E 5 -Y spinlock contended total wait max wait avg wait type caller 802 1.26 ms 11.73 us 1.58 us spinlock __wake_up_common_lock+0x62 13 787.16 us 105.44 us 60.55 us spinlock remove_wait_queue+0x14 12 612.96 us 78.70 us 51.08 us spinlock prepare_to_wait+0x27 114 340.68 us 12.61 us 2.99 us spinlock try_to_wake_up+0x1f5 83 226.38 us 9.15 us 2.73 us spinlock folio_lruvec_lock_irqsave+0x5e Committer notes: Make get_type_flag() return UINT_MAX for error instad of -1UL, as that function returns 'unsigned int' and we store the value on a 'unsigned int' 'flags' variable which makes clang unhappy: 35 98.23 fedora:37 : FAIL clang version 15.0.6 (Fedora 15.0.6-1.fc37) builtin-lock.c:2012:14: error: result of comparison of constant 18446744073709551615 with expression of type 'unsigned int' is always true [-Werror,-Wtautological-constant-out-of-range-compare] if (flags != -1UL) { ~~~~~ ^ ~~~~ builtin-lock.c:2021:14: error: result of comparison of constant 18446744073709551615 with expression of type 'unsigned int' is always true [-Werror,-Wtautological-constant-out-of-range-compare] if (flags != -1UL) { ~~~~~ ^ ~~~~ builtin-lock.c:2037:14: error: result of comparison of constant 18446744073709551615 with expression of type 'unsigned int' is always true [-Werror,-Wtautological-constant-out-of-range-compare] if (flags != -1UL) { ~~~~~ ^ ~~~~ 3 errors generated. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Blake Jones 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/20221219201732.460111-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-lock.txt | 23 +++++-- tools/perf/builtin-lock.c | 116 ++++++++++++++++++++++++++++++++- tools/perf/util/lock-contention.h | 5 ++ 3 files changed, 136 insertions(+), 8 deletions(-) commit d264dd3bbbd16b56239e889023fbe49413a58eaf Merge: 5461e079009a 54f27dc53f17 Author: Linus Torvalds Date: Wed Dec 21 09:48:03 2022 -0800 Merge tag 'for-linus-2022122101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Benjamin Tissoires: - Four potential NULL pointers dereferences (Bastien Nocera, Enrik Berkhan, Jiasheng Jiang and Roderick Colenbrander) - Allow Wacom devices in bootloader mode to be flashed (Jason Gerecke) - Some assorted devices quirks (José Expósito and Terry Junge) * tag 'for-linus-2022122101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: sony: Fix unused function warning HID: plantronics: Additional PIDs for double volume key presses quirk HID: multitouch: fix Asus ExpertBook P2 P2451FA trackpoint HID: Ignore HP Envy x360 eu0009nv stylus battery HID: wacom: Ensure bootloader PID is usable in hidraw mode HID: amd_sfh: Add missing check for dma_alloc_coherent HID: playstation: fix free of uninialized pointer for DS4 in Bluetooth. HID: mcp2221: don't connect hidraw HID: logitech-hidpp: Guard FF init code against non-USB devices commit 5461e079009ae2732c833281c4b50dfb58d15ba5 Merge: 7a693ea78e3c 542d3c03fd89 Author: Linus Torvalds Date: Wed Dec 21 09:44:41 2022 -0800 Merge tag 'media/v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - A regression at V4L2 core breaking string controls - Build warning fixes on sun6i drivers when building with clang * tag 'media/v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: sun6i-isp: params: Unregister pending buffer on cleanup media: sun6i-isp: params: Fix incorrect indentation media: sun6i-isp: capture: Fix uninitialized variable use media: sun6i-isp: proc: Declare subdev ops as static media: sun6i-isp: proc: Error out on invalid port to fix warning media: sun6i-isp: proc: Fix return code handling in stream off path media: sun8i-a83t-mipi-csi2: Clarify return code handling in stream off path media: sun6i-mipi-csi2: Clarify return code handling in stream off path media: sun6i-csi: capture: Remove useless ret initialization media: sun6i-csi: bridge: Error out on invalid port to fix warning media: v4l2-ctrls-api.c: add back dropped ctrl->is_new = 1 commit 7a693ea78e3c48605a2d849fd241ff15561f10d5 Merge: 9cf5b508bd26 8fa22f4b88e8 Author: Linus Torvalds Date: Wed Dec 21 09:41:28 2022 -0800 Merge tag 'pwm/for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "Various changes across the board, mostly improvements and cleanups" * tag 'pwm/for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (42 commits) pwm: pca9685: Convert to i2c's .probe_new() pwm: sun4i: Propagate errors in .get_state() to the caller pwm: Handle .get_state() failures pwm: sprd: Propagate errors in .get_state() to the caller pwm: rockchip: Propagate errors in .get_state() to the caller pwm: mtk-disp: Propagate errors in .get_state() to the caller pwm: imx27: Propagate errors in .get_state() to the caller pwm: cros-ec: Propagate errors in .get_state() to the caller pwm: crc: Propagate errors in .get_state() to the caller leds: qcom-lpg: Propagate errors in .get_state() to the caller drm/bridge: ti-sn65dsi86: Propagate errors in .get_state() to the caller pwm/tracing: Also record trace events for failed API calls pwm: Make .get_state() callback return an error code pwm: pxa: Enable for MMP platform pwm: pxa: Add reference manual link and limitations pwm: pxa: Use abrupt shutdown mode pwm: pxa: Remove clk enable/disable from pxa_pwm_config pwm: pxa: Set duty cycle to 0 when disabling PWM pwm: pxa: Remove pxa_pwm_enable/disable pwm: mediatek: Add support for MT7986 ... commit 9cf5b508bd260d5693d337bcf1f9b82b961b6137 Merge: f2855eec19ca 11c7f9e3131a Author: Linus Torvalds Date: Wed Dec 21 09:37:14 2022 -0800 Merge tag 'rproc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull remoteproc updates from Bjorn Andersson: "rproc-virtio device names are now auto generated, to avoid conflicts between remoteproc instances. The imx_rproc driver is extended with support for communicating with and attaching to a running M4 on i.MX8QXP, as well as support for attaching to the M4 after self-recovering from a crash. Support is added for i.MX8QM and mailbox channels are reconnected during the recovery process, in order to avoid data corruption. The Xilinx Zynqmp firmware interface is extended and support for the Xilinx R5 RPU is introduced. Various resources leaks, primarily in error paths, throughout the Qualcomm drivers are corrected. Lastly a fix to ensure that pm_relax is invoked even if the remoteproc instance is stopped between a crash is being reported and the recovery handler is scheduled" * tag 'rproc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (25 commits) remoteproc: core: Do pm_relax when in RPROC_OFFLINE state remoteproc: qcom: q6v5: Fix missing clk_disable_unprepare() in q6v5_wcss_qcs404_power_on() remoteproc: qcom_q6v5_pas: Fix missing of_node_put() in adsp_alloc_memory_region() remoteproc: qcom_q6v5_pas: detach power domains on remove remoteproc: qcom_q6v5_pas: disable wakeup on probe fail or remove remoteproc: qcom: q6v5: Fix potential null-ptr-deref in q6v5_wcss_init_mmio() remoteproc: sysmon: fix memory leak in qcom_add_sysmon_subdev() remoteproc: sysmon: Make QMI message rules const drivers: remoteproc: Add Xilinx r5 remoteproc driver firmware: xilinx: Add RPU configuration APIs firmware: xilinx: Add shutdown/wakeup APIs firmware: xilinx: Add ZynqMP firmware ioctl enums for RPU configuration. arm64: dts: xilinx: zynqmp: Add RPU subsystem device node dt-bindings: remoteproc: Add Xilinx RPU subsystem bindings remoteproc: core: Use device_match_of_node() remoteproc: imx_rproc: Correct i.MX93 DRAM mapping remoteproc: imx_rproc: Enable attach recovery for i.MX8QM/QXP remoteproc: imx_rproc: Request mbox channel later remoteproc: imx_rproc: Support i.MX8QM remoteproc: imx_rproc: Support kicking Mcore from Linux for i.MX8QXP ... commit f2855eec19cadddad2900da3a009ee39df6116a7 Merge: ec34c2b4ec38 53c60d100427 Author: Linus Torvalds Date: Wed Dec 21 09:31:18 2022 -0800 Merge tag 'mailbox-v6.2' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - qcom: enable sc8280xp, sm8550 and sm4250 support - ti: default to ARCH_K3 for msg manager - mediatek: - add mt8188 and mt8186 support - request irq only after got ready - zynq-ipi: fix error handling after device_register - mpfs: check sys-con status - rockchip: simplify by using device_get_match_data * tag 'mailbox-v6.2' of git://git.linaro.org/landing-teams/working/fujitsu/integration: dt-bindings: mailbox: qcom-ipcc: Add compatible for SM8550 mailbox: mtk-cmdq: Do not request irq until we are ready mailbox: zynq-ipi: fix error handling while device_register() fails mailbox: mtk-cmdq-mailbox: Use platform data directly instead of copying mailbox: arm_mhuv2: Fix return value check in mhuv2_probe() dt-bindings: mailbox: mediatek,gce-mailbox: add mt8188 compatible name dt-bindings: mailbox: add GCE header file for mt8188 mailbox: mpfs: read the system controller's status mailbox: mtk-cmdq: add MT8186 support mailbox: mtk-cmdq: add gce ddr enable support flow mailbox: mtk-cmdq: add gce software ddr enable private data mailbox: mtk-cmdq: Use GCE_CTRL_BY_SW definition instead of number mailbox: rockchip: Use device_get_match_data() to simplify the code dt-bindings: mailbox: qcom-ipcc: Add sc8280xp compatible mailbox: config: ti-msgmgr: Default set to ARCH_K3 for TI msg manager mailbox: qcom-apcs-ipc: Add SM4250 APCS IPC support dt-bindings: mailbox: qcom: Add SM4250 APCS compatible commit ec34c2b4ec383766a42ffd9206dc6605be3c6f6c Merge: 7406fd75a920 0de796b6047d Author: Linus Torvalds Date: Wed Dec 21 09:24:39 2022 -0800 Merge tag 'backlight-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight update from Lee Jones: "Convert a bunch of I2C class drivers over to .probe_new()" * tag 'backlight-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: tosa: Convert to i2c's .probe_new() backlight: lv5207lp: Convert to i2c's .probe_new() backlight: lp855x: Convert to i2c's .probe_new() backlight: lm3639: Convert to i2c's .probe_new() backlight: lm3630a: Convert to i2c's .probe_new() backlight: bd6107: Convert to i2c's .probe_new() backlight: arcxcnn: Convert to i2c's .probe_new() backlight: adp8870: Convert to i2c's .probe_new() backlight: adp8860: Convert to i2c's .probe_new() commit 7406fd75a92066712b6f696983f89438f474049a Merge: 7c0846125358 37fecbb80721 Author: Linus Torvalds Date: Wed Dec 21 09:19:24 2022 -0800 Merge tag 'mfd-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Add support for Ampere Computing SMpro - Add support for TI TPS65219 PMIC New Functionality: - Add support for multiple devices of the same type; rk808 Fix-ups: - Convert a bunch of I2C class drivers over to .probe_new() - Remove superfluous includes; mc13xxx-*, palmas, timberdale - Use correct includes for GPIO handling; madera-core - Convert to GPIOD; twl6040 - Remove unused platform data handling; twl6040 - Device Tree changes; many - Remove unused drivers; dm355evm_msp, davinci_voicecodec, htc-i2cpld - Add support for modules; palmas - Enable COMPILE_TEST support; intel_soc_pmic* - Trivial: spelling / whitespace fixes; mc13xxx-spi - Replace old PM helpers with new ones; many - Convert deprecated mask_invert usage to unmask_base; many - Use devm_*() calls; qcom_rpm - MAINTAINER fix-ups - Make use of improved / replaced APIs; palmas, fsl-imx25-tsadc, stm32-lptimer, qcom_rpm, rohm-* Bug Fixes: - Add bounds / error checking; mt6360-core - No sleeping inside critical sections; axp20x - Fix missing dependencies; ROHM_BD957XMUF - Repair error paths; qcom-pm8008" * tag 'mfd-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (161 commits) dt-bindings: mfd: da9062: Correct file name for watchdog mfd: pm8008: Fix return value check in pm8008_probe() mfd: rohm: Use dev_err_probe() mfd: Drop obsolete dependencies on COMPILE_TEST dt-bindings: mfd: da9062: Move IRQ to optional properties mfd: qcom_rpm: Use devm_of_platform_populate() to simplify code mfd: qcom_rpm: Fix an error handling path in qcom_rpm_probe() mfd: stm32-lptimer: Use devm_platform_get_and_ioremap_resource() mfd: rohm-bd9576: Convert to i2c's .probe_new() mfd: fsl-imx25-tsadc: Use devm_platform_get_and_ioremap_resource() dt-bindings: Fix maintainer email for a few ROHM ICs mfd: palmas: Use device_get_match_data() to simplify the code Input: Add tps65219 interrupt driven powerbutton mfd: tps65219: Add driver for TI TPS65219 PMIC mfd: bd957x: Fix Kconfig dependency on REGMAP_IRQ mfd: wcd934x: Convert irq chip to config regs mfd: tps65090: Replace irqchip mask_invert with unmask_base mfd: sun4i-gpadc: Replace irqchip mask_invert with unmask_base mfd: stpmic1: Fix swapped mask/unmask in irq chip mfd: sprd-sc27xx-spi: Replace irqchip mask_invert with unmask_base ... commit 7c0846125358f991d83f34ddde52956b196db3de Author: Linus Torvalds Date: Wed Dec 21 08:56:43 2022 -0800 m68k: remove broken strcmp implementation The m68 hand-written assembler version of strcmp() has always been broken: it returns the difference between the first non-matching byte done as a 8-bit subtraction. That is _almost_ right, but is broken for the overflow case. The strcmp() function should indeed return the sign of the difference between the first byte that differs, but the subtraction needs to be done in a wider type than 'char'. Otherwise the ordering isn't actually stable. This went unnoticed for basically forever, because nobody ever cares about non-US-ASCII orderings in the kernel (in fact, most users only care about "exact match or not"), so overflows don't really happen in practice, even if it was very very wrong. But that mostly unnoticeable bug becomes very noticeable by the recent change to make 'char' be unsigned in the kernel across all architectures (commit 3bc753c06dd0: "kbuild: treat char as always unsigned"). Because the code not only did the subtraction in the wrong type width, it also used 'char' to then make the compiler expand the result from an 8-bit difference to the 'int' return value. So now with an unsigned char that incorrect arithmetic width was then not even sign-expanded, and always returned just a positive integer. We could re-instate the old broken code by just turning the 'char' into 'signed char' as has been done elsewhere where people depended on the signedness of 'char', but since the whole function was broken to begin with, and we have a non-broken default fallback implementation, let's just remove this broken function entirely. Reported-by: Guenter Roeck Link: https://lore.kernel.org/lkml/20221221145332.GA2399037@roeck-us.net/ Cc: Jason Donenfeld Cc: Geert Uytterhoeven Cc: Rasmus Villemoes Signed-off-by: Linus Torvalds arch/m68k/include/asm/string.h | 20 -------------------- 1 file changed, 20 deletions(-) commit 609d3bc6230514a8ca79b377775b17e8c3d9ac93 Merge: 878cf96f686c 19e72b064fc3 Author: Linus Torvalds Date: Wed Dec 21 08:41:32 2022 -0800 Merge tag 'net-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bpf, netfilter and can. Current release - regressions: - bpf: synchronize dispatcher update with bpf_dispatcher_xdp_func - rxrpc: - fix security setting propagation - fix null-deref in rxrpc_unuse_local() - fix switched parameters in peer tracing Current release - new code bugs: - rxrpc: - fix I/O thread startup getting skipped - fix locking issues in rxrpc_put_peer_locked() - fix I/O thread stop - fix uninitialised variable in rxperf server - fix the return value of rxrpc_new_incoming_call() - microchip: vcap: fix initialization of value and mask - nfp: fix unaligned io read of capabilities word Previous releases - regressions: - stop in-kernel socket users from corrupting socket's task_frag - stream: purge sk_error_queue in sk_stream_kill_queues() - openvswitch: fix flow lookup to use unmasked key - dsa: mv88e6xxx: avoid reg_lock deadlock in mv88e6xxx_setup_port() - devlink: - hold region lock when flushing snapshots - protect devlink dump by the instance lock Previous releases - always broken: - bpf: - prevent leak of lsm program after failed attach - resolve fext program type when checking map compatibility - skbuff: account for tail adjustment during pull operations - macsec: fix net device access prior to holding a lock - bonding: switch back when high prio link up - netfilter: flowtable: really fix NAT IPv6 offload - enetc: avoid buffer leaks on xdp_do_redirect() failure - unix: fix race in SOCK_SEQPACKET's unix_dgram_sendmsg() - dsa: microchip: remove IRQF_TRIGGER_FALLING in request_threaded_irq" * tag 'net-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (64 commits) net: fec: check the return value of build_skb() net: simplify sk_page_frag Treewide: Stop corrupting socket's task_frag net: Introduce sk_use_task_frag in struct sock. mctp: Remove device type check at unregister net: dsa: microchip: remove IRQF_TRIGGER_FALLING in request_threaded_irq can: kvaser_usb: hydra: help gcc-13 to figure out cmd_len can: flexcan: avoid unbalanced pm_runtime_enable warning Documentation: devlink: add missing toc entry for etas_es58x devlink doc mctp: serial: Fix starting value for frame check sequence nfp: fix unaligned io read of capabilities word net: stream: purge sk_error_queue in sk_stream_kill_queues() myri10ge: Fix an error handling path in myri10ge_probe() net: microchip: vcap: Fix initialization of value and mask rxrpc: Fix the return value of rxrpc_new_incoming_call() rxrpc: rxperf: Fix uninitialised variable rxrpc: Fix I/O thread stop rxrpc: Fix switched parameters in peer tracing rxrpc: Fix locking issues in rxrpc_put_peer_locked() rxrpc: Fix I/O thread startup getting skipped ... commit f6594c372afd5cec8b1e9ee9ea8f8819d59c6fb1 Author: Pablo Neira Ayuso Date: Mon Dec 19 20:09:00 2022 +0100 netfilter: nf_tables: perform type checking for existing sets If a ruleset declares a set name that matches an existing set in the kernel, then validate that this declaration really refers to the same set, otherwise bail out with EEXIST. Currently, the kernel reports success when adding a set that already exists in the kernel. This usually results in EINVAL errors at a later stage, when the user adds elements to the set, if the set declaration mismatches the existing set representation in the kernel. Add a new function to check that the set declaration really refers to the same existing set in the kernel. Fixes: 96518518cc41 ("netfilter: add nftables") Reported-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) commit a8fe4154fa5a1bae590b243ed60f871e5a5e1378 Author: Pablo Neira Ayuso Date: Mon Dec 19 18:00:10 2022 +0100 netfilter: nf_tables: add function to create set stateful expressions Add a helper function to allocate and initialize the stateful expressions that are defined in a set. This patch allows to reuse this code from the set update path, to check that type of the update matches the existing set in the kernel. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 106 +++++++++++++++++++++++++++--------------- 1 file changed, 68 insertions(+), 38 deletions(-) commit bed4a63ea4ae77cfe5aae004ef87379f0655260a Author: Pablo Neira Ayuso Date: Mon Dec 19 20:07:52 2022 +0100 netfilter: nf_tables: consolidate set description Add the following fields to the set description: - key type - data type - object type - policy - gc_int: garbage collection interval) - timeout: element timeout This prepares for stricter set type checks on updates in a follow up patch. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 12 ++++++++ net/netfilter/nf_tables_api.c | 58 +++++++++++++++++++-------------------- 2 files changed, 40 insertions(+), 30 deletions(-) commit 5eb119da94ac5d67a31eaa869621dc6e25eb125e Author: Florian Westphal Date: Thu Dec 15 15:16:33 2022 +0100 netfilter: conntrack: fix ipv6 exthdr error check smatch warnings: net/netfilter/nf_conntrack_proto.c:167 nf_confirm() warn: unsigned 'protoff' is never less than zero. We need to check if ipv6_skip_exthdr() returned an error, but protoff is unsigned. Use a signed integer for this. Fixes: a70e483460d5 ("netfilter: conntrack: merge ipv4+ipv6 confirm functions") Reported-by: kernel test robot Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 878cf96f686c59b82ee76c2b233c41b5fc3c0936 Merge: 222882c2ab12 2c05bf3aa074 Author: Linus Torvalds Date: Wed Dec 21 08:13:01 2022 -0800 Merge tag 'fs.vfsuid.ima.v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull vfsuid cleanup from Christian Brauner: "This moves the ima specific vfs{g,u}id_t comparison helpers out of the header and into the one file in ima where they are used. We shouldn't incentivize people to use them by placing them into the header. As discussed and suggested by Linus in [1] let's just define them locally in the one file in ima where they are used" Link: https://lore.kernel.org/lkml/CAHk-=wj4BpEwUd=OkTv1F9uykvSrsBNZJVHMp+p_+e2kiV71_A@mail.gmail.com [1] * tag 'fs.vfsuid.ima.v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: mnt_idmapping: move ima-only helpers to ima commit 222882c2ab1221b6df2d189138638a6435cd8e88 Merge: 19822e3ee4c8 3c202d14a9d7 Author: Linus Torvalds Date: Wed Dec 21 08:02:30 2022 -0800 Merge tag 'random-6.2-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random Pull more random number generator updates from Jason Donenfeld: "Two remaining changes that are now possible after you merged a few other trees: - #include can be removed from random.h now, making the direct use of the arch_random_* API more of a private implementation detail between the archs and random.c, rather than something for general consumers. - Two additional uses of prandom_u32_max() snuck in during the initial phase of pulls, so these have been converted to get_random_u32_below(), and now the deprecated prandom_u32_max() alias -- which was just a wrapper around get_random_u32_below() -- can be removed. In addition, there is one fix: - Check efi_rt_services_supported() before attempting to use an EFI runtime function. This affected EFI systems that disable runtime services yet still boot via EFI (e.g. the reporter's Lenovo Thinkpad X13s laptop), as well systems where EFI runtime services have been forcibly disabled, such as on PREEMPT_RT. On those machines, a very early and hard to diagnose crash would happen, preventing boot" * tag 'random-6.2-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random: prandom: remove prandom_u32_max() efi: random: fix NULL-deref when refreshing seed random: do not include from random.h commit 19822e3ee4c891e1e8434e290fbca0af52490240 Merge: b6bb9676f216 3f6c3d29df58 Author: Linus Torvalds Date: Wed Dec 21 07:59:57 2022 -0800 Merge tag 'rcu-urgent.2022.12.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU fix from Paul McKenney: "This fixes a lockdep false positive in synchronize_rcu() that can otherwise occur during early boot. The fix simply avoids invoking lockdep if the scheduler has not yet been initialized, that is, during that portion of boot when interrupts are disabled" * tag 'rcu-urgent.2022.12.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: rcu: Don't assert interrupts enabled too early in boot commit 52ea806ad983490b3132a9e526e11a10dc2fd10c Author: Jens Axboe Date: Wed Dec 21 07:05:09 2022 -0700 io_uring: finish waiting before flushing overflow entries If we have overflow entries being generated after we've done the initial flush in io_cqring_wait(), then we could be flushing them in the main wait loop as well. If that's done after having added ourselves to the cq_wait waitqueue, then the task state can be != TASK_RUNNING when we enter the overflow flush. Check for the need to overflow flush, and finish our wait cycle first if we have to do so. Reported-and-tested-by: syzbot+cf6ea1d6bb30a4ce10b2@syzkaller.appspotmail.com Link: https://lore.kernel.org/io-uring/000000000000cb143a05f04eee15@google.com/ Signed-off-by: Jens Axboe io_uring/io_uring.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 4217c6ac817451d5116687f3cc6286220dc43d49 Author: Steven Price Date: Mon Dec 19 14:01:30 2022 +0000 drm/panfrost: Fix GEM handle creation ref-counting panfrost_gem_create_with_handle() previously returned a BO but with the only reference being from the handle, which user space could in theory guess and release, causing a use-after-free. Additionally if the call to panfrost_gem_mapping_get() in panfrost_ioctl_create_bo() failed then a(nother) reference on the BO was dropped. The _create_with_handle() is a problematic pattern, so ditch it and instead create the handle in panfrost_ioctl_create_bo(). If the call to panfrost_gem_mapping_get() fails then this means that user space has indeed gone behind our back and freed the handle. In which case just return an error code. Reported-by: Rob Clark Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") Signed-off-by: Steven Price Reviewed-by: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/20221219140130.410578-1-steven.price@arm.com drivers/gpu/drm/panfrost/panfrost_drv.c | 27 ++++++++++++++++++--------- drivers/gpu/drm/panfrost/panfrost_gem.c | 16 +--------------- drivers/gpu/drm/panfrost/panfrost_gem.h | 5 +---- 3 files changed, 20 insertions(+), 28 deletions(-) commit 11933cf1d91d57da9e5c53822a540bbdc2656c16 Author: Christian Brauner Date: Sat Dec 17 22:28:40 2022 +0100 pnode: terminate at peers of source The propagate_mnt() function handles mount propagation when creating mounts and propagates the source mount tree @source_mnt to all applicable nodes of the destination propagation mount tree headed by @dest_mnt. Unfortunately it contains a bug where it fails to terminate at peers of @source_mnt when looking up copies of the source mount that become masters for copies of the source mount tree mounted on top of slaves in the destination propagation tree causing a NULL dereference. Once the mechanics of the bug are understood it's easy to trigger. Because of unprivileged user namespaces it is available to unprivileged users. While fixing this bug we've gotten confused multiple times due to unclear terminology or missing concepts. So let's start this with some clarifications: * The terms "master" or "peer" denote a shared mount. A shared mount belongs to a peer group. * A peer group is a set of shared mounts that propagate to each other. They are identified by a peer group id. The peer group id is available in @shared_mnt->mnt_group_id. Shared mounts within the same peer group have the same peer group id. The peers in a peer group can be reached via @shared_mnt->mnt_share. * The terms "slave mount" or "dependent mount" denote a mount that receives propagation from a peer in a peer group. IOW, shared mounts may have slave mounts and slave mounts have shared mounts as their master. Slave mounts of a given peer in a peer group are listed on that peers slave list available at @shared_mnt->mnt_slave_list. * The term "master mount" denotes a mount in a peer group. IOW, it denotes a shared mount or a peer mount in a peer group. The term "master mount" - or "master" for short - is mostly used when talking in the context of slave mounts that receive propagation from a master mount. A master mount of a slave identifies the closest peer group a slave mount receives propagation from. The master mount of a slave can be identified via @slave_mount->mnt_master. Different slaves may point to different masters in the same peer group. * Multiple peers in a peer group can have non-empty ->mnt_slave_lists. Non-empty ->mnt_slave_lists of peers don't intersect. Consequently, to ensure all slave mounts of a peer group are visited the ->mnt_slave_lists of all peers in a peer group have to be walked. * Slave mounts point to a peer in the closest peer group they receive propagation from via @slave_mnt->mnt_master (see above). Together with these peers they form a propagation group (see below). The closest peer group can thus be identified through the peer group id @slave_mnt->mnt_master->mnt_group_id of the peer/master that a slave mount receives propagation from. * A shared-slave mount is a slave mount to a peer group pg1 while also a peer in another peer group pg2. IOW, a peer group may receive propagation from another peer group. If a peer group pg1 is a slave to another peer group pg2 then all peers in peer group pg1 point to the same peer in peer group pg2 via ->mnt_master. IOW, all peers in peer group pg1 appear on the same ->mnt_slave_list. IOW, they cannot be slaves to different peer groups. * A pure slave mount is a slave mount that is a slave to a peer group but is not a peer in another peer group. * A propagation group denotes the set of mounts consisting of a single peer group pg1 and all slave mounts and shared-slave mounts that point to a peer in that peer group via ->mnt_master. IOW, all slave mounts such that @slave_mnt->mnt_master->mnt_group_id is equal to @shared_mnt->mnt_group_id. The concept of a propagation group makes it easier to talk about a single propagation level in a propagation tree. For example, in propagate_mnt() the immediate peers of @dest_mnt and all slaves of @dest_mnt's peer group form a propagation group propg1. So a shared-slave mount that is a slave in propg1 and that is a peer in another peer group pg2 forms another propagation group propg2 together with all slaves that point to that shared-slave mount in their ->mnt_master. * A propagation tree refers to all mounts that receive propagation starting from a specific shared mount. For example, for propagate_mnt() @dest_mnt is the start of a propagation tree. The propagation tree ecompasses all mounts that receive propagation from @dest_mnt's peer group down to the leafs. With that out of the way let's get to the actual algorithm. We know that @dest_mnt is guaranteed to be a pure shared mount or a shared-slave mount. This is guaranteed by a check in attach_recursive_mnt(). So propagate_mnt() will first propagate the source mount tree to all peers in @dest_mnt's peer group: for (n = next_peer(dest_mnt); n != dest_mnt; n = next_peer(n)) { ret = propagate_one(n); if (ret) goto out; } Notice, that the peer propagation loop of propagate_mnt() doesn't propagate @dest_mnt itself. @dest_mnt is mounted directly in attach_recursive_mnt() after we propagated to the destination propagation tree. The mount that will be mounted on top of @dest_mnt is @source_mnt. This copy was created earlier even before we entered attach_recursive_mnt() and doesn't concern us a lot here. It's just important to notice that when propagate_mnt() is called @source_mnt will not yet have been mounted on top of @dest_mnt. Thus, @source_mnt->mnt_parent will either still point to @source_mnt or - in the case @source_mnt is moved and thus already attached - still to its former parent. For each peer @m in @dest_mnt's peer group propagate_one() will create a new copy of the source mount tree and mount that copy @child on @m such that @child->mnt_parent points to @m after propagate_one() returns. propagate_one() will stash the last destination propagation node @m in @last_dest and the last copy it created for the source mount tree in @last_source. Hence, if we call into propagate_one() again for the next destination propagation node @m, @last_dest will point to the previous destination propagation node and @last_source will point to the previous copy of the source mount tree and mounted on @last_dest. Each new copy of the source mount tree is created from the previous copy of the source mount tree. This will become important later. The peer loop in propagate_mnt() is straightforward. We iterate through the peers copying and updating @last_source and @last_dest as we go through them and mount each copy of the source mount tree @child on a peer @m in @dest_mnt's peer group. After propagate_mnt() handled the peers in @dest_mnt's peer group propagate_mnt() will propagate the source mount tree down the propagation tree that @dest_mnt's peer group propagates to: for (m = next_group(dest_mnt, dest_mnt); m; m = next_group(m, dest_mnt)) { /* everything in that slave group */ n = m; do { ret = propagate_one(n); if (ret) goto out; n = next_peer(n); } while (n != m); } The next_group() helper will recursively walk the destination propagation tree, descending into each propagation group of the propagation tree. The important part is that it takes care to propagate the source mount tree to all peers in the peer group of a propagation group before it propagates to the slaves to those peers in the propagation group. IOW, it creates and mounts copies of the source mount tree that become masters before it creates and mounts copies of the source mount tree that become slaves to these masters. It is important to remember that propagating the source mount tree to each mount @m in the destination propagation tree simply means that we create and mount new copies @child of the source mount tree on @m such that @child->mnt_parent points to @m. Since we know that each node @m in the destination propagation tree headed by @dest_mnt's peer group will be overmounted with a copy of the source mount tree and since we know that the propagation properties of each copy of the source mount tree we create and mount at @m will mostly mirror the propagation properties of @m. We can use that information to create and mount the copies of the source mount tree that become masters before their slaves. The easy case is always when @m and @last_dest are peers in a peer group of a given propagation group. In that case we know that we can simply copy @last_source without having to figure out what the master for the new copy @child of the source mount tree needs to be as we've done that in a previous call to propagate_one(). The hard case is when we're dealing with a slave mount or a shared-slave mount @m in a destination propagation group that we need to create and mount a copy of the source mount tree on. For each propagation group in the destination propagation tree we propagate the source mount tree to we want to make sure that the copies @child of the source mount tree we create and mount on slaves @m pick an ealier copy of the source mount tree that we mounted on a master @m of the destination propagation group as their master. This is a mouthful but as far as we can tell that's the core of it all. But, if we keep track of the masters in the destination propagation tree @m we can use the information to find the correct master for each copy of the source mount tree we create and mount at the slaves in the destination propagation tree @m. Let's walk through the base case as that's still fairly easy to grasp. If we're dealing with the first slave in the propagation group that @dest_mnt is in then we don't yet have marked any masters in the destination propagation tree. We know the master for the first slave to @dest_mnt's peer group is simple @dest_mnt. So we expect this algorithm to yield a copy of the source mount tree that was mounted on a peer in @dest_mnt's peer group as the master for the copy of the source mount tree we want to mount at the first slave @m: for (n = m; ; n = p) { p = n->mnt_master; if (p == dest_master || IS_MNT_MARKED(p)) break; } For the first slave we walk the destination propagation tree all the way up to a peer in @dest_mnt's peer group. IOW, the propagation hierarchy can be walked by walking up the @mnt->mnt_master hierarchy of the destination propagation tree @m. We will ultimately find a peer in @dest_mnt's peer group and thus ultimately @dest_mnt->mnt_master. Btw, here the assumption we listed at the beginning becomes important. Namely, that peers in a peer group pg1 that are slaves in another peer group pg2 appear on the same ->mnt_slave_list. IOW, all slaves who are peers in peer group pg1 point to the same peer in peer group pg2 via their ->mnt_master. Otherwise the termination condition in the code above would be wrong and next_group() would be broken too. So the first iteration sets: n = m; p = n->mnt_master; such that @p now points to a peer or @dest_mnt itself. We walk up one more level since we don't have any marked mounts. So we end up with: n = dest_mnt; p = dest_mnt->mnt_master; If @dest_mnt's peer group is not slave to another peer group then @p is now NULL. If @dest_mnt's peer group is a slave to another peer group then @p now points to @dest_mnt->mnt_master points which is a master outside the propagation tree we're dealing with. Now we need to figure out the master for the copy of the source mount tree we're about to create and mount on the first slave of @dest_mnt's peer group: do { struct mount *parent = last_source->mnt_parent; if (last_source == first_source) break; done = parent->mnt_master == p; if (done && peers(n, parent)) break; last_source = last_source->mnt_master; } while (!done); We know that @last_source->mnt_parent points to @last_dest and @last_dest is the last peer in @dest_mnt's peer group we propagated to in the peer loop in propagate_mnt(). Consequently, @last_source is the last copy we created and mount on that last peer in @dest_mnt's peer group. So @last_source is the master we want to pick. We know that @last_source->mnt_parent->mnt_master points to @last_dest->mnt_master. We also know that @last_dest->mnt_master is either NULL or points to a master outside of the destination propagation tree and so does @p. Hence: done = parent->mnt_master == p; is trivially true in the base condition. We also know that for the first slave mount of @dest_mnt's peer group that @last_dest either points @dest_mnt itself because it was initialized to: last_dest = dest_mnt; at the beginning of propagate_mnt() or it will point to a peer of @dest_mnt in its peer group. In both cases it is guaranteed that on the first iteration @n and @parent are peers (Please note the check for peers here as that's important.): if (done && peers(n, parent)) break; So, as we expected, we select @last_source, which referes to the last copy of the source mount tree we mounted on the last peer in @dest_mnt's peer group, as the master of the first slave in @dest_mnt's peer group. The rest is taken care of by clone_mnt(last_source, ...). We'll skip over that part otherwise this becomes a blogpost. At the end of propagate_mnt() we now mark @m->mnt_master as the first master in the destination propagation tree that is distinct from @dest_mnt->mnt_master. IOW, we mark @dest_mnt itself as a master. By marking @dest_mnt or one of it's peers we are able to easily find it again when we later lookup masters for other copies of the source mount tree we mount copies of the source mount tree on slaves @m to @dest_mnt's peer group. This, in turn allows us to find the master we selected for the copies of the source mount tree we mounted on master in the destination propagation tree again. The important part is to realize that the code makes use of the fact that the last copy of the source mount tree stashed in @last_source was mounted on top of the previous destination propagation node @last_dest. What this means is that @last_source allows us to walk the destination propagation hierarchy the same way each destination propagation node @m does. If we take @last_source, which is the copy of @source_mnt we have mounted on @last_dest in the previous iteration of propagate_one(), then we know @last_source->mnt_parent points to @last_dest but we also know that as we walk through the destination propagation tree that @last_source->mnt_master will point to an earlier copy of the source mount tree we mounted one an earlier destination propagation node @m. IOW, @last_source->mnt_parent will be our hook into the destination propagation tree and each consecutive @last_source->mnt_master will lead us to an earlier propagation node @m via @last_source->mnt_master->mnt_parent. Hence, by walking up @last_source->mnt_master, each of which is mounted on a node that is a master @m in the destination propagation tree we can also walk up the destination propagation hierarchy. So, for each new destination propagation node @m we use the previous copy of @last_source and the fact it's mounted on the previous propagation node @last_dest via @last_source->mnt_master->mnt_parent to determine what the master of the new copy of @last_source needs to be. The goal is to find the _closest_ master that the new copy of the source mount tree we are about to create and mount on a slave @m in the destination propagation tree needs to pick. IOW, we want to find a suitable master in the propagation group. As the propagation structure of the source mount propagation tree we create mirrors the propagation structure of the destination propagation tree we can find @m's closest master - i.e., a marked master - which is a peer in the closest peer group that @m receives propagation from. We store that closest master of @m in @p as before and record the slave to that master in @n We then search for this master @p via @last_source by walking up the master hierarchy starting from the last copy of the source mount tree stored in @last_source that we created and mounted on the previous destination propagation node @m. We will try to find the master by walking @last_source->mnt_master and by comparing @last_source->mnt_master->mnt_parent->mnt_master to @p. If we find @p then we can figure out what earlier copy of the source mount tree needs to be the master for the new copy of the source mount tree we're about to create and mount at the current destination propagation node @m. If @last_source->mnt_master->mnt_parent and @n are peers then we know that the closest master they receive propagation from is @last_source->mnt_master->mnt_parent->mnt_master. If not then the closest immediate peer group that they receive propagation from must be one level higher up. This builds on the earlier clarification at the beginning that all peers in a peer group which are slaves of other peer groups all point to the same ->mnt_master, i.e., appear on the same ->mnt_slave_list, of the closest peer group that they receive propagation from. However, terminating the walk has corner cases. If the closest marked master for a given destination node @m cannot be found by walking up the master hierarchy via @last_source->mnt_master then we need to terminate the walk when we encounter @source_mnt again. This isn't an arbitrary termination. It simply means that the new copy of the source mount tree we're about to create has a copy of the source mount tree we created and mounted on a peer in @dest_mnt's peer group as its master. IOW, @source_mnt is the peer in the closest peer group that the new copy of the source mount tree receives propagation from. We absolutely have to stop @source_mnt because @last_source->mnt_master either points outside the propagation hierarchy we're dealing with or it is NULL because @source_mnt isn't a shared-slave. So continuing the walk past @source_mnt would cause a NULL dereference via @last_source->mnt_master->mnt_parent. And so we have to stop the walk when we encounter @source_mnt again. One scenario where this can happen is when we first handled a series of slaves of @dest_mnt's peer group and then encounter peers in a new peer group that is a slave to @dest_mnt's peer group. We handle them and then we encounter another slave mount to @dest_mnt that is a pure slave to @dest_mnt's peer group. That pure slave will have a peer in @dest_mnt's peer group as its master. Consequently, the new copy of the source mount tree will need to have @source_mnt as it's master. So we walk the propagation hierarchy all the way up to @source_mnt based on @last_source->mnt_master. So terminate on @source_mnt, easy peasy. Except, that the check misses something that the rest of the algorithm already handles. If @dest_mnt has peers in it's peer group the peer loop in propagate_mnt(): for (n = next_peer(dest_mnt); n != dest_mnt; n = next_peer(n)) { ret = propagate_one(n); if (ret) goto out; } will consecutively update @last_source with each previous copy of the source mount tree we created and mounted at the previous peer in @dest_mnt's peer group. So after that loop terminates @last_source will point to whatever copy of the source mount tree was created and mounted on the last peer in @dest_mnt's peer group. Furthermore, if there is even a single additional peer in @dest_mnt's peer group then @last_source will __not__ point to @source_mnt anymore. Because, as we mentioned above, @dest_mnt isn't even handled in this loop but directly in attach_recursive_mnt(). So it can't even accidently come last in that peer loop. So the first time we handle a slave mount @m of @dest_mnt's peer group the copy of the source mount tree we create will make the __last copy of the source mount tree we created and mounted on the last peer in @dest_mnt's peer group the master of the new copy of the source mount tree we create and mount on the first slave of @dest_mnt's peer group__. But this means that the termination condition that checks for @source_mnt is wrong. The @source_mnt cannot be found anymore by propagate_one(). Instead it will find the last copy of the source mount tree we created and mounted for the last peer of @dest_mnt's peer group again. And that is a peer of @source_mnt not @source_mnt itself. IOW, we fail to terminate the loop correctly and ultimately dereference @last_source->mnt_master->mnt_parent. When @source_mnt's peer group isn't slave to another peer group then @last_source->mnt_master is NULL causing the splat below. For example, assume @dest_mnt is a pure shared mount and has three peers in its peer group: =================================================================================== mount-id mount-parent-id peer-group-id =================================================================================== (@dest_mnt) mnt_master[216] 309 297 shared:216 \ (@source_mnt) mnt_master[218]: 609 609 shared:218 (1) mnt_master[216]: 607 605 shared:216 \ (P1) mnt_master[218]: 624 607 shared:218 (2) mnt_master[216]: 576 574 shared:216 \ (P2) mnt_master[218]: 625 576 shared:218 (3) mnt_master[216]: 545 543 shared:216 \ (P3) mnt_master[218]: 626 545 shared:218 After this sequence has been processed @last_source will point to (P3), the copy generated for the third peer in @dest_mnt's peer group we handled. So the copy of the source mount tree (P4) we create and mount on the first slave of @dest_mnt's peer group: =================================================================================== mount-id mount-parent-id peer-group-id =================================================================================== mnt_master[216] 309 297 shared:216 / / (S0) mnt_slave 483 481 master:216 \ \ (P3) mnt_master[218] 626 545 shared:218 \ / \/ (P4) mnt_slave 627 483 master:218 will pick the last copy of the source mount tree (P3) as master, not (S0). When walking the propagation hierarchy via @last_source's master hierarchy we encounter (P3) but not (S0), i.e., @source_mnt. We can fix this in multiple ways: (1) By setting @last_source to @source_mnt after we processed the peers in @dest_mnt's peer group right after the peer loop in propagate_mnt(). (2) By changing the termination condition that relies on finding exactly @source_mnt to finding a peer of @source_mnt. (3) By only moving @last_source when we actually venture into a new peer group or some clever variant thereof. The first two options are minimally invasive and what we want as a fix. The third option is more intrusive but something we'd like to explore in the near future. This passes all LTP tests and specifically the mount propagation testsuite part of it. It also holds up against all known reproducers of this issues. Final words. First, this is a clever but __worringly__ underdocumented algorithm. There isn't a single detailed comment to be found in next_group(), propagate_one() or anywhere else in that file for that matter. This has been a giant pain to understand and work through and a bug like this is insanely difficult to fix without a detailed understanding of what's happening. Let's not talk about the amount of time that was sunk into fixing this. Second, all the cool kids with access to unshare --mount --user --map-root --propagation=unchanged are going to have a lot of fun. IOW, triggerable by unprivileged users while namespace_lock() lock is held. [ 115.848393] BUG: kernel NULL pointer dereference, address: 0000000000000010 [ 115.848967] #PF: supervisor read access in kernel mode [ 115.849386] #PF: error_code(0x0000) - not-present page [ 115.849803] PGD 0 P4D 0 [ 115.850012] Oops: 0000 [#1] PREEMPT SMP PTI [ 115.850354] CPU: 0 PID: 15591 Comm: mount Not tainted 6.1.0-rc7 #3 [ 115.850851] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 115.851510] RIP: 0010:propagate_one.part.0+0x7f/0x1a0 [ 115.851924] Code: 75 eb 4c 8b 05 c2 25 37 02 4c 89 ca 48 8b 4a 10 49 39 d0 74 1e 48 3b 81 e0 00 00 00 74 26 48 8b 92 e0 00 00 00 be 01 00 00 00 <48> 8b 4a 10 49 39 d0 75 e2 40 84 f6 74 38 4c 89 05 84 25 37 02 4d [ 115.853441] RSP: 0018:ffffb8d5443d7d50 EFLAGS: 00010282 [ 115.853865] RAX: ffff8e4d87c41c80 RBX: ffff8e4d88ded780 RCX: ffff8e4da4333a00 [ 115.854458] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff8e4d88ded780 [ 115.855044] RBP: ffff8e4d88ded780 R08: ffff8e4da4338000 R09: ffff8e4da43388c0 [ 115.855693] R10: 0000000000000002 R11: ffffb8d540158000 R12: ffffb8d5443d7da8 [ 115.856304] R13: ffff8e4d88ded780 R14: 0000000000000000 R15: 0000000000000000 [ 115.856859] FS: 00007f92c90c9800(0000) GS:ffff8e4dfdc00000(0000) knlGS:0000000000000000 [ 115.857531] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 115.858006] CR2: 0000000000000010 CR3: 0000000022f4c002 CR4: 00000000000706f0 [ 115.858598] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 115.859393] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 115.860099] Call Trace: [ 115.860358] [ 115.860535] propagate_mnt+0x14d/0x190 [ 115.860848] attach_recursive_mnt+0x274/0x3e0 [ 115.861212] path_mount+0x8c8/0xa60 [ 115.861503] __x64_sys_mount+0xf6/0x140 [ 115.861819] do_syscall_64+0x5b/0x80 [ 115.862117] ? do_faccessat+0x123/0x250 [ 115.862435] ? syscall_exit_to_user_mode+0x17/0x40 [ 115.862826] ? do_syscall_64+0x67/0x80 [ 115.863133] ? syscall_exit_to_user_mode+0x17/0x40 [ 115.863527] ? do_syscall_64+0x67/0x80 [ 115.863835] ? do_syscall_64+0x67/0x80 [ 115.864144] ? do_syscall_64+0x67/0x80 [ 115.864452] ? exc_page_fault+0x70/0x170 [ 115.864775] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 115.865187] RIP: 0033:0x7f92c92b0ebe [ 115.865480] Code: 48 8b 0d 75 4f 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 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 42 4f 0c 00 f7 d8 64 89 01 48 [ 115.866984] RSP: 002b:00007fff000aa728 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 [ 115.867607] RAX: ffffffffffffffda RBX: 000055a77888d6b0 RCX: 00007f92c92b0ebe [ 115.868240] RDX: 000055a77888d8e0 RSI: 000055a77888e6e0 RDI: 000055a77888e620 [ 115.868823] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 115.869403] R10: 0000000000001000 R11: 0000000000000246 R12: 000055a77888e620 [ 115.869994] R13: 000055a77888d8e0 R14: 00000000ffffffff R15: 00007f92c93e4076 [ 115.870581] [ 115.870763] Modules linked in: nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set rfkill nf_tables nfnetlink qrtr snd_intel8x0 sunrpc snd_ac97_codec ac97_bus snd_pcm snd_timer intel_rapl_msr intel_rapl_common snd vboxguest intel_powerclamp video rapl joydev soundcore i2c_piix4 wmi fuse zram xfs vmwgfx crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni polyval_generic drm_ttm_helper ttm e1000 ghash_clmulni_intel serio_raw ata_generic pata_acpi scsi_dh_rdac scsi_dh_emc scsi_dh_alua dm_multipath [ 115.875288] CR2: 0000000000000010 [ 115.875641] ---[ end trace 0000000000000000 ]--- [ 115.876135] RIP: 0010:propagate_one.part.0+0x7f/0x1a0 [ 115.876551] Code: 75 eb 4c 8b 05 c2 25 37 02 4c 89 ca 48 8b 4a 10 49 39 d0 74 1e 48 3b 81 e0 00 00 00 74 26 48 8b 92 e0 00 00 00 be 01 00 00 00 <48> 8b 4a 10 49 39 d0 75 e2 40 84 f6 74 38 4c 89 05 84 25 37 02 4d [ 115.878086] RSP: 0018:ffffb8d5443d7d50 EFLAGS: 00010282 [ 115.878511] RAX: ffff8e4d87c41c80 RBX: ffff8e4d88ded780 RCX: ffff8e4da4333a00 [ 115.879128] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff8e4d88ded780 [ 115.879715] RBP: ffff8e4d88ded780 R08: ffff8e4da4338000 R09: ffff8e4da43388c0 [ 115.880359] R10: 0000000000000002 R11: ffffb8d540158000 R12: ffffb8d5443d7da8 [ 115.880962] R13: ffff8e4d88ded780 R14: 0000000000000000 R15: 0000000000000000 [ 115.881548] FS: 00007f92c90c9800(0000) GS:ffff8e4dfdc00000(0000) knlGS:0000000000000000 [ 115.882234] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 115.882713] CR2: 0000000000000010 CR3: 0000000022f4c002 CR4: 00000000000706f0 [ 115.883314] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 115.883966] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Fixes: f2ebb3a921c1 ("smarter propagate_mnt()") Fixes: 5ec0811d3037 ("propogate_mnt: Handle the first propogated copy being a slave") Cc: Reported-by: Ditang Chen Signed-off-by: Seth Forshee (Digital Ocean) Signed-off-by: Christian Brauner (Microsoft) --- If there are no big objections I'll get this to Linus rather sooner than later. fs/pnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a9134fd56f6ba614ff7b2b3b0bac0bf1d0dc0c9 Author: Curtis Malainey Date: Tue Dec 20 14:56:29 2022 +0200 ASoC: SOF: Add FW state to debugfs Allow system health detection mechanisms to check the FW state, this will allow them to check if the FW is in its "crashed" state going forward to help automatically diagnose driver state. Signed-off-by: Curtis Malainey Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221220125629.8469-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/debug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d185e0689abc98ef55fb7a7d75aa0c48a0ed5838 Author: Ranjani Sridharan Date: Tue Dec 20 14:56:28 2022 +0200 ASoC: SOF: pm: Always tear down pipelines before DSP suspend When the DSP is suspended while the firmware is in the crashed state, we skip tearing down the pipelines. This means that the widget reference counts will not get to reset to 0 before suspend. This will lead to errors with resuming audio after system resume. To fix this, invoke the tear_down_all_pipelines op before skipping to DSP suspend. Signed-off-by: Ranjani Sridharan Reviewed-by: Curtis Malainey 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/20221220125629.8469-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6f95eec6fb89e195dbdf30de65553c7fc57d9372 Author: Ranjani Sridharan Date: Tue Dec 20 14:56:27 2022 +0200 ASoC: SOF: pm: Set target state earlier If the DSP crashes before the system suspends, the setting of target state will be skipped because the firmware state will no longer be SOF_FW_BOOT_COMPLETE. This leads to the incorrect assumption that the DSP should suspend to D0I3 instead of suspending to D3. To fix this, set the target_state before we skip to DSP suspend even when the DSP has crashed. Signed-off-by: Ranjani Sridharan Reviewed-by: Curtis Malainey 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/20221220125629.8469-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/pm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 24b333a866a10d4be47b9968b9c05a3e9f326ff5 Author: Florian Fainelli Date: Tue Dec 20 11:09:46 2022 -0800 MIPS: dts: bcm63268: Add missing properties to the TWD node We currently have a DTC warning with the current DTS due to the lack of a suitable #address-cells and #size-cells property: DTC arch/mips/boot/dts/brcm/bcm63268-comtrend-vr-3032u.dtb arch/mips/boot/dts/brcm/bcm63268.dtsi:115.5-22: Warning (reg_format): /ubus/timer-mfd@10000080/timer@0:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) arch/mips/boot/dts/brcm/bcm63268.dtsi:120.5-22: Warning (reg_format): /ubus/timer-mfd@10000080/watchdog@1c:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) arch/mips/boot/dts/brcm/bcm63268.dtsi:111.4-35: Warning (ranges_format): /ubus/timer-mfd@10000080:ranges: "ranges" property has invalid length (12 bytes) (parent #address-cells == 1, child #address-cells == 2, #size-cells == 1) Fixes: d3db4b96ab7f ("mips: dts: bcm63268: add TWD block timer") Signed-off-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer arch/mips/boot/dts/brcm/bcm63268.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 76ce51798cb16738a4a28a6662e7344aaf7ef769 Author: Sergio Paracuellos Date: Sat Dec 17 08:48:06 2022 +0100 MIPS: ralink: mt7621: avoid to init common ralink reset controller Commit 38a8553b0a22 ("clk: ralink: make system controller node a reset provider") make system controller a reset provider for mt7621 ralink SoCs. Ralink init code also tries to start previous common reset controller which at the end tries to find device tree node 'ralink,rt2880-reset'. mt7621 device tree file is not using at all this node anymore. Hence avoid to init this common reset controller for mt7621 ralink SoCs to avoid 'Failed to find reset controller node' boot error trace error. Fixes: 64b2d6ffff86 ("staging: mt7621-dts: align resets with binding documentation") Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer arch/mips/ralink/of.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 841734234a28fd5cd0889b84bd4d93a0988fa11e Author: Keith Busch Date: Mon Dec 19 13:54:55 2022 -0800 nvme-pci: fix page size checks The size allocated out of the dma pool is at most NVME_CTRL_PAGE_SIZE, which may be smaller than the PAGE_SIZE. Fixes: c61b82c7b7134 ("nvme-pci: fix PRP pool size") Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c89a529e823d51dd23c7ec0c047c7a454a428541 Author: Keith Busch Date: Mon Dec 19 10:59:06 2022 -0800 nvme-pci: fix mempool alloc size Convert the max size to bytes to match the units of the divisor that calculates the worst-case number of PRP entries. The result is used to determine how many PRP Lists are required. The code was previously rounding this to 1 list, but we can require 2 in the worst case. In that scenario, the driver would corrupt memory beyond the size provided by the mempool. While unlikely to occur (you'd need a 4MB in exactly 127 phys segments on a queue that doesn't support SGLs), this memory corruption has been observed by kfence. Cc: Jens Axboe Fixes: 943e942e6266f ("nvme-pci: limit max IO size and segments to avoid high order allocations") Signed-off-by: Keith Busch Reviewed-by: Jens Axboe Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b5f96cb719d8ba220b565ddd3ba4ac0d8bcfb130 Author: Klaus Jensen Date: Tue Dec 13 09:58:07 2022 +0100 nvme-pci: fix doorbell buffer value endianness When using shadow doorbells, the event index and the doorbell values are written to host memory. Prior to this patch, the values written would erroneously be written in host endianness. This causes trouble on big-endian platforms. Fix this by adding missing endian conversions. This issue was noticed by Guenter while testing various big-endian platforms under QEMU[1]. A similar fix required for hw/nvme in QEMU is up for review as well[2]. [1]: https://lore.kernel.org/qemu-devel/20221209110022.GA3396194@roeck-us.net/ [2]: https://lore.kernel.org/qemu-devel/20221212114409.34972-4-its@irrelevant.dk/ Fixes: f9f38e33389c ("nvme: improve performance for virtual NVMe devices") Reported-by: Guenter Roeck Signed-off-by: Klaus Jensen Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 3622b86f49f84e52fb41fee9eb55f9290613dfc3 Author: Christoph Hellwig Date: Tue Dec 20 09:08:12 2022 +0100 dma-mapping: reject GFP_COMP for noncoherent allocations While not quite as bogus as for the dma-coherent allocations that were fixed earlier, GFP_COMP for these allocations has no benefits for the dma-direct case, and can't be supported at all by dma dma-iommu backend which splits up allocations into smaller orders. Due to an oversight in ffcb75458460 that flag stopped being cleared for all dma allocations, but only got rejected for coherent ones, so fix up these callers to not allow __GFP_COMP as well after the sound code has been fixed to not ask for it. Fixes: ffcb75458460 ("dma-mapping: reject __GFP_COMP in dma_alloc_attrs") Reported-by: Mikhail Gavrilov Reported-by: Kai Vehmanen Signed-off-by: Christoph Hellwig Acked-by: Takashi Iwai Tested-by: Mikhail Gavrilov Tested-by: Kai Vehmanen kernel/dma/mapping.c | 4 ++++ 1 file changed, 4 insertions(+) commit db918321275d648294a3fb2bdefeb99e33f00467 Author: Christoph Hellwig Date: Tue Dec 20 09:05:36 2022 +0100 ALSA: memalloc: don't use GFP_COMP for non-coherent dma allocations While not quite as bogus as for the dma-coherent allocations that were fixed earlier, GFP_COMP for these allocations has no benefits for the dma-direct case, and can't be supported at all by dma dma-iommu backend which splits up allocations into smaller orders. Due to an oversight in ffcb75458460 that flag stopped being cleared for all dma allocations, but only got rejected for coherent ones. Start fixing this by not requesting __GFP_COMP in the sound code, which is the only place that did this. Fixes: ffcb75458460 ("dma-mapping: reject __GFP_COMP in dma_alloc_attrs") Reported-by: Mikhail Gavrilov Reported-by: Kai Vehmanen Signed-off-by: Christoph Hellwig Acked-by: Takashi Iwai Tested-by: Mikhail Gavrilov Tested-by: Kai Vehmanen sound/core/memalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54c3f1a81421f85e60ae2eaae7be3727a09916ee Author: Jakub Kicinski Date: Mon Dec 19 16:47:00 2022 -0800 bpf: pull before calling skb_postpull_rcsum() Anand hit a BUG() when pulling off headers on egress to a SW tunnel. We get to skb_checksum_help() with an invalid checksum offset (commit d7ea0d9df2a6 ("net: remove two BUG() from skb_checksum_help()") converted those BUGs to WARN_ONs()). He points out oddness in how skb_postpull_rcsum() gets used. Indeed looks like we should pull before "postpull", otherwise the CHECKSUM_PARTIAL fixup from skb_postpull_rcsum() will not be able to do its job: if (skb->ip_summed == CHECKSUM_PARTIAL && skb_checksum_start_offset(skb) < 0) skb->ip_summed = CHECKSUM_NONE; Reported-by: Anand Parthasarathy Fixes: 6578171a7ff0 ("bpf: add bpf_skb_change_proto helper") Signed-off-by: Jakub Kicinski Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20221220004701.402165-1-kuba@kernel.org Signed-off-by: Martin KaFai Lau net/core/filter.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1644d755d0b06d0f1ee93e1c44336c29386546b4 Merge: b29e6ece454f b6bb9676f216 Author: Andrew Morton Date: Tue Dec 20 15:02:03 2022 -0800 Merge branch 'linus' commit 19e72b064fc32cd58f6fc0b1eb64ac2e4f770e76 Author: Wei Fang Date: Mon Dec 19 10:27:55 2022 +0800 net: fec: check the return value of build_skb() The build_skb might return a null pointer but there is no check on the return value in the fec_enet_rx_queue(). So a null pointer dereference might occur. To avoid this, we check the return value of build_skb. If the return value is a null pointer, the driver will recycle the page and update the statistic of ndev. Then jump to rx_processing_done to clear the status flags of the BD so that the hardware can recycle the BD. Fixes: 95698ff6177b ("net: fec: using page pool to manage RX buffers") Signed-off-by: Wei Fang Reviewed-by: Shenwei Wang Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/20221219022755.1047573-1-wei.fang@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/fec_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit fee4c19937439693f2420a916169d08e88576e8e Author: Filipe Manana Date: Tue Dec 20 11:13:33 2022 +0000 btrfs: fix fscrypt name leak after failure to join log transaction When logging a new name, we don't expect to fail joining a log transaction since we know at least one of the inodes was logged before in the current transaction. However if we fail for some unexpected reason, we end up not freeing the fscrypt name we previously allocated. So fix that by freeing the name in case we failed to join a log transaction. Fixes: ab3c5c18e8fa ("btrfs: setup qstr from dentrys using fscrypt helper") Reviewed-by: Sweet Tea Dorminy Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tree-log.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e7fc357ec03ee109da503af0dd31bbf68514e481 Author: Josef Bacik Date: Fri Dec 16 11:48:00 2022 -0500 btrfs: scrub: fix uninitialized return value in recover_scrub_rbio Commit 75b470332965 ("btrfs: raid56: migrate recovery and scrub recovery path to use error_bitmap") introduced an uninitialized return variable. This can be caught by gcc 12.1 by -Wmaybe-uninitialized: CC [M] fs/btrfs/raid56.o fs/btrfs/raid56.c: In function ‘scrub_rbio’: fs/btrfs/raid56.c:2801:15: warning: ‘ret’ may be used uninitialized [-Wmaybe-uninitialized] 2801 | ret = recover_scrub_rbio(rbio); | ^~~~~~~~~~~~~~~~~~~~~~~~ fs/btrfs/raid56.c:2649:13: note: ‘ret’ was declared here 2649 | int ret; The warning is disabled by default so we haven't caught that. Due to the bug the raid56 scrub fstests have been failing since the patch was merged, so initialize that. Fixes: 75b470332965 ("btrfs: raid56: migrate recovery and scrub recovery path to use error_bitmap") Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 560840afc3e63bbe5d9c5ef6b2ecf8f3589adff6 Author: Boris Burkov Date: Wed Dec 14 15:05:08 2022 -0800 btrfs: fix resolving backrefs for inline extent followed by prealloc If a file consists of an inline extent followed by a regular or prealloc extent, then a legitimate attempt to resolve a logical address in the non-inline region will result in add_all_parents reading the invalid offset field of the inline extent. If the inline extent item is placed in the leaf eb s.t. it is the first item, attempting to access the offset field will not only be meaningless, it will go past the end of the eb and cause this panic: [17.626048] BTRFS warning (device dm-2): bad eb member end: ptr 0x3fd4 start 30834688 member offset 16377 size 8 [17.631693] general protection fault, probably for non-canonical address 0x5088000000000: 0000 [#1] SMP PTI [17.635041] CPU: 2 PID: 1267 Comm: btrfs Not tainted 5.12.0-07246-g75175d5adc74-dirty #199 [17.637969] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [17.641995] RIP: 0010:btrfs_get_64+0xe7/0x110 [17.649890] RSP: 0018:ffffc90001f73a08 EFLAGS: 00010202 [17.651652] RAX: 0000000000000001 RBX: ffff88810c42d000 RCX: 0000000000000000 [17.653921] RDX: 0005088000000000 RSI: ffffc90001f73a0f RDI: 0000000000000001 [17.656174] RBP: 0000000000000ff9 R08: 0000000000000007 R09: c0000000fffeffff [17.658441] R10: ffffc90001f73790 R11: ffffc90001f73788 R12: ffff888106afe918 [17.661070] R13: 0000000000003fd4 R14: 0000000000003f6f R15: cdcdcdcdcdcdcdcd [17.663617] FS: 00007f64e7627d80(0000) GS:ffff888237c80000(0000) knlGS:0000000000000000 [17.666525] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [17.668664] CR2: 000055d4a39152e8 CR3: 000000010c596002 CR4: 0000000000770ee0 [17.671253] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [17.673634] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [17.676034] PKRU: 55555554 [17.677004] Call Trace: [17.677877] add_all_parents+0x276/0x480 [17.679325] find_parent_nodes+0xfae/0x1590 [17.680771] btrfs_find_all_leafs+0x5e/0xa0 [17.682217] iterate_extent_inodes+0xce/0x260 [17.683809] ? btrfs_inode_flags_to_xflags+0x50/0x50 [17.685597] ? iterate_inodes_from_logical+0xa1/0xd0 [17.687404] iterate_inodes_from_logical+0xa1/0xd0 [17.689121] ? btrfs_inode_flags_to_xflags+0x50/0x50 [17.691010] btrfs_ioctl_logical_to_ino+0x131/0x190 [17.692946] btrfs_ioctl+0x104a/0x2f60 [17.694384] ? selinux_file_ioctl+0x182/0x220 [17.695995] ? __x64_sys_ioctl+0x84/0xc0 [17.697394] __x64_sys_ioctl+0x84/0xc0 [17.698697] do_syscall_64+0x33/0x40 [17.700017] entry_SYSCALL_64_after_hwframe+0x44/0xae [17.701753] RIP: 0033:0x7f64e72761b7 [17.709355] RSP: 002b:00007ffefb067f58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [17.712088] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f64e72761b7 [17.714667] RDX: 00007ffefb067fb0 RSI: 00000000c0389424 RDI: 0000000000000003 [17.717386] RBP: 00007ffefb06d188 R08: 000055d4a390d2b0 R09: 00007f64e7340a60 [17.719938] R10: 0000000000000231 R11: 0000000000000246 R12: 0000000000000001 [17.722383] R13: 0000000000000000 R14: 00000000c0389424 R15: 000055d4a38fd2a0 [17.724839] Modules linked in: Fix the bug by detecting the inline extent item in add_all_parents and skipping to the next extent item. CC: stable@vger.kernel.org # 4.9+ Reviewed-by: Qu Wenruo Signed-off-by: Boris Burkov Signed-off-by: David Sterba fs/btrfs/backref.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8660495a9c5b9afeec4cc006b3b75178f0fb2f10 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 Cc: stable@vger.kernel.org # 6.0, 6.1 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e73fc71e8f015d61f3adca7659cb209fd5117aa5 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 Cc: stable@vger.kernel.org # 6.0, 6.1 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 17 ++++++++++++++--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 17 ++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) commit 272b981416f8be0180c4d8066f90635fa7c1c501 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 Cc: stable@vger.kernel.org # 6.0, 6.1 drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 2 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) commit 59119c09ae748c6398e44925346ed9e3fa2b4679 Author: Namhyung Kim Date: Mon Dec 19 12:17:27 2022 -0800 perf lock contention: Factor out lock_type_table Move it out of get_type_str() so that we can reuse the table for others later. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Blake Jones 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/20221219201732.460111-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 48 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit 8b269b75551227796c1ddac2dbdb2ba504158c61 Author: Yang Jihong Date: Tue Dec 20 11:57:02 2022 +0800 perf probe: Check -v and -q options in the right place Check the -q and -v options first to return earlier on error. Before: # perf probe -q -v test probe-definition(0): test symbol:test file:(null) line:0 offset:0 return:0 lazy:(null) 0 arguments Error: -v and -q are exclusive. After: # perf probe -q -v test Error: -v and -q are exclusive. Fixes: 5e17b28f1e246b98 ("perf probe: Add --quiet option to suppress output result message") Reviewed-by: Adrian Hunter Signed-off-by: Yang Jihong Cc: Alexander Shishkin Cc: Andi Kleen Cc: Carsten Haitzler Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Masami Hiramatsu Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20221220035702.188413-4-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-probe.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 7c0a6144f9a6a53b1cf2f78f09ca35d59d267f1e Author: Yang Jihong Date: Tue Dec 20 11:57:01 2022 +0800 perf tools: Fix usage of the verbose variable The data type of the verbose variable is integer and can be negative, replace improperly used cases in a unified manner: 1. if (verbose) => if (verbose > 0) 2. if (!verbose) => if (verbose <= 0) 3. if (XX && verbose) => if (XX && verbose > 0) 4. if (XX && !verbose) => if (XX && verbose <= 0) Reviewed-by: Adrian Hunter Signed-off-by: Yang Jihong Cc: Alexander Shishkin Cc: Andi Kleen Cc: Carsten Haitzler Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20221220035702.188413-3-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 6 +++--- tools/perf/builtin-record.c | 4 ++-- tools/perf/builtin-script.c | 2 +- tools/perf/builtin-stat.c | 4 ++-- tools/perf/dlfilters/dlfilter-test-api-v0.c | 2 +- tools/perf/tests/builtin-test.c | 2 +- tools/perf/tests/dlfilter-test.c | 2 +- tools/perf/util/bpf_lock_contention.c | 2 +- tools/perf/util/dlfilter.c | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) commit 188ac720d364035008a54d249cf47b4cc100f819 Author: Yang Jihong Date: Tue Dec 20 11:57:00 2022 +0800 perf debug: Set debug_peo_args and redirect_to_stderr variable to correct values in perf_quiet_option() When perf uses quiet mode, perf_quiet_option() sets the 'debug_peo_args' variable to -1, and display_attr() incorrectly determines the value of 'debug_peo_args'. As a result, unexpected information is displayed. Before: # perf record --quiet -- ls > /dev/null ------------------------------------------------------------ perf_event_attr: size 128 { sample_period, sample_freq } 4000 sample_type IP|TID|TIME|PERIOD read_format ID|LOST disabled 1 inherit 1 mmap 1 comm 1 freq 1 enable_on_exec 1 task 1 precise_ip 3 sample_id_all 1 exclude_guest 1 mmap2 1 comm_exec 1 ksymbol 1 bpf_event 1 ------------------------------------------------------------ ... After: # perf record --quiet -- ls > /dev/null # redirect_to_stderr is a similar problem. Fixes: f78eaef0e0493f60 ("perf tools: Allow to force redirect pr_debug to stderr.") Fixes: ccd26741f5e6bdf2 ("perf tool: Provide an option to print perf_event_open args and return value") Suggested-by: Adrian Hunter Reviewed-by: Adrian Hunter Signed-off-by: Yang Jihong Cc: Alexander Shishkin Cc: Andi Kleen Cc: Carsten Haitzler Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: martin.lau@kernel.org Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20221220035702.188413-2-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/debug.c | 4 ++++ 1 file changed, 4 insertions(+) commit b235e5b51f7d557cf10cbb1245b6cdeb341e1e2b Author: Arnaldo Carvalho de Melo Date: Sun May 9 09:39:02 2021 -0300 tools headers UAPI: Sync linux/kvm.h with the kernel sources To pick the changes in: 86bdf3ebcfe1ded0 ("KVM: Support dirty ring in conjunction with bitmap") That just rebuilds perf, as these patches don't add any new KVM ioctl to be harvested for the the 'perf trace' ioctl syscall argument beautifiers. This is also by now used by tools/testing/selftests/kvm/, a simple test build didn't succeed, but for another reason: lib/kvm_util.c: In function ‘vm_enable_dirty_ring’: lib/kvm_util.c:125:30: error: ‘KVM_CAP_DIRTY_LOG_RING_ACQ_REL’ undeclared (first use in this function); did you mean ‘KVM_CAP_DIRTY_LOG_RING’? 125 | if (vm_check_cap(vm, KVM_CAP_DIRTY_LOG_RING_ACQ_REL)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | KVM_CAP_DIRTY_LOG_RING I'll send a separate patch for that. This silences this perf build warning: 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 Cc: Adrian Hunter Cc: Gavin Shan Cc: Ian Rogers Cc: Jiri Olsa Cc: Marc Zyngier Cc: Namhyung Kim Cc: Paolo Bonzini Link: http://lore.kernel.org/lkml/Y6H3b1Q4Msjy5Yz3@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/kvm.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit afa6646b1c5d3affd541f76bd7476e4b835a9174 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 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d118b18fb1da02b41df2da78cb2794b3638d89cd 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 .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5 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 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 4 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 39 +++++++++++++++++------- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 12 ++++++-- 3 files changed, 40 insertions(+), 15 deletions(-) commit 29d48b87db64b6697ddad007548e51d032081c59 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 drivers/gpu/drm/amd/amdkfd/kfd_process.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a6b9d2fa0024e7e399c26facd0fb466b7396e2b9 Author: Olga Kornievskaia Date: Tue Dec 20 12:31:29 2022 -0500 pNFS/filelayout: Fix coalescing test for single DS When there is a single DS no striping constraints need to be placed on the IO. When such constraint is applied then buffered reads don't coalesce to the DS's rsize. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust fs/nfs/filelayout/filelayout.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6d5edd15c982b4e3768919776422ba8f01388be3 Author: Arnaldo Carvalho de Melo Date: Wed Sep 8 16:09:08 2021 -0300 tools headers UAPI: Sync powerpc syscall table with the kernel sources To pick the changes in these csets: ce883a2ba310cd7c ("powerpc/32: fix syscall wrappers with 64-bit arguments") That doesn't cause any changes in the perf tools. This table is used in tools perf to allow features as described in the last update to this file. This addresses this perf build warning: Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl' diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl Cc: Adrian Hunter Cc: Andreas Schwab Cc: Ian Rogers Cc: Jiri Olsa Cc: Michael Ellerman Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/Y6H0C5plZ4V4aiPm@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/powerpc/entry/syscalls/syscall.tbl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a66558dcb1079c198ab0f56896195a353dae4428 Author: Arnaldo Carvalho de Melo Date: Fri Aug 7 08:45:47 2020 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes in: 97fa21f65c3eb5bb ("x86/resctrl: Move MSR defines into msr-index.h") 7420ae3bb977b46e ("x86/intel_epb: Set Alder Lake N and Raptor Lake P normal EPB") 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 2022-12-20 14:28:40.893794072 -0300 +++ after 2022-12-20 14:28:54.831993914 -0300 @@ -266,6 +266,7 @@ [0xc0000104 - x86_64_specific_MSRs_offset] = "AMD64_TSC_RATIO", [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", [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", $ 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: Borislav Petkov Cc: Dave Hansen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Srinivas Pandruvada Link: https://lore.kernel.org/lkml/Y6HyTOGRNvKfCVe4@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/msr-index.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit eeac18e2bff3e1f62f59059d34c37e75f350a119 Author: Arnaldo Carvalho de Melo Date: Tue Dec 20 14:16:01 2022 -0300 tools headers UAPI: Sync drm/i915_drm.h with the kernel sources To pick up the changes in: bc7ed4d30815bc43 ("drm/i915/perf: Apply Wa_18013179988") 81d5f7d91492aa3a ("drm/i915/perf: Add 32-bit OAG and OAR formats for DG2") 8133a6daad4e7274 ("drm/i915: enable PS64 support for DG2") b76c14c8fb2af1e4 ("drm/i915/huc: better define HuC status getparam possible return values.") 94dfc73e7cf4a31d ("treewide: uapi: Replace zero-length arrays with flexible-array members") That doesn't add any ioctl, so no changes in tooling. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h' diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h Cc: Adrian Hunter Cc: Daniele Ceraolo Spurio Cc: Gustavo A. R. Silva Cc: Ian Rogers Cc: Jiri Olsa Cc: John Harrison Cc: Matthew Auld Cc: Namhyung Kim Cc: Umesh Nerlige Ramappa Link: https://lore.kernel.org/lkml/Y6HukoRaZh2R4j5U@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/drm/i915_drm.h | 62 +++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 26 deletions(-) commit bfa87ac86ce9ff879c5ac49bf09c3999859a8968 Author: Alessandro Carminati Date: Tue Nov 22 18:36:48 2022 +0100 rv/monitors: Move monitor structure in rodata It makes sense to move the important monitor structure into rodata to prevent accidental structure modification. Link: https://lkml.kernel.org/r/20221122173648.4732-1-acarmina@redhat.com Signed-off-by: Alessandro Carminati Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) kernel/trace/rv/monitors/wip/wip.h | 2 +- kernel/trace/rv/monitors/wwnr/wwnr.h | 2 +- tools/verification/dot2/dot2c.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit b6bb9676f2165d518b35ba3bea5f1fcfc0d969bf Merge: 32d528c4b885 af5d74e32eb8 Author: Linus Torvalds Date: Tue Dec 20 08:56:35 2022 -0600 Merge tag 'm68knommu-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu update from Greg Ungerer: "Only a single change to use the safer strscpy() instead of strncpy() when setting up the cmdline" * tag 'm68knommu-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: use strscpy() to instead of strncpy() commit 32d528c4b885108694f613406d9f39fa4873bd37 Merge: 3e0caea75454 6cad1ecd4e32 Author: Linus Torvalds Date: Tue Dec 20 08:53:16 2022 -0600 Merge tag 'spdx-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx Pull SPDX/License additions from Greg KH: "Here are two small updates for LICENSES and some kernel files that add the Copyleft-next license and use it in a SPDX tag as a dual-license for some kernel files. These have been discussed thoroughly in public on the linux-spdx mailing list, and have the needed acks on them, as well as having been in linux-next with no reported issues for quite some time" * tag 'spdx-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: testing: use the copyleft-next-0.3.1 SPDX tag LICENSES: Add the copyleft-next-0.3.1 license commit 3e0caea7545430a530bec19bb0de6c1c56c04924 Merge: 35f79d0e2c98 3367934dd303 Author: Linus Torvalds Date: Tue Dec 20 08:48:24 2022 -0600 Merge tag 'devicetree-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull more devicetree updates from Rob Herring: "This is mostly a treewide clean-up from Krzysztof. There's also a couple of fixes and things that fell thru the cracks. I must say this has been a nice merge window without bindings dumped in at the last minute introducing warnings. Summary: - Treewide dropping of redundant 'binding' or 'schema' from schema titles. This will be followed up with a automated check to catch these. - Re-sort vendor-prefies - Convert GPIO based watchdog to schema - Handle all the variations for clocks, resets, power domains in i.MX PCIe binding - Document missing 'power-domains' property in mxsfb - Fix error with path references in Tegra XUSB example - Honor CONFIG_CMDLINE* even without /chosen node" * tag 'devicetree-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: drop redundant part of title (manual) dt-bindings: clock: drop redundant part of title dt-bindings: drop redundant part of title (beginning) dt-bindings: drop redundant part of title (end, part three) dt-bindings: drop redundant part of title (end, part two) dt-bindings: drop redundant part of title (end) dt-bindings: clock: st,stm32mp1-rcc: add proper title dt-bindings: memory-controllers: ti,gpmc-child: drop redundant part of title dt-bindings: drop redundant part of title of shared bindings dt-bindings: watchdog: gpio: Convert bindings to YAML dt-bindings: imx6q-pcie: Handle more resets on legacy platforms dt-bindings: imx6q-pcie: Handle various PD configurations dt-bindings: imx6q-pcie: Handle various clock configurations dt-bindings: hwmon: ntc-thermistor: drop Naveen Krishna Chatradhi from maintainers dt-bindings: mxsfb: Document i.MX8M/i.MX6SX/i.MX6SL power-domains property dt-bindings: vendor-prefixes: sort entries alphabetically dt-bindings: usb: tegra-xusb: Remove path references of: fdt: Honor CONFIG_CMDLINE* even without /chosen node commit 35f79d0e2c98ff6ecb9b5fc33113158dc7f7353c Merge: 70b07bec95b6 4934fbfb3ff0 Author: Linus Torvalds Date: Tue Dec 20 08:43:53 2022 -0600 Merge tag 'parisc-for-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "There is one noteable patch, which allows the parisc kernel to use the same MADV_xxx constants as the other architectures going forward. With that change only alpha has one entry left (MADV_DONTNEED is 6 vs 4 on others) which is different. To prevent an ABI breakage, a wrapper is included which translates old MADV values to the new ones, so existing userspace isn't affected. Reason for that patch is, that some applications wrongly used the standard MADV_xxx values even on some non-x86 platforms and as such those programs failed to run correctly on parisc (examples are qemu-user, tor browser and boringssl). Then the kgdb console and the LED code received some fixes, and some 0-day warnings are now gone. Finally, the very last compile warning which was visible during a kernel build is now fixed too (in the vDSO code). The majority of the patches are tagged for stable series and in summary this patchset is quite small and drops more code than it adds: Fixes: - Fix potential null-ptr-deref in start_task() - Fix kgdb console on serial port - Add missing FORCE prerequisites in Makefile - Drop PMD_SHIFT from calculation in pgtable.h Enhancements: - Implement a wrapper to align madvise() MADV_* constants with other architectures - If machine supports running MPE/XL, show the MPE model string Cleanups: - Drop duplicate kgdb console code - Indenting fixes in setup_cmdline()" * tag 'parisc-for-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Show MPE/iX model string at bootup parisc: Add missing FORCE prerequisites in Makefile parisc: Move pdc_result struct to firmware.c parisc: Drop locking in pdc console code parisc: Drop duplicate kgdb_pdc console parisc: Fix locking in pdc_iodc_print() firmware call parisc: Drop PMD_SHIFT from calculation in pgtable.h parisc: Align parisc MADV_XXX constants with all other architectures parisc: led: Fix potential null-ptr-deref in start_task() parisc: Fix inconsistent indenting in setup_cmdline() commit 54f27dc53f1764986d417cfafe1013806deba668 Author: José Expósito Date: Mon Nov 28 17:55:24 2022 +0100 HID: sony: Fix unused function warning Compiling this driver without setting "CONFIG_SONY_FF" generates the following warning: drivers/hid/hid-sony.c:2358:20: warning: unused function 'sony_send_output_report' [-Wunused-function] static inline void sony_send_output_report(struct sony_sc *sc) ^ 1 warning generated. Add the missing preprocessor check to fix it. Signed-off-by: José Expósito Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 2 ++ 1 file changed, 2 insertions(+) commit 3d57f36c89d8ba32b2c312f397a37fd1a2dc7cfc Author: Terry Junge Date: Thu Dec 8 15:05:06 2022 -0800 HID: plantronics: Additional PIDs for double volume key presses quirk I no longer work for Plantronics (aka Poly, aka HP) and do not have access to the headsets in order to test. However, as noted by Maxim, the other 32xx models that share the same base code set as the 3220 would need the same quirk. This patch adds the PIDs for the rest of the Blackwire 32XX product family that require the quirk. Plantronics Blackwire 3210 Series (047f:c055) Plantronics Blackwire 3215 Series (047f:c057) Plantronics Blackwire 3225 Series (047f:c058) Quote from previous patch by Maxim Mikityanskiy Plantronics Blackwire 3220 Series (047f:c056) sends HID reports twice for each volume key press. This patch adds a quirk to hid-plantronics for this product ID, which will ignore the second volume key press if it happens within 5 ms from the last one that was handled. The patch was tested on the mentioned model only, it shouldn't affect other models, however, this quirk might be needed for them too. Auto-repeat (when a key is held pressed) is not affected, because the rate is about 3 times per second, which is far less frequent than once in 5 ms. End quote Signed-off-by: Terry Junge Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-plantronics.c | 9 +++++++++ 2 files changed, 12 insertions(+) commit 4eab1c2fe06c98a4dff258dd64800b6986c101e9 Author: José Expósito Date: Mon Nov 28 17:57:05 2022 +0100 HID: multitouch: fix Asus ExpertBook P2 P2451FA trackpoint The HID descriptor of this device contains two mouse collections, one for mouse emulation and the other for the trackpoint. Both collections get merged and, because the first one defines X and Y, the movemenent events reported by the trackpoint collection are ignored. Set the MT_CLS_WIN_8_FORCE_MULTI_INPUT class for this device to be able to receive its reports. This fix is similar to/based on commit 40d5bb87377a ("HID: multitouch: enable multi-input as a quirk for some devices"). Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/825 Reported-by: Akito Tested-by: Akito Signed-off-by: José Expósito Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 4 ++++ 1 file changed, 4 insertions(+) commit cec827d658dd5c287ea8925737d45f0a60e47422 Author: José Expósito Date: Thu Nov 24 18:49:32 2022 +0100 HID: Ignore HP Envy x360 eu0009nv stylus battery Battery status is reported for the HP Envy x360 eu0009nv stylus even though it does not have battery. Prevent it from always reporting the battery as low (1%). Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/823 Reported-by: Ioannis Iliopoulos Tested-by: Ioannis Iliopoulos Signed-off-by: José Expósito Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+) commit 70b07bec95b6d369f68fb85bc3fe60c423d8b91b Merge: 850f7a5cab33 32975c491ee4 Author: Linus Torvalds Date: Tue Dec 20 08:32:11 2022 -0600 Merge tag 'asm-generic-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic updates from Arnd Bergmann: "There are only three fairly simple patches. The #include change to linux/swab.h addresses a userspace build issue, and the change to the mmio tracing logic helps provide more useful traces" * tag 'asm-generic-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: uapi: Add missing _UAPI prefix to include guard asm-generic/io: Add _RET_IP_ to MMIO trace for more accurate debug info include/uapi/linux/swab: Fix potentially missing __always_inline commit 1db1f392591aff13fd643f0ec7c1d5e27391d700 Author: Jason Gerecke Date: Thu Dec 1 15:11:41 2022 -0800 HID: wacom: Ensure bootloader PID is usable in hidraw mode Some Wacom devices have a special "bootloader" mode that is used for firmware flashing. When operating in this mode, the device cannot be used for input, and the HID descriptor is not able to be processed by the driver. The driver generates an "Unknown device_type" warning and then returns an error code from wacom_probe(). This is a problem because userspace still needs to be able to interact with the device via hidraw to perform the firmware flash. This commit adds a non-generic device definition for 056a:0094 which is used when devices are in "bootloader" mode. It marks the devices with a special BOOTLOADER type that is recognized by wacom_probe() and wacom_raw_event(). When we see this type we ensure a hidraw device is created and otherwise keep our hands off so that userspace is in full control. Signed-off-by: Jason Gerecke Tested-by: Tatsunosuke Tobita Cc: Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 8 ++++++++ drivers/hid/wacom_wac.c | 4 ++++ drivers/hid/wacom_wac.h | 1 + 3 files changed, 13 insertions(+) commit b7dc753fe33a707379e2254317794a4dad6c0fe2 Author: Arnd Bergmann Date: Thu Dec 15 17:55:42 2022 +0100 wifi: ath9k: use proper statements in conditionals A previous cleanup patch accidentally broke some conditional expressions by replacing the safe "do {} while (0)" constructs with empty macros. gcc points this out when extra warnings are enabled: drivers/net/wireless/ath/ath9k/hif_usb.c: In function 'ath9k_skb_queue_complete': drivers/net/wireless/ath/ath9k/hif_usb.c:251:57: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] 251 | TX_STAT_INC(hif_dev, skb_failed); Make both sets of macros proper expressions again. Fixes: d7fc76039b74 ("ath9k: htc: clean up statistics macros") Signed-off-by: Arnd Bergmann Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221215165553.1950307-1-arnd@kernel.org drivers/net/wireless/ath/ath9k/htc.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 37fc9ad1617a303bbfd28870eb25aaa4766e79ab Author: Arnd Bergmann Date: Thu Dec 15 17:31:10 2022 +0100 wifi: mt76: mt7996: select CONFIG_RELAY Without CONFIG_RELAY, the driver fails to link: ERROR: modpost: "relay_flush" [drivers/net/wireless/mediatek/mt76/mt7996/mt7996e.ko] undefined! ERROR: modpost: "relay_switch_subbuf" [drivers/net/wireless/mediatek/mt76/mt7996/mt7996e.ko] undefined! ERROR: modpost: "relay_open" [drivers/net/wireless/mediatek/mt76/mt7996/mt7996e.ko] undefined! ERROR: modpost: "relay_reset" [drivers/net/wireless/mediatek/mt76/mt7996/mt7996e.ko] undefined! ERROR: modpost: "relay_file_operations" [drivers/net/wireless/mediatek/mt76/mt7996/mt7996e.ko] undefined! The same change was done in mt7915 for the corresponding copy of the code. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") See-also: 988845c9361a ("mt76: mt7915: add support for passing chip/firmware debug data to user space") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221215163133.4152299-1-arnd@kernel.org drivers/net/wireless/mediatek/mt76/mt7996/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1c4c0b28b517d778d37900deedfe91088839f07a Author: Johannes Berg Date: Tue Dec 13 23:15:04 2022 +0200 wifi: iwlwifi: fw: skip PPAG for JF For JF RFs we don't support PPAG, but many firmware images lie about it. Always skip support for JF to avoid firmware errors when sending the command. Reported-and-tested-by: Íñigo Huguet Link: https://lore.kernel.org/linux-wireless/CACT4oufQsqHGp6bah2c4+jPn2wG1oZqY=UKa_TmPx=F6Lxng8Q@mail.gmail.com Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221213225723.2a43415d8990.I9ac210740a45b41f1b2e15274e1daf4284f2808a@changeid drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 5 +++++ 1 file changed, 5 insertions(+) commit 53ffa6a9f83b2170c60591da1ead8791d5a42e81 Author: Jiasheng Jiang Date: Tue Dec 20 10:49:21 2022 +0800 HID: amd_sfh: Add missing check for dma_alloc_coherent Add check for the return value of the dma_alloc_coherent since it may return NULL pointer if allocation fails. Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") Signed-off-by: Jiasheng Jiang Acked-by: Basavaraj Natikar Signed-off-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20221220024921.21992-1-jiasheng@iscas.ac.cn drivers/hid/amd-sfh-hid/amd_sfh_client.c | 4 ++++ 1 file changed, 4 insertions(+) commit 38624d2c972e7692ca59d0d3b97741a3313addb3 Merge: 5504eb164eec ad0fca2dceea Author: Dave Airlie Date: Tue Dec 20 15:43:06 2022 +1000 Merge tag 'drm-intel-next-fixes-2022-12-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Documentation fixe (Matt, Miaoqian) - OA-perf related fix (Umesh) - VLV/CHV HDMI/DP audio fix (Ville) - Display DDI/Transcoder fix (Khaled) - Migrate fixes (Chris, Matt) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y5uFYOJ/1jgf2eSE@intel.com commit 5504eb164eecdcc1fcb7d7a3d05c29b3bbbcfa78 Merge: 66efff515a65 7a18e089eff0 Author: Dave Airlie Date: Tue Dec 20 15:21:18 2022 +1000 Merge tag 'amd-drm-fixes-6.2-2022-12-15' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.2-2022-12-15: amdgpu: - Spelling fix - BO pin fix - Properly handle polaris 10/11 overlap asics - GMC9 fix - SR-IOV suspend fix - DCN 3.1.4 fix - KFD userptr locking fix - SMU13.x fixes - GDS/GWS/OA handling fix - Reserved VMID handling fixes - FRU EEPROM fix - BO validation fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20221215224936.6438-1-alexander.deucher@amd.com commit 3c202d14a9d73fb63c3dccb18feac5618c21e1c4 Author: Jason A. Donenfeld Date: Sun Oct 9 20:45:07 2022 -0600 prandom: remove prandom_u32_max() Convert the final two users of prandom_u32_max() that slipped in during 6.2-rc1 to use get_random_u32_below(). Then, with no more users left, we can finally remove the deprecated function. Signed-off-by: Jason A. Donenfeld arch/x86/mm/cpu_entry_area.c | 2 +- include/linux/prandom.h | 6 ------ net/ipv4/tcp_plb.c | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) commit 41a15855c1ee390a0ae9d0c29d32b451dd30a600 Author: Johan Hovold Date: Fri Dec 16 10:15:14 2022 +0100 efi: random: fix NULL-deref when refreshing seed Do not try to refresh the RNG seed in case the firmware does not support setting variables. This is specifically needed to prevent a NULL-pointer dereference on the Lenovo X13s with some firmware revisions, or more generally, whenever the runtime services have been disabled (e.g. efi=noruntime or with PREEMPT_RT). Fixes: e7b813b32a42 ("efi: random: refresh non-volatile random seed when RNG is initialized") Reported-by: Steev Klimaszewski Reported-by: Bjorn Andersson Tested-by: Steev Klimaszewski Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Signed-off-by: Johan Hovold Signed-off-by: Jason A. Donenfeld drivers/firmware/efi/efi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6bb20c152b6bf7dd8ffb248f33c2593fd9aeb318 Author: Jason A. Donenfeld Date: Sat Oct 29 01:42:02 2022 +0200 random: do not include from random.h The header is a random.c private detail, not something to be called by other code. As such, don't make it automatically available by way of random.h. Cc: Michael Ellerman Acked-by: Heiko Carstens Reviewed-by: Christophe Leroy Signed-off-by: Jason A. Donenfeld arch/powerpc/kernel/setup-common.c | 1 + arch/s390/kernel/setup.c | 1 + drivers/char/hw_random/powernv-rng.c | 1 + drivers/char/hw_random/s390-trng.c | 1 + drivers/char/random.c | 1 + include/linux/random.h | 2 -- 6 files changed, 5 insertions(+), 2 deletions(-) commit 4be84df38a6f49b81e5909ede78242ba1538c1e6 Merge: 918fb1aaa258 f006229135b7 Author: Jakub Kicinski Date: Mon Dec 19 17:47:59 2022 -0800 Merge tag 'linux-can-fixes-for-6.2-20221219' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2022-12-19 The first patch is by Vincent Mailhol and adds the etas_es58x devlink documentation to the index. Haibo Chen's patch for the flexcan driver fixes a unbalanced pm_runtime_enable warning. The last patch is by me, targets the kvaser_usb driver and fixes an error occurring with gcc-13. * tag 'linux-can-fixes-for-6.2-20221219' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: kvaser_usb: hydra: help gcc-13 to figure out cmd_len can: flexcan: avoid unbalanced pm_runtime_enable warning Documentation: devlink: add missing toc entry for etas_es58x devlink doc ==================== Link: https://lore.kernel.org/r/20221219155210.1143439-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 918fb1aaa25812a277ab469679df17f45ce92313 Merge: b389a902dd5b 08f65892c5ee Author: Jakub Kicinski Date: Mon Dec 19 17:28:51 2022 -0800 Merge branch 'stop-corrupting-socket-s-task_frag' Benjamin Coddington says: ==================== Stop corrupting socket's task_frag The networking code uses flags in sk_allocation to determine if it can use current->task_frag, however in-kernel users of sockets may stop setting sk_allocation when they convert to the preferred memalloc_nofs_save/restore, as SUNRPC has done in commit a1231fda7e94 ("SUNRPC: Set memalloc_nofs_save() on all rpciod/xprtiod jobs"). This will cause corruption in current->task_frag when recursing into the network layer for those subsystems during page fault or reclaim. The corruption is difficult to diagnose because stack traces may not contain the offending subsystem at all. The corruption is unlikely to show up in testing because it requires memory pressure, and so subsystems that convert to memalloc_nofs_save/restore are likely to continue to run into this issue. Previous reports and proposed fixes: https://lore.kernel.org/netdev/96a18bd00cbc6cb554603cc0d6ef1c551965b078.1663762494.git.gnault@redhat.com/ https://lore.kernel.org/netdev/b4d8cb09c913d3e34f853736f3f5628abfd7f4b6.1656699567.git.gnault@redhat.com/ https://lore.kernel.org/linux-nfs/de6d99321d1dcaa2ad456b92b3680aa77c07a747.1665401788.git.gnault@redhat.com/ Guilluame Nault has done all of the hard work tracking this problem down and finding the best fix for this issue. I'm just taking a turn posting another fix. ==================== Link: https://lore.kernel.org/r/cover.1671194454.git.bcodding@redhat.com Signed-off-by: Jakub Kicinski commit 08f65892c5ee15806dce7259e06c384b8cd768d7 Author: Benjamin Coddington Date: Fri Dec 16 07:45:28 2022 -0500 net: simplify sk_page_frag Now that in-kernel socket users that may recurse during reclaim have benn converted to sk_use_task_frag = false, we can have sk_page_frag() simply check that value. Signed-off-by: Benjamin Coddington Reviewed-by: Guillaume Nault Signed-off-by: Jakub Kicinski include/net/sock.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 98123866fcf3fe95a0c1b198ef122dfdbd351916 Author: Benjamin Coddington Date: Fri Dec 16 07:45:27 2022 -0500 Treewide: Stop corrupting socket's task_frag Since moving to memalloc_nofs_save/restore, SUNRPC has stopped setting the GFP_NOIO flag on sk_allocation which the networking system uses to decide when it is safe to use current->task_frag. The results of this are unexpected corruption in task_frag when SUNRPC is involved in memory reclaim. The corruption can be seen in crashes, but the root cause is often difficult to ascertain as a crashing machine's stack trace will have no evidence of being near NFS or SUNRPC code. I believe this problem to be much more pervasive than reports to the community may indicate. Fix this by having kernel users of sockets that may corrupt task_frag due to reclaim set sk_use_task_frag = false. Preemptively correcting this situation for users that still set sk_allocation allows them to convert to memalloc_nofs_save/restore without the same unexpected corruptions that are sure to follow, unlikely to show up in testing, and difficult to bisect. CC: Philipp Reisner CC: Lars Ellenberg CC: "Christoph Böhmwalder" CC: Jens Axboe CC: Josef Bacik CC: Keith Busch CC: Christoph Hellwig CC: Sagi Grimberg CC: Lee Duncan CC: Chris Leech CC: Mike Christie CC: "James E.J. Bottomley" CC: "Martin K. Petersen" CC: Valentina Manea CC: Shuah Khan CC: Greg Kroah-Hartman CC: David Howells CC: Marc Dionne CC: Steve French CC: Christine Caulfield CC: David Teigland CC: Mark Fasheh CC: Joel Becker CC: Joseph Qi CC: Eric Van Hensbergen CC: Latchesar Ionkov CC: Dominique Martinet CC: Ilya Dryomov CC: Xiubo Li CC: Chuck Lever CC: Jeff Layton CC: Trond Myklebust CC: Anna Schumaker CC: Steffen Klassert CC: Herbert Xu Suggested-by: Guillaume Nault Signed-off-by: Benjamin Coddington Reviewed-by: Guillaume Nault Signed-off-by: Jakub Kicinski drivers/block/drbd/drbd_receiver.c | 3 +++ drivers/block/nbd.c | 1 + drivers/nvme/host/tcp.c | 1 + drivers/scsi/iscsi_tcp.c | 1 + drivers/usb/usbip/usbip_common.c | 1 + fs/cifs/connect.c | 1 + fs/dlm/lowcomms.c | 2 ++ fs/ocfs2/cluster/tcp.c | 1 + net/9p/trans_fd.c | 1 + net/ceph/messenger.c | 1 + net/sunrpc/xprtsock.c | 3 +++ net/xfrm/espintcp.c | 1 + 12 files changed, 17 insertions(+) commit fb87bd47516d9a26b6d549231aa743b20fd4a569 Author: Guillaume Nault Date: Fri Dec 16 07:45:26 2022 -0500 net: Introduce sk_use_task_frag in struct sock. Sockets that can be used while recursing into memory reclaim, like those used by network block devices and file systems, mustn't use current->task_frag: if the current process is already using it, then the inner memory reclaim call would corrupt the task_frag structure. To avoid this, sk_page_frag() uses ->sk_allocation to detect sockets that mustn't use current->task_frag, assuming that those used during memory reclaim had their allocation constraints reflected in ->sk_allocation. This unfortunately doesn't cover all cases: in an attempt to remove all usage of GFP_NOFS and GFP_NOIO, sunrpc stopped setting these flags in ->sk_allocation, and used memalloc_nofs critical sections instead. This breaks the sk_page_frag() heuristic since the allocation constraints are now stored in current->flags, which sk_page_frag() can't read without risking triggering a cache miss and slowing down TCP's fast path. This patch creates a new field in struct sock, named sk_use_task_frag, which sockets with memory reclaim constraints can set to false if they can't safely use current->task_frag. In such cases, sk_page_frag() now always returns the socket's page_frag (->sk_frag). The first user is sunrpc, which needs to avoid using current->task_frag but can keep ->sk_allocation set to GFP_KERNEL otherwise. Eventually, it might be possible to simplify sk_page_frag() by only testing ->sk_use_task_frag and avoid relying on the ->sk_allocation heuristic entirely (assuming other sockets will set ->sk_use_task_frag according to their constraints in the future). The new ->sk_use_task_frag field is placed in a hole in struct sock and belongs to a cache line shared with ->sk_shutdown. Therefore it should be hot and shouldn't have negative performance impacts on TCP's fast path (sk_shutdown is tested just before the while() loop in tcp_sendmsg_locked()). Link: https://lore.kernel.org/netdev/b4d8cb09c913d3e34f853736f3f5628abfd7f4b6.1656699567.git.gnault@redhat.com/ Signed-off-by: Guillaume Nault Reviewed-by: Benjamin Coddington Signed-off-by: Jakub Kicinski include/net/sock.h | 11 +++++++++-- net/core/sock.c | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) commit b389a902dd5be4ece505a2e0463b9b034de04bf5 Author: Matt Johnston Date: Thu Dec 15 13:49:33 2022 +0800 mctp: Remove device type check at unregister The unregister check could be incorrectly triggered if a netdev changes its type after register. That is possible for a tun device using TUNSETLINK ioctl, resulting in mctp unregister failing and the netdev unregister waiting forever. This was encountered by https://github.com/openthread/openthread/issues/8523 Neither check at register or unregister is required. They were added in an attempt to track down mctp_ptr being set unexpectedly, which should not happen in normal operation. Fixes: 7b1871af75f3 ("mctp: Warn if pointer is set for a wrong dev type") Signed-off-by: Matt Johnston Link: https://lore.kernel.org/r/20221215054933.2403401-1-matt@codeconstruct.com.au Signed-off-by: Jakub Kicinski net/mctp/device.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 62e027fb0e5293d95e8d36655757ef4687c8795d Author: Arun Ramadoss Date: Tue Dec 13 15:44:40 2022 +0530 net: dsa: microchip: remove IRQF_TRIGGER_FALLING in request_threaded_irq KSZ swithes used interrupts for detecting the phy link up and down. During registering the interrupt handler, it used IRQF_TRIGGER_FALLING flag. But this flag has to be retrieved from device tree instead of hard coding in the driver, so removing the flag. Fixes: ff319a644829 ("net: dsa: microchip: move interrupt handling logic from lan937x to ksz_common") Reported-by: Christian Eggers Signed-off-by: Arun Ramadoss Link: https://lore.kernel.org/r/20221213101440.24667-1-arun.ramadoss@microchip.com Signed-off-by: Jakub Kicinski drivers/net/dsa/microchip/ksz_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 850f7a5cab3314fb26547d636893eb55b4c5527a Merge: 6feb57c2fd7c 6f85602d5fde Author: Linus Torvalds Date: Mon Dec 19 16:07:59 2022 -0600 Merge tag 'soc-fixes-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "These are a couple of build fixes from randconfig testing, plus a set of Mediatek SoC specific fixes, all trivial" * tag 'soc-fixes-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: soc: tegra: fix CPU_BIG_ENDIAN dependencies ARM: disallow pre-ARMv5 builds with ld.lld ARM: pxa: fix building with clang MAINTAINERS: add related dts to IXP4xx ARM: dts: spear: drop 0x from unit address arm64: dts: mt8183: Fix Mali GPU clock arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon soc: mediatek: pm-domains: Fix the power glitch issue commit cc074822465d18a2d39e0b3e2b48b6766a568db2 Author: Hou Tao Date: Sat Dec 17 14:21:44 2022 +0800 bpf: Define sock security related BTF IDs under CONFIG_SECURITY_NETWORK There are warnings reported from resolve_btfids when building vmlinux with CONFIG_SECURITY_NETWORK disabled: WARN: resolve_btfids: unresolved symbol bpf_lsm_sk_free_security WARN: resolve_btfids: unresolved symbol bpf_lsm_sk_alloc_security So only define BTF IDs for these LSM hooks when CONFIG_SECURITY_NETWORK is enabled. Fixes: c0c852dd1876 ("bpf: Do not mark certain LSM hook arguments as trusted") Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221217062144.2507222-1-houtao@huaweicloud.com kernel/bpf/bpf_lsm.c | 2 ++ 1 file changed, 2 insertions(+) commit 6feb57c2fd7c787aecf2846a535248899e7b70fa Merge: 158738ea7505 731c4eac848f Author: Linus Torvalds Date: Mon Dec 19 12:33:32 2022 -0600 Merge tag 'kbuild-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Support zstd-compressed debug info - Allow W=1 builds to detect objects shared among multiple modules - Add srcrpm-pkg target to generate a source RPM package - Make the -s option detection work for future GNU Make versions - Add -Werror to KBUILD_CPPFLAGS when CONFIG_WERROR=y - Allow W=1 builds to detect -Wundef warnings in any preprocessed files - Raise the minimum supported version of binutils to 2.25 - Use $(intcmp ...) to compare integers if GNU Make >= 4.4 is used - Use $(file ...) to read a file if GNU Make >= 4.2 is used - Print error if GNU Make older than 3.82 is used - Allow modpost to detect section mismatches with Clang LTO - Include vmlinuz.efi into kernel tarballs for arm64 CONFIG_EFI_ZBOOT=y * tag 'kbuild-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (29 commits) buildtar: fix tarballs with EFI_ZBOOT enabled modpost: Include '.text.*' in TEXT_SECTIONS padata: Mark padata_work_init() as __ref kbuild: ensure Make >= 3.82 is used kbuild: refactor the prerequisites of the modpost rule kbuild: change module.order to list *.o instead of *.ko kbuild: use .NOTINTERMEDIATE for future GNU Make versions kconfig: refactor Makefile to reduce process forks kbuild: add read-file macro kbuild: do not sort after reading modules.order kbuild: add test-{ge,gt,le,lt} macros Documentation: raise minimum supported version of binutils to 2.25 kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds kbuild: move -Werror from KBUILD_CFLAGS to KBUILD_CPPFLAGS kbuild: Port silent mode detection to future gnu make. init/version.c: remove #include firmware_loader: remove #include modpost: Mark uuid_le type to be suitable only for MEI kbuild: add ability to make source rpm buildable using koji kbuild: warn objects shared among multiple modules ... commit 158738ea75059fb4ddf812e2cb9fe1ff6e22bc70 Merge: aeba12b26c79 70d822cfb782 Author: Linus Torvalds Date: Mon Dec 19 12:26:03 2022 -0600 Merge tag 'zstd-linus-v6.2' of https://github.com/terrelln/linux Pull zstd updates from Nick Terrell: "Update the kernel to upstream zstd v1.5.2 [0]. Specifically to the tag v1.5.2-kernel [1] which includes several cherrypicked fixes for the kernel on top of v1.5.2. Excepting the MAINTAINERS change, all the changes in this can be generated by: git clone https://github.com/facebook/zstd cd zstd/contrib/linux-kernel git checkout v1.5.2-kernel LINUX=/path/to/linux/repo make import Additionally, this includes several minor typo fixes, which have all been fixed upstream so they are maintained on the next import" Link: https://github.com/facebook/zstd/releases/tag/v1.5.2 [0] Link: https://github.com/facebook/zstd/tree/v1.5.2-kernel [1] Link: https://lore.kernel.org/lkml/20221024202606.404049-1-nickrterrell@gmail.com/ Link: https://github.com/torvalds/linux/commit/637a642f5ca5e850186bb64ac75ebb0f124b458d * tag 'zstd-linus-v6.2' of https://github.com/terrelln/linux: zstd: import usptream v1.5.2 zstd: Move zstd-common module exports to zstd_common_module.c lib: zstd: Fix comment typo lib: zstd: fix repeated words in comments MAINTAINERS: git://github -> https://github.com for terrelln lib: zstd: clean up double word in comment. commit 5ad70eb27d2b87ec722fedd23638354be37ea0b0 Author: Ammar Faizi Date: Mon Dec 19 23:45:21 2022 +0700 MAINTAINERS: io_uring: Add include/trace/events/io_uring.h This header file was introduced in commit c826bd7a743f ("io_uring: add set of tracing events"). It didn't get added to the io_uring maintainers section. Add this header file to the io_uring maintainers section. Signed-off-by: Ammar Faizi Link: https://lore.kernel.org/r/20221219164521.2481728-1-ammar.faizi@intel.com Signed-off-by: Jens Axboe MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6f85602d5fdea936077060ca6853587f01716a45 Merge: b9cb6be06b56 dba8eb83af9d Author: Arnd Bergmann Date: Mon Dec 19 16:47:40 2022 +0100 Merge tag 'v6.1-soc-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/fixes PM domains: enable isolation before resetting power * tag 'v6.1-soc-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: soc: mediatek: pm-domains: Fix the power glitch issue Link: https://lore.kernel.org/r/29c8b913-53cf-096f-fe44-832ceaeac116@suse.com Signed-off-by: Arnd Bergmann commit b9cb6be06b56f9ad73072c2728138fb339da7d32 Merge: ba4b4d0293ed ad2631b5645a Author: Arnd Bergmann Date: Mon Dec 19 16:47:18 2022 +0100 Merge tag 'v6.1-dts64-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/fixes MT8183: fix phandle for GPU clock MT8195 demo: fix size of secmon reserved memory area * tag 'v6.1-dts64-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: dts: mt8183: Fix Mali GPU clock arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon Link: https://lore.kernel.org/r/af4c45ce-a150-438f-dab4-e47b120c32c4@suse.com Signed-off-by: Arnd Bergmann commit ba4b4d0293ed12ec2eda09e0329d9831243ca699 Author: Arnd Bergmann Date: Thu Dec 15 17:53:21 2022 +0100 soc: tegra: fix CPU_BIG_ENDIAN dependencies My previous patch to prevent BPMP from being enabled on big endian kernels caused a build regression: WARNING: unmet direct dependencies detected for TEGRA_BPMP Depends on [n]: ARCH_TEGRA [=y] && TEGRA_HSP_MBOX [=y] && TEGRA_IVC [=y] && !CPU_BIG_ENDIAN [=y] Selected by [y]: - ARCH_TEGRA_186_SOC [=y] && ARCH_TEGRA [=y] && ARM64 [=y] - ARCH_TEGRA_194_SOC [=y] && ARCH_TEGRA [=y] && ARM64 [=y] - ARCH_TEGRA_234_SOC [=y] && ARCH_TEGRA [=y] && ARM64 [=y] Add even more such dependencies for the SoC types that use the BPMP driver. Fixes: 4ddb1bf1a837 ("tegra: mark BPMP driver as little-endian only") Signed-off-by: Arnd Bergmann Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20221215165336.1781080-1-arnd@kernel.org Signed-off-by: Arnd Bergmann drivers/soc/tegra/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit 6a7ee50f8f56dc181e1150cc101896053b02d220 Author: Arnd Bergmann Date: Thu Dec 15 17:26:20 2022 +0100 ARM: disallow pre-ARMv5 builds with ld.lld lld cannot build for ARMv4/v4T targets because it inserts 'blx' instructions that are unsupported there: ld.lld: warning: lld uses blx instruction, no object with architecture supporting feature detected Add a Kconfig time dependency to prevent those targets from being selected in randconfig builds. Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Link: https://github.com/llvm/llvm-project/issues/50764 Link: https://github.com/ClangBuiltLinux/linux/issues/964 Link: https://lore.kernel.org/r/20221215162635.3750763-1-arnd@kernel.org Signed-off-by: Arnd Bergmann arch/arm/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 43a3ce77aee917ac3b247e925853646fac4c05a6 Author: Arnaldo Carvalho de Melo Date: Thu Dec 17 14:58:51 2020 -0300 tools headers UAPI: Sync linux/fscrypt.h with the kernel sources To pick the changes from: f8b435f93b7630af ("fscrypt: remove unused Speck definitions") e0cefada1383c5ce ("fscrypt: Add SM4 XTS/CTS symmetric algorithm support") That don't result in any changes in tooling, just causes this to be rebuilt: CC /tmp/build/perf-urgent/trace/beauty/sync_file_range.o LD /tmp/build/perf-urgent/trace/beauty/perf-in.o addressing this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/fscrypt.h' differs from latest version at 'include/uapi/linux/fscrypt.h' diff -u tools/include/uapi/linux/fscrypt.h include/uapi/linux/fscrypt.h Cc: Adrian Hunter Cc: Eric Biggers Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tianjia Zhang Link: https://lore.kernel.org/lkml/Y6CHSS6Rn9YOqpAd@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/fscrypt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b88615950fc805690b92b46c8ab794beb4bd6aa Author: Arnd Bergmann Date: Thu Dec 15 17:25:14 2022 +0100 ARM: pxa: fix building with clang The integrated assembler in clang does not understand the xscale specific mra/mar instructions: arch/arm/mach-pxa/pxa27x.c:136:15: error: unsupported architectural extension: xscale asm volatile(".arch_extension xscale\n\t" arch/arm/mach-pxa/pxa27x.c:136:40: error: invalid instruction, did you mean: mcr, mla, mrc, mrs, msr? mra r2, r3, acc0 Since these are coprocessor features, the same can be expressed using mrrc/mcrr, so use that for builds with IAS. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20221215162529.3659187-1-arnd@kernel.org Signed-off-by: Arnd Bergmann arch/arm/mach-pxa/pxa27x.c | 8 ++++++++ arch/arm/mach-pxa/pxa3xx.c | 8 ++++++++ 2 files changed, 16 insertions(+) commit 4c03c4188cfb831e4ac093599192aedd60625a45 Author: Corentin Labbe Date: Wed Dec 14 21:42:23 2022 +0100 MAINTAINERS: add related dts to IXP4xx get_maintainer.pl currently give no maintainer on all IXP4xx DTS files. Add them to the set of files handled by IXP4xx maintainers. Signed-off-by: Corentin Labbe Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221005105734.3513581-1-clabbe@baylibre.com Link: https://lore.kernel.org/r/20221214204223.177807-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 2b76cfe190305fe02d8120df64f2a1bb6a3d3889 Author: Krzysztof Kozlowski Date: Sat Dec 10 12:33:46 2022 +0100 ARM: dts: spear: drop 0x from unit address By coding style, unit address should not start with 0x. Signed-off-by: Krzysztof Kozlowski Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20221210113347.63939-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann arch/arm/boot/dts/spear300.dtsi | 2 +- arch/arm/boot/dts/spear310.dtsi | 2 +- arch/arm/boot/dts/spear320.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 51c4f2bf5397b34b79a6712221606e0ab2e6f7ed Author: Arnaldo Carvalho de Melo Date: Thu Jul 1 13:39:15 2021 -0300 tools headers cpufeatures: Sync with the kernel sources To pick the changes from: 5e85c4ebf206e50c ("x86: KVM: Advertise AVX-IFMA CPUID to user space") af2872f622547656 ("x86: KVM: Advertise AMX-FP16 CPUID to user space") 6a19d7aa5821522e ("x86: KVM: Advertise CMPccXADD CPUID to user space") aaa65d17eec372c6 ("x86/tsx: Add a feature bit for TSX control MSR support") b1599915f09157e9 ("x86/cpufeatures: Move X86_FEATURE_CALL_DEPTH from bit 18 to bit 19 of word 11, to leave space for WIP X86_FEATURE_SGX_EDECCSSA bit") 16a7fe3728a8b832 ("KVM/VMX: Allow exposing EDECCSSA user leaf function to KVM guest") 80e4c1cd42fff110 ("x86/retbleed: Add X86_FEATURE_CALL_DEPTH") 7df548840c496b01 ("x86/bugs: Add "unknown" reporting for MMIO Stale Data") This only causes these perf files to be rebuilt: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Cc: Adrian Hunter Cc: Borislav Petkov Cc: Chang S. Bae Cc: Dave Hansen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiaxi Chen Cc: Jiri Olsa Cc: Kai Huang Cc: Namhyung Kim Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lore.kernel.org/lkml/Y6CD%2FIcEbDW5X%2FpN@kernel.org/ Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cpufeatures.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 6c3e8955d4bd9811a6e1761eea412a14fb51a2e6 Author: Pavel Begunkov Date: Mon Dec 19 15:11:40 2022 +0000 io_uring/net: fix cleanup after recycle Don't access io_async_msghdr io_netmsg_recycle(), it may be reallocated. Cc: stable@vger.kernel.org Fixes: 9bb66906f23e5 ("io_uring: support multishot in recvmsg") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9e326f4ad4046ddadf15bf34bf3fa58c6372f6b5.1671461985.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bc1d0e2c16736a75f73a94d3a73370801a6ceb2 Author: Arnaldo Carvalho de Melo Date: Mon Dec 19 12:21:58 2022 -0300 tools headers disabled-cpufeatures: Sync with the kernel sources To pick the changes from: 15e15d64bd8e12d8 ("x86/cpufeatures: Add X86_FEATURE_XENPV to disabled-features.h") This only causes these perf files to be rebuilt: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h' diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h Cc: Hunter Cc: Borislav Petkov Cc: Ian Rogers Cc: Jiri Olsa Cc: Juergen Gross Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/Y6B2w3WqifB%2FV70T@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/disabled-features.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 30d647f5ba9ebefa153ad2bc3f05e3a7c7d90d1c Merge: 66dfc517e8ec aeba12b26c79 Author: Arnaldo Carvalho de Melo Date: Mon Dec 19 12:27:25 2022 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo commit 66dfc517e8ec530b1d8d4776c05e3f264f38ecb8 Author: Arnaldo Carvalho de Melo Date: Sat Dec 17 11:37:15 2022 -0300 perf python: Don't stop building if python setuptools isn't installed The python3-setuptools package is needed to build the python binding, so that one can use things like: # ~acme/git/perf/tools/perf/python/twatch.py cpu: 6, pid: 4573, tid: 2184618 { type: exit, pid: 4573, ppid: 4172, tid: 2184618, ptid: 4172, time: 12563190090107} cpu: 24, pid: 4573, tid: 4573 { type: fork, pid: 4573, ppid: 4573, tid: 2190991, ptid: 4573, time: 12563415289331} cpu: 29, pid: 4573, tid: 2190991 { type: comm, pid: 4573, tid: 2190991, comm: StreamT~ns #401 } cpu: 29, pid: 4573, tid: 2190991 { type: comm, pid: 4573, tid: 2190991, comm: StreamT~ns #401 } ^CTraceback (most recent call last): File "/var/home/acme/git/perf/tools/perf/python/twatch.py", line 61, in main() File "/var/home/acme/git/perf/tools/perf/python/twatch.py", line 33, in main evlist.poll(timeout = -1) KeyboardInterrupt # That have 'import perf;'. But distros don't always have that python3-setuptools (or equivalent) installed, which was breaking the build. Just check if it is installed and emit a warning that such binding isn't being built and continue the build without it: With it: $ rpm -q python3-setuptools python3-setuptools-59.6.0-3.fc36.noarch $ rm -rf /tmp/build/perf; mkdir -p /tmp/build/perf $ make O=/tmp/build/perf -C tools/perf install-bin make: Entering directory '/var/home/acme/git/perf/tools/perf' ... libpython: [ on ] GEN /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so $ ls -la /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so -rwxr-xr-x. 1 acme acme 1609112 Dec 17 11:39 /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so $ Without it: $ sudo rpm -e python3-setuptools $ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf $ make O=/tmp/build/perf -C tools/perf install-bin make: Entering directory '/var/home/acme/git/perf/tools/perf' ... libpython: [ on ] $ ls -la /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so ls: cannot access '/tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so': No such file or directory $ Reported-by: Linus Torvalds Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/Y53XHw3rlsaaUgOs@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit aeba12b26c79fc35e07e511f692a8907037d95da Merge: acd04af6e476 75333d48f922 Author: Linus Torvalds Date: Mon Dec 19 09:10:33 2022 -0600 Merge tag 'nfsd-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull more nfsd updates from Chuck Lever: "This contains a number of crasher fixes that were not ready for the initial pull request last week. In particular, Jeff's patch attempts to address reference count underflows in NFSD's filecache, which have been very difficult to track down because there is no reliable reproducer. Common failure modes: https://bugzilla.kernel.org/show_bug.cgi?id=216691#c11 https://bugzilla.kernel.org/show_bug.cgi?id=216674#c6 https://bugzilla.redhat.com/show_bug.cgi?id=2138605 The race windows were found by inspection and the clean-ups appear sensible and pass regression testing, so we include them here in the hope that they address the problem. However we remain vigilant because we don't have 100% certainty yet that the problem is fully addressed. Summary: - Address numerous reports of refcount underflows in NFSD's filecache - Address a UAF in callback setup error handling - Address a UAF during server-to-server copy" * tag 'nfsd-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: NFSD: fix use-after-free in __nfs42_ssc_open() nfsd: under NFSv4.1, fix double svc_xprt_put on rpc_create failure nfsd: rework refcounting in filecache commit 4934fbfb3ff09b8500f63d4624ed8b41647bb822 Author: Helge Deller Date: Fri Oct 21 10:03:52 2022 +0200 parisc: Show MPE/iX model string at bootup Some (mostly 64-bit machines) machines allow to run MPE/iX and report the MPE model string via firmware call. Enhance the pdc_model_sysmodel() function to report that model string. Note that some 32-bit machines like the B160L wrongly report success for the firmware call, so include a check to prevent showing wrong info. Signed-off-by: Helge Deller arch/parisc/include/asm/pdc.h | 2 +- arch/parisc/kernel/firmware.c | 4 ++-- arch/parisc/kernel/processor.c | 9 +++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) commit f006229135b7debf4037adb1eb93e358559593db Author: Marc Kleine-Budde Date: Mon Dec 19 11:39:27 2022 +0100 can: kvaser_usb: hydra: help gcc-13 to figure out cmd_len Debian's gcc-13 [1] throws the following error in kvaser_usb_hydra_cmd_size(): [1] gcc version 13.0.0 20221214 (experimental) [master r13-4693-g512098a3316] (Debian 13-20221214-1) | drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c:502:65: error: | array subscript ‘struct kvaser_cmd_ext[0]’ is partly outside array | bounds of ‘unsigned char[32]’ [-Werror=array-bounds=] | 502 | ret = le16_to_cpu(((struct kvaser_cmd_ext *)cmd)->len); kvaser_usb_hydra_cmd_size() returns the size of given command. It depends on the command number (cmd->header.cmd_no). For extended commands (cmd->header.cmd_no == CMD_EXTENDED) the above shown code is executed. Help gcc to recognize that this code path is not taken in all cases, by calling kvaser_usb_hydra_cmd_size() directly after assigning the command number. Fixes: aec5fb2268b7 ("can: kvaser_usb: Add support for Kvaser USB hydra family") Cc: Jimmy Assarsson Cc: Anssi Hannula Link: https://lore.kernel.org/all/20221219110104.1073881-1-mkl@pengutronix.de Tested-by: Jimmy Assarsson Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 33 ++++++++++++++++------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 3bc2afcba81275306adfbfca83f38a52858c5940 Author: Haibo Chen Date: Tue Dec 13 17:43:51 2022 +0800 can: flexcan: avoid unbalanced pm_runtime_enable warning When do suspend/resume, meet the following warning message: [ 30.028336] flexcan 425b0000.can: Unbalanced pm_runtime_enable! Balance the pm_runtime_force_suspend() and pm_runtime_force_resume(). Fixes: 8cb53b485f18 ("can: flexcan: add auto stop mode for IMX93 to support wakeup") Signed-off-by: Haibo Chen Link: https://lore.kernel.org/all/20221213094351.3023858-1-haibo.chen@nxp.com Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan/flexcan-core.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 115dd5469019296040359060743de77071ccb6ec Author: Vincent Mailhol Date: Tue Dec 13 14:11:36 2022 +0900 Documentation: devlink: add missing toc entry for etas_es58x devlink doc toc entry is missing for etas_es58x devlink doc and triggers this warning: Documentation/networking/devlink/etas_es58x.rst: WARNING: document isn't included in any toctree Add the missing toc entry. Fixes: 9f63f96aac92 ("Documentation: devlink: add devlink documentation for the etas_es58x driver") Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20221213051136.721887-1-mailhol.vincent@wanadoo.fr Reported-by: Stephen Rothwell Reported-by: kernel test robot Signed-off-by: Marc Kleine-Budde Documentation/networking/devlink/index.rst | 1 + 1 file changed, 1 insertion(+) commit acd04af6e4765bdc322adab3bf72e249b8b65457 Merge: 9322af3e6aea e88f319a2546 Author: Linus Torvalds Date: Mon Dec 19 09:00:00 2022 -0600 Merge tag 'rtc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Most of the changes are a rework of the cmos driver by Rafael and fixes for issues found using static checkers. The removal of a driver leads to a reduction of the number of LOC of the subsystem. Removed driver: - davinci Updates: - convert i2c drivers to .probe_new - fix spelling mistakes and duplicated words in comments - cmos: rework wake setup and ACPI event handling - cros-ec: Limit RTC alarm range to fix alarmtimer - ds1347: fix century register handling - efi: wakeup support - isl12022: temperature sensor support - pcf85063: fix read_alarm and clkout - pcf8523: use stop bit to detect invalid time - pcf8563: use RTC_FEATURE_ALARM - snvs: be more flexible on LPSRT reads - many static checker fixes" * tag 'rtc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (48 commits) rtc: ds1742: use devm_platform_get_and_ioremap_resource() rtc: mxc_v2: Add missing clk_disable_unprepare() rtc: rs5c313: correct some spelling mistakes rtc: at91rm9200: Fix syntax errors in comments rtc: remove duplicated words in comments rtc: rv3028: Use IRQ flags obtained from device tree if available rtc: ds1307: use sysfs_emit() to instead of scnprintf() rtc: isl12026: drop obsolete dependency on COMPILE_TEST dt-bindings: rtc: m41t80: Convert text schema to YAML one rtc: pcf85063: fix pcf85063_clkout_control rtc: rx6110: fix warning with !OF rtc: rk808: reduce 'struct rk808' usage rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe() dt-bindings: rtc: convert rtc-meson.txt to dt-schema rtc: pic32: Move devm_rtc_allocate_device earlier in pic32_rtc_probe() rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe() rtc: pcf85063: Fix reading alarm rtc: pcf8523: fix for stop bit rtc: efi: Add wakeup support rtc: pcf8563: clear RTC_FEATURE_ALARM if no irq ... commit 9322af3e6aeae04c7eda3e6a0c977e97a13cf6ed Merge: 1b6a349a40b9 25483dedd2f5 Author: Linus Torvalds Date: Mon Dec 19 08:54:17 2022 -0600 Merge tag 'dmaengine-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "New support: - Qualcomm SDM670, SM6115 and SM6375 GPI controller support - Ingenic JZ4755 dmaengine support - Removal of iop-adma driver Updates: - Tegra support for dma-channel-mask - at_hdmac cleanup and virt-chan support for this driver" * tag 'dmaengine-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (46 commits) dmaengine: Revert "dmaengine: remove s3c24xx driver" dmaengine: tegra: Add support for dma-channel-mask dt-bindings: dmaengine: Add dma-channel-mask to Tegra GPCDMA dmaengine: idxd: Remove linux/msi.h include dt-bindings: dmaengine: qcom: gpi: add compatible for SM6375 dmaengine: idxd: Fix crc_val field for completion record dmaengine: at_hdmac: Convert driver to use virt-dma dmaengine: at_hdmac: Remove unused member of at_dma_chan dmaengine: at_hdmac: Rename "chan_common" to "dma_chan" dmaengine: at_hdmac: Rename "dma_common" to "dma_device" dmaengine: at_hdmac: Use bitfield access macros dmaengine: at_hdmac: Keep register definitions and structures private to at_hdmac.c dmaengine: at_hdmac: Set include entries in alphabetic order dmaengine: at_hdmac: Use pm_ptr() dmaengine: at_hdmac: Use devm_clk_get() dmaengine: at_hdmac: Use devm_platform_ioremap_resource dmaengine: at_hdmac: Use devm_kzalloc() and struct_size() dmaengine: at_hdmac: Introduce atc_get_llis_residue() dmaengine: at_hdmac: s/atc_get_bytes_left/atc_get_residue dmaengine: at_hdmac: Pass residue by address to avoid unnecessary implicit casts ... commit 1b6a349a40b9dc5fc510c856080e468e3782e5a9 Merge: e79041113b19 7cbf00bd4142 Author: Linus Torvalds Date: Mon Dec 19 08:47:33 2022 -0600 Merge tag 'soundwire-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire updates from Vinod Koul: "This include bunch of Intel driver code reorganization and support for qcom v1.7.0 controller: - intel: reorganization of hw_ops callbacks, splitting files etc - qcom: support for v1.7.0 qcom controllers" * tag 'soundwire-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: intel: split auxdevice to different file soundwire: intel: add in-band wake callbacks in hw_ops soundwire: intel: add link power management callbacks in hw_ops soundwire: intel: add bus management callbacks in hw_ops soundwire: intel: add register_dai callback in hw_ops soundwire: intel: add debugfs callbacks in hw_ops soundwire: intel: start using hw_ops dt-bindings: soundwire: Convert text bindings to DT Schema soundwire: cadence: use dai_runtime_array instead of dma_data soundwire: cadence: rename sdw_cdns_dai_dma_data as sdw_cdns_dai_runtime soundwire: qcom: add support for v1.7 Soundwire Controller dt-bindings: soundwire: qcom: add v1.7.0 support soundwire: qcom: make reset optional for v1.6 controller soundwire: qcom: remove unused SWRM_SPECIAL_CMD_ID soundwire: dmi-quirks: add quirk variant for LAPBC710 NUC15 commit e79041113b19b8c7b8410d862d4a3630debded58 Merge: b8fd76f41820 bea3ce759b46 Author: Linus Torvalds Date: Mon Dec 19 08:40:58 2022 -0600 Merge tag 'phy-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy updates from Vinod Koul: "This tme we have again a big pile of qcom-qmp-* changes, one new driver and bunch of new hardware support. New hardware support: - Allwinner H616 USB PHY and A100 DPHY support - TI J721s2, J784s4 and J721e support - Freescale i.MX8MP PCIe PHY support - New driver for Renesas Ethernet SERDES supporting R-Car S4-8 - Qualcomm SM8450 PCIe1 PHY support in EP mode - Qualcomm SC8280XP PCIe PHY support (including x4 mode) - Fixed Qualcomm SC8280XP USB4-USB3-DP PHY DT bindings Updates: - A big pile of updates on qcom-qmp-* drivers following the driver split and reorganization merged earlier - Phy order of API calls documentation update" * tag 'phy-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (174 commits) phy: ti: phy-j721e-wiz: add j721s2-wiz-10g module support dt-bindings: phy-j721e-wiz: add j721s2 compatible string phy: use devm_platform_get_and_ioremap_resource() phy: allwinner: phy-sun6i-mipi-dphy: Add the A100 DPHY variant phy: allwinner: phy-sun6i-mipi-dphy: Add a variant power-on hook phy: allwinner: phy-sun6i-mipi-dphy: Set the enable bit last phy: allwinner: phy-sun6i-mipi-dphy: Make RX support optional dt-bindings: sun6i-a31-mipi-dphy: Add the A100 DPHY variant dt-bindings: sun6i-a31-mipi-dphy: Add the interrupts property phy: qcom-qmp-pcie: drop redundant clock allocation phy: qcom-qmp-usb: drop redundant clock allocation phy: qcom-qmp: drop unused type header phy: qcom-qmp-usb: drop sc8280xp reference-clock source dt-bindings: phy: qcom,sc8280xp-qmp-usb3-uni: drop reference-clock source phy: qcom-qmp-combo: add support for updated sc8280xp binding phy: qcom-qmp-combo: rename DP_PHY register pointer phy: qcom-qmp-combo: rename common-register pointers phy: qcom-qmp-combo: clean up DP clock callbacks phy: qcom-qmp-combo: separate clock and provider registration phy: qcom-qmp-combo: add clock registration helper ... commit 990a4de57e44f4f4cfc33c90d2ec5d285b7c8342 Author: Jens Axboe Date: Mon Dec 19 07:28:26 2022 -0700 io_uring/net: ensure compat import handlers clear free_iov If we're not allocating the vectors because the count is below UIO_FASTIOV, we still do need to properly clear ->free_iov to prevent an erronous free of on-stack data. Reported-by: Jiri Slaby Fixes: 4c17a496a7a0 ("io_uring/net: fix cleanup double free free_iov init") Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe io_uring/net.c | 1 + 1 file changed, 1 insertion(+) commit b8fd76f41820951d8a6e2521c25f54afadf338bd Merge: 2f26e424552e e3eca2e4f648 Author: Linus Torvalds Date: Mon Dec 19 08:34:39 2022 -0600 Merge tag 'iommu-updates-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: "Core code: - map/unmap_pages() cleanup - SVA and IOPF refactoring - Clean up and document return codes from device/domain attachment AMD driver: - Rework and extend parsing code for ivrs_ioapic, ivrs_hpet and ivrs_acpihid command line options - Some smaller cleanups Intel driver: - Blocking domain support - Cleanups S390 driver: - Fixes and improvements for attach and aperture handling PAMU driver: - Resource leak fix and cleanup Rockchip driver: - Page table permission bit fix Mediatek driver: - Improve safety from invalid dts input - Smaller fixes and improvements Exynos driver: - Fix driver initialization sequence Sun50i driver: - Remove IOMMU_DOMAIN_IDENTITY as it has not been working forever - Various other fixes" * tag 'iommu-updates-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (74 commits) iommu/mediatek: Fix forever loop in error handling iommu/mediatek: Fix crash on isr after kexec() iommu/sun50i: Remove IOMMU_DOMAIN_IDENTITY iommu/amd: Fix typo in macro parameter name iommu/mediatek: Remove unused "mapping" member from mtk_iommu_data iommu/mediatek: Improve safety for mediatek,smi property in larb nodes iommu/mediatek: Validate number of phandles associated with "mediatek,larbs" iommu/mediatek: Add error path for loop of mm_dts_parse iommu/mediatek: Use component_match_add iommu/mediatek: Add platform_device_put for recovering the device refcnt iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe() iommu/vt-d: Use real field for indication of first level iommu/vt-d: Remove unnecessary domain_context_mapped() iommu/vt-d: Rename domain_add_dev_info() iommu/vt-d: Rename iommu_disable_dev_iotlb() iommu/vt-d: Add blocking domain support iommu/vt-d: Add device_block_translation() helper iommu/vt-d: Allocate pasid table in device probe path iommu/amd: Check return value of mmu_notifier_register() iommu/amd: Fix pci device refcount leak in ppr_notifier() ... commit 2f26e424552efd50722f4cf61f7f080373adbb1e Merge: 96bab5b926e4 5535f4f70cfc Author: Linus Torvalds Date: Mon Dec 19 08:23:27 2022 -0600 Merge tag 'loongarch-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch updates from Huacai Chen: - Switch to relative exception tables - Add unaligned access support - Add alternative runtime patching mechanism - Add FDT booting support from efi system table - Add suspend/hibernation (ACPI S3/S4) support - Add basic STACKPROTECTOR support - Add ftrace (function tracer) support - Update the default config file * tag 'loongarch-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: (24 commits) LoongArch: Update Loongson-3 default config file LoongArch: modules/ftrace: Initialize PLT at load time LoongArch/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support LoongArch/ftrace: Add HAVE_DYNAMIC_FTRACE_WITH_ARGS support LoongArch/ftrace: Add HAVE_DYNAMIC_FTRACE_WITH_REGS support LoongArch/ftrace: Add dynamic function graph tracer support LoongArch/ftrace: Add dynamic function tracer support LoongArch/ftrace: Add recordmcount support LoongArch/ftrace: Add basic support LoongArch: module: Use got/plt section indices for relocations LoongArch: Add basic STACKPROTECTOR support LoongArch: Add hibernation (ACPI S4) support LoongArch: Add suspend (ACPI S3) support LoongArch: Add processing ISA Node in DeviceTree LoongArch: Add FDT booting support from efi system table LoongArch: Use alternative to optimize libraries LoongArch: Add alternative runtime patching mechanism LoongArch: Add unaligned access support LoongArch: BPF: Add BPF exception tables LoongArch: Remove the .fixup section usage ... commit aacfc939cc42293fbcfe113040b4e8abaef68429 Author: Steve French Date: Thu Dec 15 20:03:17 2022 -0600 cifs: update internal module number To 2.41 Signed-off-by: Steve French fs/cifs/cifsfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f60ffa662d1427cfd31fe9d895c3566ac50bfe52 Author: Paulo Alcantara Date: Mon Dec 19 10:21:50 2022 -0300 cifs: don't leak -ENOMEM in smb2_open_file() A NULL error response might be a valid case where smb2_reconnect() failed to reconnect the session and tcon due to a disconnected server prior to issuing the I/O operation, so don't leak -ENOMEM to userspace on such occasions. Fixes: 76894f3e2f71 ("cifs: improve symlink handling for smb2+") Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/smb2file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ad54b98fc1f141cfb70cfe2a3d6def5a85169ff Author: Paulo Alcantara Date: Sun Dec 18 14:37:32 2022 -0300 cifs: use origin fullpath for automounts Use TCP_Server_Info::origin_fullpath instead of cifs_tcon::tree_name when building source paths for automounts as it will be useful for domain-based DFS referrals where the connections and referrals would get either re-used from the cache or re-created when chasing the dfs link. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifs_dfs_ref.c | 24 ++++++++++++++++++++---- fs/cifs/cifsproto.h | 3 +++ fs/cifs/dfs.h | 15 +++++++++++++++ fs/cifs/dir.c | 21 +++++++++++++++------ 4 files changed, 53 insertions(+), 10 deletions(-) commit 25cf01b7c9200d6ace5a59125d8166435dd9dea7 Author: Paulo Alcantara Date: Sat Dec 17 21:04:14 2022 -0300 cifs: set correct status of tcon ipc when reconnecting The status of tcon ipcs were not being set to TID_NEED_RECO when marking sessions and tcons to be reconnected, therefore not sending tree connect to those ipcs in cifs_tree_connect() and leaving them disconnected. Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/connect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6fbdd5ab240443e3f8574eb9d407d03daace1ddc Author: Paulo Alcantara Date: Sat Dec 17 00:46:11 2022 -0300 cifs: optimize reconnect of nested links There is no point going all the way back to the original dfs full path if reconnect of tcon did not finish due a nested link found as newly resolved target for the current referral. So, just mark current server for reconnect as we already set @current_fullpath to the new dfs referral in update_server_fullpath(). Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/dfs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 466611e4af8252dce253cfaebdc7b0019acdbe7e Author: Paulo Alcantara Date: Fri Dec 16 23:25:38 2022 -0300 cifs: fix source pathname comparison of dfs supers We store the TCP_Server_Info::origin_fullpath path canonicalised (e.g. with '\\' path separators), so ignore separators when comparing it with smb3_fs_context::source. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/connect.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit a85ceafd41927e41a4103d228a993df7edd8823b Author: Paulo Alcantara Date: Fri Dec 16 22:03:41 2022 -0300 cifs: fix confusing debug message Since rc was initialised to -ENOMEM in cifs_get_smb_ses(), when an existing smb session was found, free_xid() would be called and then print CIFS: fs/cifs/connect.c: Existing tcp session with server found CIFS: fs/cifs/connect.c: VFS: in cifs_get_smb_ses as Xid: 44 with uid: 0 CIFS: fs/cifs/connect.c: Existing smb sess found (status=1) CIFS: fs/cifs/connect.c: VFS: leaving cifs_get_smb_ses (xid = 44) rc = -12 Fix this by initialising rc to 0 and then let free_xid() print this instead CIFS: fs/cifs/connect.c: Existing tcp session with server found CIFS: fs/cifs/connect.c: VFS: in cifs_get_smb_ses as Xid: 14 with uid: 0 CIFS: fs/cifs/connect.c: Existing smb sess found (status=1) CIFS: fs/cifs/connect.c: VFS: leaving cifs_get_smb_ses (xid = 14) rc = 0 Signed-off-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Signed-off-by: Steve French fs/cifs/connect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1d04a6fe75eef16dd1816b112edb4406fd1fbffd Author: Paulo Alcantara Date: Fri Dec 16 21:41:31 2022 -0300 cifs: don't block in dfs_cache_noreq_update_tgthint() Avoid blocking in dfs_cache_noreq_update_tgthint() while reconnecting servers or tcons as the cache refresh worker or new mounts might already be updating their targets. Move some more dfs related code out of connect.c while at it. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/connect.c | 264 +--------------------------------------------------- fs/cifs/dfs.c | 259 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/dfs_cache.c | 18 ++-- fs/cifs/dfs_cache.h | 2 +- 4 files changed, 269 insertions(+), 274 deletions(-) commit 8332858569a096cff02e157555d839e0be921ec7 Author: Paulo Alcantara Date: Tue Dec 13 11:30:30 2022 -0300 cifs: refresh root referrals Also refresh cached root referrals so the other cached referrals may have a better chance to have a working root server to issue the referrals on. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/dfs_cache.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) commit 6916881f443f67f6893b504fa2171468c8aed915 Author: Paulo Alcantara Date: Tue Dec 13 01:23:16 2022 -0300 cifs: fix refresh of cached referrals We can't rely on cifs_tcon::ses to refresh cached referral as the server target might not respond to referrals, e.g. share is not hosted in a DFS root server. Consider the following mount //dom/dfs/link -> /root1/dfs/link -> /fs0/share where fs0 can't get a referral for "/root1/dfs/link". To simplify and fix the access of dfs root sessions, store the dfs root session pointer directly to new sessions so making it easier to select the appropriate ipc connection and use it for failover or cache refresh. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifsglob.h | 3 ++ fs/cifs/connect.c | 5 +- fs/cifs/dfs.c | 6 +++ fs/cifs/dfs_cache.c | 140 ++++++++++------------------------------------------ 4 files changed, 37 insertions(+), 117 deletions(-) commit cb3f6d8764529c33269c3478c17641cb097a615b Author: Paulo Alcantara Date: Tue Dec 13 00:29:22 2022 -0300 cifs: don't refresh cached referrals from unactive mounts There is no point refreshing cached referrals from unactive mounts as they will no longer be used and new mounts will either create or refresh them anyway. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/dfs_cache.c | 73 +---------------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) commit a1c0d00572fca4adcb40e1fbd3acd481fc75e20b Author: Paulo Alcantara Date: Thu Nov 17 13:23:49 2022 -0300 cifs: share dfs connections and supers When matching DFS superblocks we can't rely on either the server's address or tcon's UNC name from mount(2) as the existing servers and tcons might be connected to somewhere else. Instead, check if superblock is dfs, and if so, match its original source pathname with the new mount's source pathname. For DFS connections, instead of checking server's address, match its referral path as it could be connected to different targets. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifs_debug.c | 8 + fs/cifs/cifsglob.h | 5 - fs/cifs/cifsproto.h | 2 + fs/cifs/connect.c | 417 ++++++++------------------------------------------- fs/cifs/dfs.c | 226 ++++++++++++++++++++++++++++ fs/cifs/dfs.h | 15 ++ fs/cifs/dfs_cache.c | 14 +- fs/cifs/fs_context.c | 4 + fs/cifs/fs_context.h | 1 + 9 files changed, 323 insertions(+), 369 deletions(-) commit a73a26d97eca082fe13c964e5541543c1e78dc55 Author: Paulo Alcantara Date: Tue Oct 11 18:16:07 2022 -0300 cifs: split out ses and tcon retrieval from mount_get_conns() Introduce and export two helpers for getting session and tcon during mount(2). Those will be used by dfs when retrieving sessions and tcons separately while chasing referrals. Besides, export cifs_mount_ctx structure as it will be used by dfs code as well. No functional changes. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifsglob.h | 14 ++++++++ fs/cifs/cifsproto.h | 2 ++ fs/cifs/connect.c | 101 ++++++++++++++++++++++++++++++++-------------------- 3 files changed, 78 insertions(+), 39 deletions(-) commit 6d740164d8903e6a0e98c30f80fac6af19ce0a21 Author: Paulo Alcantara Date: Tue Oct 4 18:41:36 2022 -0300 cifs: set resolved ip in sockaddr All callers from dns_resolve_server_name_to_ip() used to convert the ip addr string back to sockaddr, so do that inside dns_resolve_server_name_to_ip() and avoid duplicating code. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/connect.c | 28 ++++++++++++---------------- fs/cifs/dfs.c | 24 +----------------------- fs/cifs/dfs_cache.c | 17 +++++------------ fs/cifs/dns_resolve.c | 49 ++++++++++++++++++++++++------------------------- fs/cifs/dns_resolve.h | 4 +++- fs/cifs/misc.c | 36 ++++++++++-------------------------- 6 files changed, 55 insertions(+), 103 deletions(-) commit 2301bc103ac4acb6d6b6e5860eeed448c4ba2df0 Author: Paulo Alcantara Date: Tue Oct 4 18:41:31 2022 -0300 cifs: remove unused smb3_fs_context::mount_options Just remove it as it's no longer used during mount. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/fs_context.c | 9 --------- fs/cifs/fs_context.h | 2 -- 2 files changed, 11 deletions(-) commit abdb1742a312388651f04ca04e6e2ec2b0af5288 Author: Paulo Alcantara Date: Tue Oct 4 18:41:27 2022 -0300 cifs: get rid of mount options string parsing After switching to filesystem context support, we no longer need to handle mount options string when chasing dfs referrals. Now, we set the new values directly into smb3_fs_context. Start working on a separate source file to handle most dfs related mount functions as connect.c has already became too big. The remaining functions will be moved gradually in follow-up patches. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/Makefile | 2 +- fs/cifs/cifs_dfs_ref.c | 141 +------------------------------------------------ fs/cifs/cifsfs.c | 6 --- fs/cifs/cifsproto.h | 7 +-- fs/cifs/connect.c | 100 +++-------------------------------- fs/cifs/dfs.c | 76 ++++++++++++++++++++++++++ fs/cifs/dfs.h | 16 ++++++ 7 files changed, 101 insertions(+), 247 deletions(-) commit 9fd29a5bae6e8f94b410374099a6fddb253d2d5f Author: Paulo Alcantara Date: Tue Oct 4 18:41:20 2022 -0300 cifs: use fs_context for automounts Use filesystem context support to handle dfs links. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifs_dfs_ref.c | 100 ++++++++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 60 deletions(-) commit c877ce47e1378dbafa6f1bf84c0c83a05ca8972a Author: Paulo Alcantara Date: Mon Dec 12 23:39:37 2022 -0300 cifs: reduce roundtrips on create/qinfo requests To work around some Window servers that return STATUS_OBJECT_NAME_INVALID on query infos under DFS namespaces that contain non-ASCII characters, we started checking for -ENOENT on every file open, and if so, then send additional requests to figure out whether it is a DFS link or not. It means that all those requests will be sent to every non-existing file. So, in order to reduce the number of roundtrips, check earlier whether status code is STATUS_OBJECT_NAME_INVALID and tcon supports dfs, and if so, then map -ENOENT to -EREMOTE so mount or automount will take care of chasing the DFS link -- if it isn't an DFS link, then -ENOENT will be returned appropriately. Before patch SMB2 438 Create Request File: ada.test\dfs\foo;GetInfo Request... SMB2 310 Create Response, Error: STATUS_OBJECT_NAME_NOT_FOUND;... SMB2 228 Ioctl Request FSCTL_DFS_GET_REFERRALS, File: \ada.test\dfs\foo SMB2 143 Ioctl Response, Error: STATUS_OBJECT_PATH_NOT_FOUND SMB2 438 Create Request File: ada.test\dfs\foo;GetInfo Request... SMB2 310 Create Response, Error: STATUS_OBJECT_NAME_NOT_FOUND;... SMB2 228 Ioctl Request FSCTL_DFS_GET_REFERRALS, File: \ada.test\dfs\foo SMB2 143 Ioctl Response, Error: STATUS_OBJECT_PATH_NOT_FOUND After patch SMB2 438 Create Request File: ada.test\dfs\foo;GetInfo Request... SMB2 310 Create Response, Error: STATUS_OBJECT_NAME_NOT_FOUND;... SMB2 438 Create Request File: ada.test\dfs\foo;GetInfo Request... SMB2 310 Create Response, Error: STATUS_OBJECT_NAME_NOT_FOUND;... Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/connect.c | 16 ---------------- fs/cifs/inode.c | 6 ------ fs/cifs/misc.c | 45 --------------------------------------------- fs/cifs/smb2inode.c | 46 +++++++++++++++++++++++++++++++++------------- fs/cifs/smb2ops.c | 28 ++++++++++++++++++++++++---- 5 files changed, 57 insertions(+), 84 deletions(-) commit 96bab5b926e4c2d970f70495f4554f905babd09d Merge: 5f6e430f931d 7e2004906fb5 Author: Linus Torvalds Date: Mon Dec 19 07:51:30 2022 -0600 Merge tag 'csky-for-linus-6.2-rc1' of https://github.com/c-sky/csky-linux Pull arch/csky updates from Guo Ren: - Revert rseq support - it wasn't ready - Add current_stack_pointer support - Typo fixup * tag 'csky-for-linus-6.2-rc1' of https://github.com/c-sky/csky-linux: Revert "csky: Add support for restartable sequence" Revert "csky: Fixup CONFIG_DEBUG_RSEQ" csky: Kconfig: Fix spelling mistake "Meory" -> "Memory" csky: add arch support current_stack_pointer commit 5f6e430f931d245da838db3e10e918681207029b Merge: a6e3e6f13805 980411a4d1bb Author: Linus Torvalds Date: Mon Dec 19 07:13:33 2022 -0600 Merge tag 'powerpc-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - Add powerpc qspinlock implementation optimised for large system scalability and paravirt. See the merge message for more details - Enable objtool to be built on powerpc to generate mcount locations - Use a temporary mm for code patching with the Radix MMU, so the writable mapping is restricted to the patching CPU - Add an option to build the 64-bit big-endian kernel with the ELFv2 ABI - Sanitise user registers on interrupt entry on 64-bit Book3S - Many other small features and fixes Thanks to Aboorva Devarajan, Angel Iglesias, Benjamin Gray, Bjorn Helgaas, Bo Liu, Chen Lifu, Christoph Hellwig, Christophe JAILLET, Christophe Leroy, Christopher M. Riedl, Colin Ian King, Deming Wang, Disha Goel, Dmitry Torokhov, Finn Thain, Geert Uytterhoeven, Gustavo A. R. Silva, Haowen Bai, Joel Stanley, Jordan Niethe, Julia Lawall, Kajol Jain, Laurent Dufour, Li zeming, Miaoqian Lin, Michael Jeanson, Nathan Lynch, Naveen N. Rao, Nayna Jain, Nicholas Miehlbradt, Nicholas Piggin, Pali Rohár, Randy Dunlap, Rohan McLure, Russell Currey, Sathvika Vasireddy, Shaomin Deng, Stephen Kitt, Stephen Rothwell, Thomas Weißschuh, Tiezhu Yang, Uwe Kleine-König, Xie Shaowen, Xiu Jianfeng, XueBing Chen, Yang Yingliang, Zhang Jiaming, ruanjinjie, Jessica Yu, and Wolfram Sang. * tag 'powerpc-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (181 commits) powerpc/code-patching: Fix oops with DEBUG_VM enabled powerpc/qspinlock: Fix 32-bit build powerpc/prom: Fix 32-bit build powerpc/rtas: mandate RTAS syscall filtering powerpc/rtas: define pr_fmt and convert printk call sites powerpc/rtas: clean up includes powerpc/rtas: clean up rtas_error_log_max initialization powerpc/pseries/eeh: use correct API for error log size powerpc/rtas: avoid scheduling in rtas_os_term() powerpc/rtas: avoid device tree lookups in rtas_os_term() powerpc/rtasd: use correct OF API for event scan rate powerpc/rtas: document rtas_call() powerpc/pseries: unregister VPA when hot unplugging a CPU powerpc/pseries: reset the RCU watchdogs after a LPM powerpc: Take in account addition CPU node when building kexec FDT powerpc: export the CPU node count powerpc/cpuidle: Set CPUIDLE_FLAG_POLLING for snooze state powerpc/dts/fsl: Fix pca954x i2c-mux node names cxl: Remove unnecessary cxl_pci_window_alignment() selftests/powerpc: Fix resource leaks ... commit a6e3e6f138058ff184d8ef5064a033b3f5fee8f8 Merge: 1ea9d333ba47 f9eeef5918bb Author: Linus Torvalds Date: Mon Dec 19 07:03:44 2022 -0600 Merge tag 'mm-nonmm-stable-2022-12-17-20-32' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull fault-injection updates from Andrew Morton: "Some fault-injection improvements from Wei Yongjun which enable stacktrace filtering on x86_64" * tag 'mm-nonmm-stable-2022-12-17-20-32' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: fault-injection: make stacktrace filter works as expected fault-injection: make some stack filter attrs more readable fault-injection: skip stacktrace filtering by default fault-injection: allow stacktrace filter for x86-64 commit 1ea9d333ba475041efe43d9d9bc32e64aea2ea2b Merge: 4f292c4de4f6 8b777594d234 Author: Linus Torvalds Date: Mon Dec 19 06:58:57 2022 -0600 Merge tag 'mm-stable-2022-12-17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull more mm updates from Andrew Morton: - A few late-breaking minor fixups - Two minor feature patches which were awkwardly dependent on mm-nonmm. I need to set up a new branch to handle such things. * tag 'mm-stable-2022-12-17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: MAINTAINERS: zram: zsmalloc: Add an additional co-maintainer mm/kmemleak: use %pK to display kernel pointers in backtrace mm: use stack_depot for recording kmemleak's backtrace maple_tree: update copyright dates for test code maple_tree: fix mas_find_rev() comment mm/gup_test: free memory allocated via kvcalloc() using kvfree() commit 2856a62762c8409e360d4fd452194c8e57ba1058 Author: Jeremy Kerr Date: Fri Dec 16 11:44:09 2022 +0800 mctp: serial: Fix starting value for frame check sequence RFC1662 defines the start state for the crc16 FCS to be 0xffff, but we're currently starting at zero. This change uses the correct start state. We're only early in the adoption for the serial binding, so there aren't yet any other users to interface to. Fixes: a0c2ccd9b5ad ("mctp: Add MCTP-over-serial transport binding") Reported-by: Harsh Tyagi Tested-by: Harsh Tyagi Signed-off-by: Jeremy Kerr Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller drivers/net/mctp/mctp-serial.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1b0c84a32e37cf85d552261005091eb695313f38 Author: Huanhuan Wang Date: Fri Dec 16 15:31:01 2022 +0100 nfp: fix unaligned io read of capabilities word The address of 32-bit extend capability is not qword aligned, and may cause exception in some arch. Fixes: 484963ce9f1e ("nfp: extend capability and control words") Signed-off-by: Huanhuan Wang Reviewed-by: Niklas Söderlund Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0c8bccd40fc1c19e1d246c39bcf79e357e1ada3 Author: Eric Dumazet Date: Fri Dec 16 16:29:17 2022 +0000 net: stream: purge sk_error_queue in sk_stream_kill_queues() Changheon Lee reported TCP socket leaks, with a nice repro. It seems we leak TCP sockets with the following sequence: 1) SOF_TIMESTAMPING_TX_ACK is enabled on the socket. Each ACK will cook an skb put in error queue, from __skb_tstamp_tx(). __skb_tstamp_tx() is using skb_clone(), unless SOF_TIMESTAMPING_OPT_TSONLY was also requested. 2) If the application is also using MSG_ZEROCOPY, then we put in the error queue cloned skbs that had a struct ubuf_info attached to them. Whenever an struct ubuf_info is allocated, sock_zerocopy_alloc() does a sock_hold(). As long as the cloned skbs are still in sk_error_queue, socket refcount is kept elevated. 3) Application closes the socket, while error queue is not empty. Since tcp_close() no longer purges the socket error queue, we might end up with a TCP socket with at least one skb in error queue keeping the socket alive forever. This bug can be (ab)used to consume all kernel memory and freeze the host. We need to purge the error queue, with proper synchronization against concurrent writers. Fixes: 24bcbe1cc69f ("net: stream: don't purge sk_error_queue in sk_stream_kill_queues()") Reported-by: Changheon Lee Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/stream.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d83b950d44d2982c0e62e3d81b0f35ab09431008 Author: Christophe JAILLET Date: Sun Dec 18 19:08:40 2022 +0100 myri10ge: Fix an error handling path in myri10ge_probe() Some memory allocated in myri10ge_probe_slices() is not released in the error handling path of myri10ge_probe(). Add the corresponding kfree(), as already done in the remove function. Fixes: 0dcffac1a329 ("myri10ge: add multislices support") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 1 + 1 file changed, 1 insertion(+) commit 10073399cb5e389ab275bd1c9df4b486a2f0c9d4 Author: Horatiu Vultur Date: Mon Dec 19 09:22:15 2022 +0100 net: microchip: vcap: Fix initialization of value and mask Fix the following smatch warning: smatch warnings: drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c:103 vcap_debugfs_show_rule_keyfield() error: uninitialized symbol 'value'. drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c:106 vcap_debugfs_show_rule_keyfield() error: uninitialized symbol 'mask'. In case the vcap field was VCAP_FIELD_U128 and the key was different than IP6_S/DIP then the value and mask were not initialized, therefore initialize them. Fixes: 610c32b2ce66 ("net: microchip: vcap: Add vcap_get_rule") Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Saeed Mahameed Signed-off-by: Horatiu Vultur Reviewed-by: Michal Swiatkowski Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 0ee29814c6be17a924761d3712eb8ad63cfe13ac Author: Roderick Colenbrander Date: Mon Dec 12 20:49:35 2022 -0800 HID: playstation: fix free of uninialized pointer for DS4 in Bluetooth. The 'buf' variable is only used in the USB (if-path) and not in the Bluetooth else-path. Since it is not set to NULL. this results in freeing an uninitialized pointer. Since the else code-path doesn't need buf, just return 0. Fixes: 2d77474a2392 ("HID: playstation: add DualShock4 bluetooth support.") Signed-off-by: Roderick Colenbrander Signed-off-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20221213044935.1775499-2-roderick.colenbrander@sony.com drivers/hid/Kconfig | 2 +- drivers/hid/hid-playstation.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 67c90d14018775556d5420382ace86521421f9ff Author: Enrik Berkhan Date: Thu Nov 3 23:27:12 2022 +0100 HID: mcp2221: don't connect hidraw The MCP2221 driver should not connect to the hidraw userspace interface, as it needs exclusive access to the chip. If you want to use /dev/hidrawX with the MCP2221, you need to avoid binding this driver to the device and use the hid generic driver instead (e.g. using udev rules). Cc: stable@vger.kernel.org Reported-by: Sven Zühlsdorf Signed-off-by: Enrik Berkhan Signed-off-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20221103222714.21566-2-Enrik.Berkhan@inka.de drivers/hid/hid-mcp2221.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 0e13e7b448005612972eae36c0f698c21d1e2f8a Author: Bastien Nocera Date: Thu Dec 15 16:44:16 2022 +0100 HID: logitech-hidpp: Guard FF init code against non-USB devices The Force Feedback code assumes that all the devices passed to it will be USB devices, but that might not be the case for emulated devices. Guard against a crash by checking the device type before poking at USB properties. Cc: stable@vger.kernel.org # v5.16+ Reported-by: Benjamin Tissoires Signed-off-by: Bastien Nocera Signed-off-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20221215154416.111704-1-hadess@hadess.net drivers/hid/hid-logitech-hidpp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 71a06f1034b91e15d3ba6b5539c7d3a2d7f13030 Author: Miquel Raynal Date: Sat Dec 17 00:57:42 2022 +0100 mac802154: Fix possible double free upon parsing error Commit 4d1c7d87030b ("mac802154: Move an skb free within the rx path") tried to simplify error handling within the receive path by moving the kfree_skb() call at the very end of the top-level function but missed one kfree_skb() called upon frame parsing error. Prevent this possible double free from happening. Fixes: 4d1c7d87030b ("mac802154: Move an skb free within the rx path") Reported-by: Dan Carpenter Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20221216235742.646134-1-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/rx.c | 1 - 1 file changed, 1 deletion(-) commit 98dbec0a0adc10d9441b6c29315406e275532eb3 Merge: 9cd3fd2054c3 31d35a02ad5b Author: David S. Miller Date: Mon Dec 19 09:51:31 2022 +0000 Merge branch 'rxrpc-fixes' David Howells says: ==================== rxrpc: Fixes for I/O thread conversion/SACK table expansion Here are some fixes for AF_RXRPC: (1) Fix missing unlock in rxrpc's sendmsg. (2) Fix (lack of) propagation of security settings to rxrpc_call. (3) Fix NULL ptr deref in rxrpc_unuse_local(). (4) Fix problem with kthread_run() not invoking the I/O thread function if the kthread gets stopped first. Possibly this should actually be fixed in the kthread code. (5) Fix locking problem as putting a peer (which may be done from RCU) may now invoke kthread_stop(). (6) Fix switched parameters in a couple of trace calls. (7) Fix I/O thread's checking for kthread stop to make sure it completes all outstanding work before returning so that calls are cleaned up. (8) Fix an uninitialised var in the new rxperf test server. (9) Fix the return value of rxrpc_new_incoming_call() so that the checks on it work correctly. The patches fix at least one syzbot bug[1] and probably some others that don't have reproducers[2][3][4]. I think it also fixes another[5], but that showed another failure during testing that was different to the original. There's also an outstanding bug in rxrpc_put_peer()[6] that is fixed by a combination of several patches in my rxrpc-next branch, but I haven't included that here. ==================== Tested-by: Marc Dionne Tested-by: kafs-testing+fedora36_64checkkafs-build-164@auristor.com Signed-off-by: David S. Miller commit 31d35a02ad5b803354fe0727686fcbace7a343fe Author: David Howells Date: Thu Dec 15 16:20:55 2022 +0000 rxrpc: Fix the return value of rxrpc_new_incoming_call() Dan Carpenter sayeth[1]: The patch 5e6ef4f1017c: "rxrpc: Make the I/O thread take over the call and local processor work" from Jan 23, 2020, leads to the following Smatch static checker warning: net/rxrpc/io_thread.c:283 rxrpc_input_packet() warn: bool is not less than zero. Fix this (for now) by changing rxrpc_new_incoming_call() to return an int with 0 or error code rather than bool. Note that the actual return value of rxrpc_input_packet() is currently ignored. I have a separate patch to clean that up. Fixes: 5e6ef4f1017c ("rxrpc: Make the I/O thread take over the call and local processor work") Reported-by: Dan Carpenter Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: http://lists.infradead.org/pipermail/linux-afs/2022-December/006123.html [1] Signed-off-by: David S. Miller net/rxrpc/ar-internal.h | 6 +++--- net/rxrpc/call_accept.c | 18 +++++++++--------- net/rxrpc/io_thread.c | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) commit 11e1706bc84f60040578056f8cef3d0139b92dda Author: David Howells Date: Thu Dec 15 16:20:46 2022 +0000 rxrpc: rxperf: Fix uninitialised variable Dan Carpenter sayeth[1]: The patch 75bfdbf2fca3: "rxrpc: Implement an in-kernel rxperf server for testing purposes" from Nov 3, 2022, leads to the following Smatch static checker warning: net/rxrpc/rxperf.c:337 rxperf_deliver_to_call() error: uninitialized symbol 'ret'. Fix this by initialising ret to 0. The value is only used for tracing purposes in the rxperf server. Fixes: 75bfdbf2fca3 ("rxrpc: Implement an in-kernel rxperf server for testing purposes") Reported-by: Dan Carpenter Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: http://lists.infradead.org/pipermail/linux-afs/2022-December/006124.html [1] Signed-off-by: David S. Miller net/rxrpc/rxperf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 743d1768a008c8eae56ead497c9ba8237b14ee81 Author: David Howells Date: Thu Dec 15 16:20:38 2022 +0000 rxrpc: Fix I/O thread stop The rxrpc I/O thread checks to see if there's any work it needs to do, and if not, checks kthread_should_stop() before scheduling, and if it should stop, breaks out of the loop and tries to clean up and exit. This can, however, race with socket destruction, wherein outstanding calls are aborted and released from the socket and then the socket unuses the local endpoint, causing kthread_stop() to be issued. The abort is deferred to the I/O thread and the event can by issued between the I/O thread checking if there's any work to be done (such as processing call aborts) and the stop being seen. This results in the I/O thread stopping processing of events whilst call cleanup events are still outstanding, leading to connections or other objects still being around and uncleaned up, which can result in assertions being triggered, e.g.: rxrpc: AF_RXRPC: Leaked client conn 00000000e8009865 {2} ------------[ cut here ]------------ kernel BUG at net/rxrpc/conn_client.c:64! Fix this by retrieving the kthread_should_stop() indication, then checking to see if there's more work to do, and going back round the loop if there is, and breaking out of the loop only if there wasn't. This was triggered by a syzbot test that produced some other symptom[1]. Fixes: a275da62e8c1 ("rxrpc: Create a per-local endpoint receive queue and I/O thread") Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/0000000000002b4a9f05ef2b616f@google.com/ [1] Signed-off-by: David S. Miller net/rxrpc/io_thread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c838f1a73d77abadb0810eff0e150ac88fef3da5 Author: David Howells Date: Thu Dec 15 16:20:30 2022 +0000 rxrpc: Fix switched parameters in peer tracing Fix the switched parameters on rxrpc_alloc_peer() and rxrpc_get_peer(). The ref argument and the why argument got mixed. Fixes: 47c810a79844 ("rxrpc: trace: Don't use __builtin_return_address for rxrpc_peer tracing") Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Signed-off-by: David S. Miller include/trace/events/rxrpc.h | 2 +- net/rxrpc/peer_object.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 608aecd16a31269485e2980898029dd01b03a73e Author: David Howells Date: Thu Dec 15 16:20:21 2022 +0000 rxrpc: Fix locking issues in rxrpc_put_peer_locked() Now that rxrpc_put_local() may call kthread_stop(), it can't be called under spinlock as it might sleep. This can cause a problem in the peer keepalive code in rxrpc as it tries to avoid dropping the peer_hash_lock from the point it needs to re-add peer->keepalive_link to going round the loop again in rxrpc_peer_keepalive_dispatch(). Fix this by just dropping the lock when we don't need it and accepting that we'll have to take it again. This code is only called about every 20s for each peer, so not very often. This allows rxrpc_put_peer_unlocked() to be removed also. If triggered, this bug produces an oops like the following, as reproduced by a syzbot reproducer for a different oops[1]: BUG: sleeping function called from invalid context at kernel/sched/completion.c:101 ... RCU nest depth: 0, expected: 0 3 locks held by kworker/u9:0/50: #0: ffff88810e74a138 ((wq_completion)krxrpcd){+.+.}-{0:0}, at: process_one_work+0x294/0x636 #1: ffff8881013a7e20 ((work_completion)(&rxnet->peer_keepalive_work)){+.+.}-{0:0}, at: process_one_work+0x294/0x636 #2: ffff88817d366390 (&rxnet->peer_hash_lock){+.+.}-{2:2}, at: rxrpc_peer_keepalive_dispatch+0x2bd/0x35f ... Call Trace: dump_stack_lvl+0x4c/0x5f __might_resched+0x2cf/0x2f2 __wait_for_common+0x87/0x1e8 kthread_stop+0x14d/0x255 rxrpc_peer_keepalive_dispatch+0x333/0x35f rxrpc_peer_keepalive_worker+0x2e9/0x449 process_one_work+0x3c1/0x636 worker_thread+0x25f/0x359 kthread+0x1a6/0x1b5 ret_from_fork+0x1f/0x30 Fixes: a275da62e8c1 ("rxrpc: Create a per-local endpoint receive queue and I/O thread") Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/0000000000002b4a9f05ef2b616f@google.com/ [1] Signed-off-by: David S. Miller net/rxrpc/ar-internal.h | 1 - net/rxrpc/peer_event.c | 10 +++++++--- net/rxrpc/peer_object.c | 19 ------------------- 3 files changed, 7 insertions(+), 23 deletions(-) commit 8fbcc83334a7b5b42b6bc1fae2458bf25eb57768 Author: David Howells Date: Thu Dec 15 16:20:13 2022 +0000 rxrpc: Fix I/O thread startup getting skipped When starting a kthread, the __kthread_create_on_node() function, as called from kthread_run(), waits for a completion to indicate that the task_struct (or failure state) of the new kernel thread is available before continuing. This does not wait, however, for the thread function to be invoked and, indeed, will skip it if kthread_stop() gets called before it gets there. If this happens, though, kthread_run() will have returned successfully, indicating that the thread was started and returning the task_struct pointer. The actual error indication is returned by kthread_stop(). Note that this is ambiguous, as the caller cannot tell whether the -EINTR error code came from kthread() or from the thread function. This was encountered in the new rxrpc I/O thread, where if the system is being pounded hard by, say, syzbot, the check of KTHREAD_SHOULD_STOP can be delayed long enough for kthread_stop() to get called when rxrpc releases a socket - and this causes an oops because the I/O thread function doesn't get started and thus doesn't remove the rxrpc_local struct from the local_endpoints list. Fix this by using a completion to wait for the thread to actually enter rxrpc_io_thread(). This makes sure the thread can't be prematurely stopped and makes sure the relied-upon cleanup is done. Fixes: a275da62e8c1 ("rxrpc: Create a per-local endpoint receive queue and I/O thread") Reported-by: syzbot+3538a6a72efa8b059c38@syzkaller.appspotmail.com Signed-off-by: David Howells cc: Marc Dionne cc: Hillf Danton Link: https://lore.kernel.org/r/000000000000229f1505ef2b6159@google.com/ Signed-off-by: David S. Miller net/rxrpc/ar-internal.h | 1 + net/rxrpc/io_thread.c | 2 ++ net/rxrpc/local_object.c | 2 ++ 3 files changed, 5 insertions(+) commit eaa02390adb03b82f04babebf0cdd233793aecf5 Author: David Howells Date: Thu Dec 15 16:20:04 2022 +0000 rxrpc: Fix NULL deref in rxrpc_unuse_local() Fix rxrpc_unuse_local() to get the debug_id *after* checking to see if local is NULL. Fixes: a2cf3264f331 ("rxrpc: Fold __rxrpc_unuse_local() into rxrpc_unuse_local()") Reported-by: syzbot+3538a6a72efa8b059c38@syzkaller.appspotmail.com Signed-off-by: David Howells Tested-by: syzbot+3538a6a72efa8b059c38@syzkaller.appspotmail.com cc: Marc Dionne cc: linux-afs@lists.infradead.org Signed-off-by: David S. Miller net/rxrpc/local_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fdb99487b0189f0ef883e353ad7484c78a8bd425 Author: David Howells Date: Thu Dec 15 16:19:56 2022 +0000 rxrpc: Fix security setting propagation Fix the propagation of the security settings from sendmsg to the rxrpc_call struct. Fixes: f3441d4125fc ("rxrpc: Copy client call parameters into rxrpc_call earlier") Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Signed-off-by: David S. Miller net/rxrpc/call_object.c | 1 + net/rxrpc/conn_client.c | 2 -- net/rxrpc/security.c | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) commit 4feb2c44629e6f9b459b41a5a60491069d346a95 Author: David Howells Date: Thu Dec 15 16:19:47 2022 +0000 rxrpc: Fix missing unlock in rxrpc_do_sendmsg() One of the error paths in rxrpc_do_sendmsg() doesn't unlock the call mutex before returning. Fix it to do this. Note that this still doesn't get rid of the checker warning: ../net/rxrpc/sendmsg.c:617:5: warning: context imbalance in 'rxrpc_do_sendmsg' - wrong count at exit I think the interplay between the socket lock and the call's user_mutex may be too complicated for checker to analyse, especially as rxrpc_new_client_call_for_sendmsg(), which it calls, returns with the call's user_mutex if successful but unconditionally drops the socket lock. Fixes: e754eba685aa ("rxrpc: Provide a cmsg to specify the amount of Tx data for a call") Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Signed-off-by: David S. Miller net/rxrpc/sendmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cd3fd2054c3b3055163accbf2f31a4426f10317 Author: Cong Wang Date: Sat Dec 17 14:17:07 2022 -0800 net_sched: reject TCF_EM_SIMPLE case for complex ematch module When TCF_EM_SIMPLE was introduced, it is supposed to be convenient for ematch implementation: https://lore.kernel.org/all/20050105110048.GO26856@postel.suug.ch/ "You don't have to, providing a 32bit data chunk without TCF_EM_SIMPLE set will simply result in allocating & copy. It's an optimization, nothing more." So if an ematch module provides ops->datalen that means it wants a complex data structure (saved in its em->data) instead of a simple u32 value. We should simply reject such a combination, otherwise this u32 could be misinterpreted as a pointer. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-and-tested-by: syzbot+4caeae4c7103813598ae@syzkaller.appspotmail.com Reported-by: Jun Nie Cc: Jamal Hadi Salim Cc: Paolo Abeni Signed-off-by: Cong Wang Acked-by: Paolo Abeni Signed-off-by: David S. Miller net/sched/ematch.c | 2 ++ 1 file changed, 2 insertions(+) commit 53c60d1004270045d63cdee91aa77c145282d7e4 Author: Abel Vesa Date: Wed Nov 16 13:34:57 2022 +0200 dt-bindings: mailbox: qcom-ipcc: Add compatible for SM8550 Document the compatible for SM8550 mailbox. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml | 1 + 1 file changed, 1 insertion(+) commit 16edcfef77147748c43c9c58ce18f59c61d1c357 Author: Ricardo Ribalda Date: Wed Nov 30 13:58:22 2022 +0100 mailbox: mtk-cmdq: Do not request irq until we are ready If the system comes from kexec() the peripheral might trigger an IRQ befoe we are ready for it. Triggering a crash due to an access to invalid memory. Signed-off-by: Ricardo Ribalda Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chun-Kuang Hu Signed-off-by: Jassi Brar drivers/mailbox/mtk-cmdq-mailbox.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit a6792a0cdef0b1c2d77920246283a72537e60e94 Author: Yang Yingliang Date: Thu Nov 10 23:08:22 2022 +0800 mailbox: zynq-ipi: fix error handling while device_register() fails If device_register() fails, it has two issues: 1. The name allocated by dev_set_name() is leaked. 2. The parent of device is not NULL, device_unregister() is called in zynqmp_ipi_free_mboxes(), it will lead a kernel crash because of removing not added device. Call put_device() to give up the reference, so the name is freed in kobject_cleanup(). Add device registered check in zynqmp_ipi_free_mboxes() to avoid null-ptr-deref. Fixes: 4981b82ba2ff ("mailbox: ZynqMP IPI mailbox controller") Signed-off-by: Yang Yingliang Signed-off-by: Jassi Brar drivers/mailbox/zynqmp-ipi-mailbox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit acabe12c6106b105ac8285d6d5ba2aeeab74fd47 Author: AngeloGioacchino Del Regno Date: Wed Nov 2 11:07:36 2022 +0100 mailbox: mtk-cmdq-mailbox: Use platform data directly instead of copying Copying platform data to struct cmdq serves to no purpose, as that data is never modified during runtime: it's worth at this point storing a pointer to gce_plat in gce and. Remove all duplicated `struct gce_plat` members from `struct gce` and reuse the platform data across the driver to save some memory. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Reviewed-by: Chun-Kuang Hu Signed-off-by: Jassi Brar drivers/mailbox/mtk-cmdq-mailbox.c | 88 +++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 49 deletions(-) commit 165b7643f2df890066b1b4e8a387888a600ca9bf Author: Yang Yingliang Date: Fri Nov 25 14:35:48 2022 +0800 mailbox: arm_mhuv2: Fix return value check in mhuv2_probe() If devm_of_iomap() fails, it returns ERR_PTR() and never return NULL, so replace NULL pointer check with IS_ERR() to fix this problem. Fixes: 5a6338cce9f4 ("mailbox: arm_mhuv2: Add driver") Signed-off-by: Yang Yingliang Acked-by: Viresh Kumar Signed-off-by: Jassi Brar drivers/mailbox/arm_mhuv2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f2b53c2956207b76c42407f3c089a2c1561a58ef Author: Elvis Wang Date: Thu Dec 1 15:13:16 2022 +0800 dt-bindings: mailbox: mediatek,gce-mailbox: add mt8188 compatible name Add mt8188 compatible name. Signed-off-by: Elvis Wang Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml | 1 + 1 file changed, 1 insertion(+) commit 359f608f66b4434fb83b74e23ad14631ea3efc4e Author: Elvis Wang Date: Thu Dec 1 15:13:15 2022 +0800 dt-bindings: mailbox: add GCE header file for mt8188 Add Global Command Engine(GCE) header file to define the GCE thread priority, GCE subsys id, event and constant for mt8188. Signed-off-by: Elvis Wang Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar include/dt-bindings/mailbox/mediatek,mt8188-gce.h | 967 ++++++++++++++++++++++ 1 file changed, 967 insertions(+) commit ab47d0bfdf88faac0eb02749e5bfaa306e004300 Author: Conor Dooley Date: Wed Nov 23 17:56:52 2022 +0000 mailbox: mpfs: read the system controller's status Some services explicitly return an error code in their response, but others rely on the system controller to set a status in its status register. The meaning of the bits varies based on what service is requested, so pass it back up to the driver that requested the service in the first place. The field in the message struct already existed, but was unused until now. If the system controller is busy, in which case we should never actually be in the interrupt handler, or if the service fails the mailbox itself should not be read. Callers should check the status before operating on the response. There's an existing, but unused, #define for the mailbox mask - but it was incorrect. It was doing a GENMASK_ULL(32, 16) which should've just been a GENMASK(31, 16), so fix that up and start using it. Fixes: 83d7b1560810 ("mbox: add polarfire soc system controller mailbox") Signed-off-by: Conor Dooley Reviewed-by: Palmer Dabbelt Signed-off-by: Jassi Brar drivers/mailbox/mailbox-mpfs.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit 926d6214f66955f0c066175127cbcf2eaae5ad6b Author: Yongqiang Niu Date: Thu Dec 15 15:28:06 2022 +0800 mailbox: mtk-cmdq: add MT8186 support add MT8186 cmdq support Signed-off-by: Yongqiang Niu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Signed-off-by: Jassi Brar drivers/mailbox/mtk-cmdq-mailbox.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7abd037aa581dcdc16c30ebdea758a4e3877f8e1 Author: Yongqiang Niu Date: Thu Dec 15 15:28:05 2022 +0800 mailbox: mtk-cmdq: add gce ddr enable support flow add gce ddr enable control flow when gce suspend/resume when all cmdq instruction task has been processed done, we need set this gce ddr enable to disable status to tell cmdq hardware gce there is none task need process, and the hardware can go into idle mode and no access ddr anymore, then the spm can go into suspend. the original issue is gce still access ddr when cmdq suspend function call, but there is no task run. so, we need control gce access ddr with this flow. when cmdq suspend function, there is no task need process, we can disable gce access ddr, to make sure system go into suspend success. Signed-off-by: Yongqiang Niu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Signed-off-by: Jassi Brar drivers/mailbox/mtk-cmdq-mailbox.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 63f40a7f5dbdb70f8574754475346a9e72ccef6c Author: Yongqiang Niu Date: Thu Dec 15 15:28:04 2022 +0800 mailbox: mtk-cmdq: add gce software ddr enable private data if gce work control by software, we need set software enable for MT8186 Soc there is a handshake flow between gce and ddr hardware, if not set ddr enable flag of gce, ddr will fall into idle mode, then gce instructions will not process done. we need set this flag of gce to tell ddr when gce is idle or busy controlled by software flow. 0x48[2:0] means control by software 0x48[18:16] means ddr enable 0x48[2:0] is pre-condition of 0x48[18:16]. if we want set 0x48[18:16] ddr enable, 0x48[2:0] must be set at same time. and only these bits is useful, other bits is useless bits Signed-off-by: Yongqiang Niu Reviewed-by: CK Hu Signed-off-by: Jassi Brar drivers/mailbox/mtk-cmdq-mailbox.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 23ba2e7fa282dd8e6c51c284ab1ea184c96c88b2 Author: Yongqiang Niu Date: Thu Dec 15 15:28:03 2022 +0800 mailbox: mtk-cmdq: Use GCE_CTRL_BY_SW definition instead of number Use GCE_CTRL_BY_SW definition instead of number Signed-off-by: Yongqiang Niu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Signed-off-by: Jassi Brar drivers/mailbox/mtk-cmdq-mailbox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8b9b08bd8d6adda032ae65a3a2f87ee989500c02 Author: ye xingchen Date: Thu Nov 17 19:29:11 2022 +0800 mailbox: rockchip: Use device_get_match_data() to simplify the code Directly get the match data with device_get_match_data(). Signed-off-by: ye xingchen Signed-off-by: Jassi Brar drivers/mailbox/rockchip-mailbox.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 76f708f635403d826ebea17ccce60d47c6671e22 Author: Luca Weiss Date: Sun Oct 16 11:00:32 2022 +0200 dt-bindings: mailbox: qcom-ipcc: Add sc8280xp compatible Document the sc8280xp compatible, and at the same time also make sure the list is sorted alphabetically. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 31c8d06e55acc325c64596f148d5405dbe4adf30 Author: Nicolas Frayer Date: Tue Nov 22 21:22:44 2022 +0100 mailbox: config: ti-msgmgr: Default set to ARCH_K3 for TI msg manager Defaulting the build to ARCH_K3 for the TI message manager driver. Signed-off-by: Nicolas Frayer Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e2cb0eac3d1d1acc8203634f3243859d95e4b37c Author: Bhupesh Sharma Date: Mon Nov 28 01:24:18 2022 +0530 mailbox: qcom-apcs-ipc: Add SM4250 APCS IPC support Enable SM4250 APCS IPC support by adding the compatible. It reuses msm8994_apcs_data. Signed-off-by: Bhupesh Sharma Signed-off-by: Jassi Brar drivers/mailbox/qcom-apcs-ipc-mailbox.c | 1 + 1 file changed, 1 insertion(+) commit e0cb05a02c5333323a32324d8e4048b7575d8ff5 Author: Bhupesh Sharma Date: Mon Nov 28 01:24:17 2022 +0530 dt-bindings: mailbox: qcom: Add SM4250 APCS compatible Add compatible for the Qualcomm SM4250 APCS block. Signed-off-by: Bhupesh Sharma Acked-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 1 + 1 file changed, 1 insertion(+) commit 9086e6017957c5cd6ea28d94b70e0d513d6b7800 Author: Helge Deller Date: Sat Dec 17 20:05:43 2022 +0100 parisc: Add missing FORCE prerequisites in Makefile Fix those make warnings: arch/parisc/kernel/vdso32/Makefile:30: FORCE prerequisite is missing arch/parisc/kernel/vdso64/Makefile:30: FORCE prerequisite is missing Add the missing FORCE prerequisites for all build targets identified by "make help". Fixes: e1f86d7b4b2a5213 ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk") Signed-off-by: Helge Deller Cc: # 5.18+ arch/parisc/kernel/vdso32/Makefile | 4 ++-- arch/parisc/kernel/vdso64/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 4add395bc77f19e2e5cedbef4368ffdebc89b165 Author: Helge Deller Date: Sat Dec 17 18:38:03 2022 +0100 parisc: Move pdc_result struct to firmware.c Signed-off-by: Helge Deller arch/parisc/kernel/firmware.c | 4 ++-- arch/parisc/kernel/real2.S | 17 ++--------------- 2 files changed, 4 insertions(+), 17 deletions(-) commit 7dc4dbfe750e1f18c511e73c8ed114da8de9ff85 Author: Helge Deller Date: Sat Dec 17 17:45:40 2022 +0100 parisc: Drop locking in pdc console code No need to have specific locking for console I/O since the PDC functions provide an own locking. Signed-off-by: Helge Deller Cc: # 6.1+ arch/parisc/kernel/pdc_cons.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 7e6652c79ecd74e1112500668d956367dc3772a5 Author: Helge Deller Date: Sat Nov 26 21:35:29 2022 +0100 parisc: Drop duplicate kgdb_pdc console The kgdb console is already implemented and registered in pdc_cons.c, so the duplicate code can be dropped. Signed-off-by: Helge Deller Cc: # 6.1+ arch/parisc/kernel/kgdb.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 7236aae5f81f3efbd93d0601e74fc05994bc2580 Author: Helge Deller Date: Sat Nov 26 21:29:31 2022 +0100 parisc: Fix locking in pdc_iodc_print() firmware call Utilize pdc_lock spinlock to protect parallel modifications of the iodc_dbuf[] buffer, check length to prevent buffer overflow of iodc_dbuf[], drop the iodc_retbuf[] buffer and fix some wrong indentings. Signed-off-by: Helge Deller Cc: # 6.0+ arch/parisc/kernel/firmware.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 89529367293c975c3580f49f38568f44848d5683 Merge: 2d7afdcbc9d3 72abeedd8398 Author: David S. Miller Date: Sun Dec 18 21:00:40 2022 +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 2022-12-15 (igc) Muhammad Husaini Zulkifli says: This patch series fixes bugs for the Time-Sensitive Networking(TSN) Qbv Scheduling features. An overview of each patch series is given below: Patch 1: Using a first flag bit to schedule a packet to the next cycle if packet cannot fit in current Qbv cycle. Patch 2: Enable strict cycle for Qbv scheduling. Patch 3: Prevent user to set basetime less than zero during tc config. Patch 4: Allow the basetime enrollment with zero value. Patch 5: Calculate the new end time value to exclude the time interval that exceed the cycle time as user can specify the cycle time in tc config. Patch 6: Resolve the HW bugs where the gate is not fully closed. --- This contains the net patches from this original pull request: https://lore.kernel.org/netdev/20221205212414.3197525-1-anthony.l.nguyen@intel.com/ ==================== Signed-off-by: David S. Miller commit b29e6ece454f7f4822b40441da393c3969c312b3 Merge: 77856d911a8c f9ff5644bcc0 Author: Andrew Morton Date: Sat Dec 17 20:39:52 2022 -0800 Resync master with latest Linus upstream commit 35d90f95cfa773b7e3b1f57ba15ce06a470f354c Author: Jens Axboe Date: Sat Dec 17 13:42:24 2022 -0700 io_uring: include task_work run after scheduling in wait for events It's quite possible that we got woken up because task_work was queued, and we need to process this task_work to generate the events waited for. If we return to the wait loop without running task_work, we'll end up adding the task to the waitqueue again, only to call io_cqring_wait_schedule() again which will run the task_work. This is less efficient than it could be, as it requires adding to the cq_wait queue again. It also triggers the wakeup path for completions as cq_wait is now non-empty with the task itself, and it'll require another lock grab and deletion to remove ourselves from the waitqueue. Signed-off-by: Jens Axboe io_uring/io_uring.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 3f6c3d29df58f391cf487b50a24ebd24045ba569 Author: Paul E. McKenney Date: Thu Dec 15 09:26:09 2022 -0800 rcu: Don't assert interrupts enabled too early in boot The rcu_poll_gp_seq_end() and rcu_poll_gp_seq_end_unlocked() both check that interrupts are enabled, as they normally should be when waiting for an RCU grace period. Except that it is legal to wait for grace periods during early boot, before interrupts have been enabled for the first time, and polling for grace periods is required to work during this time. This can result in false-positive lockdep splats in the presence of boot-time-initiated tracing. This commit therefore conditions those interrupts-enabled checks on rcu_scheduler_active having advanced past RCU_SCHEDULER_INACTIVE, by which time interrupts have been enabled. Reported-by: Steven Rostedt Signed-off-by: Paul E. McKenney Tested-by: Steven Rostedt (Google) kernel/rcu/tree.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit fe94cb1a614d2df2764d49ac959d8b7e4cb98e15 Author: Helge Deller Date: Wed Dec 14 22:17:57 2022 +0100 parisc: Drop PMD_SHIFT from calculation in pgtable.h PMD_SHIFT isn't defined if CONFIG_PGTABLE_LEVELS == 3, and as such the kernel test robot found this warning: In file included from include/linux/pgtable.h:6, from arch/parisc/kernel/head.S:23: arch/parisc/include/asm/pgtable.h:169:32: warning: "PMD_SHIFT" is not defined, evaluates to 0 [-Wundef] 169 | #if (KERNEL_INITIAL_ORDER) >= (PMD_SHIFT) Avoid the warning by using PLD_SHIFT and BITS_PER_PTE. Signed-off-by: Helge Deller Reported-by: kernel test robot Cc: # 6.0+ arch/parisc/include/asm/pgtable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71bdea6f798b425bc0003780b13e3fdecb16a010 Author: Helge Deller Date: Sun Dec 11 19:50:20 2022 +0100 parisc: Align parisc MADV_XXX constants with all other architectures Adjust some MADV_XXX constants to be in sync what their values are on all other platforms. There is currently no reason to have an own numbering on parisc, but it requires workarounds in many userspace sources (e.g. glibc, qemu, ...) - which are often forgotten and thus introduce bugs and different behaviour on parisc. A wrapper avoids an ABI breakage for existing userspace applications by translating any old values to the new ones, so this change allows us to move over all programs to the new ABI over time. Signed-off-by: Helge Deller arch/parisc/include/uapi/asm/mman.h | 29 ++++++++++++++--------------- arch/parisc/kernel/sys_parisc.c | 28 ++++++++++++++++++++++++++++ arch/parisc/kernel/syscalls/syscall.tbl | 2 +- tools/arch/parisc/include/uapi/asm/mman.h | 12 ++++++------ tools/perf/bench/bench.h | 12 ------------ 5 files changed, 49 insertions(+), 34 deletions(-) commit 41f563ab3c33698bdfc3403c7c2e6c94e73681e4 Author: Shang XiaoJing Date: Thu Nov 17 10:45:14 2022 +0800 parisc: led: Fix potential null-ptr-deref in start_task() start_task() calls create_singlethread_workqueue() and not checked the ret value, which may return NULL. And a null-ptr-deref may happen: start_task() create_singlethread_workqueue() # failed, led_wq is NULL queue_delayed_work() queue_delayed_work_on() __queue_delayed_work() # warning here, but continue __queue_work() # access wq->flags, null-ptr-deref Check the ret value and return -ENOMEM if it is NULL. Fixes: 3499495205a6 ("[PARISC] Use work queue in LED/LCD driver instead of tasklet.") Signed-off-by: Shang XiaoJing Signed-off-by: Helge Deller Cc: drivers/parisc/led.c | 3 +++ 1 file changed, 3 insertions(+) commit 6434ec0186b80c734aa7a2acf95f75f5c6dd943b Author: Jens Axboe Date: Sat Dec 17 13:40:17 2022 -0700 io_uring: don't use TIF_NOTIFY_SIGNAL to test for availability of task_work Use task_work_pending() as a better test for whether we have task_work or not, TIF_NOTIFY_SIGNAL is only valid if the any of the task_work items had been queued with TWA_SIGNAL as the notification mechanism. Hence task_work_pending() is a more reliable check. Signed-off-by: Jens Axboe io_uring/io_uring.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4f292c4de4f6fb83776c0ff22674121eb6ddfa2f Merge: 03d84bd6d432 3e844d842d49 Author: Linus Torvalds Date: Sat Dec 17 14:06:53 2022 -0600 Merge tag 'x86_mm_for_6.2_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm updates from Dave Hansen: "New Feature: - Randomize the per-cpu entry areas Cleanups: - Have CR3_ADDR_MASK use PHYSICAL_PAGE_MASK instead of open coding it - Move to "native" set_memory_rox() helper - Clean up pmd_get_atomic() and i386-PAE - Remove some unused page table size macros" * tag 'x86_mm_for_6.2_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (35 commits) x86/mm: Ensure forced page table splitting x86/kasan: Populate shadow for shared chunk of the CPU entry area x86/kasan: Add helpers to align shadow addresses up and down x86/kasan: Rename local CPU_ENTRY_AREA variables to shorten names x86/mm: Populate KASAN shadow for entire per-CPU range of CPU entry area x86/mm: Recompute physical address for every page of per-CPU CEA mapping x86/mm: Rename __change_page_attr_set_clr(.checkalias) x86/mm: Inhibit _PAGE_NX changes from cpa_process_alias() x86/mm: Untangle __change_page_attr_set_clr(.checkalias) x86/mm: Add a few comments x86/mm: Fix CR3_ADDR_MASK x86/mm: Remove P*D_PAGE_MASK and P*D_PAGE_SIZE macros mm: Convert __HAVE_ARCH_P..P_GET to the new style mm: Remove pointless barrier() after pmdp_get_lockless() x86/mm/pae: Get rid of set_64bit() x86_64: Remove pointless set_64bit() usage x86/mm/pae: Be consistent with pXXp_get_and_clear() x86/mm/pae: Use WRITE_ONCE() x86/mm/pae: Don't (ab)use atomic64 mm/gup: Fix the lockless PMD access ... commit 03d84bd6d43269df2dc63b2945dfed6610fac526 Merge: f9ff5644bcc0 4545c6a3d6ba Author: Linus Torvalds Date: Sat Dec 17 13:58:09 2022 -0600 Merge tag 'msi-fixes-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms Pull MSI fixes from Marc Zyngier: "Thomas tasked me with sending out a few urgent fixes after the giant MSI rework that landed in 6.2, as both s390 and powerpc ended-up suffering from it (they do not use the full core code infrastructure, leading to these previously undetected issues): - Return MSI_XA_DOMAIN_SIZE as the maximum MSI index when the architecture does not make use of irq domains instead of returning 0, which is pretty limiting. - Check for the presence of an irq domain when validating the MSI iterator, as s390/powerpc won't have one. - Fix powerpc's MSI backends which fail to clear the descriptor's IRQ field on teardown, leading to a splat and leaked descriptors" * tag 'msi-fixes-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms: powerpc/msi: Fix deassociation of MSI descriptors genirq/msi: Return MSI_XA_DOMAIN_SIZE as the maximum MSI index when no domain is present genirq/msi: Check for the presence of an irq domain when validating msi_ctrl commit f9ff5644bcc04221bae56f922122f2b7f5d24d62 Merge: b220f31147d7 3ffa9f713c39 Author: Linus Torvalds Date: Sat Dec 17 08:55:19 2022 -0600 Merge tag 'hsi-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI updates from Sebastian Reichel: - misc small fixes * tag 'hsi-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: omap_ssi_core: Fix error handling in ssi_init() headers: Remove some left-over license text in include/uapi/linux/hsi/ HSI: omap_ssi_core: fix possible memory leak in ssi_probe() HSI: omap_ssi_core: fix unbalanced pm_runtime_disable() HSI: ssi_protocol: Fix return type of ssip_pn_xmit() commit b220f31147d7b5b504c1d27ae0d631f5bb1964af Merge: b611996ef270 104bb8a66345 Author: Linus Torvalds Date: Sat Dec 17 08:39:31 2022 -0600 Merge tag 'for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - bq25890: add charge voltage/current support - bd99954: convert to linear range - convert all i2c drivers to use probe_new - misc fixes and cleanups * tag 'for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (51 commits) power: supply: fix null pointer dereferencing in power_supply_get_battery_info power: supply: bq25890: Fix usb-notifier probe and remove races power: supply: bq25890: Ensure pump_express_work is cancelled on remove power: supply: Fix refcount leak in rk817_charger_probe power: supply: bq25890: Only use pdata->regulator_init_data for vbus power: supply: ab8500: Fix error handling in ab8500_charger_init() power: supply: cw2015: Fix potential null-ptr-deref in cw_bat_probe() power: supply: z2_battery: Fix possible memleak in z2_batt_probe() power: supply: z2_battery: Convert to i2c's .probe_new() power: supply: ucs1002: Convert to i2c's .probe_new() power: supply: smb347: Convert to i2c's .probe_new() power: supply: sbs-manager: Convert to i2c's .probe_new() power: supply: sbs: Convert to i2c's .probe_new() power: supply: rt9455: Convert to i2c's .probe_new() power: supply: rt5033_battery: Convert to i2c's .probe_new() power: supply: max17042_battery: Convert to i2c's .probe_new() power: supply: max17040: Convert to i2c's .probe_new() power: supply: max14656: Convert to i2c's .probe_new() power: supply: ltc4162-l: Convert to i2c's .probe_new() power: supply: ltc2941: Convert to i2c's .probe_new() ... commit b611996ef270a88ebb350c82832c4d76913887e9 Merge: 75caf5940899 9ec0b7e06835 Author: Linus Torvalds Date: Sat Dec 17 08:34:01 2022 -0600 Merge tag 'linux-watchdog-6.2-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Add Advantech EC watchdog driver - Add support for MT6795 Helio X10 watchdog and toprgu - Add support for MT8188 watchdog device - Remove #ifdef guards for PM related functions - Other fixes and improvements * tag 'linux-watchdog-6.2-rc1' of git://www.linux-watchdog.org/linux-watchdog: watchdog: aspeed: Enable pre-timeout interrupt watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running watchdog: rn5t618: add support for read out bootstatus watchdog: kempld: Remove #ifdef guards for PM related functions watchdog: omap: Remove #ifdef guards for PM related functions watchdog: twl4030: Remove #ifdef guards for PM related functions watchdog: at91rm9200: Remove #ifdef guards for PM related functions watchdog: Add Advantech EC watchdog driver dt-bindings: watchdog: mediatek,mtk-wdt: Add compatible for MT8173 dt-bindings: watchdog: mediatek,mtk-wdt: Add compatible for MT6795 dt-bindings: watchdog: mediatek: Convert mtk-wdt to json-schema watchdog: mediatek: mt8188: add wdt support dt-bindings: reset: mt8188: add toprgu reset-controller header file dt-bindings: watchdog: Add compatible for MediaTek MT8188 watchdog: mtk_wdt: Add support for MT6795 Helio X10 watchdog and toprgu commit 75caf5940899a33165fb3d521492f3cd6b20c9a7 Merge: ed56954cf5a8 7cb092a0336c Author: Linus Torvalds Date: Sat Dec 17 08:28:25 2022 -0600 Merge tag 'leds-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: "Lee Jones offered his help with maintaining LEDs, thanks a lot. Plus, there are some bugfixes as a bonus" * tag 'leds-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: leds: MAINTAINERS: include dt-bindings headers leds: qcom,pm8058-led: Convert to DT schema leds: use sysfs_emit() to instead of scnprintf() leds: is31fl319x: Fix setting current limit for is31fl319{0,1,3} MAINTAINERS: Add additional co-maintainer to LEDs leds: lp5523: fix out-of-bounds bug in lp5523_selftest() dt-bindings: leds: Add 'cpuX' to 'linux,default-trigger' led: qcom-lpg: Fix sleeping in atomic leds: max8997: Don't error if there is no pdata leds: lp55xx: remove variable j leds-pca955x: Remove the unused function pca95xx_num_led_regs() commit ed56954cf5a8b7abb530676a073d14f9de661d69 Merge: 6830d50325ee 5244ca88671a Author: Linus Torvalds Date: Sat Dec 17 08:23:42 2022 -0600 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Fix two build warnings on 32 bit platforms It seems the linux-next CI and 0-day bot are not testing enough 32 bit configurations, as soon as you merged the rdma pull request there were two instant reports of warnings on these sytems that I would have thought should have been covered by time in linux-next Anyhow, here are the fixes so people don't hit problems with -Werror" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/siw: Fix pointer cast warning RDMA/rxe: Fix compile warnings on 32-bit commit 6830d50325ee27fbf0150f77cbec1ed304a5b8f6 Merge: 77856d911a8c 6b46a06100dd Author: Linus Torvalds Date: Sat Dec 17 08:18:04 2022 -0600 Merge tag 'gfs2-v6.1-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updtaes from Andreas Gruenbacher: - Revert a change to delete_work_func() that has gone wrong in commit c412a97cf6c5 ("gfs2: Use TRY lock in gfs2_inode_lookup for UNLINKED inodes"). - Avoid dequeuing GL_ASYNC glock holders twice by first checking if the holder is still queued. - gfs2: Always check the inode size of inline inodes when reading in inodes to prevent corrupt filesystem images from causing weid errors. - Properly handle a race between gfs2_create_inode() and gfs2_inode_lookup() that causes insert_inode_locked4() to return -EBUSY. - Fix and clean up the interaction between gfs2_create_inode() and gfs2_evict_inode() by completely handling the inode deallocation and destruction in gfs2_evict_inode(). - Remove support for glock holder auto-demotion as we have no current plans of using this feature again. - And a few more minor cleanups and clarifications. * tag 'gfs2-v6.1-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Remove support for glock holder auto-demotion (2) gfs2: Remove support for glock holder auto-demotion gfs2: Minor gfs2_try_evict cleanup gfs2: Partially revert gfs2_inode_lookup change gfs2: Add gfs2_inode_lookup comment gfs2: Uninline and improve glock_{set,clear}_object gfs2: Simply dequeue iopen glock in gfs2_evict_inode gfs2: Clean up after gfs2_create_inode rework gfs2: Avoid dequeuing GL_ASYNC glock holders twice gfs2: Make gfs2_glock_hold return its glock argument gfs2: Always check inode size of inline inodes gfs2: Cosmetic gfs2_dinode_{in,out} cleanup gfs2: Handle -EBUSY result of insert_inode_locked4 gfs2: Fix and clean up create / evict interaction gfs2: Clean up initialization of "ip" in gfs2_create_inode gfs2: Get rid of ghs[] in gfs2_create_inode gfs2: Add extra error check in alloc_dinode commit 731c4eac848ff9dd42776da8ed3407b257e3abf0 Author: Veronika Kabatova Date: Wed Dec 14 14:20:02 2022 +0100 buildtar: fix tarballs with EFI_ZBOOT enabled When CONFIG_EFI_ZBOOT is enabled, the binary name is not Image.gz anymore but vmlinuz.efi. No vmlinuz gets put into the tarball as the buildtar script doesn't recognize this name. Remedy this by adding the binary name to the list of acceptable files to package. Reported-by: CKI Project Signed-off-by: Veronika Kabatova Acked-by: Ard Biesheuvel Signed-off-by: Masahiro Yamada scripts/package/buildtar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bc5434632593ea3bb3a1ed2499af8c31796448b Author: Helge Deller Date: Wed Nov 16 21:46:03 2022 +0100 parisc: Fix inconsistent indenting in setup_cmdline() Fix warning reported by 0-DAY CI Kernel Test Service: arch/parisc/kernel/setup.c:64 setup_cmdline() warn: inconsistent indenting Reported-by: kernel test robot Signed-off-by: Helge Deller arch/parisc/kernel/setup.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 4545c6a3d6ba71747eaa984c338ddd745e56e23f Author: Marc Zyngier Date: Sat Dec 17 10:46:44 2022 +0000 powerpc/msi: Fix deassociation of MSI descriptors Since 2f2940d16823 ("genirq/msi: Remove filter from msi_free_descs_free_range()"), the core MSI code relies on the msi_desc->irq field to have been cleared before the descriptor can be freed, as it indicates that there is no association with a device anymore. The irq domain code provides this guarantee, and so does s390, which is one of the two architectures not using irq domains for MSIs. Powerpc, however, is missing this particular requirements, leading in a splat and leaked MSI descriptors. Adding the now required irq reset to the handful of powerpc backends that implement MSIs fixes that particular problem. Reported-by: Guenter Roeck Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/70dab88e-6119-0c12-7c6a-61bcbe239f66@roeck-us.net arch/powerpc/platforms/4xx/hsta_msi.c | 1 + arch/powerpc/platforms/cell/axon_msi.c | 1 + arch/powerpc/platforms/pasemi/msi.c | 1 + arch/powerpc/sysdev/fsl_msi.c | 1 + arch/powerpc/sysdev/mpic_u3msi.c | 1 + 5 files changed, 5 insertions(+) commit 2d7afdcbc9d32423f177ee12b7c93783aea338fb Author: Subash Abhinov Kasiviswanathan Date: Wed Dec 14 23:11:58 2022 -0700 skbuff: Account for tail adjustment during pull operations Extending the tail can have some unexpected side effects if a program uses a helper like BPF_FUNC_skb_pull_data to read partial content beyond the head skb headlen when all the skbs in the gso frag_list are linear with no head_frag - kernel BUG at net/core/skbuff.c:4219! pc : skb_segment+0xcf4/0xd2c lr : skb_segment+0x63c/0xd2c Call trace: skb_segment+0xcf4/0xd2c __udp_gso_segment+0xa4/0x544 udp4_ufo_fragment+0x184/0x1c0 inet_gso_segment+0x16c/0x3a4 skb_mac_gso_segment+0xd4/0x1b0 __skb_gso_segment+0xcc/0x12c udp_rcv_segment+0x54/0x16c udp_queue_rcv_skb+0x78/0x144 udp_unicast_rcv_skb+0x8c/0xa4 __udp4_lib_rcv+0x490/0x68c udp_rcv+0x20/0x30 ip_protocol_deliver_rcu+0x1b0/0x33c ip_local_deliver+0xd8/0x1f0 ip_rcv+0x98/0x1a4 deliver_ptype_list_skb+0x98/0x1ec __netif_receive_skb_core+0x978/0xc60 Fix this by marking these skbs as GSO_DODGY so segmentation can handle the tail updates accordingly. Fixes: 3dcbdb134f32 ("net: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list") Signed-off-by: Sean Tranchetti Signed-off-by: Subash Abhinov Kasiviswanathan Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/1671084718-24796-1-git-send-email-quic_subashab@quicinc.com Signed-off-by: Jakub Kicinski net/core/skbuff.c | 3 +++ 1 file changed, 3 insertions(+) commit 214964a13ab56a9757d146b79b468a7ca190fbfb Author: Jakub Kicinski Date: Thu Dec 15 20:41:22 2022 -0800 devlink: protect devlink dump by the instance lock Take the instance lock around devlink_nl_fill() when dumping, doit takes it already. We are only dumping basic info so in the worst case we were risking data races around the reload statistics. Until the big devlink mutex was removed all relevant code was protected by it, so the missing instance lock was not exposed. Fixes: d3efc2a6a6d8 ("net: devlink: remove devlink_mutex") Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20221216044122.1863550-1-kuba@kernel.org Signed-off-by: Jakub Kicinski net/core/devlink.c | 3 +++ 1 file changed, 3 insertions(+) commit 078838f5b9c9203e94d7724f997392ea8012ea6a Author: Arnd Bergmann Date: Thu Dec 15 17:39:05 2022 +0100 net: ethernet: ti: am65-cpsw: fix CONFIG_PM #ifdef The #ifdef check is incorrect and leads to a warning: drivers/net/ethernet/ti/am65-cpsw-nuss.c:1679:13: error: 'am65_cpsw_nuss_remove_rx_chns' defined but not used [-Werror=unused-function] 1679 | static void am65_cpsw_nuss_remove_rx_chns(void *data) It's better to remove the #ifdef here and use the modern SYSTEM_SLEEP_PM_OPS() macro instead. Fixes: 24bc19b05f1f ("net: ethernet: ti: am65-cpsw: Add suspend/resume support") Signed-off-by: Arnd Bergmann Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/20221215163918.611609-1-arnd@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3c44e2b6cde674797b76e76d3a903a63ce8a18bb Author: Dmitry Torokhov Date: Fri Dec 16 13:15:34 2022 -0800 Revert "Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode" This reverts commit ac5408991ea6b06e29129b4d4861097c4c3e0d59 because it causes loss of keyboard on HP 15-da1xxx. Fixes: ac5408991ea6 ("Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode") Reported-by: Jiri Slaby Link: https://lore.kernel.org/r/824effa5-8b9a-c28a-82bb-9b0ab24623e1@kernel.org Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1206358 Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 1 - 1 file changed, 1 deletion(-) commit 7535b832c6399b5ebfc5b53af5c51dd915ee2538 Author: Kees Cook Date: Fri Dec 16 12:26:57 2022 -0800 exit: Use READ_ONCE() for all oops/warn limit reads Use a temporary variable to take full advantage of READ_ONCE() behavior. Without this, the report (and even the test) might be out of sync with the initial test. Reported-by: Peter Zijlstra Link: https://lore.kernel.org/lkml/Y5x7GXeluFmZ8E0E@hirez.programming.kicks-ass.net Fixes: 9fc9e278a5c0 ("panic: Introduce warn_limit") Fixes: d4ccd54d28d3 ("exit: Put an upper limit on how often we can oops") Cc: "Eric W. Biederman" Cc: Jann Horn Cc: Arnd Bergmann Cc: Petr Mladek Cc: Andrew Morton Cc: Luis Chamberlain Cc: Marco Elver Cc: tangmeng Cc: Sebastian Andrzej Siewior Cc: Tiezhu Yang Signed-off-by: Kees Cook kernel/exit.c | 6 ++++-- kernel/panic.c | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) commit 5244ca88671a1981ceec09c5c8809f003e6a62aa Author: Arnd Bergmann Date: Thu Dec 15 18:03:43 2022 +0100 RDMA/siw: Fix pointer cast warning The previous build fix left a remaining issue in configurations with 64-bit dma_addr_t on 32-bit architectures: drivers/infiniband/sw/siw/siw_qp_tx.c: In function 'siw_get_pblpage': drivers/infiniband/sw/siw/siw_qp_tx.c:32:37: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 32 | return virt_to_page((void *)paddr); | ^ Use the same double cast here that the driver uses elsewhere to convert between dma_addr_t and void*. Fixes: 0d1b756acf60 ("RDMA/siw: Pass a pointer to virt_to_page()") Link: https://lore.kernel.org/r/20221215170347.2612403-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Acked-by: Bernard Metzler Reviewed-by: Linus Walleij Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_qp_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77856d911a8c8724ee8e2b09d55979fc1de8f1c0 Merge: aa4800e31c54 c0cd1d541704 Author: Linus Torvalds Date: Fri Dec 16 13:46:41 2022 -0600 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: - Fix Kconfig dependencies to re-allow the enabling of function graph tracer and shadow call stacks at the same time. - Revert the workaround for CPU erratum #2645198 since the CONFIG_ guards were incorrect and the code has therefore not seen any real exposure in -next. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: Revert "arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption" ftrace: Allow WITH_ARGS flavour of graph tracer with shadow call stack commit aa4800e31c547ed00681318335ca2298c4bca33a Merge: dcde56bb37a9 4ff17c448a7b Author: Linus Torvalds Date: Fri Dec 16 13:21:20 2022 -0600 Merge tag 'perf-tools-for-v6.2-1-2022-12-16' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools updates from Arnaldo Carvalho de Melo: "Libraries: - Drop the old copy of libtraceevent in tools/lib/traceevent/ now that all major distros ship it from its external repository. This is now just another feature detection, emitting a warning when the libtraceevent-dev[el] package isn't installed, disabling the build of perf features and tools that strictly require parsing things from tracefs while keeping the core functionality present and working with a subset of the events, the most used ones like CPU cycles, hardware cache and also vendor events, etc. This was tested with lots of containers for Fedora, Debian, OpenSUSE, Alpine Linux, Ubuntu, with cross builds, etc. Build: - Update to C standard to gnu11, like was done for the kernel. - Install the tools/lib/ libraries locally instead of having headers searched directly from the source code directories, to help the cases where we can build either from in-kernel source libraries or from the same library shipped as a distro package, as is the case with libbpf and was the case with libtraceevent. perf stat: - Do not delay the workload with --delay, the delay is just for starting to count the events, to skip noise at workload startup. - When we have events for each cgroup, the metric should be printed for each cgroup separately. $ perf stat -a --for-each-cgroup system.slice,user.slice --metric-only sleep 1 Performance counter stats for 'system wide': GHz insn per cycle branch-misses of all branches system.slice 3.792 0.61 3.24% user.slice 3.661 2.32 0.37% - Fix printing field separator in CSV metrics output. - Fix --metric-only --json output. - Fix summary output in CSV with --metric-only. - Update event group check for support of uncore event. perf test: - Stop requiring a C toolchain in shell tests, instead add a workload option that has all the previously C snippets built as part of 'perf test -w' that then get used in the 'perf test' shell scripts. - Add event group test for events in multiple PMUs - The "kernel lock contention analysis" test should not print warnings in quiet mode. - Add attr tests for ARM64's new VG register. - Fix record test on KVM guests, as using precise flag with the br_inst_retired.near_call event causes the test fail on KVM guests, even when the guests have PMU forwarding enabled and the event itself is supported, so just remove the precise flag from the event. - Add mechanism for skipping attr tests on specific kernel versions where it is known that these checks will fail. - Skip watchpoint tests if no watchpoints available. - Add more Intel PT 'perf test' entries: hybrid CPUs, split the packet decoder into a suite of subtests. perf script: - Introduce task analyzer python script, where one first records some events: Recording can be done in two ways: $ perf script record tasks-analyzer -- sleep 10 $ perf record -e sched:sched_switch -a -- sleep 10 The script can parse any perf.data files, as long as it has sched:sched_switch events, other events will be ignored. The most simple report use case is to just call the script without arguments. Runtime is the time the task was running on the CPU, Time Out-In is the time between the process being scheduled *out* and scheduled back *in*. So the last time span between two executions: $ perf script report tasks-analyzer Switched-In Switched-Out CPU PID TID Comm Runtime Time Out-In 15576.658891407 15576.659156086 4 2412 2428 gdbus 265 1949 15576.659111320 15576.659455410 0 2412 2412 gnome-shell 344 2267 15576.659491326 15576.659506173 2 74 74 kworker/2:1 15 13145 15576.659506173 15576.659825748 2 2858 2858 gnome-terminal- 320 63263 15576.659871270 15576.659902872 6 20932 20932 kworker/u16:0 32 2314582 15576.659909951 15576.659945501 3 27264 27264 sh 36 -1 15576.659853285 15576.659971052 7 27265 27265 perf 118 5050741 [...] perf lock: - Allow concurrent record and report to support live monitoring of kernel lock contention without BPF: # perf lock record -a -o- sleep 1 | perf lock contention -i- contended total wait max wait avg wait type caller 2 10.27 us 6.17 us 5.13 us spinlock load_balance+0xc03 1 5.29 us 5.29 us 5.29 us rwlock:W ep_scan_ready_list+0x54 1 4.12 us 4.12 us 4.12 us spinlock smpboot_thread_fn+0x116 1 3.28 us 3.28 us 3.28 us mutex pipe_read+0x50 - Implement -t/--threads option when using BPF: $ sudo ./perf lock contention -abt -E 5 sleep 1 contended total wait max wait avg wait pid comm 1 740.66 ms 740.66 ms 740.66 ms 1950 nv_queue 3 305.50 ms 298.19 ms 101.83 ms 1884 nvidia-modeset/ 1 25.14 us 25.14 us 25.14 us 2725038 EventManager_De 12 23.09 us 9.30 us 1.92 us 0 swapper 1 20.18 us 20.18 us 20.18 us 2725033 EventManager_De - Add -l/--lock-addr to aggregate per-lock-instance contention: $ sudo ./perf lock contention -abl sleep 1 contended total wait max wait avg wait address symbol 1 36.28 us 36.28 us 36.28 us ffff92615d6448b8 9 10.91 us 1.84 us 1.21 us ffffffffbaed50c0 rcu_state 1 10.49 us 10.49 us 10.49 us ffff9262ac4f0c80 8 4.68 us 1.67 us 585 ns ffffffffbae07a40 jiffies_lock 3 3.03 us 1.45 us 1.01 us ffff9262277861e0 1 924 ns 924 ns 924 ns ffff926095ba9d20 1 436 ns 436 ns 436 ns ffff9260bfda4f60 perf record: - Add remaining branch filters: "no_cycles", "no_flags" & "hw_index", to be used with hardware such as Intel's LBR that allows things like stitching stacks of two samples to overcome the limits of the number of LBR registers. Symbol resolution: - Handle .debug files created with 'objcopy --only-keep-debug', where program headers are zeroed and thus can't be used for adjustments, use the info in the runtime_ss (runtime ELF) instead. perf trace: - Add BPF based augmenter for the 'perf_event_open's 'struct perf_event_attr' argument. - Add BPF based augmenter for the 'clock_gettime's 'struct timespec' argument. - In both cases the syscall tracepoint has just the pointer value, we need to hook a BPF program to collect the pointer contents, and then, in userspace, pretty print it in 'perf trace'. perf list: - Introduce JSON output of events. - Streamline how the expression specifying what events should be shown is handled, fixing several corner cases, such as the metric filter that is specified as a glob but was using strstr(). perf probe: - Fix to avoid crashing if DW_AT_decl_file is NULL, coping with clang generating DWARF5 like that. - Use dwarf_attr_integrate() as generic DWARF attr accessor as it supersedes dwarf_attr(), supporting abstact origin DIEs. perf inject: - Set PERF_RECORD_MISC_BUILD_ID_SIZE in the PERF_RECORD_HEADER_BUILD_ID so that perf.data readers can get the real build-id size and avoid trailing zeroes. perf data: - Add tracepoint fields when converting a perf.data file to JSON. arm64: - Fix mksyscalltbl, don't lose syscalls due to sort -nu. - Add Arm Neoverse V2 PMU events. riscv: - Add riscv sbi firmware std event files. - Add Sifive U74 vendor events (JSON) file. - Add some more events and metrics for Alderlake/Alderlake-N. Documentation: - Add data documentation for the PMU structs in the C source code. Miscellaneous: - Periodic sanitization of headers, adding missing includes, removing needless ones, creating new ones, etc. - Use sig_atomic_t for signal handlers to avoid undefined behaviour in all perf tools. - Fixes for libbpf 1.0+ compatibility (maps, etc) on 'perf trace' BPF examples. - Remove some old perf bpf examples, leave the best ones that demonstrate how to associate BPF functions to points in the kernel. - Make quiet mode consistent between tools. - Use dedicated non-atomic clear/set bit helpers. - Use "grep -E" instead of "egrep" as recommended by warning emitted by GNU grep since at least version 3.8. - Complete list of supported subcommands in the 'perf daemon' help message. - Update John Garry's email address for arm64 perf tooling on the MAINTAINERS file, he moved from Huawei to Oracle" * tag 'perf-tools-for-v6.2-1-2022-12-16' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (239 commits) libperf: Fix install_pkgconfig target perf tools: Use "grep -E" instead of "egrep" perf stat: Do not delay the workload with --delay perf evlist: Remove group option. perf build: Fix python/perf.so library's name perf test arm64: Add attr tests for new VG register perf test: Add mechanism for skipping attr tests on kernel versions perf test: Add mechanism for skipping attr tests on auxiliary vector values perf test: Add ability to test exit code for attr tests perf test: add new task-analyzer tests perf script: task-analyzer add csv support perf script: Introduce task analyzer python script perf cs-etm: Print auxtrace info even if OpenCSD isn't linked perf cs-etm: Cleanup cs_etm__process_auxtrace_info() perf cs-etm: Tidy up auxtrace info header printing perf cs-etm: Remove unused stub methods perf cs-etm: Print unknown header version as an error perf test: Update perf lock contention test perf lock contention: Add -l/--lock-addr option perf lock contention: Implement -t/--threads option for BPF ... commit 86fe0fa8747fb1bc4cc44fc1966e0959fe752f38 Author: Paulo Alcantara Date: Fri Dec 16 14:00:19 2022 -0300 cifs: set correct ipc status after initial tree connect cifs_tcon::status wasn't correctly updated to TID_GOOD after establishing initial IPC connection thus staying at TID_NEW as long as it wasn't reconnected. Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/connect.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit dcde56bb37a9f900c11eec56b0ecaca5653cc829 Author: Linus Torvalds Date: Fri Dec 16 13:04:15 2022 -0600 Fix mismerge due to devnode now taking a 'const *' device This was a mismerge of a semantic conflict in my merge of the driver core updates, where commit ff62b8e6588f ("driver core: make struct class.devnode() take a const *") changed the devnode function pointer type. In the meantime, the drm tree I merged earlier had introduced a new use of that in commit 8bf4889762a8 ("drivers/accel: define kconfig and register a new major"). And of course this happens when I'm traveling with my laptop, and thus didn't do a full allmodconfig build between every pull and before pushing my work out. So I only noticed later as I was doing my full build. Brown-paper-bag-by: Linus Torvalds Fixes: 71a7507afbc3 Merge tag 'driver-core-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Signed-off-by: Linus Torvalds drivers/accel/drm_accel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3367934dd3035afa72ac79ae649f142a530df157 Author: Krzysztof Kozlowski Date: Fri Dec 16 17:38:15 2022 +0100 dt-bindings: drop redundant part of title (manual) The Devicetree bindings document does not have to say in the title that it is a "Devicetree binding" or a "schema", but instead just describe the hardware. Manual updates to various binding titles, including capitalizing them. Signed-off-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Reviewed-by: Jonathan Cameron Acked-by: Ulf Hansson # MMC Acked-by: Stephen Boyd # clk Acked-by: Dmitry Torokhov # input Acked-by: Mark Brown Acked-by: Viresh Kumar # opp Link: https://lore.kernel.org/r/20221216163815.522628-10-krzysztof.kozlowski@linaro.org [robh: add trivial-devices.yaml and net/can/microchip,mcp251xfd.yaml] Signed-off-by: Rob Herring Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml | 2 +- Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml | 2 +- Documentation/devicetree/bindings/clock/qcom,dispcc-sc8280xp.yaml | 2 +- Documentation/devicetree/bindings/example-schema.yaml | 2 +- Documentation/devicetree/bindings/input/fsl,scu-key.yaml | 2 +- Documentation/devicetree/bindings/input/matrix-keymap.yaml | 2 +- Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml | 2 +- Documentation/devicetree/bindings/net/asix,ax88178.yaml | 2 +- Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml | 4 +--- Documentation/devicetree/bindings/net/microchip,lan95xx.yaml | 2 +- Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml | 2 +- Documentation/devicetree/bindings/opp/opp-v2-qcom-level.yaml | 2 +- Documentation/devicetree/bindings/pci/pci-ep.yaml | 2 +- Documentation/devicetree/bindings/phy/calxeda-combophy.yaml | 2 +- Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml | 2 +- Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml | 2 +- Documentation/devicetree/bindings/pinctrl/pinmux-node.yaml | 2 +- Documentation/devicetree/bindings/power/fsl,scu-pd.yaml | 2 +- Documentation/devicetree/bindings/riscv/cpus.yaml | 2 +- Documentation/devicetree/bindings/rtc/fsl,scu-rtc.yaml | 2 +- Documentation/devicetree/bindings/spi/omap-spi.yaml | 2 +- Documentation/devicetree/bindings/thermal/fsl,scu-thermal.yaml | 2 +- Documentation/devicetree/bindings/trivial-devices.yaml | 2 +- Documentation/devicetree/bindings/usb/usb-device.yaml | 2 +- Documentation/devicetree/bindings/watchdog/fsl,scu-wdt.yaml | 2 +- 25 files changed, 25 insertions(+), 27 deletions(-) commit 13e3c7793e2fa2707455aaf66f2498ed4a00d6e2 Merge: 68bb10101e6b f506439ec3de Author: Jakub Kicinski Date: Fri Dec 16 10:41:55 2022 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2022-12-16 We've added 7 non-merge commits during the last 2 day(s) which contain a total of 9 files changed, 119 insertions(+), 36 deletions(-). 1) Fix for recent syzkaller XDP dispatcher update splat, from Jiri Olsa. 2) Fix BPF program refcount leak in LSM attachment failure path, from Milan Landaverde. 3) Fix BPF program type in map compatibility check for fext, from Toke Høiland-Jørgensen. 4) Fix a BPF selftest compilation error under !CONFIG_SMP config, from Yonghong Song. 5) Fix CI to enable CONFIG_FUNCTION_ERROR_INJECTION after it got changed to a prompt, from Song Liu. 6) Various BPF documentation fixes for socket local storage, from Donald Hunter. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests/bpf: Add a test for using a cpumap from an freplace-to-XDP program bpf: Resolve fext program type when checking map compatibility bpf: Synchronize dispatcher update with bpf_dispatcher_xdp_func bpf: prevent leak of lsm program after failed attach selftests/bpf: Select CONFIG_FUNCTION_ERROR_INJECTION selftests/bpf: Fix a selftest compilation error with CONFIG_SMP=n docs/bpf: Reword docs for BPF_MAP_TYPE_SK_STORAGE ==================== Link: https://lore.kernel.org/r/20221216174540.16598-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 33cd7c6fffa3c546b3fce3b000d4b83f88c01e0d Author: Krzysztof Kozlowski Date: Fri Dec 16 17:38:14 2022 +0100 dt-bindings: clock: drop redundant part of title The Devicetree bindings document does not have to say in the title that it is a "Devicetree binding", but instead just describe the hardware. Drop "Devicetree bindings" in various forms: find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -exec sed -i -e 's/^title: [dD]evice[ -]\?[tT]ree [cC]lock [bB]indings\? for \([tT]he \)\?\(.*\)$/title: \u\2 Clock Controller/' {} \; find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -exec sed -i -e 's/^title: [cC]lock [bB]indings\? for \([tT]he \)\?\(.*\)$/title: \u\2 Clock Controller/' {} \; Signed-off-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Reviewed-by: Jonathan Cameron Acked-by: Ulf Hansson # MMC Acked-by: Stephen Boyd # clk Link: https://lore.kernel.org/r/20221216163815.522628-9-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/clock/calxeda.yaml | 2 +- Documentation/devicetree/bindings/clock/imx1-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx21-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx23-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx25-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx27-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx28-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx31-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx35-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx5-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx6q-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx6sl-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx6sll-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx6sx-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx6ul-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx7d-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx7ulp-pcc-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx7ulp-scg-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imxrt1050-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/ti,lmk04832.yaml | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) commit 9d69d47fd399137d41b744065aab2f9677ccc377 Author: Krzysztof Kozlowski Date: Fri Dec 16 17:38:13 2022 +0100 dt-bindings: drop redundant part of title (beginning) The Devicetree bindings document does not have to say in the title that it is a "Devicetree binding", but instead just describe the hardware. Drop beginning "Devicetree bindings" in various forms: find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -exec sed -i -e 's/^title: [dD]evice[ -]\?[tT]ree [bB]indings\? for \([tT]he \)\?\(.*\)$/title: \u\2/' {} \; find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -exec sed -i -e 's/^title: [bB]indings\? for \([tT]he \)\?\(.*\)$/title: \u\2/' {} \; find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -exec sed -i -e 's/^title: [dD][tT] [bB]indings\? for \([tT]he \)\?\(.*\)$/title: \u\2/' {} \; Signed-off-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Reviewed-by: Jonathan Cameron Acked-by: Ulf Hansson # MMC Acked-by: Stephen Boyd # clk Acked-by: Dmitry Torokhov # input Acked-by: Mark Brown Acked-by: Sebastian Reichel # power Link: https://lore.kernel.org/r/20221216163815.522628-8-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/clock/adi,axi-clkgen.yaml | 2 +- Documentation/devicetree/bindings/clock/fixed-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/fixed-mmio-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/idt,versaclock5.yaml | 2 +- Documentation/devicetree/bindings/clock/renesas,9series.yaml | 2 +- Documentation/devicetree/bindings/clock/ti/ti,clksel.yaml | 2 +- .../devicetree/bindings/display/bridge/ingenic,jz4780-hdmi.yaml | 2 +- Documentation/devicetree/bindings/display/bridge/intel,keembay-dsi.yaml | 2 +- Documentation/devicetree/bindings/display/intel,keembay-display.yaml | 2 +- Documentation/devicetree/bindings/display/intel,keembay-msscam.yaml | 2 +- Documentation/devicetree/bindings/display/msm/gmu.yaml | 2 +- Documentation/devicetree/bindings/display/msm/gpu.yaml | 2 +- .../devicetree/bindings/display/panel/olimex,lcd-olinuxino.yaml | 2 +- Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra210-nvdec.yaml | 2 +- Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra210-nvenc.yaml | 2 +- Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra210-nvjpg.yaml | 2 +- Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra234-nvdec.yaml | 2 +- Documentation/devicetree/bindings/i2c/i2c-gpio.yaml | 2 +- Documentation/devicetree/bindings/i2c/ti,omap4-i2c.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/sigma-delta-modulator.yaml | 2 +- Documentation/devicetree/bindings/input/gpio-keys.yaml | 2 +- Documentation/devicetree/bindings/input/microchip,cap11xx.yaml | 2 +- .../devicetree/bindings/interrupt-controller/renesas,irqc.yaml | 2 +- Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml | 2 +- Documentation/devicetree/bindings/leds/register-bit-led.yaml | 2 +- Documentation/devicetree/bindings/leds/regulator-led.yaml | 2 +- Documentation/devicetree/bindings/mmc/arasan,sdhci.yaml | 2 +- Documentation/devicetree/bindings/net/ingenic,mac.yaml | 2 +- Documentation/devicetree/bindings/power/supply/bq2415x.yaml | 2 +- Documentation/devicetree/bindings/power/supply/bq24190.yaml | 2 +- Documentation/devicetree/bindings/power/supply/bq24257.yaml | 2 +- Documentation/devicetree/bindings/power/supply/bq24735.yaml | 2 +- Documentation/devicetree/bindings/power/supply/bq25890.yaml | 2 +- Documentation/devicetree/bindings/power/supply/isp1704.yaml | 2 +- Documentation/devicetree/bindings/power/supply/lltc,ltc294x.yaml | 2 +- Documentation/devicetree/bindings/power/supply/richtek,rt9455.yaml | 2 +- Documentation/devicetree/bindings/power/supply/ti,lp8727.yaml | 2 +- Documentation/devicetree/bindings/regulator/pwm-regulator.yaml | 2 +- Documentation/devicetree/bindings/rng/ingenic,rng.yaml | 2 +- Documentation/devicetree/bindings/rng/ingenic,trng.yaml | 2 +- Documentation/devicetree/bindings/serial/8250_omap.yaml | 2 +- Documentation/devicetree/bindings/serio/ps2-gpio.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,wcd938x-sdw.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,wsa881x.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml | 2 +- Documentation/devicetree/bindings/timer/ingenic,sysost.yaml | 2 +- Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml | 2 +- Documentation/devicetree/bindings/usb/realtek,rts5411.yaml | 2 +- Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml | 2 +- Documentation/devicetree/bindings/usb/ti,usb8041.yaml | 2 +- 53 files changed, 53 insertions(+), 53 deletions(-) commit 84e85359f4999a439aa12e04bf0ae9e13e00fc66 Author: Krzysztof Kozlowski Date: Fri Dec 16 17:38:12 2022 +0100 dt-bindings: drop redundant part of title (end, part three) The Devicetree bindings document does not have to say in the title that it is a "binding", but instead just describe the hardware. Drop trailing "bindings" in various forms (also with trailing full stop): find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -not -name 'trivial-devices.yaml' \ -exec sed -i -e 's/^title: \(.*\) [bB]indings\?\.\?$/title: \1/' {} \; Signed-off-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Acked-by: Matti Vaittinen # ROHM Acked-by: Ulf Hansson # MMC Acked-by: Stephen Boyd # clk Acked-by: Dmitry Torokhov # input Acked-by: Mark Brown Acked-by: Hans Verkuil # media Acked-by: Sebastian Reichel # power Acked-by: Viresh Kumar # cpufreq Link: https://lore.kernel.org/r/20221216163815.522628-7-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/cci-control-port.yaml | 2 +- Documentation/devicetree/bindings/arm/cpus.yaml | 2 +- Documentation/devicetree/bindings/arm/keystone/ti,k3-sci-common.yaml | 2 +- Documentation/devicetree/bindings/arm/sp810.yaml | 2 +- Documentation/devicetree/bindings/arm/stm32/st,mlahb.yaml | 2 +- Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml | 2 +- Documentation/devicetree/bindings/arm/tegra/nvidia,tegra194-cbb.yaml | 2 +- Documentation/devicetree/bindings/arm/tegra/nvidia,tegra234-cbb.yaml | 2 +- Documentation/devicetree/bindings/arm/vexpress-config.yaml | 2 +- Documentation/devicetree/bindings/arm/vexpress-sysreg.yaml | 2 +- Documentation/devicetree/bindings/ata/allwinner,sun4i-a10-ahci.yaml | 2 +- Documentation/devicetree/bindings/ata/allwinner,sun8i-r40-ahci.yaml | 2 +- Documentation/devicetree/bindings/bus/ti-sysc.yaml | 2 +- Documentation/devicetree/bindings/clock/fsl,plldig.yaml | 2 +- Documentation/devicetree/bindings/clock/fsl,sai-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx8m-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx8qxp-lpcg.yaml | 2 +- Documentation/devicetree/bindings/clock/imx8ulp-cgc-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx8ulp-pcc-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/imx93-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/intel,agilex.yaml | 2 +- Documentation/devicetree/bindings/clock/intel,cgu-lgm.yaml | 2 +- Documentation/devicetree/bindings/clock/intel,easic-n5x.yaml | 2 +- Documentation/devicetree/bindings/clock/intel,stratix10.yaml | 2 +- Documentation/devicetree/bindings/clock/microchip,mpfs-clkcfg.yaml | 2 +- Documentation/devicetree/bindings/clock/milbeaut-clock.yaml | 2 +- Documentation/devicetree/bindings/clock/nuvoton,npcm845-clk.yaml | 2 +- Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 2 +- Documentation/devicetree/bindings/clock/rockchip,rk3568-cru.yaml | 2 +- Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml | 2 +- Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml | 2 +- Documentation/devicetree/bindings/crypto/st,stm32-crc.yaml | 2 +- Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml | 2 +- Documentation/devicetree/bindings/crypto/st,stm32-hash.yaml | 2 +- Documentation/devicetree/bindings/display/arm,hdlcd.yaml | 2 +- Documentation/devicetree/bindings/display/arm,malidp.yaml | 2 +- Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.yaml | 2 +- Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml | 2 +- Documentation/devicetree/bindings/display/panel/display-timings.yaml | 2 +- Documentation/devicetree/bindings/display/panel/panel-timing.yaml | 2 +- Documentation/devicetree/bindings/dma/st,stm32-dma.yaml | 2 +- Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml | 2 +- Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml | 2 +- Documentation/devicetree/bindings/edac/dmc-520.yaml | 2 +- Documentation/devicetree/bindings/firmware/arm,scmi.yaml | 2 +- Documentation/devicetree/bindings/firmware/arm,scpi.yaml | 2 +- Documentation/devicetree/bindings/firmware/qemu,fw-cfg-mmio.yaml | 2 +- Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml | 2 +- Documentation/devicetree/bindings/gpio/ti,omap-gpio.yaml | 2 +- Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 2 +- Documentation/devicetree/bindings/gpu/vivante,gc.yaml | 2 +- Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.yaml | 2 +- Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml | 2 +- Documentation/devicetree/bindings/i2c/i2c-pxa.yaml | 2 +- Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml | 2 +- Documentation/devicetree/bindings/i3c/i3c.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/ingenic,adc.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/sprd,sc2720-adc.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/x-powers,axp209-adc.yaml | 2 +- Documentation/devicetree/bindings/iio/dac/nxp,lpc1850-dac.yaml | 2 +- Documentation/devicetree/bindings/iio/dac/st,stm32-dac.yaml | 2 +- Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.yaml | 2 +- .../devicetree/bindings/input/touchscreen/cypress,cy8ctma140.yaml | 2 +- .../devicetree/bindings/input/touchscreen/cypress,cy8ctma340.yaml | 2 +- Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml | 2 +- Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 2 +- Documentation/devicetree/bindings/input/touchscreen/himax,hx83112b.yaml | 2 +- Documentation/devicetree/bindings/input/touchscreen/hycon,hy46xx.yaml | 2 +- .../devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml | 2 +- Documentation/devicetree/bindings/input/touchscreen/melfas,mms114.yaml | 2 +- Documentation/devicetree/bindings/input/touchscreen/mstar,msg2638.yaml | 2 +- Documentation/devicetree/bindings/input/touchscreen/ti,tsc2005.yaml | 2 +- Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml | 2 +- Documentation/devicetree/bindings/input/touchscreen/zinitix,bt400.yaml | 2 +- Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.yaml | 2 +- .../devicetree/bindings/interrupt-controller/nuvoton,wpcm450-aic.yaml | 2 +- Documentation/devicetree/bindings/ipmi/ipmi-ipmb.yaml | 2 +- Documentation/devicetree/bindings/ipmi/ipmi-smic.yaml | 2 +- Documentation/devicetree/bindings/leds/backlight/gpio-backlight.yaml | 2 +- Documentation/devicetree/bindings/leds/backlight/led-backlight.yaml | 2 +- Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml | 2 +- Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 2 +- Documentation/devicetree/bindings/mailbox/sprd-mailbox.yaml | 2 +- Documentation/devicetree/bindings/mailbox/st,stm32-ipcc.yaml | 2 +- Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml | 2 +- Documentation/devicetree/bindings/media/renesas,ceu.yaml | 2 +- Documentation/devicetree/bindings/media/st,stm32-cec.yaml | 2 +- Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml | 2 +- Documentation/devicetree/bindings/media/st,stm32-dma2d.yaml | 2 +- .../devicetree/bindings/memory-controllers/calxeda-ddr-ctrlr.yaml | 2 +- .../devicetree/bindings/memory-controllers/st,stm32-fmc2-ebi.yaml | 2 +- Documentation/devicetree/bindings/mfd/actions,atc260x.yaml | 2 +- Documentation/devicetree/bindings/mfd/ene-kb3930.yaml | 2 +- Documentation/devicetree/bindings/mfd/ene-kb930.yaml | 2 +- Documentation/devicetree/bindings/mfd/fsl,imx8qxp-csr.yaml | 2 +- Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml | 2 +- Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml | 2 +- Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 2 +- Documentation/devicetree/bindings/mfd/rohm,bd71837-pmic.yaml | 2 +- Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml | 2 +- Documentation/devicetree/bindings/mfd/rohm,bd9576-pmic.yaml | 2 +- Documentation/devicetree/bindings/mfd/st,stm32-lptimer.yaml | 2 +- Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml | 2 +- Documentation/devicetree/bindings/mfd/st,stmfx.yaml | 2 +- Documentation/devicetree/bindings/mfd/st,stpmic1.yaml | 2 +- Documentation/devicetree/bindings/mips/cpus.yaml | 2 +- Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml | 2 +- Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml | 2 +- Documentation/devicetree/bindings/mmc/microchip,dw-sparx5-sdhci.yaml | 2 +- Documentation/devicetree/bindings/mmc/mmc-pwrseq-emmc.yaml | 2 +- Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.yaml | 2 +- Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml | 2 +- Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 2 +- Documentation/devicetree/bindings/mmc/sdhci-pxa.yaml | 2 +- Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 2 +- Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml | 2 +- Documentation/devicetree/bindings/mtd/gpmi-nand.yaml | 2 +- Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml | 2 +- Documentation/devicetree/bindings/mtd/mxc-nand.yaml | 2 +- Documentation/devicetree/bindings/mtd/partitions/qcom,smem-part.yaml | 2 +- Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml | 2 +- Documentation/devicetree/bindings/mux/gpio-mux.yaml | 2 +- Documentation/devicetree/bindings/mux/mux-consumer.yaml | 2 +- Documentation/devicetree/bindings/mux/mux-controller.yaml | 2 +- Documentation/devicetree/bindings/mux/reg-mux.yaml | 2 +- Documentation/devicetree/bindings/net/brcm,bcmgenet.yaml | 2 +- Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 2 +- Documentation/devicetree/bindings/net/can/can-transceiver.yaml | 2 +- Documentation/devicetree/bindings/net/engleder,tsnep.yaml | 2 +- Documentation/devicetree/bindings/net/fsl,qoriq-mc-dpmac.yaml | 2 +- Documentation/devicetree/bindings/net/mctp-i2c-controller.yaml | 2 +- Documentation/devicetree/bindings/net/wireless/ieee80211.yaml | 2 +- Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.yaml | 2 +- Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 2 +- Documentation/devicetree/bindings/nvmem/socionext,uniphier-efuse.yaml | 2 +- Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml | 2 +- Documentation/devicetree/bindings/opp/opp-v1.yaml | 2 +- Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml | 2 +- Documentation/devicetree/bindings/opp/opp-v2.yaml | 2 +- Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml | 2 +- Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml | 2 +- Documentation/devicetree/bindings/phy/fsl,lynx-28g.yaml | 2 +- Documentation/devicetree/bindings/phy/intel,keembay-phy-usb.yaml | 2 +- Documentation/devicetree/bindings/phy/intel,phy-thunderbay-emmc.yaml | 2 +- Documentation/devicetree/bindings/phy/marvell,mmp3-usb-phy.yaml | 2 +- Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml | 2 +- Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml | 2 +- Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml | 2 +- Documentation/devicetree/bindings/phy/phy-cadence-sierra.yaml | 2 +- Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml | 2 +- Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml | 2 +- Documentation/devicetree/bindings/phy/phy-tegra194-p2u.yaml | 2 +- Documentation/devicetree/bindings/phy/ti,phy-am654-serdes.yaml | 2 +- Documentation/devicetree/bindings/phy/transmit-amplitude.yaml | 2 +- Documentation/devicetree/bindings/pinctrl/intel,lgm-io.yaml | 2 +- Documentation/devicetree/bindings/power/avs/qcom,cpr.yaml | 2 +- Documentation/devicetree/bindings/power/supply/dlg,da9150-charger.yaml | 2 +- .../devicetree/bindings/power/supply/dlg,da9150-fuel-gauge.yaml | 2 +- Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml | 2 +- Documentation/devicetree/bindings/power/supply/lltc,lt3651-charger.yaml | 2 +- Documentation/devicetree/bindings/power/supply/sc2731-charger.yaml | 2 +- Documentation/devicetree/bindings/power/supply/sc27xx-fg.yaml | 2 +- Documentation/devicetree/bindings/pwm/microchip,corepwm.yaml | 2 +- Documentation/devicetree/bindings/regulator/st,stm32-booster.yaml | 2 +- Documentation/devicetree/bindings/regulator/st,stm32-vrefbuf.yaml | 2 +- .../devicetree/bindings/remoteproc/amlogic,meson-mx-ao-arc.yaml | 2 +- Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 2 +- Documentation/devicetree/bindings/remoteproc/ingenic,vpu.yaml | 2 +- Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml | 2 +- Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml | 2 +- Documentation/devicetree/bindings/remoteproc/qcom,pil-info.yaml | 2 +- Documentation/devicetree/bindings/remoteproc/renesas,rcar-rproc.yaml | 2 +- Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml | 2 +- Documentation/devicetree/bindings/rng/intel,ixp46x-rng.yaml | 2 +- Documentation/devicetree/bindings/rng/silex-insight,ba431-rng.yaml | 2 +- Documentation/devicetree/bindings/rng/st,stm32-rng.yaml | 2 +- Documentation/devicetree/bindings/rng/xiphera,xip8001b-trng.yaml | 2 +- Documentation/devicetree/bindings/rtc/sa1100-rtc.yaml | 2 +- Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml | 2 +- Documentation/devicetree/bindings/serial/8250.yaml | 2 +- Documentation/devicetree/bindings/serial/rs485.yaml | 2 +- Documentation/devicetree/bindings/serial/st,stm32-uart.yaml | 2 +- Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml | 2 +- Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml | 2 +- Documentation/devicetree/bindings/soc/qcom/qcom,smem.yaml | 2 +- Documentation/devicetree/bindings/soc/qcom/qcom,spm.yaml | 2 +- Documentation/devicetree/bindings/soc/qcom/qcom-stats.yaml | 2 +- Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml | 2 +- Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml | 2 +- Documentation/devicetree/bindings/spi/aspeed,ast2600-fmc.yaml | 2 +- Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml | 2 +- Documentation/devicetree/bindings/spi/st,stm32-qspi.yaml | 2 +- Documentation/devicetree/bindings/spi/st,stm32-spi.yaml | 2 +- Documentation/devicetree/bindings/thermal/imx-thermal.yaml | 2 +- Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml | 2 +- Documentation/devicetree/bindings/thermal/sprd-thermal.yaml | 2 +- Documentation/devicetree/bindings/thermal/st,stm32-thermal.yaml | 2 +- Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml | 2 +- Documentation/devicetree/bindings/thermal/thermal-idle.yaml | 2 +- Documentation/devicetree/bindings/thermal/thermal-sensor.yaml | 2 +- Documentation/devicetree/bindings/thermal/thermal-zones.yaml | 2 +- Documentation/devicetree/bindings/thermal/ti,am654-thermal.yaml | 2 +- Documentation/devicetree/bindings/thermal/ti,j72xx-thermal.yaml | 2 +- Documentation/devicetree/bindings/timer/mrvl,mmp-timer.yaml | 2 +- Documentation/devicetree/bindings/timer/st,stm32-timer.yaml | 2 +- Documentation/devicetree/bindings/usb/analogix,anx7411.yaml | 2 +- Documentation/devicetree/bindings/usb/cdns,usb3.yaml | 2 +- Documentation/devicetree/bindings/usb/dwc2.yaml | 2 +- Documentation/devicetree/bindings/usb/faraday,fotg210.yaml | 2 +- Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.yaml | 2 +- Documentation/devicetree/bindings/usb/nxp,isp1760.yaml | 2 +- Documentation/devicetree/bindings/usb/richtek,rt1719.yaml | 2 +- Documentation/devicetree/bindings/usb/st,stusb160x.yaml | 2 +- Documentation/devicetree/bindings/virtio/virtio-device.yaml | 2 +- Documentation/devicetree/bindings/watchdog/st,stm32-iwdg.yaml | 2 +- 223 files changed, 223 insertions(+), 223 deletions(-) commit 9fa3ad1a1ab31da4887b48e68ad529af78f119b6 Author: Krzysztof Kozlowski Date: Fri Dec 16 17:38:11 2022 +0100 dt-bindings: drop redundant part of title (end, part two) The Devicetree bindings document does not have to say in the title that it is a "binding", but instead just describe the hardware. Drop trailing "Node|Tree|Generic bindings" in various forms (also with trailing full stop): find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -not -name 'trivial-devices.yaml' \ -exec sed -i -e 's/^title: \(.*\) [nN]ode [bB]indings\?\.\?$/title: \1/' {} \; find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -not -name 'trivial-devices.yaml' \ -exec sed -i -e 's/^title: \(.*\) [tT]ree [bB]indings\?\.\?$/title: \1/' {} \; find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -not -name 'trivial-devices.yaml' \ -exec sed -i -e 's/^title: \(.*\) [gG]eneric [bB]indings\?\.\?$/title: \1/' {} \; find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -not -name 'trivial-devices.yaml' \ -exec sed -i -e 's/^title: \(.*\) [bB]indings\? description\.\?$/title: \1/' {} \; find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -not -name 'trivial-devices.yaml' \ -exec sed -i -e 's/^title: \(.*\) [bB]indings\? document\.\?$/title: \1/' {} \; Signed-off-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Reviewed-by: Jonathan Cameron Acked-by: Ulf Hansson # MMC Acked-by: Stephen Boyd # clk Acked-by: Vinod Koul # phy Acked-by: Mark Brown Link: https://lore.kernel.org/r/20221216163815.522628-6-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/clock/ti,sci-clk.yaml | 2 +- Documentation/devicetree/bindings/cpu/idle-states.yaml | 2 +- Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml | 2 +- Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml | 2 +- Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml | 2 +- Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml | 2 +- Documentation/devicetree/bindings/phy/brcm,ns2-pcie-phy.yaml | 2 +- Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml | 2 +- Documentation/devicetree/bindings/phy/ti,phy-gmii-sel.yaml | 2 +- Documentation/devicetree/bindings/power/domain-idle-state.yaml | 2 +- Documentation/devicetree/bindings/reserved-memory/shared-dma-pool.yaml | 2 +- Documentation/devicetree/bindings/reset/ti,sci-reset.yaml | 2 +- Documentation/devicetree/bindings/reset/ti,tps380x-reset.yaml | 2 +- Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml | 2 +- Documentation/devicetree/bindings/sound/audio-graph-port.yaml | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) commit a612130ca1a650b0ba3599fc3199143eb9e7060d Author: Krzysztof Kozlowski Date: Fri Dec 16 17:38:10 2022 +0100 dt-bindings: drop redundant part of title (end) The Devicetree bindings document does not have to say in the title that it is a "Devicetree binding", but instead just describe the hardware. Drop trailing "Devicetree bindings" in various forms (also with trailing full stop): find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -not -name 'trivial-devices.yaml' \ -exec sed -i -e 's/^title: \(.*\) [dD]evice[ -]\?[tT]ree [bB]indings\?\.\?$/title: \1/' {} \; find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -not -name 'trivial-devices.yaml' \ -exec sed -i -e 's/^title: \(.*\) [dD]evice[ -]\?[nN]ode [bB]indings\?\.\?$/title: \1/' {} \; find Documentation/devicetree/bindings/ -type f -name '*.yaml' \ -not -name 'trivial-devices.yaml' \ -exec sed -i -e 's/^title: \(.*\) [dD][tT] [bB]indings\?\.\?$/title: \1/' {} \; Signed-off-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Acked-by: Jonathan Cameron # IIO Reviewed-by: Jonathan Cameron Acked-by: Ulf Hansson # MMC Acked-by: Stephen Boyd # clk Acked-by: Dmitry Torokhov # input Acked-by: Mark Brown Acked-by: Hans Verkuil # media Acked-by: Sebastian Reichel # power Link: https://lore.kernel.org/r/20221216163815.522628-5-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml | 2 +- Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351.yaml | 2 +- Documentation/devicetree/bindings/arm/bcm/brcm,bcm21664.yaml | 2 +- Documentation/devicetree/bindings/arm/bcm/brcm,bcm23550.yaml | 2 +- Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.yaml | 2 +- Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 2 +- Documentation/devicetree/bindings/arm/bcm/brcm,cygnus.yaml | 2 +- Documentation/devicetree/bindings/arm/bcm/brcm,hr2.yaml | 2 +- Documentation/devicetree/bindings/arm/bcm/brcm,ns2.yaml | 2 +- Documentation/devicetree/bindings/arm/bcm/brcm,nsp.yaml | 2 +- Documentation/devicetree/bindings/arm/bcm/brcm,stingray.yaml | 2 +- Documentation/devicetree/bindings/arm/bcm/brcm,vulcan-soc.yaml | 2 +- Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml | 2 +- Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml | 2 +- Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml | 2 +- Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml | 2 +- Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml | 2 +- Documentation/devicetree/bindings/arm/mstar/mstar.yaml | 2 +- Documentation/devicetree/bindings/arm/npcm/npcm.yaml | 2 +- Documentation/devicetree/bindings/arm/nxp/lpc32xx.yaml | 2 +- Documentation/devicetree/bindings/arm/socionext/milbeaut.yaml | 2 +- Documentation/devicetree/bindings/arm/socionext/uniphier.yaml | 2 +- Documentation/devicetree/bindings/arm/sprd/sprd.yaml | 2 +- Documentation/devicetree/bindings/arm/stm32/stm32.yaml | 2 +- .../devicetree/bindings/arm/sunxi/allwinner,sun6i-a31-cpuconfig.yaml | 2 +- .../devicetree/bindings/arm/sunxi/allwinner,sun9i-a80-prcm.yaml | 2 +- .../devicetree/bindings/arm/tegra/nvidia,tegra-ccplex-cluster.yaml | 2 +- Documentation/devicetree/bindings/arm/ti/k3.yaml | 2 +- Documentation/devicetree/bindings/arm/ti/ti,davinci.yaml | 2 +- Documentation/devicetree/bindings/clock/ingenic,cgu.yaml | 2 +- Documentation/devicetree/bindings/clock/renesas,versaclock7.yaml | 2 +- Documentation/devicetree/bindings/display/bridge/anx6345.yaml | 2 +- Documentation/devicetree/bindings/display/bridge/chrontel,ch7033.yaml | 2 +- Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml | 2 +- Documentation/devicetree/bindings/display/bridge/ite,it66121.yaml | 2 +- Documentation/devicetree/bindings/display/bridge/ps8640.yaml | 2 +- Documentation/devicetree/bindings/display/ingenic,ipu.yaml | 2 +- Documentation/devicetree/bindings/display/ingenic,lcd.yaml | 2 +- Documentation/devicetree/bindings/display/mediatek/mediatek,cec.yaml | 2 +- Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml | 2 +- .../devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml | 2 +- Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml | 2 +- Documentation/devicetree/bindings/display/panel/ilitek,ili9163.yaml | 2 +- Documentation/devicetree/bindings/display/panel/panel-lvds.yaml | 2 +- Documentation/devicetree/bindings/display/panel/visionox,rm69299.yaml | 2 +- Documentation/devicetree/bindings/dma/ingenic,dma.yaml | 2 +- Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml | 2 +- Documentation/devicetree/bindings/dma/ti/k3-pktdma.yaml | 2 +- Documentation/devicetree/bindings/dma/ti/k3-udma.yaml | 2 +- Documentation/devicetree/bindings/dma/xilinx/xlnx,zynqmp-dpdma.yaml | 2 +- Documentation/devicetree/bindings/eeprom/microchip,93lc46b.yaml | 2 +- Documentation/devicetree/bindings/i2c/ingenic,i2c.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/allwinner,sun8i-a33-ths.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/ti,palmas-gpadc.yaml | 2 +- Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml | 2 +- .../devicetree/bindings/input/touchscreen/chipone,icn8318.yaml | 2 +- .../devicetree/bindings/input/touchscreen/pixcir,pixcir_ts.yaml | 2 +- Documentation/devicetree/bindings/input/touchscreen/silead,gsl1680.yaml | 2 +- .../devicetree/bindings/interrupt-controller/ingenic,intc.yaml | 2 +- .../devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml | 2 +- Documentation/devicetree/bindings/media/allwinner,sun6i-a31-isp.yaml | 2 +- Documentation/devicetree/bindings/media/i2c/dongwoon,dw9768.yaml | 2 +- Documentation/devicetree/bindings/media/i2c/ov8856.yaml | 2 +- Documentation/devicetree/bindings/media/i2c/ovti,ov02a10.yaml | 2 +- Documentation/devicetree/bindings/media/i2c/ovti,ov5640.yaml | 2 +- Documentation/devicetree/bindings/media/i2c/ovti,ov5645.yaml | 2 +- Documentation/devicetree/bindings/media/i2c/ovti,ov5648.yaml | 2 +- Documentation/devicetree/bindings/media/i2c/ovti,ov8865.yaml | 2 +- Documentation/devicetree/bindings/media/i2c/st,st-vgxy61.yaml | 2 +- .../bindings/memory-controllers/ingenic,nemc-peripherals.yaml | 2 +- Documentation/devicetree/bindings/memory-controllers/ingenic,nemc.yaml | 2 +- Documentation/devicetree/bindings/memory-controllers/ti,gpmc.yaml | 2 +- Documentation/devicetree/bindings/mips/ingenic/devices.yaml | 2 +- Documentation/devicetree/bindings/mips/lantiq/lantiq,dma-xway.yaml | 2 +- Documentation/devicetree/bindings/mips/loongson/devices.yaml | 2 +- Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml | 2 +- Documentation/devicetree/bindings/mtd/ingenic,nand.yaml | 2 +- Documentation/devicetree/bindings/net/can/allwinner,sun4i-a10-can.yaml | 2 +- Documentation/devicetree/bindings/net/can/bosch,c_can.yaml | 2 +- Documentation/devicetree/bindings/net/can/ctu,ctucanfd.yaml | 2 +- Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml | 2 +- Documentation/devicetree/bindings/net/dsa/dsa-port.yaml | 2 +- Documentation/devicetree/bindings/net/dsa/dsa.yaml | 2 +- Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml | 2 +- Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml | 2 +- Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml | 2 +- Documentation/devicetree/bindings/net/wireless/esp,esp8089.yaml | 2 +- Documentation/devicetree/bindings/net/wireless/microchip,wilc1000.yaml | 2 +- Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml | 2 +- Documentation/devicetree/bindings/nvmem/qcom,spmi-sdam.yaml | 2 +- Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml | 2 +- Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.yaml | 2 +- Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.yaml | 2 +- Documentation/devicetree/bindings/power/supply/maxim,ds2760.yaml | 2 +- Documentation/devicetree/bindings/power/supply/maxim,max14656.yaml | 2 +- Documentation/devicetree/bindings/rtc/epson,rx8900.yaml | 2 +- Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml | 2 +- Documentation/devicetree/bindings/rtc/renesas,rzn1-rtc.yaml | 2 +- Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml | 2 +- Documentation/devicetree/bindings/serial/ingenic,uart.yaml | 2 +- Documentation/devicetree/bindings/serial/serial.yaml | 2 +- Documentation/devicetree/bindings/soc/mediatek/mtk-svs.yaml | 2 +- Documentation/devicetree/bindings/sound/cirrus,cs42l51.yaml | 2 +- Documentation/devicetree/bindings/sound/ingenic,aic.yaml | 2 +- Documentation/devicetree/bindings/sound/ingenic,codec.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 2 +- Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml | 2 +- Documentation/devicetree/bindings/sound/realtek,rt1015p.yaml | 2 +- Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml | 2 +- Documentation/devicetree/bindings/sound/ti,src4xxx.yaml | 2 +- Documentation/devicetree/bindings/spi/ingenic,spi.yaml | 2 +- Documentation/devicetree/bindings/spi/spi-gpio.yaml | 2 +- Documentation/devicetree/bindings/timer/ingenic,tcu.yaml | 2 +- Documentation/devicetree/bindings/usb/ingenic,musb.yaml | 2 +- Documentation/devicetree/bindings/usb/maxim,max33359.yaml | 2 +- Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml | 2 +- Documentation/devicetree/bindings/usb/ti,tps6598x.yaml | 2 +- Documentation/devicetree/bindings/usb/willsemi,wusb3801.yaml | 2 +- 120 files changed, 120 insertions(+), 120 deletions(-) commit a0c2153dcfa0a7f58f189622c6c045ff5aafe08e Author: Krzysztof Kozlowski Date: Fri Dec 16 17:38:09 2022 +0100 dt-bindings: clock: st,stm32mp1-rcc: add proper title Add device name in the title, because "Reset Clock Controller" sounds too generic. Signed-off-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Acked-by: Ulf Hansson # MMC Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20221216163815.522628-4-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d94e28505f8033adf98434573074b400c081902 Author: Krzysztof Kozlowski Date: Fri Dec 16 17:38:08 2022 +0100 dt-bindings: memory-controllers: ti,gpmc-child: drop redundant part of title The Devicetree bindings document does not have to say in the title that it is a "Devicetree binding", but instead just describe the hardware. Signed-off-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Acked-by: Ulf Hansson # MMC Link: https://lore.kernel.org/r/20221216163815.522628-3-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/memory-controllers/ti,gpmc-child.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab040c42237f47dffbb1b83bd4e29f739b3a917e Author: Krzysztof Kozlowski Date: Fri Dec 16 17:38:07 2022 +0100 dt-bindings: drop redundant part of title of shared bindings The Devicetree bindings document does not have to say in the title that it is a "binding", but instead just describe the hardware. For shared (re-usable) schemas, name them all as "common properties". Signed-off-by: Krzysztof Kozlowski Acked-by: Guenter Roeck # watchdog Acked-by: Alexandre Belloni Acked-by: Jonathan Cameron # IIO Acked-by: Miquel Raynal Acked-by: Ulf Hansson # MMC Acked-by: Stephen Boyd # clk Acked-by: Vinod Koul # dma Acked-by: Mark Brown Acked-by: Hans Verkuil # media Acked-by: Sebastian Reichel # power Acked-by: Viresh Kumar # opp Link: https://lore.kernel.org/r/20221216163815.522628-2-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/clock/qcom,gcc.yaml | 2 +- Documentation/devicetree/bindings/dma/dma-common.yaml | 2 +- Documentation/devicetree/bindings/dma/dma-controller.yaml | 2 +- Documentation/devicetree/bindings/dma/dma-router.yaml | 2 +- Documentation/devicetree/bindings/iio/adc/adc.yaml | 2 +- Documentation/devicetree/bindings/input/input.yaml | 2 +- Documentation/devicetree/bindings/media/video-interface-devices.yaml | 2 +- Documentation/devicetree/bindings/media/video-interfaces.yaml | 2 +- Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 2 +- Documentation/devicetree/bindings/mtd/nand-chip.yaml | 2 +- Documentation/devicetree/bindings/mtd/nand-controller.yaml | 2 +- .../devicetree/bindings/net/bluetooth/bluetooth-controller.yaml | 2 +- Documentation/devicetree/bindings/net/can/can-controller.yaml | 2 +- Documentation/devicetree/bindings/net/ethernet-controller.yaml | 2 +- Documentation/devicetree/bindings/net/ethernet-phy.yaml | 2 +- Documentation/devicetree/bindings/net/mdio.yaml | 2 +- Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 2 +- Documentation/devicetree/bindings/rtc/rtc.yaml | 2 +- Documentation/devicetree/bindings/soundwire/soundwire-controller.yaml | 2 +- Documentation/devicetree/bindings/spi/spi-controller.yaml | 2 +- Documentation/devicetree/bindings/watchdog/watchdog.yaml | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) commit e21a77d8dabe3c6384cdd485cb129c7d2a426708 Author: Marek Vasut Date: Mon Nov 7 17:03:38 2022 +0100 dt-bindings: watchdog: gpio: Convert bindings to YAML Convert the gpio-wdt bindings from text to YAML ones, to permit DT validation. Reviewed-by: Rob Herring Signed-off-by: Marek Vasut Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221107160338.27910-1-marex@denx.de [robh: add missing 'always-running'] Signed-off-by: Rob Herring .../devicetree/bindings/watchdog/gpio-wdt.txt | 28 ----------- .../bindings/watchdog/linux,wdt-gpio.yaml | 55 ++++++++++++++++++++++ 2 files changed, 55 insertions(+), 28 deletions(-) commit 1a2cead15bcfac872c15457ef50ffbbe5ff641bc Author: Marek Vasut Date: Sun Dec 11 03:48:59 2022 +0100 dt-bindings: imx6q-pcie: Handle more resets on legacy platforms The i.MX6 and i.MX7D does not use block controller to toggle PCIe reset, hence the PCIe DT description contains three reset entries on these older SoCs. Add this exception into the binding document. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20221211024859.672076-3-marex@denx.de Signed-off-by: Rob Herring .../devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 35 +++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) commit 8b8161edf14acab716c01d03bafc8a3e8113a43a Author: Marek Vasut Date: Sun Dec 11 03:48:58 2022 +0100 dt-bindings: imx6q-pcie: Handle various PD configurations The i.MX SoCs have various power domain configurations routed into the PCIe IP. MX6SX is the only one which contains 2 domains and also uses power-domain-names. MX6QDL do not use any domains. All the rest uses one domain and does not use power-domain-names anymore. Document all those configurations in the DT binding document. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20221211024859.672076-2-marex@denx.de Signed-off-by: Rob Herring .../devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 22c9f19002c7536b30bc15b6fb6276d62be2f758 Author: Marek Vasut Date: Sun Dec 11 03:48:57 2022 +0100 dt-bindings: imx6q-pcie: Handle various clock configurations The i.MX SoCs have various clock configurations routed into the PCIe IP, the list of clock is below. Document all those configurations in the DT binding document. All SoCs: pcie, pcie_bus 6QDL, 7D: + pcie_phy 6SX: + pcie_phy pcie_inbound_axi 8MQ: + pcie_phy pcie_aux 8MM, 8MP: + pcie_aux Reviewed-by: Rob Herring Acked-by: Alexander Stein Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20221211024859.672076-1-marex@denx.de Signed-off-by: Rob Herring .../devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 37 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) commit 435beb4110da372c313398891ca9eee87f83d3db Author: Krzysztof Kozlowski Date: Tue Dec 13 11:06:26 2022 +0100 dt-bindings: hwmon: ntc-thermistor: drop Naveen Krishna Chatradhi from maintainers Emails to Naveen Krishna Chatradhi bounce ("550 5.1.1 Recipient address rejected: User unknown"). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213100626.36150-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/hwmon/ntc-thermistor.yaml | 1 - 1 file changed, 1 deletion(-) commit f62678a77d585cf3f6302a5a4e2265b1a97b004b Author: Marek Vasut Date: Tue Dec 13 14:20:06 2022 +0100 dt-bindings: mxsfb: Document i.MX8M/i.MX6SX/i.MX6SL power-domains property The power-domains property is mandatory on i.MX8M Mini, Nano, Plus and i.MX6SX, i.MX6SL. Document the property and mark it as required on the aforementioned variants of the IP, present in those SoCs. Signed-off-by: Marek Vasut Reviewed-by: Krzysztof Kozlowski Reviewed-by: Liu Ying Link: https://lore.kernel.org/r/20221213132006.6446-1-marex@denx.de Signed-off-by: Rob Herring Documentation/devicetree/bindings/display/fsl,lcdif.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 5fa9f7292b17bcd66da93226fc28fe1f755af154 Author: Krzysztof Kozlowski Date: Fri Dec 2 12:05:36 2022 +0100 dt-bindings: vendor-prefixes: sort entries alphabetically Sort entries alphabetically. This was a semi manual job with help of: cat Documentation/devicetree/bindings/vendor-prefixes.yaml | grep '":' > old cat old | sort > new diff -ubB old new Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221202110536.22230-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring .../devicetree/bindings/vendor-prefixes.yaml | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) commit d8a76e46d7d3d6db5458d7f46205153ca9a53afd Author: Thierry Reding Date: Wed Nov 30 16:41:11 2022 +0100 dt-bindings: usb: tegra-xusb: Remove path references Unresolved path references are now flagged as errors when checking the device tree binding examples, so convert them into label references. Reported-by: Conor Dooley Suggested-by: Rob Herring Signed-off-by: Thierry Reding Acked-by: Rob Herring Tested-by: Geert Uytterhoeven Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221130154111.1655603-1-thierry.reding@gmail.com Signed-off-by: Rob Herring Documentation/devicetree/bindings/usb/nvidia,tegra124-xusb.yaml | 4 +--- Documentation/devicetree/bindings/usb/nvidia,tegra186-xusb.yaml | 4 +--- Documentation/devicetree/bindings/usb/nvidia,tegra194-xusb.yaml | 8 ++------ Documentation/devicetree/bindings/usb/nvidia,tegra210-xusb.yaml | 8 ++------ 4 files changed, 6 insertions(+), 18 deletions(-) commit a7d550f82b445cf218b47a2c1a9c56e97ecb8c7a Author: Alexander Sverdlin Date: Mon Dec 12 00:58:17 2022 +0100 of: fdt: Honor CONFIG_CMDLINE* even without /chosen node I do not read a strict requirement on /chosen node in either ePAPR or in Documentation/devicetree. Help text for CONFIG_CMDLINE and CONFIG_CMDLINE_EXTEND doesn't make their behavior explicitly dependent on the presence of /chosen or the presense of /chosen/bootargs. However the early check for /chosen and bailing out in early_init_dt_scan_chosen() skips CONFIG_CMDLINE handling which is not really related to /chosen node or the particular method of passing cmdline from bootloader. This leads to counterintuitive combinations (assuming CONFIG_CMDLINE_EXTEND=y): a) bootargs="foo", CONFIG_CMDLINE="bar" => cmdline=="foo bar" b) /chosen missing, CONFIG_CMDLINE="bar" => cmdline=="" c) bootargs="", CONFIG_CMDLINE="bar" => cmdline==" bar" Move CONFIG_CMDLINE handling outside of early_init_dt_scan_chosen() so that cases b and c above result in the same cmdline. Signed-off-by: Alexander Sverdlin Reviewed-by: Linus Walleij Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/11af73e05bad75e4ef49067515e3214f6d944b3d.camel@gmail.com Signed-off-by: Rob Herring drivers/of/fdt.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 53eab8e76667b124615a943a033cdf97c80c242a Author: Jens Axboe Date: Fri Dec 16 08:20:31 2022 -0700 block: don't clear REQ_ALLOC_CACHE for non-polled requests Since commit: b99182c501c3 ("bio: add pcpu caching for non-polling bio_put") we support bio caching for IRQ based IO as well, hence there's no need to manually clear REQ_ALLOC_CACHE if we disable polling on a request. Reviewed-by: Keith Busch Signed-off-by: Jens Axboe include/linux/bio.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e982ad82bd8f7931f5788a15dfa3709f7a7ee79f Author: Thomas Gleixner Date: Fri Dec 16 11:08:52 2022 +0000 genirq/msi: Return MSI_XA_DOMAIN_SIZE as the maximum MSI index when no domain is present On architectures such as s390 that do not use irq domains for MSI, returning 0 as the maximum MSI index is a bit counter-productive, as it indicates that no MSI can be allocated. Bad idea. Instead, return the maximum we're willing to support in the MSI backing store (MSI_XA_DOMAIN_SIZE), and let the arch code do its usual thing. Thanks to Matthew Rosato for fixing the fix. Reported-by: Guenter Roeck Signed-off-by: Thomas Gleixner [maz: commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/87fsdgzpqs.ffs@tglx kernel/irq/msi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db3568fd80a3999413c04ea0cf52596b7b0ad9aa Author: Marc Zyngier Date: Fri Dec 16 11:03:02 2022 +0000 genirq/msi: Check for the presence of an irq domain when validating msi_ctrl For architectures such as s390 and powerpc that do not use irq domains for MSIs, dev->msi.domain is always NULL, so the per-device, per-bus MSI domain is also guaranteed to be NULL. So checking one without checking the other is bound to result in a splat, followed by a memory leak as we don't free the MSI descriptors. Add the missing check. Reported-by: Matthew Rosato Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/e570e70d-19bc-101b-0481-ff9a3cab3504@linux.ibm.com kernel/irq/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4ff17c448a7b0f437a17622d67f1c5c609c3a0e9 Author: Alexander Gordeev Date: Fri Dec 16 10:50:41 2022 +0100 libperf: Fix install_pkgconfig target Commit 47e02b94a4c98dcc ("tools lib perf: Add dependency test to install_headers") misses the notion of $(DESTDIR_SQ) for install_pkgconfig target, which leads to error: install: cannot create regular file '/usr/lib64/pkgconfig/libperf.pc': Permission denied make: *** [Makefile:210: install_pkgconfig] Error 1 Signed-off-by: Alexander Gordeev Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Mark Rutland Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tom Rix Cc: bpf@vger.kernel.org Cc: llvm@lists.linux.dev Link: http://lore.kernel.org/lkml/Y5w/cWKyb8vpNMfA@li-4a3a4a4c-28e5-11b2-a85c-a8d192c6f089.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 980411a4d1bb925d28cd9e8d8301dc982ece788d Author: Michael Ellerman Date: Fri Dec 16 12:43:12 2022 +1100 powerpc/code-patching: Fix oops with DEBUG_VM enabled Nathan reported that the new per-cpu mm patching oopses if DEBUG_VM is enabled: ------------[ cut here ]------------ kernel BUG at arch/powerpc/mm/pgtable.c:333! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA PowerNV Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc2+ #1 Hardware name: IBM PowerNV (emulated by qemu) POWER9 0x4e1200 opal:v7.0 PowerNV ... NIP assert_pte_locked+0x180/0x1a0 LR assert_pte_locked+0x170/0x1a0 Call Trace: 0x60000000 (unreliable) patch_instruction+0x618/0x6d0 arch_prepare_kprobe+0xfc/0x2d0 register_kprobe+0x520/0x7c0 arch_init_kprobes+0x28/0x3c init_kprobes+0x108/0x184 do_one_initcall+0x60/0x2e0 kernel_init_freeable+0x1f0/0x3e0 kernel_init+0x34/0x1d0 ret_from_kernel_thread+0x5c/0x64 It's caused by the assert_spin_locked() failing in assert_pte_locked(). The assert fails because the PTE was unlocked in text_area_cpu_up_mm(), and never relocked. The PTE page shouldn't be freed, the patching_mm is only used for patching on this CPU, only that single PTE is ever mapped, and it's only unmapped at CPU offline. In fact assert_pte_locked() has a special case to ignore init_mm entirely, and the patching_mm is more-or-less like init_mm, so possibly the check could be skipped for patching_mm too. But for now be conservative, and use the proper PTE accessors at patching time, so that the PTE lock is held while the PTE is used. That also avoids the warning in assert_pte_locked(). With that it's no longer necessary to save the PTE in cpu_patching_context for the mm_patch_enabled() case. Fixes: c28c15b6d28a ("powerpc/code-patching: Use temporary mm for Radix MMU") Reported-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221216125913.990972-1-mpe@ellerman.id.au arch/powerpc/lib/code-patching.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 1a931707ad4a46e79d4ecfee56d8f6e8cc8d4f28 Merge: 818448e9cf92 84e57d292203 Author: Arnaldo Carvalho de Melo Date: Fri Dec 16 09:53:53 2022 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To resolve a trivial merge conflict with c302378bc157f6a7 ("libbpf: Hashmap interface update to allow both long and void* keys/values"), where a function present upstream was removed in the perf tools development tree. Signed-off-by: Arnaldo Carvalho de Melo commit 71a7507afbc3f27c346898f13ab9bfd918613c34 Merge: ba54ff1fb662 f18caf261398 Author: Linus Torvalds Date: Fri Dec 16 03:54:54 2022 -0800 Merge tag 'driver-core-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the set of driver core and kernfs changes for 6.2-rc1. The "big" change in here is the addition of a new macro, container_of_const() that will preserve the "const-ness" of a pointer passed into it. The "problem" of the current container_of() macro is that if you pass in a "const *", out of it can comes a non-const pointer unless you specifically ask for it. For many usages, we want to preserve the "const" attribute by using the same call. For a specific example, this series changes the kobj_to_dev() macro to use it, allowing it to be used no matter what the const value is. This prevents every subsystem from having to declare 2 different individual macros (i.e. kobj_const_to_dev() and kobj_to_dev()) and having the compiler enforce the const value at build time, which having 2 macros would not do either. The driver for all of this have been discussions with the Rust kernel developers as to how to properly mark driver core, and kobject, objects as being "non-mutable". The changes to the kobject and driver core in this pull request are the result of that, as there are lots of paths where kobjects and device pointers are not modified at all, so marking them as "const" allows the compiler to enforce this. So, a nice side affect of the Rust development effort has been already to clean up the driver core code to be more obvious about object rules. All of this has been bike-shedded in quite a lot of detail on lkml with different names and implementations resulting in the tiny version we have in here, much better than my original proposal. Lots of subsystem maintainers have acked the changes as well. Other than this change, included in here are smaller stuff like: - kernfs fixes and updates to handle lock contention better - vmlinux.lds.h fixes and updates - sysfs and debugfs documentation updates - device property updates All of these have been in the linux-next tree for quite a while with no problems" * tag 'driver-core-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (58 commits) device property: Fix documentation for fwnode_get_next_parent() firmware_loader: fix up to_fw_sysfs() to preserve const usb.h: take advantage of container_of_const() device.h: move kobj_to_dev() to use container_of_const() container_of: add container_of_const() that preserves const-ness of the pointer driver core: fix up missed drivers/s390/char/hmcdrv_dev.c class.devnode() conversion. driver core: fix up missed scsi/cxlflash class.devnode() conversion. driver core: fix up some missing class.devnode() conversions. driver core: make struct class.devnode() take a const * driver core: make struct class.dev_uevent() take a const * cacheinfo: Remove of_node_put() for fw_token device property: Add a blank line in Kconfig of tests device property: Rename goto label to be more precise device property: Move PROPERTY_ENTRY_BOOL() a bit down device property: Get rid of __PROPERTY_ENTRY_ARRAY_EL*SIZE*() kernfs: fix all kernel-doc warnings and multiple typos driver core: pass a const * into of_device_uevent() kobject: kset_uevent_ops: make name() callback take a const * kobject: kset_uevent_ops: make filter() callback take a const * kobject: make kobject_namespace take a const * ... commit ba54ff1fb662215de683777f815b9e96276d55cf Merge: dd6f9b17cd7a f361c96c7518 Author: Linus Torvalds Date: Fri Dec 16 03:49:24 2022 -0800 Merge tag 'char-misc-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here is the large set of char/misc and other driver subsystem changes for 6.2-rc1. Nothing earth-shattering in here at all, just a lot of new driver development and minor fixes. Highlights include: - fastrpc driver updates - iio new drivers and updates - habanalabs driver updates for new hardware and features - slimbus driver updates - speakup module parameters added to aid in boot time configuration - i2c probe_new conversions for lots of different drivers - other small driver fixes and additions One semi-interesting change in here is the increase of the number of misc dynamic minors available to 1048448 to handle new huge-cpu systems. All of these have been in linux-next for a while with no reported problems" * tag 'char-misc-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (521 commits) extcon: usbc-tusb320: Convert to i2c's .probe_new() extcon: rt8973: Convert to i2c's .probe_new() extcon: fsa9480: Convert to i2c's .probe_new() extcon: max77843: Replace irqchip mask_invert with unmask_base chardev: fix error handling in cdev_device_add() mcb: mcb-parse: fix error handing in chameleon_parse_gdd() drivers: mcb: fix resource leak in mcb_probe() coresight: etm4x: fix repeated words in comments coresight: cti: Fix null pointer error on CTI init before ETM coresight: trbe: remove cpuhp instance node before remove cpuhp state counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update misc: fastrpc: Add dma_mask to fastrpc_channel_ctx misc: fastrpc: Add mmap request assigning for static PD pool misc: fastrpc: Safekeep mmaps on interrupted invoke misc: fastrpc: Add support for audiopd misc: fastrpc: Rework fastrpc_req_munmap misc: fastrpc: Use fastrpc_map_put in fastrpc_map_create on fail misc: fastrpc: Add fastrpc_remote_heap_alloc misc: fastrpc: Add reserved mem support misc: fastrpc: Rename audio protection domain to root ... commit dd6f9b17cd7af68b6a5090deedf1f5e84f66f4e6 Merge: b83a7080d300 6373ab4dfee7 Author: Linus Torvalds Date: Fri Dec 16 03:31:56 2022 -0800 Merge tag 'tty-6.2-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 tty/serial driver changes for 6.2-rc1. As in previous kernel releases, nothing big here at all, just some small incremental serial/tty layer cleanups and some individual driver additions and fixes. Highlights are: - serial helper macros from Jiri Slaby to reduce the amount of duplicated code in serial drivers - api cleanups and consolidations from Ilpo Järvinen in lots of serial drivers - the usual set of n_gsm fixes from Daniel Starke as that code gets exercised more - TIOCSTI is finally able to be disabled if requested (security hardening feature from Kees Cook) - fsl_lpuart driver fixes and features added - other small serial driver additions and fixes All of these have been in linux-next for a while with no reported problems" * tag 'tty-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (97 commits) serial: atmel: don't stop the transmitter when doing PIO serial: atmel: cleanup atmel_start+stop_tx() tty: serial: fsl_lpuart: switch to new dmaengine_terminate_* API serial: sunsab: Fix error handling in sunsab_init() serial: altera_uart: fix locking in polling mode serial: pch: Fix PCI device refcount leak in pch_request_dma() tty: serial: fsl_lpuart: Use pm_ptr() to avoid need to make pm __maybe_unused tty: serial: fsl_lpuart: Add runtime pm support tty: serial: fsl_lpuart: enable wakeup source for lpuart serdev: Replace poll loop by readx_poll_timeout() macro tty: synclink_gt: unwind actions in error path of net device open serial: stm32: move dma_request_chan() before clk_prepare_enable() dt-bindings: serial: xlnx,opb-uartlite: Drop 'contains' from 'xlnx,use-parity' serial: pl011: Do not clear RX FIFO & RX interrupt in unthrottle. serial: amba-pl011: avoid SBSA UART accessing DMACR register tty: serial: altera_jtaguart: remove struct altera_jtaguart tty: serial: altera_jtaguart: use uart_port::read_status_mask tty: serial: altera_jtaguart: remove unused altera_jtaguart::sigs tty: serial: altera_jtaguart: remove flag from altera_jtaguart_rx_chars() n_tty: Rename tail to old_tail in n_tty_read() ... commit b83a7080d30032cf70832bc2bb04cc342e203b88 Merge: 58bcac11fd94 37aa6b982370 Author: Linus Torvalds Date: Fri Dec 16 03:27:03 2022 -0800 Merge tag 'staging-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the large set of staging driver changes for 6.2-rc1. Another round of cleanups for staging drivers with no big additions. Overall more lines were removed than added, always a nice sign, with nothing happening in here other than general coding style cleanups and minor fixes in the drivers. Full, boring, details are in the shortlog. All of these have been in linux-next for a while with no reported problems" * tag 'staging-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (253 commits) vme: Use root_device_register() not underlined version staging: rtl8192e: Fix spelling mistake "ContryIE" -> "CountryIE" vme: Fix error not catched in fake_init() staging: vme_user: remove multiple blank lines staging: r8188eu: use subtype helper in rtw_check_bcn_info staging: r8188eu: use subtype helpers in collect_bss_info staging: r8188eu: remove unused da parameter staging: r8188eu: merge two probereq_p2p functions staging: r8188eu: simplify err handling for unknown station staging: r8188eu: handle the non-ap case first staging: r8188eu: move bBusyTraffic update staging: r8188eu: read reason code from ieee80211_mgmt staging: r8188eu: use ieee80211_mgmt to parse addresses staging: r8188eu: remove a variable staging: r8188eu: simplify error handling for missing station staging: r8188eu: stop beacon processing if kmalloc fails staging: r8188eu: exit if beacon is not from our bss staging: r8188eu: simplify update_sta_support_rate params staging: r8188eu: use ie buffer in update_beacon_info staging: r8188eu: pass only ies to process_p2p_ps_ie ... commit 58bcac11fd94f950abc7b8466c5ceac7be07a00e Merge: 84e57d292203 81c25247a2a0 Author: Linus Torvalds Date: Fri Dec 16 03:22:53 2022 -0800 Merge tag 'usb-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB and Thunderbolt driver updates from Greg KH: "Here is the large set of USB and Thunderbolt driver changes for 6.2-rc1. Overall, thanks to the removal of a driver, more lines were removed than added, a nice change. Highlights include: - removal of the sisusbvga driver that was not used by anyone anymore - minor thunderbolt driver changes and tweaks - chipidea driver updates - usual set of typec driver features and hardware support added - musb minor driver fixes - fotg210 driver fixes, bringing that hardware back from the "dead" - minor dwc3 driver updates - addition, and then removal, of a list.h helper function for many USB and other subsystem drivers, that ended up breaking the build. That will come back for 6.3-rc1, it missed this merge window. - usual xhci updates and enhancements - usb-serial driver updates and support for new devices - other minor USB driver updates All of these have been in linux-next for a while with no reported problems" * tag 'usb-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (153 commits) usb: gadget: uvc: Rename bmInterfaceFlags -> bmInterlaceFlags usb: dwc2: power on/off phy for peripheral mode in dual-role mode usb: dwc2: disable lpm feature on Rockchip SoCs dt-bindings: usb: mtk-xhci: add support for mt7986 usb: dwc3: core: defer probe on ulpi_read_id timeout usb: ulpi: defer ulpi_register on ulpi_read_id timeout usb: misc: onboard_usb_hub: add Genesys Logic GL850G hub support dt-bindings: usb: Add binding for Genesys Logic GL850G hub controller dt-bindings: vendor-prefixes: add Genesys Logic usb: fotg210-udc: fix potential memory leak in fotg210_udc_probe() usb: typec: tipd: Set mode of operation for USB Type-C connector usb: gadget: udc: drop obsolete dependencies on COMPILE_TEST usb: musb: remove extra check in musb_gadget_vbus_draw usb: gadget: uvc: Prevent buffer overflow in setup handler usb: dwc3: qcom: Fix memory leak in dwc3_qcom_interconnect_init usb: typec: wusb3801: fix fwnode refcount leak in wusb3801_probe() usb: storage: Add check for kcalloc USB: sisusbvga: use module_usb_driver() USB: sisusbvga: rename sisusb.c to sisusbvga.c USB: sisusbvga: remove console support ... commit ad2631b5645a1d0ca9bf6fecf71f77e3b0071ee5 Author: Chen-Yu Tsai Date: Tue Sep 27 12:11:19 2022 +0200 arm64: dts: mt8183: Fix Mali GPU clock The actual clock feeding into the Mali GPU on the MT8183 is from the clock gate in the MFGCFG block, not CLK_TOP_MFGPLL_CK from the TOPCKGEN block, which itself is simply a pass-through placeholder for the MFGPLL in the APMIXEDSYS block. Fix the hardware description with the correct clock reference. Fixes: a8168cebf1bc ("arm64: dts: mt8183: Add node for the Mali GPU") Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20220927101128.44758-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4a4175201014c0222f6bab1895a17b3d1b92f08 Author: Macpaul Lin Date: Fri Nov 11 17:55:40 2022 +0800 arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon The size of device tree node secmon (bl31_secmon_reserved) was incorrect. It should be increased to 2MiB (0x200000). The origin setting will cause some abnormal behavior due to trusted-firmware-a and related firmware didn't load correctly. The incorrect behavior may vary because of different software stacks. For example, it will cause build error in some Yocto project because it will check if there was enough memory to load trusted-firmware-a to the reserved memory. When mt8195-demo.dts sent to the upstream, at that time the size of BL31 was small. Because supported functions and modules in BL31 are basic sets when the board was under early development stage. Now BL31 includes more firmwares of coprocessors and maturer functions so the size has grown bigger in real applications. According to the value reported by customers, we think reserved 2MiB for BL31 might be enough for maybe the following 2 or 3 years. Cc: stable@vger.kernel.org # v5.19 Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board") Signed-off-by: Macpaul Lin Reviewed-by: Miles Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221111095540.28881-1-macpaul.lin@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dba8eb83af9dd757ef645b52200775e86883d858 Author: Chun-Jie Chen Date: Fri Oct 14 18:20:29 2022 +0800 soc: mediatek: pm-domains: Fix the power glitch issue Power reset maybe generate unexpected signal. In order to avoid the glitch issue, we need to enable isolation first to guarantee the stable signal when power reset is triggered. Fixes: 59b644b01cf4 ("soc: mediatek: Add MediaTek SCPSYS power domains") Signed-off-by: Chun-Jie Chen Signed-off-by: Allen-KH Cheng Reviewed-by: Chen-Yu Tsai Reviewed-by: Miles Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221014102029.1162-1-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pm-domains.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68bb10101e6b0a6bb44e9c908ef795fc4af99eae Author: Eelco Chaudron Date: Thu Dec 15 15:46:33 2022 +0100 openvswitch: Fix flow lookup to use unmasked key The commit mentioned below causes the ovs_flow_tbl_lookup() function to be called with the masked key. However, it's supposed to be called with the unmasked key. This due to the fact that the datapath supports installing wider flows, and OVS relies on this behavior. For example if ipv4(src=1.1.1.1/192.0.0.0, dst=1.1.1.2/192.0.0.0) exists, a wider flow (smaller mask) of ipv4(src=192.1.1.1/128.0.0.0,dst=192.1.1.2/ 128.0.0.0) is allowed to be added. However, if we try to add a wildcard rule, the installation fails: $ ovs-appctl dpctl/add-flow system@myDP "in_port(1),eth_type(0x0800), \ ipv4(src=1.1.1.1/192.0.0.0,dst=1.1.1.2/192.0.0.0,frag=no)" 2 $ ovs-appctl dpctl/add-flow system@myDP "in_port(1),eth_type(0x0800), \ ipv4(src=192.1.1.1/0.0.0.0,dst=49.1.1.2/0.0.0.0,frag=no)" 2 ovs-vswitchd: updating flow table (File exists) The reason is that the key used to determine if the flow is already present in the system uses the original key ANDed with the mask. This results in the IP address not being part of the (miniflow) key, i.e., being substituted with an all-zero value. When doing the actual lookup, this results in the key wrongfully matching the first flow, and therefore the flow does not get installed. This change reverses the commit below, but rather than having the key on the stack, it's allocated. Fixes: 190aa3e77880 ("openvswitch: Fix Frame-size larger than 1024 bytes warning.") Signed-off-by: Eelco Chaudron Signed-off-by: David S. Miller net/openvswitch/datapath.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 3e31d209ed5fceb4a50118accd461b3b9b13e589 Merge: 32f1002ed485 d1c4a3469e73 Author: David S. Miller Date: Fri Dec 16 10:21:37 2022 +0000 Merge branch 'devlink-fixes' Jakub Kicinski says: ==================== devlink: region snapshot locking fix and selftest adjustments Minor fix for region snapshot locking and adjustments to selftests. ==================== Signed-off-by: David S. Miller commit d1c4a3469e73730f7cbbcec661c2a9081af1aa45 Author: Jakub Kicinski Date: Wed Dec 14 18:01:02 2022 -0800 selftests: devlink: add a warning for interfaces coming up NetworkManager (and other daemons) may bring the interface up and cause failures in quiescence checks. Print a helpful warning, and take the interface down again. I seem to forget about this every time I run these tests on a new VM. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../testing/selftests/drivers/net/netdevsim/devlink_trap.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 2fc60e2ff972d3dca836bff0b08cbe503c4ca1ce Author: Jakub Kicinski Date: Wed Dec 14 18:01:01 2022 -0800 selftests: devlink: fix the fd redirect in dummy_reporter_test $number + > bash means redirect FD $number, e.g. commonly used 2> redirects stderr (fd 2). The test uses 8192> to write the number 8192 to a file, this results in: ./devlink.sh: line 499: 8192: Bad file descriptor Oddly the test also papers over this issue by checking for failure (expecting an error rather than success) so it passes, anyway. Fixes: ff18176ad806 ("selftests: Add a test of large binary to devlink health test") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller tools/testing/selftests/drivers/net/netdevsim/devlink.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b4cafb3d2c740f8d1b1234b43ac4a60e5291c960 Author: Jakub Kicinski Date: Wed Dec 14 18:01:00 2022 -0800 devlink: hold region lock when flushing snapshots Netdevsim triggers a splat on reload, when it destroys regions with snapshots pending: WARNING: CPU: 1 PID: 787 at net/core/devlink.c:6291 devlink_region_snapshot_del+0x12e/0x140 CPU: 1 PID: 787 Comm: devlink Not tainted 6.1.0-07460-g7ae9888d6e1c #580 RIP: 0010:devlink_region_snapshot_del+0x12e/0x140 Call Trace: devl_region_destroy+0x70/0x140 nsim_dev_reload_down+0x2f/0x60 [netdevsim] devlink_reload+0x1f7/0x360 devlink_nl_cmd_reload+0x6ce/0x860 genl_family_rcv_msg_doit.isra.0+0x145/0x1c0 This is the locking assert in devlink_region_snapshot_del(), we're supposed to be holding the region->snapshot_lock here. Fixes: 2dec18ad826f ("net: devlink: remove region snapshots list dependency on devlink->lock") Signed-off-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller net/core/devlink.c | 2 ++ 1 file changed, 2 insertions(+) commit 4e699e34f923188175986ad8a74ab99f7034075e Author: Ma Jun Date: Fri Dec 16 11:05:26 2022 +0800 drm/plane-helper: Add the missing declaration of drm_atomic_state Add the missing declaration of struct drm_atomic_state to fix the compile error below: error: 'struct drm_atomic_state' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] Signed-off-by: Ma Jun Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Fixes: 8401bd361f59 ("drm/plane-helper: Add a drm_plane_helper_atomic_check() helper") Cc: Javier Martinez Canillas Cc: Thomas Zimmermann Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: # v6.1+ Link: https://patchwork.freedesktop.org/patch/msgid/20221216030526.1335609-1-majun@amd.com include/drm/drm_plane_helper.h | 1 + 1 file changed, 1 insertion(+) commit 32f1002ed4851d9eb28ea1aba58757bd4b66e63b Author: Daniel Golle Date: Thu Dec 15 03:47:59 2022 +0000 net: dsa: mt7530: remove redundant assignment Russell King correctly pointed out that the MAC_2500FD capability is already added for port 5 (if not in RGMII mode) and port 6 (which only supports SGMII) by mt7531_mac_port_get_caps. Remove the reduntant setting of this capability flag which was added by a previous commit. Fixes: e19de30d2080 ("net: dsa: mt7530: add support for in-band link status") Reported-by: Russell King (Oracle) Reviewed-by: Russell King (Oracle) Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/Y5qY7x6la5TxZxzX@makrotopia.org Signed-off-by: Jakub Kicinski drivers/net/dsa/mt7530.c | 3 --- 1 file changed, 3 deletions(-) commit 84e57d292203a45c96dbcb2e6be9dd80961d981a Merge: 23dc9c755a19 36955d368dc1 Author: Linus Torvalds Date: Thu Dec 15 18:14:21 2022 -0800 Merge tag 'exfat-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat update from Namjae Jeon: - simplify and remove some redundant directory entry code - optimize the size of exfat_entry_set_cache and its allocation policy - improve the performance for creating files and directories * tag 'exfat-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: reuse exfat_find_location() to simplify exfat_get_dentry_set() exfat: fix overflow in sector and cluster conversion exfat: remove i_size_write() from __exfat_truncate() exfat: remove argument 'size' from exfat_truncate() exfat: remove unnecessary arguments from exfat_find_dir_entry() exfat: remove unneeded codes from __exfat_rename() exfat: remove call ilog2() from exfat_readdir() exfat: replace magic numbers with Macros exfat: rename exfat_free_dentry_set() to exfat_put_dentry_set() exfat: move exfat_entry_set_cache from heap to stack exfat: support dynamic allocate bh for exfat_entry_set_cache exfat: reduce the size of exfat_entry_set_cache exfat: hint the empty entry which at the end of cluster chain exfat: simplify empty entry hint commit 23dc9c755a19dea099df6ccb6dd129e24b4d5ad8 Merge: fe36bb8736ee 23e188a16423 Author: Linus Torvalds Date: Thu Dec 15 18:09:48 2022 -0800 Merge tag 'for-6.2/writeback-2022-12-12' of git://git.kernel.dk/linux Pull writeback updates from Jens Axboe: - Sanity check adding freed inodes to lists (Jan) - Removal of an old unused define (Miaohe) * tag 'for-6.2/writeback-2022-12-12' of git://git.kernel.dk/linux: writeback: remove obsolete macro EXPIRE_DIRTY_ATIME writeback: Add asserts for adding freed inode to lists commit fe36bb8736ee9e38fa6173e1271ed8c5cf7bc907 Merge: 851f657a8642 eb9d58947d40 Author: Linus Torvalds Date: Thu Dec 15 18:01:16 2022 -0800 Merge tag 'trace-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing updates from Steven Rostedt: - Add options to the osnoise tracer: - 'panic_on_stop' option that panics the kernel if osnoise is greater than some user defined threshold. - 'preempt' option, to test noise while preemption is disabled - 'irq' option, to test noise when interrupts are disabled - Add .percent and .graph suffix to histograms to give different outputs - Add nohitcount to disable showing hitcount in histogram output - Add new __cpumask() to trace event fields to annotate that a unsigned long array is a cpumask to user space and should be treated as one. - Add trace_trigger kernel command line parameter to enable trace event triggers at boot up. Useful to trace stack traces, disable tracing and take snapshots. - Fix x86/kmmio mmio tracer to work with the updates to lockdep - Unify the panic and die notifiers - Add back ftrace_expect reference that is used to extract more information in the ftrace_bug() code. - Have trigger filter parsing errors show up in the tracing error log. - Updated MAINTAINERS file to add kernel tracing mailing list and patchwork info - Use IDA to keep track of event type numbers. - And minor fixes and clean ups * tag 'trace-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (44 commits) tracing: Fix cpumask() example typo tracing: Improve panic/die notifiers ftrace: Prevent RCU stall on PREEMPT_VOLUNTARY kernels tracing: Do not synchronize freeing of trigger filter on boot up tracing: Remove pointer (asterisk) and brackets from cpumask_t field tracing: Have trigger filter parsing errors show up in error_log x86/mm/kmmio: Remove redundant preempt_disable() tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line Documentation/osnoise: Add osnoise/options documentation tracing/osnoise: Add preempt and/or irq disabled options tracing/osnoise: Add PANIC_ON_STOP option Documentation/osnoise: Escape underscore of NO_ prefix tracing: Fix some checker warnings tracing/osnoise: Make osnoise_options static tracing: remove unnecessary trace_trigger ifdef ring-buffer: Handle resize in early boot up tracing/hist: Fix issue of losting command info in error_log tracing: Fix issue of missing one synthetic field tracing/hist: Fix out-of-bound write on 'action_data.var_ref_idx' tracing/hist: Fix wrong return value in parse_action_params() ... commit f9eeef5918bbe1f2545d36280330dced25d6cf97 Author: Wei Yongjun Date: Wed Aug 17 08:03:32 2022 +0000 fault-injection: make stacktrace filter works as expected stacktrace filter is checked after others, such as fail-nth, interval and probability. This make it doesn't work well as expected. Fix to running stacktrace filter before other filters. It will speed up fault inject testing for driver modules. Link: https://lkml.kernel.org/r/20220817080332.1052710-5-weiyongjun1@huawei.com Signed-off-by: Wei Yongjun Cc: Akinobu Mita Cc: Dan Williams Cc: Isabella Basso Cc: Josh Poimboeuf Cc: Kees Cook Cc: Miguel Ojeda Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Vlastimil Babka Signed-off-by: Andrew Morton lib/fault-inject.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 0199907474d402809319ada802b50643625914f9 Author: Wei Yongjun Date: Wed Aug 17 08:03:31 2022 +0000 fault-injection: make some stack filter attrs more readable Attributes of stack filter are show as unsigned decimal, such as 'require-start', 'require-end'. This patch change to show them as unsigned hexadecimal for more readable. Before: $ echo 0xffffffffc0257000 > /sys/kernel/debug/failslab/require-start $ cat /sys/kernel/debug/failslab/require-start 18446744072638263296 After: $ echo 0xffffffffc0257000 > /sys/kernel/debug/failslab/require-start $ cat /sys/kernel/debug/failslab/require-start 0xffffffffc0257000 [wangyufen@huawei.com: use debugfs_create_xul() instead of debugfs_create_xl()] Link: https://lkml.kernel.org/r/1664331299-4976-1-git-send-email-wangyufen@huawei.com Link: https://lkml.kernel.org/r/20220817080332.1052710-4-weiyongjun1@huawei.com Signed-off-by: Wei Yongjun Signed-off-by: Wang Yufen Reviewed-by: Akinobu Mita Cc: Dan Williams Cc: Isabella Basso Cc: Josh Poimboeuf Cc: Kees Cook Cc: Miguel Ojeda Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Vlastimil Babka Signed-off-by: Andrew Morton lib/fault-inject.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4acb9e5139f20c79eb08a95dc5a28186ae7a5088 Author: Wei Yongjun Date: Wed Aug 17 08:03:30 2022 +0000 fault-injection: skip stacktrace filtering by default If FAULT_INJECTION_STACKTRACE_FILTER is enabled, the depth is default to 32. This means fail_stacktrace() will iter each entry's stacktrace, even if filter is not configured. This patch changes to quick return from fail_stacktrace() if stacktrace filter is not set. Link: https://lkml.kernel.org/r/20220817080332.1052710-3-weiyongjun1@huawei.com Signed-off-by: Wei Yongjun Cc: Akinobu Mita Cc: Dan Williams Cc: Isabella Basso Cc: Josh Poimboeuf Cc: Kees Cook Cc: Miguel Ojeda Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Vlastimil Babka Signed-off-by: Andrew Morton lib/fault-inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7ebbbb159c181c696770feeb89bf0334aaff6d8 Author: Wei Yongjun Date: Wed Aug 17 08:03:29 2022 +0000 fault-injection: allow stacktrace filter for x86-64 This patchset allow fault injection to run on x86_64 and makes stacktrace filter work as expected. With this, we can test a device driver module with fault injection more easily. This patch (of 4): FAULT_INJECTION_STACKTRACE_FILTER option was apparently disallowed on x86_64 because of problems with the stack unwinder: commit 6d690dcac92a84f98fd774862628ff871b713660 Author: Akinobu Mita Date: Sat May 12 10:36:53 2007 -0700 fault injection: disable stacktrace filter for x86-64 However, there is no problems whatsoever with this today. Let's allow it again. Link: https://lkml.kernel.org/r/20220817080332.1052710-1-weiyongjun1@huawei.com Link: https://lkml.kernel.org/r/20220817080332.1052710-2-weiyongjun1@huawei.com Signed-off-by: Wei Yongjun Cc: Akinobu Mita Cc: Nathan Chancellor Cc: Peter Zijlstra Cc: Kees Cook Cc: Nick Desaulniers Cc: Josh Poimboeuf Cc: Dan Williams Cc: Miguel Ojeda Cc: Isabella Basso Cc: Vlastimil Babka Cc: Rasmus Villemoes Signed-off-by: Andrew Morton lib/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) commit 8b777594d2341a82f00b57c020f8af05bded1178 Author: Minchan Kim Date: Tue Dec 13 09:07:31 2022 -0800 MAINTAINERS: zram: zsmalloc: Add an additional co-maintainer Move Sergey to co-maintainer for zram/zsmalloc since he has helped to contribute/review those areas actively for eight years, which is quite helpful. Since Nitin has been inactive for several years, it's time to move his name into CREDITS. Link: https://lkml.kernel.org/r/20221213170731.796121-1-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Cc: Nitin Gupta Signed-off-by: Andrew Morton CREDITS | 4 ++++ MAINTAINERS | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) commit 3a6f33d86baa8103c80f62edd9393e9f7bf25d72 Author: Clément Léger Date: Tue Nov 8 10:43:22 2022 +0100 mm/kmemleak: use %pK to display kernel pointers in backtrace Currently, %p is used to display kernel pointers in backtrace which result in a hashed value that is not usable to correlate the address for debug. Use %pK which will respect the kptr_restrict configuration value and thus allow to extract meaningful information from the backtrace. Link: https://lkml.kernel.org/r/20221108094322.73492-1-clement.leger@bootlin.com Signed-off-by: Clément Léger Cc: Alexandre Belloni Cc: Catalin Marinas Cc: Thomas Petazzoni Signed-off-by: Andrew Morton mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56a61617dd2276cbc56a6c868599716386d70041 Author: Zhaoyang Huang Date: Thu Oct 27 17:50:24 2022 +0800 mm: use stack_depot for recording kmemleak's backtrace Using stack_depot to record kmemleak's backtrace which has been implemented on slub for reducing redundant information. [akpm@linux-foundation.org: fix build - remove now-unused __save_stack_trace()] [zhaoyang.huang@unisoc.com: v3] Link: https://lkml.kernel.org/r/1667101354-4669-1-git-send-email-zhaoyang.huang@unisoc.com [akpm@linux-foundation.org: fix v3 layout oddities] [akpm@linux-foundation.org: coding-style cleanups] Link: https://lkml.kernel.org/r/1666864224-27541-1-git-send-email-zhaoyang.huang@unisoc.com Signed-off-by: Zhaoyang Huang Acked-by: Catalin Marinas Cc: ke.wang Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Zhaoyang Huang Signed-off-by: Andrew Morton lib/Kconfig.debug | 1 + mm/kmemleak.c | 46 ++++++++++++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 18 deletions(-) commit 9102b78b6f6ae6af3557114c265c266b312c1319 Author: Liam Howlett Date: Tue Oct 25 17:37:23 2022 +0000 maple_tree: update copyright dates for test code Add the span to the year of the development. Link: https://lkml.kernel.org/r/20221025173709.2718725-1-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Matthew Wilcox Cc: Joe Perches Signed-off-by: Andrew Morton tools/testing/radix-tree/maple.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d98c86b9f7a4e1f5a7ead8ba5743952267f9e320 Author: Liam Howlett Date: Tue Oct 25 17:38:14 2022 +0000 maple_tree: fix mas_find_rev() comment mas_find_rev() uses mas_prev_entry(), not mas_next_entry(), correct comment. Link: https://lkml.kernel.org/r/20221025173756.2719616-1-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61b963b52f59524e27692bc1c14bfb2459e32eb3 Author: David Hildenbrand Date: Mon Dec 12 19:20:18 2022 +0100 mm/gup_test: free memory allocated via kvcalloc() using kvfree() We have to free via kvfree(), not via kfree(). Link: https://lkml.kernel.org/r/20221212182018.264900-1-david@redhat.com Fixes: c77369b437f9 ("mm/gup_test: start/stop/read functionality for PIN LONGTERM test") Signed-off-by: David Hildenbrand Reported-by: kernel test robot Reported-by: Julia Lawall Signed-off-by: Andrew Morton mm/gup_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b248586a49a7729f73c504b1e7b958caea45e927 Author: Paulo Alcantara Date: Tue Dec 13 09:15:23 2022 -0300 cifs: set correct tcon status after initial tree connect cifs_tcon::status wasn't correctly updated to TID_GOOD after initial tree connect thus staying at TID_NEW as long as it was connected. Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/connect.c | 1 + 1 file changed, 1 insertion(+) commit b18cba09e374637a0a3759d856a6bca94c133952 Author: minoura makoto Date: Tue Dec 13 13:14:31 2022 +0900 SUNRPC: ensure the matching upcall is in-flight upon downcall Commit 9130b8dbc6ac ("SUNRPC: allow for upcalls for the same uid but different gss service") introduced `auth` argument to __gss_find_upcall(), but in gss_pipe_downcall() it was left as NULL since it (and auth->service) was not (yet) determined. When multiple upcalls with the same uid and different service are ongoing, it could happen that __gss_find_upcall(), which returns the first match found in the pipe->in_downcall list, could not find the correct gss_msg corresponding to the downcall we are looking for. Moreover, it might return a msg which is not sent to rpc.gssd yet. We could see mount.nfs process hung in D state with multiple mount.nfs are executed in parallel. The call trace below is of CentOS 7.9 kernel-3.10.0-1160.24.1.el7.x86_64 but we observed the same hang w/ elrepo kernel-ml-6.0.7-1.el7. PID: 71258 TASK: ffff91ebd4be0000 CPU: 36 COMMAND: "mount.nfs" #0 [ffff9203ca3234f8] __schedule at ffffffffa3b8899f #1 [ffff9203ca323580] schedule at ffffffffa3b88eb9 #2 [ffff9203ca323590] gss_cred_init at ffffffffc0355818 [auth_rpcgss] #3 [ffff9203ca323658] rpcauth_lookup_credcache at ffffffffc0421ebc [sunrpc] #4 [ffff9203ca3236d8] gss_lookup_cred at ffffffffc0353633 [auth_rpcgss] #5 [ffff9203ca3236e8] rpcauth_lookupcred at ffffffffc0421581 [sunrpc] #6 [ffff9203ca323740] rpcauth_refreshcred at ffffffffc04223d3 [sunrpc] #7 [ffff9203ca3237a0] call_refresh at ffffffffc04103dc [sunrpc] #8 [ffff9203ca3237b8] __rpc_execute at ffffffffc041e1c9 [sunrpc] #9 [ffff9203ca323820] rpc_execute at ffffffffc0420a48 [sunrpc] The scenario is like this. Let's say there are two upcalls for services A and B, A -> B in pipe->in_downcall, B -> A in pipe->pipe. When rpc.gssd reads pipe to get the upcall msg corresponding to service B from pipe->pipe and then writes the response, in gss_pipe_downcall the msg corresponding to service A will be picked because only uid is used to find the msg and it is before the one for B in pipe->in_downcall. And the process waiting for the msg corresponding to service A will be woken up. Actual scheduing of that process might be after rpc.gssd processes the next msg. In rpc_pipe_generic_upcall it clears msg->errno (for A). The process is scheduled to see gss_msg->ctx == NULL and gss_msg->msg.errno == 0, therefore it cannot break the loop in gss_create_upcall and is never woken up after that. This patch adds a simple check to ensure that a msg which is not sent to rpc.gssd yet is not chosen as the matching upcall upon receiving a downcall. Signed-off-by: minoura makoto Signed-off-by: Hiroshi Shimamoto Tested-by: Hiroshi Shimamoto Cc: Trond Myklebust Fixes: 9130b8dbc6ac ("SUNRPC: allow for upcalls for same uid but different gss service") Signed-off-by: Trond Myklebust include/linux/sunrpc/rpc_pipe_fs.h | 5 +++++ net/sunrpc/auth_gss/auth_gss.c | 19 +++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) commit 851f657a86421dded42b6175c6ea0f4f5e86af97 Merge: ec9187ecea14 d74f4a3f6d88 Author: Linus Torvalds Date: Thu Dec 15 14:53:14 2022 -0800 Merge tag '6.2-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs client updates from Steve French: - SMB3.1.1 POSIX Extensions fixes - remove use of generic_writepages() and ->cifs_writepage(), in favor of ->cifs_writepages() and ->migrate_folio() - memory management fixes - mount parm parsing fixes - minor cleanup fixes * tag '6.2-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: cifs: Remove duplicated include in cifsglob.h cifs: fix oops during encryption cifs: print warning when conflicting soft vs. hard mount options specified cifs: fix missing display of three mount options cifs: fix various whitespace errors in headers cifs: minor cleanup of some headers cifs: skip alloc when request has no pages cifs: remove ->writepage cifs: stop using generic_writepages cifs: wire up >migrate_folio cifs: Parse owner/group for stat in smb311 posix extensions cifs: Add "extbuf" and "extbuflen" args to smb2_compound_op() Fix path in cifs/usage.rst commit ec9187ecea142593c54cf7a73ef2e1a3d517495a Merge: 785d21ba2f44 39244cc75482 Author: Linus Torvalds Date: Thu Dec 15 14:47:10 2022 -0800 Merge tag 'i2c-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "Core got a new helper 'i2c_client_get_device_id()', designware got some bigger updates, the rest is driver updates all over the place" * tag 'i2c-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (41 commits) i2c: ismt: Fix an out-of-bounds bug in ismt_access() i2c: mux: reg: check return value after calling platform_get_resource() i2c: xiic: Make sure to disable clock on .remove() i2c: hisi: Add support to get clock frequency from clock i2c: pxa-pci: fix missing pci_disable_device() on error in ce4100_i2c_probe i2c: slave-eeprom: Convert to i2c's .probe_new() i2c: mux: pca954x: Convert to i2c's .probe_new() drivers/i2c: use simple i2c probe i2c: mux: pca9541: switch to using .probe_new i2c: gpio: Fix potential unused warning for 'i2c_gpio_dt_ids' i2c: qcom-geni: add support for I2C Master Hub variant i2c: qcom-geni: add desc struct to prepare support for I2C Master Hub variant soc: qcom: geni-se: add support for I2C Master Hub wrapper variant soc: qcom: geni-se: add desc struct to specify clocks from device match data dt-bindings: i2c: qcom-geni: document I2C Master Hub serial I2C engine dt-bindings: qcom: geni-se: document I2C Master Hub wrapper variant dt-bindings: i2c: renesas,riic: Document RZ/Five SoC i2c: tegra: Set ACPI node as primary fwnode i2c: smbus: add DDR support for SPD i2c: /pasemi: PASemi I2C controller IRQ enablement ... commit e88f319a2546fd7772c726bf3a82a23b0859ddeb Author: Minghao Chi Date: Tue Nov 22 09:47:19 2022 +0800 rtc: ds1742: 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 Link: https://lore.kernel.org/r/202211220947194856561@zte.com.cn Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1742.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 55d5a86618d3b1a768bce01882b74cbbd2651975 Author: GUO Zihua Date: Tue Nov 22 16:50:46 2022 +0800 rtc: mxc_v2: Add missing clk_disable_unprepare() The call to clk_disable_unprepare() is left out in the error handling of devm_rtc_allocate_device. Add it back. Fixes: 5490a1e018a4 ("rtc: mxc_v2: fix possible race condition") Signed-off-by: GUO Zihua Link: https://lore.kernel.org/r/20221122085046.21689-1-guozihua@huawei.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-mxc_v2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3bb23f1f9d5a66e23f643b2318a64d88f2585c8e Author: Zhang Jiaming Date: Wed Jun 22 16:53:44 2022 +0800 rtc: rs5c313: correct some spelling mistakes Change 'modifed' to 'modified'. Change 'Updata' to 'Update'. Change 'Initiatlize' to 'Initialize'. Signed-off-by: Zhang Jiaming Link: https://lore.kernel.org/r/20220622085344.23519-1-jiaming@nfschina.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rs5c313.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2dc5e3fb6e974bc299cdd43cb9e253c8958d0d11 Author: Xiang wangx Date: Sun Jun 5 16:35:15 2022 +0800 rtc: at91rm9200: Fix syntax errors in comments Delete the redundant word 'is'. Signed-off-by: Xiang wangx Link: https://lore.kernel.org/r/20220605083515.9514-1-wangxiang@cdjrlc.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-at91rm9200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9354487fb795c144a387e51a9d4d33b710c74f7 Author: shaomin Deng Date: Mon Aug 8 11:23:54 2022 -0400 rtc: remove duplicated words in comments Signed-off-by: shaomin Deng Link: https://lore.kernel.org/r/20220808152354.3641-1-dengshaomin@cdjrlc.com Link: https://lore.kernel.org/r/20220808153454.6844-1-dengshaomin@cdjrlc.com Link: https://lore.kernel.org/r/20220808152822.5012-1-dengshaomin@cdjrlc.com Signed-off-by: Alexandre Belloni drivers/rtc/interface.c | 2 +- drivers/rtc/rtc-m41t80.c | 2 +- drivers/rtc/rtc-rs5c372.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 16b26f6027588be4414fb69d665bd07c9cb828e9 Author: Wadim Egorov Date: Thu Dec 8 14:36:05 2022 +0100 rtc: rv3028: Use IRQ flags obtained from device tree if available Make the interrupt pin of the RV3028 usable with GPIO controllers without level type IRQs support, such as the TI Davinci GPIO controller. Therefore, allow the IRQ type to be passed from the device tree if available. Based on commit d4785b46345c ("rtc: pcf2127: use IRQ flags obtained from device tree if available") Signed-off-by: Wadim Egorov Link: https://lore.kernel.org/r/20221208133605.4193907-1-w.egorov@phytec.de Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv3028.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 0feebdeb3acc0375cd817385d637d27a8a6dca97 Author: ye xingchen Date: Mon Dec 5 11:34:45 2022 +0800 rtc: ds1307: 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 Link: https://lore.kernel.org/r/202212051134455911470@zte.com.cn Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bb0a1799bbc498053011729dcac0d9430e7d750a Author: Jean Delvare Date: Thu Nov 24 15:43:59 2022 +0100 rtc: isl12026: 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: Alessandro Zummo Cc: Alexandre Belloni Link: https://lore.kernel.org/r/20221124154359.039be06c@endymion.delvare Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72abeedd83982c1bc6023f631e412db78374d9b4 Author: Tan Tee Min Date: Fri Dec 9 12:15:22 2022 +0800 igc: Set Qbv start_time and end_time to end_time if not being configured in GCL The default setting of end_time minus start_time is whole 1 second. Thus, if it's not being configured in any GCL entry then it will be staying at original 1 second. This patch is changing the start_time and end_time to be end_time as if setting zero will be having weird HW behavior where the gate will not be fully closed. Fixes: ec50a9d437f0 ("igc: Add support for taprio offloading") Signed-off-by: Tan Tee Min Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 6d05251d537a4d3835959a8cdd8cbbbdcdc0c904 Author: Tan Tee Min Date: Fri Dec 9 12:15:21 2022 +0800 igc: recalculate Qbv end_time by considering cycle time Qbv users can specify a cycle time that is not equal to the total GCL intervals. Hence, recalculation is necessary here to exclude the time interval that exceeds the cycle time. As those GCL which exceeds the cycle time will be truncated. According to IEEE Std. 802.1Q-2018 section 8.6.9.2, once the end of the list is reached, it will switch to the END_OF_CYCLE state and leave the gates in the same state until the next cycle is started. Fixes: ec50a9d437f0 ("igc: Add support for taprio offloading") Signed-off-by: Tan Tee Min Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit e17090eb24944fbbe1f24d9f336d7bad4fbe47e8 Author: Tan Tee Min Date: Fri Dec 9 12:15:20 2022 +0800 igc: allow BaseTime 0 enrollment for Qbv Introduce qbv_enable flag in igc_adapter struct to store the Qbv on/off. So this allow the BaseTime to enroll with zero value. Fixes: 61572d5f8f91 ("igc: Simplify TSN flags handling") Signed-off-by: Muhammad Husaini Zulkifli Signed-off-by: Tan Tee Min Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc.h | 1 + drivers/net/ethernet/intel/igc/igc_main.c | 2 ++ drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) commit 3b61764fb49a6e147ac90d71dccdddc9d5508ba1 Author: Muhammad Husaini Zulkifli Date: Fri Dec 9 12:15:19 2022 +0800 igc: Add checking for basetime less than zero Using the tc qdisc command, the user can set basetime to any value. Checking should be done on the driver's side to prevent registering basetime values that are less than zero. Fixes: ec50a9d437f0 ("igc: Add support for taprio offloading") Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_main.c | 3 +++ 1 file changed, 3 insertions(+) commit d8f45be01dd9381065a3778a579385249ed011dc Author: Vinicius Costa Gomes Date: Fri Dec 9 12:15:18 2022 +0800 igc: Use strict cycles for Qbv scheduling Configuring strict cycle mode in the controller forces more well behaved transmissions when taprio is offloaded. When set this strict_cycle and strict_end, transmission is not enabled if the whole packet cannot be completed before end of the Qbv cycle. Fixes: 82faa9b79950 ("igc: Add support for ETF offloading") Signed-off-by: Vinicius Costa Gomes Signed-off-by: Aravindhan Gunasekaran Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_tsn.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit db0b124f02ba68de6517ac303d431af220ccfe9f Author: Vinicius Costa Gomes Date: Fri Dec 9 12:15:17 2022 +0800 igc: Enhance Qbv scheduling by using first flag bit The I225 hardware has a limitation that packets can only be scheduled in the [0, cycle-time] interval. So, scheduling a packet to the start of the next cycle doesn't usually work. To overcome this, we use the Transmit Descriptor first flag to indicates that a packet should be the first packet (from a queue) in a cycle according to the section 7.5.2.9.3.4 The First Packet on Each QBV Cycle in Intel Discrete I225/6 User Manual. But this only works if there was any packet from that queue during the current cycle, to avoid this issue, we issue an empty packet if that's not the case. Also require one more descriptor to be available, to take into account the empty packet that might be issued. Test Setup: Talker: Use l2_tai to generate the launchtime into packet load. Listener: Use timedump.c to compute the delta between packet arrival and LaunchTime packet payload. Test Result: Before: 1666000610127300000,1666000610127300096,96,621273 1666000610127400000,1666000610127400192,192,621274 1666000610127500000,1666000610127500032,32,621275 1666000610127600000,1666000610127600128,128,621276 1666000610127700000,1666000610127700224,224,621277 1666000610127800000,1666000610127800064,64,621278 1666000610127900000,1666000610127900160,160,621279 1666000610128000000,1666000610128000000,0,621280 1666000610128100000,1666000610128100096,96,621281 1666000610128200000,1666000610128200192,192,621282 1666000610128300000,1666000610128300032,32,621283 1666000610128400000,1666000610128301056,-98944,621284 1666000610128500000,1666000610128302080,-197920,621285 1666000610128600000,1666000610128302848,-297152,621286 1666000610128700000,1666000610128303872,-396128,621287 1666000610128800000,1666000610128304896,-495104,621288 1666000610128900000,1666000610128305664,-594336,621289 1666000610129000000,1666000610128306688,-693312,621290 1666000610129100000,1666000610128307712,-792288,621291 1666000610129200000,1666000610128308480,-891520,621292 1666000610129300000,1666000610128309504,-990496,621293 1666000610129400000,1666000610128310528,-1089472,621294 1666000610129500000,1666000610128311296,-1188704,621295 1666000610129600000,1666000610128312320,-1287680,621296 1666000610129700000,1666000610128313344,-1386656,621297 1666000610129800000,1666000610128314112,-1485888,621298 1666000610129900000,1666000610128315136,-1584864,621299 1666000610130000000,1666000610128316160,-1683840,621300 1666000610130100000,1666000610128316928,-1783072,621301 1666000610130200000,1666000610128317952,-1882048,621302 1666000610130300000,1666000610128318976,-1981024,621303 1666000610130400000,1666000610128319744,-2080256,621304 1666000610130500000,1666000610128320768,-2179232,621305 1666000610130600000,1666000610128321792,-2278208,621306 1666000610130700000,1666000610128322816,-2377184,621307 1666000610130800000,1666000610128323584,-2476416,621308 1666000610130900000,1666000610128324608,-2575392,621309 1666000610131000000,1666000610128325632,-2674368,621310 1666000610131100000,1666000610128326400,-2773600,621311 1666000610131200000,1666000610128327424,-2872576,621312 1666000610131300000,1666000610128328448,-2971552,621313 1666000610131400000,1666000610128329216,-3070784,621314 1666000610131500000,1666000610131500032,32,621315 1666000610131600000,1666000610131600128,128,621316 1666000610131700000,1666000610131700224,224,621317 After: 1666073510646200000,1666073510646200064,64,2676462 1666073510646300000,1666073510646300160,160,2676463 1666073510646400000,1666073510646400256,256,2676464 1666073510646500000,1666073510646500096,96,2676465 1666073510646600000,1666073510646600192,192,2676466 1666073510646700000,1666073510646700032,32,2676467 1666073510646800000,1666073510646800128,128,2676468 1666073510646900000,1666073510646900224,224,2676469 1666073510647000000,1666073510647000064,64,2676470 1666073510647100000,1666073510647100160,160,2676471 1666073510647200000,1666073510647200256,256,2676472 1666073510647300000,1666073510647300096,96,2676473 1666073510647400000,1666073510647400192,192,2676474 1666073510647500000,1666073510647500032,32,2676475 1666073510647600000,1666073510647600128,128,2676476 1666073510647700000,1666073510647700224,224,2676477 1666073510647800000,1666073510647800064,64,2676478 1666073510647900000,1666073510647900160,160,2676479 1666073510648000000,1666073510648000000,0,2676480 1666073510648100000,1666073510648100096,96,2676481 1666073510648200000,1666073510648200192,192,2676482 1666073510648300000,1666073510648300032,32,2676483 1666073510648400000,1666073510648400128,128,2676484 1666073510648500000,1666073510648500224,224,2676485 1666073510648600000,1666073510648600064,64,2676486 1666073510648700000,1666073510648700160,160,2676487 1666073510648800000,1666073510648800000,0,2676488 1666073510648900000,1666073510648900096,96,2676489 1666073510649000000,1666073510649000192,192,2676490 1666073510649100000,1666073510649100032,32,2676491 1666073510649200000,1666073510649200128,128,2676492 1666073510649300000,1666073510649300224,224,2676493 1666073510649400000,1666073510649400064,64,2676494 1666073510649500000,1666073510649500160,160,2676495 1666073510649600000,1666073510649600000,0,2676496 1666073510649700000,1666073510649700096,96,2676497 1666073510649800000,1666073510649800192,192,2676498 1666073510649900000,1666073510649900032,32,2676499 1666073510650000000,1666073510650000128,128,2676500 Fixes: 82faa9b79950 ("igc: Add support for ETF offloading") Signed-off-by: Vinicius Costa Gomes Co-developed-by: Aravindhan Gunasekaran Signed-off-by: Aravindhan Gunasekaran Co-developed-by: Muhammad Husaini Zulkifli Signed-off-by: Muhammad Husaini Zulkifli Signed-off-by: Malli C Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc.h | 2 + drivers/net/ethernet/intel/igc/igc_defines.h | 2 + drivers/net/ethernet/intel/igc/igc_main.c | 176 ++++++++++++++++++++++----- 3 files changed, 151 insertions(+), 29 deletions(-) commit 785d21ba2f447fb26df4b22f45653763beb767ea Merge: 8fa590bf3448 70be6f322860 Author: Linus Torvalds Date: Thu Dec 15 13:12:15 2022 -0800 Merge tag 'vfio-v6.2-rc1' of https://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Replace deprecated git://github.com link in MAINTAINERS (Palmer Dabbelt) - Simplify vfio/mlx5 with module_pci_driver() helper (Shang XiaoJing) - Drop unnecessary buffer from ACPI call (Rafael Mendonca) - Correct latent missing include issue in iova-bitmap and fix support for unaligned bitmaps. Follow-up with better fix through refactor (Joao Martins) - Rework ccw mdev driver to split private data from parent structure, better aligning with the mdev lifecycle and allowing us to remove a temporary workaround (Eric Farman) - Add an interface to get an estimated migration data size for a device, allowing userspace to make informed decisions, ex. more accurately predicting VM downtime (Yishai Hadas) - Fix minor typo in vfio/mlx5 array declaration (Yishai Hadas) - Simplify module and Kconfig through consolidating SPAPR/EEH code and config options and folding virqfd module into main vfio module (Jason Gunthorpe) - Fix error path from device_register() across all vfio mdev and sample drivers (Alex Williamson) - Define migration pre-copy interface and implement for vfio/mlx5 devices, allowing portions of the device state to be saved while the device continues operation, towards reducing the stop-copy state size (Jason Gunthorpe, Yishai Hadas, Shay Drory) - Implement pre-copy for hisi_acc devices (Shameer Kolothum) - Fixes to mdpy mdev driver remove path and error path on probe (Shang XiaoJing) - vfio/mlx5 fixes for incorrect return after copy_to_user() fault and incorrect buffer freeing (Dan Carpenter) * tag 'vfio-v6.2-rc1' of https://github.com/awilliam/linux-vfio: (42 commits) vfio/mlx5: error pointer dereference in error handling vfio/mlx5: fix error code in mlx5vf_precopy_ioctl() samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe() hisi_acc_vfio_pci: Enable PRE_COPY flag hisi_acc_vfio_pci: Move the dev compatibility tests for early check hisi_acc_vfio_pci: Introduce support for PRE_COPY state transitions hisi_acc_vfio_pci: Add support for precopy IOCTL vfio/mlx5: Enable MIGRATION_PRE_COPY flag vfio/mlx5: Fallback to STOP_COPY upon specific PRE_COPY error vfio/mlx5: Introduce multiple loads vfio/mlx5: Consider temporary end of stream as part of PRE_COPY vfio/mlx5: Introduce vfio precopy ioctl implementation vfio/mlx5: Introduce SW headers for migration states vfio/mlx5: Introduce device transitions of PRE_COPY vfio/mlx5: Refactor to use queue based data chunks vfio/mlx5: Refactor migration file state vfio/mlx5: Refactor MKEY usage vfio/mlx5: Refactor PD usage vfio/mlx5: Enforce a single SAVE command at a time vfio: Extend the device migration protocol with PRE_COPY ... commit 8fa590bf344816c925810331eea8387627bbeb40 Merge: 057b40f43ce4 549a715b98a1 Author: Linus Torvalds Date: Thu Dec 15 11:12:21 2022 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "ARM64: - Enable the per-vcpu dirty-ring tracking mechanism, together with an option to keep the good old dirty log around for pages that are dirtied by something other than a vcpu. - Switch to the relaxed parallel fault handling, using RCU to delay page table reclaim and giving better performance under load. - Relax the MTE ABI, allowing a VMM to use the MAP_SHARED mapping option, which multi-process VMMs such as crosvm rely on (see merge commit 382b5b87a97d: "Fix a number of issues with MTE, such as races on the tags being initialised vs the PG_mte_tagged flag as well as the lack of support for VM_SHARED when KVM is involved. Patches from Catalin Marinas and Peter Collingbourne"). - Merge the pKVM shadow vcpu state tracking that allows the hypervisor to have its own view of a vcpu, keeping that state private. - Add support for the PMUv3p5 architecture revision, bringing support for 64bit counters on systems that support it, and fix the no-quite-compliant CHAIN-ed counter support for the machines that actually exist out there. - Fix a handful of minor issues around 52bit VA/PA support (64kB pages only) as a prefix of the oncoming support for 4kB and 16kB pages. - Pick a small set of documentation and spelling fixes, because no good merge window would be complete without those. s390: - Second batch of the lazy destroy patches - First batch of KVM changes for kernel virtual != physical address support - Removal of a unused function x86: - Allow compiling out SMM support - Cleanup and documentation of SMM state save area format - Preserve interrupt shadow in SMM state save area - Respond to generic signals during slow page faults - Fixes and optimizations for the non-executable huge page errata fix. - Reprogram all performance counters on PMU filter change - Cleanups to Hyper-V emulation and tests - Process Hyper-V TLB flushes from a nested guest (i.e. from a L2 guest running on top of a L1 Hyper-V hypervisor) - Advertise several new Intel features - x86 Xen-for-KVM: - Allow the Xen runstate information to cross a page boundary - Allow XEN_RUNSTATE_UPDATE flag behaviour to be configured - Add support for 32-bit guests in SCHEDOP_poll - Notable x86 fixes and cleanups: - One-off fixes for various emulation flows (SGX, VMXON, NRIPS=0). - Reinstate IBPB on emulated VM-Exit that was incorrectly dropped a few years back when eliminating unnecessary barriers when switching between vmcs01 and vmcs02. - Clean up vmread_error_trampoline() to make it more obvious that params must be passed on the stack, even for x86-64. - Let userspace set all supported bits in MSR_IA32_FEAT_CTL irrespective of the current guest CPUID. - Fudge around a race with TSC refinement that results in KVM incorrectly thinking a guest needs TSC scaling when running on a CPU with a constant TSC, but no hardware-enumerated TSC frequency. - Advertise (on AMD) that the SMM_CTL MSR is not supported - Remove unnecessary exports Generic: - Support for responding to signals during page faults; introduces new FOLL_INTERRUPTIBLE flag that was reviewed by mm folks Selftests: - Fix an inverted check in the access tracking perf test, and restore support for asserting that there aren't too many idle pages when running on bare metal. - Fix build errors that occur in certain setups (unsure exactly what is unique about the problematic setup) due to glibc overriding static_assert() to a variant that requires a custom message. - Introduce actual atomics for clear/set_bit() in selftests - Add support for pinning vCPUs in dirty_log_perf_test. - Rename the so called "perf_util" framework to "memstress". - Add a lightweight psuedo RNG for guest use, and use it to randomize the access pattern and write vs. read percentage in the memstress tests. - Add a common ucall implementation; code dedup and pre-work for running SEV (and beyond) guests in selftests. - Provide a common constructor and arch hook, which will eventually be used by x86 to automatically select the right hypercall (AMD vs. Intel). - A bunch of added/enabled/fixed selftests for ARM64, covering memslots, breakpoints, stage-2 faults and access tracking. - x86-specific selftest changes: - Clean up x86's page table management. - Clean up and enhance the "smaller maxphyaddr" test, and add a related test to cover generic emulation failure. - Clean up the nEPT support checks. - Add X86_PROPERTY_* framework to retrieve multi-bit CPUID values. - Fix an ordering issue in the AMX test introduced by recent conversions to use kvm_cpu_has(), and harden the code to guard against similar bugs in the future. Anything that tiggers caching of KVM's supported CPUID, kvm_cpu_has() in this case, effectively hides opt-in XSAVE features if the caching occurs before the test opts in via prctl(). Documentation: - Remove deleted ioctls from documentation - Clean up the docs for the x86 MSR filter. - Various fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (361 commits) KVM: x86: Add proper ReST tables for userspace MSR exits/flags KVM: selftests: Allocate ucall pool from MEM_REGION_DATA KVM: arm64: selftests: Align VA space allocator with TTBR0 KVM: arm64: Fix benign bug with incorrect use of VA_BITS KVM: arm64: PMU: Fix period computation for 64bit counters with 32bit overflow KVM: x86: Advertise that the SMM_CTL MSR is not supported KVM: x86: remove unnecessary exports KVM: selftests: Fix spelling mistake "probabalistic" -> "probabilistic" tools: KVM: selftests: Convert clear/set_bit() to actual atomics tools: Drop "atomic_" prefix from atomic test_and_set_bit() tools: Drop conflicting non-atomic test_and_{clear,set}_bit() helpers KVM: selftests: Use non-atomic clear/set bit helpers in KVM tests perf tools: Use dedicated non-atomic clear/set bit helpers tools: Take @bit as an "unsigned long" in {clear,set}_bit() helpers KVM: arm64: selftests: Enable single-step without a "full" ucall() KVM: x86: fix APICv/x2AVIC disabled when vm reboot by itself KVM: Remove stale comment about KVM_REQ_UNHALT KVM: Add missing arch for KVM_CREATE_DEVICE and KVM_{SET,GET}_DEVICE_ATTR KVM: Reference to kvm_userspace_memory_region in doc and comments KVM: Delete all references to removed KVM_SET_MEMORY_ALIAS ioctl ... commit 44a84da45272b3f4beb90025a64cfbde18f1aef0 Author: Dylan Yudaken Date: Thu Dec 15 10:41:38 2022 -0800 io_uring: use call_rcu_hurry if signaling an eventfd io_uring uses call_rcu in the case it needs to signal an eventfd as a result of an eventfd signal, since recursing eventfd signals are not allowed. This should be calling the new call_rcu_hurry API to not delay the signal. Signed-off-by: Dylan Yudaken Cc: Joel Fernandes (Google) Cc: Paul E. McKenney Acked-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) Link: https://lore.kernel.org/r/20221215184138.795576-1-dylany@meta.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e844d842d49cdbe61a4b338bdd512654179488a Author: Dave Hansen Date: Fri Nov 18 07:16:16 2022 -0800 x86/mm: Ensure forced page table splitting There are a few kernel users like kfence that require 4k pages to work correctly and do not support large mappings. They use set_memory_4k() to break down those large mappings. That, in turn relies on cpa_data->force_split option to indicate to set_memory code that it should split page tables regardless of whether the need to be. But, a recent change added an optimization which would return early if a set_memory request came in that did not change permissions. It did not consult ->force_split and would mistakenly optimize away the splitting that set_memory_4k() needs. This broke kfence. Skip the same-permission optimization when ->force_split is set. Fixes: 127960a05548 ("x86/mm: Inhibit _PAGE_NX changes from cpa_process_alias()") Signed-off-by: Dave Hansen Tested-by: Marco Elver Cc: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/CA+G9fYuFxZTxkeS35VTZMXwQvohu73W3xbZ5NtjebsVvH6hCuA@mail.gmail.com/ arch/x86/mm/pat/set_memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1cfaac2400c73378e78182a706be0f3ac8b93cd7 Author: Sean Christopherson Date: Thu Nov 10 20:35:04 2022 +0000 x86/kasan: Populate shadow for shared chunk of the CPU entry area Popuplate the shadow for the shared portion of the CPU entry area, i.e. the read-only IDT mapping, during KASAN initialization. A recent change modified KASAN to map the per-CPU areas on-demand, but forgot to keep a shadow for the common area that is shared amongst all CPUs. Map the common area in KASAN init instead of letting idt_map_in_cea() do the dirty work so that it Just Works in the unlikely event more shared data is shoved into the CPU entry area. The bug manifests as a not-present #PF when software attempts to lookup an IDT entry, e.g. when KVM is handling IRQs on Intel CPUs (KVM performs direct CALL to the IRQ handler to avoid the overhead of INTn): BUG: unable to handle page fault for address: fffffbc0000001d8 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 16c03a067 P4D 16c03a067 PUD 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 5 PID: 901 Comm: repro Tainted: G W 6.1.0-rc3+ #410 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kasan_check_range+0xdf/0x190 vmx_handle_exit_irqoff+0x152/0x290 [kvm_intel] vcpu_run+0x1d89/0x2bd0 [kvm] kvm_arch_vcpu_ioctl_run+0x3ce/0xa70 [kvm] kvm_vcpu_ioctl+0x349/0x900 [kvm] __x64_sys_ioctl+0xb8/0xf0 do_syscall_64+0x2b/0x50 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Fixes: 9fd429c28073 ("x86/kasan: Map shadow for percpu pages on demand") Reported-by: syzbot+8cdd16fd5a6c0565e227@syzkaller.appspotmail.com Signed-off-by: Sean Christopherson Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221110203504.1985010-6-seanjc@google.com arch/x86/mm/kasan_init_64.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit bde258d97409f2a45243cb393a55ea9ecfc7aba5 Author: Sean Christopherson Date: Thu Nov 10 20:35:03 2022 +0000 x86/kasan: Add helpers to align shadow addresses up and down Add helpers to dedup code for aligning shadow address up/down to page boundaries when translating an address to its shadow. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andrey Ryabinin Link: https://lkml.kernel.org/r/20221110203504.1985010-5-seanjc@google.com arch/x86/mm/kasan_init_64.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) commit 7077d2ccb94dafd00b29cc2d601c9f6891648f5b Author: Sean Christopherson Date: Thu Nov 10 20:35:02 2022 +0000 x86/kasan: Rename local CPU_ENTRY_AREA variables to shorten names Rename the CPU entry area variables in kasan_init() to shorten their names, a future fix will reference the beginning of the per-CPU portion of the CPU entry area, and shadow_cpu_entry_per_cpu_begin is a bit much. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andrey Ryabinin Link: https://lkml.kernel.org/r/20221110203504.1985010-4-seanjc@google.com arch/x86/mm/kasan_init_64.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 97650148a15e0b30099d6175ffe278b9f55ec66a Author: Sean Christopherson Date: Thu Nov 10 20:35:01 2022 +0000 x86/mm: Populate KASAN shadow for entire per-CPU range of CPU entry area Populate a KASAN shadow for the entire possible per-CPU range of the CPU entry area instead of requiring that each individual chunk map a shadow. Mapping shadows individually is error prone, e.g. the per-CPU GDT mapping was left behind, which can lead to not-present page faults during KASAN validation if the kernel performs a software lookup into the GDT. The DS buffer is also likely affected. The motivation for mapping the per-CPU areas on-demand was to avoid mapping the entire 512GiB range that's reserved for the CPU entry area, shaving a few bytes by not creating shadows for potentially unused memory was not a goal. The bug is most easily reproduced by doing a sigreturn with a garbage CS in the sigcontext, e.g. int main(void) { struct sigcontext regs; syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); memset(®s, 0, sizeof(regs)); regs.cs = 0x1d0; syscall(__NR_rt_sigreturn); return 0; } to coerce the kernel into doing a GDT lookup to compute CS.base when reading the instruction bytes on the subsequent #GP to determine whether or not the #GP is something the kernel should handle, e.g. to fixup UMIP violations or to emulate CLI/STI for IOPL=3 applications. BUG: unable to handle page fault for address: fffffbc8379ace00 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 16c03a067 P4D 16c03a067 PUD 15b990067 PMD 15b98f067 PTE 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 3 PID: 851 Comm: r2 Not tainted 6.1.0-rc3-next-20221103+ #432 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kasan_check_range+0xdf/0x190 Call Trace: get_desc+0xb0/0x1d0 insn_get_seg_base+0x104/0x270 insn_fetch_from_user+0x66/0x80 fixup_umip_exception+0xb1/0x530 exc_general_protection+0x181/0x210 asm_exc_general_protection+0x22/0x30 RIP: 0003:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0003:0000000000000000 EFLAGS: 00000202 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000000001d0 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Fixes: 9fd429c28073 ("x86/kasan: Map shadow for percpu pages on demand") Reported-by: syzbot+ffb4f000dc2872c93f62@syzkaller.appspotmail.com Suggested-by: Andrey Ryabinin Signed-off-by: Sean Christopherson Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andrey Ryabinin Link: https://lkml.kernel.org/r/20221110203504.1985010-3-seanjc@google.com arch/x86/mm/cpu_entry_area.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 80d72a8f76e8f3f0b5a70b8c7022578e17bde8e7 Author: Sean Christopherson Date: Thu Nov 10 20:35:00 2022 +0000 x86/mm: Recompute physical address for every page of per-CPU CEA mapping Recompute the physical address for each per-CPU page in the CPU entry area, a recent commit inadvertantly modified cea_map_percpu_pages() such that every PTE is mapped to the physical address of the first page. Fixes: 9fd429c28073 ("x86/kasan: Map shadow for percpu pages on demand") Signed-off-by: Sean Christopherson Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andrey Ryabinin Link: https://lkml.kernel.org/r/20221110203504.1985010-2-seanjc@google.com arch/x86/mm/cpu_entry_area.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e996365ee7475805d2a01312532855004e89df84 Author: Peter Zijlstra Date: Thu Nov 10 13:34:00 2022 +0100 x86/mm: Rename __change_page_attr_set_clr(.checkalias) Now that the checkalias functionality is taken by CPA_NO_CHECK_ALIAS rename the argument to better match is remaining purpose: primary, matching __change_page_attr(). Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221110125544.661001508%40infradead.org arch/x86/mm/pat/set_memory.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d597416683d587e940faa35945fba162329b5a71 Author: Peter Zijlstra Date: Thu Nov 10 13:33:57 2022 +0100 x86/mm: Inhibit _PAGE_NX changes from cpa_process_alias() There is a cludge in change_page_attr_set_clr() that inhibits propagating NX changes to the aliases (directmap and highmap) -- this is a cludge twofold: - it also inhibits the primary checks in __change_page_attr(); - it hard depends on single bit changes. The introduction of set_memory_rox() triggered this last issue for clearing both _PAGE_RW and _PAGE_NX. Explicitly ignore _PAGE_NX in cpa_process_alias() instead. Fixes: b38994948567 ("x86/mm: Implement native set_memory_rox()") Reported-by: kernel test robot Debugged-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221110125544.594991716%40infradead.org arch/x86/mm/pat/set_memory.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit ef9ab81af6e1f7b7ff589aa1504434aa5915c1df Author: Peter Zijlstra Date: Thu Nov 10 13:33:54 2022 +0100 x86/mm: Untangle __change_page_attr_set_clr(.checkalias) The .checkalias argument to __change_page_attr_set_clr() is overloaded and serves two different purposes: - it inhibits the call to cpa_process_alias() -- as suggested by the name; however, - it also serves as 'primary' indicator for __change_page_attr() ( which in turn also serves as a recursion terminator for cpa_process_alias() ). Untangle these by extending the use of CPA_NO_CHECK_ALIAS to all callsites that currently use .checkalias=0 for this purpose. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221110125544.527267183%40infradead.org arch/x86/mm/pat/set_memory.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) commit 5ceeee7571b7628f439ae0444ec41d132558f47e Author: Peter Zijlstra Date: Thu Nov 10 13:33:50 2022 +0100 x86/mm: Add a few comments It's a shame to hide useful comments in Changelogs, add some to the code. Shamelessly stolen from commit: c40a56a7818c ("x86/mm/init: Remove freed kernel image areas from alias mapping") Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221110125544.460677011%40infradead.org arch/x86/mm/pat/set_memory.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 80d0969aa7832bfeb287cb22563a1ad08fea937d Author: Kirill A. Shutemov Date: Wed Nov 9 19:51:25 2022 +0300 x86/mm: Fix CR3_ADDR_MASK The mask must not include bits above physical address mask. These bits are reserved and can be used for other things. Bits 61 and 62 are used for Linear Address Masking. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Reviewed-by: Rick Edgecombe Reviewed-by: Alexander Potapenko Acked-by: Peter Zijlstra (Intel) Tested-by: Alexander Potapenko Link: https://lore.kernel.org/all/20221109165140.9137-2-kirill.shutemov%40linux.intel.com arch/x86/include/asm/processor-flags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82328227db8f0b9b5f77bb5afcd47e59d0e4d08f Author: Pasha Tatashin Date: Mon May 16 18:52:02 2022 +0000 x86/mm: Remove P*D_PAGE_MASK and P*D_PAGE_SIZE macros Other architectures and the common mm/ use P*D_MASK, and P*D_SIZE. Remove the duplicated P*D_PAGE_MASK and P*D_PAGE_SIZE which are only used in x86/*. Signed-off-by: Pasha Tatashin Signed-off-by: Borislav Petkov Reviewed-by: Anshuman Khandual Acked-by: Mike Rapoport Link: https://lore.kernel.org/r/20220516185202.604654-1-tatashin@google.com arch/x86/include/asm/page_types.h | 12 +++--------- arch/x86/kernel/amd_gart_64.c | 2 +- arch/x86/kernel/head64.c | 2 +- arch/x86/mm/mem_encrypt_boot.S | 4 ++-- arch/x86/mm/mem_encrypt_identity.c | 18 +++++++++--------- arch/x86/mm/pat/set_memory.c | 6 +++--- arch/x86/mm/pti.c | 2 +- 7 files changed, 20 insertions(+), 26 deletions(-) commit 2dff2c359e829245bc3d80e42e296876d1f0cf8e Author: Peter Zijlstra Date: Tue Nov 1 12:53:18 2022 +0100 mm: Convert __HAVE_ARCH_P..P_GET to the new style Since __HAVE_ARCH_* style guards have been depricated in favour of defining the function name onto itself, convert pxxp_get(). Suggested-by: Linus Torvalds Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/Y2EUEBlQXNgaJgoI@hirez.programming.kicks-ass.net arch/powerpc/include/asm/nohash/32/pgtable.h | 2 +- include/linux/pgtable.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit eb780dcae02d5a71e6979aa7b8c708dea8597adf Author: Peter Zijlstra Date: Fri Oct 21 13:47:29 2022 +0200 mm: Remove pointless barrier() after pmdp_get_lockless() pmdp_get_lockless() should itself imply any ordering required. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114425.298833095%40infradead.org mm/hmm.c | 1 - mm/vmscan.c | 3 --- 2 files changed, 4 deletions(-) commit d4a72e7fe61a1ea9ad4accf3532411ca685eaead Author: Peter Zijlstra Date: Fri Oct 21 13:36:24 2022 +0200 x86/mm/pae: Get rid of set_64bit() Recognise that set_64bit() is a special case of our previously introduced pxx_xchg64(), so use that and get rid of set_64bit(). Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114425.233481884%40infradead.org arch/x86/include/asm/cmpxchg_32.h | 28 ---------------------------- arch/x86/include/asm/pgtable-3level.h | 23 ++++++++++++----------- 2 files changed, 12 insertions(+), 39 deletions(-) commit 9ee850acd25dc290d3cad2707e99380e372ad490 Author: Peter Zijlstra Date: Fri Oct 21 14:11:38 2022 +0200 x86_64: Remove pointless set_64bit() usage The use of set_64bit() in X86_64 only code is pretty pointless, seeing how it's a direct assignment. Remove all this nonsense. [nathanchance: unbreak irte] Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114425.168036718%40infradead.org arch/um/include/asm/pgtable-3level.h | 8 -------- arch/x86/include/asm/cmpxchg_64.h | 5 ----- drivers/iommu/intel/irq_remapping.c | 13 +++++-------- 3 files changed, 5 insertions(+), 21 deletions(-) commit b7301f20105a27112f7ca8040cfb0b0505a32fbd Author: Peter Zijlstra Date: Mon Nov 30 12:21:25 2020 +0100 x86/mm/pae: Be consistent with pXXp_get_and_clear() Given that ptep_get_and_clear() uses cmpxchg8b, and that should be by far the most common case, there's no point in having an optimized variant for pmd/pud. Introduce the pxx_xchg64() helper to implement the common logic once. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114425.103392961%40infradead.org arch/x86/include/asm/pgtable-3level.h | 67 +++++++++-------------------------- 1 file changed, 17 insertions(+), 50 deletions(-) commit f7bcd4617de67a4700a7bd7dc56808b57f1c8748 Author: Peter Zijlstra Date: Thu Nov 26 17:40:12 2020 +0100 x86/mm/pae: Use WRITE_ONCE() Disallow write-tearing, that would be really unfortunate. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114425.038102604%40infradead.org arch/x86/include/asm/pgtable-3level.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7a9b8bdb6af3e19fb8e3dc7a3caf6a9ea1bed8cd Author: Peter Zijlstra Date: Thu Nov 26 17:38:42 2020 +0100 x86/mm/pae: Don't (ab)use atomic64 PAE implies CX8, write readable code. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114424.971450128%40infradead.org arch/x86/include/asm/pgtable-3level.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 1180e732c985ed3c8866d2fd9e02b619848404a0 Author: Peter Zijlstra Date: Thu Nov 26 17:21:30 2020 +0100 mm/gup: Fix the lockless PMD access On architectures where the PTE/PMD is larger than the native word size (i386-PAE for example), READ_ONCE() can do the wrong thing. Use pmdp_get_lockless() just like we use ptep_get_lockless(). Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114424.906110403%40infradead.org kernel/events/core.c | 2 +- mm/gup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dab6e717429e5ec795d558a0e9a5337a1ed33a3d Author: Peter Zijlstra Date: Thu Nov 26 17:20:28 2020 +0100 mm: Rename pmd_read_atomic() There's no point in having the identical routines for PTE/PMD have different names. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114424.841277397%40infradead.org include/linux/pgtable.h | 9 ++------- mm/hmm.c | 2 +- mm/khugepaged.c | 2 +- mm/mapping_dirty_helpers.c | 2 +- mm/mprotect.c | 2 +- mm/userfaultfd.c | 2 +- mm/vmscan.c | 4 ++-- 7 files changed, 9 insertions(+), 14 deletions(-) commit 6ca297d4784625de7b041e8451780643cf5751a4 Author: Peter Zijlstra Date: Fri Oct 21 14:51:44 2022 +0200 mm: Rename GUP_GET_PTE_LOW_HIGH Since it no longer applies to only PTEs, rename it to PXX. Suggested-by: Linus Torvalds Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114424.776404066%40infradead.org arch/mips/Kconfig | 2 +- arch/sh/Kconfig | 2 +- arch/x86/Kconfig | 2 +- include/linux/pgtable.h | 4 ++-- mm/Kconfig | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 024d232ae4fcd7a7ce8ea239607d6c1246d7adc8 Author: Peter Zijlstra Date: Thu Nov 26 17:16:22 2020 +0100 mm: Fix pmd_read_atomic() AFAICT there's no reason to do anything different than what we do for PTEs. Make it so (also affects SH). Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114424.711181252%40infradead.org arch/x86/include/asm/pgtable-3level.h | 56 ----------------------------------- include/linux/pgtable.h | 47 ++++++++++++++++++++++------- 2 files changed, 37 insertions(+), 66 deletions(-) commit 0862ff059c9e29f023e617b134f9ea332cae50b8 Author: Peter Zijlstra Date: Thu Nov 26 17:05:55 2020 +0100 sh/mm: Make pmd_t similar to pte_t Just like 64bit pte_t, have a low/high split in pmd_t. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114424.645657294%40infradead.org arch/sh/include/asm/pgtable-3level.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit fbfdec9989e69e0b17aa3bf32fcb22d04cc33301 Author: Peter Zijlstra Date: Thu Nov 26 17:02:29 2020 +0100 x86/mm/pae: Make pmd_t similar to pte_t Instead of mucking about with at least 2 different ways of fudging it, do the same thing we do for pte_t. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114424.580310787%40infradead.org arch/x86/include/asm/pgtable-3level.h | 42 ++++++++++------------------- arch/x86/include/asm/pgtable-3level_types.h | 7 +++++ arch/x86/include/asm/pgtable_64_types.h | 1 + arch/x86/include/asm/pgtable_types.h | 4 +-- 4 files changed, 23 insertions(+), 31 deletions(-) commit 93b3037a1482758349f3b0431406bcc457ca1cbc Author: Peter Zijlstra Date: Thu Nov 26 14:04:46 2020 +0100 mm: Update ptep_get_lockless()'s comment Improve the comment. Suggested-by: Matthew Wilcox Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221022114424.515572025%40infradead.org include/linux/pgtable.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 60463628c9e0a8060ac6bef0457b0505c7532c7c Author: Peter Zijlstra Date: Sat Oct 29 13:19:31 2022 +0200 x86/mm: Implement native set_memory_rox() Provide a native implementation of set_memory_rox(), avoiding the double set_memory_ro();set_memory_x(); calls. Suggested-by: Linus Torvalds Signed-off-by: Peter Zijlstra (Intel) arch/x86/include/asm/set_memory.h | 3 +++ arch/x86/mm/pat/set_memory.c | 10 ++++++++++ include/linux/set_memory.h | 2 ++ 3 files changed, 15 insertions(+) commit d48567c9a0d1e605639f8a8705a61bbb55fb4e84 Author: Peter Zijlstra Date: Wed Oct 26 12:13:03 2022 +0200 mm: Introduce set_memory_rox() Because endlessly repeating: set_memory_ro() set_memory_x() is getting tedious. Suggested-by: Linus Torvalds Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/Y1jek64pXOsougmz@hirez.programming.kicks-ass.net arch/arm/mach-omap1/sram-init.c | 8 +++----- arch/arm/mach-omap2/sram.c | 8 +++----- arch/powerpc/kernel/kprobes.c | 9 ++++----- arch/x86/kernel/ftrace.c | 5 ++--- arch/x86/kernel/kprobes/core.c | 9 ++------- drivers/misc/sram-exec.c | 7 ++----- include/linux/filter.h | 3 +-- include/linux/set_memory.h | 8 ++++++++ kernel/bpf/bpf_struct_ops.c | 3 +-- kernel/bpf/core.c | 6 ++---- kernel/bpf/trampoline.c | 3 +-- net/bpf/bpf_dummy_struct_ops.c | 3 +-- 12 files changed, 30 insertions(+), 42 deletions(-) commit 414ebf148cb5c5fa727ec51fdb69c4ab82dccf3b Author: Peter Zijlstra Date: Tue Oct 25 21:39:43 2022 +0200 x86/mm: Do verify W^X at boot up Straight up revert of commit: a970174d7a10 ("x86/mm: Do not verify W^X at boot up") now that the root cause has been fixed. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221025201058.011279208@infradead.org arch/x86/mm/pat/set_memory.c | 4 ---- 1 file changed, 4 deletions(-) commit eb7d389d5b2b3c453332abc41c3eea73290cc006 Author: Peter Zijlstra Date: Tue Oct 25 21:39:47 2022 +0200 x86/ftrace: Remove SYSTEM_BOOTING exceptions Now that text_poke is available before ftrace, remove the SYSTEM_BOOTING exceptions. Specifically, this cures a W+X case during boot. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221025201057.945960823@infradead.org arch/x86/kernel/alternative.c | 10 ---------- arch/x86/kernel/ftrace.c | 3 +-- 2 files changed, 1 insertion(+), 12 deletions(-) commit 5b93a83649c7cba3a15eb7e8959b250841acb1b1 Author: Peter Zijlstra Date: Tue Oct 25 21:38:25 2022 +0200 x86/mm: Initialize text poking earlier Move poking_init() up a bunch; specifically move it right after mm_init() which is right before ftrace_init(). This will allow simplifying ftrace text poking which currently has a bunch of exceptions for early boot. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221025201057.881703081@infradead.org init/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3f4c8211d982099be693be9aa7d6fc4607dff290 Author: Peter Zijlstra Date: Tue Oct 25 21:38:21 2022 +0200 x86/mm: Use mm_alloc() in poking_init() Instead of duplicating init_mm, allocate a fresh mm. The advantage is that mm_alloc() has much simpler dependencies. Additionally it makes more conceptual sense, init_mm has no (and must not have) user state to duplicate. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221025201057.816175235@infradead.org arch/x86/mm/init.c | 2 +- include/linux/sched/task.h | 1 - kernel/fork.c | 5 ----- 3 files changed, 1 insertion(+), 7 deletions(-) commit af80602799681c78f14fbe20b6185a56020dedee Author: Peter Zijlstra Date: Tue Oct 25 21:38:18 2022 +0200 mm: Move mm_cachep initialization to mm_init() In order to allow using mm_alloc() much earlier, move initializing mm_cachep into mm_init(). Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221025201057.751153381@infradead.org include/linux/sched/task.h | 1 + init/main.c | 1 + kernel/fork.c | 32 ++++++++++++++++++-------------- 3 files changed, 20 insertions(+), 14 deletions(-) commit 97e3d26b5e5f371b3ee223d94dd123e6c442ba80 Author: Peter Zijlstra Date: Thu Oct 27 14:54:41 2022 -0700 x86/mm: Randomize per-cpu entry area Seth found that the CPU-entry-area; the piece of per-cpu data that is mapped into the userspace page-tables for kPTI is not subject to any randomization -- irrespective of kASLR settings. On x86_64 a whole P4D (512 GB) of virtual address space is reserved for this structure, which is plenty large enough to randomize things a little. As such, use a straight forward randomization scheme that avoids duplicates to spread the existing CPUs over the available space. [ bp: Fix le build. ] Reported-by: Seth Jenkins Reviewed-by: Kees Cook Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Dave Hansen Signed-off-by: Borislav Petkov arch/x86/include/asm/cpu_entry_area.h | 4 --- arch/x86/include/asm/pgtable_areas.h | 8 +++++- arch/x86/kernel/hw_breakpoint.c | 2 +- arch/x86/mm/cpu_entry_area.c | 46 ++++++++++++++++++++++++++++++++--- 4 files changed, 50 insertions(+), 10 deletions(-) commit 3f148f3318140035e87decc1214795ff0755757b Author: Andrey Ryabinin Date: Fri Oct 28 00:31:04 2022 +0300 x86/kasan: Map shadow for percpu pages on demand KASAN maps shadow for the entire CPU-entry-area: [CPU_ENTRY_AREA_BASE, CPU_ENTRY_AREA_BASE + CPU_ENTRY_AREA_MAP_SIZE] This will explode once the per-cpu entry areas are randomized since it will increase CPU_ENTRY_AREA_MAP_SIZE to 512 GB and KASAN fails to allocate shadow for such big area. Fix this by allocating KASAN shadow only for really used cpu entry area addresses mapped by cea_map_percpu_pages() Thanks to the 0day folks for finding and reporting this to be an issue. [ dhansen: tweak changelog since this will get committed before peterz's actual cpu-entry-area randomization ] Signed-off-by: Andrey Ryabinin Signed-off-by: Dave Hansen Tested-by: Yujie Liu Cc: kernel test robot Link: https://lore.kernel.org/r/202210241508.2e203c3d-yujie.liu@intel.com arch/x86/include/asm/kasan.h | 3 +++ arch/x86/mm/cpu_entry_area.c | 8 +++++++- arch/x86/mm/kasan_init_64.c | 15 ++++++++++++--- 3 files changed, 22 insertions(+), 4 deletions(-) commit 057b40f43ce429a02e793adf3cfbf2446a19a38e Merge: 601c1aa855a6 3d03140c4844 Author: Linus Torvalds Date: Thu Dec 15 10:21:10 2022 -0800 Merge tag 'acpi-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These fix an AML byte code execution issue in ACPICA and two issues in the ACPI EC driver which requires rearranging ACPICA code. Specifics: - Avoid trying to resolve operands in AML when there are none (Amadeusz Sławiński) - Fix indentation in include/acpi/acpixf.h to help applying patches from the upstream ACPICA git (Hans de Goede) - Make it possible to install an address space handler without evaluating _REG for Operation Regions in the given address space (Hans de Goede) - Defer the evaluation of _REG for ECDT described ECs till the matching EC device in the DSDT gets parsed and acpi_ec_add() gets called for it (Hans de Goede) - Fix EC address space handler unregistration (Hans de Goede)" * tag 'acpi-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: EC: Fix ECDT probe ordering issues ACPI: EC: Fix EC address space handler unregistration ACPICA: Allow address_space_handler Install and _REG execution as 2 separate steps ACPICA: include/acpi/acpixf.h: Fix indentation ACPICA: Fix operand resolution commit 0a3212de8ab3e2ce5808c6265855e528d4a6767b Author: Naohiro Aota Date: Wed Dec 14 11:06:07 2022 +0900 btrfs: fix trace event name typo for FLUSH_DELAYED_REFS Fix a typo of printing FLUSH_DELAYED_REFS event in flush_space() as FLUSH_ELAYED_REFS. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba include/trace/events/btrfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1f0460c0ca97a4a6570f211c81579294a6cc7be Author: Josef Bacik Date: Tue Dec 13 16:57:44 2022 -0500 btrfs: restore BTRFS_SEQ_LAST when looking up qgroup backref lookup In the patch a2c8d27e5ee8 ("btrfs: use a structure to pass arguments to backref walking functions") Filipe converted everybody to using a new context struct to use for backref lookups, but accidentally dropped the BTRFS_SEQ_LAST usage that exists for qgroups. Add this back so we have the previous behavior. Fixes: a2c8d27e5ee8 ("btrfs: use a structure to pass arguments to backref walking functions") Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/qgroup.c | 1 + 1 file changed, 1 insertion(+) commit c68f72900a12a56c5e9890e6f2ca5119234c9a75 Author: Filipe Manana Date: Tue Dec 13 10:42:26 2022 +0000 btrfs: fix leak of fs devices after removing btrfs module When removing the btrfs module we are not calling btrfs_cleanup_fs_uuids() which results in leaking btrfs_fs_devices structures and other resources. This is a regression recently introduced by a refactoring of the module initialization and exit sequence, which simply removed the call to btrfs_cleanup_fs_uuids() in the exit path, resulting in the leaks. So fix this by calling btrfs_cleanup_fs_uuids() at exit_btrfs_fs(). Fixes: 5565b8e0adcd ("btrfs: make module init/exit match their sequence") Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 1 + 1 file changed, 1 insertion(+) commit db0a4a7b8e95f9312a59a67cbd5bc589f090e13d Author: Christophe JAILLET Date: Mon Dec 12 21:01:43 2022 +0100 btrfs: fix an error handling path in btrfs_defrag_leaves() All error handling paths end to 'out', except this memory allocation failure. This is spurious. So branch to the error handling path also in this case. It will add a call to: memset(&root->defrag_progress, 0, sizeof(root->defrag_progress)); Fixes: 6702ed490ca0 ("Btrfs: Add run time btree defrag, and an ioctl to force btree defrag") Signed-off-by: Christophe JAILLET Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/defrag.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit abe3bf7425fb695a9b37394af18b9ea58a800802 Author: Christophe JAILLET Date: Mon Dec 12 21:14:17 2022 +0100 btrfs: fix an error handling path in btrfs_rename() If new_whiteout_inode() fails, some resources need to be freed. Add the missing goto to the error handling path. Fixes: ab3c5c18e8fa ("btrfs: setup qstr from dentrys using fscrypt helper") Reviewed-by: Sweet Tea Dorminy Signed-off-by: Christophe JAILLET Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 601c1aa855a686643259c4a34e96ee692cdaf01f Merge: c0f234ff90a2 bd7bcc4f963c Author: Linus Torvalds Date: Thu Dec 15 10:16:04 2022 -0800 Merge tag 'thermal-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more thermal control updates from Rafael Wysocki: "These are updates of assorted thermal drivers, mostly for ARM platforms, generally isolated and fairly straightforward, and the recent Intel HFI driver fix for systems without HFI support. Specifics: - Avoid clearing the HFI status bit on systems without HFI support which triggers unchecked MSR access errors (Srinivas Pandruvada) - Add sm8450 and sm8550 QCom compatible string to DT bindings (Luca Weiss, Neil Armstrong) - Use devm_platform_get_and_ioremap_resource on the ST platform to group two calls into a single one (Minghao Chi) - Use GENMASK instead of bitmaps and validate the temperature after reading it in the imx8mm_thermal driver (Marcus Folkesson) - Convert generic-adc-thermal to DT schema (Rob Herring) - Fix debug print message with inverted logic in the k3_j72xx_bandgap driver (Keerthy) - Fix memory leak on thermal_of_zone_register() failure (Ido Schimmel) - Add support for IPQ8074 in the tsens thermal driver along with the DT bindings (Robert Marko) - Fix and rework the debugfs code in the tsens driver (Christian Marangi) - Add calibration and DT documentation for the imx8mm driver (Marek Vasut) - Add DT bindings and compatible for the Mediatek SoCs mt7981 and mt7983 (Daniel Golle) - Don't show an error message if it happens at probe time while it will be deferred on the QCom SPMI ADC driver (Johan Hovold) - Add HWMon support for the imx8mm board (Alexander Stein) - Remove pointless include from the power allocator governor (Christophe JAILLET) - Add interrupt DT bindings for QCom SoCs SC8280XP, SM6350 and SM8450 (Krzysztof Kozlowski) - Fix inaccurate warning message for the QCom tsens gen2 (Luca Weiss) - Demote error log of thermal zone register to debug in the tsens QCom driver (Manivannan Sadhasivam) - Consolidate the the efuse values and the errata handling in the TI Bandgap driver (Bryan Brattlof) - Document Renesas RZ/Five as compatible with RZ/G2UL in the DT bindings (Lad Prabhakar) - Fix the irq handler return value in the LMh driver (Bjorn Andersson) - Delete empty platform remove callback from imx_sc_thermal (Uwe Kleine-König)" * tag 'thermal-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (35 commits) thermal/drivers/imx_sc_thermal: Drop empty platform remove function thermal/drivers/qcom/lmh: Fix irq handler return value dt-bindings: thermal: qcom-tsens: Add compatible for sm8550 thermal/drivers/st: Use devm_platform_get_and_ioremap_resource() dt-bindings: thermal: rzg2l-thermal: Document RZ/Five SoC dt-bindings: thermal: k3-j72xx: conditionally require efuse reg range dt-bindings: thermal: k3-j72xx: elaborate on binding description thermal/drivers/k3_j72xx_bandgap: Map fuse_base only for erratum workaround thermal/drivers/k3_j72xx_bandgap: Remove fuse_base from structure thermal/drivers/k3_j72xx_bandgap: Use bool for i2128 erratum flag thermal/drivers/k3_j72xx_bandgap: Simplify k3_thermal_get_temp() function thermal/drivers/qcom: Demote error log of thermal zone register to debug thermal/drivers/qcom/temp-alarm: Fix inaccurate warning for gen2 dt-bindings: thermal: qcom-tsens: narrow interrupts for SC8280XP, SM6350 and SM8450 thermal/core/power allocator: Remove a useless include thermal/drivers/imx8mm: Add hwmon support thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message dt-bindings: thermal: mediatek: add compatible string for MT7986 and MT7981 SoC thermal: ti-soc-thermal: Drop comma after SoC match table sentinel thermal/drivers/imx: Add support for loading calibration data from OCOTP ... commit c0cd1d541704c45030cbb2031612fdd68e8e15d5 Author: Will Deacon Date: Thu Dec 15 17:59:12 2022 +0000 Revert "arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption" This reverts commit 44ecda71fd8a70185c270f5914ac563827fe1d4c. All versions of this patch on the mailing list, including the version that ended up getting merged, have portions of code guarded by the non-existent CONFIG_ARM64_WORKAROUND_2645198 option. Although Anshuman says he tested the code with some additional debug changes [1], I'm hesitant to fix the CONFIG option and light up a bunch of code right before I (and others) disappear for the end of year holidays, during which time we won't be around to deal with any fallout. So revert the change for now. We can bring back a fixed, tested version for a later -rc when folks are thinking about things other than trees and turkeys. [1] https://lore.kernel.org/r/b6f61241-e436-5db1-1053-3b441080b8d6@arm.com Reported-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20221215094811.23188-1-lukas.bulwahn@gmail.com Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.rst | 2 -- arch/arm64/Kconfig | 16 ---------------- arch/arm64/include/asm/hugetlb.h | 9 --------- arch/arm64/include/asm/pgtable.h | 9 --------- arch/arm64/kernel/cpu_errata.c | 7 ------- arch/arm64/mm/hugetlbpage.c | 21 --------------------- arch/arm64/mm/mmu.c | 21 --------------------- arch/arm64/tools/cpucaps | 1 - 8 files changed, 86 deletions(-) commit c0f234ff90a211272138be1611ba53f3155ebd78 Merge: 9fa4abc9ad2a 11e47bbd700f Author: Linus Torvalds Date: Thu Dec 15 09:45:51 2022 -0800 Merge tag 'gpio-updates-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "We have a new GPIO multiplexer driver, bunch of driver updates and refactoring in the core GPIO library. GPIO core: - teach gpiolib to work with software nodes for HW description - remove ARCH_NR_GPIOS treewide as we no longer impose any limit on the number of GPIOS since the allocation became entirely dynamic - add support for HW quirks for Cirrus CS42L56 codec, Marvell NFC controller, Freescale PCIe and Ethernet controller, Himax LCDs and Mediatek mt2701 - refactor OF quirk code - some general refactoring of the OF and ACPI code, adding new helpers, minor tweaks and fixes, making fwnode usage consistent etc. GPIO uAPI: - fix an issue where the user-space can trigger a NULL-pointer dereference in the kernel by opening a device file, forcing a driver unbind and then calling one of the syscalls on the associated file descriptor New drivers: - add gpio-latch: a new GPIO multiplexer based on latches connected to other GPIOs Driver updates: - convert i2c GPIO expanders to using .probe_new() - drop the gpio-sta2x11 driver - factor out common code for the ACCES IDIO-16 family of controllers and use this new library wherever applicable in drivers - add DT support to gpio-hisi - allow building gpio-davinci as a module and increase its maxItems property - add support for a new model to gpio-pca9570 - other minor changes to various drivers" * tag 'gpio-updates-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (66 commits) gpio: sim: set a limit on the number of GPIOs gpiolib: protect the GPIO device against being dropped while in use by user-space gpiolib: cdev: fix NULL-pointer dereferences gpiolib: Provide to_gpio_device() helper gpiolib: Unify access to the device properties gpio: Do not include when not really needed. gpio: pcf857x: Convert to i2c's .probe_new() gpio: pca953x: Convert to i2c's .probe_new() gpio: max732x: Convert to i2c's .probe_new() dt-bindings: gpio: gpio-davinci: Increase maxItems in gpio-line-names gpiolib: ensure that fwnode is properly set gpio: sl28cpld: Replace irqchip mask_invert with unmask_base gpiolib: of: Use correct fwnode for DT-probed chips gpiolib: of: Drop redundant check in of_mm_gpiochip_remove() gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode gpiolib: add support for software nodes gpiolib: consolidate GPIO lookups gpiolib: acpi: avoid leaking ACPI details into upper gpiolib layers gpiolib: acpi: teach acpi_find_gpio() to handle data-only nodes gpiolib: acpi: change acpi_find_gpio() to accept firmware node ... commit 3d03140c4844bbd128728e8a367bb467d95f888e Merge: f7eae09b5043 ab4620f58d38 Author: Rafael J. Wysocki Date: Thu Dec 15 18:38:22 2022 +0100 Merge branch 'acpi-ec' Merge additional ACPI EC driver fixes for 6.2-rc1: - Fix EC address space handler unregistration (Hans de Goede). - Defer the evaluation of _REG for ECDT described ECs till the matching EC device in the DSDT gets parsed and acpi_ec_add() gets called for it (Hans de Goede). * acpi-ec: ACPI: EC: Fix ECDT probe ordering issues ACPI: EC: Fix EC address space handler unregistration commit 9fa4abc9ad2a18410a7087e6cea15ad1ffb172c6 Merge: 504a73d46bad 3c3bfb8586f8 Author: Linus Torvalds Date: Thu Dec 15 09:37:00 2022 -0800 Merge tag 'fbdev-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev updates from Helge Deller: "The most relevant change are the patches from Dmitry Torokhov to switch omapfb to the gpiod API. The other patches are small and fix e.g. UML build issues, improve the error paths and cleanup code" * tag 'fbdev-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (32 commits) fbdev: fbcon: release buffer when fbcon_do_set_font() failed fbdev: sh_mobile_lcdcfb: use sysfs_emit() to instead of scnprintf() fbdev: uvesafb: use sysfs_emit() to instead of scnprintf() fbdev: uvesafb: Simplify uvesafb_remove() fbdev: uvesafb: Fixes an error handling path in uvesafb_probe() fbdev: uvesafb: don't build on UML fbdev: geode: don't build on UML fbdev: ep93xx-fb: Add missing clk_disable_unprepare in ep93xxfb_probe() fbdev: matroxfb: Convert to i2c's .probe_new() fbdev: da8xx-fb: add missing regulator_disable() in fb_probe fbdev: controlfb: fix spelling mistake "paramaters"->"parameters" fbdev: vermilion: decrease reference count in error path fbdev: smscufx: fix error handling code in ufx_usb_probe fbdev: via: Fix error in via_core_init() fbdev: pm2fb: fix missing pci_disable_device() fbdev: pxafb: Remove unnecessary print function dev_err() fbdev: omapfb: panel-sharp-ls037v7dw01: fix included headers fbdev: omapfb: panel-tpo-td028ttec1: stop including gpio.h fbdev: omapfb: panel-lgphilips-lb035q02: remove backlight GPIO handling fbdev: omapfb: encoder-opa362: fix included headers ... commit f7eae09b50431e36fd61c8cb6fb184bf0e068905 Merge: bee74dcbd390 54c516aeb8b3 Author: Rafael J. Wysocki Date: Thu Dec 15 18:32:48 2022 +0100 Merge branch 'acpica' Merge additional ACPICA changes for 6.2-rc1: - Avoid trying to resolve operands in AML when there are none (Amadeusz Sławiński). - Fix indentation in include/acpi/acpixf.h to help applying patches from the upstream ACPICA git (Hans de Goede). - Make it possible to install an address space handler without evaluating _REG for Operation Regions in the given address space (Hans de Goede). * acpica: ACPICA: Allow address_space_handler Install and _REG execution as 2 separate steps ACPICA: include/acpi/acpixf.h: Fix indentation ACPICA: Fix operand resolution commit 504a73d46bad8964be2cdaa63a2bedaef198ea3b Merge: 041fae9c105a 72ee45fd46d0 Author: Linus Torvalds Date: Thu Dec 15 09:29:19 2022 -0800 Merge tag '6.2-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull ksmbd updates from Steve French: "Six ksmbd server fixes" * tag '6.2-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: Convert to use sysfs_emit()/sysfs_emit_at() APIs ksmbd: Fix resource leak in smb2_lock() ksmbd: Fix resource leak in ksmbd_session_rpc_open() ksmbd: replace one-element arrays with flexible-array members ksmbd: use F_SETLK when unlocking a file ksmbd: set SMB2_SESSION_FLAG_ENCRYPT_DATA when enforcing data encryption for this share commit 7a18e089eff02f17eaee49fc18641f5d16a8284b Author: Evan Quan Date: Mon Dec 5 15:33:31 2022 +0800 drm/amd/pm: update SMU13.0.0 reported maximum shader clock Update the reported maximum shader clock to the value which can be guarded to be achieved on all cards. This is to align with Window setting. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 70 +++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) commit 32a7819ff8e25375c7515aaae5cfcb8c44a461b7 Author: Evan Quan Date: Mon Dec 5 14:53:34 2022 +0800 drm/amd/pm: correct SMU13.0.0 pstate profiling clock settings Correct the pstate standard/peak profiling mode clock settings for SMU13.0.0. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 62b9f835a6c60171845642afec4ce4b44865f10f Author: Evan Quan Date: Fri Dec 2 14:03:45 2022 +0800 drm/amd/pm: enable GPO dynamic control support for SMU13.0.7 To better support UMD pstate profilings, the GPO feature needs to be switched on/off accordingly. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 2 ++ 1 file changed, 2 insertions(+) commit 1794f6a9535bb5234c2b747d1bc6dad03249245a Author: Evan Quan Date: Fri Dec 2 13:56:35 2022 +0800 drm/amd/pm: enable GPO dynamic control support for SMU13.0.0 To better support UMD pstate profilings, the GPO feature needs to be switched on/off accordingly. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 ++- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 3 +++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 15 +++++++++++++++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 ++ 4 files changed, 22 insertions(+), 1 deletion(-) commit 5fc24e6022d47c19d92fb8b84c1616754ef6fdb2 Author: Jason Gunthorpe Date: Thu Dec 15 11:29:25 2022 -0400 RDMA/rxe: Fix compile warnings on 32-bit Move the conditional code into a function, with two varients so it is harder to make these kinds of mistakes. drivers/infiniband/sw/rxe/rxe_resp.c: In function 'atomic_write_reply': drivers/infiniband/sw/rxe/rxe_resp.c:794:13: error: unused variable 'payload' [-Werror=unused-variable] 794 | int payload = payload_size(pkt); | ^~~~~~~ drivers/infiniband/sw/rxe/rxe_resp.c:793:24: error: unused variable 'mr' [-Werror=unused-variable] 793 | struct rxe_mr *mr = qp->resp.mr; | ^~ drivers/infiniband/sw/rxe/rxe_resp.c:791:19: error: unused variable 'dst' [-Werror=unused-variable] 791 | u64 src, *dst; | ^~~ drivers/infiniband/sw/rxe/rxe_resp.c:791:13: error: unused variable 'src' [-Werror=unused-variable] 791 | u64 src, *dst; Fixes: 034e285f8b99 ("RDMA/rxe: Make responder support atomic write on RC service") Link: https://lore.kernel.org/linux-rdma/Y5s+EVE7eLWQqOwv@nvidia.com/ Reported-by: Guenter Roeck Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_resp.c | 72 ++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 32 deletions(-) commit a8cf95f93610eb8282f8b6d0117ba78b74588d6b Author: Pavel Begunkov Date: Fri Dec 2 17:47:25 2022 +0000 io_uring: fix overflow handling regression Because the single task locking series got reordered ahead of the timeout and completion lock changes, two hunks inadvertently ended up using __io_fill_cqe_req() rather than io_fill_cqe_req(). This meant that we dropped overflow handling in those two spots. Reinstate the correct CQE filling helper. Fixes: f66f73421f0a ("io_uring: skip spinlocking for ->task_complete") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 +- io_uring/rw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7cffcade57a429667447c4f41d8414bbcf1b3aaa Author: Dawei Li Date: Tue Dec 13 23:46:52 2022 +0800 xen: make remove callback of xen 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. This change is for xen bus based drivers. Acked-by: Juergen Gross Signed-off-by: Dawei Li Link: https://lore.kernel.org/r/TYCP286MB23238119AB4DF190997075C9CAE39@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Juergen Gross drivers/block/xen-blkback/xenbus.c | 4 +--- drivers/block/xen-blkfront.c | 3 +-- drivers/char/tpm/xen-tpmfront.c | 3 +-- drivers/gpu/drm/xen/xen_drm_front.c | 3 +-- drivers/input/misc/xen-kbdfront.c | 5 ++--- drivers/net/xen-netback/xenbus.c | 3 +-- drivers/net/xen-netfront.c | 4 +--- drivers/pci/xen-pcifront.c | 4 +--- drivers/scsi/xen-scsifront.c | 4 +--- drivers/tty/hvc/hvc_xen.c | 4 ++-- drivers/usb/host/xen-hcd.c | 4 +--- drivers/video/fbdev/xen-fbfront.c | 6 ++---- drivers/xen/pvcalls-back.c | 3 +-- drivers/xen/pvcalls-front.c | 3 +-- drivers/xen/xen-pciback/xenbus.c | 4 +--- drivers/xen/xen-scsiback.c | 4 +--- include/xen/xenbus.h | 2 +- net/9p/trans_xen.c | 3 +-- sound/xen/xen_snd_front.c | 3 +-- 19 files changed, 22 insertions(+), 47 deletions(-) commit a7d82367daa6baa5e8399e6327e7f2f463534505 Author: Vladimir Oltean Date: Wed Dec 14 13:01:20 2022 +0200 net: dsa: mv88e6xxx: avoid reg_lock deadlock in mv88e6xxx_setup_port() In the blamed commit, it was not noticed that one implementation of chip->info->ops->phylink_get_caps(), called by mv88e6xxx_get_caps(), may access hardware registers, and in doing so, it takes the mv88e6xxx_reg_lock(). Namely, this is mv88e6352_phylink_get_caps(). This is a problem because mv88e6xxx_get_caps(), apart from being a top-level function (method invoked by dsa_switch_ops), is now also directly called from mv88e6xxx_setup_port(), which runs under the mv88e6xxx_reg_lock() taken by mv88e6xxx_setup(). Therefore, when running on mv88e6352, the reg_lock would be acquired a second time and the system would deadlock on driver probe. The things that mv88e6xxx_setup() can compete with in terms of register access with are the IRQ handlers and MDIO bus operations registered by mv88e6xxx_probe(). So there is a real need to acquire the register lock. The register lock can, in principle, be dropped and re-acquired pretty much at will within the driver, as long as no operations that involve waiting for indirect access to complete (essentially, callers of mv88e6xxx_smi_direct_wait() and mv88e6xxx_wait_mask()) are interrupted with the lock released. However, I would guess that in mv88e6xxx_setup(), the critical section is kept open for such a long time just in order to optimize away multiple lock/unlock operations on the registers. We could, in principle, drop the reg_lock right before the mv88e6xxx_setup_port() -> mv88e6xxx_get_caps() call, and re-acquire it immediately afterwards. But this would look ugly, because mv88e6xxx_setup_port() would release a lock which it didn't acquire, but the caller did. A cleaner solution to this issue comes from the observation that struct mv88e6xxxx_ops methods generally assume they are called with the reg_lock already acquired. Whereas mv88e6352_phylink_get_caps() is more the exception rather than the norm, in that it acquires the lock itself. Let's enforce the same locking pattern/convention for chip->info->ops->phylink_get_caps() as well, and make mv88e6xxx_get_caps(), the top-level function, acquire the register lock explicitly, for this one implementation that will access registers for port 4 to work properly. This means that mv88e6xxx_setup_port() will no longer call the top-level function, but the low-level mv88e6xxx_ops method which expects the correct calling context (register lock held). Compared to chip->info->ops->phylink_get_caps(), mv88e6xxx_get_caps() also fixes up the supported_interfaces bitmap for internal ports, since that can be done generically and does not require per-switch knowledge. That's code which will no longer execute, however mv88e6xxx_setup_port() doesn't need that. It just needs to look at the mac_capabilities bitmap. Fixes: cc1049ccee20 ("net: dsa: mv88e6xxx: fix speed setting for CPU/DSA ports") Reported-by: Maksim Kiselev Signed-off-by: Vladimir Oltean Tested-by: Maksim Kiselev Link: https://lore.kernel.org/r/20221214110120.3368472-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni drivers/net/dsa/mv88e6xxx/chip.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit c72a7e42592b2e18d862cf120876070947000d7a Author: Biju Das Date: Wed Dec 14 10:51:18 2022 +0000 ravb: Fix "failed to switch device to config mode" message during unbind This patch fixes the error "ravb 11c20000.ethernet eth0: failed to switch device to config mode" during unbind. We are doing register access after pm_runtime_put_sync(). We usually do cleanup in reverse order of init. Currently in remove(), the "pm_runtime_put_sync" is not in reverse order. Probe reset_control_deassert(rstc); pm_runtime_enable(&pdev->dev); pm_runtime_get_sync(&pdev->dev); remove pm_runtime_put_sync(&pdev->dev); unregister_netdev(ndev); .. ravb_mdio_release(priv); pm_runtime_disable(&pdev->dev); Consider the call to unregister_netdev() unregister_netdev->unregister_netdevice_queue->rollback_registered_many that calls the below functions which access the registers after pm_runtime_put_sync() 1) ravb_get_stats 2) ravb_close Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Cc: stable@vger.kernel.org Signed-off-by: Biju Das Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20221214105118.2495313-1-biju.das.jz@bp.renesas.com Signed-off-by: Paolo Abeni drivers/net/ethernet/renesas/ravb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a12a383e59ce486abd719b6bda33c353a3b385e7 Author: Krzysztof Kozlowski Date: Thu Dec 15 14:43:37 2022 +0100 ASoC: lochnagar: Fix unused lochnagar_of_match warning lochnagar_of_match is used unconditionally, so COMPILE_TEST builds without OF warn: sound/soc/codecs/lochnagar-sc.c:247:34: error: ‘lochnagar_of_match’ defined but not used [-Werror=unused-const-variable=] Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221215134337.77944-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/lochnagar-sc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cb815cfc78b137ee38bcd65e7c955d6cc2cc250 Author: Gaosheng Cui Date: Wed Dec 14 16:01:17 2022 +0800 net: stmmac: fix errno when create_singlethread_workqueue() fails We should set the return value to -ENOMEM explicitly when create_singlethread_workqueue() fails in stmmac_dvr_probe(), otherwise we'll lose the error value. Fixes: a137f3f27f92 ("net: stmmac: fix possible memory leak in stmmac_dvr_probe()") Signed-off-by: Gaosheng Cui Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20221214080117.3514615-1-cuigaosheng1@huawei.com Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) commit d36a9ea5e7766961e753ee38d4c331bbe6ef659b Author: Ming Lei Date: Thu Dec 15 10:16:29 2022 +0800 block: fix use-after-free of q->q_usage_counter For blk-mq, queue release handler is usually called after blk_mq_freeze_queue_wait() returns. However, the q_usage_counter->release() handler may not be run yet at that time, so this can cause a use-after-free. Fix the issue by moving percpu_ref_exit() into blk_free_queue_rcu(). Since ->release() is called with rcu read lock held, it is agreed that the race should be covered in caller per discussion from the two links. Reported-by: Zhang Wensheng Reported-by: Zhong Jinghua Link: https://lore.kernel.org/linux-block/Y5prfOjyyjQKUrtH@T590/T/#u Link: https://lore.kernel.org/lkml/Y4%2FmzMd4evRg9yDi@fedora/ Cc: Hillf Danton Cc: Yu Kuai Cc: Dennis Zhou Fixes: 2b0d3d3e4fcf ("percpu_ref: reduce memory footprint of percpu_ref in fast path") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20221215021629.74870-1-ming.lei@redhat.com Signed-off-by: Jens Axboe block/blk-core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1eb206208b0f3f707c67134ef6ba394410effb67 Author: Yuwei Guan Date: Thu Nov 10 19:26:22 2022 +0800 block, bfq: only do counting of pending-request for BFQ_GROUP_IOSCHED The 'bfqd->num_groups_with_pending_reqs' is used when CONFIG_BFQ_GROUP_IOSCHED is enabled, so let the variables and processes take effect when CONFIG_BFQ_GROUP_IOSCHED is enabled. Cc: Yu Kuai Signed-off-by: Yuwei Guan Reviewed-by: Jan Kara Reviewed-by: Yu Kuai Link: https://lore.kernel.org/r/20221110112622.389332-1-Yuwei.Guan@zeekrlife.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 2 ++ block/bfq-iosched.h | 4 ++++ block/bfq-wf2q.c | 8 ++++---- 3 files changed, 10 insertions(+), 4 deletions(-) commit cb3543cff90a4448ed560ac86c98033ad5fecda9 Author: Johan Hovold Date: Thu Dec 15 11:46:46 2022 +0100 regulator: core: fix deadlock on regulator enable When updating the operating mode as part of regulator enable, the caller has already locked the regulator tree and drms_uA_update() must not try to do the same in order not to trigger a deadlock. The lock inversion is reported by lockdep as: ====================================================== WARNING: possible circular locking dependency detected 6.1.0-next-20221215 #142 Not tainted ------------------------------------------------------ udevd/154 is trying to acquire lock: ffffc11f123d7e50 (regulator_list_mutex){+.+.}-{3:3}, at: regulator_lock_dependent+0x54/0x280 but task is already holding lock: ffff80000e4c36e8 (regulator_ww_class_acquire){+.+.}-{0:0}, at: regulator_enable+0x34/0x80 which lock already depends on the new lock. ... Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(regulator_ww_class_acquire); lock(regulator_list_mutex); lock(regulator_ww_class_acquire); lock(regulator_list_mutex); *** DEADLOCK *** just before probe of a Qualcomm UFS controller (occasionally) deadlocks when enabling one of its regulators. Fixes: 9243a195be7a ("regulator: core: Change voltage setting path") Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") Cc: stable@vger.kernel.org # 5.0 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221215104646.19818-1-johan+linaro@kernel.org Signed-off-by: Mark Brown drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e43039a49c2da45edc1d9d7c9ede4003ab45a5f Author: Li Zetao Date: Tue Dec 13 20:56:14 2022 +0800 r6040: Fix kmemleak in probe and remove There is a memory leaks reported by kmemleak: unreferenced object 0xffff888116111000 (size 2048): comm "modprobe", pid 817, jiffies 4294759745 (age 76.502s) hex dump (first 32 bytes): 00 c4 0a 04 81 88 ff ff 08 10 11 16 81 88 ff ff ................ 08 10 11 16 81 88 ff ff 00 00 00 00 00 00 00 00 ................ backtrace: [] kmalloc_trace+0x22/0x60 [] phy_device_create+0x4e/0x90 [] get_phy_device+0xd2/0x220 [] mdiobus_scan+0xa4/0x2e0 [] __mdiobus_register+0x482/0x8b0 [] r6040_init_one+0x714/0xd2c [r6040] ... The problem occurs in probe process as follows: r6040_init_one: mdiobus_register mdiobus_scan <- alloc and register phy_device, the reference count of phy_device is 3 r6040_mii_probe phy_connect <- connect to the first phy_device, so the reference count of the first phy_device is 4, others are 3 register_netdev <- fault inject succeeded, goto error handling path // error handling path err_out_mdio_unregister: mdiobus_unregister(lp->mii_bus); err_out_mdio: mdiobus_free(lp->mii_bus); <- the reference count of the first phy_device is 1, it is not released and other phy_devices are released // similarly, the remove process also has the same problem The root cause is traced to the phy_device is not disconnected when removes one r6040 device in r6040_remove_one() or on error handling path after r6040_mii probed successfully. In r6040_mii_probe(), a net ethernet device is connected to the first PHY device of mii_bus, in order to notify the connected driver when the link status changes, which is the default behavior of the PHY infrastructure to handle everything. Therefore the phy_device should be disconnected when removes one r6040 device or on error handling path. Fix it by adding phy_disconnect() when removes one r6040 device or on error handling path after r6040_mii probed successfully. Fixes: 3831861b4ad8 ("r6040: implement phylib") Signed-off-by: Li Zetao Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20221213125614.927754-1-lizetao1@huawei.com Signed-off-by: Paolo Abeni drivers/net/ethernet/rdc/r6040.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6b46a06100dd0e0ebe400573e94ccd09163bfd5b Author: Andreas Gruenbacher Date: Fri Dec 9 23:03:59 2022 +0100 gfs2: Remove support for glock holder auto-demotion (2) As a follow-up to the previous commit, move the recovery related code in __gfs2_glock_dq() to gfs2_glock_dq() where it better fits. No functional change. Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit ba3e77a4a22af018d2fe4d745902b2531ca82aba Author: Andreas Gruenbacher Date: Fri Dec 9 22:14:01 2022 +0100 gfs2: Remove support for glock holder auto-demotion Remove the support for glock holder auto-demotion (commit dc732906c245 and folow-ups) as we are not planning to use this feature, and the additional code therefore only adds unnecessary complexity. Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 194 +++++++++++-------------------------------------------- fs/gfs2/glock.h | 20 ------ fs/gfs2/incore.h | 1 - 3 files changed, 36 insertions(+), 179 deletions(-) commit 3ff8bff704f4de125dca2262e5b5b963a3da1d87 Author: Kirill Tkhai Date: Tue Dec 13 00:05:53 2022 +0300 unix: Fix race in SOCK_SEQPACKET's unix_dgram_sendmsg() There is a race resulting in alive SOCK_SEQPACKET socket may change its state from TCP_ESTABLISHED to TCP_CLOSE: unix_release_sock(peer) unix_dgram_sendmsg(sk) sock_orphan(peer) sock_set_flag(peer, SOCK_DEAD) sock_alloc_send_pskb() if !(sk->sk_shutdown & SEND_SHUTDOWN) OK if sock_flag(peer, SOCK_DEAD) sk->sk_state = TCP_CLOSE sk->sk_shutdown = SHUTDOWN_MASK After that socket sk remains almost normal: it is able to connect, listen, accept and recvmsg, while it can't sendmsg. Since this is the only possibility for alive SOCK_SEQPACKET to change the state in such way, we should better fix this strange and potentially danger corner case. Note, that we will return EPIPE here like this is normally done in sock_alloc_send_pskb(). Originally used ECONNREFUSED looks strange, since it's strange to return a specific retval in dependence of race in kernel, when user can't affect on this. Also, move TCP_CLOSE assignment for SOCK_DGRAM sockets under state lock to fix race with unix_dgram_connect(): unix_dgram_connect(other) unix_dgram_sendmsg(sk) unix_peer(sk) = NULL unix_state_unlock(sk) unix_state_double_lock(sk, other) sk->sk_state = TCP_ESTABLISHED unix_peer(sk) = other unix_state_double_unlock(sk, other) sk->sk_state = TCP_CLOSED This patch fixes both of these races. Fixes: 83301b5367a9 ("af_unix: Set TCP_ESTABLISHED for datagram sockets too") Signed-off-by: Kirill Tkhai Link: https://lore.kernel.org/r/135fda25-22d5-837a-782b-ceee50e19844@ya.ru Signed-off-by: Paolo Abeni net/unix/af_unix.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit f506439ec3dee11e0e77b0a1f3fb3eec22c97873 Author: Toke Høiland-Jørgensen Date: Thu Dec 15 00:02:54 2022 +0100 selftests/bpf: Add a test for using a cpumap from an freplace-to-XDP program This adds a simple test for inserting an XDP program into a cpumap that is "owned" by an XDP program that was loaded as PROG_TYPE_EXT (as libxdp does). Prior to the kernel fix this would fail because the map type ownership would be set to PROG_TYPE_EXT instead of being resolved to PROG_TYPE_XDP. v5: - Fix a few nits from Andrii, add his ACK v4: - Use skeletons for selftest v3: - Update comment to better explain the cause - Add Yonghong's ACK Acked-by: Yonghong Song Acked-by: Andrii Nakryiko Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20221214230254.790066-2-toke@redhat.com Signed-off-by: Martin KaFai Lau .../selftests/bpf/prog_tests/fexit_bpf2bpf.c | 48 ++++++++++++++++++++++ .../testing/selftests/bpf/progs/freplace_progmap.c | 24 +++++++++++ 2 files changed, 72 insertions(+) commit 1c123c567fb138ebd187480b7fc0610fcb0851f5 Author: Toke Høiland-Jørgensen Date: Thu Dec 15 00:02:53 2022 +0100 bpf: Resolve fext program type when checking map compatibility The bpf_prog_map_compatible() check makes sure that BPF program types are not mixed inside BPF map types that can contain programs (tail call maps, cpumaps and devmaps). It does this by setting the fields of the map->owner struct to the values of the first program being checked against, and rejecting any subsequent programs if the values don't match. One of the values being set in the map owner struct is the program type, and since the code did not resolve the prog type for fext programs, the map owner type would be set to PROG_TYPE_EXT and subsequent loading of programs of the target type into the map would fail. This bug is seen in particular for XDP programs that are loaded as PROG_TYPE_EXT using libxdp; these cannot insert programs into devmaps and cpumaps because the check fails as described above. Fix the bug by resolving the fext program type to its target program type as elsewhere in the verifier. v3: - Add Yonghong's ACK Fixes: f45d5b6ce2e8 ("bpf: generalise tail call map compatibility check") Acked-by: Yonghong Song Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20221214230254.790066-1-toke@redhat.com Signed-off-by: Martin KaFai Lau kernel/bpf/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9f28157778ede0d4f183f7ab3b46995bb400abbe Author: Minsuk Kang Date: Wed Dec 14 10:51:39 2022 +0900 nfc: pn533: Clear nfc_target before being used Fix a slab-out-of-bounds read that occurs in nla_put() called from nfc_genl_send_target() when target->sensb_res_len, which is duplicated from an nfc_target in pn533, is too large as the nfc_target is not properly initialized and retains garbage values. Clear nfc_targets with memset() before they are used. Found by a modified version of syzkaller. BUG: KASAN: slab-out-of-bounds in nla_put Call Trace: memcpy nla_put nfc_genl_dump_targets genl_lock_dumpit netlink_dump __netlink_dump_start genl_family_rcv_msg_dumpit genl_rcv_msg netlink_rcv_skb genl_rcv netlink_unicast netlink_sendmsg sock_sendmsg ____sys_sendmsg ___sys_sendmsg __sys_sendmsg do_syscall_64 Fixes: 673088fb42d0 ("NFC: pn533: Send ATR_REQ directly for active device detection") Fixes: 361f3cb7f9cf ("NFC: DEP link hook implementation for pn533") Signed-off-by: Minsuk Kang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221214015139.119673-1-linuxlovemin@yonsei.ac.kr Signed-off-by: Jakub Kicinski drivers/nfc/pn533/pn533.c | 4 ++++ 1 file changed, 4 insertions(+) commit 628050ec952d2e2e46ec9fb6aa07e41139e030c8 Author: Vladimir Oltean Date: Tue Dec 13 02:19:08 2022 +0200 net: enetc: avoid buffer leaks on xdp_do_redirect() failure Before enetc_clean_rx_ring_xdp() calls xdp_do_redirect(), each software BD in the RX ring between index orig_i and i can have one of 2 refcount values on its page. We are the owner of the current buffer that is being processed, so the refcount will be at least 1. If the current owner of the buffer at the diametrically opposed index in the RX ring (i.o.w, the other half of this page) has not yet called kfree(), this page's refcount could even be 2. enetc_page_reusable() in enetc_flip_rx_buff() tests for the page refcount against 1, and [ if it's 2 ] does not attempt to reuse it. But if enetc_flip_rx_buff() is put after the xdp_do_redirect() call, the page refcount can have one of 3 values. It can also be 0, if there is no owner of the other page half, and xdp_do_redirect() for this buffer ran so far that it triggered a flush of the devmap/cpumap bulk queue, and the consumers of those bulk queues also freed the buffer, all by the time xdp_do_redirect() returns the execution back to enetc. This is the reason why enetc_flip_rx_buff() is called before xdp_do_redirect(), but there is a big flaw with that reasoning: enetc_flip_rx_buff() will set rx_swbd->page = NULL on both sides of the enetc_page_reusable() branch, and if xdp_do_redirect() returns an error, we call enetc_xdp_free(), which does not deal gracefully with that. In fact, what happens is quite special. The page refcounts start as 1. enetc_flip_rx_buff() figures they're reusable, transfers these rx_swbd->page pointers to a different rx_swbd in enetc_reuse_page(), and bumps the refcount to 2. When xdp_do_redirect() later returns an error, we call the no-op enetc_xdp_free(), but we still haven't lost the reference to that page. A copy of it is still at rx_ring->next_to_alloc, but that has refcount 2 (and there are no concurrent owners of it in flight, to drop the refcount). What really kills the system is when we'll flip the rx_swbd->page the second time around. With an updated refcount of 2, the page will not be reusable and we'll really leak it. Then enetc_new_page() will have to allocate more pages, which will then eventually leak again on further errors from xdp_do_redirect(). The problem, summarized, is that we zeroize rx_swbd->page before we're completely done with it, and this makes it impossible for the error path to do something with it. Since the packet is potentially multi-buffer and therefore the rx_swbd->page is potentially an array, manual passing of the old pointers between enetc_flip_rx_buff() and enetc_xdp_free() is a bit difficult. For the sake of going with a simple solution, we accept the possibility of racing with xdp_do_redirect(), and we move the flip procedure to execute only on the redirect success path. By racing, I mean that the page may be deemed as not reusable by enetc (having a refcount of 0), but there will be no leak in that case, either. Once we accept that, we have something better to do with buffers on XDP_REDIRECT failure. Since we haven't performed half-page flipping yet, we won't, either (and this way, we can avoid enetc_xdp_free() completely, which gives the entire page to the slab allocator). Instead, we'll call enetc_xdp_drop(), which will recycle this half of the buffer back to the RX ring. Fixes: 9d2b68cc108d ("net: enetc: add support for XDP_REDIRECT") Suggested-by: Lorenzo Bianconi Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20221213001908.2347046-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/enetc.c | 35 +++++++--------------------- 1 file changed, 8 insertions(+), 27 deletions(-) commit 76d62f24db07f22ccf9bc18ca793c27d4ebef721 Author: John Stultz Date: Wed Dec 14 23:18:34 2022 +0000 pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion Wei Wang reported seeing priority inversion caused latencies caused by contention on pmsg_lock, and suggested it be switched to a rt_mutex. I was initially hesitant this would help, as the tasks in that trace all seemed to be SCHED_NORMAL, so the benefit would be limited to only nice boosting. However, another similar issue was raised where the priority inversion was seen did involve a blocked RT task so it is clear this would be helpful in that case. Cc: Wei Wang Cc: Midas Chien Cc: Connor O'Brien Cc: Kees Cook Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Cc: kernel-team@android.com Fixes: 9d5438f462ab ("pstore: Add pmsg - user-space accessible pstore object") Reported-by: Wei Wang Signed-off-by: John Stultz Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221214231834.3711880-1-jstultz@google.com fs/pstore/pmsg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d6a9fb87e9d18f3394a9845546bbe868efdccfd2 Author: Nathan Chancellor Date: Wed Dec 14 16:26:03 2022 -0700 security: Restrict CONFIG_ZERO_CALL_USED_REGS to gcc or clang > 15.0.6 A bad bug in clang's implementation of -fzero-call-used-regs can result in NULL pointer dereferences (see the links above the check for more information). Restrict CONFIG_CC_HAS_ZERO_CALL_USED_REGS to either a supported GCC version or a clang newer than 15.0.6, which will catch both a theoretical 15.0.7 and the upcoming 16.0.0, which will both have the bug fixed. Cc: stable@vger.kernel.org # v5.15+ Signed-off-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221214232602.4118147-1-nathan@kernel.org security/Kconfig.hardening | 3 +++ 1 file changed, 3 insertions(+) commit f68022ae0aeb0803450e05abc0e984027c33ef1b Author: Kristina Martsenko Date: Fri Dec 9 17:34:41 2022 +0000 lkdtm: cfi: Make PAC test work with GCC 7 and 8 The CFI test uses the branch-protection=none compiler attribute to disable PAC return address protection on a function. While newer GCC versions support this attribute, older versions (GCC 7 and 8) instead supported the sign-return-address=none attribute, leading to a build failure when the test is built with older compilers. Fix it by checking which attribute is supported and using the correct one. Fixes: 2e53b877dc12 ("lkdtm: Add CFI_BACKWARD to test ROP mitigations") Reported-by: Daniel Díaz Signed-off-by: Kristina Martsenko Signed-off-by: Kees Cook Link: https://lore.kernel.org/all/CAEUSe78kDPxQmQqCWW-_9LCgJDFhAeMoVBFnX9QLx18Z4uT4VQ@mail.gmail.com/ drivers/misc/lkdtm/cfi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d4505aa6afae17a20c2f3ccfbfb7a07881b7ae02 Author: Masami Hiramatsu (Google) Date: Mon Nov 14 13:47:56 2022 +0900 tracing/probes: Reject symbol/symstr type for uprobe Since uprobe's argument must contain the user-space data, that should not be converted to kernel symbols. Reject if user specifies these types on uprobe events. e.g. /sys/kernel/debug/tracing # echo 'p /bin/sh:10 %ax:symbol' >> uprobe_events sh: write error: Invalid argument /sys/kernel/debug/tracing # echo 'p /bin/sh:10 %ax:symstr' >> uprobe_events sh: write error: Invalid argument /sys/kernel/debug/tracing # cat error_log [ 1783.134883] trace_uprobe: error: Unknown type is specified Command: p /bin/sh:10 %ax:symbol ^ [ 1792.201120] trace_uprobe: error: Unknown type is specified Command: p /bin/sh:10 %ax:symstr ^ Link: https://lore.kernel.org/all/166679931679.1528100.15540755370726009882.stgit@devnote3/ Signed-off-by: Masami Hiramatsu (Google) kernel/trace/trace_probe.c | 21 +++++++++++++-------- kernel/trace/trace_probe.h | 3 ++- kernel/trace/trace_uprobe.c | 3 ++- .../ftrace/test.d/kprobe/uprobe_syntax_errors.tc | 5 +++++ 4 files changed, 22 insertions(+), 10 deletions(-) commit b26a124cbfa80f42bfc4e63e1d5643ca98159d66 Author: Masami Hiramatsu (Google) Date: Mon Nov 14 13:47:56 2022 +0900 tracing/probes: Add symstr type for dynamic events Add 'symstr' type for storing the kernel symbol as a string data instead of the symbol address. This allows us to filter the events by wildcard symbol name. e.g. # echo 'e:wqfunc workqueue.workqueue_execute_start symname=$function:symstr' >> dynamic_events # cat events/eprobes/wqfunc/format name: wqfunc ID: 2110 format: field:unsigned short common_type; offset:0; size:2; signed:0; field:unsigned char common_flags; offset:2; size:1; signed:0; field:unsigned char common_preempt_count; offset:3; size:1; signed:0; field:int common_pid; offset:4; size:4; signed:1; field:__data_loc char[] symname; offset:8; size:4; signed:1; print fmt: " symname=\"%s\"", __get_str(symname) Note that there is already 'symbol' type which just change the print format (so it still stores the symbol address in the tracing ring buffer.) On the other hand, 'symstr' type stores the actual "symbol+offset/size" data as a string. Link: https://lore.kernel.org/all/166679930847.1528100.4124308529180235965.stgit@devnote3/ Signed-off-by: Masami Hiramatsu (Google) Documentation/trace/kprobetrace.rst | 8 +++++-- kernel/trace/trace.c | 2 +- kernel/trace/trace_probe.c | 44 ++++++++++++++++++++++------------ kernel/trace/trace_probe.h | 16 +++++++++---- kernel/trace/trace_probe_tmpl.h | 47 ++++++++++++++++++++++++++++++++++--- 5 files changed, 91 insertions(+), 26 deletions(-) commit 3b7ddab8a19aefc768f345fd3782af35b4a68d9b Author: wuqiang Date: Thu Nov 10 16:15:02 2022 +0800 kprobes: kretprobe events missing on 2-core KVM guest Default value of maxactive is set as num_possible_cpus() for nonpreemptable systems. For a 2-core system, only 2 kretprobe instances would be allocated in default, then these 2 instances for execve kretprobe are very likely to be used up with a pipelined command. Here's the testcase: a shell script was added to crontab, and the content of the script is: #!/bin/sh do_something_magic `tr -dc a-z < /dev/urandom | head -c 10` cron will trigger a series of program executions (4 times every hour). Then events loss would be noticed normally after 3-4 hours of testings. The issue is caused by a burst of series of execve requests. The best number of kretprobe instances could be different case by case, and should be user's duty to determine, but num_possible_cpus() as the default value is inadequate especially for systems with small number of cpus. This patch enables the logic for preemption as default, thus increases the minimum of maxactive to 10 for nonpreemptable systems. Link: https://lore.kernel.org/all/20221110081502.492289-1-wuqiang.matt@bytedance.com/ Signed-off-by: wuqiang Reviewed-by: Solar Designer Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) Documentation/trace/kprobes.rst | 3 +-- kernel/kprobes.c | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) commit 041fae9c105ae342a4245cf1e0dc56a23fbb9d3c Merge: eb67d239f3aa 26a8057a1ada Author: Linus Torvalds Date: Wed Dec 14 15:27:57 2022 -0800 Merge tag 'f2fs-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've added two features: F2FS_IOC_START_ATOMIC_REPLACE and a per-block age-based extent cache. F2FS_IOC_START_ATOMIC_REPLACE is a variant of the previous atomic write feature which guarantees a per-file atomicity. It would be more efficient than AtomicFile implementation in Android framework. The per-block age-based extent cache implements another type of extent cache in memory which keeps the per-block age in a file, so that block allocator could split the hot and cold data blocks more accurately. Enhancements: - introduce F2FS_IOC_START_ATOMIC_REPLACE - refactor extent_cache to add a new per-block-age-based extent cache support - introduce discard_urgent_util, gc_mode, max_ordered_discard sysfs knobs - add proc entry to show discard_plist info - optimize iteration over sparse directories - add barrier mount option Bug fixes: - avoid victim selection from previous victim section - fix to enable compress for newly created file if extension matches - set zstd compress level correctly - initialize locks early in f2fs_fill_super() to fix bugs reported by syzbot - correct i_size change for atomic writes - allow to read node block after shutdown - allow to set compression for inlined file - fix gc mode when gc_urgent_high_remaining is 1 - should put a page when checking the summary info Minor fixes and various clean-ups in GC, discard, debugfs, sysfs, and doc" * tag 'f2fs-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (63 commits) f2fs: reset wait_ms to default if any of the victims have been selected f2fs: fix some format WARNING in debug.c and sysfs.c f2fs: don't call f2fs_issue_discard_timeout() when discard_cmd_cnt is 0 in f2fs_put_super() f2fs: fix iostat parameter for discard f2fs: Fix spelling mistake in label: free_bio_enrty_cache -> free_bio_entry_cache f2fs: add block_age-based extent cache f2fs: allocate the extent_cache by default f2fs: refactor extent_cache to support for read and more f2fs: remove unnecessary __init_extent_tree f2fs: move internal functions into extent_cache.c f2fs: specify extent cache for read explicitly f2fs: introduce f2fs_is_readonly() for readability f2fs: remove F2FS_SET_FEATURE() and F2FS_CLEAR_FEATURE() macro f2fs: do some cleanup for f2fs module init MAINTAINERS: Add f2fs bug tracker link f2fs: remove the unused flush argument to change_curseg f2fs: open code allocate_segment_by_default f2fs: remove struct segment_allocation default_salloc_ops f2fs: introduce discard_urgent_util sysfs node f2fs: define MIN_DISCARD_GRANULARITY macro ... commit eb67d239f3aa1711afb0a42eab50459d9f3d672e Merge: 94a855111ed9 6e66e96e31b8 Author: Linus Torvalds Date: Wed Dec 14 15:23:49 2022 -0800 Merge tag 'riscv-for-linus-6.2-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: - Support for the T-Head PMU via the perf subsystem - ftrace support for rv32 - Support for non-volatile memory devices - Various fixes and cleanups * tag 'riscv-for-linus-6.2-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (52 commits) Documentation: RISC-V: patch-acceptance: s/implementor/implementer Documentation: RISC-V: Mention the UEFI Standards Documentation: RISC-V: Allow patches for non-standard behavior Documentation: RISC-V: Fix a typo in patch-acceptance riscv: Fixup compile error with !MMU riscv: Fix P4D_SHIFT definition for 3-level page table mode riscv: Apply a static assert to riscv_isa_ext_id RISC-V: Add some comments about the shadow and overflow stacks RISC-V: Align the shadow stack RISC-V: Ensure Zicbom has a valid block size RISC-V: Introduce riscv_isa_extension_check RISC-V: Improve use of isa2hwcap[] riscv: Don't duplicate _ALTERNATIVE_CFG* macros riscv: alternatives: Drop the underscores from the assembly macro names riscv: alternatives: Don't name unused macro parameters riscv: Don't duplicate __ALTERNATIVE_CFG in __ALTERNATIVE_CFG_2 riscv: mm: call best_map_size many times during linear-mapping riscv: Move cast inside kernel_mapping_[pv]a_to_[vp]a riscv: Fix crash during early errata patching riscv: boot: add zstd support ... commit 94a855111ed9106971ca2617c5d075269e6aefde Merge: 93761c93e9da f1a033cc6b9e Author: Linus Torvalds Date: Wed Dec 14 15:03:00 2022 -0800 Merge tag 'x86_core_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 core updates from Borislav Petkov: - Add the call depth tracking mitigation for Retbleed which has been long in the making. It is a lighterweight software-only fix for Skylake-based cores where enabling IBRS is a big hammer and causes a significant performance impact. What it basically does is, it aligns all kernel functions to 16 bytes boundary and adds a 16-byte padding before the function, objtool collects all functions' locations and when the mitigation gets applied, it patches a call accounting thunk which is used to track the call depth of the stack at any time. When that call depth reaches a magical, microarchitecture-specific value for the Return Stack Buffer, the code stuffs that RSB and avoids its underflow which could otherwise lead to the Intel variant of Retbleed. This software-only solution brings a lot of the lost performance back, as benchmarks suggest: https://lore.kernel.org/all/20220915111039.092790446@infradead.org/ That page above also contains a lot more detailed explanation of the whole mechanism - Implement a new control flow integrity scheme called FineIBT which is based on the software kCFI implementation and uses hardware IBT support where present to annotate and track indirect branches using a hash to validate them - Other misc fixes and cleanups * tag 'x86_core_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (80 commits) x86/paravirt: Use common macro for creating simple asm paravirt functions x86/paravirt: Remove clobber bitmask from .parainstructions x86/debug: Include percpu.h in debugreg.h to get DECLARE_PER_CPU() et al x86/cpufeatures: Move X86_FEATURE_CALL_DEPTH from bit 18 to bit 19 of word 11, to leave space for WIP X86_FEATURE_SGX_EDECCSSA bit x86/Kconfig: Enable kernel IBT by default x86,pm: Force out-of-line memcpy() objtool: Fix weak hole vs prefix symbol objtool: Optimize elf_dirty_reloc_sym() x86/cfi: Add boot time hash randomization x86/cfi: Boot time selection of CFI scheme x86/ibt: Implement FineIBT objtool: Add --cfi to generate the .cfi_sites section x86: Add prefix symbols for function padding objtool: Add option to generate prefix symbols objtool: Avoid O(bloody terrible) behaviour -- an ode to libelf objtool: Slice up elf_create_section_symbol() kallsyms: Revert "Take callthunks into account" x86: Unconfuse CONFIG_ and X86_FEATURE_ namespaces x86/retpoline: Fix crash printing warning x86/paravirt: Fix a !PARAVIRT build warning ... commit 00dd027f721e0458418f7750d8a5a664ed3e5994 Author: Kees Cook Date: Wed Dec 14 14:35:47 2022 -0800 docs: Fix path paste-o for /sys/kernel/warn_count Running "make htmldocs" shows that "/sys/kernel/oops_count" was duplicated. This should have been "warn_count": Warning: /sys/kernel/oops_count is defined 2 times: ./Documentation/ABI/testing/sysfs-kernel-warn_count:0 ./Documentation/ABI/testing/sysfs-kernel-oops_count:0 Fix the typo. Reported-by: kernel test robot Link: https://lore.kernel.org/linux-doc/202212110529.A3Qav8aR-lkp@intel.com Fixes: 8b05aa263361 ("panic: Expose "warn_count" to sysfs") Cc: linux-hardening@vger.kernel.org Signed-off-by: Kees Cook Documentation/ABI/testing/sysfs-kernel-warn_count | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a17e5b513ceebf21100027745b8731b4728edf7 Author: Kees Cook Date: Fri Dec 9 11:54:57 2022 -0800 LoadPin: Ignore the "contents" argument of the LSM hooks LoadPin only enforces the read-only origin of kernel file reads. Whether or not it was a partial read isn't important. Remove the overly conservative checks so that things like partial firmware reads will succeed (i.e. reading a firmware header). Fixes: 2039bda1fa8d ("LSM: Add "contents" flag to kernel_read_file hook") Cc: Paul Moore Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Serge Hallyn Tested-by: Ping-Ke Shih Link: https://lore.kernel.org/r/20221209195453.never.494-kees@kernel.org security/loadpin/loadpin.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 47722220660cfb935e27e62d385959ecc296cddb Author: Christian König Date: Mon Dec 12 17:31:57 2022 +0100 drm/amdgpu: revert "generally allow over-commit during BO allocation" This reverts commit f9d00a4a8dc8fff951c97b3213f90d6bc7a72175. This causes problem for KFD because when we overcommit we accidentially bind the BO to GTT for moving it into VRAM. We also need to make sure that this is done only as fallback after trying to evict first. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 16 +++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +++++- 2 files changed, 18 insertions(+), 4 deletions(-) commit 3273f11675ef11959d25a56df3279f712bcd41b7 Author: Luben Tuikov Date: Wed Dec 14 03:56:03 2022 -0500 drm/amdgpu: Remove unnecessary domain argument Remove the "domain" argument to amdgpu_bo_create_kernel_at() since this function takes an "offset" argument which is the offset off of VRAM, and as such allocation always takes place in VRAM. Thus, the "domain" argument is unnecessary. Cc: Alex Deucher Cc: Christian König Cc: AMD Graphics Signed-off-by: Luben Tuikov Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ------- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 - 4 files changed, 6 insertions(+), 14 deletions(-) commit 7554886daa31eacc8e7fac9e15bbce67d10b8f1f Author: Luben Tuikov Date: Sat Dec 10 02:51:19 2022 -0500 drm/amdgpu: Fix size validation for non-exclusive domains (v4) Fix amdgpu_bo_validate_size() to check whether the TTM domain manager for the requested memory exists, else we get a kernel oops when dereferencing "man". v2: Make the patch standalone, i.e. not dependent on local patches. v3: Preserve old behaviour and just check that the manager pointer is not NULL. v4: Complain if GTT domain requested and it is uninitialized--most likely a bug. Cc: Alex Deucher Cc: Christian König Cc: AMD Graphics Signed-off-by: Luben Tuikov Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 28afcb0ad54c858d0f426b340e88e0277a375597 Author: Luben Tuikov Date: Mon Dec 12 12:04:42 2022 -0500 drm/amdgpu: Check if fru_addr is not NULL (v2) Always check if fru_addr is not NULL. This commit also fixes a "smatch" warning. v2: Add a Fixes tag. Cc: Alex Deucher Cc: Dan Carpenter Cc: kernel test robot Cc: AMD Graphics Fixes: afbe5d1e4bd7c7 ("drm/amdgpu: Bug-fix: Reading I2C FRU data on newer ASICs") Signed-off-by: Luben Tuikov Reviewed-by: Kent Russell Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 93761c93e9da28d8a020777cee2a84133082b477 Merge: 64e7003c6b85 4295c60bbe9e Author: Linus Torvalds Date: Wed Dec 14 13:42:09 2022 -0800 Merge tag 'apparmor-pr-2022-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor updates from John Johansen: "Features: - switch to zstd compression for profile raw data Cleanups: - simplify obtaining the newest label on a cred - remove useless static inline functions - compute permission conversion on policy unpack - refactor code to share common permissins - refactor unpack to group policy backwards compatiblity code - add __init annotation to aa_{setup/teardown}_dfa_engine() Bug Fixes: - fix a memleak in - multi_transaction_new() - free_ruleset() - unpack_profile() - alloc_ns() - fix lockdep warning when removing a namespace - fix regression in stacking due to label flags - fix loading of child before parent - fix kernel-doc comments that differ from fns - fix spelling errors in comments - store return value of unpack_perms_table() to signed variable" * tag 'apparmor-pr-2022-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: (64 commits) apparmor: Fix uninitialized symbol 'array_size' in policy_unpack_test.c apparmor: Add __init annotation to aa_{setup/teardown}_dfa_engine() apparmor: Fix memleak in alloc_ns() apparmor: Fix memleak issue in unpack_profile() apparmor: fix a memleak in free_ruleset() apparmor: Fix spelling of function name in comment block apparmor: Use pointer to struct aa_label for lbs_cred AppArmor: Fix kernel-doc LSM: Fix kernel-doc AppArmor: Fix kernel-doc apparmor: Fix loading of child before parent apparmor: refactor code that alloc null profiles apparmor: fix obsoleted comments for aa_getprocattr() and audit_resource() apparmor: remove useless static inline functions apparmor: Fix unpack_profile() warn: passing zero to 'ERR_PTR' apparmor: fix uninitialize table variable in error in unpack_trans_table apparmor: store return value of unpack_perms_table() to signed variable apparmor: Fix kunit test for out of bounds array apparmor: Fix decompression of rawdata for read back to userspace apparmor: Fix undefined references to zstd_ symbols ... commit 64e7003c6b85626a533a67c1ba938b75a3db24e6 Merge: 48ea09cddae0 453de3eb08c4 Author: Linus Torvalds Date: Wed Dec 14 12:31:09 2022 -0800 Merge tag 'v6.2-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Optimise away self-test overhead when they are disabled - Support symmetric encryption via keyring keys in af_alg - Flip hwrng default_quality, the default is now maximum entropy Algorithms: - Add library version of aesgcm - CFI fixes for assembly code - Add arm/arm64 accelerated versions of sm3/sm4 Drivers: - Remove assumption on arm64 that kmalloc is DMA-aligned - Fix selftest failures in rockchip - Add support for RK3328/RK3399 in rockchip - Add deflate support in qat - Merge ux500 into stm32 - Add support for TEE for PCI ID 0x14CA in ccp - Add mt7986 support in mtk - Add MaxLinear platform support in inside-secure - Add NPCM8XX support in npcm" * tag 'v6.2-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (184 commits) crypto: ux500/cryp - delete driver crypto: stm32/cryp - enable for use with Ux500 crypto: stm32 - enable drivers to be used on Ux500 dt-bindings: crypto: Let STM32 define Ux500 CRYP hwrng: geode - Fix PCI device refcount leak hwrng: amd - Fix PCI device refcount leak crypto: qce - Set DMA alignment explicitly crypto: octeontx2 - Set DMA alignment explicitly crypto: octeontx - Set DMA alignment explicitly crypto: keembay - Set DMA alignment explicitly crypto: safexcel - Set DMA alignment explicitly crypto: hisilicon/hpre - Set DMA alignment explicitly crypto: chelsio - Set DMA alignment explicitly crypto: ccree - Set DMA alignment explicitly crypto: ccp - Set DMA alignment explicitly crypto: cavium - Set DMA alignment explicitly crypto: img-hash - Fix variable dereferenced before check 'hdev->req' crypto: arm64/ghash-ce - use frame_push/pop macros consistently crypto: arm64/crct10dif - use frame_push/pop macros consistently crypto: arm64/aes-modes - use frame_push/pop macros consistently ... commit 48ea09cddae0b794cde2070f106ef676703dbcd3 Merge: ad76bf1ff18e d272e01fa0a2 Author: Linus Torvalds Date: Wed Dec 14 12:20:00 2022 -0800 Merge tag 'hardening-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull kernel hardening updates from Kees Cook: - Convert flexible array members, fix -Wstringop-overflow warnings, and fix KCFI function type mismatches that went ignored by maintainers (Gustavo A. R. Silva, Nathan Chancellor, Kees Cook) - Remove the remaining side-effect users of ksize() by converting dma-buf, btrfs, and coredump to using kmalloc_size_roundup(), add more __alloc_size attributes, and introduce full testing of all allocator functions. Finally remove the ksize() side-effect so that each allocation-aware checker can finally behave without exceptions - Introduce oops_limit (default 10,000) and warn_limit (default off) to provide greater granularity of control for panic_on_oops and panic_on_warn (Jann Horn, Kees Cook) - Introduce overflows_type() and castable_to_type() helpers for cleaner overflow checking - Improve code generation for strscpy() and update str*() kern-doc - Convert strscpy and sigphash tests to KUnit, and expand memcpy tests - Always use a non-NULL argument for prepare_kernel_cred() - Disable structleak plugin in FORTIFY KUnit test (Anders Roxell) - Adjust orphan linker section checking to respect CONFIG_WERROR (Xin Li) - Make sure siginfo is cleared for forced SIGKILL (haifeng.xu) - Fix um vs FORTIFY warnings for always-NULL arguments * tag 'hardening-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (31 commits) ksmbd: replace one-element arrays with flexible-array members hpet: Replace one-element array with flexible-array member um: virt-pci: Avoid GCC non-NULL warning signal: Initialize the info in ksignal lib: fortify_kunit: build without structleak plugin panic: Expose "warn_count" to sysfs panic: Introduce warn_limit panic: Consolidate open-coded panic_on_warn checks exit: Allow oops_limit to be disabled exit: Expose "oops_count" to sysfs exit: Put an upper limit on how often we can oops panic: Separate sysctl logic from CONFIG_SMP mm/pgtable: Fix multiple -Wstringop-overflow warnings mm: Make ksize() a reporting-only function kunit/fortify: Validate __alloc_size attribute results drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid() drm/fsl-dcu: Fix return type of fsl_dcu_drm_connector_mode_valid() driver core: Add __alloc_size hint to devm allocators overflow: Introduce overflows_type() and castable_to_type() coredump: Proactively round up to kmalloc bucket size ... commit ad76bf1ff18e059d64b70047940d298641d4cc2f Merge: 6f1f5caed5bf 80c2fe022ef5 Author: Linus Torvalds Date: Wed Dec 14 12:17:57 2022 -0800 Merge tag 'memblock-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock updates from Mike Rapoport: "Extend test coverage: - add tests that trigger reallocation of memblock structures from memblock itself via memblock_double_array() - add tests for memblock_alloc_exact_nid_raw() that verify that requested node and memory range constraints are respected" * tag 'memblock-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock tests: remove completed TODO item memblock tests: add generic NUMA tests for memblock_alloc_exact_nid_raw memblock tests: add bottom-up NUMA tests for memblock_alloc_exact_nid_raw memblock tests: add top-down NUMA tests for memblock_alloc_exact_nid_raw memblock tests: introduce range tests for memblock_alloc_exact_nid_raw memblock test: Update TODO list memblock test: Add test to memblock_reserve() 129th region memblock test: Add test to memblock_add() 129th region commit 4121d4481b72501aa4d22680be4ea1096d69d133 Author: Jiri Olsa Date: Wed Dec 14 13:35:42 2022 +0100 bpf: Synchronize dispatcher update with bpf_dispatcher_xdp_func Hao Sun reported crash in dispatcher image [1]. Currently we don't have any sync between bpf_dispatcher_update and bpf_dispatcher_xdp_func, so following race is possible: cpu 0: cpu 1: bpf_prog_run_xdp ... bpf_dispatcher_xdp_func in image at offset 0x0 bpf_dispatcher_update update image at offset 0x800 bpf_dispatcher_update update image at offset 0x0 in image at offset 0x0 -> crash Fixing this by synchronizing dispatcher image update (which is done in bpf_dispatcher_update function) with bpf_dispatcher_xdp_func that reads and execute the dispatcher image. Calling synchronize_rcu after updating and installing new image ensures that readers leave old image before it's changed in the next dispatcher update. The update itself is locked with dispatcher's mutex. The bpf_prog_run_xdp is called under local_bh_disable and synchronize_rcu will wait for it to leave [2]. [1] https://lore.kernel.org/bpf/Y5SFho7ZYXr9ifRn@krava/T/#m00c29ece654bc9f332a17df493bbca33e702896c [2] https://lore.kernel.org/bpf/0B62D35A-E695-4B7A-A0D4-774767544C1A@gmail.com/T/#mff43e2c003ae99f4a38f353c7969be4c7162e877 Reported-by: Hao Sun Signed-off-by: Jiri Olsa Acked-by: Yonghong Song Acked-by: Paul E. McKenney Link: https://lore.kernel.org/r/20221214123542.1389719-1-jolsa@kernel.org Signed-off-by: Martin KaFai Lau kernel/bpf/dispatcher.c | 5 +++++ 1 file changed, 5 insertions(+) commit 813e693023ba10da9e75067780f8378465bf27cc Author: Tejun Heo Date: Sat Dec 10 08:33:10 2022 -1000 blk-iolatency: Fix memory leak on add_disk() failures When a gendisk is successfully initialized but add_disk() fails such as when a loop device has invalid number of minor device numbers specified, blkcg_init_disk() is called during init and then blkcg_exit_disk() during error handling. Unfortunately, iolatency gets initialized in the former but doesn't get cleaned up in the latter. This is because, in non-error cases, the cleanup is performed by del_gendisk() calling rq_qos_exit(), the assumption being that rq_qos policies, iolatency being one of them, can only be activated once the disk is fully registered and visible. That assumption is true for wbt and iocost, but not so for iolatency as it gets initialized before add_disk() is called. It is desirable to lazy-init rq_qos policies because they are optional features and add to hot path overhead once initialized - each IO has to walk all the registered rq_qos policies. So, we want to switch iolatency to lazy init too. However, that's a bigger change. As a fix for the immediate problem, let's just add an extra call to rq_qos_exit() in blkcg_exit_disk(). This is safe because duplicate calls to rq_qos_exit() become noop's. Signed-off-by: Tejun Heo Reported-by: darklight2357@icloud.com Cc: Josef Bacik Cc: Linus Torvalds Fixes: d70675121546 ("block: introduce blk-iolatency io controller") Cc: stable@vger.kernel.org # v4.19+ Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/Y5TQ5gm3O4HXrXR3@slm.duckdns.org Signed-off-by: Jens Axboe block/blk-cgroup.c | 2 ++ 1 file changed, 2 insertions(+) commit 6f1f5caed5bfadd1cc8bdb0563eb8874dc3573ca Merge: cfb3162495fe 31720a2b109b Author: Linus Torvalds Date: Wed Dec 14 11:16:33 2022 -0800 Merge tag 'for-linus-6.2-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: - fix problems with memory leaks on exit in sysfs and debufs (Zhang) - remove an unused variable and an unneeded assignment (Colin) * tag 'for-linus-6.2-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: Fix kmemleak in orangefs_{kernel,client}_debug_init() orangefs: Fix kmemleak in orangefs_sysfs_init() orangefs: Fix kmemleak in orangefs_prepare_debugfs_help_string() orangefs: Fix sysfs not cleanup when dev init failed orangefs: remove redundant assignment to variable buffer_index orangefs: remove variable i commit 3c3bfb8586f848317ceba5d777e11204ba3e5758 Author: Tetsuo Handa Date: Tue Dec 6 07:10:31 2022 +0900 fbdev: fbcon: release buffer when fbcon_do_set_font() failed syzbot is reporting memory leak at fbcon_do_set_font() [1], for commit a5a923038d70 ("fbdev: fbcon: Properly revert changes when vc_resize() failed") missed that the buffer might be newly allocated by fbcon_set_font(). Link: https://syzkaller.appspot.com/bug?extid=25bdb7b1703639abd498 [1] Reported-by: syzbot Signed-off-by: Tetsuo Handa Tested-by: syzbot Fixes: a5a923038d70 ("fbdev: fbcon: Properly revert changes when vc_resize() failed") CC: stable@vger.kernel.org # 5.15+ Signed-off-by: Helge Deller drivers/video/fbdev/core/fbcon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b20a558d377c73ed1eb1247046a5e16fe41da173 Author: ye xingchen Date: Mon Dec 5 16:31:39 2022 +0800 fbdev: sh_mobile_lcdcfb: 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: Helge Deller drivers/video/fbdev/sh_mobile_lcdcfb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 522d5226eed96a7df6662857500777a74d60d341 Author: ye xingchen Date: Mon Dec 5 16:31:39 2022 +0800 fbdev: uvesafb: 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: Helge Deller drivers/video/fbdev/uvesafb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f2ff0c430fed8c6a6d64d11a41f0582bf8bba6f7 Author: Christophe JAILLET Date: Sat Dec 10 12:35:23 2022 +0100 fbdev: uvesafb: Simplify uvesafb_remove() When the remove() function is called, we know that the probe() function has successfully been executed. So 'info' is known to be not NULL. Simplify the code accordingly. Signed-off-by: Christophe JAILLET Signed-off-by: Helge Deller drivers/video/fbdev/uvesafb.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit a94371040712031ba129c7e9d8ff04a06a2f8207 Author: Christophe JAILLET Date: Sat Dec 10 12:35:22 2022 +0100 fbdev: uvesafb: Fixes an error handling path in uvesafb_probe() If an error occurs after a successful uvesafb_init_mtrr() call, it must be undone by a corresponding arch_phys_wc_del() call, as already done in the remove function. This has been added in the remove function in commit 63e28a7a5ffc ("uvesafb: Clean up MTRR code") Fixes: 8bdb3a2d7df4 ("uvesafb: the driver core") Signed-off-by: Christophe JAILLET Signed-off-by: Helge Deller drivers/video/fbdev/uvesafb.c | 1 + 1 file changed, 1 insertion(+) commit 35b4f4d4a725cf8f8c10649163cd12aed509b953 Author: Randy Dunlap Date: Wed Nov 30 13:55:59 2022 -0800 fbdev: uvesafb: don't build on UML The uvesafb fbdev driver uses memory management information that is not available on ARCH=um, so don't allow this driver to be built on UML. Prevents these build errors: ../drivers/video/fbdev/uvesafb.c: In function ‘uvesafb_vbe_init’: ../drivers/video/fbdev/uvesafb.c:807:21: error: ‘__supported_pte_mask’ undeclared (first use in this function) 807 | if (__supported_pte_mask & _PAGE_NX) { ../drivers/video/fbdev/uvesafb.c:807:44: error: ‘_PAGE_NX’ undeclared (first use in this function) 807 | if (__supported_pte_mask & _PAGE_NX) { Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver") Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: Richard Weinberger Cc: linux-um@lists.infradead.org Cc: Daniel Vetter Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: Michal Januszewski Signed-off-by: Helge Deller drivers/video/fbdev/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 71c53e19226b0166ba387d3c590d0509f541a0a1 Author: Randy Dunlap Date: Wed Nov 30 13:55:44 2022 -0800 fbdev: geode: don't build on UML The geode fbdev driver uses struct cpuinfo fields that are not present on ARCH=um, so don't allow this driver to be built on UML. Prevents these build errors: In file included from ../arch/x86/include/asm/olpc.h:7:0, 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:24: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’ return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) && ../arch/x86/include/asm/geode.h:16:39: error: ‘X86_VENDOR_NSC’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’? return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) && ../arch/x86/include/asm/geode.h:17:17: error: ‘struct cpuinfo_um’ has no member named ‘x86’ (boot_cpu_data.x86 == 5) && ../arch/x86/include/asm/geode.h:18:17: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’ (boot_cpu_data.x86_model == 5)); ../arch/x86/include/asm/geode.h: In function ‘is_geode_lx’: ../arch/x86/include/asm/geode.h:23:24: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’ return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && ../arch/x86/include/asm/geode.h:23:39: error: ‘X86_VENDOR_AMD’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’? return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && ../arch/x86/include/asm/geode.h:24:17: error: ‘struct cpuinfo_um’ has no member named ‘x86’ (boot_cpu_data.x86 == 5) && ../arch/x86/include/asm/geode.h:25:17: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’ (boot_cpu_data.x86_model == 10)); Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver") Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: Richard Weinberger Cc: linux-um@lists.infradead.org Cc: Daniel Vetter Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: Andres Salomon Cc: linux-geode@lists.infradead.org Signed-off-by: Helge Deller drivers/video/fbdev/geode/Kconfig | 1 + 1 file changed, 1 insertion(+) commit c84bf485a5aaf9aa0764a58832b7ef4375c29f03 Author: Gaosheng Cui Date: Wed Nov 23 17:29:43 2022 +0800 fbdev: ep93xx-fb: Add missing clk_disable_unprepare in ep93xxfb_probe() The clk_disable_unprepare() should be called in the error handling of register_framebuffer(), fix it. Fixes: 0937a7b3625d ("video: ep93xx: Prepare clock before using it") Signed-off-by: Gaosheng Cui Signed-off-by: Helge Deller drivers/video/fbdev/ep93xx-fb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3074742317e3b95dcd1faf248ad2b5c2d9d7a558 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:28 2022 +0100 fbdev: matroxfb: 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: Helge Deller drivers/video/fbdev/matrox/matroxfb_maven.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cd53860edd5e66f2faaf1bfbaef81d4be9109c82 Author: Dongliang Mu Date: Fri Nov 18 22:14:06 2022 +0800 fbdev: da8xx-fb: add missing regulator_disable() in fb_probe The error handling code in fb_probe misses regulator_disable if regulator_enable is called successfully. The previous commit only adds regulator_disable in the .remove(), forgetting the error handling code in the .probe. Fix this by adding a new error label to call regulator_disable. Fixes: 611097d5daea("fbdev: da8xx: add support for a regulator") Signed-off-by: Dongliang Mu Signed-off-by: Helge Deller drivers/video/fbdev/da8xx-fb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ff61582e0dd7eea57ce4abbe6bdc567ff9282ed6 Author: Yu Zhe Date: Fri Nov 18 17:00:50 2022 +0800 fbdev: controlfb: fix spelling mistake "paramaters"->"parameters" There is a spelling mistake in comment. Fix it. Signed-off-by: Yu Zhe Signed-off-by: Helge Deller drivers/video/fbdev/controlfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 001f2cdb952a9566c77fb4b5470cc361db5601bb Author: Xiongfeng Wang Date: Mon Nov 14 16:56:54 2022 +0800 fbdev: vermilion: decrease reference count in error path pci_get_device() will increase the reference count for the returned pci_dev. For the error path, we need to use pci_dev_put() to decrease the reference count. Fixes: dbe7e429fedb ("vmlfb: framebuffer driver for Intel Vermilion Range") Signed-off-by: Xiongfeng Wang Signed-off-by: Helge Deller drivers/video/fbdev/vermilion/vermilion.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b76449ee75e21acfe9fa4c653d8598f191ed7d68 Author: Dongliang Mu Date: Fri Nov 11 13:49:49 2022 +0800 fbdev: smscufx: fix error handling code in ufx_usb_probe The current error handling code in ufx_usb_probe have many unmatching issues, e.g., missing ufx_free_usb_list, destroy_modedb label should only include framebuffer_release, fb_dealloc_cmap only matches fb_alloc_cmap. My local syzkaller reports a memory leak bug: memory leak in ufx_usb_probe BUG: memory leak unreferenced object 0xffff88802f879580 (size 128): comm "kworker/0:7", pid 17416, jiffies 4295067474 (age 46.710s) hex dump (first 32 bytes): 80 21 7c 2e 80 88 ff ff 18 d0 d0 0c 80 88 ff ff .!|............. 00 d0 d0 0c 80 88 ff ff e0 ff ff ff 0f 00 00 00 ................ backtrace: [] kmalloc_trace+0x20/0x90 mm/slab_common.c:1045 [] kmalloc include/linux/slab.h:553 [inline] [] kzalloc include/linux/slab.h:689 [inline] [] ufx_alloc_urb_list drivers/video/fbdev/smscufx.c:1873 [inline] [] ufx_usb_probe+0x11c/0x15a0 drivers/video/fbdev/smscufx.c:1655 [] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396 [] call_driver_probe drivers/base/dd.c:560 [inline] [] really_probe+0x12d/0x390 drivers/base/dd.c:639 [] __driver_probe_device+0xbf/0x140 drivers/base/dd.c:778 [] driver_probe_device+0x2a/0x120 drivers/base/dd.c:808 [] __device_attach_driver+0xf7/0x150 drivers/base/dd.c:936 [] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:427 [] __device_attach+0x105/0x2d0 drivers/base/dd.c:1008 [] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:487 [] device_add+0x642/0xdc0 drivers/base/core.c:3517 [] usb_set_configuration+0x8ef/0xb80 drivers/usb/core/message.c:2170 [] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238 [] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293 [] call_driver_probe drivers/base/dd.c:560 [inline] [] really_probe+0x12d/0x390 drivers/base/dd.c:639 [] __driver_probe_device+0xbf/0x140 drivers/base/dd.c:778 Fix this bug by rewriting the error handling code in ufx_usb_probe. Reported-by: syzkaller Tested-by: Dongliang Mu Signed-off-by: Dongliang Mu Signed-off-by: Helge Deller drivers/video/fbdev/smscufx.c | 46 +++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 15 deletions(-) commit 5886b130de953cfb8826f7771ec8640a79934a7f Author: Shang XiaoJing Date: Mon Nov 14 09:08:52 2022 +0800 fbdev: via: Fix error in via_core_init() via_core_init() won't exit the driver when pci_register_driver() failed. Exit the viafb-i2c and the viafb-gpio in failed path to prevent error. VIA Graphics Integration Chipset framebuffer 2.4 initializing Error: Driver 'viafb-i2c' is already registered, aborting... Error: Driver 'viafb-gpio' is already registered, aborting... Fixes: 7582eb9be85f ("viafb: Turn GPIO and i2c into proper platform devices") Signed-off-by: Shang XiaoJing Signed-off-by: Helge Deller drivers/video/fbdev/via/via-core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ed359a464846b48f76ea6cc5cd8257e545ac97f4 Author: Yang Yingliang Date: Sat Nov 12 17:55:10 2022 +0800 fbdev: pm2fb: fix missing pci_disable_device() Add missing pci_disable_device() in error path of probe() and remove() path. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Signed-off-by: Helge Deller drivers/video/fbdev/pm2fb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit eceadc9219884fa4b05bf56cace688b77a2563e0 Author: wangkailong@jari.cn Date: Sun Nov 6 22:16:08 2022 +0800 fbdev: pxafb: Remove unnecessary print function dev_err() Eliminate the follow coccicheck warning: ./drivers/video/fbdev/pxafb.c:2330:2-9: line 2330 is redundant because platform_get_irq() already prints an error Signed-off-by: KaiLong Wang Signed-off-by: Helge Deller drivers/video/fbdev/pxafb.c | 1 - 1 file changed, 1 deletion(-) commit 23910a20f3fe7bdddd4c834a2c7b4547a554e86f Author: Dmitry Torokhov Date: Thu Nov 3 20:16:42 2022 -0700 fbdev: omapfb: panel-sharp-ls037v7dw01: fix included headers The driver is using gpiod API so it should include gpio/consumer.h and not gpio.gh or of_gpio.h. Signed-off-by: Dmitry Torokhov Signed-off-by: Helge Deller drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 275a855829ac19d06edf3f91d39c6014032667eb Author: Dmitry Torokhov Date: Thu Nov 3 20:16:41 2022 -0700 fbdev: omapfb: panel-tpo-td028ttec1: stop including gpio.h The driver does not use gpios, so there is no need to include gpio.h. Signed-off-by: Dmitry Torokhov Signed-off-by: Helge Deller drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c | 1 - 1 file changed, 1 deletion(-) commit a6828b1eb72621ac577079efd3b54b93c885261e Author: Dmitry Torokhov Date: Thu Nov 3 20:16:40 2022 -0700 fbdev: omapfb: panel-lgphilips-lb035q02: remove backlight GPIO handling With f048e8c1d169 ("omapfb: panel-lgphilips-lb035q02: Remove legacy boot support") it is no longer possible to specify GPIO to control the backlight. Remove code trying to request and toggle it. Signed-off-by: Dmitry Torokhov Signed-off-by: Helge Deller .../omapfb/displays/panel-lgphilips-lb035q02.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit 891bbadf1cf178eba8f2e3e175eabeee37a61ce8 Author: Dmitry Torokhov Date: Thu Nov 3 20:16:39 2022 -0700 fbdev: omapfb: encoder-opa362: fix included headers The driver has been switched to gpiod API, so it should include gpio/consumer.h instead of gpio.h and of_gpio.h. With of_gpio.h no longer included we need mod_devicetable.h for of_device_id definition. Signed-off-by: Dmitry Torokhov Signed-off-by: Helge Deller drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90a687d61b4812d8fc035a59659dc36359783f60 Author: Dmitry Torokhov Date: Thu Nov 3 20:16:38 2022 -0700 fbdev: omapfb: connector-analog-tv: remove support for platform data There are no users of connector_atv_platform_data in the mainline kernel so support for it can be removed from the panel driver. Signed-off-by: Dmitry Torokhov Signed-off-by: Helge Deller .../omap2/omapfb/displays/connector-analog-tv.c | 60 +++------------------- include/video/omap-panel-data.h | 34 ------------ 2 files changed, 8 insertions(+), 86 deletions(-) commit b7ec002c05d8e01b961bf5d915cf2e42a4cff4dd Author: Dmitry Torokhov Date: Thu Nov 3 20:16:37 2022 -0700 fbdev: omapfb: panel-dpi: remove support for platform data There are no users of panel_dpi_platform_data in the mainline kernel so support for it can be removed from the panel driver. Signed-off-by: Dmitry Torokhov Signed-off-by: Helge Deller .../video/fbdev/omap2/omapfb/displays/panel-dpi.c | 83 ++-------------------- include/video/omap-panel-data.h | 21 ------ 2 files changed, 7 insertions(+), 97 deletions(-) commit 39630e0f138a4821cd219a83fd727cf39d304201 Author: Dmitry Torokhov Date: Thu Nov 3 20:16:36 2022 -0700 fbdev: omapfb: panel-nec-nl8048hl11: 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. Note that because existing DTSes specify incorrect polarity of reset lines (active high) and GPU drivers have adopted to this, we follow the suit and use inverted values when controlling reset lines. Signed-off-by: Dmitry Torokhov Signed-off-by: Helge Deller .../omap2/omapfb/displays/panel-nec-nl8048hl11.c | 72 ++++++---------------- 1 file changed, 20 insertions(+), 52 deletions(-) commit 836bfb5688e3ea87574760af82c82fa752b2540f Author: Dmitry Torokhov Date: Thu Nov 3 20:16:35 2022 -0700 fbdev: omapfb: panel-tpo-td043mtea1: 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 Signed-off-by: Helge Deller .../omap2/omapfb/displays/panel-tpo-td043mtea1.c | 59 ++++++---------------- 1 file changed, 16 insertions(+), 43 deletions(-) commit 67c366de0593d00222e2e675e73a59dcf33f2f3a Author: Dmitry Torokhov Date: Thu Nov 3 20:16:34 2022 -0700 fbdev: omapfb: panel-dsi-cm: 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. Note that because existing DTSes specify incorrect polarity of reset lines (active high) and GPU drivers have adopted to this, we follow the suit and use inverted values when controlling reset lines. Signed-off-by: Dmitry Torokhov Signed-off-by: Helge Deller .../fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 116 ++++++++------------- 1 file changed, 45 insertions(+), 71 deletions(-) commit 6378085bc373f71b21fb074d62e321088b9a181a Author: Dmitry Torokhov Date: Thu Nov 3 20:16:33 2022 -0700 fbdev: omapfb: encoder-tfp410: 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 Signed-off-by: Helge Deller .../fbdev/omap2/omapfb/displays/encoder-tfp410.c | 67 +++++++--------------- 1 file changed, 22 insertions(+), 45 deletions(-) commit 844c245fc49d21639ed9e00c4b3ac0f219b7c6ce Author: Dmitry Torokhov Date: Thu Nov 3 20:16:32 2022 -0700 fbdev: omapfb: panel-sony-acx565akm: 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. Note that because existing DTSes specify incorrect polarity of reset lines (active high) and GPU drivers have adopted to this, we follow the suit and use inverted values when controlling reset lines. Signed-off-by: Dmitry Torokhov Signed-off-by: Helge Deller .../omap2/omapfb/displays/panel-sony-acx565akm.c | 66 ++++++++++------------ 1 file changed, 31 insertions(+), 35 deletions(-) commit 5845b32edc1ee1039d040716cf9d78bbd52e13c3 Author: Dmitry Torokhov Date: Thu Nov 3 20:16:31 2022 -0700 fbdev: omapfb: panel-sony-acx565akm: remove support for platform data There are no users of panel_acx565akm_platform_data in the mainline kernel so support for it can be removed from the panel driver. Signed-off-by: Dmitry Torokhov Signed-off-by: Helge Deller .../omap2/omapfb/displays/panel-sony-acx565akm.c | 45 +++------------------- include/video/omap-panel-data.h | 16 -------- 2 files changed, 6 insertions(+), 55 deletions(-) commit 257030d4ee7c76892e9a4e5bf94f8c0fc41c6e46 Author: Dmitry Torokhov Date: Thu Nov 3 20:16:30 2022 -0700 fbdev: omapfb: connector-hdmi: 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 Signed-off-by: Helge Deller .../fbdev/omap2/omapfb/displays/connector-hdmi.c | 49 +++++++--------------- 1 file changed, 14 insertions(+), 35 deletions(-) commit 28f24e90ffc4bf2199c91783b98dfc71de1e3a2f Author: Colin Ian King Date: Tue Nov 1 10:29:47 2022 +0000 fbdev: omapfb: remove redundant variable checksum Variable checksum is being used to accumulate values however it is never read or used afterwards. It is redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Helge Deller drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c | 2 -- 1 file changed, 2 deletions(-) commit 6273c43769cbd4451b03d239dc16d5c54bb7279a Author: Andy Shevchenko Date: Tue Nov 1 17:09:47 2022 +0200 fbdev: ssd1307fb: Drop duplicate NULL checks for PWM APIs pwm_disable() and pwm_put() are NULL-aware, no need to duplicate the check in the caller. Signed-off-by: Andy Shevchenko Signed-off-by: Helge Deller drivers/video/fbdev/ssd1307fb.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 025e3b507a3a8e1ee96a3112bb67495c77d6cdb6 Author: Andy Shevchenko Date: Tue Nov 1 17:09:46 2022 +0200 fbdev: ssd1307fb: Drop optional dependency Only a single out of three devices need a PWM, so from driver it's optional. Moreover it's a single driver in the entire kernel that currently selects PWM. Unfortunately this selection is a root cause of the circular dependencies when we want to enable optional PWM for some other drivers that select GPIOLIB. Fixes: a2ed00da5047 ("drivers/video: add support for the Solomon SSD1307 OLED Controller") Signed-off-by: Andy Shevchenko Signed-off-by: Helge Deller drivers/video/fbdev/Kconfig | 1 - 1 file changed, 1 deletion(-) commit ff5870a76c2abda389650d3711cdddc031d12665 Author: Moises Cardona Date: Wed Dec 14 07:08:30 2022 -0500 ASoC: Intel: Add HP Stream 8 to bytcr_rt5640.c The bytcr_rt5640.c file already supports the HP Stream 7. The HP Stream 8 is almost identical in terms of the hardware with the exception of it having stereo speakers, a SIM card slot and the obvious size difference. Signed-off-by: Moises Cardona Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221214120830.1572474-1-moisesmcardona@gmail.com Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit cfb3162495fe5b8702cf3854995508ef78a3f962 Merge: 87be949912ee 68c62bee9d08 Author: Linus Torvalds Date: Wed Dec 14 10:35:47 2022 -0800 Merge tag 'ceph-for-6.2-rc1' of https://github.com/ceph/ceph-client Pull cph update from Ilya Dryomov: "A fix to facilitate prompt cap releases on async creates from Xiubo. This should address sporadic "client isn't responding to mclientcaps (revoke) ..." warnings and potential associated MDS hangs" * tag 'ceph-for-6.2-rc1' of https://github.com/ceph/ceph-client: ceph: try to check caps immediately after async creating finishes ceph: remove useless session parameter for check_caps() commit 549a715b98a13c6d05452be3ad37e980087bb081 Author: Sean Christopherson Date: Wed Dec 7 00:09:59 2022 +0000 KVM: x86: Add proper ReST tables for userspace MSR exits/flags Add ReST formatting to the set of userspace MSR exits/flags so that the resulting HTML docs generate a table instead of malformed gunk. This also fixes a warning that was introduced by a recent cleanup of the relevant documentation (yay copy+paste). >> Documentation/virt/kvm/api.rst:7287: WARNING: Block quote ends without a blank line; unexpected unindent. Fixes: 1ae099540e8c ("KVM: x86: Allow deflecting unknown MSR accesses to user space") Fixes: 1f158147181b ("KVM: x86: Clean up KVM_CAP_X86_USER_SPACE_MSR documentation") Reported-by: kernel test robot Signed-off-by: Sean Christopherson Message-Id: <20221207000959.2035098-1-seanjc@google.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 818448e9cf92e5c6b3c10320372eefcbe4174e4f Author: Tiezhu Yang Date: Fri Nov 18 17:16:39 2022 +0800 perf tools: Use "grep -E" instead of "egrep" The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl tools/perf` 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 Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1668762999-9297-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile | 2 +- tools/perf/builtin-trace.c | 2 +- tools/perf/tests/make | 2 +- tools/perf/tests/shell/lib/probe_vfs_getname.sh | 4 ++-- .../tests/shell/record+probe_libc_inet_pton.sh | 2 +- .../tests/shell/record+script_probe_vfs_getname.sh | 2 +- tools/perf/tests/shell/record_offcpu.sh | 2 +- tools/perf/tests/shell/stat.sh | 10 +++++----- tools/perf/tests/shell/test_arm_coresight.sh | 8 ++++---- tools/perf/tests/shell/test_arm_spe.sh | 6 +++--- tools/perf/tests/shell/test_arm_spe_fork.sh | 2 +- tools/perf/tests/shell/test_brstack.sh | 18 +++++++++--------- tools/perf/tests/shell/test_data_symbol.sh | 4 ++-- tools/perf/tests/shell/test_java_symbol.sh | 2 +- tools/perf/tests/shell/trace+probe_vfs_getname.sh | 4 ++-- tools/perf/trace/beauty/fadvise.sh | 2 +- tools/perf/trace/beauty/fsmount.sh | 2 +- tools/perf/trace/beauty/fspick.sh | 2 +- tools/perf/trace/beauty/kcmp_type.sh | 2 +- tools/perf/trace/beauty/kvm_ioctl.sh | 4 ++-- tools/perf/trace/beauty/madvise_behavior.sh | 2 +- tools/perf/trace/beauty/mmap_flags.sh | 22 +++++++++++----------- tools/perf/trace/beauty/mmap_prot.sh | 12 ++++++------ tools/perf/trace/beauty/mount_flags.sh | 4 ++-- tools/perf/trace/beauty/move_mount_flags.sh | 2 +- tools/perf/trace/beauty/mremap_flags.sh | 4 ++-- tools/perf/trace/beauty/perf_ioctl.sh | 2 +- .../perf/trace/beauty/pkey_alloc_access_rights.sh | 2 +- tools/perf/trace/beauty/prctl_option.sh | 4 ++-- tools/perf/trace/beauty/rename_flags.sh | 4 ++-- tools/perf/trace/beauty/sockaddr.sh | 4 ++-- tools/perf/trace/beauty/socket.sh | 4 ++-- tools/perf/trace/beauty/sync_file_range.sh | 2 +- .../trace/beauty/tracepoints/x86_irq_vectors.sh | 4 ++-- tools/perf/trace/beauty/tracepoints/x86_msr.sh | 12 ++++++------ tools/perf/trace/beauty/usbdevfs_ioctl.sh | 4 ++-- tools/perf/trace/beauty/vhost_virtio_ioctl.sh | 4 ++-- tools/perf/trace/beauty/x86_arch_prctl.sh | 4 ++-- 38 files changed, 89 insertions(+), 89 deletions(-) commit c587e77e100fa40eb6af10e00497c67acf493f33 Author: Namhyung Kim Date: Mon Dec 12 15:08:20 2022 -0800 perf stat: Do not delay the workload with --delay The -D/--delay option is to delay the measure after the program starts. But the current code goes to sleep before starting the program so the program is delayed too. This is not the intention, let's fix it. Before: $ time sudo ./perf stat -a -e cycles -D 3000 sleep 4 Events disabled Events enabled Performance counter stats for 'system wide': 4,326,949,337 cycles 4.007494118 seconds time elapsed real 0m7.474s user 0m0.356s sys 0m0.120s It ran the workload for 4 seconds and gave the 3 second delay. So it should skip the first 3 second and measure the last 1 second only. But as you can see, it delays 3 seconds and ran the workload after that for 4 seconds. So the total time (real) was 7 seconds. After: $ time sudo ./perf stat -a -e cycles -D 3000 sleep 4 Events disabled Events enabled Performance counter stats for 'system wide': 1,063,551,013 cycles 1.002769510 seconds time elapsed real 0m4.484s user 0m0.385s sys 0m0.086s The bug was introduced when it changed enablement of system-wide events with a command line workload. But it should've considered the initial delay case. The code was reworked since then (in bb8bc52e7578) so I'm afraid it won't be applied cleanly. Fixes: d0a0a511493d2695 ("perf stat: Fix forked applications enablement of counters") Reported-by: Kevin Nomura Signed-off-by: Namhyung Kim Tested-by: Thomas Richter Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Sumanth Korikkar Link: https://lore.kernel.org/r/20221212230820.901382-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 5f8f95673f68914419e8657b3263736264b40e16 Author: Ian Rogers Date: Tue Dec 13 15:26:51 2022 -0800 perf evlist: Remove group option. The group option predates grouping events using curly braces added in commit 89efb029502d7f2d ("perf tools: Add support to parse event group syntax"). The --group option was retained for legacy support (in August 2012) but keeping it adds complexity. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Anshuman Khandual Cc: Athira Jajeev Cc: Eelco Chaudron Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Sandipan Das Cc: Sean Christopherson Cc: Shaomin Deng Cc: Stephane Eranian Cc: Timothy Hayes Cc: Xing Zhengjun Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221213232651.1269909-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 4 ---- tools/perf/Documentation/perf-top.txt | 7 ++----- tools/perf/builtin-record.c | 2 -- tools/perf/builtin-stat.c | 6 ------ tools/perf/builtin-top.c | 2 -- tools/perf/tests/attr/README | 2 -- tools/perf/tests/attr/test-record-group | 22 ---------------------- tools/perf/tests/attr/test-stat-group | 17 ----------------- tools/perf/util/evlist.c | 2 +- tools/perf/util/evlist.h | 2 -- tools/perf/util/python.c | 8 -------- tools/perf/util/record.c | 7 ------- tools/perf/util/record.h | 1 - 13 files changed, 3 insertions(+), 79 deletions(-) commit 542d3c03fd895eb8370992293498332ea383a3b9 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 drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c | 2 ++ 1 file changed, 2 insertions(+) commit 94c34359c88737d903c44d1c1a265cfdc58acd0e 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 drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7266eb7c5a52efe8dc19a34c45c0fc8e3c0e4137 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 drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 44723b8c4692566237321d658b482025bb0235f8 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 drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f72af770947825cd9947ce8b979bf9d6fe699c73 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 drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 504307f2b3ae2625ed591efe073c2d14d568dfc8 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 drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 761ebebabd0953fde1e6b77d6ff54356dc1639c4 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 .../media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 52109d91d2f91e9cc7a14ee46443e374a21573cf 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 drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f2c174e5018ed3360fdfeb6f9cd5c05e6086d134 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 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fabed7ae6185ef7f5967f3a2271c906ec6b7b7d 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 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87be949912eedb73690d8eaeb086f24bfe17438d Merge: c7020e1b346d 52f31ed22821 Author: Linus Torvalds Date: Wed Dec 14 10:11:51 2022 -0800 Merge tag 'xfs-6.2-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull XFS updates from Darrick Wong: "The highlight of this is a batch of fixes for the online metadata checking code as we start the loooong march towards merging online repair. I aim to merge that in time for the 2023 LTS. There are also a large number of data corruption and race condition fixes in this patchset. Most notably fixed are write() calls to unwritten extents racing with writeback, which required some late(r than I prefer) code changes to iomap to support the necessary revalidations. I don't really like iomap changes going in past -rc4, but Dave and I have been working on it long enough that I chose to push it for 6.2 anyway. There are also a number of other subtle problems fixed, including the log racing with inode writeback to write inodes with incorrect link count to disk; file data mapping corruptions as a result of incorrect lock cycling when attaching dquots; refcount metadata corruption if one actually manages to share a block 2^32 times; and the log clobbering cow staging extents if they were formerly metadata blocks. Summary: - Fix a race condition w.r.t. percpu inode free counters - Fix a broken error return in xfs_remove - Print FS UUID at mount/unmount time - Numerous fixes to the online fsck code - Fix inode locking inconsistency problems when dealing with realtime metadata files - Actually merge pull requests so that we capture the cover letter contents - Fix a race between rebuilding VFS inode state and the AIL flushing inodes that could cause corrupt inodes to be written to the filesystem - Fix a data corruption problem resulting from a write() to an unwritten extent racing with writeback started on behalf of memory reclaim changing the extent state - Add debugging knobs so that we can test iomap invalidation - Fix the blockdev pagecache contents being stale after unmounting the filesystem, leading to spurious xfs_db errors and corrupt metadumps - Fix a file mapping corruption bug due to ilock cycling when attaching dquots to a file during delalloc reservation - Fix a refcount btree corruption problem due to the refcount adjustment code not handling MAXREFCOUNT correctly, resulting in unnecessary record splits - Fix COW staging extent alloctions not being classified as USERDATA, which results in filestreams being ignored and possible data corruption if the allocation was filled from the AGFL and the block buffer is still being tracked in the AIL - Fix new duplicated includes - Fix a race between the dquot shrinker and dquot freeing that could cause a UAF" * tag 'xfs-6.2-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (50 commits) xfs: dquot shrinker doesn't check for XFS_DQFLAG_FREEING xfs: Remove duplicated include in xfs_iomap.c xfs: invalidate xfs_bufs when allocating cow extents xfs: get rid of assert from xfs_btree_islastblock xfs: estimate post-merge refcounts correctly xfs: hoist refcount record merge predicates xfs: fix super block buf log item UAF during force shutdown xfs: wait iclog complete before tearing down AIL xfs: attach dquots to inode before reading data/cow fork mappings xfs: shut up -Wuninitialized in xfsaild_push xfs: use memcpy, not strncpy, to format the attr prefix during listxattr xfs: invalidate block device page cache during unmount xfs: add debug knob to slow down write for fun xfs: add debug knob to slow down writeback for fun xfs: drop write error injection is unfixable, remove it xfs: use iomap_valid method to detect stale cached iomaps iomap: write iomap validity checks xfs: xfs_bmap_punch_delalloc_range() should take a byte range iomap: buffered write failure should not truncate the page cache xfs,iomap: move delalloc punching to iomap ... commit 73278d483378cf850ade923a1107a70297b2602a Author: Hans Verkuil Date: Mon Dec 12 08:32:20 2022 +0000 media: v4l2-ctrls-api.c: add back dropped ctrl->is_new = 1 The patch adding support for dynamically allocated arrays accidentally dropped the line setting ctrl->is_new to 1, thus new string values were always ignored. Fixes: fb582cba4492 ("media: v4l2-ctrls: add support for dynamically allocated arrays.") Reported-by: Alice Yuan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls-api.c | 1 + 1 file changed, 1 insertion(+) commit ad0fca2dceeab8fdd8e1135f4b4ef2dc46c2ead9 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 (cherry picked from commit 95df9cc24bee8a09d39c62bcef4319b984814e18) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_object.c | 3 +++ drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 10 ++++++---- drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c | 18 +++++++++++++++++- 3 files changed, 26 insertions(+), 5 deletions(-) commit 952d19190c6d482ec725f22e8bc8646bc0189d41 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 (cherry picked from commit b29d26fbcb862526d5047caec82878be2eb75c0f) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_migrate.c | 37 ++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 8 deletions(-) commit 85c50197716c60fe57f411339c579462e563ac57 Author: Isaac J. Manjarres Date: Thu Dec 8 13:29:01 2022 -0800 loop: Fix the max_loop commandline argument treatment when it is set to 0 Currently, the max_loop commandline argument can be used to specify how many loop block devices are created at init time. If it is not specified on the commandline, CONFIG_BLK_DEV_LOOP_MIN_COUNT loop block devices will be created. The max_loop commandline argument can be used to override the value of CONFIG_BLK_DEV_LOOP_MIN_COUNT. However, when max_loop is set to 0 through the commandline, the current logic treats it as if it had not been set, and creates CONFIG_BLK_DEV_LOOP_MIN_COUNT devices anyway. Fix this by starting max_loop off as set to CONFIG_BLK_DEV_LOOP_MIN_COUNT. This preserves the intended behavior of creating CONFIG_BLK_DEV_LOOP_MIN_COUNT loop block devices if the max_loop commandline parameter is not specified, and allowing max_loop to be respected for all values, including 0. This allows environments that can create all of their required loop block devices on demand to not have to unnecessarily preallocate loop block devices. Fixes: 732850827450 ("remove artificial software max_loop limit") Cc: stable@vger.kernel.org Cc: Ken Chen Signed-off-by: Isaac J. Manjarres Link: https://lore.kernel.org/r/20221208212902.765781-1-isaacmanjarres@google.com Signed-off-by: Jens Axboe drivers/block/loop.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit c7020e1b346d5840e93b58cc4f2c67fc645d8df9 Merge: a0a6c76cf2a5 f826afe5eae8 Author: Linus Torvalds Date: Wed Dec 14 09:54:10 2022 -0800 Merge tag 'pci-v6.2-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "Enumeration: - Squash portdrv_{core,pci}.c into portdrv.c to ease maintenance and make more things static. - Make portdrv bind to Switch Ports that have AER. Previously, if these Ports lacked MSI/MSI-X, portdrv failed to bind, which meant the Ports couldn't be suspended to low-power states. AER on these Ports doesn't use interrupts, and the AER driver doesn't need to claim them. - Assign PCI domain IDs using ida_alloc(), which makes host bridge add/remove work better. Resource management: - To work better with recent BIOSes that use EfiMemoryMappedIO for PCI host bridge apertures, remove those regions from the E820 map (E820 entries normally prevent us from allocating BARs). In v5.19, we added some quirks to disable E820 checking, but that's not very maintainable. EfiMemoryMappedIO means the OS needs to map the region for use by EFI runtime services; it shouldn't prevent OS from using it. PCIe native device hotplug: - Build pciehp by default if USB4 is enabled, since Thunderbolt/USB4 PCIe tunneling depends on native PCIe hotplug. - Enable Command Completed Interrupt only if supported to avoid user confusion from lspci output that says this is enabled but not supported. - Prevent pciehp from binding to Switch Upstream Ports; this happened because of interaction with acpiphp and caused devices below the Upstream Port to disappear. Power management: - Convert AGP drivers to generic power management. We hope to remove legacy power management from the PCI core eventually. Virtualization: - Fix pci_device_is_present(), which previously always returned "false" for VFs, causing virtio hangs when unbinding the driver. Miscellaneous: - Convert drivers to gpiod API to prepare for dropping some legacy code. - Fix DOE fencepost error for the maximum data object length. Baikal-T1 PCIe controller driver: - Add driver and DT bindings. Broadcom STB PCIe controller driver: - Enable Multi-MSI. - Delay 100ms after PERST# deassert to allow power and clocks to stabilize. - Configure Read Completion Boundary to 64 bytes. Freescale i.MX6 PCIe controller driver: - Initialize PHY before deasserting core reset to fix a regression in v6.0 on boards where the PHY provides the reference. - Fix imx6sx and imx8mq clock names in DT schema. Intel VMD host bridge driver: - Fix Secondary Bus Reset on VMD bridges, which allows reset of NVMe SSDs in VT-d pass-through scenarios. - Disable MSI remapping, which gets re-enabled by firmware during suspend/resume. MediaTek PCIe Gen3 controller driver: - Add MT7986 and MT8195 support. Qualcomm PCIe controller driver: - Add SC8280XP/SA8540P basic interconnect support. Rockchip DesignWare PCIe controller driver: - Base DT schema on common Synopsys schema. Synopsys DesignWare PCIe core: - Collect DT items shared between Root Port and Endpoint (PERST GPIO, PHY info, clocks, resets, link speed, number of lanes, number of iATU windows, interrupt info, etc) to snps,dw-pcie-common.yaml. - Add dma-ranges support for Root Ports and Endpoints. - Consolidate DT resource retrieval for "dbi", "dbi2", "atu", etc. to reduce code duplication. - Add generic names for clocks and resets to encourage more consistent naming across drivers using DesignWare IP. - Stop advertising PTM Responder role for Endpoints, which aren't allowed to be responders. TI J721E PCIe driver: - Add j721s2 host mode ID to DT schema. - Add interrupt properties to DT schema. Toshiba Visconti PCIe controller driver: - Fix interrupts array max constraints in DT schema" * tag 'pci-v6.2-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (95 commits) x86/PCI: Use pr_info() when possible x86/PCI: Fix log message typo x86/PCI: Tidy E820 removal messages PCI: Skip allocate_resource() if too little space available efi/x86: Remove EfiMemoryMappedIO from E820 map PCI/portdrv: Allow AER service only for Root Ports & RCECs PCI: xilinx-nwl: Fix coding style violations PCI: mvebu: Switch to using gpiod API PCI: pciehp: Enable Command Completed Interrupt only if supported PCI: aardvark: Switch to using devm_gpiod_get_optional() dt-bindings: PCI: mediatek-gen3: add support for mt7986 dt-bindings: PCI: mediatek-gen3: add SoC based clock config dt-bindings: PCI: qcom: Allow 'dma-coherent' property PCI: mt7621: Add sentinel to quirks table PCI: vmd: Fix secondary bus reset for Intel bridges PCI: endpoint: pci-epf-vntb: Fix sparse ntb->reg build warning PCI: endpoint: pci-epf-vntb: Fix sparse build warning for epf_db PCI: endpoint: pci-epf-vntb: Replace hardcoded 4 with sizeof(u32) PCI: endpoint: pci-epf-vntb: Remove unused epf_db_phy struct member PCI: endpoint: pci-epf-vntb: Fix call pci_epc_mem_free_addr() in error path ... commit e89f3edffb860a0f54a9ed16deadb7a4a1fa3862 Author: Milan Landaverde Date: Tue Dec 13 12:57:14 2022 -0500 bpf: prevent leak of lsm program after failed attach In [0], we added the ability to bpf_prog_attach LSM programs to cgroups, but in our validation to make sure the prog is meant to be attached to BPF_LSM_CGROUP, we return too early if the check fails. This results in lack of decrementing prog's refcnt (through bpf_prog_put) leaving the LSM program alive past the point of the expected lifecycle. This fix allows for the decrement to take place. [0] https://lore.kernel.org/all/20220628174314.1216643-4-sdf@google.com/ Fixes: 69fd337a975c ("bpf: per-cgroup lsm flavor") Signed-off-by: Milan Landaverde Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Reviewed-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20221213175714.31963-1-milan@mdaverde.com kernel/bpf/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a8dfde09c90109e3a98af54847e91bde7dc2d5c2 Author: Song Liu Date: Tue Dec 13 14:05:00 2022 -0800 selftests/bpf: Select CONFIG_FUNCTION_ERROR_INJECTION BPF selftests require CONFIG_FUNCTION_ERROR_INJECTION to work. However, CONFIG_FUNCTION_ERROR_INJECTION is no longer 'y' by default after recent changes. As a result, we are seeing errors like the following from BPF CI: bpf_testmod_test_read() is not modifiable __x64_sys_setdomainname is not sleepable __x64_sys_getpgid is not sleepable Fix this by explicitly selecting CONFIG_FUNCTION_ERROR_INJECTION in the selftest config. Fixes: a4412fdd49dc ("error-injection: Add prompt for function error injection") Reported-by: Daniel Müller Signed-off-by: Song Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Daniel Müller Link: https://lore.kernel.org/bpf/20221213220500.3427947-1-song@kernel.org tools/testing/selftests/bpf/config | 1 + 1 file changed, 1 insertion(+) commit ec9230b18b45853287298d70be23f8ec6bd44ff0 Author: Yonghong Song Date: Mon Dec 12 17:22:24 2022 -0800 selftests/bpf: Fix a selftest compilation error with CONFIG_SMP=n Kernel test robot reported bpf selftest build failure when CONFIG_SMP is not set. The error message looks below: >> progs/rcu_read_lock.c:256:34: error: no member named 'last_wakee' in 'struct task_struct' last_wakee = task->real_parent->last_wakee; ~~~~~~~~~~~~~~~~~ ^ 1 error generated. When CONFIG_SMP is not set, the field 'last_wakee' is not available in struct 'task_struct'. Hence the above compilation failure. To fix the issue, let us choose another field 'group_leader' which is available regardless of CONFIG_SMP set or not. Fixes: fe147956fca4 ("bpf/selftests: Add selftests for new task kfuncs") Fixes: 48671232fcb8 ("selftests/bpf: Add tests for bpf_rcu_read_lock()") Reported-by: kernel test robot Signed-off-by: David Vernet Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20221213012224.379581-1-yhs@fb.com tools/testing/selftests/bpf/progs/rcu_read_lock.c | 8 ++++---- tools/testing/selftests/bpf/progs/task_kfunc_failure.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit d2b497a973fcb76a6b7a552f081b83a1edd91c86 Author: Donald Hunter Date: Mon Dec 12 10:16:00 2022 +0000 docs/bpf: Reword docs for BPF_MAP_TYPE_SK_STORAGE Improve the grammar of the function descriptions and highlight that the key is a socket fd. Fixes: f3212ad5b7e9 ("docs/bpf: Add documentation for BPF_MAP_TYPE_SK_STORAGE") Reported-by: Martin KaFai Lau Signed-off-by: Donald Hunter Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/r/20221212101600.56026-1-donald.hunter@gmail.com Documentation/bpf/map_sk_storage.rst | 56 +++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 26 deletions(-) commit a0a6c76cf2a506c061072db6c187f8a641dc85de Merge: ab425febda94 08dcf0732cb4 Author: Linus Torvalds Date: Wed Dec 14 09:34:26 2022 -0800 Merge tag 'i3c/for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Alexandre Belloni: "A non-urgent fix and SETDASA is now exported to drivers" * tag 'i3c/for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: MAINTAINERS: mark I3C DRIVER FOR SYNOPSYS DESIGNWARE orphan i3c: export SETDASA method i3c: Correct the macro module_i3c_i2c_driver commit ab425febda94c7d287ea3433cbd0971771d6aeb4 Merge: 08cdc2157966 dbc94a0fb817 Author: Linus Torvalds Date: Wed Dec 14 09:27:13 2022 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "Usual size of updates, a new driver, and most of the bulk focusing on rxe: - Usual typos, style, and language updates - Driver updates for mlx5, irdma, siw, rts, srp, hfi1, hns, erdma, mlx4, srp - Lots of RXE updates: * Improve reply error handling for bad MR operations * Code tidying * Debug printing uses common loggers * Remove half implemented RD related stuff * Support IBA's recently defined Atomic Write and Flush operations - erdma support for atomic operations - New driver 'mana' for Ethernet HW available in Azure VMs. This driver only supports DPDK" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (122 commits) IB/IPoIB: Fix queue count inconsistency for PKEY child interfaces RDMA: Add missed netdev_put() for the netdevice_tracker RDMA/rxe: Enable RDMA FLUSH capability for rxe device RDMA/cm: Make QP FLUSHABLE for supported device RDMA/rxe: Implement flush completion RDMA/rxe: Implement flush execution in responder side RDMA/rxe: Implement RC RDMA FLUSH service in requester side RDMA/rxe: Extend rxe packet format to support flush RDMA/rxe: Allow registering persistent flag for pmem MR only RDMA/rxe: Extend rxe user ABI to support flush RDMA: Extend RDMA kernel verbs ABI to support flush RDMA: Extend RDMA user ABI to support flush RDMA/rxe: Fix incorrect responder length checking RDMA/rxe: Fix oops with zero length reads RDMA/mlx5: Remove not-used IB_FLOW_SPEC_IB define RDMA/hns: Fix XRC caps on HIP08 RDMA/hns: Fix error code of CMD RDMA/hns: Fix page size cap from firmware RDMA/hns: Fix PBL page MTR find RDMA/hns: Fix AH attr queried by query_qp ... commit 08cdc2157966c07d3f986a097ddaa74cee312751 Merge: aa5ad10f6cca d6c55c0a20e5 Author: Linus Torvalds Date: Wed Dec 14 09:15:43 2022 -0800 Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd implementation from Jason Gunthorpe: "iommufd is the user API to control the IOMMU subsystem as it relates to managing IO page tables that point at user space memory. It takes over from drivers/vfio/vfio_iommu_type1.c (aka the VFIO container) which is the VFIO specific interface for a similar idea. We see a broad need for extended features, some being highly IOMMU device specific: - Binding iommu_domain's to PASID/SSID - Userspace IO page tables, for ARM, x86 and S390 - Kernel bypassed invalidation of user page tables - Re-use of the KVM page table in the IOMMU - Dirty page tracking in the IOMMU - Runtime Increase/Decrease of IOPTE size - PRI support with faults resolved in userspace Many of these HW features exist to support VM use cases - for instance the combination of PASID, PRI and Userspace IO Page Tables allows an implementation of DMA Shared Virtual Addressing (vSVA) within a guest. Dirty tracking enables VM live migration with SRIOV devices and PASID support allow creating "scalable IOV" devices, among other things. As these features are fundamental to a VM platform they need to be uniformly exposed to all the driver families that do DMA into VMs, which is currently VFIO and VDPA" For more background, see the extended explanations in Jason's pull request: https://lore.kernel.org/lkml/Y5dzTU8dlmXTbzoJ@nvidia.com/ * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: (62 commits) iommufd: Change the order of MSI setup iommufd: Improve a few unclear bits of code iommufd: Fix comment typos vfio: Move vfio group specific code into group.c vfio: Refactor dma APIs for emulated devices vfio: Wrap vfio group module init/clean code into helpers vfio: Refactor vfio_device open and close vfio: Make vfio_device_open() truly device specific vfio: Swap order of vfio_device_container_register() and open_device() vfio: Set device->group in helper function vfio: Create wrappers for group register/unregister vfio: Move the sanity check of the group to vfio_create_group() vfio: Simplify vfio_create_group() iommufd: Allow iommufd to supply /dev/vfio/vfio vfio: Make vfio_container optionally compiled vfio: Move container related MODULE_ALIAS statements into container.c vfio-iommufd: Support iommufd for emulated VFIO devices vfio-iommufd: Support iommufd for physical VFIO devices vfio-iommufd: Allow iommufd to be used in place of a container fd vfio: Use IOMMU_CAP_ENFORCE_CACHE_COHERENCY for vfio_file_enforced_coherent() ... commit aa5ad10f6cca6d42f3fef6cb862e03b220ea19a6 Merge: e2ca6ba6ba01 4e80eef45ad7 Author: Linus Torvalds Date: Wed Dec 14 08:58:51 2022 -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 (target, ufs, smartpqi, lpfc). There are some core changes, mostly around reworking some of our user context assumptions in device put and moving some code around. The remaining updates are bug fixes and minor changes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (138 commits) scsi: sg: Fix get_user() in call sg_scsi_ioctl() scsi: megaraid_sas: Fix some spelling mistakes in comment scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host() scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device() scsi: ufs: ufs-mediatek: Remove unnecessary return code scsi: ufs: core: Fix the polling implementation scsi: libsas: Do not export sas_ata_wait_after_reset() scsi: hisi_sas: Fix SATA devices missing issue during I_T nexus reset scsi: libsas: Add smp_ata_check_ready_type() scsi: Revert "scsi: hisi_sas: Don't send bcast events from HW during nexus HA reset" scsi: Revert "scsi: hisi_sas: Drain bcast events in hisi_sas_rescan_topology()" scsi: ufs: ufs-mediatek: Modify the return value scsi: ufs: ufs-mediatek: Remove unneeded code scsi: device_handler: alua: Call scsi_device_put() from non-atomic context scsi: device_handler: alua: Revert "Move a scsi_device_put() call out of alua_check_vpd()" scsi: snic: Fix possible UAF in snic_tgt_create() scsi: qla2xxx: Initialize vha->unknown_atio_[list, work] for NPIV hosts scsi: qla2xxx: Remove duplicate of vha->iocb_work initialization scsi: fcoe: Fix transport not deattached when fcoe_if_init() fails scsi: sd: Use 16-byte SYNCHRONIZE CACHE on ZBC devices ... commit ff1cc97b1f4c10db224f276d9615b22835b8c424 Author: Jiri Slaby (SUSE) Date: Tue Dec 13 13:08:26 2022 +0100 block/blk-iocost (gcc13): keep large values in a new enum Since gcc13, each member of an enum has the same type as the enum [1]. And that is inherited from its members. Provided: VTIME_PER_SEC_SHIFT = 37, VTIME_PER_SEC = 1LLU << VTIME_PER_SEC_SHIFT, ... AUTOP_CYCLE_NSEC = 10LLU * NSEC_PER_SEC, the named type is unsigned long. This generates warnings with gcc-13: block/blk-iocost.c: In function 'ioc_weight_prfill': block/blk-iocost.c:3037:37: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' block/blk-iocost.c: In function 'ioc_weight_show': block/blk-iocost.c:3047:34: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' So split the anonymous enum with large values to a separate enum, so that they don't affect other members. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36113 Cc: Martin Liska Cc: Tejun Heo Cc: Josef Bacik Cc: Jens Axboe Cc: cgroups@vger.kernel.org Cc: linux-block@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221213120826.17446-1-jirislaby@kernel.org Signed-off-by: Jens Axboe block/blk-iocost.c | 2 ++ 1 file changed, 2 insertions(+) commit 337366e02b370d2800110fbc99940f6ddddcbdfa Author: Yu Kuai Date: Wed Dec 14 11:31:55 2022 +0800 block, bfq: replace 0/1 with false/true in bic apis Just to make the code a litter cleaner, there are no functional changes. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221214033155.3455754-3-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-cgroup.c | 8 ++++---- block/bfq-iosched.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 452af7dc59033a76372d51a24682503377872b11 Author: Yu Kuai Date: Wed Dec 14 11:31:54 2022 +0800 block, bfq: don't return bfqg from __bfq_bic_change_cgroup() The return value is not used, hence remove it. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221214033155.3455754-2-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-cgroup.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 64dc8c732f5c2b406cc752e6aaa1bd5471159cab Author: Yu Kuai Date: Wed Dec 14 11:04:30 2022 +0800 block, bfq: fix possible uaf for 'bfqq->bic' Our test report a uaf for 'bfqq->bic' in 5.10: ================================================================== BUG: KASAN: use-after-free in bfq_select_queue+0x378/0xa30 CPU: 6 PID: 2318352 Comm: fsstress Kdump: loaded Not tainted 5.10.0-60.18.0.50.h602.kasan.eulerosv2r11.x86_64 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-20220320_160524-szxrtosci10000 04/01/2014 Call Trace: bfq_select_queue+0x378/0xa30 bfq_dispatch_request+0xe8/0x130 blk_mq_do_dispatch_sched+0x62/0xb0 __blk_mq_sched_dispatch_requests+0x215/0x2a0 blk_mq_sched_dispatch_requests+0x8f/0xd0 __blk_mq_run_hw_queue+0x98/0x180 __blk_mq_delay_run_hw_queue+0x22b/0x240 blk_mq_run_hw_queue+0xe3/0x190 blk_mq_sched_insert_requests+0x107/0x200 blk_mq_flush_plug_list+0x26e/0x3c0 blk_finish_plug+0x63/0x90 __iomap_dio_rw+0x7b5/0x910 iomap_dio_rw+0x36/0x80 ext4_dio_read_iter+0x146/0x190 [ext4] ext4_file_read_iter+0x1e2/0x230 [ext4] new_sync_read+0x29f/0x400 vfs_read+0x24e/0x2d0 ksys_read+0xd5/0x1b0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Commit 3bc5e683c67d ("bfq: Split shared queues on move between cgroups") changes that move process to a new cgroup will allocate a new bfqq to use, however, the old bfqq and new bfqq can point to the same bic: 1) Initial state, two process with io in the same cgroup. Process 1 Process 2 (BIC1) (BIC2) | Λ | Λ | | | | V | V | bfqq1 bfqq2 2) bfqq1 is merged to bfqq2. Process 1 Process 2 (BIC1) (BIC2) | | \-------------\| V bfqq1 bfqq2(coop) 3) Process 1 exit, then issue new io(denoce IOA) from Process 2. (BIC2) | Λ | | V | bfqq2(coop) 4) Before IOA is completed, move Process 2 to another cgroup and issue io. Process 2 (BIC2) Λ |\--------------\ | V bfqq2 bfqq3 Now that BIC2 points to bfqq3, while bfqq2 and bfqq3 both point to BIC2. If all the requests are completed, and Process 2 exit, BIC2 will be freed while there is no guarantee that bfqq2 will be freed before BIC2. Fix the problem by clearing bfqq->bic while bfqq is detached from bic. Fixes: 3bc5e683c67d ("bfq: Split shared queues on move between cgroups") Suggested-by: Jan Kara Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221214030430.3304151-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit eb9d58947d40699d93e5e69e1ddc54e41da7e132 Author: Steven Rostedt (Google) Date: Tue Dec 13 22:12:27 2022 -0500 tracing: Fix cpumask() example typo The sample code for using cpumask used the wrong field for the __get_cpumask() helper. It used "cpus" which is the bitmask (but would still give a proper example) instead of the "cpum" that was there to be used. Although it produces the same output, fix it, because it's an example and is confusing in how to properly use the cpumask() macro. Link: https://lore.kernel.org/linux-trace-kernel/20221213221227.56560374@gandalf.local.home Cc: Andrew Morton Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) samples/trace_events/trace-events-sample.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea47666ca4288becf82c51eb3da6d3ff891470a4 Author: Guilherme G. Piccoli Date: Fri Aug 19 19:17:26 2022 -0300 tracing: Improve panic/die notifiers Currently the tracing dump_on_oops feature is implemented through separate notifiers, one for die/oops and the other for panic; given they have the same functionality, let's unify them. Also improve the function comment and change the priority of the notifier to make it execute earlier, avoiding showing useless trace data (like the callback names for the other notifiers); finally, we also removed an unnecessary header inclusion. Link: https://lkml.kernel.org/r/20220819221731.480795-7-gpiccoli@igalia.com Cc: Petr Mladek Cc: Sergei Shtylyov Signed-off-by: Guilherme G. Piccoli Signed-off-by: Steven Rostedt (Google) kernel/trace/trace.c | 55 ++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 28 deletions(-) commit d0b24b4e91fcb8408c4979888547f86be514e337 Author: Guilherme G. Piccoli Date: Tue Nov 15 17:48:47 2022 -0300 ftrace: Prevent RCU stall on PREEMPT_VOLUNTARY kernels The function match_records() may take a while due to a large number of string comparisons, so when in PREEMPT_VOLUNTARY kernels we could face RCU stalls due to that. Add a cond_resched() to prevent that. Link: https://lkml.kernel.org/r/20221115204847.593616-1-gpiccoli@igalia.com Cc: Mark Rutland Suggested-by: Steven Rostedt Acked-by: Paul E. McKenney # from RCU CPU stall warning perspective Signed-off-by: Guilherme G. Piccoli Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/ftrace.c | 1 + 1 file changed, 1 insertion(+) commit bd7bcc4f963c8898176ad864288959375154e038 Merge: 904f309ae7ed 5011a110295d Author: Rafael J. Wysocki Date: Wed Dec 14 17:05:45 2022 +0100 Merge tag 'thermal-v6.2-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal driver changes for 6.2-rc1 from Daniel Lezcano: "- Add the sm8450 QCom compatible string in the DT bindings (Luca Weiss) - Use devm_platform_get_and_ioremap_resource on the ST platform to group two calls into a single one (Minghao Chi) - Add the sm8550 QCom compatible string in the DT bindings (Neil Armstrong) - Use GENMASK instead of bitmaps and validate the temperature after reading it (Marcus Folkesson) - Convert generic-adc-thermal to DT schema (Rob Herring) - Fix the debug print message where the logic is inverted (Keerthy) - Fix memory leak on thermal_of_zone_register() failure (Ido Schimmel) - Add support for IPQ8074 in the tsens driver along with the DT bindings (Robert Marko) - Fix and rework the debugfs code in the tsens driver (Christian Marangi) - Add calibration and DT documentation for the imx8mm driver (Marek Vasut) - Add DT bindings and compatible for the Mediatek SoCs mt7981 and mt7983 (Daniel Golle) - Don't show an error message if it happens at probe time while it will be deferred on the QCom SPMI ADC driver (Johan Hovold) - Add the HWMon support on the imx8mm board (Alexander Stein) - Remove a pointless include in the power allocator governor (Christophe JAILLET) - Add interrupt DT bindings for QCom SoCs SC8280XP, SM6350 and SM8450 (Krzysztof Kozlowski) - Fix inaccurate warning message for the QCom tsens gen2 (Luca Weiss) - Demote error log of thermal zone register to debug on the tsens QCom driver (Manivannan Sadhasivam) - Consolidate the TI Bandgap driver regarding how is handled the efuse values and the errata handling (Bryan Brattlof) - Document the Renesas RZ/Five as compatible with RZ/G2UL in the DT bindings (Lad Prabhakar) - Fix the irq handler return value in the LMh driver (Bjorn Andersson) - Delete platform remove callback as it is empty (Uwe Kleine-König)" * tag 'thermal-v6.2-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (34 commits) thermal/drivers/imx_sc_thermal: Drop empty platform remove function thermal/drivers/qcom/lmh: Fix irq handler return value dt-bindings: thermal: qcom-tsens: Add compatible for sm8550 thermal/drivers/st: Use devm_platform_get_and_ioremap_resource() dt-bindings: thermal: rzg2l-thermal: Document RZ/Five SoC dt-bindings: thermal: k3-j72xx: conditionally require efuse reg range dt-bindings: thermal: k3-j72xx: elaborate on binding description thermal/drivers/k3_j72xx_bandgap: Map fuse_base only for erratum workaround thermal/drivers/k3_j72xx_bandgap: Remove fuse_base from structure thermal/drivers/k3_j72xx_bandgap: Use bool for i2128 erratum flag thermal/drivers/k3_j72xx_bandgap: Simplify k3_thermal_get_temp() function thermal/drivers/qcom: Demote error log of thermal zone register to debug thermal/drivers/qcom/temp-alarm: Fix inaccurate warning for gen2 dt-bindings: thermal: qcom-tsens: narrow interrupts for SC8280XP, SM6350 and SM8450 thermal/core/power allocator: Remove a useless include thermal/drivers/imx8mm: Add hwmon support thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message dt-bindings: thermal: mediatek: add compatible string for MT7986 and MT7981 SoC thermal: ti-soc-thermal: Drop comma after SoC match table sentinel thermal/drivers/imx: Add support for loading calibration data from OCOTP ... commit e5f30f6fb29a0b8fa7ca784e44571a610b949b04 Author: Pavel Begunkov Date: Fri Dec 2 17:47:24 2022 +0000 io_uring: ease timeout flush locking requirements We don't need completion_lock for timeout flushing, don't take it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1e3dc657975ac445b80e7bdc40050db783a5935a.1670002973.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 9 ++++----- io_uring/timeout.c | 2 -- 2 files changed, 4 insertions(+), 7 deletions(-) commit 6971253f078766543c716db708ba2c787826690d Author: Pavel Begunkov Date: Fri Dec 2 17:47:23 2022 +0000 io_uring: revise completion_lock locking io_kill_timeouts() doesn't post any events but queues everything to task_work. Locking there is needed for protecting linked requests traversing, we should grab completion_lock directly instead of using io_cq_[un]lock helpers. Same goes for __io_req_find_next_prep(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/88e75d481a65dc295cb59722bb1cf76402d1c06b.1670002973.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 16 ++++++++++++++-- io_uring/io_uring.h | 11 ----------- io_uring/timeout.c | 8 ++++++-- 3 files changed, 20 insertions(+), 15 deletions(-) commit ea011ee10231f5fa6cbb415007048ca0bb948baf Author: Pavel Begunkov Date: Fri Dec 2 17:47:22 2022 +0000 io_uring: protect cq_timeouts with timeout_lock Read cq_timeouts in io_flush_timeouts() only after taking the timeout_lock, as it's protected by it. There are many places where we also grab ->completion_lock, but for instance io_timeout_fn() doesn't and still modifies cq_timeouts. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9c79544dd6cf5c4018cb1bab99cf481a93ea46ef.1670002973.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/timeout.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 38792972de4294163f44d6360fd221e6f2c22a05 Author: Ard Biesheuvel Date: Tue Dec 13 14:24:07 2022 +0100 ftrace: Allow WITH_ARGS flavour of graph tracer with shadow call stack The recent switch on arm64 from DYNAMIC_FTRACE_WITH_REGS to DYNAMIC_FTRACE_WITH_ARGS failed to take into account that we currently require the former in order to allow the function graph tracer to be enabled in combination with shadow call stacks. This means that this is no longer permitted at all, in spite of the fact that either flavour of ftrace works perfectly fine in this combination. So permit WITH_ARGS as well as WITH_REGS. Fixes: ddc9863e9e90 ("scs: Disable when function graph tracing is enabled") Acked-by: Mark Rutland Acked-by: Steven Rostedt (Google) Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20221213132407.1485025-1-ardb@kernel.org Signed-off-by: Will Deacon arch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75333d48f92256a0dec91dbf07835e804fc411c0 Author: Dai Ngo Date: Mon Dec 12 14:50:11 2022 -0800 NFSD: fix use-after-free in __nfs42_ssc_open() Problem caused by source's vfsmount being unmounted but remains on the delayed unmount list. This happens when nfs42_ssc_open() return errors. Fixed by removing nfsd4_interssc_connect(), leave the vfsmount for the laundromat to unmount when idle time expires. We don't need to call nfs_do_sb_deactive when nfs42_ssc_open return errors since the file was not opened so nfs_server->active was not incremented. Same as in nfsd4_copy, if we fail to launch nfsd4_do_async_copy thread then there's no need to call nfs_do_sb_deactive Reported-by: Xingyuan Mo Signed-off-by: Dai Ngo Tested-by: Xingyuan Mo Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit e44a0fe630c58b0a87d8281f5c1077a3479e5fce Author: Christian König Date: Fri Nov 25 17:04:25 2022 +0100 drm/amdgpu: rework reserved VMID handling Instead of reserving a VMID for a single process allow that many processes use the reserved ID. This allows for proper isolation between the processes. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 45 +++++++++++++++------------------ drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 6 +---- 3 files changed, 24 insertions(+), 30 deletions(-) commit 053499f7b45dc56758240615569b349fe9e2fc8d Author: Christian König Date: Fri Nov 25 16:45:09 2022 +0100 drm/amdgpu: stop waiting for the VM during unreserve This is completely pointless since the VMID always stays allocated until the VM is idle. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 5f3c40e9e2460c42f5bf6c51b1e393d7159241c3 Author: Christian König Date: Fri Nov 25 16:42:45 2022 +0100 drm/amdgpu: cleanup SPM support a bit This should probably not access job->vm and also emit the SPM switch under the conditional execute. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 9 +++++---- 3 files changed, 7 insertions(+), 4 deletions(-) commit 56b0989e2939811c11ed9c449ff84cf85878ffe3 Author: Christian König Date: Fri Nov 25 16:04:25 2022 +0100 drm/amdgpu: fix GDS/GWS/OA switch handling Bas pointed out that this isn't working as expected and could cause crashes. Fix the handling by storing the marker that a switch is needed inside the job instead. Reported-by: Bas Nieuwenhuizen Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 42 ++++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 54 ++++++++++++--------------------- 3 files changed, 54 insertions(+), 43 deletions(-) commit e0607c10ebf551a654c3577fc74b4bf5533e1cea Author: Evan Quan Date: Fri Dec 9 16:09:58 2022 +0800 drm/amd/pm: add missing SMU13.0.7 mm_dpm feature mapping Without this, the pp_dpm_vclk and pp_dpm_dclk outputs are not with correct data. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 2 ++ 1 file changed, 2 insertions(+) commit 592cd24a08763975c75be850a7d4e461bfd353bf Author: Evan Quan Date: Fri Dec 9 16:05:12 2022 +0800 drm/amd/pm: add missing SMU13.0.0 mm_dpm feature mapping Without this, the pp_dpm_vclk and pp_dpm_dclk outputs are not with correct data. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 ++ 1 file changed, 2 insertions(+) commit f95f51a4c3357eabf74fe14ab7daa5b5c0422b27 Author: Felix Kuehling Date: Wed Apr 21 21:09:54 2021 -0400 drm/amdgpu: Add notifier lock for KFD userptrs Add a per-process MMU notifier lock for processing notifiers from userptrs. Use that lock to properly synchronize page table updates with MMU notifiers. Signed-off-by: Felix Kuehling Reviewed-by: Xiaogang Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 13 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 212 +++++++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 17 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 6 + 6 files changed, 172 insertions(+), 91 deletions(-) commit fe6872adb05e85bde38f2cdec01a0f4cfb826998 Author: Yifan Zhang Date: Thu Dec 8 11:55:15 2022 +0800 drm/amd/display: Add DCN314 display SG Support Add display SG support for DCN 3.1.4. Signed-off-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) commit 4d2ccd96ac25846749fc58691f5142a966e65b3a Author: Christian König Date: Wed Nov 16 15:45:36 2022 +0100 drm/amdgpu: WARN when freeing kernel memory during suspend When buffers are freed during suspend there is no guarantee that they can be re-allocated during resume. The PSP subsystem seems to be quite buggy regarding this, so add a WARN_ON() to point out those bugs. Signed-off-by: Christian König Reviewed-by: Alex Deucher Tested-by: Guilherme G. Piccoli Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++ 1 file changed, 2 insertions(+) commit 9c3db58bf8f7d0007049f686ce8c419eed4325d1 Author: Christian König Date: Wed Dec 7 08:47:30 2022 +0100 drm/amdgpu: fixx NULL pointer deref in gmc_v9_0_get_vm_pte We not only need to make sure that we have a BO, but also that the BO has some backing store. Fixes: d1a372af1c3d ("drm/amdgpu: Set MTYPE in PTE based on BO flags") Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5011a110295d25418f5918a6af7bfcdb00dd4e34 Author: Uwe Kleine-König Date: Mon Dec 12 23:02:17 2022 +0100 thermal/drivers/imx_sc_thermal: 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/20221212220217.3777176-1-u.kleine-koenig@pengutronix.de Signed-off-by: Daniel Lezcano drivers/thermal/imx_sc_thermal.c | 6 ------ 1 file changed, 6 deletions(-) commit 46a891e45be97c6781ac34f5ec777d69370e252b Author: Bjorn Andersson Date: Wed Mar 16 11:03:22 2022 -0700 thermal/drivers/qcom/lmh: Fix irq handler return value After enough invocations the LMh irq is eventually reported as bad, because the handler doesn't return IRQ_HANDLED, fix this. Fixes: 53bca371cdf7 ("thermal/drivers/qcom: Add support for LMh driver") Reported-by: Daniel Lezcano Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220316180322.88132-1-bjorn.andersson@linaro.org Signed-off-by: Daniel Lezcano drivers/thermal/qcom/lmh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a9f20112c22cdcd6b81fafb18534a2a5a629a14 Author: Neil Armstrong Date: Wed Nov 16 11:09:50 2022 +0100 dt-bindings: thermal: qcom-tsens: Add compatible for sm8550 The Qualcomm SM8550 platform has three instances of the tsens block, add a compatible for these instances. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Acked-by: Amit Kucheria Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-tsens-v1-0-0e169822830f@linaro.org Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 1 + 1 file changed, 1 insertion(+) commit 33dc955c5a2795f17ff81751563836d498ac794f Author: Minghao Chi Date: Thu Nov 17 14:09:52 2022 +0800 thermal/drivers/st: 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 Link: https://lore.kernel.org/r/202211171409524332954@zte.com.cn Signed-off-by: Daniel Lezcano drivers/thermal/st/stm_thermal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit bf438ed026199ff0182408d8592b6c11382d1a51 Author: Lad Prabhakar Date: Tue Nov 15 12:16:29 2022 +0000 dt-bindings: thermal: rzg2l-thermal: Document RZ/Five SoC The TSU block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,r9a07g043-tsu" 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-tsu" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221115121629.1181667-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/thermal/rzg2l-thermal.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4026d3e2578291016703cd75f3a6f786f60cd80 Author: Bryan Brattlof Date: Mon Oct 31 18:26:57 2022 -0500 dt-bindings: thermal: k3-j72xx: conditionally require efuse reg range Only some of TI's J721E SoCs will need a eFuse register range mapped to determine if they're affected by TI's i2128 erratum. All other SoC will not need this eFuse range to function properly Update the bindings for the k3_j72xx_bandgap thermal driver so other devices will only need two register ranges Signed-off-by: Bryan Brattlof Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221031232702.10339-7-bb@ti.com Signed-off-by: Daniel Lezcano .../devicetree/bindings/thermal/ti,j72xx-thermal.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit effe8db0a421480fc4dad0c7bf380b8e245cbb8c Author: Bryan Brattlof Date: Mon Oct 31 18:26:56 2022 -0500 dt-bindings: thermal: k3-j72xx: elaborate on binding description Elaborate on the function of this device node as well as some of the properties this node uses. Signed-off-by: Bryan Brattlof Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221031232702.10339-6-bb@ti.com Signed-off-by: Daniel Lezcano .../devicetree/bindings/thermal/ti,j72xx-thermal.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 366444ebe7e2e1c987c6a07551f06db4b5b7c0ad Author: Bryan Brattlof Date: Mon Oct 31 18:26:55 2022 -0500 thermal/drivers/k3_j72xx_bandgap: Map fuse_base only for erratum workaround Some of TI's J721E SoCs require a software trimming procedure for the temperature monitors to function properly. To determine if a particular J721E is not affected by this erratum, both bits in the WKUP_SPARE_FUSE0 region must be set. Other SoCs, not affected by this erratum, will not need this region. Map the 'fuse_base' region only when the erratum fix is needed. Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221031232702.10339-5-bb@ti.com Signed-off-by: Daniel Lezcano drivers/thermal/k3_j72xx_bandgap.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 156f0e2fda420c4a4a7b244a909df04086039bd6 Author: Bryan Brattlof Date: Mon Oct 31 18:26:54 2022 -0500 thermal/drivers/k3_j72xx_bandgap: Remove fuse_base from structure 'fuse_base' is only needed during the initial probe function to provide data for a software trimming method for some of TI's devices affected by the i2128 erratum. The devices not affected will not use this region Remove fuse_base from the main k3_j72xx_bandgap structure Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221031232702.10339-4-bb@ti.com Signed-off-by: Daniel Lezcano drivers/thermal/k3_j72xx_bandgap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 311f328ffc7572219bee65db77645e5fedd4e8e6 Author: Bryan Brattlof Date: Mon Oct 31 18:26:53 2022 -0500 thermal/drivers/k3_j72xx_bandgap: Use bool for i2128 erratum flag Some of TI's J721E SoCs require a software trimming method to report temperatures accurately. Currently we are using a few different data types to indicate when we should apply the erratum. Change the 'workaround_needed' variable's data type to a bool to align with how we are using this variable currently. Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221031232702.10339-3-bb@ti.com Signed-off-by: Daniel Lezcano drivers/thermal/k3_j72xx_bandgap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 46cab93ab49f303a7abbcf920cf9ef95d02a113c Author: Bryan Brattlof Date: Mon Oct 31 18:26:52 2022 -0500 thermal/drivers/k3_j72xx_bandgap: Simplify k3_thermal_get_temp() function The k3_thermal_get_temp() function can be simplified to return only the result of k3_bgp_read_temp() without needing the 'ret' variable Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221031232702.10339-2-bb@ti.com Signed-off-by: Daniel Lezcano drivers/thermal/k3_j72xx_bandgap.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 2baad2496383c6036bdb0945ef8aa6b1a5d18c19 Author: Manivannan Sadhasivam Date: Sat Oct 29 10:59:33 2022 +0530 thermal/drivers/qcom: Demote error log of thermal zone register to debug devm_thermal_of_zone_register() can fail with -ENODEV if thermal zone for the channel is not represented in DT. This is perfectly fine since not all sensors needs to be used for thermal zones but only a few in real world. So demote the error log to debug to avoid spamming users. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20221029052933.32421-1-manivannan.sadhasivam@linaro.org Signed-off-by: Daniel Lezcano drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8763f8acbf8aef22a2321d4c978cd078aa3b8f64 Author: Luca Weiss Date: Thu Oct 20 16:52:37 2022 +0200 thermal/drivers/qcom/temp-alarm: Fix inaccurate warning for gen2 On gen2 chips the stage2 threshold is not 140 degC but 125 degC. Make the warning message clearer by using this variable and also by including the temperature that was checked for. Fixes: aa92b3310c55 ("thermal/drivers/qcom-spmi-temp-alarm: Add support for GEN2 rev 1 PMIC peripherals") Signed-off-by: Luca Weiss Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20221020145237.942146-1-luca.weiss@fairphone.com Signed-off-by: Daniel Lezcano drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fa17c4136db0bc91e698bd227cb478c648863d11 Author: Krzysztof Kozlowski Date: Wed Nov 16 12:31:40 2022 +0100 dt-bindings: thermal: qcom-tsens: narrow interrupts for SC8280XP, SM6350 and SM8450 Narrow number of interrupts per variants: SC8280XP, SM6350 and SM8450. The compatibles are already used and described. They only missed the constraints of number of interrupts. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221116113140.69587-1-krzysztof.kozlowski@linaro.org Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 3 +++ 1 file changed, 3 insertions(+) commit de04f680b0ab71d2b9085903fe608a15541f66cb Author: Christophe JAILLET Date: Sat Nov 26 11:42:25 2022 +0100 thermal/core/power allocator: Remove a useless include This file does not use rcu, so there is no point in including . Remove it. Signed-off-by: Christophe JAILLET Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/9adeec47cb5a8193016272d5c8bf936235c1711d.1669459337.git.christophe.jaillet@wanadoo.fr Signed-off-by: Daniel Lezcano drivers/thermal/gov_power_allocator.c | 1 - 1 file changed, 1 deletion(-) commit de95d1341a3e682b95ad759bd58b86224819fbec Author: Alexander Stein Date: Tue Jul 26 14:23:31 2022 +0200 thermal/drivers/imx8mm: Add hwmon support Expose thermal sensors as HWMON devices. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20220726122331.323093-1-alexander.stein@ew.tq-group.com Signed-off-by: Daniel Lezcano drivers/thermal/imx8mm_thermal.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6f8941646234e2d6e589377aea0dd1ba52365623 Author: Johan Hovold Date: Wed Nov 2 16:26:30 2022 +0100 thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message Drivers should not be logging errors on probe deferral. Switch to using dev_err_probe() to log failures when parsing the devicetree to avoid errors like: qcom-spmi-adc-tm5 c440000.spmi:pmic@0:adc-tm@3400: get dt data failed: -517 when a channel is not yet available. Signed-off-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam Reviewed-by: Andrew Halaney Link: https://lore.kernel.org/r/20221102152630.696-1-johan+linaro@kernel.org Signed-off-by: Daniel Lezcano drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c464856e63a4c9631add6a27340bd94beb9eb27f Author: Daniel Golle Date: Wed Nov 30 13:20:38 2022 +0000 dt-bindings: thermal: mediatek: add compatible string for MT7986 and MT7981 SoC Document compatible string 'mediatek,mt7986-thermal' for V3 thermal unit found in MT7986 SoCs. 'mediatek,mt7981-thermal' is also added as it is identical with the thermal unit of MT7986. Signed-off-by: Daniel Golle Acked-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/thermal/mediatek-thermal.txt | 2 ++ 1 file changed, 2 insertions(+) commit 3f9cb57962bcfad88bcac750f85ef7425475b102 Author: Geert Uytterhoeven Date: Mon Nov 21 16:47:10 2022 +0100 thermal: ti-soc-thermal: Drop comma after SoC match table sentinel It does not make sense to have a comma after a sentinel, as any new elements must be added before the sentinel. Signed-off-by: Geert Uytterhoeven Acked-by: Keerthy Link: https://lore.kernel.org/r/1d6de2a80b919cb11199e56ac06ad21c273ebe57.1669045586.git.geert+renesas@glider.be Signed-off-by: Daniel Lezcano drivers/thermal/ti-soc-thermal/ti-bandgap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 403291648823f819f7baaccd47589fcf87187c32 Author: Marek Vasut Date: Fri Dec 2 17:23:53 2022 +0100 thermal/drivers/imx: Add support for loading calibration data from OCOTP The TMU TASR, TCALIVn, TRIM registers must be explicitly programmed with calibration values in OCOTP. Add support for reading the OCOTP calibration data and programming those into the TMU hardware. The MX8MM/MX8MN TMUv1 uses only one OCOTP cell, while MX8MP TMUv2 uses 4, the programming differs in each case. Based on U-Boot commits: 70487ff386c ("imx8mm: Load fuse for TMU TCALIV and TASR") ebb9aab318b ("imx: load calibration parameters from fuse for i.MX8MP") Reviewed-by: Peng Fan Signed-off-by: Marek Vasut Signed-off-by: Daniel Lezcano drivers/thermal/imx8mm_thermal.c | 164 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) commit 8848c0d7a0782c263a7827697d5acfcc09a19a5f Author: Marek Vasut Date: Fri Dec 2 17:23:49 2022 +0100 dt-bindings: thermal: imx8mm-thermal: Document optional nvmem-cells The TMU TASR, TCALIVn, TRIM registers must be explicitly programmed with calibration values from OCOTP. Document optional phandle to OCOTP nvmem provider. Acked-by: Krzysztof Kozlowski Signed-off-by: Marek Vasut Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 89992d95ed1046338c7866ef7bbe6de543a2af91 Author: Christian Marangi Date: Sat Oct 22 14:56:57 2022 +0200 thermal/drivers/qcom/tsens: Rework debugfs file structure The current tsens debugfs structure is composed by: - a tsens dir in debugfs with a version file - a directory for each tsens istance with sensors file to dump all the sensors value. This works on the assumption that we have the same version for each istance but this assumption seems fragile and with more than one tsens istance results in the version file not tracking each of them. A better approach is to just create a subdirectory for each tsens istance and put there version and sensors debugfs file. Using this new implementation results in less code since debugfs entry are created only on successful tsens probe. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20221022125657.22530-4-ansuelsmth@gmail.com Signed-off-by: Daniel Lezcano drivers/thermal/qcom/tsens.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit c7e077e921fa94e0c06c8d14af6c0504c8a5f4bd Author: Christian Marangi Date: Sat Oct 22 14:56:56 2022 +0200 thermal/drivers/qcom/tsens: Fix wrong version id dbg_version_show For VER_0 the version was incorrectly reported as 0.1.0. Fix that and correctly report the major version for this old tsens revision. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20221022125657.22530-3-ansuelsmth@gmail.com Signed-off-by: Daniel Lezcano drivers/thermal/qcom/tsens.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de48d8766afcd97d147699aaff78a338081c9973 Author: Christian Marangi Date: Sat Oct 22 14:56:55 2022 +0200 thermal/drivers/qcom/tsens: Init debugfs only with successful probe Calibrate and tsens_register can fail or PROBE_DEFER. This will cause a double or a wrong init of the debugfs information. Init debugfs only with successful probe fixing warning about directory already present. Signed-off-by: Christian Marangi Acked-by: Thara Gopinath Link: https://lore.kernel.org/r/20221022125657.22530-2-ansuelsmth@gmail.com Signed-off-by: Daniel Lezcano drivers/thermal/qcom/tsens.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 6840455debd38ea82b1f9fbbf8019944da36f7eb Author: Robert Marko Date: Fri Aug 19 00:02:44 2022 +0200 thermal/drivers/tsens: Add IPQ8074 support Qualcomm IPQ8074 uses tsens v2.3 IP, however unlike other tsens v2 IP it only has one IRQ, that is used for up/low as well as critical. It also does not support negative trip temperatures. Signed-off-by: Robert Marko Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818220245.338396-4-robimarko@gmail.com Signed-off-by: Daniel Lezcano drivers/thermal/qcom/tsens-v2.c | 17 +++++++++++++++++ drivers/thermal/qcom/tsens.c | 3 +++ drivers/thermal/qcom/tsens.h | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) commit f63baced3839f591db76c227e09d47001373d6db Author: Robert Marko Date: Fri Aug 19 00:02:43 2022 +0200 thermal/drivers/tsens: Allow configuring min and max trips IPQ8074 and IPQ6018 dont support negative trip temperatures and support up to 204 degrees C as the max trip temperature. So, instead of always setting the -40 as min and 120 degrees C as max allow it to be configured as part of the features. Signed-off-by: Robert Marko Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818220245.338396-3-robimarko@gmail.com Signed-off-by: Daniel Lezcano drivers/thermal/qcom/tsens-8960.c | 2 ++ drivers/thermal/qcom/tsens-v0_1.c | 2 ++ drivers/thermal/qcom/tsens-v1.c | 2 ++ drivers/thermal/qcom/tsens-v2.c | 2 ++ drivers/thermal/qcom/tsens.c | 4 ++-- drivers/thermal/qcom/tsens.h | 4 ++++ 6 files changed, 14 insertions(+), 2 deletions(-) commit 4360af35273b742ffc6605ce44f37ac654272443 Author: Robert Marko Date: Fri Aug 19 00:02:42 2022 +0200 thermal/drivers/tsens: Add support for combined interrupt Despite using tsens v2.3 IP, IPQ8074 and IPQ6018 only have one IRQ for signaling both up/low and critical trips. Signed-off-by: Robert Marko Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818220245.338396-2-robimarko@gmail.com Signed-off-by: Daniel Lezcano drivers/thermal/qcom/tsens-8960.c | 1 + drivers/thermal/qcom/tsens-v0_1.c | 1 + drivers/thermal/qcom/tsens-v1.c | 1 + drivers/thermal/qcom/tsens-v2.c | 1 + drivers/thermal/qcom/tsens.c | 38 ++++++++++++++++++++++++++++++++------ drivers/thermal/qcom/tsens.h | 2 ++ 6 files changed, 38 insertions(+), 6 deletions(-) commit c6db32ec7c600ae7ab92eb6c56a9fb2918fcd780 Author: Robert Marko Date: Fri Aug 19 00:02:41 2022 +0200 dt-bindings: thermal: tsens: Add ipq8074 compatible Qualcomm IPQ8074 has tsens v2.3.0 block, though unlike existing v2 IP it only uses one IRQ, so tsens v2 compatible cannot be used as the fallback. We also have to make sure that correct interrupts are set according to compatibles, so populate interrupt information per compatibles. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220818220245.338396-1-robimarko@gmail.com Signed-off-by: Daniel Lezcano .../devicetree/bindings/thermal/qcom-tsens.yaml | 76 ++++++++++++++++++---- 1 file changed, 65 insertions(+), 11 deletions(-) commit 7ef2f023c2c77a452ba5d0c9b1ad04a5a895d553 Author: Ido Schimmel Date: Thu Oct 20 13:36:58 2022 +0300 thermal/of: Fix memory leak on thermal_of_zone_register() failure The function does not free 'of_ops' upon failure, leading to a memory leak [1]. Fix by freeing 'of_ops' in the error path. [1] unreferenced object 0xffff8ee846198c80 (size 128): comm "swapper/0", pid 1, jiffies 4294699704 (age 70.076s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ d0 3f 6e 8c ff ff ff ff 00 00 00 00 00 00 00 00 .?n............. backtrace: [<00000000d136f562>] __kmalloc_node_track_caller+0x42/0x120 [<0000000063f31678>] kmemdup+0x1d/0x40 [<00000000e6d24096>] thermal_of_zone_register+0x49/0x520 [<000000005e78c755>] devm_thermal_of_zone_register+0x54/0x90 [<00000000ee6b209e>] pmbus_add_sensor+0x1b4/0x1d0 [<00000000896105e3>] pmbus_add_sensor_attrs_one+0x123/0x440 [<0000000049e990a6>] pmbus_add_sensor_attrs+0xfe/0x1d0 [<00000000466b5440>] pmbus_do_probe+0x66b/0x14e0 [<0000000084d42285>] i2c_device_probe+0x13b/0x2f0 [<0000000029e2ae74>] really_probe+0xce/0x2c0 [<00000000692df15c>] driver_probe_device+0x19/0xd0 [<00000000547d9cce>] __device_attach_driver+0x6f/0x100 [<0000000020abd24b>] bus_for_each_drv+0x76/0xc0 [<00000000665d9563>] __device_attach+0xfc/0x180 [<000000008ddd4d6a>] bus_probe_device+0x82/0xa0 [<000000009e61132b>] device_add+0x3fe/0x920 Fixes: 3fd6d6e2b4e8 ("thermal/of: Rework the thermal device tree initialization") Signed-off-by: Ido Schimmel Reviewed-by: Vadim Pasternak Link: https://lore.kernel.org/r/20221020103658.802457-1-idosch@nvidia.com Signed-off-by: Daniel Lezcano drivers/thermal/thermal_of.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a7c42af78b19a11e98a5555a664c343e3a672632 Author: Keerthy Date: Mon Oct 10 09:11:26 2022 +0530 thermal/drivers/k3_j72xx_bandgap: Fix the debug print message The debug print message to check the workaround applicability is inverted. Fix the same. Fixes: ffcb2fc86eb7 ("thermal: k3_j72xx_bandgap: Add the bandgap driver support") Reported-by: Bryan Brattlof Signed-off-by: Keerthy Link: https://lore.kernel.org/r/20221010034126.3550-1-j-keerthy@ti.com Signed-off-by: Daniel Lezcano drivers/thermal/k3_j72xx_bandgap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87f9fe8c4b603bd18f025d8c5fc9bb5f17b9a4cc Author: Rob Herring Date: Tue Oct 11 12:52:35 2022 -0500 dt-bindings: thermal: Convert generic-adc-thermal to DT schema Convert the 'generic-adc-thermal' binding to DT schema format. The binding said '#thermal-sensor-cells' should be 1, but all in tree users are 0 and 1 doesn't make sense for a single channel. Drop the example's related providers and consumers of the 'generic-adc-thermal' node as the convention is to not have those in the examples. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221011175235.3191509-1-robh@kernel.org Signed-off-by: Daniel Lezcano .../bindings/thermal/generic-adc-thermal.yaml | 84 +++++++++++++++++++ .../bindings/thermal/thermal-generic-adc.txt | 95 ---------------------- 2 files changed, 84 insertions(+), 95 deletions(-) commit d37edc7370273306d8747097fafa62436c1cfe16 Author: Marcus Folkesson Date: Fri Oct 14 09:35:07 2022 +0200 thermal/drivers/imx8mm_thermal: Validate temperature range Check against the upper temperature limit (125 degrees C) before consider the temperature valid. Fixes: 5eed800a6811 ("thermal: imx8mm: Add support for i.MX8MM thermal monitoring unit") Signed-off-by: Marcus Folkesson Reviewed-by: Jacky Bai Link: https://lore.kernel.org/r/20221014073507.1594844-1-marcus.folkesson@gmail.com Signed-off-by: Daniel Lezcano drivers/thermal/imx8mm_thermal.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1f455f144fb05e53ae47f84eb109a8021fe168d1 Author: Marcus Folkesson Date: Fri Oct 14 10:16:20 2022 +0200 thermal/drivers/imx8mm_thermal: Use GENMASK() when appropriate GENMASK() is preferred to use for bitmasks. Signed-off-by: Marcus Folkesson Link: https://lore.kernel.org/r/20221014081620.1599511-1-marcus.folkesson@gmail.com Signed-off-by: Daniel Lezcano drivers/thermal/imx8mm_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f0f4c3adcfe6d93508a7fbe241b115aa5b24fe36 Author: Luca Weiss Date: Sun Oct 16 11:00:34 2022 +0200 dt-bindings: thermal: tsens: Add sm8450 compatible Document the tsens-v2 compatible for sm8450 SoC. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221016090035.565350-5-luca@z3ntu.xyz Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 1 + 1 file changed, 1 insertion(+) commit 3b553e0041a65e499fa4e25ee146f01f4ec4e617 Author: Christophe Leroy Date: Wed Dec 14 14:41:33 2022 +0100 spi: fsl_spi: Don't change speed while chipselect is active Commit c9bfcb315104 ("spi_mpc83xx: much improved driver") made modifications to the driver to not perform speed changes while chipselect is active. But those changes where lost with the convertion to tranfer_one. Previous implementation was allowing speed changes during message transfer when cs_change flag was set. At the time being, core SPI does not provide any feature to change speed while chipselect is off, so do not allow any speed change during message transfer, and perform the transfer setup in prepare_message in order to set correct speed while chipselect is still off. Reported-by: Herve Codina Fixes: 64ca1a034f00 ("spi: fsl_spi: Convert to transfer_one") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Tested-by: Herve Codina Reviewed-by: Herve Codina Link: https://lore.kernel.org/r/8aab84c51aa330cf91f4b43782a1c483e150a4e3.1671025244.git.christophe.leroy@csgroup.eu Signed-off-by: Mark Brown drivers/spi/spi-fsl-spi.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit caec54705adb73b0015bce4dc781e0d19a91ff18 Author: Ian Rogers Date: Tue Dec 13 15:26:47 2022 -0800 perf build: Fix python/perf.so library's name Since Python 3.3 extensions have a suffix encoding platform and version information. For example, the perf extension was previously perf.so but now maybe perf.cpython-310-x86_64-linux-gnu.so. Compute the extension using Python and then use this in the target name. Doing this avoids the "perf.so" target always being rebuilt. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Anshuman Khandual Cc: Athira Jajeev Cc: Eelco Chaudron Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Sandipan Das Cc: Sean Christopherson Cc: Shaomin Deng Cc: Stephane Eranian Cc: Timothy Hayes Cc: Xing Zhengjun Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221213232651.1269909-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 4 +++- tools/perf/Makefile.perf | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) commit 9440ebdc333dd12e2344aec8fd3fb7d440f9463c Author: James Clark Date: Tue Dec 13 11:47:39 2022 +0000 perf test arm64: Add attr tests for new VG register Ensure that the availability of the VG register behaves as expected depending on the kernel version and SVE support. Signed-off-by: James Clark Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221213114739.2312862-5-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr/test-record-user-regs-no-sve-aarch64 | 9 +++++++++ .../perf/tests/attr/test-record-user-regs-old-sve-aarch64 | 10 ++++++++++ tools/perf/tests/attr/test-record-user-regs-sve-aarch64 | 14 ++++++++++++++ 3 files changed, 33 insertions(+) commit ee26adf627e65c8e26b13aa35d5de1875973114f Author: James Clark Date: Tue Dec 13 11:47:38 2022 +0000 perf test: Add mechanism for skipping attr tests on kernel versions The first two version numbers are used since that is where the ABI changes happen, so seems to be the most useful for now. 'Until' is exclusive and 'since' is inclusive so that the same version number can be used to mark a point where the change comes into effect. This allows keeping the tests in a state where new tests will also pass on older kernels if the existence of a new feature isn't explicitly broadcast by the kernel. For example extended user regs are currently discovered by trial and error calls to perf_event_open. Signed-off-by: James Clark Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221213114739.2312862-4-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit c3a8f85351b15167d6c8d178656df82ba3c34712 Author: James Clark Date: Tue Dec 13 11:47:37 2022 +0000 perf test: Add mechanism for skipping attr tests on auxiliary vector values This can be used to skip tests or provide different test values on different platforms. For example to run a test only where Arm SVE is present add this to the config section: auxv = auxv["AT_HWCAP"] & 0x200000 == 0x200000 The value is a freeform Python expression that is evaled in the context of a map called "auxv" that contains the decoded auxiliary vector. Signed-off-by: James Clark Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221213114739.2312862-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr.py | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit a8f26192ca769c6b37a04b3ee188f28069fd5d53 Author: James Clark Date: Tue Dec 13 11:47:36 2022 +0000 perf test: Add ability to test exit code for attr tests Currently the return value is used to skip the test, but sometimes it can be useful to test if a certain command should return a certain exit code. Signed-off-by: James Clark Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221213114739.2312862-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit e8478b84d6ba9ccfac15dfce103062c4fa7ded2f Author: Petar Gligoric Date: Tue Dec 6 10:44:06 2022 -0500 perf test: add new task-analyzer tests Provide task-analyzer test cases for all possible arguments and a subset of possible combinations. 12 Tests in total. test_basic: - cmd:"perf script report task-analyzer" - Fundamental test of script without arguments. - Check for standard output. test_ns_rename: - cmd:"perf script report task-analyzer --ns --rename-comms-by-tids 0:random" - Standard task with timestamps in nanoseconds and comm renamed. - Check for standard output. test_ms_filtertasks_highlight: - cmd:"perf script report task-analyzer --ms --filter-tasks perf --highlight-tasks perf" - Standard task with timestamps in milliseconds, task filtered out and highlighted. - Check for standard output. test_extended_times_timelimit_limittasks: - cmd "perf script report task-analyzer --extended-times --time-limit :99999" - Standard task with additional schedule out/in info and timlimit active at 99999. - Check for extended table output. test_summary: - cmd:"perf script report task-analyzer --summary" - Standard task with additional summary output. - Check for summary print. test_summary_extended: - cmd:"perf script report task-analyzer --summary-extended" - Standard task with summary and additional schedule in/out info. - Chceck for extended table print. test_summaryonly: - cmd:"perf script report task-analyzer --summary-only" - Only summary should be printed. - Check for summary print. test_extended_times_summary_ns: - cmd:"perf script report task-analyzer --extended-times --summary --ns" - Standard task with extended schedule in/out information and summary in ns. - Check for extended table and summary. test_csv: - cmd:"perf script report task-analyzer --csv csv" - Print standard task to csv file in csv format. - Check for csv format. test_csv_extended_times: - cmd:"perf script report task-analyzer --csv csv --extended-times" - Print standard task to csv file in csv format with additional schedule in/out information. - Check for additional information and csv format. test_csvsummary: - cmd:"perf script report task-analyzer --csv-summary csvsummary" - Print summary to csvsummary file in csv format. - Check for csv format. test_csvsummary_extended: - cmd:"perf script report task-analyzer --csv-summary csvsummary --summary-extended" - Print summary to csvsummary file in csv format with additional schedule in/out information. - Check for additional information and csv format. Suggested-by: Ian Rogers Signed-off-by: Petar Gligoric Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20221206154406.41941-4-petar.gligor@gmail.com Signed-off-by: Hagen Paul Pfeifer Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/test_task_analyzer.sh | 151 +++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) commit fdd0f81f0528d55d4362d072c6d6ecc7ecd61def Author: Petar Gligoric Date: Tue Dec 6 10:44:05 2022 -0500 perf script: task-analyzer add csv support This patch adds the possibility to write the trace and the summary as csv files to a user specified file. A format as such simplifies further data processing. This is achieved by having ";" as separators instead of spaces and solely one header per file. Additional parameters are being considered, like in the normal usage of the script. Colors are turned off in the case of a csv output, thus the highlight option is also being ignored. Usage: Write standard task to csv file: $ perf script report tasks-analyzer --csv write limited output to csv file in nanoseconds: $ perf script report tasks-analyzer --csv --ns --limit-to-tasks 1337 Write summary to a csv file: $ perf script report tasks-analyzer --csv-summary Write summary to csv file with additional schedule information: $ perf script report tasks-analyzer --csv-summary --summary-extended Write both summary and standard task to a csv file: $ perf script report tasks-analyzer --csv --csv-summary The following examples illustrate what is possible with the CSV output. The first command sequence will record all scheduler switch events for 10 seconds, the task-analyzer calculates task information like runtimes as CSV. A small python snippet using pandas and matplotlib will visualize the most frequent task (e.g. kworker/1:1) runtimes - each runtime as a bar in a bar chart: $ perf record -e sched:sched_switch -a -- sleep 10 $ perf script report tasks-analyzer --ns --csv tasks.csv $ cat << EOF > /tmp/freq-comm-runtimes-bar.py import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("tasks.csv", sep=';') most_freq_comm = df["COMM"].value_counts().idxmax() most_freq_runtimes = df[df["COMM"]==most_freq_comm]["Runtime"] plt.title(f"Runtimes for Task {most_freq_comm} in Nanoseconds") plt.bar(range(len(most_freq_runtimes)), most_freq_runtimes) plt.show() $ python3 /tmp/freq-comm-runtimes-bar.py As a seconds example, the subsequent script generates a pie chart of all accumulated tasks runtimes for 10 seconds of system recordings: $ perf record -e sched:sched_switch -a -- sleep 10 $ perf script report tasks-analyzer --csv-summary task-summary.csv $ cat << EOF > /tmp/accumulated-task-pie.py import pandas as pd from matplotlib.pyplot import pie, axis, show df = pd.read_csv("task-summary.csv", sep=';') sums = df.groupby(df["Comm"])["Accumulated"].sum() axis("equal") pie(sums, labels=sums.index); show() EOF $ python3 /tmp/accumulated-task-pie.py A variety of other visualizations are possible in matplotlib and other environments. Of course, pandas, numpy and co. also allow easy statistical analysis of the data! Signed-off-by: Petar Gligoric Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20221206154406.41941-3-petar.gligor@gmail.com Signed-off-by: Hagen Paul Pfeifer Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/task-analyzer.py | 274 +++++++++++++++++++---------- 1 file changed, 185 insertions(+), 89 deletions(-) commit e76aff0523f7d3393f967bc13b10bb04b759abfa Author: Hagen Paul Pfeifer Date: Tue Dec 6 10:44:04 2022 -0500 perf script: Introduce task analyzer python script Introduce a new 'perf script' to analyze task scheduling behavior. During the task analysis, some data is always needed - which goes beyond the simple time of switching on and off a task (process/thread). This concerns for example the runtime of a process or the frequency with which the process was called. This script serves to simplify this recurring analyze process. It immediately provides the user with helpful task characteristic information about the tasks runtimes. Usage: Recorded can be in two ways: $ perf script record tasks-analyzer -- sleep 10 $ perf record -e sched:sched_switch -a -- sleep 10 The script can parse all perf.data files, most important: sched:sched_switch events are mandatory, other events will be ignored. Most simple report use case is to just call the script without arguments: $ perf script report tasks-analyzer Switched-In Switched-Out CPU PID TID Comm Runtime Time Out-In 15576.658891407 15576.659156086 4 2412 2428 gdbus 265 1949 15576.659111320 15576.659455410 0 2412 2412 gnome-shell 344 2267 15576.659491326 15576.659506173 2 74 74 kworker/2:1 15 13145 15576.659506173 15576.659825748 2 2858 2858 gnome-terminal- 320 63263 15576.659871270 15576.659902872 6 20932 20932 kworker/u16:0 32 2314582 15576.659909951 15576.659945501 3 27264 27264 sh 36 -1 15576.659853285 15576.659971052 7 27265 27265 perf 118 5050741 [...] What is not shown here are the ASCII color sequences. For example, if the task consists of only one thread, the TID is grayed out. Runtime is the time the task was running on the CPU, Time Out-In is the time between the process being scheduled *out* and scheduled back *in*. So the last time span between two executions. If -1 is printed, then the task simply ran the first time in the measurements - a Out-In delta could not be calculated. In addition to the chronological representation, there is a summary on task level. This output can be additionally switched on via the --summary option and provides information such as max, min & average runtime per process. The maximum runtime is often important for debugging. The call looks like this: $ perf script report tasks-analyzer --summary Summary Task Information Runtime Information PID TID Comm Runs Accumulated Mean Median Min Max Max At 14 14 ksoftirqd/0 13 334 26 15 9 127 15571.621211956 15 15 rcu_preempt 133 1778 13 13 2 33 15572.581176024 16 16 migration/0 3 49 16 13 12 24 15571.608915425 20 20 migration/1 3 34 11 13 8 13 15571.639101555 25 25 migration/2 3 32 11 12 9 12 15575.639239896 [...] Besides these two options, there are a number of other options that change the output and behavior. This can be queried via --help. Options worth mentioning include: - filter-tasks - filter out unneeded tasks, --filter-task 1337,/sbin/init - highlight-tasks - more pleasant focusing, --highlight-tasks 1:red,mutt:yellow - extended-times - show combinations of elapsed times between schedule in/schedule out - summary-extended - summary with additional information, like maximum delta time statistics - rename-comms-by-tids - handy for inexpressive processnames like python, --rename 1337:my-python-app - ms - show timestamps in milliseconds, nanoseconds is also possible (--ns) - time-limit - limit the analyzer to a time range, --time-limit 15576.0:15576.1 Script is tested and prime time ready for python2 & python3: - make PYTHON=python3 prefix=/usr/local install - make PYTHON=python2 prefix=/usr/local install Signed-off-by: Hagen Paul Pfeifer Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20221206154406.41941-2-petar.gligor@gmail.com Signed-off-by: Petar Gligoric Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/bin/task-analyzer-record | 2 + tools/perf/scripts/python/bin/task-analyzer-report | 3 + tools/perf/scripts/python/task-analyzer.py | 838 +++++++++++++++++++++ 3 files changed, 843 insertions(+) commit 55c1de9973d665161c1c0c146ff15c6884060e19 Author: James Clark Date: Mon Dec 12 15:55:13 2022 +0000 perf cs-etm: Print auxtrace info even if OpenCSD isn't linked Printing the info doesn't have any dependency on OpenCSD, and neither does recording Coresight data. Because it's sometimes useful to look at the info for debugging, it makes sense to be able to see it on the same platform that the recording was made on. So pull the auxtrace info printing parts into a new file that is always compiled into Perf. Signed-off-by: James Clark Cc: Al Grant 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: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20221212155513.2259623-6-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/Build | 1 + tools/perf/util/cs-etm-base.c | 174 ++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/cs-etm.c | 170 ++--------------------------------------- tools/perf/util/cs-etm.h | 12 ++- 4 files changed, 191 insertions(+), 166 deletions(-) commit fd63091f2a0317f8943c816acf3ac5f4002adf5c Author: James Clark Date: Mon Dec 12 15:55:12 2022 +0000 perf cs-etm: Cleanup cs_etm__process_auxtrace_info() hdr is a copy of 3 values of ptr and doesn't need to be long lived. So just use ptr instead which means the malloc and the extra error path can be removed to simplify things. Signed-off-by: James Clark Cc: Al Grant 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: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20221212155513.2259623-5-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit b00204f5c21ca1bd38b8cb45d12a605b4e60a884 Author: James Clark Date: Mon Dec 12 15:55:11 2022 +0000 perf cs-etm: Tidy up auxtrace info header printing cs_etm__print_auxtrace_info() is called twice in case there is an error somewhere in cs_etm__process_auxtrace_info(), but all the info is already available at the beginning so just print it there instead. Also use u64 and the already cast ptr variable to make it more consistent with the rest of the etm code. Signed-off-by: James Clark Cc: Al Grant 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: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20221212155513.2259623-4-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) commit fe55ba183264d40d44bfbe71deb148ff64f2ea2d Author: James Clark Date: Mon Dec 12 15:55:10 2022 +0000 perf cs-etm: Remove unused stub methods These aren't used outside of cs-etm so don't need stubs. Leave cs_etm__process_auxtrace_info() which is used externally, and add an error message so that it's obvious to users why it causes errors. Signed-off-by: James Clark Cc: Al Grant 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: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20221212155513.2259623-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.h | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) commit ab6bd55e9968ff063c0ee28f8941903811dee09a Author: James Clark Date: Mon Dec 12 15:55:09 2022 +0000 perf cs-etm: Print unknown header version as an error This is an error rather than just for the raw trace dump so always print it as an error. Also remove the duplicate header version check. Signed-off-by: James Clark Cc: Al Grant 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: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20221212155513.2259623-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 22ddcb6b4a62eb97f7d988ac59032b74c64afb20 Author: Namhyung Kim Date: Fri Dec 9 11:07:27 2022 -0800 perf test: Update perf lock contention test Add test cases for the task and addr aggregation modes. $ sudo ./perf test -v contention 86: kernel lock contention analysis test : --- start --- test child forked, pid 680006 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 test child finished with 0 ---- end ---- kernel lock contention analysis test: Ok Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Blake Jones 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/20221209190727.759804-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/lock_contention.sh | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 688d2e8de231c54e289b640547af246343732348 Author: Namhyung Kim Date: Fri Dec 9 11:07:26 2022 -0800 perf lock contention: Add -l/--lock-addr option The -l/--lock-addr option is to implement per-lock-instance contention stat using LOCK_AGGR_ADDR. It displays lock address and optionally symbol name if exists. $ sudo ./perf lock con -abl sleep 1 contended total wait max wait avg wait address symbol 1 36.28 us 36.28 us 36.28 us ffff92615d6448b8 9 10.91 us 1.84 us 1.21 us ffffffffbaed50c0 rcu_state 1 10.49 us 10.49 us 10.49 us ffff9262ac4f0c80 8 4.68 us 1.67 us 585 ns ffffffffbae07a40 jiffies_lock 3 3.03 us 1.45 us 1.01 us ffff9262277861e0 1 924 ns 924 ns 924 ns ffff926095ba9d20 1 436 ns 436 ns 436 ns ffff9260bfda4f60 Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Blake Jones 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/20221209190727.759804-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-lock.txt | 4 ++ tools/perf/builtin-lock.c | 84 ++++++++++++++++++++------ tools/perf/util/bpf_lock_contention.c | 23 +++++-- tools/perf/util/bpf_skel/lock_contention.bpf.c | 17 ++++-- tools/perf/util/bpf_skel/lock_data.h | 2 +- 5 files changed, 102 insertions(+), 28 deletions(-) commit eca949b2b4addd941d369d4c2014b87f3c3e203b Author: Namhyung Kim Date: Fri Dec 9 11:07:25 2022 -0800 perf lock contention: Implement -t/--threads option for BPF The BPF didn't show the per-thread stat properly. Use task's thread id (PID) as a key instead of stack_id and add a task_data map to save task comm names. $ sudo ./perf lock con -abt -E 5 sleep 1 contended total wait max wait avg wait pid comm 1 740.66 ms 740.66 ms 740.66 ms 1950 nv_queue 3 305.50 ms 298.19 ms 101.83 ms 1884 nvidia-modeset/ 1 25.14 us 25.14 us 25.14 us 2725038 EventManager_De 12 23.09 us 9.30 us 1.92 us 0 swapper 1 20.18 us 20.18 us 20.18 us 2725033 EventManager_De Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Blake Jones 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/20221209190727.759804-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 13 ++------ tools/perf/util/bpf_lock_contention.c | 40 +++++++++++++++++++++++-- tools/perf/util/bpf_skel/lock_contention.bpf.c | 41 +++++++++++++++++++++++--- tools/perf/util/lock-contention.h | 1 + 4 files changed, 78 insertions(+), 17 deletions(-) commit fd507d3e359c7e06d74321cd3d8a5ec8769d05a9 Author: Namhyung Kim Date: Fri Dec 9 11:07:24 2022 -0800 perf lock contention: Add lock_data.h for common data Accessing BPF maps should use the same data types. Add bpf_skel/lock_data.h to define the common data structures. No functional changes. Committer notes: Fixed contention_key.stack_id missing rename to contention_key.stack_or_task_id. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Blake Jones 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/20221209190727.759804-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_lock_contention.c | 19 ++++++---------- tools/perf/util/bpf_skel/lock_contention.bpf.c | 19 +++------------- tools/perf/util/bpf_skel/lock_data.h | 30 ++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 29 deletions(-) commit 3cad53a6f9cdbafa32ea8413809f23a28734c7c5 Author: Khem Raj Date: Sun Dec 4 18:55:34 2022 -0800 perf python: Account for multiple words in CC Sometimes build systems may append options e.g. --sysroot etc. to CC variable especially in cross-compile environments like yocto project where CC varable is composed of cross-compiler name and some needed options for it to work in a relocatable environment. Therefore separate out the compiler name from rest of the options in CC, then add the options via second argument to Popen() API Reviewed-by: Florian Fainelli Signed-off-by: Khem Raj Cc: Adrian Hunter Cc: Fangrui Song Cc: Florian Fainelli Cc: Ian Rogers Cc: Jiri Olsa Cc: John Keeping Cc: Leo Yan Cc: Michael Petlan Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Sedat Dilek Link: https://lore.kernel.org/r/20221205025534.150006-1-raj.khem@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 167b266bf66c5b93171011ef9d1f09b070c2c537 Author: Namhyung Kim Date: Thu Dec 8 10:26:36 2022 -0800 perf off_cpu: Fix a typo in BTF tracepoint name, it should be 'btf_trace_sched_switch' In BTF, tracepoint definitions have the "btf_trace_" prefix. The off-cpu profiler needs to check the signature of the sched_switch event using that definition. But there's a typo (s/bpf/btf/) so it failed always. Fixes: b36888f71c8542cd ("perf record: Handle argument change in sched_switch") Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: bpf@vger.kernel.org Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Link: https://lore.kernel.org/r/20221208182636.524139-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_off_cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 232b82d201cbade4f15e243bc0472ac241239d8c Author: Athira Rajeev Date: Wed Dec 7 22:28:15 2022 +0530 perf test: Update event group check for support of uncore event The event group test checks group creation for combinations of hw, sw and uncore PMU events. Some of the uncore pmus may require additional permission to access the counters. For example, in case of hv_24x7, partition need to have permissions to access hv_24x7 pmu counters. If not, event_open will fail. Hence add a sanity check to see if event_open succeeds before proceeding with the test. Fixes: 9d9b22bedad13d96 ("perf test: Add event group test for events in multiple PMUs") Signed-off-by: Athira Jajeev Acked-by: Ravi Bangoria Cc: Disha Goel Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: linuxppc-dev@lists.ozlabs.org Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nageswara R Sastry Cc: Namhyung Kim Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20221207165815.774-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/event_groups.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit b9a49f8cb02f08592054b953adcacecd59b7ae4b Author: Arnaldo Carvalho de Melo Date: Thu Dec 8 19:28:58 2022 -0300 perf tools: Check if libtracevent has TEP_FIELD_IS_RELATIVE Some distros have older versions of libtraceevent where TEP_FIELD_IS_RELATIVE and its associated semantics are not present, so we need to check if the version has it, it was introduced in libtraceevent 1.5.0. Reported-by: Athira Jajeev Tested-by: Athira Jajeev Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Peter Zijlstra , Cc: Stephane Eranian Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 4 ++++ tools/perf/builtin-trace.c | 2 ++ tools/perf/util/data-convert-bt.c | 2 ++ tools/perf/util/evsel.c | 2 ++ tools/perf/util/python.c | 2 ++ tools/perf/util/scripting-engines/trace-event-perl.c | 2 ++ tools/perf/util/scripting-engines/trace-event-python.c | 2 ++ tools/perf/util/sort.c | 3 ++- 8 files changed, 18 insertions(+), 1 deletion(-) commit 4171925aa9f3f7bf57b100238f148b50c45c3b1b Author: Ian Rogers Date: Tue Nov 29 22:29:35 2022 -0800 tools lib traceevent: Remove libtraceevent libtraceevent is now out-of-date and it is better to depend on the system version. Remove this code that is no longer depended upon by any builds. Committer notes: Removed the removed tools/lib/traceevent/ from tools/perf/MANIFEST, so that 'make perf-tar-src-pkg' works. Signed-off-by: Ian Rogers Acked-by: Steven Rostedt (VMware) Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20221130062935.2219247-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/.gitignore | 4 - tools/lib/traceevent/Build | 8 - tools/lib/traceevent/Documentation/Makefile | 207 - tools/lib/traceevent/Documentation/asciidoc.conf | 120 - .../Documentation/libtraceevent-commands.txt | 153 - .../Documentation/libtraceevent-cpus.txt | 77 - .../Documentation/libtraceevent-endian_read.txt | 78 - .../Documentation/libtraceevent-event_find.txt | 103 - .../Documentation/libtraceevent-event_get.txt | 99 - .../Documentation/libtraceevent-event_list.txt | 122 - .../Documentation/libtraceevent-event_print.txt | 130 - .../Documentation/libtraceevent-field_find.txt | 118 - .../Documentation/libtraceevent-field_get_val.txt | 122 - .../Documentation/libtraceevent-field_print.txt | 126 - .../Documentation/libtraceevent-field_read.txt | 81 - .../Documentation/libtraceevent-fields.txt | 105 - .../Documentation/libtraceevent-file_endian.txt | 91 - .../Documentation/libtraceevent-filter.txt | 209 - .../Documentation/libtraceevent-func_apis.txt | 183 - .../Documentation/libtraceevent-func_find.txt | 88 - .../Documentation/libtraceevent-handle.txt | 101 - .../Documentation/libtraceevent-header_page.txt | 102 - .../Documentation/libtraceevent-host_endian.txt | 104 - .../Documentation/libtraceevent-long_size.txt | 78 - .../Documentation/libtraceevent-page_size.txt | 82 - .../Documentation/libtraceevent-parse_event.txt | 90 - .../Documentation/libtraceevent-parse_head.txt | 82 - .../Documentation/libtraceevent-plugins.txt | 122 - .../Documentation/libtraceevent-record_parse.txt | 137 - .../libtraceevent-reg_event_handler.txt | 156 - .../Documentation/libtraceevent-reg_print_func.txt | 155 - .../Documentation/libtraceevent-set_flag.txt | 104 - .../Documentation/libtraceevent-strerror.txt | 85 - .../Documentation/libtraceevent-tseq.txt | 158 - .../lib/traceevent/Documentation/libtraceevent.txt | 192 - .../lib/traceevent/Documentation/manpage-1.72.xsl | 14 - .../lib/traceevent/Documentation/manpage-base.xsl | 35 - .../Documentation/manpage-bold-literal.xsl | 17 - .../traceevent/Documentation/manpage-normal.xsl | 13 - .../Documentation/manpage-suppress-sp.xsl | 21 - tools/lib/traceevent/Makefile | 300 - tools/lib/traceevent/event-parse-api.c | 333 - tools/lib/traceevent/event-parse-local.h | 123 - tools/lib/traceevent/event-parse.c | 7624 -------------------- tools/lib/traceevent/event-parse.h | 750 -- tools/lib/traceevent/event-plugin.c | 711 -- tools/lib/traceevent/event-utils.h | 67 - tools/lib/traceevent/kbuffer-parse.c | 809 --- tools/lib/traceevent/kbuffer.h | 68 - tools/lib/traceevent/libtraceevent.pc.template | 10 - tools/lib/traceevent/parse-filter.c | 2281 ------ tools/lib/traceevent/parse-utils.c | 71 - tools/lib/traceevent/plugins/Build | 12 - tools/lib/traceevent/plugins/Makefile | 225 - tools/lib/traceevent/plugins/plugin_cfg80211.c | 43 - tools/lib/traceevent/plugins/plugin_function.c | 282 - tools/lib/traceevent/plugins/plugin_futex.c | 123 - tools/lib/traceevent/plugins/plugin_hrtimer.c | 74 - tools/lib/traceevent/plugins/plugin_jbd2.c | 61 - tools/lib/traceevent/plugins/plugin_kmem.c | 80 - tools/lib/traceevent/plugins/plugin_kvm.c | 527 -- tools/lib/traceevent/plugins/plugin_mac80211.c | 88 - tools/lib/traceevent/plugins/plugin_sched_switch.c | 146 - tools/lib/traceevent/plugins/plugin_scsi.c | 434 -- tools/lib/traceevent/plugins/plugin_tlb.c | 66 - tools/lib/traceevent/plugins/plugin_xen.c | 138 - tools/lib/traceevent/tep_strerror.c | 53 - tools/lib/traceevent/trace-seq.c | 249 - tools/lib/traceevent/trace-seq.h | 55 - tools/perf/MANIFEST | 1 - 70 files changed, 19876 deletions(-) commit 378ef0f5d9d7f4652d7a40e0711e8b845ada1cbd Author: Ian Rogers Date: Mon Dec 5 14:59:39 2022 -0800 perf build: Use libtraceevent from the system Remove the LIBTRACEEVENT_DYNAMIC and LIBTRACEFS_DYNAMIC make command line variables. If libtraceevent isn't installed or NO_LIBTRACEEVENT=1 is passed to the build, don't compile in libtraceevent and libtracefs support. This also disables CONFIG_TRACE that controls "perf trace". CONFIG_LIBTRACEEVENT is used to control enablement in Build/Makefiles, HAVE_LIBTRACEEVENT is used in C code. Without HAVE_LIBTRACEEVENT tracepoints are disabled and as such the commands kmem, kwork, lock, sched and timechart are removed. The majority of commands continue to work including "perf test". Committer notes: Fixed up a tools/perf/util/Build reject and added: #include to tools/perf/util/scripting-engines/trace-event-perl.c. Committer testing: $ rpm -qi libtraceevent-devel Name : libtraceevent-devel Version : 1.5.3 Release : 2.fc36 Architecture: x86_64 Install Date: Mon 25 Jul 2022 03:20:19 PM -03 Group : Unspecified Size : 27728 License : LGPLv2+ and GPLv2+ Signature : RSA/SHA256, Fri 15 Apr 2022 02:11:58 PM -03, Key ID 999f7cbf38ab71f4 Source RPM : libtraceevent-1.5.3-2.fc36.src.rpm Build Date : Fri 15 Apr 2022 10:57:01 AM -03 Build Host : buildvm-x86-05.iad2.fedoraproject.org Packager : Fedora Project Vendor : Fedora Project URL : https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ Bug URL : https://bugz.fedoraproject.org/libtraceevent Summary : Development headers of libtraceevent Description : Development headers of libtraceevent-libs $ Default build: $ ldd ~/bin/perf | grep tracee libtraceevent.so.1 => /lib64/libtraceevent.so.1 (0x00007f1dcaf8f000) $ # perf trace -e sched:* --max-events 10 0.000 migration/0/17 sched:sched_migrate_task(comm: "", pid: 1603763 (perf), prio: 120, dest_cpu: 1) 0.005 migration/0/17 sched:sched_wake_idle_without_ipi(cpu: 1) 0.011 migration/0/17 sched:sched_switch(prev_comm: "", prev_pid: 17 (migration/0), prev_state: 1, next_comm: "", next_prio: 120) 1.173 :0/0 sched:sched_wakeup(comm: "", pid: 3138 (gnome-terminal-), prio: 120) 1.180 :0/0 sched:sched_switch(prev_comm: "", prev_prio: 120, next_comm: "", next_pid: 3138 (gnome-terminal-), next_prio: 120) 0.156 migration/1/21 sched:sched_migrate_task(comm: "", pid: 1603763 (perf), prio: 120, orig_cpu: 1, dest_cpu: 2) 0.160 migration/1/21 sched:sched_wake_idle_without_ipi(cpu: 2) 0.166 migration/1/21 sched:sched_switch(prev_comm: "", prev_pid: 21 (migration/1), prev_state: 1, next_comm: "", next_prio: 120) 1.183 :0/0 sched:sched_wakeup(comm: "", pid: 1602985 (kworker/u16:0-f), prio: 120, target_cpu: 1) 1.186 :0/0 sched:sched_switch(prev_comm: "", prev_prio: 120, next_comm: "", next_pid: 1602985 (kworker/u16:0-f), next_prio: 120) # Had to tweak tools/perf/util/setup.py to make sure the python binding shared object links with libtraceevent if -DHAVE_LIBTRACEEVENT is present in CFLAGS. Building with NO_LIBTRACEEVENT=1 uncovered some more build failures: - Make building of data-convert-bt.c to CONFIG_LIBTRACEEVENT=y - perf-$(CONFIG_LIBTRACEEVENT) += scripts/ - bpf_kwork.o needs also to be dependent on CONFIG_LIBTRACEEVENT=y - The python binding needed some fixups and util/trace-event.c can't be built and linked with the python binding shared object, so remove it in tools/perf/util/setup.py and exclude it from the list of dependencies in the python/perf.so Makefile.perf target. Building without libtraceevent-devel installed uncovered more build failures: - The python binding tools/perf/util/python.c was assuming that traceevent/parse-events.h was always available, which was the case when we defaulted to using the in-kernel tools/lib/traceevent/ files, now we need to enclose it under ifdef HAVE_LIBTRACEEVENT, just like the other parts of it that deal with tracepoints. - We have to ifdef the rules in the Build files with CONFIG_LIBTRACEEVENT=y to build builtin-trace.c and tools/perf/trace/beauty/ as we only ifdef setting CONFIG_TRACE=y when setting NO_LIBTRACEEVENT=1 in the make command line, not when we don't detect libtraceevent-devel installed in the system. Simplification here to avoid these two ways of disabling builtin-trace.c and not having CONFIG_TRACE=y when libtraceevent-devel isn't installed is the clean way. From Athira: tools/perf/arch/powerpc/util/Build -perf-y += kvm-stat.o +perf-$(CONFIG_LIBTRACEEVENT) += kvm-stat.o Then, ditto for arm64 and s390, detected by container cross build tests. - s/390 uses test__checkevent_tracepoint() that is now only available if HAVE_LIBTRACEEVENT is defined, enclose the callsite with ifder HAVE_LIBTRACEEVENT. Also from Athira: With this change, I could successfully compile in these environment: - Without libtraceevent-devel installed - With libtraceevent-devel installed - With “make NO_LIBTRACEEVENT=1” Then, finally rename CONFIG_TRACEEVENT to CONFIG_LIBTRACEEVENT for consistency with other libraries detected in tools/perf/. Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Tested-by: Athira Rajeev Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221205225940.3079667-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Build | 20 ++-- tools/perf/Makefile.config | 37 ++++---- tools/perf/Makefile.perf | 104 ++------------------- tools/perf/arch/arm64/util/Build | 2 +- tools/perf/arch/powerpc/util/Build | 2 +- tools/perf/arch/s390/util/Build | 2 +- tools/perf/arch/x86/util/Build | 2 +- tools/perf/arch/x86/util/intel-pt.c | 4 + tools/perf/builtin-annotate.c | 2 + tools/perf/builtin-data.c | 5 +- tools/perf/builtin-inject.c | 8 ++ tools/perf/builtin-kmem.c | 1 + tools/perf/builtin-kvm.c | 12 +-- tools/perf/builtin-kwork.c | 1 + tools/perf/builtin-record.c | 2 + tools/perf/builtin-report.c | 9 +- tools/perf/builtin-script.c | 19 +++- tools/perf/builtin-timechart.c | 1 + tools/perf/builtin-trace.c | 5 +- tools/perf/builtin-version.c | 1 + tools/perf/perf.c | 24 +++-- tools/perf/scripts/python/Perf-Trace-Util/Build | 2 +- tools/perf/tests/Build | 12 +-- tools/perf/tests/builtin-test.c | 6 ++ tools/perf/tests/parse-events.c | 23 ++++- tools/perf/util/Build | 21 +++-- tools/perf/util/data-convert-bt.c | 5 +- tools/perf/util/data-convert-json.c | 9 +- tools/perf/util/evlist.c | 6 +- tools/perf/util/evlist.h | 4 + tools/perf/util/evsel.c | 11 ++- tools/perf/util/evsel.h | 12 ++- tools/perf/util/evsel_fprintf.c | 7 +- tools/perf/util/header.c | 19 ++++ tools/perf/util/header.h | 2 + tools/perf/util/intel-pt.c | 7 +- tools/perf/util/parse-events.c | 15 +++ tools/perf/util/parse-events.h | 1 - tools/perf/util/python.c | 10 ++ tools/perf/util/scripting-engines/Build | 6 +- .../perf/util/scripting-engines/trace-event-perl.c | 1 + .../util/scripting-engines/trace-event-python.c | 1 + tools/perf/util/session.c | 2 + tools/perf/util/session.h | 2 + tools/perf/util/setup.py | 10 +- tools/perf/util/sort.c | 60 ++++++++++-- tools/perf/util/synthetic-events.c | 6 ++ tools/perf/util/trace-event-parse.c | 2 + tools/perf/util/trace-event-read.c | 1 + tools/perf/util/trace-event-scripting.c | 1 + tools/perf/util/trace-event.c | 1 - tools/perf/util/trace-event.h | 11 ++- 52 files changed, 355 insertions(+), 184 deletions(-) commit 40769665b63d8c84b5b1c63fee404d4c20cff751 Author: Ian Rogers Date: Tue Dec 6 21:59:08 2022 -0800 perf jevents: Parse metrics during conversion Currently the 'MetricExpr' json value is passed from the json file to the pmu-events.c. This change introduces an expression tree that is parsed into. The parsing is done largely by using operator overloading and python's 'eval' function. Two advantages in doing this are: 1) Broken metrics fail at compile time rather than relying on `perf test` to detect. `perf test` remains relevant for checking event encoding and actual metric use. 2) The conversion to a string from the tree can minimize the metric's string size, for example, preferring 1e6 over 1000000, avoiding multiplication by 1 and removing unnecessary whitespace. On x86 this reduces the string size by 2,930bytes (0.07%). In future changes it would be possible to programmatically generate the json expressions (a single line of text and so a pain to write manually) for an architecture using the expression tree. This could avoid copy-pasting metrics for all architecture variants. v4. Doesn't simplify "0*SLOTS" to 0, as the pattern is used to fix Intel metrics with topdown events. v3. Avoids generic types on standard types like set that aren't supported until Python 3.9, fixing an issue with Python 3.6 reported-by John Garry. v3 also fixes minor pylint issues and adds a call to Simplify on the read expression tree. v2. Improvements to type information. Committer notes: Added one-line fixer from Ian, see first Link: tag below. Signed-off-by: Ian Rogers Reviewed-by: John Garry Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Sumanth Korikkar Cc: Thomas Richter Link: https://lore.kernel.org/r/CAP-5=fWa=zNK_ecpWGoGggHCQx7z-oW0eGMQf19Maywg0QK=4g@mail.gmail.com Link: https://lore.kernel.org/r/20221207055908.1385448-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/Build | 2 +- tools/perf/pmu-events/jevents.py | 12 +- tools/perf/pmu-events/metric.py | 502 +++++++++++++++++++++++++++++++++++ tools/perf/pmu-events/metric_test.py | 157 +++++++++++ 4 files changed, 669 insertions(+), 4 deletions(-) commit b897613510890d6e92b6a276a20f6c3d96fe90e8 Author: Namhyung Kim Date: Tue Dec 6 09:58:04 2022 -0800 perf stat: Update event skip condition for system-wide per-thread mode and merged uncore and hybrid events In print_counter_aggrdata(), it skips some events that has no aggregate count. It's actually for system-wide per-thread mode and merged uncore and hybrid events. Let's update the condition to check them explicitly. Fixes: 91f85f98da7ab8c3 ("perf stat: Display event stats using aggr counts") Reported-by: Athira Jajeev Signed-off-by: Namhyung Kim Acked-by: Athira Jajeev Cc: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221206175804.391387-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 616aa32d6f221faa0235d2586ec1706dca70a439 Author: Ian Rogers Date: Mon Dec 5 14:59:38 2022 -0800 perf build: Fixes for LIBTRACEEVENT_DYNAMIC If LIBTRACEEVENT_DYNAMIC is enabled then avoid the install step for the plugins. If disabled correct DESTDIR so that the plugins are installed under /traceevent/plugins. Fixes: ef019df01e207971 ("perf build: Install libtraceevent locally when building") Reported-by: Alexander Gordeev Signed-off-by: Ian Rogers Cc: Alexander Gordeev Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20221205225940.3079667-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit cc2367eebb0c3c5501cddd5823e5feda7b57f706 Author: Arnaldo Carvalho de Melo Date: Tue Dec 6 13:49:04 2022 -0300 machine: Adopt is_lock_function() from builtin-lock.c It is used in bpf_lock_contention.c and builtin-lock.c will be made CONFIG_LIBTRACEEVENT=y conditional, so move it to machine.c, that is always available. This makes those 4 global variables for sched and lock text start and end to move to 'struct machine' too, as conceivably we can have that info for several machine instances, say some 'perf diff' like tool. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/ Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 58 ++--------------------------------- tools/perf/util/bpf_lock_contention.c | 2 +- tools/perf/util/lock-contention.h | 2 -- tools/perf/util/machine.c | 40 ++++++++++++++++++++++++ tools/perf/util/machine.h | 5 +++ 5 files changed, 48 insertions(+), 59 deletions(-) commit 9d9b22bedad13d96b34fe005ef44b4523c4eb786 Author: Ravi Bangoria Date: Tue Dec 6 10:02:37 2022 +0530 perf test: Add event group test for events in multiple PMUs Multiple events in a group can belong to one or more PMUs, however there are some limitations. One of the limitations is that perf doesn't allow creating a group of events from different hw PMUs. Write a simple test to create various combinations of hw, sw and uncore PMU events and verify group creation succeeds or fails as expected. Signed-off-by: Ravi Bangoria Acked-by: Ian Rogers Acked-by: Kan Liang Acked-by: Madhavan Srinivasan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Athira Jajeev Cc: Carsten Haitzler Cc: Jiri Olsa Cc: Kajol Jain Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Thomas Richter Link: https://lore.kernel.org/r/20221206043237.12159-3-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/event_groups.c | 127 ++++++++++++++++++++++++++++++++++++++++ tools/perf/tests/tests.h | 1 + 4 files changed, 130 insertions(+) commit 336b92da1aa4228a664f27972f61e6186f369e79 Author: Ravi Bangoria Date: Tue Dec 6 10:02:36 2022 +0530 perf tool: Move pmus list variable to a new file The 'pmus' list variable is defined as static variable under pmu.c file. Introduce a new pmus.c file and migrate this variable to it. Also make it non static so that it can be accessed from outside. Suggested-by: Ian Rogers Signed-off-by: Ravi Bangoria Acked-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Athira Jajeev Cc: Jiri Olsa Cc: Kajol Jain Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Thomas Richter Cc: carsten.haitzler@arm.com Link: https://lore.kernel.org/r/20221206043237.12159-2-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/Build | 1 + tools/perf/util/pmu.c | 2 +- tools/perf/util/pmus.c | 5 +++++ tools/perf/util/pmus.h | 9 +++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) commit 5b7a29fb0b7d67e5d40cd6557e073afb6a7466ab Author: Ian Rogers Date: Tue Nov 29 22:29:33 2022 -0800 perf util: Add host_is_bigendian to util.h Avoid libtraceevent dependency for tep_is_bigendian or trace-event.h dependency for bigendian. Add a new host_is_bigendian to util.h, using the compiler defined __BYTE_ORDER__ when available. Committer notes: Added: #else /* !__BYTE_ORDER__ */ On that nested #ifdef block, as per Namhyung's suggestion. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20221130062935.2219247-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/code-reading.c | 4 ++-- tools/perf/tests/sample-parsing.c | 4 ++-- tools/perf/util/evsel.c | 5 +---- tools/perf/util/trace-event-info.c | 14 +++----------- tools/perf/util/trace-event-read.c | 3 ++- tools/perf/util/trace-event.h | 2 -- tools/perf/util/util.h | 19 +++++++++++++++++++ 7 files changed, 29 insertions(+), 22 deletions(-) commit fce9a619145181ca6a41253f7de3df56b1e4ad59 Author: Ian Rogers Date: Tue Nov 29 22:29:32 2022 -0800 perf util: Make header guard consistent with tool Remove git reference by changing GIT_COMPAT_UTIL_H to __PERF_UTIL_H. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20221130062935.2219247-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3f81f72d30b46efb614d93f430684c0deb8439b7 Author: James Clark Date: Wed Nov 30 11:15:21 2022 +0000 perf stat: Fix invalid output handle In this context, 'os' is already a pointer so the extra dereference isn't required. This fixes the following test failure on aarch64: $ ./perf test "json output" -vvv 92: perf stat JSON output linter : --- start --- Checking json output: no args Test failed for input: ... Fatal error: glibc detected an invalid stdio handle ---- end ---- perf stat JSON output linter: FAILED! Fixes: e7f4da312259e618 ("perf stat: Pass struct outstate to printout()") Signed-off-by: James Clark Tested-by: Athira Jajeev Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221130111521.334152-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 117195d9f8af74c65bf57d9b56f496b5b3655bcb Author: Namhyung Kim Date: Fri Dec 2 11:04:47 2022 -0800 perf stat: Fix multi-line metric output in JSON When a metric produces more than one values, it missed to print the opening bracket. Fixes: ab6baaae27357290 ("perf stat: Fix JSON output in metric-only mode") Reported-by: Weilin Wang Signed-off-by: Namhyung Kim Tested-by: Weilin Wang Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221202190447.1588680-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 113bb3964297467baeb1fd2c4f86d0a4142e4259 Author: Ian Rogers Date: Thu Dec 1 20:57:42 2022 -0800 tools lib symbol: Add dependency test to install_headers Compute the headers to be installed from their source headers and make each have its own build target to install it. Using dependencies avoids headers being reinstalled and getting a new timestamp which then causes files that depend on the header to be rebuilt. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Mark Rutland Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tom Rix Cc: bpf@vger.kernel.org Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20221202045743.2639466-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/symbol/Makefile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 5d890591db6bed8ca69bd4bfe0cdaca372973033 Author: Ian Rogers Date: Thu Dec 1 20:57:41 2022 -0800 tools lib subcmd: Add dependency test to install_headers Compute the headers to be installed from their source headers and make each have its own build target to install it. Using dependencies avoids headers being reinstalled and getting a new timestamp which then causes files that depend on the header to be rebuilt. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Mark Rutland Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tom Rix Cc: bpf@vger.kernel.org Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20221202045743.2639466-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/subcmd/Makefile | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 47e02b94a4c98dcc8072e56efaae5057174050fa Author: Ian Rogers Date: Thu Dec 1 20:57:40 2022 -0800 tools lib perf: Add dependency test to install_headers Compute the headers to be installed from their source headers and make each have its own build target to install it. Using dependencies avoids headers being reinstalled and getting a new timestamp which then causes files that depend on the header to be rebuilt. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Mark Rutland Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tom Rix Cc: bpf@vger.kernel.org Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20221202045743.2639466-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/Makefile | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit 1849f9f00926c54fa284be3b7f801de8b010572b Author: Ian Rogers Date: Thu Dec 1 20:57:39 2022 -0800 tools lib api: Add dependency test to install_headers Compute the headers to be installed from their source headers and make each have its own build target to install it. Using dependencies avoids headers being reinstalled and getting a new timestamp which then causes files that depend on the header to be rebuilt. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Mark Rutland Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tom Rix Cc: bpf@vger.kernel.org Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20221202045743.2639466-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/Makefile | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) commit 8f4b1e3cebce5d12048409393de751e4d663ce42 Author: Athira Rajeev Date: Mon Dec 5 09:58:52 2022 +0530 perf stat: Fix printing field separator in CSV metrics output In 'perf stat' with CSV output option, number of fields in metrics output is not matching with number of fields in other event output lines. Sample output below after applying patch to fix printing os->prefix. # ./perf stat -x, --per-socket -a -C 1 ls S0,1,82.11,msec,cpu-clock,82111626,100.00,1.000,CPUs utilized S0,1,2,,context-switches,82109314,100.00,24.358,/sec ------ ====> S0,1,,,,,,,1.71,stalled cycles per insn The above command line uses field separator as "," via "-x," option and per-socket option displays socket value as first field. But here the last line for "stalled cycles per insn" has more separators. Each csv output line is expected to have 8 field separators (for the 9 fields), where as last line has 9 "," in the result. Patch fixes this issue. The counter stats are displayed by function "perf_stat__print_shadow_stats" in code "util/stat-shadow.c". While printing the stats info for "stalled cycles per insn", function "new_line_csv" is used as new_line callback. The fields printed in each line contains: "Socket_id,aggr nr,Avg,unit,event_name,run,enable_percent,ratio,unit" The metric output prints Socket_id, aggr nr, ratio and unit. It has to skip through remaining five fields ie, Avg,unit,event_name,run,enable_percent. The csv line callback uses "os->nfields" to know the number of fields to skip to match with other lines. Currently it is set as: os.nfields = 3 + aggr_fields[config->aggr_mode] + (counter->cgrp ? 1 : 0); But in case of aggregation modes, csv_sep already gets printed along with each field (Function "aggr_printout" in util/stat-display.c). So aggr_fields can be removed from nfields. And fixed number of fields to skip has to be "4". This is to skip fields for: "avg, unit, event name, run, enable_percent" This needs 4 csv separators. Patch removes aggr_fields and uses 4 as fixed number of os->nfields to skip. After the patch: # ./perf stat -x, --per-socket -a -C 1 ls S0,1,79.08,msec,cpu-clock,79085956,100.00,1.000,CPUs utilized S0,1,7,,context-switches,79084176,100.00,88.514,/sec ------ ====> S0,1,,,,,,0.81,stalled cycles per insn Fixes: 92a61f6412d3a09d ("perf stat: Implement CSV metrics output") Reported-by: Disha Goel Reviewed-by: Kajol Jain 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: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nageswara R Sastry Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20221205042852.83382-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 955f6def5590ce6ca11a1c1ced0d2d1c95421059 Author: Anshuman Khandual Date: Mon Dec 5 12:14:43 2022 +0530 perf record: Add remaining branch filters: "no_cycles", "no_flags" & "hw_index" This adds all remaining branch filters i.e "no_cycles", "no_flags" and "hw_index". While here, also updates the documentation. Signed-off-by: Anshuman Khandual Cc: James Clark Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20221205064443.533587-1-anshuman.khandual@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 5 +++++ tools/perf/util/parse-branch-options.c | 3 +++ 2 files changed, 8 insertions(+) commit 3c97d25ceb75fd3e660ba9fcd4c630d0b057a5a2 Author: Ian Rogers Date: Mon Dec 5 09:34:04 2022 -0300 perf stat: Check existence of os->prefix, fixing a segfault We need to check if we have a OS prefix, otherwise we stumble on a metric segv that I'm now seeing in Arnaldo's tree: $ gdb --args perf stat -M Backend true ... Performance counter stats for 'true': 4,712,355 TOPDOWN.SLOTS # 17.3 % tma_core_bound Program received signal SIGSEGV, Segmentation fault. __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:77 77 ../sysdeps/x86_64/multiarch/strlen-evex.S: No such file or directory. (gdb) bt #0 __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:77 #1 0x00007ffff74749a5 in __GI__IO_fputs (str=0x0, fp=0x7ffff75f5680 <_IO_2_1_stderr_>) #2 0x0000555555779f28 in do_new_line_std (config=0x555555e077c0 , os=0x7fffffffbf10) at util/stat-display.c:356 #3 0x000055555577a081 in print_metric_std (config=0x555555e077c0 , ctx=0x7fffffffbf10, color=0x0, fmt=0x5555558b77b5 "%8.1f", unit=0x7fffffffbb10 "% tma_memory_bound", val=13.165355724442199) at util/stat-display.c:380 #4 0x00005555557768b6 in generic_metric (config=0x555555e077c0 , metric_expr=0x55555593d5b7 "((CYCLE_ACTIVITY.STALLS_MEM_ANY + EXE_ACTIVITY.BOUND_ON_STORES) / (CYCLE_ACTIVITY.STALLS_TOTAL + (EXE_ACTIVITY.1_PORTS_UTIL + tma_retiring * EXE_ACTIVITY.2_PORTS_UTIL) + EXE_ACTIVITY.BOUND_ON_STORES))"..., metric_events=0x555555f334e0, metric_refs=0x555555ec81d0, name=0x555555f32e80 "TOPDOWN.SLOTS", metric_name=0x555555f26c80 "tma_memory_bound", metric_unit=0x55555593d5b1 "100%", runtime=0, map_idx=0, out=0x7fffffffbd90, st=0x555555e9e620 ) at util/stat-shadow.c:934 #5 0x0000555555778cac in perf_stat__print_shadow_stats (config=0x555555e077c0 , evsel=0x555555f289d0, avg=4712355, map_idx=0, out=0x7fffffffbd90, metric_events=0x555555e078e8 , st=0x555555e9e620 ) at util/stat-shadow.c:1329 #6 0x000055555577b6a0 in printout (config=0x555555e077c0 , os=0x7fffffffbf10, uval=4712355, run=325322, ena=325322, noise=4712355, map_idx=0) at util/stat-display.c:741 #7 0x000055555577bc74 in print_counter_aggrdata (config=0x555555e077c0 , counter=0x555555f289d0, s=0, os=0x7fffffffbf10) at util/stat-display.c:838 #8 0x000055555577c1d8 in print_counter (config=0x555555e077c0 , counter=0x555555f289d0, os=0x7fffffffbf10) at util/stat-display.c:957 #9 0x000055555577dba0 in evlist__print_counters (evlist=0x555555ec3610, config=0x555555e077c0 , _target=0x555555e01c80 , ts=0x0, argc=1, argv=0x7fffffffe450) at util/stat-display.c:1413 #10 0x00005555555fc821 in print_counters (ts=0x0, argc=1, argv=0x7fffffffe450) at builtin-stat.c:1040 #11 0x000055555560091a in cmd_stat (argc=1, argv=0x7fffffffe450) at builtin-stat.c:2665 #12 0x00005555556b1eea in run_builtin (p=0x555555e11f70 , argc=4, argv=0x7fffffffe450) at perf.c:322 #13 0x00005555556b2181 in handle_internal_command (argc=4, argv=0x7fffffffe450) at perf.c:376 #14 0x00005555556b22d7 in run_argv (argcp=0x7fffffffe27c, argv=0x7fffffffe270) at perf.c:420 #15 0x00005555556b26ef in main (argc=4, argv=0x7fffffffe450) at perf.c:550 (gdb) Fixes: f123b2d84ecec9a3 ("perf stat: Remove prefix argument in print_metric_headers()") Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/CAP-5=fUOjSM5HajU9TCD6prY39LbX4OQbkEbtKPPGRBPBN=_VQ@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fb9f5ee9bf5cf7ebc8731a7033e57d98832dc650 Author: Steven Rostedt (Google) Date: Tue Dec 13 17:24:29 2022 -0500 tracing: Do not synchronize freeing of trigger filter on boot up If a trigger filter on the kernel command line fails to apply (due to syntax error), it will be freed. The freeing will call tracepoint_synchronize_unregister(), but this is not needed during early boot up, and will even trigger a lockdep splat. Avoid calling the synchronization function when system_state is SYSTEM_BOOTING. Link: https://lore.kernel.org/linux-trace-kernel/20221213172429.7774f4ba@gandalf.local.home Cc: Andrew Morton Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_trigger.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 904f309ae7edaadc9fd0ee04be8281d7781d97e4 Author: Srinivas Pandruvada Date: Tue Dec 13 18:06:51 2022 -0800 thermal: intel: Don't set HFI status bit to 1 When CPU doesn't support HFI (Hardware Feedback Interface), don't include BIT 26 in the mask to prevent clearing. otherwise this results in: unchecked MSR access error: WRMSR to 0x1b1 (tried to write 0x0000000004000aa8) at rIP: 0xffffffff8b8559fe (throttle_active_work+0xbe/0x1b0) Fixes: 6fe1e64b6026 ("thermal: intel: Prevent accidental clearing of HFI status") Reported-by: Linus Torvalds Tested-by: Linus Torvalds Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/therm_throt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0debed5b117d11e33cba52870c4dcb64f5911891 Author: ChiYuan Huang Date: Wed Dec 14 09:37:11 2022 +0800 regulator: core: Fix resolve supply lookup issue From Marek's log, the previous change modify the parent of rdev. https://lore.kernel.org/all/58b92e75-f373-dae7-7031-8abd465bb874@samsung.com/ In 'regulator_resolve_supply', it uses the parent DT node of rdev as the DT-lookup starting node. But the parent DT node may not exist. This will cause the NULL supply issue. This patch modify the parent of rdev back to the device that provides from 'regulator_config' in 'regulator_register'. Fixes: 8f3cbcd6b440 ("regulator: core: Use different devices for resource allocation and DT lookup") Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1670981831-12583-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01258b62c62710297dab4e2b72f46e01be392cc6 Author: Lukas Bulwahn Date: Fri Dec 9 10:59:37 2022 +0100 wifi: ti: remove obsolete lines in the Makefile Commit 06463f6e98df ("wifi: wl1251: drop support for platform data") removes TI WiLink platform data, but leaves some dead lines in the Makefile. Remove these obsolete lines in the Makefile. Signed-off-by: Lukas Bulwahn Reviewed-by: Dmitry Torokhov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221209095937.17773-1-lukas.bulwahn@gmail.com drivers/net/wireless/ti/Makefile | 3 --- 1 file changed, 3 deletions(-) commit 11e47bbd700f31bd1ee9f8863381bc9e741c0e97 Author: Bartosz Golaszewski Date: Mon Dec 12 14:07:48 2022 +0100 gpio: sim: set a limit on the number of GPIOs With the removal of ARCH_NR_GPIOS in commit 7b61212f2a07 ("gpiolib: Get rid of ARCH_NR_GPIOS") the gpiolib core no longer sanitizes the number of GPIOs for us. This causes the gpio-sim selftests to now fail when setting the number of GPIOs to 99999 and expecting the probe() to fail. Set a sane limit of 1024 on the number of simulated GPIOs and bail out of probe if it's exceeded. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202212112236.756f5db9-oliver.sang@intel.com Fixes: 7b61212f2a07 ("gpiolib: Get rid of ARCH_NR_GPIOS") Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-sim.c | 4 ++++ 1 file changed, 4 insertions(+) commit 19331e84c3873256537d446afec1f6c507f8c4ef Author: Nathan Chancellor Date: Tue Dec 13 11:35:29 2022 -0700 modpost: Include '.text.*' in TEXT_SECTIONS Commit 6c730bfc894f ("modpost: handle -ffunction-sections") added ".text.*" to the OTHER_TEXT_SECTIONS macro to fix certain section mismatch warnings. Unfortunately, this makes it impossible for modpost to warn about section mismatches with LTO, which implies '-ffunction-sections', as all functions are put in their own '.text.' sections, which may still reference functions in sections they are not supposed to, such as __init. Fix this by moving ".text.*" into TEXT_SECTIONS, so that configurations with '-ffunction-sections' will see warnings about mismatched sections. Link: https://lore.kernel.org/Y39kI3MOtVI5BAnV@google.com/ Reported-by: Vincent Donnefort Reviewed-and-tested-by: Alexander Lobakin Reviewed-by: Sami Tolvanen Tested-by: Vincent Donnefort Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada scripts/mod/modpost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d24f1b7cc65ee73ea8d04e0d10f77a7cb7a83f3 Author: Nathan Chancellor Date: Tue Dec 13 11:35:28 2022 -0700 padata: Mark padata_work_init() as __ref When building arm64 allmodconfig + ThinLTO with clang and a proposed modpost update to account for -ffuncton-sections, the following warning appears: WARNING: modpost: vmlinux.o: section mismatch in reference: padata_work_init (section: .text.padata_work_init) -> padata_mt_helper (section: .init.text) WARNING: modpost: vmlinux.o: section mismatch in reference: padata_work_init (section: .text.padata_work_init) -> padata_mt_helper (section: .init.text) LLVM has optimized padata_work_init() to include the address of padata_mt_helper() directly because it inlined the other call to padata_work_init() with padata_parallel_worker(), meaning the remaining uses of padata_work_init() use padata_mt_helper() as the work_fn argument. This optimization causes modpost to complain since padata_work_init() is not __init, whereas padata_mt_helper() is. Since padata_work_init() is only called from __init code when padata_mt_helper() is passed as the work_fn argument, mark padata_work_init() as __ref, which makes it clear to modpost that this scenario is okay. Suggested-by: Daniel Jordan Signed-off-by: Nathan Chancellor Acked-by: Daniel Jordan Signed-off-by: Masahiro Yamada kernel/padata.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 87d599fc3955e59b1ed30f350321a4be5353f945 Author: Masahiro Yamada Date: Tue Dec 13 20:24:20 2022 +0900 kbuild: ensure Make >= 3.82 is used Documentation/process/changes.rst notes the minimal GNU Make version, but it is not checked anywhere. We could check $(MAKE_VERSION), but another simple way is to check $(.FEATURES) since the feature list always grows. GNU Make 3.81 expands $(.FEATURES) to: target-specific order-only second-expansion else-if archives jobserver check-symlink GNU Make 3.82 expands $(.FEATURES) to: target-specific order-only second-expansion else-if shortest-stem undefine archives jobserver check-symlink To ensure Make >= 3.82, you can check either 'shortest-stem' or 'undefine'. This way is not always possible. For example, Make 4.0 through 4.2 have the same set of $(.FEATURES). At that point, we will need to come up with a different approach. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Reviewed-by: Nicolas Schier Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit 3d57e1b7b1d42d4040f0d993b66ff06beda02c54 Author: Masahiro Yamada Date: Sun Dec 11 22:04:08 2022 +0900 kbuild: refactor the prerequisites of the modpost rule The prerequisites of modpost are cluttered. The variables *-if-present and *-if-needed are unreadable. It is cleaner to append them into modpost-deps. Signed-off-by: Masahiro Yamada scripts/Makefile.modpost | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) commit f65a486821cfd363833079b2a7b0769250ee21c9 Author: Masahiro Yamada Date: Sun Dec 11 22:04:07 2022 +0900 kbuild: change module.order to list *.o instead of *.ko scripts/Makefile.build replaces the suffix .o with .ko, then scripts/Makefile.modpost calls the sed command to change .ko back to the original .o suffix. Instead of converting the suffixes back-and-forth, store the .o paths in modules.order, and replace it with .ko in 'make modules_install'. This avoids the unneeded sed command. Signed-off-by: Masahiro Yamada Reviewed-by: Luis Chamberlain Makefile | 2 +- scripts/Makefile.build | 2 +- scripts/Makefile.modfinal | 6 +++--- scripts/Makefile.modinst | 2 +- scripts/Makefile.modpost | 7 +++++-- scripts/clang-tools/gen_compile_commands.py | 8 ++++---- scripts/gen_autoksyms.sh | 2 +- scripts/mod/modpost.c | 11 ++++------- scripts/modules-check.sh | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) commit d74f4a3f6d88a2416564bc6bf937e423a4ae8f8e Author: Yang Li Date: Wed Dec 14 10:39:11 2022 +0800 cifs: Remove duplicated include in cifsglob.h ./fs/cifs/cifsglob.h: linux/scatterlist.h is included more than once. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3459 Fixes: f7f291e14dde ("cifs: fix oops during encryption") Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Steve French fs/cifs/cifsglob.h | 1 - 1 file changed, 1 deletion(-) commit 7ae9888d6e1ce4062d27367a28e46a26270a3e52 Merge: 2d4ee16d969c f9645abe4255 Author: Jakub Kicinski Date: Tue Dec 13 19:32:52 2022 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net 1) Fix NAT IPv6 flowtable hardware offload, from Qingfang DENG. 2) Add a safety check to IPVS socket option interface report a warning if unsupported command is seen, this. From Li Qiong. 3) Document SCTP conntrack timeouts, from Sriram Yagnaraman. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: conntrack: document sctp timeouts ipvs: add a 'default' case in do_ip_vs_set_ctl() netfilter: flowtable: really fix NAT IPv6 offload ==================== Link: https://lore.kernel.org/r/20221213140923.154594-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 2d4ee16d969c97996e80e4c9cb6de0acaff22c9f Author: Jiri Slaby (SUSE) Date: Tue Dec 13 15:52:08 2022 -0700 wireguard: timers: cast enum limits members to int in prints Since gcc13, each member of an enum has the same type as the enum. And that is inherited from its members. Provided "REKEY_AFTER_MESSAGES = 1ULL << 60", the named type is unsigned long. This generates warnings with gcc-13: error: format '%d' expects argument of type 'int', but argument 6 has type 'long unsigned int' Cast those particular enum members to int when printing them. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36113 Cc: Martin Liska Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Jason A. Donenfeld Link: https://lore.kernel.org/all/20221213225208.3343692-2-Jason@zx2c4.com/ Signed-off-by: Jakub Kicinski drivers/net/wireguard/timers.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e2ca6ba6ba0152361aa4fcbf6067db71b2c7a770 Merge: 7e68dd7d07a2 c45bc55a9995 Author: Linus Torvalds Date: Tue Dec 13 19:29:45 2022 -0800 Merge tag 'mm-stable-2022-12-13' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull MM updates from Andrew Morton: - More userfaultfs work from Peter Xu - Several convert-to-folios series from Sidhartha Kumar and Huang Ying - Some filemap cleanups from Vishal Moola - David Hildenbrand added the ability to selftest anon memory COW handling - Some cpuset simplifications from Liu Shixin - Addition of vmalloc tracing support by Uladzislau Rezki - Some pagecache folioifications and simplifications from Matthew Wilcox - A pagemap cleanup from Kefeng Wang: we have VM_ACCESS_FLAGS, so use it - Miguel Ojeda contributed some cleanups for our use of the __no_sanitize_thread__ gcc keyword. This series should have been in the non-MM tree, my bad - Naoya Horiguchi improved the interaction between memory poisoning and memory section removal for huge pages - DAMON cleanups and tuneups from SeongJae Park - Tony Luck fixed the handling of COW faults against poisoned pages - Peter Xu utilized the PTE marker code for handling swapin errors - Hugh Dickins reworked compound page mapcount handling, simplifying it and making it more efficient - Removal of the autonuma savedwrite infrastructure from Nadav Amit and David Hildenbrand - zram support for multiple compression streams from Sergey Senozhatsky - David Hildenbrand reworked the GUP code's R/O long-term pinning so that drivers no longer need to use the FOLL_FORCE workaround which didn't work very well anyway - Mel Gorman altered the page allocator so that local IRQs can remnain enabled during per-cpu page allocations - Vishal Moola removed the try_to_release_page() wrapper - Stefan Roesch added some per-BDI sysfs tunables which are used to prevent network block devices from dirtying excessive amounts of pagecache - David Hildenbrand did some cleanup and repair work on KSM COW breaking - Nhat Pham and Johannes Weiner have implemented writeback in zswap's zsmalloc backend - Brian Foster has fixed a longstanding corner-case oddity in file[map]_write_and_wait_range() - sparse-vmemmap changes for MIPS, LoongArch and NIOS2 from Feiyang Chen - Shiyang Ruan has done some work on fsdax, to make its reflink mode work better under xfstests. Better, but still not perfect - Christoph Hellwig has removed the .writepage() method from several filesystems. They only need .writepages() - Yosry Ahmed wrote a series which fixes the memcg reclaim target beancounting - David Hildenbrand has fixed some of our MM selftests for 32-bit machines - Many singleton patches, as usual * tag 'mm-stable-2022-12-13' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (313 commits) mm/hugetlb: set head flag before setting compound_order in __prep_compound_gigantic_folio mm: mmu_gather: allow more than one batch of delayed rmaps mm: fix typo in struct pglist_data code comment kmsan: fix memcpy tests mm: add cond_resched() in swapin_walk_pmd_entry() mm: do not show fs mm pc for VM_LOCKONFAULT pages selftests/vm: ksm_functional_tests: fixes for 32bit selftests/vm: cow: fix compile warning on 32bit selftests/vm: madv_populate: fix missing MADV_POPULATE_(READ|WRITE) definitions mm/gup_test: fix PIN_LONGTERM_TEST_READ with highmem mm,thp,rmap: fix races between updates of subpages_mapcount mm: memcg: fix swapcached stat accounting mm: add nodes= arg to memory.reclaim mm: disable top-tier fallback to reclaim on proactive reclaim selftests: cgroup: make sure reclaim target memcg is unprotected selftests: cgroup: refactor proactive reclaim code to reclaim_until() mm: memcg: fix stale protection of reclaim target memcg mm/mmap: properly unaccount memory on mas_preallocate() failure omfs: remove ->writepage jfs: remove ->writepage ... commit de5dc44370fbd6b46bd7f1a1e00369be54a041c8 Author: Tony Nguyen Date: Mon Dec 12 11:00:31 2022 -0800 igb: Initialize mailbox message for VF reset When a MAC address is not assigned to the VF, that portion of the message sent to the VF is not set. The memory, however, is allocated from the stack meaning that information may be leaked to the VM. Initialize the message buffer to 0 so that no information is passed to the VM in this case. Fixes: 6ddbc4cf1f4d ("igb: Indicate failure on vf reset for empty mac address") Reported-by: Akihiko Odaki Signed-off-by: Tony Nguyen Reviewed-by: Akihiko Odaki Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20221212190031.3983342-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9ad498696325c6b437e49450661cf2c349e24f5 Merge: da2b5b434204 1232946cf522 Author: Jakub Kicinski Date: Tue Dec 13 19:24:53 2022 -0800 Merge branch 'misdn-don-t-call-dev_kfree_skb-kfree_skb-under-spin_lock_irqsave' Yang Yingliang says: ==================== mISDN: don't call dev_kfree_skb/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. This pachset try to avoid calling dev_kfree_skb/kfree_skb()() under spin_lock_irqsave(). ==================== Link: https://lore.kernel.org/r/20221212084139.3277913-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski commit 1232946cf522b8de9e398828bde325d7c41f29dd Author: Yang Yingliang Date: Mon Dec 12 16:41:39 2022 +0800 mISDN: hfcmulti: don't call dev_kfree_skb/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. skb_queue_purge() is called under spin_lock_irqsave() in handle_dmsg() and hfcm_l1callback(), kfree_skb() is called in them, to fix this, use skb_queue_splice_init() to move the dch->squeue to a free queue, also enqueue the tx_skb and rx_skb, at last calling __skb_queue_purge() to free the SKBs afer unlock. Fixes: af69fb3a8ffa ("Add mISDN HFC multiport driver") Signed-off-by: Yang Yingliang Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski drivers/isdn/hardware/mISDN/hfcmulti.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit f0f596bd75a9d573ca9b587abb39cee0b916bb82 Author: Yang Yingliang Date: Mon Dec 12 16:41:38 2022 +0800 mISDN: hfcpci: don't call dev_kfree_skb/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. skb_queue_purge() is called under spin_lock_irqsave() in hfcpci_l2l1D(), kfree_skb() is called in it, to fix this, use skb_queue_splice_init() to move the dch->squeue to a free queue, also enqueue the tx_skb and rx_skb, at last calling __skb_queue_purge() to free the SKBs afer unlock. Fixes: 1700fe1a10dc ("Add mISDN HFC PCI driver") Signed-off-by: Yang Yingliang Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski drivers/isdn/hardware/mISDN/hfcpci.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit ddc9648db162eee556edd5222d2808fe33730203 Author: Yang Yingliang Date: Mon Dec 12 16:41:37 2022 +0800 mISDN: hfcsusb: don't call dev_kfree_skb/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. skb_queue_purge() is called under spin_lock_irqsave() in hfcusb_l2l1D(), kfree_skb() is called in it, to fix this, use skb_queue_splice_init() to move the dch->squeue to a free queue, also enqueue the tx_skb and rx_skb, at last calling __skb_queue_purge() to free the SKBs afer unlock. In tx_iso_complete(), dev_kfree_skb() is called to consume the transmitted SKB, so replace it with dev_consume_skb_irq(). Fixes: 69f52adb2d53 ("mISDN: Add HFC USB driver") Signed-off-by: Yang Yingliang Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski drivers/isdn/hardware/mISDN/hfcsusb.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit da2b5b43420456beef5d5e1b43582e579ed08ef1 Merge: f3b4a00f0f62 42a8d4aaea84 Author: Jakub Kicinski Date: Tue Dec 13 19:20:03 2022 -0800 Merge branch 'bonding-fix-high-prio-not-effect-issue' Hangbin Liu says: ==================== Bonding: fix high prio not effect issue When a high prio link up, if there has current link, it will not do failover as we missed the check in link up event. Fix it in this patchset and add a prio option test case. ==================== Link: https://lore.kernel.org/all/20221212035647.1053865-1-liuhangbin@gmail.com/ Signed-off-by: Jakub Kicinski commit 42a8d4aaea8414f60eb2ed2d92df89a6e2db4615 Author: Liang Li Date: Mon Dec 12 11:56:47 2022 +0800 selftests: bonding: add bonding prio option test Add a test for bonding prio option. Here is the test result: ]# ./option_prio.sh TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=arp_ip_target and primary_reselect=0) [ OK ] TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=arp_ip_target and primary_reselect=1) [ OK ] TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=arp_ip_target and primary_reselect=2) [ OK ] TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=miimon and primary_reselect=0) [ OK ] TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=miimon and primary_reselect=1) [ OK ] TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=miimon and primary_reselect=2) [ OK ] TEST: prio_test (Test bonding option 'prio' with mode=5 monitor=miimon and primary_reselect=0) [ OK ] TEST: prio_test (Test bonding option 'prio' with mode=5 monitor=miimon and primary_reselect=1) [ OK ] TEST: prio_test (Test bonding option 'prio' with mode=5 monitor=miimon and primary_reselect=2) [ OK ] TEST: prio_test (Test bonding option 'prio' with mode=6 monitor=miimon and primary_reselect=0) [ OK ] TEST: prio_test (Test bonding option 'prio' with mode=6 monitor=miimon and primary_reselect=1) [ OK ] TEST: prio_test (Test bonding option 'prio' with mode=6 monitor=miimon and primary_reselect=2) [ OK ] Signed-off-by: Liang Li Signed-off-by: Hangbin Liu Signed-off-by: Jakub Kicinski .../testing/selftests/drivers/net/bonding/Makefile | 3 +- .../selftests/drivers/net/bonding/option_prio.sh | 245 +++++++++++++++++++++ 2 files changed, 247 insertions(+), 1 deletion(-) commit e95cc44763a41d5c715ef16742bcb1d8e6524a62 Author: Hangbin Liu Date: Mon Dec 12 11:56:46 2022 +0800 bonding: do failover when high prio link up Currently, when a high prio link enslaved, or when current link down, the high prio port could be selected. But when high prio link up, the new active slave reselection is not triggered. Fix it by checking link's prio when getting up. Making the do_failover after looping all slaves as there may be multi high prio slaves up. Reported-by: Liang Li Fixes: 0a2ff7cc8ad4 ("Bonding: add per-port priority for failover re-selection") Signed-off-by: Hangbin Liu Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_main.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 3d0b738fc5adf9f380702ac1424672e4b32c3781 Author: Hangbin Liu Date: Mon Dec 12 11:56:45 2022 +0800 bonding: add missed __rcu annotation for curr_active_slave There is one direct accesses to bond->curr_active_slave in bond_miimon_commit(). Protected it by rcu_access_pointer() since the later of this function also use this one. Signed-off-by: Hangbin Liu Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a5665fc8d7a000671ebd3fe69c6f9acf1e0dcd9 Author: Peter Wang Date: Thu Dec 8 15:25:20 2022 +0800 scsi: ufs: core: WLUN suspend SSU/enter hibern8 fail recovery When SSU/enter hibern8 fail in WLUN suspend flow, trigger the error handler and return busy to break the suspend. Otherwise the consumer will get stuck in runtime suspend status. Fixes: b294ff3e3449 ("scsi: ufs: core: Enable power management for wlun") Signed-off-by: Peter Wang Link: https://lore.kernel.org/r/20221208072520.26210-1-peter.wang@mediatek.com Reviewed-by: Stanley Chu Reviewed-by: Bart Van Assche Reviewed-by: Adrian Hunter Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit c411a42fb91f452509c312e4dda713699a22a995 Author: John Garry Date: Tue Dec 13 14:21:22 2022 +0000 scsi: scsi_debug: Delete unreachable code in inquiry_vpd_b0() The 2nd return statement in inquiry_vpd_b0() is unreachable, so delete it. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20221213142122.1011886-1-john.g.garry@oracle.com Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 2 -- 1 file changed, 2 deletions(-) commit f0a43ba6c66cc0688e2748d986a1459fdd3442ef Author: Shin'ichiro Kawasaki Date: Wed Dec 7 11:36:59 2022 +0900 scsi: mpi3mr: Refer CONFIG_SCSI_MPI3MR in Makefile When Kconfig item CONFIG_SCSI_MPI3MR was introduced for mpi3mr driver, the Makefile of the driver was not modified to refer the Kconfig item. As a result, mpi3mr.ko is built regardless of the Kconfig item value y or m. Also, if 'make localmodconfig' can not find the Kconfig item in the Makefile, then it does not generate CONFIG_SCSI_MPI3MR=m even when mpi3mr.ko is loaded on the system. Refer to the Kconfig item to avoid the issues. Fixes: c4f7ac64616e ("scsi: mpi3mr: Add mpi30 Rev-R headers and Kconfig") Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20221207023659.2411785-1-shinichiro.kawasaki@wdc.com Reviewed-by: Damien Le Moal Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen drivers/scsi/mpi3mr/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0b9025540ef57cc4464ab2fc64ed8ddc49b5658 Author: Hannes Reinecke Date: Tue Dec 6 14:13:45 2022 +0100 scsi: core: scsi_error: Do not queue pointless abort workqueue functions If a host template doesn't implement the .eh_abort_handler() there is no point in queueing the abort workqueue function; all it does is invoking SCSI EH anyway. So return 'FAILED' from scsi_abort_command() if the .eh_abort_handler() is not implemented and save us from having to wait for the abort workqueue function to complete. Cc: Niklas Cassel Cc: Damien Le Moal Cc: John Garry Signed-off-by: Hannes Reinecke [niklas: moved the check to the top of scsi_abort_command()] Signed-off-by: Niklas Cassel Link: https://lore.kernel.org/r/20221206131346.2045375-1-niklas.cassel@wdc.com Reviewed-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 5 +++++ 1 file changed, 5 insertions(+) commit f3b4a00f0f62da252c598310698dfc82ef2f2e2e Author: Emeel Hakim Date: Sun Dec 11 09:55:32 2022 +0200 net: macsec: fix net device access prior to holding a lock Currently macsec offload selection update routine accesses the net device prior to holding the relevant lock. Fix by holding the lock prior to the device access. Fixes: dcb780fb2795 ("net: macsec: add nla support for changing the offloading selection") Reviewed-by: Raed Salem Signed-off-by: Emeel Hakim Link: https://lore.kernel.org/r/20221211075532.28099-1-ehakim@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/macsec.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 67ff3d0a49f3d445c3922e30a54e03c161da561e Author: Michael Kelley Date: Sun Dec 4 11:52:44 2022 -0800 scsi: storvsc: Fix swiotlb bounce buffer leak in confidential VM storvsc_queuecommand() maps the scatter/gather list using scsi_dma_map(), which in a confidential VM allocates swiotlb bounce buffers. If the I/O submission fails in storvsc_do_io(), the I/O is typically retried by higher level code, but the bounce buffer memory is never freed. The mostly like cause of I/O submission failure is a full VMBus channel ring buffer, which is not uncommon under high I/O loads. Eventually enough bounce buffer memory leaks that the confidential VM can't do any I/O. The same problem can arise in a non-confidential VM with kernel boot parameter swiotlb=force. Fix this by doing scsi_dma_unmap() in the case of an I/O submission error, which frees the bounce buffer memory. Fixes: 743b237c3a7b ("scsi: storvsc: Add Isolation VM support for storvsc driver") Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1670183564-76254-1-git-send-email-mikelley@microsoft.com Tested-by: Dexuan Cui Reviewed-by: Dexuan Cui Reviewed-by: Tianyu Lan Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 3 +++ 1 file changed, 3 insertions(+) commit a3be19b91ea7121d388084e8c07f5b1b982eb40c Author: Wenchao Hao Date: Sat Nov 26 09:07:52 2022 +0800 scsi: iscsi: Fix multiple iSCSI session unbind events sent to userspace It was observed that the kernel would potentially send ISCSI_KEVENT_UNBIND_SESSION multiple times. Introduce 'target_state' in iscsi_cls_session() to make sure session will send only one unbind session event. This introduces a regression wrt. the issue fixed in commit 13e60d3ba287 ("scsi: iscsi: Report unbind session event when the target has been removed"). If iscsid dies for any reason after sending an unbind session to kernel, once iscsid is restarted, the kernel's ISCSI_KEVENT_UNBIND_SESSION event is lost and userspace is then unable to logout. However, the session is actually in invalid state (its target_id is INVALID) so iscsid should not sync this session during restart. Consequently we need to check the session's target state during iscsid restart. If session is in unbound state, do not sync this session and perform session teardown. This is OK because once a session is unbound, we can not recover it any more (mainly because its target id is INVALID). Signed-off-by: Wenchao Hao Link: https://lore.kernel.org/r/20221126010752.231917-1-haowenchao@huawei.com Reviewed-by: Mike Christie Reviewed-by: Wu Bo Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 50 +++++++++++++++++++++++++++++++++---- include/scsi/scsi_transport_iscsi.h | 9 +++++++ 2 files changed, 54 insertions(+), 5 deletions(-) commit 5535f4f70cfc15ef55b6ea7c7e17337b17337cb6 Author: Huacai Chen Date: Sat Dec 10 22:40:21 2022 +0800 LoongArch: Update Loongson-3 default config file 1, Enable suspend (ACPI S3) and hibernation (ACPI S4). 2, Enable some options for FDT-based systems (e.g., SERIAL_OF_PLATFORM). 3, Enable CONFIG_KALLSYMS_ALL and CONFIG_DEBUG_FS to convenient ftrace. 4, Regenerate the whole file to keep the order of options be the same as the latest source code. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/configs/loongson3_defconfig | 56 +++++++++++++++++------------- 1 file changed, 32 insertions(+), 24 deletions(-) commit 28ac0a9e04d7dfb42220dc9d221164d93f20fb3a Author: Qing Zhang Date: Sat Dec 10 22:40:21 2022 +0800 LoongArch: modules/ftrace: Initialize PLT at load time This patch implements ftrace trampolines through plt entry. Tested by forcing ftrace_make_call() to use the module PLT, and then loading up a module after setting up ftrace with: | echo ":mod:" > set_ftrace_filter; | echo function > current_tracer; | modprobe Since FTRACE_ADDR/FTRACE_REGS_ADDR is only defined when CONFIG_DYNAMIC_ FTRACE is selected, we wrap their usage in module_init_ftrace_plt() with ifdeffery rather than using IS_ENABLED(). Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/include/asm/ftrace.h | 4 ++ arch/loongarch/include/asm/inst.h | 3 ++ arch/loongarch/include/asm/module.h | 5 +- arch/loongarch/include/asm/module.lds.h | 1 + arch/loongarch/kernel/ftrace_dyn.c | 93 +++++++++++++++++++++++++++++++++ arch/loongarch/kernel/inst.c | 11 ++++ arch/loongarch/kernel/module-sections.c | 12 ++++- arch/loongarch/kernel/module.c | 21 ++++++++ 8 files changed, 148 insertions(+), 2 deletions(-) commit a51ac5246d2505b58229242959d2bc73d113ca50 Author: Qing Zhang Date: Sat Dec 10 22:40:21 2022 +0800 LoongArch/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support ftrace_graph_ret_addr() can be called by stack unwinding code to convert a found stack return address ('ret') to its original value, in case the function graph tracer has modified it to be 'return_to_handler'. If the hasn't been modified, the unchanged value of 'ret' is returned. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/include/asm/ftrace.h | 3 +++ arch/loongarch/include/asm/unwind.h | 1 + arch/loongarch/kernel/ftrace_dyn.c | 2 +- arch/loongarch/kernel/unwind_guess.c | 4 +++- arch/loongarch/kernel/unwind_prologue.c | 15 +++++++++++---- 5 files changed, 19 insertions(+), 6 deletions(-) commit ac7127e1cc65aeb578998c992a05dbc80fa18f0f Author: Qing Zhang Date: Sat Dec 10 22:40:16 2022 +0800 LoongArch/ftrace: Add HAVE_DYNAMIC_FTRACE_WITH_ARGS support Allow for arguments to be passed in to ftrace_regs by default. If this is set, then arguments and stack can be found from the pt_regs. 1. HAVE_DYNAMIC_FTRACE_WITH_ARGS don't need special hook for graph tracer entry point, but instead we can use graph_ops::func function to install the return_hooker. 2. Livepatch requires this option in the future. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 1 + arch/loongarch/include/asm/ftrace.h | 17 +++++++++++++++++ arch/loongarch/kernel/ftrace_dyn.c | 11 +++++++++++ 3 files changed, 29 insertions(+) commit 8778ba2c8a5df11859dc6f2b2205700388b63fd3 Author: Qing Zhang Date: Sat Dec 10 22:40:15 2022 +0800 LoongArch/ftrace: Add HAVE_DYNAMIC_FTRACE_WITH_REGS support This patch implements CONFIG_DYNAMIC_FTRACE_WITH_REGS on LoongArch, which allows a traced function's arguments (and some other registers) to be captured into a struct pt_regs, allowing these to be inspected and modified. Co-developed-by: Jinyang He Signed-off-by: Jinyang He Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 1 + arch/loongarch/include/asm/ftrace.h | 2 ++ arch/loongarch/kernel/ftrace_dyn.c | 15 +++++++++++++++ arch/loongarch/kernel/mcount_dyn.S | 35 +++++++++++++++++++++++++++++++++-- 4 files changed, 51 insertions(+), 2 deletions(-) commit 5fcfad3d41cc70f39fb31e7ee314989cc4c5f02c Author: Qing Zhang Date: Sat Dec 10 22:40:15 2022 +0800 LoongArch/ftrace: Add dynamic function graph tracer support Once the function_graph tracer is enabled, a filtered function has the following call sequence: 1) ftracer_caller ==> on/off by ftrace_make_call/ftrace_make_nop 2) ftrace_graph_caller 3) ftrace_graph_call ==> on/off by ftrace_en/disable_ftrace_graph_caller 4) prepare_ftrace_return Considering the following DYNAMIC_FTRACE_WITH_REGS feature, it would be more extendable to have a ftrace_graph_caller function, instead of calling prepare_ftrace_return directly in ftrace_caller. Co-developed-by: Jinyang He Signed-off-by: Jinyang He Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/kernel/ftrace_dyn.c | 44 ++++++++++++++++++++++++++++++++++++++ arch/loongarch/kernel/inst.c | 24 +++++++++++++++++++++ arch/loongarch/kernel/mcount_dyn.S | 33 ++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+) commit 4733f09d880745953b88c3358b49ad495aecd8e9 Author: Qing Zhang Date: Sat Dec 10 22:40:15 2022 +0800 LoongArch/ftrace: Add dynamic function tracer support The compiler has inserted 2 NOPs before the regular function prologue. T series registers are available and safe because of LoongArch's psABI. At runtime, we can replace nop with bl to enable ftrace call and replace bl with nop to disable ftrace call. The bl instruction requires us to save the original RA value, so it saves RA at t0 here. Details are: | Compiled | Disabled | Enabled | +------------+------------------------+------------------------+ | nop | move t0, ra | move t0, ra | | nop | nop | bl ftrace_caller | | func_body | func_body | func_body | The RA value will be recovered by ftrace_regs_entry, and restored into RA before returning to the regular function prologue. When a function is not being traced, the "move t0, ra" is not harmful. 1) ftrace_make_call, ftrace_make_nop (in kernel/ftrace.c) The two functions turn each recorded call site of filtered functions into a call to ftrace_caller or nops. 2) ftracce_update_ftrace_func (in kernel/ftrace.c) turns the nops at ftrace_call into a call to a generic entry for function tracers. 3) ftrace_caller (in kernel/mcount_dyn.S) The entry where each _mcount call sites calls to once they are filtered to be traced. Co-developed-by: Jinyang He Signed-off-by: Jinyang He Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 1 + arch/loongarch/Makefile | 5 ++ arch/loongarch/include/asm/ftrace.h | 21 ++++++ arch/loongarch/include/asm/inst.h | 11 ++++ arch/loongarch/include/asm/unwind.h | 2 +- arch/loongarch/kernel/Makefile | 15 +++-- arch/loongarch/kernel/ftrace_dyn.c | 110 ++++++++++++++++++++++++++++++++ arch/loongarch/kernel/inst.c | 92 ++++++++++++++++++++++++++ arch/loongarch/kernel/mcount_dyn.S | 85 ++++++++++++++++++++++++ arch/loongarch/kernel/unwind_prologue.c | 35 ++++++++-- 10 files changed, 367 insertions(+), 10 deletions(-) commit a0a458fbd6f2317832e2d74acdbfa2451c3f4b8f Author: Qing Zhang Date: Sat Dec 10 22:40:15 2022 +0800 LoongArch/ftrace: Add recordmcount support Recordmcount utility under scripts is run, after compiling each object, to find out all the locations of calling _mcount() and put them into specific seciton named __mcount_loc. Then the linker collects all such information into a table in the kernel image (between __start_mcount_loc and __stop_mcount_loc) for later use by ftrace. This patch adds LoongArch specific definitions to identify such locations. And on LoongArch, only the C version is used to build the kernel now that CONFIG_HAVE_C_RECORDMCOUNT is on. Acked-by: Steven Rostedt (Google) Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 2 ++ scripts/recordmcount.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) commit dbe3ba3018ec1fc53ea0d0adf0f687f5d438039d Author: Qing Zhang Date: Sat Dec 10 22:40:15 2022 +0800 LoongArch/ftrace: Add basic support This patch contains basic ftrace support for LoongArch. Specifically, function tracer (HAVE_FUNCTION_TRACER), function graph tracer (HAVE_ FUNCTION_GRAPH_TRACER) are implemented following the instructions in Documentation/trace/ftrace-design.txt. Use `-pg` makes stub like a child function `void _mcount(void *ra)`. Thus, it can be seen store RA and alloc stack before `call _mcount`. Find `alloc stack` at first, and then find `store RA`. Note that the functions in both inst.c and time.c should not be hooked with the compiler's -pg option: to prevent infinite self-referencing for the former, and to ignore early setup stuff for the latter. Co-developed-by: Jinyang He Signed-off-by: Jinyang He Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 2 + arch/loongarch/include/asm/ftrace.h | 21 ++++++++ arch/loongarch/kernel/Makefile | 8 ++++ arch/loongarch/kernel/ftrace.c | 73 ++++++++++++++++++++++++++++ arch/loongarch/kernel/mcount.S | 96 +++++++++++++++++++++++++++++++++++++ 5 files changed, 200 insertions(+) commit 9151dde40356880bb445f719f5ebbb1319054d5f Author: Huacai Chen Date: Sat Dec 10 22:40:15 2022 +0800 LoongArch: module: Use got/plt section indices for relocations Instead of saving a pointer to the .got, .plt and .plt_idx sections to apply {got,plt}-based relocations, save and use their section indices instead. The mod->arch.{core,init}.{got,plt} pointers were problematic for live- patch because they pointed within temporary section headers (provided by the module loader via info->sechdrs) that would be freed after module load. Since livepatch modules may need to apply relocations post-module- load (for example, to patch a module that is loaded later), using section indices to offset into the section headers (instead of accessing them through a saved pointer) allows livepatch modules on LoongArch to pass in their own copy of the section headers to apply_relocate_add() to apply delayed relocations. The method used is same as commit c8ebf64eab743 ("arm64/module: use plt section indices for relocations"). Signed-off-by: Hongchen Zhang Signed-off-by: Huacai Chen arch/loongarch/include/asm/module.h | 22 ++++++++------ arch/loongarch/kernel/module-sections.c | 54 ++++++++++++++++++--------------- arch/loongarch/kernel/module.c | 39 ++++++++++++++++-------- 3 files changed, 68 insertions(+), 47 deletions(-) commit 09f33601bf940f955c10a6e75a1c1b7bcadee5e2 Author: Huacai Chen Date: Sat Dec 10 22:40:15 2022 +0800 LoongArch: Add basic STACKPROTECTOR support Add basic stack protector support similar to other architectures. A constant canary value is set at boot time, and with help of compiler's -fstack-protector we can detect stack corruption. Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 1 + arch/loongarch/include/asm/stackprotector.h | 38 +++++++++++++++++++++++++++++ arch/loongarch/kernel/asm-offsets.c | 3 +++ arch/loongarch/kernel/process.c | 6 +++++ arch/loongarch/kernel/switch.S | 5 ++++ 5 files changed, 53 insertions(+) commit 7db54bfe44a662c8f2c10277bccfa02c2f4c719c Author: Huacai Chen Date: Sat Dec 10 22:40:15 2022 +0800 LoongArch: Add hibernation (ACPI S4) support Add hibernation (Suspend to Disk, aka ACPI S4) support for LoongArch. Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 3 ++ arch/loongarch/kernel/asm-offsets.c | 12 +++++++ arch/loongarch/kernel/reset.c | 5 +++ arch/loongarch/kernel/setup.c | 5 +++ arch/loongarch/power/Makefile | 1 + arch/loongarch/power/hibernate.c | 62 +++++++++++++++++++++++++++++++++ arch/loongarch/power/hibernate_asm.S | 66 ++++++++++++++++++++++++++++++++++++ 7 files changed, 154 insertions(+) commit 366bb35a8e48198cefcd3484ac6b2374d1347873 Author: Huacai Chen Date: Sat Dec 10 22:40:15 2022 +0800 LoongArch: Add suspend (ACPI S3) support Add suspend (Suspend To RAM, aka ACPI S3) support for LoongArch. Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 5 ++ arch/loongarch/Makefile | 3 ++ arch/loongarch/include/asm/acpi.h | 10 ++++ arch/loongarch/include/asm/bootinfo.h | 1 + arch/loongarch/include/asm/loongson.h | 3 ++ arch/loongarch/include/asm/time.h | 1 + arch/loongarch/kernel/acpi.c | 6 +++ arch/loongarch/kernel/smp.c | 1 + arch/loongarch/kernel/time.c | 11 +++-- arch/loongarch/power/Makefile | 3 ++ arch/loongarch/power/platform.c | 57 ++++++++++++++++++++++ arch/loongarch/power/suspend.c | 73 ++++++++++++++++++++++++++++ arch/loongarch/power/suspend_asm.S | 89 +++++++++++++++++++++++++++++++++++ 13 files changed, 260 insertions(+), 3 deletions(-) commit 27cab431564edba9919d1a82c2d9636d622a2493 Author: Binbin Zhou Date: Sat Dec 10 22:40:05 2022 +0800 LoongArch: Add processing ISA Node in DeviceTree Similar to commit 6d0068ad15e4f771b3 ("MIPS: Loongson64: Process ISA Node in DeviceTree"), we process ISA node in DeviceTree for FDT-based systems. Previously, we are hardcoding reserved ISA I/O Space in, now we are processing it I/O via DeviceTree directly. The ranges property of ISA node is used to determine the size and address of reserved I/O space. Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen arch/loongarch/kernel/setup.c | 75 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 88d4d957edc707e037449ef71a58c6530a39d01e Author: Binbin Zhou Date: Sat Dec 10 22:40:05 2022 +0800 LoongArch: Add FDT booting support from efi system table Since commit 40cd01a9c324("efi/loongarch: libstub: remove dependency on flattened DT"), we can parse the FDT from efi system table. And now, LoongArch is coming to support booting with FDT, so we add the relevant booting support as well as parameter parsing. Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 2 ++ arch/loongarch/include/asm/efi.h | 1 + arch/loongarch/include/asm/setup.h | 1 + arch/loongarch/kernel/acpi.c | 11 +++++-- arch/loongarch/kernel/efi.c | 15 ++++++++- arch/loongarch/kernel/env.c | 2 ++ arch/loongarch/kernel/numa.c | 17 ++++++++++- arch/loongarch/kernel/setup.c | 62 +++++++++++++++++++++++++++++++++++++- arch/loongarch/kernel/smp.c | 34 +++++++++++++++++++++ arch/loongarch/pci/acpi.c | 7 +++-- 10 files changed, 145 insertions(+), 7 deletions(-) commit a275a82dcd4024c75337db15d59ed039c31e21da Author: Huacai Chen Date: Sat Dec 10 22:39:59 2022 +0800 LoongArch: Use alternative to optimize libraries Use the alternative to optimize common libraries according whether CPU has UAL (hardware unaligned access support) feature, including memset(), memcopy(), memmove(), copy_user() and clear_user(). We have tested UnixBench on a Loongson-3A5000 quad-core machine (1.6GHz): 1, One copy, before patch: System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 9566582.0 819.8 Double-Precision Whetstone 55.0 2805.3 510.1 Execl Throughput 43.0 2120.0 493.0 File Copy 1024 bufsize 2000 maxblocks 3960.0 209833.0 529.9 File Copy 256 bufsize 500 maxblocks 1655.0 89400.0 540.2 File Copy 4096 bufsize 8000 maxblocks 5800.0 320036.0 551.8 Pipe Throughput 12440.0 340624.0 273.8 Pipe-based Context Switching 4000.0 109939.1 274.8 Process Creation 126.0 4728.7 375.3 Shell Scripts (1 concurrent) 42.4 2223.1 524.3 Shell Scripts (8 concurrent) 6.0 883.1 1471.9 System Call Overhead 15000.0 518639.1 345.8 ======== System Benchmarks Index Score 500.2 2, One copy, after patch: System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 9567674.7 819.9 Double-Precision Whetstone 55.0 2805.5 510.1 Execl Throughput 43.0 2392.7 556.4 File Copy 1024 bufsize 2000 maxblocks 3960.0 417804.0 1055.1 File Copy 256 bufsize 500 maxblocks 1655.0 112909.5 682.2 File Copy 4096 bufsize 8000 maxblocks 5800.0 1255207.4 2164.2 Pipe Throughput 12440.0 555712.0 446.7 Pipe-based Context Switching 4000.0 99964.5 249.9 Process Creation 126.0 5192.5 412.1 Shell Scripts (1 concurrent) 42.4 2302.4 543.0 Shell Scripts (8 concurrent) 6.0 919.6 1532.6 System Call Overhead 15000.0 511159.3 340.8 ======== System Benchmarks Index Score 640.1 3, Four copies, before patch: System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 38268610.5 3279.2 Double-Precision Whetstone 55.0 11222.2 2040.4 Execl Throughput 43.0 7892.0 1835.3 File Copy 1024 bufsize 2000 maxblocks 3960.0 235149.6 593.8 File Copy 256 bufsize 500 maxblocks 1655.0 74959.6 452.9 File Copy 4096 bufsize 8000 maxblocks 5800.0 545048.5 939.7 Pipe Throughput 12440.0 1337359.0 1075.0 Pipe-based Context Switching 4000.0 473663.9 1184.2 Process Creation 126.0 17491.2 1388.2 Shell Scripts (1 concurrent) 42.4 6865.7 1619.3 Shell Scripts (8 concurrent) 6.0 1015.9 1693.1 System Call Overhead 15000.0 1899535.2 1266.4 ======== System Benchmarks Index Score 1278.3 4, Four copies, after patch: System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 38272815.5 3279.6 Double-Precision Whetstone 55.0 11222.8 2040.5 Execl Throughput 43.0 8839.2 2055.6 File Copy 1024 bufsize 2000 maxblocks 3960.0 313912.9 792.7 File Copy 256 bufsize 500 maxblocks 1655.0 80976.1 489.3 File Copy 4096 bufsize 8000 maxblocks 5800.0 1176594.3 2028.6 Pipe Throughput 12440.0 2100941.9 1688.9 Pipe-based Context Switching 4000.0 476696.4 1191.7 Process Creation 126.0 18394.7 1459.9 Shell Scripts (1 concurrent) 42.4 7172.2 1691.6 Shell Scripts (8 concurrent) 6.0 1058.3 1763.9 System Call Overhead 15000.0 1874714.7 1249.8 ======== System Benchmarks Index Score 1488.8 Signed-off-by: Jun Yi Signed-off-by: Huacai Chen arch/loongarch/include/asm/string.h | 5 ++ arch/loongarch/lib/Makefile | 3 +- arch/loongarch/lib/clear_user.S | 70 +++++++++++++++++++-- arch/loongarch/lib/copy_user.S | 91 +++++++++++++++++++++++++-- arch/loongarch/lib/memcpy.S | 95 ++++++++++++++++++++++++++++ arch/loongarch/lib/memmove.S | 121 ++++++++++++++++++++++++++++++++++++ arch/loongarch/lib/memset.S | 91 +++++++++++++++++++++++++++ 7 files changed, 465 insertions(+), 11 deletions(-) commit 19e5eb15b00c5841b4b9bd9777af2865a40d2f39 Author: Huacai Chen Date: Sat Dec 10 22:39:59 2022 +0800 LoongArch: Add alternative runtime patching mechanism Introduce the "alternative" mechanism from ARM64 and x86 for LoongArch to apply runtime patching. The main purpose of this patch is to provide a framework. In future we can use this mechanism (i.e., the ALTERNATIVE and ALTERNATIVE_2 macros) to optimize hotspot functions according to cpu features. Signed-off-by: Jun Yi Signed-off-by: Huacai Chen arch/loongarch/include/asm/alternative-asm.h | 82 +++++++++ arch/loongarch/include/asm/alternative.h | 111 ++++++++++++ arch/loongarch/include/asm/bugs.h | 15 ++ arch/loongarch/include/asm/inst.h | 18 ++ arch/loongarch/kernel/Makefile | 2 +- arch/loongarch/kernel/alternative.c | 246 +++++++++++++++++++++++++++ arch/loongarch/kernel/module.c | 15 ++ arch/loongarch/kernel/setup.c | 7 + arch/loongarch/kernel/vmlinux.lds.S | 12 ++ 9 files changed, 507 insertions(+), 1 deletion(-) commit 61a6fccc0bd2e8030b2672a52ef3f6706b2b2ee4 Author: Huacai Chen Date: Sat Dec 10 22:39:59 2022 +0800 LoongArch: Add unaligned access support Loongson-2 series (Loongson-2K500, Loongson-2K1000) don't support unaligned access in hardware, while Loongson-3 series (Loongson-3A5000, Loongson-3C5000) are configurable whether support unaligned access in hardware. This patch add unaligned access emulation for those LoongArch processors without hardware support. Signed-off-by: Huacai Chen Documentation/admin-guide/sysctl/kernel.rst | 8 +- arch/loongarch/Kconfig | 2 + arch/loongarch/include/asm/inst.h | 14 + arch/loongarch/include/asm/thread_info.h | 2 +- arch/loongarch/kernel/Makefile | 3 +- arch/loongarch/kernel/traps.c | 27 ++ arch/loongarch/kernel/unaligned.c | 499 ++++++++++++++++++++++++++++ arch/loongarch/lib/Makefile | 2 +- arch/loongarch/lib/unaligned.S | 84 +++++ 9 files changed, 634 insertions(+), 7 deletions(-) commit dbcd7f5fafea64dbe588c4ec18bc309fde5d1e1c Author: Youling Tang Date: Sat Dec 10 22:39:59 2022 +0800 LoongArch: BPF: Add BPF exception tables Inspired by commit 800834285361("bpf, arm64: Add BPF exception tables"), do similar to LoongArch to add BPF exception tables. When a tracing BPF program attempts to read memory without using the bpf_probe_read() helper, the verifier marks the load instruction with the BPF_PROBE_MEM flag. Since the LoongArch JIT does not currently recognize this flag it falls back to the interpreter. Add support for BPF_PROBE_MEM, by appending an exception table to the BPF program. If the load instruction causes a data abort, the fixup infrastructure finds the exception table and fixes up the fault, by clearing the destination register and jumping over the faulting instruction. To keep the compact exception table entry format, inspect the pc in fixup_exception(). A more generic solution would add a "handler" field to the table entry, like on x86, s390 and arm64, etc. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen arch/loongarch/include/asm/asm-extable.h | 1 + arch/loongarch/include/asm/extable.h | 10 ++++ arch/loongarch/mm/extable.c | 2 + arch/loongarch/net/bpf_jit.c | 86 ++++++++++++++++++++++++++++++-- arch/loongarch/net/bpf_jit.h | 2 + 5 files changed, 96 insertions(+), 5 deletions(-) commit 912bcfaf36771a2bf7a83799ce5454850d1c3f40 Author: Youling Tang Date: Sat Dec 10 22:39:59 2022 +0800 LoongArch: Remove the .fixup section usage Use the `.L_xxx` label to improve fixup code and then remove the .fixup section usage. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen arch/loongarch/lib/clear_user.S | 14 +++++--------- arch/loongarch/lib/copy_user.S | 16 ++++++---------- 2 files changed, 11 insertions(+), 19 deletions(-) commit 672999cfae3e830a64c4996362a26934fd555ff9 Author: Youling Tang Date: Sat Dec 10 22:39:59 2022 +0800 LoongArch: extable: Add a dedicated uaccess handler Inspired by commit 2e77a62cb3a6("arm64: extable: add a dedicated uaccess handler"), do similar to LoongArch to add a dedicated uaccess exception handler to update registers in exception context and subsequently return back into the function which faulted, so we remove the need for fixups specialized to each faulting instruction. Add gpr-num.h here because we need to map the same GPR names to integer constants, so that we can use this to build meta-data for the exception fixups. The compiler treats gpr 0 as zero rather than $r0, so set it separately to .L__gpr_num_zero, otherwise the following assembly error will occurs: {standard input}: Assembler messages: {standard input}:1074: Error: invalid operands (*UND* and *ABS* sections) for `<<' {standard input}:1160: Error: invalid operands (*UND* and *ABS* sections) for `<<' make[1]: *** [scripts/Makefile.build:249: fs/fcntl.o] Error 1 Signed-off-by: Youling Tang Signed-off-by: Huacai Chen arch/loongarch/include/asm/asm-extable.h | 22 ++++++++++++++++++++++ arch/loongarch/include/asm/futex.h | 22 ++++++---------------- arch/loongarch/include/asm/gpr-num.h | 22 ++++++++++++++++++++++ arch/loongarch/include/asm/uaccess.h | 17 ++++------------- arch/loongarch/mm/extable.c | 22 ++++++++++++++++++++++ 5 files changed, 76 insertions(+), 29 deletions(-) commit 26bc82441250f2e01621f5b26606a4f6926ee3ad Author: Youling Tang Date: Sat Dec 10 22:39:59 2022 +0800 LoongArch: extable: Add `type` and `data` fields This is a LoongArch port of commit d6e2cc564775 ("arm64: extable: add `type` and `data` fields"). Subsequent patches will add specialized handlers for fixups, in addition to the simple PC fixup we have today. In preparation, this patch adds a new `type` field to struct exception_table_entry, and uses this to distinguish the fixup and other cases. A `data` field is also added so that subsequent patches can associate data specific to each exception site (e.g. register numbers). Handlers are named ex_handler_*() for consistency, following the example of x86. At the same time, get_ex_fixup() is split out into a helper so that it can be used by other ex_handler_*() functions in the subsequent patches. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen arch/loongarch/include/asm/asm-extable.h | 15 +++++++++++---- arch/loongarch/include/asm/extable.h | 11 +++++++++++ arch/loongarch/kernel/vmlinux.lds.S | 3 +-- arch/loongarch/mm/extable.c | 7 ++++++- scripts/sorttable.c | 2 +- 5 files changed, 30 insertions(+), 8 deletions(-) commit 3d36f4298ba91fbdec6bc56aa7bb0663cba6ab0c Author: Youling Tang Date: Sat Dec 10 22:39:48 2022 +0800 LoongArch: Switch to relative exception tables Similar to other architectures such as arm64, x86, riscv and so on, use offsets relative to the exception table entry values rather than their absolute addresses for both the exception location and the fixup. However, LoongArch label difference because it will actually produce two relocations, a pair of R_LARCH_ADD32 and R_LARCH_SUB32. Take simple code below for example: $ cat test_ex_table.S .section .text 1: nop .section __ex_table,"a" .balign 4 .long (1b - .) .previous $ loongarch64-unknown-linux-gnu-gcc -c test_ex_table.S $ loongarch64-unknown-linux-gnu-readelf -Wr test_ex_table.o Relocation section '.rela__ex_table' at offset 0x100 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000000 0000000600000032 R_LARCH_ADD32 0000000000000000 .L1^B1 + 0 0000000000000000 0000000500000037 R_LARCH_SUB32 0000000000000000 L0^A + 0 The modpost will complain the R_LARCH_SUB32 relocation, so we need to patch modpost.c to skip this relocation for .rela__ex_table section. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen arch/loongarch/include/asm/asm-extable.h | 12 ++++++------ arch/loongarch/include/asm/extable.h | 26 ++++++++++++++++++++++++++ arch/loongarch/include/asm/uaccess.h | 2 +- arch/loongarch/mm/extable.c | 32 ++++++++++++++++++++++---------- scripts/mod/modpost.c | 13 +++++++++++++ scripts/sorttable.c | 2 +- 6 files changed, 69 insertions(+), 18 deletions(-) commit 508f28c67171e276356650f407dd87d42b6913ef Author: Youling Tang Date: Sat Dec 10 22:39:48 2022 +0800 LoongArch: Consolidate __ex_table construction Consolidate all the __ex_table constuction code with a _ASM_EXTABLE or _asm_extable helper. There should be no functional change as a result of this patch. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen arch/loongarch/include/asm/asm-extable.h | 35 ++++++++++++++++++++++++++++++++ arch/loongarch/include/asm/futex.h | 13 +++++------- arch/loongarch/include/asm/uaccess.h | 9 +++----- arch/loongarch/kernel/fpu.S | 5 ++--- arch/loongarch/lib/clear_user.S | 5 ++--- arch/loongarch/lib/copy_user.S | 5 ++--- 6 files changed, 49 insertions(+), 23 deletions(-) commit 70d822cfb782ebed5c41bdad9fa520b5ec1c6923 Merge: 4f2c0a4acffb 2aa14b1ab2c4 Author: Nick Terrell Date: Tue Dec 13 16:24:40 2022 -0800 Merge branch 'zstd-next' into zstd-linus commit 4f2c0a4acffbec01079c28f839422e64ddeff004 Merge: 88a309465b3f 830b3c68c1fb Author: Nick Terrell Date: Tue Dec 13 16:21:55 2022 -0800 Merge branch 'main' into zstd-linus commit 7e68dd7d07a28faa2e6574dd6b9dbd90cdeaae91 Merge: 1ca06f1c1ace 7c4a6309e27f Author: Linus Torvalds Date: Tue Dec 13 15:47:48 2022 -0800 Merge tag 'net-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Paolo Abeni: "Core: - Allow live renaming when an interface is up - Add retpoline wrappers for tc, improving considerably the performances of complex queue discipline configurations - Add inet drop monitor support - A few GRO performance improvements - Add infrastructure for atomic dev stats, addressing long standing data races - De-duplicate common code between OVS and conntrack offloading infrastructure - A bunch of UBSAN_BOUNDS/FORTIFY_SOURCE improvements - Netfilter: introduce packet parser for tunneled packets - Replace IPVS timer-based estimators with kthreads to scale up the workload with the number of available CPUs - Add the helper support for connection-tracking OVS offload BPF: - Support for user defined BPF objects: the use case is to allocate own objects, build own object hierarchies and use the building blocks to build own data structures flexibly, for example, linked lists in BPF - Make cgroup local storage available to non-cgroup attached BPF programs - Avoid unnecessary deadlock detection and failures wrt BPF task storage helpers - A relevant bunch of BPF verifier fixes and improvements - Veristat tool improvements to support custom filtering, sorting, and replay of results - Add LLVM disassembler as default library for dumping JITed code - Lots of new BPF documentation for various BPF maps - Add bpf_rcu_read_{,un}lock() support for sleepable programs - Add RCU grace period chaining to BPF to wait for the completion of access from both sleepable and non-sleepable BPF programs - Add support storing struct task_struct objects as kptrs in maps - Improve helper UAPI by explicitly defining BPF_FUNC_xxx integer values - Add libbpf *_opts API-variants for bpf_*_get_fd_by_id() functions Protocols: - TCP: implement Protective Load Balancing across switch links - TCP: allow dynamically disabling TCP-MD5 static key, reverting back to fast[er]-path - UDP: Introduce optional per-netns hash lookup table - IPv6: simplify and cleanup sockets disposal - Netlink: support different type policies for each generic netlink operation - MPTCP: add MSG_FASTOPEN and FastOpen listener side support - MPTCP: add netlink notification support for listener sockets events - SCTP: add VRF support, allowing sctp sockets binding to VRF devices - Add bridging MAC Authentication Bypass (MAB) support - Extensions for Ethernet VPN bridging implementation to better support multicast scenarios - More work for Wi-Fi 7 support, comprising conversion of all the existing drivers to internal TX queue usage - IPSec: introduce a new offload type (packet offload) allowing complete header processing and crypto offloading - IPSec: extended ack support for more descriptive XFRM error reporting - RXRPC: increase SACK table size and move processing into a per-local endpoint kernel thread, reducing considerably the required locking - IEEE 802154: synchronous send frame and extended filtering support, initial support for scanning available 15.4 networks - Tun: bump the link speed from 10Mbps to 10Gbps - Tun/VirtioNet: implement UDP segmentation offload support Driver API: - PHY/SFP: improve power level switching between standard level 1 and the higher power levels - New API for netdev <-> devlink_port linkage - PTP: convert existing drivers to new frequency adjustment implementation - DSA: add support for rx offloading - Autoload DSA tagging driver when dynamically changing protocol - Add new PCP and APPTRUST attributes to Data Center Bridging - Add configuration support for 800Gbps link speed - Add devlink port function attribute to enable/disable RoCE and migratable - Extend devlink-rate to support strict prioriry and weighted fair queuing - Add devlink support to directly reading from region memory - New device tree helper to fetch MAC address from nvmem - New big TCP helper to simplify temporary header stripping New hardware / drivers: - Ethernet: - Marvel Octeon CNF95N and CN10KB Ethernet Switches - Marvel Prestera AC5X Ethernet Switch - WangXun 10 Gigabit NIC - Motorcomm yt8521 Gigabit Ethernet - Microchip ksz9563 Gigabit Ethernet Switch - Microsoft Azure Network Adapter - Linux Automation 10Base-T1L adapter - PHY: - Aquantia AQR112 and AQR412 - Motorcomm YT8531S - PTP: - Orolia ART-CARD - WiFi: - MediaTek Wi-Fi 7 (802.11be) devices - RealTek rtw8821cu, rtw8822bu, rtw8822cu and rtw8723du USB devices - Bluetooth: - Broadcom BCM4377/4378/4387 Bluetooth chipsets - Realtek RTL8852BE and RTL8723DS - Cypress.CYW4373A0 WiFi + Bluetooth combo device Drivers: - CAN: - gs_usb: bus error reporting support - kvaser_usb: listen only and bus error reporting support - Ethernet NICs: - Intel (100G): - extend action skbedit to RX queue mapping - implement devlink-rate support - support direct read from memory - nVidia/Mellanox (mlx5): - SW steering improvements, increasing rules update rate - Support for enhanced events compression - extend H/W offload packet manipulation capabilities - implement IPSec packet offload mode - nVidia/Mellanox (mlx4): - better big TCP support - Netronome Ethernet NICs (nfp): - IPsec offload support - add support for multicast filter - Broadcom: - RSS and PTP support improvements - AMD/SolarFlare: - netlink extened ack improvements - add basic flower matches to offload, and related stats - Virtual NICs: - ibmvnic: introduce affinity hint support - small / embedded: - FreeScale fec: add initial XDP support - Marvel mv643xx_eth: support MII/GMII/RGMII modes for Kirkwood - TI am65-cpsw: add suspend/resume support - Mediatek MT7986: add RX wireless wthernet dispatch support - Realtek 8169: enable GRO software interrupt coalescing per default - Ethernet high-speed switches: - Microchip (sparx5): - add support for Sparx5 TC/flower H/W offload via VCAP - Mellanox mlxsw: - add 802.1X and MAC Authentication Bypass offload support - add ip6gre support - Embedded Ethernet switches: - Mediatek (mtk_eth_soc): - improve PCS implementation, add DSA untag support - enable flow offload support - Renesas: - add rswitch R-Car Gen4 gPTP support - Microchip (lan966x): - add full XDP support - add TC H/W offload via VCAP - enable PTP on bridge interfaces - Microchip (ksz8): - add MTU support for KSZ8 series - Qualcomm 802.11ax WiFi (ath11k): - support configuring channel dwell time during scan - MediaTek WiFi (mt76): - enable Wireless Ethernet Dispatch (WED) offload support - add ack signal support - enable coredump support - remain_on_channel support - Intel WiFi (iwlwifi): - enable Wi-Fi 7 Extremely High Throughput (EHT) PHY capabilities - 320 MHz channels support - RealTek WiFi (rtw89): - new dynamic header firmware format support - wake-over-WLAN support" * tag 'net-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2002 commits) ipvs: fix type warning in do_div() on 32 bit net: lan966x: Remove a useless test in lan966x_ptp_add_trap() net: ipa: add IPA v4.7 support dt-bindings: net: qcom,ipa: Add SM6350 compatible bnxt: Use generic HBH removal helper in tx path IPv6/GRO: generic helper to remove temporary HBH/jumbo header in driver selftests: forwarding: Add bridge MDB test selftests: forwarding: Rename bridge_mdb test bridge: mcast: Support replacement of MDB port group entries bridge: mcast: Allow user space to specify MDB entry routing protocol bridge: mcast: Allow user space to add (*, G) with a source list and filter mode bridge: mcast: Add support for (*, G) with a source list and filter mode bridge: mcast: Avoid arming group timer when (S, G) corresponds to a source bridge: mcast: Add a flag for user installed source entries bridge: mcast: Expose __br_multicast_del_group_src() bridge: mcast: Expose br_multicast_new_group_src() bridge: mcast: Add a centralized error path bridge: mcast: Place netlink policy before validation functions bridge: mcast: Split (*, G) and (S, G) addition into different functions bridge: mcast: Do not derive entry type from its filter mode ... commit 1ca06f1c1acecbe02124f14a37cce347b8c1a90c Merge: 4cb1fc6fffe4 8939c58d68f9 Author: Linus Torvalds Date: Tue Dec 13 15:25:08 2022 -0800 Merge tag 'xtensa-20221213' of https://github.com/jcmvbkbc/linux-xtensa Pull Xtensa updates from Max Filippov: - fix kernel build with gcc-13 - various minor fixes * tag 'xtensa-20221213' of https://github.com/jcmvbkbc/linux-xtensa: xtensa: add __umulsidi3 helper xtensa: update config files MAINTAINERS: update the 'T:' entry for xtensa commit 4cb1fc6fffe4910845e183d1a2dfe9509ba1062c Merge: 740afa4d3941 aaa4dd1b47f5 Author: Linus Torvalds Date: Tue Dec 13 15:22:14 2022 -0800 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - update unwinder to cope with module PLTs - enable UBSAN on ARM - improve kernel fault message - update UEFI runtime page tables dump - avoid clang's __aeabi_uldivmod generated in NWFPE code - disable FIQs on CPU shutdown paths - update XOR register usage - a number of build updates (using .arch, thread pointer, removal of lazy evaluation in Makefile) - conversion of stacktrace code to stackwalk - findbit assembly updates - hwcap feature updates for ARMv8 CPUs - instruction dump updates for big-endian platforms - support for function error injection * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (31 commits) ARM: 9279/1: support function error injection ARM: 9277/1: Make the dumped instructions are consistent with the disassembled ones ARM: 9276/1: Refactor dump_instr() ARM: 9275/1: Drop '-mthumb' from AFLAGS_ISA ARM: 9274/1: Add hwcap for Speculative Store Bypassing Safe ARM: 9273/1: Add hwcap for Speculation Barrier(SB) ARM: 9272/1: vfp: Add hwcap for FEAT_AA32I8MM ARM: 9271/1: vfp: Add hwcap for FEAT_AA32BF16 ARM: 9270/1: vfp: Add hwcap for FEAT_FHM ARM: 9269/1: vfp: Add hwcap for FEAT_DotProd ARM: 9268/1: vfp: Add hwcap FPHP and ASIMDHP for FEAT_FP16 ARM: 9267/1: Define Armv8 registers in AArch32 state ARM: findbit: add unwinder information ARM: findbit: operate by words ARM: findbit: convert to macros ARM: findbit: provide more efficient ARMv7 implementation ARM: findbit: document ARMv5 bit offset calculation ARM: 9259/1: stacktrace: Convert stacktrace to generic ARCH_STACKWALK ARM: 9258/1: stacktrace: Make stack walk callback consistent with generic code ARM: 9265/1: pass -march= only to compiler ... commit 740afa4d39414516c36836ad88bed8294c72ba5f Merge: 82c72902c50f 2874529b3513 Author: Linus Torvalds Date: Tue Dec 13 15:17:55 2022 -0800 Merge tag 'x86_sev_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 sev updates from Borislav Petkov: - Two minor fixes to the sev-guest driver * tag 'x86_sev_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: virt/sev-guest: Add a MODULE_ALIAS virt/sev-guest: Remove unnecessary free in init_crypto() commit 82c72902c50f8b5e28f59c2f2ec1c4ba20dbfa08 Merge: a70210f41566 00e8f7153bcd Author: Linus Torvalds Date: Tue Dec 13 15:09:40 2022 -0800 Merge tag 'x86_paravirt_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 paravirt update from Borislav Petkov: - Simplify paravirt patching machinery by removing the now unused clobber mask * tag 'x86_paravirt_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/paravirt: Remove clobber bitmask from .parainstructions commit a70210f41566131f88d31583f96e36cb7f5d2ad0 Merge: 3ef3ace4e2ec be1b670f6144 Author: Linus Torvalds Date: Tue Dec 13 15:05:29 2022 -0800 Merge tag 'x86_microcode_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode and IFS updates from Borislav Petkov: "The IFS (In-Field Scan) stuff goes through tip because the IFS driver uses the same structures and similar functionality as the microcode loader and it made sense to route it all through this branch so that there are no conflicts. - Add support for multiple testing sequences to the Intel In-Field Scan driver in order to be able to run multiple different test patterns. Rework things and remove the BROKEN dependency so that the driver can be enabled (Jithu Joseph) - Remove the subsys interface usage in the microcode loader because it is not really needed - A couple of smaller fixes and cleanups" * tag 'x86_microcode_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) x86/microcode/intel: Do not retry microcode reloading on the APs x86/microcode/intel: Do not print microcode revision and processor flags platform/x86/intel/ifs: Add missing kernel-doc entry Revert "platform/x86/intel/ifs: Mark as BROKEN" Documentation/ABI: Update IFS ABI doc platform/x86/intel/ifs: Add current_batch sysfs entry platform/x86/intel/ifs: Remove reload sysfs entry platform/x86/intel/ifs: Add metadata validation platform/x86/intel/ifs: Use generic microcode headers and functions platform/x86/intel/ifs: Add metadata support x86/microcode/intel: Use a reserved field for metasize x86/microcode/intel: Add hdr_type to intel_microcode_sanity_check() x86/microcode/intel: Reuse microcode_sanity_check() x86/microcode/intel: Use appropriate type in microcode_sanity_check() x86/microcode/intel: Reuse find_matching_signature() platform/x86/intel/ifs: Remove memory allocation from load path platform/x86/intel/ifs: Remove image loading during init platform/x86/intel/ifs: Return a more appropriate error code platform/x86/intel/ifs: Remove unused selection x86/microcode: Drop struct ucode_cpu_info.valid ... commit 3ef3ace4e2ecf4aa4c8ddff1d35683671a09b05e Merge: 4eb77fa102eb 7882b69eb6cd Author: Linus Torvalds Date: Tue Dec 13 14:56:56 2022 -0800 Merge tag 'x86_cpu_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu updates from Borislav Petkov: - Split MTRR and PAT init code to accomodate at least Xen PV and TDX guests which do not get MTRRs exposed but only PAT. (TDX guests do not support the cache disabling dance when setting up MTRRs so they fall under the same category) This is a cleanup work to remove all the ugly workarounds for such guests and init things separately (Juergen Gross) - Add two new Intel CPUs to the list of CPUs with "normal" Energy Performance Bias, leading to power savings - Do not do bus master arbitration in C3 (ARB_DISABLE) on modern Centaur CPUs * tag 'x86_cpu_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits) x86/mtrr: Make message for disabled MTRRs more descriptive x86/pat: Handle TDX guest PAT initialization x86/cpuid: Carve out all CPUID functionality x86/cpu: Switch to cpu_feature_enabled() for X86_FEATURE_XENPV x86/cpu: Remove X86_FEATURE_XENPV usage in setup_cpu_entry_area() x86/cpu: Drop 32-bit Xen PV guest code in update_task_stack() x86/cpu: Remove unneeded 64-bit dependency in arch_enter_from_user_mode() x86/cpufeatures: Add X86_FEATURE_XENPV to disabled-features.h x86/acpi/cstate: Optimize ARB_DISABLE on Centaur CPUs x86/mtrr: Simplify mtrr_ops initialization x86/cacheinfo: Switch cache_ap_init() to hotplug callback x86: Decouple PAT and MTRR handling x86/mtrr: Add a stop_machine() handler calling only cache_cpu_init() x86/mtrr: Let cache_aps_delayed_init replace mtrr_aps_delayed_init x86/mtrr: Get rid of __mtrr_enabled bool x86/mtrr: Simplify mtrr_bp_init() x86/mtrr: Remove set_all callback from struct mtrr_ops x86/mtrr: Disentangle MTRR init from PAT init x86/mtrr: Move cache control code to cacheinfo.c x86/mtrr: Split MTRR-specific handling from cache dis/enabling ... commit 4eb77fa102ebc2a48d61941fd0293b0aeed00fee Merge: 8b9ed79c2d58 60253f100c58 Author: Linus Torvalds Date: Tue Dec 13 14:45:29 2022 -0800 Merge tag 'x86_boot_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Borislav Petkov: "A of early boot cleanups and fixes. - Do some spring cleaning to the compressed boot code by moving the EFI mixed-mode code to a separate compilation unit, the AMD memory encryption early code where it belongs and fixing up build dependencies. Make the deprecated EFI handover protocol optional with the goal of removing it at some point (Ard Biesheuvel) - Skip realmode init code on Xen PV guests as it is not needed there - Remove an old 32-bit PIC code compiler workaround" * tag 'x86_boot_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Remove x86_32 PIC using %ebx workaround x86/boot: Skip realmode init code when running as Xen PV guest x86/efi: Make the deprecated EFI handover protocol optional x86/boot/compressed: Only build mem_encrypt.S if AMD_MEM_ENCRYPT=y x86/boot/compressed: Adhere to calling convention in get_sev_encryption_bit() x86/boot/compressed: Move startup32_check_sev_cbit() out of head_64.S x86/boot/compressed: Move startup32_check_sev_cbit() into .text x86/boot/compressed: Move startup32_load_idt() out of head_64.S x86/boot/compressed: Move startup32_load_idt() into .text section x86/boot/compressed: Pull global variable reference into startup32_load_idt() x86/boot/compressed: Avoid touching ECX in startup32_set_idt_entry() x86/boot/compressed: Simplify IDT/GDT preserve/restore in the EFI thunk x86/boot/compressed, efi: Merge multiple definitions of image_offset into one x86/boot/compressed: Move efi32_pe_entry() out of head_64.S x86/boot/compressed: Move efi32_entry out of head_64.S x86/boot/compressed: Move efi32_pe_entry into .text section x86/boot/compressed: Move bootargs parsing out of 32-bit startup code x86/boot/compressed: Move 32-bit entrypoint code into .text section x86/boot/compressed: Rename efi_thunk_64.S to efi-mixed.S commit 8b9ed79c2d587bec5f603d66801478a5af9af842 Merge: fc4c9f450493 bce5a1e8a340 Author: Linus Torvalds Date: Tue Dec 13 14:40:54 2022 -0800 Merge tag 'x86_asm_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Borislav Petkov: - Move the 32-bit memmove() asm implementation out-of-line in order to fix a 32-bit full LTO build failure with clang where it would fail at register allocation. Move it to an asm file and clean it up while at it, similar to what has been already done on 64-bit * tag 'x86_asm_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mem: Move memmove to out of line assembler commit fc4c9f450493daef1c996c9d4b3c647ec3121509 Merge: 717e6eb49bdd e8dfdf3162eb Author: Linus Torvalds Date: Tue Dec 13 14:31:47 2022 -0800 Merge tag 'efi-next-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI updates from Ard Biesheuvel: "Another fairly sizable pull request, by EFI subsystem standards. Most of the work was done by me, some of it in collaboration with the distro and bootloader folks (GRUB, systemd-boot), where the main focus has been on removing pointless per-arch differences in the way EFI boots a Linux kernel. - Refactor the zboot code so that it incorporates all the EFI stub logic, rather than calling the decompressed kernel as a EFI app. - Add support for initrd= command line option to x86 mixed mode. - Allow initrd= to be used with arbitrary EFI accessible file systems instead of just the one the kernel itself was loaded from. - Move some x86-only handling and manipulation of the EFI memory map into arch/x86, as it is not used anywhere else. - More flexible handling of any random seeds provided by the boot environment (i.e., systemd-boot) so that it becomes available much earlier during the boot. - Allow improved arch-agnostic EFI support in loaders, by setting a uniform baseline of supported features, and adding a generic magic number to the DOS/PE header. This should allow loaders such as GRUB or systemd-boot to reduce the amount of arch-specific handling substantially. - (arm64) Run EFI runtime services from a dedicated stack, and use it to recover from synchronous exceptions that might occur in the firmware code. - (arm64) Ensure that we don't allocate memory outside of the 48-bit addressable physical range. - Make EFI pstore record size configurable - Add support for decoding CXL specific CPER records" * tag 'efi-next-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: (43 commits) arm64: efi: Recover from synchronous exceptions occurring in firmware arm64: efi: Execute runtime services from a dedicated stack arm64: efi: Limit allocations to 48-bit addressable physical region efi: Put Linux specific magic number in the DOS header efi: libstub: Always enable initrd command line loader and bump version efi: stub: use random seed from EFI variable efi: vars: prohibit reading random seed variables efi: random: combine bootloader provided RNG seed with RNG protocol output efi/cper, cxl: Decode CXL Error Log efi/cper, cxl: Decode CXL Protocol Error Section efi: libstub: fix efi_load_initrd_dev_path() kernel-doc comment efi: x86: Move EFI runtime map sysfs code to arch/x86 efi: runtime-maps: Clarify purpose and enable by default for kexec efi: pstore: Add module parameter for setting the record size efi: xen: Set EFI_PARAVIRT for Xen dom0 boot on all architectures efi: memmap: Move manipulation routines into x86 arch tree efi: memmap: Move EFI fake memmap support into x86 arch tree efi: libstub: Undeprecate the command line initrd loader efi: libstub: Add mixed mode support to command line initrd loader efi: libstub: Permit mixed mode return types other than efi_status_t ... commit 717e6eb49bdd98357d14c90d60a3409196b33cfc Merge: 8fa37a68359d b6018af440a0 Author: Linus Torvalds Date: Tue Dec 13 14:22:50 2022 -0800 Merge tag 'integrity-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity updates from Mimi Zohar: "Aside from the one cleanup, the other changes are bug fixes: Cleanup: - Include missing iMac Pro 2017 in list of Macs with T2 security chip Bug fixes: - Improper instantiation of "encrypted" keys with user provided data - Not handling delay in updating LSM label based IMA policy rules (-ESTALE) - IMA and integrity memory leaks on error paths - CONFIG_IMA_DEFAULT_HASH_SM3 hash algorithm renamed" * tag 'integrity-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: ima: Fix hash dependency to correct algorithm ima: Fix misuse of dereference of pointer in template_desc_init_fields() integrity: Fix memory leakage in keyring allocation error path ima: Fix memory leak in __ima_inode_hash() ima: Handle -ESTALE returned by ima_filter_rule_match() ima: Simplify ima_lsm_copy_rule ima: Fix a potential NULL pointer access in ima_restore_measurement_list efi: Add iMac Pro 2017 to uefi skip cert quirk KEYS: encrypted: fix key instantiation with user-provided data commit 8fa37a68359d2d5dc16deeb5b09d64c9833c0674 Merge: 3ba2c3ff98ea 0dff89c4488f Author: Linus Torvalds Date: Tue Dec 13 14:16:44 2022 -0800 Merge tag 'sysctl-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull sysctl updates from Luis Chamberlain: "Only a small step forward on the sysctl cleanups for this cycle" * tag 'sysctl-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: sched: Move numa_balancing sysctls to its own file commit 47ea20762bb7875a62e10433a3cd5d34e9133f47 Author: Shikang Fan Date: Thu Dec 8 19:53:14 2022 +0800 drm/amdgpu: Add an extra evict_resource call during device_suspend. - evict_resource is taking too long causing sriov full access mode timeout. So, add an extra evict_resource in the beginning as an early evict. Signed-off-by: Shikang Fan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3ba2c3ff98ea8bfb219288dbacf2a23a902c751b Merge: 0015edd6f661 4f1354d5c6a3 Author: Linus Torvalds Date: Tue Dec 13 14:05:39 2022 -0800 Merge tag 'modules-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull modules updates from Luis Chamberlain: "Tux gets for xmas an improvement to the average lookup performance of kallsyms_lookup_name() by 715x thanks to the work by Zhen Lei, which upgraded our old implementation from being O(n) to O(log(n)), while also retaining the old implementation support on /proc/kallsyms. The only penalty was increasing the memory footprint by 3 * kallsyms_num_syms. Folks who want to improve this further now also have a dedicated selftest facility through KALLSYMS_SELFTEST. Stephen Boyd added zstd in-kernel decompression support, but the only users of this would be folks using the load-pin LSM because otherwise we do module decompression in userspace. The only other thing with mentioning is a minor boot time optimization by Rasmus Villemoes which deferes param_sysfs_init() to late init. The rest is cleanups and minor fixes" * tag 'modules-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: livepatch: Call klp_match_callback() in klp_find_callback() to avoid code duplication module/decompress: Support zstd in-kernel decompression kallsyms: Remove unneeded semicolon kallsyms: Add self-test facility livepatch: Use kallsyms_on_each_match_symbol() to improve performance kallsyms: Add helper kallsyms_on_each_match_symbol() kallsyms: Reduce the memory occupied by kallsyms_seqs_of_names[] kallsyms: Correctly sequence symbols when CONFIG_LTO_CLANG=y kallsyms: Improve the performance of kallsyms_lookup_name() scripts/kallsyms: rename build_initial_tok_table() module: Fix NULL vs IS_ERR checking for module_get_next_page kernel/params.c: defer most of param_sysfs_init() to late_initcall time module: Remove unused macros module_addr_min/max module: remove redundant module_sysfs_initialized variable commit 0015edd6f66172f93aa720192020138ca13ba0a6 Merge: 71946a25f357 0e2c9884cbba Author: Linus Torvalds Date: Tue Dec 13 13:46:07 2022 -0800 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk driver updates from Stephen Boyd: "A pile of clk driver updates with a small tracepoint patch to the clk core this time around. The core framework is effectively unchanged, with the majority of the diff going to the Qualcomm clk driver directory because they added two 3k line files that are almost all clk data (Abel Vesa from Linaro tried to shrink the number of lines down, but it doesn't seem to be possible without sacrificing readability). The second big driver this time around is the Rockchip rk3588 clk and reset unit, at _only_ 2.5k lines. Ignoring the big clk drivers from the familiar SoC vendors, there's just a bunch of little clk driver updates and fixes throughout here. It's the usual set of clk data fixups to describe proper parents, or add frequencies to frequency tables, or plug memory leaks when function calls fail. Also, some drivers are converted to use modern clk_hw APIs, which is always nice to see. And data is deduplicated, leading to a smaller kernel Image. Overall this batch has a larger collection of cleanups than it typically does. Maybe that means there are less new SoCs right now that need supporting, and the focus has shifted to quality and reliability. I can dream. New Drivers: - Frequency hopping controller hardware on MediaTek MT8186 - Global clock controller for Qualcomm SM8550 - Display clock controller for Qualcomm SC8280XP - RPMh clock controller for Qualcomm QDU1000 and QRU1000 SoCs - CPU PLL on MStar/SigmaStar SoCs - Support for the clock and reset unit of the Rockchip rk3588 Updates: - Tracepoints for clk_rate_request structures - Debugfs support for fractional divider clk - Make MxL's CGU driver secure compatible - Ingenic JZ4755 SoC clk support - Support audio clks on X1000 SoCs - Remove flags from univ/main/syspll child fixed factor clocks across MediaTek platforms - Fix clock dependency for ADC on MediaTek MT7986 - Fix parent for FlexSPI clock for i.MX93 - Add USB suspend clock on i.MX8MP - Unmap anatop base on error for i.MX93 driver - Change enet clock parent to wakeup_axi_root for i.MX93 - Drop LPIT1, LPIT2, TPM1 and TPM3 clocks for i.MX93 - Mark HSIO bus clock and SYS_CNT clock as critical on i.MX93 - Add 320MHz and 640MHz entries to PLL146x - Add audio shared gate and SAI clocks for i.MX8MP - Fix a possible memory leak in the error path of rockchip PLL creation - Fix header guard for V3S clocks - Add IR module clock for f1c100s - Correct the parent clocks for the (High Speed) Serial Communication Interfaces with FIFO ((H)SCIF) modules and the mixed-up Ethernet Switch clocks on Renesas R-Car S4-8 - Add timer (TMU, CMT) and Cortex-A76 CPU core (Z0) clocks on Renesas R-Car V4H - Two PLL driver fixups for the Amlogic clk driver - Round SD clock rate to improve parent clock selection - Add Ethernet Switch and internal SASYNCPER clocks on Renesas R-Car S4-8 - Add DMA (SYS-DMAC), SPI (MSIOF), external interrupt (INTC-EX) serial (SCIF), PWM (PWM and TPU), SDHI, and HyperFLASH/QSPI (RPC-IF) clocks on Renesas R-Car V4H - Add Multi-Function Timer Pulse Unit (MTU3a) clock and reset on Renesas RZ/G2L - Fix endless loop on Renesas RZ/N1 - Correct the parent clocks for the High Speed Serial Communication Interfaces with FIFO (HSCIF) modules on the Renesas R-Car V4H SoC Note: HSCIF0 is used for the serial console on the White-Hawk development board - Various clk DT binding improvements and conversions to YAML - Qualcomm SM8150/SM8250 display clock controller cleaned up - Some missing clocks for Qualcomm SM8350 added - Qualcomm MSM8974 Global and Multimedia clock controllers transitioned to parent_data and parent_hws - Use parent_data and add network resets for Qualcomm IPQ8074 - Qualcomm Krait clock controller modernized - Fix pm_runtime usage in Qualcomm SC7180 and SC7280 LPASS clock controllers - Enable retention mode on Qualcomm SM8250 USB GDSCs - Cleanup Qualcomm RPM and RPMh clock drivers to avoid duplicating clocks which definition could be shared between platforms - Various NULL pointer checks added for allocations" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (188 commits) clk: nomadik: correct struct name kernel-doc warning clk: lmk04832: fix kernel-doc warnings clk: lmk04832: drop superfluous #include clk: lmk04832: drop unnecessary semicolons clk: lmk04832: declare variables as const when possible clk: socfpga: Fix memory leak in socfpga_gate_init() clk: microchip: enable the MPFS clk driver by default if SOC_MICROCHIP_POLARFIRE clk: st: Fix memory leak in st_of_quadfs_setup() clk: samsung: Fix memory leak in _samsung_clk_register_pll() clk: Add trace events for rate requests clk: Store clk_core for clk_rate_request clk: qcom: rpmh: add support for SM6350 rpmh IPA clock clk: qcom: mmcc-msm8974: use parent_hws/_data instead of parent_names clk: qcom: mmcc-msm8974: move clock parent tables down clk: qcom: mmcc-msm8974: use ARRAY_SIZE instead of specifying num_parents clk: qcom: gcc-msm8974: use parent_hws/_data instead of parent_names clk: qcom: gcc-msm8974: move clock parent tables down clk: qcom: gcc-msm8974: use ARRAY_SIZE instead of specifying num_parents dt-bindings: clocks: qcom,mmcc: define clocks/clock-names for MSM8974 dt-bindings: clock: split qcom,gcc-msm8974,-msm8226 to the separate file ... commit 71946a25f357a51dcce849367501d7fb04c0465b Merge: 90b12f423d3c ff874dbc4f86 Author: Linus Torvalds Date: Tue Dec 13 13:41:26 2022 -0800 Merge tag 'mmc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC and MEMSTICK updates from Ulf Hansson: "MMC core: - A few minor improvements and cleanups MMC host: - Remove some redundant calls to local_irq_{save,restore}() - Replace kmap_atomic() with kmap_local_page() - Take return values from mmc_add_host() into account - dw_mmc-pltfm: Add support to configure clk-phase for socfpga - hsq: Minimize latency by using a fifo to dispatch requests - litex_mmc: Fixup corner case for polling mode - mtk-sd: Add inline crypto engine clock control - mtk-sd: Add support for the mediatek MT7986 variant - renesas_sdhi: Improve reset from HS400 mode - renesas_sdhi: Take DMA end interrupts into account - sdhci: Avoid unnecessary update of clock - sdhci: Fix an SD tuning issue - sdhci-brcmst: Add Kamal Dasu as maintainer for the Broadcom driver - sdhci-esdhc-imx: Improve tuning logic - sdhci-esdhc-imx: Improve support for the imxrt1050 variant - sdhci_f_sdh30: Add support for non-removable media - sdhci_f_sdh30: Add support for the Socionext F_SDH30_E51 variant - sdhci_f_sdh30: Add reset control support - sdhci-msm: Add support for the Qcom SM8550/SM8350/SM6375 variants - sdhci-msm: Add support for the Qcom MSM8976 variant - sdhci-of-arasan: Add support for dynamic configuration - sdhci-of-esdhc: Limit the clock frequency to confirm to spec - sdhci-pci: Enable asynchronous probe - sdhci-sprd: Improve card detection - sdhci-tegra: Improve reset support - sdhci-tegra: Add support to program MC stream ID - sunplus-mmc: Add new mmc driver for the Sunplus SP7021 controller - vub300: Fix warning splat for SDIO irq MEMSTICK core: - memstick: A few minor improvements and cleanups CLK/IOMMU: - clk: socfpga: Drop redundant support for clk-phase for the SD/MMC clk - iommu: Add tegra specific helper to get stream_id" * tag 'mmc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (108 commits) mmc: sdhci-sprd: Disable CLK_AUTO when the clock is less than 400K mmc: sdhci-of-esdhc: Modify mismatched function name memstick/mspro_block: Convert to use sysfs_emit()/sysfs_emit_at() APIs mmc: sdhci-tegra: Issue CMD and DAT resets together mmc: sdhci-tegra: Add support to program MC stream ID mmc: sdhci-tegra: Separate Tegra194 and Tegra234 SoC data mmc: sdhci-tegra: Sort includes alphabetically iommu/tegra: Add tegra_dev_iommu_get_stream_id() helper iommu: Add note about struct iommu_fwspec usage mmc: sdhci-brcmstb: Resolve "unused" warnings with CONFIG_OF=n dt-bindings: mmc: sdhci-msm: allow dma-coherent dt-bindings: mmc: sdhci-msm: drop properties mentioned in common MMC dt-bindings: mmc: sdhci-msm: cleanup style dt-bindings: mmc: sdhci-am654: cleanup style dt-bindings: mmc: sdhci: document sdhci-caps and sdhci-caps-mask mmc: vub300: fix warning - do not call blocking ops when !TASK_RUNNING MAINTAINERS: Update maintainer for SDHCI Broadcom BRCMSTB driver mmc: sdhci-of-esdhc: limit the SDHC clock frequency mmc: sdhci: Remove unneeded semicolon mmc: core: Normalize the error handling branch in sd_read_ext_regs() ... commit 90b12f423d3c8a89424c7bdde18e1923dfd0941e Merge: 2043f9a37d16 c6f613e5f35b Author: Linus Torvalds Date: Tue Dec 13 13:36:39 2022 -0800 Merge tag 'for-linus-6.2-1' of https://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "This includes a number of small fixes, as usual. It also includes a new driver for doing the i2c (SSIF) interface BMC-side, pretty much completing the BMC side interfaces" * tag 'for-linus-6.2-1' of https://github.com/cminyard/linux-ipmi: ipmi/watchdog: use strscpy() to instead of strncpy() ipmi: ssif_bmc: Convert to i2c's .probe_new() ipmi: fix use after free in _ipmi_destroy_user() ipmi/watchdog: Include when appropriate ipmi:ssif: Increase the message retry time ipmi: Fix some kernel-doc warnings ipmi: ssif_bmc: Use EPOLLIN instead of POLLIN ipmi: fix msg stack when IPMI is disconnected ipmi: fix memleak when unload ipmi driver ipmi: fix long wait in unload when IPMI disconnect ipmi: kcs: Poll OBF briefly to reduce OBE latency bindings: ipmi: Add binding for SSIF BMC driver ipmi: ssif_bmc: Add SSIF BMC driver commit 2043f9a37d163ef4f572992bec7cdcdf54d965de Merge: 86a0b4255e84 f722052c990b Author: Linus Torvalds Date: Tue Dec 13 13:32:56 2022 -0800 Merge tag 'for-linus-2022121301' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - iio support for the MCP2221 HID driver (Matt Ranostay) - support for more than one hinge sensor in hid-sensor-custom (Yauhen Kharuzhy) - PS DualShock 4 controller support (Roderick Colenbrander) - XP-PEN Deco LW support (José Expósito) - other assorted code cleanups and device ID/quirk addtions * tag 'for-linus-2022121301' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (51 commits) HID: logitech HID++: Send SwID in GetProtocolVersion HID: hid-elan: use default remove for hid device HID: hid-alps: use default remove for hid device HID: hid-sensor-custom: set fixed size for custom attributes HID: i2c: let RMI devices decide what constitutes wakeup event HID: playstation: fix DualShock4 bluetooth CRC endian issue. HID: playstation: fix DualShock4 bluetooth memory corruption bug. HID: apple: Swap Control and Command keys on Apple keyboards HID: intel-ish-hid: ishtp: remove variable rb_count HID: uclogic: Standardize test name prefix HID: hid-sensor-custom: Allow more than one hinge angle sensor HID: ft260: fix 'cast to restricted' kernel CI bot warnings HID: ft260: missed NACK from busy device HID: ft260: fix a NULL pointer dereference in ft260_i2c_write HID: ft260: wake up device from power saving mode HID: ft260: missed NACK from big i2c read HID: ft260: remove SMBus Quick command support HID: ft260: skip unexpected HID input reports HID: ft260: do not populate /dev/hidraw device HID: ft260: improve i2c large reads performance ... commit 86a0b4255e84563739d137ad374af6c7215bb3ff Merge: 531d2644f3b1 e291c116f60f Author: Linus Torvalds Date: Tue Dec 13 13:20:36 2022 -0800 Merge tag 'input-for-v6.2-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a new driver for Cypress Generation 5 touchscreens - a new driver for Hynitron cstxxx touchscreens - a new driver for Himax hx83112b touchscreen - I2C input devices have been converted to use i2c's probe_new() - a large number of input devices are now using DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr() and no longer use __maybe_unused annotations - improvements to msg2638 touchscreen driver to also support msg2138 - conversion of several input deevine bindings to yaml/DT schema - changes to select touch drivers to move handling of wake irqs to the PM core - other assorted fixes and improvements. * tag 'input-for-v6.2-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (165 commits) Input: elants_i2c - delay longer with reset asserted dt-bindings: input: Convert ti,drv260x to DT schema dt-bindings: input: gpio-beeper: Convert to yaml schema Input: pxspad - fix unused data warning when force feedback not enabled Input: lpc32xx - allow building with COMPILE_TEST Input: nomadik-ske-keypad - allow building with COMPILE_TEST Input: pxa27xx-keypad - allow build with COMPILE_TEST Input: spear-keyboard - improve build coverage using COMPILE_TEST Input: tegra-kbc - allow build with COMPILE_TEST Input: tegra-kbc - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Input: tca6416-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Input: tc3589x - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Input: st-keyscan - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Input: sh-keysc - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Input: qt1070 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Input: pxa27x_keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Input: pmic8xxx-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Input: nomadik-ske-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Input: mcs-touchkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Input: max7359-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() ... commit 531d2644f3b10098dadb25b2c26cf19ec0330f90 Merge: 4d03390b5cb9 580f9896e088 Author: Linus Torvalds Date: Tue Dec 13 13:13:55 2022 -0800 Merge tag 'devicetree-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: "DT Bindings: - Various LED binding conversions and clean-ups. Convert the ir-spi-led, pwm-ir-tx, and gpio-ir-tx LED bindings to schemas. Consistently reference LED common.yaml or multi-led schemas and disallow undefined properties. - Convert IDT 89HPESx, pwm-clock, st,stmipid02, Xilinx PCIe hosts, and fsl,imx-fb bindings to schema - Add ata-generic, Broadcom u-boot environment, and dynamic MTD sub-partitions bindings. - Make all SPI based displays reference spi-peripheral-props.yaml - Fix some schema property regex's which should be fixed strings or were missing start/end anchors - Remove 'status' in examples, again... DT Core: - Fix a possible NULL dereference in overlay functions - Fix kexec reading 32-bit "linux,initrd-{start,end}" values (which never worked) - Add of_address_count() helper to count number of 'reg' entries - Support .dtso extension for DT overlay source files. Rename staging and unittest overlay files. - Update dtc to upstream v1.6.1-63-g55778a03df61" * tag 'devicetree-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (42 commits) dt-bindings: leds: Add missing references to common LED schema dt-bindings: leds: intel,lgm: Add missing 'led-gpios' property of: overlay: fix null pointer dereferencing in find_dup_cset_node_entry() and find_dup_cset_prop() dt-bindings: lcdif: Fix constraints for imx8mp media: dt-bindings: atmel,isc: Drop unneeded unevaluatedProperties dt-bindings: Drop Jee Heng Sia dt-bindings: thermal: cooling-devices: Add missing cache related properties dt-bindings: leds: irled: ir-spi-led: convert to DT schema dt-bindings: leds: irled: pwm-ir-tx: convert to DT schema dt-bindings: leds: irled: gpio-ir-tx: convert to DT schema dt-bindings: leds: mt6360: rework to match multi-led dt-bindings: leds: lp55xx: rework to match multi-led dt-bindings: leds: lp55xx: switch to preferred 'gpios' suffix dt-bindings: leds: lp55xx: allow label dt-bindings: leds: use unevaluatedProperties for common.yaml dt-bindings: thermal: tsens: Add SM6115 compatible of/kexec: Fix reading 32-bit "linux,initrd-{start,end}" values dt-bindings: display: Convert fsl,imx-fb.txt to dt-schema dt-bindings: Add missing start and/or end of line regex anchors dt-bindings: qcom,pdc: Add missing compatibles ... commit 4d03390b5cb97ea8562fcf324106c4735805d558 Merge: 361c89a0da59 364ffd2537c4 Author: Linus Torvalds Date: Tue Dec 13 13:09:38 2022 -0800 Merge tag 'hwmon-for-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers: - Driver for OneXPlayer mini AMD sensors - Ampere's Altra smpro-hwmon driver New chip and attribute support in existing drivers: - nct6775: Support for ASUS CROSSHAIR VIII/TUF/ProArt B550M - pmbus/ltc2978: Support for LTC7132 - aquacomputer_d5next: Support for temperature sensor offsets and flow sensor pulses - coretemp: Support for dynamic ttarget and tjmax Improvements: - Use devm_regulator_get_enable() where appropriate - Use sysfs_emit() instead of scnprintf() - Remove some useless #include - Include when appropriate - Use simple i2c probe - it87: Check for a valid chip before using force_id, and new new module parameter to ignore ACPI resource conflicts - jc42: Use regmap, and restore min/max/critical temperatures on resume - Add reporting power good and status to PMBus based regulators Last minute fixes: - emc2305: Fix probing of emc2301/2/3, and fix setting pwm values manually if THERMAL is enabled And various other minor fixes and improvements" * tag 'hwmon-for-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (37 commits) hwmon: (emc2305) fix pwm never being able to set lower hwmon: (emc2305) fix unable to probe emc2301/2/3 hwmon: (dell-smm) Move error message to make probing silent hwmon: use sysfs_emit() to instead of scnprintf() hwmon: (oxp-sensors) Fix pwm reading hwmon: (aquacomputer_d5next) Add support for Quadro flow sensor pulses hwmon: (pmbus/core) Implement regulator get_status hwmon: (oxp-sensors) Add AOK ZOE and Mini PRO hwmon: (gsc-hwmon) Switch to flexible array to simplify code hwmon: (pmbus) Add power good support hwmon: (nct6775) add ASUS CROSSHAIR VIII/TUF/ProArt B550M hwmon: (coretemp) Add support for dynamic ttarget hwmon: (coretemp) Add support for dynamic tjmax hwmon: (coretemp) rearrange tjmax handing code hwmon: Remove some useless #include hwmon: (coretemp) Remove obsolete temp_data->valid hwmon: add OneXPlayer mini AMD sensors driver hwmon: (aquacomputer_d5next) Clear up macros and comments hwmon: (it87) Add DMI table for future extensions hwmon: Include when appropriate ... commit 361c89a0da59c04b1d3d33568965fe426b0f18de Merge: d0f3ad23cf4f 83e1bcaf8cef Author: Linus Torvalds Date: Tue Dec 13 13:03:06 2022 -0800 Merge tag 'pinctrl-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "The two large chunks is the header clean-up from Andy and the Qualcomm DT bindings clean-up from Krzysztof. Each which could give rise to conflicts, but I haven't seen any. The YAML conversions happening around the device tree is the biggest item in the series and is the result of Rob Herrings ambition to autovalidate these trees against strict schemas and it is paying off in lots of bugs found and ever prettier device trees. Sooner or later the transition will be complete, Krzysztof is fixing up all of the Qualcomm stuff, which is pretty voluminous. Core changes: - minor but nice and important documentation clean-ups New drivers: - subdriver for the Qualcomm SDM670 SoC - subdriver for the Intel Moorefield SoC - trivial support for the NXP Freescale i.MXRT1170 SoC Other changes and improvements - major clean-up of the Qualcomm pin control device tree bindings by Krzysztof - major header clean-up by Andy - some immutable irqchip clean-up for the Actions Semiconductor and Nuvoton drivers - GPIO helpers for The Cypress cy8c95x0 driver - bias handling in the Mediatek MT7986 driver - remove the unused pins-are-numbered concept that never flew" * tag 'pinctrl-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (231 commits) pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions() dt-bindings: pinctrl: st,stm32: Deprecate pins-are-numbered dt-bindings: pinctrl: mediatek,mt65xx: Deprecate pins-are-numbered pinctrl: stm32: Remove check for pins-are-numbered pinctrl: mediatek: common: Remove check for pins-are-numbered pinctrl: qcom: remove duplicate included header files pinctrl: sunxi: d1: Add CAN bus pinmuxes pinctrl: loongson2: Fix some const correctness pinctrl: pinconf-generic: add missing of_node_put() pinctrl: intel: Enumerate PWM device when community has a capability pwm: lpss: Rename pwm_lpss_probe() --> devm_pwm_lpss_probe() pwm: lpss: Allow other drivers to enable PWM LPSS pwm: lpss: Include headers we are the direct user of pwm: lpss: Rename MAX_PWMS --> LPSS_MAX_PWMS pwm: Add a stub for devm_pwmchip_add() pinctrl: k210: call of_node_put() pinctrl: starfive: Use existing variable gpio dt-bindings: pinctrl: semtech,sx150xq: fix match patterns for 16 GPIOs matching pinconf-generic: fix style issues in pin_config_param doc pinctrl: pinctrl-loongson2: fix Kconfig dependency ... commit d0f3ad23cf4f4046e88eef92c608d43cad9e4f7e Merge: c5589c436d46 3cf241c3d56f Author: Linus Torvalds Date: Tue Dec 13 12:54:31 2022 -0800 Merge tag 'spi-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "A busy enough release, but not for the core which has only seen very small updates. The biggest addition is the readdition of support for detailed configuration of the timings around chip selects. That had been removed for lack of use but there's been applications found for it on Atmel systems. Otherwise the updates are mostly feature additions and cleanups to existing drivers. Summary: - Provide a helper for getting device match data in a way that abstracts away which firmware interface is being used. - Re-add the spi_set_cs_timing() API for detailed configuration of the timing around chip select and support it on Atmel. - Support for MediaTek MT7986, Microchip PCI1xxxx, Nuvoton WPCM450 FIU and Socionext F_OSPI" * tag 'spi-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (66 commits) spi: dt-bindings: Convert Synquacer SPI to DT schema spi: spi-gpio: Don't set MOSI as an input if not 3WIRE mode spi: spi-mtk-nor: Add recovery mechanism for dma read timeout spi: spi-fsl-lpspi: add num-cs binding for lpspi spi: spi-fsl-lpspi: support multiple cs for lpspi spi: mtk-snfi: Add snfi support for MT7986 IC spi: spidev: mask SPI_CS_HIGH in SPI_IOC_RD_MODE spi: cadence-quadspi: Add minimum operable clock rate warning to baudrate divisor calculation spi: microchip: pci1xxxx: Add suspend and resume support for PCI1XXXX SPI driver spi: dt-bindings: nuvoton,wpcm450-fiu: Fix warning in example (missing reg property) spi: dt-bindings: nuvoton,wpcm450-fiu: Fix error in example (bogus include) spi: mediatek: Enable irq when pdata is ready spi: spi-mtk-nor: Unify write buffer on/off spi: intel: Add support for SFDP opcode spi: intel: Take possible chip address into account in intel_spi_read/write_reg() spi: intel: Implement adjust_op_size() spi: intel: Use ->replacement_op in intel_spi_hw_cycle() spi: cadence: Drop obsolete dependency on COMPILE_TEST spi: Add Nuvoton WPCM450 Flash Interface Unit (FIU) bindings spi: wpcm-fiu: Add direct map support ... commit c5589c436d4646e0dc23f64264db8e04cf67c88f Merge: b8cc9174ff9e 8f3cbcd6b440 Author: Linus Torvalds Date: Tue Dec 13 12:49:59 2022 -0800 Merge tag 'regulator-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "Quite a quiet release for regulator, the diffstat is dominated by the I2C migration to probe_new() and the newly added MT6357 driver. We've just one framework addition and the rest is all new device support, fixes and cleanups. The framework addition is an API for requesting all regulators defined in DT, this isn't great practice but has reasonable applications when there is generic code handling devices on buses where the bus specification doesn't include power. The immediate application is MDIO but I believe there's others, it's another API that'll need an eye keeping on it for undesirable usage. Summary: - An API for requesting all regulators defined in DT - Conversion of lots of drivers to the I2C probe_new() API - Support for Mediatek MT6357, Qualcomm PM8550, PMR735a and Richtek RT6190" * tag 'regulator-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (56 commits) regulator: core: Use different devices for resource allocation and DT lookup dt-bindings: Add missing 'unevaluatedProperties' to regulator nodes regulator: qcom-labibb: Fix missing of_node_put() in qcom_labibb_regulator_probe() regulator: add mt6357 regulator regulator: dt-bindings: Add binding schema for mt6357 regulators regulator: core: fix resource leak in regulator_register() regulator: core: fix module refcount leak in set_supply() regulator: core: fix use_count leakage when handling boot-on regulator: rk808: Use dev_err_probe regulator: rk808: reduce 'struct rk808' usage regulator: Drop obsolete dependencies on COMPILE_TEST regulator: pv88080-regulator: Convert to i2c's .probe_new() regulator: pfuze100-regulator: Convert to i2c's .probe_new() regulator: isl6271a-regulator: Convert to i2c's .probe_new() regulator: fan53555: Convert to i2c's .probe_new() regulator: act8865-regulator: Convert to i2c's .probe_new() regulator: qcom-rpmh: Add support for PM8550 regulators regulator: dt-bindings: qcom,rpmh: Add compatible for PM8550 regulator: tps65023-regulator: Convert to i2c's .probe_new() regulator: tps62360-regulator: Convert to i2c's .probe_new() ... commit fab89a09c86f948adfc7e20a7d608bd9f323bbe1 Author: Steven Rostedt (Google) Date: Mon Dec 12 19:38:14 2022 -0500 tracing: Remove pointer (asterisk) and brackets from cpumask_t field To differentiate between long arrays and cpumasks, the __cpumask() field was created. Part of the TRACE_EVENT() macros test if the type is signed or not by using the is_signed_type() macro. The __cpumask() field used the __dynamic_array() helper but because cpumask_t is a structure, it could not be used in the is_signed_type() macro as that would fail to build, so instead it passed in the pointer to cpumask_t. Unfortunately, that creates in the format file: field:__data_loc cpumask_t *[] mask; offset:36; size:4; signed:0; Which looks like an array of pointers to cpumask_t and not a cpumask_t type, which is misleading to user space parsers. Douglas Raillard pointed out that the "[]" are also misleading, as cpumask_t is not an array. Since cpumask() hasn't been created yet, and the parsers currently fail on it (but will still produce the raw output), make it be: field:__data_loc cpumask_t mask; offset:36; size:4; signed:0; Which is the correct type of the field. Then the parsers can be updated to handle this. Link: https://lore.kernel.org/lkml/6dda5e1d-9416-b55e-88f3-31d148bc925f@arm.com/ Link: https://lore.kernel.org/linux-trace-kernel/20221212193814.0e3f1e43@gandalf.local.home Cc: Masami Hiramatsu Cc: Valentin Schneider Cc: Andrew Morton Fixes: 8230f27b1ccc ("tracing: Add __cpumask to denote a trace event field that is a cpumask_t") Reported-by: Douglas Raillard Signed-off-by: Steven Rostedt (Google) include/trace/stages/stage4_event_fields.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a785736d7e587abbfd59df44e9a815d8d109c28c Author: Steven Rostedt (Google) Date: Tue Dec 13 09:56:02 2022 -0500 tracing: Have trigger filter parsing errors show up in error_log It is annoying that the filter parsing of triggers do not show up in the error_log. Trying to figure out what is incorrect in the input is difficult when it fails for a typo. Have the errors of filter parsing show up in error_log as well. Link: https://lore.kernel.org/linux-trace-kernel/20221213095602.083fa9fd@gandalf.local.home Cc: Masami Hiramatsu Cc: Tom Zanussi Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_trigger.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b8cc9174ff9e7b739c6fa61037759f885748fbf5 Merge: 1e4fa020d574 22250dbaba99 Author: Linus Torvalds Date: Tue Dec 13 12:44:40 2022 -0800 Merge tag 'regmap-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "A few new APIs here, support for the FSI bus (which is used in some PowerPC systems) plus a couple of new APIs, one allowing abstractions built on top of regmap to tell if the regmap can be used in an atomic context and one providing a callback for an in flight device which can't do interrupt masking very well. There's also a fix that I never got round to sending because it really should be fixed better but that's not happened yet and it does avoid the problem, the fix was in -next for a long time" * tag 'regmap-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap-irq: Add handle_mask_sync() callback regmap: Add FSI bus support regmap: add regmap_might_sleep() regmap-irq: Use the new num_config_regs property in regmap_add_irq_chip_fwnode commit 1e4fa020d574768445fca2d9bbfe473ec8bbd224 Merge: a594533df0f6 a34506e08db7 Author: Linus Torvalds Date: Tue Dec 13 12:32:07 2022 -0800 Merge tag 'mtd/for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd updates from Miquel Raynal: "MTD core changes: - Fix refcount error in del_mtd_device() - Fix possible resource leak in init_mtd() - Set ROOT_DEV for partitions marked as rootfs in DT - Describe marking rootfs partitions in the bindings - Fix device name leak when register device fails in add_mtd_device() - Try to find OF node for every MTD partition - simplify (a bit) code find partition-matching dynamic OF node MTD driver changes: - pxa2xx-flash maps: fix memory leak in probe - BCM parser: refer to ARCH_BCMBCA instead of ARCH_BCM4908 - lpddr2_nvm: Fix possible null-ptr-deref - inftlcore: fix repeated words in comments - lart: remove driver - tplink: - Add TP-Link SafeLoader partitions table parser and bindings - Describe TP-Link SafeLoader parser - Describe TP-Link SafeLoader dynamic subpartitions - mtdoops: - Panic caused mtdoops to call mtdoops_erase function immediately - Add mtdoops_erase function and move mtdoops_inc_counter after it - Change printk() to counterpart pr_ functions MTD binding cleanup: - Fixed-partitions: Fix 'sercomm,scpart-id' schema - Standardize the style in the examples - Drop object types when referencing other files - Argue in favor of keeping additionalProperties set to true - NVMEM-cells: - Inherit from MTD partitions - Drop range property from example - Partitions: - Change qcom,smem-part partition type - Constrain the list of parsers - Physmap: Reuse the generic definitions - SPI-NOR: Drop common properties - Sunxi-nand: Add an example to validate the bindings - Onenand: Mention the expected node name - Ingenic: Mark partitions in the controller node as deprecated - NAND: - Standardize the child node name - Drop common properties already defined in generic files - nand-chip.yaml should reference mtd.yaml - Remove useless file about partitions - Clarify all partition subnodes SPI NOR core changes: - Add support for flash reset using the dt reset-gpios property. - Update hwcaps.mask to include 8D-8D-8D read and page program ops when xSPI profile 1.0 table is defined. - Bypass zero erase size in spi_nor_find_best_erase_type(). - Fix select_uniform_erase to skip 0 erase size - Add generic flash driver. If a flash is not found in the flash_info array, fall back to the generic flash driver which is described solely by the flash's SFDP tables. - Fix the number of bytes for the dummy cycles in spi_nor_spimem_check_readop(). - Introduce SPI_NOR_QUAD_PP flag, as PP_1_1_4 is not SFDP discoverable. SPI NOR manufacturer drivers changes: - Spansion: - use PARSE_SFDP for s28hs512t, - add support for s28hl512t, s28hl01gt, and s28hs01gt. - Gigadevice: Replace default_init() with post_bfpt() for gd25q256. - Micron - ST: Enable locking for mt25qu256a. - Winbond: Add support for W25Q512NW-IQ. - ISSI: Use PARSE_SFDP and SPI_NOR_QUAD_PP. Raw NAND core changes: - Drop obsolete dependencies on COMPILE_TEST - MAINTAINERS: rectify entry for MESON NAND controller bindings - Drop EXPORT_SYMBOL_GPL for nanddev_erase() Raw NAND driver changes: - marvell: Enable NFC/DEVBUS arbiter - gpmi: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync - mpc5121: Replace NO_IRQ by 0 - lpc32xx_{slc,mlc}: - Switch to using pm_ptr() - Switch to using gpiod API - lpc32xx_mlc: Switch to using pm_ptr() - cadence: Support 64-bit slave dma interface - rockchip: Describe rk3128-nfc in the bindings - brcmnand: Update interrupts description in the bindings SPI-NAND driver changes: - winbond: - Add Winbond W25N02KV flash support - Fix flash identification" * tag 'mtd/for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (76 commits) mtd: rawnand: Drop obsolete dependencies on COMPILE_TEST mtd: maps: pxa2xx-flash: fix memory leak in probe mtd: core: Fix refcount error in del_mtd_device() mtd: spi-nor: add SFDP fixups for Quad Page Program mtd: spi-nor: issi: is25wp256: Init flash based on SFDP mtd: spi-nor: winbond: add support for W25Q512NW-IQ mtd: spi-nor: micron-st: Enable locking for mt25qu256a mtd: spi-nor: Fix the number of bytes for the dummy cycles mtd: spi-nor: gigadevice: gd25q256: replace gd25q256_default_init with gd25q256_post_bfpt mtd: spi-nor: Fix formatting in spi_nor_read_raw() kerneldoc comment mtd: spi-nor: sysfs: print JEDEC ID for generic flash driver mtd: spi-nor: add generic flash driver mtd: spi-nor: fix select_uniform_erase to skip 0 erase size mtd: spi-nor: move function declaration out of sfdp.h mtd: spi-nor: remember full JEDEC flash ID mtd: spi-nor: sysfs: hide manufacturer if it is not set mtd: spi-nor: hide jedec_id sysfs attribute if not present mtd: spi-nor: Check for zero erase size in spi_nor_find_best_erase_type() mtd: rawnand: marvell: Enable NFC/DEVBUS arbiter mtd: parsers: refer to ARCH_BCMBCA instead of ARCH_BCM4908 ... commit a594533df0f6ca391da003f43d53b336a2d23ffa Merge: cdb9d3537711 66efff515a65 Author: Linus Torvalds Date: Tue Dec 13 11:59:58 2022 -0800 Merge tag 'drm-next-2022-12-13' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "The biggest highlight is that the accel subsystem framework is merged. Hopefully for 6.3 we will be able to line up a driver to use it. In drivers land, i915 enables DG2 support by default now, and nouveau has a big stability refactoring and initial ampere support, AMD includes new hw IP support and should build on ARM again. There is also an ofdrm driver to take over offb on platforms it's used. Stuff outside my tree, the dma-buf patches hit a few places, the vc4 firmware changes also do, and i915 has some interactions with MEI for discrete GPUs. I think all of those should have been acked/reviewed by relevant parties. New driver: - ofdrm - replacement for offb fbdev: - add support for nomodeset fourcc: - add Vivante tiled modifier core: - atomic-helpers: CRTC primary plane test fixes, fb access hooks - connector: TV API consistency, cmdline parser improvements - send connector hotplug on cleanup - sort makefile objects tests: - sort kunit tests - improve DP-MST tests - add kunit helpers to create a device sched: - module param for scheduling policy - refcounting fix buddy: - add back random seed log ttm: - convert ttm_resource to size_t - optimize pool allocations edid: - HFVSDB parsing support fixes - logging/debug improvements - DSC quirks dma-buf: - Add unlocked vmap and attachment mapping - move drivers to common locking convention - locking improvements firmware: - new API for rPI firmware and vc4 xilinx: - zynqmp: displayport bridge support - dpsub fix bridge: - adv7533: Remove dynamic lane switching - it6505: Runtime PM support, sync improvements - ps8640: Handle AUX defer messages - tc358775: Drop soft-reset over I2C panel: - panel-edp: Add INX N116BGE-EA2 C2 and C4 support. - Jadard JD9365DA-H3 - NewVision NV3051D amdgpu: - DCN support on ARM - DCN 2.1 secure display - Sienna Cichlid mode2 reset fixes - new GC 11.x firmware versions - drop AMD specific DSC workarounds in favour of drm code - clang warning fixes - scheduler rework - SR-IOV fixes - GPUVM locking fixes - fix memory leak in CS IOCTL error path - flexible array updates - enable new GC/PSP/SMU/NBIO IP - GFX preemption support for gfx9 amdkfd: - cache size fixes - userptr fixes - enable cooperative launch on gfx 10.3 - enable GC 11.0.4 KFD support radeon: - replace kmap with kmap_local_page - ACPI ref count fix - HDA audio notifier support i915: - DG2 enabled by default - MTL enablement work - hotplug refactoring - VBT improvements - Display and watermark refactoring - ADL-P workaround - temp disable runtime_pm for discrete- - fix for A380 as a secondary GPU - Wa_18017747507 for DG2 - CS timestamp support fixes for gen5 and earlier - never purge busy TTM objects - use i915_sg_dma_sizes for all backends - demote GuC kernel contexts to normal priority - gvt: refactor for new MDEV interface - enable DC power states on eDP ports - fix gen 2/3 workarounds nouveau: - fix page fault handling - Ampere acceleration support - driver stability improvements - nva3 backlight support msm: - MSM_INFO_GET_FLAGS support - DPU: XR30 and P010 image formats - Qualcomm SM6115 support - DSI PHY support for QCM2290 - HDMI: refactored dev init path - remove exclusive-fence hack - fix speed-bin detection - enable clamp to idle on 7c3 - improved hangcheck detection vmwgfx: - fb and cursor refactoring - convert to generic hashtable - cursor improvements etnaviv: - hw workarounds - softpin MMU fixes ast: - atomic gamma LUT support - convert to SHMEM lcdif: - support YUV planes - Increase DMA burst size - FIFO threshold tuning meson: - fix return type of cvbs mode_valid mgag200: - fix PLL setup on some revisions sun4i: - A100 and D1 support udl: - modesetting improvements - hot unplug support vc4: - support PAL-M - fix regression preventing 4K @ 60Hz - fix NULL ptr deref v3d: - switch to drm managed resources renesas: - RZ/G2L DSI support - DU Kconfig cleanup mediatek: - fixup dpi and hdmi - MT8188 dpi support - MT8195 AFBC support tegra: - NVDEC hardware on Tegra234 SoC hdlcd: - switch to drm managed resources ingenic: - fix registration error path hisilicon: - convert to drm_mode_init maildp: - use managed resources mtk: - use drm_mode_init rockchip: - use drm_mode_copy" * tag 'drm-next-2022-12-13' of git://anongit.freedesktop.org/drm/drm: (1397 commits) drm/amdgpu: fix mmhub register base coding error drm/amdgpu: add tmz support for GC IP v11.0.4 drm/amdgpu: enable GFX Clock Gating control for GC IP v11.0.4 drm/amdgpu: enable GFX Power Gating for GC IP v11.0.4 drm/amdgpu: enable GFX IP v11.0.4 CG support drm/amdgpu: Make amdgpu_ring_mux functions as static drm/amdgpu: generally allow over-commit during BO allocation drm/amd/display: fix array index out of bound error in DCN32 DML drm/amd/display: 3.2.215 drm/amd/display: set optimized required for comp buf changes drm/amd/display: Add debug option to skip PSR CRTC disable drm/amd/display: correct DML calc error of UrgentLatency drm/amd/display: correct static_screen_event_mask drm/amd/display: Ensure commit_streams returns the DC return code drm/amd/display: read invalid ddc pin status cause engine busy drm/amd/display: Bypass DET swath fill check for max clocks drm/amd/display: Disable uclk pstate for subvp pipes drm/amd/display: Fix DCN2.1 default DSC clocks drm/amd/display: Enable dp_hdmi21_pcon support drm/amd/display: prevent seamless boot on displays that don't have the preferred dig ... commit cdb9d3537711939e4d8fd0de2889c966f88346eb Merge: 102f9d3d4558 3178804c64ef Author: Linus Torvalds Date: Tue Dec 13 11:36:58 2022 -0800 Merge tag 'media/v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - DVB core changes to avoid refcount troubles and UAF - DVB API/core has gained support for DVB-C2 and DVB-S2X - New sensor drivers: ov08x40, ov4689.c, st-vgxy61 and tc358746.c - Removal of an unused sensor driver: s5k4ecgx - Move microchip_csi2dc to a new directory, named after the manufacturer - Add media controller support to Microship drivers - Old Atmel/Microship drivers that don't use media controler got moved to staging - New drivers added for Renesas RZ/G2L CRU and MIPI CSI-2 support - Allwinner A31 camera sensor driver code was now split into a bridge and a separate processor driver - Added a virtual stateless decoder driver in order to test core support for stateless drivers and test userspace apps using it - removed platform-based support for ov9650, as this is not used anymore - atomisp now uses videobuf2 and supports normal mmap mode - the imx7-media-csi driver got promoted from staging - rcar-vin driver has gained support for gen3 UDS (Up Down Scaler) - most i2c drivers now use I2C .probe_new() kAPI - lots of drivers fixes, cleanups and improvements * tag 'media/v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (544 commits) media: s5c73m3: Switch to GPIO descriptors media: i2c: s5k5baf: switch to using gpiod API media: i2c: s5k6a3: switch to using gpiod API media: imx: remove code for non-existing config IMX_GPT_ICAP media: si470x: Fix use-after-free in si470x_int_in_callback() media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies media: coda: Add check for kmalloc media: coda: Add check for dcoda_iram_alloc dt-bindings: media: s5c73m3: Fix reset-gpio descriptor media: dt-bindings: allwinner: h6-vpu-g2: Add IOMMU reference property media: s5k4ecgx: Delete driver media: s5k4ecgx: Switch to GPIO descriptors media: Switch to use dev_err_probe() helper headers: Remove some left-over license text in include/uapi/linux/v4l2-* headers: Remove some left-over license text in include/uapi/linux/dvb/ media: usb: pwc-uncompress: Use flex array destination for memcpy() media: s5p-mfc: Fix to handle reference queue during finishing media: s5p-mfc: Clear workbit to handle error condition media: s5p-mfc: Fix in register read and write for H264 media: imx: Use get_mbus_config instead of parsing upstream DT endpoints ... commit 102f9d3d455870844c47b82322c2dfc0a35eb745 Merge: 8715c6d3100f 8ec2d95f50c0 Author: Linus Torvalds Date: Tue Dec 13 11:27:26 2022 -0800 Merge tag 'sound-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This looks like a relatively calm development cycle; there have been only few changes in ALSA and ASoC core sides while we get lots of device-specific fixes and updates as usual. Most of commits are about ASoC, including Intel SOF/AVS and many device tree updates. Below are some highlights: Core: - Improvement in memalloc helper for fallback allocations - More cleanups of ASoC DAPM code ASoC: - Factoring out of mapping hw_params onto SoundWire configuration - The ever ongoing overhauls of the Intel DSP code continue, including support for loading libraries and probes with IPC4 on SOF. - Support for more sample formats on JZ4740 - Lots of device tree conversions and fixups - Support for Allwinner D1, a range of AMD and Intel systems, Mediatek systems with multiple DMICs, Nuvoton NAU8318, NXP fsl_rpmsg and i.MX93, Qualcomm AudioReach Enable, MFC and SAL, RealTek RT1318 and Rockchip RK3588 ALSA: - Addition of PCM kselftest; still minimalistic but can be extended in future - Fixes for corner-case XRUNs with USB-audio implicit feedback mode - Usual device-specific quirk updates for USB- and HD-audio - FireWire DICE updates This also contains a few cross-tree updates: - Some OMAP board file updates for removal of relevant OMAP platforms - A new I2C API update for I2C probe API adaption - A DRM update for the further hdmi-codec updates" * tag 'sound-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (417 commits) ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt ALSA: patch_realtek: Fix Dell Inspiron Plus 16 ALSA: hda/cirrus: Add extra 10 ms delay to allow PLL settle and lock. ASoC: dt-bindings: Correct Alexandre Belloni email ASoC: dt-bindings: maxim,max98504: Convert to DT schema ASoC: dt-bindings: maxim,max98357a: Convert to DT schema ASoC: dt-bindings: Reference common DAI properties ASoC: dt-bindings: Extend name-prefix.yaml into common DAI properties ASoC: rt715: Make read-only arrays capture_reg_H and capture_reg_L static const ASoC: uniphier: aio-core: Make some read-only arrays static const ASoC: wcd938x: Make read-only array minCode_param static const ASoC: qcom: lpass-sc7280: Add maybe_unused tag for system PM ops ASoC : SOF: amd: Add support for IPC and DSP dumps ASoC: SOF: amd: Use poll function instead to read ACP_SHA_DSP_FW_QUALIFIER ALSA: usb-audio: Workaround for XRUN at prepare ALSA: pcm: Handle XRUN at trigger START ALSA: pcm: Set missing stop_operating flag at undoing trigger start drm: tda99x: Don't advertise non-existent capture support ASoC: hdmi-codec: Allow playback and capture to be disabled kselftest/alsa: Add more coverage of sample rates and channel counts ... commit 8715c6d3100fc7c6edddf29af4a399a1c12d028c Merge: 8ecd28b7a3a4 7991dbff6849 Author: Linus Torvalds Date: Tue Dec 13 10:58:09 2022 -0800 Merge tag 'for-6.2/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Fix use-after-free races due to missing resource cleanup during DM target destruction in DM targets: thin-pool, cache, integrity and clone. - Fix ABBA deadlocks in DM thin-pool and cache targets due to their use of a bufio client (that has a shrinker whose locking can cause the incorrect locking order). - Fix DM cache target to set its needs_check flag after first aborting the metadata (whereby using reset persistent-data objects to update the superblock with, otherwise the superblock update could be dropped due to aborting metadata). This was found with code-inspection when comparing with the equivalent in DM thinp code. - Fix DM thin-pool's presume to continue resuming the device even if the pool in is fail mode -- otherwise bios may never be failed up the IO stack (which will prevent resetting the thin-pool target via table reload) - Fix DM thin-pool's metadata to use proper btree root (from previous transaction) if metadata commit failed. - Add 'waitfor' module param to DM module (dm_mod) to allow dm-init to wait for the specified device before continuing with its DM target initialization. * tag 'for-6.2/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm thin: Use last transaction's pmd->root when commit failed dm init: add dm-mod.waitfor to wait for asynchronously probed block devices dm ioctl: fix a couple ioctl codes dm ioctl: a small code cleanup in list_version_get_info dm thin: resume even if in FAIL mode dm cache: set needs_check flag after aborting metadata dm cache: Fix ABBA deadlock between shrink_slab and dm_cache_metadata_abort dm thin: Fix ABBA deadlock between shrink_slab and dm_pool_abort_metadata dm integrity: Fix UAF in dm_integrity_dtr() dm cache: Fix UAF in destroy() dm clone: Fix UAF in clone_dtr() dm thin: Fix UAF in run_timer_softirq() commit 8ecd28b7a3a4c43a875a8840851f72468a2ca1d7 Merge: ce8a79d5601a f07788079f51 Author: Linus Torvalds Date: Tue Dec 13 10:54:19 2022 -0800 Merge tag 'ata-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ata updates from Damien Le Moal: "The ususal set of driver fixes and improvements as well as several patches improving libata core in preparation of the introduction of the support for the command duration limits feature. In more details: - Define the missing COMPLETED sense key in scsi header (me) - Several patches to improve libata handling of the status of completed commands and the retry and sense data reported to the scsi layer for failed commands. In particular, this widen the support for NCQ autosense to all drives that support this feature instead of restricting this feature use to ZAC drives only (Niklas) - Cleanup of the pata_mpc52xx and sata_dwc_460ex drivers to remove the use of the deprecated NO_IRQ macro (Christophe) - Fix build dedependency on OF vs use of the of_match_ptr() macro to avoid build errors with the sata_gemini and pata_ftide010 drivers (me) - Some libata cleanups using the new helper function ata_port_is_frozen() (Niklas) - Improve internal command handling by not retrying commands that failed with a timeout (Niklas) - Remove code for several unused libata helper functions (from Niklas) - Remove the palmchip pata_bk3710 driver. A couple of other driver removal should come in through the arm tree pull request (from Arnd) - Remove unused variable and function in the sata_dwc_460ex driver and libata-sff code (Colin and Sergey) - Minor cleanup of the pata_ep93xx driver platform code (from Minghao) - Remove the unnecessary linux/msi.h include from the ahci driver (Thomas) - Changes to libata enum constants definitions to avoid warnings with gcc-13 (Arnd)" * tag 'ata-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: (24 commits) ata: ahci: fix enum constants for gcc-13 ata: libata: fix commands incorrectly not getting retried during NCQ error ata: ahci: Remove linux/msi.h include ata: sata_dwc_460ex: Check !irq instead of irq == NO_IRQ ata: pata_ep93xx: use devm_platform_get_and_ioremap_resource() ata: libata-sff: kill unused ata_sff_busy_sleep() ata: sata_dwc_460ex: remove variable num_processed ata: remove palmchip pata_bk3710 driver ata: remove unused helper ata_id_flush_ext_enabled() ata: remove unused helper ata_id_flush_enabled() ata: remove unused helper ata_id_lba48_enabled() ata: libata-core: do not retry reading the log on timeout scsi: libsas: make use of ata_port_is_frozen() helper ata: make use of ata_port_is_frozen() helper ata: add ata_port_is_frozen() helper ata: pata_ftide010: Remove build dependency on OF ata: sata_gemini: Remove dependency on OF for compile tests ata: pata_mpc52xx: Replace NO_IRQ with 0 ata: libahci: read correct status and error field for NCQ commands ata: libata: fetch sense data for ATA devices supporting sense reporting ... commit ce8a79d5601aab94c02ed4539c48e8605422ac94 Merge: 96f7e448b9f4 f596da3efaf4 Author: Linus Torvalds Date: Tue Dec 13 10:43:59 2022 -0800 Merge tag 'for-6.2/block-2022-12-08' of git://git.kernel.dk/linux Pull block updates from Jens Axboe: - NVMe pull requests via Christoph: - Support some passthrough commands without CAP_SYS_ADMIN (Kanchan Joshi) - Refactor PCIe probing and reset (Christoph Hellwig) - Various fabrics authentication fixes and improvements (Sagi Grimberg) - Avoid fallback to sequential scan due to transient issues (Uday Shankar) - Implement support for the DEAC bit in Write Zeroes (Christoph Hellwig) - Allow overriding the IEEE OUI and firmware revision in configfs for nvmet (Aleksandr Miloserdov) - Force reconnect when number of queue changes in nvmet (Daniel Wagner) - Minor fixes and improvements (Uros Bizjak, Joel Granados, Sagi Grimberg, Christoph Hellwig, Christophe JAILLET) - Fix and cleanup nvme-fc req allocation (Chaitanya Kulkarni) - Use the common tagset helpers in nvme-pci driver (Christoph Hellwig) - Cleanup the nvme-pci removal path (Christoph Hellwig) - Use kstrtobool() instead of strtobool (Christophe JAILLET) - Allow unprivileged passthrough of Identify Controller (Joel Granados) - Support io stats on the mpath device (Sagi Grimberg) - Minor nvmet cleanup (Sagi Grimberg) - MD pull requests via Song: - Code cleanups (Christoph) - Various fixes - Floppy pull request from Denis: - Fix a memory leak in the init error path (Yuan) - Series fixing some batch wakeup issues with sbitmap (Gabriel) - Removal of the pktcdvd driver that was deprecated more than 5 years ago, and subsequent removal of the devnode callback in struct block_device_operations as no users are now left (Greg) - Fix for partition read on an exclusively opened bdev (Jan) - Series of elevator API cleanups (Jinlong, Christoph) - Series of fixes and cleanups for blk-iocost (Kemeng) - Series of fixes and cleanups for blk-throttle (Kemeng) - Series adding concurrent support for sync queues in BFQ (Yu) - Series bringing drbd a bit closer to the out-of-tree maintained version (Christian, Joel, Lars, Philipp) - Misc drbd fixes (Wang) - blk-wbt fixes and tweaks for enable/disable (Yu) - Fixes for mq-deadline for zoned devices (Damien) - Add support for read-only and offline zones for null_blk (Shin'ichiro) - Series fixing the delayed holder tracking, as used by DM (Yu, Christoph) - Series enabling bio alloc caching for IRQ based IO (Pavel) - Series enabling userspace peer-to-peer DMA (Logan) - BFQ waker fixes (Khazhismel) - Series fixing elevator refcount issues (Christoph, Jinlong) - Series cleaning up references around queue destruction (Christoph) - Series doing quiesce by tagset, enabling cleanups in drivers (Christoph, Chao) - Series untangling the queue kobject and queue references (Christoph) - Misc fixes and cleanups (Bart, David, Dawei, Jinlong, Kemeng, Ye, Yang, Waiman, Shin'ichiro, Randy, Pankaj, Christoph) * tag 'for-6.2/block-2022-12-08' of git://git.kernel.dk/linux: (247 commits) blktrace: Fix output non-blktrace event when blk_classic option enabled block: sed-opal: Don't include sed-opal: allow using IOC_OPAL_SAVE for locking too blk-cgroup: Fix typo in comment block: remove bio_set_op_attrs nvmet: don't open-code NVME_NS_ATTR_RO enumeration nvme-pci: use the tagset alloc/free helpers nvme: add the Apple shared tag workaround to nvme_alloc_io_tag_set nvme: only set reserved_tags in nvme_alloc_io_tag_set for fabrics controllers nvme: consolidate setting the tagset flags nvme: pass nr_maps explicitly to nvme_alloc_io_tag_set block: bio_copy_data_iter nvme-pci: split out a nvme_pci_ctrl_is_dead helper nvme-pci: return early on ctrl state mismatch in nvme_reset_work nvme-pci: rename nvme_disable_io_queues nvme-pci: cleanup nvme_suspend_queue nvme-pci: remove nvme_pci_disable nvme-pci: remove nvme_disable_admin_queue nvme: merge nvme_shutdown_ctrl into nvme_disable_ctrl nvme: use nvme_wait_ready in nvme_shutdown_ctrl ... commit 96f7e448b9f4546ffd0356ffceb2b9586777f316 Merge: 54e60e505d61 761c61c15903 Author: Linus Torvalds Date: Tue Dec 13 10:40:31 2022 -0800 Merge tag 'for-6.2/io_uring-next-2022-12-08' of git://git.kernel.dk/linux Pull io_uring updates part two from Jens Axboe: - Misc fixes (me, Lin) - Series from Pavel extending the single task exclusive ring mode, yielding nice improvements for the common case of having a single ring per thread (Pavel) - Cleanup for MSG_RING, removing our IOPOLL hack (Pavel) - Further poll cleanups and fixes (Pavel) - Misc cleanups and fixes (Pavel) * tag 'for-6.2/io_uring-next-2022-12-08' of git://git.kernel.dk/linux: (22 commits) io_uring/msg_ring: flag target ring as having task_work, if needed io_uring: skip spinlocking for ->task_complete io_uring: do msg_ring in target task via tw io_uring: extract a io_msg_install_complete helper io_uring: get rid of double locking io_uring: never run tw and fallback in parallel io_uring: use tw for putting rsrc io_uring: force multishot CQEs into task context io_uring: complete all requests in task context io_uring: don't check overflow flush failures io_uring: skip overflow CQE posting for dying ring io_uring: improve io_double_lock_ctx fail handling io_uring: dont remove file from msg_ring reqs io_uring: reshuffle issue_flags io_uring: don't reinstall quiesce node for each tw io_uring: improve rsrc quiesce refs checks io_uring: don't raw spin unlock to match cq_lock io_uring: combine poll tw handlers io_uring: improve poll warning handling io_uring: remove ctx variable in io_poll_check_events ... commit 54e60e505d6144a22c787b5be1fdce996a27be1b Merge: d523ec4c6af4 5d772916855f Author: Linus Torvalds Date: Tue Dec 13 10:33:08 2022 -0800 Merge tag 'for-6.2/io_uring-2022-12-08' of git://git.kernel.dk/linux Pull io_uring updates from Jens Axboe: - Always ensure proper ordering in case of CQ ring overflow, which then means we can remove some work-arounds for that (Dylan) - Support completion batching for multishot, greatly increasing the efficiency for those (Dylan) - Flag epoll/eventfd wakeups done from io_uring, so that we can easily tell if we're recursing into io_uring again. Previously, this would have resulted in repeated multishot notifications if we had a dependency there. That could happen if an eventfd was registered as the ring eventfd, and we multishot polled for events on it. Or if an io_uring fd was added to epoll, and io_uring had a multishot request for the epoll fd. Test cases here: https://git.kernel.dk/cgit/liburing/commit/?id=919755a7d0096fda08fb6d65ac54ad8d0fe027cd Previously these got terminated when the CQ ring eventually overflowed, now it's handled gracefully (me). - Tightening of the IOPOLL based completions (Pavel) - Optimizations of the networking zero-copy paths (Pavel) - Various tweaks and fixes (Dylan, Pavel) * tag 'for-6.2/io_uring-2022-12-08' of git://git.kernel.dk/linux: (41 commits) io_uring: keep unlock_post inlined in hot path io_uring: don't use complete_post in kbuf io_uring: spelling fix io_uring: remove io_req_complete_post_tw io_uring: allow multishot polled reqs to defer completion io_uring: remove overflow param from io_post_aux_cqe io_uring: add lockdep assertion in io_fill_cqe_aux io_uring: make io_fill_cqe_aux static io_uring: add io_aux_cqe which allows deferred completion io_uring: allow defer completion for aux posted cqes io_uring: defer all io_req_complete_failed io_uring: always lock in io_apoll_task_func io_uring: remove iopoll spinlock io_uring: iopoll protect complete_post io_uring: inline __io_req_complete_put() io_uring: remove io_req_tw_post_queue io_uring: use io_req_task_complete() in timeout io_uring: hold locks for io_req_complete_failed io_uring: add completion locking for iopoll io_uring: kill io_cqring_ev_posted() and __io_cq_unlock_post() ... commit d523ec4c6af4314575d6ab8b52629ae3e2039a50 Merge: a45a7db9bc7b f1bd37a47352 Author: Linus Torvalds Date: Tue Dec 13 10:29:22 2022 -0800 Merge tag 'iomap-6.2-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap update from Darrick Wong: - Minor code cleanup to eliminate unnecessary bit shifting * tag 'iomap-6.2-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: directly use logical block size commit a45a7db9bc7b9e36f213330dcb13356b86a5633a Merge: 02bf43c7b7f7 a79168a0c00d Author: Linus Torvalds Date: Tue Dec 13 10:26:38 2022 -0800 Merge tag 'vfs-6.2-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull vfs remap_range update from Darrick Wong: - Make some minor adjustments to the remap range preparation function to skip file updates when the request length is adjusted downwards to zero. * tag 'vfs-6.2-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: fs/remap_range: avoid spurious writeback on zero length request commit 31a2e6cbe8a4eb0d1650fff4b77872b744e14a62 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 (cherry picked from commit 35168a6c4ed53db4f786858bac23b1474fd7d0dc) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_migrate.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 3153eebb7a76e663ac76d6670dc113296de96622 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 (cherry picked from commit be4a847652056b067d6dc6fe0fc024a9e2e987ca) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dp.c | 59 --------------------------------- 1 file changed, 59 deletions(-) commit b2e9e6a9cb87ce4a82fb106ae16c94639835fd47 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 (cherry picked from commit a467a243554a64b418c14d7531a3b18c03d53bff) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/g4x_dp.c | 4 ++-- drivers/gpu/drm/i915/display/g4x_hdmi.c | 25 +++++++++++++++++++------ 2 files changed, 21 insertions(+), 8 deletions(-) commit 7bd220f2ba9014b78f0304178103393554b8c4fe Author: YC Hung Date: Tue Dec 13 19:56:17 2022 +0800 ASoC: SOF: mediatek: initialize panic_info to zero Coverity spotted that panic_info is not initialized to zero in mtk_adsp_dump. Using uninitialized value panic_info.linenum when calling snd_sof_get_status. Fix this coverity by initializing panic_info struct as zero. Signed-off-by: YC Hung Reviewed-by: Curtis Malainey Link: https://lore.kernel.org/r/20221213115617.25086-1-yc.hung@mediatek.com Signed-off-by: Mark Brown sound/soc/sof/mediatek/mtk-adsp-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c900dcc3f7331a67ed29739d74524e428d137fb Author: Hans de Goede Date: Tue Dec 13 13:33:19 2022 +0100 ASoC: rt5670: Remove unbalanced pm_runtime_put() For some reason rt5670_i2c_probe() does a pm_runtime_put() at the end of a successful probe. But it has never done a pm_runtime_get() leading to the following error being logged into dmesg: rt5670 i2c-10EC5640:00: Runtime PM usage count underflow! Fix this by removing the unnecessary pm_runtime_put(). Fixes: 64e89e5f5548 ("ASoC: rt5670: Add runtime PM support") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20221213123319.11285-1-hdegoede@redhat.com Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 2 -- 1 file changed, 2 deletions(-) commit a1dec9d70b6ad97087b60b81d2492134a84208c6 Author: Hans de Goede Date: Tue Dec 13 13:32:46 2022 +0100 ASoC: Intel: bytcr_rt5640: Add quirk for the Advantech MICA-071 tablet The Advantech MICA-071 tablet deviates from the defaults for a non CR Bay Trail based tablet in several ways: 1. It uses an analog MIC on IN3 rather then using DMIC1 2. It only has 1 speaker 3. It needs the OVCD current threshold to be set to 1500uA instead of the default 2000uA to reliable differentiate between headphones vs headsets Add a quirk with these settings for this tablet. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221213123246.11226-1-hdegoede@redhat.com Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 02bf43c7b7f7a19aa59a75f5244f0a3408bace1a Merge: c76ff350bd57 3b4c7bc01727 Author: Linus Torvalds Date: Tue Dec 13 10:08:36 2022 -0800 Merge tag 'fs.xattr.simple.rework.rbtree.rwlock.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull simple-xattr updates from Christian Brauner: "This ports the simple xattr infrastucture to rely on a simple rbtree protected by a read-write lock instead of a linked list protected by a spinlock. A while ago we received reports about scaling issues for filesystems using the simple xattr infrastructure that also support setting a larger number of xattrs. Specifically, cgroups and tmpfs. Both cgroupfs and tmpfs can be mounted by unprivileged users in unprivileged containers and root in an unprivileged container can set an unrestricted number of security.* xattrs and privileged users can also set unlimited trusted.* xattrs. A few more words on further that below. Other xattrs such as user.* are restricted for kernfs-based instances to a fairly limited number. As there are apparently users that have a fairly large number of xattrs we should scale a bit better. Using a simple linked list protected by a spinlock used for set, get, and list operations doesn't scale well if users use a lot of xattrs even if it's not a crazy number. Let's switch to a simple rbtree protected by a rwlock. It scales way better and gets rid of the perf issues some people reported. We originally had fancier solutions even using an rcu+seqlock protected rbtree but we had concerns about being to clever and also that deletion from an rbtree with rcu+seqlock isn't entirely safe. The rbtree plus rwlock is perfectly fine. By far the most common operation is getting an xattr. While setting an xattr is not and should be comparatively rare. And listxattr() often only happens when copying xattrs between files or together with the contents to a new file. Holding a lock across listxattr() is unproblematic because it doesn't list the values of xattrs. It can only be used to list the names of all xattrs set on a file. And the number of xattr names that can be listed with listxattr() is limited to XATTR_LIST_MAX aka 65536 bytes. If a larger buffer is passed then vfs_listxattr() caps it to XATTR_LIST_MAX and if more xattr names are found it will return -E2BIG. In short, the maximum amount of memory that can be retrieved via listxattr() is limited and thus listxattr() bounded. Of course, the API is broken as documented on xattr(7) already. While I have no idea how the xattr api ended up in this state we should probably try to come up with something here at some point. An iterator pattern similar to readdir() as an alternative to listxattr() or something else. Right now it is extremly strange that users can set millions of xattrs but then can't use listxattr() to know which xattrs are actually set. And it's really trivial to do: for i in {1..1000000}; do setfattr -n security.$i -v $i ./file1; done And around 5000 xattrs it's impossible to use listxattr() to figure out which xattrs are actually set. So I have suggested that we try to limit the number of xattrs for simple xattrs at least. But that's a future patch and I don't consider it very urgent. A bonus of this port to rbtree+rwlock is that we shrink the memory consumption for users of the simple xattr infrastructure. This also adds kernel documentation to all the functions" * tag 'fs.xattr.simple.rework.rbtree.rwlock.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: xattr: use rbtree for simple_xattrs commit c76ff350bd57682ae12bea6383dd8baf4824ac96 Merge: 57888f7b952d 577cc1434e4c Author: Linus Torvalds Date: Tue Dec 13 09:47:48 2022 -0800 Merge tag 'lsm-pr-20221212' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm updates from Paul Moore: - Improve the error handling in the device cgroup such that memory allocation failures when updating the access policy do not potentially alter the policy. - Some minor fixes to reiserfs to ensure that it properly releases LSM-related xattr values. - Update the security_socket_getpeersec_stream() LSM hook to take sockptr_t values. Previously the net/BPF folks updated the getsockopt code in the network stack to leverage the sockptr_t type to make it easier to pass both kernel and __user pointers, but unfortunately when they did so they didn't convert the LSM hook. While there was/is no immediate risk by not converting the LSM hook, it seems like this is a mistake waiting to happen so this patch proactively does the LSM hook conversion. - Convert vfs_getxattr_alloc() to return an int instead of a ssize_t and cleanup the callers. Internally the function was never going to return anything larger than an int and the callers were doing some very odd things casting the return value; this patch fixes all that and helps bring a bit of sanity to vfs_getxattr_alloc() and its callers. - More verbose, and helpful, LSM debug output when the system is booted with "lsm.debug" on the command line. There are examples in the commit description, but the quick summary is that this patch provides better information about which LSMs are enabled and the ordering in which they are processed. - General comment and kernel-doc fixes and cleanups. * tag 'lsm-pr-20221212' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: lsm: Fix description of fs_context_parse_param lsm: Add/fix return values in lsm_hooks.h and fix formatting lsm: Clarify documentation of vm_enough_memory hook reiserfs: Add missing calls to reiserfs_security_free() lsm,fs: fix vfs_getxattr_alloc() return type and caller error paths device_cgroup: Roll back to original exceptions after copy failure LSM: Better reporting of actual LSMs at boot lsm: make security_socket_getpeersec_stream() sockptr_t safe audit: Fix some kernel-doc warnings lsm: remove obsoleted comments for security hooks fs: edit a comment made in bad taste commit 6e66e96e31b81fb08075d18a3e2c201f1e2171da Merge: c528ef0888b7 a39c636506cb Author: Palmer Dabbelt Date: Tue Dec 13 09:21:48 2022 -0800 Merge patch series "Documentation: RISC-V: patch-acceptance changes" Palmer Dabbelt says: We've had a patch acceptance policy that doesn't match reality, this changes the policy and also makes some more minor cleanups as well. * b4-shazam-merge: Documentation: RISC-V: patch-acceptance: s/implementor/implementer Documentation: RISC-V: Mention the UEFI Standards Documentation: RISC-V: Allow patches for non-standard behavior Documentation: RISC-V: Fix a typo in patch-acceptance Link: https://lore.kernel.org/r/20221207020815.16214-1-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt commit a39c636506cb90b9ba25cbb0a78bbcc3725ea227 Author: Palmer Dabbelt Date: Tue Dec 6 18:08:15 2022 -0800 Documentation: RISC-V: patch-acceptance: s/implementor/implementer Implementor does appear to be a word, but it's not very common. Suggested-by: Conor Dooley Reviewed-by: Anup Patel Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20221207020815.16214-5-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt Documentation/riscv/patch-acceptance.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 68eabc72023f2c1cdbf7932fde57a7811c65b414 Author: Palmer Dabbelt Date: Tue Dec 6 18:08:14 2022 -0800 Documentation: RISC-V: Mention the UEFI Standards The current patch acceptance policy requires that specifications are approved by the RISC-V foundation, but we rely on external specifications as well. This explicitly calls out the UEFI specifications that we're starting to depend on. Reviewed-by: Conor Dooley Reviewed-by: Atish Patra Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20221207020815.16214-4-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt Documentation/riscv/patch-acceptance.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 936100d4507f2e9f0be4621b0c698180d65e8264 Author: Palmer Dabbelt Date: Tue Dec 6 18:08:13 2022 -0800 Documentation: RISC-V: Allow patches for non-standard behavior The patch acceptance policy forbids accepting support for non-standard behavior. This policy was written in order to both steer implementers towards the standards and to avoid coupling the upstream kernel too tightly to vendor-specific features. Those were good goals, but in practice the policy just isn't working: every RISC-V system we have needs vendor-specific behavior in the kernel and we end up taking that support which violates the policy. That's confusing for contributors, which is the main reason we have a written policy in the first place. So let's just start taking code for vendor-defined behavior. Reviewed-by: Conor Dooley Reviewed-by: Anup Patel Signed-off-by: Paul Walmsley Link: https://lore.kernel.org/all/alpine.DEB.2.21.999.2211181027590.4480@utopia.booyaka.com/ [Palmer: merge in Paul's suggestions] Link: https://lore.kernel.org/r/20221207020815.16214-3-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt Documentation/riscv/patch-acceptance.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 57888f7b952d3f2696f82a701f1b3d9de7e346d3 Merge: bbdf4d54618c 048be156491f Author: Linus Torvalds Date: Tue Dec 13 09:32:05 2022 -0800 Merge tag 'selinux-pr-20221212' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: "Two SELinux patches: one increases the sleep time on deprecated functionality, and one removes the indirect calls in the sidtab context conversion code" * tag 'selinux-pr-20221212' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: remove the sidtab context conversion indirect calls selinux: increase the deprecation sleep for checkreqprot and runtime disable commit 37f0ab1477994a0d0dc3c1e0de030fae07d37965 Author: Palmer Dabbelt Date: Tue Dec 6 18:08:12 2022 -0800 Documentation: RISC-V: Fix a typo in patch-acceptance I just stumbled on this when modifying the docs. Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20221207020815.16214-2-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt Documentation/riscv/patch-acceptance.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbdf4d54618ca1d4af304eab6631d68fd2d6ce39 Merge: 299e2b196757 50979953c0c4 Author: Linus Torvalds Date: Tue Dec 13 09:20:06 2022 -0800 Merge tag 'audit-pr-20221212' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "Two performance oriented patches for the audit subsystem: one consolidates similar code to gain some caching advantages, while the other stores a value in a stack variable to avoid repeated lookups in a loop. The commit descriptions have more information, including some before/after performance measurements" * tag 'audit-pr-20221212' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: unify audit_filter_{uring(), inode_name(), syscall()} audit: cache ctx->major in audit_filter_syscall() commit 299e2b1967578b1442128ba8b3e86ed3427d3651 Merge: e529d3507a93 f6e53fb2d7bd Author: Linus Torvalds Date: Tue Dec 13 09:14:50 2022 -0800 Merge tag 'landlock-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull landlock updates from Mickaël Salaün: "This adds file truncation support to Landlock, contributed by Günther Noack. As described by Günther [1], the goal of these patches is to work towards a more complete coverage of file system operations that are restrictable with Landlock. The known set of currently unsupported file system operations in Landlock is described at [2]. Out of the operations listed there, truncate is the only one that modifies file contents, so these patches should make it possible to prevent the direct modification of file contents with Landlock. The new LANDLOCK_ACCESS_FS_TRUNCATE access right covers both the truncate(2) and ftruncate(2) families of syscalls, as well as open(2) with the O_TRUNC flag. This includes usages of creat() in the case where existing regular files are overwritten. Additionally, this introduces a new Landlock security blob associated with opened files, to track the available Landlock access rights at the time of opening the file. This is in line with Unix's general approach of checking the read and write permissions during open(), and associating this previously checked authorization with the opened file. An ongoing patch documents this use case [3]. In order to treat truncate(2) and ftruncate(2) calls differently in an LSM hook, we split apart the existing security_path_truncate hook into security_path_truncate (for truncation by path) and security_file_truncate (for truncation of previously opened files)" Link: https://lore.kernel.org/r/20221018182216.301684-1-gnoack3000@gmail.com [1] Link: https://www.kernel.org/doc/html/v6.1/userspace-api/landlock.html#filesystem-flags [2] Link: https://lore.kernel.org/r/20221209193813.972012-1-mic@digikod.net [3] * tag 'landlock-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: samples/landlock: Document best-effort approach for LANDLOCK_ACCESS_FS_REFER landlock: Document Landlock's file truncation support samples/landlock: Extend sample tool to support LANDLOCK_ACCESS_FS_TRUNCATE selftests/landlock: Test ftruncate on FDs created by memfd_create(2) selftests/landlock: Test FD passing from restricted to unrestricted processes selftests/landlock: Locally define __maybe_unused selftests/landlock: Test open() and ftruncate() in multiple scenarios selftests/landlock: Test file truncation support landlock: Support file truncation landlock: Document init_layer_masks() helper landlock: Refactor check_access_path_dual() into is_access_to_paths_allowed() security: Create file_truncate hook from path_truncate hook commit e529d3507a93d3c9528580081bbaf931a50de154 Merge: 6a24711d5c0b ffcb75458460 Author: Linus Torvalds Date: Tue Dec 13 09:05:19 2022 -0800 Merge tag 'dma-mapping-6.2-2022-12-13' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - reduce the swiotlb buffer size on allocation failure (Alexey Kardashevskiy) - clean up passing of bogus GFP flags to the dma-coherent allocator (Christoph Hellwig) * tag 'dma-mapping-6.2-2022-12-13' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: reject __GFP_COMP in dma_alloc_attrs ALSA: memalloc: don't pass bogus GFP_ flags to dma_alloc_* s390/ism: don't pass bogus GFP_ flags to dma_alloc_coherent cnic: don't pass bogus GFP_ flags to dma_alloc_coherent RDMA/qib: don't pass bogus GFP_ flags to dma_alloc_coherent RDMA/hfi1: don't pass bogus GFP_ flags to dma_alloc_coherent media: videobuf-dma-contig: use dma_mmap_coherent swiotlb: reduce the swiotlb buffer size on allocation failure commit 6a24711d5c0bc8fb0fc49def433ab89ecbedf095 Merge: a044dab5e6e5 77992f896745 Author: Linus Torvalds Date: Tue Dec 13 08:51:13 2022 -0800 Merge tag 'configfs-6.2-2022-12-13' of git://git.infradead.org/users/hch/configfs Pull configfs updates from Christoph Hellwig: - fix a memory leak in configfs_create_dir (Chen Zhongjin) - remove mentions of committable items that were implemented (Bartosz Golaszewski) * tag 'configfs-6.2-2022-12-13' of git://git.infradead.org/users/hch/configfs: configfs: remove mentions of committable items configfs: fix possible memory leak in configfs_create_dir() commit a044dab5e6e5f0c382a6a4af37d537fb2d8bacb7 Merge: 764822972d64 7fd461c47c6c Author: Linus Torvalds Date: Tue Dec 13 08:44:41 2022 -0800 Merge tag 'nfs-for-6.2-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust "Bugfixes: - Fix NULL pointer dereference in the mount parser - Fix memory stomp in decode_attr_security_label - Fix credential leak in _nfs4_discover_trunking() - Fix buffer leak in rpcrdma_req_create() - Fix leaked socket in rpc_sockname() - Fix deadlock between nfs4_open_recover_helper() and delegreturn - Fix an Oops in nfs_d_automount() - Fix potential race in nfs_call_unlink() - Multiple fixes for the open context mode - NFSv4.2 READ_PLUS fixes - Fix a regression in which small rsize/wsize values are being forbidden - Fail client initialisation if the NFSv4.x state manager thread can't run - Avoid spurious warning of lost lock that is being unlocked. - Ensure the initialisation of struct nfs4_label Features and cleanups: - Trigger the "ls -l" readdir heuristic sooner - Clear the file access cache upon login to ensure supplementary group info is in sync between the client and server - pnfs: Fix up the logging of layout stateids - NFSv4.2: Change the default KConfig value for READ_PLUS - Use sysfs_emit() instead of scnprintf() where appropriate" * tag 'nfs-for-6.2-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (24 commits) NFSv4.2: Change the default KConfig value for READ_PLUS NFSv4.x: Fail client initialisation if state manager thread can't run fs: nfs: sysfs: use sysfs_emit() to instead of scnprintf() NFS: use sysfs_emit() to instead of scnprintf() NFS: Allow very small rsize & wsize again NFSv4.2: Fix up READ_PLUS alignment NFSv4.2: Set the correct size scratch buffer for decoding READ_PLUS SUNRPC: Fix missing release socket in rpc_sockname() xprtrdma: Fix regbuf data not freed in rpcrdma_req_create() NFS: avoid spurious warning of lost lock that is being unlocked. nfs: fix possible null-ptr-deref when parsing param NFSv4: check FMODE_EXEC from open context mode in nfs4_opendata_access() NFS: make sure open context mode have FMODE_EXEC when file open for exec NFS4.x/pnfs: Fix up logging of layout stateids NFS: Fix a race in nfs_call_unlink() NFS: Fix an Oops in nfs_d_automount() NFSv4: Fix a deadlock between nfs4_open_recover_helper() and delegreturn NFSv4: Fix a credential leak in _nfs4_discover_trunking() NFS: Trigger the "ls -l" readdir heuristic sooner NFSv4.2: Fix initialisation of struct nfs4_label ... commit c528ef0888b75f673f7d48022de8d31d5b451e8c Author: Guo Ren Date: Wed Dec 7 04:11:12 2022 -0500 riscv: Fixup compile error with !MMU Current nommu_virt_defconfig can't compile: In file included from arch/riscv/kernel/crash_core.c:3: arch/riscv/kernel/crash_core.c: In function 'arch_crash_save_vmcoreinfo': arch/riscv/kernel/crash_core.c:8:27: error: 'VA_BITS' undeclared (first use in this function) 8 | VMCOREINFO_NUMBER(VA_BITS); | ^~~~~~~ Add MMU dependency for KEXEC_FILE. Fixes: 6261586e0c91 ("RISC-V: Add kexec_file support") Reported-by: Conor Dooley Reported-by: kernel test robot Signed-off-by: Guo Ren Signed-off-by: Guo Ren Tested-by: Conor Dooley Link: https://lore.kernel.org/r/20221207091112.2258674-1-guoren@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f722052c990b6a67d0dc0a13862b32ddbf567b95 Merge: ab6847b91190 05086f3db530 Author: Jiri Kosina Date: Tue Dec 13 14:42:44 2022 +0100 Merge branch 'for-6.2/wiimote' into for-linus - support for DJ Hero turntable (Joshua Jun) commit ab6847b91190b980203af86cf4ec35c64674872b Merge: 4e6ff447739f af89dfde2a5f Author: Jiri Kosina Date: Tue Dec 13 14:42:10 2022 +0100 Merge branch 'for-6.2/uclogic' into for-linus - XP-PEN Deco LW support (José Expósito) commit 4e6ff447739fad286f2334f48dca20bc8a133171 Merge: 6cd132b4f3d0 da03e502bb22 Author: Jiri Kosina Date: Tue Dec 13 14:41:13 2022 +0100 Merge branch 'for-6.2/sony' into for-linus - PS DualShock 4 controller support (Roderick Colenbrander) commit 6cd132b4f3d09b320ee81feec4c9758cd7e516ba Merge: 54dcc80e7d7c 9d013910df22 Author: Jiri Kosina Date: Tue Dec 13 14:40:18 2022 +0100 Merge branch 'for-6.2/sensor' into for-linus - support for more than one hinge sensor in hid-sensor-custom (Yauhen Kharuzhy) commit 54dcc80e7d7cf012f7e9f0801430890fe0ecc72a Merge: 9a6f62b54a12 9984fbf55b9b Author: Jiri Kosina Date: Tue Dec 13 14:37:43 2022 +0100 Merge branch 'for-6.2/rmi' into for-linus - wakeup event handling fix for RMI driver (Dmitry Torokhov) commit 9a6f62b54a129e6970f09bc6827db17e2919d96e Merge: 3daac75d283f 3d74c9eca1a2 Author: Jiri Kosina Date: Tue Dec 13 14:36:17 2022 +0100 Merge branch 'for-6.2/mcp2221' into for-linus - iio support for the MCP2221 HID driver (Matt Ranostay) commit 3daac75d283f47f9e605792cb8337e306f00f4d1 Merge: 57383f3c048d 8b7e58409b18 Author: Jiri Kosina Date: Tue Dec 13 14:35:07 2022 +0100 Merge branch 'for-6.2/logitech' into for-linus - always send SwID in GetProtocolVersion for Logitech HID++ (Andreas Bergmeier) commit 57383f3c048d421e6dcc73aba43eef1c73142203 Merge: 060e4b066e53 6df849caeb49 Author: Jiri Kosina Date: Tue Dec 13 14:34:43 2022 +0100 Merge branch 'for-6.2/intel-ish' into for-linus commit 060e4b066e53a5e988252bf9a3bebc5c5362ca93 Merge: 91e9b0218580 baf34f3bbe6d Author: Jiri Kosina Date: Tue Dec 13 14:33:13 2022 +0100 Merge branch 'for-6.2/i2c' into for-linus - conversion of I2C HID drivers to use new simplified I2C probing (Stephen Kitt) commit 91e9b0218580dec68d286b3ea337afc5f8ba2298 Merge: 8d437f11ee7d 6a4628997cfc Author: Jiri Kosina Date: Tue Dec 13 14:32:07 2022 +0100 Merge branch 'for-6.2/hyperv' into for-linus - functionally equivalent code cleanups for hyperv driver (Paulo Miguel Almeida) commit 8d437f11ee7ddf2841913b36e4f7600a12a45630 Merge: ab970ae1d638 fb5d783b3c66 Author: Jiri Kosina Date: Tue Dec 13 14:30:33 2022 +0100 Merge branch 'for-6.2/ft260' into for-linus - fixes and performance improvements to the hid-ft260 driver (Michael Zaidman) commit 875ef1a57f32fcb91010dc9bc8bd1166956a579e Author: Masahiro Yamada Date: Sun Dec 11 12:10:59 2022 +0900 kbuild: use .NOTINTERMEDIATE for future GNU Make versions In Kbuild, some files are generated by chains of pattern/implicit rules. For example, *.dtb.o files in drivers/of/unittest-data/Makefile are generated by the chain of 3 pattern rules, like this: %.dts -> %.dtb -> %.dtb.S -> %.dtb.o Here, %.dts is the real source, %.dtb.o is the final target. %.dtb and %.dtb.S are called "intermediate files". As GNU Make manual [1] says, intermediate files are treated differently in two ways: (a) The first difference is what happens if the intermediate file does not exist. If an ordinary file 'b' does not exist, and make considers a target that depends on 'b', it invariably creates 'b' and then updates the target from 'b'. But if 'b' is an intermediate file, then make can leave well enough alone: it won't create 'b' unless one of its prerequisites is out of date. This means the target depending on 'b' won't be rebuilt either, unless there is some other reason to update that target: for example the target doesn't exist or a different prerequisite is newer than the target. (b) The second difference is that if make does create 'b' in order to update something else, it deletes 'b' later on after it is no longer needed. Therefore, an intermediate file which did not exist before make also does not exist after make. make reports the deletion to you by printing a 'rm' command showing which file it is deleting. The combination of these is problematic for Kbuild because most of the build rules depend on FORCE and the if_changed* macros really determine if the target should be updated. So, all missing files, whether they are intermediate or not, are always rebuilt. To see the problem, delete ".SECONDARY:" from scripts/Kbuild.include, and repeat this command: $ make allmodconfig drivers/of/unittest-data/ The intermediate files will be deleted, which results in rebuilding intermediate and final objects in the next run of make. In the old days, people suppressed (b) in inconsistent ways. As commit 54a702f70589 ("kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers") noted, you should not use .PRECIOUS because .PRECIOUS has the following behavior (c), which is not likely what you want. (c) If make is killed or interrupted during the execution of their recipes, the target is not deleted. Also, the target is not deleted on error even if .DELETE_ON_ERROR is specified. .SECONDARY is a much better way to disable (b), but a small problem is that .SECONDARY enables (a), which gives a side-effect to $?; prerequisites marked as .SECONDARY do not appear in $?. This is a drawback for Kbuild. I thought it was a bug and opened a bug report. As Paul, the GNU Make maintainer, concluded in [2], this is not a bug. A good news is that, GNU Make 4.4 added the perfect solution, .NOTINTERMEDIATE, which cancels both (a) and (b). For clarificaton, my understanding of .INTERMEDIATE, .SECONDARY, .PRECIOUS and .NOTINTERMEDIATE are as follows: (a) (b) (c) .INTERMEDIATE enable enable disable .SECONDARY enable disable disable .PRECIOUS disable disable enable .NOTINTERMEDIATE disable disable disable However, GNU Make 4.4 has a bug for the global .NOTINTERMEDIATE. [3] It was fixed by commit 6164608900ad ("[SV 63417] Ensure global .NOTINTERMEDIATE disables all intermediates"), and will be available in the next release of GNU Make. The following is the gain for .NOTINTERMEDIATE: [Current Make] $ make allnoconfig vmlinux [ full build ] $ rm include/linux/device.h $ make vmlinux CALL scripts/checksyscalls.sh Make does not notice the removal of . [Future Make] $ make-latest allnoconfig vmlinux [ full build ] $ rm include/linux/device.h $ make-latest vmlinux CC arch/x86/kernel/asm-offsets.s In file included from ./include/linux/writeback.h:13, from ./include/linux/memcontrol.h:22, from ./include/linux/swap.h:9, from ./include/linux/suspend.h:5, from arch/x86/kernel/asm-offsets.c:13: ./include/linux/blk_types.h:11:10: fatal error: linux/device.h: No such file or directory 11 | #include | ^~~~~~~~~~~~~~~~ compilation terminated. make-latest[1]: *** [scripts/Makefile.build:114: arch/x86/kernel/asm-offsets.s] Error 1 make-latest: *** [Makefile:1282: prepare0] Error 2 Make notices the removal of , and rebuilds objects that depended on . There exists a source file that includes , and it raises an error. To see detailed background information, refer to commit 2d3b1b8f0da7 ("kbuild: drop $(wildcard $^) check in if_changed* for faster rebuild"). [1]: https://www.gnu.org/software/make/manual/make.html#Chained-Rules [2]: https://savannah.gnu.org/bugs/?55532 [3]: https://savannah.gnu.org/bugs/?63417 Signed-off-by: Masahiro Yamada scripts/Kbuild.include | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 3122c84409d578a5df8bcb1953547e0b871ac4c2 Author: Masahiro Yamada Date: Sun Dec 11 11:54:48 2022 +0900 kconfig: refactor Makefile to reduce process forks Refactor Makefile and use read-file macro. For Make >= 4.2, it can read out a file by using the built-in function. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier scripts/kconfig/.gitignore | 4 +++- scripts/kconfig/Makefile | 45 +++++++++++++++++++++++--------------------- scripts/kconfig/gconf-cfg.sh | 7 +++++-- scripts/kconfig/mconf-cfg.sh | 25 +++++++++++++----------- scripts/kconfig/nconf-cfg.sh | 23 ++++++++++++---------- scripts/kconfig/qconf-cfg.sh | 10 +++++++--- scripts/remove-stale-files | 2 ++ 7 files changed, 68 insertions(+), 48 deletions(-) commit 6768fa4bcb6c1618248f135d04b9287ba2724ae0 Author: Masahiro Yamada Date: Sun Dec 11 11:54:47 2022 +0900 kbuild: add read-file macro Since GNU Make 4.2, $(file ...) supports the read operater '<', which is useful to read a file without forking a new process. No warning is shown even if the input file is missing. For older Make versions, it falls back to the cat command. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Reviewed-by: Alexander Lobakin Tested-by: Alexander Lobakin Makefile | 2 +- scripts/Kbuild.include | 14 ++++++++++++++ scripts/Makefile.modfinal | 2 +- scripts/Makefile.modinst | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) commit a5db80c65dbf9144de155f8a0f08becc9c307db0 Author: Masahiro Yamada Date: Sun Dec 11 18:49:18 2022 +0900 kbuild: do not sort after reading modules.order modules.order lists modules in the deterministic order (that is why "modules order"), and there is no duplication in the list. $(sort ) is pointless. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier scripts/Makefile.modfinal | 2 +- scripts/Makefile.modinst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ab970ae1d63822228bdc84b9c1514efbd2f66da7 Merge: cfd1f6c16f7d 163a7fbff7a7 Author: Jiri Kosina Date: Tue Dec 13 14:28:47 2022 +0100 Merge branch 'for-6.2/default-remove-cleanup' into for-linus - removal of superfluous hid_hw_stop() calls for drivers with default .remove callback (Marcus Folkesson) commit cfd1f6c16f7deadfe5269a76c1516405c4466481 Merge: a9d9e46c755a fd7b68b763c4 Author: Jiri Kosina Date: Tue Dec 13 14:27:16 2022 +0100 Merge branch 'for-6.2/apple' into for-linus - new quirks for select Apple keyboards (Kerem Karabay, Aditya Garg) commit fccb3d3eda8d19b893e1fd18e8c70b78784b2a72 Author: Masahiro Yamada Date: Sun Dec 11 11:46:47 2022 +0900 kbuild: add test-{ge,gt,le,lt} macros GNU Make 4.4 introduced $(intcmp ...), which is useful to compare two integers without forking a new process. Add test-{ge,gt,le,lt} macros, which work more efficiently with GNU Make >= 4.4. For older Make versions, they fall back to the 'test' shell command. The first two parameters to $(intcmp ...) must not be empty. To avoid the syntax error, I appended '0' to them. Fortunately, '00' is treated as '0'. This is needed because CONFIG options may expand to an empty string when the kernel configuration is not included. Signed-off-by: Masahiro Yamada Acked-by: Palmer Dabbelt # RISC-V Reviewed-by: Nathan Chancellor Reviewed-by: Nicolas Schier Makefile | 2 +- arch/riscv/Makefile | 2 +- arch/x86/Makefile | 2 +- scripts/Kbuild.include | 16 ++++++++++++++++ scripts/Makefile.compiler | 4 ++-- 5 files changed, 21 insertions(+), 5 deletions(-) commit e4412739472b743e18860ad8d979a7ceb3071652 Author: Masahiro Yamada Date: Thu Oct 13 03:18:41 2022 +0900 Documentation: raise minimum supported version of binutils to 2.25 Binutils 2.23 was released in 2012. Almost 10 years old. We already require GCC 5.1, released in 2015. Bump the binutils version to 2.25, which was released some months before GCC 5.1. With this applied, some subsystems can start to clean up code. Examples: arch/arm/Kconfig.assembler arch/mips/vdso/Kconfig arch/powerpc/Makefile arch/x86/Kconfig.assembler Signed-off-by: Masahiro Yamada Acked-by: Linus Torvalds Reviewed-by: Nick Desaulniers Documentation/process/changes.rst | 4 ++-- scripts/min-tool-version.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2c05bf3aa0741f4f3c72432db7801371dbbcf289 Author: Christian Brauner Date: Tue Dec 13 12:28:51 2022 +0100 mnt_idmapping: move ima-only helpers to ima The vfs{g,u}id_{gt,lt}_* helpers are currently not needed outside of ima and we shouldn't incentivize people to use them by placing them into the header. Let's just define them locally in the one file in ima where they are used. Suggested-by: Linus Torvalds Signed-off-by: Christian Brauner (Microsoft) include/linux/mnt_idmapping.h | 20 -------------------- security/integrity/ima/ima_policy.c | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 20 deletions(-) commit f9645abe4255bd79e4c63799634c996dd53db321 Author: Sriram Yagnaraman Date: Mon Dec 12 11:07:05 2022 +0100 netfilter: conntrack: document sctp timeouts Exposed through sysctl, update documentation to describe sctp states and their default timeouts. Signed-off-by: Sriram Yagnaraman Signed-off-by: Pablo Neira Ayuso Documentation/networking/nf_conntrack-sysctl.rst | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit ba57ee0944ff0085652cf8df91f9c571883debe6 Author: Li Qiong Date: Mon Dec 12 15:43:51 2022 +0800 ipvs: add a 'default' case in do_ip_vs_set_ctl() It is better to return the default switch case with '-EINVAL', in case new commands are added. otherwise, return a uninitialized value of ret. Signed-off-by: Li Qiong Reviewed-by: Simon Horman Acked-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_ctl.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1a34e7f2fcbaaeb3c88858d2e4655bc93038ec9b Merge: 830b3c68c1fb bee74dcbd390 6132a490f9c8 Author: Huacai Chen Date: Tue Dec 13 19:19:41 2022 +0800 Merge tags 'acpi-6.2-rc1' and 'irq-core-2022-12-10' into loongarch-next LoongArch architecture changes for 6.2 depend on the acpi and irqchip changes to work, so merge them to create a base. commit 36955d368dc101be885ad2c71618e3c3a93cd8ee Author: Yuezhang Mo Date: Thu Nov 17 11:31:30 2022 +0800 exfat: reuse exfat_find_location() to simplify exfat_get_dentry_set() In exfat_get_dentry_set(), part of the code is the same as exfat_find_location(), reuse exfat_find_location() to simplify exfat_get_dentry_set(). Code refinement, no functional changes. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/dir.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 40306b4d1ba25970dafd53432e8daa5d591ebd99 Author: Yuezhang Mo Date: Tue Dec 13 09:40:32 2022 +0800 exfat: fix overflow in sector and cluster conversion According to the exFAT specification, there are at most 2^32-11 clusters in a volume. so using 'int' is not enough for cluster index, the return value type of exfat_sector_to_cluster() should be 'unsigned int'. Signed-off-by: Yuezhang Mo Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/exfat_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c4a6309e27f411743817fe74a832ec2d2798a4b Author: Jakub Kicinski Date: Mon Dec 12 19:20:37 2022 -0800 ipvs: fix type warning in do_div() on 32 bit 32 bit platforms without 64bit div generate the following warning: net/netfilter/ipvs/ip_vs_est.c: In function 'ip_vs_est_calc_limits': include/asm-generic/div64.h:222:35: warning: comparison of distinct pointer types lacks a cast 222 | (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ | ^~ net/netfilter/ipvs/ip_vs_est.c:694:17: note: in expansion of macro 'do_div' 694 | do_div(val, loops); | ^~~~~~ include/asm-generic/div64.h:222:35: warning: comparison of distinct pointer types lacks a cast 222 | (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ | ^~ net/netfilter/ipvs/ip_vs_est.c:700:33: note: in expansion of macro 'do_div' 700 | do_div(val, min_est); | ^~~~~~ first argument of do_div() should be unsigned. We can't just cast as do_div() updates it as well, so we need an lval. Make val unsigned in the first place, all paths check that the value they assign to this variables are non-negative already. Fixes: 705dd3444081 ("ipvs: use kthreads for stats estimation") Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20221213032037.844517-1-kuba@kernel.org Signed-off-by: Paolo Abeni net/netfilter/ipvs/ip_vs_est.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b11919e1bb7f6f6273f5a33947b8496da2769eb8 Merge: d1c722867f80 e095493091e8 Author: Paolo Abeni Date: Tue Dec 13 09:24:49 2022 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Merge in the left-over fixes before the net-next pull-request. net/mptcp/subflow.c d3295fee3c75 ("mptcp: use proper req destructor for IPv6") 36b122baf6a8 ("mptcp: add subflow_v(4,6)_send_synack()") Signed-off-by: Paolo Abeni commit f728a5ea27c92133893590e731ce10f6561ced87 Author: Christian König Date: Tue Dec 6 14:07:49 2022 +0100 dma-buf: fix dma_buf_export init order v2 The init order and resulting error handling in dma_buf_export was pretty messy. Subordinate objects like the file and the sysfs kernel objects were initializing and wiring itself up with the object in the wrong order resulting not only in complicating and partially incorrect error handling, but also in publishing only halve initialized DMA-buf objects. Clean this up thoughtfully by allocating the file independent of the DMA-buf object. Then allocate and initialize the DMA-buf object itself, before publishing it through sysfs. If everything works as expected the file is then connected with the DMA-buf object and publish it through debugfs. Also adds the missing dma_resv_fini() into the error handling. v2: add some missing changes to dma_bug_getfile() and a missing NULL check in dma_buf_file_release() Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Reviewed-by: T.J. Mercier Acked-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20221209071535.933698-1-christian.koenig@amd.com drivers/dma-buf/dma-buf-sysfs-stats.c | 7 +-- drivers/dma-buf/dma-buf-sysfs-stats.h | 4 +- drivers/dma-buf/dma-buf.c | 84 ++++++++++++++++------------------- 3 files changed, 43 insertions(+), 52 deletions(-) commit 71fc3621efc38ace9640ee6a0db3300900689592 Author: Alexandre Ghiti Date: Thu Dec 1 14:51:28 2022 +0100 riscv: Fix P4D_SHIFT definition for 3-level page table mode RISC-V kernels support 3,4,5-level page tables at runtime by folding upper levels. In case of a 3-level page table, PGDIR is folded into P4D which in turn is folded into PUD: PGDIR_SHIFT value is correctly set to the same value as PUD_SHIFT, but P4D_SHIFT is not, then any use of P4D_SHIFT will access invalid address bits (all set to 1). Fix this by dynamically defining P4D_SHIFT value, like we already do for PGDIR_SHIFT. Fixes: d10efa21a937 ("riscv: mm: Control p4d's folding by pgtable_l5_enabled") Signed-off-by: Alexandre Ghiti Reviewed-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221201135128.1482189-2-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/pgtable-64.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e923f4625ed3ad7656c3f9f086c898798bafbbc5 Author: Andrew Jones Date: Thu Dec 1 12:37:50 2022 +0100 riscv: Apply a static assert to riscv_isa_ext_id Add a static assert to ensure a RISCV_ISA_EXT_* enum is never created with a value >= RISCV_ISA_EXT_MAX. We can do this by putting RISCV_ISA_EXT_ID_MAX to more work. Before it was redundant with RISCV_ISA_EXT_MAX and hence only used to document the limit. Now it grows with the enum and is used to check the limit. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20221201113750.18021-1-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/hwcap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 764822972d64e7f3e6792278ecc7a3b3c81087cd Merge: 149c51f87632 e78e274eb22d Author: Linus Torvalds Date: Mon Dec 12 20:54:39 2022 -0800 Merge tag 'nfsd-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd updates from Chuck Lever: "This release introduces support for the CB_RECALL_ANY operation. NFSD can send this operation to request that clients return any delegations they choose. The server uses this operation to handle low memory scenarios or indicate to a client when that client has reached the maximum number of delegations the server supports. The NFSv4.2 READ_PLUS operation has been simplified temporarily whilst support for sparse files in local filesystems and the VFS is improved. Two major data structure fixes appear in this release: - The nfs4_file hash table is replaced with a resizable hash table to reduce the latency of NFSv4 OPEN operations. - Reference counting in the NFSD filecache has been hardened against races. In furtherance of removing support for NFSv2 in a subsequent kernel release, a new Kconfig option enables server-side support for NFSv2 to be left out of a kernel build. MAINTAINERS has been updated to indicate that changes to fs/exportfs should go through the NFSD tree" * tag 'nfsd-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (49 commits) NFSD: Avoid clashing function prototypes SUNRPC: Fix crasher in unwrap_integ_data() SUNRPC: Make the svc_authenticate tracepoint conditional NFSD: Use only RQ_DROPME to signal the need to drop a reply SUNRPC: Clean up xdr_write_pages() SUNRPC: Don't leak netobj memory when gss_read_proxy_verf() fails NFSD: add CB_RECALL_ANY tracepoints NFSD: add delegation reaper to react to low memory condition NFSD: add support for sending CB_RECALL_ANY NFSD: refactoring courtesy_client_reaper to a generic low memory shrinker trace: Relocate event helper files NFSD: pass range end to vfs_fsync_range() instead of count lockd: fix file selection in nlmsvc_cancel_blocked lockd: ensure we use the correct file descriptor when unlocking lockd: set missing fl_flags field when retrieving args NFSD: Use struct_size() helper in alloc_session() nfsd: return error if nfs4_setacl fails lockd: set other missing fields when unlocking files NFSD: Add an nfsd_file_fsync tracepoint sunrpc: svc: Remove an unused static function svc_ungetu32() ... commit 149c51f876322d9bfbd5e2d6ffae7aff3d794384 Merge: 97971df811b8 b7af0635c87f Author: Linus Torvalds Date: Mon Dec 12 20:47:51 2022 -0800 Merge tag 'for-6.2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "This round there are a lot of cleanups and moved code so the diffstat looks huge, otherwise there are some nice performance improvements and an update to raid56 reliability. User visible features: - raid56 reliability vs performance trade off: - fix destructive RMW for raid5 data (raid6 still needs work): do full checksum verification for all data during RMW cycle, this should prevent rewriting potentially corrupted data without notice - stripes are cached in memory which should reduce the performance impact but still can hurt some workloads - checksums are verified after repair again - this is the last option without introducing additional features (write intent bitmap, journal, another tree), the extra checksum read/verification was supposed to be avoided by the original implementation exactly for performance reasons but that caused all the reliability problems - discard=async by default for devices that support it - implement emergency flush reserve to avoid almost all unnecessary transaction aborts due to ENOSPC in cases where there are too many delayed refs or delayed allocation - skip block group synchronization if there's no change in used bytes, can reduce transaction commit count for some workloads Performance improvements: - fiemap and lseek: - overall speedup due to skipping unnecessary or duplicate searches (-40% run time) - cache some data structures and sharedness of extents (-30% run time) - send: - faster backref resolution when finding clones - cached leaf to root mapping for faster backref walking - improved clone/sharing detection - overall run time improvements (-70%) Core: - module initialization converted to a table of function pointers run in a sequence - preparation for fscrypt, extend passing file names across calls, dir item can store encryption status - raid56 updates: - more accurate error tracking of sectors within stripe - simplify recovery path and remove dedicated endio worker kthread - simplify scrub call paths - refactoring to support the extra data checksum verification during RMW cycle - tree block parentness checks consolidated and done at metadata read time - improved error handling - cleanups: - move a lot of code for better synchronization between kernel and user space sources, split big files - enum cleanups - GFP flag cleanups - header file cleanups, prototypes, dependencies - redundant parameter cleanups - inline extent handling simplifications - inode parameter conversion - data structure cleanups, reductions, renames, merges" * tag 'for-6.2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (249 commits) btrfs: print transaction aborted messages with an error level btrfs: sync some cleanups from progs into uapi/btrfs.h btrfs: do not BUG_ON() on ENOMEM when dropping extent items for a range btrfs: fix extent map use-after-free when handling missing device in read_one_chunk btrfs: remove outdated logic from overwrite_item() and add assertion btrfs: unify overwrite_item() and do_overwrite_item() btrfs: replace strncpy() with strscpy() btrfs: fix uninitialized variable in find_first_clear_extent_bit btrfs: fix uninitialized parent in insert_state btrfs: add might_sleep() annotations btrfs: add stack helpers for a few btrfs items btrfs: add nr_global_roots to the super block definition btrfs: remove BTRFS_LEAF_DATA_OFFSET btrfs: add helpers for manipulating leaf items and data btrfs: add eb to btrfs_node_key_ptr_offset btrfs: pass the extent buffer for the btrfs_item_nr helpers btrfs: move the csum helpers into ctree.h btrfs: move eb offset helpers into extent_io.h btrfs: move file_extent_item helpers into file-item.h btrfs: move leaf_data_end into ctree.c ... commit 97971df811b8854882c0f6c6631e23ab8cdcc44f Merge: 56c003e4db4a 7a5e9f1f83e3 Author: Linus Torvalds Date: Mon Dec 12 20:41:50 2022 -0800 Merge tag 'dlm-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "These patches include the usual cleanups and minor fixes, the removal of code that is no longer needed due to recent improvements, and improvements to processing large volumes of messages during heavy locking activity. Summary: - Misc code cleanup - Fix a couple of socket handling bugs: a double release on an error path and a data-ready race in an accept loop - Remove code for resending dir-remove messages. This code is no longer needed since the midcomms layer now ensures the messages are resent if needed - Add tracepoints for dlm messages - Improve callback queueing by replacing the fixed array with a list - Simplify the handling of a remove message followed by a lookup message by sending both without releasing a spinlock in between - Improve the concurrency of sending and receiving messages by holding locks for a shorter time, and changing how workqueues are used - Remove old code for shutting down sockets, which is no longer needed with the reliable connection handling that was recently added" * tag 'dlm-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: (37 commits) fs: dlm: fix building without lockdep fs: dlm: parallelize lowcomms socket handling fs: dlm: don't init error value fs: dlm: use saved sk_error_report() fs: dlm: use sock2con without checking null fs: dlm: remove dlm_node_addrs lookup list fs: dlm: don't put dlm_local_addrs on heap fs: dlm: cleanup listen sock handling fs: dlm: remove socket shutdown handling fs: dlm: use listen sock as dlm running indicator fs: dlm: use list_first_entry_or_null fs: dlm: remove twice INIT_WORK fs: dlm: add midcomms init/start functions fs: dlm: add dst nodeid for msg tracing fs: dlm: rename seq to h_seq for msg tracing fs: dlm: rename DLM_IFL_NEED_SCHED to DLM_IFL_CB_PENDING fs: dlm: ast do WARN_ON_ONCE() on hotpath fs: dlm: drop lkb ref in bug case fs: dlm: avoid false-positive checker warning fs: dlm: use WARN_ON_ONCE() instead of WARN_ON() ... commit 56c003e4db4adb1d57e599fb4c7d39f9130f9db1 Merge: cda6a60acc95 a60dca73a1a8 Author: Linus Torvalds Date: Mon Dec 12 20:38:28 2022 -0800 Merge tag 'jfs-6.2' of https://github.com/kleikamp/linux-shaggy Pull jfs updates from David Kleikamp: "Assorted JFS fixes for 6.2" * tag 'jfs-6.2' of https://github.com/kleikamp/linux-shaggy: jfs: makes diUnmount/diMount in jfs_mount_rw atomic jfs: Fix a typo in function jfs_umount fs: jfs: fix shift-out-of-bounds in dbDiscardAG jfs: Fix fortify moan in symlink jfs: remove redundant assignments to ipaimap and ipaimap2 jfs: remove unused declarations for jfs fs/jfs/jfs_xattr.h: Fix spelling typo in comment MAINTAINERS: git://github -> https://github.com for kleikamp fs/jfs: replace ternary operator with min_t() fs: jfs: fix shift-out-of-bounds in dbAllocAG commit cda6a60acc95cba93e9c17352ed485555adc661f Merge: 07d7a4d6961a 1f3868f06855 Author: Linus Torvalds Date: Mon Dec 12 20:32:50 2022 -0800 Merge tag 'fixes_for_v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull udf and ext2 fixes from Jan Kara: - a couple of smaller cleanups and fixes for ext2 - fixes of a data corruption issues in udf when handling holes and preallocation extents - fixes and cleanups of several smaller issues in udf - add maintainer entry for isofs * tag 'fixes_for_v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: Fix extending file within last block udf: Discard preallocation before extending file with a hole udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size udf: Fix preallocation discarding at indirect extent boundary udf: Increase UDF_MAX_READ_VERSION to 0x0260 fs/ext2: Fix code indentation ext2: unbugger ext2_empty_dir() udf: remove ->writepage ext2: remove ->writepage ext2: Don't flush page immediately for DIRSYNC directories ext2: Fix some kernel-doc warnings maintainers: Add ISOFS entry udf: Avoid double brelse() in udf_rename() fs: udf: Optimize udf_free_in_core_inode and udf_find_fileset function commit 07d7a4d6961a221af7023d08c89da8ed12fa7dda Merge: 6e8948a0630f e7eda157c407 Author: Linus Torvalds Date: Mon Dec 12 20:29:45 2022 -0800 Merge tag 'fs.xattr.simple.noaudit.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull xattr audit fix from Seth Forshee: "This is a single patch to remove auditing of the capability check in simple_xattr_list(). This check is done to check whether trusted xattrs should be included by listxattr(2). SELinux will normally log a denial when capable() is called and the task's SELinux context doesn't have the corresponding capability permission allowed, which can end up spamming the log. Since a failed check here cannot be used to infer malicious intent, auditing is of no real value, and it makes sense to stop auditing the capability check" * tag 'fs.xattr.simple.noaudit.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: fs: don't audit the capability check in simple_xattr_list() commit 6e8948a0630f9ee46cf03dbf65949c1f4b6f6dd2 Merge: 043930b1c889 42da66ac7bcb Author: Linus Torvalds Date: Mon Dec 12 20:24:51 2022 -0800 Merge tag 'fs.idmapped.squashfs.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull squashfs update from Seth Forshee: "This is a simple patch to enable idmapped mounts for squashfs. All functionality squashfs needs to support idmapped mounts is already implemented in generic VFS code, so all that is needed is to set FS_ALLOW_IDMAP in fs_flags" * tag 'fs.idmapped.squashfs.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: squashfs: enable idmapped mounts commit 043930b1c8895d626d340decfe9e418f7233edb8 Merge: 6df7cc226874 b138777786f7 Author: Linus Torvalds Date: Mon Dec 12 20:22:09 2022 -0800 Merge tag 'fuse-update-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse update from Miklos Szeredi: - Allow some write requests to proceed in parallel - Fix a performance problem with allow_sys_admin_access - Add a special kind of invalidation that doesn't immediately purge submounts - On revalidation treat the target of rename(RENAME_NOREPLACE) the same as open(O_EXCL) - Use type safe helpers for some mnt_userns transformations * tag 'fuse-update-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: Rearrange fuse_allow_current_process checks fuse: allow non-extending parallel direct writes on the same file fuse: remove the unneeded result variable fuse: port to vfs{g,u}id_t and associated helpers fuse: Remove user_ns check for FUSE_DEV_IOC_CLONE fuse: always revalidate rename target dentry fuse: add "expire only" mode to FUSE_NOTIFY_INVAL_ENTRY fs/fuse: Replace kmap() with kmap_local_page() commit 6df7cc2268745e91d090830c58689aa7fcbde6f9 Merge: 4a6bff118740 637d13b57d85 Author: Linus Torvalds Date: Mon Dec 12 20:18:26 2022 -0800 Merge tag 'ovl-update-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs update from Miklos Szeredi: - Fix a couple of bugs found by syzbot - Don't ingore some open flags set by fcntl(F_SETFL) - Fix failure to create a hard link in certain cases - Use type safe helpers for some mnt_userns transformations - Improve performance of mount - Misc cleanups * tag 'ovl-update-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: Kconfig: Fix spelling mistake "undelying" -> "underlying" ovl: use inode instead of dentry where possible ovl: Add comment on upperredirect reassignment ovl: use plain list filler in indexdir and workdir cleanup ovl: do not reconnect upper index records in ovl_indexdir_cleanup() ovl: fix comment typos ovl: port to vfs{g,u}id_t and associated helpers ovl: Use ovl mounter's fsuid and fsgid in ovl_link() ovl: Use "buf" flexible array for memcpy() destination ovl: update ->f_iocb_flags when ovl_change_flags() modifies ->f_flags ovl: fix use inode directly in rcu-walk mode commit 4a6bff1187409f2c2ba1b17234541d314f0680fc Merge: ad0d9da164cb c505feba4c0d Author: Linus Torvalds Date: Mon Dec 12 20:14:04 2022 -0800 Merge tag 'erofs-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "In this cycle, large folios are now enabled in the iomap/fscache mode for uncompressed files first. In order to do that, we've also cleaned up better interfaces between erofs and fscache, which are acked by fscache/netfs folks and included in this pull request. Other than that, there are random fixes around erofs over fscache and crafted images by syzbot, minor cleanups and documentation updates. Summary: - Enable large folios for iomap/fscache mode - Avoid sysfs warning due to mounting twice with the same fsid and domain_id in fscache mode - Refine fscache interface among erofs, fscache, and cachefiles - Use kmap_local_page() only for metabuf - Fixes around crafted images found by syzbot - Minor cleanups and documentation updates" * tag 'erofs-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: validate the extent length for uncompressed pclusters erofs: fix missing unmap if z_erofs_get_extent_compressedlen() fails erofs: Fix pcluster memleak when its block address is zero erofs: use kmap_local_page() only for erofs_bread() erofs: enable large folios for fscache mode erofs: support large folios for fscache mode erofs: switch to prepare_ondemand_read() in fscache mode fscache,cachefiles: add prepare_ondemand_read() callback erofs: clean up cached I/O strategies erofs: update documentation erofs: check the uniqueness of fsid in shared domain in advance erofs: enable large folios for iomap mode commit ad0d9da164cb52e62637e427517b2060dc956a2d Merge: 8129bac60f30 a4bbf53d88c7 Author: Linus Torvalds Date: Mon Dec 12 20:06:35 2022 -0800 Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fsverity updates from Eric Biggers: "The main change this cycle is to stop using the PG_error flag to track verity failures, and instead just track failures at the bio level. This follows a similar fscrypt change that went into 6.1, and it is a step towards freeing up PG_error for other uses. There's also one other small cleanup" * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fsverity: simplify fsverity_get_digest() fsverity: stop using PG_error to track error status commit 8129bac60f30936d2339535841db5b66d0520a67 Merge: deb9acc12250 41952551acb4 Author: Linus Torvalds Date: Mon Dec 12 20:03:50 2022 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fscrypt updates from Eric Biggers: "This release adds SM4 encryption support, contributed by Tianjia Zhang. SM4 is a Chinese block cipher that is an alternative to AES. I recommend against using SM4, but (according to Tianjia) some people are being required to use it. Since SM4 has been turning up in many other places (crypto API, wireless, TLS, OpenSSL, ARMv8 CPUs, etc.), it hasn't been very controversial, and some people have to use it, I don't think it would be fair for me to reject this optional feature. Besides the above, there are a couple cleanups" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fscrypt: add additional documentation for SM4 support fscrypt: remove unused Speck definitions fscrypt: Add SM4 XTS/CTS symmetric algorithm support blk-crypto: Add support for SM4-XTS blk crypto mode fscrypt: add comment for fscrypt_valid_enc_modes_v1() fscrypt: pass super_block to fscrypt_put_master_key_activeref() commit 1a4f69ef15ec29b213e2b086b2502644e8ef76ee Author: Dominique Martinet Date: Mon Dec 5 21:39:01 2022 +0900 9p/client: fix data race on req->status KCSAN reported a race between writing req->status in p9_client_cb and accessing it in p9_client_rpc's wait_event. Accesses to req itself is protected by the data barrier (writing req fields, write barrier, writing status // reading status, read barrier, reading other req fields), but status accesses themselves apparently also must be annotated properly with WRITE_ONCE/READ_ONCE when we access it without locks. Follows: - error paths writing status in various threads all can notify p9_client_rpc, so these all also need WRITE_ONCE - there's a similar read loop in trans_virtio for zc case that also needs READ_ONCE - other reads in trans_fd should be protected by the trans_fd lock and lists state machine, as corresponding writers all are within trans_fd and should be under the same lock. If KCSAN complains on them we likely will have something else to fix as well, so it's better to leave them unmarked and look again if required. Link: https://lkml.kernel.org/r/20221205124756.426350-1-asmadeus@codewreck.org Reported-by: Naresh Kamboju Suggested-by: Marco Elver Acked-by: Marco Elver Reviewed-by: Christian Schoenebeck Signed-off-by: Dominique Martinet net/9p/client.c | 15 ++++++++------- net/9p/trans_fd.c | 12 ++++++------ net/9p/trans_rdma.c | 4 ++-- net/9p/trans_virtio.c | 9 +++++---- net/9p/trans_xen.c | 4 ++-- 5 files changed, 23 insertions(+), 21 deletions(-) commit deb9acc12250b13e40f7133f189d8a0891da53f3 Merge: 9b93f5069fd9 1da18e38cb97 Author: Linus Torvalds Date: Mon Dec 12 19:56:37 2022 -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: "A large number of cleanups and bug fixes, with many of the bug fixes found by Syzbot and fuzzing. (Many of the bug fixes involve less-used ext4 features such as fast_commit, inline_data and bigalloc) In addition, remove the writepage function for ext4, since the medium-term plan is to remove ->writepage() entirely. (The VM doesn't need or want writepage() for writeback, since it is fine with ->writepages() so long as ->migrate_folio() is implemented)" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (58 commits) ext4: fix reserved cluster accounting in __es_remove_extent() ext4: fix inode leak in ext4_xattr_inode_create() on an error path ext4: allocate extended attribute value in vmalloc area ext4: avoid unaccounted block allocation when expanding inode ext4: initialize quota before expanding inode in setproject ioctl ext4: stop providing .writepage hook mm: export buffer_migrate_folio_norefs() ext4: switch to using write_cache_pages() for data=journal writeout jbd2: switch jbd2_submit_inode_data() to use fs-provided hook for data writeout ext4: switch to using ext4_do_writepages() for ordered data writeout ext4: move percpu_rwsem protection into ext4_writepages() ext4: provide ext4_do_writepages() ext4: add support for writepages calls that cannot map blocks ext4: drop pointless IO submission from ext4_bio_write_page() ext4: remove nr_submitted from ext4_bio_write_page() ext4: move keep_towrite handling to ext4_bio_write_page() ext4: handle redirtying in ext4_bio_write_page() ext4: fix kernel BUG in 'ext4_write_inline_data_end()' ext4: make ext4_mb_initialize_context return void ext4: fix deadlock due to mbcache entry corruption ... commit d1c722867f8022a27182b9a1d84e9bca75486c9a Author: Christophe JAILLET Date: Mon Dec 12 20:37:16 2022 +0100 net: lan966x: Remove a useless test in lan966x_ptp_add_trap() vcap_alloc_rule() can't return NULL. So remove some dead-code Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/27992ffcee47fc865ce87274d6dfcffe7a1e69e0.1670873784.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c | 2 -- 1 file changed, 2 deletions(-) commit 9b93f5069fd95cea7915aab321fd74d2548ba75c Merge: e1212e9b6f06 5a6f52d20ce3 Author: Linus Torvalds Date: Mon Dec 12 19:30:18 2022 -0800 Merge tag 'fs.idmapped.mnt_idmap.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull idmapping updates from Christian Brauner: "Last cycle we've already made the interaction with idmapped mounts more robust and type safe by introducing the vfs{g,u}id_t type. This cycle we concluded the conversion and removed the legacy helpers. 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 filesystem developers without detailed knowledge in this area this can be a potential source for bugs. Instead of passing the plain namespace we introduce a dedicated type struct mnt_idmap and replace the pointer with a pointer to a struct mnt_idmap. There are no semantic or size changes for the mount struct caused by this. We then start converting all places aware of idmapped mounts to rely on struct mnt_idmap. Once the conversion is done all helpers down to the really low-level make_vfs{g,u}id() and from_vfs{g,u}id() will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two removing and thus eliminating the possibility of any bugs. Fwiw, I fixed some issues in that area a while ago in ntfs3 and ksmbd in the past. Afterwards only low-level code can ultimately use the associated namespace for any permission checks. Even most of the vfs can be completely obivious about this ultimately and filesystems will never interact with it in any form in the future. A struct mnt_idmap currently encompasses a simple refcount and pointer to the relevant namespace the mount is idmapped to. If a mount isn't idmapped then it will point to a static nop_mnt_idmap and if it doesn't that it is idmapped. As usual there are no allocations or anything happening for non-idmapped mounts. Everthing is carefully written to be a nop for non-idmapped mounts as has always been the case. If an idmapped mount is created a struct mnt_idmap is allocated and a reference taken on the relevant namespace. Each mount that gets idmapped or inherits the idmap simply bumps the reference count on struct mnt_idmap. Just a reminder that we only allow a mount to change it's idmapping a single time and only if it hasn't already been attached to the filesystems and has no active writers. The actual changes are fairly straightforward but this will have huge benefits for maintenance and security in the long run even if it causes some churn. Note that this also makes it possible to extend struct mount_idmap in the future. For example, it would be possible to place the namespace pointer in an anonymous union together with an idmapping struct. This would allow us to expose an api to userspace that would let it specify idmappings directly instead of having to go through the detour of setting up namespaces at all" * tag 'fs.idmapped.mnt_idmap.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: acl: conver higher-level helpers to rely on mnt_idmap fs: introduce dedicated idmap type for mounts commit e1212e9b6f06016c62b1ee6fe7772293b90e695a Merge: cf619f891971 eb7718cdb73c Author: Linus Torvalds Date: Mon Dec 12 19:20:05 2022 -0800 Merge tag 'fs.vfsuid.conversion.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull vfsuid updates from Christian Brauner: "Last cycle we introduced the vfs{g,u}id_t types and associated helpers to gain type safety when dealing with idmapped mounts. That initial work already converted a lot of places over but there were still some left, This converts all remaining places that still make use of non-type safe idmapping helpers to rely on the new type safe vfs{g,u}id based helpers. Afterwards it removes all the old non-type safe helpers" * tag 'fs.vfsuid.conversion.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: fs: remove unused idmapping helpers ovl: port to vfs{g,u}id_t and associated helpers fuse: port to vfs{g,u}id_t and associated helpers ima: use type safe idmapping helpers apparmor: use type safe idmapping helpers caps: use type safe idmapping helpers fs: use type safe idmapping helpers mnt_idmapping: add missing helpers commit cf619f891971bfac659ac64968f8c35db605c884 Merge: 6a518afcc206 8d84e39d76bd Author: Linus Torvalds Date: Mon Dec 12 19:03:10 2022 -0800 Merge tag 'fs.ovl.setgid.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull setgid inheritance updates from Christian Brauner: "This contains the work to make setgid inheritance consistent between modifying a file and when changing ownership or mode as this has been a repeated source of very subtle bugs. The gist is that we perform the same permission checks in the write path as we do in the ownership and mode changing paths after this series where we're currently doing different things. We've already made setgid inheritance a lot more consistent and reliable in the last releases by moving setgid stripping from the individual filesystems up into the vfs. This aims to make the logic even more consistent and easier to understand and also to fix long-standing overlayfs setgid inheritance bugs. Miklos was nice enough to just let me carry the trivial overlayfs patches from Amir too. Below is a more detailed explanation how the current difference in setgid handling lead to very subtle bugs exemplified via overlayfs which is a victim of the current rules. I hope this explains why I think taking the regression risk here is worth it. A long while ago I found a few setgid inheritance bugs in overlayfs in the write path in certain conditions. Amir recently picked this back up in [1] and I jumped on board to fix this more generally. On the surface all that overlayfs would need to fix setgid inheritance would be to call file_remove_privs() or file_modified() but actually that isn't enough because the setgid inheritance api is wildly inconsistent in that area. Before this pr setgid stripping in file_remove_privs()'s old should_remove_suid() helper was inconsistent with other parts of the vfs. Specifically, it only raises ATTR_KILL_SGID if the inode is S_ISGID and S_IXGRP but not if the inode isn't in the caller's groups and the caller isn't privileged over the inode although we require this already in setattr_prepare() and setattr_copy() and so all filesystem implement this requirement implicitly because they have to use setattr_{prepare,copy}() anyway. But the inconsistency shows up in setgid stripping bugs for overlayfs in xfstests (e.g., generic/673, generic/683, generic/685, generic/686, generic/687). For example, we test whether suid and setgid stripping works correctly when performing various write-like operations as an unprivileged user (fallocate, reflink, write, etc.): echo "Test 1 - qa_user, non-exec file $verb" setup_testfile chmod a+rws $junk_file commit_and_check "$qa_user" "$verb" 64k 64k The test basically creates a file with 6666 permissions. While the file has the S_ISUID and S_ISGID bits set it does not have the S_IXGRP set. On a regular filesystem like xfs what will happen is: sys_fallocate() -> vfs_fallocate() -> xfs_file_fallocate() -> file_modified() -> __file_remove_privs() -> dentry_needs_remove_privs() -> should_remove_suid() -> __remove_privs() newattrs.ia_valid = ATTR_FORCE | kill; -> notify_change() -> setattr_copy() In should_remove_suid() we can see that ATTR_KILL_SUID is raised unconditionally because the file in the test has S_ISUID set. But we also see that ATTR_KILL_SGID won't be set because while the file is S_ISGID it is not S_IXGRP (see above) which is a condition for ATTR_KILL_SGID being raised. So by the time we call notify_change() we have attr->ia_valid set to ATTR_KILL_SUID | ATTR_FORCE. Now notify_change() sees that ATTR_KILL_SUID is set and does: ia_valid = attr->ia_valid |= ATTR_MODE attr->ia_mode = (inode->i_mode & ~S_ISUID); which means that when we call setattr_copy() later we will definitely update inode->i_mode. Note that attr->ia_mode still contains S_ISGID. Now we call into the filesystem's ->setattr() inode operation which will end up calling setattr_copy(). Since ATTR_MODE is set we will hit: if (ia_valid & ATTR_MODE) { umode_t mode = attr->ia_mode; vfsgid_t vfsgid = i_gid_into_vfsgid(mnt_userns, inode); if (!vfsgid_in_group_p(vfsgid) && !capable_wrt_inode_uidgid(mnt_userns, inode, CAP_FSETID)) mode &= ~S_ISGID; inode->i_mode = mode; } and since the caller in the test is neither capable nor in the group of the inode the S_ISGID bit is stripped. But assume the file isn't suid then ATTR_KILL_SUID won't be raised which has the consequence that neither the setgid nor the suid bits are stripped even though it should be stripped because the inode isn't in the caller's groups and the caller isn't privileged over the inode. If overlayfs is in the mix things become a bit more complicated and the bug shows up more clearly. When e.g., ovl_setattr() is hit from ovl_fallocate()'s call to file_remove_privs() then ATTR_KILL_SUID and ATTR_KILL_SGID might be raised but because the check in notify_change() is questioning the ATTR_KILL_SGID flag again by requiring S_IXGRP for it to be stripped the S_ISGID bit isn't removed even though it should be stripped: sys_fallocate() -> vfs_fallocate() -> ovl_fallocate() -> file_remove_privs() -> dentry_needs_remove_privs() -> should_remove_suid() -> __remove_privs() newattrs.ia_valid = ATTR_FORCE | kill; -> notify_change() -> ovl_setattr() /* TAKE ON MOUNTER'S CREDS */ -> ovl_do_notify_change() -> notify_change() /* GIVE UP MOUNTER'S CREDS */ /* TAKE ON MOUNTER'S CREDS */ -> vfs_fallocate() -> xfs_file_fallocate() -> file_modified() -> __file_remove_privs() -> dentry_needs_remove_privs() -> should_remove_suid() -> __remove_privs() newattrs.ia_valid = attr_force | kill; -> notify_change() The fix for all of this is to make file_remove_privs()'s should_remove_suid() helper perform the same checks as we already require in setattr_prepare() and setattr_copy() and have notify_change() not pointlessly requiring S_IXGRP again. It doesn't make any sense in the first place because the caller must calculate the flags via should_remove_suid() anyway which would raise ATTR_KILL_SGID Note that some xfstests will now fail as these patches will cause the setgid bit to be lost in certain conditions for unprivileged users modifying a setgid file when they would've been kept otherwise. I think this risk is worth taking and I explained and mentioned this multiple times on the list [2]. Enforcing the rules consistently across write operations and chmod/chown will lead to losing the setgid bit in cases were it might've been retained before. While I've mentioned this a few times but it's worth repeating just to make sure that this is understood. For the sake of maintainability, consistency, and security this is a risk worth taking. If we really see regressions for workloads the fix is to have special setgid handling in the write path again with different semantics from chmod/chown and possibly additional duct tape for overlayfs. I'll update the relevant xfstests with if you should decide to merge this second setgid cleanup. Before that people should be aware that there might be failures for fstests where unprivileged users modify a setgid file" Link: https://lore.kernel.org/linux-fsdevel/20221003123040.900827-1-amir73il@gmail.com [1] Link: https://lore.kernel.org/linux-fsdevel/20221122142010.zchf2jz2oymx55qi@wittgenstein [2] * tag 'fs.ovl.setgid.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: fs: use consistent setgid checks in is_sxid() ovl: remove privs in ovl_fallocate() ovl: remove privs in ovl_copyfile() attr: use consistent sgid stripping checks attr: add setattr_should_drop_sgid() fs: move should_remove_suid() attr: add in_group_or_capable() commit 6a518afcc2066732e6c5c24281ce017bbbd85506 Merge: bd90741318ee d6fdf29f7b99 Author: Linus Torvalds Date: Mon Dec 12 18:46:39 2022 -0800 Merge tag 'fs.acl.rework.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull VFS acl updates from Christian Brauner: "This contains the work that builds a dedicated vfs posix acl api. The origins of this work trace back to v5.19 but it took quite a while to understand the various filesystem specific implementations in sufficient detail and also come up with an acceptable solution. As we discussed and seen multiple times the current state of how posix acls are handled isn't nice and comes with a lot of problems: The current way of handling posix acls via the generic xattr api is error prone, hard to maintain, and type unsafe for the vfs until we call into the filesystem's dedicated get and set inode operations. It is already the case that posix acls are special-cased to death all the way through the vfs. There are an uncounted number of hacks that operate on the uapi posix acl struct instead of the dedicated vfs struct posix_acl. And the vfs must be involved in order to interpret and fixup posix acls before storing them to the backing store, caching them, reporting them to userspace, or for permission checking. Currently a range of hacks and duct tape exist to make this work. As with most things this is really no ones fault it's just something that happened over time. But the code is hard to understand and difficult to maintain and one is constantly at risk of introducing bugs and regressions when having to touch it. Instead of continuing to hack posix acls through the xattr handlers this series builds a dedicated posix acl api solely around the get and set inode operations. Going forward, the vfs_get_acl(), vfs_remove_acl(), and vfs_set_acl() helpers must be used in order to interact with posix acls. They operate directly on the vfs internal struct posix_acl instead of abusing the uapi posix acl struct as we currently do. In the end this removes all of the hackiness, makes the codepaths easier to maintain, and gets us type safety. This series passes the LTP and xfstests suites without any regressions. For xfstests the following combinations were tested: - xfs - ext4 - btrfs - overlayfs - overlayfs on top of idmapped mounts - orangefs - (limited) cifs There's more simplifications for posix acls that we can make in the future if the basic api has made it. A few implementation details: - The series makes sure to retain exactly the same security and integrity module permission checks. Especially for the integrity modules this api is a win because right now they convert the uapi posix acl struct passed to them via a void pointer into the vfs struct posix_acl format to perform permission checking on the mode. There's a new dedicated security hook for setting posix acls which passes the vfs struct posix_acl not a void pointer. Basing checking on the posix acl stored in the uapi format is really unreliable. The vfs currently hacks around directly in the uapi struct storing values that frankly the security and integrity modules can't correctly interpret as evidenced by bugs we reported and fixed in this area. It's not necessarily even their fault it's just that the format we provide to them is sub optimal. - Some filesystems like 9p and cifs need access to the dentry in order to get and set posix acls which is why they either only partially or not even at all implement get and set inode operations. For example, cifs allows setxattr() and getxattr() operations but doesn't allow permission checking based on posix acls because it can't implement a get acl inode operation. Thus, this patch series updates the set acl inode operation to take a dentry instead of an inode argument. However, for the get acl inode operation we can't do this as the old get acl method is called in e.g., generic_permission() and inode_permission(). These helpers in turn are called in various filesystem's permission inode operation. So passing a dentry argument to the old get acl inode operation would amount to passing a dentry to the permission inode operation which we shouldn't and probably can't do. So instead of extending the existing inode operation Christoph suggested to add a new one. He also requested to ensure that the get and set acl inode operation taking a dentry are consistently named. So for this version the old get acl operation is renamed to ->get_inode_acl() and a new ->get_acl() inode operation taking a dentry is added. With this we can give both 9p and cifs get and set acl inode operations and in turn remove their complex custom posix xattr handlers. In the future I hope to get rid of the inode method duplication but it isn't like we have never had this situation. Readdir is just one example. And frankly, the overall gain in type safety and the more pleasant api wise are simply too big of a benefit to not accept this duplication for a while. - We've done a full audit of every codepaths using variant of the current generic xattr api to get and set posix acls and surprisingly it isn't that many places. There's of course always a chance that we might have missed some and if so I'm sure we'll find them soon enough. The crucial codepaths to be converted are obviously stacking filesystems such as ecryptfs and overlayfs. For a list of all callers currently using generic xattr api helpers see [2] including comments whether they support posix acls or not. - The old vfs generic posix acl infrastructure doesn't obey the create and replace semantics promised on the setxattr(2) manpage. This patch series doesn't address this. It really is something we should revisit later though. The patches are roughly organized as follows: (1) Change existing set acl inode operation to take a dentry argument (Intended to be a non-functional change) (2) Rename existing get acl method (Intended to be a non-functional change) (3) Implement get and set acl inode operations for filesystems that couldn't implement one before because of the missing dentry. That's mostly 9p and cifs (Intended to be a non-functional change) (4) Build posix acl api, i.e., add vfs_get_acl(), vfs_remove_acl(), and vfs_set_acl() including security and integrity hooks (Intended to be a non-functional change) (5) Implement get and set acl inode operations for stacking filesystems (Intended to be a non-functional change) (6) Switch posix acl handling in stacking filesystems to new posix acl api now that all filesystems it can stack upon support it. (7) Switch vfs to new posix acl api (semantical change) (8) Remove all now unused helpers (9) Additional regression fixes reported after we merged this into linux-next Thanks to Seth for a lot of good discussion around this and encouragement and input from Christoph" * tag 'fs.acl.rework.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: (36 commits) posix_acl: Fix the type of sentinel in get_acl orangefs: fix mode handling ovl: call posix_acl_release() after error checking evm: remove dead code in evm_inode_set_acl() cifs: check whether acl is valid early acl: make vfs_posix_acl_to_xattr() static acl: remove a slew of now unused helpers 9p: use stub posix acl handlers cifs: use stub posix acl handlers ovl: use stub posix acl handlers ecryptfs: use stub posix acl handlers evm: remove evm_xattr_acl_change() xattr: use posix acl api ovl: use posix acl api ovl: implement set acl method ovl: implement get acl method ecryptfs: implement set acl method ecryptfs: implement get acl method ksmbd: use vfs_remove_acl() acl: add vfs_remove_acl() ... commit bd90741318ee0a48244e8e4b9364023d730a80a9 Merge: 13c574fec815 e0c49bd2b4d3 Author: Linus Torvalds Date: Mon Dec 12 18:38:47 2022 -0800 Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "misc pile" * tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: sysv: Fix sysv_nblocks() returns wrong value get rid of INT_LIMIT, use type_max() instead btrfs: replace INT_LIMIT(loff_t) with OFFSET_MAX fs: simplify vfs_get_super fs: drop useless condition from inode_needs_update_time commit 13c574fec815f449fa812df60844bbb4b1548d19 Merge: 75f4d9af8b67 61d8e4266771 Author: Linus Torvalds Date: Mon Dec 12 18:36:12 2022 -0800 Merge tag 'pull-namespace' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull namespace fix from Al Viro: "Fix weird corner case in copy_mnt_ns()" * tag 'pull-namespace' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: copy_mnt_ns(): handle a corner case (overmounted mntns bindings) saner commit 4f1354d5c6a3264c91238962d1597eef40c40419 Author: Zhen Lei Date: Wed Dec 7 11:23:04 2022 +0800 livepatch: Call klp_match_callback() in klp_find_callback() to avoid code duplication The implementation of function klp_match_callback() is identical to the partial implementation of function klp_find_callback(). So call function klp_match_callback() in function klp_find_callback() instead of the duplicated code. Signed-off-by: Zhen Lei Acked-by: Song Liu Reviewed-by: Petr Mladek Suggested-by: Petr Mladek Signed-off-by: Luis Chamberlain kernel/livepatch/core.c | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) commit 75f4d9af8b67d7415afe50afcb4e96fd0bbd3ae2 Merge: 268369b171ff de4eda9de2d9 Author: Linus Torvalds Date: Mon Dec 12 18:29:54 2022 -0800 Merge tag 'pull-iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull iov_iter updates from Al Viro: "iov_iter work; most of that is about getting rid of direction misannotations and (hopefully) preventing more of the same for the future" * tag 'pull-iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: use less confusing names for iov_iter direction initializers iov_iter: saner checks for attempt to copy to/from iterator [xen] fix "direction" argument of iov_iter_kvec() [vhost] fix 'direction' argument of iov_iter_{init,bvec}() [target] fix iov_iter_bvec() "direction" argument [s390] memcpy_real(): WRITE is "data source", not destination... [s390] zcore: WRITE is "data source", not destination... [infiniband] READ is "data destination", not source... [fsi] WRITE is "data source", not destination... [s390] copy_oldmem_kernel() - WRITE is "data source", not destination csum_and_copy_to_iter(): handle ITER_DISCARD get rid of unlikely() on page_copy_sane() calls commit 268369b171ff1be6a68ae8f33d0602c6bea48d2e Merge: 405b2fc66333 fa6a3bf7ff37 Author: Linus Torvalds Date: Mon Dec 12 18:27:06 2022 -0800 Merge tag 'pull-alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull alpha updates from Al Viro: "Alpha architecture cleanups and fixes. One thing *not* included is lazy FPU switching stuff - this pile is just the straightforward stuff" * tag 'pull-alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: alpha: ret_from_fork can go straight to ret_to_user alpha: syscall exit cleanup alpha: fix handling of a3 on straced syscalls alpha: fix syscall entry in !AUDUT_SYSCALL case alpha: _TIF_ALLWORK_MASK is unused alpha: fix TIF_NOTIFY_SIGNAL handling commit 405b2fc66333cf12e613634d49de301658e26426 Merge: 8702f2c611bf 38ba2f11d9ce Author: Linus Torvalds Date: Mon Dec 12 18:18:34 2022 -0800 Merge tag 'pull-elfcore' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull elf coredumping updates from Al Viro: "Unification of regset and non-regset sides of ELF coredump handling. Collecting per-thread register values is the only thing that needs to be ifdefed there..." * tag 'pull-elfcore' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: [elf] get rid of get_note_info_size() [elf] unify regset and non-regset cases [elf][non-regset] use elf_core_copy_task_regs() for dumper as well [elf][non-regset] uninline elf_core_copy_task_fpregs() (and lose pt_regs argument) elf_core_copy_task_regs(): task_pt_regs is defined everywhere [elf][regset] simplify thread list handling in fill_note_info() [elf][regset] clean fill_note_info() a bit kill extern of vsyscall32_sysctl kill coredump_params->regs kill signal_pt_regs() commit 8702f2c611bf124c48b21b5c57bfc156cd11f4ca Merge: a7cacfb0688e 12b677f2c697 Author: Linus Torvalds Date: Mon Dec 12 17:28:58 2022 -0800 Merge tag 'mm-nonmm-stable-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: - A ptrace API cleanup series from Sergey Shtylyov - Fixes and cleanups for kexec from ye xingchen - nilfs2 updates from Ryusuke Konishi - squashfs feature work from Xiaoming Ni: permit configuration of the filesystem's compression concurrency from the mount command line - A series from Akinobu Mita which addresses bound checking errors when writing to debugfs files - A series from Yang Yingliang to address rapidio memory leaks - A series from Zheng Yejian to address possible overflow errors in encode_comp_t() - And a whole shower of singleton patches all over the place * tag 'mm-nonmm-stable-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (79 commits) ipc: fix memory leak in init_mqueue_fs() hfsplus: fix bug causing custom uid and gid being unable to be assigned with mount rapidio: devices: fix missing put_device in mport_cdev_open kcov: fix spelling typos in comments hfs: Fix OOB Write in hfs_asc2mac hfs: fix OOB Read in __hfs_brec_find relay: fix type mismatch when allocating memory in relay_create_buf() ocfs2: always read both high and low parts of dinode link count io-mapping: move some code within the include guarded section kernel: kcsan: kcsan_test: build without structleak plugin mailmap: update email for Iskren Chernev eventfd: change int to __u64 in eventfd_signal() ifndef CONFIG_EVENTFD rapidio: fix possible UAF when kfifo_alloc() fails relay: use strscpy() is more robust and safer cpumask: limit visibility of FORCE_NR_CPUS acct: fix potential integer overflow in encode_comp_t() acct: fix accuracy loss for input value of encode_comp_t() linux/init.h: include and rapidio: rio: fix possible name leak in rio_register_mport() rapidio: fix possible name leaks when rio_add_device() fails ... commit a7cacfb0688e3988660e90fad7017cc9a18ab390 Merge: 96f426356847 cc8c418b4fc0 Author: Linus Torvalds Date: Mon Dec 12 17:18:50 2022 -0800 Merge tag 'docs-6.2' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "This was a not-too-busy cycle for documentation; highlights include: - The beginnings of a set of translations into Spanish, headed up by Carlos Bilbao - More Chinese translations - A change to the Sphinx "alabaster" theme by default for HTML generation. Unlike the previous default (Read the Docs), alabaster is shipped with Sphinx by default, reducing the number of other dependencies that need to be installed. It also (IMO) produces a cleaner and more readable result. - The ability to render the documentation into the texinfo format (something Sphinx could always do, we just never wired it up until now) Plus the usual collection of typo fixes, build-warning fixes, and minor updates" * tag 'docs-6.2' of git://git.lwn.net/linux: (67 commits) Documentation/features: Use loongarch instead of loong Documentation/features-refresh.sh: Only sed the beginning "arch" of ARCH_DIR docs/zh_CN: Fix '.. only::' directive's expression docs/sp_SP: Add memory-barriers.txt Spanish translation docs/zh_CN/LoongArch: Update links of LoongArch ISA Vol1 and ELF psABI docs/LoongArch: Update links of LoongArch ISA Vol1 and ELF psABI Documentation/features: Update feature lists for 6.1 Documentation: Fixed a typo in bootconfig.rst docs/sp_SP: Add process coding-style translation docs/sp_SP: Add kernel-docs.rst Spanish translation docs: Create translations/sp_SP/process/, move submitting-patches.rst docs: Add book to process/kernel-docs.rst docs: Retire old resources from kernel-docs.rst docs: Update maintainer of kernel-docs.rst Documentation: riscv: Document the sv57 VM layout Documentation: USB: correct possessive "its" usage math64: fix kernel-doc return value warnings math64: add kernel-doc for DIV64_U64_ROUND_UP math64: favor kernel-doc from header files doc: add texinfodocs and infodocs targets ... commit 96f42635684739cb563aa48d92d0d16b8dc9bda8 Merge: eb4511538191 b9ecf9b9ac59 Author: Linus Torvalds Date: Mon Dec 12 16:59:00 2022 -0800 Merge tag 'rust-6.2' of https://github.com/Rust-for-Linux/linux Pull rust updates from Miguel Ojeda: "The first set of changes after the merge, the major ones being: - String and formatting: new types 'CString', 'CStr', 'BStr' and 'Formatter'; new macros 'c_str!', 'b_str!' and 'fmt!'. - Errors: the rest of the error codes from 'errno-base.h', as well as some 'From' trait implementations for the 'Error' type. - Printing: the rest of the 'pr_*!' levels and the continuation one 'pr_cont!', as well as a new sample. - 'alloc' crate: new constructors 'try_with_capacity()' and 'try_with_capacity_in()' for 'RawVec' and 'Vec'. - Procedural macros: new macros '#[vtable]' and 'concat_idents!', as well as better ergonomics for 'module!' users. - Asserting: new macros 'static_assert!', 'build_error!' and 'build_assert!', as well as a new crate 'build_error' to support them. - Vocabulary types: new types 'Opaque' and 'Either'. - Debugging: new macro 'dbg!'" * tag 'rust-6.2' of https://github.com/Rust-for-Linux/linux: (28 commits) rust: types: add `Opaque` type rust: types: add `Either` type rust: build_assert: add `build_{error,assert}!` macros rust: add `build_error` crate rust: static_assert: add `static_assert!` macro rust: std_vendor: add `dbg!` macro based on `std`'s one rust: str: add `fmt!` macro rust: str: add `CString` type rust: str: add `Formatter` type rust: str: add `c_str!` macro rust: str: add `CStr` unit tests rust: str: implement several traits for `CStr` rust: str: add `CStr` type rust: str: add `b_str!` macro rust: str: add `BStr` type rust: alloc: add `Vec::try_with_capacity{,_in}()` constructors rust: alloc: add `RawVec::try_with_capacity_in()` constructor rust: prelude: add `error::code::*` constant items rust: error: add `From` implementations for `Error` rust: error: add codes from `errno-base.h` ... commit eb4511538191ac758faa0735fe06c5ce8202ae04 Merge: 535ea85de3da afc70ccb9628 Author: Linus Torvalds Date: Mon Dec 12 16:48:48 2022 -0800 Merge tag 'trace-tools-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing tools updates from Steven Rostedt: - New tool "rv" for starting and stopping runtime verification. Example: ./rv mon wip -r printk -v Enables the wake-in-preempt monitor and the printk reactor in verbose mode - Fix exit status of rtla usage() calls * tag 'trace-tools-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: Documentation/rv: Add verification/rv man pages tools/rv: Add in-kernel monitor interface rv: Add rv tool rtla: Fix exit status when returning from calls to usage() commit c45bc55a99957b20e4e0333bcd42e12d1833a7f5 Author: Sidhartha Kumar Date: Mon Dec 12 14:55:29 2022 -0800 mm/hugetlb: set head flag before setting compound_order in __prep_compound_gigantic_folio folio_set_compound_order() checks if the passed in folio is a large folio. A large folio is indicated by the PG_head flag. Call __folio_set_head() before setting the order. Link: https://lkml.kernel.org/r/20221212225529.22493-1-sidhartha.kumar@oracle.com Fixes: d1c6095572d0 ("mm/hugetlb: convert hugetlb prep functions to folios") Signed-off-by: Sidhartha Kumar Reported-by: David Hildenbrand Signed-off-by: Andrew Morton mm/hugetlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 535ea85de3dabf8c04e88b6e968ff793b7e58da9 Merge: e2ed78d5d9ca 88a51b4f2e65 Author: Linus Torvalds Date: Mon Dec 12 16:46:08 2022 -0800 Merge tag 'ktest-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest updates from Steven Rostedt: - Fix minconfig test to unset the config and not relying on olddefconfig to do it, as some configs are set to default y - Fix reading grub2 menus for handling submenus - Add new ${shell } to execute shell commands that will be useful for setting variables like: HOSTNAME := ${shell hostname} * tag 'ktest-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest.pl: Add shell commands to variables kest.pl: Fix grub2 menu handling for rebooting ktest.pl minconfig: Unset configs instead of just removing them commit e2ed78d5d9ca07a2b9d158ebac366170a2d3083d Merge: 23a68d14def8 054be257f28c Author: Linus Torvalds Date: Mon Dec 12 16:42:57 2022 -0800 Merge tag 'linux-kselftest-kunit-next-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit updates from Shuah Khan: "Several enhancements, fixes, clean-ups, documentation updates, improvements to logging and KTAP compliance of KUnit test output: - log numbers in decimal and hex - parse KTAP compliant test output - allow conditionally exposing static symbols to tests when KUNIT is enabled - make static symbols visible during kunit testing - clean-ups to remove unused structure definition" * tag 'linux-kselftest-kunit-next-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (29 commits) Documentation: dev-tools: Clarify requirements for result description apparmor: test: make static symbols visible during kunit testing kunit: add macro to allow conditionally exposing static symbols to tests kunit: tool: make parser preserve whitespace when printing test log Documentation: kunit: Fix "How Do I Use This" / "Next Steps" sections kunit: tool: don't include KTAP headers and the like in the test log kunit: improve KTAP compliance of KUnit test output kunit: tool: parse KTAP compliant test output mm: slub: test: Use the kunit_get_current_test() function kunit: Use the static key when retrieving the current test kunit: Provide a static key to check if KUnit is actively running tests kunit: tool: make --json do nothing if --raw_ouput is set kunit: tool: tweak error message when no KTAP found kunit: remove KUNIT_INIT_MEM_ASSERTION macro Documentation: kunit: Remove redundant 'tips.rst' page Documentation: KUnit: reword description of assertions Documentation: KUnit: make usage.rst a superset of tips.rst, remove duplication kunit: eliminate KUNIT_INIT_*_ASSERT_STRUCT macros kunit: tool: remove redundant file.close() call in unit test kunit: tool: unit tests all check parser errors, standardize formatting a bit ... commit 23a68d14def8247735b66a14b370b42d8fcedb47 Merge: 268325bda529 d5ba85d6d8be Author: Linus Torvalds Date: Mon Dec 12 16:39:38 2022 -0800 Merge tag 'linux-kselftest-next-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest updates from Shuah Khan: "Several fixes and enhancements to existing tests and a few new tests: - add new amd-pstate tests and fix and enhance existing ones - add new watchdog tests and enhance existing ones to improve coverage - fixes to ftrace, splice_read, rtc, and efivars tests - fixes to handle egrep obsolescence in the latest grep release - miscellaneous spelling and SPDX fixes" * tag 'linux-kselftest-next-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (24 commits) selftests/ftrace: Use long for synthetic event probe test selftests/tpm2: Split async tests call to separate shell script runner selftests: splice_read: Fix sysfs read cases selftests: ftrace: Use "grep -E" instead of "egrep" selftests: gpio: Use "grep -E" instead of "egrep" selftests: kselftest_deps: Use "grep -E" instead of "egrep" selftests/efivarfs: Add checking of the test return value cpufreq: amd-pstate: fix spdxcheck warnings for amd-pstate-ut.c selftests: rtc: skip when RTC is not present selftests/ftrace: event_triggers: wait longer for test_event_enable selftests/vDSO: Add riscv getcpu & gettimeofday test Documentation: amd-pstate: Add tbench and gitsource test introduction selftests: amd-pstate: Trigger gitsource benchmark and test cpus selftests: amd-pstate: Trigger tbench benchmark and test cpus selftests: amd-pstate: Split basic.sh into run.sh and basic.sh. selftests: amd-pstate: Rename amd-pstate-ut.sh to basic.sh. selftests/ftrace: Convert tracer tests to use 'requires' to specify program dependency selftests/ftrace: Add check for ping command for trigger tests selftests/watchdog: Fix spelling mistake "Temeprature" -> "Temperature" selftests/watchdog: add test for WDIOC_GETTEMP ... commit 268325bda5299836a6ad4c3952474a2be125da5f Merge: ca1443c7e75a 3e6743e28b9b Author: Linus Torvalds Date: Mon Dec 12 16:22:22 2022 -0800 Merge tag 'random-6.2-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random Pull random number generator updates from Jason Donenfeld: - Replace prandom_u32_max() and various open-coded variants of it, there is now a new family of functions that uses fast rejection sampling to choose properly uniformly random numbers within an interval: get_random_u32_below(ceil) - [0, ceil) get_random_u32_above(floor) - (floor, U32_MAX] get_random_u32_inclusive(floor, ceil) - [floor, ceil] Coccinelle was used to convert all current users of prandom_u32_max(), as well as many open-coded patterns, resulting in improvements throughout the tree. I'll have a "late" 6.1-rc1 pull for you that removes the now unused prandom_u32_max() function, just in case any other trees add a new use case of it that needs to converted. According to linux-next, there may be two trivial cases of prandom_u32_max() reintroductions that are fixable with a 's/.../.../'. So I'll have for you a final conversion patch doing that alongside the removal patch during the second week. This is a treewide change that touches many files throughout. - More consistent use of get_random_canary(). - Updates to comments, documentation, tests, headers, and simplification in configuration. - The arch_get_random*_early() abstraction was only used by arm64 and wasn't entirely useful, so this has been replaced by code that works in all relevant contexts. - The kernel will use and manage random seeds in non-volatile EFI variables, refreshing a variable with a fresh seed when the RNG is initialized. The RNG GUID namespace is then hidden from efivarfs to prevent accidental leakage. These changes are split into random.c infrastructure code used in the EFI subsystem, in this pull request, and related support inside of EFISTUB, in Ard's EFI tree. These are co-dependent for full functionality, but the order of merging doesn't matter. - Part of the infrastructure added for the EFI support is also used for an improvement to the way vsprintf initializes its siphash key, replacing an sleep loop wart. - The hardware RNG framework now always calls its correct random.c input function, add_hwgenerator_randomness(), rather than sometimes going through helpers better suited for other cases. - The add_latent_entropy() function has long been called from the fork handler, but is a no-op when the latent entropy gcc plugin isn't used, which is fine for the purposes of latent entropy. But it was missing out on the cycle counter that was also being mixed in beside the latent entropy variable. So now, if the latent entropy gcc plugin isn't enabled, add_latent_entropy() will expand to a call to add_device_randomness(NULL, 0), which adds a cycle counter, without the absent latent entropy variable. - The RNG is now reseeded from a delayed worker, rather than on demand when used. Always running from a worker allows it to make use of the CPU RNG on platforms like S390x, whose instructions are too slow to do so from interrupts. It also has the effect of adding in new inputs more frequently with more regularity, amounting to a long term transcript of random values. Plus, it helps a bit with the upcoming vDSO implementation (which isn't yet ready for 6.2). - The jitter entropy algorithm now tries to execute on many different CPUs, round-robining, in hopes of hitting even more memory latencies and other unpredictable effects. It also will mix in a cycle counter when the entropy timer fires, in addition to being mixed in from the main loop, to account more explicitly for fluctuations in that timer firing. And the state it touches is now kept within the same cache line, so that it's assured that the different execution contexts will cause latencies. * tag 'random-6.2-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random: (23 commits) random: include in the right header random: align entropy_timer_state to cache line random: mix in cycle counter when jitter timer fires random: spread out jitter callback to different CPUs random: remove extraneous period and add a missing one in comments efi: random: refresh non-volatile random seed when RNG is initialized vsprintf: initialize siphash key using notifier random: add back async readiness notifier random: reseed in delayed work rather than on-demand random: always mix cycle counter in add_latent_entropy() hw_random: use add_hwgenerator_randomness() for early entropy random: modernize documentation comment on get_random_bytes() random: adjust comment to account for removed function random: remove early archrandom abstraction random: use random.trust_{bootloader,cpu} command line option only stackprotector: actually use get_random_canary() stackprotector: move get_random_canary() into stackprotector.h treewide: use get_random_u32_inclusive() when possible treewide: use get_random_u32_{above,below}() instead of manual loop treewide: use get_random_u32_below() instead of deprecated function ... commit ca1443c7e75a28c6fde5c67cb1904b624cf43c36 Merge: e1a1ccef7a4f d667c94962c1 Author: Linus Torvalds Date: Mon Dec 12 16:07:04 2022 -0800 Merge branch 'for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu updates from Dennis Zhou: "Baoquan was nice enough to run some clean ups for percpu" * 'for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: mm/percpu: remove unused PERCPU_DYNAMIC_EARLY_SLOTS mm/percpu.c: remove the lcm code since block size is fixed at page size mm/percpu: replace the goto with break mm/percpu: add comment to state the empty populated pages accounting mm/percpu: Update the code comment when creating new chunk mm/percpu: use list_first_entry_or_null in pcpu_reclaim_populated() mm/percpu: remove unused pcpu_map_extend_chunks commit e1a1ccef7a4f3a3058cd6c039a56b4c2c98479f1 Merge: a312a8cc3c7f 53910ef7ba04 Author: Linus Torvalds Date: Mon Dec 12 16:01:02 2022 -0800 Merge tag 'livepatching-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching update from Petr Mladek: - code cleanup * tag 'livepatching-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: livepatch: Move the result-invariant calculation out of the loop commit c4b7a297217a22e4b36afd6d298ae9c7583ae7f9 Merge: b6488b161ab2 b310de784bac Author: Jakub Kicinski Date: Mon Dec 12 15:55:08 2022 -0800 Merge branch 'net-ipa-enable-ipa-v4-7-support' Alex Elder says: ==================== net: ipa: enable IPA v4.7 support The first patch in this series adds "qcom,sm6350-ipa" as a possible IPA compatible string, for the Qualcomm SM6350 SoC. That SoC uses IPA v4.7 The second patch in this series adds code that enables support for IPA v4.7. DTS updates that make use of these will be merged later. ==================== Link: https://lore.kernel.org/r/20221208211529.757669-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit b310de784bacd20f5217a81b725de979ef24848e Author: Alex Elder Date: Thu Dec 8 15:15:29 2022 -0600 net: ipa: add IPA v4.7 support Add the necessary register and data definitions needed for IPA v4.7, which is found on the SM6350 SoC. Co-developed-by: Luca Weiss Signed-off-by: Luca Weiss Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/Makefile | 2 +- drivers/net/ipa/data/ipa_data-v4.7.c | 405 ++++++++++++++++++++++++++++ drivers/net/ipa/ipa_data.h | 1 + drivers/net/ipa/ipa_main.c | 4 + drivers/net/ipa/ipa_reg.c | 2 + drivers/net/ipa/ipa_reg.h | 1 + drivers/net/ipa/ipa_version.h | 1 + drivers/net/ipa/reg/ipa_reg-v4.7.c | 507 +++++++++++++++++++++++++++++++++++ 8 files changed, 922 insertions(+), 1 deletion(-) commit 5071429f828140e96d9973991e024dfa97ed42f5 Author: Luca Weiss Date: Thu Dec 8 15:15:28 2022 -0600 dt-bindings: net: qcom,ipa: Add SM6350 compatible Add support for SM6350, which uses IPA v4.7. Signed-off-by: Luca Weiss Signed-off-by: Alex Elder Acked-by: Krzysztof Kozlowski Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/qcom,ipa.yaml | 1 + 1 file changed, 1 insertion(+) commit a312a8cc3c7fe96f5e54e69c676f5bd12995f44e Merge: bf57ae2165ba 674b745e22b3 Author: Linus Torvalds Date: Mon Dec 12 15:48:36 2022 -0800 Merge tag 'cgroup-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "Nothing too interesting: - Add CONFIG_DEBUG_GROUP_REF which makes cgroup refcnt operations kprobable - A couple cpuset optimizations - Other misc changes including doc and test updates" * tag 'cgroup-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: remove rcu_read_lock()/rcu_read_unlock() in critical section of spin_lock_irq() cgroup/cpuset: Improve cpuset_css_alloc() description kselftest/cgroup: Add cleanup() to test_cpuset_prs.sh cgroup/cpuset: Optimize cpuset_attach() on v2 cgroup/cpuset: Skip spread flags update on v2 kselftest/cgroup: Fix gathering number of CPUs cgroup: cgroup refcnt functions should be exported when CONFIG_DEBUG_CGROUP_REF cgroup: Implement DEBUG_CGROUP_REF commit b6488b161ab2972a0b4f45490ea3aecef2b23256 Author: Coco Li Date: Sat Dec 10 04:16:46 2022 +0000 bnxt: Use generic HBH removal helper in tx path Eric Dumazet implemented Big TCP that allowed bigger TSO/GRO packet sizes for IPv6 traffic. See patch series: 'commit 89527be8d8d6 ("net: add IFLA_TSO_{MAX_SIZE|SEGS} attributes")' This reduces the number of packets traversing the networking stack and should usually improves performance. However, it also inserts a temporary Hop-by-hop IPv6 extension header. Using the HBH header removal method in the previous patch, the extra header be removed in bnxt drivers to allow it to send big TCP packets (bigger TSO packets) as well. Tested: Compiled locally To further test functional correctness, update the GSO/GRO limit on the physical NIC: ip link set eth0 gso_max_size 181000 ip link set eth0 gro_max_size 181000 Note that if there are bonding or ipvan devices on top of the physical NIC, their GSO sizes need to be updated as well. Then, IPv6/TCP packets with sizes larger than 64k can be observed. Signed-off-by: Coco Li Reviewed-by: Michael Chan Tested-by: Michael Chan Link: https://lore.kernel.org/r/20221210041646.3587757-2-lixiaoyan@google.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 89300468e2b2ec216c7827ba04ac45c129794403 Author: Coco Li Date: Sat Dec 10 04:16:45 2022 +0000 IPv6/GRO: generic helper to remove temporary HBH/jumbo header in driver IPv6/TCP and GRO stacks can build big TCP packets with an added temporary Hop By Hop header. Is GSO is not involved, then the temporary header needs to be removed in the driver. This patch provides a generic helper for drivers that need to modify their headers in place. Tested: Compiled and ran with ethtool -K eth1 tso off Could send Big TCP packets Signed-off-by: Coco Li Link: https://lore.kernel.org/r/20221210041646.3587757-1-lixiaoyan@google.com Signed-off-by: Jakub Kicinski include/net/ipv6.h | 33 +++++++++++++++++++++++++++++++++ net/ipv6/ip6_offload.c | 27 ++++----------------------- 2 files changed, 37 insertions(+), 23 deletions(-) commit bf57ae2165bad1cb273095a5c09708ab503cd874 Merge: add769595757 d6962c4fe8f9 Author: Linus Torvalds Date: Mon Dec 12 15:33:42 2022 -0800 Merge tag 'sched-core-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: - Implement persistent user-requested affinity: introduce affinity_context::user_mask and unconditionally preserve the user-requested CPU affinity masks, for long-lived tasks to better interact with cpusets & CPU hotplug events over longer timespans, without destroying the original affinity intent if the underlying topology changes. - Uclamp updates: fix relationship between uclamp and fits_capacity() - PSI fixes - Misc fixes & updates * tag 'sched-core-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched: Clear ttwu_pending after enqueue_task() sched/psi: Use task->psi_flags to clear in CPU migration sched/psi: Stop relying on timer_pending() for poll_work rescheduling sched/psi: Fix avgs_work re-arm in psi_avgs_work() sched/psi: Fix possible missing or delayed pending event sched: Always clear user_cpus_ptr in do_set_cpus_allowed() sched: Enforce user requested affinity sched: Always preserve the user requested cpumask sched: Introduce affinity_context sched: Add __releases annotations to affine_move_task() sched/fair: Check if prev_cpu has highest spare cap in feec() sched/fair: Consider capacity inversion in util_fits_cpu() sched/fair: Detect capacity inversion sched/uclamp: Cater for uclamp in find_energy_efficient_cpu()'s early exit condition sched/uclamp: Make cpu_overutilized() use util_fits_cpu() sched/uclamp: Make asym_fits_capacity() use util_fits_cpu() sched/uclamp: Make select_idle_capacity() use util_fits_cpu() sched/uclamp: Fix fits_capacity() check in feec() sched/uclamp: Make task_fits_capacity() use util_fits_cpu() sched/uclamp: Fix relationship between uclamp and migration margin commit 8150f0cfb24f781aa61a332bf2426365462afff8 Merge: 02abf84aa52d b6d00da08610 Author: Jakub Kicinski Date: Mon Dec 12 15:33:39 2022 -0800 Merge branch 'bridge-mcast-extensions-for-evpn' Ido Schimmel says: ==================== bridge: mcast: Extensions for EVPN tl;dr ===== This patchset creates feature parity between user space and the kernel and allows the former to install and replace MDB port group entries with a source list and associated filter mode. This is required for EVPN use cases where multicast state is not derived from snooped IGMP/MLD packets, but instead derived from EVPN routes exchanged by the control plane in user space. Background ========== IGMPv3 [1] and MLDv2 [2] differ from earlier versions of the protocols in that they add support for source-specific multicast. That is, hosts can advertise interest in listening to a particular multicast address only from specific source addresses or from all sources except for specific source addresses. In kernel 5.10 [3][4], the bridge driver gained the ability to snoop IGMPv3/MLDv2 packets and install corresponding MDB port group entries. For example, a snooped IGMPv3 Membership Report that contains a single MODE_IS_EXCLUDE record for group 239.10.10.10 with sources 192.0.2.1, 192.0.2.2, 192.0.2.20 and 192.0.2.21 would trigger the creation of these entries: # bridge -d mdb show dev br0 port veth1 grp 239.10.10.10 src 192.0.2.21 temp filter_mode include proto kernel blocked dev br0 port veth1 grp 239.10.10.10 src 192.0.2.20 temp filter_mode include proto kernel blocked dev br0 port veth1 grp 239.10.10.10 src 192.0.2.2 temp filter_mode include proto kernel blocked dev br0 port veth1 grp 239.10.10.10 src 192.0.2.1 temp filter_mode include proto kernel blocked dev br0 port veth1 grp 239.10.10.10 temp filter_mode exclude source_list 192.0.2.21/0.00,192.0.2.20/0.00,192.0.2.2/0.00,192.0.2.1/0.00 proto kernel While the kernel can install and replace entries with a filter mode and source list, user space cannot. It can only add EXCLUDE entries with an empty source list, which is sufficient for IGMPv2/MLDv1, but not for IGMPv3/MLDv2. Use cases where the multicast state is not derived from snooped packets, but instead derived from routes exchanged by the user space control plane require feature parity between user space and the kernel in terms of MDB configuration. Such a use case is detailed in the next section. Motivation ========== RFC 7432 [5] defines a "MAC/IP Advertisement route" (type 2) [6] that allows NVE switches in the EVPN network to advertise and learn reachability information for unicast MAC addresses. Traffic destined to a unicast MAC address can therefore be selectively forwarded to a single NVE switch behind which the MAC is located. The same is not true for IP multicast traffic. Such traffic is simply flooded as BUM to all NVE switches in the broadcast domain (BD), regardless if a switch has interested receivers for the multicast stream or not. This is especially problematic for overlay networks that make heavy use of multicast. The issue is addressed by RFC 9251 [7] that defines a "Selective Multicast Ethernet Tag Route" (type 6) [8] which allows NVE switches in the EVPN network to advertise multicast streams that they are interested in. This is done by having each switch suppress IGMP/MLD packets from being transmitted to the NVE network and instead communicate the information over BGP to other switches. As far as the bridge driver is concerned, the above means that the multicast state (i.e., {multicast address, group timer, filter-mode, (source records)}) for the VXLAN bridge port is not populated by the kernel from snooped IGMP/MLD packets (they are suppressed), but instead by user space. Specifically, by the routing daemon that is exchanging EVPN routes with other NVE switches. Changes are obviously also required in the VXLAN driver, but they are the subject of future patchsets. See the "Future work" section. Implementation ============== The user interface is extended to allow user space to specify the filter mode of the MDB port group entry and its source list. Replace support is also added so that user space would not need to remove an entry and re-add it only to edit its source list or filter mode, as that would result in packet loss. Example usage: # bridge mdb replace dev br0 port dummy10 grp 239.1.1.1 permanent \ source_list 192.0.2.1,192.0.2.3 filter_mode exclude proto zebra # bridge -d -s mdb show dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.3 permanent filter_mode include proto zebra blocked 0.00 dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.1 permanent filter_mode include proto zebra blocked 0.00 dev br0 port dummy10 grp 239.1.1.1 permanent filter_mode exclude source_list 192.0.2.3/0.00,192.0.2.1/0.00 proto zebra 0.00 The netlink interface is extended with a few new attributes in the RTM_NEWMDB request message: [ struct nlmsghdr ] [ struct br_port_msg ] [ MDBA_SET_ENTRY ] struct br_mdb_entry [ MDBA_SET_ENTRY_ATTRS ] [ MDBE_ATTR_SOURCE ] struct in_addr / struct in6_addr [ MDBE_ATTR_SRC_LIST ] // new [ MDBE_SRC_LIST_ENTRY ] [ MDBE_SRCATTR_ADDRESS ] struct in_addr / struct in6_addr [ ...] [ MDBE_ATTR_GROUP_MODE ] // new u8 [ MDBE_ATTR_RTPORT ] // new u8 No changes are required in RTM_NEWMDB responses and notifications, as all the information can already be dumped by the kernel today. Testing ======= Tested with existing bridge multicast selftests: bridge_igmp.sh, bridge_mdb_port_down.sh, bridge_mdb.sh, bridge_mld.sh, bridge_vlan_mcast.sh. In addition, added many new test cases for existing as well as for new MDB functionality. Patchset overview ================= Patches #1-#8 are non-functional preparations for the core changes in later patches. Patches #9-#10 allow user space to install (*, G) entries with a source list and associated filter mode. Specifically, patch #9 adds the necessary kernel plumbing and patch #10 exposes the new functionality to user space via a few new attributes. Patch #11 allows user space to specify the routing protocol of new MDB port group entries so that a routing daemon could differentiate between entries installed by it and those installed by an administrator. Patch #12 allows user space to replace MDB port group entries. This is useful, for example, when user space wants to add a new source to a source list. Instead of deleting a (*, G) entry and re-adding it with an extended source list (which would result in packet loss), user space can simply replace the current entry. Patches #13-#14 add tests for existing MDB functionality as well as for all new functionality added in this patchset. Future work =========== The VXLAN driver will need to be extended with an MDB so that it could selectively forward IP multicast traffic to NVE switches with interested receivers instead of simply flooding it to all switches as BUM. The idea is to reuse the existing MDB interface for the VXLAN driver in a similar way to how the FDB interface is shared between the bridge and VXLAN drivers. From command line perspective, configuration will look as follows: # bridge mdb add dev br0 port vxlan0 grp 239.1.1.1 permanent \ filter_mode exclude source_list 198.50.100.1,198.50.100.2 # bridge mdb add dev vxlan0 port vxlan0 grp 239.1.1.1 permanent \ filter_mode include source_list 198.50.100.3,198.50.100.4 \ dst 192.0.2.1 dst_port 4789 src_vni 2 # bridge mdb add dev vxlan0 port vxlan0 grp 239.1.1.1 permanent \ filter_mode exclude source_list 198.50.100.1,198.50.100.2 \ dst 192.0.2.2 dst_port 4789 src_vni 2 Where the first command is enabled by this set, but the next two will be the subject of future work. From netlink perspective, the existing PF_BRIDGE/RTM_*MDB messages will be extended to the VXLAN driver. This means that a few new attributes will be added (e.g., 'MDBE_ATTR_SRC_VNI') and that the handlers for these messages will need to move to net/core/rtnetlink.c. The rtnetlink code will call into the appropriate driver based on the ifindex specified in the ancillary header. iproute2 patches can be found here [9]. Changelog ========= Since v1 [10]: * Patch #12: Remove extack from br_mdb_replace_group_sg(). * Patch #12: Change 'nlflags' to u16 and move it after 'filter_mode' to pack the structure. Since RFC [11]: * Patch #6: New patch. * Patch #9: Use an array instead of a list to store source entries. * Patch #10: Use an array instead of list to store source entries. * Patch #10: Drop br_mdb_config_attrs_fini(). * Patch #11: Reject protocol for host entries. * Patch #13: New patch. * Patch #14: New patch. [1] https://datatracker.ietf.org/doc/html/rfc3376 [2] https://www.rfc-editor.org/rfc/rfc3810 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6af52ae2ed14a6bc756d5606b29097dfd76740b8 [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=68d4fd30c83b1b208e08c954cd45e6474b148c87 [5] https://datatracker.ietf.org/doc/html/rfc7432 [6] https://datatracker.ietf.org/doc/html/rfc7432#section-7.2 [7] https://datatracker.ietf.org/doc/html/rfc9251 [8] https://datatracker.ietf.org/doc/html/rfc9251#section-9.1 [9] https://github.com/idosch/iproute2/commits/submit/mdb_v1 [10] https://lore.kernel.org/netdev/20221208152839.1016350-1-idosch@nvidia.com/ [11] https://lore.kernel.org/netdev/20221018120420.561846-1-idosch@nvidia.com/ ==================== Link: https://lore.kernel.org/r/20221210145633.1328511-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit b6d00da08610e2b17412330d7cfc7c04a3b6570d Author: Ido Schimmel Date: Sat Dec 10 16:56:33 2022 +0200 selftests: forwarding: Add bridge MDB test Add a selftests that includes the following test cases: 1. Configuration tests. Both valid and invalid configurations are tested across all entry types (e.g., L2, IPv4). 2. Forwarding tests. Both host and port group entries are tested across all entry types. 3. Interaction between user installed MDB entries and IGMP / MLD control packets. Example output: INFO: # Host entries configuration tests TEST: Common host entries configuration tests (IPv4) [ OK ] TEST: Common host entries configuration tests (IPv6) [ OK ] TEST: Common host entries configuration tests (L2) [ OK ] INFO: # Port group entries configuration tests - (*, G) TEST: Common port group entries configuration tests (IPv4 (*, G)) [ OK ] TEST: Common port group entries configuration tests (IPv6 (*, G)) [ OK ] TEST: IPv4 (*, G) port group entries configuration tests [ OK ] TEST: IPv6 (*, G) port group entries configuration tests [ OK ] INFO: # Port group entries configuration tests - (S, G) TEST: Common port group entries configuration tests (IPv4 (S, G)) [ OK ] TEST: Common port group entries configuration tests (IPv6 (S, G)) [ OK ] TEST: IPv4 (S, G) port group entries configuration tests [ OK ] TEST: IPv6 (S, G) port group entries configuration tests [ OK ] INFO: # Port group entries configuration tests - L2 TEST: Common port group entries configuration tests (L2 (*, G)) [ OK ] TEST: L2 (*, G) port group entries configuration tests [ OK ] INFO: # Forwarding tests TEST: IPv4 host entries forwarding tests [ OK ] TEST: IPv6 host entries forwarding tests [ OK ] TEST: L2 host entries forwarding tests [ OK ] TEST: IPv4 port group "exclude" entries forwarding tests [ OK ] TEST: IPv6 port group "exclude" entries forwarding tests [ OK ] TEST: IPv4 port group "include" entries forwarding tests [ OK ] TEST: IPv6 port group "include" entries forwarding tests [ OK ] TEST: L2 port entries forwarding tests [ OK ] INFO: # Control packets tests TEST: IGMPv3 MODE_IS_INCLUE tests [ OK ] TEST: MLDv2 MODE_IS_INCLUDE tests [ OK ] Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski tools/testing/selftests/net/forwarding/Makefile | 1 + .../testing/selftests/net/forwarding/bridge_mdb.sh | 1164 ++++++++++++++++++++ 2 files changed, 1165 insertions(+) commit f9923a67ab623723663e8ba3eadf00a5bac82d6e Author: Ido Schimmel Date: Sat Dec 10 16:56:32 2022 +0200 selftests: forwarding: Rename bridge_mdb test The test is only concerned with host MDB entries and not with MDB entries as a whole. Rename the test to reflect that. Subsequent patches will add a more general test that will contain the test cases for host MDB entries and remove the current test. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski tools/testing/selftests/net/forwarding/Makefile | 2 +- .../selftests/net/forwarding/{bridge_mdb.sh => bridge_mdb_host.sh} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit 61f2183512a72c28674717b1ba706ed2749938d1 Author: Ido Schimmel Date: Sat Dec 10 16:56:31 2022 +0200 bridge: mcast: Support replacement of MDB port group entries Now that user space can specify additional attributes of port group entries such as filter mode and source list, it makes sense to allow user space to atomically modify these attributes by replacing entries instead of forcing user space to delete the entries and add them back. Replace MDB port group entries when the 'NLM_F_REPLACE' flag is specified in the netlink message header. When a (*, G) entry is replaced, update the following attributes: Source list, state, filter mode, protocol and flags. If the entry is temporary and in EXCLUDE mode, reset the group timer to the group membership interval. If the entry is temporary and in INCLUDE mode, reset the source timers of associated sources to the group membership interval. Examples: # bridge mdb replace dev br0 port dummy10 grp 239.1.1.1 permanent source_list 192.0.2.1,192.0.2.2 filter_mode include # bridge -d -s mdb show dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.2 permanent filter_mode include proto static 0.00 dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.1 permanent filter_mode include proto static 0.00 dev br0 port dummy10 grp 239.1.1.1 permanent filter_mode include source_list 192.0.2.2/0.00,192.0.2.1/0.00 proto static 0.00 # bridge mdb replace dev br0 port dummy10 grp 239.1.1.1 permanent source_list 192.0.2.1,192.0.2.3 filter_mode exclude proto zebra # bridge -d -s mdb show dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.3 permanent filter_mode include proto zebra blocked 0.00 dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.1 permanent filter_mode include proto zebra blocked 0.00 dev br0 port dummy10 grp 239.1.1.1 permanent filter_mode exclude source_list 192.0.2.3/0.00,192.0.2.1/0.00 proto zebra 0.00 # bridge mdb replace dev br0 port dummy10 grp 239.1.1.1 temp source_list 192.0.2.4,192.0.2.3 filter_mode include proto bgp # bridge -d -s mdb show dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.4 temp filter_mode include proto bgp 0.00 dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.3 temp filter_mode include proto bgp 0.00 dev br0 port dummy10 grp 239.1.1.1 temp filter_mode include source_list 192.0.2.4/259.44,192.0.2.3/259.44 proto bgp 0.00 Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 102 +++++++++++++++++++++++++++++++++++++++++++++--- net/bridge/br_private.h | 1 + 2 files changed, 98 insertions(+), 5 deletions(-) commit 1d7b66a7d9754c229d12c53ad6a1effe88c16ca4 Author: Ido Schimmel Date: Sat Dec 10 16:56:30 2022 +0200 bridge: mcast: Allow user space to specify MDB entry routing protocol Add the 'MDBE_ATTR_RTPORT' attribute to allow user space to specify the routing protocol of the MDB port group entry. Enforce a minimum value of 'RTPROT_STATIC' to prevent user space from using protocol values that should only be set by the kernel (e.g., 'RTPROT_KERNEL'). Maintain backward compatibility by defaulting to 'RTPROT_STATIC'. The protocol is already visible to user space in RTM_NEWMDB responses and notifications via the 'MDBA_MDB_EATTR_RTPROT' attribute. The routing protocol allows a routing daemon to distinguish between entries configured by it and those configured by the administrator. Once MDB flush is supported, the protocol can be used as a criterion according to which the flush is performed. Examples: # bridge mdb add dev br0 port dummy10 grp 239.1.1.1 permanent proto kernel Error: integer out of range. # bridge mdb add dev br0 port dummy10 grp 239.1.1.1 permanent proto static # bridge mdb add dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.1 permanent proto zebra # bridge mdb add dev br0 port dummy10 grp 239.1.1.2 permanent source_list 198.51.100.1,198.51.100.2 filter_mode include proto 250 # bridge -d mdb show dev br0 port dummy10 grp 239.1.1.2 src 198.51.100.2 permanent filter_mode include proto 250 dev br0 port dummy10 grp 239.1.1.2 src 198.51.100.1 permanent filter_mode include proto 250 dev br0 port dummy10 grp 239.1.1.2 permanent filter_mode include source_list 198.51.100.2/0.00,198.51.100.1/0.00 proto 250 dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.1 permanent filter_mode include proto zebra dev br0 port dummy10 grp 239.1.1.1 permanent filter_mode exclude proto static Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski include/uapi/linux/if_bridge.h | 1 + net/bridge/br_mdb.c | 15 +++++++++++++-- net/bridge/br_private.h | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) commit 6afaae6d12f54accf194e73ece617d1f456e438d Author: Ido Schimmel Date: Sat Dec 10 16:56:29 2022 +0200 bridge: mcast: Allow user space to add (*, G) with a source list and filter mode Add new netlink attributes to the RTM_NEWMDB request that allow user space to add (*, G) with a source list and filter mode. The RTM_NEWMDB message can already dump such entries (created by the kernel) so there is no need to add dump support. However, the message contains a different set of attributes depending if it is a request or a response. The naming and structure of the new attributes try to follow the existing ones used in the response. Request: [ struct nlmsghdr ] [ struct br_port_msg ] [ MDBA_SET_ENTRY ] struct br_mdb_entry [ MDBA_SET_ENTRY_ATTRS ] [ MDBE_ATTR_SOURCE ] struct in_addr / struct in6_addr [ MDBE_ATTR_SRC_LIST ] // new [ MDBE_SRC_LIST_ENTRY ] [ MDBE_SRCATTR_ADDRESS ] struct in_addr / struct in6_addr [ ...] [ MDBE_ATTR_GROUP_MODE ] // new u8 Response: [ struct nlmsghdr ] [ struct br_port_msg ] [ MDBA_MDB ] [ MDBA_MDB_ENTRY ] [ MDBA_MDB_ENTRY_INFO ] struct br_mdb_entry [ MDBA_MDB_EATTR_TIMER ] u32 [ MDBA_MDB_EATTR_SOURCE ] struct in_addr / struct in6_addr [ MDBA_MDB_EATTR_RTPROT ] u8 [ MDBA_MDB_EATTR_SRC_LIST ] [ MDBA_MDB_SRCLIST_ENTRY ] [ MDBA_MDB_SRCATTR_ADDRESS ] struct in_addr / struct in6_addr [ MDBA_MDB_SRCATTR_TIMER ] u8 [...] [ MDBA_MDB_EATTR_GROUP_MODE ] u8 Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski include/uapi/linux/if_bridge.h | 20 +++++++ net/bridge/br_mdb.c | 130 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+) commit b1c8fec8d459fb49b2033c014256477e51913e2e Author: Ido Schimmel Date: Sat Dec 10 16:56:28 2022 +0200 bridge: mcast: Add support for (*, G) with a source list and filter mode In preparation for allowing user space to add (*, G) entries with a source list and associated filter mode, add the necessary plumbing to handle such requests. Extend the MDB configuration structure with a currently empty source array and filter mode that is currently hard coded to EXCLUDE. Add the source entries and the corresponding (S, G) entries before making the new (*, G) port group entry visible to the data path. Handle the creation of each source entry in a similar fashion to how it is created from the data path in response to received Membership Reports: Create the source entry, arm the source timer (if needed), add a corresponding (S, G) forwarding entry and finally mark the source entry as installed (by user space). Add the (S, G) entry by populating an MDB configuration structure and calling br_mdb_add_group_sg() as if a new entry is created by user space, with the sole difference that the 'src_entry' field is set to make sure that the group timer of such entries is never armed. Note that it is not currently possible to add more than 32 source entries to a port group entry. If this proves to be a problem we can either increase 'PG_SRC_ENT_LIMIT' or avoid forcing a limit on entries created by user space. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++-- net/bridge/br_private.h | 7 +++ 2 files changed, 132 insertions(+), 3 deletions(-) commit 079afd66161bbbde14ed9f207f7fe6170f5b37b3 Author: Ido Schimmel Date: Sat Dec 10 16:56:27 2022 +0200 bridge: mcast: Avoid arming group timer when (S, G) corresponds to a source User space will soon be able to install a (*, G) with a source list, prompting the creation of a (S, G) entry for each source. In this case, the group timer of the (S, G) entry should never be set. Solve this by adding a new field to the MDB configuration structure that denotes whether the (S, G) corresponds to a source or not. The field will be set in a subsequent patch where br_mdb_add_group_sg() is called in order to create a (S, G) entry for each user provided source. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 2 +- net/bridge/br_private.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit a01ecb1712ddbcd41360ad0c554b460adbac0528 Author: Ido Schimmel Date: Sat Dec 10 16:56:26 2022 +0200 bridge: mcast: Add a flag for user installed source entries There are a few places where the bridge driver differentiates between (S, G) entries installed by the kernel (in response to Membership Reports) and those installed by user space. One of them is when deleting an (S, G) entry corresponding to a source entry that is being deleted. While user space cannot currently add a source entry to a (*, G), it can add an (S, G) entry that later corresponds to a source entry created by the reception of a Membership Report. If this source entry is later deleted because its source timer expired or because the (*, G) entry is being deleted, the bridge driver will not delete the corresponding (S, G) entry if it was added by user space as permanent. This is going to be a problem when the ability to install a (*, G) with a source list is exposed to user space. In this case, when user space installs the (*, G) as permanent, then all the (S, G) entries corresponding to its source list will also be installed as permanent. When user space deletes the (*, G), all the source entries will be deleted and the expectation is that the corresponding (S, G) entries will be deleted as well. Solve this by introducing a new source entry flag denoting that the entry was installed by user space. When the entry is deleted, delete the corresponding (S, G) entry even if it was installed by user space as permanent, as the flag tells us that it was installed in response to the source entry being created. The flag will be set in a subsequent patch where source entries are created in response to user requests. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_multicast.c | 3 ++- net/bridge/br_private.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 083e353482b4c9b727846643ad6ca7b784dd486b Author: Ido Schimmel Date: Sat Dec 10 16:56:25 2022 +0200 bridge: mcast: Expose __br_multicast_del_group_src() Expose __br_multicast_del_group_src() which is symmetric to br_multicast_new_group_src() and does not remove the installed {S, G} forwarding entry, unlike br_multicast_del_group_src(). The function will be used in the error path when user space was able to add a new source entry, but failed to install a corresponding forwarding entry. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_multicast.c | 11 ++++++++--- net/bridge/br_private.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) commit fd0c696164cf13ae0128f14209e2dbfcd86584b8 Author: Ido Schimmel Date: Sat Dec 10 16:56:24 2022 +0200 bridge: mcast: Expose br_multicast_new_group_src() Currently, new group source entries are only created in response to received Membership Reports. Subsequent patches are going to allow user space to install (*, G) entries with a source list. As a preparatory step, expose br_multicast_new_group_src() so that it could later be invoked from the MDB code (i.e., br_mdb.c) that handles RTM_NEWMDB messages. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_multicast.c | 2 +- net/bridge/br_private.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 160dd93114ddd31ed2b6290a7495d53717b79cf8 Author: Ido Schimmel Date: Sat Dec 10 16:56:23 2022 +0200 bridge: mcast: Add a centralized error path Subsequent patches will add memory allocations in br_mdb_config_init() as the MDB configuration structure will include a linked list of source entries. This memory will need to be freed regardless if br_mdb_add() succeeded or failed. As a preparation for this change, add a centralized error path where the memory will be freed. Note that br_mdb_del() already has one error path and therefore does not require any changes. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1870a2d35abb6f4d8ff2213d50bbd082b1f8cde5 Author: Ido Schimmel Date: Sat Dec 10 16:56:22 2022 +0200 bridge: mcast: Place netlink policy before validation functions Subsequent patches are going to add additional validation functions and netlink policies. Some of these functions will need to perform parsing using nla_parse_nested() and the new policies. In order to keep all the policies next to each other, move the current policy to before the validation functions. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6ff1e68eb21501042ebf8226d500398fd07350f3 Author: Ido Schimmel Date: Sat Dec 10 16:56:21 2022 +0200 bridge: mcast: Split (*, G) and (S, G) addition into different functions When the bridge is using IGMP version 3 or MLD version 2, it handles the addition of (*, G) and (S, G) entries differently. When a new (S, G) port group entry is added, all the (*, G) EXCLUDE ports need to be added to the port group of the new entry. Similarly, when a new (*, G) EXCLUDE port group entry is added, the port needs to be added to the port group of all the matching (S, G) entries. Subsequent patches will create more differences between both entry types. Namely, filter mode and source list can only be specified for (*, G) entries. Given the current and future differences between both entry types, handle the addition of each entry type in a different function, thereby avoiding the creation of one complex function. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 145 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 96 insertions(+), 49 deletions(-) commit b63e30651c59bdef89ec158879d146e8d89cd5e1 Author: Ido Schimmel Date: Sat Dec 10 16:56:20 2022 +0200 bridge: mcast: Do not derive entry type from its filter mode Currently, the filter mode (i.e., INCLUDE / EXCLUDE) of MDB entries cannot be set from user space. Instead, it is set by the kernel according to the entry type: (*, G) entries are treated as EXCLUDE and (S, G) entries are treated as INCLUDE. This allows the kernel to derive the entry type from its filter mode. Subsequent patches will allow user space to set the filter mode of (*, G) entries, making the current assumption incorrect. As a preparation, remove the current assumption and instead determine the entry type from its key, which is a more direct way. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 02abf84aa52da86586ec6323969afa158ec6e4aa Author: Jiapeng Chong Date: Mon Dec 12 13:58:13 2022 +0800 qlcnic: Clean up some inconsistent indenting No functional modification involved. drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c:714 qlcnic_validate_ring_count() warn: inconsistent indenting. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3419 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20221212055813.91154-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e095493091e850d5292ad01d8fbf5cde1d89ac53 Author: Vladimir Oltean Date: Sat Dec 10 01:52:42 2022 +0200 net: dsa: tag_8021q: avoid leaking ctx on dsa_tag_8021q_register() error path If dsa_tag_8021q_setup() fails, for example due to the inability of the device to install a VLAN, the tag_8021q context of the switch will leak. Make sure it is freed on the error path. Fixes: 328621f6131f ("net: dsa: tag_8021q: absorb dsa_8021q_setup into dsa_tag_8021q_{,un}register") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20221209235242.480344-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski net/dsa/tag_8021q.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit b1746fbab15a1d6d5e61846f260f8fece1fca576 Author: Tirthendu Sarkar Date: Fri Dec 9 10:55:53 2022 -0800 i40e: allow toggling loopback mode via ndo_set_features callback Add support for NETIF_F_LOOPBACK. This feature can be set via: $ ethtool -K eth0 loopback This sets the MAC Tx->Rx loopback. This feature is used for the xsk selftests, and might have other uses too. Signed-off-by: Tirthendu Sarkar Reviewed-by: Alexander Lobakin Reviewed-by: Leon Romanovsky Tested-by: Magnus Karlsson Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20221209185553.2520088-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 8 ++++--- drivers/net/ethernet/intel/i40e/i40e_common.c | 26 +++++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_main.c | 28 ++++++++++++++++++++++- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 3 +++ 4 files changed, 61 insertions(+), 4 deletions(-) commit 0c87b545a2ed5cd8a6318011f1c92b188c2d74bc Author: Bartosz Staszewski Date: Fri Dec 9 10:54:11 2022 -0800 i40e: Fix the inability to attach XDP program on downed interface Whenever trying to load XDP prog on downed interface, function i40e_xdp was passing vsi->rx_buf_len field to i40e_xdp_setup() which was equal 0. i40e_open() calls i40e_vsi_configure_rx() which configures that field, but that only happens when interface is up. When it is down, i40e_open() is not being called, thus vsi->rx_buf_len is not set. Solution for this is calculate buffer length in newly created function - i40e_calculate_vsi_rx_buf_len() that return actual buffer length. Buffer length is being calculated based on the same rules applied previously in i40e_vsi_configure_rx() function. Fixes: 613142b0bb88 ("i40e: Log error for oversized MTU on device") Fixes: 0c8493d90b6b ("i40e: add XDP support for pass and drop actions") Signed-off-by: Bartosz Staszewski Signed-off-by: Mateusz Palczewski Tested-by: Shwetha Nagaraju Reviewed-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen Reviewed-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221209185411.2519898-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/i40e/i40e_main.c | 36 +++++++++++++++++++---------- 1 file changed, 24 insertions(+), 12 deletions(-) commit add76959575736c194b3118d96e43f8cd7bcec82 Merge: 617fe4fa82b2 17b8d847b92d Author: Linus Torvalds Date: Mon Dec 12 15:19:38 2022 -0800 Merge tag 'perf-core-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf events updates from Ingo Molnar: - Thoroughly rewrite the data structures that implement perf task context handling, with the goal of fixing various quirks and unfeatures both in already merged, and in upcoming proposed code. The old data structure is the per task and per cpu perf_event_contexts: task_struct::perf_events_ctxp[] <-> perf_event_context <-> perf_cpu_context ^ | ^ | ^ `---------------------------------' | `--> pmu ---' v ^ perf_event ------' In this new design this is replaced with a single task context and a single CPU context, plus intermediate data-structures: task_struct::perf_event_ctxp -> perf_event_context <- perf_cpu_context ^ | ^ ^ `---------------------------' | | | | perf_cpu_pmu_context <--. | `----. ^ | | | | | | v v | | ,--> perf_event_pmu_context | | | | | | | v v | perf_event ---> pmu ----------------' [ See commit bd2756811766 for more details. ] This rewrite was developed by Peter Zijlstra and Ravi Bangoria. - Optimize perf_tp_event() - Update the Intel uncore PMU driver, extending it with UPI topology discovery on various hardware models. - Misc fixes & cleanups * tag 'perf-core-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits) perf/x86/intel/uncore: Fix reference count leak in __uncore_imc_init_box() perf/x86/intel/uncore: Fix reference count leak in snr_uncore_mmio_map() perf/x86/intel/uncore: Fix reference count leak in hswep_has_limit_sbox() perf/x86/intel/uncore: Fix reference count leak in sad_cfg_iio_topology() perf/x86/intel/uncore: Make set_mapping() procedure void perf/x86/intel/uncore: Update sysfs-devices-mapping file perf/x86/intel/uncore: Enable UPI topology discovery for Sapphire Rapids perf/x86/intel/uncore: Enable UPI topology discovery for Icelake Server perf/x86/intel/uncore: Get UPI NodeID and GroupID perf/x86/intel/uncore: Enable UPI topology discovery for Skylake Server perf/x86/intel/uncore: Generalize get_topology() for SKX PMUs perf/x86/intel/uncore: Disable I/O stacks to PMU mapping on ICX-D perf/x86/intel/uncore: Clear attr_update properly perf/x86/intel/uncore: Introduce UPI topology type perf/x86/intel/uncore: Generalize IIO topology support perf/core: Don't allow grouping events from different hw pmus perf/amd/ibs: Make IBS a core pmu perf: Fix function pointer case perf/x86/amd: Remove the repeated declaration perf: Fix possible memleak in pmu_dev_alloc() ... commit 26a8057a1ada97b528b93fdf3ac4fd03170f1900 Author: Yuwei Guan Date: Sun Dec 11 21:08:41 2022 +0800 f2fs: reset wait_ms to default if any of the victims have been selected In non-foreground gc mode, if no victim is selected, the gc process will wait for no_gc_sleep_time before waking up again. In this subsequent time, even though a victim will be selected, the gc process still waits for no_gc_sleep_time before waking up. The configuration of wait_ms is not reasonable. After any of the victims have been selected, we need to reset wait_ms to default sleep time from no_gc_sleep_time. Signed-off-by: Yuwei Guan Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2a78dd22c2eba50cba8254d4166481791ed884bc Merge: 1280d4b76f34 cb54d392279d Author: Jakub Kicinski Date: Mon Dec 12 15:18:28 2022 -0800 Merge branch 'net-add-iff_no_addrconf-to-prevent-ipv6-addrconf' Xin Long says: ==================== net: add IFF_NO_ADDRCONF to prevent ipv6 addrconf This patchset adds IFF_NO_ADDRCONF flag for dev->priv_flags to prevent ipv6 addrconf, as Jiri Pirko's suggestion. For Bonding it changes to use this flag instead of IFF_SLAVE flag in Patch 1, and for Teaming and Net Failover it sets this flag before calling dev_open() in Patch 2 and 3. ==================== Link: https://lore.kernel.org/r/cover.1670599241.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski commit cb54d392279dd450e65f6fa3c3f66db8cbdbcc0e Author: Xin Long Date: Fri Dec 9 10:21:40 2022 -0500 net: failover: use IFF_NO_ADDRCONF flag to prevent ipv6 addrconf Similar to Bonding and Team, to prevent ipv6 addrconf with IFF_NO_ADDRCONF in slave_dev->priv_flags for slave ports is also needed in net failover. Note that dev_open(slave_dev) is called in .slave_register, which is called after the IFF_NO_ADDRCONF flag is set in failover_slave_register(). Signed-off-by: Xin Long Signed-off-by: Jakub Kicinski net/core/failover.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0aa64df30b382fc71d4fb1827d528e0eb3eff854 Author: Xin Long Date: Fri Dec 9 10:21:39 2022 -0500 net: team: use IFF_NO_ADDRCONF flag to prevent ipv6 addrconf This patch is to use IFF_NO_ADDRCONF flag to prevent ipv6 addrconf for Team port. This flag will be set in team_port_enter(), which is called before dev_open(), and cleared in team_port_leave(), called after dev_close() and the err path in team_port_add(). Signed-off-by: Xin Long Signed-off-by: Jakub Kicinski drivers/net/team/team.c | 2 ++ 1 file changed, 2 insertions(+) commit 8a321cf7becc6c065ae595b837b826a2a81036b9 Author: Xin Long Date: Fri Dec 9 10:21:38 2022 -0500 net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf Currently, in bonding it reused the IFF_SLAVE flag and checked it in ipv6 addrconf to prevent ipv6 addrconf. However, it is not a proper flag to use for no ipv6 addrconf, for bonding it has to move IFF_SLAVE flag setting ahead of dev_open() in bond_enslave(). Also, IFF_MASTER/SLAVE are historical flags used in bonding and eql, as Jiri mentioned, the new devices like Team, Failover do not use this flag. So as Jiri suggested, this patch adds IFF_NO_ADDRCONF in priv_flags of the device to indicate no ipv6 addconf, and uses it in bonding and moves IFF_SLAVE flag setting back to its original place. Signed-off-by: Xin Long Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_main.c | 18 +++++++++++++----- include/linux/netdevice.h | 3 ++- net/ipv6/addrconf.c | 4 ++-- 3 files changed, 17 insertions(+), 8 deletions(-) commit 617fe4fa82b2fe5bcb99f97f223f408603bfa5a0 Merge: 2f60f830842d 90d758896787 Author: Linus Torvalds Date: Mon Dec 12 15:14:53 2022 -0800 Merge tag 'locking-core-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "Two changes in this cycle: - a micro-optimization in static_key_slow_inc_cpuslocked() - fix futex death-notification wakeup bug" * tag 'locking-core-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Resend potentially swallowed owner death notification jump_label: Use atomic_try_cmpxchg() in static_key_slow_inc_cpuslocked() commit ede5a389852d3640a28e7187fb32b7f204380901 Author: Piergiorgio Beruto Date: Sat Dec 10 23:37:22 2022 +0100 stmmac: fix potential division by 0 When the MAC is connected to a 10 Mb/s PHY and the PTP clock is derived from the MAC reference clock (default), the clk_ptp_rate becomes too small and the calculated sub second increment becomes 0 when computed by the stmmac_config_sub_second_increment() function within stmmac_init_tstamp_counter(). Therefore, the subsequent div_u64 in stmmac_init_tstamp_counter() operation triggers a divide by 0 exception as shown below. [ 95.062067] socfpga-dwmac ff700000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 95.076440] socfpga-dwmac ff700000.ethernet eth0: PHY [stmmac-0:08] driver [NCN26000] (irq=49) [ 95.095964] dwmac1000: Master AXI performs any burst length [ 95.101588] socfpga-dwmac ff700000.ethernet eth0: No Safety Features support found [ 95.109428] Division by zero in kernel. [ 95.113447] CPU: 0 PID: 239 Comm: ifconfig Not tainted 6.1.0-rc7-centurion3-1.0.3.0-01574-gb624218205b7-dirty #77 [ 95.123686] Hardware name: Altera SOCFPGA [ 95.127695] unwind_backtrace from show_stack+0x10/0x14 [ 95.132938] show_stack from dump_stack_lvl+0x40/0x4c [ 95.137992] dump_stack_lvl from Ldiv0+0x8/0x10 [ 95.142527] Ldiv0 from __aeabi_uidivmod+0x8/0x18 [ 95.147232] __aeabi_uidivmod from div_u64_rem+0x1c/0x40 [ 95.152552] div_u64_rem from stmmac_init_tstamp_counter+0xd0/0x164 [ 95.158826] stmmac_init_tstamp_counter from stmmac_hw_setup+0x430/0xf00 [ 95.165533] stmmac_hw_setup from __stmmac_open+0x214/0x2d4 [ 95.171117] __stmmac_open from stmmac_open+0x30/0x44 [ 95.176182] stmmac_open from __dev_open+0x11c/0x134 [ 95.181172] __dev_open from __dev_change_flags+0x168/0x17c [ 95.186750] __dev_change_flags from dev_change_flags+0x14/0x50 [ 95.192662] dev_change_flags from devinet_ioctl+0x2b4/0x604 [ 95.198321] devinet_ioctl from inet_ioctl+0x1ec/0x214 [ 95.203462] inet_ioctl from sock_ioctl+0x14c/0x3c4 [ 95.208354] sock_ioctl from vfs_ioctl+0x20/0x38 [ 95.212984] vfs_ioctl from sys_ioctl+0x250/0x844 [ 95.217691] sys_ioctl from ret_fast_syscall+0x0/0x4c [ 95.222743] Exception stack(0xd0ee1fa8 to 0xd0ee1ff0) [ 95.227790] 1fa0: 00574c4f be9aeca4 00000003 00008914 be9aeca4 be9aec50 [ 95.235945] 1fc0: 00574c4f be9aeca4 0059f078 00000036 be9aee8c be9aef7a 00000015 00000000 [ 95.244096] 1fe0: 005a01f0 be9aec38 004d7484 b6e67d74 Signed-off-by: Piergiorgio Beruto Fixes: 91a2559c1dc5 ("net: stmmac: Fix sub-second increment") Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/de4c64ccac9084952c56a06a8171d738604c4770.1670678513.git.piergiorgio.beruto@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 3 ++- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 87c978123ef1f346d7385eaccc141022d368166f Author: Christophe JAILLET Date: Sat Dec 10 18:35:00 2022 +0100 octeontx2-af: cn10k: mcs: Fix a resource leak in the probe and remove functions In mcs_register_interrupts(), a call to request_irq() is not balanced by a corresponding free_irq(), neither in the error handling path, nor in the remove function. Add the missing calls. Fixes: 6c635f78c474 ("octeontx2-af: cn10k: mcs: Handle MCS block interrupts") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/69f153db5152a141069f990206e7389f961d41ec.1670693669.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/mcs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1280d4b76f3402645aa7075a53f49a3a14be07a8 Author: Uladzislau Koshchanka Date: Sat Dec 10 03:44:23 2022 +0300 lib: packing: replace bit_reverse() with bitrev8() Remove bit_reverse() function. Instead use bitrev8() from linux/bitrev.h + bitshift. Reduces code-repetition. Signed-off-by: Uladzislau Koshchanka Link: https://lore.kernel.org/r/20221210004423.32332-1-koshchanka@gmail.com Signed-off-by: Jakub Kicinski lib/Kconfig | 1 + lib/packing.c | 16 ++-------------- 2 files changed, 3 insertions(+), 14 deletions(-) commit 93e637a37b2872c2fce6ce4df6e59cdc2fe8ca5e Author: Kurt Kanzenbach Date: Mon Dec 12 09:15:46 2022 +0100 dt-bindings: net: dsa: hellcreek: Sync DSA maintainers The current DSA maintainers are Florian Fainelli, Andrew Lunn and Vladimir Oltean. Update the hellcreek binding accordingly. Signed-off-by: Kurt Kanzenbach Reviewed-by: Vladimir Oltean Acked-by: Rob Herring Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20221212081546.6916-1-kurt@linutronix.de Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7b061b80ee6f91aa0b89daa3069802d7ea4c57f Author: Yunsheng Lin Date: Mon Dec 12 11:24:26 2022 +0800 net: tso: inline tso_count_descs() tso_count_descs() is a small function doing simple calculation, and tso_count_descs() is used in fast path, so inline it to reduce the overhead of calls. Signed-off-by: Yunsheng Lin Link: https://lore.kernel.org/r/20221212032426.16050-1-linyunsheng@huawei.com Signed-off-by: Jakub Kicinski include/net/tso.h | 8 +++++++- net/core/tso.c | 8 -------- 2 files changed, 7 insertions(+), 9 deletions(-) commit 8f18655c49eb6abfe7fc3711d32d23b311fbc6a6 Author: Vladimir Oltean Date: Fri Dec 9 19:58:40 2022 +0200 net: dsa: don't call ptp_classify_raw() if switch doesn't provide RX timestamping ptp_classify_raw() is not exactly cheap, since it invokes a BPF program for every skb in the receive path. For switches which do not provide ds->ops->port_rxtstamp(), running ptp_classify_raw() provides precisely nothing, so check for the presence of the function pointer first, since that is much cheaper. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Kurt Kanzenbach Link: https://lore.kernel.org/r/20221209175840.390707-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski net/dsa/tag.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cd2aafa25b94b4d7f46fbae0bf58701689db296b Merge: 4cc58a087ddd 9e3d9ae52b56 Author: Jakub Kicinski Date: Mon Dec 12 15:01:23 2022 -0800 Merge branch 'trace-points-for-mv88e6xxx' Vladimir Oltean says: ==================== Trace points for mv88e6xxx While testing Hans Schultz' attempt at offloading MAB on mv88e6xxx: https://patchwork.kernel.org/project/netdevbpf/cover/20221205185908.217520-1-netdev@kapio-technology.com/ I noticed that he still didn't get rid of the huge log spam caused by ATU and VTU violations, even if we discussed about this: https://patchwork.kernel.org/project/netdevbpf/cover/20221112203748.68995-1-netdev@kapio-technology.com/#25091076 It seems unlikely he's going to ever do this, so here is my own stab at converting those messages to trace points. This is IMO an improvement regardless of whether Hans' work with MAB lands or not, especially the VTU violations which were quite annoying to me as well. A small sample of before: $ ./bridge_locked_port.sh lan1 lan2 lan3 lan4 [ 114.465272] mv88e6085 d0032004.mdio-mii:10: VTU member violation for vid 100, source port 9 [ 119.550508] mv88e6xxx_g1_vtu_prob_irq_thread_fn: 34 callbacks suppressed [ 120.369586] mv88e6085 d0032004.mdio-mii:10: VTU member violation for vid 100, source port 9 [ 120.473658] mv88e6085 d0032004.mdio-mii:10: VTU member violation for vid 100, source port 9 [ 125.535209] mv88e6xxx_g1_vtu_prob_irq_thread_fn: 21 callbacks suppressed [ 125.535243] mv88e6085 d0032004.mdio-mii:10: VTU member violation for vid 100, source port 9 [ 126.174558] mv88e6085 d0032004.mdio-mii:10: VTU member violation for vid 100, source port 9 [ 130.234055] mv88e6085 d0032004.mdio-mii:10: ATU miss violation for 00:01:02:03:04:01 fid 3 portvec 4 spid 2 [ 130.338193] mv88e6085 d0032004.mdio-mii:10: ATU miss violation for 00:01:02:03:04:01 fid 3 portvec 4 spid 2 [ 134.626099] mv88e6xxx_g1_atu_prob_irq_thread_fn: 38 callbacks suppressed [ 134.626132] mv88e6085 d0032004.mdio-mii:10: ATU miss violation for 00:01:02:03:04:01 fid 3 portvec 4 spid 2 and after: $ trace-cmd record -e mv88e6xxx ./bridge_locked_port.sh lan1 lan2 lan3 lan4 $ trace-cmd report irq/35-moxtet-60 [001] 93.929734: mv88e6xxx_vtu_miss_violation: dev d0032004.mdio-mii:10 spid 9 vid 100 irq/35-moxtet-60 [001] 94.183209: mv88e6xxx_vtu_miss_violation: dev d0032004.mdio-mii:10 spid 9 vid 100 irq/35-moxtet-60 [001] 101.865545: mv88e6xxx_vtu_miss_violation: dev d0032004.mdio-mii:10 spid 9 vid 100 irq/35-moxtet-60 [001] 121.831261: mv88e6xxx_vtu_member_violation: dev d0032004.mdio-mii:10 spid 9 vid 100 irq/35-moxtet-60 [001] 122.371238: mv88e6xxx_vtu_member_violation: dev d0032004.mdio-mii:10 spid 9 vid 100 irq/35-moxtet-60 [001] 148.452932: mv88e6xxx_atu_miss_violation: dev d0032004.mdio-mii:10 spid 2 portvec 0x4 addr 00:01:02:03:04:01 fid 0 v1 at: https://patchwork.kernel.org/project/netdevbpf/cover/20221207233954.3619276-1-vladimir.oltean@nxp.com/ ==================== Link: https://lore.kernel.org/r/20221209172817.371434-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 9e3d9ae52b5657399a7b61258cc7482434a911bb Author: Vladimir Oltean Date: Fri Dec 9 19:28:17 2022 +0200 net: dsa: mv88e6xxx: replace VTU violation prints with trace points It is possible to trigger these VTU violation messages very easily, it's only necessary to send packets with an unknown VLAN ID to a port that belongs to a VLAN-aware bridge. Do a similar thing as for ATU violation messages, and hide them in the kernel's trace buffer. New usage model: $ trace-cmd list | grep mv88e6xxx mv88e6xxx mv88e6xxx:mv88e6xxx_vtu_miss_violation mv88e6xxx:mv88e6xxx_vtu_member_violation $ trace-cmd report Signed-off-by: Vladimir Oltean Reviewed-by: Saeed Mahameed Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/dsa/mv88e6xxx/global1_vtu.c | 7 +++---- drivers/net/dsa/mv88e6xxx/trace.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) commit 8646384d80f3d3b4a66b3284dbbd8232d1b8799e Author: Vladimir Oltean Date: Fri Dec 9 19:28:16 2022 +0200 net: dsa: mv88e6xxx: replace ATU violation prints with trace points In applications where the switch ports must perform 802.1X based authentication and are therefore locked, ATU violation interrupts are quite to be expected as part of normal operation. The problem is that they currently spam the kernel log, even if rate limited. Create a series of trace points, all derived from the same event class, which log these violations to the kernel's trace buffer, which is both much faster and much easier to ignore than printing to a serial console. New usage model: $ trace-cmd list | grep mv88e6xxx mv88e6xxx mv88e6xxx:mv88e6xxx_atu_full_violation mv88e6xxx:mv88e6xxx_atu_miss_violation mv88e6xxx:mv88e6xxx_atu_member_violation $ trace-cmd record -e mv88e6xxx sleep 10 Signed-off-by: Vladimir Oltean Reviewed-by: Saeed Mahameed Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/dsa/mv88e6xxx/Makefile | 4 ++ drivers/net/dsa/mv88e6xxx/global1_atu.c | 19 +++++----- drivers/net/dsa/mv88e6xxx/trace.c | 6 +++ drivers/net/dsa/mv88e6xxx/trace.h | 66 +++++++++++++++++++++++++++++++++ 4 files changed, 86 insertions(+), 9 deletions(-) commit 4bf24ad09bc0b05e97fb48b962b2c9246fc76727 Author: Hans J. Schultz Date: Fri Dec 9 19:28:15 2022 +0200 net: dsa: mv88e6xxx: read FID when handling ATU violations When an ATU violation occurs, the switch uses the ATU FID register to report the FID of the MAC address that incurred the violation. It would be good for the driver to know the FID value for purposes such as logging and CPU-based authentication. Up until now, the driver has been calling the mv88e6xxx_g1_atu_op() function to read ATU violations, but that doesn't do exactly what we want, namely it calls mv88e6xxx_g1_atu_fid_write() with FID 0. (side note, the documentation for the ATU Get/Clear Violation command says that writes to the ATU FID register have no effect before the operation starts, it's only that we disregard the value that this register provides once the operation completes) So mv88e6xxx_g1_atu_fid_write() is not what we want, but rather mv88e6xxx_g1_atu_fid_read(). However, the latter doesn't exist, we need to write it. The remainder of mv88e6xxx_g1_atu_op() except for mv88e6xxx_g1_atu_fid_write() is still needed, namely to send a GET_CLR_VIOLATION command to the ATU. In principle we could have still kept calling mv88e6xxx_g1_atu_op(), but the MDIO writes to the ATU FID register are pointless, but in the interest of doing less CPU work per interrupt, write a new function called mv88e6xxx_g1_read_atu_violation() and call it. The FID will be the port default FID as set by mv88e6xxx_port_set_fid() if the VID from the packet cannot be found in the VTU. Otherwise it is the FID derived from the VTU entry associated with that VID. Signed-off-by: Hans J. Schultz Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/dsa/mv88e6xxx/global1_atu.c | 72 ++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 11 deletions(-) commit 8a1786b7d44180ad8316d280d99524db6272198f Author: Vladimir Oltean Date: Fri Dec 9 19:28:14 2022 +0200 net: dsa: mv88e6xxx: remove ATU age out violation print Currently, the MV88E6XXX_PORT_ASSOC_VECTOR_INT_AGE_OUT bit (interrupt on age out) is not enabled by the driver, and as a result, the print for age out violations is dead code. Remove it until there is some way for this to be triggered. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/dsa/mv88e6xxx/global1_atu.c | 6 ------ 1 file changed, 6 deletions(-) commit 7411143f2021530d7641fbb40daaada4ee63f7e6 Author: Yangtao Li Date: Tue Nov 29 12:15:23 2022 +0800 f2fs: fix some format WARNING in debug.c and sysfs.c To fix: WARNING: function definition argument 'struct f2fs_attr *' should also have an identifier name + ssize_t (*show)(struct f2fs_attr *, struct f2fs_sb_info *, char *); WARNING: return sysfs_emit(...) formats should include a terminating newline + return sysfs_emit(buf, "(none)"); WARNING: Prefer 'unsigned int' to bare use of 'unsigned' + unsigned npages = NODE_MAPPING(sbi)->nrpages; WARNING: Missing a blank line after declarations + unsigned npages = COMPRESS_MAPPING(sbi)->nrpages; + si->page_mem += (unsigned long long)npages << PAGE_SHIFT; WARNING: quoted string split across lines + seq_printf(s, "CP merge (Queued: %4d, Issued: %4d, Total: %4d, " + "Cur time: %4d(ms), Peak time: %4d(ms))\n", Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 45 +++++++++++++++++++++++---------------------- fs/f2fs/sysfs.c | 10 +++++----- 2 files changed, 28 insertions(+), 27 deletions(-) commit 25547439f1dcc3def6062bd3e69165cd806a594e Author: Yangtao Li Date: Fri Dec 2 12:58:41 2022 +0800 f2fs: don't call f2fs_issue_discard_timeout() when discard_cmd_cnt is 0 in f2fs_put_super() No need to call f2fs_issue_discard_timeout() in f2fs_put_super, when no discard command requires issue. Since the caller of f2fs_issue_discard_timeout() usually judges the number of discard commands before using it. Let's move this logic to f2fs_issue_discard_timeout(). By the way, use f2fs_realtime_discard_enable to simplify the code. Reported-by: kernel test robot Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 6 ++++-- fs/f2fs/super.c | 8 ++------ 2 files changed, 6 insertions(+), 8 deletions(-) commit 15e38ee44d50cad264da80ef75626b9224ddc4a3 Author: Yangtao Li Date: Mon Dec 5 22:56:03 2022 +0800 f2fs: fix iostat parameter for discard Just like other data we count uses the number of bytes as the basic unit, but discard uses the number of cmds as the statistical unit. In fact the discard command contains the number of blocks, so let's change to the number of bytes as the base unit. Fixes: b0af6d491a6b ("f2fs: add app/fs io stat") Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db8dcd25ec84120d4e57a7f17a566825cec17ae8 Author: Colin Ian King Date: Wed Dec 7 13:42:17 2022 +0000 f2fs: Fix spelling mistake in label: free_bio_enrty_cache -> free_bio_entry_cache There is a spelling mistake in a label name. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2f60f830842d6c6960a0c038695f7bb4f0ef896d Merge: 9196a0ba9f0e be84d8ed3f04 Author: Linus Torvalds Date: Mon Dec 12 14:54:24 2022 -0800 Merge tag 'x86_alternatives_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 alternative update from Borislav Petkov: "A single alternatives patching fix for modules: - Have alternatives patch the same sections in modules as in vmlinux" * tag 'x86_alternatives_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/alternative: Consistently patch SMP locks in vmlinux and modules commit 71644dff481180ba024ac4f5cb1f068756357adf Author: Jaegeuk Kim Date: Thu Dec 1 17:37:15 2022 -0800 f2fs: add block_age-based extent cache This patch introduces a runtime hot/cold data separation method for f2fs, in order to improve the accuracy for data temperature classification, reduce the garbage collection overhead after long-term data updates. Enhanced hot/cold data separation can record data block update frequency as "age" of the extent per inode, and take use of the age info to indicate better temperature type for data block allocation: - It records total data blocks allocated since mount; - When file extent has been updated, it calculate the count of data blocks allocated since last update as the age of the extent; - Before the data block allocated, it searches for the age info and chooses the suitable segment for allocation. Test and result: - Prepare: create about 30000 files * 3% for cold files (with cold file extension like .apk, from 3M to 10M) * 50% for warm files (with random file extension like .FcDxq, from 1K to 4M) * 47% for hot files (with hot file extension like .db, from 1K to 256K) - create(5%)/random update(90%)/delete(5%) the files * total write amount is about 70G * fsync will be called for .db files, and buffered write will be used for other files The storage of test device is large enough(128G) so that it will not switch to SSR mode during the test. Benefit: dirty segment count increment reduce about 14% - before: Dirty +21110 - after: Dirty +18286 Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 14 +++ Documentation/filesystems/f2fs.rst | 4 + fs/f2fs/debug.c | 21 ++++ fs/f2fs/extent_cache.c | 183 +++++++++++++++++++++++++++++++- fs/f2fs/f2fs.h | 38 +++++++ fs/f2fs/file.c | 1 + fs/f2fs/inode.c | 1 + fs/f2fs/node.c | 10 +- fs/f2fs/node.h | 1 + fs/f2fs/segment.c | 33 ++++++ fs/f2fs/shrinker.c | 10 +- fs/f2fs/super.c | 14 +++ fs/f2fs/sysfs.c | 24 +++++ include/trace/events/f2fs.h | 86 ++++++++++++++- 14 files changed, 430 insertions(+), 10 deletions(-) commit 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a Author: Jaegeuk Kim Date: Fri Dec 2 13:51:09 2022 -0800 f2fs: allocate the extent_cache by default Let's allocate it to remove the runtime complexity. Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 38 +++++++++++++++++++------------------- fs/f2fs/f2fs.h | 3 ++- fs/f2fs/inode.c | 6 ++++-- fs/f2fs/namei.c | 4 ++-- 4 files changed, 27 insertions(+), 24 deletions(-) commit e7547daccd6a37522f0af74ec4b5a3036f3dd328 Author: Jaegeuk Kim Date: Wed Nov 30 09:26:29 2022 -0800 f2fs: refactor extent_cache to support for read and more This patch prepares extent_cache to be ready for addition. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 20 +- fs/f2fs/debug.c | 65 +++++-- fs/f2fs/extent_cache.c | 463 ++++++++++++++++++++++++++------------------ fs/f2fs/f2fs.h | 119 ++++++++---- fs/f2fs/file.c | 8 +- fs/f2fs/gc.c | 4 +- fs/f2fs/inode.c | 6 +- fs/f2fs/node.c | 8 +- fs/f2fs/segment.c | 3 +- fs/f2fs/shrinker.c | 19 +- include/trace/events/f2fs.h | 62 +++--- 11 files changed, 470 insertions(+), 307 deletions(-) commit 749d543c0d451fff31e8f7a3e0a031ffcbf1ebb1 Author: Jaegeuk Kim Date: Wed Nov 30 10:01:18 2022 -0800 f2fs: remove unnecessary __init_extent_tree Added into the caller. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit 3bac20a8f011b8ed4012b43f4f33010432b3c647 Author: Jaegeuk Kim Date: Wed Nov 30 09:44:58 2022 -0800 f2fs: move internal functions into extent_cache.c No functional change. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 88 ++++++++++++++++++++++++++++++++++++++++++++------ fs/f2fs/f2fs.h | 69 ++------------------------------------- 2 files changed, 81 insertions(+), 76 deletions(-) commit 12607c1ba7637e750402f555b6695c50fce77a2b Author: Jaegeuk Kim Date: Wed Nov 30 09:36:43 2022 -0800 f2fs: specify extent cache for read explicitly Let's descrbie it's read extent cache. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 4 ++-- fs/f2fs/f2fs.h | 10 +++++----- fs/f2fs/inode.c | 2 +- fs/f2fs/node.c | 2 +- fs/f2fs/node.h | 2 +- fs/f2fs/segment.c | 4 ++-- fs/f2fs/super.c | 12 ++++++------ 7 files changed, 18 insertions(+), 18 deletions(-) commit ed8ac22b6b75804743f1dae6563d75f85cfd1483 Author: Yangtao Li Date: Thu Nov 24 10:48:42 2022 +0800 f2fs: introduce f2fs_is_readonly() for readability Introduce f2fs_is_readonly() and use it to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 5 +++++ fs/f2fs/super.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) commit e480751970e84bc13ab5c288dbbe16b0638cc088 Author: Yangtao Li Date: Thu Nov 24 11:37:08 2022 +0800 f2fs: remove F2FS_SET_FEATURE() and F2FS_CLEAR_FEATURE() macro F2FS_SET_FEATURE() and F2FS_CLEAR_FEATURE() have never been used since they were introduced by this commit 76f105a2dbcd("f2fs: add feature facility in superblock"). So let's remove them. BTW, convert f2fs_sb_has_##name to return bool. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 9196a0ba9f0ebe168c7b186f63cf7cab02e55778 Merge: 7adcadb98405 50865c14f34e Author: Linus Torvalds Date: Mon Dec 12 14:51:56 2022 -0800 Merge tag 'ras_core_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS updates from Borislav Petkov: - Fix confusing output from /sys/kernel/debug/ras/daemon_active - Add another MCE severity error case to the Intel error severity table to promote UC and AR errors to panic severity and remove the corresponding code condition doing that. - Make sure the thresholding and deferred error interrupts on AMD SMCA systems clear the all registers reporting an error so that there are no multiple errors logged for the same event * tag 'ras_core_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: RAS: Fix return value from show_trace() x86/mce: Use severity table to handle uncorrected errors in kernel x86/MCE/AMD: Clear DFR errors found in THR handler commit 4cc58a087ddd075255f1037494fbba2f507278fa Merge: 95d1815f0970 7aca0ac4792e Author: Jakub Kicinski Date: Mon Dec 12 14:51:29 2022 -0800 Merge tag 'for-net-next-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Luiz Augusto von Dentz says: ==================== bluetooth-next pull request for net-next: - Add a new VID/PID 0489/e0f2 for MT7922 - Add Realtek RTL8852BE support ID 0x0cb8:0xc559 - Add a new PID/VID 13d3/3549 for RTL8822CU - Add support for broadcom BCM43430A0 & BCM43430A1 - Add CONFIG_BT_HCIBTUSB_POLL_SYNC - Add CONFIG_BT_LE_L2CAP_ECRED - Add support for CYW4373A0 - Add support for RTL8723DS - Add more device IDs for WCN6855 - Add Broadcom BCM4377 family PCIe Bluetooth * tag 'for-net-next-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next: (51 commits) Bluetooth: Wait for HCI_OP_WRITE_AUTH_PAYLOAD_TO to complete Bluetooth: ISO: Avoid circular locking dependency Bluetooth: RFCOMM: don't call kfree_skb() under spin_lock_irqsave() Bluetooth: hci_core: don't call kfree_skb() under spin_lock_irqsave() Bluetooth: hci_bcsp: don't call kfree_skb() under spin_lock_irqsave() Bluetooth: hci_h5: don't call kfree_skb() under spin_lock_irqsave() Bluetooth: hci_ll: don't call kfree_skb() under spin_lock_irqsave() Bluetooth: hci_qca: don't call kfree_skb() under spin_lock_irqsave() Bluetooth: btusb: don't call kfree_skb() under spin_lock_irqsave() Bluetooth: btintel: Fix missing free skb in btintel_setup_combined() Bluetooth: hci_conn: Fix crash on hci_create_cis_sync Bluetooth: btintel: Fix existing sparce warnings Bluetooth: btusb: Fix existing sparce warning Bluetooth: btusb: Fix new sparce warnings Bluetooth: btusb: Add a new PID/VID 13d3/3549 for RTL8822CU Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x0cb8:0xc559 dt-bindings: net: realtek-bluetooth: Add RTL8723DS Bluetooth: btusb: Add a new VID/PID 0489/e0f2 for MT7922 dt-bindings: bluetooth: broadcom: add BCM43430A0 & BCM43430A1 Bluetooth: hci_bcm4377: Fix missing pci_disable_device() on error in bcm4377_probe() ... ==================== Link: https://lore.kernel.org/r/20221212222322.1690780-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 7adcadb98405cb4ef56b2518164026c1069d8669 Merge: 40deb5e41ac7 3919430fe93b Author: Linus Torvalds Date: Mon Dec 12 14:47:31 2022 -0800 Merge tag 'edac_updates_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: - Make ghes_edac a simple module like the rest of the EDAC drivers and drop the forced built-in only configuration by disentangling it from GHES (Jia He) - The usual small cleanups and improvements all over EDAC land * tag 'edac_updates_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper() EDAC/i5400: Fix typo in comment: vaious -> various EDAC/mc_sysfs: Increase legacy channel support to 12 MAINTAINERS: Make Mauro EDAC reviewer MAINTAINERS: Make Manivannan Sadhasivam the maintainer of qcom_edac EDAC/igen6: Return the correct error type when not the MC owner apei/ghes: Use xchg_release() for updating new cache slot instead of cmpxchg() EDAC: Check for GHES preference in the chipset-specific EDAC drivers EDAC/ghes: Make ghes_edac a proper module EDAC/ghes: Prepare to make ghes_edac a proper module EDAC/ghes: Add a notifier for reporting memory errors efi/cper: Export several helpers for ghes_edac to use EDAC/i5000: Mark as BROKEN commit 95d1815f0970d2f8e980a9a53dd0bf215de4d90a Merge: 15eb16217621 144361c1949f Author: Jakub Kicinski Date: Mon Dec 12 14:45:36 2022 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next 1) Incorrect error check in nft_expr_inner_parse(), from Dan Carpenter. 2) Add DATA_SENT state to SCTP connection tracking helper, from Sriram Yagnaraman. 3) Consolidate nf_confirm for ipv4 and ipv6, from Florian Westphal. 4) Add bitmask support for ipset, from Vishwanath Pai. 5) Handle icmpv6 redirects as RELATED, from Florian Westphal. 6) Add WARN_ON_ONCE() to impossible case in flowtable datapath, from Li Qiong. 7) A large batch of IPVS updates to replace timer-based estimators by kthreads to scale up wrt. CPUs and workload (millions of estimators). Julian Anastasov says: This patchset implements stats estimation in kthread context. It replaces the code that runs on single CPU in timer context every 2 seconds and causing latency splats as shown in reports [1], [2], [3]. The solution targets setups with thousands of IPVS services, destinations and multi-CPU boxes. Spread the estimation on multiple (configured) CPUs and multiple time slots (timer ticks) by using multiple chains organized under RCU rules. When stats are not needed, it is recommended to use run_estimation=0 as already implemented before this change. RCU Locking: - As stats are now RCU-locked, tot_stats, svc and dest which hold estimator structures are now always freed from RCU callback. This ensures RCU grace period after the ip_vs_stop_estimator() call. Kthread data: - every kthread works over its own data structure and all such structures are attached to array. For now we limit kthreads depending on the number of CPUs. - even while there can be a kthread structure, its task may not be running, eg. before first service is added or while the sysctl var is set to an empty cpulist or when run_estimation is set to 0 to disable the estimation. - the allocated kthread context may grow from 1 to 50 allocated structures for timer ticks which saves memory for setups with small number of estimators - a task and its structure may be released if all estimators are unlinked from its chains, leaving the slot in the array empty - every kthread data structure allows limited number of estimators. Kthread 0 is also used to initially calculate the max number of estimators to allow in every chain considering a sub-100 microsecond cond_resched rate. This number can be from 1 to hundreds. - kthread 0 has an additional job of optimizing the adding of estimators: they are first added in temp list (est_temp_list) and later kthread 0 distributes them to other kthreads. The optimization is based on the fact that newly added estimator should be estimated after 2 seconds, so we have the time to offload the adding to chain from controlling process to kthread 0. - to add new estimators we use the last added kthread context (est_add_ktid). The new estimators are linked to the chains just before the estimated one, based on add_row. This ensures their estimation will start after 2 seconds. If estimators are added in bursts, common case if all services and dests are initially configured, we may spread the estimators to more chains and as result, reducing the initial delay below 2 seconds. Many thanks to Jiri Wiesner for his valuable comments and for spending a lot of time reviewing and testing the changes on different platforms with 48-256 CPUs and 1-8 NUMA nodes under different cpufreq governors. The new IPVS estimators do not use workqueue infrastructure because: - The estimation can take long time when using multiple IPVS rules (eg. millions estimator structures) and especially when box has multiple CPUs due to the for_each_possible_cpu usage that expects packets from any CPU. With est_nice sysctl we have more control how to prioritize the estimation kthreads compared to other processes/kthreads that have latency requirements (such as servers). As a benefit, we can see these kthreads in top and decide if we will need some further control to limit their CPU usage (max number of structure to estimate per kthread). - with kthreads we run code that is read-mostly, no write/lock operations to process the estimators in 2-second intervals. - work items are one-shot: as estimators are processed every 2 seconds, they need to be re-added every time. This again loads the timers (add_timer) if we use delayed works, as there are no kthreads to do the timings. [1] Report from Yunhong Jiang: https://lore.kernel.org/netdev/D25792C1-1B89-45DE-9F10-EC350DC04ADC@gmail.com/ [2] https://marc.info/?l=linux-virtual-server&m=159679809118027&w=2 [3] Report from Dust: https://archive.linuxvirtualserver.org/html/lvs-devel/2020-12/msg00000.html * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: ipvs: run_estimation should control the kthread tasks ipvs: add est_cpulist and est_nice sysctl vars ipvs: use kthreads for stats estimation ipvs: use u64_stats_t for the per-cpu counters ipvs: use common functions for stats allocation ipvs: add rcu protection to stats netfilter: flowtable: add a 'default' case to flowtable datapath netfilter: conntrack: set icmpv6 redirects as RELATED netfilter: ipset: Add support for new bitmask parameter netfilter: conntrack: merge ipv4+ipv6 confirm functions netfilter: conntrack: add sctp DATA_SENT state netfilter: nft_inner: fix IS_ERR() vs NULL check ==================== Link: https://lore.kernel.org/r/20221211101204.1751-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 40deb5e41ac783d49371940581db2ae108a754d1 Merge: 1cab145a94ac 55228db2697c Author: Linus Torvalds Date: Mon Dec 12 14:41:57 2022 -0800 Merge tag 'x86_fpu_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu updates from Dave Hansen: "There are two little fixes in here, one to give better XSAVE warnings and another to address some undefined behavior in offsetof(). There is also a collection of patches to fix some issues with ptrace and the protection keys register (PKRU). PKRU is a real oddity because it is exposed in the XSAVE-related ABIs, but it is generally managed without using XSAVE in the kernel. This fix thankfully came with a selftest to ward off future regressions. Summary: - Clarify XSAVE consistency warnings - Fix up ptrace interface to protection keys register (PKRU) - Avoid undefined compiler behavior with TYPE_ALIGN" * tag 'x86_fpu_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Use _Alignof to avoid undefined behavior in TYPE_ALIGN selftests/vm/pkeys: Add a regression test for setting PKRU through ptrace x86/fpu: Emulate XRSTOR's behavior if the xfeatures PKRU bit is not set x86/fpu: Allow PKRU to be (once again) written by ptrace. x86/fpu: Add a pkru argument to copy_uabi_to_xstate() x86/fpu: Add a pkru argument to copy_uabi_from_kernel_to_xstate(). x86/fpu: Take task_struct* in copy_sigframe_from_user_to_xstate() x86/fpu/xstate: Fix XSTATE_WARN_ON() to emit relevant diagnostics commit 1cab145a94ac9816dcea63e6f2a04c385ac8c3fc Merge: 287f037db5b4 727209376f49 Author: Linus Torvalds Date: Mon Dec 12 14:39:51 2022 -0800 Merge tag 'x86_splitlock_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 splitlock updates from Dave Hansen: "Add a sysctl to control the split lock misery mode. This enables users to reduce the penalty inflicted on split lock users. There are some proprietary, binary-only games which became entirely unplayable with the old penalty. Anyone opting into the new mode is, of course, more exposed to the DoS nasitness inherent with split locks, but they can play their games again" * tag 'x86_splitlock_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/split_lock: Add sysctl to control the misery mode commit 287f037db5b46de5a86e4bdfbf02e0206ca877bf Merge: a89ef2aa552d 97fa21f65c3e Author: Linus Torvalds Date: Mon Dec 12 14:30:54 2022 -0800 Merge tag 'x86_cache_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cache resource control updates from Dave Hansen: "These declare the resource control (rectrl) MSRs a bit more normally and clean up an unnecessary structure member: - Remove unnecessary arch_has_empty_bitmaps structure memory - Move rescrtl MSR defines into msr-index.h, like normal MSRs" * tag 'x86_cache_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Move MSR defines into msr-index.h x86/resctrl: Remove arch_has_empty_bitmaps commit a89ef2aa552db985e0ee8cb458846298c007704c Merge: 2da68a77b940 00e07cfbdf0b Author: Linus Torvalds Date: Mon Dec 12 14:27:49 2022 -0800 Merge tag 'x86_tdx_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 tdx updates from Dave Hansen: "This includes a single chunk of new functionality for TDX guests which allows them to talk to the trusted TDX module software and obtain an attestation report. This report can then be used to prove the trustworthiness of the guest to a third party and get access to things like storage encryption keys" * tag 'x86_tdx_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/tdx: Test TDX attestation GetReport support virt: Add TDX guest driver x86/tdx: Add a wrapper to get TDREPORT0 from the TDX Module commit 7aca0ac4792e6cb0f35ef97bfcb39b1663a92fb7 Author: Luiz Augusto von Dentz Date: Wed Dec 7 11:56:57 2022 -0800 Bluetooth: Wait for HCI_OP_WRITE_AUTH_PAYLOAD_TO to complete This make sure HCI_OP_WRITE_AUTH_PAYLOAD_TO completes before notifying the encryption change just as is done with HCI_OP_READ_ENC_KEY_SIZE. Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_event.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 241f51931c35085449502c10f64fb3ecd6e02171 Author: Luiz Augusto von Dentz Date: Tue Dec 6 16:34:42 2022 -0800 Bluetooth: ISO: Avoid circular locking dependency This attempts to avoid circular locking dependency between sock_lock and hdev_lock: WARNING: possible circular locking dependency detected 6.0.0-rc7-03728-g18dd8ab0a783 #3 Not tainted ------------------------------------------------------ kworker/u3:2/53 is trying to acquire lock: ffff888000254130 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}, at: iso_conn_del+0xbd/0x1d0 but task is already holding lock: ffffffff9f39a080 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_le_cis_estabilished_evt+0x1b5/0x500 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+0x10e/0xfe0 hci_le_remote_feat_complete_evt+0x17f/0x320 hci_event_packet+0x39c/0x7d0 hci_rx_work+0x2bf/0x950 process_one_work+0x569/0x980 worker_thread+0x2a3/0x6f0 kthread+0x153/0x180 ret_from_fork+0x22/0x30 -> #1 (&hdev->lock){+.+.}-{3:3}: __mutex_lock+0x10e/0xfe0 iso_connect_cis+0x6f/0x5a0 iso_sock_connect+0x1af/0x710 __sys_connect+0x17e/0x1b0 __x64_sys_connect+0x37/0x50 do_syscall_64+0x43/0x90 entry_SYSCALL_64_after_hwframe+0x62/0xcc -> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}: __lock_acquire+0x1b51/0x33d0 lock_acquire+0x16f/0x3b0 lock_sock_nested+0x32/0x80 iso_conn_del+0xbd/0x1d0 iso_connect_cfm+0x226/0x680 hci_le_cis_estabilished_evt+0x1ed/0x500 hci_event_packet+0x39c/0x7d0 hci_rx_work+0x2bf/0x950 process_one_work+0x569/0x980 worker_thread+0x2a3/0x6f0 kthread+0x153/0x180 ret_from_fork+0x22/0x30 other info that might help us debug this: Chain exists of: sk_lock-AF_BLUETOOTH-BTPROTO_ISO --> &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_ISO); *** DEADLOCK *** 4 locks held by kworker/u3:2/53: #0: ffff8880021d9130 ((wq_completion)hci0#2){+.+.}-{0:0}, at: process_one_work+0x4ad/0x980 #1: ffff888002387de0 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x4ad/0x980 #2: ffff888001ac0070 (&hdev->lock){+.+.}-{3:3}, at: hci_le_cis_estabilished_evt+0xc3/0x500 #3: ffffffff9f39a080 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_le_cis_estabilished_evt+0x1b5/0x500 Signed-off-by: Luiz Augusto von Dentz net/bluetooth/iso.c | 61 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 23 deletions(-) commit 0ba18967d4544955b2eff2fbc4f2a8750c4df90a Author: Yang Yingliang Date: Wed Dec 7 10:18:35 2022 +0800 Bluetooth: RFCOMM: 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(). Fixes: 81be03e026dc ("Bluetooth: RFCOMM: Replace use of memcpy_from_msg with bt_skb_sendmmsg") Signed-off-by: Yang Yingliang Signed-off-by: Luiz Augusto von Dentz net/bluetooth/rfcomm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39c1eb6fcbae8ce9bb71b2ac5cb609355a2b181b Author: Yang Yingliang Date: Wed Dec 7 10:18:34 2022 +0800 Bluetooth: hci_core: 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(). Fixes: 9238f36a5a50 ("Bluetooth: Add request cmd_complete and cmd_status functions") Signed-off-by: Yang Yingliang Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b503e339c1a80bf0051ec2d19c3bc777014ac61 Author: Yang Yingliang Date: Wed Dec 7 10:18:33 2022 +0800 Bluetooth: hci_bcsp: 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(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_bcsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 383630cc6758d619874c2e8bb2f68a61f3f9ef6e Author: Yang Yingliang Date: Wed Dec 7 10:18:32 2022 +0800 Bluetooth: hci_h5: 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(). Fixes: 43eb12d78960 ("Bluetooth: Fix/implement Three-wire reliable packet sending") Signed-off-by: Yang Yingliang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_h5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f458f783dfbb19c1f1cb58ed06eeb701f52091b Author: Yang Yingliang Date: Wed Dec 7 10:18:31 2022 +0800 Bluetooth: hci_ll: 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(). Fixes: 166d2f6a4332 ("[Bluetooth] Add UART driver for Texas Instruments' BRF63xx chips") Signed-off-by: Yang Yingliang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_ll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df4cfc91208e0a98f078223793f5871b1a82cc54 Author: Yang Yingliang Date: Wed Dec 7 10:18:30 2022 +0800 Bluetooth: hci_qca: 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(). Fixes: 0ff252c1976d ("Bluetooth: hciuart: Add support QCA chipset for UART") Signed-off-by: Yang Yingliang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_qca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b15a6bd3c80c77faec8317319b97f976b1a08332 Author: Yang Yingliang Date: Tue Dec 6 20:59:10 2022 +0800 Bluetooth: btusb: 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(). Fixes: 803b58367ffb ("Bluetooth: btusb: Implement driver internal packet reassembly") Signed-off-by: Yang Yingliang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cee50ce899de415baf4da3ed38b7d4f13c3170d1 Author: Wang ShaoBo Date: Mon Dec 5 21:53:57 2022 +0800 Bluetooth: btintel: Fix missing free skb in btintel_setup_combined() skb allocated by __hci_cmd_sync would not be used whether in checking for supported iBT hardware variants or after, we should free it in all error branches, this patch makes the case read version failed or default error case free skb before return. Fixes: c86c7285bb08 ("Bluetooth: btintel: Fix the legacy bootloader returns tlv based version") Fixes: 019a1caa7fd2 ("Bluetooth: btintel: Refactoring setup routine for bootloader devices") Signed-off-by: Wang ShaoBo Reviewed-by: Tedd Ho-Jeong An Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btintel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 50757a259ba78c4e938b5735e76ffec6cd0c942e Author: Luiz Augusto von Dentz Date: Mon Dec 5 17:11:57 2022 -0800 Bluetooth: hci_conn: Fix crash on hci_create_cis_sync When attempting to connect multiple ISO sockets without using DEFER_SETUP may result in the following crash: BUG: KASAN: null-ptr-deref in hci_create_cis_sync+0x18b/0x2b0 Read of size 2 at addr 0000000000000036 by task kworker/u3:1/50 CPU: 0 PID: 50 Comm: kworker/u3:1 Not tainted 6.0.0-rc7-02243-gb84a13ff4eda #4373 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-1.fc36 04/01/2014 Workqueue: hci0 hci_cmd_sync_work Call Trace: dump_stack_lvl+0x19/0x27 kasan_report+0xbc/0xf0 ? hci_create_cis_sync+0x18b/0x2b0 hci_create_cis_sync+0x18b/0x2b0 ? get_link_mode+0xd0/0xd0 ? __ww_mutex_lock_slowpath+0x10/0x10 ? mutex_lock+0xe0/0xe0 ? get_link_mode+0xd0/0xd0 hci_cmd_sync_work+0x111/0x190 process_one_work+0x427/0x650 worker_thread+0x87/0x750 ? process_one_work+0x650/0x650 kthread+0x14e/0x180 ? kthread_exit+0x50/0x50 ret_from_fork+0x22/0x30 Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 069ab3f94cfe266bd2810564bf287e765034b4f8 Author: Luiz Augusto von Dentz Date: Mon Dec 5 10:25:52 2022 -0800 Bluetooth: btintel: Fix existing sparce warnings This fix the following warnings detect with make W=1 C=1: drivers/bluetooth/btintel.c:1041:38: warning: cast to restricted __le32 drivers/bluetooth/btintel.c:1786:25: warning: cast to restricted __le16 drivers/bluetooth/btintel.c:1795:25: warning: cast to restricted __le16 drivers/bluetooth/btintel.c:1796:25: warning: cast to restricted __le16 drivers/bluetooth/btintel.c:1797:25: warning: cast to restricted __le16 Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btintel.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 42d3b43e3f64ba4fec6c849980b88f47ae2e3318 Author: Luiz Augusto von Dentz Date: Mon Dec 5 09:58:43 2022 -0800 Bluetooth: btusb: Fix existing sparce warning This fix the following warnings detect with make W=1 C=1: drivers/bluetooth/btusb.c:3426:28: warning: cast to restricted __le32 Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb3648a78e51c90fc95b99677450145119a9675c Author: Luiz Augusto von Dentz Date: Mon Dec 5 09:49:15 2022 -0800 Bluetooth: btusb: Fix new sparce warnings This fix the following warnings detect with make W=1 C=1: drivers/bluetooth/btusb.c:2212:9: warning: cast to restricted __le16 drivers/bluetooth/btusb.c:2212:9: warning: cast to restricted __le16 drivers/bluetooth/btusb.c:2245:18: warning: cast to restricted __le16 drivers/bluetooth/btusb.c:2249:18: warning: cast to restricted __le16 drivers/bluetooth/btusb.c:2253:18: warning: cast to restricted __le16 drivers/bluetooth/btusb.c:2257:18: warning: cast to restricted __le16 drivers/bluetooth/btusb.c:2261:18: warning: cast to restricted __le16 drivers/bluetooth/btusb.c:2267:18: warning: cast to restricted __le16 Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 6d0a4fe28ac21610c968f9f1ad47e6b705affb5c Author: Gongwei Li Date: Thu Dec 1 17:43:53 2022 +0800 Bluetooth: btusb: Add a new PID/VID 13d3/3549 for RTL8822CU * /sys/kernel/debug/usb/devices T: Bus=03 Lev=02 Prnt=02 Port=02 Cnt=03 Dev#= 5 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=b85b Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Gongwei Li Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 4 ++++ 1 file changed, 4 insertions(+) commit 393b4916b7b5b94faf5c6a7c68df1c62d17e4f38 Author: Artem Lukyanov Date: Wed Nov 23 11:10:05 2022 +0300 Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x0cb8:0xc559 Add the support ID(0x0cb8, 0xc559) to usb_device_id table for Realtek RTL8852BE. The device info from /sys/kernel/debug/usb/devices as below. T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0cb8 ProdID=c559 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Artem Lukyanov Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 4 ++++ 1 file changed, 4 insertions(+) commit ba6ae1fb680331a8db05063e3fd42615d634277a Author: Samuel Holland Date: Thu Nov 24 22:09:56 2022 -0600 dt-bindings: net: realtek-bluetooth: Add RTL8723DS RTL8723DS is another variant of the RTL8723 WiFi + Bluetooth chip. It is already supported by the hci_uart/btrtl driver. Document the compatible. Acked-by: Rob Herring Reviewed-by: Alistair Francis Signed-off-by: Samuel Holland Signed-off-by: Luiz Augusto von Dentz Documentation/devicetree/bindings/net/realtek-bluetooth.yaml | 1 + 1 file changed, 1 insertion(+) commit 13fcc94d1bbcbf48ca771d124c0c536e8e414229 Author: Andy Chi Date: Mon Nov 28 15:49:57 2022 +0800 Bluetooth: btusb: Add a new VID/PID 0489/e0f2 for MT7922 Add VID/PID 0489/e0f2 for MediaTek MT7922 Bluetooth chip. Found and tested with HP ProBook. From /sys/kernel/debug/usb/devices: T: Bus=03 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 Signed-off-by: Andy Chi Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 3 +++ 1 file changed, 3 insertions(+) commit d4e9b8b802525f12375a858a6d3711f9ef4ce779 Author: Luca Weiss Date: Sat Sep 24 16:21:55 2022 +0200 dt-bindings: bluetooth: broadcom: add BCM43430A0 & BCM43430A1 Document the compatible string for BCM43430A0 bluetooth used in lg-lenok and BCM43430A1 used in asus-sparrow. Signed-off-by: Luca Weiss Reviewed-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Luiz Augusto von Dentz Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml | 2 ++ 1 file changed, 2 insertions(+) commit b1e05cfb646cda7c53b5a34ea946c9e506db3c1c Author: Yang Yingliang Date: Sat Nov 12 17:04:37 2022 +0800 Bluetooth: hci_bcm4377: Fix missing pci_disable_device() on error in bcm4377_probe() pci_disable_device() need be called while module exiting, switch to use pcim_enable(), pci_disable_device() will be called in pcim_release() after probe() failure. Fixes: ab80b2cec05f ("Bluetooth: hci_bcm4377: Add new driver for BCM4377 PCIe boards") Signed-off-by: Yang Yingliang Reviewed-by: Sven Peter Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_bcm4377.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac09bb3f87a776f8c7cabc746066a9aca8f507b6 Author: Raman Varabets Date: Tue Nov 8 20:54:13 2022 +0800 Bluetooth: btusb: Add Realtek 8761BUV support ID 0x2B89:0x8761 Identifies as "Realtek Bluetooth Radio"; used in UGREEN CM390 (P/N 80889). Device description at /sys/kernel/debug/usb/devices: T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 7 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2b89 ProdID=8761 Rev= 2.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00E04C239987 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: Raman Varabets Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) commit 8a06127602de70541e751a8c64a06995ee281f22 Author: Sven Peter Date: Fri Nov 4 22:13:03 2022 +0100 Bluetooth: hci_bcm4377: Add new driver for BCM4377 PCIe boards Broadcom BCM4377/4378/4387 are dual WiFi/Bluetooth boards found in Apple machines. This driver adds support for the Bluetooth function which exposes a shared memory IPC protocol over PCIe to tunnel HCI traffic. Signed-off-by: Sven Peter Signed-off-by: Luiz Augusto von Dentz MAINTAINERS | 1 + drivers/bluetooth/Kconfig | 12 + drivers/bluetooth/Makefile | 1 + drivers/bluetooth/hci_bcm4377.c | 2514 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 2528 insertions(+) commit ffcb0a445ec2d5753751437706aa0a7ea8351099 Author: Sven Peter Date: Fri Nov 4 22:13:02 2022 +0100 Bluetooth: Add quirk to disable MWS Transport Configuration Broadcom 4378/4387 controllers found in Apple Silicon Macs claim to support getting MWS Transport Layer Configuration, < HCI Command: Read Local Supported... (0x04|0x0002) plen 0 > HCI Event: Command Complete (0x0e) plen 68 Read Local Supported Commands (0x04|0x0002) ncmd 1 Status: Success (0x00) [...] Get MWS Transport Layer Configuration (Octet 30 - Bit 3)] [...] , but then don't actually allow the required command: > HCI Event: Command Complete (0x0e) plen 15 Get MWS Transport Layer Configuration (0x05|0x000c) ncmd 1 Status: Command Disallowed (0x0c) Number of transports: 0 Baud rate list: 0 entries 00 00 00 00 00 00 00 00 00 00 Signed-off-by: Sven Peter Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci.h | 10 ++++++++++ include/net/bluetooth/hci_core.h | 3 +++ net/bluetooth/hci_sync.c | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) commit 392fca352c7a95e2828d49e7500e26d0c87ca265 Author: Sven Peter Date: Fri Nov 4 22:13:01 2022 +0100 Bluetooth: Add quirk to disable extended scanning Broadcom 4377 controllers found in Apple x86 Macs with the T2 chip claim to support extended scanning when querying supported states, < HCI Command: LE Read Supported St.. (0x08|0x001c) plen 0 > HCI Event: Command Complete (0x0e) plen 12 LE Read Supported States (0x08|0x001c) ncmd 1 Status: Success (0x00) States: 0x000003ffffffffff [...] LE Set Extended Scan Parameters (Octet 37 - Bit 5) LE Set Extended Scan Enable (Octet 37 - Bit 6) [...] , but then fail to actually implement the extended scanning: < HCI Command: LE Set Extended Sca.. (0x08|0x0041) plen 8 Own address type: Random (0x01) Filter policy: Accept all advertisement (0x00) PHYs: 0x01 Entry 0: LE 1M Type: Active (0x01) Interval: 11.250 msec (0x0012) Window: 11.250 msec (0x0012) > HCI Event: Command Complete (0x0e) plen 4 LE Set Extended Scan Parameters (0x08|0x0041) ncmd 1 Status: Unknown HCI Command (0x01) Signed-off-by: Sven Peter Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci.h | 10 ++++++++++ include/net/bluetooth/hci_core.h | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) commit ad38e55e1c89384aecee1bb0425bf1bf21ec86fd Author: Sven Peter Date: Fri Nov 4 22:13:00 2022 +0100 Bluetooth: hci_event: Ignore reserved bits in LE Extended Adv Report Broadcom controllers present on Apple Silicon devices use the upper 8 bits of the event type in the LE Extended Advertising Report for the channel on which the frame has been received. These bits are reserved according to the Bluetooth spec anyway such that we can just drop them to ensure that the advertising results are parsed correctly. The following excerpt from a btmon trace shows a report received on channel 37 by these controllers: > HCI Event: LE Meta Event (0x3e) plen 55 LE Extended Advertising Report (0x0d) Num reports: 1 Entry 0 Event type: 0x2513 Props: 0x0013 Connectable Scannable Use legacy advertising PDUs Data status: Complete Reserved (0x2500) Legacy PDU Type: Reserved (0x2513) Address type: Public (0x00) Address: XX:XX:XX:XX:XX:XX (Shenzhen Jingxun Software [...]) Primary PHY: LE 1M Secondary PHY: No packets SID: no ADI field (0xff) TX power: 127 dBm RSSI: -76 dBm (0xb4) Periodic advertising interval: 0.00 msec (0x0000) Direct address type: Public (0x00) Direct address: 00:00:00:00:00:00 (OUI 00-00-00) Data length: 0x1d [...] Flags: 0x18 Simultaneous LE and BR/EDR (Controller) Simultaneous LE and BR/EDR (Host) Company: Harman International Industries, Inc. (87) Data: [...] Service Data (UUID 0xfddf): Name (complete): JBL Flip 5 Signed-off-by: Sven Peter Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci.h | 1 + net/bluetooth/hci_event.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 7a73b976eda916a2ed703e4b996c92c871715d9b Author: Sven Peter Date: Fri Nov 4 22:12:59 2022 +0100 arm64: dts: apple: t8103: Add Bluetooth controller Add bluetooth controller nodes and the required brcm,board-type properties to be able to select the correct firmware to all board device trees. Signed-off-by: Sven Peter Signed-off-by: Luiz Augusto von Dentz arch/arm64/boot/dts/apple/t8103-j274.dts | 4 ++++ arch/arm64/boot/dts/apple/t8103-j293.dts | 4 ++++ arch/arm64/boot/dts/apple/t8103-j313.dts | 4 ++++ arch/arm64/boot/dts/apple/t8103-j456.dts | 4 ++++ arch/arm64/boot/dts/apple/t8103-j457.dts | 4 ++++ arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 8 ++++++++ 6 files changed, 28 insertions(+) commit c9176e10b2b68dfa4b94dce11ad99214ceecf714 Author: Sven Peter Date: Fri Nov 4 22:12:58 2022 +0100 dt-bindings: net: Add Broadcom BCM4377 family PCIe Bluetooth These chips are combined Wi-Fi/Bluetooth radios which expose a PCI subfunction for the Bluetooth part. They are found in Apple machines such as the x86 models with the T2 chip or the arm64 models with the M1 or M2 chips. Signed-off-by: Sven Peter Reviewed-by: Rob Herring Signed-off-by: Luiz Augusto von Dentz .../net/bluetooth/brcm,bcm4377-bluetooth.yaml | 81 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 82 insertions(+) commit 45564c4ef607a4410f333a3a5e881bab90c761cd Author: Sven Peter Date: Fri Nov 4 22:12:57 2022 +0100 dt-bindings: net: Add generic Bluetooth controller Bluetooth controllers share the common local-bd-address property. Add a generic YAML schema to replace bluetooth.txt for those. Signed-off-by: Sven Peter Reviewed-by: Rob Herring Signed-off-by: Luiz Augusto von Dentz .../devicetree/bindings/net/bluetooth.txt | 5 ---- .../net/bluetooth/bluetooth-controller.yaml | 29 ++++++++++++++++++++++ .../net/{ => bluetooth}/qualcomm-bluetooth.yaml | 6 ++--- .../devicetree/bindings/soc/qcom/qcom,wcnss.yaml | 8 +++--- 4 files changed, 35 insertions(+), 13 deletions(-) commit 02d056a3404e20245a69dcb4022a0930085fc5ec Author: Marek Vasut Date: Wed Nov 2 17:47:05 2022 +0100 Bluetooth: hci_bcm: Add CYW4373A0 support CYW4373A0 is a Wi-Fi + Bluetooth combo device from Cypress. This chip is present e.g. on muRata 2AE module. This chip has additional quirk where the HCI command 0xfc45, used on older chips to switch UART clock from 24 MHz to 48 MHz, to support baudrates over 3 Mbdps, is no longer recognized by this newer chip. This newer chip can configure the 4 Mbdps baudrate without the need to issue HCI command 0xfc45, so add flag to indicate this and do not issue the command on this chip to avoid failure to set 4 Mbdps baud rate. It is not clear whether there is a way to determine which chip does and which chip does not support the HCI command 0xfc45, other than trial and error. Reviewed-by: Linus Walleij Signed-off-by: Marek Vasut Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_bcm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 892913f0f2fdf57cd7271a59bf489ca0c60eded5 Author: Marek Vasut Date: Wed Nov 2 17:47:04 2022 +0100 dt-bindings: net: broadcom-bluetooth: Add CYW4373A0 DT binding CYW4373A0 is a Wi-Fi + Bluetooth combo device from Cypress. This chip is present e.g. on muRata 2AE module. Extend the binding with its DT compatible. Acked-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Marek Vasut Signed-off-by: Luiz Augusto von Dentz Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml | 1 + 1 file changed, 1 insertion(+) commit 3958e87783e746a2ce78fbb30f24231569f03543 Author: Kang Minchul Date: Mon Oct 31 03:17:22 2022 +0900 Bluetooth: Use kzalloc instead of kmalloc/memset Replace kmalloc+memset by kzalloc for better readability and simplicity. This addresses the cocci warning below: WARNING: kzalloc should be used for d, instead of kmalloc/memset Signed-off-by: Kang Minchul Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_conn.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ca2a99447e17acd67258aa1d54d7ea3c404a779c Author: Shengyu Qu Date: Sun Oct 30 01:22:54 2022 +0800 Bluetooth: btusb: Add more device IDs for WCN6855 Add IDs to usb_device_id table for WCN6855. IDs are extracted from Windows driver of Lenovo Thinkpad T14 Gen 2(Driver version 1.0.0.1205 Windows 10) Windows driver download address: https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/ thinkpad-t-series-laptops/thinkpad-t14-gen-2-type-20xk-20xl/downloads /driver-list/ Signed-off-by: Shengyu Qu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) commit 63db780a93eb802ece1bbf61ab5894ad8827b56e Author: Christophe JAILLET Date: Sun Oct 30 08:00:03 2022 +0100 Bluetooth: Fix EALREADY and ELOOP cases in bt_status() 'err' is known to be <0 at this point. So, some cases can not be reached because of a missing "-". Add it. Fixes: ca2045e059c3 ("Bluetooth: Add bt_status") Signed-off-by: Christophe JAILLET Signed-off-by: Luiz Augusto von Dentz net/bluetooth/lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 462fcd53924ccc21596d30edd0673fa7c939b392 Author: Luiz Augusto von Dentz Date: Thu Oct 27 16:18:04 2022 -0700 Bluetooth: Add CONFIG_BT_LE_L2CAP_ECRED This adds CONFIG_BT_LE_L2CAP_ECRED which can be used to enable L2CAP Enhanced Credit Flow Control Mode by default, previously it was only possible to set it via module parameter (e.g. bluetooth.enable_ecred=1). Since L2CAP ECRED mode is required by the likes of EATT which is recommended for LE Audio this enables it by default. Signed-off-by: Luiz Augusto von Dentz Tested-By: Tedd Ho-Jeong An net/bluetooth/Kconfig | 11 +++++++++++ net/bluetooth/l2cap_core.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) commit db11223571d489d1aab575a4ac4b7352d2d54e2f Author: Luiz Augusto von Dentz Date: Tue Oct 25 14:12:58 2022 -0700 Bluetooth: btusb: Default CONFIG_BT_HCIBTUSB_POLL_SYNC=y poll_sync has been proven to fix races of USB data and event endpoints so this enables it by default. Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An drivers/bluetooth/Kconfig | 1 + 1 file changed, 1 insertion(+) commit bb1afb2955212d30177b122b13ae636a69abf883 Author: Luiz Augusto von Dentz Date: Tue Oct 25 14:12:57 2022 -0700 Bluetooth: btusb: Add CONFIG_BT_HCIBTUSB_POLL_SYNC This adds CONFIG_BT_HCIBTUSB_POLL_SYNC which can be used to set the default behavior of Bluetooth USB controller with respect to poll synchronization of its endpoits. Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An drivers/bluetooth/Kconfig | 10 ++++++++++ drivers/bluetooth/btusb.c | 3 +++ 2 files changed, 13 insertions(+) commit 47c50853bb9c5c35bf5c3eb00b712310ec2969e2 Author: Igor Skalkin Date: Mon Oct 24 15:40:33 2022 +0200 virtio_bt: Fix alignment in configuration struct The current version of the configuration structure has unaligned 16-bit fields, but according to the specification [1], access to the configuration space must be aligned. Add a second, aligned version of the configuration structure and a new feature bit indicating that this version is being used. [1] https://docs.oasis-open.org/virtio/virtio/v1.1/virtio-v1.1.pdf Signed-off-by: Igor Skalkin Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/virtio_bt.c | 16 +++++++++++++--- include/uapi/linux/virtio_bt.h | 8 ++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) commit 3b1c7c00b8c22b3cb79532252c59eb0b287bb86d Author: Inga Stotland Date: Fri Oct 21 17:48:56 2022 -0700 Bluetooth: MGMT: Fix error report for ADD_EXT_ADV_PARAMS When validating the parameter length for MGMT_OP_ADD_EXT_ADV_PARAMS command, use the correct op code in error status report: was MGMT_OP_ADD_ADVERTISING, changed to MGMT_OP_ADD_EXT_ADV_PARAMS. Fixes: 12410572833a2 ("Bluetooth: Break add adv into two mgmt commands") Signed-off-by: Inga Stotland Signed-off-by: Luiz Augusto von Dentz net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d75da38e060d21f948b3df5f5e349c962cf1ed2 Author: Yang Yingliang Date: Thu Oct 20 10:16:56 2022 +0800 Bluetooth: hci_core: fix error handling in hci_register_dev() If hci_register_suspend_notifier() returns error, the hdev and rfkill are leaked. We could disregard the error and print a warning message instead to avoid leaks, as it just means we won't be handing suspend requests. Fixes: 9952d90ea288 ("Bluetooth: Handle PM_SUSPEND_PREPARE and PM_POST_SUSPEND") Signed-off-by: Yang Yingliang Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37224a290853a69f7e8e8c2269c9caea6e2bcb4b Author: Jiapeng Chong Date: Mon Oct 17 13:47:13 2022 +0800 Bluetooth: Use kzalloc instead of kmalloc/memset Use kzalloc rather than duplicating its implementation, which makes code simple and easy to understand. ./net/bluetooth/hci_conn.c:2038:6-13: WARNING: kzalloc should be used for cp, instead of kmalloc/memset. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2406 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_conn.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e9b3e5b8c65733f626a7ee919c4bc895b51d7bb2 Author: Zhengping Jiang Date: Thu Oct 13 14:45:08 2022 -0700 Bluetooth: hci_qca: only assign wakeup with serial port support Only assign hdev->wakeup if the serial port supports wakeup. Otherwise it will fall back to the hci_uart_wakeup or the behavior that can be overridden before calling the hci_uart_register_device(). Signed-off-by: Zhengping Jiang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/hci_qca.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d11ab690c300becca17223531f9ca4ae29284c52 Author: Pauli Virtanen Date: Tue Oct 11 22:25:34 2022 +0300 Bluetooth: hci_conn: use HCI dst_type values also for BIS For ISO BIS related functions in hci_conn.c, make dst_type values be HCI address type values, not ISO socket address type values. This makes it consistent with CIS functions. Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_conn.c | 6 ------ net/bluetooth/iso.c | 6 ++++-- 2 files changed, 4 insertions(+), 8 deletions(-) commit a479e71322ced3e663b0baf17a6d250c973454c8 Author: Hilda Wu Date: Wed Oct 5 16:43:31 2022 +0800 Bluetooth: btusb: Ignore zero length of USB packets on ALT 6 for specific chip For USB ALT 6 settings some Realtek chips need to transmit mSBC data continuously without the zero length of USB packets. In this commit, create BTUSB_ALT6_CONTINUOUS_TX to manage the behavior. Therefore, create REALTEK_ALT6_CONTINUOUS_TX_CHIP to manage the specific chip model for the behavior. Signed-off-by: Max Chou Signed-off-by: Hilda Wu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btrtl.c | 7 +++++++ drivers/bluetooth/btusb.c | 25 +++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) commit 5b355944b19011011dd3fd4187444c5ff1d76ad2 Author: Hilda Wu Date: Wed Oct 5 16:43:30 2022 +0800 Bluetooth: btrtl: Add btrealtek data struct This patch adds a data structure for btrealtek object, and the definition of vendor behavior flags. It also adds macros to set/test/get the flags. Signed-off-by: Hilda Wu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btrtl.h | 21 +++++++++++++++++++++ drivers/bluetooth/btusb.c | 3 +++ 2 files changed, 24 insertions(+) commit dc65b4b0f90a2c5eb37b47cd3a82fcd857a69264 Author: Michael S. Tsirkin Date: Mon Oct 10 13:14:37 2022 -0400 Bluetooth: virtio_bt: fix device removal Device removal is clearly out of virtio spec: it attempts to remove unused buffers from a VQ before invoking device reset. To fix, make open/close NOPs and do all cleanup/setup in probe/remove. NB: This is a hacky way to handle this - virtbt_{open,close} as NOP is not really what a driver is supposed to be doing. These are transport enable/disable callbacks from the BT core towards the driver. It maps to a device being enabled/disabled by something like bluetoothd for example. So if disabled, users expect that no resources/queues are in use. It does work with all other transports like USB, SDIO, UART etc. There should be no buffer used if the device is powered off. We also don’t have any USB URBs in-flight if the transport is not active. The way to implement a proper fix would be using vq reset if supported, or even using a full device reset. The cost of the hack is a single skb wasted on an unused bt device. NB2: with this fix in place driver still suffers from a race condition if an interrupt triggers while device is being reset. To fix, in the virtbt_close() callback we should deactivate all interrupts. To be fixed. squashed fixup: bluetooth: virtio_bt: fix an error code in probe() Signed-off-by: Dan Carpenter Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Michael S. Tsirkin Message-Id: <20220811080943.198245-1-mst@redhat.com> Signed-off-by: Luiz Augusto von Dentz Tested-by: Igor Skalkin drivers/bluetooth/virtio_bt.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 97dfaf073f5881c624856ef293be307b6166115c Author: Archie Pusaka Date: Wed Oct 5 15:09:47 2022 +0800 Bluetooth: hci_sync: cancel cmd_timer if hci_open failed If a command is already sent, we take care of freeing it, but we also need to cancel the timeout as well. Signed-off-by: Archie Pusaka Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_sync.c | 1 + 1 file changed, 1 insertion(+) commit eeb1aafe97fa6da558157d2eb18cce25878b8656 Author: Luiz Augusto von Dentz Date: Fri Oct 7 18:08:43 2022 -0700 Bluetooth: hci_sync: Fix not able to set force_static_address force_static_address shall be writable while hdev is initing but is not considered powered yet since the static address is written only when powered. Signed-off-by: Luiz Augusto von Dentz Tested-by: Brian Gix net/bluetooth/hci_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e411443c32554b4db157eb49f199d9cfebda2817 Author: Luiz Augusto von Dentz Date: Fri Oct 7 13:25:38 2022 -0700 Bluetooth: hci_sync: Fix not setting static address This attempts to program the address stored in hdev->static_addr after the init sequence has been complete: @ MGMT Command: Set Static A.. (0x002b) plen 6 Address: C0:55:44:33:22:11 (Static) @ MGMT Event: Command Complete (0x0001) plen 7 Set Static Address (0x002b) plen 4 Status: Success (0x00) Current settings: 0x00008200 Low Energy Static Address @ MGMT Event: New Settings (0x0006) plen 4 Current settings: 0x00008200 Low Energy Static Address < HCI Command: LE Set Random.. (0x08|0x0005) plen 6 Address: C0:55:44:33:22:11 (Static) > HCI Event: Command Complete (0x0e) plen 4 LE Set Random Address (0x08|0x0005) ncmd 1 Status: Success (0x00) @ MGMT Event: Command Complete (0x0001) plen 7 Set Powered (0x0005) plen 4 Status: Success (0x00) Current settings: 0x00008201 Powered Low Energy Static Address @ MGMT Event: New Settings (0x0006) plen 4 Current settings: 0x00008201 Powered Low Energy Static Address Signed-off-by: Luiz Augusto von Dentz Tested-by: Brian Gix net/bluetooth/hci_sync.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit b3fdb8c9789dcb888986c75ef6677d41d40ec83e Author: Nicolas Cavallari Date: Wed Oct 5 17:06:21 2022 +0200 Bluetooth: Work around SCO over USB HCI design defect The USB interface between the host and the bluetooth adapter used for SCO packets uses an USB isochronous endpoint with a fragmentation scheme that does not tolerate errors. Except USB isochronous transfers do not provide a reliable stream with guaranteed delivery. (There is no retry on error, see USB spec v2.0 5.6 and 8.5.5.) To fragment a packet, the bluetooth HCI simply splits it in parts and transfer them as-is. The receiver is expected to reconstruct the packet by assuming the first fragment contains the header and parsing its size field. There is no error detection either. If a fragment is lost, the end result is that the kernel is no longer synchronized and will pass malformed data to the upper layers, since it has no way to tell if the first fragment is an actual first fragment or a continuation fragment. Resynchronization can only happen by luck and requires an unbounded amount of time. The typical symptom for a HSP/HFP bluetooth headset is that the microphone stops working and dmesg contains piles of rate-limited "Bluetooth: hci0: SCO packet for unknown connection handle XXXX" errors for an indeterminate amount of time, until the kernel accidentally resynchronize. A workaround is to ask the upper layer to prevalidate the first fragment header. This is not possible with user channels so this workaround is disabled in this case. This problem is the most severe when using an ath3k adapter on an i.MX 6 board, where packet loss occur regularly, possibly because it is an USB1 device connected on an USB2 hub and this is a special case requiring split transactions. Signed-off-by: Nicolas Cavallari Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit c9209b269afd29c55b8be49916725ed469f8c5d9 Author: Archie Pusaka Date: Thu Oct 6 17:09:31 2022 +0800 Bluetooth: btusb: Introduce generic USB reset On cmd_timeout with no reset_gpio, reset the USB port as a last resort. This patch changes the behavior of btusb_intel_cmd_timeout and btusb_rtl_cmd_timeout. Signed-off-by: Archie Pusaka Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Ying Hsu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 35 +++++++++++++++++++++++++---------- include/net/bluetooth/hci_core.h | 1 + 2 files changed, 26 insertions(+), 10 deletions(-) commit f9c5cbd52c62f2fa9d2dfbe1af8fb00e5056aefe Author: Chethan Tumkur Narayan Date: Mon Oct 3 12:18:36 2022 +0530 btusb: Avoid reset of ISOC endpoint alt settings to zero In case of suspend/resume and HCI_RESET (BT On and Off), ISOC endpoint set to alt setting 0 when no SCO connection exists. This patch shall avoid resetting of ISOC endpoint to alt setting to 0. Signed-off-by: Chethan Tumkur Narayan Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2da68a77b940722b04c2f7604a758eab46cf6cf9 Merge: c1f0fcd85d3d 89e927bbcd45 Author: Linus Torvalds Date: Mon Dec 12 14:18:44 2022 -0800 Merge tag 'x86_sgx_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 sgx updates from Dave Hansen: "The biggest deal in this series is support for a new hardware feature that allows enclaves to detect and mitigate single-stepping attacks. There's also a minor performance tweak and a little piece of the kmap_atomic() -> kmap_local() transition. Summary: - Introduce a new SGX feature (Asynchrounous Exit Notification) for bare-metal enclaves and KVM guests to mitigate single-step attacks - Increase batching to speed up enclave release - Replace kmap/kunmap_atomic() calls" * tag 'x86_sgx_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sgx: Replace kmap/kunmap_atomic() calls KVM/VMX: Allow exposing EDECCSSA user leaf function to KVM guest x86/sgx: Allow enclaves to use Asynchrounous Exit Notification x86/sgx: Reduce delay and interference of enclave release commit c1f0fcd85d3d66f002fc1a4986363840fcca766d Merge: 691806e977a3 f04facfb993d Author: Linus Torvalds Date: Mon Dec 12 13:55:31 2022 -0800 Merge tag 'cxl-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull cxl updates from Dan Williams: "Compute Express Link (CXL) updates for 6.2. While it may seem backwards, the CXL update this time around includes some focus on CXL 1.x enabling where the work to date had been with CXL 2.0 (VH topologies) in mind. First generation CXL can mostly be supported via BIOS, similar to DDR, however it became clear there are use cases for OS native CXL error handling and some CXL 3.0 endpoint features can be deployed on CXL 1.x hosts (Restricted CXL Host (RCH) topologies). So, this update brings RCH topologies into the Linux CXL device model. In support of the ongoing CXL 2.0+ enabling two new core kernel facilities are added. One is the ability for the kernel to flag collisions between userspace access to PCI configuration registers and kernel accesses. This is brought on by the PCIe Data-Object-Exchange (DOE) facility, a hardware mailbox over config-cycles. The other is a cpu_cache_invalidate_memregion() API that maps to wbinvd_on_all_cpus() on x86. To prevent abuse it is disabled in guest VMs and architectures that do not support it yet. The CXL paths that need it, dynamic memory region creation and security commands (erase / unlock), are disabled when it is not present. As for the CXL 2.0+ this cycle the subsystem gains support Persistent Memory Security commands, error handling in response to PCIe AER notifications, and support for the "XOR" host bridge interleave algorithm. Summary: - Add the cpu_cache_invalidate_memregion() API for cache flushing in response to physical memory reconfiguration, or memory-side data invalidation from operations like secure erase or memory-device unlock. - Add a facility for the kernel to warn about collisions between kernel and userspace access to PCI configuration registers - Add support for Restricted CXL Host (RCH) topologies (formerly CXL 1.1) - Add handling and reporting of CXL errors reported via the PCIe AER mechanism - Add support for CXL Persistent Memory Security commands - Add support for the "XOR" algorithm for CXL host bridge interleave - Rework / simplify CXL to NVDIMM interactions - Miscellaneous cleanups and fixes" * tag 'cxl-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (71 commits) cxl/region: Fix memdev reuse check cxl/pci: Remove endian confusion cxl/pci: Add some type-safety to the AER trace points cxl/security: Drop security command ioctl uapi cxl/mbox: Add variable output size validation for internal commands cxl/mbox: Enable cxl_mbox_send_cmd() users to validate output size cxl/security: Fix Get Security State output payload endian handling cxl: update names for interleave ways conversion macros cxl: update names for interleave granularity conversion macros cxl/acpi: Warn about an invalid CHBCR in an existing CHBS entry tools/testing/cxl: Require cache invalidation bypass cxl/acpi: Fail decoder add if CXIMS for HBIG is missing cxl/region: Fix spelling mistake "memergion" -> "memregion" cxl/regs: Fix sparse warning cxl/acpi: Set ACPI's CXL _OSC to indicate RCD mode support tools/testing/cxl: Add an RCH topology cxl/port: Add RCD endpoint port enumeration cxl/mem: Move devm_cxl_add_endpoint() from cxl_core to cxl_mem tools/testing/cxl: Add XOR Math support to cxl_test cxl/acpi: Support CXL XOR Interleave Math (CXIMS) ... commit 691806e977a3a64895bd891878ed726cdbd282c0 Merge: 456ed864fd90 75b15aa0d83e Author: Linus Torvalds Date: Mon Dec 12 13:45:21 2022 -0800 Merge tag 'thermal-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control updates from Rafael Wysocki: "These include thermal core fixes to protect thermal device operations against thermal device removal, other thermal core fixes and updates of Intel thermal control drivers. Specifics: - Fix race conditions related to thermal device operations that are not protected against thermal device removal (Guenter Roeck) - Fix error code in __thermal_cooling_device_register() (Dan Carpenter) - Validate new cooling device state (coming from user space) in cur_state_store() and reuse the max_state value from cooling device structure in the sysfs interface (Viresh Kumar) - Fix some possible name leaks in error paths in the thermal control core code (Yang Yingliang) - Detect TCC lock bit set in the intel_tcc_cooling driver and make it refuse to update the TCC offset in that case (Zhang Rui) - Add TCC cooling support for RaptorLake-S (Zhang Rui) - Prevent accidental clearing of HFI status by one of the other drivers using the same status register (Srinivas Pandruvada) - Protect clearing of thermal status bits in Intel thermal control drivers (Srinivas Pandruvada) - Allow the HFI thermal control driver to ACK an HFI event for the previously observed timestamp (Srinivas Pandruvada) - Remove a pointless die_id check from the HFI thermal driver and adjust the definition a data structure used by it (Ricardo Neri)" * tag 'thermal-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: intel: hfi: Remove a pointless die_id check thermal: core: fix some possible name leaks in error paths thermal: intel: hfi: ACK HFI for the same timestamp thermal: intel: Protect clearing of thermal status bits thermal: intel: Prevent accidental clearing of HFI status thermal/core: Protect thermal device operations against thermal device removal thermal/core: Remove thermal_zone_set_trips() thermal/core: Protect sysfs accesses to thermal operations with thermal zone mutex thermal/core: Protect hwmon accesses to thermal operations with thermal zone mutex thermal/core: Introduce locked version of thermal_zone_device_update thermal/core: Move parameter validation from __thermal_zone_get_temp to thermal_zone_get_temp thermal/core: Ensure that thermal device is registered in thermal_zone_get_temp thermal/core: Delete device under thermal device zone lock thermal/core: Destroy thermal zone device mutex in release function thermal: intel: intel_tcc_cooling: Add TCC cooling support for RaptorLake-S thermal: intel: intel_tcc_cooling: Detect TCC lock bit thermal: intel: hfi: Improve the type of hfi_features::nr_table_pages thermal/core: fix error code in __thermal_cooling_device_register() thermal: sysfs: Reuse cdev->max_state thermal: Validate new state in cur_state_store() commit 456ed864fd907d5f5484c7c4795da212537842fe Merge: 045e222d0a9d bee74dcbd390 Author: Linus Torvalds Date: Mon Dec 12 13:38:17 2022 -0800 Merge tag 'acpi-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI and PNP updates from Rafael Wysocki: "These include new code (for instance, support for the FFH address space type and support for new firmware data structures in ACPICA), some new quirks (mostly related to backlight handling and I2C enumeration), a number of fixes and a fair amount of cleanups all over. Specifics: - Update the ACPICA code in the kernel to the 20221020 upstream version and fix a couple of issues in it: - Make acpi_ex_load_op() match upstream implementation (Rafael Wysocki) - Add support for loong_arch-specific APICs in MADT (Huacai Chen) - Add support for fixed PCIe wake event (Huacai Chen) - Add EBDA pointer sanity checks (Vit Kabele) - Avoid accessing VGA memory when EBDA < 1KiB (Vit Kabele) - Add CCEL table support to both compiler/disassembler (Kuppuswamy Sathyanarayanan) - Add a couple of new UUIDs to the known UUID list (Bob Moore) - Add support for FFH Opregion special context data (Sudeep Holla) - Improve warning message for "invalid ACPI name" (Bob Moore) - Add support for CXL 3.0 structures (CXIMS & RDPAS) in the CEDT table (Alison Schofield) - Prepare IORT support for revision E.e (Robin Murphy) - Finish support for the CDAT table (Bob Moore) - Fix error code path in acpi_ds_call_control_method() (Rafael Wysocki) - Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() (Li Zetao) - Update the version of the ACPICA code in the kernel (Bob Moore) - Use ZERO_PAGE(0) instead of empty_zero_page in the ACPI device enumeration code (Giulio Benetti) - Change the return type of the ACPI driver remove callback to void and update its users accordingly (Dawei Li) - Add general support for FFH address space type and implement the low- level part of it for ARM64 (Sudeep Holla) - Fix stale comments in the ACPI tables parsing code and make it print more messages related to MADT (Hanjun Guo, Huacai Chen) - Replace invocations of generic library functions with more kernel- specific counterparts in the ACPI sysfs interface (Christophe JAILLET, Xu Panda) - Print full name paths of ACPI power resource objects during enumeration (Kane Chen) - Eliminate a compiler warning regarding a missing function prototype in the ACPI power management code (Sudeep Holla) - Fix and clean up the ACPI processor driver (Rafael Wysocki, Li Zhong, Colin Ian King, Sudeep Holla) - Add quirk for the HP Pavilion Gaming 15-cx0041ur to the ACPI EC driver (Mia Kanashi) - Add some mew ACPI backlight handling quirks and update some existing ones (Hans de Goede) - Make the ACPI backlight driver prefer the native backlight control over vendor backlight control when possible (Hans de Goede) - Drop unsetting ACPI APEI driver data on remove (Uwe Kleine-König) - Use xchg_release() instead of cmpxchg() for updating new GHES cache slots (Ard Biesheuvel) - Clean up the ACPI APEI code (Sudeep Holla, Christophe JAILLET, Jay Lu) - Add new I2C device enumeration quirks for Medion Lifetab S10346 and Lenovo Yoga Tab 3 Pro (YT3-X90F) (Hans de Goede) - Make the ACPI battery driver notify user space about adding new battery hooks and removing the existing ones (Armin Wolf) - Modify the pfr_update and pfr_telemetry drivers to use ACPI_FREE() for freeing acpi_object structures to help diagnostics (Wang ShaoBo) - Make the ACPI fan driver use sysfs_emit_at() in its sysfs interface code (ye xingchen) - Fix the _FIF package extraction failure handling in the ACPI fan driver (Hanjun Guo) - Fix the PCC mailbox handling error code path (Huisong Li) - Avoid using PCC Opregions if there is no platform interrupt allocated for this purpose (Huisong Li) - Use sysfs_emit() instead of scnprintf() in the ACPI PAD driver and CPPC library (ye xingchen) - Fix some kernel-doc issues in the ACPI GSI processing code (Xiongfeng Wang) - Fix name memory leak in pnp_alloc_dev() (Yang Yingliang) - Do not disable PNP devices on suspend when they cannot be re-enabled on resume (Hans de Goede) - Clean up the ACPI thermal driver a bit (Rafael Wysocki)" * tag 'acpi-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (67 commits) ACPI: x86: Add skip i2c clients quirk for Medion Lifetab S10346 ACPI: APEI: EINJ: Refactor available_error_type_show() ACPI: APEI: EINJ: Fix formatting errors ACPI: processor: perflib: Adjust acpi_processor_notify_smm() return value ACPI: processor: perflib: Rearrange acpi_processor_notify_smm() ACPI: processor: perflib: Rearrange unregistration routine ACPI: processor: perflib: Drop redundant parentheses ACPI: processor: perflib: Adjust white space ACPI: processor: idle: Drop unnecessary statements and parens ACPI: thermal: Adjust critical.flags.valid check ACPI: fan: Convert to use sysfs_emit_at() API ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() ACPI: battery: Call power_supply_changed() when adding hooks ACPI: use sysfs_emit() instead of scnprintf() ACPI: x86: Add skip i2c clients quirk for Lenovo Yoga Tab 3 Pro (YT3-X90F) ACPI: APEI: Remove a useless include PNP: Do not disable devices on suspend when they cannot be re-enabled on resume ACPI: processor: Silence missing prototype warnings ACPI: processor_idle: Silence missing prototype warnings ACPI: PM: Silence missing prototype warning ... commit 045e222d0a9dcec152abe0633f538cafd965b12b Merge: 631aa7444231 ed6a00471dd4 Author: Linus Torvalds Date: Mon Dec 12 13:19:07 2022 -0800 Merge tag 'pm-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These include two new drivers (cpufreq driver for Apple SoC CPU P-states and the SCMI Powercap based power capping driver), other new hardware support and driver extensions (Qualcomm cpufreq driver and its DT bindings, TI cpufreq driver, intel_pstate, intel-uncore-freq), a bunch of fixes and cleanups all over and a cpupower utility update including new features related to RAPL support. Specifics: - Fix nasty and hard to debug race condition introduced by mistake in the runtime PM core code and clean up that code somewhat on top of the fix (Rafael Wysocki) - Generalize of_perf_domain_get_sharing_cpumask phandle format (Hector Martin) - Add new cpufreq driver for Apple SoC CPU P-states (Hector Martin) - Update Qualcomm cpufreq driver (Manivannan Sadhasivam, Chen Hui): - CPU clock provider support - Generic cleanups or reorganization - Potential memleak fix - Fix of the return value of cpufreq_driver->get() - Update Qualcomm cpufreq driver's DT bindings (Manivannan Sadhasivam, Rob Herring, Melody Olvera): - Support for CPU clock provider - Missing cache-related properties fixes - Support for QDU1000/QRU1000 - Add support for ti,am625 SoC and enable build of ti-cpufreq for ARCH_K3 (Dave Gerlach, and Vibhore Vardhan) - Use flexible array to simplify memory allocation in the tegra186 cpufreq driver (Christophe JAILLET) - Convert cpufreq statistics code to use sysfs_emit_at() (ye xingchen) - Allow intel_pstate to use no-HWP mode on Sapphire Rapids (Giovanni Gherdovich) - Add missing pci_dev_put() to the amd_freq_sensitivity cpufreq driver (Xiongfeng Wang) - Initialize the kobj_unregister completion before calling kobject_init_and_add() in the cpufreq core code (Yongqiang Liu) - Defer setting boost MSRs in the ACPI cpufreq driver (Stuart Hayes, Nathan Chancellor) - Make intel_pstate accept initial EPP value of 0x80 (Srinivas Pandruvada) - Make read-only array sys_clk_src in the SPEAr cpufreq driver static (Colin Ian King) - Make array speeds in the longhaul cpufreq driver static (Colin Ian King) - Use str_enabled_disabled() helper in the ACPI cpufreq driver (Andy Shevchenko) - Drop a reference to CVS from cpufreq documentation (Conghui Wang) - Improve kernel messages printed by the PSCI cpuidle driver (Ulf Hansson) - Make the DT cpuidle driver return the correct number of parsed idle states, clean it up and clarify a comment in it (Ulf Hansson) - Modify the tasks freezing code to avoid using pr_cont() and refine an error message printed by it (Rafael Wysocki) - Make the hibernation core code complain about memory map mismatches during resume to help diagnostics (Xueqin Luo) - Fix mistake in a kerneldoc comment in the hibernation code (xiongxin) - Reverse the order of performance and enabling operations in the generic power domains code (Abel Vesa) - Power off[on] domains in hibernate .freeze[thaw]_noirq hook of in the generic power domains code (Abel Vesa) - Consolidate genpd_restore_noirq() and genpd_resume_noirq() (Shawn Guo) - Pass generic PM noirq hooks to genpd_finish_suspend() (Shawn Guo) - Drop generic power domain status manipulation during hibernate restore (Shawn Guo) - Fix compiler warnings with make W=1 in the idle_inject power capping driver (Srinivas Pandruvada) - Use kstrtobool() instead of strtobool() in the power capping sysfs interface (Christophe JAILLET) - Add SCMI Powercap based power capping driver (Cristian Marussi) - Add Emerald Rapids support to the intel-uncore-freq driver (Artem Bityutskiy) - Repair slips in kernel-doc comments in the generic notifier code (Lukas Bulwahn) - Fix several DT issues in the OPP library reorganize code around opp-microvolt- DT property (Viresh Kumar) - Allow any of opp-microvolt, opp-microamp, or opp-microwatt properties to be present without the others present (James Calligeros) - Fix clock-latency-ns property in DT example (Serge Semin) - Add a private governor_data for devfreq governors (Kant Fan) - Reorganize devfreq code to use device_match_of_node() and devm_platform_get_and_ioremap_resource() instead of open coding them (ye xingchen, Minghao Chi) - Make cpupower choose base_cpu to display default cpupower details instead of picking CPU 0 (Saket Kumar Bhaskar) - Add Georgian translation to cpupower documentation (Zurab Kargareteli) - Introduce powercap intel-rapl library, powercap-info command, and RAPL monitor into cpupower (Thomas Renninger)" * tag 'pm-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (64 commits) PM: runtime: Adjust white space in the core code cpufreq: Remove CVS version control contents from documentation cpufreq: stats: Convert to use sysfs_emit_at() API cpufreq: ACPI: Only set boost MSRs on supported CPUs PM: sleep: Refine error message in try_to_freeze_tasks() PM: sleep: Avoid using pr_cont() in the tasks freezing code PM: runtime: Relocate rpm_callback() right after __rpm_callback() PM: runtime: Do not call __rpm_callback() from rpm_idle() PM / devfreq: event: use devm_platform_get_and_ioremap_resource() PM / devfreq: event: Use device_match_of_node() PM / devfreq: Use device_match_of_node() powercap: idle_inject: Fix warnings with make W=1 PM: hibernate: Complain about memory map mismatches during resume dt-bindings: cpufreq: cpufreq-qcom-hw: Add QDU1000/QRU1000 cpufreq cpufreq: tegra186: Use flexible array to simplify memory allocation cpupower: rapl monitor - shows the used power consumption in uj for each rapl domain cpupower: Introduce powercap intel-rapl library and powercap-info command cpupower: Add Georgian translation cpufreq: intel_pstate: Add Sapphire Rapids support in no-HWP mode cpufreq: amd_freq_sensitivity: Add missing pci_dev_put() ... commit 054be257f28ca8eeb8e3620766501b81ceb4b293 Author: Mark Brown Date: Wed Dec 7 13:03:02 2022 +0000 Documentation: dev-tools: Clarify requirements for result description Currently the KTAP specification says that a test result line is [][ # [] []] and the description of a test can be "any sequence of words (can't include #)" which specifies that there may be more than one word but does not specify anything other than those words which might be used to separate the words which probably isn't what we want. Given that practically we have tests using a range of separators for words including combinations of spaces and combinations of other symbols like underscores or punctuation let's just clarify that the description can contain any character other than # (marking the start of the directive/diagnostic) or newline (marking the end of this test result). Signed-off-by: Mark Brown Reviewed-by: Kees Cook Reviewed-by: David Gow Signed-off-by: Shuah Khan Documentation/dev-tools/ktap.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b11e51dd70947107fa4076c6286dce301671afc1 Author: Rae Moar Date: Wed Dec 7 01:40:24 2022 +0000 apparmor: test: make static symbols visible during kunit testing Use macros, VISIBLE_IF_KUNIT and EXPORT_SYMBOL_IF_KUNIT, to allow static symbols to be conditionally set to be visible during apparmor_policy_unpack_test, which removes the need to include the testing file in the implementation file. Change the namespace of the symbols that are now conditionally visible (by adding the prefix aa_) to avoid confusion with symbols of the same name. Allow the test to be built as a module and namespace the module name from policy_unpack_test to apparmor_policy_unpack_test to improve clarity of the module name. Provide an example of how static symbols can be dealt with in testing. Signed-off-by: Rae Moar Reviewed-by: David Gow Acked-by: John Johansen Signed-off-by: Shuah Khan security/apparmor/Kconfig | 4 +- security/apparmor/Makefile | 3 + security/apparmor/include/policy_unpack.h | 50 +++++++ security/apparmor/policy_unpack.c | 238 +++++++++++++----------------- security/apparmor/policy_unpack_test.c | 69 +++++---- 5 files changed, 196 insertions(+), 168 deletions(-) commit 9c988fae6f6ae3224a568ab985881b66bb50c9ec Author: Rae Moar Date: Wed Dec 7 01:40:23 2022 +0000 kunit: add macro to allow conditionally exposing static symbols to tests Create two macros: VISIBLE_IF_KUNIT - A macro that sets symbols to be static if CONFIG_KUNIT is not enabled. Otherwise if CONFIG_KUNIT is enabled there is no change to the symbol definition. EXPORT_SYMBOL_IF_KUNIT(symbol) - Exports symbol into EXPORTED_FOR_KUNIT_TESTING namespace only if CONFIG_KUNIT is enabled. Must use MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING) in test file in order to use symbols. Signed-off-by: Rae Moar Reviewed-by: John Johansen Reviewed-by: David Gow Signed-off-by: Shuah Khan include/kunit/visibility.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit c2bb92bc4ea13842fdd27819c0d5b48df2b86ea5 Author: Daniel Latypov Date: Wed Nov 30 10:54:19 2022 -0800 kunit: tool: make parser preserve whitespace when printing test log Currently, kunit_parser.py is stripping all leading whitespace to make parsing easier. But this means we can't accurately show kernel output for failing tests or when the kernel crashes. Embarassingly, this affects even KUnit's own output, e.g. [13:40:46] Expected 2 + 1 == 2, but [13:40:46] 2 + 1 == 3 (0x3) [13:40:46] not ok 1 example_simple_test [13:40:46] [FAILED] example_simple_test After this change, here's what the output in context would look like [13:40:46] =================== example (4 subtests) =================== [13:40:46] # example_simple_test: initializing [13:40:46] # example_simple_test: EXPECTATION FAILED at lib/kunit/kunit-example-test.c:29 [13:40:46] Expected 2 + 1 == 2, but [13:40:46] 2 + 1 == 3 (0x3) [13:40:46] [FAILED] example_simple_test [13:40:46] [SKIPPED] example_skip_test [13:40:46] [SKIPPED] example_mark_skipped_test [13:40:46] [PASSED] example_all_expect_macros_test [13:40:46] # example: initializing suite [13:40:46] # example: pass:1 fail:1 skip:2 total:4 [13:40:46] # Totals: pass:1 fail:1 skip:2 total:4 [13:40:46] ===================== [FAILED] example ===================== This example shows one minor cosmetic defect this approach has. The test counts lines prevent us from dedenting the suite-level output. But at the same time, any form of non-KUnit output would do the same unless it happened to be indented as well. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit.py | 2 +- tools/testing/kunit/kunit_parser.py | 27 +++++++++++++-------------- tools/testing/kunit/kunit_tool_test.py | 2 ++ 3 files changed, 16 insertions(+), 15 deletions(-) commit a81fe7ecf717e5ae16892c282378ca380d4e99c9 Author: David Gow Date: Wed Dec 7 12:33:19 2022 +0800 Documentation: kunit: Fix "How Do I Use This" / "Next Steps" sections The "How Do I Use This" section of index.rst and "Next Steps" section of start.rst were just copies of the table of contents, and therefore weren't really useful either when looking a sphinx generated output (which already had the TOC visible) or when reading the source (where it's just a list of files that ls could give you). Instead, provide a small number of concrete next steps, and a bit more description about what the pages contain. This also removes the broken reference to 'tips.rst', which was previously removed. Fixed git am whitespace complaints during commit: Shuah Khan Fixes: 4399c737a97d ("Documentation: kunit: Remove redundant 'tips.rst' page") Signed-off-by: David Gow Reviewed-by: Sadiya Kazi Reviewed-by: Bagas Sanjaya Signed-off-by: Shuah Khan Documentation/dev-tools/kunit/index.rst | 19 ++++++++----------- Documentation/dev-tools/kunit/start.rst | 18 ++++++++---------- 2 files changed, 16 insertions(+), 21 deletions(-) commit 5937e0c04afc7d4b7b737fda93316ba4b74183c0 Author: Daniel Latypov Date: Mon Nov 28 16:12:34 2022 -0800 kunit: tool: don't include KTAP headers and the like in the test log We print the "test log" on failure. This is meant to be all the kernel output that happened during the test. But we also include the special KTAP lines in it, which are often redundant. E.g. we include the "not ok" line in the log, right before we print that the test case failed... [13:51:48] Expected 2 + 1 == 2, but [13:51:48] 2 + 1 == 3 (0x3) [13:51:48] not ok 1 example_simple_test [13:51:48] [FAILED] example_simple_test More full example after this patch: [13:51:48] =================== example (4 subtests) =================== [13:51:48] # example_simple_test: initializing [13:51:48] # example_simple_test: EXPECTATION FAILED at lib/kunit/kunit-example-test.c:29 [13:51:48] Expected 2 + 1 == 2, but [13:51:48] 2 + 1 == 3 (0x3) [13:51:48] [FAILED] example_simple_test Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit_parser.py | 8 ++++---- tools/testing/kunit/kunit_tool_test.py | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) commit 6c738b52316c58ae8a87abf0907f87a7b5e7a109 Author: Rae Moar Date: Wed Nov 23 18:25:58 2022 +0000 kunit: improve KTAP compliance of KUnit test output Change KUnit test output to better comply with KTAP v1 specifications found here: https://kernel.org/doc/html/latest/dev-tools/ktap.html. 1) Use "KTAP version 1" instead of "TAP version 14" as test output header 2) Remove '-' between test number and test name on test result lines 2) Add KTAP version lines to each subtest header as well Note that the new KUnit output still includes the “# Subtest” line now located after the KTAP version line. This does not completely match the KTAP v1 spec but since it is classified as a diagnostic line, it is not expected to be disruptive or break any existing parsers. This “# Subtest” line comes from the TAP 14 spec (https://testanything.org/tap-version-14-specification.html) and it is used to define the test name before the results. Original output: TAP version 14 1..1 # Subtest: kunit-test-suite 1..3 ok 1 - kunit_test_1 ok 2 - kunit_test_2 ok 3 - kunit_test_3 # kunit-test-suite: pass:3 fail:0 skip:0 total:3 # Totals: pass:3 fail:0 skip:0 total:3 ok 1 - kunit-test-suite New output: KTAP version 1 1..1 KTAP version 1 # Subtest: kunit-test-suite 1..3 ok 1 kunit_test_1 ok 2 kunit_test_2 ok 3 kunit_test_3 # kunit-test-suite: pass:3 fail:0 skip:0 total:3 # Totals: pass:3 fail:0 skip:0 total:3 ok 1 kunit-test-suite Signed-off-by: Rae Moar Reviewed-by: Daniel Latypov Reviewed-by: David Gow Tested-by: Anders Roxell Signed-off-by: Shuah Khan lib/kunit/debugfs.c | 2 +- lib/kunit/executor.c | 6 +++--- lib/kunit/test.c | 9 ++++++--- 3 files changed, 10 insertions(+), 7 deletions(-) commit 434498a6bee3db729dbdb7f131f3506f4dca85e8 Author: Rae Moar Date: Wed Nov 23 18:25:57 2022 +0000 kunit: tool: parse KTAP compliant test output Change the KUnit parser to be able to parse test output that complies with the KTAP version 1 specification format found here: https://kernel.org/doc/html/latest/dev-tools/ktap.html. Ensure the parser is able to parse tests with the original KUnit test output format as well. KUnit parser now accepts any of the following test output formats: Original KUnit test output format: TAP version 14 1..1 # Subtest: kunit-test-suite 1..3 ok 1 - kunit_test_1 ok 2 - kunit_test_2 ok 3 - kunit_test_3 # kunit-test-suite: pass:3 fail:0 skip:0 total:3 # Totals: pass:3 fail:0 skip:0 total:3 ok 1 - kunit-test-suite KTAP version 1 test output format: KTAP version 1 1..1 KTAP version 1 1..3 ok 1 kunit_test_1 ok 2 kunit_test_2 ok 3 kunit_test_3 ok 1 kunit-test-suite New KUnit test output format (changes made in the next patch of this series): KTAP version 1 1..1 KTAP version 1 # Subtest: kunit-test-suite 1..3 ok 1 kunit_test_1 ok 2 kunit_test_2 ok 3 kunit_test_3 # kunit-test-suite: pass:3 fail:0 skip:0 total:3 # Totals: pass:3 fail:0 skip:0 total:3 ok 1 kunit-test-suite Signed-off-by: Rae Moar Reviewed-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit_parser.py | 79 ++++++++++++++-------- tools/testing/kunit/kunit_tool_test.py | 14 ++++ .../kunit/test_data/test_parse_ktap_output.log | 8 +++ .../kunit/test_data/test_parse_subtest_header.log | 7 ++ 4 files changed, 80 insertions(+), 28 deletions(-) commit 909c6475d568826be377893cf5abb7cde5877230 Author: David Gow Date: Fri Nov 25 16:43:06 2022 +0800 mm: slub: test: Use the kunit_get_current_test() function Use the newly-added function kunit_get_current_test() instead of accessing current->kunit_test directly. This function uses a static key to return more quickly when KUnit is enabled, but no tests are actively running. There should therefore be a negligible performance impact to enabling the slub KUnit tests. Other than the performance improvement, this should be a no-op. Cc: Oliver Glitta Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Christoph Lameter Cc: Vlastimil Babka Cc: David Rientjes Cc: Andrew Morton Signed-off-by: David Gow Acked-by: Vlastimil Babka Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Shuah Khan lib/slub_kunit.c | 1 + mm/slub.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 91e93592219f74c4d5cd4f27006d726ac86ae15d Author: David Gow Date: Fri Nov 25 16:43:05 2022 +0800 kunit: Use the static key when retrieving the current test In order to detect if a KUnit test is running, and to access its context, the 'kunit_test' member of the current task_struct is used. Usually, this is accessed directly or via the kunit_fail_current_task() function. In order to speed up the case where no test is running, add a wrapper, kunit_get_current_test(), which uses the static key to fail early. Equally, Speed up kunit_fail_current_test() by using the static key. This should make it convenient for code to call this unconditionally in fakes or error paths, without worrying that this will slow the code down significantly. If CONFIG_KUNIT=n (or m), this compiles away to nothing. If CONFIG_KUNIT=y, it will compile down to a NOP (on most architectures) if no KUnit test is currently running. Note that kunit_get_current_test() does not work if KUnit is built as a module. This mirrors the existing restriction on kunit_fail_current_test(). Note that the definition of kunit_fail_current_test() still wraps an empty, inline function if KUnit is not built-in. This is to ensure that the printf format string __attribute__ will still work. Also update the documentation to suggest users use the new kunit_get_current_test() function, update the example, and to describe the behaviour when KUnit is disabled better. Cc: Jonathan Corbet Cc: Sadiya Kazi Signed-off-by: David Gow Reviewed-by: Daniel Latypov Signed-off-by: Shuah Khan Documentation/dev-tools/kunit/usage.rst | 30 +++++++++++++------ include/kunit/test-bug.h | 53 +++++++++++++++++++++++++++++++-- 2 files changed, 71 insertions(+), 12 deletions(-) commit 908d0c177bbc7c34ab9129c6f2bcd87487115632 Author: David Gow Date: Fri Nov 25 16:43:04 2022 +0800 kunit: Provide a static key to check if KUnit is actively running tests KUnit does a few expensive things when enabled. This hasn't been a problem because KUnit was only enabled on test kernels, but with a few people enabling (but not _using_) KUnit on production systems, we need a runtime way of handling this. Provide a 'kunit_running' static key (defaulting to false), which allows us to hide any KUnit code behind a static branch. This should reduce the performance impact (on other code) of having KUnit enabled to a single NOP when no tests are running. Note that, while it looks unintuitive, tests always run entirely within __kunit_test_suites_init(), so it's safe to decrement the static key at the end of this function, rather than in __kunit_test_suites_exit(), which is only there to clean up results in debugfs. Signed-off-by: David Gow Reviewed-by: Daniel Latypov Signed-off-by: Shuah Khan include/kunit/test.h | 4 ++++ lib/kunit/test.c | 6 ++++++ 2 files changed, 10 insertions(+) commit 309e22effb741a8c65131a2694a49839fd685a27 Author: Daniel Latypov Date: Mon Nov 21 11:55:26 2022 -0800 kunit: tool: make --json do nothing if --raw_ouput is set When --raw_output is set (to any value), we don't actually parse the test results. So asking to print the test results as json doesn't make sense. We internally create a fake test with one passing subtest, so --json would actually print out something misleading. This patch: * Rewords the flag descriptions so hopefully this is more obvious. * Also updates --raw_output's description to note the default behavior is to print out only "KUnit" results (actually any KTAP results) * also renames and refactors some related logic for clarity (e.g. test_result => test, it's a kunit_parser.Test object). Notably, this patch does not make it an error to specify --json and --raw_output together. This is an edge case, but I know of at least one wrapper around kunit.py that always sets --json. You'd never be able to use --raw_output with that wrapper. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit.py | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 0a7d5c30b7f02887319a1382fbb8dc1c8250fe2c Author: Daniel Latypov Date: Thu Nov 10 19:18:55 2022 -0800 kunit: tool: tweak error message when no KTAP found We currently tell people we "couldn't find any KTAP output" with no indication as to what this might mean. After this patch, we get: $ ./tools/testing/kunit/kunit.py parse /dev/null ============================================================ [ERROR] Test: : Could not find any KTAP output. Did any KUnit tests run? ============================================================ Testing complete. Ran 0 tests: errors: 1 Note: we could try and generate a more verbose message like > Please check .kunit/test.log to see the raw kernel output. or the like, but we'd need to know what the build dir was to know where test.log actually lives. This patch tries to make a more minimal improvement. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit_parser.py | 2 +- tools/testing/kunit/kunit_tool_test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 34c68f432c67f0d9bd4e64cf0929f399c6a4e1b0 Author: Daniel Latypov Date: Wed Nov 9 13:20:32 2022 -0800 kunit: remove KUNIT_INIT_MEM_ASSERTION macro Commit 870f63b7cd78 ("kunit: eliminate KUNIT_INIT_*_ASSERT_STRUCT macros") removed all the other macros of this type. But it raced with commit b8a926bea8b1 ("kunit: Introduce KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ macros"), which added another instance. Remove KUNIT_INIT_MEM_ASSERTION and just use the generic KUNIT_INIT_ASSERT macro instead. Rename the `size` arg to avoid conflicts by appending a "_" (like we did in the previous commit). Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan include/kunit/assert.h | 7 ------- include/kunit/test.h | 12 ++++++------ 2 files changed, 6 insertions(+), 13 deletions(-) commit a5b9abaa6049340a93a852b1d6d069064fddb624 Author: David Gow Date: Fri Nov 11 10:29:06 2022 -0800 Documentation: kunit: Remove redundant 'tips.rst' page The contents of 'tips.rst' was mostly included in 'usage.rst' way back in commit 953574390634 ("Documentation: KUnit: Rework writing page to focus on writing tests"), but the tips page remained behind as well. The parent patches in this series fill in the gaps, so now 'tips.rst' is redundant. Therefore, delete 'tips.rst'. While I regret breaking any links to 'tips' which might exist externally, it's confusing to have two subtly different versions of the same content around. Signed-off-by: David Gow Signed-off-by: Daniel Latypov Reviewed-by: Sadiya Kazi Signed-off-by: Shuah Khan Documentation/dev-tools/kunit/index.rst | 1 - Documentation/dev-tools/kunit/tips.rst | 190 -------------------------------- 2 files changed, 191 deletions(-) commit ec0a42a17e463ee5b1ebd2d60337e8ae8e5ace2b Author: Daniel Latypov Date: Fri Nov 11 10:29:05 2022 -0800 Documentation: KUnit: reword description of assertions The existing wording implies that kunit_kmalloc_array() is "the method under test". We're actually testing the sort() function in that example. This is because the example was changed in commit 953574390634 ("Documentation: KUnit: Rework writing page to focus on writing tests"), but the wording was not. Also add a `note` telling people they can use the KUNIT_ASSERT_EQ() macros from any function. Some users might be coming from a framework like gUnit where that'll compile but silently do the wrong thing. Signed-off-by: Daniel Latypov Reviewed-by: Sadiya Kazi Reviewed-by: David Gow Signed-off-by: Shuah Khan Documentation/dev-tools/kunit/usage.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 65c48a48ead042856525b92cedf673d2bf5bdfc9 Author: Daniel Latypov Date: Fri Nov 11 10:29:04 2022 -0800 Documentation: KUnit: make usage.rst a superset of tips.rst, remove duplication usage.rst had most of the content of the tips.rst page copied over. But it's missing https://www.kernel.org/doc/html/v6.0/dev-tools/kunit/tips.html#customizing-error-messages Copy it over so we can retire tips.rst w/o losing content. And in that process, it also gained a duplicate section about how KUNIT_ASSERT_*() exit the test case early. Remove that. Signed-off-by: Daniel Latypov Reviewed-by: Sadiya Kazi Reviewed-by: David Gow Signed-off-by: Shuah Khan Documentation/dev-tools/kunit/usage.rst | 49 +++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 18 deletions(-) commit 697365c086791372945037557f99bc164e2db855 Author: Daniel Latypov Date: Fri Sep 30 17:26:37 2022 -0700 kunit: eliminate KUNIT_INIT_*_ASSERT_STRUCT macros These macros exist because passing an initializer list to other macros is hard. The goal of these macros is to generate a line like struct $ASSERT_TYPE __assertion = $APPROPRIATE_INITIALIZER; e.g. struct kunit_unary_assertion __assertion = { .condition = "foo()", .expected_true = true }; But the challenge is you can't pass `{.condition=..., .expect_true=...}` as a macro argument, since the comma means you're actually passing two arguments, `{.condition=...` and `.expect_true=....}`. So we'd made custom macros for each different initializer-list shape. But we can work around this with the following generic macro #define KUNIT_INIT_ASSERT(initializers...) { initializers } Note: this has the downside that we have to rename some macros arguments to not conflict with the struct field names (e.g. `expected_true`). It's a bit gross, but probably worth reducing the # of macros. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan include/kunit/assert.h | 48 ------------------------------------------------ include/kunit/test.h | 27 +++++++++++++++------------ 2 files changed, 15 insertions(+), 60 deletions(-) commit 101e32a025da386ba6f6efbfe3e75b6ec5a358aa Author: Daniel Latypov Date: Thu Nov 3 10:47:40 2022 -0700 kunit: tool: remove redundant file.close() call in unit test We're using a `with` block above, so the file object is already closed. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit_tool_test.py | 2 -- 1 file changed, 2 deletions(-) commit 05d9d2c3ee1e4b587f71455f6d3d1493289204ff Author: Daniel Latypov Date: Thu Nov 3 10:47:39 2022 -0700 kunit: tool: unit tests all check parser errors, standardize formatting a bit Let's verify that the parser isn't reporting any errors for valid inputs. This change also * does result.status checking on one line * makes sure we consistently do it outside of the `with` block Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit_tool_test.py | 93 ++++++++++++++-------------------- 1 file changed, 38 insertions(+), 55 deletions(-) commit f473dd9488d910aab109e8c6a2e4181125ca322a Author: Daniel Latypov Date: Thu Nov 3 10:47:38 2022 -0700 kunit: tool: make TestCounts a dataclass Since we're using Python 3.7+, we can use dataclasses to tersen the code. It also lets us create pre-populated TestCounts() objects and compare them in our unit test. (Before, you could only create empty ones). Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit_parser.py | 25 ++++++++----------------- tools/testing/kunit/kunit_tool_test.py | 4 +--- 2 files changed, 9 insertions(+), 20 deletions(-) commit a38a211e9e0ca20f5d65307c98571f40f78ad396 Merge: 84698dad0641 d3295fee3c75 Author: Jakub Kicinski Date: Mon Dec 12 13:11:25 2022 -0800 Merge branch 'mptcp-fix-ipv6-reqsk-ops-and-some-netlink-error-codes' Mat Martineau says: ==================== mptcp: Fix IPv6 reqsk ops and some netlink error codes Patch 1 adds some missing error status values for MPTCP path management netlink commands with invalid attributes. Patches 2-4 make IPv6 subflows use the correct request_sock_ops structure and IPv6-specific destructor. The first patch in this group is a prerequisite change that simplifies the last two patches. ==================== Link: https://lore.kernel.org/r/20221210002810.289674-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit d3295fee3c756ece33ac0d935e172e68c0a4161b Author: Matthieu Baerts Date: Fri Dec 9 16:28:10 2022 -0800 mptcp: use proper req destructor for IPv6 Before, only the destructor from TCP request sock in IPv4 was called even if the subflow was IPv6. It is important to use the right destructor to avoid memory leaks with some advanced IPv6 features, e.g. when the request socks contain specific IPv6 options. Fixes: 79c0949e9a09 ("mptcp: Add key generation and token tree") Reviewed-by: Mat Martineau Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/subflow.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 34b21d1ddc8ace77a8fa35c1b1e06377209e0dae Author: Matthieu Baerts Date: Fri Dec 9 16:28:09 2022 -0800 mptcp: dedicated request sock for subflow in v6 tcp_request_sock_ops structure is specific to IPv4. It should then not be used with MPTCP subflows on top of IPv6. For example, it contains the 'family' field, initialised to AF_INET. This 'family' field is used by TCP FastOpen code to generate the cookie but also by TCP Metrics, SELinux and SYN Cookies. Using the wrong family will not lead to crashes but displaying/using/checking wrong things. Note that 'send_reset' callback from request_sock_ops structure is used in some error paths. It is then also important to use the correct one for IPv4 or IPv6. The slab name can also be different in IPv4 and IPv6, it will be used when printing some log messages. The slab pointer will anyway be the same because the object size is the same for both v4 and v6. A BUILD_BUG_ON() has also been added to make sure this size is the same. Fixes: cec37a6e41aa ("mptcp: Handle MP_CAPABLE options for outgoing connections") Reviewed-by: Mat Martineau Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/subflow.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit 3fff88186f047627bb128d65155f42517f8e448f Author: Matthieu Baerts Date: Fri Dec 9 16:28:08 2022 -0800 mptcp: remove MPTCP 'ifdef' in TCP SYN cookies To ease the maintenance, it is often recommended to avoid having #ifdef preprocessor conditions. Here the section related to CONFIG_MPTCP was quite short but the next commit needs to add more code around. It is then cleaner to move specific MPTCP code to functions located in net/mptcp directory. Now that mptcp_subflow_request_sock_ops structure can be static, it can also be marked as "read only after init". Suggested-by: Paolo Abeni Reviewed-by: Mat Martineau Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski include/net/mptcp.h | 12 ++++++++++-- net/ipv4/syncookies.c | 7 +++---- net/mptcp/subflow.c | 12 +++++++++++- 3 files changed, 24 insertions(+), 7 deletions(-) commit e0fe1123ab2b07d2cd5475660bd0b4e6993ffaa7 Author: Wei Yongjun Date: Fri Dec 9 16:28:07 2022 -0800 mptcp: netlink: fix some error return code Fix to return negative error code -EINVAL from some error handling case instead of 0, as done elsewhere in those functions. Fixes: 9ab4807c84a4 ("mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE") Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment") Cc: stable@vger.kernel.org Reviewed-by: Matthieu Baerts Signed-off-by: Wei Yongjun Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/pm_userspace.c | 4 ++++ 1 file changed, 4 insertions(+) commit 70be6f322860d322ebcd120cf0c05402ead5c6de Author: Dan Carpenter Date: Thu Dec 8 19:02:17 2022 +0300 vfio/mlx5: error pointer dereference in error handling This code frees the wrong "buf" variable and results in an error pointer dereference. Fixes: 34e2f27143d1 ("vfio/mlx5: Introduce multiple loads") Signed-off-by: Dan Carpenter Reviewed-by: Yishai Hadas Link: https://lore.kernel.org/r/Y5IKia5SaiVxYmG5@kili Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe3dd71db2b81c202bc80532bbe0e07238a45ed9 Author: Dan Carpenter Date: Thu Dec 8 19:01:26 2022 +0300 vfio/mlx5: fix error code in mlx5vf_precopy_ioctl() The copy_to_user() function returns the number of bytes remaining to be copied but we want to return a negative error code here. Fixes: 0dce165b1adf ("vfio/mlx5: Introduce vfio precopy ioctl implementation") Signed-off-by: Dan Carpenter Reviewed-by: Yishai Hadas Link: https://lore.kernel.org/r/Y5IKVknlf5Z5NPtU@kili Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d1f0f50fbbbbca1e3e8157e51934613bf88f6d44 Author: Shang XiaoJing Date: Thu Dec 8 09:33:41 2022 +0800 samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe() Add missing pci_disable_device() in fail path of mdpy_fb_probe(). Besides, fix missing release functions in mdpy_fb_remove(). Fixes: cacade1946a4 ("sample: vfio mdev display - guest driver") Signed-off-by: Shang XiaoJing Link: https://lore.kernel.org/r/20221208013341.3999-1-shangxiaojing@huawei.com Signed-off-by: Alex Williamson samples/vfio-mdev/mdpy-fb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 84698dad0641ffdb7273f3b31664ce32a2e1386c Merge: 5f7d78b2b12a fb21cad28489 Author: Jakub Kicinski Date: Mon Dec 12 13:04:54 2022 -0800 Merge branch 'update-joakim-zhang-entries' Florian Fainelli says: ==================== Update Joakim Zhang entries Shawn, since you are the i.MX maintainer I added you and the NXP Linux Team as the de-facto maintainers for those entries, however there may be other people to list, thanks! ==================== Link: https://lore.kernel.org/r/20221209220519.1542872-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski commit fb21cad28489137a384c25b045d1c5e178f6610b Author: Florian Fainelli Date: Fri Dec 9 14:05:19 2022 -0800 dt-bindings: FEC/i.MX DWMAC and INTMUX maintainer Emails to Joakim Zhang bounce, add Shawn Guo (i.MX architecture maintainer) and the NXP Linux Team exploder email as well as well Wei Wang for FEC and Clark Wang for DWMAC. Acked-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli Signed-off-by: Jakub Kicinski .../devicetree/bindings/interrupt-controller/fsl,intmux.yaml | 3 ++- Documentation/devicetree/bindings/net/fsl,fec.yaml | 4 +++- Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) commit 4e81462a45ce7d758eb29ec60126f5793593c6f7 Author: Florian Fainelli Date: Fri Dec 9 14:05:18 2022 -0800 MAINTAINERS: Update NXP FEC maintainer Emails to Joakim Zhang bounce, update the list of maintainers per feedback from Clark Wang and designate Wei Fang as the primary maintainer. Signed-off-by: Florian Fainelli Signed-off-by: Jakub Kicinski MAINTAINERS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 15eb1621762134bd3a0f81020359b0c7745d1080 Author: Rob Herring Date: Fri Dec 9 11:15:52 2022 -0600 dt-bindings: net: Convert Socionext NetSec Ethernet to DT schema Convert the Socionext NetSec Ethernet binding to DT schema format. Signed-off-by: Rob Herring Acked-by: Jassi Brar Link: https://lore.kernel.org/r/20221209171553.3350583-1-robh@kernel.org Signed-off-by: Jakub Kicinski .../bindings/net/socionext,synquacer-netsec.yaml | 73 ++++++++++++++++++++++ .../devicetree/bindings/net/socionext-netsec.txt | 56 ----------------- MAINTAINERS | 2 +- 3 files changed, 74 insertions(+), 57 deletions(-) commit 4e426e2534ce2811380ef09ee2a050779d1b5a29 Author: Taras Chornyi Date: Fri Dec 9 17:45:21 2022 +0200 MAINTAINERS: Update email address for Marvell Prestera Ethernet Switch driver Taras's Marvell email account will be shut down soon so change it to Plvision. Signed-off-by: Taras Chornyi Signed-off-by: Vadym Kochan Link: https://lore.kernel.org/r/20221209154521.1246881-1-vadym.kochan@plvision.eu Signed-off-by: Jakub Kicinski MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 631aa744423173bf921191ba695bbc7c1aabd9e0 Merge: 0a1d4434db5f 00ed1eabcc3b Author: Linus Torvalds Date: Mon Dec 12 13:01:14 2022 -0800 Merge tag 'x86-misc-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 updates from Thomas Gleixner: "Updates for miscellaneous x86 areas: - Reserve a new boot loader type for barebox which is usally used on ARM and MIPS, but can also be utilized as EFI payload on x86 to provide watchdog-supervised boot up. - Consolidate the native and compat 32bit signal handling code and split the 64bit version out into a separate source file - Switch the ESPFIX random usage to get_random_long()" * tag 'x86-misc-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/espfix: Use get_random_long() rather than archrandom x86/signal/64: Move 64-bit signal code to its own file x86/signal/32: Merge native and compat 32-bit signal code x86/signal: Add ABI prefixes to frame setup functions x86/signal: Merge get_sigframe() x86: Remove __USER32_DS signal/compat: Remove compat_sigset_t override x86/signal: Remove sigset_t parameter from frame setup functions x86/signal: Remove sig parameter from frame setup functions Documentation/x86/boot: Reserve type_of_loader=13 for barebox commit 80a464d83f08cac5052c7f857fc067b3fe88071d Author: Xu Panda Date: Fri Dec 9 15:38:59 2022 +0800 net: hns3: 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: Jiri Pirko Link: https://lore.kernel.org/r/202212091538591375035@zte.com.cn Signed-off-by: Jakub Kicinski drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit da05cecc4939c0410d56c29e252998b192756318 Author: Firo Yang Date: Fri Dec 9 13:48:54 2022 +0800 sctp: sysctl: make extra pointers netns aware Recently, a customer reported that from their container whose net namespace is different to the host's init_net, they can't set the container's net.sctp.rto_max to any value smaller than init_net.sctp.rto_min. For instance, Host: sudo sysctl net.sctp.rto_min net.sctp.rto_min = 1000 Container: echo 100 > /mnt/proc-net/sctp/rto_min echo 400 > /mnt/proc-net/sctp/rto_max echo: write error: Invalid argument This is caused by the check made from this'commit 4f3fdf3bc59c ("sctp: add check rto_min and rto_max in sysctl")' When validating the input value, it's always referring the boundary value set for the init_net namespace. Having container's rto_max smaller than host's init_net.sctp.rto_min does make sense. Consider that the rto between two containers on the same host is very likely smaller than it for two hosts. So to fix this problem, as suggested by Marcelo, this patch makes the extra pointers of rto_min, rto_max, pf_retrans, and ps_retrans point to the corresponding variables from the newly created net namespace while the new net namespace is being registered in sctp_sysctl_net_register. Fixes: 4f3fdf3bc59c ("sctp: add check rto_min and rto_max in sysctl") Reviewed-by: Marcelo Ricardo Leitner Reviewed-by: Jakub Kicinski Acked-by: Marcelo Ricardo Leitner Signed-off-by: Firo Yang Link: https://lore.kernel.org/r/20221209054854.23889-1-firo.yang@suse.com Signed-off-by: Jakub Kicinski net/sctp/sysctl.c | 73 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 29 deletions(-) commit 5f7d78b2b12a9d561f48fa00bab29b40f4616dad Author: Eric Pilmore Date: Thu Dec 8 16:06:59 2022 -0800 ntb_netdev: Use dev_kfree_skb_any() in interrupt context TX/RX callback handlers (ntb_netdev_tx_handler(), ntb_netdev_rx_handler()) can be called in interrupt context via the DMA framework when the respective DMA operations have completed. As such, any calls by these routines to free skb's, should use the interrupt context safe dev_kfree_skb_any() function. Previously, these callback handlers would call the interrupt unsafe version of dev_kfree_skb(). This has not presented an issue on Intel IOAT DMA engines as that driver utilizes tasklets rather than a hard interrupt handler, like the AMD PTDMA DMA driver. On AMD systems, a kernel WARNING message is encountered, which is being issued from skb_release_head_state() due to in_hardirq() being true. Besides the user visible WARNING from the kernel, the other symptom of this bug was that TCP/IP performance across the ntb_netdev interface was very poor, i.e. approximately an order of magnitude below what was expected. With the repair to use dev_kfree_skb_any(), kernel WARNINGs from skb_release_head_state() ceased and TCP/IP performance, as measured by iperf, was on par with expected results, approximately 20 Gb/s on AMD Milan based server. Note that this performance is comparable with Intel based servers. Fixes: 765ccc7bc3d91 ("ntb_netdev: correct skb leak") Fixes: 548c237c0a997 ("net: Add support for NTB virtual ethernet device") Signed-off-by: Eric Pilmore Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20221209000659.8318-1-epilmore@gigaio.com Signed-off-by: Jakub Kicinski drivers/net/ntb_netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9352e7470a1b4edd2fa9d235420ecc7bc3971bdc Merge: 2afc1fbbdab2 5656374b168c Author: Paolo Bonzini Date: Tue Dec 6 12:29:06 2022 -0500 Merge remote-tracking branch 'kvm/queue' into HEAD x86 Xen-for-KVM: * Allow the Xen runstate information to cross a page boundary * Allow XEN_RUNSTATE_UPDATE flag behaviour to be configured * add support for 32-bit guests in SCHEDOP_poll x86 fixes: * One-off fixes for various emulation flows (SGX, VMXON, NRIPS=0). * Reinstate IBPB on emulated VM-Exit that was incorrectly dropped a few years back when eliminating unnecessary barriers when switching between vmcs01 and vmcs02. * Clean up the MSR filter docs. * Clean up vmread_error_trampoline() to make it more obvious that params must be passed on the stack, even for x86-64. * Let userspace set all supported bits in MSR_IA32_FEAT_CTL irrespective of the current guest CPUID. * Fudge around a race with TSC refinement that results in KVM incorrectly thinking a guest needs TSC scaling when running on a CPU with a constant TSC, but no hardware-enumerated TSC frequency. * Advertise (on AMD) that the SMM_CTL MSR is not supported * Remove unnecessary exports Selftests: * Fix an inverted check in the access tracking perf test, and restore support for asserting that there aren't too many idle pages when running on bare metal. * Fix an ordering issue in the AMX test introduced by recent conversions to use kvm_cpu_has(), and harden the code to guard against similar bugs in the future. Anything that tiggers caching of KVM's supported CPUID, kvm_cpu_has() in this case, effectively hides opt-in XSAVE features if the caching occurs before the test opts in via prctl(). * Fix build errors that occur in certain setups (unsure exactly what is unique about the problematic setup) due to glibc overriding static_assert() to a variant that requires a custom message. * Introduce actual atomics for clear/set_bit() in selftests Documentation: * Remove deleted ioctls from documentation * Various fixes commit 8964916d206071b058c6351f88b1966bd58cbde0 Author: Jerry Ray Date: Fri Dec 9 09:35:02 2022 -0600 net: lan9303: Fix read error execution path This patch fixes an issue where a read failure of a port statistic counter will return unknown results. While it is highly unlikely the read will ever fail, it is much cleaner to return a zero for the stat count. Fixes: a1292595e006 ("net: dsa: add new DSA switch driver for the SMSC-LAN9303") Signed-off-by: Jerry Ray Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20221209153502.7429-1-jerry.ray@microchip.com Signed-off-by: Jakub Kicinski drivers/net/dsa/lan9303-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5821504f5073983733465b8bc430049c4343bbd7 Author: Roger Quadros Date: Thu Dec 8 12:55:34 2022 +0200 net: ethernet: ti: am65-cpsw: Fix PM runtime leakage in am65_cpsw_nuss_ndo_slave_open() Ensure pm_runtime_put() is issued in error path. Reported-by: Jakub Kicinski Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Roger Quadros Reviewed-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221208105534.63709-1-rogerq@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 0a1d4434db5f86c50018fe0aab299ac97dc15b76 Merge: 79ad89123c25 18a207849218 Author: Linus Torvalds Date: Mon Dec 12 12:52:02 2022 -0800 Merge tag 'timers-core-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "Updates for timers, timekeeping and drivers: Core: - The timer_shutdown[_sync]() infrastructure: Tearing down timers can be tedious when there are circular dependencies to other things which need to be torn down. A prime example is timer and workqueue where the timer schedules work and the work arms the timer. What needs to prevented is that pending work which is drained via destroy_workqueue() does not rearm the previously shutdown timer. Nothing in that shutdown sequence relies on the timer being functional. The conclusion was that the semantics of timer_shutdown_sync() should be: - timer is not enqueued - timer callback is not running - timer cannot be rearmed Preventing the rearming of shutdown timers is done by discarding rearm attempts silently. A warning for the case that a rearm attempt of a shutdown timer is detected would not be really helpful because it's entirely unclear how it should be acted upon. The only way to address such a case is to add 'if (in_shutdown)' conditionals all over the place. This is error prone and in most cases of teardown not required all. - The real fix for the bluetooth HCI teardown based on timer_shutdown_sync(). A larger scale conversion to timer_shutdown_sync() is work in progress. - Consolidation of VDSO time namespace helper functions - Small fixes for timer and timerqueue Drivers: - Prevent integer overflow on the XGene-1 TVAL register which causes an never ending interrupt storm. - The usual set of new device tree bindings - Small fixes and improvements all over the place" * tag 'timers-core-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (34 commits) dt-bindings: timer: renesas,cmt: Add r8a779g0 CMT support dt-bindings: timer: renesas,tmu: Add r8a779g0 support clocksource/drivers/arm_arch_timer: Use kstrtobool() instead of strtobool() clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock() clocksource/drivers/timer-ti-dm: Clear settings on probe and free clocksource/drivers/timer-ti-dm: Make timer_get_irq static clocksource/drivers/timer-ti-dm: Fix warning for omap_timer_match clocksource/drivers/arm_arch_timer: Fix XGene-1 TVAL register math error clocksource/drivers/timer-npcm7xx: Enable timer 1 clock before use dt-bindings: timer: nuvoton,npcm7xx-timer: Allow specifying all clocks dt-bindings: timer: rockchip: Add rockchip,rk3128-timer clockevents: Repair kernel-doc for clockevent_delta2ns() clocksource/drivers/ingenic-ost: Define pm functions properly in platform_driver struct clocksource/drivers/sh_cmt: Access registers according to spec vdso/timens: Refactor copy-pasted find_timens_vvar_page() helper into one copy Bluetooth: hci_qca: Fix the teardown problem for real timers: Update the documentation to reflect on the new timer_shutdown() API timers: Provide timer_shutdown[_sync]() timers: Add shutdown mechanism to the internal functions timers: Split [try_to_]del_timer[_sync]() to prepare for shutdown mode ... commit 79ad89123c2523a7982d457641dd64f339307e6c Merge: 369013162f7a ff4c85c05333 Author: Linus Torvalds Date: Mon Dec 12 12:44:03 2022 -0800 Merge tag 'x86-cleanups-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Thomas Gleixner: "A set of x86 cleanups: - Rework the handling of x86_regset for 32 and 64 bit. The original implementation tried to minimize the allocation size with quite some hard to understand and fragile tricks. Make it robust and straight forward by separating the register enumerations for 32 and 64 bit completely. - Add a few missing static annotations - Remove the stale unused setup_once() assembly function - Address a few minor static analysis and kernel-doc warnings" * tag 'x86-cleanups-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm/32: Remove setup_once() x86/kaslr: Fix process_mem_region()'s return value x86: Fix misc small issues x86/boot: Repair kernel-doc for boot_kstrtoul() x86: Improve formatting of user_regset arrays x86: Separate out x86_regset for 32 and 64 bit x86/i8259: Make default_legacy_pic static x86/tsc: Make art_related_clocksource static commit 369013162f7a7aed9e685e4763c3395700e909ad Merge: 08d72bd299d0 283327556875 Author: Linus Torvalds Date: Mon Dec 12 12:30:31 2022 -0800 Merge tag 'x86-apic-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic update from Thomas Gleixner: "A set of changes for the x86 APIC code: - Handle the case where x2APIC is enabled and locked by the BIOS on a kernel with CONFIG_X86_X2APIC=n gracefully. Instead of a panic which does not make it to the graphical console during very early boot, simply disable the local APIC completely and boot with the PIC and very limited functionality, which allows to diagnose the issue - Convert x86 APIC device tree bindings to YAML - Extend x86 APIC device tree bindings to configure interrupt delivery mode and handle this in during init. This allows to boot with device tree on platforms which lack a legacy PIC" * tag 'x86-apic-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/of: Add support for boot time interrupt delivery mode configuration x86/of: Replace printk(KERN_LVL) with pr_lvl() dt-bindings: x86: apic: Introduce new optional bool property for lapic dt-bindings: x86: apic: Convert Intel's APIC bindings to YAML schema x86/of: Remove unused early_init_dt_add_memory_arch() x86/apic: Handle no CONFIG_X86_X2APIC on systems with x2APIC enabled by BIOS commit fba119cee1412f49c472f3913241d00f830761fd Merge: 26f708a28454 832c3f66f53f Author: Jakub Kicinski Date: Mon Dec 12 12:15:23 2022 -0800 Merge tag 'wireless-next-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.2 Fourth set of patches for v6.2. Few final patches, a big change is that rtw88 now has USB support. Major changes: rtw88 * support USB devices rtw8821cu, rtw8822bu, rtw8822cu and rtw8723du * tag 'wireless-next-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (43 commits) wifi: rtl8xxxu: fixing IQK failures for rtl8192eu wifi: rtlwifi: btcoexist: fix conditions branches that are never executed wifi: rtlwifi: rtl8192se: remove redundant rtl_get_bbreg() call wifi: rtw88: Add rtw8723du chipset support wifi: rtw88: Add rtw8822cu chipset support wifi: rtw88: Add rtw8822bu chipset support wifi: rtw88: Add rtw8821cu chipset support wifi: rtw88: Add common USB chip support wifi: rtw88: iterate over vif/sta list non-atomically wifi: rtw88: Drop coex mutex wifi: rtw88: Drop h2c.lock wifi: rtw88: Drop rf_lock wifi: rtw88: Call rtw_fw_beacon_filter_config() with rtwdev->mutex held wifi: rtw88: print firmware type in info message wifi: rtw89: add join info upon create interface wifi: rtw89: fix unsuccessful interface_add flow wifi: rtw89: stop mac port function when stop_ap() wifi: rtw89: add mac TSF sync function wifi: rtw89: request full firmware only once if it's early requested wifi: rtw89: don't request partial firmware if SECURITY_LOADPIN_ENFORCE ... ==================== Link: https://lore.kernel.org/r/20221212093026.5C5AEC433D2@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 23e188a16423a6e65290abf39dd427ff047e6843 Author: Miaohe Lin Date: Sat Dec 10 18:10:42 2022 +0800 writeback: remove obsolete macro EXPIRE_DIRTY_ATIME EXPIRE_DIRTY_ATIME is not used anymore. Remove it. Signed-off-by: Miaohe Lin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221210101042.2012931-1-linmiaohe@huawei.com Signed-off-by: Jens Axboe fs/fs-writeback.c | 2 -- 1 file changed, 2 deletions(-) commit a9438b44bc7015b18931e312bbd249a25bb59a65 Author: Jan Kara Date: Mon Dec 12 12:36:33 2022 +0100 writeback: Add asserts for adding freed inode to lists In the past we had several use-after-free issues with inodes getting added to writeback lists after evict() removed them. These are painful to debug so add some asserts to catch the problem earlier. The only non-obvious change in the commit is that we need to tweak redirty_tail_locked() to avoid triggering assertion in inode_io_list_move_locked(). Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221212113633.29181-1-jack@suse.cz Signed-off-by: Jens Axboe fs/fs-writeback.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 08d72bd299d08ae019a8a999b95f3e72643a11a4 Merge: 9d33edb20f7e 6f855b39e460 Author: Linus Torvalds Date: Mon Dec 12 11:56:59 2022 -0800 Merge tag 'smp-core-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CPU hotplug updates from Thomas Gleixner: "A small set of updates for CPU hotplug: - Prevent stale CPU hotplug state in the cpu_down() path which was detected by stress testing the sysfs interface - Ensure that the target CPU hotplug state for the boot CPU is CPUHP_ONLINE instead of the compile time init value CPUHP_OFFLINE. - Switch back to the original behaviour of warning when a CPU hotplug callback in the DYING/STARTING section returns an error code. Otherwise a buggy callback can leave the CPUs in an non recoverable state" * tag 'smp-core-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Do not bail-out in DYING/STARTING sections cpu/hotplug: Set cpuhp target for boot cpu cpu/hotplug: Make target_store() a nop when target == state commit 26f708a28454df2062a63fd869e983c379f50ff0 Merge: b2b509fb5a1e 99523094de48 Author: Jakub Kicinski Date: Mon Dec 12 11:27:41 2022 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2022-12-11 We've added 74 non-merge commits during the last 11 day(s) which contain a total of 88 files changed, 3362 insertions(+), 789 deletions(-). The main changes are: 1) Decouple prune and jump points handling in the verifier, from Andrii. 2) Do not rely on ALLOW_ERROR_INJECTION for fmod_ret, from Benjamin. Merged from hid tree. 3) Do not zero-extend kfunc return values. Necessary fix for 32-bit archs, from Björn. 4) Don't use rcu_users to refcount in task kfuncs, from David. 5) Three reg_state->id fixes in the verifier, from Eduard. 6) Optimize bpf_mem_alloc by reusing elements from free_by_rcu, from Hou. 7) Refactor dynptr handling in the verifier, from Kumar. 8) Remove the "/sys" mount and umount dance in {open,close}_netns in bpf selftests, from Martin. 9) Enable sleepable support for cgrp local storage, from Yonghong. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (74 commits) selftests/bpf: test case for relaxed prunning of active_lock.id selftests/bpf: Add pruning test case for bpf_spin_lock bpf: use check_ids() for active_lock comparison selftests/bpf: verify states_equal() maintains idmap across all frames bpf: states_equal() must build idmap for all function frames selftests/bpf: test cases for regsafe() bug skipping check_id() bpf: regsafe() must not skip check_ids() docs/bpf: Add documentation for BPF_MAP_TYPE_SK_STORAGE selftests/bpf: Add test for dynptr reinit in user_ringbuf callback bpf: Use memmove for bpf_dynptr_{read,write} bpf: Move PTR_TO_STACK alignment check to process_dynptr_func bpf: Rework check_func_arg_reg_off bpf: Rework process_dynptr_func bpf: Propagate errors from process_* checks in check_func_arg bpf: Refactor ARG_PTR_TO_DYNPTR checks into process_dynptr_func bpf: Skip rcu_barrier() if rcu_trace_implies_rcu_gp() is true bpf: Reuse freed element in free_by_rcu during allocation selftests/bpf: Bring test_offload.py back to life bpf: Fix comment error in fixup_kfunc_call function bpf: Do not zero-extend kfunc return values ... ==================== Link: https://lore.kernel.org/r/20221212024701.73809-1-alexei.starovoitov@gmail.com Signed-off-by: Jakub Kicinski commit 9d33edb20f7e6943250d6bb96ceaf2368f674d51 Merge: f10bc4016803 6132a490f9c8 Author: Linus Torvalds Date: Mon Dec 12 11:21:29 2022 -0800 Merge tag 'irq-core-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "Updates for the interrupt core and driver subsystem: The bulk is the rework of the MSI subsystem to support per device MSI interrupt domains. This solves conceptual problems of the current PCI/MSI design which are in the way of providing support for PCI/MSI[-X] and the upcoming PCI/IMS mechanism on the same device. IMS (Interrupt Message Store] is a new specification which allows device manufactures to provide implementation defined storage for MSI messages (as opposed to PCI/MSI and PCI/MSI-X that has a specified message store which is uniform accross all devices). The PCI/MSI[-X] uniformity allowed us to get away with "global" PCI/MSI domains. IMS not only allows to overcome the size limitations of the MSI-X table, but also gives the device manufacturer the freedom to store the message in arbitrary places, even in host memory which is shared with the device. There have been several attempts to glue this into the current MSI code, but after lengthy discussions it turned out that there is a fundamental design problem in the current PCI/MSI-X implementation. This needs some historical background. When PCI/MSI[-X] support was added around 2003, interrupt management was completely different from what we have today in the actively developed architectures. Interrupt management was completely architecture specific and while there were attempts to create common infrastructure the commonalities were rudimentary and just providing shared data structures and interfaces so that drivers could be written in an architecture agnostic way. The initial PCI/MSI[-X] support obviously plugged into this model which resulted in some basic shared infrastructure in the PCI core code for setting up MSI descriptors, which are a pure software construct for holding data relevant for a particular MSI interrupt, but the actual association to Linux interrupts was completely architecture specific. This model is still supported today to keep museum architectures and notorious stragglers alive. In 2013 Intel tried to add support for hot-pluggable IO/APICs to the kernel, which was creating yet another architecture specific mechanism and resulted in an unholy mess on top of the existing horrors of x86 interrupt handling. The x86 interrupt management code was already an incomprehensible maze of indirections between the CPU vector management, interrupt remapping and the actual IO/APIC and PCI/MSI[-X] implementation. At roughly the same time ARM struggled with the ever growing SoC specific extensions which were glued on top of the architected GIC interrupt controller. This resulted in a fundamental redesign of interrupt management and provided the today prevailing concept of hierarchical interrupt domains. This allowed to disentangle the interactions between x86 vector domain and interrupt remapping and also allowed ARM to handle the zoo of SoC specific interrupt components in a sane way. The concept of hierarchical interrupt domains aims to encapsulate the functionality of particular IP blocks which are involved in interrupt delivery so that they become extensible and pluggable. The X86 encapsulation looks like this: |--- device 1 [Vector]---[Remapping]---[PCI/MSI]--|... |--- device N where the remapping domain is an optional component and in case that it is not available the PCI/MSI[-X] domains have the vector domain as their parent. This reduced the required interaction between the domains pretty much to the initialization phase where it is obviously required to establish the proper parent relation ship in the components of the hierarchy. While in most cases the model is strictly representing the chain of IP blocks and abstracting them so they can be plugged together to form a hierarchy, the design stopped short on PCI/MSI[-X]. Looking at the hardware it's clear that the actual PCI/MSI[-X] interrupt controller is not a global entity, but strict a per PCI device entity. Here we took a short cut on the hierarchical model and went for the easy solution of providing "global" PCI/MSI domains which was possible because the PCI/MSI[-X] handling is uniform across the devices. This also allowed to keep the existing PCI/MSI[-X] infrastructure mostly unchanged which in turn made it simple to keep the existing architecture specific management alive. A similar problem was created in the ARM world with support for IP block specific message storage. Instead of going all the way to stack a IP block specific domain on top of the generic MSI domain this ended in a construct which provides a "global" platform MSI domain which allows overriding the irq_write_msi_msg() callback per allocation. In course of the lengthy discussions we identified other abuse of the MSI infrastructure in wireless drivers, NTB etc. where support for implementation specific message storage was just mindlessly glued into the existing infrastructure. Some of this just works by chance on particular platforms but will fail in hard to diagnose ways when the driver is used on platforms where the underlying MSI interrupt management code does not expect the creative abuse. Another shortcoming of today's PCI/MSI-X support is the inability to allocate or free individual vectors after the initial enablement of MSI-X. This results in an works by chance implementation of VFIO (PCI pass-through) where interrupts on the host side are not set up upfront to avoid resource exhaustion. They are expanded at run-time when the guest actually tries to use them. The way how this is implemented is that the host disables MSI-X and then re-enables it with a larger number of vectors again. That works by chance because most device drivers set up all interrupts before the device actually will utilize them. But that's not universally true because some drivers allocate a large enough number of vectors but do not utilize them until it's actually required, e.g. for acceleration support. But at that point other interrupts of the device might be in active use and the MSI-X disable/enable dance can just result in losing interrupts and therefore hard to diagnose subtle problems. Last but not least the "global" PCI/MSI-X domain approach prevents to utilize PCI/MSI[-X] and PCI/IMS on the same device due to the fact that IMS is not longer providing a uniform storage and configuration model. The solution to this is to implement the missing step and switch from global PCI/MSI domains to per device PCI/MSI domains. The resulting hierarchy then looks like this: |--- [PCI/MSI] device 1 [Vector]---[Remapping]---|... |--- [PCI/MSI] device N which in turn allows to provide support for multiple domains per device: |--- [PCI/MSI] device 1 |--- [PCI/IMS] device 1 [Vector]---[Remapping]---|... |--- [PCI/MSI] device N |--- [PCI/IMS] device N This work converts the MSI and PCI/MSI core and the x86 interrupt domains to the new model, provides new interfaces for post-enable allocation/free of MSI-X interrupts and the base framework for PCI/IMS. PCI/IMS has been verified with the work in progress IDXD driver. There is work in progress to convert ARM over which will replace the platform MSI train-wreck. The cleanup of VFIO, NTB and other creative "solutions" are in the works as well. Drivers: - Updates for the LoongArch interrupt chip drivers - Support for MTK CIRQv2 - The usual small fixes and updates all over the place" * tag 'irq-core-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (134 commits) irqchip/ti-sci-inta: Fix kernel doc irqchip/gic-v2m: Mark a few functions __init irqchip/gic-v2m: Include arm-gic-common.h irqchip/irq-mvebu-icu: Fix works by chance pointer assignment iommu/amd: Enable PCI/IMS iommu/vt-d: Enable PCI/IMS x86/apic/msi: Enable PCI/IMS PCI/MSI: Provide pci_ims_alloc/free_irq() PCI/MSI: Provide IMS (Interrupt Message Store) support genirq/msi: Provide constants for PCI/IMS support x86/apic/msi: Enable MSI_FLAG_PCI_MSIX_ALLOC_DYN PCI/MSI: Provide post-enable dynamic allocation interfaces for MSI-X PCI/MSI: Provide prepare_desc() MSI domain op PCI/MSI: Split MSI-X descriptor setup genirq/msi: Provide MSI_FLAG_MSIX_ALLOC_DYN genirq/msi: Provide msi_domain_alloc_irq_at() genirq/msi: Provide msi_domain_ops:: Prepare_desc() genirq/msi: Provide msi_desc:: Msi_data genirq/msi: Provide struct msi_map x86/apic/msi: Remove arch_create_remap_msi_irq_domain() ... commit 0e2c9884cbbae00f956d881848669790d73be43d Merge: e0a1d1394b22 503fa6d17040 49e62e0d96ba 63cd992e5179 3c79ace9c0d0 Author: Stephen Boyd Date: Mon Dec 12 11:13:28 2022 -0800 Merge branches 'clk-mediatek', 'clk-trace', 'clk-qcom' and 'clk-microchip' into clk-next - Tracepoints for clk_rate_request structures * clk-mediatek: clk: mediatek: fix dependency of MT7986 ADC clocks clk: mediatek: Change PLL register API for MT8186 clk: mediatek: Add new clock driver to handle FHCTL hardware dt-bindings: clock: mediatek: Add new bindings of MediaTek frequency hopping clk: mediatek: Export PLL operations symbols clk: mediatek: mt8186-topckgen: Add GPU clock mux notifier clk: mediatek: mt8186-mfg: Propagate rate changes to parent clk: mediatek: mt8195-topckgen: Drop flags for main/univpll fixed factors clk: mediatek: mt8192: Drop flags for main/univpll fixed factors clk: mediatek: mt6795-topckgen: Drop flags for main/sys/univpll fixed factors clk: mediatek: mt8173: Drop flags for main/sys/univpll fixed factors clk: mediatek: mt8183: Drop flags for sys/univpll fixed factors clk: mediatek: mt8183: Compress top_divs array entries clk: mediatek: mt8186-topckgen: Drop flags for main/univpll fixed factors clk: mediatek: clk-mtk: Allow specifying flags on mtk_fixed_factor clocks * clk-trace: clk: Add trace events for rate requests clk: Store clk_core for clk_rate_request * clk-qcom: (69 commits) clk: qcom: rpmh: add support for SM6350 rpmh IPA clock clk: qcom: mmcc-msm8974: use parent_hws/_data instead of parent_names clk: qcom: mmcc-msm8974: move clock parent tables down clk: qcom: mmcc-msm8974: use ARRAY_SIZE instead of specifying num_parents clk: qcom: gcc-msm8974: use parent_hws/_data instead of parent_names clk: qcom: gcc-msm8974: move clock parent tables down clk: qcom: gcc-msm8974: use ARRAY_SIZE instead of specifying num_parents dt-bindings: clocks: qcom,mmcc: define clocks/clock-names for MSM8974 dt-bindings: clock: split qcom,gcc-msm8974,-msm8226 to the separate file clk: qcom: gcc-ipq4019: switch to devm_clk_notifier_register clk: qcom: rpmh: remove usage of platform name clk: qcom: rpmh: rename VRM clock data clk: qcom: rpmh: rename ARC clock data clk: qcom: rpmh: support separate symbol name for the RPMH clocks clk: qcom: rpmh: remove platform names from BCM clocks clk: qcom: rpmh: drop all _ao names clk: qcom: rpmh: reuse common duplicate clocks clk: qcom: rpmh: group clock definitions together clk: qcom: rpm: drop the platform from clock definitions clk: qcom: rpm: drop the _clk suffix completely ... * clk-microchip: clk: microchip: enable the MPFS clk driver by default if SOC_MICROCHIP_POLARFIRE clk: microchip: check for null return of devm_kzalloc() commit e0a1d1394b220d8083c773d1f208925aa1e0eddf Merge: 83907bf31628 5381dc785312 76c340e93f5a 266162b799a7 5595eabd9993 Author: Stephen Boyd Date: Mon Dec 12 11:13:08 2022 -0800 Merge branches 'clk-spear', 'clk-fract', 'clk-rockchip' and 'clk-imx' into clk-next - Debugfs support for fractional divider clk * clk-spear: clk: spear: Fix SSP clock definition on SPEAr600 clk: spear: Fix CLCD clock definition on SPEAr600 * clk-fract: clk: fractional-divider: Regroup inclusions clk: fractional-divider: Show numerator and denominator in debugfs clk: fractional-divider: Split out clk_fd_get_div() helper * clk-rockchip: clk: rockchip: Fix memory leak in rockchip_clk_register_pll() clk: rockchip: add clock controller for the RK3588 clk: rockchip: add lookup table support clk: rockchip: simplify rockchip_clk_add_lookup clk: rockchip: allow additional mux options for cpu-clock frequency changes clk: rockchip: add pll type for RK3588 clk: rockchip: add register offset of the cores select parent dt-bindings: clock: add rk3588 cru bindings dt-bindings: reset: add rk3588 reset definitions dt-bindings: clock: add rk3588 clock definitions clk: rockchip: use proper crypto0 name on rk3399 * clk-imx: clk: imx: rename imx_obtain_fixed_clk_hw() to imx_get_clk_hw_by_name() clk: imx8mn: fix imx8mn_enet_phy_sels clocks list clk: imx8mn: fix imx8mn_sai2_sels clocks list clk: imx: rename video_pll1 to video_pll clk: imx: replace osc_hdmi with dummy clk: imx8mn: rename vpu_pll to m7_alt_pll clk: imx: imxrt1050: add IMXRT1050_CLK_LCDIF_PIX clock gate clk: imx: imxrt1050: fix IMXRT1050_CLK_LCDIF_APB offsets clk: imx8mp: Add audio shared gate dt-bindings: clock: imx8mp: Add ids for the audio shared gate clk: imx: pll14xx: Add 320 MHz and 640 MHz entries for PLL146x clk: imx93: keep sys ctr clock always on clk: imx: keep hsio bus clock always on clk: imx93: drop tpm1/3, lpit1/2 clk dt-bindings: clock: imx93: drop TPM1/3 LPIT1/2 entry clk: imx93: correct enet clock clk: imx93: unmap anatop base in error handling path clk: imx: imx8mp: add shared clk gate for usb suspend clk dt-bindings: clocks: imx8mp: Add ID for usb suspend clock clk: imx93: correct the flexspi1 clock setting commit 83907bf316287ad9b888e1661d34c6ed0b3313f2 Merge: a9fc882f5762 687daae7941c 01e6bf9921ee d0b1c69288cf 9f8e30559b04 53949843d30c Author: Stephen Boyd Date: Mon Dec 12 11:12:52 2022 -0800 Merge branches 'clk-bindings', 'clk-renesas', 'clk-amlogic', 'clk-allwinner' and 'clk-ti' into clk-next * clk-bindings: dt-bindings: clock: ti,cdce925: Convert to DT schema * clk-renesas: (26 commits) clk: renesas: r8a779f0: Fix Ethernet Switch clocks clk: renesas: r8a779g0: Add Z0 clock support clk: renesas: r8a779g0: Add CMT clocks clk: renesas: r8a779g0: Add TMU and SASYNCRT clocks clk: renesas: r8a779f0: Fix SCIF parent clocks clk: renesas: r8a779f0: Fix HSCIF parent clocks clk: renesas: r9a06g032: Repair grave increment error clk: renesas: rzg2l: Don't assume all CPG_MOD clocks support PM clk: renesas: rzg2l: Fix typo in struct rzg2l_cpg_priv kerneldoc clk: renesas: r8a779a0: Fix SD0H clock name clk: renesas: r8a779g0: Add RPC-IF clock clk: renesas: r8a779g0: Add SDHI clocks clk: renesas: r8a779f0: Add SASYNCPER internal clock clk: renesas: r8a779f0: Fix SD0H clock name clk: renesas: r9a07g043: Drop WDT2 clock and reset entry clk: renesas: r9a07g044: Drop WDT2 clock and reset entry clk: renesas: r8a779g0: Add TPU clock clk: renesas: r8a779g0: Add PWM clock clk: renesas: r8a779g0: Add SCIF clocks clk: renesas: r9a07g044: Add MTU3a clock and reset entry ... * clk-amlogic: clk: meson: pll: add pcie lock retry workaround clk: meson: pll: adjust timeout in meson_clk_pll_wait_lock() * clk-allwinner: clk: sunxi-ng: f1c100s: Add IR mod clock clk: sunxi-ng: v3s: Correct the header guard of ccu-sun8i-v3s.h * clk-ti: clk: ti: fix typo in ti_clk_retry_init() code comment clk: ti: dra7-atl: don't allocate `parent_names' variable clk: ti: change ti_clk_register[_omap_hw]() API commit a9fc882f57625761252169c62b19e99578531a9e Merge: 830b3c68c1fb 7256d1f4618b 2875a2f3f183 5e57aaa8b6ec fadbafc1b7b7 ff0d3ae04f73 Author: Stephen Boyd Date: Mon Dec 12 11:12:26 2022 -0800 Merge branches 'clk-x86', 'clk-xilinx', 'clk-cleanup', 'clk-mstar' and 'clk-ingenic' into clk-next - Make MxL's CGU driver secure compatible - Support for CPU PLL on MStar/SigmaStar SoCs - Ingenic JZ4755 SoC clk support - Support audio clks on X1000 SoCs * clk-x86: clk: mxl: syscon_node_to_regmap() returns error pointers clk: mxl: Fix a clk entry by adding relevant flags clk: mxl: Add option to override gate clks clk: mxl: Remove redundant spinlocks clk: mxl: Switch from direct readl/writel based IO to regmap based IO * clk-xilinx: clk: xilinx: Drop duplicate depends on COMMON_CLK * clk-cleanup: clk: nomadik: correct struct name kernel-doc warning clk: lmk04832: fix kernel-doc warnings clk: lmk04832: drop superfluous #include clk: lmk04832: drop unnecessary semicolons clk: lmk04832: declare variables as const when possible clk: socfpga: Fix memory leak in socfpga_gate_init() clk: st: Fix memory leak in st_of_quadfs_setup() clk: samsung: Fix memory leak in _samsung_clk_register_pll() clk: visconti: Fix memory leak in visconti_register_pll() clk: Remove a useless include clk: samsung: Fix reference to CLK_OF_DECLARE in comment clk: stm32mp1: Staticize ethrx_src clk: keystone: syscon-clk: Use dev_err_probe() helper clk: bulk: Use dev_err_probe() helper in __clk_bulk_get() clk: cdce925: simplify using devm_regulator_get_enable() * clk-mstar: clk: mstar: msc313 cpupll clk driver * clk-ingenic: clk: Add Ingenic JZ4755 CGU driver dt-bindings: clock: Add Ingenic JZ4755 CGU header dt-bindings: ingenic: Add support for the JZ4755 CGU clk: ingenic: Minor cosmetic fixups for X1000 clk: ingenic: Add X1000 audio clocks dt-bindings: ingenic,x1000-cgu: Add audio clocks clk: ingenic: Add .set_rate_hook() for PLL clocks clk: ingenic: Make PLL clock enable_bit and stable_bit optional clk: ingenic: Make PLL clock "od" field optional commit f10bc40168032962ebee26894bdbdc972cde35bf Merge: 9c2b840a3b44 c4db2d3b70e5 Author: Linus Torvalds Date: Mon Dec 12 11:11:57 2022 -0800 Merge tag 'core-debugobjects-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects update from Thomas Gleixner: "A single update for debugobjects: Add the object pointer to the debug output for better correlation with other debug facilities" * tag 'core-debugobjects-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Print object pointer in debug_print_object() commit 9c2b840a3b446ec2a7fc1cfb68af481905ec6f5f Merge: 47477c84b891 45be2ad007a9 Author: Linus Torvalds Date: Mon Dec 12 11:10:02 2022 -0800 Merge tag 'x86-urgent-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Three small x86 fixes which did not make it into 6.1: - Remove a superfluous noinline which prevents GCC-7.3 to optimize a stub function away - Allow uprobes on REP NOP and do not treat them like word-sized branch instructions - Make the VDSO symbol export of __vdso_sgx_enter_enclave() depend on CONFIG_X86_SGX to prevent build failures with newer LLVM versions which rightfully detect that there is no function behind the symbol" * tag 'x86-urgent-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Conditionally export __vdso_sgx_enter_enclave() uprobes/x86: Allow to probe a NOP instruction with 0x66 prefix x86/alternative: Remove noinline from __ibt_endbr_seal[_end]() stubs commit 73740235a68d61f5eaee2425a0baaf610f4e4b17 Merge: 0612d748003c 44fda61d2bcf Author: Mark Brown Date: Mon Dec 12 19:10:01 2022 +0000 ASoC: SOF: remove unregister calls from shutdown Merge series from Kai Vehmanen : This patchset is an alternative solution to problems reported by Ricardo Ribalda and Zhen Ni , as discussed in - "[PATCH] ALSA: core: Fix deadlock when shutdown a frozen userspace" https://mailman.alsa-project.org/pipermail/alsa-devel/2022-November/209248.html - "[PATCH] ASoc: SOF: Fix sof-audio-pci-intel-tgl shutdown timeout during hibernation" https://mailman.alsa-project.org/pipermail/alsa-devel/2022-December/209685.html It was raised by Oliver Neukum that kernel should not let user-space stall the shutdown process in any scenario and the unregister call in current SOF shutdown code is not right. This series reverts the ASoC SOF patch to unregister clients and the machine drivers at shutdown. To avoid bringing back old bugs, the series includes a patch to fix S5 entry on certain Intel platforms. commit f7f291e14dde32a07b1f0aa06921d28f875a7b54 Author: Paulo Alcantara Date: Sun Dec 11 18:18:55 2022 -0300 cifs: fix oops during encryption When running xfstests against Azure the following oops occurred on an arm64 system Unable to handle kernel write to read-only memory at virtual address ffff0001221cf000 Mem abort info: ESR = 0x9600004f EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x0f: level 3 permission fault Data abort info: ISV = 0, ISS = 0x0000004f CM = 0, WnR = 1 swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000294f3000 [ffff0001221cf000] pgd=18000001ffff8003, p4d=18000001ffff8003, pud=18000001ff82e003, pmd=18000001ff71d003, pte=00600001221cf787 Internal error: Oops: 9600004f [#1] PREEMPT SMP ... pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--) pc : __memcpy+0x40/0x230 lr : scatterwalk_copychunks+0xe0/0x200 sp : ffff800014e92de0 x29: ffff800014e92de0 x28: ffff000114f9de80 x27: 0000000000000008 x26: 0000000000000008 x25: ffff800014e92e78 x24: 0000000000000008 x23: 0000000000000001 x22: 0000040000000000 x21: ffff000000000000 x20: 0000000000000001 x19: ffff0001037c4488 x18: 0000000000000014 x17: 235e1c0d6efa9661 x16: a435f9576b6edd6c x15: 0000000000000058 x14: 0000000000000001 x13: 0000000000000008 x12: ffff000114f2e590 x11: ffffffffffffffff x10: 0000040000000000 x9 : ffff8000105c3580 x8 : 2e9413b10000001a x7 : 534b4410fb86b005 x6 : 534b4410fb86b005 x5 : ffff0001221cf008 x4 : ffff0001037c4490 x3 : 0000000000000001 x2 : 0000000000000008 x1 : ffff0001037c4488 x0 : ffff0001221cf000 Call trace: __memcpy+0x40/0x230 scatterwalk_map_and_copy+0x98/0x100 crypto_ccm_encrypt+0x150/0x180 crypto_aead_encrypt+0x2c/0x40 crypt_message+0x750/0x880 smb3_init_transform_rq+0x298/0x340 smb_send_rqst.part.11+0xd8/0x180 smb_send_rqst+0x3c/0x100 compound_send_recv+0x534/0xbc0 smb2_query_info_compound+0x32c/0x440 smb2_set_ea+0x438/0x4c0 cifs_xattr_set+0x5d4/0x7c0 This is because in scatterwalk_copychunks(), we attempted to write to a buffer (@sign) that was allocated in the stack (vmalloc area) by crypt_message() and thus accessing its remaining 8 (x2) bytes ended up crossing a page boundary. To simply fix it, we could just pass @sign kmalloc'd from crypt_message() and then we're done. Luckily, we don't seem to pass any other vmalloc'd buffers in smb_rqst::rq_iov... Instead, let's map the correct pages and offsets from vmalloc buffers as well in cifs_sg_set_buf() and then avoiding such oopses. Signed-off-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Signed-off-by: Steve French fs/cifs/cifsglob.h | 68 +++++++++++++++++++++++++ fs/cifs/cifsproto.h | 4 +- fs/cifs/misc.c | 4 +- fs/cifs/smb2ops.c | 143 +++++++++++++++++++++++++--------------------------- 4 files changed, 140 insertions(+), 79 deletions(-) commit 9d91f8108ebfed54284332e04d2073107df18794 Author: Steve French Date: Sun Dec 11 14:44:31 2022 -0600 cifs: print warning when conflicting soft vs. hard mount options specified If the user specifies conflicting hard vs. soft mount options (or nosoft vs. nohard) print a warning to dmesg We were missing a warning when a user e.g. mounted with both "hard,soft" mount options. Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/fs_context.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 2bfd81043e944af0e52835ef6d9b41795af22341 Author: Steve French Date: Sun Dec 11 13:54:21 2022 -0600 cifs: fix missing display of three mount options Three mount options: "tcpnodelay" and "noautotune" and "noblocksend" were not displayed when passed in on cifs/smb3 mounts (e.g. displayed in /proc/mounts e.g.). No change to defaults so these are not displayed if not specified on mount. Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifsfs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9544597b5b63ff1674d60e069f93555ab924b62b Author: Steve French Date: Fri Dec 9 16:55:51 2022 -0600 cifs: fix various whitespace errors in headers Fix some extra spaces and a few comments that were unnecessarily split over two lines. These were some trivial issues pointed out by checkpatch) Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/cifspdu.h | 50 +++++++++++++++++++++----------------------------- fs/cifs/cifsproto.h | 2 +- 2 files changed, 22 insertions(+), 30 deletions(-) commit c19204cbd65c12fdcd34fb8f5d645007238ed5cd Author: Steve French Date: Thu Dec 8 16:11:00 2022 -0600 cifs: minor cleanup of some headers checkpatch showed formatting problems with extra spaces, and extra semicolon and some missing blank lines in some cifs headers. Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Germano Percossi Signed-off-by: Steve French fs/cifs/cifs_ioctl.h | 2 +- fs/cifs/cifsfs.h | 4 ++-- fs/cifs/cifsglob.h | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) commit 47477c84b8914525b427bccbdcded0cf0086f2a1 Merge: 49d07f010c7c bb3860cc02c6 Author: Linus Torvalds Date: Mon Dec 12 11:04:08 2022 -0800 Merge tag 's390-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Alexander Gordeev: - Factor out handle_write() function and simplify 3215 console write operation - When 3170 terminal emulator is connected to the 3215 console driver the boot time could be very long due to limited buffer space or missing operator input. Add con3215_drop command line parameter and con3215_drop sysfs attribute file to instruct the kernel drop console data when such conditions are met - Fix white space errors in 3215 console driver - Move enum paiext_mode definition to a header file and rename it to paievt_mode to indicate this is now used for several events. Rename PAI_MODE_COUNTER to PAI_MODE_COUNTING to make consistent with PAI_MODE_SAMPLING - Simplify the logic of PMU pai_crypto mapped buffer reference counter and make it consistent with PMU pai_ext - Rename PMU pai_crypto mapped buffer structure member users to active_events to make it consistent with PMU pai_ext - Enable HUGETLB_PAGE_OPTIMIZE_VMEMMAP configuration option. This results in saving of 12K per 1M hugetlb page (~1.2%) and 32764K per 2G hugetlb page (~1.6%) - Use generic serial.h, bugs.h, shmparam.h and vga.h header files and scrap s390-specific versions - The generic percpu setup code does not expect the s390-like implementation and emits a warning. To get rid of that warning and provide sane CPU-to-node and CPU-to-CPU distance mappings implementat a minimal version of setup_per_cpu_areas() - Use kstrtobool() instead of strtobool() for re-IPL sysfs device attributes - Avoid unnecessary lookup of a pointer to MSI descriptor when setting IRQ affinity for a PCI device - Get rid of "an incompatible function type cast" warning by changing debug_sprintf_format_fn() function prototype so it matches the debug_format_proc_t function type - Remove unused info_blk_hdr__pcpus() and get_page_state() functions - Get rid of clang "unused unused insn cache ops function" warning by moving s390_insn definition to a private header - Get rid of clang "unused function" warning by making function raw3270_state_final() only available if CONFIG_TN3270_CONSOLE is enabled - Use kstrobool() to parse sclp_con_drop parameter to make it identical to the con3215_drop parameter and allow passing values like "yes" and "true" - Use sysfs_emit() for all SCLP sysfs show functions, which is the current standard way to generate output strings - Make SCLP con_drop sysfs attribute also writable and allow to change its value during runtime. This makes SCLP console drop handling consistent with the 3215 device driver - Virtual and physical addresses are indentical on s390. However, there is still a confusion when pointers are directly casted to physical addresses or vice versa. Use correct address converters virt_to_phys() and phys_to_virt() for s390 channel IO drivers - Support for power managemant has been removed from s390 since quite some time. Remove unused power managemant code from the appldata device driver - Allow memory tools like KASAN see memory accesses from the checksum code. Switch to GENERIC_CSUM if KASAN is enabled, just like x86 does - Add support of ECKD DASDs disks so it could be used as boot and dump devices - Follow checkpatch recommendations and use octal values instead of S_IRUGO and S_IWUSR for dump device attributes in sysfs - Changes to vx-insn.h do not cause a recompile of C files that use asm(".include \"asm/vx-insn.h\"\n") magic to access vector instruction macros from inline assemblies. Add wrapper include header file to avoid this problem - Use vector instruction macros instead of byte patterns to increase register validation routine readability - The current machine check register validation handling does not take into account various scenarios and might lead to killing a wrong user process or potentially ignore corrupted FPU registers. Simplify logic of the machine check handler and stop the whole machine if the previous context was kerenel mode. If the previous context was user mode, kill the current task - Introduce sclp_emergency_printk() function which can be used to emit a message in emergency cases. It is supposed to be used in cases where regular console device drivers may not work anymore, e.g. unrecoverable machine checks Keep the early Service-Call Control Block so it can also be used after initdata has been freed to allow sclp_emergency_printk() implementation - In case a system will be stopped because of an unrecoverable machine check error print the machine check interruption code to give a hint of what went wrong - Move storage error checking from the assembly entry code to C in order to simplify machine check handling. Enter the handler with DAT turned on, which simplifies the entry code even more - The machine check extended save areas are allocated using a private "nmi_save_areas" slab cache which guarantees a required power-of-two alignment. Get rid of that cache in favour of kmalloc() * tag 's390-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (38 commits) s390/nmi: get rid of private slab cache s390/nmi: move storage error checking back to C, enter with DAT on s390/nmi: print machine check interruption code before stopping system s390/sclp: introduce sclp_emergency_printk() s390/sclp: keep sclp_early_sccb s390/nmi: rework register validation handling s390/nmi: use vector instruction macros instead of byte patterns s390/vx: add vx-insn.h wrapper include file s390/ipl: use octal values instead of S_* macros s390/ipl: add eckd dump support s390/ipl: add eckd support vfio/ccw: identify CCW data addresses as physical vfio/ccw: sort out physical vs virtual pointers usage s390/checksum: support GENERIC_CSUM, enable it for KASAN s390/appldata: remove power management callbacks s390/cio: sort out physical vs virtual pointers usage s390/sclp: allow to change sclp_console_drop during runtime s390/sclp: convert to use sysfs_emit() s390/sclp: use kstrobool() to parse sclp_con_drop parameter s390/3270: make raw3270_state_final() depend on CONFIG_TN3270_CONSOLE ... commit 49d07f010c7c6b09ea2c2ebca67b83b38afa5faf Merge: 5977aa66c47f 553b20b211c4 Author: Linus Torvalds Date: Mon Dec 12 11:02:19 2022 -0800 Merge tag 'm68k-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - remove an unused function involving a non-explictly signed char type - reword a (correct) comment to stop the inflood of (incorrect) patches trying to fix it - defconfig updates * tag 'm68k-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: defconfig: Update defconfigs for v6.1-rc1 m68k: mac: Reword comment using double "in" m68k: mac: Remove unused rbv_set_video_bpp() commit 5977aa66c47f8e9629e88f1e983951a09801ccef Merge: e6b160bc4daa 4c587a982603 Author: Linus Torvalds Date: Mon Dec 12 10:59:13 2022 -0800 Merge tag 'mips_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - DT cleanups - fix for early use of kzalloc on mt7621 platform - cleanups and fixes * tag 'mips_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (21 commits) MIPS: OCTEON: warn only once if deprecated link status is being used MIPS: BCM63xx: Add check for NULL for clk in clk_enable platform/mips: Adjust Kconfig to keep consistency MIPS: OCTEON: cvmx-bootmem: use strscpy() to instead of strncpy() MIPS: mscc: jaguar2: Fix pca9545 i2c-mux node names mips/pci: use devm_platform_ioremap_resource() mips: ralink: mt7621: do not use kzalloc too early mips: ralink: mt7621: soc queries and tests as functions mips: ralink: mt7621: define MT7621_SYSC_BASE with __iomem MIPS: Restore symbol versions for copy_page_cpu and clear_page_cpu mips: dts: remove label = "cpu" from DSA dt-binding mips: ralink: mt7621: change DSA port labels to generic naming mips: ralink: mt7621: fix phy-mode of external phy on GB-PC2 MIPS: vpe-cmp: fix possible memory leak while module exiting MIPS: vpe-mt: fix possible memory leak while module exiting dt-bindings: mips: brcm: add Broadcom SoCs bindings dt-bindings: mips: add CPU bindings for MIPS architecture mips: dts: brcm: bcm7435: add "interrupt-names" for NAND controller mips: dts: bcm63268: add TWD block timer MIPS: Use "grep -E" instead of "egrep" ... commit 1c0908d8e441631f5b8ba433523cf39339ee2ba0 Author: Mel Gorman Date: Fri Dec 2 10:02:23 2022 +0000 rtmutex: Add acquire semantics for rtmutex lock acquisition slow path Jan Kara reported the following bug triggering on 6.0.5-rt14 running dbench on XFS on arm64. kernel BUG at fs/inode.c:625! Internal error: Oops - BUG: 0 [#1] PREEMPT_RT SMP CPU: 11 PID: 6611 Comm: dbench Tainted: G E 6.0.0-rt14-rt+ #1 pc : clear_inode+0xa0/0xc0 lr : clear_inode+0x38/0xc0 Call trace: clear_inode+0xa0/0xc0 evict+0x160/0x180 iput+0x154/0x240 do_unlinkat+0x184/0x300 __arm64_sys_unlinkat+0x48/0xc0 el0_svc_common.constprop.4+0xe4/0x2c0 do_el0_svc+0xac/0x100 el0_svc+0x78/0x200 el0t_64_sync_handler+0x9c/0xc0 el0t_64_sync+0x19c/0x1a0 It also affects 6.1-rc7-rt5 and affects a preempt-rt fork of 5.14 so this is likely a bug that existed forever and only became visible when ARM support was added to preempt-rt. The same problem does not occur on x86-64 and he also reported that converting sb->s_inode_wblist_lock to raw_spinlock_t makes the problem disappear indicating that the RT spinlock variant is the problem. Which in turn means that RT mutexes on ARM64 and any other weakly ordered architecture are affected by this independent of RT. Will Deacon observed: "I'd be more inclined to be suspicious of the slowpath tbh, as we need to make sure that we have acquire semantics on all paths where the lock can be taken. Looking at the rtmutex code, this really isn't obvious to me -- for example, try_to_take_rt_mutex() appears to be able to return via the 'takeit' label without acquire semantics and it looks like we might be relying on the caller's subsequent _unlock_ of the wait_lock for ordering, but that will give us release semantics which aren't correct." Sebastian Andrzej Siewior prototyped a fix that does work based on that comment but it was a little bit overkill and added some fences that should not be necessary. The lock owner is updated with an IRQ-safe raw spinlock held, but the spin_unlock does not provide acquire semantics which are needed when acquiring a mutex. Adds the necessary acquire semantics for lock owner updates in the slow path acquisition and the waiter bit logic. It successfully completed 10 iterations of the dbench workload while the vanilla kernel fails on the first iteration. [ bigeasy@linutronix.de: Initial prototype fix ] Fixes: 700318d1d7b38 ("locking/rtmutex: Use acquire/release semantics") Fixes: 23f78d4a03c5 ("[PATCH] pi-futex: rt mutex core") Reported-by: Jan Kara Signed-off-by: Mel Gorman Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221202100223.6mevpbl7i6x5udfd@techsingularity.net kernel/locking/rtmutex.c | 55 ++++++++++++++++++++++++++++++++++++-------- kernel/locking/rtmutex_api.c | 6 ++--- 2 files changed, 49 insertions(+), 12 deletions(-) commit e6b160bc4daa1227695ef807e11097a3e9934d66 Merge: 0ec5a38bf849 8b997b2bb2c5 Author: Linus Torvalds Date: Mon Dec 12 10:55:53 2022 -0800 Merge tag 'for-linus-6.2-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - fix memory leaks in error paths - add support for virtio PCI-devices in Xen guests on ARM - two minor fixes * tag 'for-linus-6.2-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource() x86/xen: Fix memory leak in xen_init_lock_cpu() x86/xen: Fix memory leak in xen_smp_intr_init{_pv}() xen: fix xen.h build for CONFIG_XEN_PVH=y xen/virtio: Handle PCI devices which Host controller is described in DT xen/virtio: Optimize the setup of "xen-grant-dma" devices commit 0ec5a38bf8499f403f81cb81a0e3a60887d1993c Merge: 7a76117f9fa5 9a8aadcf0b45 Author: Linus Torvalds Date: Mon Dec 12 10:51:55 2022 -0800 Merge tag 'tag-chrome-platform-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Tzung-Bi Shih: "New drivers - Driver for ChromeOS human presence sensor Cleanups: - Add missing property in dt-binding example. - Update the availability of properties in dt-binding. - Separate dt-binding for ChromeOS fingerprint sensor. Improvements: - Set PROBE_PREFER_ASYNCHRONOUS for some drivers for shortening boot time. Fixes: - Fix an use-after-free in cros_ec_typec. And minor fixes and cleanups" * tag 'tag-chrome-platform-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: cros_ec_typec: zero out stale pointers platform/chrome: cros_usbpd_notify: Fix error handling in cros_usbpd_notify_init() platform/chrome: cros_ec: Convert to i2c's .probe_new() platform/chrome: cros_ec_lpc: Force synchronous probe platform/chrome: cros_ec_spi: Set PROBE_PREFER_ASYNCHRONOUS platform/chrome: cros_ec_lightbar: Set PROBE_PREFER_ASYNCHRONOUS platform/chrome: cros_ec_debugfs: Set PROBE_PREFER_ASYNCHRONOUS platform/chrome: cros_ec_lpc: Mark PROBE_PREFER_ASYNCHRONOUS platform/chrome: cros_ec_lpc: Move mec_init to device probe platform/chrome: Use kstrtobool() instead of strtobool() platform/chrome: cros_ec_lpc_mec: remove cros_ec_lpc_mec_destroy() dt-bindings: cros-ec: Add ChromeOS fingerprint binding dt-bindings: cros-ec: Reorganize and enforce property availability platform/chrome: cros_hps_i2c: make remove callback return void platform/chrome: add a driver for HPS commit 7a76117f9fa52afcf244d4f1b8d4ce92f3e5ef99 Merge: 01f3cbb296a9 b0b698b80c56 Author: Linus Torvalds Date: Mon Dec 12 10:47:10 2022 -0800 Merge tag 'platform-drivers-x86-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: - Intel: - PMC: Add support for Meteor Lake - Intel On Demand: various updates - Ideapad-laptop: - Add support for various Fn keys on new models - Fix touchpad on/off handling in a generic way to avoid having to add more and more quirks - Android x86 tablets: - Add support for two more X86 Android tablet models - New Dell WMI DDV driver - Miscellaneous cleanups and small bugfixes * tag 'platform-drivers-x86-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (52 commits) platform/mellanox: mlxbf-pmc: Fix event typo platform/x86: intel_scu_ipc: fix possible name leak in __intel_scu_ipc_register() platform/x86: sony-laptop: Convert to use sysfs_emit_at() API platform/x86/dell: alienware-wmi: Use sysfs_emit() instead of scnprintf() platform/x86: uv_sysfs: Use sysfs_emit() instead of scnprintf() platform/x86: mxm-wmi: fix memleak in mxm_wmi_call_mx[ds|mx]() platform/x86: x86-android-tablets: Add Advantech MICA-071 extra button platform/x86: x86-android-tablets: Add Lenovo Yoga Tab 3 (YT3-X90F) charger + fuel-gauge data platform/x86: x86-android-tablets: Add Medion Lifetab S10346 data platform/x86: wireless-hotkey: use ACPI HID as phys platform/x86/intel/hid: Add module-params for 5 button array + SW_TABLET_MODE reporting platform/x86: ideapad-laptop: Make touchpad_ctrl_via_ec a module option platform/x86: ideapad-laptop: Stop writing VPCCMD_W_TOUCHPAD at probe time platform/x86: ideapad-laptop: Send KEY_TOUCHPAD_TOGGLE on some models platform/x86: ideapad-laptop: Only toggle ps2 aux port on/off on select models platform/x86: ideapad-laptop: Do not send KEY_TOUCHPAD* events on probe / resume platform/x86: ideapad-laptop: Refactor ideapad_sync_touchpad_state() tools/arch/x86: intel_sdsi: Add support for reading meter certificates tools/arch/x86: intel_sdsi: Add support for new GUID tools/arch/x86: intel_sdsi: Read more On Demand registers ... commit e291c116f60f3c1ca98090f0f8e7c77e658562fb Merge: 8c9a59939deb c3991107a28a Author: Dmitry Torokhov Date: Mon Dec 12 10:47:03 2022 -0800 Merge branch 'next' into for-linus Prepare input updates for 6.2 merge window. commit 01f3cbb296a9ad378167c01758c99557b5bc3208 Merge: 8e17b16a2c13 c83ce312081c Author: Linus Torvalds Date: Mon Dec 12 10:21:03 2022 -0800 Merge tag 'soc-dt-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC DT updates from Arnd Bergmann: "The devicetree changes contain exactly 1000 non-merge changesets, including a number of new arm64 SoC variants from Qualcomm and Apple, as well as the Renesas r9a07g043f/u chip in both arm64 and riscv variants. While we have occasionally merged support for non-arm SoCs in the past, this is now the normal path for riscv devicetree files. The most notable changes, by SoC platform, are: - The Apple T6000 (M1 Pro), T6001 (M1 Max) and T6002 (M1 Ultra) chips now have initial support. This is particularly nice as I am typing this on a T6002 Mac Studio with only a small number of driver patches. - Qualcomm MSM8996 Pro (Snapdragon 821), SM6115 (Snapdragon 662), SM4250 (Snapdragon 460), SM6375 (Snapdragon 695), SDM670 (Snapdragon 670), MSM8976 (Snapdragon 652) and MSM8956 (Snapdragon 650) are all mobile phone chips that are closely related to others we already support. Adding those helps support more phones and we add several models from Sony (Xperia 10 IV, 5 IV, X, and X compact), OnePlus (One, 3, 3T, and Nord N100), Xiaomi (Poco F1, Mi6), Huawei (Watch) and Google (Pixel 3a). There are also new variants of the Herobrine and Trogdor chromebook motherboards. SA8540P is an automotive SoC used in the Qdrive-3 development platform - Rockchips gains no new SoC variants, but a lot of new boards: three mobile gaming systems based on RK3326 Odroid-Go/rg351 family, two more Anbernic gaming systems based on RK3566 and a number of other RK356x based single-board computers. - Renesas RZ/G2UL (r9a07g043) was already supported for arm64, but as the newly added RZ/Five is based on the same design, this now gets reorganized in order to share most of the dts description between the two and add the RZ/Five SMARC EVK board support. Aside from that, there are the usual changes all over the tree: - New boards on other platforms contain two ASpeed BMC users, two Broadcom based Wifi routers, Zyxel NSA310S NAS, the i.MX6 based Kobo Aura2 ebook reader, two i.MX8 based development boards, two Uniphier Pro5 development boards, the STM32MP1 testbench board from DHCOR, the TI K3 based BeagleBone AI-64 board, and the Mediatek Helio X10 based Sony Xperia M5 phone. - The Starfive JH7100 source gets reorganized in order to support the VisionFive V1 board. - Minor updates and cleanups for Intel SoCFPGA, Marvell PXA168, TI, ST, NXP, Apple, Broadcom, Juno, Marvell MVEBU, at91, nuvoton, Tegra, Mediatek, Renesas, Hisilicon, Allwinner, Samsung, ux500, spear, ... The treewide cleanups now have a lot of fixes for cache nodes and other binding violoations. - Somewhat larger sets of reworks for NVIDIA Tegra, Qualcomm and Renesas platforms, adding a lot more on-chip device support - A rework of the way that DTB overlays are built" * tag 'soc-dt-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (979 commits) arm64: dts: apple: t6002: Fix GPU power domains arm64: dts: apple: t600x-pmgr: Fix search & replace typo arm64: dts: apple: Add t8103 L1/L2 cache properties and nodes arm64: dts: apple: Rename dart-sio* to sio-dart* arch: arm64: apple: t600x: Use standard "iommu" node name arch: arm64: apple: t8103: Use standard "iommu" node name ARM: dts: socfpga: Fix pca9548 i2c-mux node name dt-bindings: iio: adc: qcom,spmi-vadc: fix PM8350 define dt-bindings: iio: adc: qcom,spmi-vadc: extend example arm64: dts: qcom: sc8280xp: fix UFS DMA coherency arm64: dts: qcom: sc7280: Add DT for sc7280-herobrine-zombie arm64: dts: qcom: sm8250-sony-xperia-edo: fix no-mmc property for SDHCI arm64: dts: qcom: sdm845-sony-xperia-tama: fix no-mmc property for SDHCI arm64: dts: qcom: sda660-inforce-ifc6560: fix no-mmc property for SDHCI arm64: dts: qcom: sa8155p-adp: fix no-mmc property for SDHCI arm64: dts: qcom: qrb5165-rb: fix no-mmc property for SDHCI arm64: dts: qcom: sm8450: align MMC node names with dtschema arm64: dts: qcom: sc7180-trogdor: use generic node names arm64: dts: qcom: sm8450-hdk: add sound support arm64: dts: qcom: sm8450: add Soundwire and LPASS ... commit 8e17b16a2c13406c56a4d292df3ca083f8729666 Merge: 69700db4212a 9379885d07c4 Author: Linus Torvalds Date: Mon Dec 12 10:17:08 2022 -0800 Merge tag 'soc-drivers-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC driver updates from Arnd Bergmann: "There are few major updates in the SoC specific drivers, mainly the usual reworks and support for variants of the existing SoC. While this remains Arm centric for the most part, the branch now also contains updates to risc-v and loongarch specific code in drivers/soc/. Notable changes include: - Support for the newly added Qualcomm Snapdragon variants (MSM8956, MSM8976, SM6115, SM4250, SM8150, SA8155 and SM8550) in the soc ID, rpmh, rpm, spm and powerdomain drivers. - Documentation for the somewhat controversial qcom,board-id properties that are required for booting a number of machines - A new SoC identification driver for the loongson-2 (loongarch) platform - memory controller updates for stm32, tegra, and renesas. - a new DT binding to better describe LPDDR2/3/4/5 chips in the memory controller subsystem - Updates for Tegra specific drivers across multiple subsystems, improving support for newer SoCs and better identification - Minor fixes for Broadcom, Freescale, Apple, Renesas, Sifive, TI, Mediatek and Marvell SoC drivers" * tag 'soc-drivers-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (137 commits) soc: qcom: socinfo: Add SM6115 / SM4250 SoC IDs to the soc_id table dt-bindings: arm: qcom,ids: Add SoC IDs for SM6115 / SM4250 and variants soc: qcom: socinfo: Add SM8150 and SA8155 SoC IDs to the soc_id table dt-bindings: arm: qcom,ids: Add SoC IDs for SM8150 and SA8155 dt-bindings: soc: qcom: apr: document generic qcom,apr compatible soc: qcom: Select REMAP_MMIO for ICC_BWMON driver soc: qcom: Select REMAP_MMIO for LLCC driver soc: qcom: rpmpd: Add SM4250 support dt-bindings: power: rpmpd: Add SM4250 support dt-bindings: soc: qcom: aoss: Add compatible for SM8550 soc: qcom: llcc: Add configuration data for SM8550 dt-bindings: arm: msm: Add LLCC compatible for SM8550 soc: qcom: llcc: Add v4.1 HW version support soc: qcom: socinfo: Add SM8550 ID soc: qcom: rpmh-rsc: Avoid unnecessary checks on irq-done response soc: qcom: rpmh-rsc: Add support for RSC v3 register offsets soc: qcom: rpmhpd: Add SM8550 power domains dt-bindings: power: rpmpd: Add SM8550 to rpmpd binding soc: qcom: socinfo: Add MSM8956/76 SoC IDs to the soc_id table dt-bindings: arm: qcom,ids: Add SoC IDs for MSM8956 and MSM8976 ... commit 68c62bee9d081cf815310b3a96e38d94fc16007d Author: Xiubo Li Date: Mon Oct 17 22:17:35 2022 +0800 ceph: try to check caps immediately after async creating finishes We should call the check_caps() again immediately after the async creating finishes in case the MDS is waiting for caps revocation to finish. Link: https://tracker.ceph.com/issues/46904 Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 2 ++ fs/ceph/file.c | 9 +++++++++ fs/ceph/super.h | 2 ++ 3 files changed, 13 insertions(+) commit e4b731ccb0975fd97283e0c0d9841a89063ec31a Author: Xiubo Li Date: Tue Oct 18 09:03:29 2022 +0800 ceph: remove useless session parameter for check_caps() The session parameter makes no sense any more. Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 2 +- fs/ceph/caps.c | 23 +++++++++-------------- fs/ceph/file.c | 17 +++++++---------- fs/ceph/inode.c | 6 +++--- fs/ceph/ioctl.c | 2 +- fs/ceph/super.h | 3 +-- 6 files changed, 22 insertions(+), 31 deletions(-) commit 69700db4212ac784130f63a350b1ede3b7184494 Merge: 5910b842c489 8b7f4dd73879 Author: Linus Torvalds Date: Mon Dec 12 10:14:52 2022 -0800 Merge tag 'soc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC code updates from Arnd Bergmann: "This time there are only fairly minor cleanups across the i.MX, ixp4xx, ux500 and renesas platforms. The only notable update is a change to the keystone2 platform to switch switch it over to standard PSCI SMP bringup, which apparently was present in the shipped firmware almost from the start" * tag 'soc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: ixp4xx: Remove unused debug iomap MAINTAINERS: Add DHCOR to the DH electronic i.MX6 board support ARM: ixp4xx: Remove unused static map MAINTAINERS: adjust ARM/INTEL IXP4XX ARM ARCHITECTURE to ixp4xx clean-up ARM: imx3: Remove unneeded #include ARM: mxs: Remove unneeded #include riscv: Kconfig.socs: Add ARCH_RENESAS kconfig option ARM: ux500: Drop unused register file ARM: ux500: do not directly dereference __iomem arm/mach-ux500: fix repeated words in comments arm64: renesas: Drop selecting GPIOLIB and PINCTRL ARM: shmobile: Drop selecting GPIOLIB and PINCTRL ARM: keystone: Replace platform SMP with PSCI soc: renesas: Kconfig: Explicitly select GPIOLIB and PINCTRL config under SOC_RENESAS commit 5910b842c489ec40866182d1b2acf7d20c2bc83f Merge: 06cff4a58e7d 93b8c91e4cdb Author: Linus Torvalds Date: Mon Dec 12 10:10:16 2022 -0800 Merge tag 'soc-defconfig-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC defconfig updates from Arnd Bergmann: "This contains the ususal arm and arm64 updates to defconfig files, enabling newly added drivers and adapting the files to Kconfig changes, in particular for qualcomm, microchip, and nxp SoC platforms" * tag 'soc-defconfig-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (28 commits) arm64: defconfig: Enable Qualcomm SM6115 / SM4250 GCC and Pinctrl arm64: defconfig: Enable Qualcomm SM6115 / SM4250 GCC and Pinctrl ARM: configs: multi_v7: switch to new MICROCHIP_ISC driver ARM: configs: sama5/7: switch to new MICROCHIP_ISC driver ARM: multi_v7_defconfig: enable Type-C UCSI and STM32G0 as modules arm64: defconfig: Enable Renesas R-Car S4-8 Spider Ethernet devices arm: configs: spear6xx: Enable PL110 display controller arm: configs: spear6xx: Refresh defconfig arm64: defconfig: Enable HTE config arm64: defconfig: Enable missing configs for mt8183-jacuzzi-juniper arm64: defconfig: Add Renesas 9-series PCIe clock generator riscv: configs: defconfig: Enable Renesas RZ/Five SoC ARM: imx_v6_v7_defconfig: Enable the cyttsp5 touchscreen arm64: defconfig: Enable Tegra186 timer support arm64: defconfig: build-in Qualcomm SC7180 and SM8450 interconnects arm64: defconfig: Enable Qualcomm QCE crypto arm64: defconfig: Enable TI_TFP410 DVI bridge ARM: configs: at91: sama7: add config for thermal management ARM: configs: at91: sama7: add config for microchip otpc ARM: configs: at91: sama7: use make savedefconfig ... commit 06cff4a58e7dfa018c5f8a6ebdc3ff12745e0bae Merge: 164f59000c19 5f4c374760b0 Author: Linus Torvalds Date: Mon Dec 12 09:50:05 2022 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "The highlights this time are support for dynamically enabling and disabling Clang's Shadow Call Stack at boot and a long-awaited optimisation to the way in which we handle the SVE register state on system call entry to avoid taking unnecessary traps from userspace. Summary: ACPI: - Enable FPDT support for boot-time profiling - Fix CPU PMU probing to work better with PREEMPT_RT - Update SMMUv3 MSI DeviceID parsing to latest IORT spec - APMT support for probing Arm CoreSight PMU devices CPU features: - Advertise new SVE instructions (v2.1) - Advertise range prefetch instruction - Advertise CSSC ("Common Short Sequence Compression") scalar instructions, adding things like min, max, abs, popcount - Enable DIT (Data Independent Timing) when running in the kernel - More conversion of system register fields over to the generated header CPU misfeatures: - Workaround for Cortex-A715 erratum #2645198 Dynamic SCS: - Support for dynamic shadow call stacks to allow switching at runtime between Clang's SCS implementation and the CPU's pointer authentication feature when it is supported (complete with scary DWARF parser!) Tracing and debug: - Remove static ftrace in favour of, err, dynamic ftrace! - Seperate 'struct ftrace_regs' from 'struct pt_regs' in core ftrace and existing arch code - Introduce and implement FTRACE_WITH_ARGS on arm64 to replace the old FTRACE_WITH_REGS - Extend 'crashkernel=' parameter with default value and fallback to placement above 4G physical if initial (low) allocation fails SVE: - Optimisation to avoid disabling SVE unconditionally on syscall entry and just zeroing the non-shared state on return instead Exceptions: - Rework of undefined instruction handling to avoid serialisation on global lock (this includes emulation of user accesses to the ID registers) Perf and PMU: - Support for TLP filters in Hisilicon's PCIe PMU device - Support for the DDR PMU present in Amlogic Meson G12 SoCs - Support for the terribly-named "CoreSight PMU" architecture from Arm (and Nvidia's implementation of said architecture) Misc: - Tighten up our boot protocol for systems with memory above 52 bits physical - Const-ify static keys to satisty jump label asm constraints - Trivial FFA driver cleanups in preparation for v1.1 support - Export the kernel_neon_* APIs as GPL symbols - Harden our instruction generation routines against instrumentation - A bunch of robustness improvements to our arch-specific selftests - Minor cleanups and fixes all over (kbuild, kprobes, kfence, PMU, ...)" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (151 commits) arm64: kprobes: Return DBG_HOOK_ERROR if kprobes can not handle a BRK arm64: kprobes: Let arch do_page_fault() fix up page fault in user handler arm64: Prohibit instrumentation on arch_stack_walk() arm64:uprobe fix the uprobe SWBP_INSN in big-endian arm64: alternatives: add __init/__initconst to some functions/variables arm_pmu: Drop redundant armpmu->map_event() in armpmu_event_init() kselftest/arm64: Allow epoll_wait() to return more than one result kselftest/arm64: Don't drain output while spawning children kselftest/arm64: Hold fp-stress children until they're all spawned arm64/sysreg: Remove duplicate definitions from asm/sysreg.h arm64/sysreg: Convert ID_DFR1_EL1 to automatic generation arm64/sysreg: Convert ID_DFR0_EL1 to automatic generation arm64/sysreg: Convert ID_AFR0_EL1 to automatic generation arm64/sysreg: Convert ID_MMFR5_EL1 to automatic generation arm64/sysreg: Convert MVFR2_EL1 to automatic generation arm64/sysreg: Convert MVFR1_EL1 to automatic generation arm64/sysreg: Convert MVFR0_EL1 to automatic generation arm64/sysreg: Convert ID_PFR2_EL1 to automatic generation arm64/sysreg: Convert ID_PFR1_EL1 to automatic generation arm64/sysreg: Convert ID_PFR0_EL1 to automatic generation ... commit 164f59000c19fa1ee5d09327a8055ec9f9b9905a Merge: 7d62159919c9 5cfe469c2654 Author: Linus Torvalds Date: Mon Dec 12 09:37:09 2022 -0800 Merge tag 'microblaze-v6.2' of git://git.monstr.eu/linux-2.6-microblaze Pull microblaze updates from Michal Simek: "Clean up PCI support which was pretty much copied and pasted from PowerPC long time ago for one custom platform which is not available for years. Also, the Xilinx/AMD PCIe team tested Microblaze with IP cores also used on ARM SOCs and clean up Microblaze code" * tag 'microblaze-v6.2' of git://git.monstr.eu/linux-2.6-microblaze: microblaze/PCI: Moving PCI iounmap and dependent code microblaze/PCI: Remove support for Xilinx PCI host bridge microblaze/PCI: Remove unused pci_iobar_pfn() and et al declarations microblaze/PCI: Remove unused sys_pciconfig_iobase() and et al declaration microblaze/PCI: Remove unused pci_address_to_pio() conversion of CPU address to I/O port microblaze/PCI: Remove unused PCI Indirect ops microblaze/PCI: Remove unused PCI BIOS resource allocation microblaze/PCI: Remove unused allocation & free of PCI host bridge structure microblaze/PCI: Remove unused device tree parsing for a host bridge resources microblaze/PCI: Remove unused PCI legacy IO's access on a bus microblaze/PCI: Remove unused PCI bus scan if configured as a host microblaze/PCI: Remove Null PCI config access unused functions microblaze/PCI: Remove unused early_read_config_byte() et al declarations commit 7d62159919c90fbcd9ee808e9f1b776eae990d53 Merge: 43686598b557 32c97d980e2e Author: Linus Torvalds Date: Mon Dec 12 09:34:16 2022 -0800 Merge tag 'hyperv-next-signed-20221208' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv updates from Wei Liu: - Drop unregister syscore from hyperv_cleanup to avoid hang (Gaurav Kohli) - Clean up panic path for Hyper-V framebuffer (Guilherme G. Piccoli) - Allow IRQ remapping to work without x2apic (Nuno Das Neves) - Fix comments (Olaf Hering) - Expand hv_vp_assist_page definition (Saurabh Sengar) - Improvement to page reporting (Shradha Gupta) - Make sure TSC clocksource works when Linux runs as the root partition (Stanislav Kinsburskiy) * tag 'hyperv-next-signed-20221208' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: x86/hyperv: Remove unregister syscore call from Hyper-V cleanup iommu/hyper-v: Allow hyperv irq remapping without x2apic clocksource: hyper-v: Add TSC page support for root partition clocksource: hyper-v: Use TSC PFN getter to map vvar page clocksource: hyper-v: Introduce TSC PFN getter clocksource: hyper-v: Introduce a pointer to TSC page x86/hyperv: Expand definition of struct hv_vp_assist_page PCI: hv: update comment in x86 specific hv_arch_irq_unmask hv: fix comment typo in vmbus_channel/low_latency drivers: hv, hyperv_fb: Untangle and refactor Hyper-V panic notifiers video: hyperv_fb: Avoid taking busy spinlock on panic path hv_balloon: Add support for configurable order free page reporting mm/page_reporting: Add checks for page_reporting_order param commit c3ec1e8964fb0ca00c79936160a027bd8b47e140 Merge: d01404fa7b8c de57ecc47610 Author: Palmer Dabbelt Date: Mon Dec 12 09:30:37 2022 -0800 Merge patch series "RISC-V: Align the shadow stack" Palmer Dabbelt says: This contains a pair of cleanups that depend on a fix that has already landed upstream. * b4-shazam-merge: RISC-V: Add some comments about the shadow and overflow stacks RISC-V: Align the shadow stack riscv: fix race when vmap stack overflow Link: https://lore.kernel.org/r/20221130023515.20217-1-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt commit de57ecc476103179e93fd85091770921f76a19af Author: Palmer Dabbelt Date: Tue Nov 29 18:35:15 2022 -0800 RISC-V: Add some comments about the shadow and overflow stacks It took me a while to page all this back in when trying to review the recent spin_shadow_stack, so I figured I'd just write up some comments. Reviewed-by: Guo Ren Reviewed-by: Jisheng Zhang Link: https://lore.kernel.org/r/20221130023515.20217-2-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/traps.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit b003b3b77d65133a0011ae3b7b255347438c12f6 Author: Palmer Dabbelt Date: Tue Nov 29 18:35:14 2022 -0800 RISC-V: Align the shadow stack The standard RISC-V ABIs all require 16-byte stack alignment. We're only calling that one function on the shadow stack so I doubt it'd result in a real issue, but might as well keep this lined up. Fixes: 31da94c25aea ("riscv: add VMAP_STACK overflow detection") Reviewed-by: Jisheng Zhang Link: https://lore.kernel.org/r/20221130023515.20217-1-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43686598b55785bfc1f961b3731b2302fe08f393 Merge: 893660b0e1c8 eaabc245b02a Author: Linus Torvalds Date: Mon Dec 12 09:24:26 2022 -0800 Merge tag 'tpmdd-next-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "A random collection of TPM fixes and one bug fix for trusted keys" * tag 'tpmdd-next-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: st33zp24: remove pointless checks on probe tpm/tpm_crb: Fix error message in __crb_relinquish_locality() tpm/tpm_ftpm_tee: Fix error handling in ftpm_mod_init() tpm: tpm_tis: Add the missed acpi_put_table() to fix memory leak tpm: tpm_crb: Add the missed acpi_put_table() to fix memory leak tpm: acpi: Call acpi_put_table() to fix memory leak tpm: Add flag to use default cancellation policy tpm: tis_i2c: Fix sanity check interrupt enable mask KEYS: trusted: tee: Make registered shm dependency explicit tpm: Avoid function type cast of put_device() tpm: st33zp24: switch to using gpiod API tpm: st33zp24: drop support for platform data commit 893660b0e1c8d127960ae921f55983b435664e15 Merge: 98d0052d0d9d dc19745ad0e4 Author: Linus Torvalds Date: Mon Dec 12 09:13:06 2022 -0800 Merge tag 'slab-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab updates from Vlastimil Babka: - SLOB deprecation and SLUB_TINY The SLOB allocator adds maintenance burden and stands in the way of API improvements [1]. Deprecate it by renaming the config option (to make users notice) to CONFIG_SLOB_DEPRECATED with updated help text. SLUB should be used instead as SLAB will be the next on the removal list. Based on reports from a riscv k210 board with 8MB RAM, add a CONFIG_SLUB_TINY option to minimize SLUB's memory usage at the expense of scalability. This has resolved the k210 regression [2] so in case there are no others (that wouldn't be resolvable by further tweaks to SLUB_TINY) plan is to remove SLOB in a few cycles. Existing defconfigs with CONFIG_SLOB are converted to CONFIG_SLUB_TINY. - kmalloc() slub_debug redzone improvements A series from Feng Tang that builds on the tracking or requested size for kmalloc() allocations (for caches with debugging enabled) added in 6.1, to make redzone checks consider the requested size and not the rounded up one, in order to catch more subtle buffer overruns. Includes new slub_kunit test. - struct slab fields reordering to accomodate larger rcu_head RCU folks would like to grow rcu_head with debugging options, which breaks current struct slab layout's assumptions, so reorganize it to make this possible. - Miscellaneous improvements/fixes: - __alloc_size checking compiler workaround (Kees Cook) - Optimize and cleanup SLUB's sysfs init (Rasmus Villemoes) - Make SLAB compatible with PROVE_RAW_LOCK_NESTING (Jiri Kosina) - Correct SLUB's percpu allocation estimates (Baoquan He) - Re-enableS LUB's run-time failslab sysfs control (Alexander Atanasov) - Make tools/vm/slabinfo more user friendly when not run as root (Rong Tao) - Dead code removal in SLUB (Hyeonggon Yoo) * tag 'slab-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: (31 commits) mm, slob: rename CONFIG_SLOB to CONFIG_SLOB_DEPRECATED mm, slub: don't aggressively inline with CONFIG_SLUB_TINY mm, slub: remove percpu slabs with CONFIG_SLUB_TINY mm, slub: split out allocations from pre/post hooks mm/slub, kunit: Add a test case for kmalloc redzone check mm/slub, kunit: add SLAB_SKIP_KFENCE flag for cache creation mm, slub: refactor free debug processing mm, slab: ignore SLAB_RECLAIM_ACCOUNT with CONFIG_SLUB_TINY mm, slub: don't create kmalloc-rcl caches with CONFIG_SLUB_TINY mm, slub: lower the default slub_max_order with CONFIG_SLUB_TINY mm, slub: retain no free slabs on partial list with CONFIG_SLUB_TINY mm, slub: disable SYSFS support with CONFIG_SLUB_TINY mm, slub: add CONFIG_SLUB_TINY mm, slab: ignore hardened usercopy parameters when disabled slab: Remove special-casing of const 0 size allocations slab: Clean up SLOB vs kmalloc() definition mm/sl[au]b: rearrange struct slab fields to allow larger rcu_head mm/migrate: make isolate_movable_page() skip slab pages mm/slab: move and adjust kernel-doc for kmem_cache_alloc mm/slub, percpu: correct the calculation of early percpu allocation size ... commit 98d0052d0d9dcd5323833482712b5799ed0bbb0b Merge: 73fa58dca802 6b2b0d839aca Author: Linus Torvalds Date: Mon Dec 12 09:01:36 2022 -0800 Merge tag 'printk-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: - Add NMI-safe SRCU reader API. It uses atomic_inc() instead of this_cpu_inc() on strong load-store architectures. - Introduce new console_list_lock to synchronize a manipulation of the list of registered consoles and their flags. This is a first step in removing the big-kernel-lock-like behavior of console_lock(). This semaphore still serializes console->write() calbacks against: - each other. It primary prevents potential races between early and proper console drivers using the same device. - suspend()/resume() callbacks and init() operations in some drivers. - various other operations in the tty/vt and framebufer susbsystems. It is likely that console_lock() serializes even operations that are not directly conflicting with the console->write() callbacks here. This is the most complicated big-kernel-lock aspect of the console_lock() that will be hard to untangle. - Introduce new console_srcu lock that is used to safely iterate and access the registered console drivers under SRCU read lock. This is a prerequisite for introducing atomic console drivers and console kthreads. It will reduce the complexity of serialization against normal consoles and console_lock(). Also it should remove the risk of deadlock during critical situations, like Oops or panic, when only atomic consoles are registered. - Check whether the console is registered instead of enabled on many locations. It was a historical leftover. - Cleanly force a preferred console in xenfb code instead of a dirty hack. - A lot of code and comment clean ups and improvements. * tag 'printk-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: (47 commits) printk: htmldocs: add missing description tty: serial: sh-sci: use setup() callback for early console printk: relieve console_lock of list synchronization duties tty: serial: kgdboc: use console_list_lock to trap exit tty: serial: kgdboc: synchronize tty_find_polling_driver() and register_console() tty: serial: kgdboc: use console_list_lock for list traversal tty: serial: kgdboc: use srcu console list iterator proc: consoles: use console_list_lock for list iteration tty: tty_io: use console_list_lock for list synchronization printk, xen: fbfront: create/use safe function for forcing preferred netconsole: avoid CON_ENABLED misuse to track registration usb: early: xhci-dbc: use console_is_registered() tty: serial: xilinx_uartps: use console_is_registered() tty: serial: samsung_tty: use console_is_registered() tty: serial: pic32_uart: use console_is_registered() tty: serial: earlycon: use console_is_registered() tty: hvc: use console_is_registered() efi: earlycon: use console_is_registered() tty: nfcon: use console_is_registered() serial_core: replace uart_console_enabled() with uart_console_registered() ... commit 73fa58dca80293320f5cfeb06f5b2daeb8d97bd5 Merge: 7fc035058eab f2f2494c8aa3 Author: Linus Torvalds Date: Mon Dec 12 08:52:53 2022 -0800 Merge tag 'locks-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking updates from Jeff Layton: "The main change here is to add the new locks_inode_context helper, and convert all of the places that dereference inode->i_flctx directly to use that instead. There is a new helper to indicate whether any locks are held on an inode. This is mostly for Ceph but may be usable elsewhere too. Andi Kleen requested that we print the PID when the LOCK_MAND warning fires, to help track down applications trying to use it. Finally, we added some new warnings to some of the file locking functions that fire when the ->fl_file and filp arguments differ. This helped us find some long-standing bugs in lockd. Patches for those are in Chuck Lever's tree and should be in his v6.2 PR. After that patch, people using NFSv2/v3 locking may see some warnings fire until those go in. Happy Holidays!" * tag 'locks-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: Add process name and pid to locks warning nfsd: use locks_inode_context helper nfs: use locks_inode_context helper lockd: use locks_inode_context helper ksmbd: use locks_inode_context helper cifs: use locks_inode_context helper ceph: use locks_inode_context helper filelock: add a new locks_inode_context accessor function filelock: new helper: vfs_inode_has_locks filelock: WARN_ON_ONCE when ->fl_file and filp don't match commit 7fc035058eab3a485060374d78012708524ca133 Merge: 667161ba0a1c 6a46bf558803 Author: Linus Torvalds Date: Mon Dec 12 08:42:29 2022 -0800 Merge tag 'execve-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve updates from Kees Cook: "Most are small refactorings and bug fixes, but three things stand out: switching timens (which got reverted before) looks solid now, FOLL_FORCE has been removed (no failures seen yet across several weeks in -next), and some whitespace cleanups (which are long overdue). - Add timens support (when switching mm). This version has survived in -next for the entire cycle (Andrei Vagin) - Various small bug fixes, refactoring, and readability improvements (Bernd Edlinger, Rolf Eike Beer, Bo Liu, Li Zetao Liu Shixin) - Remove FOLL_FORCE for stack setup (Kees Cook) - Whitespace cleanups (Rolf Eike Beer, Kees Cook)" * tag 'execve-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: binfmt_misc: fix shift-out-of-bounds in check_special_flags binfmt: Fix error return code in load_elf_fdpic_binary() exec: Remove FOLL_FORCE for stack setup binfmt_elf: replace IS_ERR() with IS_ERR_VALUE() binfmt_elf: simplify error handling in load_elf_phdrs() binfmt_elf: fix documented return value for load_elf_phdrs() exec: simplify initial stack size expansion binfmt: Fix whitespace issues exec: Add comments on check_unsafe_exec() fs counting ELF uapi: add spaces before '{' selftests/timens: add a test for vfork+exit fs/exec: switch timens when a task gets a new mm commit 667161ba0a1c5badc5c40fc45cf62a6d62883710 Merge: 059c4a341df7 b9069728a70c Author: Linus Torvalds Date: Mon Dec 12 08:34:05 2022 -0800 Merge tag 'seccomp-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp updates from Kees Cook: - Add missing kerndoc parameter (Randy Dunlap) - Improve seccomp selftest to check CAP_SYS_ADMIN (Gautam Menghani) - Fix allocation leak when cloned thread immediately dies (Kuniyuki Iwashima) * tag 'seccomp-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: seccomp: document the "filter_count" field seccomp: Move copy_seccomp() to no failure path. selftests/seccomp: Check CAP_SYS_ADMIN capability in the test mode_filter_without_nnp commit 059c4a341df7dbaab0a30a8e5420b619518f8887 Merge: 3a28c2c89f4b e6b842741b4f Author: Linus Torvalds Date: Mon Dec 12 08:31:13 2022 -0800 Merge tag 'pstore-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: "A small collection of bug fixes, refactorings, and general improvements: - Reporting improvements and return path fixes (Guilherme G. Piccoli, Wang Yufen, Kees Cook) - Clean up kmsg_bytes module parameter usage (Guilherme G. Piccoli) - Add Guilherme to pstore MAINTAINERS entry - Choose friendlier allocation flags (Qiujun Huang, Stephen Boyd)" * tag 'pstore-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP pstore/ram: Fix error return code in ramoops_probe() pstore: Alert on backend write error MAINTAINERS: Update pstore maintainers pstore/ram: Set freed addresses to NULL pstore/ram: Move internal definitions out of kernel-wide include pstore/ram: Move pmsg init earlier pstore/ram: Consolidate kfree() paths efi: pstore: Follow convention for the efi-pstore backend name pstore: Inform unregistered backend names as well pstore: Expose kmsg_bytes as a module parameter pstore: Improve error reporting in case of backend overlap pstore/zone: Use GFP_ATOMIC to allocate zone buffer commit 3a28c2c89f4b412b648761430720d40a8dc326ef Merge: 74dc488b2a1b 0445d1bae1cc Author: Linus Torvalds Date: Mon Dec 12 08:12:27 2022 -0800 Merge tag 'unsigned-char-6.2-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/linux Pull unsigned-char conversion from Jason Donenfeld: "Enable -funsigned-char and fix code affected by that flag. During the 6.1 cycle, several patches already made it into the tree, which were for code that was already broken on at least one architecture, where the naked char had a different sign than the code author anticipated, or were part of some bug fix for an existing bug that this initiative unearthed. These 6.1-era fixes are: 648060902aa3 ("MIPS: pic32: treat port as signed integer") 5c26159c97b3 ("ipvs: use explicitly signed chars") e6cb8769452e ("wifi: airo: do not assign -1 to unsigned char") 937ec9f7d5f2 ("staging: rtl8192e: remove bogus ssid character sign test") 677047383296 ("misc: sgi-gru: use explicitly signed char") 50895a55bcfd ("ALSA: rme9652: use explicitly signed char") ee03c0f200eb ("ALSA: au88x0: use explicitly signed char") 835bed1b8395 ("fbdev: sisfb: use explicitly signed char") 50f19697dd76 ("parisc: Use signed char for hardware path in pdc.h") 66063033f77e ("wifi: rt2x00: use explicitly signed or unsigned types") Regarding patches in this pull: - There is one patch in this pull that should have made it to you during 6.1 ("media: stv0288: use explicitly signed char"), but the maintainer was MIA during the cycle, so it's in here instead. - Two patches fix single architecture code affected by unsigned char ("perf/x86: Make struct p4_event_bind::cntr signed array" and "sparc: sbus: treat CPU index as integer"), while one patch fixes an unused typedef, in case it's ever used in the future ("media: atomisp: make hive_int8 explictly signed"). - Finally, there's the change to actually enable -funsigned-char ("kbuild: treat char as always unsigned") and then the removal of some no longer useful !__CHAR_UNSIGNED__ selftest code ("lib: assume char is unsigned"). The various fixes were found with a combination of diffing objdump output, a large variety of Coccinelle scripts, and plain old grep. In the end, things didn't seem as bad as I feared they would. But of course, it's also possible I missed things. However, this has been in linux-next for basically an entire cycle now, so I'm not overly worried. I've also been daily driving this on my laptop for all of 6.1. Still, this series, and the ones sent for 6.1 don't total in quantity to what I thought it'd be, so I will be on the lookout for breakage. We could receive a few reports that are quickly fixable. Hopefully we won't receive a barrage of reports that would result in a revert. And just maybe we won't receive any reports at all and nobody will even notice. Knock on wood" * tag 'unsigned-char-6.2-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/linux: lib: assume char is unsigned kbuild: treat char as always unsigned media: atomisp: make hive_int8 explictly signed media: stv0288: use explicitly signed char sparc: sbus: treat CPU index as integer perf/x86: Make struct p4_event_bind::cntr signed array commit 74dc488b2a1bee840f3cf29a4262e0b1184a4f5d Merge: f433cf2102fe 4a95be7ed766 Author: Linus Torvalds Date: Mon Dec 12 08:08:12 2022 -0800 Merge tag 'nolibc.2022.12.02a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull nolibc updates from Paul McKenney: - Further improvements to nolibc testing * tag 'nolibc.2022.12.02a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: selftests/nolibc: Always rebuild the sysroot when running a test selftests/nolibc: Add 7 tests for memcmp() commit f433cf2102fec78cf05ece06fb8e24fbfc6a64d8 Merge: 5517a2eaec8f 144b9152791f Author: Linus Torvalds Date: Mon Dec 12 08:03:49 2022 -0800 Merge tag 'kcsan.2022.12.02a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull KCSAN updates from Paul McKenney: - Add instrumentation for memcpy(), memset(), and memmove() for Clang v16+'s new function names that are used when the -fsanitize=thread argument is given - Fix objtool warnings from KCSAN's volatile instrumentation, and typos in a pair of Kconfig options' help clauses * tag 'kcsan.2022.12.02a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: kcsan: Fix trivial typo in Kconfig help comments objtool, kcsan: Add volatile read/write instrumentation to whitelist kcsan: Instrument memcpy/memset/memmove with newer Clang commit 5517a2eaec8f525506867988adc6cfe1c414c90a Merge: 1fab45ab6e82 ee5a86f451f7 Author: Linus Torvalds Date: Mon Dec 12 07:58:41 2022 -0800 Merge tag 'lkmm.2022.12.02a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull kernel memory model documentation updates from Paul McKenney: - Update the LKMM documentation, both in English and in Korean * tag 'lkmm.2022.12.02a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: docs/memory-barriers.txt/kokr: Fix confusing name of 'data dependency barrier' docs/memory-barriers.txt/kokr: Add memory barrier dma_mb() docs/memory-barriers.txt/kokr: introduce io_stop_wc() and add implementation for ARM64 docs/memory-barriers.txt: Add a missed closing parenthesis tools/memory-model: Weaken ctrl dependency definition in explanation.txt commit 3e12758392bee50135301b0189c064ab80980aca Author: Steven Rostedt (Google) Date: Mon Dec 12 10:37:03 2022 -0500 x86/mm/kmmio: Remove redundant preempt_disable() Now that kmmio uses rcu_read_lock_sched_notrace() there's no reason to call preempt_disable() as the read_lock_sched_notrace() already does that and is redundant. This also removes the preempt_enable_no_resched() as the "no_resched()" portion was bogus as there's no reason to do that. Link: https://lkml.kernel.org/r/20221212103703.7129cc5d@gandalf.local.home Cc: Masami Hiramatsu Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Borislav Petkov Cc: "x86@kernel.org" Cc: Karol Herbst Cc: Pekka Paalanen Cc: Dave Hansen Cc: Andy Lutomirski Cc: Ingo Molnar Signed-off-by: Steven Rostedt (Google) arch/x86/mm/kmmio.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 75b15aa0d83ec835082129b62e8cb9a44703ad72 Merge: 7d4b19ab6b89 3a3073b69c76 Author: Rafael J. Wysocki Date: Mon Dec 12 16:54:14 2022 +0100 Merge branch 'thermal-intel' Merge one more Intel thermal control change for 6.2-rc1: - Remove a pointless die_id chec from the Intel HFI thermal control driver (Ricardo Neri). * thermal-intel: thermal: intel: hfi: Remove a pointless die_id check commit 1fab45ab6e823f9d7e5bc9520b2aa6564d6d58a7 Merge: 830b3c68c1fb 87492c06e68d Author: Linus Torvalds Date: Mon Dec 12 07:47:15 2022 -0800 Merge tag 'rcu.2022.12.02a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU updates from Paul McKenney: - Documentation updates. This is the second in a series from an ongoing review of the RCU documentation. - Miscellaneous fixes. - Introduce a default-off Kconfig option that depends on RCU_NOCB_CPU that, on CPUs mentioned in the nohz_full or rcu_nocbs boot-argument CPU lists, causes call_rcu() to introduce delays. These delays result in significant power savings on nearly idle Android and ChromeOS systems. These savings range from a few percent to more than ten percent. This series also includes several commits that change call_rcu() to a new call_rcu_hurry() function that avoids these delays in a few cases, for example, where timely wakeups are required. Several of these are outside of RCU and thus have acks and reviews from the relevant maintainers. - Create an srcu_read_lock_nmisafe() and an srcu_read_unlock_nmisafe() for architectures that support NMIs, but which do not provide NMI-safe this_cpu_inc(). These NMI-safe SRCU functions are required by the upcoming lockless printk() work by John Ogness et al. - Changes providing minor but important increases in torture test coverage for the new RCU polled-grace-period APIs. - Changes to torturescript that avoid redundant kernel builds, thus providing about a 30% speedup for the torture.sh acceptance test. * tag 'rcu.2022.12.02a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (49 commits) net: devinet: Reduce refcount before grace period net: Use call_rcu_hurry() for dst_release() workqueue: Make queue_rcu_work() use call_rcu_hurry() percpu-refcount: Use call_rcu_hurry() for atomic switch scsi/scsi_error: Use call_rcu_hurry() instead of call_rcu() rcu/rcutorture: Use call_rcu_hurry() where needed rcu/rcuscale: Use call_rcu_hurry() for async reader test rcu/sync: Use call_rcu_hurry() instead of call_rcu rcuscale: Add laziness and kfree tests rcu: Shrinker for lazy rcu rcu: Refactor code a bit in rcu_nocb_do_flush_bypass() rcu: Make call_rcu() lazy to save power rcu: Implement lockdep_rcu_enabled for !CONFIG_DEBUG_LOCK_ALLOC srcu: Debug NMI safety even on archs that don't require it srcu: Explain the reason behind the read side critical section on GP start srcu: Warn when NMI-unsafe API is used in NMI arch/s390: Add ARCH_HAS_NMI_SAFE_THIS_CPU_OPS Kconfig option arch/loongarch: Add ARCH_HAS_NMI_SAFE_THIS_CPU_OPS Kconfig option rcu: Fix __this_cpu_read() lockdep warning in rcu_force_quiescent_state() rcu-tasks: Make grace-period-age message human-readable ... commit 0612d748003ce7bcd0d67a8d270900fcdadb1009 Author: Gongjun Song Date: Mon Dec 12 16:55:27 2022 +0800 ASoC: Intel: soc-acpi: update codec addr on 0C11/0C4F product The unique ID is determined by the ADR pin level of rt1318. ODM changed design, update codec addr to match new design. Fixes: 0050e3d3d43d ("ASoC: Intel: soc-acpi: add SKU 0C11 SoundWire configuration") Signed-off-by: Gongjun Song Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221212085527.1886168-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-rpl-match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d94d0090527b1763872275a7ccd44df7219b31e Author: Wang Jingjin Date: Thu Dec 8 14:39:00 2022 +0800 ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume() rk_spdif_runtime_resume() may have called clk_prepare_enable() before return from failed branches, add missing clk_disable_unprepare() in this case. Fixes: f874b80e1571 ("ASoC: rockchip: Add rockchip SPDIF transceiver driver") Signed-off-by: Wang Jingjin Link: https://lore.kernel.org/r/20221208063900.4180790-1-wangjingjin1@huawei.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_spdif.c | 1 + 1 file changed, 1 insertion(+) commit 9529dc167ffcdfd201b9f0eda71015f174095f7e Author: Marek Szyprowski Date: Fri Dec 9 10:16:57 2022 +0100 ASoC: wm8994: Fix potential deadlock Fix this by dropping wm8994->accdet_lock while calling cancel_delayed_work_sync(&wm8994->mic_work) in wm1811_jackdet_irq(). Fixes: c0cc3f166525 ("ASoC: wm8994: Allow a delay between jack insertion and microphone detect") Signed-off-by: Marek Szyprowski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20221209091657.1183-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown sound/soc/codecs/wm8994.c | 5 +++++ 1 file changed, 5 insertions(+) commit 83f1b7f39af73b01edf098fe3141404670703281 Author: YC Hung Date: Fri Dec 9 11:10:53 2022 +0800 ASoC: mediatek: mt8195: add sof be ops to check audio active In MT8195 SOF design, both DSP and audio driver would access audio registers. Before DSP accesses audio registers, audio power and clock should be enabled. DSP will hang up if DSP access audio register but audio power and clock are disabled. Therefore, we add audio pm runtime active checking before accessing audio registers in SOF BE's callback hw_params function to avoid this situation. Signed-off-by: YC Hung Reviewed-by: AngeloGioacchino Del Regno Acked-by: Curtis Malainey Link: https://lore.kernel.org/r/20221209031053.8444-1-yc.hung@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8195/mt8195-mt6359.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 44fda61d2bcfb74a942df93959e083a4e8eff75f Author: Kai Vehmanen Date: Fri Dec 9 13:45:29 2022 +0200 ASoC: SOF: Revert: "core: unregister clients and machine drivers in .shutdown" The unregister machine drivers call is not safe to do when kexec is used. Kexec-lite gets blocked with following backtrace: [ 84.943749] Freezing user space processes ... (elapsed 0.111 seconds) done. [ 246.784446] INFO: task kexec-lite:5123 blocked for more than 122 seconds. [ 246.819035] Call Trace: [ 246.821782] [ 246.824186] __schedule+0x5f9/0x1263 [ 246.828231] schedule+0x87/0xc5 [ 246.831779] snd_card_disconnect_sync+0xb5/0x127 ... [ 246.889249] snd_sof_device_shutdown+0xb4/0x150 [ 246.899317] pci_device_shutdown+0x37/0x61 [ 246.903990] device_shutdown+0x14c/0x1d6 [ 246.908391] kernel_kexec+0x45/0xb9 This reverts commit 83bfc7e793b555291785136c3ae86abcdc046887. Reported-by: Ricardo Ribalda Cc: Ricardo Ribalda Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221209114529.3909192-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/core.c | 9 --------- 1 file changed, 9 deletions(-) commit 2aa2a5ead0ee0a358bf80a2984a641d1bf2adc2a Author: Kai Vehmanen Date: Fri Dec 9 13:45:28 2022 +0200 ASoC: SOF: Intel: pci-tgl: unblock S5 entry if DMA stop has failed" If system shutdown has not been completed cleanly, it is possible the DMA stream shutdown has not been done, or was not clean. If this is the case, Intel TGL/ADL HDA platforms may fail to shutdown cleanly due to pending HDA DMA transactions. To avoid this, detect this scenario in the shutdown callback, and perform an additional controller reset. This has been tested to unblock S5 entry if this condition is hit. Co-developed-by: Archana Patni Signed-off-by: Archana Patni Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221209114529.3909192-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 72 +++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.h | 1 + sound/soc/sof/intel/tgl.c | 2 +- 3 files changed, 74 insertions(+), 1 deletion(-) commit ed6a00471dd444af085164f987e3d5e8145da35a Merge: e0e44513c793 92e61c2e0cee 2ed6b4c26669 Author: Rafael J. Wysocki Date: Mon Dec 12 16:31:20 2022 +0100 Merge branches 'pm-devfreq' and 'pm-tools' Merge devfreq updates and cpupower utility updates for 6.2-rc1: - Add a private governor_data for devfreq governors (Kant Fan). - Reorganize devfreq code to use device_match_of_node() and devm_platform_get_and_ioremap_resource() instead of open coding them (ye xingchen, Minghao Chi). - Make cpupower choose base_cpu to display default cpupower details instead of picking CPU 0 (Saket Kumar Bhaskar). - Add Georgian translation to cpupower documentation (Zurab Kargareteli). - Introduce powercap intel-rapl library, powercap-info command, and RAPL monitor into cpupower (Thomas Renninger). * pm-devfreq: PM / devfreq: event: use devm_platform_get_and_ioremap_resource() PM / devfreq: event: Use device_match_of_node() PM / devfreq: Use device_match_of_node() PM/devfreq: governor: Add a private governor_data for governor * pm-tools: cpupower: rapl monitor - shows the used power consumption in uj for each rapl domain cpupower: Introduce powercap intel-rapl library and powercap-info command cpupower: Add Georgian translation tools/cpupower: Choose base_cpu to display default cpupower details commit e0e44513c793c3e8f6ce5eff377065e67853806b Merge: 7680d45a910f 98e596fc85fe 9c252ecf3036 68bf66a10858 f9b4dc920d35 Author: Rafael J. Wysocki Date: Mon Dec 12 16:23:36 2022 +0100 Merge branches 'powercap', 'pm-x86', 'pm-opp' and 'pm-misc' Merge power capping code updates, x86-specific power management pdate, operating performance points library updates and miscellaneous power management updates for 6.2-rc1: - Fix compiler warnings with make W=1 in the idle_inject power capping driver (Srinivas Pandruvada). - Use kstrtobool() instead of strtobool() in the power capping sysfs interface (Christophe JAILLET). - Add SCMI Powercap based power capping driver (Cristian Marussi). - Add Emerald Rapids support to the intel-uncore-freq driver (Artem Bityutskiy). - Repair slips in kernel-doc comments in the generic notifier code (Lukas Bulwahn). - Fix several DT issues in the OPP library reorganize code around opp-microvolt- DT property (Viresh Kumar). - Allow any of opp-microvolt, opp-microamp, or opp-microwatt properties to be present without the others present (James Calligeros). - Fix clock-latency-ns property in DT example (Serge Semin). * powercap: powercap: idle_inject: Fix warnings with make W=1 powercap: Use kstrtobool() instead of strtobool() powercap: arm_scmi: Add SCMI Powercap based driver * pm-x86: platform/x86: intel-uncore-freq: add Emerald Rapids support * pm-opp: dt-bindings: opp-v2: Fix clock-latency-ns prop in example OPP: decouple dt properties in opp_parse_supplies() OPP: Simplify opp_parse_supplies() by restructuring it OPP: Parse named opp-microwatt property too dt-bindings: opp: Fix named microwatt property dt-bindings: opp: Fix usage of current in microwatt property * pm-misc: notifier: repair slips in kernel-doc comments commit c1ac03af6ed45d05786c219d102f37eb44880f28 Author: Yang Jihong Date: Tue Nov 29 19:30:09 2022 +0800 tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line print_trace_line may overflow seq_file buffer. If the event is not consumed, the while loop keeps peeking this event, causing a infinite loop. Link: https://lkml.kernel.org/r/20221129113009.182425-1-yangjihong1@huawei.com Cc: Masami Hiramatsu Cc: stable@vger.kernel.org Fixes: 088b1e427dbba ("ftrace: pipe fixes") Signed-off-by: Yang Jihong Signed-off-by: Steven Rostedt (Google) kernel/trace/trace.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 7680d45a910f775402281253610f039277630d0c Merge: 173c6c5af327 cb51aeec1473 96d4b8e1ad8a ae8ac19655e0 Author: Rafael J. Wysocki Date: Mon Dec 12 16:12:09 2022 +0100 Merge branches 'pm-cpuidle', 'pm-sleep' and 'pm-domains' Merge cpuidle changes, updates related to system sleep amd generic power domains code fixes for 6.2-rc1: - Improve kernel messages printed by the cpuidle PCI driver (Ulf Hansson). - Make the DT cpuidle driver return the correct number of parsed idle states, clean it up and clarify a comment in it (Ulf Hansson). - Modify the tasks freezing code to avoid using pr_cont() and refine an error message printed by it (Rafael Wysocki). - Make the hibernation core code complain about memory map mismatches during resume to help diagnostics (Xueqin Luo). - Fix mistake in a kerneldoc comment in the hibernation code (xiongxin). - Reverse the order of performance and enabling operations in the generic power domains code (Abel Vesa). - Power off[on] domains in hibernate .freeze[thaw]_noirq hook of in the generic power domains code (Abel Vesa). - Consolidate genpd_restore_noirq() and genpd_resume_noirq() (Shawn Guo). - Pass generic PM noirq hooks to genpd_finish_suspend() (Shawn Guo). - Drop generic power domain status manipulation during hibernate restore (Shawn Guo). * pm-cpuidle: cpuidle: dt: Clarify a comment and simplify code in dt_init_idle_driver() cpuidle: dt: Return the correct numbers of parsed idle states cpuidle: psci: Extend information in log about OSI/PC mode * pm-sleep: PM: sleep: Refine error message in try_to_freeze_tasks() PM: sleep: Avoid using pr_cont() in the tasks freezing code PM: hibernate: Complain about memory map mismatches during resume PM: hibernate: Fix mistake in kerneldoc comment * pm-domains: PM: domains: Reverse the order of performance and enabling ops PM: domains: Power off[on] domain in hibernate .freeze[thaw]_noirq hook PM: domains: Consolidate genpd_restore_noirq() and genpd_resume_noirq() PM: domains: Pass generic PM noirq hooks to genpd_finish_suspend() PM: domains: Drop genpd status manipulation for hibernate restore commit 173c6c5af3277911763e8c737f0178db9a246d69 Merge: dbfa44782787 04ac14ad3a1a Author: Rafael J. Wysocki Date: Mon Dec 12 15:53:48 2022 +0100 Merge branch 'pm-cpufreq' Merge cpufreq changes for 6.2-rc1: - Generalize of_perf_domain_get_sharing_cpumask phandle format (Hector Martin). - Add new cpufreq driver for Apple SoC CPU P-states (Hector Martin). - Update Qualcomm cpufreq driver, including: * CPU clock provider support, * Generic cleanups or reorganization. * Potential memleak fix. * Fix of the return value of cpufreq_driver->get(). (Manivannan Sadhasivam, Chen Hui). - Update Qualcomm cpufreq driver's DT bindings, including: * Support for CPU clock provider. * Missing cache-related properties fixes. * Support for QDU1000/QRU1000. (Manivannan Sadhasivam, Rob Herring, Melody Olvera). - Add support for ti,am625 SoC and enable build of ti-cpufreq for ARCH_K3 (Dave Gerlach, and Vibhore Vardhan). - Use flexible array to simplify memory allocation in the tegra186 cpufreq driver (Christophe JAILLET). - Convert cpufreq statistics code to use sysfs_emit_at() (ye xingchen). - Allow intel_pstate to use no-HWP mode on Sapphire Rapids (Giovanni Gherdovich). - Add missing pci_dev_put() to the amd_freq_sensitivity cpufreq driver (Xiongfeng Wang). - Initialize the kobj_unregister completion before calling kobject_init_and_add() in the cpufreq core code (Yongqiang Liu). - Defer setting boost MSRs in the ACPI cpufreq driver (Stuart Hayes, Nathan Chancellor). - Make intel_pstate accept initial EPP value of 0x80 (Srinivas Pandruvada). - Make read-only array sys_clk_src in the SPEAr cpufreq driver static (Colin Ian King). - Make array speeds in the longhaul cpufreq driver static (Colin Ian King). - Use str_enabled_disabled() helper in the ACPI cpufreq driver (Andy Shevchenko). - Drop a reference to CVS from cpufreq documentation (Conghui Wang). * pm-cpufreq: (30 commits) cpufreq: Remove CVS version control contents from documentation cpufreq: stats: Convert to use sysfs_emit_at() API cpufreq: ACPI: Only set boost MSRs on supported CPUs dt-bindings: cpufreq: cpufreq-qcom-hw: Add QDU1000/QRU1000 cpufreq cpufreq: tegra186: Use flexible array to simplify memory allocation cpufreq: intel_pstate: Add Sapphire Rapids support in no-HWP mode cpufreq: amd_freq_sensitivity: Add missing pci_dev_put() cpufreq: Init completion before kobject_init_and_add() cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states cpufreq: qcom-hw: Add CPU clock provider support dt-bindings: cpufreq: cpufreq-qcom-hw: Add cpufreq clock provider cpufreq: qcom-hw: Fix the frequency returned by cpufreq_driver->get() cpufreq: ACPI: Remove unused variables 'acpi_cpufreq_online' and 'ret' cpufreq: qcom-hw: Fix memory leak in qcom_cpufreq_hw_read_lut() arm64: dts: ti: k3-am625-sk: Add 1.4GHz OPP cpufreq: ti: Enable ti-cpufreq for ARCH_K3 arm64: dts: ti: k3-am625: Introduce operating-points table cpufreq: dt-platdev: Blacklist ti,am625 SoC cpufreq: ti-cpufreq: Add support for AM625 dt-bindings: cpufreq: qcom: Add missing cache related properties ... commit 3919430fe93bcfad5e34cdbb4d81cd17b3bbd27a Merge: f5e32344d472 9c8921555907 Author: Borislav Petkov (AMD) Date: Mon Dec 12 15:40:03 2022 +0100 Merge branches 'edac-ghes' and 'edac-misc' into edac-updates-for-v6.2 Combine all queued EDAC changes for submission into v6.2: * ras/edac-ghes: EDAC/igen6: Return the correct error type when not the MC owner apei/ghes: Use xchg_release() for updating new cache slot instead of cmpxchg() EDAC: Check for GHES preference in the chipset-specific EDAC drivers EDAC/ghes: Make ghes_edac a proper module EDAC/ghes: Prepare to make ghes_edac a proper module EDAC/ghes: Add a notifier for reporting memory errors efi/cper: Export several helpers for ghes_edac to use * ras/edac-misc: EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper() EDAC/i5400: Fix typo in comment: vaious -> various EDAC/mc_sysfs: Increase legacy channel support to 12 MAINTAINERS: Make Mauro EDAC reviewer MAINTAINERS: Make Manivannan Sadhasivam the maintainer of qcom_edac EDAC/i5000: Mark as BROKEN Signed-off-by: Borislav Petkov (AMD) commit bee74dcbd3908291f4bfff3c81a52d52dcd48814 Merge: 39f26d10120a 64ee25282610 6d7d3c287410 92266c65e087 62a0ec9dc1df Author: Rafael J. Wysocki Date: Mon Dec 12 15:24:15 2022 +0100 Merge branches 'acpi-fan', 'acpi-pcc', 'acpi-misc' and 'pnp' Merge ACPI fan driver fixes, ACPI PCC driver fixes, miscellaneous ACPI cleanups and PNP updates for 6.2-rc1: - Make the ACPI fan driver use sysfs_emit_at() in its sysfs interface code (ye xingchen). - Fix the _FIF package extraction failure handling in the ACPI fan driver (Hanjun Guo). - Fix the PCC mailbox handling error code path (Huisong Li). - Avoid using PCC Opregions if there is no platform interrupt allocated for this purpose (Huisong Li). - Use sysfs_emit() instead of scnprintf() in the ACPI PAD driver and CPPC library (ye xingchen). - Fix some kernel-doc issues in the ACPI GSI processing code (Xiongfeng Wang). - Fix name memory leak in pnp_alloc_dev() (Yang Yingliang). - Do not disable PNP devices on suspend when they cannot be re-enabled on resume (Hans de Goede). * acpi-fan: ACPI: fan: Convert to use sysfs_emit_at() API ACPI: fan: Bail out if extract package failed * acpi-pcc: mailbox: pcc: Reset pcc_chan_count to zero in case of PCC probe failure ACPI: PCC: Setup PCC Opregion handler only if platform interrupt is available * acpi-misc: ACPI: use sysfs_emit() instead of scnprintf() ACPI: irq: Fix some kernel-doc issues * pnp: PNP: Do not disable devices on suspend when they cannot be re-enabled on resume PNP: fix name memory leak in pnp_alloc_dev() commit 3bc8edc98bd43540dbe648e4ef91f443d6d20a24 Author: Dan Aloni Date: Mon Dec 12 13:11:06 2022 +0200 nfsd: under NFSv4.1, fix double svc_xprt_put on rpc_create failure On error situation `clp->cl_cb_conn.cb_xprt` should not be given a reference to the xprt otherwise both client cleanup and the error handling path of the caller call to put it. Better to delay handing over the reference to a later branch. [ 72.530665] refcount_t: underflow; use-after-free. [ 72.531933] WARNING: CPU: 0 PID: 173 at lib/refcount.c:28 refcount_warn_saturate+0xcf/0x120 [ 72.533075] Modules linked in: nfsd(OE) nfsv4(OE) nfsv3(OE) nfs(OE) lockd(OE) compat_nfs_ssc(OE) nfs_acl(OE) rpcsec_gss_krb5(OE) auth_rpcgss(OE) rpcrdma(OE) dns_resolver fscache netfs grace rdma_cm iw_cm ib_cm sunrpc(OE) mlx5_ib mlx5_core mlxfw pci_hyperv_intf ib_uverbs ib_core xt_MASQUERADE nf_conntrack_netlink nft_counter xt_addrtype nft_compat br_netfilter bridge stp llc nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set overlay nf_tables nfnetlink crct10dif_pclmul crc32_pclmul ghash_clmulni_intel xfs serio_raw virtio_net virtio_blk net_failover failover fuse [last unloaded: sunrpc] [ 72.540389] CPU: 0 PID: 173 Comm: kworker/u16:5 Tainted: G OE 5.15.82-dan #1 [ 72.541511] Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.16.0-3.module+el8.7.0+1084+97b81f61 04/01/2014 [ 72.542717] Workqueue: nfsd4_callbacks nfsd4_run_cb_work [nfsd] [ 72.543575] RIP: 0010:refcount_warn_saturate+0xcf/0x120 [ 72.544299] Code: 55 00 0f 0b 5d e9 01 50 98 00 80 3d 75 9e 39 08 00 0f 85 74 ff ff ff 48 c7 c7 e8 d1 60 8e c6 05 61 9e 39 08 01 e8 f6 51 55 00 <0f> 0b 5d e9 d9 4f 98 00 80 3d 4b 9e 39 08 00 0f 85 4c ff ff ff 48 [ 72.546666] RSP: 0018:ffffb3f841157cf0 EFLAGS: 00010286 [ 72.547393] RAX: 0000000000000026 RBX: ffff89ac6231d478 RCX: 0000000000000000 [ 72.548324] RDX: ffff89adb7c2c2c0 RSI: ffff89adb7c205c0 RDI: ffff89adb7c205c0 [ 72.549271] RBP: ffffb3f841157cf0 R08: 0000000000000000 R09: c0000000ffefffff [ 72.550209] R10: 0000000000000001 R11: ffffb3f841157ad0 R12: ffff89ac6231d180 [ 72.551142] R13: ffff89ac6231d478 R14: ffff89ac40c06180 R15: ffff89ac6231d4b0 [ 72.552089] FS: 0000000000000000(0000) GS:ffff89adb7c00000(0000) knlGS:0000000000000000 [ 72.553175] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 72.553934] CR2: 0000563a310506a8 CR3: 0000000109a66000 CR4: 0000000000350ef0 [ 72.554874] Call Trace: [ 72.555278] [ 72.555614] svc_xprt_put+0xaf/0xe0 [sunrpc] [ 72.556276] nfsd4_process_cb_update.isra.11+0xb7/0x410 [nfsd] [ 72.557087] ? update_load_avg+0x82/0x610 [ 72.557652] ? cpuacct_charge+0x60/0x70 [ 72.558212] ? dequeue_entity+0xdb/0x3e0 [ 72.558765] ? queued_spin_unlock+0x9/0x20 [ 72.559358] nfsd4_run_cb_work+0xfc/0x270 [nfsd] [ 72.560031] process_one_work+0x1df/0x390 [ 72.560600] worker_thread+0x37/0x3b0 [ 72.561644] ? process_one_work+0x390/0x390 [ 72.562247] kthread+0x12f/0x150 [ 72.562710] ? set_kthread_struct+0x50/0x50 [ 72.563309] ret_from_fork+0x22/0x30 [ 72.563818] [ 72.564189] ---[ end trace 031117b1c72ec616 ]--- [ 72.566019] list_add corruption. next->prev should be prev (ffff89ac4977e538), but was ffff89ac4763e018. (next=ffff89ac4763e018). [ 72.567647] ------------[ cut here ]------------ Fixes: a4abc6b12eb1 ("nfsd: Fix svc_xprt refcnt leak when setup callback client failed") Cc: Xiyu Yang Cc: J. Bruce Fields Signed-off-by: Dan Aloni Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4callback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 39f26d10120ada8553647d9f61223bda7a22336b Merge: 6f1581810b29 87386ee83dc2 ecc6aaabcedc 98b0cf207b61 e335beed78ec Author: Rafael J. Wysocki Date: Mon Dec 12 15:13:52 2022 +0100 Merge branches 'acpi-apei', 'acpi-x86', 'acpi-battery' and 'acpi-pfrut' Make ACPI APEI updates, x86-specific ACPI updates, ACPI battery driver fix and ACPI PFRU/T driver fixes for 6.2-rc1: - Drop unsetting ACPI APEI driver data on remove (Uwe Kleine-König). - Use xchg_release() instead of cmpxchg() for updating new GHES cache slots (Ard Biesheuvel). - Clean up the ACPI APEI code (Sudeep Holla, Christophe JAILLET, Jay Lu). - Add new I2C device enumeration quirks for Medion Lifetab S10346 and Lenovo Yoga Tab 3 Pro (YT3-X90F) (Hans de Goede). - Make the ACPI battery driver notify user space about adding new battery hooks and removing the existing ones (Armin Wolf). - Modify the pfr_update and pfr_telemetry drivers to use ACPI_FREE() for freeing acpi_object structures to help diagnostics (Wang ShaoBo). * acpi-apei: ACPI: APEI: EINJ: Refactor available_error_type_show() ACPI: APEI: EINJ: Fix formatting errors ACPI: APEI: Remove a useless include ACPI: APEI: Silence missing prototype warnings apei/ghes: Use xchg_release() for updating new cache slot instead of cmpxchg() ACPI: APEI: Drop unsetting driver data on remove * acpi-x86: ACPI: x86: Add skip i2c clients quirk for Medion Lifetab S10346 ACPI: x86: Add skip i2c clients quirk for Lenovo Yoga Tab 3 Pro (YT3-X90F) * acpi-battery: ACPI: battery: Call power_supply_changed() when adding hooks * acpi-pfrut: ACPI: pfr_update: use ACPI_FREE() to free acpi_object ACPI: pfr_telemetry: use ACPI_FREE() to free acpi_object commit 6f1581810b2960ffb8e2bbcdde89d523555371da Merge: 45494d77f279 d96d30d83638 f1a70bac90ca b423f240a66a fb1836c91317 Author: Rafael J. Wysocki Date: Mon Dec 12 15:05:30 2022 +0100 Merge branches 'acpi-pm', 'acpi-processor', 'acpi-ec' and 'acpi-video' Make ACPI power management changes, ACPI processor driver updates, ACPI EC driver quirk and ACPI backlight driver updates for 6.2-rc1: - Print full name paths of ACPI power resources objects during enumeration (Kane Chen). - Eliminate a compiler warning regarding a missing function prototype in the ACPI power management code (Sudeep Holla). - Fix and clean up the ACPI processor driver (Rafael Wysocki, Li Zhong, Colin Ian King, Sudeep Holla). - Add quirk for the HP Pavilion Gaming 15-cx0041ur to the ACPI EC driver (Mia Kanashi). - Add some mew ACPI backlight handling quirks and update some existing ones (Hans de Goede). - Make the ACPI backlight driver prefer the native backlight control over vendor backlight control when possible (Hans de Goede). * acpi-pm: ACPI: PM: Silence missing prototype warning ACPI: PM: Print full name path while adding power resource * acpi-processor: ACPI: processor: perflib: Adjust acpi_processor_notify_smm() return value ACPI: processor: perflib: Rearrange acpi_processor_notify_smm() ACPI: processor: perflib: Rearrange unregistration routine ACPI: processor: perflib: Drop redundant parentheses ACPI: processor: perflib: Adjust white space ACPI: processor: idle: Drop unnecessary statements and parens ACPI: processor: Silence missing prototype warnings ACPI: processor_idle: Silence missing prototype warnings ACPI: processor: throttling: remove variable count ACPI: processor: idle: Check acpi_fetch_acpi_dev() return value * acpi-ec: ACPI: EC: Add quirk for the HP Pavilion Gaming 15-cx0041ur * acpi-video: ACPI: video: Prefer native over vendor ACPI: video: Simplify __acpi_video_get_backlight_type() ACPI: video: Add force_native quirk for Sony Vaio VPCY11S1E ACPI: video: Add force_vendor quirk for Sony Vaio PCG-FRV35 ACPI: video: Change Sony Vaio VPCEH3U1E quirk to force_native ACPI: video: Change GIGABYTE GB-BXBT-2807 quirk to force_none ACPI: video: Add a few bugtracker links to DMI quirks commit 45494d77f279d0420f06376dcf105b23e300c5a4 Merge: 888bc86e7cca 9256dac0c67a 3223417d1fc4 062c0e3670c3 82d08d61e3a8 Author: Rafael J. Wysocki Date: Mon Dec 12 14:55:44 2022 +0100 Merge branches 'acpi-scan', 'acpi-bus', 'acpi-tables' and 'acpi-sysfs' Merge ACPI changes related to device enumeration, device object managenet, operation region handling, table parsing and sysfs interface: - Use ZERO_PAGE(0) instead of empty_zero_page in the ACPI device enumeration code (Giulio Benetti). - Change the return type of the ACPI driver remove callback to void and update its users accordingly (Dawei Li). - Add general support for FFH address space type and implement the low- level part of it for ARM64 (Sudeep Holla). - Fix stale comments in the ACPI tables parsing code and make it print more messages related to MADT (Hanjun Guo, Huacai Chen). - Replace invocations of generic library functions with more kernel- specific counterparts in the ACPI sysfs interface (Christophe JAILLET, Xu Panda). * acpi-scan: ACPI: scan: substitute empty_zero_page with helper ZERO_PAGE(0) * acpi-bus: ACPI: FFH: Silence missing prototype warnings ACPI: make remove callback of ACPI driver void ACPI: bus: Fix the _OSC capability check for FFH OpRegion arm64: Add architecture specific ACPI FFH Opregion callbacks ACPI: Implement a generic FFH Opregion handler * acpi-tables: ACPI: tables: Fix the stale comments for acpi_locate_initial_tables() ACPI: tables: Print CORE_PIC information when MADT is parsed * acpi-sysfs: ACPI: sysfs: use sysfs_emit() to instead of scnprintf() ACPI: sysfs: Use kstrtobool() instead of strtobool() commit 888bc86e7cca29de20223ee46e9b770ced2c038e Merge: 57336224da83 470188b09e92 Author: Rafael J. Wysocki Date: Mon Dec 12 14:41:48 2022 +0100 Merge branch 'acpica' Merge ACPICA changes, including bug fixes and cleanups as well as support for some recently defined data structures, for 6.2-rc1: - Make acpi_ex_load_op() match upstream implementation (Rafael Wysocki). - Add support for loong_arch-specific APICs in MADT (Huacai Chen). - Add support for fixed PCIe wake event (Huacai Chen). - Add EBDA pointer sanity checks (Vit Kabele). - Avoid accessing VGA memory when EBDA < 1KiB (Vit Kabele). - Add CCEL table support to both compiler/disassembler (Kuppuswamy Sathyanarayanan). - Add a couple of new UUIDs to the known UUID list (Bob Moore). - Add support for FFH Opregion special context data (Sudeep Holla). - Improve warning message for "invalid ACPI name" (Bob Moore). - Add support for CXL 3.0 structures (CXIMS & RDPAS) in the CEDT table (Alison Schofield). - Prepare IORT support for revision E.e (Robin Murphy). - Finish support for the CDAT table (Bob Moore). - Fix error code path in acpi_ds_call_control_method() (Rafael Wysocki). - Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() (Li Zetao). - Update the version of the ACPICA code in the kernel (Bob Moore). * acpica: ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() ACPICA: Fix error code path in acpi_ds_call_control_method() ACPICA: Update version to 20221020 ACPICA: Add utcksum.o to the acpidump Makefile Revert "LoongArch: Provisionally add ACPICA data structures" ACPICA: Finish support for the CDAT table ACPICA: IORT: Update for revision E.e ACPICA: Add CXL 3.0 structures (CXIMS & RDPAS) to the CEDT table ACPICA: Improve warning message for "invalid ACPI name" ACPICA: Add support for FFH Opregion special context data ACPICA: Add a couple of new UUIDs to the known UUID list ACPICA: iASL: Add CCEL table to both compiler/disassembler ACPICA: Do not touch VGA memory when EBDA < 1ki_b ACPICA: Check that EBDA pointer is in valid memory ACPICA: Events: Support fixed PCIe wake event ACPICA: MADT: Add loong_arch-specific APICs support ACPICA: Make acpi_ex_load_op() match upstream commit b2b509fb5a1e6af1e630a755b32c4658099df70b Merge: 21af0d557ea9 47bf2b2393ea Author: David S. Miller Date: Mon Dec 12 12:11:37 2022 +0000 Merge tag 'linux-can-next-for-6.2-20221212' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== linux-can-next-for-6.2-20221212 this is a pull request of 39 patches for net-next/master. The first 2 patches are by me fix a warning and coding style in the kvaser_usb driver. Vivek Yadav's patch sorts the includes of the m_can driver. Biju Das contributes 5 patches for the rcar_canfd driver improve the support for different IP core variants. Jean Delvare's patch for the ctucanfd drops the dependency on COMPILE_TEST. Vincent Mailhol's patch sorts the includes of the etas_es58x driver. Haibo Chen's contributes 2 patches that add i.MX93 support to the flexcan driver. Lad Prabhakar's patch updates the dt-bindings documentation of the rcar_canfd driver. Minghao Chi's patch converts the c_can platform driver to devm_platform_get_and_ioremap_resource(). In the next 7 patches Vincent Mailhol adds devlink support to the etas_es58x driver to report firmware, bootloader and hardware version. Xu Panda's patch converts a strncpy() -> strscpy() in the ucan driver. Ye Bin's patch removes a useless parameter from the AF_CAN protocol. The next 2 patches by Vincent Mailhol and remove unneeded or unused pointers to struct usb_interface in device's priv struct in the ucan and gs_usb driver. Vivek Yadav's patch cleans up the usage of the RAM initialization in the m_can driver. A patch by me add support for SO_MARK to the AF_CAN protocol. Geert Uytterhoeven's patch fixes the number of CAN channels in the rcan_canfd bindings documentation. In the last 11 patches Markus Schneider-Pargmann optimizes the register access in the t_can driver and cleans up the tcan glue driver. ==================== Signed-off-by: David S. Miller commit 22250dbaba99f87574095af894610e9801d74419 Merge: 69af4bcaa08d 84498d1fb35d Author: Mark Brown Date: Mon Dec 12 11:50:58 2022 +0000 regmap: Merge fix for where we get the number of registers from This didn't get sent for 6.1 since we should do a better fix but that didn't happen in time. commit e3eca2e4f6489ed3143c80ce90bfa7ef7e12ebc7 Merge: 830b3c68c1fb ef5bb8e7a712 bbc4d205d93f 462e768b55a2 7eb99841f340 f04ae51dd965 73f5fc5f884a 21c1f9021f0e e5b0feb4361a 88699c024f92 b169a180bef2 Author: Joerg Roedel Date: Mon Dec 12 12:50:53 2022 +0100 Merge branches 'arm/allwinner', 'arm/exynos', 'arm/mediatek', 'arm/rockchip', 'arm/smmu', 'ppc/pamu', 's390', 'x86/vt-d', 'x86/amd' and 'core' into next commit 462e768b55a2331324ff72e74706261134369826 Author: Dan Carpenter Date: Wed Dec 7 18:56:09 2022 +0300 iommu/mediatek: Fix forever loop in error handling There is a typo so this loop does i++ where i-- was intended. It will result in looping until the kernel crashes. Fixes: 26593928564c ("iommu/mediatek: Add error path for loop of mm_dts_parse") Signed-off-by: Dan Carpenter Reviewed-by: Yong Wu Link: https://lore.kernel.org/r/Y5C3mTam2nkbaz6o@kili Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 47bf2b2393ea1aacdefbe4e9d643599e057bb3a2 Merge: 3abcc01c38bc 39dbb21b6a29 Author: Marc Kleine-Budde Date: Mon Dec 12 12:01:26 2022 +0100 Merge patch series "can: m_can: Optimizations for tcan and peripheral chips" Markus Schneider-Pargmann says: as requested I split the series into two parts. This is the first parts with simple improvements to reduce the number of SPI transfers. The second part will be the rest with coalescing support and more complex optimizations. Changes since v1: https://lore.kernel.org/all/20221116205308.2996556-1-msp@baylibre.com - Fixed register ranges - Added fixes: tag for two patches Link: https://lore.kernel.org/all/20221206115728.1056014-1-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit 39dbb21b6a2951a2ce311c93eb09f9ff9b96e7b8 Author: Markus Schneider-Pargmann Date: Tue Dec 6 12:57:28 2022 +0100 can: tcan4x5x: Specify separate read/write ranges Specify exactly which registers are read/writeable in the chip. This is supposed to help detect any violations in the future. Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20221206115728.1056014-12-msp@baylibre.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/tcan4x5x-regmap.c | 43 ++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 6 deletions(-) commit ef5778f7084196997e00095c43b12693ef5111d0 Author: Markus Schneider-Pargmann Date: Tue Dec 6 12:57:27 2022 +0100 can: tcan4x5x: Fix register range of first two blocks According to the datasheet 0x10 is the last register in the first block, not register 0x2c. The datasheet lists the last register of the second block as 0x830, not 0x83c. Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20221206115728.1056014-11-msp@baylibre.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/tcan4x5x-regmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 67727a17a6b375d68fe569b77e6516b034b834c0 Author: Markus Schneider-Pargmann Date: Tue Dec 6 12:57:26 2022 +0100 can: tcan4x5x: Fix use of register error status mask TCAN4X5X_ERROR_STATUS is not a status register that needs clearing during interrupt handling. Instead this is a masking register that masks error interrupts. Writing TCAN4X5X_CLEAR_ALL_INT to this register effectively masks everything. Rename the register and mask all error interrupts only once by writing to the register in tcan4x5x_init. Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20221206115728.1056014-10-msp@baylibre.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/tcan4x5x-core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 40c9e4f676abbe194541d88e796341c92d5a13c0 Author: Markus Schneider-Pargmann Date: Tue Dec 6 12:57:25 2022 +0100 can: tcan4x5x: Remove invalid write in clear_interrupts Register 0x824 TCAN4X5X_MCAN_INT_REG is a read-only register. Any writes to this register do not have any effect. Remove this write. The m_can driver aldready clears the interrupts in m_can_isr() by writing to M_CAN_IR which is translated to register 0x1050 which is a writable version of this register. Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20221206115728.1056014-9-msp@baylibre.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/tcan4x5x-core.c | 5 ----- 1 file changed, 5 deletions(-) commit e2f1c8cb020296ddfa255e06b15f071807c2ed73 Author: Markus Schneider-Pargmann Date: Tue Dec 6 12:57:24 2022 +0100 can: m_can: Batch acknowledge rx fifo Instead of acknowledging every item of the fifo, only acknowledge the last item read. This behavior is documented in the datasheet. The new getindex will be the acknowledged item + 1. Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20221206115728.1056014-8-msp@baylibre.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit e3bff5256a0f12a1edc8d79bdef53eb83c2f1fbf Author: Markus Schneider-Pargmann Date: Tue Dec 6 12:57:23 2022 +0100 can: m_can: Batch acknowledge transmit events Transmit events from the txe fifo can be batch acknowledged by acknowledging the last read txe fifo item. This will save txe_count writes which is important for peripheral chips. Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20221206115728.1056014-7-msp@baylibre.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 6355a3c983e6d6fc998f4223bd2c7ef047e4572b Author: Markus Schneider-Pargmann Date: Tue Dec 6 12:57:22 2022 +0100 can: m_can: Count read getindex in the driver The getindex gets increased by one every time. We can calculate the correct getindex in the driver and avoid the additional reads of rxfs. Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20221206115728.1056014-6-msp@baylibre.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit d4535b90a76af49d1dd7bc70ad0311a88ac5313d Author: Markus Schneider-Pargmann Date: Tue Dec 6 12:57:21 2022 +0100 can: m_can: Count TXE FIFO getidx in the driver The getindex simply increases by one for every iteration. There is no need to get the current getidx every time from a register. Instead we can just count and wrap if necessary. Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20221206115728.1056014-5-msp@baylibre.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fac52bf786e5c302990fa79f2fdde24e84f810b0 Author: Markus Schneider-Pargmann Date: Tue Dec 6 12:57:20 2022 +0100 can: m_can: Read register PSR only on error Only read register PSR if there is an error indicated in irqstatus. Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20221206115728.1056014-4-msp@baylibre.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 57757937974988dc8feb7cf66b17dca72bca813b Author: Markus Schneider-Pargmann Date: Tue Dec 6 12:57:19 2022 +0100 can: m_can: Avoid reading irqstatus twice For peripheral devices the m_can_rx_handler is called directly after setting cdev->irqstatus. This means we don't have to read the irqstatus again in m_can_rx_handler. Avoid this by adding a parameter that is false for direct calls. Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20221206115728.1056014-3-msp@baylibre.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit c1eaf8b9bd3145d029446c927e1c9ce925dfe6a7 Author: Markus Schneider-Pargmann Date: Tue Dec 6 12:57:18 2022 +0100 can: m_can: Eliminate double read of TXFQS in tx_handler The TXFQS register is read first to check if the fifo is full and then immediately again to get the putidx. This is unnecessary and adds significant overhead if read requests are done over a slow bus, for example SPI with tcan4x5x. Add a variable to store the value of the register. Split the m_can_tx_fifo_full function into two to avoid the hidden m_can_read call if not needed. Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20221206115728.1056014-2-msp@baylibre.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 3abcc01c38bc5d424635df96e0677e2fbec021de Author: Geert Uytterhoeven Date: Wed Dec 7 17:50:21 2022 +0100 dt-bindings: can: renesas,rcar-canfd: Fix number of channels for R-Car V3U According to the bindings, only two channels are supported. However, R-Car V3U supports eight, leading to "make dtbs" failures: arch/arm64/boot/dts/renesas/r8a779a0-falcon.dtb: can@e6660000: Unevaluated properties are not allowed ('channel2', 'channel3', 'channel4', 'channel5', 'channel6', 'channel7' were unexpected) Update the number of channels to 8 on R-Car V3U. While at it, prevent adding more properties to the channel nodes, as they must contain no other properties than a status property. Fixes: d6254d52d70de530 ("dt-bindings: can: renesas,rcar-canfd: Document r8a779a0 support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/all/7d41d72cd7db2e90bae069ce57dbb672f17500ae.1670431681.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde .../bindings/net/can/renesas,rcar-canfd.yaml | 133 +++++++++++---------- 1 file changed, 72 insertions(+), 61 deletions(-) commit 0826e82b8a32e646b7b32ba8b68ba30812028e47 Author: Marc Kleine-Budde Date: Fri Dec 9 10:10:08 2022 +0100 can: raw: add support for SO_MARK Add support for SO_MARK to the CAN_RAW protocol. This makes it possible to add traffic control filters based on the fwmark. Link: https://lore.kernel.org/all/20221210113653.170346-1-mkl@pengutronix.de Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde net/can/raw.c | 1 + 1 file changed, 1 insertion(+) commit eaacfeaca7ad0804b9a6eff7afeba93a87db7638 Author: Vivek Yadav Date: Wed Dec 7 15:36:31 2022 +0530 can: m_can: Call the RAM init directly from m_can_chip_config When we try to access the mcan message ram addresses during the probe, hclk is gated by any other drivers or disabled, because of that probe gets failed. Move the mram init functionality to mcan chip config called by m_can_start from mcan open function, by that time clocks are enabled. Suggested-by: Marc Kleine-Budde Signed-off-by: Vivek Yadav Link: https://lore.kernel.org/all/20221207100632.96200-2-vivek.2311@samsung.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 32 ++++++++++++++++++++++++++------ drivers/net/can/m_can/m_can_platform.c | 4 ---- drivers/net/can/m_can/tcan4x5x-core.c | 5 ----- 3 files changed, 26 insertions(+), 15 deletions(-) commit bd4a52bf9d56abaabc6926f68c3cc3528937a864 Merge: f793458bba54 56c56a309e79 Author: Marc Kleine-Budde Date: Mon Dec 12 11:41:58 2022 +0100 Merge patch series "can: usb: remove pointers to struct usb_interface in device's priv structures" Vincent Mailhol says: The gs_can and ucan drivers keep a pointer to struct usb_interface in their private structure. This is not needed. For gs_can the only use is to retrieve struct usb_device, which is already available in gs_usb::udev. For ucan, the field is set but never used. Remove the struct usb_interface fields and clean up. Link: https://lore.kernel.org/all/20221208081142.16936-1-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde commit 56c56a309e7959c319d3cbd6bd16e598ecd5831c Author: Vincent Mailhol Date: Thu Dec 8 17:11:42 2022 +0900 can: gs_usb: remove gs_can::iface The iface field of struct gs_can is only used to retrieve the usb_device which is already available in gs_can::udev. Replace each occurrence of interface_to_usbdev(dev->iface) with dev->udev. This done, remove gs_can::iface. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20221208081142.16936-3-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit f54b101ddeaea68fe7e52e842deb8b7a081bf156 Author: Vincent Mailhol Date: Thu Dec 8 17:11:41 2022 +0900 can: ucan: remove unused ucan_priv::intf Field intf of struct ucan_priv is set but never used. Remove it. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20221208081142.16936-2-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/ucan.c | 2 -- 1 file changed, 2 deletions(-) commit f793458bba544e29657efbfa53b62dc511c6f22c Author: Ye Bin Date: Thu Dec 8 17:09:40 2022 +0800 net: af_can: remove useless parameter 'err' in 'can_rx_register()' Since commit bdfb5765e45b remove NULL-ptr checks from users of can_dev_rcv_lists_find(). 'err' parameter is useless, so remove it. Signed-off-by: Ye Bin Link: https://lore.kernel.org/all/20221208090940.3695670-1-yebin@huaweicloud.com Signed-off-by: Marc Kleine-Budde net/can/af_can.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7fdaf8966aae476deafe11f9a0067ff588615444 Author: Xu Panda Date: Wed Dec 7 09:09:09 2022 +0800 can: ucan: 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/all/202212070909095189693@zte.com.cn Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/ucan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5425094a39caf1cf501a71a0c149604656046acb Merge: 74d95352bdfc 9f63f96aac92 Author: Marc Kleine-Budde Date: Mon Dec 12 11:40:16 2022 +0100 Merge patch series "can: etas_es58x: report firmware, bootloader and hardware version" Vincent Mailhol says: The goal of this series is to report the firmware version, the bootloader version and the hardware revision of ETAS ES58x devices. These are already reported in the kernel log but this isn't best practice. Remove the kernel log and instead export all these through devlink. The devlink core automatically exports the firmware and the bootloader version to ethtool, so no need to implement the ethtool_ops::get_drvinfo() callback anymore. Patch one and two implement the core support for devlink (at device level) and devlink port (at the network interface level). Patch three export usb_cache_string() and patch four add a new info attribute to devlink.h. Both are prerequisites for patch five. Patch five is the actual goal: it parses the product information from a custom usb string returned by the device and expose them through devlink. Patch six removes the product information from the kernel log. Finally, patch seven add a devlink documentation page with list all the information attributes reported by the driver. * Sample outputs following this series * | $ devlink dev info | usb/1-9:1.1: | serial_number 0108954 | versions: | fixed: | board.rev B012/000 | running: | fw 04.00.01 | fw.bootloader 02.00.00 | $ devlink port show can0 | usb/1-9:1.1/0: type eth netdev can0 flavour physical port 0 splittable false | $ ethtool -i can0 | driver: etas_es58x | version: 6.1.0-rc7+ | firmware-version: 04.00.01 02.00.00 | expansion-rom-version: | bus-info: 1-9:1.1 | supports-statistics: no | supports-test: no | supports-eeprom-access: no | supports-register-dump: no | supports-priv-flags: no * Changelog * v4 -> v5: https://lore.kernel.org/all/20221130174658.29282-1-mailhol.vincent@wanadoo.fr * [PATH 2/7] add devlink port support. This extends devlink to the network interface. * thanks to devlink port, 'ethtool -i' is now able to retrieve the firmware version from devlink. No need to implement the ethtool_ops::get_drvinfo() callback anymore: remove one patch from the series. * [PATCH 4/7] A new patch to add a new info attribute for the bootloader version in devlink.h. This patch was initially sent as a standalone patch here: https://lore.kernel.org/netdev/20221129031406.3849872-1-mailhol.vincent@wanadoo.fr Merging it to this series so that it is both added and used at the same time. * [PATCH 5/7] use the newly info attribute defined in patch 4/7 to report the bootloader version instead of the custom string "bl". * [PATCH 5/7] because the series does not implement ethtool_ops::get_drvinfo() anymore, the two helper functions es58x_sw_version_is_set() and es58x_hw_revision_is_set() are only used in devlink.c. Move them from es58x_core.h to es58x_devlink.c. * [PATCH 5/7] small rework of the helper function es58x_hw_revision_is_set(): it is OK to only check the letter (if the letter is '\0', it will not be possible to print the next numbers). * [PATCH 5/7 and 6/7] add reviewed-by Andrew Lunn tag. * [PATCH 7/7] Now, 'ethtool -i' reports both the firmware version and the bootloader version (this is how the core export the information from devlink to ethtool). Update the documentation to reflect this fact. * Reoder the patches. v3 -> v4: https://lore.kernel.org/all/20221126162211.93322-1-mailhol.vincent@wanadoo.fr * major rework to use devlink instead of sysfs following Andrew's comment. * split the series in 6 patches. * [PATCH 1/6] add Acked-by: Greg Kroah-Hartman v2 -> v3: https://lore.kernel.org/all/20221113040108.68249-1-mailhol.vincent@wanadoo.fr * patch 2/3: do not spam the kernel log anymore with the product number. Instead parse the product information string, extract the firmware version, the bootloadar version and the hardware revision and export them through sysfs. * patch 2/3: rework the parsing in order not to need additional fields in struct es58x_parameters. * patch 3/3: only populate ethtool_drvinfo::fw_version because since commit edaf5df22cb8 ("ethtool: ethtool_get_drvinfo: populate drvinfo fields even if callback exits"), there is no need to populate ethtool_drvinfo::driver and ethtool_drvinfo::bus_info in the driver. v1 -> v2: https://lore.kernel.org/all/20221104171604.24052-1-mailhol.vincent@wanadoo.fr * was a single patch. It is now a series of three patches. * add a first new patch to export usb_cache_string(). * add a second new patch to apply usb_cache_string() to existing code. * add missing check on product info string to prevent a buffer overflow. * add comma on the last entry of struct es58x_parameters. v1: https://lore.kernel.org/all/20221104073659.414147-1-mailhol.vincent@wanadoo.fr Link: https://lore.kernel.org/all/20221130174658.29282-1-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde commit 9f63f96aac92751e85f8313f59f2c867b88ea453 Author: Vincent Mailhol Date: Thu Dec 1 02:46:58 2022 +0900 Documentation: devlink: add devlink documentation for the etas_es58x driver List all the version information reported by the etas_es58x driver through devlink. Also, update MAINTAINERS with the newly created file. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20221130174658.29282-8-mailhol.vincent@wanadoo.fr [mkl: fixed version information table: "bl" -> "fw.bootloader" Signed-off-by: Marc Kleine-Budde Documentation/networking/devlink/etas_es58x.rst | 36 +++++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 37 insertions(+) commit d8f26fd689dd81da8f4e72f17d1554c4c5b018c2 Author: Vincent Mailhol Date: Thu Dec 1 02:46:57 2022 +0900 can: etas_es58x: remove es58x_get_product_info() Now that the product information are available under devlink, no more need to print them in the kernel log. Remove es58x_get_product_info(). Signed-off-by: Vincent Mailhol Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/all/20221130174658.29282-7-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/etas_es58x/es58x_core.c | 52 ++--------------------------- 1 file changed, 3 insertions(+), 49 deletions(-) commit 9f06631c3f1f0f298536443df85a6837ba4c5f5c Author: Vincent Mailhol Date: Thu Dec 1 02:46:56 2022 +0900 can: etas_es58x: export product information through devlink_ops::info_get() ES58x devices report below product information through a custom usb string: * the firmware version * the bootloader version * the hardware revision Parse this string, store the results in struct es58x_dev, export: * the firmware version through devlink's "fw" name * the bootloader version through devlink's "fw.bootloader" name * the hardware revisionthrough devlink's "board.rev" name Those devlink entries are not critical to use the device, if parsing fails, print an informative log message and continue to probe the device. In addition to that, use usb_device::serial to report the device serial number. Signed-off-by: Vincent Mailhol Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/all/20221130174658.29282-6-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/etas_es58x/es58x_core.c | 1 + drivers/net/can/usb/etas_es58x/es58x_core.h | 41 +++++ drivers/net/can/usb/etas_es58x/es58x_devlink.c | 222 +++++++++++++++++++++++++ 3 files changed, 264 insertions(+) commit 01d80532295cd359dc43e6bd71860d5515f84372 Author: Vincent Mailhol Date: Thu Dec 1 02:46:55 2022 +0900 net: devlink: add DEVLINK_INFO_VERSION_GENERIC_FW_BOOTLOADER As discussed in [1], abbreviating the bootloader to "bl" might not be well understood. Instead, a bootloader technically being a firmware, name it "fw.bootloader". Add a new macro to devlink.h to formalize this new info attribute name and update the documentation. [1] https://lore.kernel.org/netdev/20221128142723.2f826d20@kernel.org/ Suggested-by: Jakub Kicinski Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20221130174658.29282-5-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde Documentation/networking/devlink/devlink-info.rst | 5 +++++ include/net/devlink.h | 2 ++ 2 files changed, 7 insertions(+) commit 74d95352bdfc4ed1eb72ef9d69e06ed2d6891ff7 Author: Minghao Chi Date: Fri Nov 11 14:43:00 2022 +0800 can: c_can: 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. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Link: https://lore.kernel.org/all/202211111443005202576@zte.com.cn Signed-off-by: Marc Kleine-Budde drivers/net/can/c_can/c_can_platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 983055bf839745ec2812fc55cacd96888aa0d7a6 Author: Vincent Mailhol Date: Thu Dec 1 02:46:54 2022 +0900 USB: core: export usb_cache_string() usb_cache_string() can also be useful for the drivers so export it. Signed-off-by: Vincent Mailhol Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/all/20221130174658.29282-4-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/usb/core/message.c | 1 + drivers/usb/core/usb.h | 1 - include/linux/usb.h | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) commit 5237ff4e7d3d60e19c0625169361eb40cd435f6d Author: Lad Prabhakar Date: Tue Nov 15 12:38:11 2022 +0000 dt-bindings: can: renesas,rcar-canfd: Document RZ/Five SoC The CANFD block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,r9a07g043-canfd" 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-canfd" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/20221115123811.1182922-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Marc Kleine-Budde Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 594a25e1ffc59fd1ef9a6760a1eb2ef6bbd4cfc1 Author: Vincent Mailhol Date: Thu Dec 1 02:46:53 2022 +0900 can: etas_es58x: add devlink port support Add support for devlink port which extends the devlink support to the network interface level. For now, the etas_es58x driver will only rely on the default features that devlink port has to offer and not implement additional feature ones. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20221130174658.29282-3-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/etas_es58x/es58x_core.c | 34 ++++++++++++++++++++++------- drivers/net/can/usb/etas_es58x/es58x_core.h | 3 +++ 2 files changed, 29 insertions(+), 8 deletions(-) commit a21cee59b41695957f2eeb3943e345e8a68732c4 Author: Haibo Chen Date: Tue Nov 22 19:32:31 2022 +0800 dt-bindings: can: fsl,flexcan: add imx93 compatible Add a new compatible string for imx93. Signed-off-by: Haibo Chen Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/all/1669116752-4260-2-git-send-email-haibo.chen@nxp.com Signed-off-by: Marc Kleine-Budde Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml | 1 + 1 file changed, 1 insertion(+) commit 2c4a1efcf6ab37abef8b593a4c0dda43557504c8 Author: Vincent Mailhol Date: Thu Dec 1 02:46:52 2022 +0900 can: etas_es58x: add devlink support Add basic support for devlink at the device level. The callbacks of struct devlink_ops will be implemented next. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20221130174658.29282-2-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/Kconfig | 1 + drivers/net/can/usb/etas_es58x/Makefile | 2 +- drivers/net/can/usb/etas_es58x/es58x_core.c | 13 ++++++++++--- drivers/net/can/usb/etas_es58x/es58x_core.h | 6 ++++++ drivers/net/can/usb/etas_es58x/es58x_devlink.c | 13 +++++++++++++ 5 files changed, 31 insertions(+), 4 deletions(-) commit 8cb53b485f18732c1e0671a0e826063de47650a6 Author: Haibo Chen Date: Tue Nov 22 19:32:30 2022 +0800 can: flexcan: add auto stop mode for IMX93 to support wakeup IMX93 do not contain a GPR to config the stop mode, it will set the flexcan into stop mode automatically once the ARM core go into low power mode (WFI instruct) and gate off the flexcan related clock automatically. But to let these logic work as expect, before ARM core go into low power mode, need to make sure the flexcan related clock keep on. To support stop mode and wakeup feature on imx93, this patch add a new fsl_imx93_devtype_data to separate from imx8mp. Signed-off-by: Haibo Chen Link: https://lore.kernel.org/all/1669116752-4260-1-git-send-email-haibo.chen@nxp.com Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan/flexcan-core.c | 37 +++++++++++++++++++++++++++++++--- drivers/net/can/flexcan/flexcan.h | 2 ++ 2 files changed, 36 insertions(+), 3 deletions(-) commit 8fd9323ef7210b90d1d209dd4f0d65a8411b60e1 Author: Vincent Mailhol Date: Sun Nov 27 01:05:25 2022 +0900 can: etas_es58x: sort the includes by alphabetic order Follow the best practices, reorder the includes. While doing so, bump up copyright year of each modified files. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/all/20221126160525.87036-1-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/etas_es58x/es581_4.c | 4 ++-- drivers/net/can/usb/etas_es58x/es58x_core.c | 6 +++--- drivers/net/can/usb/etas_es58x/es58x_core.h | 8 ++++---- drivers/net/can/usb/etas_es58x/es58x_fd.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) commit 005c54278b3dd38f6045a2450a8c988cc7d3def2 Author: Jean Delvare Date: Thu Nov 24 14:16:04 2022 +0100 can: ctucanfd: 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: Pavel Pisa Cc: Ondrej Ille Acked-by: Pavel Pisa Link: https://lore.kernel.org/all/20221124141604.4265225f@endymion.delvare Signed-off-by: Marc Kleine-Budde drivers/net/can/ctucanfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a59d65e1be4dadb640bacd109417a248a996bb82 Merge: 09451f244eab ea6ff7792203 Author: Marc Kleine-Budde Date: Mon Dec 12 11:37:56 2022 +0100 Merge patch series "R-Car CAN FD driver enhancements" Biju Das says: The CAN FD IP found on RZ/G2L SoC has some HW features different to that of R-Car. For example, it has multiple resets, dedicated channel tx and error interrupts, separate global rx and error interrupts compared to shared irq for R-Car. it does not s ECC error flag registers and clk post divider present on R-Car. Similarly, R-Car V3U has 8 channels whereas other SoCs has only 2 channels. Currently all the HW differences are handled by comparing with chip_id enum. This patch series aims to replace chip_id with struct rcar_canfd_hw_info to handle the HW feature differences and driver data present on both IPs. The changes are trivial and tested on RZ/G2L SMARC EVK. This patch series depend upon [1]. [1] https://lore.kernel.org/all/20221025155657.1426948-1-biju.das.jz@bp.renesas.com changes since v2: https://lore.kernel.org/all/20221026131732.1843105-1-biju.das.jz@bp.renesas.com * Replaced data type of max_channels from unsigned int->u8 to save memory. * Replaced data type of postdiv from unsigned int->u8 to save memory. changes since v1: https://lore.kernel.org/all/20221022104357.1276740-1-biju.das.jz@bp.renesas.com * Updated commit description for R-Car V3U SoC detection using driver data. * Replaced data type of max_channels from u32->unsigned int. * Replaced multi_global_irqs->shared_global_irqs to make it positive checks. * Replaced clk_postdiv->postdiv driver data variable. * Simplified the calcualtion for fcan_freq. * Replaced info->has_gerfl to gpriv->info->has_gerfl and wrapped the ECC error flag checks inside a single if statement. * Added Rb tag from Geert patch#1,#2,#3 and #5 Link: https://lore.kernel.org/all/20221027082158.95895-1-biju.das.jz@bp.renesas.com [mkl: only take patches 1...5 to avoid merge conflict] Signed-off-by: Marc Kleine-Budde commit 21af0d557ea932e50094a48adb20e356e2f6ffef Merge: a2d40ce7acdb ebddb1404900 Author: David S. Miller Date: Mon Dec 12 10:14:03 2022 +0000 Merge branch 'ovs-tc-dedup' Xin Long says: ==================== net: eliminate the duplicate code in the ct nat functions of ovs and tc The changes in the patchset: "net: add helper support in tc act_ct for ovs offloading" had moved some common ct code used by both OVS and TC into netfilter. There are still some big functions pretty similar defined and used in each of OVS and TC. It is not good to maintain such big function in 2 places. This patchset is to extract the functions for NAT processing from OVS and TC to netfilter. To make this change clear and safe, this patchset gets the common code out of OVS and TC step by step: The patch 1-4 make some minor changes in OVS and TC to make the NAT code of them completely the same, then the patch 5 moves the common code to the netfilter and exports one function called by each of OVS and TC. v1->v2: - Create nf_nat_ovs.c to include the nat functions, as Pablo suggested. v2->v3: - fix a typo in subject of patch 2/5, as Marcelo noticed. - fix in openvswitch to keep OVS ct nat and TC ct nat consistent in patch 3/5 instead of in tc, as Marcelo noticed. - use BIT(var) macro instead of (1 << var) in patch 5/5, as Marcelo suggested. - use ifdef in netfilter/Makefile to build nf_nat_ovs only when OVS or TC ct action is enabled in patch 5/5, as Marcelo suggested. v3->v4: - add NF_NAT_OVS in netfilter/Kconfig and add select NF_NAT_OVS in OVS and TC Kconfig instead of using ifdef in netfilter/Makefile, as Pablo suggested. ==================== Signed-off-by: David S. Miller commit ebddb1404900657b7f03a56ee4c34a9d218c4030 Author: Xin Long Date: Thu Dec 8 11:56:12 2022 -0500 net: move the nat function to nf_nat_ovs for ovs and tc There are two nat functions are nearly the same in both OVS and TC code, (ovs_)ct_nat_execute() and ovs_ct_nat/tcf_ct_act_nat(). This patch creates nf_nat_ovs.c under netfilter and moves them there then exports nf_ct_nat() so that it can be shared by both OVS and TC, and keeps the nat (type) check and nat flag update in OVS and TC's own place, as these parts are different between OVS and TC. Note that in OVS nat function it was using skb->protocol to get the proto as it already skips vlans in key_extract(), while it doesn't in TC, and TC has to call skb_protocol() to get proto. So in nf_ct_nat_execute(), we keep using skb_protocol() which works for both OVS and TC contrack. Signed-off-by: Xin Long Acked-by: Aaron Conole Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/netfilter/nf_nat.h | 4 ++ net/netfilter/Kconfig | 3 + net/netfilter/Makefile | 1 + net/netfilter/nf_nat_ovs.c | 135 ++++++++++++++++++++++++++++++++++++++++ net/openvswitch/Kconfig | 1 + net/openvswitch/conntrack.c | 137 +++-------------------------------------- net/sched/Kconfig | 1 + net/sched/act_ct.c | 136 ++++------------------------------------ 8 files changed, 166 insertions(+), 252 deletions(-) commit 0564c3e51bc7bb200e76d0cad2d7067cc77cb83e Author: Xin Long Date: Thu Dec 8 11:56:11 2022 -0500 net: sched: update the nat flag for icmp error packets in ct_nat_execute In ovs_ct_nat_execute(), the packet flow key nat flags are updated when it processes ICMP(v6) error packets translation successfully. In ct_nat_execute() when processing ICMP(v6) error packets translation successfully, it should have done the same in ct_nat_execute() to set post_ct_s/dnat flag, which will be used to update flow key nat flags in OVS module later. Reviewed-by: Saeed Mahameed Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sched/act_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b85144ab36e0e870f59b5ae55e299179eb8cdb8 Author: Xin Long Date: Thu Dec 8 11:56:10 2022 -0500 openvswitch: return NF_DROP when fails to add nat ext in ovs_ct_nat When it fails to allocate nat ext, the packet should be dropped, like the memory allocation failures in other places in ovs_ct_nat(). This patch changes to return NF_DROP when fails to add nat ext before doing NAT in ovs_ct_nat(), also it would keep consistent with tc action ct' processing in tcf_ct_act_nat(). Signed-off-by: Xin Long Acked-by: Aaron Conole Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7795928921332fdd52c33eab73f1280d5e58678a Author: Xin Long Date: Thu Dec 8 11:56:09 2022 -0500 openvswitch: return NF_ACCEPT when OVS_CT_NAT is not set in info nat Either OVS_CT_SRC_NAT or OVS_CT_DST_NAT is set, OVS_CT_NAT must be set in info->nat. Thus, if OVS_CT_NAT is not set in info->nat, it will definitely not do NAT but returns NF_ACCEPT in ovs_ct_nat(). This patch changes nothing funcational but only makes this return earlier in ovs_ct_nat() to keep consistent with TC's processing in tcf_ct_act_nat(). Reviewed-by: Saeed Mahameed Acked-by: Aaron Conole Signed-off-by: Xin Long Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bf14f4923d516d77320500461c0692c9d4480c30 Author: Xin Long Date: Thu Dec 8 11:56:08 2022 -0500 openvswitch: delete the unncessary skb_pull_rcsum call in ovs_ct_nat_execute The calls to ovs_ct_nat_execute() are as below: ovs_ct_execute() ovs_ct_lookup() __ovs_ct_lookup() ovs_ct_nat() ovs_ct_nat_execute() ovs_ct_commit() __ovs_ct_lookup() ovs_ct_nat() ovs_ct_nat_execute() and since skb_pull_rcsum() and skb_push_rcsum() are already called in ovs_ct_execute(), there's no need to do it again in ovs_ct_nat_execute(). Reviewed-by: Saeed Mahameed Acked-by: Aaron Conole Signed-off-by: Xin Long Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit f8ab263d4d48e6dab752029bf562f20a2ee630ed Author: Tom Lendacky Date: Thu Dec 8 10:22:25 2022 -0600 net: amd-xgbe: Check only the minimum speed for active/passive cables There are cables that exist that can support speeds in excess of 10GbE. The driver, however, restricts the EEPROM advertised nominal bitrate to a specific range, which can prevent usage of cables that can support, for example, up to 25GbE. Rather than checking that an active or passive cable supports a specific range, only check for a minimum supported speed. Fixes: abf0a1c2b26a ("amd-xgbe: Add support for SFP+ modules") Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 4998006c73afe44e2f639d55bd331c6c26eb039f Author: Tom Lendacky Date: Thu Dec 8 10:22:24 2022 -0600 net: amd-xgbe: Fix logic around active and passive cables SFP+ active and passive cables are copper cables with fixed SFP+ end connectors. Due to a misinterpretation of this, SFP+ active cables could end up not being recognized, causing the driver to fail to establish a connection. Introduce a new enum in SFP+ cable types, XGBE_SFP_CABLE_FIBER, that is the default cable type, and handle active and passive cables when they are specifically detected. Fixes: abf0a1c2b26a ("amd-xgbe: Add support for SFP+ modules") Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 73e341e0281a35274629e9be27eae2f9b1b492bf Author: Yang Yingliang Date: Thu Dec 8 23:01:58 2022 +0800 af_unix: call proto_unregister() in the error path in af_unix_init() If register unix_stream_proto returns error, unix_dgram_proto needs be unregistered. Fixes: 94531cfcbe79 ("af_unix: Add unix_stream_proto for sockmap") Signed-off-by: Yang Yingliang Reviewed-by: Simon Horman Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/unix/af_unix.c | 1 + 1 file changed, 1 insertion(+) commit 526682b458b1b56d2e0db027df535cb5cdcfde59 Author: Richard Gobert Date: Thu Dec 8 15:54:46 2022 +0100 net: setsockopt: fix IPV6_UNICAST_IF option for connected sockets Change the behaviour of ip6_datagram_connect to consider the interface set by the IPV6_UNICAST_IF socket option, similarly to udpv6_sendmsg. This change is the IPv6 counterpart of the fix for IP_UNICAST_IF. The tests introduced by that patch showed that the incorrect behavior is present in IPv6 as well. This patch fixes the broken test. Reported-by: kernel test robot Link: https://lore.kernel.org/r/202210062117.c7eef1a3-oliver.sang@intel.com Fixes: 0e4d354762ce ("net-next: Fix IP_UNICAST_IF option behavior for connected sockets") Signed-off-by: Richard Gobert Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv6/datagram.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit a2d40ce7acdbf4641235ee8be4b4d338746c03b5 Author: Xu Panda Date: Fri Dec 9 15:37:29 2022 +0800 myri10ge: 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: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f6b759f56d1e2e3333a14936830e2377cbc9539e Author: Xu Panda Date: Fri Dec 9 15:34:49 2022 +0800 liquidio: 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: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/octeon_console.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 94d30e8933382184b257e94ac0d020d3f56ed614 Author: Xu Panda Date: Fri Dec 9 15:33:25 2022 +0800 hns: 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: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 1b1661f68b5f2b8ead9de3510cf6c1c7751863a4 Merge: 5fe02e046e64 6151d105dfce Author: David S. Miller Date: Mon Dec 12 09:56:17 2022 +0000 Merge branch 'net-dev_kfree_skb_irq' Yang Yingliang says: ==================== net: 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. This patchset replace dev_kfree_skb() with dev_kfree_skb_irq/dev_consume_skb_irq() under spin_lock_irqsave() in some drivers, or move dev_kfree_skb() after spin_unlock_irqrestore(). v2 -> v3: Update commit message, and change to use dev_kfree_skb_irq() in patch #1, #3. v1 -> v2: patch #2 Move dev_kfree_skb() after spin_unlock_irqrestore() ==================== Signed-off-by: David S. Miller commit 6151d105dfce8c23edf30eed35e97f3d9b96a35c Author: Yang Yingliang Date: Thu Dec 8 22:21:47 2022 +0800 net: amd: lance: 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 these two cases, dev_kfree_skb() is called consume the xmited SKB, so replace it with dev_consume_skb_irq(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller drivers/net/ethernet/amd/atarilance.c | 2 +- drivers/net/ethernet/amd/lance.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3727f742915f04f6fc550b80cf406999bd4e90d0 Author: Yang Yingliang Date: Thu Dec 8 22:21:46 2022 +0800 hamradio: 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 scc_discard_buffers(), dev_kfree_skb() is called to discard the SKBs, so replace it with dev_kfree_skb_irq(). In scc_net_tx(), dev_kfree_skb() is called to drop the SKB that exceed queue length, so replace it with dev_kfree_skb_irq(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller drivers/net/hamradio/scc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f07fadcbee2a5e84caa67c7c445424200bffb60b Author: Yang Yingliang Date: Thu Dec 8 22:21:45 2022 +0800 net: ethernet: dnet: 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. In this case, the lock is used to protected 'bp', so we can move dev_kfree_skb() after the spin_unlock_irqrestore(). Fixes: 4796417417a6 ("dnet: Dave DNET ethernet controller driver (updated)") Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller drivers/net/ethernet/dnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1678bf45f21fa5ae4a456f821858679556ea5f8 Author: Yang Yingliang Date: Thu Dec 8 22:21:44 2022 +0800 net: emaclite: 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 in xemaclite_tx_timeout() to drop the SKB, when tx timeout, so replace it with dev_kfree_skb_irq(). Fixes: bb81b2ddfa19 ("net: add Xilinx emac lite device driver") Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fe02e046e6422c4adfdbc50206ec7186077da24 Author: Yang Yingliang Date: Thu Dec 8 21:37:35 2022 +0800 net: apple: bmac: 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 in bmac_tx_timeout() to drop the SKB, when tx timeout, so replace it with dev_kfree_skb_irq(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller drivers/net/ethernet/apple/bmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3dfe3486c1cd4f82b466b7d307f23777137b8acc Author: Yang Yingliang Date: Thu Dec 8 21:37:34 2022 +0800 net: apple: mace: 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 in mace_tx_timeout() to drop the SKB, when tx timeout, so replace it with dev_kfree_skb_irq(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller drivers/net/ethernet/apple/mace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cf7203ca620682165706f70a1b12b5194607dce Author: Hangbin Liu Date: Thu Dec 8 20:04:52 2022 +0800 net/tunnel: wait until all sk_user_data reader finish before releasing the sock There is a race condition in vxlan that when deleting a vxlan device during receiving packets, there is a possibility that the sock is released after getting vxlan_sock vs from sk_user_data. Then in later vxlan_ecn_decapsulate(), vxlan_get_sk_family() we will got NULL pointer dereference. e.g. #0 [ffffa25ec6978a38] machine_kexec at ffffffff8c669757 #1 [ffffa25ec6978a90] __crash_kexec at ffffffff8c7c0a4d #2 [ffffa25ec6978b58] crash_kexec at ffffffff8c7c1c48 #3 [ffffa25ec6978b60] oops_end at ffffffff8c627f2b #4 [ffffa25ec6978b80] page_fault_oops at ffffffff8c678fcb #5 [ffffa25ec6978bd8] exc_page_fault at ffffffff8d109542 #6 [ffffa25ec6978c00] asm_exc_page_fault at ffffffff8d200b62 [exception RIP: vxlan_ecn_decapsulate+0x3b] RIP: ffffffffc1014e7b RSP: ffffa25ec6978cb0 RFLAGS: 00010246 RAX: 0000000000000008 RBX: ffff8aa000888000 RCX: 0000000000000000 RDX: 000000000000000e RSI: ffff8a9fc7ab803e RDI: ffff8a9fd1168700 RBP: ffff8a9fc7ab803e R8: 0000000000700000 R9: 00000000000010ae R10: ffff8a9fcb748980 R11: 0000000000000000 R12: ffff8a9fd1168700 R13: ffff8aa000888000 R14: 00000000002a0000 R15: 00000000000010ae ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 #7 [ffffa25ec6978ce8] vxlan_rcv at ffffffffc10189cd [vxlan] #8 [ffffa25ec6978d90] udp_queue_rcv_one_skb at ffffffff8cfb6507 #9 [ffffa25ec6978dc0] udp_unicast_rcv_skb at ffffffff8cfb6e45 #10 [ffffa25ec6978dc8] __udp4_lib_rcv at ffffffff8cfb8807 #11 [ffffa25ec6978e20] ip_protocol_deliver_rcu at ffffffff8cf76951 #12 [ffffa25ec6978e48] ip_local_deliver at ffffffff8cf76bde #13 [ffffa25ec6978ea0] __netif_receive_skb_one_core at ffffffff8cecde9b #14 [ffffa25ec6978ec8] process_backlog at ffffffff8cece139 #15 [ffffa25ec6978f00] __napi_poll at ffffffff8ceced1a #16 [ffffa25ec6978f28] net_rx_action at ffffffff8cecf1f3 #17 [ffffa25ec6978fa0] __softirqentry_text_start at ffffffff8d4000ca #18 [ffffa25ec6978ff0] do_softirq at ffffffff8c6fbdc3 Reproducer: https://github.com/Mellanox/ovs-tests/blob/master/test-ovs-vxlan-remove-tunnel-during-traffic.sh Fix this by waiting for all sk_user_data reader to finish before releasing the sock. Reported-by: Jianlin Shi Suggested-by: Jakub Sitnicki Fixes: 6a93cc905274 ("udp-tunnel: Add a few more UDP tunnel APIs") Signed-off-by: Hangbin Liu Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller net/ipv4/udp_tunnel_core.c | 1 + 1 file changed, 1 insertion(+) commit 2f623aaf9f31de968dea6169849706a2f9be444c Author: Li Zetao Date: Thu Dec 8 20:05:40 2022 +0800 net: farsync: Fix kmemleak when rmmods farsync There are two memory leaks reported by kmemleak: unreferenced object 0xffff888114b20200 (size 128): comm "modprobe", pid 4846, jiffies 4295146524 (age 401.345s) hex dump (first 32 bytes): e0 62 57 09 81 88 ff ff e0 62 57 09 81 88 ff ff .bW......bW..... 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmalloc_trace+0x22/0x60 [] __hw_addr_add_ex+0x198/0x6c0 [] dev_addr_init+0x13d/0x230 [] alloc_netdev_mqs+0x10d/0xe50 [] alloc_hdlcdev+0x2e/0x80 [] fst_add_one+0x601/0x10e0 [farsync] ... unreferenced object 0xffff88810b85b000 (size 1024): comm "modprobe", pid 4846, jiffies 4295146523 (age 401.346s) hex dump (first 32 bytes): 00 00 b0 02 00 c9 ff ff 00 70 0a 00 00 c9 ff ff .........p...... 00 00 00 f2 00 00 00 f3 0a 00 00 00 02 00 00 00 ................ backtrace: [] kmalloc_trace+0x22/0x60 [] fst_add_one+0x154/0x10e0 [farsync] [] local_pci_probe+0xd3/0x170 ... The root cause is traced to the netdev and fst_card_info are not freed when removes one fst in fst_remove_one(), which may trigger oom if repeated insmod and rmmod module. Fix it by adding free_netdev() and kfree() in fst_remove_one(), just as the operations on the error handling path in fst_add_one(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Li Zetao Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/wan/farsync.c | 2 ++ 1 file changed, 2 insertions(+) commit 6cee96e09df54ae17784c0f38a49e0ed8229b825 Author: Yang Yingliang Date: Thu Dec 8 20:01:21 2022 +0800 ethernet: s2io: 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 in free_tx_buffers() to drop the SKBs in tx buffers, when the card is down, so replace it with dev_kfree_skb_irq() here. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller drivers/net/ethernet/neterion/s2io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d534ee057b62ca9332b988619323ee99c7847c1 Author: Michael Sit Wei Hong Date: Thu Dec 8 17:03:15 2022 +0800 net: stmmac: Add check for taprio basetime configuration Adds a boundary check to prevent negative basetime input from user while configuring taprio. Signed-off-by: Michael Sit Wei Hong Signed-off-by: Lai Peter Jun Ann Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 3 +++ 1 file changed, 3 insertions(+) commit b0b698b80c56b0712f0d4346d51bf0363ba03068 Author: James Hurley Date: Fri Dec 9 09:35:19 2022 -0500 platform/mellanox: mlxbf-pmc: Fix event typo Had a duplicate event typo, so just fixed the 1 character typo. Fixes: 1a218d312e65 ("platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver") Signed-off-by: James Hurley Reviewed-by: David Thompson Reviewed-by: Shravan Kumar Ramani Link: https://lore.kernel.org/r/aadacdbbd3186c55e74ea9456fe011b77938eb6c.1670535330.git.jahurley@nvidia.com Signed-off-by: Hans de Goede drivers/platform/mellanox/mlxbf-pmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93c60b597493d8875584385c90aa7933e92bf375 Merge: dd8b3a802b64 418044e1de30 Author: David S. Miller Date: Mon Dec 12 09:29:57 2022 +0000 Merge branch 'tun-vnet-uso' Andrew Melnychenko says: ==================== TUN/VirtioNet USO features support. Added new offloads for TUN devices TUN_F_USO4 and TUN_F_USO6. Technically they enable NETIF_F_GSO_UDP_L4 (and only if USO4 & USO6 are set simultaneously). It allows the transmission of large UDP packets. UDP Segmentation Offload (USO/GSO_UDP_L4) - ability to split UDP packets into several segments. It's similar to UFO, except it doesn't use IP fragmentation. The drivers may push big packets and the NIC will split them(or assemble them in case of receive), but in the case of VirtioNet we just pass big UDP to the host. So we are freeing the driver from doing the unnecessary job of splitting. The same thing for several guests on one host, we can pass big packets between guests. Different features USO4 and USO6 are required for qemu where Windows guests can enable disable USO receives for IPv4 and IPv6 separately. On the other side, Linux can't really differentiate USO4 and USO6, for now. For now, to enable USO for TUN it requires enabling USO4 and USO6 together. In the future, there would be a mechanism to control UDP_L4 GSO separately. New types for virtio-net already in virtio-net specification: https://github.com/oasis-tcs/virtio-spec/issues/120 Test it WIP Qemu https://github.com/daynix/qemu/tree/USOv3 Changes since v4 & RFC: * Fixed typo and refactored. * Tun USO offload refactored. * Add support for guest-to-guest segmentation offload (thx Jason). ==================== Signed-off-by: David S. Miller commit 418044e1de3063a6c50df964bdfca7eecd7ec6e5 Author: Andrew Melnychenko Date: Wed Dec 7 13:35:58 2022 +0200 drivers/net/virtio_net.c: Added USO support. Now, it possible to enable GSO_UDP_L4("tx-udp-segmentation") for VirtioNet. Signed-off-by: Andrew Melnychenko Signed-off-by: David S. Miller drivers/net/virtio_net.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 860b7f27b8f78564ca5a2f607e0820b2d352a562 Author: Andrew Melnychenko Date: Wed Dec 7 13:35:57 2022 +0200 linux/virtio_net.h: Support USO offload in vnet header. Now, it's possible to convert USO vnet packets from/to skb. Added support for GSO_UDP_L4 offload. Signed-off-by: Andrew Melnychenko Signed-off-by: David S. Miller include/linux/virtio_net.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 34061b348ae912b9783fae7fabae69d46977a036 Author: Andrew Melnychenko Date: Wed Dec 7 13:35:56 2022 +0200 uapi/linux/virtio_net.h: Added USO types. Added new GSO type for USO: VIRTIO_NET_HDR_GSO_UDP_L4. Feature VIRTIO_NET_F_HOST_USO allows to enable NETIF_F_GSO_UDP_L4. Separated VIRTIO_NET_F_GUEST_USO4 & VIRTIO_NET_F_GUEST_USO6 features required for Windows guests. Signed-off-by: Andrew Melnychenko Signed-off-by: David S. Miller include/uapi/linux/virtio_net.h | 4 ++++ 1 file changed, 4 insertions(+) commit 399e0827642f6a8bcae24277fe08e80e7e4bb891 Author: Andrew Melnychenko Date: Wed Dec 7 13:35:55 2022 +0200 driver/net/tun: Added features for USO. Added support for USO4 and USO6. For now, to "enable" USO, it's required to set both USO4 and USO6 simultaneously. USO enables NETIF_F_GSO_UDP_L4. Signed-off-by: Andrew Melnychenko Signed-off-by: David S. Miller drivers/net/tap.c | 10 ++++++++-- drivers/net/tun.c | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) commit b22bbdd17a5af2cc99cf42048970b9355dcbec8b Author: Andrew Melnychenko Date: Wed Dec 7 13:35:54 2022 +0200 uapi/linux/if_tun.h: Added new offload types for USO4/6. Added 2 additional offlloads for USO(IPv4 & IPv6). Separate offloads are required for Windows VM guests, g.e. Windows may set USO rx only for IPv4. Signed-off-by: Andrew Melnychenko Signed-off-by: David S. Miller include/uapi/linux/if_tun.h | 2 ++ 1 file changed, 2 insertions(+) commit 1fd54773c26787b9aea80e2f62c7d0780ea444d0 Author: Andrew Melnychenko Date: Wed Dec 7 13:35:53 2022 +0200 udp: allow header check for dodgy GSO_UDP_L4 packets. Allow UDP_L4 for robust packets. Signed-off-by: Jason Wang Signed-off-by: Andrew Melnychenko Signed-off-by: David S. Miller net/ipv4/udp_offload.c | 3 ++- net/ipv6/udp_offload.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 3e39f7971d75cafe1c90dec60526ad45484657c0 Author: Marek Vasut Date: Sun Dec 11 21:51:23 2022 +0100 dt-bindings: rtc: m41t80: Convert text schema to YAML one Convert the m41t80 text schema to YAML schema. Add "#clock-cells" requirement, which is required by clock-output-names. Signed-off-by: Marek Vasut Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221211205124.23823-1-marex@denx.de Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/rtc-m41t80.txt | 39 ------------ .../devicetree/bindings/rtc/st,m41t80.yaml | 73 ++++++++++++++++++++++ 2 files changed, 73 insertions(+), 39 deletions(-) commit aff234839f8b80ac101e6c2f14d0e44b236efa48 Author: James Clark Date: Fri Dec 9 16:44:46 2022 +0000 KVM: arm64: PMU: Fix PMCR_EL0 reset value ARMV8_PMU_PMCR_N_MASK is an unshifted value which results in the wrong reset value for PMCR_EL0, so shift it to fix it. This fixes the following error when running qemu: $ qemu-system-aarch64 -cpu host -machine type=virt,accel=kvm -kernel ... target/arm/helper.c:1813: pmevcntr_rawwrite: Assertion `counter < pmu_num_counters(env)' failed. Fixes: 292e8f149476 ("KVM: arm64: PMU: Simplify PMCR_EL0 reset handling") Signed-off-by: James Clark Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221209164446.1972014-2-james.clark@arm.com arch/arm64/kvm/sys_regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12b677f2c697d61e5ddbcb6c1650050a39392f54 Author: Zhengchao Shao Date: Fri Dec 9 17:29:29 2022 +0800 ipc: fix memory leak in init_mqueue_fs() When setup_mq_sysctls() failed in init_mqueue_fs(), mqueue_inode_cachep is not released. In order to fix this issue, the release path is reordered. Link: https://lkml.kernel.org/r/20221209092929.1978875-1-shaozhengchao@huawei.com Fixes: dc55e35f9e81 ("ipc: Store mqueue sysctls in the ipc namespace") Signed-off-by: Zhengchao Shao Cc: Alexey Gladkov Cc: "Eric W. Biederman" Cc: Jingyu Wang Cc: Muchun Song Cc: Roman Gushchin Cc: Waiman Long Cc: Wei Yongjun Cc: YueHaibing Cc: Yu Zhe Cc: Manfred Spraul Cc: Davidlohr Bueso Signed-off-by: Andrew Morton ipc/mqueue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9f2b5debc07073e6dfdd774e3594d0224b991927 Author: Aditya Garg Date: Wed Dec 7 03:05:40 2022 +0000 hfsplus: fix bug causing custom uid and gid being unable to be assigned with mount Despite specifying UID and GID in mount command, the specified UID and GID were not being assigned. This patch fixes this issue. Link: https://lkml.kernel.org/r/C0264BF5-059C-45CF-B8DA-3A3BD2C803A2@live.com Signed-off-by: Aditya Garg Reviewed-by: Viacheslav Dubeyko Cc: Signed-off-by: Andrew Morton fs/hfsplus/hfsplus_fs.h | 2 ++ fs/hfsplus/inode.c | 4 ++-- fs/hfsplus/options.c | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) commit d5b6e6eba3af11cb2a2791fa36a2524990fcde1a Author: Cai Xinchen Date: Sat Dec 3 08:57:21 2022 +0000 rapidio: devices: fix missing put_device in mport_cdev_open When kfifo_alloc fails, the refcount of chdev->dev is left incremental. We should use put_device(&chdev->dev) to decrease the ref count of chdev->dev to avoid refcount leak. Link: https://lkml.kernel.org/r/20221203085721.13146-1-caixinchen1@huawei.com Fixes: e8de370188d0 ("rapidio: add mport char device driver") Signed-off-by: Cai Xinchen Cc: Alexandre Bounine Cc: Dan Carpenter Cc: Jakob Koschel Cc: John Hubbard Cc: Matt Porter Cc: Wang Weiyang Cc: Yang Yingliang Signed-off-by: Andrew Morton drivers/rapidio/devices/rio_mport_cdev.c | 1 + 1 file changed, 1 insertion(+) commit 204c2f535d05d52bd7334629557087f9983e6879 Author: Rong Tao Date: Sat Dec 3 18:25:21 2022 +0800 kcov: fix spelling typos in comments Fix the typo of 'suport' in kcov.h Link: https://lkml.kernel.org/r/tencent_922CA94B789587D79FD154445D035AA19E07@qq.com Signed-off-by: Rong Tao Reviewed-by: Dmitry Vyukov Cc: Andrey Konovalov Signed-off-by: Andrew Morton include/linux/kcov.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c53ed55cb275344086e32a7080a6b19cb183650b Author: ZhangPeng Date: Fri Dec 2 03:00:38 2022 +0000 hfs: Fix OOB Write in hfs_asc2mac Syzbot reported a OOB Write bug: loop0: detected capacity change from 0 to 64 ================================================================== BUG: KASAN: slab-out-of-bounds in hfs_asc2mac+0x467/0x9a0 fs/hfs/trans.c:133 Write of size 1 at addr ffff88801848314e by task syz-executor391/3632 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x1f0 mm/kasan/report.c:395 kasan_report+0xcd/0x100 mm/kasan/report.c:495 hfs_asc2mac+0x467/0x9a0 fs/hfs/trans.c:133 hfs_cat_build_key+0x92/0x170 fs/hfs/catalog.c:28 hfs_lookup+0x1ab/0x2c0 fs/hfs/dir.c:31 lookup_open fs/namei.c:3391 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x10e6/0x2df0 fs/namei.c:3710 do_filp_open+0x264/0x4f0 fs/namei.c:3740 If in->len is much larger than HFS_NAMELEN(31) which is the maximum length of an HFS filename, a OOB write could occur in hfs_asc2mac(). In that case, when the dst reaches the boundary, the srclen is still greater than 0, which causes a OOB write. Fix this by adding a check on dstlen in while() before writing to dst address. Link: https://lkml.kernel.org/r/20221202030038.1391945-1-zhangpeng362@huawei.com Fixes: 328b92278650 ("[PATCH] hfs: NLS support") Signed-off-by: ZhangPeng Reviewed-by: Viacheslav Dubeyko Reported-by: Signed-off-by: Andrew Morton fs/hfs/trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d824e69d9f3fa3121b2dda25053bae71e2460d2 Author: ZhangPeng Date: Wed Nov 30 06:59:59 2022 +0000 hfs: fix OOB Read in __hfs_brec_find Syzbot reported a OOB read bug: ================================================================== BUG: KASAN: slab-out-of-bounds in hfs_strcmp+0x117/0x190 fs/hfs/string.c:84 Read of size 1 at addr ffff88807eb62c4e by task kworker/u4:1/11 CPU: 1 PID: 11 Comm: kworker/u4:1 Not tainted 6.1.0-rc6-syzkaller-00308-g644e9524388a #0 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x1f0 mm/kasan/report.c:395 kasan_report+0xcd/0x100 mm/kasan/report.c:495 hfs_strcmp+0x117/0x190 fs/hfs/string.c:84 __hfs_brec_find+0x213/0x5c0 fs/hfs/bfind.c:75 hfs_brec_find+0x276/0x520 fs/hfs/bfind.c:138 hfs_write_inode+0x34c/0xb40 fs/hfs/inode.c:462 write_inode fs/fs-writeback.c:1440 [inline] If the input inode of hfs_write_inode() is incorrect: struct inode struct hfs_inode_info struct hfs_cat_key struct hfs_name u8 len # len is greater than HFS_NAMELEN(31) which is the maximum length of an HFS filename OOB read occurred: hfs_write_inode() hfs_brec_find() __hfs_brec_find() hfs_cat_keycmp() hfs_strcmp() # OOB read occurred due to len is too large Fix this by adding a Check on len in hfs_write_inode() before calling hfs_brec_find(). Link: https://lkml.kernel.org/r/20221130065959.2168236-1-zhangpeng362@huawei.com Signed-off-by: ZhangPeng Reported-by: Cc: Damien Le Moal Cc: Ira Weiny Cc: Jeff Layton Cc: Kefeng Wang Cc: Matthew Wilcox Cc: Nanyong Sun Cc: Viacheslav Dubeyko Signed-off-by: Andrew Morton fs/hfs/inode.c | 2 ++ 1 file changed, 2 insertions(+) commit 4d8586e04602fe42f0a782d2005956f8b6302678 Author: Gavrilov Ilia Date: Tue Nov 29 09:23:38 2022 +0000 relay: fix type mismatch when allocating memory in relay_create_buf() The 'padding' field of the 'rchan_buf' structure is an array of 'size_t' elements, but the memory is allocated for an array of 'size_t *' elements. Found by Linux Verification Center (linuxtesting.org) with SVACE. Link: https://lkml.kernel.org/r/20221129092002.3538384-1-Ilia.Gavrilov@infotecs.ru Fixes: b86ff981a825 ("[PATCH] relay: migrate from relayfs to a generic relay API") Signed-off-by: Ilia.Gavrilov Cc: Colin Ian King Cc: Jens Axboe Cc: wuchi Signed-off-by: Andrew Morton kernel/relay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c9a934c7d88413a35861387a11e901554810b122 Author: Alexey Asemov Date: Sun Nov 27 09:46:38 2022 +0300 ocfs2: always read both high and low parts of dinode link count When filesystem is using indexed-dirs feature, maximum link count values can spill over to i_links_count_hi, up to OCFS2_DX_LINK_MAX links. ocfs2_read_links_count() checks for OCFS2_INDEXED_DIR_FL flag in dinode, but this flag is only valid for directories so for files the check causes high part of the link count not being read back from file dinodes resulting in wrong link count value when file has >65535 links. As ocfs2_set_links_count() always writes both high and low parts of link count, the flag check on reading may be removed. Link: https://lkml.kernel.org/r/cbfca02b-b39f-89de-e1a8-904a6c60407e@alex-at.net Signed-off-by: Alexey Asemov Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/ocfs2.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit eca36e43ee63114468e41a778b33b6886b9c5f6a Author: Christophe JAILLET Date: Sun Nov 27 17:07:32 2022 +0100 io-mapping: move some code within the include guarded section It is spurious to have some code out-side the include guard in a .h file. Fix it. Link: https://lkml.kernel.org/r/4dbaf427d4300edba6c6bbfaf4d57493b9bec6ee.1669565241.git.christophe.jaillet@wanadoo.fr Fixes: 1fbaf8fc12a0 ("mm: add a io_mapping_map_user helper") Signed-off-by: Christophe JAILLET Signed-off-by: Andrew Morton include/linux/io-mapping.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6fcd4267a840d0536b8e5334ad5f31e4105fce85 Author: Anders Roxell Date: Mon Nov 28 11:43:58 2022 +0100 kernel: kcsan: kcsan_test: build without structleak plugin Building kcsan_test with structleak plugin enabled makes the stack frame size to grow. kernel/kcsan/kcsan_test.c:704:1: error: the frame size of 3296 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Turn off the structleak plugin checks for kcsan_test. Link: https://lkml.kernel.org/r/20221128104358.2660634-1-anders.roxell@linaro.org Signed-off-by: Anders Roxell Suggested-by: Arnd Bergmann Acked-by: Marco Elver Cc: Arnd Bergmann Cc: David Gow Cc: Jason A. Donenfeld Cc: Kees Cook Signed-off-by: Andrew Morton kernel/kcsan/Makefile | 1 + 1 file changed, 1 insertion(+) commit 5370079c326f80bbc55853a1b2be8e92d75f070d Author: Iskren Chernev Date: Thu Nov 24 13:43:56 2022 +0200 mailmap: update email for Iskren Chernev I'm sunsetting my gmail account and moving to personal domain. Link: https://lkml.kernel.org/r/20221124114356.2187901-1-me@iskren.info Signed-off-by: Iskren Chernev Acked-by: Iskren Chernev Signed-off-by: Andrew Morton .mailmap | 1 + 1 file changed, 1 insertion(+) commit fd4e60bf0ef8eb9edcfa12dda39e8b6ee9060492 Author: Zhang Qilong Date: Thu Nov 24 22:01:54 2022 +0800 eventfd: change int to __u64 in eventfd_signal() ifndef CONFIG_EVENTFD Commit ee62c6b2dc93 ("eventfd: change int to __u64 in eventfd_signal()") forgot to change int to __u64 in the CONFIG_EVENTFD=n stub function. Link: https://lkml.kernel.org/r/20221124140154.104680-1-zhangqilong3@huawei.com Fixes: ee62c6b2dc93 ("eventfd: change int to __u64 in eventfd_signal()") Signed-off-by: Zhang Qilong Cc: Dylan Yudaken Cc: Jens Axboe Cc: Sha Zhengju Signed-off-by: Andrew Morton include/linux/eventfd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02d7d89f816951e0862147d751b1150d67aaebdd Author: Wang Weiyang Date: Wed Nov 23 17:51:47 2022 +0800 rapidio: fix possible UAF when kfifo_alloc() fails If kfifo_alloc() fails in mport_cdev_open(), goto err_fifo and just free priv. But priv is still in the chdev->file_list, then list traversal may cause UAF. This fixes the following smatch warning: drivers/rapidio/devices/rio_mport_cdev.c:1930 mport_cdev_open() warn: '&priv->list' not removed from list Link: https://lkml.kernel.org/r/20221123095147.52408-1-wangweiyang2@huawei.com Fixes: e8de370188d0 ("rapidio: add mport char device driver") Signed-off-by: Wang Weiyang Cc: Alexandre Bounine Cc: Dan Carpenter Cc: Jakob Koschel Cc: John Hubbard Cc: Matt Porter Cc: Yang Yingliang Signed-off-by: Andrew Morton drivers/rapidio/devices/rio_mport_cdev.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 3f0dad0105133ffcfa13eb0cd980fa347bcf31d7 Author: Xu Panda Date: Tue Nov 22 08:53:25 2022 +0800 relay: 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. Link: https://lkml.kernel.org/r/202211220853259244666@zte.com.cn Signed-off-by: Xu Panda Signed-off-by: Yang Yang Cc: Colin Ian King Cc: Jens Axboe Cc: wuchi Signed-off-by: Andrew Morton kernel/relay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c47454823bd4e3ab34ed3f795afd4479ab938a3f Author: Linus Torvalds Date: Tue Dec 6 11:15:09 2022 -0800 mm: mmu_gather: allow more than one batch of delayed rmaps Commit 5df397dec7c4 ("mm: delay page_remove_rmap() until after the TLB has been flushed") limited the page batching for the mmu gather operation when a dirty shared page needed to delay rmap removal until after the TLB had been flushed. It did so because it needs to walk that array of pages while still holding the page table lock, and our mmu_gather infrastructure allows for batching quite a lot of pages. We may have thousands on pages queued up for freeing, and we wanted to walk only the last batch if we then added a dirty page to the queue. However, when I limited it to one batch, I didn't think of the degenerate case of the special first batch that is embedded on-stack in the mmu_gather structure (called "local") and that only has eight entries. So with the right pattern, that "limit delayed rmap to just one batch" will trigger over and over in that first small batch, and we'll waste a lot of time flushing TLB's every eight pages. And those right patterns are trivially triggered by just having a shared mappings with lots of adjacent dirty pages. Like the 'page_fault3' subtest of the 'will-it-scale' benchmark, that just maps a shared area, dirties all pages, and unmaps it. Rinse and repeat. We still want to limit the batching, but to fix this (easily triggered) degenerate case, just expand the "only one batch" logic to instead be "only one batch that isn't the special first on-stack ('local') batch". That way, when we need to flush the delayed rmaps, we can still limit our walk to just the last batch - and that first small one. Link: https://lkml.kernel.org/r/CAHk-=whkL5aM1fR7kYUmhHQHBcMUc-bDoFP7EwYjTxy64DGtvw@mail.gmail.com Fixes: 5df397dec7c4 ("mm: delay page_remove_rmap() until after the TLB has been flushed") Signed-off-by: Linus Torvalds Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202212051534.852804af-yujie.liu@intel.com Tested-by: Huang, Ying Tested-by: Hugh Dickins Cc: Feng Tang Cc: Johannes Weiner Cc: Nadav Amit Cc: Xing Zhengjun Cc: "Yin, Fengwei" Signed-off-by: Andrew Morton mm/mmu_gather.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit c7cdf94e9cd7a03549e61b0f85949959191b8a10 Author: Wang Yong Date: Wed Dec 7 07:40:11 2022 +0000 mm: fix typo in struct pglist_data code comment change "stat" to "start". Link: https://lkml.kernel.org/r/20221207074011.GA151242@cloud Fixes: c959924b0dc5 ("memory tiering: adjust hot threshold automatically") Signed-off-by: Wang Yong Reviewed-by: "Huang, Ying" Signed-off-by: Andrew Morton include/linux/mmzone.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5478afc55a2104caaef5b78c7c1f9acb9ec1f92a Author: Alexander Potapenko Date: Mon Dec 5 15:57:40 2022 +0100 kmsan: fix memcpy tests Recent Clang changes may cause it to delete calls of memcpy(), if the source is an uninitialized volatile local. This happens because passing a pointer to a volatile local into memcpy() discards the volatile qualifier, giving the compiler a free hand to optimize the memcpy() call away. Use OPTIMIZER_HIDE_VAR() to hide the uninitialized var from the too-smart compiler. Link: https://lkml.kernel.org/r/20221205145740.694038-1-glider@google.com Signed-off-by: Alexander Potapenko Suggested-by: Marco Elver Reviewed-by: Marco Elver Cc: Dmitry Vyukov Signed-off-by: Andrew Morton mm/kmsan/kmsan_test.c | 3 +++ 1 file changed, 3 insertions(+) commit de2e5171433126d340573cb7d0d4fcac084ab2a0 Author: Kefeng Wang Date: Mon Dec 5 22:03:27 2022 +0800 mm: add cond_resched() in swapin_walk_pmd_entry() When handling MADV_WILLNEED in madvise(), a soflockup may occurr in swapin_walk_pmd_entry() if swapping in lots of memory on a slow device. Add a cond_resched() to avoid the possible softlockup. Link: https://lkml.kernel.org/r/20221205140327.72304-1-wangkefeng.wang@huawei.com Fixes: 1998cc048901 ("mm: make madvise(MADV_WILLNEED) support swap file prefetch") Signed-off-by: Kefeng Wang Cc: Shaohua Li Cc: Hugh Dickins Cc: Rik van Riel Signed-off-by: Andrew Morton mm/madvise.c | 1 + 1 file changed, 1 insertion(+) commit 8614d6c5eda005ad72b37afeaae2879d7c101b18 Author: Jason A. Donenfeld Date: Mon Dec 5 18:30:07 2022 +0100 mm: do not show fs mm pc for VM_LOCKONFAULT pages When VM_LOCKONFAULT was added, /proc/PID/smaps wasn't hooked up to it, so looking at /proc/PID/smaps, it shows '??' instead of something intelligable. This can be reached by userspace by simply calling `mlock2(..., MLOCK_ONFAULT);`. Fix this by adding "lf" to denote VM_LOCKONFAULT. Link: https://lkml.kernel.org/r/20221205173007.580210-1-Jason@zx2c4.com Fixes: de60f5f10c58 ("mm: introduce VM_LOCKONFAULT") Signed-off-by: Jason A. Donenfeld Acked-by: Vlastimil Babka Cc: Eric B Munson Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton fs/proc/task_mmu.c | 1 + 1 file changed, 1 insertion(+) commit 9d789c3b4170574baa4242dd8cae5988cf97d48d Author: David Hildenbrand Date: Mon Dec 5 20:37:16 2022 +0100 selftests/vm: ksm_functional_tests: fixes for 32bit The test currently fails on 32bit. Fixing the "-1ull" vs. "-1ul" seems to make the test pass and the compiler happy. Note: This test is not in mm-stable yet. This fix should be squashed into "selftests/vm: add KSM unmerge tests". Link: https://lkml.kernel.org/r/20221205193716.276024-5-david@redhat.com Signed-off-by: David Hildenbrand Cc: Shuah Khan Cc: Yang Li Signed-off-by: Andrew Morton tools/testing/selftests/vm/ksm_functional_tests.c | 4 ++-- tools/testing/selftests/vm/vm_util.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 380969fe5aacdea661d3f9ab32e84327e8624ae2 Author: David Hildenbrand Date: Mon Dec 5 20:37:15 2022 +0100 selftests/vm: cow: fix compile warning on 32bit The compiler complains about the conversion of a pointer to an int of different width. Link: https://lkml.kernel.org/r/20221205193716.276024-4-david@redhat.com Fixes: 6f1405efc61b ("selftests/vm: anon_cow: add R/O longterm tests via gup_test") Signed-off-by: David Hildenbrand Cc: Shuah Khan Cc: Yang Li Signed-off-by: Andrew Morton tools/testing/selftests/vm/cow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d88825f22b8f1cad8acb429b6bf0a54c85d7b93f Author: David Hildenbrand Date: Mon Dec 5 20:37:14 2022 +0100 selftests/vm: madv_populate: fix missing MADV_POPULATE_(READ|WRITE) definitions The tests fail to compile in some environments (e.g., Debian 11.5 on x86). Let's simply conditionally define MADV_POPULATE_(READ|WRITE) if not already defined, similar to how the khugepaged.c test handles it. Link: https://lkml.kernel.org/r/20221205193716.276024-3-david@redhat.com Fixes: 39b2e5cae43d ("selftests/vm: make MADV_POPULATE_(READ|WRITE) use in-tree headers") Signed-off-by: David Hildenbrand Cc: Shuah Khan Cc: Yang Li Signed-off-by: Andrew Morton tools/testing/selftests/vm/madv_populate.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a0ac9b3598fac36907bd1baec28c99656d2ed0b6 Author: David Hildenbrand Date: Mon Dec 5 20:37:13 2022 +0100 mm/gup_test: fix PIN_LONGTERM_TEST_READ with highmem Patch series "selftests/vm: fix some tests on 32bit". I finally had the time to run some of the selftests written by me (especially "cow") on x86 PAE. I found some unexpected "surprises" :) With these changes, and with [1] on top of mm-unstable, the "cow" tests and the "ksm_functional_tests" compile and pass as expected (expected failures with hugetlb in the "cow" tests). "madv_populate" has one expected test failure -- x86 does not support softdirty tracking. #1-#3 fix commits with stable commit ids. #4 fixes a test that is not in mm-stable yet. A note that there are many other compile errors/warnings when compiling on 32bit and with older Linux headers ... something for another day. [1] https://lkml.kernel.org/r/20221205150857.167583-1-david@redhat.com This patch (of 4): ... we have to kmap()/kunmap(), otherwise this won't work as expected with highmem. Link: https://lkml.kernel.org/r/20221205193716.276024-1-david@redhat.com Link: https://lkml.kernel.org/r/20221205193716.276024-2-david@redhat.com Fixes: c77369b437f9 ("mm/gup_test: start/stop/read functionality for PIN LONGTERM test") Signed-off-by: David Hildenbrand Cc: Shuah Khan , Cc: Yang Li Signed-off-by: Andrew Morton mm/gup_test.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 6287b7dae80944bfa37784a8f9d6861a4facaa6e Author: Hugh Dickins Date: Sun Dec 4 17:57:07 2022 -0800 mm,thp,rmap: fix races between updates of subpages_mapcount Commit 4b51634cd16a, introducing the COMPOUND_MAPPED bit, paid attention to the impossibility of subpages_mapcount ever appearing negative; but did not attend to those races in which it can momentarily appear larger than thought possible. These arise from how page_remove_rmap() first decrements page->_mapcount or compound_mapcount, then, if that transition goes negative (logical 0), decrements subpages_mapcount. The initial decrement lets a racing page_add_*_rmap() reincrement _mapcount or compound_mapcount immediately, and then in rare cases its corresponding increment of subpages_mapcount may be completed before page_remove_rmap()'s decrement. There could even (with increasing unlikelihood) be a series of increments intermixed with the decrements. In practice, checking subpages_mapcount with a temporary WARN on range, has caught values of 0x1000000 (2*COMPOUND_MAPPED, when move_pages() was using remove_migration_pmd()) and 0x800201 (do_huge_pmd_wp_page() using __split_huge_pmd()): page_add_anon_rmap() racing page_remove_rmap(), as predicted. I certainly found it harder to reason about than when bit_spin_locked, but the easy case gives a clue to how to handle the harder case. The easy case being the three !(nr & COMPOUND_MAPPED) checks, which should obviously be replaced by (nr < COMPOUND_MAPPED) checks - to count a page as compound mapped, even while the bit in that position is 0. The harder case is when trying to decide how many subpages are newly covered or uncovered, when compound map is first added or last removed: not knowing all that racily happened between first and second atomic ops. But the easy way to handle that, is again to count the page as compound mapped all the while that its subpages_mapcount indicates so - ignoring the _mapcount or compound_mapcount transition while it is on the way to being reversed. Link: https://lkml.kernel.org/r/4388158-3092-a960-ff2d-55f2b0fe4ef8@google.com Fixes: 4b51634cd16a ("mm,thp,rmap: subpages_mapcount COMPOUND_MAPPED if PMD-mapped") Signed-off-by: Hugh Dickins Cc: David Hildenbrand Cc: James Houghton Cc: Johannes Weiner Cc: John Hubbard Cc: "Kirill A . Shutemov" Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mike Kravetz Cc: Mina Almasry Cc: Muchun Song Cc: Naoya Horiguchi Cc: Peter Xu Cc: Sidhartha Kumar Cc: Vlastimil Babka Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/rmap.c | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) commit c449deb2b99ff2458214ed4a3526277bc9e40757 Author: Hugh Dickins Date: Sun Dec 4 17:01:03 2022 -0800 mm: memcg: fix swapcached stat accounting I'd been worried by high "swapcached" counts in memcg OOM reports, thought we had a problem freeing swapcache, but it was just the accounting that was wrong. Two issues: 1. When __remove_mapping() removes swapcache, __delete_from_swap_cache() relies on memcg_data for the right counts to be updated; but that had already been reset by mem_cgroup_swapout(). Swap those calls around - mem_cgroup_swapout() does not require the swapcached flag to be set. 6.1 commit ac35a4902374 ("mm: multi-gen LRU: minimal implementation") already made a similar swap for workingset_eviction(), but not for this. 2. memcg's "swapcached" count was added for memcg v2 stats, but displayed on OOM even for memcg v1: so mem_cgroup_move_account() ought to move it. Link: https://lkml.kernel.org/r/b8b96ee0-1e1e-85f8-df97-c82a11d7cd14@google.com Fixes: b6038942480e ("mm: memcg: add swapcache stat for memcg v2") Signed-off-by: Hugh Dickins Acked-by: Johannes Weiner Acked-by: Shakeel Butt Cc: Michal Hocko Cc: Roman Gushchin Cc: Yu Zhao Signed-off-by: Andrew Morton mm/memcontrol.c | 6 ++++++ mm/vmscan.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 12a5d3955227b0d7e04fb793ccceeb2a1dd275c5 Author: Mina Almasry Date: Fri Dec 2 14:35:31 2022 -0800 mm: add nodes= arg to memory.reclaim The nodes= arg instructs the kernel to only scan the given nodes for proactive reclaim. For example use cases, consider a 2 tier memory system: nodes 0,1 -> top tier nodes 2,3 -> second tier $ echo "1m nodes=0" > memory.reclaim This instructs the kernel to attempt to reclaim 1m memory from node 0. Since node 0 is a top tier node, demotion will be attempted first. This is useful to direct proactive reclaim to specific nodes that are under pressure. $ echo "1m nodes=2,3" > memory.reclaim This instructs the kernel to attempt to reclaim 1m memory in the second tier, since this tier of memory has no demotion targets the memory will be reclaimed. $ echo "1m nodes=0,1" > memory.reclaim Instructs the kernel to reclaim memory from the top tier nodes, which can be desirable according to the userspace policy if there is pressure on the top tiers. Since these nodes have demotion targets, the kernel will attempt demotion first. Since commit 3f1509c57b1b ("Revert "mm/vmscan: never demote for memcg reclaim""), the proactive reclaim interface memory.reclaim does both reclaim and demotion. Reclaim and demotion incur different latency costs to the jobs in the cgroup. Demoted memory would still be addressable by the userspace at a higher latency, but reclaimed memory would need to incur a pagefault. The 'nodes' arg is useful to allow the userspace to control demotion and reclaim independently according to its policy: if the memory.reclaim is called on a node with demotion targets, it will attempt demotion first; if it is called on a node without demotion targets, it will only attempt reclaim. Link: https://lkml.kernel.org/r/20221202223533.1785418-1-almasrymina@google.com Signed-off-by: Mina Almasry Acked-by: Michal Hocko Acked-by: Shakeel Butt Acked-by: Muchun Song Cc: Bagas Sanjaya Cc: "Huang, Ying" Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Roman Gushchin Cc: Tejun Heo Cc: Wei Xu Cc: Yang Shi Cc: Yosry Ahmed Cc: zefan li Signed-off-by: Andrew Morton Documentation/admin-guide/cgroup-v2.rst | 15 +++++--- include/linux/swap.h | 3 +- mm/memcontrol.c | 67 ++++++++++++++++++++++++++------- mm/vmscan.c | 4 +- 4 files changed, 68 insertions(+), 21 deletions(-) commit 6b426d071419a40f61fe41fe1bd9e1b4fa5aeb37 Author: Mina Almasry Date: Thu Dec 1 15:33:17 2022 -0800 mm: disable top-tier fallback to reclaim on proactive reclaim Reclaiming directly from top tier nodes breaks the aging pipeline of memory tiers. If we have a RAM -> CXL -> storage hierarchy, we should demote from RAM to CXL and from CXL to storage. If we reclaim a page from RAM, it means we 'demote' it directly from RAM to storage, bypassing potentially a huge amount of pages colder than it in CXL. However disabling reclaim from top tier nodes entirely would cause ooms in edge scenarios where lower tier memory is unreclaimable for whatever reason, e.g. memory being mlocked() or too hot to reclaim. In these cases we would rather the job run with a performance regression rather than it oom altogether. However, we can disable reclaim from top tier nodes for proactive reclaim. That reclaim is not real memory pressure, and we don't have any cause to be breaking the aging pipeline. [akpm@linux-foundation.org: restore comment layout, per Ying Huang] Link: https://lkml.kernel.org/r/20221201233317.1394958-1-almasrymina@google.com Signed-off-by: Mina Almasry Reviewed-by: "Huang, Ying" Reviewed-by: Yang Shi Cc: Greg Thelen Cc: Shakeel Butt Cc: Tim Chen Cc: Wei Xu Cc: Yosry Ahmed Signed-off-by: Andrew Morton mm/vmscan.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 1c74697776e17619e485a40cf8cfdb4bf18fd18e Author: Yosry Ahmed Date: Fri Dec 2 03:15:12 2022 +0000 selftests: cgroup: make sure reclaim target memcg is unprotected Make sure that we ignore protection of a memcg that is the target of memcg reclaim. Link: https://lkml.kernel.org/r/20221202031512.1365483-4-yosryahmed@google.com Signed-off-by: Yosry Ahmed Reviewed-by: Roman Gushchin Cc: Chris Down Cc: David Rientjes Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Michal Hocko Cc: Muchun Song Cc: Shakeel Butt Cc: Tejun Heo Cc: Vasily Averin Cc: Vlastimil Babka Cc: Yu Zhao Signed-off-by: Andrew Morton tools/testing/selftests/cgroup/test_memcontrol.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e5d64edac64531375716fabe35c9e0a502ca2894 Author: Yosry Ahmed Date: Fri Dec 2 03:15:11 2022 +0000 selftests: cgroup: refactor proactive reclaim code to reclaim_until() Refactor the code that drives writing to memory.reclaim (retrying, error handling, etc) from test_memcg_reclaim() to a helper called reclaim_until(), which proactively reclaims from a memcg until its usage reaches a certain value. While we are at it, refactor and simplify the reclaim loop. This will be used in a following patch in another test. Link: https://lkml.kernel.org/r/20221202031512.1365483-3-yosryahmed@google.com Signed-off-by: Yosry Ahmed Suggested-by: Roman Gushchin Reviewed-by: Roman Gushchin Cc: Chris Down Cc: David Rientjes Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Michal Hocko Cc: Muchun Song Cc: Shakeel Butt Cc: Tejun Heo Cc: Vasily Averin Cc: Vlastimil Babka Cc: Yu Zhao Signed-off-by: Andrew Morton tools/testing/selftests/cgroup/test_memcontrol.c | 80 +++++++++++++----------- 1 file changed, 44 insertions(+), 36 deletions(-) commit adb8213014b25c7f1d75d5b219becaadcd695efb Author: Yosry Ahmed Date: Fri Dec 2 03:15:10 2022 +0000 mm: memcg: fix stale protection of reclaim target memcg Patch series "mm: memcg: fix protection of reclaim target memcg", v3. This series fixes a bug in calculating the protection of the reclaim target memcg where we end up using stale effective protection values from the last reclaim operation, instead of completely ignoring the protection of the reclaim target as intended. More detailed explanation and examples in patch 1, which includes the fix. Patches 2 & 3 introduce a selftest case that catches the bug. This patch (of 3): When we are doing memcg reclaim, the intended behavior is that we ignore any protection (memory.min, memory.low) of the target memcg (but not its children). Ever since the patch pointed to by the "Fixes" tag, we actually read a stale value for the target memcg protection when deciding whether to skip the memcg or not because it is protected. If the stale value happens to be high enough, we don't reclaim from the target memcg. Essentially, in some cases we may falsely skip reclaiming from the target memcg of reclaim because we read a stale protection value from last time we reclaimed from it. During reclaim, mem_cgroup_calculate_protection() is used to determine the effective protection (emin and elow) values of a memcg. The protection of the reclaim target is ignored, but we cannot set their effective protection to 0 due to a limitation of the current implementation (see comment in mem_cgroup_protection()). Instead, we leave their effective protection values unchaged, and later ignore it in mem_cgroup_protection(). However, mem_cgroup_protection() is called later in shrink_lruvec()->get_scan_count(), which is after the mem_cgroup_below_{min/low}() checks in shrink_node_memcgs(). As a result, the stale effective protection values of the target memcg may lead us to skip reclaiming from the target memcg entirely, before calling shrink_lruvec(). This can be even worse with recursive protection, where the stale target memcg protection can be higher than its standalone protection. See two examples below (a similar version of example (a) is added to test_memcontrol in a later patch). (a) A simple example with proactive reclaim is as follows. Consider the following hierarchy: ROOT | A | B (memory.min = 10M) Consider the following scenario: - B has memory.current = 10M. - The system undergoes global reclaim (or memcg reclaim in A). - In shrink_node_memcgs(): - mem_cgroup_calculate_protection() calculates the effective min (emin) of B as 10M. - mem_cgroup_below_min() returns true for B, we do not reclaim from B. - Now if we want to reclaim 5M from B using proactive reclaim (memory.reclaim), we should be able to, as the protection of the target memcg should be ignored. - In shrink_node_memcgs(): - mem_cgroup_calculate_protection() immediately returns for B without doing anything, as B is the target memcg, relying on mem_cgroup_protection() to ignore B's stale effective min (still 10M). - mem_cgroup_below_min() reads the stale effective min for B and we skip it instead of ignoring its protection as intended, as we never reach mem_cgroup_protection(). (b) An more complex example with recursive protection is as follows. Consider the following hierarchy with memory_recursiveprot: ROOT | A (memory.min = 50M) | B (memory.min = 10M, memory.high = 40M) Consider the following scenario: - B has memory.current = 35M. - The system undergoes global reclaim (target memcg is NULL). - B will have an effective min of 50M (all of A's unclaimed protection). - B will not be reclaimed from. - Now allocate 10M more memory in B, pushing it above it's high limit. - The system undergoes memcg reclaim from B (target memcg is B). - Like example (a), we do nothing in mem_cgroup_calculate_protection(), then call mem_cgroup_below_min(), which will read the stale effective min for B (50M) and skip it. In this case, it's even worse because we are not just considering B's standalone protection (10M), but we are reading a much higher stale protection (50M) which will cause us to not reclaim from B at all. This is an artifact of commit 45c7f7e1ef17 ("mm, memcg: decouple e{low,min} state mutations from protection checks") which made mem_cgroup_calculate_protection() only change the state without returning any value. Before that commit, we used to return MEMCG_PROT_NONE for the target memcg, which would cause us to skip the mem_cgroup_below_{min/low}() checks. After that commit we do not return anything and we end up checking the min & low effective protections for the target memcg, which are stale. Update mem_cgroup_supports_protection() to also check if we are reclaiming from the target, and rename it to mem_cgroup_unprotected() (now returns true if we should not protect the memcg, much simpler logic). Link: https://lkml.kernel.org/r/20221202031512.1365483-1-yosryahmed@google.com Link: https://lkml.kernel.org/r/20221202031512.1365483-2-yosryahmed@google.com Fixes: 45c7f7e1ef17 ("mm, memcg: decouple e{low,min} state mutations from protection checks") Signed-off-by: Yosry Ahmed Reviewed-by: Roman Gushchin Cc: Chris Down Cc: David Rientjes Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Michal Hocko Cc: Muchun Song Cc: Shakeel Butt Cc: Tejun Heo Cc: Vasily Averin Cc: Vlastimil Babka Cc: Yu Zhao Signed-off-by: Andrew Morton include/linux/memcontrol.h | 31 +++++++++++++++++++++---------- mm/vmscan.c | 11 ++++++----- 2 files changed, 27 insertions(+), 15 deletions(-) commit 675eaca1f441acd4f0d403d71036b100cd49036a Author: Alistair Popple Date: Fri Dec 2 15:53:39 2022 +1100 mm/mmap: properly unaccount memory on mas_preallocate() failure security_vm_enough_memory_mm() accounts memory via a call to vm_acct_memory(). Therefore any subsequent failures should unaccount for this memory prior to returning the error. Link: https://lkml.kernel.org/r/20221202045339.2999017-1-apopple@nvidia.com Fixes: 28c5609fb236 ("mm/mmap: preallocate maple nodes for brk vma expansion") Signed-off-by: Alistair Popple Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton mm/mmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1bda9dad5aa0199c8592bac32b91afbf8ea236ff Author: Christoph Hellwig Date: Fri Dec 2 11:26:44 2022 +0100 omfs: 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/20221202102644.770505-8-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Bob Copeland Acked-by: Johannes Weiner Signed-off-by: Andrew Morton fs/omfs/file.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 2274c3b281bb47e6980ae42fb8dc93b7a38192d5 Author: Christoph Hellwig Date: Fri Dec 2 11:26:43 2022 +0100 jfs: 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/20221202102644.770505-7-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Dave Kleikamp Acked-by: Johannes Weiner Signed-off-by: Andrew Morton fs/jfs/inode.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit cd2e6024260de27a523e0af6ee47a20a6b8b8aa8 Author: Christoph Hellwig Date: Fri Dec 2 11:26:42 2022 +0100 hpfs: 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/20221202102644.770505-6-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Johannes Weiner Signed-off-by: Andrew Morton fs/hpfs/file.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 12f9b9a73dc603e658bf24eed2777cecdaf4103e Author: Christoph Hellwig Date: Fri Dec 2 11:26:41 2022 +0100 hfsplus: 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 stop wiring up ->writepage for hfsplus_aops. Link: https://lkml.kernel.org/r/20221202102644.770505-5-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Johannes Weiner Signed-off-by: Andrew Morton fs/hfsplus/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba195d9f14829690b8e4f67549960d83169a314e Author: Christoph Hellwig Date: Fri Dec 2 11:26:40 2022 +0100 hfs: 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 stop wiring up ->writepage for hfs_aops. Link: https://lkml.kernel.org/r/20221202102644.770505-4-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Johannes Weiner Signed-off-by: Andrew Morton fs/hfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee649af0d9a60ea61a5dad99ef5d6b4aa346f0a0 Author: Christoph Hellwig Date: Fri Dec 2 11:26:39 2022 +0100 fat: 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/20221202102644.770505-3-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Johannes Weiner Signed-off-by: Andrew Morton fs/fat/inode.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit a11774122180a782b327b0a9a5091d99c91a4db7 Author: Christoph Hellwig Date: Fri Dec 2 11:26:38 2022 +0100 extfat: remove ->writepage Patch series "start removing writepage instances v2". The VM doesn't need or want ->writepage for writeback and is fine with just having ->writepages as long as ->migrate_folio is implemented. This series removes all ->writepage instances that use block_write_full_page directly and also have a plain mpage_writepages based ->writepages. This patch (of 7): ->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/20221202102644.770505-1-hch@lst.de Link: https://lkml.kernel.org/r/20221202102644.770505-2-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Namjae Jeon Acked-by: Johannes Weiner Cc: Bob Copeland Cc: Dave Kleikamp Cc: Jan Kara Cc: Mikulas Patocka Cc: OGAWA Hirofumi Cc: Sungjong Seo Signed-off-by: Andrew Morton fs/exfat/inode.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit ac4b2901a112e4dcee1455c96d89ef83cc7aa545 Author: Deyan Wang Date: Thu Dec 1 21:50:45 2022 +0800 mm/page_alloc: update comments in __free_pages_ok() Add a comment to explain why we call get_pfnblock_migratetype() twice in __free_pages_ok(). Link: https://lkml.kernel.org/r/20221201135045.31663-1-wonder_rock@126.com Signed-off-by: Deyan Wang Signed-off-by: Andrew Morton mm/page_alloc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 480017957d6380d3336a8e80ad90f70415bb86f7 Author: Shiyang Ruan Date: Thu Dec 1 15:32:53 2022 +0000 xfs: remove restrictions for fsdax and reflink Since the basic function for fsdax and reflink has been implemented, remove the restrictions of them for widly test. Link: https://lkml.kernel.org/r/1669908773-207-1-git-send-email-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Cc: Alistair Popple Cc: Dan Williams Cc: Dave Chinner Cc: Jason Gunthorpe Cc: John Hubbard Signed-off-by: Andrew Morton fs/xfs/xfs_ioctl.c | 4 ---- fs/xfs/xfs_iops.c | 4 ---- 2 files changed, 8 deletions(-) commit d984648e428bf88cbd94ebe346c73632cb92fffb Author: Shiyang Ruan Date: Thu Dec 1 15:32:33 2022 +0000 fsdax,xfs: port unshare to fsdax Implement unshare in fsdax mode: copy data from srcmap to iomap. Link: https://lkml.kernel.org/r/1669908753-169-1-git-send-email-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Cc: Alistair Popple Cc: Dan Williams Cc: Dave Chinner Cc: Jason Gunthorpe Cc: John Hubbard Signed-off-by: Andrew Morton fs/dax.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_reflink.c | 8 ++++++-- include/linux/dax.h | 2 ++ 3 files changed, 60 insertions(+), 2 deletions(-) commit 64e6edc185da7e101e867c4732c097fedb1da08e Author: Shiyang Ruan Date: Thu Dec 1 15:32:10 2022 +0000 xfs: use dax ops for zero and truncate in fsdax mode Zero and truncate on a dax file may execute CoW. So use dax ops which contains end work for CoW. Link: https://lkml.kernel.org/r/1669908730-131-1-git-send-email-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Cc: Alistair Popple Cc: Dan Williams Cc: Dave Chinner Cc: Jason Gunthorpe Cc: John Hubbard Signed-off-by: Andrew Morton fs/xfs/xfs_iomap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e79e3736d54bb8efbc9fb29cc3b54a132783565 Author: Shiyang Ruan Date: Thu Dec 1 15:31:41 2022 +0000 fsdax: dedupe: iter two files at the same time The iomap_iter() on a range of one file may loop more than once. In this case, the inner dst_iter can update its iomap but the outer src_iter can't. This may cause the wrong remapping in filesystem. Let them called at the same time. Link: https://lkml.kernel.org/r/1669908701-93-1-git-send-email-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Cc: Alistair Popple Cc: Dan Williams Cc: Dave Chinner Cc: Jason Gunthorpe Cc: John Hubbard Signed-off-by: Andrew Morton fs/dax.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c6f0b395b2110aa26a134a9a395875b1ec0a5aae Author: Shiyang Ruan Date: Thu Dec 1 15:28:54 2022 +0000 fsdax,xfs: set the shared flag when file extent is shared If a dax page is shared, mapread at different offsets can also trigger page fault on same dax page. So, change the flag from "cow" to "shared". And get the shared flag from filesystem when read. Link: https://lkml.kernel.org/r/1669908538-55-5-git-send-email-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Cc: Alistair Popple Cc: Dan Williams Cc: Dave Chinner Cc: Jason Gunthorpe Cc: John Hubbard Signed-off-by: Andrew Morton fs/dax.c | 19 +++++++------------ fs/xfs/xfs_iomap.c | 2 +- 2 files changed, 8 insertions(+), 13 deletions(-) commit 708dfad2eb4169324189782edd6d3763237e0489 Author: Shiyang Ruan Date: Thu Dec 1 15:28:53 2022 +0000 fsdax: zero the edges if source is HOLE or UNWRITTEN If srcmap contains invalid data, such as HOLE and UNWRITTEN, the dest page should be zeroed. Otherwise, since it's a pmem, old data may remains on the dest page, the result of CoW will be incorrect. The function name is also not easy to understand, rename it to "dax_iomap_copy_around()", which means it copies data around the range. [akpm@linux-foundation.org: update dax_iomap_copy_around() kerneldoc, per Darrick] Link: https://lkml.kernel.org/r/1669973145-318-1-git-send-email-ruansy.fnst@fujitsu.com Link: https://lkml.kernel.org/r/1669908538-55-4-git-send-email-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Reviewed-by: Allison Henderson Cc: Alistair Popple Cc: Dan Williams Cc: Dave Chinner Cc: Jason Gunthorpe Cc: John Hubbard Signed-off-by: Andrew Morton fs/dax.c | 79 ++++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 30 deletions(-) commit f80e1668888f34c0764822e74953c997daf2ccdb Author: Shiyang Ruan Date: Thu Dec 1 15:28:52 2022 +0000 fsdax: invalidate pages when CoW CoW changes the share state of a dax page, but the share count of the page isn't updated. The next time access this page, it should have been a newly accessed, but old association exists. So, we need to clear the share state when CoW happens, in both dax_iomap_rw() and dax_zero_iter(). Link: https://lkml.kernel.org/r/1669908538-55-3-git-send-email-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Cc: Alistair Popple Cc: Dan Williams Cc: Dave Chinner Cc: Jason Gunthorpe Cc: John Hubbard Signed-off-by: Andrew Morton fs/dax.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 169004265860327182ecf92297b25b6271e81e96 Author: Shiyang Ruan Date: Thu Dec 1 15:28:51 2022 +0000 fsdax: introduce page->share for fsdax in reflink mode Patch series "fsdax,xfs: fix warning messages", v2. Many testcases failed in dax+reflink mode with warning message in dmesg. Such as generic/051,075,127. The warning message is like this: [ 775.509337] ------------[ cut here ]------------ [ 775.509636] WARNING: CPU: 1 PID: 16815 at fs/dax.c:386 dax_insert_entry.cold+0x2e/0x69 [ 775.510151] Modules linked in: auth_rpcgss oid_registry nfsv4 algif_hash af_alg af_packet nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables nfnetlink ip6table_filter ip6_tables iptable_filter ip_tables x_tables dax_pmem nd_pmem nd_btt sch_fq_codel configfs xfs libcrc32c fuse [ 775.524288] CPU: 1 PID: 16815 Comm: fsx Kdump: loaded Tainted: G W 6.1.0-rc4+ #164 eb34e4ee4200c7cbbb47de2b1892c5a3e027fd6d [ 775.524904] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS Arch Linux 1.16.0-3-3 04/01/2014 [ 775.525460] RIP: 0010:dax_insert_entry.cold+0x2e/0x69 [ 775.525797] Code: c7 c7 18 eb e0 81 48 89 4c 24 20 48 89 54 24 10 e8 73 6d ff ff 48 83 7d 18 00 48 8b 54 24 10 48 8b 4c 24 20 0f 84 e3 e9 b9 ff <0f> 0b e9 dc e9 b9 ff 48 c7 c6 a0 20 c3 81 48 c7 c7 f0 ea e0 81 48 [ 775.526708] RSP: 0000:ffffc90001d57b30 EFLAGS: 00010082 [ 775.527042] RAX: 000000000000002a RBX: 0000000000000000 RCX: 0000000000000042 [ 775.527396] RDX: ffffea000a0f6c80 RSI: ffffffff81dfab1b RDI: 00000000ffffffff [ 775.527819] RBP: ffffea000a0f6c40 R08: 0000000000000000 R09: ffffffff820625e0 [ 775.528241] R10: ffffc90001d579d8 R11: ffffffff820d2628 R12: ffff88815fc98320 [ 775.528598] R13: ffffc90001d57c18 R14: 0000000000000000 R15: 0000000000000001 [ 775.528997] FS: 00007f39fc75d740(0000) GS:ffff88817bc80000(0000) knlGS:0000000000000000 [ 775.529474] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 775.529800] CR2: 00007f39fc772040 CR3: 0000000107eb6001 CR4: 00000000003706e0 [ 775.530214] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 775.530592] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 775.531002] Call Trace: [ 775.531230] [ 775.531444] dax_fault_iter+0x267/0x6c0 [ 775.531719] dax_iomap_pte_fault+0x198/0x3d0 [ 775.532002] __xfs_filemap_fault+0x24a/0x2d0 [xfs aa8d25411432b306d9554da38096f4ebb86bdfe7] [ 775.532603] __do_fault+0x30/0x1e0 [ 775.532903] do_fault+0x314/0x6c0 [ 775.533166] __handle_mm_fault+0x646/0x1250 [ 775.533480] handle_mm_fault+0xc1/0x230 [ 775.533810] do_user_addr_fault+0x1ac/0x610 [ 775.534110] exc_page_fault+0x63/0x140 [ 775.534389] asm_exc_page_fault+0x22/0x30 [ 775.534678] RIP: 0033:0x7f39fc55820a [ 775.534950] Code: 00 01 00 00 00 74 99 83 f9 c0 0f 87 7b fe ff ff c5 fe 6f 4e 20 48 29 fe 48 83 c7 3f 49 8d 0c 10 48 83 e7 c0 48 01 fe 48 29 f9 a4 c4 c1 7e 7f 00 c4 c1 7e 7f 48 20 c5 f8 77 c3 0f 1f 44 00 00 [ 775.535839] RSP: 002b:00007ffc66a08118 EFLAGS: 00010202 [ 775.536157] RAX: 00007f39fc772001 RBX: 0000000000042001 RCX: 00000000000063c1 [ 775.536537] RDX: 0000000000006400 RSI: 00007f39fac42050 RDI: 00007f39fc772040 [ 775.536919] RBP: 0000000000006400 R08: 00007f39fc772001 R09: 0000000000042000 [ 775.537304] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000001 [ 775.537694] R13: 00007f39fc772000 R14: 0000000000006401 R15: 0000000000000003 [ 775.538086] [ 775.538333] ---[ end trace 0000000000000000 ]--- This also affects dax+noreflink mode if we run the test after a dax+reflink test. So, the most urgent thing is solving the warning messages. With these fixes, most warning messages in dax_associate_entry() are gone. But honestly, generic/388 will randomly failed with the warning. The case shutdown the xfs when fsstress is running, and do it for many times. I think the reason is that dax pages in use are not able to be invalidated in time when fs is shutdown. The next time dax page to be associated, it still remains the mapping value set last time. I'll keep on solving it. The warning message in dax_writeback_one() can also be fixed because of the dax unshare. This patch (of 8): fsdax page is used not only when CoW, but also mapread. To make the it easily understood, use 'share' to indicate that the dax page is shared by more than one extent. And add helper functions to use it. Also, the flag needs to be renamed to PAGE_MAPPING_DAX_SHARED. [ruansy.fnst@fujitsu.com: rename several functions] Link: https://lkml.kernel.org/r/1669972991-246-1-git-send-email-ruansy.fnst@fujitsu.com [ruansy.fnst@fujitsu.com: v2.2] Link: https://lkml.kernel.org/r/1670381359-53-1-git-send-email-ruansy.fnst@fujitsu.com Link: https://lkml.kernel.org/r/1669908538-55-1-git-send-email-ruansy.fnst@fujitsu.com Link: https://lkml.kernel.org/r/1669908538-55-2-git-send-email-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong Cc: Dan Williams Cc: Dave Chinner Cc: Jason Gunthorpe Cc: Alistair Popple Cc: John Hubbard Signed-off-by: Andrew Morton fs/dax.c | 38 ++++++++++++++++++++++---------------- include/linux/mm_types.h | 5 ++++- include/linux/page-flags.h | 2 +- 3 files changed, 27 insertions(+), 18 deletions(-) commit 0b7623bdf89b9f6d320784e929acb78291aaf5f6 Author: SeongJae Park Date: Thu Dec 1 17:08:34 2022 +0000 selftests/damon: test removed scheme sysfs dir access bug A DAMON sysfs user could start DAMON with a scheme, remove the sysfs directory for the scheme, and then ask stats or schemes tried regions update. The related logic were not aware of the already removed directory situation, so it was able to results in invalid memory accesses. The fix has made with commit 8468b486612c ("mm/damon/sysfs-schemes: skip stats update if the scheme directory is removed"), though. Add a selftest to prevent such kinds of bugs from being introduced again. Link: https://lkml.kernel.org/r/20221201170834.62823-1-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/damon/Makefile | 2 +- .../damon/sysfs_update_removed_scheme_dir.sh | 58 ++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) commit c8c7016f50c85688d71feea2dba1bd955d5f5358 Author: Andrey Konovalov Date: Wed Nov 30 16:02:03 2022 +0100 kasan: fail non-kasan KUnit tests on KASAN reports After the recent changes done to KUnit-enabled KASAN tests, non-KASAN KUnit tests stopped being failed when KASAN report is detected. Recover that property by failing the currently running non-KASAN KUnit test when KASAN detects and prints a report for a bad memory access. Note that if the bad accesses happened in a kernel thread that doesn't have a reference to the currently running KUnit-test available via current->kunit_test, the test won't be failed. This is a limitation of KUnit, which doesn't yet provide a thread-agnostic way to find the reference to the currenly running test. Link: https://lkml.kernel.org/r/7be29a8ea967cee6b7e48d3d5a242d1d0bd96851.1669820505.git.andreyknvl@google.com Fixes: 49d9977ac909 ("kasan: check CONFIG_KASAN_KUNIT_TEST instead of CONFIG_KUNIT") Fixes: 7ce0ea19d50e ("kasan: switch kunit tests to console tracepoints") Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: David Gow Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton mm/kasan/kasan.h | 12 ++++++++++++ mm/kasan/kasan_test.c | 4 ++++ mm/kasan/report.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) commit 19fc1a7e8b2b3b0e18fbea84ee26517e1b0f1a6e Author: Sidhartha Kumar Date: Tue Nov 29 14:50:39 2022 -0800 mm/hugetlb: change hugetlb allocation functions to return a folio Many hugetlb allocation helper functions have now been converting to folios, update their higher level callers to be compatible with folios. alloc_pool_huge_page is reorganized to avoid a smatch warning reporting the folio variable is uninitialized. [sidhartha.kumar@oracle.com: update alloc_and_dissolve_hugetlb_folio comments] Link: https://lkml.kernel.org/r/20221206233512.146535-1-sidhartha.kumar@oracle.com Link: https://lkml.kernel.org/r/20221129225039.82257-11-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reported-by: Wei Chen Suggested-by: John Hubbard Suggested-by: Rasmus Villemoes Reviewed-by: Mike Kravetz Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Muchun Song Cc: Tarun Sahu Signed-off-by: Andrew Morton mm/hugetlb.c | 134 ++++++++++++++++++++++++++++------------------------------- 1 file changed, 64 insertions(+), 70 deletions(-) commit d1c6095572d0cf00c0cd30378639ff9387b34edd Author: Sidhartha Kumar Date: Tue Nov 29 14:50:38 2022 -0800 mm/hugetlb: convert hugetlb prep functions to folios Convert prep_new_huge_page() and __prep_compound_gigantic_page() to folios. Link: https://lkml.kernel.org/r/20221129225039.82257-10-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: David Hildenbrand Cc: John Hubbard Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Muchun Song Cc: Rasmus Villemoes Cc: Tarun Sahu Cc: Wei Chen Signed-off-by: Andrew Morton mm/hugetlb.c | 63 +++++++++++++++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 33 deletions(-) commit 7f325a8d25631e68cd75afaeaf330187e45e0eb5 Author: Sidhartha Kumar Date: Tue Nov 29 14:50:37 2022 -0800 mm/hugetlb: convert free_gigantic_page() to folios Convert callers of free_gigantic_page() to use folios, function is then renamed to free_gigantic_folio(). Link: https://lkml.kernel.org/r/20221129225039.82257-9-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: David Hildenbrand Cc: John Hubbard Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Muchun Song Cc: Rasmus Villemoes Cc: Tarun Sahu Cc: Wei Chen Signed-off-by: Andrew Morton mm/hugetlb.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 240d67a86ecb0fa18863821a0cb55783ad50ef30 Author: Sidhartha Kumar Date: Tue Nov 29 14:50:36 2022 -0800 mm/hugetlb: convert enqueue_huge_page() to folios Convert callers of enqueue_huge_page() to pass in a folio, function is renamed to enqueue_hugetlb_folio(). Link: https://lkml.kernel.org/r/20221129225039.82257-8-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: David Hildenbrand Cc: John Hubbard Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Muchun Song Cc: Rasmus Villemoes Cc: Tarun Sahu Cc: Wei Chen Signed-off-by: Andrew Morton mm/hugetlb.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 2f6c57d696abcd2d27d07b8506d5e6bcc060e77a Author: Sidhartha Kumar Date: Tue Nov 29 14:50:35 2022 -0800 mm/hugetlb: convert add_hugetlb_page() to folios and add hugetlb_cma_folio() Convert add_hugetlb_page() to take in a folio, also convert hugetlb_cma_page() to take in a folio. Link: https://lkml.kernel.org/r/20221129225039.82257-7-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: David Hildenbrand Cc: John Hubbard Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Muchun Song Cc: Rasmus Villemoes Cc: Tarun Sahu Cc: Wei Chen Signed-off-by: Andrew Morton mm/hugetlb.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit d6ef19e25df2aa50f932a78c368d7bb710eaaa1b Author: Sidhartha Kumar Date: Tue Nov 29 14:50:34 2022 -0800 mm/hugetlb: convert update_and_free_page() to folios Make more progress on converting the free_huge_page() destructor to operate on folios by converting update_and_free_page() to folios. Link: https://lkml.kernel.org/r/20221129225039.82257-6-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar \ Reviewed-by: Mike Kravetz Cc: David Hildenbrand Cc: John Hubbard Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Muchun Song Cc: Rasmus Villemoes Cc: Tarun Sahu Cc: Wei Chen Signed-off-by: Andrew Morton mm/hugetlb.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit cfd5082b514765f873504cc60a50cce30738bfd3 Author: Sidhartha Kumar Date: Tue Nov 29 14:50:33 2022 -0800 mm/hugetlb: convert remove_hugetlb_page() to folios Removes page_folio() call by converting callers to directly pass a folio into __remove_hugetlb_page(). Link: https://lkml.kernel.org/r/20221129225039.82257-5-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: David Hildenbrand Cc: John Hubbard Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Muchun Song Cc: Rasmus Villemoes Cc: Tarun Sahu Cc: Wei Chen Signed-off-by: Andrew Morton mm/hugetlb.c | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) commit 1a7cdab59b22465b850501e3897a3f3aa01670d8 Author: Sidhartha Kumar Date: Tue Nov 29 14:50:32 2022 -0800 mm/hugetlb: convert dissolve_free_huge_page() to folios Removes compound_head() call by using a folio rather than a head page. Link: https://lkml.kernel.org/r/20221129225039.82257-4-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: David Hildenbrand Cc: John Hubbard Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Muchun Song Cc: Rasmus Villemoes Cc: Tarun Sahu Cc: Wei Chen Signed-off-by: Andrew Morton mm/hugetlb.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 911565b8285381e62d3bfd0cae2889a022737c37 Author: Sidhartha Kumar Date: Tue Nov 29 14:50:31 2022 -0800 mm/hugetlb: convert destroy_compound_gigantic_page() to folios Convert page operations within __destroy_compound_gigantic_page() to the corresponding folio operations. Link: https://lkml.kernel.org/r/20221129225039.82257-3-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: David Hildenbrand Cc: John Hubbard Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Muchun Song Cc: Rasmus Villemoes Cc: Tarun Sahu Cc: Wei Chen Signed-off-by: Andrew Morton mm/hugetlb.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) commit 9fd330582b2fe43c49ebcd02b2480f051f85aad4 Author: Sidhartha Kumar Date: Tue Nov 29 14:50:30 2022 -0800 mm: add folio dtor and order setter functions Patch series "convert core hugetlb functions to folios", v5. ============== OVERVIEW =========================== Now that many hugetlb helper functions that deal with hugetlb specific flags[1] and hugetlb cgroups[2] are converted to folios, higher level allocation, prep, and freeing functions within hugetlb can also be converted to operate in folios. Patch 1 of this series implements the wrapper functions around setting the compound destructor and compound order for a folio. Besides the user added in patch 1, patch 2 and patch 9 also use these helper functions. Patches 2-10 convert the higher level hugetlb functions to folios. ============== TESTING =========================== LTP: Ran 10 back to back rounds of the LTP hugetlb test suite. Gigantic Huge Pages: Test allocation and freeing via hugeadm commands: hugeadm --pool-pages-min 1GB:10 hugeadm --pool-pages-min 1GB:0 Demote: Demote 1 1GB hugepages to 512 2MB hugepages echo 1 > /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages echo 1 > /sys/kernel/mm/hugepages/hugepages-1048576kB/demote cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages # 512 cat /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages # 0 [1] https://lore.kernel.org/lkml/20220922154207.1575343-1-sidhartha.kumar@oracle.com/ [2] https://lore.kernel.org/linux-mm/20221101223059.460937-1-sidhartha.kumar@oracle.com/ This patch (of 10): Add folio equivalents for set_compound_order() and set_compound_page_dtor(). Also remove extra new-lines introduced by mm/hugetlb: convert move_hugetlb_state() to folios and mm/hugetlb_cgroup: convert hugetlb_cgroup_uncharge_page() to folios. [sidhartha.kumar@oracle.com: clarify folio_set_compound_order() zero support] Link: https://lkml.kernel.org/r/20221207223731.32784-1-sidhartha.kumar@oracle.com Link: https://lkml.kernel.org/r/20221129225039.82257-1-sidhartha.kumar@oracle.com Link: https://lkml.kernel.org/r/20221129225039.82257-2-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Suggested-by: Mike Kravetz Suggested-by: Muchun Song Reviewed-by: Mike Kravetz Cc: David Hildenbrand Cc: John Hubbard Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Tarun Sahu Cc: Rasmus Villemoes Cc: Wei Chen Signed-off-by: Andrew Morton include/linux/mm.h | 23 +++++++++++++++++++++++ mm/hugetlb.c | 4 +--- 2 files changed, 24 insertions(+), 3 deletions(-) commit 6e1ca48d0669b0f5efcbaa051b23cd8e651a1614 Author: Vishal Moola (Oracle) Date: Tue Nov 1 10:53:26 2022 -0700 folio-compat: remove lru_cache_add() There are no longer any callers of lru_cache_add(), so remove it. This saves 79 bytes of kernel text. Also cleanup some comments such that they reference the new folio_add_lru() instead. Link: https://lkml.kernel.org/r/20221101175326.13265-6-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Miklos Szeredi Signed-off-by: Andrew Morton include/linux/swap.h | 1 - mm/folio-compat.c | 6 ------ mm/truncate.c | 2 +- mm/workingset.c | 5 ++++- 4 files changed, 5 insertions(+), 9 deletions(-) commit 284a344ed19dc92526024d062b30f90774fea50f Author: Vishal Moola (Oracle) Date: Tue Nov 1 10:53:25 2022 -0700 khugepage: replace lru_cache_add() with folio_add_lru() Replaces some calls with their folio equivalents. This is in preparation for the removal of lru_cache_add(). This replaces 3 calls to compound_head() with 1. Link: https://lkml.kernel.org/r/20221101175326.13265-5-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Miklos Szeredi Signed-off-by: Andrew Morton mm/khugepaged.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 28965f0f8be62e1ed8296fe0240b5d5dc064b681 Author: Vishal Moola (Oracle) Date: Tue Nov 1 10:53:24 2022 -0700 userfaultfd: replace lru_cache functions with folio_add functions Replaces lru_cache_add() and lru_cache_add_inactive_or_unevictable() with folio_add_lru() and folio_add_lru_vma(). This is in preparation for the removal of lru_cache_add(). Link: https://lkml.kernel.org/r/20221101175326.13265-4-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Miklos Szeredi Signed-off-by: Andrew Morton mm/userfaultfd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 063aaad792eef49a11d7575dc9914b43c0fa3792 Author: Vishal Moola (Oracle) Date: Tue Nov 1 10:53:23 2022 -0700 fuse: convert fuse_try_move_page() to use folios Converts the function to try to move folios instead of pages. Also converts fuse_check_page() to fuse_get_folio() since this is its only caller. This change removes 15 calls to compound_head(). Link: https://lkml.kernel.org/r/20221101175326.13265-3-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Miklos Szeredi Cc: Matthew Wilcox (Oracle) Cc: Mike Kravetz Signed-off-by: Andrew Morton fs/fuse/dev.c | 55 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) commit 3720dd6dcac38d03424d6ba38107f39af5318bcf Author: Vishal Moola (Oracle) Date: Tue Nov 1 10:53:22 2022 -0700 filemap: convert replace_page_cache_page() to replace_page_cache_folio() Patch series "Removing the lru_cache_add() wrapper". This patchset replaces all calls of lru_cache_add() with the folio equivalent: folio_add_lru(). This is allows us to get rid of the wrapper The series passes xfstests and the userfaultfd selftests. This patch (of 5): Eliminates 7 calls to compound_head(). Link: https://lkml.kernel.org/r/20221101175326.13265-1-vishal.moola@gmail.com Link: https://lkml.kernel.org/r/20221101175326.13265-2-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Miklos Szeredi Signed-off-by: Andrew Morton fs/fuse/dev.c | 2 +- include/linux/pagemap.h | 2 +- mm/filemap.c | 52 ++++++++++++++++++++++++------------------------- 3 files changed, 27 insertions(+), 29 deletions(-) commit c5a303a51b9ca85b52250fd8d92bf4918fbbdf0d Author: Feiyang Chen Date: Thu Oct 27 20:52:53 2022 +0800 LoongArch: enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP The feature of minimizing overhead of struct page associated with each HugeTLB page is implemented on x86_64. However, the infrastructure of this feature is already there, so just select ARCH_WANT_HUGETLB_PAGE_ OPTIMIZE_VMEMMAP is enough to enable this feature for LoongArch. Link: https://lkml.kernel.org/r/20221027125253.3458989-5-chenhuacai@loongson.cn Signed-off-by: Feiyang Chen Signed-off-by: Huacai Chen Reviewed-by: Philippe Mathieu-Daudé Acked-by: Muchun Song Reviewed-by: Arnd Bergmann Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: Dinh Nguyen Cc: Guo Ren Cc: Jiaxun Yang Cc: Min Zhou Cc: Peter Zijlstra Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Xuefeng Li Cc: Xuerui Wang Signed-off-by: Andrew Morton arch/loongarch/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2045a3b8911b6ee64dd9b522d61abc468ecdcdb5 Author: Feiyang Chen Date: Thu Oct 27 20:52:52 2022 +0800 mm/sparse-vmemmap: generalise vmemmap_populate_hugepages() Generalise vmemmap_populate_hugepages() so ARM64 & X86 & LoongArch can share its implementation. Link: https://lkml.kernel.org/r/20221027125253.3458989-4-chenhuacai@loongson.cn Signed-off-by: Feiyang Chen Signed-off-by: Huacai Chen Acked-by: Will Deacon Acked-by: Dave Hansen Reviewed-by: Arnd Bergmann Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dinh Nguyen Cc: Guo Ren Cc: Jiaxun Yang Cc: Min Zhou Cc: Peter Zijlstra Cc: Philippe Mathieu-Daudé Cc: Thomas Bogendoerfer Cc: Xuefeng Li Cc: Xuerui Wang Cc: Muchun Song Signed-off-by: Andrew Morton arch/arm64/mm/mmu.c | 55 ++++++++--------------------- arch/loongarch/mm/init.c | 59 +++++++++---------------------- arch/x86/mm/init_64.c | 92 +++++++++++++++++------------------------------- include/linux/mm.h | 6 ++++ mm/sparse-vmemmap.c | 63 +++++++++++++++++++++++++++++++++ 5 files changed, 132 insertions(+), 143 deletions(-) commit 7b09f5af01ede480cbe7abcb281cf17550a46ff5 Author: Feiyang Chen Date: Thu Oct 27 20:52:51 2022 +0800 LoongArch: add sparse memory vmemmap support Add sparse memory vmemmap support for LoongArch. SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise pfn_to_page and page_to_pfn operations. This is the most efficient option when sufficient kernel resources are available. Link: https://lkml.kernel.org/r/20221027125253.3458989-3-chenhuacai@loongson.cn Signed-off-by: Min Zhou Signed-off-by: Feiyang Chen Signed-off-by: Huacai Chen Reviewed-by: Arnd Bergmann Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: Dinh Nguyen Cc: Guo Ren Cc: Jiaxun Yang Cc: Peter Zijlstra Cc: Philippe Mathieu-Daudé Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Xuefeng Li Cc: Xuerui Wang Cc: Muchun Song Signed-off-by: Andrew Morton arch/loongarch/Kconfig | 1 + arch/loongarch/include/asm/pgtable.h | 7 +++- arch/loongarch/include/asm/sparsemem.h | 8 ++++ arch/loongarch/mm/init.c | 72 ++++++++++++++++++++++++++++++++-- include/linux/mm.h | 2 + mm/sparse-vmemmap.c | 10 +++++ 6 files changed, 96 insertions(+), 4 deletions(-) commit 22c4e80466eb88cff283ed50a5d0b0ff1654d0c3 Author: Feiyang Chen Date: Thu Oct 27 20:52:50 2022 +0800 MIPS&LoongArch&NIOS2: adjust prototypes of p?d_init() Patch series "mm/sparse-vmemmap: Generalise helpers and enable for LoongArch", v14. This series is in order to enable sparse-vmemmap for LoongArch. But LoongArch cannot use generic helpers directly because MIPS&LoongArch need to call pgd_init()/pud_init()/pmd_init() when populating page tables. So we adjust the prototypes of p?d_init() to make generic helpers can call them, then enable sparse-vmemmap with generic helpers, and to be further, generalise vmemmap_populate_hugepages() for ARM64, X86 and LoongArch. This patch (of 4): We are preparing to add sparse vmemmap support to LoongArch. MIPS and LoongArch need to call pgd_init()/pud_init()/pmd_init() when populating page tables, so adjust their prototypes to make generic helpers can call them. NIOS2 declares pmd_init() but doesn't use, just remove it to avoid build errors. Link: https://lkml.kernel.org/r/20221027125253.3458989-1-chenhuacai@loongson.cn Link: https://lkml.kernel.org/r/20221027125253.3458989-2-chenhuacai@loongson.cn Signed-off-by: Feiyang Chen Signed-off-by: Huacai Chen Reviewed-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Arnd Bergmann Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: Dinh Nguyen Cc: Guo Ren Cc: Peter Zijlstra Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Xuefeng Li Cc: Xuerui Wang Cc: Min Zhou Cc: Muchun Song Signed-off-by: Andrew Morton arch/loongarch/include/asm/pgalloc.h | 13 ++----------- arch/loongarch/include/asm/pgtable.h | 8 ++++---- arch/loongarch/kernel/numa.c | 4 ++-- arch/loongarch/mm/pgtable.c | 23 +++++++++++++---------- arch/mips/include/asm/pgalloc.h | 10 +++++----- arch/mips/include/asm/pgtable-64.h | 8 ++++---- arch/mips/kvm/mmu.c | 3 +-- arch/mips/mm/pgtable-32.c | 9 ++++----- arch/mips/mm/pgtable-64.c | 18 ++++++++++-------- arch/mips/mm/pgtable.c | 2 +- arch/nios2/include/asm/pgalloc.h | 5 ----- 11 files changed, 46 insertions(+), 57 deletions(-) commit 85716a80c16dd6b6d1aaed87cd4b91c9b1d9b9b2 Author: Alexander Potapenko Date: Mon Nov 28 10:45:41 2022 +0100 kmsan: allow using __msan_instrument_asm_store() inside runtime In certain cases (e.g. when handling a softirq) __msan_instrument_asm_store(&var, sizeof(var)) may be called with from within KMSAN runtime, but later the value of @var is used with !kmsan_in_runtime(), leading to false positives. Because kmsan_internal_unpoison_memory() doesn't take locks, it should be fine to call it without kmsan_in_runtime() checks, which fixes the mentioned false positives. Link: https://lkml.kernel.org/r/20221128094541.2645890-2-glider@google.com Signed-off-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Ingo Molnar Cc: Marco Elver Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Andrew Morton mm/kmsan/instrumentation.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1e8e4a7cc2fa3017b1daf02612e095d51924ce1e Author: Alexander Potapenko Date: Mon Nov 28 10:45:40 2022 +0100 lockdep: allow instrumenting lockdep.c with KMSAN Lockdep and KMSAN used to play badly together, causing deadlocks when KMSAN instrumentation of lockdep.c called lockdep functions recursively. Looks like this is no more the case, and a kernel can run (yet slower) with both KMSAN and lockdep enabled. This patch should fix false positives on wq_head->lock->dep_map, which KMSAN used to consider uninitialized because of lockdep.c not being instrumented. Link: https://lore.kernel.org/lkml/Y3b9AAEKp2Vr3e6O@sol.localdomain/ Link: https://lkml.kernel.org/r/20221128094541.2645890-1-glider@google.com Signed-off-by: Alexander Potapenko Reported-by: Eric Biggers Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Marco Elver Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Andrew Morton kernel/locking/Makefile | 1 - 1 file changed, 1 deletion(-) commit d3a89233583bf8edab18ac09732759c71dbe0173 Author: zhang songyi Date: Mon Nov 28 21:07:43 2022 +0800 include/linux/pgtable.h: : remove redundant pte variable Return value from ptep_get_and_clear_full() directly instead of taking this in another redundant variable. Link: https://lkml.kernel.org/r/202211282107437343474@zte.com.cn Signed-off-by: zhang songyi Signed-off-by: Andrew Morton include/linux/pgtable.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3cd629e5775397103e0428f62ce64747741dbfe5 Author: Brian Foster Date: Mon Nov 28 10:56:32 2022 -0500 mm/fadvise: use LLONG_MAX instead of -1 for eof generic_fadvise() sets endbyte = -1 to specify end of file (i.e. if length == 0 is passed from userspace). Most other callers to filemap_fdatawrite_range() use LLONG_MAX for this purpose, particularly if they also call fdatawait_range() (which requires end >= start). For example, sync_file_range(), vfs_fsync() (where the range is passed down through per-fs ->fsync() callbacks), filemap_flush(), etc. generic_fadvise() does not currently wait on writeback, but fix the call up to be consistent with other callers. Link: https://lkml.kernel.org/r/20221128155632.3950447-3-bfoster@redhat.com Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton mm/fadvise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit feeb9b26952367bc1171592ee476f95aa81ee588 Author: Brian Foster Date: Mon Nov 28 10:56:31 2022 -0500 filemap: skip write and wait if end offset precedes start Patch series "filemap: skip write and wait if end offset precedes start", v2. A fix for the odd write and wait behavior described in the patch 1 commit log. Technically patch 1 could simply remove the check rather than lift it into the callers, but this seemed a bit more user friendly to me. Patch 2 is appended after observation that fadvise() interacted poorly with the v1 patch. This is no longer a problem with v2, making patch 2 purely a cleanup. This series survived both fstests and ltp regression runs without observable problems. I had (end < start) warning checks in each relevant function, with fadvise() being the only caller that triggered them. That said, I dropped the warnings after testing because there seemed to much potential for noise from the various other callers. This patch (of 2): A call to file[map]_write_and_wait_range() with an end offset that precedes the start offset but happens to land in the same page can trigger writeback submission but fails to wait on the submitted page. Writeback submission occurs because __filemap_fdatawrite_range() passes both offsets down into write_cache_pages(), which rounds down to page indexes before it starts processing writeback. However, __filemap_fdatawait_range() immediately returns if the byte-granular end offset precedes the start offset. This behavior was observed in the form of unpredictable latency from a frequent write and wait call with incorrect parameters. The behavior gave the impression that the fdatawait path might occasionally fail to wait on writeback, but further investigation showed the latency was from write_cache_pages() waiting on writeback state to clear for a page already under writeback. Therefore, this indicated that fdatawait actually never waits on writeback in this particular situation. The byte granular check in __filemap_fdatawait_range() goes all the way back to the old wait_on_page_writeback() helper. It originally used page offsets and so would have waited in this problematic case. That changed to byte granularity file offsets in commit 94004ed726f3 ("kill wait_on_page_writeback_range"), which subtly changed this behavior. The check itself has become somewhat redundant since the error checking code that used to follow the wait loop (at the time of the aforementioned commit) has now been removed and lifted into the higher level callers. Therefore, we can restore historical fdatawait behavior by simply removing the check. Since the current fdatawait behavior has been in place for quite some time and is consistent with other interfaces that use file offsets, instead lift the check into the file[map]_write_and_wait_range() helpers to provide consistent behavior between the write and wait. Link: https://lkml.kernel.org/r/20221128155632.3950447-1-bfoster@redhat.com Link: https://lkml.kernel.org/r/20221128155632.3950447-2-bfoster@redhat.com Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton mm/filemap.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9997bc017549acd6425e32300eff28424ffeeb6b Author: Nhat Pham Date: Mon Nov 28 11:16:15 2022 -0800 zsmalloc: implement writeback mechanism for zsmalloc This commit adds the writeback mechanism for zsmalloc, analogous to the zbud allocator. Zsmalloc will attempt to determine the coldest zspage (i.e least recently used) in the pool, and attempt to write back all the stored compressed objects via the pool's evict handler. Link: https://lkml.kernel.org/r/20221128191616.1261026-7-nphamcs@gmail.com Signed-off-by: Nhat Pham Acked-by: Johannes Weiner Reviewed-by: Sergey Senozhatsky Cc: Dan Streetman Cc: Minchan Kim Cc: Nitin Gupta Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton mm/zsmalloc.c | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 183 insertions(+), 11 deletions(-) commit bd0fded29689a762e6a749a1258a59cc2b99a18a Author: Nhat Pham Date: Mon Nov 28 11:16:14 2022 -0800 zsmalloc: add zpool_ops field to zs_pool to store evict handlers This adds a new field to zs_pool to store evict handlers for writeback, analogous to the zbud allocator. Link: https://lkml.kernel.org/r/20221128191616.1261026-6-nphamcs@gmail.com Signed-off-by: Nhat Pham Acked-by: Minchan Kim Acked-by: Johannes Weiner Reviewed-by: Sergey Senozhatsky Cc: Dan Streetman Cc: Nitin Gupta Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton mm/zsmalloc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 64f768c6b32e1957e2b65b70e97cb4cb62344bc4 Author: Nhat Pham Date: Mon Nov 28 11:16:13 2022 -0800 zsmalloc: add a LRU to zs_pool to keep track of zspages in LRU order This helps determines the coldest zspages as candidates for writeback. Link: https://lkml.kernel.org/r/20221128191616.1261026-5-nphamcs@gmail.com Signed-off-by: Nhat Pham Acked-by: Johannes Weiner Reviewed-by: Sergey Senozhatsky Cc: Dan Streetman Cc: Minchan Kim Cc: Nitin Gupta Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton mm/zsmalloc.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit c0547d0b6a4b637db05406b90ba82e1b2e71de56 Author: Nhat Pham Date: Mon Nov 28 11:16:12 2022 -0800 zsmalloc: consolidate zs_pool's migrate_lock and size_class's locks Currently, zsmalloc has a hierarchy of locks, which includes a pool-level migrate_lock, and a lock for each size class. We have to obtain both locks in the hotpath in most cases anyway, except for zs_malloc. This exception will no longer exist when we introduce a LRU into the zs_pool for the new writeback functionality - we will need to obtain a pool-level lock to synchronize LRU handling even in zs_malloc. In preparation for zsmalloc writeback, consolidate these locks into a single pool-level lock, which drastically reduces the complexity of synchronization in zsmalloc. We have also benchmarked the lock consolidation to see the performance effect of this change on zram. First, we ran a synthetic FS workload on a server machine with 36 cores (same machine for all runs), using fs_mark -d ../zram1mnt -s 100000 -n 2500 -t 32 -k before and after for btrfs and ext4 on zram (FS usage is 80%). Here is the result (unit is file/second): With lock consolidation (btrfs): Average: 13520.2, Median: 13531.0, Stddev: 137.5961482019028 Without lock consolidation (btrfs): Average: 13487.2, Median: 13575.0, Stddev: 309.08283679298665 With lock consolidation (ext4): Average: 16824.4, Median: 16839.0, Stddev: 89.97388510006668 Without lock consolidation (ext4) Average: 16958.0, Median: 16986.0, Stddev: 194.7370021336469 As you can see, we observe a 0.3% regression for btrfs, and a 0.9% regression for ext4. This is a small, barely measurable difference in my opinion. For a more realistic scenario, we also tries building the kernel on zram. Here is the time it takes (in seconds): With lock consolidation (btrfs): real Average: 319.6, Median: 320.0, Stddev: 0.8944271909999159 user Average: 6894.2, Median: 6895.0, Stddev: 25.528415540334656 sys Average: 521.4, Median: 522.0, Stddev: 1.51657508881031 Without lock consolidation (btrfs): real Average: 319.8, Median: 320.0, Stddev: 0.8366600265340756 user Average: 6896.6, Median: 6899.0, Stddev: 16.04057355583023 sys Average: 520.6, Median: 521.0, Stddev: 1.140175425099138 With lock consolidation (ext4): real Average: 320.0, Median: 319.0, Stddev: 1.4142135623730951 user Average: 6896.8, Median: 6878.0, Stddev: 28.621670111997307 sys Average: 521.2, Median: 521.0, Stddev: 1.7888543819998317 Without lock consolidation (ext4) real Average: 319.6, Median: 319.0, Stddev: 0.8944271909999159 user Average: 6886.2, Median: 6887.0, Stddev: 16.93221781102523 sys Average: 520.4, Median: 520.0, Stddev: 1.140175425099138 The difference is entirely within the noise of a typical run on zram. This hardly justifies the complexity of maintaining both the pool lock and the class lock. In fact, for writeback, we would need to introduce yet another lock to prevent data races on the pool's LRU, further complicating the lock handling logic. IMHO, it is just better to collapse all of these into a single pool-level lock. Link: https://lkml.kernel.org/r/20221128191616.1261026-4-nphamcs@gmail.com Signed-off-by: Nhat Pham Suggested-by: Johannes Weiner Acked-by: Minchan Kim Acked-by: Johannes Weiner Reviewed-by: Sergey Senozhatsky Cc: Dan Streetman Cc: Nitin Gupta Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton mm/zsmalloc.c | 87 +++++++++++++++++++++++++---------------------------------- 1 file changed, 37 insertions(+), 50 deletions(-) commit 6a05aa30109d5cd4bebfb89415c58fa4599ef875 Author: Johannes Weiner Date: Mon Nov 28 11:16:11 2022 -0800 zpool: clean out dead code There is a lot of provision for flexibility that isn't actually needed or used. Zswap (the only zpool user) always passes zpool_ops with an .evict method set. The backends who reclaim only do so for zswap, so they can also directly call zpool_ops without indirection or checks. Finally, there is no need to check the retries parameters and bail with -EINVAL in the reclaim function, when that's called just a few lines below with a hard-coded 8. There is no need to duplicate the evictable and sleep_mapped attrs from the driver in zpool_ops. Link: https://lkml.kernel.org/r/20221128191616.1261026-3-nphamcs@gmail.com Reviewed-by: Sergey Senozhatsky Signed-off-by: Johannes Weiner Signed-off-by: Nhat Pham Cc: Dan Streetman Cc: Minchan Kim Cc: Nitin Gupta Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton mm/z3fold.c | 36 +++++------------------------------- mm/zbud.c | 32 +++++--------------------------- mm/zpool.c | 10 ++-------- 3 files changed, 12 insertions(+), 66 deletions(-) commit 6b3379e8dcbea09b7e27bf0eea2f53fd15a164ac Author: Johannes Weiner Date: Mon Nov 28 11:16:10 2022 -0800 zswap: fix writeback lock ordering for zsmalloc Patch series "Implement writeback for zsmalloc", v7. Unlike other zswap allocators such as zbud or z3fold, zsmalloc currently lacks the writeback mechanism. This means that when the zswap pool is full, it will simply reject further allocations, and the pages will be written directly to swap. This series of patches implements writeback for zsmalloc. When the zswap pool becomes full, zsmalloc will attempt to evict all the compressed objects in the least-recently used zspages. This patch (of 6): zswap's customary lock order is tree->lock before pool->lock, because the tree->lock protects the entries' refcount, and the free callbacks in the backends acquire their respective pool locks to dispatch the backing object. zsmalloc's map callback takes the pool lock, so zswap must not grab the tree->lock while a handle is mapped. This currently only happens during writeback, which isn't implemented for zsmalloc. In preparation for it, move the tree->lock section out of the mapped entry section Link: https://lkml.kernel.org/r/20221128191616.1261026-1-nphamcs@gmail.com Link: https://lkml.kernel.org/r/20221128191616.1261026-2-nphamcs@gmail.com Signed-off-by: Johannes Weiner Signed-off-by: Nhat Pham Reviewed-by: Sergey Senozhatsky Cc: Dan Streetman Cc: Minchan Kim Cc: Nitin Gupta Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton mm/zswap.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit fd3b1bc3c86ee11ba77421b00c70280605b521c6 Author: Pavankumar Kondeti Date: Wed Nov 9 10:48:36 2022 +0530 mm/madvise: fix madvise_pageout for private file mappings When MADV_PAGEOUT is called on a private file mapping VMA region, we bail out early if the process is neither owner nor write capable of the file. However, this VMA may have both private/shared clean pages and private dirty pages. The opportunity of paging out the private dirty pages (Anon pages) is missed. Fix this behavior by allowing private file mappings pageout further and perform the file access check along with PageAnon() during page walk. We observe ~10% improvement in zram usage, thus leaving more available memory on a 4GB RAM system running Android. [quic_pkondeti@quicinc.com: v2] Link: https://lkml.kernel.org/r/1669962597-27724-1-git-send-email-quic_pkondeti@quicinc.com Link: https://lkml.kernel.org/r/1667971116-12900-1-git-send-email-quic_pkondeti@quicinc.com Signed-off-by: Pavankumar Kondeti Cc: Charan Teja Kalla Cc: Minchan Kim Cc: Suren Baghdasaryan Cc: David Hildenbrand Signed-off-by: Andrew Morton mm/madvise.c | 53 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 18 deletions(-) commit 4c9473e87e75a2a77ccd02e55c91ffe6a52b5df6 Author: Gautam Menghani Date: Wed Oct 26 10:52:18 2022 +0530 mm/khugepaged: add tracepoint to collapse_file() "mm_khugepaged_collapse_file" for capturing is_shmem. Currently, is_shmem is not being captured. Capturing is_shmem is useful as it can indicate if tmpfs is being used as a backing store instead of persistent storage. Add the tracepoint in collapse_file() named "mm_khugepaged_collapse_file" for capturing is_shmem. [gautammenghani201@gmail.com: swap is_shmem and addr to save space, per Steven Rostedt] Link: https://lkml.kernel.org/r/20221202201807.182829-1-gautammenghani201@gmail.com Link: https://lkml.kernel.org/r/20221026052218.148234-1-gautammenghani201@gmail.com Signed-off-by: Gautam Menghani Reviewed-by: Steven Rostedt (Google) [tracing] Cc: David Hildenbrand Cc: Masami Hiramatsu (Google) Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton include/trace/events/huge_memory.h | 38 ++++++++++++++++++++++++++++++++++++++ mm/khugepaged.c | 7 ++++--- 2 files changed, 42 insertions(+), 3 deletions(-) commit f7355e99d9f71fcde093193fd4b569a648ba5ce3 Author: David Hildenbrand Date: Fri Oct 21 12:11:41 2022 +0200 mm/gup: remove FOLL_MIGRATION Fortunately, the last user (KSM) is gone, so let's just remove this rather special code from generic GUP handling -- especially because KSM never required the PMD handling as KSM only deals with individual base pages. [akpm@linux-foundation.org: fix merge snafu]Link: https://lkml.kernel.org/r/20221021101141.84170-10-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/mm.h | 1 - mm/gup.c | 55 +++++------------------------------------------------- 2 files changed, 5 insertions(+), 51 deletions(-) commit d7c0e68dab98f0f5a2af501eaefeb90cc855fc80 Author: David Hildenbrand Date: Fri Oct 21 12:11:40 2022 +0200 mm/ksm: convert break_ksm() to use walk_page_range_vma() FOLL_MIGRATION exists only for the purpose of break_ksm(), and actually, there is not even the need to wait for the migration to finish, we only want to know if we're dealing with a KSM page. Using follow_page() just to identify a KSM page overcomplicates GUP code. Let's use walk_page_range_vma() instead, because we don't actually care about the page itself, we only need to know a single property -- no need to even grab a reference. So, get rid of follow_page() usage such that we can get rid of FOLL_MIGRATION now and eventually be able to get rid of follow_page() in the future. In my setup (AMD Ryzen 9 3900X), running the KSM selftest to test unmerge performance on 2 GiB (taskset 0x8 ./ksm_tests -D -s 2048), this results in a performance degradation of ~2% (old: ~5010 MiB/s, new: ~4900 MiB/s). I don't think we particularly care for now. Interestingly, the benchmark reduction is due to the single callback. Adding a second callback (e.g., pud_entry()) reduces the benchmark by another 100-200 MiB/s. Link: https://lkml.kernel.org/r/20221021101141.84170-9-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/ksm.c | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) commit e07cda5f232fac4de0925d8a4c92e51e41fa2f6e Author: David Hildenbrand Date: Fri Oct 21 12:11:39 2022 +0200 mm/pagewalk: add walk_page_range_vma() Let's add walk_page_range_vma(), which is similar to walk_page_vma(), however, is only interested in a subset of the VMA range. To be used in KSM code to stop using follow_page() next. Link: https://lkml.kernel.org/r/20221021101141.84170-8-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/pagewalk.h | 3 +++ mm/pagewalk.c | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) commit 6cce3314b928b2db7d5f48171e18314226551c3f Author: David Hildenbrand Date: Fri Oct 21 12:11:37 2022 +0200 mm/ksm: fix KSM COW breaking with userfaultfd-wp via FAULT_FLAG_UNSHARE Let's stop breaking COW via a fake write fault and let's use FAULT_FLAG_UNSHARE instead. This avoids any wrong side effects of the fake write fault, such as mapping the PTE writable and marking the pte dirty/softdirty. Consequently, we will no longer trigger a fake write fault and break COW without any such side-effects. Also, this fixes KSM interaction with userfaultfd-wp: when we have a KSM page that's write-protected by userfaultfd, break_ksm()->handle_mm_fault() will fail with VM_FAULT_SIGBUS and will simply return in break_ksm() with 0 instead of actually breaking COW. For now, the KSM unmerge tests can trigger that: $ sudo ./ksm_functional_tests TAP version 13 1..3 # [RUN] test_unmerge ok 1 Pages were unmerged # [RUN] test_unmerge_discarded ok 2 Pages were unmerged # [RUN] test_unmerge_uffd_wp not ok 3 Pages were unmerged Bail out! 1 out of 3 tests failed # Planned tests != run tests (2 != 3) # Totals: pass:2 fail:1 xfail:0 xpass:0 skip:0 error:0 The warning in dmesg also indicates this wrong handling: [ 230.096368] FAULT_FLAG_ALLOW_RETRY missing 881 [ 230.100822] CPU: 1 PID: 1643 Comm: ksm-uffd-wp [...] [ 230.110124] Hardware name: [...] [ 230.117775] Call Trace: [ 230.120227] [ 230.122334] dump_stack_lvl+0x44/0x5c [ 230.126010] handle_userfault.cold+0x14/0x19 [ 230.130281] ? tlb_finish_mmu+0x65/0x170 [ 230.134207] ? uffd_wp_range+0x65/0xa0 [ 230.137959] ? _raw_spin_unlock+0x15/0x30 [ 230.141972] ? do_wp_page+0x50/0x590 [ 230.145551] __handle_mm_fault+0x9f5/0xf50 [ 230.149652] ? mmput+0x1f/0x40 [ 230.152712] handle_mm_fault+0xb9/0x2a0 [ 230.156550] break_ksm+0x141/0x180 [ 230.159964] unmerge_ksm_pages+0x60/0x90 [ 230.163890] ksm_madvise+0x3c/0xb0 [ 230.167295] do_madvise.part.0+0x10c/0xeb0 [ 230.171396] ? do_syscall_64+0x67/0x80 [ 230.175157] __x64_sys_madvise+0x5a/0x70 [ 230.179082] do_syscall_64+0x58/0x80 [ 230.182661] ? do_syscall_64+0x67/0x80 [ 230.186413] entry_SYSCALL_64_after_hwframe+0x63/0xcd This is primarily a fix for KSM+userfaultfd-wp, however, the fake write fault was always questionable. As this fix is not easy to backport and it's not very critical, let's not cc stable. Link: https://lkml.kernel.org/r/20221021101141.84170-6-david@redhat.com Fixes: 529b930b87d9 ("userfaultfd: wp: hook userfault handler to write protection fault") Signed-off-by: David Hildenbrand Acked-by: Peter Xu Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/ksm.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit cb8d863313436339fb60f7dd5131af2e5854621e Author: David Hildenbrand Date: Fri Oct 21 12:11:35 2022 +0200 mm: remove VM_FAULT_WRITE All users -- GUP and KSM -- are gone, let's just remove it. Link: https://lkml.kernel.org/r/20221021101141.84170-4-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Peter Xu Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/mm_types.h | 3 --- mm/huge_memory.c | 2 +- mm/memory.c | 9 ++++----- 3 files changed, 5 insertions(+), 9 deletions(-) commit 58f595c6659198e1ad0ed431a408ddd79b21e579 Author: David Hildenbrand Date: Fri Oct 21 12:11:34 2022 +0200 mm/ksm: simplify break_ksm() to not rely on VM_FAULT_WRITE Now that GUP no longer requires VM_FAULT_WRITE, break_ksm() is the sole remaining user of VM_FAULT_WRITE. As we also want to stop triggering a fake write fault and instead use FAULT_FLAG_UNSHARE -- similar to GUP-triggered unsharing when taking a R/O pin on a shared anonymous page (including KSM pages), let's stop relying on VM_FAULT_WRITE. Let's rework break_ksm() to not rely on the return value of handle_mm_fault() anymore to figure out whether COW-breaking was successful. Simply perform another follow_page() lookup to verify the result. While this makes break_ksm() slightly less efficient, we can simplify handle_mm_fault() a little and easily switch to FAULT_FLAG_UNSHARE without introducing similar KSM-specific behavior for FAULT_FLAG_UNSHARE. In my setup (AMD Ryzen 9 3900X), running the KSM selftest to test unmerge performance on 2 GiB (taskset 0x8 ./ksm_tests -D -s 2048), this results in a performance degradation of ~4% -- 5% (old: ~5250 MiB/s, new: ~5010 MiB/s). I don't think that we particularly care about that performance drop when unmerging. If it ever turns out to be an actual performance issue, we can think about a better alternative for FAULT_FLAG_UNSHARE -- let's just keep it simple for now. Link: https://lkml.kernel.org/r/20221021101141.84170-3-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Peter Xu Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/ksm.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 5036880efdad976165c817dcb6a1c8c24fb16caa Author: David Hildenbrand Date: Fri Oct 21 12:11:33 2022 +0200 selftests/vm: add test to measure MADV_UNMERGEABLE performance Let's add a test to measure performance of KSM breaking not triggered via COW, but triggered by disabling KSM on an area filled with KSM pages via MADV_UNMERGEABLE. Link: https://lkml.kernel.org/r/20221021101141.84170-2-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Peter Xu Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton tools/testing/selftests/vm/ksm_tests.c | 76 +++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 2 deletions(-) commit c31783eeae7b22dc3f6edde7339de6112959225d Author: David Hildenbrand Date: Fri Oct 21 12:11:38 2022 +0200 mm/pagewalk: don't trigger test_walk() in walk_page_vma() As Peter points out, the caller passes a single VMA and can just do that check itself. And in fact, no existing users rely on test_walk() getting called. So let's just remove it and make the implementation slightly more efficient. Link: https://lkml.kernel.org/r/20221021101141.84170-7-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/pagewalk.h | 2 ++ mm/pagewalk.c | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) commit 93fb70aa5904c2577fab8100fa990ecfa4f5b4c7 Author: David Hildenbrand Date: Fri Oct 21 12:11:36 2022 +0200 selftests/vm: add KSM unmerge tests Patch series "mm/ksm: break_ksm() cleanups and fixes", v2. This series cleans up and fixes break_ksm(). In summary, we no longer use fake write faults to break COW but instead FAULT_FLAG_UNSHARE. Further, we move away from using follow_page() --- that we can hopefully remove completely at one point --- and use new walk_page_range_vma() instead. Fortunately, we can get rid of VM_FAULT_WRITE and FOLL_MIGRATION in common code now. Extend the existing ksm tests by an unmerge benchmark, and a some new unmerge tests. Also, add a selftest to measure MADV_UNMERGEABLE performance. In my setup (AMD Ryzen 9 3900X), running the KSM selftest to test unmerge performance on 2 GiB (taskset 0x8 ./ksm_tests -D -s 2048), this results in a performance degradation of ~6% -- 7% (old: ~5250 MiB/s, new: ~4900 MiB/s). I don't think we particularly care for now, but it's good to be aware of the implication. This patch (of 9): Let's add three unmerge tests (MADV_UNMERGEABLE unmerging all pages in the range). test_unmerge(): basic unmerge tests test_unmerge_discarded(): have some pte_none() entries in the range test_unmerge_uffd_wp(): protect the merged pages using uffd-wp ksm_tests.c currently contains a mixture of benchmarks and tests, whereby each test is carried out by executing the ksm_tests binary with specific parameters. Let's add new ksm_functional_tests.c that performs multiple, smaller functional tests all at once. Link: https://lkml.kernel.org/r/20221021101141.84170-1-david@redhat.com Link: https://lkml.kernel.org/r/20221021101141.84170-5-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton tools/testing/selftests/vm/Makefile | 2 + tools/testing/selftests/vm/ksm_functional_tests.c | 279 ++++++++++++++++++++++ tools/testing/selftests/vm/run_vmtests.sh | 2 + tools/testing/selftests/vm/vm_util.c | 10 + tools/testing/selftests/vm/vm_util.h | 1 + 5 files changed, 294 insertions(+) commit 85463321e726fe59873bbc21f2f480747810aef8 Author: Joel Savitz Date: Tue Oct 18 19:12:22 2022 -0400 selftests/vm: enable running select groups of tests Our memory management kernel CI testing at Red Hat uses the VM selftests and we have run into two problems: First, our LTP tests overlap with the VM selftests. We want to avoid unhelpful redundancy in our testing practices. Second, we have observed the current run_vmtests.sh to report overall failure/ambiguous results in the case that a machine lacks the necessary hardware to perform one or more of the tests. E.g. ksm tests that require more than one numa node. We want to be able to run the vm selftests suitable to particular hardware. Add the ability to run one or more groups of vm tests via run_vmtests.sh instead of simply all-or-none in order to solve these problems. Preserve existing default behavior of running all tests when the script is invoked with no arguments. Documentation of test groups is included in the patch as follows: # ./run_vmtests.sh [ -h || --help ] usage: ./tools/testing/selftests/vm/run_vmtests.sh [ -h | -t ""] -t: specify specific categories to tests to run -h: display this message The default behavior is to run all tests. Alternatively, specific groups tests can be run by passing a string to the -t argument containing one or more of the following categories separated by spaces: - mmap tests for mmap(2) - gup_test tests for gup using gup_test interface - userfaultfd tests for userfaultfd(2) - compaction a test for the patch "Allow compaction of unevictable pages" - mlock tests for mlock(2) - mremap tests for mremap(2) - hugevm tests for very large virtual address space - vmalloc vmalloc smoke tests - hmm hmm smoke tests - madv_populate test memadvise(2) MADV_POPULATE_{READ,WRITE} options - memfd_secret test memfd_secret(2) - process_mrelease test process_mrelease(2) - ksm ksm tests that do not require >=2 NUMA nodes - ksm_numa ksm tests that require >=2 NUMA nodes - pkey memory protection key tests - soft_dirty test soft dirty page bit semantics - anon_cow test anonymous copy-on-write semantics example: ./run_vmtests.sh -t "hmm mmap ksm" Link: https://lkml.kernel.org/r/20221018231222.1884715-1-jsavitz@redhat.com Signed-off-by: Joel Savitz Cc: Joel Savitz Cc: Nico Pache Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/vm/run_vmtests.sh | 207 +++++++++++++++++++++--------- 1 file changed, 144 insertions(+), 63 deletions(-) commit f7cde96710a4362dca199458d3de04f631178453 Author: Yuezhang Mo Date: Mon Mar 28 16:37:58 2022 +0800 exfat: remove i_size_write() from __exfat_truncate() The file/directory size is updated into inode by i_size_write() before __exfat_truncate() is called, so it is redundant to re-update by i_size_write() in __exfat_truncate(). Code refinement, no functional changes. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/exfat_fs.h | 2 +- fs/exfat/file.c | 8 +++----- fs/exfat/inode.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) commit e981917b3fae689e9372647a38746444205bb905 Author: Yuezhang Mo Date: Thu Nov 17 10:36:21 2022 +0800 exfat: remove argument 'size' from exfat_truncate() argument 'size' is not used in exfat_truncate(), remove it. Code refinement, no functional changes. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/exfat_fs.h | 2 +- fs/exfat/file.c | 4 ++-- fs/exfat/inode.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 72880cb5f157514d797d5f6ab3184bbde671a18a Author: Yuezhang Mo Date: Sun Apr 10 16:12:14 2022 +0800 exfat: remove unnecessary arguments from exfat_find_dir_entry() This commit removes argument 'num_entries' and 'type' from exfat_find_dir_entry(). Code refinement, no functional changes. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/dir.c | 12 +++++++----- fs/exfat/exfat_fs.h | 3 +-- fs/exfat/namei.c | 10 ++-------- 3 files changed, 10 insertions(+), 15 deletions(-) commit 015c0d4f6b1e65857de88279f07d7ecc5e305137 Author: Yuezhang Mo Date: Mon Aug 15 10:15:16 2022 +0800 exfat: remove unneeded codes from __exfat_rename() The code gets the dentry, but the dentry is not used, remove the code. Code refinement, no functional changes. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/namei.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 088f1343d9108c16fca064951d85e6de9f5cab42 Author: Yuezhang Mo Date: Tue Aug 16 16:55:06 2022 +0800 exfat: remove call ilog2() from exfat_readdir() There is no need to call ilog2() for the conversions between cluster and dentry in exfat_readdir(), because these conversions can be replaced with EXFAT_DEN_TO_CLU()/EXFAT_CLU_TO_DEN(). Code refinement, no functional changes. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/dir.c | 9 ++++----- fs/exfat/exfat_fs.h | 10 ++++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) commit f3fe3954c09f97d8227d9d2edc807796a8b228ab Author: Yuezhang Mo Date: Thu Mar 17 19:39:20 2022 +0800 exfat: replace magic numbers with Macros Code refinement, no functional changes. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/dir.c | 12 ++++++------ fs/exfat/inode.c | 4 ++-- fs/exfat/namei.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) commit 3b9681acb0ef739343d8cfd35e054aab9597f1dc Author: Yuezhang Mo Date: Thu Mar 17 18:12:40 2022 +0800 exfat: rename exfat_free_dentry_set() to exfat_put_dentry_set() Since struct exfat_entry_set_cache is allocated from stack, no need to free, so rename exfat_free_dentry_set() to exfat_put_dentry_set(). After renaming, the new function pair is exfat_get_dentry_set()/exfat_put_dentry_set(). Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/dir.c | 16 ++++++++-------- fs/exfat/exfat_fs.h | 2 +- fs/exfat/inode.c | 2 +- fs/exfat/namei.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) commit 20914ff6dd56dd6b548bf5dd90bff09ef89999e4 Author: Yuezhang Mo Date: Thu Nov 17 11:37:13 2022 +0800 exfat: move exfat_entry_set_cache from heap to stack The size of struct exfat_entry_set_cache is only 56 bytes on 64-bit system, and allocating from stack is more efficient than allocating from heap. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/dir.c | 35 +++++++++++++++-------------------- fs/exfat/exfat_fs.h | 5 +++-- fs/exfat/inode.c | 13 ++++++------- fs/exfat/namei.c | 11 +++++------ 4 files changed, 29 insertions(+), 35 deletions(-) commit a3ff29a95fde16906304455aa8c0bd84eb770258 Author: Yuezhang Mo Date: Wed Nov 9 13:50:22 2022 +0800 exfat: support dynamic allocate bh for exfat_entry_set_cache In special cases, a file or a directory may occupied more than 19 directory entries, pre-allocating 3 bh is not enough. Such as - Support vendor secondary directory entry in the future. - Since file directory entry is damaged, the SecondaryCount field is bigger than 18. So this commit supports dynamic allocation of bh. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/dir.c | 15 +++++++++++++++ fs/exfat/exfat_fs.h | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) commit f83d8a3b532097276266b5e81073ea46e27b17ab Author: Yuezhang Mo Date: Thu Apr 7 15:55:56 2022 +0800 exfat: reduce the size of exfat_entry_set_cache In normal, there are 19 directory entries at most for a file or a directory. - A file directory entry - A stream extension directory entry - 1~17 file name directory entry So the directory entries are in 3 sectors at most, it is enough for struct exfat_entry_set_cache to pre-allocate 3 bh. This commit changes the size of struct exfat_entry_set_cache as: Before After 32-bit system 88 32 bytes 64-bit system 168 48 bytes Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/exfat_fs.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit e298c8a818a3e517582e60c412f4a41b3a1647c5 Author: Yuezhang Mo Date: Mon Nov 7 17:22:13 2022 +0900 exfat: hint the empty entry which at the end of cluster chain After traversing all directory entries, hint the empty directory entry no matter whether or not there are enough empty directory entries. After this commit, hint the empty directory entries like this: 1. Hint the deleted directory entries if enough; 2. Hint the deleted and unused directory entries which at the end of the cluster chain no matter whether enough or not(Add by this commit); 3. If no any empty directory entries, hint the empty directory entries in the new cluster(Add by this commit). This avoids repeated traversal of directory entries, reduces CPU usage, and improves the performance of creating files and directories(especially on low-performance CPUs). Test create 5000 files in a class 4 SD card on imx6q-sabrelite with: for ((i=0;i<5;i++)); do sync time (for ((j=1;j<=1000;j++)); do touch file$((i*1000+j)); done) done The more files, the more performance improvements. Before After Improvement 1~1000 25.360s 22.168s 14.40% 1001~2000 38.242s 28.72ss 33.15% 2001~3000 49.134s 35.037s 40.23% 3001~4000 62.042s 41.624s 49.05% 4001~5000 73.629s 46.772s 57.42% Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/dir.c | 26 ++++++++++++++++++++++---- fs/exfat/namei.c | 33 +++++++++++++++++++++------------ 2 files changed, 43 insertions(+), 16 deletions(-) commit ff39899be80b9d90d5e13775eb9fd150338b6e15 Author: Yuezhang Mo Date: Thu Jul 21 09:59:32 2022 +0800 exfat: simplify empty entry hint This commit adds exfat_set_empty_hint()/exfat_reset_empty_hint() to reduce code complexity and make code more readable. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/dir.c | 58 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 27 deletions(-) commit 13959373e9c9021cc80730c7bd1242e07b10b328 Author: Nicholas Piggin Date: Thu Dec 8 22:32:25 2022 +1000 powerpc/qspinlock: Fix 32-bit build Some 32-bit configurations don't pull in the spin_begin/end/relax definitions. Fix is to restore a lost include. Reported-by: kernel test robot Fixes: 84990b169557 ("powerpc/qspinlock: add mcs queueing for contended waiters") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/oe-kbuild-all/202212050224.i7uh9fOh-lkp@intel.com Link: https://lore.kernel.org/r/20221208123225.1566113-1-npiggin@gmail.com arch/powerpc/lib/qspinlock.c | 1 + 1 file changed, 1 insertion(+) commit 580f9896e088b399fc79f1421e56a1b68f0450b5 Author: Rob Herring Date: Wed Dec 7 14:43:27 2022 -0600 dt-bindings: leds: Add missing references to common LED schema 'led' nodes should have a reference to LED common.yaml schema. Add it where missing and drop any duplicate properties. Acked-by: Lee Jones Acked-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221207204327.2810001-2-robh@kernel.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/leds/leds-lgm.yaml | 3 ++- .../devicetree/bindings/leds/leds-max77650.yaml | 9 ++------- .../devicetree/bindings/leds/rohm,bd71828-leds.yaml | 16 +++------------- 3 files changed, 7 insertions(+), 21 deletions(-) commit 121164481b79d93824eed464117d331a002f5d75 Author: Rob Herring Date: Wed Dec 7 14:43:26 2022 -0600 dt-bindings: leds: intel,lgm: Add missing 'led-gpios' property The example has 'led-gpio' properties, but that's not documented. As the 'gpio' form is deprecated, add 'led-gpios' to the schema and update the example. Reviewed-by: Krzysztof Kozlowski Acked-by: Lee Jones Link: https://lore.kernel.org/r/20221207204327.2810001-1-robh@kernel.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/leds/leds-lgm.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ee9d7a0e754568180a2f8ebc4aad226278a9116f Author: ruanjinjie Date: Sun Dec 11 10:33:37 2022 +0800 of: overlay: fix null pointer dereferencing in find_dup_cset_node_entry() and find_dup_cset_prop() When kmalloc() fail to allocate memory in kasprintf(), fn_1 or fn_2 will be NULL, and strcmp() will cause null pointer dereference. Fixes: 2fe0e8769df9 ("of: overlay: check prevents multiple fragments touching same property") Signed-off-by: ruanjinjie Link: https://lore.kernel.org/r/20221211023337.592266-1-ruanjinjie@huawei.com Signed-off-by: Rob Herring drivers/of/overlay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2d12e85336f6d4172fb2bab5935027c446d7343 Author: Alexandre Belloni Date: Sun Dec 11 23:35:53 2022 +0100 rtc: pcf85063: fix pcf85063_clkout_control pcf85063_clkout_control reads the wrong register but then update the correct one. Reported-by: Janne Terho Fixes: 8c229ab6048b ("rtc: pcf85063: Add pcf85063 clkout control to common clock framework") Link: https://lore.kernel.org/r/20221211223553.59955-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85063.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 103c14db61a24cc0cd344dc5d93d264a36687c35 Author: Alexandre Belloni Date: Sun Dec 11 22:57:55 2022 +0100 rtc: rx6110: fix warning with !OF rx6110_spi_of_match is not used when !OF, leading to a warning: >> drivers/rtc/rtc-rx6110.c:384:34: warning: 'rx6110_spi_of_match' defined but not used [-Wunused-const-variable=] 384 | static const struct of_device_id rx6110_spi_of_match[] = { | ^~~~~~~~~~~~~~~~~~~ Reported-by: kernel test robot Link: https://lore.kernel.org/r/20221211215756.54002-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx6110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08dcf0732cb4d97b85493d9f60470e48eebf87fe Author: Alexandre Belloni Date: Sun Dec 11 21:55:38 2022 +0100 MAINTAINERS: mark I3C DRIVER FOR SYNOPSYS DESIGNWARE orphan Vitor left Synopsys and the email address is now bouncing. Link: https://lore.kernel.org/r/20221211205539.19353-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 672825cd2823a0cee4687ce80fef5b702ff3caa3 Author: Jack Chen Date: Wed Dec 7 15:50:59 2022 -0500 i3c: export SETDASA method Because not all I3C drivers have the hot-join feature ready, and especially not all I3C devices support hot-join feature, exporting SETDASA method could be useful. With this function, the I3C controller could perform a DAA to I3C devices when users decide to turn these I3C devices off and on again during run-time. Tested: This change has been tested with turnning off an I3C device and turning on it again during run-time. The device driver calls SETDASA method to perform DAA to the device. And communication between I3C controller and device is set up again correctly. Signed-off-by: Jack Chen Link: https://lore.kernel.org/r/20221207205059.3848851-1-zenghuchen@google.com Signed-off-by: Alexandre Belloni drivers/i3c/device.c | 20 ++++++++++++++++++++ drivers/i3c/internals.h | 1 + drivers/i3c/master.c | 19 +++++++++++++++++++ include/linux/i3c/device.h | 2 ++ 4 files changed, 42 insertions(+) commit 01744ce9f07f0b76b0b2d30adba2a7c104f1ff2a Author: Naveen Krishna Chatradhi Date: Mon Dec 5 10:54:13 2022 +0000 i3c: Correct the macro module_i3c_i2c_driver Present definition for module_i3c_i2c_driver uses only the 1st argument i.e., struct i3c_driver. Irrespective of CONFIG_I3C being enabled/disabled, struct i2c_driver is never passed to module_driver() Passing struct i2c_driver as the 4th argument works. Signed-off-by: Akshay Gupta Signed-off-by: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20221205105413.937704-1-naveenkrishna.chatradhi@amd.com Signed-off-by: Alexandre Belloni include/linux/i3c/device.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2e830ccc21eb67a4c2490279d907e5e9199e5156 Author: Sebastian Reichel Date: Thu Oct 20 22:42:41 2022 +0200 rtc: rk808: reduce 'struct rk808' usage Reduce usage of 'struct rk808' (driver data of the parent MFD), so that only the chip variant field is still being accessed directly. This allows restructuring the MFD driver to support SPI based PMICs. Acked-by: Alexandre Belloni Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221020204251.108565-4-sebastian.reichel@collabora.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rk808.c | 47 ++++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) commit 21b8a1dd56a163825e5749b303858fb902ebf198 Author: Kees Cook Date: Fri Dec 2 10:45:30 2022 -0800 rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe() 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. msc313_rtc_probe() was passing clk_disable_unprepare() directly, which did not have matching prototypes for devm_add_action_or_reset()'s callback argument. Refactor to use devm_clk_get_enabled() instead. 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. Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/202211041527.HD8TLSE1-lkp@intel.com Suggested-by: Christophe JAILLET Cc: Daniel Palmer Cc: Romain Perier Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rtc@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Daniel Palmer Tested-by: Daniel Palmer Link: https://lore.kernel.org/r/20221202184525.gonna.423-kees@kernel.org Signed-off-by: Alexandre Belloni drivers/rtc/rtc-msc313.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit ac3a2585f018f10039b4a856dcb122da88c1c1c9 Author: Jeff Layton Date: Sun Dec 11 06:19:33 2022 -0500 nfsd: rework refcounting in filecache The filecache refcounting is a bit non-standard for something searchable by RCU, in that we maintain a sentinel reference while it's hashed. This in turn requires that we have to do things differently in the "put" depending on whether its hashed, which we believe to have led to races. There are other problems in here too. nfsd_file_close_inode_sync can end up freeing an nfsd_file while there are still outstanding references to it, and there are a number of subtle ToC/ToU races. Rework the code so that the refcount is what drives the lifecycle. When the refcount goes to zero, then unhash and rcu free the object. A task searching for a nfsd_file is allowed to bump its refcount, but only if it's not already 0. Ensure that we don't make any other changes to it until a reference is held. With this change, the LRU carries a reference. Take special care to deal with it when removing an entry from the list, and ensure that we only repurpose the nf_lru list_head when the refcount is 0 to ensure exclusive access to it. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 318 ++++++++++++++++++++++++++++------------------------ fs/nfsd/trace.h | 51 ++++----- 2 files changed, 189 insertions(+), 180 deletions(-) commit 72ee45fd46d0d3578c4e6046f66fae3218543ce3 Author: ye xingchen Date: Wed Dec 7 09:29:27 2022 +0800 ksmbd: 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 Reviewed-by: Sergey Senozhatsky Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/server.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 01f6c61bae3d658058ee6322af77acea26a5ee3a Author: Marios Makassikis Date: Tue Nov 29 12:19:33 2022 +0100 ksmbd: Fix resource leak in smb2_lock() "flock" is leaked if an error happens before smb2_lock_init(), as the lock is not added to the lock_list to be cleaned up. Signed-off-by: Marios Makassikis Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/smb2pdu.c | 4 ++++ 1 file changed, 4 insertions(+) commit bc044414fa0326a4e5c3c509c00b1fcaf621b5f4 Author: Xiu Jianfeng Date: Wed Nov 16 20:22:37 2022 +0800 ksmbd: Fix resource leak in ksmbd_session_rpc_open() When ksmbd_rpc_open() fails then it must call ksmbd_rpc_id_free() to undo the result of ksmbd_ipc_id_alloc(). Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Signed-off-by: Xiu Jianfeng Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/mgmt/user_session.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 30429388531b120902126a39cf64f877fc5c7773 Author: Gustavo A. R. Silva Date: Tue Nov 15 09:35:10 2022 -0600 ksmbd: 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 structs in fs/ksmbd/smb_common.h and one in fs/ksmbd/smb2pdu.h. Important to mention is 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/242 Link: https://github.com/KSPP/linux/issues/79 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: Sergey Senozhatsky Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/smb2pdu.c | 4 ++-- fs/ksmbd/smb2pdu.h | 2 +- fs/ksmbd/smb_common.h | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) commit 7ecbe92696bb7fe32c80b6cf64736a0d157717a9 Author: Jeff Layton Date: Fri Nov 11 08:11:53 2022 -0500 ksmbd: use F_SETLK when unlocking a file ksmbd seems to be trying to use a cmd value of 0 when unlocking a file. That activity requires a type of F_UNLCK with a cmd of F_SETLK. For local POSIX locking, it doesn't matter much since vfs_lock_file ignores @cmd, but filesystems that define their own ->lock operation expect to see it set sanely. Cc: David Howells Signed-off-by: Jeff Layton Reviewed-by: David Howells Acked-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/smb2pdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 37ba7b005a7a4454046bd8659c7a9c5330552396 Author: Namjae Jeon Date: Sat Oct 29 00:01:38 2022 +0900 ksmbd: set SMB2_SESSION_FLAG_ENCRYPT_DATA when enforcing data encryption for this share Currently, SMB2_SESSION_FLAG_ENCRYPT_DATA is always set session setup response. Since this forces data encryption from the client, there is a problem that data is always encrypted regardless of the use of the cifs seal mount option. SMB2_SESSION_FLAG_ENCRYPT_DATA should be set according to KSMBD_GLOBAL_FLAG_SMB2_ENCRYPTION flags, and in case of KSMBD_GLOBAL_FLAG_SMB2_ENCRYPTION_OFF, encryption mode is turned off for all connections. Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/ksmbd/ksmbd_netlink.h | 1 + fs/ksmbd/smb2ops.c | 10 ++++++++-- fs/ksmbd/smb2pdu.c | 8 +++++--- 3 files changed, 14 insertions(+), 5 deletions(-) commit dbc94a0fb81771a38733c0e8f2ea8c4fa6934dc1 Author: Dragos Tatulea Date: Thu Dec 8 09:52:54 2022 +0200 IB/IPoIB: Fix queue count inconsistency for PKEY child interfaces There are 2 ways to create IPoIB PKEY child interfaces: 1) Writing a PKEY to /sys/class/net//create_child. 2) Using netlink with iproute. While with sysfs the child interface has the same number of tx and rx queues as the parent, with netlink there will always be 1 tx and 1 rx queue for the child interface. That's because the get_num_tx/rx_queues() netlink ops are missing and the default value of 1 is taken for the number of queues (in rtnl_create_link()). This change adds the get_num_tx/rx_queues() ops which allows for interfaces with multiple queues to be created over netlink. This constant only represents the max number of tx and rx queues on that net device. Fixes: 9baa0b036410 ("IB/ipoib: Add rtnl_link_ops support") Signed-off-by: Dragos Tatulea Link: https://lore.kernel.org/r/f4a42c8aa43c02d5ae5559a60c3e5e0f18c82531.1670485816.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 80b6093b55e31c2c40ff082fb32523d4e852954f Author: Masahiro Yamada Date: Tue Dec 6 13:07:31 2022 +0900 kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds The use of an undefined macro in an #if directive is warned, but only in *.c files. No warning from other files such as *.S, *.lds.S. Since -Wundef is a preprocessor-related warning, it should be added to KBUILD_CPPFLAGS instead of KBUILD_CFLAGS. My previous attempt [1] uncovered several issues. I could not finish fixing them all. This commit adds -Wundef to KBUILD_CPPFLAGS for W=1 builds in order to block new breakages. (The kbuild test robot tests with W=1) We can fix the warnings one by one. After fixing all of them, we can make it default in the top Makefile, and remove -Wundef from KBUILD_CFLAGS. [1]: https://lore.kernel.org/all/20221012180118.331005-2-masahiroy@kernel.org/ Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Reviewed-by: Nick Desaulniers scripts/Makefile.extrawarn | 1 + 1 file changed, 1 insertion(+) commit efa80b028c7a9c74fd875517aa0fc9fd8d610ed0 Author: Masahiro Yamada Date: Tue Dec 6 13:07:30 2022 +0900 kbuild: move -Werror from KBUILD_CFLAGS to KBUILD_CPPFLAGS CONFIG_WERROR turns warnings into errors, which happens only for *.c files because -Werror is added to KBUILD_CFLAGS. Adding it to KBUILD_CPPFLAGS makes more sense because preprocessors understand the -Werror option. For example, you can put a #warning directive in any preprocessed code. warning: #warning "this is a warning message" [-Wcpp] If -Werror is added, it is promoted to an error. error: #warning "this is a warning message" [-Werror=cpp] This commit moves -Werror to KBUILD_CPPFLAGS so it works in the same way for *.c, *.S, *.lds.S or whatever needs preprocessing. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e42f9c2e6aad583986e91979bf2fce47aaced1c2 Author: Jason Gunthorpe Date: Fri Dec 9 10:21:56 2022 -0400 RDMA: Add missed netdev_put() for the netdevice_tracker The netdev core will detect if any untracked puts are done on tracked pointers and throw refcount warnings: refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 1 PID: 33 at lib/refcount.c:31 refcount_warn_saturate+0x1d7/0x1f0 lib/refcount.c:31 Modules linked in: CPU: 1 PID: 33 Comm: kworker/u4:2 Not tainted 6.1.0-rc8-next-20221207-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: ib-unreg-wq ib_unregister_work RIP: 0010:refcount_warn_saturate+0x1d7/0x1f0 lib/refcount.c:31 Code: 05 5a 60 51 0a 01 e8 35 0a b5 05 0f 0b e9 d3 fe ff ff e8 6c 9b 75 fd 48 c7 c7 c0 6d a6 8a c6 05 37 60 51 0a 01 e8 16 0a b5 05 <0f> 0b e9 b4 fe +ff ff 48 89 ef e8 5a b5 c3 fd e9 5c fe ff ff 0f 1f RSP: 0018:ffffc90000aa7b30 EFLAGS: 00010082 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff8880172f9d40 RSI: ffffffff8166b1dc RDI: fffff52000154f58 RBP: ffff88807906c600 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000001 R11: 0000000000000000 R12: 1ffff92000154f6b R13: 0000000000000000 R14: ffff88807906c600 R15: ffff888046894000 FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffe350a8ff8 CR3: 000000007a9e7000 CR4: 00000000003526e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __refcount_dec include/linux/refcount.h:344 [inline] refcount_dec include/linux/refcount.h:359 [inline] ref_tracker_free+0x539/0x6b0 lib/ref_tracker.c:118 netdev_tracker_free include/linux/netdevice.h:4039 [inline] netdev_put include/linux/netdevice.h:4056 [inline] dev_put include/linux/netdevice.h:4082 [inline] free_netdevs+0x1f8/0x470 drivers/infiniband/core/device.c:2204 __ib_unregister_device+0xa0/0x1a0 drivers/infiniband/core/device.c:1478 ib_unregister_work+0x19/0x30 drivers/infiniband/core/device.c:1586 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 So change the missed dev_put for pdata->netdev to also follow the tracker. Fixes: 09f530f0c6d6 ("RDMA: Add netdevice_tracker to ib_device_set_netdev()") Reported-by: syzbot+3fd8326d9a0812d19218@syzkaller.appspotmail.com Reported-by: syzbot+a1ed8ffe3121380cd5dd@syzkaller.appspotmail.com Reported-by: syzbot+8d0a099c8a6d1e4e601c@syzkaller.appspotmail.com Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v1-e99919867b8d+1e2-netdev_tracker2_jgg@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 800b55b4dc62c4348fbc1f7570a8ac8be3f0eb66 Author: Neil Armstrong Date: Fri Nov 18 15:33:32 2022 +0100 dt-bindings: rtc: convert rtc-meson.txt to dt-schema Convert the Amlogic Meson6 RTC bindings to dt-schema. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221117-b4-amlogic-bindings-convert-v1-6-3f025599b968@linaro.org Signed-off-by: Alexandre Belloni .../bindings/rtc/amlogic,meson6-rtc.yaml | 62 ++++++++++++++++++++++ .../devicetree/bindings/rtc/rtc-meson.txt | 35 ------------ 2 files changed, 62 insertions(+), 35 deletions(-) commit 144361c1949f227df9244302da02c258a363b674 Author: Julian Anastasov Date: Tue Nov 22 18:46:04 2022 +0200 ipvs: run_estimation should control the kthread tasks Change the run_estimation flag to start/stop the kthread tasks. Signed-off-by: Julian Anastasov Cc: yunhong-cgl jiang Cc: "dust.li" Reviewed-by: Jiri Wiesner Signed-off-by: Pablo Neira Ayuso Documentation/networking/ipvs-sysctl.rst | 4 ++-- include/net/ip_vs.h | 6 ++++-- net/netfilter/ipvs/ip_vs_ctl.c | 29 ++++++++++++++++++++++++++++- net/netfilter/ipvs/ip_vs_est.c | 2 +- 4 files changed, 35 insertions(+), 6 deletions(-) commit f0be83d5421718ead31707b6ece34cf77d411c00 Author: Julian Anastasov Date: Tue Nov 22 18:46:03 2022 +0200 ipvs: add est_cpulist and est_nice sysctl vars Allow the kthreads for stats to be configured for specific cpulist (isolation) and niceness (scheduling priority). Signed-off-by: Julian Anastasov Cc: yunhong-cgl jiang Cc: "dust.li" Reviewed-by: Jiri Wiesner Signed-off-by: Pablo Neira Ayuso Documentation/networking/ipvs-sysctl.rst | 20 +++++ include/net/ip_vs.h | 58 +++++++++++++ net/netfilter/ipvs/ip_vs_ctl.c | 143 ++++++++++++++++++++++++++++++- net/netfilter/ipvs/ip_vs_est.c | 12 ++- 4 files changed, 229 insertions(+), 4 deletions(-) commit 705dd34440812735ece298eb5bc153fde9544d42 Author: Julian Anastasov Date: Tue Nov 22 18:46:02 2022 +0200 ipvs: use kthreads for stats estimation Estimating all entries in single list in timer context by single CPU causes large latency with multiple IPVS rules as reported in [1], [2], [3]. Spread the estimator structures in multiple chains and use kthread(s) for the estimation. The chains are processed in multiple (50) timer ticks to ensure the 2-second interval between estimations with some accuracy. Every chain is processed under RCU lock. Every kthread works over its own data structure and all such contexts are attached to array. The contexts can be preserved while the kthread tasks are stopped or restarted. When estimators are removed, unused kthread contexts are released and the slots in array are left empty. First kthread determines parameters to use, eg. maximum number of estimators to process per kthread based on chain's length (chain_max), allowing sub-100us cond_resched rate and estimation taking up to 1/8 of the CPU capacity to avoid any problems if chain_max is not correctly calculated. chain_max is calculated taking into account factors such as CPU speed and memory/cache speed where the cache_factor (4) is selected from real tests with current generation of CPU/NUMA configurations to correct the difference in CPU usage between cached (during calc phase) and non-cached (working) state of the estimated per-cpu data. First kthread also plays the role of distributor of added estimators to all kthreads, keeping low the time to add estimators. The optimization is based on the fact that newly added estimator should be estimated after 2 seconds, so we have the time to offload the adding to chain from controlling process to kthread 0. The allocated kthread context may grow from 1 to 50 allocated structures for timer ticks which saves memory for setups with small number of estimators. We also add delayed work est_reload_work that will make sure the kthread tasks are properly started/stopped. ip_vs_start_estimator() is changed to report errors which allows to safely store the estimators in allocated structures. Many thanks to Jiri Wiesner for his valuable comments and for spending a lot of time reviewing and testing the changes on different platforms with 48-256 CPUs and 1-8 NUMA nodes under different cpufreq governors. [1] Report from Yunhong Jiang: https://lore.kernel.org/netdev/D25792C1-1B89-45DE-9F10-EC350DC04ADC@gmail.com/ [2] https://marc.info/?l=linux-virtual-server&m=159679809118027&w=2 [3] Report from Dust: https://archive.linuxvirtualserver.org/html/lvs-devel/2020-12/msg00000.html Signed-off-by: Julian Anastasov Cc: yunhong-cgl jiang Cc: "dust.li" Reviewed-by: Jiri Wiesner Tested-by: Jiri Wiesner Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 88 ++++- net/netfilter/ipvs/ip_vs_ctl.c | 126 ++++-- net/netfilter/ipvs/ip_vs_est.c | 876 +++++++++++++++++++++++++++++++++++++---- 3 files changed, 990 insertions(+), 100 deletions(-) commit 1dbd8d9a82e3f26b9d063292d47ece673f48fce2 Author: Julian Anastasov Date: Tue Nov 22 18:46:01 2022 +0200 ipvs: use u64_stats_t for the per-cpu counters Use the provided u64_stats_t type to avoid load/store tearing. Fixes: 316580b69d0a ("u64_stats: provide u64_stats_t type") Signed-off-by: Julian Anastasov Cc: yunhong-cgl jiang Cc: "dust.li" Reviewed-by: Jiri Wiesner Tested-by: Jiri Wiesner Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 10 +++++----- net/netfilter/ipvs/ip_vs_core.c | 30 +++++++++++++++--------------- net/netfilter/ipvs/ip_vs_ctl.c | 10 +++++----- net/netfilter/ipvs/ip_vs_est.c | 20 ++++++++++---------- 4 files changed, 35 insertions(+), 35 deletions(-) commit de39afb3d811ba2c028de8662adafedb4899327b Author: Julian Anastasov Date: Tue Nov 22 18:46:00 2022 +0200 ipvs: use common functions for stats allocation Move alloc_percpu/free_percpu logic in new functions Signed-off-by: Julian Anastasov Cc: yunhong-cgl jiang Cc: "dust.li" Reviewed-by: Jiri Wiesner Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 5 +++ net/netfilter/ipvs/ip_vs_ctl.c | 96 ++++++++++++++++++++++++------------------ 2 files changed, 60 insertions(+), 41 deletions(-) commit 5df7d714d8cbcce7642936cc0f6532f0c4c3d197 Author: Julian Anastasov Date: Tue Nov 22 18:45:59 2022 +0200 ipvs: add rcu protection to stats In preparation to using RCU locking for the list with estimators, make sure the struct ip_vs_stats are released after RCU grace period by using RCU callbacks. This affects ipvs->tot_stats where we can not use RCU callbacks for ipvs, so we use allocated struct ip_vs_stats_rcu. For services and dests we force RCU callbacks for all cases. Signed-off-by: Julian Anastasov Cc: yunhong-cgl jiang Cc: "dust.li" Reviewed-by: Jiri Wiesner Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 8 +++++- net/netfilter/ipvs/ip_vs_core.c | 10 +++++-- net/netfilter/ipvs/ip_vs_ctl.c | 64 +++++++++++++++++++++++++++-------------- 3 files changed, 57 insertions(+), 25 deletions(-) commit 90cd5c88830140c9fade92a8027e0fb2c6e4cc49 Author: Gaosheng Cui Date: Wed Nov 23 09:59:53 2022 +0800 rtc: pic32: Move devm_rtc_allocate_device earlier in pic32_rtc_probe() The pic32_rtc_enable(pdata, 0) and clk_disable_unprepare(pdata->clk) should be called in the error handling of devm_rtc_allocate_device(), so we should move devm_rtc_allocate_device earlier in pic32_rtc_probe() to fix it. Fixes: 6515e23b9fde ("rtc: pic32: convert to devm_rtc_allocate_device") Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20221123015953.1998521-1-cuigaosheng1@huawei.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pic32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5fb733d7bd6949e90028efdce8bd528c6ab7cf1e Author: Gaosheng Cui Date: Wed Nov 23 09:48:05 2022 +0800 rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe() The clk_disable_unprepare() should be called in the error handling of clk_get_rate(), fix it. Fixes: b5b2bdfc2893 ("rtc: st: Add new driver for ST's LPC RTC") Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20221123014805.1993052-1-cuigaosheng1@huawei.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-st-lpc.c | 1 + 1 file changed, 1 insertion(+) commit 99523094de48df65477cbbb9d8027f4bc4701794 Merge: f3212ad5b7e9 efd6286ff74a Author: Alexei Starovoitov Date: Sat Dec 10 13:20:53 2022 -0800 Merge branch 'stricter register ID checking in regsafe()' Eduard Zingerman says: ==================== This patch-set consists of a series of bug fixes for register ID tracking in verifier.c:states_equal()/regsafe() functions: - for registers of type PTR_TO_MAP_{KEY,VALUE}, PTR_TO_PACKET[_META] the regsafe() should call check_ids() even if registers are byte-to-byte equal; - states_equal() must maintain idmap that covers all function frames in the state because functions like mark_ptr_or_null_regs() operate on all registers in the state; - regsafe() must compare spin lock ids for PTR_TO_MAP_VALUE registers. The last point covers issue reported by Kumar Kartikeya Dwivedi in [1], I borrowed the test commit from there. Note, that there is also an issue with register id tracking for scalars described here [2], it would be addressed separately. [1] https://lore.kernel.org/bpf/20221111202719.982118-1-memxor@gmail.com/ [2] https://lore.kernel.org/bpf/20221128163442.280187-2-eddyz87@gmail.com/ Eduard Zingerman (6): bpf: regsafe() must not skip check_ids() selftests/bpf: test cases for regsafe() bug skipping check_id() bpf: states_equal() must build idmap for all function frames selftests/bpf: verify states_equal() maintains idmap across all frames bpf: use check_ids() for active_lock comparison selftests/bpf: test case for relaxed prunning of active_lock.id ==================== Signed-off-by: Alexei Starovoitov commit efd6286ff74a2fa2b45ed070d344cc0822b8ea6e Author: Eduard Zingerman Date: Fri Dec 9 15:57:33 2022 +0200 selftests/bpf: test case for relaxed prunning of active_lock.id Check that verifier.c:states_equal() uses check_ids() to match consistent active_lock/map_value configurations. This allows to prune states with active spin locks even if numerical values of active_lock ids do not match across compared states. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20221209135733.28851-8-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/verifier/spin_lock.c | 75 ++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 2026f2062df860e5d282ffd4962ea5d5ed53dc51 Author: Kumar Kartikeya Dwivedi Date: Fri Dec 9 15:57:32 2022 +0200 selftests/bpf: Add pruning test case for bpf_spin_lock Test that when reg->id is not same for the same register of type PTR_TO_MAP_VALUE between current and old explored state, we currently return false from regsafe and continue exploring. Without the fix in prior commit, the test case fails. Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20221209135733.28851-7-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/verifier/spin_lock.c | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 4ea2bb158bec2fe171e7e07c033dcf208d86e274 Author: Eduard Zingerman Date: Fri Dec 9 15:57:31 2022 +0200 bpf: use check_ids() for active_lock comparison An update for verifier.c:states_equal()/regsafe() to use check_ids() for active spin lock comparisons. This fixes the issue reported by Kumar Kartikeya Dwivedi in [1] using technique suggested by Edward Cree. W/o this commit the verifier might be tricked to accept the following program working with a map containing spin locks: 0: r9 = map_lookup_elem(...) ; Returns PTR_TO_MAP_VALUE_OR_NULL id=1. 1: r8 = map_lookup_elem(...) ; Returns PTR_TO_MAP_VALUE_OR_NULL id=2. 2: if r9 == 0 goto exit ; r9 -> PTR_TO_MAP_VALUE. 3: if r8 == 0 goto exit ; r8 -> PTR_TO_MAP_VALUE. 4: r7 = ktime_get_ns() ; Unbound SCALAR_VALUE. 5: r6 = ktime_get_ns() ; Unbound SCALAR_VALUE. 6: bpf_spin_lock(r8) ; active_lock.id == 2. 7: if r6 > r7 goto +1 ; No new information about the state ; is derived from this check, thus ; produced verifier states differ only ; in 'insn_idx'. 8: r9 = r8 ; Optionally make r9.id == r8.id. --- checkpoint --- ; Assume is_state_visisted() creates a ; checkpoint here. 9: bpf_spin_unlock(r9) ; (a,b) active_lock.id == 2. ; (a) r9.id == 2, (b) r9.id == 1. 10: exit(0) Consider two verification paths: (a) 0-10 (b) 0-7,9-10 The path (a) is verified first. If checkpoint is created at (8) the (b) would assume that (8) is safe because regsafe() does not compare register ids for registers of type PTR_TO_MAP_VALUE. [1] https://lore.kernel.org/bpf/20221111202719.982118-1-memxor@gmail.com/ Reported-by: Kumar Kartikeya Dwivedi Suggested-by: Edward Cree Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20221209135733.28851-6-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 7d05794330877986f605c1618534d7478030f5b8 Author: Eduard Zingerman Date: Fri Dec 9 15:57:30 2022 +0200 selftests/bpf: verify states_equal() maintains idmap across all frames A test case that would erroneously pass verification if verifier.c:states_equal() maintains separate register ID mappings for call frames. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20221209135733.28851-5-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/verifier/calls.c | 82 ++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 5dd9cdbc9dec3e99b19e483767e247d15ca8cc0d Author: Eduard Zingerman Date: Fri Dec 9 15:57:29 2022 +0200 bpf: states_equal() must build idmap for all function frames verifier.c:states_equal() must maintain register ID mapping across all function frames. Otherwise the following example might be erroneously marked as safe: main: fp[-24] = map_lookup_elem(...) ; frame[0].fp[-24].id == 1 fp[-32] = map_lookup_elem(...) ; frame[0].fp[-32].id == 2 r1 = &fp[-24] r2 = &fp[-32] call foo() r0 = 0 exit foo: 0: r9 = r1 1: r8 = r2 2: r7 = ktime_get_ns() 3: r6 = ktime_get_ns() 4: if (r6 > r7) goto skip_assign 5: r9 = r8 skip_assign: ; <--- checkpoint 6: r9 = *r9 ; (a) frame[1].r9.id == 2 ; (b) frame[1].r9.id == 1 7: if r9 == 0 goto exit: ; mark_ptr_or_null_regs() transfers != 0 info ; for all regs sharing ID: ; (a) r9 != 0 => &frame[0].fp[-32] != 0 ; (b) r9 != 0 => &frame[0].fp[-24] != 0 8: r8 = *r8 ; (a) r8 == &frame[0].fp[-32] ; (b) r8 == &frame[0].fp[-32] 9: r0 = *r8 ; (a) safe ; (b) unsafe exit: 10: exit While processing call to foo() verifier considers the following execution paths: (a) 0-10 (b) 0-4,6-10 (There is also path 0-7,10 but it is not interesting for the issue at hand. (a) is verified first.) Suppose that checkpoint is created at (6) when path (a) is verified, next path (b) is verified and (6) is reached. If states_equal() maintains separate 'idmap' for each frame the mapping at (6) for frame[1] would be empty and regsafe(r9)::check_ids() would add a pair 2->1 and return true, which is an error. If states_equal() maintains single 'idmap' for all frames the mapping at (6) would be { 1->1, 2->2 } and regsafe(r9)::check_ids() would return false when trying to add a pair 2->1. This issue was suggested in the following discussion: https://lore.kernel.org/bpf/CAEf4BzbFB5g4oUfyxk9rHy-PJSLQ3h8q9mV=rVoXfr_JVm8+1Q@mail.gmail.com/ Suggested-by: Andrii Nakryiko Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20221209135733.28851-4-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf_verifier.h | 4 ++-- kernel/bpf/verifier.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit cb578c1c9cf60275f258b5af7929c2a54a188f66 Author: Eduard Zingerman Date: Fri Dec 9 15:57:28 2022 +0200 selftests/bpf: test cases for regsafe() bug skipping check_id() Under certain conditions it was possible for verifier.c:regsafe() to skip check_id() call. This commit adds negative test cases previously errorneously accepted as safe. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20221209135733.28851-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/verifier/direct_packet_access.c | 54 ++++++++++++++++++++++ .../testing/selftests/bpf/verifier/value_or_null.c | 49 ++++++++++++++++++++ 2 files changed, 103 insertions(+) commit 7c884339bbff80250bfc11d56b5cf48640e6ebdb Author: Eduard Zingerman Date: Fri Dec 9 15:57:27 2022 +0200 bpf: regsafe() must not skip check_ids() The verifier.c:regsafe() has the following shortcut: equal = memcmp(rold, rcur, offsetof(struct bpf_reg_state, parent)) == 0; ... if (equal) return true; Which is executed regardless old register type. This is incorrect for register types that might have an ID checked by check_ids(), namely: - PTR_TO_MAP_KEY - PTR_TO_MAP_VALUE - PTR_TO_PACKET_META - PTR_TO_PACKET The following pattern could be used to exploit this: 0: r9 = map_lookup_elem(...) ; Returns PTR_TO_MAP_VALUE_OR_NULL id=1. 1: r8 = map_lookup_elem(...) ; Returns PTR_TO_MAP_VALUE_OR_NULL id=2. 2: r7 = ktime_get_ns() ; Unbound SCALAR_VALUE. 3: r6 = ktime_get_ns() ; Unbound SCALAR_VALUE. 4: if r6 > r7 goto +1 ; No new information about the state ; is derived from this check, thus ; produced verifier states differ only ; in 'insn_idx'. 5: r9 = r8 ; Optionally make r9.id == r8.id. --- checkpoint --- ; Assume is_state_visisted() creates a ; checkpoint here. 6: if r9 == 0 goto ; Nullness info is propagated to all ; registers with matching ID. 7: r1 = *(u64 *) r8 ; Not always safe. Verifier first visits path 1-7 where r8 is verified to be not null at (6). Later the jump from 4 to 6 is examined. The checkpoint for (6) looks as follows: R8_rD=map_value_or_null(id=2,off=0,ks=4,vs=8,imm=0) R9_rwD=map_value_or_null(id=2,off=0,ks=4,vs=8,imm=0) R10=fp0 The current state is: R0=... R6=... R7=... fp-8=... R8=map_value_or_null(id=2,off=0,ks=4,vs=8,imm=0) R9=map_value_or_null(id=1,off=0,ks=4,vs=8,imm=0) R10=fp0 Note that R8 states are byte-to-byte identical, so regsafe() would exit early and skip call to check_ids(), thus ID mapping 2->2 will not be added to 'idmap'. Next, states for R9 are compared: these are not identical and check_ids() is executed, but 'idmap' is empty, so check_ids() adds mapping 2->1 to 'idmap' and returns success. This commit pushes the 'equal' down to register types that don't need check_ids(). Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20221209135733.28851-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) commit e0c49bd2b4d3cd1751491eb2d940bce968ac65e9 Author: Chen Zhongjin Date: Fri Dec 9 18:04:48 2022 +0800 fs: sysv: Fix sysv_nblocks() returns wrong value sysv_nblocks() returns 'blocks' rather than 'res', which only counting the number of triple-indirect blocks and causing sysv_getattr() gets a wrong result. [AV: this is actually a sysv counterpart of minixfs fix - 0fcd426de9d0 "[PATCH] minix block usage counting fix" in historical tree; mea culpa, should've thought to check fs/sysv back then...] Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Chen Zhongjin Signed-off-by: Al Viro fs/sysv/itree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d358dfe60b7724ad0acb8cf8375a608b983e2b59 Author: Daniel Bristot de Oliveira Date: Fri Dec 9 23:05:54 2022 +0100 Documentation/osnoise: Add osnoise/options documentation Add the documentation about the osnoise/options file, the options, and some additional explanation about the OSNOISE_WORKLOAD option. Link: https://lkml.kernel.org/r/fde5567a4bae364f67fd1e9a644d1d62862618a6.1670623111.git.bristot@kernel.org Cc: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Clark Williams Cc: Masami Hiramatsu Cc: Jonathan Corbet Cc: Bagas Sanjaya Signed-off-by: Daniel Bristot de Oliveira Reviewed-by: Bagas Sanjaya Signed-off-by: Steven Rostedt (Google) Documentation/trace/osnoise-tracer.rst | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit b5dce2002567a9b1a83ef3e3a8678d8c32be2a78 Author: Daniel Bristot de Oliveira Date: Fri Dec 9 23:05:53 2022 +0100 tracing/osnoise: Add preempt and/or irq disabled options The osnoise workload runs with preemption and IRQs enabled in such a way as to allow all sorts of noise to disturb osnoise's execution. hwlat tracer has a similar workload but works with irq disabled, allowing only NMIs and the hardware to generate noise. While thinking about adding an options file to hwlat tracer to allow the system to panic, and other features I was thinking to add, like having a tracepoint at each noise detection, it came to my mind that is easier to make osnoise and also do hardware latency detection than making hwlat "feature compatible" with osnoise. Other points are: - osnoise already has an independent cpu file. - osnoise has a more intuitive interface, e.g., runtime/period vs. window/width (and people often need help remembering what it is). - osnoise: tracepoints - osnoise stop options - osnoise options file itself Moreover, the user-space side (in rtla) is simplified by reusing the existing osnoise code. Finally, people have been asking me about using osnoise for hw latency detection, and I have to explain that it was sufficient but not necessary. These options make it sufficient and necessary. Adding a Suggested-by Clark, as he often asked me about this possibility. Link: https://lkml.kernel.org/r/d9c6c19135497054986900f94c8e47410b15316a.1670623111.git.bristot@kernel.org Cc: Suggested-by: Clark Williams Cc: Juri Lelli Cc: Bagas Sanjaya Cc: Daniel Bristot de Oliveira Cc: Masami Hiramatsu Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_osnoise.c | 48 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) commit 1603dda47714cebe8a29b2154407da7a929d13f4 Author: Daniel Bristot de Oliveira Date: Fri Dec 9 23:05:52 2022 +0100 tracing/osnoise: Add PANIC_ON_STOP option Often the latency observed in a CPU is not caused by the work being done in the CPU itself, but by work done on another CPU that causes the hardware to stall all CPUs. In this case, it is interesting to know what is happening on ALL CPUs, and the best way to do this is via crash dump analysis. Add the PANIC_ON_STOP option to osnoise/timerlat tracers. The default behavior is having this option off. When enabled by the user, the system will panic after hitting a stop tracing condition. This option was motivated by a real scenario that Juri Lelli and I were debugging. Link: https://lkml.kernel.org/r/249ce4287c6725543e6db845a6e0df621dc67db5.1670623111.git.bristot@kernel.org Cc: Juri Lelli Cc: Clark Williams Cc: Bagas Sanjaya Cc: Daniel Bristot de Oliveira Cc: Masami Hiramatsu Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_osnoise.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0e162c6f1c8f7f502b3978f5a37ed6fa2e4d21f9 Author: Bagas Sanjaya Date: Fri Nov 25 10:43:00 2022 +0700 Documentation/osnoise: Escape underscore of NO_ prefix kernel test robot reported unknown target name warning: Documentation/trace/osnoise-tracer.rst:112: WARNING: Unknown target name: "no". The warning causes NO_ prefix to be rendered as link text instead, which points to non-existent link target. Escape the prefix underscore to fix the warning. Link: https://lkml.kernel.org/r/20221125034300.24168-1-bagasdotme@gmail.com Cc: Masami Hiramatsu Cc: Jonathan Corbet Cc: Ammar Faizi Cc: GNU/Weeb Mailing List Link: https://lore.kernel.org/linux-doc/202211240447.HxRNftE5-lkp@intel.com/ Fixes: 67543cd6b8eee5 ("Documentation/osnoise: Add osnoise/options documentation") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) Documentation/trace/osnoise-tracer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfd5a5e82d22da43afa0e2bb9fb72339aa79c6cc Author: David Howells Date: Mon Dec 5 10:21:52 2022 +0000 tracing: Fix some checker warnings Fix some checker warnings in the trace code by adding __printf attributes to a number of trace functions and their declarations. Changes: ======== ver #2) - Dropped the fix for the unconditional tracing_max_lat_fops decl[1]. Link: https://lore.kernel.org/r/20221205180617.9b9d3971cbe06ee536603523@kernel.org/ [1] Link: https://lore.kernel.org/r/166992525941.1716618.13740663757583361463.stgit@warthog.procyon.org.uk/ # v1 Link: https://lkml.kernel.org/r/167023571258.382307.15314866482834835192.stgit@warthog.procyon.org.uk Signed-off-by: David Howells Signed-off-by: Steven Rostedt (Google) include/linux/trace_events.h | 3 ++- include/linux/trace_seq.h | 3 ++- kernel/trace/trace.h | 2 +- kernel/trace/trace_output.c | 5 +++-- 4 files changed, 8 insertions(+), 5 deletions(-) commit ec370890f92ba8ad5476a34068655b06ba48def7 Author: Daniel Bristot de Oliveira Date: Mon Dec 5 09:27:38 2022 +0100 tracing/osnoise: Make osnoise_options static Make osnoise_options static, as reported by the kernel test robot. Link: https://lkml.kernel.org/r/63255826485400d7a2270e9c5e66111079671e7a.1670228712.git.bristot@kernel.org Reported-by: kernel test robot Cc: Daniel Bristot de Oliveira Cc: Steven Rostedt Cc: Masami Hiramatsu Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_osnoise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98629dadcd020cba690ce0c49a564a1166444646 Author: Ross Zwisler Date: Thu Dec 8 17:33:10 2022 -0700 tracing: remove unnecessary trace_trigger ifdef The trace_trigger command line option introduced by commit a01fdc897fa5 ("tracing: Add trace_trigger kernel command line option") doesn't need to depend on the CONFIG_HIST_TRIGGERS kernel config option. This code doesn't depend on the histogram code, and the run-time selection of triggers is usable without CONFIG_HIST_TRIGGERS. Link: https://lore.kernel.org/linux-trace-kernel/20221209003310.1737039-1-zwisler@google.com Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Mathieu Desnoyers Cc: Joel Fernandes Cc: Tom Zanussi Fixes: a01fdc897fa5 ("tracing: Add trace_trigger kernel command line option") Signed-off-by: Ross Zwisler Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events.c | 6 ------ 1 file changed, 6 deletions(-) commit 88ca6a71dcab4a4ba6e6e2ff66415a5c4f86e874 Author: Steven Rostedt Date: Fri Dec 9 10:11:51 2022 -0500 ring-buffer: Handle resize in early boot up With the new command line option that allows trace event triggers to be added at boot, the "snapshot" trigger will allocate the snapshot buffer very early, when interrupts can not be enabled. Allocating the ring buffer is not the problem, but it also resizes it, which is, as the resize code does synchronization that can not be preformed at early boot. To handle this, first change the raw_spin_lock_irq() in rb_insert_pages() to raw_spin_lock_irqsave(), such that the unlocking of that spin lock will not enable interrupts. Next, where it calls schedule_work_on(), disable migration and check if the CPU to update is the current CPU, and if so, perform the work directly, otherwise re-enable migration and call the schedule_work_on() to the CPU that is being updated. The rb_insert_pages() just needs to be run on the CPU that it is updating, and does not need preemption nor interrupts disabled when calling it. Link: https://lore.kernel.org/lkml/Y5J%2FCajlNh1gexvo@google.com/ Link: https://lore.kernel.org/linux-trace-kernel/20221209101151.1fec1167@gandalf.local.home Cc: Masami Hiramatsu Cc: Andrew Morton Fixes: a01fdc897fa5 ("tracing: Add trace_trigger kernel command line option") Reported-by: Ross Zwisler Signed-off-by: Steven Rostedt Tested-by: Ross Zwisler Signed-off-by: Steven Rostedt (Google) kernel/trace/ring_buffer.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit 608c6ed3337850c767ab0dd6c583477922233e29 Author: Zheng Yejian Date: Wed Dec 7 21:53:26 2022 +0800 tracing/hist: Fix issue of losting command info in error_log When input some constructed invalid 'trigger' command, command info in 'error_log' are lost [1]. The root cause is that there is a path that event_hist_trigger_parse() is recursely called once and 'last_cmd' which save origin command is cleared, then later calling of hist_err() will no longer record origin command info: event_hist_trigger_parse() { last_cmd_set() // <1> 'last_cmd' save origin command here at first create_actions() { onmatch_create() { action_create() { trace_action_create() { trace_action_create_field_var() { create_field_var_hist() { event_hist_trigger_parse() { // <2> recursely called once hist_err_clear() // <3> 'last_cmd' is cleared here } hist_err() // <4> No longer find origin command!!! Since 'glob' is empty string while running into the recurse call, we can trickly check it and bypass the call of hist_err_clear() to solve it. [1] # cd /sys/kernel/tracing # echo "my_synth_event int v1; int v2; int v3;" >> synthetic_events # echo 'hist:keys=pid' >> events/sched/sched_waking/trigger # echo "hist:keys=next_pid:onmatch(sched.sched_waking).my_synth_event(\ pid,pid1)" >> events/sched/sched_switch/trigger # cat error_log [ 8.405018] hist:sched:sched_switch: error: Couldn't find synthetic event Command: hist:keys=next_pid:onmatch(sched.sched_waking).my_synth_event(pid,pid1) ^ [ 8.816902] hist:sched:sched_switch: error: Couldn't find field Command: hist:keys=next_pid:onmatch(sched.sched_waking).my_synth_event(pid,pid1) ^ [ 8.816902] hist:sched:sched_switch: error: Couldn't parse field variable Command: hist:keys=next_pid:onmatch(sched.sched_waking).my_synth_event(pid,pid1) ^ [ 8.999880] : error: Couldn't find field Command: ^ [ 8.999880] : error: Couldn't parse field variable Command: ^ [ 8.999880] : error: Couldn't find field Command: ^ [ 8.999880] : error: Couldn't create histogram for field Command: ^ Link: https://lore.kernel.org/linux-trace-kernel/20221207135326.3483216-1-zhengyejian1@huawei.com Cc: Cc: Fixes: f404da6e1d46 ("tracing: Add 'last error' error facility for hist triggers") Signed-off-by: Zheng Yejian Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff4837f7fe59ff018eca4705a70eca5e0b486b97 Author: Zheng Yejian Date: Wed Dec 7 17:15:57 2022 +0800 tracing: Fix issue of missing one synthetic field The maximum number of synthetic fields supported is defined as SYNTH_FIELDS_MAX which value currently is 64, but it actually fails when try to generate a synthetic event with 64 fields by executing like: # echo "my_synth_event int v1; int v2; int v3; int v4; int v5; int v6;\ int v7; int v8; int v9; int v10; int v11; int v12; int v13; int v14;\ int v15; int v16; int v17; int v18; int v19; int v20; int v21; int v22;\ int v23; int v24; int v25; int v26; int v27; int v28; int v29; int v30;\ int v31; int v32; int v33; int v34; int v35; int v36; int v37; int v38;\ int v39; int v40; int v41; int v42; int v43; int v44; int v45; int v46;\ int v47; int v48; int v49; int v50; int v51; int v52; int v53; int v54;\ int v55; int v56; int v57; int v58; int v59; int v60; int v61; int v62;\ int v63; int v64" >> /sys/kernel/tracing/synthetic_events Correct the field counting to fix it. Link: https://lore.kernel.org/linux-trace-kernel/20221207091557.3137904-1-zhengyejian1@huawei.com Cc: Cc: Cc: stable@vger.kernel.org Fixes: c9e759b1e845 ("tracing: Rework synthetic event command parsing") Signed-off-by: Zheng Yejian Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_synth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82470f7d9044842618c847a7166de2b7458157a7 Author: Zheng Yejian Date: Wed Dec 7 11:51:43 2022 +0800 tracing/hist: Fix out-of-bound write on 'action_data.var_ref_idx' When generate a synthetic event with many params and then create a trace action for it [1], kernel panic happened [2]. It is because that in trace_action_create() 'data->n_params' is up to SYNTH_FIELDS_MAX (current value is 64), and array 'data->var_ref_idx' keeps indices into array 'hist_data->var_refs' for each synthetic event param, but the length of 'data->var_ref_idx' is TRACING_MAP_VARS_MAX (current value is 16), so out-of-bound write happened when 'data->n_params' more than 16. In this case, 'data->match_data.event' is overwritten and eventually cause the panic. To solve the issue, adjust the length of 'data->var_ref_idx' to be SYNTH_FIELDS_MAX and add sanity checks to avoid out-of-bound write. [1] # cd /sys/kernel/tracing/ # echo "my_synth_event int v1; int v2; int v3; int v4; int v5; int v6;\ int v7; int v8; int v9; int v10; int v11; int v12; int v13; int v14;\ int v15; int v16; int v17; int v18; int v19; int v20; int v21; int v22;\ int v23; int v24; int v25; int v26; int v27; int v28; int v29; int v30;\ int v31; int v32; int v33; int v34; int v35; int v36; int v37; int v38;\ int v39; int v40; int v41; int v42; int v43; int v44; int v45; int v46;\ int v47; int v48; int v49; int v50; int v51; int v52; int v53; int v54;\ int v55; int v56; int v57; int v58; int v59; int v60; int v61; int v62;\ int v63" >> synthetic_events # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="bash"' >> \ events/sched/sched_waking/trigger # echo "hist:keys=next_pid:onmatch(sched.sched_waking).my_synth_event(\ pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,\ pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,\ pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,pid,\ pid,pid,pid,pid,pid,pid,pid,pid,pid)" >> events/sched/sched_switch/trigger [2] BUG: unable to handle page fault for address: ffff91c900000000 PGD 61001067 P4D 61001067 PUD 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 2 PID: 322 Comm: bash Tainted: G W 6.1.0-rc8+ #229 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014 RIP: 0010:strcmp+0xc/0x30 Code: 75 f7 31 d2 44 0f b6 04 16 44 88 04 11 48 83 c2 01 45 84 c0 75 ee c3 cc cc cc cc 0f 1f 00 31 c0 eb 08 48 83 c0 01 84 d2 74 13 <0f> b6 14 07 3a 14 06 74 ef 19 c0 83 c8 01 c3 cc cc cc cc 31 c3 RSP: 0018:ffff9b3b00f53c48 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffffffffba958a68 RCX: 0000000000000000 RDX: 0000000000000010 RSI: ffff91c943d33a90 RDI: ffff91c900000000 RBP: ffff91c900000000 R08: 00000018d604b529 R09: 0000000000000000 R10: ffff91c9483eddb1 R11: ffff91ca483eddab R12: ffff91c946171580 R13: ffff91c9479f0538 R14: ffff91c9457c2848 R15: ffff91c9479f0538 FS: 00007f1d1cfbe740(0000) GS:ffff91c9bdc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff91c900000000 CR3: 0000000006316000 CR4: 00000000000006e0 Call Trace: __find_event_file+0x55/0x90 action_create+0x76c/0x1060 event_hist_trigger_parse+0x146d/0x2060 ? event_trigger_write+0x31/0xd0 trigger_process_regex+0xbb/0x110 event_trigger_write+0x6b/0xd0 vfs_write+0xc8/0x3e0 ? alloc_fd+0xc0/0x160 ? preempt_count_add+0x4d/0xa0 ? preempt_count_add+0x70/0xa0 ksys_write+0x5f/0xe0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f1d1d0cf077 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 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 RSP: 002b:00007ffcebb0e568 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000143 RCX: 00007f1d1d0cf077 RDX: 0000000000000143 RSI: 00005639265aa7e0 RDI: 0000000000000001 RBP: 00005639265aa7e0 R08: 000000000000000a R09: 0000000000000142 R10: 000056392639c017 R11: 0000000000000246 R12: 0000000000000143 R13: 00007f1d1d1ae6a0 R14: 00007f1d1d1aa4a0 R15: 00007f1d1d1a98a0 Modules linked in: CR2: ffff91c900000000 ---[ end trace 0000000000000000 ]--- RIP: 0010:strcmp+0xc/0x30 Code: 75 f7 31 d2 44 0f b6 04 16 44 88 04 11 48 83 c2 01 45 84 c0 75 ee c3 cc cc cc cc 0f 1f 00 31 c0 eb 08 48 83 c0 01 84 d2 74 13 <0f> b6 14 07 3a 14 06 74 ef 19 c0 83 c8 01 c3 cc cc cc cc 31 c3 RSP: 0018:ffff9b3b00f53c48 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffffffffba958a68 RCX: 0000000000000000 RDX: 0000000000000010 RSI: ffff91c943d33a90 RDI: ffff91c900000000 RBP: ffff91c900000000 R08: 00000018d604b529 R09: 0000000000000000 R10: ffff91c9483eddb1 R11: ffff91ca483eddab R12: ffff91c946171580 R13: ffff91c9479f0538 R14: ffff91c9457c2848 R15: ffff91c9479f0538 FS: 00007f1d1cfbe740(0000) GS:ffff91c9bdc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff91c900000000 CR3: 0000000006316000 CR4: 00000000000006e0 Link: https://lore.kernel.org/linux-trace-kernel/20221207035143.2278781-1-zhengyejian1@huawei.com Cc: Cc: Cc: stable@vger.kernel.org Fixes: d380dcde9a07 ("tracing: Fix now invalid var_ref_vals assumption in trace action") Signed-off-by: Zheng Yejian Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_hist.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2cc6a528882d0e0ccbc1bca5f95b8c963cedac54 Author: Zheng Yejian Date: Wed Dec 7 11:46:35 2022 +0800 tracing/hist: Fix wrong return value in parse_action_params() When number of synth fields is more than SYNTH_FIELDS_MAX, parse_action_params() should return -EINVAL. Link: https://lore.kernel.org/linux-trace-kernel/20221207034635.2253990-1-zhengyejian1@huawei.com Cc: Cc: Cc: stable@vger.kernel.org Fixes: c282a386a397 ("tracing: Add 'onmatch' hist trigger action support") Signed-off-by: Zheng Yejian Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_hist.c | 1 + 1 file changed, 1 insertion(+) commit 20fb6c997600012209699564a79911584dd5876b Author: Steven Rostedt Date: Fri Dec 9 13:41:44 2022 -0500 x86/mm/kmmio: Use rcu_read_lock_sched_notrace() The mmiotrace tracer is "special". The purpose is to help reverse engineer binary drivers by removing the memory allocated by the driver and when the driver goes to access it, a fault occurs, the mmiotracer will record what the driver was doing and then do the work on its behalf by single stepping through the process. But to achieve this ability, it must do some special things. One is to take the rcu_read_lock() when the fault occurs, and then release it in the breakpoint that is single stepping. This makes lockdep unhappy, as it changes the state of RCU from within an exception that is not contained in that exception, and we get a nasty splat from lockdep. Instead, switch to rcu_read_lock_sched_notrace() as the RCU sched variant has the same grace period as normal RCU. This is basically the same as rcu_read_lock() but does not make lockdep complain about it. Note, the preempt_disable() is still needed as it uses preempt_enable_no_resched(). Link: https://lore.kernel.org/linux-trace-kernel/20221209134144.04f33626@gandalf.local.home Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Karol Herbst Cc: Pekka Paalanen Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Acked-by: Paul E. McKenney Signed-off-by: Steven Rostedt (Google) arch/x86/mm/kmmio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7fd461c47c6cfab4ca4d003790ec276209e52978 Author: Anna Schumaker Date: Wed Nov 30 13:15:27 2022 -0500 NFSv4.2: Change the default KConfig value for READ_PLUS Now that we've worked out performance issues and have a server patch addressing the failed xfstests, we can safely enable this feature by default. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f826afe5eae856b3834cbc65db6178cccd4a3142 Merge: e4d741e9e40b 8610e98f0b48 Author: Bjorn Helgaas Date: Sat Dec 10 10:36:52 2022 -0600 Merge branch 'pci/kbuild' - Remove unnecessary includes (Bjorn Helgaas) * pci/kbuild: PCI: Drop of_match_ptr() to avoid unused variables PCI: Remove unnecessary includes PCI: xgene-msi: Include explicitly PCI: mvebu: Include explicitly PCI: microchip: Include explicitly PCI: altera-msi: Include explicitly # Conflicts: # drivers/pci/controller/pci-mvebu.c commit e4d741e9e40bf77fa448195d53e08fe0303b712a Merge: 4e5194733a81 c1ddc3dad85d Author: Bjorn Helgaas Date: Sat Dec 10 10:36:42 2022 -0600 Merge branch 'pci/ctrl/xilinx' - Fix whitespace issues (Michal Simek) * pci/ctrl/xilinx: PCI: xilinx-nwl: Fix coding style violations commit 4e5194733a81b9c46f8c7c6ca85526a1b8879bcb Merge: 0454c6c0ed26 76007ccc5727 Author: Bjorn Helgaas Date: Sat Dec 10 10:36:41 2022 -0600 Merge branch 'pci/ctrl/mvebu' - Switch to the gpiod API so we can make of_get_named_gpio_flags() private (Dmitry Torokhov) * pci/ctrl/mvebu: PCI: mvebu: Switch to using gpiod API commit 0454c6c0ed26f99f60293c561746f663dd08f56f Merge: bcccaa0a4857 7ccb96677964 Author: Bjorn Helgaas Date: Sat Dec 10 10:36:40 2022 -0600 Merge branch 'pci/ctrl/aardvark' - Switch to using devm_gpiod_get_optional() so we can stop exporting devm_gpiod_get_from_of_node() (Dmitry Torokhov) * pci/ctrl/aardvark: PCI: aardvark: Switch to using devm_gpiod_get_optional() commit bcccaa0a4857433aad8ed9874c496cb2e385d470 Merge: ba7deaa2a8e4 2759ddf7535d Author: Bjorn Helgaas Date: Sat Dec 10 10:36:40 2022 -0600 Merge branch 'remotes/lorenzo/pci/misc' - Register notifier if core_init_notifier is enabled in pci-epf-test (Kunihiko Hayashi) - Fixup Kconfig indentation (Shunsuke Mie) * remotes/lorenzo/pci/misc: PCI: endpoint: Fix Kconfig indent style PCI: pci-epf-test: Register notifier if only core_init_notifier is enabled commit ba7deaa2a8e48d8a31608b5dca58dbe119c0d72a Merge: 4e5db7983de0 0a584655ef89 Author: Bjorn Helgaas Date: Sat Dec 10 10:36:39 2022 -0600 Merge branch 'remotes/lorenzo/pci/vmd' - Restore MSI remapping configuration during resume because the configuration is cleared out by firmware when suspending (Nirmal Patel) - Reset the hierarchy below VMD when probing the VMD; we attempted this before, but with the wrong device, so it didn't work (Francisco Munoz) * remotes/lorenzo/pci/vmd: PCI: vmd: Fix secondary bus reset for Intel bridges PCI: vmd: Disable MSI remapping after suspend commit 4e5db7983de0d4bed83e2cdaf9f04093e8b8e1c4 Merge: 008ee711f99f 16e3f4077965 Author: Bjorn Helgaas Date: Sat Dec 10 10:36:39 2022 -0600 Merge branch 'remotes/lorenzo/pci/tegra' - Switch from devm_gpiod_get_from_of_node() to devm_fwnode_gpiod_get() (Dmitry Torokhov) * remotes/lorenzo/pci/tegra: PCI: tegra: Switch to using devm_fwnode_gpiod_get commit 008ee711f99fdc0e02f0c5eee10e5d067d67c110 Merge: 8ecdba32a500 74eac50391ce Author: Bjorn Helgaas Date: Sat Dec 10 10:36:38 2022 -0600 Merge branch 'remotes/lorenzo/pci/qcom' - Add DT and driver support for SC8280XP/SA8540P basic interconnects where interconnect bandwidth must be requested before enabling interconnect clocks (Johan Hovold) - Add 'dma-coherent' property (Johan Hovold) * remotes/lorenzo/pci/qcom: dt-bindings: PCI: qcom: Allow 'dma-coherent' property PCI: qcom: Add basic interconnect support dt-bindings: PCI: qcom: Add SC8280XP/SA8540P interconnects commit 8ecdba32a500bbc6c571ea96656eb664b0038f8d Merge: c00a1090544e 19098934f910 Author: Bjorn Helgaas Date: Sat Dec 10 10:36:38 2022 -0600 Merge branch 'remotes/lorenzo/pci/mt7621' - Add sentinel to mt7621_pcie_quirks_match[] to prevent oops when parsing the table (John Thomson) * remotes/lorenzo/pci/mt7621: PCI: mt7621: Add sentinel to quirks table commit c00a1090544ed7d97dee0b49c5a5c063052bdeab Merge: 29a3e5aedc39 5f697b25009c Author: Bjorn Helgaas Date: Sat Dec 10 10:36:37 2022 -0600 Merge branch 'remotes/lorenzo/pci/endpoint' - Add a .release() callback for the Endpoint Controller library so an Endpoint driver is removable (Yoshihiro Shimoda) - Fix pci-epf-vntb kernel-doc and whitespace (Frank Li) - Fix pci-epf-vntb error path usage of pci_epc_mem_free_addr() (Frank Li) - Remove pci-epf-vntb unused epf_db_phy (Frank Li) - Fix pci-epf-vntb sparse warnings (Frank Li) * remotes/lorenzo/pci/endpoint: PCI: endpoint: pci-epf-vntb: Fix sparse ntb->reg build warning PCI: endpoint: pci-epf-vntb: Fix sparse build warning for epf_db PCI: endpoint: pci-epf-vntb: Replace hardcoded 4 with sizeof(u32) PCI: endpoint: pci-epf-vntb: Remove unused epf_db_phy struct member PCI: endpoint: pci-epf-vntb: Fix call pci_epc_mem_free_addr() in error path PCI: endpoint: pci-epf-vntb: Fix struct epf_ntb_ctrl indentation PCI: endpoint: pci-epf-vntb: Clean up kernel_doc warning PCI: endpoint: Fix WARN() when an endpoint driver is removed commit 29a3e5aedc398f6eca8e454c03f498202bf9d1eb Merge: 0ef283080e5d ba6ed462dcf4 Author: Bjorn Helgaas Date: Sat Dec 10 10:36:37 2022 -0600 Merge branch 'remotes/lorenzo/pci/dwc' - Fix n_fts[] array overrun (Vidya Sagar) - Don't advertise PTM Responder role for Endpoints (Vidya Sagar) - Fix qcom "reset assert" error message (Manivannan Sadhasivam) - Downgrade "link didn't come up" message to dev_info (Vidya Sagar) - Initialize PHY before deasserting core reset so the link comes up on boards where the PHY provides the reference clock (this was a regression in v6.0) (Sascha Hauer) - Switch histb to the gpiod API (Dmitry Torokhov) - Fix imx6sx and imx8mq clock names in DT binding (Serge Semin) - Fix visconti MSI interrupt in DT binding (Serge Semin) - Consolidate reset-gpio, cdm, windows info in common DT shared by both Root Port and Endpoint bindings (Serge Semin) - Remove bus node from DT examples (Serge Semin) - Add common phys, phy-names to DT (Serge Semin) - Add default max-link-speed of Gen5 to DT (Serge Semin) - Apply generic schema for generic device (Serge Semin) - Add default max-functions of 32 to DT (Serge Semin) - Add common interrupts, interrupt-names to DT (Serge Semin) - Add common regs, reg-names to DT (Serge Semin) - Add common clocks, resets to DT (Serge Semin) - Add dma-coherent to DT (Serge Semin) - Apply common schema to Rockchip DT (Serge Semin) - Add Baikal-T1 DT bindings (Serge Semin) - Add dma-ranges support in DesignWare core (Serge Semin) - Add dw_pcie_cap_is() for testing controller capabilities (Serge Semin) - Add generic resources getter to DesignWare core (Serge Semin) - Combine iATU detection procedures (Serge Semin) - Add generic clock and reset names to DesignWare core (Serge Semin) - Add Baikal-T1 PCIe controller driver (Serge Semin) * remotes/lorenzo/pci/dwc: PCI: dwc: Add Baikal-T1 PCIe controller support PCI: dwc: Introduce generic platform clocks and resets PCI: dwc: Combine iATU detection procedures PCI: dwc: Introduce generic resources getter PCI: dwc: Introduce generic controller capabilities interface PCI: dwc: Introduce dma-ranges property support for RC-host dt-bindings: PCI: dwc: Add Baikal-T1 PCIe Root Port bindings dt-bindings: PCI: dwc: Apply common schema to Rockchip DW PCIe nodes dt-bindings: PCI: dwc: Add dma-coherent property dt-bindings: PCI: dwc: Add clocks/resets common properties dt-bindings: PCI: dwc: Add reg/reg-names common properties dt-bindings: PCI: dwc: Add interrupts/interrupt-names common properties dt-bindings: PCI: dwc: Add max-functions EP property dt-bindings: PCI: dwc: Apply generic schema for generic device only dt-bindings: PCI: dwc: Add max-link-speed common property dt-bindings: PCI: dwc: Add phys/phy-names common properties dt-bindings: PCI: dwc: Remove bus node from the examples dt-bindings: PCI: dwc: Detach common RP/EP DT bindings dt-bindings: visconti-pcie: Fix interrupts array max constraints dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq PCI: histb: Switch to using gpiod API PCI: imx6: Initialize PHY before deasserting core reset PCI: dwc: Use dev_info for PCIe link down event logging PCI: qcom: Fix error message for reset_control_assert() PCI: designware-ep: Disable PTM capabilities for EP mode PCI: Add PCI_PTM_CAP_RES macro PCI: dwc: Fix n_fts[] array overrun commit 0ef283080e5dc508a60977156c60358f2ac18ecc Merge: e6936c8d7c33 602fb860945f Author: Bjorn Helgaas Date: Sat Dec 10 10:36:36 2022 -0600 Merge branch 'remotes/lorenzo/pci/brcmstb' - Enable Multi-MSI (Jim Quinlan) - Wait for 100ms after PERST# deassert for power and clocks to stabilize (Jim Quinlan) - Use readl_poll_timeout_atomic() instead of hand-rolled timeout loop (Jim Quinlan) - Drop needless "inline" annotations (Jim Quinlan) - Set RCB_MPS mode bit so data for reads up to MPS are returned in a single completion (Jim Quinlan) * remotes/lorenzo/pci/brcmstb: PCI: brcmstb: Set RCB_{MPS,64B}_MODE bits PCI: brcmstb: Drop needless 'inline' annotations PCI: brcmstb: Replace status loops with read_poll_timeout_atomic() PCI: brcmstb: Wait for 100ms following PERST# deassert PCI: brcmstb: Enable Multi-MSI commit e6936c8d7c338c67ae280064ef25b342e51eded2 Merge: 0084cd607200 d3fd0ee7a4a1 Author: Bjorn Helgaas Date: Sat Dec 10 10:36:36 2022 -0600 Merge branch 'remotes/lorenzo/pci/dt' - Add ti,j721e-pci-host interrupt controller definition (Matt Ranostay) - Add ti,j721e-pci-host interrupt properties (Matt Ranostay) - Add ti,j721s2 host mode device-id (Matt Ranostay) - Add mediatek-gen3 iommu, power properties (Jianjun Wang) - Add mediatek-gen3 SoC-based clock names (Frank Wunderlich) - Add mediatek-gen3 mt7986 support (Frank Wunderlich) * remotes/lorenzo/pci/dt: dt-bindings: PCI: mediatek-gen3: add support for mt7986 dt-bindings: PCI: mediatek-gen3: add SoC based clock config dt-bindings: PCI: Add host mode device-id for j721s2 platform dt-bindings: PCI: mediatek-gen3: Support mt8195 dt-bindings: PCI: ti,j721e-pci-*: Add missing interrupt properties dt-bindings: PCI: ti,j721e-pci-host: add interrupt controller definition commit 0084cd60720023dbab90e6c85c9aa375478f8ebd Merge: 8961fc4f8c78 aa382ffa705b Author: Bjorn Helgaas Date: Sat Dec 10 10:36:35 2022 -0600 Merge branch 'pci/sysfs' - Fix a double free in the error path of creating sysfs "resource%d" attributes (Sascha Hauer) * pci/sysfs: PCI/sysfs: Fix double free in error path commit 8961fc4f8c78f876c4b7278c5d5fb47f0e2ba1be Merge: 9303050181bc d91482bb212b Author: Bjorn Helgaas Date: Sat Dec 10 10:36:34 2022 -0600 Merge branch 'pci/resource' - Remove EfiMemoryMappedIO regions from the E820 map to allow PCI core to allocate BARs from them. The only purpose of EfiMemoryMappedIO is to tell the OS to map things needed by EFI runtime services, so it's often used for PCI host bridge apertures. If we can't allocate from those apertures, we can't hot-add devices (Bjorn Helgaas) * pci/resource: x86/PCI: Use pr_info() when possible x86/PCI: Fix log message typo x86/PCI: Tidy E820 removal messages PCI: Skip allocate_resource() if too little space available efi/x86: Remove EfiMemoryMappedIO from E820 map commit 9303050181bcea67cfda2bd74e3508a333e2e23a Merge: ec7c9a681dac d8d2b65a940b Author: Bjorn Helgaas Date: Sat Dec 10 10:36:34 2022 -0600 Merge branch 'pci/portdrv' - Squash portdrv_core.c and portdrv_pci.c into portdrv.c to make it easier to find things (Bjorn Helgaas) - Allow AER service only for Root Ports & RCECs so portdrv can successfully bind to other devices that have AER but lack MSI (which they don't need for AER), which allows power management for those devices (Bjorn Helgaas) * pci/portdrv: PCI/portdrv: Allow AER service only for Root Ports & RCECs PCI/portdrv: Unexport pcie_port_service_register(), pcie_port_service_unregister() PCI/portdrv: Move private things to portdrv.c PCI/portdrv: Squash into portdrv.c commit ec7c9a681dacce779604429f561c079164ee6e7c Merge: e1f2d1539731 73fcd4520edb Author: Bjorn Helgaas Date: Sat Dec 10 10:36:33 2022 -0600 Merge branch 'pci/pm-agp' - Convert AGP efficeon, intel, amd-k7, ati, nvidia to generic power management (Bjorn Helgaas) * pci/pm-agp: agp/via: Update to DEFINE_SIMPLE_DEV_PM_OPS() agp/sis: Update to DEFINE_SIMPLE_DEV_PM_OPS() agp/amd64: Update to DEFINE_SIMPLE_DEV_PM_OPS() agp/nvidia: Convert to generic power management agp/ati: Convert to generic power management agp/amd-k7: Convert to generic power management agp/intel: Convert to generic power management agp/efficeon: Convert to generic power management commit e1f2d1539731dfb3c367d1778cb06c4e2f169424 Merge: eae10935ef89 5984de0b41bf Author: Bjorn Helgaas Date: Sat Dec 10 10:36:33 2022 -0600 Merge branch 'pci/pm' - Remove unused 'state' parameter to pci_legacy_suspend_late() (Bjorn Helgaas) * pci/pm: PCI/PM: Remove unused 'state' parameter to pci_legacy_suspend_late() commit eae10935ef894532acf8645ed444fe4480a4eaf8 Merge: 84c3482963c8 9f0b4cc174c3 Author: Bjorn Helgaas Date: Sat Dec 10 10:36:32 2022 -0600 Merge branch 'pci/misc' - Use METHOD_NAME__UID instead of plain string to make it easier to find all uses (Yipeng Zou) * pci/misc: PCI/ACPI: Use METHOD_NAME__UID instead of plain string commit 84c3482963c8011d0d817fe1ddde28fbab321ae8 Merge: 51ef4873c672 6d4671b534f6 Author: Bjorn Helgaas Date: Sat Dec 10 10:36:32 2022 -0600 Merge branch 'pci/hotplug' - Enable pciehp by default if USB4 is enabled because USB4/Thunderbolt tunneling depends on native PCIe hotplug (Albert Zhou) - Make sure pciehp binds only to Downstream Ports, not Upstream Ports (Rafael J. Wysocki) - Remove unused get_mode1_ECC_cap callback in shpchp (Ian Cowan) - Enable pciehp Command Completed Interrupt only if supported to reduce confusion when looking at lspci output (Pali Rohár) * pci/hotplug: PCI: pciehp: Enable Command Completed Interrupt only if supported PCI: shpchp: Remove unused get_mode1_ECC_cap callback PCI: acpiphp: Avoid setting is_hotplug_bridge for PCIe Upstream Ports PCI/portdrv: Set PCIE_PORT_SERVICE_HP for Root and Downstream Ports only PCI: pciehp: Enable by default if USB4 enabled commit 51ef4873c672b126df7a939546e40dfe43cb5074 Merge: cad4f43f36d2 2d9cd957d40c Author: Bjorn Helgaas Date: Sat Dec 10 10:36:32 2022 -0600 Merge branch 'pci/enumeration' - Only read/write PCIe Link 2 registers for devices with Links and PCIe Capability version >= 2 (Maciej W. Rozycki) - Revert a patch that cleared PCI_STATUS during enumeration because it broke Linux guests on Apple's virtualization framework (Bjorn Helgaas) - Assign PCI domain IDs using IDAs so IDs can be easily reused after loading/unloading host bridge drivers (Pali Rohár) - Fix pci_device_is_present(), which previously always returned "false" for VFs because their vendor ID is always 0xfff (Michael S. Tsirkin) - Check for alloc failure in pci_request_irq() (Zeng Heng) * pci/enumeration: PCI: Check for alloc failure in pci_request_irq() PCI: Fix pci_device_is_present() for VFs by checking PF PCI: Assign PCI domain IDs by ida_alloc() Revert "PCI: Clear PCI_STATUS when setting up device" PCI: Access Link 2 registers only for devices with Links commit cad4f43f36d2fefc03b5211d00729f790eec1a90 Merge: 9abf2313adc1 a4ff8e7a7160 Author: Bjorn Helgaas Date: Sat Dec 10 10:36:31 2022 -0600 Merge branch 'pci/doe' - Fix calculation of DOE length to account for the "0 means 2^18 DWORDs" special case (Li Ming) * pci/doe: PCI/DOE: Fix maximum data object length miscalculation commit d91482bb212b36354b0e46d7a5c0adae807e7a12 Author: Bjorn Helgaas Date: Fri Dec 9 14:41:27 2022 -0600 x86/PCI: Use pr_info() when possible Use pr_info() and similar when possible. No functional change intended. Link: https://lore.kernel.org/r/20221209205131.GA1726524@bhelgaas Suggested-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko arch/x86/pci/acpi.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit 2bfa89fab5ff06703c034c4702e6ea4418194ffe Author: Bjorn Helgaas Date: Thu Dec 8 13:03:41 2022 -0600 x86/PCI: Fix log message typo Add missing word in the log message: - ... so future kernels can this automatically + ... so future kernels can do this automatically Suggested-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221208190341.1560157-5-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Acked-by: Hans de Goede arch/x86/pci/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00904bf64c2819d90a76407d79bdbc8918541320 Author: Bjorn Helgaas Date: Thu Dec 8 13:03:40 2022 -0600 x86/PCI: Tidy E820 removal messages These messages: clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffa0000 64bit] for e820 entry [mem 0x0009f000-0x000fffff] aren't as useful as they could be because (a) the resource is often IORESOURCE_UNSET, so we print the size instead of the start/end and (b) we print the available resource even if it is empty after removing the E820 entry. Print the available space by hand to avoid the IORESOURCE_UNSET problem and only if it's non-empty. No functional change intended. Link: https://lore.kernel.org/r/20221208190341.1560157-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Hans de Goede arch/x86/kernel/resource.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 5c5fb3c3a793b34554e1d21f07cda34308b082cd Author: Bjorn Helgaas Date: Thu Dec 8 13:03:39 2022 -0600 PCI: Skip allocate_resource() if too little space available pci_bus_alloc_from_region() allocates MMIO space by iterating through all the resources available on the bus. The available resource might be reduced if the caller requires 32-bit space or we're avoiding BIOS or E820 areas. Don't bother calling allocate_resource() if we need more space than is available in this resource. This prevents some pointless and annoying messages about avoided areas. Link: https://lore.kernel.org/r/20221208190341.1560157-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Hans de Goede drivers/pci/bus.c | 4 ++++ 1 file changed, 4 insertions(+) commit 07eab0901ede8b7540c52160663bd300cc238164 Author: Bjorn Helgaas Date: Thu Dec 8 13:03:38 2022 -0600 efi/x86: Remove EfiMemoryMappedIO from E820 map Firmware can use EfiMemoryMappedIO to request that MMIO regions be mapped by the OS so they can be accessed by EFI runtime services, but should have no other significance to the OS (UEFI r2.10, sec 7.2). However, most bootloaders and EFI stubs convert EfiMemoryMappedIO regions to E820_TYPE_RESERVED entries, which prevent Linux from allocating space from them (see remove_e820_regions()). Some platforms use EfiMemoryMappedIO entries for PCI MMCONFIG space and PCI host bridge windows, which means Linux can't allocate BAR space for hot-added devices. Remove large EfiMemoryMappedIO regions from the E820 map to avoid this problem. Leave small (< 256KB) EfiMemoryMappedIO regions alone because on some platforms, these describe non-window space that's included in host bridge _CRS. If we assign that space to PCI devices, they don't work. On the Lenovo X1 Carbon, this leads to suspend/resume failures. The previous solution to the problem of allocating BARs in these regions was to add pci_crs_quirks[] entries to disable E820 checking for these machines (see d341838d776a ("x86/PCI: Disable E820 reserved region clipping via quirks")): Acer DMI_PRODUCT_NAME Spin SP513-54N Clevo DMI_BOARD_NAME X170KM-G Lenovo DMI_PRODUCT_VERSION *IIL* Florent reported the BAR allocation issue on the Clevo NL4XLU. We could add another quirk for the NL4XLU, but I hope this generic change can solve it for many machines without having to add quirks. This change has been tested on Clevo X170KM-G (Konrad) and Lenovo Ideapad Slim 3 (Matt) and solves the problem even when overriding the existing quirks by booting with "pci=use_e820". Link: https://bugzilla.kernel.org/show_bug.cgi?id=216565 Clevo NL4XLU Link: https://bugzilla.kernel.org/show_bug.cgi?id=206459#c78 Clevo X170KM-G Link: https://bugzilla.redhat.com/show_bug.cgi?id=1868899 Ideapad Slim 3 Link: https://bugzilla.redhat.com/show_bug.cgi?id=2029207 X1 Carbon Link: https://lore.kernel.org/r/20221208190341.1560157-2-helgaas@kernel.org Reported-by: Florent DELAHAYE Tested-by: Konrad J Hambrick Tested-by: Matt Hansen <2lprbe78@duck.com> Signed-off-by: Bjorn Helgaas Acked-by: Hans de Goede arch/x86/platform/efi/efi.c | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit d8d2b65a940bb497749d66bdab59b530901d3854 Author: Bjorn Helgaas Date: Fri Dec 9 11:01:00 2022 -0600 PCI/portdrv: Allow AER service only for Root Ports & RCECs Previously portdrv allowed the AER service for any device with an AER capability (assuming Linux had control of AER) even though the AER service driver only attaches to Root Port and RCECs. Because get_port_device_capability() included AER for non-RP, non-RCEC devices, we tried to initialize the AER IRQ even though these devices don't generate AER interrupts. Intel DG1 and DG2 discrete graphics cards contain a switch leading to a GPU. The switch supports AER but not MSI, so initializing an AER IRQ failed, and portdrv failed to claim the switch port at all. The GPU itself could be suspended, but the switch could not be put in a low-power state because it had no driver. Don't allow the AER service on non-Root Port, non-Root Complex Event Collector devices. This means we won't enable Bus Mastering if the device doesn't require MSI, the AER service will not appear in sysfs, and the AER service driver will not bind to the device. Link: https://lore.kernel.org/r/20221207084105.84947-1-mika.westerberg@linux.intel.com Link: https://lore.kernel.org/r/20221210002922.1749403-1-helgaas@kernel.org Based-on-patch-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan drivers/pci/pcie/portdrv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e78e274eb22d966258a3845acc71d3c5b8ee2ea8 Author: Kees Cook Date: Fri Dec 2 12:48:59 2022 -0800 NFSD: Avoid clashing function prototypes When built with Control Flow Integrity, function prototypes between caller and function declaration must match. These mismatches are visible at compile time with the new -Wcast-function-type-strict in Clang[1]. There were 97 warnings produced by NFS. For example: fs/nfsd/nfs4xdr.c:2228:17: warning: cast from '__be32 (*)(struct nfsd4_compoundargs *, struct nfsd4_access *)' (aka 'unsigned int (*)(struct nfsd4_compoundargs *, struct nfsd4_access *)') to 'nfsd4_dec' (aka 'unsigned int (*)(struct nfsd4_compoundargs *, void *)') converts to incompatible function type [-Wcast-function-type-strict] [OP_ACCESS] = (nfsd4_dec)nfsd4_decode_access, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The enc/dec callbacks were defined as passing "void *" as the second argument, but were being implicitly cast to a new type. Replace the argument with union nfsd4_op_u, and perform explicit member selection in the function body. There are no resulting binary differences. Changes were made mechanically using the following Coccinelle script, with minor by-hand fixes for members that didn't already match their existing argument name: @find@ identifier func; type T, opsT; identifier ops, N; @@ opsT ops[] = { [N] = (T) func, }; @already_void@ identifier find.func; identifier name; @@ func(..., -void +union nfsd4_op_u *name) { ... } @proto depends on !already_void@ identifier find.func; type T; identifier name; position p; @@ func@p(..., T name ) { ... } @script:python get_member@ type_name << proto.T; member; @@ coccinelle.member = cocci.make_ident(type_name.split("_", 1)[1].split(' ',1)[0]) @convert@ identifier find.func; type proto.T; identifier proto.name; position proto.p; identifier get_member.member; @@ func@p(..., - T name + union nfsd4_op_u *u ) { + T name = &u->member; ... } @cast@ identifier find.func; type T, opsT; identifier ops, N; @@ opsT ops[] = { [N] = - (T) func, }; Cc: Chuck Lever Cc: Jeff Layton Cc: Gustavo A. R. Silva Cc: linux-nfs@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 632 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 377 insertions(+), 255 deletions(-) commit 4dd9daa9124aad3c3d4ceca4f1d417cc62d59156 Author: Chuck Lever Date: Sun Nov 27 12:17:27 2022 -0500 SUNRPC: Fix crasher in unwrap_integ_data() If a zero length is passed to kmalloc() it returns 0x10, which is not a valid address. gss_verify_mic() subsequently crashes when it attempts to dereference that pointer. Instead of allocating this memory on every call based on an untrusted size value, use a piece of dynamically-allocated scratch memory that is always available. Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton net/sunrpc/auth_gss/svcauth_gss.c | 55 +++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 23 deletions(-) commit c65d9df0c4a0e150d97aff363cbd0363f21f9466 Author: Chuck Lever Date: Sat Nov 26 15:55:36 2022 -0500 SUNRPC: Make the svc_authenticate tracepoint conditional Clean up: Simplify the tracepoint's only call site. Also, I noticed that when svc_authenticate() returns SVC_COMPLETE, it leaves rq_auth_stat set to an error value. That doesn't need to be recorded in the trace log. Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton include/trace/events/sunrpc.h | 4 +++- net/sunrpc/svc.c | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 9315564747cb6a570e99196b3a4880fb817635fd Author: Chuck Lever Date: Sat Nov 26 15:55:30 2022 -0500 NFSD: Use only RQ_DROPME to signal the need to drop a reply Clean up: NFSv2 has the only two usages of rpc_drop_reply in the NFSD code base. Since NFSv2 is going away at some point, replace these in order to simplify the "drop this reply?" check in nfsd_dispatch(). Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton fs/nfsd/nfsproc.c | 4 ++-- fs/nfsd/nfssvc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit ad3d24c59d8c3b31b10bb3e4944ae7bef63480d3 Author: Chuck Lever Date: Sat Nov 26 15:55:24 2022 -0500 SUNRPC: Clean up xdr_write_pages() Make it more evident how xdr_write_pages() updates the tail buffer by using the convention of naming the iov pointer variable "tail". I spent more than a couple of hours chasing through code to understand this, so someone is likely to find this useful later. Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton net/sunrpc/xdr.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit da522b5fe1a5f8b7c20a0023e87b52a150e53bf5 Author: Chuck Lever Date: Sat Nov 26 15:55:18 2022 -0500 SUNRPC: Don't leak netobj memory when gss_read_proxy_verf() fails Fixes: 030d794bf498 ("SUNRPC: Use gssproxy upcall for server RPCGSS authentication.") Signed-off-by: Chuck Lever Cc: Reviewed-by: Jeff Layton net/sunrpc/auth_gss/svcauth_gss.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 638593be55c0b37a1930038460a9918215d5c24b Author: Dai Ngo Date: Wed Nov 16 19:44:48 2022 -0800 NFSD: add CB_RECALL_ANY tracepoints Add tracepoints to trace start and end of CB_RECALL_ANY operation. Signed-off-by: Dai Ngo [ cel: added show_rca_mask() macro ] Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 2 ++ fs/nfsd/trace.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ include/trace/misc/nfs.h | 12 ++++++++++++ 3 files changed, 64 insertions(+) commit 44df6f439a1790a5f602e3842879efa88f346672 Author: Dai Ngo Date: Wed Nov 16 19:44:47 2022 -0800 NFSD: add delegation reaper to react to low memory condition The delegation reaper is called by nfsd memory shrinker's on the 'count' callback. It scans the client list and sends the courtesy CB_RECALL_ANY to the clients that hold delegations. To avoid flooding the clients with CB_RECALL_ANY requests, the delegation reaper sends only one CB_RECALL_ANY request to each client per 5 seconds. Signed-off-by: Dai Ngo [ cel: moved definition of RCA4_TYPE_MASK_RDATA_DLG ] Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++++--- fs/nfsd/state.h | 5 +++ include/linux/nfs4.h | 13 ++++++++ 3 files changed, 102 insertions(+), 4 deletions(-) commit 3959066b697b5dfbb7141124ae9665337d4bc638 Author: Dai Ngo Date: Wed Nov 16 19:44:46 2022 -0800 NFSD: add support for sending CB_RECALL_ANY Add XDR encode and decode function for CB_RECALL_ANY. Signed-off-by: Dai Ngo Signed-off-by: Chuck Lever fs/nfsd/nfs4callback.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nfsd/state.h | 1 + fs/nfsd/xdr4.h | 5 ++++ fs/nfsd/xdr4cb.h | 6 +++++ 4 files changed, 84 insertions(+) commit a1049eb47f20b9eabf9afb218578fff16b4baca6 Author: Dai Ngo Date: Wed Nov 16 19:44:45 2022 -0800 NFSD: refactoring courtesy_client_reaper to a generic low memory shrinker Refactoring courtesy_client_reaper to generic low memory shrinker so it can be used for other purposes. Signed-off-by: Dai Ngo Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 247c01ff5f8d66e62a404c91733be52fecb8b7f6 Author: Chuck Lever Date: Mon Nov 14 08:57:43 2022 -0500 trace: Relocate event helper files Steven Rostedt says: > The include/trace/events/ directory should only hold files that > are to create events, not headers that hold helper functions. > > Can you please move them out of include/trace/events/ as that > directory is "special" in the creation of events. Signed-off-by: Chuck Lever Acked-by: Leon Romanovsky Acked-by: Steven Rostedt (Google) Acked-by: Anna Schumaker MAINTAINERS | 7 +++++++ drivers/infiniband/core/cm_trace.h | 2 +- drivers/infiniband/core/cma_trace.h | 2 +- fs/nfs/nfs4trace.h | 6 +++--- fs/nfs/nfstrace.h | 6 +++--- include/trace/events/rpcgss.h | 2 +- include/trace/events/rpcrdma.h | 4 ++-- include/trace/events/sunrpc.h | 2 +- include/trace/{events => misc}/fs.h | 0 include/trace/{events => misc}/nfs.h | 0 include/trace/{events => misc}/rdma.h | 0 include/trace/{events/sunrpc_base.h => misc/sunrpc.h} | 0 12 files changed, 19 insertions(+), 12 deletions(-) commit 79a1d88a36f77374c77fd41a4386d8c2736b8704 Author: Brian Foster Date: Wed Nov 16 10:28:36 2022 -0500 NFSD: pass range end to vfs_fsync_range() instead of count _nfsd_copy_file_range() calls vfs_fsync_range() with an offset and count (bytes written), but the former wants the start and end bytes of the range to sync. Fix it up. Fixes: eac0b17a77fb ("NFSD add vfs_fsync after async copy is done") Signed-off-by: Brian Foster Tested-by: Dai Ngo Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9f27783b4dd235ef3c8dbf69fc6322777450323c Author: Jeff Layton Date: Fri Nov 11 14:36:38 2022 -0500 lockd: fix file selection in nlmsvc_cancel_blocked We currently do a lock_to_openmode call based on the arguments from the NLM_UNLOCK call, but that will always set the fl_type of the lock to F_UNLCK, and the O_RDONLY descriptor is always chosen. Fix it to use the file_lock from the block instead. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/lockd/svclock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 69efce009f7df888e1fede3cb2913690eb829f52 Author: Jeff Layton Date: Fri Nov 11 14:36:37 2022 -0500 lockd: ensure we use the correct file descriptor when unlocking Shared locks are set on O_RDONLY descriptors and exclusive locks are set on O_WRONLY ones. nlmsvc_unlock however calls vfs_lock_file twice, once for each descriptor, but it doesn't reset fl_file. Ensure that it does. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/lockd/svclock.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 75c7940d2a86d3f1b60a0a265478cb8fc887b970 Author: Jeff Layton Date: Fri Nov 11 14:36:36 2022 -0500 lockd: set missing fl_flags field when retrieving args Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/lockd/svc4proc.c | 1 + fs/lockd/svcproc.c | 1 + 2 files changed, 2 insertions(+) commit 85a0d0c9a58002ef7d1bf5e3ea630f4fbd42a4f0 Author: Xiu Jianfeng Date: Fri Nov 11 17:18:35 2022 +0800 NFSD: Use struct_size() helper in alloc_session() Use struct_size() helper to simplify the code, no functional changes. Signed-off-by: Xiu Jianfeng Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 01d53a88c08951f88f2a42f1f1e6568928e0590e Author: Jeff Layton Date: Mon Nov 7 06:58:41 2022 -0500 nfsd: return error if nfs4_setacl fails With the addition of POSIX ACLs to struct nfsd_attrs, we no longer return an error if setting the ACL fails. Ensure we return the na_aclerr error on SETATTR if there is one. Fixes: c0cbe70742f4 ("NFSD: add posix ACLs to struct nfsd_attrs") Cc: Neil Brown Reported-by: Yongcheng Yang Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 2 ++ 1 file changed, 2 insertions(+) commit 18ebd35b61b4693a0ddc270b6d4f18def232e770 Author: Trond Myklebust Date: Sun Nov 6 14:02:39 2022 -0500 lockd: set other missing fields when unlocking files vfs_lock_file() expects the struct file_lock to be fully initialised by the caller. Re-exported NFSv3 has been seen to Oops if the fl_file field is NULL. Fixes: aec158242b87 ("lockd: set fl_owner when unlocking files") Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Link: https://bugzilla.kernel.org/show_bug.cgi?id=216582 Signed-off-by: Chuck Lever fs/lockd/svcsubs.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit d7064eaf688cfe454c50db9f59298463d80d403c Author: Chuck Lever Date: Thu Nov 3 16:22:48 2022 -0400 NFSD: Add an nfsd_file_fsync tracepoint Add a tracepoint to capture the number of filecache-triggered fsync calls and which files needed it. Also, record when an fsync triggers a write verifier reset. Examples: <...>-97 [007] 262.505611: nfsd_file_free: inode=0xffff888171e08140 ref=0 flags=GC may=WRITE nf_file=0xffff8881373d2400 <...>-97 [007] 262.505612: nfsd_file_fsync: inode=0xffff888171e08140 ref=0 flags=GC may=WRITE nf_file=0xffff8881373d2400 ret=0 <...>-97 [007] 262.505623: nfsd_file_free: inode=0xffff888171e08dc0 ref=0 flags=GC may=WRITE nf_file=0xffff8881373d1e00 <...>-97 [007] 262.505624: nfsd_file_fsync: inode=0xffff888171e08dc0 ref=0 flags=GC may=WRITE nf_file=0xffff8881373d1e00 ret=0 Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton fs/nfsd/filecache.c | 5 ++++- fs/nfsd/trace.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) commit 3ed157d0d73f15b6574424dd068ca5f5a8560562 Author: Li zeming Date: Fri Nov 4 09:43:03 2022 +0800 sunrpc: svc: Remove an unused static function svc_ungetu32() The svc_ungetu32 function is not used, you could remove it. Signed-off-by: Li zeming Signed-off-by: Chuck Lever include/linux/sunrpc/svc.h | 7 ------- 1 file changed, 7 deletions(-) commit 22ae4c114f77b55a4c5036e8f70409a0799a08f8 Author: Jeff Layton Date: Wed Nov 2 14:44:50 2022 -0400 nfsd: fix up the filecache laundrette scheduling We don't really care whether there are hashed entries when it comes to scheduling the laundrette. They might all be non-gc entries, after all. We only want to schedule it if there are entries on the LRU. Switch to using list_lru_count, and move the check into nfsd_file_gc_worker. The other callsite in nfsd_file_put doesn't need to count entries, since it only schedules the laundrette after adding an entry to the LRU. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit ea6ff7792203ad6786bda75d1dabf33311c8bef4 Author: Biju Das Date: Thu Oct 27 09:21:57 2022 +0100 can: rcar_canfd: Add multi_channel_irqs to struct rcar_canfd_hw_info RZ/G2L has separate IRQ lines for tx and error interrupt for each channel whereas R-Car has a combined IRQ line for all the channel specific tx and error interrupts. Add multi_channel_irqs to struct rcar_canfd_hw_info to select the driver to choose between combined and separate irq registration for channel interrupts. This patch also removes enum rcanfd_chip_id and chip_id from both struct rcar_canfd_hw_info, as it is unused. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/20221027082158.95895-6-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde drivers/net/can/rcar/rcar_canfd.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit a1dcfbdfd1d0f7843f381f7c58cc87a0f8c11f6c Author: Biju Das Date: Thu Oct 27 09:21:56 2022 +0100 can: rcar_canfd: Add postdiv to struct rcar_canfd_hw_info R-Car has a clock divider for CAN FD clock within the IP, whereas it is not available on RZ/G2L. Add postdiv variable to struct rcar_canfd_hw_info to take care of this difference. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/20221027082158.95895-5-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde drivers/net/can/rcar/rcar_canfd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 841645cfc773cdd0a21c67357c53845f2e972f91 Author: Biju Das Date: Thu Oct 27 09:21:55 2022 +0100 can: rcar_canfd: Add shared_global_irqs to struct rcar_canfd_hw_info RZ/G2L has separate IRQ lines for receive FIFO and global error interrupt whereas R-Car has shared IRQ line. Add shared_global_irqs to struct rcar_canfd_hw_info to select the driver to choose between shared and separate irq registration for global interrupts. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/20221027082158.95895-4-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde drivers/net/can/rcar/rcar_canfd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 34f9e9852b90d7be6eef95874500d1fb1b768e7f Author: Biju Das Date: Thu Oct 27 09:21:54 2022 +0100 can: rcar_canfd: Add max_channels to struct rcar_canfd_hw_info R-Car V3U supports a maximum of 8 channels whereas rest of the SoCs support 2 channels. Add max_channels variable to struct rcar_canfd_hw_info to handle this difference. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/20221027082158.95895-3-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde drivers/net/can/rcar/rcar_canfd.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 09451f244eabb7ba197abdd92a5ed5e0a8387200 Author: Vivek Yadav Date: Fri Nov 4 10:46:17 2022 +0530 can: m_can: sort header inclusion alphabetically Sort header inclusion alphabetically. Suggested-by: Marc Kleine-Budde Signed-off-by: Vivek Yadav Link: https://lore.kernel.org/all/20221104051617.21173-1-vivek.2311@samsung.com Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 8 ++++---- drivers/net/can/m_can/m_can.h | 16 ++++++++-------- drivers/net/can/m_can/m_can_platform.c | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) commit ce7c5382758b13dd4dfa2eb2f4989f9a27c58ffe Author: Biju Das Date: Thu Oct 27 09:21:53 2022 +0100 can: rcar_canfd: rcar_canfd_probe: Add struct rcar_canfd_hw_info to driver data The CAN FD IP found on RZ/G2L SoC has some HW features different to that of R-Car. For example, it has multiple resets and multiple IRQs for global and channel interrupts. Also, it does not have ECC error flag registers and clk post divider present on R-Car. Similarly, R-Car V3U has 8 channels whereas other SoCs has only 2 channels. This patch adds the struct rcar_canfd_hw_info to take care of the HW feature differences and driver data present on both IPs. It also replaces the driver data chip type with struct rcar_canfd_hw_info by moving chip type to it. Whilst started using driver data instead of chip_id for detecting R-Car V3U SoCs. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/20221027082158.95895-2-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde drivers/net/can/rcar/rcar_canfd.c | 43 +++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 13 deletions(-) commit 0bf582fc51684dc4380b0b9248112cf9f837a585 Author: Marc Kleine-Budde Date: Mon Oct 31 12:28:08 2022 +0100 can: kvaser_usb: kvaser_usb_set_{,data}bittiming(): remove empty lines in variable declaration Fix coding style by removing empty lines in variable declaration. Fixes: 39d3df6b0ea8 ("can: kvaser_usb: Compare requested bittiming parameters with actual parameters in do_set_{,data}_bittiming") Cc: Jimmy Assarsson Cc: Anssi Hannula Link: https://lore.kernel.org/all/20221031114513.81214-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 -- 1 file changed, 2 deletions(-) commit f0c0ade8d874fb127f9b451d415bee8cbb6bf7a6 Author: Andreas Gruenbacher Date: Mon Dec 5 22:27:38 2022 +0100 gfs2: Minor gfs2_try_evict cleanup In gfs2_try_evict(), when an inode can't be evicted, we are grabbing a temporary reference on the inode glock to poke that glock. That should be safe, but it's easier to just grab an inode reference as we already do earlier in this function. Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit cce2d7d2abcc8d083fbb24e795089542f1e742c8 Author: Marc Kleine-Budde Date: Mon Oct 31 12:26:24 2022 +0100 can: kvaser_usb: kvaser_usb_set_bittiming(): fix redundant initialization warning for err The variable err is initialized, but the initialized value is Overwritten before it is read. Fix the warning by not initializing the variable err at all. Fixes: 39d3df6b0ea8 ("can: kvaser_usb: Compare requested bittiming parameters with actual parameters in do_set_{,data}_bittiming") Cc: Jimmy Assarsson Cc: Anssi Hannula Link: https://lore.kernel.org/all/20221031114513.81214-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4994e387d7332f03cd4eab55f7896ddf04cab1c0 Author: Steven Rostedt Date: Tue Dec 6 14:12:02 2022 -0500 x86/mm/kmmio: Switch to arch_spin_lock() The mmiotrace tracer is "special". The purpose is to help reverse engineer binary drivers by removing the memory allocated by the driver and when the driver goes to access it, a fault occurs, the mmiotracer will record what the driver was doing and then do the work on its behalf by single stepping through the process. But to achieve this ability, it must do some special things. One is it needs to grab a lock while in the breakpoint handler. This is considered an NMI state, and then lockdep warns that the lock is being held in both an NMI state (really a breakpoint handler) and also in normal context. As the breakpoint/NMI state only happens when the driver is accessing memory, there's no concern of a race condition against the setup and tear-down of mmiotracer. To make lockdep and mmiotrace work together, convert the locks used in the breakpoint handler into arch_spin_lock(). Link: https://lkml.kernel.org/r/20221206191229.656244029@goodmis.org Link: https://lore.kernel.org/lkml/20221201213126.620b7dd3@gandalf.local.home/ Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Karol Herbst Cc: Pekka Paalanen Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Borislav Petkov Suggested-by: Thomas Gleixner Signed-off-by: Steven Rostedt (Google) arch/x86/mm/kmmio.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit e25e43a4e5d8cb2323553d8b6a7ba08d2ebab21f Author: Masami Hiramatsu (Google) Date: Tue Dec 6 23:18:01 2022 +0900 tracing: Fix complicated dependency of CONFIG_TRACER_MAX_TRACE Both CONFIG_OSNOISE_TRACER and CONFIG_HWLAT_TRACER partially enables the CONFIG_TRACER_MAX_TRACE code, but that is complicated and has introduced a bug; It declares tracing_max_lat_fops data structure outside of #ifdefs, but since it is defined only when CONFIG_TRACER_MAX_TRACE=y or CONFIG_HWLAT_TRACER=y, if only CONFIG_OSNOISE_TRACER=y, that declaration comes to a definition(!). To fix this issue, and do not repeat the similar problem, makes CONFIG_OSNOISE_TRACER and CONFIG_HWLAT_TRACER enables the CONFIG_TRACER_MAX_TRACE always. It has there benefits; - Fix the tracing_max_lat_fops bug - Simplify the #ifdefs - CONFIG_TRACER_MAX_TRACE code is fully enabled, or not. Link: https://lore.kernel.org/linux-trace-kernel/167033628155.4111793.12185405690820208159.stgit@devnote3 Fixes: 424b650f35c7 ("tracing: Fix missing osnoise tracer on max_latency") Cc: Daniel Bristot de Oliveira Cc: stable@vger.kernel.org Reported-by: David Howells Reported-by: kernel test robot Signed-off-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/all/166992525941.1716618.13740663757583361463.stgit@warthog.procyon.org.uk/ (original thread and v1) Link: https://lore.kernel.org/all/202212052253.VuhZ2ulJ-lkp@intel.com/T/#u (v1 error report) Signed-off-by: Steven Rostedt (Google) kernel/trace/Kconfig | 2 ++ kernel/trace/trace.c | 23 +++++++++++++---------- kernel/trace/trace.h | 8 +++----- 3 files changed, 18 insertions(+), 15 deletions(-) commit 575b76cb885532aae13a9d979fd476bb2b156cb9 Author: Steven Rostedt (Google) Date: Tue Nov 22 12:23:45 2022 -0500 tracing/probes: Handle system names with hyphens When creating probe names, a check is done to make sure it matches basic C standard variable naming standards. Basically, starts with alphabetic or underline, and then the rest of the characters have alpha-numeric or underline in them. But system names do not have any true naming conventions, as they are created by the TRACE_SYSTEM macro and nothing tests to see what they are. The "xhci-hcd" trace events has a '-' in the system name. When trying to attach a eprobe to one of these trace points, it fails because the system name does not follow the variable naming convention because of the hyphen, and the eprobe checks fail on this. Allow hyphens in the system name so that eprobes can attach to the "xhci-hcd" trace events. Link: https://lore.kernel.org/all/Y3eJ8GiGnEvVd8%2FN@macondo/ Link: https://lore.kernel.org/linux-trace-kernel/20221122122345.160f5077@gandalf.local.home Cc: Masami Hiramatsu Cc: stable@vger.kernel.org Fixes: 5b7a96220900e ("tracing/probe: Check event/group naming rule at parsing") Reported-by: Rafael Mendonca Signed-off-by: Steven Rostedt (Google) kernel/trace/trace.h | 19 ++++++++++++++++--- kernel/trace/trace_probe.c | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) commit fff1787adaeebe66f27c01d5c40d8d2e4d79d5ee Author: Song Chen Date: Wed Oct 19 10:11:18 2022 +0800 trace/kprobe: remove duplicated calls of ring_buffer_event_data Function __kprobe_trace_func calls ring_buffer_event_data to get a ring buffer, however, it has been done in above call trace_event_buffer_reserve. So does __kretprobe_trace_func. This patch removes those duplicated calls. Link: https://lore.kernel.org/all/1666145478-4706-1-git-send-email-chensong_2000@189.cn/ Reviewed-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) Signed-off-by: Song Chen Signed-off-by: Masami Hiramatsu (Google) kernel/trace/trace_kprobe.c | 2 -- 1 file changed, 2 deletions(-) commit 8c2b99790196d34a58a2b00a4c9862d2de3af3e2 Author: Masami Hiramatsu (Google) Date: Thu Oct 20 00:31:56 2022 +0900 tracing: docs: Update histogram doc for .percent/.graph and 'nohitcount' Update histogram document for .percent/.graph suffixes and 'nohitcount' option. Link: https://lore.kernel.org/linux-trace-kernel/166610815604.56030.4124933216911828519.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Documentation/trace/histogram.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ccf47f5cc4cebdba7444cf1c04fc1b02d4b3cd15 Author: Masami Hiramatsu (Google) Date: Thu Oct 20 00:31:55 2022 +0900 tracing: Add nohitcount option for suppressing display of raw hitcount Add 'nohitcount' ('NOHC' for short) option for suppressing display of the raw hitcount column in the histogram. Note that you must specify at least one value except raw 'hitcount' when you specify this nohitcount option. # cd /sys/kernel/debug/tracing/ # echo hist:keys=pid:vals=runtime.percent,runtime.graph:sort=pid:NOHC > \ events/sched/sched_stat_runtime/trigger # sleep 10 # cat events/sched/sched_stat_runtime/hist # event histogram # # trigger info: hist:keys=pid:vals=runtime.percent,runtime.graph:sort=pid:size=2048:nohitcount [active] # { pid: 8 } runtime (%): 3.02 runtime: # { pid: 14 } runtime (%): 2.25 runtime: { pid: 16 } runtime (%): 2.25 runtime: { pid: 26 } runtime (%): 0.17 runtime: { pid: 61 } runtime (%): 11.52 runtime: #### { pid: 67 } runtime (%): 1.56 runtime: { pid: 68 } runtime (%): 0.84 runtime: { pid: 76 } runtime (%): 0.92 runtime: { pid: 117 } runtime (%): 2.50 runtime: # { pid: 146 } runtime (%): 49.88 runtime: #################### { pid: 157 } runtime (%): 16.63 runtime: ###### { pid: 158 } runtime (%): 8.38 runtime: ### Link: https://lore.kernel.org/linux-trace-kernel/166610814787.56030.4980636083486339906.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi kernel/trace/trace.c | 3 +++ kernel/trace/trace_events_hist.c | 34 ++++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) commit a2c54256dec7510477e2b4f4db187e638f7cac37 Author: Masami Hiramatsu (Google) Date: Thu Oct 20 00:31:55 2022 +0900 tracing: Add .graph suffix option to histogram value Add the .graph suffix which shows the bar graph of the histogram value. For example, the below example shows that the bar graph of the histogram of the runtime for each tasks. ------ # cd /sys/kernel/debug/tracing/ # echo hist:keys=pid:vals=runtime.graph:sort=pid > \ events/sched/sched_stat_runtime/trigger # sleep 10 # cat events/sched/sched_stat_runtime/hist # event histogram # # trigger info: hist:keys=pid:vals=hitcount,runtime.graph:sort=pid:size=2048 [active] # { pid: 14 } hitcount: 2 runtime: { pid: 16 } hitcount: 8 runtime: { pid: 26 } hitcount: 1 runtime: { pid: 57 } hitcount: 3 runtime: { pid: 61 } hitcount: 20 runtime: ### { pid: 66 } hitcount: 2 runtime: { pid: 70 } hitcount: 3 runtime: { pid: 72 } hitcount: 2 runtime: { pid: 145 } hitcount: 14 runtime: #################### { pid: 152 } hitcount: 5 runtime: ####### { pid: 153 } hitcount: 2 runtime: #### Totals: Hits: 62 Entries: 11 Dropped: 0 ------- Link: https://lore.kernel.org/linux-trace-kernel/166610813953.56030.10944148382315789485.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi kernel/trace/trace.c | 3 +- kernel/trace/trace_events_hist.c | 77 +++++++++++++++++++++++++++++++--------- 2 files changed, 63 insertions(+), 17 deletions(-) commit abaa5258ce5e5887a9de049f50a85dc023391a1c Author: Masami Hiramatsu (Google) Date: Thu Oct 20 00:31:55 2022 +0900 tracing: Add .percent suffix option to histogram values Add .percent suffix option to show the histogram values in percentage. This feature is useful when we need yo undersntand the overall trend for the histograms of large values. E.g. this shows the runtime percentage for each tasks. ------ # cd /sys/kernel/debug/tracing/ # echo hist:keys=pid:vals=hitcount,runtime.percent:sort=pid > \ events/sched/sched_stat_runtime/trigger # sleep 10 # cat events/sched/sched_stat_runtime/hist # event histogram # # trigger info: hist:keys=pid:vals=hitcount,runtime.percent:sort=pid:size=2048 [active] # { pid: 8 } hitcount: 7 runtime (%): 4.14 { pid: 14 } hitcount: 5 runtime (%): 3.69 { pid: 16 } hitcount: 11 runtime (%): 3.41 { pid: 61 } hitcount: 41 runtime (%): 19.75 { pid: 65 } hitcount: 4 runtime (%): 1.48 { pid: 70 } hitcount: 6 runtime (%): 3.60 { pid: 72 } hitcount: 2 runtime (%): 1.10 { pid: 144 } hitcount: 10 runtime (%): 32.01 { pid: 151 } hitcount: 8 runtime (%): 22.66 { pid: 152 } hitcount: 2 runtime (%): 8.10 Totals: Hits: 96 Entries: 10 Dropped: 0 ----- Link: https://lore.kernel.org/linux-trace-kernel/166610813077.56030.4238090506973562347.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi kernel/trace/trace.c | 3 +- kernel/trace/trace_events_hist.c | 90 +++++++++++++++++++++++++++++++++------- 2 files changed, 78 insertions(+), 15 deletions(-) commit 5f2e094ed2592abb3d1f49e263957188e121c2ac Author: Tom Zanussi Date: Thu Oct 20 00:31:55 2022 +0900 tracing: Allow multiple hitcount values in histograms The hitcount is treated specially in the histograms - since it's always expected to be there regardless of whether the user specified anything or not, it's always added as the first histogram value. Currently the code doesn't allow it to be added more than once as a value, which is inconsistent with all the other possible values. It would seem to be a pointless thing to want to do, but other features being added such as percent and graph modifiers don't work properly with the current hitcount restrictions. Fix this by allowing multiple hitcounts to be added. Link: https://lore.kernel.org/linux-trace-kernel/166610812248.56030.16754785928712505251.stgit@devnote2 Signed-off-by: Tom Zanussi Signed-off-by: Masami Hiramatsu (Google) Tested-by: Tom Zanussi kernel/trace/trace_events_hist.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit dd8b3a802b64adf059a49a68f1bdca7846e492fc Merge: 5fc11a401a8d abe2343d37c2 Author: Jakub Kicinski Date: Fri Dec 9 20:06:34 2022 -0800 Merge tag 'ipsec-next-2022-12-09' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== ipsec-next 2022-12-09 1) Add xfrm packet offload core API. From Leon Romanovsky. 2) Add xfrm packet offload support for mlx5. From Leon Romanovsky and Raed Salem. 3) Fix a typto in a error message. From Colin Ian King. * tag 'ipsec-next-2022-12-09' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next: (38 commits) xfrm: Fix spelling mistake "oflload" -> "offload" net/mlx5e: Open mlx5 driver to accept IPsec packet offload net/mlx5e: Handle ESN update events net/mlx5e: Handle hardware IPsec limits events net/mlx5e: Update IPsec soft and hard limits net/mlx5e: Store all XFRM SAs in Xarray net/mlx5e: Provide intermediate pointer to access IPsec struct net/mlx5e: Skip IPsec encryption for TX path without matching policy net/mlx5e: Add statistics for Rx/Tx IPsec offloaded flows net/mlx5e: Improve IPsec flow steering autogroup net/mlx5e: Configure IPsec packet offload flow steering net/mlx5e: Use same coding pattern for Rx and Tx flows net/mlx5e: Add XFRM policy offload logic net/mlx5e: Create IPsec policy offload tables net/mlx5e: Generalize creation of default IPsec miss group and rule net/mlx5e: Group IPsec miss handles into separate struct net/mlx5e: Make clear what IPsec rx_err does net/mlx5e: Flatten the IPsec RX add rule path net/mlx5e: Refactor FTE setup code to be more clear net/mlx5e: Move IPsec flow table creation to separate function ... ==================== Link: https://lore.kernel.org/r/20221209093310.4018731-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit 5fc11a401a8dc491b326d2c916b07d22e7ac8833 Author: Gavrilov Ilia Date: Thu Dec 8 08:31:39 2022 +0000 net: devlink: Add missing error check to devlink_resource_put() When the resource size changes, the return value of the 'nla_put_u64_64bit' function is not checked. That has been fixed to avoid rechecking at the next step. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE. Note that this is harmless, we'd error out at the next put(). Signed-off-by: Ilia.Gavrilov Link: https://lore.kernel.org/r/20221208082821.3927937-1-Ilia.Gavrilov@infotecs.ru Signed-off-by: Jakub Kicinski net/core/devlink.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ce098da1497c6dee9589fce2c61d1910f4fcf0e7 Author: Kees Cook Date: Wed Dec 7 22:02:59 2022 -0800 skbuff: Introduce slab_build_skb() syzkaller reported: BUG: KASAN: slab-out-of-bounds in __build_skb_around+0x235/0x340 net/core/skbuff.c:294 Write of size 32 at addr ffff88802aa172c0 by task syz-executor413/5295 For bpf_prog_test_run_skb(), which uses a kmalloc()ed buffer passed to build_skb(). When build_skb() is passed a frag_size of 0, it means the buffer came from kmalloc. In these cases, ksize() is used to find its actual size, but since the allocation may not have been made to that size, actually perform the krealloc() call so that all the associated buffer size checking will be correctly notified (and use the "new" pointer so that compiler hinting works correctly). Split this logic out into a new interface, slab_build_skb(), but leave the original 0 checking for now to catch any stragglers. Reported-by: syzbot+fda18eaa8c12534ccb3b@syzkaller.appspotmail.com Link: https://groups.google.com/g/syzkaller-bugs/c/UnIKxTtU5-0/m/-wbXinkgAQAJ Fixes: 38931d8989b5 ("mm: Make ksize() a reporting-only function") Cc: Pavel Begunkov Cc: pepsipu Cc: syzbot+fda18eaa8c12534ccb3b@syzkaller.appspotmail.com Cc: Vlastimil Babka Cc: kasan-dev Cc: Andrii Nakryiko Cc: ast@kernel.org Cc: Daniel Borkmann Cc: Hao Luo Cc: Jesper Dangaard Brouer Cc: John Fastabend Cc: jolsa@kernel.org Cc: KP Singh Cc: martin.lau@linux.dev Cc: Stanislav Fomichev Cc: song@kernel.org Cc: Yonghong Song Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221208060256.give.994-kees@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnx2.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 2 +- include/linux/skbuff.h | 1 + net/bpf/test_run.c | 2 +- net/core/skbuff.c | 70 +++++++++++++++++++++++++++---- 5 files changed, 66 insertions(+), 11 deletions(-) commit 28d39503e4e06c2caf09a89865c81cfd9e4eae7c Author: Jiapeng Chong Date: Fri Dec 9 11:37:23 2022 +0800 net: bcmgenet: Remove the unused function The function dmadesc_get_addr() is defined in the bcmgenet.c file, but not called elsewhere, so remove this unused function. drivers/net/ethernet/broadcom/genet/bcmgenet.c:120:26: warning: unused function 'dmadesc_get_addr'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3401 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20221209033723.32452-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/genet/bcmgenet.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 2b53d8698a47a3f6879b3c5cd2a90906422971cc Merge: c80edd8d41d9 03e7d28cd25e Author: Jakub Kicinski Date: Fri Dec 9 19:46:14 2022 -0800 Merge branch 'mptcp-miscellaneous-cleanup' Mat Martineau says: ==================== mptcp: Miscellaneous cleanup Two code cleanup patches for the 6.2 merge window that don't change behavior: Patch 1 makes proper use of nlmsg_free(), as suggested by Jakub while reviewing f8c9dfbd875b ("mptcp: add pm listener events"). Patch 2 clarifies success status in a few mptcp functions, which prevents some smatch false positives. ==================== Link: https://lore.kernel.org/r/20221209004431.143701-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit 03e7d28cd25ee6ff731386fb154d03f76dede1cc Author: Matthieu Baerts Date: Thu Dec 8 16:44:31 2022 -0800 mptcp: return 0 instead of 'err' var When 'err' is 0, it looks clearer to return '0' instead of the variable called 'err'. The behaviour is then not modified, just a clearer code. By doing this, we can also avoid false positive smatch warnings like this one: net/mptcp/pm_netlink.c:1169 mptcp_pm_parse_pm_addr_attr() warn: missing error code? 'err' Reported-by: kernel test robot Reported-by: Dan Carpenter Suggested-by: Mat Martineau Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/pm_netlink.c | 4 ++-- net/mptcp/sockopt.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 8b34b52c1794932a16308631121b758830349ae9 Author: Geliang Tang Date: Thu Dec 8 16:44:30 2022 -0800 mptcp: use nlmsg_free instead of kfree_skb Use nlmsg_free() instead of kfree_skb() in pm_netlink.c. The SKB's have been created by nlmsg_new(). The proper cleaning way should then be done with nlmsg_free(). For the moment, nlmsg_free() is simply calling kfree_skb() so we don't change the behaviour here. Suggested-by: Jakub Kicinski Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/pm_netlink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c80edd8d41d9a7cd4ff6aa5e8f5d5b9d066f6984 Merge: 043cd1e204a0 4fe1b3a5f8fe Author: Jakub Kicinski Date: Fri Dec 9 19:44:42 2022 -0800 Merge tag 'mlx5-updates-2022-12-08' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2022-12-08 1) Support range match action in SW steering Yevgeny Kliteynik says: ======================= The following patch series adds support for a range match action in SW Steering. SW steering is able to match only on the exact values of the packet fields, as requested by the user: the user provides mask for the fields that are of interest, and the exact values to be matched on when the traffic is handled. The following patch series add new type of action - Range Match, where the user provides a field to be matched on and a range of values (min to max) that will be considered as hit. There are several new notions that were implemented in order to support Range Match: - MATCH_RANGES Steering Table Entry (STE): the new STE type that allows matching the packets' fields on the range of values instead of a specific value. - Match Definer: this is a general FW object that defines which fields in the packet will be referenced by the mask and tag of each STE. Match definer ID is part of STE fields, and it defines how the HW needs to interpret the STE's mask/tag values. Till now SW steering used the definers that were managed by FW and implemented the STE layout as described by the HW spec. Now that we're adding a new type of STE, SW steering needs to also be able to define this new STE's layout, and this is do ======================= 2) From OZ add support for meter mtu offload 2.1: Refactor the code to allow both metering and range post actions as a pre-step for adding police mtu offload support. 2.2: Instantiate mtu green/red flow tables with a single match-all rule. Add the green/red actions to the hit/miss table accordingly 2.3: Initialize the meter object with the TC police mtu parameter. Use the hardware range match action feature. 3) From MaorD, support routes with more than 2 nexthops in multipath 4) Michael and Or, improve and extend vport representor counters. * tag 'mlx5-updates-2022-12-08' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Expose steering dropped packets counter net/mlx5: Refactor and expand rep vport stat group net/mlx5e: multipath, support routes with more than 2 nexthops net/mlx5e: TC, add support for meter mtu offload net/mlx5e: meter, add mtu post meter tables net/mlx5e: meter, refactor to allow multiple post meter tables net/mlx5: DR, Add support for range match action net/mlx5: DR, Add function that tells if STE miss addr has been initialized net/mlx5: DR, Some refactoring of miss address handling net/mlx5: DR, Manage definers with refcounts net/mlx5: DR, Handle FT action in a separate function net/mlx5: DR, Rework is_fw_table function net/mlx5: DR, Add functions to create/destroy MATCH_DEFINER general object net/mlx5: fs, add match on ranges API net/mlx5: mlx5_ifc updates for MATCH_DEFINER general object ==================== Link: https://lore.kernel.org/r/20221209001420.142794-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 043cd1e204a02735228a4bcc1ef094b347b360bf Merge: 1933ea365aa7 95af1f1c4c9f Author: Jakub Kicinski Date: Fri Dec 9 19:42:16 2022 -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 2022-12-08 (ice) Jacob Keller says: This series of patches primarily consists of changes to fix some corner cases that can cause Tx timestamp failures. The issues were discovered and reported by Siddaraju DH and primarily affect E822 hardware, though this series also includes some improvements that affect E810 hardware as well. The primary issue is regarding the way that E822 determines when to generate timestamp interrupts. If the driver reads timestamp indexes which do not have a valid timestamp, the E822 interrupt tracking logic can get stuck. This is due to the way that E822 hardware tracks timestamp index reads internally. I was previously unaware of this behavior as it is significantly different in E810 hardware. Most of the fixes target refactors to ensure that the ice driver does not read timestamp indexes which are not valid on E822 hardware. This is done by using the Tx timestamp ready bitmap register from the PHY. This register indicates what timestamp indexes have outstanding timestamps waiting to be captured. Care must be taken in all cases where we read the timestamp registers, and thus all flows which might have read these registers are refactored. The ice_ptp_tx_tstamp function is modified to consolidate as much of the logic relating to these registers as possible. It now handles discarding stale timestamps which are old or which occurred after a PHC time update. This replaces previously standalone thread functions like the periodic work function and the ice_ptp_flush_tx_tracker function. In addition, some minor cleanups noticed while writing these refactors are included. The remaining patches refactor the E822 implementation to remove the "bypass" mode for timestamps. The E822 hardware has the ability to provide a more precise timestamp by making use of measurements of the precise way that packets flow through the hardware pipeline. These measurements are known as "Vernier" calibration. The "bypass" mode disables many of these measurements in favor of a faster start up time for Tx and Rx timestamping. Instead, once these measurements were captured, the driver tries to reconfigure the PHY to enable the vernier calibrations. Unfortunately this recalibration does not work. Testing indicates that the PHY simply remains in bypass mode without the increased timestamp precision. Remove the attempt at recalibration and always use vernier mode. This has one disadvantage that Tx and Rx timestamps cannot begin until after at least one packet of that type goes through the hardware pipeline. Because of this, further refactor the driver to separate Tx and Rx vernier calibration. Complete the Tx and Rx independently, enabling the appropriate type of timestamp as soon as the relevant packet has traversed the hardware pipeline. This was reported by Milena Olech. Note that although these might be considered "bug fixes", the required changes in order to appropriately resolve these issues is large. Thus it does not feel suitable to send this series to net. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: reschedule ice_ptp_wait_for_offset_valid during reset ice: make Tx and Rx vernier offset calibration independent ice: only check set bits in ice_ptp_flush_tx_tracker ice: handle flushing stale Tx timestamps in ice_ptp_tx_tstamp ice: cleanup allocations in ice_ptp_alloc_tx_tracker ice: protect init and calibrating check in ice_ptp_request_ts ice: synchronize the misc IRQ when tearing down Tx tracker ice: check Tx timestamp memory register for ready timestamps ice: handle discarding old Tx requests in ice_ptp_tx_tstamp ice: always call ice_ptp_link_change and make it void ice: fix misuse of "link err" with "link status" ice: Reset TS memory for all quads ice: Remove the E822 vernier "bypass" logic ice: Use more generic names for ice_ptp_tx fields ==================== Link: https://lore.kernel.org/r/20221208213932.1274143-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 3b91010500eba3601e906b0e92cf84fab4d895d1 Merge: e0ff42804233 4a7ba45b1a43 Author: Andrew Morton Date: Fri Dec 9 19:31:11 2022 -0800 Merge branch 'mm-hotfixes-stable' into mm-stable commit d01404fa7b8c72c7052232423f30a16060828f28 Merge: 59a582ad1381 26fb4b90b745 Author: Palmer Dabbelt Date: Fri Dec 9 18:14:28 2022 -0800 Merge patch series "riscv: alternative-macros.h cleanups" Andrew Jones says: This series is a collection of cleanups for alternative-macros.h with the main motivation being that adding new ALTERNATIVE_3, ALTERNATIVE_4, ... will be possible without lots of bloat. * b4-shazam-merge: riscv: Don't duplicate _ALTERNATIVE_CFG* macros riscv: alternatives: Drop the underscores from the assembly macro names riscv: alternatives: Don't name unused macro parameters riscv: Don't duplicate __ALTERNATIVE_CFG in __ALTERNATIVE_CFG_2 Link: https://lore.kernel.org/r/20221129150053.50464-1-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 59a582ad13813375e3e091df51f876fdb8b3f119 Merge: 6ff8ca3f93d3 9daaca4a44d6 Author: Palmer Dabbelt Date: Fri Dec 9 14:01:54 2022 -0800 Merge patch series "RISC-V: Ensure Zicbom has a valid block size" Andrew Jones says: When a DT puts zicbom in the isa string, but does not provide a block size, ALT_CMO_OP() will attempt to do cache operations on address zero since the start address will be ANDed with zero. We can't simply BUG() in riscv_init_cbom_blocksize() when we fail to find a block size because the failure will happen before logging works, leaving users to scratch their heads as to why the boot hung. Instead, ensure Zicbom is disabled and output an error which will hopefully alert people that the DT needs to be fixed. While at it, add a check that the block size is a power-of-2 too. * b4-shazam-merge: RISC-V: Ensure Zicbom has a valid block size RISC-V: Introduce riscv_isa_extension_check RISC-V: Improve use of isa2hwcap[] Link: https://lore.kernel.org/r/20221129143447.49714-1-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 9daaca4a44d6f0741060e67c54a0175c035edb1f Author: Andrew Jones Date: Tue Nov 29 15:34:47 2022 +0100 RISC-V: Ensure Zicbom has a valid block size When a DT puts zicbom in the isa string, but does not provide a block size, ALT_CMO_OP() will attempt to do cache operations on address zero since the start address will be ANDed with zero. We can't simply BUG() in riscv_init_cbom_blocksize() when we fail to find a block size because the failure will happen before logging works, leaving users to scratch their heads as to why the boot hung. Instead, ensure Zicbom is disabled and output an error which will hopefully alert people that the DT needs to be fixed. While at it, add a check that the block size is a power-of-2 too. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221129143447.49714-4-ajones@ventanamicro.com [Palmer: base on 5c20a3a9df19 ("RISC-V: Fix compilation without RISCV_ISA_ZICBOM"] Reported-by: kernel test robot Signed-off-by: Palmer Dabbelt arch/riscv/kernel/cpufeature.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit fb0ff0a95d61f69415cb8d8f2d921e1f7eed75af Author: Andrew Jones Date: Tue Nov 29 15:34:46 2022 +0100 RISC-V: Introduce riscv_isa_extension_check Currently any isa extension found in the isa string is set in the isa bitmap. An isa extension set in the bitmap indicates that the extension is present and may be used (a.k.a is enabled). However, when an extension cannot be used due to missing dependencies or errata it should not be added to the bitmap. Introduce a function where additional checks may be placed in order to determine if an extension should be enabled or not. Note, the checks may simply indicate an issue with the DT, but, since extensions may be used in early boot, it's not always possible to simply produce an error at the point the issue is determined. It's best to keep the extension disabled and produce an error. No functional change intended, as the function is only introduced and always returns true. A later patch will provide checks for an isa extension. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221129143447.49714-3-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/cpufeature.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 726855549cf8d5c6b05795cf74a9c23584f45544 Author: Andrew Jones Date: Tue Nov 29 15:34:45 2022 +0100 RISC-V: Improve use of isa2hwcap[] Improve isa2hwcap[] by removing it from static storage, as riscv_fill_hwcap() is only called once, and by reducing its size from 256 bytes to 26. The latter improvement is possible because isa2hwcap[] will never be indexed with capital letters and we can precompute the offsets from 'a'. No functional change intended. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221129143447.49714-2-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/cpufeature.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 26fb4b90b745a808e94a81dc732d440c285fa74b Author: Andrew Jones Date: Tue Nov 29 16:00:53 2022 +0100 riscv: Don't duplicate _ALTERNATIVE_CFG* macros Reduce clutter by only defining the _ALTERNATIVE_CFG* macros once, rather than once for assembly and once for C. To do that, we need to add __ALTERNATIVE_CFG* macros to the assembly side, but those are one-liners. Also take the opportunity to do a bit of reformatting, taking full advantage of the fact checkpatch gives us 100 char lines. Signed-off-by: Andrew Jones Tested-by: Lad Prabhakar Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221129150053.50464-5-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/alternative-macros.h | 53 +++++++++-------------------- 1 file changed, 17 insertions(+), 36 deletions(-) commit bb2efcde594628ae08ee6e4be51b2047df9d2d06 Author: Andrew Jones Date: Tue Nov 29 16:00:52 2022 +0100 riscv: alternatives: Drop the underscores from the assembly macro names The underscores aren't needed because there isn't anything already named without them and the _CFG extension. This is a bit of a cleanup by itself, but the real motivation is for a coming patch which would otherwise need to add two more underscores to these macro names, i.e. ____ALTERNATIVE_CFG, and that'd be gross. Signed-off-by: Andrew Jones Tested-by: Lad Prabhakar Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221129150053.50464-4-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/alternative-macros.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 7d52eace1bf5c55704bb0ca5dc8f2489927683ff Author: Andrew Jones Date: Tue Nov 29 16:00:51 2022 +0100 riscv: alternatives: Don't name unused macro parameters Without CONFIG_RISCV_ALTERNATIVE only the first parameter of the ALTERNATIVE macros is needed. Use ... for the rest to cut down on clutter. While there, fix a couple space vs. tab issues. Signed-off-by: Andrew Jones Tested-by: Lad Prabhakar Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221129150053.50464-3-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/alternative-macros.h | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 2ba8c7dc71c098935977528747b82ffae43f3f18 Author: Andrew Jones Date: Tue Nov 29 16:00:50 2022 +0100 riscv: Don't duplicate __ALTERNATIVE_CFG in __ALTERNATIVE_CFG_2 Build __ALTERNATIVE_CFG_2 by adding on to __ALTERNATIVE_CFG rather than duplicating it. Signed-off-by: Andrew Jones Tested-by: Lad Prabhakar Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221129150053.50464-2-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/alternative-macros.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit 4bf73588165ba7d32131a043775557a54b6e1db5 Author: Dmitry Goncharov Date: Mon Dec 5 16:48:19 2022 -0500 kbuild: Port silent mode detection to future gnu make. Port silent mode detection to the future (post make-4.4) versions of gnu make. Makefile contains the following piece of make code to detect if option -s is specified on the command line. ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) This code is executed by make at parse time and assumes that MAKEFLAGS does not contain command line variable definitions. Currently if the user defines a=s on the command line, then at build only time MAKEFLAGS contains " -- a=s". However, starting with commit dc2d963989b96161472b2cd38cef5d1f4851ea34 MAKEFLAGS contains command line definitions at both parse time and build time. This '-s' detection code then confuses a command line variable definition which contains letter 's' with option -s. $ # old make $ make net/wireless/ocb.o a=s CALL scripts/checksyscalls.sh DESCEND objtool $ # this a new make which defines makeflags at parse time $ ~/src/gmake/make/l64/make net/wireless/ocb.o a=s $ We can see here that the letter 's' from 'a=s' was confused with -s. This patch checks for presence of -s using a method recommended by the make manual here https://www.gnu.org/software/make/manual/make.html#Testing-Flags. Link: https://lists.gnu.org/archive/html/bug-make/2022-11/msg00190.html Reported-by: Jan Palus Signed-off-by: Dmitry Goncharov Signed-off-by: Masahiro Yamada Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 9edb4fd3d70a9dffd8ac6af6d060e97672b4a22f Author: Thomas Weißschuh Date: Sat Nov 26 06:10:01 2022 +0100 init/version.c: remove #include Commit 2df8220cc511 ("kbuild: build init/built-in.a just once") moved the usage of the define UTS_RELEASE to the file version-timestamp.c. version-timestamp.c in turn is included from version.c but already includes utsrelease.h itself properly. The unneeded include of utsrelease.h from version.c can be dropped. Fixes: 2df8220cc511 ("kbuild: build init/built-in.a just once") Signed-off-by: Thomas Weißschuh Signed-off-by: Masahiro Yamada init/version.c | 1 - 1 file changed, 1 deletion(-) commit bd328def2f987ebd4e20725a490f005556d737bf Author: Thomas Weißschuh Date: Sat Nov 26 06:09:59 2022 +0100 firmware_loader: remove #include utsrelease.h is potentially generated on each build. By removing this unused include we can get rid of some spurious recompilations. Signed-off-by: Thomas Weißschuh Reviewed-by: Russ Weight Signed-off-by: Masahiro Yamada drivers/base/firmware_loader/firmware.h | 2 -- 1 file changed, 2 deletions(-) commit 124011e6e933bead5852c3f69b32dec43919fe1a Author: Li Zhijian Date: Tue Dec 6 21:02:01 2022 +0800 RDMA/rxe: Enable RDMA FLUSH capability for rxe device Now we are ready to enable RDMA FLUSH capability for RXE. It can support Global Visibility and Persistence placement types. Link: https://lore.kernel.org/r/20221206130201.30986-11-lizhijian@fujitsu.com Reviewed-by: Zhu Yanjun Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_param.h | 2 ++ 1 file changed, 2 insertions(+) commit 8b4d379b399d19f4c803e565bfe13f07b66b5ad7 Author: Li Zhijian Date: Tue Dec 6 21:02:00 2022 +0800 RDMA/cm: Make QP FLUSHABLE for supported device Similar to RDMA and Atomic qp attributes enabled by default in CM, enable FLUSH attribute for supported device. That makes applications that are built with rdma_create_ep, rdma_accept APIs have FLUSH qp attribute natively so that user is able to request FLUSH operation simpler. Note that, a FLUSH operation requires FLUSH are supported by both device(HCA) and memory region(MR) and QP at the same time, so it's safe to enable FLUSH qp attribute by default here. FLUSH attribute can be disable by modify_qp() interface. Link: https://lore.kernel.org/r/20221206130201.30986-10-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 70aad902ce8aeb094dd3ef14988a652f24cce7c8 Author: Li Zhijian Date: Tue Dec 6 21:01:59 2022 +0800 RDMA/rxe: Implement flush completion Per IBA SPEC, FLUSH will ack in rdma read response with 0 length. Use IB_WC_FLUSH (aka IB_UVERBS_WC_FLUSH) code to tell userspace a FLUSH completion. Link: https://lore.kernel.org/r/20221206130201.30986-9-lizhijian@fujitsu.com Reviewed-by: Zhu Yanjun Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_comp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ea1bb00ee9a5527b032a6efebe4a879db4cb42bb Author: Li Zhijian Date: Tue Dec 6 21:01:58 2022 +0800 RDMA/rxe: Implement flush execution in responder side Only the requested placement types that also registered in the destination memory region are acceptable. Otherwise, responder will also reply NAK "Remote Access Error" if it found a placement type violation. We will persist data via arch_wb_cache_pmem(), which could be architecture specific. This commit also adds 2 helpers to update qp.resp from the incoming packet. Link: https://lore.kernel.org/r/20221206130201.30986-8-lizhijian@fujitsu.com Reviewed-by: Zhu Yanjun Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_loc.h | 1 + drivers/infiniband/sw/rxe/rxe_mr.c | 36 ++++++++ drivers/infiniband/sw/rxe/rxe_resp.c | 160 +++++++++++++++++++++++++++++----- drivers/infiniband/sw/rxe/rxe_verbs.h | 6 ++ 4 files changed, 183 insertions(+), 20 deletions(-) commit fa1fd682ad3ef35b0e532c3bb14140786d17527c Author: Li Zhijian Date: Tue Dec 6 21:01:57 2022 +0800 RDMA/rxe: Implement RC RDMA FLUSH service in requester side Implement FLUSH request operation in the requester. Link: https://lore.kernel.org/r/20221206130201.30986-7-lizhijian@fujitsu.com Reviewed-by: Zhu Yanjun Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_req.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 02e9a31c897d17981508ceaac4430b93ff56ffc7 Author: Li Zhijian Date: Tue Dec 6 21:01:56 2022 +0800 RDMA/rxe: Extend rxe packet format to support flush Extend rxe opcode tables, headers, helper and constants to support flush operations. Refer to the IBA A19.4.1 for more FETH definition details Link: https://lore.kernel.org/r/20221206130201.30986-6-lizhijian@fujitsu.com Reviewed-by: Zhu Yanjun Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_hdr.h | 47 ++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rxe/rxe_opcode.c | 17 ++++++++++++ drivers/infiniband/sw/rxe/rxe_opcode.h | 14 ++++++---- 3 files changed, 73 insertions(+), 5 deletions(-) commit 02ea0a511558c907bde0e01fdebcd4536924d996 Author: Li Zhijian Date: Tue Dec 6 21:01:55 2022 +0800 RDMA/rxe: Allow registering persistent flag for pmem MR only Memory region could support at most 2 flush access flags: IB_ACCESS_FLUSH_PERSISTENT and IB_ACCESS_FLUSH_GLOBAL But we only allow user to register persistent flush flags to the pmem MR where it has the ability of persisting data across power cycles. So registering a persistent access flag to a non-pmem MR will be rejected. Link: https://lore.kernel.org/r/20221206130201.30986-5-lizhijian@fujitsu.com CC: Dan Williams Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_mr.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 668ce52d5eef477c0def757610768a1a3ccc9785 Author: Li Zhijian Date: Tue Dec 6 21:01:54 2022 +0800 RDMA/rxe: Extend rxe user ABI to support flush This commit extends the rxe user ABI to support the flush operation defined in IBA A19.4.1. These changes are backward compatible with the existing rxe user ABI. The user API request a flush by filling this structure. Link: https://lore.kernel.org/r/20221206130201.30986-4-lizhijian@fujitsu.com Reviewed-by: Zhu Yanjun Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe include/uapi/rdma/rdma_user_rxe.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 208e3a134b50d95ea3962d7a37b4d8a8f5368376 Author: Li Zhijian Date: Tue Dec 6 21:01:53 2022 +0800 RDMA: Extend RDMA kernel verbs ABI to support flush This commit extends the RDMA kernel verbs ABI to support the flush operation defined in IBA A19.4.1. These changes are backward compatible with the existing RDMA kernel verbs ABI. It makes device/HCA support new FLUSH attributes/capabilities, and it also makes memory region support new FLUSH access flags. Users can use ibv_reg_mr(3) to register flush access flags. Only the access flags also supported by device's capabilities can be registered successfully. Once registered successfully, it means the MR is flushable. Similarly, A flushable MR should also have one or both of GLOBAL_VISIBILITY and PERSISTENT attributes/capabilities like device/HCA. Link: https://lore.kernel.org/r/20221206130201.30986-3-lizhijian@fujitsu.com Reviewed-by: Zhu Yanjun Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe include/rdma/ib_pack.h | 3 +++ include/rdma/ib_verbs.h | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) commit 0c17da492dc6c33cc5b99633adb4bd7b2587153c Author: Li Zhijian Date: Tue Dec 6 21:01:52 2022 +0800 RDMA: Extend RDMA user ABI to support flush This commit extends the RDMA user ABI to support the flush operation defined in IBA A19.4.1. These changes are backward compatible with the existing RDMA user ABI. Link: https://lore.kernel.org/r/20221206130201.30986-2-lizhijian@fujitsu.com Reviewed-by: Zhu Yanjun Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe include/uapi/rdma/ib_user_ioctl_verbs.h | 2 ++ include/uapi/rdma/ib_user_verbs.h | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) commit 689c5421bfe0eac65526bd97a466b9590a6aad3c Author: Bob Pearson Date: Thu Dec 8 15:09:46 2022 -0600 RDMA/rxe: Fix incorrect responder length checking The code in rxe_resp.c at check_length() is incorrect as it compares pkt->opcode an 8 bit value against various mask bits which are all higher than 256 so nothing is ever reported. This patch rewrites this to compare against pkt->mask which is correct. However this now exposes another error. For UD send packets the value of the pmtu cannot be determined from qp->mtu. All that is required here is to later check if the payload fits into the posted receive buffer in that case. Fixes: 837a55847ead ("RDMA/rxe: Implement packet length validation on responder") Link: https://lore.kernel.org/r/20221208210945.28607-1-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Reviewed-by: Daisuke Matsuda Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_resp.c | 62 +++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 26 deletions(-) commit afc70ccb962861e068e04c6089827493f5160a0a Author: Daniel Bristot de Oliveira Date: Fri Nov 11 16:53:07 2022 +0100 Documentation/rv: Add verification/rv man pages Add man pages for the rv command line, using the same scheme we used in rtla. Link: https://lkml.kernel.org/r/e841d7cfbdfc3ebdaf7cbd40278571940145d829.1668180100.git.bristot@kernel.org Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) Documentation/tools/index.rst | 1 + Documentation/tools/rv/Makefile | 52 ++++++++++++++++++++++++ Documentation/tools/rv/common_appendix.rst | 16 ++++++++ Documentation/tools/rv/common_ikm.rst | 21 ++++++++++ Documentation/tools/rv/index.rst | 24 ++++++++++++ Documentation/tools/rv/rv-list.rst | 43 ++++++++++++++++++++ Documentation/tools/rv/rv-mon-wip.rst | 44 +++++++++++++++++++++ Documentation/tools/rv/rv-mon-wwnr.rst | 43 ++++++++++++++++++++ Documentation/tools/rv/rv-mon.rst | 55 ++++++++++++++++++++++++++ Documentation/tools/rv/rv.rst | 63 ++++++++++++++++++++++++++++++ tools/verification/rv/Makefile | 26 +++++++++++- 11 files changed, 386 insertions(+), 2 deletions(-) commit 6d60f89691fc979e55b88508f4cfa8f6b4c56eac Author: Daniel Bristot de Oliveira Date: Fri Nov 11 16:53:06 2022 +0100 tools/rv: Add in-kernel monitor interface Add the ability to control and trace in-kernel monitors. This is a generic interface, it will check for existing monitors and enable standard setup, like enabling reactors. For example: # rv list wip wakeup in preemptive per-cpu testing monitor. [OFF] wwnr wakeup while not running per-task testing model. [OFF] # rv mon wwnr --help rv version 6.1.0-rc4: help usage: rv mon wwnr [-h] [-q] [-r reactor] [-s] [-v] -h/--help: print this menu and the reactor list -r/--reactor 'reactor': enables the 'reactor' -s/--self: when tracing (-t), also trace rv command -t/--trace: trace monitor's event -v/--verbose: print debug messages available reactors: nop printk panic # rv mon wwnr --trace -PID [CPU] TYPE ID STATE x EVENT -> NEXT_STATE FINAL | | | | | | | | | rv-3613 [001] event 3613 running x switch_out -> not_running Y sshd-1248 [005] event 1248 running x switch_out -> not_running Y -0 [005] event 71 not_running x wakeup -> not_running Y -0 [005] event 71 not_running x switch_in -> running N kcompactd0-71 [005] event 71 running x switch_out -> not_running Y -0 [000] event 860 not_running x wakeup -> not_running Y -0 [000] event 860 not_running x switch_in -> running N systemd-oomd-860 [000] event 860 running x switch_out -> not_running Y -0 [000] event 860 not_running x wakeup -> not_running Y -0 [000] event 860 not_running x switch_in -> running N systemd-oomd-860 [000] event 860 running x switch_out -> not_running Y -0 [005] event 71 not_running x wakeup -> not_running Y -0 [005] event 71 not_running x switch_in -> running N kcompactd0-71 [005] event 71 running x switch_out -> not_running Y -0 [000] event 860 not_running x wakeup -> not_running Y -0 [000] event 860 not_running x switch_in -> running N systemd-oomd-860 [000] event 860 running x switch_out -> not_running Y -0 [001] event 3613 not_running x wakeup -> not_running Y Link: https://lkml.kernel.org/r/1e57547e3acadda6e23949b2672c89e76ec2ec42.1668180100.git.bristot@kernel.org Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) tools/verification/rv/include/in_kernel.h | 3 + tools/verification/rv/src/in_kernel.c | 698 ++++++++++++++++++++++++++++++ tools/verification/rv/src/rv.c | 3 + 3 files changed, 704 insertions(+) commit 4bc4b131d44c8ead00130fae678ff6c3417d7e13 Author: Daniel Bristot de Oliveira Date: Fri Nov 11 16:53:05 2022 +0100 rv: Add rv tool This is the (user-space) runtime verification tool, named rv. This tool aims to be the interface for in-kernel rv monitors, as well as the home for monitors in user-space (online asynchronous), and in *eBPF. The tool receives a command as the first argument, the current commands are: list - list all available monitors mon - run a given monitor Each monitor is an independent piece of software inside the tool and can have their own arguments. There is no monitor implemented in this patch, it only adds the basic structure of the tool, based on rtla. # rv --help rv version 6.1.0-rc4: help usage: rv command [-h] [command_options] -h/--help: print this menu command: run one of the following command: list: list all available monitors mon: run a monitor [command options]: each command has its own set of options run rv command -h for further information *dot2bpf is the next patch set, depends on this, doing cleanups. Link: https://lkml.kernel.org/r/fb51184f3b95aea0d7bfdc33ec09f4153aee84fa.1668180100.git.bristot@kernel.org Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) tools/verification/rv/Makefile | 119 ++++++++++++++++++++++ tools/verification/rv/README.txt | 38 +++++++ tools/verification/rv/include/rv.h | 12 +++ tools/verification/rv/include/trace.h | 16 +++ tools/verification/rv/include/utils.h | 8 ++ tools/verification/rv/src/rv.c | 185 ++++++++++++++++++++++++++++++++++ tools/verification/rv/src/trace.c | 133 ++++++++++++++++++++++++ tools/verification/rv/src/utils.c | 47 +++++++++ 8 files changed, 558 insertions(+) commit 4c6874374859d89aa6a75019bb0a913369e472c9 Author: John Kacur Date: Mon Nov 7 09:43:13 2022 -0500 rtla: Fix exit status when returning from calls to usage() rtla_usage(), osnoise_usage() and timerlat_usage() all exit with an error status. However when these are called from help, they should exit with a non-error status. Fix this by passing the exit status to the functions. Note, although we remove the subsequent call to exit after calling usage, we leave it in at the end of a function to suppress the compiler warning "control reaches end of a non-void function". Link: https://lkml.kernel.org/r/20221107144313.22470-1-jkacur@redhat.com Signed-off-by: John Kacur Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/osnoise.c | 9 ++++----- tools/tracing/rtla/src/rtla.c | 12 +++++------- tools/tracing/rtla/src/timerlat.c | 9 ++++----- 3 files changed, 13 insertions(+), 17 deletions(-) commit 4c587a982603d7e7e751b4925809a1512099a690 Author: Ladislav Michl Date: Thu Dec 8 12:25:57 2022 +0100 MIPS: OCTEON: warn only once if deprecated link status is being used Avoid flooding kernel log with warnings. Fixes: 2c0756d306c2 ("MIPS: OCTEON: warn if deprecated link status is being used") Signed-off-by: Ladislav Michl Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 2 +- arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ee9ef11bd2a59c2fefaa0959e5efcdf040d7c654 Author: Anastasia Belova Date: Fri Dec 9 13:05:50 2022 +0300 MIPS: BCM63xx: Add check for NULL for clk in clk_enable Check clk for NULL before calling clk_enable_unlocked where clk is dereferenced. There is such check in other implementations of clk_enable. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.") Signed-off-by: Anastasia Belova Reviewed-by: Philippe Mathieu-Daudé Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer arch/mips/bcm63xx/clk.c | 2 ++ 1 file changed, 2 insertions(+) commit 03871060e458e1d8bdc37a245c22ba842000c87b Author: Alexander Stein Date: Thu Dec 8 15:08:40 2022 +0100 dt-bindings: lcdif: Fix constraints for imx8mp i.MX8MP uses 3 clocks, so soften the restrictions for clocks & clock-names. This SoC requires a power-domain for this peripheral to use. Add it as a required property. Fixes: f5419cb0743f ("dt-bindings: lcdif: Add compatible for i.MX8MP") Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20221208140840.3227035-1-alexander.stein@ew.tq-group.com Signed-off-by: Rob Herring .../devicetree/bindings/display/fsl,lcdif.yaml | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 0bf99c1f066cef596b6fa668676ccba09f86fea1 Author: Rob Herring Date: Wed Dec 7 14:44:06 2022 -0600 media: dt-bindings: atmel,isc: Drop unneeded unevaluatedProperties The 'port' node schema has both 'additionalProperties' and 'unevaluatedProperties', but only one is necessary. 'additionalProperties' works here, so drop 'unevaluatedProperties' and move 'additionalProperties' next to the $ref. Link: https://lore.kernel.org/r/20221207204406.2810864-1-robh@kernel.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/media/atmel,isc.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1d4624cd72b912b2680c08d0be48338a1629a858 Author: Alex Deucher Date: Mon Nov 21 15:52:19 2022 -0500 drm/amdgpu: handle polaris10/11 overlap asics (v2) Some special polaris 10 chips overlap with the polaris11 DID range. Handle this properly in the driver. v2: use local flags for other function calls. Acked-by: Luben Tuikov Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 81d0bcf9900932633d270d5bc4a54ff599c6ebdb Author: Alex Deucher Date: Wed Dec 7 11:08:53 2022 -0500 drm/amdgpu: make display pinning more flexible (v2) Only apply the static threshold for Stoney and Carrizo. This hardware has certain requirements that don't allow mixing of GTT and VRAM. Newer asics do not have these requirements so we should be able to be more flexible with where buffers end up. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2270 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2291 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2255 Acked-by: Luben Tuikov Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2165359b7ed4e0b93fc23f49ede38d76e91fffe1 Author: Colin Ian King Date: Thu Dec 8 12:18:54 2022 +0000 drm/amd/display: Fix spelling mistake: "dram_clk_chanage" -> "dram_clk_change" There is a spelling mistake in the struct field dram_clk_chanage. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer_debug.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) commit 6ff8ca3f93d3cd2a77f051d2d971cf3638d39546 Author: Qinglin Pan Date: Mon Nov 28 10:36:43 2022 +0800 riscv: mm: call best_map_size many times during linear-mapping Modify the best_map_size function to give map_size many times instead of only once, so a memory region can be mapped by both PMD_SIZE and PAGE_SIZE. Signed-off-by: Qinglin Pan Reviewed-by: Andrew Jones Reviewed-by: Alexandre Ghiti Tested-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20221128023643.329091-1-panqinglin2020@iscas.ac.cn Signed-off-by: Palmer Dabbelt arch/riscv/mm/init.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d4d4c6fbae3837623708594a7499f40673fb0692 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 (cherry picked from commit 95c713d722017b26e301303713d638e0b95b1f68) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_perf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 449a0ef584d42ed24b7432c899863eaabe2583b5 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 (cherry picked from commit 955f4d7176eb154db587ae162ec2b392dc8d5f27) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_uncore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c1da39008fee00596ed33baeacaffa0dc62df25 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: 41f425adbce9 ("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 (cherry picked from commit 03b713d029bd17a1ed426590609af79843db95e2) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3282a549cf9b300e2d1b007925ed007ab24e4131 Author: Daisuke Matsuda Date: Fri Dec 9 13:59:26 2022 +0900 RDMA/rxe: Fix oops with zero length reads The commit 686d348476ee ("RDMA/rxe: Remove unnecessary mr testing") causes a kernel crash. If responder get a zero-byte RDMA Read request, qp->resp.mr is not set in check_rkey() (see IBA C9-88). The mr is NULL in this case, and a NULL pointer dereference occurs as shown below. BUG: kernel NULL pointer dereference, address: 0000000000000010 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP PTI CPU: 2 PID: 3622 Comm: python3 Kdump: loaded Not tainted 6.1.0-rc3+ #34 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:__rxe_put+0xc/0x60 [rdma_rxe] Code: cc cc cc 31 f6 e8 64 36 1b d3 41 b8 01 00 00 00 44 89 c0 c3 cc cc cc cc 41 89 c0 eb c1 90 0f 1f 44 00 00 41 54 b8 ff ff ff ff 0f c1 47 10 83 f8 01 74 11 45 31 e4 85 c0 7e 20 44 89 e0 41 5c RSP: 0018:ffffb27bc012ce78 EFLAGS: 00010246 RAX: 00000000ffffffff RBX: ffff9790857b0580 RCX: 0000000000000000 RDX: ffff979080fe145a RSI: 000055560e3e0000 RDI: 0000000000000000 RBP: ffff97909c7dd800 R08: 0000000000000001 R09: e7ce43d97f7bed0f R10: ffff97908b29c300 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: ffff97908b29c300 R15: 0000000000000000 FS: 00007f276f7bd740(0000) GS:ffff9792b5c80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 0000000114230002 CR4: 0000000000060ee0 Call Trace: read_reply+0xda/0x310 [rdma_rxe] rxe_responder+0x82d/0xe50 [rdma_rxe] do_task+0x84/0x170 [rdma_rxe] tasklet_action_common.constprop.0+0xa7/0x120 __do_softirq+0xcb/0x2ac do_softirq+0x63/0x90 Support a NULL mr during read_reply() Fixes: 686d348476ee ("RDMA/rxe: Remove unnecessary mr testing") Fixes: b5f9a01fae42 ("RDMA/rxe: Fix mr leak in RESPST_ERR_RNR") Link: https://lore.kernel.org/r/20221209045926.531689-1-matsuda-daisuke@fujitsu.com Link: https://lore.kernel.org/r/20221202145713.13152-1-lizhijian@fujitsu.com Signed-off-by: Daisuke Matsuda Signed-off-by: Li Zhijian Reviewed-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_resp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d69e8c63fcbbf695ff7ff2c6d26efead23cfbb3a Merge: 6cfe7bd0dfd3 76dcd734eca2 Author: Jason Gunthorpe Date: Fri Dec 9 15:52:17 2022 -0400 Merge tag 'v6.1-rc8' into rdma.git for-next For dependencies in following patches Signed-off-by: Jason Gunthorpe commit d6c55c0a20e5059abdde81713ddf6324a946eb3c Author: Jason Gunthorpe Date: Wed Dec 7 16:44:43 2022 -0400 iommufd: Change the order of MSI setup Eric points out this is wrong for the rare case of someone using allow_unsafe_interrupts on ARM. We always have to setup the MSI window in the domain if the iommu driver asks for it. Move the iommu_get_msi_cookie() setup to the top of the function and always do it, regardless of the security mode. Add checks to iommufd_device_setup_msi() to ensure the driver is not doing something incomprehensible. No current driver will set both a HW and SW MSI window, or have more than one SW MSI window. Fixes: e8d57210035b ("iommufd: Add kAPI toward external drivers for physical devices") Link: https://lore.kernel.org/r/3-v1-0362a1a1c034+98-iommufd_fixes1_jgg@nvidia.com Reviewed-by: Kevin Tian Reported-by: Eric Auger Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/device.c | 56 ++++++++++++++++-------------------- drivers/iommu/iommufd/io_pagetable.c | 24 +++++++++------- 2 files changed, 39 insertions(+), 41 deletions(-) commit a26fa392068d1dcdf781397b7a7dd908dd68f030 Author: Jason Gunthorpe Date: Wed Dec 7 16:44:42 2022 -0400 iommufd: Improve a few unclear bits of code Correct a few items noticed late in review: - We should assert that the math in batch_clear_carry() doesn't underflow - user->locked should be -1 not 0 sicne we just did mmput - npages should not have been recalculated, it already has that value No functional change. Fixes: 8d160cd4d506 ("iommufd: Algorithms for PFN storage") Link: https://lore.kernel.org/r/2-v1-0362a1a1c034+98-iommufd_fixes1_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Reported-by: Binbin Wu Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/pages.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c9b8a83a8f2dca9f82288a621595a6a5970cdc5e Author: Jason Gunthorpe Date: Wed Dec 7 16:44:41 2022 -0400 iommufd: Fix comment typos Repair some typos in comments that were noticed late in the review cycle. Fixes: f394576eb11d ("iommufd: PFN handling for iopt_pages") Link: https://lore.kernel.org/r/1-v1-0362a1a1c034+98-iommufd_fixes1_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Reported-by: Binbin Wu Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/io_pagetable.h | 2 +- drivers/iommu/iommufd/pages.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 5e57aaa8b6ec038940c2258b803c53f08a65d1f0 Author: Randy Dunlap Date: Thu Dec 8 16:20:16 2022 -0800 clk: nomadik: correct struct name kernel-doc warning Use the correct struct name for the kernel-doc notation to prevent a kernel-doc warning: clk-nomadik.c:148: warning: expecting prototype for struct clk_pll1. Prototype was for struct clk_pll instead Fixes: ef6eb322ce57 ("clk: nomadik: implement the Nomadik clocks properly") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Mauro Carvalho Chehab Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Link: https://lore.kernel.org/r/20221209002016.14776-1-rdunlap@infradead.org Signed-off-by: Stephen Boyd drivers/clk/clk-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3212ad5b7e93c002bd2dbe552c2b0b0033317ff Author: Donald Hunter Date: Fri Dec 9 11:24:01 2022 +0000 docs/bpf: Add documentation for BPF_MAP_TYPE_SK_STORAGE Add documentation for the BPF_MAP_TYPE_SK_STORAGE including kernel version introduced, usage and examples. Signed-off-by: Donald Hunter Acked-by: David Vernet Link: https://lore.kernel.org/r/20221209112401.69319-1-donald.hunter@gmail.com Signed-off-by: Alexei Starovoitov Documentation/bpf/map_sk_storage.rst | 155 +++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) commit 69af4bcaa08d06fd4d788a7f7193fb3c40ac6aba Author: William Breathitt Gray Date: Tue Nov 22 02:10:59 2022 -0500 regmap-irq: Add handle_mask_sync() callback Provide a public callback handle_mask_sync() that drivers can use when they have more complex IRQ masking logic. The default implementation is regmap_irq_handle_mask_sync(), used if the chip doesn't provide its own callback. Cc: Mark Brown Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/e083474b3d467a86e6cb53da8072de4515bd6276.1669100542.git.william.gray@linaro.org Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 44 ++++++++++++++++++++++++++++------------ include/linux/regmap.h | 5 +++++ 2 files changed, 36 insertions(+), 13 deletions(-) commit 3cf241c3d56ff19f5192cb42a025bc6582b6e8fa Author: Rob Herring Date: Fri Dec 9 11:16:43 2022 -0600 spi: dt-bindings: Convert Synquacer SPI to DT schema Convert the Socionext Synquacer SPI binding to DT format. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20221209171644.3351787-1-robh@kernel.org Signed-off-by: Mark Brown .../bindings/spi/socionext,synquacer-spi.yaml | 73 ++++++++++++++++++++++ .../devicetree/bindings/spi/spi-synquacer.txt | 27 -------- MAINTAINERS | 2 +- 3 files changed, 74 insertions(+), 28 deletions(-) commit 577cc1434e4cc1342c3df6d6a3c85136ab335c81 Author: Roberto Sassu Date: Fri Dec 9 09:29:35 2022 +0100 lsm: Fix description of fs_context_parse_param The fs_context_parse_param hook already has a description, which seems the right one according to the code. Fixes: 8eb687bc8069 ("lsm: Add/fix return values in lsm_hooks.h and fix formatting") Signed-off-by: Roberto Sassu Signed-off-by: Paul Moore include/linux/lsm_hooks.h | 3 --- 1 file changed, 3 deletions(-) commit fd3dc56253acbe9c641a66d312d8393cd55eb04c Author: Steven Rostedt (Google) Date: Fri Dec 9 10:52:47 2022 -0500 ftrace/x86: Add back ftrace_expected for ftrace bug reports After someone reported a bug report with a failed modification due to the expected value not matching what was found, it came to my attention that the ftrace_expected is no longer set when that happens. This makes for debugging the issue a bit more difficult. Set ftrace_expected to the expected code before calling ftrace_bug, so that it shows what was expected and why it failed. Link: https://lore.kernel.org/all/CA+wXwBQ-VhK+hpBtYtyZP-NiX4g8fqRRWithFOHQW-0coQ3vLg@mail.gmail.com/ Link: https://lore.kernel.org/linux-trace-kernel/20221209105247.01d4e51d@gandalf.local.home Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: "x86@kernel.org" Cc: Borislav Petkov Cc: Ingo Molnar Cc: stable@vger.kernel.org Fixes: 768ae4406a5c ("x86/ftrace: Use text_poke()") Signed-off-by: Steven Rostedt (Google) arch/x86/kernel/ftrace.c | 2 ++ 1 file changed, 2 insertions(+) commit 18a207849218d8c15072f449e6d0b901262290c9 Merge: ebe11732838f 83571a438903 Author: Thomas Gleixner Date: Fri Dec 9 16:41:58 2022 +0100 Merge tag 'timers-v6.2-rc1' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevent/source driver updates from Daniel Lezcano: - Add DT bindings for the Rockchip rk3128 timer (Johan Jonker) - Change the DT bindings for the npcm7xx timer in order to specify multiple clocks and enable the clock for the timer1 on WPCM450 (Jonathan Neuschäfer) - Fix the timer duration being too long the ARM architected timer in order to prevent an integer overflow leading to a negative value and an immediate interruption (Joe Korty) - Fix an unused pointer warning reported by lkp and some cleanups in the timer TI dm (Tony Lindgren) - Fix a missing call to clk_disable_unprepare() in the error path at init time on the timer TI dm (Yang Yingliang) - Use kstrtobool() instead of strtobool() in the ARM architected timer (Christophe JAILLET) - Add DT bindings for r8a779g0 on Renesas platform (Wolfram Sang) Link: https://lore.kernel.org/all/3c4c3bb2-b849-0c87-0948-8a36984bdde4@linaro.org commit 45be2ad007a9c6bea70249c4cf3e4905afe4caeb Author: Nathan Chancellor Date: Tue Nov 8 17:03:07 2022 -0700 x86/vdso: Conditionally export __vdso_sgx_enter_enclave() Recently, ld.lld moved from '--undefined-version' to '--no-undefined-version' as the default, which breaks building the vDSO when CONFIG_X86_SGX is not set: ld.lld: error: version script assignment of 'LINUX_2.6' to symbol '__vdso_sgx_enter_enclave' failed: symbol not defined __vdso_sgx_enter_enclave is only included in the vDSO when CONFIG_X86_SGX is set. Only export it if it will be present in the final object, which clears up the error. Fixes: 8466436952017 ("x86/vdso: Implement a vDSO for Intel SGX enclave call") Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Gleixner Reviewed-by: Nick Desaulniers Link: https://github.com/ClangBuiltLinux/linux/issues/1756 Link: https://lore.kernel.org/r/20221109000306.1407357-1-nathan@kernel.org arch/x86/entry/vdso/vdso.lds.S | 2 ++ 1 file changed, 2 insertions(+) commit 1f3868f06855c97a4954c99b36f3fc9eb8f60326 Author: Jan Kara Date: Thu Dec 8 13:03:30 2022 +0100 udf: Fix extending file within last block When extending file within last block it can happen that the extent is already rounded to the blocksize and thus contains the offset we want to grow up to. In such case we would mistakenly expand the last extent and make it one block longer than it should be, exposing unallocated block in a file and causing data corruption. Fix the problem by properly detecting this case and bailing out. CC: stable@vger.kernel.org Signed-off-by: Jan Kara fs/udf/inode.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 16d0556568148bdcaa45d077cac9f8f7077cf70a Author: Jan Kara Date: Wed Dec 7 18:17:34 2022 +0100 udf: Discard preallocation before extending file with a hole When extending file with a hole, we tried to preserve existing preallocation for the file. However that is not very useful and complicates code because the previous extent may need to be rounded to block boundary as well (which we forgot to do thus causing data corruption for sequence like: xfs_io -f -c "pwrite 0x75e63 11008" -c "truncate 0x7b24b" \ -c "truncate 0xabaa3" -c "pwrite 0xac70b 22954" \ -c "pwrite 0x93a43 11358" -c "pwrite 0xb8e65 52211" file with 512-byte block size. Just discard preallocation before extending file to simplify things and also fix this data corruption. CC: stable@vger.kernel.org Signed-off-by: Jan Kara fs/udf/inode.c | 46 ++++++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) commit 6ad53f0f71c52871202a7bf096feb2c59db33fc5 Author: Jan Kara Date: Wed Dec 7 17:34:33 2022 +0100 udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size If rounded block-rounded i_lenExtents matches block rounded i_size, there are no preallocation extents. Do not bother walking extent linked list. CC: stable@vger.kernel.org Signed-off-by: Jan Kara fs/udf/truncate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cfe4c1b25dd6d2f056afc00b7c98bcb3dd0b1fc3 Author: Jan Kara Date: Wed Dec 7 17:25:10 2022 +0100 udf: Fix preallocation discarding at indirect extent boundary When preallocation extent is the first one in the extent block, the code would corrupt extent tree header instead. Fix the problem and use udf_delete_aext() for deleting extent to avoid some code duplication. CC: stable@vger.kernel.org Signed-off-by: Jan Kara fs/udf/truncate.c | 45 +++++++++++++-------------------------------- 1 file changed, 13 insertions(+), 32 deletions(-) commit ee0b089d660021792e4ab4dda191b097ce1e964f Author: Kai Vehmanen Date: Fri Dec 9 12:18:22 2022 +0200 ALSA: hda/hdmi: fix stream-id config keep-alive for rt suspend When the new style KAE keep-alive implementation is used on compatible Intel hardware, the clocks are maintained when codec is in D3. The generic code in hda_cleanup_all_streams() can however interfere with generation of audio samples in this mode, by setting the stream and channel ids to zero. To get full benefit of the keepalive, set the new no_stream_clean_at_suspend quirk bit on affected Intel hardware. When this bit is set, stream cleanup is skipped in hda_call_codec_suspend(). Special handling is needed for the case when system goes to suspend. The stream id programming can be lost in this case. This will also cause codec->cvt_setups to be out of sync. Handle this by implementing custom suspend/resume handlers. If keep-alive is active for any converter, set the quirk flags no_stream_clean_at_suspend and forced_resume. Upon resume, keepalive programming is restored if needed. Fixes: 15175a4f2bbb ("ALSA: hda/hdmi: add keep-alive support for ADL-P and DG2") Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221209101822.3893675-4-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai include/sound/hda_codec.h | 1 + sound/pci/hda/hda_codec.c | 3 +- sound/pci/hda/patch_hdmi.c | 90 +++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 92 insertions(+), 2 deletions(-) commit b17e7ea041d8b565063632501ca4597afd105102 Author: Kai Vehmanen Date: Fri Dec 9 12:18:21 2022 +0200 ALSA: hda/hdmi: set default audio parameters for KAE silent-stream If the stream-id is zero, the keep-alive (KAE) will only ensure clock is generated, but no audio samples are sent over display link. This happens before first real audio stream is played out to a newly connected receiver. Reuse the code in silent_stream_enable() to set up stream parameters to sane defaults values, also when using the newer keep-alive flow. Fixes: 15175a4f2bbb ("ALSA: hda/hdmi: add keep-alive support for ADL-P and DG2") Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Tested-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20221209101822.3893675-3-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit ada261b690ecd5c2f55f0c51bdf11d852a4561a6 Author: Kai Vehmanen Date: Fri Dec 9 12:18:20 2022 +0200 ALSA: hda/hdmi: fix i915 silent stream programming flow The i915 display codec may not successfully transition to normal audio streaming mode, if the stream id is programmed while codec is actively transmitting data. This can happen when silent stream is enabled in KAE mode. Fix the issue by implementing a i915 specific programming flow, where the silent streaming is temporarily stopped, a small delay is applied to ensure display codec becomes idle, and then proceed with reprogramming the stream ID. Fixes: 15175a4f2bbb ("ALSA: hda/hdmi: add keep-alive support for ADL-P and DG2") Link: https://gitlab.freedesktop.org/drm/intel/-/issues/7353 Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Tested-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20221209101822.3893675-2-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 01de1123322e4fe1bbd0fcdf0982511b55519c03 Author: Yuan Can Date: Wed Dec 7 08:54:10 2022 +0000 drivers: net: qlcnic: Fix potential memory leak in qlcnic_sriov_init() If vp alloc failed in qlcnic_sriov_init(), all previously allocated vp needs to be freed. Fixes: f197a7aa6288 ("qlcnic: VF-PF communication channel implementation") Signed-off-by: Yuan Can Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 2 ++ 1 file changed, 2 insertions(+) commit a137f3f27f9290933fe7e40e6dc8a445781c31a2 Author: Gaosheng Cui Date: Wed Dec 7 16:34:13 2022 +0800 net: stmmac: fix possible memory leak in stmmac_dvr_probe() The bitmap_free() should be called to free priv->af_xdp_zc_qps when create_singlethread_workqueue() fails, otherwise there will be a memory leak, so we add the err path error_wq_init to fix it. Fixes: bba2556efad6 ("net: stmmac: Enable RX via AF_XDP zero-copy") Signed-off-by: Gaosheng Cui Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f150b63f3fa5fdd81e0dd6151e8850268e29438c Author: Zhang Changzhong Date: Wed Dec 7 16:31:59 2022 +0800 net: stmmac: selftests: fix potential memleak in stmmac_test_arpoffload() The skb allocated by stmmac_test_get_arp_skb() hasn't been released in some error handling case, which will lead to a memory leak. Fix this up by adding kfree_skb() to release skb. Compile tested only. Fixes: 5e3fb0a6e2b3 ("net: stmmac: selftests: Implement the ARP Offload test") Signed-off-by: Zhang Changzhong Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 453de3eb08c4b7e31b3019a4b0cc3ebce51a6219 Author: Linus Walleij Date: Sat Dec 3 10:15:18 2022 +0100 crypto: ux500/cryp - delete driver It turns out we can just modify the newer STM32 CRYP driver to be used with Ux500 and now that we have done that, delete the old and sparsely maintained Ux500 CRYP driver. Cc: Lionel Debieve Cc: Maxime Coquelin Cc: Alexandre Torgue Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu drivers/crypto/ux500/Kconfig | 10 - drivers/crypto/ux500/Makefile | 1 - drivers/crypto/ux500/cryp/Makefile | 10 - drivers/crypto/ux500/cryp/cryp.c | 394 -------- drivers/crypto/ux500/cryp/cryp.h | 315 ------- drivers/crypto/ux500/cryp/cryp_core.c | 1600 --------------------------------- drivers/crypto/ux500/cryp/cryp_irq.c | 45 - drivers/crypto/ux500/cryp/cryp_irq.h | 31 - drivers/crypto/ux500/cryp/cryp_irqp.h | 125 --- drivers/crypto/ux500/cryp/cryp_p.h | 122 --- 10 files changed, 2653 deletions(-) commit 0b496efbd2d00f658dbf906882d935e7fa3dfd03 Author: Linus Walleij Date: Sat Dec 3 10:15:17 2022 +0100 crypto: stm32/cryp - enable for use with Ux500 This adds a few small quirks to handle the differences between the STM32 and Ux500 cryp blocks. The following differences are handled with special bool switch bits in the capabilities: - The main difference is that some registers are removed, so we add register offsets for all registers in the per-variant data. Then we assign the right offsets for Ux500 vs the STM32 variants. - The Ux500 does not support the aeads algorithms; gcm(aes) and ccm(aes). Avoid registering them when running on Ux500. - The Ux500 has a special "linear" key format and does some elaborare bit swizzling of the key bits before writing them into the key registers. This is written as an "application note" inside the DB8500 design specification, and seems to be the result of some mishap when assigning the data lines to register bits. (STM32 has clearly fixed this.) - The Ux500 does not have the KP "key prepare" bit in the CR register. Instead, we need to set the KSE bit, "key schedule encryption" bit which does the same thing but is in bit 11 rather than being a special "algorithm type" as on STM32. The algorithm must however be specified as AES ECB while doing this. - The Ux500 cannot just read out IV registers, we need to set the KEYRDEN "key read enable" bit, as this protects not just the key but also the IV from being read out. Enable this bit before reading out the IV and disable it afterwards. Cc: Maxime Coquelin Cc: Alexandre Torgue Acked by: Lionel Debieve Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu drivers/crypto/stm32/stm32-cryp.c | 413 +++++++++++++++++++++++++++++--------- 1 file changed, 322 insertions(+), 91 deletions(-) commit fe867538c1620738bda5328a14179a3c2bc95ab1 Author: Linus Walleij Date: Sat Dec 3 10:15:16 2022 +0100 crypto: stm32 - enable drivers to be used on Ux500 The Ux500 cryp and hash drivers are older versions of the hardware managed by the stm32 driver. Instead of trying to improve the Ux500 cryp and hash drivers, start to switch over to the modern and more well-maintained STM32 drivers. Cc: Maxime Coquelin Cc: Alexandre Torgue Acked-by: Lionel Debieve Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu drivers/crypto/Makefile | 2 +- drivers/crypto/stm32/Kconfig | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 6c013679eb5c7e0b09cbcb64276f6dd97b473d12 Author: Linus Walleij Date: Sat Dec 3 10:15:15 2022 +0100 dt-bindings: crypto: Let STM32 define Ux500 CRYP This adds device tree bindings for the Ux500 CRYP block as a compatible in the STM32 CRYP bindings. The Ux500 CRYP 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 CRYP block, which is what it is. The relationship to the existing STM32 CRYP block is pretty obvious when looking at the register map, and I have written patches to reuse the STM32 CRYP driver on the Ux500. The two properties added are DMA channels and power domain. Power domains are a generic SoC feature and the STM32 variant also has DMA channels. Cc: devicetree@vger.kernel.org Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Lionel Debieve Cc: Maxime Coquelin Cc: Alexandre Torgue Acked-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu .../devicetree/bindings/crypto/st,stm32-cryp.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 9f6ec8dc574efb7f4f3d7ee9cd59ae307e78f445 Author: Xiongfeng Wang Date: Fri Dec 2 21:22:34 2022 +0800 hwrng: geode - Fix PCI device refcount leak for_each_pci_dev() is implemented by pci_get_device(). The comment of pci_get_device() says that it will increase the reference count for the returned pci_dev and also decrease the reference count for the input pci_dev @from if it is not NULL. If we break for_each_pci_dev() loop with pdev not NULL, we need to call pci_dev_put() to decrease the reference count. We add a new struct 'amd_geode_priv' to record pointer of the pci_dev and membase, and then add missing pci_dev_put() for the normal and error path. Fixes: ef5d862734b8 ("[PATCH] Add Geode HW RNG driver") Signed-off-by: Xiongfeng Wang Signed-off-by: Herbert Xu drivers/char/hw_random/geode-rng.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) commit ecadb5b0111ea19fc7c240bb25d424a94471eb7d Author: Xiongfeng Wang Date: Fri Dec 2 21:22:33 2022 +0800 hwrng: amd - Fix PCI device refcount leak for_each_pci_dev() is implemented by pci_get_device(). The comment of pci_get_device() says that it will increase the reference count for the returned pci_dev and also decrease the reference count for the input pci_dev @from if it is not NULL. If we break for_each_pci_dev() loop with pdev not NULL, we need to call pci_dev_put() to decrease the reference count. Add the missing pci_dev_put() for the normal and error path. Fixes: 96d63c0297cc ("[PATCH] Add AMD HW RNG driver") Signed-off-by: Xiongfeng Wang Signed-off-by: Herbert Xu drivers/char/hw_random/amd-rng.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 18daae5b0c41bf54af5f162a3e205858c9771400 Author: Herbert Xu Date: Fri Dec 2 17:21:05 2022 +0800 crypto: qce - Set DMA alignment explicitly This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes. This patch changes it to explicitly request DMA alignment from the Crypto API. Signed-off-by: Herbert Xu drivers/crypto/qce/aead.c | 22 +++++++++++----------- drivers/crypto/qce/common.c | 5 +++-- drivers/crypto/qce/sha.c | 18 +++++++++--------- 3 files changed, 23 insertions(+), 22 deletions(-) commit d887dec105cdeda6b8da0e84d96c7a07d80269bc Author: Herbert Xu Date: Fri Dec 2 17:21:03 2022 +0800 crypto: octeontx2 - Set DMA alignment explicitly This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes. This patch changes it to explicitly request DMA alignment from the Crypto API. Signed-off-by: Herbert Xu drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c | 79 +++++++++++----------- 1 file changed, 40 insertions(+), 39 deletions(-) commit 0a55f4e38556f7e59b0f30fac0751e3a04be44c2 Author: Herbert Xu Date: Fri Dec 2 17:21:01 2022 +0800 crypto: octeontx - Set DMA alignment explicitly This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes. This patch changes it to explicitly request DMA alignment from the Crypto API. Signed-off-by: Herbert Xu drivers/crypto/marvell/octeontx/otx_cptvf_algs.c | 69 ++++++++++++------------ 1 file changed, 35 insertions(+), 34 deletions(-) commit be75969c81d9a6e13487e1c043e62ed5432d9fa1 Author: Herbert Xu Date: Fri Dec 2 17:20:59 2022 +0800 crypto: keembay - Set DMA alignment explicitly This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes. This patch changes it to explicitly request DMA alignment from the Crypto API. Signed-off-by: Herbert Xu drivers/crypto/keembay/keembay-ocs-hcu-core.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit b2e2e2da7b4f62c54ce0d6a66c54e9fb05a8d514 Author: Herbert Xu Date: Fri Dec 2 17:20:57 2022 +0800 crypto: safexcel - Set DMA alignment explicitly This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes. This patch changes it to explicitly request DMA alignment from the Crypto API. Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 99 ++++++++++++++-------------- 1 file changed, 50 insertions(+), 49 deletions(-) commit 80b61baca4c8698139881f41473e652bedc65a73 Author: Herbert Xu Date: Fri Dec 2 17:20:55 2022 +0800 crypto: hisilicon/hpre - Set DMA alignment explicitly This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes. This patch changes it to explicitly request DMA alignment from the Crypto API. Signed-off-by: Herbert Xu drivers/crypto/hisilicon/hpre/hpre_crypto.c | 40 ++++++++++++++++++----------- 1 file changed, 25 insertions(+), 15 deletions(-) commit e055bffaa390042d73fed56a0ef9bfe71a675614 Author: Herbert Xu Date: Fri Dec 2 17:20:53 2022 +0800 crypto: chelsio - Set DMA alignment explicitly This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes. This patch changes it to explicitly request DMA alignment from the Crypto API. Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 43 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit 07547fa73e4645363165e662f50427a7d302dcf1 Author: Herbert Xu Date: Fri Dec 2 17:20:51 2022 +0800 crypto: ccree - Set DMA alignment explicitly This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes. This patch changes it to explicitly request DMA alignment from the Crypto API. Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_aead.c | 62 +++++++++++++------------- drivers/crypto/ccree/cc_buffer_mgr.c | 18 ++++---- drivers/crypto/ccree/cc_hash.c | 86 ++++++++++++++++++------------------ 3 files changed, 83 insertions(+), 83 deletions(-) commit 99c6b20edfc031610240afca97ba9be5ec6f5750 Author: Herbert Xu Date: Fri Dec 2 17:20:49 2022 +0800 crypto: ccp - Set DMA alignment explicitly This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes. This patch changes it to explicitly request DMA alignment from the Crypto API. Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 21 +++++++++++---------- drivers/crypto/ccp/ccp-crypto-aes-galois.c | 12 ++++++------ drivers/crypto/ccp/ccp-crypto-aes-xts.c | 20 +++++++++++--------- drivers/crypto/ccp/ccp-crypto-aes.c | 29 +++++++++++++++-------------- drivers/crypto/ccp/ccp-crypto-des3.c | 17 +++++++++-------- drivers/crypto/ccp/ccp-crypto-main.c | 4 ++-- drivers/crypto/ccp/ccp-crypto-rsa.c | 18 +++++++++--------- drivers/crypto/ccp/ccp-crypto-sha.c | 26 +++++++++++++------------- 8 files changed, 76 insertions(+), 71 deletions(-) commit 1c64a7e1f931821acadf964c5ddb0dc41abf9e20 Author: Herbert Xu Date: Fri Dec 2 17:20:47 2022 +0800 crypto: cavium - Set DMA alignment explicitly This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes. This patch changes it to explicitly request DMA alignment from the Crypto API. Signed-off-by: Herbert Xu drivers/crypto/cavium/cpt/cptvf_algs.c | 10 +++++----- drivers/crypto/cavium/nitrox/nitrox_aead.c | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) commit 04ba54e5af8f8f0137b08cb51a0b3a2e1ea46c94 Author: Gaosheng Cui Date: Thu Dec 1 14:25:26 2022 +0800 crypto: img-hash - Fix variable dereferenced before check 'hdev->req' Smatch report warning as follows: drivers/crypto/img-hash.c:366 img_hash_dma_task() warn: variable dereferenced before check 'hdev->req' Variable dereferenced should be done after check 'hdev->req', fix it. Fixes: d358f1abbf71 ("crypto: img-hash - Add Imagination Technologies hw hash accelerator") Fixes: 10badea259fa ("crypto: img-hash - Fix null pointer exception") Signed-off-by: Gaosheng Cui Signed-off-by: Herbert Xu drivers/crypto/img-hash.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a428636d4c827ebe967aa31a83684b4c8e742ed1 Author: Ard Biesheuvel Date: Tue Nov 29 17:48:52 2022 +0100 crypto: arm64/ghash-ce - use frame_push/pop macros consistently Use the frame_push and frame_pop macros to set up the stack frame so that return address protections will be enabled automically when configured. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/ghash-ce-core.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 489a4a05fe6d544f1f1052d2c6cd5bffbd89ddb6 Author: Ard Biesheuvel Date: Tue Nov 29 17:48:51 2022 +0100 crypto: arm64/crct10dif - use frame_push/pop macros consistently Use the frame_push and frame_pop macros to set up the stack frame so that return address protections will be enabled automically when configured. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/crct10dif-ce-core.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7d709af18054bc9e2043499bb35eb1809c2a316f Author: Ard Biesheuvel Date: Tue Nov 29 17:48:50 2022 +0100 crypto: arm64/aes-modes - use frame_push/pop macros consistently Use the frame_push and frame_pop macros to create the stack frames in the AES chaining mode wrappers so that they will get PAC and/or shadow call stack protection when configured. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-modes.S | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) commit 67ab02dce3adad3ea399e824b37f8e1c2453449f Author: Ard Biesheuvel Date: Tue Nov 29 17:48:49 2022 +0100 crypto: arm64/aes-neonbs - use frame_push/pop consistently Use the frame_push and frame_pop macros consistently to create the stack frame, so that we will get PAC and/or shadow call stack handling as well when enabled. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-neonbs-core.S | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 3564f5a2144355cadb4f0c5c14d2bc7fcd2418b9 Author: Herbert Xu Date: Tue Nov 29 17:52:35 2022 +0800 crypto: chelsio - Fix flexible struct array warning This patch fixes the sparse warning about arrays of flexible structures by removing an unnecessary use of them in struct __crypto_ctx. Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 6 +++--- drivers/crypto/chelsio/chcr_crypto.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 3112d0f1b0b32daac97d170dbc9d3cce69f7ff49 Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:23 2022 +0000 crypto: qat - add resubmit logic for decompression The acomp API allows to send requests with a NULL destination buffer. In this case, the algorithm implementation needs to allocate the destination scatter list, perform the operation and return the buffer to the user. For decompression, data is likely to expand and be bigger than the allocated buffer. This implements a re-submission mechanism for decompression requests that is triggered if the destination buffer, allocated by the driver, is not sufficiently big to store the output from decompression. If an overflow is detected when processing the callback for a decompression request with a NULL destination buffer, a workqueue is scheduled. This allocates a new scatter list of size CRYPTO_ACOMP_DST_MAX, now 128KB, creates a new firmware scatter list and resubmits the job to the hardware accelerator. Suggested-by: Herbert Xu Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_bl.c | 159 ++++++++++++++++++++++++++ drivers/crypto/qat/qat_common/qat_bl.h | 6 + drivers/crypto/qat/qat_common/qat_comp_algs.c | 70 ++++++++++++ drivers/crypto/qat/qat_common/qat_comp_req.h | 10 ++ 4 files changed, 245 insertions(+) commit 5fc8041e56782e4d44682f8c2e4d822817a4dae6 Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:22 2022 +0000 crypto: acomp - define max size for destination The acomp API allows to send requests with a NULL destination buffer. In this case, the algorithm implementation needs to allocate the destination scatter list, perform the operation and return the buffer to the user. For decompression, data is likely to expand and be bigger than the allocated buffer. Define the maximum size (128KB) that acomp implementations will allocate for decompression operations as destination buffer when they receive a request with a NULL destination buffer. Suggested-by: Herbert Xu Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu include/crypto/acompress.h | 1 + 1 file changed, 1 insertion(+) commit 5b14b2b307e4045b38a4961718cbe9c17cef2bf4 Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:21 2022 +0000 crypto: qat - enable deflate for QAT GEN4 Enable deflate for QAT GEN4 devices. This adds (1) logic to create configuration entries at probe time for the compression instances for QAT GEN4 devices; (2) the implementation of QAT GEN4 specific compression operations, required since the creation of the compression request template is different between GEN2 and GEN4; and (3) updates to the firmware API related to compression for GEN4. The implementation configures the device to produce data compressed dynamically, optimized for throughput over compression ratio. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Adam Guerin Signed-off-by: Herbert Xu drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c | 4 +- drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.h | 2 +- drivers/crypto/qat/qat_4xxx/adf_drv.c | 139 +++++++++- drivers/crypto/qat/qat_common/Makefile | 1 + drivers/crypto/qat/qat_common/adf_gen4_dc.c | 83 ++++++ drivers/crypto/qat/qat_common/adf_gen4_dc.h | 10 + drivers/crypto/qat/qat_common/icp_qat_hw_20_comp.h | 164 +++++++++++ .../qat/qat_common/icp_qat_hw_20_comp_defs.h | 300 +++++++++++++++++++++ 8 files changed, 689 insertions(+), 14 deletions(-) commit 1198ae56c9a520384dcf53f01cd9adecd73751d0 Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:20 2022 +0000 crypto: qat - expose deflate through acomp api for QAT GEN2 Add infrastructure for implementing the acomp APIs in the QAT driver and expose the deflate algorithm for QAT GEN2 devices. This adds (1) the compression service which includes logic to create, allocate and handle compression instances; (2) logic to create configuration entries at probe time for the compression instances; (3) updates to the firmware API for allowing the compression service; and; (4) a back-end for deflate that implements the acomp api for QAT GEN2 devices. The implementation configures the device to produce data compressed statically, optimized for throughput over compression ratio. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Adam Guerin Signed-off-by: Herbert Xu drivers/crypto/qat/qat_4xxx/adf_drv.c | 6 + drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.c | 2 + .../crypto/qat/qat_c3xxxvf/adf_c3xxxvf_hw_data.c | 2 + drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c | 2 + drivers/crypto/qat/qat_c62xvf/adf_c62xvf_hw_data.c | 2 + drivers/crypto/qat/qat_common/Makefile | 3 + drivers/crypto/qat/qat_common/adf_accel_devices.h | 14 + drivers/crypto/qat/qat_common/adf_cfg_strings.h | 1 + drivers/crypto/qat/qat_common/adf_common_drv.h | 8 + drivers/crypto/qat/qat_common/adf_ctl_drv.c | 6 + drivers/crypto/qat/qat_common/adf_gen2_config.c | 99 ++++- drivers/crypto/qat/qat_common/adf_gen2_dc.c | 70 ++++ drivers/crypto/qat/qat_common/adf_gen2_dc.h | 10 + drivers/crypto/qat/qat_common/adf_init.c | 11 + drivers/crypto/qat/qat_common/adf_sriov.c | 4 + drivers/crypto/qat/qat_common/icp_qat_fw.h | 24 ++ drivers/crypto/qat/qat_common/icp_qat_fw_comp.h | 404 +++++++++++++++++++++ drivers/crypto/qat/qat_common/icp_qat_hw.h | 66 ++++ drivers/crypto/qat/qat_common/qat_comp_algs.c | 274 ++++++++++++++ drivers/crypto/qat/qat_common/qat_comp_req.h | 113 ++++++ drivers/crypto/qat/qat_common/qat_compression.c | 297 +++++++++++++++ drivers/crypto/qat/qat_common/qat_compression.h | 37 ++ .../crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c | 2 + .../qat/qat_dh895xccvf/adf_dh895xccvf_hw_data.c | 2 + 24 files changed, 1447 insertions(+), 12 deletions(-) commit 93b2f5799cee57814a36882e61ef5f03d5dc5392 Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:19 2022 +0000 crypto: qat - rename and relocate GEN2 config function Rename qat_crypto_dev_config() in adf_gen2_dev_config() and relocate it to the newly created file adf_gen2_config.c. This function is specific to QAT GEN2 devices and will be used also to configure the compression service. In addition change the drivers to use the dev_config() in the hardware data structure (which for GEN2 devices now points to adf_gen2_dev_config()), for consistency. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Adam Guerin Signed-off-by: Herbert Xu drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.c | 2 + drivers/crypto/qat/qat_c3xxx/adf_drv.c | 2 +- .../crypto/qat/qat_c3xxxvf/adf_c3xxxvf_hw_data.c | 2 + drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c | 2 + drivers/crypto/qat/qat_c62x/adf_drv.c | 2 +- drivers/crypto/qat/qat_c62xvf/adf_c62xvf_hw_data.c | 2 + drivers/crypto/qat/qat_common/Makefile | 1 + drivers/crypto/qat/qat_common/adf_common_drv.h | 1 - drivers/crypto/qat/qat_common/adf_gen2_config.c | 131 +++++++++++++++++++++ drivers/crypto/qat/qat_common/adf_gen2_config.h | 10 ++ drivers/crypto/qat/qat_common/qat_crypto.c | 120 +------------------ .../crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c | 2 + drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 2 +- .../qat/qat_dh895xccvf/adf_dh895xccvf_hw_data.c | 2 + 14 files changed, 158 insertions(+), 123 deletions(-) commit 79d8dbf155d4e670b6ac20acbb6b22f02c728da5 Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:18 2022 +0000 crypto: qat - relocate qat_algs_alloc_flags() Move qat_algs_alloc_flags() from qat_crypto.h to qat_bl.h as this will be used also by the compression logic. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Adam Guerin Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_bl.h | 6 ++++++ drivers/crypto/qat/qat_common/qat_crypto.h | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) commit 4d76f3880987a00da79f455876488ac3c7343e83 Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:17 2022 +0000 crypto: qat - relocate backlog related structures Move the structures qat_instance_backlog and qat_alg_req from qat_crypto.h to qat_algs_send.h since they are not unique to crypto. Both structures will be used by the compression service to support requests with the CRYPTO_TFM_REQ_MAY_BACKLOG flag set. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Adam Guerin Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs_send.h | 16 +++++++++++++++- drivers/crypto/qat/qat_common/qat_crypto.h | 14 +------------- 2 files changed, 16 insertions(+), 14 deletions(-) commit cf692906bd61af2eec06a32a83d2a8ec3acf3548 Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:16 2022 +0000 crypto: qat - extend buffer list interface The compression service requires an additional pre-allocated buffer for each destination scatter list. Extend the function qat_alg_sgl_to_bufl() to take an additional structure that contains the dma address and the size of the extra buffer which will be appended in the destination FW SGL. The logic that unmaps buffers in qat_alg_free_bufl() has been changed to start unmapping from buffer 0 instead of skipping the initial buffers num_buff - num_mapped_bufs as that functionality was not used in the code. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Adam Guerin Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 8 ++--- drivers/crypto/qat/qat_common/qat_bl.c | 58 ++++++++++++++++++++++++-------- drivers/crypto/qat/qat_common/qat_bl.h | 6 ++++ 3 files changed, 54 insertions(+), 18 deletions(-) commit 36ebc7472afeb58f1eb1d4c1f0546b9e98acea46 Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:15 2022 +0000 crypto: qat - generalize crypto request buffers The structure qat_crypto_request_buffs which contains the source and destination buffer lists and correspondent sizes and dma addresses is also required for the compression service. Rename it as qat_request_buffs and move it to qat_bl.h. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Adam Guerin Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_bl.c | 4 ++-- drivers/crypto/qat/qat_common/qat_bl.h | 38 +++++++++++++++++++++++++++--- drivers/crypto/qat/qat_common/qat_crypto.h | 36 ++-------------------------- 3 files changed, 39 insertions(+), 39 deletions(-) commit 3ed330d0dba61d2e08a0eed7aa3d5def3f0c749b Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:14 2022 +0000 crypto: qat - change bufferlist logic interface The functions qat_alg_sgl_to_bufl() and qat_alg_free_bufl() take as argument a qat_crypto_instance and a qat_crypto_request structure. These two structures are used only to get a reference to the adf_accel_dev and qat_crypto_request_buffs. In order to reuse these functions for the compression service, change the signature so that they take adf_accel_dev and qat_crypto_request_buffs. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Adam Guerin Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 24 +++++++------ drivers/crypto/qat/qat_common/qat_bl.c | 62 ++++++++++++++++---------------- drivers/crypto/qat/qat_common/qat_bl.h | 8 ++--- 3 files changed, 49 insertions(+), 45 deletions(-) commit b0cd997f35598c4fc01bf22061e1eb88fc10afad Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:13 2022 +0000 crypto: qat - rename bufferlist functions Rename the functions qat_alg_sgl_to_bufl() and qat_alg_free_bufl() as qat_bl_sgl_to_bufl() and qat_bl_free_bufl() after their relocation into the qat_bl module. This commit does not implement any functional change. Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 20 ++++++++++---------- drivers/crypto/qat/qat_common/qat_bl.c | 14 +++++++------- drivers/crypto/qat/qat_common/qat_bl.h | 14 +++++++------- 3 files changed, 24 insertions(+), 24 deletions(-) commit e9612987e437b7ada686f472c7596686fabecb2b Author: Giovanni Cabiddu Date: Mon Nov 28 12:21:12 2022 +0000 crypto: qat - relocate bufferlist logic Move the logic that maps, unmaps and converts scatterlists into QAT bufferlists from qat_algs.c to a new module, qat_bl. This is to allow reuse of the logic by the data compression service. This commit does not implement any functional change. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Adam Guerin Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/Makefile | 3 +- drivers/crypto/qat/qat_common/qat_algs.c | 184 +---------------------------- drivers/crypto/qat/qat_common/qat_bl.c | 194 +++++++++++++++++++++++++++++++ drivers/crypto/qat/qat_common/qat_bl.h | 17 +++ 4 files changed, 214 insertions(+), 184 deletions(-) commit ae18dcdff0f8d7e84cd3fd9f496518b5e72d185d Author: Yongqiang Liu Date: Wed Dec 7 07:20:45 2022 +0000 net: defxx: Fix missing err handling in dfx_init() When eisa_driver_register() or tc_register_driver() failed, the modprobe defxx would fail with some err log as follows: Error: Driver 'defxx' is already registered, aborting... Fix this issue by adding err hanling in dfx_init(). Fixes: e89a2cfb7d7b5 ("[TC] defxx: TURBOchannel support") Signed-off-by: Yongqiang Liu Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/fddi/defxx.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 1933ea365aa7a48ce26bea2ea09c9f7cc48cc668 Author: wangchuanlei Date: Tue Dec 6 20:38:57 2022 -0500 net: openvswitch: Add support to count upcall packets Add support to count upall packets, when kmod of openvswitch upcall to count the number of packets for upcall succeed and failed, which is a better way to see how many packets upcalled on every interfaces. Signed-off-by: wangchuanlei Acked-by: Eelco Chaudron Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 14 +++++++++++ net/openvswitch/datapath.c | 41 ++++++++++++++++++++++++++++++++ net/openvswitch/vport.c | 50 ++++++++++++++++++++++++++++++++++++++++ net/openvswitch/vport.h | 16 +++++++++++++ 4 files changed, 121 insertions(+) commit e47877c7aa821c413b45e05f804819579bdfa1a3 Author: Tejun Heo Date: Tue Dec 6 11:36:32 2022 -1000 rhashtable: Allow rhashtable to be used from irq-safe contexts rhashtable currently only does bh-safe synchronization making it impossible to use from irq-safe contexts. Switch it to use irq-safe synchronization to remove the restriction. v2: Update the lock functions to return the ulong flags value and unlock functions to take the value directly instead of passing around the pointer. Suggested by Linus. Signed-off-by: Tejun Heo Reviewed-by: David Vernet Acked-by: Josh Don Acked-by: Hao Luo Acked-by: Barret Rhoden Cc: Linus Torvalds Signed-off-by: David S. Miller include/linux/rhashtable.h | 61 +++++++++++++++++++++++++++------------------- lib/rhashtable.c | 16 +++++++----- 2 files changed, 46 insertions(+), 31 deletions(-) commit ff874dbc4f868af128b412a9bd92637103cf11d7 Author: Wenchao Chen Date: Wed Dec 7 13:19:09 2022 +0800 mmc: sdhci-sprd: Disable CLK_AUTO when the clock is less than 400K When the clock is less than 400K, some SD cards fail to initialize because CLK_AUTO is enabled. Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller") Signed-off-by: Wenchao Chen Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221207051909.32126-1-wenchao.chen@unisoc.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 19dafe9c6b86cc15979e514787fc743041ebc08d Author: Jiapeng Chong Date: Fri Dec 9 11:41:34 2022 +0800 mmc: sdhci-of-esdhc: Modify mismatched function name No functional modification involved. drivers/mmc/host/sdhci-of-esdhc.c:243: warning: expecting prototype for _fixup(). Prototype was for esdhc_writel_fixup() instead. drivers/mmc/host/sdhci-of-esdhc.c:117: warning: expecting prototype for _fixup(). Prototype was for esdhc_readl_fixup() instead. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3397 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20221209034134.38477-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c35997020c462ab0be8ee8d62919c14f63631f2 Author: ye xingchen Date: Thu Dec 8 11:38:19 2022 +0800 memstick/mspro_block: 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/202212081138191215291@zte.com.cn Signed-off-by: Ulf Hansson drivers/memstick/core/mspro_block.c | 177 +++++++++++++++--------------------- 1 file changed, 72 insertions(+), 105 deletions(-) commit b602d00384bdfb8874cc4dcb298fc87cc369630b Merge: 0bdff1152c24 9f3101dca3a7 Author: David S. Miller Date: Fri Dec 9 09:18:08 2022 +0000 Merge branch 'net-sched-retpoline' Pedro Tammela says: ==================== net/sched: retpoline wrappers for tc In tc all qdics, classifiers and actions can be compiled as modules. This results today in indirect calls in all transitions in the tc hierarchy. Due to CONFIG_RETPOLINE, CPUs with mitigations=on might pay an extra cost on indirect calls. For newer Intel cpus with IBRS the extra cost is nonexistent, but AMD Zen cpus and older x86 cpus still go through the retpoline thunk. Known built-in symbols can be optimized into direct calls, thus avoiding the retpoline thunk. So far, tc has not been leveraging this build information and leaving out a performance optimization for some CPUs. In this series we wire up 'tcf_classify()' and 'tcf_action_exec()' with direct calls when known modules are compiled as built-in as an opt-in optimization. We measured these changes in one AMD Zen 4 cpu (Retpoline), one AMD Zen 3 cpu (Retpoline), one Intel 10th Gen CPU (IBRS), one Intel 3rd Gen cpu (Retpoline) and one Intel Xeon CPU (IBRS) using pktgen with 64b udp packets. Our test setup is a dummy device with clsact and matchall in a kernel compiled with every tc module as built-in. We observed a 3-8% speed up on the retpoline CPUs, when going through 1 tc filter, and a 60-100% speed up when going through 100 filters. For the IBRS cpus we observed a 1-2% degradation in both scenarios, we believe the extra branches check introduced a small overhead therefore we added a static key that bypasses the wrapper on kernels not using the retpoline mitigation, but compiled with CONFIG_RETPOLINE. 1 filter: CPU | before (pps) | after (pps) | diff R9 7950X | 5914980 | 6380227 | +7.8% R9 5950X | 4237838 | 4412241 | +4.1% R9 5950X | 4265287 | 4413757 | +3.4% [*] i5-3337U | 1580565 | 1682406 | +6.4% i5-10210U | 3006074 | 3006857 | +0.0% i5-10210U | 3160245 | 3179945 | +0.6% [*] Xeon 6230R | 3196906 | 3197059 | +0.0% Xeon 6230R | 3190392 | 3196153 | +0.01% [*] 100 filters: CPU | before (pps) | after (pps) | diff R9 7950X | 373598 | 820396 | +119.59% R9 5950X | 313469 | 633303 | +102.03% R9 5950X | 313797 | 633150 | +101.77% [*] i5-3337U | 127454 | 211210 | +65.71% i5-10210U | 389259 | 381765 | -1.9% i5-10210U | 408812 | 412730 | +0.9% [*] Xeon 6230R | 415420 | 406612 | -2.1% Xeon 6230R | 416705 | 405869 | -2.6% [*] [*] In these tests we ran pktgen with clone set to 1000. On the 7950x system we also tested the impact of filters if iteration order placement varied, first by compiling a kernel with the filter under test being the first one in the static iteration and then repeating it with being last (of 15 classifiers existing today). We saw a difference of +0.5-1% in pps between being the first in the iteration vs being the last. Therefore we order the classifiers and actions according to relevance per our current thinking. v5->v6: - Address Eric Dumazet suggestions v4->v5: - Rebase v3->v4: - Address Eric Dumazet suggestions v2->v3: - Address suggestions by Jakub, Paolo and Eric - Dropped RFC tag (I forgot to add it on v2) v1->v2: - Fix build errors found by the bots - Address Kuniyuki Iwashima suggestions ==================== Signed-off-by: David S. Miller commit 9f3101dca3a7c69027c65770ac28803768efefa5 Author: Pedro Tammela Date: Tue Dec 6 10:55:13 2022 -0300 net/sched: avoid indirect classify functions on retpoline kernels Expose the necessary tc classifier functions and wire up cls_api to use direct calls in retpoline kernels. Signed-off-by: Pedro Tammela Reviewed-by: Jamal Hadi Salim Reviewed-by: Victor Nogueira Signed-off-by: David S. Miller net/sched/cls_api.c | 3 ++- net/sched/cls_basic.c | 6 ++++-- net/sched/cls_bpf.c | 6 ++++-- net/sched/cls_cgroup.c | 6 ++++-- net/sched/cls_flow.c | 6 ++++-- net/sched/cls_flower.c | 6 ++++-- net/sched/cls_fw.c | 6 ++++-- net/sched/cls_matchall.c | 6 ++++-- net/sched/cls_route.c | 6 ++++-- net/sched/cls_rsvp.c | 2 ++ net/sched/cls_rsvp.h | 6 +++--- net/sched/cls_rsvp6.c | 2 ++ net/sched/cls_tcindex.c | 7 ++++--- net/sched/cls_u32.c | 6 ++++-- 14 files changed, 49 insertions(+), 25 deletions(-) commit 871cf386dd16705b1e08942efd02c58801293d01 Author: Pedro Tammela Date: Tue Dec 6 10:55:12 2022 -0300 net/sched: avoid indirect act functions on retpoline kernels Expose the necessary tc act functions and wire up act_api to use direct calls in retpoline kernels. Signed-off-by: Pedro Tammela Reviewed-by: Jamal Hadi Salim Reviewed-by: Victor Nogueira Signed-off-by: David S. Miller net/sched/act_api.c | 3 ++- net/sched/act_bpf.c | 6 ++++-- net/sched/act_connmark.c | 6 ++++-- net/sched/act_csum.c | 6 ++++-- net/sched/act_ct.c | 5 +++-- net/sched/act_ctinfo.c | 6 ++++-- net/sched/act_gact.c | 6 ++++-- net/sched/act_gate.c | 6 ++++-- net/sched/act_ife.c | 6 ++++-- net/sched/act_ipt.c | 6 ++++-- net/sched/act_mirred.c | 6 ++++-- net/sched/act_mpls.c | 6 ++++-- net/sched/act_nat.c | 7 ++++--- net/sched/act_pedit.c | 6 ++++-- net/sched/act_police.c | 6 ++++-- net/sched/act_sample.c | 6 ++++-- net/sched/act_simple.c | 6 ++++-- net/sched/act_skbedit.c | 6 ++++-- net/sched/act_skbmod.c | 6 ++++-- net/sched/act_tunnel_key.c | 6 ++++-- net/sched/act_vlan.c | 6 ++++-- 21 files changed, 81 insertions(+), 42 deletions(-) commit 7f0e810220e2d985338ecdd907c1598404db251d Author: Pedro Tammela Date: Tue Dec 6 10:55:11 2022 -0300 net/sched: add retpoline wrapper for tc On kernels using retpoline as a spectrev2 mitigation, optimize actions and filters that are compiled as built-ins into a direct call. On subsequent patches we expose the classifiers and actions functions and wire up the wrapper into tc. Signed-off-by: Pedro Tammela Reviewed-by: Jamal Hadi Salim Reviewed-by: Victor Nogueira Signed-off-by: David S. Miller include/net/tc_wrapper.h | 251 +++++++++++++++++++++++++++++++++++++++++++++++ net/sched/sch_api.c | 5 + 2 files changed, 256 insertions(+) commit 2a7d228f1ae78b6eabef5f18bd1a8d2280555628 Author: Pedro Tammela Date: Tue Dec 6 10:55:10 2022 -0300 net/sched: move struct action_ops definition out of ifdef The type definition should be visible even in configurations not using CONFIG_NET_CLS_ACT. Signed-off-by: Pedro Tammela Reviewed-by: Jamal Hadi Salim Reviewed-by: Victor Nogueira Signed-off-by: David S. Miller include/net/act_api.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 084ca216931ab9313e6fb862c2ec9ec5e0702cd5 Author: Cezary Rojewski Date: Thu Dec 8 15:26:35 2022 +0100 ALSA: hda: Error out if invalid stream is being setup Scenario when snd_hdac_stream_setup_periods() receives an instance of struct hdac_stream with neither ->substream nor ->cstream initialized is invalid. Simultaneously addresses "uninitialized symbol 'dmab'" error reported by Smatch. Fixes: 3e9582267e3a ("ALSA: hda: Interrupt servicing and BDL setup for compress streams") Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221208142635.1514944-1-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai sound/hda/hdac_stream.c | 3 +++ 1 file changed, 3 insertions(+) commit a587601b55df505f38b18832d941e47dbbf084ce Merge: 4bf5bf54476d e85b1f5a9769 Author: Takashi Iwai Date: Fri Dec 9 09:50:13 2022 +0100 Merge tag 'asoc-v6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.2 A few more updates for v6.2 which can hopefully go into a later pull request, the bulk of these are fixes, minor cleanups or new board quirks - the one big bit that isn't is support for getting diagnostic data out of the Intel AVS firmwares. commit 44aa5a6dba8283bfda28b1517af4de711c5652a4 Author: Artem Chernyshev Date: Tue Dec 6 09:58:34 2022 +0300 net: vmw_vsock: vmci: Check memcpy_from_msg() vmci_transport_dgram_enqueue() does not check the return value of memcpy_from_msg(). If memcpy_from_msg() fails, it is possible that uninitialized memory contents are sent unintentionally instead of user's message in the datagram to the destination. Return with an error if memcpy_from_msg() fails. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 0f7db23a07af ("vmci_transport: switch ->enqeue_dgram, ->enqueue_stream and ->dequeue_stream to msghdr") Signed-off-by: Artem Chernyshev Reviewed-by: Stefano Garzarella Reviewed-by: Vishnu Dasa Signed-off-by: David S. Miller net/vmw_vsock/vmci_transport.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2afc1fbbdab2aee831561f09f859989dcd5ed648 Author: Oliver Upton Date: Wed Dec 7 21:48:08 2022 +0000 KVM: selftests: Allocate ucall pool from MEM_REGION_DATA MEM_REGION_TEST_DATA is meant to hold data explicitly used by a selftest, not implicit allocations due to the selftests infrastructure. Allocate the ucall pool from MEM_REGION_DATA much like the rest of the selftests library allocations. Fixes: 426729b2cf2e ("KVM: selftests: Add ucall pool based implementation") Signed-off-by: Oliver Upton Message-Id: <20221207214809.489070-5-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/ucall_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8b9a055fa0481679132781db574ecb771960f16 Author: Oliver Upton Date: Wed Dec 7 21:48:07 2022 +0000 KVM: arm64: selftests: Align VA space allocator with TTBR0 An interesting feature of the Arm architecture is that the stage-1 MMU supports two distinct VA regions, controlled by TTBR{0,1}_EL1. As KVM selftests on arm64 only uses TTBR0_EL1, the VA space is constrained to [0, 2^(va_bits-1)). This is different from other architectures that allow for addressing low and high regions of the VA space from a single page table. KVM selftests' VA space allocator presumes the valid address range is split between low and high memory based the MSB, which of course is a poor match for arm64's TTBR0 region. Allow architectures to override the default VA space layout. Make use of the override to align vpages_valid with the behavior of TTBR0 on arm64. Signed-off-by: Oliver Upton Message-Id: <20221207214809.489070-4-oliver.upton@linux.dev> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 1 + tools/testing/selftests/kvm/lib/aarch64/processor.c | 10 ++++++++++ tools/testing/selftests/kvm/lib/kvm_util.c | 15 ++++++++++----- 3 files changed, 21 insertions(+), 5 deletions(-) commit eb5618911af0ac069d2313b289d4c19ca3379401 Merge: 1e79a9e3ab96 753d734f3f34 Author: Paolo Bonzini Date: Tue Dec 6 12:27:39 2022 -0500 Merge tag 'kvmarm-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for 6.2 - Enable the per-vcpu dirty-ring tracking mechanism, together with an option to keep the good old dirty log around for pages that are dirtied by something other than a vcpu. - Switch to the relaxed parallel fault handling, using RCU to delay page table reclaim and giving better performance under load. - Relax the MTE ABI, allowing a VMM to use the MAP_SHARED mapping option, which multi-process VMMs such as crosvm rely on. - Merge the pKVM shadow vcpu state tracking that allows the hypervisor to have its own view of a vcpu, keeping that state private. - Add support for the PMUv3p5 architecture revision, bringing support for 64bit counters on systems that support it, and fix the no-quite-compliant CHAIN-ed counter support for the machines that actually exist out there. - Fix a handful of minor issues around 52bit VA/PA support (64kB pages only) as a prefix of the oncoming support for 4kB and 16kB pages. - Add/Enable/Fix a bunch of selftests covering memslots, breakpoints, stage-2 faults and access tracking. You name it, we got it, we probably broke it. - Pick a small set of documentation and spelling fixes, because no good merge window would be complete without those. As a side effect, this tag also drags: - The 'kvmarm-fixes-6.1-3' tag as a dependency to the dirty-ring series - A shared branch with the arm64 tree that repaints all the system registers to match the ARM ARM's naming, and resulting in interesting conflicts commit abe2343d37c2b4361547d5d31e17340ff9ec7356 Author: Colin Ian King Date: Wed Dec 7 09:23:14 2022 +0000 xfrm: Fix spelling mistake "oflload" -> "offload" There is a spelling mistake in a NL_SET_ERR_MSG message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Steffen Klassert net/xfrm/xfrm_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1de8fda46f87157f920b908792f56ca60297269c Merge: e8a292d6a786 37d244ad183f Author: Steffen Klassert Date: Fri Dec 9 07:47:37 2022 +0100 Merge branch 'mlx5 IPsec packet offload support (Part II)' Leon Romanovsky says: ============ This is second part with implementation of packet offload. ============ Signed-off-by: Steffen Klassert commit 1da18e38cb97e9521e93d63034521a9649524f64 Author: Ye Bin Date: Thu Dec 8 11:34:24 2022 +0800 ext4: fix reserved cluster accounting in __es_remove_extent() When bigalloc is enabled, reserved cluster accounting for delayed allocation is handled in extent_status.c. With a corrupted file system, it's possible for this accounting to be incorrect, dsicovered by Syzbot: EXT4-fs error (device loop0): ext4_validate_block_bitmap:398: comm rep: bg 0: block 5: invalid block bitmap EXT4-fs (loop0): Delayed block allocation failed for inode 18 at logical offset 0 with max blocks 32 with error 28 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=0 EXT4-fs (loop0): dirty_blocks=32 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=2 EXT4-fs (loop0): Inode 18 (00000000845cd634): i_reserved_data_blocks (1) not cleared! Above issue happens as follows: Assume: sbi->s_cluster_ratio = 16 Step1: Insert delay block [0, 31] -> ei->i_reserved_data_blocks=2 Step2: ext4_writepages mpage_map_and_submit_extent -> return failed mpage_release_unused_pages -> to release [0, 30] ext4_es_remove_extent -> remove lblk=0 end=30 __es_remove_extent -> len1=0 len2=31-30=1 __es_remove_extent: ... if (len2 > 0) { ... if (len1 > 0) { ... } else { es->es_lblk = end + 1; es->es_len = len2; ... } if (count_reserved) count_rsvd(inode, lblk, ...); goto out; -> will return but didn't calculate 'reserved' ... Step3: ext4_destroy_inode -> trigger "i_reserved_data_blocks (1) not cleared!" To solve above issue if 'len2>0' call 'get_rsvd()' before goto out. Reported-by: syzbot+05a0f0ccab4a25626e38@syzkaller.appspotmail.com Fixes: 8fcc3a580651 ("ext4: rework reserved cluster accounting when invalidating pages") Signed-off-by: Ye Bin Reviewed-by: Eric Whitney Link: https://lore.kernel.org/r/20221208033426.1832460-2-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/extents_status.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e4db04f7d3dbbe16680e0ded27ea2a65b10f766a Author: Ye Bin Date: Thu Dec 8 10:32:33 2022 +0800 ext4: fix inode leak in ext4_xattr_inode_create() on an error path There is issue as follows when do setxattr with inject fault: [localhost]# fsck.ext4 -fn /dev/sda e2fsck 1.46.6-rc1 (12-Sep-2022) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Unattached zero-length inode 15. Clear? no Unattached inode 15 Connect to /lost+found? no Pass 5: Checking group summary information /dev/sda: ********** WARNING: Filesystem still has errors ********** /dev/sda: 15/655360 files (0.0% non-contiguous), 66755/2621440 blocks This occurs in 'ext4_xattr_inode_create()'. If 'ext4_mark_inode_dirty()' fails, dropping i_nlink of the inode is needed. Or will lead to inode leak. Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221208023233.1231330-5-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/xattr.c | 3 +++ 1 file changed, 3 insertions(+) commit cc12a6f25e07ed05d5825a1664b67a970842b2ca Author: Ye Bin Date: Thu Dec 8 10:32:31 2022 +0800 ext4: allocate extended attribute value in vmalloc area Now, extended attribute value maximum length is 64K. The memory requested here does not need continuous physical addresses, so it is appropriate to use kvmalloc to request memory. At the same time, it can also cope with the situation that the extended attribute will become longer in the future. Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221208023233.1231330-3-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88a51b4f2e65ca4378a81ff0925fad076e82e177 Author: Steven Rostedt (Google) Date: Wed Dec 7 21:29:44 2022 -0500 ktest.pl: Add shell commands to variables Allow variables to execute shell commands. Note, these are processed when they are first seen while parsing the config file. This is useful if you have the same config file used for multiple hosts (as they may be in a git repository). HOSTNAME := ${shell hostname} DEFAULTS IF "${HOSTNAME}" == "frodo" Link: https://lkml.kernel.org/r/20221207212944.277ee850@gandalf.local.home Signed-off-by: Steven Rostedt (Google) tools/testing/ktest/ktest.pl | 9 ++++++++- tools/testing/ktest/sample.conf | 8 ++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) commit 0bdff1152c2496acf29930ec9b3c3cd7790b3f68 Author: Randy Dunlap Date: Tue Dec 6 20:42:57 2022 -0800 net: phy: remove redundant "depends on" lines Delete a few lines of "depends on PHYLIB" since they are inside an "if PHYLIB / endif # PHYLIB" block, i.e., they are redundant and the other 50+ drivers there don't use "depends on PHYLIB" since it is not needed. Signed-off-by: Randy Dunlap Cc: Andrew Lunn Cc: Heiner Kallweit Cc: Russell King Link: https://lore.kernel.org/r/20221207044257.30036-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski drivers/net/phy/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit b534dc46c8ae0165b1b2509be24dbea4fa9c4011 Author: Willem de Bruijn Date: Wed Dec 7 09:37:01 2022 -0500 net_tstamp: add SOF_TIMESTAMPING_OPT_ID_TCP Add an option to initialize SOF_TIMESTAMPING_OPT_ID for TCP from write_seq sockets instead of snd_una. This should have been the behavior from the start. Because processes may now exist that rely on the established behavior, do not change behavior of the existing option, but add the right behavior with a new flag. It is encouraged to always set SOF_TIMESTAMPING_OPT_ID_TCP on stream sockets along with the existing SOF_TIMESTAMPING_OPT_ID. Intuitively the contract is that the counter is zero after the setsockopt, so that the next write N results in a notification for the last byte N - 1. On idle sockets snd_una == write_seq and this holds for both. But on sockets with data in transmission, snd_una records the unacked offset in the stream. This depends on the ACK response from the peer. A process cannot learn this in a race free manner (ioctl SIOCOUTQ is one racy approach). write_seq records the offset at the last byte written by the process. This is a better starting point. It matches the intuitive contract in all circumstances, unaffected by external behavior. The new timestamp flag necessitates increasing sk_tsflags to 32 bits. Move the field in struct sock to avoid growing the socket (for some common CONFIG variants). The UAPI interface so_timestamping.flags is already int, so 32 bits wide. Reported-by: Sotirios Delimanolis Signed-off-by: Willem de Bruijn Link: https://lore.kernel.org/r/20221207143701.29861-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski Documentation/networking/timestamping.rst | 32 ++++++++++++++++++++++++++++++- include/net/sock.h | 6 +++--- include/uapi/linux/net_tstamp.h | 3 ++- net/core/sock.c | 9 ++++++++- net/ethtool/common.c | 1 + 5 files changed, 45 insertions(+), 6 deletions(-) commit ecd6df3c1ba8ad8befd82fc8f0d2438e8d3c75cc Merge: 3df96774a422 587585e1bbeb Author: Jakub Kicinski Date: Thu Dec 8 19:47:45 2022 -0800 Merge branch 'fix-possible-deadlock-during-wed-attach' Lorenzo Bianconi says: ==================== fix possible deadlock during WED attach Fix a possible deadlock in mtk_wed_attach if mtk_wed_wo_init routine fails. Check wo pointer is properly allocated before running mtk_wed_wo_reset() and mtk_wed_wo_deinit(). ==================== Link: https://lore.kernel.org/r/cover.1670421354.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 587585e1bbebc250d46ebb0eeaf986d9c3c01c69 Author: Lorenzo Bianconi Date: Wed Dec 7 15:04:55 2022 +0100 net: ethernet: mtk_wed: fix possible deadlock if mtk_wed_wo_init fails Introduce __mtk_wed_detach() in order to avoid a deadlock in mtk_wed_attach routine if mtk_wed_wo_init fails since both mtk_wed_attach and mtk_wed_detach run holding hw_lock mutex. Fixes: 4c5de09eb0d0 ("net: ethernet: mtk_wed: add configure wed wo support") Signed-off-by: Lorenzo Bianconi Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_wed.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit c79e0af5ae5e4de98595983fc7e883e2ca54db11 Author: Lorenzo Bianconi Date: Wed Dec 7 15:04:54 2022 +0100 net: ethernet: mtk_wed: fix some possible NULL pointer dereferences Fix possible NULL pointer dereference in mtk_wed_detach routine checking wo pointer is properly allocated before running mtk_wed_wo_reset() and mtk_wed_wo_deinit(). Even if it is just a theoretical issue at the moment check wo pointer is not NULL in mtk_wed_mcu_msg_update. Moreover, honor mtk_wed_mcu_send_msg return value in mtk_wed_wo_reset() Fixes: 799684448e3e ("net: ethernet: mtk_wed: introduce wed wo support") Fixes: 4c5de09eb0d0 ("net: ethernet: mtk_wed: add configure wed wo support") Signed-off-by: Lorenzo Bianconi Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_wed.c | 13 ++++++++----- drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 3 +++ 2 files changed, 11 insertions(+), 5 deletions(-) commit 3df96774a4224fd96a54eff7446425f1fbd76006 Author: Colin Ian King Date: Wed Dec 7 09:43:12 2022 +0000 nfp: Fix spelling mistake "tha" -> "the" There is a spelling mistake in a nn_dp_warn message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20221207094312.2281493-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/ccm_mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17961a37ce4077ae43128ba5ce0b1dfd8f02fdb9 Author: Björn Töpel Date: Tue Dec 6 11:28:38 2022 +0100 selftests: net: Fix O=dir builds The BPF Makefile in net/bpf did incorrect path substitution for O=dir builds, e.g. make O=/tmp/kselftest headers make O=/tmp/kselftest -C tools/testing/selftests would fail in selftest builds [1] net/ with clang-16: error: no such file or directory: 'kselftest/net/bpf/nat6to4.c' clang-16: error: no input files Add a pattern prerequisite and an order-only-prerequisite (for creating the directory), to resolve the issue. [1] https://lore.kernel.org/all/202212060009.34CkQmCN-lkp@intel.com/ Reported-by: kernel test robot Fixes: 837a3d66d698 ("selftests: net: Add cross-compilation support for BPF programs") Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20221206102838.272584-1-bjorn@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/bpf/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8994d11395f8165b3deca1971946f549f0822630 Author: Jan Kara Date: Wed Dec 7 12:59:28 2022 +0100 ext4: avoid unaccounted block allocation when expanding inode When expanding inode space in ext4_expand_extra_isize_ea() we may need to allocate external xattr block. If quota is not initialized for the inode, the block allocation will not be accounted into quota usage. Make sure the quota is initialized before we try to expand inode space. Reported-by: Pengfei Xu Link: https://lore.kernel.org/all/Y5BT+k6xWqthZc1P@xpf.sh.intel.com Signed-off-by: Jan Kara Cc: stable@kernel.org Link: https://lore.kernel.org/r/20221207115937.26601-2-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1485f726c6dec1a1f85438f2962feaa3d585526f Author: Jan Kara Date: Wed Dec 7 12:59:27 2022 +0100 ext4: initialize quota before expanding inode in setproject ioctl Make sure we initialize quotas before possibly expanding inode space (and thus maybe needing to allocate external xattr block) in ext4_ioctl_setproject(). This prevents not accounting the necessary block allocation. Signed-off-by: Jan Kara Cc: stable@kernel.org Link: https://lore.kernel.org/r/20221207115937.26601-1-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/ioctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dae999602eeb0c5482bb62df7fda903f1edc0ff3 Author: Jan Kara Date: Wed Dec 7 12:27:15 2022 +0100 ext4: stop providing .writepage hook Now we don't need .writepage hook for anything anymore. Reclaim is fine with relying on .writepages to clean pages and we often couldn't do much from the .writepage callback anyway. We only need to provide .migrate_folio callback for the ext4_journalled_aops - let's use buffer_migrate_page_norefs() there so that buffers cannot be modified under jdb2's hands as that can cause data corruption. For example when commit code does writeout of transaction buffers in jbd2_journal_write_metadata_buffer(), we don't hold page lock or have page writeback bit set or have the buffer locked. So page migration code would go and happily migrate the page elsewhere while the copy is running thus corrupting data. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221207112722.22220-12-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e26355e21520e56732f58590b812ca619b88ac72 Author: Jan Kara Date: Wed Dec 7 12:27:14 2022 +0100 mm: export buffer_migrate_folio_norefs() Ext4 needs this function to allow safe migration for journalled data pages. Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221207112722.22220-11-jack@suse.cz Signed-off-by: Theodore Ts'o mm/migrate.c | 1 + 1 file changed, 1 insertion(+) commit 49977f9762fe0f28ec08bec5ab992a5c9623f44c Author: Jan Kara Date: Wed Dec 7 12:27:13 2022 +0100 ext4: switch to using write_cache_pages() for data=journal writeout Instead of using generic_writepages(), let's use write_cache_pages() for writeout of journalled data. It will allow us to stop providing .writepage callback. Our data=journal writeback path would benefit from a larger cleanup and refactoring but that's for a separate cleanup series. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221207112722.22220-10-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit f30ff35f6266993405c8659e48fddc3180692164 Author: Jan Kara Date: Wed Dec 7 12:27:12 2022 +0100 jbd2: switch jbd2_submit_inode_data() to use fs-provided hook for data writeout jbd2_submit_inode_data() hardcoded use of jbd2_journal_submit_inode_data_buffers() for submission of data pages. Make it use j_submit_inode_data_buffers hook instead. This effectively switches ext4 fastcommits to use ext4_writepages() for data writeout instead of generic_writepages(). Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221207112722.22220-9-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/fast_commit.c | 2 +- fs/jbd2/commit.c | 5 ++--- include/linux/jbd2.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) commit 59205c8d4eaeeb85cf76eb1cb140283cf900412a Author: Jan Kara Date: Wed Dec 7 12:27:11 2022 +0100 ext4: switch to using ext4_do_writepages() for ordered data writeout Use the standard writepages method (ext4_do_writepages()) to perform writeout of ordered data during journal commit. Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221207112722.22220-8-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 1 + fs/ext4/inode.c | 16 ++++++++++++++++ fs/ext4/super.c | 3 +-- 3 files changed, 18 insertions(+), 2 deletions(-) commit 29bc9cea0e13dc8043c249f5f232b9e0c441ae24 Author: Jan Kara Date: Wed Dec 7 12:27:10 2022 +0100 ext4: move percpu_rwsem protection into ext4_writepages() Move protection by percpu_rwsem from ext4_do_writepages() to ext4_writepages(). We will not want to grab this protection during transaction commits as that would be prone to deadlocks and the protection is not needed. Move the shutdown state checking as well since we want to be able to complete commit while the shutdown is in progress. Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221207112722.22220-7-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 15648d599cd1c15cc678039dcab65599276fe407 Author: Jan Kara Date: Wed Dec 7 12:27:09 2022 +0100 ext4: provide ext4_do_writepages() Provide ext4_do_writepages() function that takes mpage_da_data as an argument and make ext4_writepages() just a simple wrapper around it. No functional changes. Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221207112722.22220-6-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 96 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 42 deletions(-) commit de0039f69c95692539bcb7cfc3b01f31e1c9f342 Author: Jan Kara Date: Wed Dec 7 12:27:08 2022 +0100 ext4: add support for writepages calls that cannot map blocks Add support for calls to ext4_writepages() than cannot map blocks. These will be issued from jbd2 transaction commit code. Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221207112722.22220-5-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 62 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 14 deletions(-) commit 5c27088b3bcf82c8525ec55cde7d2ddd034283b6 Author: Jan Kara Date: Wed Dec 7 12:27:07 2022 +0100 ext4: drop pointless IO submission from ext4_bio_write_page() We submit outstanding IO in ext4_bio_write_page() if we find a buffer we are not going to write. This is however pointless because we already handle submission of previous IO in case we detect newly added buffer head is discontiguous. So just delete the pointless IO submission call. Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221207112722.22220-4-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/page-io.c | 2 -- 1 file changed, 2 deletions(-) commit 29b83c574b0a06f29126e4e18801ba0e5d2e089b Author: Jan Kara Date: Wed Dec 7 12:27:06 2022 +0100 ext4: remove nr_submitted from ext4_bio_write_page() nr_submitted is the same as nr_to_submit. Drop one of them. Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221207112722.22220-3-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/page-io.c | 2 -- 1 file changed, 2 deletions(-) commit dff4ac75eeeefc4397fe7cf8ce559425bf46b1f7 Author: Jan Kara Date: Wed Dec 7 12:27:05 2022 +0100 ext4: move keep_towrite handling to ext4_bio_write_page() When we are writing back page but we cannot for some reason write all its buffers (e.g. because we cannot allocate blocks in current context) we have to keep TOWRITE tag set in the mapping as otherwise racing WB_SYNC_ALL writeback that could write these buffers can skip the page and result in data loss. We will need this logic for writeback during transaction commit so move the logic from ext4_writepage() to ext4_bio_write_page(). Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221207112722.22220-2-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 3 +-- fs/ext4/inode.c | 6 ++---- fs/ext4/page-io.c | 36 +++++++++++++++++++++--------------- 3 files changed, 24 insertions(+), 21 deletions(-) commit 04e568a3b31cfbd545c04c8bfc35c20e5ccfce0f Author: Jan Kara Date: Wed Dec 7 12:27:04 2022 +0100 ext4: handle redirtying in ext4_bio_write_page() Since we want to transition transaction commits to use ext4_writepages() for writing back ordered, add handling of page redirtying into ext4_bio_write_page(). Also move buffer dirty bit clearing into the same place other buffer state handling. Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221207112722.22220-1-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/page-io.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 5c099c4fdc438014d5893629e70a8ba934433ee8 Author: Ye Bin Date: Tue Dec 6 22:41:34 2022 +0800 ext4: fix kernel BUG in 'ext4_write_inline_data_end()' Syzbot report follow issue: ------------[ cut here ]------------ kernel BUG at fs/ext4/inline.c:227! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 3629 Comm: syz-executor212 Not tainted 6.1.0-rc5-syzkaller-00018-g59d0d52c30d4 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:ext4_write_inline_data+0x344/0x3e0 fs/ext4/inline.c:227 RSP: 0018:ffffc90003b3f368 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff8880704e16c0 RCX: 0000000000000000 RDX: ffff888021763a80 RSI: ffffffff821e31a4 RDI: 0000000000000006 RBP: 000000000006818e R08: 0000000000000006 R09: 0000000000068199 R10: 0000000000000079 R11: 0000000000000000 R12: 000000000000000b R13: 0000000000068199 R14: ffffc90003b3f408 R15: ffff8880704e1c82 FS: 000055555723e3c0(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fffe8ac9080 CR3: 0000000079f81000 CR4: 0000000000350ee0 Call Trace: ext4_write_inline_data_end+0x2a3/0x12f0 fs/ext4/inline.c:768 ext4_write_end+0x242/0xdd0 fs/ext4/inode.c:1313 ext4_da_write_end+0x3ed/0xa30 fs/ext4/inode.c:3063 generic_perform_write+0x316/0x570 mm/filemap.c:3764 ext4_buffered_write_iter+0x15b/0x460 fs/ext4/file.c:285 ext4_file_write_iter+0x8bc/0x16e0 fs/ext4/file.c:700 call_write_iter include/linux/fs.h:2191 [inline] do_iter_readv_writev+0x20b/0x3b0 fs/read_write.c:735 do_iter_write+0x182/0x700 fs/read_write.c:861 vfs_iter_write+0x74/0xa0 fs/read_write.c:902 iter_file_splice_write+0x745/0xc90 fs/splice.c:686 do_splice_from fs/splice.c:764 [inline] direct_splice_actor+0x114/0x180 fs/splice.c:931 splice_direct_to_actor+0x335/0x8a0 fs/splice.c:886 do_splice_direct+0x1ab/0x280 fs/splice.c:974 do_sendfile+0xb19/0x1270 fs/read_write.c:1255 __do_sys_sendfile64 fs/read_write.c:1323 [inline] __se_sys_sendfile64 fs/read_write.c:1309 [inline] __x64_sys_sendfile64+0x1d0/0x210 fs/read_write.c:1309 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 ---[ end trace 0000000000000000 ]--- Above issue may happens as follows: ext4_da_write_begin ext4_da_write_inline_data_begin ext4_da_convert_inline_data_to_extent ext4_clear_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA); ext4_da_write_end ext4_run_li_request ext4_mb_prefetch ext4_read_block_bitmap_nowait ext4_validate_block_bitmap ext4_mark_group_bitmap_corrupted(sb, block_group, EXT4_GROUP_INFO_BBITMAP_CORRUPT) percpu_counter_sub(&sbi->s_freeclusters_counter,grp->bb_free); -> sbi->s_freeclusters_counter become zero ext4_da_write_begin if (ext4_nonda_switch(inode->i_sb)) -> As freeclusters_counter is zero will return true *fsdata = (void *)FALL_BACK_TO_NONDELALLOC; ext4_write_begin ext4_da_write_end if (write_mode == FALL_BACK_TO_NONDELALLOC) ext4_write_end if (inline_data) ext4_write_inline_data_end ext4_write_inline_data BUG_ON(pos + len > EXT4_I(inode)->i_inline_size); -> As inode is already convert to extent, so 'pos + len' > inline_size -> then trigger BUG. To solve this issue, instead of checking ext4_has_inline_data() which is only cleared after data has been written back, check the EXT4_STATE_MAY_INLINE_DATA flag in ext4_write_end(). Fixes: f19d5870cbf7 ("ext4: add normal write support for inline data") Reported-by: syzbot+4faa160fa96bfba639f8@syzkaller.appspotmail.com Reported-by: Jun Nie Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20221206144134.1919987-1-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d73eff68a8c0ea3fc626b08ea84e4cd327ccbe5f Author: Guoqing Jiang Date: Fri Dec 2 20:04:09 2022 +0800 ext4: make ext4_mb_initialize_context return void Change the return type to void since it always return 0, and no need to do the checking in ext4_mb_new_blocks. Signed-off-by: Guoqing Jiang Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221202120409.24098-1-guoqing.jiang@linux.dev Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit a44e84a9b7764c72896f7241a0ec9ac7e7ef38dd Author: Jan Kara Date: Wed Nov 23 20:39:50 2022 +0100 ext4: fix deadlock due to mbcache entry corruption When manipulating xattr blocks, we can deadlock infinitely looping inside ext4_xattr_block_set() where we constantly keep finding xattr block for reuse in mbcache but we are unable to reuse it because its reference count is too big. This happens because cache entry for the xattr block is marked as reusable (e_reusable set) although its reference count is too big. When this inconsistency happens, this inconsistent state is kept indefinitely and so ext4_xattr_block_set() keeps retrying indefinitely. The inconsistent state is caused by non-atomic update of e_reusable bit. e_reusable is part of a bitfield and e_reusable update can race with update of e_referenced bit in the same bitfield resulting in loss of one of the updates. Fix the problem by using atomic bitops instead. This bug has been around for many years, but it became *much* easier to hit after commit 65f8b80053a1 ("ext4: fix race when reusing xattr blocks"). Cc: stable@vger.kernel.org Fixes: 6048c64b2609 ("mbcache: add reusable flag to cache entries") Fixes: 65f8b80053a1 ("ext4: fix race when reusing xattr blocks") Reported-and-tested-by: Jeremi Piotrowski Reported-by: Thilo Fromm Link: https://lore.kernel.org/r/c77bf00f-4618-7149-56f1-b8d1664b9d07@linux.microsoft.com/ Signed-off-by: Jan Kara Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20221123193950.16758-1-jack@suse.cz Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 4 ++-- fs/mbcache.c | 14 ++++++++------ include/linux/mbcache.h | 9 +++++++-- 3 files changed, 17 insertions(+), 10 deletions(-) commit b40ebaf63851b3a401b0dc9263843538f64f5ce6 Author: Jan Kara Date: Mon Nov 21 14:09:29 2022 +0100 ext4: avoid BUG_ON when creating xattrs Commit fb0a387dcdcd ("ext4: limit block allocations for indirect-block files to < 2^32") added code to try to allocate xattr block with 32-bit block number for indirect block based files on the grounds that these files cannot use larger block numbers. It also added BUG_ON when allocated block could not fit into 32 bits. This is however bogus reasoning because xattr block is stored in inode->i_file_acl and inode->i_file_acl_hi and as such even indirect block based files can happily use full 48 bits for xattr block number. The proper handling seems to be there basically since 64-bit block number support was added. So remove the bogus limitation and BUG_ON. Cc: Eric Sandeen Fixes: fb0a387dcdcd ("ext4: limit block allocations for indirect-block files to < 2^32") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221121130929.32031-1-jack@suse.cz Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/xattr.c | 8 -------- 1 file changed, 8 deletions(-) commit 956510c0c7439e90b8103aaeaf4da92878c622f0 Author: Alexander Potapenko Date: Mon Nov 21 12:21:30 2022 +0100 fs: ext4: initialize fsdata in pagecache_write() When aops->write_begin() does not initialize fsdata, KMSAN reports an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Cc: Eric Biggers Fixes: c93d8f885809 ("ext4: add basic fs-verity support") Reported-by: syzbot+9767be679ef5016b6082@syzkaller.appspotmail.com Signed-off-by: Alexander Potapenko Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20221121112134.407362-1-glider@google.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/verity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 131294c35ed6f777bd4e79d42af13b5c41bf2775 Author: Eric Whitney Date: Thu Nov 17 10:22:07 2022 -0500 ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline When converting files with inline data to extents, delayed allocations made on a file system created with both the bigalloc and inline options can result in invalid extent status cache content, incorrect reserved cluster counts, kernel memory leaks, and potential kernel panics. With bigalloc, the code that determines whether a block must be delayed allocated searches the extent tree to see if that block maps to a previously allocated cluster. If not, the block is delayed allocated, and otherwise, it isn't. However, if the inline option is also used, and if the file containing the block is marked as able to store data inline, there isn't a valid extent tree associated with the file. The current code in ext4_clu_mapped() calls ext4_find_extent() to search the non-existent tree for a previously allocated cluster anyway, which typically finds nothing, as desired. However, a side effect of the search can be to cache invalid content from the non-existent tree (garbage) in the extent status tree, including bogus entries in the pending reservation tree. To fix this, avoid searching the extent tree when allocating blocks for bigalloc + inline files that are being converted from inline to extent mapped. Signed-off-by: Eric Whitney Link: https://lore.kernel.org/r/20221117152207.2424-1-enwlinux@gmail.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/extents.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7ea71af94eaaaf6d9aed24bc94a05b977a741cb9 Author: Ye Bin Date: Thu Nov 17 15:36:03 2022 +0800 ext4: fix uninititialized value in 'ext4_evict_inode' Syzbot found the following issue: ===================================================== BUG: KMSAN: uninit-value in ext4_evict_inode+0xdd/0x26b0 fs/ext4/inode.c:180 ext4_evict_inode+0xdd/0x26b0 fs/ext4/inode.c:180 evict+0x365/0x9a0 fs/inode.c:664 iput_final fs/inode.c:1747 [inline] iput+0x985/0xdd0 fs/inode.c:1773 __ext4_new_inode+0xe54/0x7ec0 fs/ext4/ialloc.c:1361 ext4_mknod+0x376/0x840 fs/ext4/namei.c:2844 vfs_mknod+0x79d/0x830 fs/namei.c:3914 do_mknodat+0x47d/0xaa0 __do_sys_mknodat fs/namei.c:3992 [inline] __se_sys_mknodat fs/namei.c:3989 [inline] __ia32_sys_mknodat+0xeb/0x150 fs/namei.c:3989 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+0x33/0x70 arch/x86/entry/common.c:203 do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:246 entry_SYSENTER_compat_after_hwframe+0x70/0x82 Uninit was created at: __alloc_pages+0x9f1/0xe80 mm/page_alloc.c:5578 alloc_pages+0xaae/0xd80 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1794 [inline] allocate_slab+0x1b5/0x1010 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0x10c3/0x2d60 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc_lru+0x6f3/0xb30 mm/slub.c:3429 alloc_inode_sb include/linux/fs.h:3117 [inline] ext4_alloc_inode+0x5f/0x860 fs/ext4/super.c:1321 alloc_inode+0x83/0x440 fs/inode.c:259 new_inode_pseudo fs/inode.c:1018 [inline] new_inode+0x3b/0x430 fs/inode.c:1046 __ext4_new_inode+0x2a7/0x7ec0 fs/ext4/ialloc.c:959 ext4_mkdir+0x4d5/0x1560 fs/ext4/namei.c:2992 vfs_mkdir+0x62a/0x870 fs/namei.c:4035 do_mkdirat+0x466/0x7b0 fs/namei.c:4060 __do_sys_mkdirat fs/namei.c:4075 [inline] __se_sys_mkdirat fs/namei.c:4073 [inline] __ia32_sys_mkdirat+0xc4/0x120 fs/namei.c:4073 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+0x33/0x70 arch/x86/entry/common.c:203 do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:246 entry_SYSENTER_compat_after_hwframe+0x70/0x82 CPU: 1 PID: 4625 Comm: syz-executor.2 Not tainted 6.1.0-rc4-syzkaller-62821-gcb231e2f67ec #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 ===================================================== Now, 'ext4_alloc_inode()' didn't init 'ei->i_flags'. If new inode failed before set 'ei->i_flags' in '__ext4_new_inode()', then do 'iput()'. As after 6bc0d63dad7f commit will access 'ei->i_flags' in 'ext4_evict_inode()' which will lead to access uninit-value. To solve above issue just init 'ei->i_flags' in 'ext4_alloc_inode()'. Reported-by: syzbot+57b25da729eb0b88177d@syzkaller.appspotmail.com Signed-off-by: Ye Bin Fixes: 6bc0d63dad7f ("ext4: remove EA inode entry from mbcache on inode eviction") Reviewed-by: Jan Kara Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20221117073603.2598882-1-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/super.c | 1 + 1 file changed, 1 insertion(+) commit 0aeaa2559d6d53358fca3e3fce73807367adca74 Author: Baokun Li Date: Thu Nov 17 12:03:41 2022 +0800 ext4: fix corruption when online resizing a 1K bigalloc fs When a backup superblock is updated in update_backups(), the primary superblock's offset in the group (that is, sbi->s_sbh->b_blocknr) is used as the backup superblock's offset in its group. However, when the block size is 1K and bigalloc is enabled, the two offsets are not equal. This causes the backup group descriptors to be overwritten by the superblock in update_backups(). Moreover, if meta_bg is enabled, the file system will be corrupted because this feature uses backup group descriptors. To solve this issue, we use a more accurate ext4_group_first_block_no() as the offset of the backup superblock in its group. Fixes: d77147ff443b ("ext4: add support for online resizing with bigalloc") Signed-off-by: Baokun Li Reviewed-by: Jan Kara Cc: stable@kernel.org Link: https://lore.kernel.org/r/20221117040341.1380702-4-libaokun1@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/resize.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8f49ec603ae3e213bfab2799182724e3abac55a1 Author: Baokun Li Date: Thu Nov 17 12:03:40 2022 +0800 ext4: fix corrupt backup group descriptors after online resize In commit 9a8c5b0d0615 ("ext4: update the backup superblock's at the end of the online resize"), it is assumed that update_backups() only updates backup superblocks, so each b_data is treated as a backupsuper block to update its s_block_group_nr and s_checksum. However, update_backups() also updates the backup group descriptors, which causes the backup group descriptors to be corrupted. The above commit fixes the problem of invalid checksum of the backup superblock. The root cause of this problem is that the checksum of ext4_update_super() is not set correctly. This problem has been fixed in the previous patch ("ext4: fix bad checksum after online resize"). However, we do need to set block_group_nr for the backup superblock in update_backups(). When a block is in a group that contains a backup superblock, and the block is the first block in the group, the block is definitely a superblock. We add a helper function that includes setting s_block_group_nr and updating checksum, and then call it only when the above conditions are met to prevent the backup group descriptors from being incorrectly modified. Fixes: 9a8c5b0d0615 ("ext4: update the backup superblock's at the end of the online resize") Signed-off-by: Baokun Li Reviewed-by: Jan Kara Cc: stable@kernel.org Link: https://lore.kernel.org/r/20221117040341.1380702-3-libaokun1@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/resize.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit a408f33e895e455f16cf964cb5cd4979b658db7b Author: Baokun Li Date: Thu Nov 17 12:03:39 2022 +0800 ext4: fix bad checksum after online resize When online resizing is performed twice consecutively, the error message "Superblock checksum does not match superblock" is displayed for the second time. Here's the reproducer: mkfs.ext4 -F /dev/sdb 100M mount /dev/sdb /tmp/test resize2fs /dev/sdb 5G resize2fs /dev/sdb 6G To solve this issue, we moved the update of the checksum after the es->s_overhead_clusters is updated. Fixes: 026d0d27c488 ("ext4: reduce computation of overhead during resize") Fixes: de394a86658f ("ext4: update s_overhead_clusters in the superblock during an on-line resize") Signed-off-by: Baokun Li Reviewed-by: Darrick J. Wong Reviewed-by: Jan Kara Cc: stable@kernel.org Link: https://lore.kernel.org/r/20221117040341.1380702-2-libaokun1@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/resize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a7e9d977e031fceefe1e7cd69ebd7202d5758b56 Author: Darrick J. Wong Date: Thu Nov 10 12:16:34 2022 -0800 ext4: don't fail GETFSUUID when the caller provides a long buffer If userspace provides a longer UUID buffer than is required, we shouldn't fail the call with EINVAL -- rather, we can fill the caller's buffer with the bytes we /can/ fill, and update the length field to reflect what we copied. This doesn't break the UAPI since we're enabling a case that currently fails, and so far Ted hasn't released a version of e2fsprogs that uses the new ext4 ioctl. Signed-off-by: Darrick J. Wong Reviewed-by: Catherine Hoang Link: https://lore.kernel.org/r/166811139478.327006.13879198441587445544.stgit@magnolia Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/ioctl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b76abb5157468756163fe7e3431c9fe32cba57ca Author: Darrick J. Wong Date: Thu Nov 10 12:16:29 2022 -0800 ext4: dont return EINVAL from GETFSUUID when reporting UUID length If userspace calls this ioctl with fsu_length (the length of the fsuuid.fsu_uuid array) set to zero, ext4 copies the desired uuid length out to userspace. The kernel call returned a result from a valid input, so the return value here should be zero, not EINVAL. While we're at it, fix the copy_to_user call to make it clear that we're only copying out fsu_len. Signed-off-by: Darrick J. Wong Reviewed-by: Catherine Hoang Link: https://lore.kernel.org/r/166811138914.327006.9241306894437166566.stgit@magnolia Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/ioctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 26d75a16af285a70863ba6a81f85d81e7e65da50 Author: Luís Henriques Date: Wed Nov 9 18:14:45 2022 +0000 ext4: fix error code return to user-space in ext4_get_branch() If a block is out of range in ext4_get_branch(), -ENOMEM will be returned to user-space. Obviously, this error code isn't really useful. This patch fixes it by making sure the right error code (-EFSCORRUPTED) is propagated to user-space. EUCLEAN is more informative than ENOMEM. Signed-off-by: Luís Henriques Link: https://lore.kernel.org/r/20221109181445.17843-1-lhenriques@suse.de Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/indirect.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 060f77392cab1c1cefb8a27cf6bd61f1db2441ec Author: JunChao Sun Date: Wed Nov 9 07:38:22 2022 -0800 ext4: replace kmem_cache_create with KMEM_CACHE Replace kmem_cache_create with KMEM_CACHE macro that guaranteed struct alignment Signed-off-by: JunChao Sun Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221109153822.80250-1-sunjunchao2870@gmail.com Signed-off-by: Theodore Ts'o fs/ext4/extents_status.c | 8 ++------ fs/ext4/readpage.c | 5 ++--- 2 files changed, 4 insertions(+), 9 deletions(-) commit 89481b5fa8c0640e62ba84c6020cee895f7ac643 Author: Baokun Li Date: Wed Nov 9 15:43:43 2022 +0800 ext4: correct inconsistent error msg in nojournal mode When we used the journal_async_commit mounting option in nojournal mode, the kernel told me that "can't mount with journal_checksum", was very confusing. I find that when we mount with journal_async_commit, both the JOURNAL_ASYNC_COMMIT and EXPLICIT_JOURNAL_CHECKSUM flags are set. However, in the error branch, CHECKSUM is checked before ASYNC_COMMIT. As a result, the above inconsistency occurs, and the ASYNC_COMMIT branch becomes dead code that cannot be executed. Therefore, we exchange the positions of the two judgments to make the error msg more accurate. Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221109074343.4184862-1-libaokun1@huawei.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/super.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit bb0fbc782ee9fa8c970c8e8e17c1a52ff9419182 Author: Lukas Czerner Date: Tue Nov 8 15:50:42 2022 +0100 ext4: print file system UUID on mount, remount and unmount The device names are not necessarily consistent across reboots which can make it more difficult to identify the right file system when tracking down issues using system logs. Print file system UUID string on every mount, remount and unmount to make this task easier. This is similar to the functionality recently propsed for XFS. Signed-off-by: Lukas Czerner Cc: Lukas Herbolt Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20221108145042.85770-1-lczerner@redhat.com Signed-off-by: Theodore Ts'o fs/ext4/super.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit fae381a3d79bb94aa2eb752170d47458d778b797 Author: Ye Bin Date: Mon Nov 7 09:53:35 2022 +0800 ext4: init quota for 'old.inode' in 'ext4_rename' Syzbot found the following issue: ext4_parse_param: s_want_extra_isize=128 ext4_inode_info_init: s_want_extra_isize=32 ext4_rename: old.inode=ffff88823869a2c8 old.dir=ffff888238699828 new.inode=ffff88823869d7e8 new.dir=ffff888238699828 __ext4_mark_inode_dirty: inode=ffff888238699828 ea_isize=32 want_ea_size=128 __ext4_mark_inode_dirty: inode=ffff88823869a2c8 ea_isize=32 want_ea_size=128 ext4_xattr_block_set: inode=ffff88823869a2c8 ------------[ cut here ]------------ WARNING: CPU: 13 PID: 2234 at fs/ext4/xattr.c:2070 ext4_xattr_block_set.cold+0x22/0x980 Modules linked in: RIP: 0010:ext4_xattr_block_set.cold+0x22/0x980 RSP: 0018:ffff888227d3f3b0 EFLAGS: 00010202 RAX: 0000000000000001 RBX: ffff88823007a000 RCX: 0000000000000000 RDX: 0000000000000a03 RSI: 0000000000000040 RDI: ffff888230078178 RBP: 0000000000000000 R08: 000000000000002c R09: ffffed1075c7df8e R10: ffff8883ae3efc6b R11: ffffed1075c7df8d R12: 0000000000000000 R13: ffff88823869a2c8 R14: ffff8881012e0460 R15: dffffc0000000000 FS: 00007f350ac1f740(0000) GS:ffff8883ae200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f350a6ed6a0 CR3: 0000000237456000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? ext4_xattr_set_entry+0x3b7/0x2320 ? ext4_xattr_block_set+0x0/0x2020 ? ext4_xattr_set_entry+0x0/0x2320 ? ext4_xattr_check_entries+0x77/0x310 ? ext4_xattr_ibody_set+0x23b/0x340 ext4_xattr_move_to_block+0x594/0x720 ext4_expand_extra_isize_ea+0x59a/0x10f0 __ext4_expand_extra_isize+0x278/0x3f0 __ext4_mark_inode_dirty.cold+0x347/0x410 ext4_rename+0xed3/0x174f vfs_rename+0x13a7/0x2510 do_renameat2+0x55d/0x920 __x64_sys_rename+0x7d/0xb0 do_syscall_64+0x3b/0xa0 entry_SYSCALL_64_after_hwframe+0x72/0xdc As 'ext4_rename' will modify 'old.inode' ctime and mark inode dirty, which may trigger expand 'extra_isize' and allocate block. If inode didn't init quota will lead to warning. To solve above issue, init 'old.inode' firstly in 'ext4_rename'. Reported-by: syzbot+98346927678ac3059c77@syzkaller.appspotmail.com Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221107015335.2524319-1-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/namei.c | 3 +++ 1 file changed, 3 insertions(+) commit 8805dbcb3e83a4e5a6c91edc15643a7498e576ce Author: Eric Biggers Date: Sun Nov 6 14:48:41 2022 -0800 ext4: simplify fast-commit CRC calculation Instead of checksumming each field as it is added to the block, just checksum each block before it is written. This is simpler, and also much more efficient. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221106224841.279231-8-ebiggers@kernel.org Signed-off-by: Theodore Ts'o fs/ext4/fast_commit.c | 54 +++++++++++++++------------------------------------ 1 file changed, 16 insertions(+), 38 deletions(-) commit 48a6a66db82b8043d298a630f22c62d43550cae5 Author: Eric Biggers Date: Sun Nov 6 14:48:40 2022 -0800 ext4: fix off-by-one errors in fast-commit block filling Due to several different off-by-one errors, or perhaps due to a late change in design that wasn't fully reflected in the code that was actually merged, there are several very strange constraints on how fast-commit blocks are filled with tlv entries: - tlvs must start at least 10 bytes before the end of the block, even though the minimum tlv length is 8. Otherwise, the replay code will ignore them. (BUG: ext4_fc_reserve_space() could violate this requirement if called with a len of blocksize - 9 or blocksize - 8. Fortunately, this doesn't seem to happen currently.) - tlvs must end at least 1 byte before the end of the block. Otherwise the replay code will consider them to be invalid. This quirk contributed to a bug (fixed by an earlier commit) where uninitialized memory was being leaked to disk in the last byte of blocks. Also, strangely these constraints don't apply to the replay code in e2fsprogs, which will accept any tlvs in the blocks (with no bounds checks at all, but that is a separate issue...). Given that this all seems to be a bug, let's fix it by just filling blocks with tlv entries in the natural way. Note that old kernels will be unable to replay fast-commit journals created by kernels that have this commit. Fixes: aa75f4d3daae ("ext4: main fast-commit commit path") Cc: # v5.10+ Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221106224841.279231-7-ebiggers@kernel.org Signed-off-by: Theodore Ts'o fs/ext4/fast_commit.c | 66 +++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit 8415ce07ecf0cc25efdd5db264a7133716e503cf Author: Eric Biggers Date: Sun Nov 6 14:48:39 2022 -0800 ext4: fix unaligned memory access in ext4_fc_reserve_space() As is done elsewhere in the file, build the struct ext4_fc_tl on the stack and memcpy() it into the buffer, rather than directly writing it to a potentially-unaligned location in the buffer. Fixes: aa75f4d3daae ("ext4: main fast-commit commit path") Cc: # v5.10+ Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221106224841.279231-6-ebiggers@kernel.org Signed-off-by: Theodore Ts'o fs/ext4/fast_commit.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) commit 64b4a25c3de81a69724e888ec2db3533b43816e2 Author: Eric Biggers Date: Sun Nov 6 14:48:38 2022 -0800 ext4: add missing validation of fast-commit record lengths Validate the inode and filename lengths in fast-commit journal records so that a malicious fast-commit journal cannot cause a crash by having invalid values for these. Also validate EXT4_FC_TAG_DEL_RANGE. Fixes: aa75f4d3daae ("ext4: main fast-commit commit path") Cc: # v5.10+ Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221106224841.279231-5-ebiggers@kernel.org Signed-off-by: Theodore Ts'o fs/ext4/fast_commit.c | 38 +++++++++++++++++++------------------- fs/ext4/fast_commit.h | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) commit 594bc43b410316d70bb42aeff168837888d96810 Author: Eric Biggers Date: Sun Nov 6 14:48:37 2022 -0800 ext4: fix leaking uninitialized memory in fast-commit journal When space at the end of fast-commit journal blocks is unused, make sure to zero it out so that uninitialized memory is not leaked to disk. Fixes: aa75f4d3daae ("ext4: main fast-commit commit path") Cc: # v5.10+ Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221106224841.279231-4-ebiggers@kernel.org Signed-off-by: Theodore Ts'o fs/ext4/fast_commit.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4c0d5778385cb3618ff26a561ce41de2b7d9de70 Author: Eric Biggers Date: Sun Nov 6 14:48:36 2022 -0800 ext4: don't set up encryption key during jbd2 transaction Commit a80f7fcf1867 ("ext4: fixup ext4_fc_track_* functions' signature") extended the scope of the transaction in ext4_unlink() too far, making it include the call to ext4_find_entry(). However, ext4_find_entry() can deadlock when called from within a transaction because it may need to set up the directory's encryption key. Fix this by restoring the transaction to its original scope. Reported-by: syzbot+1a748d0007eeac3ab079@syzkaller.appspotmail.com Fixes: a80f7fcf1867 ("ext4: fixup ext4_fc_track_* functions' signature") Cc: # v5.10+ Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221106224841.279231-3-ebiggers@kernel.org Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 4 ++-- fs/ext4/fast_commit.c | 2 +- fs/ext4/namei.c | 44 ++++++++++++++++++++++++-------------------- 3 files changed, 27 insertions(+), 23 deletions(-) commit 0fbcb5251fc81b58969b272c4fb7374a7b922e3e Author: Eric Biggers Date: Sun Nov 6 14:48:35 2022 -0800 ext4: disable fast-commit of encrypted dir operations fast-commit of create, link, and unlink operations in encrypted directories is completely broken because the unencrypted filenames are being written to the fast-commit journal instead of the encrypted filenames. These operations can't be replayed, as encryption keys aren't present at journal replay time. It is also an information leak. Until if/when we can get this working properly, make encrypted directory operations ineligible for fast-commit. Note that fast-commit operations on encrypted regular files continue to be allowed, as they seem to work. Fixes: aa75f4d3daae ("ext4: main fast-commit commit path") Cc: # v5.10+ Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221106224841.279231-2-ebiggers@kernel.org Signed-off-by: Theodore Ts'o fs/ext4/fast_commit.c | 41 +++++++++++++++++++++++++---------------- fs/ext4/fast_commit.h | 1 + include/trace/events/ext4.h | 7 +++++-- 3 files changed, 31 insertions(+), 18 deletions(-) commit a71248b1accb2b42e4980afef4fa4a27fa0e36f5 Author: Baokun Li Date: Wed Nov 2 16:06:33 2022 +0800 ext4: fix use-after-free in ext4_orphan_cleanup I caught a issue as follows: ================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x28/0x1a0 Read of size 8 at addr ffff88814b13f378 by task mount/710 CPU: 1 PID: 710 Comm: mount Not tainted 6.1.0-rc3-next #370 Call Trace: dump_stack_lvl+0x73/0x9f print_report+0x25d/0x759 kasan_report+0xc0/0x120 __asan_load8+0x99/0x140 __list_add_valid+0x28/0x1a0 ext4_orphan_cleanup+0x564/0x9d0 [ext4] __ext4_fill_super+0x48e2/0x5300 [ext4] ext4_fill_super+0x19f/0x3a0 [ext4] get_tree_bdev+0x27b/0x450 ext4_get_tree+0x19/0x30 [ext4] vfs_get_tree+0x49/0x150 path_mount+0xaae/0x1350 do_mount+0xe2/0x110 __x64_sys_mount+0xf0/0x190 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd [...] ================================================================== Above issue may happen as follows: ------------------------------------- ext4_fill_super ext4_orphan_cleanup --- loop1: assume last_orphan is 12 --- list_add(&EXT4_I(inode)->i_orphan, &EXT4_SB(sb)->s_orphan) ext4_truncate --> return 0 ext4_inode_attach_jinode --> return -ENOMEM iput(inode) --> free inode<12> --- loop2: last_orphan is still 12 --- list_add(&EXT4_I(inode)->i_orphan, &EXT4_SB(sb)->s_orphan); // use inode<12> and trigger UAF To solve this issue, we need to propagate the return value of ext4_inode_attach_jinode() appropriately. Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221102080633.1630225-1-libaokun1@huawei.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 105c78e12468413e426625831faa7db4284e1fec Author: Eric Biggers Date: Tue Nov 1 22:33:12 2022 -0700 ext4: don't allow journal inode to have encrypt flag Mounting a filesystem whose journal inode has the encrypt flag causes a NULL dereference in fscrypt_limit_io_blocks() when the 'inlinecrypt' mount option is used. The problem is that when jbd2_journal_init_inode() calls bmap(), it eventually finds its way into ext4_iomap_begin(), which calls fscrypt_limit_io_blocks(). fscrypt_limit_io_blocks() requires that if the inode is encrypted, then its encryption key must already be set up. That's not the case here, since the journal inode is never "opened" like a normal file would be. Hence the crash. A reproducer is: mkfs.ext4 -F /dev/vdb debugfs -w /dev/vdb -R "set_inode_field <8> flags 0x80808" mount /dev/vdb /mnt -o inlinecrypt To fix this, make ext4 consider journal inodes with the encrypt flag to be invalid. (Note, maybe other flags should be rejected on the journal inode too. For now, this is just the minimal fix for the above issue.) I've marked this as fixing the commit that introduced the call to fscrypt_limit_io_blocks(), since that's what made an actual crash start being possible. But this fix could be applied to any version of ext4 that supports the encrypt feature. Reported-by: syzbot+ba9dac45bc76c490b7c3@syzkaller.appspotmail.com Fixes: 38ea50daa7a4 ("ext4: support direct I/O with fscrypt using blk-crypto") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221102053312.189962-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bf678a0f9c017c9ba7c581541dbc8453452a7ae Author: Gaosheng Cui Date: Mon Oct 31 13:58:33 2022 +0800 ext4: fix undefined behavior in bit shift for ext4_check_flag_values Shifting signed 32-bit value by 31 bits is undefined, so changing significant bit to unsigned. The UBSAN warning calltrace like below: UBSAN: shift-out-of-bounds in fs/ext4/ext4.h:591:2 left shift of 1 by 31 places cannot be represented in type 'int' Call Trace: dump_stack_lvl+0x7d/0xa5 dump_stack+0x15/0x1b ubsan_epilogue+0xe/0x4e __ubsan_handle_shift_out_of_bounds+0x1e7/0x20c ext4_init_fs+0x5a/0x277 do_one_initcall+0x76/0x430 kernel_init_freeable+0x3b3/0x422 kernel_init+0x24/0x1e0 ret_from_fork+0x1f/0x30 Fixes: 9a4c80194713 ("ext4: ensure Inode flags consistency are checked at build time") Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20221031055833.3966222-1-cuigaosheng1@huawei.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/ext4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 991ed014de0840c5dc405b679168924afb2952ac Author: Baokun Li Date: Wed Oct 26 12:23:10 2022 +0800 ext4: fix bug_on in __es_tree_search caused by bad boot loader inode We got a issue as fllows: ================================================================== kernel BUG at fs/ext4/extents_status.c:203! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 1 PID: 945 Comm: cat Not tainted 6.0.0-next-20221007-dirty #349 RIP: 0010:ext4_es_end.isra.0+0x34/0x42 RSP: 0018:ffffc9000143b768 EFLAGS: 00010203 RAX: 0000000000000000 RBX: ffff8881769cd0b8 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff8fc27cf7 RDI: 00000000ffffffff RBP: ffff8881769cd0bc R08: 0000000000000000 R09: ffffc9000143b5f8 R10: 0000000000000001 R11: 0000000000000001 R12: ffff8881769cd0a0 R13: ffff8881768e5668 R14: 00000000768e52f0 R15: 0000000000000000 FS: 00007f359f7f05c0(0000)GS:ffff88842fd00000(0000)knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f359f5a2000 CR3: 000000017130c000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __es_tree_search.isra.0+0x6d/0xf5 ext4_es_cache_extent+0xfa/0x230 ext4_cache_extents+0xd2/0x110 ext4_find_extent+0x5d5/0x8c0 ext4_ext_map_blocks+0x9c/0x1d30 ext4_map_blocks+0x431/0xa50 ext4_mpage_readpages+0x48e/0xe40 ext4_readahead+0x47/0x50 read_pages+0x82/0x530 page_cache_ra_unbounded+0x199/0x2a0 do_page_cache_ra+0x47/0x70 page_cache_ra_order+0x242/0x400 ondemand_readahead+0x1e8/0x4b0 page_cache_sync_ra+0xf4/0x110 filemap_get_pages+0x131/0xb20 filemap_read+0xda/0x4b0 generic_file_read_iter+0x13a/0x250 ext4_file_read_iter+0x59/0x1d0 vfs_read+0x28f/0x460 ksys_read+0x73/0x160 __x64_sys_read+0x1e/0x30 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd ================================================================== In the above issue, ioctl invokes the swap_inode_boot_loader function to swap inode<5> and inode<12>. However, inode<5> contain incorrect imode and disordered extents, and i_nlink is set to 1. The extents check for inode in the ext4_iget function can be bypassed bacause 5 is EXT4_BOOT_LOADER_INO. While links_count is set to 1, the extents are not initialized in swap_inode_boot_loader. After the ioctl command is executed successfully, the extents are swapped to inode<12>, in this case, run the `cat` command to view inode<12>. And Bug_ON is triggered due to the incorrect extents. When the boot loader inode is not initialized, its imode can be one of the following: 1) the imode is a bad type, which is marked as bad_inode in ext4_iget and set to S_IFREG. 2) the imode is good type but not S_IFREG. 3) the imode is S_IFREG. The BUG_ON may be triggered by bypassing the check in cases 1 and 2. Therefore, when the boot loader inode is bad_inode or its imode is not S_IFREG, initialize the inode to avoid triggering the BUG. Signed-off-by: Baokun Li Reviewed-by: Jason Yan Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221026042310.3839669-5-libaokun1@huawei.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63b1e9bccb71fe7d7e3ddc9877dbdc85e5d2d023 Author: Baokun Li Date: Wed Oct 26 12:23:09 2022 +0800 ext4: add EXT4_IGET_BAD flag to prevent unexpected bad inode There are many places that will get unhappy (and crash) when ext4_iget() returns a bad inode. However, if iget the boot loader inode, allows a bad inode to be returned, because the inode may not be initialized. This mechanism can be used to bypass some checks and cause panic. To solve this problem, we add a special iget flag EXT4_IGET_BAD. Only with this flag we'd be returning bad inode from ext4_iget(), otherwise we always return the error code if the inode is bad inode.(suggested by Jan Kara) Signed-off-by: Baokun Li Reviewed-by: Jason Yan Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221026042310.3839669-4-libaokun1@huawei.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/ext4.h | 3 ++- fs/ext4/inode.c | 8 +++++++- fs/ext4/ioctl.c | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) commit 07342ec259df2a35d6a34aebce010567a80a0e15 Author: Baokun Li Date: Wed Oct 26 12:23:08 2022 +0800 ext4: add helper to check quota inums Before quota is enabled, a check on the preset quota inums in ext4_super_block is added to prevent wrong quota inodes from being loaded. In addition, when the quota fails to be enabled, the quota type and quota inum are printed to facilitate fault locating. Signed-off-by: Baokun Li Reviewed-by: Jason Yan Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221026042310.3839669-3-libaokun1@huawei.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/super.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit d323877484765aaacbb2769b06e355c2041ed115 Author: Baokun Li Date: Wed Oct 26 12:23:07 2022 +0800 ext4: fix bug_on in __es_tree_search caused by bad quota inode We got a issue as fllows: ================================================================== kernel BUG at fs/ext4/extents_status.c:202! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 1 PID: 810 Comm: mount Not tainted 6.1.0-rc1-next-g9631525255e3 #352 RIP: 0010:__es_tree_search.isra.0+0xb8/0xe0 RSP: 0018:ffffc90001227900 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 0000000077512a0f RCX: 0000000000000000 RDX: 0000000000000002 RSI: 0000000000002a10 RDI: ffff8881004cd0c8 RBP: ffff888177512ac8 R08: 47ffffffffffffff R09: 0000000000000001 R10: 0000000000000001 R11: 00000000000679af R12: 0000000000002a10 R13: ffff888177512d88 R14: 0000000077512a10 R15: 0000000000000000 FS: 00007f4bd76dbc40(0000)GS:ffff88842fd00000(0000)knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005653bf993cf8 CR3: 000000017bfdf000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_es_cache_extent+0xe2/0x210 ext4_cache_extents+0xd2/0x110 ext4_find_extent+0x5d5/0x8c0 ext4_ext_map_blocks+0x9c/0x1d30 ext4_map_blocks+0x431/0xa50 ext4_getblk+0x82/0x340 ext4_bread+0x14/0x110 ext4_quota_read+0xf0/0x180 v2_read_header+0x24/0x90 v2_check_quota_file+0x2f/0xa0 dquot_load_quota_sb+0x26c/0x760 dquot_load_quota_inode+0xa5/0x190 ext4_enable_quotas+0x14c/0x300 __ext4_fill_super+0x31cc/0x32c0 ext4_fill_super+0x115/0x2d0 get_tree_bdev+0x1d2/0x360 ext4_get_tree+0x19/0x30 vfs_get_tree+0x26/0xe0 path_mount+0x81d/0xfc0 do_mount+0x8d/0xc0 __x64_sys_mount+0xc0/0x160 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd ================================================================== Above issue may happen as follows: ------------------------------------- ext4_fill_super ext4_orphan_cleanup ext4_enable_quotas ext4_quota_enable ext4_iget --> get error inode <5> ext4_ext_check_inode --> Wrong imode makes it escape inspection make_bad_inode(inode) --> EXT4_BOOT_LOADER_INO set imode dquot_load_quota_inode vfs_setup_quota_inode --> check pass dquot_load_quota_sb v2_check_quota_file v2_read_header ext4_quota_read ext4_bread ext4_getblk ext4_map_blocks ext4_ext_map_blocks ext4_find_extent ext4_cache_extents ext4_es_cache_extent __es_tree_search.isra.0 ext4_es_end --> Wrong extents trigger BUG_ON In the above issue, s_usr_quota_inum is set to 5, but inode<5> contains incorrect imode and disordered extents. Because 5 is EXT4_BOOT_LOADER_INO, the ext4_ext_check_inode check in the ext4_iget function can be bypassed, finally, the extents that are not checked trigger the BUG_ON in the __es_tree_search function. To solve this issue, check whether the inode is bad_inode in vfs_setup_quota_inode(). Signed-off-by: Baokun Li Reviewed-by: Chaitanya Kulkarni Reviewed-by: Jason Yan Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221026042310.3839669-2-libaokun1@huawei.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/quota/dquot.c | 2 ++ 1 file changed, 2 insertions(+) commit 78742d4d056df7d2fad241c90185d281bf924844 Author: Luís Henriques Date: Tue Oct 11 16:57:58 2022 +0100 ext4: remove trailing newline from ext4_msg() message The ext4_msg() function adds a new line to the message. Remove extra '\n' from call to ext4_msg() in ext4_orphan_cleanup(). Signed-off-by: Luís Henriques Link: https://lore.kernel.org/r/20221011155758.15287-1-lhenriques@suse.de Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/orphan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d87a7b4c77a997d5388566dd511ca8e6b8e8a0a8 Author: Bixuan Cui Date: Tue Oct 11 19:33:44 2022 +0800 jbd2: use the correct print format The print format error was found when using ftrace event: <...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 transaction -1866216965 sync 0 head -1866217368 <...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 transaction -1866216964 sync 0 Use the correct print format for transaction, head and tid. Fixes: 879c5e6b7cb4 ('jbd2: convert instrumentation from markers to tracepoints') Signed-off-by: Bixuan Cui Reviewed-by: Jason Yan Link: https://lore.kernel.org/r/1665488024-95172-1-git-send-email-cuibixuan@linux.alibaba.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org include/trace/events/jbd2.h | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit ce87a957f1d50205964728b2f1bc6e40243c7b85 Merge: 837e8ac87149 db401875f438 Author: Jakub Kicinski Date: Thu Dec 8 18:46:33 2022 -0800 Merge branch 'mlxsw-add-spectrum-1-ip6gre-support' Petr Machata says: ==================== mlxsw: Add Spectrum-1 ip6gre support Ido Schimmel writes: Currently, mlxsw only supports ip6gre offload on Spectrum-2 and newer ASICs. Spectrum-1 can also offload ip6gre tunnels, but it needs double entry router interfaces (RIFs) for the RIFs representing these tunnels. In addition, the RIF index needs to be even. This is handled in patches #1-#3. The implementation can otherwise be shared between all Spectrum generations. This is handled in patches #4-#5. Patch #6 moves a mlxsw ip6gre selftest to a shared directory, as ip6gre is no longer only supported on Spectrum-2 and newer ASICs. This work is motivated by users that require multiple GRE tunnels that all share the same underlay VRF. Currently, mlxsw only supports decapsulation based on the underlay destination IP (i.e., not taking the GRE key into account), so users need to configure these tunnels with different source IPs and IPv6 addresses are easier to spare than IPv4. Tested using existing ip6gre forwarding selftests. ==================== Link: https://lore.kernel.org/r/cover.1670414573.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit db401875f438168c5804b295b93a28c7730bb57a Author: Ido Schimmel Date: Wed Dec 7 13:36:47 2022 +0100 selftests: mlxsw: Move IPv6 decap_error test to shared directory Now that Spectrum-1 gained ip6gre support we can move the test out of the Spectrum-2 directory. Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski .../drivers/net/mlxsw/{spectrum-2 => }/devlink_trap_tunnel_ipip6.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ec5364351ed841cde48ef1e68259b8738d858aa Author: Ido Schimmel Date: Wed Dec 7 13:36:46 2022 +0100 mlxsw: spectrum_ipip: Add Spectrum-1 ip6gre support As explained in the previous patch, the existing Spectrum-2 ip6gre implementation can be reused for Spectrum-1. Change the Spectrum-1 ip6gre operations structure to use the common operations. Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski .../net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 83 +++------------------- 1 file changed, 8 insertions(+), 75 deletions(-) commit ab30e4d4b29ba530c65406e8a146630d0663c570 Author: Ido Schimmel Date: Wed Dec 7 13:36:45 2022 +0100 mlxsw: spectrum_ipip: Rename Spectrum-2 ip6gre operations There are two main differences between Spectrum-1 and newer ASICs in terms of IP-in-IP support: 1. In Spectrum-1, RIFs representing ip6gre tunnels require two entries in the RIF table. 2. In Spectrum-2 and newer ASICs, packets ingress the underlay (during encapsulation) and egress the underlay (during decapsulation) via a special generic loopback RIF. The first difference was handled in previous patches by adding the 'double_rif_entry' field to the Spectrum-1 operations structure of ip6gre RIFs. The second difference is handled during RIF creation, by only creating a generic loopback RIF in Spectrum-2 and newer ASICs. Therefore, the ip6gre operations can be shared between Spectrum-1 and newer ASIC in a similar fashion to how the ipgre operations are shared. Rename the operations to not be Spectrum-2 specific and move them earlier in the file so that they could later be used for Spectrum-1. Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski .../net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 94 +++++++++++----------- 1 file changed, 47 insertions(+), 47 deletions(-) commit 5ca1b208c5d107fd4b9e7801200dea18ab1af8e7 Author: Ido Schimmel Date: Wed Dec 7 13:36:44 2022 +0100 mlxsw: spectrum_router: Add support for double entry RIFs In Spectrum-1, loopback router interfaces (RIFs) used for IP-in-IP encapsulation with an IPv6 underlay require two RIF entries and the RIF index must be even. Prepare for this change by extending the RIF parameters structure with a 'double_entry' field that indicates if the RIF being created requires two RIF entries or not. Only set it for RIFs representing ip6gre tunnels in Spectrum-1. Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) commit 1a2f65b4a277fca10bb24d5615e512971a87587a Author: Ido Schimmel Date: Wed Dec 7 13:36:43 2022 +0100 mlxsw: spectrum_router: Parametrize RIF allocation size Currently, each router interface (RIF) consumes one entry in the RIFs table. This is going to change in subsequent patches where some RIFs will consume two table entries. Prepare for this change by parametrizing the RIF allocation size. For now, always pass '1'. Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 41 ++++++++++++++-------- 1 file changed, 27 insertions(+), 14 deletions(-) commit 40ef76de8a7fabb30dafebae4035d3e7eebb47a9 Author: Ido Schimmel Date: Wed Dec 7 13:36:42 2022 +0100 mlxsw: spectrum_router: Use gen_pool for RIF index allocation Currently, each router interface (RIF) consumes one entry in the RIFs table and there are no alignment constraints. This is going to change in subsequent patches where some RIFs will consume two table entries and their indexes will need to be aligned to the allocation size (even). Prepare for this change by converting the RIF index allocation to use gen_pool with the 'gen_pool_first_fit_order_align' algorithm. No Kconfig changes necessary as mlxsw already selects 'GENERIC_ALLOCATOR'. Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 73 +++++++++++++++++++--- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 4 ++ 2 files changed, 67 insertions(+), 10 deletions(-) commit 26d6506a50403e4c5440ae124fa66747ed07b0ca Merge: 6798152be4e7 292064cce796 Author: Alexei Starovoitov Date: Thu Dec 8 18:25:32 2022 -0800 Merge branch 'Dynptr refactorings' Kumar Kartikeya Dwivedi says: ==================== This is part 1 of https://lore.kernel.org/bpf/20221018135920.726360-1-memxor@gmail.com. This thread also gives some background on why the refactor is being done: https://lore.kernel.org/bpf/CAEf4Bzb4beTHgVo+G+jehSj8oCeAjRbRcm6MRe=Gr+cajRBwEw@mail.gmail.com As requested in patch 6 by Alexei, it only includes patches which refactors the code, on top of which further fixes will be made in part 2. The refactor itself fixes another issue as a side effect. No functional change is intended (except a few modified log messages). Changelog: ---------- v1 -> v2 v1: https://lore.kernel.org/bpf/20221115000130.1967465-1-memxor@gmail.com * Address feedback from Joanne and David, add acks Fixes v1 -> v1 Fixes v1: https://lore.kernel.org/bpf/20221018135920.726360-1-memxor@gmail.com * Collect acks from Joanne and David * Fix misc nits pointed out by Joanne, David * Split move of reg->off alignment check for dynptr into separate change (Alexei) ==================== Signed-off-by: Alexei Starovoitov commit 292064cce7969787f13ed9988733aadc12fe0ca2 Author: Kumar Kartikeya Dwivedi Date: Thu Dec 8 02:11:41 2022 +0530 selftests/bpf: Add test for dynptr reinit in user_ringbuf callback The original support for bpf_user_ringbuf_drain callbacks simply short-circuited checks for the dynptr state, allowing users to pass PTR_TO_DYNPTR (now CONST_PTR_TO_DYNPTR) to helpers that initialize a dynptr. This bug would have also surfaced with other dynptr helpers in the future that changed dynptr view or modified it in some way. Include test cases for all cases, i.e. both bpf_dynptr_from_mem and bpf_ringbuf_reserve_dynptr, and ensure verifier rejects both of them. Without the fix, both of these programs load and pass verification. While at it, remove sys_nanosleep target from failure cases' SEC definition, as there is no such tracepoint. Acked-by: David Vernet Acked-by: Joanne Koong Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221207204141.308952-8-memxor@gmail.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/prog_tests/user_ringbuf.c | 2 + .../selftests/bpf/progs/user_ringbuf_fail.c | 51 ++++++++++++++++++---- 2 files changed, 45 insertions(+), 8 deletions(-) commit 76d16077bef0954528ec3896710f9eda8b2b4db1 Author: Kumar Kartikeya Dwivedi Date: Thu Dec 8 02:11:40 2022 +0530 bpf: Use memmove for bpf_dynptr_{read,write} It may happen that destination buffer memory overlaps with memory dynptr points to. Hence, we must use memmove to correctly copy from dynptr to destination buffer, or source buffer to dynptr. This actually isn't a problem right now, as memcpy implementation falls back to memmove on detecting overlap and warns about it, but we shouldn't be relying on that. Acked-by: Joanne Koong Acked-by: David Vernet Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221207204141.308952-7-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit f6ee298fa140f6b5bae3acf6d6108741278bcced Author: Kumar Kartikeya Dwivedi Date: Thu Dec 8 02:11:39 2022 +0530 bpf: Move PTR_TO_STACK alignment check to process_dynptr_func After previous commit, we are minimizing helper specific assumptions from check_func_arg_reg_off, making it generic, and offloading checks for a specific argument type to their respective functions called after check_func_arg_reg_off has been called. This allows relying on a consistent set of guarantees after that call and then relying on them in code that deals with registers for each argument type later. This is in line with how process_spin_lock, process_timer_func, process_kptr_func check reg->var_off to be constant. The same reasoning is used here to move the alignment check into process_dynptr_func. Note that it also needs to check for constant var_off, and accumulate the constant var_off when computing the spi in get_spi, but that fix will come in later changes. Acked-by: Joanne Koong Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221207204141.308952-6-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 184c9bdb8f65d9f909b3a089a83bc0b0f1e1ea4c Author: Kumar Kartikeya Dwivedi Date: Thu Dec 8 02:11:38 2022 +0530 bpf: Rework check_func_arg_reg_off While check_func_arg_reg_off is the place which performs generic checks needed by various candidates of reg->type, there is some handling for special cases, like ARG_PTR_TO_DYNPTR, OBJ_RELEASE, and ARG_PTR_TO_RINGBUF_MEM. This commit aims to streamline these special cases and instead leave other things up to argument type specific code to handle. The function will be restrictive by default, and cover all possible cases when OBJ_RELEASE is set, without having to update the function again (and missing to do that being a bug). This is done primarily for two reasons: associating back reg->type to its argument leaves room for the list getting out of sync when a new reg->type is supported by an arg_type. The other case is ARG_PTR_TO_RINGBUF_MEM. The problem there is something we already handle, whenever a release argument is expected, it should be passed as the pointer that was received from the acquire function. Hence zero fixed and variable offset. There is nothing special about ARG_PTR_TO_RINGBUF_MEM, where technically its target register type PTR_TO_MEM | MEM_RINGBUF can already be passed with non-zero offset to other helper functions, which makes sense. Hence, lift the arg_type_is_release check for reg->off and cover all possible register types, instead of duplicating the same kind of check twice for current OBJ_RELEASE arg_types (alloc_mem and ptr_to_btf_id). For the release argument, arg_type_is_dynptr is the special case, where we go to actual object being freed through the dynptr, so the offset of the pointer still needs to allow fixed and variable offset and process_dynptr_func will verify them later for the release argument case as well. This is not specific to ARG_PTR_TO_DYNPTR though, we will need to make this exception for any future object on the stack that needs to be released. In this sense, PTR_TO_STACK as a candidate for object on stack argument is a special case for release offset checks, and they need to be done by the helper releasing the object on stack. Since the check has been lifted above all register type checks, remove the duplicated check that is being done for PTR_TO_BTF_ID. Acked-by: Joanne Koong Acked-by: David Vernet Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221207204141.308952-5-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 63 ++++++++++++++++---------- tools/testing/selftests/bpf/verifier/calls.c | 2 +- tools/testing/selftests/bpf/verifier/ringbuf.c | 2 +- 3 files changed, 40 insertions(+), 27 deletions(-) commit 270605317366e4535d8d9fc3d9da1ad0fb3c9d45 Author: Kumar Kartikeya Dwivedi Date: Thu Dec 8 02:11:37 2022 +0530 bpf: Rework process_dynptr_func Recently, user ringbuf support introduced a PTR_TO_DYNPTR register type for use in callback state, because in case of user ringbuf helpers, there is no dynptr on the stack that is passed into the callback. To reflect such a state, a special register type was created. However, some checks have been bypassed incorrectly during the addition of this feature. First, for arg_type with MEM_UNINIT flag which initialize a dynptr, they must be rejected for such register type. Secondly, in the future, there are plans to add dynptr helpers that operate on the dynptr itself and may change its offset and other properties. In all of these cases, PTR_TO_DYNPTR shouldn't be allowed to be passed to such helpers, however the current code simply returns 0. The rejection for helpers that release the dynptr is already handled. For fixing this, we take a step back and rework existing code in a way that will allow fitting in all classes of helpers and have a coherent model for dealing with the variety of use cases in which dynptr is used. First, for ARG_PTR_TO_DYNPTR, it can either be set alone or together with a DYNPTR_TYPE_* constant that denotes the only type it accepts. Next, helpers which initialize a dynptr use MEM_UNINIT to indicate this fact. To make the distinction clear, use MEM_RDONLY flag to indicate that the helper only operates on the memory pointed to by the dynptr, not the dynptr itself. In C parlance, it would be equivalent to taking the dynptr as a point to const argument. When either of these flags are not present, the helper is allowed to mutate both the dynptr itself and also the memory it points to. Currently, the read only status of the memory is not tracked in the dynptr, but it would be trivial to add this support inside dynptr state of the register. With these changes and renaming PTR_TO_DYNPTR to CONST_PTR_TO_DYNPTR to better reflect its usage, it can no longer be passed to helpers that initialize a dynptr, i.e. bpf_dynptr_from_mem, bpf_ringbuf_reserve_dynptr. A note to reviewers is that in code that does mark_stack_slots_dynptr, and unmark_stack_slots_dynptr, we implicitly rely on the fact that PTR_TO_STACK reg is the only case that can reach that code path, as one cannot pass CONST_PTR_TO_DYNPTR to helpers that don't set MEM_RDONLY. In both cases such helpers won't be setting that flag. The next patch will add a couple of selftest cases to make sure this doesn't break. Fixes: 205715673844 ("bpf: Add bpf_user_ringbuf_drain() helper") Acked-by: Joanne Koong Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221207204141.308952-4-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 4 +- include/uapi/linux/bpf.h | 8 +- kernel/bpf/helpers.c | 18 +- kernel/bpf/verifier.c | 227 +++++++++++++++------ scripts/bpf_doc.py | 1 + tools/include/uapi/linux/bpf.h | 8 +- .../selftests/bpf/prog_tests/user_ringbuf.c | 4 +- 7 files changed, 191 insertions(+), 79 deletions(-) commit ac50fe51ce873f4299928e312ce2042e35ab5c08 Author: Kumar Kartikeya Dwivedi Date: Thu Dec 8 02:11:36 2022 +0530 bpf: Propagate errors from process_* checks in check_func_arg Currently, we simply ignore the errors in process_spin_lock, process_timer_func, process_kptr_func, process_dynptr_func. Instead, bubble up the error by storing and checking err variable. Acked-by: Joanne Koong Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221207204141.308952-3-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 6b75bd3d036745b9be30917909f03602099adbdb Author: Kumar Kartikeya Dwivedi Date: Thu Dec 8 02:11:35 2022 +0530 bpf: Refactor ARG_PTR_TO_DYNPTR checks into process_dynptr_func ARG_PTR_TO_DYNPTR is akin to ARG_PTR_TO_TIMER, ARG_PTR_TO_KPTR, where the underlying register type is subjected to more special checks to determine the type of object represented by the pointer and its state consistency. Move dynptr checks to their own 'process_dynptr_func' function so that is consistent and in-line with existing code. This also makes it easier to reuse this code for kfunc handling. Then, reuse this consolidated function in kfunc dynptr handling too. Note that for kfuncs, the arg_type constraint of DYNPTR_TYPE_LOCAL has been lifted. Acked-by: David Vernet Acked-by: Joanne Koong Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221207204141.308952-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf_verifier.h | 8 +- kernel/bpf/verifier.c | 134 +++++++++++---------- .../selftests/bpf/prog_tests/kfunc_dynptr_param.c | 7 +- .../selftests/bpf/progs/test_kfunc_dynptr_param.c | 12 -- 4 files changed, 75 insertions(+), 86 deletions(-) commit 837e8ac871499d337212e2161c046f5adf1bad33 Merge: ff36c447e233 010b6761a9fc Author: Jakub Kicinski Date: Thu Dec 8 16:07:53 2022 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit c3991107a28a5ad0bd90660ca3bbf8c2c220ea98 Author: Douglas Anderson Date: Thu Dec 8 18:16:59 2022 -0800 Input: elants_i2c - delay longer with reset asserted The elan touchscreen datasheet says that the reset GPIO only needs to be asserted for 500us in order to reset the regulator. The problem is that some boards need a level shifter between the signals on the GPIO controller and the signals on the touchscreen. All of these extra components on the line can slow the transition of the signals. On one board, we measured the reset line and saw that it took almost 1.8ms to go low. Even after we bumped up the "drive strength" of the signal from the default 2mA to 8mA we still saw it take 421us for the signal to go low. In order to account for this let's lengthen the amount of time that we keep the reset asserted. Let's bump it up from 500us to 5000us. That's still a relatively short amount of time and is much safer. It should be noted that this fixes real problems. Case in point: 1. The touchscreen power rail may be shared with another device (like an eDP panel). That means that at probe time power might already be on. 2. In probe we grab the reset GPIO and assert it (make it low). 3. We turn on power (a noop since it was already on). 4. We wait 500us. 5. We deassert the reset GPIO. With the above case and only a 500us delay we saw only a partial reset asserted, which is bad. Giving it 5ms is overkill but feels safer in case someone else has a different level shifter setup. Note that bumping up the delay to 5000 means that some configs yell about using udelay(). We'll change to using usleep_range(). We give a small range here because: - This isn't a delay that happens very often so we don't need to worry about giving a big range to allow for power efficiency. - usleep_range() is known to almost always pick the upper bound and delay that long and we really don't want to slow down the power on of the touchscreen that much. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20221208180603.v2.5.I6edfb3f459662c041563a54e5b7df727c27caaba@changeid Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/elants_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66efff515a6500d4b4976fbab3bee8b92a1137fb Merge: 9e5737bd0457 347fafe0eb46 Author: Dave Airlie Date: Fri Dec 9 12:08:32 2022 +1000 Merge tag 'amd-drm-next-6.2-2022-12-07' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.2-2022-12-07: amdgpu: - DSC fixes for DCN 2.1 - HDMI PCON fixes - PSR fixes - DC DML fixes - Properly throttle on BO allocation - GFX 11.0.4 fixes - MMHUB fix - Make some functions static Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20221207232439.5908-1-alexander.deucher@amd.com commit 9e5737bd0457955690d871b3f4fc66dea40ea141 Merge: f06a4da3adf2 4670ac706ff9 Author: Dave Airlie Date: Fri Dec 9 12:08:12 2022 +1000 Merge tag 'amd-drm-next-6.2-2022-12-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.2-2022-12-02: amdgpu: - Fix CPU stalls when allocating large amounts of system memory - SR-IOV fixes - BACO fixes - Enable GC 11.0.4 - Enable PSP 13.0.11 - Enable SMU 13.0.11 - Enable NBIO 7.7.1 - Fix reported VCN capabilities for RDNA2 - Misc cleanups - PCI ref count fixes - DCN DPIA fixes - DCN 3.2.x fixes - Documentation updates - GC 11.x fixes - VCN RAS fixes - APU fix for passthrough - PSR fixes - GFX preemption support for gfx9 - SDMA fix for S0ix amdkfd: - Enable KFD support for GC 11.0.4 - Misc cleanups - Fix memory leak Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20221202160659.5987-1-alexander.deucher@amd.com commit f06a4da3adf252a6ecd37c4ea1c3540db0b27738 Merge: b2268e26869a b02897e56b4e Author: Dave Airlie Date: Fri Dec 9 11:53:23 2022 +1000 Merge tag 'drm-misc-next-fixes-2022-12-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Some deferred-io and damage worker reworks revert and make a fb function static Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221208084040.yw4zavsjd25qsltf@houat commit 6798152be4e7e03e156c3c4ba3c06b80ff2bbd99 Merge: e60db051a4a7 822ed78fab13 Author: Alexei Starovoitov Date: Thu Dec 8 17:50:17 2022 -0800 Merge branch 'Misc optimizations for bpf mem allocator' Hou Tao says: ==================== From: Hou Tao Hi, The patchset is just misc optimizations for bpf mem allocator. Patch 1 fixes the OOM problem found during running hash-table update benchmark from qp-trie patchset [0]. The benchmark will add htab elements in batch and then delete elements in batch, so freed objects will stack on free_by_rcu and wait for the expiration of RCU grace period. There can be tens of thousands of freed objects and these objects are not available for new allocation, so adding htab element will continue to do new allocation. For the benchmark commmand: "./bench -w3 -d10 -a htab-update -p 16", even the maximum entries of htab is 16384, key_size is 255 and value_size is 4, the peak memory usage will reach 14GB or more. Increasing rcupdate.rcu_task_enqueue_lim will decrease the peak memory to 860MB, but it is still too many. Although the above case is contrived, it is better to fix it and the fixing is simple: just reusing the freed objects in free_by_rcu during allocation. After the fix, the peak memory usage will decrease to 26MB. Beside above case, the memory blow-up problem is also possible when allocation and freeing are done on total different CPUs. I'm trying to fix the blow-up problem by using a global per-cpu work to free these objects in free_by_rcu timely, but it doesn't work very well and I am still digging into it. Patch 2 is a left-over patch from rcu_trace_implies_rcu_gp() patchset [1]. After disscussing with Paul [2], I think it is also safe to skip rcu_barrier() when rcu_trace_implies_rcu_gp() returns true. Comments are always welcome. Change Log: v2: * Patch 1: repharse the commit message (Suggested by Yonghong & Alexei) * Add Acked-by for both patch 1 and 2 v1: https://lore.kernel.org/bpf/20221206042946.686847-1-houtao@huaweicloud.com [0]: https://lore.kernel.org/bpf/20220924133620.4147153-13-houtao@huaweicloud.com/ [1]: https://lore.kernel.org/bpf/20221014113946.965131-1-houtao@huaweicloud.com/ [2]: https://lore.kernel.org/bpf/20221021185002.GP5600@paulmck-ThinkPad-P17-Gen-1/ ==================== Signed-off-by: Alexei Starovoitov commit 822ed78fab13d5a54f8b8c030e8c5dc0fcd2cdae Author: Hou Tao Date: Fri Dec 9 09:09:47 2022 +0800 bpf: Skip rcu_barrier() if rcu_trace_implies_rcu_gp() is true If there are pending rcu callback, free_mem_alloc() will use rcu_barrier_tasks_trace() and rcu_barrier() to wait for the pending __free_rcu_tasks_trace() and __free_rcu() callback. If rcu_trace_implies_rcu_gp() is true, there will be no pending __free_rcu(), so it will be OK to skip rcu_barrier() as well. Acked-by: Yonghong Song Acked-by: Paul E. McKenney Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20221209010947.3130477-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/memalloc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 0893d6007db5cf397f3fc92b2a6935c3ed0c6f00 Author: Hou Tao Date: Fri Dec 9 09:09:46 2022 +0800 bpf: Reuse freed element in free_by_rcu during allocation When there are batched freeing operations on a specific CPU, part of the freed elements ((high_watermark - lower_watermark) / 2 + 1) will be indirectly moved into waiting_for_gp list through free_by_rcu list. After call_rcu_in_progress becomes false again, the remaining elements in free_by_rcu list will be moved to waiting_for_gp list by the next invocation of free_bulk(). However if the expiration of RCU tasks trace grace period is relatively slow, none element in free_by_rcu list will be moved. So instead of invoking __alloc_percpu_gfp() or kmalloc_node() to allocate a new object, in alloc_bulk() just check whether or not there is freed element in free_by_rcu list and reuse it if available. Acked-by: Yonghong Song Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20221209010947.3130477-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/memalloc.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 39cb018aefa5e72dd10f833058cd2c49c88cb435 Author: Luca Weiss Date: Fri Dec 2 15:31:38 2022 -0800 dt-bindings: input: Convert ti,drv260x to DT schema Convert the drv260x haptics binding to DT schema format. The only notable change from .txt format is that vbat-supply is not actually required, so don't make it a required property. Acked-by: Andrew Davis Signed-off-by: Luca Weiss Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221118174831.69793-1-luca@z3ntu.xyz Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/ti,drv260x.txt | 50 ---------- .../devicetree/bindings/input/ti,drv260x.yaml | 109 +++++++++++++++++++++ 2 files changed, 109 insertions(+), 50 deletions(-) commit c4a5bcae72a87eba89c7b56c2dd21639f8452a48 Author: Fabio Estevam Date: Fri Dec 2 15:30:32 2022 -0800 dt-bindings: input: gpio-beeper: Convert to yaml schema Convert the bindings from plain text to yaml schema. Signed-off-by: Fabio Estevam Reviewed-by: Krzysztof Kozlowski Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20221120012135.2085631-1-festevam@gmail.com Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/gpio-beeper.txt | 13 --------- .../devicetree/bindings/input/gpio-beeper.yaml | 33 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 13 deletions(-) commit 61b2f0bdaa3c7e6956fdac0a7c1e8284b9b81d1d Merge: de59b6ed0618 583286e2072e Author: Palmer Dabbelt Date: Thu Dec 8 17:22:57 2022 -0800 Merge patch series "riscv: Fix crash during early errata patching" These are fixes, but due to the possible early boot fallout they're going in the merge window to get a bit more time to bake on linux-next. * b4-shazam-merge riscv: Move cast inside kernel_mapping_[pv]a_to_[vp]a riscv: Fix crash during early errata patching Link: https://lore.kernel.org/r/20221126060920.65009-1-samuel@sholland.org Signed-off-by: Palmer Dabbelt commit 583286e2072ed25c31b7db14d69fdf03f1fae7ba Author: Samuel Holland Date: Sat Nov 26 00:09:20 2022 -0600 riscv: Move cast inside kernel_mapping_[pv]a_to_[vp]a Before commit 44c922572952 ("RISC-V: enable XIP"), these macros cast their argument to unsigned long. That commit moved the cast after an assignment to an unsigned long variable, rendering it ineffectual. Move the cast back, so we can remove the cast at each call site. Reviewed-by: Alexandre Ghiti Reviewed-by: Heiko Stuebner Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221126060920.65009-2-samuel@sholland.org Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/page.h | 18 +++++++++--------- arch/riscv/mm/init.c | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) commit 0c49688174f5347c3f8012e84c0ffa0d2b2890c8 Author: Samuel Holland Date: Sat Nov 26 00:09:19 2022 -0600 riscv: Fix crash during early errata patching The patch function for the T-Head PBMT errata calls __pa_symbol() before relocation. This crashes when CONFIG_DEBUG_VIRTUAL is enabled, because __pa_symbol() forwards to __phys_addr_symbol(), and __phys_addr_symbol() checks against the absolute kernel start/end address. Fix this by checking against the kernel map instead of a symbol address. Fixes: a35707c3d850 ("riscv: add memory-type errata for T-Head") Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221126060920.65009-1-samuel@sholland.org Signed-off-by: Palmer Dabbelt arch/riscv/mm/physaddr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40b85eec8b65c6fe936a5afaf743c1dce0ba982c Author: Liam Beguin Date: Sat Nov 19 22:02:57 2022 -0500 clk: lmk04832: fix kernel-doc warnings Fix syntax generating the following kernel-doc warnings: drivers/clk/clk-lmk04832.c:189: warning: cannot understand function prototype: 'struct lmk04832_device_info ' drivers/clk/clk-lmk04832.c:193: warning: Function parameter or member 'pid' not described in 'lmk04832_device_info' drivers/clk/clk-lmk04832.c:193: warning: Function parameter or member 'maskrev' not described in 'lmk04832_device_info' drivers/clk/clk-lmk04832.c:193: warning: Function parameter or member 'num_channels' not described in 'lmk04832_device_info' drivers/clk/clk-lmk04832.c:193: warning: Function parameter or member 'vco0_range' not described in 'lmk04832_device_info' drivers/clk/clk-lmk04832.c:193: warning: Function parameter or member 'vco1_range' not described in 'lmk04832_device_info' drivers/clk/clk-lmk04832.c:420: warning: No description found for return value of 'lmk04832_check_vco_ranges' drivers/clk/clk-lmk04832.c:459: warning: No description found for return value of 'lmk04832_calc_pll2_params' Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20221120030257.531153-5-liambeguin@gmail.com Signed-off-by: Stephen Boyd drivers/clk/clk-lmk04832.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 739d5e6abba5fa50bba3fb6cc5e75851d989a8ce Author: Liam Beguin Date: Sat Nov 19 22:02:56 2022 -0500 clk: lmk04832: drop superfluous #include iwyu warnings: (new ones prefixed by >>) >> drivers/clk/clk-lmk04832.c:15:1: iwyu: warning: superfluous #include >> drivers/clk/clk-lmk04832.c:20:1: iwyu: warning: superfluous #include Reported-by: kernel test robot Link: https://lore.kernel.org/all/202107110620.926Sm95z-lkp@intel.com/ Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20221120030257.531153-4-liambeguin@gmail.com Signed-off-by: Stephen Boyd drivers/clk/clk-lmk04832.c | 2 -- 1 file changed, 2 deletions(-) commit 992a35523d159ce0aea333716c236f0790332af8 Author: Liam Beguin Date: Sat Nov 19 22:02:55 2022 -0500 clk: lmk04832: drop unnecessary semicolons Semicolons on the closing brace of a function definition are unnecessary, remove them. Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20221120030257.531153-3-liambeguin@gmail.com Signed-off-by: Stephen Boyd drivers/clk/clk-lmk04832.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 6c634446b865738da8ea753b181722525128958e Author: Liam Beguin Date: Sat Nov 19 22:02:54 2022 -0500 clk: lmk04832: declare variables as const when possible Fix the following warning reported by the kernel test robot. cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> drivers/clk/clk-lmk04832.c:357:15: warning: Variable 'pll2_p' can be declared with const [constVariable] unsigned int pll2_p[] = {8, 2, 2, 3, 4, 5, 6, 7}; Reported-by: kernel test robot Link: https://lore.kernel.org/all/202203312017.5YW13Jr4-lkp@intel.com/ Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20221120030257.531153-2-liambeguin@gmail.com Signed-off-by: Stephen Boyd drivers/clk/clk-lmk04832.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0b8ba891ad4d1ef6bfa4c72efc83f9f9f855f68b Author: Xiu Jianfeng Date: Wed Nov 23 11:16:22 2022 +0800 clk: socfpga: Fix memory leak in socfpga_gate_init() Free @socfpga_clk and @ops on the error path to avoid memory leak issue. Fixes: a30a67be7b6e ("clk: socfpga: Don't have get_parent for single parent ops") Signed-off-by: Xiu Jianfeng Link: https://lore.kernel.org/r/20221123031622.63171-1-xiujianfeng@huawei.com Acked-by: Dinh Nguyen Signed-off-by: Stephen Boyd drivers/clk/socfpga/clk-gate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3c79ace9c0d0ba4755e5673759acb36fd17e714a Author: Conor Dooley Date: Wed Nov 23 16:19:22 2022 +0000 clk: microchip: enable the MPFS clk driver by default if SOC_MICROCHIP_POLARFIRE With the intent of removing driver selects from Kconfig.socs in arch/riscv, essential drivers that were being selected there could instead by enabled by defaulting them to the value of the SoC's Kconfig symbol. Do so here & drop the depend on RISC-V - the SOC_ symbols are only defined there anyway. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20221123161921.81195-1-conor@kernel.org Signed-off-by: Stephen Boyd drivers/clk/microchip/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit de59b6ed0618b909be78f6bc60874a57dd016063 Author: Jisheng Zhang Date: Wed Nov 23 23:02:57 2022 +0800 riscv: boot: add zstd support Support build the zstd compressed Image.zst. Similar as other compressed formats, the Image.zst is not self-decompressing and the bootloader still needs to handle decompression before launching the kernel image. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20221123150257.3108-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/boot/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit b2268e26869a56e40964f0d912b58ffd076fd453 Merge: 077bd80083ab 7d579eff3e55 Author: Dave Airlie Date: Fri Dec 9 10:29:56 2022 +1000 Merge tag 'drm-intel-next-fixes-2022-12-01' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Multi-cast register fix (Matt) - Fix workarounds on gen2-3 (Tvrtko) - Bigjoiner fix (Ville) - Make Guc default_list a const data (Jani) - Acquire forcewake before uncore read (Umesh) - Selftest fix (Umesh) - HuC related fixes (Daniele) - Fix some incorrect return values (Janusz) - Fix a memory leak in bios related code (Xia) - Fix VBT send packet port selection (Mikko) - DG2's DMC fix bump for Register noclaims and few restore (Gustavo) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y4jZBRw9KvlKgkr6@intel.com commit 4fe1b3a5f8fe2fdcedcaba9561e5b0ae5cb1d15b Author: Michael Guralnik Date: Thu Dec 8 06:23:46 2022 +0200 net/mlx5: Expose steering dropped packets counter Add rx steering discarded packets counter to the vnic_diag debugfs. Signed-off-by: Michael Guralnik Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/esw/debugfs.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit 64b68e36964997e6a00297daf0fd6eab12e9fb82 Author: Or Har-Toov Date: Tue Nov 22 12:42:18 2022 +0200 net/mlx5: Refactor and expand rep vport stat group Expand representor vport stat group to support all counters from the vport stat group, to count all the traffic passing through the vport. Fix current implementation where fill_stats and update_stats use different structs. Signed-off-by: Or Har-Toov Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 94 +++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 16 ++++ 2 files changed, 90 insertions(+), 20 deletions(-) commit 7c33e73995e933475985ee0ca3cfa5b335da447e Author: Maor Dickman Date: Sun Oct 9 09:53:22 2022 +0300 net/mlx5e: multipath, support routes with more than 2 nexthops Today multipath offload is only supported when the number of nexthops is 2 which block the use of it in case of system with 2 NICs. This patch solve it by enabling multipath offload per NIC if 2 nexthops of the route are its uplinks. Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c | 79 ++++++++++++++---------- 1 file changed, 48 insertions(+), 31 deletions(-) commit 6fda078d5f7521cf02f493b62d9d87abda3cb890 Author: Oz Shlomo Date: Wed Nov 2 14:36:51 2022 +0000 net/mlx5e: TC, add support for meter mtu offload Initialize the meter object with the TC police mtu parameter. Use the hardware range destination to compare the pkt len to the mtu setting. Assign the range destination hit/miss ft to the police conform/exceed attributes. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/en/tc/act/police.c | 20 +++++++++++++++--- .../net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 15 +++++++++++--- .../net/ethernet/mellanox/mlx5/core/en/tc/meter.h | 1 + .../ethernet/mellanox/mlx5/core/en/tc/post_meter.c | 12 +++++++++++ .../ethernet/mellanox/mlx5/core/en/tc/post_meter.h | 24 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 9 +++++--- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 1 + .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 19 +++++++++++++++++ 8 files changed, 92 insertions(+), 9 deletions(-) commit d56713250a59aba48428345f80e1bff9dde897e1 Author: Oz Shlomo Date: Wed Aug 24 12:45:43 2022 +0000 net/mlx5e: meter, add mtu post meter tables TC police action may configure the maximum packet size to be handled by the policer, in addition to byte/packet rate. MTU check is realized in hardware using the range destination, specifying a hit ft, if packet len is in the range, or miss ft otherwise. Instantiate mtu green/red flow tables with a single match-all rule. Add the green/red actions to the hit/miss table accordingly. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/en/tc/post_meter.c | 184 ++++++++++++++++++++- .../ethernet/mellanox/mlx5/core/en/tc/post_meter.h | 7 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 1 + 3 files changed, 185 insertions(+), 7 deletions(-) commit fd6fa761466cef5279a399ca6f21d8f84d5b2332 Author: Oz Shlomo Date: Thu Dec 1 12:35:36 2022 +0000 net/mlx5e: meter, refactor to allow multiple post meter tables TC police action may configure the maximum packet size to be handled by the policer, in addition to byte/packet rate. Currently the post meter table steers the packet according to the meter aso output. Refactor the code to allow both metering and range post actions as a pre-step for adding police mtu offload support. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/en/tc/post_meter.c | 154 +++++++++++++-------- 1 file changed, 96 insertions(+), 58 deletions(-) commit be6d5daeaa3bcd6ce414c20c61bd8ae8d38da49a Author: Yevgeny Kliteynik Date: Tue Nov 29 11:21:38 2022 +0200 net/mlx5: DR, Add support for range match action Add support for matching on range. The supported type of range is L2 frame size. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Erez Shitrit Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/steering/dr_action.c | 173 +++++++++++++++++++++ .../ethernet/mellanox/mlx5/core/steering/dr_dbg.c | 29 +++- .../mellanox/mlx5/core/steering/dr_ste_v1.c | 65 +++++++- .../mellanox/mlx5/core/steering/dr_types.h | 26 ++++ .../ethernet/mellanox/mlx5/core/steering/fs_dr.c | 30 +++- .../mlx5/core/steering/mlx5_ifc_dr_ste_v1.h | 35 +++++ .../ethernet/mellanox/mlx5/core/steering/mlx5dr.h | 8 + 7 files changed, 363 insertions(+), 3 deletions(-) commit 1207a772c09d43f2720ed4296b8a5a096d62365a Author: Yevgeny Kliteynik Date: Tue Nov 29 11:01:23 2022 +0200 net/mlx5: DR, Add function that tells if STE miss addr has been initialized Up until now miss address in all the STEs was used to connect miss lists and to link the last STE in the list to end anchor. Match range STE will require special handling because its miss address is part of the 'action'. That is, range action has hit and miss addresses. Since the range action is always the last action, need to make sure that its miss address isn't overwritten by the end anchor. Adding new function mlx5dr_ste_is_miss_addr_set() to answer the question whether the STE's miss address has already been set as part of STE initialization. Use a callback that always returns false right now. Once match range is added, a different callback will be used for that STE type. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Erez Shitrit Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c | 10 ++++++++++ drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.c | 6 ++++++ drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v2.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h | 1 + 7 files changed, 23 insertions(+) commit f31bda789f1d7216c0e8d24c55d35dc4e97dc4ab Author: Yevgeny Kliteynik Date: Wed Nov 30 00:26:05 2022 +0200 net/mlx5: DR, Some refactoring of miss address handling In preparation for MATCH RANGE STE support, create a function to set the miss address of an STE. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Erez Shitrit Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/steering/dr_rule.c | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 1339678fdde1c84ea8b4d6e3627f7742c87f95fa Author: Yevgeny Kliteynik Date: Thu Aug 25 15:35:59 2022 +0300 net/mlx5: DR, Manage definers with refcounts In many cases different actions will ask for the same definer format. Instead of allocating new definer general object and running out of definers, have an xarray of allocated definers and keep track of their usage with refcounts: allocate a new definer only when there isn't one with the same format already created, and destroy definer only when its refcount runs down to zero. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 1 + .../mellanox/mlx5/core/steering/dr_definer.c | 151 +++++++++++++++++++++ .../mellanox/mlx5/core/steering/dr_domain.c | 7 +- .../mellanox/mlx5/core/steering/dr_types.h | 1 + .../ethernet/mellanox/mlx5/core/steering/mlx5dr.h | 5 + 5 files changed, 163 insertions(+), 2 deletions(-) commit c72a57ad6e9183eeb6739ae688b6417df4a512ac Author: Yevgeny Kliteynik Date: Sat Aug 6 02:36:54 2022 +0300 net/mlx5: DR, Handle FT action in a separate function As preparation for range action support, moving the handling of final ICM address for flow table action to a separate function. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/steering/dr_action.c | 127 +++++++++++++-------- 1 file changed, 81 insertions(+), 46 deletions(-) commit 0a8c20e23ff2d042295a20d09b0dde1492554ef7 Author: Yevgeny Kliteynik Date: Fri Aug 5 13:42:24 2022 +0300 net/mlx5: DR, Rework is_fw_table function This patch handles the following two changes w.r.t. is_fw_table function: 1. When SW steering is asked to create/destroy FW table, we allow for creation/destruction of only termination tables. Rename mlx5_dr_is_fw_table both to comply with the static function naming and to reflect that we're actually checking for FW termination table. 2. When the action 'go to flow table' is created, the destination flow table can be any FW table, not only termination table. Adding function to check if the dest table is FW table. This function will also be used by the later creation of range match action, so putting it the header file. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/steering/dr_types.h | 6 ++++++ .../ethernet/mellanox/mlx5/core/steering/fs_dr.c | 23 +++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) commit e046b86e2900005726dd8f10217f778dff1b5929 Author: Yevgeny Kliteynik Date: Tue May 31 16:25:17 2022 +0300 net/mlx5: DR, Add functions to create/destroy MATCH_DEFINER general object SW steering is able to match only on the exact values of the packet fields, as requested by the user: the user provides mask for the fields that are of interest, and the exact values to be matched on when the traffic is handled. Match Definer is a general FW object that defines which fields in the packet will be referenced by the mask and tag of each STE. Match definer ID is part of STE fields, and it defines how the HW needs to interpret the STE's mask/tag values. Till now SW steering used the definers that were managed by FW and implemented the STE layout as described by the HW spec. Now that we're adding a new type of STE, SW steering needs to define for the HW how it should interpret this new STE's layout. This is done with a programmable match definer. The programmable definer allows to selects which fields will be included in the definer, and their layout: it has up to 9 DW selectors 8 Byte selectors. Each selector indicates a DW/Byte worth of fields out of the table that is defined by HW spec by referencing the offset of the required DW/Byte. This patch adds dr_cmd function to create and destroy MATCH_DEFINER general object. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/steering/dr_cmd.c | 77 ++++++++++++++++++++++ .../mellanox/mlx5/core/steering/dr_types.h | 9 +++ 2 files changed, 86 insertions(+) commit 38bf24c38d19dc4ba5ec684ac2afa2f8e256db1e Author: Yevgeny Kliteynik Date: Mon Aug 15 12:45:28 2022 +0300 net/mlx5: fs, add match on ranges API Range is a new flow destination type which allows matching on a range of values instead of matching on a specific value. Range flow destination has the following fields: - hit_ft: flow table to forward the traffic in case of hit - miss_ft: flow table to forward the traffic in case of miss - field: which packet characteristic to match on - min: minimal value for the selected field - max: maximal value for the selected field Note: - In order to match, the value in the packet should meet the following criteria: min <= value < max - Currently, the only supported field type is L2 packet length Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.c | 16 ++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 11 +++++++++-- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 1 + include/linux/mlx5/fs.h | 12 ++++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) commit f1543c7abab25d93bc8e9fae79b4cb3153ed6669 Author: Yevgeny Kliteynik Date: Tue May 31 13:55:28 2022 +0300 net/mlx5: mlx5_ifc updates for MATCH_DEFINER general object Update full structure of match definer and add an ID of the SELECT match definer type. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed include/linux/mlx5/mlx5_ifc.h | 68 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) commit 558480d3e7d9a21b18354afdc308cd867efbba49 Merge: 049696a39d2f bf3d7b1d8499 Author: Palmer Dabbelt Date: Thu Dec 8 15:57:11 2022 -0800 Merge patch series "RISC-V interrupt controller select cleanup" Conor Dooley says: From: Conor Dooley Submitted a patch yesterday defaulting the SiFive PLIC driver to enabled [0], and in the ensuing conversation Marc suggested just doing a select at the arch level and dropping the user selectability completely. * b4-shazam-merge: RISC-V: stop selecting SIFIVE_PLIC at the SoC level irqchip/riscv-intc: remove user selectability of RISCV_INTC irqchip/sifive-plic: remove user selectability of SIFIVE_PLIC Link: https://lore.kernel.org/r/20221118104300.85016-1-conor@kernel.org Acked-by: Marc Zyngier Link: https://lore.kernel.org/all/87zgceszp8.wl-maz@kernel.org/ Signed-off-by: Palmer Dabbelt commit bf3d7b1d8499ca46874c7373d2043ecbe252cccc Author: Conor Dooley Date: Fri Nov 18 10:43:01 2022 +0000 RISC-V: stop selecting SIFIVE_PLIC at the SoC level The SIFIVE_PLIC driver is used by all current RISC-V SoCs & will be, where possible, used for future implementations. Rather than having each driver select the option on a case-by-case basis, do so at the arch level. Signed-off-by: Conor Dooley Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221118104300.85016-4-conor@kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 1 + arch/riscv/Kconfig.socs | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) commit d8fb13070c3c99b6a17b75fda28943f9261e23e7 Author: Conor Dooley Date: Fri Nov 18 10:43:00 2022 +0000 irqchip/riscv-intc: remove user selectability of RISCV_INTC Since commit e71ee06e3ca3 ("RISC-V: Force select RISCV_INTC for CONFIG_RISCV") the driver has been enabled at the arch level - and is mandatory anyway. There's no point exposing this as a choice to users, so stop bothering. Signed-off-by: Conor Dooley Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221118104300.85016-3-conor@kernel.org Signed-off-by: Palmer Dabbelt drivers/irqchip/Kconfig | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit fdb1742aff436399f5769a7559bbb71c7f37a85f Author: Conor Dooley Date: Fri Nov 18 10:42:59 2022 +0000 irqchip/sifive-plic: remove user selectability of SIFIVE_PLIC The SiFive PLIC driver is used by all current implementations, including those that do not have a SiFive PLIC. The current driver supports more than just SiFive PLICs at present and, where possible, future PLIC implementations will also use this driver. As every supported RISC-V SoC selects the driver directly in Kconfig.socs there's no point in exposing this kconfig option to users. The Kconfig help text, in its current form, is misleading. There's no point doing anything about that though, as it will no longer be user selectable. Remove it. Suggested-by: Marc Zyngier Signed-off-by: Conor Dooley Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221118104300.85016-2-conor@kernel.org Signed-off-by: Palmer Dabbelt drivers/irqchip/Kconfig | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 049696a39d2fbaad1b35b08cbc65d9e17c0406bc Merge: e1ceb0964163 497bcbe3ce04 Author: Palmer Dabbelt Date: Thu Dec 8 15:45:28 2022 -0800 Merge patch series "Add PMEM support for RISC-V" Anup Patel says: The Linux NVDIMM PEM drivers require arch support to map and access the persistent memory device. This series adds RISC-V PMEM support using recently added Svpbmt and Zicbom support. * b4-shazam-merge: RISC-V: Enable PMEM drivers RISC-V: Implement arch specific PMEM APIs RISC-V: Fix MEMREMAP_WB for systems with Svpbmt Link: https://lore.kernel.org/r/20221114090536.1662624-1-apatel@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 497bcbe3ce0466123a834f2777a8a762bd5d7aae Author: Anup Patel Date: Mon Nov 14 14:35:36 2022 +0530 RISC-V: Enable PMEM drivers We now have PMEM arch support available in RISC-V kernel so let us enable relevant drivers in defconfig. Signed-off-by: Anup Patel Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221114090536.1662624-4-apatel@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit a49ab905a1fc8630a94221f9a06ce0dafb266576 Author: Anup Patel Date: Mon Nov 14 14:35:35 2022 +0530 RISC-V: Implement arch specific PMEM APIs The NVDIMM PMEM driver expects arch specific APIs for cache maintenance and if arch does not provide these APIs then NVDIMM PMEM driver will always use MEMREMAP_WT to map persistent memory which in-turn maps as UC memory type defined by the RISC-V Svpbmt specification. Now that the Svpbmt and Zicbom support is available in RISC-V kernel, we implement PMEM APIs using ALT_CMO_OP() macros so that the NVDIMM PMEM driver can use MEMREMAP_WB to map persistent memory. Co-developed-by: Mayuresh Chitale Signed-off-by: Mayuresh Chitale Signed-off-by: Anup Patel Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221114090536.1662624-3-apatel@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 1 + arch/riscv/mm/Makefile | 1 + arch/riscv/mm/pmem.c | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+) commit b91676fc16cd384a81e3af52c641aa61985cc231 Author: Anup Patel Date: Mon Nov 14 14:35:34 2022 +0530 RISC-V: Fix MEMREMAP_WB for systems with Svpbmt Currently, the memremap() called with MEMREMAP_WB maps memory using the generic ioremap() function which breaks on system with Svpbmt because memory mapped using _PAGE_IOREMAP page attributes is treated as strongly-ordered non-cacheable IO memory. To address this, we implement RISC-V specific arch_memremap_wb() which maps memory using _PAGE_KERNEL page attributes resulting in write-back cacheable mapping on systems with Svpbmt. Fixes: ff689fd21cb1 ("riscv: add RISC-V Svpbmt extension support") Co-developed-by: Mayuresh Chitale Signed-off-by: Mayuresh Chitale Signed-off-by: Anup Patel Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221114090536.1662624-2-apatel@ventanamicro.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/io.h | 5 +++++ 1 file changed, 5 insertions(+) commit e1ceb096416311be1564de69ea40bb872d7cc327 Merge: 4bd1d80efb5a b0f4c74eadbf Author: Palmer Dabbelt Date: Thu Dec 8 15:31:44 2022 -0800 Merge patch "RISC-V: Fix unannoted hardirqs-on in return to userspace slow-path" I'm merging this in as a single patch to make it easier to handle the backports. * b4-shazam-merge: RISC-V: Fix unannoted hardirqs-on in return to userspace slow-path Link: https://lore.kernel.org/r/20221111223108.1976562-1-abrestic@rivosinc.com Signed-off-by: Palmer Dabbelt commit b0f4c74eadbf69a3298f38566bfaa2e202541f2f Author: Andrew Bresticker Date: Fri Nov 11 17:31:08 2022 -0500 RISC-V: Fix unannoted hardirqs-on in return to userspace slow-path The return to userspace path in entry.S may enable interrupts without the corresponding lockdep annotation, producing a splat[0] when DEBUG_LOCKDEP is enabled. Simply calling __trace_hardirqs_on() here gets a bit messy due to the use of RA to point back to ret_from_exception, so just move the whole slow-path loop into C. It's more readable and it lets us use local_irq_{enable,disable}(), avoiding the need for manual annotations altogether. [0]: ------------[ cut here ]------------ DEBUG_LOCKS_WARN_ON(!lockdep_hardirqs_enabled()) WARNING: CPU: 2 PID: 1 at kernel/locking/lockdep.c:5512 check_flags+0x10a/0x1e0 Modules linked in: CPU: 2 PID: 1 Comm: init Not tainted 6.1.0-rc4-00160-gb56b6e2b4f31 #53 Hardware name: riscv-virtio,qemu (DT) epc : check_flags+0x10a/0x1e0 ra : check_flags+0x10a/0x1e0 status: 0000000200000100 badaddr: 0000000000000000 cause: 0000000000000003 [] lock_is_held_type+0x78/0x14e [] __might_resched+0x26/0x22c [] __might_sleep+0x3c/0x66 [] get_signal+0x9e/0xa70 [] do_notify_resume+0x6e/0x422 [] ret_from_exception+0x0/0x10 irq event stamp: 44512 hardirqs last enabled at (44511): [] _raw_spin_unlock_irqrestore+0x54/0x62 hardirqs last disabled at (44512): [] __trace_hardirqs_off+0xc/0x14 softirqs last enabled at (44472): [] __do_softirq+0x3de/0x51e softirqs last disabled at (44467): [] irq_exit+0xd6/0x104 ---[ end trace 0000000000000000 ]--- possible reason: unannotated irqs-on. Signed-off-by: Andrew Bresticker Fixes: 3c4697982982 ("riscv: Enable LOCKDEP_SUPPORT & fixup TRACE_IRQFLAGS_SUPPORT") Link: https://lore.kernel.org/r/20221111223108.1976562-1-abrestic@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/entry.S | 18 +++++------------- arch/riscv/kernel/signal.c | 34 +++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-) commit e60db051a4a70bff151eb59774c64af3a0266794 Author: Stanislav Fomichev Date: Tue Dec 6 15:27:39 2022 -0800 selftests/bpf: Bring test_offload.py back to life Bpftool has new extra libbpf_det_bind probing map we need to exclude. Also skip trying to load netdevsim modules if it's already loaded (builtin). v2: - drop iproute2->bpftool changes (Toke) Signed-off-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221206232739.2504890-1-sdf@google.com tools/testing/selftests/bpf/test_offload.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4bd1d80efb5af640f99157f39b50fb11326ce641 Author: Sergey Matyukevich Date: Mon Aug 29 23:52:19 2022 +0300 riscv: mm: notify remote harts about mmu cache updates Current implementation of update_mmu_cache function performs local TLB flush. It does not take into account ASID information. Besides, it does not take into account other harts currently running the same mm context or possible migration of the running context to other harts. Meanwhile TLB flush is not performed for every context switch if ASID support is enabled. Patch [1] proposed to add ASID support to update_mmu_cache to avoid flushing local TLB entirely. This patch takes into account other harts currently running the same mm context as well as possible migration of this context to other harts. For this purpose the approach from flush_icache_mm is reused. Remote harts currently running the same mm context are informed via SBI calls that they need to flush their local TLBs. All the other harts are marked as needing a deferred TLB flush when this mm context runs on them. [1] https://lore.kernel.org/linux-riscv/20220821013926.8968-1-tjytimi@163.com/ Signed-off-by: Sergey Matyukevich Fixes: 65d4b9c53017 ("RISC-V: Implement ASID allocator") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-riscv/20220829205219.283543-1-geomatsi@gmail.com/#t Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/mmu.h | 2 ++ arch/riscv/include/asm/pgtable.h | 2 +- arch/riscv/include/asm/tlbflush.h | 18 ++++++++++++++++++ arch/riscv/mm/context.c | 10 ++++++++++ arch/riscv/mm/tlbflush.c | 28 +++++++++++----------------- 5 files changed, 42 insertions(+), 18 deletions(-) commit ff36c447e2330625066d193a25a8f94c1408d9d9 Merge: ddda6326eef9 0e706f7961a4 Author: Jakub Kicinski Date: Thu Dec 8 14:27:50 2022 -0800 Merge branch 'mlx4-better-big-tcp-support' Eric Dumazet says: ==================== mlx4: better BIG-TCP support mlx4 uses a bounce buffer in TX whenever the tx descriptors wrap around the right edge of the ring. Size of this bounce buffer was hard coded and can be increased if/when needed. ==================== Link: https://lore.kernel.org/r/20221207141237.2575012-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 0e706f7961a44f4be13cf9b5eedb70f0ab2724b8 Author: Eric Dumazet Date: Wed Dec 7 14:12:37 2022 +0000 net/mlx4: small optimization in mlx4_en_xmit() Test against MLX4_MAX_DESC_TXBBS only matters if the TX bounce buffer is going to be used. Signed-off-by: Eric Dumazet Cc: Wei Wang Reviewed-by: Tariq Toukan Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx4/en_tx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 26782aad00ccb8f8e5ae6221358fa79cdafc8548 Author: Eric Dumazet Date: Wed Dec 7 14:12:36 2022 +0000 net/mlx4: MLX4_TX_BOUNCE_BUFFER_SIZE depends on MAX_SKB_FRAGS Google production kernel has increased MAX_SKB_FRAGS to 45 for BIG-TCP rollout. Unfortunately mlx4 TX bounce buffer is not big enough whenever an skb has up to 45 page fragments. This can happen often with TCP TX zero copy, as one frag usually holds 4096 bytes of payload (order-0 page). Tested: Kernel built with MAX_SKB_FRAGS=45 ip link set dev eth0 gso_max_size 185000 netperf -t TCP_SENDFILE I made sure that "ethtool -G eth0 tx 64" was properly working, ring->full_size being set to 15. Signed-off-by: Eric Dumazet Reported-by: Wei Wang Reviewed-by: Tariq Toukan Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 35f31ff0c0b62b9e864fdb92bc1af9212818d624 Author: Eric Dumazet Date: Wed Dec 7 14:12:35 2022 +0000 net/mlx4: rename two constants MAX_DESC_SIZE is really the size of the bounce buffer used when reaching the right side of TX ring buffer. MAX_DESC_TXBBS get a MLX4_ prefix. Signed-off-by: Eric Dumazet Reviewed-by: Tariq Toukan Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx4/en_tx.c | 10 ++++++---- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) commit 95af1f1c4c9f9f08bbdb40812248b7bc5868a1da Author: Jacob Keller Date: Mon Dec 5 11:52:53 2022 -0800 ice: reschedule ice_ptp_wait_for_offset_valid during reset If the ice_ptp_wait_for_offest_valid function is scheduled to run while the driver is resetting, it will exit without completing calibration. The work function gets scheduled by ice_ptp_port_phy_restart which will be called as part of the reset recovery process. It is possible for the first execution to occur before the driver has completely cleared its resetting flags. Ensure calibration completes by rescheduling the task until reset is fully completed. Reported-by: Siddaraju DH Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f029a34394e7239f4111507b402ab234f990ec94 Author: Siddaraju DH Date: Mon Dec 5 11:52:52 2022 -0800 ice: make Tx and Rx vernier offset calibration independent The Tx and Rx calibration and timestamp generation blocks are independent. However, the ice driver waits until both blocks are ready before configuring either block. This can result in delay of configuring one block because we have not yet received a packet in the other block. There is no reason to wait to finish programming Tx just because we haven't received a packet. Similarly there is no reason to wait to program Rx just because we haven't transmitted a packet. Instead of checking both offset status before programming either block, refactor the ice_phy_cfg_tx_offset_e822 and ice_phy_cfg_rx_offset_e822 functions so that they perform their own offset status checks. Additionally, make them also check the offset ready bit to determine if the offset values have already been programmed. Call the individual configure functions directly in ice_ptp_wait_for_offset_valid. The functions will now correctly check status, and program the offsets if ready. Once the offset is programmed, the functions will exit quickly after just checking the offset ready register. Remove the ice_phy_calc_vernier_e822 in ice_ptp_hw.c, as well as the offset valid check functions in ice_ptp.c entirely as they are no longer necessary. With this change, the Tx and Rx blocks will each be enabled as soon as possible without waiting for the other block to complete calibration. This can enable timestamps faster in setups which have a low rate of transmitted or received packets. In particular, it can stop a situation where one port never receives traffic, and thus never finishes calibration of the Tx block, resulting in continuous faults reported by the ptp4l daemon application. Signed-off-by: Siddaraju DH Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 128 +++++--------------------- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 133 ++++++++++++++-------------- drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 3 +- 3 files changed, 91 insertions(+), 173 deletions(-) commit e3ba5248669310537cac55d63dd3c4059b862e00 Author: Jacob Keller Date: Mon Dec 5 11:52:51 2022 -0800 ice: only check set bits in ice_ptp_flush_tx_tracker The ice_ptp_flush_tx_tracker function is called to clear all outstanding Tx timestamp requests when the port is being brought down. This function iterates over the entire list, but this is unnecessary. We only need to check the bits which are actually set in the ready bitmap. Replace this logic with for_each_set_bit, and follow a similar flow as in ice_ptp_tx_tstamp_cleanup. Note that it is safe to call dev_kfree_skb_any on a NULL pointer as it will perform a no-op so we do not need to verify that the skb is actually NULL. The new implementation also avoids clearing (and thus reading!) the PHY timestamp unless the index is marked as having a valid timestamp in the timestamp status bitmap. This ensures that we properly clear the status registers as appropriate. Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 38 ++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 9 deletions(-) commit d40fd60093325cd7b77bc8622cb9593cd27fdaa6 Author: Jacob Keller Date: Mon Dec 5 11:52:50 2022 -0800 ice: handle flushing stale Tx timestamps in ice_ptp_tx_tstamp In the event of a PTP clock time change due to .adjtime or .settime, the ice driver needs to update the cached copy of the PHC time and also discard any outstanding Tx timestamps. This is required because otherwise the wrong copy of the PHC time will be used when extending the Tx timestamp. This could result in reporting incorrect timestamps to the stack. The current approach taken to handle this is to call ice_ptp_flush_tx_tracker, which will discard any timestamps which are not yet complete. This is problematic for two reasons: 1) it could lead to a potential race condition where the wrong timestamp is associated with a future packet. This can occur with the following flow: 1. Thread A gets request to transmit a timestamped packet, and picks an index and transmits the packet 2. Thread B calls ice_ptp_flush_tx_tracker and sees the index in use, marking is as disarded. No timestamp read occurs because the status bit is not set, but the index is released for re-use 3. Thread A gets a new request to transmit another timestamped packet, picks the same (now unused) index and transmits that packet. 4. The PHY transmits the first packet and updates the timestamp slot and generates an interrupt. 5. The ice_ptp_tx_tstamp thread executes and sees the interrupt and a valid timestamp but associates it with the new Tx SKB and not the one that actual timestamp for the packet as expected. This could result in the previous timestamp being assigned to a new packet producing incorrect timestamps and leading to incorrect behavior in PTP applications. This is most likely to occur when the packet rate for Tx timestamp requests is very high. 2) on E822 hardware, we must avoid reading a timestamp index more than once each time its status bit is set and an interrupt is generated by hardware. We do have some extensive checks for the unread flag to ensure that only one of either the ice_ptp_flush_tx_tracker or ice_ptp_tx_tstamp threads read the timestamp. However, even with this we can still have cases where we "flush" a timestamp that was actually completed in hardware. This can lead to cases where we don't read the timestamp index as appropriate. To fix both of these issues, we must avoid calling ice_ptp_flush_tx_tracker outside of the teardown path. Rather than using ice_ptp_flush_tx_tracker, introduce a new state bitmap, the stale bitmap. Start this as cleared when we begin a new timestamp request. When we're about to extend a timestamp and send it up to the stack, first check to see if that stale bit was set. If so, drop the timestamp without sending it to the stack. When we need to update the cached PHC timestamp out of band, just mark all currently outstanding timestamps as stale. This will ensure that once hardware completes the timestamp we'll ignore it correctly and avoid reporting bogus timestamps to userspace. With this change, we fix potential issues caused by calling ice_ptp_flush_tx_tracker during normal operation. Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 101 ++++++++++++++++++++----------- drivers/net/ethernet/intel/ice/ice_ptp.h | 2 + 2 files changed, 67 insertions(+), 36 deletions(-) commit c1f3414df2e86e63d603712f81443af6cf07f8a3 Author: Jacob Keller Date: Mon Dec 5 11:52:49 2022 -0800 ice: cleanup allocations in ice_ptp_alloc_tx_tracker The ice_ptp_alloc_tx_tracker function must allocate the timestamp array and the bitmap for tracking the currently in use indexes. A future change is going to add yet another allocation to this function. If these allocations fail we need to ensure that we properly cleanup and ensure that the pointers in the ice_ptp_tx structure are NULL. Simplify this logic by allocating to local variables first. If any allocation fails, then free everything and exit. Only update the ice_ptp_tx structure if all allocations succeed. This ensures that we have no side effects on the Tx structure unless all allocations have succeeded. Thus, no code will see an invalid pointer and we don't need to re-assign NULL on cleanup. This is safe because kernel "free" functions are designed to be NULL safe and perform no action if passed a NULL pointer. Thus its safe to simply always call kfree or bitmap_free even if one of those pointers was NULL. Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 3ad5c10bf21d1d69ac1117a89b3ce2271a832b34 Author: Jacob Keller Date: Mon Dec 5 11:52:47 2022 -0800 ice: protect init and calibrating check in ice_ptp_request_ts When requesting a new timestamp, the ice_ptp_request_ts function does not hold the Tx tracker lock while checking init and calibrating. This means that we might issue a new timestamp request just after the Tx timestamp tracker starts being deinitialized. This could lead to incorrect access of the timestamp structures. Correct this by moving the init and calibrating checks under the lock, and updating the flows which modify these fields to use the lock. Note that we do not need to hold the lock while checking for tx->init in ice_ptp_tx_tstamp. This is because the teardown function will use synchronize_irq after clearing the flag to ensure that the threaded interrupt completes. Either a) the tx->init flag will be cleared before the ice_ptp_tx_tstamp function starts, thus it will exit immediately, or b) the threaded interrupt will be executing and the synchronize_irq will wait until the threaded interrupt has completed at which point we know the init field has definitely been set and new interrupts will not execute the Tx timestamp thread function. Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 36 +++++++++++++++++++++++++++----- drivers/net/ethernet/intel/ice/ice_ptp.h | 2 +- 2 files changed, 32 insertions(+), 6 deletions(-) commit 895fa59647cd64da99eebd1199cf27ecce08c17c Author: Li Qiong Date: Tue Dec 6 15:44:14 2022 +0800 netfilter: flowtable: add a 'default' case to flowtable datapath Add a 'default' case in case return a uninitialized value of ret, this should not ever happen since the follow transmit path types: - FLOW_OFFLOAD_XMIT_UNSPEC - FLOW_OFFLOAD_XMIT_TC are never observed from this path. Add this check for safety reasons. Signed-off-by: Li Qiong Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_flow_table_ip.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ddda6326eef9961faef4735c6dd596475e7bdb65 Merge: bde55dd9ccda 3603f26633e7 Author: Jakub Kicinski Date: Thu Dec 8 13:04:57 2022 -0800 Merge branch 'mlx5-Support-tc-police-jump-conform-exceed-attribute' Saeed Mahameed says: ==================== Support tc police jump conform-exceed attribute The tc police action conform-exceed option defines how to handle packets which exceed or conform to the configured bandwidth limit. One of the possible conform-exceed values is jump, which skips over a specified number of actions. This series adds support for conform-exceed jump action. The series adds platform support for branching actions by providing true/false flow attributes to the branching action. This is necessary for supporting police jump, as each branch may execute a different action list. The first five patches are preparation patches: - Patches 1 and 2 add support for actions with no destinations (e.g. drop) - Patch 3 refactor the code for subsequent function reuse - Patch 4 defines an abstract way for identifying terminating actions - Patch 5 updates action list validations logic considering branching actions The following three patches introduce an interface for abstracting branching actions: - Patch 6 introduces an abstract api for defining branching actions - Patch 7 generically instantiates the branching flow attributes using the abstract API Patch 8 adds the platform support for jump actions, by executing the following sequence: a. Store the jumping flow attr b. Identify the jump target action while iterating the actions list. c. Instantiate a new flow attribute after the jump target action. This is the flow attribute that the branching action should jump to. d. Set the target post action id on: d.1. The jumping attribute, thus realizing the jump functionality. d.2. The attribute preceding the target jump attr, if not terminating. The next patches apply the platform's branching attributes to the police action: - Patch 9 is a refactor patch - Patch 10 initializes the post meter table with the red/green flow attributes, as were initialized by the platform - Patch 11 enables the offload of meter actions using jump conform-exceed value. ==================== Link: https://lore.kernel.org/all/20221203221337.29267-1-saeed@kernel.org/ Signed-off-by: Jakub Kicinski commit 3603f26633e7624cb33f47fc92843db55c798097 Author: Oz Shlomo Date: Sat Dec 3 14:13:33 2022 -0800 net/mlx5e: TC, allow meter jump control action Separate the matchall police action validation from flower validation. Isolate the action validation logic in the police action parser. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221203221337.29267-12-saeed@kernel.org Signed-off-by: Jakub Kicinski .../ethernet/mellanox/mlx5/core/en/tc/act/police.c | 52 ++++++++++++++++++---- .../net/ethernet/mellanox/mlx5/core/en/tc_priv.h | 4 -- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 21 ++++----- 3 files changed, 54 insertions(+), 23 deletions(-) commit 0d8c38d44f338bbe5772532127fdbacc9f608ac8 Author: Oz Shlomo Date: Sat Dec 3 14:13:32 2022 -0800 net/mlx5e: TC, init post meter rules with branching attributes Instantiate the post meter actions with the platform initialized branching action attributes. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221203221337.29267-11-saeed@kernel.org Signed-off-by: Jakub Kicinski .../ethernet/mellanox/mlx5/core/en/tc/post_meter.c | 84 +++++++++++++++------- .../ethernet/mellanox/mlx5/core/en/tc/post_meter.h | 6 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 11 +-- 3 files changed, 67 insertions(+), 34 deletions(-) commit 3fcb94e393576aa64315964b42eeb1db580957d3 Author: Oz Shlomo Date: Sat Dec 3 14:13:31 2022 -0800 net/mlx5e: TC, rename post_meter actions Currently post meter supports only the pipe/drop conform-exceed policy. This assumption is reflected in several variable names. Rename the following variables as a pre-step for using the generalized branching action platform. Rename fwd_green_rule/drop_red_rule to green_rule/red_rule respectively. Repurpose red_counter/green_counter to act_counter/drop_counter to allow police conform-exceed configurations that do not drop. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221203221337.29267-10-saeed@kernel.org Signed-off-by: Jakub Kicinski .../net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 24 ++++++++--------- .../net/ethernet/mellanox/mlx5/core/en/tc/meter.h | 4 +-- .../ethernet/mellanox/mlx5/core/en/tc/post_meter.c | 30 +++++++++++----------- .../ethernet/mellanox/mlx5/core/en/tc/post_meter.h | 4 +-- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 +-- 5 files changed, 33 insertions(+), 33 deletions(-) commit c84fa1ab94a77c069503fb816c7aa310a6d10e31 Author: Oz Shlomo Date: Sat Dec 3 14:13:30 2022 -0800 net/mlx5e: TC, initialize branching action with target attr Identify the jump target action when iterating the action list. Initialize the jump target attr with the jumping attribute during the parsing phase. Initialize the jumping attr post action with the target during the offload phase. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221203221337.29267-9-saeed@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 86 +++++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 2 + 2 files changed, 83 insertions(+), 5 deletions(-) commit f86488cb4685bbb885057afa0b61bb8afc1d6bb1 Author: Oz Shlomo Date: Sat Dec 3 14:13:29 2022 -0800 net/mlx5e: TC, initialize branch flow attributes Initialize flow attribute for drop, accept, pipe and jump branching actions. Instantiate a flow attribute instance according to the specified branch control action. Store the branching attributes on the branching action flow attribute during the parsing phase. Then, during the offload phase, allocate the relevant mod header objects to the branching actions. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221203221337.29267-8-saeed@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 156 +++++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 2 + 2 files changed, 142 insertions(+), 16 deletions(-) commit ec5878552b73cbb7e7d72f9a1a3d8a23a43a0bb2 Author: Oz Shlomo Date: Sat Dec 3 14:13:28 2022 -0800 net/mlx5e: TC, set control params for branching actions Extend the act tc api to set the branch control params aligning with the police conform/exceed use case. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221203221337.29267-7-saeed@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.h | 9 +++++++++ drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/police.c | 14 ++++++++++++++ 2 files changed, 23 insertions(+) commit 6442638251f3679a05a75e69d5096680c14a210e Author: Oz Shlomo Date: Sat Dec 3 14:13:27 2022 -0800 net/mlx5e: TC, validate action list per attribute Currently the entire flow action list is validate for offload limitations. For example, flow with both forward and drop actions are declared invalid due to hardware restrictions. However, a multi-table hardware model changes the limitations from a flow scope to a single flow attribute scope. Apply offload limitations to flow attributes instead of the entire flow. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221203221337.29267-6-saeed@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 62 +++++++++++++------------ 1 file changed, 32 insertions(+), 30 deletions(-) commit d3f6b0df9128c00c54e11702f62b967fc63c85f3 Author: Oz Shlomo Date: Sat Dec 3 14:13:26 2022 -0800 net/mlx5e: TC, add terminating actions Extend act api to identify actions that terminate action list. Pre-step for terminating branching actions. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221203221337.29267-5-saeed@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/accept.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.h | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/drop.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/goto.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/mirred.c | 7 +++++++ drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/mirred_nic.c | 1 + 7 files changed, 15 insertions(+), 1 deletion(-) commit 8facc02f22f17879351419df9b253e06dc1f618b Author: Oz Shlomo Date: Sat Dec 3 14:13:25 2022 -0800 net/mlx5e: TC, reuse flow attribute post parser processing After the tc action parsing phase the flow attribute is initialized with relevant eswitch offload objects such as tunnel, vlan, header modify and counter attributes. The post processing is done both for fdb and post-action attributes. Reuse the flow attribute post parsing logic by both fdb and post-action offloads. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221203221337.29267-4-saeed@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 96 +++++++++++++------------ 1 file changed, 51 insertions(+), 45 deletions(-) commit f07d8afb1ceae57767cf80c134b7a03e9c589276 Author: Oz Shlomo Date: Sat Dec 3 14:13:24 2022 -0800 net/mlx5: fs, assert null dest pointer when dest_num is 0 Currently create_flow_handle() assumes a null dest pointer when there are no destinations. This might not be the case as the caller may pass an allocated dest array while setting the dest_num parameter to 0. Assert null dest array for flow rules that have no destinations (e.g. drop rule). Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221203221337.29267-3-saeed@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 3 +++ 1 file changed, 3 insertions(+) commit 5a5624d1edf44e808481dedaf59eae61fd66e052 Author: Oz Shlomo Date: Sat Dec 3 14:13:23 2022 -0800 net/mlx5e: E-Switch, handle flow attribute with no destinations Rules with drop action are not required to have a destination. Currently the destination list is allocated with the maximum number of destinations and passed to the fs_core layer along with the actual number of destinations. Remove redundant passing of dest pointer when count of dest is 0. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221203221337.29267-2-saeed@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5 +++++ 1 file changed, 5 insertions(+) commit f04facfb993de47e2133b2b842d72b97b1c50162 Author: Fan Ni Date: Mon Nov 7 21:22:31 2022 +0000 cxl/region: Fix memdev reuse check Due to a typo, the check of whether or not a memdev has already been used as a target for the region (above code piece) will always be skipped. Given a memdev with more than one HDM decoder, an interleaved region can be created that maps multiple HPAs to the same DPA. According to CXL spec 3.0 8.1.3.8.4, "Aliasing (mapping more than one Host Physical Address (HPA) to a single Device Physical Address) is forbidden." Fix this by using existing iterator for memdev reuse check. Cc: Fixes: 384e624bb211 ("cxl/region: Attach endpoint decoders") Signed-off-by: Fan Ni Link: https://lore.kernel.org/r/20221107212153.745993-1-fan.ni@samsung.com Signed-off-by: Dan Williams drivers/cxl/core/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fb45f95eec682621748b7cb012c6a8f0f981e6a Author: Qingfang DENG Date: Thu Dec 8 20:35:29 2022 +0800 netfilter: flowtable: really fix NAT IPv6 offload The for-loop was broken from the start. It translates to: for (i = 0; i < 4; i += 4) which means the loop statement is run only once, so only the highest 32-bit of the IPv6 address gets mangled. Fix the loop increment. Fixes: 0e07e25b481a ("netfilter: flowtable: fix NAT IPv6 offload mangling") Fixes: 5c27d8d76ce8 ("netfilter: nf_flow_table_offload: add IPv6 support") Signed-off-by: Qingfang DENG Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_flow_table_offload.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f0ae124019faaa03f8b4c3fbe52ae35ab3a8dbda Author: Jacob Keller Date: Mon Dec 5 11:52:46 2022 -0800 ice: synchronize the misc IRQ when tearing down Tx tracker Since commit 1229b33973c7 ("ice: Add low latency Tx timestamp read") the ice driver has used a threaded IRQ for handling Tx timestamps. This change did not add a call to synchronize_irq during ice_ptp_release_tx_tracker. Thus it is possible that an interrupt could occur just as the tracker is being removed. This could lead to a use-after-free of the Tx tracker structure data. Fix this by calling sychronize_irq in ice_ptp_release_tx_tracker after we've cleared the init flag. In addition, make sure that we re-check the init flag at the end of ice_ptp_tx_tstamp before we exit ensuring that we will stop polling for new timestamps once the tracker de-initialization has begun. Refactor the ts_handled variable into "more_timestamps" so that we can simply directly assign this boolean instead of relying on an initialized value of true. This makes the new combined check easier to read. With this change, the ice_ptp_release_tx_tracker function will now wait for the threaded interrupt to complete if it was executing while the init flag was cleared. Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 10e4b4a3a3e1b7007a72988bb0a7c741b19d90d7 Author: Jacob Keller Date: Mon Dec 5 11:52:45 2022 -0800 ice: check Tx timestamp memory register for ready timestamps The PHY for E822 based hardware has a register which indicates which timestamps are valid in the PHY timestamp memory block. Each bit in the register indicates whether the associated index in the timestamp memory is valid. Hardware sets this bit when the timestamp is captured, and clears the bit when the timestamp is read. Use of this register is important as reading timestamp registers can impact the way that hardware generates timestamp interrupts. This occurs because the PHY has an internal value which is incremented when hardware captures a timestamp and decremented when software reads a timestamp. Reading timestamps which are not marked as valid still decrement the internal value and can result in the Tx timestamp interrupt not triggering in the future. To prevent this, use the timestamp memory value to determine which timestamps are ready to be read. The ice_get_phy_tx_tstamp_ready function reads this value. For E810 devices, this just always returns with all bits set. Skip any timestamp which is not set in this bitmap, avoiding reading extra timestamps on E822 devices. The stale check against a cached timestamp value is no longer necessary for PHYs which support the timestamp ready bitmap properly. E810 devices still need this. Introduce a new verify_cached flag to the ice_ptp_tx structure. Use this to determine if we need to perform the verification against the cached timestamp value. Set this to 1 for the E810 Tx tracker init function. Notice that many of the fields in ice_ptp_tx are simple 1 bit flags. Save some structure space by using bitfields of length 1 for these values. Modify the ICE_PTP_TS_VALID check to simply drop the timestamp immediately so that in an event of getting such an invalid timestamp the driver does not attempt to re-read the timestamp again in a future poll of the register. With these changes, the driver now reads each timestamp register exactly once, and does not attempt any re-reads. This ensures the interrupt tracking logic in the PHY will not get stuck. Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 48 ++++++++++++++++--- drivers/net/ethernet/intel/ice/ice_ptp.h | 17 +++++-- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 72 +++++++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 4 files changed, 126 insertions(+), 12 deletions(-) commit 0dd9286263923860a1829778e232a501b49c485f Author: Jacob Keller Date: Mon Dec 5 11:52:44 2022 -0800 ice: handle discarding old Tx requests in ice_ptp_tx_tstamp Currently the driver uses the PTP kthread to process handling and discarding of stale Tx timestamp requests. The function ice_ptp_tx_tstamp_cleanup is used for this. A separate thread creates complications for the driver as we now have both the main Tx timestamp processing IRQ checking timestamps as well as the kthread. Rather than using the kthread to handle this, simply check for stale timestamps within the ice_ptp_tx_tstamp function. This function must already process the timestamps anyways. If a Tx timestamp has been waiting for 2 seconds we simply clear the bit and discard the SKB. This avoids the complication of having separate threads polling, reducing overall CPU work. Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 111 +++++++++++++------------------ 1 file changed, 48 insertions(+), 63 deletions(-) commit 6b1ff5d392283b737abc038f7ab1509d9b8311c7 Author: Jacob Keller Date: Mon Dec 5 11:52:43 2022 -0800 ice: always call ice_ptp_link_change and make it void The ice_ptp_link_change function is currently only called for E822 based hardware. Future changes are going to extend this function to perform additional tasks on link change. Always call this function, moving the E810 check from the callers down to just before we call the E822-specific function required to restart the PHY. This function also returns an error value, but none of the callers actually check it. In general, the errors it produces are more likely systemic problems such as invalid or corrupt port numbers. No caller checks these, and so no warning is logged. Re-order the flag checks so that ICE_FLAG_PTP is checked first. Drop the unnecessary check for ICE_FLAG_PTP_SUPPORTED, as ICE_FLAG_PTP will not be set except when ICE_FLAG_PTP_SUPPORTED is set. Convert the port checks to WARN_ON_ONCE, in order to generate a kernel stack trace when they are hit. Convert the function to void since no caller actually checks these return values. Co-developed-by: Dave Ertman Signed-off-by: Dave Ertman Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_main.c | 9 +++------ drivers/net/ethernet/intel/ice/ice_ptp.c | 24 ++++++++++++------------ drivers/net/ethernet/intel/ice/ice_ptp.h | 7 ++++--- 3 files changed, 19 insertions(+), 21 deletions(-) commit 11722c39c8d91cfb97197f8f5e2d45c9ebf27bb6 Author: Jacob Keller Date: Mon Dec 5 11:52:42 2022 -0800 ice: fix misuse of "link err" with "link status" The ice_ptp_link_change function has a comment which mentions "link err" when referring to the current link status. We are storing the status of whether link is up or down, which is not an error. It is appears that this use of err accidentally got included due to an overzealous search and replace when removing the ice_status enum and local status variable. Fix the wording to use the correct term. Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 407b66c07e9837cd11564746faaac4f32a0c5c5b Author: Karol Kolacinski Date: Mon Dec 5 11:52:41 2022 -0800 ice: Reset TS memory for all quads In E822 products, the owner PF should reset memory for all quads, not only for the one where assigned lport is. Signed-off-by: Karol Kolacinski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 29 ++-------------------- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 38 +++++++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 2 ++ 3 files changed, 42 insertions(+), 27 deletions(-) commit 0357d5cab8e497517d19b745d386573b97e2bc4b Author: Milena Olech Date: Mon Dec 5 11:52:40 2022 -0800 ice: Remove the E822 vernier "bypass" logic The E822 devices support an extended "vernier" calibration which enables higher precision timestamps by accounting for delays in the PHY, and compensating for them. These delays are measured by hardware as part of its vernier calibration logic. The driver currently starts the PHY in "bypass" mode which skips the compensation. Then it later attempts to switch from bypass to vernier. This unfortunately does not work as expected. Instead of properly compensating for the delays, the hardware continues operating in bypass without the improved precision expected. Because we cannot dynamically switch between bypass and vernier mode, refactor the driver to always operate in vernier mode. This has a slight downside: Tx timestamp and Rx timestamp requests that occur as the very first packet set after link up will not complete properly and may be reported to applications as missing timestamps. This occurs frequently in test environments where traffic is light or targeted specifically at testing PTP. However, in practice most environments will have transmitted or received some data over the network before such initial requests are made. Signed-off-by: Milena Olech Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 10 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 145 ++-------------------------- drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 4 +- 3 files changed, 14 insertions(+), 145 deletions(-) commit 6b5cbc8c4ec71e49dc8d2c393b105e8007a02b41 Author: Sergey Temerkhanov Date: Mon Dec 5 11:52:39 2022 -0800 ice: Use more generic names for ice_ptp_tx fields Some supported devices have per-port timestamp memory blocks while others have shared ones within quads. Rename the struct ice_ptp_tx fields to reflect the block entities it works with Signed-off-by: Sergey Temerkhanov Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 26 +++++++++++++------------- drivers/net/ethernet/intel/ice/ice_ptp.h | 11 ++++++----- 2 files changed, 19 insertions(+), 18 deletions(-) commit c2cc0ce72a5ed3e01705e14221d97e96ed7a37b8 Author: Yang Jihong Date: Thu Dec 8 09:37:24 2022 +0800 bpf: Fix comment error in fixup_kfunc_call function insn->imm for kfunc is the relative address of __bpf_call_base, instead of __bpf_base_call, Fix the comment error. Signed-off-by: Yang Jihong Link: https://lore.kernel.org/r/20221208013724.257848-1-yangjihong1@huawei.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d35af0a7feb077c43ff0233bba5a8c6e75b73e35 Author: Björn Töpel Date: Wed Dec 7 11:35:40 2022 +0100 bpf: Do not zero-extend kfunc return values In BPF all global functions, and BPF helpers return a 64-bit value. For kfunc calls, this is not the case, and they can return e.g. 32-bit values. The return register R0 for kfuncs calls can therefore be marked as subreg_def != DEF_NOT_SUBREG. In general, if a register is marked with subreg_def != DEF_NOT_SUBREG, some archs (where bpf_jit_needs_zext() returns true) require the verifier to insert explicit zero-extension instructions. For kfuncs calls, however, the caller should do sign/zero extension for return values. In other words, the compiler is responsible to insert proper instructions, not the verifier. An example, provided by Yonghong Song: $ cat t.c extern unsigned foo(void); unsigned bar1(void) { return foo(); } unsigned bar2(void) { if (foo()) return 10; else return 20; } $ clang -target bpf -mcpu=v3 -O2 -c t.c && llvm-objdump -d t.o t.o: file format elf64-bpf Disassembly of section .text: 0000000000000000 : 0: 85 10 00 00 ff ff ff ff call -0x1 1: 95 00 00 00 00 00 00 00 exit 0000000000000010 : 2: 85 10 00 00 ff ff ff ff call -0x1 3: bc 01 00 00 00 00 00 00 w1 = w0 4: b4 00 00 00 14 00 00 00 w0 = 0x14 5: 16 01 01 00 00 00 00 00 if w1 == 0x0 goto +0x1 6: b4 00 00 00 0a 00 00 00 w0 = 0xa 0000000000000038 : 7: 95 00 00 00 00 00 00 00 exit If the return value of 'foo()' is used in the BPF program, the proper zero-extension will be done. Currently, the verifier correctly marks, say, a 32-bit return value as subreg_def != DEF_NOT_SUBREG, but will fail performing the actual zero-extension, due to a verifier bug in opt_subreg_zext_lo32_rnd_hi32(). load_reg is not properly set to R0, and the following path will be taken: if (WARN_ON(load_reg == -1)) { verbose(env, "verifier bug. zext_dst is set, but no reg is defined\n"); return -EFAULT; } A longer discussion from v1 can be found in the link below. Correct the verifier by avoiding doing explicit zero-extension of R0 for kfunc calls. Note that R0 will still be marked as a sub-register for return values smaller than 64-bit. Fixes: 83a2881903f3 ("bpf: Account for BPF_FETCH in insn_has_def32()") Link: https://lore.kernel.org/bpf/20221202103620.1915679-1-bjorn@kernel.org/ Suggested-by: Yonghong Song Signed-off-by: Björn Töpel Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221207103540.396496-1-bjorn@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 4 ++++ 1 file changed, 4 insertions(+) commit e8dfdf3162eb549d064b8c10b1564f7e8ee82591 Author: Ard Biesheuvel Date: Fri Oct 28 16:39:14 2022 +0200 arm64: efi: Recover from synchronous exceptions occurring in firmware Unlike x86, which has machinery to deal with page faults that occur during the execution of EFI runtime services, arm64 has nothing like that, and a synchronous exception raised by firmware code brings down the whole system. With more EFI based systems appearing that were not built to run Linux (such as the Windows-on-ARM laptops based on Qualcomm SOCs), as well as the introduction of PRM (platform specific firmware routines that are callable just like EFI runtime services), we are more likely to run into issues of this sort, and it is much more likely that we can identify and work around such issues if they don't bring down the system entirely. Since we already use a EFI runtime services call wrapper in assembler, we can quite easily add some code that captures the execution state at the point where the call is made, allowing us to revert to this state and proceed execution if the call triggered a synchronous exception. Given that the kernel and the firmware don't share any data structures that could end up in an indeterminate state, we can happily continue running, as long as we mark the EFI runtime services as unavailable from that point on. Signed-off-by: Ard Biesheuvel Acked-by: Catalin Marinas arch/arm64/include/asm/efi.h | 8 ++++++++ arch/arm64/kernel/efi-rt-wrapper.S | 32 +++++++++++++++++++++++++++----- arch/arm64/kernel/efi.c | 22 ++++++++++++++++++++++ arch/arm64/mm/fault.c | 4 ++++ drivers/firmware/efi/runtime-wrappers.c | 1 + 5 files changed, 62 insertions(+), 5 deletions(-) commit 870af777da22505851174a34c0228042d7ed5f5f Author: Yangtao Li Date: Fri Nov 25 19:47:36 2022 +0800 f2fs: do some cleanup for f2fs module init Just for cleanup, no functional changes. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim fs/f2fs/compress.c | 46 ++++++---------------------------------------- fs/f2fs/data.c | 14 ++++---------- fs/f2fs/gc.c | 4 +--- fs/f2fs/recovery.c | 4 +--- fs/f2fs/super.c | 8 ++------ 5 files changed, 14 insertions(+), 62 deletions(-) commit 398bb30d4f4e857ee1352130c6935f0fb16d7af2 Author: Chao Yu Date: Sat Nov 26 10:38:07 2022 +0800 MAINTAINERS: Add f2fs bug tracker link As f2fs component in bugzilla.kernel.org was created and used since 2018-7. Signed-off-by: Chao Yu Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.rst | 6 +++++- MAINTAINERS | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit 5bcd655fffaec24e849bda1207446f5cc821713e Author: Christoph Hellwig Date: Mon Nov 28 10:43:46 2022 +0100 f2fs: remove the unused flush argument to change_curseg Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 8442d94b8ac8d5d8300725a9ffa9def526b71170 Author: Christoph Hellwig Date: Mon Nov 28 10:43:45 2022 +0100 f2fs: open code allocate_segment_by_default allocate_segment_by_default has just two callers, which use very different code pathes inside it based on the force paramter. Just open code the logic in the two callers using a new helper to decided if a new segment should be allocated. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) commit 1c8a8ec0a0e9a1176022a35c4daf04fe1594d270 Author: Christoph Hellwig Date: Mon Nov 28 10:43:44 2022 +0100 f2fs: remove struct segment_allocation default_salloc_ops There is only single instance of these ops, so remove the indirection and call allocate_segment_by_default directly. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 11 ++--------- fs/f2fs/segment.h | 6 ------ 2 files changed, 2 insertions(+), 15 deletions(-) commit 7991dbff6849f67e823b7cc0c15e5a90b0549b9f Author: Zhihao Cheng Date: Thu Dec 8 22:28:02 2022 +0800 dm thin: Use last transaction's pmd->root when commit failed Recently we found a softlock up problem in dm thin pool btree lookup code due to corrupted metadata: Kernel panic - not syncing: softlockup: hung tasks CPU: 7 PID: 2669225 Comm: kworker/u16:3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) Workqueue: dm-thin do_worker [dm_thin_pool] Call Trace: dump_stack+0x9c/0xd3 panic+0x35d/0x6b9 watchdog_timer_fn.cold+0x16/0x25 __run_hrtimer+0xa2/0x2d0 RIP: 0010:__relink_lru+0x102/0x220 [dm_bufio] __bufio_new+0x11f/0x4f0 [dm_bufio] new_read+0xa3/0x1e0 [dm_bufio] dm_bm_read_lock+0x33/0xd0 [dm_persistent_data] ro_step+0x63/0x100 [dm_persistent_data] btree_lookup_raw.constprop.0+0x44/0x220 [dm_persistent_data] dm_btree_lookup+0x16f/0x210 [dm_persistent_data] dm_thin_find_block+0x12c/0x210 [dm_thin_pool] __process_bio_read_only+0xc5/0x400 [dm_thin_pool] process_thin_deferred_bios+0x1a4/0x4a0 [dm_thin_pool] process_one_work+0x3c5/0x730 Following process may generate a broken btree mixed with fresh and stale btree nodes, which could get dm thin trapped in an infinite loop while looking up data block: Transaction 1: pmd->root = A, A->B->C // One path in btree pmd->root = X, X->Y->Z // Copy-up Transaction 2: X,Z is updated on disk, Y write failed. // Commit failed, dm thin becomes read-only. process_bio_read_only dm_thin_find_block __find_block dm_btree_lookup(pmd->root) The pmd->root points to a broken btree, Y may contain stale node pointing to any block, for example X, which gets dm thin trapped into a dead loop while looking up Z. Fix this by setting pmd->root in __open_metadata(), so that dm thin will use the last transaction's pmd->root if commit failed. Fetch a reproducer in [Link]. Linke: https://bugzilla.kernel.org/show_bug.cgi?id=216790 Cc: stable@vger.kernel.org Fixes: 991d9fa02da0 ("dm: add thin provisioning target") Signed-off-by: Zhihao Cheng Acked-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-thin-metadata.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c1ddc3dad85dda4421e852c72f7596cdb10e9fc6 Author: Michal Simek Date: Thu Dec 8 13:38:50 2022 +0100 PCI: xilinx-nwl: Fix coding style violations Fix code alignments and remove additional newline. Link: https://lore.kernel.org/r/17c75e7003bb8c43a0f45ae3d7c45cac230ef852.1670503129.git.michal.simek@amd.com Signed-off-by: Michal Simek Signed-off-by: Bjorn Helgaas drivers/pci/controller/pcie-xilinx-nwl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c83ce312081cf024b00a8a7fe785a90ba94b69fb Merge: da060ab86eb0 67327f125801 Author: Arnd Bergmann Date: Thu Dec 8 17:44:12 2022 +0100 Merge tag 'asahi-soc-dt-6.2-v3' of https://github.com/AsahiLinux/linux into soc/dt Apple SoC DT updates for 6.2 (v3). One final update for 6.2. This includes: * L1/L2 cache topology for t8103 * A bunch of typo, style, and minor functional fixes * tag 'asahi-soc-dt-6.2-v3' of https://github.com/AsahiLinux/linux: arm64: dts: apple: t6002: Fix GPU power domains arm64: dts: apple: t600x-pmgr: Fix search & replace typo arm64: dts: apple: Add t8103 L1/L2 cache properties and nodes arm64: dts: apple: Rename dart-sio* to sio-dart* arch: arm64: apple: t600x: Use standard "iommu" node name arch: arm64: apple: t8103: Use standard "iommu" node name Link: https://lore.kernel.org/r/488ad4e9-04dc-1774-3bbe-d313ef30f14d@marcan.st Signed-off-by: Arnd Bergmann commit ab4620f58d38206687b9f99d9d2cc1d5a2640985 Author: Hans de Goede Date: Thu Dec 8 15:23:35 2022 +0100 ACPI: EC: Fix ECDT probe ordering issues ACPI-2.0 says that the EC OpRegion handler must be available immediately (like the standard default OpRegion handlers): Quoting from the ACPI spec version 6.3: "6.5.4 _REG (Region) ... 2. OSPM must make Embedded Controller operation regions, accessed via the Embedded Controllers described in ECDT, available before executing any control method. These operation regions may become inaccessible after OSPM runs _REG(EmbeddedControl, 0)." So acpi_bus_init() calls acpi_ec_ecdt_probe(), which calls acpi_install_address_space_handler() to install the EC's OpRegion handler, early on. This not only installs the OpRegion handler, but also calls the EC's _REG method. The _REG method call is a problem because it may rely on initialization done by the _INI methods of one of the PCI / _SB root devs, see for example: https://bugzilla.kernel.org/show_bug.cgi?id=214899 . Generally speaking _REG methods are executed when the ACPI-device they are part of has a driver bound to it. Where as _INI methods must be executed at table load time (according to the spec). The problem here is that the early acpi_install_address_space_handler() call causes the _REG handler to run too early. To allow fixing this the ACPICA code now allows to split the OpRegion handler installation and the executing of _REG into 2 separate steps. This commit uses this ACPICA functionality to fix the EC probe ordering by delaying the executing of _REG for ECDT described ECs till the matching EC device in the DSDT gets parsed and acpi_ec_add() for it gets called. This moves the calling of _REG for the EC on devices with an ECDT to the same point in time where it is called on devices without an ECDT table. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214899 Reported-and-tested-by: Johannes Penßel Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit a5072078dbfaa9d70130805766dfa34bbb7bf2a7 Author: Hans de Goede Date: Thu Dec 8 15:23:34 2022 +0100 ACPI: EC: Fix EC address space handler unregistration When an ECDT table is present the EC address space handler gets registered on the root node. So to unregister it properly the unregister call also must be done on the root node. Store the ACPI handle used for the acpi_install_address_space_handler() call and use te same handle for the acpi_remove_address_space_handler() call. Reported-by: Rafael J. Wysocki Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 4 +++- drivers/acpi/internal.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit 0634033dd104da8bf3903ff9b7f57ae81c6e1640 Merge: 54c516aeb8b3 b423f240a66a Author: Rafael J. Wysocki Date: Thu Dec 8 17:39:45 2022 +0100 Merge back ACPI EC changes for 6.2-rc1 commit 54c516aeb8b39eeae6450b7d8076d381568dca46 Author: Hans de Goede Date: Thu Dec 8 15:23:33 2022 +0100 ACPICA: Allow address_space_handler Install and _REG execution as 2 separate steps ACPI-2.0 says that the EC op_region handler must be available immediately (like the standard default op_region handlers): Quoting from the ACPI spec version 6.3: "6.5.4 _REG (Region) ... 2. OSPM must make Embedded Controller operation regions, accessed via the Embedded Controllers described in ECDT, available before executing any control method. These operation regions may become inaccessible after OSPM runs _REG(EmbeddedControl, 0)." So the OS must probe the ECDT described EC and install the OpRegion handler before calling acpi_enable_subsystem() and acpi_initialize_objects(). This is a problem because calling acpi_install_address_space_handler() does not just install the op_region handler, it also runs the EC's _REG method. This _REG method may rely on initialization done by the _INI methods of one of the PCI / _SB root devices. For the other early/default op_region handlers the op_region handler install and the _REG execution is split into 2 separate steps: 1. acpi_ev_install_region_handlers(), called early from acpi_load_tables() 2. acpi_ev_initialize_op_regions(), called from acpi_initialize_objects() To fix the EC op_region issue, add 2 bew functions: 1. acpi_install_address_space_handler_no_reg() 2. acpi_execute_reg_methods() to allow doing things in 2 steps for other op_region handlers, like the EC handler, too. Note that the comment describing acpi_ev_install_region_handlers() even has an alinea describing this problem. Using the new methods allows users to avoid this problem. Link: https://github.com/acpica/acpica/pull/786 Link: https://bugzilla.kernel.org/show_bug.cgi?id=214899 Reported-and-tested-by: Johannes Penßel Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/evxfregn.c | 92 ++++++++++++++++++++++++++++++++++++++---- include/acpi/acpixf.h | 10 +++++ 2 files changed, 95 insertions(+), 7 deletions(-) commit 7a9d74e7e403cb2e60d4d00c05f2f3ab2a33d0c3 Author: Hans de Goede Date: Thu Dec 8 15:23:32 2022 +0100 ACPICA: include/acpi/acpixf.h: Fix indentation A bunch of the functions declared in include/acpi/acpixf.h have their name aligned a space after the '(' of e.g. the `ACPI_EXTERNAL_RETURN_STATUS(acpi_status` line above rather then being directly aligned after the '('. This breaks applying patches generated from the ACPICA upstream git, remove the extra space before the function-names and all the arguments to fix this. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki include/acpi/acpixf.h | 120 +++++++++++++++++++++++++------------------------- 1 file changed, 60 insertions(+), 60 deletions(-) commit 7dfb216eda99bbfc2a8c3b03d2eec63314f52b3c Author: Amadeusz Sławiński Date: Thu Dec 8 23:40:16 2022 +0100 ACPICA: Fix operand resolution In our tests we get UBSAN warning coming from ACPI parser. This is caused by trying to resolve operands when there is none. [ 0.000000] Linux version 5.15.0-rc3chromeavsrel1.0.184+ (root@...) (gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP PREEMPT Sat Oct 16 00:08:27 UTC 2021 ... [ 14.719508] ================================================================================ [ 14.719551] UBSAN: array-index-out-of-bounds in /.../linux/drivers/acpi/acpica/dswexec.c:401:12 [ 14.719594] index -1 is out of range for type 'acpi_operand_object *[9]' [ 14.719621] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.0-rc3chromeavsrel1.0.184+ #1 [ 14.719657] Hardware name: Intel Corp. Geminilake/GLK RVP2 LP4SD (07), BIOS GELKRVPA.X64.0214.B50.2009111159 09/11/2020 [ 14.719694] Call Trace: [ 14.719712] dump_stack_lvl+0x38/0x49 [ 14.719749] dump_stack+0x10/0x12 [ 14.719775] ubsan_epilogue+0x9/0x45 [ 14.719801] __ubsan_handle_out_of_bounds.cold+0x44/0x49 [ 14.719835] acpi_ds_exec_end_op+0x1d7/0x6b5 [ 14.719870] acpi_ps_parse_loop+0x942/0xb34 ... Problem happens because WalkState->NumOperands is 0 and it is used when trying to access into operands table. Actual code is: WalkState->Operands [WalkState->NumOperands -1] which causes out of bound access. Improve the check before above access to check if ACPI opcode should have any arguments (operands) at all. Link: https://github.com/acpica/acpica/pull/745 Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dswexec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fa4e1f880424833b767d7f72ffe1f499fac02b88 Merge: 76dcd734eca2 470188b09e92 Author: Rafael J. Wysocki Date: Thu Dec 8 17:37:32 2022 +0100 Merge back ACPICA changes for 6.2-rc1 commit 761c61c15903db41343532882b0443addb8c2faf Author: Jens Axboe Date: Thu Dec 8 09:36:02 2022 -0700 io_uring/msg_ring: flag target ring as having task_work, if needed Before the recent change, we didn't even wake the targeted task when posting the cqe remotely. Now we do wake it, but we do want to ensure that the recipient knows there's potential work there that needs to get processed to get the CQE posted. OR in IORING_SQ_TASKRUN for that purpose. Link: https://lore.kernel.org/io-uring/2843c6b4-ba9a-b67d-e0f4-957f42098489@kernel.dk/ Fixes: 6d043ee1164c ("io_uring: do msg_ring in target task via tw") Signed-off-by: Jens Axboe io_uring/msg_ring.c | 1 + 1 file changed, 1 insertion(+) commit 0b3d0cb7c0bed2fd6454f77ed75e7a662c6efd12 Author: Yang Yingliang Date: Thu Dec 8 23:19:16 2022 +0800 platform/x86: intel_scu_ipc: fix possible name leak in __intel_scu_ipc_register() In some error paths before device_register(), the names allocated by dev_set_name() are not freed. Move dev_set_name() front to device_register(), so the name can be freed while calling put_device(). Fixes: 54b34aa0a729 ("platform/x86: intel_scu_ipc: Split out SCU IPC functionality from the SCU driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221208151916.2404977-1-yangyingliang@huawei.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel_scu_ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52f31ed228212ba572c44e15e818a3a5c74122c0 Author: Dave Chinner Date: Thu Dec 8 08:29:22 2022 -0800 xfs: dquot shrinker doesn't check for XFS_DQFLAG_FREEING Resulting in a UAF if the shrinker races with some other dquot freeing mechanism that sets XFS_DQFLAG_FREEING before the dquot is removed from the LRU. This can occur if a dquot purge races with drop_caches. Reported-by: syzbot+912776840162c13db1a3@syzkaller.appspotmail.com Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_qm.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit bde55dd9ccda7a3f5f735d89e855691362745248 Author: Oleksij Rempel Date: Mon Dec 5 06:29:04 2022 +0100 net: dsa: microchip: add stats64 support for ksz8 series of switches Add stats64 support for ksz8xxx series of switches. Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20221205052904.2834962-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski drivers/net/dsa/microchip/ksz_common.c | 87 ++++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 1 + 2 files changed, 88 insertions(+) commit f596da3efaf4130ff61cd029558845808df9bf99 Author: Yang Jihong Date: Tue Nov 22 12:04:10 2022 +0800 blktrace: Fix output non-blktrace event when blk_classic option enabled When the blk_classic option is enabled, non-blktrace events must be filtered out. Otherwise, events of other types are output in the blktrace classic format, which is unexpected. The problem can be triggered in the following ways: # echo 1 > /sys/kernel/debug/tracing/options/blk_classic # echo 1 > /sys/kernel/debug/tracing/events/enable # echo blk > /sys/kernel/debug/tracing/current_tracer # cat /sys/kernel/debug/tracing/trace_pipe Fixes: c71a89615411 ("blktrace: add ftrace plugin") Signed-off-by: Yang Jihong Link: https://lore.kernel.org/r/20221122040410.85113-1-yangjihong1@huawei.com Signed-off-by: Jens Axboe kernel/trace/blktrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eaabc245b02a0e0063068178624d2fc12ba91d69 Author: Dmitry Torokhov Date: Tue Dec 6 17:44:57 2022 -0800 tpm: st33zp24: remove pointless checks on probe Remove tests for SPI device or I2C client to be non-NULL because driver core will never call driver's probe method without having a valid device structure. Signed-off-by: Dmitry Torokhov Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/st33zp24/i2c.c | 6 ------ drivers/char/tpm/st33zp24/spi.c | 7 ------- 2 files changed, 13 deletions(-) commit f5264068071964b56dc02c9dab3d11574aaca6ff Author: Michael Kelley Date: Fri Nov 11 11:38:53 2022 -0800 tpm/tpm_crb: Fix error message in __crb_relinquish_locality() The error message in __crb_relinquish_locality() mentions requestAccess instead of Relinquish. Fix it. Fixes: 888d867df441 ("tpm: cmd_ready command can be issued only after granting locality") Signed-off-by: Michael Kelley Acked-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b7d07f7acaac2c7750e420dcf4414588ede6d03 Author: Yuan Can Date: Thu Nov 24 03:19:26 2022 +0000 tpm/tpm_ftpm_tee: Fix error handling in ftpm_mod_init() The ftpm_mod_init() returns the driver_register() directly without checking its return value, if driver_register() failed, the ftpm_tee_plat_driver is not unregistered. Fix by unregister ftpm_tee_plat_driver when driver_register() failed. Fixes: 9f1944c23c8c ("tpm_ftpm_tee: register driver on TEE bus") Signed-off-by: Yuan Can Reviewed-by: Maxim Uvarov Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_ftpm_tee.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit db9622f762104459ff87ecdf885cc42c18053fd9 Author: Hanjun Guo Date: Thu Nov 17 19:23:42 2022 +0800 tpm: tpm_tis: Add the missed acpi_put_table() to fix memory leak In check_acpi_tpm2(), we get the TPM2 table just to make sure the table is there, not used after the init, so the acpi_put_table() should be added to release the ACPI memory. Fixes: 4cb586a188d4 ("tpm_tis: Consolidate the platform and acpi probe flow") Cc: stable@vger.kernel.org Signed-off-by: Hanjun Guo Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 37e90c374dd11cf4919c51e847c6d6ced0abc555 Author: Hanjun Guo Date: Thu Nov 17 19:23:41 2022 +0800 tpm: tpm_crb: Add the missed acpi_put_table() to fix memory leak In crb_acpi_add(), we get the TPM2 table to retrieve information like start method, and then assign them to the priv data, so the TPM2 table is not used after the init, should be freed, call acpi_put_table() to fix the memory leak. Fixes: 30fc8d138e91 ("tpm: TPM 2.0 CRB Interface") Cc: stable@vger.kernel.org Signed-off-by: Hanjun Guo Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit 8740a12ca2e2959531ad253bac99ada338b33d80 Author: Hanjun Guo Date: Thu Nov 17 19:23:40 2022 +0800 tpm: acpi: Call acpi_put_table() to fix memory leak The start and length of the event log area are obtained from TPM2 or TCPA table, so we call acpi_get_table() to get the ACPI information, but the acpi_get_table() should be coupled with acpi_put_table() to release the ACPI memory, add the acpi_put_table() properly to fix the memory leak. While we are at it, remove the redundant empty line at the end of the tpm_read_log_acpi(). Fixes: 0bfb23746052 ("tpm: Move eventlog files to a subdirectory") Fixes: 85467f63a05c ("tpm: Add support for event log pointer found in TPM2 ACPI table") Cc: stable@vger.kernel.org Signed-off-by: Hanjun Guo Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/eventlog/acpi.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 7bfda9c73fa9710a842a7d6f89b024351c80c19c Author: Eddie James Date: Mon Nov 7 11:14:23 2022 -0600 tpm: Add flag to use default cancellation policy The check for cancelled request depends on the VID of the chip, but some chips share VID which shouldn't share their cancellation behavior. This is the case for the Nuvoton NPCT75X, which should use the default cancellation check, not the Winbond one. To avoid changing the existing behavior, add a new flag to indicate that the chip should use the default cancellation check and set it for the I2C TPM2 TIS driver. Fixes: bbc23a07b072 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core") Signed-off-by: Eddie James Tested-by: Joel Stanley Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_core.c | 20 ++++++++++++-------- drivers/char/tpm/tpm_tis_core.h | 1 + drivers/char/tpm/tpm_tis_i2c.c | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) commit 561d6ef75628db9cce433e573aa3cdb6b3bba903 Author: Eddie James Date: Wed Aug 17 15:03:33 2022 -0500 tpm: tis_i2c: Fix sanity check interrupt enable mask The sanity check mask for TPM_INT_ENABLE register was off by 8 bits, resulting in failure to probe if the TPM_INT_ENABLE register was a valid value. Fixes: bbc23a07b072 ("tpm: Add tpm_tis_i2c backend for tpm_tis_core") Signed-off-by: Eddie James Reviewed-by: Jarkko Sakkinen Tested-by: Joel Stanley Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1506fba28b53fd159c7028c4809a4a3143a38eb7 Author: Sumit Garg Date: Thu Nov 10 16:41:40 2022 +0530 KEYS: trusted: tee: Make registered shm dependency explicit TEE trusted keys support depends on registered shared memory support since the key buffers are needed to be registered with OP-TEE. So make that dependency explicit to not register trusted keys support if underlying implementation doesn't support registered shared memory. Signed-off-by: Sumit Garg Tested-by: Jerome Forissier Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen security/keys/trusted-keys/trusted_tee.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e10de46bc3c60d938ced069e85f3e7d009a656d2 Author: Ard Biesheuvel Date: Fri Oct 21 14:33:09 2022 +0200 tpm: Avoid function type cast of put_device() The TPM code registers put_device() as a devm cleanup handler, and casts the reference to the right function pointer type for this to be permitted by the compiler. However, under kCFI, this is rejected at runtime, resulting in a splat like CFI failure at devm_action_release+0x24/0x3c (target: put_device+0x0/0x24; expected type: 0xa488ebfc) Internal error: Oops - CFI: 0000000000000000 [#1] PREEMPT SMP Modules linked in: ... CPU: 20 PID: 454 Comm: systemd-udevd Not tainted 6.1.0-rc1+ #51 Hardware name: Socionext SynQuacer E-series DeveloperBox, BIOS build #1 Oct 3 2022 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : devm_action_release+0x24/0x3c lr : devres_release_all+0xb4/0x114 sp : ffff800009bb3630 x29: ffff800009bb3630 x28: 0000000000000000 x27: 0000000000000011 x26: ffffaa6f9922c0c8 x25: 0000000000000002 x24: 000000000000000f x23: ffff800009bb3648 x22: ffff7aefc3be2100 x21: ffff7aefc3be2e00 x20: 0000000000000005 x19: ffff7aefc1e1ec10 x18: ffff800009af70a8 x17: 00000000a488ebfc x16: 0000000094ee7df3 x15: 0000000000000000 x14: 4075c5c2ef7affff x13: e46a91c5c5e2ef42 x12: ffff7aefc2c57540 x11: 0000000000000001 x10: 0000000000000001 x9 : 0000000100000000 x8 : ffffaa6fa09b39b4 x7 : 7f7f7f7f7f7f7f7f x6 : 8000000000000000 x5 : 000000008020000e x4 : ffff7aefc2c57500 x3 : ffff800009bb3648 x2 : ffff800009bb3648 x1 : ffff7aefc3be2e80 x0 : ffff7aefc3bb7000 Call trace: devm_action_release+0x24/0x3c devres_release_all+0xb4/0x114 really_probe+0xb0/0x49c __driver_probe_device+0x114/0x180 driver_probe_device+0x48/0x1ec __driver_attach+0x118/0x284 bus_for_each_dev+0x94/0xe4 driver_attach+0x24/0x34 bus_add_driver+0x10c/0x220 driver_register+0x78/0x118 __platform_driver_register+0x24/0x34 init_module+0x20/0xfe4 [tpm_tis_synquacer] do_one_initcall+0xd4/0x248 do_init_module+0x44/0x28c load_module+0x16b4/0x1920 Fix this by going through a helper function of the correct type. Signed-off-by: Ard Biesheuvel Reviewed-by: Kees Cook Reviewed-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-chip.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3f8019093775cc338c8e895bc9a41f4922766de6 Author: Dmitry Torokhov Date: Fri Sep 30 22:51:41 2022 -0700 tpm: st33zp24: switch to using gpiod API Switch the driver from legacy gpio API (that uses flat GPIO numbering) to the newer gpiod API (which used descriptors and respects line polarities specified in ACPI or device tree). Because gpio handling code for SPI and I2C variants duplicates each other it is moved into the core code for the driver. Also, it seems that the driver never assigned tpm_dev->io_lpcpd in the past, so gpio-based power management was most likely not working ever. Signed-off-by: Dmitry Torokhov Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/st33zp24/i2c.c | 101 +---------------------------------- drivers/char/tpm/st33zp24/spi.c | 100 +--------------------------------- drivers/char/tpm/st33zp24/st33zp24.c | 39 +++++++++++--- drivers/char/tpm/st33zp24/st33zp24.h | 4 +- 4 files changed, 39 insertions(+), 205 deletions(-) commit 04593028d7c1156df9aa69841980529d7f20f9fe Author: Dmitry Torokhov Date: Fri Sep 30 22:51:40 2022 -0700 tpm: st33zp24: drop support for platform data Drop support for platform data from the driver because there are no users of st33zp24_platform_data structure in the mainline kernel. Signed-off-by: Dmitry Torokhov Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/st33zp24/i2c.c | 41 +++---------------------------- drivers/char/tpm/st33zp24/spi.c | 44 ++++------------------------------ drivers/char/tpm/st33zp24/st33zp24.h | 3 +++ include/linux/platform_data/st33zp24.h | 16 ------------- 4 files changed, 10 insertions(+), 94 deletions(-) commit 56fb8d90031f71fa8af48fdff8498b9263b9c759 Author: Christophe JAILLET Date: Mon Dec 5 20:16:48 2022 +0100 block: sed-opal: Don't include There is no need to include here. Prefer the less invasive and which are needed in this .h file itself. Signed-off-by: Christophe JAILLET Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/c1d479b39e30fe70c4579a1af035d4db49421f56.1670069909.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jens Axboe include/linux/sed-opal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c1f480b2d092960ecf8bb0bd1f27982c33ada42a Author: Luca Boccassi Date: Tue Dec 6 09:29:13 2022 +0000 sed-opal: allow using IOC_OPAL_SAVE for locking too Usually when closing a crypto device (eg: dm-crypt with LUKS) the volume key is not required, as it requires root privileges anyway, and root can deny access to a disk in many ways regardless. Requiring the volume key to lock the device is a peculiarity of the OPAL specification. Given we might already have saved the key if the user requested it via the 'IOC_OPAL_SAVE' ioctl, we can use that key to lock the device if no key was provided here and the locking range matches, and the user sets the appropriate flag with 'IOC_OPAL_SAVE'. This allows integrating OPAL with tools and libraries that are used to the common behaviour and do not ask for the volume key when closing a device. Callers can always pass a non-zero key and it will be used regardless, as before. Suggested-by: Štěpán Horáček Signed-off-by: Luca Boccassi Reviewed-by: Christoph Hellwig Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20221206092913.4625-1-luca.boccassi@gmail.com Signed-off-by: Jens Axboe block/sed-opal.c | 39 +++++++++++++++++++++++++++++++++++++++ include/uapi/linux/sed-opal.h | 8 +++++++- 2 files changed, 46 insertions(+), 1 deletion(-) commit 37754595e94779db869e6ef803f038fa956d08ff Author: Kemeng Shi Date: Tue Dec 6 17:33:07 2022 +0800 blk-cgroup: Fix typo in comment Replace assocating with associating. Replace intiailized with initialized. Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Reviewed-by: Mukesh Ojha Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221206093307.378249-1-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe block/blk-cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e80355dd25aeab0e260911829e1495e17219bf1a Author: ye xingchen Date: Thu Dec 8 15:45:17 2022 +0800 platform/x86: sony-laptop: Convert to use sysfs_emit_at() API 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/202212081545178689771@zte.com.cn Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/sony-laptop.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit e84cfa364339e28f3f4bcc1dcc265dbb210bceea Author: ye xingchen Date: Fri Dec 2 17:21:54 2022 +0800 platform/x86/dell: alienware-wmi: Use sysfs_emit() 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 Link: https://lore.kernel.org/r/202212021721543696124@zte.com.cn Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/dell/alienware-wmi.c | 41 ++++++++++++------------------- 1 file changed, 16 insertions(+), 25 deletions(-) commit d240849c75f4efc931f38d3529dcbcbd76adbd81 Author: ye xingchen Date: Fri Dec 2 17:05:12 2022 +0800 platform/x86: uv_sysfs: Use sysfs_emit() 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 Reviewed-by: Justin Ernst Link: https://lore.kernel.org/r/202212021705128095546@zte.com.cn Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/uv_sysfs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 37aa6b98237082a4bf882b4d986329b94ebd447d Author: Chen Zhongjin Date: Tue Dec 6 09:50:33 2022 +0800 vme: Use root_device_register() not underlined version root_device_register and __root_device_register have exactly same effect. Use the not underlined version to keep usage consistency. Signed-off-by: Chen Zhongjin Link: https://lore.kernel.org/r/20221206015033.125827-1-chenzhongjin@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vme_user/vme_fake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7912f27dedd874d49eadf78b5b6fbfdec52c7c3 Author: Colin Ian King Date: Wed Dec 7 09:33:31 2022 +0000 staging: rtl8192e: Fix spelling mistake "ContryIE" -> "CountryIE" There is a spelling mistake in a netdev_info message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221207093331.2280355-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81c25247a2a03a0f97e4805d7aff7541ccff6baa Author: Daniel Scally Date: Tue Dec 6 16:12:03 2022 +0000 usb: gadget: uvc: Rename bmInterfaceFlags -> bmInterlaceFlags In the specification documents for the Uncompressed and MJPEG USB Video Payloads, the field name is bmInterlaceFlags - it has been misnamed within the kernel. Although renaming the field does break the kernel's interface to userspace it should be low-risk in this instance. The field is read only and hardcoded to 0, so there was never any value in anyone reading it. A search of the uvc-gadget application and all the forks that I could find for it did not reveal any users either. Fixes: cdda479f15cd ("USB gadget: video class function driver") Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20221206161203.1562827-1-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/configfs-usb-gadget-uvc | 4 ++-- drivers/usb/gadget/function/uvc_configfs.c | 12 ++++++------ drivers/usb/gadget/legacy/webcam.c | 4 ++-- include/uapi/linux/usb/video.h | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) commit d406d26745aba3365ab9171b2d5cbea9c1757305 Author: Paulo Alcantara Date: Mon Dec 5 23:31:53 2022 -0300 cifs: skip alloc when request has no pages When smb3_init_transform_rq() was being called with requests (@old_rq) which had no pages, it was unnecessarily allocating a single page for every request in @new_rq. Fix this by skipping page array allocation when requests have no pages (e.g. !smb_rqst::rq_npages). Also get rid of deprecated kmap() and use kmap_local_page() instead while we're at it. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/smb2ops.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit ebaad77c89921c8237ca17791d5462bd289052d0 Author: Christoph Hellwig Date: Wed Nov 16 14:18:35 2022 +0100 cifs: 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. Now that cifs implements ->migrate_folio and doesn't call generic_writepages, the writepage method can be removed. Signed-off-by: Christoph Hellwig Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/file.c | 9 --------- 1 file changed, 9 deletions(-) commit bff9018d3a52c45711bd63c446a2c80c0275e935 Author: Christoph Hellwig Date: Wed Nov 16 14:18:34 2022 +0100 cifs: stop using generic_writepages generic_writepages is just a wrapper that calls ->writepages on a range, and thus in the way of eventually removing ->writepage. Switch cifs to just open code it in preparation of removing ->writepage. [note: I suspect just integrating the small wsize case with the rest of the writeback code might be a better idea here, but that needs someone more familiar with the code] Signed-off-by: Christoph Hellwig Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/file.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 9381666e289852f93be9d7f4f7844017e04f6315 Author: Christoph Hellwig Date: Wed Nov 16 14:18:33 2022 +0100 cifs: wire up >migrate_folio CIFS does not use page private data that needs migration, so it can just wire up filemap_migrate_folio. This prepares for removing ->writepage, which is used as a fallback if no migrate_folio method is set. Signed-off-by: Christoph Hellwig Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/file.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 64ce47cb1b29d7d6aab6dcc287ae1fddb4876bd5 Author: Volker Lendecke Date: Fri Nov 25 12:37:44 2022 +0100 cifs: Parse owner/group for stat in smb311 posix extensions stat was returning default owner and group (unlike readdir) for SMB3.1.1 POSIX extensions Signed-off-by: Volker Lendecke Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/inode.c | 13 +++++++++---- fs/cifs/smb2inode.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- fs/cifs/smb2proto.h | 5 ++++- 3 files changed, 59 insertions(+), 8 deletions(-) commit 83fb8abec29383eb0cf35495d21669e38548771b Author: Volker Lendecke Date: Fri Nov 25 12:26:00 2022 +0100 cifs: Add "extbuf" and "extbuflen" args to smb2_compound_op() Will carry the variable-sized reply from SMB_FIND_FILE_POSIX_INFO Signed-off-by: Volker Lendecke Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French fs/cifs/smb2inode.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 0bf588274f73b29d7058042a6b7cc2b764502cc1 Author: Volker Lendecke Date: Wed Nov 23 17:51:21 2022 +0100 Fix path in cifs/usage.rst /sys/module/... not /proc/module/... Signed-off-by: Volker Lendecke Signed-off-by: Steve French Documentation/admin-guide/cifs/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ade23d7b7ec5c38bd43ec44ccb753cb7ea8ac08a Author: Quentin Schulz Date: Wed Dec 7 14:19:17 2022 +0100 usb: dwc2: power on/off phy for peripheral mode in dual-role mode The PHY power is handled for peripheral mode but only when the device is forced into this peripheral mode. It is missing when the device is operating in peripheral mode when dual-role mode is enabled, so let's update the condition to match this scenario. Signed-off-by: Quentin Schulz Link: https://lore.kernel.org/r/20221206-dwc2-gadget-dual-role-v1-2-36515e1092cd@theobroma-systems.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/gadget.c | 6 ++++-- drivers/usb/dwc2/platform.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) commit 42a317d076b58f08413219b1679d211783c2e5f3 Author: Quentin Schulz Date: Wed Dec 7 14:19:16 2022 +0100 usb: dwc2: disable lpm feature on Rockchip SoCs LPM feature of DWC2 module integrated in Rockchip SoCs doesn't work properly or needs some additional handling, so disable it for now. Without disabling LPM feature, the USB ADB communication fail with the following error log: dwc2 ff580000.usb: new address 27 dwc2 ff580000.usb: Failed to exit L1 sleep state in 200us. dwc2 ff580000.usb: dwc2_hsotg_send_reply: cannot queue req dwc2 ff580000.usb: dwc2_hsotg_process_req_status: failed to send reply dwc2 ff580000.usb: dwc2_hsotg_enqueue_setup: failed queue (-11) dwc2 ff580000.usb: Failed to exit L1 sleep state in 200us. [diff vs vendor kernel: added lpm_clock_gating, besl and hird_threshold_en settings as seen in commit 53febc956900 ("usb: dwc2: disable Link Power Management on STM32MP15 HS OTG")] Signed-off-by: William Wu Signed-off-by: Frank Wang Signed-off-by: Quentin Schulz Link: https://lore.kernel.org/r/20221206-dwc2-gadget-dual-role-v1-1-36515e1092cd@theobroma-systems.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/params.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2a81a7aa420b80865fdd82ec383fe365e18f922b Author: Frank Wunderlich Date: Sun Nov 27 12:41:36 2022 +0100 dt-bindings: usb: mtk-xhci: 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/20221127114142.156573-3-linux@fw-web.de Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 1 + 1 file changed, 1 insertion(+) commit 63130462c919ece0ad0d9bb5a1f795ef8d79687e Author: Ferry Toth Date: Mon Dec 5 21:15:27 2022 +0100 usb: dwc3: core: defer probe on ulpi_read_id timeout Since commit 0f0101719138 ("usb: dwc3: Don't switch OTG -> peripheral if extcon is present"), Dual Role support on Intel Merrifield platform broke due to rearranging the call to dwc3_get_extcon(). It appears to be caused by ulpi_read_id() masking the timeout on the first test write. In the past dwc3 probe continued by calling dwc3_core_soft_reset() followed by dwc3_get_extcon() which happend to return -EPROBE_DEFER. On deferred probe ulpi_read_id() finally succeeded. Due to above mentioned rearranging -EPROBE_DEFER is not returned and probe completes without phy. On Intel Merrifield the timeout on the first test write issue is reproducible but it is difficult to find the root cause. Using a mainline kernel and rootfs with buildroot ulpi_read_id() succeeds. As soon as adding ftrace / bootconfig to find out why, ulpi_read_id() fails and we can't analyze the flow. Using another rootfs ulpi_read_id() fails even without adding ftrace. We suspect the issue is some kind of timing / race, but merely retrying ulpi_read_id() does not resolve the issue. As we now changed ulpi_read_id() to return -ETIMEDOUT in this case, we need to handle the error by calling dwc3_core_soft_reset() and request -EPROBE_DEFER. On deferred probe ulpi_read_id() is retried and succeeds. Fixes: ef6a7bcfb01c ("usb: ulpi: Support device discovery via DT") Cc: stable@vger.kernel.org Acked-by: Thinh Nguyen Signed-off-by: Ferry Toth Link: https://lore.kernel.org/r/20221205201527.13525-3-ftoth@exalondelft.nl Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8a7b31d545d3a15f0e6f5984ae16f0ca4fd76aac Author: Ferry Toth Date: Mon Dec 5 21:15:26 2022 +0100 usb: ulpi: defer ulpi_register on ulpi_read_id timeout Since commit 0f0101719138 ("usb: dwc3: Don't switch OTG -> peripheral if extcon is present") Dual Role support on Intel Merrifield platform broke due to rearranging the call to dwc3_get_extcon(). It appears to be caused by ulpi_read_id() on the first test write failing with -ETIMEDOUT. Currently ulpi_read_id() expects to discover the phy via DT when the test write fails and returns 0 in that case, even if DT does not provide the phy. As a result usb probe completes without phy. Make ulpi_read_id() return -ETIMEDOUT to its user if the first test write fails. The user should then handle it appropriately. A follow up patch will make dwc3_core_init() set -EPROBE_DEFER in this case and bail out. Fixes: ef6a7bcfb01c ("usb: ulpi: Support device discovery via DT") Cc: stable@vger.kernel.org Acked-by: Heikki Krogerus Signed-off-by: Ferry Toth Link: https://lore.kernel.org/r/20221205201527.13525-2-ftoth@exalondelft.nl Signed-off-by: Greg Kroah-Hartman drivers/usb/common/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bae996ffa28ac03b6d95382a2a082eb219e745a Author: Icenowy Zheng Date: Tue Dec 6 13:52:25 2022 +0800 usb: misc: onboard_usb_hub: add Genesys Logic GL850G hub support Genesys Logic GL850G is a 4-port USB 2.0 STT hub that has a reset pin to toggle and a 3.3V core supply exported (although an integrated LDO is available for powering it with 5V). Add the support for this hub, for controlling the reset pin and the core power supply. Signed-off-by: Icenowy Zheng Acked-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20221206055228.306074-4-uwu@icenowy.me Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/onboard_usb_hub.c | 2 ++ drivers/usb/misc/onboard_usb_hub.h | 5 +++++ 2 files changed, 7 insertions(+) commit 4e3a4fcd871274c0233ea498c685b118a21ff3d0 Author: Icenowy Zheng Date: Tue Dec 6 13:52:24 2022 +0800 dt-bindings: usb: Add binding for Genesys Logic GL850G hub controller The Genesys Logic GL850G is a USB 2.0 Single TT hub controller that features 4 downstream ports, an internal 5V-to-3.3V LDO regulator (can be bypassed) and an 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. Signed-off-by: Icenowy Zheng Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221206055228.306074-3-uwu@icenowy.me Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/genesys,gl850g.yaml | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 38cea8e31e9ef143187135d714aed4d7bd18463c Author: Icenowy Zheng Date: Tue Dec 6 13:52:23 2022 +0800 dt-bindings: vendor-prefixes: add Genesys Logic Genesys Logic, Inc. is a manufacturer for interface chips, especially USB hubs. https://www.genesyslogic.com.tw/ Signed-off-by: Icenowy Zheng Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221206055228.306074-2-uwu@icenowy.me Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 0cd142b4665ee3133cd80539b5a430be5fd326c6 Author: Yi Yang Date: Fri Dec 2 09:21:26 2022 +0800 usb: fotg210-udc: fix potential memory leak in fotg210_udc_probe() In fotg210_udc_probe(), if devm_clk_get() or clk_prepare_enable() fails, 'fotg210' will not be freed, which will lead to a memory leak. Fix it by moving kfree() to a proper location. In addition,we can use "return -ENOMEM" instead of "goto err" to simplify the code. Fixes: 718a38d092ec ("fotg210-udc: Handle PCLK") Reviewed-by: Andrzej Pietrasiewicz Reviewed-by: Linus Walleij Signed-off-by: Yi Yang Link: https://lore.kernel.org/r/20221202012126.246953-1-yiyang13@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/fotg210-udc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 59d54aa09020fe52061d4cda51d474f5bd5e6be1 Author: Sven Peter Date: Mon Nov 28 17:23:04 2022 +0100 usb: typec: tipd: Set mode of operation for USB Type-C connector Forward the mode of operation to the typec subsystem such that it can configure the mux correctly. Reviewed-by: Heikki Krogerus Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20221128162304.80125-1-sven@svenpeter.dev Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tipd/core.c | 3 +++ 1 file changed, 3 insertions(+) commit 6f1f0ad910f73f5533b65e1748448d334e0ec697 Author: Jean Delvare Date: Fri Nov 25 17:04:44 2022 +0100 usb: gadget: udc: 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. Cc: Greg Kroah-Hartman Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Cc: Michal Simek Acked-by: Nicolas Ferre Signed-off-by: Jean Delvare Link: https://lore.kernel.org/r/20221125170444.36620123@endymion.delvare Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecec4b20d29c3d6922dafe7d2555254a454272d2 Author: Ivaylo Dimitrov Date: Fri Nov 25 20:21:15 2022 +0200 usb: musb: remove extra check in musb_gadget_vbus_draw The checks for musb->xceiv and musb->xceiv->set_power duplicate those in usb_phy_set_power(), so there is no need of them. Moreover, not calling usb_phy_set_power() results in usb_phy_set_charger_current() not being called, so current USB config max current is not propagated through USB charger framework and charger drivers may try to draw more current than allowed or possible. Fix that by removing those extra checks and calling usb_phy_set_power() directly. Tested on Motorola Droid4 and Nokia N900 Fixes: a9081a008f84 ("usb: phy: Add USB charger support") Cc: stable Signed-off-by: Ivaylo Dimitrov Link: https://lore.kernel.org/r/1669400475-4762-1-git-send-email-ivo.g.dimitrov.75@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_gadget.c | 2 -- 1 file changed, 2 deletions(-) commit 4c92670b16727365699fe4b19ed32013bab2c107 Author: Szymon Heidrich Date: Tue Dec 6 15:13:01 2022 +0100 usb: gadget: uvc: Prevent buffer overflow in setup handler Setup function uvc_function_setup permits control transfer requests with up to 64 bytes of payload (UVC_MAX_REQUEST_SIZE), data stage handler for OUT transfer uses memcpy to copy req->actual bytes to uvc_event->data.data array of size 60. This may result in an overflow of 4 bytes. Fixes: cdda479f15cd ("USB gadget: video class function driver") Cc: stable Reviewed-by: Laurent Pinchart Reviewed-by: Daniel Scally Signed-off-by: Szymon Heidrich Link: https://lore.kernel.org/r/20221206141301.51305-1-szymon.heidrich@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_uvc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 97a48da1619ba6bd42a0e5da0a03aa490a9496b1 Author: Miaoqian Lin Date: Tue Dec 6 12:17:31 2022 +0400 usb: dwc3: qcom: Fix memory leak in dwc3_qcom_interconnect_init of_icc_get() alloc resources for path handle, we should release it when not need anymore. Like the release in dwc3_qcom_interconnect_exit() function. Add icc_put() in error handling to fix this. Fixes: bea46b981515 ("usb: dwc3: qcom: Add interconnect support in dwc3 driver") Cc: stable Acked-by: Thinh Nguyen Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20221206081731.818107-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-qcom.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit dc18a4c7b3bd447cef2395deeb1f6ac16dfaca0e Author: Yang Yingliang Date: Sat Dec 3 15:10:27 2022 +0800 usb: typec: wusb3801: fix fwnode refcount leak in wusb3801_probe() I got the following report while doing fault injection test: OF: ERROR: memory leak, expected refcount 1 instead of 4, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /i2c/tcpc@60/connector If wusb3801_hw_init() fails, fwnode_handle_put() needs be called to avoid refcount leak. Fixes: d016cbe4d7ac ("usb: typec: Support the WUSB3801 port controller") Reviewed-by: Heikki Krogerus Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221203071027.3808308-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/wusb3801.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c35ca10f53c51eeb610d3f8fbc6dd6d511b58a58 Author: Jiasheng Jiang Date: Thu Dec 8 19:00:58 2022 +0800 usb: storage: Add check for kcalloc As kcalloc may return NULL pointer, the return value should be checked and return error if fails as same as the ones in alauda_read_map. Fixes: e80b0fade09e ("[PATCH] USB Storage: add alauda support") Acked-by: Alan Stern Signed-off-by: Jiasheng Jiang Link: https://lore.kernel.org/r/20221208110058.12983-1-jiasheng@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/alauda.c | 2 ++ 1 file changed, 2 insertions(+) commit 727cc0147f5066e359aca65cc6cc5e6d64cc15d8 Author: Yu Liao Date: Tue Nov 29 09:11:01 2022 +0800 platform/x86: mxm-wmi: fix memleak in mxm_wmi_call_mx[ds|mx]() The ACPI buffer memory (out.pointer) returned by wmi_evaluate_method() is not freed after the call, so it leads to memory leak. The method results in ACPI buffer is not used, so just pass NULL to wmi_evaluate_method() which fixes the memory leak. Fixes: 99b38b4acc0d ("platform/x86: add MXM WMI driver.") Signed-off-by: Yu Liao Link: https://lore.kernel.org/r/20221129011101.2042315-1-liaoyu15@huawei.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/mxm-wmi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 82710ecd0e5d401c36ad21f00d644672005233b9 Merge: 4b6be020bd6b 63b8ed26cd09 Author: Greg Kroah-Hartman Date: Thu Dec 8 16:24:46 2022 +0100 Merge tag 'usb-serial-6.2-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 6.2-rc1 Here are the USB-serial updates for 6.2-rc1, including: - B0 hangup support for cp210x - avoid requesting a zero DTE rate which could potentially confuse buggy firmware in XR devices Included are also some new device ids. All have been in linux-next with no reported issues. * tag 'usb-serial-6.2-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: xr: avoid requesting zero DTE rate USB: serial: cp210x: add support for B0 hangup USB: serial: cp210x: add Kamstrup RF sniffer PIDs USB: serial: option: add Quectel EM05-G modem commit b03ae77e7e057f4b3b858f10c840557e71448a91 Author: Hans de Goede Date: Sun Nov 27 23:19:28 2022 +0100 platform/x86: x86-android-tablets: Add Advantech MICA-071 extra button The Advantech MICA-071 is a standard Windows tablet, but it has an extra "quick launch" button which is not described in the ACPI tables in anyway. Use the x86-android-tablets infra to create a gpio-button device for this. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20221127221928.123660-1-hdegoede@redhat.com drivers/platform/x86/x86-android-tablets.c | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit b6c14ff1deaafd30036ec36d5205acd5a578b1cd Author: Hans de Goede Date: Sun Nov 27 19:24:58 2022 +0100 platform/x86: x86-android-tablets: Add Lenovo Yoga Tab 3 (YT3-X90F) charger + fuel-gauge data The Lenovo Yoga Tab 3 (YT3-X90F) is an Intel Cherry Trail based tablet which ships with Android as Factory OS. Its DSDT contains a bunch of I2C devices which are not actually there, causing various resource conflicts. Use acpi_quirk_skip_i2c_client_enumeration() to not enumerate these. The YT3-X90F has quite a bit of exotic hardware, this adds initial support by manually instantiating the i2c-clients for the 2 charger + 2 fuel-gauge chips used for the 2 batteries. Support for other parts of the hw will be added by follow-up patches. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20221127182458.104528-1-hdegoede@redhat.com drivers/platform/x86/x86-android-tablets.c | 135 ++++++++++++++++++++++++++++- 1 file changed, 134 insertions(+), 1 deletion(-) commit 902ce18ab1f4444ff9d49865bea35a07adcc03fd Author: Hans de Goede Date: Thu Dec 8 12:02:24 2022 +0100 platform/x86: x86-android-tablets: Add Medion Lifetab S10346 data The Medion Lifetab S10346 is a x86 ACPI tablet which ships with Android x86 as factory OS. Its DSDT contains a bunch of I2C devices which are not actually there, causing various resource conflicts. Enumeration of these is skipped through the acpi_quirk_skip_i2c_client_enumeration(). Add support for manually instantiating the I2C devices which are actually present on this tablet by adding the necessary device info to the x86-android-tablets module. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221208110224.107354-1-hdegoede@redhat.com drivers/platform/x86/x86-android-tablets.c | 92 ++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 832c3f66f53f1eb20f424b916a311ad82074ef0d Merge: 695c5d3a8055 a6365c2da9fa Author: Kalle Valo Date: Thu Dec 8 16:54:33 2022 +0200 Merge tag 'iwlwifi-next-for-kalle-2022-12-07' of http://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next An additional set of patches intended for v6.2. It contains: * Adjustments for the new HW * Adjustments for FW API update * A few small fixes and cleanups * Improvements for debug dumps mechanism commit 695c5d3a8055dcb97966496ade51968c9a75f5c6 Author: Jun ASAKA Date: Wed Dec 7 11:39:26 2022 +0800 wifi: rtl8xxxu: fixing IQK failures for rtl8192eu Fixing "Path A RX IQK failed" and "Path B RX IQK failed" issues for rtl8192eu chips by replacing the arguments with the ones in the updated official driver as shown below. 1. https://github.com/Mange/rtl8192eu-linux-driver 2. vendor driver version: 5.6.4 Signed-off-by: Jun ASAKA Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207033926.11777-1-JunASAKA@zzy040330.moe .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 73 +++++++++++++++------- 1 file changed, 51 insertions(+), 22 deletions(-) commit e48c45318d3d38460c585dce6379ef77d65a069e Author: Peter Kosyh Date: Tue Dec 6 13:49:19 2022 +0300 wifi: rtlwifi: btcoexist: fix conditions branches that are never executed Commit 40ca18823515 ("rtlwifi: btcoex: 23b 1ant: fine tune for wifi not connected") introduced never executed branches. Compile test only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Peter Kosyh Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221206104919.739746-1-pkosyh@yandex.ru drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 49ebca0d9018ff3517b24972f6f2a9f3d0dc956f Author: Peter Kosyh Date: Mon Dec 5 11:53:42 2022 +0300 wifi: rtlwifi: rtl8192se: remove redundant rtl_get_bbreg() call Extra rtl_get_bbreg() call looks like redundant reading. The read has already been done in the "else" branch. Compile test only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Peter Kosyh Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221205085342.677329-1-pkosyh@yandex.ru drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c | 3 --- 1 file changed, 3 deletions(-) commit 87caeef032fc3921bc866ad7becb6ed51aa8b27b Author: Sascha Hauer Date: Fri Dec 2 09:12:24 2022 +0100 wifi: rtw88: Add rtw8723du chipset support Add support for the rtw8723du chipset based on https://github.com/ulli-kroll/rtw88-usb.git Signed-off-by: Sascha Hauer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202081224.2779981-12-s.hauer@pengutronix.de drivers/net/wireless/realtek/rtw88/Kconfig | 11 ++++++++ drivers/net/wireless/realtek/rtw88/Makefile | 3 +++ drivers/net/wireless/realtek/rtw88/rtw8723d.c | 28 ++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/rtw8723d.h | 13 +++++++++- drivers/net/wireless/realtek/rtw88/rtw8723du.c | 36 ++++++++++++++++++++++++++ 5 files changed, 90 insertions(+), 1 deletion(-) commit 07cef03b8d44dee7488de3d1585387e603c78676 Author: Sascha Hauer Date: Fri Dec 2 09:12:23 2022 +0100 wifi: rtw88: Add rtw8822cu chipset support Add support for the rtw8822cu chipset based on https://github.com/ulli-kroll/rtw88-usb.git Signed-off-by: Sascha Hauer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202081224.2779981-11-s.hauer@pengutronix.de drivers/net/wireless/realtek/rtw88/Kconfig | 11 +++++++ drivers/net/wireless/realtek/rtw88/Makefile | 3 ++ drivers/net/wireless/realtek/rtw88/rtw8822c.c | 24 ++++++++++++++ drivers/net/wireless/realtek/rtw88/rtw8822cu.c | 44 ++++++++++++++++++++++++++ 4 files changed, 82 insertions(+) commit 45794099f5e1d7abc5eb07e6eec7e1e5c6cb540d Author: Sascha Hauer Date: Fri Dec 2 09:12:22 2022 +0100 wifi: rtw88: Add rtw8822bu chipset support Add support for the rtw8822bu chipset based on https://github.com/ulli-kroll/rtw88-usb.git Signed-off-by: Sascha Hauer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202081224.2779981-10-s.hauer@pengutronix.de drivers/net/wireless/realtek/rtw88/Kconfig | 11 ++++ drivers/net/wireless/realtek/rtw88/Makefile | 3 + drivers/net/wireless/realtek/rtw88/rtw8822b.c | 19 ++++++ drivers/net/wireless/realtek/rtw88/rtw8822bu.c | 90 ++++++++++++++++++++++++++ 4 files changed, 123 insertions(+) commit aff5ffd718de23cb8603f2e229204670e2644334 Author: Sascha Hauer Date: Fri Dec 2 09:12:21 2022 +0100 wifi: rtw88: Add rtw8821cu chipset support Add support for the rtw8821cu chipset based on https://github.com/ulli-kroll/rtw88-usb.git Signed-off-by: Sascha Hauer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202081224.2779981-9-s.hauer@pengutronix.de drivers/net/wireless/realtek/rtw88/Kconfig | 11 ++++++ drivers/net/wireless/realtek/rtw88/Makefile | 3 ++ drivers/net/wireless/realtek/rtw88/rtw8821c.c | 18 ++++++++++ drivers/net/wireless/realtek/rtw88/rtw8821c.h | 21 +++++++++++ drivers/net/wireless/realtek/rtw88/rtw8821cu.c | 50 ++++++++++++++++++++++++++ 5 files changed, 103 insertions(+) commit a82dfd33d1237f6c0fb8a7077022189d1fc7ec98 Author: Sascha Hauer Date: Fri Dec 2 09:12:20 2022 +0100 wifi: rtw88: Add common USB chip support Add the common bits and pieces to add USB support to the RTW88 driver. This is based on https://github.com/ulli-kroll/rtw88-usb.git which itself is first written by Neo Jou. Signed-off-by: neo_jou Signed-off-by: Hans Ulli Kroll Signed-off-by: Sascha Hauer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202081224.2779981-8-s.hauer@pengutronix.de drivers/net/wireless/realtek/rtw88/Kconfig | 3 + drivers/net/wireless/realtek/rtw88/Makefile | 3 + drivers/net/wireless/realtek/rtw88/mac.c | 3 + drivers/net/wireless/realtek/rtw88/main.c | 4 + drivers/net/wireless/realtek/rtw88/main.h | 4 + drivers/net/wireless/realtek/rtw88/reg.h | 1 + drivers/net/wireless/realtek/rtw88/tx.h | 31 + drivers/net/wireless/realtek/rtw88/usb.c | 911 ++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/usb.h | 107 ++++ 9 files changed, 1067 insertions(+) commit 78d5bf925f30bf9f79a69ce77386902672defe68 Author: Sascha Hauer Date: Fri Dec 2 09:12:19 2022 +0100 wifi: rtw88: iterate over vif/sta list non-atomically The driver uses ieee80211_iterate_active_interfaces_atomic() and ieee80211_iterate_stations_atomic() in several places and does register accesses in the iterators. This doesn't cope with upcoming USB support as registers can only be accessed non-atomically. Split these into a two stage process: First use the atomic iterator functions to collect all active interfaces or stations on a list, then iterate over the list non-atomically and call the iterator on each entry. Signed-off-by: Sascha Hauer Suggested-by: Ping-Ke shih Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202081224.2779981-7-s.hauer@pengutronix.de drivers/net/wireless/realtek/rtw88/phy.c | 6 +- drivers/net/wireless/realtek/rtw88/ps.c | 2 +- drivers/net/wireless/realtek/rtw88/util.c | 103 ++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/util.h | 12 +++- 4 files changed, 116 insertions(+), 7 deletions(-) commit 8647f7f0b9080bc2d2f6e02524782f2f02f159bc Author: Sascha Hauer Date: Fri Dec 2 09:12:18 2022 +0100 wifi: rtw88: Drop coex mutex coex->mutex is used in rtw_coex_info_request() only. Most callers of this function hold rtwdev->mutex already, except for one callsite in the debugfs code. The debugfs code alone doesn't justify the extra lock, so acquire rtwdev->mutex there as well and drop the now unnecessary spinlock. Signed-off-by: Sascha Hauer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202081224.2779981-6-s.hauer@pengutronix.de drivers/net/wireless/realtek/rtw88/coex.c | 3 +-- drivers/net/wireless/realtek/rtw88/debug.c | 2 ++ drivers/net/wireless/realtek/rtw88/main.c | 2 -- drivers/net/wireless/realtek/rtw88/main.h | 2 -- 4 files changed, 3 insertions(+), 6 deletions(-) commit 1e2701f4079a7906ff3fb43a315925d303e289d8 Author: Sascha Hauer Date: Fri Dec 2 09:12:17 2022 +0100 wifi: rtw88: Drop h2c.lock The h2c.lock spinlock is used in rtw_fw_send_h2c_command() and rtw_fw_send_h2c_packet(). Most callers call this with rtwdev->mutex held, except from one callsite in the debugfs code. The debugfs code alone doesn't justify the extra lock, so acquire rtwdev->mutex in debugfs and drop the now unnecessary spinlock. Signed-off-by: Sascha Hauer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202081224.2779981-5-s.hauer@pengutronix.de drivers/net/wireless/realtek/rtw88/debug.c | 2 ++ drivers/net/wireless/realtek/rtw88/fw.c | 13 ++++--------- drivers/net/wireless/realtek/rtw88/main.c | 1 - drivers/net/wireless/realtek/rtw88/main.h | 2 -- 4 files changed, 6 insertions(+), 12 deletions(-) commit d57ca103e54e2b3eea7e2603548c58bcc4155541 Author: Sascha Hauer Date: Fri Dec 2 09:12:16 2022 +0100 wifi: rtw88: Drop rf_lock The rtwdev->rf_lock spinlock protects the rf register accesses in rtw_read_rf() and rtw_write_rf(). Most callers of these functions hold rtwdev->mutex already with the exception of the callsites in the debugfs code. The debugfs code doesn't justify an extra lock, so acquire the mutex there as well before calling rf register accessors and drop the now unnecessary spinlock. Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202081224.2779981-4-s.hauer@pengutronix.de drivers/net/wireless/realtek/rtw88/debug.c | 11 +++++++++++ drivers/net/wireless/realtek/rtw88/hci.h | 9 +++------ drivers/net/wireless/realtek/rtw88/main.c | 1 - drivers/net/wireless/realtek/rtw88/main.h | 3 --- 4 files changed, 14 insertions(+), 10 deletions(-) commit 69020957bcb783184af1a86c8483139557cec751 Author: Sascha Hauer Date: Fri Dec 2 09:12:15 2022 +0100 wifi: rtw88: Call rtw_fw_beacon_filter_config() with rtwdev->mutex held rtw_fw_beacon_filter_config() is called once with rtwdev->mutex held and once without the mutex held. Call it consistently with rtwdev->mutex held. Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202081224.2779981-3-s.hauer@pengutronix.de drivers/net/wireless/realtek/rtw88/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d89660494402168565e0637268486ae28bad642 Author: Sascha Hauer Date: Fri Dec 2 09:12:14 2022 +0100 wifi: rtw88: print firmware type in info message It's confusing to read two different firmware versions in the syslog for the same device: rtw_8822cu 2-1:1.2: Firmware version 9.9.4, H2C version 15 rtw_8822cu 2-1:1.2: Firmware version 9.9.11, H2C version 15 Print the firmware type in this message to make clear these are really two different firmwares for different purposes: rtw_8822cu 1-1.4:1.2: WOW Firmware version 9.9.4, H2C version 15 rtw_8822cu 1-1.4:1.2: Firmware version 9.9.11, H2C version 15 Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202081224.2779981-2-s.hauer@pengutronix.de drivers/net/wireless/realtek/rtw88/main.c | 4 +++- drivers/net/wireless/realtek/rtw88/main.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit a0e78d5c6082fc953fef5af7293be0145c67dba4 Author: Po-Hao Huang Date: Fri Dec 2 14:15:27 2022 +0800 wifi: rtw89: add join info upon create interface To support multiple vifs, fw need more information of each role. Send this info to make things work as expected. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202061527.505668-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8fc5d4338620b81b1b265c725b38aced8acf8d72 Author: Po-Hao Huang Date: Fri Dec 2 14:15:26 2022 +0800 wifi: rtw89: fix unsuccessful interface_add flow Remove according vifs from list if we couldn't set this interface up. Otherwise the rtwvif_list could contain unreferenced objects. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202061527.505668-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac80211.c | 2 ++ 1 file changed, 2 insertions(+) commit d592b9f742643f07db53ac34baf6bbd3ce9478dc Author: Po-Hao Huang Date: Fri Dec 2 14:15:25 2022 +0800 wifi: rtw89: stop mac port function when stop_ap() Disable hardware beacon related functions when ap stops. So hardware won't transmit beacons while interface is already removed. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202061527.505668-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac.c | 16 +++++++++++++--- drivers/net/wireless/realtek/rtw89/mac.h | 1 + drivers/net/wireless/realtek/rtw89/mac80211.c | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) commit fb2b8cec81d75b2b20bdbc2fca7a60a68bc78aac Author: Po-Hao Huang Date: Fri Dec 2 14:15:24 2022 +0800 wifi: rtw89: add mac TSF sync function If the interface is in AP/P2P GO mode, we adjust the TSF with random offset to avoid TBTT of different vifs to overlap and collide. For every new interface added, we adjust the value and resync for all interfaces. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202061527.505668-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac.c | 44 ++++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/mac.h | 2 ++ drivers/net/wireless/realtek/rtw89/reg.h | 17 ++++++++++++ 3 files changed, 63 insertions(+) commit 13eb07e0be1b95f1e1fab721fb0f38117edfe80b Author: Zong-Zhe Yang Date: Fri Dec 2 14:05:21 2022 +0800 wifi: rtw89: request full firmware only once if it's early requested Under some condition, we now have to do early request full firmware when rtw89_early_fw_feature_recognize(). In this case, we can avoid requesting full firmware twice during probing driver. So, we pass out full firmware from rtw89_early_fw_feature_recognize() if it's requested successfully. And then, if firmware is settled, we have no need to request full firmware again during normal initizating flow. Setting firmware flow is updated to be as the following. platform | early recognizing | normally initizating ----------------------------------------------------------------------- deny reading | request full FW | (no more FW requesting) partial file | | (obtain FW from early pahse) ----------------------------------------------------------------------- able to read | request partial FW | async request full FW partial file | (quite small chunk) | Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202060521.501512-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 6 +++++- drivers/net/wireless/realtek/rtw89/fw.c | 28 +++++++++++++++++++++++----- drivers/net/wireless/realtek/rtw89/fw.h | 7 ++++--- 3 files changed, 32 insertions(+), 9 deletions(-) commit 3ddfe3bdd3cf199676737fbd8cb7878b962acd2a Author: Zong-Zhe Yang Date: Fri Dec 2 14:05:20 2022 +0800 wifi: rtw89: don't request partial firmware if SECURITY_LOADPIN_ENFORCE Kernel logs on platform enabling SECURITY_LOADPIN_ENFORCE ------ ``` LoadPin: firmware old-api-denied obj= pid=810 cmdline="modprobe -q -- rtw89_8852ce" rtw89_8852ce 0000:01:00.0: loading /lib/firmware/rtw89/rtw8852c_fw.bin failed with error -1 rtw89_8852ce 0000:01:00.0: Direct firmware load for rtw89/rtw8852c_fw.bin failed with error -1 rtw89_8852ce 0000:01:00.0: failed to early request firmware: -1 ``` Trace ------ ``` request_partial_firmware_into_buf() > _request_firmware() >> fw_get_filesystem_firmware() >>> kernel_read_file_from_path_initns() >>>> kernel_read_file() >>>>> security_kernel_read_file() // It will iterate enabled LSMs' hooks for kernel_read_file. // With loadpin, it hooks loadpin_read_file. ``` If SECURITY_LOADPIN_ENFORCE is enabled, doing kernel_read_file() on partial files will be denied and return -EPERM (-1). Then, the outer API based on it, e.g. request_partial_firmware_into_buf(), will get the error. In the case, we cannot get the firmware stuffs right, even though there might be no error other than a permission issue on reading a partial file. So we have to request full firmware if SECURITY_LOADPIN_ENFORCE is enabled. It makes us still have a chance to do early firmware work on this kind of platforms. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202060521.501512-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/fw.c | 30 +++++++++++++++++++++--------- drivers/net/wireless/realtek/rtw89/fw.h | 15 +++++++++++++++ 2 files changed, 36 insertions(+), 9 deletions(-) commit c2f2924bc7f9ea75ef8d95863e710168f8196256 Author: Wang Yufen Date: Fri Dec 2 13:35:42 2022 +0800 wifi: brcmfmac: Fix error return code in brcmf_sdio_download_firmware() Fix to return a negative error code instead of 0 when brcmf_chip_set_active() fails. In addition, change the return value for brcmf_pcie_exit_download_state() to keep consistent. Fixes: d380ebc9b6fb ("brcmfmac: rename chip download functions") Signed-off-by: Wang Yufen Reviewed-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1669959342-27144-1-git-send-email-wangyufen@huawei.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 7de16123d9e230d4aff17a466eac820645c8a796 Author: Bitterblue Smith Date: Thu Dec 1 16:16:46 2022 +0200 wifi: rtl8xxxu: Introduce rtl8xxxu_update_ra_report The ra_report struct is used for reporting the TX rate via sta_statistics. The code which fills it out is duplicated in two places, and the RTL8188EU will need it in a third place. Move this code into a new function rtl8xxxu_update_ra_report. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/0777ad35-fe03-473c-2e02-e3390bef5dd0@gmail.com .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 105 +++++++++------------ 1 file changed, 45 insertions(+), 60 deletions(-) commit 76c16af2cb10282274596e21add2c9f0b95c941b Author: Bitterblue Smith Date: Thu Dec 1 16:15:08 2022 +0200 wifi: rtl8xxxu: Fix the channel width reporting The gen 2 chips RTL8192EU and RTL8188FU periodically send the driver reports about the TX rate, and the driver passes these reports to sta_statistics. The reports from RTL8192EU may or may not include the channel width. The reports from RTL8188FU do not include it. Only access the c2h->ra_report.bw field if the report (skb) is big enough. The other problem fixed here is that the code was actually never changing the channel width initially reported by rtl8xxxu_bss_info_changed because the value of RATE_INFO_BW_20 is 0. Fixes: 0985d3a410ac ("rtl8xxxu: Feed current txrate information for mac80211") Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/5b41f1ae-72e7-6b7a-2459-b736399a1c40@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit dd469a754afdb782ba3033cee102147493dc39f4 Author: Bitterblue Smith Date: Thu Dec 1 16:13:57 2022 +0200 wifi: rtl8xxxu: Add __packed to struct rtl8723bu_c2h This struct is used to access a sequence of bytes received from the wifi chip. It must not have any padding bytes between the members. This doesn't change anything on my system, possibly because currently none of the members need more than byte alignment. Fixes: b2b43b7837ba ("rtl8xxxu: Initial functionality to handle C2H events for 8723bu") Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1a270918-da22-ff5f-29fc-7855f740c5ba@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8041f2bffbf1c0854d9f6675ad01dc6ca72f71dd Author: Arend van Spriel Date: Tue Nov 29 14:54:46 2022 +0100 wifi: brcmfmac: introduce BRCMFMAC exported symbols namespace Using a namespace variant to make clear it is only intended to be used by the vendor-specific modules. The symbol will only truly export the symbols when the driver and consequently the vendor-specific part are built as kernel modules. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129135446.151065-8-arend.vanspriel@broadcom.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/module.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h | 6 ++++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/module.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c | 4 ++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/module.c | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) commit 7205f9f2fc55be611dbd3364f6b1b361aa21a52d Author: Arend van Spriel Date: Tue Nov 29 14:54:45 2022 +0100 wifi: brcmfmac: add vendor name in revinfo debugfs file Upon probe the driver determines the vendor supporting the device. Expose this information in the revinfo debugfs file. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129135446.151065-7-arend.vanspriel@broadcom.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c | 5 +++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) commit b1d94be570c28be9bda6931e300e4ff74be82452 Author: Arend van Spriel Date: Tue Nov 29 14:54:44 2022 +0100 wifi: brcmfmac: add support Broadcom BCA firmware api Broadcom BCA division develops its own firmware api and as such will likely diverge over time (or already has). Add support for handling this. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129135446.151065-6-arend.vanspriel@broadcom.com .../wireless/broadcom/brcm80211/brcmfmac/Makefile | 2 + .../broadcom/brcm80211/brcmfmac/bca/Makefile | 12 +++++ .../broadcom/brcm80211/brcmfmac/bca/core.c | 27 ++++++++++ .../broadcom/brcm80211/brcmfmac/bca/module.c | 26 ++++++++++ .../broadcom/brcm80211/brcmfmac/bca/vops.h | 11 ++++ .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 1 + .../wireless/broadcom/brcm80211/brcmfmac/fwvid.c | 2 + .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 58 +++++++++++----------- 8 files changed, 110 insertions(+), 29 deletions(-) commit f74f1ec22dc232be0296739148d126e9158eadf9 Author: Arend van Spriel Date: Tue Nov 29 14:54:43 2022 +0100 wifi: brcmfmac: add support for Cypress firmware api Cypress uses the brcmfmac driver and releases firmware which will likely diverge over time (or already has). So adding support for handling that. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129135446.151065-5-arend.vanspriel@broadcom.com .../wireless/broadcom/brcm80211/brcmfmac/Makefile | 2 + .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 48 +++++++++++----------- .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 1 + .../broadcom/brcm80211/brcmfmac/cyw/Makefile | 12 ++++++ .../broadcom/brcm80211/brcmfmac/cyw/core.c | 27 ++++++++++++ .../broadcom/brcm80211/brcmfmac/cyw/module.c | 26 ++++++++++++ .../broadcom/brcm80211/brcmfmac/cyw/vops.h | 11 +++++ .../wireless/broadcom/brcm80211/brcmfmac/fwvid.c | 2 + 8 files changed, 105 insertions(+), 24 deletions(-) commit d6a5c562214f26e442c8ec3ff1e28e16675d1bcf Author: Arend van Spriel Date: Tue Nov 29 14:54:42 2022 +0100 wifi: brcmfmac: add support for vendor-specific firmware api The driver is being used by multiple vendors who develop the firmware api independently. So far the firmware api as used by the driver has not diverged (yet). This change adds framework for supporting multiple firmware apis. The vendor-specific support code has to provide a number of callback operations. Right now it is only attach and detach callbacks so no real functionality as the api is still common. This code only adds WCC variant anyway, which is selected for all devices right now. The vendor-specific part will be built in a separate module when the driver is configured to be built as a module through Kconfig, ie. when CONFIG_BRCMFMAC=m. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129135446.151065-4-arend.vanspriel@broadcom.com .../wireless/broadcom/brcm80211/brcmfmac/Makefile | 7 + .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 4 + .../wireless/broadcom/brcm80211/brcmfmac/core.c | 9 + .../wireless/broadcom/brcm80211/brcmfmac/core.h | 2 + .../wireless/broadcom/brcm80211/brcmfmac/fwvid.c | 190 +++++++++++++++++++++ .../wireless/broadcom/brcm80211/brcmfmac/fwvid.h | 46 +++++ .../broadcom/brcm80211/brcmfmac/wcc/Makefile | 12 ++ .../broadcom/brcm80211/brcmfmac/wcc/core.c | 27 +++ .../broadcom/brcm80211/brcmfmac/wcc/module.c | 26 +++ .../broadcom/brcm80211/brcmfmac/wcc/vops.h | 11 ++ 10 files changed, 334 insertions(+) commit da6d9c8ecd00e20218461007948f2b0a8e7fa242 Author: Arend van Spriel Date: Tue Nov 29 14:54:41 2022 +0100 wifi: brcmfmac: add firmware vendor info in driver info In order to determine the vendor that released a firmware image for a specific device, the device table now sets the vendor identifier in driver info and it is stored in struct brcmf_bus::fwvid during probe. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129135446.151065-3-arend.vanspriel@broadcom.com .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 6 ++++- .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 11 ++++++++- .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 20 ++++++++++++---- .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 27 +++++++++++++++------- 4 files changed, 49 insertions(+), 15 deletions(-) commit 76821aad49cebc69eca86800f41e8133104e91d3 Author: Arend van Spriel Date: Tue Nov 29 14:54:40 2022 +0100 wifi: brcmfmac: add function to unbind device to bus layer api Introduce a new bus callback .remove() which will unbind the device from the driver. This allows the common driver layer to stop handling a device. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129135446.151065-2-arend.vanspriel@broadcom.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 13 +++++++++++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 12 +++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) commit 5107778d0061db58b1683bb412418d5b3cf0b0e0 Author: Jiapeng Chong Date: Tue Nov 29 14:24:07 2022 +0800 wifi: ipw2x00: Remove some unused functions Functions write_nic_auto_inc_address() and write_nic_dword_auto_inc() are defined in the ipw2100.c file, but not called elsewhere, so remove these unused functions. drivers/net/wireless/intel/ipw2x00/ipw2100.c:427:20: warning: unused function 'write_nic_dword_auto_inc'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3285 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129062407.83157-1-jiapeng.chong@linux.alibaba.com drivers/net/wireless/intel/ipw2x00/ipw2100.c | 11 ----------- 1 file changed, 11 deletions(-) commit 37fecbb80721c4e72ba3e43d4f07ba9ec15b68fd Author: Christoph Niedermaier Date: Wed Nov 30 11:14:26 2022 +0100 dt-bindings: mfd: da9062: Correct file name for watchdog Replace the watchdog file name with the name currently in use. Signed-off-by: Christoph Niedermaier Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221130101426.5318-1-cniedermaier@dh-electronics.com Documentation/devicetree/bindings/mfd/da9062.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14f8c55d48e02157519fbcb3a5de557abd8a06e2 Author: Yang Yingliang Date: Fri Nov 25 15:36:26 2022 +0800 mfd: pm8008: Fix return value check in pm8008_probe() In case of error, the function devm_regmap_init_i2c() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 6b149f3310a4 ("mfd: pm8008: Add driver for QCOM PM8008 PMIC") Signed-off-by: Yang Yingliang Reviewed-by: Bjorn Andersson Acked-by: Guru Das Srinagesh Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221125073626.1868229-1-yangyingliang@huawei.com drivers/mfd/qcom-pm8008.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecc6aaabcedc276128315f57755364106017c606 Author: Hans de Goede Date: Thu Dec 8 12:02:02 2022 +0100 ACPI: x86: Add skip i2c clients quirk for Medion Lifetab S10346 The Medion Lifetab S10346 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 Medion Lifetab S10346'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 Medion Lifetab S10346 to the acpi_quirk_skip_dmi_ids table to woraround this. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/x86/utils.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit cb83cb0dfa821b9c91cc9b2e3473f0ea42e11461 Author: Matti Vaittinen Date: Wed Nov 23 11:19:49 2022 +0200 mfd: rohm: Use dev_err_probe() The dev_err_probe() has (at least) following benefits over dev_err() when printing an error print for a failed function call at a device driver probe: - Omit error level print if error is 'EPRBE_DEFER' - Standardized print format for returned error - return the error value allowing shortening calls like: if (ret) { dev_err(...); return ret; } to if (ret) return dev_err_probe(...); Convert the ROHM BD71828, ROHM BD718x7 and ROHM BD9576 core drivers to use the dev_err_probe() when returned error is not hard-coded constant. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/Y33lte0PKd2u6dyR@fedora drivers/mfd/rohm-bd71828.c | 23 ++++++++++------------- drivers/mfd/rohm-bd718x7.c | 21 ++++++++------------- drivers/mfd/rohm-bd9576.c | 17 ++++++++--------- 3 files changed, 26 insertions(+), 35 deletions(-) commit 96836a35ffb3bcdf412d5753363daf5ee3e68548 Author: Jean Delvare Date: Tue Nov 22 15:41:34 2022 +0100 mfd: 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: Lee Jones Cc: Bartosz Golaszewski Cc: Chanwoo Choi Cc: Krzysztof Kozlowski Cc: Bartlomiej Zolnierkiewicz Cc: Luca Ceresoli Cc: "Jonathan Neuschäfer" Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221122154134.58a7a18b@endymion.delvare drivers/mfd/Kconfig | 16 ++++++++-------- drivers/mfd/motorola-cpcap.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) commit 7ef5c57758c4bbf8d5476c3fefcb585e150d116a Author: Christoph Niedermaier Date: Tue Nov 22 10:58:31 2022 +0100 dt-bindings: mfd: da9062: Move IRQ to optional properties Move IRQ to optional properties, because the MFD DA9061/62 is usable without IRQ. This makes the chip usable for designs that don't have the IRQ pin connected. Signed-off-by: Christoph Niedermaier Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221122095833.3957-2-cniedermaier@dh-electronics.com Documentation/devicetree/bindings/mfd/da9062.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 8f3cbcd6b440032ebc7f7d48a1689dcc70a4eb98 Author: ChiYuan Huang Date: Tue Dec 6 15:22:21 2022 +0800 regulator: core: Use different devices for resource allocation and DT lookup Following by the below discussion, there's the potential UAF issue between regulator and mfd. https://lore.kernel.org/all/20221128143601.1698148-1-yangyingliang@huawei.com/ From the analysis of Yingliang CPU A |CPU B mt6370_probe() | devm_mfd_add_devices() | |mt6370_regulator_probe() | regulator_register() | //allocate init_data and add it to devres | regulator_of_get_init_data() i2c_unregister_device() | device_del() | devres_release_all() | // init_data is freed | release_nodes() | | // using init_data causes UAF | regulator_register() It's common to use mfd core to create child device for the regulator. In order to do the DT lookup for init data, the child that registered the regulator would pass its parent as the parameter. And this causes init data resource allocated to its parent, not itself. The issue happen when parent device is going to release and regulator core is still doing some operation of init data constraint for the regulator of child device. To fix it, this patch expand 'regulator_register' API to use the different devices for init data allocation and DT lookup. Reported-by: Yang Yingliang Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1670311341-32664-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown drivers/platform/x86/intel/int3472/clk_and_regulator.c | 3 ++- drivers/regulator/core.c | 8 ++++---- drivers/regulator/devres.c | 2 +- drivers/regulator/of_regulator.c | 2 +- drivers/regulator/stm32-vrefbuf.c | 2 +- include/linux/regulator/driver.h | 3 ++- 6 files changed, 11 insertions(+), 9 deletions(-) commit f24f21c4122e837fa031cc512a7f20eb8c554c5e Merge: 64fdcbcc0649 a39818a3fb2b Author: Michael Ellerman Date: Thu Dec 8 23:57:47 2022 +1100 Merge branch 'topic/objtool' into next Merge the powerpc objtool support, which we were keeping in a topic branch in case of any merge conflicts. commit e48dee96046246980d476714b3f6684d45f29c13 Author: Christophe JAILLET Date: Sun Nov 20 14:01:43 2022 +0100 mfd: qcom_rpm: Use devm_of_platform_populate() to simplify code Use devm_of_platform_populate() instead of hand-writing it. This simplifies the code. Signed-off-by: Christophe JAILLET Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/fd997dc92b9cee219e9c55e22959a94f4bbf570b.1668949256.git.christophe.jaillet@wanadoo.fr drivers/mfd/qcom_rpm.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 36579aca877a62f67ecd77eb3edefc4c86292406 Author: Christophe JAILLET Date: Sun Nov 20 18:19:01 2022 +0100 mfd: qcom_rpm: Fix an error handling path in qcom_rpm_probe() If an error occurs after the clk_prepare_enable() call, a corresponding clk_disable_unprepare() should be called. Simplify code and switch to devm_clk_get_enabled() to fix it. Fixes: 3526403353c2 ("mfd: qcom_rpm: Handle message RAM clock") Signed-off-by: Christophe JAILLET Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/e39752476d02605b2be46cab7115f71255ce13a8.1668949256.git.christophe.jaillet@wanadoo.fr drivers/mfd/qcom_rpm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f359c3e5794ce1897e95d95f5c3f804018077b52 Author: Minghao Chi Date: Tue Nov 22 09:45:58 2022 +0800 mfd: stm32-lptimer: 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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/202211220945587336502@zte.com.cn drivers/mfd/stm32-lptimer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 959ecba7f5b7a821fc3bf742223f58c489db4bee Author: Uwe Kleine-König Date: Mon Nov 21 11:24:54 2022 +0100 mfd: rohm-bd9576: 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: Matti Vaittinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221121102454.15664-1-u.kleine-koenig@pengutronix.de drivers/mfd/rohm-bd9576.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 65f15e43d9c2e1c263617c9c21501f3b7d09728d Author: Minghao Chi Date: Thu Nov 17 14:07:24 2022 +0800 mfd: fsl-imx25-tsadc: 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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/202211171407248212856@zte.com.cn drivers/mfd/fsl-imx25-tsadc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3a6f994f848a69deb2bf3cd9d130dd0c09730e55 Author: Kris Bahnsen Date: Wed Dec 7 15:08:53 2022 -0800 spi: spi-gpio: Don't set MOSI as an input if not 3WIRE mode The addition of 3WIRE support would affect MOSI direction even when still in standard (4 wire) mode. This can lead to MOSI being at an invalid logic level when a device driver sets an SPI message with a NULL tx_buf. spi.h states that if tx_buf is NULL then "zeros will be shifted out ... " If MOSI is tristated then the data shifted out is subject to pull resistors, keepers, or in the absence of those, noise. This issue came to light when using spi-gpio connected to an ADS7843 touchscreen controller. MOSI pulled high when clocking MISO data in caused the SPI device to interpret this as a command which would put the device in an unexpected and non-functional state. Fixes: 4b859db2c606 ("spi: spi-gpio: add SPI_3WIRE support") Fixes: 5132b3d28371 ("spi: gpio: Support 3WIRE high-impedance turn-around") Signed-off-by: Kris Bahnsen Link: https://lore.kernel.org/r/20221207230853.6174-1-kris@embeddedTS.com Signed-off-by: Mark Brown drivers/spi/spi-gpio.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 2a17ddfdca25ac4cbb0d317362608ec32f98fd82 Author: Rob Herring Date: Tue Dec 6 15:15:55 2022 -0600 dt-bindings: Add missing 'unevaluatedProperties' to regulator nodes Several regulator schemas are missing 'unevaluatedProperties' constraint which means any extra properties are allowed. Upon adding the constraint, there's numerous warnings from using the deprecated 'regulator-compatible' property. Remove the usage as examples shouldn't be using long since deprecated properties. Signed-off-by: Rob Herring Acked-by: Lee Jones Acked-by: Sebastian Reichel Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20221206211554.92005-1-robh@kernel.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/mfd/max77650.yaml | 2 -- Documentation/devicetree/bindings/mfd/mediatek,mt6360.yaml | 9 --------- .../devicetree/bindings/power/supply/mt6360_charger.yaml | 2 +- .../devicetree/bindings/regulator/max77650-regulator.yaml | 1 + Documentation/devicetree/bindings/regulator/max8660.yaml | 6 +----- .../devicetree/bindings/regulator/mt6360-regulator.yaml | 12 +++--------- 6 files changed, 6 insertions(+), 26 deletions(-) commit e85b1f5a9769ac30f4d2f6fb1cdcd9570c38e0c1 Author: Marek Vasut Date: Thu Dec 8 04:53:54 2022 +0100 ASoC: dt-bindings: fsl-sai: Reinstate i.MX93 SAI compatible string The ASoC: dt-bindings: fsl-sai: Fix mx6ul and mx7d compatible strings dropped i.MX93 SAI compatible string, reinstate it. Fixes: 81b6c043e7ba ("ASoC: dt-bindings: fsl-sai: Fix mx6ul and mx7d compatible strings") Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20221208035354.255438-1-marex@denx.de Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/fsl,sai.yaml | 1 + 1 file changed, 1 insertion(+) commit 31495d4f6f1308d817a69f9228063a344c5c7ba4 Author: Huacai Chen Date: Sun Sep 18 18:12:06 2022 +0800 platform/mips: Adjust Kconfig to keep consistency Drop the "if MIPS" and "endif" drivers/platform/Kconfig. Instead add a "depends on MIPS" to "menuconfig MIPS_PLATFORM_DEVICES" in drivers/ platform/mips/Kconfig, like all the other subdirs are doing. Suggested-by: Hans de Goede Signed-off-by: Huacai Chen Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer drivers/platform/Kconfig | 2 -- drivers/platform/mips/Kconfig | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit 6b2b0d839acaa84f05a77184370f793752e786e9 Merge: 7365df19e8ff 5074ffbec67a Author: Petr Mladek Date: Thu Dec 8 11:46:56 2022 +0100 Merge branch 'rework/console-list-lock' into for-linus commit 6f70a53afa21984e947e63fcc8919e9eaecd31ac Author: Alex Hung Date: Sat Nov 26 17:46:17 2022 -0700 platform/x86: wireless-hotkey: use ACPI HID as phys Removed the hardcoded "hpq6001" as phys but uses ACPI HID instead. Signed-off-by: Alex Hung Link: https://lore.kernel.org/r/20221127004617.722553-1-alex.hung@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/wireless-hotkey.c | 60 ++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 20 deletions(-) commit ef92750e11d2289fced9ff2ce211f8f790225c86 Author: Xu Panda Date: Sat Dec 3 14:17:16 2022 +0800 MIPS: OCTEON: cvmx-bootmem: use strscpy() to instead of strncpy() The implementation of strscpy() is more robust and safer. Signed-off-by: Xu Panda Signed-off-by: Yang Yang Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer arch/mips/cavium-octeon/executive/cvmx-bootmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f5739014669a734e42af9e73deb1ca165f49b5ae Author: Geert Uytterhoeven Date: Fri Dec 2 17:49:25 2022 +0100 MIPS: mscc: jaguar2: Fix pca9545 i2c-mux node names "make dtbs_check": arch/mips/boot/dts/mscc/jaguar2_pcb110.dtb: pca9545@70: $nodename:0: 'pca9545@70' does not match '^(i2c-?)?mux' From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml arch/mips/boot/dts/mscc/jaguar2_pcb110.dtb: pca9545@70: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'i2c@0', 'i2c@1', 'i2c@2', 'i2c@3' were unexpected) From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml ... Fix this by renaming PCA9545 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 Signed-off-by: Thomas Bogendoerfer arch/mips/boot/dts/mscc/jaguar2_pcb110.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 637d13b57d853dfc7f5743dfdfb9995c266a6031 Author: Colin Ian King Date: Fri Oct 7 21:40:54 2022 +0100 ovl: Kconfig: Fix spelling mistake "undelying" -> "underlying" There is a spelling mistake in a Kconfig description. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Miklos Szeredi fs/overlayfs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fa9c5c5eddef0505b353031b7605c97e4257e62 Author: Miklos Szeredi Date: Fri Oct 7 17:35:26 2022 +0200 ovl: use inode instead of dentry where possible Passing dentry to some helpers is unnecessary. Simplify these cases. Signed-off-by: Miklos Szeredi fs/overlayfs/overlayfs.h | 6 +++--- fs/overlayfs/readdir.c | 46 ++++++++++++++++++++++++---------------------- fs/overlayfs/util.c | 6 ++---- 3 files changed, 29 insertions(+), 29 deletions(-) commit cf4ef7801a8c880902a07712ba7ff61d8e954f85 Author: Stanislav Goriainov Date: Wed Aug 31 11:06:58 2022 +0300 ovl: Add comment on upperredirect reassignment If memory for uperredirect was allocated with kstrdup() in upperdir != NULL and d.redirect != NULL path, it may seem that it can be lost when upperredirect is reassigned later, but it's not possible. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 0a2d0d3f2f291 ("ovl: Check redirect on index as well") Signed-off-by: Stanislav Goriainov Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 5 +++++ 1 file changed, 5 insertions(+) commit af4dcb6d78b2b05a0431dfd3f67713bba8dc0900 Author: Amir Goldstein Date: Tue Oct 4 13:34:33 2022 +0300 ovl: use plain list filler in indexdir and workdir cleanup Those two cleanup routines are using the helper ovl_dir_read() with the merge dir filler, which populates an rb tree, that is never used. The index dir entry names all have a long (42 bytes) constant prefix, so it is not surprising that perf top has demostrated high CPU usage by rb tree population during cleanup of a large index dir: - 9.53% ovl_fill_merge - 78.41% ovl_cache_entry_find_link.constprop.27 + 72.11% strncmp Use the plain list filler that does not populate the unneeded rb tree. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/readdir.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 8ea2876577b57805489e3044de7fcb0330c52f40 Author: Amir Goldstein Date: Tue Oct 4 13:34:32 2022 +0300 ovl: do not reconnect upper index records in ovl_indexdir_cleanup() ovl_indexdir_cleanup() is called on mount of overayfs with nfs_export feature to cleanup stale index records for lower and upper files that have been deleted while overlayfs was offline. This has the side effect (good or bad) of pre populating inode cache with all the copied up upper inodes, while verifying the index entries. For copied up directories, the upper file handles are decoded to conncted upper dentries. This has the even bigger side effect of reading the content of all the parent upper directories which may take significantly more time and IO than just reading the upper inodes. Do not request connceted upper dentries for verifying upper directory index entries, because we have no use for the connected dentry. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/export.c | 4 ++-- fs/overlayfs/namei.c | 7 ++++--- fs/overlayfs/overlayfs.h | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) commit cdf5c9d1af411057e33cfbeba02ce19478dedb1e Author: Jiangshan Yi Date: Mon Sep 5 13:47:36 2022 +0800 ovl: fix comment typos Fix two typos. Reported-by: k2ci Signed-off-by: Jiangshan Yi Signed-off-by: Miklos Szeredi fs/overlayfs/export.c | 2 +- fs/overlayfs/file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 73db6a063c785bc3965f17569102a2a61ec10a4c Author: Christian Brauner Date: Fri Sep 9 11:07:47 2022 +0200 ovl: port to vfs{g,u}id_t and associated helpers A while ago we introduced a dedicated vfs{g,u}id_t type in commit 1e5267cd0895 ("mnt_idmapping: add vfs{g,u}id_t"). We already switched over a good part of the VFS. Ultimately we will remove all legacy idmapped mount helpers that operate only on k{g,u}id_t in favor of the new type safe helpers that operate on vfs{g,u}id_t. Cc: Seth Forshee (Digital Ocean) Cc: Amir Goldstein Cc: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) Signed-off-by: Miklos Szeredi fs/overlayfs/util.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5b0db51215e895a361bc63132caa7cca36a53d6a Author: Zhang Tianci Date: Thu Sep 1 16:29:29 2022 +0800 ovl: Use ovl mounter's fsuid and fsgid in ovl_link() There is a wrong case of link() on overlay: $ mkdir /lower /fuse /merge $ mount -t fuse /fuse $ mkdir /fuse/upper /fuse/work $ mount -t overlay /merge -o lowerdir=/lower,upperdir=/fuse/upper,\ workdir=work $ touch /merge/file $ chown bin.bin /merge/file // the file's caller becomes "bin" $ ln /merge/file /merge/lnkfile Then we will get an error(EACCES) because fuse daemon checks the link()'s caller is "bin", it denied this request. In the changing history of ovl_link(), there are two key commits: The first is commit bb0d2b8ad296 ("ovl: fix sgid on directory") which overrides the cred's fsuid/fsgid using the new inode. The new inode's owner is initialized by inode_init_owner(), and inode->fsuid is assigned to the current user. So the override fsuid becomes the current user. We know link() is actually modifying the directory, so the caller must have the MAY_WRITE permission on the directory. The current caller may should have this permission. This is acceptable to use the caller's fsuid. The second is commit 51f7e52dc943 ("ovl: share inode for hard link") which removed the inode creation in ovl_link(). This commit move inode_init_owner() into ovl_create_object(), so the ovl_link() just give the old inode to ovl_create_or_link(). Then the override fsuid becomes the old inode's fsuid, neither the caller nor the overlay's mounter! So this is incorrect. Fix this bug by using ovl mounter's fsuid/fsgid to do underlying fs's link(). Link: https://lore.kernel.org/all/20220817102952.xnvesg3a7rbv576x@wittgenstein/T Link: https://lore.kernel.org/lkml/20220825130552.29587-1-zhangtianci.1997@bytedance.com/t Signed-off-by: Zhang Tianci Signed-off-by: Jiachen Zhang Reviewed-by: Christian Brauner (Microsoft) Fixes: 51f7e52dc943 ("ovl: share inode for hard link") Cc: # v4.8 Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) commit cf8aa9bf97cadf85745506c6a3e244b22c268d63 Author: Kees Cook Date: Sat Sep 24 00:33:15 2022 -0700 ovl: Use "buf" flexible array for memcpy() destination The "buf" flexible array needs to be the memcpy() destination to avoid false positive run-time warning from the recent FORTIFY_SOURCE hardening: memcpy: detected field-spanning write (size 93) of single field "&fh->fb" at fs/overlayfs/export.c:799 (size 21) Reported-by: syzbot+9d14351a171d0d1c7955@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/000000000000763a6c05e95a5985@google.com/ Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Signed-off-by: Miklos Szeredi fs/overlayfs/export.c | 2 +- fs/overlayfs/overlayfs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4b6be020bd6b126112c06648de17ead360919ab4 Author: Jiri Slaby (SUSE) Date: Thu Dec 8 10:07:48 2022 +0100 USB: sisusbvga: use module_usb_driver() Now, that we only do usb_register() and usb_sisusb_exit() in module_init() and module_exit() respectivelly, we can simply use module_usb_driver(). Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Yoshinori Sato Cc: Rich Felker Cc: Thomas Winischhofer Cc: Greg Kroah-Hartman Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-sh@vger.kernel.org Cc: linux-usb@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221208090749.28056-3-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/sisusbvga/sisusbvga.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit a2f3d83cd74eb7cfc69c92d086ec4509cd9c58fb Author: Jiri Slaby (SUSE) Date: Thu Dec 8 10:07:47 2022 +0100 USB: sisusbvga: rename sisusb.c to sisusbvga.c As it's the only source for the sisusbvga module, there is no need for a 2-steps build. Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Yoshinori Sato Cc: Rich Felker Cc: Thomas Winischhofer Cc: Greg Kroah-Hartman Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-sh@vger.kernel.org Cc: linux-usb@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221208090749.28056-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/sisusbvga/Makefile | 2 -- drivers/usb/misc/sisusbvga/{sisusb.c => sisusbvga.c} | 0 2 files changed, 2 deletions(-) commit 74d58cd48a8f5848dfda8bc09d11c90f3ea42b0e Author: Jiri Slaby (SUSE) Date: Thu Dec 8 10:07:46 2022 +0100 USB: sisusbvga: remove console support It was marked as BROKEN since commit 862ee699fefe (USB: sisusbvga: Make console support depend on BROKEN) 2 years ago. Since noone stepped up to fix it, remove it completely. Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Yoshinori Sato Cc: Rich Felker Cc: Thomas Winischhofer Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-sh@vger.kernel.org Cc: linux-usb@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221208090749.28056-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/sh/configs/landisk_defconfig | 1 - drivers/usb/misc/sisusbvga/Kconfig | 34 - drivers/usb/misc/sisusbvga/Makefile | 1 - drivers/usb/misc/sisusbvga/sisusb.c | 276 +----- drivers/usb/misc/sisusbvga/sisusb.h | 21 - drivers/usb/misc/sisusbvga/sisusb_con.c | 1496 ------------------------------ drivers/usb/misc/sisusbvga/sisusb_init.c | 955 ------------------- drivers/usb/misc/sisusbvga/sisusb_init.h | 180 ---- 9 files changed, 6 insertions(+), 2959 deletions(-) commit 37d244ad183f42f91910e47984a7636e970e9d1b Author: Leon Romanovsky Date: Fri Dec 2 22:14:57 2022 +0200 net/mlx5e: Open mlx5 driver to accept IPsec packet offload Enable configuration of IPsec packet offload through XFRM state add interface together with moving specific to IPsec packet mode limitations to specific switch-case section. Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 41 ++++++++++++++++------ 1 file changed, 31 insertions(+), 10 deletions(-) commit cee137a634318bfbda18ee5af45d300153b57fa5 Author: Leon Romanovsky Date: Fri Dec 2 22:14:56 2022 +0200 net/mlx5e: Handle ESN update events Extend event logic to update ESN state (esn_msb, esn_overlap) for an IPsec Offload context. Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 5 +-- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 2 + .../mellanox/mlx5/core/en_accel/ipsec_offload.c | 44 ++++++++++++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) commit 8c582ddfbb473c1d799c40b5140aed81278e2837 Author: Leon Romanovsky Date: Fri Dec 2 22:14:55 2022 +0200 net/mlx5e: Handle hardware IPsec limits events Enable object changed event to signal IPsec about hitting soft and hard limits. Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 2 +- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 19 ++++- .../mellanox/mlx5/core/en_accel/ipsec_offload.c | 97 +++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 5 ++ 4 files changed, 118 insertions(+), 5 deletions(-) commit 1ed78fc033074c55221a80498204c539a3696877 Author: Leon Romanovsky Date: Fri Dec 2 22:14:54 2022 +0200 net/mlx5e: Update IPsec soft and hard limits Implement mlx5 IPsec callback to update current lifetime counters. Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 63 ++++++++++++++++++++++ .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 6 +++ .../mellanox/mlx5/core/en_accel/ipsec_offload.c | 57 ++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/lib/aso.h | 1 + 4 files changed, 127 insertions(+) commit 403b383a3ce3ebe12c26317978c34dd3d653c867 Author: Leon Romanovsky Date: Fri Dec 2 22:14:53 2022 +0200 net/mlx5e: Store all XFRM SAs in Xarray Instead of performing custom hash calculations, rely on FW that returns unique identifier to every created SA. That identifier is Xarray ready, which provides better semantic with efficient access. In addition, store both TX and RX SAs to allow correlation between event generated by HW when limits are armed and XFRM states. Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 82 +++++----------------- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 8 +-- .../mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 12 ++-- 3 files changed, 28 insertions(+), 74 deletions(-) commit 7bddb659bd0fc4e9022d3a3a2260540c01856e68 Author: Leon Romanovsky Date: Fri Dec 2 22:14:52 2022 +0200 net/mlx5e: Provide intermediate pointer to access IPsec struct Improve readability by providing direct pointer to struct mlx5e_ipsec. Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6721239672fe38187119afdafe996902ab24fd11 Author: Leon Romanovsky Date: Fri Dec 2 22:14:51 2022 +0200 net/mlx5e: Skip IPsec encryption for TX path without matching policy Software implementation of IPsec skips encryption of packets in TX path if no matching policy is found. So align HW implementation to this behavior, by requiring matching reqid for offloaded policy and SA. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 7 ++++ .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 4 ++- .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 39 ++++++++++++++++++---- 3 files changed, 43 insertions(+), 7 deletions(-) commit 81f8fba5ecaad53b6b32a81fe7ef06b772557647 Author: Raed Salem Date: Fri Dec 2 22:14:50 2022 +0200 net/mlx5e: Add statistics for Rx/Tx IPsec offloaded flows Add the following statistics: RX successfully IPsec flows: ipsec_rx_pkts : Number of packets passed Rx IPsec flow ipsec_rx_bytes : Number of bytes passed Rx IPsec flow Rx dropped IPsec policy packets: ipsec_rx_drop_pkts: Number of packets dropped in Rx datapath due to IPsec drop policy ipsec_rx_drop_bytes: Number of bytes dropped in Rx datapath due to IPsec drop policy TX successfully encrypted and encapsulated IPsec packets: ipsec_tx_pkts : Number of packets encrypted and encapsulated successfully ipsec_tx_bytes : Number of bytes encrypted and encapsulated successfully Tx dropped IPsec policy packets: ipsec_tx_drop_pkts: Number of packets dropped in Tx datapath due to IPsec drop policy ipsec_tx_drop_bytes: Number of bytes dropped in Tx datapath due to IPsec drop policy The above can be seen using: ethtool -S |grep ipsec Signed-off-by: Raed Salem Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 15 ++ .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 188 ++++++++++++++++++--- .../mellanox/mlx5/core/en_accel/ipsec_stats.c | 52 ++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 1 + 5 files changed, 233 insertions(+), 24 deletions(-) commit 18f38fd267abf3be8330dd73ddeb838f2dd98f29 Author: Leon Romanovsky Date: Fri Dec 2 22:14:49 2022 +0200 net/mlx5e: Improve IPsec flow steering autogroup Flow steering API separates newly created rules based on their match criteria. Right now, all IPsec tables are created with one group and suffers from not-optimal FS performance. Count number of different match criteria for relevant tables, and set proper value at the table creation. Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6b5c45e16e434efc6d323a8bc79e0eba49cd13f2 Author: Leon Romanovsky Date: Fri Dec 2 22:14:48 2022 +0200 net/mlx5e: Configure IPsec packet offload flow steering In packet offload mode, the HW is responsible to handle ESP headers, SPI numbers and trailers (ICV) together with different logic for RX and TX paths. In order to support packet offload mode, special logic is added to flow steering rules. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 2 + .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 2 + .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 97 +++++++++++++++++++--- 3 files changed, 91 insertions(+), 10 deletions(-) commit 9af594d8a99ef726b5785a309fb230265d16fd8b Author: Leon Romanovsky Date: Fri Dec 2 22:14:47 2022 +0200 net/mlx5e: Use same coding pattern for Rx and Tx flows Remove intermediate variable in favor of having similar coding style for Rx and Tx add rule functions. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a5b8ca9471d394459152a2a7f8f5f8227ae3e3c0 Author: Leon Romanovsky Date: Fri Dec 2 22:14:46 2022 +0200 net/mlx5e: Add XFRM policy offload logic Implement mlx5 flow steering logic and mlx5 IPsec code support XFRM policy offload. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 118 ++++++++++++++++- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 32 +++++ .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 146 +++++++++++++++++++++ 3 files changed, 295 insertions(+), 1 deletion(-) commit 8c17295bd4991b6d275248ff7f987f54dd5eb0e6 Author: Leon Romanovsky Date: Fri Dec 2 22:14:45 2022 +0200 net/mlx5e: Create IPsec policy offload tables Add empty table to be used for IPsec policy offload. Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 3 +- .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 53 +++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 6 +-- 3 files changed, 56 insertions(+), 6 deletions(-) commit 6cfe7bd0dfd33033683639039b5608d6534c19eb Author: Zhu Yanjun Date: Thu Dec 8 05:19:54 2022 -0500 RDMA/mlx5: Remove not-used IB_FLOW_SPEC_IB define IB_FLOW_SPEC_IB is not used in mlx5 and can be deleted. Signed-off-by: Zhu Yanjun Link: https://lore.kernel.org/r/20221208101954.687960-1-yanjun.zhu@intel.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/fs.c | 1 - 1 file changed, 1 deletion(-) commit e8a292d6a786cab048a83496687d56f121277b88 Merge: 89ae65734a99 a8e052932a2a Author: Steffen Klassert Date: Thu Dec 8 10:25:30 2022 +0100 Merge branch 'mlx5 IPsec packet offload support (Part I)' Leon Romanovsky says: ============ This series follows previously sent "Extend XFRM core to allow packet offload configuration" series [1]. It is first part with refactoring to mlx5 allow us natively extend mlx5 IPsec logic to support both crypto and packet offloads. ============ Signed-off-by: Steffen Klassert commit ff7a167961d1b97e0e205f245f806e564d3505e7 Author: Ard Biesheuvel Date: Mon Dec 5 11:31:25 2022 +0100 arm64: efi: Execute runtime services from a dedicated stack With the introduction of PRMT in the ACPI subsystem, the EFI rts workqueue is no longer the only caller of efi_call_virt_pointer() in the kernel. This means the EFI runtime services lock is no longer sufficient to manage concurrent calls into firmware, but also that firmware calls may occur that are not marshalled via the workqueue mechanism, but originate directly from the caller context. For added robustness, and to ensure that the runtime services have 8 KiB of stack space available as per the EFI spec, introduce a spinlock protected EFI runtime stack of 8 KiB, where the spinlock also ensures serialization between the EFI rts workqueue (which itself serializes EFI runtime calls) and other callers of efi_call_virt_pointer(). While at it, use the stack pivot to avoid reloading the shadow call stack pointer from the ordinary stack, as doing so could produce a gadget to defeat it. Signed-off-by: Ard Biesheuvel arch/arm64/include/asm/efi.h | 3 +++ arch/arm64/kernel/efi-rt-wrapper.S | 13 ++++++++++++- arch/arm64/kernel/efi.c | 27 +++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) commit 67327f125801f98aec9e2cf5e1df16cf493a065f Author: Asahi Lina Date: Wed Dec 7 10:43:04 2022 +0900 arm64: dts: apple: t6002: Fix GPU power domains On t6002 (M1 Ultra), each die contains a self-contained GPU block. However, only the coprocessor and global management circuitry of the first die are used. This is what is represented by the "gpu" PS (the one in die1 is disabled). Nonetheless, this shared component drives the processing blocks in both dies, and therefore depends on the AFR fabric being powered up on both dies. Add an explicit dependency from the GPU block on die0 to AFR on die1, next to the existing die0 AFR dependency. Fixes: fa86294eb355 ("arm64: dts: apple: Add initial t6000/t6001/t6002 DTs") Signed-off-by: Asahi Lina Reviewed-by: Janne Grunau Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t6002.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 2aa48e294622f7204d02de9758795171c0bd937a Author: Asahi Lina Date: Wed Dec 7 10:43:05 2022 +0900 arm64: dts: apple: t600x-pmgr: Fix search & replace typo It looks like the search-and-replace that happened to add die IDs to the t600x PMGR tree was a little bit too eager on a comment, and nobody noticed! Let's fix that. Fixes: fa86294eb355 ("arm64: dts: apple: Add initial t6000/t6001/t6002 DTs") Signed-off-by: Asahi Lina Reviewed-by: Janne Grunau Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t600x-pmgr.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8b879c00f69a22738f6bb7198e763cfcc6b68f8 Merge: e1228581b38b 020b232f79e9 Author: Jakub Kicinski Date: Wed Dec 7 20:17:35 2022 -0800 Merge branch 'net-ethernet-ti-am65-cpsw-fix-set-channel-operation' Roger Quadros says: ==================== net: ethernet: ti: am65-cpsw: Fix set channel operation This contains a critical bug fix for the recently merged suspend/resume support [1] that broke set channel operation. (ethtool -L eth0 tx ) As there were 2 dependent patches on top of the offending commit [1] first revert them and then apply them back after the correct fix. [1] fd23df72f2be ("net: ethernet: ti: am65-cpsw: Add suspend/resume support") ==================== Link: https://lore.kernel.org/r/20221206094419.19478-1-rogerq@kernel.org Signed-off-by: Jakub Kicinski commit 020b232f79e97ad06d5edc67a2dc34fe5bc271ef Author: Roger Quadros Date: Tue Dec 6 11:44:19 2022 +0200 net: ethernet: ti: am65-cpsw: Fix hardware switch mode on suspend/resume On low power during system suspend the ALE table context is lost. Save the ALE context before suspend and restore it after resume. Signed-off-by: Roger Quadros Signed-off-by: David S. Miller Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 7 +++++++ drivers/net/ethernet/ti/am65-cpsw-nuss.h | 2 ++ 2 files changed, 9 insertions(+) commit 1581cd8b11748d9ff1d9deedd9dc5c0c1ce9029b Author: Roger Quadros Date: Tue Dec 6 11:44:18 2022 +0200 net: ethernet: ti: am65-cpsw: retain PORT_VLAN_REG after suspend/resume During suspend resume the context of PORT_VLAN_REG is lost so save it during suspend and restore it during resume for host port and slave ports. Signed-off-by: Roger Quadros Signed-off-by: David S. Miller Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 7 +++++++ drivers/net/ethernet/ti/am65-cpsw-nuss.h | 4 ++++ 2 files changed, 11 insertions(+) commit 24bc19b05f1fc29e55ec73df5345fe3571c48b15 Author: Roger Quadros Date: Tue Dec 6 11:44:17 2022 +0200 net: ethernet: ti: am65-cpsw: Add suspend/resume support Add PM handlers for System suspend/resume. As DMA driver doesn't yet support suspend/resume we free up the DMA channels at suspend and acquire and initialize them at resume. In this revised approach we do not free the TX/RX IRQs at am65_cpsw_nuss_common_stop() as it causes problems. We will now free them only on .suspend() as we need to release the DMA channels (as DMA looses context) and re-acquiring them on .resume() may not necessarily give us the same IRQs. To make this easier: - introduce am65_cpsw_nuss_remove_rx_chns() which is similar to am65_cpsw_nuss_remove_tx_chns(). These will be invoked in pm.suspend() to release the DMA channels and free up the IRQs. - move napi_add() and request_irq() calls to am65_cpsw_nuss_init_rx/tx_chns() so we can invoke them in pm.resume() to acquire the DMA channels and IRQs. As CPTS looses contect during suspend/resume, invoke the necessary CPTS suspend/resume helpers. ALE_CLEAR command is issued in cpsw_ale_start() so no need to issue it before the call to cpsw_ale_start(). Signed-off-by: Roger Quadros Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 222 ++++++++++++++++++++++++------- 1 file changed, 173 insertions(+), 49 deletions(-) commit 1a014663e7dddb711566a9c9746200b187742092 Author: Roger Quadros Date: Tue Dec 6 11:44:16 2022 +0200 Revert "net: ethernet: ti: am65-cpsw: Add suspend/resume support" This reverts commit fd23df72f2be317d38d9fde0a8996b8e7454fd2a. This commit broke set channel operation. Revert this and implement it with a different approach in a separate patch. Signed-off-by: Roger Quadros Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 221 ++++++++----------------------- 1 file changed, 55 insertions(+), 166 deletions(-) commit 1bae8fa8c4f3e3fd447ea2acdad96bd0fd7ff5da Author: Roger Quadros Date: Tue Dec 6 11:44:15 2022 +0200 Revert "net: ethernet: ti: am65-cpsw: retain PORT_VLAN_REG after suspend/resume" This reverts commit 643cf0e3ab5ccee37b3c53c018bd476c45c4b70e. This is to make it easier to revert the offending commit fd23df72f2be ("net: ethernet: ti: am65-cpsw: Add suspend/resume support") Signed-off-by: Roger Quadros Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 7 ------- drivers/net/ethernet/ti/am65-cpsw-nuss.h | 4 ---- 2 files changed, 11 deletions(-) commit 1a352596722a129cacc5f601f42ece083d400086 Author: Roger Quadros Date: Tue Dec 6 11:44:14 2022 +0200 Revert "net: ethernet: ti: am65-cpsw: Fix hardware switch mode on suspend/resume" This reverts commit 1af3cb3702d02167926a2bd18580cecb2d64fd94. This is to make it easier to revert the offending commit fd23df72f2be ("net: ethernet: ti: am65-cpsw: Add suspend/resume support") Signed-off-by: Roger Quadros Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 7 ------- drivers/net/ethernet/ti/am65-cpsw-nuss.h | 2 -- 2 files changed, 9 deletions(-) commit e1228581b38bd698d3502354c0807863c8b518f7 Merge: 5955a948ac3d e5b9642a33be Author: Jakub Kicinski Date: Wed Dec 7 20:09:21 2022 -0800 Merge branch 'devlink-add-port-function-attribute-to-enable-disable-roce-and-migratable' Shay Drory says: ==================== devlink: Add port function attribute to enable/disable Roce and migratable This series is a complete rewrite of the series "devlink: Add port function attribute to enable/disable roce" link: https://lore.kernel.org/netdev/20221102163954.279266-1-danielj@nvidia.com/ Currently mlx5 PCI VF and SF are enabled by default for RoCE functionality. And mlx5 PCI VF is disable by dafault for migratable functionality. Currently a user does not have the ability to disable RoCE for a PCI VF/SF device before such device is enumerated by the driver. User is also incapable to do such setting from smartnic scenario for a VF from the smartnic. Current 'enable_roce' device knob is limited to do setting only at driverinit time. By this time device is already created and firmware has already allocated necessary system memory for supporting RoCE. Also, Currently a user does not have the ability to enable migratable for a PCI VF. The above are a hyper visor level control, to set the functionality of devices passed through to guests. This is achieved by extending existing 'port function' object to control capabilities of a function. This enables users to control capability of the device before enumeration. Examples when user prefers to disable RoCE for a VF when using switchdev mode: $ devlink port show pci/0000:06:00.0/1 pci/0000:06:00.0/1: type eth netdev pf0vf0 flavour pcivf controller 0 pfnum 0 vfnum 0 external false splittable false function: hw_addr 00:00:00:00:00:00 roce enable $ devlink port function set pci/0000:06:00.0/1 roce disable $ devlink port show pci/0000:06:00.0/1 pci/0000:06:00.0/1: type eth netdev pf0vf0 flavour pcivf controller 0 pfnum 0 vfnum 0 external false splittable false function: hw_addr 00:00:00:00:00:00 roce disable FAQs: ----- 1. What does roce enable/disable do? Ans: It disables RoCE capability of the function before its enumerated, so when driver reads the capability from the device firmware, it is disabled. At this point RDMA stack will not be able to create UD, QP1, RC, XRC type of QPs. When RoCE is disabled, the GID table of all ports of the device is disabled in the device and software stack. 2. How is the roce 'port function' option different from existing devlink param? Ans: RoCE attribute at the port function level disables the RoCE capability at the specific function level; while enable_roce only does at the software level. 3. Why is this option for disabling only RoCE and not the whole RDMA device? Ans: Because user still wants to use the RDMA device for non RoCE commands in more memory efficient way. ==================== Link: https://lore.kernel.org/r/20221206185119.380138-1-shayd@nvidia.com Signed-off-by: Jakub Kicinski commit e5b9642a33be6f6a9ec2f035299f4a5c0980d7c0 Author: Shay Drory Date: Tue Dec 6 20:51:19 2022 +0200 net/mlx5: E-Switch, Implement devlink port function cmds to control migratable Implement devlink port function commands to enable / disable migratable. This is used to control the migratable capability of the device. Signed-off-by: Shay Drory Reviewed-by: Mark Bloch Acked-by: Saeed Mahameed Signed-off-by: Jakub Kicinski .../device_drivers/ethernet/mellanox/mlx5.rst | 8 ++ drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 8 ++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 5 + .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 101 +++++++++++++++++++++ 5 files changed, 124 insertions(+) commit a8ce7b26a51efc4d7753b23d639ae092878a6193 Author: Shay Drory Date: Tue Dec 6 20:51:18 2022 +0200 devlink: Expose port function commands to control migratable Expose port function commands to enable / disable migratable capability, this is used to set the port function as migratable. Live migration is the process of transferring a live virtual machine from one physical host to another without disrupting its normal operation. In order for a VM to be able to perform LM, all the VM components must be able to perform migration. e.g.: to be migratable. In order for VF to be migratable, VF must be bound to VFIO driver with migration support. When migratable capability is enabled for a function of the port, the device is making the necessary preparations for the function to be migratable, which might include disabling features which cannot be migrated. Example of LM with migratable function configuration: Set migratable of the VF's port function. $ devlink port show pci/0000:06:00.0/2 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1 function: hw_addr 00:00:00:00:00:00 migratable disable $ devlink port function set pci/0000:06:00.0/2 migratable enable $ devlink port show pci/0000:06:00.0/2 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1 function: hw_addr 00:00:00:00:00:00 migratable enable Bind VF to VFIO driver with migration support: $ echo > /sys/bus/pci/devices/0000:08:00.0/driver/unbind $ echo mlx5_vfio_pci > /sys/bus/pci/devices/0000:08:00.0/driver_override $ echo > /sys/bus/pci/devices/0000:08:00.0/driver/bind Attach VF to the VM. Start the VM. Perform LM. Signed-off-by: Shay Drory Reviewed-by: Jiri Pirko Acked-by: Shannon Nelson Signed-off-by: Jakub Kicinski Documentation/networking/devlink/devlink-port.rst | 46 +++++++++++++++++++ include/net/devlink.h | 21 +++++++++ include/uapi/linux/devlink.h | 3 ++ net/core/devlink.c | 55 +++++++++++++++++++++++ 4 files changed, 125 insertions(+) commit 7db98396ef4581e4ca2f7e7beb766f4d19fc856a Author: Yishai Hadas Date: Tue Dec 6 20:51:17 2022 +0200 net/mlx5: E-Switch, Implement devlink port function cmds to control RoCE Implement devlink port function commands to enable / disable RoCE. This is used to control the RoCE device capabilities. This patch implement infrastructure which will be used by downstream patches that will add additional capabilities. Signed-off-by: Yishai Hadas Signed-off-by: Daniel Jurgens Signed-off-by: Shay Drory Reviewed-by: Parav Pandit Reviewed-by: Mark Bloch Acked-by: Saeed Mahameed Signed-off-by: Jakub Kicinski .../device_drivers/ethernet/mellanox/mlx5.rst | 10 ++ drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 35 +++++++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 6 +- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 108 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/vport.c | 24 +++++ 7 files changed, 186 insertions(+), 1 deletion(-) commit 47d0c500d76c7b1d220c47cd875763fef04eba2e Author: Shay Drory Date: Tue Dec 6 20:51:16 2022 +0200 net/mlx5: Add generic getters for other functions caps Downstream patch requires to get other function GENERAL2 caps while mlx5_vport_get_other_func_cap() gets only one type of caps (general). Rename it to represent this and introduce a generic implementation of mlx5_vport_get_other_func_cap(). Signed-off-by: Shay Drory Reviewed-by: Mark Bloch Acked-by: Saeed Mahameed Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 6 ++++-- include/linux/mlx5/vport.h | 2 ++ 5 files changed, 11 insertions(+), 5 deletions(-) commit da65e9ff3bf614d2836e38e1d405c7073e6ba3b7 Author: Shay Drory Date: Tue Dec 6 20:51:15 2022 +0200 devlink: Expose port function commands to control RoCE Expose port function commands to enable / disable RoCE, this is used to control the port RoCE device capabilities. When RoCE is disabled for a function of the port, function cannot create any RoCE specific resources (e.g GID table). It also saves system memory utilization. For example disabling RoCE enable a VF/SF saves 1 Mbytes of system memory per function. Example of a PCI VF port which supports function configuration: Set RoCE of the VF's port function. $ devlink port show pci/0000:06:00.0/2 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1 function: hw_addr 00:00:00:00:00:00 roce enable $ devlink port function set pci/0000:06:00.0/2 roce disable $ devlink port show pci/0000:06:00.0/2 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1 function: hw_addr 00:00:00:00:00:00 roce disable Signed-off-by: Shay Drory Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski Documentation/networking/devlink/devlink-port.rst | 34 ++++++- include/net/devlink.h | 18 ++++ include/uapi/linux/devlink.h | 10 ++ net/core/devlink.c | 113 ++++++++++++++++++++++ 4 files changed, 174 insertions(+), 1 deletion(-) commit 875cd5eeba96091d97ce27e6e9b855fba9d2e0fc Author: Shay Drory Date: Tue Dec 6 20:51:14 2022 +0200 devlink: Move devlink port function hw_addr attr documentation devlink port function hw_addr attr documentation is in mlx5 specific file while there is nothing mlx5 specific about it. Move it to devlink-port.rst. Signed-off-by: Shay Drory Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski .../device_drivers/ethernet/mellanox/mlx5.rst | 38 ++------------------ Documentation/networking/devlink/devlink-port.rst | 42 +++++++++++++++++++++- 2 files changed, 43 insertions(+), 37 deletions(-) commit c0bea69d1ca7974a6a387dbc8d9ca15345e2779f Author: Shay Drory Date: Tue Dec 6 20:51:13 2022 +0200 devlink: Validate port function request In order to avoid partial request processing, validate the request before processing it. Signed-off-by: Shay Drory Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit df268f6ca7da1088d7ecff4250d1478d3fa2406b Author: Yishai Hadas Date: Tue Dec 6 20:51:12 2022 +0200 net/mlx5: Introduce IFC bits for migratable Introduce IFC related capabilities to enable setting VF to be able to perform live migration. e.g.: to be migratable. Signed-off-by: Yishai Hadas Reviewed-by: Mark Bloch Acked-by: Saeed Mahameed Signed-off-by: Jakub Kicinski include/linux/mlx5/mlx5_ifc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5955a948ac3d4e78857726d5e8d4bffb3fc71d4f Merge: 16dc16d9f058 f86c3e2c1b5e Author: Jakub Kicinski Date: Wed Dec 7 20:05:53 2022 -0800 Merge branch 'bridge-mcast-preparations-for-evpn-extensions' Ido Schimmel says: ==================== bridge: mcast: Preparations for EVPN extensions This patchset was split from [1] and includes non-functional changes aimed at making it easier to add additional netlink attributes later on. Future extensions are available here [2]. The idea behind these patches is to create an MDB configuration structure into which netlink messages are parsed into. The structure is then passed in the entry creation / deletion call chain instead of passing the netlink attributes themselves. The same pattern is used by other rtnetlink objects such as routes and nexthops. I initially tried to extend the current code, but it proved to be too difficult, which is why I decided to refactor it to the extensible and familiar pattern used by other rtnetlink objects. Tested using existing selftests and using a new selftest that will be submitted together with the planned extensions. [1] https://lore.kernel.org/netdev/20221018120420.561846-1-idosch@nvidia.com/ [2] https://github.com/idosch/linux/commits/submit/mdb_v1 ==================== Link: https://lore.kernel.org/r/20221206105809.363767-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit f86c3e2c1b5ea5c959ef176541c2f831231fa631 Author: Ido Schimmel Date: Tue Dec 6 12:58:09 2022 +0200 bridge: mcast: Constify 'group' argument in br_multicast_new_port_group() The 'group' argument is not modified, so mark it as 'const'. It will allow us to constify arguments of the callers of this function in future patches. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_multicast.c | 2 +- net/bridge/br_private.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 090149eaf3911ce588775107b25c725d287752ef Author: Ido Schimmel Date: Tue Dec 6 12:58:08 2022 +0200 bridge: mcast: Remove redundant function arguments Drop the first three arguments and instead extract them from the MDB configuration structure. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4c1ebc6c1f2196c11cff78832c2604bbcec7d088 Author: Ido Schimmel Date: Tue Dec 6 12:58:07 2022 +0200 bridge: mcast: Move checks out of critical section The checks only require information parsed from the RTM_NEWMDB netlink message and do not rely on any state stored in the bridge driver. Therefore, there is no need to perform the checks in the critical section under the multicast lock. Move the checks out of the critical section. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 3ee5662345f26c3d694e25f3e3b577deaaf31c0f Author: Ido Schimmel Date: Tue Dec 6 12:58:06 2022 +0200 bridge: mcast: Remove br_mdb_parse() The parsing of the netlink messages and the validity checks are now performed in br_mdb_config_init() so we can remove br_mdb_parse(). This finally allows us to stop passing netlink attributes deep in the MDB control path and only use the MDB configuration structure. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 93 +++-------------------------------------------------- 1 file changed, 5 insertions(+), 88 deletions(-) commit 9f52a51429791737eaf35c6fb5273d178ec005d9 Author: Ido Schimmel Date: Tue Dec 6 12:58:05 2022 +0200 bridge: mcast: Use MDB group key from configuration structure The MDB group key (i.e., {source, destination, protocol, VID}) is currently determined under the multicast lock from the netlink attributes. Instead, use the group key from the MDB configuration structure that was prepared before acquiring the lock. No functional changes intended. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 8bd9c08e324175051d6d8ad5b2acfeaccaa1047b Author: Ido Schimmel Date: Tue Dec 6 12:58:04 2022 +0200 bridge: mcast: Propagate MDB configuration structure further As an intermediate step towards only using the new MDB configuration structure, pass it further in the control path instead of passing individual attributes. No functional changes intended. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit f2b5aac68117909c3ac9e660c3182fd59524242f Author: Ido Schimmel Date: Tue Dec 6 12:58:03 2022 +0200 bridge: mcast: Use MDB configuration structure where possible The MDB configuration structure (i.e., struct br_mdb_config) now includes all the necessary information from the parsed RTM_{NEW,DEL}MDB netlink messages, so use it. This will later allow us to delete the calls to br_mdb_parse() from br_mdb_add() and br_mdb_del(). No functional changes intended. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) commit 3866116815249be8a5ebfa37ddea9f1032c976a9 Author: Ido Schimmel Date: Tue Dec 6 12:58:02 2022 +0200 bridge: mcast: Remove redundant checks These checks are now redundant as they are performed by br_mdb_config_init() while parsing the RTM_{NEW,DEL}MDB messages. Remove them. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 63 ++++++++--------------------------------------------- 1 file changed, 9 insertions(+), 54 deletions(-) commit cb453926865ea0dddda898c8184eebb595f3c53d Author: Ido Schimmel Date: Tue Dec 6 12:58:01 2022 +0200 bridge: mcast: Centralize netlink attribute parsing Netlink attributes are currently passed deep in the MDB creation call chain, making it difficult to add new attributes. In addition, some validity checks are performed under the multicast lock although they can be performed before it is ever acquired. As a first step towards solving these issues, parse the RTM_{NEW,DEL}MDB messages into a configuration structure, relieving other functions from the need to handle raw netlink attributes. Subsequent patches will convert the MDB code to use this configuration structure. This is consistent with how other rtnetlink objects are handled, such as routes and nexthops. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_mdb.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++ net/bridge/br_private.h | 7 +++ 2 files changed, 127 insertions(+) commit 16dc16d9f058dce7031ee8b850f10622b8b5fb14 Author: ye xingchen Date: Mon Dec 5 19:18:56 2022 +0800 net: ethernet: 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 Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/202212051918564721658@zte.com.cn Signed-off-by: Jakub Kicinski net/ethernet/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0bb331221f85d131f277c834bdf20e977badfd8 Merge: 9abf2313adc1 e2e6a217a84d Author: Stephen Boyd Date: Wed Dec 7 18:31:22 2022 -0800 Merge tag 'clk-microchip-fixes-6.1-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into clk-microchip Pull Microchip clk driver updates from Claudiu Beznea: It contains a fix for Microchip Polarfire clocks; the fix consist in checking the return value of devm_kzalloc() in mpfs_ccc_register_outputs() to avoid possible null pointer dereference. * tag 'clk-microchip-fixes-6.1-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: clk: microchip: check for null return of devm_kzalloc() ARM: at91: rm9200: fix usb device clock id commit cfd3ffb36f0d566846163118651d868e607300ba Author: Xiu Jianfeng Date: Tue Nov 22 21:36:14 2022 +0800 clk: st: Fix memory leak in st_of_quadfs_setup() If st_clk_register_quadfs_pll() fails, @lock should be freed before goto @err_exit, otherwise will cause meory leak issue, fix it. Signed-off-by: Xiu Jianfeng Link: https://lore.kernel.org/r/20221122133614.184910-1-xiujianfeng@huawei.com Reviewed-by: Patrice Chotard Signed-off-by: Stephen Boyd drivers/clk/st/clkgen-fsyn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5174e5b0d1b669a489524192b6adcbb3c54ebc72 Author: Xiu Jianfeng Date: Wed Nov 23 11:20:15 2022 +0800 clk: samsung: Fix memory leak in _samsung_clk_register_pll() If clk_register() fails, @pll->rate_table may have allocated memory by kmemdup(), so it needs to be freed, otherwise will cause memory leak issue, this patch fixes it. Fixes: 3ff6e0d8d64d ("clk: samsung: Add support to register rate_table for samsung plls") Signed-off-by: Xiu Jianfeng Link: https://lore.kernel.org/r/20221123032015.63980-1-xiujianfeng@huawei.com Reviewed-by: Alim Akhtar Signed-off-by: Stephen Boyd drivers/clk/samsung/clk-pll.c | 1 + 1 file changed, 1 insertion(+) commit 9a8aadcf0b459c1257b9477fd6402e1d5952ae07 Author: Victor Ding Date: Wed Dec 7 09:39:40 2022 +0000 platform/chrome: cros_ec_typec: zero out stale pointers `cros_typec_get_switch_handles` allocates four pointers when obtaining type-c switch handles. These pointers are all freed if failing to obtain any of them; therefore, pointers in `port` become stale. The stale pointers eventually cause use-after-free or double free in later code paths. Zeroing out all pointer fields after freeing to eliminate these stale pointers. Fixes: f28adb41dab4 ("platform/chrome: cros_ec_typec: Register Type C switches") Fixes: 1a8912caba02 ("platform/chrome: cros_ec_typec: Get retimer handle") Signed-off-by: Victor Ding Acked-by: Prashant Malani Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221207093924.v2.1.I1864b6a7ee98824118b93677868d22d3750f439b@changeid drivers/platform/chrome/cros_ec_typec.c | 3 +++ 1 file changed, 3 insertions(+) commit 26df05a8c1420ad3de314fdd407e7fc2058cc7aa Author: Steven Rostedt Date: Wed Nov 30 17:54:34 2022 -0500 kest.pl: Fix grub2 menu handling for rebooting grub2 has submenus where to use grub-reboot, it requires: grub-reboot X>Y where X is the main index and Y is the submenu. Thus if you have: menuentry 'Debian GNU/Linux' --class debian --class gnu-linux ... [...] } submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option ... menuentry 'Debian GNU/Linux, with Linux 6.0.0-4-amd64' --class debian --class gnu-linux ... [...] } menuentry 'Debian GNU/Linux, with Linux 6.0.0-4-amd64 (recovery mode)' --class debian --class gnu-linux ... [...] } menuentry 'Debian GNU/Linux, with Linux test' --class debian --class gnu-linux ... [...] } And wanted to boot to the "Linux test" kernel, you need to run: # grub-reboot 1>2 As 1 is the second top menu (the submenu) and 2 is the third of the sub menu entries. Have the grub.cfg parsing for grub2 handle such cases. Cc: stable@vger.kernel.org Fixes: a15ba91361d46 ("ktest: Add support for grub2") Reviewed-by: John 'Warthog9' Hawley (VMware) Signed-off-by: Steven Rostedt tools/testing/ktest/ktest.pl | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit ef784eebb56425eed6e9b16e7d47e5c00dcf9c38 Author: Steven Rostedt Date: Fri Dec 2 11:59:36 2022 -0500 ktest.pl minconfig: Unset configs instead of just removing them After a full run of a make_min_config test, I noticed there were a lot of CONFIGs still enabled that really should not be. Looking at them, I noticed they were all defined as "default y". The issue is that the test simple removes the config and re-runs make oldconfig, which enables it again because it is set to default 'y'. Instead, explicitly disable the config with writing "# CONFIG_FOO is not set" to the file to keep it from being set again. With this change, one of my box's minconfigs went from 768 configs set, down to 521 configs set. Link: https://lkml.kernel.org/r/20221202115936.016fce23@gandalf.local.home Cc: stable@vger.kernel.org Fixes: 0a05c769a9de5 ("ktest: Added config_bisect test type") Reviewed-by: John 'Warthog9' Hawley (VMware) Signed-off-by: Steven Rostedt (Google) tools/testing/ktest/ktest.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cfbf877a338c202ace114f309a6dc0ef5cfb4ad1 Merge: 5608e0a817ce e29e3c7ce6d4 Author: Jakub Kicinski Date: Wed Dec 7 17:33:26 2022 -0800 Merge tag 'ieee802154-for-net-next-2022-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== ieee802154-next 2022-12-05 Miquel continued his work towards full scanning support. For this, we now allow the creation of dedicated coordinator interfaces to allow a PAN coordinator to serve in the network and set the needed address filters with the hardware. On top of this we have the first part to allow scanning for available 15.4 networks. A new netlink scan group, within the existing nl802154 API, was added. In addition Miquel fixed two issues that have been introduced in the former patches to free an skb correctly and clarifying an expression in the stack. From David Girault we got tracing support when registering new PANs. * tag 'ieee802154-for-net-next-2022-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next: mac802154: Trace the registration of new PANs ieee802154: Advertize coordinators discovery mac802154: Allow the creation of coordinator interfaces mac802154: Clarify an expression mac802154: Move an skb free within the rx path ==================== Link: https://lore.kernel.org/r/20221205131909.1871790-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit 5608e0a817ceb84afca8a8d738c29ffefbe4a398 Author: Oleksij Rempel Date: Mon Dec 5 14:21:02 2022 +0100 net: asix: add support for the Linux Automation GmbH USB 10Base-T1L Add ASIX based USB 10Base-T1L adapter support: https://linux-automation.com/en/products/usb-t1l.html Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20221205132102.2941732-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski drivers/net/usb/asix_devices.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 2d14123617f9917126c78719e0eaae3badbd624f Merge: 26c386ecf021 36aa10ffd648 Author: Alexei Starovoitov Date: Wed Dec 7 17:09:13 2022 -0800 Merge branch 'Document some recent core kfunc additions' David Vernet says: ==================== A series of recent patch sets introduced kfuncs that allowed struct task_struct and struct cgroup objects to be used as kptrs. These were introduced in [0], [1], and [2]. [0]: https://lore.kernel.org/lkml/20221120051004.3605026-1-void@manifault.com/ [1]: https://lore.kernel.org/lkml/20221122145300.251210-2-void@manifault.com/T/ [2]: https://lore.kernel.org/lkml/20221122055458.173143-1-void@manifault.com/ These are "core" kfuncs, in that they may be used by a wide variety of possible BPF tracepoint or struct_ops programs, and are defined in kernel/bpf/helpers.c. Even though as kfuncs they have no ABI stability guarantees, they should still be properly documented. This patch set adds that documentation. Some other kfuncs were added recently as well, such as bpf_rcu_read_lock() and bpf_rcu_read_unlock(). Those could and should be added to this "Core kfuncs" section as well in subsequent patch sets. Note that this patch set does not contain documentation for bpf_task_acquire_not_zero(), or bpf_task_kptr_get(). As discussed in [3], those kfuncs currently always return NULL pending resolution on how to properly protect their arguments using RCU. [3]: https://lore.kernel.org/all/20221206210538.597606-1-void@manifault.com/ --- Changelog: v2 -> v3: - Don't document bpf_task_kptr_get(), and instead provide a more substantive example for bpf_cgroup_kptr_get(). - Further clarify expected behavior of bpf_task_from_pid() in comments (Alexei) v1 -> v2: - Expand comment to specify that a map holds a reference to a task kptr if we don't end up releasing it (Alexei) - Just read task->pid instead of using a probed read (Alexei) ==================== Signed-off-by: Alexei Starovoitov commit 36aa10ffd6480b93e32611411be4a8fc49804aba Author: David Vernet Date: Wed Dec 7 14:49:11 2022 -0600 bpf/docs: Document struct cgroup * kfuncs bpf_cgroup_acquire(), bpf_cgroup_release(), bpf_cgroup_kptr_get(), and bpf_cgroup_ancestor(), are kfuncs that were recently added to kernel/bpf/helpers.c. These are "core" kfuncs in that they're available for use in any tracepoint or struct_ops BPF program. Though they have no ABI stability guarantees, we should still document them. This patch adds a struct cgroup * subsection to the Core kfuncs section which describes each of these kfuncs. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221207204911.873646-3-void@manifault.com Signed-off-by: Alexei Starovoitov Documentation/bpf/kfuncs.rst | 115 +++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/helpers.c | 2 +- 2 files changed, 116 insertions(+), 1 deletion(-) commit 25c5e92d197bd721e706444c5910fd386c330456 Author: David Vernet Date: Wed Dec 7 14:49:10 2022 -0600 bpf/docs: Document struct task_struct * kfuncs bpf_task_acquire(), bpf_task_release(), and bpf_task_from_pid() are kfuncs that were recently added to kernel/bpf/helpers.c. These are "core" kfuncs in that they're available for use for any tracepoint or struct_ops BPF program. Though they have no ABI stability guarantees, we should still document them. This patch adds a new Core kfuncs section to the BPF kfuncs doc, and adds entries for all of these task kfuncs. Note that bpf_task_kptr_get() is not documented, as it still returns NULL while we're working to resolve how it can use RCU to ensure struct task_struct * lifetime. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221207204911.873646-2-void@manifault.com Signed-off-by: Alexei Starovoitov Documentation/bpf/kfuncs.rst | 83 ++++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/helpers.c | 2 +- 2 files changed, 84 insertions(+), 1 deletion(-) commit 26c386ecf0212affb50f02dabcb0152995b99b07 Author: Andrii Nakryiko Date: Wed Dec 7 12:16:48 2022 -0800 selftests/bpf: convert dynptr_fail and map_kptr_fail subtests to generic tester Convert big chunks of dynptr and map_kptr subtests to use generic verification_tester. They are switched from using manually maintained tables of test cases, specifying program name and expected error verifier message, to btf_decl_tag-based annotations directly on corresponding BPF programs: __failure to specify that BPF program is expected to fail verification, and __msg() to specify expected log message. Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Acked-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221207201648.2990661-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/dynptr.c | 80 +--------------------- tools/testing/selftests/bpf/prog_tests/map_kptr.c | 80 +--------------------- tools/testing/selftests/bpf/progs/dynptr_fail.c | 31 +++++++++ tools/testing/selftests/bpf/progs/dynptr_success.c | 1 + tools/testing/selftests/bpf/progs/map_kptr_fail.c | 27 ++++++++ 5 files changed, 64 insertions(+), 155 deletions(-) commit 537c3f66eac137a02ec50a40219d2da6597e5dc9 Author: Andrii Nakryiko Date: Wed Dec 7 12:16:47 2022 -0800 selftests/bpf: add generic BPF program tester-loader It's become a common pattern to have a collection of small BPF programs in one BPF object file, each representing one test case. On user-space side of such tests we maintain a table of program names and expected failure or success, along with optional expected verifier log message. This works, but each set of tests reimplement this mundane code over and over again, which is a waste of time for anyone trying to add a new set of tests. Furthermore, it's quite error prone as it's way too easy to miss some entries in these manually maintained test tables (as evidences by dynptr_fail tests, in which ringbuf_release_uninit_dynptr subtest was accidentally missed; this is fixed in next patch). So this patch implements generic test_loader, which accepts skeleton name and handles the rest of details: opens and loads BPF object file, making sure each program is tested in isolation. Optionally each test case can specify expected BPF verifier log message. In case of failure, tester makes sure to report verifier log, but it also reports verifier log in verbose mode unconditionally. Now, the interesting deviation from existing custom implementations is the use of btf_decl_tag attribute to specify expected-to-fail vs expected-to-succeed markers and, optionally, expected log message directly next to BPF program source code, eliminating the need to manually create and update table of tests. We define few macros wrapping btf_decl_tag with a convention that all values of btf_decl_tag start with "comment:" prefix, and then utilizing a very simple "just_some_text_tag" or "some_key_name=" pattern to define things like expected success/failure, expected verifier message, extra verifier log level (if necessary). This approach is demonstrated by next patch in which two existing sets of failure tests are converted. Tester supports both expected-to-fail and expected-to-succeed programs, though this patch set didn't convert any existing expected-to-succeed programs yet, as existing tests couple BPF program loading with their further execution through attach or test_prog_run. One way to allow testing scenarios like this would be ability to specify custom callback, executed for each successfully loaded BPF program. This is left for follow up patches, after some more analysis of existing test cases. This test_loader is, hopefully, a start of a test_verifier-like runner, but integrated into test_progs infrastructure. It will allow much better "user experience" of defining low-level verification tests that can take advantage of all the libbpf-provided nicety features on BPF side: global variables, declarative maps, etc. All while having a choice of defining it in C or as BPF assembly (through __attribute__((naked)) functions and using embedded asm), depending on what makes most sense in each particular case. This will be explored in follow up patches as well. Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221207201648.2990661-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/progs/bpf_misc.h | 5 + tools/testing/selftests/bpf/test_loader.c | 233 +++++++++++++++++++++++++++ tools/testing/selftests/bpf/test_progs.h | 33 ++++ 4 files changed, 272 insertions(+), 1 deletion(-) commit 682c0722addae4b4a1440c9db9d8c86cb8e09ce5 Author: Chengchang Tang Date: Sat Nov 26 18:29:11 2022 +0800 RDMA/hns: Fix XRC caps on HIP08 XRC caps has been set by default. But in fact, XRC is not supported in HIP08. Fixes: 32548870d438 ("RDMA/hns: Add support for XRC on HIP09") Link: https://lore.kernel.org/r/20221126102911.2921820-7-xuhaoyue1@hisilicon.com Signed-off-by: Chengchang Tang Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 667d6164b84884c64de3fc18670cd5a98b0b10cf Author: Chengchang Tang Date: Sat Nov 26 18:29:10 2022 +0800 RDMA/hns: Fix error code of CMD The error code is fixed to EIO when CMD fails to excute. This patch converts the error status reported by firmware to linux errno. Fixes: a04ff739f2a9 ("RDMA/hns: Add command queue support for hip08 RoCE driver") Link: https://lore.kernel.org/r/20221126102911.2921820-6-xuhaoyue1@hisilicon.com Signed-off-by: Chengchang Tang Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 26 +++++++++++++++++++++++++- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 5 +++++ 2 files changed, 30 insertions(+), 1 deletion(-) commit 99dc5a0712883d5d13b620d25b3759d429577bc8 Author: Chengchang Tang Date: Sat Nov 26 18:29:09 2022 +0800 RDMA/hns: Fix page size cap from firmware Add verification to make sure the roce page size cap is supported by the system page size. Fixes: ba6bb7e97421 ("RDMA/hns: Add interfaces to get pf capabilities from firmware") Link: https://lore.kernel.org/r/20221126102911.2921820-5-xuhaoyue1@hisilicon.com Signed-off-by: Chengchang Tang Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +++ 1 file changed, 3 insertions(+) commit 9fb39ef2ff3e18f1740625ba04093dfbef086d2b Author: Chengchang Tang Date: Sat Nov 26 18:29:08 2022 +0800 RDMA/hns: Fix PBL page MTR find Now, The address of the first two pages in the MR will be searched, which use to speed up the lookup of the pbl table for hardware. An exception will occur when there is only one page in this MR. This patch fix the number of page to search. Fixes: 9b2cf76c9f05 ("RDMA/hns: Optimize PBL buffer allocation process") Link: https://lore.kernel.org/r/20221126102911.2921820-4-xuhaoyue1@hisilicon.com Signed-off-by: Chengchang Tang Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bc34c04f7b97c3794dec5a6d6d27ffd5f0e4f5c8 Author: Chengchang Tang Date: Sat Nov 26 18:29:07 2022 +0800 RDMA/hns: Fix AH attr queried by query_qp The queried AH attr is invalid. This patch fix it. This problem is found by rdma-core test test_mr_rereg_pd ERROR: test_mr_rereg_pd (tests.test_mr.MRTest) Test that cover rereg MR's PD with this flow: ---------------------------------------------------------------------- Traceback (most recent call last): File "./tests/test_mr.py", line 157, in test_mr_rereg_pd self.restate_qps() File "./tests/test_mr.py", line 113, in restate_qps self.server.qp.to_rts(self.server_qp_attr) File "qp.pyx", line 1137, in pyverbs.qp.QP.to_rts File "qp.pyx", line 1123, in pyverbs.qp.QP.to_rtr pyverbs.pyverbs_error.PyverbsRDMAError: Failed to modify QP state to RTR. Errno: 22, Invalid argument Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/20221126102911.2921820-3-xuhaoyue1@hisilicon.com Signed-off-by: Chengchang Tang Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 ++ 1 file changed, 2 insertions(+) commit 487d65090a3dce1ae54946aded55d0f8ac87cbab Author: Yixing Liu Date: Sat Nov 26 18:29:06 2022 +0800 RDMA/hns: Fix the gid problem caused by free mr After the hns roce driver is loaded, if you modify the mac address of the network port, the following error will appear: __ib_cache_gid_add: unable to add gid fe80:0000:0000:0000:4600:4dff:fe22:abb5 error=-28 hns3 0000:7d:00.0 hns_0: attr path_mtu(1) invalid while modify qp The reason for the error is that the gid being occupied will cause the failure to modify the gid. The gid is occupied by the loopback QP used by free mr. When the mac address is modified, the gid will change. If there is a busy QP at this time, the gid will not be released and the modification will fail. The QP of free mr is created using the ib interface. The ib interface will add a reference count to the gid, resulting in this error scenario. Considering that free mr is solving a bug in HIP08, not an actual business, it is not necessary to use ib interfaces. Fixes: 70f92521584f ("RDMA/hns: Use the reserved loopback QPs to free MR before destroying MPT") Link: https://lore.kernel.org/r/20221126102911.2921820-2-xuhaoyue1@hisilicon.com Signed-off-by: Yixing Liu Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 175 ++++++++++++++++++++++------- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 8 +- 2 files changed, 137 insertions(+), 46 deletions(-) commit fb4907f487254375830f135dcfe5dd7e6f8b705f Author: Chao Leng Date: Fri Nov 25 09:00:26 2022 +0800 RDMA/cma: Change RoCE packet life time from 18 to 16 The ack timeout retransmission time is affected by the following two factors: one is packet life time, another is the HCA processing time. Now the default packet lifetime(CMA_IBOE_PACKET_LIFETIME) is 18. That means the minimum ack timeout is 2 seconds (2^(18+1)*4us=2.097seconds). The packet lifetime means the maximum transmission time of packets on the network, 2 seconds is too long. Assume the network is a clos topology with three layers, every packet will pass through five hops of switches. Assume the buffer of every switch is 128MB and the port transmission rate is 25 Gbit/s, the maximum transmission time of the packet is 200ms(128MB*5/25Gbit/s). Add double redundancy, it is less than 500ms. So change the CMA_IBOE_PACKET_LIFETIME to 16, the maximum transmission time of the packet will be about 500+ms, it is long enough. Link: https://lore.kernel.org/r/20221125010026.755-1-lengchao@huawei.com Signed-off-by: Chao Leng Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64fdcbcc064966bbf261bb455876dffa58858d32 Author: Michael Ellerman Date: Thu Dec 8 09:43:15 2022 +1100 powerpc/prom: Fix 32-bit build Add an IS_ENABLED() check to fix the build error: arch/powerpc/kernel/prom.o: in function `early_init_dt_scan_cpus': prom.c:(.init.text+0x2ea): undefined reference to `boot_cpu_node_count' Fixes: e13d23a404f2 ("powerpc: export the CPU node count") Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 76007ccc5727f86c105e96697e96dcf2df6b1634 Author: Dmitry Torokhov Date: Wed Dec 7 13:07:10 2022 -0800 PCI: mvebu: Switch to using gpiod API Switch the driver away from legacy gpio/of_gpio API to gpiod API, and remove use of of_get_named_gpio_flags() which I want to make private to gpiolib. Link: https://lore.kernel.org/r/Y5EAft42YiT66mVj@google.com Signed-off-by: Dmitry Torokhov Signed-off-by: Bjorn Helgaas drivers/pci/controller/pci-mvebu.c | 51 +++++++++++++------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) commit dcb2288b1fd9a8cdf2f3b8c0c7b3763346ef515f Author: Andrii Nakryiko Date: Wed Dec 7 11:55:34 2022 -0800 bpf: Remove unused insn_cnt argument from visit_[func_call_]insn() Number of total instructions in BPF program (including subprogs) can and is accessed from env->prog->len. visit_func_call_insn() doesn't do any checks against insn_cnt anymore, relying on push_insn() to do this check internally. So remove unnecessary insn_cnt input argument from visit_func_call_insn() and visit_insn() functions. Suggested-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221207195534.2866030-1-andrii@kernel.org kernel/bpf/verifier.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 63cd992e5179db5600ce8975735a484c1caa96a5 Merge: 9abf2313adc1 2931aa6758da Author: Stephen Boyd Date: Wed Dec 7 13:54:41 2022 -0800 Merge tag 'qcom-clk-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom Pull Qualcomm clk driver updates from Bjorn Andersson: This introduces Global clock controller for SM8550, Display clock controller for SC8280XP and RPMh clock controller for QDU1000 and QRU1000. The SM8150/SM8250 Display clock controller is cleaned up and some missing clocks for SM8350 are added. MSM8974 Global and Multimedia clock controllers are transitioned to parent_data and parent_hws. IPQ8074 parent_data and additional network resets and the Krait clock controller modernized. pm_runtime usage in SC7180 and SC7280 LPASS clock controllers are corrected. SM8250 USB GDSCs enable retention mode. RPM and RPMh clock drivers are cleaned up, to avoid duplicating clocks which definition could be shared between platforms. A variety of DT binding improvements. * tag 'qcom-clk-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (69 commits) clk: qcom: rpmh: add support for SM6350 rpmh IPA clock clk: qcom: mmcc-msm8974: use parent_hws/_data instead of parent_names clk: qcom: mmcc-msm8974: move clock parent tables down clk: qcom: mmcc-msm8974: use ARRAY_SIZE instead of specifying num_parents clk: qcom: gcc-msm8974: use parent_hws/_data instead of parent_names clk: qcom: gcc-msm8974: move clock parent tables down clk: qcom: gcc-msm8974: use ARRAY_SIZE instead of specifying num_parents dt-bindings: clocks: qcom,mmcc: define clocks/clock-names for MSM8974 dt-bindings: clock: split qcom,gcc-msm8974,-msm8226 to the separate file clk: qcom: gcc-ipq4019: switch to devm_clk_notifier_register clk: qcom: rpmh: remove usage of platform name clk: qcom: rpmh: rename VRM clock data clk: qcom: rpmh: rename ARC clock data clk: qcom: rpmh: support separate symbol name for the RPMH clocks clk: qcom: rpmh: remove platform names from BCM clocks clk: qcom: rpmh: drop all _ao names clk: qcom: rpmh: reuse common duplicate clocks clk: qcom: rpmh: group clock definitions together clk: qcom: rpm: drop the platform from clock definitions clk: qcom: rpm: drop the _clk suffix completely ... commit 49e62e0d96baf7236615e4ec2878d8db229de9c2 Author: Maxime Ripard Date: Wed Oct 26 15:46:59 2022 +0200 clk: Add trace events for rate requests It is currently fairly difficult to follow what clk_rate_request are issued, and how they have been modified once done. Indeed, there's multiple paths that can be taken, some functions are recursive and will just forward the request to its parent, etc. Adding a lot of debug prints is just not very convenient, so let's add trace events for the clock requests, one before they are submitted and one after they are returned. That way we can simply toggle the tracing on without modifying the kernel code and without affecting performances or the kernel logs too much. Reviewed-by: Steven Rostedt (Google) Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20221018-clk-rate-request-tracing-v2-2-5170b363c413@cerno.tech Signed-off-by: Stephen Boyd drivers/clk/clk.c | 31 +++++++++++++++++++++++++++++++ include/trace/events/clk.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) commit ef13f8b64728c4b4d28639bbcf30fe1314b18482 Author: Maxime Ripard Date: Wed Oct 26 15:46:58 2022 +0200 clk: Store clk_core for clk_rate_request The struct clk_rate_request is meant to store the context around a rate request such as the parent, boundaries, and so on. However, it doesn't store the clock the rate request is submitted to, which makes debugging difficult. Let's add a pointer to the relevant clk_core instance in order to improve the debugging of rate requests in a subsequent patch. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20221018-clk-rate-request-tracing-v2-1-5170b363c413@cerno.tech Signed-off-by: Stephen Boyd drivers/clk/clk.c | 1 + include/linux/clk-provider.h | 2 ++ 2 files changed, 3 insertions(+) commit 0a6ea1ce8260f08079b0940350a21e4ad95c2378 Merge: e9b4aeed5669 5b481acab4ce Author: Alexei Starovoitov Date: Wed Dec 7 13:49:11 2022 -0800 Merge "do not rely on ALLOW_ERROR_INJECTION for fmod_ret" into bpf-next Merge commit 5b481acab4ce ("bpf: do not rely on ALLOW_ERROR_INJECTION for fmod_ret") from hid tree into bpf-next. Signed-off-by: Alexei Starovoitov commit de4b8d201666b332034f8117b0995a43534b57d3 Author: Jonathan Cameron Date: Sun Dec 4 18:08:41 2022 +0000 Input: pxspad - fix unused data warning when force feedback not enabled The functions using this data were protected with #ifdef CONFIG_JOYSTICK_PSXPAD_SPI_FF. Do the same for the data used only in those functions. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20221204180841.2211588-33-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/psxpad-spi.c | 3 +++ 1 file changed, 3 insertions(+) commit 1c89ef672a161bfdb5c72f35b80940ea56c9f935 Author: Jonathan Cameron Date: Sun Dec 4 18:08:40 2022 +0000 Input: lpc32xx - allow building with COMPILE_TEST Used to test the PM changes. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20221204180841.2211588-32-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78c2b18b1e85b6e3ddff9d3cff3597f0d5e7b82d Author: Jonathan Cameron Date: Sun Dec 4 18:08:39 2022 +0000 Input: nomadik-ske-keypad - allow building with COMPILE_TEST Used to build test the PM changes. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20221204180841.2211588-31-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ececc2024e10c07605888517515c19990925161a Author: Jonathan Cameron Date: Sun Dec 4 18:08:38 2022 +0000 Input: pxa27xx-keypad - allow build with COMPILE_TEST Used to build test PM changes. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20221204180841.2211588-30-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b07641ec0f94e166b9dd5b175d65769f025d6e3 Author: Jonathan Cameron Date: Sun Dec 4 18:08:37 2022 +0000 Input: spear-keyboard - improve build coverage using COMPILE_TEST Used to test the PM changes. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20221204180841.2211588-29-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d65adc2b16f89e244b746eb149af17f93b75bbdc Author: Jonathan Cameron Date: Sun Dec 4 18:08:36 2022 +0000 Input: tegra-kbc - allow build with COMPILE_TEST Used to build test PM changes. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20221204180841.2211588-28-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 995765edc43b8898f5fa6742403ff6dfa2afb56e Author: Jonathan Cameron Date: Sun Dec 4 18:08:35 2022 +0000 Input: tegra-kbc - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-27-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tegra-kbc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit bf7aa12bb0a3693b1897368c0b6e2ae80998367a Author: Jonathan Cameron Date: Sun Dec 4 18:08:34 2022 +0000 Input: tca6416-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 Link: https://lore.kernel.org/r/20221204180841.2211588-26-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tca6416-keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit eeeeb51b9c78c377cccdd34c654eeaaec7e46476 Author: Jonathan Cameron Date: Sun Dec 4 18:08:33 2022 +0000 Input: tc3589x - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-25-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tc3589x-keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a473a763f4350a4cdc59bef0a3c1bc0d8dc94b9a Author: Jonathan Cameron Date: Sun Dec 4 18:08:32 2022 +0000 Input: st-keyscan - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-24-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/st-keyscan.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit aebc2380c1f20df2faa39f3cc069825d2fdd9dd7 Author: Jonathan Cameron Date: Sun Dec 4 18:08:31 2022 +0000 Input: sh-keysc - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-23-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/sh_keysc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 9254ed3f13e45232266e9e074d5902234fde8ca8 Author: Jonathan Cameron Date: Sun Dec 4 18:08:30 2022 +0000 Input: qt1070 - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-22-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/qt1070.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a4b4fa510181526c496052c1be320c0fcb05826c Author: Jonathan Cameron Date: Sun Dec 4 18:08:29 2022 +0000 Input: pxa27x_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 Link: https://lore.kernel.org/r/20221204180841.2211588-21-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/pxa27x_keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit bb4678889e690a4ce0a61d5528e309026fce636f Author: Jonathan Cameron Date: Sun Dec 4 18:08:28 2022 +0000 Input: pmic8xxx-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 Link: https://lore.kernel.org/r/20221204180841.2211588-20-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/pmic8xxx-keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit baa0e23fbedd20704f2d69a8ae703cd1b234aed6 Author: Jonathan Cameron Date: Sun Dec 4 18:08:27 2022 +0000 Input: nomadik-ske-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 Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221204180841.2211588-19-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/nomadik-ske-keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 6b94d7b649443ab0f23a3984e1ddc9c8870e0029 Author: Jonathan Cameron Date: Sun Dec 4 18:08:26 2022 +0000 Input: mcs-touchkey - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-18-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mcs_touchkey.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b94615650fe66e3e87cb14c5ec2e38b2884d9f37 Author: Jonathan Cameron Date: Sun Dec 4 18:08:25 2022 +0000 Input: max7359-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 Link: https://lore.kernel.org/r/20221204180841.2211588-17-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/max7359_keypad.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b9425700d297b530f1e656bdbf8936dce55f0029 Author: Jonathan Cameron Date: Sun Dec 4 18:08:24 2022 +0000 Input: matrix-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 Link: https://lore.kernel.org/r/20221204180841.2211588-16-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/matrix_keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit bad0193a069231dfdf9664a60b49f34c232ed58c Author: Jonathan Cameron Date: Sun Dec 4 18:08:23 2022 +0000 Input: lpc32xx-keys - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-15-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/lpc32xx-keys.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit d0774bc97543739a40544260184bbb6e1fed4af4 Author: Jonathan Cameron Date: Sun Dec 4 18:08:22 2022 +0000 Input: lm8323 - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-14-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/lm8323.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 03ea337338ceea34be27b7b131dbd75d61a4d217 Author: Jonathan Cameron Date: Sun Dec 4 18:08:21 2022 +0000 Input: tm2-touchkey - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-13-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tm2-touchkey.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1844c79c4dc9a2a8297160e9beae9f2a9c7f775b Author: Jonathan Cameron Date: Sun Dec 4 18:08:20 2022 +0000 Input: spear-keyboard - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-12-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/spear-keyboard.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ffa5d80fa99a65465feb47012a916e8b3f01c10a Author: Jonathan Cameron Date: Sun Dec 4 18:08:19 2022 +0000 Input: qt1050 - 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: Marco Felsch Link: https://lore.kernel.org/r/20221204180841.2211588-11-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/qt1050.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b346200943a27ddf94c3a92755b3748d25c2eb13 Author: Jonathan Cameron Date: Sun Dec 4 18:08:18 2022 +0000 Input: mtk-pmic-keys - 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: Mattijs Korpershoek Link: https://lore.kernel.org/r/20221204180841.2211588-10-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mtk-pmic-keys.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8362cb5ca9043f2734aa81d73444e16f9c5d09e1 Author: Jonathan Cameron Date: Sun Dec 4 18:08:17 2022 +0000 Input: mpr121-touchkey - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-9-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mpr121_touchkey.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8c1f3b2e248fa0e09d81b7cb110209252a1ec7e9 Author: Jonathan Cameron Date: Sun Dec 4 18:08:16 2022 +0000 Input: ipaq-micro-keys - 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 Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221204180841.2211588-8-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/ipaq-micro-keys.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ba4de5d944357b8bfba0e987f539530bc75ac6e7 Author: Jonathan Cameron Date: Sun Dec 4 18:08:15 2022 +0000 Input: gpio-keys - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-7-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/gpio_keys.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 64bc273208cf7320389d9f662d8c562233201ed7 Author: Jonathan Cameron Date: Sun Dec 4 18:08:14 2022 +0000 Input: ep39xx-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 __maybe_unused markings. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20221204180841.2211588-6-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/ep93xx_keypad.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fbfb262e0aa56e3222e6670e2004646157c9d18b Author: Jonathan Cameron Date: Sun Dec 4 18:08:13 2022 +0000 Input: cypress-sf - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-5-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/cypress-sf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ca219cf7fd1917940e32d72c6f939b4056355b14 Author: Jonathan Cameron Date: Sun Dec 4 18:08:12 2022 +0000 Input: cros-ec-keyb - 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: Stephen Boyd Link: https://lore.kernel.org/r/20221204180841.2211588-4-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/cros_ec_keyb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 32a97d3155a29e1fcd4ea5836c41ca38369e6dc8 Author: Jonathan Cameron Date: Sun Dec 4 18:08:11 2022 +0000 Input: adp5589-keys - 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 Link: https://lore.kernel.org/r/20221204180841.2211588-3-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/adp5589-keys.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f3183157cf8996a604006a24b4166f6505981844 Author: Jonathan Cameron Date: Sun Dec 4 18:08:10 2022 +0000 Input: pxspad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against used 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 Link: https://lore.kernel.org/r/20221204180841.2211588-2-jic23@kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/psxpad-spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 93b8c91e4cdb520b67ffc4513a7d6232f1037d9b Merge: 3880e0df2e14 5d4bf8607be1 Author: Arnd Bergmann Date: Wed Dec 7 22:10:05 2022 +0100 Merge tag 'qcom-arm64-defconfig-for-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig More Qualcomm ARM64 defconfig updates for 6.2 This enables Globalc Clock Controller (GCC) and TLMM pinctrl for SM6115 and SM4250. * tag 'qcom-arm64-defconfig-for-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Enable Qualcomm SM6115 / SM4250 GCC and Pinctrl Link: https://lore.kernel.org/r/20221207154339.3234068-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 9379885d07c466a9207e88c0fd0c8b3541536fe3 Merge: 66310b5a0fc1 f33ca7ec5e5e Author: Arnd Bergmann Date: Wed Dec 7 22:07:48 2022 +0100 Merge tag 'qcom-drivers-for-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers More Qualcomm driver updates for 6.2 Socinfo is extended with knowledge about MSM8956, MSM8976, SM6115, SM4250, SM8150, SA8155 and SM8550. Support for RSC v3, as found in SM8550 is added to the RPMH RSC driver. Support for SM8550 and SM4250 ARC regulators are added to the RPM(h) power-domain drivers. SM8550 support is added to the LLCC driver. The AOSS QMP binding is declared compatible for SM8550. BWMON and LLCC now selects REGMAP_MMIO to ensure dependencies are built properly. * tag 'qcom-drivers-for-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: socinfo: Add SM6115 / SM4250 SoC IDs to the soc_id table dt-bindings: arm: qcom,ids: Add SoC IDs for SM6115 / SM4250 and variants soc: qcom: socinfo: Add SM8150 and SA8155 SoC IDs to the soc_id table dt-bindings: arm: qcom,ids: Add SoC IDs for SM8150 and SA8155 dt-bindings: soc: qcom: apr: document generic qcom,apr compatible soc: qcom: Select REMAP_MMIO for ICC_BWMON driver soc: qcom: Select REMAP_MMIO for LLCC driver soc: qcom: rpmpd: Add SM4250 support dt-bindings: power: rpmpd: Add SM4250 support dt-bindings: soc: qcom: aoss: Add compatible for SM8550 soc: qcom: llcc: Add configuration data for SM8550 dt-bindings: arm: msm: Add LLCC compatible for SM8550 soc: qcom: llcc: Add v4.1 HW version support soc: qcom: socinfo: Add SM8550 ID soc: qcom: rpmh-rsc: Avoid unnecessary checks on irq-done response soc: qcom: rpmh-rsc: Add support for RSC v3 register offsets soc: qcom: rpmhpd: Add SM8550 power domains dt-bindings: power: rpmpd: Add SM8550 to rpmpd binding soc: qcom: socinfo: Add MSM8956/76 SoC IDs to the soc_id table dt-bindings: arm: qcom,ids: Add SoC IDs for MSM8956 and MSM8976 Link: https://lore.kernel.org/r/20221207154134.3233779-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit da060ab86eb0de7954dafa34aefa9cc58cc4e76c Merge: c24ba5964f04 812e13ddb56a Author: Arnd Bergmann Date: Wed Dec 7 22:06:03 2022 +0100 Merge tag 'qcom-dts-for-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt More Qualcomm DTS updates for 6.2 This introduces support for the OnePlus One, on MSM8974Pro, and properly marks other Pro devices as compatible thereof. Also on MSM8974, the description of USB devices and their PHYs are cleaned up. On the binding side compatibles for recently added ARM and ARM64 boards are added. * tag 'qcom-dts-for-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (102 commits) dt-bindings: arm: qcom: Add zombie ARM: dts: qcom: msm8974: Add OnePlus One dt-bindings: arm: qcom: Document oneplus,bacon device ARM: dts: qcom: msm8974: clean up USB nodes arm: dts: qcom: use qcom,msm8974pro for pro devices dt-bindings: arm: qcom: split MSM8974 Pro and MSM8974 ARM: dts: qcom: align LED node names with dtschema dt-bindings: arm: qcom: Document additional sa8540p device dt-bindings: arm: qcom: Add Xperia 5 IV (PDX224) dt-bindings: arm: qcom: Document msm8956 and msm8976 SoC and devices dt-bindings: arm: add xiaomi,sagit board based on msm8998 chip dt-bindings: arm: qcom: add sdm670 and pixel 3a compatible dt-bindings: arm: cpus: add qcom kryo 360 compatible ARM: dts: qcom-msm8960-cdp: align TLMM pin configuration with DT schema ARM: dts: qcom-msm8960: use define for interrupt constants dt-bindings: arm: qcom: Document SM6375 & Xperia 10 IV ARM: dts: qcom-apq8060: align TLMM pin configuration with DT schema ARM: dts: qcom: msm8226: Add MMCC node dt-bindings: arm: qcom: Separate LTE/WIFI SKU for sc7280-evoker dt-bindings: arm: qcom: Document QDU1000/QRU1000 SoCs and boards ... Link: https://lore.kernel.org/r/20221207153201.3233015-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit c24ba5964f040163bb1e9f248a7f7e2171f2c9e1 Merge: c05188c8062d 51f7be212ae6 Author: Arnd Bergmann Date: Wed Dec 7 21:59:54 2022 +0100 Merge tag 'qcom-arm64-for-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt More Qualcomm ARM64 DT updates for 6.2 This introduce description of MSM8956 and MSM8976 and based on this adds Sony Xperia X and X Compact. It adds the SA8540P QDrive 3 automotive development board and enables PCIe on the same. Add description of the Vision Mezzanine for the RB5 board and the Navigation Mezzanine for the SDM845 RB3. SC8280XP adds L3 and DDR scaling support, resulting in good performance improvement. PCIe and UFS is marked DMA coherent, resolving data corruption issues. Reference clocks for UFS phy and device are corrected, to resolve issues seen in combinations with some bootloaders where it's not sufficient to rely on the bootloader state. RTC description is added to the SA8295P ADP board. For SM6115 GPI, PRNG, tsens, WCN, cpufreq, I2C/SPI and display blocks are added. On SM6375 QUP blocks are described, allowing the addition of touchscreen and remoteprocs for ADSP and CDSP are introduced. Sony Xperia 10 IV adds description of regulators, allowing enabling SD-card support. SM8250 Coresight components are described It introduces support for the Xiaomi Mi 6 on MSM8998 and adds flash LED to the Xiaomi Redmi 2. The SDHCI block on SM8350 is described and enabled on Sony Xperia 5 III. SM8450 sound and Soundwire blocks are described, and enabled on HDK. CPU supply clock is described, to satisfy the DT binding and the opp-framework. Sony Xperia 5 IV support is added, with touchscreen added. Lastly a range of changes to align DT source with their bindings. * tag 'qcom-arm64-for-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (98 commits) dt-bindings: iio: adc: qcom,spmi-vadc: fix PM8350 define dt-bindings: iio: adc: qcom,spmi-vadc: extend example arm64: dts: qcom: sc8280xp: fix UFS DMA coherency arm64: dts: qcom: sc7280: Add DT for sc7280-herobrine-zombie arm64: dts: qcom: sm8250-sony-xperia-edo: fix no-mmc property for SDHCI arm64: dts: qcom: sdm845-sony-xperia-tama: fix no-mmc property for SDHCI arm64: dts: qcom: sda660-inforce-ifc6560: fix no-mmc property for SDHCI arm64: dts: qcom: sa8155p-adp: fix no-mmc property for SDHCI arm64: dts: qcom: qrb5165-rb: fix no-mmc property for SDHCI arm64: dts: qcom: sm8450: align MMC node names with dtschema arm64: dts: qcom: sc7180-trogdor: use generic node names arm64: dts: qcom: sm8450-hdk: add sound support arm64: dts: qcom: sm8450: add Soundwire and LPASS arm64: dts: qcom: sm8450: add GPR node arm64: dts: qcom: sa8540p-ride: enable PCIe support arm64: dts: qcom: sm6115: Add smmu fallback to qcom generic compatible arm64: dts: qcom: sm6115: Add WCN node arm64: dts: qcom: sm6115: Add i2c/spi nodes arm64: dts: qcom: sm6115: Add GPI DMA arm64: dts: qcom: sm6115: Add mdss/dpu node ... Link: https://lore.kernel.org/r/20221207152554.3232434-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit c05188c8062d378ca437812a518aa8a72005304b Merge: 7b3e7df92a06 88615cfb3184 Author: Arnd Bergmann Date: Wed Dec 7 21:48:25 2022 +0100 Merge tag 'socfpga_dts_updates_for_v6.2_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into soc/dt SoCFPGA dts updates for v6.2, part 2 - Fix dtschema for LED node - Fix dtschema for i2c-mux * tag 'socfpga_dts_updates_for_v6.2_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: socfpga: Fix pca9548 i2c-mux node name ARM: dts: socfpga: align LED node names with dtschema arm64: dts: altera: align LED node names with dtschema Link: https://lore.kernel.org/r/20221206214006.590562-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 39244cc754829bf707dccd12e2ce37510f5b1f8d Author: Zheyu Ma Date: Fri Jul 29 19:02:16 2022 +0800 i2c: ismt: Fix an out-of-bounds bug in ismt_access() When the driver does not check the data from the user, the variable 'data->block[0]' may be very large to cause an out-of-bounds bug. The following log can reveal it: [ 33.995542] i2c i2c-1: ioctl, cmd=0x720, arg=0x7ffcb3dc3a20 [ 33.995978] ismt_smbus 0000:00:05.0: I2C_SMBUS_BLOCK_DATA: WRITE [ 33.996475] ================================================================== [ 33.996995] BUG: KASAN: out-of-bounds in ismt_access.cold+0x374/0x214b [ 33.997473] Read of size 18446744073709551615 at addr ffff88810efcfdb1 by task ismt_poc/485 [ 33.999450] Call Trace: [ 34.001849] memcpy+0x20/0x60 [ 34.002077] ismt_access.cold+0x374/0x214b [ 34.003382] __i2c_smbus_xfer+0x44f/0xfb0 [ 34.004007] i2c_smbus_xfer+0x10a/0x390 [ 34.004291] i2cdev_ioctl_smbus+0x2c8/0x710 [ 34.005196] i2cdev_ioctl+0x5ec/0x74c Fix this bug by checking the size of 'data->block[0]' first. Fixes: 13f35ac14cd0 ("i2c: Adding support for Intel iSMT SMBus 2.0 host controller") Signed-off-by: Zheyu Ma Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-ismt.c | 3 +++ 1 file changed, 3 insertions(+) commit 2d47b79d2bd39cc6369eccf94a06568d84c906ae Author: Yang Yingliang Date: Sat Oct 29 17:38:25 2022 +0800 i2c: mux: reg: check return value after calling platform_get_resource() It will cause null-ptr-deref in resource_size(), if platform_get_resource() returns NULL, move calling resource_size() after devm_ioremap_resource() that will check 'res' to avoid null-ptr-deref. And use devm_platform_get_and_ioremap_resource() to simplify code. Fixes: b3fdd32799d8 ("i2c: mux: Add register-based mux i2c-mux-reg") Signed-off-by: Yang Yingliang Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-mux-reg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 31720a2b109b3080eb77e97b8f6f50a27b4ae599 Author: Zhang Xiaoxu Date: Tue Oct 18 12:40:07 2022 +0800 orangefs: Fix kmemleak in orangefs_{kernel,client}_debug_init() When insert and remove the orangefs module, there are memory leaked as below: unreferenced object 0xffff88816b0cc000 (size 2048): comm "insmod", pid 783, jiffies 4294813439 (age 65.512s) hex dump (first 32 bytes): 6e 6f 6e 65 0a 00 00 00 00 00 00 00 00 00 00 00 none............ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000031ab7788>] kmalloc_trace+0x27/0xa0 [<000000005b405fee>] orangefs_debugfs_init.cold+0xaf/0x17f [<00000000e5a0085b>] 0xffffffffa02780f9 [<000000004232d9f7>] do_one_initcall+0x87/0x2a0 [<0000000054f22384>] do_init_module+0xdf/0x320 [<000000003263bdea>] load_module+0x2f98/0x3330 [<0000000052cd4153>] __do_sys_finit_module+0x113/0x1b0 [<00000000250ae02b>] do_syscall_64+0x35/0x80 [<00000000f11c03c7>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 Use the golbal variable as the buffer rather than dynamic allocate to slove the problem. Signed-off-by: Zhang Xiaoxu Signed-off-by: Mike Marshall fs/orangefs/orangefs-debugfs.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) commit 1f2c0e8a587bcafad85019a2d80f158d8d41a868 Author: Zhang Xiaoxu Date: Tue Oct 18 12:40:06 2022 +0800 orangefs: Fix kmemleak in orangefs_sysfs_init() When insert and remove the orangefs module, there are kobjects memory leaked as below: unreferenced object 0xffff88810f95af00 (size 64): comm "insmod", pid 783, jiffies 4294813439 (age 65.512s) hex dump (first 32 bytes): a0 83 af 01 81 88 ff ff 08 af 95 0f 81 88 ff ff ................ 08 af 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000031ab7788>] kmalloc_trace+0x27/0xa0 [<000000005a6e4dfe>] orangefs_sysfs_init+0x42/0x3a0 [<00000000722645ca>] 0xffffffffa02780fe [<000000004232d9f7>] do_one_initcall+0x87/0x2a0 [<0000000054f22384>] do_init_module+0xdf/0x320 [<000000003263bdea>] load_module+0x2f98/0x3330 [<0000000052cd4153>] __do_sys_finit_module+0x113/0x1b0 [<00000000250ae02b>] do_syscall_64+0x35/0x80 [<00000000f11c03c7>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 unreferenced object 0xffff88810f95ae80 (size 64): comm "insmod", pid 783, jiffies 4294813439 (age 65.512s) hex dump (first 32 bytes): c8 90 0f 02 81 88 ff ff 88 ae 95 0f 81 88 ff ff ................ 88 ae 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000031ab7788>] kmalloc_trace+0x27/0xa0 [<000000001a4841fa>] orangefs_sysfs_init+0xc7/0x3a0 [<00000000722645ca>] 0xffffffffa02780fe [<000000004232d9f7>] do_one_initcall+0x87/0x2a0 [<0000000054f22384>] do_init_module+0xdf/0x320 [<000000003263bdea>] load_module+0x2f98/0x3330 [<0000000052cd4153>] __do_sys_finit_module+0x113/0x1b0 [<00000000250ae02b>] do_syscall_64+0x35/0x80 [<00000000f11c03c7>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 unreferenced object 0xffff88810f95ae00 (size 64): comm "insmod", pid 783, jiffies 4294813440 (age 65.511s) hex dump (first 32 bytes): 60 87 a1 00 81 88 ff ff 08 ae 95 0f 81 88 ff ff `............... 08 ae 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000031ab7788>] kmalloc_trace+0x27/0xa0 [<000000005915e797>] orangefs_sysfs_init+0x12b/0x3a0 [<00000000722645ca>] 0xffffffffa02780fe [<000000004232d9f7>] do_one_initcall+0x87/0x2a0 [<0000000054f22384>] do_init_module+0xdf/0x320 [<000000003263bdea>] load_module+0x2f98/0x3330 [<0000000052cd4153>] __do_sys_finit_module+0x113/0x1b0 [<00000000250ae02b>] do_syscall_64+0x35/0x80 [<00000000f11c03c7>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 unreferenced object 0xffff88810f95ad80 (size 64): comm "insmod", pid 783, jiffies 4294813440 (age 65.511s) hex dump (first 32 bytes): 78 90 0f 02 81 88 ff ff 88 ad 95 0f 81 88 ff ff x............... 88 ad 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000031ab7788>] kmalloc_trace+0x27/0xa0 [<000000007a14eb35>] orangefs_sysfs_init+0x1ac/0x3a0 [<00000000722645ca>] 0xffffffffa02780fe [<000000004232d9f7>] do_one_initcall+0x87/0x2a0 [<0000000054f22384>] do_init_module+0xdf/0x320 [<000000003263bdea>] load_module+0x2f98/0x3330 [<0000000052cd4153>] __do_sys_finit_module+0x113/0x1b0 [<00000000250ae02b>] do_syscall_64+0x35/0x80 [<00000000f11c03c7>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 unreferenced object 0xffff88810f95ac00 (size 64): comm "insmod", pid 783, jiffies 4294813440 (age 65.531s) hex dump (first 32 bytes): e0 ff 67 02 81 88 ff ff 08 ac 95 0f 81 88 ff ff ..g............. 08 ac 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000031ab7788>] kmalloc_trace+0x27/0xa0 [<000000001f38adcb>] orangefs_sysfs_init+0x291/0x3a0 [<00000000722645ca>] 0xffffffffa02780fe [<000000004232d9f7>] do_one_initcall+0x87/0x2a0 [<0000000054f22384>] do_init_module+0xdf/0x320 [<000000003263bdea>] load_module+0x2f98/0x3330 [<0000000052cd4153>] __do_sys_finit_module+0x113/0x1b0 [<00000000250ae02b>] do_syscall_64+0x35/0x80 [<00000000f11c03c7>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 unreferenced object 0xffff88810f95ab80 (size 64): comm "insmod", pid 783, jiffies 4294813441 (age 65.530s) hex dump (first 32 bytes): 50 bf 2f 02 81 88 ff ff 88 ab 95 0f 81 88 ff ff P./............. 88 ab 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000031ab7788>] kmalloc_trace+0x27/0xa0 [<000000009cc7d95b>] orangefs_sysfs_init+0x2f5/0x3a0 [<00000000722645ca>] 0xffffffffa02780fe [<000000004232d9f7>] do_one_initcall+0x87/0x2a0 [<0000000054f22384>] do_init_module+0xdf/0x320 [<000000003263bdea>] load_module+0x2f98/0x3330 [<0000000052cd4153>] __do_sys_finit_module+0x113/0x1b0 [<00000000250ae02b>] do_syscall_64+0x35/0x80 [<00000000f11c03c7>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 Should add release function for each kobject_type to free the memory. Signed-off-by: Zhang Xiaoxu Signed-off-by: Mike Marshall fs/orangefs/orangefs-sysfs.c | 71 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 8 deletions(-) commit d23417a5bf3a3afc55de5442eb46e1e60458b0a1 Author: Zhang Xiaoxu Date: Tue Oct 18 12:40:05 2022 +0800 orangefs: Fix kmemleak in orangefs_prepare_debugfs_help_string() When insert and remove the orangefs module, then debug_help_string will be leaked: unreferenced object 0xffff8881652ba000 (size 4096): comm "insmod", pid 1701, jiffies 4294893639 (age 13218.530s) hex dump (first 32 bytes): 43 6c 69 65 6e 74 20 44 65 62 75 67 20 4b 65 79 Client Debug Key 77 6f 72 64 73 20 61 72 65 20 75 6e 6b 6e 6f 77 words are unknow backtrace: [<0000000004e6f8e3>] kmalloc_trace+0x27/0xa0 [<0000000006f75d85>] orangefs_prepare_debugfs_help_string+0x5e/0x480 [orangefs] [<0000000091270a2a>] _sub_I_65535_1+0x57/0xf70 [crc_itu_t] [<000000004b1ee1a3>] do_one_initcall+0x87/0x2a0 [<000000001d0614ae>] do_init_module+0xdf/0x320 [<00000000efef068c>] load_module+0x2f98/0x3330 [<000000006533b44d>] __do_sys_finit_module+0x113/0x1b0 [<00000000a0da6f99>] do_syscall_64+0x35/0x80 [<000000007790b19b>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 When remove the module, should always free debug_help_string. Should always free the allocated buffer when change the free_debug_help_string. Signed-off-by: Zhang Xiaoxu Signed-off-by: Mike Marshall fs/orangefs/orangefs-debugfs.c | 3 +++ 1 file changed, 3 insertions(+) commit ea60a4ad0cf88b411cde6888b8c890935686ecd7 Author: Zhang Xiaoxu Date: Tue Oct 18 12:40:04 2022 +0800 orangefs: Fix sysfs not cleanup when dev init failed When the dev init failed, should cleanup the sysfs, otherwise, the module will never be loaded since can not create duplicate sysfs directory: sysfs: cannot create duplicate filename '/fs/orangefs' CPU: 1 PID: 6549 Comm: insmod Tainted: G W 6.0.0+ #44 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014 Call Trace: dump_stack_lvl+0x34/0x44 sysfs_warn_dup.cold+0x17/0x24 sysfs_create_dir_ns+0x16d/0x180 kobject_add_internal+0x156/0x3a0 kobject_init_and_add+0xcf/0x120 orangefs_sysfs_init+0x7e/0x3a0 [orangefs] orangefs_init+0xfe/0x1000 [orangefs] do_one_initcall+0x87/0x2a0 do_init_module+0xdf/0x320 load_module+0x2f98/0x3330 __do_sys_finit_module+0x113/0x1b0 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 kobject_add_internal failed for orangefs with -EEXIST, don't try to register things with the same name in the same directory. Fixes: 2f83ace37181 ("orangefs: put register_chrdev immediately before register_filesystem") Signed-off-by: Zhang Xiaoxu Signed-off-by: Mike Marshall fs/orangefs/orangefs-mod.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 610defdccff7b955fe899a825990c2202153a22e Author: Colin Ian King Date: Mon Oct 17 22:49:37 2022 +0100 orangefs: remove redundant assignment to variable buffer_index The variable buffer_index is assigned a value that is never read, it is assigned just before the function returns. The assignment is redundant and can be removed. Cleans up clang scan build warning: fs/orangefs/file.c:276:3: warning: Value stored to 'buffer_index' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Signed-off-by: Mike Marshall fs/orangefs/file.c | 1 - 1 file changed, 1 deletion(-) commit b3525072835b523b397d459fadd0785d9c24bbd1 Author: Colin Ian King Date: Mon Oct 24 14:29:39 2022 +0100 orangefs: remove variable i Variable i is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Signed-off-by: Mike Marshall fs/orangefs/inode.c | 2 -- 1 file changed, 2 deletions(-) commit 7cb092a0336c5770656c6742e7a7ce3042c8c44e Author: Krzysztof Kozlowski Date: Tue Aug 30 11:36:25 2022 +0300 leds: MAINTAINERS: include dt-bindings headers Include the Devicetree binding headers in LED SUBSYSTEM entry. Signed-off-by: Krzysztof Kozlowski Acked-by: Alexander Dahl Signed-off-by: Pavel Machek MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6afd8bd5db7c5f734f24a2df8c1093df9f2ec38f Author: Krzysztof Kozlowski Date: Thu Dec 1 14:15:05 2022 +0100 leds: qcom,pm8058-led: Convert to DT schema Convert the Qualcomm PM8058 PMIC LED bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Pavel Machek .../devicetree/bindings/leds/leds-pm8058.txt | 67 ---------------------- .../devicetree/bindings/leds/qcom,pm8058-led.yaml | 57 ++++++++++++++++++ .../devicetree/bindings/mfd/qcom-pm8xxx.yaml | 4 ++ 3 files changed, 61 insertions(+), 67 deletions(-) commit 3f6fb1cfaf30d0d701d877ffacfd88dd6bcc5841 Author: ye xingchen Date: Thu Dec 1 16:11:24 2022 +0800 leds: use sysfs_emit() to instead of scnprintf() Replace the open-code with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen Signed-off-by: Pavel Machek drivers/leds/leds-blinkm.c | 8 ++++---- drivers/leds/leds-lm3533.c | 12 ++++++------ drivers/leds/leds-lp5521.c | 2 +- drivers/leds/leds-lp55xx-common.c | 4 ++-- drivers/leds/trigger/ledtrig-pattern.c | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) commit 1da681e52853f0abfbfff8c69833d31e538ff9c0 Author: Chancel Liu Date: Mon Nov 28 14:09:50 2022 +0800 ASoC: soc-pcm.c: Clear DAIs parameters after stream_active is updated DAIs parameters should be cleared if there's no active stream. Before, we implemented it in soc_pcm_hw_free() by detecting stream_active. If the running stream is the last active stream, we're going to clear parameters. However it will cause DAIs parameters never be cleared if there're more than one stream. For example, we have stream1 and stream2 about to stop. stream2 executes soc_pcm_hw_free() before stream1 executes soc_pcm_close(). At the moment, stream2 should clear DAIs parameters. Since stream_active is not yet updated by stream1 in soc_pcm_close(), stream2 will not clear DAIs parameters. In result both stream1 and stream2 don't clear the parameters. This patch moves DAIs parameters cleanup after stream_active is updated. Signed-off-by: Chancel Liu Link: https://lore.kernel.org/r/20221128060950.3540845-1-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 169a58ad824d896b9e291a27193342616e651b82 Author: Stephen Boyd Date: Tue Dec 6 13:53:18 2022 -0800 module/decompress: Support zstd in-kernel decompression Add support for zstd compressed modules to the in-kernel decompression code. This allows zstd compressed modules to be decompressed by the kernel, similar to the existing support for gzip and xz compressed modules. Cc: Dmitry Torokhov Cc: Piotr Gorski Cc: Nick Terrell Signed-off-by: Stephen Boyd Reviewed-by: Dmitry Torokhov Reviewed-by: Piotr Gorski Signed-off-by: Luis Chamberlain kernel/module/Kconfig | 3 +- kernel/module/decompress.c | 92 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 92 insertions(+), 3 deletions(-) commit 810199f7315604bd969409109f1c96b4ebe772ad Author: Uwe Kleine-König Date: Wed Oct 19 22:28:08 2022 +0200 i2c: xiic: Make sure to disable clock on .remove() If for whatever reasons pm_runtime_resume_and_get() failed, .remove() is exited early, the clock isn't freed and runtime PM state isn't reset. The right thing to do however is to free all resources that don't need HW access after a problem with runtime PM. Also issue a warning in that case and return 0 to suppress a less helpful warning by the driver core. Signed-off-by: Uwe Kleine-König Acked-by: Michal Simek Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xiic.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 3256412fc57b6cabbc1cf1317d020e42f6d7aeab Author: Weilong Chen Date: Tue Nov 8 09:58:11 2022 +0800 i2c: hisi: Add support to get clock frequency from clock The clk_rate attribute is not generic device tree bindings for I2C busses described in Documentation/devicetree/bindings/i2c/i2c.txt. It can be managed by clock binding. Support the driver to obtain clock information by clk_rate or clock property. Find clock first, if not, fall back to clk_rate. Signed-off-by: Weilong Chen Acked-by: Yicong Yang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-hisi.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 135780f1048b3f956f5b10bb23dec9c2d2c4ef6d Author: Luca Weiss Date: Tue Nov 29 22:29:01 2022 +0100 leds: is31fl319x: Fix setting current limit for is31fl319{0,1,3} The current setting lives in bits 4:2 (as also defined by the mask) but the current limit defines in the driver use bits 2:0 which should be shifted over so they don't get masked out completely (except for 17.5mA which became 10mA). Now checking /sys/kernel/debug/regmap/1-0068/registers shows that the current limit is applied correctly and doesn't take the default b000 = 42mA. Fixes: fa877cf1abb9 ("leds: is31fl319x: Add support for is31fl319{0,1,3} chips") Signed-off-by: Luca Weiss Reviewed-by: Vincent Knecht Signed-off-by: Pavel Machek drivers/leds/leds-is31fl319x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 447242e1292e8aa22e1371110867b9c543bf0373 Author: Lee Jones Date: Tue Dec 6 10:45:10 2022 +0000 MAINTAINERS: Add additional co-maintainer to LEDs Add myself as co-maintainer for the LED subsystem, in support of Pavel during busy times. Suggested-by: Pavel Machek Signed-off-by: Lee Jones Acked-by: Krzysztof Kozlowski Acked-by: Andy Shevchenko Signed-off-by: Pavel Machek MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 8f415307c3ca14081b510ec4ab827df9d920c5ee Merge: c34b7ac65087 19b00e0069a3 Author: Jens Axboe Date: Wed Dec 7 12:39:37 2022 -0700 Merge tag 'nvme-6.2-2022-12-07' of git://git.infradead.org/nvme into for-6.2/block Pull NVMe updates from Christoph: "nvme updates for Linux 6.2 - fix and cleanup nvme-fc req allocation (Chaitanya Kulkarni) - use the common tagset helpers in nvme-pci driver (Christoph Hellwig) - cleanup the nvme-pci removal path (Christoph Hellwig) - use kstrtobool() instead of strtobool (Christophe JAILLET) - allow unprivileged passthrough of Identify Controller (Joel Granados) - support io stats on the mpath device (Sagi Grimberg) - minor nvmet cleanup (Sagi Grimberg)" * tag 'nvme-6.2-2022-12-07' of git://git.infradead.org/nvme: (22 commits) nvmet: don't open-code NVME_NS_ATTR_RO enumeration nvme-pci: use the tagset alloc/free helpers nvme: add the Apple shared tag workaround to nvme_alloc_io_tag_set nvme: only set reserved_tags in nvme_alloc_io_tag_set for fabrics controllers nvme: consolidate setting the tagset flags nvme: pass nr_maps explicitly to nvme_alloc_io_tag_set nvme-pci: split out a nvme_pci_ctrl_is_dead helper nvme-pci: return early on ctrl state mismatch in nvme_reset_work nvme-pci: rename nvme_disable_io_queues nvme-pci: cleanup nvme_suspend_queue nvme-pci: remove nvme_pci_disable nvme-pci: remove nvme_disable_admin_queue nvme: merge nvme_shutdown_ctrl into nvme_disable_ctrl nvme: use nvme_wait_ready in nvme_shutdown_ctrl nvme-apple: fix controller shutdown in apple_nvme_disable nvme-fc: move common code into helper nvme-fc: avoid null pointer dereference nvme: allow unprivileged passthrough of Identify Controller nvme-multipath: support io stats on the mpath device nvme: introduce nvme_start_request ... commit a37dac5c5dcfe0f1fd58513c16cdbc280a47f628 Author: Ard Biesheuvel Date: Mon Dec 5 09:10:17 2022 +0100 arm64: efi: Limit allocations to 48-bit addressable physical region The UEFI spec does not mention or reason about the configured size of the virtual address space at all, but it does mention that all memory should be identity mapped using a page size of 4 KiB. This means that a LPA2 capable system that has any system memory outside of the 48-bit addressable physical range and follows the spec to the letter may serve page allocation requests from regions of memory that the kernel cannot access unless it was built with LPA2 support and enables it at runtime. So let's ensure that all page allocations are limited to the 48-bit range. Signed-off-by: Ard Biesheuvel arch/arm64/include/asm/efi.h | 1 + drivers/firmware/efi/libstub/alignedmem.c | 2 ++ drivers/firmware/efi/libstub/arm64-stub.c | 5 +++-- drivers/firmware/efi/libstub/efistub.h | 4 ++++ drivers/firmware/efi/libstub/mem.c | 2 ++ drivers/firmware/efi/libstub/randomalloc.c | 2 +- 6 files changed, 13 insertions(+), 3 deletions(-) commit 11c7f9e3131ad14b27a957496088fa488b153a48 Author: Maria Yu Date: Tue Dec 6 09:59:57 2022 +0800 remoteproc: core: Do pm_relax when in RPROC_OFFLINE state Make sure that pm_relax() happens even when the remoteproc is stopped before the crash handler work is scheduled. Signed-off-by: Maria Yu Cc: stable Fixes: a781e5aa5911 ("remoteproc: core: Prevent system suspend during remoteproc recovery") Link: https://lore.kernel.org/r/20221206015957.2616-2-quic_aiquny@quicinc.com Signed-off-by: Mathieu Poirier drivers/remoteproc/remoteproc_core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit d9f26ae731259c8fb2d62a742c64e454996944a8 Merge: 29636a5ce87b 76dcd734eca2 Author: Ard Biesheuvel Date: Mon Dec 5 09:32:11 2022 +0100 Merge tag 'v6.1-rc8' into efi/next Linux 6.1-rc8 commit 81ed7d9de18768fe0cb3d74a7a163a8c082e1346 Author: Jiapeng Chong Date: Mon Dec 5 15:35:07 2022 +0800 ASoC: codecs: wcd-clsh: Remove the unused function The function wcd_clsh_set_buck_mode() is defined in the wcd-clsh-v2.c file, but not called elsewhere, so remove this unused function. sound/soc/codecs/wcd-clsh-v2.c:133:20: warning: unused function 'wcd_clsh_enable_status'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3348 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20221205073507.36071-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown sound/soc/codecs/wcd-clsh-v2.c | 6 ------ 1 file changed, 6 deletions(-) commit 122d851b07116b30fbee99281d907c33a43f57c9 Merge: 4f143eca5155 47d2b66fec13 Author: Mark Brown Date: Wed Dec 7 17:24:53 2022 +0000 ASoC: Intel: boards: updates for SOF boards Merge series from Pierre-Louis Bossart : One new JasperLake configuration, core refactoring between RT1316 and RT1318 and a minor uninitialized variable corner case. commit 4f143eca515534f08915caba40517b665a622f90 Merge: 38eef3be38ab 451d85c46cf7 Author: Mark Brown Date: Wed Dec 7 17:24:46 2022 +0000 ASoC: Intel: Skylake: Topology and shutdown fixes Merge series from Cezary Rojewski : Even though skylake-driver is going to be replaced by the avs-driver, the goal is to keep it functional on all the configurations it supports until its EOL. When comparing chrome trees against upstream skylake-driver, couple fixes pop up that are not part of upstream repository. These fixes are backed up by real bugs (issue trackers), address real problems. There is no reason for them to stay in the internal tree. Patches 1-4 combined together address issue where the driver updates the presumably static audio format descriptions coming from the topology files through its "fixup" functions. As long as given audio format is used by a single path, nothing collides and any updates are harmless. However, when multiple paths e.g.: DMIC and HDMI1 utilize the same audio format descriptor, any updates caused by the opening of the first path, may cause the second to fail. The 5th change from the set fixes driver hang sporadically occurring during shutdown procedure. Once HDAudio links are powered down along with the AudioDSP, the hang stops reproducing. The last change helps survive in environments with limited/fragmented memory. While the BDL is small already, other buffers can be allocated using scatter-gather. This basically aligns the code with what the avs-driver does. commit dbfa44782787dc90460bae8b500708ec83e0f611 Author: Rafael J. Wysocki Date: Mon Dec 5 19:54:59 2022 +0100 PM: runtime: Adjust white space in the core code Some inconsistent usage of white space in the PM-runtime core code causes that code to be somewhat harder to read that it would have been otherwise, so adjust the white space in there to be more consistent with the rest of the code. No expected functional impact. Signed-off-by: Rafael J. Wysocki drivers/base/power/runtime.c | 69 ++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 34 deletions(-) commit 87386ee83dc2b241eab69239f9cc82fa7fb4171c Author: Jay Lu Date: Tue Dec 6 14:52:33 2022 -0600 ACPI: APEI: EINJ: Refactor available_error_type_show() Move error type descriptions into an array and loop over error types to improve readability and maintainability. Replace seq_printf() with seq_puts() as recommended by checkpatch.pl. Signed-off-by: Jay Lu Co-developed-by: Ben Cheatham Signed-off-by: Ben Cheatham Reviewed-by: Tony Luck Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/einj.c | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) commit 37ea9693869627df5b15cbd4d67237e17f806be4 Author: Jay Lu Date: Tue Dec 6 14:52:32 2022 -0600 ACPI: APEI: EINJ: Fix formatting errors Checkpatch reveals warnings and an error due to missing lines and incorrect indentations. Add the missing lines after declarations and fix the suspect indentations. Signed-off-by: Jay Lu Signed-off-by: Ben Cheatham Reviewed-by: Tony Luck Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/einj.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit f1a70bac90cafd1b20a747b6dcc49d3a79050626 Author: Rafael J. Wysocki Date: Mon Dec 5 20:08:00 2022 +0100 ACPI: processor: perflib: Adjust acpi_processor_notify_smm() return value Avoid returning a confusing error code from acpi_processor_notify_smm() if it is called for the second time in the case when SMM notification regarding P-state control is not supported. Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_perflib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit be5c8a046caaa295b6151b7a6653070ff8119ac2 Author: Rafael J. Wysocki Date: Mon Dec 5 20:07:08 2022 +0100 ACPI: processor: perflib: Rearrange acpi_processor_notify_smm() Rearrange the code in acpi_processor_notify_smm() to consolidate error handling in it and improve the comments in there while at it. No expected functional impact. Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_perflib.c | 52 +++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 27 deletions(-) commit 5be583c695ed4d94211cc28282a42092b137f988 Author: Rafael J. Wysocki Date: Mon Dec 5 20:05:55 2022 +0100 ACPI: processor: perflib: Rearrange unregistration routine Rearrange acpi_processor_unregister_performance() to follow a more common error handling pattern and drop a redundant "return" statement from the end of it. No expected functional impact. Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_perflib.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit d8f4ed072817cce79aef90926a4187954e1548fd Author: Rafael J. Wysocki Date: Mon Dec 5 20:04:59 2022 +0100 ACPI: processor: perflib: Drop redundant parentheses Drop some redundant parentheses and rearrange some checks using them in the ACPI processor performance library code for better code clarity. No expected functional impact. Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_perflib.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 3d9e9a96ca18ec1c9e15b908c1b42d80fd0676ca Author: Rafael J. Wysocki Date: Mon Dec 5 20:03:30 2022 +0100 ACPI: processor: perflib: Adjust white space Some inconsistent usage of white space in the ACPI processor performance library code causes that code to be somewhat harder to read that it would have been otherwise, so adjust the white space in there to address that. No expected functional impact. Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_perflib.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit b697b812d455b7917a0a31db91ae8a0863b35934 Author: Rafael J. Wysocki Date: Mon Dec 5 19:58:25 2022 +0100 ACPI: processor: idle: Drop unnecessary statements and parens Drop a redundant "else", a "return" statement at the end of a void function and redundant parentheses around an unsigent int variable name from the ACPI processor idle driver. No expected functional impact. Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_idle.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 57336224da8340fd503e1cc325cc9e0875ccc9a6 Author: Rafael J. Wysocki Date: Mon Dec 5 19:56:14 2022 +0100 ACPI: thermal: Adjust critical.flags.valid check It is not necessary to compare critical.flags.valid to 1 in acpi_thermal_trips_update() and doing so is also inconsistent with other similar checks in that code, so simply check if the flag is not 0 instead. No expected functional impact. Signed-off-by: Rafael J. Wysocki drivers/acpi/thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3178804c64ef7c8c87a53cd5bba0b2942dd64fec Merge: b2ea130c2541 a14e84dbce2e Author: Mauro Carvalho Chehab Date: Tue Dec 6 07:28:26 2022 +0000 Merge tag 'br-v6.2i' of git://linuxtv.org/hverkuil/media_tree into media_stage Tag branch Signed-off-by: Mauro Carvalho Chehab * tag 'br-v6.2i' of git://linuxtv.org/hverkuil/media_tree: (31 commits) media: s5c73m3: Switch to GPIO descriptors media: i2c: s5k5baf: switch to using gpiod API media: i2c: s5k6a3: switch to using gpiod API media: imx: remove code for non-existing config IMX_GPT_ICAP media: si470x: Fix use-after-free in si470x_int_in_callback() media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies media: coda: Add check for kmalloc media: coda: Add check for dcoda_iram_alloc dt-bindings: media: s5c73m3: Fix reset-gpio descriptor media: dt-bindings: allwinner: h6-vpu-g2: Add IOMMU reference property media: s5k4ecgx: Delete driver media: s5k4ecgx: Switch to GPIO descriptors media: Switch to use dev_err_probe() helper headers: Remove some left-over license text in include/uapi/linux/v4l2-* headers: Remove some left-over license text in include/uapi/linux/dvb/ media: usb: pwc-uncompress: Use flex array destination for memcpy() media: s5p-mfc: Fix to handle reference queue during finishing media: s5p-mfc: Clear workbit to handle error condition media: s5p-mfc: Fix in register read and write for H264 media: imx: Use get_mbus_config instead of parsing upstream DT endpoints ... commit a14e84dbce2eeebde5e9aacd8bb49e85c1e1a067 Author: Linus Walleij Date: Tue Nov 8 11:06:04 2022 +0100 media: s5c73m3: Switch to GPIO descriptors The driver has an option to pass in GPIO numbers from platform data but this is not used in the kernel so delete this. Get GPIO descriptors using the standard API and simplify the code, gpiolib will handle any inversions. Cc: Sylwester Nawrocki Cc: Andrzej Hajda Cc: Alim Akhtar Reviewed-by: Andrzej Hajda Acked-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Signed-off-by: Hans Verkuil drivers/media/i2c/s5c73m3/s5c73m3-core.c | 107 ++++++------------------------ drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c | 1 - drivers/media/i2c/s5c73m3/s5c73m3.h | 10 +-- include/media/i2c/s5c73m3.h | 15 ----- 4 files changed, 23 insertions(+), 110 deletions(-) commit 4220dd61e7e9b979fd96695ab7c98ea7a5f64c3f Author: Dmitry Torokhov Date: Tue Nov 15 14:11:43 2022 -0800 media: i2c: s5k5baf: switch to using gpiod API This patch switches the driver away from legacy gpio/of_gpio API to gpiod API, and removes use of of_get_named_gpio_flags() which I want to make private to gpiolib. Reviewed-by: Linus Walleij Signed-off-by: Dmitry Torokhov Reviewed-by: Tommaso Merciai Signed-off-by: Hans Verkuil drivers/media/i2c/s5k5baf.c | 64 +++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 46 deletions(-) commit 87b5aeeb49980fb0c10a4d1b6590066e96f4801b Author: Dmitry Torokhov Date: Tue Nov 15 14:11:42 2022 -0800 media: i2c: s5k6a3: switch to using gpiod API This patch switches the driver away from legacy gpio/of_gpio API to gpiod API, and removes one of the last uses of of_get_gpio_flags(). Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Reviewed-by: Tommaso Merciai Signed-off-by: Hans Verkuil drivers/media/i2c/s5k6a3.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) commit 932d87c6eaa18469fbb51dd67a8ff0f09ea2c0d8 Author: Lukas Bulwahn Date: Wed Nov 23 08:52:16 2022 +0100 media: imx: remove code for non-existing config IMX_GPT_ICAP There never was a config IMX_GPT_ICAP in the repository. So remove the code conditional on this config and simplify the callers that just called empty functions. Signed-off-by: Lukas Bulwahn Reviewed-by: Tommaso Merciai Signed-off-by: Hans Verkuil drivers/staging/media/imx/imx-media-fim.c | 57 +------------------------------ 1 file changed, 1 insertion(+), 56 deletions(-) commit 7d21e0b1b41b21d628bf2afce777727bd4479aa5 Author: Shigeru Yoshida Date: Wed Nov 23 03:51:59 2022 +0900 media: si470x: Fix use-after-free in si470x_int_in_callback() syzbot reported use-after-free in si470x_int_in_callback() [1]. This indicates that urb->context, which contains struct si470x_device object, is freed when si470x_int_in_callback() is called. The cause of this issue is that si470x_int_in_callback() is called for freed urb. si470x_usb_driver_probe() calls si470x_start_usb(), which then calls usb_submit_urb() and si470x_start(). If si470x_start_usb() fails, si470x_usb_driver_probe() doesn't kill urb, but it just frees struct si470x_device object, as depicted below: si470x_usb_driver_probe() ... si470x_start_usb() ... usb_submit_urb() retval = si470x_start() return retval if (retval < 0) free struct si470x_device object, but don't kill urb This patch fixes this issue by killing urb when si470x_start_usb() fails and urb is submitted. If si470x_start_usb() fails and urb is not submitted, i.e. submitting usb fails, it just frees struct si470x_device object. Reported-by: syzbot+9ca7a12fd736d93e0232@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=94ed6dddd5a55e90fd4bab942aa4bb297741d977 [1] Signed-off-by: Shigeru Yoshida Signed-off-by: Hans Verkuil drivers/media/radio/si470x/radio-si470x-usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit faaf901727eddcfbe889fe172ec9cdb5e63c8236 Author: Geert Uytterhoeven Date: Mon Nov 21 16:58:33 2022 +0100 media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies By moving support for the USB Syntek DC1125 Camera to staging, the dependencies on MEDIA_USB_SUPPORT and MEDIA_CAMERA_SUPPORT were lost. Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging") Signed-off-by: Geert Uytterhoeven Reviewed-by: Ricardo Ribalda Signed-off-by: Hans Verkuil drivers/staging/media/deprecated/stkwebcam/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e5e5defdb8b0186312c2f855ace175aee6daf9b Author: Jiasheng Jiang Date: Thu Nov 17 15:02:36 2022 +0800 media: coda: Add check for kmalloc As the kmalloc may return NULL pointer, it should be better to check the return value in order to avoid NULL poineter dereference, same as the others. Fixes: cb1d3a336371 ("[media] coda: add CODA7541 JPEG support") Signed-off-by: Jiasheng Jiang Signed-off-by: Hans Verkuil drivers/media/platform/chips-media/coda-bit.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6b8082238fb8bb20f67e46388123e67a5bbc558d Author: Jiasheng Jiang Date: Thu Nov 17 14:56:52 2022 +0800 media: coda: Add check for dcoda_iram_alloc As the coda_iram_alloc may return NULL pointer, it should be better to check the return value in order to avoid NULL poineter dereference, same as the others. Fixes: b313bcc9a467 ("[media] coda: simplify IRAM setup") Signed-off-by: Jiasheng Jiang Signed-off-by: Hans Verkuil drivers/media/platform/chips-media/coda-bit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a8a0bc8106a10681069b887e6f15304ce77b7ea3 Author: Maíra Canal Date: Wed Nov 16 16:43:07 2022 -0300 dt-bindings: media: s5c73m3: Fix reset-gpio descriptor The reset-gpios is described as xshutdown-gpios on the required properties, as it is on the driver. Despite that, the device tree example set the property 'reset-gpios' instead of the property 'xshutdown-gpios'. Therefore, this patch updates the example to match the property specified on the driver. Acked-by: Krzysztof Kozlowski Signed-off-by: Maíra Canal Signed-off-by: Hans Verkuil Documentation/devicetree/bindings/media/samsung-s5c73m3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e895d62188d2cc916e342c603fba87e892b881b0 Author: Chen-Yu Tsai Date: Tue Nov 15 17:06:43 2022 +0800 media: dt-bindings: allwinner: h6-vpu-g2: Add IOMMU reference property The Hantro G2 video decoder block sits behind an IOMMU. The device tree binding needs a property to reference it. Without a reference for the implementation to properly configure the IOMMU, it will fault and cause the video decoder to fail. Add an "iommus" property for referring to the IOMMU port. The master ID in the example is taken from the IOMMU fault error message on Linux, and the number seems to match the order in the user manual's IOMMU diagram. Fixes: fd6be12716c4 ("media: dt-bindings: allwinner: document H6 Hantro G2 binding") Signed-off-by: Chen-Yu Tsai Acked-by: Krzysztof Kozlowski Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil .../devicetree/bindings/media/allwinner,sun50i-h6-vpu-g2.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 5e2ac9aac774f9d7ec405c7bbb48656204a6b8a7 Author: Linus Walleij Date: Tue Nov 8 20:53:28 2022 +0100 media: s5k4ecgx: Delete driver This driver was until the previous patch unused in the kernel and depended on platform data that no board was defining. As no users can be proven to exist, delete the driver. Cc: Sylwester Nawrocki Cc: Andrzej Hajda Cc: Krzysztof Kozlowski Cc: Alim Akhtar Cc: Dmitry Torokhov Suggested-by: Dmitry Torokhov Signed-off-by: Linus Walleij Reviewed-by: Dmitry Torokhov Signed-off-by: Hans Verkuil drivers/media/i2c/Kconfig | 10 - drivers/media/i2c/Makefile | 1 - drivers/media/i2c/s5k4ecgx.c | 954 ------------------------------------------- 3 files changed, 965 deletions(-) commit c3093bdc6bc37f979b6966cb48225657405d84ec Author: Linus Walleij Date: Tue Nov 8 20:53:27 2022 +0100 media: s5k4ecgx: Switch to GPIO descriptors The driver has an option to pass in GPIO numbers from platform data but this is not used in the kernel so delete this and the whole platform data mechanism. Get GPIO descriptors using the standard API and simplify the code, gpiolib will handle any inversions. Cc: Sylwester Nawrocki Cc: Andrzej Hajda Cc: Krzysztof Kozlowski Cc: Alim Akhtar Cc: Dmitry Torokhov Reviewed-by: Andrzej Hajda Reviewed-by: Tommaso Merciai Signed-off-by: Linus Walleij Reviewed-by: Dmitry Torokhov Signed-off-by: Hans Verkuil drivers/media/i2c/s5k4ecgx.c | 127 +++++++++---------------------------------- include/media/i2c/s5k4ecgx.h | 33 ----------- 2 files changed, 25 insertions(+), 135 deletions(-) commit 6cb7d1b3ff83e98e852db9739892c4643a31804b Author: Yang Yingliang Date: Mon Sep 19 23:58:43 2022 +0800 media: 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. Reviewed-by: Sean Young Reviewed-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Yang Yingliang Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil drivers/media/cec/platform/stm32/stm32-cec.c | 9 +++----- drivers/media/i2c/ad5820.c | 18 +++++---------- drivers/media/i2c/imx274.c | 5 ++-- drivers/media/i2c/tc358743.c | 9 +++----- drivers/media/platform/mediatek/mdp/mtk_mdp_comp.c | 5 ++-- .../media/platform/samsung/exynos4-is/media-dev.c | 4 +--- drivers/media/platform/st/stm32/stm32-dcmi.c | 27 ++++++++-------------- drivers/media/platform/ti/omap3isp/isp.c | 3 +-- drivers/media/platform/xilinx/xilinx-csi2rxss.c | 8 +++---- drivers/media/rc/gpio-ir-recv.c | 10 +++----- drivers/media/rc/gpio-ir-tx.c | 9 +++----- drivers/media/rc/ir-rx51.c | 9 ++------ drivers/media/usb/uvc/uvc_driver.c | 9 +++----- 13 files changed, 41 insertions(+), 84 deletions(-) commit 96c1212a61e089fcd10abe88f6a8f069f2ac1354 Author: Christophe JAILLET Date: Sun Sep 11 17:13:14 2022 +0200 headers: Remove some left-over license text in include/uapi/linux/v4l2-* Remove some left-over from commit e2be04c7f995 ("License cleanup: add SPDX license identifier to uapi header files with a license") When the SPDX-License-Identifier tag has been added, the corresponding license text has not been removed. Remove it now. Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil include/uapi/linux/v4l2-common.h | 39 ------------------------------------ include/uapi/linux/v4l2-controls.h | 38 ----------------------------------- include/uapi/linux/v4l2-dv-timings.h | 9 --------- include/uapi/linux/v4l2-mediabus.h | 4 ---- include/uapi/linux/v4l2-subdev.h | 13 ------------ 5 files changed, 103 deletions(-) commit 8478afa837c48f10dddb2e06714ffc667843781d Author: Christophe JAILLET Date: Sun Sep 11 14:10:59 2022 +0200 headers: Remove some left-over license text in include/uapi/linux/dvb/ Remove some left-over from commit e2be04c7f995 ("License cleanup: add SPDX license identifier to uapi header files with a license") When the SPDX-License-Identifier tag has been added, the corresponding license text has not been removed. Remove it now. Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil include/uapi/linux/dvb/audio.h | 15 --------------- include/uapi/linux/dvb/ca.h | 15 --------------- include/uapi/linux/dvb/dmx.h | 15 --------------- include/uapi/linux/dvb/frontend.h | 15 --------------- include/uapi/linux/dvb/net.h | 15 --------------- include/uapi/linux/dvb/osd.h | 15 --------------- include/uapi/linux/dvb/version.h | 15 --------------- include/uapi/linux/dvb/video.h | 15 --------------- 8 files changed, 120 deletions(-) commit 389b6a226188c13ec3d5d8b3522aabd68aab2694 Author: Gustavo A. R. Silva Date: Wed Sep 7 19:55:44 2022 +0100 media: usb: pwc-uncompress: Use flex array destination for memcpy() In preparation for FORTIFY_SOURCE performing run-time destination buffer bounds checking for memcpy(), specify the destination output buffer explicitly, instead of asking memcpy() to write past the end of what looked like a fixed-size object. Notice that raw_frame is a pointer to a structure that contains flexible-array member rawframe[]: drivers/media/usb/pwc/pwc.h: 190 struct pwc_raw_frame { 191 __le16 type; /* type of the webcam */ 192 __le16 vbandlength; /* Size of 4 lines compressed (used by the 193 decompressor) */ 194 __u8 cmd[4]; /* the four byte of the command (in case of 195 nala, only the first 3 bytes is filled) */ 196 __u8 rawframe[]; /* frame_size = H / 4 * vbandlength */ 197 } __packed; Link: https://github.com/KSPP/linux/issues/200 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Hans Verkuil drivers/media/usb/pwc/pwc-uncompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8a46bc4e1e0446459daa77c4ce14218d32dacf9 Author: Smitha T Murthy Date: Wed Sep 7 16:02:27 2022 +0530 media: s5p-mfc: Fix to handle reference queue during finishing On receiving last buffer driver puts MFC to MFCINST_FINISHING state which in turn skips transferring of frame from SRC to REF queue. This causes driver to stop MFC encoding and last frame is lost. This patch guarantees safe handling of frames during MFCINST_FINISHING and correct clearing of workbit to avoid early stopping of encoding. Fixes: af9357467810 ("[media] MFC: Add MFC 5.1 V4L2 driver") Cc: stable@vger.kernel.org Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Hans Verkuil drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d3f3c2fe54e30b0636496d842ffbb5ad3a547f9b Author: Smitha T Murthy Date: Wed Sep 7 16:02:26 2022 +0530 media: s5p-mfc: Clear workbit to handle error condition During error on CLOSE_INSTANCE command, ctx_work_bits was not getting cleared. During consequent mfc execution NULL pointer dereferencing of this context led to kernel panic. This patch fixes this issue by making sure to clear ctx_work_bits always. Fixes: 818cd91ab8c6 ("[media] s5p-mfc: Extract open/close MFC instance commands") Cc: stable@vger.kernel.org Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Hans Verkuil drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 06710cd5d2436135046898d7e4b9408c8bb99446 Author: Smitha T Murthy Date: Wed Sep 7 16:02:25 2022 +0530 media: s5p-mfc: Fix in register read and write for H264 Few of the H264 encoder registers written were not getting reflected since the read values were not stored and getting overwritten. Fixes: 6a9c6f681257 ("[media] s5p-mfc: Add variants to access mfc registers") Cc: stable@vger.kernel.org Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Hans Verkuil drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 7318abface486d6a6389731810f5b60650daedb5 Author: Philipp Zabel Date: Wed Aug 24 12:32:10 2022 +0200 media: imx: Use get_mbus_config instead of parsing upstream DT endpoints Stop parsing upstream neighbors' device-tree endpoints to retrieve the media bus configuration. Instead use the get_mbus_config op and throw an error if the upstream subdevice does not implement it. Also drop the corresponding TODO entry and the now unused imx_media_get_pad_fwnode() function. Signed-off-by: Philipp Zabel Reviewed-by: Jacopo Mondi Tested-by: Marco Felsch Signed-off-by: Hans Verkuil drivers/staging/media/imx/TODO | 12 --- drivers/staging/media/imx/imx-media-csi.c | 135 +++++++++++++--------------- drivers/staging/media/imx/imx-media-utils.c | 33 ------- drivers/staging/media/imx/imx-media.h | 1 - 4 files changed, 63 insertions(+), 118 deletions(-) commit e65faec54192984e157eb8e49ea29d4eccacf185 Author: Christophe JAILLET Date: Sat Aug 6 17:54:59 2022 +0200 media: ths7303: Fix the include guard Everything is about THS7303, so let the include guard reflect it as well to avoid potential future conflict. Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil include/media/i2c/ths7303.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63ff05a1ad242a5a0f897921c87b70d601bda59c Author: Liang He Date: Tue Jul 19 22:10:23 2022 +0800 media: c8sectpfe: Add of_node_put() when breaking out of loop In configure_channels(), we should call of_node_put() when breaking out of for_each_child_of_node() which will automatically increase and decrease the refcount. Fixes: c5f5d0f99794 ("[media] c8sectpfe: STiH407/10 Linux DVB demux support") Signed-off-by: Liang He Signed-off-by: Hans Verkuil drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c | 1 + 1 file changed, 1 insertion(+) commit 7655c342dbc47a0781a793d91600ededff3b3a51 Author: Lecopzer Chen Date: Tue May 17 01:15:15 2022 +0800 media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y A case that CONFIG_MEDIA_SUPPORT is y but we need DVB_CORE=m, and this doesn't work since DVB_CORE is default MEDIA_DIGITAL_TV_SUPPORT and then follows MEDIA_SUPPORT. Signed-off-by: Hans Verkuil Signed-off-by: Lecopzer Chen drivers/media/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d59014e76a4168547379bc5e167f2cd8a44d3679 Author: Colin Ian King Date: Mon May 16 10:20:53 2022 +0100 media: i2c: isl7998x: make const array isl7998x_video_in_chan_map static Don't populate the read-only array isl7998x_video_in_chan_map 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 drivers/media/i2c/isl7998x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 408a2a050f315e9ea146f1619fc5494cae4949b5 Author: Moses Christopher Bollavarapu Date: Fri Jan 21 11:51:11 2022 +0100 drivers: staging: media: omap4iss: Use BIT macro instead of left shifting There is a BIT(nr) macro available in Linux Kernel, which does the same thing. Example: 1 << 7 is same as BIT(7) Signed-off-by: Moses Christopher Bollavarapu Reviewed-by: Dan Carpenter Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil drivers/staging/media/omap4iss/iss_video.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 1069470070808cafa65d400c10e5c4791d0dc0df Author: Michael Riesch Date: Fri Jan 14 11:57:55 2022 +0100 media: v4l2-mediabus: add support for dual edge sampling Some devices support sampling of the parallel data at both edges of the interface pixel clock in order to reduce the pixel clock by two. Add a mediabus flag that represents this feature. Signed-off-by: Michael Riesch Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil drivers/media/v4l2-core/v4l2-fwnode.c | 23 +++++++++++++++++++---- include/media/v4l2-mediabus.h | 17 +++++++++-------- 2 files changed, 28 insertions(+), 12 deletions(-) commit 55f6f743e9da6cfa68d5c59f4ef40e6e7603d08a Author: Michael Riesch Date: Fri Jan 14 11:57:54 2022 +0100 dt-bindings: media: video-interfaces: add support for dual edge sampling Some devices support sampling of the parallel data at both edges of the interface pixel clock in order to reduce the pixel clock by two. Use the pclk-sample property to reflect this feature in the device tree. Signed-off-by: Michael Riesch Reviewed-by: Jacopo Mondi Acked-by: Rob Herring Signed-off-by: Hans Verkuil Documentation/devicetree/bindings/media/video-interfaces.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f0ed939b6ab63f6ed9f9ff454f33997de10d8ae7 Author: Christophe JAILLET Date: Sat Jan 1 22:28:51 2022 +0100 media: pt3: Use dma_set_mask_and_coherent() and simplify code Use dma_set_mask_and_coherent() instead of unrolling it with some dma_set_mask()+dma_set_coherent_mask(). Moreover, as stated in [1], dma_set_mask() with a 64-bit mask will never fail if dev->dma_mask is non-NULL. So, if it fails, the 32 bits case will also fail for the same reason. Simplify code and remove some dead code accordingly. [1]: https://lkml.org/lkml/2021/6/7/398 Signed-off-by: Christophe JAILLET Acked-by: Akihiro Tsukada Signed-off-by: Hans Verkuil drivers/media/pci/pt3/pt3.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 6e616668a1958886fb80d1282150c2be6cc51c4f Author: Adam Borowski Date: Fri Sep 16 00:33:18 2022 +0100 media: ipu3-cio2: make the bridge depend on i2c drivers/media/pci/intel/ipu3/cio2-bridge.c: In function ‘cio2_bridge_unregister_sensors’: drivers/media/pci/intel/ipu3/cio2-bridge.c:258:17: error: implicit declaration of function ‘i2c_unregister_device’; did you mean ‘spi_unregister_device’? [-Werror=implicit-function-declaration] 258 | i2c_unregister_device(sensor->vcm_i2c_client); | ^~~~~~~~~~~~~~~~~~~~~ | spi_unregister_device Link: https://lore.kernel.org/linux-media/S230142AbiJTWql/20221020224641Z+958@vger.kernel.org Signed-off-by: Adam Borowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/intel/ipu3/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7e837a5c50044fd544c30751ebf575a77470c362 Author: Hans de Goede Date: Wed Nov 23 16:14:47 2022 +0000 media: MAINTAINERS: Add Hans de Goede as staging/atomisp maintainer Add myself as maintainer for the drivers/staging/media/atomisp code. Link: https://lore.kernel.org/linux-media/20221123161447.15834-1-hdegoede@redhat.com Signed-off-by: Hans de Goede Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6132a490f9c81d621fdb4e8c12f617dc062130a2 Merge: e6d22108621c 6ed54e1789a2 Author: Thomas Gleixner Date: Wed Dec 7 17:50:44 2022 +0100 Merge tag 'irqchip-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates frim Marc Zyngier: - More APCI fixes and improvements for the LoongArch architecture, adding support for the HTVEC irqchip, suspend-resume, and some PCI INTx workarounds - Initial DT support for LoongArch. I'm not even kidding. - Support for the MTK CIRQv2, a minor deviation from the original version - Error handling fixes for wpcm450, GIC... - BE detection for a FSL controller - Declare the Sifive PLIC as wake-up agnostic - Simplify fishing out the device data for the ST irqchip - Mark some data structures as __initconst in the apple-aic driver - Switch over from strtobool to kstrtobool - COMPILE_TEST fixes commit c34b7ac65087554627f4840f4ecd6f2107a68fd1 Author: Christoph Hellwig Date: Tue Dec 6 15:40:57 2022 +0100 block: remove bio_set_op_attrs This macro is obsolete, so replace the last few uses with open coded bi_opf assignments. Signed-off-by: Christoph Hellwig Acked-by: Coly Li > Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20221206144057.720846-1-hch@lst.de Signed-off-by: Jens Axboe drivers/md/bcache/movinggc.c | 2 +- drivers/md/bcache/request.c | 2 +- drivers/md/bcache/writeback.c | 4 ++-- drivers/md/dm-thin.c | 2 +- drivers/md/raid1.c | 12 ++++++------ drivers/md/raid10.c | 18 +++++++++--------- include/linux/blk_types.h | 7 ------- 7 files changed, 20 insertions(+), 27 deletions(-) commit f18caf261398a7f2de4fa3f600deb87072fe7b8d Author: Miaoqian Lin Date: Wed Dec 7 15:22:18 2022 +0400 device property: Fix documentation for fwnode_get_next_parent() Use fwnode_handle_put() on the node pointer to release the refcount. Change fwnode_handle_node() to fwnode_handle_put(). Fixes: 233872585de1 ("device property: Add fwnode_get_next_parent()") Reviewed-by: Andy Shevchenko Reviewed-by: Daniel Scally Acked-by: Sakari Ailus Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20221207112219.2652411-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/base/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f66f73421f0a929734bb41dde575e6d7859e548f Author: Pavel Begunkov Date: Wed Dec 7 08:50:01 2022 -0700 io_uring: skip spinlocking for ->task_complete ->task_complete was added to serialised CQE posting by doing it from the task context only (or fallback wq when the task is dead), and now we can use that to avoid taking ->completion_lock while filling CQ entries. The patch skips spinlocking only in two spots, __io_submit_flush_completions() and flushing in io_aux_cqe, it's safer and covers all cases we care about. Extra care is taken to force taking the lock while queueing overflow entries. It fundamentally relies on SINGLE_ISSUER to have only one task posting events. It also need to take into account overflowed CQEs, flushing of which happens in the cq wait path, and so this implementation also needs DEFER_TASKRUN to limit waiters. For the same reason we disable it for SQPOLL, and for IOPOLL as it won't benefit from it in any case. DEFER_TASKRUN, SQPOLL and IOPOLL requirement may be relaxed in the future. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2a8c91fd82cfcdcc1d2e5bac7051fe2c183bda73.1670384893.git.asml.silence@gmail.com [axboe: modify to apply] Signed-off-by: Jens Axboe io_uring/io_uring.c | 71 +++++++++++++++++++++++++++++++++++++++-------------- io_uring/io_uring.h | 10 +++++++- 2 files changed, 61 insertions(+), 20 deletions(-) commit 6d043ee1164ca3305738131f170e560587070fa9 Author: Pavel Begunkov Date: Wed Dec 7 03:53:36 2022 +0000 io_uring: do msg_ring in target task via tw While executing in a context of one io_uring instance msg_ring manipulates another ring. We're trying to keep CQEs posting contained in the context of the ring-owner task, use task_work to send the request to the target ring's task when we're modifying its CQ or trying to install a file. Note, we can't safely use io_uring task_work infra and have to use task_work directly. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4d76c7b28ed5d71b520de4482fbb7f660f21cd80.1670384893.git.asml.silence@gmail.com [axboe: use TWA_SIGNAL_NO_IPI] Signed-off-by: Jens Axboe io_uring/msg_ring.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 3 deletions(-) commit a6365c2da9faf7c7bcb81fbc4b422e9f319c9f0c Author: Johannes Berg Date: Mon Dec 5 10:35:48 2022 +0200 wifi: iwlwifi: fw: use correct IML/ROM status register Different registers should be used, but they code wasn't adjusted for the 'error' register, only for the 'data1'. Fix that. Coverity CID: 1487176 Coverity CID: 1487230 Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221205102808.28de1a5b2493.I356c9404623fd5ef793d47481fe37a95be355c6b@changeid drivers/net/wireless/intel/iwlwifi/fw/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2f20cf2899fdce94e01101dee08ddbd2e32ea2f Author: Mukesh Sisodiya Date: Mon Dec 5 10:35:47 2022 +0200 wifi: iwlwifi: dump: Update check for UMAC valid FW address The error dump base address check for UMAC need an update based on current hardware. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221205102808.e4b7fc650144.I46103baf400bb4ae69d82738e402a3903b17c030@changeid drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5933b8620a454894c4fdb7c123ddc6048c67e473 Author: Naftali Goldstein Date: Mon Dec 5 10:35:46 2022 +0200 wifi: iwlwifi: mvm: d3: add TKIP to the GTK iterator This was missed when this function was refactored out of iwl_mvm_wowlan_program_keys. Signed-off-by: Naftali Goldstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221205102808.746f40250502.Ieef45ffc617726cb47b3a4ec625d513d16082f4b@changeid drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 9ad28ba1c6f054ef801bcd63c5b73792b4b1d9a4 Author: Tom Rix Date: Mon Dec 5 10:35:45 2022 +0200 wifi: iwlwifi: mei: clean up comments SPDX *.h use /* */ style comments Spelling replacements commnunication to communication adsress to address procotol to protocol addtional to additional kown to know negotiaion to negotiation mssage to message Signed-off-by: Tom Rix Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221205102808.f1ff5aff270b.Ie4ba3f980a35455ed95e7c0cae854231fccc89e2@changeid drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h | 6 +++--- drivers/net/wireless/intel/iwlwifi/mei/main.c | 2 +- drivers/net/wireless/intel/iwlwifi/mei/sap.h | 10 +++++----- drivers/net/wireless/intel/iwlwifi/mei/trace-data.h | 2 +- drivers/net/wireless/intel/iwlwifi/mei/trace.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) commit b201944af11f7b2c860bef5cb562eb7163427724 Author: Miri Korenblit Date: Mon Dec 5 10:35:44 2022 +0200 wifi: iwlwifi: mvm: Don't use deprecated register The CSR_HW_IF_CONFIG_REG register is no longer in use from IWL_DEVICE_FAMILY_AX210 and on. This register uses now for CSR_CTXT_INFO_BOOT_CTRL which has a different meaning and a different format. Currently we're writing to the register according to CSR_HW_IF_CONFIG_REGs format, regardless to the device family. This causes to miss-interpretation of the register value, as it is parsed according to CSR_CTXT_INFO_BOOT_CTRLs format for devices families >= IWL_DEVICE_FAMILY_AX210. Fix this by writing to the register according to the old format only for the relevant hardware. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221205102808.8e91eb10dc7d.I3882a2452785ef8b455d99af235e4477917bf46d@changeid drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 3a27a1a158bd1811db7f9b82a72303414fa270e1 Author: Mukesh Sisodiya Date: Mon Dec 5 10:35:43 2022 +0200 wifi: iwlwifi: pcie: Add reading and storing of crf and cdb id. Read and store crf and cdb id details to make it available during driver's lifetime Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221205102808.888b30780128.Ic8c4c088a75a0d7092d6301ef3760a118a06d819@changeid drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 ++++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 33 ++++++++++++++++++-------- 2 files changed, 27 insertions(+), 10 deletions(-) commit 6d7cb4a63db8716d23036323ff1a639cbade52ac Author: Jakob Koschel Date: Mon Dec 5 10:35:42 2022 +0200 wifi: iwlwifi: mvm: replace usage of found with dedicated list iterator variable To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found boolean [1]. This removes the need to use a found variable and simply checking if the variable was set, can determine if the break/goto was hit. While at it, stop using the unnecessary _safe() variant. [1] https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ Signed-off-by: Jakob Koschel [change to not use _safe variant] Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221205102808.e4882dc35543.I32b2b945ba234de72ee119fc20f5b8be02b6a3f2@changeid drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | 12 +++++------- drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 7 +++---- 2 files changed, 8 insertions(+), 11 deletions(-) commit 838a0c7d144111df7f1fd426d099ab68e81bb24c Author: Mukesh Sisodiya Date: Mon Dec 5 10:35:41 2022 +0200 wifi: iwlwifi: dump: Update check for valid FW address The error dump base address need an update based on current hardware. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221205102808.a521691632e9.Ic15fa65107c0d4d0b555a1fb3a2a20ab2725b683@changeid drivers/net/wireless/intel/iwlwifi/fw/dump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1174e8fcbba89593f67240c3395554b3812a4981 Author: Mordechay Goodstein Date: Mon Dec 5 10:35:40 2022 +0200 wifi: iwlwifi: mvm: don't access packet before checking len Currently in sniffer mode we access pkt fields before checking that the frame has the length to access it. Fix this by moving the check to before the access. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221205102808.934da230c698.Ib56f11bbc8978e15d38394336a929cb4996ba39e@changeid drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 38 ++++++++++++++------------- 1 file changed, 20 insertions(+), 18 deletions(-) commit c5a976cf6a756efeee190f05c875b732bd10b4df Author: Johannes Berg Date: Mon Dec 5 10:35:39 2022 +0200 wifi: iwlwifi: modify new queue allocation command Follow a new firmware API changes and update the queue allocation command in the remove/modify cases to take the station mask and TID instead of the queue ID. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221205102808.2925b38d3929.Ib8467711590c1969817c3321509eb131f4230e15@changeid .../net/wireless/intel/iwlwifi/fw/api/datapath.h | 16 ++++++++----- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 26 +++++++++++++--------- 2 files changed, 26 insertions(+), 16 deletions(-) commit 8ca67e3d8bfe8d1cf9e68328c585562ab5e63309 Author: Johannes Berg Date: Mon Dec 5 10:35:38 2022 +0200 wifi: iwlwifi: nvm-parse: enable WiFi7 for Fm radio for now We're still working out how the hardware/firmware (will) advertise support for this - for now, assume that Fm radio supports it. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221205102808.f73face1a674.Ic62ee5c61c0ef2a5b5e9f89782b7bc82b0caa408@changeid drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 2 ++ 1 file changed, 2 insertions(+) commit 5b481acab4ce017fda8166fa9428511da41109e5 Author: Benjamin Tissoires Date: Tue Dec 6 15:59:32 2022 +0100 bpf: do not rely on ALLOW_ERROR_INJECTION for fmod_ret The current way of expressing that a non-bpf kernel component is willing to accept that bpf programs can be attached to it and that they can change the return value is to abuse ALLOW_ERROR_INJECTION. This is debated in the link below, and the result is that it is not a reasonable thing to do. Reuse the kfunc declaration structure to also tag the kernel functions we want to be fmodret. This way we can control from any subsystem which functions are being modified by bpf without touching the verifier. Link: https://lore.kernel.org/all/20221121104403.1545f9b5@gandalf.local.home/ Suggested-by: Alexei Starovoitov Signed-off-by: Benjamin Tissoires Acked-by: Alexei Starovoitov Link: https://lore.kernel.org/r/20221206145936.922196-2-benjamin.tissoires@redhat.com include/linux/btf.h | 2 ++ kernel/bpf/btf.c | 30 +++++++++++++++++++++++++----- kernel/bpf/verifier.c | 17 +++++++++++++++-- net/bpf/test_run.c | 14 +++++++++++--- 4 files changed, 53 insertions(+), 10 deletions(-) commit 6d4671b534f6c084e92ef167a52dc47e55f636c4 Author: Pali Rohár Date: Tue Sep 27 16:19:17 2022 +0200 PCI: pciehp: Enable Command Completed Interrupt only if supported The No Command Completed Support bit in the Slot Capabilities register indicates whether Command Completed Interrupt Enable is unsupported. We already check whether No Command Completed Support bit is set in pcie_wait_cmd(), and do not wait in this case. Don't enable this Command Completed Interrupt at all if NCCS is set, so that when users dump configuration space from userspace, the dump does not confuse them by saying that Command Completed Interrupt is not supported, but it is enabled. Link: https://lore.kernel.org/r/20220927141926.8895-2-kabel@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Signed-off-by: Bjorn Helgaas Reviewed-by: Lukas Wunner drivers/pci/hotplug/pciehp_hpc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7ccb966779645636679a723588b7bae4f0a8d7d5 Author: Dmitry Torokhov Date: Mon Nov 14 10:42:25 2022 -0800 PCI: aardvark: Switch to using devm_gpiod_get_optional() Switch the driver to the generic version of gpiod API (and away from OF-specific variant), so that we can stop exporting devm_gpiod_get_from_of_node(). Link: https://lore.kernel.org/r/Y3KMEZFv6dpxA+Gv@google.com Signed-off-by: Dmitry Torokhov Signed-off-by: Bjorn Helgaas Reviewed-by: Linus Walleij Acked-by: Pali Rohár drivers/pci/controller/pci-aardvark.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 8330e9e8269bb76dd502e84efb5f351016512cf8 Author: bayi cheng Date: Wed Dec 7 13:54:35 2022 +0800 spi: spi-mtk-nor: Add recovery mechanism for dma read timeout The state machine of MTK spi nor controller may be disturbed by some glitch signals from the relevant BUS during dma read, Although the possibility of causing the dma read to fail is next to nothing, However, if error-handling is not implemented, which makes the feature somewhat risky. Add an error-handling mechanism here, reset the state machine and re-read the data when an error occurs. Signed-off-by: bayi cheng Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221207055435.30557-1-bayi.cheng@mediatek.com Signed-off-by: Mark Brown drivers/spi/spi-mtk-nor.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit bc9ab1b7a6c687370b5d4edf34064bf04af8d369 Author: Han Xu Date: Tue Dec 6 16:54:10 2022 -0600 spi: spi-fsl-lpspi: add num-cs binding for lpspi Add num-cs property to support multiple cs for lpspi. This property is optional. Signed-off-by: Han Xu Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221206225410.604482-2-han.xu@nxp.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5f947746f0089529c85654704643f158b420ff92 Author: Han Xu Date: Tue Dec 6 16:54:09 2022 -0600 spi: spi-fsl-lpspi: support multiple cs for lpspi support to get chip select number from DT file. Signed-off-by: Han Xu Link: https://lore.kernel.org/r/20221206225410.604482-1-han.xu@nxp.com Signed-off-by: Mark Brown drivers/spi/spi-fsl-lpspi.c | 5 +++++ 1 file changed, 5 insertions(+) commit cf34ac6aa2b12fb0c3aacfdcae8acd7904b949ec Author: Yuan Can Date: Sat Dec 3 06:21:09 2022 +0000 regulator: qcom-labibb: Fix missing of_node_put() in qcom_labibb_regulator_probe() The reg_node needs to be released through of_node_put() in the error handling path when of_irq_get_byname() failed. Fixes: 390af53e0411 ("regulator: qcom-labibb: Implement short-circuit and over-current IRQs") Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20221203062109.115043-1-yuancan@huawei.com Signed-off-by: Mark Brown drivers/regulator/qcom-labibb-regulator.c | 1 + 1 file changed, 1 insertion(+) commit 38eef3be38ab895959c442702864212cc3beb96c Author: Wang Yufen Date: Mon Dec 5 17:56:28 2022 +0800 ASoC: mediatek: mt8183: fix refcount leak in mt8183_mt6358_ts3a227_max98357_dev_probe() The node returned by of_parse_phandle() with refcount incremented, of_node_put() needs be called when finish using it. So add it in the error path in mt8183_mt6358_ts3a227_max98357_dev_probe(). Fixes: 11c0269017b2 ("ASoC: Mediatek: MT8183: Add machine driver with TS3A227") Signed-off-by: Wang Yufen Link: https://lore.kernel.org/r/1670234188-23596-1-git-send-email-wangyufen@huawei.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit a39bc7cf8e284653fb6fd9d897f269f4ac80cf52 Author: ye xingchen Date: Mon Dec 5 19:43:47 2022 +0800 ASoC: imx-audmux: 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 Link: https://lore.kernel.org/r/202212051943476482106@zte.com.cn Signed-off-by: Mark Brown sound/soc/fsl/imx-audmux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ef0a098efb36660326c133af9b5a04a96a00e3ca Author: Wang Jingjin Date: Mon Dec 5 11:28:02 2022 +0800 ASoC: rockchip: pdm: Add missing clk_disable_unprepare() in rockchip_pdm_runtime_resume() The clk_disable_unprepare() should be called in the error handling of rockchip_pdm_runtime_resume(). Fixes: fc05a5b22253 ("ASoC: rockchip: add support for pdm controller") Signed-off-by: Wang Jingjin Link: https://lore.kernel.org/r/20221205032802.2422983-1-wangjingjin1@huawei.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_pdm.c | 1 + 1 file changed, 1 insertion(+) commit 8ab2d12c726f0fde0692fa5d81d8019b3dcd62d0 Author: Wang Yufen Date: Mon Dec 5 16:15:27 2022 +0800 ASoC: audio-graph-card: fix refcount leak of cpu_ep in __graph_for_each_link() The of_get_next_child() returns a node with refcount incremented, and decrements the refcount of prev. So in the error path of the while loop, of_node_put() needs be called for cpu_ep. Fixes: fce9b90c1ab7 ("ASoC: audio-graph-card: cleanup DAI link loop method - step2") Signed-off-by: Wang Yufen Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/1670228127-13835-1-git-send-email-wangyufen@huawei.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3327d721114c109ba0575f86f8fda3b525404054 Author: Wang Yufen Date: Mon Dec 5 18:04:24 2022 +0800 ASoC: mediatek: mt8173-rt5650-rt5514: fix refcount leak in mt8173_rt5650_rt5514_dev_probe() The node returned by of_parse_phandle() with refcount incremented, of_node_put() needs be called when finish using it. So add it in the error path in mt8173_rt5650_rt5514_dev_probe(). Fixes: 0d1d7a664288 ("ASoC: mediatek: Refine mt8173 driver and change config option") Signed-off-by: Wang Yufen Link: https://lore.kernel.org/r/1670234664-24246-1-git-send-email-wangyufen@huawei.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 47d2b66fec133cb27da3a551334686e465d19469 Author: Bard Liao Date: Tue Dec 6 15:25:07 2022 -0600 ASoC: Intel: sof_realtek_common: set ret = 0 as initial value 'ret' will not be initialized if dai_fmt is not DSP_A or DSP_B. Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221206212507.359993-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_realtek_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c10da436ebd93f9bfa244ea933773d14b566499 Author: Gongjun Song Date: Tue Dec 6 15:25:06 2022 -0600 ASoC: Intel: sof_sdw: use common helpers for all Realtek amps sof_sdw_rt1308.c/sof_sdw_rt1316.c/sof_sdw_rt1318.c handle amp in basically the same way, optimized and merged into one file. Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Gongjun Song Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221206212507.359993-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/Makefile | 3 +- sound/soc/intel/boards/sof_sdw.c | 10 +- sound/soc/intel/boards/sof_sdw_common.h | 20 +- sound/soc/intel/boards/sof_sdw_rt1316.c | 239 --------------------- sound/soc/intel/boards/sof_sdw_rt1318.c | 120 ----------- .../boards/{sof_sdw_rt1308.c => sof_sdw_rt_amp.c} | 139 +++++++++--- 6 files changed, 120 insertions(+), 411 deletions(-) commit c0660fce5e0672b9fcffaae02184d58c8ed2aec1 Author: Brent Lu Date: Tue Dec 6 15:25:05 2022 -0600 ASoC: Intel: sof_rt5682: add jsl_rt5682 board config This configuration supports JSL boards which implement ALC5682I-VD/VS on SSP0 port. Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221206212507.359993-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 6 ++++++ sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 5 +++++ 2 files changed, 11 insertions(+) commit 451d85c46cf719a09a052510d4d4cd920103163a Author: Cezary Rojewski Date: Mon Dec 5 09:53:30 2022 +0100 ASoC: Intel: Skylake: Use SG allocation for SKL-based firmware load Resign from ->alloc_dma_buf() and use snd_dma_alloc_pages() directly. For data i.e.: base firmware binary transfer, make use of SG allocation to better adapt to memory-limited environment. For BDL descriptor, given its small size this is not required. Signed-off-by: Cezary Rojewski Tested-by: Lukasz Majczak Link: https://lore.kernel.org/r/20221205085330.857665-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-cldma.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 171107237246d66bce04f3769d33648f896b4ce3 Author: Cezary Rojewski Date: Mon Dec 5 09:53:29 2022 +0100 ASoC: Intel: Skylake: Fix driver hang during shutdown AudioDSP cores and HDAudio links need to be turned off on shutdown to ensure no communication or data transfer occurs during the procedure. Fixes: c5a76a246989 ("ASoC: Intel: Skylake: Add shutdown callback") Signed-off-by: Cezary Rojewski Tested-by: Lukasz Majczak Link: https://lore.kernel.org/r/20221205085330.857665-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4ac587f3578c5ca490e4df55af6403f5474eb2f0 Author: Cezary Rojewski Date: Mon Dec 5 09:53:28 2022 +0100 ASoC: Intel: Skylake: Introduce single place for pipe-config selection Provide a single location for pipe config selection where all fields that have to be updated whenever ->pipe_config_idx changes can be updated accordingly. Signed-off-by: Cezary Rojewski Tested-by: Lukasz Majczak Link: https://lore.kernel.org/r/20221205085330.857665-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 75ab3c00769009e32e5cf51c8b503de4f73114e4 Author: Cezary Rojewski Date: Mon Dec 5 09:53:27 2022 +0100 ASoC: Intel: Skylake: Drop pipe_config_idx Field ->pipe_config_idx duplicates the job of ->cur_config_idx so remove it. Signed-off-by: Cezary Rojewski Tested-by: Lukasz Majczak Link: https://lore.kernel.org/r/20221205085330.857665-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 10 +++++----- sound/soc/intel/skylake/skl-topology.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) commit b0d16e54e7559f2055123ea7b1d9ff1bb808ebad Author: Cezary Rojewski Date: Mon Dec 5 09:53:26 2022 +0100 ASoC: Intel: Skylake: Remove skl_tplg_is_multi_fmt() Rather than forcing userspace to select proper format with enumerable kcontrols, select it ourselves based on provided hw_params. Signed-off-by: Cezary Rojewski Tested-by: Lukasz Majczak Link: https://lore.kernel.org/r/20221205085330.857665-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 40 ---------------------------------- 1 file changed, 40 deletions(-) commit 72d9a541d7f186f0ec97c71ba7e477dd9bf4155f Author: Cezary Rojewski Date: Mon Dec 5 09:53:25 2022 +0100 ASoC: Intel: Skylake: Update pipe_config_idx before filling BE params Without updating the index before BE copier config is filled with hardware parameters, outdated parameters are used instead. Signed-off-by: Cezary Rojewski Tested-by: Lukasz Majczak Link: https://lore.kernel.org/r/20221205085330.857665-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit aaa4dd1b47f5ff5ef477fec5dcc6c397b457f1c2 Author: Wang Kefeng Date: Sun Dec 4 04:46:40 2022 +0100 ARM: 9279/1: support function error injection This enables HAVE_FUNCTION_ERROR_INJECTION by adding necessary regs_set_return_value() and override_function_with_return(). Simply tested according to Documentation/fault-injection/fault-injection.rst. Signed-off-by: Kefeng Wang Signed-off-by: Russell King (Oracle) arch/arm/Kconfig | 1 + arch/arm/include/asm/ptrace.h | 4 ++++ arch/arm/lib/Makefile | 2 ++ arch/arm/lib/error-inject.c | 10 ++++++++++ 4 files changed, 17 insertions(+) commit 4bf5bf54476dffe60e6b6d8d539f67309ff599e2 Author: Edward Pacman Date: Wed Dec 7 21:32:18 2022 +0800 ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB Lenovo TianYi510Pro-14IOB (17aa:3742) require quirk for enabling headset-mic Signed-off-by: Edward Pacman Cc: Link: https://bugzilla.kernel.org/show_bug.cgi?id=216756 Link: https://lore.kernel.org/r/20221207133218.18989-1-edward@edward-p.xyz Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 19b00e0069a3819eac0e0ea685899aba29e545d6 Author: Sagi Grimberg Date: Wed Dec 7 13:28:23 2022 +0200 nvmet: don't open-code NVME_NS_ATTR_RO enumeration It is already there, just go ahead and use it. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/admin-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0da7feaa5913090a2b97177ed3d7fa07b2d1d99c Author: Christoph Hellwig Date: Wed Nov 30 17:26:25 2022 +0100 nvme-pci: use the tagset alloc/free helpers Use the common helpers to allocate and free the tagsets. To make this work the generic nvme_ctrl now needs to be stored in the hctx private data instead of the nvme_dev. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/pci.c | 89 ++++++++++--------------------------------------- 1 file changed, 18 insertions(+), 71 deletions(-) commit 93b24f579c392bac2e491fee79ad5ce5a131992e Author: Christoph Hellwig Date: Wed Nov 30 17:28:48 2022 +0100 nvme: add the Apple shared tag workaround to nvme_alloc_io_tag_set Add the apple shared tag workaround to nvme_alloc_io_tag_set to prepare for using that helper in the PCIe driver. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b794d1c2ad6d7921f2867ce393815ad31b5b5a83 Author: Christoph Hellwig Date: Wed Nov 30 17:27:07 2022 +0100 nvme: only set reserved_tags in nvme_alloc_io_tag_set for fabrics controllers The reserved_tags are only needed for fabrics controllers. Right now only fabrics drivers call this helper, so this is harmless, but we'll use it in the PCIe driver soon. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit db45e1a5ddccc034eb60d62fc5352022d7963ae2 Author: Christoph Hellwig Date: Wed Nov 30 17:19:50 2022 +0100 nvme: consolidate setting the tagset flags All nvme transports should be using the same flags for their tagsets, with the exception for the blocking flag that should only be set for transports that can block in ->queue_rq. Add a NVME_F_BLOCKING flag to nvme_ctrl_ops to control the blocking behavior and lift setting the flags into nvme_alloc_{admin,io}_tag_set. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/core.c | 15 +++++++++------ drivers/nvme/host/fc.c | 4 ++-- drivers/nvme/host/nvme.h | 9 +++++---- drivers/nvme/host/rdma.c | 3 +-- drivers/nvme/host/tcp.c | 5 ++--- drivers/nvme/target/loop.c | 4 ++-- 6 files changed, 21 insertions(+), 19 deletions(-) commit dcef77274ae52136925287b6b59d5c6e6a4adfb9 Author: Christoph Hellwig Date: Wed Nov 30 17:16:52 2022 +0100 nvme: pass nr_maps explicitly to nvme_alloc_io_tag_set Don't look at ctrl->ops as only RDMA and TCP actually support multiple maps. Fixes: 6dfba1c09c10 ("nvme-fc: use the tagset alloc/free helpers") Fixes: ceee1953f923 ("nvme-loop: use the tagset alloc/free helpers") Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/core.c | 5 ++--- drivers/nvme/host/fc.c | 2 +- drivers/nvme/host/nvme.h | 2 +- drivers/nvme/host/rdma.c | 4 +++- drivers/nvme/host/tcp.c | 1 + drivers/nvme/target/loop.c | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) commit 172113101641cf1f9628c528ec790cb809f2b704 Author: Pavel Begunkov Date: Wed Dec 7 03:53:35 2022 +0000 io_uring: extract a io_msg_install_complete helper Extract a helper called io_msg_install_complete() from io_msg_send_fd(), will be used later. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1500ca1054cc4286a3ee1c60aacead57fcdfa02a.1670384893.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/msg_ring.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 11373026f2960390d5e330df4e92735c4265c440 Author: Pavel Begunkov Date: Wed Dec 7 03:53:34 2022 +0000 io_uring: get rid of double locking We don't need to take both uring_locks at once, msg_ring can be split in two parts, first getting a file from the filetable of the first ring and then installing it into the second one. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a80ecc2bc99c3b3f2cf20015d618b7c51419a797.1670384893.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/msg_ring.c | 85 ++++++++++++++++++++++++++++++----------------------- io_uring/msg_ring.h | 1 + io_uring/opdef.c | 1 + 3 files changed, 51 insertions(+), 36 deletions(-) commit 77e443ab294ca5b88896e8ddab41884948d5519a Author: Pavel Begunkov Date: Wed Dec 7 03:53:33 2022 +0000 io_uring: never run tw and fallback in parallel Once we fallback a tw we want all requests to that task to be given to the fallback wq so we dont run it in parallel with the last, i.e. post PF_EXITING, tw run of the task. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/96f4987265c4312f376f206511c6af3e77aaf5ac.1670384893.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d34b1b0b6779d4f5ee877b53cad90eef0f1cbe34 Author: Pavel Begunkov Date: Wed Dec 7 03:53:32 2022 +0000 io_uring: use tw for putting rsrc Use task_work for completing rsrc removals, it'll be needed later for spinlock optimisations. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/cbba5d53a11ee6fc2194dacea262c1d733c8b529.1670384893.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 1 + io_uring/io_uring.c | 1 + io_uring/rsrc.c | 19 +++++++++++++++++-- io_uring/rsrc.h | 1 + 4 files changed, 20 insertions(+), 2 deletions(-) commit 17add5cea2bbafea0d481f1a3ea9dea019a98ee9 Author: Pavel Begunkov Date: Wed Dec 7 03:53:31 2022 +0000 io_uring: force multishot CQEs into task context Multishot are posting CQEs outside of the normal request completion path, which is usually done from within a task work handler. However, it might be not the case when it's yet to be polled but has been punted to io-wq. Make it abide ->task_complete and push it to the polling path when executed by io-wq. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d7714aaff583096769a0f26e8e747759e556feb1.1670384893.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit e6aeb2721d3bad8379c43644d0380908e93b0187 Author: Pavel Begunkov Date: Wed Dec 7 03:53:30 2022 +0000 io_uring: complete all requests in task context This patch adds ctx->task_complete flag. If set, we'll complete all requests in the context of the original task. Note, this extends to completion CQE posting only but not io_kiocb cleanup / free, e.g. io-wq may free the requests in the free calllback. This flag will be used later for optimisations purposes. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/21ece72953f76bb2e77659a72a14326227ab6460.1670384893.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/linux/io_uring.h | 2 ++ include/linux/io_uring_types.h | 2 ++ io_uring/io_uring.c | 14 +++++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) commit 1b346e4aa8e79227391ffd6b7c6ee5acf0fa8bfc Author: Pavel Begunkov Date: Wed Dec 7 03:53:29 2022 +0000 io_uring: don't check overflow flush failures The only way to fail overflowed CQEs flush is for CQ to be fully packed. There is one place checking for flush failures, i.e. io_cqring_wait(), but we limit the number to be waited for by the CQ size, so getting a failure automatically means that we're done with waiting. Don't check for failures, rarely but they might spuriously fail CQ waiting with -EBUSY. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/6b720a45c03345655517f8202cbd0bece2848fb2.1670384893.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit a85381d8326d75417ae177bddf44be533d1d21be Author: Pavel Begunkov Date: Wed Dec 7 03:53:28 2022 +0000 io_uring: skip overflow CQE posting for dying ring After io_ring_ctx_wait_and_kill() is called there should be no users poking into rings and so there is no need to post CQEs. So, instead of trying to post overflowed CQEs into the CQ, drop them. Also, do it in io_ring_exit_work() in a loop to reduce the number of contexts it can be executed from and even when it struggles to quiesce the ring we won't be leaving memory allocated for longer than needed. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/26d13751155a735a3029e24f8d9ca992f810419d.1670384893.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) commit 4c979eaefa4356d385b7c7d2877dc04d7fe88969 Author: Pavel Begunkov Date: Wed Dec 7 03:53:27 2022 +0000 io_uring: improve io_double_lock_ctx fail handling msg_ring will fail the request if it can't lock rings, instead punt it to io-wq as was originally intended. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4697f05afcc37df5c8f89e2fe6d9c7c19f0241f9.1670384893.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/msg_ring.c | 2 ++ 1 file changed, 2 insertions(+) commit ef0ec1ad03119b8b46b035dad42bca7d6da7c2e5 Author: Pavel Begunkov Date: Wed Dec 7 03:53:26 2022 +0000 io_uring: dont remove file from msg_ring reqs We should not be messing with req->file outside of core paths. Clearing it makes msg_ring non reentrant, i.e. luckily io_msg_send_fd() fails the request on failed io_double_lock_ctx() but clearly was originally intended to do retries instead. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e5ac9edadb574fe33f6d727cb8f14ce68262a684.1670384893.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 +- io_uring/msg_ring.c | 4 ---- io_uring/opdef.c | 7 +++++++ io_uring/opdef.h | 2 ++ 4 files changed, 10 insertions(+), 5 deletions(-) commit 0de796b6047d1ccc29d03fcd0a93dca52691ec21 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:27 2022 +0100 backlight: tosa: 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-594-uwe@kleine-koenig.org drivers/video/backlight/tosa_bl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5867af29c84507a1101115fc3dd6b28060ef2c03 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:26 2022 +0100 backlight: lv5207lp: 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-593-uwe@kleine-koenig.org drivers/video/backlight/lv5207lp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 60aa101b2f59538a1922107bdfd4428761ccf898 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:25 2022 +0100 backlight: lp855x: 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-592-uwe@kleine-koenig.org drivers/video/backlight/lp855x_bl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3065efe8af914407b206543c83c4b4c642b0ea62 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:24 2022 +0100 backlight: lm3639: 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-591-uwe@kleine-koenig.org drivers/video/backlight/lm3639_bl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b2d4f93f891d2d7281f0e907675f6b84836022a4 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:23 2022 +0100 backlight: lm3630a: 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-590-uwe@kleine-koenig.org drivers/video/backlight/lm3630a_bl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 58d2b900c7b1fcc85fb6d285c86976dda9c70cc2 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:22 2022 +0100 backlight: bd6107: 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-589-uwe@kleine-koenig.org drivers/video/backlight/bd6107.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 64ec2769813f07201c78db274af0b4d4bf84800c Author: Uwe Kleine-König Date: Fri Nov 18 23:45:21 2022 +0100 backlight: arcxcnn: 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-588-uwe@kleine-koenig.org drivers/video/backlight/arcxcnn_bl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e78b28b8abab618284ef5de1f3aa4dc2b5151fe6 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:20 2022 +0100 backlight: adp8870: 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-587-uwe@kleine-koenig.org drivers/video/backlight/adp8870_bl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f57c2eaaede3ada5db8c47b3ecdf24c58786f5f2 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:19 2022 +0100 backlight: adp8860: 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: Daniel Thompson Acked-by: Michael Hennerich Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-586-uwe@kleine-koenig.org drivers/video/backlight/adp8860_bl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1ca8a011ddca3e44340d9db611b019054dfc37d6 Author: Matti Vaittinen Date: Thu Dec 1 08:57:52 2022 +0200 dt-bindings: Fix maintainer email for a few ROHM ICs The email backend used by ROHM keeps labeling patches as spam. This can result to missing the patches. Switch my mail address from a company mail to a personal one. Signed-off-by: Matti Vaittinen Acked-by: Sebastian Reichel Acked-by: Mark Brown Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/7986d30480df6179a3989fba4cd13817738635c5.1669877740.git.mazziesaccount@gmail.com Documentation/devicetree/bindings/leds/rohm,bd71828-leds.yaml | 2 +- Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml | 2 +- Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 2 +- Documentation/devicetree/bindings/mfd/rohm,bd71837-pmic.yaml | 2 +- Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml | 2 +- Documentation/devicetree/bindings/mfd/rohm,bd9576-pmic.yaml | 2 +- Documentation/devicetree/bindings/power/supply/rohm,bd99954.yaml | 2 +- Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml | 2 +- Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml | 2 +- Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml | 2 +- Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml | 2 +- Documentation/devicetree/bindings/regulator/rohm,bd9576-regulator.yaml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) commit d0871b5a22b46fc81887e35e4559710cd53fcfae Author: ye xingchen Date: Thu Nov 17 19:52:24 2022 +0800 mfd: palmas: Use device_get_match_data() to simplify the code Directly get the match data with device_get_match_data(). Signed-off-by: ye xingchen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/202211171952240424511@zte.com.cn drivers/mfd/palmas.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit c8cf6e2328ce42ba016f6c321ba663d07e6f70ff Author: Markus Schneider-Pargmann Date: Fri Nov 4 16:23:10 2022 +0100 Input: Add tps65219 interrupt driven powerbutton TPS65219 has different interrupts compared to other TPS6521* chips. TPS65219 defines two interrupts for the powerbutton one for push and one for release. This driver is very simple in that it maps the push interrupt to a key input and the release interrupt to a key release. Signed-off-by: Markus Schneider-Pargmann Signed-off-by: Jerome Neanne Acked-by: Dmitry Torokhov Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221104152311.1098603-6-jneanne@baylibre.com drivers/input/misc/Kconfig | 10 +++ drivers/input/misc/Makefile | 1 + drivers/input/misc/tps65219-pwrbutton.c | 148 ++++++++++++++++++++++++++++++++ 3 files changed, 159 insertions(+) commit 74c17a0a49a6ad3b32cb130f25196d1f8d5d560e Author: Jerome Neanne Date: Fri Nov 4 16:23:09 2022 +0100 mfd: tps65219: Add driver for TI TPS65219 PMIC The TPS65219 is a power management IC PMIC designed to supply a wide range of SoCs in both portable and stationary applications. Any SoC can control TPS65219 over a standard I2C interface. It contains the following components: - Regulators. - Over Temperature warning and Shut down. - GPIOs - Multi Function Pins (MFP) - power-button This patch adds support for tps65219 PMIC. At this time only the functionalities listed below are made available: - Regulators probe and functionalities - warm and cold reset support - SW shutdown support - Regulator warnings via IRQs - Power-button via IRQ Signed-off-by: Jerome Neanne Signed-off-by: Markus Schneider-Pargmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221104152311.1098603-5-jneanne@baylibre.com MAINTAINERS | 1 + drivers/mfd/Kconfig | 14 ++ drivers/mfd/Makefile | 1 + drivers/mfd/tps65219.c | 299 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/tps65219.h | 345 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 660 insertions(+) commit 85842c46fd47fa6bd78681c154223bed27d5fd19 Author: Matti Vaittinen Date: Wed Nov 16 10:19:21 2022 +0200 mfd: bd957x: Fix Kconfig dependency on REGMAP_IRQ The BD957x driver uses REGMAP_IRQ but does not 'select' to depend on it. This can cause build failures. Select REGMAP_IRQ for BD957X. Fixes: 0e9692607f94 ("mfd: bd9576: Add IRQ support") Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/Y3SdCWkRr1L64SWK@dc75zzyyyyyyyyyyyyydt-3.rev.dnainternet.fi drivers/mfd/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0cd1860e445f668038621aabf6c67616e6d3bb8b Author: Aidan MacDonald Date: Sat Nov 12 15:18:35 2022 +0000 mfd: wcd934x: Convert irq chip to config regs Type registers are deprecated and will eventually be removed from regmap-irq. The same functionality can be replicated with config registers. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-19-aidanmacdonald.0x0@gmail.com drivers/mfd/wcd934x.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 50ff095ba366cca51084a4a5eebd600b432e31f0 Author: Aidan MacDonald Date: Sat Nov 12 15:18:34 2022 +0000 mfd: tps65090: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-18-aidanmacdonald.0x0@gmail.com drivers/mfd/tps65090.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8d9ad03265a4f24bcf904dacdd05a451d6e51cd9 Author: Aidan MacDonald Date: Sat Nov 12 15:18:33 2022 +0000 mfd: sun4i-gpadc: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Reviewed-by: Samuel Holland Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-17-aidanmacdonald.0x0@gmail.com drivers/mfd/sun4i-gpadc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c79e387389d5add7cb967d2f7622c3bf5550927b Author: Aidan MacDonald Date: Sat Nov 12 15:18:32 2022 +0000 mfd: stpmic1: Fix swapped mask/unmask in irq chip The usual behavior of mask registers is writing a '1' bit to disable (mask) an interrupt; similarly, writing a '1' bit to an unmask register enables (unmasks) an interrupt. Due to a longstanding issue in regmap-irq, mask and unmask registers were inverted when both kinds of registers were present on the same chip, ie. regmap-irq actually wrote '1's to the mask register to enable an IRQ and '1's to the unmask register to disable an IRQ. This was fixed by commit e8ffb12e7f06 ("regmap-irq: Fix inverted handling of unmask registers") but the fix is opt-in via mask_unmask_non_inverted = true because it requires manual changes for each affected driver. The new behavior will become the default once all drivers have been updated. The STPMIC1 has a normal mask register with separate set and clear registers. The driver intends to use the set & clear registers with regmap-irq and has compensated for regmap-irq's inverted behavior, and should currently be working properly. Thus, swap mask_base and unmask_base, and opt in to the new non-inverted behavior. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-16-aidanmacdonald.0x0@gmail.com drivers/mfd/stpmic1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 963cd957694b28e227709608467595d58fcf1605 Author: Aidan MacDonald Date: Sat Nov 12 15:18:31 2022 +0000 mfd: sprd-sc27xx-spi: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Reviewed-by: Baolin Wang Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-15-aidanmacdonald.0x0@gmail.com drivers/mfd/sprd-sc27xx-spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cdd13e7260b288fed9ef612f766ba02431947033 Author: Aidan MacDonald Date: Sat Nov 12 15:18:30 2022 +0000 mfd: rt5120: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-14-aidanmacdonald.0x0@gmail.com drivers/mfd/rt5120.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4627ecec79dfa85b02856e89fab152b4a749c091 Author: Aidan MacDonald Date: Sat Nov 12 15:18:29 2022 +0000 mfd: rt5033: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-13-aidanmacdonald.0x0@gmail.com drivers/mfd/rt5033.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3210c7faff513809250567024402934401d91155 Author: Aidan MacDonald Date: Sat Nov 12 15:18:28 2022 +0000 mfd: rohm-bd718x7: Drop useless mask_invert flag on irqchip Setting mask_invert to false is pointless because that's the default. The flag is also deprecated, so drop it. Signed-off-by: Aidan MacDonald Reviewed-by: Matti Vaittinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-12-aidanmacdonald.0x0@gmail.com drivers/mfd/rohm-bd718x7.c | 1 - 1 file changed, 1 deletion(-) commit cdbecc4c44e9a139651cec531f77a98c0b62d5c6 Author: Aidan MacDonald Date: Sat Nov 12 15:18:27 2022 +0000 mfd: rohm-bd71828: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Reviewed-by: Matti Vaittinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-11-aidanmacdonald.0x0@gmail.com drivers/mfd/rohm-bd71828.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 80ff2d30c0d1a2c7e51e750a8381342a038890fe Author: Aidan MacDonald Date: Sat Nov 12 15:18:26 2022 +0000 mfd: rn5t618: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-10-aidanmacdonald.0x0@gmail.com drivers/mfd/rn5t618.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ea5718ff3970ba9ff12ae32cbd1ca6c2aa2a895b Author: Aidan MacDonald Date: Sat Nov 12 15:18:25 2022 +0000 mfd: max77843: Drop useless mask_invert flag on irqchip Setting mask_invert to false is pointless because that's the default. The flag is also deprecated, so drop it. Signed-off-by: Aidan MacDonald Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-9-aidanmacdonald.0x0@gmail.com drivers/mfd/max77843.c | 1 - 1 file changed, 1 deletion(-) commit a5ae0a0ccdbc18228de8281dcb185dd647fbedbe Author: Aidan MacDonald Date: Sat Nov 12 15:18:24 2022 +0000 mfd: max77693: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-8-aidanmacdonald.0x0@gmail.com drivers/mfd/max77693.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit b171b0b46b2b6441f04c9a800251ebf82ad67f09 Author: Aidan MacDonald Date: Sat Nov 12 15:18:23 2022 +0000 mfd: max77650: Remove useless type_invert flag The type_invert flag does nothing when type_in_mask is set, and it's part of deprecated functionality in regmap-irq. Remove it. Signed-off-by: Aidan MacDonald Acked-by: Bartosz Golaszewski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-7-aidanmacdonald.0x0@gmail.com drivers/mfd/max77650.c | 1 - 1 file changed, 1 deletion(-) commit 911b8b42242256f53ca210a45580e2c35323e6b9 Author: Aidan MacDonald Date: Sat Nov 12 15:18:22 2022 +0000 mfd: max14577: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-6-aidanmacdonald.0x0@gmail.com drivers/mfd/max14577.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3576fc04594989426c61c8b46dfcc986b6f76a22 Author: Aidan MacDonald Date: Sat Nov 12 15:18:21 2022 +0000 mfd: gateworks-gsc: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-5-aidanmacdonald.0x0@gmail.com drivers/mfd/gateworks-gsc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit acc247b2870cb5bccf6dadd5c2686a1d8d1275e0 Author: Aidan MacDonald Date: Sat Nov 12 15:18:20 2022 +0000 mfd: axp20x: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Reviewed-by: Samuel Holland Tested-by: Samuel Holland Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-4-aidanmacdonald.0x0@gmail.com drivers/mfd/axp20x.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 3db3b9a5cbcc9e96a489bca9f2f07e0193ba8e93 Author: Aidan MacDonald Date: Sat Nov 12 15:18:19 2022 +0000 mfd: atc260x: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-3-aidanmacdonald.0x0@gmail.com drivers/mfd/atc260x-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0eeb2ddcb41502b6a4330646a9b3f0f80e4827b4 Author: Aidan MacDonald Date: Sat Nov 12 15:18:18 2022 +0000 mfd: 88pm800: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221112151835.39059-2-aidanmacdonald.0x0@gmail.com drivers/mfd/88pm800.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0867c49146c2145ecfb07d6d03071cdbeae9b6e1 Author: Luca Weiss Date: Mon Oct 31 18:57:14 2022 +0100 dt-bindings: mfd: qcom,spmi-pmic: Rename extcon node name extcon is a Linux-specific name and shouldn't be a part of the dts. Make it be called usb-detect@ instead. Signed-off-by: Luca Weiss Acked-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221031175717.942237-1-luca@z3ntu.xyz Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ba215dd650c50fee321bb47af94fb689cb3cf776 Author: Luca Weiss Date: Mon Oct 31 18:39:31 2022 +0100 dt-bindings: mfd: qcom,spmi-pmic: Support more types * 'adc@' is either spmi-iadc or spmi-vadc * 'charger@' is either pm8941-charger or pm8941-coincell * 'usb-vbus-regulator@' is usb-vbus-regulator * 'vibrator@' is now in yaml format, so add it Signed-off-by: Luca Weiss Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221031173933.936147-1-luca@z3ntu.xyz .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 2d51f03536c6fc19ed8489f65fabefeae1546a09 Author: Thomas Gleixner Date: Sun Nov 13 21:33:56 2022 +0100 mfd: timberdale: Remove linux/msi.h include Nothing in this file needs anything from linux/msi.h Signed-off-by: Thomas Gleixner Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221113202428.312137892@linutronix.de drivers/mfd/timberdale.c | 1 - 1 file changed, 1 deletion(-) commit 6fed0c1e6efad3494dad90fb7c5e167b7b5317b1 Author: Paul Cercueil Date: Sun Oct 23 10:48:51 2022 +0100 mfd: tc6393xb: Remove #ifdef guards for PM related functions Use the new pm_sleep_ptr() macro to handle the .suspend/.resume callbacks. This macro 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 Signed-off-by: Lee Jones drivers/mfd/tc6393xb.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 02313a90095fb919d9e5e166458f73a5f7bf915c Author: Paul Cercueil Date: Sun Oct 23 10:48:50 2022 +0100 mfd: tc3589x: Remove #ifdef guards for PM related functions Use the new 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 Signed-off-by: Lee Jones drivers/mfd/tc3589x.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f7f292fe819b6c754836923e126ec27c29be2d07 Author: Paul Cercueil Date: Sun Oct 23 10:48:49 2022 +0100 mfd: stmpe: Remove #ifdef guards for PM related functions Use the new EXPORT_GPL_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 Signed-off-by: Lee Jones drivers/mfd/stmpe-i2c.c | 4 +--- drivers/mfd/stmpe-spi.c | 4 +--- drivers/mfd/stmpe.c | 8 ++------ 3 files changed, 4 insertions(+), 12 deletions(-) commit 4d8a6ae23af64a37803c0d15922819d27b4b8b08 Author: Paul Cercueil Date: Sun Oct 23 10:48:48 2022 +0100 mfd: stmfx: Remove #ifdef guards for PM related functions Use the new 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 Signed-off-by: Lee Jones drivers/mfd/stmfx.c | 6 ++---- include/linux/mfd/stmfx.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) commit 69bbab91835acb4d1f64b2f488b379116c1c49b5 Author: Paul Cercueil Date: Sun Oct 23 10:48:47 2022 +0100 mfd: sprd-sc27xx: Remove #ifdef guards for PM related functions Use the new 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 Signed-off-by: Lee Jones drivers/mfd/sprd-sc27xx-spi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4060c6e50a77a70bf7b7ff3a3aaaa8b1828ec7b6 Author: Paul Cercueil Date: Sun Oct 23 10:48:46 2022 +0100 mfd: motorola-cpcap: Remove #ifdef guards for PM related functions Use the new 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 Signed-off-by: Lee Jones drivers/mfd/motorola-cpcap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ef72ed420ea16fa21680a262bc40a5592994a46e Author: Paul Cercueil Date: Sun Oct 23 10:48:45 2022 +0100 mfd: max77686: Remove #ifdef guards for PM related functions Use the new 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: Krzysztof Kozlowski Signed-off-by: Lee Jones drivers/mfd/max77686.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8a8d0485f579120f464193efd8a1ebc96b32fc8b Author: Paul Cercueil Date: Sun Oct 23 10:48:44 2022 +0100 mfd: max14577: Remove #ifdef guards for PM related functions Use the new 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: Krzysztof Kozlowski Signed-off-by: Lee Jones drivers/mfd/max14577.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 50d3ac7d3ce472801c4c0b3f8705b943657a6552 Author: Paul Cercueil Date: Sun Oct 23 10:48:43 2022 +0100 mfd: arizona: Remove #ifdef guards for PM related functions Only export the arizona_pm_ops if CONFIG_PM is set, but leave the suspend/resume functions (and related code) outside #ifdef guards. If CONFIG_PM is not set, the arizona_pm_ops will be defined as "static __maybe_unused", and the structure plus all the callbacks will be automatically dropped by the compiler. 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: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 19 +++++++------------ drivers/mfd/arizona-i2c.c | 2 +- drivers/mfd/arizona-spi.c | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) commit daf7ea817fda9e5094082a1dd99227001f7ef861 Author: Paul Cercueil Date: Sun Oct 23 10:48:42 2022 +0100 mfd: t7l66xb: Remove #ifdef guards for PM related functions Use the new pm_sleep_ptr() macro to handle the .suspend/.resume callbacks. This macro 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 Signed-off-by: Lee Jones drivers/mfd/t7l66xb.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 9b990dc9f09fcdde272abc54ae0c158596149944 Author: Paul Cercueil Date: Sun Oct 23 10:48:41 2022 +0100 mfd: max77620: Remove #ifdef guards for PM related functions Use the new 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 Signed-off-by: Lee Jones drivers/mfd/max77620.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 9dd3baecebc3d7b722486a73219afe4eaaa16257 Author: Paul Cercueil Date: Sun Oct 23 10:48:40 2022 +0100 mfd: wm8994: Remove #ifdef guards for PM related functions Use the new 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. Note that this driver should probably use the new DEFINE_RUNTIME_DEV_PM_OPS() macro instead, which will provide .suspend/.resume callbacks, pointing to pm_runtime_force_suspend() and pm_runtime_force_resume() respectively; unless those callbacks really aren't needed. Signed-off-by: Paul Cercueil Acked-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/wm8994-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d115e88c297546192354f65be6c0343a68910afb Author: Paul Cercueil Date: Sun Oct 23 10:48:39 2022 +0100 mfd: tps6586x: Remove #ifdef guards for PM related functions Use the new pm_sleep_ptr() macro to handle the .irq_set_wake() callback. This macro allows the mt6397_irq_set_wake() function 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 Signed-off-by: Lee Jones drivers/mfd/tps6586x.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 2d81212cb0c811db0e74b959fd48b2ba19b77e0f Author: Paul Cercueil Date: Sun Oct 23 10:48:38 2022 +0100 mfd: tc6387xb: Remove #ifdef guards for PM related functions Use the new pm_sleep_ptr() macro to handle the .suspend/.resume callbacks. This macro 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 Signed-off-by: Lee Jones drivers/mfd/tc6387xb.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 3833239b5ba22256389c2fd83ca70b6a9028435b Author: Paul Cercueil Date: Sun Oct 23 10:48:37 2022 +0100 mfd: sm501: Remove #ifdef guards for PM related functions Use the new pm_sleep_ptr() macro to handle the .suspend/.resume callbacks. This macro 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 Signed-off-by: Lee Jones drivers/mfd/sm501.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 270a7c3eba574364c43a6ec8583ec995122c255b Author: Paul Cercueil Date: Sun Oct 23 10:48:36 2022 +0100 mfd: sec: Remove #ifdef guards for PM related functions Use the new 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: Krzysztof Kozlowski Signed-off-by: Lee Jones drivers/mfd/sec-core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ff84723e5291c51ac23429d267ab9107e14ee486 Author: Paul Cercueil Date: Sun Oct 23 10:48:35 2022 +0100 mfd: mcp-sa11x0: Remove #ifdef guards for PM related functions Use the new pm_sleep_ptr() macro to handle the .suspend/.resume callbacks. This macro 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 Signed-off-by: Lee Jones drivers/mfd/mcp-sa11x0.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit fdefee3073bc60b57f664e1463d7e4c07910e3bd Author: Paul Cercueil Date: Sun Oct 23 10:48:34 2022 +0100 mfd: 88pm860x: Remove #ifdef guards for PM related functions Use the new 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 Signed-off-by: Lee Jones drivers/mfd/88pm860x-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 03bf96cf8ecbd543a25c3c71b09ea67ffffeb36b Author: Paul Cercueil Date: Sun Oct 23 10:48:33 2022 +0100 mfd: ucb1x00: Remove #ifdef guards for PM related functions Use the new 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 Signed-off-by: Lee Jones drivers/mfd/ucb1x00-core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e4b9a17c99d0b45cb4104fd32d170536701214e8 Author: Paul Cercueil Date: Sun Oct 23 10:48:32 2022 +0100 mfd: stpmic1: Remove #ifdef guards for PM related functions Use the new 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 Signed-off-by: Lee Jones drivers/mfd/stpmic1.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2662b90fd58b8833894948be07c2f44bfa782ed8 Author: Paul Cercueil Date: Sun Oct 23 10:48:31 2022 +0100 mfd: rc5t583-irq: Remove #ifdef guards for PM related functions Use the new pm_sleep_ptr() macro to handle the .irq_set_wake() callback. This macro allows the mt6397_irq_set_wake() function 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 Signed-off-by: Lee Jones drivers/mfd/rc5t583-irq.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 245cb473e5388fcbc01c7284b6a4e1446cdbf054 Author: Paul Cercueil Date: Sun Oct 23 10:48:30 2022 +0100 mfd: pcf50633: Remove #ifdef guards for PM related functions Use the new EXPORT_GPL_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 Signed-off-by: Lee Jones drivers/mfd/pcf50633-core.c | 22 +--------------------- drivers/mfd/pcf50633-irq.c | 13 ++++++++----- include/linux/mfd/pcf50633/core.h | 6 ++---- 3 files changed, 11 insertions(+), 30 deletions(-) commit e1243e0d72185c257ac2cdde1bbba130e24acf9a Author: Paul Cercueil Date: Sun Oct 23 10:48:29 2022 +0100 mfd: mt6397-irq: Remove #ifdef guards for PM related functions Use the new pm_sleep_ptr() macro to handle the .irq_set_wake() callback. This macro allows the mt6397_irq_set_wake() function 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 Signed-off-by: Lee Jones drivers/mfd/mt6397-irq.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 52c9d7193ba4342239a47a5524884f7a0a667e4d Author: Paul Cercueil Date: Sun Oct 23 10:48:28 2022 +0100 mfd: max8925-i2c: Remove #ifdef guards for PM related functions Use the new 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 Signed-off-by: Lee Jones drivers/mfd/max8925-i2c.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5745a90a930c81b55dfcb67b5e904b3cb1df0c7a Author: Paul Cercueil Date: Sun Oct 23 10:48:27 2022 +0100 mfd: adp5520: Remove #ifdef guards for PM related functions Use the new 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: Michael Hennerich Signed-off-by: Lee Jones drivers/mfd/adp5520.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit dce97f81fea6fa6230e6b7f0e2d0f17a74158dc9 Author: Paul Cercueil Date: Sun Oct 23 10:48:26 2022 +0100 mfd: aat2870: Remove #ifdef guards for PM related functions Use the new 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 Signed-off-by: Lee Jones drivers/mfd/aat2870-core.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 19755a0acb8831a02ba7833f908c55febaaa2607 Author: Paul Cercueil Date: Sun Oct 23 10:48:25 2022 +0100 mfd: 88pm80x: Remove #ifdef guards for PM related functions Use the new EXPORT_GPL_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 Signed-off-by: Lee Jones drivers/mfd/88pm800.c | 2 +- drivers/mfd/88pm805.c | 2 +- drivers/mfd/88pm80x.c | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) commit 3f37d4f695cff180033254b9ed5adc8ab927cba9 Author: Samuel Holland Date: Sat Nov 5 16:29:09 2022 -0500 mfd: axp20x: Do not sleep in the power off handler Since commit 856c288b0039 ("ARM: Use do_kernel_power_off()"), the function axp20x_power_off() now runs inside a RCU read-side critical section, so it is not allowed to call msleep(). Use mdelay() instead. Fixes: 856c288b0039 ("ARM: Use do_kernel_power_off()") Signed-off-by: Samuel Holland Reviewed-by: Dmitry Osipenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221105212909.6526-1-samuel@sholland.org drivers/mfd/axp20x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef1709238aa50094d918e4f1dd5231dac5db13c3 Author: Jonathan Neuschäfer Date: Sat Nov 5 19:59:07 2022 +0100 dt-bindings: mfd: syscon: Add nuvoton,wpcm450-shm The Shared Memory interface (SHM) is a piece of hardware in Nuvoton BMCs that allows a host processor (connected via LPC) to access flash and RAM that belong to the BMC. The SHM includes a register block accessible from the BMC side. Signed-off-by: Jonathan Neuschäfer Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221105185911.1547847-5-j.neuschaefer@gmx.net Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertion(+) commit 0a5219f34fea85a0e583de2aa4528548acaa85f4 Author: Jonathan Neuschäfer Date: Tue Nov 1 17:50:45 2022 +0100 mfd: mc13xxx-spi: Fix typo ("transfert") That spelling is only correct in French :-) Signed-off-by: Jonathan Neuschäfer Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221101165045.1017822-1-j.neuschaefer@gmx.net drivers/mfd/mc13xxx-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5a8668dab74ee37886aec5a1748f681a2d6cc6c Author: Randy Dunlap Date: Mon Oct 31 22:54:33 2022 -0700 mfd: intel_soc_pmic: Allow COMPILE_TEST or I2C_DESIGNWARE_PLATFORM Linus expressed a desire to have intel_soc_pmic_crc.o (INTEL_SOC_PMIC, for Crystal Cove) be built on an "allmodconfig" build, when I2C_DESIGNWARE_PLATFORM=m, to enhance build test coverage. The PMIC driver won't work in this case since it requires I2C_DESIGNWARE_PLATFORM=y to operate properly, but adding "|| COMPILE_TEST" does improve the build test coverage. Link: https://lore.kernel.org/all/CAHk-=wg=hh8xkPjiySnjAyR66AG64eyZ1Y9gHw+MCs8uuSZReA@mail.gmail.com/ Suggested-by: Linus Torvalds Signed-off-by: Randy Dunlap Reviewed-by: Hans de Goede Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221101055433.16891-1-rdunlap@infradead.org drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 411ffc82f93cf69f70712467ac85fdf2dc3be04a Author: AngeloGioacchino Del Regno Date: Fri Nov 4 18:21:19 2022 +0100 dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8976 Document the qcom,msm8976-tcsr compatible. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221104172122.252761-7-angelogioacchino.delregno@collabora.com Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 + 1 file changed, 1 insertion(+) commit 3633daacea2e54bf991d2f6b871efe9f83a0cac8 Author: Neil Armstrong Date: Mon Oct 31 17:05:07 2022 +0100 mfd: rk808: Permit having multiple PMIC instances This set each cells id to PLATFORM_DEVID_NONE to allow multiple instances of each cell in case multiple PMICs handled by the rk808 driver are probed. This fixes probing a RK818 and a RK817 on the Odroid Go Ultra devices. Signed-off-by: Neil Armstrong Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221025-rk808-multi-v2-0-d292d51ada81@linaro.org drivers/mfd/rk808.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit b092874ace67d5e33a9dc3aba7cb2e666dda8fd3 Author: Colin Foster Date: Mon Oct 24 22:03:50 2022 -0700 dt-bindings: mfd: ocelot: Remove unnecessary driver wording Initially there was unnecessary verbage around "this driver" in the documentation. It was unnecessary. Remove self references about it being a "driver" documentation and replace it with a more detailed description about external interfaces that are supported. Signed-off-by: Colin Foster Suggested-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221025050355.3979380-3-colin.foster@in-advantage.com Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4c7ee9a38dcc347887511deb773624550f7629ca Author: Colin Foster Date: Mon Oct 24 22:03:49 2022 -0700 dt-bindings: mfd: ocelot: Remove spi-max-frequency from required properties The property spi-max-frequency was initially documented as a required property. It is not actually required, and will break bindings validation if other control mediums (e.g. PCIe) are used. Remove this property from the required arguments. Signed-off-by: Colin Foster Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221025050355.3979380-2-colin.foster@in-advantage.com Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml | 1 - 1 file changed, 1 deletion(-) commit 9f0345e335b2eccf56faf45fb9706b40052acbdf Author: Quan Nguyen Date: Mon Oct 31 09:44:40 2022 +0700 dt-bindings: mfd: Add bindings for Ampere Altra SMPro MFD driver Adds device tree bindings for SMPro MFD driver found on the Mt.Jade hardware reference platform with Ampere's Altra Processor family. The SMpro co-processor on Ampere Altra processor family is to monitor and report various data included hwmon-related info, RAS errors, and other miscellaneous information. Signed-off-by: Quan Nguyen Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221031024442.2490881-2-quan@os.amperecomputing.com .../devicetree/bindings/mfd/ampere,smpro.yaml | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit e112f2de151badd38a9c8a098a1f92f2369349cb Author: Rafał Miłecki Date: Fri Oct 28 13:53:53 2022 +0200 dt-bindings: timer: Add Broadcom's BCMBCA timers BCA is a big set / family of Broadcom devices sharing multiple hardware blocks. One of them is timer that actually exists in two versions. It's a part of TWD MFD block. Add binding for it so SoCs can be properly described. Linux (and probably any other OS) doesn't really seem to need a driver for it. it may be needed for bootloaders (e.g. U-Boot) though. Especially for SoCs with CPUs other than Cortex-A9 (which contains arch timers). Signed-off-by: Rafał Miłecki Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221028115353.13881-1-zajec5@gmail.com .../devicetree/bindings/mfd/brcm,twd.yaml | 8 +++++ .../bindings/timer/brcm,bcmbca-timer.yaml | 40 ++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 727b67e34969ab7ad254a379664bbb492ae0bc5a Author: Neil Armstrong Date: Fri Oct 21 11:06:44 2022 +0200 mfd: qcom-pm8xxx: Drop unused PM8018 compatible The PM8018 compatible is always used with PM8921 fallback, so PM8018 compatible can be safely removed from device ID table Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220928-mdm9615-dt-schema-fixes-v4-8-dac2dfaac703@linaro.org drivers/mfd/qcom-pm8xxx.c | 1 - 1 file changed, 1 deletion(-) commit 6af338b0011727da68c32ba79f8dfab8524fc4ae Author: Neil Armstrong Date: Fri Oct 21 11:06:41 2022 +0200 dt-bindings: mfd: qcom-pm8xxx: Document qcom,pm8921 as fallback of qcom,pm8018 The PM8018 is used as compatible with PM8921 on the MDM9615, document this situation, and an example section to validate this change. Reviewed-by: Rob Herring Signed-off-by: Neil Armstrong Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220928-mdm9615-dt-schema-fixes-v4-5-dac2dfaac703@linaro.org .../devicetree/bindings/mfd/qcom-pm8xxx.yaml | 33 ++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) commit 9f8fa5e9b2fc90855fe4df770c4cf0fa653e5672 Author: Matt Ranostay Date: Sun Oct 23 20:54:04 2022 -0700 dt-bindings: mfd: ti,j721e-system-controller: Add compatible strings for other platforms There are multiple J7 based platforms, and the j721e-system-controller shouldn't be define in non-j721e devices device trees. This is mainly for clarity; but also useful in case there are future erratas that need to be fixed for a specific platform. Signed-off-by: Matt Ranostay Acked-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221024035405.366208-2-mranostay@ti.com Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml | 2 ++ 1 file changed, 2 insertions(+) commit d4b15e447c352ae74b18261bdaf0023fa9a7d1bd Author: Guillaume La Roque Date: Wed Oct 26 16:09:11 2022 +0200 mfd: palmas: Add support of module build for Ti palmas chip Modified Kconfig to enable module build support Signed-off-by: Guillaume La Roque Signed-off-by: Nicolas Frayer Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221026140911.204776-1-nfrayer@baylibre.com drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ed6cf8c0d55497f010c80fcf4c011e6febf9673 Author: Matt Ranostay Date: Tue Oct 25 01:00:14 2022 -0700 dt-bindings: mfd: ti,am3359-tscadc: Add missing power-domains property Add optional power-domains property to avoid the following dt-schema failures: tscadc@40200000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Matt Ranostay Reviewed-by: Miquel Raynal Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221025080014.403457-1-mranostay@ti.com Documentation/devicetree/bindings/mfd/ti,am3359-tscadc.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 707857d997ae39743eba939a5b3aaafbab04fa78 Author: Arnd Bergmann Date: Wed Oct 19 17:03:39 2022 +0200 mfd: Remove htc-i2cpld driver The HTC Herald machine was removed, so this driver is no longer used anywhere. Cc: Cory Maccarrone Signed-off-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221019150410.3851944-17-arnd@kernel.org drivers/mfd/Kconfig | 9 - drivers/mfd/Makefile | 1 - drivers/mfd/htc-i2cpld.c | 627 ----------------------------------------------- include/linux/htcpld.h | 23 -- 4 files changed, 660 deletions(-) commit 67470bb7b30b87bebcfb798aedc77dc6519cc0a7 Author: Arnd Bergmann Date: Wed Oct 19 17:29:36 2022 +0200 mfd: Remove davinci voicecodec driver The ASoC davinci voicecodec support is no longer used after the removal of the dm3xx SoC platform, so the MFD driver is never selected. Signed-off-by: Arnd Bergmann Acked-by: Bartosz Golaszewski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221019152947.3857217-11-arnd@kernel.org drivers/mfd/Kconfig | 5 -- drivers/mfd/Makefile | 2 - drivers/mfd/davinci_voicecodec.c | 136 --------------------------------------- 3 files changed, 143 deletions(-) commit fc45720334ebc9f97335a9ce67896811354f0a1c Author: Arnd Bergmann Date: Wed Oct 19 17:29:32 2022 +0200 mfd: Remove dm355evm_msp driver The DaVinci DM355EVM platform is gone after the removal of all unused board files, so the MTD device along with its sub-devices can be removed as well. Signed-off-by: Arnd Bergmann Acked-by: Bartosz Golaszewski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221019152947.3857217-7-arnd@kernel.org drivers/input/misc/Kconfig | 11 - drivers/input/misc/Makefile | 1 - drivers/input/misc/dm355evm_keys.c | 238 ------------------- drivers/mfd/Kconfig | 8 - drivers/mfd/Makefile | 1 - drivers/mfd/dm355evm_msp.c | 454 ------------------------------------- drivers/rtc/Kconfig | 6 - drivers/rtc/Makefile | 1 - drivers/rtc/rtc-dm355evm.c | 151 ------------ include/linux/mfd/dm355evm_msp.h | 79 ------- 10 files changed, 950 deletions(-) commit 118ee241c423636c03527eada8f672301514751e Author: Fabien Parent Date: Thu Oct 20 18:20:45 2022 +0200 dt-bindings: mfd: mt6397: Add binding for MT6357 Add binding documentation for the MT6357 PMIC. Signed-off-by: Fabien Parent Signed-off-by: Alexandre Mergnat Acked-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221005-mt6357-support-v3-1-7e0bd7c315b2@baylibre.com Documentation/devicetree/bindings/mfd/mt6397.txt | 1 + 1 file changed, 1 insertion(+) commit 5f4f94e9f26cca6514474b307b59348b8485e711 Author: ChiYuan Huang Date: Thu Sep 29 10:00:17 2022 +0800 mfd: mt6360: Add bounds checking in Regmap read/write call-backs Fix the potential risk of OOB read if bank index is over the maximum. Refer to the discussion list for the experiment result on mt6370. https://lore.kernel.org/all/20220914013345.GA5802@cyhuang-hp-elitebook-840-g3.rt/ If not to check the bound, there is the same issue on mt6360. Cc: stable@vger.kernel.org Fixes: 3b0850440a06c (mfd: mt6360: Merge different sub-devices I2C read/write) Signed-off-by: ChiYuan Huang Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/1664416817-31590-1-git-send-email-u0084500@gmail.com drivers/mfd/mt6360-core.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 4bef4d519b01cf15818b81a3fbf62d9f51612ad3 Author: Krzysztof Kozlowski Date: Thu Sep 8 10:09:38 2022 +0200 dt-bindings: mfd: qcom,spmi-pmic: Use generic node name "gpio" GPIO controller nodes are named by convention just "gpio", not "gpios". Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220908080938.29199-3-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 03317a86df980f255b80a9f7122ffa16b3451f3b Author: Johan Hovold Date: Fri Oct 7 14:11:10 2022 +0200 dt-bindings: mfd: qcom,tcsr: Add sc8280xp binding Add a binding for the SC8280XP TCSR. Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221007121110.5432-1-johan+linaro@kernel.org Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 + 1 file changed, 1 insertion(+) commit f19fd81ba1ea34a4ddb771cc3b64059f6e666b12 Author: Quan Nguyen Date: Thu Sep 29 16:43:20 2022 +0700 mfd: Add Ampere's Altra SMpro MFD driver Adds Multi-function devices driver for SMpro co-processor found on the Mt.Jade hardware reference platform with Ampere's Altra processor family. Signed-off-by: Quan Nguyen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220929094321.770125-9-quan@os.amperecomputing.com drivers/mfd/Kconfig | 12 +++++ drivers/mfd/Makefile | 1 + drivers/mfd/smpro-core.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+) commit 763ab98687404d924b6612f7c9c8430333d31229 Author: Bryan O'Donoghue Date: Wed Sep 28 01:05:17 2022 +0100 dt-bindings: mfd: qcom,spmi-pmic: Drop PWM reg dependency The PWM node is not a separate device and is expected to be part of parent SPMI PMIC node, thus it obtains the address space from the parent. One IO address in "reg" is also not correct description because LPG block maps to several regions. Fixes: 3f5117be9584 ("dt-bindings: mfd: convert to yaml Qualcomm SPMI PMIC") Suggested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220928000517.228382-2-bryan.odonoghue@linaro.org Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1f7caaa1743edbc40f3cd7e2bc0dff89698fd91d Author: Dmitry Torokhov Date: Sun Sep 25 22:44:21 2022 -0700 mfd: twl6040: Drop twl6040_platform_data and associated definitions As of df04b6242a58 ("mfd: twl6040: Remove support for legacy (pdata) mode") the driver no longer references the platform data, so we can drop its definition, as well as definitions of related structures. Signed-off-by: Dmitry Torokhov Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220926054421.1546436-5-dmitry.torokhov@gmail.com include/linux/mfd/twl6040.h | 29 ----------------------------- 1 file changed, 29 deletions(-) commit 3c92699a167a543b2bc7d603e4a09aa78a99f809 Author: Dmitry Torokhov Date: Sun Sep 25 22:44:20 2022 -0700 mfd: twl6040: Switch to using gpiod API This patch switches the dirver from legacy gpio API to a newer gpiod API so that we can eventually drop the former. Signed-off-by: Dmitry Torokhov Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220926054421.1546436-4-dmitry.torokhov@gmail.com drivers/mfd/twl6040.c | 29 +++++++++++++---------------- include/linux/mfd/twl6040.h | 5 +++-- 2 files changed, 16 insertions(+), 18 deletions(-) commit 7ca91a33775c4a33cb451f508f84a7820179c73b Author: Dmitry Torokhov Date: Sun Sep 25 22:44:19 2022 -0700 mfd: palmas: Stop including of_gpio.h It does not appear that any of palmas sub-drivers are using OF-based gpio APIs, so let's stop including this header. Signed-off-by: Dmitry Torokhov Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220926054421.1546436-3-dmitry.torokhov@gmail.com include/linux/mfd/palmas.h | 1 - 1 file changed, 1 deletion(-) commit de5567ca320aee5c99dd7bbebefffb05cc9df9f4 Author: Dmitry Torokhov Date: Sun Sep 25 22:44:18 2022 -0700 mfd: madera: Include correct gpio API The driver is using gpiod API and therefore should include linux/gpio/consumer.h, not linux/gpio.h. Also, the driver does not use any of the APIs from of_gpio.h, so we should not be including it. Signed-off-by: Dmitry Torokhov Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220926054421.1546436-2-dmitry.torokhov@gmail.com drivers/mfd/madera-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2e992b22ccd1a620165a077355163798c3951d4b Author: Dmitry Torokhov Date: Sun Sep 25 22:44:17 2022 -0700 mfd: mc13xxx: Stop including of_gpio.h Neither SPI nor I2C variant uses any APIs from of_gpio.h so let's stop including it. Signed-off-by: Dmitry Torokhov Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220926054421.1546436-1-dmitry.torokhov@gmail.com drivers/mfd/mc13xxx-i2c.c | 1 - drivers/mfd/mc13xxx-spi.c | 1 - 2 files changed, 2 deletions(-) commit 54f872baf6b17a74492f4d601be3c36626907178 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:35 2022 +0100 mfd: wm8994-core: 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: Charles Keepax Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-482-uwe@kleine-koenig.org drivers/mfd/wm8994-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 521fcf401f97f76948c64fb0bd039fdf3795486f Author: Uwe Kleine-König Date: Fri Nov 18 23:43:34 2022 +0100 mfd: wm8400-core: 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: Charles Keepax Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-481-uwe@kleine-koenig.org drivers/mfd/wm8400-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8b20feff0985599c20e7824807fcfb3a40589dd8 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:33 2022 +0100 mfd: wm8350-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: Charles Keepax Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-480-uwe@kleine-koenig.org drivers/mfd/wm8350-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5fb66be1bf4984ab0c49e3296efd66fdb65cace9 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:32 2022 +0100 mfd: wm831x-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: Charles Keepax Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-479-uwe@kleine-koenig.org drivers/mfd/wm831x-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 490e11b7c33c094e5263e03df59deffd71eac5cf Author: Uwe Kleine-König Date: Fri Nov 18 23:43:31 2022 +0100 mfd: wl1273-core: 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-478-uwe@kleine-koenig.org drivers/mfd/wl1273-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d85213be3397e16d15a29420a32f75450a096355 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:30 2022 +0100 mfd: twl6040: 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-477-uwe@kleine-koenig.org drivers/mfd/twl6040.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c291d0e347261c329fe7280e4bacfb23294db5b0 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:29 2022 +0100 mfd: twl-core: 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-476-uwe@kleine-koenig.org drivers/mfd/twl-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 328fc6f86f509f8b98147d5397caa1851e63ca49 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:28 2022 +0100 mfd: tps65912-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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-475-uwe@kleine-koenig.org drivers/mfd/tps65912-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 74e52d31cf1d26485c1df3f7caca53b6cc6410d3 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:27 2022 +0100 mfd: tps65910: 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-474-uwe@kleine-koenig.org drivers/mfd/tps65910.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ba801bd52f883bd934238ad7b47c35048f42ddc1 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:26 2022 +0100 mfd: tps6586x: 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-473-uwe@kleine-koenig.org drivers/mfd/tps6586x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3d984091e15a11e7f1520ea6c30e82d39e91c2f6 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:25 2022 +0100 mfd: tps65218: 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-472-uwe@kleine-koenig.org drivers/mfd/tps65218.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b63250984c88faf0df7c75b16587dbb20611c8d0 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:24 2022 +0100 mfd: tps65090: 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-471-uwe@kleine-koenig.org drivers/mfd/tps65090.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1f662faa5e8ef07a4cd68fe3ebe2b4dac419c503 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:23 2022 +0100 mfd: tps65086: 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-470-uwe@kleine-koenig.org drivers/mfd/tps65086.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0e1a8964f270226218e8055ecd2fac4d96788c7b Author: Uwe Kleine-König Date: Fri Nov 18 23:43:22 2022 +0100 mfd: tps6507x: 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-469-uwe@kleine-koenig.org drivers/mfd/tps6507x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 71b954d8ac2b0c8c0c6bfe7be9d09e8bfba4a711 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:21 2022 +0100 mfd: tps65010: 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-468-uwe@kleine-koenig.org drivers/mfd/tps65010.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bb5b1c649a638411805545072f2a284f0ea0dd13 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:20 2022 +0100 mfd: tps6105x: 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-467-uwe@kleine-koenig.org drivers/mfd/tps6105x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e6a6b1d6bb06e8fda4d9f5a6a9c61291eb504a86 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:19 2022 +0100 mfd: ti-lmu: 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-466-uwe@kleine-koenig.org drivers/mfd/ti-lmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d28fa288ea506812ef73980b8c3dc9c39ec8c18b Author: Uwe Kleine-König Date: Fri Nov 18 23:43:18 2022 +0100 mfd: tc3589x: 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-465-uwe@kleine-koenig.org drivers/mfd/tc3589x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 40ee15f763906ce1d8a47261a3343507f5c7bc9a Author: Uwe Kleine-König Date: Fri Nov 18 23:43:17 2022 +0100 mfd: stw481x: 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-464-uwe@kleine-koenig.org drivers/mfd/stw481x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 39cabdc8fbc2b12b1a3cfd29af553ffe1ce06d1d Author: Uwe Kleine-König Date: Fri Nov 18 23:43:16 2022 +0100 mfd: stpmic1: 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-463-uwe@kleine-koenig.org drivers/mfd/stpmic1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 50b1d5bab4424169d8cc16853a5aa1140fe2bb78 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:15 2022 +0100 mfd: stmpe-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: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-462-uwe@kleine-koenig.org drivers/mfd/stmpe-i2c.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 05b62f4ca66d8c20da59ddc3fdc72bd973acb1b6 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:14 2022 +0100 mfd: stmfx: 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-461-uwe@kleine-koenig.org drivers/mfd/stmfx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 81943ca2a616e1c35003f15bcac22c2a322610ae Author: Uwe Kleine-König Date: Fri Nov 18 23:43:13 2022 +0100 mfd: sky81452: 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-460-uwe@kleine-koenig.org drivers/mfd/sky81452.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ca08a4f30be612a2fa725f84c2f9b2dd8f54efee Author: Uwe Kleine-König Date: Fri Nov 18 23:43:12 2022 +0100 mfd: si476x-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: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-459-uwe@kleine-koenig.org drivers/mfd/si476x-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a403e589705fa4b93732581450c5c05833105ae3 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:11 2022 +0100 mfd: sec-core: 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-458-uwe@kleine-koenig.org drivers/mfd/sec-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e46b578cabb0365e8a91fba766d39d20153b82ce Author: Uwe Kleine-König Date: Fri Nov 18 23:43:10 2022 +0100 mfd: rt5033: 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-457-uwe@kleine-koenig.org drivers/mfd/rt5033.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 601e6d48ee3519648679177a0647dd3b3cbaefbb Author: Uwe Kleine-König Date: Fri Nov 18 23:43:09 2022 +0100 mfd: rsmu_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: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-456-uwe@kleine-koenig.org drivers/mfd/rsmu_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6816c54bdd95e8c35103b88bef3c75e699ff587b Author: Uwe Kleine-König Date: Fri Nov 18 23:43:08 2022 +0100 mfd: rohm-bd718x7: 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: Matti Vaittinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-455-uwe@kleine-koenig.org drivers/mfd/rohm-bd718x7.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8416360935b9b632a517503eac6e320cbd5f310a Author: Uwe Kleine-König Date: Fri Nov 18 23:43:07 2022 +0100 mfd: rk808: 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-454-uwe@kleine-koenig.org drivers/mfd/rk808.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit faa424fc01455557702d2d29602625a88996ce1d Author: Uwe Kleine-König Date: Fri Nov 18 23:43:06 2022 +0100 mfd: retu-mfd: 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-453-uwe@kleine-koenig.org drivers/mfd/retu-mfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 913c4a3e1988f042e9f817288092c0a0bc4214bd Author: Uwe Kleine-König Date: Fri Nov 18 23:43:05 2022 +0100 mfd: rc5t583: 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-452-uwe@kleine-koenig.org drivers/mfd/rc5t583.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 659ea732119d556de500ace6de69a29c021c2ff1 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:04 2022 +0100 mfd: pcf50633-core: 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-451-uwe@kleine-koenig.org drivers/mfd/pcf50633-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a5d6cbcfc7aec61df571972b5e7b93ec117de01c Author: Uwe Kleine-König Date: Fri Nov 18 23:43:03 2022 +0100 mfd: palmas: 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-450-uwe@kleine-koenig.org drivers/mfd/palmas.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a5a689fa14558e1e7d7a57303539ed8c2bc37c3f Author: Uwe Kleine-König Date: Fri Nov 18 23:43:02 2022 +0100 mfd: menf21bmc: 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-449-uwe@kleine-koenig.org drivers/mfd/menf21bmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 19301f114ba83b248f37f27131c9511b767d737b Author: Uwe Kleine-König Date: Fri Nov 18 23:43:01 2022 +0100 mfd: menelaus: 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-448-uwe@kleine-koenig.org drivers/mfd/menelaus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1060552913f13b58db02078bdfef657c1badfc6e Author: Uwe Kleine-König Date: Fri Nov 18 23:43:00 2022 +0100 mfd: mc13xxx-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: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-447-uwe@kleine-koenig.org drivers/mfd/mc13xxx-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 833eaaf700ae94a15ced1a67392564eca03e5fcf Author: Uwe Kleine-König Date: Fri Nov 18 23:42:59 2022 +0100 mfd: max8998: 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-446-uwe@kleine-koenig.org drivers/mfd/max8998.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c9f105ec976a7f038d99e2745508cdceec44353c Author: Uwe Kleine-König Date: Fri Nov 18 23:42:58 2022 +0100 mfd: max8997: 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-445-uwe@kleine-koenig.org drivers/mfd/max8997.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 18d9f1217e42d50372ef40be07a37e7748f940f0 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:57 2022 +0100 mfd: max8925-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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-444-uwe@kleine-koenig.org drivers/mfd/max8925-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bab90bb26256c31633897867d124164d22ce5de9 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:56 2022 +0100 mfd: max8907: 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-443-uwe@kleine-koenig.org drivers/mfd/max8907.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 13c6de605f1ec5617ca085a9044a244bb8f4b9b7 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:55 2022 +0100 mfd: max77843: 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-442-uwe@kleine-koenig.org drivers/mfd/max77843.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 317018e57b4eae64a304877f3aad32163ed58ea3 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:54 2022 +0100 mfd: max77693: 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-441-uwe@kleine-koenig.org drivers/mfd/max77693.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 773fb98fec5f7ae42254836391dd149e49427d9a Author: Uwe Kleine-König Date: Fri Nov 18 23:42:53 2022 +0100 mfd: max77620: 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-440-uwe@kleine-koenig.org drivers/mfd/max77620.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8df214715d056e88ae428f0312c49ecf46d93331 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:52 2022 +0100 mfd: max14577: 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-439-uwe@kleine-koenig.org drivers/mfd/max14577.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 806b9167d4175787651b497892213fe7974e9ee0 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:51 2022 +0100 mfd: madera-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: Charles Keepax Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-438-uwe@kleine-koenig.org drivers/mfd/madera-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2034ef7458083eb92ce3f563cca883772118d8e2 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:50 2022 +0100 mfd: lp8788: 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-437-uwe@kleine-koenig.org drivers/mfd/lp8788.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ec69cc2aa0c6210f4617ec67ce438e3e429cf9c Author: Uwe Kleine-König Date: Fri Nov 18 23:42:49 2022 +0100 mfd: lp87565: 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-436-uwe@kleine-koenig.org drivers/mfd/lp87565.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4acb5992aa3dcf22ed16923d92e0053a73e1a9f4 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:48 2022 +0100 mfd: lp873x: 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-435-uwe@kleine-koenig.org drivers/mfd/lp873x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f7b497cb3e14b7d61caf47e8ba7cdc0eb8fde0a4 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:47 2022 +0100 mfd: lp3943: 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-434-uwe@kleine-koenig.org drivers/mfd/lp3943.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit daf811fc4873af4a1facbe919526880b72c42a54 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:46 2022 +0100 mfd: lm3533-core: 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-433-uwe@kleine-koenig.org drivers/mfd/lm3533-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c88e02da2970804992462983fdde30289123bb3e Author: Uwe Kleine-König Date: Fri Nov 18 23:42:45 2022 +0100 mfd: khadas-mcu: 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: Neil Armstrong Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-432-uwe@kleine-koenig.org drivers/mfd/khadas-mcu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3dc6eb9fa1c69b5218be571832f76ee7472c355e Author: Uwe Kleine-König Date: Fri Nov 18 23:42:44 2022 +0100 mfd: da9150-core: 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-431-uwe@kleine-koenig.org drivers/mfd/da9150-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b309636b660639e8d1c758c042ca49726bef5aa7 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:43 2022 +0100 mfd: da9063-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: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-430-uwe@kleine-koenig.org drivers/mfd/da9063-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7df5c3d803f7aea56dce550a1151236d13d82d79 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:42 2022 +0100 mfd: da9062-core: 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-429-uwe@kleine-koenig.org drivers/mfd/da9062-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d429772913a9804e7440c13a135cc22957fee4f5 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:41 2022 +0100 mfd: da9055-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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-428-uwe@kleine-koenig.org drivers/mfd/da9055-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1ebf79726a9a911247a0b8566c5be84d44a18fa0 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:40 2022 +0100 mfd: da9052-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: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-427-uwe@kleine-koenig.org drivers/mfd/da9052-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6887bb934cf3864e2ae0894fe58d299e03609752 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:39 2022 +0100 mfd: da903x: 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-426-uwe@kleine-koenig.org drivers/mfd/da903x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4c023a6ec3a8911f2935da55ca0512d94bb289ab Author: Uwe Kleine-König Date: Fri Nov 18 23:42:38 2022 +0100 mfd: bd9571mwv: 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: Geert Uytterhoeven Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-425-uwe@kleine-koenig.org drivers/mfd/bd9571mwv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ace24876abf16f086bf19349d99baf0a8ef2e986 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:37 2022 +0100 mfd: bcm590xx: 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-424-uwe@kleine-koenig.org drivers/mfd/bcm590xx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2f2455db6f5f1db82ffffd6d8bdb3beac8a0fe63 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:36 2022 +0100 mfd: axp20x-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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-423-uwe@kleine-koenig.org drivers/mfd/axp20x-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 10206ff20678debb540a09ccacd86afd4956515d Author: Uwe Kleine-König Date: Fri Nov 18 23:42:35 2022 +0100 mfd: atc260x-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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-422-uwe@kleine-koenig.org drivers/mfd/atc260x-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9b6e839353819841c0689997b0fb3a90cf44c59e Author: Uwe Kleine-König Date: Fri Nov 18 23:42:34 2022 +0100 mfd: as3722: 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-421-uwe@kleine-koenig.org drivers/mfd/as3722.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4a36fb26728dd4dced21a2806bb58618433e6415 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:33 2022 +0100 mfd: as3711: 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-420-uwe@kleine-koenig.org drivers/mfd/as3711.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6cb7ac1c0402e61d84652b0fb79a471aca0fb7b2 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:32 2022 +0100 mfd: arizona-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: Charles Keepax Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-419-uwe@kleine-koenig.org drivers/mfd/arizona-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 48c2c36686125ff4a7ac6c6448dff31880ddd0df Author: Uwe Kleine-König Date: Fri Nov 18 23:42:31 2022 +0100 mfd: adp5520: 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: Michael Hennerich Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-418-uwe@kleine-koenig.org drivers/mfd/adp5520.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 75a4504e49b0085229e056ffe99c8542055d2657 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:30 2022 +0100 mfd: act8945a: 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-417-uwe@kleine-koenig.org drivers/mfd/act8945a.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fb53f6668273da9bd604348763a857ac83ed1406 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:29 2022 +0100 mfd: aat2870-core: 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-416-uwe@kleine-koenig.org drivers/mfd/aat2870-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 61d1be25a226b64d341aa3eb1e852f4815af18b8 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:28 2022 +0100 mfd: 88pm805: 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-415-uwe@kleine-koenig.org drivers/mfd/88pm805.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b9420da8847874976d25489186f57ec3215ff77c Author: Uwe Kleine-König Date: Fri Nov 18 23:42:27 2022 +0100 mfd: 88pm800: 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-414-uwe@kleine-koenig.org drivers/mfd/88pm800.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit acc13958c2b2623c17e2450b8cd6881b698756d3 Author: Prathamesh Shete Date: Tue Dec 6 17:59:45 2022 +0100 mmc: sdhci-tegra: Issue CMD and DAT resets together In case of error condition to avoid system crash Tegra SDMMC controller requires CMD and DAT resets issued together. SDHCI controller FSM goes into bad state due to rapid SD card hot-plug event. Issuing reset on the CMD FSM before DATA FSM results in kernel panic, hence add support to issue CMD and DAT resets together. This is applicable to Tegra186 and later chips. Signed-off-by: Aniruddha TVS Rao Signed-off-by: Prathamesh Shete Acked-by: Adrian Hunter Acked-by: Thierry Reding Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20221206165945.3551774-7-thierry.reding@gmail.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 3 ++- drivers/mmc/host/sdhci.c | 5 +++++ drivers/mmc/host/sdhci.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 03813c81e62559489afa1b461ab159b5641d66f8 Author: Prathamesh Shete Date: Tue Dec 6 17:59:44 2022 +0100 mmc: sdhci-tegra: Add support to program MC stream ID SMMU clients are supposed to program stream ID from their respective address spaces instead of MC override. Define NVQUIRK_PROGRAM_STREAMID and use it to program SMMU stream ID from the SDMMC client address space. Signed-off-by: Aniruddha TVS Rao Signed-off-by: Prathamesh Shete Acked-by: Adrian Hunter Acked-by: Thierry Reding Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20221206165945.3551774-6-thierry.reding@gmail.com [Ulf: Fixed a checkpatch error] Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 8f00ad01fcd457d5e8c09c97f7a963be09e59b99 Author: Prathamesh Shete Date: Tue Dec 6 17:59:43 2022 +0100 mmc: sdhci-tegra: Separate Tegra194 and Tegra234 SoC data Create new SoC data structure for Tegra234 platforms. Additional features, tap value configurations are added/updated for Tegra234 platform hence separate Tegra194 and Tegra234 SoC data. Signed-off-by: Aniruddha Tvs Rao Signed-off-by: Prathamesh Shete Acked-by: Adrian Hunter Acked-by: Thierry Reding Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20221206165945.3551774-5-thierry.reding@gmail.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 07548a391df07637a057caa5bd07cafb6157fe79 Author: Thierry Reding Date: Tue Dec 6 17:59:42 2022 +0100 mmc: sdhci-tegra: Sort includes alphabetically Sort includes alphabetically to make it easier to add new ones subsequently. Acked-by: Adrian Hunter Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20221206165945.3551774-4-thierry.reding@gmail.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 493c9b68d1d8765b2f8740a06c169e90a947159f Author: Thierry Reding Date: Tue Dec 6 17:59:41 2022 +0100 iommu/tegra: Add tegra_dev_iommu_get_stream_id() helper Access to the internals of struct iommu_fwspec by non-IOMMU drivers is discouraged. Many drivers for Tegra SoCs, however, need access to their IOMMU stream IDs so that they can be programmed into various hardware registers. Formalize this access into a common helper to make it easier to audit and maintain. Acked-by: Robin Murphy Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20221206165945.3551774-3-thierry.reding@gmail.com Signed-off-by: Ulf Hansson include/linux/iommu.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 495b637f640b7f87ab42f3cc829e35ea76a1f3eb Author: Thierry Reding Date: Tue Dec 6 17:59:40 2022 +0100 iommu: Add note about struct iommu_fwspec usage This structure is to be considered private to the IOMMU API. Except for very few exceptions, IOMMU consumer drivers should treat this as opaque data. Acked-by: Joerg Roedel Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20221206165945.3551774-2-thierry.reding@gmail.com Signed-off-by: Ulf Hansson include/linux/iommu.h | 4 ++++ 1 file changed, 4 insertions(+) commit a234442c0b51163841762748e7e22c3718337923 Author: Brian Norris Date: Mon Dec 5 16:04:06 2022 -0800 mmc: sdhci-brcmstb: Resolve "unused" warnings with CONFIG_OF=n With W=1, we can see this gcc warning: drivers/mmc/host/sdhci-brcmstb.c:182:34: warning: ‘sdhci_brcm_of_match’ defined but not used [-Wunused-const-variable=] 182 | static const struct of_device_id sdhci_brcm_of_match[] = { | ^~~~~~~~~~~~~~~~~~~ Rather than play around more with #ifdef's, the simplest solution is to just mark this __maybe_unused. Fixes: 50bfe185c42a ("mmc: sdhci-brcmstb: Allow building with COMPILE_TEST") Reported-by: kernel test robot Link: https://lore.kernel.org/all/202212060700.NjMecjxS-lkp@intel.com/ Signed-off-by: Brian Norris Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20221205160353.1.I5fa28f1045f17fb9285d507accf139f8b2a8f4b5@changeid Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-brcmstb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 491ad767de23c3a477405e02436e5e0071830b4c Author: Krzysztof Kozlowski Date: Sun Dec 4 10:47:17 2022 +0100 dt-bindings: mmc: sdhci-msm: allow dma-coherent SM8350, SM8450 and SM8550 SDHCI controllers for SD card are marked with dma-coherent, so allow it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221204094717.74016-5-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 2 ++ 1 file changed, 2 insertions(+) commit b64c4d8589297eaf2e94d56b7e07547209714c48 Author: Krzysztof Kozlowski Date: Sun Dec 4 10:47:16 2022 +0100 dt-bindings: mmc: sdhci-msm: drop properties mentioned in common MMC There is no need to explicitly list properties already brought by mmc-controller.yaml schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221204094717.74016-4-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 10 ---------- 1 file changed, 10 deletions(-) commit 2ba206a2ff4a5cd60068f52453cfa2bbfa45bed6 Author: Krzysztof Kozlowski Date: Sun Dec 4 10:47:15 2022 +0100 dt-bindings: mmc: sdhci-msm: cleanup style Drop unnecessary quotes from $ref. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221204094717.74016-3-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e589522d7aea0d8b738243935074a5916cd3b568 Author: Krzysztof Kozlowski Date: Sun Dec 4 10:47:14 2022 +0100 dt-bindings: mmc: sdhci-am654: cleanup style Cleanup coding style without functional changes: 1. Drop unnecessary quotes from $ref. 2. Use simple enum for compatible enumeration and sort entries. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221204094717.74016-2-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/sdhci-am654.yaml | 61 +++++++++++----------- 1 file changed, 31 insertions(+), 30 deletions(-) commit 07f8f060edd759f6f1bbaea3c078fe526f4dcbf9 Author: Krzysztof Kozlowski Date: Sun Dec 4 10:47:13 2022 +0100 dt-bindings: mmc: sdhci: document sdhci-caps and sdhci-caps-mask The Linux SDHCI driver core reads 'sdhci-caps' and 'sdhci-caps-mask' properties and few devices already use it (e.g. Qualcomm SM8450), so add them to a shared SDHCI bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221204094717.74016-1-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/sdhci-am654.yaml | 4 +-- .../devicetree/bindings/mmc/sdhci-common.yaml | 32 ++++++++++++++++++++++ .../devicetree/bindings/mmc/sdhci-msm.yaml | 2 +- MAINTAINERS | 1 + 4 files changed, 35 insertions(+), 4 deletions(-) commit 4a44cd249604e29e7b90ae796d7692f5773dd348 Author: Deren Wu Date: Sun Dec 4 16:24:16 2022 +0800 mmc: vub300: fix warning - do not call blocking ops when !TASK_RUNNING vub300_enable_sdio_irq() works with mutex and need TASK_RUNNING here. Ensure that we mark current as TASK_RUNNING for sleepable context. [ 77.554641] do not call blocking ops when !TASK_RUNNING; state=1 set at [] sdio_irq_thread+0x17d/0x5b0 [ 77.554652] WARNING: CPU: 2 PID: 1983 at kernel/sched/core.c:9813 __might_sleep+0x116/0x160 [ 77.554905] CPU: 2 PID: 1983 Comm: ksdioirqd/mmc1 Tainted: G OE 6.1.0-rc5 #1 [ 77.554910] Hardware name: Intel(R) Client Systems NUC8i7BEH/NUC8BEB, BIOS BECFL357.86A.0081.2020.0504.1834 05/04/2020 [ 77.554912] RIP: 0010:__might_sleep+0x116/0x160 [ 77.554920] RSP: 0018:ffff888107b7fdb8 EFLAGS: 00010282 [ 77.554923] RAX: 0000000000000000 RBX: ffff888118c1b740 RCX: 0000000000000000 [ 77.554926] RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffed1020f6ffa9 [ 77.554928] RBP: ffff888107b7fde0 R08: 0000000000000001 R09: ffffed1043ea60ba [ 77.554930] R10: ffff88821f5305cb R11: ffffed1043ea60b9 R12: ffffffff93aa3a60 [ 77.554932] R13: 000000000000011b R14: 7fffffffffffffff R15: ffffffffc0558660 [ 77.554934] FS: 0000000000000000(0000) GS:ffff88821f500000(0000) knlGS:0000000000000000 [ 77.554937] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 77.554939] CR2: 00007f8a44010d68 CR3: 000000024421a003 CR4: 00000000003706e0 [ 77.554942] Call Trace: [ 77.554944] [ 77.554952] mutex_lock+0x78/0xf0 [ 77.554973] vub300_enable_sdio_irq+0x103/0x3c0 [vub300] [ 77.554981] sdio_irq_thread+0x25c/0x5b0 [ 77.555006] kthread+0x2b8/0x370 [ 77.555017] ret_from_fork+0x1f/0x30 [ 77.555023] [ 77.555025] ---[ end trace 0000000000000000 ]--- Fixes: 88095e7b473a ("mmc: Add new VUB300 USB-to-SD/SDIO/MMC driver") Signed-off-by: Deren Wu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87dc45b122d26d63c80532976813c9365d7160b3.1670140888.git.deren.wu@mediatek.com Signed-off-by: Ulf Hansson drivers/mmc/host/vub300.c | 2 ++ 1 file changed, 2 insertions(+) commit 292d0426d70db2d4fd47b4ecd42188f7443bf583 Author: Kamal Dasu Date: Fri Dec 2 16:21:19 2022 -0500 MAINTAINERS: Update maintainer for SDHCI Broadcom BRCMSTB driver Taking over as upstream maintainer for Broadcom SDHCI driver from Al Cooper. Signed-off-by: Kamal Dasu Acked-by: Florian Fainelli Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20221202212119.43214-1-kdasu.kdev@gmail.com Signed-off-by: Ulf Hansson MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit c8d2d76d7646dc9b2d377699f68dce5403ad9b80 Author: Andy Tang Date: Fri Dec 2 15:59:05 2022 +0800 mmc: sdhci-of-esdhc: limit the SDHC clock frequency The highest clock frequency for eMMC HS200 mode on ls1043a is 116.7Mhz according to its specification. So add the limit to gate the frequency. Signed-off-by: Andy Tang Link: https://lore.kernel.org/r/20221202075905.25363-1-andy.tang@nxp.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 496182a389627a60d1b12be32d1640b14c678b8b Author: zhang songyi Date: Fri Dec 2 10:31:57 2022 +0800 mmc: sdhci: Remove unneeded semicolon The semicolon after the "}" is unneeded. Signed-off-by: zhang songyi Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/202212021031575255977@zte.com.cn Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc02e2b52389c8fde02852b2f959c0b45f042bbd Author: Zhen Lei Date: Wed Nov 30 21:49:20 2022 +0800 mmc: core: Normalize the error handling branch in sd_read_ext_regs() Let's use pr_err() to output the error messages and let's extend a comment to clarify why returning 0 (success) in one case make sense. Fixes: c784f92769ae ("mmc: core: Read the SD function extension registers for power management") Signed-off-by: Zhen Lei [Ulf: Clarified the comment and the commit-msg] Link: https://lore.kernel.org/r/20221130134920.2109-1-thunder.leizhen@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/core/sd.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 04280473b5da4199b1abbac2aa08fd9109e20f82 Author: Christoph Niedermaier Date: Wed Nov 30 13:10:33 2022 +0100 dt-bindings: mmc: Remove comment on wakeup-source property The current comment on wakeup-source is a little confusing because the word deprecated can be interpreted at first glance to mean that wakeup-source is deprecated. Also mentioning the obsolete property confuses more than it helps. Therefore, the comment should be removed completely because the enable-sdio-wakeup property is not used in any current DTs. Also remove enable-sdio-wakeup reference in wakeup-source.txt Signed-off-by: Christoph Niedermaier Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221130121033.7270-1-cniedermaier@dh-electronics.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 1 - Documentation/devicetree/bindings/power/wakeup-source.txt | 13 ++++++------- 2 files changed, 6 insertions(+), 8 deletions(-) commit beaba9e46cffca7fcf00bec7cf52fe52a9dcf918 Author: Adrian Hunter Date: Mon Nov 28 15:32:58 2022 +0200 mmc: sdhci: Avoid unnecessary ->set_clock() To avoid glitches on the clock line, the card clock is disabled when making timing changes. Do not do that separately for HISPD and UHS settings. Tested-by: Haibo Chen Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221128133259.38305-4-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) commit e026a3f9172f5c9aacff270b929a166c3ea1b6f7 Author: Michael Wu Date: Mon Nov 28 17:38:47 2022 +0800 mmc: mmc-hsq: Use fifo to dispatch mmc_request Current next_tag selection will cause a large delay in some requests and destroy the scheduling results of the block scheduling layer. Because the issued mrq tags cannot ensure that each time is sequential, especially when the IO load is heavy. In the fio performance test, we found that 4k random read data was sent to mmc_hsq to start calling request_atomic It takes nearly 200ms to process the request, while mmc_hsq has processed thousands of other requests. So we use fifo here to ensure the first in, first out feature of the request and avoid adding additional delay to the request. Reviewed-by: Wenchao Chen Signed-off-by: Michael Wu Link: https://lore.kernel.org/r/20221128093847.22768-1-michael@allwinnertech.com Signed-off-by: Ulf Hansson drivers/mmc/host/mmc_hsq.c | 40 +++++++++++++++------------------------- drivers/mmc/host/mmc_hsq.h | 5 +++++ 2 files changed, 20 insertions(+), 25 deletions(-) commit 4f431a047a5c8698ed4b67e2760cfbeb5fffb69d Author: Jiasheng Jiang Date: Sat Nov 26 09:25:58 2022 +0800 memstick/ms_block: Add check for alloc_ordered_workqueue As the alloc_ordered_workqueue may return NULL pointer, it should be better to add check for the return value. Moreover, the msb->io_queue should be freed if error occurs later. Fixes: 0ab30494bc4f ("memstick: add support for legacy memorysticks") Signed-off-by: Jiasheng Jiang Link: https://lore.kernel.org/r/20221126012558.34374-1-jiasheng@iscas.ac.cn Signed-off-by: Ulf Hansson drivers/memstick/core/ms_block.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 5c5301a147df77eb4479be9af74f65a334206602 Author: Ye Bin Date: Sat Nov 26 18:25:20 2022 +0800 mmc: core: refactor debugfs code Now, CONFIG_DEBUG_FS is scattered in various functions, to make code clean centralized processing CONFIG_DEBUG_FS in mmc debugfs module. Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20221126102520.2824574-1-yebin@huaweicloud.com Signed-off-by: Ulf Hansson drivers/mmc/core/bus.c | 4 ---- drivers/mmc/core/core.h | 15 +++++++++++++++ drivers/mmc/core/host.c | 4 ---- 3 files changed, 15 insertions(+), 8 deletions(-) commit b98e7e8daf0ebab9dcc36812378a71e1be0b5089 Author: ChanWoo Lee Date: Thu Nov 24 17:00:31 2022 +0900 mmc: Avoid open coding by using mmc_op_tuning() Replace code with the already defined function. No functional changes. Signed-off-by: ChanWoo Lee Reviewed-by: Adrian Hunter Link: https://lore.kernel.org/r/20221124080031.14690-1-cw9316.lee@samsung.com Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 3 +-- drivers/mmc/host/dw_mmc.c | 3 +-- drivers/mmc/host/mtk-sd.c | 8 ++------ drivers/mmc/host/sdhci-msm.c | 3 +-- drivers/mmc/host/sdhci-pci-o2micro.c | 3 +-- drivers/mmc/host/sdhci-tegra.c | 8 ++------ drivers/mmc/host/sdhci.c | 9 ++------- 7 files changed, 10 insertions(+), 27 deletions(-) commit 1e8cb505f3d4a3e9c31238a45509a17e688525a0 Author: Yang Li Date: Wed Nov 23 10:12:21 2022 +0800 mmc: Remove unneeded semicolon ./drivers/mmc/host/sunplus-mmc.c:321:2-3: Unneeded semicolon Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3238 Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20221123021221.9646-1-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson drivers/mmc/host/sunplus-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e81bdae440fa7cc7dcbfb4f0fcfafb1f4350bc31 Author: Christian Löhle Date: Sun Nov 27 17:46:31 2022 +0000 mmc: core: Remove non-data R1B ioctl workaround The workaround of pretending R1B non-data transfers are data transfers in order for the busy timeout to be respected by the host controller driver is removed. It wasn't useful in a long time. Initially the workaround ensured that R1B commands did not time out by setting the data timeout to be the command timeout in commit cb87ea28ed9e ("mmc: core: Add mmc CMD+ACMD passthrough ioctl"). This was moved inside an if-clause with idata->buf_bytes being set in commit 4d6144de8ba2 ("mmc: core: check for zero length ioctl data"). Since the workaround is now inside the idata->buf_bytes clause and intended to fix R1B non-data transfers, that do not have buf_bytes set, we can remove the workaround altogether. This was dead code, since data transfers doesn't use R1B commands. Signed-off-by: Christian Loehle Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/57d4aceb25254e448bd3e575bd99b0c2@hyperstone.com Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 13 ------------- 1 file changed, 13 deletions(-) commit ffbace4378dc1aedb02248bbbe5d231754e4df3a Author: Wolfram Sang Date: Tue Nov 22 09:05:54 2022 +0100 mmc: renesas_sdhi: use plain numbers for end_flags Linux *_bit accessors take plain bit numbers, no need for BIT(). Fixes: c330601c9c93 ("mmc: renesas_sdhi: take DMA end interrupts into account") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221122080554.4468-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 696b66ac26ef953aed5783ef26a252ec8f207013 Author: wangdicheng Date: Wed Dec 7 16:20:36 2022 +0800 ALSA: usb-audio: add the quirk for KT0206 device Add relevant information to the quirks-table.h file. The test passes and the sound source file plays normally. Signed-off-by: wangdicheng Cc: Link: https://lore.kernel.org/r/SG2PR02MB587849631CB96809CF90DBED8A1A9@SG2PR02MB5878.apcprd02.prod.outlook.com Signed-off-by: Takashi Iwai sound/usb/quirks-table.h | 2 ++ 1 file changed, 2 insertions(+) commit 31b573946ea55e1ea0e08ae8e83bcf879b30f83a Author: Jiao Zhou Date: Tue Dec 6 13:53:11 2022 -0500 ALSA: hda/hdmi: Add HP Device 0x8711 to force connect list HDMI audio is not working on the HP EliteDesk 800 G6 because the pin is unconnected. This issue can be resolved by using the 'hdajackretask' tool to override the unconnected pin to force it to connect. Signed-off-by: Jiao Zhou Cc: Link: https://lore.kernel.org/r/20221206185311.3669950-1-jiaozhou@google.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit 4e268fed8b1861616af28f9cfb4eed8ca5d7af6c Author: Tony Huang Date: Mon Nov 21 18:06:49 2022 +0800 mmc: Add mmc driver for Sunplus SP7021 This is a patch for mmc driver for Sunplus SP7021 SOC. Supports eMMC 4.41 DDR 104MB/s speed mode. Acked-by: Arnd Bergmann Signed-off-by: Tony Huang Link: https://lore.kernel.org/r/c92d67596f3cc10d41585b9ab82be7da2cc4c9d8.1669023361.git.tonyhuang.sunplus@gmail.com Signed-off-by: Ulf Hansson MAINTAINERS | 1 + drivers/mmc/host/Kconfig | 9 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sunplus-mmc.c | 1000 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1011 insertions(+) commit 0f55b162729feee076e1bbb3a4c588a09aa73641 Author: Tony Huang Date: Mon Nov 21 18:06:48 2022 +0800 dt-binding: mmc: Add mmc yaml file for Sunplus SP7021 Add MMC YAML file for Sunplus SP7021. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tony Huang Link: https://lore.kernel.org/r/8c8fbc29524819d8ab45a4fe75311b3b7b567650.1669023361.git.tonyhuang.sunplus@gmail.com Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/sunplus,mmc.yaml | 61 ++++++++++++++++++++++ MAINTAINERS | 6 +++ 2 files changed, 67 insertions(+) commit afc9b96b505ca04f3d8ce7bd2a2ca16b39855198 Author: Wolfram Sang Date: Sun Nov 20 12:34:57 2022 +0100 mmc: renesas_sdhi: use new convenience macro from MMC core Makes the code more readable. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221120113457.42010-5-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 48c917fa998c00980167ba732c8ccbf603c9fb70 Author: Wolfram Sang Date: Sun Nov 20 12:34:56 2022 +0100 mmc: renesas_sdhi: add helper to access quirks Add a macro to check for a quirk because it a) ensures that the check for non-empty 'quirks' struct is not forgotten and b) is easier to read. Convert existing quirk access as well. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221120113457.42010-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi.h | 2 ++ drivers/mmc/host/renesas_sdhi_core.c | 18 +++++++++--------- drivers/mmc/host/renesas_sdhi_internal_dmac.c | 8 ++++---- 3 files changed, 15 insertions(+), 13 deletions(-) commit 0da69dd2155019ed4c444ede0e79ce7a4a6af627 Author: Wolfram Sang Date: Sun Nov 20 12:34:55 2022 +0100 mmc: renesas_sdhi: better reset from HS400 mode Up to now, HS400 adjustment mode was only disabled on soft reset when a calibration table was in use. It is safer, though, to disable it as soon as the instance has an adjustment related quirk set, i.e. bad taps or a calibration table. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221120113457.42010-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d4f9898c1c74323dd61d6a8a0efca9401232ad4 Author: Wolfram Sang Date: Sun Nov 20 12:34:54 2022 +0100 mmc: renesas_sdhi: alway populate SCC pointer We need the SCC pointer to reset the device, so populate it even when we don't need it for tuning. Fixes: 45bffc371fef ("mmc: renesas_sdhi: only reset SCC when its pointer is populated") Signed-off-by: Takeshi Saito Signed-off-by: Takeshi Kihara Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221120113457.42010-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit fa30beccca969ad2fb9431faf1f12ecb6fdb14ce Author: ye xingchen Date: Thu Nov 17 15:24:11 2022 +0800 mmc: pwrseq: Use device_match_of_node() Replace the open-code with device_match_of_node(). Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202211171524116446204@zte.com.cn Signed-off-by: Ulf Hansson drivers/mmc/core/pwrseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0ce6aca9ddf1177d9f2757c9fed502682934343 Author: Dinh Nguyen Date: Mon Nov 14 17:02:16 2022 -0600 clk: socfpga: remove the setting of clk-phase for sdmmc_clk Now that the SDMMC driver supports setting the clk-phase, we can remove the need to do it in the clock driver. Acked-by: Stephen Boyd Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20221114230217.202634-5-dinguyen@kernel.org Signed-off-by: Ulf Hansson drivers/clk/socfpga/clk-gate-a10.c | 68 -------------------------------------- drivers/clk/socfpga/clk-gate.c | 61 ---------------------------------- drivers/clk/socfpga/clk.h | 1 - 3 files changed, 130 deletions(-) commit ef87bd81cb881377c1eaf512167b0522c825b012 Author: Dinh Nguyen Date: Mon Nov 14 17:02:15 2022 -0600 mmc: dw_mmc-pltfm: socfpga: add method to configure clk-phase The clock-phase settings for the SDMMC controller in the SoCFPGA platforms reside in a register in the System Manager. Add a method to access that register through the syscon interface. Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20221114230217.202634-4-dinguyen@kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-pltfm.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit ccfa2466a456f70c0bab0cd0b64d6c8996141d2e Author: Dinh Nguyen Date: Mon Nov 14 17:02:12 2022 -0600 dt-bindings: mmc: synopsys-dw-mshc: document "altr,sysmgr-syscon" Document the optional "altr,sysmgr-syscon" binding that is used to access the System Manager register that controls the SDMMC clock phase. Signed-off-by: Dinh Nguyen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221114230217.202634-1-dinguyen@kernel.org Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/synopsys-dw-mshc.yaml | 32 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) commit 63abdf7237a7ab9e3ee30782d64d968a087c7e7a Author: Charl Liu Date: Fri Nov 11 04:23:14 2022 -0800 mmc: sdhci: Fix the SD tuning issue that the SDHCI_TRANSFER_MODE is cleared incorrectly When cmd->opcode == MMC_SEND_TUNING_BLOCK, the SDHCI_TRANSFER_MODE should also be kept Signed-off-by: Charl Liu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20221111122314.307-1-charl.liu@bayhubtech.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43c487c28f9c353a9690f975e7b7dc56be144427 Author: Wolfram Sang Date: Wed Nov 2 13:54:30 2022 +0100 mmc: tmio: remove 'alignment_shift' from platform data There is only one alignment shift for one type of Renesas SDHI. Encode it directly in its DMA driver to reduce complexity and ease further simplifications. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221102125430.28466-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 1 - drivers/mmc/host/renesas_sdhi_sys_dmac.c | 4 ++-- include/linux/mfd/tmio.h | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) commit 8840e1c13cb40d2a207f875f3c730f399a21d4d4 Author: Wolfram Sang Date: Wed Nov 2 13:54:29 2022 +0100 mmc: tmio: remove tmio_mmc_k(un)map_atomic helpers After a8402aed8ca5 ("mmc: tmio_mmc_core: Remove local_irq_{save,restore}() around k[un]map_atomic()") and ac91578a6812 ("mmc: tmio_mmc_core: Replace kmap_atomic() with kmap_local_page()"), the helpers contain just a single call. Putting it directly in the code makes it actually more readable. More so, because we now avoid the 'offset' calculation when mapping/unmapping and just use it when we need it in the copy routines. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221102125430.28466-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_sys_dmac.c | 6 +++--- drivers/mmc/host/tmio_mmc.h | 11 ----------- drivers/mmc/host/tmio_mmc_core.c | 13 +++++++------ 3 files changed, 10 insertions(+), 20 deletions(-) commit c330601c9c93392000c077d973b182cc0164b9ac Author: Wolfram Sang Date: Thu Oct 6 21:04:51 2022 +0200 mmc: renesas_sdhi: take DMA end interrupts into account So far, we have been relying on access_end interrupts only to mark DMA transfers as done implying that DMA end interrupts have occurred by then anyhow. On some SoCs under some conditions, this turned out to be not enough. So, we enable DMA interrupts as well and make sure that both events, DMA irq and access_end irq, have happened before finishing the DMA transfer. Signed-off-by: Wolfram Sang Tested-by: Duy Nguyen Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221006190452.5316-6-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi.h | 5 +++ drivers/mmc/host/renesas_sdhi_internal_dmac.c | 51 +++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 7 deletions(-) commit ec9e80ae1719de541c719116a1ca0a0c70e9240c Author: Wolfram Sang Date: Thu Oct 6 21:04:50 2022 +0200 mmc: renesas_sdhi: add quirk for broken register layout Some early Gen3 SoCs have the DTRANEND1 bit at a different location than all later SoCs. Because we need the bit soon, add a quirk so we know which bit to use. Signed-off-by: Wolfram Sang Tested-by: Duy Nguyen Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221006190452.5316-5-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi.h | 1 + drivers/mmc/host/renesas_sdhi_internal_dmac.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit af728d7ae20483add9f8d3c81280dc6298a0aa2e Author: Wolfram Sang Date: Thu Oct 6 21:04:49 2022 +0200 mmc: tmio: add callback for dma irq We don't want to rely only on the access_end irq in the future, so implement a callback for dma irqs. Signed-off-by: Wolfram Sang Tested-by: Duy Nguyen Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221006190452.5316-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc.h | 1 + drivers/mmc/host/tmio_mmc_core.c | 3 +++ 2 files changed, 4 insertions(+) commit 7f3ea248cd1b2ea9b49f6f3523250bc8e622dd5e Author: Wolfram Sang Date: Thu Oct 6 21:04:48 2022 +0200 mmc: renesas_sdhi: improve naming of DMA struct Commit 058db2868cd8 ("mmc: tmio, renesas_sdhi: move struct tmio_mmc_dma to renesas_sdhi.h") is correct. The DMA struct should be prefixed with 'renesas_sdhi' to avoid confusion about is namespace. Fix some indentation while here. Signed-off-by: Wolfram Sang Tested-by: Duy Nguyen Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221006190452.5316-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi.h | 8 ++++---- drivers/mmc/host/renesas_sdhi_core.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit a8687078fc5e7606b3e91f32cb6ba2574d83736d Author: Wolfram Sang Date: Thu Oct 6 21:04:47 2022 +0200 mmc: renesas_sdhi: remove accessor function for internal_dmac This accessor function does not help readability but makes it worse. Because I soon need to read from the registers as well and don't want to add another function like this, I chose to remove the existing one and use the accessor directly. I also switch from writeq to writel because no 64 bit register is actually involved. Signed-off-by: Wolfram Sang Tested-by: Duy Nguyen Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221006190452.5316-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_internal_dmac.c | 31 +++++++-------------------- 1 file changed, 8 insertions(+), 23 deletions(-) commit aae9d3a440736691b3c1cb09ae2c32c4f1ee2e67 Author: Kunihiko Hayashi Date: Fri Nov 11 17:10:33 2022 +0900 mmc: f-sdh30: Add quirks for broken timeout clock capability There is a case where the timeout clock is not supplied to the capability. Add a quirk for that. Signed-off-by: Kunihiko Hayashi Acked-by: Jassi Brar Link: https://lore.kernel.org/r/20221111081033.3813-7-hayashi.kunihiko@socionext.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_f_sdh30.c | 3 +++ 1 file changed, 3 insertions(+) commit e2d2dcc82504b1beee9f2542e8b43b8c43829302 Author: Kunihiko Hayashi Date: Fri Nov 11 17:10:32 2022 +0900 mmc: f-sdh30: Add support for non-removable media To use F_SDH30 for non-removable meda like eMMC, need to enable FORCE_CARD_INSERT bit to skip the delay for detection. Signed-off-by: Kunihiko Hayashi Acked-by: Jassi Brar Link: https://lore.kernel.org/r/20221111081033.3813-6-hayashi.kunihiko@socionext.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_f_sdh30.c | 7 +++++++ drivers/mmc/host/sdhci_f_sdh30.h | 3 +++ 2 files changed, 10 insertions(+) commit 5914a9b16c842056c946665a39aa0ac5923a2d1f Author: Kunihiko Hayashi Date: Fri Nov 11 17:10:31 2022 +0900 mmc: f-sdh30: Add compatible string for Socionext F_SDH30_E51 Add a compatible string for Socionext F_SDH30_E51. Since this IP is transferred to Socionext, so append it to Copyright and MODULE_AUTHOR as vendor name. F_SDH30_E51 is a higher version of F_SDH30 that supports eMMC 5.1, though, currently there are no new features for this IP in this driver, just add the compatible string. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20221111081033.3813-5-hayashi.kunihiko@socionext.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_f_sdh30.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 72e7f0cf8d99af8808d1b8fb31bef6ce864a146a Author: Kunihiko Hayashi Date: Fri Nov 11 17:10:30 2022 +0900 dt-bindings: sdhci-fujitsu: Add compatible string for F_SDH30_E51 Add a compatible string for F_SDH30_E51 IP to the documentation. Since this IP is transferred to Socionext, so append it as vendor name. Signed-off-by: Kunihiko Hayashi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221111081033.3813-4-hayashi.kunihiko@socionext.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/fujitsu,sdhci-fujitsu.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bd724b279f554629e5f74d50a43e2435791482e1 Author: Kunihiko Hayashi Date: Fri Nov 11 17:10:29 2022 +0900 mmc: f-sdh30: Add reset control support Add reset control support for F_SDH30 controller. This is optional. Signed-off-by: Kunihiko Hayashi Acked-by: Jassi Brar Link: https://lore.kernel.org/r/20221111081033.3813-3-hayashi.kunihiko@socionext.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_f_sdh30.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit cb7e1e931161962b298364ca3ad9a4dd3143851b Author: Kunihiko Hayashi Date: Fri Nov 11 17:10:28 2022 +0900 dt-bindings: mmc: Convert sdhci-fujitsu to JSON schema Convert the Fujitsu SDHCI controller IP binding to DT schema format, and add resets property as optional to support reset control. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221111081033.3813-2-hayashi.kunihiko@socionext.com Signed-off-by: Ulf Hansson .../bindings/mmc/fujitsu,sdhci-fujitsu.yaml | 55 ++++++++++++++++++++++ .../devicetree/bindings/mmc/sdhci-fujitsu.txt | 32 ------------- 2 files changed, 55 insertions(+), 32 deletions(-) commit 4b323f02b6e8df1b04292635ef829e7f723bf50e Author: Yu Zhe Date: Thu Nov 10 15:28:19 2022 +0800 mmc: mtk-sd: fix two spelling mistakes in comment spelling mistake fix : "alreay" -> "already" "checksume" -> "checksum" Signed-off-by: Yu Zhe Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221110072819.11530-1-yuzhe@nfschina.com Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 974b8219df36f80fdaf7a64ba7b7992320cd5744 Author: Abel Vesa Date: Wed Nov 16 11:15:24 2022 +0100 dt-bindings: mmc: sdhci-msm: Document the SM8550 compatible Document the compatible for SDHCI on SM8550. Signed-off-by: Abel Vesa Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-sdhci-v1-0-797864a30e71@linaro.org Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 1 + 1 file changed, 1 insertion(+) commit b78efae3a3fcf970db0c516abaa3d30b377d0440 Author: Konrad Dybcio Date: Wed Nov 16 13:36:09 2022 +0100 dt-bindings: mmc: sdhci-msm: Document SM8350 SDHCI Document the SDHCI on SM8350. Acked-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221116123612.34302-1-konrad.dybcio@linaro.org Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 1 + 1 file changed, 1 insertion(+) commit ac4a171b448bdd3b33a57c61c23edcc289324d5f Author: Konrad Dybcio Date: Mon Nov 14 11:50:41 2022 +0100 dt-bindings: mmc: sdhci-msm: Document the SM6375 compatible Document the compatible for SDHCI on SM6375. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221114105043.36698-2-konrad.dybcio@linaro.org Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 1 + 1 file changed, 1 insertion(+) commit b38a20f29a49ae04d23750d104b25400b792b98c Author: Yang Yingliang Date: Wed Nov 9 21:35:39 2022 +0800 mmc: mmci: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, it will lead two issues: 1. The memory that allocated in mmc_alloc_host() is leaked. 2. In the remove() path, mmc_remove_host() will be called to delete device, but it's not added yet, it will lead a kernel crash because of null-ptr-deref in device_del(). So fix this by checking the return value and goto error path which will call mmc_free_host(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221109133539.3275664-1-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/mmci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dc5b9b50fc9d1334407e316e6e29a5097ef833bd Author: Yang Yingliang Date: Wed Nov 9 21:32:37 2022 +0800 mmc: wbsd: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, it will lead two issues: 1. The memory that allocated in mmc_alloc_host() is leaked. 2. In the remove() path, mmc_remove_host() will be called to delete device, but it's not added yet, it will lead a kernel crash because of null-ptr-deref in device_del(). So fix this by checking the return value and goto error path which will call mmc_free_host(), besides, other resources also need be released. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221109133237.3273558-1-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/wbsd.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit e4e46fb61e3bb4628170810d3f2b996b709b90d9 Author: Yang Yingliang Date: Tue Nov 8 21:09:49 2022 +0800 mmc: via-sdmmc: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, it will lead two issues: 1. The memory that allocated in mmc_alloc_host() is leaked. 2. In the remove() path, mmc_remove_host() will be called to delete device, but it's not added yet, it will lead a kernel crash because of null-ptr-deref in device_del(). Fix this by checking the return value and goto error path which will call mmc_free_host(). Fixes: f0bf7f61b840 ("mmc: Add new via-sdmmc host controller driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221108130949.1067699-1-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/via-sdmmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 90935f16f2650ab7416fa2ffbe5c28cb39cf3f1e Author: Yang Yingliang Date: Tue Nov 8 20:34:17 2022 +0800 mmc: meson-gx: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, it will lead two issues: 1. The memory that allocated in mmc_alloc_host() is leaked. 2. In the remove() path, mmc_remove_host() will be called to delete device, but it's not added yet, it will lead a kernel crash because of null-ptr-deref in device_del(). Fix this by checking the return value and goto error path which will call mmc_free_host(). Fixes: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms") Signed-off-by: Yang Yingliang Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20221108123417.479045-1-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a525cad241c339ca00bf7ebf03c5180f2a9b767c Author: Yang Yingliang Date: Tue Nov 8 20:13:16 2022 +0800 mmc: omap_hsmmc: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, it will lead two issues: 1. The memory that allocated in mmc_alloc_host() is leaked. 2. In the remove() path, mmc_remove_host() will be called to delete device, but it's not added yet, it will lead a kernel crash because of null-ptr-deref in device_del(). Fix this by checking the return value and goto error path wihch will call mmc_free_host(). Fixes: a45c6cb81647 ("[ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221108121316.340354-1-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9e6e8c43726673ca2abcaac87640b9215fd72f4c Author: Yang Yingliang Date: Tue Nov 8 20:28:19 2022 +0800 mmc: atmel-mci: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, it will lead two issues: 1. The memory that allocated in mmc_alloc_host() is leaked. 2. In the remove() path, mmc_remove_host() will be called to delete device, but it's not added yet, it will lead a kernel crash because of null-ptr-deref in device_del(). So fix this by checking the return value and calling mmc_free_host() in the error path. Fixes: 7d2be0749a59 ("atmel-mci: Driver for Atmel on-chip MMC controllers") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221108122819.429975-1-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/atmel-mci.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 0b278ea226b103a291aed38e950fe032148f8c9b Author: Jagan Teki Date: Tue Nov 8 09:43:52 2022 +0530 dt-bindings: mmc: rockchip-dw-mshc: Add power-domains property Document power-domains property in rockchip dw controller. RV1126 is using eMMC and SDIO power domains but SDMMC is not. Signed-off-by: Jagan Teki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221108041400.157052-3-jagan@edgeble.ai Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 5cb7d23761c87cd490a59dc4bb0d618c92b711c5 Author: Sebastian Reichel Date: Mon Nov 7 18:33:10 2022 +0100 dt-bindings: mmc: sdhci-of-dwcmhsc: Add reset support Properly describe reset related properties in the binding. Signed-off-by: Sebastian Reichel Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221107173310.60503-1-sebastian.reichel@collabora.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5c1a2b77cd1b59112cf22b3e338f7e416797ad32 Author: Gabriel Somlo Date: Mon Nov 7 10:55:16 2022 -0500 mmc: litex_mmc: ensure `host->irq == 0` if polling Ensure the flag is explicitly set to 0 if we determine that polling is needed during driver probe, to cover all possible cases. Fixes: 92e099104729 ("mmc: Add driver for LiteX's LiteSDCard interface") Signed-off-by: Gabriel Somlo Link: https://lore.kernel.org/r/20221107155516.2535912-1-gsomlo@gmail.com Signed-off-by: Ulf Hansson drivers/mmc/host/litex_mmc.c | 1 + 1 file changed, 1 insertion(+) commit 29276d56f6ed138db0f38cd31aedc0b725c8c76c Author: Yang Yingliang Date: Tue Nov 1 14:30:23 2022 +0800 mmc: wmt-sdmmc: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and goto error path which will call mmc_free_host(), besides, clk_disable_unprepare() also needs be called. Fixes: 3a96dff0f828 ("mmc: SD/MMC Host Controller for Wondermedia WM8505/WM8650") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221101063023.1664968-10-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/wmt-sdmmc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0613ad2401f88bdeae5594c30afe318e93b14676 Author: Yang Yingliang Date: Tue Nov 1 14:30:22 2022 +0800 mmc: vub300: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and goto error path which will call mmc_free_host(), besides, the timer added before mmc_add_host() needs be del. And this patch fixes another missing call mmc_free_host() if usb_control_msg() fails. Fixes: 88095e7b473a ("mmc: Add new VUB300 USB-to-SD/SDIO/MMC driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221101063023.1664968-9-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/vub300.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit f670744a316ea983113a65313dcd387b5a992444 Author: Yang Yingliang Date: Tue Nov 1 14:30:21 2022 +0800 mmc: toshsd: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and goto error path which will call mmc_free_host(), besides, free_irq() also needs be called. Fixes: a5eb8bbd66cc ("mmc: add Toshiba PCI SD controller driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221101063023.1664968-8-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/toshsd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit fc38a5a10e9e5a75eb9189854abeb8405b214cc9 Author: Yang Yingliang Date: Tue Nov 1 14:30:20 2022 +0800 mmc: rtsx_usb_sdmmc: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and calling mmc_free_host() in the error path, besides, led_classdev_unregister() and pm_runtime_disable() also need be called. Fixes: c7f6558d84af ("mmc: Add realtek USB sdmmc host driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221101063023.1664968-7-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/rtsx_usb_sdmmc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 0c87db77423a282b3b38b8a6daf057b822680516 Author: Yang Yingliang Date: Tue Nov 1 14:30:19 2022 +0800 mmc: rtsx_pci: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and calling mmc_free_host() in the error path, beside, runtime PM also needs be disabled. Fixes: ff984e57d36e ("mmc: Add realtek pcie sdmmc host driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221101063023.1664968-6-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/rtsx_pci_sdmmc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 80e1ef3afb8bfbe768380b70ffe1b6cab87d1a3b Author: Yang Yingliang Date: Tue Nov 1 14:30:18 2022 +0800 mmc: pxamci: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and goto error path which will call mmc_free_host(), besides, ->exit() need be called to uninit the pdata. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221101063023.1664968-5-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/pxamci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit cde600af7b413c9fe03e85c58c4279df90e91d13 Author: Yang Yingliang Date: Tue Nov 1 14:30:17 2022 +0800 mmc: mxcmmc: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and goto error path which will call mmc_free_host(). Fixes: d96be879ff46 ("mmc: Add a MX2/MX3 specific SDHC driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221101063023.1664968-4-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/mxcmmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0ca18d09c744fb030ae9bc5836c3e357e0237dea Author: Yang Yingliang Date: Tue Nov 1 14:30:16 2022 +0800 mmc: moxart: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and goto error path which will call mmc_free_host(). Fixes: 1b66e94e6b99 ("mmc: moxart: Add MOXA ART SD/MMC driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221101063023.1664968-3-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/moxart-mmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e93d1468f429475a753d6baa79b853b7ee5ef8c0 Author: Yang Yingliang Date: Tue Nov 1 14:30:15 2022 +0800 mmc: alcor: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and calling mmc_free_host() in the error path. Fixes: c5413ad815a6 ("mmc: add new Alcor Micro Cardreader SD/MMC driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221101063023.1664968-2-yangyingliang@huawei.com Signed-off-by: Ulf Hansson drivers/mmc/host/alcor.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7b438d0377fbd520b475a68bdd9de1692393f22d Author: Mengqi Zhang Date: Sun Nov 6 11:39:24 2022 +0800 mmc: mtk-sd: add Inline Crypto Engine clock control Add crypto clock control and ungate it before CQHCI init. Signed-off-by: Mengqi Zhang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221106033924.9854-2-mengqi.zhang@mediatek.com Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5c133688a1bfc110ed67de3ddaafa04facacbd5f Author: Mengqi Zhang Date: Sun Nov 6 11:39:26 2022 +0800 dt-bindings: mmc: mtk-sd: add Inline Crypto Engine clock Add optional crypto clock of the Inline Crypto Engine of Mediatek SoCs. Signed-off-by: Mengqi Zhang Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221106033924.9854-3-mengqi.zhang@mediatek.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit e97ee6f816c04e6a6fff875f5553c52ffd8b84d4 Author: AngeloGioacchino Del Regno Date: Fri Nov 4 18:21:18 2022 +0100 dt-bindings: mmc: sdhci-msm: Document compatible for MSM8976 Document the compatible for the SDHCI controller(s) found on MSM8976. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221104172122.252761-6-angelogioacchino.delregno@collabora.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 1 + 1 file changed, 1 insertion(+) commit ff50df9ac28b5a6a93ab8bed58c74ad8f12c756a Author: Adrian Hunter Date: Wed Nov 2 14:01:05 2022 +0200 mmc: Remove duplicate words in comments Remove duplicate words in comments found using the following commands: pcregrep --color=always -n \ '([^a-zA-Z_])([a-zA-Z_]+)[[:space:]]+\2[^a-zA-Z_]' \ drivers/mmc/host/*.[ch] drivers/mmc/core/*.[ch] \ include/linux/mmc/*.h \ include/uapi/linux/mmc/*.h | \ grep -v 'long long' pcregrep --color=always -n -M \ '([^a-zA-Z_])([a-zA-Z_]+)[ \t]*\n[[:space:]*]+\2[^a-zA-Z_]' \ drivers/mmc/host/*.[ch] \ drivers/mmc/core/*.[ch] \ include/linux/mmc/*.h \ include/uapi/linux/mmc/*.h Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221102120105.5747-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 4 ++-- drivers/mmc/core/host.c | 2 +- drivers/mmc/host/sdhci-acpi.c | 2 +- drivers/mmc/host/sdhci-bcm-kona.c | 2 +- drivers/mmc/host/sdhci-omap.c | 2 +- drivers/mmc/host/sdhci.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) commit 654993b3e1eb7ce22e5d5bf5df95730c3fb7013a Author: Matthias Schiffer Date: Tue Nov 1 11:52:42 2022 +0100 mmc: sdhci_am654: Use dev_err_probe() for mmc_of_parse() return code Checking phandle references like mmc-pwrseq can result in -EPROBE_DEFER. Signed-off-by: Matthias Schiffer Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20221101105242.2019036-1-matthias.schiffer@ew.tq-group.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_am654.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc4e9e2aa82a697ff1fccf6dbdd9f648afc7d71a Author: Brian Norris Date: Fri Oct 28 15:56:37 2022 -0700 mmc: sdhci-pci: Set PROBE_PREFER_ASYNCHRONOUS This driver often takes on the order of 10ms to start, but in some cases as much as 190ms. It shouldn't have many cross-device dependencies to race with, nor racy access to shared state with other drivers, so this should be a relatively low risk change. We've done similarly with a variety of other MMC host drivers already. This driver was pinpointed as part of a survey of top slowest initcalls (i.e., are built in, and probing synchronously) on a lab of ChromeOS systems. Signed-off-by: Brian Norris Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20221028155633.1.I6c4bfb31e88fad934e7360242cb662e01612c1bb@changeid Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4fb2786961c517d0a6e4e8bf947d6f7259155d6a Author: Haibo Chen Date: Fri Oct 28 17:04:29 2022 +0800 mmc: sdhci-esdhc-imx: reset the tuning logic before execute tuning For standard tuning method on usdhc, the previous tuning result can impact current tuning result, let current tuning can't set the correct delay cell. And from the logic, this is also reasonable for manual tuning method. So reset the tuning logic before execute tuning. To avoid compile issue, this patch also move the esdhc_reset_tuning() upper. Find this issue when support SDIO WiFi in band wakeup feature. After system resume back, will do re-tuning, but then meet data CRC error. Do not meet this issue on SD/eMMC, because we already call esdhc_reset_tuning() when config the legency ios, and SD/eMMC need to re-init when system resume back, but SDIO device don't do re-init if it has MMC_PM_KEEP_POWER pm_flags. Signed-off-by: Haibo Chen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1666947869-7904-1-git-send-email-haibo.chen@nxp.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 82 ++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 38 deletions(-) commit 08b863bb034cfda73ac2d37faab9d54185f04231 Author: Brian Norris Date: Wed Oct 26 12:42:09 2022 -0700 mmc: sdhci-*: Convert drivers to new sdhci_and_cqhci_reset() An earlier patch ("mmc: cqhci: Provide helper for resetting both SDHCI and CQHCI") does these operations for us. I keep these as a separate patch, since the earlier patch is a prerequisite to some important bugfixes that need to be backported via linux-stable. Signed-off-by: Brian Norris Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20221026124150.v4.7.Ia91f031f5f770af7bd2ff3e28b398f277606d970@changeid Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 10 ++-------- drivers/mmc/host/sdhci-pci-core.c | 11 ++--------- drivers/mmc/host/sdhci-pci-gli.c | 11 ++--------- 3 files changed, 6 insertions(+), 26 deletions(-) commit 0614b0ae13c23d14907369085554eaecbdba8f7d Author: Sai Krishna Potthuri Date: Wed Oct 19 11:18:57 2022 +0530 mmc: sdhci-of-arasan: Add support for dynamic configuration Add dynamic configuration support for Xilinx ZynqMP which takes care of configuring the SD secure space configuration registers using EEMI APIs, performing SD reset assert and deassert. High level sequence: - Check for the PM dynamic configuration support, if no error proceed with SD dynamic configurations(next steps) otherwise skip the dynamic configuration. - Put the SD Controller in reset. - Configure SD Fixed configurations. - Configure the SD Slot Type. - Configure the BASE_CLOCK. - Configure the 8-bit support. - Bring the SD Controller out of reset. - Wait for 1msec delay. Signed-off-by: Sai Krishna Potthuri Acked-by: Michal Simek Link: https://lore.kernel.org/r/20221019054857.8286-1-sai.krishna.potthuri@amd.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 69 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 24e961b93d292d0dd6380213d22a071a99ea787d Author: Sam Shih Date: Tue Oct 25 15:29:53 2022 +0200 mmc: mediatek: add support for MT7986 SoC Adding mt7986 own characteristics and of_device_id to have support of MT7986 SoC. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221025132953.81286-7-linux@fw-web.de Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 1b845c5af4728085eeea9582e2fcbe4c8104fa5e Author: Sam Shih Date: Tue Oct 25 15:29:49 2022 +0200 dt-bindings: mmc: Add support for Mediatek MT7986 This commit adds dt-binding documentation of mmc for Mediatek MT7986 SoC Platform. Add SoC specific section for defining clock configuration. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221025132953.81286-3-linux@fw-web.de Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 0b36b7cd3f1f3df707c98de65b764294c02cc8cc Author: Nícolas F. R. A. Prado Date: Tue Oct 25 15:29:48 2022 +0200 dt-bindings: mmc: mtk-sd: Set clocks based on compatible The binding was describing a single clock list for all platforms, but that's not really suitable: Most platforms using at least 2 clocks (source, hclk), some of them a third "source_cg". Mt2712 requires an extra 'bus_clk' on some of its controllers, while mt8192 requires 8 clocks. Move the clock definitions inside if blocks that match on the compatibles. I used Patch from Nícolas F. R. A. Prado and modified it to not using "not" statement. Fixes: 59a23395d8aa ("dt-bindings: mmc: Add support for MT8192 SoC") Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Frank Wunderlich Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221025132953.81286-2-linux@fw-web.de Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 123 ++++++++++++++++------ 1 file changed, 93 insertions(+), 30 deletions(-) commit 1ad0dcb984c51db655f38ed97bb88545fd55f407 Author: wangjianli Date: Sat Oct 22 14:22:37 2022 +0800 mmc: host: Fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: wangjianli Link: https://lore.kernel.org/r/20221022062237.10333-1-wangjianli@cdjrlc.com Link: https://lore.kernel.org/r/20221022062331.11395-1-wangjianli@cdjrlc.com Link: https://lore.kernel.org/r/20221022062505.13155-1-wangjianli@cdjrlc.com Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 2 +- drivers/mmc/host/sdhci-acpi.c | 2 +- drivers/mmc/host/sdhci-esdhc-imx.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit d7a1830e3ebe065141b8d4781cd931a4128bc421 Author: Giulio Benetti Date: Tue Oct 18 01:56:00 2022 +0200 mmc: sdhci-esdhc-imx: improve imxrt1050 data i.MXRT1050 usdhc is not affected by ESDHC_FLAG_ERR004536 so let's remove it. It supports ESDHC_FLAG_STD_TUNING and ESDHC_FLAG_HAVE_CAP1 so let's add them. Signed-off-by: Giulio Benetti Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/20221017235602.86250-3-giulio.benetti@benettiengineering.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 50bfe185c42a2199b65fc759cb1b2e6a0a915427 Author: Brian Norris Date: Mon Oct 24 11:17:59 2022 -0700 mmc: sdhci-brcmstb: Allow building with COMPILE_TEST This driver is pretty simple, and it can be useful to build it (for validation purposes) without BMIPS or ARCH_BRCMSTB. It technically depends on CONFIG_OF to do anything useful at runtime, but it still works out OK for compile-testing using the !OF stubs. Signed-off-by: Brian Norris Acked-by: Florian Fainelli Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20221024181759.2355583-1-briannorris@chromium.org Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cdb1ad52703b52e95696c38408ee9e3cf514dc4b Author: Adrian Hunter Date: Wed Oct 5 13:19:51 2022 +0300 mmc: wbsd: Replace kmap_atomic() with kmap_local_page() kmap_local_page() is equivalent to kmap_atomic() except that it does not disable page faults or preemption. Where possible kmap_local_page() is preferred to kmap_atomic() - refer kernel highmem documentation. In this case, there is no need to disable page faults or preemption, so replace kmap_atomic() with kmap_local_page(), and, correspondingly, kunmap_atomic() with kunmap_local(). Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-15-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/wbsd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2fc458f75e1c2e8b9b9a7f6a09698994fe10a7aa Author: Adrian Hunter Date: Wed Oct 5 13:19:50 2022 +0300 mmc: au1xmmc: Replace kmap_atomic() with kmap_local_page() kmap_local_page() is equivalent to kmap_atomic() except that it does not disable page faults or preemption. Where possible kmap_local_page() is preferred to kmap_atomic() - refer kernel highmem documentation. In this case, there is no need to disable page faults or preemption, so replace kmap_atomic() with kmap_local_page(), and, correspondingly, kunmap_atomic() with kunmap_local(). Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-14-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/au1xmmc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8e8d695fa567ab4d669cd04b8d655cb736c6ad87 Author: Adrian Hunter Date: Wed Oct 5 13:19:49 2022 +0300 mmc: tmio_mmc_core: Replace kmap_atomic() with kmap_local_page() kmap_local_page() is equivalent to kmap_atomic() except that it does not disable page faults or preemption. Where possible kmap_local_page() is preferred to kmap_atomic() - refer kernel highmem documentation. In this case, there is no need to disable page faults or preemption, so replace kmap_atomic() with kmap_local_page(), and, correspondingly, kunmap_atomic() with kunmap_local(). Signed-off-by: Adrian Hunter Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20221005101951.3165-13-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14c9825f968ccfe34cc606a87e374133feeed7ac Author: Adrian Hunter Date: Wed Oct 5 13:19:48 2022 +0300 mmc: tmio_mmc_core: Remove local_irq_{save,restore}() around k[un]map_atomic() A long time ago the kmap_atomic API required a slot to be provided which risked the possibility that other code might use the same slot at the same time. Disabling interrupts prevented the possibility of an interrupt handler doing that. However, that went away with commit 3e4d3af501cc ("mm: stack based kmap_atomic()"). When the second argument to kmap_atomic was removed by commit 482fce997e14 ("mmc: remove the second argument of k[un]map_atomic()"), local_irq_{save,restore}() should have been removed also. Remove it now. Signed-off-by: Adrian Hunter Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20221005101951.3165-12-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_sys_dmac.c | 5 ++--- drivers/mmc/host/tmio_mmc.h | 7 ++----- drivers/mmc/host/tmio_mmc_core.c | 10 ++++------ 3 files changed, 8 insertions(+), 14 deletions(-) commit 4526cdaf9df8bef093bb9a5b0db09a1978a811f8 Author: Adrian Hunter Date: Wed Oct 5 13:19:47 2022 +0300 mmc: tifm_sd: Replace kmap_atomic() with kmap_local_page() kmap_local_page() is equivalent to kmap_atomic() except that it does not disable page faults or preemption. Where possible kmap_local_page() is preferred to kmap_atomic() - refer kernel highmem documentation. In this case, there is no need to disable page faults or preemption, so replace kmap_atomic() with kmap_local_page(), and, correspondingly, kunmap_atomic() with kunmap_local(). Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-11-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/tifm_sd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 36bbdc3096e160ffe0ba93053e6e11a98ef14691 Author: Adrian Hunter Date: Wed Oct 5 13:19:46 2022 +0300 mmc: tifm_sd: Remove local_irq_{save,restore}() around tifm_sd_bounce_block() tifm_sd_bounce_block() calls functions that ultimate use kmap_atomic() to map pages. A long time ago the kmap_atomic API required a slot to be provided which risked the possibility that other code might use the same slot at the same time. Disabling interrupts prevented the possibility of an interrupt handler doing that. However, that went away with commit 3e4d3af501cc ("mm: stack based kmap_atomic()"). When the second argument to kmap_atomic was removed by commit 482fce997e14 ("mmc: remove the second argument of k[un]map_atomic()"), local_irq_{save,restore}() should have been removed also. Remove it now. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-10-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/tifm_sd.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit b7093c10967e732236bcc5b2e8ba5fc87b5a57a8 Author: Adrian Hunter Date: Wed Oct 5 13:19:45 2022 +0300 mmc: tifm_sd: Remove local_irq_{save,restore}() around tifm_sd_transfer_data() tifm_sd_transfer_data() calls functions that ultimate use kmap_atomic() to map pages. A long time ago the kmap_atomic API required a slot to be provided which risked the possibility that other code might use the same slot at the same time. Disabling interrupts prevented the possibility of an interrupt handler doing that. However, that went away with commit 3e4d3af501cc ("mm: stack based kmap_atomic()"). When the second argument to kmap_atomic was removed by commit 482fce997e14 ("mmc: remove the second argument of k[un]map_atomic()"), local_irq_{save,restore}() should have been removed also. Remove it now. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-9-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/tifm_sd.c | 3 --- 1 file changed, 3 deletions(-) commit 1550217a8b448008d9f590ffe46e1fc3caa3160d Author: Adrian Hunter Date: Wed Oct 5 13:19:44 2022 +0300 mmc: mmc_test: Remove local_irq_{save,restore}() around sg_copy_{from,to}_buffer() sg_copy_{from,to}_buffer() call sg_copy_buffer() which uses an sg_mapping_iter with flag SG_MITER_ATOMIC, so then sg_miter_next() uses kmap_atomic() to map pages. A long time ago the kmap_atomic API required a slot to be provided which risked the possibility that other code might use the same slot at the same time. Disabling interrupts prevented the possibility of an interrupt handler doing that. However, that went away with commit 3e4d3af501cc ("mm: stack based kmap_atomic()"). Remove local_irq_{save,restore}() around sg_copy_{from,to}_buffer(). Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-8-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_test.c | 5 ----- 1 file changed, 5 deletions(-) commit 07e23c14e1d341fa350a6f0659c6ac84544bb7c4 Author: Adrian Hunter Date: Wed Oct 5 13:19:43 2022 +0300 mmc: bcm2835: Replace kmap_atomic() with kmap_local_page() kmap_local_page() is equivalent to kmap_atomic() except that it does not disable page faults or preemption. Where possible kmap_local_page() is preferred to kmap_atomic() - refer kernel highmem documentation. In this case, there is no need to disable page faults or preemption, so replace kmap_atomic() with kmap_local_page(), and, correspondingly, kunmap_atomic() with kunmap_local(). Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-7-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/bcm2835.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e9c9722220057d19d80478c0edda3fbf237a73f7 Author: Adrian Hunter Date: Wed Oct 5 13:19:42 2022 +0300 mmc: bcm2835: Remove local_irq_{save,restore}() around sg_miter_{next,stop}() sg_miter_next() using an sg_mapping_iter with flag SG_MITER_ATOMIC uses kmap_atomic() to map pages. A long time ago the kmap_atomic API required a slot to be provided which risked the possibility that other code might use the same slot at the same time. Disabling interrupts prevented the possibility of an interrupt handler doing that. However, that went away with commit 3e4d3af501cc ("mm: stack based kmap_atomic()"). Remove local_irq_{save,restore}() around sg_miter_{next,stop}(). Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-6-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/bcm2835.c | 5 ----- 1 file changed, 5 deletions(-) commit 8ff683f6a293650a7fa5025f41a164987b585f07 Author: Adrian Hunter Date: Wed Oct 5 13:19:41 2022 +0300 mmc: bcm2835: Remove local_irq_{save,restore}() around k[un]map_atomic() A long time ago the kmap_atomic API required a slot to be provided which risked the possibility that other code might use the same slot at the same time. Disabling interrupts prevented the possibility of an interrupt handler doing that. However, that went away with commit 3e4d3af501cc ("mm: stack based kmap_atomic()"). Unfortunately, that unnecessary pattern of code has been copied since and persists in bcm2385.c. Remove it. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-5-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/bcm2835.c | 3 --- 1 file changed, 3 deletions(-) commit 47722e3fd92482c036be43a4ba62698c8b8b63b8 Author: Adrian Hunter Date: Wed Oct 5 13:19:40 2022 +0300 mmc: sdhci: Replace kmap_atomic() with kmap_local_page() kmap_local_page() is equivalent to kmap_atomic() except that it does not disable page faults or preemption. Where possible kmap_local_page() is preferred to kmap_atomic() - refer kernel highmem documentation. In this case, there is no need to disable page faults or preemption, so replace kmap_atomic() with kmap_local_page(), and, correspondingly, kunmap_atomic() with kunmap_local(). Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-4-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e467c154f748b9fd1b3cbff685b58091b532c90e Author: Adrian Hunter Date: Wed Oct 5 13:19:39 2022 +0300 mmc: sdhci: Remove local_irq_{save,restore}() around sg_miter_{next,stop}() sg_miter_next() using an sg_mapping_iter with flag SG_MITER_ATOMIC uses kmap_atomic() to map pages. A long time ago the kmap_atomic API required a slot to be provided which risked the possibility that other code might use the same slot at the same time. Disabling interrupts prevented the possibility of an interrupt handler doing that. However, that went away with commit 3e4d3af501cc ("mm: stack based kmap_atomic()"). Remove local_irq_{save,restore}() around sg_miter_{next,stop}(). Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-3-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 10 ---------- 1 file changed, 10 deletions(-) commit 4438592c920bbfdf3c584aa51779f1a84526eb72 Author: Adrian Hunter Date: Wed Oct 5 13:19:38 2022 +0300 mmc: sdhci: Remove local_irq_{save,restore}() around k[un]map_atomic() A long time ago the kmap_atomic API required a slot to be provided which risked the possibility that other code might use the same slot at the same time. Disabling interrupts prevented the possibility of an interrupt handler doing that. However, that went away with commit 3e4d3af501cc ("mm: stack based kmap_atomic()"). When the second argument to kmap_atomic was removed by commit 482fce997e14 ("mmc: remove the second argument of k[un]map_atomic()"), local_irq_{save,restore}() should have been removed also. Remove it now. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20221005101951.3165-2-adrian.hunter@intel.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 2ab441f9c2d4266c3a392b2d07832608a5e647e4 Author: Marek Vasut Date: Fri Oct 14 00:12:40 2022 +0200 dt-bindings: mmc: arm,pl18x: Document interrupt-names is ignored Due to inconsistency of existing DTs regarding the content of this IP interrupt-names DT property, document this such that interrupt-names is not used by this IP bindings. Signed-off-by: Marek Vasut Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221013221242.218808-1-marex@denx.de Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/arm,pl18x.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2505d7a3f364bcb24b57627a5a80552ee03bd590 Author: Matt Ranostay Date: Wed Oct 12 19:40:21 2022 -0700 dt-bindings: mmc: sdhci-am654: add ti,itap-del-sel-ddr50 to schema Add missing ti,itap-del-sel-ddr50 property to schema to clear up the following warnings. mmc@4fb0000: Unevaluated properties are not allowed ('ti,itap-del-sel-ddr50' was unexpected) Signed-off-by: Matt Ranostay Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221013024021.121104-1-mranostay@ti.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-am654.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit c2a2130634922869c2c2cc4c14115d2454ef153f Author: Geert Uytterhoeven Date: Wed Oct 12 09:05:56 2022 +0200 dt-bindings: mmc: renesas,sdhi: Document R-Car V4H support Document support for the SD Card/MMC Interface on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/7ee7fdb6a46fc9f0e50c2b803ede6b4b2fdfa450.1665558324.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml | 1 + 1 file changed, 1 insertion(+) commit e896dbd3239db99f5edf080780f9a0867ca53b28 Author: Peng Fan Date: Mon Oct 10 18:11:38 2022 +0800 dt-bindings: mmc: fsl-imx-esdhc: update i.MX8DXL compatible i.MX8DXL is compatible with i.MX8QXP, so update binding doc. Signed-off-by: Peng Fan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221010101138.295332-1-peng.fan@oss.nxp.com Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 98c738c8cee6e5a58d4060862e2f8cf3cdc8a328 Author: Nathan Lynch Date: Fri Nov 18 09:07:47 2022 -0600 powerpc/rtas: mandate RTAS syscall filtering CONFIG_PPC_RTAS_FILTER has been optional but default-enabled since its introduction. It's been enabled in enterprise distro kernels for a while without causing ABI breakage that wasn't easily fixed, and it prevents harmful abuses of the rtas syscall. Let's make it unconditional. Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221118150751.469393-10-nathanl@linux.ibm.com arch/powerpc/Kconfig | 13 ------------- arch/powerpc/kernel/rtas.c | 16 ---------------- 2 files changed, 29 deletions(-) commit f975b6559bac510f1b1b39637997bb240f0a9969 Author: Nathan Lynch Date: Fri Nov 18 09:07:46 2022 -0600 powerpc/rtas: define pr_fmt and convert printk call sites Set pr_fmt to "rtas: " and convert the handful of printk() uses in rtas.c, adjusting the messages to remove now-redundant "RTAS" strings. Note that rtas_restart(), rtas_power_off(), and rtas_halt() all currently use printk() without specifying a log level. These have been changed to use pr_emerg(), which matches the behavior of rtas_os_term(). Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221118150751.469393-9-nathanl@linux.ibm.com arch/powerpc/kernel/rtas.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 9581f8a00777a073fdd8146659a51ca007cae8d6 Author: Nathan Lynch Date: Fri Nov 18 09:07:45 2022 -0600 powerpc/rtas: clean up includes rtas.c used to host complex code related to pseries-specific guest migration and suspend, which used atomics, completions, hcalls, and CPU hotplug APIs. That's all been deleted or moved, so remove the include directives that have been rendered unnecessary. Sort the remainder (with linux/ before asm/) to impose some order on where future additions go. Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221118150751.469393-8-nathanl@linux.ibm.com arch/powerpc/kernel/rtas.c | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) commit c67a0e411d0ffe0648fe84e25e9f899ce770feb3 Author: Nathan Lynch Date: Fri Nov 18 09:07:44 2022 -0600 powerpc/rtas: clean up rtas_error_log_max initialization The code in rtas_get_error_log_max() doesn't cause problems in practice, but there are no measures to ensure that the lazy initialization of the static rtas_error_log_max variable is atomic, and it's not worth adding them. Initialize the static rtas_error_log_max variable at boot when we're single-threaded instead of lazily on first use. Use the more appropriate of_property_read_u32() API instead of rtas_token() to consult the "rtas-error-log-max" property, which is not the name of an RTAS function. Convert use of printk() to pr_warn() and distinguish the possible error cases. Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221118150751.469393-7-nathanl@linux.ibm.com arch/powerpc/kernel/rtas.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) commit 9aafbfa5f57a4b75bafd3bed0191e8429c5fa618 Author: Nathan Lynch Date: Fri Nov 18 09:07:43 2022 -0600 powerpc/pseries/eeh: use correct API for error log size rtas-error-log-max is not the name of an RTAS function, so rtas_token() is not the appropriate API for retrieving its value. We already have rtas_get_error_log_max() which returns a sensible value if the property is absent for any reason, so use that instead. Fixes: 8d633291b4fc ("powerpc/eeh: pseries platform EEH error log retrieval") Signed-off-by: Nathan Lynch [mpe: Drop no-longer possible error handling as noticed by ajd] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221118150751.469393-6-nathanl@linux.ibm.com arch/powerpc/platforms/pseries/eeh_pseries.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit a2220b54589b1d2a404f6eb5f6bc3c0ace2b504f Merge: f82389eecdd2 84ad3642115d Author: Paolo Abeni Date: Wed Dec 7 12:28:06 2022 +0100 Merge branch 'cn10kb-mac-block-support' Hariprasad Kelam says: ==================== CN10KB MAC block support OcteonTx2's next gen platform the CN10KB has RPM_USX MAC which has a different serdes when compared to RPM MAC. Though the underlying HW is different, the CSR interface has been designed largely inline with RPM MAC, with few exceptions though. So we are using the same CGX driver for RPM_USX MAC as well and will have a different set of APIs for RPM_USX where ever necessary. The RPM and RPM_USX blocks support a different number of LMACS. RPM_USX support 8 LMACS per MAC block whereas legacy RPM supports only 4 LMACS per MAC. with this RPM_USX support double the number of DMAC filters and fifo size. This patchset adds initial support for CN10KB's RPM_USX MAC i.e registering the driver and defining MAC operations (mac_ops). With these changes PF and VF netdev packet path will work and PF and VF netdev drivers are able to configure MAC features like pause frames,PFC and loopback etc. Also implements FEC stats for CN10K Mac block RPM and CN10KB Mac block RPM_USX and extends ethtool support for PF and VF drivers by defining get_fec_stats API to display FEC stats. ==================== Link: https://lore.kernel.org/r/20221205070521.21860-1-hkelam@marvell.com Signed-off-by: Paolo Abeni commit 84ad3642115dfc2f17b6bd98e0470f799b8411e3 Author: Hariprasad Kelam Date: Mon Dec 5 12:35:21 2022 +0530 octeontx2-af: Add FEC stats for RPM/RPM_USX block CN10K silicon MAC block RPM and CN10KB silicon MAC block RPM_USX both support BASER and RSFEC modes. Also MAC (CGX) on OcteonTx2 silicon variants and MAC (RPM) on OcteonTx3 CN10K are different and FEC stats need to be read differently. CN10KB MAC block (RPM_USX) fec csr offsets are same as CN10K MAC block (RPM) mac_ops points to same fn(). Upper layer interface between RVU AF and PF netdev is kept same. Based on silicon variant appropriate fn() pointer is called to read FEC stats Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Paolo Abeni drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 5 ++ .../ethernet/marvell/octeontx2/af/lmac_common.h | 3 ++ drivers/net/ethernet/marvell/octeontx2/af/rpm.c | 58 ++++++++++++++++++++++ drivers/net/ethernet/marvell/octeontx2/af/rpm.h | 14 +++++- .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 4 +- 5 files changed, 82 insertions(+), 2 deletions(-) commit b441c4ac5ea37251d6acabe679215a828025004b Author: Hariprasad Kelam Date: Mon Dec 5 12:35:20 2022 +0530 octeontx2-pf: ethtool: Implement get_fec_stats This patch registers a callback for get_fec_stats such that FEC stats can be queried from the below command "ethtool -I --show-fec eth0" Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Paolo Abeni .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit b9d0fedc6234011d67f6e2ba0ae1a8de6beca010 Author: Hariprasad Kelam Date: Mon Dec 5 12:35:19 2022 +0530 octeontx2-af: cn10kb: Add RPM_USX MAC support OcteonTx2's next gen platform the CN10KB has RPM_USX MAC which has a different serdes when compared to RPM MAC. Though the underlying HW is different, the CSR interface has been designed largely inline with RPM MAC, with few exceptions though. So we are using the same CGX driver for RPM_USX MAC as well and will have a different set of APIs for RPM_USX where ever necessary. The RPM and RPM_USX blocks support a different number of LMACS. RPM_USX support 8 LMACS per MAC block whereas legacy RPM supports only 4 LMACS per MAC. with this RPM_USX support double the number of DMAC filters and fifo size. This patch adds initial support for CN10KB's RPM_USX MAC i.e registering the driver and defining MAC operations (mac_ops). Adds the logic to configure internal loopback and pause frames and assign FIFO length to LMACS. Kernel reads lmac features like lmac type, autoneg, etc from shared firmware data this structure only supports 4 lmacs per MAC, this patch extends this structure to accommodate 8 lmacs. Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Paolo Abeni drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 38 +++- drivers/net/ethernet/marvell/octeontx2/af/cgx.h | 3 +- .../ethernet/marvell/octeontx2/af/lmac_common.h | 7 +- drivers/net/ethernet/marvell/octeontx2/af/rpm.c | 204 ++++++++++++++++++--- drivers/net/ethernet/marvell/octeontx2/af/rpm.h | 22 +++ drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 10 +- .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 19 +- .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 8 +- 8 files changed, 270 insertions(+), 41 deletions(-) commit f2e664ad503d4e5ce7c42a0862ab164331a0ef37 Author: Rakesh Babu Saladi Date: Mon Dec 5 12:35:18 2022 +0530 octeontx2-af: Support variable number of lmacs Most of the code in CGX/RPM driver assumes that max lmacs per given MAC as always, 4 and the number of MAC blocks also as 4. With this assumption, the max number of interfaces supported is hardcoded to 16. This creates a problem as next gen CN10KB silicon MAC supports 8 lmacs per MAC block. This patch solves the problem by using "max lmac per MAC block" value from constant csrs and uses cgx_cnt_max value which is populated based number of MAC blocks supported by silicon. Signed-off-by: Rakesh Babu Saladi Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Paolo Abeni drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 35 ++++++++++------------ drivers/net/ethernet/marvell/octeontx2/af/cgx.h | 6 ++-- .../ethernet/marvell/octeontx2/af/lmac_common.h | 5 +++- drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 2 +- .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 26 +++++++++------- .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 2 +- .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 2 +- .../ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 4 ++- 8 files changed, 42 insertions(+), 40 deletions(-) commit 6c606e57eecc37d6b36d732b1ff7e55b7dc32dd4 Author: Nathan Lynch Date: Fri Nov 18 09:07:42 2022 -0600 powerpc/rtas: avoid scheduling in rtas_os_term() It's unsafe to use rtas_busy_delay() to handle a busy status from the ibm,os-term RTAS function in rtas_os_term(): Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b BUG: sleeping function called from invalid context at arch/powerpc/kernel/rtas.c:618 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 1, name: swapper/0 preempt_count: 2, expected: 0 CPU: 7 PID: 1 Comm: swapper/0 Tainted: G D 6.0.0-rc5-02182-gf8553a572277-dirty #9 Call Trace: [c000000007b8f000] [c000000001337110] dump_stack_lvl+0xb4/0x110 (unreliable) [c000000007b8f040] [c0000000002440e4] __might_resched+0x394/0x3c0 [c000000007b8f0e0] [c00000000004f680] rtas_busy_delay+0x120/0x1b0 [c000000007b8f100] [c000000000052d04] rtas_os_term+0xb8/0xf4 [c000000007b8f180] [c0000000001150fc] pseries_panic+0x50/0x68 [c000000007b8f1f0] [c000000000036354] ppc_panic_platform_handler+0x34/0x50 [c000000007b8f210] [c0000000002303c4] notifier_call_chain+0xd4/0x1c0 [c000000007b8f2b0] [c0000000002306cc] atomic_notifier_call_chain+0xac/0x1c0 [c000000007b8f2f0] [c0000000001d62b8] panic+0x228/0x4d0 [c000000007b8f390] [c0000000001e573c] do_exit+0x140c/0x1420 [c000000007b8f480] [c0000000001e586c] make_task_dead+0xdc/0x200 Use rtas_busy_delay_time() instead, which signals without side effects whether to attempt the ibm,os-term RTAS call again. Signed-off-by: Nathan Lynch Reviewed-by: Nicholas Piggin Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221118150751.469393-5-nathanl@linux.ibm.com arch/powerpc/kernel/rtas.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ed2213bfb192ab51f09f12e9b49b5d482c6493f3 Author: Nathan Lynch Date: Fri Nov 18 09:07:41 2022 -0600 powerpc/rtas: avoid device tree lookups in rtas_os_term() rtas_os_term() is called during panic. Its behavior depends on a couple of conditions in the /rtas node of the device tree, the traversal of which entails locking and local IRQ state changes. If the kernel panics while devtree_lock is held, rtas_os_term() as currently written could hang. Instead of discovering the relevant characteristics at panic time, cache them in file-static variables at boot. Note the lookup for "ibm,extended-os-term" is converted to of_property_read_bool() since it is a boolean property, not an RTAS function token. Signed-off-by: Nathan Lynch Reviewed-by: Nicholas Piggin Reviewed-by: Andrew Donnellan [mpe: Incorporate suggested change from Nick] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221118150751.469393-4-nathanl@linux.ibm.com arch/powerpc/kernel/rtas.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit b10af504a2015d12c566b6b0a4c7e3b602949eeb Author: Nathan Lynch Date: Fri Nov 18 09:07:40 2022 -0600 powerpc/rtasd: use correct OF API for event scan rate rtas_token() should be used only for properties that are RTAS function tokens. "rtas-event-scan-rate" does not contain a function token, but it has the same size/format as token properties so reading it with rtas_token() happens to work. Convert to of_property_read_u32(). Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221118150751.469393-3-nathanl@linux.ibm.com arch/powerpc/kernel/rtasd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 336e2554ec99eb97616004c791ee89abe96bdab2 Author: Nathan Lynch Date: Fri Nov 18 09:07:39 2022 -0600 powerpc/rtas: document rtas_call() rtas_call() has a complex calling convention, non-standard return values, and many users. Add kernel-doc for it and remove the less structured commentary from rtas.h. Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221118150751.469393-2-nathanl@linux.ibm.com arch/powerpc/include/asm/rtas.h | 15 ----------- arch/powerpc/kernel/rtas.c | 58 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 15 deletions(-) commit f82389eecdd24a50f0d33d58127aeacc48d53511 Merge: e22dcbc9aa32 55a952eef70a Author: Paolo Abeni Date: Wed Dec 7 11:58:00 2022 +0100 Merge branch 'net-dsa-microchip-add-mtu-support-for-ksz8-series' Oleksij Rempel says: ==================== net: dsa: microchip: add MTU support for KSZ8 series ==================== Link: https://lore.kernel.org/r/20221205052232.2834166-1-o.rempel@pengutronix.de Signed-off-by: Paolo Abeni commit 55a952eef70a51340afdf080ecf81dd2b7bbf952 Author: Oleksij Rempel Date: Mon Dec 5 06:22:32 2022 +0100 net: dsa: microchip: ksz8: move all DSA configurations to one location To make the code more comparable to KSZ9477 code, move DSA configurations to the same location. Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8795.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 6b30cfa86ee703dc75743d56b078661753a18da3 Author: Oleksij Rempel Date: Mon Dec 5 06:22:31 2022 +0100 net: dsa: microchip: enable MTU normalization for KSZ8795 and KSZ9477 compatible switches KSZ8795 and KSZ9477 compatible series of switches use global max frame size configuration register. So, enable MTU normalization for this reason. Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8795.c | 2 ++ drivers/net/dsa/microchip/ksz9477.c | 2 ++ 2 files changed, 4 insertions(+) commit 29d1e85f45e03c9fd1b8985f983f33c021e130c8 Author: Oleksij Rempel Date: Mon Dec 5 06:22:30 2022 +0100 net: dsa: microchip: ksz8: add MTU configuration support Make MTU configurable on KSZ87xx and KSZ88xx series of switches. Before this patch, pre-configured behavior was different on different switch series, due to opposite meaning of the same bit: - KSZ87xx: Reg 4, Bit 1 - if 1, max frame size is 1532; if 0 - 1514 - KSZ88xx: Reg 4, Bit 1 - if 1, max frame size is 1514; if 0 - 1532 Since the code was telling "... SW_LEGAL_PACKET_DISABLE, true)", I assume, the idea was to set max frame size to 1532. With this patch, by setting MTU size 1500, both switch series will be configured to the 1532 frame limit. This patch was tested on KSZ8873. Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz8.h | 1 + drivers/net/dsa/microchip/ksz8795.c | 53 +++++++++++++++++++++++++++++++-- drivers/net/dsa/microchip/ksz8795_reg.h | 3 ++ drivers/net/dsa/microchip/ksz_common.c | 7 +++++ drivers/net/dsa/microchip/ksz_common.h | 4 +++ 5 files changed, 66 insertions(+), 2 deletions(-) commit 6f1b986a43ce9aa67b11a7e54ac75530705d04e7 Author: Oleksij Rempel Date: Mon Dec 5 06:22:29 2022 +0100 net: dsa: microchip: add ksz_rmw8() function Add ksz_rmw8(), it will be used in the next patch. Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Reviewed-by: Florian Fainelli Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz_common.h | 5 +++++ 1 file changed, 5 insertions(+) commit 1d0a1a6d0d63db5bba73abe862180c947861f4d4 Author: Oleksij Rempel Date: Mon Dec 5 06:22:28 2022 +0100 net: dsa: microchip: do not store max MTU for all ports If we have global MTU configuration, it is enough to configure it on CPU port only. Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz9477.c | 14 +++++--------- drivers/net/dsa/microchip/ksz_common.h | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) commit 838c19f89454cab177ed6f74ab61ad32db1764c5 Author: Oleksij Rempel Date: Mon Dec 5 06:22:27 2022 +0100 net: dsa: microchip: move max mtu to one location There are no HW specific registers, so we can process all of them in one location. Signed-off-by: Oleksij Rempel Tested-by: Arun Ramadoss (KSZ9893 and LAN937x) Signed-off-by: Paolo Abeni drivers/net/dsa/microchip/ksz9477.c | 5 ----- drivers/net/dsa/microchip/ksz9477.h | 1 - drivers/net/dsa/microchip/ksz9477_reg.h | 2 -- drivers/net/dsa/microchip/ksz_common.c | 22 +++++++++++++++++----- drivers/net/dsa/microchip/ksz_common.h | 3 ++- 5 files changed, 19 insertions(+), 14 deletions(-) commit e22dcbc9aa329e7902a8c9f8d11aba74f5d7c97d Author: Yuan Can Date: Mon Dec 5 03:43:39 2022 +0000 net: ethernet: mtk_wed: Fix missing of_node_put() in mtk_wed_wo_hardware_init() The np needs to be released through of_node_put() in the error handling path of mtk_wed_wo_hardware_init(). Fixes: 799684448e3e ("net: ethernet: mtk_wed: introduce wed wo support") Signed-off-by: Yuan Can Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20221205034339.112163-1-yuancan@huawei.com Signed-off-by: Paolo Abeni drivers/net/ethernet/mediatek/mtk_wed_wo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit f6aa37c51ec0d053ee34c235bfe0e666618a3baf Author: Laurent Dufour Date: Mon Nov 14 17:01:50 2022 +0100 powerpc/pseries: unregister VPA when hot unplugging a CPU The VPA should unregister when offlining a CPU. Otherwise there could be a short window where 2 CPUs could share the same VPA. This happens because the hypervisor is still keeping the VPA attached to the vCPU even if it became offline. Here is a potential situation: 1. remove proc A, 2. add proc B. If proc B gets proc A's place in cpu_present_mask, then it registers proc A's VPAs. 3. If proc B is then re-added to the LP, its threads are sharing VPAs with proc A briefly as they come online. As the hypervisor may check for the VPA's yield_count field oddity, it may detect an unexpected value and kill the LPAR. Suggested-by: Nathan Lynch Signed-off-by: Laurent Dufour Reviewed-by: Nathan Lynch [mpe: s/cpu_present_map/cpu_present_mask/ in change log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114160150.13554-1-ldufour@linux.ibm.com arch/powerpc/platforms/pseries/hotplug-cpu.c | 1 + 1 file changed, 1 insertion(+) commit 9b574cfab7d4e68c67c4ee4fcde912ef54a25b88 Author: Laurent Dufour Date: Fri Nov 25 18:32:04 2022 +0100 powerpc/pseries: reset the RCU watchdogs after a LPM The RCU watchdog timer should be reset when restarting the CPU after a Live Partition Mobility operation. Signed-off-by: Laurent Dufour Acked-by: Nicholas Piggin [mpe: Combine comments into a single comment block] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221125173204.15329-1-ldufour@linux.ibm.com arch/powerpc/platforms/pseries/mobility.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 340a4a9f8773e102cc5ef531665970a686dfa245 Author: Laurent Dufour Date: Thu Nov 10 19:06:19 2022 +0100 powerpc: Take in account addition CPU node when building kexec FDT On a system with a large number of CPUs, the creation of the FDT for a kexec kernel may fail because the allocated FDT is not large enough. When this happens, such a message is displayed on the console: Unable to add ibm,processor-vadd-size property: FDT_ERR_NOSPACE The property's name may change depending when the buffer overwrite is detected. Obviously the created FDT is missing information, and it is expected that system dump or kexec kernel failed to run properly. When the FDT is allocated, the size of the FDT the kernel received at boot time is used and an extra size can be applied. Currently, only memory added after boot time is taken in account, not the CPU nodes. The extra size should take in account these additional CPU nodes and compute the required extra space. To achieve that, the size of a CPU node, including its subnode is computed once and multiplied by the number of additional CPU nodes. The assumption is that the size of the CPU node is _same_ for all the node, the only variable part should be the name "PowerPC,POWERxx@##" where "##" may vary a little. Signed-off-by: Laurent Dufour [mpe: Don't shadow function name w/variable, minor coding style changes] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221110180619.15796-3-ldufour@linux.ibm.com arch/powerpc/kexec/file_load_64.c | 59 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) commit e13d23a404f2e6dfaf8b1ef7d161a0836fce4fa5 Author: Laurent Dufour Date: Thu Nov 10 19:06:18 2022 +0100 powerpc: export the CPU node count At boot time, the FDT is parsed to compute the number of CPUs. In addition count the number of CPU nodes and export it. This is useful when building the FDT for a kexeced kernel since we need to take in account the CPU node added since the boot time during CPU hotplug operations. Signed-off-by: Laurent Dufour Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221110180619.15796-2-ldufour@linux.ibm.com arch/powerpc/include/asm/prom.h | 1 + arch/powerpc/kernel/prom.c | 3 +++ 2 files changed, 4 insertions(+) commit d074f0aebde5649f7a9f1807551efc019b8e81c4 Author: ye xingchen Date: Wed Dec 7 16:32:18 2022 +0800 RDMA/hfi1: 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 Link: https://lore.kernel.org/r/202212071632188074249@zte.com.cn Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdbbae241a04f387ba910b8609f95fad5f1470c7 Author: Bartosz Golaszewski Date: Mon Dec 5 13:39:03 2022 +0100 gpiolib: protect the GPIO device against being dropped while in use by user-space While any of the GPIO cdev syscalls is in progress, the kernel can call gpiochip_remove() (for instance, when a USB GPIO expander is disconnected) which will set gdev->chip to NULL after which any subsequent access will cause a crash. To avoid that: use an RW-semaphore in which the syscalls take it for reading (so that we don't needlessly prohibit the user-space from calling syscalls simultaneously) while gpiochip_remove() takes it for writing so that it can only happen once all syscalls return. Fixes: d7c51b47ac11 ("gpio: userspace ABI for reading/writing GPIO lines") Fixes: 3c0d9c635ae2 ("gpiolib: cdev: support GPIO_V2_GET_LINE_IOCTL and GPIO_V2_LINE_GET_VALUES_IOCTL") Fixes: aad955842d1c ("gpiolib: cdev: support GPIO_V2_GET_LINEINFO_IOCTL and GPIO_V2_GET_LINEINFO_WATCH_IOCTL") Fixes: a54756cb24ea ("gpiolib: cdev: support GPIO_V2_LINE_SET_CONFIG_IOCTL") Fixes: 7b8e00d98168 ("gpiolib: cdev: support GPIO_V2_LINE_SET_VALUES_IOCTL") Signed-off-by: Bartosz Golaszewski [Nick: fixed a build failure with CDEV_V1 disabled] Co-authored-by: Nick Hainke Reviewed-by: Kent Gibson Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij drivers/gpio/gpiolib-cdev.c | 177 +++++++++++++++++++++++++++++++++++++------- drivers/gpio/gpiolib.c | 4 + drivers/gpio/gpiolib.h | 5 ++ 3 files changed, 161 insertions(+), 25 deletions(-) commit 533aae7c94dbc2b14301cfd68ae7e0e90f0c8438 Author: Bartosz Golaszewski Date: Mon Dec 5 13:39:02 2022 +0100 gpiolib: cdev: fix NULL-pointer dereferences There are several places where we can crash the kernel by requesting lines, unbinding the GPIO device, then calling any of the system calls relevant to the GPIO character device's annonymous file descriptors: ioctl(), read(), poll(). While I observed it with the GPIO simulator, it will also happen for any of the GPIO devices that can be hot-unplugged - for instance any HID GPIO expander (e.g. CP2112). This affects both v1 and v2 uAPI. This fixes it partially by checking if gdev->chip is not NULL but it doesn't entirely remedy the situation as we still have a race condition in which another thread can remove the device after the check. Fixes: d7c51b47ac11 ("gpio: userspace ABI for reading/writing GPIO lines") Fixes: 3c0d9c635ae2 ("gpiolib: cdev: support GPIO_V2_GET_LINE_IOCTL and GPIO_V2_LINE_GET_VALUES_IOCTL") Fixes: aad955842d1c ("gpiolib: cdev: support GPIO_V2_GET_LINEINFO_IOCTL and GPIO_V2_GET_LINEINFO_WATCH_IOCTL") Fixes: a54756cb24ea ("gpiolib: cdev: support GPIO_V2_LINE_SET_CONFIG_IOCTL") Fixes: 7b8e00d98168 ("gpiolib: cdev: support GPIO_V2_LINE_SET_VALUES_IOCTL") Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij drivers/gpio/gpiolib-cdev.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit ed883bec679b027b198d57a336715f8298fb88b4 Author: Lorenzo Bianconi Date: Mon Dec 5 12:34:42 2022 +0100 net: ethernet: mtk_wed: add reset to rx_ring_setup callback This patch adds reset parameter to mtk_wed_rx_ring_setup signature in order to align rx_ring_setup callback to tx_ring_setup one introduced in 'commit 23dca7a90017 ("net: ethernet: mtk_wed: add reset to tx_ring_setup callback")' Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/29c6e7a5469e784406cf3e2920351d1207713d05.1670239984.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_wed.c | 20 +++++++++++++------- drivers/net/wireless/mediatek/mt76/dma.c | 2 +- include/linux/soc/mediatek/mtk_wed.h | 8 ++++---- 3 files changed, 18 insertions(+), 12 deletions(-) commit e3bd74c3d1907360a37f49a0cdf02daa2983ff53 Author: zhang songyi Date: Mon Dec 5 14:22:15 2022 +0800 net: microchip: vcap: Remove unneeded semicolons Semicolons after "}" are not needed. Signed-off-by: zhang songyi Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/202212051422158113766@zte.com.cn Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/vcap/vcap_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ab586f5177b3b2805a05aa926a5b46d3d7f112c Author: ye xingchen Date: Mon Dec 5 10:21:45 2022 +0800 sfc: 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 Reviewed-by: Leon Romanovsky Acked-by: Martin Habets Link: https://lore.kernel.org/r/202212051021451139126@zte.com.cn Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/efx_common.c | 2 +- drivers/net/ethernet/sfc/siena/efx_common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7ff5d60f18bba5cbaf17b2926aa9da44d5beca01 Author: Shang XiaoJing Date: Sun Dec 4 16:27:57 2022 +0800 remoteproc: qcom: q6v5: Fix missing clk_disable_unprepare() in q6v5_wcss_qcs404_power_on() q6v5_wcss_qcs404_power_on() have no fail path for readl_poll_timeout(). Add fail path for readl_poll_timeout(). Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404") Signed-off-by: Shang XiaoJing Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204082757.18850-1-shangxiaojing@huawei.com drivers/remoteproc/qcom_q6v5_wcss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 38e7d9c19276832ebb0277f415b9214bf7baeb37 Author: Yuan Can Date: Sat Dec 3 07:06:39 2022 +0000 remoteproc: qcom_q6v5_pas: Fix missing of_node_put() in adsp_alloc_memory_region() The pointer node is returned by of_parse_phandle() with refcount incremented. We should use of_node_put() on it when done. Fixes: b9e718e950c3 ("remoteproc: Introduce Qualcomm ADSP PIL") Signed-off-by: Yuan Can Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221203070639.15128-1-yuancan@huawei.com drivers/remoteproc/qcom_q6v5_pas.c | 1 + 1 file changed, 1 insertion(+) commit 34d01df00b84127be04c914fc9f8e8be1fcdf851 Author: Luca Weiss Date: Fri Nov 18 10:08:16 2022 +0100 remoteproc: qcom_q6v5_pas: detach power domains on remove We need to detach from the power domains also on remove, not just on probe fail so a subsequent probe works as expected. Otherwise the following error appears on re-probe: [ 29.452005] sysfs: cannot create duplicate filename '/devices/genpd:0:3000000.remoteproc' [ 29.477121] CPU: 1 PID: 483 Comm: sh Tainted: G W 6.1.0-rc4-00075-g71a113770bda #78 [ 29.510319] Hardware name: Fairphone 4 (DT) [ 29.538335] Call trace: [ 29.564470] dump_backtrace.part.0+0xe0/0xf0 [ 29.592602] show_stack+0x18/0x30 [ 29.619616] dump_stack_lvl+0x64/0x80 [ 29.646834] dump_stack+0x18/0x34 [ 29.673541] sysfs_warn_dup+0x60/0x7c [ 29.700592] sysfs_create_dir_ns+0xec/0x110 [ 29.728057] kobject_add_internal+0xb8/0x374 [ 29.755530] kobject_add+0x9c/0x104 [ 29.782072] device_add+0xbc/0x8a0 [ 29.808445] device_register+0x20/0x30 [ 29.835175] genpd_dev_pm_attach_by_id+0xa4/0x190 [ 29.862851] genpd_dev_pm_attach_by_name+0x3c/0xb0 [ 29.890472] dev_pm_domain_attach_by_name+0x20/0x30 [ 29.918212] adsp_probe+0x278/0x580 [ 29.944384] platform_probe+0x68/0xc0 [ 29.970603] really_probe+0xbc/0x2dc [ 29.996662] __driver_probe_device+0x78/0xe0 [ 30.023491] device_driver_attach+0x48/0xac [ 30.050215] bind_store+0xb8/0x114 [ 30.075957] drv_attr_store+0x24/0x3c [ 30.101874] sysfs_kf_write+0x44/0x54 [ 30.127751] kernfs_fop_write_iter+0x120/0x1f0 [ 30.154448] vfs_write+0x1ac/0x380 [ 30.179937] ksys_write+0x70/0x104 [ 30.205274] __arm64_sys_write+0x1c/0x2c [ 30.231060] invoke_syscall+0x48/0x114 [ 30.256594] el0_svc_common.constprop.0+0x44/0xec [ 30.283183] do_el0_svc+0x2c/0xd0 [ 30.308320] el0_svc+0x2c/0x84 [ 30.333059] el0t_64_sync_handler+0xf4/0x120 [ 30.359001] el0t_64_sync+0x18c/0x190 [ 30.384385] kobject_add_internal failed for genpd:0:3000000.remoteproc with -EEXIST, don't try to register things with the same name in the same directory. [ 30.406029] remoteproc remoteproc0: releasing 3000000.remoteproc [ 30.416064] qcom_q6v5_pas: probe of 3000000.remoteproc failed with error -17 Fixes: 17ee2fb4e856 ("remoteproc: qcom: pas: Vote for active/proxy power domains") Reviewed-by: Sibi Sankar Reviewed-by: Mukesh Ojha Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221118090816.100012-2-luca.weiss@fairphone.com drivers/remoteproc/qcom_q6v5_pas.c | 1 + 1 file changed, 1 insertion(+) commit 9a70551996e699fda262e8d54bbd41739d7aad6d Author: Luca Weiss Date: Fri Nov 18 10:08:15 2022 +0100 remoteproc: qcom_q6v5_pas: disable wakeup on probe fail or remove Leaving wakeup enabled during probe fail (-EPROBE_DEFER) or remove makes the subsequent probe fail. [ 3.749454] remoteproc remoteproc0: releasing 3000000.remoteproc [ 3.752949] qcom_q6v5_pas: probe of 3000000.remoteproc failed with error -17 [ 3.878935] remoteproc remoteproc0: releasing 4080000.remoteproc [ 3.887602] qcom_q6v5_pas: probe of 4080000.remoteproc failed with error -17 [ 4.319552] remoteproc remoteproc0: releasing 8300000.remoteproc [ 4.332716] qcom_q6v5_pas: probe of 8300000.remoteproc failed with error -17 Fix this by disabling wakeup in both cases so the driver can properly probe on the next try. Fixes: a781e5aa5911 ("remoteproc: core: Prevent system suspend during remoteproc recovery") Fixes: dc86c129b4fb ("remoteproc: qcom: pas: Mark devices as wakeup capable") Reviewed-by: Mukesh Ojha Signed-off-by: Luca Weiss Reviewed-by: Caleb Connolly Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221118090816.100012-1-luca.weiss@fairphone.com drivers/remoteproc/qcom_q6v5_pas.c | 2 ++ 1 file changed, 2 insertions(+) commit f360e2b275efbb745ba0af8b47d9ef44221be586 Author: Shang XiaoJing Date: Fri Nov 25 10:16:41 2022 +0800 remoteproc: qcom: q6v5: Fix potential null-ptr-deref in q6v5_wcss_init_mmio() q6v5_wcss_init_mmio() will call platform_get_resource_byname() that may fail and return NULL. devm_ioremap() will use res->start as input, which may causes null-ptr-deref. Check the ret value of platform_get_resource_byname() to avoid the null-ptr-deref. Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404") Signed-off-by: Shang XiaoJing Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221125021641.29392-1-shangxiaojing@huawei.com drivers/remoteproc/qcom_q6v5_wcss.c | 3 +++ 1 file changed, 3 insertions(+) commit e01ce676aaef3b13d02343d7e70f9637d93a3367 Author: Gaosheng Cui Date: Tue Nov 29 18:56:50 2022 +0800 remoteproc: sysmon: fix memory leak in qcom_add_sysmon_subdev() The kfree() should be called when of_irq_get_byname() fails or devm_request_threaded_irq() fails in qcom_add_sysmon_subdev(), otherwise there will be a memory leak, so add kfree() to fix it. Fixes: 027045a6e2b7 ("remoteproc: qcom: Add shutdown-ack irq") Signed-off-by: Gaosheng Cui Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221129105650.1539187-1-cuigaosheng1@huawei.com drivers/remoteproc/qcom_sysmon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7bd156cbbd0add4b869a7d997d057b76c329f4e5 Author: Jeff Johnson Date: Wed Sep 14 16:47:03 2022 -0700 remoteproc: sysmon: Make QMI message rules const Commit ff6d365898d4 ("soc: qcom: qmi: use const for struct qmi_elem_info") allows QMI message encoding/decoding rules to be const, so do that for sysmon. Signed-off-by: Jeff Johnson Reviewed-by: Alex Elder Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220914234705.28405-3-quic_jjohnson@quicinc.com drivers/remoteproc/qcom_sysmon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e9b4aeed56699b469206d05e706ddf2db95700a9 Author: Christophe JAILLET Date: Sat Dec 3 17:51:04 2022 +0100 net: xsk: Don't include There is no need to include here. Prefer the less invasive which is needed for 'hlist_head'. Signed-off-by: Christophe JAILLET Acked-by: John Fastabend Link: https://lore.kernel.org/r/88d6a1d88764cca328610854f890a9ca1f4b029e.1670086246.git.christophe.jaillet@wanadoo.fr Signed-off-by: Alexei Starovoitov include/net/netns/xdp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ebbdecff6ae00557a52539287b681641f4f0d33 Author: Anup Patel Date: Wed Dec 7 09:17:49 2022 +0530 RISC-V: KVM: Add ONE_REG interface for mvendorid, marchid, and mimpid We add ONE_REG interface for VCPU mvendorid, marchid, and mimpid so that KVM user-space can change this details to support migration across heterogeneous hosts. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Andrew Jones Signed-off-by: Anup Patel arch/riscv/include/uapi/asm/kvm.h | 3 +++ arch/riscv/kvm/vcpu.c | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) commit 52ec4b695dbe0552bb994c4149e9122610a76668 Author: Anup Patel Date: Wed Dec 7 09:17:43 2022 +0530 RISC-V: KVM: Save mvendorid, marchid, and mimpid when creating VCPU We should save VCPU mvendorid, marchid, and mimpid at the time of creating VCPU so that we don't have to do host SBI call every time Guest/VM ask for these details. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Andrew Jones Signed-off-by: Anup Patel arch/riscv/include/asm/kvm_host.h | 5 +++++ arch/riscv/kvm/vcpu.c | 6 ++++++ arch/riscv/kvm/vcpu_sbi_base.c | 11 +++++------ 3 files changed, 16 insertions(+), 6 deletions(-) commit a1a44e227ce69459ca43aa9dadaa1b58619b18ee Author: Anup Patel Date: Wed Dec 7 09:17:38 2022 +0530 RISC-V: Export sbi_get_mvendorid() and friends The sbi_get_mvendorid(), sbi_get_marchid(), and sbi_get_mimpid() can be used by KVM module so let us export these functions. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Andrew Jones Acked-by: Palmer Dabbelt Signed-off-by: Anup Patel arch/riscv/kernel/sbi.c | 3 +++ 1 file changed, 3 insertions(+) commit 23fe562e45c5959590a24d05c61c963f10ccb934 Author: Anup Patel Date: Wed Dec 7 09:17:27 2022 +0530 RISC-V: KVM: Move sbi related struct and functions to kvm_vcpu_sbi.h Just like asm/kvm_vcpu_timer.h, we should have all sbi related struct and functions in asm/kvm_vcpu_sbi.h. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Andrew Jones Signed-off-by: Anup Patel arch/riscv/include/asm/kvm_host.h | 10 ++-------- arch/riscv/include/asm/kvm_vcpu_sbi.h | 6 ++++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit e81af89baebf86938cda1a7c2bee51c676c04e21 Author: Anup Patel Date: Wed Dec 7 09:17:19 2022 +0530 RISC-V: KVM: Use switch-case in kvm_riscv_vcpu_set/get_reg() We should use switch-case in kvm_riscv_vcpu_set/get_reg() functions because the else-if ladder is quite big now. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Signed-off-by: Anup Patel arch/riscv/kvm/vcpu.c | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) commit 1343c61a7032cf85680b666a340d9c4c683b2ec8 Author: Anup Patel Date: Wed Dec 7 09:17:12 2022 +0530 RISC-V: KVM: Remove redundant includes of asm/csr.h We should include asm/csr.h only where required so let us remove redundant includes of this header. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Anup Patel arch/riscv/include/asm/kvm_host.h | 1 - arch/riscv/kvm/vcpu_sbi_base.c | 1 - arch/riscv/kvm/vcpu_sbi_hsm.c | 1 - arch/riscv/kvm/vcpu_sbi_replace.c | 1 - arch/riscv/kvm/vcpu_sbi_v01.c | 1 - 5 files changed, 5 deletions(-) commit fabd6179d08229cdb0f8ccfc4d9ec3ff379d9f28 Author: Anup Patel Date: Wed Dec 7 09:17:05 2022 +0530 RISC-V: KVM: Remove redundant includes of asm/kvm_vcpu_timer.h The asm/kvm_vcpu_timer.h is redundantly included in vcpu_sbi_base.c so let us remove it. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Andrew Jones Signed-off-by: Anup Patel arch/riscv/kvm/vcpu_sbi_base.c | 1 - 1 file changed, 1 deletion(-) commit e482d9e33d5b0f222cbef7341dcd52cead6b9edc Author: Anup Patel Date: Wed Dec 7 09:16:51 2022 +0530 RISC-V: KVM: Fix reg_val check in kvm_riscv_vcpu_set_reg_config() The reg_val check in kvm_riscv_vcpu_set_reg_config() should only be done for isa config register. Fixes: 9bfd900beeec ("RISC-V: KVM: Improve ISA extension by using a bitmap") Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Signed-off-by: Anup Patel arch/riscv/kvm/vcpu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 3e2d4756e2e5dd854b36aa947d7b6168f21dc4a1 Author: Christophe JAILLET Date: Wed Dec 7 09:16:39 2022 +0530 RISC-V: KVM: Simplify kvm_arch_prepare_memory_region() In kvm_arch_prepare_memory_region(), if no error occurs, a spin_lock()/ spin_unlock() call can be avoided. Switch to kvm_riscv_gstage_iounmap() that is the same as the current code, but with a better semantic. It also embeds the locking logic. So it is avoided if ret == 0. Signed-off-by: Christophe JAILLET Reviewed-by: Anup Patel Signed-off-by: Anup Patel arch/riscv/kvm/mmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit af934432e4a169f7252a114a6c5c7289366bd0ab Author: Anup Patel Date: Wed Dec 7 09:16:21 2022 +0530 RISC-V: KVM: Exit run-loop immediately if xfer_to_guest fails If xfer_to_guest_mode_handle_work() fails in the run-loop then exit the run-loop immediately instead of doing it after some more work. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel arch/riscv/kvm/vcpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b3f2575a993497dde19c18db73208325e8efba60 Author: Bo Liu Date: Wed Dec 7 09:16:11 2022 +0530 RISC-V: KVM: use vma_lookup() instead of find_vma_intersection() vma_lookup() finds the vma of a specific address with a cleaner interface and is more readable. Signed-off-by: Bo Liu Reviewed-by: Andrew Jones Signed-off-by: Anup Patel arch/riscv/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e78a11174de9e84e2f685618432754b83bd9f4ec Author: XiakaiPan <13212017962@163.com> Date: Wed Dec 7 09:16:02 2022 +0530 RISC-V: KVM: Add exit logic to main.c Several lines of code are inserted to remove KVM module normally using rmmod command just like others. Signed-off-by: XiakaiPan <13212017962@163.com> Reviewed-by: Andrew Jones Tested-by: Andrew Jones Signed-off-by: Anup Patel arch/riscv/kvm/main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f0c5a2d9f2342733e417ac5d5d19848dbd8ba7aa Merge: d8939cb0a03c 618945fbed50 Author: Alexei Starovoitov Date: Tue Dec 6 19:14:39 2022 -0800 Merge branch 'Refactor verifier prune and jump point handling' Andrii Nakryiko says: ==================== Disentangle prune and jump points in BPF verifier code. They are conceptually independent but currently coupled together. This small patch set refactors related code and make it possible to have some instruction marked as pruning or jump point independently. Besides just conceptual cleanliness, this allows to remove unnecessary jump points (saving a tiny bit of performance and memory usage, potentially), and even more importantly it allows for clean extension of special pruning points, similarly to how it's done for BPF_FUNC_timer_set_callback. This will be used by future patches implementing open-coded BPF iterators. v1->v2: - clarified path #3 commit message and a comment in the code (John); - added back mark_jmp_point() to right after subprog call to record non-linear implicit jump from BPF_EXIT to right after CALL . ==================== Signed-off-by: Alexei Starovoitov commit 618945fbed501b6e5865042068a51edfb2dda948 Author: Andrii Nakryiko Date: Tue Dec 6 15:33:45 2022 -0800 bpf: remove unnecessary prune and jump points Don't mark some instructions as jump points when there are actually no jumps and instructions are just processed sequentially. Such case is handled naturally by precision backtracking logic without the need to update jump history. See get_prev_insn_idx(). It goes back linearly by one instruction, unless current top of jmp_history is pointing to current instruction. In such case we use `st->jmp_history[cnt - 1].prev_idx` to find instruction from which we jumped to the current instruction non-linearly. Also remove both jump and prune point marking for instruction right after unconditional jumps, as program flow can get to the instruction right after unconditional jump instruction only if there is a jump to that instruction from somewhere else in the program. In such case we'll mark such instruction as prune/jump point because it's a destination of a jump. This change has no changes in terms of number of instructions or states processes across Cilium and selftests programs. Signed-off-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/r/20221206233345.438540-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) commit a095f421057e22853022cb644b1589d0dd0e756e Author: Andrii Nakryiko Date: Tue Dec 6 15:33:44 2022 -0800 bpf: mostly decouple jump history management from is_state_visited() Jump history updating and state equivalence checks are conceptually independent, so move push_jmp_history() out of is_state_visited(). Also make a decision whether to perform state equivalence checks or not one layer higher in do_check(), keeping is_state_visited() unconditionally performing state checks. push_jmp_history() should be performed after state checks. There is just one small non-uniformity. When is_state_visited() finds already validated equivalent state, it propagates precision marks to current state's parent chain. For this to work correctly, jump history has to be updated, so is_state_visited() is doing that internally. But if no equivalent verified state is found, jump history has to be updated in a newly cloned child state, so is_jmp_point() + push_jmp_history() is performed after is_state_visited() exited with zero result, which means "proceed with validation". This change has no functional changes. It's not strictly necessary, but feels right to decouple these two processes. Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221206233345.438540-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) commit bffdeaa8a5af7200b0e74c9d5a41167f86626a36 Author: Andrii Nakryiko Date: Tue Dec 6 15:33:43 2022 -0800 bpf: decouple prune and jump points BPF verifier marks some instructions as prune points. Currently these prune points serve two purposes. It's a point where verifier tries to find previously verified state and check current state's equivalence to short circuit verification for current code path. But also currently it's a point where jump history, used for precision backtracking, is updated. This is done so that non-linear flow of execution could be properly backtracked. Such coupling is coincidental and unnecessary. Some prune points are not part of some non-linear jump path, so don't need update of jump history. On the other hand, not all instructions which have to be recorded in jump history necessarily are good prune points. This patch splits prune and jump points into independent flags. Currently all prune points are marked as jump points to minimize amount of changes in this patch, but next patch will perform some optimization of prune vs jmp point placement. No functional changes are intended. Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221206233345.438540-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov include/linux/bpf_verifier.h | 1 + kernel/bpf/verifier.c | 57 +++++++++++++++++++++++++++++++++----------- 2 files changed, 44 insertions(+), 14 deletions(-) commit c505feba4c0d76084e56ec498ce819f02a7043ae Author: Gao Xiang Date: Mon Dec 5 23:00:50 2022 +0800 erofs: validate the extent length for uncompressed pclusters syzkaller reported a KASAN use-after-free: https://syzkaller.appspot.com/bug?extid=2ae90e873e97f1faf6f2 The referenced fuzzed image actually has two issues: - m_pa == 0 as a non-inlined pcluster; - The logical length is longer than its physical length. The first issue has already been addressed. This patch addresses the second issue by checking the extent length validity. Reported-by: syzbot+2ae90e873e97f1faf6f2@syzkaller.appspotmail.com Fixes: 02827e1796b3 ("staging: erofs: add erofs_map_blocks_iter") Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20221205150050.47784-2-hsiangkao@linux.alibaba.com fs/erofs/zmap.c | 5 +++++ 1 file changed, 5 insertions(+) commit d5d188b8f8b38d3d71dd05993874b4fc9284ce95 Author: Gao Xiang Date: Mon Dec 5 23:00:49 2022 +0800 erofs: fix missing unmap if z_erofs_get_extent_compressedlen() fails Otherwise, meta buffers could be leaked. Fixes: cec6e93beadf ("erofs: support parsing big pcluster compress indexes") Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20221205150050.47784-1-hsiangkao@linux.alibaba.com fs/erofs/zmap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c42c0ffe81176940bd5dead474216b7198d77675 Author: Chen Zhongjin Date: Mon Dec 5 11:49:57 2022 +0800 erofs: Fix pcluster memleak when its block address is zero syzkaller reported a memleak: https://syzkaller.appspot.com/bug?id=62f37ff612f0021641eda5b17f056f1668aa9aed unreferenced object 0xffff88811009c7f8 (size 136): ... backtrace: [] z_erofs_do_read_page+0x99b/0x1740 [] z_erofs_readahead+0x24e/0x580 [] read_pages+0x86/0x3d0 ... syzkaller constructed a case: in z_erofs_register_pcluster(), ztailpacking = false and map->m_pa = zero. This makes pcl->obj.index be zero although pcl is not a inline pcluster. Then following path adds refcount for grp, but the refcount won't be put because pcl is inline. z_erofs_readahead() z_erofs_do_read_page() # for another page z_erofs_collector_begin() erofs_find_workgroup() erofs_workgroup_get() Since it's illegal for the block address of a non-inlined pcluster to be zero, add check here to avoid registering the pcluster which would be leaked. Fixes: cecf864d3d76 ("erofs: support inline data decompression") Reported-by: syzbot+6f8cd9a0155b366d227f@syzkaller.appspotmail.com Signed-off-by: Chen Zhongjin Reviewed-by: Yue Hu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/Y42Kz6sVkf+XqJRB@debian Signed-off-by: Gao Xiang fs/erofs/zdata.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 927e5010ff5bd7446a22c511ab8643b9385ddf4d Author: Gao Xiang Date: Tue Oct 18 18:53:13 2022 +0800 erofs: use kmap_local_page() only for erofs_bread() Convert all mapped erofs_bread() users to use kmap_local_page() instead of kmap() or kmap_atomic(). Signed-off-by: Gao Xiang Reviewed-and-tested-by: Jingbo Xu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20221018105313.4940-1-hsiangkao@linux.alibaba.com Signed-off-by: Gao Xiang fs/erofs/data.c | 8 ++------ fs/erofs/inode.c | 1 + fs/erofs/internal.h | 3 +-- fs/erofs/xattr.c | 8 ++++---- fs/erofs/zmap.c | 4 ++-- 5 files changed, 10 insertions(+), 14 deletions(-) commit e6687b89225ee9c817e6dcbadc873f6a4691e5c2 Author: Jingbo Xu Date: Thu Dec 1 15:42:56 2022 +0800 erofs: enable large folios for fscache mode Enable large folios for fscache mode. Enable this feature for non-compressed format for now, until the compression part supports large folios later. One thing worth noting is that, the feature is not enabled for the meta data routine since meta inodes don't need large folios for now, nor do they support readahead yet. Also document this new feature. Signed-off-by: Jingbo Xu Reviewed-by: Jia Zhu Link: https://lore.kernel.org/r/20221201074256.16639-3-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang Documentation/filesystems/erofs.rst | 2 ++ fs/erofs/inode.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) commit be62c5198861156d77b60babb89e70e21c73eb7b Author: Jingbo Xu Date: Thu Dec 1 15:42:55 2022 +0800 erofs: support large folios for fscache mode When large folios supported, one folio can be split into several slices, each of which may be mapped to META/UNMAPPED/MAPPED, and the folio can be unlocked as a whole only when all slices have completed. Thus always allocate erofs_fscache_request for each .read_folio() or .readahead(), in which case the allocated request is responsible for unlocking folios when all slices have completed. As described above, each folio or folio range can be mapped into several slices, while these slices may be mapped to different cookies, and thus each slice needs its own netfs_cache_resources. Here we introduce chained requests to support this, where each .read_folio() or .readahead() calling can correspond to multiple requests. Each request has its own netfs_cache_resources and thus is used to access one cookie. Among these requests, there's a primary request, with the others pointing to the primary request. Signed-off-by: Jingbo Xu Reviewed-by: Jia Zhu Link: https://lore.kernel.org/r/20221201074256.16639-2-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang fs/erofs/fscache.c | 148 +++++++++++++++++++++++++++++------------------------ 1 file changed, 80 insertions(+), 68 deletions(-) commit 709fe09e281776b5e024fb5934c0485a866b7468 Author: Jingbo Xu Date: Thu Nov 24 11:42:12 2022 +0800 erofs: switch to prepare_ondemand_read() in fscache mode Switch to prepare_ondemand_read() interface and a self-contained request completion to get rid of netfs_io_[request|subrequest]. The whole request will still be split into slices (subrequest) according to the cache state of the backing file. As long as one of the subrequests fails, the whole request will be marked as failed. Reviewed-by: Gao Xiang Signed-off-by: Jingbo Xu Reviewed-by: Jia Zhu Link: https://lore.kernel.org/r/20221124034212.81892-3-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang fs/erofs/fscache.c | 261 +++++++++++++++++++---------------------------------- 1 file changed, 94 insertions(+), 167 deletions(-) commit 8669247524c73e16e4d3384c4ff882e5c5d06194 Author: Jingbo Xu Date: Thu Nov 24 11:42:11 2022 +0800 fscache,cachefiles: add prepare_ondemand_read() callback Add prepare_ondemand_read() callback dedicated for the on-demand read scenario, so that callers from this scenario can be decoupled from netfs_io_subrequest. The original cachefiles_prepare_read() is now refactored to a generic routine accepting a parameter list instead of netfs_io_subrequest. There's no logic change, except that the debug id of subrequest and request is removed from trace_cachefiles_prep_read(). Reviewed-by: Jeff Layton Signed-off-by: Jingbo Xu Acked-by: David Howells Link: https://lore.kernel.org/r/20221124034212.81892-2-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang fs/cachefiles/io.c | 77 +++++++++++++++++++++++++-------------- include/linux/netfs.h | 8 ++++ include/trace/events/cachefiles.h | 27 +++++++------- 3 files changed, 72 insertions(+), 40 deletions(-) commit 1282dea37b09087b8aec59f0774572c16b52276a Author: Gao Xiang Date: Tue Dec 6 14:03:52 2022 +0800 erofs: clean up cached I/O strategies After commit 4c7e42552b3a ("erofs: remove useless cache strategy of DELAYEDALLOC"), only one cached I/O allocation strategy is supported: When cached I/O is preferred, page allocation is applied without direct reclaim. If allocation fails, fall back to inplace I/O. Let's get rid of z_erofs_cache_alloctype. No logical changes. Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Yue Hu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20221206060352.152830-1-xiang@kernel.org fs/erofs/zdata.c | 77 +++++++++++++++++++++++--------------------------------- 1 file changed, 31 insertions(+), 46 deletions(-) commit 2109901d49c5876cb424c55a520c750982d68593 Author: Gao Xiang Date: Wed Nov 30 17:56:05 2022 +0800 erofs: update documentation - Refine highlights for main features; - Add multi-reference pclusters and fragment description. Signed-off-by: Gao Xiang Reviewed-by: Yue Hu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20221130095605.4656-1-hsiangkao@linux.alibaba.com Documentation/filesystems/erofs.rst | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) commit 15309fb26b87767b4c8b017a628424e3c3b2f69e Author: Russell King (Oracle) Date: Sat Dec 3 17:25:15 2022 +0000 net: sfp: clean up i2c-bus property parsing We currently have some complicated code in sfp_probe() which gets the I2C bus depending on whether the sfp node is DT or ACPI, and we use completely separate lookup functions. This could do with being in a separate function to make the code more readable, so move it to a new function, sfp_i2c_get(). We can also use fwnode_find_reference() to lookup the I2C bus fwnode before then decending into fwnode-type specific parsing. A future cleanup would be to move the fwnode-type specific parsing into the i2c layer, which is where it really should be. Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1p1WGJ-0098wS-4w@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/phy/sfp.c | 77 +++++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 36 deletions(-) commit 27f2a2dcc6261406b509b5022a1e5c23bf622830 Author: Hou Tao Date: Fri Nov 25 19:08:22 2022 +0800 erofs: check the uniqueness of fsid in shared domain in advance When shared domain is enabled, doing mount twice with the same fsid and domain_id will trigger sysfs warning as shown below: sysfs: cannot create duplicate filename '/fs/erofs/d0,meta.bin' CPU: 15 PID: 1051 Comm: mount Not tainted 6.1.0-rc6+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) Call Trace: dump_stack_lvl+0x38/0x49 dump_stack+0x10/0x12 sysfs_warn_dup.cold+0x17/0x27 sysfs_create_dir_ns+0xb8/0xd0 kobject_add_internal+0xb1/0x240 kobject_init_and_add+0x71/0xa0 erofs_register_sysfs+0x89/0x110 erofs_fc_fill_super+0x98c/0xaf0 vfs_get_super+0x7d/0x100 get_tree_nodev+0x16/0x20 erofs_fc_get_tree+0x20/0x30 vfs_get_tree+0x24/0xb0 path_mount+0x2fa/0xa90 do_mount+0x7c/0xa0 __x64_sys_mount+0x8b/0xe0 do_syscall_64+0x30/0x60 entry_SYSCALL_64_after_hwframe+0x46/0xb0 The reason is erofs_fscache_register_cookie() doesn't guarantee the primary data blob (aka fsid) is unique in the shared domain and erofs_register_sysfs() invoked by the second mount will fail due to the duplicated fsid in the shared domain and report warning. It would be better to check the uniqueness of fsid before doing erofs_register_sysfs(), so adding a new flags parameter for erofs_fscache_register_cookie() and doing the uniqueness check if EROFS_REG_COOKIE_NEED_NOEXIST is enabled. After the patch, the error in dmesg for the duplicated mount would be: erofs: ...: erofs_domain_register_cookie: XX already exists in domain YY Reviewed-by: Jia Zhu Reviewed-by: Jingbo Xu Reviewed-by: Chao Yu Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20221125110822.3812942-1-houtao@huaweicloud.com Fixes: 7d41963759fe ("erofs: Support sharing cookies in the same domain") Signed-off-by: Gao Xiang fs/erofs/fscache.c | 47 +++++++++++++++++++++++++++++++++++------------ fs/erofs/internal.h | 10 ++++++++-- fs/erofs/super.c | 2 +- 3 files changed, 44 insertions(+), 15 deletions(-) commit ce529cc25b184e93397b94a8a322128fc0095cbb Author: Jingbo Xu Date: Wed Nov 30 14:04:55 2022 +0800 erofs: enable large folios for iomap mode Enable large folios for iomap mode. Then the readahead routine will pass down large folios containing multiple pages. Let's enable this for non-compressed format for now, until the compression part supports large folios later. When large folios supported, the iomap routine will allocate iomap_page for each large folio and thus we need iomap_release_folio() and iomap_invalidate_folio() to free iomap_page when these folios get reclaimed or invalidated. Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20221130060455.44532-1-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang fs/erofs/data.c | 2 ++ fs/erofs/inode.c | 2 ++ 2 files changed, 4 insertions(+) commit d8939cb0a03ce7e4e69f65bbd31b79fe42f7d5e6 Author: Dave Marchevsky Date: Tue Dec 6 15:09:48 2022 -0800 bpf: Loosen alloc obj test in verifier's reg_btf_record btf->struct_meta_tab is populated by btf_parse_struct_metas in btf.c. There, a BTF record is created for any type containing a spin_lock or any next-gen datastructure node/head. Currently, for non-MAP_VALUE types, reg_btf_record will only search for a record using struct_meta_tab if the reg->type exactly matches (PTR_TO_BTF_ID | MEM_ALLOC). This exact match is too strict: an "allocated obj" type - returned from bpf_obj_new - might pick up other flags while working its way through the program. Loosen the check to be exact for base_type and just use MEM_ALLOC mask for type_flag. This patch is marked Fixes as the original intent of reg_btf_record was unlikely to have been to fail finding btf_record for valid alloc obj types with additional flags, some of which (e.g. PTR_UNTRUSTED) are valid register type states for alloc obj independent of this series. However, I didn't find a specific broken repro case outside of this series' added functionality, so it's possible that nothing was triggering this logic error before. Signed-off-by: Dave Marchevsky cc: Kumar Kartikeya Dwivedi Fixes: 4e814da0d599 ("bpf: Allow locking bpf_spin_lock in allocated objects") Link: https://lore.kernel.org/r/20221206231000.3180914-2-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b93884eea26f97a3dc4c1df8c64389cbb0673001 Author: Kees Cook Date: Fri Dec 2 13:24:22 2022 -0800 net/ncsi: Silence runtime memcpy() false positive warning The memcpy() in ncsi_cmd_handler_oem deserializes nca->data into a flexible array structure that overlapping with non-flex-array members (mfr_id) intentionally. Since the mem_to_flex() API is not finished, temporarily silence this warning, since it is a false positive, using unsafe_memcpy(). Reported-by: Joel Stanley Link: https://lore.kernel.org/netdev/CACPK8Xdfi=OJKP0x0D1w87fQeFZ4A2DP2qzGCRcuVbpU-9=4sQ@mail.gmail.com/ Cc: Samuel Mendoza-Jonas Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221202212418.never.837-kees@kernel.org Signed-off-by: Jakub Kicinski net/ncsi/ncsi-cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9ecb7a4b8ac67c1a73fefd17bc00e943d7f74378 Author: Janne Grunau Date: Tue Dec 6 23:38:46 2022 +0100 arm64: dts: apple: Add t8103 L1/L2 cache properties and nodes The t8103 CPU nodes are missing the cache hierarchy information. The cache hierarchy on Arm can not be detected and needs to be described in DT. The OS scheduler can make use of this information for scheduling decisions. The cache size information is based on various articles about the processors. There's also an L3 system level cache (SLC). It's not described here because SLCs typically have some MMIO interface which would need to be described. Based on Rob Herring's patch adding cache properties and nodes for t600x. Link: https://lore.kernel.org/asahi/20221122220619.659174-1-robh@kernel.org/ Signed-off-by: Janne Grunau Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t8103.dtsi | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 63bf0b66ddfa6761dd47350b8d1f7161a06e9954 Author: Hector Martin Date: Mon Dec 5 19:02:11 2022 +0900 arm64: dts: apple: Rename dart-sio* to sio-dart* All the other DARTs are named foo-dart, so let's keep things consistent. Fixes: 51979fbb7fb8 ("arm64: dts: apple: t600x: Add MCA and its support") Fixes: 8a3df85ad87d ("arm64: dts: apple: t8103: Add MCA and its support") Reviewed-by: Sven Peter Reviewed-by: Mark Kettenis Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t600x-die0.dtsi | 6 +++--- arch/arm64/boot/dts/apple/t8103.dtsi | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 9742350931df69f8aad7a764ff6286ac069305f5 Author: Janne Grunau Date: Tue Dec 6 23:57:37 2022 +0100 arch: arm64: apple: t600x: Use standard "iommu" node name The PCIe iommu nodes use "dart" as node names. Replace it with the the standard "iommu" node name as all other iommu nodes. Fixes: 7b0b0191a2c7 ("arm64: dts: apple: Add initial t6000/t6001/t6002 DTs") Signed-off-by: Janne Grunau Reviewed-by: Mark Kettenis Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t600x-die0.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 56d32c51dffac8a431b472a4c31efb8563b048d1 Author: Janne Grunau Date: Tue Dec 6 23:57:36 2022 +0100 arch: arm64: apple: t8103: Use standard "iommu" node name The PCIe iommu nodes use "dart" as node names. Replace it with the the standard "iommu" node name as all other iommu nodes. Fixes: 3c866bb79577 ("arm64: dts: apple: t8103: Add PCIe DARTs") Signed-off-by: Janne Grunau Reviewed-by: Mark Kettenis Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t8103.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 156ed20d22ee68d470232d26ae6df2cefacac4a0 Author: David Vernet Date: Tue Dec 6 15:05:38 2022 -0600 bpf: Don't use rcu_users to refcount in task kfuncs A series of prior patches added some kfuncs that allow struct task_struct * objects to be used as kptrs. These kfuncs leveraged the 'refcount_t rcu_users' field of the task for performing refcounting. This field was used instead of 'refcount_t usage', as we wanted to leverage the safety provided by RCU for ensuring a task's lifetime. A struct task_struct is refcounted by two different refcount_t fields: 1. p->usage: The "true" refcount field which task lifetime. The task is freed as soon as this refcount drops to 0. 2. p->rcu_users: An "RCU users" refcount field which is statically initialized to 2, and is co-located in a union with a struct rcu_head field (p->rcu). p->rcu_users essentially encapsulates a single p->usage refcount, and when p->rcu_users goes to 0, an RCU callback is scheduled on the struct rcu_head which decrements the p->usage refcount. Our logic was that by using p->rcu_users, we would be able to use RCU to safely issue refcount_inc_not_zero() a task's rcu_users field to determine if a task could still be acquired, or was exiting. Unfortunately, this does not work due to p->rcu_users and p->rcu sharing a union. When p->rcu_users goes to 0, an RCU callback is scheduled to drop a single p->usage refcount, and because the fields share a union, the refcount immediately becomes nonzero again after the callback is scheduled. If we were to split the fields out of the union, this wouldn't be a problem. Doing so should also be rather non-controversial, as there are a number of places in struct task_struct that have padding which we could use to avoid growing the structure by splitting up the fields. For now, so as to fix the kfuncs to be correct, this patch instead updates bpf_task_acquire() and bpf_task_release() to use the p->usage field for refcounting via the get_task_struct() and put_task_struct() functions. Because we can no longer rely on RCU, the change also guts the bpf_task_acquire_not_zero() and bpf_task_kptr_get() functions pending a resolution on the above problem. In addition, the task fixes the kfunc and rcu_read_lock selftests to expect this new behavior. Fixes: 90660309b0c7 ("bpf: Add kfuncs for storing struct task_struct * as a kptr") Fixes: fca1aa75518c ("bpf: Handle MEM_RCU type properly") Reported-by: Matus Jokay Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221206210538.597606-1-void@manifault.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 76 ++++++++++++++-------- tools/testing/selftests/bpf/progs/rcu_read_lock.c | 5 ++ .../selftests/bpf/progs/task_kfunc_success.c | 9 ++- 3 files changed, 60 insertions(+), 30 deletions(-) commit 235d2ef22cabb0ae68e2a1eca011acad32846bb9 Merge: c21dc529baba d0c0b48c8727 Author: Andrii Nakryiko Date: Tue Dec 6 16:31:26 2022 -0800 Merge branch 'BPF selftests fixes' Daan De Meyer says: ==================== This patch series fixes a few issues I've found while integrating the bpf selftests into systemd's mkosi development environment. ==================== Signed-off-by: Andrii Nakryiko commit d0c0b48c87274b7735f8c930a7c0d783fb46cfe9 Author: Daan De Meyer Date: Mon Dec 5 14:16:18 2022 +0100 selftests/bpf: Use CONFIG_TEST_BPF=m instead of CONFIG_TEST_BPF=y CONFIG_TEST_BPF can only be a module, so let's indicate it as such in the selftests config. Signed-off-by: Daan De Meyer Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221205131618.1524337-4-daan.j.demeyer@gmail.com tools/testing/selftests/bpf/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efe7fadbd59ec4513272c722403226e47321311b Author: Daan De Meyer Date: Mon Dec 5 14:16:17 2022 +0100 selftests/bpf: Use "is not set" instead of "=n" "=n" is not valid kconfig syntax. Use "is not set" instead to indicate the option should be disabled. Signed-off-by: Daan De Meyer Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221205131618.1524337-3-daan.j.demeyer@gmail.com tools/testing/selftests/bpf/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d68ae4982cb773f3d738b5dc25f77f5c7550548a Author: Daan De Meyer Date: Mon Dec 5 14:16:16 2022 +0100 selftests/bpf: Install all required files to run selftests When installing the selftests using "make -C tools/testing/selftests install", we need to make sure all the required files to run the selftests are installed. Let's make sure this is the case. Signed-off-by: Daan De Meyer Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221205131618.1524337-2-daan.j.demeyer@gmail.com tools/testing/selftests/bpf/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8939c58d68f97ce530f02d46c9f2b56c3ec88399 Author: Max Filippov Date: Mon Dec 5 13:19:21 2022 -0800 xtensa: add __umulsidi3 helper xtensa gcc-13 has changed multiplication handling and may now use __umulsidi3 helper where it used to use __muldi3. As a result building the kernel with the new gcc may fail with the following error: linux/init/main.c:1287: undefined reference to `__umulsidi3' Fix the build by providing __umulsidi3 implementation for xtensa. Cc: stable@vger.kernel.org # 5.18+ Signed-off-by: Max Filippov arch/xtensa/kernel/xtensa_ksyms.c | 2 + arch/xtensa/lib/Makefile | 2 +- arch/xtensa/lib/umulsidi3.S | 230 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 233 insertions(+), 1 deletion(-) commit 8eb687bc806932fc65de4cf60c4ecf913182231d Author: Roberto Sassu Date: Mon Nov 28 15:42:40 2022 +0100 lsm: Add/fix return values in lsm_hooks.h and fix formatting Ensure that for non-void LSM hooks there is a description of the return values. Also, replace spaces with tab for indentation, remove empty lines between the hook description and the list of parameters, adjust semicolons and add the period at the end of the parameter description. Finally, move the description of gfp parameter of the xfrm_policy_alloc_security hook together with the others. Signed-off-by: Roberto Sassu [PM: /replaces./replaced./] Signed-off-by: Paul Moore include/linux/lsm_hooks.h | 221 +++++++++++++++++++++++++++++----------------- 1 file changed, 138 insertions(+), 83 deletions(-) commit c21dc529baba16d6698a396eb997fee318300ee1 Author: Timo Hunziker Date: Sat Dec 3 12:37:46 2022 +0000 libbpf: Parse usdt args without offset on x86 (e.g. 8@(%rsp)) Parse USDT arguments like "8@(%rsp)" on x86. These are emmited by SystemTap. The argument syntax is similar to the existing "memory dereference case" but the offset left out as it's zero (i.e. read the value from the address in the register). We treat it the same as the the "memory dereference case", but set the offset to 0. I've tested that this fixes the "unrecognized arg #N spec: 8@(%rsp).." error I've run into when attaching to a probe with such an argument. Attaching and reading the correct argument values works. Something similar might be needed for the other supported architectures. [0] Closes: https://github.com/libbpf/libbpf/issues/559 Signed-off-by: Timo Hunziker Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221203123746.2160-1-timo.hunziker@eclipso.ch tools/lib/bpf/usdt.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 364ffd2537c44cb6914ff5669153f4a86fffad29 Author: Xingjiang Qiao Date: Tue Dec 6 13:53:31 2022 +0800 hwmon: (emc2305) fix pwm never being able to set lower There are fields 'last_hwmon_state' and 'last_thermal_state' in the structure 'emc2305_cdev_data', which respectively store the cooling state set by the 'hwmon' and 'thermal' subsystem, and the driver author hopes that if the state set by 'hwmon' is lower than the value set by 'thermal', the driver will just save it without actually setting the pwm. Currently, the 'last_thermal_state' also be updated by 'hwmon', which will cause the cooling state to never be set to a lower value. This patch fixes that. Signed-off-by: Xingjiang Qiao Link: https://lore.kernel.org/r/20221206055331.170459-2-nanpuyue@gmail.com Fixes: 0d8400c5a2ce1 ("hwmon: (emc2305) add support for EMC2301/2/3/5 RPM-based PWM Fan Speed Controller.") [groeck: renamed emc2305_set_cur_state_shim -> __emc2305_set_cur_state] Signed-off-by: Guenter Roeck drivers/hwmon/emc2305.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit 9b5f77efb0dc71d95403b528756e39b6cae0b948 Author: Dan Williams Date: Mon Dec 5 20:28:40 2022 -0800 cxl/pci: Remove endian confusion readl() already handles endian conversion. That's the main difference between readl() and __raw_readl(). This is benign on little-endian systems, but big endian systems will end up byte-swabbing twice. Fixes: 2905cb5236cb ("cxl/pci: Add (hopeful) error handling support") Cc: Jonathan Cameron Cc: Dave Jiang Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/167030092025.4045167.10651070153523351093.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/pci.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 372ab3bc3711db46ae1205401c2aac2ed16fc348 Author: Dan Williams Date: Mon Dec 5 20:28:34 2022 -0800 cxl/pci: Add some type-safety to the AER trace points The first argument to the CXL AER trace points is the source device. Pass a 'const struct device *' rather than a 'const char *' for more type precision / safety. Cc: Jonathan Cameron Cc: Dave Jiang Cc: Steven Rostedt Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/167030091477.4045167.15174636482098463885.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/pci.c | 4 ++-- include/trace/events/cxl.h | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 4d50591ebf60ccf79380fff3a4c23659c61c482f Author: Xingjiang Qiao Date: Tue Dec 6 13:53:30 2022 +0800 hwmon: (emc2305) fix unable to probe emc2301/2/3 The definitions of 'EMC2305_REG_PRODUCT_ID' and 'EMC2305_REG_DEVICE' are both '0xfd', they actually return the same value, but the values returned by emc2301/2/3/5 are different, so probe emc2301/2/3 will fail, This patch fixes that. Signed-off-by: Xingjiang Qiao Link: https://lore.kernel.org/r/20221206055331.170459-1-nanpuyue@gmail.com Fixes: 0d8400c5a2ce1 ("hwmon: (emc2305) add support for EMC2301/2/3/5 RPM-based PWM Fan Speed Controller.") Signed-off-by: Guenter Roeck drivers/hwmon/emc2305.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 7fe898041fb0c8e630504ecc2cb8805651ac85c1 Author: Dan Williams Date: Mon Dec 5 20:22:44 2022 -0800 cxl/security: Drop security command ioctl uapi CXL PMEM security operations are routed through the NVDIMM sysfs interface. For this reason the corresponding commands are marked "exclusive" to preclude collisions between the ioctl ABI and the sysfs ABI. However, a better way to preclude that collision is to simply remove the ioctl ABI (command-id definitions) for those operations. Now that cxl_internal_send_cmd() (formerly cxl_mbox_send_cmd()) no longer needs to talk the cxl_mem_commands array, all of the uapi definitions for the security commands can be dropped. These never appeared in a released kernel, so no regression risk. Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/167030056464.4044561.11486507095384253833.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/mbox.c | 17 ----------------- include/uapi/linux/cxl_mem.h | 6 ------ 2 files changed, 23 deletions(-) commit 2aeaf663b85e436dc6287692b7561ffbf0aa4381 Author: Dan Williams Date: Mon Dec 5 20:22:39 2022 -0800 cxl/mbox: Add variable output size validation for internal commands cxl_internal_send_cmd() skips output size validation for variable output commands which is not ideal. Most of the time internal usages want to fail if the output size does not match what was requested. For other commands where the caller cannot predict the size there is usually a a header that conveys how much vaild data is in the payload. For those cases add @min_out as a parameter to specify what the minimum response payload needs to be for the caller to parse the rest of the payload. In this patch only Get Supported Logs has that behavior, but going forward records retrieval commands like Get Poison List and Get Event Records can use @min_out to retrieve a variable amount of records. Critically, this validation scheme skips the needs to interrogate the cxl_mem_commands array which in turn frees up the implementation to support internal command enabling without also enabling external / user commands. Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/167030055918.4044561.10339573829837910505.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/mbox.c | 23 ++++++++++++++--------- drivers/cxl/cxlmem.h | 2 ++ 2 files changed, 16 insertions(+), 9 deletions(-) commit 5331cdf44dc389ac56f7ba5c24ca52d13eaad8d7 Author: Dan Williams Date: Mon Dec 5 20:22:33 2022 -0800 cxl/mbox: Enable cxl_mbox_send_cmd() users to validate output size Internally cxl_mbox_send_cmd() converts all passed-in parameters to a 'struct cxl_mbox_cmd' instance and sends that to cxlds->mbox_send(). It then teases the possibilty that the caller can validate the output size. However, they cannot since the resulting output size is not conveyed to the called. Fix that by making the caller pass in a constructed 'struct cxl_mbox_cmd'. This prepares for a future patch to add output size validation on a per-command basis. Given the change in signature, also change the name to differentiate it from the user command submission path that performs more validation before generating the 'struct cxl_mbox_cmd' instance to execute. Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/167030055370.4044561.17788093375112783036.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/mbox.c | 86 ++++++++++++++++++++++++++++++------------------- drivers/cxl/cxlmem.h | 4 +-- drivers/cxl/pmem.c | 21 +++++++++--- drivers/cxl/security.c | 77 +++++++++++++++++++++++++++++++------------ 4 files changed, 126 insertions(+), 62 deletions(-) commit f5ee4cc19c3eff4459931b6fe8f29d1e0cc204a5 Author: Dan Williams Date: Mon Dec 5 20:22:28 2022 -0800 cxl/security: Fix Get Security State output payload endian handling Multi-byte integer values in CXL mailbox payloads are little endian. Add a definition of the Get Security State output payload and convert the value before testing flags. Fixes: 328281155539 ("cxl/pmem: Introduce nvdimm_security_ops with ->get_flags() operation") Cc: Jonathan Cameron Cc: Dave Jiang Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/167030054822.4044561.4917796262037689553.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/security.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 361dd63ed5f1103ff21e22408a142a7d40804527 Author: Roberto Sassu Date: Mon Nov 28 15:42:39 2022 +0100 lsm: Clarify documentation of vm_enough_memory hook include/linux/lsm_hooks.h reports the result of the LSM infrastructure to the callers, not what LSMs should return to the LSM infrastructure. Clarify that and add that if all LSMs return a positive value __vm_enough_memory() will be called with cap_sys_admin set. If at least one LSM returns 0 or negative, it will be called with cap_sys_admin cleared. Signed-off-by: Roberto Sassu Signed-off-by: Paul Moore include/linux/lsm_hooks.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 88615cfb3184085a8a903bf94818985e8f3bf325 Author: Geert Uytterhoeven Date: Fri Dec 2 17:49:20 2022 +0100 ARM: dts: socfpga: Fix pca9548 i2c-mux node name "make dtbs_check": arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dtb: i2cswitch@70: $nodename:0: 'i2cswitch@70' does not match '^(i2c-?)?mux' From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dtb: i2cswitch@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 the PCA9548 node 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 Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5642c7f2bbe6b152e686e0973eaf534e054eb66 Author: Krzysztof Kozlowski Date: Mon Dec 5 17:42:54 2022 +0100 dt-bindings: Drop Jee Heng Sia Emails to Jee Heng Sia bounce ("550 #5.1.0 Address rejected."). Add Keembay platform maintainers as Keembay I2S maintainers. Signed-off-by: Krzysztof Kozlowski Acked-by: Mark Brown Link: https://lore.kernel.org/r/20221205164254.36418-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml | 1 - Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8119aaba20fdfa0eaefaa7bb13d869693052ec57 Author: Rob Herring Date: Fri Nov 4 11:24:50 2022 -0500 dt-bindings: thermal: cooling-devices: Add missing cache related properties The examples' cache nodes are incomplete as 'cache-unified' and 'cache-level' are required cache properties. Acked-by: Amit Kucheria Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221104162450.1982114-1-robh@kernel.org Signed-off-by: Rob Herring .../devicetree/bindings/thermal/thermal-cooling-devices.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit b27915453db3f36f04148fced5e282eb27f00bcf Author: Krzysztof Kozlowski Date: Sun Dec 4 11:43:23 2022 +0100 dt-bindings: leds: irled: ir-spi-led: convert to DT schema Convert the SPI IR LED bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221204104323.117974-3-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring .../devicetree/bindings/leds/irled/ir-spi-led.yaml | 61 ++++++++++++++++++++++ .../devicetree/bindings/leds/irled/spi-ir-led.txt | 29 ---------- 2 files changed, 61 insertions(+), 29 deletions(-) commit 0212be85e7512b639116b215519bc9aabedf1a5c Author: Krzysztof Kozlowski Date: Sun Dec 4 11:43:22 2022 +0100 dt-bindings: leds: irled: pwm-ir-tx: convert to DT schema Convert the PWM IR LED bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221204104323.117974-2-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring .../devicetree/bindings/leds/irled/pwm-ir-tx.txt | 13 --------- .../devicetree/bindings/leds/irled/pwm-ir-tx.yaml | 34 ++++++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 35 insertions(+), 13 deletions(-) commit 0542aac494a75f6d467109349e0266d7116e2b77 Author: Krzysztof Kozlowski Date: Sun Dec 4 11:43:21 2022 +0100 dt-bindings: leds: irled: gpio-ir-tx: convert to DT schema Convert the GPIO IR LED bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221204104323.117974-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring .../devicetree/bindings/leds/irled/gpio-ir-tx.txt | 14 --------- .../devicetree/bindings/leds/irled/gpio-ir-tx.yaml | 36 ++++++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 37 insertions(+), 14 deletions(-) commit 960c2de7a15477863d3c6a5c0f774dc8da318ea3 Author: Krzysztof Kozlowski Date: Sun Nov 27 21:40:57 2022 +0100 dt-bindings: leds: mt6360: rework to match multi-led The binding allows two type of LEDs - single and multi-color. They differ with properties, so fix the bindings to accept both cases. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221127204058.57111-6-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring .../devicetree/bindings/leds/leds-mt6360.yaml | 43 ++++++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) commit b82fa8538497dc214b1be514b3d10c598ccccd59 Author: Krzysztof Kozlowski Date: Sun Nov 27 21:40:56 2022 +0100 dt-bindings: leds: lp55xx: rework to match multi-led The binding allows two type of LEDs - single and multi-color. They differ with properties, so fix the bindings to accept both cases. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221127204058.57111-5-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring .../devicetree/bindings/leds/leds-lp55xx.yaml | 43 +++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit 49b939b711217f33c7b95c3cf0e08a6f91f96adf Author: Krzysztof Kozlowski Date: Sun Nov 27 21:40:55 2022 +0100 dt-bindings: leds: lp55xx: switch to preferred 'gpios' suffix The preferred name suffix for properties with single and multiple GPIOs is "gpios". Linux GPIO core code supports both. The DTS has mixed usage, so switch to preferred naming: omap3-n900.dtb: lp5523@32: 'enable-gpios' does not match any of the regexes: '^led@[0-8]$', '^multi-led@[0-8]$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221127204058.57111-4-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1188adb2dabcd1f4535b911d5b549ac66e21041 Author: Krzysztof Kozlowski Date: Sun Nov 27 21:40:54 2022 +0100 dt-bindings: leds: lp55xx: allow label The Linux driver and at least one upstream board use 'label' property: qcom/msm8996-xiaomi-gemini.dtb: lp5562@30: 'label' does not match any of the regexes: '^led@[0-8]$', '^multi-led@[0-8]$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221127204058.57111-3-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 2 ++ 1 file changed, 2 insertions(+) commit fe469e83eb5b383c8abbf1d1cab7a038e3d6778b Author: Krzysztof Kozlowski Date: Sun Nov 27 21:40:53 2022 +0100 dt-bindings: leds: use unevaluatedProperties for common.yaml The common.yaml schema allows further properties, so the bindings using it should restrict it with unevaluatedProperties:false. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221127204058.57111-2-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml | 1 + Documentation/devicetree/bindings/leds/leds-aw2013.yaml | 1 + Documentation/devicetree/bindings/leds/leds-gpio.yaml | 2 +- Documentation/devicetree/bindings/leds/leds-lp50xx.yaml | 8 ++++++++ Documentation/devicetree/bindings/leds/leds-pwm.yaml | 2 +- Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 12 +++++++++++- Documentation/devicetree/bindings/leds/leds-rt4505.yaml | 1 + Documentation/devicetree/bindings/leds/leds-sgm3140.yaml | 1 + Documentation/devicetree/bindings/leds/ti,tca6507.yaml | 2 +- 9 files changed, 26 insertions(+), 4 deletions(-) commit 47612a9fc4b822027200596da16669f596a7c9ff Author: Adam Skladowski Date: Wed Nov 30 21:09:40 2022 +0100 dt-bindings: thermal: tsens: Add SM6115 compatible Document compatible for tsens on Qualcomm SM6115 platform according to downstream dts it ship v2.4 of IP Signed-off-by: Adam Skladowski Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221130200950.144618-3-a39.skl@gmail.com Signed-off-by: Rob Herring Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 1 + 1 file changed, 1 insertion(+) commit e553ad8d7957697385e81034bf76db3b2cb2cf27 Author: Rob Herring Date: Mon Nov 28 14:24:39 2022 -0600 of/kexec: Fix reading 32-bit "linux,initrd-{start,end}" values "linux,initrd-start" and "linux,initrd-end" can be 32-bit values even on a 64-bit platform. Ideally, the size should be based on '#address-cells', but that has never been enforced in the kernel's FDT boot parsing code (early_init_dt_check_for_initrd()). Bootloader behavior is known to vary. For example, kexec always writes these as 64-bit. The result of incorrectly reading 32-bit values is most likely the reserved memory for the original initrd will still be reserved for the new kernel. The original arm64 equivalent of this code failed to release the initrd reserved memory in *all* cases. Use of_read_number() to mirror the early_init_dt_check_for_initrd() code. Fixes: b30be4dc733e ("of: Add a common kexec FDT setup function") Cc: stable@vger.kernel.org Reported-by: Peter Maydell Link: https://lore.kernel.org/r/20221128202440.1411895-1-robh@kernel.org Signed-off-by: Rob Herring drivers/of/kexec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 93266da2409b1709474be00f1becbbdaddb2b706 Author: Uwe Kleine-König Date: Tue Nov 29 19:04:14 2022 +0100 dt-bindings: display: Convert fsl,imx-fb.txt to dt-schema Compared to the txt description this adds clocks and clock-names to match reality. Note that fsl,imx-lcdc was picked as the new name as this is the actual hardware's name. There will be a new binding implementing the saner drm concept that is supposed to supersede this legacy fb binding Signed-off-by: Uwe Kleine-König Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221129180414.2729091-1-u.kleine-koenig@pengutronix.de Signed-off-by: Rob Herring .../devicetree/bindings/display/imx/fsl,imx-fb.txt | 57 ------------ .../bindings/display/imx/fsl,imx-lcdc.yaml | 102 +++++++++++++++++++++ 2 files changed, 102 insertions(+), 57 deletions(-) commit 7621aabdae410cfc0c28358baab7ae13c551aa7c Author: Rob Herring Date: Fri Nov 18 16:37:27 2022 -0600 dt-bindings: Add missing start and/or end of line regex anchors json-schema patterns by default will match anywhere in a string, so typically we want at least the start or end anchored. Fix the obvious cases where the anchors were forgotten. Acked-by: Matti Vaittinen Acked-by: Viresh Kumar Acked-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Acked-by: Mark Brown Acked-by: Sergio Paracuellos Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20221118223728.1721589-1-robh@kernel.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml | 2 +- Documentation/devicetree/bindings/hwmon/adt7475.yaml | 4 ++-- .../devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml | 4 ++-- Documentation/devicetree/bindings/pci/mediatek,mt7621-pcie.yaml | 2 +- Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml | 2 +- Documentation/devicetree/bindings/regulator/max8660.yaml | 2 +- Documentation/devicetree/bindings/regulator/maxim,max77802.yaml | 2 +- Documentation/devicetree/bindings/regulator/regulator.yaml | 2 +- .../devicetree/bindings/regulator/rohm,bd9576-regulator.yaml | 2 +- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 2 +- Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) commit f980520b0747e5621930e0420cd0be54cbdddeb3 Author: Luca Weiss Date: Thu Oct 13 11:12:08 2022 +0200 dt-bindings: qcom,pdc: Add missing compatibles Document the compatibles that are already in use in the upstream Linux kernel to resolve dtbs_check warnings. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221013091208.356739-1-luca.weiss@fairphone.com Signed-off-by: Rob Herring Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 642bb6a736fc5a7fec9ef9f5487f0abd71a1dc31 Author: André Apitzsch Date: Thu May 5 20:53:44 2022 +0200 dt-bindings: leds: sgm3140: Document ocp8110 compatible Add devicetree binding for Orient Chip OCP8110 charge pump used for camera flash LEDs. Signed-off-by: André Apitzsch Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220505185344.10067-1-git@apitzsch.eu Signed-off-by: Rob Herring Documentation/devicetree/bindings/leds/leds-sgm3140.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 43e6f4577d4dafa932a61bdef3971b711eca425a Author: Rob Herring Date: Fri Nov 18 16:37:07 2022 -0600 dt-bindings: Move fixed string node names under 'properties' Fixed string node names should be under 'properties' rather than 'patternProperties'. Additionally, without beginning and end of line anchors, any prefix or suffix is allowed on the specified node name. These cases don't appear to want a prefix or suffix, so move them under 'properties'. In some cases, the diff turns out to look like we're moving some patterns rather than the fixed string properties. Reviewed-by: Krzysztof Kozlowski Acked-by: Mark Brown Link: https://lore.kernel.org/r/20221118223708.1721134-1-robh@kernel.org Signed-off-by: Rob Herring .../bindings/arm/tegra/nvidia,tegra20-pmc.yaml | 54 +++++++++--------- .../devicetree/bindings/regulator/ti,tps65219.yaml | 14 ++--- .../devicetree/bindings/sound/tlv320adcx140.yaml | 64 +++++++++++----------- 3 files changed, 66 insertions(+), 66 deletions(-) commit 11b932815484fae85f5fe5a45d9fb856c102c2bc Author: Uwe Kleine-König Date: Fri Nov 18 23:44:03 2022 +0100 of: unittest: Convert to i2c's .probe_new() In struct i2c_driver, field new_probe replaces the soon to be deprecated field probe. Update unittest for this change. 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: Frank Rowand Link: https://lore.kernel.org/r/20221118224540.619276-510-uwe@kleine-koenig.org [robh: Add Frank's commit msg addition] Signed-off-by: Rob Herring drivers/of/unittest.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 3c75ce7cc3a31cabe97ff3e5a0d7e97eda5a7a2d Author: Rob Herring Date: Fri Nov 11 15:28:56 2022 -0600 dt-bindings: Drop type from 'cpus' property 'cpus' is a common property, and it is now defined in dtschema schemas, so drop the type references in the tree. Acked-by: Suzuki K Poulose Acked-by: Bjorn Andersson Acked-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221111212857.4104308-1-robh@kernel.org Signed-off-by: Rob Herring .../devicetree/bindings/interrupt-controller/apple,aic.yaml | 1 - Documentation/devicetree/bindings/perf/arm,dsu-pmu.yaml | 3 --- Documentation/devicetree/bindings/power/renesas,apmu.yaml | 6 ++---- Documentation/devicetree/bindings/thermal/qcom-lmh.yaml | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) commit 0e513d84c04160227c892db022c71b961c9834cd Author: Rob Herring Date: Fri Nov 11 10:27:29 2022 -0600 dt-bindings: thermal: thermal-idle: Fix example paths The reference by path (&{/cpus/cpu@101/thermal-idle}) in the example causes an error with new version of dtc: FATAL ERROR: Can't generate fixup for reference to path &{/cpus/cpu@100/thermal-idle} This is because the examples are built as an overlay and absolute paths are not valid as references must be by label. The path was also not resolvable because, by default, examples are placed under 'example-N' nodes. As the example contains top-level nodes, the root node must be explicit for the example to be extracted as-is. This changes the indentation for the whole example, but the existing indentation is a mess of of random amounts. Clean this up to be 4 spaces everywhere. Link: https://lore.kernel.org/r/20221111162729.3381835-1-robh@kernel.org Signed-off-by: Rob Herring .../devicetree/bindings/thermal/thermal-idle.yaml | 154 +++++++++++---------- 1 file changed, 80 insertions(+), 74 deletions(-) commit aa67961f3243dfff26c47769f87b4d94b07ec71f Author: Martin KaFai Lau Date: Tue Dec 6 11:35:54 2022 -0800 selftests/bpf: Allow building bpf tests with CONFIG_XFRM_INTERFACE=[m|n] It is useful to use vmlinux.h in the xfrm_info test like other kfunc tests do. In particular, it is common for kfunc bpf prog that requires to use other core kernel structures in vmlinux.h Although vmlinux.h is preferred, it needs a ___local flavor of struct bpf_xfrm_info in order to build the bpf selftests when CONFIG_XFRM_INTERFACE=[m|n]. Cc: Eyal Birger Fixes: 90a3a05eb33f ("selftests/bpf: add xfrm_info tests") Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20221206193554.1059757-1-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/progs/xfrm_info.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit fa55ef14ef4fe06198c0ce811b603aec24134bc2 Author: Miaoqian Lin Date: Tue Dec 6 11:19:06 2022 +0400 bpftool: Fix memory leak in do_build_table_cb strdup() allocates memory for path. We need to release the memory in the following error path. Add free() to avoid memory leak. Fixes: 8f184732b60b ("bpftool: Switch to libbpf's hashmap for pinned paths of BPF objects") Signed-off-by: Miaoqian Lin Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221206071906.806384-1-linmq006@gmail.com tools/bpf/bpftool/common.c | 1 + 1 file changed, 1 insertion(+) commit b54b6003612a376e7be32cbc5c1af3754bbbbb3d Author: Pu Lehui Date: Tue Dec 6 17:14:10 2022 +0800 riscv, bpf: Emit fixed-length instructions for BPF_PSEUDO_FUNC For BPF_PSEUDO_FUNC instruction, verifier will refill imm with correct addresses of bpf_calls and then run last pass of JIT. Since the emit_imm of RV64 is variable-length, which will emit appropriate length instructions accorroding to the imm, it may broke ctx->offset, and lead to unpredictable problem, such as inaccurate jump. So let's fix it with fixed-length instructions. Fixes: 69c087ba6225 ("bpf: Add bpf_for_each_map_elem() helper") Suggested-by: Björn Töpel Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Reviewed-by: Björn Töpel Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20221206091410.1584784-1-pulehui@huaweicloud.com arch/riscv/net/bpf_jit_comp64.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit f2240b4441cc5bd87820371ee79ad7c9125e76b6 Author: Shameer Kolothum Date: Wed Nov 23 11:32:36 2022 +0000 hisi_acc_vfio_pci: Enable PRE_COPY flag Now that we have everything to support the PRE_COPY state, enable it. Signed-off-by: Shameer Kolothum Link: https://lore.kernel.org/r/20221123113236.896-5-shameerali.kolothum.thodi@huawei.com Signed-off-by: Alex Williamson drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 190125adcad4c5850fd74ecd697e20a446b74ed8 Author: Shameer Kolothum Date: Wed Nov 23 11:32:35 2022 +0000 hisi_acc_vfio_pci: Move the dev compatibility tests for early check Instead of waiting till data transfer is complete to perform dev compatibility, do it as soon as we have enough data to perform the check. This will be useful when we enable the support for PRE_COPY. Signed-off-by: Shameer Kolothum Link: https://lore.kernel.org/r/20221123113236.896-4-shameerali.kolothum.thodi@huawei.com Signed-off-by: Alex Williamson drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 19 +++++++------------ drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.h | 1 + 2 files changed, 8 insertions(+), 12 deletions(-) commit d9a871e4a143047d1d84a606772af319f11516f9 Author: Shameer Kolothum Date: Wed Nov 23 11:32:34 2022 +0000 hisi_acc_vfio_pci: Introduce support for PRE_COPY state transitions The saving_migf is open in PRE_COPY state if it is supported and reads initial device match data. hisi_acc_vf_stop_copy() is refactored to make use of common code. Signed-off-by: Shameer Kolothum Link: https://lore.kernel.org/r/20221123113236.896-3-shameerali.kolothum.thodi@huawei.com Signed-off-by: Alex Williamson drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 74 ++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 3 deletions(-) commit 64ffbbb1e948876dd9044c32a3ab8a790662b9bb Author: Shameer Kolothum Date: Wed Nov 23 11:32:33 2022 +0000 hisi_acc_vfio_pci: Add support for precopy IOCTL PRECOPY IOCTL in the case of HiSiIicon ACC driver can be used to perform the device compatibility check earlier during migration. Signed-off-by: Shameer Kolothum Link: https://lore.kernel.org/r/20221123113236.896-2-shameerali.kolothum.thodi@huawei.com Signed-off-by: Alex Williamson drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 52 ++++++++++++++++++++++++++ drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.h | 1 + 2 files changed, 53 insertions(+) commit ccc2a52e464d1c983efede1a6d44728c151cb2ed Author: Shay Drory Date: Tue Dec 6 10:34:38 2022 +0200 vfio/mlx5: Enable MIGRATION_PRE_COPY flag Now that everything has been set up for MIGRATION_PRE_COPY, enable it. Signed-off-by: Shay Drory Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-15-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 5 +++++ 1 file changed, 5 insertions(+) commit d6e18a4bec431c181a60d32876c6c89955b2a4f8 Author: Shay Drory Date: Tue Dec 6 10:34:37 2022 +0200 vfio/mlx5: Fallback to STOP_COPY upon specific PRE_COPY error Before a SAVE command is issued, a QUERY command is issued in order to know the device data size. In case PRE_COPY is used, the above commands are issued while the device is running. Thus, it is possible that between the QUERY and the SAVE commands the state of the device will be changed significantly and thus the SAVE will fail. Currently, if a SAVE command is failing, the driver will fail the migration. In the above case, don't fail the migration, but don't allow for new SAVEs to be executed while the device is in a RUNNING state. Once the device will be moved to STOP_COPY, SAVE can be executed again and the full device state will be read. Signed-off-by: Shay Drory Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-14-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 27 ++++++++++++++++++++++++++- drivers/vfio/pci/mlx5/cmd.h | 2 ++ drivers/vfio/pci/mlx5/main.c | 6 ++++-- 3 files changed, 32 insertions(+), 3 deletions(-) commit 34e2f27143d1b373f088e805f7e11cdf778f791d Author: Yishai Hadas Date: Tue Dec 6 10:34:36 2022 +0200 vfio/mlx5: Introduce multiple loads In order to support PRE_COPY, mlx5 driver transfers multiple states (images) of the device. e.g.: the source VF can save and transfer multiple states, and the target VF will load them by that order. This patch implements the changes for the target VF to decompose the header for each state and to write and load multiple states. Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-13-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 13 +- drivers/vfio/pci/mlx5/cmd.h | 10 ++ drivers/vfio/pci/mlx5/main.c | 279 ++++++++++++++++++++++++++++++++++++------- 3 files changed, 257 insertions(+), 45 deletions(-) commit 81156c27271c4a6c594e492c8d119fbacfc99f36 Author: Yishai Hadas Date: Tue Dec 6 10:34:35 2022 +0200 vfio/mlx5: Consider temporary end of stream as part of PRE_COPY During PRE_COPY the migration data FD may have a temporary "end of stream" that is reached when the initial_bytes were read and no other dirty data exists yet. For instance, this may indicate that the device is idle and not currently dirtying any internal state. When read() is done on this temporary end of stream the kernel driver should return ENOMSG from read(). Userspace can wait for more data or consider moving to STOP_COPY. To not block the user upon read() and let it get ENOMSG we add a new state named MLX5_MIGF_STATE_PRE_COPY on the migration file. In addition, we add the MLX5_MIGF_STATE_SAVE_LAST state to block the read() once we call the last SAVE upon moving to STOP_COPY. Any further error will be marked with MLX5_MIGF_STATE_ERROR and the user won't be blocked. Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-12-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 7 +++++-- drivers/vfio/pci/mlx5/cmd.h | 2 ++ drivers/vfio/pci/mlx5/main.c | 7 +++++++ 3 files changed, 14 insertions(+), 2 deletions(-) commit 0dce165b1adf8d7f67030bb257e00107db8022de Author: Yishai Hadas Date: Tue Dec 6 10:34:34 2022 +0200 vfio/mlx5: Introduce vfio precopy ioctl implementation vfio precopy ioctl returns an estimation of data available for transferring from the device. Whenever a user is using VFIO_MIG_GET_PRECOPY_INFO, track the current state of the device, and if needed, append the dirty data to the transfer FD data. This is done by saving a middle state. As mlx5 runs the SAVE command asynchronously, make sure to query for incremental data only once there is no active save command. Running both in parallel, might end-up with a failure in the incremental query command on un-tracked vhca. Also, a middle state will be saved only after the previous state has finished its SAVE command and has been fully transferred, this prevents endless use resources. Co-developed-by: Shay Drory Signed-off-by: Shay Drory Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-11-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 16 +++++++ drivers/vfio/pci/mlx5/main.c | 111 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) commit 0c9a38fee8b210a8dfd3f177526daac567ec9265 Author: Yishai Hadas Date: Tue Dec 6 10:34:33 2022 +0200 vfio/mlx5: Introduce SW headers for migration states As mentioned in the previous patches, mlx5 is transferring multiple states when the PRE_COPY protocol is used. This states mechanism requires the target VM to know the states' size in order to execute multiple loads. Therefore, add SW header, with the needed information, for each saved state the source VM is transferring to the target VM. This patch implements the source VM handling of the headers, following patch will implement the target VM handling of the headers. Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-10-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 56 +++++++++++++++++++++++++++++++++++++++++--- drivers/vfio/pci/mlx5/cmd.h | 13 ++++++++++ drivers/vfio/pci/mlx5/main.c | 2 +- 3 files changed, 67 insertions(+), 4 deletions(-) commit 3319d287f4c04b9deece8ea00e27a70bbe32941b Author: Yishai Hadas Date: Tue Dec 6 10:34:32 2022 +0200 vfio/mlx5: Introduce device transitions of PRE_COPY In order to support PRE_COPY, mlx5 driver is transferring multiple states (images) of the device. e.g.: the source VF can save and transfer multiple states, and the target VF will load them by that order. The device is saving three kinds of states: 1) Initial state - when the device moves to PRE_COPY state. 2) Middle state - during PRE_COPY phase via VFIO_MIG_GET_PRECOPY_INFO. There can be multiple states of this type. 3) Final state - when the device moves to STOP_COPY state. After moving to PRE_COPY state, user is holding the saving migf FD and can use it. For example: user can start transferring data via read() callback. Also, user can switch from PRE_COPY to STOP_COPY whenever he sees it fits. This will invoke saving of final state. This means that mlx5 VFIO device can be switched to STOP_COPY without transferring any data in PRE_COPY state. Therefore, when the device moves to STOP_COPY, mlx5 will store the final state on a dedicated queue entry on the list. Co-developed-by: Shay Drory Signed-off-by: Shay Drory Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-9-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 96 ++++++++++++++++++++++++++++++++++++++++---- drivers/vfio/pci/mlx5/cmd.h | 16 +++++++- drivers/vfio/pci/mlx5/main.c | 90 +++++++++++++++++++++++++++++++++++++---- 3 files changed, 184 insertions(+), 18 deletions(-) commit c668878381b5702f867ec7f43ee3b74259c6ea03 Author: Yishai Hadas Date: Tue Dec 6 10:34:31 2022 +0200 vfio/mlx5: Refactor to use queue based data chunks Refactor to use queue based data chunks on the migration file. The SAVE command adds a chunk to the tail of the queue while the read() API finds the required chunk and returns its data. In case the queue is empty but the state of the migration file is MLX5_MIGF_STATE_COMPLETE, read() may not be blocked but will return 0 to indicate end of file. This is a step towards maintaining multiple images and their meta data (i.e. headers) on the migration file as part of next patches from the series. Note: At that point, we still use a single chunk on the migration file but becomes ready to support multiple. Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-8-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 24 +++++-- drivers/vfio/pci/mlx5/cmd.h | 5 ++ drivers/vfio/pci/mlx5/main.c | 145 +++++++++++++++++++++++++++++++++---------- 3 files changed, 136 insertions(+), 38 deletions(-) commit 8b599d143419669e57da3881d8293f17809688d7 Author: Yishai Hadas Date: Tue Dec 6 10:34:30 2022 +0200 vfio/mlx5: Refactor migration file state Refactor migration file state to be an emum which is mutual exclusive. As of that dropped the 'disabled' state as 'error' is the same from functional point of view. Next patches from the series will extend this enum for other relevant states. Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-7-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 2 +- drivers/vfio/pci/mlx5/cmd.h | 7 +++++-- drivers/vfio/pci/mlx5/main.c | 11 ++++++----- 3 files changed, 12 insertions(+), 8 deletions(-) commit 91454f8b9bf4ce6be1d9a0b4de401bc3c6313a95 Author: Yishai Hadas Date: Tue Dec 6 10:34:29 2022 +0200 vfio/mlx5: Refactor MKEY usage This patch refactors MKEY usage such as its life cycle will be as of the migration file instead of allocating/destroying it upon each SAVE/LOAD command. This is a preparation step towards the PRE_COPY series where multiple images will be SAVED/LOADED. We achieve it by having a new struct named mlx5_vhca_data_buffer which holds the mkey and its related stuff as of sg_append_table, allocated_length, etc. The above fields were taken out from the migration file main struct, into mlx5_vhca_data_buffer dedicated struct with the proper helpers in place. For now we have a single mlx5_vhca_data_buffer per migration file. However, in coming patches we'll have multiple of them to support multiple images. Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-6-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 162 +++++++++++++++++++++++++++---------------- drivers/vfio/pci/mlx5/cmd.h | 37 +++++++--- drivers/vfio/pci/mlx5/main.c | 92 +++++++++++++----------- 3 files changed, 178 insertions(+), 113 deletions(-) commit 9945a67ea4b30657dd998c7fbbea1b3950747168 Author: Yishai Hadas Date: Tue Dec 6 10:34:28 2022 +0200 vfio/mlx5: Refactor PD usage This patch refactors PD usage such as its life cycle will be as of the migration file instead of allocating/destroying it upon each SAVE/LOAD command. This is a preparation step towards the PRE_COPY series where multiple images will be SAVED/LOADED and a single PD can be simply reused. Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-5-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 53 +++++++++++++++++++++++++++++--------------- drivers/vfio/pci/mlx5/cmd.h | 5 ++++- drivers/vfio/pci/mlx5/main.c | 44 ++++++++++++++++++++++++++---------- 3 files changed, 71 insertions(+), 31 deletions(-) commit 0e7caa65d707b93fbb4322c6313f739fa9103dfa Author: Yishai Hadas Date: Tue Dec 6 10:34:27 2022 +0200 vfio/mlx5: Enforce a single SAVE command at a time Enforce a single SAVE command at a time. As the SAVE command is an asynchronous one, we must enforce running only a single command at a time. This will preserve ordering between multiple calls and protect from races on the migration file data structure. This is a must for the next patches from the series where as part of PRE_COPY we may have multiple images to be saved and multiple SAVE commands may be issued from different flows. Reviewed-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-4-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 6 ++++++ drivers/vfio/pci/mlx5/cmd.h | 1 + drivers/vfio/pci/mlx5/main.c | 7 +++++++ 3 files changed, 14 insertions(+) commit 4db52602a6074e9cc523500b8304600ff63e7b85 Author: Jason Gunthorpe Date: Tue Dec 6 10:34:26 2022 +0200 vfio: Extend the device migration protocol with PRE_COPY The optional PRE_COPY states open the saving data transfer FD before reaching STOP_COPY and allows the device to dirty track internal state changes with the general idea to reduce the volume of data transferred in the STOP_COPY stage. While in PRE_COPY the device remains RUNNING, but the saving FD is open. Only if the device also supports RUNNING_P2P can it support PRE_COPY_P2P, which halts P2P transfers while continuing the saving FD. PRE_COPY, with P2P support, requires the driver to implement 7 new arcs and exists as an optional FSM branch between RUNNING and STOP_COPY: RUNNING -> PRE_COPY -> PRE_COPY_P2P -> STOP_COPY A new ioctl VFIO_MIG_GET_PRECOPY_INFO is provided to allow userspace to query the progress of the precopy operation in the driver with the idea it will judge to move to STOP_COPY at least once the initial data set is transferred, and possibly after the dirty size has shrunk appropriately. This ioctl is valid only in PRE_COPY states and kernel driver should return -EINVAL from any other migration state. Compared to the v1 clarification, STOP_COPY -> PRE_COPY is blocked and to be defined in future. We also split the pending_bytes report into the initial and sustaining values, e.g.: initial_bytes and dirty_bytes. initial_bytes: Amount of initial precopy data. dirty_bytes: Device state changes relative to data previously retrieved. These fields are not required to have any bearing to STOP_COPY phase. It is recommended to leave PRE_COPY for STOP_COPY only after the initial_bytes field reaches zero. Leaving PRE_COPY earlier might make things slower. Signed-off-by: Jason Gunthorpe Signed-off-by: Shay Drory Reviewed-by: Kevin Tian Reviewed-by: Shameer Kolothum Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-3-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/vfio_main.c | 74 +++++++++++++++++++++++++++- include/uapi/linux/vfio.h | 123 ++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 191 insertions(+), 6 deletions(-) commit c943a9374d12bebca2d0de7e273b1c723b58c122 Author: Shay Drory Date: Tue Dec 6 10:34:25 2022 +0200 net/mlx5: Introduce ifc bits for pre_copy Introduce ifc related stuff to enable PRE_COPY of VF during migration. Signed-off-by: Shay Drory Acked-by: Leon Romanovsky Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20221206083438.37807-2-yishaih@nvidia.com Signed-off-by: Alex Williamson include/linux/mlx5/mlx5_ifc.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 2931aa6758da9f871b4bd7ee52a4be2f9d24e6ce Author: Luca Weiss Date: Fri Dec 2 16:12:40 2022 -0600 clk: qcom: rpmh: add support for SM6350 rpmh IPA clock The IPA core clock is required for SM6350. Define it. Signed-off-by: Luca Weiss [elder@linaro.org: rebased with Dmitry's changes] Signed-off-by: Alex Elder Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202221240.225720-1-elder@linaro.org drivers/clk/qcom/clk-rpmh.c | 1 + 1 file changed, 1 insertion(+) commit a174d29a59ec9462d3e72fd00a9fd05054c4ab20 Author: Dmitry Baryshkov Date: Sun Dec 4 14:45:05 2022 +0200 clk: qcom: mmcc-msm8974: 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. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204124508.1415713-9-dmitry.baryshkov@linaro.org drivers/clk/qcom/mmcc-msm8974.c | 516 ++++++++++++++++++++-------------------- 1 file changed, 264 insertions(+), 252 deletions(-) commit 28c6c02527757a4b3c63b30d77f7e7d5c112c085 Author: Dmitry Baryshkov Date: Sun Dec 4 14:45:04 2022 +0200 clk: qcom: mmcc-msm8974: move clock parent tables down Move clock parent tables down, after the PLL declarataions, so that we can use pll hw clock fields in the next commit. Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204124508.1415713-8-dmitry.baryshkov@linaro.org drivers/clk/qcom/mmcc-msm8974.c | 170 ++++++++++++++++++++-------------------- 1 file changed, 85 insertions(+), 85 deletions(-) commit 4e74e921ea0c576682ffd7981af1d4a73ceaca11 Author: Dmitry Baryshkov Date: Sun Dec 4 14:45:03 2022 +0200 clk: qcom: mmcc-msm8974: 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: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204124508.1415713-7-dmitry.baryshkov@linaro.org drivers/clk/qcom/mmcc-msm8974.c | 74 ++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 37 deletions(-) commit ff81be97120b6bb79f1239a184bb0c851d7ed9a7 Author: Dmitry Baryshkov Date: Sun Dec 4 14:45:02 2022 +0200 clk: qcom: gcc-msm8974: 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. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204124508.1415713-6-dmitry.baryshkov@linaro.org drivers/clk/qcom/gcc-msm8974.c | 492 +++++++++++++++++++++-------------------- 1 file changed, 253 insertions(+), 239 deletions(-) commit f2b4f1490e82dec9881565b2f92467c5b6f4636d Author: Dmitry Baryshkov Date: Sun Dec 4 14:45:01 2022 +0200 clk: qcom: gcc-msm8974: move clock parent tables down Rearrage clock parent tables and PLL declarations (pull parents down and gpll4 up), so that we can use pll hw clock fields in the next commit. Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204124508.1415713-5-dmitry.baryshkov@linaro.org drivers/clk/qcom/gcc-msm8974.c | 98 +++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 49 deletions(-) commit fce760071df1f32163655c37555eec8c1577581d Author: Dmitry Baryshkov Date: Sun Dec 4 14:45:00 2022 +0200 clk: qcom: gcc-msm8974: 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: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204124508.1415713-4-dmitry.baryshkov@linaro.org drivers/clk/qcom/gcc-msm8974.c | 110 ++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 55 deletions(-) commit e80313c70a23c1c92f1ea1749799a90a1b490be4 Author: Dmitry Baryshkov Date: Sun Dec 4 14:44:59 2022 +0200 dt-bindings: clocks: qcom,mmcc: define clocks/clock-names for MSM8974 Define clock/clock-names properties of the MMCC device node to be used on MSM8974 platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204124508.1415713-3-dmitry.baryshkov@linaro.org .../devicetree/bindings/clock/qcom,mmcc.yaml | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 7c9c38fc6bda7214c1af3d3e741bc99df979897d Author: Dmitry Baryshkov Date: Sun Dec 4 14:44:58 2022 +0200 dt-bindings: clock: split qcom,gcc-msm8974,-msm8226 to the separate file Move schema for the GCC on MSM8974 and MSM8226 platforms to a separate file to be able to define device-specific clock properties. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204124508.1415713-2-dmitry.baryshkov@linaro.org .../bindings/clock/qcom,gcc-msm8974.yaml | 61 ++++++++++++++++++++++ .../devicetree/bindings/clock/qcom,gcc-other.yaml | 9 +--- 2 files changed, 62 insertions(+), 8 deletions(-) commit b4e4f66901658fae0614dea5bf91062a5387eda7 Author: Trond Myklebust Date: Tue Dec 6 12:42:59 2022 -0500 NFSv4.x: Fail client initialisation if state manager thread can't run If the state manager thread fails to start, then we should just mark the client initialisation as failed so that other processes or threads don't get stuck in nfs_wait_client_init_complete(). Reported-by: ChenXiaoSong Fixes: 4697bd5e9419 ("NFSv4: Fix a race in the net namespace mount notification") Signed-off-by: Trond Myklebust fs/nfs/nfs4state.c | 2 ++ 1 file changed, 2 insertions(+) commit 19cdc8fa5b9b768f5753eefe3da32fcbafcb0d18 Author: ye xingchen Date: Mon Dec 5 17:19:16 2022 +0800 fs: nfs: sysfs: 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: Trond Myklebust fs/nfs/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 700fa9b1b361760ca6c28e2e7d6cccbdc9fb6716 Author: ye xingchen Date: Mon Dec 5 17:13:45 2022 +0800 NFS: 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: Trond Myklebust fs/nfs/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a60214c2465493aac0b014d87ee19327b6204c42 Author: Anna Schumaker Date: Wed Nov 30 15:30:47 2022 -0500 NFS: Allow very small rsize & wsize again 940261a19508 introduced nfs_io_size() to clamp the iosize to a multiple of PAGE_SIZE. This had the unintended side effect of no longer allowing iosizes less than a page, which could be useful in some situations. UDP already has an exception that causes it to fall back on the power-of-two style sizes instead. This patch adds an additional exception for very small iosizes. Reported-by: Jeff Layton Fixes: 940261a19508 ("NFS: Allow setting rsize / wsize to a multiple of PAGE_SIZE") Signed-off-by: Anna Schumaker Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust fs/nfs/internal.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f8527028a7e52da884055c401abc04e0b0c84285 Author: Anna Schumaker Date: Wed Nov 30 13:15:26 2022 -0500 NFSv4.2: Fix up READ_PLUS alignment Assume that the first segment will be a DATA segment, and place the data directly into the xdr pages so it doesn't need to be shifted. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs42xdr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 36357fe74ef736524a29fbd3952948768510a8b9 Author: Anna Schumaker Date: Wed Nov 30 13:15:25 2022 -0500 NFSv4.2: Set the correct size scratch buffer for decoding READ_PLUS The scratch_buf array is 16 bytes, but I was passing 32 to the xdr_set_scratch_buffer() function. Fix this by using sizeof(), which is what I probably should have been doing this whole time. Fixes: d3b00a802c84 ("NFS: Replace the READ_PLUS decoding code") Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs42xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50fa355bc0d75911fe9d5072a5ba52cdb803aff7 Author: Wang ShaoBo Date: Thu Nov 24 17:23:42 2022 +0800 SUNRPC: Fix missing release socket in rpc_sockname() socket dynamically created is not released when getting an unintended address family type in rpc_sockname(), direct to out_release for calling sock_release(). Fixes: 2e738fdce22f ("SUNRPC: Add API to acquire source address") Signed-off-by: Wang ShaoBo Signed-off-by: Trond Myklebust net/sunrpc/clnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9181f40fb2952fd59ecb75e7158620c9c669eee3 Author: Zhang Xiaoxu Date: Sun Nov 20 15:34:29 2022 +0800 xprtrdma: Fix regbuf data not freed in rpcrdma_req_create() If rdma receive buffer allocate failed, should call rpcrdma_regbuf_free() to free the send buffer, otherwise, the buffer data will be leaked. Fixes: bb93a1ae2bf4 ("xprtrdma: Allocate req's regbufs at xprt create time") Signed-off-by: Zhang Xiaoxu Signed-off-by: Trond Myklebust net/sunrpc/xprtrdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db1c7d77976775483a8ef240b4c705f113e13ea1 Author: Christoph Hellwig Date: Tue Dec 6 15:44:07 2022 +0100 block: bio_copy_data_iter With the pktcdvdv removal, bio_copy_data_iter is unused now. Fold the logic into bio_copy_data and remove the separate lower level function. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221206144407.722049-1-hch@lst.de Signed-off-by: Jens Axboe block/bio.c | 37 +++++++++++++++---------------------- include/linux/bio.h | 2 -- 2 files changed, 15 insertions(+), 24 deletions(-) commit 51f7be212ae6c9c09e77d17468fe26485f79836d Author: Krzysztof Kozlowski Date: Thu Nov 17 13:13:07 2022 +0100 dt-bindings: iio: adc: qcom,spmi-vadc: fix PM8350 define The defines from include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h were changed to take sid argument: Error: Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.example.dts:99.28-29 syntax error Signed-off-by: Krzysztof Kozlowski Reviewed-by: Manivannan Sadhasivam Acked-by: Jonathan Cameron Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117121307.264550-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74e903461b178faa5d0873254b77ee18fca5d059 Author: Krzysztof Kozlowski Date: Thu Oct 27 10:34:11 2022 -0400 dt-bindings: iio: adc: qcom,spmi-vadc: extend example Cleanup existing example (generic node name for spmi, use 4-space indentation) and add example for ADCv7 copied from Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221027143411.277980-2-krzysztof.kozlowski@linaro.org .../bindings/iio/adc/qcom,spmi-vadc.yaml | 94 ++++++++++++++-------- 1 file changed, 62 insertions(+), 32 deletions(-) commit 0953777640354dc459a22369eea488603d225dd9 Author: Johan Hovold Date: Mon Dec 5 11:08:37 2022 +0100 arm64: dts: qcom: sc8280xp: fix UFS DMA coherency The SC8280XP UFS controllers are cache coherent and must be marked as such in the devicetree to avoid potential data corruption. Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Cc: stable@vger.kernel.org # 6.0 Signed-off-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221205100837.29212-3-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 300848e05da03aa6c0ee2c353bba4b8623991cce Author: Owen Yang Date: Mon Dec 5 13:36:15 2022 +0800 arm64: dts: qcom: sc7280: Add DT for sc7280-herobrine-zombie Add DT for sc7280-herobrine-zombie Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Owen Yang Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221205133603.v15.2.I80aa32497bfd67bc8a372c1418ccc443ccf193e4@changeid arch/arm64/boot/dts/qcom/Makefile | 2 + .../boot/dts/qcom/sc7280-herobrine-zombie-lte.dts | 16 ++ .../boot/dts/qcom/sc7280-herobrine-zombie.dts | 16 ++ .../boot/dts/qcom/sc7280-herobrine-zombie.dtsi | 312 +++++++++++++++++++++ 4 files changed, 346 insertions(+) commit afa8e18bf674f00c8c3a73e295ff2f6aacdad82a Author: Krzysztof Kozlowski Date: Sun Dec 4 10:44:38 2022 +0100 arm64: dts: qcom: sm8250-sony-xperia-edo: fix no-mmc property for SDHCI There is no "no-emmc" property, so intention for SD/SDIO only nodes was to use "no-mmc": qcom/sm8250-sony-xperia-edo-pdx206.dtb: mmc@8804000: Unevaluated properties are not allowed ('no-emmc' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204094438.73288-6-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 796d8eaa165a8573dcc0a966c7845c67f7918e27 Author: Krzysztof Kozlowski Date: Sun Dec 4 10:44:37 2022 +0100 arm64: dts: qcom: sdm845-sony-xperia-tama: fix no-mmc property for SDHCI There is no "no-emmc" property, so intention for SD/SDIO only nodes was to use "no-mmc": qcom/sdm845-sony-xperia-tama-akatsuki.dtb: mmc@8804000: Unevaluated properties are not allowed ('no-emmc' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204094438.73288-5-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e36e6c6b3d15442b0fed406f2449f00e0a01c1a Author: Krzysztof Kozlowski Date: Sun Dec 4 10:44:36 2022 +0100 arm64: dts: qcom: sda660-inforce-ifc6560: fix no-mmc property for SDHCI There is no "no-emmc" property, so intention for SD/SDIO only nodes was to use "no-mmc": qcom/sda660-inforce-ifc6560.dtb: mmc@c084000: Unevaluated properties are not allowed ('no-emmc' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204094438.73288-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f50f5a817777185c7d0bbc03e2dafbde25e98428 Author: Krzysztof Kozlowski Date: Sun Dec 4 10:44:35 2022 +0100 arm64: dts: qcom: sa8155p-adp: fix no-mmc property for SDHCI There is no "no-emmc" property, so intention for SD/SDIO only nodes was to use "no-mmc": qcom/sa8155p-adp.dtb: mmc@8804000: Unevaluated properties are not allowed ('no-emmc' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204094438.73288-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1821f483f666049eacc5812c5cae36c29659c1ad Author: Krzysztof Kozlowski Date: Sun Dec 4 10:44:34 2022 +0100 arm64: dts: qcom: qrb5165-rb: fix no-mmc property for SDHCI There is no "no-emmc" property, so intention for SD/SDIO only nodes was to use "no-mmc": qcom/qrb5165-rb5.dtb: mmc@8804000: Unevaluated properties are not allowed ('no-emmc' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204094438.73288-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b660ee5d0e9b9c8c61ceea285fd437bc0f3c673 Author: Krzysztof Kozlowski Date: Sun Dec 4 10:44:33 2022 +0100 arm64: dts: qcom: sm8450: align MMC node names with dtschema The bindings expect "mmc" for MMC/SDHCI nodes: qcom/sm8450-sony-xperia-nagara-pdx223.dtb: sdhci@8804000: $nodename:0: 'sdhci@8804000' does not match '^mmc(@.*)?$' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204094438.73288-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b62dfbf8e6b58ebac86a26ae98b68e9e96f3615c Author: Krzysztof Kozlowski Date: Sat Dec 3 17:14:43 2022 +0100 arm64: dts: qcom: sc7180-trogdor: use generic node names According to Devicetree specification, the node names should be somewhat generic. Use "amplifier" for max98360a and "-regulator" for fixed regulators. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221203161443.97656-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi | 8 ++++---- arch/arm64/boot/dts/qcom/sc7180-trogdor-mrbland.dtsi | 6 +++--- arch/arm64/boot/dts/qcom/sc7180-trogdor-parade-ps8640.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7180-trogdor-quackingstick.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler.dtsi | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) commit 2dcd495f15cbf330aa68dc074f0eb0aeaff4eead Author: Srinivas Kandagatla Date: Fri Dec 2 16:20:54 2022 +0100 arm64: dts: qcom: sm8450-hdk: add sound support Add sound support to SM8450 HDK board. Tested setup so far is only two speakers (working) and head-phones (only one channel working). Signed-off-by: Srinivas Kandagatla Co-developed-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202152054.357316-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 186 ++++++++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) commit 14341e76dbc7e10c9bf19f4c214161dc3030ca3d Author: Srinivas Kandagatla Date: Fri Dec 2 16:20:53 2022 +0100 arm64: dts: qcom: sm8450: add Soundwire and LPASS Add Soundwire controllers, Low Power Audio SubSystem (LPASS) devices and LPASS pin controller. Signed-off-by: Srinivas Kandagatla Co-developed-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202152054.357316-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 324 +++++++++++++++++++++++++++++++++++ 1 file changed, 324 insertions(+) commit 38463210a9cb9eb03431c6c610ad3b66df3afc6c Author: Srinivas Kandagatla Date: Fri Dec 2 16:20:52 2022 +0100 arm64: dts: qcom: sm8450: add GPR node Add Generic Packet Router (GPR) device node with ADSP services. Signed-off-by: Srinivas Kandagatla Co-developed-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202152054.357316-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit b8bf63f8eb728dc9cb0ae0ee921eb889a11186cb Author: Brian Masney Date: Fri Dec 2 07:09:18 2022 -0500 arm64: dts: qcom: sa8540p-ride: enable PCIe support Add the vreg_l11a, pcie3a, pcie3a_phy, and tlmm nodes that are necessary in order to get PCIe working on the QDrive3. This patch also increases the width of the ranges property for the PCIe switch that's found on this platform. Note that this change requires the latest trustzone (TZ) firmware that's available from Qualcomm as of November 2022. If this is used against a board with the older firmware, then the board will go into ramdump mode when PCIe is probed on startup. The ranges property is overridden in this sa8540p-ride.dts file since this is what's used to describe the QDrive3 variant with dual SoCs. There's another variant of this board that only has a single SoC where this change is not applicable, and hence why this specific change was not done in sa8540p.dtsi. These changes were derived from various patches that Qualcomm delivered to Red Hat in a downstream kernel. Signed-off-by: Brian Masney Tested-by: Andrew Halaney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202120918.2252647-1-bmasney@redhat.com arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 58a9e83605478e931139b574e43d453851de3a26 Author: Adam Skladowski Date: Wed Nov 30 21:09:50 2022 +0100 arm64: dts: qcom: sm6115: Add smmu fallback to qcom generic compatible Add fallback to generic qcom mmu-500 implementation. Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130200950.144618-13-a39.skl@gmail.com arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 245bb9a37c16dc324be60764aa2597aa4704a8e3 Author: Adam Skladowski Date: Wed Nov 30 21:09:49 2022 +0100 arm64: dts: qcom: sm6115: Add WCN node Add WCN node to allow using wifi module. Signed-off-by: Adam Skladowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130200950.144618-12-a39.skl@gmail.com arch/arm64/boot/dts/qcom/sm6115.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 323647d32e83fae7f1a81b40e12ca6b0b63e880c Author: Adam Skladowski Date: Wed Nov 30 21:09:48 2022 +0100 arm64: dts: qcom: sm6115: Add i2c/spi nodes Add I2C/SPI nodes for SM6115. Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130200950.144618-11-a39.skl@gmail.com arch/arm64/boot/dts/qcom/sm6115.dtsi | 290 +++++++++++++++++++++++++++++++++++ 1 file changed, 290 insertions(+) commit 1586c5793511d7fb389139ab7aa5dae9118666ad Author: Adam Skladowski Date: Wed Nov 30 21:09:47 2022 +0100 arm64: dts: qcom: sm6115: Add GPI DMA Add GPI DMA node which will be wired to i2c/spi/uart. Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130200950.144618-10-a39.skl@gmail.com arch/arm64/boot/dts/qcom/sm6115.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 705e50427d8148211ffd05922bfa6a2520781338 Author: Adam Skladowski Date: Wed Nov 30 21:09:46 2022 +0100 arm64: dts: qcom: sm6115: Add mdss/dpu node Add mdss and dpu node to enable display support on SM6115. Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130200950.144618-9-a39.skl@gmail.com arch/arm64/boot/dts/qcom/sm6115.dtsi | 187 ++++++++++++++++++++++++++++++++++- 1 file changed, 185 insertions(+), 2 deletions(-) commit 884f95411ba4030ca44436217c6d8df4a960c555 Author: Adam Skladowski Date: Wed Nov 30 21:09:45 2022 +0100 arm64: dts: qcom: sm6115: Add dispcc node Add display clock controller to allow controlling display related clocks. Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio [bjorn: Pushed dsi_phy reference into next patch] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130200950.144618-8-a39.skl@gmail.com arch/arm64/boot/dts/qcom/sm6115.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d18c0077963ae2b6d232f6f3f25fb1ceb875ce7f Author: Adam Skladowski Date: Wed Nov 30 21:09:44 2022 +0100 arm64: dts: qcom: sm6115: Add rpm-stats node Add rpm stats node. Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130200950.144618-7-a39.skl@gmail.com arch/arm64/boot/dts/qcom/sm6115.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit fc676b15c065b8d4c750bbaab9914f24829a7a13 Author: Adam Skladowski Date: Wed Nov 30 21:09:43 2022 +0100 arm64: dts: qcom: sm6115: Add PRNG node Add a node for the PRNG to enable hw-accelerated pseudo-random number generation. Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130200950.144618-6-a39.skl@gmail.com arch/arm64/boot/dts/qcom/sm6115.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 7b74cba6b13f4bbe1f15e3417f386ed1907ab0ef Author: Adam Skladowski Date: Wed Nov 30 21:09:42 2022 +0100 arm64: dts: qcom: sm6115: Add TSENS node Add nodes required for TSENS block using the common qcom,tsens-v2 binding. Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130200950.144618-5-a39.skl@gmail.com arch/arm64/boot/dts/qcom/sm6115.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit aff96846c63ed3e3ed7d5212ea636a422d9694a3 Author: Adam Skladowski Date: Wed Nov 30 21:09:41 2022 +0100 arm64: dts: qcom: sm6115: Add cpufreq-hw support Add cpufreq-hw node and assign qcom,freq-domain properties to CPUs to enable CPU clock scaling. Signed-off-by: Adam Skladowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130200950.144618-4-a39.skl@gmail.com arch/arm64/boot/dts/qcom/sm6115.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 8b607c57655154ce4516d5d195bd174e6f0bede0 Author: Lin, Meng-Bo Date: Mon Nov 28 05:16:32 2022 +0000 arm64: dts: qcom: msm8916-wingtech-wt88047: Add flash LED WT88047 uses OCP 8110 Flash LED driver. Add it to the device tree. Signed-off-by: Lin, Meng-Bo Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221128051512.125148-1-linmengbo0689@protonmail.com .../boot/dts/qcom/msm8916-wingtech-wt88047.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit cb3920b50b4da3dfdb6c84164091a03ab1eacb6d Author: Krzysztof Kozlowski Date: Fri Nov 25 15:42:08 2022 +0100 arm64: dts: qcom: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: qcom/msm8998-oneplus-cheeseburger.dtb: leds: 'button-backlight' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' qcom/sc7180-trogdor-coachz-r1.dtb: pwmleds: 'keyboard-backlight' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221125144209.477328-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8998-oneplus-cheeseburger.dts | 2 +- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 6be310347c9ca850b6fcc3f0e6a9fa1bd49c7327 Author: Parikshit Pareek Date: Fri Nov 18 08:21:58 2022 +0530 arm64: dts: qcom: add SA8540P ride(Qdrive-3) Introduce the Qualcomm SA8540P ride automotive platform, also known as Qdrive-3 development board. This initial contribution supports SMP, CPUFreq, cluster idle, UFS, RPMh regulators, debug UART, PMICs, remoteprocs and USB. The SA8540P ride contains four PM8450 PMICs. A separate DTSI file has been created for PMIC, so that it can be used for future SA8540P based boards. Signed-off-by: Parikshit Pareek Tested-by: Brian Masney Reviewed-by: Brian Masney Tested-by: Eric Chanudet Reviewed-by: Eric Chanudet Reviewed-by: Konrad Dybcio Reviewed-by: Johan Hovold Tested-by: Andrew Halaney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221118025158.16902-3-quic_ppareek@quicinc.com arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/pm8450a.dtsi | 77 +++++++++++ arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 217 ++++++++++++++++++++++++++++++ 3 files changed, 295 insertions(+) commit 15245c93d3c8775a8405c0de18704a8c17a41775 Author: Konrad Dybcio Date: Thu Nov 17 15:16:13 2022 +0100 arm64: dts: qcom: sm8450-nagara: Add gpio line names for TLMM 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: < gpio-line-names = "NC", /* GPIO_0 */ < "NC", < "NC", < "NC", > gpio-line-names = "TELE_SPI_MISO", /* GPIO_0 */ > "TELE_SPI_MOSI", > "TELE_SPI_CLK", > "TELE_SPI_CS_N", < "PM8010_2_RESET_N", > "NC", < "NC", > "UWIDEC_PWR_EN", < "TOF_RST_N", > "NC" < "QLINK1_REQ", < "QLINK1_EN", /* GPIO_160 */ < "QLINK1_WMSS_RESET_N", > "NC", > "NC", /* GPIO_160 */ > "NC", The tele lens setup is different on 1 IV and 5 IV and power wiring is different for some lenses, so it makes sense. As for QLINK, no idea. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117141613.19942-1-konrad.dybcio@linaro.org .../dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts | 213 +++++++++++++++++++++ .../dts/qcom/sm8450-sony-xperia-nagara-pdx224.dts | 213 +++++++++++++++++++++ 2 files changed, 426 insertions(+) commit d132d9e7c4e53a23d158a9ec3d59c372eb30e70e Author: Konrad Dybcio Date: Thu Nov 17 11:58:44 2022 +0100 arm64: dts: qcom: msm8994: Drop spi-max-frequency from SPI host This is a device property, not a bus host one. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117105845.13644-1-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/msm8994.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 8a8845e07b1164792a4dd5ad4d333d793828b366 Author: Manivannan Sadhasivam Date: Thu Nov 17 11:01:43 2022 +0530 arm64: dts: qcom: sm8450: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117053145.10409-3-manivannan.sadhasivam@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 16b24fe54f0050843509321094d99f75fba33f59 Author: Bryan O'Donoghue Date: Thu Nov 17 00:32:32 2022 +0000 arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Add vision mezzanine The Vision Mezzanine for the RB5 ships with an imx577 and ov9282 populated. Other sensors and components may be added or stacked with additional mezzanines. Enable the IMX577 on the vision mezzanine. An example media-ctl pipeline for the imx577 is: media-ctl --reset media-ctl -v -d /dev/media0 -V '"imx577 '22-001a'":0[fmt:SRGGB10/4056x3040 field:none]' media-ctl -V '"msm_csiphy2":0[fmt:SRGGB10/4056x3040]' media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4056x3040]' media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4056x3040]' media-ctl -l '"msm_csiphy2":1->"msm_csid0":0[1]' media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]' yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 4056x3040 -F /dev/video0 Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117003232.589734-8-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dts | 62 ++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sm8250.dtsi | 33 ++++++++++++ 3 files changed, 96 insertions(+) commit 3c5aa4c758dd4a41119158dff2ab358b9b5cd520 Author: Bryan O'Donoghue Date: Thu Nov 17 00:32:31 2022 +0000 arm64: dts: qcom: sm8250: camss: Define ports and ports address/size cells Define the set of possible ports, one for each CSI PHY along with the port address and size cells @ the SoC dtsi level. Suggested-by: Konrad Dybcio Suggested-by: Laurent Pinchart Reviewed-by: Vladimir Zapolskiy Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117003232.589734-7-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 64cb4a44720143a94a261ce2b3098498d6dc84d6 Author: Bryan O'Donoghue Date: Thu Nov 17 00:32:30 2022 +0000 arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation mezzanine dts Move the dts data for the rb3 navigation mezzanine into its own dts file. Suggested-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117003232.589734-6-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/Makefile | 1 + .../qcom/sdm845-db845c-navigation-mezzanine.dts | 104 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 96 ------------------- 3 files changed, 105 insertions(+), 96 deletions(-) commit 5ceaa402f45c8fd19500c69bd9eb4385a14a5173 Author: Bryan O'Donoghue Date: Thu Nov 17 00:32:29 2022 +0000 arm64: dts: qcom: sdm845-db845c: Use okay not ok, disabled not disable for status Use preferred "ok" not "okay". Use preferred status "disabled" instead of "disable". There's no functional change here so no Fixes has been applied. Reported-by: Konrad Dybcio Reviewed-by: Laurent Pinchart Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117003232.589734-5-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 693c65e2bdbfecedc126904de663334f0f5031f9 Author: Bryan O'Donoghue Date: Thu Nov 17 00:32:28 2022 +0000 arm64: dts: qcom: sdm845-db845c: Drop redundant reg = in port The reg for the port is specified in the dtsi. Remove from the db845c dts. Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117003232.589734-4-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 1 - 1 file changed, 1 deletion(-) commit dacfbacc882ad3b1ce6ab2974386665db1976a61 Author: Bryan O'Donoghue Date: Thu Nov 17 00:32:27 2022 +0000 arm64: dts: qcom: sdm845-db845c: Drop redundant address-cells, size-cells declaration sdm845.dtsi camss already defines the address-cells and size-cells for camss, no need to replicate in sdm845-db845c.dts. Reported-by: Konrad Dybcio Reviewed-by: Laurent Pinchart Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117003232.589734-3-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 -- 1 file changed, 2 deletions(-) commit 0ddcea2f7692388f8eb1ce0f6804cb649bc76220 Author: Bryan O'Donoghue Date: Thu Nov 17 00:32:26 2022 +0000 arm64: dts: qcom: sdm845: Define the number of available ports The number of available ports is SoC specific so we should define it in the SoC dtsi. For the case of the sdm845 that is 4 CSI PHYs => four ports. Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117003232.589734-2-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 1aaa0772741820e2d15e0b1e109d776acb63d52a Author: Konrad Dybcio Date: Wed Nov 16 13:36:12 2022 +0100 arm64: dts: qcom: sm8350-sagami: Wire up SDHCI2 Adjust regulators, add required pin setup and finally enable SDHCI2 to get the SD Card slot going on Sagami Xperias. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116123612.34302-4-konrad.dybcio@linaro.org .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit dcbb6fe5d669f1832ad6a0781d9d52d728c8cf60 Author: Konrad Dybcio Date: Wed Nov 16 13:36:11 2022 +0100 arm64: dts: qcom: sm8350-sagami: Add GPIO line names for TLMM 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 Sagami-common / PDX215 DTSIs to better document the hardware. Diff between 215 and common: < "NC", < "NC", > "WLC_I2C_SDA", > "WLC_I2C_SCL", < "NC", > "WLC_INT_N", > "CAM_MCLK4", < "NC", < "NC", > "TOF_RST_N", < "NC", < "NC", < "NC", > "QLINK1_REQ", > "QLINK1_EN", > "QLINK1_WMSS_RESET_N", It's pretty logical as 1 III has WLC (WireLess Charging), and an additional 3D iToF sensor. As for QLINK, no idea. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116123612.34302-3-konrad.dybcio@linaro.org .../dts/qcom/sm8350-sony-xperia-sagami-pdx215.dts | 206 +++++++++++++++++++++ .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi | 203 ++++++++++++++++++++ 2 files changed, 409 insertions(+) commit 60477435e4de3375775c3a0c0d21467f2ae7c398 Author: Konrad Dybcio Date: Wed Nov 16 13:36:10 2022 +0100 arm64: dts: qcom: sm8350: Add SDHCI2 Add and configure the SDHCI host responsible for (mostly) SD Card and its corresponding pins' sleep states. The setup is *literally* 1:1 with 8450 (bar SDR50/104 may not be broken). Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116123612.34302-2-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm8350.dtsi | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit 25f08f02f47d0f83f39308359bad06719ad9a55c Author: Johan Hovold Date: Wed Nov 16 11:20:54 2022 +0100 arm64: dts: qcom: clean up 'regulator-allowed-modes' indentation When recently adding the missing 'regulator-allowed-modes' properties it appears that the binding example with its four-spaces indentation (corresponding to a single tab, which is still to little) was copied verbatim. Drop the unnecessary first line break after 'regulator-allowed-modes' properties and indent the single remaining continuation line properly. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116102054.4673-3-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 20 ++++++++------------ arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 20 ++++++++------------ arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 10 ++++------ .../boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts | 10 ++++------ arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 10 ++++------ .../boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi | 10 ++++------ arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 10 ++++------ arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 20 ++++++++------------ 8 files changed, 44 insertions(+), 66 deletions(-) commit 7fa58dc94dd274c27cf1ab54b37d2dd54d7e18ac Author: Srinivasa Rao Mandadapu Date: Wed Nov 16 15:03:04 2022 +0530 arm64: dts: qcom: sc7280: Remove unused sleep pin control nodes Remove unused and redundant sleep pin control entries as they are not referenced anywhere in sc7280 based platform's device tree variants. Signed-off-by: Srinivasa Rao Mandadapu Reported-by: Douglas Anderson Reviewed-by: Douglas Anderson Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1668591184-21099-1-git-send-email-quic_srivasam@quicinc.com .../qcom/sc7280-herobrine-audio-rt5682-3mic.dtsi | 8 ----- .../dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi | 20 ----------- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 20 ----------- arch/arm64/boot/dts/qcom/sc7280.dtsi | 40 ---------------------- 4 files changed, 88 deletions(-) commit f46ef374e0dcb8fd2f272a376cf0dcdab7e52fc2 Author: Konrad Dybcio Date: Tue Nov 15 14:26:26 2022 +0100 arm64: dts: qcom: pmk8350: Specify PBS register for PON PMK8350 is the first PMIC to require both HLOS and PBS registers for PON to function properly (at least in theory, sm8350 sees no change). The support for it on the driver side has been added long ago, but it has never been wired up. Do so. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115132626.7465-1-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/pmk8350.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a94ed9f38e49e7a459725340e630d87e194c814a Author: Konrad Dybcio Date: Tue Nov 15 14:09:36 2022 +0100 arm64: dts: qcom: sm8150: Use defines for power domain indices Use the defines from qcom-rpmpd.h instead of bare numbers for readability. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115130936.6830-2-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm8150.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3d530a0f4c43d7a31bf723363e4ea2edd883e035 Author: Konrad Dybcio Date: Tue Nov 15 14:09:35 2022 +0100 arm64: dts: qcom: sm8450: Use defines for power domain indices Use the defines from qcom-rpmpd.h instead of bare numbers for readability. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115130936.6830-1-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2ad207c412ba2a5ae118d660789897d85d569e0 Author: Konrad Dybcio Date: Mon Nov 14 11:59:13 2022 +0100 arm64: dts: qcom: sm6375-pdx225: Enable ADSP & CDSP Enable the newly added remote processors and assign them a firmware path. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114105913.37044-4-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fe6fd26aeddf99885b43807a92a7e0d44398b7b5 Author: Konrad Dybcio Date: Mon Nov 14 11:59:12 2022 +0100 arm64: dts: qcom: sm6375: Add ADSP&CDSP Add ADSP & CDSP remote processors. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114105913.37044-3-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm6375.dtsi | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 6f86fe79da95bb5e2c48a8e384ec382ed3c9df42 Author: Konrad Dybcio Date: Mon Nov 14 11:59:11 2022 +0100 arm64: dts: qcom: sm6375: Add SMP2P for ADSP&CDSP Add nodes for ADSP&CDSP SMP2P. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114105913.37044-2-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm6375.dtsi | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit ecbdcbcd6f78fcf1c50e804b9baf065a36b61d26 Author: Konrad Dybcio Date: Mon Nov 14 11:50:43 2022 +0100 arm64: dts: qcom: sm6375-pdx225: Enable SD card slot Set SDHCI VMMC/VQMMC to <=2v96 and allow load setting by the SDHCI driver, as required by this use case. Configure the SD Card Detect pin, enable the SDHCI2 controller and assign it the aforementioned regulators. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114105043.36698-4-konrad.dybcio@linaro.org .../dts/qcom/sm6375-sony-xperia-murray-pdx225.dts | 33 ++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit 51ed312aa5072c920f86c308565232e98e4d9079 Author: Konrad Dybcio Date: Tue Nov 15 16:27:27 2022 +0100 arm64: dts: qcom: sm6375-pdx225: Configure Samsung touchscreen Add a pretty bog-standard-for-Xperias-for-the-past-3-years touchscreen setup. The OEM that built the Xperia 10 IV for SONY decided to use some kind of a GPIO regulator that needs to be enabled at all times for both the touch panel and the display panel to function. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115152727.9736-10-konrad.dybcio@linaro.org .../dts/qcom/sm6375-sony-xperia-murray-pdx225.dts | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit a4fb3dd848c80d43088383085a80bc1e43702307 Author: Konrad Dybcio Date: Tue Nov 15 16:27:26 2022 +0100 arm64: dts: qcom: sm6375-pdx225: Configure SMD RPM regulators Configure regulators present on the Xperia 10 IV that are reachable via SMD RPM. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115152727.9736-9-konrad.dybcio@linaro.org .../dts/qcom/sm6375-sony-xperia-murray-pdx225.dts | 182 +++++++++++++++++++++ 1 file changed, 182 insertions(+) commit 6742dca249f7df7dc682f7def252f3e544190e72 Author: Konrad Dybcio Date: Tue Nov 15 16:27:25 2022 +0100 arm64: dts: qcom: sm6375-pdx225: Add PMIC peripherals Add and enable PMIC peripherals for PM6125, PMR735a and PMK8350 on the Xperia 10 IV. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115152727.9736-8-konrad.dybcio@linaro.org .../dts/qcom/sm6375-sony-xperia-murray-pdx225.dts | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 9d796b52bc870bb3397b9602092907dbd60ab0c4 Author: Konrad Dybcio Date: Tue Nov 15 16:27:24 2022 +0100 arm64: dts: qcom: sm6375-pdx225: Enable QUPs & GPI DMA Enable QUPs & GPI DMA on the Xperia 10 IV. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115152727.9736-7-konrad.dybcio@linaro.org .../dts/qcom/sm6375-sony-xperia-murray-pdx225.dts | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 6f196ab2ad1e2b56c67cc247293ac2c5b73dbe90 Author: Konrad Dybcio Date: Mon Nov 14 11:50:42 2022 +0100 arm64: dts: qcom: sm6375: Add SDHCI2 Configure the second SDHCI bus controller, which usually the interface used for SD cards. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114105043.36698-3-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm6375.dtsi | 82 ++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit b0dfe3c9d63222367539a87296c8ebe11020dff9 Author: Konrad Dybcio Date: Tue Nov 15 16:27:23 2022 +0100 arm64: dts: qcom: sm6375: Add QUPs and corresponding SPI/I2C hosts Add necessary nodes to support various QUP configurations. Note that: - QUP3/4/5 and 11 are straight up missing - There may be more QUPs physically on the SoC that work perfectly fine, but Qualcomm decided not to expose them on the downstream kernel - Many are missing pinctrls, as there are both missing pin funcs in the TLMM driver and missing configuration settings (though they are possible to guesstimate quite easily) Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115152727.9736-6-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm6375.dtsi | 306 +++++++++++++++++++++++++++++++++++ 1 file changed, 306 insertions(+) commit 704edf03c022a7e58ba02e012adac138b0e9cc09 Author: Konrad Dybcio Date: Tue Nov 15 16:27:22 2022 +0100 arm64: dts: qcom: sm6375: Add pin configs for some QUP configurations Add the pin setup for SPI/I2C configurations that are supported downstream. I can guesstimate the correct settings for other buses, but: - I have no hardware to test it on - Some QUPs are straight up missing pin funcs in TLMM - Vendors probably didn't really care and used whatever was there in the reference design and BSP - should any other be used, they can be configured at a later time Acked-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115152727.9736-5-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm6375.dtsi | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 42b8e5eeaf2d112ec20769b79a3fd45f6c347b67 Author: Konrad Dybcio Date: Tue Nov 15 16:27:21 2022 +0100 arm64: dts: qcom: sm6375: Add GPI DMA nodes Add nodes for GPI DMA hosts on SM6375. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115152727.9736-4-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm6375.dtsi | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit f73de026a49f05638b7dd260b055246846883266 Author: Konrad Dybcio Date: Tue Nov 15 16:27:20 2022 +0100 arm64: dts: qcom: pmk8350: Allow specifying arbitrary SID PMK8350 is shipped on SID6 with some SoCs, for example with SM6375. Add some preprocessor logic to allow changing the SID in cases like this. While I am not in favour of adding #if's into the device tree, this is the least messy way to handle this. If one isn't specified, it will default to 0 (as it has been previously). Suggested-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115152727.9736-3-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/pmk8350.dtsi | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit d409e44d2ec672ae9c1513485f850e17af829916 Author: Konrad Dybcio Date: Mon Nov 14 10:56:54 2022 +0100 arm64: dts: qcom: sm8450-nagara: Add Samsung touchscreen Add device node and required pinctrl settings (as well as a fixup for an existing one, whoops!) to support the Samsung Electronics touchscreen on Nagara devices. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114095654.34561-4-konrad.dybcio@linaro.org .../boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit 7d54cdf5640ca29e7fdaa8528e09f719b685bc8b Author: Konrad Dybcio Date: Mon Nov 14 10:56:53 2022 +0100 arm64: dts: qcom: sm8450: Add Xperia 5 IV support Add a device tree for the Xperia 5 IV (pdx224). It's literally the 1 IV with a smaller body, different panel, one camera lens (not sensor afaict) swapped out and no 3D iToF sensor, hence the device-specific DT is tiny. Be sure to follow the vbmeta disablement steps (detailed in pdx223 introduction commit message), otherwise your phone will not boot and will reject anything and everything with just a non-descriptive "Your device is corrupted" followed by a sad reboot. This should not be the case, as vbmeta should be plainly ignored in unlocked state, but what can we do.. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114095654.34561-3-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/Makefile | 1 + .../dts/qcom/sm8450-sony-xperia-nagara-pdx224.dts | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) commit 1620676b85f1fde182440bf5a74b80766ece4f07 Author: Konrad Dybcio Date: Mon Nov 14 10:56:52 2022 +0100 arm64: dts: qcom: sm8450-nagara: Separate out Nagara platform dtsi Turns out 1 IV is not the only Nagara device, reflect that in the DTS. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114095654.34561-2-konrad.dybcio@linaro.org .../dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts | 602 +------------------- .../boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi | 608 +++++++++++++++++++++ 2 files changed, 610 insertions(+), 600 deletions(-) commit 7960de64218136e928fe90635ec9132e68d41015 Author: Mao Jinlong Date: Mon Nov 14 17:12:51 2022 +0800 arm64: dts: qcom: sm8250: Add coresight components Add coresight components for sm8250. STM/ETM are added. Signed-off-by: Tao Zhang Signed-off-by: Mao Jinlong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114091251.13939-1-quic_jinlmao@quicinc.com arch/arm64/boot/dts/qcom/sm8250.dtsi | 497 +++++++++++++++++++++++++++++++++++ 1 file changed, 497 insertions(+) commit f86ae6f23a9e038a70f9cd0067a609da0b10893e Author: Dzmitry Sankouski Date: Sat Nov 12 23:33:00 2022 +0300 arm64: dts: qcom: sagit: add initial device tree for sagit New device support - Xiaomi Mi6 phone What works: - storage - usb - power regulators Signed-off-by: Dzmitry Sankouski Reviewed-by: Konrad Dybcio Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221112203300.536010-3-dsankouski@gmail.com arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts | 711 ++++++++++++++++++++++ arch/arm64/boot/dts/qcom/pm8998.dtsi | 8 + 3 files changed, 720 insertions(+) commit ff7f6d34ca07f76f430e8c2cac80495076895a99 Author: AngeloGioacchino Del Regno Date: Fri Nov 11 13:01:56 2022 +0100 arm64: dts: qcom: Add support for SONY Xperia X/X Compact This adds support for the Sony Xperia Loire/SmartLoire platform with a base configuration that is common across all of the devices that are based on this project. Also adds a base DT configuration for the Xperia X and Xperia X Compact (respectively, Suzu and Kugo) which is valid for both their RoW (single-sim), DSDS (dual-sim) and other regional variants of these two smartphones, that makes us able to boot to a UART console. Please note that, currently, the APC0/1 (cluster 0/1) vregs are set to a safe voltage in order to ensure boot stability until a proper solution for CPU DVFS scaling lands. Co-developed-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Co-developed-by: Marijn Suijten Signed-off-by: Marijn Suijten Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111120156.48040-12-angelogioacchino.delregno@collabora.com arch/arm64/boot/dts/qcom/Makefile | 2 + .../dts/qcom/msm8956-sony-xperia-loire-kugo.dts | 35 +++ .../dts/qcom/msm8956-sony-xperia-loire-suzu.dts | 17 ++ .../boot/dts/qcom/msm8956-sony-xperia-loire.dtsi | 282 +++++++++++++++++++++ 4 files changed, 336 insertions(+) commit 0484d3ce090252048daaeb6c7df982b0c7400830 Author: AngeloGioacchino Del Regno Date: Fri Nov 11 13:01:55 2022 +0100 arm64: dts: qcom: Add DTS for MSM8976 and MSM8956 SoCs This commit adds device trees for MSM8956 and MSM8976 SoCs. They are *almost* identical, with minor differences, such as MSM8956 having two A72 cores less. However, there is a bug in Sony Loire bootloader that requires presence of all 8 cores in the cpu{} node, so these will not be deleted. Co-developed-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Co-developed-by: Marijn Suijten Signed-off-by: Marijn Suijten Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111120156.48040-11-angelogioacchino.delregno@collabora.com arch/arm64/boot/dts/qcom/msm8956.dtsi | 18 + arch/arm64/boot/dts/qcom/msm8976.dtsi | 1198 +++++++++++++++++++++++++++++++++ 2 files changed, 1216 insertions(+) commit 0d97fdf380b478c358c94f50f1b942e87f407b9b Author: AngeloGioacchino Del Regno Date: Tue Nov 1 17:18:00 2022 +0100 arm64: dts: qcom: Add configuration for PMI8950 peripheral The PMI8950 features integrated peripherals like ADC, GPIO controller, MPPs and others. [luca@z3ntu.xyz: remove pm8950, style changes for 2022 standards, add wled] Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221101161801.1058969-2-luca@z3ntu.xyz arch/arm64/boot/dts/qcom/pmi8950.dtsi | 97 +++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit e07f41b0e1db8244867ff363f1d1eceefe8d6ad2 Author: AngeloGioacchino Del Regno Date: Fri Nov 11 13:01:54 2022 +0100 arm64: dts: qcom: Add configuration for PM8950 peripheral The PM8950 features integrated peripherals like ADC, GPIO controller, MPPs, PON keys and others. Add them to DT files that will be imported on boards having this PMIC combo (or one of them, anyways). Signed-off-by: Konrad Dybcio Co-developed-by: Marijn Suijten Signed-off-by: Marijn Suijten Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111120156.48040-10-angelogioacchino.delregno@collabora.com arch/arm64/boot/dts/qcom/pm8950.dtsi | 165 +++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) commit f8d8840c72b3df61b5252052b79020dabec01ab5 Author: Johan Hovold Date: Fri Nov 11 10:47:29 2022 +0100 arm64: dts: qcom: sm8250: fix USB-DP PHY registers When adding support for the DisplayPort part of the QMP PHY the binding (and devicetree parser) for the (USB) child node was simply reused and this has lead to some confusion. The third DP register region is really the DP_PHY region, not "PCS" as the binding claims, and lie at offset 0x2a00 (not 0x2c00). Similarly, there likely are no "RX", "RX2" or "PCS_MISC" regions as there are for the USB part of the PHY (and in any case the Linux driver does not use them). Note that the sixth "PCS_MISC" region is not even in the binding. Fixes: 5aa0d1becd5b ("arm64: dts: qcom: sm8250: switch usb1 qmp phy to USB3+DP mode") Cc: stable@vger.kernel.org # 5.13 Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111094729.11842-3-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 347b9491c595d5091bfabe65cad2fd6eee786153 Author: Johan Hovold Date: Fri Nov 11 10:47:28 2022 +0100 arm64: dts: qcom: sm6350: fix USB-DP PHY registers When adding support for the DisplayPort part of the QMP PHY the binding (and devicetree parser) for the (USB) child node was simply reused and this has lead to some confusion. The third DP register region is really the DP_PHY region, not "PCS" as the binding claims, and lie at offset 0x2a00 (not 0x2c00). Similarly, there likely are no "RX", "RX2" or "PCS_MISC" regions as there are for the USB part of the PHY (and in any case the Linux driver does not use them). Note that the sixth "PCS_MISC" region is not even in the binding. Fixes: 23737b9557fe ("arm64: dts: qcom: sm6350: Add USB1 nodes") Cc: stable@vger.kernel.org # 5.16 Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111094729.11842-2-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm6350.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9eb18ed70bd0f78099cb64f691586dbd17923805 Author: Johan Hovold Date: Fri Nov 11 10:38:57 2022 +0100 arm64: dts: qcom: sc8280xp: drop reference-clock source The source clock for the reference clock should not be described by the devicetree binding and instead this relationship should be modelled in the clock driver. Update the USB PHY nodes to match the fixed binding. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111093857.11360-4-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 64ebe7fc473fb3a7d67b73a2faa0a10cb322cdce Author: Bjorn Andersson Date: Thu Nov 10 19:25:15 2022 -0800 arm64: dts: qcom: sc8280xp: Add bwmon instances Add the two bwmon instances and define votes for CPU -> LLCC and LLCC -> DDR, with bandwidth values based on the downstream DeviceTree. Signed-off-by: Bjorn Andersson Reviewed-by: Krzysztof Kozlowski Tested-by: Steev Klimaszewski Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111032515.3460-11-quic_bjorande@quicinc.com arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 91 ++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit 33ba07ffd30a1da6f10995ef0a6ec51e17c84f31 Author: Bjorn Andersson Date: Thu Nov 10 19:25:13 2022 -0800 arm64: dts: qcom: sc8280xp: Set up L3 scaling Add the L3 interconnect path to all CPUs and define the bandwidth requirements for all opp entries across sc8280xp and sa8540p. The values are based on the tables reported by the hardware, distributed such that each value is the largest value, lower than the cluster frequency. Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111032515.3460-9-quic_bjorande@quicinc.com arch/arm64/boot/dts/qcom/sa8540p.dtsi | 39 ++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 51 ++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) commit e4f68d6c32aec8f3c7cdb07d18278e9a068a7eb0 Author: Bjorn Andersson Date: Thu Nov 10 19:25:12 2022 -0800 arm64: dts: qcom: sc8280xp: Add epss_l3 node Add a device node for the EPSS L3 frequency domain. Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111032515.3460-8-quic_bjorande@quicinc.com arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a0289a1040a557428a65d099dfdebe80f1a0d0eb Author: Bjorn Andersson Date: Thu Nov 10 19:25:11 2022 -0800 arm64: dts: qcom: Align with generic osm-l3/epss-l3 Update all references to OSM or EPSS L3 compatibles, to include the generic compatible, as defined by the updated binding. Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111032515.3460-7-quic_bjorande@quicinc.com arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 33c4e6588e4f018abc43381ee21fe2bed37e34a5 Author: Johan Hovold Date: Fri Nov 4 10:20:45 2022 +0100 arm64: dts: qcom: sc8280xp: update UFS PHY nodes Update the UFS PHY nodes to match the new binding. Signed-off-by: Johan Hovold Reviewed-by: Brian Masney Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104092045.17410-3-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 49 ++++++++++++---------------------- 1 file changed, 17 insertions(+), 32 deletions(-) commit 08f399a818b0eff552b1f23c3171950a58aea78f Author: Christian Marangi Date: Thu Nov 3 22:21:25 2022 +0100 arm64: dts: qcom: ipq6018: improve pcie phy pcs reg table This is not a fix on its own but more a cleanup. Phy qmp pcie driver currently have a workaround to handle pcs_misc not declared and add 0x400 offset to the pcs reg if pcs_misc is not declared. Correctly declare pcs_misc reg and reduce PCS size to the common value of 0x1f0 as done for every other qmp based pcie phy device. Signed-off-by: Christian Marangi Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103212125.17156-2-ansuelsmth@gmail.com arch/arm64/boot/dts/qcom/ipq6018.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 147e8b2080f1a0496a1f51739cf591324f133619 Author: Nícolas F. R. A. Prado Date: Wed Nov 2 14:20:02 2022 -0400 arm64: dts: qcom: sc7180-trogdor: Remove VBAT supply from rt5682s These devicetrees override a rt5682 node to use the rt5682s compatible, however, unlike rt5682, rt5682s doesn't have a VBAT supply. Remove the inexistent supply in the rt5682s nodes. Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221102182002.255282-9-nfraprado@collabora.com arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dtsi | 1 + arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dts | 1 + arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dts | 1 + 3 files changed, 3 insertions(+) commit 172cb25fd25786a3290cffd38dea677edb0b7cca Author: Nícolas F. R. A. Prado Date: Wed Nov 2 14:20:01 2022 -0400 arm64: dts: qcom: sc7180-trogdor: Add missing supplies for rt5682 The DBVDD and LDO1-IN supplies for rt5682 are required but are missing. They are supplied by the same power rail as AVDD. Add them. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221102182002.255282-8-nfraprado@collabora.com arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 30d70ec8f7fd0c5ecb7f27894dd2514b160257e2 Author: Bjorn Andersson Date: Mon Dec 5 09:43:09 2022 -0800 arm64: dts: qcom: sa8295p-adp: Add RTC node The first PM8540 PMIC has an available RTC block, describe this in the SA8295P ADP. Mark it as wakeup-source to allow waking the system from sleep. Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221205174309.16733-1-quic_bjorande@quicinc.com arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 47446b50ad2549af4fcc93f82a148ab107e6ef6a Author: Greg Kroah-Hartman Date: Mon Dec 5 13:12:06 2022 +0100 firmware_loader: fix up to_fw_sysfs() to preserve const to_fw_sysfs() was changed in commit 23680f0b7d7f ("driver core: make struct class.dev_uevent() take a const *") to pass in a const pointer but not pass it back out to handle some changes in the driver core. That isn't the best idea as it could cause problems if used incorrectly, so switch to use the container_of_const() macro instead which will preserve the const status of the pointer and enforce it by the compiler. Fixes: 23680f0b7d7f ("driver core: make struct class.dev_uevent() take a const *") Cc: Luis Chamberlain Reviewed-by: Sakari Ailus Reviewed-by: Jason Gunthorpe Acked-by: Russ Weight Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221205121206.166576-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/sysfs.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c3da679286bee1d897bb24a804cca4ff58781bec Author: Greg Kroah-Hartman Date: Mon Dec 5 13:12:05 2022 +0100 usb.h: take advantage of container_of_const() Instead of rolling our own const-checking logic in to_usb_interface() and to_usb_device() use the newly added container_of_const() instead, making the logic much simpler overall. Reviewed-by: Sakari Ailus Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221205121206.166576-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman include/linux/usb.h | 42 ++---------------------------------------- 1 file changed, 2 insertions(+), 40 deletions(-) commit 6149f83b3165955e9519de483b30b26d1518ad0f Author: Greg Kroah-Hartman Date: Mon Dec 5 13:12:04 2022 +0100 device.h: move kobj_to_dev() to use container_of_const() Instead of rolling our own const-checking logic, use the newly introduced container_of_const() to handle it all for us automatically. Cc: Thomas Gleixner Reviewed-by: Sakari Ailus Reviewed-by: Jason Gunthorpe Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221205121206.166576-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman include/linux/device.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit 64f6a5d1922bf6d2b2d845de20d4563a6f328e2d Author: Greg Kroah-Hartman Date: Mon Dec 5 13:12:03 2022 +0100 container_of: add container_of_const() that preserves const-ness of the pointer container_of does not preserve the const-ness of a pointer that is passed into it, which can cause C code that passes in a const pointer to get a pointer back that is not const and then scribble all over the data in it. To prevent this, container_of_const() will preserve the const status of the pointer passed into it using the newly available _Generic() method. Suggested-by: Jason Gunthorpe Suggested-by: Sakari Ailus Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Jason Gunthorpe Reviewed-by: Andy Shevchenko Reviewed-by: Sakari Ailus Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221205121206.166576-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman include/linux/container_of.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit ef8d98f20dfc79777d2b66a30926533225dc6efa Author: NeilBrown Date: Mon Oct 10 10:26:51 2022 +1100 NFS: avoid spurious warning of lost lock that is being unlocked. When the NFSv4 state manager recovers state after a server restart, it reports that locks have been lost if it finds any lock state for which recovery hasn't been successful. i.e. any for which NFS_LOCK_INITIALIZED is not set. However it only tries to recover locks that are still linked to inode->i_flctx. So if a lock has been removed from inode->i_flctx, but the state for that lock has not yet been destroyed, then a spurious warning results. nfs4_proc_unlck() calls locks_lock_inode_wait() - which removes the lock from ->i_flctx - before sending the unlock request to the server and before the final nfs4_put_lock_state() is called. This allows a window in which a spurious warning can be produced. So add a new flag NFS_LOCK_UNLOCKING which is set once the decision has been made to unlock the lock. This will prevent it from triggering any warning. Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust fs/nfs/nfs4_fs.h | 1 + fs/nfs/nfs4proc.c | 3 ++- fs/nfs/nfs4state.c | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) commit 5559405df652008e56eee88872126fe4c451da67 Author: Hawkins Jiawei Date: Mon Oct 24 00:39:45 2022 +0800 nfs: fix possible null-ptr-deref when parsing param According to commit "vfs: parse: deal with zero length string value", kernel will set the param->string to null pointer in vfs_parse_fs_string() if fs string has zero length. Yet the problem is that, nfs_fs_context_parse_param() will dereferences the param->string, without checking whether it is a null pointer, which may trigger a null-ptr-deref bug. This patch solves it by adding sanity check on param->string in nfs_fs_context_parse_param(). Signed-off-by: Hawkins Jiawei Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust fs/nfs/fs_context.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d3fd0ee7a4a1e796413fab7affc72eeec31bed13 Author: Frank Wunderlich Date: Sun Nov 27 12:41:38 2022 +0100 dt-bindings: PCI: mediatek-gen3: add support for mt7986 Add compatible string and clock-definition for mt7986. It needs 4 clocks for PCIe, define them in binding. Link: https://lore.kernel.org/r/20221127114142.156573-5-linux@fw-web.de Signed-off-by: Frank Wunderlich Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Matthias Brugger Acked-by: Jianjun Wang .../devicetree/bindings/pci/mediatek-pcie-gen3.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit ec9eaf68c1dcd1b0d4e0bad0630ddac49c20bbe8 Author: Frank Wunderlich Date: Sun Nov 27 12:41:37 2022 +0100 dt-bindings: PCI: mediatek-gen3: add SoC based clock config The PCIe driver covers different SOC which needing different clock configs. Define them based on compatible. Link: https://lore.kernel.org/r/20221127114142.156573-4-linux@fw-web.de Signed-off-by: Frank Wunderlich Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Acked-by: Jianjun Wang .../bindings/pci/mediatek-pcie-gen3.yaml | 47 ++++++++++++++++------ 1 file changed, 35 insertions(+), 12 deletions(-) commit d564d2c4c2445cb0972453933dc87c2dcaac8597 Author: ChenXiaoSong Date: Fri Sep 23 13:40:15 2022 +0800 NFSv4: check FMODE_EXEC from open context mode in nfs4_opendata_access() After converting file f_flags to open context mode by flags_to_mode(), open context mode will have FMODE_EXEC when file open for exec, so we check FMODE_EXEC from open context mode. No functional change, just simplify the code. Signed-off-by: ChenXiaoSong Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 6f1c1d95dc93b52a8ef9cc1f3f610c2d5e6b217b Author: ChenXiaoSong Date: Fri Sep 23 13:40:14 2022 +0800 NFS: make sure open context mode have FMODE_EXEC when file open for exec Because file f_mode never have FMODE_EXEC, open context mode won't get FMODE_EXEC from file f_mode. Open context mode only care about FMODE_READ/ FMODE_WRITE/FMODE_EXEC, and all info about open context mode can be convert from file f_flags, so convert file f_flags to open context mode by flags_to_mode(). Signed-off-by: ChenXiaoSong Signed-off-by: Trond Myklebust fs/nfs/inode.c | 3 ++- fs/nfs/nfs4file.c | 12 ++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) commit bb3860cc02c660b409a1e02521b84b1d7d4e84cd Author: Heiko Carstens Date: Wed Nov 30 19:43:28 2022 +0100 s390/nmi: get rid of private slab cache Get rid of private "nmi_save_areas" slab cache. The only reason this was introduced years ago was that with some slab debugging options allocations would only guarantee a minimum alignment of ARCH_KMALLOC_MINALIGN, which was eight bytes back then. This is not sufficient for the extended machine check save area. However since commit 59bb47985c1d ("mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two)") kmalloc guarantees a power-of-two alignment even with debugging options enabled. Therefore the private slab cache can be removed. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/nmi.c | 40 +++++++++------------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) commit 742aed05af97dc5ba6c53a4b6cb6a7b31e32f9e9 Author: Heiko Carstens Date: Tue Nov 29 17:22:14 2022 +0100 s390/nmi: move storage error checking back to C, enter with DAT on Checking for storage errors in machine check entry code was done in order to handle also storage errors on kernel page tables. However this is extremely unlikely and some basic assumptions what works on machine check entry are necessary anyway. In order to simplify machine check handling delay checking for storage errors to C code. With this also change the machine check new PSW to have DAT on, which simplifies the entry code even further. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/entry.S | 34 ++++------------------------------ arch/s390/kernel/nmi.c | 16 +++++++++++++++- arch/s390/kernel/setup.c | 3 ++- 3 files changed, 21 insertions(+), 32 deletions(-) commit 506faa5b9b4f05e667b39252a28dace17a5017a1 Author: Heiko Carstens Date: Mon Nov 28 14:16:33 2022 +0100 s390/nmi: print machine check interruption code before stopping system In case a system will be stopped because of e.g. missing validity bits print the machine check interruption code before the system is stopped. This is helpful, since up to now no message was printed in such a case. Only a disabled wait PSW was loaded, which doesn't give a hint of what went wrong. Improve this by printing a message with debug information. Reviewed-by: Peter Oberparleiter Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/nmi.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit b64d7254ffe8b11010150fa97a4b235ec36e7a90 Author: Heiko Carstens Date: Mon Nov 28 14:16:06 2022 +0100 s390/sclp: introduce sclp_emergency_printk() Introduce sclp_emergency_printk() which can be used to emit a message in emergency cases. sclp_emergency_printk() is only supposed to be used in cases where it can be assumed that regular console device drivers may not work anymore. For example this may be the case for unrecoverable machine checks. Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/sclp.h | 1 + drivers/s390/char/sclp_early_core.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit a4c41fe3985d4c1c31d84833b30fd9ac48fe6f84 Author: Heiko Carstens Date: Mon Nov 28 14:14:27 2022 +0100 s390/sclp: keep sclp_early_sccb Keep sclp_early_sccb so it can also be used after initdata has been freed. This is a prerequisite to allow printing a message from the machine check handler. Reviewed-by: Peter Oberparleiter Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/mm/init.c | 3 --- drivers/s390/char/sclp_early_core.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) commit f9e5938ace2cc8ecf15815649481266017135757 Author: Heiko Carstens Date: Sun Nov 27 09:45:26 2022 +0100 s390/nmi: rework register validation handling If a machine check happens in kernel mode, and the machine check interruption code indicates that e.g. vector register contents in the machine check area are not valid, the logic is to kill current. The idea behind this was that if within kernel context vector registers are not used then it is sufficient to kill the current user space process to avoid that it continues with potentially corrupt register contents. This however does not necessarily work, since the current code does not take into account that a machine check can also happen when a kernel thread is running (= no user space context), and in addition there is no way to distinguish between the "previous" and "next" user process task, if the machine check happens when a task switch happens. Given that machine checks with invalid saved register contents in the machine check save area are extremely rare, simplify the logic: if register contents are invalid and the previous context was kernel mode, stop the whole machine. If the previous context was user mode, kill the corresponding task. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/nmi.c | 64 ++++++++------------------------------------------ 1 file changed, 10 insertions(+), 54 deletions(-) commit 5720aab289e138463bb499a42681c1c526030756 Author: Heiko Carstens Date: Thu Dec 1 18:01:36 2022 +0100 s390/nmi: use vector instruction macros instead of byte patterns Use vector instruction macros instead of byte patterns to increase readability. The generated code is nearly identical: - 1e8: e7 0f 10 00 00 36 vlm %v0,%v15,0(%r1) - 1ee: e7 0f 11 00 0c 36 vlm %v16,%v31,256(%r1) + 1e8: e7 0f 10 00 30 36 vlm %v0,%v15,0(%r1),3 + 1ee: e7 0f 11 00 3c 36 vlm %v16,%v31,256(%r1),3 By using the VLM macro the alignment hint is automatically specified too. Even though from a performance perspective it doesn't matter at all for the machine check code, this shows yet another benefit when using the macros. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/nmi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 706f2ada822280a1f8f64bbe03ec5362ef46dd78 Author: Heiko Carstens Date: Thu Dec 1 17:24:54 2022 +0100 s390/vx: add vx-insn.h wrapper include file The vector instruction macros can also be used in inline assemblies. For this the magic asm(".include \"asm/vx-insn.h\"\n"); must be added to C files in order to avoid that the pre-processor eliminates the __ASSEMBLY__ guarded macros. This however comes with the problem that changes to asm/vx-insn.h do not cause a recompile of C files which have only this magic statement instead of a proper include statement. This can be observed with the arch/s390/kernel/fpu.c file. In order to fix this problem and also to avoid that the include must be specified twice, add a wrapper include header file which will do all necessary steps. This way only the vx-insn.h header file needs to be included and changes to the new vx-insn-asm.h header file cause a recompile of all dependent files like it should. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/vx-insn-asm.h | 681 ++++++++++++++++++++++++++++++++++++ arch/s390/include/asm/vx-insn.h | 671 +---------------------------------- arch/s390/kernel/fpu.c | 3 +- lib/raid6/s390vx.uc | 3 +- 4 files changed, 689 insertions(+), 669 deletions(-) commit a70f72767fa17d76c48d1123213dbe631556ec06 Author: Sven Schnelle Date: Thu Dec 1 16:05:43 2022 +0100 s390/ipl: use octal values instead of S_* macros octal values are easier to read and checkpatch also recommends to use them, so replace all the S_* macros with their counterparts. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/ipl.c | 66 +++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 36 deletions(-) commit e2d2a2968f2abe1b8215fd99bfc68d6284d51ac2 Author: Sven Schnelle Date: Wed Oct 5 10:17:41 2022 +0200 s390/ipl: add eckd dump support This adds support to use ECKD disks as dump device to linux. The new dump type is called 'eckd_dump', parameters are the same as for eckd ipl. Signed-off-by: Sven Schnelle Reviewed-by: Vasily Gorbik Signed-off-by: Alexander Gordeev arch/s390/boot/ipl_parm.c | 3 ++ arch/s390/include/asm/ipl.h | 2 ++ arch/s390/include/uapi/asm/ipl.h | 1 + arch/s390/kernel/ipl.c | 72 +++++++++++++++++++++++++++++++++++++++- drivers/s390/char/zcore.c | 4 +++ 5 files changed, 81 insertions(+), 1 deletion(-) commit 87fd22e0ae9239f695266d3181b53ad9f758bd74 Author: Sven Schnelle Date: Wed Oct 5 10:17:40 2022 +0200 s390/ipl: add eckd support This adds support to IPL from ECKD DASDs to linux. It introduces a few sysfs files in /sys/firmware/reipl/eckd: bootprog: the boot program selector clear: whether to issue a diag308 LOAD_NORMAL or LOAD_CLEAR device: the device to ipl from br_chr: Cylinder/Head/Record number to read the bootrecord from. Might be '0' or 'auto' if it should be read from the volume label. scpdata: data to be passed to the ipl'd program. The new ipl type is called 'eckd'. Signed-off-by: Sven Schnelle Reviewed-by: Vasily Gorbik Signed-off-by: Alexander Gordeev arch/s390/boot/ipl_parm.c | 6 + arch/s390/include/asm/ipl.h | 9 ++ arch/s390/include/asm/sclp.h | 1 + arch/s390/include/uapi/asm/ipl.h | 28 ++++ arch/s390/kernel/ipl.c | 282 +++++++++++++++++++++++++++++++++++++++ drivers/s390/char/sclp_early.c | 4 +- 6 files changed, 329 insertions(+), 1 deletion(-) commit 347fafe0eb46df941965c355c77ce480e4d49f1f Author: Yang Wang Date: Mon Dec 5 21:16:26 2022 +0800 drm/amdgpu: fix mmhub register base coding error fix MMHUB register base coding error. Fixes: ec6837591f992 ("drm/amdgpu/gmc10: program the smallK fragment size") Signed-off-by: Yang Wang Reviewed-by: Hawking Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 2aecbe492a3c0bf4c21f78c099a6f6c205fab0c7 Author: Tim Huang Date: Mon Dec 5 14:33:25 2022 +0800 drm/amdgpu: add tmz support for GC IP v11.0.4 Add tmz support for GC 11.0.4. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 + 1 file changed, 1 insertion(+) commit f9caa237372b106b5e70ba1a4bfd4222eb79ec71 Author: Tim Huang Date: Mon Dec 5 14:18:23 2022 +0800 drm/amdgpu: enable GFX Clock Gating control for GC IP v11.0.4 Enable GFX IP v11.0.4 CG gate/ungate control. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + 1 file changed, 1 insertion(+) commit a89e2965da6e644729a8ee9c318b7fa9a2990353 Author: Tim Huang Date: Mon Dec 5 13:55:36 2022 +0800 drm/amdgpu: enable GFX Power Gating for GC IP v11.0.4 Enable GFX Power Gating control for GC IP v11.0.4. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 ++ 1 file changed, 2 insertions(+) commit f2b91e5a7cc0368709964994ca253781b51a486a Author: Tim Huang Date: Mon Dec 5 11:24:37 2022 +0800 drm/amdgpu: enable GFX IP v11.0.4 CG support Add CG support for GFX/MC/HDP/ATHUB/IH/BIF. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 89f3f24233c886c5662439fd829822adf3b88167 Author: Jiadong Zhu Date: Mon Dec 5 09:55:32 2022 +0800 drm/amdgpu: Make amdgpu_ring_mux functions as static lkp robot reported missing-prototypes and unused-but-set-variable warnings on some functions of amdgpu_mcbp_mux.c. Make them static and remove the unused variable. Reported-by: kernel test robot Signed-off-by: Jiadong Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f9d00a4a8dc8fff951c97b3213f90d6bc7a72175 Author: Christian König Date: Thu Nov 24 08:26:40 2022 +0100 drm/amdgpu: generally allow over-commit during BO allocation We already fallback to a dummy BO with no backing store when we allocate GDS,GWS and OA resources and to GTT when we allocate VRAM. Drop all those workarounds and generalize this for GTT as well. This fixes ENOMEM issues with runaway applications which try to allocate/free GTT in a loop and are otherwise only limited by the CPU speed. The CS will wait for the cleanup of freed up BOs to satisfy the various domain specific limits and so effectively throttle those buggy applications down to a sane allocation behavior again. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Arunpravin Paneer Selvam Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 16 +++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +----- 2 files changed, 4 insertions(+), 18 deletions(-) commit 6ee31b3a4f596aba5123fca2776df316c20f7b06 Author: Aurabindo Pillai Date: Fri Nov 25 19:13:41 2022 -0500 drm/amd/display: fix array index out of bound error in DCN32 DML [Why&How] LinkCapacitySupport array is indexed with the number of voltage states and not the number of max DPPs. Fix the error by changing the array declaration to use the correct (larger) array size of total number of voltage states. Signed-off-by: Aurabindo Pillai Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c4ce7e488e679b95f392f4c87532d99d367fbd7 Author: Aric Cyr Date: Mon Nov 28 09:43:09 2022 -0500 drm/amd/display: 3.2.215 Acked-by: Stylon Wang Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a10c126e0ded0154cfaa14fa7369bd558244c96 Author: Dillon Varone Date: Sat Nov 26 02:38:01 2022 -0500 drm/amd/display: set optimized required for comp buf changes [Description] When compressed buffer allocation changes, optimized required flag should be set to trigger an update in optimize bandwidth. Reviewed-by: Aric Cyr Acked-by: Stylon Wang Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 00812bfc7bcb02faf127ee05f6ac27a5581eb701 Author: Nicholas Kazlauskas Date: Fri Nov 25 11:30:38 2022 -0500 drm/amd/display: Add debug option to skip PSR CRTC disable [Why] It's currently tied to Z10 support, and is required for Z10, but we can still support Z10 display off without PSR. We currently need to skip the PSR CRTC disable to prevent stuttering and underflow from occuring during PSR-SU. [How] Add a debug option to allow specifying this separately. Reviewed-by: Robin Chen Acked-by: Stylon Wang Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 6f0bf2dbdd28391ea349516ebdd855fcc799581c Author: Zhongwei Date: Tue Nov 22 14:28:41 2022 +0800 drm/amd/display: correct DML calc error of UrgentLatency [Why] The input UrgentLatency in CalculateUrgentBurstFactor of prefect check is wrong. [How] Correct to the correct one to keep same as HW formula Reviewed-by: Charlene Liu Acked-by: Stylon Wang Signed-off-by: Zhongwei Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c | 2 +- drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c | 2 +- drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit c800d9ff8cdec57778ab21f4d933a25f41f44738 Author: Charlene Liu Date: Fri Nov 25 00:38:17 2022 -0500 drm/amd/display: correct static_screen_event_mask [why] HW register bit define changed. Reviewed-by: Zhan Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Stylon Wang Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c | 40 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.h | 4 +++ drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c | 4 +-- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.c | 29 +++++++++++++++- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.h | 5 ++- .../gpu/drm/amd/display/dc/dcn314/dcn314_init.c | 4 +-- .../gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 2 +- 7 files changed, 81 insertions(+), 7 deletions(-) commit a27416656acd8c1e7e6797259c23bc0742c03a8a Author: Alvin Lee Date: Thu Nov 24 22:36:26 2022 -0500 drm/amd/display: Ensure commit_streams returns the DC return code [Description] - Ensure dc_commit_streams returns the correct return code so any failures can be handled properly in DM layer - If set timings fail and we have to remove MPO planes, do so unconditionally but make sure to mark for removal so we report the VSYNC and prevent timeout - Failure to remove MPO plane results in set timings failure due to lack of resources Reviewed-by: Aric Cyr Acked-by: Stylon Wang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8747075f54fa0c5d30fcc48e5149c19c02641fa8 Author: Paul Hsieh Date: Thu Nov 24 13:03:26 2022 +0800 drm/amd/display: read invalid ddc pin status cause engine busy [Why] There is no DDC_6 pin on new asic cause the mapping table is incorrect. When app try to access DDC_VGA port, driver read an invalid ddc pin status and report engine busy. [How] Add dummy DDC_6 pin to align gpio structure. Reviewed-by: Alvin Lee Acked-by: Stylon Wang Signed-off-by: Paul Hsieh Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/gpio/dcn32/hw_factory_dcn32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2a2acdd7f84fe97ef9c74dd4da99b67b61a97521 Author: Dillon Varone Date: Wed Nov 23 14:15:00 2022 -0500 drm/amd/display: Bypass DET swath fill check for max clocks [Description] If validating for max voltage level (therefore max clocks) always pass over the DET swath fill latency hiding check. Reviewed-by: Alvin Lee Acked-by: Stylon Wang Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e61aebe38714d5f3b320002d19167f57b8cd3b93 Author: Dillon Varone Date: Wed Nov 23 10:44:16 2022 -0500 drm/amd/display: Disable uclk pstate for subvp pipes [Description] When subvp is in use, main pipes should block unintended natural uclk pstate changes to prevent disruption to the state machine. Reviewed-by: Alvin Lee Acked-by: Stylon Wang Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 54e9ea3d5dc8f215abe53c355ddc70c18e0d3329 Author: Michael Strauss Date: Thu Nov 17 10:40:46 2022 -0500 drm/amd/display: Fix DCN2.1 default DSC clocks [WHY] Low dscclk in high vlevels blocks some DSC modes. [HOW] Update dscclk to 1/3 of dispclk. Reviewed-by: Charlene Liu Acked-by: Stylon Wang Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 39173f248a5416286c7f42961b717ee39e0e0d1f Author: David Galiffi Date: Fri Nov 18 17:35:22 2022 -0500 drm/amd/display: Enable dp_hdmi21_pcon support [Why] It is not enabled for DCN3.0.1, 3.0.2, 3.0.3. [How] Add `dc->caps.dp_hdmi21_pcon_support = true` to these DCN versions. Reviewed-by: Martin Leung Acked-by: Stylon Wang Signed-off-by: David Galiffi Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c | 2 ++ 3 files changed, 6 insertions(+) commit f0882d3afb9a16285eaa2b76a7e60f46ebdefe92 Author: Dmytro Laktyushkin Date: Mon Nov 21 15:29:35 2022 -0500 drm/amd/display: prevent seamless boot on displays that don't have the preferred dig Seamless boot requires VBIOS to select dig matching to link order wise. A significant amount of dal logic makes assumption we are using preferred dig for eDP and if this isn't the case then seamless boot is not supported. Reviewed-by: Martin Leung Acked-by: Stylon Wang Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ 1 file changed, 3 insertions(+) commit 5f9f97c02dd2ee25c8b2c3001a75389dc66743b2 Author: Aurabindo Pillai Date: Mon Nov 21 15:48:23 2022 -0500 drm/amd/display: trigger timing sync only if TG is running [Why&How] If the timing generator isnt running, it does not make sense to trigger a sync on the corresponding OTG. Check this condition before starting. Otherwise, this will cause error like: *ERROR* GSL: Timeout on reset trigger! Fixes: dc55b106ad477c ("drm/amd/display: Disable phantom OTG after enable for plane disable") Reviewed-by: Rodrigo Siqueira Reviewed-by: Alvin Lee Acked-by: Stylon Wang Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c6ac25f646b6ce5edf0a719a314e3f31c7a99bb0 Author: Chris Park Date: Thu May 5 01:55:52 2022 -0400 drm/amd/display: Remove DTB DTO on CLK update [Why] DTB DTO is programmed more correctly during link enable. Programming them on CLK update which may arrive frequently and sporadically per flip throws off DTB DTO. [How] Remove DTB DTO programming on clock update. Reviewed-by: Alvin Lee Acked-by: Jasdeep Dhillon Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 37 ---------------------- .../drm/amd/display/dc/dcn321/dcn321_resource.c | 2 +- 2 files changed, 1 insertion(+), 38 deletions(-) commit 88f4a9f813c549f6b8a6fbf12030949b48a4d5a4 Author: Andreas Gruenbacher Date: Mon Dec 5 22:27:28 2022 +0100 gfs2: Partially revert gfs2_inode_lookup change Commit c412a97cf6c5 changed delete_work_func() to always perform an inode lookup when gfs2_try_evict() fails. This doesn't make sense as a gfs2_try_evict() failure indicates that the inode is likely still in use. Revert that change. Fixes: c412a97cf6c5 ("gfs2: Use TRY lock in gfs2_inode_lookup for UNLINKED inodes") Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 2 ++ 1 file changed, 2 insertions(+) commit 2ec750a01d189cf1872cd79490d0911a7bd519f8 Author: Andreas Gruenbacher Date: Sun Dec 4 12:51:55 2022 +0100 gfs2: Add gfs2_inode_lookup comment Add comment on when and why gfs2_cancel_delete_work() needs to be skipped in gfs2_inode_lookup(). Signed-off-by: Andreas Gruenbacher fs/gfs2/inode.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3781ec9e09123d955b93fc8522ffb683a51f865d Author: Andreas Gruenbacher Date: Mon Dec 5 14:44:37 2022 +0100 gfs2: Uninline and improve glock_{set,clear}_object Those functions have reached a size at which having them inline isn't useful anymore, so uninline them. In addition, report the glock name on assertion failures. Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 42 ++++++++++++++++++++++++++++++++++++++++++ fs/gfs2/glock.h | 29 +++-------------------------- 2 files changed, 45 insertions(+), 26 deletions(-) commit fe1bff6517de789d491844f53e61e4ff02e8f8b1 Author: Andreas Gruenbacher Date: Sun Dec 4 13:27:11 2022 +0100 gfs2: Simply dequeue iopen glock in gfs2_evict_inode With the previous change, to simplify things, we can always just dequeue and uninitialize the iopen glock in gfs2_evict_inode() even if it isn't queued anymore. Signed-off-by: Andreas Gruenbacher fs/gfs2/super.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 764665c6775251d4569ba9f09981459bbb166359 Author: Andreas Gruenbacher Date: Sun Dec 4 03:48:52 2022 +0100 gfs2: Clean up after gfs2_create_inode rework Since commit 3d36e57ff768 ("gfs2: gfs2_create_inode rework"), gfs2_evict_inode() and gfs2_create_inode() / gfs2_inode_lookup() will synchronize via the inode hash table and we can be certain that once a new inode is inserted into the inode hash table(), gfs2_evict_inode() has completely destroyed any previous versions. We no longer need to worry about overlapping inode object lifespans. Update the code and comments accordingly. Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.h | 14 -------------- fs/gfs2/super.c | 21 ++++++++++++++------- 2 files changed, 14 insertions(+), 21 deletions(-) commit 97236ad5a68c6b7603cea2ad01c588887e5cb961 Author: Andreas Gruenbacher Date: Sun Dec 4 13:02:39 2022 +0100 gfs2: Avoid dequeuing GL_ASYNC glock holders twice When a locking request fails, the associated glock holder is automatically dequeued from the list of active and waiting holders. For GL_ASYNC locking requests, this will obviously happen asynchronously and it can race with attempts to cancel that locking request via gfs2_glock_dq(). Therefore, don't forget to check if a locking request has already been dequeued in gfs2_glock_dq(). Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4ad02083a092b497f35804de03eaa62cf81fada6 Author: Andreas Gruenbacher Date: Fri Dec 2 18:00:15 2022 +0100 gfs2: Make gfs2_glock_hold return its glock argument This allows code like 'gl = gfs2_glock_hold(...)'. Signed-off-by: Andreas Gruenbacher fs/gfs2/file.c | 3 +-- fs/gfs2/glock.c | 6 +++--- fs/gfs2/glock.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) commit 70376c7ff31221f1d21db5611d8209e677781d3a Author: Andreas Gruenbacher Date: Sun Dec 4 17:00:04 2022 +0100 gfs2: Always check inode size of inline inodes Check if the inode size of stuffed (inline) inodes is within the allowed range when reading inodes from disk (gfs2_dinode_in()). This prevents us from on-disk corruption. The two checks in stuffed_readpage() and gfs2_unstuffer_page() that just truncate inline data to the maximum allowed size don't actually make sense, and they can be removed now as well. Reported-by: syzbot+7bb81dfa9cda07d9cd9d@syzkaller.appspotmail.com Signed-off-by: Andreas Gruenbacher fs/gfs2/aops.c | 2 -- fs/gfs2/bmap.c | 3 --- fs/gfs2/glops.c | 3 +++ 3 files changed, 3 insertions(+), 5 deletions(-) commit 7db354444ad8429e660b0f8145d425285d4f90ff Author: Andreas Gruenbacher Date: Sun Dec 4 16:50:41 2022 +0100 gfs2: Cosmetic gfs2_dinode_{in,out} cleanup In each of the two functions, add an inode variable that points to &ip->i_inode and use that throughout the rest of the function. Signed-off-by: Andreas Gruenbacher fs/gfs2/glops.c | 41 +++++++++++++++++++++-------------------- fs/gfs2/super.c | 27 ++++++++++++++------------- 2 files changed, 35 insertions(+), 33 deletions(-) commit 83e1bcaf8cef26edaaf2a6098ef760f563683483 Author: Gaosheng Cui Date: Tue Nov 29 20:01:26 2022 +0800 pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions() The thunderbay_add_functions() will free memory of thunderbay_funcs when everything is ok, but thunderbay_funcs will not be freed when thunderbay_add_functions() fails, then there will be a memory leak, so we need to add kfree() when thunderbay_add_functions() fails to fix it. In addition, doing some cleaner works, moving kfree(funcs) from thunderbay_add_functions() to thunderbay_build_functions(). Fixes: 12422af8194d ("pinctrl: Add Intel Thunder Bay pinctrl driver") Signed-off-by: Gaosheng Cui Reviewed-by: Rafał Miłecki Link: https://lore.kernel.org/r/20221129120126.1567338-1-cuigaosheng1@huawei.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-thunderbay.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 68e81eba6763cd834aa8ff9ac0cd6174fa69fa39 Author: Christoph Hellwig Date: Wed Nov 16 09:09:48 2022 +0100 nvme-pci: split out a nvme_pci_ctrl_is_dead helper Clean up nvme_dev_disable by splitting the logic to detect if a controller is dead into a separate helper. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg drivers/nvme/host/pci.c | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit 8cb9f10b7151e308824cdcf3168010d673e7888c Author: Christoph Hellwig Date: Tue Nov 22 08:48:13 2022 +0100 nvme-pci: return early on ctrl state mismatch in nvme_reset_work The only way nvme_reset_work could be called when not in resetting state is if a reset and remove happen near the same time. This should not happen, but if it did we don't want the reset work to disable the controller because the remove is already doing that. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg drivers/nvme/host/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7d879c90ae6cf58f4a4caad8562d700b95bc1dbe Author: Christoph Hellwig Date: Wed Nov 16 09:07:48 2022 +0100 nvme-pci: rename nvme_disable_io_queues This function really deletes the I/O queues, so rename it to match the functionality. Also move the main wrapper right next to the actual underlying implementation. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg drivers/nvme/host/pci.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 10981f23a1b865290a5e21ad43a0f93710271cc6 Author: Christoph Hellwig Date: Tue Nov 29 10:51:05 2022 +0100 nvme-pci: cleanup nvme_suspend_queue Remove the unused returne value, pass a dev + qid instead of the queue as that is better for the callers as well as the function itself, and remove the entirely pointless kerneldoc comment. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg drivers/nvme/host/pci.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit c80767f770ed722264688f65c89e420971eb897a Author: Christoph Hellwig Date: Wed Nov 16 09:01:30 2022 +0100 nvme-pci: remove nvme_pci_disable nvme_pci_disable has a single caller, fold it into that. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Eric Curtin Reviewed-by: Sagi Grimberg drivers/nvme/host/pci.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 47d42d229a181e52b32fa9c80aaa36cf8b6b46fc Author: Christoph Hellwig Date: Wed Nov 16 08:59:55 2022 +0100 nvme-pci: remove nvme_disable_admin_queue nvme_disable_admin_queue has only a single caller, and just calls two other funtions, so remove it to clean up the remove path a little more. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Eric Curtin Reviewed-by: Sagi Grimberg drivers/nvme/host/pci.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 285b6e9b571714270fa503d0e32f244d15b9f85f Author: Christoph Hellwig Date: Tue Nov 8 11:20:12 2022 +0100 nvme: merge nvme_shutdown_ctrl into nvme_disable_ctrl Many of the callers decide which one to use based on a bool argument and there is at least some code to be shared, so merge these two. Also move a comment specific to a single callsite to that callsite. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Hector Martin drivers/nvme/host/apple.c | 5 +---- drivers/nvme/host/core.c | 33 ++++++++++----------------------- drivers/nvme/host/fc.c | 2 +- drivers/nvme/host/nvme.h | 3 +-- drivers/nvme/host/pci.c | 15 +++++++++------ drivers/nvme/host/rdma.c | 5 +---- drivers/nvme/host/tcp.c | 5 +---- drivers/nvme/target/loop.c | 2 +- 8 files changed, 25 insertions(+), 45 deletions(-) commit e6d275de2e4aaebdc97aa022c031a0dcc475efa4 Author: Christoph Hellwig Date: Wed Nov 16 08:54:26 2022 +0100 nvme: use nvme_wait_ready in nvme_shutdown_ctrl Refactor the code to wait for CSTS state changes so that it can be reused by nvme_shutdown_ctrl. This reduces the delay between each iteration that checks CSTS from 100ms in the shutdown code to the 1 to 2ms range done during enable, matching the changes from commit 3e98c2443f5c that were only applied to the enable/disable path. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Pankaj Raghav drivers/nvme/host/core.c | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) commit c76b8308e4c9148e44e0c7e086ab6d8b4bb10162 Author: Christoph Hellwig Date: Tue Nov 8 11:14:09 2022 +0100 nvme-apple: fix controller shutdown in apple_nvme_disable nvme_shutdown_ctrl already shuts the controller down, there is no need to also call nvme_disable_ctrl for the shutdown case. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Eric Curtin Reviewed-by: Sagi Grimberg Reviewed-by: Hector Martin drivers/nvme/host/apple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a8e052932a2aaeccb979fddbca6f018ef8b458eb Author: Leon Romanovsky Date: Fri Dec 2 22:10:37 2022 +0200 net/mlx5e: Generalize creation of default IPsec miss group and rule Create general function that sets miss group and rule to forward all not-matched traffic to the next table. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 47 +++++++++++----------- 1 file changed, 23 insertions(+), 24 deletions(-) commit d7ec2b76026bcd72dec47dfeeb79c1a542868204 Author: Leon Romanovsky Date: Fri Dec 2 22:10:36 2022 +0200 net/mlx5e: Group IPsec miss handles into separate struct Move miss handles into dedicated struct, so we can reuse it in next patch when creating IPsec policy flow table. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 27ebe531d2d99886a189ce3d48b9872c3216bb9e Author: Leon Romanovsky Date: Fri Dec 2 22:10:35 2022 +0200 net/mlx5e: Make clear what IPsec rx_err does Reuse existing struct what holds all information about modify header pointer and rule. This helps to reduce ambiguity from the name _err_ that doesn't describe the real purpose of that flow table, rule and function - to copy status result from HW to the stack. Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 38 +++++++++------------- 1 file changed, 16 insertions(+), 22 deletions(-) commit 384298c28aac42fcc93e3ff83fe627c900821804 Author: Leon Romanovsky Date: Fri Dec 2 22:10:34 2022 +0200 net/mlx5e: Flatten the IPsec RX add rule path Rewrote the IPsec RX add rule path to be less convoluted and don't rely on pre-initialized variables. The code now has clean linear flow with clean separation between error and success paths. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 2 +- .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 88 +++++++++++++--------- 2 files changed, 53 insertions(+), 37 deletions(-) commit 35324bbb962e984fe58e783ccad20bcfccc65cba Author: Leon Romanovsky Date: Fri Dec 2 22:10:33 2022 +0200 net/mlx5e: Refactor FTE setup code to be more clear The policy offload logic needs to set flow steering rule that match on saddr and daddr too, so factor out this code to separate functions, together with code alignment to netdev coding pattern of relying on family type. As part of this change, let's separate more logic from setup_fte_common to make sure that the function names describe that is done in the function better than general *common* name. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 139 +++++++++++++-------- 1 file changed, 85 insertions(+), 54 deletions(-) commit 42ba0f9d4b3972bd9ca9c86f89d5ccc8dc5c58b6 Author: Leon Romanovsky Date: Fri Dec 2 22:10:32 2022 +0200 net/mlx5e: Move IPsec flow table creation to separate function Even now, to support IPsec crypto, the RX and TX paths use same logic to create flow tables. In the following patches, we will add more tables to support IPsec packet offload. So reuse existing code and rewrite it to support IPsec packet offload from the beginning. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 45 +++++++++++----------- 1 file changed, 23 insertions(+), 22 deletions(-) commit 8d15f364d5d39956fd6bb848ad7732e077616c9a Author: Leon Romanovsky Date: Fri Dec 2 22:10:31 2022 +0200 net/mlx5e: Create hardware IPsec packet offload objects Create initial hardware IPsec packet offload object and connect it to advanced steering operation (ASO) context and queue, so the data path can communicate with the stack. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 1 + .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 3 +- .../mellanox/mlx5/core/en_accel/ipsec_offload.c | 37 ++++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) commit 8518d05b8f9add527041edd2f12ffc841866b01a Author: Leon Romanovsky Date: Fri Dec 2 22:10:30 2022 +0200 net/mlx5e: Create Advanced Steering Operation object for IPsec Setup the ASO (Advanced Steering Operation) object that is needed for IPsec to interact with SW stack about various fast changing events: replay window, lifetime limits, e.t.c Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 12 +++++ .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 13 ++++++ .../mellanox/mlx5/core/en_accel/ipsec_offload.c | 54 ++++++++++++++++++++++ 4 files changed, 80 insertions(+) commit c7049ca6213732e5d511a4b8d6fdabea4c3b4811 Author: Leon Romanovsky Date: Fri Dec 2 22:10:29 2022 +0200 net/mlx5e: Remove accesses to priv for low level IPsec FS code mlx5 priv structure is driver main structure that holds high level data. That information is not needed for IPsec flow steering logic and the pointer to mlx5e_priv was not supposed to be passed in the first place. This change "cleans" the logic to rely on internal to IPsec structures without touching global mlx5e_priv. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 8 +- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 7 +- .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 100 ++++++++++----------- 3 files changed, 56 insertions(+), 59 deletions(-) commit fb2caa711f690f71cc6cd256faadeff7ab76f900 Author: Leon Romanovsky Date: Fri Dec 2 22:10:28 2022 +0200 net/mlx5e: Use mlx5 print routines for low level IPsec code Low level mlx5 code needs to use mlx5_core print routines and not netdev ones, as the failures are relevant to the HW itself and not to its netdev. This change allows us to remove access to mlx5 priv structure, which holds high level driver data that isn't needed for mlx5 IPsec code. Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) commit 9e5286dcbbbc47b4666df1733590260ac0b475af Author: Leon Romanovsky Date: Fri Dec 2 22:10:27 2022 +0200 net/mlx5e: Create symmetric IPsec RX and TX flow steering structs Remove AF family obfuscation by creating symmetric structs for RX and TX IPsec flow steering chains. This simplifies to us low level IPsec FS creation logic without need to dig into multiple levels of structs. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 7 +- .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 277 ++++++++++----------- 2 files changed, 130 insertions(+), 154 deletions(-) commit e3840530b4c8d0964f8757f2cffbbce5741ad327 Author: Leon Romanovsky Date: Fri Dec 2 22:10:26 2022 +0200 net/mlx5e: Remove extra layers of defines Instead of performing redefinition of XFRM core defines to same values but with MLX5_* prefix, cache the input values as is by making sure that the proper storage objects are used. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 17 ++++------------- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 18 ++++-------------- .../ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c | 21 +++++++++++---------- .../mellanox/mlx5/core/en_accel/ipsec_offload.c | 10 ++++------ 4 files changed, 23 insertions(+), 43 deletions(-) commit cded6d80129babde53627efe32d164842cdd23a0 Author: Leon Romanovsky Date: Fri Dec 2 22:10:25 2022 +0200 net/mlx5e: Store replay window in XFRM attributes As a preparation for future extension of IPsec hardware object to allow configuration of packet offload mode, extend the XFRM validator to check replay window values. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 12 ++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 1 + 2 files changed, 13 insertions(+) commit 59592cfdf8a44fd1f25cf16f4e25edc7f1a4e709 Author: Leon Romanovsky Date: Fri Dec 2 22:10:24 2022 +0200 net/mlx5e: Advertise IPsec packet offload support Add needed capabilities check to determine if device supports IPsec packet offload mode. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 3afee4ed336ed7a6cff78d23339879ffb654e02e Author: Leon Romanovsky Date: Fri Dec 2 22:10:23 2022 +0200 net/mlx5: Add HW definitions for IPsec packet offload Add all needed bits to support IPsec packet offload mode. Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert drivers/net/ethernet/mellanox/mlx5/core/lib/aso.h | 1 + include/linux/mlx5/mlx5_ifc.h | 53 +++++++++++++++++++++-- 2 files changed, 51 insertions(+), 3 deletions(-) commit e77bbde73ed0a2d5342a98fb050287cdbe5db524 Author: Leon Romanovsky Date: Fri Dec 2 22:10:22 2022 +0200 net/mlx5: Return ready to use ASO WQE There is no need in hiding returned ASO WQE type by providing void*, use the real type instead. Do it together with zeroing that memory, so ASO WQE will be ready to use immediately. Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert drivers/net/ethernet/mellanox/mlx5/core/en/tc/meter.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c | 7 +++++-- drivers/net/ethernet/mellanox/mlx5/core/lib/aso.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) commit 89ae65734a995f1c728669fc3b0759a36f1d678e Merge: 65e6af6cebef 2b7c72e0e5f9 Author: Steffen Klassert Date: Tue Dec 6 13:41:23 2022 +0100 Merge branch 'Extend XFRM core to allow packet offload configuration' Leon Romanovsky says: ============ The following series extends XFRM core code to handle a new type of IPsec offload - packet offload. In this mode, the HW is going to be responsible for the whole data path, so both policy and state should be offloaded. IPsec packet offload is an improved version of IPsec crypto mode, In packet mode, HW is responsible to trim/add headers in addition to decrypt/encrypt. In this mode, the packet arrives to the stack as already decrypted and vice versa for TX (exits to HW as not-encrypted). Devices that implement IPsec packet offload mode offload policies too. In the RX path, it causes the situation that HW can't effectively handle mixed SW and HW priorities unless users make sure that HW offloaded policies have higher priorities. It means that we don't need to perform any search of inexact policies and/or priority checks if HW policy was discovered. In such situation, the HW will catch the packets anyway and HW can still implement inexact lookups. In case specific policy is not found, we will continue with packet lookup and check for existence of HW policies in inexact list. HW policies are added to the head of SPD to ensure fast lookup, as XFRM iterates over all policies in the loop. This simple solution allows us to achieve same benefits of separate HW/SW policies databases without over-engineering the code to iterate and manage two databases at the same path. To not over-engineer the code, HW policies are treated as SW ones and don't take into account netdev to allow reuse of the same priorities for policies databases without over-engineering the code to iterate and manage two databases at the same path. To not over-engineer the code, HW policies are treated as SW ones and don't take into account netdev to allow reuse of the same priorities for different devices. * No software fallback * Fragments are dropped, both in RX and TX * No sockets policies * Only IPsec transport mode is implemented ================================================================================ Rekeying: In order to support rekeying, as XFRM core is skipped, the HW/driver should do the following: * Count the handled packets * Raise event that limits are reached * Drop packets once hard limit is occurred. The XFRM core calls to newly introduced xfrm_dev_state_update_curlft() function in order to perform sync between device statistics and internal structures. On HW limit event, driver calls to xfrm_state_check_expire() to allow XFRM core take relevant decisions. This separation between control logic (in XFRM) and data plane allows us to packet reuse SW stack. ================================================================================ Configuration: iproute2: https://lore.kernel.org/netdev/cover.1652179360.git.leonro@nvidia.com/ Packet offload mode: ip xfrm state offload packet dev dir ip xfrm policy .... offload packet dev Crypto offload mode: ip xfrm state offload crypto dev dir or (backward compatibility) ip xfrm state offload dev dir ================================================================================ Performance results: TCP multi-stream, using iperf3 instance per-CPU. +----------------------+--------+--------+--------+--------+---------+---------+ | | 1 CPU | 2 CPUs | 4 CPUs | 8 CPUs | 16 CPUs | 32 CPUs | | +--------+--------+--------+--------+---------+---------+ | | BW (Gbps) | +----------------------+--------+--------+-------+---------+---------+---------+ | Baseline | 27.9 | 59 | 93.1 | 92.8 | 93.7 | 94.4 | +----------------------+--------+--------+-------+---------+---------+---------+ | Software IPsec | 6 | 11.9 | 23.3 | 45.9 | 83.8 | 91.8 | +----------------------+--------+--------+-------+---------+---------+---------+ | IPsec crypto offload | 15 | 29.7 | 58.5 | 89.6 | 90.4 | 90.8 | +----------------------+--------+--------+-------+---------+---------+---------+ | IPsec packet offload | 28 | 57 | 90.7 | 91 | 91.3 | 91.9 | +----------------------+--------+--------+-------+---------+---------+---------+ IPsec packet offload mode behaves as baseline and reaches linerate with same amount of CPUs. Setups details (similar for both sides): * NIC: ConnectX6-DX dual port, 100 Gbps each. Single port used in the tests. * CPU: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz ================================================================================ Series together with mlx5 part: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/log/?h=xfrm-next ================================================================================ Changelog: v10: * Added forgotten xdo_dev_state_del. Patch #4. * Moved changelog in cover letter to the end. * Added "if (xs->xso.type != XFRM_DEV_OFFLOAD_CRYPTO) {" line to newly added netronome IPsec support. Patch #2. v9: https://lore.kernel.org/all/cover.1669547603.git.leonro@nvidia.com * Added acquire support v8: https://lore.kernel.org/all/cover.1668753030.git.leonro@nvidia.com * Removed not-related blank line * Fixed typos in documentation v7: https://lore.kernel.org/all/cover.1667997522.git.leonro@nvidia.com As was discussed in IPsec workshop: * Renamed "full offload" to be "packet offload". * Added check that offloaded SA and policy have same device while sending packet * Added to SAD same optimization as was done for SPD to speed-up lookups. v6: https://lore.kernel.org/all/cover.1666692948.git.leonro@nvidia.com * Fixed misplaced "!" in sixth patch. v5: https://lore.kernel.org/all/cover.1666525321.git.leonro@nvidia.com * Rebased to latest ipsec-next. * Replaced HW priority patch with solution which mimics separated SPDs for SW and HW. See more description in this cover letter. * Dropped RFC tag, usecase, API and implementation are clear. v4: https://lore.kernel.org/all/cover.1662295929.git.leonro@nvidia.com * Changed title from "PATCH" to "PATCH RFC" per-request. * Added two new patches: one to update hard/soft limits and another initial take on documentation. * Added more info about lifetime/rekeying flow to cover letter, see relevant section. * perf traces for crypto mode will come later. v3: https://lore.kernel.org/all/cover.1661260787.git.leonro@nvidia.com * I didn't hear any suggestion what term to use instead of "packet offload", so left it as is. It is used in commit messages and documentation only and easy to rename. * Added performance data and background info to cover letter * Reused xfrm_output_resume() function to support multiple XFRM transformations * Add PMTU check in addition to driver .xdo_dev_offload_ok validation * Documentation is in progress, but not part of this series yet. v2: https://lore.kernel.org/all/cover.1660639789.git.leonro@nvidia.com * Rebased to latest 6.0-rc1 * Add an extra check in TX datapath patch to validate packets before forwarding to HW. * Added policy cleanup logic in case of netdev down event v1: https://lore.kernel.org/all/cover.1652851393.git.leonro@nvidia.com * Moved comment to be before if (...) in third patch. v0: https://lore.kernel.org/all/cover.1652176932.git.leonro@nvidia.com ----------------------------------------------------------------------- ============ Signed-off-by: Steffen Klassert commit 7073888c86601389e17f3ee8ab15ab7aef148839 Author: Xiangsheng Hou Date: Mon Dec 5 14:57:48 2022 +0800 spi: mtk-snfi: Add snfi support for MT7986 IC Add snfi support for MT7986 IC. Signed-off-by: Xiangsheng Hou Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221205065756.26875-2-xiangsheng.hou@mediatek.com Signed-off-by: Mark Brown drivers/spi/spi-mtk-snfi.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 01d0e110f2365151d8e69ca4978128112637642d Merge: c9f8d73645b6 72df3489fb10 Author: Paolo Abeni Date: Tue Dec 6 13:26:45 2022 +0100 Merge branch 'net-lan966x-enable-ptp-on-bridge-interfaces' Horatiu Vultur says: ==================== net: lan966x: Enable PTP on bridge interfaces Before it was not allowed to run ptp on ports that are part of a bridge because in case of transparent clock the HW will still forward the frames so there would be duplicate frames. Now that there is VCAP support, it is possible to add entries in the VCAP to trap frames to the CPU and the CPU will forward these frames. The first part of the patch series, extends the VCAP support to be able to modify and get the rule, while the last patch uses the VCAP to trap the ptp frames. ==================== Link: https://lore.kernel.org/r/20221203104348.1749811-1-horatiu.vultur@microchip.com Signed-off-by: Paolo Abeni commit 72df3489fb10324e30616d278ea9b37a8a801b6f Author: Horatiu Vultur Date: Sat Dec 3 11:43:48 2022 +0100 net: lan966x: Add ptp trap rules Currently lan966x, doesn't allow to run PTP over interfaces that are part of the bridge. The reason is when the lan966x was receiving a PTP frame (regardless if L2/IPv4/IPv6) the HW it would flood this frame. Now that it is possible to add VCAP rules to the HW, such to trap these frames to the CPU, it is possible to run PTP also over interfaces that are part of the bridge. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni .../net/ethernet/microchip/lan966x/lan966x_main.c | 19 +- .../net/ethernet/microchip/lan966x/lan966x_main.h | 14 ++ .../net/ethernet/microchip/lan966x/lan966x_ptp.c | 236 ++++++++++++++++++++- .../ethernet/microchip/lan966x/lan966x_tc_flower.c | 8 - .../ethernet/microchip/lan966x/lan966x_vcap_impl.c | 11 +- 5 files changed, 265 insertions(+), 23 deletions(-) commit 6009b61f80e0b87b06f56a9bf16a32b6f562f822 Author: Horatiu Vultur Date: Sat Dec 3 11:43:47 2022 +0100 net: microchip: vcap: Add vcap_rule_get_key_u32 Add the function vcap_rule_get_key_u32 which allows to get the value and the mask of a key that exist on the rule. If the key doesn't exist, it would return error. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/vcap/vcap_api.c | 16 ++++++++++++++++ drivers/net/ethernet/microchip/vcap/vcap_api_client.h | 4 ++++ 2 files changed, 20 insertions(+) commit 2662b3f93d2617719e68bbb1031491461afa2812 Author: Horatiu Vultur Date: Sat Dec 3 11:43:46 2022 +0100 net: microchip: vcap: Add vcap_mod_rule Add the function vcap_mod_rule which allows to update an existing rule in the vcap. It is required for the rule to exist in the vcap to be able to modify it. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/vcap/vcap_api.c | 36 ++++++++++++++++++++++ .../net/ethernet/microchip/vcap/vcap_api_client.h | 2 ++ 2 files changed, 38 insertions(+) commit 610c32b2ce66d4aaa07b3a77a709bd4d2b268bb1 Author: Horatiu Vultur Date: Sat Dec 3 11:43:45 2022 +0100 net: microchip: vcap: Add vcap_get_rule Add function vcap_get_rule which returns a rule based on the internal rule id. The entire functionality of reading and decoding the rule from the VCAP was inside vcap_api_debugfs file. So move the entire implementation in vcap_api as this is used also by vcap_get_rule. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/vcap/vcap_api.c | 772 +++++++++++++++++++++ .../net/ethernet/microchip/vcap/vcap_api_client.h | 2 + .../net/ethernet/microchip/vcap/vcap_api_debugfs.c | 498 ++----------- .../net/ethernet/microchip/vcap/vcap_api_private.h | 14 + 4 files changed, 848 insertions(+), 438 deletions(-) commit 74eac50391ce42c5d0038d6f0e580576e53aec4e Author: Johan Hovold Date: Mon Dec 5 10:45:30 2022 +0100 dt-bindings: PCI: qcom: Allow 'dma-coherent' property Devices on some PCIe buses 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. Link: https://lore.kernel.org/r/20221205094530.12883-1-johan+linaro@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 5ddcc03a07ae1ab5062f89a946d9495f1fd8eaa4 Author: Aboorva Devarajan Date: Mon Nov 14 20:26:11 2022 +0530 powerpc/cpuidle: Set CPUIDLE_FLAG_POLLING for snooze state During the comparative study of cpuidle governors, it is noticed that the menu governor does not select CEDE state in some scenarios even though when the sleep duration of the CPU exceeds the target residency of the CEDE idle state this is because the CPU exits the snooze "polling" state when snooze time limit is reached in the snooze_loop(), which is not a real wake up and it just means that the polling state selection was not adequate. cpuidle governors rely on CPUIDLE_FLAG_POLLING flag to be set for the polling states to handle the condition mentioned above. Hence, set the CPUIDLE_FLAG_POLLING flag for snooze state (polling state) in powerpc arch to make the cpuidle governor work as expected. Reference Commits: - Timeout enabled for snooze state: commit 78eaa10f027c ("cpuidle: powernv/pseries: Auto-promotion of snooze to deeper idle state") - commit dc2251bf98c6 ("cpuidle: Eliminate the CPUIDLE_DRIVER_STATE_START symbol") - Fix wakeup stats in governor for polling states commit 5f26bdceb9c0 ("cpuidle: menu: Fix wakeup statistics updates for polling state") Signed-off-by: Aboorva Devarajan Tested-by: Vishal Chourasia Reviewed-by: Vaidyanathan Srinivasan Reviewed-by: Vishal Chourasia Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114145611.37669-1-aboorvad@linux.vnet.ibm.com drivers/cpuidle/cpuidle-powernv.c | 5 ++++- drivers/cpuidle/cpuidle-pseries.c | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) commit 3ae7c96dd51025550c8001c6f833337f11d00807 Author: Geert Uytterhoeven Date: Fri Dec 2 17:49:26 2022 +0100 powerpc/dts/fsl: Fix pca954x i2c-mux node names "make dtbs_check": arch/powerpc/boot/dts/fsl/t1040rdb-rev-a.dtb: pca9546@77: $nodename:0: 'pca9546@77' does not match '^(i2c-?)?mux' From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml arch/powerpc/boot/dts/fsl/t1024qds.dtb: pca9547@77: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'i2c@0', 'i2c@2', 'i2c@3' 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 Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6c5d86c49ac170e9d56ab121ea0602f3873849ca.1669999298.git.geert+renesas@glider.be arch/powerpc/boot/dts/fsl/t1024qds.dts | 2 +- arch/powerpc/boot/dts/fsl/t1024rdb.dts | 2 +- arch/powerpc/boot/dts/fsl/t104xqds.dtsi | 2 +- arch/powerpc/boot/dts/fsl/t104xrdb.dtsi | 2 +- arch/powerpc/boot/dts/fsl/t208xqds.dtsi | 2 +- arch/powerpc/boot/dts/fsl/t208xrdb.dtsi | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 6aecc0a59e07ba895b5473e0c916ba5f3d556c15 Author: Bjorn Helgaas Date: Mon Dec 5 16:32:31 2022 -0600 cxl: Remove unnecessary cxl_pci_window_alignment() cxl_pci_window_alignment() is referenced only via the struct pci_controller_ops.window_alignment function pointer, and only in the powerpc implementation of pcibios_window_alignment(). pcibios_window_alignment() defaults to returning 1 if the function pointer is NULL, which is the same was what cxl_pci_window_alignment() does. cxl_pci_window_alignment() is unnecessary, so remove it. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221205223231.1268085-1-helgaas@kernel.org drivers/misc/cxl/vphb.c | 7 ------- 1 file changed, 7 deletions(-) commit e6d22108621c837f81d041ec5d61b08d17b151df Author: Thomas Gleixner Date: Mon Nov 21 15:39:34 2022 +0100 irqchip/ti-sci-inta: Fix kernel doc W=1 build complains: drivers/irqchip/irq-ti-sci-inta.c:177: warning: Function parameter or member 'vint_id' not described in 'ti_sci_inta_xlate_irq' drivers/irqchip/irq-ti-sci-inta.c:177: warning: Excess function parameter 'irq' description in 'ti_sci_inta_xlate_irq' Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221121140048.596303869@linutronix.de drivers/irqchip/irq-ti-sci-inta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d51a15af37ce8cf59e73de51dcdce3c9f4944974 Author: Thomas Gleixner Date: Mon Nov 21 15:39:33 2022 +0100 irqchip/gic-v2m: Mark a few functions __init They are all part of the init sequence. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221121140048.534395323@linutronix.de drivers/irqchip/irq-gic-v2m.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 72a3f8f22a36aaf05da8941535d1c553fe049b2b Author: Thomas Gleixner Date: Mon Nov 21 15:39:32 2022 +0100 irqchip/gic-v2m: Include arm-gic-common.h W=1 build complains: drivers/irqchip/irq-gic-v2m.c:570:12: warning: no previous prototype for ‘gicv2m_init’ [-Wmissing-prototypes] 570 | int __init gicv2m_init(struct fwnode_handle *parent_handle, Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221121140048.470680255@linutronix.de drivers/irqchip/irq-gic-v2m.c | 1 + 1 file changed, 1 insertion(+) commit 55721afa8d8b82e442cb4eaf7173330f79cbfb48 Author: Thomas Gleixner Date: Mon Nov 21 15:39:29 2022 +0100 irqchip/irq-mvebu-icu: Fix works by chance pointer assignment Assigning a void pointer which points to a struct to two different data types only works by chance if the second type is the first member of the struct. Replace this works by chance code by using the primary struct pointer. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221121140048.344525618@linutronix.de drivers/irqchip/irq-mvebu-icu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8fa22f4b88e877c0811d2a0e506cf56755add554 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:38 2022 +0100 pwm: pca9685: 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/r/20221118224540.619276-538-uwe@kleine-koenig.org Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-pca9685.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a08b318a155e77d4c61bbdc28248b347d66f7248 Author: Andre Przywara Date: Fri Dec 2 19:35:37 2022 +0100 pwm: sun4i: Propagate errors in .get_state() to the caller .get_state() can return an error indication now. Make use of it to propagate an impossible prescaler encoding, should that have sneaked in somehow. Also check the return value of clk_get_rate(). That's unlikely to fail, but we use that in two divide operations down in the code, so let's avoid a divide-by-zero condition on the way. Signed-off-by: Andre Przywara Reviewed-by: Uwe Kleine-König Reviewed-by: Samuel Holland Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221201152223.3133-1-andre.przywara@arm.com Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-sun4i.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c73a3107624ddc305483ced13deca9ce8a073783 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:36 2022 +0100 pwm: Handle .get_state() failures This suppresses diagnosis for PWM_DEBUG routines and makes sure that pwm->state isn't modified in pwm_device_request() if .get_state() fails. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221130152148.2769768-12-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/core.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 500f879843adf329281e418d302e1ad40baa26c3 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:35 2022 +0100 pwm: sprd: Propagate errors in .get_state() to the caller .get_state() can return an error indication. Make use of it to propagate failing hardware accesses. Reviewed-by: Baolin Wang Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221130152148.2769768-11-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-sprd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 790a8bae62f701821305dac37a9f6013cde8488f Author: Uwe Kleine-König Date: Fri Dec 2 19:35:34 2022 +0100 pwm: rockchip: Propagate errors in .get_state() to the caller .get_state() can return an error indication. Make use of it to propagate failing hardware accesses. Reviewed-by: Heiko Stuebner Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221130152148.2769768-10-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2f47786ce460206f2ff8ecb7d19352e2307b5511 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:33 2022 +0100 pwm: mtk-disp: Propagate errors in .get_state() to the caller .get_state() can return an error indication. Make use of it to propagate failing hardware accesses. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221130152148.2769768-9-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-mtk-disp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51b9f2fb38bd209bbfa49e1eca2e262667f29e48 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:32 2022 +0100 pwm: imx27: Propagate errors in .get_state() to the caller .get_state() can return an error indication. Make use of it to propagate failing hardware accesses. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221130152148.2769768-8-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-imx27.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee02c1cb87f957ff0c66337d776486e72967987d Author: Uwe Kleine-König Date: Fri Dec 2 19:35:31 2022 +0100 pwm: cros-ec: Propagate errors in .get_state() to the caller .get_state() can return an error indication. Make use of it to propagate failing hardware accesses. Reviewed-by: Tzung-Bi Shih Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221130152148.2769768-7-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-cros-ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c9d5e9957ac443cc544d63688e2442c230430ea Author: Uwe Kleine-König Date: Fri Dec 2 19:35:30 2022 +0100 pwm: crc: Propagate errors in .get_state() to the caller .get_state() can return an error indication. Make use of it to propagate failing hardware accesses. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221130152148.2769768-6-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-crc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fea768cf68c04d68ea2a8091c559667378f3b77c Author: Uwe Kleine-König Date: Fri Dec 2 19:35:29 2022 +0100 leds: qcom-lpg: Propagate errors in .get_state() to the caller .get_state() can return an error indication. Make use of it to propagate failing hardware accesses. Acked-by: Pavel Machek Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221130152148.2769768-5-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/leds/rgb/leds-qcom-lpg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f00de180661d8191aa979c2a8a8f4ec2b35a4cfd Author: Uwe Kleine-König Date: Fri Dec 2 19:35:28 2022 +0100 drm/bridge: ti-sn65dsi86: Propagate errors in .get_state() to the caller .get_state() can return an error indication. Make use of it to propagate failing hardware accesses. Acked-by: Douglas Anderson Reviewed-by: Laurent Pinchart Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221130152148.2769768-4-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/gpu/drm/bridge/ti-sn65dsi86.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3dae106f4ca358bb1d8d8708d3289fa130b1ad5b Author: Uwe Kleine-König Date: Fri Dec 2 19:35:27 2022 +0100 pwm/tracing: Also record trace events for failed API calls Record and report an error code for the events. This allows to report about failed calls without ambiguity and so gives a more complete picture. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221130152148.2769768-3-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/core.c | 18 ++++++++---------- include/trace/events/pwm.h | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) commit 6c452cff79f8bf1c0146fda598d32061cfd25443 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:26 2022 +0100 pwm: Make .get_state() callback return an error code .get_state() might fail in some cases. To make it possible that a driver signals such a failure change the prototype of .get_state() to return an error code. This patch was created using coccinelle and the following semantic patch: @p1@ identifier getstatefunc; identifier driver; @@ struct pwm_ops driver = { ..., .get_state = getstatefunc ,... }; @p2@ identifier p1.getstatefunc; identifier chip, pwm, state; @@ -void +int getstatefunc(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state) { ... - return; + return 0; ... } plus the actual change of the prototype in include/linux/pwm.h (plus some manual fixing of indentions and empty lines). So for now all drivers return success unconditionally. They are adapted in the following patches to make the changes easier reviewable. Reviewed-by: Heiko Stuebner Reviewed-by: Baolin Wang Reviewed-by: Tzung-Bi Shih Reviewed-by: Neil Armstrong Reviewed-by: Nobuhiro Iwamatsu Reviewed-by: Andre Przywara Reviewed-by: Dave Stevenson Acked-by: Douglas Anderson Acked-by: Jernej Skrabec Acked-by: Pavel Machek Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221130152148.2769768-2-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/gpio/gpio-mvebu.c | 9 ++++++--- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 14 ++++++++------ drivers/leds/rgb/leds-qcom-lpg.c | 14 ++++++++------ drivers/pwm/pwm-atmel.c | 6 ++++-- drivers/pwm/pwm-bcm-iproc.c | 8 +++++--- drivers/pwm/pwm-crc.c | 10 ++++++---- drivers/pwm/pwm-cros-ec.c | 8 +++++--- drivers/pwm/pwm-dwc.c | 6 ++++-- drivers/pwm/pwm-hibvt.c | 6 ++++-- drivers/pwm/pwm-imx-tpm.c | 8 +++++--- drivers/pwm/pwm-imx27.c | 8 +++++--- drivers/pwm/pwm-intel-lgm.c | 6 ++++-- drivers/pwm/pwm-iqs620a.c | 6 ++++-- drivers/pwm/pwm-keembay.c | 6 ++++-- drivers/pwm/pwm-lpss.c | 6 ++++-- drivers/pwm/pwm-meson.c | 8 +++++--- drivers/pwm/pwm-mtk-disp.c | 12 +++++++----- drivers/pwm/pwm-pca9685.c | 8 +++++--- drivers/pwm/pwm-raspberrypi-poe.c | 8 +++++--- drivers/pwm/pwm-rockchip.c | 12 +++++++----- drivers/pwm/pwm-sifive.c | 6 ++++-- drivers/pwm/pwm-sl28cpld.c | 8 +++++--- drivers/pwm/pwm-sprd.c | 8 +++++--- drivers/pwm/pwm-stm32-lp.c | 8 +++++--- drivers/pwm/pwm-sun4i.c | 12 +++++++----- drivers/pwm/pwm-sunplus.c | 6 ++++-- drivers/pwm/pwm-visconti.c | 6 ++++-- drivers/pwm/pwm-xilinx.c | 8 +++++--- include/linux/pwm.h | 4 ++-- 29 files changed, 146 insertions(+), 89 deletions(-) commit 958f03074980e8ae1b0c257a732fe467069ec267 Author: Doug Brown Date: Fri Dec 2 19:35:25 2022 +0100 pwm: pxa: Enable for MMP platform The PXA168, which is part of the MMP platform, also uses this driver. Signed-off-by: Doug Brown Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221113233639.24244-7-doug@schmorgal.com Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ba2725ffac351a1b80063ac7eb362832fae16a2 Author: Doug Brown Date: Fri Dec 2 19:35:24 2022 +0100 pwm: pxa: Add reference manual link and limitations Add a pointer to the location of reference manuals for some of the supported chips, and add a limitations section explaining the hardware's PWM disable behavior. Suggested-by: Uwe Kleine-König Signed-off-by: Doug Brown Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221113233639.24244-6-doug@schmorgal.com Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-pxa.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 092c2ef4571cbc7e5f466bc241ff054723c41973 Author: Doug Brown Date: Fri Dec 2 19:35:23 2022 +0100 pwm: pxa: Use abrupt shutdown mode Switch to abrupt shutdown mode in order to stop the clock as soon as possible when PWM is disabled. This minimizes the possibility of the clock being re-enabled while it is still in the process of turning off, which will result in the clock ending up erroneously disabled. Signed-off-by: Doug Brown Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221113233639.24244-5-doug@schmorgal.com Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-pxa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 939d002b7501128640aaeffe175d6331dcce2ca6 Author: Doug Brown Date: Fri Dec 2 19:35:22 2022 +0100 pwm: pxa: Remove clk enable/disable from pxa_pwm_config Now that pxa_pwm_apply always enables the clock first, there is no need for pxa_pwm_config to do any clock enabling/disabling. Signed-off-by: Doug Brown Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221113233639.24244-4-doug@schmorgal.com Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-pxa.c | 9 --------- 1 file changed, 9 deletions(-) commit 152f2d1def5e4b974947877126ff292a68a8c521 Author: Doug Brown Date: Fri Dec 2 19:35:21 2022 +0100 pwm: pxa: Set duty cycle to 0 when disabling PWM When disabling PWM, the duty cycle needs to be set to 0. This prevents the previous duty cycle from showing up momentarily when the clock is re-enabled next time. Because the clock has to be running in order to configure the duty cycle, unconditionally enable it early in pxa_pwm_apply and account for the correct enable count at the end. Suggested-by: Uwe Kleine-König Signed-off-by: Doug Brown Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221113233639.24244-3-doug@schmorgal.com Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-pxa.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit f956b838934ab06deeee2ce9d5c8dfe64e4beb24 Author: Doug Brown Date: Fri Dec 2 19:35:20 2022 +0100 pwm: pxa: Remove pxa_pwm_enable/disable These functions are only acting as wrappers for clk_prepare_enable and clk_disable_unprepare now, so remove them to simplify the driver. Suggested-by: Uwe Kleine-König Signed-off-by: Doug Brown Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221113233639.24244-2-doug@schmorgal.com Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-pxa.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 241eab76657f72d82a5a77ef7d7958c6e07dd2b0 Author: Daniel Golle Date: Fri Dec 2 19:35:19 2022 +0100 pwm: mediatek: Add support for MT7986 Add support for PWM on MT7986 which has 2 PWM channels, one of them is typically used for a temperature controlled fan. Signed-off-by: Daniel Golle Reviewed-by: Sam Shih Link: https://lore.kernel.org/r/Y1K5ym1EL8kwzQEt@makrotopia.org Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-mediatek.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 632ae5d7eb348b3ef88552ec0999260b6f9d6ab1 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:18 2022 +0100 pwm: stm32: Use regmap_clear_bits and regmap_set_bits where applicable Found using coccinelle and the following semantic patch: @@ expression map, reg, bits; @@ - regmap_update_bits(map, reg, bits, bits) + regmap_set_bits(map, reg, bits) @@ expression map, reg, bits; @@ - regmap_update_bits(map, reg, bits, 0) + regmap_clear_bits(map, reg, bits) Tested-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20221115111347.3705732-6-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-stm32.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 85cad49f5ed269ffa0c80081d6506e39fa78456b Author: Uwe Kleine-König Date: Fri Dec 2 19:35:17 2022 +0100 pwm: stm32-lp: Use regmap_clear_bits and regmap_set_bits where applicable Found using coccinelle and the following semantic patch: @@ expression map, reg, bits; @@ - regmap_update_bits(map, reg, bits, bits) + regmap_set_bits(map, reg, bits) @@ expression map, reg, bits; @@ - regmap_update_bits(map, reg, bits, 0) + regmap_clear_bits(map, reg, bits) Tested-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20221115111347.3705732-5-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-stm32-lp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2c85895bf3d202f6932598b124d0db2be4278999 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:16 2022 +0100 pwm: iqs620a: Use regmap_clear_bits and regmap_set_bits where applicable Found using coccinelle and the following semantic patch: @@ expression map, reg, bits; @@ - regmap_update_bits(map, reg, bits, bits) + regmap_set_bits(map, reg, bits) @@ expression map, reg, bits; @@ - regmap_update_bits(map, reg, bits, 0) + regmap_clear_bits(map, reg, bits) Link: https://lore.kernel.org/r/20221115111347.3705732-4-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-iqs620a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 50f2151034b65125b6cce6b385ce8b74556e45f6 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:15 2022 +0100 pwm: img: Use regmap_clear_bits and regmap_set_bits where applicable Found using coccinelle and the following semantic patch: @@ expression map, reg, bits; @@ - regmap_update_bits(map, reg, bits, bits) + regmap_set_bits(map, reg, bits) @@ expression map, reg, bits; @@ - regmap_update_bits(map, reg, bits, 0) + regmap_clear_bits(map, reg, bits) Link: https://lore.kernel.org/r/20221115111347.3705732-3-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-img.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit c637d87a7d96bd04674515b879b500f66361b74c Author: Uwe Kleine-König Date: Fri Dec 2 19:35:14 2022 +0100 pwm: fsl-ftm: Use regmap_clear_bits and regmap_set_bits where applicable Found using coccinelle and the following semantic patch: @@ expression map, reg, bits; @@ - regmap_update_bits(map, reg, bits, bits) + regmap_set_bits(map, reg, bits) @@ expression map, reg, bits; @@ - regmap_update_bits(map, reg, bits, 0) + regmap_clear_bits(map, reg, bits) Link: https://lore.kernel.org/r/20221115111347.3705732-2-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-fsl-ftm.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 55f363e19cb8ca65400eeb11d716519609fbeae6 Author: Andy Shevchenko Date: Fri Dec 2 19:35:13 2022 +0100 pwm: core: Remove S_IFREG from debugfs_create_file() The debugfs_create_file() already has a check and adds S_IFREG automatically. Remove unneeded flag. Signed-off-by: Andy Shevchenko Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221117165812.27757-1-andriy.shevchenko@linux.intel.com Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fa1b9aa4492cc4f29178ef38ca0467c48714250e Author: Uwe Kleine-König Date: Fri Dec 2 19:35:12 2022 +0100 pwm: Don't initialize list head before calling list_add() list_add() just overwrites the members of the element to add (here: chip->list) without any checks, even in the DEBUG_LIST case. So save the effort to initialize the list. Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221117211143.3817381-5-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/core.c | 1 - 1 file changed, 1 deletion(-) commit 4034e5944884dca1673e52cc392b07d0d35b6ff0 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:11 2022 +0100 pwm: Mark free pwm IDs as used in alloc_pwms() alloc_pwms() only identified a free range of IDs and this range was marked as used only later by pwmchip_add(). Instead let alloc_pwms() already do the marking (which makes the function actually allocating the range and so justifies the function name). This way access to the allocated_pwms bitfield is limited to two functions only. Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221117211143.3817381-4-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c8135b5174145a65c72c4303f2752cc8cecf8d08 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:10 2022 +0100 pwm: Reduce time the pwm_lock mutex is held in pwmchip_add() This simplifies error handling as the need for goto error handling goes away and at the end of the function the code can be simplified as this code isn't used in the error case any more. Now memory allocation and the call to of_pwmchip_add() are done without holding the lock. Both don't access the data structures protected by &pwm_lock. Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221117211143.3817381-3-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/core.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit e51b156b18fb6d34a1e409d153040a02adb5c7e0 Author: Uwe Kleine-König Date: Fri Dec 2 19:35:09 2022 +0100 pwm: Document variables protected by pwm_lock To simplify validation of the used locking, document for the global pwm mutex what it actually protects against concurrent access. Also note for two functions modifying these that pwm_lock is held by the caller. Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221117211143.3817381-2-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/core.c | 5 +++++ 1 file changed, 5 insertions(+) commit aa3c668f2f98856af96e13f44da6ca4f26f0b98c Author: Daniel Golle Date: Fri Dec 2 19:35:08 2022 +0100 pwm: mediatek: always use bus clock for PWM on MT7622 According to MT7622 Reference Manual for Development Board v1.0 the PWM unit found in the MT7622 SoC also comes with the PWM_CK_26M_SEL register at offset 0x210 just like other modern MediaTek ARM64 SoCs. And also MT7622 sets that register to 0x00000001 on reset which is described as 'Select 26M fix CLK as BCLK' in the datasheet. Hence set has_ck_26m_sel to true also for MT7622 which results in the driver writing 0 to the PWM_CK_26M_SEL register which is described as 'Select bus CLK as BCLK'. Fixes: 0c0ead76235db0 ("pwm: mediatek: Always use bus clock") Signed-off-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/Y1iF2slvSblf6bYK@makrotopia.org Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-mediatek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07d8d8d29aa76f3c28020a9c914cc890eb86a48c Author: Uwe Kleine-König Date: Fri Dec 2 19:35:07 2022 +0100 pwm: lpc18xx-sct: Fix a comment to match code lpc18xx_pwm_probe() only ensures clk_rate <= NSEC_PER_SEC, the following reasoning is right even under this slightly lesser condition. Fixes: 8933d30c5f46 ("pwm: lpc18xx: Fix period handling") Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20221108153013.132514-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-lpc18xx-sct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b5ef3429d8f78427558ab0dcbfd862098ba2a63 Author: xinlei lee Date: Fri Dec 2 19:35:06 2022 +0100 pwm: mtk-disp: Fix the parameters calculated by the enabled flag of disp_pwm In the original mtk_disp_pwm_get_state() function wrongly uses bit 0 of CON0 to judge if the PWM is enabled. However that is indicated by a bit (at a machine dependent position) in the DISP_PWM_EN register. Fix this accordingly. Fixes: 3f2b16734914 ("pwm: mtk-disp: Implement atomic API .get_state()") Signed-off-by: xinlei lee Reviewed-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/1666172538-11652-1-git-send-email-xinlei.lee@mediatek.com Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-mtk-disp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 45558b3abb87eeb2cedb8a59cb2699c120b5102a Author: Uwe Kleine-König Date: Fri Dec 2 19:35:05 2022 +0100 pwm: sifive: Call pwm_sifive_update_clock() while mutex is held As was documented in commit 0f02f491b786 ("pwm: sifive: Reduce time the controller lock is held") a caller of pwm_sifive_update_clock() must hold the mutex. So fix pwm_sifive_clock_notifier() to grab the lock. While this necessity was only documented later, the race exists since the driver was introduced. Fixes: 9e37a53eb051 ("pwm: sifive: Add a driver for SiFive SoC PWM") Reported-by: Emil Renner Berthing Reviewed-by: Emil Renner Berthing Link: https://lore.kernel.org/r/20221018061656.1428111-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-sifive.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 64ee25282610fcf872a4491ed5eaec440d3a485b Author: ye xingchen Date: Tue Dec 6 15:19:45 2022 +0800 ACPI: fan: Convert to use sysfs_emit_at() API 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: Rafael J. Wysocki drivers/acpi/fan_attr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5f4c374760b031f06c69c2fdad1b0e981a1ad42f Merge: 9d84ad425dc7 223d3a0d30b6 Author: Will Deacon Date: Tue Dec 6 11:34:25 2022 +0000 Merge branch 'for-next/undef-traps' into for-next/core * for-next/undef-traps: arm64: armv8_deprecated: fix unused-function error arm64: armv8_deprecated: rework deprected instruction handling arm64: armv8_deprecated: move aarch32 helper earlier arm64: armv8_deprecated move emulation functions arm64: armv8_deprecated: fold ops into insn_emulation arm64: rework EL0 MRS emulation arm64: factor insn read out of call_undef_hook() arm64: factor out EL1 SSBS emulation hook arm64: split EL0/EL1 UNDEF handlers arm64: allow kprobes on EL0 handlers commit 9d84ad425dc7048196b817b7db4942e0c72d58a1 Merge: 70b1c62a677a 67bc5b2d6d48 Author: Will Deacon Date: Tue Dec 6 11:33:29 2022 +0000 Merge branch 'for-next/trivial' into for-next/core * for-next/trivial: arm64: alternatives: add __init/__initconst to some functions/variables arm64/asm: Remove unused assembler DAIF save/restore macros arm64/kpti: Move DAIF masking to C code Revert "arm64/mm: Drop redundant BUG_ON(!pgtable_alloc)" arm64/mm: Drop unused restore_ttbr1 arm64: alternatives: make apply_alternatives_vdso() static arm64/mm: Drop idmap_pg_end[] declaration arm64/mm: Drop redundant BUG_ON(!pgtable_alloc) arm64: make is_ttbrX_addr() noinstr-safe arm64/signal: Document our convention for choosing magic numbers arm64: atomics: lse: remove stale dependency on JUMP_LABEL arm64: paravirt: remove conduit check in has_pv_steal_clock arm64: entry: Fix typo arm64/booting: Add missing colon to FA64 entry arm64/mm: Drop ARM64_KERNEL_USES_PMD_MAPS arm64/asm: Remove unused enable_da macro commit 70b1c62a677affbc0739b9c3dd3c26c0c89fd911 Merge: 75bc81d08fda acb3f4bc2108 Author: Will Deacon Date: Tue Dec 6 11:32:25 2022 +0000 Merge branch 'for-next/sysregs' into for-next/core * for-next/sysregs: (39 commits) arm64/sysreg: Remove duplicate definitions from asm/sysreg.h arm64/sysreg: Convert ID_DFR1_EL1 to automatic generation arm64/sysreg: Convert ID_DFR0_EL1 to automatic generation arm64/sysreg: Convert ID_AFR0_EL1 to automatic generation arm64/sysreg: Convert ID_MMFR5_EL1 to automatic generation arm64/sysreg: Convert MVFR2_EL1 to automatic generation arm64/sysreg: Convert MVFR1_EL1 to automatic generation arm64/sysreg: Convert MVFR0_EL1 to automatic generation arm64/sysreg: Convert ID_PFR2_EL1 to automatic generation arm64/sysreg: Convert ID_PFR1_EL1 to automatic generation arm64/sysreg: Convert ID_PFR0_EL1 to automatic generation arm64/sysreg: Convert ID_ISAR6_EL1 to automatic generation arm64/sysreg: Convert ID_ISAR5_EL1 to automatic generation arm64/sysreg: Convert ID_ISAR4_EL1 to automatic generation arm64/sysreg: Convert ID_ISAR3_EL1 to automatic generation arm64/sysreg: Convert ID_ISAR2_EL1 to automatic generation arm64/sysreg: Convert ID_ISAR1_EL1 to automatic generation arm64/sysreg: Convert ID_ISAR0_EL1 to automatic generation arm64/sysreg: Convert ID_MMFR4_EL1 to automatic generation arm64/sysreg: Convert ID_MMFR3_EL1 to automatic generation ... commit 75bc81d08fda1b90dcc09dd068d144398ddd9a2d Merge: 595a121e8901 1192b93ba352 Author: Will Deacon Date: Tue Dec 6 11:27:28 2022 +0000 Merge branch 'for-next/sve-state' into for-next/core * for-next/sve-state: arm64/fp: Use a struct to pass data to fpsimd_bind_state_to_cpu() arm64/sve: Leave SVE enabled on syscall if we don't context switch arm64/fpsimd: SME no longer requires SVE register state arm64/fpsimd: Load FP state based on recorded data type arm64/fpsimd: Stop using TIF_SVE to manage register saving in KVM arm64/fpsimd: Have KVM explicitly say which FP registers to save arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE KVM: arm64: Discard any SVE state when entering KVM guests commit 595a121e8901c4f1c0a876cbd6322a0f418791e1 Merge: 32b482484276 4585a934203d Author: Will Deacon Date: Tue Dec 6 11:26:40 2022 +0000 Merge branch 'for-next/stacks' into for-next/core * for-next/stacks: arm64: move on_thread_stack() to arm64: remove current_top_of_stack() commit 32b4824842762882352bf76da7624d97fc51f331 Merge: 10162e78eacc c4e8720f2eb0 Author: Will Deacon Date: Tue Dec 6 11:25:43 2022 +0000 Merge branch 'for-next/selftests' into for-next/core * for-next/selftests: kselftest/arm64: Allow epoll_wait() to return more than one result kselftest/arm64: Don't drain output while spawning children kselftest/arm64: Hold fp-stress children until they're all spawned kselftest/arm64: Set test names prior to starting children kselftest/arm64: Use preferred form for predicate load/stores kselftest/arm64: fix array_size.cocci warning kselftest/arm64: fix array_size.cocci warning kselftest/arm64: Print ASCII version of unknown signal frame magic values kselftest/arm64: Remove validation of extra_context from TODO kselftest/arm64: Provide progress messages when signalling children kselftest/arm64: Check that all children are producing output in fp-stress commit 04ac14ad3a1a36970f0935146185157704c9695c Author: Conghui Wang Date: Sat Dec 3 13:59:12 2022 +0800 cpufreq: Remove CVS version control contents from documentation Since Linux moved to git, CVS is not relevant any more. Signed-off-by: Conghui Wang [ rjw: Subject and changelog edits, dropped trailing spaces ] Signed-off-by: Rafael J. Wysocki Documentation/cpu-freq/index.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 10162e78eacc939efe8edc868aed2307cd50b675 Merge: c947948f7aa4 4361251cef46 Author: Will Deacon Date: Tue Dec 6 11:22:48 2022 +0000 Merge branch 'for-next/perf' into for-next/core * for-next/perf: (21 commits) arm_pmu: Drop redundant armpmu->map_event() in armpmu_event_init() drivers/perf: hisi: Add TLP filter support Documentation: perf: Indent filter options list of hisi-pcie-pmu docs: perf: Fix PMU instance name of hisi-pcie-pmu drivers/perf: hisi: Fix some event id for hisi-pcie-pmu arm64/perf: Replace PMU version number '0' with ID_AA64DFR0_EL1_PMUVer_NI perf/amlogic: Remove unused header inclusions of perf/amlogic: Fix build error for x86_64 allmodconfig dt-binding: perf: Add Amlogic DDR PMU docs/perf: Add documentation for the Amlogic G12 DDR PMU perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver MAINTAINERS: Update HiSilicon PMU maintainers perf: arm_cspmu: Fix module cyclic dependency perf: arm_cspmu: Fix build failure on x86_64 perf: arm_cspmu: Fix modular builds due to missing MODULE_LICENSE()s perf: arm_cspmu: Add support for NVIDIA SCF and MCF attribute perf: arm_cspmu: Add support for ARM CoreSight PMU driver perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init() perf/arm_dmc620: Fix hotplug callback leak in dmc620_pmu_init() drivers: perf: marvell_cn10k: Fix hotplug callback leak in tad_pmu_init() ... commit c947948f7aa4fc8ffca598866f1955fad2860b72 Merge: 37f5d61a96a1 453dfcee70c5 Author: Will Deacon Date: Tue Dec 6 11:21:21 2022 +0000 Merge branch 'for-next/mm' into for-next/core * for-next/mm: arm64: booting: Require placement within 48-bit addressable memory arm64: mm: kfence: only handle translation faults arm64/mm: Simplify and document pte_to_phys() for 52 bit addresses commit 37f5d61a96a16431549f7c0641086b4a9bb52601 Merge: 926939c734fd 3b84efc066f8 Author: Will Deacon Date: Tue Dec 6 11:20:21 2022 +0000 Merge branch 'for-next/kprobes' into for-next/core * for-next/kprobes: arm64: kprobes: Return DBG_HOOK_ERROR if kprobes can not handle a BRK arm64: kprobes: Let arch do_page_fault() fix up page fault in user handler arm64: Prohibit instrumentation on arch_stack_walk() commit 7ed40bcf8a618436d43b17d565ca35af61bc8e54 Author: ye xingchen Date: Tue Dec 6 16:15:22 2022 +0800 cpufreq: stats: Convert to use sysfs_emit_at() API 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 Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_stats.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 926939c734fdac89cae27c9c93a28c30cde59fff Merge: d864e90585f2 a9ae89df7377 Author: Will Deacon Date: Tue Dec 6 11:16:20 2022 +0000 Merge branch 'for-next/kdump' into for-next/core * for-next/kdump: arm64: kdump: Support crashkernel=X fall back to reserve region above DMA zones arm64: kdump: Provide default size when crashkernel=Y,low is not specified commit d864e90585f21e4e66bcf570bd743ca61dc6b7d1 Merge: 586e1ad9af19 994b7ac1697b Author: Will Deacon Date: Tue Dec 6 11:15:50 2022 +0000 Merge branch 'for-next/kbuild' into for-next/core * for-next/kbuild: arm64: remove special treatment for the link order of head.o commit 586e1ad9af19fdaf588f16f5cbd2b52cff741feb Merge: a4aebff7ef60 60f07e22a73d Author: Will Deacon Date: Tue Dec 6 11:14:25 2022 +0000 Merge branch 'for-next/insn' into for-next/core * for-next/insn: arm64:uprobe fix the uprobe SWBP_INSN in big-endian arm64: insn: always inline hint generation arm64: insn: simplify insn group identification arm64: insn: always inline predicates arm64: insn: remove aarch64_insn_gen_prefetch() commit 442046328f27e30ce2c830759af89f42e7169bc1 Author: Stuart Hayes Date: Mon Dec 5 11:57:44 2022 -0600 cpufreq: ACPI: Only set boost MSRs on supported CPUs Stop trying to set boost MSRs on CPUs that don't support boost. This corrects a bug in the recent patch "Defer setting boost MSRs". Fixes: 13fdbc8b8da6 ("cpufreq: ACPI: Defer setting boost MSRs") Signed-off-by: Stuart Hayes Reported-by: Borislav Petkov (AMD) Tested-by: Borislav Petkov (AMD) Signed-off-by: Rafael J. Wysocki drivers/cpufreq/acpi-cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a4aebff7ef608880149851e0679e3ab455c0d42f Merge: 1a916ed79bc0 cfce092dae95 Author: Will Deacon Date: Tue Dec 6 11:07:39 2022 +0000 Merge branch 'for-next/ftrace' into for-next/core * for-next/ftrace: ftrace: arm64: remove static ftrace ftrace: arm64: move from REGS to ARGS ftrace: abstract DYNAMIC_FTRACE_WITH_ARGS accesses ftrace: rename ftrace_instruction_pointer_set() -> ftrace_regs_set_instruction_pointer() ftrace: pass fregs to arch_ftrace_set_direct_caller() commit edeba49e39193025cbf1a06ce7a74f136e83664f Merge: df51f287b5de 8ff150aa6fe2 Author: Rafael J. Wysocki Date: Tue Dec 6 12:07:30 2022 +0100 Merge tag 'cpufreq-arm-updates-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull cpufreq ARM updates for 6.2 from Viresh Kumar: "- Generalize of_perf_domain_get_sharing_cpumask phandle format (Hector Martin). - New cpufreq driver for Apple SoC CPU P-states (Hector Martin). - Lots of Qualcomm cpufreq driver updates, that include CPU clock provider support, generic cleanups or reorganization, fixed a potential memleak and the return value of cpufreq_driver->get() (Manivannan Sadhasivam, and Chen Hui). - Few updates to Qualcomm cpufreq driver's DT bindings, that include support for CPU clock provider, fixing missing cache related properties, and support for QDU1000/QRU1000 (Manivannan Sadhasivam, Rob Herring, and Melody Olvera). - Add support for ti,am625 SoC and enable build of ti-cpufreq for ARCH_K3 (Dave Gerlach, and Vibhore Vardhan). - tegra186: Use flexible array to simplify memory allocation (Christophe JAILLET)." * tag 'cpufreq-arm-updates-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: dt-bindings: cpufreq: cpufreq-qcom-hw: Add QDU1000/QRU1000 cpufreq cpufreq: tegra186: Use flexible array to simplify memory allocation cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states cpufreq: qcom-hw: Add CPU clock provider support dt-bindings: cpufreq: cpufreq-qcom-hw: Add cpufreq clock provider cpufreq: qcom-hw: Fix the frequency returned by cpufreq_driver->get() cpufreq: qcom-hw: Fix memory leak in qcom_cpufreq_hw_read_lut() arm64: dts: ti: k3-am625-sk: Add 1.4GHz OPP cpufreq: ti: Enable ti-cpufreq for ARCH_K3 arm64: dts: ti: k3-am625: Introduce operating-points table cpufreq: dt-platdev: Blacklist ti,am625 SoC cpufreq: ti-cpufreq: Add support for AM625 dt-bindings: cpufreq: qcom: Add missing cache related properties cpufreq: qcom-hw: Move soc_data to struct qcom_cpufreq cpufreq: qcom-hw: Use cached dev pointer in probe() cpufreq: qcom-hw: Allocate qcom_cpufreq_data during probe cpufreq: qcom-hw: Remove un-necessary cpumask_empty() check cpufreq: Generalize of_perf_domain_get_sharing_cpumask phandle format commit 1a916ed79bc0e94c98001e36403b5c014a222fb4 Merge: 5def4a97913a aaeca9845643 Author: Will Deacon Date: Tue Dec 6 11:06:47 2022 +0000 Merge branch 'for-next/fpsimd' into for-next/core * for-next/fpsimd: arm64/fpsimd: Make kernel_neon_ API _GPL commit 5def4a97913a8706a833a524a8808f1b296ca40c Merge: f455fb65b4fc c8e320b00a2a Author: Will Deacon Date: Tue Dec 6 11:06:04 2022 +0000 Merge branch 'for-next/ffa' into for-next/core * for-next/ffa: firmware: arm_ffa: Move comment before the field it is documenting firmware: arm_ffa: Move constants to header file commit f455fb65b4fcfcae29b4e8c44a46b23e3c8e893a Merge: f6ffa4c8c177 44ecda71fd8a Author: Will Deacon Date: Tue Dec 6 11:04:47 2022 +0000 Merge branch 'for-next/errata' into for-next/core * for-next/errata: arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption arm64: Add Cortex-715 CPU part definition commit 96d4b8e1ad8a34711ef416dd61e6b60df9e12d30 Author: Rafael J. Wysocki Date: Thu Dec 1 19:34:44 2022 +0100 PM: sleep: Refine error message in try_to_freeze_tasks() A previous change amended try_to_freeze_tasks() with the "what" variable pointing to a string describing the group of tasks subject to the freezing which may be used in the error message in there too, so make that happen. Accordingly, update sleepgraph.py to catch the modified error message as appropriate. Signed-off-by: Rafael J. Wysocki Reviewed-by: Petr Mladek kernel/power/process.c | 4 ++-- tools/power/pm-graph/sleepgraph.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 19098934f910b4d47cb30251dd39ffa57bef9523 Author: John Thomson Date: Tue Dec 6 06:46:45 2022 +1000 PCI: mt7621: Add sentinel to quirks table Current driver is missing a sentinel in the struct soc_device_attribute array, which causes an oops when assessed by the soc_device_match(mt7621_pcie_quirks_match) call. This was only exposed once the CONFIG_SOC_MT7621 mt7621 soc_dev_attr was fixed to register the SOC as a device, in: commit 7c18b64bba3b ("mips: ralink: mt7621: do not use kzalloc too early") Fix it by adding the required sentinel. Link: https://lore.kernel.org/lkml/26ebbed1-0fe9-4af9-8466-65f841d0b382@app.fastmail.com Link: https://lore.kernel.org/r/20221205204645.301301-1-git@johnthomson.fastmail.com.au Fixes: b483b4e4d3f6 ("staging: mt7621-pci: add quirks for 'E2' revision using 'soc_device_attribute'") Signed-off-by: John Thomson Signed-off-by: Lorenzo Pieralisi Acked-by: Sergio Paracuellos drivers/pci/controller/pcie-mt7621.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a449dfbfc0894676ad0aa1873383265047529e3a Author: Rafael J. Wysocki Date: Thu Dec 1 19:33:09 2022 +0100 PM: sleep: Avoid using pr_cont() in the tasks freezing code Using pr_cont() in the tasks freezing code related to system-wide suspend and hibernation is problematic, because the continuation messages printed there are susceptible to interspersing with other unrelated messages which results in output that is hard to understand. Address this issue by modifying try_to_freeze_tasks() to print messages that don't require continuations and adjusting its callers accordingly. Reported-by: Thomas Weißschuh Signed-off-by: Rafael J. Wysocki Reviewed-by: Petr Mladek kernel/power/process.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit f6ffa4c8c177c0b52d1c849289b08178f6da0eea Merge: 9f930478c648 3b619e22c460 Author: Will Deacon Date: Tue Dec 6 11:01:49 2022 +0000 Merge branch 'for-next/dynamic-scs' into for-next/core * for-next/dynamic-scs: arm64: implement dynamic shadow call stack for Clang scs: add support for dynamic shadow call stacks arm64: unwind: add asynchronous unwind tables to kernel and modules commit 0a584655ef89541dae4d48d2c523b1480ae80284 Author: Francisco Munoz Date: Mon Dec 5 17:16:37 2022 -0700 PCI: vmd: Fix secondary bus reset for Intel bridges The reset was never applied in the current implementation because Intel Bridges owned by VMD are parentless. Internally, pci_reset_bus() applies a reset to the parent of the PCI device supplied as argument, but in this case it failed because there wasn't a parent. In more detail, this change allows the VMD driver to enumerate NVMe devices in pass-through configurations when guest reboots are performed. There was an attempted to fix this, but later we discovered that the code inside pci_reset_bus() wasn’t triggering secondary bus resets. Therefore, we updated the parameters passed to it, and now NVMe SSDs attached to VMD bridges are properly enumerated in VT-d pass-through scenarios. Link: https://lore.kernel.org/r/20221206001637.4744-1-francisco.munoz.ruiz@linux.intel.com Fixes: 6aab5622296b ("PCI: vmd: Clean up domain before enumeration") Signed-off-by: Francisco Munoz Signed-off-by: Lorenzo Pieralisi Reviewed-by: Nirmal Patel Reviewed-by: Jonathan Derrick drivers/pci/controller/vmd.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 9f930478c648d25e3a4c3db3d69a65cf05ff939a Merge: d49d7c2e04dc c5195b027d29 Author: Will Deacon Date: Tue Dec 6 10:44:07 2022 +0000 Merge branch 'for-next/cpufeature' into for-next/core * for-next/cpufeature: kselftest/arm64: Add SVE 2.1 to hwcap test arm64/hwcap: Add support for SVE 2.1 kselftest/arm64: Add FEAT_RPRFM to the hwcap test arm64/hwcap: Add support for FEAT_RPRFM kselftest/arm64: Add FEAT_CSSC to the hwcap selftest arm64/hwcap: Add support for FEAT_CSSC arm64: Enable data independent timing (DIT) in the kernel commit d49d7c2e04dc10cd364527ce2174e80875801526 Merge: c46ae1fc9108 b9024f87d63f Author: Will Deacon Date: Tue Dec 6 10:42:33 2022 +0000 Merge branch 'for-next/asm-const' into for-next/core * for-next/asm-const: arm64: alternative: constify alternative_has_feature_* argument arm64: jump_label: mark arguments as const to satisfy asm constraints commit c46ae1fc91087c105127218b44622d5d89cc4bb4 Merge: f0c4d9fc9cc9 39522031798d Author: Will Deacon Date: Tue Dec 6 10:36:52 2022 +0000 Merge branch 'for-next/acpi' into for-next/core * for-next/acpi: ACPI: APMT: Fix kerneldoc and indentation ACPI: Enable FPDT on arm64 arm_pmu: acpi: handle allocation failure arm_pmu: rework ACPI probing arm_pmu: factor out PMU matching arm_pmu: acpi: factor out PMU<->CPU association ACPI/IORT: Update SMMUv3 DeviceID support ACPI: ARM Performance Monitoring Unit Table (APMT) initial support commit 8ec2d95f50c06f5cf2a2b94bcdf47f494f91ad55 Merge: cf2ea3c86ad9 9472382db384 Author: Takashi Iwai Date: Tue Dec 6 11:13:26 2022 +0100 Merge tag 'asoc-v6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.2 This is a fairly sedate release for the core code, but there's been a lot of driver work especially around the x86 platforms and device tree updates: - More cleanups of the DAPM code from Morimoto-san. - Factoring out of mapping hw_params onto SoundWire configuration by Charles Keepax. - The ever ongoing overhauls of the Intel DSP code continue, including support for loading libraries and probes with IPC4 on SOF. - Support for more sample formats on JZ4740. - Lots of device tree conversions and fixups. - Support for Allwinner D1, a range of AMD and Intel systems, Mediatek systems with multiple DMICs, Nuvoton NAU8318, NXP fsl_rpmsg and i.MX93, Qualcomm AudioReach Enable, MFC and SAL, RealTek RT1318 and Rockchip RK3588 There's more cross tree updates than usual, though all fairly minor: - Some OMAP board file updates that were depedencies for removing their providers in ASoC, as part of a wider effort removing the support for the relevant OMAP platforms. - A new I2C API required for updates to the new I2C probe API. - A DRM update making use of a new API for fixing the capabilities advertised via hdmi-codec. Since this is being sent early I might send some more stuff if you've not yet sent your pull request and there's more come in. commit cf2ea3c86ad90d63d1c572b43e1ca9276b0357ad Author: Gaosheng Cui Date: Tue Dec 6 14:10:04 2022 +0800 ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt I got a null-ptr-defer error report when I do the following tests on the qemu platform: make defconfig and CONFIG_PARPORT=m, CONFIG_PARPORT_PC=m, CONFIG_SND_MTS64=m Then making test scripts: cat>test_mod1.sh< snd_mts64_interrupt+0x24/0xa0 [snd_mts64] parport_irq_handler+0x37/0x50 [parport] __handle_irq_event_percpu+0x39/0x190 handle_irq_event_percpu+0xa/0x30 handle_irq_event+0x2f/0x50 handle_edge_irq+0x99/0x1b0 __common_interrupt+0x5d/0x100 common_interrupt+0xa0/0xc0 asm_common_interrupt+0x22/0x40 RIP: 0010:_raw_write_unlock_irqrestore+0x11/0x30 parport_claim+0xbd/0x230 [parport] snd_mts64_probe+0x14a/0x465 [snd_mts64] platform_probe+0x3f/0xa0 really_probe+0x129/0x2c0 __driver_probe_device+0x6d/0xc0 driver_probe_device+0x1a/0xa0 __device_attach_driver+0x7a/0xb0 bus_for_each_drv+0x62/0xb0 __device_attach+0xe4/0x180 bus_probe_device+0x82/0xa0 device_add+0x550/0x920 platform_device_add+0x106/0x220 snd_mts64_attach+0x2e/0x80 [snd_mts64] port_check+0x14/0x20 [parport] bus_for_each_dev+0x6e/0xc0 __parport_register_driver+0x7c/0xb0 [parport] snd_mts64_module_init+0x31/0x1000 [snd_mts64] do_one_initcall+0x3c/0x1f0 do_init_module+0x46/0x1c6 load_module+0x1d8d/0x1e10 __do_sys_finit_module+0xa2/0xf0 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Kernel panic - not syncing: Fatal exception in interrupt Rebooting in 1 seconds.. The mts wa not initialized during interrupt, we add check for mts to fix this bug. Fixes: 68ab801e32bb ("[ALSA] Add snd-mts64 driver for ESI Miditerminal 4140") Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20221206061004.1222966-1-cuigaosheng1@huawei.com Signed-off-by: Takashi Iwai sound/drivers/mts64.c | 3 +++ 1 file changed, 3 insertions(+) commit b2969585572e5ddaa239d53ee68e2824df7a7736 Author: Chaitanya Kulkarni Date: Wed Nov 30 13:33:41 2022 -0800 nvme-fc: move common code into helper Add a helper to move the duplicate code for error message from nvme_fc_rcv_ls_req() to nvme_fc_rcv_ls_req_err_msg(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 6c90294d72a99e3ed51516124ba0984e28937d2d Author: Chaitanya Kulkarni Date: Wed Nov 30 13:33:40 2022 -0800 nvme-fc: avoid null pointer dereference Before using dynamically allcoated variable lsop in the nvme_fc_rcv_ls_req(), add a check for NULL and error out early. Signed-off-by: Chaitanya Kulkarni Reviewed-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit ea43fceea4171f29457f8d46543ec320b777c1c7 Author: Joel Granados Date: Mon Dec 5 15:27:46 2022 +0100 nvme: allow unprivileged passthrough of Identify Controller Add unprivileged passthrough of the I/O Command Set Independent and I/O Command Set Specific Identify Controller sub-command. This will allow access to attributes (e.g. MDTS and WZSL) that are needed to effectively form passthrough I/O to the /dev/ng* character devices. Signed-off-by: Joel Granados Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/ioctl.c | 2 ++ 1 file changed, 2 insertions(+) commit d4d957b53d91eebc8c681c480edfdc697e55231e Author: Sagi Grimberg Date: Tue Nov 29 15:43:19 2022 +0100 nvme-multipath: support io stats on the mpath device Our mpath stack device is just a shim that selects a bottom namespace and submits the bio to it without any fancy splitting. This also means that we don't clone the bio or have any context to the bio beyond submission. However it really sucks that we don't see the mpath device io stats. Given that the mpath device can't do that without adding some context to it, we let the bottom device do it on its behalf (somewhat similar to the approach taken in nvme_trace_bio_complete). When the IO starts, we account the request for multipath IO stats using REQ_NVME_MPATH_IO_STATS nvme_request flag to avoid queue io stats disable in the middle of the request. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch drivers/nvme/host/core.c | 2 ++ drivers/nvme/host/multipath.c | 26 ++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 14 ++++++++++++++ 3 files changed, 42 insertions(+) commit 6887fc6495f2dfd55e088c982e983815278ee453 Author: Sagi Grimberg Date: Mon Oct 3 12:43:43 2022 +0300 nvme: introduce nvme_start_request In preparation for nvme-multipath IO stats accounting, we want the accounting to happen in a centralized place. The request completion is already centralized, but we need a common helper to request I/O start. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Hannes Reinecke drivers/nvme/host/apple.c | 2 +- drivers/nvme/host/fc.c | 2 +- drivers/nvme/host/nvme.h | 5 +++++ drivers/nvme/host/pci.c | 2 +- drivers/nvme/host/rdma.c | 2 +- drivers/nvme/host/tcp.c | 2 +- drivers/nvme/target/loop.c | 2 +- 7 files changed, 11 insertions(+), 6 deletions(-) commit 99722c8aa8b994db15ef60965c33f6a8e399b36c Author: Christophe JAILLET Date: Thu Nov 24 22:28:12 2022 +0100 nvme: 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 Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 3 ++- drivers/nvme/target/configfs.c | 17 +++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) commit ba0718a6d67130fd4bff664b86d2aa63fa49e241 Author: Christoph Hellwig Date: Wed Nov 16 08:14:46 2022 +0100 nvme: don't call blk_mq_{,un}quiesce_tagset when ctrl->tagset is NULL The NVMe drivers support a mode where no tagset is allocated for the I/O queues and only the admin queue is usable. In that case ctrl->tagset is NULL and we must not call the block per-tagset quiesce helpers that dereference it. Fixes: 98d81f0df70c ("nvme: use blk_mq_[un]quiesce_tagset") Reported-by: Gerd Bayer Reported-by: Chao Leng Signed-off-by: Christoph Hellwig Reviewed-by: Chao Leng drivers/nvme/host/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit b2ea130c2541a8439fd9a288f319cb257ee8e9a0 Author: Dave Stevenson Date: Mon Nov 28 16:22:49 2022 +0000 media: i2c: ov9282: Add missing clk_disable_unprepare to error path If ov9282_power_on failed the I2C write, it returned without releasing clocks or regulators. Fix this. Fixes: 6f7def3d8a65 ("media: i2c: ov9282: Add selection for CSI2 clock mode") Signed-off-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 483c84bf50e7ec0fc2887f35b76c8cc57ba81574 Author: Dave Stevenson Date: Mon Nov 28 16:22:48 2022 +0000 media: i2c: ov9282: Make common_regs_list static common_regs_list is only used within this file, so should be static. Make it so. Fixes: 7195aabf8f8b ("media: i2c: ov9282: Split registers into common and mode specific") Signed-off-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9c77fea1270d34dda13aeaa4488bab710097bb7 Author: Dave Stevenson Date: Mon Nov 28 16:22:47 2022 +0000 media: i2c: ov9282: Fix missing documentation in structures Fix missing documentation entries for members of structures, as flagged by smatch. Signed-off-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 4 ++++ 1 file changed, 4 insertions(+) commit e70fefdc2e07edd2c9deade6f27f8686b63ae31e Author: Dave Stevenson Date: Mon Dec 5 15:21:49 2022 +0000 media: i2c: ov08d10: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips The driver changes the Bayer order based on the flips, but does not define the control correctly with the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Add the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Signed-off-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov08d10.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1dc33888d15b788767a3ba6dc2860fd837692edd Author: Dave Stevenson Date: Mon Dec 5 15:21:48 2022 +0000 media: i2c: imx355: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips The driver changes the Bayer order based on the flips, but does not define the control correctly with the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Add the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Signed-off-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/imx355.c | 4 ++++ 1 file changed, 4 insertions(+) commit bdf240188be7a37cf323a2968d2c58c3dc5808bc Author: Dave Stevenson Date: Mon Dec 5 15:21:47 2022 +0000 media: i2c: imx319: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips The driver changes the Bayer order based on the flips, but does not define the control correctly with the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Add the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Signed-off-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/imx319.c | 4 ++++ 1 file changed, 4 insertions(+) commit f19ba70fc982563554d31fca2e7ca406657ee9b2 Author: Dave Stevenson Date: Mon Dec 5 15:21:46 2022 +0000 media: i2c: imx208: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips The driver changes the Bayer order based on the flips, but does not define the control correctly with the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Add the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Signed-off-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/imx208.c | 4 ++++ 1 file changed, 4 insertions(+) commit 66274280b2c745d380508dc27b9a4dfd736e5eda Author: Dave Stevenson Date: Mon Dec 5 15:21:45 2022 +0000 media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips The driver changes the Bayer order based on the flips, but does not define the control correctly with the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Add the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Signed-off-by: Dave Stevenson Acked-by: Rui Miguel Silva Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2680.c | 2 ++ 1 file changed, 2 insertions(+) commit f33b56d370090e9ce58761a536b174d4f656092f Author: Guoniu.zhou Date: Fri Dec 2 13:00:00 2022 +0000 media: ov5640: report correct frame rate to user In commit 3145efcdb4d0 ("media: ov5640: Rework timings programming"), it defines max_fps field in ov5640_mode_info structure to store maximum frame rate supported by each mode. But in ov5640_try_frame_interval(), it assumes the maximum frame rate supported by all modes is 60. But actually, only VGA support it. For others, the maximum frame rate supported is 30. So correct it by taking the maximum frame rate supported by each mode as the initialization value of the local variable maxfps. Signed-off-by: Guoniu.zhou Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 1b584f20d964ff612beb7e8e61cd9e2b8026d565 Author: Alexander Stein Date: Thu Nov 24 10:29:59 2022 +0000 media: i2c: ov9282: Add ov9281 compatible According to product brief they are identical from software point of view. Differences are a different chief ray angle (CRA) and the package. To distinguish ov9281 & ov9282 in userspace the name has to be explicitly set. Provide a fixed string using platform data. Signed-off-by: Alexander Stein Acked-by: Daniele Alessandrelli Reviewed-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7945cb531efcbede49bcb6a391e018be09d9ca6b Author: Alexander Stein Date: Thu Nov 24 10:29:58 2022 +0000 media: dt-bindings: media: Add compatible for ov9281 This is a slightly different hardware with identical software interface. Signed-off-by: Alexander Stein Acked-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d7b41196927ba2a2b5badad1a85f9087eb90b076 Author: Guoniu.zhou Date: Fri Nov 25 09:20:24 2022 +0000 media: ov5640: set correct default link frequency current_link_freq field in ov5640_dev structure is link frequency, not link frequency array index, so correct it. Fixes: 3c28588f35d3 ("media: ov5640: Update pixel_rate and link_freq") Signed-off-by: Guoniu.zhou Acked-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 94ae11885fae1717f2017cb96ceef5d0f6d6dd4a Author: Dan Carpenter Date: Tue Nov 29 09:44:57 2022 +0000 media: rzg2l-cru: fix a test for timeout The test for if the loop timed out is wrong and Smatch complains: drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:411 rzg2l_csi2_mipi_link_disable() warn: should this be 'timeout == -1' Let's change it to a preop loop instead of a post op loop. Fixes: 51e8415e39a9 ("media: platform: Add Renesas RZ/G2L MIPI CSI-2 receiver driver") Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e54334cdf86960cc781a6d457fbad1277ca4267c Author: Jiapeng Chong Date: Wed Nov 30 07:20:14 2022 +0000 media: rzg2l-cru: Fix missing error code in rzg2l_cru_start_streaming_vq() Failed to allocate scratch buffer, add the error code '-ENOMEM' to the return value 'ret'. drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c:676 rzg2l_cru_start_streaming_vq() warn: missing error code 'ret'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3275 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 1 + 1 file changed, 1 insertion(+) commit 7de53a06ea6899e14786eba17d40e853cad6680b Author: Lad Prabhakar Date: Mon Nov 28 23:51:42 2022 +0000 media: platform: renesas: rzg2l-cru: Add missing documentation for image_conv_irq Add missing documentation for image_conv_irq element in struct rzg2l_cru_dev. Documentation needed to avoid build warning with W=1 builds. It doesn't really add any non obvious information but good to have it anyway. Reported-by: Hans Verkuil Signed-off-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h | 2 ++ 1 file changed, 2 insertions(+) commit 3a664569b71b0a52be5ffb9fb87cc4f83d29bd71 Author: Lin Ma Date: Mon Nov 28 16:21:59 2022 +0000 media: dvbdev: fix refcnt bug Previous commit initialize the dvbdev->ref before the template copy, which will overwrite the reference and cause refcnt bug. refcount_t: addition on 0; use-after-free. WARNING: CPU: 0 PID: 1 at lib/refcount.c:25 refcount_warn_saturate+0x17c/0x1f0 lib/refcount.c:25 Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc6-next-20221128-syzkaller #0 ... RIP: 0010:refcount_warn_saturate+0x17c/0x1f0 lib/refcount.c:25 RSP: 0000:ffffc900000678d0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88813ff58000 RSI: ffffffff81660e7c RDI: fffff5200000cf0c RBP: ffff888022a45010 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000000 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88823ffff000 CR3: 000000000c48e000 CR4: 00000000003506f0 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] kref_get include/linux/kref.h:45 [inline] dvb_device_get drivers/media/dvb-core/dvbdev.c:585 [inline] dvb_register_device+0xe83/0x16e0 drivers/media/dvb-core/dvbdev.c:517 ... Just place the kref_init at correct position. Reported-by: syzbot+fce48a3dd3368645bd6c@syzkaller.appspotmail.com Fixes: 0fc044b2b5e2 ("media: dvbdev: adopts refcnt to avoid UAF") Signed-off-by: Lin Ma Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc0cd1080a035ea64fd141f7f8138ca5373fb47b Author: Hans Verkuil Date: Mon Nov 28 14:03:33 2022 +0000 media: sun6i-csi: clarify return value, fix uninited variable and add missing static This fixes three smatch warnings: drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c:629:15: warning: 'enabled' may be used uninitialized [-Wmaybe-uninitialized] drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c:439 sun6i_csi_bridge_s_stream() warn: missing error code 'ret' drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c:682 sun6i_csi_bridge_notifier_bound() error: uninitialized symbol 'enabled'. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5edd1b4d58105dc0ee61ed6aa9f22e88d8425b08 Author: Hans Verkuil Date: Mon Nov 28 13:55:43 2022 +0000 media: i2c: tc358746: make DEFINE_RUNTIME_DEV_PM_OPS static DEFINE_RUNTIME_DEV_PM_OPS should be static. This fixes this sparse warning: drivers/media/i2c/tc358746.c:1671:1: warning: symbol 'tc358746_pm_ops' was not declared. Should it be static? Signed-off-by: Hans Verkuil Reviewed-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358746.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dc8239bd8979e66fd92d1fc41e8aa69fde4257b3 Author: Hans Verkuil Date: Mon Nov 28 13:44:47 2022 +0000 media: dvb-frontends: drx39xyj: set missing error code The rc return code was never set in hi_command(). This fixes this smatch warning: drivers/media/dvb-frontends/drx39xyj/drxj.c:2351 hi_command() warn: missing error code 'rc' Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/drx39xyj/drxj.c | 1 + 1 file changed, 1 insertion(+) commit ba8676a3de790723211be3c63187315c6fb7bd07 Author: Hans Verkuil Date: Mon Nov 28 13:33:45 2022 +0000 media: media/frontend.h.rst.exceptions: add exceptions for new dvb defines After some dvb/frontend.h additions, building the documentation gives lots of warnings. Add the missing pieces to frontend.h.rst.exceptions. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../userspace-api/media/frontend.h.rst.exceptions | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 3edfd14bb50fa6f94ed1a37bbb17d9f1c2793b57 Author: Lin Ma Date: Mon Nov 28 08:39:03 2022 +0000 media: dvbdev: fix build warning due to comments Previous commit that introduces reference counter does not add proper comments, which will lead to warning when building htmldocs. Fix them. Reported-by: "Stephen Rothwell" Fixes: 0fc044b2b5e2 ("media: dvbdev: adopts refcnt to avoid UAF") Signed-off-by: Lin Ma Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/dvbdev.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e2fc6edd37ba487c64f4dd09f7118b3e45b12d88 Author: Hans Verkuil Date: Mon Nov 28 08:23:56 2022 +0000 media: videobuf2: revert "get_userptr: buffers are always writable" Commit 707947247e95 ("media: videobuf2-vmalloc: get_userptr: buffers are always writable") caused problems in a corner case (passing read-only shmem memory as a userptr). So revert this patch. The original problem for which that commit was originally made is something that I could not reproduce after reverting it. So just go back to the way it was for many years, and if problems arise in the future, then another approach should be taken to resolve it. This patch is based on a patch from Hirokazu. Fixes: 707947247e95 ("media: videobuf2-vmalloc: get_userptr: buffers are always writable") Signed-off-by: Hirokazu Honda Signed-off-by: Hans Verkuil Acked-by: Tomasz Figa Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/frame_vector.c | 10 +++++++--- drivers/media/common/videobuf2/videobuf2-dma-contig.c | 3 ++- drivers/media/common/videobuf2/videobuf2-dma-sg.c | 4 +++- drivers/media/common/videobuf2/videobuf2-memops.c | 6 ++++-- drivers/media/common/videobuf2/videobuf2-vmalloc.c | 4 +++- include/media/frame_vector.h | 2 +- include/media/videobuf2-memops.h | 3 ++- 7 files changed, 22 insertions(+), 10 deletions(-) commit 1aba7930c63ea57b4918dc61dcc315f451cec21e Author: Nathan Chancellor Date: Mon Nov 28 06:16:22 2022 +0000 media: rzg2l-cru: Remove unnecessary shadowing of ret in rzg2l_csi2_s_stream() Clang warns: drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:445:7: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (ret) ^~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:475:9: note: uninitialized use occurs here return ret; ^~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:445:3: note: remove the 'if' if its condition is always false if (ret) ^~~~~~~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:441:7: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (ret) ^~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:475:9: note: uninitialized use occurs here return ret; ^~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:441:3: note: remove the 'if' if its condition is always false if (ret) ^~~~~~~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:431:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 2 errors generated. ret is unnecessarily shadowed, meaning the assignments to ret within the first 'if (enable)' block are only applied to the inner scope, not the outer one as intended. Remove the shadowing to fix the warnings and make everything work correctly. Link: https://github.com/ClangBuiltLinux/linux/issues/1764 Fixes: 51e8415e39a9 ("media: platform: Add Renesas RZ/G2L MIPI CSI-2 receiver driver") Signed-off-by: Nathan Chancellor Reviewed-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 2 -- 1 file changed, 2 deletions(-) commit d50fd948d3d086e2608430eb17a01948c3c0d0d2 Author: Randy Dunlap Date: Mon Nov 28 05:43:03 2022 +0000 media: dvb/frontend.h: fix kernel-doc warnings scripts/kernel-doc spouts multiple warnings, so fix them: include/uapi/linux/dvb/frontend.h:399: warning: Enum value 'QAM_1024' not described in enum 'fe_modulation' include/uapi/linux/dvb/frontend.h:399: warning: Enum value 'QAM_4096' not described in enum 'fe_modulation' frontend.h:286: warning: contents before sections frontend.h:780: warning: missing initial short description on line: * enum atscmh_rs_code_mode Fixes: 8220ead805b6 ("media: dvb/frontend.h: document the uAPI file") Fixes: 6508a50fe84f ("media: dvb: add DVB-C2 and DVB-S2X parameter values") Signed-off-by: Randy Dunlap Reviewed-by: Robert Schlabbach Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/dvb/frontend.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 57fb35d7542384cac8f198cd1c927540ad38b61a Author: Liu Shixin Date: Sat Nov 26 11:31:26 2022 +0000 media: saa7164: fix missing pci_disable_device() Add missing pci_disable_device() in the error path in saa7164_initdev(). Fixes: 443c1228d505 ("V4L/DVB (12923): SAA7164: Add support for the NXP SAA7164 silicon") Signed-off-by: Liu Shixin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7164/saa7164-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2fa8d1d76875fb976f963fdde50fc3e95d8d1025 Author: Hans de Goede Date: Tue Nov 29 23:11:44 2022 +0000 media: ov5693: Add support for a privacy-led GPIO Add support for a privacy-led GPIO. Making the privacy LED to controlable from userspace, as using the LED class subsystem would do, would make it too easy for spy-ware to disable the LED. To avoid this have the sensor driver directly control the LED. Link: https://lore.kernel.org/linux-media/20221129231149.697154-2-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Reviewed-by: Sakari Ailus Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5693.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 08388efe593106d2fcd6ddf7a269db58a62a5dda Merge: ab0350c743d5 90a3a05eb33f Author: Martin KaFai Lau Date: Mon Dec 5 21:58:28 2022 -0800 Merge branch 'xfrm: interface: Add unstable helpers for XFRM metadata' Eyal Birger says: ==================== This patch series adds xfrm metadata helpers using the unstable kfunc call interface for the TC-BPF hooks. This allows steering traffic towards different IPsec connections based on logic implemented in bpf programs. The helpers are integrated into the xfrm_interface module. For this purpose the main functionality of this module is moved to xfrm_interface_core.c. --- changes in v6: fix sparse warning in patch 2 changes in v5: - avoid cleanup of percpu dsts as detailed in patch 2 changes in v3: - tag bpf-next tree instead of ipsec-next - add IFLA_XFRM_COLLECT_METADATA sync patch ==================== Signed-off-by: Martin KaFai Lau commit 90a3a05eb33ff7a263f1e93e444d40e427cddf1a Author: Eyal Birger Date: Sat Dec 3 10:46:59 2022 +0200 selftests/bpf: add xfrm_info tests Test the xfrm_info kfunc helpers. The test setup creates three name spaces - NS0, NS1, NS2. XFRM tunnels are setup between NS0 and the two other NSs. The kfunc helpers are used to steer traffic from NS0 to the other NSs based on a userspace populated bpf global variable and validate that the return traffic had arrived from the desired NS. Signed-off-by: Eyal Birger Link: https://lore.kernel.org/r/20221203084659.1837829-5-eyal.birger@gmail.com Signed-off-by: Martin KaFai Lau tools/testing/selftests/bpf/DENYLIST.s390x | 1 + tools/testing/selftests/bpf/config | 2 + tools/testing/selftests/bpf/prog_tests/xfrm_info.c | 362 +++++++++++++++++++++ .../testing/selftests/bpf/progs/bpf_tracing_net.h | 3 + tools/testing/selftests/bpf/progs/xfrm_info.c | 35 ++ 5 files changed, 403 insertions(+) commit 4f4ac4d9106efeec9c84469725c04c4237c7fb6c Author: Eyal Birger Date: Sat Dec 3 10:46:58 2022 +0200 tools: add IFLA_XFRM_COLLECT_METADATA to uapi/linux/if_link.h Needed for XFRM metadata tests. Signed-off-by: Eyal Birger Link: https://lore.kernel.org/r/20221203084659.1837829-4-eyal.birger@gmail.com Signed-off-by: Martin KaFai Lau tools/include/uapi/linux/if_link.h | 1 + 1 file changed, 1 insertion(+) commit 94151f5aa9667c562281abeaaa5e89b9d5c17729 Author: Eyal Birger Date: Sat Dec 3 10:46:57 2022 +0200 xfrm: interface: Add unstable helpers for setting/getting XFRM metadata from TC-BPF This change adds xfrm metadata helpers using the unstable kfunc call interface for the TC-BPF hooks. This allows steering traffic towards different IPsec connections based on logic implemented in bpf programs. This object is built based on the availability of BTF debug info. When setting the xfrm metadata, percpu metadata dsts are used in order to avoid allocating a metadata dst per packet. In order to guarantee safe module unload, the percpu dsts are allocated on first use and never freed. The percpu pointer is stored in net/core/filter.c so that it can be reused on module reload. The metadata percpu dsts take ownership of the original skb dsts so that they may be used as part of the xfrm transmission logic - e.g. for MTU calculations. Signed-off-by: Eyal Birger Link: https://lore.kernel.org/r/20221203084659.1837829-3-eyal.birger@gmail.com Signed-off-by: Martin KaFai Lau include/net/dst_metadata.h | 1 + include/net/xfrm.h | 17 ++++++ net/core/dst.c | 8 ++- net/core/filter.c | 9 ++++ net/xfrm/Makefile | 6 +++ net/xfrm/xfrm_interface_bpf.c | 115 +++++++++++++++++++++++++++++++++++++++++ net/xfrm/xfrm_interface_core.c | 14 +++++ 7 files changed, 168 insertions(+), 2 deletions(-) commit ee9a113ab63468137802898bcd2c598998c96938 Author: Eyal Birger Date: Sat Dec 3 10:46:56 2022 +0200 xfrm: interface: rename xfrm_interface.c to xfrm_interface_core.c This change allows adding additional files to the xfrm_interface module. Signed-off-by: Eyal Birger Link: https://lore.kernel.org/r/20221203084659.1837829-2-eyal.birger@gmail.com Signed-off-by: Martin KaFai Lau net/xfrm/Makefile | 2 ++ net/xfrm/{xfrm_interface.c => xfrm_interface_core.c} | 0 2 files changed, 2 insertions(+) commit f07788079f515ca4a681c5f595bdad19cfbd7b1d Author: Arnd Bergmann Date: Sat Dec 3 11:54:25 2022 +0100 ata: ahci: fix enum constants for gcc-13 gcc-13 slightly changes the type of constant expressions that are defined in an enum, which triggers a compile time sanity check in libata: linux/drivers/ata/libahci.c: In function 'ahci_led_store': linux/include/linux/compiler_types.h:357:45: error: call to '__compiletime_assert_302' declared with attribute error: BUILD_BUG_ON failed: sizeof(_s) > sizeof(long) 357 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) The new behavior is that sizeof() returns the same value for the constant as it does for the enum type, which is generally more sensible and consistent. The problem in libata is that it contains a single enum definition for lots of unrelated constants, some of which are large positive (unsigned) integers like 0xffffffff, while others like (1<<31) are interpreted as negative integers, and this forces the enum type to become 64 bit wide even though most constants would still fit into a signed 32-bit 'int'. Fix this by changing the entire enum definition to use BIT(x) in place of (1< Cc: linux-ide@vger.kernel.org Cc: Damien Le Moal Cc: stable@vger.kernel.org Cc: Randy Dunlap Signed-off-by: Arnd Bergmann Tested-by: Luis Machado Signed-off-by: Damien Le Moal drivers/ata/ahci.h | 245 +++++++++++++++++++++++++++-------------------------- 1 file changed, 123 insertions(+), 122 deletions(-) commit c99b2e8cf79616157eeab34828fbe6e41ef2271c Author: Dave Jiang Date: Mon Dec 5 14:20:01 2022 -0700 cxl: update names for interleave ways conversion macros Change names for interleave ways macros to clearly indicate which variable is encoded and which is the actual ways value. ways == interleave ways eiw == encoded interleave ways Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/167027516228.3124679.11265039496968588580.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 6 +++--- drivers/cxl/core/hdm.c | 6 +++--- drivers/cxl/core/region.c | 6 +++--- drivers/cxl/cxl.h | 14 +++++++------- 4 files changed, 16 insertions(+), 16 deletions(-) commit 83351ddb786b30952485a5c302cd0cffbd62097e Author: Dave Jiang Date: Mon Dec 5 14:16:07 2022 -0700 cxl: update names for interleave granularity conversion macros Change names for granularity macros to clearly indicate which variable is encoded and which is the actual granularity. granularity == interleave granularity eig == encoded interleave granularity Reviewed-by: Jonathan Cameron Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/167027493237.3124429.8948852388671827664.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 4 ++-- drivers/cxl/core/hdm.c | 6 +++--- drivers/cxl/core/region.c | 6 +++--- drivers/cxl/cxl.h | 13 +++++++------ 4 files changed, 15 insertions(+), 14 deletions(-) commit 7ecdadf7f8c659524f6b2aebf6be7bf619764d90 Author: Guo Ren Date: Wed Nov 9 01:49:37 2022 -0500 riscv: stacktrace: Make walk_stackframe cross pt_regs frame The current walk_stackframe with FRAME_POINTER would stop unwinding at ret_from_exception: BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1518 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 1, name: init CPU: 0 PID: 1 Comm: init Not tainted 5.10.113-00021-g15c15974895c-dirty #192 Call Trace: [] walk_stackframe+0x0/0xee [] show_stack+0x32/0x4a [] dump_stack_lvl+0x72/0x8e [] dump_stack+0x14/0x1c [] ___might_sleep+0x12e/0x138 [] __might_sleep+0x10/0x18 [] down_read+0x22/0xa4 [] do_page_fault+0xb0/0x2fe [] ret_from_exception+0x0/0xc The optimization would help walk_stackframe cross the pt_regs frame and get more backtrace of debug info: BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1518 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 1, name: init CPU: 0 PID: 1 Comm: init Not tainted 5.10.113-00021-g15c15974895c-dirty #192 Call Trace: [] walk_stackframe+0x0/0xee [] show_stack+0x32/0x4a [] dump_stack_lvl+0x72/0x8e [] dump_stack+0x14/0x1c [] ___might_sleep+0x12e/0x138 [] __might_sleep+0x10/0x18 [] down_read+0x22/0xa4 [] do_page_fault+0xb0/0x2fe [] ret_from_exception+0x0/0xc [] riscv_intc_irq+0x1a/0x72 [] ret_from_exception+0x0/0xc [] vma_link+0x54/0x160 [] mmap_region+0x2cc/0x4d0 [] do_mmap+0x2d8/0x3ac [] vm_mmap_pgoff+0x70/0xb8 [] vm_mmap+0x2a/0x36 [] elf_map+0x72/0x84 [] load_elf_binary+0x69a/0xec8 [] bprm_execve+0x246/0x53a [] kernel_execve+0xe8/0x124 [] run_init_process+0xfa/0x10c [] try_to_run_init_process+0x12/0x3c [] kernel_init+0xb4/0xf8 [] ret_from_exception+0x0/0xc Here is the error injection test code for the above output: drivers/irqchip/irq-riscv-intc.c: static asmlinkage void riscv_intc_irq(struct pt_regs *regs) { unsigned long cause = regs->cause & ~CAUSE_IRQ_FLAG; + u32 tmp; __get_user(tmp, (u32 *)0); Signed-off-by: Guo Ren Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20221109064937.3643993-3-guoren@kernel.org [Palmer: use SYM_CODE_*] Signed-off-by: Palmer Dabbelt arch/riscv/kernel/entry.S | 3 ++- arch/riscv/kernel/stacktrace.c | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit c9f8d73645b6f76c8d14f49bc860f7143d001cb7 Author: Lorenzo Bianconi Date: Sat Dec 3 14:20:37 2022 +0100 net: mtk_eth_soc: enable flow offload support for MT7986 SoC Since Wireless Ethernet Dispatcher is now available for mt7986 in mt76, enable hw flow support for MT7986 SoC. Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/fdcaacd827938e6a8c4aa1ac2c13e46d2c08c821.1670072898.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 + 1 file changed, 1 insertion(+) commit 7112a04664bfc10ae4709b2079fe3991cbd1fe18 Author: Sudheer Mogilappagari Date: Thu Dec 1 16:25:55 2022 -0800 ethtool: add netlink based get rss support Add netlink based support for "ethtool -x [context x]" command by implementing ETHTOOL_MSG_RSS_GET netlink message. This is equivalent to functionality provided via ETHTOOL_GRSSH in ioctl path. It sends RSS table, hash key and hash function of an interface to user space. This patch implements existing functionality available in ioctl path and enables addition of new RSS context based parameters in future. Signed-off-by: Sudheer Mogilappagari Link: https://lore.kernel.org/r/20221202002555.241580-1-sudheer.mogilappagari@intel.com Signed-off-by: Jakub Kicinski Documentation/networking/ethtool-netlink.rst | 31 +++++- include/uapi/linux/ethtool_netlink.h | 14 +++ net/ethtool/Makefile | 2 +- net/ethtool/netlink.c | 7 ++ net/ethtool/netlink.h | 2 + net/ethtool/rss.c | 153 +++++++++++++++++++++++++++ 6 files changed, 207 insertions(+), 2 deletions(-) commit 5c3022e4a616d800cf5f4c3a981d7992179e44a1 Author: Guo Ren Date: Wed Nov 9 01:49:36 2022 -0500 riscv: stacktrace: Fixup ftrace_graph_ret_addr retp argument The 'retp' is a pointer to the return address on the stack, so we must pass the current return address pointer as the 'retp' argument to ftrace_push_return_trace(). Not parent function's return address on the stack. Fixes: b785ec129bd9 ("riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20221109064937.3643993-2-guoren@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/stacktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6b842741b4f39007215fd7e545cb55aa3d358a2 Author: Stephen Boyd Date: Mon Dec 5 15:31:36 2022 -0800 pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP An oops can be induced by running 'cat /proc/kcore > /dev/null' on devices using pstore with the ram backend because kmap_atomic() assumes lowmem pages are accessible with __va(). Unable to handle kernel paging request at virtual address ffffff807ff2b000 Mem abort info: ESR = 0x96000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000081d87000 [ffffff807ff2b000] pgd=180000017fe18003, p4d=180000017fe18003, pud=180000017fe18003, pmd=0000000000000000 Internal error: Oops: 96000006 [#1] PREEMPT SMP Modules linked in: dm_integrity CPU: 7 PID: 21179 Comm: perf Not tainted 5.15.67-10882-ge4eb2eb988cd #1 baa443fb8e8477896a370b31a821eb2009f9bfba Hardware name: Google Lazor (rev3 - 8) (DT) pstate: a0400009 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __memcpy+0x110/0x260 lr : vread+0x194/0x294 sp : ffffffc013ee39d0 x29: ffffffc013ee39f0 x28: 0000000000001000 x27: ffffff807ff2b000 x26: 0000000000001000 x25: ffffffc0085a2000 x24: ffffff802d4b3000 x23: ffffff80f8a60000 x22: ffffff802d4b3000 x21: ffffffc0085a2000 x20: ffffff8080b7bc68 x19: 0000000000001000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: ffffffd3073f2e60 x14: ffffffffad588000 x13: 0000000000000000 x12: 0000000000000001 x11: 00000000000001a2 x10: 00680000fff2bf0b x9 : 03fffffff807ff2b x8 : 0000000000000001 x7 : 0000000000000000 x6 : 0000000000000000 x5 : ffffff802d4b4000 x4 : ffffff807ff2c000 x3 : ffffffc013ee3a78 x2 : 0000000000001000 x1 : ffffff807ff2b000 x0 : ffffff802d4b3000 Call trace: __memcpy+0x110/0x260 read_kcore+0x584/0x778 proc_reg_read+0xb4/0xe4 During early boot, memblock reserves the pages for the ramoops reserved memory node in DT that would otherwise be part of the direct lowmem mapping. Pstore's ram backend reuses those reserved pages to change the memory type (writeback or non-cached) by passing the pages to vmap() (see pfn_to_page() usage in persistent_ram_vmap() for more details) with specific flags. When read_kcore() starts iterating over the vmalloc region, it runs over the virtual address that vmap() returned for ramoops. In aligned_vread() the virtual address is passed to vmalloc_to_page() which returns the page struct for the reserved lowmem area. That lowmem page is passed to kmap_atomic(), which effectively calls page_to_virt() that assumes a lowmem page struct must be directly accessible with __va() and friends. These pages are mapped via vmap() though, and the lowmem mapping was never made, so accessing them via the lowmem virtual address oopses like above. Let's side-step this problem by passing VM_IOREMAP to vmap(). This will tell vread() to not include the ramoops region in the kcore. Instead the area will look like a bunch of zeros. The alternative is to teach kmap() about vmalloc areas that intersect with lowmem. Presumably such a change isn't a one-liner, and there isn't much interest in inspecting the ramoops region in kcore files anyway, so the most expedient route is taken for now. Cc: Brian Geffon Cc: Mike Rapoport Cc: Andrew Morton Fixes: 404a6043385d ("staging: android: persistent_ram: handle reserving and mapping memory") Signed-off-by: Stephen Boyd Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221205233136.3420802-1-swboyd@chromium.org fs/pstore/ram_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d3cdf4585f2f9122d1165acca40e801c75afa320 Author: Robert Richter Date: Mon Dec 5 12:21:40 2022 -0800 cxl/acpi: Warn about an invalid CHBCR in an existing CHBS entry After parsing for a CHBCR in cxl_get_chbcr() the case of (ctx.chbcr == CXL_RESOURCE_NONE) is a slighly different error reason than the !ctx.chbcr case. In the first case the CHBS was found but the CHBCR was invalid or something else failed to determine it, while in the latter case no CHBS entry exists at all. Update the warning message to reflect this. The log messages for both cases can be differentiated now and the reason for a failure can be determined better. Signed-off-by: Robert Richter Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/167027170051.3542509.10494781536638424397.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 52fb1b8e481b423afbb34259be964494ba5b8614 Author: Robert Marko Date: Mon Dec 5 12:35:45 2022 +0100 clk: qcom: gcc-ipq4019: switch to devm_clk_notifier_register Switch to using devres-managed version of clk_notifier_register(). This allows us to drop driver's remove() callback. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221205113545.575702-1-robert.marko@sartura.hr drivers/clk/qcom/gcc-ipq4019.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 812e13ddb56aa5c4534c96b522d2e39e094df677 Author: Owen Yang Date: Mon Dec 5 13:36:14 2022 +0800 dt-bindings: arm: qcom: Add zombie Add entries in the device tree binding for sc7280-zombie. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Owen Yang Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221205133603.v15.1.Idfcba5344b7995b44b7fa2e20f1aa4351defeca6@changeid Documentation/devicetree/bindings/arm/qcom.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f33ca7ec5e5e3a53d5636a4eab270bacac751f6e Author: Bhupesh Sharma Date: Thu Dec 1 19:46:19 2022 +0530 soc: qcom: socinfo: Add SM6115 / SM4250 SoC IDs to the soc_id table Add SoC ID table entries for the SM6115 / SM4250 and variants. Cc: Bjorn Andersson Cc: Krzysztof Kozlowski Signed-off-by: Bhupesh Sharma Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221201141619.2462705-5-bhupesh.sharma@linaro.org drivers/soc/qcom/socinfo.c | 4 ++++ 1 file changed, 4 insertions(+) commit 67d1af1c50a4a0ae48f535126cdfca915ffed29b Author: Bhupesh Sharma Date: Thu Dec 1 19:46:18 2022 +0530 dt-bindings: arm: qcom,ids: Add SoC IDs for SM6115 / SM4250 and variants Add SoC IDs for Qualcomm SM6115 / SM4250 and variants. Cc: Bjorn Andersson Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Konrad Dybcio Signed-off-by: Bhupesh Sharma Acked-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221201141619.2462705-4-bhupesh.sharma@linaro.org include/dt-bindings/arm/qcom,ids.h | 4 ++++ 1 file changed, 4 insertions(+) commit 911eed825cd7573c8fa9fa3f348a5a657fa180a4 Author: Bhupesh Sharma Date: Thu Dec 1 19:46:17 2022 +0530 soc: qcom: socinfo: Add SM8150 and SA8155 SoC IDs to the soc_id table Add SoC ID table entries for the SM8150 and SA8155 SoCs. Cc: Bjorn Andersson Cc: Krzysztof Kozlowski Signed-off-by: Bhupesh Sharma Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221201141619.2462705-3-bhupesh.sharma@linaro.org drivers/soc/qcom/socinfo.c | 2 ++ 1 file changed, 2 insertions(+) commit 87f67727e057bc54816097d3b8e38a4a0c58e0bb Author: Bhupesh Sharma Date: Thu Dec 1 19:46:16 2022 +0530 dt-bindings: arm: qcom,ids: Add SoC IDs for SM8150 and SA8155 Add SoC IDs for Qualcomm SM8150 and SA8155 SoCs. Cc: Bjorn Andersson Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Konrad Dybcio Signed-off-by: Bhupesh Sharma Acked-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221201141619.2462705-2-bhupesh.sharma@linaro.org include/dt-bindings/arm/qcom,ids.h | 2 ++ 1 file changed, 2 insertions(+) commit 9ed8503114ccbfd116f18143a3604b9f1155ee9e Author: Krzysztof Kozlowski Date: Thu Dec 1 14:36:37 2022 +0100 dt-bindings: soc: qcom: apr: document generic qcom,apr compatible Document the qcom,apr compatible, used by Qualcomm Asynchronous Packet Router driver. There are no upstream DTSes using this compatible - instead we have ones with APRv2 (qcom,apr-v2). The driver does not make distinction between both compatibles, which raises the question whether the compatible is really needed. Document it (as compatible with v2) for completeness. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221201133637.46146-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml | 1 + 1 file changed, 1 insertion(+) commit a84160fbf4f2c8c5ffa588e19ea8f92eabd7ad17 Author: Manivannan Sadhasivam Date: Tue Nov 29 12:50:22 2022 +0530 soc: qcom: Select REMAP_MMIO for ICC_BWMON driver ICC_BWMON driver uses REGMAP_MMIO for accessing the hardware registers. So select the dependency in Kconfig. Without this, there will be errors while building the driver with COMPILE_TEST only: ERROR: modpost: "__devm_regmap_init_mmio_clk" [drivers/soc/qcom/icc-bwmon.ko] undefined! make[1]: *** [scripts/Makefile.modpost:126: Module.symvers] Error 1 make: *** [Makefile:1944: modpost] Error 2 Cc: # 6.0 Cc: Krzysztof Kozlowski Fixes: b9c2ae6cac40 ("soc: qcom: icc-bwmon: Add bandwidth monitoring driver") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221129072022.41962-1-manivannan.sadhasivam@linaro.org drivers/soc/qcom/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5d2fe2d7b616b8baa18348ead857b504fc2de336 Author: Manivannan Sadhasivam Date: Tue Nov 29 12:41:59 2022 +0530 soc: qcom: Select REMAP_MMIO for LLCC driver LLCC driver uses REGMAP_MMIO for accessing the hardware registers. So select the dependency in Kconfig. Without this, there will be errors while building the driver with COMPILE_TEST only: ERROR: modpost: "__devm_regmap_init_mmio_clk" [drivers/soc/qcom/llcc-qcom.ko] undefined! make[1]: *** [scripts/Makefile.modpost:126: Module.symvers] Error 1 make: *** [Makefile:1944: modpost] Error 2 Cc: # 4.19 Fixes: a3134fb09e0b ("drivers: soc: Add LLCC driver") Reported-by: Borislav Petkov Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221129071201.30024-2-manivannan.sadhasivam@linaro.org drivers/soc/qcom/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5d4bf8607be1683b09378ff1dba71cfe3d4ff6ec Author: Bhupesh Sharma Date: Tue Nov 29 01:38:34 2022 +0530 arm64: defconfig: Enable Qualcomm SM6115 / SM4250 GCC and Pinctrl Enable the Qualcomm SM6115 / SM4250 TLMM pinctrl and GCC clock drivers. They need to be builtin to ensure that the UART is allowed to probe before user space needs a console. Cc: Krzysztof Kozlowski Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma Acked-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221128200834.1776868-1-bhupesh.sharma@linaro.org arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 378f0231330dd13da27e856c44031cef00012ee3 Author: Julian Goldsmith Date: Mon Nov 28 18:25:30 2022 +0100 ARM: dts: qcom: msm8974: Add OnePlus One OnePlus One is a smartphone launched in 2014 and is based on the Snapdragon 801 SoC (-AC variant). Supported features: * ADSP * Charger * Coincell charger * Fuel gauge * Internal storage * Touchscreen * UART * USB * Wifi/Bluetooth Signed-off-by: Julian Goldsmith Co-developed-by: Oleg Chernovskiy Signed-off-by: Oleg Chernovskiy Co-developed-by: Luca Weiss Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221128172531.828660-2-luca@z3ntu.xyz arch/arm/boot/dts/Makefile | 1 + .../arm/boot/dts/qcom-msm8974pro-oneplus-bacon.dts | 417 +++++++++++++++++++++ 2 files changed, 418 insertions(+) commit c8f740af515848b26be9469c5f338e3b5dd0e57c Author: Luca Weiss Date: Mon Nov 28 18:25:29 2022 +0100 dt-bindings: arm: qcom: Document oneplus,bacon device Document the OnePlus One ("bacon") which is a smartphone based on the Snapdragon 801 SoC. Also allow msm8974(pro) devices to use qcom,msm-id and qcom,board-id. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221128172531.828660-1-luca@z3ntu.xyz Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit 08b37b2a9b1a9e4dcdd810e514e3f60f54338fa9 Author: Luca Weiss Date: Mon Nov 28 18:16:23 2022 +0100 ARM: dts: qcom: msm8974: clean up USB nodes Rename "otg" label to "usb" to group it with other usb nodes and also because "usb" makes more sense for a USB controller. And now we can also better use the usb_hsX_phy labels instead of having the ulpi -> phy@X structure in every dts. Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221128171623.825572-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 42 +++++++++---------- .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 48 +++++++++++----------- .../boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi | 48 +++++++++++----------- arch/arm/boot/dts/qcom-msm8974.dtsi | 6 +-- .../arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts | 48 +++++++++++----------- arch/arm/boot/dts/qcom-msm8974pro-samsung-klte.dts | 42 +++++++++---------- .../qcom-msm8974pro-sony-xperia-shinano-castor.dts | 48 +++++++++++----------- 7 files changed, 135 insertions(+), 147 deletions(-) commit 1477cca86492a58177a2afe2837494301e97f6ff Author: Dmitry Baryshkov Date: Mon Nov 28 15:15:50 2022 +0200 arm: dts: qcom: use qcom,msm8974pro for pro devices Use new qcom,msm8974pro compatible string instead of qcom,msm8974 to clearly mark that the device is using the Pro version of the SoC. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221128131550.858724-2-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts | 2 +- arch/arm/boot/dts/qcom-msm8974pro-samsung-klte.dts | 2 +- arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 2e62303fb8807d70208e54475fa9181ae4b17285 Author: Dmitry Baryshkov Date: Mon Nov 28 15:15:49 2022 +0200 dt-bindings: arm: qcom: split MSM8974 Pro and MSM8974 The MSM8974 Pro (AC) and bare MSM8974 are slightly different platforms. Split the compat strings accordingly to clearly specify the platform used by the device. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221128131550.858724-1-dmitry.baryshkov@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit a31b3cffbd8e5d032dcb267bf94ee48d71c1a28b Author: Christian Schoenebeck Date: Tue Nov 22 20:20:29 2022 +0100 net/9p: fix response size check in p9_check_errors() Since commit 60ece0833b6c ("net/9p: allocate appropriate reduced message buffers") it is no longer appropriate to check server's response size against msize. Check against the previously allocated buffer capacity instead. - Omit this size check entirely for zero-copy messages, as those always allocate 4k (P9_ZC_HDR_SZ) linear buffers which are not used for actual payload and can be much bigger than 4k. - Replace p9_debug() by pr_err() to make sure this message is always printed in case this error is triggered. - Add 9p message type to error message to ease investigation. Link: https://lkml.kernel.org/r/e0edec84b1c80119ae937ce854b4f5f6dbe2d08c.1669144861.git.linux_oss@crudebyte.com Signed-off-by: Christian Schoenebeck Tested-by: Stefano Stabellini Reported-by: kernel test robot Signed-off-by: Dominique Martinet net/9p/client.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8e4c2eee1e15c1206c26f6b28b05fe9711a427c6 Author: Christian Schoenebeck Date: Tue Nov 22 20:20:22 2022 +0100 net/9p: distinguish zero-copy requests Add boolean `zc` member to struct p9_fcall to distinguish zero-copy messages (not using the linear `sdata` buffer for message payload) from regular messages (which do copy message payload to `sdata` before being further processed). This new member is appended to end of structure to avoid inserting huge padding in generated layout. Link: https://lkml.kernel.org/r/8f2a5c12a446c3b544da64e0b1550e1fb2d6f972.1669144861.git.linux_oss@crudebyte.com Signed-off-by: Christian Schoenebeck Tested-by: Stefano Stabellini Signed-off-by: Dominique Martinet include/net/9p/9p.h | 2 ++ net/9p/client.c | 6 ++++++ 2 files changed, 8 insertions(+) commit 5b617b1b10c1c6a4365d8f956032e95c53b8e388 Author: Bhupesh Sharma Date: Sun Nov 27 16:52:04 2022 +0530 soc: qcom: rpmpd: Add SM4250 support SM4250 has the same RPM power domains as SM6115. Add SM4250 support by reusing SM6115 power domains. Cc: Bjorn Andersson Cc: Rajendra Nayak Cc: Konrad Dybcio Cc: Rob Herring Cc: Krzysztof Kozlowski Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221127112204.1486337-3-bhupesh.sharma@linaro.org drivers/soc/qcom/rpmpd.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 45ac44ed10e58cf9b510e6552317ed7d2602346f Author: Bhupesh Sharma Date: Sun Nov 27 16:52:03 2022 +0530 dt-bindings: power: rpmpd: Add SM4250 support Add compatible and constants for the power domains exposed by the SM4250 RPM. Cc: Bjorn Andersson Cc: Rajendra Nayak Cc: Konrad Dybcio Cc: Rob Herring Cc: Krzysztof Kozlowski Signed-off-by: Bhupesh Sharma Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221127112204.1486337-2-bhupesh.sharma@linaro.org Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 + include/dt-bindings/power/qcom-rpmpd.h | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 3ebeed30209aa50505956076aff1cf00a6381760 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:42:09 2022 +0100 ARM: dts: qcom: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: qcom-ipq4018-ap120c-ac.dtb: leds: 'wlan2g', 'wlan5g' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221125144209.477328-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-ipq4018-ap120c-ac-bit.dts | 6 +++--- arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit b3de85276e8f68dcba35b0135270372760961ccb Author: Parikshit Pareek Date: Fri Nov 18 08:21:57 2022 +0530 dt-bindings: arm: qcom: Document additional sa8540p device Add the qdrive3 ride device to the valid device compatibles found on the sa8540p platform. Signed-off-by: Parikshit Pareek Acked-by: Krzysztof Kozlowski Reviewed-by: Brian Masney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221118025158.16902-2-quic_ppareek@quicinc.com Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit 104bb8a663451404a26331263ce5b96c34504049 Author: ruanjinjie Date: Mon Dec 5 15:51:53 2022 +0800 power: supply: fix null pointer dereferencing in power_supply_get_battery_info when kmalloc() fail to allocate memory in kasprintf(), propname will be NULL, strcmp() called by of_get_property() will cause null pointer dereference. So return ENOMEM if kasprintf() return NULL pointer. Fixes: 3afb50d7125b ("power: supply: core: Add some helpers to use the battery OCV capacity table") Signed-off-by: ruanjinjie Reviewed-by: Baolin Wang Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_core.c | 5 +++++ 1 file changed, 5 insertions(+) commit fa5745aca1dc819aee6463a2475b5c277f7cf8f6 Author: Thomas Gleixner Date: Fri Nov 25 00:26:36 2022 +0100 iommu/amd: Enable PCI/IMS PCI/IMS works like PCI/MSI-X in the remapping. Just add the feature flag, but only when on real hardware. Virtualized IOMMUs need additional support. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232327.140571546@linutronix.de drivers/iommu/amd/iommu.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 810531a1af5393f010d6508b1cb48e6650fc5e8f Author: Thomas Gleixner Date: Fri Nov 25 00:26:34 2022 +0100 iommu/vt-d: Enable PCI/IMS PCI/IMS works like PCI/MSI-X in the remapping. Just add the feature flag, but only when on real hardware. Virtualized IOMMUs need additional support, e.g. for PASID. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232327.081482253@linutronix.de drivers/iommu/intel/irq_remapping.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 6e24c887732901140f4e82ba2315c2e15f06f1d6 Author: Thomas Gleixner Date: Fri Nov 25 00:26:32 2022 +0100 x86/apic/msi: Enable PCI/IMS Enable IMS in the domain init and allocation mapping code, but do not enable it on the vector domain as discussed in various threads on LKML. The interrupt remap domains can expand this setting like they do with PCI multi MSI. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232327.022658817@linutronix.de arch/x86/kernel/apic/msi.c | 5 +++++ 1 file changed, 5 insertions(+) commit c9e5bea273834a63b5e9ba90ad94b305ba50704e Author: Thomas Gleixner Date: Fri Nov 25 00:26:31 2022 +0100 PCI/MSI: Provide pci_ims_alloc/free_irq() Single vector allocation which allocates the next free index in the IMS space. The free function releases. All allocated vectors are released also via pci_free_vectors() which is also releasing MSI/MSI-X vectors. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Bjorn Helgaas Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.961711347@linutronix.de drivers/pci/msi/api.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/pci.h | 3 +++ 2 files changed, 53 insertions(+) commit 0194425af0c87acaad457989a2c6d90dba58e776 Author: Thomas Gleixner Date: Fri Nov 25 00:26:29 2022 +0100 PCI/MSI: Provide IMS (Interrupt Message Store) support IMS (Interrupt Message Store) is a new specification which allows implementation specific storage of MSI messages contrary to the strict standard specified MSI and MSI-X message stores. This requires new device specific interrupt domains to handle the implementation defined storage which can be an array in device memory or host/guest memory which is shared with hardware queues. Add a function to create IMS domains for PCI devices. IMS domains are using the new per device domain mechanism and are configured by the device driver via a template. IMS domains are created as secondary device domains so they work side on side with MSI[-X] on the same device. The IMS domains have a few constraints: - The index space is managed by the core code. Device memory based IMS provides a storage array with a fixed size which obviously requires an index. But there is no association between index and functionality so the core can randomly allocate an index in the array. System memory based IMS does not have the concept of an index as the storage is somewhere in memory. In that case the index is purely software based to keep track of the allocations. - There is no requirement for consecutive index ranges This is currently a limitation of the MSI core and can be implemented if there is a justified use case by changing the internal storage from xarray to maple_tree. For now it's single vector allocation. - The interrupt chip must provide the following callbacks: - irq_mask() - irq_unmask() - irq_write_msi_msg() - The interrupt chip must provide the following optional callbacks when the irq_mask(), irq_unmask() and irq_write_msi_msg() callbacks cannot operate directly on hardware, e.g. in the case that the interrupt message store is in queue memory: - irq_bus_lock() - irq_bus_unlock() These callbacks are invoked from preemptible task context and are allowed to sleep. In this case the mandatory callbacks above just store the information. The irq_bus_unlock() callback is supposed to make the change effective before returning. - Interrupt affinity setting is handled by the underlying parent interrupt domain and communicated to the IMS domain via irq_write_msi_msg(). IMS domains cannot have a irq_set_affinity() callback. That's a reasonable restriction similar to the PCI/MSI device domain implementations. The domain is automatically destroyed when the PCI device is removed. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.904316841@linutronix.de drivers/pci/msi/irqdomain.c | 59 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/pci.h | 5 ++++ 2 files changed, 64 insertions(+) commit e23d4192bf9b612bce5b24f22719fd3cc6edaa69 Author: Thomas Gleixner Date: Fri Nov 25 00:26:28 2022 +0100 genirq/msi: Provide constants for PCI/IMS support Provide the necessary constants for PCI/IMS support: - A new bus token for MSI irqdomain identification - A MSI feature flag for the MSI irqdomains to signal support - A secondary domain id The latter expands the device internal domain pointer storage array from 1 to 2 entries. That extra pointer is mostly unused today, but the alternative solutions would not be free either and would introduce more complexity all over the place. Trade the 8bytes for simplicity. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.846169830@linutronix.de include/linux/irqdomain_defs.h | 1 + include/linux/msi.h | 2 ++ include/linux/msi_api.h | 1 + 3 files changed, 4 insertions(+) commit 486254ad967dbef37fd797dd296fe69b465aa0f9 Author: Thomas Gleixner Date: Fri Nov 25 00:26:26 2022 +0100 x86/apic/msi: Enable MSI_FLAG_PCI_MSIX_ALLOC_DYN x86 MSI irqdomains can handle MSI-X allocation post MSI-X enable just out of the box - on the vector domain and on the remapping domains, Add the feature flag to the supported feature list Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.787373104@linutronix.de arch/x86/include/asm/msi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34026364df8eca05ee32e706a2c014511a19af02 Author: Thomas Gleixner Date: Fri Nov 25 00:26:24 2022 +0100 PCI/MSI: Provide post-enable dynamic allocation interfaces for MSI-X MSI-X vectors can be allocated after the initial MSI-X enablement, but this needs explicit support of the underlying interrupt domains. Provide a function to query the ability and functions to allocate/free individual vectors post-enable. The allocation can either request a specific index in the MSI-X table or with the index argument MSI_ANY_INDEX it allocates the next free vector. The return value is a struct msi_map which on success contains both index and the Linux interrupt number. In case of failure index is negative and the Linux interrupt number is 0. The allocation function is for a single MSI-X index at a time as that's sufficient for the most urgent use case VFIO to get rid of the 'disable MSI-X, reallocate, enable-MSI-X' cycle which is prone to lost interrupts and redirections to the legacy and obviously unhandled INTx. As single index allocation is also sufficient for the use cases Jason Gunthorpe pointed out: Allocation of a MSI-X or IMS vector for a network queue. See Link below. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Bjorn Helgaas Acked-by: Marc Zyngier Link: https://lore.kernel.org/all/20211126232735.547996838@linutronix.de Link: https://lore.kernel.org/r/20221124232326.731233614@linutronix.de drivers/pci/msi/api.c | 67 +++++++++++++++++++++++++++++++++++++++++++++ drivers/pci/msi/irqdomain.c | 3 +- include/linux/pci.h | 6 ++++ 3 files changed, 75 insertions(+), 1 deletion(-) commit 73bd063ca03493f44e0700cc08824093da9741bc Author: Thomas Gleixner Date: Fri Nov 25 00:26:23 2022 +0100 PCI/MSI: Provide prepare_desc() MSI domain op The setup of MSI descriptors for PCI/MSI-X interrupts depends partially on the MSI index for which the descriptor is initialized. Dynamic MSI-X vector allocation post MSI-X enablement allows to allocate vectors at a given index or at any free index in the available table range. The latter requires that the descriptor is initialized after the MSI core has chosen an index. Implement the prepare_desc() op in the PCI/MSI-X specific msi_domain_ops which is invoked before the core interrupt descriptor and the associated Linux interrupt number is allocated. That callback is also provided for the upcoming PCI/IMS implementations so the implementation specific interrupt domain can do their domain specific initialization of the MSI descriptors. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Bjorn Helgaas Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.673658806@linutronix.de drivers/pci/msi/irqdomain.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 612ad43330d98f800f3784d68e7d8ab66d17a512 Author: Thomas Gleixner Date: Fri Nov 25 00:26:21 2022 +0100 PCI/MSI: Split MSI-X descriptor setup The upcoming mechanism to allocate MSI-X vectors after enabling MSI-X needs to share some of the MSI-X descriptor setup. The regular descriptor setup on enable has the following code flow: 1) Allocate descriptor 2) Setup descriptor with PCI specific data 3) Insert descriptor 4) Allocate interrupts which in turn scans the inserted descriptors This cannot be easily changed because the PCI/MSI code needs to handle the legacy architecture specific allocation model and the irq domain model where quite some domains have the assumption that the above flow is how it works. Ideally the code flow should look like this: 1) Invoke allocation at the MSI core 2) MSI core allocates descriptor 3) MSI core calls back into the irq domain which fills in the domain specific parts This could be done for underlying parent MSI domains which support post-enable allocation/free but that would create significantly different code pathes for MSI/MSI-X enable. Though for dynamic allocation which wants to share the allocation code with the upcoming PCI/IMS support it's the right thing to do. Split the MSI-X descriptor setup into the preallocation part which just sets the index and fills in the horrible hack of virtual IRQs and the real PCI specific MSI-X setup part which solely depends on the index in the descriptor. This allows to provide a common dynamic allocation interface at the MSI core level for both PCI/MSI-X and PCI/IMS. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Bjorn Helgaas Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.616292598@linutronix.de drivers/pci/msi/msi.c | 72 ++++++++++++++++++++++++++++++++------------------- drivers/pci/msi/msi.h | 2 ++ 2 files changed, 47 insertions(+), 27 deletions(-) commit b834e3c08fc6c4460c2bce6575cba4705f6301e3 Author: Thomas Gleixner Date: Fri Nov 25 00:26:20 2022 +0100 genirq/msi: Provide MSI_FLAG_MSIX_ALLOC_DYN Provide a new MSI feature flag in preparation for dynamic MSIX allocation after the initial MSI-X enable has been done. This needs to be an explicit MSI interrupt domain feature because quite some implementations (both interrupt domains and legacy allocation mode) have clear expectations that the allocation code is only invoked when MSI-X is about to be enabled. They either talk to hypervisors or do some other work and are not prepared to be invoked on an already MSI-X enabled device. This is also explicit MSI-X only because rewriting the size of the MSI entries is only possible when disabling MSI which in turn might cause lost interrupts on the device. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.558843119@linutronix.de include/linux/msi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3d393b21740bffbeeae7d4fa534a6b16c3e3e832 Author: Thomas Gleixner Date: Fri Nov 25 00:26:18 2022 +0100 genirq/msi: Provide msi_domain_alloc_irq_at() For supporting post MSI-X enable allocations and for the upcoming PCI/IMS support a separate interface is required which allows not only the allocation of a specific index, but also the allocation of any, i.e. the next free index. The latter is especially required for IMS because IMS completely does away with index to functionality mappings which are often found in MSI/MSI-X implementation. But even with MSI-X there are devices where only the first few indices have a fixed functionality and the rest is freely assignable by software, e.g. to queues. msi_domain_alloc_irq_at() is also different from the range based interfaces as it always enforces that the MSI descriptor is allocated by the core code and not preallocated by the caller like the PCI/MSI[-X] enable code path does. msi_domain_alloc_irq_at() can be invoked with the index argument set to MSI_ANY_INDEX which makes the core code pick the next free index. The irq domain can provide a prepare_desc() operation callback in it's msi_domain_ops to do domain specific post allocation initialization before the actual Linux interrupt and the associated interrupt descriptor and hierarchy alloccations are conducted. The function also takes an optional @icookie argument which is of type union msi_instance_cookie. This cookie is not used by the core code and is stored in the allocated msi_desc::data::icookie. The meaning of the cookie is completely implementation defined. In case of IMS this might be a PASID or a pointer to a device queue, but for the MSI core it's opaque and not used in any way. The function returns a struct msi_map which on success contains the allocated index number and the Linux interrupt number so the caller can spare the index to Linux interrupt number lookup. On failure map::index contains the error code and map::virq is 0. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.501359457@linutronix.de include/linux/msi.h | 4 ++ include/linux/msi_api.h | 7 ++++ kernel/irq/msi.c | 105 +++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 106 insertions(+), 10 deletions(-) commit 8f986fd7755bec8b8c5776824afa1bd1151986d9 Author: Thomas Gleixner Date: Fri Nov 25 00:26:16 2022 +0100 genirq/msi: Provide msi_domain_ops:: Prepare_desc() The existing MSI domain ops msi_prepare() and set_desc() turned out to be unsuitable for implementing IMS support. msi_prepare() does not operate on the MSI descriptors. set_desc() lacks an irq_domain pointer and has a completely different purpose. Introduce a prepare_desc() op which allows IMS implementations to amend an MSI descriptor which was allocated by the core code, e.g. by adjusting the iomem base or adding some data based on the allocated index. This is way better than requiring that all IMS domain implementations preallocate the MSI descriptor and then allocate the interrupt. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.444560717@linutronix.de include/linux/msi.h | 6 +++++- kernel/irq/msi.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) commit efd42049657e958797a483f793e4064042faa49c Author: Thomas Gleixner Date: Fri Nov 25 00:26:15 2022 +0100 genirq/msi: Provide msi_desc:: Msi_data The upcoming support for PCI/IMS requires to store some information related to the message handling in the MSI descriptor, e.g. PASID or a pointer to a queue. Provide a generic storage struct which maps over the existing PCI specific storage which means the size of struct msi_desc is not getting bigger. This storage struct has two elements: 1) msi_domain_cookie 2) msi_instance_cookie The domain cookie is going to be used to store domain specific information, e.g. iobase pointer, data pointer. The instance cookie is going to be handed in when allocating an interrupt on an IMS domain so the irq chip callbacks of the IMS domain have the necessary per vector information available. It also comes in handy when cleaning up the platform MSI code for wire to MSI bridges which need to hand down the type information to the underlying interrupt domain. For the core code the cookies are opaque and meaningless. It just stores the instance cookie during an allocation through the upcoming interfaces for IMS and wire to MSI brigdes. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.385036043@linutronix.de include/linux/msi.h | 38 +++++++++++++++++++++++++++++++++++++- include/linux/msi_api.h | 17 +++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) commit 06bff9e347271566e8dd79e7c3eb971660209a00 Author: Thomas Gleixner Date: Fri Nov 25 00:26:13 2022 +0100 genirq/msi: Provide struct msi_map A simple struct to hold a MSI index / Linux interrupt number pair. It will be returned from the dynamic vector allocation function and handed back to the corresponding free() function. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.326410494@linutronix.de include/linux/msi_api.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4d5a4ccc519ab0a62e220dc8dcd8bc1c5f8fee10 Author: Thomas Gleixner Date: Fri Nov 25 00:26:12 2022 +0100 x86/apic/msi: Remove arch_create_remap_msi_irq_domain() and related code which is not longer required now that the interrupt remap code has been converted to MSI parent domains. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.267353814@linutronix.de arch/x86/include/asm/irq_remapping.h | 4 ---- arch/x86/kernel/apic/msi.c | 42 +----------------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) commit cc7594ffadde77e2825faf1c576230530c829bc3 Author: Thomas Gleixner Date: Fri Nov 25 00:26:10 2022 +0100 iommu/amd: Switch to MSI base domains Remove the global PCI/MSI irqdomain implementation and provide the required MSI parent ops so the PCI/MSI code can detect the new parent and setup per device domains. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.209212272@linutronix.de arch/x86/kernel/apic/msi.c | 1 + drivers/iommu/amd/amd_iommu_types.h | 1 - drivers/iommu/amd/iommu.c | 19 +++++++++++++------ include/linux/irqdomain_defs.h | 1 + 4 files changed, 15 insertions(+), 7 deletions(-) commit 9a945234abea27d45f8d89e1a1b35ab5bf41dd01 Author: Thomas Gleixner Date: Fri Nov 25 00:26:08 2022 +0100 iommu/vt-d: Switch to MSI parent domains Remove the global PCI/MSI irqdomain implementation and provide the required MSI parent ops so the PCI/MSI code can detect the new parent and setup per device domains. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.151226317@linutronix.de arch/x86/kernel/apic/msi.c | 2 ++ drivers/iommu/intel/iommu.h | 1 - drivers/iommu/intel/irq_remapping.c | 27 ++++++++++++--------------- include/linux/irqdomain_defs.h | 1 + 4 files changed, 15 insertions(+), 16 deletions(-) commit 45c0402457c1ed2f07ee32dc129ae710e0dc288c Author: Thomas Gleixner Date: Fri Nov 25 00:26:07 2022 +0100 PCI/MSI: Remove unused pci_dev_has_special_msi_domain() The check for special MSI domains like VMD which prevents the interrupt remapping code to overwrite device::msi::domain is not longer required and has been replaced by an x86 specific version which is aware of MSI parent domains. Remove it. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Bjorn Helgaas Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.093093200@linutronix.de drivers/pci/msi/irqdomain.c | 21 --------------------- include/linux/msi.h | 1 - 2 files changed, 22 deletions(-) commit b6d5fc3a5245c65f7c83440460a1566d09cc9038 Author: Thomas Gleixner Date: Fri Nov 25 00:26:05 2022 +0100 x86/apic/vector: Provide MSI parent domain Enable MSI parent domain support in the x86 vector domain and fixup the checks in the iommu implementations to check whether device::msi::domain is the default MSI parent domain. That keeps the existing logic to protect e.g. devices behind VMD working. The interrupt remap PCI/MSI code still works because the underlying vector domain still provides the same functionality. None of the other x86 PCI/MSI, e.g. XEN and HyperV, implementations are affected either. They still work the same way both at the low level and the PCI/MSI implementations they provide. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.034672592@linutronix.de arch/x86/include/asm/msi.h | 6 ++ arch/x86/include/asm/pci.h | 1 + arch/x86/kernel/apic/msi.c | 176 ++++++++++++++++++++++++++---------- drivers/iommu/amd/iommu.c | 2 +- drivers/iommu/intel/irq_remapping.c | 2 +- 5 files changed, 138 insertions(+), 49 deletions(-) commit 15c72f824b32761696b1854500bb3dedccbbb45a Author: Thomas Gleixner Date: Fri Nov 25 00:26:04 2022 +0100 PCI/MSI: Add support for per device MSI[X] domains Provide a template and the necessary callbacks to create PCI/MSI and PCI/MSI-X domains. The domains are created when MSI or MSI-X is enabled. The domain's lifetime is either the device lifetime or in case that e.g. MSI-X was tried first and failed, then the MSI-X domain is removed and a MSI domain is created as both are mutually exclusive and reside in the default domain ID slot of the per device domain pointer array. Also expand pci_msi_domain_supports() to handle feature checks correctly even in the case that the per device domain was not yet created by checking the features supported by the MSI parent. Add the necessary setup calls into the MSI and MSI-X enable code path. These setup calls are backwards compatible. They return success when there is no parent domain found, which means the existing global domains or the legacy allocation path keep just working. Co-developed-by: Ahmed S. Darwish Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Bjorn Helgaas Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.975388241@linutronix.de drivers/pci/msi/irqdomain.c | 188 +++++++++++++++++++++++++++++++++++++++++++- drivers/pci/msi/msi.c | 16 +++- drivers/pci/msi/msi.h | 2 + 3 files changed, 201 insertions(+), 5 deletions(-) commit bd141a3db40c877e01de8e981edb57c03199d876 Author: Thomas Gleixner Date: Fri Nov 25 00:26:02 2022 +0100 genirq/msi: Provide BUS_DEVICE_PCI_MSI[X] Provide new bus tokens for the upcoming per device PCI/MSI and PCI/MSIX interrupt domains. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.917219885@linutronix.de include/linux/irqdomain_defs.h | 2 ++ kernel/irq/msi.c | 4 ++++ 2 files changed, 6 insertions(+) commit 877d6c4e93f5091bfa52549bde8fb9ce71d6f7e5 Author: Thomas Gleixner Date: Fri Nov 25 00:26:00 2022 +0100 PCI/MSI: Split __pci_write_msi_msg() The upcoming per device MSI domains will create different domains for MSI and MSI-X. Split the write message function into MSI and MSI-X helpers so they can be used by those new domain functions seperately. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Bjorn Helgaas Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.857982142@linutronix.de drivers/pci/msi/msi.c | 104 ++++++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 50 deletions(-) commit 36db3d9003ea85217b357a658cf7b37920c2c38e Author: Thomas Gleixner Date: Fri Nov 25 00:25:59 2022 +0100 genirq/msi: Add range checking to msi_insert_desc() Per device domains provide the real domain size to the core code. This allows range checking on insertion of MSI descriptors and also paves the way for dynamic index allocations which are required e.g. for IMS. This avoids external mechanisms like bitmaps on the device side and just utilizes the core internal MSI descriptor storxe for it. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.798556374@linutronix.de kernel/irq/msi.c | 53 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 10 deletions(-) commit 4ec3c19d058f7391ec631b8a1b0a690422b246a9 Author: Andreas Gruenbacher Date: Sat Nov 5 17:12:34 2022 +0100 gfs2: Handle -EBUSY result of insert_inode_locked4 When creating a new inode, there is a small chance that an inode lookup for a previous version of the same inode is still in progress. In that case, that previous lookup will eventually fail, but we may still need to retry here. Signed-off-by: Andreas Gruenbacher fs/gfs2/inode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1f0067c6e9be3ef30fca18c409c61565bffc0407 Author: Abel Vesa Date: Wed Nov 16 13:31:28 2022 +0200 dt-bindings: soc: qcom: aoss: Add compatible for SM8550 Document the compatible for SM8550. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116113128.2655441-1-abel.vesa@linaro.org Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml | 1 + 1 file changed, 1 insertion(+) commit 8c045cd21644a0acc815d3108018a8b6fd474804 Author: Abel Vesa Date: Wed Nov 16 13:30:05 2022 +0200 soc: qcom: llcc: Add configuration data for SM8550 Add LLCC configuration data for SM8550 SoC. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116113005.2653284-4-abel.vesa@linaro.org drivers/soc/qcom/llcc-qcom.c | 41 ++++++++++++++++++++++++++++++++++++++ include/linux/soc/qcom/llcc-qcom.h | 12 +++++++++++ 2 files changed, 53 insertions(+) commit bbfdc82696e0aa76e9b31cb6c593ff0f96af9c30 Author: Abel Vesa Date: Wed Nov 16 13:30:04 2022 +0200 dt-bindings: arm: msm: Add LLCC compatible for SM8550 Add LLCC compatible for SM8550 SoC. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116113005.2653284-3-abel.vesa@linaro.org Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml | 1 + 1 file changed, 1 insertion(+) commit c72ca343f911c3ba1b10163399f891ddb86ad109 Author: Abel Vesa Date: Wed Nov 16 13:30:03 2022 +0200 soc: qcom: llcc: Add v4.1 HW version support The LLCC found in SM8550 supports more slice configuration knobs and HW block version has been bumped up to 4.1. Add support for the new version and make sure the new config values are programed on probe. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116113005.2653284-2-abel.vesa@linaro.org drivers/soc/qcom/llcc-qcom.c | 125 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 118 insertions(+), 7 deletions(-) commit 147f6534b8ffdd766c2fd3a28b0b1d6fd41c81e4 Author: Abel Vesa Date: Wed Nov 16 13:24:38 2022 +0200 soc: qcom: socinfo: Add SM8550 ID Add the ID for the Qualcomm SM8550 SoC. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116112438.2643607-1-abel.vesa@linaro.org drivers/soc/qcom/socinfo.c | 1 + include/dt-bindings/arm/qcom,ids.h | 1 + 2 files changed, 2 insertions(+) commit 323dc2dcdb503323097855174908b52d84477760 Author: Abel Vesa Date: Wed Nov 16 13:22:46 2022 +0200 soc: qcom: rpmh-rsc: Avoid unnecessary checks on irq-done response The RSC interrupt is issued only after the request is complete. For fire-n-forget requests, the irq-done interrupt is sent after issuing the RPMH request and for response-required request, the interrupt is triggered only after all the requests are complete. These unnecessary checks in the interrupt handler issues AHB reads from a critical path. Lets remove them and clean up error handling in rpmh_request data structures. Co-developed-by: Lina Iyer Signed-off-by: Lina Iyer Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116112246.2640648-2-abel.vesa@linaro.org drivers/soc/qcom/rpmh-internal.h | 4 +--- drivers/soc/qcom/rpmh-rsc.c | 22 +++------------------- drivers/soc/qcom/rpmh.c | 10 ++-------- drivers/soc/qcom/trace-rpmh.h | 11 ++++------- 4 files changed, 10 insertions(+), 37 deletions(-) commit 40482e4f73640dcf7bebcb503f034828b998c39c Author: Abel Vesa Date: Wed Nov 16 13:22:45 2022 +0200 soc: qcom: rpmh-rsc: Add support for RSC v3 register offsets The SM8550 RSC has a new set of register offsets due to its version bump. So read the version from HW and use the proper register offsets based on that. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116112246.2640648-1-abel.vesa@linaro.org drivers/soc/qcom/rpmh-internal.h | 7 ++ drivers/soc/qcom/rpmh-rsc.c | 161 +++++++++++++++++++++++++-------------- 2 files changed, 110 insertions(+), 58 deletions(-) commit d1d9d62bd484279511c08c8db07602f130a43ad9 Author: Abel Vesa Date: Wed Nov 16 13:17:45 2022 +0200 soc: qcom: rpmhpd: Add SM8550 power domains Add the power domains exposed by RPMH in the Qualcomm SM8550 platform. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116111745.2633074-3-abel.vesa@linaro.org drivers/soc/qcom/rpmhpd.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit f0f4727a12e4a2e8d1ab788abbfa357994f5d681 Author: Abel Vesa Date: Wed Nov 16 13:17:44 2022 +0200 dt-bindings: power: rpmpd: Add SM8550 to rpmpd binding Add compatible and constants for the power domains exposed by the RPMH in the Qualcomm SM8550 platform. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116111745.2633074-2-abel.vesa@linaro.org Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 + include/dt-bindings/power/qcom-rpmpd.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) commit 58311858a36bc6090ce5a6c38ddb694617bf94e2 Author: Konrad Dybcio Date: Mon Nov 14 10:56:51 2022 +0100 dt-bindings: arm: qcom: Add Xperia 5 IV (PDX224) Add a compatible for Sony Xperia 5 IV. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114095654.34561-1-konrad.dybcio@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit 05c0c38dc752eb9244e53d72ce1030f36153daf8 Author: Marijn Suijten Date: Fri Nov 11 13:01:53 2022 +0100 dt-bindings: arm: qcom: Document msm8956 and msm8976 SoC and devices Note that msm8976 is omitted as a compatible, since there are currently no boards/devices using it. Signed-off-by: Marijn Suijten Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111120156.48040-9-angelogioacchino.delregno@collabora.com Documentation/devicetree/bindings/arm/qcom.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit eea3e8b74aa1648fc96b739458d067a6e498c302 Author: Kemeng Shi Date: Mon Dec 5 19:57:09 2022 +0800 blk-throttle: Use more suitable time_after check for update of slice_start There is no need to update tg->slice_start[rw] to start when they are equal already. So remove "eq" part of check before update slice_start. Acked-by: Tejun Heo Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20221205115709.251489-10-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe block/blk-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c9f209d9d81ea67cd84f53f470a592c252d845d Author: Kemeng Shi Date: Mon Dec 5 19:57:08 2022 +0800 blk-throttle: remove repeat check of elapsed time There is no need to check elapsed time from last upgrade for each node in hierarchy. Move this check before traversing as throtl_can_upgrade do to remove repeat check. Reported-by: kernel test robot Acked-by: Tejun Heo Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20221205115709.251489-9-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe block/blk-throttle.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e3031d4c7d2c5bff6b5944d61d4e31319739d216 Author: Kemeng Shi Date: Mon Dec 5 19:57:07 2022 +0800 blk-throttle: remove incorrect comment for tg_last_low_overflow_time Function tg_last_low_overflow_time is called with intermediate node as following: throtl_hierarchy_can_downgrade throtl_tg_can_downgrade tg_last_low_overflow_time throtl_hierarchy_can_upgrade throtl_tg_can_upgrade tg_last_low_overflow_time throtl_hierarchy_can_downgrade/throtl_hierarchy_can_upgrade will traverse from leaf node to sub-root node and pass traversed intermediate node to tg_last_low_overflow_time. No such limit could be found from context and implementation of tg_last_low_overflow_time, so remove this limit in comment. Acked-by: Tejun Heo Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20221205115709.251489-8-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe block/blk-throttle.c | 1 - 1 file changed, 1 deletion(-) commit 009df341714c6c20a44dd9268681a8bff10bb050 Author: Kemeng Shi Date: Mon Dec 5 19:57:06 2022 +0800 blk-throttle: fix typo in comment of throtl_adjusted_limit lapsed time -> elapsed time Acked-by: Tejun Heo Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20221205115709.251489-7-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe block/blk-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4d508e333829a8394e59efa06ce56e51f3e2b29 Author: Kemeng Shi Date: Mon Dec 5 19:57:05 2022 +0800 blk-throttle: simpfy low limit reached check in throtl_tg_can_upgrade Commit c79892c557616 ("blk-throttle: add upgrade logic for LIMIT_LOW state") added upgrade logic for low limit and methioned that 1. "To determine if a cgroup exceeds its limitation, we check if the cgroup has pending request. Since cgroup is throttled according to the limit, pending request means the cgroup reaches the limit." 2. "If a cgroup has limit set for both read and write, we consider the combination of them for upgrade. The reason is read IO and write IO can interfere with each other. If we do the upgrade based in one direction IO, the other direction IO could be severly harmed." Besides, we also determine that cgroup reaches low limit if low limit is 0, see comment in throtl_tg_can_upgrade. Collect the information above, the desgin of upgrade check is as following: 1.The low limit is reached if limit is zero or io is already queued. 2.Cgroup will pass upgrade check if low limits of READ and WRITE are both reached. Simpfy the check code described above to removce repeat check and improve readability. There is no functional change. Detail equivalence proof is as following: All replaced conditions to return true are as following: condition 1 (!read_limit && !write_limit) condition 2 read_limit && sq->nr_queued[READ] && (!write_limit || sq->nr_queued[WRITE]) condition 3 write_limit && sq->nr_queued[WRITE] && (!read_limit || sq->nr_queued[READ]) Transferring condition 2 as following: (read_limit && sq->nr_queued[READ]) && (!write_limit || sq->nr_queued[WRITE]) is equivalent to (read_limit && sq->nr_queued[READ]) && (!write_limit || (write_limit && sq->nr_queued[WRITE])) is equivalent to condition 2.1 (read_limit && sq->nr_queued[READ] && !write_limit) || condition 2.2 (read_limit && sq->nr_queued[READ] && (write_limit && sq->nr_queued[WRITE])) Transferring condition 3 as following: write_limit && sq->nr_queued[WRITE] && (!read_limit || sq->nr_queued[READ]) is equivalent to (write_limit && sq->nr_queued[WRITE]) && (!read_limit || (read_limit && sq->nr_queued[READ])) is equivalent to condition 3.1 ((write_limit && sq->nr_queued[WRITE]) && !read_limit) || condition 3.2 ((write_limit && sq->nr_queued[WRITE]) && (read_limit && sq->nr_queued[READ])) Condition 3.2 is the same as condition 2.2, so all conditions we get to return are as following: (!read_limit && !write_limit) (1) (!read_limit && (write_limit && sq->nr_queued[WRITE])) (3.1) ((read_limit && sq->nr_queued[READ]) && !write_limit) (2.1) ((write_limit && sq->nr_queued[WRITE]) && (read_limit && sq->nr_queued[READ])) (2.2) As we can extract conditions "(a1 || a2) && (b1 || b2)" to: a1 && b1 a1 && b2 a2 && b1 ab && b2 Considering that: a1 = !read_limit a2 = read_limit && sq->nr_queued[READ] b1 = !write_limit b2 = write_limit && sq->nr_queued[WRITE] We can pack replaced conditions to (!read_limit || (read_limit && sq->nr_queued[READ])) && (!write_limit || (write_limit && sq->nr_queued[WRITE])) which is equivalent to (!read_limit || sq->nr_queued[READ]) && (!write_limit || sq->nr_queued[WRITE]) Reported-by: kernel test robot Acked-by: Tejun Heo Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20221205115709.251489-6-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe block/blk-throttle.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit de320c07da3d0e464d0e029c90ae05e810454afe Author: AngeloGioacchino Del Regno Date: Fri Nov 11 13:01:52 2022 +0100 soc: qcom: socinfo: Add MSM8956/76 SoC IDs to the soc_id table Add SoC ID table entries for MSM8956 and MSM8976 chips. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111120156.48040-8-angelogioacchino.delregno@collabora.com drivers/soc/qcom/socinfo.c | 2 ++ 1 file changed, 2 insertions(+) commit 484d7b407552a0241087858fd9ff0f117f13344d Author: AngeloGioacchino Del Regno Date: Fri Nov 11 13:01:51 2022 +0100 dt-bindings: arm: qcom,ids: Add SoC IDs for MSM8956 and MSM8976 Document the identifier of MSM8956/76. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111120156.48040-7-angelogioacchino.delregno@collabora.com include/dt-bindings/arm/qcom,ids.h | 2 ++ 1 file changed, 2 insertions(+) commit 183daeb11de871b073515d14ec1e3bc0da79e038 Author: Kemeng Shi Date: Mon Dec 5 19:57:04 2022 +0800 blk-throttle: correct calculation of wait time in tg_may_dispatch In C language, When executing "if (expression1 && expression2)" and expression1 return false, the expression2 may not be executed. For "tg_within_bps_limit(tg, bio, bps_limit, &bps_wait) && tg_within_iops_limit(tg, bio, iops_limit, &iops_wait))", if bps is limited, tg_within_bps_limit will return false and tg_within_iops_limit will not be called. So even bps and iops are both limited, iops_wait will not be calculated and is always zero. So wait time of iops is always ignored. Fix this by always calling tg_within_bps_limit and tg_within_iops_limit to get wait time for both bps and iops. Observed that: 1. Wait time in tg_within_iops_limit/tg_within_bps_limit need always be stored as wait argument is always passed. 2. wait time is stored to zero if iops/bps is limited otherwise non-zero is stored. Simpfy tg_within_iops_limit/tg_within_bps_limit by removing wait argument and return wait time directly. Caller tg_may_dispatch checks if wait time is zero to find if iops/bps is limited. Acked-by: Tejun Heo Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20221205115709.251489-5-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe block/blk-throttle.c | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) commit eb184791821409c37fef4f67638bb56bdaa82900 Author: Kemeng Shi Date: Mon Dec 5 19:57:03 2022 +0800 blk-throttle: ignore cgroup without io queued in blk_throtl_cancel_bios Ignore cgroup without io queued in blk_throtl_cancel_bios for two reasons: 1. Save cpu cycle for trying to dispatch cgroup which is no io queued. 2. Avoid non-consistent state that cgroup is inserted to service queue without THROTL_TG_PENDING set as tg_update_disptime will unconditional re-insert cgroup to service queue. If we are on the default hierarchy, IO dispatched from child in tg_dispatch_one_bio will trigger inserting cgroup to service queue without erase first and ruin the tree. Acked-by: Tejun Heo Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20221205115709.251489-4-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe block/blk-throttle.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 84aca0a7e039c8735abc0f89f3f48e9006c0dfc7 Author: Kemeng Shi Date: Mon Dec 5 19:57:02 2022 +0800 blk-throttle: Fix that bps of child could exceed bps limited in parent Consider situation as following (on the default hierarchy): HDD | root (bps limit: 4k) | child (bps limit :8k) | fio bs=8k Rate of fio is supposed to be 4k, but result is 8k. Reason is as following: Size of single IO from fio is larger than bytes allowed in one throtl_slice in child, so IOs are always queued in child group first. When queued IOs in child are dispatched to parent group, BIO_BPS_THROTTLED is set and these IOs will not be limited by tg_within_bps_limit anymore. Fix this by only set BIO_BPS_THROTTLED when the bio traversed the entire tree. There patch has no influence on situation which is not on the default hierarchy as each group is a single root group without parent. Acked-by: Tejun Heo Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20221205115709.251489-3-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe block/blk-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f56019aef353576f43f945fdd065858145090582 Author: Kemeng Shi Date: Mon Dec 5 19:57:01 2022 +0800 blk-throttle: correct stale comment in throtl_pd_init On the default hierarchy (cgroup2), the throttle interface files don't exist in the root cgroup, so the ablity to limit the whole system by configuring root group is not existing anymore. In general, cgroup doesn't wanna be in the business of restricting resources at the system level, so correct the stale comment that we can limit whole system to we can only limit subtree. Acked-by: Tejun Heo Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20221205115709.251489-2-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe block/blk-throttle.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 878b2de67af7095ddd35da859a9ef8db15a36163 Author: Dan Williams Date: Mon Dec 5 11:44:41 2022 -0800 tools/testing/cxl: Require cache invalidation bypass The typical environment where cxl_test is run, QEMU, does not support cpu_cache_invalidate_memregion(). Add the 'test' bypass symbols to the configuration check. Reported-by: Alison Schofield Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/167026948179.3527561.4535373655515827457.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams tools/testing/cxl/config_check.c | 2 ++ 1 file changed, 2 insertions(+) commit 14628aec8415e4847ae7e470b175412896716cd8 Author: Alison Schofield Date: Sun Dec 4 16:29:51 2022 -0800 cxl/acpi: Fail decoder add if CXIMS for HBIG is missing The BIOS provided CXIMS (CXL XOR Interleave Math Structure) is required for calculating a targets position in an interleave list during region creation. The CXL driver expects to discover a CXIMS that matches the HBIG (Host Bridge Interleave Granularity) and stores the xormaps found in that CXIMS for retrieval during region creation. If there is no CXIMS for an HBIG, no maps are stored. That leads to a NULL pointer dereference at xormap retrieval during region creation. Add a check during ACPI probe for the case of no matching CXIMS. Emit an error message and fail to add the decoder. Fixes: f9db85bfec0d ("cxl/acpi: Support CXL XOR Interleave Math (CXIMS)") Suggested-by: Dan Williams Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20221205002951.1788783-1-alison.schofield@intel.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 5 +++++ 1 file changed, 5 insertions(+) commit cb4cdf74bd77af187085ab9d73ab9fd88283e3dc Author: Colin Ian King Date: Mon Dec 5 09:18:19 2022 +0000 cxl/region: Fix spelling mistake "memergion" -> "memregion" There is a spelling mistake in a dev_warn message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221205091819.1943564-1-colin.i.king@gmail.com Signed-off-by: Dan Williams drivers/cxl/core/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 397cd265815eae562685d9832dc8b61c927c1cfb Author: Dan Williams Date: Sat Dec 3 09:14:41 2022 -0800 cxl/regs: Fix sparse warning The 0day robot belatedly points out that @addr is not properly tagged as an iomap pointer: "drivers/cxl/core/regs.c:332:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@" Fixes: 1168271ca054 ("cxl/acpi: Extract component registers of restricted hosts from RCRB") Reported-by: kernel test robot Reviewed-by: Robert Richter Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/167008768190.2516013.11918622906007677341.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02fedf1466567424c336cd11cf368dcf78f2af33 Merge: e0f6fa0d425f 7a7e6edfca85 Author: Dan Williams Date: Mon Dec 5 12:32:11 2022 -0800 Merge branch 'for-6.2/cxl-xor' into for-6.2/cxl Pick up support for "XOR" interleave math when parsing ACPI CFMWS window structures. Fix up conflicts with the RCH emulation already pending in cxl/next. commit e0f6fa0d425f745a887e640be66e22b45451e169 Merge: 95dddcb5e863 6155ccc9ddf6 Author: Dan Williams Date: Mon Dec 5 12:31:30 2022 -0800 Merge branch 'for-6.2/cxl-aer' into for-6.2/cxl Pick up CXL AER handling and correctable error extensions. Resolve conflicts with cxl_pmem_wq reworks and RCH support. commit 95dddcb5e86381abddeb1ccab5b5826fdcc74c70 Merge: da8380bbbe90 d18bc74aced6 Author: Dan Williams Date: Mon Dec 5 12:30:38 2022 -0800 Merge branch 'for-6.2/cxl-security' into for-6.2/cxl Pick CXL PMEM security commands for v6.2. Resolve conflicts with the removal of the cxl_pmem_wq. commit be1b670f61443aa5d0d01782e9b8ea0ee825d018 Author: Ashok Raj Date: Tue Nov 29 13:08:27 2022 -0800 x86/microcode/intel: Do not retry microcode reloading on the APs The retries in load_ucode_intel_ap() were in place to support systems with mixed steppings. Mixed steppings are no longer supported and there is only one microcode image at a time. Any retries will simply reattempt to apply the same image over and over without making progress. [ bp: Zap the circumstantial reasoning from the commit message. ] Fixes: 06b8534cb728 ("x86/microcode: Rework microcode loading") Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221129210832.107850-3-ashok.raj@intel.com arch/x86/kernel/cpu/microcode/intel.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit ce3895735cc26957dc6b2a8f5af07ddab09483ae Author: Alex Williamson Date: Fri Dec 2 09:46:15 2022 -0700 vfio/ap/ccw/samples: Fix device_register() unwind path We always need to call put_device() if device_register() fails. All vfio drivers calling device_register() include a similar unwind stack via gotos, therefore split device_unregister() into its device_del() and put_device() components in the unwind path, and add a goto target to handle only the put_device() requirement. Reported-by: Ruan Jinjie Link: https://lore.kernel.org/all/20221118032827.3725190-1-ruanjinjie@huawei.com Fixes: d61fc96f47fd ("sample: vfio mdev display - host device") Fixes: 9d1a546c53b4 ("docs: Sample driver to demonstrate how to use Mediated device framework.") Fixes: a5e6e6505f38 ("sample: vfio bochs vbe display (host device for bochs-drm)") Fixes: 9e6f07cd1eaa ("vfio/ccw: create a parent struct") Fixes: 36360658eb5a ("s390: vfio_ap: link the vfio_ap devices to the vfio_ap bus subsystem") Cc: Tony Krowiak Cc: Halil Pasic Cc: Jason Herne Cc: Kirti Wankhede Reviewed-by: Kevin Tian Reviewed-by: Eric Farman Reviewed-by: Tony Krowiak Reviewed-by: Jason J. Herne Link: https://lore.kernel.org/r/166999942139.645727.12439756512449846442.stgit@omen Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 3 ++- drivers/s390/crypto/vfio_ap_drv.c | 2 +- samples/vfio-mdev/mbochs.c | 7 ++++--- samples/vfio-mdev/mdpy.c | 7 ++++--- samples/vfio-mdev/mtty.c | 7 ++++--- 5 files changed, 15 insertions(+), 11 deletions(-) commit d01c6ed6db38a4db2921591e4f5425bee1931aca Author: Trond Myklebust Date: Mon Dec 5 14:27:05 2022 -0500 NFS4.x/pnfs: Fix up logging of layout stateids If the layout is invalid, then just log a '0' value. Signed-off-by: Trond Myklebust fs/nfs/nfs4trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2d55709398e62cf53e5c7df3758ae52cc62d63a Author: Jason Gunthorpe Date: Mon Dec 5 11:29:20 2022 -0400 vfio: Fold vfio_virqfd.ko into vfio.ko This is only 1.8k, putting it in its own module is not really necessary. The kconfig infrastructure is still there to completely remove it for systems that are trying for small footprint. Put it in the main vfio.ko module now that kbuild can support multiple .c files. Signed-off-by: Jason Gunthorpe Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/r/5-v5-fc5346cacfd4+4c482-vfio_modules_jgg@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/Kconfig | 2 +- drivers/vfio/Makefile | 4 +--- drivers/vfio/vfio.h | 13 +++++++++++++ drivers/vfio/vfio_main.c | 7 +++++++ drivers/vfio/virqfd.c | 17 +++-------------- 5 files changed, 25 insertions(+), 18 deletions(-) commit 20601c45a0fa20bbb5545f4dd69f4f18448f4973 Author: Jason Gunthorpe Date: Mon Dec 5 11:29:19 2022 -0400 vfio: Remove CONFIG_VFIO_SPAPR_EEH We don't need a kconfig symbol for this, just directly test CONFIG_EEH in the few places that need it. Reviewed-by: Christoph Hellwig Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/4-v5-fc5346cacfd4+4c482-vfio_modules_jgg@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/Kconfig | 5 ----- drivers/vfio/pci/vfio_pci_core.c | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) commit e276e25819b8a173a21947720bb0a548c0b724b7 Author: Jason Gunthorpe Date: Mon Dec 5 11:29:18 2022 -0400 vfio: Move vfio_spapr_iommu_eeh_ioctl into vfio_iommu_spapr_tce.c As with the previous patch EEH is always enabled if SPAPR_TCE_IOMMU, so move this last bit of code into the main module. Now that this function only processes VFIO_EEH_PE_OP remove a level of indenting as well, it is only called by a case statement that already checked VFIO_EEH_PE_OP. This eliminates an unnecessary module and SPAPR code in a global header. Reviewed-by: Christoph Hellwig Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/3-v5-fc5346cacfd4+4c482-vfio_modules_jgg@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/Makefile | 1 - drivers/vfio/vfio_iommu_spapr_tce.c | 55 ++++++++++++++++++++++- drivers/vfio/vfio_spapr_eeh.c | 88 ------------------------------------- include/linux/vfio.h | 12 ----- 4 files changed, 53 insertions(+), 103 deletions(-) commit e5c38a203eb4343993e889eb69f5386f085f25ef Author: Jason Gunthorpe Date: Mon Dec 5 11:29:17 2022 -0400 vfio/spapr: Move VFIO_CHECK_EXTENSION into tce_iommu_ioctl() The PPC64 kconfig is a bit of a rats nest, but it turns out that if CONFIG_SPAPR_TCE_IOMMU is on then EEH must be too: config SPAPR_TCE_IOMMU bool "sPAPR TCE IOMMU Support" depends on PPC_POWERNV || PPC_PSERIES select IOMMU_API help Enables bits of IOMMU API required by VFIO. The iommu_ops is not implemented as it is not necessary for VFIO. config PPC_POWERNV select FORCE_PCI config PPC_PSERIES select FORCE_PCI config EEH bool depends on (PPC_POWERNV || PPC_PSERIES) && PCI default y So, just open code the call to eeh_enabled() into tce_iommu_ioctl(). Reviewed-by: Christoph Hellwig Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/2-v5-fc5346cacfd4+4c482-vfio_modules_jgg@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_spapr_tce.c | 10 ++++------ drivers/vfio/vfio_spapr_eeh.c | 6 ------ 2 files changed, 4 insertions(+), 12 deletions(-) commit 8f8bcc8c720c360885639de66fe69756febed824 Author: Jason Gunthorpe Date: Mon Dec 5 11:29:16 2022 -0400 vfio/pci: Move all the SPAPR PCI specific logic to vfio_pci_core.ko The vfio_spapr_pci_eeh_open/release() functions are one line wrappers around an arch function. Just call them directly. This eliminates some weird exported symbols that don't need to exist. Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/r/1-v5-fc5346cacfd4+4c482-vfio_modules_jgg@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci_core.c | 11 +++++++++-- drivers/vfio/vfio_spapr_eeh.c | 13 ------------- include/linux/vfio.h | 11 ----------- 3 files changed, 9 insertions(+), 26 deletions(-) commit 8e378ea10b0fd397007f7e52429c7b27f0143583 Merge: 1b41beaa7a58 85ac9c8c8eed Author: Mark Brown Date: Mon Dec 5 19:01:57 2022 +0000 ASoC: Intel: avs: Data probing and fw logging Merge series from Cezary Rojewski : The patchset focuses on debug functionality for the avs-driver. Two major blocks are covered here: data probing and AudioDSP firmware logging. Both are configured and controlled through debugfs. Data probing is a AudioDSP debug functionality which allows for gathering the actual data that is being routed to or from a module. Helps in debugging its processing capabilities - navigate to a specific module which may have caused a glitch within a pipeline (set of modules bound together). First few allow for assigning compress stream to a HDAudio stream, what is currently limited to pcm substreams only. These patches were already present on this list and reviewed in the past [1]. The next few tidy existing debug-related code up so it's ready for addition of new functionalities and make it clear which part of the avs is debug related and which is not. These also simplify the existing locking around the trace fifo. Afterward, debug-related IPCs are defined along with stub soc-component and compress DAI operations. Not much is done there as it's not a standard PCM streaming scenario. Most code found in compress operations is inherited from the HOST side of HDAudio streaming found in pcm.c file of the driver. Finally, a debugfs file operations are defined. These facilitate connecting to DSP modules from which the data shall be gathered as well as control and configuration of firmware logging. Additionally, entries are added to allow for dumping snapshots of key memory windows. commit cbc32023ddbdf4baa3d9dc513a2184a84080a5a2 Author: Li Huafei Date: Fri Nov 4 17:56:58 2022 +0800 RISC-V: kexec: Fix memory leak of elf header buffer This is reported by kmemleak detector: unreferenced object 0xff2000000403d000 (size 4096): comm "kexec", pid 146, jiffies 4294900633 (age 64.792s) hex dump (first 32 bytes): 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 .ELF............ 04 00 f3 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000566ca97c>] kmemleak_vmalloc+0x3c/0xbe [<00000000979283d8>] __vmalloc_node_range+0x3ac/0x560 [<00000000b4b3712a>] __vmalloc_node+0x56/0x62 [<00000000854f75e2>] vzalloc+0x2c/0x34 [<00000000e9a00db9>] crash_prepare_elf64_headers+0x80/0x30c [<0000000067e8bf48>] elf_kexec_load+0x3e8/0x4ec [<0000000036548e09>] kexec_image_load_default+0x40/0x4c [<0000000079fbe1b4>] sys_kexec_file_load+0x1c4/0x322 [<0000000040c62c03>] ret_from_syscall+0x0/0x2 In elf_kexec_load(), a buffer is allocated via vzalloc() to store elf headers. While it's not freed back to system when kdump kernel is reloaded or unloaded, or when image->elf_header is successfully set and then fails to load kdump kernel for some reason. Fix it by freeing the buffer in arch_kimage_file_post_load_cleanup(). Fixes: 8acea455fafa ("RISC-V: Support for kexec_file on panic") Signed-off-by: Li Huafei Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20221104095658.141222-2-lihuafei1@huawei.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/elf_kexec.c | 4 ++++ 1 file changed, 4 insertions(+) commit 96df59b1ae23f5c11698c3c2159aeb2ecd4944a4 Author: Li Huafei Date: Fri Nov 4 17:56:57 2022 +0800 RISC-V: kexec: Fix memory leak of fdt buffer This is reported by kmemleak detector: unreferenced object 0xff60000082864000 (size 9588): comm "kexec", pid 146, jiffies 4294900634 (age 64.788s) hex dump (first 32 bytes): d0 0d fe ed 00 00 12 ed 00 00 00 48 00 00 11 40 ...........H...@ 00 00 00 28 00 00 00 11 00 00 00 02 00 00 00 00 ...(............ backtrace: [<00000000f95b17c4>] kmemleak_alloc+0x34/0x3e [<00000000b9ec8e3e>] kmalloc_order+0x9c/0xc4 [<00000000a95cf02e>] kmalloc_order_trace+0x34/0xb6 [<00000000f01e68b4>] __kmalloc+0x5c2/0x62a [<000000002bd497b2>] kvmalloc_node+0x66/0xd6 [<00000000906542fa>] of_kexec_alloc_and_setup_fdt+0xa6/0x6ea [<00000000e1166bde>] elf_kexec_load+0x206/0x4ec [<0000000036548e09>] kexec_image_load_default+0x40/0x4c [<0000000079fbe1b4>] sys_kexec_file_load+0x1c4/0x322 [<0000000040c62c03>] ret_from_syscall+0x0/0x2 In elf_kexec_load(), a buffer is allocated via kvmalloc() to store fdt. While it's not freed back to system when kexec kernel is reloaded or unloaded. Then memory leak is caused. Fix it by introducing riscv specific function arch_kimage_file_post_load_cleanup(), and freeing the buffer there. Fixes: 6261586e0c91 ("RISC-V: Add kexec_file support") Signed-off-by: Li Huafei Reviewed-by: Conor Dooley Reviewed-by: Liao Chang Link: https://lore.kernel.org/r/20221104095658.141222-1-lihuafei1@huawei.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/kexec.h | 5 +++++ arch/riscv/kernel/elf_kexec.c | 10 ++++++++++ 2 files changed, 15 insertions(+) commit da8380bbbe90f69bec4be69af4d0deb7cf2bbcfe Author: Terry Bowman Date: Thu Dec 1 13:34:27 2022 -0800 cxl/acpi: Set ACPI's CXL _OSC to indicate RCD mode support ACPI uses the CXL _OSC support method to communicate the available CXL functionality to FW. The CXL _OSC support method includes a field to indicate the OS is capable of RCD mode. FW can potentially change it's operation depending on the _OSC support method reported by the OS. The ACPI driver currently only sets the ACPI _OSC support method to indicate CXL VH mode. Change the capability reported to also include CXL RCD mode. [1] CXL3.0 Table 9-26 'Interpretation of CXL _OSC Support Field' Signed-off-by: Terry Bowman [rrichter@amd.com: Reworded patch description.] Signed-off-by: Robert Richter Link: http://lore.kernel.org/r/Y4cRV/Sj0epVW7bE@rric.localdomain Link: https://lore.kernel.org/r/166993046717.1882361.10587956243041624761.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams drivers/acpi/pci_root.c | 1 + 1 file changed, 1 insertion(+) commit c9435dbee119f42132af2c3fc0382d16bda32601 Author: Dan Williams Date: Thu Dec 1 13:34:21 2022 -0800 tools/testing/cxl: Add an RCH topology In an RCH topology a CXL host-bridge as Root Complex Integrated Endpoint the represents the memory expander. Unlike a VH topology there is no CXL/PCIE Root Port that host the endpoint. The CXL subsystem maps this as the CXL root object (ACPI0017 on ACPI based systems) targeting the host-bridge as a dport, per usual, but then that dport directly hosts the endpoint port. Mock up that configuration with a 4th host-bridge that has a 'cxl_rcd' device instance as its immediate child. Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/166993046170.1882361.12460762475782283638.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Robert Richter Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams tools/testing/cxl/test/cxl.c | 150 ++++++++++++++++++++++++++++++++++++++++--- tools/testing/cxl/test/mem.c | 37 ++++++++++- 2 files changed, 176 insertions(+), 11 deletions(-) commit 0a19bfc8de93d5b5d12cf0a7bb74efc88b9ad077 Author: Dan Williams Date: Thu Dec 1 13:34:16 2022 -0800 cxl/port: Add RCD endpoint port enumeration Unlike a CXL memory expander in a VH topology that has at least one intervening 'struct cxl_port' instance between itself and the CXL root device, an RCD attaches one-level higher. For example: VH ┌──────────┐ │ ACPI0017 │ │ root0 │ └─────┬────┘ │ ┌─────┴────┐ │ dport0 │ ┌─────┤ ACPI0016 ├─────┐ │ │ port1 │ │ │ └────┬─────┘ │ │ │ │ ┌──┴───┐ ┌──┴───┐ ┌───┴──┐ │dport0│ │dport1│ │dport2│ │ RP0 │ │ RP1 │ │ RP2 │ └──────┘ └──┬───┘ └──────┘ │ ┌───┴─────┐ │endpoint0│ │ port2 │ └─────────┘ ...vs: RCH ┌──────────┐ │ ACPI0017 │ │ root0 │ └────┬─────┘ │ ┌───┴────┐ │ dport0 │ │ACPI0016│ └───┬────┘ │ ┌────┴─────┐ │endpoint0 │ │ port1 │ └──────────┘ So arrange for endpoint port in the RCH/RCD case to appear directly connected to the host-bridge in its singular role as a dport. Compare that to the VH case where the host-bridge serves a dual role as a 'cxl_dport' for the CXL root device *and* a 'cxl_port' upstream port for the Root Ports in the Root Complex that are modeled as 'cxl_dport' instances in the CXL topology. Another deviation from the VH case is that RCDs may need to look up their component registers from the Root Complex Register Block (RCRB). That platform firmware specified RCRB area is cached by the cxl_acpi driver and conveyed via the host-bridge dport to the cxl_mem driver to perform the cxl_rcrb_to_component() lookup for the endpoint port (See 9.11.8 CXL Devices Attached to an RCH for the lookup of the upstream port component registers). Tested-by: Robert Richter Link: https://lore.kernel.org/r/166993045621.1882361.1730100141527044744.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Robert Richter Reviewed-by: Jonathan Camerom Signed-off-by: Dan Williams drivers/cxl/core/port.c | 7 +++++++ drivers/cxl/cxlmem.h | 2 ++ drivers/cxl/mem.c | 33 +++++++++++++++++++++++++-------- drivers/cxl/pci.c | 10 ++++++++++ 4 files changed, 44 insertions(+), 8 deletions(-) commit 7592d935b7ae71e2b4ff93830743c39a9d13d113 Author: Dan Williams Date: Thu Dec 1 13:34:10 2022 -0800 cxl/mem: Move devm_cxl_add_endpoint() from cxl_core to cxl_mem tl;dr: Clean up an unnecessary export and enable cxl_test. An RCD (Restricted CXL Device), in contrast to a typical CXL device in a VH topology, obtains its component registers from the bottom half of the associated CXL host bridge RCRB (Root Complex Register Block). In turn this means that cxl_rcrb_to_component() needs to be called from devm_cxl_add_endpoint(). Presently devm_cxl_add_endpoint() is part of the CXL core, but the only user is the CXL mem module. Move it from cxl_core to cxl_mem to not only get rid of an unnecessary export, but to also enable its call out to cxl_rcrb_to_component(), in a subsequent patch, to be mocked by cxl_test. Recall that cxl_test can only mock exported symbols, and since cxl_rcrb_to_component() is itself inside the core, all callers must be outside of cxl_core to allow cxl_test to mock it. Reviewed-by: Robert Richter Link: https://lore.kernel.org/r/166993045072.1882361.13944923741276843683.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams drivers/cxl/core/core.h | 8 -------- drivers/cxl/core/port.c | 39 --------------------------------------- drivers/cxl/cxl.h | 2 -- drivers/cxl/cxlmem.h | 9 +++++++++ drivers/cxl/mem.c | 38 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 47 insertions(+), 49 deletions(-) commit 26e91b75bf6108550035355c835bf0c93c885b61 Author: Thomas Gleixner Date: Fri Nov 25 00:25:57 2022 +0100 genirq/msi: Provide msi_match_device_domain() Provide an interface to match a per device domain bus token. This allows to query which type of domain is installed for a particular domain id. Will be used for PCI to avoid frequent create/remove cycles for the MSI resp. MSI-X domains. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.738047902@linutronix.de include/linux/msi.h | 3 +++ kernel/irq/msi.c | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 27a6dea3ebaab3d6f8ded969ec3af710bcbe0c02 Author: Thomas Gleixner Date: Fri Nov 25 00:25:56 2022 +0100 genirq/msi: Provide msi_create/free_device_irq_domain() Now that all prerequsites are in place, provide the actual interfaces for creating and removing per device interrupt domains. MSI device interrupt domains are created from the provided msi_domain_template which is duplicated so that it can be modified for the particular device. The name of the domain and the name of the interrupt chip are composed by "$(PREFIX)$(CHIPNAME)-$(DEVNAME)" $PREFIX: The optional prefix provided by the underlying MSI parent domain via msi_parent_ops::prefix. $CHIPNAME: The name of the irq_chip in the template $DEVNAME: The name of the device The domain is further initialized through a MSI parent domain callback which fills in the required functionality for the parent domain or domains further down the hierarchy. This initialization can fail, e.g. when the requested feature or MSI domain type cannot be supported. The domain pointer is stored in the pointer array inside of msi_device_data which is attached to the domain. The domain can be removed via the API or left for disposal via devres when the device is torn down. The API removal is useful e.g. for PCI to have seperate domains for MSI and MSI-X, which are mutually exclusive and always occupy the default domain id slot. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.678838546@linutronix.de include/linux/msi.h | 6 +++ kernel/irq/msi.c | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) commit 4443664f298d1a2cba25a2e48d53b78f4138209b Author: Thomas Gleixner Date: Fri Nov 25 00:25:54 2022 +0100 genirq/irqdomain: Add irq_domain:: Dev for per device MSI domains Per device domains require the device pointer of the device which instantiated the domain for some purposes. Add the pointer to struct irq_domain. It will be used in the next step which provides the infrastructure to create per device MSI domains. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.618807601@linutronix.de include/linux/irqdomain.h | 4 ++++ 1 file changed, 4 insertions(+) commit a80c0aceeaffdb3afe9536fe747480e85841da7f Author: Thomas Gleixner Date: Fri Nov 25 00:25:52 2022 +0100 genirq/msi: Split msi_create_irq_domain() Split the functionality of msi_create_irq_domain() so it can be reused for creating per device irq domains. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.559086358@linutronix.de kernel/irq/msi.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 61bf992fc618503c910416f28afa0b015838b72b Author: Thomas Gleixner Date: Fri Nov 25 00:25:51 2022 +0100 genirq/msi: Add size info to struct msi_domain_info To allow proper range checking especially for dynamic allocations add a size field to struct msi_domain_info. If the field is 0 then the size is unknown or unlimited (up to MSI_MAX_INDEX) to provide backwards compability. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.501144862@linutronix.de include/linux/msi.h | 5 +++++ kernel/irq/msi.c | 11 +++++++++++ 2 files changed, 16 insertions(+) commit ebca4396ee18521e9e5d435a15e5d0ab2eb6b009 Author: Thomas Gleixner Date: Fri Nov 25 00:25:49 2022 +0100 genirq/msi: Provide data structs for per device domains Provide struct msi_domain_template which contains a bundle of struct irq_chip, struct msi_domain_ops and struct msi_domain_info and a name field. This template is used by MSI device domain implementations to provide the domain specific functionality, feature bits etc. When a MSI domain is created the template is duplicated in the core code so that it can be modified per instance. That means templates can be marked const at the MSI device domain code. The template is a bundle to avoid several allocations and duplications of the involved structures. The name field is used to construct the final domain and chip name via: $PREFIX$NAME-$DEVNAME where prefix is the optional prefix of the MSI parent domain, $NAME is the provided name in template::chip and the device name so that the domain is properly identified. On x86 this results for PCI/MSI in: PCI-MSI-0000:3d:00.1 or IR-PCI-MSIX-0000:3d:00.1 depending on the domain type and the availability of remapping. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.442499757@linutronix.de include/linux/msi.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit b78780d93b068706d04f8f2f02bd08db5da01479 Author: Thomas Gleixner Date: Fri Nov 25 00:25:48 2022 +0100 genirq/msi: Provide struct msi_parent_ops MSI parent domains must have some control over the MSI domains which are built on top. On domain creation they need to fill in e.g. architecture specific chip callbacks or msi domain ops to make the outermost domain parent agnostic which is obviously required for architecture independence etc. The structure contains: 1) A bitfield which exposes the supported functional features. This allows to check for features and is also used in the initialization callback to mask out unsupported features when the actual domain implementation requests a broader range, e.g. on x86 PCI multi-MSI is only supported by remapping domains but not by the underlying vector domain. The PCI/MSI code can then always request multi-MSI support, but the resulting feature set after creation might not have it set. 2) An optional string prefix which is put in front of domain and chip names during creation of the MSI domain. That allows to keep the naming schemes e.g. on x86 where PCI-MSI domains have a IR- prefix when interrupt remapping is enabled. 3) An initialization callback to sanity check the domain info of the to be created MSI domain, to restrict features and to apply changes in MSI ops and interrupt chip callbacks to accomodate to the particular MSI parent implementation and/or the underlying hierarchy. Add a conveniance function to delegate the initialization from the MSI parent domain to an underlying domain in the hierarchy. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.382485843@linutronix.de include/linux/irqdomain.h | 5 +++++ include/linux/msi.h | 21 +++++++++++++++++++++ kernel/irq/msi.c | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) commit 2d958b02b04f18955b0e15eda531461153c399d4 Author: Thomas Gleixner Date: Fri Nov 25 00:25:46 2022 +0100 genirq/msi: Rearrange MSI domain flags These flags got added as necessary and have no obvious structure. For feature support checks and masking it's convenient to have two blocks of flags: 1) Flags to control the internal behaviour like allocating/freeing MSI descriptors. Those flags do not need any support from the underlying MSI parent domain. They are mostly under the control of the outermost domain which implements the actual MSI support. 2) Flags to expose features, e.g. PCI multi-MSI or requirements which can depend on a underlying domain. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.322714918@linutronix.de include/linux/msi.h | 49 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) commit c459f11f32a022d0f97694030419d16816275a9d Author: Thomas Gleixner Date: Fri Nov 25 00:24:43 2022 +0100 genirq/msi: Remove unused alloc/free interfaces Now that all users are converted remove the old interfaces. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.694291814@linutronix.de include/linux/msi.h | 7 ----- kernel/irq/msi.c | 73 ----------------------------------------------------- 2 files changed, 80 deletions(-) commit 811b32811fbd1a5d3a9eb089ff1d34fa04ef2144 Author: Ahmed S. Darwish Date: Fri Nov 25 00:24:41 2022 +0100 oc: ti: ti_sci_inta_msi: Switch to domain id aware MSI functions Switch to the new domain id aware interfaces to phase out the previous ones. Remove the domain check as it happens in the core code now. No functional change. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.634800247@linutronix.de drivers/soc/ti/ti_sci_inta_msi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 46a2bc8c7092cf277fb486c0629894ed904984a4 Author: Thomas Gleixner Date: Fri Nov 25 00:24:40 2022 +0100 bus: fsl-mc-msi: Switch to domain id aware interfaces Switch to the new domain id aware interfaces to phase out the previous ones. Get rid of the MSI descriptor and domain checks as the core code detects these issues anyway. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.575538524@linutronix.de drivers/bus/fsl-mc/fsl-mc-msi.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) commit b330ff9f0b03d6107ee941240ef63cc95374ff3d Author: Ahmed S. Darwish Date: Fri Nov 25 00:24:38 2022 +0100 platform-msi: Switch to the domain id aware MSI interfaces Switch to the new domain id aware interfaces to phase out the previous ones. No functional change. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.513924920@linutronix.de drivers/base/platform-msi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d3a11dee9f946daa6e66aca1bf8db93e9d4e02ec Author: Thomas Gleixner Date: Fri Nov 25 00:24:36 2022 +0100 PCI/MSI: Use msi_domain_alloc/free_irqs_all_locked() Switch to the new domain id aware interfaces to phase out the previous ones. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Bjorn Helgaas Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.455168748@linutronix.de drivers/pci/msi/irqdomain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f2480e7dacdcd9aab25641346ae53b7ff03777fc Author: Thomas Gleixner Date: Fri Nov 25 00:24:35 2022 +0100 genirq/msi: Provide new domain id allocation functions Provide two sorts of interfaces to handle the different use cases: - msi_domain_alloc_irqs_range(): Handles a caller defined precise range - msi_domain_alloc_irqs_all(): Allocates all interrupts associated to a domain by scanning the allocated MSI descriptors The latter is useful for the existing PCI/MSI support which does not have range information available. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.396497163@linutronix.de include/linux/msi.h | 18 +++--- kernel/irq/msi.c | 175 ++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 146 insertions(+), 47 deletions(-) commit 4cd5f4403f283766f73749c4c936801f58ffe77a Author: Thomas Gleixner Date: Fri Nov 25 00:24:33 2022 +0100 genirq/msi: Provide new domain id based interfaces for freeing interrupts Provide two sorts of interfaces to handle the different use cases: - msi_domain_free_irqs_range(): Handles a caller defined precise range - msi_domain_free_irqs_all(): Frees all interrupts associated to a domain The latter is useful for device teardown and to handle the legacy MSI support which does not have any range information available. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.337844751@linutronix.de include/linux/msi.h | 9 ++++ kernel/irq/msi.c | 142 ++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 129 insertions(+), 22 deletions(-) commit 40742716f294449549884421170ea18356a2abe8 Author: Thomas Gleixner Date: Fri Nov 25 00:24:32 2022 +0100 genirq/msi: Make msi_add_simple_msi_descs() device domain aware Allocating simple interrupt descriptors in the core code has to be multi device irqdomain aware for the upcoming PCI/IMS support. Change the interfaces to take a domain id into account. Use the internal control struct for transport of arguments. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.279112474@linutronix.de kernel/irq/msi.c | 98 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 41 deletions(-) commit 377712c5a45f6de40bffef5ddc31b39cd86cf23f Author: Thomas Gleixner Date: Fri Nov 25 00:24:30 2022 +0100 genirq/msi: Make descriptor freeing domain aware Change the descriptor free functions to take a domain id to prepare for the upcoming multi MSI domain per device support. To avoid changing and extending the interfaces over and over use an core internal control struct and hand the pointer through the various functions. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.220788011@linutronix.de include/linux/msi.h | 19 ++++++++++++++++-- kernel/irq/msi.c | 58 ++++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 65 insertions(+), 12 deletions(-) commit fc8ab388325ddfd848d00f3a3383b4304594546a Author: Thomas Gleixner Date: Fri Nov 25 00:24:29 2022 +0100 genirq/msi: Make descriptor allocation device domain aware Change the descriptor allocation and insertion functions to take a domain id to prepare for the upcoming multi MSI domain per device support. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.163043028@linutronix.de include/linux/msi.h | 16 +++++++++++++++- kernel/irq/msi.c | 20 ++++++++++++-------- 2 files changed, 27 insertions(+), 9 deletions(-) commit 1c89396300292da4e4a87db63bef45975461fa25 Author: Thomas Gleixner Date: Fri Nov 25 00:24:27 2022 +0100 genirq/msi: Rename msi_add_msi_desc() to msi_insert_msi_desc() This reflects the functionality better. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.103554618@linutronix.de drivers/pci/msi/msi.c | 4 ++-- drivers/soc/ti/ti_sci_inta_msi.c | 4 ++-- include/linux/msi.h | 2 +- kernel/irq/msi.c | 6 ++++-- 4 files changed, 9 insertions(+), 7 deletions(-) commit 98043704f375f63a47efeff123ab92fcf34b95e6 Author: Ahmed S. Darwish Date: Fri Nov 25 00:24:25 2022 +0100 genirq/msi: Make msi_get_virq() device domain aware In preparation of the upcoming per device multi MSI domain support, change the interface to support lookups based on domain id and zero based index within the domain. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.044613697@linutronix.de include/linux/msi_api.h | 14 +++++++++++++- kernel/irq/msi.c | 19 +++++++++++++------ 2 files changed, 26 insertions(+), 7 deletions(-) commit 94ff94cfea2827e287a42781a47f37c9ef82186b Author: Thomas Gleixner Date: Fri Nov 25 00:24:24 2022 +0100 genirq/msi: Make MSI descriptor iterators device domain aware To support multiple MSI interrupt domains per device it is necessary to segment the xarray MSI descriptor storage. Each domain gets up to MSI_MAX_INDEX entries. Change the iterators so they operate with domain ids and take the domain offsets into account. The publicly available iterators which are mostly used in legacy implementations and the PCI/MSI core default to MSI_DEFAULT_DOMAIN (0) which is the id for the existing "global" domains. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230313.985498981@linutronix.de include/linux/msi.h | 48 ++++++++++++++++++++++++++++++++++++++++++------ kernel/irq/msi.c | 35 +++++++++++++++++++++++------------ 2 files changed, 65 insertions(+), 18 deletions(-) commit 64258eaa442b0b7d7eac8942cf27863ad9e6028e Author: Thomas Gleixner Date: Fri Nov 25 00:24:22 2022 +0100 genirq/msi: Add pointers for per device irq domains With the upcoming per device MSI interrupt domain support it is necessary to store the domain pointers per device. Instead of delegating that storage to device drivers or subsystems add a domain pointer to the msi_dev_domain array in struct msi_device_data. This pointer is also used to take care of tearing down the irq domains when msi_device_data is cleaned up via devres. The interfaces into the MSI core will be changed from irqdomain pointer based interfaces to domain id based interfaces to support multiple MSI domains on a single device (e.g. PCI/MSI[-X] and PCI/IMS. Once the per device domain support is complete the irq domain pointer in struct device::msi.domain will not longer contain a pointer to the "global" MSI domain. It will contain a pointer to the MSI parent domain instead. It would be a horrible maze of conditionals to evaluate all over the place which domain pointer should be used, i.e. the "global" one in device::msi::domain or one from the internal pointer array. To avoid this evaluate in msi_setup_device_data() whether the irq domain which is associated to a device is a "global" or a parent MSI domain. If it is global then copy the pointer into the first entry of the msi_dev_domain array. This allows to convert interfaces and implementation to domain ids while keeping everything existing working. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230313.923860399@linutronix.de include/linux/msi.h | 3 +++ kernel/irq/msi.c | 9 +++++++++ 2 files changed, 12 insertions(+) commit f1139f905bd2d8bec59be0c1404b592279ae0ac9 Author: Thomas Gleixner Date: Fri Nov 25 00:24:20 2022 +0100 genirq/msi: Move xarray into a separate struct and create an array The upcoming support for multiple MSI domains per device requires storage for the MSI descriptors and in a second step storage for the irqdomain pointers. Move the xarray into a separate data structure msi_dev_domain and create an array with size 1 in msi_device_data, which can be expanded later when the support for per device domains is implemented. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230313.864887773@linutronix.de include/linux/msi.h | 13 +++++++++++-- include/linux/msi_api.h | 8 ++++++++ kernel/irq/msi.c | 32 ++++++++++++++++++++++---------- 3 files changed, 41 insertions(+), 12 deletions(-) commit 3e86a3a3ed031dd498e614db0fa082a58d700df9 Author: Thomas Gleixner Date: Fri Nov 25 00:24:19 2022 +0100 genirq/msi: Check for invalid MSI parent domain usage In the upcoming per device MSI domain concept the MSI parent domains are not allowed to be used as regular MSI domains where the MSI allocation/free operations are applicable. Add appropriate checks. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230313.806128070@linutronix.de kernel/irq/msi.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit e71c5d0bb1885b73c746b634895b85d135ce2c87 Author: Thomas Gleixner Date: Fri Nov 25 00:24:17 2022 +0100 genirq/irqdomain: Provide IRQ_DOMAIN_FLAG_MSI_DEVICE Similar to marking parent MSI domains it's required to identify per device domains. Add flag and helpers. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230313.747627287@linutronix.de include/linux/irqdomain.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b749e6d31c88cff2202b968aaba246e5d7379038 Author: Thomas Gleixner Date: Fri Nov 25 00:24:15 2022 +0100 genirq/irqdomain: Provide IRQ_DOMAIN_FLAG_MSI_PARENT The new PCI/IMS (Interrupt Message Store) functionality is allowing hardware vendors to provide implementation specific storage for the MSI messages. This can be device memory and also host/guest memory, e.g. in queue memory which is shared with the hardware. This requires device specific MSI interrupt domains, which cannot be achieved by expanding the existing PCI/MSI interrupt domain concept which is a global interrupt domain shared by all PCI devices on a particular (IOMMU) segment: |--- device 1 [Vector]---[Remapping]---[PCI/MSI]--|... |--- device N This works because the PCI/MSI[-X] space is uniform, but falls apart with PCI/IMS which is implementation defined and must be available along with PCI/MSI[-X] on the same device. To support PCI/MSI[-X] plus PCI/IMS on the same device it is required to rework the PCI/MSI interrupt domain hierarchy concept in the following way: |--- [PCI/MSI] device 1 [Vector]---[Remapping]---|... |--- [PCI/MSI] device N That allows in the next step to create multiple interrupt domains per device: |--- [PCI/MSI] device 1 |--- [PCI/IMS] device 1 [Vector]---[Remapping]---|... |--- [PCI/MSI] device N |--- [PCI/IMS] device N So the domain which previously created the global PCI/MSI domain must now act as parent domain for the per device domains. The hierarchy depth is the same as before, but the PCI/MSI domains are then device specific and not longer global. Provide IRQ_DOMAIN_FLAG_MSI_PARENT, which allows to identify these parent domains, along with helpers to query it. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230313.690038274@linutronix.de include/linux/irqdomain.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 6b6941f6653ec8017e3822b55bb9eae245f0ed99 Author: Thomas Gleixner Date: Fri Nov 25 00:24:14 2022 +0100 genirq/msi: Create msi_api.h Create a API header for MSI specific functions which are relevant to device drivers. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230313.632679220@linutronix.de include/linux/msi.h | 6 ++++-- include/linux/msi_api.h | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) commit 6a9fc4190ca23fcf327de666e1a98dbdcdd2d210 Author: Thomas Gleixner Date: Fri Nov 25 00:24:12 2022 +0100 genirq/irqdomain: Rename irq_domain::dev to irq_domain:: Pm_dev irq_domain::dev is a misnomer as it's usually the rule that a device pointer points to something which is directly related to the instance. irq_domain::dev can point to some other device for power management to ensure that this underlying device is not powered down when an interrupt is allocated. The upcoming per device MSI domains really require a pointer to the device which instantiated the irq domain and not to some random other device which is required for power management down the chain. Rename irq_domain::dev to irq_domain::pm_dev and fixup the few sites which use that pointer. Conversion was done with the help of coccinelle. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230313.574541683@linutronix.de drivers/irqchip/irq-gic.c | 4 ++-- include/linux/irqdomain.h | 6 +++--- kernel/irq/chip.c | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) commit f876ea3b7969329d6472ae4126496bb03c89d89a Author: Thomas Gleixner Date: Fri Nov 25 00:24:10 2022 +0100 genirq/irqdomain: Make struct irqdomain readable Tabular alignment of both kernel-doc and the actual struct declaration make visual parsing way more conveniant. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230313.514944367@linutronix.de include/linux/irqdomain.h | 74 +++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 37 deletions(-) commit 3dad5f9ad99b77dfd234d31e2ea3d77f620efc09 Author: Thomas Gleixner Date: Fri Nov 25 00:24:08 2022 +0100 genirq/msi: Move IRQ_DOMAIN_MSI_NOMASK_QUIRK to MSI flags It's truly a MSI only flag and for the upcoming per device MSI domains this must be in the MSI flags so it can be set during domain setup without exposing this quirk outside of x86. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230313.454246167@linutronix.de arch/x86/kernel/apic/msi.c | 5 ++--- include/linux/irqdomain.h | 9 +-------- include/linux/msi.h | 6 ++++++ kernel/irq/msi.c | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) commit 6842694c5088925d216529d4a2358ab5ee8bb862 Author: Bagas Sanjaya Date: Sat Dec 3 17:05:11 2022 +0700 PCI/MSI: Use bullet lists in kernel-doc comments of api.c Use bullet-list RST syntax for kernel-doc parameters' flags and interrupt mode descriptions. Otherwise Sphinx produces "Unexpected identation" errors and warnings. Fixes: 5c0997dc33ac24 ("PCI/MSI: Move pci_alloc_irq_vectors() to api.c") Fixes: 017239c8db2093 ("PCI/MSI: Move pci_irq_vector() to api.c") Fixes: be37b8428b7b77 ("PCI/MSI: Move pci_irq_get_affinity() to api.c") Reported-by: Stephen Rothwell Suggested-by: Ahmed S. Darwish Signed-off-by: Bagas Sanjaya Signed-off-by: Thomas Gleixner Acked-by: Ahmed S. Darwish Link: https://lore.kernel.org/r/20221203100511.222136-1-bagasdotme@gmail.com drivers/pci/msi/api.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 1b41beaa7a58467505ec3023af8aad74f878b888 Author: Yang Yingliang Date: Mon Dec 5 22:37:21 2022 +0800 ASoC: sof_es8336: fix possible use-after-free in sof_es8336_remove() sof_es8336_remove() calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This means that the callback function may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Fixes: 89cdb224f2ab ("ASoC: sof_es8336: reduce pop noise on speaker") Signed-off-by: Yang Yingliang Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221205143721.3988988-1-yangyingliang@huawei.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_es8336.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9472382db38452df15f9f2f74b1dff34848e56b2 Merge: 1cd7de447cbb 41cfad23b5eb Author: Mark Brown Date: Mon Dec 5 17:28:07 2022 +0000 Add SOF panic dump support for AMD platform. Merge series from V sujith kumar Reddy : Fix an issue with starting the ACP DSP and support debug dumps to aid maintainability. commit 66310b5a0fc1ccdce9a3a5e6c6a12c08e4e0b7b1 Author: Dmitry Torokhov Date: Sun Dec 4 15:59:29 2022 -0800 soc: fsl: qe: request pins non-exclusively Commit 84582f9ed090 ("soc: fsl: qe: Avoid using gpio_to_desc()") changed qe_pin_request() to request and hold GPIO corresponding to a given pin. Unfortunately this does not work, as fhci-hcd requests these GPIOs first, befor calling qe_pin_request() (see drivers/usb/host/fhci-hcd.c::of_fhci_probe()). To fix it change qe_pin_request() to request GPIOs non-exclusively, and free them once the code determines GPIO controller and offset for each GPIO/pin. Also reaching deep into gpiolib implementation is not the best idea. We should either export gpio_chip_hwgpio() or keep converting to the global gpio numbers space until we fix the driver to implement proper pin control. Fixes: 84582f9ed090 ("soc: fsl: qe: Avoid using gpio_to_desc()") Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/Y400YXnWBdz1e/L5@google.com Signed-off-by: Arnd Bergmann drivers/soc/fsl/qe/gpio.c | 51 +++++++++++++++++++++------------------------ drivers/usb/host/fhci-hcd.c | 2 +- include/soc/fsl/qe/qe.h | 5 +++-- 3 files changed, 28 insertions(+), 30 deletions(-) commit b7af0635c87ff78d6bd523298ab7471f9ffd3ce5 Author: Filipe Manana Date: Wed Nov 30 15:51:20 2022 +0000 btrfs: print transaction aborted messages with an error level Currently we print the transaction aborted message with a debug level, but a transaction abort is an exceptional event that indicates something went wrong and it's useful to have it printed with an error level as it helps analysing problems in a production environment, where debug level messages are typically not logged. For example reports from syzbot never include the transaction aborted message, since the log level on the test machines is above the debug level. So change the log level from debug to error. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/messages.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a28135303a669917002f569aecebd5758263e4aa Author: Josef Bacik Date: Mon Nov 28 14:26:38 2022 -0500 btrfs: sync some cleanups from progs into uapi/btrfs.h When syncing this code into btrfs-progs Dave noticed there's some things we were losing in the sync that are needed. This syncs those changes into the kernel, which include a few comments that weren't in the kernel, some whitespace changes, an attribute, and the cplusplus bit. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba include/uapi/linux/btrfs.h | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) commit 162d053e15fe985f754ef495a96eb3db970c43ed Author: Filipe Manana Date: Mon Nov 28 15:07:30 2022 +0000 btrfs: do not BUG_ON() on ENOMEM when dropping extent items for a range If we get -ENOMEM while dropping file extent items in a given range, at btrfs_drop_extents(), due to failure to allocate memory when attempting to increment the reference count for an extent or drop the reference count, we handle it with a BUG_ON(). This is excessive, instead we can simply abort the transaction and return the error to the caller. In fact most callers of btrfs_drop_extents(), directly or indirectly, already abort the transaction if btrfs_drop_extents() returns any error. Also, we already have error paths at btrfs_drop_extents() that may return -ENOMEM and in those cases we abort the transaction, like for example anything that changes the b+tree may return -ENOMEM due to a failure to allocate a new extent buffer when COWing an existing extent buffer, such as a call to btrfs_duplicate_item() for example. So replace the BUG_ON() calls with proper logic to abort the transaction and return the error. Reported-by: syzbot+0b1fb6b0108c27419f9f@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/00000000000089773e05ee4b9cb4@google.com/ CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1742e1c90c3da344f3bb9b1f1309b3f47482756a Author: void0red Date: Wed Nov 23 22:39:45 2022 +0800 btrfs: fix extent map use-after-free when handling missing device in read_one_chunk Store the error code before freeing the extent_map. Though it's reference counted structure, in that function it's the first and last allocation so this would lead to a potential use-after-free. The error can happen eg. when chunk is stored on a missing device and the degraded mount option is missing. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216721 Reported-by: eriri <1527030098@qq.com> Fixes: adfb69af7d8c ("btrfs: add_missing_dev() should return the actual error") CC: stable@vger.kernel.org # 4.9+ Signed-off-by: void0red Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3eb423442483d454937cdc8853e58c399ffe5514 Author: Filipe Manana Date: Mon Nov 21 10:23:24 2022 +0000 btrfs: remove outdated logic from overwrite_item() and add assertion As of commit 193df6245704 ("btrfs: search for last logged dir index if it's not cached in the inode"), the overwrite_item() function is always called for a root that is from a fs/subvolume tree. In other words, now it's only used during log replay to modify a fs/subvolume tree. Therefore we can remove the logic that checks if we are dealing with a log tree at overwrite_item(). So remove that logic, replacing it with an assertion and document that if we ever need to support a log root there, we will need to clone the leaf from the fs/subvolume tree and then release it before modifying the log tree, which is needed to avoid a potential deadlock, similar to the one recently fixed by a patch with the subject: "btrfs: do not modify log tree while holding a leaf from fs tree locked" Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tree-log.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 3a8d1db341b93e65fa76051ab833b3640842b6eb Author: Filipe Manana Date: Mon Nov 21 10:23:23 2022 +0000 btrfs: unify overwrite_item() and do_overwrite_item() After commit 193df6245704 ("btrfs: search for last logged dir index if it's not cached in the inode"), there are no more callers of do_overwrite_item(), except overwrite_item(). Originally both used to be the same function, but were split in commit 086dcbfa50d3 ("btrfs: insert items in batches when logging a directory when possible"), as there was the need to execute all logic of overwrite_item() but skip the tree search, since in the context of directory logging we already had a path with a leaf to copy data from. So unify them again as there is no more need to have them split. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tree-log.c | 76 +++++++++++++++++------------------------------------ 1 file changed, 24 insertions(+), 52 deletions(-) commit 63d5429f68a3d4c4aa27e65a05196c17f86c41d6 Author: Artem Chernyshev Date: Sat Nov 19 11:13:29 2022 +0300 btrfs: replace strncpy() with strscpy() Using strncpy() on NUL-terminated strings are deprecated. To avoid possible forming of non-terminated string strscpy() should be used. Found by Linux Verification Center (linuxtesting.org) with SVACE. CC: stable@vger.kernel.org # 4.9+ Signed-off-by: Artem Chernyshev Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 9 +++------ fs/btrfs/rcu-string.h | 6 +++++- 2 files changed, 8 insertions(+), 7 deletions(-) commit 26df39a9e5a8985674e814f0b27b25e8b4eb9ba7 Author: Josef Bacik Date: Fri Nov 18 15:09:42 2022 -0500 btrfs: fix uninitialized variable in find_first_clear_extent_bit This was caught when syncing extent-io-tree.c into btrfs-progs. This however isn't really a problem, the only way next would be uninitialized is if we found the range we were looking for, and in this case we don't care about next. However it's a compile error, so fix it up. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-io-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7c9e1be2876f63fb2178a24e0c1d5733ff98d47 Author: Josef Bacik Date: Fri Nov 18 15:06:09 2022 -0500 btrfs: fix uninitialized parent in insert_state I don't know how this isn't caught when we build this in the kernel, but while syncing extent-io-tree.c into btrfs-progs I got an error because parent could potentially be uninitialized when we link in a new node, specifically when the extent_io_tree is empty. This means we could have garbage in the parent color. I don't know what the ramifications are of that, but it's probably not great, so fix this by initializing parent to NULL. I spot checked all of our other usages in btrfs and we appear to be doing the correct thing everywhere else. Fixes: c7e118cf98c7 ("btrfs: open code rbtree search in insert_state") CC: stable@vger.kernel.org # 6.0+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-io-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4c853af0c511d7e0f7cb306bbc8a4f1dbdb64ca Author: ChenXiaoSong Date: Wed Nov 16 22:23:53 2022 +0800 btrfs: add might_sleep() annotations Add annotations to functions that might sleep due to allocations or IO and could be called from various contexts. In case of btrfs_search_slot it's not obvious why it would sleep: btrfs_search_slot setup_nodes_for_search reada_for_balance btrfs_readahead_node_child btrfs_readahead_tree_block btrfs_find_create_tree_block alloc_extent_buffer kmem_cache_zalloc /* allocate memory non-atomically, might sleep */ kmem_cache_alloc(GFP_NOFS|__GFP_NOFAIL|__GFP_ZERO) read_extent_buffer_pages submit_extent_page /* disk IO, might sleep */ submit_one_bio Other examples where the sleeping could happen is in 3 places might sleep in update_qgroup_limit_item(), as shown below: update_qgroup_limit_item btrfs_alloc_path /* allocate memory non-atomically, might sleep */ kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS) Signed-off-by: ChenXiaoSong Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 4 ++++ 1 file changed, 4 insertions(+) commit 054056bd0a8da2747e51646a6ac5af6ffbae5b69 Author: Josef Bacik Date: Tue Nov 15 11:16:20 2022 -0500 btrfs: add stack helpers for a few btrfs items We don't have these defined in the kernel because we don't have any users of these helpers. However we do use them in btrfs-progs, so define them to make keeping accessors.h in sync between progs and the kernel easier. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/accessors.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 0c7030038e6106711c5d0b237c980905dd3244ec Author: Josef Bacik Date: Tue Nov 15 11:16:19 2022 -0500 btrfs: add nr_global_roots to the super block definition We already have this defined in btrfs-progs, add it to the kernel to make it easier to sync these files into btrfs-progs. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/accessors.h | 2 ++ include/uapi/linux/btrfs_tree.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 8009adf306452e9b43db36f2d02fedfe5eca1b5e Author: Josef Bacik Date: Tue Nov 15 11:16:18 2022 -0500 btrfs: remove BTRFS_LEAF_DATA_OFFSET This is simply the same thing as btrfs_item_nr_offset(leaf, 0), so remove this helper and replace it's usage with the above statement. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/accessors.h | 6 ++---- fs/btrfs/ctree.c | 8 ++++---- fs/btrfs/extent_io.c | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) commit 637e3b48c22e52daa645b49b73630af3f09328ae Author: Josef Bacik Date: Tue Nov 15 11:16:17 2022 -0500 btrfs: add helpers for manipulating leaf items and data We have some gnarly memmove and copy_extent_buffer calls for leaf manipulation. This is because our item offsets aren't absolute, they're based on 0 being where the items start in the leaf, which is after the btrfs_header. This means any manipulation of the data requires adding sizeof(struct btrfs_header) to the offsets we pull from the items. Moving the items themselves is easier as the helpers are absolute offsets, however we of course have to call the helpers to get the offsets for the item numbers. This makes for copy_extent_buffer/memmove_extent_buffer calls that are kind of hard to reason about what's happening. Fix this by pushing this logic into helpers. For data we'll only use the item provided offsets, and the helpers will use the BTRFS_LEAF_DATA_OFFSET addition for the offsets. Additionally for the item manipulation simply pass in the item numbers, and then the helpers will call the offset helper to get the actual offset into the leaf. The diffstat makes this look like more code, but that's simply because I added comments for the helpers, it's net negative for the amount of code, and is easier to reason. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/ctree.c | 181 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 115 insertions(+), 66 deletions(-) commit e23efd8e8767165a6103cf0a4fe273f6b9f182f2 Author: Josef Bacik Date: Tue Nov 15 11:16:16 2022 -0500 btrfs: add eb to btrfs_node_key_ptr_offset This is a change needed for extent tree v2, as we will be growing the header size. This exists in btrfs-progs currently, and not having it makes syncing accessors.[ch] more problematic. So make this change to set us up for extent tree v2 and match what btrfs-progs does to make syncing easier. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/accessors.c | 2 +- fs/btrfs/accessors.h | 4 ++-- fs/btrfs/ctree.c | 28 ++++++++++++++-------------- fs/btrfs/extent_io.c | 2 +- fs/btrfs/tree-mod-log.c | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) commit 42c9419a4c01910e9c46b0c2bb9090f76295bf01 Author: Josef Bacik Date: Tue Nov 15 11:16:15 2022 -0500 btrfs: pass the extent buffer for the btrfs_item_nr helpers This is actually a change for extent tree v2, but it exists in btrfs-progs but not in the kernel. This makes it annoying to sync accessors.h with btrfs-progs, and since this is the way I need it for extent-tree v2 simply update these helpers to take the extent buffer in order to make syncing possible now, and make the extent tree v2 stuff easier moving forward. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/accessors.h | 18 +++++++++--------- fs/btrfs/ctree.c | 35 ++++++++++++++++++----------------- fs/btrfs/extent_io.c | 2 +- fs/btrfs/tree-checker.c | 4 ++-- 4 files changed, 30 insertions(+), 29 deletions(-) commit 0e6c40ebbb18b32cf4b5fcb3173eaede89b9f440 Author: Josef Bacik Date: Tue Nov 15 11:16:14 2022 -0500 btrfs: move the csum helpers into ctree.h These got moved because of copy+paste, but this code exists in ctree.c, so move the declarations back into ctree.h. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/accessors.h | 5 ----- fs/btrfs/ctree.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) commit 9b48addac406bd10afe447c2182b241dbde1d1a6 Author: Josef Bacik Date: Tue Nov 15 11:16:13 2022 -0500 btrfs: move eb offset helpers into extent_io.h These are very specific to how the extent buffer is defined, so this differs between btrfs-progs and the kernel. Make things easier by moving these helpers into extent_io.h so we don't have to worry about this when syncing ctree.h. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/ctree.h | 33 --------------------------------- fs/btrfs/extent_io.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 33 deletions(-) commit 6bfd0ffa6f2ae0ead92af7c4521626cd456115c5 Author: Josef Bacik Date: Tue Nov 15 11:16:12 2022 -0500 btrfs: move file_extent_item helpers into file-item.h These helpers use functions that are in multiple places, which makes it tricky to sync them into btrfs-progs. Move them to file-item.h and then include file-item.h in places that use these helpers. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/accessors.h | 22 ---------------------- fs/btrfs/ctree.c | 1 + fs/btrfs/ctree.h | 8 -------- fs/btrfs/file-item.h | 33 +++++++++++++++++++++++++++++++++ fs/btrfs/tree-checker.c | 1 + 5 files changed, 35 insertions(+), 30 deletions(-) commit 3a3178c7f7675661d7bd0c67f57420e20982bd34 Author: Josef Bacik Date: Tue Nov 15 11:16:11 2022 -0500 btrfs: move leaf_data_end into ctree.c This is only used in ctree.c, with the exception of zero'ing out extent buffers we're getting ready to write out. In theory we shouldn't have an extent buffer with 0 items that we're writing out, however I'd rather be safe than sorry so open code it in extent_io.c, and then copy the helper into ctree.c. This will make it easier to sync accessors.[ch] into btrfs-progs, as this requires a helper that isn't defined in accessors.h. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/accessors.h | 13 ------------- fs/btrfs/ctree.c | 13 +++++++++++++ fs/btrfs/extent_io.c | 6 +++++- 3 files changed, 18 insertions(+), 14 deletions(-) commit 1fe5ebc4e17dfbffeefe52abab75b02ad0f3a97e Author: Josef Bacik Date: Tue Nov 15 11:16:10 2022 -0500 btrfs: move root helpers back into ctree.h These accidentally got brought into accessors.h, but belong with the btrfs_root definitions which are currently in ctree.h. Move these to make it easier to sync accessors.[ch] into btrfs-progs. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/accessors.h | 17 ----------------- fs/btrfs/ctree.h | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) commit bacf60e515862904dd91a332f3a54f092416eaa6 Author: Christoph Hellwig Date: Tue Nov 15 10:44:06 2022 +0100 btrfs: move repair_io_failure to bio.c repair_io_failure ties directly into all the glory low-level details of mapping a bio with a logic address to the actual physical location. Move it right below btrfs_submit_bio to keep all the related logic together. Also move btrfs_repair_eb_io_failure to its caller in disk-io.c now that repair_io_failure is available in a header. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/bio.c | 90 +++++++++++++++++++++++++++++++++++++++ fs/btrfs/disk-io.c | 24 +++++++++++ fs/btrfs/extent_io.c | 117 +-------------------------------------------------- fs/btrfs/extent_io.h | 1 - 4 files changed, 116 insertions(+), 116 deletions(-) commit 103c19723c80bf74e4e70cd6cde3b8783a27aceb Author: Christoph Hellwig Date: Tue Nov 15 10:44:05 2022 +0100 btrfs: split the bio submission path into a separate file The code used by btrfs_submit_bio only interacts with the rest of volumes.c through __btrfs_map_block (which itself is a more generic version of two exported helpers) and does not really have anything to do with volumes.c. Create a new bio.c file and a bio.h header going along with it for the btrfs_bio-based storage layer, which will grow even more going forward. Also update the file with my copyright notice given that a large part of the moved code was written or rewritten by me. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/Makefile | 2 +- fs/btrfs/bio.c | 291 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/bio.h | 127 +++++++++++++++++++++ fs/btrfs/compression.c | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent-tree.c | 1 + fs/btrfs/extent_io.c | 2 +- fs/btrfs/file-item.c | 2 +- fs/btrfs/inode.c | 2 +- fs/btrfs/relocation.c | 1 + fs/btrfs/super.c | 2 +- fs/btrfs/tree-log.c | 1 + fs/btrfs/volumes.c | 296 +------------------------------------------------ fs/btrfs/volumes.h | 110 +----------------- 14 files changed, 438 insertions(+), 403 deletions(-) commit 27137fac4c0628fc8320bb7f1ce3bb9f84b76a9b Author: Christoph Hellwig Date: Tue Nov 15 10:44:04 2022 +0100 btrfs: move struct btrfs_tree_parent_check out of disk-io.h Move struct btrfs_tree_parent_check out of disk-io.h so that volumes.h an various .c files don't have to include disk-io.h just for it. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba [ use tree-checker.h for the structure ] Signed-off-by: David Sterba fs/btrfs/backref.c | 1 + fs/btrfs/disk-io.h | 30 +----------------------------- fs/btrfs/print-tree.c | 1 + fs/btrfs/qgroup.c | 1 + fs/btrfs/tree-checker.h | 35 +++++++++++++++++++++++++++++++++-- fs/btrfs/tree-mod-log.c | 1 + fs/btrfs/volumes.h | 2 +- 7 files changed, 39 insertions(+), 32 deletions(-) commit 7a3150723061ba1ac2ba10b1392b1cd75234172a Author: Qu Wenruo Date: Mon Nov 14 08:26:34 2022 +0800 btrfs: raid56: do data csum verification during RMW cycle [BUG] For the following small script, btrfs will be unable to recover the content of file1: mkfs.btrfs -f -m raid1 -d raid5 -b 1G $dev1 $dev2 $dev3 mount $dev1 $mnt xfs_io -f -c "pwrite -S 0xff 0 64k" -c sync $mnt/file1 md5sum $mnt/file1 umount $mnt # Corrupt the above 64K data stripe. xfs_io -f -c "pwrite -S 0x00 323026944 64K" -c sync $dev3 mount $dev1 $mnt # Write a new 64K, which should be in the other data stripe # And this is a sub-stripe write, which will cause RMW xfs_io -f -c "pwrite 0 64k" -c sync $mnt/file2 md5sum $mnt/file1 umount $mnt Above md5sum would fail. [CAUSE] There is a long existing problem for raid56 (not limited to btrfs raid56) that, if we already have some corrupted on-disk data, and then trigger a sub-stripe write (which needs RMW cycle), it can cause further damage into P/Q stripe. Disk 1: data 1 |0x000000000000| <- Corrupted Disk 2: data 2 |0x000000000000| Disk 2: parity |0xffffffffffff| In above case, data 1 is already corrupted, the original data should be 64KiB of 0xff. At this stage, if we read data 1, and it has data checksum, we can still recovery going via the regular RAID56 recovery path. But if now we decide to write some data into data 2, then we need to go RMW. Let's say we want to write 64KiB of '0x00' into data 2, then we read the on-disk data of data 1, calculate the new parity, resulting the following layout: Disk 1: data 1 |0x000000000000| <- Corrupted Disk 2: data 2 |0x000000000000| <- New '0x00' writes Disk 2: parity |0x000000000000| <- New Parity. But the new parity is calculated using the *corrupted* data 1, we can no longer recover the correct data of data1. Thus the corruption is forever there. [FIX] To solve above problem, this patch will do a full stripe data checksum verification at RMW time. This involves the following changes: - Always read the full stripe (including data/P/Q) when doing RMW Before we only read the missing data sectors, but since we may do a data csum verification and recovery, we need to read everything out. Please note that, if we have a cached rbio, we don't need to read anything, and can treat it the same as full stripe write. As only stripe with all its csum matches can be cached. - Verify the data csum during read. The goal is only the rbio stripe sectors, and only if the rbio already has csum_buf/csum_bitmap filled. And sectors which cannot pass csum verification will have their bit set in error_bitmap. - Always call recovery_sectors() after we read out all the sectors Since error_bitmap will be updated during read, recover_sectors() can easily find out all the bad sectors and try to recover (if still under tolerance). And since recovery_sectors() is already migrated to use error_bitmap, it can skip vertical stripes which don't have any error. - Verify the repaired sectors against its csum in recover_vertical() - Rename rmw_read_and_wait() to rmw_read_wait_recover() Since we will always recover the sectors, the old name is no longer accurate. Furthermore since recovery is already done in rmw_read_wait_recover(), we no longer need to call recovery_sectors() inside rmw_rbio(). Obviously this will have a performance impact, as we are doing more work during RMW cycle: - Fetch the data checksums - Do checksum verification for all data stripes - Do checksum verification again after repair But for full stripe write or cached rbio we won't have the overhead all, thus for fully optimized RAID56 workload (always full stripe write), there should be no extra overhead. To me, the extra overhead looks reasonable, as data consistency is way more important than performance. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 169 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 137 insertions(+), 32 deletions(-) commit c5a415627be4758ebdd274de7148706d6713c7ec Author: Qu Wenruo Date: Mon Nov 14 08:26:33 2022 +0800 btrfs: raid56: prepare data checksums for later RMW verification This is for later data checksum verification at RMW time. This patch will try to allocate the needed memory for a locked rbio if the rbio is for data exclusively (we don't want to handle mixed bg yet). The memory will be released when the rbio is finished. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/raid56.h | 12 +++++++++ 2 files changed, 86 insertions(+) commit 97e3823933108cfc648bb08d5ad36251b6588164 Author: Qu Wenruo Date: Mon Nov 14 08:26:32 2022 +0800 btrfs: introduce a bitmap based csum range search function Although we have an existing function, btrfs_lookup_csums_range(), to find all data checksums for a range, it's based on a btrfs_ordered_sum list. For the incoming RAID56 data checksum verification at RMW time, we don't want to waste time by allocating temporary memory. So this patch will introduce a new helper, btrfs_lookup_csums_bitmap(). It will use bitmap based result, which will be a perfect fit for later RAID56 usage. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/file-item.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++++-- fs/btrfs/file-item.h | 8 ++-- fs/btrfs/inode.c | 5 +- fs/btrfs/relocation.c | 4 +- fs/btrfs/scrub.c | 8 ++-- fs/btrfs/tree-log.c | 15 +++--- 6 files changed, 144 insertions(+), 23 deletions(-) commit cb649e81dad429ffbd97a689ac0011599952a668 Author: Qu Wenruo Date: Mon Nov 14 08:26:31 2022 +0800 btrfs: refactor checksum calculations in btrfs_lookup_csums_range() The refactoring involves the following parts: - Introduce bytes_to_csum_size() and csum_size_to_bytes() helpers As we have quite some open-coded calculations, some of them are even split into two assignments just to fit 80 chars limit. - Remove the @csum_size parameter from max_ordered_sum_bytes() Csum size can be fetched from @fs_info. And we will use the csum_size_to_bytes() helper anyway. - Add a comment explaining how we handle the first search result - Use newly introduced helpers to cleanup btrfs_lookup_csums_range() - Move variables declaration to the minimal scope - Never mix number of sectors with bytes There are several locations doing things like: size = min_t(size_t, csum_end - start, max_ordered_sum_bytes(fs_info)); ... size >>= fs_info->sectorsize_bits Or offset = (start - key.offset) >> fs_info->sectorsize_bits; offset *= csum_size; Make sure these variables can only represent BYTES inside the function, by using the above bytes_to_csum_size() helpers. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/file-item.c | 68 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 21 deletions(-) commit 9f0eac070d23405f18e7a84820bc3d59b1415bec Author: Li zeming Date: Wed Oct 26 09:36:11 2022 +0800 btrfs: allocate btrfs_io_context without GFP_NOFAIL The __GFP_NOFAIL flag could loop indefinitely when allocation memory in alloc_btrfs_io_context. The callers starting from __btrfs_map_block already handle errors so it's safe to drop the flag. Signed-off-by: Li zeming Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cb3e217bdb39e390f8e64af519acb02af336b53d Author: Qu Wenruo Date: Sun Nov 13 09:32:07 2022 +0800 btrfs: use btrfs_dev_name() helper to handle missing devices better [BUG] If dev-replace failed to re-construct its data/metadata, the kernel message would be incorrect for the missing device: BTRFS info (device dm-1): dev_replace from (devid 2) to /dev/mapper/test-scratch2 started BTRFS error (device dm-1): failed to rebuild valid logical 38862848 for dev (efault) Note the above "dev (efault)" of the second line. While the first line is properly reporting "". [CAUSE] Although dev-replace is using btrfs_dev_name(), the heavy lifting work is still done by scrub (scrub is reused by both dev-replace and regular scrub). Unfortunately scrub code never uses btrfs_dev_name() helper, as it's only declared locally inside dev-replace.c. [FIX] Fix the output by: - Move the btrfs_dev_name() helper to volumes.h - Use btrfs_dev_name() to replace open-coded rcu_str_deref() calls Only zoned code is not touched, as I'm not familiar with degraded zoned code. - Constify return value and parameter Now the output looks pretty sane: BTRFS info (device dm-1): dev_replace from (devid 2) to /dev/mapper/test-scratch2 started BTRFS error (device dm-1): failed to rebuild valid logical 38862848 for dev Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 2 +- fs/btrfs/dev-replace.c | 15 +++------------ fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/extent_io.c | 3 +-- fs/btrfs/ioctl.c | 4 ++-- fs/btrfs/scrub.c | 20 +++++++++----------- fs/btrfs/super.c | 2 +- fs/btrfs/volumes.c | 16 ++++++++-------- fs/btrfs/volumes.h | 9 +++++++++ 10 files changed, 36 insertions(+), 39 deletions(-) commit 3c32c7212f1639471ec0197ff1179b8ef2e0f3d3 Author: Filipe Manana Date: Fri Nov 11 11:50:35 2022 +0000 btrfs: use cached state when looking for delalloc ranges with lseek During lseek (SEEK_HOLE/DATA), whenever we find a hole or prealloc extent, we will look for delalloc in that range, and one of the things we do for that is to find out ranges in the inode's io_tree marked with EXTENT_DELALLOC, using calls to count_range_bits(). Typically there's a single, or few, searches in the io_tree for delalloc per lseek call. However it's common for applications to keep calling lseek with SEEK_HOLE and SEEK_DATA to find where extents and holes are in a file, read the extents and skip holes in order to avoid unnecessary IO and save disk space by preserving holes. One popular user is the cp utility from coreutils. Starting with coreutils 9.0, cp uses SEEK_HOLE and SEEK_DATA to iterate over the extents of a file. Before 9.0, it used fiemap to figure out where holes and extents are in the source file. Another popular user is the tar utility when used with the --sparse / -S option to detect and preserve holes. Given that the pattern is to keep calling lseek with a start offset that matches the returned offset from the previous lseek call, we can benefit from caching the last extent state visited in count_range_bits() and use it for the next count_range_bits() from the next lseek call. Example, the following strace excerpt from running tar: $ strace tar cJSvf foo.tar.xz qemu_disk_file.raw (...) lseek(5, 125019574272, SEEK_HOLE) = 125024989184 lseek(5, 125024989184, SEEK_DATA) = 125024993280 lseek(5, 125024993280, SEEK_HOLE) = 125025239040 lseek(5, 125025239040, SEEK_DATA) = 125025255424 lseek(5, 125025255424, SEEK_HOLE) = 125025353728 lseek(5, 125025353728, SEEK_DATA) = 125025357824 lseek(5, 125025357824, SEEK_HOLE) = 125026766848 lseek(5, 125026766848, SEEK_DATA) = 125026770944 lseek(5, 125026770944, SEEK_HOLE) = 125027053568 (...) Shows that pattern, which is the same as with cp from coreutils 9.0+. So start using a cached state for the delalloc searches in lseek, and store it in struct file's private data so that it can be reused across lseek calls. This change is part of a patchset that is comprised of the following patches: 1/9 btrfs: remove leftover setting of EXTENT_UPTODATE state in an inode's io_tree 2/9 btrfs: add an early exit when searching for delalloc range for lseek/fiemap 3/9 btrfs: skip unnecessary delalloc searches during lseek/fiemap 4/9 btrfs: search for delalloc more efficiently during lseek/fiemap 5/9 btrfs: remove no longer used btrfs_next_extent_map() 6/9 btrfs: allow passing a cached state record to count_range_bits() 7/9 btrfs: update stale comment for count_range_bits() 8/9 btrfs: use cached state when looking for delalloc ranges with fiemap 9/9 btrfs: use cached state when looking for delalloc ranges with lseek The following test was run before and after applying the whole patchset: $ cat test-cp.sh #!/bin/bash DEV=/dev/sdh MNT=/mnt/sdh # coreutils 8.32, cp uses fiemap to detect holes and extents #CP_PROG=/usr/bin/cp # coreutils 9.1, cp uses SEEK_HOLE/DATA to detect holes and extents CP_PROG=/home/fdmanana/git/hub/coreutils/src/cp umount $DEV &> /dev/null mkfs.btrfs -f $DEV mount $DEV $MNT FILE_SIZE=$((1024 * 1024 * 1024)) echo "Creating file with a size of $((FILE_SIZE / 1024 / 1024))M" # Create a very sparse file, where each extent has a length of 4K and # is preceded by a 4K hole and followed by another 4K hole. start=$(date +%s%N) echo -n > $MNT/foobar for ((off = 0; off < $FILE_SIZE; off += 8192)); do xfs_io -c "pwrite -S 0xab $off 4K" $MNT/foobar > /dev/null echo -ne "\r$off / $FILE_SIZE ..." done end=$(date +%s%N) echo -e "\nFile created ($(( (end - start) / 1000000 )) milliseconds)" start=$(date +%s%N) $CP_PROG $MNT/foobar /dev/null end=$(date +%s%N) dur=$(( (end - start) / 1000000 )) echo "cp took $dur milliseconds with data/metadata cached and delalloc" # Flush all delalloc. sync start=$(date +%s%N) $CP_PROG $MNT/foobar /dev/null end=$(date +%s%N) dur=$(( (end - start) / 1000000 )) echo "cp took $dur milliseconds with data/metadata cached and no delalloc" # Unmount and mount again to test the case without any metadata # loaded in memory. umount $MNT mount $DEV $MNT start=$(date +%s%N) $CP_PROG $MNT/foobar /dev/null end=$(date +%s%N) dur=$(( (end - start) / 1000000 )) echo "cp took $dur milliseconds without data/metadata cached and no delalloc" umount $MNT The results, running on a box with a non-debug kernel (Debian's default kernel config), were the following: 128M file, before patchset: cp took 16574 milliseconds with data/metadata cached and delalloc cp took 122 milliseconds with data/metadata cached and no delalloc cp took 20144 milliseconds without data/metadata cached and no delalloc 128M file, after patchset: cp took 6277 milliseconds with data/metadata cached and delalloc cp took 109 milliseconds with data/metadata cached and no delalloc cp took 210 milliseconds without data/metadata cached and no delalloc 512M file, before patchset: cp took 14369 milliseconds with data/metadata cached and delalloc cp took 429 milliseconds with data/metadata cached and no delalloc cp took 88034 milliseconds without data/metadata cached and no delalloc 512M file, after patchset: cp took 12106 milliseconds with data/metadata cached and delalloc cp took 427 milliseconds with data/metadata cached and no delalloc cp took 824 milliseconds without data/metadata cached and no delalloc 1G file, before patchset: cp took 10074 milliseconds with data/metadata cached and delalloc cp took 886 milliseconds with data/metadata cached and no delalloc cp took 181261 milliseconds without data/metadata cached and no delalloc 1G file, after patchset: cp took 3320 milliseconds with data/metadata cached and delalloc cp took 880 milliseconds with data/metadata cached and no delalloc cp took 1801 milliseconds without data/metadata cached and no delalloc Reported-by: Wang Yugui Link: https://lore.kernel.org/linux-btrfs/20221106073028.71F9.409509F4@e16-tech.com/ Link: https://lore.kernel.org/linux-btrfs/CAL3q7H5NSVicm7nYBJ7x8fFkDpno8z3PYt5aPU43Bajc1H0h1Q@mail.gmail.com/ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 + fs/btrfs/file.c | 40 ++++++++++++++++++++++++++++++++-------- 2 files changed, 33 insertions(+), 8 deletions(-) commit b3e744fe6d289bec77b138b6201201e4148dcb0e Author: Filipe Manana Date: Fri Nov 11 11:50:34 2022 +0000 btrfs: use cached state when looking for delalloc ranges with fiemap During fiemap, whenever we find a hole or prealloc extent, we will look for delalloc in that range, and one of the things we do for that is to find out ranges in the inode's io_tree marked with EXTENT_DELALLOC, using calls to count_range_bits(). Since we process file extents from left to right, if we have a file with several holes or prealloc extents, we benefit from keeping a cached extent state record for calls to count_range_bits(). Most of the time the last extent state record we visited in one call to count_range_bits() matches the first extent state record we will use in the next call to count_range_bits(), so there's a benefit here. So use an extent state record to cache results from count_range_bits() calls during fiemap. This change is part of a patchset that has the goal to make performance better for applications that use lseek's SEEK_HOLE and SEEK_DATA modes to iterate over the extents of a file. Two examples are the cp program from coreutils 9.0+ and the tar program (when using its --sparse / -S option). A sample test and results are listed in the changelog of the last patch in the series: 1/9 btrfs: remove leftover setting of EXTENT_UPTODATE state in an inode's io_tree 2/9 btrfs: add an early exit when searching for delalloc range for lseek/fiemap 3/9 btrfs: skip unnecessary delalloc searches during lseek/fiemap 4/9 btrfs: search for delalloc more efficiently during lseek/fiemap 5/9 btrfs: remove no longer used btrfs_next_extent_map() 6/9 btrfs: allow passing a cached state record to count_range_bits() 7/9 btrfs: update stale comment for count_range_bits() 8/9 btrfs: use cached state when looking for delalloc ranges with fiemap 9/9 btrfs: use cached state when looking for delalloc ranges with lseek Reported-by: Wang Yugui Link: https://lore.kernel.org/linux-btrfs/20221106073028.71F9.409509F4@e16-tech.com/ Link: https://lore.kernel.org/linux-btrfs/CAL3q7H5NSVicm7nYBJ7x8fFkDpno8z3PYt5aPU43Bajc1H0h1Q@mail.gmail.com/ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent_io.c | 11 ++++++++++- fs/btrfs/file.c | 10 +++++++--- fs/btrfs/file.h | 1 + 3 files changed, 18 insertions(+), 4 deletions(-) commit 1ee51a06255d425c1b7effff095f0bf9c7240078 Author: Filipe Manana Date: Fri Nov 11 11:50:33 2022 +0000 btrfs: update stale comment for count_range_bits() The comment for count_range_bits() mentions that the search is fast if we are asking for a range with the EXTENT_DIRTY bit set. However that is no longer true since we don't use that bit and the optimization for that was removed in: commit 71528e9e16c7 ("btrfs: get rid of extent_io_tree::dirty_bytes") So remove that part of the comment mentioning the no longer existing optimized case, and, while at it, add proper documentation describing the purpose, arguments and return value of the function. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent-io-tree.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 8c6e53a79d16b3651ad3abeb415e1c637da75082 Author: Filipe Manana Date: Fri Nov 11 11:50:32 2022 +0000 btrfs: allow passing a cached state record to count_range_bits() An inode's io_tree can be quite large and there are cases where due to delalloc it can have thousands of extent state records, which makes the red black tree have a depth of 10 or more, making the operation of count_range_bits() slow if we repeatedly call it for a range that starts where, or after, the previous one we called it for. Such use cases are when searching for delalloc in a file range that corresponds to a hole or a prealloc extent, which is done during lseek SEEK_HOLE/DATA and fiemap. So introduce a cached state parameter to count_range_bits() which we use to store the last extent state record we visited, and then allow the caller to pass it again on its next call to count_range_bits(). The next patches in the series will make fiemap and lseek use the new parameter. This change is part of a patchset that has the goal to make performance better for applications that use lseek's SEEK_HOLE and SEEK_DATA modes to iterate over the extents of a file. Two examples are the cp program from coreutils 9.0+ and the tar program (when using its --sparse / -S option). A sample test and results are listed in the changelog of the last patch in the series: 1/9 btrfs: remove leftover setting of EXTENT_UPTODATE state in an inode's io_tree 2/9 btrfs: add an early exit when searching for delalloc range for lseek/fiemap 3/9 btrfs: skip unnecessary delalloc searches during lseek/fiemap 4/9 btrfs: search for delalloc more efficiently during lseek/fiemap 5/9 btrfs: remove no longer used btrfs_next_extent_map() 6/9 btrfs: allow passing a cached state record to count_range_bits() 7/9 btrfs: update stale comment for count_range_bits() 8/9 btrfs: use cached state when looking for delalloc ranges with fiemap 9/9 btrfs: use cached state when looking for delalloc ranges with lseek Reported-by: Wang Yugui Link: https://lore.kernel.org/linux-btrfs/20221106073028.71F9.409509F4@e16-tech.com/ Link: https://lore.kernel.org/linux-btrfs/CAL3q7H5NSVicm7nYBJ7x8fFkDpno8z3PYt5aPU43Bajc1H0h1Q@mail.gmail.com/ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent-io-tree.c | 47 ++++++++++++++++++++++++++++++++++++++++++++--- fs/btrfs/extent-io-tree.h | 3 ++- fs/btrfs/file.c | 3 ++- fs/btrfs/inode.c | 2 +- 4 files changed, 49 insertions(+), 6 deletions(-) commit cfd7a17d9b4588dd7a29e1a131257bee3e72b766 Author: Filipe Manana Date: Fri Nov 11 11:50:31 2022 +0000 btrfs: remove no longer used btrfs_next_extent_map() There are no more users of btrfs_next_extent_map(), the previous patch in the series ("btrfs: search for delalloc more efficiently during lseek/fiemap") removed the last usage of the function, so delete it. This change is part of a patchset that has the goal to make performance better for applications that use lseek's SEEK_HOLE and SEEK_DATA modes to iterate over the extents of a file. Two examples are the cp program from coreutils 9.0+ and the tar program (when using its --sparse / -S option). A sample test and results are listed in the changelog of the last patch in the series: 1/9 btrfs: remove leftover setting of EXTENT_UPTODATE state in an inode's io_tree 2/9 btrfs: add an early exit when searching for delalloc range for lseek/fiemap 3/9 btrfs: skip unnecessary delalloc searches during lseek/fiemap 4/9 btrfs: search for delalloc more efficiently during lseek/fiemap 5/9 btrfs: remove no longer used btrfs_next_extent_map() 6/9 btrfs: allow passing a cached state record to count_range_bits() 7/9 btrfs: update stale comment for count_range_bits() 8/9 btrfs: use cached state when looking for delalloc ranges with fiemap 9/9 btrfs: use cached state when looking for delalloc ranges with lseek Reported-by: Wang Yugui Link: https://lore.kernel.org/linux-btrfs/20221106073028.71F9.409509F4@e16-tech.com/ Link: https://lore.kernel.org/linux-btrfs/CAL3q7H5NSVicm7nYBJ7x8fFkDpno8z3PYt5aPU43Bajc1H0h1Q@mail.gmail.com/ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent_map.c | 29 ----------------------------- fs/btrfs/extent_map.h | 2 -- 2 files changed, 31 deletions(-) commit 8ddc8274e4be9a35eafc5bef9ff64d94f452d193 Author: Filipe Manana Date: Fri Nov 11 11:50:30 2022 +0000 btrfs: search for delalloc more efficiently during lseek/fiemap During lseek (SEEK_HOLE/DATA) and fiemap, when processing a file range that corresponds to a hole or a prealloc extent, we have to check if there's any delalloc in the range. We do it by searching for delalloc ranges in the inode's io_tree (for unflushed delalloc) and in the inode's extent map tree (for delalloc that is flushing). We avoid searching the extent map tree if the number of outstanding extents is 0, as in that case we can't have extent maps for our search range in the tree that correspond to delalloc that is flushing. However if we have any unflushed delalloc, due to buffered writes or mmap writes, then the outstanding extents counter is not 0 and we'll search the extent map tree. The tree may be large because it can have lots of extent maps that were loaded by reads or created by previous writes, therefore taking a significant time to search the tree, specially if have a file with a lot of holes and/or prealloc extents. We can improve on this by instead of searching the extent map tree, searching the ordered extents tree of the inode, since when delalloc is flushing we create an ordered extent along with the new extent map, while holding the respective file range locked in the inode's io_tree. The ordered extents tree is typically much smaller, since ordered extents have a short life and get removed from the tree once they are completed, while extent maps can stay for a very long time in the extent map tree, either created by previous writes or loaded by read operations. So use the ordered extents tree instead of the extent maps tree. This change is part of a patchset that has the goal to make performance better for applications that use lseek's SEEK_HOLE and SEEK_DATA modes to iterate over the extents of a file. Two examples are the cp program from coreutils 9.0+ and the tar program (when using its --sparse / -S option). A sample test and results are listed in the changelog of the last patch in the series: 1/9 btrfs: remove leftover setting of EXTENT_UPTODATE state in an inode's io_tree 2/9 btrfs: add an early exit when searching for delalloc range for lseek/fiemap 3/9 btrfs: skip unnecessary delalloc searches during lseek/fiemap 4/9 btrfs: search for delalloc more efficiently during lseek/fiemap 5/9 btrfs: remove no longer used btrfs_next_extent_map() 6/9 btrfs: allow passing a cached state record to count_range_bits() 7/9 btrfs: update stale comment for count_range_bits() 8/9 btrfs: use cached state when looking for delalloc ranges with fiemap 9/9 btrfs: use cached state when looking for delalloc ranges with lseek Reported-by: Wang Yugui Link: https://lore.kernel.org/linux-btrfs/20221106073028.71F9.409509F4@e16-tech.com/ Link: https://lore.kernel.org/linux-btrfs/CAL3q7H5NSVicm7nYBJ7x8fFkDpno8z3PYt5aPU43Bajc1H0h1Q@mail.gmail.com/ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file.c | 152 ++++++++++++++++++-------------------------------------- 1 file changed, 48 insertions(+), 104 deletions(-) commit af979fd618a40009c5cae03de21403848b13a931 Author: Filipe Manana Date: Fri Nov 11 11:50:29 2022 +0000 btrfs: skip unnecessary delalloc searches during lseek/fiemap During lseek (SEEK_HOLE/DATA) and fiemap, when processing a file range that corresponds to a hole or a prealloc extent, if we find that there is no delalloc marked in the inode's io_tree but there is delalloc due to an extent map in the io tree, then on the next iteration that calls find_delalloc_subrange() we can skip searching the io tree again, since on the first call we had no delalloc in the io tree for the whole range. This change is part of a patchset that has the goal to make performance better for applications that use lseek's SEEK_HOLE and SEEK_DATA modes to iterate over the extents of a file. Two examples are the cp program from coreutils 9.0+ and the tar program (when using its --sparse / -S option). A sample test and results are listed in the changelog of the last patch in the series: 1/9 btrfs: remove leftover setting of EXTENT_UPTODATE state in an inode's io_tree 2/9 btrfs: add an early exit when searching for delalloc range for lseek/fiemap 3/9 btrfs: skip unnecessary delalloc searches during lseek/fiemap 4/9 btrfs: search for delalloc more efficiently during lseek/fiemap 5/9 btrfs: remove no longer used btrfs_next_extent_map() 6/9 btrfs: allow passing a cached state record to count_range_bits() 7/9 btrfs: update stale comment for count_range_bits() 8/9 btrfs: use cached state when looking for delalloc ranges with fiemap 9/9 btrfs: use cached state when looking for delalloc ranges with lseek Reported-by: Wang Yugui Link: https://lore.kernel.org/linux-btrfs/20221106073028.71F9.409509F4@e16-tech.com/ Link: https://lore.kernel.org/linux-btrfs/CAL3q7H5NSVicm7nYBJ7x8fFkDpno8z3PYt5aPU43Bajc1H0h1Q@mail.gmail.com/ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 40daf3e095dbd1059d7e600d27e5bb987f563561 Author: Filipe Manana Date: Fri Nov 11 11:50:28 2022 +0000 btrfs: add an early exit when searching for delalloc range for lseek/fiemap During fiemap and lseek (SEEK_HOLE/DATA), when looking for delalloc in a range corresponding to a hole or a prealloc extent, if we found the whole range marked as delalloc in the inode's io_tree, then we can terminate immediately and avoid searching the extent map tree. If not, and if the found delalloc starts at the same offset of our search start but ends before our search range's end, then we can adjust the search range for the search in the extent map tree. So implement those changes. This change is part of a patchset that has the goal to make performance better for applications that use lseek's SEEK_HOLE and SEEK_DATA modes to iterate over the extents of a file. Two examples are the cp program from coreutils 9.0+ and the tar program (when using its --sparse / -S option). A sample test and results are listed in the changelog of the last patch in the series: 1/9 btrfs: remove leftover setting of EXTENT_UPTODATE state in an inode's io_tree 2/9 btrfs: add an early exit when searching for delalloc range for lseek/fiemap 3/9 btrfs: skip unnecessary delalloc searches during lseek/fiemap 4/9 btrfs: search for delalloc more efficiently during lseek/fiemap 5/9 btrfs: remove no longer used btrfs_next_extent_map() 6/9 btrfs: allow passing a cached state record to count_range_bits() 7/9 btrfs: update stale comment for count_range_bits() 8/9 btrfs: use cached state when looking for delalloc ranges with fiemap 9/9 btrfs: use cached state when looking for delalloc ranges with lseek Reported-by: Wang Yugui Link: https://lore.kernel.org/linux-btrfs/20221106073028.71F9.409509F4@e16-tech.com/ Link: https://lore.kernel.org/linux-btrfs/CAL3q7H5NSVicm7nYBJ7x8fFkDpno8z3PYt5aPU43Bajc1H0h1Q@mail.gmail.com/ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 2c8f5e8cdf0f77670b1a9f72156ad4e82ed323d1 Author: Filipe Manana Date: Fri Nov 11 11:50:27 2022 +0000 btrfs: remove leftover setting of EXTENT_UPTODATE state in an inode's io_tree We don't need to set the EXTENT_UPDATE bit in an inode's io_tree to mark a range as uptodate, we rely on the pages themselves being uptodate - page reading is not triggered for already uptodate pages. Recently we removed most use of the EXTENT_UPTODATE for buffered IO with commit 52b029f42751 ("btrfs: remove unnecessary EXTENT_UPTODATE state in buffered I/O path"), but there were a few leftovers, namely when reading from holes and successfully finishing read repair. These leftovers are unnecessarily making an inode's tree larger and deeper, slowing down searches on it. So remove all the leftovers. This change is part of a patchset that has the goal to make performance better for applications that use lseek's SEEK_HOLE and SEEK_DATA modes to iterate over the extents of a file. Two examples are the cp program from coreutils 9.0+ and the tar program (when using its --sparse / -S option). A sample test and results are listed in the changelog of the last patch in the series: 1/9 btrfs: remove leftover setting of EXTENT_UPTODATE state in an inode's io_tree 2/9 btrfs: add an early exit when searching for delalloc range for lseek/fiemap 3/9 btrfs: skip unnecessary delalloc searches during lseek/fiemap 4/9 btrfs: search for delalloc more efficiently during lseek/fiemap 5/9 btrfs: remove no longer used btrfs_next_extent_map() 6/9 btrfs: allow passing a cached state record to count_range_bits() 7/9 btrfs: update stale comment for count_range_bits() 8/9 btrfs: use cached state when looking for delalloc ranges with fiemap 9/9 btrfs: use cached state when looking for delalloc ranges with lseek Reported-by: Wang Yugui Link: https://lore.kernel.org/linux-btrfs/20221106073028.71F9.409509F4@e16-tech.com/ Link: https://lore.kernel.org/linux-btrfs/CAL3q7H5NSVicm7nYBJ7x8fFkDpno8z3PYt5aPU43Bajc1H0h1Q@mail.gmail.com/ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent-io-tree.h | 7 ------- fs/btrfs/extent_io.c | 19 +++---------------- 2 files changed, 3 insertions(+), 23 deletions(-) commit 947a629988f191807d2d22ba63ae18259bb645c5 Author: Qu Wenruo Date: Wed Sep 14 13:32:51 2022 +0800 btrfs: move tree block parentness check into validate_extent_buffer() [BACKGROUND] Although both btrfs metadata and data has their read time verification done at endio time (btrfs_validate_metadata_buffer() and btrfs_verify_data_csum()), metadata has extra verification, mostly parentness check including first key/transid/owner_root/level, done at read_tree_block() and btrfs_read_extent_buffer(). On the other hand, all the data verification is done at endio context. [ENHANCEMENT] This patch will make a new union in btrfs_bio, taking the space of the old data checksums, thus it will not increase the memory usage. With that extra btrfs_tree_parent_check inside btrfs_bio, we can just pass the check parameter into read_extent_buffer_pages(), and before submitting the bio, we can copy the check structure into btrfs_bio. And finally at endio time, we can grab btrfs_bio::parent_check and pass it to validate_extent_buffer(), to move the remaining checks into it. This brings the following benefits: - Much simpler btrfs_read_extent_buffer() Now it only needs to iterate through all mirrors. - Simpler read-time transid check Previously we go verify_parent_transid() after reading out the extent buffer. Now the transid check is done inside the endio function, no other code can modify the content. Thus no need to use the extent lock anymore. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 73 ++++++++++++++++++++++++++++++++++++++-------------- fs/btrfs/extent_io.c | 18 ++++++++++--- fs/btrfs/extent_io.h | 5 ++-- fs/btrfs/volumes.h | 25 +++++++++++++++--- 4 files changed, 93 insertions(+), 28 deletions(-) commit 789d6a3a876e32c23fc9633d5b372d02a5188f0e Author: Qu Wenruo Date: Wed Sep 14 13:32:50 2022 +0800 btrfs: concentrate all tree block parentness check parameters into one structure There are several different tree block parentness check parameters used across several helpers: - level Mandatory - transid Under most cases it's mandatory, but there are several backref cases which skips this check. - owner_root - first_key Utilized by most top-down tree search routine. Otherwise can be skipped. Those four members are not always mandatory checks, and some of them are the same u64, which means if some arguments got swapped compiler will not catch it. Furthermore if we're going to further expand the parentness check, we need to modify quite some helpers just to add one more parameter. This patch will concentrate all these members into a structure called btrfs_tree_parent_check, and pass that structure for the following helpers: - btrfs_read_extent_buffer() - read_tree_block() Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/backref.c | 15 ++++++++---- fs/btrfs/ctree.c | 28 +++++++++++++--------- fs/btrfs/disk-io.c | 63 ++++++++++++++++++++++++++++--------------------- fs/btrfs/disk-io.h | 36 ++++++++++++++++++++++++---- fs/btrfs/extent-tree.c | 12 ++++++---- fs/btrfs/print-tree.c | 14 ++++++----- fs/btrfs/qgroup.c | 18 ++++++++++---- fs/btrfs/relocation.c | 11 ++++++--- fs/btrfs/tree-log.c | 25 ++++++++++++++------ fs/btrfs/tree-mod-log.c | 9 +++++-- 10 files changed, 159 insertions(+), 72 deletions(-) commit bb21e30260a672172a26ee1626dc1463215cf18c Author: Anand Jain Date: Mon Nov 7 23:07:17 2022 +0800 btrfs: move device->name RCU allocation and assign to btrfs_alloc_device() There is a repeating code section in the parent function after calling btrfs_alloc_device(), as below: name = rcu_string_strdup(path, GFP_...); if (!name) { btrfs_free_device(device); return ERR_PTR(-ENOMEM); } rcu_assign_pointer(device->name, name); Except in add_missing_dev() for obvious reasons. This patch consolidates that repeating code into the btrfs_alloc_device() itself so that the parent function doesn't have to duplicate code. This consolidation also helps to review issues regarding RCU lock violation with device->name. Parent function device_list_add() and add_missing_dev() use GFP_NOFS for the allocation, whereas the rest of the parent functions use GFP_KERNEL, so bring the NOFS allocation context using memalloc_nofs_save() in the function device_list_add() and add_missing_dev() is already doing it. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 10 +------- fs/btrfs/volumes.c | 68 +++++++++++++++++++++++--------------------------- fs/btrfs/volumes.h | 4 +-- 3 files changed, 34 insertions(+), 48 deletions(-) commit 3e09b5b2293f21e6e28929b6bbb73833678bfdd1 Author: David Sterba Date: Mon Nov 7 17:30:21 2022 +0100 btrfs: constify input buffer parameter in compression code The input buffers passed down to compression must never be changed, switch type to u8 as it's a raw byte buffer and use const. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/compression.c | 4 ++-- fs/btrfs/compression.h | 8 ++++---- fs/btrfs/lzo.c | 2 +- fs/btrfs/zlib.c | 2 +- fs/btrfs/zstd.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) commit ad3daf1c3f5bcbba49a302d8d0e46467556bf6f3 Author: Qu Wenruo Date: Mon Nov 7 15:32:31 2022 +0800 btrfs: raid56: remove the old error tracking system Since all the recovery paths have been migrated to the new error bitmap based system, we can remove the old stripe number based system. This cleanup involves one behavior change: - Rebuild rbio can no longer be merged Previously a rebuild rbio (caused by retry after data csum mismatch) can be merged, if the error happens in the same stripe. But with the new error bitmap based solution, it's much harder to compare error bitmaps. So here we just don't merge rebuild rbio at all. This may introduce some performance impact at extreme corner cases, but we're willing to take it. Other than that, this patch will cleanup the following members: - rbio::faila - rbio::failb They will be replaced by per-vertical stripe check, which is more accurate. - rbio::error It will be replace by per-vertical stripe error bitmap check. - Allow get_rbio_vertical_errors() to accept NULL pointers for @faila and @failb Some call sites only want to check if we have errors beyond the tolerance. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 234 +++++++++++++----------------------------------------- fs/btrfs/raid56.h | 8 -- 2 files changed, 53 insertions(+), 189 deletions(-) commit 75b47033296595efb208cc563cbb8cf4fb7c3ebc Author: Qu Wenruo Date: Mon Nov 7 15:32:30 2022 +0800 btrfs: raid56: migrate recovery and scrub recovery path to use error_bitmap Since we have rbio::error_bitmap to indicate exactly where the errors are (including read error and csum mismatch error), we can make recovery path more accurate. For example: 0 32K 64K Data 1 |XXXXXXXX| | Data 2 | |XXXXXXXXX| Parity | | | 1) Get csum mismatch when reading data 1 [0, 32K) 2) Mark corresponding range error The old code will mark the whole data 1 stripe as error. While the new code will only mark data 1 [0, 32K) as error. 3) Recovery path The old code will recover data 1 [0, 64K), all using Data 2 and parity. This means, Data 1 [32K, 64K) will be corrupted data, as data 2 [32K, 64K) is already corrupted. While the new code will only recover data 1 [0, 32K), as only that range has error so far. This new behavior can avoid populating rbio cache with incorrect data. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 279 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 193 insertions(+), 86 deletions(-) commit 2942a50dea74126bf3395b3060a808fb046136fc Author: Qu Wenruo Date: Mon Nov 7 15:32:29 2022 +0800 btrfs: raid56: introduce btrfs_raid_bio::error_bitmap Currently btrfs raid56 uses btrfs_raid_bio::faila and failb to indicate which stripe(s) had IO errors. But that has some problems: - If one sector failed csum check, the whole stripe where the corruption is will be marked error. This can reduce the chance we do recover, like this: 0 4K 8K Data 1 |XX| | Data 2 | |XX| Parity | | | In above case, 0~4K in data 1 should be recovered using data 2 and parity, while 4K~8K in data 2 should be recovered using data 1 and parity. Currently if we trigger read on 0~4K of data 1, we will also recover 4K~8K of data 1 using corrupted data 2 and parity, causing wrong result in rbio cache. - Harder to expand for future M-N scheme As we're limited to just faila/b, two corruptions. - Harder to expand to handle extra csum errors This can be problematic if we start to do csum verification. This patch will introduce an extra @error_bitmap, where one bit represents error that happened for that sector. The choice to introduce a new error bitmap other than reusing sector_ptr, is to avoid extra search between rbio::stripe_sectors[] and rbio::bio_sectors[]. Since we can submit bio using sectors from both sectors, doing proper search on both array will more complex. Although the new bitmap will take extra memory, later we can remove things like @error and faila/b to save some memory. Currently the new error bitmap and failab mechanism coexists, the error bitmap is only updated at endio time and recover entrance. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++---- fs/btrfs/raid56.h | 11 +++++++ 2 files changed, 103 insertions(+), 7 deletions(-) commit e55cf7ca85e323028774feeb117ad94358a78070 Author: David Sterba Date: Fri Oct 28 03:53:04 2022 +0200 btrfs: pass btrfs_inode to btrfs_add_delayed_iput The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/extent_io.c | 2 +- fs/btrfs/free-space-cache.c | 4 ++-- fs/btrfs/inode.c | 19 +++++++++---------- fs/btrfs/ordered-data.c | 2 +- fs/btrfs/relocation.c | 4 ++-- fs/btrfs/tree-log.c | 24 ++++++++++++------------ 7 files changed, 28 insertions(+), 29 deletions(-) commit 5fc24314c89491cb2f53583d5e513731d58c7699 Author: David Sterba Date: Fri Oct 28 03:47:16 2022 +0200 btrfs: use btrfs_inode inside btrfs_verify_data_csum The function is mostly using internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 99a01bd6388e52dabb56015b939c1e9b26b0196e Author: David Sterba Date: Fri Oct 28 03:47:16 2022 +0200 btrfs: use btrfs_inode inside compress_file_range The function is mostly using internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit 99a81a444448ef6cde906500dbdf26aa5961e291 Author: David Sterba Date: Fri Oct 28 03:37:50 2022 +0200 btrfs: switch async_chunk::inode to btrfs_inode The async_chunk::inode structure is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7a0443f031a68188a38e0845686747d4ccd2c16d Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_inherit_iflags The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 4c45a4f4de1b7083800954afa4821c67df157967 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to inode_tree_add The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3c1b1c4c0e874dc9f2cf2faa231d39c4ca0d5888 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to fixup_tree_root_location The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d1de429bcedac78d047c545d748c7b45fe16d56d Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_inode_by_name The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5b7544cb06fef21e4f8c189082a7bf02fd9832a1 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_unlink_subvol The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit bd54766e40df1300564babbbc31866d36c0c4bb6 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_clear_delalloc_extent The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/extent-io-tree.c | 2 +- fs/btrfs/inode.c | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) commit 62798a491561e1e1bbbd08873561532f19525fbf Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_split_delalloc_extent The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/extent-io-tree.c | 2 +- fs/btrfs/inode.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) commit 4c5d166f6b3674473905ff133daea4de33f00b91 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_set_delalloc_extent The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/extent-io-tree.c | 2 +- fs/btrfs/inode.c | 33 ++++++++++++++++----------------- 3 files changed, 18 insertions(+), 19 deletions(-) commit 2454151cdede9f6f3a2213ae84b07d9a9edb485e Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_merge_delalloc_extent The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/extent-io-tree.c | 6 ++---- fs/btrfs/inode.c | 16 ++++++++-------- 3 files changed, 11 insertions(+), 13 deletions(-) commit 0988fc7bda79feff046056f032fd149ab08e03d1 Author: David Sterba Date: Fri Oct 28 02:55:51 2022 +0200 btrfs: switch extent_io_tree::private_data to btrfs_inode and rename The extent_io_tree::private_data was meant to be a preparatory work for the metadata inode rework but that never materialized. Now it's used only for an inode so it's better to change the appropriate type and rename it. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent-io-tree.c | 32 ++++++++++++++++---------------- fs/btrfs/extent-io-tree.h | 3 ++- fs/btrfs/inode.c | 2 +- include/trace/events/btrfs.h | 27 ++++++++++++--------------- 4 files changed, 31 insertions(+), 33 deletions(-) commit 35da5a7edec32935135737608c9d9da24a419bab Author: David Sterba Date: Fri Oct 28 02:47:06 2022 +0200 btrfs: drop private_data parameter from extent_io_tree_init All callers except one pass NULL, so the parameter can be dropped and the inode::io_tree initialization can be open coded. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/disk-io.c | 8 ++++---- fs/btrfs/extent-io-tree.c | 5 ++--- fs/btrfs/extent-io-tree.h | 3 +-- fs/btrfs/inode.c | 5 +++-- fs/btrfs/relocation.c | 3 +-- fs/btrfs/tests/btrfs-tests.c | 2 +- fs/btrfs/tests/extent-io-tests.c | 4 ++-- fs/btrfs/transaction.c | 4 ++-- fs/btrfs/volumes.c | 3 +-- 9 files changed, 17 insertions(+), 20 deletions(-) commit 3c4f91e23a87a486426db5e481ed315b1b2640f1 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_delete_subvolume The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/inode.c | 10 +++++----- fs/btrfs/ioctl.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit e569b1d545511492d5fc1a062ef8b63fd1b78d84 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to __unlink_start_trans The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 621af94af3342c9a8c3df34b4231d7707accd00e Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_check_data_csum The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 4 +--- fs/btrfs/compression.c | 2 +- fs/btrfs/inode.c | 15 +++++++-------- 3 files changed, 9 insertions(+), 12 deletions(-) commit 36eeaef5595dc09f1dc4c859d96ffb3cd69dee55 Author: David Sterba Date: Fri Oct 28 02:22:15 2022 +0200 btrfs: switch btrfs_writepage_fixup::inode to btrfs_inode The btrfs_writepage_fixup structure is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 82ca5a04f03fa1e74a5034ec61ac86d9c817a2b9 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_add_delalloc_inodes The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 7152b425da54b6aa6ddfb0cbc0603614cc2400bd Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_dirty_inode The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit e5d4d75bd3241d0a5990060ef9601bf17adf9bb5 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_inode_unlock The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/defrag.c | 8 ++++---- fs/btrfs/delayed-inode.c | 2 +- fs/btrfs/file.c | 32 ++++++++++++++++---------------- fs/btrfs/inode.c | 18 +++++++++--------- fs/btrfs/ioctl.c | 6 +++--- fs/btrfs/reflink.c | 2 +- fs/btrfs/relocation.c | 2 +- 8 files changed, 36 insertions(+), 36 deletions(-) commit 29b6352b1494bd7ec6a14bda087f8eb858d2fc1f Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_inode_lock The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/defrag.c | 4 ++-- fs/btrfs/delayed-inode.c | 2 +- fs/btrfs/file.c | 16 ++++++++-------- fs/btrfs/inode.c | 14 +++++++------- fs/btrfs/ioctl.c | 2 +- fs/btrfs/reflink.c | 2 +- fs/btrfs/relocation.c | 2 +- 8 files changed, 22 insertions(+), 22 deletions(-) commit d9dcae67b7fe1f8c7d974a7a002c81d9b02b7281 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_truncate The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) commit bb41632ea7d252855f7a12f269afefc18a84e07b Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_submit_dio_bio The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e2884c3d445669c231fd8ca4c6fd160e729ec862 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: switch btrfs_dio_private::inode to btrfs_inode The btrfs_dio_private structure is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/inode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d8f9268ece91e6fe887b444780787828890a8051 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_repair_one_sector The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/compression.c | 2 +- fs/btrfs/extent_io.c | 17 ++++++++--------- fs/btrfs/extent_io.h | 2 +- fs/btrfs/inode.c | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) commit c5ca391b0dd82d4c0457159286bd19f2364a70be Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to submit_one_bio The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d781c1c315ce649002a9fd0387edc3ee93271743 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_submit_dio_repair_bio The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/extent_io.c | 3 ++- fs/btrfs/inode.c | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit b762041629e73d8e24a10aae4bf256774fbbd082 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_submit_data_read_bio The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/extent_io.c | 5 +++-- fs/btrfs/inode.c | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) commit 535a7e5d6b7e04da0336c632c834a575e82b5082 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_submit_data_write_bio The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/extent_io.c | 2 +- fs/btrfs/inode.c | 17 ++++++++--------- 3 files changed, 10 insertions(+), 11 deletions(-) commit 644094fd285499b484e50a8e986965b550a0924e Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_submit_metadata_bio The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/disk-io.c | 8 ++++---- fs/btrfs/disk-io.h | 2 +- fs/btrfs/extent_io.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 5fcdadc2704534ef3a7b99aef65d54183c723493 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_wq_submit_bio The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/disk-io.c | 8 ++++---- fs/btrfs/disk-io.h | 2 +- fs/btrfs/inode.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit bfa17066822cead4fb8a6a5d4a214a2c527e4614 Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_submit_bio_start_direct_io The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/inode.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 882681ac98837aa7683a59020c0c98d05479805f Author: David Sterba Date: Thu Oct 27 02:41:32 2022 +0200 btrfs: pass btrfs_inode to btrfs_submit_bio_start The function is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/inode.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit da67daab8dd679b9a10dee86520c530011342a8d Author: David Sterba Date: Thu Oct 27 02:40:36 2022 +0200 btrfs: switch async_submit_bio::inode to btrfs_inode The async bio submit is for internal interfaces so we should use the btrfs_inode. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/disk-io.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ad65ecf30b037549a17d2e402fac8d39242073d1 Author: David Sterba Date: Thu Oct 27 02:30:45 2022 +0200 btrfs: simplify btree_submit_bio_start and btrfs_submit_bio_start parameters After previous patches the unused parameters can be removed from btree_submit_bio_start and btrfs_submit_bio_start as they don't need to conform to the extent_submit_bio_start_t typedef. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 3 +-- fs/btrfs/disk-io.c | 11 +++-------- fs/btrfs/disk-io.h | 3 +-- fs/btrfs/inode.c | 3 +-- 4 files changed, 6 insertions(+), 14 deletions(-) commit ab2072b2921eced166dbdec1d65b0284b6eba2b9 Author: David Sterba Date: Thu Oct 27 02:22:19 2022 +0200 btrfs: change how submit bio callback is passed to btrfs_wq_submit_bio There's a callback function parameter for btrfs_wq_submit_bio that can be one of: metadata, buffered data, direct io data. The callback abstraction is unnecessary as we have all functions available. Replace the parameter with a command that leads to a direct call in run_one_async_start. The called functions can be then simplified and we can also remove the extent_submit_bio_start_t typedef. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 5 +++++ fs/btrfs/disk-io.c | 33 +++++++++++++++++++++++---------- fs/btrfs/disk-io.h | 12 ++++++++++-- fs/btrfs/extent_io.h | 3 --- fs/btrfs/inode.c | 15 +++++++-------- 5 files changed, 45 insertions(+), 23 deletions(-) commit 7920b773bd8a458c05b2ba4581fe19c5704fffd7 Author: David Sterba Date: Thu Oct 27 02:07:10 2022 +0200 btrfs: drop parameter compression_type from btrfs_submit_dio_repair_bio Compression and direct io don't work together so the compression parameter can be dropped after previous patch that changed the call to direct. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 4 +--- fs/btrfs/extent_io.c | 2 +- fs/btrfs/inode.c | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) commit 19af6a7d345acc885f970d57577fa80ca4ad3d98 Author: David Sterba Date: Thu Oct 27 02:02:32 2022 +0200 btrfs: change how repair action is passed to btrfs_repair_one_sector There's a function pointer passed to btrfs_repair_one_sector that will submit the right bio for repair. However there are only two callbacks, for buffered and for direct IO. This can be simplified to a bool-based switch and call either function, indirect calls in this case is an unnecessary abstraction. This allows to remove the submit_bio_hook_t typedef. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 3 +++ fs/btrfs/compression.c | 2 +- fs/btrfs/extent_io.c | 14 +++++++++----- fs/btrfs/extent_io.h | 6 +----- fs/btrfs/inode.c | 9 ++++----- 5 files changed, 18 insertions(+), 16 deletions(-) commit 961f5b8bf48a463ac5fe5b13143426d79eb41817 Author: David Sterba Date: Mon Oct 31 20:33:46 2022 +0100 btrfs: convert btrfs_block_group::seq_zone to runtime flag In zoned mode the sequential status of zone can be also tracked in the runtime flags of block group. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/block-group.h | 5 ++--- fs/btrfs/zoned.c | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 0d7764ff58b4b45c39eb03f2c74a819c1a88fa7b Author: David Sterba Date: Mon Oct 31 20:33:44 2022 +0100 btrfs: convert btrfs_block_group::needs_free_space to runtime flag We already have flags in block group to track various status bits, convert needs_free_space as well and reduce size of btrfs_block_group. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/block-group.c | 2 +- fs/btrfs/block-group.h | 8 ++------ fs/btrfs/free-space-tree.c | 10 +++++----- fs/btrfs/tests/free-space-tree-tests.c | 2 +- 4 files changed, 9 insertions(+), 13 deletions(-) commit fd463ac4616e69c7306c680dabfe857a2f50fc69 Author: David Sterba Date: Mon Oct 31 20:33:42 2022 +0100 btrfs: zoned: use helper to check a power of two zone size We have a 64bit compatible helper to check if a value is a power of two, use it instead of open coding it. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/zoned.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9e5e6d4e2e5e37e28bf2be85fa08761e33aa5efb Author: David Sterba Date: Mon Oct 31 20:33:40 2022 +0100 btrfs: zlib: use copy_page for full page copy The copy_page helper may use an optimized version for full page copy (eg. on s390 there's a special instruction for that), there's one more left to convert. Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/zlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2a041657774102b184cc41369a53be3d024e8ee Author: Filipe Manana Date: Tue Nov 1 16:15:54 2022 +0000 btrfs: send: bump the extent reference count limit for backref walking After the previous patchset which is comprised of the following patches: 01/17 btrfs: fix inode list leak during backref walking at resolve_indirect_refs() 02/17 btrfs: fix inode list leak during backref walking at find_parent_nodes() 03/17 btrfs: fix ulist leaks in error paths of qgroup self tests 04/17 btrfs: remove pointless and double ulist frees in error paths of qgroup tests 05/17 btrfs: send: avoid unnecessary path allocations when finding extent clone 06/17 btrfs: send: update comment at find_extent_clone() 07/17 btrfs: send: drop unnecessary backref context field initializations 08/17 btrfs: send: avoid unnecessary backref lookups when finding clone source 09/17 btrfs: send: optimize clone detection to increase extent sharing 10/17 btrfs: use a single argument for extent offset in backref walking functions 11/17 btrfs: use a structure to pass arguments to backref walking functions 12/17 btrfs: reuse roots ulist on each leaf iteration for iterate_extent_inodes() 13/17 btrfs: constify ulist parameter of ulist_next() 14/17 btrfs: send: cache leaf to roots mapping during backref walking 15/17 btrfs: send: skip unnecessary backref iterations 16/17 btrfs: send: avoid double extent tree search when finding clone source 17/17 btrfs: send: skip resolution of our own backref when finding clone source we have now much better performance when doing backref walking in the send code, so we can increase the current limit from 64 to 1024 references. This limit is still a bit conservative because there are still edge cases where backref walking will be too slow and spend a lot of cpu time, some IO reading b+tree nodes/leaves and memory. The goal is to eventually get rid of any limit, but for now bump it as it benefits users with extents shared more than 64 times and up to 1024 times, allowing for more deduplication at the destination without having to run a dedupe tool after a receive. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adf0241868bd46c7be8012ef99cb88c7f47c16ce Author: Filipe Manana Date: Tue Nov 1 16:15:53 2022 +0000 btrfs: send: skip resolution of our own backref when finding clone source When doing backref walking to determine a source range to clone from, it is worthless to collect and resolve our own data backref, as we can't obviously use it as a clone source and it represents the range we want to clone into. Collecting the backref implies doing the extra work to resolve it, doing the search for a file extent item in a subvolume tree, etc. Skipping the data backref is valid as long as we only have the send root as the single clone root, otherwise the leaf with the file extent item may be accessible from another clone root due to shared subtrees created by snapshots, and therefore we have to collect the backref and resolve it. So add a callback to the backref walking code to guide it to skip data backrefs. This change is part of a patchset comprised of the following patches: 01/17 btrfs: fix inode list leak during backref walking at resolve_indirect_refs() 02/17 btrfs: fix inode list leak during backref walking at find_parent_nodes() 03/17 btrfs: fix ulist leaks in error paths of qgroup self tests 04/17 btrfs: remove pointless and double ulist frees in error paths of qgroup tests 05/17 btrfs: send: avoid unnecessary path allocations when finding extent clone 06/17 btrfs: send: update comment at find_extent_clone() 07/17 btrfs: send: drop unnecessary backref context field initializations 08/17 btrfs: send: avoid unnecessary backref lookups when finding clone source 09/17 btrfs: send: optimize clone detection to increase extent sharing 10/17 btrfs: use a single argument for extent offset in backref walking functions 11/17 btrfs: use a structure to pass arguments to backref walking functions 12/17 btrfs: reuse roots ulist on each leaf iteration for iterate_extent_inodes() 13/17 btrfs: constify ulist parameter of ulist_next() 14/17 btrfs: send: cache leaf to roots mapping during backref walking 15/17 btrfs: send: skip unnecessary backref iterations 16/17 btrfs: send: avoid double extent tree search when finding clone source 17/17 btrfs: send: skip resolution of our own backref when finding clone source The following test was run on non-debug kernel (Debian's default kernel config) before and after applying the patchset: $ cat test-send-many-shared-extents.sh #!/bin/bash DEV=/dev/sdh MNT=/mnt/sdh umount $DEV &> /dev/null mkfs.btrfs -f $DEV mount $DEV $MNT num_files=50000 num_clones_per_file=50 for ((i = 1; i <= $num_files; i++)); do xfs_io -f -c "pwrite 0 64K" $MNT/file_$i > /dev/null echo -ne "\r$i files created..." done echo btrfs subvolume snapshot -r $MNT $MNT/snap1 cloned=0 for ((i = 1; i <= $num_clones_per_file; i++)); do for ((j = 1; j <= $num_files; j++)); do cp --reflink=always $MNT/file_$j $MNT/file_${j}_clone_${i} cloned=$((cloned + 1)) echo -ne "\r$cloned / $((num_files * num_clones_per_file)) clone operations" done done echo btrfs subvolume snapshot -r $MNT $MNT/snap2 # Unmount and mount again to clear all cached metadata (and data). umount $DEV mount $DEV $MNT start=$(date +%s%N) btrfs send $MNT/snap2 > /dev/null end=$(date +%s%N) dur=$(( (end - start) / 1000000000 )) echo -e "\nFull send took $dur seconds" # Unmount and mount again to clear all cached metadata (and data). umount $DEV mount $DEV $MNT start=$(date +%s%N) btrfs send -p $MNT/snap1 $MNT/snap2 > /dev/null end=$(date +%s%N) dur=$(( (end - start) / 1000000000 )) echo -e "\nIncremental send took $dur seconds" umount $MNT Before applying the patchset: (...) Full send took 1108 seconds (...) Incremental send took 1135 seconds After applying the whole patchset: (...) Full send took 268 seconds (-75.8%) (...) Incremental send took 316 seconds (-72.2%) Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 35 +++++++++++++++++++++-------------- fs/btrfs/backref.h | 9 +++++++++ fs/btrfs/send.c | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 14 deletions(-) commit f73853c7168aef0e071c160979af05a148691e61 Author: Filipe Manana Date: Tue Nov 1 16:15:52 2022 +0000 btrfs: send: avoid double extent tree search when finding clone source At find_extent_clone() we search twice for the extent item corresponding to the data extent that the current file extent items points to: 1) Once with a call to extent_from_logical(); 2) Once again during backref walking, through iterate_extent_inodes() which eventually leads to find_parent_nodes() where we will search again the extent tree for the same extent item. The extent tree can be huge, so doing this one extra search for every extent we want to send adds up and it's expensive. The first call is there since the send code was introduced and it accomplishes two things: 1) Check that the extent is flagged as a data extent in the extent tree. But it can not be anything else, otherwise we wouldn't have a file extent item in the send root pointing to it. This was probably added to catch bugs in the early days where send was yet too young and the interaction with everything else was far from perfect; 2) Check how many direct references there are on the extent, and if there's too many (more than SEND_MAX_EXTENT_REFS), avoid doing the backred walking as it may take too long and slowdown send. So improve on this by having a callback in the backref walking code that is called when it finds the extent item in the extent tree, and have those checks done in the callback. When the callback returns anything different from 0, it stops the backref walking code. This way we do a single search on the extent tree for the extent item of our data extent. Also, before this change we were only checking the number of references on the data extent against SEND_MAX_EXTENT_REFS, but after starting backref walking we will end up resolving backrefs for extent buffers in the path from a leaf having a file extent item pointing to our data extent, up to roots of trees from which the extent buffer is accessible from, due to shared subtrees resulting from snapshoting. We were therefore allowing for the possibility for send taking too long due to some node in the path from the leaf to a root node being shared too many times. After this change we check for reference counts being greater than SEND_MAX_EXTENT_REFS for both data extents and metadata extents. This change is part of a patchset comprised of the following patches: 01/17 btrfs: fix inode list leak during backref walking at resolve_indirect_refs() 02/17 btrfs: fix inode list leak during backref walking at find_parent_nodes() 03/17 btrfs: fix ulist leaks in error paths of qgroup self tests 04/17 btrfs: remove pointless and double ulist frees in error paths of qgroup tests 05/17 btrfs: send: avoid unnecessary path allocations when finding extent clone 06/17 btrfs: send: update comment at find_extent_clone() 07/17 btrfs: send: drop unnecessary backref context field initializations 08/17 btrfs: send: avoid unnecessary backref lookups when finding clone source 09/17 btrfs: send: optimize clone detection to increase extent sharing 10/17 btrfs: use a single argument for extent offset in backref walking functions 11/17 btrfs: use a structure to pass arguments to backref walking functions 12/17 btrfs: reuse roots ulist on each leaf iteration for iterate_extent_inodes() 13/17 btrfs: constify ulist parameter of ulist_next() 14/17 btrfs: send: cache leaf to roots mapping during backref walking 15/17 btrfs: send: skip unnecessary backref iterations 16/17 btrfs: send: avoid double extent tree search when finding clone source 17/17 btrfs: send: skip resolution of our own backref when finding clone source Performance test results are in the changelog of patch 17/17. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 31 +++++++++------- fs/btrfs/backref.h | 9 +++-- fs/btrfs/send.c | 103 ++++++++++++++++++++++++----------------------------- 3 files changed, 73 insertions(+), 70 deletions(-) commit 88ffb665c894b1929b30b09e05506ff359d9fb89 Author: Filipe Manana Date: Tue Nov 1 16:15:51 2022 +0000 btrfs: send: skip unnecessary backref iterations When looking for a clone source for an extent, we are iterating over all the backreferences for an extent. This is often a waste of time, because once we find a good clone source we could stop immediately instead of continuing backref walking, which is expensive. Basically what happens currently is this: 1) Call iterate_extent_inodes() to iterate over all the backreferences; 2) It calls btrfs_find_all_leafs() which in turn calls the main function to walk over backrefs and collect them - find_parent_nodes(); 3) Then we collect all the references for our target data extent from the extent tree (and delayed refs if any), add them to the rb trees, resolve all the indirect backreferences and search for all the file extent items in fs trees, building a list of inodes for each one of them (struct extent_inode_elem); 4) Then back at iterate_extent_inodes() we find all the roots associated to each found leaf, and call the callback __iterate_backrefs defined at send.c for each inode in the inode list associated to each leaf. Some times one the first backreferences we find in a fs tree is optimal to satisfy the clone operation that send wants to perform, and in that case we could stop immediately and avoid resolving all the remaining indirect backreferences (search fs trees for the respective file extent items, etc). This possibly if when we find a fs tree leaf with a file extent item we are able to know what are all the roots that can lead to the leaf - this is now possible after the previous patch in the series that adds a cache that maps leaves to a list of roots. So we can now shortcircuit backref walking during send, by having the callback we pass to iterate_extent_inodes() to be called when we find a file extent item for an indirect backreference, and have it return a special value when it found a suitable backreference and it does not need to look for more backreferences. This change does that. This change is part of a patchset comprised of the following patches: 01/17 btrfs: fix inode list leak during backref walking at resolve_indirect_refs() 02/17 btrfs: fix inode list leak during backref walking at find_parent_nodes() 03/17 btrfs: fix ulist leaks in error paths of qgroup self tests 04/17 btrfs: remove pointless and double ulist frees in error paths of qgroup tests 05/17 btrfs: send: avoid unnecessary path allocations when finding extent clone 06/17 btrfs: send: update comment at find_extent_clone() 07/17 btrfs: send: drop unnecessary backref context field initializations 08/17 btrfs: send: avoid unnecessary backref lookups when finding clone source 09/17 btrfs: send: optimize clone detection to increase extent sharing 10/17 btrfs: use a single argument for extent offset in backref walking functions 11/17 btrfs: use a structure to pass arguments to backref walking functions 12/17 btrfs: reuse roots ulist on each leaf iteration for iterate_extent_inodes() 13/17 btrfs: constify ulist parameter of ulist_next() 14/17 btrfs: send: cache leaf to roots mapping during backref walking 15/17 btrfs: send: skip unnecessary backref iterations 16/17 btrfs: send: avoid double extent tree search when finding clone source 17/17 btrfs: send: skip resolution of our own backref when finding clone source Performance test results are in the changelog of patch 17/17. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 73 ++++++++++++++++++++++++++++++++---------------- fs/btrfs/backref.h | 44 ++++++++++++++++++++++++----- fs/btrfs/send.c | 81 +++++++++++++++++++++++++++--------------------------- 3 files changed, 128 insertions(+), 70 deletions(-) commit 66d04209e5a8d3fc47900de6bd0c319790a52b3e Author: Filipe Manana Date: Tue Nov 1 16:15:50 2022 +0000 btrfs: send: cache leaf to roots mapping during backref walking During a send operation, when doing backref walking to determine which inodes/offsets/roots we can clone from, the most repetitive and expensive step is to map each leaf that has file extent items pointing to the target data extent to the IDs of the roots from which the leaves are accessible, which happens at iterate_extent_inodes(). That step requires finding every parent node of a leaf, then the parent of each parent, and so on until we reach a root node. So it's a naturally expensive operation, and repetitive because each leaf can have hundreds of file extent items (for a nodesize of 16K, that can be slightly over 200 file extent items). There's also temporal locality, as we process all file extent items from a leave before moving the next leaf. This change caches the mapping of leaves to root IDs, to avoid repeating those computations over and over again. The cache is limited to a maximum of 128 entries, with each entry being a struct with a size of 128 bytes, so the maximum cache size is 16K plus any nodes internally allocated by the maple tree that is used to index pointers to those structs. The cache is invalidated whenever we detect relocation happened since we started filling the cache, because if relocation happened then extent buffers for leaves and nodes of the trees used by a send operation may have been reallocated. This cache also allows for another important optimization that is introduced in the next patch in the series. This change is part of a patchset comprised of the following patches: 01/17 btrfs: fix inode list leak during backref walking at resolve_indirect_refs() 02/17 btrfs: fix inode list leak during backref walking at find_parent_nodes() 03/17 btrfs: fix ulist leaks in error paths of qgroup self tests 04/17 btrfs: remove pointless and double ulist frees in error paths of qgroup tests 05/17 btrfs: send: avoid unnecessary path allocations when finding extent clone 06/17 btrfs: send: update comment at find_extent_clone() 07/17 btrfs: send: drop unnecessary backref context field initializations 08/17 btrfs: send: avoid unnecessary backref lookups when finding clone source 09/17 btrfs: send: optimize clone detection to increase extent sharing 10/17 btrfs: use a single argument for extent offset in backref walking functions 11/17 btrfs: use a structure to pass arguments to backref walking functions 12/17 btrfs: reuse roots ulist on each leaf iteration for iterate_extent_inodes() 13/17 btrfs: constify ulist parameter of ulist_next() 14/17 btrfs: send: cache leaf to roots mapping during backref walking 15/17 btrfs: send: skip unnecessary backref iterations 16/17 btrfs: send: avoid double extent tree search when finding clone source 17/17 btrfs: send: skip resolution of our own backref when finding clone source Performance test results are in the changelog of patch 17/17. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 52 +++++++++++---- fs/btrfs/backref.h | 11 ++++ fs/btrfs/send.c | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 236 insertions(+), 12 deletions(-) commit fa104a879073f3974d673ad8c609d986042cf666 Author: Filipe Manana Date: Tue Nov 1 16:15:49 2022 +0000 btrfs: constify ulist parameter of ulist_next() The ulist_next() iterator function does not need to change the given ulist so make it const. This will allow the next patch in the series to pass a ulist to a function that does not need, and should not, modify the ulist. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/ulist.c | 2 +- fs/btrfs/ulist.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1baea6f18abf34037169d3b0c585356abb395376 Author: Filipe Manana Date: Tue Nov 1 16:15:48 2022 +0000 btrfs: reuse roots ulist on each leaf iteration for iterate_extent_inodes() At iterate_extent_inodes() we collect a ulist of leaves for a given extent with a call to btrfs_find_all_leafs() and then we enter a loop where we iterate over all the collected leaves. Each iteration of that loop does a call to btrfs_find_all_roots_safe(), to determine all roots from which a leaf is accessible, and that results in allocating and releasing a ulist to store the root IDs. Instead of allocating and releasing the roots ulist on every iteration, allocate a ulist before entering the loop and keep using it on each iteration, reinitializing the ulist at the end of each iteration. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) commit a2c8d27e5ee810b7149b42b88ddf7298e5b8dfe0 Author: Filipe Manana Date: Tue Nov 1 16:15:47 2022 +0000 btrfs: use a structure to pass arguments to backref walking functions The public backref walking functions have quite a lot of arguments that are passed down the call stack to find_parent_nodes(), the core function of the backref walking code. The next patches in series will need to add even arguments to these functions that should be passed not only to find_parent_nodes(), but also to other functions used by the later (directly or even lower in the call stack). So create a structure to hold all these arguments and state used by the main backref walking function, find_parent_nodes(), and use it as the argument for the public backref walking functions iterate_extent_inodes(), btrfs_find_all_leafs() and btrfs_find_all_roots(). Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 343 ++++++++++++++++++++++-------------------- fs/btrfs/backref.h | 76 ++++++++-- fs/btrfs/qgroup.c | 38 +++-- fs/btrfs/relocation.c | 19 ++- fs/btrfs/scrub.c | 14 +- fs/btrfs/send.c | 15 +- fs/btrfs/tests/qgroup-tests.c | 50 ++++-- 7 files changed, 328 insertions(+), 227 deletions(-) commit 6ce6ba534418132f4c727d5707fe2794c797299c Author: Filipe Manana Date: Tue Nov 1 16:15:46 2022 +0000 btrfs: use a single argument for extent offset in backref walking functions The interface for find_parent_nodes() has two extent offset related arguments: 1) One u64 pointer argument for the extent offset; 2) One boolean argument to tell if the extent offset should be ignored or not. These are confusing, becase the extent offset pointer can be NULL and in some cases callers pass a NULL value as a way to tell the backref walking code to ignore offsets in file extent items (and simply consider all file extent items that point to the target data extent). The boolean argument was added in commit c995ab3cda3f ("btrfs: add a flag to iterate_inodes_from_logical to find all extent refs for uncompressed extents"), but it was never really necessary, it was enough if it could find a way to get a NULL value passed to the "extent_item_pos" argument of find_parent_nodes(). The arguments are also passed to functions called by find_parent_nodes() and respective helper functions, which further makes everything more complicated than needed. Then we have several backref walking related functions that end up calling find_parent_nodes(), either directly or through some other function that they call, and for many we have to use an "extent_item_pos" (u64) argument and a boolean "ignore_offset" argument too. This is confusing and not really necessary. So use a single argument to specify the extent offset, as a simple u64 and not as a pointer, but using a special value of (u64)-1, defined as a documented constant, to indicate when the extent offset should be ignored. This is also preparation work for the upcoming patches in the series that add other arguments to find_parent_nodes() and other related functions that use it. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 87 +++++++++++++++++++++++++-------------------------- fs/btrfs/backref.h | 12 +++++-- fs/btrfs/relocation.c | 2 +- fs/btrfs/scrub.c | 2 +- fs/btrfs/send.c | 2 +- 5 files changed, 54 insertions(+), 51 deletions(-) commit c7499a64dcf62bf27968b0e9cce353c490b9ada1 Author: Filipe Manana Date: Tue Nov 1 16:15:45 2022 +0000 btrfs: send: optimize clone detection to increase extent sharing Currently send does not do the best decisions when it comes to decide between multiple clone sources, which results in clone operations for partial extent ranges, which has the following disadvantages: 1) We get less shared extents at the destination; 2) We have to read more data during the send operation and emit more write commands. Besides not being optimal behaviour, it also breaks user expectations and is often reported by users, with a recent example in the Link tag at the bottom of this change log. Part of the reason for this non-optimal behaviour is that the backref walking code does not provide information about the length of the file extent items that were found for each backref, so send is blind about which backref is the best to chose as a cloning source. The other existing reasons are just silliness, namely always prefering the inode with the lowest number when multiple are found for the same root and when we can clone from multiple roots, always prefer the send root over any of the other clone roots. This does not make any sense since any inode or root is fine and as good as any other inode/root. Fix this by making backref walking pass information about the number of bytes referenced by each file extent item and then have send's backref callback pick the inode with the highest number of bytes for each root. Finally select the root from which we can clone more bytes from. Example reproducer: $ cat test.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi mkfs.btrfs -f $DEV mount $DEV $MNT xfs_io -f -c "pwrite -S 0xab -b 2M 0 2M" $MNT/foo cp --reflink=always $MNT/foo $MNT/bar cp --reflink=always $MNT/foo $MNT/baz sync # Overwrite the second half of file foo. xfs_io -c "pwrite -S 0xcd -b 1M 1M 1M" $MNT/foo sync echo echo "*** fiemap in the original filesystem ***" echo xfs_io -c "fiemap -v" $MNT/foo xfs_io -c "fiemap -v" $MNT/bar xfs_io -c "fiemap -v" $MNT/baz echo btrfs filesystem du $MNT btrfs subvolume snapshot -r $MNT $MNT/snap btrfs send -f /tmp/send_stream $MNT/snap umount $MNT mkfs.btrfs -f $DEV &> /dev/null mount $DEV $MNT btrfs receive -f /tmp/send_stream $MNT echo echo "*** fiemap in the new filesystem ***" echo xfs_io -r -c "fiemap -v" $MNT/snap/foo xfs_io -r -c "fiemap -v" $MNT/snap/bar xfs_io -r -c "fiemap -v" $MNT/snap/baz echo btrfs filesystem du $MNT rm -f /tmp/send_stream rm -f /tmp/snap.fssum umount $MNT Before this change: $ ./test.sh (...) *** fiemap in the original filesystem *** /mnt/sdi/foo: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..2047]: 26624..28671 2048 0x2000 1: [2048..4095]: 30720..32767 2048 0x1 /mnt/sdi/bar: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..4095]: 26624..30719 4096 0x2001 /mnt/sdi/baz: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..4095]: 26624..30719 4096 0x2001 Total Exclusive Set shared Filename 2.00MiB 1.00MiB - /mnt/sdi/foo 2.00MiB 0.00B - /mnt/sdi/bar 2.00MiB 0.00B - /mnt/sdi/baz 6.00MiB 1.00MiB 2.00MiB /mnt/sdi Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap' At subvol /mnt/sdi/snap At subvol snap *** fiemap in the new filesystem *** /mnt/sdi/snap/foo: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..4095]: 26624..30719 4096 0x2001 /mnt/sdi/snap/bar: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..2047]: 26624..28671 2048 0x2000 1: [2048..4095]: 30720..32767 2048 0x1 /mnt/sdi/snap/baz: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..2047]: 26624..28671 2048 0x2000 1: [2048..4095]: 32768..34815 2048 0x1 Total Exclusive Set shared Filename 2.00MiB 0.00B - /mnt/sdi/snap/foo 2.00MiB 1.00MiB - /mnt/sdi/snap/bar 2.00MiB 1.00MiB - /mnt/sdi/snap/baz 6.00MiB 2.00MiB - /mnt/sdi/snap 6.00MiB 2.00MiB 2.00MiB /mnt/sdi We end up with two 1M extents that are not shared for files bar and baz. After this change: $ ./test.sh (...) *** fiemap in the original filesystem *** /mnt/sdi/foo: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..2047]: 26624..28671 2048 0x2000 1: [2048..4095]: 30720..32767 2048 0x1 /mnt/sdi/bar: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..4095]: 26624..30719 4096 0x2001 /mnt/sdi/baz: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..4095]: 26624..30719 4096 0x2001 Total Exclusive Set shared Filename 2.00MiB 1.00MiB - /mnt/sdi/foo 2.00MiB 0.00B - /mnt/sdi/bar 2.00MiB 0.00B - /mnt/sdi/baz 6.00MiB 1.00MiB 2.00MiB /mnt/sdi Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap' At subvol /mnt/sdi/snap At subvol snap *** fiemap in the new filesystem *** /mnt/sdi/snap/foo: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..4095]: 26624..30719 4096 0x2001 /mnt/sdi/snap/bar: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..2047]: 26624..28671 2048 0x2000 1: [2048..4095]: 30720..32767 2048 0x2001 /mnt/sdi/snap/baz: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..2047]: 26624..28671 2048 0x2000 1: [2048..4095]: 30720..32767 2048 0x2001 Total Exclusive Set shared Filename 2.00MiB 0.00B - /mnt/sdi/snap/foo 2.00MiB 0.00B - /mnt/sdi/snap/bar 2.00MiB 0.00B - /mnt/sdi/snap/baz 6.00MiB 0.00B - /mnt/sdi/snap 6.00MiB 0.00B 3.00MiB /mnt/sdi Now there's a much better sharing, files bar and baz share 1M of the extent of file foo and the second extent of files bar and baz is shared between themselves. This will later be turned into a test case for fstests. Link: https://lore.kernel.org/linux-btrfs/20221008005704.795b44b0@crass-HP-ZBook-15-G2/ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 9 +++++---- fs/btrfs/backref.h | 4 ++-- fs/btrfs/scrub.c | 4 ++-- fs/btrfs/send.c | 49 +++++++++++++++++++++++++++++++++---------------- 4 files changed, 42 insertions(+), 24 deletions(-) commit 22a3c0ac8ed0043af209a15928ae4c4855b0a4c4 Author: Filipe Manana Date: Tue Nov 1 16:15:44 2022 +0000 btrfs: send: avoid unnecessary backref lookups when finding clone source At find_extent_clone(), unless we are given an inline extent, a file extent item that represents hole or an extent that starts beyond the i_size, we always do backref walking to look for clone sources, unless if we have more than SEND_MAX_EXTENT_REFS (64) known references on the extent. However if we know we only have one reference in the extent item and only one clone source (the send root), then it's pointless to do the backref walking to search for clone sources, as we can't clone from any other root. So skip the backref walking in that case. The following test was run on a non-debug kernel (Debian's default kernel config): $ cat test.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi mkfs.btrfs -f $DEV mount $DEV $MNT # Create an extent tree that's not too small and none of the # extents is shared. for ((i = 1; i <= 50000; i++)); do xfs_io -f -c "pwrite 0 4K" $MNT/file_$i > /dev/null echo -ne "\r$i files created..." done echo btrfs subvolume snapshot -r $MNT $MNT/snap start=$(date +%s%N) btrfs send $MNT/snap > /dev/null end=$(date +%s%N) dur=$(( (end - start) / 1000000 )) echo -e "\nsend took $dur milliseconds" umount $MNT Before this change: send took 5389 milliseconds After this change: send took 4519 milliseconds (-16.1%) Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/send.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 344174a1a68a55599d3a264db47d96583ff66473 Author: Filipe Manana Date: Tue Nov 1 16:15:43 2022 +0000 btrfs: send: drop unnecessary backref context field initializations At find_extent_clone() we are initializing to zero the 'found_itself' and 'found' fields of the backref context before we use it but we have already initialized the structure to zeroes when we declared it on stack, so it's pointless to initialize those fields and they are unnecessarily increasing the object text size with two "mov" instructions (x86_64). Similarly make the 'extent_len' initialization more clear by using an if- -then-else instead of a double assignment to it in case the extent's end crosses the i_size boundary. Before this change: $ size fs/btrfs/send.o text data bss dec hex filename 68694 4252 16 72962 11d02 fs/btrfs/send.o After this change: $ size fs/btrfs/send.o text data bss dec hex filename 68678 4252 16 72946 11cf2 fs/btrfs/send.o Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/send.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d3f41317f0fedac6b0a3de68b3dab66b71923dd8 Author: Filipe Manana Date: Tue Nov 1 16:15:42 2022 +0000 btrfs: send: update comment at find_extent_clone() We have this unclear comment at find_extent_clone() about extents starting at a file offset greater than or equals to the i_size of the inode. It's not really informative and it's misleading, since it mentions the author found such extents with snapshots and large files. Such extents are a result of fallocate with FALLOC_FL_KEEP_SIZE and there is no relation to snapshots or large files (all write paths update the i_size before inserting a new file extent item). So update the comment to be precise about it and why we don't bother looking for clone sources in that case. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/send.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 61ce908a3c260fbe37826a6cbd56636abeffcd28 Author: Filipe Manana Date: Tue Nov 1 16:15:41 2022 +0000 btrfs: send: avoid unnecessary path allocations when finding extent clone When looking for an extent clone, at find_extent_clone(), we start by allocating a path and then check for cases where we can't have clones and exit immediately in those cases. It's a waste of time to allocate the path before those cases, so reorder the logic so that we check for those cases before allocating the path. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/send.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit 1a1a285139707f2430b3833103e152f07c66e63e Author: Qu Wenruo Date: Tue Nov 1 19:16:12 2022 +0800 btrfs: remove the unused endio_raid56_workers and btrfs_raid_bio::end_io_work Since we have switched all raid56 workload to submit-and-wait method, there is no use for btrfs_fs_info::endio_raid56_workers workqueue and btrfs_raid_bio::end_io_work. Remove them to save some memory. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 6 +----- fs/btrfs/fs.h | 1 - fs/btrfs/raid56.h | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) commit 6bfd0133bee27737db415c530617cb015274d21f Author: Qu Wenruo Date: Tue Nov 1 19:16:11 2022 +0800 btrfs: raid56: switch scrub path to use a single function This switch involves the following changes: - Make finish_parity_scrub() only to submit the write bios It will no longer call rbio_orig_end_io(), and now it will return error. - Add a new helper, recover_scrub_rbio(), to handle recovery It's just doing extra scrub related checks, and then call recover_sectors(). - Rename raid56_parity_scrub_stripe() to scrub_rbio() - Rename scrub_parity_work() to scrub_rbio_work_locked() To follow the existing naming scheme. - Delete unused functions Including: * finish_rmw() * raid_write_end_io() * raid56_bio_end_io() * __raid_recover_end_io() Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 397 +++++++++++------------------------------------------- 1 file changed, 79 insertions(+), 318 deletions(-) commit cb3450b7d7d0af6ed6ff60e174129938914083ab Author: Qu Wenruo Date: Tue Nov 1 19:16:10 2022 +0800 btrfs: raid56: extract scrub read bio list assembly code into a helper Just like what we did for write/recovery, also extract the read bio assembly code into a helper for scrub. The difference between the three are: - rmw_assemble_read_bios() only submit reads for missing sectors Thus it will skip cached sectors, but will also read sectors which is not covered by any full stripe. (For cache usage) - recover_assemble_read_bios() reads every sector which has not failed - scrub_assemble_read_bios() has extra check for vertical stripes It's mostly the same as rmw_assemble_read_bios(), but will skip sectors which is not covered by a vertical stripe. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) commit 93723095b5d54b923abf07459998bcb9bbac8ba6 Author: Qu Wenruo Date: Tue Nov 1 19:16:09 2022 +0800 btrfs: raid56: switch write path to rmw_rbio() This includes the following changes: - Implement new raid_unplug() functions Now we don't need a workqueue to run the plug, as all our work is just queue rmw_rbio_work() call, which can be executed without sleep. - Implement a rmw_rbio_work_locked() helper This is for unlock_stripe(), which is already holding the full stripe lock. - Remove all the old functions This should already shows how complex the old functions are, as we ended up removing the following functions: * rmw_work() * validate_rbio_for_rmw() * raid56_rmw_end_io_work() * raid56_rmw_stripe() * full_stripe_write() * partial_stripe_write() * __raid56_parity_write() * run_plug() * unplug_work() * btrfs_raid_unplug() * rmw_work() * __raid56_parity_recover() * raid_recover_end_io_work() - Unexport rmw_rbio() Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 350 +++++++----------------------------------------------- fs/btrfs/raid56.h | 5 - 2 files changed, 42 insertions(+), 313 deletions(-) commit 5eb30ee26fa4dbd2d31f50ee3b4212933f86cb57 Author: Qu Wenruo Date: Tue Nov 1 19:16:08 2022 +0800 btrfs: raid56: introduce the main entrance for RMW path The new entrance will be called rmw_rbio(), it will have a streamlined workflow by using submit-and-wait method. Thus there will be no weird jumps between tons of functions, thus way more reader friendly, and will make later expansion easier, as it's now a straight workflow, the timing is way more clear. Unfortunately we can not yet migrate the RMW path to use this new entrance as we still need extra work to address the plug and unlock_stripe() function. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 161 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/raid56.h | 5 ++ 2 files changed, 166 insertions(+) commit 6486d21c99cb46666c11632e4d595568863b965c Author: Qu Wenruo Date: Tue Nov 1 19:16:07 2022 +0800 btrfs: raid56: extract rwm write bios assembly into a helper The helper will be later used to refactor the rmw write path. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 135 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 79 insertions(+), 56 deletions(-) commit 509c27aa2fb69b4475d05d0ac5c5c4206e28d5d6 Author: Qu Wenruo Date: Tue Nov 1 19:16:06 2022 +0800 btrfs: raid56: extract the rmw bio list build code into a helper The helper will later be used to refactor the whole RMW path. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 56 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 18 deletions(-) commit d817ce35d24a53c6736ac68e759ed83135ff7c3b Author: Qu Wenruo Date: Tue Nov 1 19:16:05 2022 +0800 btrfs: raid56: switch recovery path to a single function Currently btrfs uses end_io functions to jump between different stages of recovery. For example, we go the following different functions: - raid56_bio_end_io() This handles the read for all the sectors (except the missing device). - __raid_recover_end_io() This does the real work, it's called inside the delayed work function raid_recover_end_io_work(). This one recovery path involves at least 3 different functions, which is a big burden for readers. This patch will change the behavior by: - Introduce a unified recovery entrance, recover_rbio() - Use submit-and-wait method So the workflow is not interrupted by the endio function jump. This doesn't bring performance change, but reduce the burden for reviewers. - Run the main function in the rmw_workers workqueue Now raid56_parity_recover() only needs to setup the work, and queue the work using start_async_work(). Now readers only need to do one function jump (start_async_work()) to find out the main entrance of recovery path. Furthermore, recover_rbio() function can easily be reused by other paths. The old recovery path is still utilized by degraded write path. It will be cleaned up when we have migrated the write path. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 144 ++++++++++++++++++++++++++++++++++++++++++++---------- fs/btrfs/raid56.h | 2 + 2 files changed, 119 insertions(+), 27 deletions(-) commit ec936b0354e2d716e977e16165d188db044696b7 Author: Qu Wenruo Date: Tue Nov 1 19:16:04 2022 +0800 btrfs: raid56: extract sector recovery code into a helper This includes extra changes: - The allocation for unmap_array[] and pointers[] Now we allocate them in one go, and free them together. - Remove @err Use errno_to_blk_status(ret) instead. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 59 +++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 30 deletions(-) commit d31968d9b6ac684e7e64be0d46eb0f5fe38d1841 Author: Qu Wenruo Date: Tue Nov 1 19:16:03 2022 +0800 btrfs: raid56: extract the recovery bio list build code into a helper This new helper will be also utilized in the incoming refactor of recovery path. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 64 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 23 deletions(-) commit 30e3c897f4a8d070d4fa079f6dade4b3e3cb74ad Author: Qu Wenruo Date: Tue Nov 1 19:16:02 2022 +0800 btrfs: raid56: extract the pq generation code into a helper Currently finish_rmw() will update the P/Q stripes before submitting the writes. It's done behind a for(;;) loop, it's a little congested indent-wise, so extract the code into a helper called generate_pq_vertical(). Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 90 +++++++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 46 deletions(-) commit 9c5ff9b42c1cb22823c94983b7d52121c559bf4d Author: Qu Wenruo Date: Tue Nov 1 19:16:01 2022 +0800 btrfs: raid56: extract the vertical stripe recovery code into recover_vertical() This refactor includes the following behavior change first: - Don't error out if only P/Q is corrupted The old code will directly error out if only P/Q is corrupted. Although it is an logical error if we go into rebuild path with only P/Q corrupted, there is no need to error out. Just skip the rebuild and return the already good data. Then comes the following refactor which shouldn't cause behavior changes: - Introduce a helper to do vertical stripe recovery This not only reduce one indent level, but also paves the road for later data checksum verification in RMW cycles. - Sort rbio->faila/b before recovery So we don't need to do the same swap every vertical stripe - Replace a BUG_ON() with ASSERT() Or checkpatch won't let me pass. - Mark recovered sectors uptodate after the recover loop - Do the cleanup for pointers unconditionally We only need to initialize @pointers and @unmap_array to NULL, so we can safely free them unconditionally. - Mark the repaired sector uptodate in recover_vertical() Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 285 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 149 insertions(+), 136 deletions(-) commit ee5f017dccc79e5a9b442ca473631a53e1e7e376 Author: David Sterba Date: Thu Oct 27 13:07:05 2022 +0200 btrfs: merge struct extent_page_data to btrfs_bio_ctrl The two structures appear on the same call paths, btrfs_bio_ctrl is embedded in extent_page_data and we pass bio_ctrl to some functions. After merging there are fewer indirections and we have only one control structure. The packing remains same. The btrfs_bio_ctrl was selected as the target structure as the operation is closer to bio processing. Structure layout: struct btrfs_bio_ctrl { struct bio * bio; /* 0 8 */ int mirror_num; /* 8 4 */ enum btrfs_compression_type compress_type; /* 12 4 */ u32 len_to_stripe_boundary; /* 16 4 */ u32 len_to_oe_boundary; /* 20 4 */ btrfs_bio_end_io_t end_io_func; /* 24 8 */ bool extent_locked; /* 32 1 */ bool sync_io; /* 33 1 */ /* size: 40, cachelines: 1, members: 8 */ /* padding: 6 */ /* last cacheline: 40 bytes */ }; Signed-off-by: David Sterba fs/btrfs/extent_io.c | 115 ++++++++++++++++++++++++--------------------------- 1 file changed, 55 insertions(+), 60 deletions(-) commit 8ec8519b47897d01a7e8c5ad95734529a3dd60bf Author: David Sterba Date: Thu Oct 27 13:07:03 2022 +0200 btrfs: switch extent_page_data bit fields to bools The semantics of the two members is a boolean, so change the type accordingly. We have space in extent_page_data due to alignment there's no change in size. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 428c8e03109e717d90e0d1329dc3d926b9421ad3 Author: David Sterba Date: Wed Oct 26 23:25:14 2022 +0200 btrfs: simplify percent calculation helpers, rename div_factor The div_factor* helpers calculate fraction or percentage fraction. The name is a bit confusing, we use it only for percentage calculations and there are two helpers. There's a helper mult_frac that's for general fractions, that tries to be accurate but we multiply and divide by small numbers so we can use the div_u64 helper. Rename the div_factor* helpers and use 1..100 percentage range, also drop the case checking for percentage == 100, it's never hit. The conversions: * div_factor calculates tenths and the numbers need to be adjusted * div_factor_fine is direct replacement Signed-off-by: David Sterba fs/btrfs/block-group.c | 6 +++--- fs/btrfs/block-rsv.c | 4 ++-- fs/btrfs/block-rsv.h | 2 +- fs/btrfs/free-space-cache.c | 3 +-- fs/btrfs/misc.h | 16 ++-------------- fs/btrfs/space-info.c | 4 ++-- fs/btrfs/sysfs.c | 2 +- fs/btrfs/transaction.c | 2 +- fs/btrfs/volumes.c | 12 +++++------- 9 files changed, 18 insertions(+), 33 deletions(-) commit 20af93d97f46a824647326278df7d377ba3269ff Author: Filipe Manana Date: Mon Oct 31 11:43:56 2022 +0000 btrfs: update stale comment for nowait direct IO writes If when doing a direct IO write we need to fallback to buffered IO, we this comment at btrfs_direct_write() that says we can't directly fallback to buffered IO if we have a NOWAIT iocb, because we have no support for NOWAIT buffered writes. That is not true anymore, as support for NOWAIT buffered writes was added recently in commit 926078b21db9 ("btrfs: enable nowait async buffered writes"). However we still can't fallback to a buffered write in case we have a NOWAIT iocb, because we'll need to flush delalloc and wait for it to complete after doing the buffered write, and that can block for several reasons, the main reason being waiting for IO to complete. So update the comment to mention all that. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c30ff698da87aeabb459cca75fe4a77a858609fb Author: David Sterba Date: Thu Oct 27 18:12:04 2022 +0200 btrfs: fix SPDX comment in tree-mod-log.h The header files should use the /* */ comment style, introduced in commit f3a84ccd28d0 ("btrfs: move the tree mod log code into its own file"). Signed-off-by: David Sterba fs/btrfs/tree-mod-log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a982fc822001e26930b502b16534f6bbd42b232a Author: Qu Wenruo Date: Fri Sep 16 15:28:39 2022 +0800 btrfs: extract the inline extent read code into its own function Currently we have inline extent read code behind two levels of indentation, factor them them out into a new function, read_inline_extent(), to make it a little easier to read. Since we're here, also remove @extent_offset and @pg_offset arguments from uncompress_inline() function, as it's not possible to have inline extents at non-inline file offset. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/inode.c | 69 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 35 deletions(-) commit 280f15cb96a61e4122bb28cdc316343ff4918b7d Author: Qu Wenruo Date: Fri Sep 16 15:28:38 2022 +0800 btrfs: remove new_inline argument from btrfs_extent_item_to_extent_map() The argument @new_inline changes the following members of extent_map: - em->compress_type - EXTENT_FLAG_COMPRESSED of em->flags However neither members makes a difference for inline extents: - Inline extent read never use above em members As inside btrfs_get_extent() we directly use the file extent item to do the read. - Inline extents are never to be split Thus code really needs em->compress_type or that flag will never be executed on inlined extents. (btrfs_drop_extent_cache() would be one example) - Fiemap no longer relies on extent maps Recent fiemap optimization makes fiemap to search subvolume tree directly, without using any extent map at all. Thus those members make no difference for inline extents any more. Furthermore such exception without much explanation is really a source of confusion. Thus this patch will completely remove the argument, and always set the involved members, unifying the behavior. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/defrag.c | 2 +- fs/btrfs/file-item.c | 6 ++---- fs/btrfs/file-item.h | 1 - fs/btrfs/inode.c | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) commit a196a8944f77b7b762795a0862d8aa4a005625a4 Author: Qu Wenruo Date: Fri Sep 16 15:28:37 2022 +0800 btrfs: do not reset extent map members for inline extents read Currently for inline extents read inside btrfs_get_extent(), we will reset several extent map members: - em->start Reset to extent_start, which is completely unnecessary. The extent_start and em->start should have already be zero, ensured by tree-checker already. - em->len Reset the round_up(copy_size, fs_info->sectorsize), which is again unnecessary. - em->orig_block_len Reset to em->len (sectorsize), while it is originally unset from btrfs_extent_item_to_extent_map(). This makes no difference, as all extent map handling paths will ignore the orig_block_len if they found it's an inlined extent. Such inline extent orig_block_len ignoring examples can be found in btrfs_drop_extent_cache(). - em->orig_start Reset to em->start (0), while it is originally set to EXTENT_MAP_HOLE. This makes no difference either, as all extent map handling paths will ignore the em->orig_start if they found it's an inline extent. Thus all these em members resetting are unnecessary. Replace them with ASSERT()s checking the only two members (block_start and length) that make sense. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/inode.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit affc5424338682641829cc84293ec90f36425034 Author: Qu Wenruo Date: Fri Sep 16 15:28:36 2022 +0800 btrfs: make inline extent read calculation much simpler Currently we calculate inline extent read in a way that inline extent can start at non-zero offset. This is consistent with the inode selftests, which puts an inline extent at file offset 5. Meanwhile the inline extent creation code will only create inline extent at file offset 0. Furthermore with the introduction of tree-checker on file extents, we are actively rejecting inline extent which starts at non-zero file offset. And so far we haven't yet seen any report of rejected inline extents at non-zero file offset. This all means, the extra calculation to support inline extents at non-zero file offset is mostly paper weight, and damaging the readability of the code. Thus this patch will: - Add extra ASSERT()s to make sure involved file offset are all 0 - Remove @extent_offset calculation - Simplify the involved code As several variables are now single-use, no need to declare them as a variable anymore. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/inode.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit d52a1365258b5781c2635937afa91af66322d981 Author: Qu Wenruo Date: Fri Sep 16 15:28:35 2022 +0800 btrfs: selftests: remove impossible inline extent at non-zero file offset In our inode-tests.c, we create an inline offset at file offset 5, which is no longer possible since the introduction of tree-checker. Thus I don't think we should spend time maintaining some corner cases which are already ruled out by tree-checker. So this patch will: - Change the inline extent to start at file offset 0 Also change its length to 6 to cover the original length - Add an extra ASSERT() for btrfs_add_extent_mapping() This is to make sure tree-checker is working correctly. - Update the inode selftest Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent_map.c | 7 ++++++ fs/btrfs/tests/inode-tests.c | 57 +++++++++++++++----------------------------- 2 files changed, 26 insertions(+), 38 deletions(-) commit aa5d3003ddee8d7c5c517db072f888e114ff1529 Author: Josef Bacik Date: Wed Oct 26 15:08:41 2022 -0400 btrfs: move orphan prototypes into orphan.h Move these out of ctree.h into orphan.h to cut down on code in ctree.h. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 ------ fs/btrfs/extent-tree.c | 1 + fs/btrfs/inode.c | 1 + fs/btrfs/orphan.c | 1 + fs/btrfs/orphan.h | 11 +++++++++++ fs/btrfs/root-tree.c | 1 + fs/btrfs/tree-log.c | 1 + fs/btrfs/verity.c | 1 + 8 files changed, 17 insertions(+), 6 deletions(-) commit 7f0add250f829248281e1745d92648f72192a8f4 Author: Josef Bacik Date: Wed Oct 26 15:08:40 2022 -0400 btrfs: move super_block specific helpers into super.h This will make syncing fs.h to user space a little easier if we can pull the super block specific helpers out of fs.h and put them in super.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/compression.c | 1 + fs/btrfs/defrag.c | 1 + fs/btrfs/export.c | 1 + fs/btrfs/extent_io.c | 1 + fs/btrfs/file-item.c | 1 + fs/btrfs/file.c | 1 + fs/btrfs/free-space-cache.c | 1 + fs/btrfs/fs.h | 17 ----------------- fs/btrfs/inode.c | 1 + fs/btrfs/lzo.c | 1 + fs/btrfs/messages.c | 1 + fs/btrfs/ordered-data.c | 1 + fs/btrfs/props.c | 1 + fs/btrfs/reflink.c | 1 + fs/btrfs/relocation.c | 1 + fs/btrfs/super.h | 17 +++++++++++++++++ fs/btrfs/volumes.c | 1 + 17 files changed, 32 insertions(+), 17 deletions(-) commit c03b22076bd2c9fe88c055a35637a836d986db76 Author: Josef Bacik Date: Wed Oct 26 15:08:39 2022 -0400 btrfs: move super prototypes into super.h Move these out of ctree.h into super.h to cut down on code in ctree.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 7 ------- fs/btrfs/disk-io.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/super.c | 1 + fs/btrfs/super.h | 12 ++++++++++++ 5 files changed, 15 insertions(+), 7 deletions(-) commit 6a6b4daf92fd8393eeac9631318d48d5b25ee4df Author: Josef Bacik Date: Wed Oct 26 15:08:38 2022 -0400 btrfs: move CONFIG_BTRFS_FS_RUN_SANITY_TESTS checks to fs.h We already have a few of these in fs.h, move the remaining checks out of ctree.h into fs.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 15 --------------- fs/btrfs/fs.h | 9 +++++++++ 2 files changed, 9 insertions(+), 15 deletions(-) commit 5c11adcc383a94cacd652461c9435bf7a5c53c9c Author: Josef Bacik Date: Wed Oct 26 15:08:37 2022 -0400 btrfs: move verity prototypes into verity.h Move these out of ctree.h into verity.h to cut down on code in ctree.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 22 ---------------------- fs/btrfs/inode.c | 1 + fs/btrfs/send.c | 1 + fs/btrfs/super.c | 1 + fs/btrfs/verity.c | 1 + fs/btrfs/verity.h | 28 ++++++++++++++++++++++++++++ 6 files changed, 32 insertions(+), 22 deletions(-) commit 77407dc032e29f205a1e3922564c0abfd2e23d15 Author: Josef Bacik Date: Wed Oct 26 15:08:36 2022 -0400 btrfs: move dev-replace prototypes into dev-replace.h We already have a dev-replace.h, simply move these prototypes and helpers into dev-replace.h where they belong. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 9 --------- fs/btrfs/dev-replace.h | 8 ++++++++ fs/btrfs/extent_io.c | 1 + 3 files changed, 9 insertions(+), 9 deletions(-) commit 2fc6822c99d7e902b7cef146efa37420d41c0c59 Author: Josef Bacik Date: Wed Oct 26 15:08:35 2022 -0400 btrfs: move scrub prototypes into scrub.h Move these out of ctree.h into scrub.h to cut down on code in ctree.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 11 ----------- fs/btrfs/dev-replace.c | 1 + fs/btrfs/disk-io.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/scrub.c | 1 + fs/btrfs/scrub.h | 16 ++++++++++++++++ fs/btrfs/super.c | 1 + fs/btrfs/transaction.c | 1 + fs/btrfs/volumes.c | 1 + 9 files changed, 23 insertions(+), 11 deletions(-) commit 677074792a1d533232ec5517f23f78d64e6dffac Author: Josef Bacik Date: Wed Oct 26 15:08:34 2022 -0400 btrfs: move relocation prototypes into relocation.h Move these out of ctree.h into relocation.h to cut down on code in ctree.h Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 1 + fs/btrfs/ctree.c | 1 + fs/btrfs/ctree.h | 20 -------------------- fs/btrfs/disk-io.c | 1 + fs/btrfs/inode.c | 1 + fs/btrfs/relocation.c | 1 + fs/btrfs/relocation.h | 23 +++++++++++++++++++++++ fs/btrfs/transaction.c | 1 + fs/btrfs/volumes.c | 1 + 9 files changed, 30 insertions(+), 20 deletions(-) commit 33cf97a7b6585efc57c1277b9e346afa7c542999 Author: Josef Bacik Date: Wed Oct 26 15:08:33 2022 -0400 btrfs: move acl prototypes into acl.h Move these out of ctree.h into acl.h to cut down on code in ctree.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/acl.c | 2 +- fs/btrfs/acl.h | 27 +++++++++++++++++++++++++++ fs/btrfs/ctree.h | 18 ------------------ fs/btrfs/inode.c | 1 + 4 files changed, 29 insertions(+), 19 deletions(-) commit cc68414c6123fcc436c96d8920f48120b0ca2613 Author: Josef Bacik Date: Wed Oct 26 15:08:32 2022 -0400 btrfs: move the snapshot drop related prototypes to extent-tree.h These belong in extent-tree.h, they were missed because they were not grouped with the other extent-tree.c prototypes. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 ------ fs/btrfs/extent-tree.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) commit b538a271ae9bd07e926b1e3bbfcd1aebf63e5860 Author: Josef Bacik Date: Wed Oct 26 15:08:31 2022 -0400 btrfs: move the 32bit warn defines into messages.h The code for these functions are in messages.c, move the defines and prototypes to messages.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 13 ------------- fs/btrfs/messages.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) commit af142b6f44d36c4d0e1e53acbedbc30a588c58de Author: Josef Bacik Date: Wed Oct 26 15:08:30 2022 -0400 btrfs: move file prototypes to file.h Move these out of ctree.h into file.h to cut down on code in ctree.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 26 -------------------------- fs/btrfs/extent_io.c | 1 + fs/btrfs/file.c | 1 + fs/btrfs/file.h | 32 ++++++++++++++++++++++++++++++++ fs/btrfs/free-space-cache.c | 1 + fs/btrfs/inode.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/ordered-data.c | 1 + fs/btrfs/reflink.c | 1 + fs/btrfs/tree-log.c | 1 + 10 files changed, 40 insertions(+), 26 deletions(-) commit 7572dec8f5223186ed0fa7f6da47dba98651cbf4 Author: Josef Bacik Date: Wed Oct 26 15:08:29 2022 -0400 btrfs: move ioctl prototypes into ioctl.h Move these out of ctree.h into ioctl.h to cut down on code in ctree.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 12 ------------ fs/btrfs/file.c | 1 + fs/btrfs/inode.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/ioctl.h | 17 +++++++++++++++++ fs/btrfs/send.c | 1 + fs/btrfs/super.c | 1 + fs/btrfs/transaction.c | 1 + fs/btrfs/verity.c | 1 + fs/btrfs/volumes.c | 1 + 10 files changed, 25 insertions(+), 12 deletions(-) commit c7a03b524d30382ed45883cd27906678e6a0dada Author: Josef Bacik Date: Wed Oct 26 15:08:28 2022 -0400 btrfs: move uuid tree prototypes to uuid-tree.h Move these out of ctree.h into uuid-tree.h to cut down on the code in ctree.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 7 ------- fs/btrfs/disk-io.c | 1 + fs/btrfs/inode.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/transaction.c | 1 + fs/btrfs/uuid-tree.c | 1 + fs/btrfs/uuid-tree.h | 12 ++++++++++++ fs/btrfs/volumes.c | 1 + 8 files changed, 18 insertions(+), 7 deletions(-) commit 7c8ede16280586c72c36af6604985d714b84a32c Author: Josef Bacik Date: Wed Oct 26 15:08:27 2022 -0400 btrfs: move file-item prototypes into their own header Move these prototypes out of ctree.h and into file-item.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/compression.c | 1 + fs/btrfs/ctree.h | 31 ------------------------------- fs/btrfs/defrag.c | 1 + fs/btrfs/delayed-inode.c | 1 + fs/btrfs/extent-tree.c | 1 + fs/btrfs/extent_io.c | 1 + fs/btrfs/file-item.c | 1 + fs/btrfs/file-item.h | 35 +++++++++++++++++++++++++++++++++++ fs/btrfs/file.c | 1 + fs/btrfs/free-space-cache.c | 1 + fs/btrfs/inode-item.c | 1 + fs/btrfs/inode.c | 1 + fs/btrfs/reflink.c | 1 + fs/btrfs/relocation.c | 1 + fs/btrfs/scrub.c | 1 + fs/btrfs/send.c | 1 + fs/btrfs/tree-log.c | 1 + 17 files changed, 50 insertions(+), 31 deletions(-) commit f2b39277b87dbb26f15e2e3b667df25dad3dd2ea Author: Josef Bacik Date: Wed Oct 26 15:08:26 2022 -0400 btrfs: move dir-item prototypes into dir-item.h Move these prototypes out of ctree.h and into their own header file. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 38 -------------------------------------- fs/btrfs/dir-item.c | 1 + fs/btrfs/dir-item.h | 42 ++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/inode.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/send.c | 1 + fs/btrfs/super.c | 1 + fs/btrfs/transaction.c | 1 + fs/btrfs/tree-log.c | 1 + fs/btrfs/xattr.c | 1 + 10 files changed, 50 insertions(+), 38 deletions(-) commit 59b818e064ab9051cd344b82420307e772d6bca7 Author: Josef Bacik Date: Wed Oct 26 15:08:25 2022 -0400 btrfs: move defrag related prototypes to their own header Now that the defrag code is all in one file, create a defrag.h and move all the defrag related prototypes and helper out of ctree.h and into defrag.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 18 ------------------ fs/btrfs/defrag.c | 1 + fs/btrfs/defrag.h | 22 ++++++++++++++++++++++ fs/btrfs/disk-io.c | 1 + fs/btrfs/inode.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/super.c | 1 + fs/btrfs/transaction.c | 1 + 8 files changed, 28 insertions(+), 18 deletions(-) commit a6a01ca61f4949037fa7b94278ab260eab02a289 Author: Josef Bacik Date: Wed Oct 26 15:08:24 2022 -0400 btrfs: move the file defrag code into defrag.c This is the other big portion of defrag code that has existed in ioctl.c. Move it to its new home in defrag.c. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/defrag.c | 903 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/ioctl.c | 902 ----------------------------------------------------- 2 files changed, 903 insertions(+), 902 deletions(-) commit 6e3df18ba7e8e68015dd66bcab326a4b7aaed085 Author: Josef Bacik Date: Wed Oct 26 15:08:23 2022 -0400 btrfs: move the auto defrag code to defrag.c This currently exists in file.c, move it to the more natural location in defrag.c. Signed-off-by: Josef Bacik [ reformat comments ] Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/defrag.c | 337 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/file.c | 340 ------------------------------------------------------ 2 files changed, 337 insertions(+), 340 deletions(-) commit 778dd695dd4d5a21eff07bb1570b570da69dfbd9 Author: Josef Bacik Date: Wed Oct 26 15:08:22 2022 -0400 btrfs: rename tree-defrag.c to defrag.c This currently has only one helper in it, and it's for tree based defrag. We have the various defrag code in 3 different places, so rename this to defrag.c. Followup patches will move the code into this new file. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/Makefile | 2 +- fs/btrfs/{tree-defrag.c => defrag.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit 2885fd632050ef47317a97a3a68bc98634a6e11e Author: Josef Bacik Date: Wed Oct 26 15:08:21 2022 -0400 btrfs: move inode prototypes to btrfs_inode.h I initially wanted to make a new header file for this, but these prototypes do naturally fit into btrfs_inode.h. If we want to extract vfs from pure btrfs code in the future we may need to split this up, but btrfs_inode embeds the vfs_inode, so it makes sense to put the prototypes in this header for now. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 136 +++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/ctree.h | 140 ------------------------------------------------- 2 files changed, 136 insertions(+), 140 deletions(-) commit 083bd7e54e8e2c1d169f21236873272cdf6f409a Author: Josef Bacik Date: Wed Oct 26 15:08:20 2022 -0400 btrfs: move the printk and assert helpers to messages.c These helpers are core to btrfs, and in order to more easily sync various parts of the btrfs kernel code into btrfs-progs we need to be able to carry these helpers with us. However we want to have our own implementation for the helpers themselves, currently they're implemented in different files that we want to sync inside of btrfs-progs itself. Move these into their own C file, this will allow us to contain our overrides in btrfs-progs in it's own file without messing with the rest of the codebase. In copying things over I fixed up a few whitespace errors that already existed. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/Makefile | 2 +- fs/btrfs/messages.c | 352 ++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/super.c | 346 --------------------------------------------------- 3 files changed, 353 insertions(+), 347 deletions(-) commit 5034388342564877879e2a94faf72eff468a7437 Author: Josef Bacik Date: Wed Oct 26 15:08:19 2022 -0400 btrfs: add blk_types.h include to compression.h When moving the printk messages into their own file I got a compiler error because the includes grabbed compression.h, but nothing pulled in the blk_types.h dependency that compression.h has because it uses blkstatus_t. Add blk_types.h to compression.h so that this sort of thing doesn't happen in the future. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/compression.h | 1 + 1 file changed, 1 insertion(+) commit 3683fbbc2314d6721a353f8bf4285a819ea9b512 Author: Josef Bacik Date: Wed Oct 26 15:08:18 2022 -0400 btrfs: add dependencies to fs.h and block-rsv.h There's several structures that are embedded inside of fs_info.h, so if we don't have all the proper includes when we include fs.h we'll get a variety of compile errors. I fixed this by adding a temporary c file that just had #include "fs.h" and then added include files until the compiler stopped complaining. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/block-rsv.h | 1 + fs/btrfs/fs.h | 8 ++++++++ 2 files changed, 9 insertions(+) commit b31bed170d5241d4c9e2fc572f31fc15b274a6c9 Author: Josef Bacik Date: Wed Oct 26 15:08:17 2022 -0400 btrfs: move btrfs_chunk_item_size out of ctree.h This is used by the volumes code and the tree checker code. We want to maintain inline however, so simply move it to volumes.h. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 7 ------- fs/btrfs/volumes.h | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) commit cb9a10a6504bb35095e97f4839fcf353bf1458ea Author: Josef Bacik Date: Wed Oct 26 15:08:16 2022 -0400 btrfs: convert discard stat defs to enum Do away with the defines and use an enum as it's cleaner. Suggested-by: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/free-space-cache.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 43dd529abed2bcf1467f13cce83da1c8456587ea Author: David Sterba Date: Thu Oct 27 14:21:42 2022 +0200 btrfs: update function comments Update, reformat or reword function comments. This also removes the kdoc marker so we don't get reports when the function name is missing. Changes made: - remove kdoc markers - reformat the brief description to be a proper sentence - reword to imperative voice - align parameter list - fix typos Signed-off-by: David Sterba fs/btrfs/block-group.c | 20 ++++---- fs/btrfs/ctree.c | 11 +++-- fs/btrfs/delalloc-space.c | 59 +++++++++++------------ fs/btrfs/delayed-ref.c | 19 ++++---- fs/btrfs/discard.c | 111 +++++++++++++++++++++++++------------------- fs/btrfs/extent_io.c | 59 ++++++++++++----------- fs/btrfs/extent_map.c | 65 ++++++++++++-------------- fs/btrfs/file-item.c | 50 ++++++++++---------- fs/btrfs/free-space-cache.c | 9 ++-- fs/btrfs/inode.c | 14 +++--- fs/btrfs/ioctl.c | 2 +- fs/btrfs/ordered-data.c | 13 +++--- fs/btrfs/raid56.c | 4 +- fs/btrfs/reflink.c | 18 +++---- fs/btrfs/space-info.c | 16 +++---- fs/btrfs/tree-log.c | 2 +- fs/btrfs/ulist.c | 35 ++++++++------ fs/btrfs/volumes.c | 43 +++++++++-------- fs/btrfs/zoned.c | 6 +-- fs/btrfs/zstd.c | 2 +- 20 files changed, 289 insertions(+), 269 deletions(-) commit 1751850fbd770c89347e14ae9590219bcd2f0649 Author: Josef Bacik Date: Tue Oct 25 11:13:06 2022 -0400 btrfs: remove unused btrfs_cond_migrate_bytes The last user of this was removed in 7f9fe6144076 ("btrfs: improve global reserve stealing logic"), drop this code as it's no longer called by anybody. Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/block-rsv.c | 25 ------------------------- fs/btrfs/block-rsv.h | 3 --- 2 files changed, 28 deletions(-) commit 911bd75aca7390ca9e39191450829b09772c5a77 Author: Josef Bacik Date: Mon Oct 24 16:16:14 2022 -0400 btrfs: remove unused function prototypes I wrote the following coccinelle script to find function declarations that didn't have the corresponding code for them @funcproto@ identifier func; type T; position p0; @@ T func@p0(...); @funccode@ identifier funcproto.func; position p1; @@ func@p1(...) { ... } @script:python depends on !funccode@ p0 << funcproto.p0; @@ print("Proto with no function at %s:%s" % (p0[0].file, p0[0].line)) and ran it against btrfs, which identified the 4 function prototypes I've removed in this patch. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 --- fs/btrfs/disk-io.h | 4 ---- 2 files changed, 7 deletions(-) commit 45c40c8f9541f336c7857f09ea843fc8fa980b65 Author: Josef Bacik Date: Mon Oct 24 14:47:00 2022 -0400 btrfs: move root tree prototypes to their own header Move all the root-tree.c prototypes to root-tree.h, and then update all the necessary files to include the new header. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 32 -------------------------------- fs/btrfs/disk-io.c | 1 + fs/btrfs/extent-tree.c | 1 + fs/btrfs/free-space-tree.c | 1 + fs/btrfs/inode.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/qgroup.c | 1 + fs/btrfs/relocation.c | 1 + fs/btrfs/root-tree.c | 1 + fs/btrfs/root-tree.h | 34 ++++++++++++++++++++++++++++++++++ fs/btrfs/transaction.c | 1 + fs/btrfs/tree-log.c | 1 + 12 files changed, 44 insertions(+), 32 deletions(-) commit 6d2049a2f36f873b8f793fde7ea1874d0d17a3dc Author: Josef Bacik Date: Mon Oct 24 14:46:59 2022 -0400 btrfs: delete unused function prototypes in ctree.h This batch of prototypes no longer have code associated with them, so remove them. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 ------ 1 file changed, 6 deletions(-) commit 2839c2c142dd4baae146b7d3e42ead8fe5d36014 Author: Josef Bacik Date: Mon Oct 24 14:46:58 2022 -0400 btrfs: move delalloc space related prototypes to delalloc-space.h These exist in delalloc-space.c, move them from ctree.h into delalloc-space.h. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 --- fs/btrfs/delalloc-space.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit a0231804affe78d27264811559ee31bd341c2bff Author: Josef Bacik Date: Mon Oct 24 14:46:57 2022 -0400 btrfs: move extent-tree helpers into their own header file Move all the extent tree related prototypes to extent-tree.h out of ctree.h, and then go include it everywhere needed so everything compiles. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 1 + fs/btrfs/block-group.c | 1 + fs/btrfs/ctree.c | 1 + fs/btrfs/ctree.h | 72 ---------------------------------------------- fs/btrfs/disk-io.c | 1 + fs/btrfs/extent-tree.c | 1 + fs/btrfs/extent-tree.h | 72 ++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/file.c | 1 + fs/btrfs/free-space-tree.c | 1 + fs/btrfs/inode-item.c | 1 + fs/btrfs/inode.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/qgroup.c | 1 + fs/btrfs/relocation.c | 1 + fs/btrfs/space-info.c | 1 + fs/btrfs/transaction.c | 1 + fs/btrfs/tree-log.c | 1 + 17 files changed, 87 insertions(+), 72 deletions(-) commit e2f13b343c147bc34691301c30d8a8b35d0a2e5c Author: Josef Bacik Date: Mon Oct 24 14:46:56 2022 -0400 btrfs: move btrfs_account_ro_block_groups_free_space into space-info.c This was prototyped in ctree.h and the code existed in extent-tree.c, but it's space-info related so move it into space-info.c. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - fs/btrfs/extent-tree.c | 34 ---------------------------------- fs/btrfs/space-info.c | 34 ++++++++++++++++++++++++++++++++++ fs/btrfs/space-info.h | 1 + 4 files changed, 35 insertions(+), 35 deletions(-) commit 8483d40242c56b0b225238efed1f73ef6985c5af Author: Josef Bacik Date: Mon Oct 24 14:46:55 2022 -0400 btrfs: remove extra space info prototypes in ctree.h These are defined already in space-info.h, remove them from ctree.h. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 --- 1 file changed, 3 deletions(-) commit 13d925c1c26916c017b5339625c66bd20df9fd96 Author: Josef Bacik Date: Mon Oct 24 14:46:54 2022 -0400 btrfs: minor whitespace in ctree.h We've accumulated some whitespace problems in ctree.h, clean these up. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 -- 1 file changed, 2 deletions(-) commit eb33a4d65b2adae52530d6c3c7a9f58bf734a750 Author: Josef Bacik Date: Mon Oct 24 14:46:53 2022 -0400 btrfs: move the lockdep helpers into locking.h These more naturally fit in with the locking related code, and they're all defines so they can easily go anywhere, move them out of ctree.h into locking.h Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 76 ------------------------------------------------------ fs/btrfs/locking.h | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 76 deletions(-) commit a56159d4080b793ee8dc3d3d315579801ad9096c Author: Josef Bacik Date: Mon Oct 24 14:46:52 2022 -0400 btrfs: move btrfs_fs_info declarations into fs.h Now that we have a lot of the fs_info related helpers and stuff isolated, copy these over to fs.h out of ctree.h. Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ reformat comments ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 659 +----------------------------------------------------- fs/btrfs/fs.h | 660 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 661 insertions(+), 658 deletions(-) commit 94a48aef49f235cc1efc74dc18e7708ca3b8d698 Author: Omar Sandoval Date: Thu Oct 20 12:58:28 2022 -0400 btrfs: extend btrfs_dir_item type to store encryption status For directories with encrypted files/filenames, we need to store a flag indicating this fact. There's no room in other fields, so we'll need to borrow a bit from dir_type. Since it's now a combination of type and flags, we rename it to dir_flags to reflect its new usage. The new flag, FT_ENCRYPTED, indicates a directory containing encrypted data, which is orthogonal to file type; therefore, add the new flag, and make conversion from directory type to file type strip the flag. As the file types almost never change we can afford to use the bits. Actual usage will be guarded behind an incompat bit, this patch only adds the support for later use by fscrypt. Signed-off-by: Omar Sandoval Signed-off-by: Sweet Tea Dorminy Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/accessors.h | 15 +++++++++++++-- fs/btrfs/delayed-inode.c | 6 +++--- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/dir-item.c | 7 +++++-- fs/btrfs/inode.c | 13 +++++++------ fs/btrfs/print-tree.c | 4 ++-- fs/btrfs/send.c | 2 +- fs/btrfs/tree-checker.c | 2 +- fs/btrfs/tree-log.c | 20 ++++++++++---------- include/uapi/linux/btrfs_tree.h | 7 +++++++ 10 files changed, 50 insertions(+), 28 deletions(-) commit 6db75318823a169e836a478ca57d6a7c0a156b77 Author: Sweet Tea Dorminy Date: Thu Oct 20 12:58:27 2022 -0400 btrfs: use struct fscrypt_str instead of struct qstr While struct qstr is more natural without fscrypt, since it's provided by dentries, struct fscrypt_str is provided by the fscrypt handlers processing dentries, and is thus more natural in the fscrypt world. Replace all of the struct qstr uses with struct fscrypt_str. Signed-off-by: Sweet Tea Dorminy Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 19 ++++++----- fs/btrfs/dir-item.c | 10 +++--- fs/btrfs/inode-item.c | 14 ++++---- fs/btrfs/inode-item.h | 10 +++--- fs/btrfs/inode.c | 87 ++++++++++++++++++++------------------------------ fs/btrfs/ioctl.c | 4 +-- fs/btrfs/root-tree.c | 4 +-- fs/btrfs/send.c | 4 +-- fs/btrfs/super.c | 2 +- fs/btrfs/transaction.c | 13 ++++---- fs/btrfs/tree-log.c | 42 ++++++++++++------------ fs/btrfs/tree-log.h | 4 +-- 12 files changed, 95 insertions(+), 118 deletions(-) commit ab3c5c18e8fa3f8ea116016095d25adab466cd39 Author: Sweet Tea Dorminy Date: Thu Oct 20 12:58:26 2022 -0400 btrfs: setup qstr from dentrys using fscrypt helper Most places where we get a struct qstr, we are doing so from a dentry. With fscrypt, the dentry's name may be encrypted on-disk, so fscrypt provides a helper to convert a dentry name to the appropriate disk name if necessary. Convert each of the dentry name accesses to use fscrypt_setup_filename(), then convert the resulting fscrypt_name back to an unencrypted qstr. This does not work for nokey names, but the specific locations that could spawn nokey names are noted. At present, since there are no encrypted directories, nothing goes down the filename encryption paths. Signed-off-by: Sweet Tea Dorminy Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 + fs/btrfs/inode.c | 192 +++++++++++++++++++++++++++++++++++++------------ fs/btrfs/transaction.c | 40 +++++++---- fs/btrfs/tree-log.c | 11 ++- 4 files changed, 189 insertions(+), 57 deletions(-) commit e43eec81c5167b655b72c781b0e75e62a05e415e Author: Sweet Tea Dorminy Date: Thu Oct 20 12:58:25 2022 -0400 btrfs: use struct qstr instead of name and namelen pairs Many functions throughout btrfs take name buffer and name length arguments. Most of these functions at the highest level are usually called with these arguments extracted from a supplied dentry's name. But the entire name can be passed instead, making each function a little more elegant. Each function whose arguments are currently the name and length extracted from a dentry is herein converted to instead take a pointer to the name in the dentry. The couple of calls to these calls without a struct dentry are converted to create an appropriate qstr to pass in. Additionally, every function which is only called with a name/len extracted directly from a qstr is also converted. This change has positive effect on stack consumption, frame of many functions is reduced but this will be used in the future for fscrypt related structures. Signed-off-by: Sweet Tea Dorminy Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 26 +++-- fs/btrfs/dir-item.c | 50 +++++---- fs/btrfs/inode-item.c | 73 +++++++------- fs/btrfs/inode-item.h | 20 ++-- fs/btrfs/inode.c | 130 ++++++++++-------------- fs/btrfs/ioctl.c | 7 +- fs/btrfs/root-tree.c | 19 ++-- fs/btrfs/send.c | 12 ++- fs/btrfs/super.c | 3 +- fs/btrfs/transaction.c | 11 +- fs/btrfs/tree-log.c | 267 ++++++++++++++++++++++--------------------------- fs/btrfs/tree-log.h | 4 +- 12 files changed, 287 insertions(+), 335 deletions(-) commit 82c0efd3cd5d4ecce028da75d29e3345535b3389 Author: Anand Jain Date: Wed Oct 19 21:51:42 2022 +0530 btrfs: merge module cleanup sequence to one helper The module exit function exit_btrfs_fs() is duplicating a section of code in init_btrfs_fs(). Add a helper to remove the duplicated code. Due to the init/exit section requirements the function must be inline and not a plain static as it could cause section mismatch. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) commit 02bc392798f9bf8105d50b2fec44b5b2e3c80d47 Author: David Sterba Date: Fri Oct 14 16:00:55 2022 +0200 btrfs: sink gfp_t parameter to alloc_scrub_sector All callers pas GFP_KERNEL as parameter so we can use it directly in alloc_scrub_sector. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/scrub.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fe10158c759cc978d0def69b5cb5efabecb42653 Author: David Sterba Date: Fri Oct 14 15:59:35 2022 +0200 btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block There's only one caller that calls scrub_setup_recheck_block in the memalloc_nofs_save/_restore protection so it's effectively already GFP_NOFS and it's safe to use GFP_KERNEL. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/scrub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2896e791001b778e3bf8466dd8c6104245c08a2 Author: David Sterba Date: Fri Oct 14 15:55:09 2022 +0200 btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent All callers pass GFP_NOFS, we can drop the parameter and use it directly. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/qgroup.c | 17 +++++++---------- fs/btrfs/qgroup.h | 2 +- fs/btrfs/tree-log.c | 3 +-- 3 files changed, 9 insertions(+), 13 deletions(-) commit d68194b238228ce470de1fc2453851fc06294739 Author: David Sterba Date: Fri Oct 14 15:45:37 2022 +0200 btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc There's only one caller that passes GFP_NOFS, we can drop the parameter an use the flags directly. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/backref.c | 5 ++--- fs/btrfs/backref.h | 3 +-- fs/btrfs/relocation.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) commit e9c83077d2be815cb04f0b054e9494512b1657ee Author: Josef Bacik Date: Wed Oct 19 10:51:01 2022 -0400 btrfs: remove temporary btrfs_map_token declaration in ctree.h This was added while I was moving this code to its new home, it can be removed now. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 -- 1 file changed, 2 deletions(-) commit 07e81dc94474eb62705c6f96d9ab1a5a797b8703 Author: Josef Bacik Date: Wed Oct 19 10:51:00 2022 -0400 btrfs: move accessor helpers into accessors.h This is a large patch, but because they're all macros it's impossible to split up. Simply copy all of the item accessors in ctree.h and paste them in accessors.h, and then update any files to include the header so everything compiles. Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ reformat comments, style fixups ] Signed-off-by: David Sterba fs/btrfs/accessors.h | 1068 +++++++++++++++++++++++++++++++ fs/btrfs/backref.c | 1 + fs/btrfs/block-group.c | 1 + fs/btrfs/block-rsv.c | 1 + fs/btrfs/check-integrity.c | 1 + fs/btrfs/ctree.h | 1090 -------------------------------- fs/btrfs/delayed-inode.c | 1 + fs/btrfs/dev-replace.c | 1 + fs/btrfs/dir-item.c | 1 + fs/btrfs/disk-io.c | 1 + fs/btrfs/export.c | 1 + fs/btrfs/extent-tree.c | 1 + fs/btrfs/extent_io.c | 1 + fs/btrfs/file-item.c | 1 + fs/btrfs/file.c | 1 + fs/btrfs/free-space-cache.c | 1 + fs/btrfs/free-space-tree.c | 1 + fs/btrfs/fs.c | 1 + fs/btrfs/inode-item.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/locking.c | 1 + fs/btrfs/print-tree.c | 1 + fs/btrfs/props.c | 1 + fs/btrfs/qgroup.c | 1 + fs/btrfs/ref-verify.c | 1 + fs/btrfs/reflink.c | 1 + fs/btrfs/relocation.c | 1 + fs/btrfs/root-tree.c | 1 + fs/btrfs/scrub.c | 1 + fs/btrfs/send.c | 1 + fs/btrfs/space-info.c | 1 + fs/btrfs/super.c | 1 + fs/btrfs/sysfs.c | 1 + fs/btrfs/tests/extent-buffer-tests.c | 1 + fs/btrfs/tests/free-space-tree-tests.c | 1 + fs/btrfs/tests/inode-tests.c | 1 + fs/btrfs/tests/qgroup-tests.c | 1 + fs/btrfs/transaction.c | 1 + fs/btrfs/tree-checker.c | 1 + fs/btrfs/tree-defrag.c | 1 + fs/btrfs/tree-mod-log.c | 1 + fs/btrfs/uuid-tree.c | 2 +- fs/btrfs/verity.c | 1 + fs/btrfs/volumes.c | 1 + fs/btrfs/xattr.c | 1 + fs/btrfs/zoned.c | 1 + 46 files changed, 1112 insertions(+), 1091 deletions(-) commit ad1ac5012c2beccc9de4d3e2cc1382fd250e5540 Author: Josef Bacik Date: Wed Oct 19 10:50:59 2022 -0400 btrfs: move btrfs_map_token to accessors This is specific to the item-accessor code, move it out of ctree.h into accessor.h/.c and then update the users to include the new header file. This un-inlines btrfs_init_map_token, however this is only called once per function so it's not critical to be inlined. This also saves 904 bytes of code on a release build. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/accessors.c | 8 ++++++++ fs/btrfs/accessors.h | 14 ++++++++++++++ fs/btrfs/ctree.c | 1 + fs/btrfs/ctree.h | 16 ++-------------- fs/btrfs/inode.c | 1 + fs/btrfs/tree-log.c | 1 + 6 files changed, 27 insertions(+), 14 deletions(-) commit 818fe33aed42ddd5052171328a3f708e98357e10 Author: Josef Bacik Date: Wed Oct 19 10:50:58 2022 -0400 btrfs: rename struct-funcs.c to accessors.c Rename struct-funcs.c to accessors.c so we can move the item accessors out of ctree.h. accessors.c is a better description of the code that is contained in these files. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/Makefile | 2 +- fs/btrfs/{struct-funcs.c => accessors.c} | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit d83eb482b727e7d9fdf6f729db6da3642c4d8a58 Author: Josef Bacik Date: Wed Oct 19 10:50:57 2022 -0400 btrfs: move the compat/incompat flag masks to fs.h This is fs wide information, move it out of ctree.h into fs.h. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 57 -------------------------------------------------------- fs/btrfs/fs.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 57 deletions(-) commit 55e5cfd36da5d71e21b72a5922c9b6c349744c2a Author: Josef Bacik Date: Wed Oct 19 10:50:56 2022 -0400 btrfs: remove fs_info::pending_changes and related code Now that we're not using this code anywhere we can remove it as well as the member from fs_info. We don't have any mount options or on/off features that would utilize the pending infrastructure, the last one was inode_cache. There was a patchset [1] to enable some features from sysfs that would break things if it would be set immediately. In case we'll need that kind of logic again the patch can be reverted, but for the current use it can be replaced by the single state bit to do the commit. [1] https://lore.kernel.org/linux-btrfs/1422609654-19519-1-git-send-email-quwenruo@cn.fujitsu.com/ Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add note ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 23 +---------------------- fs/btrfs/disk-io.c | 6 ------ fs/btrfs/transaction.c | 25 ------------------------- fs/btrfs/transaction.h | 1 - 4 files changed, 1 insertion(+), 54 deletions(-) commit c52cc7b7acfb3290a0268538b82ac7cf18df7ca4 Author: Josef Bacik Date: Wed Oct 19 10:50:55 2022 -0400 btrfs: add a BTRFS_FS_NEED_TRANS_COMMIT flag Currently we are only using fs_info->pending_changes to indicate that we need a transaction commit. The original users for this were removed years ago and we don't have more usage in sight, so this is the only remaining reason to have this field. Add a flag so we can remove this code. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/fs.h | 3 +++ fs/btrfs/super.c | 3 ++- fs/btrfs/sysfs.c | 4 ++-- fs/btrfs/transaction.c | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) commit 7966a6b5959bbeb38b35d12b7a533c1dee8c432c Author: Josef Bacik Date: Wed Oct 19 10:50:54 2022 -0400 btrfs: move fs_info::flags enum to fs.h These definitions are fs wide, take them out of ctree.h and put them in fs.h. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 68 ------------------------------------------- fs/btrfs/fs.h | 68 +++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/tests/qgroup-tests.c | 1 + fs/btrfs/tree-mod-log.c | 1 + 4 files changed, 70 insertions(+), 68 deletions(-) commit fc97a410bd781d00634194bfcddfd2be4185d954 Author: Josef Bacik Date: Wed Oct 19 10:50:53 2022 -0400 btrfs: move mount option definitions to fs.h These are fs wide definitions and helpers, move them out of ctree.h and into fs.h. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/block-rsv.c | 1 + fs/btrfs/ctree.h | 63 -------------------------------------------------- fs/btrfs/delayed-ref.c | 1 + fs/btrfs/discard.c | 1 + fs/btrfs/fs.h | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/ref-verify.c | 1 + 6 files changed, 67 insertions(+), 63 deletions(-) commit 0d3a9cf8c3068136145b90841778e3f1ac13f22a Author: Josef Bacik Date: Wed Oct 19 10:50:52 2022 -0400 btrfs: convert incompat and compat flag test helpers to macros These helpers use functions not defined in fs.h, they're simply accessors of the super block in fs_info, convert them to macros so that we don't have a weird dependency between fs.h and accessors.h. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/fs.h | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit ec8eb376e271ed2b8724bf488f4c74d2746d5446 Author: Josef Bacik Date: Wed Oct 19 10:50:51 2022 -0400 btrfs: move BTRFS_FS_STATE* definitions and helpers to fs.h We're going to use fs.h to hold fs wide related helpers and definitions, move the FS_STATE enum and related helpers to fs.h, and then update all files that need these definitions to include fs.h. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/compression.c | 1 + fs/btrfs/ctree.c | 1 + fs/btrfs/ctree.h | 46 ----------------------------------------- fs/btrfs/delalloc-space.c | 1 + fs/btrfs/delayed-inode.c | 3 ++- fs/btrfs/dev-replace.c | 1 + fs/btrfs/extent_io.c | 1 + fs/btrfs/free-space-cache.c | 3 ++- fs/btrfs/fs.h | 49 ++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/inode-item.c | 3 ++- fs/btrfs/reflink.c | 3 ++- fs/btrfs/root-tree.c | 3 ++- fs/btrfs/sysfs.c | 1 + fs/btrfs/tests/btrfs-tests.c | 1 + fs/btrfs/xattr.c | 3 ++- 15 files changed, 68 insertions(+), 52 deletions(-) commit bbde07a40a13cc5a3483eaeb52e9bb3b61d2cf57 Author: Josef Bacik Date: Wed Oct 19 10:50:50 2022 -0400 btrfs: push printk index code into their respective helpers The printk index work can be pushed into the printk helpers themselves, this allows us to further sanitize messages.h, removing the last include in the header itself. Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/messages.h | 29 +---------------------------- fs/btrfs/super.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 28 deletions(-) commit 9b569ea0be6fb27a4985acc9325896a3edc95ede Author: Josef Bacik Date: Wed Oct 19 10:50:49 2022 -0400 btrfs: move the printk helpers out of ctree.h We have a bunch of printk helpers that are in ctree.h. These have nothing to do with ctree.c, so move them into their own header. Subsequent patches will cleanup the printk helpers. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.h | 1 + fs/btrfs/check-integrity.c | 1 + fs/btrfs/ctree.c | 1 + fs/btrfs/ctree.h | 249 ------------------------------------------ fs/btrfs/delalloc-space.c | 1 + fs/btrfs/delayed-inode.c | 1 + fs/btrfs/delayed-ref.c | 1 + fs/btrfs/dir-item.c | 1 + fs/btrfs/extent-io-tree.c | 1 + fs/btrfs/extent_map.c | 1 + fs/btrfs/file-item.c | 1 + fs/btrfs/free-space-cache.c | 1 + fs/btrfs/free-space-tree.c | 1 + fs/btrfs/fs.c | 1 + fs/btrfs/inode-item.c | 1 + fs/btrfs/lzo.c | 1 + fs/btrfs/messages.h | 259 ++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/ordered-data.c | 1 + fs/btrfs/print-tree.c | 1 + fs/btrfs/props.c | 1 + fs/btrfs/raid56.c | 1 + fs/btrfs/ref-verify.c | 1 + fs/btrfs/reflink.c | 1 + fs/btrfs/root-tree.c | 1 + fs/btrfs/struct-funcs.c | 1 + fs/btrfs/subpage.c | 1 + fs/btrfs/super.c | 1 + fs/btrfs/sysfs.c | 2 +- fs/btrfs/tree-checker.c | 1 + fs/btrfs/tree-log.h | 1 + fs/btrfs/tree-mod-log.c | 1 + fs/btrfs/ulist.c | 1 + fs/btrfs/uuid-tree.c | 1 + fs/btrfs/verity.c | 1 + fs/btrfs/xattr.c | 1 + fs/btrfs/zoned.h | 1 + 36 files changed, 293 insertions(+), 250 deletions(-) commit e118578a8df7941a9bbc568851997852e5bc7338 Author: Josef Bacik Date: Wed Oct 19 10:50:48 2022 -0400 btrfs: move assert helpers out of ctree.h These call functions that aren't defined in, or will be moved out of, ctree.h Move them to super.c where the other assert/error message code is defined. Drop the __noreturn attribute for btrfs_assertfail as objtool does not like it and fails with warnings like fs/btrfs/dir-item.o: warning: objtool: .text.unlikely: unexpected end of section fs/btrfs/xattr.o: warning: objtool: btrfs_setxattr() falls through to next function btrfs_setxattr_trans.cold() fs/btrfs/xattr.o: warning: objtool: .text.unlikely: unexpected end of section Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 18 +++--------------- fs/btrfs/super.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) commit c7f13d428ea1bfe883f2741a9b5a5352d595eb09 Author: Josef Bacik Date: Wed Oct 19 10:50:47 2022 -0400 btrfs: move fs wide helpers out of ctree.h We have several fs wide related helpers in ctree.h. The bulk of these are the incompat flag test helpers, but there are things such as btrfs_fs_closing() and the read only helpers that also aren't directly related to the ctree code. Move these into a fs.h header, which will serve as the location for file system wide related helpers. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/Makefile | 2 +- fs/btrfs/backref.c | 1 + fs/btrfs/block-group.c | 1 + fs/btrfs/ctree.h | 164 --------------------------------------------- fs/btrfs/disk-io.c | 1 + fs/btrfs/extent-tree.c | 1 + fs/btrfs/file-item.c | 1 + fs/btrfs/file.c | 1 + fs/btrfs/free-space-tree.c | 1 + fs/btrfs/fs.c | 92 +++++++++++++++++++++++++ fs/btrfs/fs.h | 85 +++++++++++++++++++++++ fs/btrfs/inode.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/props.c | 1 + fs/btrfs/qgroup.c | 1 + fs/btrfs/relocation.c | 1 + fs/btrfs/scrub.c | 1 + fs/btrfs/space-info.c | 1 + fs/btrfs/super.c | 1 + fs/btrfs/transaction.c | 1 + fs/btrfs/tree-checker.c | 1 + fs/btrfs/tree-log.c | 1 + fs/btrfs/uuid-tree.c | 1 + fs/btrfs/verity.c | 1 + fs/btrfs/volumes.c | 1 + fs/btrfs/zoned.c | 1 + 26 files changed, 200 insertions(+), 165 deletions(-) commit 875c627c5f2045e2b5f0ad6692799e8fb931f3cb Author: Wang Yugui Date: Wed Oct 19 16:10:01 2022 +0800 btrfs: send add define for v2 buffer size Add a define for the data buffer size (though the maximum size is not limited by it) BTRFS_SEND_BUF_SIZE_V2 so it's more visible. Signed-off-by: Wang Yugui Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/send.c | 2 +- fs/btrfs/send.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit b307f06d37ca12495e4cfff8d456cd92f045f947 Author: David Sterba Date: Tue Oct 18 16:06:38 2022 +0200 btrfs: simplify generation check in btrfs_get_dentry Callers that pass non-zero generation always want to perform the generation check, we can simply encode that in one parameter and drop check_generation. Add function documentation. Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/export.c | 23 +++++++++++++++++------ fs/btrfs/export.h | 3 +-- fs/btrfs/ioctl.c | 2 +- 3 files changed, 19 insertions(+), 9 deletions(-) commit 63a7cb13071842966c1ce931edacbc23573aada5 Author: David Sterba Date: Tue Jul 26 20:54:10 2022 +0200 btrfs: auto enable discard=async when possible There's a request to automatically enable async discard for capable devices. We can do that, the async mode is designed to wait for larger freed extents and is not intrusive, with limits to iops, kbps or latency. The status and tunables will be exported in /sys/fs/btrfs/FSID/discard . The automatic selection is done if there's at least one discard capable device in the filesystem (not capable devices are skipped). Mounting with any other discard option will honor that option, notably mounting with nodiscard will keep it disabled. Link: https://lore.kernel.org/linux-btrfs/CAEg-Je_b1YtdsCR0zS5XZ_SbvJgN70ezwvRwLiCZgDGLbeMB=w@mail.gmail.com/ Reviewed-by: Boris Burkov Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 + fs/btrfs/disk-io.c | 14 ++++++++++++++ fs/btrfs/super.c | 2 ++ fs/btrfs/volumes.c | 3 +++ fs/btrfs/volumes.h | 2 ++ 5 files changed, 22 insertions(+) commit 467761f90405004e58795116aa7d81f3d298dcfb Author: David Sterba Date: Fri Sep 30 17:23:01 2022 +0200 btrfs: sysfs: convert remaining scnprintf to sysfs_emit The sysfs_emit is the safe API for writing to the sysfs files, previously converted from scnprintf, there's one left to do in btrfs_read_policy_show. Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5a75034e71ef5ec0fce983afcb6c9cb0147cd5b9 Author: Josef Bacik Date: Fri Oct 14 10:00:41 2022 -0400 btrfs: do not panic if we can't allocate a prealloc extent state We sometimes have to allocate new extent states when clearing or setting new bits in an extent io tree. Generally we preallocate this before taking the tree spin lock, but we can use this preallocated extent state sometimes and then need to try to do a GFP_ATOMIC allocation under the lock. Unfortunately sometimes this fails, and then we hit the BUG_ON() and bring the box down. This happens roughly 20 times a week in our fleet. However the vast majority of callers use GFP_NOFS, which means that if this GFP_ATOMIC allocation fails, we could simply drop the spin lock, go back and allocate a new extent state with our given gfp mask, and begin again from where we left off. For the remaining callers that do not use GFP_NOFS, they are generally using GFP_NOWAIT, which still allows for some reclaim. So allow these allocations to attempt to happen outside of the spin lock so we don't need to rely on GFP_ATOMIC allocations. This in essence creates an infinite loop for anything that isn't GFP_NOFS. To address this we may want to migrate to using mempools for extent states so that we will always have emergency reserves in order to make our allocations. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-io-tree.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit da2a071b6f142f47072ea7b37e03d3ef317b8a4e Author: Josef Bacik Date: Fri Oct 14 10:00:40 2022 -0400 btrfs: remove unused unlock_extent_atomic As of "btrfs: do not use GFP_ATOMIC in the read endio" we no longer have any users of unlock_extent_atomic, remove it. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-io-tree.h | 7 ------- 1 file changed, 7 deletions(-) commit 48acc47d7813a0e650754845161f04b0b27ff8ac Author: Josef Bacik Date: Fri Oct 14 10:00:39 2022 -0400 btrfs: do not use GFP_ATOMIC in the read endio We have done read endio in an async thread for a very, very long time, which makes the use of GFP_ATOMIC and unlock_extent_atomic() unneeded in our read endio path. We've noticed under heavy memory pressure in our fleet that we can fail these allocations, and then often trip a BUG_ON(!allocation), which isn't an ideal outcome. Begin to address this by simply not using GFP_ATOMIC, which will allow us to do things like actually allocate a extent state when doing set_extent_bits(UPTODATE) in the endio handler. End io handlers are not called in atomic context, besides we have been allocating failrec with GFP_NOFS so we'd notice there's a problem. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7248e0cebbefaba94c0c37f708a134dad3acba0e Author: Qu Wenruo Date: Fri Sep 9 14:45:22 2022 +0800 btrfs: skip update of block group item if used bytes are the same [BACKGROUND] When committing a transaction, we will update block group items for all dirty block groups. But in fact, dirty block groups don't always need to update their block group items. It's pretty common to have a metadata block group which experienced several COW operations, but still have the same amount of used bytes. In that case, we may unnecessarily COW a tree block doing nothing. [ENHANCEMENT] This patch will introduce btrfs_block_group::commit_used member to remember the last used bytes, and use that new member to skip unnecessary block group item update. This would be more common for large filesystems, where metadata block group can be as large as 1GiB, containing at most 64K metadata items. In that case, if COW added and then deleted one metadata item near the end of the block group, then it's completely possible we don't need to touch the block group item at all. [BENCHMARK] The change itself can have quite a high chance (20~80%) to skip block group item updates in lot of workloads. As a result, it would result shorter time spent on btrfs_write_dirty_block_groups(), and overall reduce the execution time of the critical section of btrfs_commit_transaction(). Here comes a fio command, which will do random writes in 4K block size, causing a very heavy metadata updates. fio --filename=$mnt/file --size=512M --rw=randwrite --direct=1 --bs=4k \ --ioengine=libaio --iodepth=64 --runtime=300 --numjobs=4 \ --name=random_write --fallocate=none --time_based --fsync_on_close=1 The file size (512M) and number of threads (4) means 2GiB file size in total, but during the full 300s run time, my dedicated SATA SSD is able to write around 20~25GiB, which is over 10 times the file size. Thus after we fill the initial 2G, we should not cause much block group item updates. Please note, the fio numbers by themselves don't have much change, but if we look deeper, there is some reduced execution time, especially for the critical section of btrfs_commit_transaction(). I added extra trace_printk() to measure the following per-transaction execution time: - Critical section of btrfs_commit_transaction() By re-using the existing update_commit_stats() function, which has already calculated the interval correctly. - The while() loop for btrfs_write_dirty_block_groups() Although this includes the execution time of btrfs_run_delayed_refs(), it should still be representative overall. Both result involves transid 7~30, the same amount of transaction committed. The result looks like this: | Before | After | Diff ----------------------+-------------------+----------------+-------- Transaction interval | 229247198.5 | 215016933.6 | -6.2% Block group interval | 23133.33333 | 18970.83333 | -18.0% The change in block group item updates is more obvious, as skipped block group item updates also mean less delayed refs. And the overall execution time for that block group update loop is pretty small, thus we can assume the extent tree is already mostly cached. If we can skip an uncached tree block, it would cause more obvious change. Unfortunately the overall reduction in commit transaction critical section is much smaller, as the block group item updates loop is not really the major part, at least not for the above fio script. But still we have a observable reduction in the critical section. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/block-group.c | 28 +++++++++++++++++++++++++++- fs/btrfs/block-group.h | 6 ++++++ 2 files changed, 33 insertions(+), 1 deletion(-) commit cc37ea61920eca87316be1ae255e5e5e7b12f7b6 Author: David Sterba Date: Fri Sep 9 17:43:06 2022 +0200 btrfs: convert __TRANS_* defines to enum bits The base transaction bits can be defined as bits in a contiguous sequence, although right now there's a hole from bit 1 to 8. The bits are used for btrfs_trans_handle::type, and there's another set of TRANS_STATE_* defines that are for btrfs_transaction::state. They are mutually exclusive though the hole in the sequence looks like was made for the states. Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/transaction.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit e0a8b9a74767f748881b1e2408ed9afe7a26d9fd Author: David Sterba Date: Fri Sep 9 17:37:35 2022 +0200 btrfs: convert QGROUP_* defines to enum bits The defines/enums are used only for tracepoints and are not part of the on-disk format. Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/qgroup.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d3b4d0fd5518fd000938c6cbd4817085c210dcbe Author: David Sterba Date: Fri Sep 9 17:34:58 2022 +0200 btrfs: convert EXTENT_* bits to enums Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-io-tree.h | 71 +++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 33 deletions(-) commit fd8d2951f478c095f5e65c5f14f2be4d4724c5ea Author: David Sterba Date: Fri Sep 9 17:31:38 2022 +0200 btrfs: convert extent_io page op defines to enum bits Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent_io.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit c7321b76dfcc8a1b8d7dad3eff3595bad28252e2 Author: David Sterba Date: Fri Sep 9 17:27:45 2022 +0200 btrfs: convert BTRFS_ILOCK-* defines to enum bit Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/ctree.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d549ff7bdbe72f5e0e934895090fed2647e9813b Author: David Sterba Date: Fri Sep 9 17:20:25 2022 +0200 btrfs: add helper for bit enumeration Define helper macro that can be used in enum {} to utilize the automatic increment to define all bits without directly defining the values or using additional linear bits. 1. capture the sequence value, N 2. use the value to define the given enum with N-th bit set 3. reset the sequence back to N Use for enums that do not require fixed values for symbolic names (like for on-disk structures): enum { ENUM_BIT(FIRST), ENUM_BIT(SECOND), ENUM_BIT(THIRD) }; Where the values would be 0x1, 0x2 and 0x4. Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/misc.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5565b8e0adcdd8ee32d02d82d98cdf6d966793c7 Author: Qu Wenruo Date: Wed Oct 12 17:22:35 2022 +0800 btrfs: make module init/exit match their sequence [BACKGROUND] In theory init_btrfs_fs() and exit_btrfs_fs() should match their sequence, thus normally they should look like this: init_btrfs_fs() | exit_btrfs_fs() ----------------------+------------------------ init_A(); | init_B(); | init_C(); | | exit_C(); | exit_B(); | exit_A(); So is for the error path of init_btrfs_fs(). But it's not the case, some exit functions don't match their init functions sequence in init_btrfs_fs(). Furthermore in init_btrfs_fs(), we need to have a new error label for each new init function we added. This is not really expandable, especially recently we may add several new functions to init_btrfs_fs(). [ENHANCEMENT] The patch will introduce the following things to enhance the situation: - struct init_sequence Just a wrapper of init and exit function pointers. The init function must use int type as return value, thus some init functions need to be updated to return 0. The exit function can be NULL, as there are some init sequence just outputting a message. - struct mod_init_seq[] array This is a const array, recording all the initialization we need to do in init_btrfs_fs(), and the order follows the old init_btrfs_fs(). - bool mod_init_result[] array This is a bool array, recording if we have initialized one entry in mod_init_seq[]. The reason to split mod_init_seq[] and mod_init_result[] is to avoid section mismatch in reference. All init function are in .init.text, but if mod_init_seq[] records the @initialized member it can no longer be const, thus will be put into .data section, and cause modpost warning. For init_btrfs_fs() we just call all init functions in their order in mod_init_seq[] array, and after each call, setting corresponding mod_init_result[] to true. For exit_btrfs_fs() and error handling path of init_btrfs_fs(), we just iterate mod_init_seq[] in reverse order, and skip all uninitialized entry. With this patch, init_btrfs_fs()/exit_btrfs_fs() will be much easier to expand and will always follow the strict order. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/compression.c | 3 +- fs/btrfs/compression.h | 2 +- fs/btrfs/props.c | 3 +- fs/btrfs/props.h | 2 +- fs/btrfs/super.c | 242 ++++++++++++++++++++++++------------------------- 5 files changed, 122 insertions(+), 130 deletions(-) commit 33cff222faffefc57f57326547e68133a7816e29 Author: Filipe Manana Date: Fri Oct 14 14:44:33 2022 +0100 btrfs: remove gfp_t flag from btrfs_tree_mod_log_insert_key() All callers of btrfs_tree_mod_log_insert_key() are now passing a GFP_NOFS flag to it, so remove the flag from it and from alloc_tree_mod_elem() and use it directly within alloc_tree_mod_elem(). Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 16 ++++++++-------- fs/btrfs/tree-mod-log.c | 19 +++++++++---------- fs/btrfs/tree-mod-log.h | 2 +- 3 files changed, 18 insertions(+), 19 deletions(-) commit 879b2221983184cd61fe852f90f3c0d6dd647f67 Author: Filipe Manana Date: Thu Oct 13 11:36:25 2022 +0100 btrfs: switch GFP_ATOMIC to GFP_NOFS when fixing up low keys When fixing up the first key of each node above the current level, at fixup_low_keys(), we are doing a GFP_ATOMIC allocation for inserting an operation record for the tree mod log. However we can do just fine with GFP_NOFS nowadays. The need for GFP_ATOMIC was for the old days when we had custom locks with spinning behaviour for extent buffers and we were in spinning mode while at fixup_low_keys(). Now we use rw semaphores for extent buffer locks, so we can safely use GFP_NOFS. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81531225e5bd50ce628816cc1445c8b52aa99db2 Author: Boris Burkov Date: Thu Oct 13 15:52:10 2022 -0700 btrfs: re-check reclaim condition in reclaim worker I have observed the following case play out and lead to unnecessary relocations: 1. write a file across multiple block groups 2. delete the file 3. several block groups fall below the reclaim threshold 4. reclaim the first, moving extents into the others 5. reclaim the others which are now actually very full, leading to poor reclaim behavior with lots of writing, allocating new block groups, etc. I believe the risk of missing some reasonable reclaims is worth it when traded off against the savings of avoiding overfull reclaims. Going forward, it could be interesting to make the check more advanced (zoned aware, fragmentation aware, etc...) so that it can be a really strong signal both at extent delete and reclaim time. Reviewed-by: Filipe Manana Signed-off-by: Boris Burkov Signed-off-by: David Sterba fs/btrfs/block-group.c | 65 +++++++++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 25 deletions(-) commit cc4804bfd6392bcb626a687689b36fd9cda87c11 Author: Boris Burkov Date: Thu Oct 13 15:52:09 2022 -0700 btrfs: skip reclaim if block_group is empty As we delete extents from a block group, at some deletion we cross below the reclaim threshold. It is possible we are still in the middle of deleting more extents and might soon hit 0. If the block group is empty by the time the reclaim worker runs, we will still relocate it. This works just fine, as relocating an empty block group ultimately results in properly deleting it. However, we have more direct ways of removing empty block groups in the cleaner thread. Those are either async discard or the unused_bgs list. In fact, when we decide whether to relocate a block group during extent deletion, we do check for emptiness and prefer the discard/unused_bgs mechanisms when possible. Not using relocation for this case reduces some modest overhead from empty bg relocation: - extra transactions - extra metadata use/churn for creating relocation metadata - trying to read the extent tree to look for extents (and in this case finding none) Reviewed-by: Filipe Manana Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/block-group.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 6976201f188f0a899fe5f0dfde32b9855d1d22cc Author: Filipe Manana Date: Tue Oct 11 13:17:09 2022 +0100 btrfs: avoid unnecessary resolution of indirect backrefs during fiemap During fiemap, when determining if a data extent is shared or not, if we don't find the extent is directly shared, then we need to determine if it's shared through subtrees. For that we need to resolve the indirect reference we found in order to figure out the path in the inode's fs tree, which is a path starting at the fs tree's root node and going down to the leaf that contains the file extent item that points to the data extent. We then proceed to determine if any extent buffer in that path is shared with other trees or not. However when the generation of the data extent is more recent than the last generation used to snapshot the root, we don't need to determine the path, since the data extent can not be shared through snapshots. For this case we currently still determine the leaf of that path (at find_parent_nodes(), but then stop determining the other nodes in the path (at btrfs_is_data_extent_shared()) as it's pointless. So do the check of the data extent's generation earlier, at find_parent_nodes(), before trying to resolve the indirect reference to determine the leaf in the path. This saves us from doing one expensive b+tree search in the fs tree of our target inode, as well as other minor work. The following test was run on a non-debug kernel (Debian's default kernel config): $ cat test-fiemap.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi 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 umount $MNT mount -o compress=lzo $DEV $MNT start=$(date +%s%N) 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 Before applying this patch: (...) /mnt/sdi/foobar: 327680 extents found fiemap took 1285 milliseconds (metadata not cached) /mnt/sdi/foobar: 327680 extents found fiemap took 742 milliseconds (metadata cached) After applying this patch: (...) /mnt/sdi/foobar: 327680 extents found fiemap took 689 milliseconds (metadata not cached) /mnt/sdi/foobar: 327680 extents found fiemap took 393 milliseconds (metadata cached) That's a -46.4% total reduction for the metadata not cached case, and a -47.0% reduction for the cached metadata case. The test is somewhat limited in the sense the gains may be higher in practice, because in the test the filesystem is small, so we have small fs and extent trees, plus there's no concurrent access to the trees as well, therefore no lock contention there. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 877c14767f106a5c8af271ebf1294c514eb76d0c Author: Filipe Manana Date: Tue Oct 11 13:17:08 2022 +0100 btrfs: avoid duplicated resolution of indirect backrefs during fiemap During fiemap, when determining if a data extent is shared or not, if we don't find the extent is directly shared, then we need to determine if it's shared through subtrees. For that we need to resolve the indirect reference we found in order to figure out the path in the inode's fs tree, which is a path starting at the fs tree's root node and going down to the leaf that contains the file extent item that points to the data extent. We then proceed to determine if any extent buffer in that path is shared with other trees or not. Currently whenever we find the data extent that a file extent item points to is not directly shared, we always resolve the path in the fs tree, and then check if any extent buffer in the path is shared. This is a lot of work and when we have file extent items that belong to the same leaf, we have the same path, so we only need to calculate it once. This change does that, it keeps track of the current and previous leaf, and when we find that a data extent is not directly shared, we try to compute the fs tree path only once and then use it for every other file extent item in the same leaf, using the existing cached path result for the leaf as long as the cache results are valid. This saves us from doing expensive b+tree searches in the fs tree of our target inode, as well as other minor work. The following test was run on a non-debug kernel (Debian's default kernel config): $ cat test-with-snapshots.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi 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 umount $MNT mount -o compress=lzo $DEV $MNT start=$(date +%s%N) 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 Result before applying this patch: (...) /mnt/sdi/foobar: 327680 extents found fiemap took 1204 milliseconds (metadata not cached) /mnt/sdi/foobar: 327680 extents found fiemap took 729 milliseconds (metadata cached) Result after applying this patch: (...) /mnt/sdi/foobar: 327680 extents found fiemap took 732 milliseconds (metadata not cached) /mnt/sdi/foobar: 327680 extents found fiemap took 421 milliseconds (metadata cached) That's a -46.1% total reduction for the metadata not cached case, and a -42.2% reduction for the cached metadata case. The test is somewhat limited in the sense the gains may be higher in practice, because in the test the filesystem is small, so we have small fs and extent trees, plus there's no concurrent access to the trees as well, therefore no lock contention there. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 64 ++++++++++++++++++++++++++++++++++++++++++++-------- fs/btrfs/backref.h | 13 +++++++++++ fs/btrfs/extent_io.c | 2 ++ 3 files changed, 69 insertions(+), 10 deletions(-) commit 583f4ac56254c844cbbc9f23744e1f2efbf42fc7 Author: Filipe Manana Date: Tue Oct 11 13:17:07 2022 +0100 btrfs: move up backref sharedness cache store and lookup functions Move the static functions to lookup and store sharedness check of an extent buffer to a location above find_all_parents(), because in the next patch the lookup function will be used by find_all_parents(). The store function is also moved just because it's the counter part to the lookup function and it's best to have their definitions close together. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 236 ++++++++++++++++++++++++++--------------------------- 1 file changed, 118 insertions(+), 118 deletions(-) commit 73e339e6ab74cc3edcd1f1ed3d9b822baf8534e1 Author: Filipe Manana Date: Tue Oct 11 13:17:06 2022 +0100 btrfs: cache sharedness of the last few data extents during fiemap During fiemap we process all the file extent items of an inode, by their file offset order (left to right b+tree order), and then check if the data extent they point at is shared or not. Until now we didn't cache those results, we only did it for b+tree nodes/leaves since for each unique b+tree path we have access to hundreds of file extent items. However, it is also common to repeat checking the sharedness of a particular data extent in a very short time window, and the cases that lead to that are the following: 1) COW writes. If have a file extent item like this: [ bytenr X, offset = 0, num_bytes = 512K ] file offset 0 512K Then a 4K write into file offset 64K happens, we end up with the following file extent item layout: [ bytenr X, offset = 0, num_bytes = 64K ] file offset 0 64K [ bytenr Y, offset = 0, num_bytes = 4K ] file offset 64K 68K [ bytenr X, offset = 68K, num_bytes = 444K ] file offset 68K 512K So during fiemap we well check for the sharedness of the data extent with bytenr X twice. Typically for COW writes and for at least moderately updated files, we end up with many file extent items that point to different sections of the same data extent. 2) Writing into a NOCOW file after a snapshot is taken. This happens if the target extent was created in a generation older than the generation where the last snapshot for the root (the tree the inode belongs to) was made. This leads to a scenario like the previous one. 3) Writing into sections of a preallocated extent. For example if a file has the following layout: [ bytenr X, offset = 0, num_bytes = 1M, type = prealloc ] 0 1M After doing a 4K write into file offset 0 and another 4K write into offset 512K, we get the following layout: [ bytenr X, offset = 0, num_bytes = 4K, type = regular ] 0 4K [ bytenr X, offset = 4K, num_bytes = 508K, type = prealloc ] 4K 512K [ bytenr X, offset = 512K, num_bytes = 4K, type = regular ] 512K 516K [ bytenr X, offset = 516K, num_bytes = 508K, type = prealloc ] 516K 1M So we end up with 4 consecutive file extent items pointing to the data extent at bytenr X. 4) Hole punching in the middle of an extent. For example if a file has the following file extent item: [ bytenr X, offset = 0, num_bytes = 8M ] 0 8M And then hole is punched for the file range [4M, 6M[, we our file extent item split into two: [ bytenr X, offset = 0, num_bytes = 4M ] 0 4M [ 2M hole, implicit or explicit depending on NO_HOLES feature ] 4M 6M [ bytenr X, offset = 6M, num_bytes = 2M ] 6M 8M Again, we end up with two file extent items pointing to the same data extent. 5) When reflinking (clone and deduplication) within the same file. This is probably the least common case of all. In cases 1, 2, 4 and 4, when we have multiple file extent items that point to the same data extent, their distance is usually short, typically separated by a few slots in a b+tree leaf (or across sibling leaves). For case 5, the distance can vary a lot, but it's typically the less common case. This change caches the result of the sharedness checks for data extents, but only for the last 8 extents that we notice that our inode refers to with multiple file extent items. Whenever we want to check if a data extent is shared, we lookup the cache which consists of doing a linear scan of an 8 elements array, and if we find the data extent there, we return the result and don't check the extent tree and delayed refs. The array/cache is small so that doing the search has no noticeable negative impact on the performance in case we don't have file extent items within a distance of 8 slots that point to the same data extent. Slots in the cache/array are overwritten in a simple round robin fashion, as that approach fits very well. Using this simple approach with only the last 8 data extents seen is effective as usually when multiple file extents items point to the same data extent, their distance is within 8 slots. It also uses very little memory and the time to cache a result or lookup the cache is negligible. The following test was run on non-debug kernel (Debian's default kernel config) to measure the impact in the case of COW writes (first example given above), where we run fiemap after overwriting 33% of the blocks of a file: $ cat test.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi umount $DEV &> /dev/null mkfs.btrfs -f $DEV mount $DEV $MNT FILE_SIZE=$((1 * 1024 * 1024 * 1024)) # Create the file full of 1M extents. xfs_io -f -s -c "pwrite -b 1M -S 0xab 0 $FILE_SIZE" $MNT/foobar block_count=$((FILE_SIZE / 4096)) # Overwrite about 33% of the file blocks. overwrite_count=$((block_count / 3)) echo -e "\nOverwriting $overwrite_count 4K blocks (out of $block_count)..." RANDOM=123 for ((i = 1; i <= $overwrite_count; i++)); do off=$(((RANDOM % block_count) * 4096)) xfs_io -c "pwrite -S 0xcd $off 4K" $MNT/foobar > /dev/null echo -ne "\r$i blocks overwritten..." done echo -e "\n" # Unmount and mount to clear all cached metadata. umount $MNT mount $DEV $MNT start=$(date +%s%N) filefrag $MNT/foobar end=$(date +%s%N) dur=$(( (end - start) / 1000000 )) echo "fiemap took $dur milliseconds" umount $MNT Result before applying this patch: fiemap took 128 milliseconds Result after applying this patch: fiemap took 92 milliseconds (-28.1%) The test is somewhat limited in the sense the gains may be higher in practice, because in the test the filesystem is small, so we have small fs and extent trees, plus there's no concurrent access to the trees as well, therefore no lock contention there. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- fs/btrfs/backref.h | 27 +++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 3 deletions(-) commit 56f5c19920d09bbf91efcf80e6ba301923400f4c Author: Filipe Manana Date: Tue Oct 11 13:17:05 2022 +0100 btrfs: remove useless logic when finding parent nodes At find_parent_nodes(), at its last step, when iterating over all direct references, we are checking if we have a share context and if we have a reference with a different root from the one in the share context. However that logic is pointless because of two reasons: 1) After the previous patch in the series (subject "btrfs: remove roots ulist when checking data extent sharedness"), the roots argument is always NULL when using a share check context (struct share_check), so this code is never triggered; 2) Even before that previous patch, we could not hit this code because if we had a reference with a root different from the one in our share context, then we would have exited earlier when doing either of the following: - Adding a second direct ref to the direct refs red black tree resulted in extent_is_shared() returning true when called from add_direct_ref() -> add_prelim_ref(), after processing delayed references or while processing references in the extent tree; - When adding a second reference to the indirect refs red black tree (same as above, extent_is_shared() returns true); - If we only have one indirect reference and no direct references, then when resolving it at resolve_indirect_refs() we immediately return that the target extent is shared, therefore never reaching that loop that iterates over all direct references at find_parent_nodes(); - If we have 1 indirect reference and 1 direct reference, then we also exit early because extent_is_shared() ends up returning true when called through add_prelim_ref() (by add_direct_ref() or add_indirect_ref()) or add_delayed_refs(). Same applies as when having a combination of direct, indirect and indirect with missing key references. This logic had been obsoleted since commit 3ec4d3238ab165 ("btrfs: allow backref search checks for shared extents"), which introduced the early exits in case an extent is shared. So just remove that logic, and assert at find_parent_nodes() that when we have a share context we don't have a roots ulist and that we haven't found the extent to be directly shared after processing delayed references and all references from the extent tree. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit b629685803bc0cefbbd29240ea28d57d8a17bcbc Author: Filipe Manana Date: Tue Oct 11 13:17:04 2022 +0100 btrfs: remove roots ulist when checking data extent sharedness Currently btrfs_is_data_extent_shared() is passing a ulist for the roots argument of find_parent_nodes(), however it does not use that ulist for anything and for this context that list always ends up with at most one element. Since find_parent_nodes() is able to deal with a NULL ulist for its roots argument, make btrfs_is_data_extent_shared() pass it NULL and avoid the burden of allocating memory for the unnused roots ulist, initializing it, releasing it and allocating one struct ulist_node for it during the call to find_parent_nodes(). Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 6 +----- fs/btrfs/backref.h | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) commit 84a7949d409753c90dc3477b8cfc18e983b09078 Author: Filipe Manana Date: Tue Oct 11 13:17:03 2022 +0100 btrfs: move ulists to data extent sharedness check context When calling btrfs_is_data_extent_shared() we pass two ulists that were allocated by the caller. This is because the single caller, fiemap, calls btrfs_is_data_extent_shared() multiple times and the ulists can be reused, instead of allocating new ones before each call and freeing them after each call. Now that we have a context structure/object that we pass to btrfs_is_data_extent_shared(), we can move those ulists to it, and hide their allocation and the context's allocation in a helper function, as well as the freeing of the ulists and the context object. This allows to reduce the number of parameters passed to btrfs_is_data_extent_shared(), the need to pass the ulists from extent_fiemap() to fiemap_process_hole() and having the caller deal with allocating and releasing the ulists. Also rename one of the ulists from 'tmp' / 'tmp_ulist' to 'refs', since that's a much better name as it reflects what the list is used for (and matching the argument name for find_parent_nodes()). Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 43 ++++++++++++++++++++++++++++++++----------- fs/btrfs/backref.h | 7 ++++++- fs/btrfs/extent_io.c | 34 ++++++++++------------------------ 3 files changed, 48 insertions(+), 36 deletions(-) commit 61dbb952f0a5f587c983d88853212e969d2d4ede Author: Filipe Manana Date: Tue Oct 11 13:17:02 2022 +0100 btrfs: turn the backref sharedness check cache into a context object Right now we are using a struct btrfs_backref_shared_cache to pass state across multiple btrfs_is_data_extent_shared() calls. The structure's name closely follows its current purpose, which is to cache previous checks for the sharedness of metadata extents. However we will start using the structure for more things other than caching sharedness checks, so rename it to struct btrfs_backref_share_check_ctx. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 32 ++++++++++++++++---------------- fs/btrfs/backref.h | 8 ++++---- fs/btrfs/extent_io.c | 24 ++++++++++++------------ 3 files changed, 32 insertions(+), 32 deletions(-) commit ceb707da9ad92ad3a5251dc13844034ded06cb3d Author: Filipe Manana Date: Tue Oct 11 13:17:01 2022 +0100 btrfs: directly pass the inode to btrfs_is_data_extent_shared() Currently we pass a root and an inode number as arguments for btrfs_is_data_extent_shared() and the inode number is always from an inode that belongs to that root (it wouldn't make sense otherwise). In every context that we call btrfs_is_data_extent_shared() (fiemap only), we have an inode available, so directly pass the inode to the function instead of a root and inode number. This reduces the number of parameters and it makes the function's signature conform to most other functions we have. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 8 ++++---- fs/btrfs/backref.h | 2 +- fs/btrfs/extent_io.c | 16 +++++++--------- 3 files changed, 12 insertions(+), 14 deletions(-) commit a0a5472ad802d99d3fb4b361cc3fb5ea24914ee0 Author: Filipe Manana Date: Tue Oct 11 13:17:00 2022 +0100 btrfs: remove checks for a 0 inode number during backref walking When doing backref walking to determine if an extent is shared, we are testing if the inode number, stored in the 'inum' field of struct share_check, is 0. However that can never be case, since the all instances of the structure are created at btrfs_is_data_extent_shared(), which always initializes it with the inode number from a fs tree (and the number for any inode from any tree can never be 0). So remove the checks. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c902421927ff602954d2ecc7bd6e71b255d29387 Author: Filipe Manana Date: Tue Oct 11 13:16:59 2022 +0100 btrfs: remove checks for a root with id 0 during backref walking When doing backref walking to determine if an extent is shared, we are testing the root_objectid of the given share_check struct is 0, but that is an impossible case, since btrfs_is_data_extent_shared() always initializes the root_objectid field with the id of the given root, and no root can have an objectid of 0. So remove those checks. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 206c1d32f381ee91ba849a7dcb28728e8c3721b6 Author: Filipe Manana Date: Tue Oct 11 13:16:58 2022 +0100 btrfs: drop redundant bflags initialization when allocating extent buffer When allocating an extent buffer, at __alloc_extent_buffer(), there's no point in explicitly assigning zero to the bflags field of the new extent buffer because we allocated it with kmem_cache_zalloc(). So just remove the redundant initialization, it saves one mov instruction in the generated assembly code for x86_64 ("movq $0x0,0x10(%rax)"). Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent_io.c | 1 - 1 file changed, 1 deletion(-) commit b98c6cd59e90fe659cf966859bc4e1c03aea347b Author: Filipe Manana Date: Tue Oct 11 13:16:57 2022 +0100 btrfs: drop pointless memset when cloning extent buffer At btrfs_clone_extent_buffer(), before allocating the pages array for the new extent buffer we are calling memset() to zero out the pages array of the extent buffer. This is pointless however, because the extent buffer already has every element in its pages array pointing to NULL, as it was allocated with kmem_cache_zalloc(). The memset() was introduced with commit dd137dd1f2d719 ("btrfs: factor out allocating an array of pages"), but even before that commit we already depended on the pages array being initialized to NULL for the error paths that need to call btrfs_release_extent_buffer(). So remove the memset(), it's useless and slightly increases the object text size. Before this change: $ size fs/btrfs/extent_io.o text data bss dec hex filename 70580 5469 40 76089 12939 fs/btrfs/extent_io.o After this change: $ size fs/btrfs/extent_io.o text data bss dec hex filename 70564 5469 40 76073 12929 fs/btrfs/extent_io.o Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent_io.c | 1 - 1 file changed, 1 deletion(-) commit a2853ffc2eb9bfb6e6d48486df7f3969a58ae3b4 Author: Filipe Manana Date: Tue Oct 11 13:16:56 2022 +0100 btrfs: skip unnecessary delalloc search during fiemap and lseek During fiemap and lseek (hole and data seeking), there's no point in iterating the inode's io tree to count delalloc bits if the inode's delalloc bytes counter has a value of zero, as that counter is updated whenever we set a range for delalloc or clear a range from delalloc. So skip the counting and io tree iteration if the inode's delalloc bytes counter has a value of zero. This helps save time when processing a file range corresponding to a hole or prealloc (unwritten) extent. This patch is part of a series comprised of the following patches: btrfs: get the next extent map during fiemap/lseek more efficiently btrfs: skip unnecessary extent map searches during fiemap and lseek btrfs: skip unnecessary delalloc search during fiemap and lseek The following test was performed on a release kernel (Debian's default kernel config) before and after applying those 3 patches. # Wrapper to call fiemap in extent count only mode. # (struct fiemap::fm_extent_count set to 0) $ cat fiemap.c #include #include #include #include #include #include #include #include #include int main(int argc, char **argv) { struct fiemap fiemap = { 0 }; int fd; if (argc != 2) { printf("usage: %s \n", argv[0]); return 1; } fd = open(argv[1], O_RDONLY); if (fd < 0) { fprintf(stderr, "error opening file: %s\n", strerror(errno)); return 1; } /* fiemap.fm_extent_count set to 0, to count extents only. */ fiemap.fm_length = FIEMAP_MAX_OFFSET; if (ioctl(fd, FS_IOC_FIEMAP, &fiemap) < 0) { fprintf(stderr, "fiemap error: %s\n", strerror(errno)); return 1; } close(fd); printf("fm_mapped_extents = %d\n", fiemap.fm_mapped_extents); return 0; } $ gcc -o fiemap fiemap.c And the wrapper shell script that creates a file with many holes and runs fiemap against it: $ cat test.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi mkfs.btrfs -f $DEV mount $DEV $MNT FILE_SIZE=$((1 * 1024 * 1024 * 1024)) echo -n > $MNT/foobar for ((off = 0; off < $FILE_SIZE; off += 8192)); do xfs_io -c "pwrite -S 0xab $off 4K" $MNT/foobar > /dev/null done # flush all delalloc sync start=$(date +%s%N) ./fiemap $MNT/foobar end=$(date +%s%N) dur=$(( (end - start) / 1000000 )) echo "fiemap took $dur milliseconds" umount $MNT Result before applying patchset: fm_mapped_extents = 131072 fiemap took 63 milliseconds Result after applying patchset: fm_mapped_extents = 131072 fiemap took 39 milliseconds (-38.1%) Running the same test for a 512M file instead of a 1G file, gave the following results. Result before applying patchset: fm_mapped_extents = 65536 fiemap took 29 milliseconds Result after applying patchset: fm_mapped_extents = 65536 fiemap took 20 milliseconds (-31.0%) Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 013f9c70d293d7a47aaaeaee248ca60f745fa450 Author: Filipe Manana Date: Tue Oct 11 13:16:55 2022 +0100 btrfs: skip unnecessary extent map searches during fiemap and lseek If we have no outstanding extents it means we don't have any extent maps corresponding to delalloc that is flushing, as when an ordered extent is created we increment the number of outstanding extents to 1 and when we remove the ordered extent we decrement them by 1. So skip extent map tree searches if the number of outstanding ordered extents is 0, saving time as the tree is not empty if we have previously made some reads or flushed delalloc, as in those cases it can have a very large number of extent maps for files with many extents. This helps save time when processing a file range corresponding to a hole or prealloc (unwritten) extent. The next patch in the series has a performance test in its changelog and its subject is: "btrfs: skip unnecessary delalloc search during fiemap and lseek" Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d47704bd1c78c85831561bcf701b90dd66f811b2 Author: Filipe Manana Date: Tue Oct 11 13:16:54 2022 +0100 btrfs: get the next extent map during fiemap/lseek more efficiently At find_delalloc_subrange(), when we need to get the next extent map, we do a full search on the extent map tree (a red black tree). This is fine but it's a lot more efficient to simply use rb_next(), which typically requires iterating over less nodes of the tree and never needs to compare the ranges of nodes with the one we are looking for. So add a public helper to extent_map.{h,c} to get the extent map that immediately follows another extent map, using rb_next(), and use that helper at find_delalloc_subrange(). Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent_map.c | 31 ++++++++++++++++++++++++++++++- fs/btrfs/extent_map.h | 2 ++ fs/btrfs/file.c | 44 +++++++++++++++++++++++++++----------------- 3 files changed, 59 insertions(+), 18 deletions(-) commit 88074c8b1376ac315ef4a294db82d861df074ef2 Author: Qu Wenruo Date: Mon Oct 10 18:36:10 2022 +0800 btrfs: raid56: make it more explicit that cache rbio should have all its data sectors uptodate For Btrfs RAID56, we have a caching system for btrfs raid bios (rbio). We call cache_rbio_pages() to mark a qualified rbio ready for cache. The timing happens at: - finish_rmw() At this timing, we have already read all necessary sectors, along with the rbio sectors, we have covered all data stripes. - __raid_recover_end_io() At this timing, we have rebuild the rbio, thus all data sectors involved (either from stripe or bio list) are uptodate now. Thus at the timing of cache_rbio_pages(), we should have all data sectors uptodate. This patch will make it explicit that all data sectors are uptodate at cache_rbio_pages() timing, mostly to prepare for the incoming verification at RMW time. This patch will add: - Extra ASSERT()s in cache_rbio_pages() This is to make sure all data sectors, which are not covered by bio, are already uptodate. - Extra ASSERT()s in steal_rbio() Since only cached rbio can be stolen, thus every data sector should already be uptodate in the source rbio. - Update __raid_recover_end_io() to update recovered sector->uptodate Previously __raid_recover_end_io() will only mark failed sectors uptodate if it's doing an RMW. But this can trigger new ASSERT()s, as for recovery case, a recovered failed sector will not be marked uptodate, and trigger ASSERT() in later cache_rbio_pages() call. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 70 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 19 deletions(-) commit 797d74b749850a5b81c47560caec26e00e7e3768 Author: Qu Wenruo Date: Mon Oct 10 18:36:09 2022 +0800 btrfs: raid56: allocate memory separately for rbio pointers Currently inside alloc_rbio(), we allocate a larger memory to contain the following members: - struct btrfs_raid_rbio itself - stripe_pages array - bio_sectors array - stripe_sectors array - finish_pointers array Then update rbio pointers to point the extra space after the rbio structure itself. Thus it introduced a complex CONSUME_ALLOC() macro to help the thing. This is too hacky, and is going to make later pointers expansion harder. This patch will change it to use regular kcalloc() for each pointer inside btrfs_raid_bio, making the later expansion much easier. And introduce a helper free_raid_bio_pointers() to free up all the pointer members in btrfs_raid_bio, which will be used in both free_raid_bio() and error path of alloc_rbio(). Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) commit ff2b64a22a2efcc087520e94ad06b005268a5f9d Author: Qu Wenruo Date: Mon Oct 10 18:36:08 2022 +0800 btrfs: raid56: cleanup for function __free_raid_bio() The cleanup involves two things: - Remove the "__" prefix There is no naming confliction. - Remove the forward declaration There is no special function call involved. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/raid56.c | 61 +++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 31 deletions(-) commit 765c3fe99bcda005d66c159f9a46fc2e0c77c8ce Author: Josef Bacik Date: Fri Sep 9 09:35:01 2022 -0400 btrfs: introduce BTRFS_RESERVE_FLUSH_EMERGENCY Inside of FB, as well as some user reports, we've had a consistent problem of occasional ENOSPC transaction aborts. Inside FB we were seeing ~100-200 ENOSPC aborts per day in the fleet, which is a really low occurrence rate given the size of our fleet, but it's not nothing. There are two causes of this particular problem. First is delayed allocation. The reservation system for delalloc assumes that contiguous dirty ranges will result in 1 file extent item. However if there is memory pressure that results in fragmented writeout, or there is fragmentation in the block groups, this won't necessarily be true. Consider the case where we do a single 256MiB write to a file and then close it. We will have 1 reservation for the inode update, the reservations for the checksum updates, and 1 reservation for the file extent item. At some point later we decide to write this entire range out, but we're so fragmented that we break this into 100 different file extents. Since we've already closed the file and are no longer writing to it there's nothing to trigger a refill of the delalloc block rsv to satisfy the 99 new file extent reservations we need. At this point we exhaust our delalloc reservation, and we begin to steal from the global reserve. If you have enough of these cases going in parallel you can easily exhaust the global reserve, get an ENOSPC at btrfs_alloc_tree_block() time, and then abort the transaction. The other case is the delayed refs reserve. The delayed refs reserve updates its size based on outstanding delayed refs and dirty block groups. However we only refill this block reserve when returning excess reservations and when we call btrfs_start_transaction(root, X). We will reserve 2*X credits at transaction start time, and fill in X into the delayed refs reserve to make sure it stays topped off. Generally this works well, but clearly has downsides. If we do a particularly delayed ref heavy operation we may never catch up in our reservations. Additionally running delayed refs generates more delayed refs, and at that point we may be committing the transaction and have no way to trigger a refill of our delayed refs rsv. Then a similar thing occurs with the delalloc reserve. Generally speaking we well over-reserve in all of our block rsvs. If we reserve 1 credit we're usually reserving around 264k of space, but we'll often not use any of that reservation, or use a few blocks of that reservation. We can be reasonably sure that as long as you were able to reserve space up front for your operation you'll be able to find space on disk for that reservation. So introduce a new flushing state, BTRFS_RESERVE_FLUSH_EMERGENCY. This gets used in the case that we've exhausted our reserve and the global reserve. It simply forces a reservation if we have enough actual space on disk to make the reservation, which is almost always the case. This keeps us from hitting ENOSPC aborts in these odd occurrences where we've not kept up with the delayed work. Fixing this in a complete way is going to be relatively complicated and time consuming. This patch is what I discussed with Filipe earlier this year, and what I put into our kernels inside FB. With this patch we're down to 1-2 ENOSPC aborts per week, which is a significant reduction. This is a decent stop gap until we can work out a more wholistic solution to these two corner cases. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/block-rsv.c | 12 ++++++++++++ fs/btrfs/space-info.c | 29 +++++++++++++++++++++++++++-- fs/btrfs/space-info.h | 18 ++++++++++++++++++ 3 files changed, 57 insertions(+), 2 deletions(-) commit 7a66eda351bacf2f88801204cfa5319dda3ec75f Author: Josef Bacik Date: Wed Sep 14 11:06:41 2022 -0400 btrfs: move the btrfs_verity_descriptor_item defs up in ctree.h These are wrapped in CONFIG_FS_VERITY, but we can have the definitions without verity enabled. Move these definitions up with the other accessor helpers. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 890d2b1aa38b9101503194855aeee897ba6cdbc2 Author: Josef Bacik Date: Wed Sep 14 11:06:40 2022 -0400 btrfs: move btrfs_next_old_item into ctree.c This uses btrfs_header_nritems, which I will be moving out of ctree.h. In order to avoid needing to include the relevant header in ctree.h, simply move this helper function into ctree.c. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ rename parameters ] Signed-off-by: David Sterba fs/btrfs/ctree.c | 8 ++++++++ fs/btrfs/ctree.h | 9 +-------- 2 files changed, 9 insertions(+), 8 deletions(-) commit eda517fd0ceee0329bb956f701c0e124fc1fe269 Author: Josef Bacik Date: Wed Sep 14 11:06:39 2022 -0400 btrfs: move free space cachep's out of ctree.h This is local to the free-space-cache.c code, remove it from ctree.h and inode.c, create new init/exit functions for the cachep, and move it locally to free-space-cache.c. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 -- fs/btrfs/free-space-cache.c | 28 ++++++++++++++++++++++++++++ fs/btrfs/free-space-cache.h | 2 ++ fs/btrfs/inode.c | 16 ---------------- fs/btrfs/super.c | 9 ++++++++- 5 files changed, 38 insertions(+), 19 deletions(-) commit 226463d7b100d30def24f2be492fef0081003a30 Author: Josef Bacik Date: Wed Sep 14 11:06:38 2022 -0400 btrfs: move btrfs_path_cachep out of ctree.h This is local to the ctree code, remove it from ctree.h and inode.c, create new init/exit functions for the cachep, and move it locally to ctree.c. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 17 +++++++++++++++++ fs/btrfs/ctree.h | 3 ++- fs/btrfs/inode.c | 8 -------- fs/btrfs/super.c | 9 ++++++++- 4 files changed, 27 insertions(+), 10 deletions(-) commit 956504a331a613814279b04f9b0d663c7c2bb9bc Author: Josef Bacik Date: Wed Sep 14 11:06:37 2022 -0400 btrfs: move trans_handle_cachep out of ctree.h This is local to the transaction code, remove it from ctree.h and inode.c, create new helpers in the transaction to handle the init work and move the cachep locally to transaction.c. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - fs/btrfs/inode.c | 8 -------- fs/btrfs/super.c | 9 ++++++++- fs/btrfs/transaction.c | 17 +++++++++++++++++ fs/btrfs/transaction.h | 3 +++ 5 files changed, 28 insertions(+), 10 deletions(-) commit f60acad355cf14ccccf420e6ea0ddd6de87cb210 Author: Josef Bacik Date: Wed Sep 14 11:06:36 2022 -0400 btrfs: move btrfs_print_data_csum_error into inode.c This isn't used outside of inode.c, there's no reason to define it in btrfs_inode.h. Drop the inline and add __cold as it's for errors that are not in any hot path. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 26 -------------------------- fs/btrfs/inode.c | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 26 deletions(-) commit f1e5c6185ca166cde0c7c2eeeab5d233ef315140 Author: Josef Bacik Date: Wed Sep 14 11:06:35 2022 -0400 btrfs: move flush related definitions to space-info.h This code is used in space-info.c, move the definitions to space-info.h. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 59 ------------------------------------------------ fs/btrfs/delayed-inode.c | 1 + fs/btrfs/inode-item.c | 1 + fs/btrfs/props.c | 1 + fs/btrfs/relocation.c | 1 + fs/btrfs/space-info.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 63 insertions(+), 59 deletions(-) commit 06d61cb101f346338b50be5cd4f053a169b59d5e Author: Josef Bacik Date: Wed Sep 14 11:06:34 2022 -0400 btrfs: move btrfs_should_fragment_free_space into block-group.c This function uses functions that are not defined in block-group.h, move it into block-group.c in order to keep the header clean. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/block-group.c | 12 ++++++++++++ fs/btrfs/block-group.h | 11 +---------- 2 files changed, 13 insertions(+), 10 deletions(-) commit 390d89ccf672ec79b84037d4af834b2275ff7cb9 Author: Josef Bacik Date: Wed Sep 14 11:06:32 2022 -0400 btrfs: move discard stat defs to free-space-cache.h These definitions are used for discard statistics, move them out of ctree.h and put them in free-space-cache.h. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 9 --------- fs/btrfs/free-space-cache.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) commit ed4c491a3db2e85b3eb04ac61f0723fc2ec5f50a Author: Josef Bacik Date: Wed Sep 14 11:06:31 2022 -0400 btrfs: move BTRFS_MAX_MIRRORS into scrub.c This is only used locally in scrub.c, move it out of ctree.h into scrub.c. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 11 ----------- fs/btrfs/scrub.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) commit ad4b63caf56d0dc08e03966172d685ff9ebad996 Author: Josef Bacik Date: Wed Sep 14 11:06:30 2022 -0400 btrfs: move maximum limits to btrfs_tree.h We have maximum link and name length limits, move these to btrfs_tree.h as they're on disk limitations. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ reformat comments ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 13 ------------- include/uapi/linux/btrfs_tree.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) commit 51129b33d3911c7a36e643d47cf7c00fba3089fe Author: Josef Bacik Date: Wed Sep 14 11:06:29 2022 -0400 btrfs: move btrfs_get_block_group helper out of disk-io.h This inline helper calls btrfs_fs_compat_ro(), which is defined in another header. To avoid weird header dependency problems move this helper into disk-io.c with the rest of the global root helpers. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/disk-io.c | 7 +++++++ fs/btrfs/disk-io.h | 8 +------- 2 files changed, 8 insertions(+), 7 deletions(-) commit 4300c58f809079951c87d84e5f11a2d265e3c9e7 Author: Josef Bacik Date: Wed Sep 14 11:06:28 2022 -0400 btrfs: move btrfs on-disk definitions out of ctree.h The bulk of our on-disk definitions exist in btrfs_tree.h, which user space can use. Keep things consistent and move the rest of the on disk definitions out of ctree.h into btrfs_tree.h. Note I did have to update all u8's to __u8, but otherwise this is a strict copy and paste. Most of the definitions are mainly for internal use and are not guaranteed stable public API and may change as we need. Compilation failures by user applications can happen. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ reformat comments, style fixups ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 215 +--------------------------------------- include/uapi/linux/btrfs_tree.h | 215 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 216 insertions(+), 214 deletions(-) commit 4ce76e8e783693c72956e817f3a6dbbaa055411a Author: Josef Bacik Date: Wed Sep 14 11:06:27 2022 -0400 btrfs: remove unused BTRFS_IOPRIO_READA The last user of this definition was removed in patch f26c92386028 ("btrfs: remove reada infrastructure") so we can remove this definition. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 --- 1 file changed, 3 deletions(-) commit ea206640a600c808d30d8d62c44b6982c12a143b Author: Josef Bacik Date: Wed Sep 14 11:06:26 2022 -0400 btrfs: remove unused BTRFS_TOTAL_BYTES_PINNED_BATCH This hasn't been used since 138a12d86574 ("btrfs: rip out btrfs_space_info::total_bytes_pinned") so it is safe to remove. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 8 -------- 1 file changed, 8 deletions(-) commit d60d956eb41f0945c2438af11ed412109c558f4f Author: Josef Bacik Date: Wed Sep 14 11:06:25 2022 -0400 btrfs: remove unused set/clear_pending_info helpers The last users of these helpers were removed in 5297199a8bca ("btrfs: remove inode number cache feature") so delete these helpers. The point was for mount options that were applicable after transaction commit so they could not be applied immediately. We don't have such options anymore and if we do the patch can be reverted. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 24 ------------------------ 1 file changed, 24 deletions(-) commit c1b078545e64da7a2b67b74b9d12813b5dd2a529 Author: Peng Hao Date: Fri Oct 7 18:33:35 2022 +0200 btrfs: simplify cleanup after error in btrfs_create_tree Since leaf is already NULL, and no other branch will go to fail_unlock, the fail_unlock label is useless and can be removed Signed-off-by: Peng Hao Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e5e886bad9e9e87b767ade3884faec1cfdec9b43 Author: Josef Bacik Date: Fri Sep 30 16:45:13 2022 -0400 btrfs: add cached_state to read_extent_buffer_subpage We don't use a cached state here at all, which generally makes sense as async reads are going to unlock at endio time. However for blocking reads we will call wait_extent_bit() for our range. Since the lock_extent() stuff will return the cached_state for the start of the range this is a helpful optimization to have for this case, we'll have the exact state we want to wait on. Add a cached state here and simply throw it away if we're a non-blocking read, otherwise we'll get a small improvement by eliminating some tree searches. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 123a7f008c9e2b25b451c116620f1f6c77bd6b2b Author: Josef Bacik Date: Fri Sep 30 16:45:12 2022 -0400 btrfs: cache the failed state when locking extents Currently if we fail to lock a range we'll return the start of the range that we failed to lock. We'll then search down to this range and wait on any extent states in this range. However we can avoid this search altogether if we simply cache the extent_state that had the contention. We can pass this into wait_extent_bit() and start from that extent_state without doing the search. In the most optimistic case we can avoid all searches, more likely we'll avoid the initial search and have to perform the search after we wait on the failed state, or worst case we must search both times which is what currently happens. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-io-tree.c | 52 +++++++++++++++++++++++++++++++++++------------ fs/btrfs/extent-io-tree.h | 3 ++- fs/btrfs/extent_io.c | 3 ++- 3 files changed, 43 insertions(+), 15 deletions(-) commit 9c5c9604631ae5fcdc5124c79d01d75f80b5ffd4 Author: Josef Bacik Date: Fri Sep 30 16:45:11 2022 -0400 btrfs: use a cached_state everywhere in relocation All of the relocation code avoids using the cached state, despite everywhere using the normal lock_extent() // do something unlock_extent() pattern. Fix this by plumbing a cached state throughout all of these functions in order to allow for less tree searches. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/relocation.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) commit 632ddfa2131f0fea1831bc1f4b28c68faa779156 Author: Josef Bacik Date: Fri Sep 30 16:45:10 2022 -0400 btrfs: use cached_state for btrfs_check_nocow_lock Now that try_lock_extent() takes a cached_state, plumb the cached_state through btrfs_try_lock_ordered_range() and then use a cached_state in btrfs_check_nocow_lock everywhere to avoid extra tree searches on the extent_io_tree. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 9 ++++++--- fs/btrfs/ordered-data.c | 7 ++++--- fs/btrfs/ordered-data.h | 3 ++- 3 files changed, 12 insertions(+), 7 deletions(-) commit 83ae4133ac9410ac6a57136e464d498dc66200cf Author: Josef Bacik Date: Fri Sep 30 16:45:09 2022 -0400 btrfs: add a cached_state to try_lock_extent With nowait becoming more pervasive throughout our codebase go ahead and add a cached_state to try_lock_extent(). This allows us to be faster about clearing the locked area if we have contention, and then gives us the same optimization for unlock if we are able to lock the range. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-io-tree.c | 7 ++++--- fs/btrfs/extent-io-tree.h | 3 ++- fs/btrfs/extent_io.c | 3 ++- fs/btrfs/file.c | 3 ++- fs/btrfs/inode.c | 3 ++- fs/btrfs/ordered-data.c | 2 +- fs/btrfs/relocation.c | 2 +- 7 files changed, 14 insertions(+), 9 deletions(-) commit 2ed6b4c26669966f2905d9a3afcd487e15bfdbce Merge: 76dcd734eca2 8c37df3d635e Author: Rafael J. Wysocki Date: Mon Dec 5 17:47:07 2022 +0100 Merge tag 'linux-cpupower-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility updates for 6.2-rc1 from Shuah Khan: "This cpupower update for Linux 6.2-rc1 consists of: - enhancement to choose base_cpu to display default cpupower details instead of picking cpu 0 and failing show information when it is offline. This change ensure user will see power information on the cpu the tool runs on. - adds Georgian translation to cpupower documentation. - introduces powercap intel-rapl library, powercap-info command, and rapl monitor. This adds the ability to show the used power consumption in for each rapl domain" * tag 'linux-cpupower-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: rapl monitor - shows the used power consumption in uj for each rapl domain cpupower: Introduce powercap intel-rapl library and powercap-info command cpupower: Add Georgian translation tools/cpupower: Choose base_cpu to display default cpupower details commit 2912cdda734d9136615ed05636d9fcbca2a7a3c5 Author: Philipp Jungkamp Date: Mon Dec 5 17:37:13 2022 +0100 ALSA: patch_realtek: Fix Dell Inspiron Plus 16 The Dell Inspiron Plus 16, in both laptop and 2in1 form factor, has top speakers connected on NID 0x17, which the codec reports as unconnected. These speakers should be connected to the DAC on NID 0x03. Signed-off-by: Philipp Jungkamp Link: https://lore.kernel.org/r/20221205163713.7476-1-p.jungkamp@gmx.net Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 9fb9fa18fb50d1a33a1bd947681fce96fc2c8db6 Author: Vitaly Rodionov Date: Mon Dec 5 14:57:13 2022 +0000 ALSA: hda/cirrus: Add extra 10 ms delay to allow PLL settle and lock. New HW platforms with multiple CS42L42 parts, faster CPU and i2c requre some extra delay to allow PLL to settle and lock. Adding extra 10ms delay. Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20221205145713.23852-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_cs8409.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0307f4e8fff5518f2e123f992b4cd089813dc18c Author: Rafael J. Wysocki Date: Fri Dec 2 15:32:09 2022 +0100 PM: runtime: Relocate rpm_callback() right after __rpm_callback() Because rpm_callback() is a wrapper around __rpm_callback(), and the only caller of it after the change eliminating an invocation of it from rpm_idle(), move the former next to the latter to make the code a bit easier to follow. Signed-off-by: Rafael J. Wysocki Reviewed-by: Adrian Hunter drivers/base/power/runtime.c | 64 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit bc80c2e438dcbfcf748452ec0f7ad5b79ff3ad88 Author: Rafael J. Wysocki Date: Fri Dec 2 15:30:28 2022 +0100 PM: runtime: Do not call __rpm_callback() from rpm_idle() Calling __rpm_callback() from rpm_idle() after adding device links support to the former is a clear mistake. Not only it causes rpm_idle() to carry out unnecessary actions, but it is also against the assumption regarding the stability of PM-runtime status across __rpm_callback() invocations, because rpm_suspend() and rpm_resume() may run in parallel with __rpm_callback() when it is called by rpm_idle() and the device's PM-runtime status can be updated by any of them. Fixes: 21d5c57b3726 ("PM / runtime: Use device links") Link: https://lore.kernel.org/linux-pm/36aed941-a73e-d937-2721-4f0decd61ce0@quicinc.com Signed-off-by: Rafael J. Wysocki Reviewed-by: Adrian Hunter drivers/base/power/runtime.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit a34506e08db7ccce160a259e4b00b1e307486c59 Merge: 1d46f1ae8249 1799cd8540b6 Author: Miquel Raynal Date: Mon Dec 5 15:40:59 2022 +0100 Merge tag 'spi-nor/for-6.2' into mtd/next SPI NOR core changes: * Add support for flash reset using the dt reset-gpios property. * Update hwcaps.mask to include 8D-8D-8D read and page program ops when xSPI profile 1.0 table is defined. * Bypass zero erase size in spi_nor_find_best_erase_type(). * Fix select_uniform_erase to skip 0 erase size * Add generic flash driver. If a flash is not found in the flash_info array, fall back to the generic flash driver which is described solely by the flash's SFDP tables. * Fix the number of bytes for the dummy cycles in spi_nor_spimem_check_readop(). * Introduce SPI_NOR_QUAD_PP flag, as PP_1_1_4 is not SFDP discoverable. SPI NOR manufacturer drivers changes: * Spansion: - use PARSE_SFDP for s28hs512t, - add support for s28hl512t, s28hl01gt, and s28hs01gt. * Gigadevice: Replace default_init() with post_bfpt() for gd25q256. * Micron - ST: Enable locking for mt25qu256a. * Winbond: Add support for W25Q512NW-IQ. * ISSI: Use PARSE_SFDP and SPI_NOR_QUAD_PP. Fix merge conflict in the jedec,spi-nor bindings. Signed-off-by: Miquel Raynal commit 753d734f3f347e7fc49b819472bbf61dcfc1a16f Merge: 86f27d849b47 acb3f4bc2108 Author: Marc Zyngier Date: Mon Dec 5 14:34:32 2022 +0000 Merge remote-tracking branch 'arm64/for-next/sysregs' into kvmarm-master/next Merge arm64's sysreg repainting branch to avoid too many ugly conflicts... Signed-off-by: Marc Zyngier commit 86f27d849b4713eb9ccf679b084e7d4453cbc73d Merge: 118bc846d4de e1b325334002 Author: Marc Zyngier Date: Mon Dec 5 14:39:12 2022 +0000 Merge branch kvm-arm64/misc-6.2 into kvmarm-master/next * kvm-arm64/misc-6.2: : . : Misc fixes for 6.2: : : - Fix formatting for the pvtime documentation : : - Fix a comment in the VHE-specific Makefile : . KVM: arm64: Fix typo in comment KVM: arm64: Fix pvtime documentation Signed-off-by: Marc Zyngier commit 118bc846d4de5b6df1de93fa55671c15bb89853b Merge: 382b5b87a97d 58ff6569bc6e Author: Marc Zyngier Date: Mon Dec 5 14:38:44 2022 +0000 Merge branch kvm-arm64/pmu-unchained into kvmarm-master/next * kvm-arm64/pmu-unchained: : . : PMUv3 fixes and improvements: : : - Make the CHAIN event handling strictly follow the architecture : : - Add support for PMUv3p5 (64bit counters all the way) : : - Various fixes and cleanups : . KVM: arm64: PMU: Fix period computation for 64bit counters with 32bit overflow KVM: arm64: PMU: Sanitise PMCR_EL0.LP on first vcpu run KVM: arm64: PMU: Simplify PMCR_EL0 reset handling KVM: arm64: PMU: Replace version number '0' with ID_AA64DFR0_EL1_PMUVer_NI KVM: arm64: PMU: Make kvm_pmc the main data structure KVM: arm64: PMU: Simplify vcpu computation on perf overflow notification KVM: arm64: PMU: Allow PMUv3p5 to be exposed to the guest KVM: arm64: PMU: Implement PMUv3p5 long counter support KVM: arm64: PMU: Allow ID_DFR0_EL1.PerfMon to be set from userspace KVM: arm64: PMU: Allow ID_AA64DFR0_EL1.PMUver to be set from userspace KVM: arm64: PMU: Move the ID_AA64DFR0_EL1.PMUver limit to VM creation KVM: arm64: PMU: Do not let AArch32 change the counters' top 32 bits KVM: arm64: PMU: Simplify setting a counter to a specific value KVM: arm64: PMU: Add counter_index_to_*reg() helpers KVM: arm64: PMU: Only narrow counters that are not 64bit wide KVM: arm64: PMU: Narrow the overflow checking when required KVM: arm64: PMU: Distinguish between 64bit counter and 64bit overflow KVM: arm64: PMU: Always advertise the CHAIN event KVM: arm64: PMU: Align chained counter implementation with architecture pseudocode arm64: Add ID_DFR0_EL1.PerfMon values for PMUv3p7 and IMP_DEF Signed-off-by: Marc Zyngier commit 382b5b87a97d0958d0ee7d1f2a56df3c6e431770 Merge: cfa72993d133 a4baf8d2639f Author: Marc Zyngier Date: Mon Dec 5 14:38:24 2022 +0000 Merge branch kvm-arm64/mte-map-shared into kvmarm-master/next * kvm-arm64/mte-map-shared: : . : Update the MTE support to allow the VMM to use shared mappings : to back the memslots exposed to MTE-enabled guests. : : Patches courtesy of Catalin Marinas and Peter Collingbourne. : . : Fix a number of issues with MTE, such as races on the tags : being initialised vs the PG_mte_tagged flag as well as the : lack of support for VM_SHARED when KVM is involved. : : Patches from Catalin Marinas and Peter Collingbourne. : . Documentation: document the ABI changes for KVM_CAP_ARM_MTE KVM: arm64: permit all VM_MTE_ALLOWED mappings with MTE enabled KVM: arm64: unify the tests for VMAs in memslots when MTE is enabled arm64: mte: Lock a page for MTE tag initialisation mm: Add PG_arch_3 page flag KVM: arm64: Simplify the sanitise_mte_tags() logic arm64: mte: Fix/clarify the PG_mte_tagged semantics mm: Do not enable PG_arch_2 for all 64-bit architectures Signed-off-by: Marc Zyngier commit 1d46f1ae82494fae60802c1ed09ca5009e1b414c Merge: 2399401feee2 6408cc05a50a Author: Miquel Raynal Date: Mon Dec 5 15:37:27 2022 +0100 Merge tag 'nand/for-6.2' into mtd/next Raw NAND core changes: * Drop obsolete dependencies on COMPILE_TEST * MAINTAINERS: rectify entry for MESON NAND controller bindings * Drop EXPORT_SYMBOL_GPL for nanddev_erase() Raw NAND driver changes: * marvell: Enable NFC/DEVBUS arbiter * gpmi: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync * mpc5121: Replace NO_IRQ by 0 * lpc32xx_{slc,mlc}: - Switch to using pm_ptr() - Switch to using gpiod API * lpc32xx_mlc: Switch to using pm_ptr() * cadence: Support 64-bit slave dma interface * rockchip: Describe rk3128-nfc in the bindings * brcmnand: Update interrupts description in the bindings SPI-NAND driver changes: * winbond: - Add Winbond W25N02KV flash support - Fix flash identification Fix merge conflict with mtd tree regarding the brcm bindings. Signed-off-by: Miquel Raynal commit cfa72993d13302fe958a1a58234a1a8efa72a5b8 Merge: fe8e3f44c587 be66e67f1750 Author: Marc Zyngier Date: Mon Dec 5 14:30:49 2022 +0000 Merge branch kvm-arm64/pkvm-vcpu-state into kvmarm-master/next * kvm-arm64/pkvm-vcpu-state: (25 commits) : . : Large drop of pKVM patches from Will Deacon and co, adding : a private vm/vcpu state at EL2, managed independently from : the EL1 state. From the cover letter: : : "This is version six of the pKVM EL2 state series, extending the pKVM : hypervisor code so that it can dynamically instantiate and manage VM : data structures without the host being able to access them directly. : These structures consist of a hyp VM, a set of hyp vCPUs and the stage-2 : page-table for the MMU. The pages used to hold the hypervisor structures : are returned to the host when the VM is destroyed." : . KVM: arm64: Use the pKVM hyp vCPU structure in handle___kvm_vcpu_run() KVM: arm64: Don't unnecessarily map host kernel sections at EL2 KVM: arm64: Explicitly map 'kvm_vgic_global_state' at EL2 KVM: arm64: Maintain a copy of 'kvm_arm_vmid_bits' at EL2 KVM: arm64: Unmap 'kvm_arm_hyp_percpu_base' from the host KVM: arm64: Return guest memory from EL2 via dedicated teardown memcache KVM: arm64: Instantiate guest stage-2 page-tables at EL2 KVM: arm64: Consolidate stage-2 initialisation into a single function KVM: arm64: Add generic hyp_memcache helpers KVM: arm64: Provide I-cache invalidation by virtual address at EL2 KVM: arm64: Initialise hypervisor copies of host symbols unconditionally KVM: arm64: Add per-cpu fixmap infrastructure at EL2 KVM: arm64: Instantiate pKVM hypervisor VM and vCPU structures from EL1 KVM: arm64: Add infrastructure to create and track pKVM instances at EL2 KVM: arm64: Rename 'host_kvm' to 'host_mmu' KVM: arm64: Add hyp_spinlock_t static initializer KVM: arm64: Include asm/kvm_mmu.h in nvhe/mem_protect.h KVM: arm64: Add helpers to pin memory shared with the hypervisor at EL2 KVM: arm64: Prevent the donation of no-map pages KVM: arm64: Implement do_donate() helper for donating memory ... Signed-off-by: Marc Zyngier commit fe8e3f44c58760f0779813938ed465b3297db1ac Merge: a937f37d85f3 5e806c5812e8 Author: Marc Zyngier Date: Mon Dec 5 14:22:55 2022 +0000 Merge branch kvm-arm64/parallel-faults into kvmarm-master/next * kvm-arm64/parallel-faults: : . : Parallel stage-2 fault handling, courtesy of Oliver Upton. : From the cover letter: : : "Presently KVM only takes a read lock for stage 2 faults if it believes : the fault can be fixed by relaxing permissions on a PTE (write unprotect : for dirty logging). Otherwise, stage 2 faults grab the write lock, which : predictably can pile up all the vCPUs in a sufficiently large VM. : : Like the TDP MMU for x86, this series loosens the locking around : manipulations of the stage 2 page tables to allow parallel faults. RCU : and atomics are exploited to safely build/destroy the stage 2 page : tables in light of multiple software observers." : . KVM: arm64: Reject shared table walks in the hyp code KVM: arm64: Don't acquire RCU read lock for exclusive table walks KVM: arm64: Take a pointer to walker data in kvm_dereference_pteref() KVM: arm64: Handle stage-2 faults in parallel KVM: arm64: Make table->block changes parallel-aware KVM: arm64: Make leaf->leaf PTE changes parallel-aware KVM: arm64: Make block->table PTE changes parallel-aware KVM: arm64: Split init and set for table PTE KVM: arm64: Atomically update stage 2 leaf attributes in parallel walks KVM: arm64: Protect stage-2 traversal with RCU KVM: arm64: Tear down unlinked stage-2 subtree after break-before-make KVM: arm64: Use an opaque type for pteps KVM: arm64: Add a helper to tear down unlinked stage-2 subtrees KVM: arm64: Don't pass kvm_pgtable through kvm_pgtable_walk_data KVM: arm64: Pass mm_ops through the visitor context KVM: arm64: Stash observed pte value in visitor context KVM: arm64: Combine visitor arguments into a context structure Signed-off-by: Marc Zyngier commit 3b84efc066f8793a6581018d92da9b304abd8ce8 Author: Masami Hiramatsu (Google) Date: Fri Dec 2 11:18:52 2022 +0900 arm64: kprobes: Return DBG_HOOK_ERROR if kprobes can not handle a BRK Return DBG_HOOK_ERROR if kprobes can not handle a BRK because it fails to find a kprobe corresponding to the address. Since arm64 kprobes uses stop_machine based text patching for removing BRK, it ensures all running kprobe_break_handler() is done at that point. And after removing the BRK, it removes the kprobe from its hash list. Thus, if the kprobe_break_handler() fails to find kprobe from hash list, there is a bug. Signed-off-by: Masami Hiramatsu (Google) Acked-by: Mark Rutland Link: https://lore.kernel.org/r/166994753273.439920.6629626290560350760.stgit@devnote3 Signed-off-by: Will Deacon arch/arm64/kernel/probes/kprobes.c | 78 ++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 42 deletions(-) commit 30a421552373d2becb378282408a399702a0f00a Author: Masami Hiramatsu (Google) Date: Fri Dec 2 11:18:42 2022 +0900 arm64: kprobes: Let arch do_page_fault() fix up page fault in user handler Since arm64's do_page_fault() can handle the page fault correctly than kprobe_fault_handler() according to the context, let it handle the page fault instead of simply call fixup_exception() in the kprobe_fault_handler(). Signed-off-by: Masami Hiramatsu (Google) Acked-by: Mark Rutland Link: https://lore.kernel.org/r/166994752269.439920.4801339965959400456.stgit@devnote3 Signed-off-by: Will Deacon arch/arm64/kernel/probes/kprobes.c | 8 -------- 1 file changed, 8 deletions(-) commit 0fbcd8abf3375052cc7627cc53aba6f2eb189fbb Author: Masami Hiramatsu (Google) Date: Fri Dec 2 11:18:33 2022 +0900 arm64: Prohibit instrumentation on arch_stack_walk() Mark arch_stack_walk() as noinstr instead of notrace and inline functions called from arch_stack_walk() as __always_inline so that user does not put any instrumentations on it, because this function can be used from return_address() which is used by lockdep. Without this, if the kernel built with CONFIG_LOCKDEP=y, just probing arch_stack_walk() via /kprobe_events will crash the kernel on arm64. # echo p arch_stack_walk >> ${TRACEFS}/kprobe_events # echo 1 > ${TRACEFS}/events/kprobes/enable kprobes: Failed to recover from reentered kprobes. kprobes: Dump kprobe: .symbol_name = arch_stack_walk, .offset = 0, .addr = arch_stack_walk+0x0/0x1c0 ------------[ cut here ]------------ kernel BUG at arch/arm64/kernel/probes/kprobes.c:241! kprobes: Failed to recover from reentered kprobes. kprobes: Dump kprobe: .symbol_name = arch_stack_walk, .offset = 0, .addr = arch_stack_walk+0x0/0x1c0 ------------[ cut here ]------------ kernel BUG at arch/arm64/kernel/probes/kprobes.c:241! PREEMPT SMP Modules linked in: CPU: 0 PID: 17 Comm: migration/0 Tainted: G N 6.1.0-rc5+ #6 Hardware name: linux,dummy-virt (DT) Stopper: 0x0 <- 0x0 pstate: 600003c5 (nZCv DAIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : kprobe_breakpoint_handler+0x178/0x17c lr : kprobe_breakpoint_handler+0x178/0x17c sp : ffff8000080d3090 x29: ffff8000080d3090 x28: ffff0df5845798c0 x27: ffffc4f59057a774 x26: ffff0df5ffbba770 x25: ffff0df58f420f18 x24: ffff49006f641000 x23: ffffc4f590579768 x22: ffff0df58f420f18 x21: ffff8000080d31c0 x20: ffffc4f590579768 x19: ffffc4f590579770 x18: 0000000000000006 x17: 5f6b636174735f68 x16: 637261203d207264 x15: 64612e202c30203d x14: 2074657366666f2e x13: 30633178302f3078 x12: 302b6b6c61775f6b x11: 636174735f686372 x10: ffffc4f590dc5bd8 x9 : ffffc4f58eb31958 x8 : 00000000ffffefff x7 : ffffc4f590dc5bd8 x6 : 80000000fffff000 x5 : 000000000000bff4 x4 : 0000000000000000 x3 : 0000000000000000 x2 : 0000000000000000 x1 : ffff0df5845798c0 x0 : 0000000000000064 Call trace: kprobes: Failed to recover from reentered kprobes. kprobes: Dump kprobe: .symbol_name = arch_stack_walk, .offset = 0, .addr = arch_stack_walk+0x0/0x1c0 ------------[ cut here ]------------ kernel BUG at arch/arm64/kernel/probes/kprobes.c:241! Fixes: 39ef362d2d45 ("arm64: Make return_address() use arch_stack_walk()") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) Acked-by: Mark Rutland Link: https://lore.kernel.org/r/166994751368.439920.3236636557520824664.stgit@devnote3 Signed-off-by: Will Deacon arch/arm64/kernel/stacktrace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a937f37d85f3347a1b6de69990fcd214ce882886 Merge: 3bbcc8cce27a c57351a75d01 Author: Marc Zyngier Date: Mon Dec 5 14:19:50 2022 +0000 Merge branch kvm-arm64/dirty-ring into kvmarm-master/next * kvm-arm64/dirty-ring: : . : Add support for the "per-vcpu dirty-ring tracking with a bitmap : and sprinkles on top", courtesy of Gavin Shan. : : This branch drags the kvmarm-fixes-6.1-3 tag which was already : merged in 6.1-rc4 so that the branch is in a working state. : . KVM: Push dirty information unconditionally to backup bitmap KVM: selftests: Automate choosing dirty ring size in dirty_log_test KVM: selftests: Clear dirty ring states between two modes in dirty_log_test KVM: selftests: Use host page size to map ring buffer in dirty_log_test KVM: arm64: Enable ring-based dirty memory tracking KVM: Support dirty ring in conjunction with bitmap KVM: Move declaration of kvm_cpu_dirty_log_size() to kvm_dirty_ring.h KVM: x86: Introduce KVM_REQ_DIRTY_RING_SOFT_FULL Signed-off-by: Marc Zyngier commit 3bbcc8cce27ae6d9f9e3878eeeef9f4445aa69d2 Merge: b1d10ee1565a 219072c09abd Author: Marc Zyngier Date: Mon Dec 5 14:19:27 2022 +0000 Merge branch kvm-arm64/52bit-fixes into kvmarm-master/next * kvm-arm64/52bit-fixes: : . : 52bit PA fixes, courtesy of Ryan Roberts. From the cover letter: : : "I've been adding support for FEAT_LPA2 to KVM and as part of that work have been : testing various (84) configurations of HW, host and guest kernels on FVP. This : has thrown up a couple of pre-existing bugs, for which the fixes are provided." : . KVM: arm64: Fix benign bug with incorrect use of VA_BITS KVM: arm64: Fix PAR_TO_HPFAR() to work independently of PA_BITS. KVM: arm64: Fix kvm init failure when mode!=vhe and VA_BITS=52. Signed-off-by: Marc Zyngier commit 92e61c2e0cee0ff441612628d5715d192636c89d Merge: 76dcd734eca2 7fc7f25419f5 Author: Rafael J. Wysocki Date: Mon Dec 5 15:18:17 2022 +0100 Merge tag 'devfreq-next-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq updates for 6.2 from Chanwoo Choi: "- Add a private governor_data for governor. The private governor_data is allocated and handled by governor regardless of passing the data from devfreq driver via devfreq_add_device. The added private governor data keeps the governor own data when switching from userspace governor and other governors. - Replace code by using defined functions of device_match_of_node() and devm_platform_get_and_ioremap_resource()." * tag 'devfreq-next-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: event: use devm_platform_get_and_ioremap_resource() PM / devfreq: event: Use device_match_of_node() PM / devfreq: Use device_match_of_node() PM/devfreq: governor: Add a private governor_data for governor commit 219072c09abde0f1d0a6ce091be375e8eb7d08f0 Author: Ryan Roberts Date: Mon Dec 5 11:40:31 2022 +0000 KVM: arm64: Fix benign bug with incorrect use of VA_BITS get_user_mapping_size() uses kvm's pgtable library to walk a user space page table created by the kernel, and in doing so, passes metadata that the library needs, including ia_bits, which defines the size of the input address. For the case where the kernel is compiled for 52 VA bits but runs on HW that does not support LVA, it will fall back to 48 VA bits at runtime. Therefore we must use vabits_actual rather than VA_BITS to get the true address size. This is benign in the current code base because the pgtable library only uses it for error checking. Fixes: 6011cf68c885 ("KVM: arm64: Walk userspace page tables to compute the THP mapping size") Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221205114031.3972780-1-ryan.roberts@arm.com arch/arm64/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1d10ee1565a6109b21490e73dc2f3af531d3411 Merge: adde0476aff9 4568180411e0 Author: Marc Zyngier Date: Mon Dec 5 14:16:55 2022 +0000 Merge branch kvm-arm64/selftest/access-tracking into kvmarm-master/next * kvm-arm64/selftest/access-tracking: : . : Small series to add support for arm64 to access_tracking_perf_test and : correct a couple bugs along the way. : : Patches courtesy of Oliver Upton. : . KVM: selftests: Build access_tracking_perf_test for arm64 KVM: selftests: Have perf_test_util signal when to stop vCPUs Signed-off-by: Marc Zyngier commit adde0476aff9c4d15df0c5738880bb8cbd44ad8b Merge: 02f6fdd44dbf ff2b5509e1d2 Author: Marc Zyngier Date: Mon Dec 5 14:16:41 2022 +0000 Merge branch kvm-arm64/selftest/s2-faults into kvmarm-master/next * kvm-arm64/selftest/s2-faults: : . : New KVM/arm64 selftests exercising various sorts of S2 faults, courtesy : of Ricardo Koller. From the cover letter: : : "This series adds a new aarch64 selftest for testing stage 2 fault handling : for various combinations of guest accesses (e.g., write, S1PTW), backing : sources (e.g., anon), and types of faults (e.g., read on hugetlbfs with a : hole, write on a readonly memslot). Each test tries a different combination : and then checks that the access results in the right behavior (e.g., uffd : faults with the right address and write/read flag). [...]" : . KVM: selftests: aarch64: Add mix of tests into page_fault_test KVM: selftests: aarch64: Add readonly memslot tests into page_fault_test KVM: selftests: aarch64: Add dirty logging tests into page_fault_test KVM: selftests: aarch64: Add userfaultfd tests into page_fault_test KVM: selftests: aarch64: Add aarch64/page_fault_test KVM: selftests: Use the right memslot for code, page-tables, and data allocations KVM: selftests: Fix alignment in virt_arch_pgd_alloc() and vm_vaddr_alloc() KVM: selftests: Add vm->memslots[] and enum kvm_mem_region_type KVM: selftests: Stash backing_src_type in struct userspace_mem_region tools: Copy bitfield.h from the kernel sources KVM: selftests: aarch64: Construct DEFAULT_MAIR_EL1 using sysreg.h macros KVM: selftests: Add missing close and munmap in __vm_mem_region_delete() KVM: selftests: aarch64: Add virt_get_pte_hva() library function KVM: selftests: Add a userfaultfd library Signed-off-by: Marc Zyngier commit 02f6fdd44dbf01b8732eb37499c20fbf5830d784 Merge: f8faf02fb3e5 ebb8cc10316d Author: Marc Zyngier Date: Mon Dec 5 14:16:24 2022 +0000 Merge branch kvm-arm64/selftest/linked-bps into kvmarm-master/next * kvm-arm64/selftest/linked-bps: : . : Additional selftests for the arm64 breakpoints/watchpoints, : courtesy of Reiji Watanabe. From the cover letter: : : "This series adds test cases for linked {break,watch}points to the : debug-exceptions test, and expands {break,watch}point tests to : use non-zero {break,watch}points (the current test always uses : {break,watch}point#0)." : . KVM: arm64: selftests: Test with every breakpoint/watchpoint KVM: arm64: selftests: Add a test case for a linked watchpoint KVM: arm64: selftests: Add a test case for a linked breakpoint KVM: arm64: selftests: Change debug_version() to take ID_AA64DFR0_EL1 KVM: arm64: selftests: Stop unnecessary test stage tracking of debug-exceptions KVM: arm64: selftests: Add helpers to enable debug exceptions KVM: arm64: selftests: Remove the hard-coded {b,w}pn#0 from debug-exceptions KVM: arm64: selftests: Add write_dbg{b,w}{c,v}r helpers in debug-exceptions KVM: arm64: selftests: Use FIELD_GET() to extract ID register fields Signed-off-by: Marc Zyngier commit f8faf02fb3e546d268fa702f293ea02bda863f8e Merge: f0c4d9fc9cc9 a69170c65acd Author: Marc Zyngier Date: Mon Dec 5 14:16:07 2022 +0000 Merge branch kvm-arm64/selftest/memslot-fixes into kvmarm-master/next * kvm-arm64/selftest/memslot-fixes: : . : KVM memslot selftest fixes for non-4kB page sizes, courtesy : of Gavin Shan. From the cover letter: : : "kvm/selftests/memslots_perf_test doesn't work with 64KB-page-size-host : and 4KB-page-size-guest on aarch64. In the implementation, the host and : guest page size have been hardcoded to 4KB. It's ovbiously not working : on aarch64 which supports 4KB, 16KB, 64KB individually on host and guest. : : This series tries to fix it. After the series is applied, the test runs : successfully with 64KB-page-size-host and 4KB-page-size-guest." : . KVM: selftests: memslot_perf_test: Report optimal memory slots KVM: selftests: memslot_perf_test: Consolidate memory KVM: selftests: memslot_perf_test: Support variable guest page size KVM: selftests: memslot_perf_test: Probe memory slots for once KVM: selftests: memslot_perf_test: Consolidate loop conditions in prepare_vm() KVM: selftests: memslot_perf_test: Use data->nslots in prepare_vm() Signed-off-by: Marc Zyngier commit 1cd7de447cbbc49876f4df3f269b0562b8fe5b2f Author: Krzysztof Kozlowski Date: Sat Dec 3 17:21:44 2022 +0100 ASoC: dt-bindings: Correct Alexandre Belloni email Correct domain name in Alexandre Belloni's email address. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221203162144.99225-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/adi,adau1372.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 715f45854f559f361d2c222a0353a3a1818875ed Author: Krzysztof Kozlowski Date: Sun Dec 4 12:36:21 2022 +0100 ASoC: dt-bindings: maxim,max98504: Convert to DT schema Convert the Maxim Integrated MAX98504 amplifier bindings to DT schema. Few properties are made optional: 1. interrupts: current Linux driver implementation does not use them, 2. supplies: on some boards these might be wired to battery, for which no regulator is provided. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221204113621.151303-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/max98504.txt | 44 ----------- .../devicetree/bindings/sound/maxim,max98504.yaml | 86 ++++++++++++++++++++++ 2 files changed, 86 insertions(+), 44 deletions(-) commit 8a5a05583a04fcfa094072147eb8f6c9bb2af852 Author: Krzysztof Kozlowski Date: Sat Dec 3 17:04:42 2022 +0100 ASoC: dt-bindings: maxim,max98357a: Convert to DT schema Convert the Maxim Integrated MAX98357A/MAX98360A amplifier bindings to DT schema. Add missing properties ('#sound-dai-cells' and 'sound-name-prefix' from common DAI properties). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221203160442.69594-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/max98357a.txt | 28 ------------ .../devicetree/bindings/sound/maxim,max98357a.yaml | 52 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 28 deletions(-) commit 58ae9a2aca6f883dd6fd7b8bfc2e1b1b21a2f03e Author: Krzysztof Kozlowski Date: Sat Dec 3 17:04:41 2022 +0100 ASoC: dt-bindings: Reference common DAI properties Reference in all sound components which have '#sound-dai-cells' the dai-common.yaml schema, which allows to use 'sound-name-prefix' property. Signed-off-by: Krzysztof Kozlowski Tested-by: Nicolas Frattaroli Acked-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20221203160442.69594-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/adi,adau1372.yaml | 5 +++- .../devicetree/bindings/sound/adi,adau1977.yaml | 1 + .../devicetree/bindings/sound/adi,adau7118.yaml | 5 +++- .../devicetree/bindings/sound/ak4375.yaml | 5 +++- .../devicetree/bindings/sound/ak4613.yaml | 5 +++- .../devicetree/bindings/sound/ak4642.yaml | 5 +++- .../bindings/sound/allwinner,sun4i-a10-codec.yaml | 3 ++- .../bindings/sound/allwinner,sun4i-a10-i2s.yaml | 3 ++- .../bindings/sound/allwinner,sun4i-a10-spdif.yaml | 3 ++- .../bindings/sound/allwinner,sun50i-h6-dmic.yaml | 5 +++- .../bindings/sound/allwinner,sun8i-a33-codec.yaml | 5 +++- .../devicetree/bindings/sound/apple,mca.yaml | 5 +++- .../devicetree/bindings/sound/cirrus,cs35l41.yaml | 3 ++- .../devicetree/bindings/sound/cirrus,cs35l45.yaml | 5 +++- .../devicetree/bindings/sound/cirrus,cs42l51.yaml | 5 +++- .../bindings/sound/cirrus,lochnagar.yaml | 5 +++- .../devicetree/bindings/sound/cirrus,madera.yaml | 3 +++ .../bindings/sound/davinci-mcasp-audio.yaml | 3 ++- .../devicetree/bindings/sound/everest,es8316.yaml | 5 +++- .../devicetree/bindings/sound/fsl,sai.yaml | 3 ++- .../bindings/sound/google,cros-ec-codec.yaml | 5 +++- .../devicetree/bindings/sound/ingenic,aic.yaml | 5 +++- .../devicetree/bindings/sound/ingenic,codec.yaml | 5 +++- .../bindings/sound/intel,keembay-i2s.yaml | 5 +++- .../devicetree/bindings/sound/linux,bt-sco.yaml | 5 +++- .../bindings/sound/marvell,mmp-sspa.yaml | 5 +++- .../devicetree/bindings/sound/mchp,i2s-mcc.yaml | 18 +++++++------ .../devicetree/bindings/sound/mchp,spdiftx.yaml | 5 +++- .../devicetree/bindings/sound/microchip,pdmc.yaml | 5 +++- .../bindings/sound/nvidia,tegra20-spdif.yaml | 5 +++- .../devicetree/bindings/sound/qcom,lpass-cpu.yaml | 3 ++- .../bindings/sound/qcom,lpass-rx-macro.yaml | 5 +++- .../bindings/sound/qcom,lpass-tx-macro.yaml | 5 +++- .../bindings/sound/qcom,lpass-va-macro.yaml | 5 +++- .../bindings/sound/qcom,lpass-wsa-macro.yaml | 5 +++- .../bindings/sound/qcom,q6adm-routing.yaml | 5 +++- .../bindings/sound/qcom,q6apm-lpass-dais.yaml | 5 +++- .../devicetree/bindings/sound/qcom,q6apm.yaml | 1 + .../devicetree/bindings/sound/qcom,wcd938x.yaml | 5 +++- .../devicetree/bindings/sound/qcom,wsa883x.yaml | 7 ++++- .../devicetree/bindings/sound/realtek,rt5682s.yaml | 5 +++- .../devicetree/bindings/sound/renesas,fsi.yaml | 5 +++- .../devicetree/bindings/sound/renesas,rsnd.yaml | 3 ++- .../devicetree/bindings/sound/renesas,rz-ssi.yaml | 5 +++- .../devicetree/bindings/sound/richtek,rt9120.yaml | 5 +++- .../bindings/sound/rockchip,i2s-tdm.yaml | 5 +++- .../devicetree/bindings/sound/rockchip,pdm.yaml | 5 +++- .../bindings/sound/rockchip,rk3328-codec.yaml | 5 +++- .../devicetree/bindings/sound/rockchip-i2s.yaml | 5 +++- .../devicetree/bindings/sound/rockchip-spdif.yaml | 23 +++++++++-------- .../devicetree/bindings/sound/rohm,bd28623.yaml | 5 +++- .../devicetree/bindings/sound/samsung-i2s.yaml | 5 +++- .../devicetree/bindings/sound/sgtl5000.yaml | 5 +++- .../bindings/sound/snps,designware-i2s.yaml | 30 +++++++++++----------- .../bindings/sound/socionext,uniphier-aio.yaml | 5 +++- .../bindings/sound/socionext,uniphier-evea.yaml | 5 +++- .../devicetree/bindings/sound/st,stm32-i2s.yaml | 5 +++- .../bindings/sound/st,stm32-spdifrx.yaml | 5 +++- .../devicetree/bindings/sound/tas2562.yaml | 5 +++- .../devicetree/bindings/sound/tas2770.yaml | 5 +++- .../devicetree/bindings/sound/tas27xx.yaml | 5 +++- .../bindings/sound/ti,tlv320adc3xxx.yaml | 5 +++- .../devicetree/bindings/sound/wlf,arizona.yaml | 3 +++ .../devicetree/bindings/sound/wlf,wm8731.yaml | 1 + .../devicetree/bindings/sound/wlf,wm8940.yaml | 5 +++- .../devicetree/bindings/sound/wlf,wm8961.yaml | 5 +++- .../devicetree/bindings/sound/wlf,wm8962.yaml | 5 +++- .../devicetree/bindings/sound/wlf,wm8978.yaml | 5 +++- .../devicetree/bindings/sound/zl38060.yaml | 5 +++- 69 files changed, 276 insertions(+), 95 deletions(-) commit 3fda85324b8d7aa01ccfa1bb82c46befc6af518f Author: Krzysztof Kozlowski Date: Sat Dec 3 17:04:40 2022 +0100 ASoC: dt-bindings: Extend name-prefix.yaml into common DAI properties Rename name-prefix.yaml into common DAI schema and document '#sound-dai-cells' for completeness. The '#sound-dai-cells' cannot be really constrained, as there are users with value of 0, 1 and 2, but at least it brings definition to one common place. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221203160442.69594-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml | 2 +- Documentation/devicetree/bindings/sound/amlogic,aiu.yaml | 2 +- Documentation/devicetree/bindings/sound/amlogic,g12a-toacodec.yaml | 2 +- Documentation/devicetree/bindings/sound/amlogic,t9015.yaml | 2 +- Documentation/devicetree/bindings/sound/awinic,aw8738.yaml | 2 +- .../devicetree/bindings/sound/{name-prefix.yaml => dai-common.yaml} | 6 ++++-- Documentation/devicetree/bindings/sound/dmic-codec.yaml | 2 +- Documentation/devicetree/bindings/sound/linux,spdif-dit.yaml | 2 +- Documentation/devicetree/bindings/sound/nvidia,tegra186-asrc.yaml | 2 +- Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml | 2 +- Documentation/devicetree/bindings/sound/nvidia,tegra210-adx.yaml | 2 +- Documentation/devicetree/bindings/sound/nvidia,tegra210-amx.yaml | 2 +- Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml | 2 +- Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml | 2 +- Documentation/devicetree/bindings/sound/nvidia,tegra210-mixer.yaml | 2 +- Documentation/devicetree/bindings/sound/nvidia,tegra210-mvc.yaml | 2 +- Documentation/devicetree/bindings/sound/nvidia,tegra210-ope.yaml | 2 +- Documentation/devicetree/bindings/sound/nvidia,tegra210-sfc.yaml | 2 +- Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml | 2 +- Documentation/devicetree/bindings/sound/rt5659.txt | 2 +- Documentation/devicetree/bindings/sound/simple-audio-amplifier.yaml | 2 +- Documentation/devicetree/bindings/sound/simple-audio-mux.yaml | 2 +- Documentation/devicetree/bindings/sound/ti,src4xxx.yaml | 2 +- 23 files changed, 26 insertions(+), 24 deletions(-) commit b5d5051971b44c9952b62f261509cf837b9d21ba Author: Colin Ian King Date: Fri Dec 2 17:14:50 2022 +0000 ASoC: rt715: Make read-only arrays capture_reg_H and capture_reg_L static const Don't populate the read-only arrays capture_reg_H and capture_reg_L on the stack but instead make them static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221202171450.1815346-1-colin.i.king@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/rt715.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit cb870fdcf1332ee791d7de6bbf350f15fc19c989 Author: Colin Ian King Date: Fri Dec 2 16:41:56 2022 +0000 ASoC: uniphier: aio-core: Make some read-only arrays static const Don't populate the read-only arrays slotsel_2ch, slotsel_multi, v_pll and v_div on the stack but instead make them static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221202164156.1812971-1-colin.i.king@gmail.com Signed-off-by: Mark Brown sound/soc/uniphier/aio-core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e110ede8c31da90caae375deeac12e553a0aeaf5 Author: Colin Ian King Date: Fri Dec 2 17:06:44 2022 +0000 ASoC: wcd938x: Make read-only array minCode_param static const Don't populate the read-only array minCode_param on the stack but instead make it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221202170644.1814720-1-colin.i.king@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/wcd938x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab148b461c5cd767762bfcba5749c770ca836079 Author: Srinivasa Rao Mandadapu Date: Mon Dec 5 11:18:53 2022 +0530 ASoC: qcom: lpass-sc7280: Add maybe_unused tag for system PM ops Add __maybe_unused tag for system PM ops suspend and resume. This is required to fix allmodconfig compilation issue. Fixes: a3a96e93cc88 ("ASoC: qcom: lpass-sc7280: Add system suspend/resume PM ops") Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1670219333-32526-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown sound/soc/qcom/lpass-sc7280.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 41cfad23b5ebef2dbddecff2ddeb27ca973f98a8 Author: V sujith kumar Reddy Date: Mon Dec 5 17:36:49 2022 +0530 ASoC : SOF: amd: Add support for IPC and DSP dumps Add support for IPC and DSP dumps for AMD platforms. Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20221205120649.1950576-3-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown sound/soc/sof/amd/Kconfig | 1 + sound/soc/sof/amd/acp-common.c | 108 +++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/amd/acp-ipc.c | 13 +++++ sound/soc/sof/amd/acp.h | 6 +++ 4 files changed, 128 insertions(+) commit 2a2f5f2384b9791a028901aac3f49c488839d073 Author: Ajye Huang Date: Mon Dec 5 17:36:48 2022 +0530 ASoC: SOF: amd: Use poll function instead to read ACP_SHA_DSP_FW_QUALIFIER The Skyrim project and Whiterun met error when DSP loading during device boot. Ex, error in kernel log, ERR kernel: [ 16.124537] snd_sof_amd_rembrandt 0000:04:00.5: PSP validation failed. Use the snd_sof_dsp_read_poll_timeout function to successfully read the FW_QUALIFIER register Signed-off-by: Ajye Huang Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20221205120649.1950576-2-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown sound/soc/sof/amd/acp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 85ac9c8c8eed76e8a320a9e017c6d36e2a52745b Author: Cezary Rojewski Date: Fri Dec 2 16:28:41 2022 +0100 ASoC: Intel: avs: Allow for dumping debug window snapshot Add new read-only debugfs entry which dumps entire content of the SRAM window 2 i.e.: the debug window. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-17-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/debugfs.c | 26 ++++++++++++++++++++++++++ sound/soc/intel/avs/registers.h | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) commit 870f6e5abba95ac78e750b61cf8f3f15be96796f Author: Cezary Rojewski Date: Fri Dec 2 16:28:40 2022 +0100 ASoC: Intel: avs: Allow for dumping FW_REGS area SRAM0 window begins with a block of memory, usually of size PAGE_SIZE, dedicated to the base firmware registers. When debugging firmware, it is desirable to be able to dump them at will. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-16-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/debugfs.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 34d27c71707c4ed615105376e0f3907d99b1b271 Author: Cezary Rojewski Date: Fri Dec 2 16:28:39 2022 +0100 ASoC: Intel: avs: Gather remaining logs on strace_release() When user closes the tracer, some logs may still remain in the tail of the buffer as firmware sends LOG_BUFFER_STATUS notification only when certain threshold of data is reached. Add whatever is left to already gathered logs so no information is lost. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-15-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/debugfs.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 5a565ba23abe478f3d4c3b0c8798bcb5215b82f5 Author: Cezary Rojewski Date: Fri Dec 2 16:28:38 2022 +0100 ASoC: Intel: avs: Probing and firmware tracing over debugfs Define debugfs subdirectory delegated for IPC communication with DSP. Input format: uint,uint,(...) which are later translated into DWORDS sequence and further into instances of struct of interest given the IPC type. For Extractor probes, following have been enabled: - PROBE_POINT_ADD (echo <..> probe_points) - PROBE_POINT_REMOVE (echo <..> probe_points_remove) - PROBE_POINT_INFO (cat probe_points) Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-14-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/avs.h | 7 + sound/soc/intel/avs/core.c | 2 + sound/soc/intel/avs/debugfs.c | 326 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 335 insertions(+) commit e17527e167ae5bd71fc9cb67da4e73bbb050e6f7 Author: Cezary Rojewski Date: Fri Dec 2 16:28:37 2022 +0100 ASoC: Intel: avs: Add probe machine board Stub machine board driver with no custom DAPM routes and single FE DAI link for userspace to interact with. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/board_selection.c | 33 ++++++++++++++++++ sound/soc/intel/avs/boards/Kconfig | 8 +++++ sound/soc/intel/avs/boards/Makefile | 2 ++ sound/soc/intel/avs/boards/probe.c | 64 +++++++++++++++++++++++++++++++++++ 4 files changed, 107 insertions(+) commit ed914a2a45a45e7d8f900ae8997ca4573792afcc Author: Cezary Rojewski Date: Fri Dec 2 16:28:36 2022 +0100 ASoC: Intel: avs: Data probing soc-component Define stub component for data probing. Stub as most operations from standard PCM case do not apply here. Specific bits are CPU DAIs and compress_ops. FE DAIs can link against these new CPU DAI to create new compress devices. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/avs.h | 10 +++++++++ sound/soc/intel/avs/pcm.c | 6 ++--- sound/soc/intel/avs/probes.c | 53 ++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 64 insertions(+), 5 deletions(-) commit 700462f55493c6831ad71b209eaebe310dcf11fd Author: Cezary Rojewski Date: Fri Dec 2 16:28:35 2022 +0100 ASoC: Intel: avs: Probe compress operations Add compress operations handlers for data extraction through probes. A single HDAudio stream is enlisted for said purpose. Operations follow same protocol as for standard PCM streaming on HOST side. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 1 + sound/soc/intel/avs/avs.h | 3 + sound/soc/intel/avs/probes.c | 224 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 225 insertions(+), 3 deletions(-) commit dab8d000e25c3e91154efca287434a4f78ab65d2 Author: Cezary Rojewski Date: Fri Dec 2 16:28:34 2022 +0100 ASoC: Intel: avs: Add data probing requests Data probing is a cAVS firmware functionality that allows for data extraction and injection directly from or to DMA stream. To support it, new functions and types are added. These facilitate communication with the firmware. Total of eight IPCs: - probe module initialization and cleanup - addition and removal of probe points - addition and removal of injection DMAs - dumping list of currently connected probe points or enlisted DMAs Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/Makefile | 2 +- sound/soc/intel/avs/messages.c | 78 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/intel/avs/messages.h | 53 ++++++++++++++++++++++++++++ sound/soc/intel/avs/probes.c | 46 +++++++++++++++++++++++++ 4 files changed, 178 insertions(+), 1 deletion(-) commit f7de161fc8d5e1ebac3c361a37b1d748e7086330 Author: Cezary Rojewski Date: Fri Dec 2 16:28:33 2022 +0100 ASoC: Intel: avs: Drop usage of debug members in non-debug code Switch to debug-context aware wrappers instead of accessing debug members directly allowing for readable separation of debug and non-debug related code. Duplicates are removed along the way. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/apl.c | 11 ++++------- sound/soc/intel/avs/avs.h | 16 ++-------------- sound/soc/intel/avs/debugfs.c | 18 ++++++++++++++++++ sound/soc/intel/avs/skl.c | 5 ++--- sound/soc/intel/avs/utils.c | 18 ------------------ 5 files changed, 26 insertions(+), 42 deletions(-) commit b3eefa5d8dbfe5286c3308fa706fc9c45b38fe19 Author: Cezary Rojewski Date: Fri Dec 2 16:28:32 2022 +0100 ASoC: Intel: avs: Make enable_logs() dependent on DEBUG_FS Without debug filesystem present, this code is redundant. Operations: log_buffer_status and log_buffer_offset are left as is as EXCEPTION_CAUGHT and even unexpected LOG_BUFFER_STATUS notifications may occur without user ever touching debugfs. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/apl.c | 7 ++++--- sound/soc/intel/avs/avs.h | 5 +++++ sound/soc/intel/avs/messages.c | 36 +++++++++++++++++++----------------- sound/soc/intel/avs/skl.c | 7 ++++--- 4 files changed, 32 insertions(+), 23 deletions(-) commit 9e3c15beb8976771f95ba30b3da8bd35dc7188ac Author: Cezary Rojewski Date: Fri Dec 2 16:28:31 2022 +0100 ASoC: Intel: avs: Introduce debug-context aware helpers Debug-related fields and log-dumping are useful when debugfs is enabled. Define them under CONFIG_DEBUG_FS and provide stubs when the config is disabled so that the code that makes use of these needs not to be complicated unnecessarily. Members that are duplicated by this patch will be removed by the follow up changes. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/Makefile | 4 ++++ sound/soc/intel/avs/avs.h | 29 +++++++++++++++++++++++++++++ sound/soc/intel/avs/debugfs.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) commit 58029b7734ec84738aeb8fb391e625832bb6b0a6 Author: Cezary Rojewski Date: Fri Dec 2 16:28:30 2022 +0100 ASoC: Intel: avs: Drop fifo_lock Log gathering is already locked, thanks to ->trace_lock. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/apl.c | 9 ++++----- sound/soc/intel/avs/avs.h | 4 +--- sound/soc/intel/avs/skl.c | 2 +- sound/soc/intel/avs/utils.c | 6 +----- 4 files changed, 7 insertions(+), 14 deletions(-) commit bb03099bf2253fcd1a4d57e6f5ee4e8000911e77 Author: Cezary Rojewski Date: Fri Dec 2 16:28:29 2022 +0100 ASoC: Intel: avs: Introduce avs_log_buffer_status_locked() Simplify locking of firmware log gathering by providing single location for such purpose. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221202152841.672536-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/apl.c | 5 +---- sound/soc/intel/avs/avs.h | 12 ++++++++++++ sound/soc/intel/avs/ipc.c | 2 +- sound/soc/intel/avs/skl.c | 7 +------ 4 files changed, 15 insertions(+), 11 deletions(-) commit 3e9582267e3a06bfd9622dbd2304a8cfac977b43 Author: Cezary Rojewski Date: Fri Dec 2 16:28:28 2022 +0100 ALSA: hda: Interrupt servicing and BDL setup for compress streams Account for compress streams when receiving and servicing buffer completed interrupts. In case of compress stream enlisting hdac_stream for data transfer, setup BDL entries much like it is the case for PCM streams. Signed-off-by: Divya Prakash Signed-off-by: Cezary Rojewski Acked-by: Takashi Iwai Link: https://lore.kernel.org/r/20221202152841.672536-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/hda/hdac_controller.c | 4 ++-- sound/hda/hdac_stream.c | 27 ++++++++++++++++++++------- 2 files changed, 22 insertions(+), 9 deletions(-) commit f6b1254664a0a15c8bbe0a17b2c86840aa38d3d7 Author: Cezary Rojewski Date: Fri Dec 2 16:28:27 2022 +0100 ALSA: hda: Prepare for compress stream support Before introducing compress specific changes, adjust BDL and parameters setup functions so these are not tightly coupled with PCM streams. Signed-off-by: Cezary Rojewski Acked-by: Takashi Iwai Link: https://lore.kernel.org/r/20221202152841.672536-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/hda/hdac_stream.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 97d73d978271ade27fc751ad606f23c1c4c43678 Author: Cezary Rojewski Date: Fri Dec 2 16:28:26 2022 +0100 ALSA: hda: Allow for compress stream to hdac_ext_stream assignment Currently only PCM streams can enlist hdac_stream for their data transfer. Add cstream field to hdac_ext_stream to expose possibility of compress stream assignment in place of PCM one. Limited to HOST-type only as there no other users on the horizon. Signed-off-by: Cezary Rojewski Acked-by: Takashi Iwai Link: https://lore.kernel.org/r/20221202152841.672536-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown include/sound/hdaudio_ext.h | 2 ++ sound/hda/ext/hdac_ext_stream.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit 60f07e22a73d318cddaafa5ef41a10476807cc07 Author: junhua huang Date: Fri Dec 2 15:11:10 2022 +0800 arm64:uprobe fix the uprobe SWBP_INSN in big-endian We use uprobe in aarch64_be, which we found the tracee task would exit due to SIGILL when we enable the uprobe trace. We can see the replace inst from uprobe is not correct in aarch big-endian. As in Armv8-A, instruction fetches are always treated as little-endian, we should treat the UPROBE_SWBP_INSN as little-endian。 The test case is as following。 bash-4.4# ./mqueue_test_aarchbe 1 1 2 1 10 > /dev/null & bash-4.4# cd /sys/kernel/debug/tracing/ bash-4.4# echo 'p:test /mqueue_test_aarchbe:0xc30 %x0 %x1' > uprobe_events bash-4.4# echo 1 > events/uprobes/enable bash-4.4# bash-4.4# ps PID TTY TIME CMD 140 ? 00:00:01 bash 237 ? 00:00:00 ps [1]+ Illegal instruction ./mqueue_test_aarchbe 1 1 2 1 100 > /dev/null which we debug use gdb as following: bash-4.4# gdb attach 155 (gdb) disassemble send Dump of assembler code for function send: 0x0000000000400c30 <+0>: .inst 0xa00020d4 ; undefined 0x0000000000400c34 <+4>: mov x29, sp 0x0000000000400c38 <+8>: str w0, [sp, #28] 0x0000000000400c3c <+12>: strb w1, [sp, #27] 0x0000000000400c40 <+16>: str xzr, [sp, #40] 0x0000000000400c44 <+20>: str xzr, [sp, #48] 0x0000000000400c48 <+24>: add x0, sp, #0x1b 0x0000000000400c4c <+28>: mov w3, #0x0 // #0 0x0000000000400c50 <+32>: mov x2, #0x1 // #1 0x0000000000400c54 <+36>: mov x1, x0 0x0000000000400c58 <+40>: ldr w0, [sp, #28] 0x0000000000400c5c <+44>: bl 0x405e10 0x0000000000400c60 <+48>: str w0, [sp, #60] 0x0000000000400c64 <+52>: ldr w0, [sp, #60] 0x0000000000400c68 <+56>: ldp x29, x30, [sp], #64 0x0000000000400c6c <+60>: ret End of assembler dump. (gdb) info b No breakpoints or watchpoints. (gdb) c Continuing. Program received signal SIGILL, Illegal instruction. 0x0000000000400c30 in send () (gdb) x/10x 0x400c30 0x400c30 : 0xd42000a0 0xfd030091 0xe01f00b9 0xe16f0039 0x400c40 : 0xff1700f9 0xff1b00f9 0xe06f0091 0x03008052 0x400c50 : 0x220080d2 0xe10300aa (gdb) disassemble 0x400c30 Dump of assembler code for function send: => 0x0000000000400c30 <+0>: .inst 0xa00020d4 ; undefined 0x0000000000400c34 <+4>: mov x29, sp 0x0000000000400c38 <+8>: str w0, [sp, #28] 0x0000000000400c3c <+12>: strb w1, [sp, #27] 0x0000000000400c40 <+16>: str xzr, [sp, #40] Signed-off-by: junhua huang Link: https://lore.kernel.org/r/202212021511106844809@zte.com.cn Signed-off-by: Will Deacon arch/arm64/include/asm/uprobes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5de2322d7b8ecba37152334ebaaddf687fd63a38 Author: Eric Farman Date: Mon Nov 21 17:58:36 2022 +0100 vfio/ccw: identify CCW data addresses as physical The CCW data address created by vfio-ccw is that of an IDAL built by this code. Since this address is used by real hardware, it should be a physical address rather than a virtual one. Let's clarify it as such in the ORB. Similarly, once the I/O has completed the memory for that IDAL needs to be released, so convert the CCW data address back to a virtual address so that kfree() can process it. Note: this currently doesn't fix a real bug, since virtual addresses are identical to physical ones. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Reviewed-by: Nico Boehr Signed-off-by: Alexander Gordeev Link: https://lore.kernel.org/r/20221121165836.283781-3-farman@linux.ibm.com drivers/s390/cio/vfio_ccw_cp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21c7996917cb5c9d8669409b00d990b75d22a849 Author: Alexander Gordeev Date: Mon Nov 21 17:58:35 2022 +0100 vfio/ccw: sort out physical vs virtual pointers usage The ORB's interrupt parameter field is stored unmodified into the interruption code when an I/O interrupt occurs. As this reflects a real device, let's store the physical address of the subchannel struct so it can be used when processing an interrupt. Note: this currently doesn't fix a real bug, since virtual addresses are identical to physical ones. Signed-off-by: Alexander Gordeev [EF: Updated commit message] Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Reviewed-by: Nico Boehr Link: https://lore.kernel.org/r/20221121165836.283781-2-farman@linux.ibm.com drivers/s390/cio/vfio_ccw_fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67bc5b2d6d4802f46eceda246eb53a672b961831 Author: Jisheng Zhang Date: Sat Dec 3 00:18:59 2022 +0800 arm64: alternatives: add __init/__initconst to some functions/variables apply_alternatives_vdso(), __apply_alternatives_multi_stop() and kernel_alternatives are not needed after booting, so mark the two functions as __init and the var as __initconst. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20221202161859.2228-1-jszhang@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/alternative.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 198dde085ecc0138e4f0b0b69d18a0c870f2dea6 Author: Takashi Iwai Date: Mon Dec 5 14:21:24 2022 +0100 ALSA: usb-audio: Workaround for XRUN at prepare Under certain situations (typically in the implicit feedback mode), USB-audio driver starts a playback stream already at PCM prepare call even before the actual PCM trigger-START call. For implicit feedback mode, this effectively starts two streams for data and sync endpoints, and if a coupled sync stream gets XRUN at this point, it results in an error -EPIPE. The problem is that currently we return -EPIPE error as is from the prepare. Then application tries to recover again via the prepare call, but it'll fail again because the sync-stop is missing. The sync-stop is missing because it's an internal trigger call (hence the PCM core isn't involved). Since we'll need to re-issue the prepare in anyway when trapped into this pitfall, this patch attempts to address it in a bit different way; namely, the driver tries to prepare once again after syncing the stop manually by itself -- so applications don't see the internal error. At the second failure, we report the error as is, but this shouldn't happen in normal situations. Reported-and-tested-by: Carl Hetherington Cc: Link: https://lore.kernel.org/r/b4e71631-4a94-613-27b2-fb595792630@carlh.net Link: https://lore.kernel.org/r/20221205132124.11585-4-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/pcm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit e661c4886965e6f48d9378d8608f1d7dd7401a41 Author: Takashi Iwai Date: Mon Dec 5 14:21:23 2022 +0100 ALSA: pcm: Handle XRUN at trigger START When the driver returns -EPIPE for indicating an XRUN already at PCM trigger START, we should treat properly and set it to the XRUN state. Otherwise the state is missing and the application would try to issue trigger again without knowing that it's in an error state. This is just for a theoretical bug, and it won't happen in most cases. Link: https://lore.kernel.org/r/b4e71631-4a94-613-27b2-fb595792630@carlh.net Link: https://lore.kernel.org/r/20221205132124.11585-3-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 5c8cc93b06d1ff860327a273abf3ac006290d242 Author: Takashi Iwai Date: Mon Dec 5 14:21:22 2022 +0100 ALSA: pcm: Set missing stop_operating flag at undoing trigger start When a PCM trigger-start fails at snd_pcm_do_start(), PCM core tries to undo the action at snd_pcm_undo_start() by issuing the trigger STOP manually. At that point, we forgot to set the stop_operating flag, hence the sync-stop won't be issued at the next prepare or other calls. This patch adds the missing stop_operating flag at snd_pcm_undo_start(). Fixes: 1e850beea278 ("ALSA: pcm: Add the support for sync-stop operation") Link: https://lore.kernel.org/r/b4e71631-4a94-613-27b2-fb595792630@carlh.net Link: https://lore.kernel.org/r/20221205132124.11585-2-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 395f9d8975251ca906113c9f4408aa1592f38e07 Merge: 90337f526c98 9eefba8002c2 Author: Jason Gunthorpe Date: Mon Dec 5 09:14:39 2022 -0400 Merge patch series "Move group specific code into group.c" Yi Liu says: ================== With the introduction of iommufd, VFIO is towarding to provide device centric uAPI after adapting to iommufd. With this trend, existing VFIO group infrastructure is optional once VFIO converted to device centric. This series moves the group specific code out of vfio_main.c, prepares for compiling group infrastructure out after adding vfio device cdev[2] [2] https://github.com/yiliu1765/iommufd/tree/wip/vfio_device_cdev ================== Link: https://lore.kernel.org/all/20221201145535.589687-1-yi.l.liu@intel.com/ Signed-off-by: Jason Gunthorpe commit 7fc7f25419f5a6b09199ba4b5026b94ef184fa79 Author: Minghao Chi Date: Tue Nov 22 09:42:28 2022 +0800 PM / devfreq: event: 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 Signed-off-by: Chanwoo Choi drivers/devfreq/event/exynos-nocp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ad44c2fd0e22910080e7761fb889c6c6c8c914d8 Author: ye xingchen Date: Fri Nov 25 15:10:04 2022 +0800 PM / devfreq: event: Use device_match_of_node() Replace the open-code with device_match_of_node(). Signed-off-by: ye xingchen Signed-off-by: Chanwoo Choi drivers/devfreq/devfreq-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eefba8002c27d65ab52a533fd0611b099b73591 Author: Yi Liu Date: Fri Nov 25 03:26:42 2022 -0800 vfio: Move vfio group specific code into group.c This prepares for compiling out vfio group after vfio device cdev is added. No vfio_group decode code should be in vfio_main.c, and neither device->group reference should be in vfio_main.c. No functional change is intended. Link: https://lore.kernel.org/r/20221201145535.589687-11-yi.l.liu@intel.com Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Alex Williamson Tested-by: Yu He Tested-by: Lixiao Yang Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe drivers/vfio/Makefile | 1 + drivers/vfio/group.c | 877 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/vfio/vfio.h | 22 ++ drivers/vfio/vfio_main.c | 877 +---------------------------------------------- 4 files changed, 907 insertions(+), 870 deletions(-) commit 8da7a0e79f9b15330ae68d8532425399f4c27045 Author: Yi Liu Date: Thu Nov 10 18:57:01 2022 -0800 vfio: Refactor dma APIs for emulated devices To use group helpers instead of opening group related code in the API. This prepares moving group specific code out of vfio_main.c. Link: https://lore.kernel.org/r/20221201145535.589687-10-yi.l.liu@intel.com Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Alex Williamson Tested-by: Lixiao Yang Tested-by: Yu He Signed-off-by: Yi Liu Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe drivers/vfio/container.c | 20 +++++++++++++------- drivers/vfio/vfio.h | 32 ++++++++++++++++---------------- drivers/vfio/vfio_main.c | 25 ++++++++++++++----------- 3 files changed, 43 insertions(+), 34 deletions(-) commit 1334e47ee798ac4715330a6ade0afc929cd54aff Author: Yi Liu Date: Fri Sep 23 07:08:36 2022 -0700 vfio: Wrap vfio group module init/clean code into helpers This wraps the init/clean code of vfio group global variable to be helpers, and prepares for further moving vfio group specific code into separate file. As container is used by group, so vfio_container_init/cleanup() is moved into vfio_group_init/cleanup(). Link: https://lore.kernel.org/r/20221201145535.589687-9-yi.l.liu@intel.com Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Alex Williamson Tested-by: Lixiao Yang Tested-by: Yu He Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe drivers/vfio/vfio_main.c | 56 +++++++++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 20 deletions(-) commit 5c8d3d93f6a7c9371212690b0195160e5f88bdff Author: Yi Liu Date: Wed Nov 2 04:42:25 2022 -0700 vfio: Refactor vfio_device open and close This refactor makes the vfio_device_open() to accept device, iommufd_ctx pointer and kvm pointer. These parameters are generic items in today's group path and future device cdev path. Caller of vfio_device_open() should take care the necessary protections. e.g. the current group path need to hold the group_lock to ensure the iommufd_ctx and kvm pointer are valid. This refactor also wraps the group spefcific codes in the device open and close paths to be paired helpers like: - vfio_device_group_open/close(): call vfio_device_open/close() - vfio_device_group_use/unuse_iommu(): this pair is container specific. iommufd vs. container is selected in vfio_device_first_open(). Such helpers are supposed to be moved to group.c. While iommufd related codes will be kept in the generic helpers since future device cdev path also need to handle iommufd. Link: https://lore.kernel.org/r/20221201145535.589687-8-yi.l.liu@intel.com Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Alex Williamson Tested-by: Lixiao Yang Tested-by: Yu He Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe drivers/vfio/vfio_main.c | 133 +++++++++++++++++++++++++++++++---------------- 1 file changed, 87 insertions(+), 46 deletions(-) commit 5cfff0774353ee35601e3d3fe2f0bd95c33aa5db Author: Yi Liu Date: Fri Sep 30 03:22:55 2022 -0700 vfio: Make vfio_device_open() truly device specific Then move group related logic into vfio_device_open_file(). Accordingly introduce a vfio_device_close() to pair up. Link: https://lore.kernel.org/r/20221201145535.589687-7-yi.l.liu@intel.com Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Alex Williamson Tested-by: Lixiao Yang Tested-by: Yu He Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe drivers/vfio/vfio_main.c | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) commit 07b465863325faceb865871ff5f22c1ebba6df54 Author: Yi Liu Date: Thu Nov 10 07:26:09 2022 -0800 vfio: Swap order of vfio_device_container_register() and open_device() This makes the DMA unmap callback registration to container be consistent across the vfio iommufd compat mode and the legacy container mode. In the vfio iommufd compat mode, this registration is done in the vfio_iommufd_bind() when creating access which has an unmap callback. This is prior to calling the open_device() op. The existing mdev drivers have been converted to be OK with this order. So it is ok to swap the order of vfio_device_container_register() and open_device() for legacy mode. This also prepares for further moving group specific code into separate source file. Link: https://lore.kernel.org/r/20221201145535.589687-6-yi.l.liu@intel.com Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Alex Williamson Tested-by: Lixiao Yang Tested-by: Yu He Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe drivers/vfio/vfio_main.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 49ea02d390a34a538a3f54b9ce5665e474690bc7 Author: Yi Liu Date: Thu Nov 24 21:22:27 2022 -0800 vfio: Set device->group in helper function This avoids referencing device->group in __vfio_register_dev(). Link: https://lore.kernel.org/r/20221201145535.589687-5-yi.l.liu@intel.com Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Reviewed-by: Alex Williamson Tested-by: Lixiao Yang Tested-by: Yu He Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe drivers/vfio/vfio_main.c | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit 32e0922821f2115eb8940b6a6b942ba61eff15c2 Author: Yi Liu Date: Fri Sep 23 02:19:34 2022 -0700 vfio: Create wrappers for group register/unregister This avoids decoding group fields in the common functions used by vfio_device registration, and prepares for further moving the vfio group specific code into separate file. Link: https://lore.kernel.org/r/20221201145535.589687-4-yi.l.liu@intel.com Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Alex Williamson Tested-by: Lixiao Yang Tested-by: Yu He Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe drivers/vfio/vfio_main.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit dcb93d0364a238315dd71f834b199d4b95ae09eb Author: Jason Gunthorpe Date: Thu Sep 8 15:44:59 2022 -0300 vfio: Move the sanity check of the group to vfio_create_group() This avoids opening group specific code in __vfio_register_dev() for the sanity check if an (existing) group is not corrupted by having two copies of the same struct device in it. It also simplifies the error unwind for this sanity check since the failure can be detected in the group allocation. This also prepares for moving the group specific code into separate group.c. Grabbed from: https://lore.kernel.org/kvm/20220922152338.2a2238fe.alex.williamson@redhat.com/ Link: https://lore.kernel.org/r/20221201145535.589687-3-yi.l.liu@intel.com Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Lixiao Yang Tested-by: Yu He Signed-off-by: Jason Gunthorpe Signed-off-by: Alex Williamson Signed-off-by: Yi Liu drivers/vfio/vfio_main.c | 62 +++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 37 deletions(-) commit f794eec86c7cd9a340a66109e6f32f8659ff30fa Author: Jason Gunthorpe Date: Thu Sep 8 15:44:58 2022 -0300 vfio: Simplify vfio_create_group() The vfio.group_lock is now only used to serialize vfio_group creation and destruction, we don't need a micro-optimization of searching, unlocking, then allocating and searching again. Just hold the lock the whole time. Grabbed from: https://lore.kernel.org/kvm/20220922152338.2a2238fe.alex.williamson@redhat.com/ Link: https://lore.kernel.org/r/20221201145535.589687-2-yi.l.liu@intel.com Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Lixiao Yang Tested-by: Yu He Signed-off-by: Jason Gunthorpe Signed-off-by: Alex Williamson Signed-off-by: Yi Liu drivers/vfio/vfio_main.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) commit 8b997b2bb2c53b76a6db6c195930e9ab8e4b0c79 Author: Harshit Mogalapalli Date: Fri Nov 25 21:07:45 2022 -0800 xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource() As 'kdata.num' is user-controlled data, if user tries to allocate memory larger than(>=) MAX_ORDER, then kcalloc() will fail, it creates a stack trace and messes up dmesg with a warning. Call trace: -> privcmd_ioctl --> privcmd_ioctl_mmap_resource Add __GFP_NOWARN in order to avoid too large allocation warning. This is detected by static analysis using smatch. Fixes: 3ad0876554ca ("xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE") Signed-off-by: Harshit Mogalapalli Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20221126050745.778967-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Juergen Gross drivers/xen/privcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6f613e5f35b0e2154d5ca12f0e8e0be0c19be9a Author: yang.yang29@zte.com.cn Date: Mon Dec 5 19:36:40 2022 +0800 ipmi/watchdog: use strscpy() to instead of strncpy() Xu Panda 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 Message-Id: <202212051936400309332@zte.com.cn> Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_watchdog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7bef797d707f1744f71156b21d41e3b8c946631f Author: Chen Zhongjin Date: Mon Dec 5 16:48:05 2022 +0800 vme: Fix error not catched in fake_init() In fake_init(), __root_device_register() is possible to fail but it's ignored, which can cause unregistering vme_root fail when exit. general protection fault, probably for non-canonical address 0xdffffc000000008c KASAN: null-ptr-deref in range [0x0000000000000460-0x0000000000000467] RIP: 0010:root_device_unregister+0x26/0x60 Call Trace: __x64_sys_delete_module+0x34f/0x540 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Return error when __root_device_register() fails. Fixes: 658bcdae9c67 ("vme: Adding Fake VME driver") Signed-off-by: Chen Zhongjin Link: https://lore.kernel.org/r/20221205084805.147436-1-chenzhongjin@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vme_user/vme_fake.c | 2 ++ 1 file changed, 2 insertions(+) commit bf44039f1ee828c47e1eb83eb315f0fed5a66126 Author: Matt Jan Date: Sun Dec 4 18:19:16 2022 +0800 staging: vme_user: remove multiple blank lines Remove multiple unnecessary blank lines in accordance with the Linux kernel coding-style regulations. The issues were reported by the checkpatch script. Signed-off-by: Matt Jan Link: https://lore.kernel.org/r/20221204101916.GA51992@zoo868e Signed-off-by: Greg Kroah-Hartman drivers/staging/vme_user/vme.h | 2 -- drivers/staging/vme_user/vme_fake.c | 5 ----- drivers/staging/vme_user/vme_tsi148.c | 6 ------ drivers/staging/vme_user/vme_tsi148.h | 7 ------- 4 files changed, 20 deletions(-) commit 7868f8f858968066b23287c9733e777a8407384c Author: Martin Kaiser Date: Fri Dec 2 10:31:59 2022 +0100 staging: r8188eu: use subtype helper in rtw_check_bcn_info Use ieee80211_is_beacon to check the frame subtype in rtw_check_bcn_info. Replace the call to the driver-specific GetFrameSubType function. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221202093159.404111-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_wlan_util.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 506783ffa96f953eea94d6ff99c4e908965fc383 Author: Martin Kaiser Date: Fri Dec 2 10:31:58 2022 +0100 staging: r8188eu: use subtype helpers in collect_bss_info Use the iee80211 helper functions to check the frame subtype in collect_bss_info. Replace the call to the driver-specific GetFrameSubType function. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221202093159.404111-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit eb0b3f501e4dd5e6668bddbbb3c20ecd1545b60d Author: Namhyung Kim Date: Wed Nov 30 11:36:13 2022 -0800 Revert "perf stat: Rename "aggregate-number" to "cpu-count" in JSON" This reverts commit c4b41b83c25073c09bfcc4e5ec496c9dd316656b. As Ian said, the "cpu-count" is not appropriate for uncore events, also it caused a perf test failure. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221130193613.1046804-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3d0862367ab8af1144c0e5495b8bf0e2ce892afe Author: Martin Kaiser Date: Fri Dec 2 10:25:25 2022 +0100 staging: r8188eu: remove unused da parameter All callers of issue_probereq_p2p set the da parameter to NULL. Remove this parameters and the code that runs only for da != NULL. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221202092525.403887-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 28 +++++++++++--------------- drivers/staging/r8188eu/core/rtw_p2p.c | 8 ++++---- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +- 3 files changed, 17 insertions(+), 21 deletions(-) commit 3f48ad1f243d07d6018a4af2762b6538febde689 Author: Martin Kaiser Date: Fri Dec 2 10:25:24 2022 +0100 staging: r8188eu: merge two probereq_p2p functions _issue_probereq_p2p is called only by issue_probereq_p2p. Merge the two functions and remove the unused return value. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221202092525.403887-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 7e8e5e879729b238cd17dcc292d86c1e6cc83ecc Author: Hans-Peter Nilsson Date: Mon Dec 28 03:39:41 2020 +0100 perf arm64: Fix mksyscalltbl, don't lose syscalls due to sort -nu When using "sort -nu", arm64 syscalls were lost. That is, the io_setup syscall (number 0) and all but one (typically ftruncate; 64) of the syscalls that are defined symbolically (like "#define __NR_ftruncate __NR3264_ftruncate") at the point where "sort" is applied. This creation-of-syscalls.c-scheme is, judging from comments, copy-pasted from powerpc, and worked there because at the time, its tools/arch/powerpc/include/uapi/asm/unistd.h had *literals*, like "#define __NR_ftruncate 93". With sort being numeric and the non-numeric key effectively evaluating to 0, the sort option "-u" means these "duplicates" are removed. There's no need to remove syscall lines with duplicate numbers for arm64 because there are none, so let's fix that by just losing the "-u". Having the table numerically sorted on syscall-number for the rest of the syscalls looks nice, so keep the "-n". Reviewed-by: Leo Yan Signed-off-by: Hans-Peter Nilsson Tested-by: Leo Yan Acked-by: Arnd Bergmann Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20201228023941.E0DE2203B5@pchp3.se.axis.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20ed9fa4965875fdde5bfd65d838465e38d46b22 Author: James Clark Date: Wed Nov 30 16:51:58 2022 +0000 perf branch: Fix interpretation of branch records Commit 93315e46b000fc80 ("perf/core: Add speculation info to branch entries") added a new field in between type and new_type. Perf has its own copy of this struct so update it to match the kernel side. This doesn't currently cause any issues because new_type is only used by the Arm BRBE driver which isn't merged yet. Committer notes: Is this really an ABI? How are we supposed to deal with old perf.data files with new tools and vice versa? :-\ Fixes: 93315e46b000fc80 ("perf/core: Add speculation info to branch entries") Reviewed-by: Anshuman Khandual Signed-off-by: James Clark Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Sandipan Das Link: https://lore.kernel.org/r/20221130165158.517385-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/branch.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 30b28fd639abf51464f015f6bebd7506bc895be2 Author: Martin Kaiser Date: Tue Nov 29 21:51:52 2022 +0100 staging: r8188eu: simplify err handling for unknown station If we receive a disassoc message from an unknown station, we can drop this message immediately. Reorder the code to make this clearer. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221129205152.128172-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 17580de3e2b876247f2201b6486559ef1e6b7f58 Author: Martin Kaiser Date: Tue Nov 29 21:51:51 2022 +0100 staging: r8188eu: handle the non-ap case first The OnDisassoc function hasn't got much to do if we're not working as an access point. Move this case out of the large if statement to simplify the code. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221129205152.128172-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 36 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit 8f7f05934ea24676c5c259a66bd71fa35ee22ef3 Author: Martin Kaiser Date: Tue Nov 29 21:51:50 2022 +0100 staging: r8188eu: move bBusyTraffic update Move the update of bBusyTraffic into the else branch. The if branch ends with a return statement, so bBusyTraffic will not be updated in this case. With this change in place, we can reorder the code and save some levels of indentation. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221129205152.128172-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e70cac829d63f24aac0ea858a5407d25cf55b85a Author: Martin Kaiser Date: Tue Nov 29 21:51:49 2022 +0100 staging: r8188eu: read reason code from ieee80211_mgmt Use the struct ieee80211_mgmt to read the reason code instead of parsing the message manually. Remove the pframe pointer, it's no longer used. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221129205152.128172-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4de531ce41e5aab9d3c5884e8360faaec82fb62e Author: Martin Kaiser Date: Tue Nov 29 21:51:48 2022 +0100 staging: r8188eu: use ieee80211_mgmt to parse addresses Define a struct ieee80211_mgmt in the OnDisassoc function and use it to parse the addresses in the incoming disassoc message. This replaces some driver-specific functions for address parsing. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221129205152.128172-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 49bd97c28b7e7f014a72821fd95fcf11e11599a4 Author: Sean Christopherson Date: Sat Nov 19 01:34:46 2022 +0000 perf tools: Use dedicated non-atomic clear/set bit helpers Use the dedicated non-atomic helpers for {clear,set}_bit() and their test variants, i.e. the double-underscore versions. Depsite being defined in atomic.h, and despite the kernel versions being atomic in the kernel, tools' {clear,set}_bit() helpers aren't actually atomic. Move to the double-underscore versions so that the versions that are expected to be atomic (for kernel developers) can be made atomic without affecting users that don't want atomic operations. No functional change intended. Signed-off-by: Sean Christopherson Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andy Shevchenko Cc: James Morse Cc: Jiri Olsa Cc: Marc Zyngier Cc: Mark Rutland Cc: Oliver Upton Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Sean Christopherson Cc: Suzuki Poulouse Cc: Yury Norov Cc: alexandru elisei Cc: kvm@vger.kernel.org Cc: kvmarm@lists.cs.columbia.edu Cc: kvmarm@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20221119013450.2643007-6-seanjc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/find-bit-bench.c | 2 +- tools/perf/builtin-c2c.c | 6 +++--- tools/perf/builtin-kwork.c | 6 +++--- tools/perf/builtin-record.c | 6 +++--- tools/perf/builtin-sched.c | 2 +- tools/perf/tests/bitmap.c | 2 +- tools/perf/tests/mem2node.c | 2 +- tools/perf/util/affinity.c | 4 ++-- tools/perf/util/header.c | 8 ++++---- tools/perf/util/mmap.c | 6 +++--- tools/perf/util/pmu.c | 2 +- tools/perf/util/scripting-engines/trace-event-perl.c | 2 +- tools/perf/util/scripting-engines/trace-event-python.c | 2 +- tools/perf/util/session.c | 2 +- tools/perf/util/svghelper.c | 2 +- 15 files changed, 27 insertions(+), 27 deletions(-) commit 17c1202a9e689dc875c864c1f1e8dded70c0a8a0 Author: Martin Kaiser Date: Sat Nov 26 17:01:29 2022 +0100 staging: r8188eu: remove a variable Check the result of rtw_check_bcn_info directly and remove the ret variable. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126160129.178697-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit dd99fe1f5a8319f0e236c0548cdba849451779d5 Author: Martin Kaiser Date: Sat Nov 26 17:01:28 2022 +0100 staging: r8188eu: simplify error handling for missing station Simplify the code to handle the case where we're associated to a station that is not in our list of known stations. We can simply exit in this case. This patch reverts the if-condition and saves one level of indentation. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126160129.178697-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit fa205589d5e9fc2d1b2f8d31f665152da04160bc Author: Martin Kaiser Date: Sat Nov 26 17:01:27 2022 +0100 staging: r8188eu: stop beacon processing if kmalloc fails If we cannot allocate a struct wlan_bssid_ex in the OnBeacon function, we should stop processing the incoming beacon message and return. For kmalloc failures, the current code just skips the update of network and beacon info and tries to continue with the authentication. The update would set the encryption algorithm that should be used for the authentication. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126160129.178697-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 32634359a9c3d70cbf01af0ae87b27d8c0e1ebe3 Author: Martin Kaiser Date: Sat Nov 26 17:01:26 2022 +0100 staging: r8188eu: exit if beacon is not from our bss Do not process an incoming beacon message in the OnBeacon function if the beacon was sent by a base station other than the one to which we're connected. This patch does not modify the behaviour of the code. It reverts the if condition and returns if the beacon should not be processed. This is simpler than wrapping the entire processing into a large if clause. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126160129.178697-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 103 ++++++++++++++-------------- 1 file changed, 52 insertions(+), 51 deletions(-) commit 02b51d08ec3a0f476c8b1537faa46e35e87e5ce0 Author: Martin Kaiser Date: Sat Nov 26 17:01:25 2022 +0100 staging: r8188eu: simplify update_sta_support_rate params The update_sta_support_rate function takes a pointer to information elements and the total length of all these elements. Use our variables for pointer and length instead of calculating them manually. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126160129.178697-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 018da8b60688caec763d75cc6fb022a165028cea Author: Martin Kaiser Date: Sat Nov 26 17:01:24 2022 +0100 staging: r8188eu: use ie buffer in update_beacon_info The update_beacon_info function parses information elements of a beacon message. It should take the pointer to the information elements and their total length, not the entire beacon message. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126160129.178697-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++-- drivers/staging/r8188eu/core/rtw_wlan_util.c | 9 +++------ drivers/staging/r8188eu/include/rtw_mlme_ext.h | 3 +-- 3 files changed, 6 insertions(+), 10 deletions(-) commit 1ed513f3e0ff13f2a84e3479b7774f213c7d7066 Author: Martin Kaiser Date: Sat Nov 26 17:01:23 2022 +0100 staging: r8188eu: pass only ies to process_p2p_ps_ie The process_p2p_ps_ie function parses the information elements of a beacon message and extracts p2p-related info. process_p2p_ps_ie does not receive a pointer to the information elements as one would expect. Instead it receives a pointer to the timestamp field in the beacon message. process_p2p_ps_ie increments this pointer by _BEACON_IE_OFFSET_ to jump to the start of the information elements (and decreases the buffer length accordingly). This is clumsy and hard to understand. Rewrite this such that process_p2p_ps_ie takes a pointer to the information elements and the total length of all elements. Check up-front that the total length is not negative. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126160129.178697-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 9 ++++++++- drivers/staging/r8188eu/core/rtw_p2p.c | 11 ++--------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 0e73b1276a51eeb649c9676e41c9e4208c8b40af Author: Martin Kaiser Date: Sat Nov 26 17:01:22 2022 +0100 staging: r8188eu: replace GetAddr2Ptr calls Get the source address of a beacon frame from our struct ieee80211_mgmt instead of using the driver's internal GetAddr2Ptr helper. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126160129.178697-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 84d55656bf4486eee77b783b88adebad0cf5d649 Author: Martin Kaiser Date: Sat Nov 26 17:01:21 2022 +0100 staging: r8188eu: read timestamp from ieee80211_mgmt Read the 64-bit timestamp from struct ieee80211_mgmt instead of parsing the beacon message ourselves. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126160129.178697-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit 64a4ade699e70b2b700cf6088916827b73988d52 Author: Martin Kaiser Date: Sat Nov 26 17:01:20 2022 +0100 staging: r8188eu: replace one GetAddr3Ptr call Define a struct ieee80211_mgmt in the OnBeacon function. Use it to replace one GetAddr3Ptr call. This is a tiny step towards making GetAddr3Ptr obsolete. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126160129.178697-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2cb3ecf1c5fa4850073d48fb4a759fc650f08736 Author: Jack Schofield Date: Wed Nov 30 21:38:52 2022 -0800 staging: greybus: loopback_test: Remove extra blank lines Clean up extra uses of blank lines that do not follow the kernel coding style. Issue reported by checkpatch. Reviewed-by: Johan Hovold Signed-off-by: Jack Schofield Link: https://lore.kernel.org/r/51edbcc7583d64d3fe5a203d3a8649a695ef4a75.1669872193.git.schofija@oregonstate.edu Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 13 ------------- 1 file changed, 13 deletions(-) commit 2206c10685ab92a74ead37c30a7f817125ccd723 Author: Jack Schofield Date: Wed Nov 30 21:38:51 2022 -0800 staging: greybus: loopback_test: Remove void function return statement Void function return statement is not useful in this case. Issue reported by checkpatch. Reviewed-by: Johan Hovold Signed-off-by: Jack Schofield Link: https://lore.kernel.org/r/5d465d56a6e3de2cb9d2f34377cbb82678cc67b1.1669872193.git.schofija@oregonstate.edu Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 1 - 1 file changed, 1 deletion(-) commit d664761116ea12a2417b268af2fd936fe571f612 Author: Jack Schofield Date: Wed Nov 30 21:38:50 2022 -0800 staging: greybus: loopback_test: Add blank line after declaration. Declarations are to be followed by a blank line. Add to follow Linux Kernel coding style. Issue reported by checkpatch. Reviewed-by: Johan Hovold Signed-off-by: Jack Schofield Link: https://lore.kernel.org/r/048967b5c3b157e19ccf4608f71da8418fc31877.1669872193.git.schofija@oregonstate.edu Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 1 + 1 file changed, 1 insertion(+) commit 57a8f00f03f1fa493fadd20992e700d24f6860cb Author: Martin Kaiser Date: Sat Nov 26 16:42:53 2022 +0100 staging: r8188eu: use ieee80211 helper for protected bit Use ieee80211_has_protected to check if the "protected" bit is set. Remove the r8188eu driver's internal macro for this check. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126154253.178275-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/wifi.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) commit 92f1bb5ff104d7f36754f27c17483d4e8ffe85ae Author: Martin Kaiser Date: Sat Nov 26 16:42:52 2022 +0100 staging: r8188eu: simplify the checks for zero address In function ap2sta_data_frame, we can use is_zero_ether_addr to check for all-zero ethernet addresses. Both pattrib->bssid and mybssid are 16-bit aligned. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126154253.178275-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 77833c305dc897c094e5c5419c27568509346609 Author: Martin Kaiser Date: Sat Nov 26 16:42:51 2022 +0100 staging: r8188eu: fix the number of probereq retries issue_probereq_ex sends a probe request and retries if this fails. There's no point in making the number of retries configurable. Hard-code the value that's used by issue_probereq_ex's only caller. Simplify the code to check the loop condition only once. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126154253.178275-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 21 ++++++++------------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 3 +-- 2 files changed, 9 insertions(+), 15 deletions(-) commit e0e14bbee1811209435d3ba29008769bd7a45057 Author: Martin Kaiser Date: Sat Nov 26 16:42:50 2022 +0100 staging: r8188eu: remove wait_ms parameter Remove the wait_ms parameter from function issue_probereq_ex. There's only one caller, who requests a waiting time of 1 ms. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126154253.178275-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 12 ++++++------ drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit d43ea3d4d2efd015ae7999168a58796671df4138 Author: Martin Kaiser Date: Sat Nov 26 16:42:49 2022 +0100 staging: r8188eu: drop return value from issue_probereq_ex The only caller of issue_probereq_ex does not check the return value. We can remove it and make issue_probereq_ex a void function. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221126154253.178275-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 11 ++--------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 4 ++-- 2 files changed, 4 insertions(+), 11 deletions(-) commit d30f4436f364b4ad915ca2c09be07cd0f93ceb44 Author: YueHaibing Date: Wed Nov 23 16:12:53 2022 +0800 staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor() The skb is delivered to netif_rx() in rtllib_monitor_rx(), which may free it, after calling this, dereferencing skb may trigger use-after-free. Found by Smatch. Fixes: 94a799425eee ("From: wlanfae [PATCH 1/8] rtl8192e: Import new version of driver from realtek") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20221123081253.22296-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0005909e5e98f230397064de391371ba6a66fba Author: Philipp Hortmann Date: Tue Nov 22 23:46:29 2022 +0100 staging: rtl8192e: Remove unused variable int_log int_log is initialized and incremented but never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/e2edcde052cc3c47e6e6b94d09e460b8cf6a49a8.1669156825.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 15 --------------- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 --- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 -- 3 files changed, 20 deletions(-) commit aae3567db0e9e4be26c8c51c441d8bc43d613116 Author: Philipp Hortmann Date: Tue Nov 22 23:46:21 2022 +0100 staging: rtl8192e: Remove unused variable ChannelAccessSetting ChannelAccessSetting is never used. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b88a31954532f47a4caf9abfcad8e20b32a618cc.1669156825.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 12 ------------ 1 file changed, 12 deletions(-) commit efc6f7ce3adf3331298a4bfe2fa9d3912e660261 Author: Philipp Hortmann Date: Tue Nov 22 23:46:15 2022 +0100 staging: rtl8192e: Remove unused variable initialized_at_probe initialized_at_probe is initialized and never used. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/4855b2dd5b7296b0eb10e697f605fb820e1dfc7b.1669156825.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - 2 files changed, 2 deletions(-) commit d694a05fda8797521d51ceba2e7942751391626a Author: Philipp Hortmann Date: Tue Nov 22 23:46:08 2022 +0100 staging: rtl8192e: Remove unused variable skb_aggQ skb_aggQ is initialized, never used and purged. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/3197be3cb412eea1c662a5bec1b1afda2cee675d.1669156825.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 -- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 -- drivers/staging/rtl8192e/rtllib.h | 1 - 3 files changed, 5 deletions(-) commit 24a525a671ef1e410926da010ef2a3a1b1b96481 Author: Philipp Hortmann Date: Tue Nov 22 23:45:57 2022 +0100 staging: rtl8192e: Remove unchanged variable AcmMethod AcmMethod is initialized and never changed. The evaluation will always have the same result. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/7d73a66184e13d5f8d4af7d21564032247a7e923.1669156825.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 -- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 -- drivers/staging/rtl8192e/rtl819x_Qos.h | 7 ------- 4 files changed, 12 deletions(-) commit bcc5e2dcf09089b337b76fc1a589f6ff95ca19ac Author: Dan Carpenter Date: Wed Nov 23 09:43:14 2022 +0300 staging: rtl8192u: Fix use after free in ieee80211_rx() We cannot dereference the "skb" pointer after calling ieee80211_monitor_rx(), because it is a use after free. Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Y33BArx3k/aw6yv/@kili Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 58ff6569bc6ec369482eb2d132868870380be64c Author: Marc Zyngier Date: Mon Dec 5 12:05:51 2022 +0000 KVM: arm64: PMU: Fix period computation for 64bit counters with 32bit overflow Fix the bogus masking when computing the period of a 64bit counter with 32bit overflow. It really should be treated like a 32bit counter for the purpose of the period. Reported-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/Y4jbosgHbUDI0WF4@google.com arch/arm64/kvm/pmu-emul.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit ca84ce153d887b1dc8b118029976cc9faf2a9b40 Author: Xiu Jianfeng Date: Wed Nov 23 23:58:58 2022 +0800 x86/xen: Fix memory leak in xen_init_lock_cpu() In xen_init_lock_cpu(), the @name has allocated new string by kasprintf(), if bind_ipi_to_irqhandler() fails, it should be freed, otherwise may lead to a memory leak issue, fix it. Fixes: 2d9e1e2f58b5 ("xen: implement Xen-specific spinlocks") Signed-off-by: Xiu Jianfeng Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20221123155858.11382-3-xiujianfeng@huawei.com Signed-off-by: Juergen Gross arch/x86/xen/spinlock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 69143f60868b3939ddc89289b29db593b647295e Author: Xiu Jianfeng Date: Wed Nov 23 23:58:57 2022 +0800 x86/xen: Fix memory leak in xen_smp_intr_init{_pv}() These local variables @{resched|pmu|callfunc...}_name saves the new string allocated by kasprintf(), and when bind_{v}ipi_to_irqhandler() fails, it goes to the @fail tag, and calls xen_smp_intr_free{_pv}() to free resource, however the new string is not saved, which cause a memory leak issue. fix it. Fixes: 9702785a747a ("i386: move xen") Signed-off-by: Xiu Jianfeng Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20221123155858.11382-2-xiujianfeng@huawei.com Signed-off-by: Juergen Gross arch/x86/xen/smp.c | 24 ++++++++++++------------ arch/x86/xen/smp_pv.c | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) commit 11987fbeaae78f2fc01ce9eb3f5a0eec382b4282 Author: Jani Nikula Date: Wed Nov 23 15:10:56 2022 +0200 xen: fix xen.h build for CONFIG_XEN_PVH=y For CONFIG_XEN_PVH=y, xen.h uses bool before the type is known. Include earlier. Signed-off-by: Jani Nikula Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20221123131057.3864183-1-jani.nikula@intel.com Signed-off-by: Juergen Gross include/xen/xen.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef8ae384b4c9ccefecf4754f34644bd9fb0105b7 Author: Oleksandr Tyshchenko Date: Tue Oct 25 19:20:04 2022 +0300 xen/virtio: Handle PCI devices which Host controller is described in DT Use the same "xen-grant-dma" device concept for the PCI devices behind device-tree based PCI Host controller, but with one modification. Unlike for platform devices, we cannot use generic IOMMU bindings (iommus property), as we need to support more flexible configuration. The problem is that PCI devices under the single PCI Host controller may have the backends running in different Xen domains and thus have different endpoints ID (backend domains ID). Add ability to deal with generic PCI-IOMMU bindings (iommu-map/ iommu-map-mask properties) which allows us to describe relationship between PCI devices and backend domains ID properly. To avoid having to look up for the PCI Host bridge twice and reduce the amount of checks pass an extra struct device_node *np to xen_dt_grant_init_backend_domid(). So with current patch the code expects iommus property for the platform devices and iommu-map/iommu-map-mask properties for PCI devices. The example of generated by the toolstack iommu-map property for two PCI devices 0000:00:01.0 and 0000:00:02.0 whose backends are running in different Xen domains with IDs 1 and 2 respectively: iommu-map = <0x08 0xfde9 0x01 0x08 0x10 0xfde9 0x02 0x08>; Signed-off-by: Oleksandr Tyshchenko Reviewed-by: Xenia Ragiadakou Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/20221025162004.8501-3-olekstysh@gmail.com Signed-off-by: Juergen Gross drivers/xen/grant-dma-ops.c | 46 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) commit 035e3a4321f73c352b6408ec2153fa5bc3feb459 Author: Oleksandr Tyshchenko Date: Tue Oct 25 19:20:03 2022 +0300 xen/virtio: Optimize the setup of "xen-grant-dma" devices This is needed to avoid having to parse the same device-tree several times for a given device. For this to work we need to install the xen_virtio_restricted_mem_acc callback in Arm's xen_guest_init() which is same callback as x86's PV and HVM modes already use and remove the manual assignment in xen_setup_dma_ops(). Also we need to split the code to initialize backend_domid into a separate function. Prior to current patch we parsed the device-tree three times: 1. xen_setup_dma_ops()->...->xen_is_dt_grant_dma_device() 2. xen_setup_dma_ops()->...->xen_dt_grant_init_backend_domid() 3. xen_virtio_mem_acc()->...->xen_is_dt_grant_dma_device() With current patch we parse the device-tree only once in xen_virtio_restricted_mem_acc()->...->xen_dt_grant_init_backend_domid() Other benefits are: - Not diverge from x86 when setting up Xen grant DMA ops - Drop several global functions Signed-off-by: Oleksandr Tyshchenko Reviewed-by: Xenia Ragiadakou Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/20221025162004.8501-2-olekstysh@gmail.com Signed-off-by: Juergen Gross arch/arm/xen/enlighten.c | 2 +- drivers/xen/grant-dma-ops.c | 77 +++++++++++++++++---------------------------- include/xen/arm/xen-ops.h | 4 +-- include/xen/xen-ops.h | 16 ---------- 4 files changed, 30 insertions(+), 69 deletions(-) commit 343a5d358e4ab5597e90e1eafa7eba55eb42e96b Author: Michael Walle Date: Fri Dec 2 15:49:00 2022 +0100 net: phy: mxl-gpy: rename MMD_VEND1 macros to match datasheet Rename the temperature sensors macros to match the names in the datasheet. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mxl-gpy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit de624864496628356eecdfa6751f7995bbb996d1 Author: Diana Wang Date: Fri Dec 2 10:42:14 2022 +0100 nfp: add support for multicast filter Rewrite nfp_net_set_rx_mode() to implement interface to delivery mc address and operations to firmware by using general mailbox for filtering multicast packets. The operations include add mc address and delete mc address. And the limitation of mc addresses number is 1024 for each net device. User triggers adding mc address by using command below: ip maddress add dev User triggers deleting mc address by using command below: ip maddress del dev Signed-off-by: Diana Wang Signed-off-by: Simon Horman Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 5 ++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 63 ++++++++++++++++++++-- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 15 ++++++ 3 files changed, 79 insertions(+), 4 deletions(-) commit 38db82e29404d462b71bc3ac2149fbaf0c41fc7c Author: ye xingchen Date: Fri Dec 2 16:42:14 2022 +0800 net: ipa: 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 Reviewed-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa_sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 27e521c59e49603001cbee900f086ccf4a0e70b2 Merge: d8ca113724e7 b0346843b107 Author: David S. Miller Date: Mon Dec 5 10:58:17 2022 +0000 Merge tag 'rxrpc-next-20221201-b' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Increasing SACK size and moving away from softirq, parts 2 & 3 Here are the second and third parts 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 already in net-next. The second part includes some cleanups, adds some testing and overhauls some tracing: (1) Remove declaration of rxrpc_kernel_call_is_complete() as the definition is no longer present. (2) Remove the knet() and kproto() macros in favour of using tracepoints. (3) Remove handling of duplicate packets from recvmsg. The input side isn't now going to insert overlapping/duplicate packets into the recvmsg queue. (4) Don't use the rxrpc_conn_parameters struct in the rxrpc_connection or rxrpc_bundle structs - rather put the members in directly. (5) Extract the abort code from a received abort packet right up front rather than doing it in multiple places later. (6) Use enums and symbol lists rather than __builtin_return_address() to indicate where a tracepoint was triggered for local, peer, conn, call and skbuff tracing. (7) Add a refcount tracepoint for the rxrpc_bundle struct. (8) Implement an in-kernel server for the AFS rxperf testing program to talk to (enabled by a Kconfig option). This is tagged as rxrpc-next-20221201-a. The third part introduces the I/O thread and switches various bits over to running there: (1) Fix call timers and call and connection workqueues to not hold refs on the rxrpc_call and rxrpc_connection structs to thereby avoid messy cleanup when the last ref is put in softirq mode. (2) Split input.c so that the call packet processing bits are separate from the received packet distribution bits. Call packet processing gets bumped over to the call event handler. (3) Create a per-local endpoint I/O thread. Barring some tiny bits that still get done in softirq context, all packet reception, processing and transmission is done in this thread. That will allow a load of locking to be removed. (4) Perform packet processing and error processing from the I/O thread. (5) Provide a mechanism to process call event notifications in the I/O thread rather than queuing a work item for that call. (6) Move data and ACK transmission into the I/O thread. ACKs can then be transmitted at the point they're generated rather than getting delegated from softirq context to some process context somewhere. (7) Move call and local processor event handling into the I/O thread. (8) Move cwnd degradation to after packets have been transmitted so that they don't shorten the window too quickly. A bunch of simplifications can then be done: (1) The input_lock is no longer necessary as exclusion is achieved by running the code in the I/O thread only. (2) Don't need to use sk->sk_receive_queue.lock to guard socket state changes as the socket mutex should suffice. (3) Don't take spinlocks in RCU callback functions as they get run in softirq context and thus need _bh annotations. (4) RCU is then no longer needed for the peer's error_targets list. (5) Simplify the skbuff handling in the receive path by dropping the ref in the basic I/O thread loop and getting an extra ref as and when we need to queue the packet for recvmsg or another context. (6) Get the peer address earlier in the input process and pass it to the users so that we only do it once. This is tagged as rxrpc-next-20221201-b. Changes: ======== ver #2) - Added a patch to change four assertions into warnings in rxrpc_read() and fixed a checker warning from a __user annotation that should have been removed.. - Change a min() to min_t() in rxperf as PAGE_SIZE doesn't seem to match type size_t on i386. - Three error handling issues in rxrpc_new_incoming_call(): - If not DATA or not seq #1, should drop the packet, not abort. - Fix a goto that went to the wrong place, dropping a non-held lock. - Fix an rcu_read_lock that should've been an unlock. Tested-by: Marc Dionne Tested-by: kafs-testing+fedora36_64checkkafs-build-144@auristor.com Link: https://lore.kernel.org/r/166794587113.2389296.16484814996876530222.stgit@warthog.procyon.org.uk/ [1] Link: https://lore.kernel.org/r/166982725699.621383.2358362793992993374.stgit@warthog.procyon.org.uk/ # v1 ==================== Signed-off-by: David S. Miller commit cefa72129e45313655d53a065b8055aaeb01a0c9 Author: Oleg Nesterov Date: Sun Dec 4 18:39:33 2022 +0100 uprobes/x86: Allow to probe a NOP instruction with 0x66 prefix Intel ICC -hotpatch inserts 2-byte "0x66 0x90" NOP at the start of each function to reserve extra space for hot-patching, and currently it is not possible to probe these functions because branch_setup_xol_ops() wrongly rejects NOP with REP prefix as it treats them like word-sized branch instructions. Fixes: 250bbd12c2fe ("uprobes/x86: Refuse to attach uprobe to "word-sized" branch insns") Reported-by: Seiji Nishikawa Suggested-by: Denys Vlasenko Signed-off-by: Oleg Nesterov Signed-off-by: Thomas Gleixner Acked-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/r/20221204173933.GA31544@redhat.com arch/x86/kernel/uprobes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 00ef8885a945c37551547d8ac8361cacd20c4e42 Author: Ricardo Ribalda Date: Mon Nov 28 23:16:48 2022 +0100 iommu/mediatek: Fix crash on isr after kexec() If the system is rebooted via isr(), the IRQ handler might be triggered before the domain is initialized. Resulting on an invalid memory access error. Fix: [ 0.500930] Unable to handle kernel read from unreadable memory at virtual address 0000000000000070 [ 0.501166] Call trace: [ 0.501174] report_iommu_fault+0x28/0xfc [ 0.501180] mtk_iommu_isr+0x10c/0x1c0 Signed-off-by: Ricardo Ribalda Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20221125-mtk-iommu-v2-0-e168dff7d43e@chromium.org [ joro: Fixed spelling in commit message ] Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef5bb8e7a7127218f826b9ccdf7508e7a339f4c2 Author: Jason Gunthorpe Date: Mon Nov 28 10:06:28 2022 -0400 iommu/sun50i: Remove IOMMU_DOMAIN_IDENTITY This driver treats IOMMU_DOMAIN_IDENTITY the same as UNMANAGED, which cannot possibly be correct. UNMANAGED domains are required to start out blocking all DMAs. This seems to be what this driver does as it allocates a first level 'dt' for the IO page table that is 0 filled. Thus UNMANAGED looks like a working IO page table, and so IDENTITY must be a mistake. Remove it. Fixes: 4100b8c229b3 ("iommu: Add Allwinner H6 IOMMU driver") Signed-off-by: Jason Gunthorpe Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/0-v1-97f0adf27b5e+1f0-s50_identity_jgg@nvidia.com Signed-off-by: Joerg Roedel drivers/iommu/sun50i-iommu.c | 1 - 1 file changed, 1 deletion(-) commit 7868f93006ad27c00ecddcc2904118aa705459ca Author: Bartosz Taudul Date: Sat Dec 3 01:07:24 2022 +0000 udf: Increase UDF_MAX_READ_VERSION to 0x0260 Some discs containing the UDF file system are unable to be mounted, failing with the following message: UDF-fs: error (device sr0): udf_fill_super: minUDFReadRev=260 (max is 250) The UDF 2.60 specification [0] states in the section Basic Restrictions & Requirements (page 10): The Minimum UDF Read Revision value shall be at most #0250 for all media with a UDF 2.60 file system. This indicates that a UDF 2.50 implementation can read all UDF 2.60 media. Media that do not have a Metadata Partition may use a value lower than #250. The conclusion is that the discs failing to mount were burned with a faulty software, which didn't follow the specification. This can be worked around by increasing UDF_MAX_READ_VERSION to 0x260, to match the Minimum Read Revision. No other changes are required, as reading UDF 2.60 is backward compatible with UDF 2.50. [0] http://www.osta.org/specs/pdf/udf260.pdf Signed-off-by: Bartosz Taudul Signed-off-by: Jan Kara fs/udf/udf_sb.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 88699c024f9227b79af90adc929625e4b7867932 Author: Michael Forney Date: Tue Nov 22 14:18:25 2022 -0800 iommu/amd: Fix typo in macro parameter name IVRS_GET_SBDF_ID is only called with fn as the fourth parameter, so this had no effect, but fixing the name will avoid bugs if that ever changes. Signed-off-by: Michael Forney Reviewed-by: Vasant Hegde Link: https://lore.kernel.org/r/381fbc430c0ccdd78b3b696cfc0c32b233526ca5.1669159392.git.mforney@mforney.org Signed-off-by: Joerg Roedel drivers/iommu/amd/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ff894edd542618dad2fef538f8272c620a501db Author: Yong Wu Date: Tue Oct 18 10:42:58 2022 +0800 iommu/mediatek: Remove unused "mapping" member from mtk_iommu_data Just remove a unused variable that only is for mtk_iommu_v1. Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20221018024258.19073-7-yong.wu@mediatek.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 3 --- 1 file changed, 3 deletions(-) commit 6cde583d5352818a51985b32a960cdde85ab3821 Author: Yong Wu Date: Tue Oct 18 10:42:57 2022 +0800 iommu/mediatek: Improve safety for mediatek,smi property in larb nodes No functional change. Just improve safety from dts. All the larbs that connect to one IOMMU must connect with the same smi-common. This patch checks all the mediatek,smi property for each larb, If their mediatek,smi are different, it will return fails. Also avoid there is no available smi-larb nodes. Suggested-by: Guenter Roeck Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20221018024258.19073-6-yong.wu@mediatek.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 53 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 16 deletions(-) commit ef693a8440926884bfd9cc3d6d36f65719513350 Author: Guenter Roeck Date: Tue Oct 18 10:42:56 2022 +0800 iommu/mediatek: Validate number of phandles associated with "mediatek,larbs" Fix the smatch warnings: drivers/iommu/mtk_iommu.c:878 mtk_iommu_mm_dts_parse() error: uninitialized symbol 'larbnode'. If someone abuse the dtsi node(Don't follow the definition of dt-binding), for example "mediatek,larbs" is provided as boolean property, "larb_nr" will be zero and cause abnormal. To fix this problem and improve the code safety, add some checking for the invalid input from dtsi, e.g. checking the larb_nr/larbid valid range, and avoid "mediatek,larb-id" property conflicts in the smi-larb nodes. Fixes: d2e9a1102cfc ("iommu/mediatek: Contain MM IOMMU flow with the MM TYPE") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Guenter Roeck Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20221018024258.19073-5-yong.wu@mediatek.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 26593928564cf5b576ff05d3cbd958f57c9534bb Author: Yong Wu Date: Tue Oct 18 10:42:55 2022 +0800 iommu/mediatek: Add error path for loop of mm_dts_parse The mtk_iommu_mm_dts_parse will parse the smi larbs nodes. if the i+1 larb is parsed fail, we should put_device for the i..0 larbs. There are two places need to comment: 1) The larbid may be not linear mapping, we should loop whole the array in the error path. 2) I move this line position: "data->larb_imu[id].dev = &plarbdev->dev;" before "if (!plarbdev->dev.driver)", That means set data->larb_imu[id].dev before the error path. then we don't need "platform_device_put(plarbdev)" again in probe_defer case. All depend on "put_device" of the error path in error cases. Fixes: d2e9a1102cfc ("iommu/mediatek: Contain MM IOMMU flow with the MM TYPE") Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20221018024258.19073-4-yong.wu@mediatek.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 Author: Yong Wu Date: Tue Oct 18 10:42:54 2022 +0800 iommu/mediatek: Use component_match_add In order to simplify the error patch(avoid call of_node_put), Use component_match_add instead component_match_add_release since we are only interested in the "device" here. Then we could always call of_node_put in normal path. Strictly this is not a fixes patch, but it is a prepare for adding the error path, thus I add a Fixes tag too. Fixes: d2e9a1102cfc ("iommu/mediatek: Contain MM IOMMU flow with the MM TYPE") Suggested-by: Robin Murphy Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20221018024258.19073-3-yong.wu@mediatek.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit dcb40e9fcce9bd251eaff19f3724131db522846c Author: Yong Wu Date: Tue Oct 18 10:42:53 2022 +0800 iommu/mediatek: Add platform_device_put for recovering the device refcnt Add platform_device_put to match with of_find_device_by_node. Meanwhile, I add a new variable "pcommdev" which is for smi common device. Otherwise, "platform_device_put(plarbdev)" for smi-common dev may be not readable. And add a checking for whether pcommdev is NULL. Fixes: d2e9a1102cfc ("iommu/mediatek: Contain MM IOMMU flow with the MM TYPE") Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20221018024258.19073-2-yong.wu@mediatek.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 6ed54e1789a29d3f1557454cc7d2eb9c10d1d37b Merge: 4363c8525e07 3ae977d0e4e3 Author: Marc Zyngier Date: Mon Dec 5 10:45:41 2022 +0000 Merge branch irq/misc-6.2 into irq/irqchip-next * irq/misc-6.2: : . : Random minor fixes and improvments: : : - More Loongson fixes after the Loongarch merge : : - Error handling fixes for wpcm450, GIC... : : - BE detection for a FSL controller : : - Declare the Sifive PLIC as wake-up agnostic : : - Simplify fishing out the device data for the ST irqchip : : - Mark some data structures as __initconst in the apple-aic driver : : - Switch over from strtobool to kstrtobool : : - COMPILET_TEST fixes : : - and the mandatory "repeated word" commit... : . irqchip/ls-extirq: Fix endianness detection irqchip/gic: Use kstrtobool() instead of strtobool() irqchip/sifive-plic: Support wake IRQs irqchip/loongson-liointc: Fix improper error handling in liointc_init() irqchip/sl28cpld: Replace irqchip mask_invert with unmask_base irqchip/wpcm450: Fix memory leak in wpcm450_aic_of_init() irqchip/st: Use device_get_match_data() to simplify the code irqchip/al-fic: Drop obsolete dependency on COMPILE_TEST irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe() irqchip/mips-gic: Drop repeated word in comment irqchip/apple-aic: Mark aic_info structs __initconst Signed-off-by: Marc Zyngier commit 4363c8525e07e86a3f410981a2712b3bf6b04659 Merge: dc7f1c295f82 5c4e0aac0b2a Author: Marc Zyngier Date: Mon Dec 5 10:45:35 2022 +0000 Merge branch irq/cirq-v2 into irq/irqchip-next * irq/cirq-v2: : . : Support for the MTK CIRQv2, courtesy of AngeloGioacchino Del Regno: : : "On newer SoCs (like MT8192/95 and also other non-chromebook chips), the : MediaTek CIRQ controller has a new register layout: this series adds : some more flexibility to the irq-mtk-cirq driver, allowing to select : the register layout based on a SoC-specific compatible." : : . irqchip/irq-mtk-cirq: Add support for System CIRQ on MT8192 irqchip/irq-mtk-cirq: Move register offsets to const array dt-bindings: interrupt-controller: mediatek,cirq: Document MT8192 dt-bindings: interrupt-controller: mediatek,cirq: Migrate to dt schema Signed-off-by: Marc Zyngier commit dc7f1c295f829c0dd40fed8e799a37a05bec6892 Merge: 63ab33c08c41 065abd13a63f Author: Marc Zyngier Date: Mon Dec 5 10:45:11 2022 +0000 Merge branch irq/loongarch-of into irq/irqchip-next * irq/loongarch-of: : . : Initial OF support for LoongArch. Funny how it only took : *one* release from plumbing ACPI into an unsuspecting : architecture to start enabling OF on it. Oh well... : . irqchip/loongarch-cpu: Fix a missing prototype warning dt-bindings: interrupt-controller: add yaml for LoongArch CPU interrupt controller irqchip: loongarch-cpu: add DT support Signed-off-by: Marc Zyngier commit 065abd13a63f40318162eeca6c0215fc5cbb9b0a Author: Huacai Chen Date: Mon Dec 5 12:47:08 2022 +0800 irqchip/loongarch-cpu: Fix a missing prototype warning 1, Rename loongarch_cpu_irq_of_init() to cpuintc_of_init() in order to keep the same style as the ACPI version. 2, Fix a missing prototype warning by adding a "static" modifier. Fixes: 855d4ca4bdb366aab3d4 ("irqchip: loongarch-cpu: add DT support") Reported-by: kernel test robot Cc: Peibao Liu Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221205044708.2054022-1-chenhuacai@loongson.cn drivers/irqchip/irq-loongarch-cpu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3ae977d0e4e3a2a2ccc912ca2d20c9430508ecdd Author: Sean Anderson Date: Thu Dec 1 16:28:07 2022 -0500 irqchip/ls-extirq: Fix endianness detection parent is the interrupt parent, not the parent of node. Use node->parent. This fixes endianness detection on big-endian platforms. Fixes: 1b00adce8afd ("irqchip/ls-extirq: Fix invalid wait context by avoiding to use regmap") Signed-off-by: Sean Anderson Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221201212807.616191-1-sean.anderson@seco.com drivers/irqchip/irq-ls-extirq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f4ab7da904ab7027ccd43ddb4f0094e932a5877 Author: Miaoqian Lin Date: Mon Dec 5 12:44:27 2022 +0400 selftests/powerpc: Fix resource leaks In check_all_cpu_dscr_defaults, opendir() opens the directory stream. Add missing closedir() in the error path to release it. In check_cpu_dscr_default, open() creates an open file descriptor. Add missing close() in the error path to release it. Fixes: ebd5858c904b ("selftests/powerpc: Add test for all DSCR sysfs interfaces") Signed-off-by: Miaoqian Lin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221205084429.570654-1-linmq006@gmail.com tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7882b69eb6cdf6288a89d831d95c8547400a8b4d Author: Juergen Gross Date: Mon Dec 5 09:04:33 2022 +0100 x86/mtrr: Make message for disabled MTRRs more descriptive Instead of just saying "Disabled" when MTRRs are disabled for any reason, tell what is disabled and why. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20221205080433.16643-3-jgross@suse.com arch/x86/kernel/cpu/mtrr/mtrr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c11ca45441d56ed6d353548cad660e04f0b6605d Author: Juergen Gross Date: Mon Dec 5 09:04:32 2022 +0100 x86/pat: Handle TDX guest PAT initialization With the decoupling of PAT and MTRR initialization, PAT will be used even with MTRRs disabled. This seems to break booting up as TDX guest, as the recommended sequence to set the PAT MSR across CPUs can't work in TDX guests due to disabling caches via setting CR0.CD isn't allowed in TDX mode. This is an inconsistency in the Intel documentation between the SDM and the TDX specification. For now handle TDX mode the same way as Xen PV guest mode by just accepting the current PAT MSR setting without trying to modify it. [ bp: Align conditions for better readability. ] Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20221205080433.16643-2-jgross@suse.com arch/x86/mm/pat/memtype.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d78a167332e1ca8113268ed922c1212fd71b73ad Author: Hui Tang Date: Mon Nov 14 17:25:40 2022 +0800 i2c: pxa-pci: fix missing pci_disable_device() on error in ce4100_i2c_probe Using pcim_enable_device() to avoid missing pci_disable_device(). Fixes: 7e94dd154e93 ("i2c-pxa2xx: Add PCI support for PXA I2C controller") Signed-off-by: Hui Tang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-pxa-pci.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 87ab726952267caabb9c1404e007e16e42f03b52 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:19 2022 +0100 i2c: slave-eeprom: 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: Wolfram Sang drivers/i2c/i2c-slave-eeprom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cc8c418b4fc09ed58ddd27b8e90ec797e9ca1e67 Author: Tiezhu Yang Date: Sun Dec 4 20:18:47 2022 +0800 Documentation/features: Use loongarch instead of loong The official arch name is LoongArch [1], we should use small letter loongarch instead of loong in Documentation/features, just use the features-refresh.sh to refresh all the related files. [1] https://www.kernel.org/doc/html/latest/loongarch/index.html Fixes: 5860800e8696 ("Documentation/features: Update the arch support status files") Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1670156327-9631-3-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Jonathan Corbet Documentation/features/core/cBPF-JIT/arch-support.txt | 2 +- Documentation/features/core/eBPF-JIT/arch-support.txt | 2 +- Documentation/features/core/generic-idle-thread/arch-support.txt | 2 +- Documentation/features/core/jump-labels/arch-support.txt | 2 +- Documentation/features/core/thread-info-in-task/arch-support.txt | 2 +- Documentation/features/core/tracehook/arch-support.txt | 2 +- Documentation/features/debug/KASAN/arch-support.txt | 2 +- Documentation/features/debug/debug-vm-pgtable/arch-support.txt | 2 +- Documentation/features/debug/gcov-profile-all/arch-support.txt | 2 +- Documentation/features/debug/kcov/arch-support.txt | 2 +- Documentation/features/debug/kgdb/arch-support.txt | 2 +- Documentation/features/debug/kmemleak/arch-support.txt | 2 +- Documentation/features/debug/kprobes-on-ftrace/arch-support.txt | 2 +- Documentation/features/debug/kprobes/arch-support.txt | 2 +- Documentation/features/debug/kretprobes/arch-support.txt | 2 +- Documentation/features/debug/optprobes/arch-support.txt | 2 +- Documentation/features/debug/stackprotector/arch-support.txt | 2 +- Documentation/features/debug/uprobes/arch-support.txt | 2 +- Documentation/features/debug/user-ret-profiler/arch-support.txt | 2 +- Documentation/features/io/dma-contiguous/arch-support.txt | 2 +- Documentation/features/locking/cmpxchg-local/arch-support.txt | 2 +- Documentation/features/locking/lockdep/arch-support.txt | 2 +- Documentation/features/locking/queued-rwlocks/arch-support.txt | 2 +- Documentation/features/locking/queued-spinlocks/arch-support.txt | 2 +- Documentation/features/perf/kprobes-event/arch-support.txt | 2 +- Documentation/features/perf/perf-regs/arch-support.txt | 2 +- Documentation/features/perf/perf-stackdump/arch-support.txt | 2 +- Documentation/features/sched/membarrier-sync-core/arch-support.txt | 2 +- Documentation/features/sched/numa-balancing/arch-support.txt | 2 +- Documentation/features/seccomp/seccomp-filter/arch-support.txt | 2 +- Documentation/features/time/arch-tick-broadcast/arch-support.txt | 2 +- Documentation/features/time/clockevents/arch-support.txt | 2 +- Documentation/features/time/context-tracking/arch-support.txt | 2 +- Documentation/features/time/irq-time-acct/arch-support.txt | 2 +- Documentation/features/time/virt-cpuacct/arch-support.txt | 2 +- Documentation/features/vm/ELF-ASLR/arch-support.txt | 2 +- Documentation/features/vm/PG_uncached/arch-support.txt | 2 +- Documentation/features/vm/THP/arch-support.txt | 2 +- Documentation/features/vm/TLB/arch-support.txt | 2 +- Documentation/features/vm/huge-vmap/arch-support.txt | 2 +- Documentation/features/vm/ioremap_prot/arch-support.txt | 2 +- Documentation/features/vm/pte_special/arch-support.txt | 2 +- 42 files changed, 42 insertions(+), 42 deletions(-) commit 7b5a5242fd0d57900607ae83602c3f30342a596f Author: Tiezhu Yang Date: Sun Dec 4 20:18:46 2022 +0800 Documentation/features-refresh.sh: Only sed the beginning "arch" of ARCH_DIR It should only sed the beginning "arch" of ARCH_DIR in features-refresh.sh, otherwise loongarch is recognized as loong, that is not what we want. Fixes: be99f610a110 ("Documentation/features: Add script that refreshes the arch support status files in place") Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1670156327-9631-2-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Jonathan Corbet Documentation/features/scripts/features-refresh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5eacd2e3790ecf1cbc0be2e53a6f3d1ce3bb719 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:22 2022 +0100 i2c: mux: pca954x: 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: Peter Rosin Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-mux-pca954x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d8ca113724e79b324f553914cefa9dd6961de152 Author: Bhadram Varka Date: Thu Dec 1 15:58:44 2022 +0000 net: stmmac: tegra: Add MGBE support Add support for the Multi-Gigabit Ethernet (MGBE/XPCS) IP found on NVIDIA Tegra234 SoCs. Signed-off-by: Thierry Reding Signed-off-by: Bhadram Varka Co-developed-by: Revanth Kumar Uppala Signed-off-by: Revanth Kumar Uppala Signed-off-by: Jon Hunter Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 9 + drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c | 388 ++++++++++++++++++++++ 3 files changed, 398 insertions(+) commit a46e9010124256f5bf5fc2c241a45cf1944b768e Author: Revanth Kumar Uppala Date: Thu Dec 1 15:58:43 2022 +0000 net: stmmac: Power up SERDES after the PHY link The Tegra MGBE ethernet controller requires that the SERDES link is powered-up after the PHY link is up, otherwise the link fails to become ready following a resume from suspend. Add a variable to indicate that the SERDES link must be powered-up after the PHY link. Signed-off-by: Revanth Kumar Uppala Signed-off-by: Jon Hunter Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 +++++-- include/linux/stmmac.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) commit 2b7c72e0e5f98696f58490c7e4583412ad8be8f6 Author: Leon Romanovsky Date: Fri Dec 2 20:41:34 2022 +0200 xfrm: document IPsec packet offload mode Extend XFRM device offload API description with newly added packet offload mode. Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert Documentation/networking/xfrm_device.rst | 62 +++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 9 deletions(-) commit f3da86dc2c8c9004445cfbb15ac086773622d853 Author: Leon Romanovsky Date: Fri Dec 2 20:41:33 2022 +0200 xfrm: add support to HW update soft and hard limits Both in RX and TX, the traffic that performs IPsec packet offload transformation is accounted by HW. It is needed to properly handle hard limits that require to drop the packet. It means that XFRM core needs to update internal counters with the one that accounted by the HW, so new callbacks are introduced in this patch. In case of soft or hard limit is occurred, the driver should call to xfrm_state_check_expire() that will perform key rekeying exactly as done by XFRM core. Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert include/linux/netdevice.h | 1 + include/net/xfrm.h | 17 +++++++++++++++++ net/xfrm/xfrm_state.c | 4 ++++ 3 files changed, 22 insertions(+) commit 3c611d40c6923c81e6a83a67156cd30a9503c155 Author: Leon Romanovsky Date: Fri Dec 2 20:41:32 2022 +0200 xfrm: speed-up lookup of HW policies Devices that implement IPsec packet offload mode should offload SA and policies too. In RX path, it causes to the situation that HW will always have higher priority over any SW policies. It means that we don't need to perform any search of inexact policies and/or priority checks if HW policy was discovered. In such situation, the HW will catch the packets anyway and HW can still implement inexact lookups. In case specific policy is not found, we will continue with packet lookup and check for existence of HW policies in inexact list. HW policies are added to the head of SPD to ensure fast lookup, as XFRM iterates over all policies in the loop. The same solution of adding HW SAs at the begging of the list is applied to SA database too. However, we don't need to change lookups as they are sorted by insertion order and not priority. Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 16 ++++++++---- net/xfrm/xfrm_state.c | 66 ++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 62 insertions(+), 20 deletions(-) commit a00f6d3723f5617222ab8df228228c3c2c84e3ec Author: Stephen Kitt Date: Wed Oct 12 18:36:47 2022 +0200 drivers/i2c: use simple i2c probe All these drivers have an i2c probe function which doesn't use the "struct i2c_device_id *id" parameter, so they can trivially be converted to the "probe_new" style of probe with a single argument. This is part of an ongoing transition to single-argument i2c probe functions. Old-style probe functions involve a call to i2c_match_id: in drivers/i2c/i2c-core-base.c, /* * When there are no more users of probe(), * rename probe_new to probe. */ if (driver->probe_new) status = driver->probe_new(client); else if (driver->probe) status = driver->probe(client, i2c_match_id(driver->id_table, client)); else status = -EINVAL; Drivers which don't need the second parameter can be declared using probe_new instead, avoiding the call to i2c_match_id. Drivers which do can still be converted to probe_new-style, calling i2c_match_id themselves (as is done currently for of_match_id). This change was done using the following Coccinelle script, and fixed up for whitespace changes: @ rule1 @ identifier fn; identifier client, id; @@ - static int fn(struct i2c_client *client, const struct i2c_device_id *id) + static int fn(struct i2c_client *client) { ...when != id } @ rule2 depends on rule1 @ identifier rule1.fn; identifier driver; @@ struct i2c_driver driver = { - .probe + .probe_new = ( fn | - &fn + fn ) , }; Signed-off-by: Stephen Kitt Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 5 ++--- drivers/i2c/i2c-smbus.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) commit 99c4ec2397bb88c3325676a308b93aa8ba362de8 Author: Peter Rosin Date: Tue Apr 17 16:32:32 2018 +0200 i2c: mux: pca9541: switch to using .probe_new Use the new probe style for i2c drivers. Signed-off-by: Peter Rosin Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-mux-pca9541.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5958372ddf628fe6f4c3e49425734ad32fcfb13c Author: Leon Romanovsky Date: Fri Dec 2 20:41:31 2022 +0200 xfrm: add RX datapath protection for IPsec packet offload mode Traffic received by device with enabled IPsec packet offload should be forwarded to the stack only after decryption, packet headers and trailers removed. Such packets are expected to be seen as normal (non-XFRM) ones, while not-supported packets should be dropped by the HW. Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert include/net/xfrm.h | 55 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 23 deletions(-) commit f8a70afafc1759b1fca4baaa891625dde49c10b7 Author: Leon Romanovsky Date: Fri Dec 2 20:41:30 2022 +0200 xfrm: add TX datapath support for IPsec packet offload mode In IPsec packet mode, the device is going to encrypt and encapsulate packets that are associated with offloaded policy. After successful policy lookup to indicate if packets should be offloaded or not, the stack forwards packets to the device to do the magic. Signed-off-by: Raed Salem Signed-off-by: Huy Nguyen Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert net/xfrm/xfrm_device.c | 15 +++++- net/xfrm/xfrm_output.c | 12 ++++- net/xfrm/xfrm_state.c | 121 +++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 142 insertions(+), 6 deletions(-) commit 8067a32512d7c3747efcbca843c2433f572a4ee5 Author: Akira Yokosawa Date: Mon Dec 5 12:26:24 2022 +0900 docs/zh_CN: Fix '.. only::' directive's expression Commit febe6c2f859e ("docs/zh_CN: Add translation zh_CN/doc-guide/index.rst") translated ".. only::" directive too much. Use the one as found in the original doc-guide/index.rst. Fixes: febe6c2f859e ("docs/zh_CN: Add translation zh_CN/doc-guide/index.rst") Signed-off-by: Akira Yokosawa Cc: Wu XiangCheng Cc: Yanteng Si Cc: Alex Shi Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/20221205032622.8697-1-akiyks@gmail.com Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/doc-guide/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 919e43fad5163a8ceb39826ecdee897a9f799351 Author: Leon Romanovsky Date: Fri Dec 2 20:41:29 2022 +0200 xfrm: add an interface to offload policy Extend netlink interface to add and delete XFRM policy from the device. This functionality is a first step to implement packet IPsec offload solution. Signed-off-by: Raed Salem Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert include/linux/netdevice.h | 3 +++ include/net/xfrm.h | 45 +++++++++++++++++++++++++++++++ net/xfrm/xfrm_device.c | 67 ++++++++++++++++++++++++++++++++++++++++++++- net/xfrm/xfrm_policy.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++ net/xfrm/xfrm_user.c | 18 +++++++++++++ 5 files changed, 201 insertions(+), 1 deletion(-) commit 62f6eca5de103c6823f6ca2abbf2ee242e132207 Author: Leon Romanovsky Date: Fri Dec 2 20:41:28 2022 +0200 xfrm: allow state packet offload mode Allow users to configure xfrm states with packet offload mode. The packet mode must be requested both for policy and state, and such requires us to do not implement fallback. We explicitly return an error if requested packet mode can't be configured. Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert .../chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c | 4 ++++ drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 5 +++++ drivers/net/ethernet/intel/ixgbevf/ipsec.c | 5 +++++ .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 4 ++++ drivers/net/ethernet/netronome/nfp/crypto/ipsec.c | 5 +++++ drivers/net/netdevsim/ipsec.c | 5 +++++ net/xfrm/xfrm_device.c | 24 +++++++++++++++++----- 7 files changed, 47 insertions(+), 5 deletions(-) commit d14f28b8c1de668bab863bf5892a49c824cb110d Author: Leon Romanovsky Date: Fri Dec 2 20:41:27 2022 +0200 xfrm: add new packet offload flag In the next patches, the xfrm core code will be extended to support new type of offload - packet offload. In that mode, both policy and state should be specially configured in order to perform whole offloaded data path. Full offload takes care of encryption, decryption, encapsulation and other operations with headers. As this mode is new for XFRM policy flow, we can "start fresh" with flag bits and release first and second bit for future use. Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert include/net/xfrm.h | 7 +++++++ include/uapi/linux/xfrm.h | 6 ++++++ net/xfrm/xfrm_device.c | 3 +++ net/xfrm/xfrm_user.c | 2 ++ 4 files changed, 18 insertions(+) commit 73e9841ba7e3e394c276d5f24ef4e639bd5f24e1 Author: Binbin Zhou Date: Wed Nov 30 13:55:51 2022 +0800 i2c: gpio: Fix potential unused warning for 'i2c_gpio_dt_ids' Dropping a matching #ifdef check along with dropping of_match_ptr() is just a cleanup, while dropping of_match_ptr() that has no corresponding #ifdef fixes an actual warning. Suggested-by: Andy Shevchenko Acked-by: Arnd Bergmann Signed-off-by: Binbin Zhou Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-gpio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit eaade84a6302f139aede74fe5a568a70adb9baa2 Author: Herbert Xu Date: Mon Dec 5 12:31:44 2022 +0800 crypto: api - Use linux/cache.h instead of asm/cache.h Directly including asm/cache.h leads to build failures on powerpc so replace it with linux/cache.h instead. Fixes: e634ac4a8aaa ("crypto: api - Add crypto_tfm_ctx_dma") Reported-by: Stephen Rothwell Signed-off-by: Herbert Xu include/crypto/algapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29636a5ce87bebab38c533175d72bb800a7581b8 Author: Ard Biesheuvel Date: Wed Nov 9 15:16:11 2022 +0100 efi: Put Linux specific magic number in the DOS header GRUB currently relies on the magic number in the image header of ARM and arm64 EFI kernel images to decide whether or not the image in question is a bootable kernel. However, the purpose of the magic number is to identify the image as one that implements the bare metal boot protocol, and so GRUB, which only does EFI boot, is limited unnecessarily to booting images that could potentially be booted in a non-EFI manner as well. This is problematic for the new zboot decompressor image format, as it can only boot in EFI mode, and must therefore not use the bare metal boot magic number in its header. For this reason, the strict magic number was dropped from GRUB, to permit essentially any kind of EFI executable to be booted via the 'linux' command, blurring the line between the linux loader and the chainloader. So let's use the same field in the DOS header that RISC-V and arm64 already use for their 'bare metal' magic numbers to store a 'generic Linux kernel' magic number, which can be used to identify bootable kernel images in PE format which don't necessarily implement a bare metal boot protocol in the same binary. Note that, in the context of EFI, the MS-DOS header is only described in terms of the fields that it shares with the hybrid PE/COFF image format, (i.e., the MS-DOS EXE magic number at offset #0 and the PE header offset at byte offset #0x3c). Since we aim for compatibility with EFI only, and not with MS-DOS or MS-Windows, we can use the remaining space in the MS-DOS header however we want. Let's set the generic magic number for x86 images as well: existing bootloaders already have their own methods to identify x86 Linux images that can be booted in a non-EFI manner, and having the magic number in place there will ease any future transitions in loader implementations to merge the x86 and non-x86 EFI boot paths. Note that 32-bit ARM already uses the same location in the header for a different purpose, but the ARM support is already widely implemented and the EFI zboot decompressor is not available on ARM anyway, so we just disregard it here. Acked-by: Leif Lindholm Reviewed-by: Daniel Kiper Signed-off-by: Ard Biesheuvel arch/loongarch/kernel/head.S | 3 ++- arch/x86/boot/header.S | 3 ++- drivers/firmware/efi/libstub/zboot-header.S | 3 ++- include/linux/pe.h | 7 +++++++ 4 files changed, 13 insertions(+), 3 deletions(-) commit cacd9643eca7a1f4635479aff4ec33aaade45e64 Author: Neil Armstrong Date: Tue Nov 29 15:47:06 2022 +0100 i2c: qcom-geni: add support for I2C Master Hub variant The I2C Master Hub is a stripped down version of the GENI Serial Engine QUP Wrapper Controller but only supporting I2C serial engines without DMA support. Add the I2C Master Hub serial engine compatible along the specific requirements in a new desc struct passed through the device match data. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qcom-geni.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 14d02fbadb5dc1cdf66078ef8430dd1cd22bfd53 Author: Neil Armstrong Date: Tue Nov 29 15:47:05 2022 +0100 i2c: qcom-geni: add desc struct to prepare support for I2C Master Hub variant The I2C Master Hub is a stripped down version of the GENI Serial Engine QUP Wrapper Controller but only supporting I2C serial engines without DMA support. Those I2C serial engines variants have some requirements: - a separate "core" clock - doesn't support DMA, thus no memory interconnect path - fixed FIFO size not discoverable in the HW_PARAM_0 register Add a desc struct specifying all those requirements which will be used in a next change when adding the I2C Master Hub serial engine compatible. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qcom-geni.c | 50 +++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) commit f4aba01db4801cc02d1fae4c8099984a23740996 Author: Neil Armstrong Date: Tue Nov 29 15:47:04 2022 +0100 soc: qcom: geni-se: add support for I2C Master Hub wrapper variant The I2C Master Hub is a stripped down version of the GENI Serial Engine QUP Wrapper Controller but only supporting I2C serial engines without DMA support. Add the clock list for the I2C Master Hub variant to a new desc struct then pass it through the I2C Master Hub compatible match data. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Wolfram Sang drivers/soc/qcom/qcom-geni-se.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 63fc9af83c11e02ea9c981d3bd0382e36f49916f Author: Neil Armstrong Date: Tue Nov 29 15:47:03 2022 +0100 soc: qcom: geni-se: add desc struct to specify clocks from device match data The I2C Master Hub is a stripped down version of the GENI Serial Engine QUP Wrapper Controller but only supporting I2C serial engines without DMA support. Prepare support for the I2C Master Hub variant by moving the required clocks list to a new desc struct then passing it through the compatible match data. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Wolfram Sang drivers/soc/qcom/qcom-geni-se.c | 69 ++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 14 deletions(-) commit cb29d4e6a9ef004eed24774bc26839aa9e373ba4 Author: Neil Armstrong Date: Tue Nov 29 15:47:02 2022 +0100 dt-bindings: i2c: qcom-geni: document I2C Master Hub serial I2C engine The I2C Master Hub is a stripped down version of the GENI Serial Engine QUP Wrapper Controller but only supporting I2C serial engines without DMA support. Document the I2C Serial Engine variant used within the I2C Master Hub Wrapper. This serial engine variant lacks DMA support, requires a core clock, and since DMA support is lacking the memory interconnect path isn't needed. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang .../bindings/i2c/qcom,i2c-geni-qcom.yaml | 64 ++++++++++++++++++---- 1 file changed, 54 insertions(+), 10 deletions(-) commit af45de8368883c9620a7735a8c2532e52101c1a2 Author: Neil Armstrong Date: Tue Nov 29 15:47:01 2022 +0100 dt-bindings: qcom: geni-se: document I2C Master Hub wrapper variant The I2C Master Hub is a stripped down version of the GENI Serial Engine QUP Wrapper Controller but only supporting I2C serial engines without DMA support. Document the variant compatible, forbid UART and SPI sub-nodes, and remove requirement for the Master AHB clock and iommu property. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang .../devicetree/bindings/soc/qcom/qcom,geni-se.yaml | 44 +++++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) commit 688fcd047ef0f0aeee16d0fefaff065fa69eb642 Author: Armin Wolf Date: Wed Nov 30 19:34:18 2022 +0100 hwmon: (dell-smm) Move error message to make probing silent If dell-smm-hwmon loads on unsupported hardware like the Dell XPS 17 9710, an error message is printed. This might confuse users, as drivers are expected to be silent if no supported hardware is found. Reorder the error message so its only printed when the driver is loaded with the "force" option being set. Also reword the error message slightly. Tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20221130183418.357246-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck drivers/hwmon/dell-smm-hwmon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ab0350c743d5c93fd88742f02b3dff12168ab435 Author: James Hilliard Date: Fri Dec 2 18:08:44 2022 -0700 selftests/bpf: Fix conflicts with built-in functions in bpf_iter_ksym Both tolower and toupper are built in c functions, we should not redefine them as this can result in a build error. Fixes the following errors: progs/bpf_iter_ksym.c:10:20: error: conflicting types for built-in function 'tolower'; expected 'int(int)' [-Werror=builtin-declaration-mismatch] 10 | static inline char tolower(char c) | ^~~~~~~ progs/bpf_iter_ksym.c:5:1: note: 'tolower' is declared in header '' 4 | #include +++ |+#include 5 | progs/bpf_iter_ksym.c:17:20: error: conflicting types for built-in function 'toupper'; expected 'int(int)' [-Werror=builtin-declaration-mismatch] 17 | static inline char toupper(char c) | ^~~~~~~ progs/bpf_iter_ksym.c:17:20: note: 'toupper' is declared in header '' See background on this sort of issue: https://stackoverflow.com/a/20582607 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12213 (C99, 7.1.3p1) "All identifiers with external linkage in any of the following subclauses (including the future library directions) are always reserved for use as identifiers with external linkage." This is documented behavior in GCC: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-std-2 Signed-off-by: James Hilliard Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221203010847.2191265-1-james.hilliard1@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/progs/bpf_iter_ksym.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0a182f8d607464911756b4dbef5d6cad8de22469 Author: Eric Dumazet Date: Fri Dec 2 11:16:40 2022 +0000 bpf, sockmap: fix race in sock_map_free() sock_map_free() calls release_sock(sk) without owning a reference on the socket. This can cause use-after-free as syzbot found [1] Jakub Sitnicki already took care of a similar issue in sock_hash_free() in commit 75e68e5bf2c7 ("bpf, sockhash: Synchronize delete from bucket list on map free") [1] refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 0 PID: 3785 at lib/refcount.c:31 refcount_warn_saturate+0x17c/0x1a0 lib/refcount.c:31 Modules linked in: CPU: 0 PID: 3785 Comm: kworker/u4:6 Not tainted 6.1.0-rc7-syzkaller-00103-gef4d3ea40565 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: events_unbound bpf_map_free_deferred RIP: 0010:refcount_warn_saturate+0x17c/0x1a0 lib/refcount.c:31 Code: 68 8b 31 c0 e8 75 71 15 fd 0f 0b e9 64 ff ff ff e8 d9 6e 4e fd c6 05 62 9c 3d 0a 01 48 c7 c7 80 bb 68 8b 31 c0 e8 54 71 15 fd <0f> 0b e9 43 ff ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c a2 fe ff RSP: 0018:ffffc9000456fb60 EFLAGS: 00010246 RAX: eae59bab72dcd700 RBX: 0000000000000004 RCX: ffff8880207057c0 RDX: 0000000000000000 RSI: 0000000000000201 RDI: 0000000000000000 RBP: 0000000000000004 R08: ffffffff816fdabd R09: fffff520008adee5 R10: fffff520008adee5 R11: 1ffff920008adee4 R12: 0000000000000004 R13: dffffc0000000000 R14: ffff88807b1c6c00 R15: 1ffff1100f638dcf FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30c30000 CR3: 000000000d08e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __refcount_dec include/linux/refcount.h:344 [inline] refcount_dec include/linux/refcount.h:359 [inline] __sock_put include/net/sock.h:779 [inline] tcp_release_cb+0x2d0/0x360 net/ipv4/tcp_output.c:1092 release_sock+0xaf/0x1c0 net/core/sock.c:3468 sock_map_free+0x219/0x2c0 net/core/sock_map.c:356 process_one_work+0x81c/0xd10 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 Fixes: 7e81a3530206 ("bpf: Sockmap, ensure sock lock held during tear down") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Jakub Sitnicki Cc: John Fastabend Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Song Liu Acked-by: John Fastabend Link: https://lore.kernel.org/r/20221202111640.2745533-1-edumazet@google.com Signed-off-by: Alexei Starovoitov net/core/sock_map.c | 2 ++ 1 file changed, 2 insertions(+) commit 578ce69ffda49d6c1a252490553290d1f27199f0 Author: Toke Høiland-Jørgensen Date: Thu Dec 1 13:39:39 2022 +0100 bpf: Add dummy type reference to nf_conn___init to fix type deduplication The bpf_ct_set_nat_info() kfunc is defined in the nf_nat.ko module, and takes as a parameter the nf_conn___init struct, which is allocated through the bpf_xdp_ct_alloc() helper defined in the nf_conntrack.ko module. However, because kernel modules can't deduplicate BTF types between each other, and the nf_conn___init struct is not referenced anywhere in vmlinux BTF, this leads to two distinct BTF IDs for the same type (one in each module). This confuses the verifier, as described here: https://lore.kernel.org/all/87leoh372s.fsf@toke.dk/ As a workaround, add an explicit BTF_TYPE_EMIT for the type in net/filter.c, so the type definition gets included in vmlinux BTF. This way, both modules can refer to the same type ID (as they both build on top of vmlinux BTF), and the verifier is no longer confused. v2: - Use BTF_TYPE_EMIT (which is a statement so it has to be inside a function definition; use xdp_func_proto() for this, since this is mostly xdp-related). Fixes: 820dc0523e05 ("net: netfilter: move bpf_ct_set_nat_info kfunc in nf_nat_bpf.c") Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20221201123939.696558-1-toke@redhat.com Signed-off-by: Alexei Starovoitov net/core/filter.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 41d76c721c5c743470078d30e9bb8df08c489b1c Author: Yonghong Song Date: Wed Nov 30 21:04:49 2022 -0800 bpf: Add sleepable prog tests for cgrp local storage Add three tests for cgrp local storage support for sleepable progs. Two tests can load and run properly, one for cgroup_iter, another for passing current->cgroups->dfl_cgrp to bpf_cgrp_storage_get() helper. One test has bpf_rcu_read_lock() and failed to load. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221201050449.2785613-1-yhs@fb.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/prog_tests/cgrp_local_storage.c | 94 ++++++++++++++++++++++ .../selftests/bpf/progs/cgrp_ls_sleepable.c | 80 ++++++++++++++++++ 2 files changed, 174 insertions(+) commit 2c40d97da1a25be815c91d6ebcd734d96d5732e8 Author: Yonghong Song Date: Wed Nov 30 21:04:44 2022 -0800 bpf: Enable sleeptable support for cgrp local storage Similar to sk/inode/task local storage, enable sleepable support for cgrp local storage. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221201050444.2785007-1-yhs@fb.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4e6104b1e70020ad500f0fab7238898dd2ea2a38 Author: ye xingchen Date: Thu Dec 1 11:30:31 2022 +0800 hwmon: 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/202212011130317080061@zte.com.cn Signed-off-by: Guenter Roeck drivers/hwmon/ds1621.c | 2 +- drivers/hwmon/lm73.c | 6 +++--- drivers/hwmon/sht3x.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) commit 0cd3ba682ae27cbe17c41f85b8e6db6da38296b2 Author: Joaquín Ignacio Aramendía Date: Mon Nov 28 15:52:06 2022 -0300 hwmon: (oxp-sensors) Fix pwm reading PWM reading is only 1 register long. Signed-off-by: Joaquín Ignacio Aramendía Link: https://lore.kernel.org/r/20221128185206.212022-1-samsagax@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/oxp-sensors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ff838f2877dcd5ec7db0745a2652a048a697991 Author: Aleksa Savic Date: Sat Nov 26 08:13:13 2022 +0100 hwmon: (aquacomputer_d5next) Add support for Quadro flow sensor pulses Add support for reading and writing flow sensor pulses value on the Aquacomputer Quadro. Implemented by Leonard Anderweit [1]. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/45 Originally-from: Leonard Anderweit Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20221126071313.34356-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck Documentation/hwmon/aquacomputer_d5next.rst | 3 +- drivers/hwmon/aquacomputer_d5next.c | 66 +++++++++++++++++++++++------ 2 files changed, 55 insertions(+), 14 deletions(-) commit c05f477c4ba36e007c03ff4f834f43bc4e37692b Author: Patrick Rudolph Date: Thu Nov 24 20:36:42 2022 +0100 hwmon: (pmbus/core) Implement regulator get_status Add get_status for pmbus_regulator_ops. Signed-off-by: Patrick Rudolph Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20221124193642.4081054-1-Naresh.Solanki@9elements.com Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus_core.c | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 3ca0f12a02582c3dd4029294ab0245ba77c27a77 Author: Joaquín Ignacio Aramendía Date: Fri Nov 25 08:49:01 2022 -0300 hwmon: (oxp-sensors) Add AOK ZOE and Mini PRO Add support for the AOK ZOE A1 and OXP Mini PRO handheld devices. DMI strings are added to this driver since the same EC layout is used and has similar specs as the OXP mini AMD. The added devices are: - OneXPlayer mini PRO (AMD 6800U) - AOK ZOE A1 (AMD 6800U) Signed-off-by: Joaquín Ignacio Aramendía Link: https://lore.kernel.org/r/20221125114901.11309-1-samsagax@gmail.com Signed-off-by: Guenter Roeck Documentation/hwmon/oxp-sensors.rst | 16 ++++++++++++--- drivers/hwmon/oxp-sensors.c | 40 +++++++++++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 9 deletions(-) commit 59882c7f6714141300882af3d39ca6ffecf54ec2 Author: Christophe JAILLET Date: Sun Nov 20 10:34:41 2022 +0100 hwmon: (gsc-hwmon) Switch to flexible array to simplify code Using flexible array is more straight forward. It - saves 1 pointer in the 'gsc_hwmon_platform_data' structure - saves an indirection when using this array - saves some LoC and avoids some always spurious pointer arithmetic Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/61a23e1d642397cfcecc4ac3bb0ab485d257987d.1668936855.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck drivers/hwmon/gsc-hwmon.c | 6 ++---- include/linux/platform_data/gsc_hwmon.h | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) commit ef9948dfe1056a89f699edc8eb691a8ed99eda5e Author: Patrick Rudolph Date: Thu Nov 17 19:40:22 2022 +0100 hwmon: (pmbus) Add power good support Update error flags with regulation out if regulator is on & power good status bit is set Signed-off-by: Patrick Rudolph Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20221117184022.1808508-1-Naresh.Solanki@9elements.com Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus_core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1864069c695d475e0ce98a335c62274b81be57b4 Author: Denis Pauk Date: Mon Nov 14 23:44:56 2022 +0200 hwmon: (nct6775) add ASUS CROSSHAIR VIII/TUF/ProArt B550M Boards such as * ProArt B550-CREATOR * ProArt Z490-CREATOR 10G * ROG CROSSHAIR VIII EXTREME * ROG CROSSHAIR VIII HERO (WI-FI) * TUF GAMING B550M-E * TUF GAMING B550M-E (WI-FI) * TUF GAMING B550M-PLUS WIFI II have got a nct6775 chip, but by default there's no use of it because of resource conflict with WMI method. This commit adds such boards to the WMI monitoring list. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk Reported-by: yutesdb Tested-by: yutesdb Link: https://lore.kernel.org/r/20221114214456.3891-1-pauk.denis@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/nct6775-platform.c | 7 +++++++ 1 file changed, 7 insertions(+) commit fae30e3c203e0f854d0420b50e54e31a75b6a8a4 Author: Zhang Rui Date: Sun Nov 13 23:31:45 2022 +0800 hwmon: (coretemp) Add support for dynamic ttarget 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. As a result, the ttarget value also becomes dyamic. Improve the code to always get updated ttarget value. Signed-off-by: Zhang Rui Link: https://lore.kernel.org/r/20221113153145.32696-4-rui.zhang@intel.com Signed-off-by: Guenter Roeck drivers/hwmon/coretemp.c | 57 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 16 deletions(-) commit c0c67f8761cec1fe36c21d85b1a5400ea7ac30cd Author: Zhang Rui Date: Sun Nov 13 23:31:44 2022 +0800 hwmon: (coretemp) Add support for 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. Improve the code to always use updated tjmax when it can be retrieved from MSR_IA32_TEMPERATURE_TARGET. When tjmax can not be retrieved from MSR_IA32_TEMPERATURE_TARGET, still follow the previous logic and always use a static tjmax value. Signed-off-by: Zhang Rui Link: https://lore.kernel.org/r/20221113153145.32696-3-rui.zhang@intel.com Signed-off-by: Guenter Roeck drivers/hwmon/coretemp.c | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) commit 2bc0e6d07ee50497043112d677fdd34327cf025c Author: Zhang Rui Date: Sun Nov 13 23:31:43 2022 +0800 hwmon: (coretemp) rearrange tjmax handing code Rearrange the tjmax handling code so that it can be used directly in the sysfs attribute callbacks without forward declarations. No functional change in this patch. Signed-off-by: Zhang Rui Link: https://lore.kernel.org/r/20221113153145.32696-2-rui.zhang@intel.com Signed-off-by: Guenter Roeck drivers/hwmon/coretemp.c | 156 +++++++++++++++++++++++------------------------ 1 file changed, 78 insertions(+), 78 deletions(-) commit 07619140e2a12484ea262b8845fd09e099f843a8 Author: Christophe JAILLET Date: Sun Nov 13 10:13:16 2022 +0100 hwmon: Remove some useless #include is not needed for these drivers. Remove the corresponding #include. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/41610f64a69bd0245ebc811fcff10ee54e93ac46.1668330765.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck drivers/hwmon/vt8231.c | 1 - drivers/hwmon/w83l786ng.c | 1 - 2 files changed, 2 deletions(-) commit 5c0e64dde80ffe78d930db4e38e6218598aecd85 Author: Zhang Rui Date: Tue Nov 8 15:50:49 2022 +0800 hwmon: (coretemp) Remove obsolete temp_data->valid Checking for the valid bit of IA32_THERM_STATUS is removed in commit bf6ea084ebb5 ("hwmon: (coretemp) Do not return -EAGAIN for low temperatures"), and temp_data->valid is set and never cleared when the temperature has been read once. Remove the obsolete temp_data->valid field. Signed-off-by: Zhang Rui Link: https://lore.kernel.org/r/20221108075051.5139-2-rui.zhang@intel.com Signed-off-by: Guenter Roeck drivers/hwmon/coretemp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ed264e8a7d18c5fec2587ed750c87b75d5348210 Author: Joaquín Ignacio Aramendía Date: Fri Nov 4 11:07:00 2022 -0300 hwmon: add OneXPlayer mini AMD sensors driver Sensors driver for OXP Handhelds from One-Netbook that expose fan reading and control via hwmon sysfs. As far as I could gather all OXP boards have the same DMI strings and they can be told appart only by the boot cpu vendor (Intel/AMD). Currently only AMD boards are supported since Intel have different EC registers and values to read/write. Fan control is provided via pwm interface in the range [0-255]. AMD boards have [0-100] as range in the EC, the written value is scaled to accommodate for that. Signed-off-by: Joaquín Ignacio Aramendía Link: https://lore.kernel.org/r/20221104140659.593608-1-samsagax@gmail.com [groeck: Removed misleading comment about module_platform_driver()] Signed-off-by: Guenter Roeck Documentation/hwmon/index.rst | 1 + Documentation/hwmon/oxp-sensors.rst | 34 +++++ MAINTAINERS | 6 + drivers/hwmon/Kconfig | 11 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/oxp-sensors.c | 256 ++++++++++++++++++++++++++++++++++++ 6 files changed, 309 insertions(+) commit d5d896b838222fcd037c91c9e0e8f6ab719db05f Author: Aleksa Savic Date: Mon Nov 7 15:24:55 2022 +0100 hwmon: (aquacomputer_d5next) Clear up macros and comments Reorganize macro definitions into sections for each supported device, with additional comments on their purpose. This should make it easier to follow what report each offset is coming from. Also, reformat per-device initializations in aqc_probe() to organize them into sections (fan info, temp sensors, other parameters and lastly labels). No functional changes. Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20221107142455.655998-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/aquacomputer_d5next.c | 97 ++++++++++++++++++++++++------------- 1 file changed, 63 insertions(+), 34 deletions(-) commit a1bedbcc1cf7c3d2b6b75156a6f90cadcb5e4809 Author: Frank Crawford Date: Sun Nov 6 10:25:32 2022 +1100 hwmon: (it87) Add DMI table for future extensions Add in DMI matching table to match various board quirks and settings. This will be useful for future extentions, but will start with the existing definition of the Shuttle SN68PT. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20221105232531.1619387-1-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 72 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 19 deletions(-) commit 25f986887dd54a93edcc5cb499b2e42f4d9c359c Author: Christophe JAILLET Date: Sun Nov 6 20:34:16 2022 +0100 hwmon: Include when appropriate The kstrto() functions have been moved from kernel.h to kstrtox.h. So, include the latter directly in the appropriate files. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/51688cf50bda44e2731381a31287c62319388783.1667763218.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck drivers/hwmon/atxp1.c | 1 + drivers/hwmon/gpio-fan.c | 1 + drivers/hwmon/hwmon.c | 1 + drivers/hwmon/lm90.c | 1 + drivers/hwmon/mr75203.c | 1 + drivers/hwmon/pcf8591.c | 1 + drivers/hwmon/pmbus/q54sj108a2.c | 1 + include/linux/hwmon-sysfs.h | 1 + 8 files changed, 8 insertions(+) commit c1cb98c55f470447479298aaec7f92219562613e Author: Quan Nguyen Date: Wed Nov 2 13:21:03 2022 +0700 docs: hwmon: (smpro-hwmon) Improve grammar and formatting Improve documentation grammar and formatting for the Ampere(R)'s Altra(R) SMpro hwmon driver. Thanks Bagas for the changes in the link below. Link: https://lore.kernel.org/lkml/Y1aHiaZ1OpHZIzS9@google.com/T/#mfea2167b99384486a1b75d9304536015116c1821 Signed-off-by: Quan Nguyen Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20221102062103.3135417-1-quan@os.amperecomputing.com Signed-off-by: Guenter Roeck Documentation/hwmon/smpro-hwmon.rst | 111 ++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 55 deletions(-) commit 78d448a3725584b7c46d3d881035943f759135fd Author: Martin Blumenstingl Date: Mon Oct 31 22:51:40 2022 +0100 hwmon: (jc42) Consistently use bit and bitfield macros in the driver Use BIT() and GENMASK() macros for defining the bitfields inside the registers. Also use FIELD_GET() and FIELD_PREP() where appropriate. This makes the coding style within the driver consistent. No functional changes intended. Signed-off-by: Martin Blumenstingl Signed-off-by: Guenter Roeck drivers/hwmon/jc42.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit daec55ce62ad0bb6948c8edf84e7ec3b95720177 Author: Felix Nieuwenhuizen Date: Thu Oct 27 16:51:35 2022 +0200 hwmon: (pmbus/ltc2978) add support for LTC7132 Add support for LTC7132. The relevant registers in the LTC7132 are identical to the LTC7880. So it's just a matter of adding the chip id. Signed-off-by: Felix Nieuwenhuizen Link: https://lore.kernel.org/r/20221027145135.31802-1-Felix.Nieuwenhuizen@etas.com Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/ltc2978.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 9e913888647be447c3d114042428f02d24676390 Author: Nathan Chancellor Date: Thu Oct 27 16:16:12 2022 -0700 hwmon: (smpro-hwmon) Improve switch statments in smpro_is_visible() Clang warns: drivers/hwmon/smpro-hwmon.c:378:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] default: ^ drivers/hwmon/smpro-hwmon.c:378:2: note: insert 'break;' to avoid fall-through default: ^ break; 1 error generated. Clang is a little more pedantic than GCC, which does not warn when falling through to a case that is just break or return. Clang's version is more in line with the kernel's own stance in deprecated.rst, which states that all switch/case blocks must end in either break, fallthrough, continue, goto, or return. Add the missing break to silence the warning. Additionally, adjust the indentation of a break and add a default case to the inner switch statement. Fixes: a87456864cbb ("hwmon: Add Ampere's Altra smpro-hwmon driver") Link: https://github.com/ClangBuiltLinux/linux/issues/1751 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20221027231611.3824800-1-nathan@kernel.org Signed-off-by: Guenter Roeck drivers/hwmon/smpro-hwmon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b744db17abf6a2efc2bfa80870cc88e9799a8ccc Author: Yang Yingliang Date: Thu Oct 27 14:29:31 2022 +0800 hwmon: (jc42) Fix missing unlock on error in jc42_write() Add the missing unlock before return from function jc42_write() in the error handling case. Fixes: 37dedaee8bc6 ("hwmon: (jc42) Convert register access and caching to regmap/regcache") Signed-off-by: Yang Yingliang Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221027062931.598247-1-yangyingliang@huawei.com Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Guenter Roeck drivers/hwmon/jc42.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 084ed144c448fd5bc8ed5a58247153fbbfd115c3 Author: Martin Blumenstingl Date: Sun Oct 23 23:31:57 2022 +0200 hwmon: (jc42) Restore the min/max/critical temperatures on resume The JC42 compatible thermal sensor on Kingston KSM32ES8/16ME DIMMs (using Micron E-Die) is an ST Microelectronics STTS2004 (manufacturer 0x104a, device 0x2201). It does not keep the previously programmed minimum, maximum and critical temperatures after system suspend and resume (which is a shutdown / startup cycle for the JC42 temperature sensor). This results in an alarm on system resume because the hardware default for these values is 0°C (so any environment temperature greater than 0°C will trigger the alarm). Example before system suspend: jc42-i2c-0-1a Adapter: SMBus PIIX4 adapter port 0 at 0b00 temp1: +34.8°C (low = +0.0°C) (high = +85.0°C, hyst = +85.0°C) (crit = +95.0°C, hyst = +95.0°C) Example after system resume (without this change): jc42-i2c-0-1a Adapter: SMBus PIIX4 adapter port 0 at 0b00 temp1: +34.8°C (low = +0.0°C) ALARM (HIGH, CRIT) (high = +0.0°C, hyst = +0.0°C) (crit = +0.0°C, hyst = +0.0°C) Apply the cached values from the JC42_REG_TEMP_UPPER, JC42_REG_TEMP_LOWER, JC42_REG_TEMP_CRITICAL and JC42_REG_SMBUS (where the SMBUS register is not related to this issue but a side-effect of using regcache_sync() during system resume with the previously cached/programmed values. This fixes the alarm due to the hardware defaults of 0°C because the previously applied limits (set by userspace) are re-applied on system resume. Fixes: 175c490c9e7f ("hwmon: (jc42) Add support for STTS2004 and AT30TSE004") Reviewed-by: Guenter Roeck Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221023213157.11078-3-martin.blumenstingl@googlemail.com Signed-off-by: Guenter Roeck drivers/hwmon/jc42.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8f2fa4726faf01094d7a5be7bd0c120c565f54d9 Author: Martin Blumenstingl Date: Sun Oct 23 23:31:56 2022 +0200 hwmon: (jc42) Convert register access and caching to regmap/regcache Switch the jc42 driver to use an I2C regmap to access the registers. Also move over to regmap's built-in caching instead of adding a custom caching implementation. This works for JC42_REG_TEMP_UPPER, JC42_REG_TEMP_LOWER and JC42_REG_TEMP_CRITICAL as these values never change except when explicitly written. The cache For JC42_REG_TEMP is dropped (regmap can't cache it because it's volatile, meaning it can change at any time) as well for simplicity and consistency with other drivers. Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221023213157.11078-2-martin.blumenstingl@googlemail.com Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 1 + drivers/hwmon/jc42.c | 233 ++++++++++++++++++++++++++++---------------------- 2 files changed, 132 insertions(+), 102 deletions(-) commit 662d20b3a5afee888e805c5326ccdb7ebbd23012 Author: Aleksa Savic Date: Mon Oct 24 17:10:39 2022 +0200 hwmon: (aquacomputer_d5next) Add support for temperature sensor offsets Add support for reading and writing temperature sensor offsets on the Aquacomputer D5 Next, Farbwerk 360, Octo and Quadro, for which the needed offsets are known. Implemented by Leonard Anderweit [1]. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/22 Originally-from: Leonard Anderweit Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20221024151039.7222-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck Documentation/hwmon/aquacomputer_d5next.rst | 1 + drivers/hwmon/aquacomputer_d5next.c | 88 ++++++++++++++++++++++++----- 2 files changed, 75 insertions(+), 14 deletions(-) commit 6d270868cd529c39ac746e9ae3522c43f2764aca Author: Jeremy Kerr Date: Mon Oct 24 16:15:27 2022 +0800 hwmon: (occ) OCC sensors aren't arch-specific Commit c112d75840fb ("hwmon: OCC drivers are ARM-only") made the OCC sensor drivers not selectable on powerpc64: These drivers are for a BMC inside PowerPC servers. The BMC runs on ARM hardware, so only propose the drivers on this architecture, unless build-testing. ... but we now have a powerpc64 BMC (still for a powerpc64 host), so drop the `depends on` that excludes building for this platform. Signed-off-by: Jeremy Kerr Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20221024081527.3842565-1-jk@codeconstruct.com.au Signed-off-by: Guenter Roeck drivers/hwmon/occ/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit 694144b215fc077087d68dfc3d1ef7dae9fec387 Author: Quan Nguyen Date: Thu Sep 29 16:43:14 2022 +0700 docs: hwmon: (smpro-hwmon) Add documentation Add documentation for the Ampere(R)'s Altra(R) SMpro hwmon driver. Signed-off-by: Thu Nguyen Signed-off-by: Quan Nguyen Link: https://lore.kernel.org/r/20220929094321.770125-3-quan@os.amperecomputing.com Signed-off-by: Guenter Roeck Documentation/hwmon/index.rst | 1 + Documentation/hwmon/smpro-hwmon.rst | 101 ++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) commit 7bce898147000718084c842e150519319dc202c6 Author: Quan Nguyen Date: Thu Sep 29 16:43:13 2022 +0700 hwmon: Add Ampere's Altra smpro-hwmon driver This commit adds support for Ampere SMpro hwmon driver. This driver supports accessing various CPU sensors provided by the SMpro co-processor including temperature, power, voltages, and current. Signed-off-by: Quan Nguyen Link: https://lore.kernel.org/r/20220929094321.770125-2-quan@os.amperecomputing.com Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 8 + drivers/hwmon/Makefile | 1 + drivers/hwmon/smpro-hwmon.c | 463 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 472 insertions(+) commit bba63de0c7a7e69584266872cb278cf12fe9ae83 Author: Matti Vaittinen Date: Fri Oct 21 16:19:04 2022 +0300 hwmon: (adm1177) simplify using devm_regulator_get_enable() Drop open-coded pattern: 'devm_regulator_get(), regulator_enable(), add_action_or_reset(regulator_disable)' and use the devm_regulator_get_enable() and drop the pointer to the regulator. This simplifies code and makes it less tempting to add manual control for the regulator which is also controlled by devm. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/7773541795f280db31dd981ffc21df8a630b794a.1666357434.git.mazziesaccount@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/adm1177.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) commit ad804a4d82fc7ececb457c06c8ba8b3a9d0e3bfd Author: Matti Vaittinen Date: Fri Oct 21 16:18:43 2022 +0300 hwmon: (lm90) simplify using devm_regulator_get_enable() Drop open-coded pattern: 'devm_regulator_get(), regulator_enable(), add_action_or_reset(regulator_disable)' and use the devm_regulator_get_enable(). Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/a1fa4364cbb775de25478117dd22dda0742089e3.1666357434.git.mazziesaccount@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) commit deeab9ea40dbaabdf0e2828b5c3da3418ae7dd39 Author: Stephen Kitt Date: Tue Oct 11 16:33:08 2022 +0200 hwmon: use simple i2c probe All these drivers have an i2c probe function which doesn't use the "struct i2c_device_id *id" parameter, so they can trivially be converted to the "probe_new" style of probe with a single argument. This is part of an ongoing transition to single-argument i2c probe functions. Old-style probe functions involve a call to i2c_match_id: in drivers/i2c/i2c-core-base.c, /* * When there are no more users of probe(), * rename probe_new to probe. */ if (driver->probe_new) status = driver->probe_new(client); else if (driver->probe) status = driver->probe(client, i2c_match_id(driver->id_table, client)); else status = -EINVAL; Drivers which don't need the second parameter can be declared using probe_new instead, avoiding the call to i2c_match_id. Drivers which do can still be converted to probe_new-style, calling i2c_match_id themselves (as is done currently for of_match_id). This change was done using the following Coccinelle script, and fixed up for whitespace changes: @ rule1 @ identifier fn; identifier client, id; @@ - static int fn(struct i2c_client *client, const struct i2c_device_id *id) + static int fn(struct i2c_client *client) { ...when != id } @ rule2 depends on rule1 @ identifier rule1.fn; identifier driver; @@ struct i2c_driver driver = { - .probe + .probe_new = ( fn | - &fn + fn ) , }; Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20221011143309.3141267-1-steve@sk2.org Signed-off-by: Guenter Roeck drivers/hwmon/aht10.c | 5 ++--- drivers/hwmon/emc2305.c | 4 ++-- drivers/hwmon/ltc2992.c | 4 ++-- drivers/hwmon/max127.c | 5 ++--- drivers/hwmon/sbrmi.c | 5 ++--- drivers/hwmon/sbtsi_temp.c | 5 ++--- drivers/hwmon/sht4x.c | 5 ++--- 7 files changed, 14 insertions(+), 19 deletions(-) commit b3b19931a5c22f5a09f846e037b23f8a74455d0a Author: Ahmad Khalifa Date: Tue Oct 4 22:01:03 2022 +0100 hwmon: (it87) Check for a valid chip before using force_id Check there is a chip before using force_id parameter as there is no value in registering a non-existent chip Signed-off-by: Ahmad Khalifa Link: https://lore.kernel.org/r/20221004210100.540120-3-ahmad@khalifa.ws Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 12c44ab8b401c29d8d3569aaea34da662b8ece1d Author: Ahmad Khalifa Date: Tue Oct 4 22:01:01 2022 +0100 hwmon: (it87) Add param to ignore ACPI resource conflicts Add parameter to ignore ACPI resource conflicts as an alternate to using 'acpi_enforce_resources=lax'. Some BIOSes reserve resources and don't use them and the system wide parameter may result in failures to certain drivers. Signed-off-by: Ahmad Khalifa Link: https://lore.kernel.org/r/20221004210100.540120-2-ahmad@khalifa.ws Signed-off-by: Guenter Roeck drivers/hwmon/it87.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 415519ad6966ce35f2535fc3ff95549414beb032 Author: Colin Ian King Date: Wed Oct 5 16:27:52 2022 +0100 hwmon: (fschmd) Make const arrays static const Don't populate the read-only const arrays names and watchdog_minors on the stack but instead make them static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221005152752.318493-1-colin.i.king@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/fschmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8972e18a439d6c47e838b600d71ff0a4f102f0e0 Author: Sreevani Sreejith Date: Fri Dec 2 14:17:10 2022 -0800 bpf, docs: BPF Iterator Document Document that describes how BPF iterators work, how to use iterators, and how to pass parameters in BPF iterators. Acked-by: David Vernet Signed-off-by: Sreevani Sreejith Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221202221710.320810-2-ssreevani@meta.com Signed-off-by: Alexei Starovoitov Documentation/bpf/bpf_iterators.rst | 485 ++++++++++++++++++++++++++++++++++++ Documentation/bpf/index.rst | 1 + 2 files changed, 486 insertions(+) commit af5d74e32eb8e1b833f687047f0ffe3801d7229d Author: Xu Panda Date: Sat Dec 3 14:10:56 2022 +0800 m68k: use strscpy() to instead of strncpy() The implementation of strscpy() is more robust and safer. Signed-off-by: Xu Panda Signed-off-by: Yang Yang Signed-off-by: Greg Ungerer arch/m68k/kernel/setup_no.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c0c852dd1876dc1db4600ce951a92aadd3073b1c Author: Yonghong Song Date: Sat Dec 3 12:49:54 2022 -0800 bpf: Do not mark certain LSM hook arguments as trusted Martin mentioned that the verifier cannot assume arguments from LSM hook sk_alloc_security being trusted since after the hook is called, the sk ref_count is set to 1. This will overwrite the ref_count changed by the bpf program and may cause ref_count underflow later on. I then further checked some other hooks. For example, for bpf_lsm_file_alloc() hook in fs/file_table.c, f->f_cred = get_cred(cred); error = security_file_alloc(f); if (unlikely(error)) { file_free_rcu(&f->f_rcuhead); return ERR_PTR(error); } atomic_long_set(&f->f_count, 1); The input parameter 'f' to security_file_alloc() cannot be trusted as well. Specifically, I investiaged bpf_map/bpf_prog/file/sk/task alloc/free lsm hooks. Except bpf_map_alloc and task_alloc, arguments for all other hooks should not be considered as trusted. This may not be a complete list, but it covers common usage for sk and task. Fixes: 3f00c5239344 ("bpf: Allow trusted pointers to be passed to KF_TRUSTED_ARGS kfuncs") Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221203204954.2043348-1-yhs@fb.com Signed-off-by: Alexei Starovoitov include/linux/bpf_lsm.h | 6 ++++++ kernel/bpf/bpf_lsm.c | 16 ++++++++++++++++ kernel/bpf/btf.c | 2 ++ tools/testing/selftests/bpf/prog_tests/task_kfunc.c | 1 + tools/testing/selftests/bpf/progs/task_kfunc_failure.c | 11 +++++++++++ 5 files changed, 36 insertions(+) commit 1910676cc1ec29fad850448ead0fffdb93fb74b5 Merge: 706819495921 f53625649888 Author: Alexei Starovoitov Date: Sun Dec 4 12:52:40 2022 -0800 Merge branch 'bpf: Handle MEM_RCU type properly' Yonghong Song says: ==================== Patch set [1] added rcu support for bpf programs. In [1], a rcu pointer is considered to be trusted and not null. This is actually not true in some cases. The rcu pointer could be null, and for non-null rcu pointer, it may have reference count of 0. This small patch set fixed this problem. Patch 1 is the kernel fix. Patch 2 adjusted selftests properly. Patch 3 added documentation for newly-introduced KF_RCU flag. [1] https://lore.kernel.org/all/20221124053201.2372298-1-yhs@fb.com/ Changelogs: v1 -> v2: - rcu ptr could be NULL. - non_null_rcu_ptr->rcu_field can be marked as MEM_RCU as well. - Adjust the code to avoid existing error message change. ==================== Signed-off-by: Alexei Starovoitov commit f53625649888c6ec9eeca151f802e905482c6698 Author: Yonghong Song Date: Sat Dec 3 10:46:13 2022 -0800 docs/bpf: Add KF_RCU documentation Add proper KF_RCU documentation in kfuncs.rst. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221203184613.478967-1-yhs@fb.com Signed-off-by: Alexei Starovoitov Documentation/bpf/kfuncs.rst | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8723ec22a31db3f400fce440c235ada0fff95657 Author: Yonghong Song Date: Sat Dec 3 10:46:07 2022 -0800 selftests/bpf: Fix rcu_read_lock test with new MEM_RCU semantics Add MEM_RCU pointer null checking for related tests. Also modified task_acquire test so it takes a rcu ptr 'ptr' where 'ptr = rcu_ptr->rcu_field'. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221203184607.478314-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/progs/rcu_read_lock.c | 55 ++++++++++++++++++----- 1 file changed, 45 insertions(+), 10 deletions(-) commit fca1aa75518c03b04c3c249e9a9134faf9ca18c5 Author: Yonghong Song Date: Sat Dec 3 10:46:02 2022 -0800 bpf: Handle MEM_RCU type properly Commit 9bb00b2895cb ("bpf: Add kfunc bpf_rcu_read_lock/unlock()") introduced MEM_RCU and bpf_rcu_read_lock/unlock() support. In that commit, a rcu pointer is tagged with both MEM_RCU and PTR_TRUSTED so that it can be passed into kfuncs or helpers as an argument. Martin raised a good question in [1] such that the rcu pointer, although being able to accessing the object, might have reference count of 0. This might cause a problem if the rcu pointer is passed to a kfunc which expects trusted arguments where ref count should be greater than 0. This patch makes the following changes related to MEM_RCU pointer: - MEM_RCU pointer might be NULL (PTR_MAYBE_NULL). - Introduce KF_RCU so MEM_RCU ptr can be acquired with a KF_RCU tagged kfunc which assumes ref count of rcu ptr could be zero. - For mem access 'b = ptr->a', say 'ptr' is a MEM_RCU ptr, and 'a' is tagged with __rcu as well. Let us mark 'b' as MEM_RCU | PTR_MAYBE_NULL. [1] https://lore.kernel.org/bpf/ac70f574-4023-664e-b711-e0d3b18117fd@linux.dev/ Fixes: 9bb00b2895cb ("bpf: Add kfunc bpf_rcu_read_lock/unlock()") Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221203184602.477272-1-yhs@fb.com Signed-off-by: Alexei Starovoitov include/linux/bpf_verifier.h | 2 +- include/linux/btf.h | 1 + kernel/bpf/helpers.c | 14 ++++++++++++++ kernel/bpf/verifier.c | 45 +++++++++++++++++++++++++++++++------------- 4 files changed, 48 insertions(+), 14 deletions(-) commit 1f5619ed881081be300db61da552ffae7163bb72 Author: Yang Li Date: Fri Dec 2 13:30:51 2022 -0800 xfs: Remove duplicated include in xfs_iomap.c ./fs/xfs/xfs_iomap.c: xfs_error.h is included more than once. ./fs/xfs/xfs_iomap.c: xfs_errortag.h is included more than once. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3337 Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_iomap.c | 2 -- 1 file changed, 2 deletions(-) commit f19a2caaab073873f673a41ce366ac898f34f543 Merge: 969357ec94e6 a04f1c81316d Author: Mark Brown Date: Sun Dec 4 17:01:50 2022 +0000 ASoC/tda998x: Fix reporting of nonexistent capture streams Merge series from Mark Brown : The recently added pcm-test selftest has pointed out that systems with the tda998x driver end up advertising that they support capture when in reality as far as I can see the tda998x devices are transmit only. The DAIs registered through hdmi-codec are bidirectional, meaning that for I2S systems when combined with a typical bidrectional CPU DAI the overall capability of the PCM is bidirectional. In most cases the I2S links will clock OK but no useful audio will be returned which isn't so bad but we should still not advertise the useless capability, and some systems may notice problems for example due to pinmux management. This is happening due to the hdmi-codec helpers not providing any mechanism for indicating unidirectional audio so add one and use it in the tda998x driver. It is likely other hdmi-codec users are also affected but I don't have those systems to hand. Mark Brown (2): ASoC: hdmi-codec: Allow playback and capture to be disabled drm: tda99x: Don't advertise non-existent capture support drivers/gpu/drm/i2c/tda998x_drv.c | 2 ++ include/sound/hdmi-codec.h | 4 ++++ sound/soc/codecs/hdmi-codec.c | 30 +++++++++++++++++++++++++----- 3 files changed, 31 insertions(+), 5 deletions(-) base-commit: f0c4d9fc9cc9462659728d168387191387e903cc -- 2.30.2 commit b1476451488b32ce594c495122b96fd88489dc7d Merge: 85d6ce58e493 f8ace2e304c5 Author: Jens Axboe Date: Sun Dec 4 08:54:19 2022 -0700 Merge tag 'floppy-for-6.2' of https://github.com/evdenis/linux-floppy into for-6.2/block Pull floppy fix from Denis: "Floppy patch for 6.2 The patch from Yuan Can fixes a memory leak in floppy init code. Signed-off-by: Denis Efremov " * tag 'floppy-for-6.2' of https://github.com/evdenis/linux-floppy: floppy: Fix memory leak in do_floppy_init() commit f8ace2e304c5dd8a7328db9cd2b8a4b1b98d83ec Author: Yuan Can Date: Mon Oct 31 12:04:43 2022 +0000 floppy: Fix memory leak in do_floppy_init() A memory leak was reported when floppy_alloc_disk() failed in do_floppy_init(). unreferenced object 0xffff888115ed25a0 (size 8): comm "modprobe", pid 727, jiffies 4295051278 (age 25.529s) hex dump (first 8 bytes): 00 ac 67 5b 81 88 ff ff ..g[.... backtrace: [<000000007f457abb>] __kmalloc_node+0x4c/0xc0 [<00000000a87bfa9e>] blk_mq_realloc_tag_set_tags.part.0+0x6f/0x180 [<000000006f02e8b1>] blk_mq_alloc_tag_set+0x573/0x1130 [<0000000066007fd7>] 0xffffffffc06b8b08 [<0000000081f5ac40>] do_one_initcall+0xd0/0x4f0 [<00000000e26d04ee>] do_init_module+0x1a4/0x680 [<000000001bb22407>] load_module+0x6249/0x7110 [<00000000ad31ac4d>] __do_sys_finit_module+0x140/0x200 [<000000007bddca46>] do_syscall_64+0x35/0x80 [<00000000b5afec39>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 unreferenced object 0xffff88810fc30540 (size 32): comm "modprobe", pid 727, jiffies 4295051278 (age 25.529s) 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: [<000000007f457abb>] __kmalloc_node+0x4c/0xc0 [<000000006b91eab4>] blk_mq_alloc_tag_set+0x393/0x1130 [<0000000066007fd7>] 0xffffffffc06b8b08 [<0000000081f5ac40>] do_one_initcall+0xd0/0x4f0 [<00000000e26d04ee>] do_init_module+0x1a4/0x680 [<000000001bb22407>] load_module+0x6249/0x7110 [<00000000ad31ac4d>] __do_sys_finit_module+0x140/0x200 [<000000007bddca46>] do_syscall_64+0x35/0x80 [<00000000b5afec39>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 If the floppy_alloc_disk() failed, disks of current drive will not be set, thus the lastest allocated set->tag cannot be freed in the error handling path. A simple call graph shown as below: floppy_module_init() floppy_init() do_floppy_init() for (drive = 0; drive < N_DRIVE; drive++) blk_mq_alloc_tag_set() blk_mq_alloc_tag_set_tags() blk_mq_realloc_tag_set_tags() # set->tag allocated floppy_alloc_disk() blk_mq_alloc_disk() # error occurred, disks failed to allocated ->out_put_disk: for (drive = 0; drive < N_DRIVE; drive++) if (!disks[drive][0]) # the last disks is not set and loop break break; blk_mq_free_tag_set() # the latest allocated set->tag leaked Fix this problem by free the set->tag of current drive before jump to error handling path. Cc: stable@vger.kernel.org Fixes: 302cfee15029 ("floppy: use a separate gendisk for each media format") Signed-off-by: Yuan Can [efremov: added stable list, changed title] Signed-off-by: Denis Efremov drivers/block/floppy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3e6743e28b9b43d37ced234bdf8e19955d0216f8 Author: Christophe JAILLET Date: Fri Dec 2 22:13:36 2022 +0100 random: include in the right header uses DO_ONCE(), so it should include directly. In contrast, does not use code from , so it should be removed. Move the `#include ` line into the right file. Signed-off-by: Christophe JAILLET Fixes: c0842fbc1b18 ("random32: move the pseudo-random 32-bit definitions to prandom.h") Signed-off-by: Jason A. Donenfeld include/linux/prandom.h | 1 + include/linux/random.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 39ec9e6b141e5a9d7274f40531888f890385a013 Author: Jason A. Donenfeld Date: Wed Nov 30 03:02:05 2022 +0100 random: align entropy_timer_state to cache line The theory behind the jitter dance is that multiple things are poking at the same cache line. This only works, however, if what's being poked at is actually all in the same cache line. Ensure this is the case by aligning the struct on the stack to the cache line size. We can't use ____cacheline_aligned on a stack variable, because gcc assumes 16 byte alignment when only 8 byte alignment is provided by the kernel, which means gcc could technically do something pathological like `(rsp & ~48) - 64`. It doesn't, but rather than risk it, just do the stack alignment manually with PTR_ALIGN and an oversized buffer. Fixes: 50ee7529ec45 ("random: try to actively add entropy rather than passively wait for it") Cc: Eric Biggers Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit b83e45fd065c3cfdb8cc0179bbddf296ce4d4fda Author: Jason A. Donenfeld Date: Wed Nov 30 03:14:15 2022 +0100 random: mix in cycle counter when jitter timer fires Rather than just relying on interaction between cache lines of the timer and the main loop, also explicitly take into account the fact that the timer might fire at some time that's hard to predict, due to scheduling, interrupts, or cross-CPU conditions. Mix in a cycle counter during the firing of the timer, in addition to the existing one during the scheduling of the timer. It can't hurt and can only help. Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 2 ++ 1 file changed, 2 insertions(+) commit 1c21fe00eda76e4081535c739cf9f4bbb5dcb0ce Author: Jason A. Donenfeld Date: Sat Oct 1 01:10:50 2022 +0200 random: spread out jitter callback to different CPUs Rather than merely hoping that the callback gets called on another CPU, arrange for that to actually happen, by round robining which CPU the timer fires on. This way, on multiprocessor machines, we exacerbate jitter by touching the same memory from multiple different cores. There's a little bit of tricky bookkeeping involved here, because using timer_setup_on_stack() + add_timer_on() + del_timer_sync() will result in a use after free. See this sample code: . Instead, it's necessary to call [try_to_]del_timer_sync() before calling add_timer_on(), so that the final call to del_timer_sync() at the end of the function actually succeeds at making sure no handlers are running. Cc: Sultan Alsawaf Cc: Dominik Brodowski Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 52 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-) commit 6978837ce42f8bea85041fc08c854f4e28852b3e Author: Li Zhijian Date: Sat Dec 3 11:37:14 2022 +0800 RDMA/mlx5: no need to kfree NULL pointer Goto label 'free' where it will kfree the 'in' is not needed though it's safe to kfree NULL. Return err code directly to simplify the code. 1973 free: 1974 kfree(in); 1975 return err; Signed-off-by: Li Zhijian Link: https://lore.kernel.org/r/20221203033714.25870-1-lizhijian@fujitsu.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/mr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ed461b30b22c8fa85c25189c14cb89f29595cd14 Author: Wang Yufen Date: Fri Dec 2 12:00:38 2022 +0800 RDMA/srp: Fix error return code in srp_parse_options() In the previous iteration of the while loop, the "ret" may have been assigned a value of 0, so the error return code -EINVAL may have been incorrectly set to 0. To fix set valid return code before calling to goto. Also investigate each case separately as Andy suggessted. Fixes: e711f968c49c ("IB/srp: replace custom implementation of hex2bin()") Fixes: 2a174df0c602 ("IB/srp: Use kstrtoull() instead of simple_strtoull()") Fixes: 19f313438c77 ("IB/srp: Add RDMA/CM support") Signed-off-by: Wang Yufen Link: https://lore.kernel.org/r/1669953638-11747-2-git-send-email-wangyufen@huawei.com Reviewed-by: Bart Van Assche Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/srp/ib_srp.c | 96 +++++++++++++++++++++++++++++++------ 1 file changed, 82 insertions(+), 14 deletions(-) commit 725349f8ba1e78a146c6ff8f3ee5e2712e517106 Author: Wang Yufen Date: Fri Dec 2 12:00:37 2022 +0800 RDMA/hfi1: Fix error return code in parse_platform_config() In the previous iteration of the while loop, the "ret" may have been assigned a value of 0, so the error return code -EINVAL may have been incorrectly set to 0. To fix set valid return code before calling to goto. Fixes: 97167e813415 ("staging/rdma/hfi1: Tune for unknown channel if configuration file is absent") Signed-off-by: Wang Yufen Link: https://lore.kernel.org/r/1669953638-11747-1-git-send-email-wangyufen@huawei.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/firmware.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 323a74fc20f53c0d0e13a16aee703a30d9751235 Author: Randy Dunlap Date: Fri Dec 2 13:19:40 2022 -0800 RDMA: Disable IB HW for UML Disable all of drivers/infiniband/hw/ and rdmavt for UML builds until someone needs it and provides patches to support it. This prevents build errors in hw/qib/qib_wc_x86_64.c. Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver") Signed-off-by: Randy Dunlap Cc: Jason Gunthorpe Cc: Dennis Dalessandro Cc: Christoph Hellwig Cc: linux-rdma@vger.kernel.org Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: linux-um@lists.infradead.org Link: https://lore.kernel.org/r/20221202211940.29111-1-rdunlap@infradead.org Signed-off-by: Leon Romanovsky drivers/infiniband/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit e348b4014c31041e13ff370669ba3348c4d385e3 Author: Doug Brown Date: Sat Dec 3 16:51:17 2022 -0800 ARM: mmp: fix timer_read delay timer_read() was using an empty 100-iteration loop to wait for the TMR_CVWR register to capture the latest timer counter value. The delay wasn't long enough. This resulted in CPU idle time being extremely underreported on PXA168 with CONFIG_NO_HZ_IDLE=y. Switch to the approach used in the vendor kernel, which implements the capture delay by reading TMR_CVWR a few times instead. Fixes: 49cbe78637eb ("[ARM] pxa: add base support for Marvell's PXA168 processor line") Signed-off-by: Doug Brown Link: https://lore.kernel.org/r/20221204005117.53452-3-doug@schmorgal.com Signed-off-by: Arnd Bergmann arch/arm/mach-mmp/time.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 1d9ae5a1356a61cef94b34e4ccb28986955e2fd2 Author: zhang songyi Date: Fri Dec 2 10:42:04 2022 +0800 pxa: Remove dev_err() after platform_get_irq() There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. Signed-off-by: zhang songyi Reviewed-by: Lubomir Rintel Link: https://lore.kernel.org/r/202212021042043546303@zte.com.cn Signed-off-by: Arnd Bergmann drivers/soc/pxa/ssp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7b3e7df92a061d0196f20e35ceef559eb8dd98a0 Author: Doug Brown Date: Sat Dec 3 16:51:16 2022 -0800 ARM: dts: pxa168: add timer reset and clock The timer was missing the clock and reset like the other peripherals. Add them to allow the timer to continue working after boot completes. Signed-off-by: Doug Brown Link: https://lore.kernel.org/r/20221204005117.53452-2-doug@schmorgal.com Signed-off-by: Arnd Bergmann arch/arm/boot/dts/pxa168.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 9ebe898a37329815636b9b4416d8ad2ff4681eb2 Merge: 8bc638ea67b2 91bf30a42b16 Author: Arnd Bergmann Date: Sun Dec 4 13:00:38 2022 +0100 Merge tag 'dt-cleanup-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt Minor improvements in ARM DTS for v6.2, part two Few cleanups which should not have any functional impact: 1. Trim addresses in "reg" to 8 digits. 2. Align LED node names with dtschema. 3. omap: echo: Use preferred enable-gpios property for LP5523 LED. * tag 'dt-cleanup-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: ARM: dts: sti: align LED node names with dtschema ARM: dts: am335x: align LED node names with dtschema ARM: dts: omap: echo: use preferred enable-gpios for LP5523 LED ARM: dts: omap: align LED node names with dtschema ARM: dts: logicpd: align LED node names with dtschema ARM: dts: lpc32xx: trim addresses to 8 digits ARM: dts: imx: trim addresses to 8 digits ARM: dts: omap: trim addresses to 8 digits Link: https://lore.kernel.org/r/20221204082909.5649-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 8bc638ea67b2449f8acd1c6c592055dde17b53b0 Merge: f8a9f2704a0f d32c1530c723 Author: Arnd Bergmann Date: Sun Dec 4 12:53:51 2022 +0100 Merge tag 'asahi-soc-dt-6.2-v2' of https://github.com/AsahiLinux/linux into soc/dt Apple SoC DT updates for 6.2 (v2). This includes: * L1/L2 cache topology for t600x * CPUfreq nodes for t8103/t600x * DT binding for CPUfreq * Associated MAINTAINERS update The CPUfreq driver was already merged for 6.2 via its tree. * tag 'asahi-soc-dt-6.2-v2' of https://github.com/AsahiLinux/linux: arm64: dts: apple: Add CPU topology & cpufreq nodes for t600x arm64: dts: apple: Add CPU topology & cpufreq nodes for t8103 dt-bindings: cpufreq: apple,soc-cpufreq: Add binding for Apple SoC cpufreq MAINTAINERS: Add entries for Apple SoC cpufreq driver arm64: dts: apple: Add t600x L1/L2 cache properties and nodes Link: https://lore.kernel.org/r/a9353121-7fed-fde7-6f40-939a65bfeefb@marcan.st Signed-off-by: Arnd Bergmann commit d32c1530c7230b756ca9a6b6cf92ce6e60788594 Author: Hector Martin Date: Tue Feb 15 21:34:10 2022 +0900 arm64: dts: apple: Add CPU topology & cpufreq nodes for t600x Add the missing CPU topology/capacity information and the cpufreq nodes, so we can have CPU frequency scaling and the scheduler has the information it needs to make the correct decisions. As with t8103, boost states are commented out pending PSCI/etc support for deep sleep states. Reviewed-by: Sven Peter Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t6002.dtsi | 72 ++++++++++- arch/arm64/boot/dts/apple/t600x-common.dtsi | 186 ++++++++++++++++++++++++++++ arch/arm64/boot/dts/apple/t600x-dieX.dtsi | 18 +++ 3 files changed, 275 insertions(+), 1 deletion(-) commit 7a7e6edfca857f490e3a963198c67620de26b7f0 Author: Alison Schofield Date: Wed Nov 30 14:47:26 2022 -0800 tools/testing/cxl: Add XOR Math support to cxl_test Expand the cxl_test topology to include CFMWS's that use XOR math for interleave arithmetic, as defined in the CXL Specification 3.0. With this expanded topology, cxl_test is useful for testing: x1,x2,x4 ways with XOR interleave arithmetic. Define the additional XOR CFMWS entries to appear only with the module parameter interleave_arithmetic=1. The cxl_test default continues to be modulo math. modprobe cxl_test interleave_arithmetic=1 Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/54670400cd48ba7fcc6d8ee0d6ae2276d3f51aad.1669847017.git.alison.schofield@intel.com Signed-off-by: Dan Williams tools/testing/cxl/test/cxl.c | 118 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 115 insertions(+), 3 deletions(-) commit b9ecf9b9ac5969d7b7ea786ce5c76e24246df2c5 Author: Wedson Almeida Filho Date: Thu Nov 10 17:41:40 2022 +0100 rust: types: add `Opaque` type Add the `Opaque` type, which is meant to be used with FFI objects that are never interpreted by Rust code, e.g.: struct Waiter { completion: Opaque, next: *mut Waiter, } It has the advantage that the objects don't have to be zero-initialised before calling their init functions, making the code performance closer to C. Signed-off-by: Wedson Almeida Filho [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/types.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit ba20915bae49024dab6ee582abdd4cd8944a3e55 Author: Wedson Almeida Filho Date: Thu Nov 10 17:41:39 2022 +0100 rust: types: add `Either` type Introduce the new `types` module of the `kernel` crate with `Either` as its first type. `Either` is a sum type that always holds either a value of type `L` (`Left` variant) or `R` (`Right` variant). For instance: struct Executor { queue: Either, } Signed-off-by: Wedson Almeida Filho Reviewed-by: Wei Liu [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/lib.rs | 1 + rust/kernel/types.rs | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit 0f595bab9d1c1a10c6ab5ff3f9140cfc26600349 Author: Gary Guo Date: Thu Nov 10 17:41:38 2022 +0100 rust: build_assert: add `build_{error,assert}!` macros Add the `build_error!` and `build_assert!` macros which leverage the previously introduced `build_error` crate. Do so in a new module, called `build_assert`. The former fails the build if the code path calling it can possibly be executed. The latter asserts that a boolean expression is `true` at compile time. In particular, `build_assert!` can be used in some contexts where `static_assert!` cannot: fn f1() { static_assert!(N > 1);` // Error. build_assert!(N > 1); // Build-time check. assert!(N > 1); // Run-time check. } #[inline] fn f2(n: usize) { static_assert!(n > 1); // Error. build_assert!(n > 1); // Build-time check. assert!(n > 1); // Run-time check. } Signed-off-by: Gary Guo Reviewed-by: Wei Liu [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/build_assert.rs | 82 +++++++++++++++++++++++++++++++++++++++++++++ rust/kernel/lib.rs | 4 +++ rust/kernel/prelude.rs | 2 ++ 3 files changed, 88 insertions(+) commit ecaa6ddff2fd843c0236a931bcc62bf239956617 Author: Gary Guo Date: Thu Nov 10 17:41:37 2022 +0100 rust: add `build_error` crate The `build_error` crate provides a function `build_error` which will panic at compile-time if executed in const context and, by default, will cause a build error if not executed at compile time and the optimizer does not optimise away the call. The `CONFIG_RUST_BUILD_ASSERT_ALLOW` kernel option allows to relax the default build failure and convert it to a runtime check. If the runtime check fails, `panic!` will be called. Its functionality will be exposed to users as a couple macros in the `kernel` crate in the following patch, thus some documentation here refers to them for simplicity. Signed-off-by: Gary Guo Reviewed-by: Wei Liu [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda lib/Kconfig.debug | 16 ++++++++++++++++ rust/Makefile | 22 +++++++++++++++++----- rust/build_error.rs | 31 +++++++++++++++++++++++++++++++ rust/exports.c | 5 +++++ scripts/generate_rust_analyzer.py | 8 +++++++- 5 files changed, 76 insertions(+), 6 deletions(-) commit ef9e37973c3a50497c943e70d577dad10a8e41f2 Author: Miguel Ojeda Date: Thu Nov 10 17:41:36 2022 +0100 rust: static_assert: add `static_assert!` macro Add the `static_assert!` macro, which is a compile-time assert, similar to the C11 `_Static_assert` and C++11 `static_assert` declarations [1,2]. Do so in a new module, called `static_assert`. For instance: static_assert!(42 > 24); static_assert!(core::mem::size_of::() == 1); const X: &[u8] = b"bar"; static_assert!(X[1] == b'a'); const fn f(x: i32) -> i32 { x + 2 } static_assert!(f(40) == 42); Link: https://en.cppreference.com/w/c/language/_Static_assert [1] Link: https://en.cppreference.com/w/cpp/language/static_assert [2] Co-developed-by: Alex Gaynor Signed-off-by: Alex Gaynor Signed-off-by: Miguel Ojeda rust/kernel/lib.rs | 1 + rust/kernel/prelude.rs | 2 ++ rust/kernel/static_assert.rs | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) commit bee1688940b9264a9960e6afdac36a4af35f1f4b Author: Niklas Mohrin Date: Thu Nov 10 17:41:35 2022 +0100 rust: std_vendor: add `dbg!` macro based on `std`'s one The Rust standard library has a really handy macro, `dbg!` [1,2]. It prints the source location (filename and line) along with the raw source code that is invoked with and the `Debug` representation of the given expression, e.g.: let a = 2; let b = dbg!(a * 2) + 1; // ^-- prints: [src/main.rs:2] a * 2 = 4 assert_eq!(b, 5); Port the macro over to the `kernel` crate inside a new module called `std_vendor`, using `pr_info!` instead of `eprintln!` and make the rules about committing uses of `dbg!` into version control more concrete (i.e. tailored for the kernel). Since the source code for the macro is taken from the standard library source (with only minor adjustments), the new file is licensed under `Apache 2.0 OR MIT`, just like the original [3,4]. Link: https://doc.rust-lang.org/std/macro.dbg.html [1] Link: https://github.com/rust-lang/rust/blob/master/library/std/src/macros.rs#L212 [2] Link: https://github.com/rust-lang/rust/blob/master/library/std/Cargo.toml [3] Link: https://github.com/rust-lang/rust/blob/master/COPYRIGHT [4] Signed-off-by: Niklas Mohrin [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/lib.rs | 2 + rust/kernel/prelude.rs | 2 +- rust/kernel/std_vendor.rs | 163 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+), 1 deletion(-) commit ef32054942ee8d78cbcc2c97212e55b6f5f668f7 Author: Wedson Almeida Filho Date: Thu Nov 10 17:41:34 2022 +0100 rust: str: add `fmt!` macro Add the `fmt!` macro, which is a convenience alias for the Rust `core::format_args!` macro. For instance, it may be used to create a `CString`: CString::try_from_fmt(fmt!("{}{}", "abc", 42))? Signed-off-by: Wedson Almeida Filho Reviewed-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/str.rs | 6 ++++++ 1 file changed, 6 insertions(+) commit 65e1e497f6d63f747d453b3d89fbeb6d140cbbb7 Author: Wedson Almeida Filho Date: Thu Nov 10 17:41:33 2022 +0100 rust: str: add `CString` type Add the `CString` type, which is an owned string that is guaranteed to have exactly one `NUL` byte at the end, i.e. the owned equivalent to `CStr` introduced earlier. It is used for interoperability with kernel APIs that take C strings. In order to do so, implement the `RawFormatter::new()` constructor and the `RawFormatter::bytes_written()` method as well. Signed-off-by: Wedson Almeida Filho [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/str.rs | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 89 insertions(+), 2 deletions(-) commit fffed679eeea119c8f972954518c142ec95bda4a Author: Wedson Almeida Filho Date: Thu Nov 10 17:41:32 2022 +0100 rust: str: add `Formatter` type Add the `Formatter` type, which leverages `RawFormatter`, but fails if callers attempt to write more than will fit in the buffer. In order to so, implement the `RawFormatter::from_buffer()` constructor as well. Co-developed-by: Adam Bratschi-Kaye Signed-off-by: Adam Bratschi-Kaye Signed-off-by: Wedson Almeida Filho Reviewed-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/str.rs | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit b18cb00e5a8a1182ef491b770ea1a3dab081dc5b Author: Gary Guo Date: Thu Nov 10 17:41:31 2022 +0100 rust: str: add `c_str!` macro Add `c_str!`, which is a convenience macro that creates a new `CStr` from a string literal. It is designed to be similar to a `str` in usage, and it is usable in const contexts, for instance: const X: &CStr = c_str!("Example"); Co-developed-by: Alex Gaynor Signed-off-by: Alex Gaynor Signed-off-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/str.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 985f1f09bf5bf8cbcb43e58a2320de2a5054be4c Author: Milan Landaverde Date: Thu Nov 10 17:41:30 2022 +0100 rust: str: add `CStr` unit tests Add unit tests for `CStr::from_bytes_with_nul()` and `CStr::from_bytes_with_nul_unchecked()`. These serve as an example of the first unit tests for Rust code (i.e. different from documentation tests). Signed-off-by: Milan Landaverde [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/str.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit c07e67bd2daf99de923b6fd927ab8c18e0f57b05 Author: Gary Guo Date: Thu Nov 10 17:41:29 2022 +0100 rust: str: implement several traits for `CStr` Implement `Debug`, `Display`, `Deref` (into `BStr`), `AsRef` and a set of `Index<...>` traits. This makes it `CStr` more convenient to use (and closer to `str`). Co-developed-by: Alex Gaynor Signed-off-by: Alex Gaynor Co-developed-by: Morgan Bartlett Signed-off-by: Morgan Bartlett Signed-off-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/str.rs | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 123 insertions(+), 1 deletion(-) commit d126d2380131dfbc880f5b5f0e3015e9bef6fa1c Author: Gary Guo Date: Thu Nov 10 17:41:28 2022 +0100 rust: str: add `CStr` type Add the `CStr` type, which is a borrowed string that is guaranteed to have exactly one `NUL` byte, which is at the end. It is used for interoperability with kernel APIs that take C strings. Add it to the prelude too. Co-developed-by: Alex Gaynor Signed-off-by: Alex Gaynor Co-developed-by: Milan Landaverde Signed-off-by: Milan Landaverde Signed-off-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/prelude.rs | 2 +- rust/kernel/str.rs | 169 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+), 1 deletion(-) commit 650ec51561fd201bcf47ce9b1d9b6fedd4bb60a6 Author: Gary Guo Date: Thu Nov 10 17:41:27 2022 +0100 rust: str: add `b_str!` macro Add the `b_str!` macro, which creates a new `BStr` from a string literal. It is usable in const contexts, for instance: const X: &BStr = b_str!("Example"); Signed-off-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/str.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 7c5977464681c2ec603efcac32a9432bcd355f12 Author: Gary Guo Date: Thu Nov 10 17:41:26 2022 +0100 rust: str: add `BStr` type Add the `BStr` type, which is a byte string without UTF-8 validity guarantee. It is simply an alias to `[u8]`, but has a more evident semantical meaning. Signed-off-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/str.rs | 5 +++++ 1 file changed, 5 insertions(+) commit feadd062871704b1de2111d06008ee24a8f03d02 Author: Miguel Ojeda Date: Thu Nov 10 17:41:25 2022 +0100 rust: alloc: add `Vec::try_with_capacity{,_in}()` constructors Add `Vec::try_with_capacity()` and `Vec::try_with_capacity_in()` as the fallible versions of `Vec::with_capacity()` and `Vec::with_capacity_in()`, respectively. The implementations follow the originals and use the previously added `RawVec::try_with_capacity_in()`. In turn, `Vec::try_with_capacity()` will be used to implement the `CString` type (which wraps a `Vec`) in a later patch. Reviewed-by: Gary Guo Signed-off-by: Miguel Ojeda rust/alloc/raw_vec.rs | 1 - rust/alloc/vec/mod.rs | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 1 deletion(-) commit 51d3a25ab3a4f1dd701b17f7340e36de8600e41e Author: Miguel Ojeda Date: Thu Nov 10 17:41:24 2022 +0100 rust: alloc: add `RawVec::try_with_capacity_in()` constructor Add the `RawVec::try_with_capacity_in()` constructor as the fallible version of `RawVec::with_capacity_in()`. The implementation follows the original. The infallible constructor is implemented in terms of the private `RawVec::allocate_in()` constructor, thus also add the private `RawVec::try_allocate_in()` constructor following the other. It will be used to implement `Vec::try_with_capacity{,_in}()` in the next patch. Reviewed-by: Gary Guo Signed-off-by: Miguel Ojeda rust/alloc/raw_vec.rs | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 25d176a4fad5841de1f85d2a4d69ce87416abc26 Author: Wedson Almeida Filho Date: Thu Nov 10 17:41:23 2022 +0100 rust: prelude: add `error::code::*` constant items It is convenient to have all the `Error` constant items (such as `EINVAL`) available as-is everywhere (i.e. for code using the kernel prelude such as kernel modules). Therefore, add all of them to the prelude. For instance, this allows to write `Err(EINVAL)` to create a kernel `Result`: fn f() -> Result<...> { ... Err(EINVAL) } Signed-off-by: Wedson Almeida Filho Reviewed-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/prelude.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76e2c2d9a22a402e816607ae575b1a194cc45a31 Author: Wedson Almeida Filho Date: Thu Nov 10 17:41:22 2022 +0100 rust: error: add `From` implementations for `Error` Add a set of `From` implementations for the `Error` kernel type. These implementations allow to easily convert from standard Rust error types to the usual kernel errors based on one of the `E*` integer codes. On top of that, the question mark Rust operator (`?`) implicitly performs a conversion on the error value using the `From` trait when propagating. Thus it is extra convenient to use. For instance, a kernel function that needs to convert a `i64` into a `i32` and to bubble up the error as a kernel error may write: fn f(x: i64) -> Result<...> { ... let y = i32::try_from(x)?; ... } which will transform the `TryFromIntError` into an `Err(EINVAL)`. Co-developed-by: Adam Bratschi-Kaye Signed-off-by: Adam Bratschi-Kaye Co-developed-by: Nándor István Krácser Signed-off-by: Nándor István Krácser Signed-off-by: Wedson Almeida Filho Reviewed-by: Finn Behrens [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/error.rs | 45 ++++++++++++++++++++++++++++++++++++++++++++- rust/kernel/lib.rs | 1 + 2 files changed, 45 insertions(+), 1 deletion(-) commit 266def2a0f5bbe44b11902bd4c93b9c5d8b8d708 Author: Viktor Garske Date: Thu Nov 10 17:41:21 2022 +0100 rust: error: add codes from `errno-base.h` Only a few codes were added so far. With the `declare_err!` macro in place, add the remaining ones (which is most of them) from `include/uapi/asm-generic/errno-base.h`. Co-developed-by: Wedson Almeida Filho Signed-off-by: Wedson Almeida Filho Signed-off-by: Viktor Garske Reviewed-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/error.rs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 4b0c68bd0d8b0e23ab1763d4a6632720dd3f1a83 Author: Finn Behrens Date: Thu Nov 10 17:41:20 2022 +0100 rust: error: declare errors using macro Add a macro to declare errors, which simplifies the work needed to add each one, avoids repetition of the code and makes it easier to change the way they are declared. Signed-off-by: Finn Behrens Reviewed-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/error.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit b13c9880f909ca5e406d9b3d061359fd8fb0c514 Author: Gary Guo Date: Thu Nov 10 17:41:19 2022 +0100 rust: macros: take string literals in `module!` Instead of taking binary string literals, take string ones instead, making it easier for users to define a module, i.e. instead of calling `module!` like: module! { ... name: b"rust_minimal", ... } now it is called as: module! { ... name: "rust_minimal", ... } Module names, aliases and license strings are restricted to ASCII only. However, the author and the description allows UTF-8. For simplicity (avoid parsing), escape sequences and raw string literals are not yet handled. Link: https://github.com/Rust-for-Linux/linux/issues/252 Link: https://lore.kernel.org/lkml/YukvvPOOu8uZl7+n@yadro.com/ Signed-off-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/macros/helpers.rs | 24 ++++++++++++++++++------ rust/macros/lib.rs | 12 ++++++------ rust/macros/module.rs | 10 +++++----- samples/rust/rust_minimal.rs | 8 ++++---- samples/rust/rust_print.rs | 8 ++++---- 5 files changed, 37 insertions(+), 25 deletions(-) commit b44becc5ee808e02bbda0f90ee0584f206693a33 Author: Gary Guo Date: Thu Nov 10 17:41:18 2022 +0100 rust: macros: add `#[vtable]` proc macro This procedural macro attribute provides a simple way to declare a trait with a set of operations that later users can partially implement, providing compile-time `HAS_*` boolean associated constants that indicate whether a particular operation was overridden. This is useful as the Rust counterpart to structs like `file_operations` where some pointers may be `NULL`, indicating an operation is not provided. For instance: #[vtable] trait Operations { fn read(...) -> Result { Err(EINVAL) } fn write(...) -> Result { Err(EINVAL) } } #[vtable] impl Operations for S { fn read(...) -> Result { ... } } assert_eq!(::HAS_READ, true); assert_eq!(::HAS_WRITE, false); Signed-off-by: Gary Guo Reviewed-by: Sergio González Collado [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/kernel/prelude.rs | 2 +- rust/macros/lib.rs | 52 +++++++++++++++++++++++++++ rust/macros/vtable.rs | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+), 1 deletion(-) commit 60f18c225f5f6939e348c4b067711d10afd33151 Author: Björn Roy Baron Date: Thu Nov 10 17:41:17 2022 +0100 rust: macros: add `concat_idents!` proc macro This macro provides similar functionality to the unstable feature `concat_idents` without having to rely on it. For instance: let x_1 = 42; let x_2 = concat_idents!(x, _1); assert!(x_1 == x_2); It has different behavior with respect to macro hygiene. Unlike the unstable `concat_idents!` macro, it allows, for example, referring to local variables by taking the span of the second macro as span for the output identifier. Signed-off-by: Björn Roy Baron Reviewed-by: Finn Behrens Reviewed-by: Gary Guo [Reworded, adapted for upstream and applied latest changes] Signed-off-by: Miguel Ojeda rust/macros/concat_idents.rs | 23 +++++++++++++++++++++++ rust/macros/lib.rs | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit f9db85bfec0dcc01556a41d23aec47b866ab3569 Author: Alison Schofield Date: Wed Nov 30 14:47:25 2022 -0800 cxl/acpi: Support CXL XOR Interleave Math (CXIMS) When the CFMWS is using XOR math, parse the corresponding CXIMS structure and store the xormaps in the root decoder structure. Use the xormaps in a new lookup, cxl_hb_xor(), to find a targets entry in the host bridge interleave target list. Defined in CXL Specfication 3.0 Section: 9.17.1 Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/5794813acdf7b67cfba3609c6aaff46932fa38d0.1669847017.git.alison.schofield@intel.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++-- drivers/cxl/core/port.c | 9 ++-- drivers/cxl/cxl.h | 11 +++- 3 files changed, 149 insertions(+), 8 deletions(-) commit 7db0aa8cc019f4f926c19989d1c8696d3893d77c Merge: f0c4d9fc9cc9 f350c68e3cd5 Author: Dan Williams Date: Sat Dec 3 14:43:29 2022 -0800 Merge "ACPICA: Add CXL 3.0 structures..." into for-6.2/cxl-xor Pick up: f350c68e3cd5 ("ACPICA: Add CXL 3.0 structures (CXIMS & RDPAS) to the CEDT table") ...to build the new XOR interleave math support for the CXL Fixed Memory Window Structures. commit 32163491c0c205ffb1596baf9c308dee5338ae94 Merge: 65e6af6cebef 42f66a44d837 Author: David S. Miller Date: Sat Dec 3 21:49:23 2022 +0000 Merge branch 'r8169-irq-coalesce' Heiner Kallweit says: ==================== net: add and use netdev_sw_irq_coalesce_default_on() There are reports about r8169 not reaching full line speed on certain systems (e.g. SBC's) with a 2.5Gbps link. There was a time when hardware interrupt coalescing was enabled per default, but this was changed due to ASPM-related issues on few systems. Meanwhile we have sysfs attributes for controlling kind of "software interrupt coalescing" on the GRO level. However most distros and users don't know about it. So lets set a conservative default for both involved parameters. Users can still override the defaults via sysfs. Don't enable these settings on the fast ethernet chip versions, they are slow enough. Even with these conservative setting interrupt load on my 1Gbps test system reduced significantly. Follow Jakub's suggestion and put this functionality into net core so that other MAC drivers can reuse it. ==================== Signed-off-by: David S. Miller commit 42f66a44d83715bef810a543dfd66008b883a7a5 Author: Heiner Kallweit Date: Wed Nov 30 23:30:15 2022 +0100 r8169: enable GRO software interrupt coalescing per default There are reports about r8169 not reaching full line speed on certain systems (e.g. SBC's) with a 2.5Gbps link. There was a time when hardware interrupt coalescing was enabled per default, but this was changed due to ASPM-related issues on few systems. So let's use software interrupt coalescing instead and enable it using new function netdev_sw_irq_coalesce_default_on(). Even with these conservative settings interrupt load on my 1Gbps test system reduced significantly. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 2 ++ 1 file changed, 2 insertions(+) commit d93607082e982223cf92750f2d9039ff365b9d24 Author: Heiner Kallweit Date: Wed Nov 30 23:28:26 2022 +0100 net: add netdev_sw_irq_coalesce_default_on() Add a helper for drivers wanting to set SW IRQ coalescing by default. The related sysfs attributes can be used to override the default values. Follow Jakub's suggestion and put this functionality into net core so that drivers wanting to use software interrupt coalescing per default don't have to open-code it. Note that this function needs to be called before the netdevice is registered. Suggested-by: Jakub Kicinski Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller include/linux/netdevice.h | 1 + net/core/dev.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) commit 6155ccc9ddf6642056f1c00c2851d1938d27a7f2 Author: Dave Jiang Date: Wed Nov 30 17:02:25 2022 -0700 cxl/pci: Add callback to log AER correctable error Add AER error handler callback to read the RAS capability structure correctable error (CE) status register for the CXL device. Log the error as a trace event and clear the error. For CXL devices, the driver also needs to write back to the status register to clear the unmasked correctable errors. See CXL spec rev3.0 8.2.4.16 for RAS capability structure CE Status Register. Suggested-by: Jonathan Cameron Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166985287203.2871899.13605149073500556137.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/pci.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 361187e04733eee19778ea9b01cb95a977c14c10 Author: Dave Jiang Date: Wed Nov 30 15:11:21 2022 -0700 PCI/AER: Add optional logging callback for correctable error Some new devices such as CXL devices may want to record additional error information on a corrected error. Add a callback to allow the PCI device driver to do additional logging such as providing additional stats for user space RAS monitoring. For CXL device, this is actually a need due to CXL needing to write to the CXL RAS capability structure correctable error status register in order to clear the unmasked correctable errors. See CXL spec rev3.0 8.2.4.16. Suggested-by: Jonathan Cameron Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Jonathan Cameron Acked-by: Bjorn Helgaas Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166984619233.2804404.3966368388544312674.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams Documentation/PCI/pci-error-recovery.rst | 7 +++++++ drivers/pci/pcie/aer.c | 8 +++++++- include/linux/pci.h | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) commit 2905cb5236cba63a5dc8a83752dcc31f3cc819f9 Author: Dan Williams Date: Tue Nov 29 10:48:59 2022 -0700 cxl/pci: Add (hopeful) error handling support Add nominal error handling that tears down CXL.mem in response to error notifications that imply a device reset. Given some CXL.mem may be operating as System RAM, there is a high likelihood that these error events are fatal. However, if the system survives the notification the expectation is that the driver behavior is equivalent to a hot-unplug and re-plug of an endpoint. Note that this does not change the mask values from the default. That awaits CXL _OSC support to determine whether platform firmware is in control of the mask registers. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166974413966.1608150.15522782911404473932.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/memdev.c | 1 + drivers/cxl/cxl.h | 1 + drivers/cxl/cxlmem.h | 2 + drivers/cxl/pci.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 141 insertions(+) commit 2f6e9c305127f8dea4e2d697b4bdd33e126ccbf7 Author: Dave Jiang Date: Tue Nov 29 10:48:53 2022 -0700 cxl/pci: add tracepoint events for CXL RAS Add tracepoint events for recording the CXL uncorrectable and correctable errors. For uncorrectable errors, there is additional data of 512B from the header log register (CXL spec rev3 8.2.4.16.7). The trace event will intake a dynamic array that will dump the entire Header Log data. If multiple errors are set in the status register, then the 'first error' field (CXL spec rev3 v8.2.4.16.6) is read from the Error Capabilities and Control Register in order to determine the error. This implementation does not include CXL IDE Error details. Cc: Steven Rostedt Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/166974413388.1608150.5875712482260436188.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/pci.c | 2 + include/trace/events/cxl.h | 112 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) commit bd09626b39dff97779e1543e25e60ab2876e7e88 Author: Dan Williams Date: Tue Nov 29 10:48:48 2022 -0700 cxl/pci: Find and map the RAS Capability Structure The RAS Capability Structure has some ancillary information that may be relevant with respect to AER events, link and protcol error status registers. Map the RAS Capability Registers in support of defining a 'struct pci_error_handlers' instance for the cxl_pci driver. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166974412803.1608150.7096566580400947001.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/regs.c | 7 +++++++ drivers/cxl/cxl.h | 19 +++++++++++++++++++ drivers/cxl/pci.c | 8 ++++++++ 3 files changed, 34 insertions(+) commit a1554e9cac5ea04aaf2fb2de0df9936a94cb96fc Author: Dan Williams Date: Tue Nov 29 10:48:42 2022 -0700 cxl/pci: Prepare for mapping RAS Capability Structure The RAS Capabilitiy Structure is a CXL Component register capability block. Unlike the HDM Decoder Capability, it will be referenced by the cxl_pci driver in response to PCIe AER events. Due to this it is no longer the case that cxl_map_component_regs() can assume that it should map all component registers. Plumb a bitmask of capability ids to map through cxl_map_component_regs(). For symmetry cxl_probe_device_regs() is updated to populate @id in 'struct cxl_reg_map' even though cxl_map_device_regs() does not have a need to map a subset of the device registers per caller. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166974412214.1608150.11487843455070795378.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 3 ++- drivers/cxl/core/regs.c | 36 ++++++++++++++++++++++++++---------- drivers/cxl/cxl.h | 4 +++- 3 files changed, 31 insertions(+), 12 deletions(-) commit 920d8d2c60787bf63e023b120e81ca788d4191ff Author: Dan Williams Date: Tue Nov 29 10:48:36 2022 -0700 cxl/port: Limit the port driver to just the HDM Decoder Capability Update the port driver to use cxl_map_component_registers() so that the component register block can be shared between the cxl_pci driver and the cxl_port driver. I.e. stop the port driver from reserving the entire component register block for itself via request_region() when it only needs the HDM Decoder Capability subset. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166974411625.1608150.7149373371599960307.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/hdm.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 6c7f4f1e51c2a2474e6d4024d2ed32f8965be4a4 Author: Dan Williams Date: Tue Nov 29 10:48:30 2022 -0700 cxl/core/regs: Make cxl_map_{component, device}_regs() device generic There is no need to carry the barno and the block offset through the stack, just convert them to a resource base immediately. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166974411035.1608150.8605988708101648442.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/pci.c | 3 +-- drivers/cxl/core/port.c | 2 +- drivers/cxl/core/regs.c | 40 +++++++++++++++++++++++----------------- drivers/cxl/cxl.h | 14 ++++++-------- drivers/cxl/cxlpci.h | 9 --------- drivers/cxl/pci.c | 25 ++++++------------------- 6 files changed, 37 insertions(+), 56 deletions(-) commit 43a2fb3aef165ffe9d4315059a2e951253f4050b Author: Dan Williams Date: Tue Nov 29 10:48:24 2022 -0700 cxl/pci: Kill cxl_map_regs() The component registers are currently unused by the cxl_pci driver. Only the physical address base of the component registers is conveyed to the cxl_mem driver. Just call cxl_map_device_registers() directly. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166974410443.1608150.15855499736133349600.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/pci.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) commit 1191ca102d32456d29cf64bd4547e216986ff6b6 Author: Dan Williams Date: Tue Nov 29 10:48:18 2022 -0700 cxl/pci: Cleanup cxl_map_device_regs() Use a loop to reduce the duplicated code in cxl_map_device_regs(). This is in preparation for deleting cxl_map_regs(). Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166974409867.1608150.14886452053935226038.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/regs.c | 51 +++++++++++++++++++------------------------------ 1 file changed, 20 insertions(+), 31 deletions(-) commit af2dfef854aa6afdf380e15e39d936d3b66097f1 Author: Dan Williams Date: Tue Nov 29 10:48:12 2022 -0700 cxl/pci: Cleanup repeated code in cxl_probe_regs() helpers Rather then duplicating the setting of valid, length, and offset for each type, just convey a pointer to the register map to common code. Yes, the change in cxl_probe_component_regs() does not save any lines of code, but it is preparation for adding another component register type to map (RAS Capability Structure). Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166974409293.1608150.17661353937678581423.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/regs.c | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) commit 85d6ce58e493ac8b7122e2fbe3f41b94d6ebdc11 Author: Greg Kroah-Hartman Date: Sat Dec 3 15:07:47 2022 +0100 block: remove devnode callback from struct block_device_operations With the removal of the pktcdvd driver, there are no in-kernel users of the devnode callback in struct block_device_operations, so it can be safely removed. If it is needed for new block drivers in the future, it can be brought back. Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20221203140747.1942969-1-gregkh@linuxfoundation.org Signed-off-by: Jens Axboe block/genhd.c | 11 ----------- include/linux/blkdev.h | 1 - 2 files changed, 12 deletions(-) commit 5b1586ab064ca24c6a7a6be7a9d0cb9e237ef39a Author: Ashok Raj Date: Tue Nov 29 13:08:26 2022 -0800 x86/microcode/intel: Do not print microcode revision and processor flags collect_cpu_info() is used to collect the current microcode revision and processor flags on every CPU. It had a weird mechanism to try to mimick a "once" functionality in the sense that, that information should be issued only when it is differing from the previous CPU. However (1): the new calling sequence started doing that in parallel: microcode_init() |-> schedule_on_each_cpu(setup_online_cpu) |-> collect_cpu_info() resulting in multiple redundant prints: microcode: sig=0x50654, pf=0x80, revision=0x2006e05 microcode: sig=0x50654, pf=0x80, revision=0x2006e05 microcode: sig=0x50654, pf=0x80, revision=0x2006e05 However (2): dumping this here is not that important because the kernel does not support mixed silicon steppings microcode. Finally! Besides, there is already a pr_info() in microcode_reload_late() that shows both the old and new revisions. What is more, the CPU signature (sig=0x50654) and Processor Flags (pf=0x80) above aren't that useful to the end user, they are available via /proc/cpuinfo and they don't change anyway. Remove the redundant pr_info(). [ bp: Heavily massage. ] Fixes: b6f86689d5b7 ("x86/microcode: Rip out the subsys interface gunk") Reported-by: Tony Luck Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20221103175901.164783-2-ashok.raj@intel.com arch/x86/kernel/cpu/microcode/intel.c | 8 -------- 1 file changed, 8 deletions(-) commit 259b007f5729d200b8b85a588b73233cc2becdaa Author: Carlos Bilbao Date: Mon Nov 28 09:23:23 2022 -0600 docs/sp_SP: Add memory-barriers.txt Spanish translation Translate the following documents into Spanish: - memory-barriers.txt using the wrapper documents system. Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20221128152323.4080455-1-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet Documentation/translations/sp_SP/index.rst | 1 + .../translations/sp_SP/memory-barriers.txt | 3134 ++++++++++++++++++++ .../sp_SP/wrappers/memory-barriers.rst | 19 + 3 files changed, 3154 insertions(+) commit 9ce09d521d491afad51f44865e99fde7084067da Author: Tiezhu Yang Date: Thu Dec 1 18:59:05 2022 +0800 docs/zh_CN/LoongArch: Update links of LoongArch ISA Vol1 and ELF psABI The current links of LoongArch ISA Vol1 and ELF psABI are invalid, the latest versions are 1.02 and 2.00 respectively, let us update the links. Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1669892345-7763-3-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/loongarch/introduction.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8b54c247ca8378e46794dacdba2f50e8cac80654 Author: Tiezhu Yang Date: Thu Dec 1 18:59:04 2022 +0800 docs/LoongArch: Update links of LoongArch ISA Vol1 and ELF psABI The current links of LoongArch ISA Vol1 and ELF psABI are invalid, the latest versions are 1.02 and 2.00 respectively, let us update the links. Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1669892345-7763-2-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Jonathan Corbet Documentation/loongarch/introduction.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7f2e60ff51caf511b9215e0b9fc47ee620ecbb66 Author: Wei Li Date: Sat Dec 3 17:37:50 2022 +0800 Documentation/features: Update feature lists for 6.1 Run the refresh script to document the recent feature additions on loong, um and csky as of v6.1-rc7. Signed-off-by: Wei Li Link: https://lore.kernel.org/r/20221203093750.4145802-1-liwei391@huawei.com Signed-off-by: Jonathan Corbet Documentation/features/core/eBPF-JIT/arch-support.txt | 2 +- Documentation/features/core/jump-labels/arch-support.txt | 2 +- Documentation/features/debug/KASAN/arch-support.txt | 2 +- Documentation/features/locking/queued-spinlocks/arch-support.txt | 4 ++-- Documentation/features/perf/perf-regs/arch-support.txt | 2 +- Documentation/features/perf/perf-stackdump/arch-support.txt | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) commit e378cb9aab3f86165829539dfa8c5926a020ebcf Author: Kushagra Verma Date: Fri Dec 2 17:52:03 2022 +0530 Documentation: Fixed a typo in bootconfig.rst Fixed a typo in the word 'concatenated'. Signed-off-by: Kushagra Verma Link: https://lore.kernel.org/r/HK0PR01MB2801DA243B726141A97FE92EF8179@HK0PR01MB2801.apcprd01.prod.exchangelabs.com Signed-off-by: Jonathan Corbet Documentation/admin-guide/bootconfig.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09265345cc8900cd0bf10c2ff98e51b495b2c5b2 Author: Jithu Joseph Date: Fri Dec 2 21:24:45 2022 -0800 platform/x86/intel/ifs: Add missing kernel-doc entry Document the test_num member of struct ifs_data. Reported-by: Stephen Rothwell Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov (AMD) Acked-by: Randy Dunlap Link: https://lore.kernel.org/lkml/774fd22a-aaee-758d-8195-77bac783ecbc@infradead.org/ drivers/platform/x86/intel/ifs/ifs.h | 1 + 1 file changed, 1 insertion(+) commit f361c96c75184d0272572087c7d9874e0f64b870 Merge: 11fa7fefe3d8 5313121b22fd Author: Greg Kroah-Hartman Date: Sat Dec 3 10:53:13 2022 +0100 Merge tag 'extcon-next-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon next for v6.2 Detailed description for this pull request: - Replace irqchip mask_invert with unmask_base to remove deprecated mask_invert flag for extcon-max77843.c - Convert to i2c's .probe_new style for extcon-fsa9480, extcon-rt8973 and extcon-usbc-uusb320.c * tag 'extcon-next-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: usbc-tusb320: Convert to i2c's .probe_new() extcon: rt8973: Convert to i2c's .probe_new() extcon: fsa9480: Convert to i2c's .probe_new() extcon: max77843: Replace irqchip mask_invert with unmask_base commit 80b99ed74e234e82298531c459c29343d0a8bcf2 Author: Bernhard Rosenkränzer Date: Tue Nov 29 03:33:58 2022 +0100 dt-bindings: pinctrl: st,stm32: Deprecate pins-are-numbered Deprecate the pins-are-numbered property Signed-off-by: Bernhard Rosenkränzer Reviewed-by: Matthias Brugger Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221129023401.278780-5-bero@baylibre.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8f7b96bd3c8be4ed29af0fd04e85bdecce89ff39 Author: Bernhard Rosenkränzer Date: Tue Nov 29 03:33:57 2022 +0100 dt-bindings: pinctrl: mediatek,mt65xx: Deprecate pins-are-numbered Make pins-are-numbered optional and deprecate it Signed-off-by: Bernhard Rosenkränzer Reviewed-by: Matthias Brugger Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221129023401.278780-4-bero@baylibre.com Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/mediatek,mt65xx-pinctrl.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b2de4316ec677e8dd09003682a1c843290b916f2 Author: Bernhard Rosenkränzer Date: Tue Nov 29 03:33:56 2022 +0100 pinctrl: stm32: Remove check for pins-are-numbered Remove the check for the unnecessary pins-are-numbered DeviceTree property Signed-off-by: Bernhard Rosenkränzer Reviewed-by: Matthias Brugger Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221129023401.278780-3-bero@baylibre.com Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 5 ----- 1 file changed, 5 deletions(-) commit 78ee2e071d1ba28ad945de86f828366583376485 Author: Bernhard Rosenkränzer Date: Tue Nov 29 03:33:55 2022 +0100 pinctrl: mediatek: common: Remove check for pins-are-numbered Remove the check for the unnecessary pins-are-numbered Devicetree property. Signed-off-by: Bernhard Rosenkränzer Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Acked-by: Krzysztof Kozlowski Acked-by: Kevin Hilman Link: https://lore.kernel.org/r/20221129023401.278780-2-bero@baylibre.com Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 6 ------ 1 file changed, 6 deletions(-) commit d5b1a27143cb7f78030bb2b6812730992a930c47 Author: Robert Richter Date: Sat Dec 3 00:40:29 2022 -0800 cxl/acpi: Extract component registers of restricted hosts from RCRB A downstream port must be connected to a component register block. For restricted hosts the base address is determined from the RCRB. The RCRB is provided by the host's CEDT CHBS entry. Rework CEDT parser to get the RCRB and add code to extract the component register block from it. RCRB's BAR[0..1] point to the component block containing CXL subsystem component registers. MEMBAR extraction follows the PCI base spec here, esp. 64 bit extraction and memory range alignment (6.0, 7.5.1.2.1). The RCRB base address is cached in the cxl_dport per-host bridge so that the upstream port component registers can be retrieved later by an RCD (RCIEP) associated with the host bridge. Note: Right now the component register block is used for HDM decoder capability only which is optional for RCDs. If unsupported by the RCD, the HDM init will fail. It is future work to bypass it in this case. Co-developed-by: Terry Bowman Signed-off-by: Terry Bowman Signed-off-by: Robert Richter Link: https://lore.kernel.org/r/Y4dsGZ24aJlxSfI1@rric.localdomain [djbw: introduce devm_cxl_add_rch_dport()] Link: https://lore.kernel.org/r/166993044524.1882361.2539922887413208807.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams drivers/cxl/acpi.c | 51 +++++++++++++++++++++++++++++---- drivers/cxl/core/port.c | 53 +++++++++++++++++++++++++++++++---- drivers/cxl/core/regs.c | 65 +++++++++++++++++++++++++++++++++++++++++++ drivers/cxl/cxl.h | 16 +++++++++++ tools/testing/cxl/Kbuild | 1 + tools/testing/cxl/test/cxl.c | 10 +++++++ tools/testing/cxl/test/mock.c | 19 +++++++++++++ tools/testing/cxl/test/mock.h | 3 ++ 8 files changed, 207 insertions(+), 11 deletions(-) commit d18bc74aced65e4ad68a30ac8db883398141e918 Author: Dan Williams Date: Thu Dec 1 14:03:41 2022 -0800 cxl/region: Manage CPU caches relative to DPA invalidation events A "DPA invalidation event" is any scenario where the contents of a DPA (Device Physical Address) is modified in a way that is incoherent with CPU caches, or if the HPA (Host Physical Address) to DPA association changes due to a remapping event. PMEM security events like Unlock and Passphrase Secure Erase already manage caches through LIBNVDIMM, so that leaves HPA to DPA remap events that need cache management by the CXL core. Those only happen when the boot time CXL configuration has changed. That event occurs when userspace attaches an endpoint decoder to a region configuration, and that region is subsequently activated. The implications of not invalidating caches between remap events is that reads from the region at different points in time may return different results due to stale cached data from the previous HPA to DPA mapping. Without a guarantee that the region contents after cxl_region_probe() are written before being read (a layering-violation assumption that cxl_region_probe() can not make) the CXL subsystem needs to ensure that reads that precede writes see consistent results. A CONFIG_CXL_REGION_INVALIDATION_TEST option is added to support debug and unit testing of the CXL implementation in QEMU or other environments where cpu_cache_has_invalidate_memregion() returns false. This may prove too restrictive for QEMU where the HDM decoders are emulated, but in that case the CXL subsystem needs some new mechanism / indication that the HDM decoder is emulated and not a passthrough of real hardware. Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/166993222098.1995348.16604163596374520890.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/Kconfig | 18 ++++++++++++++++++ drivers/cxl/core/region.c | 31 +++++++++++++++++++++++++++++++ drivers/cxl/cxl.h | 8 ++++++++ drivers/cxl/security.c | 14 -------------- 4 files changed, 57 insertions(+), 14 deletions(-) commit dc370b28c8425669e7ed5af4c01540645cfb00ec Author: Dan Williams Date: Thu Dec 1 14:03:35 2022 -0800 nvdimm/region: Move cache management to the region driver Now that cpu_cache_invalidate_memregion() is generically available, use it to centralize CPU cache management in the nvdimm region driver. This trades off removing redundant per-dimm CPU cache flushing with an opportunistic flush on every region disable event to cover the case of sensitive dirty data in the cache being written back to media after a secure erase / overwrite event. Reviewed-by: Davidlohr Bueso Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/166993221550.1995348.16843505129579060258.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/acpi/nfit/intel.c | 25 ---------------------- drivers/nvdimm/region.c | 11 ++++++++++ drivers/nvdimm/region_devs.c | 50 +++++++++++++++++++++++++++++++++++++++++++- drivers/nvdimm/security.c | 6 ++++++ include/linux/libnvdimm.h | 5 +++++ 5 files changed, 71 insertions(+), 26 deletions(-) commit 07cb5f705b4fe9e1386a610da4cb3c063267714f Author: Dan Williams Date: Thu Dec 1 14:03:30 2022 -0800 cxl/pmem: Enforce keyctl ABI for PMEM security Preclude the possibility of user tooling sending device secrets in the clear into the kernel by marking the security commands as exclusive. This mandates the usage of the keyctl ABI for managing the device passphrase. Reviewed-by: Davidlohr Bueso Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/166993221008.1995348.11651567302609703175.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/mbox.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit bf3e5da8cb43a671b32fc125fa81b8f6a3677192 Author: Dan Williams Date: Thu Dec 1 14:03:24 2022 -0800 cxl/region: Fix missing probe failure cxl_region_probe() allows for regions not in the 'commit' state to be enabled. Fail probe when the region is not committed otherwise the kernel may indicate that an address range is active when none of the decoders are active. Fixes: 8d48817df6ac ("cxl/region: Add region driver boiler plate") Cc: Reviewed-by: Davidlohr Bueso Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/166993220462.1995348.1698008475198427361.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/region.c | 3 +++ 1 file changed, 3 insertions(+) commit b5807c80b5bc49764724ca22e83c04f527e86fd4 Author: Dave Jiang Date: Thu Dec 1 14:03:19 2022 -0800 cxl: add dimm_id support for __nvdimm_create() Set the cxlds->serial as the dimm_id to be fed to __nvdimm_create(). The security code uses that as the key description for the security key of the memory device. The nvdimm unlock code cannot find the respective key without the dimm_id. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166863357043.80269.4337575149671383294.stgit@djiang5-desk3.ch.intel.com Link: https://lore.kernel.org/r/166983620459.2734609.10175456773200251184.stgit@djiang5-desk3.ch.intel.com Link: https://lore.kernel.org/r/166993219918.1995348.10786511454826454601.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams drivers/cxl/core/pmem.c | 7 +++++++ drivers/cxl/cxl.h | 3 +++ drivers/cxl/pmem.c | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) commit 1dedb6f3cf7feeb84b10c24046d8e4436173cc4d Author: Robert Richter Date: Thu Dec 1 13:33:59 2022 -0800 cxl/ACPI: Register CXL host ports by bridge device A port of a CXL host bridge links to the bridge's ACPI device (&adev->dev) with its corresponding uport/dport device (uport_dev and dport_dev respectively). The device is not a direct parent device in the PCI topology as pdev->dev.parent points to a PCI bridge's (struct pci_host_bridge) device. The following CXL memory device hierarchy would be valid for an endpoint once an RCD EP would be enabled (note this will be done in a later patch): VH mode: cxlmd->dev.parent->parent ^^^\^^^^^^\ ^^^^^^\ \ \ pci_dev (Type 1, Downstream Port) \ pci_dev (Type 0, PCI Express Endpoint) cxl mem device RCD mode: cxlmd->dev.parent->parent ^^^\^^^^^^\ ^^^^^^\ \ \ pci_host_bridge \ pci_dev (Type 0, RCiEP) cxl mem device In VH mode a downstream port is created by port enumeration and thus always exists. Now, in RCD mode the host bridge also already exists but it references to an ACPI device. A port lookup by the PCI device's parent device will fail as a direct link to the registered port is missing. The ACPI device of the bridge must be determined first. To prevent this, change port registration of a CXL host to use the bridge device instead. Do this also for the VH case as port topology will better reflect the PCI topology then. Signed-off-by: Robert Richter [djbw: rebase on brige mocking] Reviewed-by: Robert Richter Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/166993043978.1882361.16238060349889579369.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams drivers/cxl/acpi.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit 8b3b1c0dc500a00c34ab74fb8a0d9e7286220c04 Author: Dan Williams Date: Thu Dec 1 13:33:54 2022 -0800 tools/testing/cxl: Make mock CEDT parsing more robust Accept any cxl_test topology device as the first argument in cxl_chbs_context. This is in preparation for reworking the detection of the component registers across VH and RCH topologies. Move mock_acpi_table_parse_cedt() beneath the definition of is_mock_port() and use is_mock_port() instead of the explicit mock cxl_acpi device check. Acked-by: Alison Schofield Reviewed-by: Robert Richter Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/166993043433.1882361.17651413716599606118.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams drivers/cxl/acpi.c | 4 ++++ tools/testing/cxl/test/cxl.c | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) commit 4029c32fb601d505dfb92bdf0db9fdcc41fe1434 Author: Dan Williams Date: Thu Dec 1 13:33:48 2022 -0800 cxl/acpi: Move rescan to the workqueue Now that the cxl_mem driver has a need to take the root device lock, the cxl_bus_rescan() needs to run outside of the root lock context. That need arises from RCH topologies and the locking that the cxl_mem driver does to attach a descendant to an upstream port. In the RCH case the lock needed is the CXL root device lock [1]. Link: http://lore.kernel.org/r/166993045621.1882361.1730100141527044744.stgit@dwillia2-xfh.jf.intel.com [1] Tested-by: Robert Richter Link: http://lore.kernel.org/r/166993042884.1882361.5633723613683058881.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams drivers/cxl/acpi.c | 17 +++++++++++++++-- drivers/cxl/core/port.c | 19 +++++++++++++++++-- drivers/cxl/cxl.h | 3 ++- 3 files changed, 34 insertions(+), 5 deletions(-) commit 03ff079aa633369763bc0b7409b0a3a8ffa21d40 Author: Dan Williams Date: Thu Dec 1 13:33:43 2022 -0800 cxl/pmem: Remove the cxl_pmem_wq and related infrastructure Now that cxl_nvdimm and cxl_pmem_region objects are torn down sychronously with the removal of either the bridge, or an endpoint, the cxl_pmem_wq infrastructure can be jettisoned. Tested-by: Robert Richter Link: https://lore.kernel.org/r/166993042335.1882361.17022872468068436287.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams drivers/cxl/core/pmem.c | 22 -------- drivers/cxl/cxl.h | 17 ------ drivers/cxl/pmem.c | 143 +----------------------------------------------- 3 files changed, 1 insertion(+), 181 deletions(-) commit f17b558d6663101f876a1d9cbbad3de0c8f4ce4d Author: Dan Williams Date: Thu Dec 1 13:33:37 2022 -0800 cxl/pmem: Refactor nvdimm device registration, delete the workqueue The three objects 'struct cxl_nvdimm_bridge', 'struct cxl_nvdimm', and 'struct cxl_pmem_region' manage CXL persistent memory resources. The bridge represents base platform resources, the nvdimm represents one or more endpoints, and the region is a collection of nvdimms that contribute to an assembled address range. Their relationship is such that a region is torn down if any component endpoints are removed. All regions and endpoints are torn down if the foundational bridge device goes down. A workqueue was deployed to manage these interdependencies, but it is difficult to reason about, and fragile. A recent attempt to take the CXL root device lock in the cxl_mem driver was reported by lockdep as colliding with the flush_work() in the cxl_pmem flows. Instead of the workqueue, arrange for all pmem/nvdimm devices to be torn down immediately and hierarchically. A similar change is made to both the 'cxl_nvdimm' and 'cxl_pmem_region' objects. For bisect-ability both changes are made in the same patch which unfortunately makes the patch bigger than desired. Arrange for cxl_memdev and cxl_region to register a cxl_nvdimm and cxl_pmem_region as a devres release action of the bridge device. Additionally, include a devres release action of the cxl_memdev or cxl_region device that triggers the bridge's release action if an endpoint exits before the bridge. I.e. this allows either unplugging the bridge, or unplugging and endpoint to result in the same cleanup actions. To keep the patch smaller the cleanup of the now defunct workqueue infrastructure is saved for a follow-on patch. Tested-by: Robert Richter Link: https://lore.kernel.org/r/166993041773.1882361.16444301376147207609.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams drivers/cxl/core/pmem.c | 78 ++++++++++++++++++++++++---- drivers/cxl/core/region.c | 64 +++++++++++++++++++++-- drivers/cxl/cxl.h | 7 ++- drivers/cxl/cxlmem.h | 4 ++ drivers/cxl/mem.c | 9 ++++ drivers/cxl/pci.c | 3 -- drivers/cxl/pmem.c | 121 +++++++++++++------------------------------ tools/testing/cxl/test/mem.c | 3 -- 8 files changed, 181 insertions(+), 108 deletions(-) commit 16d53cb0d6900ba7c5920397480016d3ee844610 Author: Dan Williams Date: Thu Dec 1 13:33:32 2022 -0800 cxl/region: Drop redundant pmem region release handling Now that a cxl_nvdimm object can only experience ->remove() via an unregistration event (because the cxl_nvdimm bind attributes are suppressed), additional cleanups are possible. It is already the case that the removal of a cxl_memdev object triggers ->remove() on any associated region. With that mechanism in place there is no need for the cxl_nvdimm removal to trigger the same. Just rely on cxl_region_detach() to tear down the whole cxl_pmem_region. Tested-by: Robert Richter Link: https://lore.kernel.org/r/166993041215.1882361.6321535567798911286.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams drivers/cxl/core/pmem.c | 2 -- drivers/cxl/cxl.h | 1 - drivers/cxl/pmem.c | 90 ------------------------------------------------- 3 files changed, 93 deletions(-) commit 5313121b22fd11db0d14f305c110168b8176efdc Author: Uwe Kleine-König Date: Fri Nov 18 23:35:44 2022 +0100 extcon: usbc-tusb320: 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: Chanwoo Choi drivers/extcon/extcon-usbc-tusb320.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 881de30c28ac0725ab8fb9af905b568a849f8d0f Author: Uwe Kleine-König Date: Fri Nov 18 23:35:43 2022 +0100 extcon: rt8973: 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: Chanwoo Choi drivers/extcon/extcon-rt8973a.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit df9c4faa81c9659eefc9e149ae9b2124de17dfa7 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:42 2022 +0100 extcon: fsa9480: 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: Chanwoo Choi drivers/extcon/extcon-fsa9480.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5de7cdd7fa0f62b3e8d2facc8f604e49d887677e Author: Aidan MacDonald Date: Sat Nov 12 15:24:46 2022 +0000 extcon: max77843: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi drivers/extcon/extcon-max77843.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 65e6af6cebefbf7d8d8ac52b71cd251c2071ad00 Author: Lorenzo Bianconi Date: Thu Dec 1 16:26:53 2022 +0100 net: ethernet: mtk_wed: fix sleep while atomic in mtk_wed_wo_queue_refill In order to fix the following sleep while atomic bug always alloc pages with GFP_ATOMIC in mtk_wed_wo_queue_refill since page_frag_alloc runs in spin_lock critical section. [ 9.049719] Hardware name: MediaTek MT7986a RFB (DT) [ 9.054665] Call trace: [ 9.057096] dump_backtrace+0x0/0x154 [ 9.060751] show_stack+0x14/0x1c [ 9.064052] dump_stack_lvl+0x64/0x7c [ 9.067702] dump_stack+0x14/0x2c [ 9.071001] ___might_sleep+0xec/0x120 [ 9.074736] __might_sleep+0x4c/0x9c [ 9.078296] __alloc_pages+0x184/0x2e4 [ 9.082030] page_frag_alloc_align+0x98/0x1ac [ 9.086369] mtk_wed_wo_queue_refill+0x134/0x234 [ 9.090974] mtk_wed_wo_init+0x174/0x2c0 [ 9.094881] mtk_wed_attach+0x7c8/0x7e0 [ 9.098701] mt7915_mmio_wed_init+0x1f0/0x3a0 [mt7915e] [ 9.103940] mt7915_pci_probe+0xec/0x3bc [mt7915e] [ 9.108727] pci_device_probe+0xac/0x13c [ 9.112638] really_probe.part.0+0x98/0x2f4 [ 9.116807] __driver_probe_device+0x94/0x13c [ 9.121147] driver_probe_device+0x40/0x114 [ 9.125314] __driver_attach+0x7c/0x180 [ 9.129133] bus_for_each_dev+0x5c/0x90 [ 9.132953] driver_attach+0x20/0x2c [ 9.136513] bus_add_driver+0x104/0x1fc [ 9.140333] driver_register+0x74/0x120 [ 9.144153] __pci_register_driver+0x40/0x50 [ 9.148407] mt7915_init+0x5c/0x1000 [mt7915e] [ 9.152848] do_one_initcall+0x40/0x25c [ 9.156669] do_init_module+0x44/0x230 [ 9.160403] load_module+0x1f30/0x2750 [ 9.164135] __do_sys_init_module+0x150/0x200 [ 9.168475] __arm64_sys_init_module+0x18/0x20 [ 9.172901] invoke_syscall.constprop.0+0x4c/0xe0 [ 9.177589] do_el0_svc+0x48/0xe0 [ 9.180889] el0_svc+0x14/0x50 [ 9.183929] el0t_64_sync_handler+0x9c/0x120 [ 9.188183] el0t_64_sync+0x158/0x15c Fixes: 799684448e3e ("net: ethernet: mtk_wed: introduce wed wo support") Signed-off-by: Lorenzo Bianconi Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/67ca94bdd3d9eaeb86e52b3050fbca0bcf7bb02f.1669908312.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_wed_wo.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 55fb80d518c7323d05b71eda0c9f9d657b373816 Author: Eric Dumazet Date: Fri Dec 2 05:28:47 2022 +0000 tcp: use 2-arg optimal variant of kfree_rcu() kfree_rcu(1-arg) should be avoided as much as possible, since this is only possible from sleepable contexts, and incurr extra rcu barriers. I wish the 1-arg variant of kfree_rcu() would get a distinct name, like kfree_rcu_slow() to avoid it being abused. Fixes: 459837b522f7 ("net/tcp: Disable TCP-MD5 static key on tcp_md5sig_info destruction") Signed-off-by: Eric Dumazet Cc: Paul E. McKenney Reviewed-by: Pavan Chebbi Reviewed-by: Dmitry Safonov Link: https://lore.kernel.org/r/20221202052847.2623997-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/tcp_ipv4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit edd4e25a230dc8a977fca667db788424917ca2f3 Merge: dbadae927287 d03407183d97 Author: Jakub Kicinski Date: Fri Dec 2 20:33:29 2022 -0800 Merge tag 'wireless-next-2022-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.2 Third set of patches for v6.2. mt76 has a new driver for mt7996 Wi-Fi 7 devices and iwlwifi also got initial Wi-Fi 7 support. Otherwise smaller features and fixes. Major changes: ath10k - store WLAN firmware version in SMEM image table mt76 - mt7996: new driver for MediaTek Wi-Fi 7 (802.11be) devices - mt7986, mt7915: enable Wireless Ethernet Dispatch (WED) offload support - mt7915: add ack signal support - mt7915: enable coredump support - mt7921: remain_on_channel support - mt7921: channel context support iwlwifi - enable Wi-Fi 7 Extremely High Throughput (EHT) PHY capabilities - 320 MHz channels support * tag 'wireless-next-2022-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (144 commits) wifi: ath10k: fix QCOM_SMEM dependency wifi: mt76: mt7921e: add pci .shutdown() support wifi: mt76: mt7915: mmio: fix naming convention wifi: mt76: mt7996: add support to configure spatial reuse parameter set wifi: mt76: mt7996: enable ack signal support wifi: mt76: mt7996: enable use_cts_prot support wifi: mt76: mt7915: rely on band_idx of mt76_phy wifi: mt76: mt7915: enable per bandwidth power limit support wifi: mt76: mt7915: introduce mt7915_get_power_bound() mt76: mt7915: Fix PCI device refcount leak in mt7915_pci_init_hif2() wifi: mt76: do not send firmware FW_FEATURE_NON_DL region wifi: mt76: mt7921: Add missing __packed annotation of struct mt7921_clc wifi: mt76: fix coverity overrun-call in mt76_get_txpower() wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices wifi: mt76: mt76x0: remove dead code in mt76x0_phy_get_target_power wifi: mt76: mt7915: fix band_idx usage wifi: mt76: mt7915: enable .sta_set_txpwr support wifi: mt76: mt7915: add basedband Txpower info into debugfs wifi: mt76: mt7915: add support to configure spatial reuse parameter set wifi: mt76: mt7915: add missing MODULE_PARM_DESC ... ==================== Link: https://lore.kernel.org/r/20221202214254.D0D3DC433C1@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 7e6fb67808ab5ceba73a6f45d0942e1e25ac56a7 Author: Hans de Goede Date: Mon Nov 28 10:28:49 2022 +0100 power: supply: bq25890: Fix usb-notifier probe and remove races There are 2 races surrounding the usb-notifier: 1. The notifier, and thus usb_work, may run before the bq->charger power_supply class device is registered. But usb_work may call power_supply_changed() which relies on the psy device being registered. 2. usb_work may be pending/running at remove() time, so it needs to be cancelled on remove after unregistering the usb-notifier. Fix 1. by moving usb-notifier registration to after the power_supply registration. Fix 2. by adding a cancel_work_sync() call directly after the usb-notifier unregistration. Reviewed-by: Marek Vasut Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) commit a7aaa80098d5b7608b2dc1e883e3c3f929415243 Author: Hans de Goede Date: Mon Nov 28 10:28:48 2022 +0100 power: supply: bq25890: Ensure pump_express_work is cancelled on remove The pump_express_work which gets queued from an external_power_changed callback might be pending / running on remove() (or on probe failure). Add a devm action cancelling the work, to ensure that it is cancelled. Note the devm action is added before devm_power_supply_register(), making it run after devm unregisters the power_supply, so that the work cannot be queued anymore (this is also why a devm action is used for this). Fixes: 48f45b094dbb ("power: supply: bq25890: Support higher charging voltages through Pump Express+ protocol") Reviewed-by: Marek Vasut Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 54c03bfd094fb74f9533a9c28250219afe182382 Author: Qiheng Lin Date: Mon Nov 28 22:27:40 2022 +0800 power: supply: Fix refcount leak in rk817_charger_probe of_get_child_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 11cb8da0189b ("power: supply: Add charger driver for Rockchip RK817") Signed-off-by: Qiheng Lin Reviewed-by: Chris Morgan Signed-off-by: Sebastian Reichel drivers/power/supply/rk817_charger.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9704beac94d0506b4ecfa3b3b64a9bf4e298fdf2 Merge: b57c2f124098 c5b4216929eb Author: Palmer Dabbelt Date: Fri Dec 2 16:47:22 2022 -0800 Merge patch series "Support VMCOREINFO export for RISCV64" Add arch_crash_save_vmcoreinfo(), which exports VM layout(MODULES, VMALLOC, VMEMMAP ranges and KERNEL_LINK_ADDR), va bits and ram base for vmcore. * b4-shazam-merge: Documentation: kdump: describe VMCOREINFO export for RISCV64 RISC-V: Add arch_crash_save_vmcoreinfo support Link: https://lore.kernel.org/r/20221026144208.373504-1-xianting.tian@linux.alibaba.com Signed-off-by: Palmer Dabbelt commit c5b4216929ebc8ac9107a373db65babc14ba4e80 Author: Xianting Tian Date: Wed Oct 26 22:42:08 2022 +0800 Documentation: kdump: describe VMCOREINFO export for RISCV64 The following interrelated definitions and ranges are needed by the kdump crash tool, which are exported by "arch/riscv/kernel/crash_core.c": VA_BITS, PAGE_OFFSET, phys_ram_base, KERNEL_LINK_ADDR, MODULES_VADDR ~ MODULES_END, VMALLOC_START ~ VMALLOC_END, VMEMMAP_START ~ VMEMMAP_END, Document these RISCV64 exports above. Reviewed-by: Bagas Sanjaya Signed-off-by: Xianting Tian Acked-by: Baoquan He Link: https://lore.kernel.org/r/20221026144208.373504-3-xianting.tian@linux.alibaba.com [Palmer: wrap commit text] Signed-off-by: Palmer Dabbelt Documentation/admin-guide/kdump/vmcoreinfo.rst | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 649d6b1019a2f243bc3a98cb85902a8ebf74289a Author: Xianting Tian Date: Wed Oct 26 22:42:07 2022 +0800 RISC-V: Add arch_crash_save_vmcoreinfo support Add arch_crash_save_vmcoreinfo(), which exports VM layout(MODULES, VMALLOC, VMEMMAP ranges and KERNEL_LINK_ADDR), va bits and ram base for vmcore. Default pagetable levels and PAGE_OFFSET aren't same for different kernel version as below. For pagetable levels, it sets sv57 by default and falls back to setting sv48 at boot time if sv57 is not supported by the hardware. For ram base, the default value is 0x80200000 for qemu riscv64 env and, for example, is 0x200000 on the XuanTie 910 CPU. * Linux Kernel 5.18 ~ * PGTABLE_LEVELS = 5 * PAGE_OFFSET = 0xff60000000000000 * Linux Kernel 5.17 ~ * PGTABLE_LEVELS = 4 * PAGE_OFFSET = 0xffffaf8000000000 * Linux Kernel 4.19 ~ * PGTABLE_LEVELS = 3 * PAGE_OFFSET = 0xffffffe000000000 Since these configurations change from time to time and version to version, it is preferable to export them via vmcoreinfo than to change the crash's code frequently, it can simplify the development of crash tool. Signed-off-by: Xianting Tian Tested-by: Deepak Gupta Tested-by: Guo Ren Acked-by: Baoquan He Link: https://lore.kernel.org/r/20221026144208.373504-2-xianting.tian@linux.alibaba.com [Palmer: wrap commit text] Signed-off-by: Palmer Dabbelt arch/riscv/kernel/Makefile | 1 + arch/riscv/kernel/crash_core.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) commit 706819495921ddad6b3780140b9d9e9293b6dedc Author: Xin Liu Date: Fri Dec 2 16:17:38 2022 +0800 libbpf: Improve usability of libbpf Makefile Current libbpf Makefile does not contain the help command, which is inconvenient to use. Similar to the Makefile help command of the perf, a help command is provided to list the commands supported by libbpf make and the functions of the commands. Signed-off-by: Xin Liu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221202081738.128513-1-liuxin350@huawei.com tools/lib/bpf/Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit f16a7aa5c2be3134d3b72078b94f36d639552888 Author: James Hilliard Date: Thu Dec 1 12:09:39 2022 -0700 selftests/bpf: Add GCC compatible builtins to bpf_legacy.h The bpf_legacy.h header uses llvm specific load functions, add GCC compatible variants as well to fix tests using these functions under GCC. Signed-off-by: James Hilliard Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221201190939.3230513-1-james.hilliard1@gmail.com tools/testing/selftests/bpf/bpf_legacy.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit e1fce564900f8734edf15b87f028c57e14f6e28d Author: Wang Yufen Date: Fri Dec 2 16:22:54 2022 +0800 pstore/ram: Fix error return code in ramoops_probe() In the if (dev_of_node(dev) && !pdata) path, the "err" may be assigned a value of 0, so the error return code -EINVAL may be incorrectly set to 0. To fix set valid return code before calling to goto. Fixes: 35da60941e44 ("pstore/ram: add Device Tree bindings") Signed-off-by: Wang Yufen Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/1669969374-46582-1-git-send-email-wangyufen@huawei.com fs/pstore/ram.c | 2 ++ 1 file changed, 2 insertions(+) commit fba395369af5b9ca9c091ec3bfdb02915e8f1141 Author: ye xingchen Date: Fri Nov 25 15:16:22 2022 +0800 PM / devfreq: Use device_match_of_node() Replace the open-code with device_match_of_node(). Signed-off-by: ye xingchen Signed-off-by: Chanwoo Choi drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56232e933dd6a930167f0147463e8d07851278ec Author: Uwe Kleine-König Date: Fri Nov 18 23:40:01 2022 +0100 Input: zforce_ts - 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-268-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/zforce_ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f8684ea53977390143d69385b7808035bc04053c Author: Uwe Kleine-König Date: Fri Nov 18 23:40:00 2022 +0100 Input: zet6223 - 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-267-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/zet6223.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8360705a6c3eeb58f5df0d2015c0b77d1461de3d Author: Uwe Kleine-König Date: Fri Nov 18 23:39:59 2022 +0100 Input: wdt87xx_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 Link: https://lore.kernel.org/r/20221118224540.619276-266-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/wdt87xx_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0a3098db138c494c9289ba11a558f33b9d389347 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:58 2022 +0100 Input: wacom_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 Reviewed-by: Alistair Francis Link: https://lore.kernel.org/r/20221118224540.619276-265-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/wacom_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4e9d70a98f80911fb231d76208f16f792f75f665 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:57 2022 +0100 Input: tsc2007_core - 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-264-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tsc2007_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cd66fd103ee9e51235c6add40b2fbb876ce027b9 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:56 2022 +0100 Input: tsc2004 - 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-263-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tsc2004.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bc0bbf91c4bbdb0173827463ef41c3d26165e1db Author: Uwe Kleine-König Date: Fri Nov 18 23:39:55 2022 +0100 Input: sx8654 - 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-262-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/sx8654.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3d2f81819a078cd3cf23df827212e9959a207f7a Author: Uwe Kleine-König Date: Fri Nov 18 23:39:54 2022 +0100 Input: stmfts - 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-261-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/stmfts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8ff48be322fbce75fd0ca9fcb6c950e87db22171 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:53 2022 +0100 Input: st1232 - 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-260-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/st1232.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6440fab21644bec742b58cc2133b4b0a0d8e5710 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:52 2022 +0100 Input: sis_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 Link: https://lore.kernel.org/r/20221118224540.619276-259-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/sis_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 09a77dc4d46225257af8280fa85797cc6fe921b1 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:51 2022 +0100 Input: silead - 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: Hans de Goede Link: https://lore.kernel.org/r/20221118224540.619276-258-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/silead.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 62ba881ad99ba15b9948065f4212d70734648bd9 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:50 2022 +0100 Input: s6sy761 - 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-257-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/s6sy761.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 57e72dd78ba7534265c62b84047399ee97babb07 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:49 2022 +0100 Input: rohm_bu21023 - 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-256-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/rohm_bu21023.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 962bf0ec19e2d9846c618a7fb24e8a89f12150af Author: Uwe Kleine-König Date: Fri Nov 18 23:39:48 2022 +0100 Input: raydium_i2c_ts - 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-255-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/raydium_i2c_ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 211ab70dbb82dc36e4954d4e2a7fd75b25a045d9 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:47 2022 +0100 Input: pixcir_i2c_ts - 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-254-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/pixcir_i2c_ts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5e857ccf1f84179eac5aca8a57f708055cd7ae67 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:46 2022 +0100 Input: mms114 - 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-253-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/mms114.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ff3de86309358ea701743609c060e4b58dee1bde Author: Uwe Kleine-König Date: Fri Nov 18 23:39:45 2022 +0100 Input: migor_ts - 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-252-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/migor_ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5a2b1cf32d3cea09f7c6292487bf7bca359636c3 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:44 2022 +0100 Input: melfas_mip4 - 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-251-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/melfas_mip4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e0715e3c8c5c7342e861e89bbd279e8f317a9d8a Author: Uwe Kleine-König Date: Fri Nov 18 23:39:43 2022 +0100 Input: mcs5000_ts - 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-250-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/mcs5000_ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit edaa7aa9d8bd706ac721485440b901903eae56b5 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:42 2022 +0100 Input: max11801_ts - 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-249-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/max11801_ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dd271dd94a508cba1dd1fd269799369f762720d9 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:41 2022 +0100 Input: iqs5xx - 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: Jeff LaBundy Link: https://lore.kernel.org/r/20221118224540.619276-248-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/iqs5xx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 19a28e791c8232cfd6593676d2e655942b812f10 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:40 2022 +0100 Input: ilitek_ts_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 Link: https://lore.kernel.org/r/20221118224540.619276-247-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ilitek_ts_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 497a2c8e05ba05983ab72c2cbadcbbed791fd4f1 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:39 2022 +0100 Input: ili210x - 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-246-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ili210x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cb812d3985d2d1cf95507273baf6b7033ee25b28 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:38 2022 +0100 Input: hycon-hy46xx - 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-245-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/hycon-hy46xx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4d1c7cc69d13bde612bfd28b60cbea6eb920ccd9 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:37 2022 +0100 Input: hx83112b: 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-244-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/himax_hx83112b.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d4be9206aeb93ef890213fe18168bb7d5760b097 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:36 2022 +0100 Input: hideep - 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-243-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/hideep.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6056d49bfd1e74c9fa061ca59034de3a0b834b4d Author: Uwe Kleine-König Date: Fri Nov 18 23:39:35 2022 +0100 Input: goodix - 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: Hans de Goede Link: https://lore.kernel.org/r/20221118224540.619276-242-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/goodix.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4e4c8b54687942ab50863f92015867aeb7be15d0 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:34 2022 +0100 Input: ektf2127 - 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-241-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ektf2127.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0b754b03591c4615de3ae5d1a4df307143201a6b Author: Uwe Kleine-König Date: Fri Nov 18 23:39:33 2022 +0100 Input: egalax_ts - 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-240-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/egalax_ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 923366e9faff895bd42b65e4be1c3d036e8f0958 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:32 2022 +0100 Input: eeti_ts - 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-239-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/eeti_ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e7c31218086fa126bfddbaeb2c64b469ab86cd1d Author: Uwe Kleine-König Date: Fri Nov 18 23:39:31 2022 +0100 Input: edt-ft5x06 - 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: Oliver Graute Link: https://lore.kernel.org/r/20221118224540.619276-238-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 667c577a0160a79ff9f635c1f2f0d93be763a3db Author: Uwe Kleine-König Date: Fri Nov 18 23:39:30 2022 +0100 Input: cyttsp_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 Link: https://lore.kernel.org/r/20221118224540.619276-237-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/cyttsp_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit eebf2bf1f591fd23d03958743da28415ea975281 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:29 2022 +0100 Input: cyttsp5: 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-236-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/cyttsp5.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9ec6bc8b41a83ff7a26d6a36b86d0e5d658ea1f6 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:28 2022 +0100 Input: cyttsp4 - 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-235-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/cyttsp4_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 520bc8fb7ae5f8ffb83974cf30fd91de3568e43e Author: Uwe Kleine-König Date: Fri Nov 18 23:39:27 2022 +0100 Input: cy8ctmg110_ts - 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-234-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/cy8ctmg110_ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4baa30118d4db212117ead2348eb6b6b95117b77 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:26 2022 +0100 Input: cy8ctma140 - 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-233-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/cy8ctma140.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4e499793a7f7b0939fb8c79273925549e6ab4f14 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:25 2022 +0100 Input: chipone_icn8318 - 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: Hans de Goede Link: https://lore.kernel.org/r/20221118224540.619276-232-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/chipone_icn8318.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dbb690c180660bd5708a65c9e1f964124ee807a3 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:24 2022 +0100 Input: bu21029_ts - 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-231-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/bu21029_ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f1a1ea015751a3a29f6d515aec1b7a154541774a Author: Uwe Kleine-König Date: Fri Nov 18 23:39:23 2022 +0100 Input: bu21013_ts - 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-230-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/bu21013_ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 771d0539e1f7c39d6f3d9cdefeb86c0487a35b85 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:22 2022 +0100 Input: auo-pixcir-ts - 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: Heiko Stuebner Link: https://lore.kernel.org/r/20221118224540.619276-229-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/auo-pixcir-ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1d0fd91fabffaf84c349872df63697ea6630026d Author: Uwe Kleine-König Date: Fri Nov 18 23:39:21 2022 +0100 Input: atmel_mxt_ts - 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-228-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 92f63271687b12807136b73c8ca86ee98b115315 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:20 2022 +0100 Input: ar1021_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 Link: https://lore.kernel.org/r/20221118224540.619276-227-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ar1021_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f2a19deed7e4416ca459048bc82571370e9ef011 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:19 2022 +0100 Input: ad7879-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 Link: https://lore.kernel.org/r/20221118224540.619276-226-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3684d80339c6c16af88890eb748b53add3fc0dd4 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:18 2022 +0100 Input: rmi_smbus - 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-225-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_smbus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f4ae4f03f913e1f0def78f1dc23bf86934109485 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:17 2022 +0100 Input: rmi_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 Link: https://lore.kernel.org/r/20221118224540.619276-224-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 05b2456d9dbe2c798010be7f636c734248ecd99a Author: Uwe Kleine-König Date: Fri Nov 18 23:39:16 2022 +0100 Input: synaptics_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 Link: https://lore.kernel.org/r/20221118224540.619276-223-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fbe2715cbc80bc1d3769a5368de5b1a5fb101f37 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:15 2022 +0100 Input: elan_i2c_core - 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: Hans de Goede Link: https://lore.kernel.org/r/20221118224540.619276-222-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cc6490c640dbb88089f895a4a951a9bd3dcfa8a2 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:14 2022 +0100 Input: cyapa - 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-221-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/cyapa.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f8630ccde5a5860e4a47b247e3065c0da022f225 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:13 2022 +0100 Input: pcf8574_keypad - 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-220-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/pcf8574_keypad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7f4a8e20e500804006960d18b9ea6e88dae94af4 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:12 2022 +0100 Input: mma8450 - 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-219-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/mma8450.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b05989d773d985f472dc70b8c46741efab6258fd Author: Uwe Kleine-König Date: Fri Nov 18 23:39:11 2022 +0100 Input: kxtj9 - 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-218-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/kxtj9.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b67df1e1285e20ac46e83c3cc71118a9db8b31d4 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:10 2022 +0100 Input: ibm-panel - 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-217-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/ibm-panel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 18dfbd318150f901e7cef792babc8605b461da9d Author: Uwe Kleine-König Date: Fri Nov 18 23:39:09 2022 +0100 Input: drv2667 - 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-216-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/drv2667.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 110c0a46e7ee64ebd2a3bc6f0ab996fa48d178d4 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:08 2022 +0100 Input: drv2665 - 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-215-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/drv2665.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9555491625bb2682b8ee2a922e3cc6ed64eb1385 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:07 2022 +0100 Input: drv260x - 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-214-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/drv260x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 642ff4850df366236a864ff1741a649fc1264991 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:06 2022 +0100 Input: da7280 - 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-213-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/da7280.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c1ae0e98b0d138ba102b652667d0c711ce929331 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:05 2022 +0100 Input: cma3000_d0x_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 Link: https://lore.kernel.org/r/20221118224540.619276-212-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/cma3000_d0x_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8140acff121736e4e673c5c7533bf6dd5ffbd946 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:04 2022 +0100 Input: bma150 - 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-211-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/bma150.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 22972ef8093378f9eb9729ea7a17c5ab6df00950 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:03 2022 +0100 Input: atmel_captouch - 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-210-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/atmel_captouch.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 619f318f952d261208220bf0b350fe701ee5cc60 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:02 2022 +0100 Input: apanel - 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-209-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/apanel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e186e84ee5da4509447e0777acf46e35b1e1055a Author: Uwe Kleine-König Date: Fri Nov 18 23:39:01 2022 +0100 Input: adxl34x-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 Link: https://lore.kernel.org/r/20221118224540.619276-208-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/adxl34x-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d9526001504ebd3401ea6c5a584c90f3cb5b7c58 Author: Uwe Kleine-König Date: Fri Nov 18 23:39:00 2022 +0100 Input: ad714x-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 Link: https://lore.kernel.org/r/20221118224540.619276-207-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/misc/ad714x-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c933db7e6c258af427f554c3b7fa3ea8f41ba4f9 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:59 2022 +0100 Input: tm2-touchkey - 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-206-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tm2-touchkey.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1ce2619cf61a50ae35230b7d57cd33e4f93f4cf6 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:58 2022 +0100 Input: tca8418_keypad - 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-205-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tca8418_keypad.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3da11976b80c663181172065caea1a6b38e7dce8 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:57 2022 +0100 Input: tca6416-keypad - 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-204-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tca6416-keypad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b37a4c1bd2aeff728960c36a283977f2a88be3a8 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:56 2022 +0100 Input: qt2160 - 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-203-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/qt2160.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ee27fe8adb4ae2174abc2c46dae5a6420a75a596 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:55 2022 +0100 Input: qt1070 - 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-202-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/qt1070.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2aa677480bda9fc4e28cbd85a3f7d166d53aeb28 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:54 2022 +0100 Input: mpr121_touchkey - 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-201-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mpr121_touchkey.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 742c4687df155cf9d3c54ef5a25601a439bec263 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:53 2022 +0100 Input: mcs_touchkey - 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-200-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mcs_touchkey.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f424fe080efe285b03c482ddd0bfb95c83f6c340 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:52 2022 +0100 Input: max7359_keypad - 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-199-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/max7359_keypad.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 37bbce75fab26514fc8f50d837d70f2e45606a66 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:51 2022 +0100 Input: lm8333 - 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-198-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/lm8333.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0985fe754d751de97803531319f4380bf58e2682 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:50 2022 +0100 Input: lm8323 - 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-197-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/lm8323.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7d7cc76fc03f0bf974412f1086cfbd247ba4d124 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:49 2022 +0100 Input: dlink-dir685-touchkeys - 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-196-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/dlink-dir685-touchkeys.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 15214ab26928a780f20bfc18a19ee7b93c630229 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:48 2022 +0100 Input: cap11xx - 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-195-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/cap11xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5a5fa6583e856e134d3a27db5b4c90020c3bfc9a Author: Uwe Kleine-König Date: Fri Nov 18 23:38:47 2022 +0100 Input: adp5589-keys - 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-194-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/adp5589-keys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f043ad51e5c651cc8e45ebd2c13fa61aef0b3a5f Author: Uwe Kleine-König Date: Fri Nov 18 23:38:46 2022 +0100 Input: adp5588-keys - 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: Michael Hennerich Link: https://lore.kernel.org/r/20221118224540.619276-193-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/adp5588-keys.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 37ab3d75b4d24cda3919d5b2ce2c49c0967a6f8f Author: Uwe Kleine-König Date: Fri Nov 18 23:38:45 2022 +0100 Input: as5011 - 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-192-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/as5011.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3d94887aca09b00be5af7c5491a7c6428ea39a85 Merge: a5df8025f37a 662233731d66 Author: Dmitry Torokhov Date: Fri Dec 2 14:52:41 2022 -0800 Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into next Bring in i2c_client_get_device_id() helper in order to apply patches converting I2C input devices to probe_new(). commit 035641b01e72af4f6c6cf22a4bdb5d7dfc4e8e8e Author: Peter Korsgaard Date: Wed Nov 16 07:16:56 2022 +0100 dm init: add dm-mod.waitfor to wait for asynchronously probed block devices Just calling wait_for_device_probe() is not enough to ensure that asynchronously probed block devices are available (E.G. mmc, usb), so add a "dm-mod.waitfor=[,..,]" parameter to get dm-init to explicitly wait for specific block devices before initializing the tables with logic similar to the rootwait logic that was introduced with commit cc1ed7542c8c ("init: wait for asynchronously scanned block devices"). E.G. with dm-verity on mmc using: dm-mod.waitfor="PARTLABEL=hash-a,PARTLABEL=root-a" [ 0.671671] device-mapper: init: waiting for all devices to be available before creating mapped devices [ 0.671679] device-mapper: init: waiting for device PARTLABEL=hash-a ... [ 0.710695] mmc0: new HS200 MMC card at address 0001 [ 0.711158] mmcblk0: mmc0:0001 004GA0 3.69 GiB [ 0.715954] mmcblk0boot0: mmc0:0001 004GA0 partition 1 2.00 MiB [ 0.722085] mmcblk0boot1: mmc0:0001 004GA0 partition 2 2.00 MiB [ 0.728093] mmcblk0rpmb: mmc0:0001 004GA0 partition 3 512 KiB, chardev (249:0) [ 0.738274] mmcblk0: p1 p2 p3 p4 p5 p6 p7 [ 0.751282] device-mapper: init: waiting for device PARTLABEL=root-a ... [ 0.751306] device-mapper: init: all devices available [ 0.751683] device-mapper: verity: sha256 using implementation "sha256-generic" [ 0.759344] device-mapper: ioctl: dm-0 (vroot) is ready [ 0.766540] VFS: Mounted root (squashfs filesystem) readonly on device 254:0. Signed-off-by: Peter Korsgaard Signed-off-by: Mike Snitzer .../admin-guide/device-mapper/dm-init.rst | 8 ++++++++ drivers/md/dm-init.c | 22 +++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) commit 6a46bf558803dd2b959ca7435a5c143efe837217 Author: Liu Shixin Date: Wed Nov 2 10:51:23 2022 +0800 binfmt_misc: fix shift-out-of-bounds in check_special_flags UBSAN reported a shift-out-of-bounds warning: left shift of 1 by 31 places cannot be represented in type 'int' Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8d/0xcf lib/dump_stack.c:106 ubsan_epilogue+0xa/0x44 lib/ubsan.c:151 __ubsan_handle_shift_out_of_bounds+0x1e7/0x208 lib/ubsan.c:322 check_special_flags fs/binfmt_misc.c:241 [inline] create_entry fs/binfmt_misc.c:456 [inline] bm_register_write+0x9d3/0xa20 fs/binfmt_misc.c:654 vfs_write+0x11e/0x580 fs/read_write.c:582 ksys_write+0xcf/0x120 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x34/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x4194e1 Since the type of Node's flags is unsigned long, we should define these macros with same type too. Signed-off-by: Liu Shixin Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221102025123.1117184-1-liushixin2@huawei.com fs/binfmt_misc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d272e01fa0a2f15c5c331a37cd99c6875c7b7186 Author: Gustavo A. R. Silva Date: Tue Nov 15 09:35:10 2022 -0600 ksmbd: 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 structs in fs/ksmbd/smb_common.h and one in fs/ksmbd/smb2pdu.h. Important to mention is 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/242 Link: https://github.com/KSPP/linux/issues/79 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Sergey Senozhatsky Acked-by: Namjae Jeon Reviewed-by: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/Y3OxronfaPYv9qGP@work fs/ksmbd/smb2pdu.c | 4 ++-- fs/ksmbd/smb2pdu.h | 2 +- fs/ksmbd/smb_common.h | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) commit d662198e03bc7fb4635156ee7e8b8d325e2d8512 Author: Kees Cook Date: Thu Nov 17 19:42:55 2022 -0800 hpet: Replace one-element array with flexible-array member One-element 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 one-element array with flexible-array member in struct hpet. This results in no differences in binary output. The use of struct hpet is never used with sizeof() and accesses via hpet_timers array are already done after explicit bounds checking. [1] https://github.com/KSPP/linux/issues/79 Cc: Clemens Ladisch Cc: "Gustavo A. R. Silva" Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20221118034250.never.999-kees@kernel.org include/linux/hpet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdc77507fecd00ddad2f502f86a48a9ec38f0f84 Author: Kees Cook Date: Thu Dec 1 16:23:25 2022 -0800 um: virt-pci: Avoid GCC non-NULL warning GCC gets confused about the return value of get_cpu_var() possibly being NULL, so explicitly test for it before calls to memcpy() and memset(). Avoids warnings like this: arch/um/drivers/virt-pci.c: In function 'um_pci_send_cmd': include/linux/fortify-string.h:48:33: warning: argument 1 null where non-null expected [-Wnonnull] 48 | #define __underlying_memcpy __builtin_memcpy | ^ include/linux/fortify-string.h:438:9: note: in expansion of macro '__underlying_memcpy' 438 | __underlying_##op(p, q, __fortify_size); \ | ^~~~~~~~~~~~~ include/linux/fortify-string.h:483:26: note: in expansion of macro '__fortify_memcpy_chk' 483 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ | ^~~~~~~~~~~~~~~~~~~~ arch/um/drivers/virt-pci.c:100:9: note: in expansion of macro 'memcpy' 100 | memcpy(buf, cmd, cmd_size); | ^~~~~~ While at it, avoid literal "8" and use stored sizeof(buf->data) in memset() and um_pci_send_cmd(). Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/202211271212.SUZSC9f9-lkp@intel.com Fixes: ba38961a069b ("um: Enable FORTIFY_SOURCE") Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: "Michael S. Tsirkin" Cc: Al Viro Cc: Xiu Jianfeng Cc: Vincent Whitchurch Cc: linux-um@lists.infradead.org Cc: stable@vger.kernel.org Signed-off-by: Kees Cook arch/um/drivers/virt-pci.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 3a017d6355f24de42f2ad688df9fa19e0cb128f2 Author: haifeng.xu Date: Mon Nov 28 06:56:06 2022 +0000 signal: Initialize the info in ksignal When handing the SIGNAL_GROUP_EXIT flag, the info in ksignal isn't cleared. However, the info acquired by dequeue_synchronous_signal/dequeue_signal is initialized and can be safely used. Fortunately, the fatal signal process just uses the si_signo and doesn't use any other member. Even so, the initialization before use is more safer. Signed-off-by: haifeng.xu Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221128065606.19570-1-haifeng.xu@shopee.com kernel/signal.c | 1 + 1 file changed, 1 insertion(+) commit 5abf698754b8e5e4f1ca1058ee2b9785fbce6d23 Author: Anders Roxell Date: Mon Nov 28 02:44:03 2022 -0800 lib: fortify_kunit: build without structleak plugin Building allmodconfig with aarch64-linux-gnu-gcc (Debian 11.3.0-6), fortify_kunit with strucleak plugin enabled makes the stack frame size to grow too large: lib/fortify_kunit.c:140:1: error: the frame size of 2368 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Turn off the structleak plugin checks for fortify_kunit. Suggested-by: Arnd Bergmann Signed-off-by: Anders Roxell Signed-off-by: Kees Cook lib/Makefile | 1 + 1 file changed, 1 insertion(+) commit 8b05aa26336113c4cea25f1c333ee8cd4fc212a6 Author: Kees Cook Date: Thu Nov 17 15:43:26 2022 -0800 panic: Expose "warn_count" to sysfs Since Warn count is now tracked and is a fairly interesting signal, add the entry /sys/kernel/warn_count to expose it to userspace. Cc: Petr Mladek Cc: Andrew Morton Cc: tangmeng Cc: "Guilherme G. Piccoli" Cc: Sebastian Andrzej Siewior Cc: Tiezhu Yang Reviewed-by: Luis Chamberlain Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221117234328.594699-6-keescook@chromium.org Documentation/ABI/testing/sysfs-kernel-warn_count | 6 ++++++ MAINTAINERS | 1 + kernel/panic.c | 22 ++++++++++++++++++++-- 3 files changed, 27 insertions(+), 2 deletions(-) commit 9fc9e278a5c0b708eeffaf47d6eb0c82aa74ed78 Author: Kees Cook Date: Thu Nov 17 15:43:25 2022 -0800 panic: Introduce warn_limit Like oops_limit, add warn_limit for limiting the number of warnings when panic_on_warn is not set. Cc: Jonathan Corbet Cc: Andrew Morton Cc: Baolin Wang Cc: "Jason A. Donenfeld" Cc: Eric Biggers Cc: Huang Ying Cc: Petr Mladek Cc: tangmeng Cc: "Guilherme G. Piccoli" Cc: Tiezhu Yang Cc: Sebastian Andrzej Siewior Cc: linux-doc@vger.kernel.org Reviewed-by: Luis Chamberlain Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221117234328.594699-5-keescook@chromium.org Documentation/admin-guide/sysctl/kernel.rst | 10 ++++++++++ kernel/panic.c | 14 ++++++++++++++ 2 files changed, 24 insertions(+) commit 79cc1ba7badf9e7a12af99695a557e9ce27ee967 Author: Kees Cook Date: Thu Nov 17 15:43:24 2022 -0800 panic: Consolidate open-coded panic_on_warn checks Several run-time checkers (KASAN, UBSAN, KFENCE, KCSAN, sched) roll their own warnings, and each check "panic_on_warn". Consolidate this into a single function so that future instrumentation can be added in a single location. Cc: Marco Elver Cc: Dmitry Vyukov 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 Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Vincenzo Frascino Cc: Andrew Morton Cc: David Gow Cc: tangmeng Cc: Jann Horn Cc: Shuah Khan Cc: Petr Mladek Cc: "Paul E. McKenney" Cc: Sebastian Andrzej Siewior Cc: "Guilherme G. Piccoli" Cc: Tiezhu Yang Cc: kasan-dev@googlegroups.com Cc: linux-mm@kvack.org Reviewed-by: Luis Chamberlain Signed-off-by: Kees Cook Reviewed-by: Marco Elver Reviewed-by: Andrey Konovalov Link: https://lore.kernel.org/r/20221117234328.594699-4-keescook@chromium.org include/linux/panic.h | 1 + kernel/kcsan/report.c | 3 +-- kernel/panic.c | 9 +++++++-- kernel/sched/core.c | 3 +-- lib/ubsan.c | 3 +-- mm/kasan/report.c | 4 ++-- mm/kfence/report.c | 3 +-- 7 files changed, 14 insertions(+), 12 deletions(-) commit de92f65719cd672f4b48397540b9f9eff67eca40 Author: Kees Cook Date: Fri Dec 2 12:59:11 2022 -0800 exit: Allow oops_limit to be disabled In preparation for keeping oops_limit logic in sync with warn_limit, have oops_limit == 0 disable checking the Oops counter. Cc: Jann Horn Cc: Jonathan Corbet Cc: Andrew Morton Cc: Baolin Wang Cc: "Jason A. Donenfeld" Cc: Eric Biggers Cc: Huang Ying Cc: "Eric W. Biederman" Cc: Arnd Bergmann Cc: linux-doc@vger.kernel.org Signed-off-by: Kees Cook Documentation/admin-guide/sysctl/kernel.rst | 5 +++-- kernel/exit.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit b57c2f124098459a4acc15d5044f87cba31c87f0 Author: Binglei Wang Date: Tue Oct 25 16:18:32 2022 +0100 riscv: add riscv rethook implementation Implement the kretprobes on riscv arch by using rethook machenism which abstracts general kretprobe info into a struct rethook_node to be embedded in the struct kretprobe_instance. Acked-by: Masami Hiramatsu (Google) Signed-off-by: Binglei Wang Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20221025151831.1097417-1-conor@kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 1 + arch/riscv/include/asm/kprobes.h | 2 -- arch/riscv/kernel/probes/Makefile | 2 +- arch/riscv/kernel/probes/kprobes.c | 13 ----------- arch/riscv/kernel/probes/rethook.c | 27 ++++++++++++++++++++++ arch/riscv/kernel/probes/rethook.h | 8 +++++++ .../{kprobes_trampoline.S => rethook_trampoline.S} | 6 ++--- 7 files changed, 40 insertions(+), 19 deletions(-) commit bc067cacb69c6ee0da10d357458fa7f1fe54e472 Author: Zheng Yejian Date: Tue Nov 29 21:45:58 2022 +0800 bpf, docs: Correct the example of BPF_XOR Refer to description of BPF_XOR, dst_reg should be used but not src_reg in the examples. Fixes: be3193cded9d ("bpf, docs: Add subsections for ALU and JMP instructions") Signed-off-by: Zheng Yejian Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221129134558.2757043-1-zhengyejian1@huawei.com Documentation/bpf/instruction-set.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ec304d02b988132ac037c5b41fe375950c55de87 Author: Dmitry Baryshkov Date: Fri Dec 2 20:58:43 2022 +0200 clk: qcom: rpmh: remove usage of platform name Now that all clocks have individual names, remove the names of SoCs from the RPMH clock definitions. Replace it with the common clk_rpmh_ prefix. Signed-off-by: Dmitry Baryshkov Reviewed-by: Alex Elder Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202185843.721673-9-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpmh.c | 342 ++++++++++++++++++++++---------------------- 1 file changed, 171 insertions(+), 171 deletions(-) commit 6ad844d739ee57779d3814fe3c9f97dff68719b2 Author: Dmitry Baryshkov Date: Fri Dec 2 20:58:42 2022 +0200 clk: qcom: rpmh: rename VRM clock data RPMH VRM clocks are frequently shared between several platforms. It makes little sense to encode the SoC name into the clock name, if the same clock is used for other SoCs. Rework the VRM clock definitions to add resource-specific suffix. Keep the userspace-visible clock name, but encode the part of cmd resource and the divider into the variable name. This also make it obvious which variant is used, making the code less error-prone. Signed-off-by: Dmitry Baryshkov Reviewed-by: Alex Elder Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202185843.721673-8-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpmh.c | 258 ++++++++++++++++++++++---------------------- 1 file changed, 129 insertions(+), 129 deletions(-) commit 166eb3eb3bb394255a9a8aa4cadbba5567ba184a Author: Dmitry Baryshkov Date: Fri Dec 2 20:58:41 2022 +0200 clk: qcom: rpmh: rename ARC clock data RPMH ARC clocks are frequently shared between several platforms. It makes little sense to encode the SoC name into the clock name, if the same clock is used for other SoCs. Rework the ARC clock definitions to remove the SoC name. Keep the userspace-visible clock name, but encode the divider into the variable name. This also makes it obvious which divider is used by the platform, making the code less error-prone. Signed-off-by: Dmitry Baryshkov Reviewed-by: Alex Elder Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202185843.721673-7-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpmh.c | 62 ++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 49e4aa233c6c239f814e8872d6757455e49e8106 Author: Dmitry Baryshkov Date: Fri Dec 2 20:58:40 2022 +0200 clk: qcom: rpmh: support separate symbol name for the RPMH clocks Both ARC and VRM clocks have minor differences between platforms. However using SoC names directly results in duplication, confusion and occasional errors. Next patches are going to drop the SoC names and encode these differences into the clock names. To keep the system clock names (visible to userspace) intact, add separate symbol names that are used in the code. Signed-off-by: Dmitry Baryshkov Reviewed-by: Alex Elder Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202185843.721673-6-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpmh.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit fe20294f4b7b180acc1ab7dcb7feff8601c76d7d Author: Dmitry Baryshkov Date: Fri Dec 2 20:58:39 2022 +0200 clk: qcom: rpmh: remove platform names from BCM clocks There are no platform-specific parts in the BCM clocks, drop the platform name from the clock definitions, replacing it with clk_rpmh to have the common prefix. Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202185843.721673-5-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpmh.c | 52 ++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 012c226fc68afe32acd7da01a0c2d2e483143bd4 Author: Dmitry Baryshkov Date: Fri Dec 2 20:58:38 2022 +0200 clk: qcom: rpmh: drop all _ao names In preparation for the further cleanup, remove the active only names, they can be easily generated from the standard ones. Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Reviewed-by: Abel Vesa Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202185843.721673-4-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpmh.c | 62 ++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 32 deletions(-) commit 65b0c564a34f38832b25b0f5769e9cdf9e5faefd Author: Dmitry Baryshkov Date: Fri Dec 2 20:58:37 2022 +0200 clk: qcom: rpmh: reuse common duplicate clocks After the grouping it is obvious that some of the clock definitions are pure duplicates. Rename them to use a single common name for the clock. Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202185843.721673-3-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpmh.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 82349cc0d1f70df9436da2f565ec10aadf1c3680 Author: Dmitry Baryshkov Date: Fri Dec 2 20:58:36 2022 +0200 clk: qcom: rpmh: group clock definitions together In preparations to the further changes, group all RPMH clock definitions to ease review. Group the clocks by their type to make similar/duplicate clocks stand out. Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202185843.721673-2-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpmh.c | 55 +++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 29 deletions(-) commit 3de1c1fd6189c64e6e026780bb244f878fdb0a23 Author: Dmitry Baryshkov Date: Fri Dec 2 09:08:14 2022 +0200 clk: qcom: rpm: drop the platform from clock definitions A single clock definition can be used on different platforms. Thus the platform part of the clock name is not correct (and can be misleading). Remove the platform-specific part of the defined clock. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202070814.482470-5-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpm.c | 194 +++++++++++++++++++++------------------------ 1 file changed, 89 insertions(+), 105 deletions(-) commit e9bf411a5deeb86379ca94bdb64067656ae5e138 Author: Dmitry Baryshkov Date: Fri Dec 2 09:08:13 2022 +0200 clk: qcom: rpm: drop the _clk suffix completely Drop the _clk suffix from other clocks too. This does not produce any user-visible changes, just syntax sugar. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202070814.482470-4-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 35a57cdae7433e1aab1a8c0e06197d368bc4de8a Author: Dmitry Baryshkov Date: Fri Dec 2 09:08:12 2022 +0200 clk: qcom: rpm: drop separate active-only names To simplify code reviews remove duplication between normal and active-only clock names. Get a single clock name and generate both names internally. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202070814.482470-3-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpm.c | 68 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) commit fbd5a2cbdab5fe7678a823209c76bf9f876f1448 Author: Dmitry Baryshkov Date: Fri Dec 2 09:08:11 2022 +0200 clk: qcom: rpm: remove unused active-only clock names The RPM_FIXED and RPM_XO_BUFFER clocks do not have the active-only counterparts. Drop corresponding unused arguments. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221202070814.482470-2-dmitry.baryshkov@linaro.org drivers/clk/qcom/clk-rpm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 98e596fc85fe74067bfb0a910b3d813784132a22 Author: Srinivas Pandruvada Date: Tue Nov 29 15:08:21 2022 -0800 powercap: idle_inject: Fix warnings with make W=1 Fix following warning at three places: Function parameter or member 'ii_dev' not described. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/powercap/idle_inject.c | 3 +++ 1 file changed, 3 insertions(+) commit 3a3073b69c76a8909374c5f9d610ea2f02ba3402 Author: Ricardo Neri Date: Mon Nov 28 08:20:01 2022 -0800 thermal: intel: hfi: Remove a pointless die_id check die_id is an u16 quantity. On single-die systems the default value of die_id is 0. No need to check for negative values. Plus, removing this check makes Coverity happy. Signed-off-by: Ricardo Neri Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/intel_hfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68bf66a108583e20b95136ebf8c29ab8e7ec7b44 Merge: b7b275e60bcd dba79b78ecc1 Author: Rafael J. Wysocki Date: Fri Dec 2 20:38:07 2022 +0100 Merge tag 'opp-updates-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull OPP updates for 6.2 from Viresh Kumar: "- Several DT fixes and code reorganization around opp-microvolt- DT property (Viresh Kumar). - Allow any of opp-microvolt, opp-microamp, or opp-microwatt properties to be present without the others present (James Calligeros). - Fix clock-latency-ns prop in DT example (Serge Semin)." * tag 'opp-updates-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: dt-bindings: opp-v2: Fix clock-latency-ns prop in example OPP: decouple dt properties in opp_parse_supplies() OPP: Simplify opp_parse_supplies() by restructuring it OPP: Parse named opp-microwatt property too dt-bindings: opp: Fix named microwatt property dt-bindings: opp: Fix usage of current in microwatt property commit 368c7f1f8a680734e14ccc62e3fda19bd08450bb Merge: f40eb99897af b5c1acf012a7 Author: Jens Axboe Date: Fri Dec 2 12:36:37 2022 -0700 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.2/block Pull MD fixes from Song: "This contains code cleanup by Christoph." * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: fold unbind_rdev_from_array into md_kick_rdev_from_array md: mark md_kick_rdev_from_array static md: remove lock_bdev / unlock_bdev commit f40eb99897af665f11858dd7b56edcb62c3f3c67 Author: Greg Kroah-Hartman Date: Fri Dec 2 19:27:58 2022 +0100 pktcdvd: remove driver. Way back in 2016 in commit 5a8b187c61e9 ("pktcdvd: mark as unmaintained and deprecated") this driver was marked as "will be removed soon". 5 years seems long enough to have it stick around after that, so finally remove the thing now. Reported-by: Christoph Hellwig Cc: Jens Axboe Cc: Thomas Maier Cc: Peter Osterlund Cc: linux-block@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20221202182758.1339039-1-gregkh@linuxfoundation.org Signed-off-by: Jens Axboe Documentation/ABI/testing/debugfs-pktcdvd | 18 - Documentation/ABI/testing/sysfs-class-pktcdvd | 97 - MAINTAINERS | 7 - drivers/block/Kconfig | 43 - drivers/block/Makefile | 1 - drivers/block/pktcdvd.c | 2944 ------------------------- include/linux/pktcdvd.h | 197 -- include/uapi/linux/pktcdvd.h | 112 - 8 files changed, 3419 deletions(-) commit b9069728a70c23dad00684eb994a3f5295f127cf Author: Randy Dunlap Date: Thu Dec 1 23:39:53 2022 -0800 seccomp: document the "filter_count" field Add missing kernel-doc for the 'filter_count' field in struct seccomp. seccomp.h:40: warning: Function parameter or member 'filter_count' not described in 'seccomp' Fixes: c818c03b661c ("seccomp: Report number of loaded filters in /proc/$pid/status") Signed-off-by: Randy Dunlap Cc: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221202073953.14677-1-rdunlap@infradead.org include/linux/seccomp.h | 1 + 1 file changed, 1 insertion(+) commit a1140cb215fa13dcec06d12ba0c3ee105633b7c4 Author: Kuniyuki Iwashima Date: Tue Aug 23 08:45:32 2022 -0700 seccomp: Move copy_seccomp() to no failure path. Our syzbot instance reported memory leaks in do_seccomp() [0], similar to the report [1]. It shows that we miss freeing struct seccomp_filter and some objects included in it. We can reproduce the issue with the program below [2] which calls one seccomp() and two clone() syscalls. The first clone()d child exits earlier than its parent and sends a signal to kill it during the second clone(), more precisely before the fatal_signal_pending() test in copy_process(). When the parent receives the signal, it has to destroy the embryonic process and return -EINTR to user space. In the failure path, we have to call seccomp_filter_release() to decrement the filter's refcount. Initially, we called it in free_task() called from the failure path, but the commit 3a15fb6ed92c ("seccomp: release filter after task is fully dead") moved it to release_task() to notify user space as early as possible that the filter is no longer used. To keep the change and current seccomp refcount semantics, let's move copy_seccomp() just after the signal check and add a WARN_ON_ONCE() in free_task() for future debugging. [0]: unreferenced object 0xffff8880063add00 (size 256): comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.914s) hex dump (first 32 bytes): 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ backtrace: do_seccomp (./include/linux/slab.h:600 ./include/linux/slab.h:733 kernel/seccomp.c:666 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991) 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) unreferenced object 0xffffc90000035000 (size 4096): comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.915s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: __vmalloc_node_range (mm/vmalloc.c:3226) __vmalloc_node (mm/vmalloc.c:3261 (discriminator 4)) bpf_prog_alloc_no_stats (kernel/bpf/core.c:91) bpf_prog_alloc (kernel/bpf/core.c:129) bpf_prog_create_from_user (net/core/filter.c:1414) do_seccomp (kernel/seccomp.c:671 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991) 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) unreferenced object 0xffff888003fa1000 (size 1024): comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.915s) 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: bpf_prog_alloc_no_stats (./include/linux/slab.h:600 ./include/linux/slab.h:733 kernel/bpf/core.c:95) bpf_prog_alloc (kernel/bpf/core.c:129) bpf_prog_create_from_user (net/core/filter.c:1414) do_seccomp (kernel/seccomp.c:671 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991) 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) unreferenced object 0xffff888006360240 (size 16): comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.915s) hex dump (first 16 bytes): 01 00 37 00 76 65 72 6c e0 83 01 06 80 88 ff ff ..7.verl........ backtrace: bpf_prog_store_orig_filter (net/core/filter.c:1137) bpf_prog_create_from_user (net/core/filter.c:1428) do_seccomp (kernel/seccomp.c:671 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991) 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) unreferenced object 0xffff8880060183e0 (size 8): comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.915s) hex dump (first 8 bytes): 06 00 00 00 00 00 ff 7f ........ backtrace: kmemdup (mm/util.c:129) bpf_prog_store_orig_filter (net/core/filter.c:1144) bpf_prog_create_from_user (net/core/filter.c:1428) do_seccomp (kernel/seccomp.c:671 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991) 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) [1]: https://syzkaller.appspot.com/bug?id=2809bb0ac77ad9aa3f4afe42d6a610aba594a987 [2]: #define _GNU_SOURCE #include #include #include #include #include #include void main(void) { struct sock_filter filter[] = { BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW), }; struct sock_fprog fprog = { .len = sizeof(filter) / sizeof(filter[0]), .filter = filter, }; long i, pid; syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, &fprog); for (i = 0; i < 2; i++) { pid = syscall(__NR_clone, CLONE_NEWNET | SIGKILL, NULL, NULL, 0); if (pid == 0) return; } } Fixes: 3a15fb6ed92c ("seccomp: release filter after task is fully dead") Reported-by: syzbot+ab17848fe269b573eb71@syzkaller.appspotmail.com Reported-by: Ayushman Dutta Suggested-by: Kees Cook Signed-off-by: Kuniyuki Iwashima Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220823154532.82913-1-kuniyu@amazon.com kernel/fork.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit fc1e3980044f0f812252f5f164a8350376d62eb7 Author: Gautam Menghani Date: Sun Jul 31 14:55:29 2022 +0530 selftests/seccomp: Check CAP_SYS_ADMIN capability in the test mode_filter_without_nnp In the "mode_filter_without_nnp" test in seccomp_bpf, there is currently a TODO which asks to check the capability CAP_SYS_ADMIN instead of euid. This patch adds support to check if the calling process has the flag CAP_SYS_ADMIN, and also if this flag has CAP_EFFECTIVE set. Signed-off-by: Gautam Menghani Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220731092529.28760-1-gautammenghani201@gmail.com tools/testing/selftests/seccomp/seccomp_bpf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 470188b09e92d83c5a997f25f0e8fb8cd2bc3469 Author: Li Zetao Date: Thu Dec 1 16:05:14 2022 +0800 ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() There is an use-after-free reported by KASAN: BUG: KASAN: use-after-free in acpi_ut_remove_reference+0x3b/0x82 Read of size 1 at addr ffff888112afc460 by task modprobe/2111 CPU: 0 PID: 2111 Comm: modprobe Not tainted 6.1.0-rc7-dirty Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), Call Trace: kasan_report+0xae/0xe0 acpi_ut_remove_reference+0x3b/0x82 acpi_ut_copy_iobject_to_iobject+0x3be/0x3d5 acpi_ds_store_object_to_local+0x15d/0x3a0 acpi_ex_store+0x78d/0x7fd acpi_ex_opcode_1A_1T_1R+0xbe4/0xf9b acpi_ps_parse_aml+0x217/0x8d5 ... The root cause of the problem is that the acpi_operand_object is freed when acpi_ut_walk_package_tree() fails in acpi_ut_copy_ipackage_to_ipackage(), lead to repeated release in acpi_ut_copy_iobject_to_iobject(). The problem was introduced by "8aa5e56eeb61" commit, this commit is to fix memory leak in acpi_ut_copy_iobject_to_iobject(), repeatedly adding remove operation, lead to "acpi_operand_object" used after free. Fix it by removing acpi_ut_remove_reference() in acpi_ut_copy_ipackage_to_ipackage(). acpi_ut_copy_ipackage_to_ipackage() is called to copy an internal package object into another internal package object, when it fails, the memory of acpi_operand_object should be freed by the caller. Fixes: 8aa5e56eeb61 ("ACPICA: Utilities: Fix memory leak in acpi_ut_copy_iobject_to_iobject") Signed-off-by: Li Zetao Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utcopy.c | 7 ------- 1 file changed, 7 deletions(-) commit 98b0cf207b61e17f3ea6d9c17334c8ffc2f44863 Author: Armin Wolf Date: Wed Nov 30 19:41:01 2022 +0100 ACPI: battery: Call power_supply_changed() when adding hooks If a battery hook is added to a battery, userspace software is not informed that the available properties of the battery might have changed. This for example causes upower to react slowly if a new battery hook is added during runtime. Fix this by calling power_supply_changed() if a battery hook was successfully added/removed. Tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf Signed-off-by: Rafael J. Wysocki drivers/acpi/battery.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d8bf77a1dc3079692f54be3087a5fd16d90027b0 Author: Tong Tiangen Date: Mon Oct 24 09:47:25 2022 +0000 riscv/mm: add arch hook arch_clear_hugepage_flags With the PG_arch_1 we keep track if the page's data cache is clean, architecture rely on this property to treat new pages as dirty with respect to the data cache and perform the flushing before mapping the pages into userspace. This patch adds a new architecture hook, arch_clear_hugepage_flags,so that architectures which rely on the page flags being in a particular state for fresh allocations can adjust the flags accordingly when a page is freed into the pool. Fixes: 9e953cda5cdf ("riscv: Introduce huge page support for 32/64bit kernel") Signed-off-by: Tong Tiangen Link: https://lore.kernel.org/r/20221024094725.3054311-3-tongtiangen@huawei.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/hugetlb.h | 6 ++++++ 1 file changed, 6 insertions(+) commit d33deda095d3637d218e7eed441633b2a01e1413 Author: Tong Tiangen Date: Mon Oct 24 09:47:24 2022 +0000 riscv/mm: hugepage's PG_dcache_clean flag is only set in head page HugeTLB pages are always fully mapped, so only setting head page's PG_dcache_clean flag is enough. Signed-off-by: Tong Tiangen Link: https://lore.kernel.org/lkml/20220331065640.5777-2-songmuchun@bytedance.com/ Link: https://lore.kernel.org/r/20221024094725.3054311-2-tongtiangen@huawei.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/cacheflush.h | 7 +++++++ arch/riscv/mm/cacheflush.c | 7 +++++++ 2 files changed, 14 insertions(+) commit 92266c65e08793fda74d1d71edfbe25000807f39 Author: ye xingchen Date: Wed Nov 30 16:16:08 2022 +0800 ACPI: use sysfs_emit() instead of scnprintf() Replace the open-code with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_pad.c | 4 ++-- drivers/acpi/cppc_acpi.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit fe820db35275561d8bf86ad19044d40ffc95bc04 Author: Hans de Goede Date: Sun Nov 27 19:24:03 2022 +0100 ACPI: x86: Add skip i2c clients quirk for Lenovo Yoga Tab 3 Pro (YT3-X90F) The Lenovo Yoga Tab 3 Pro (YT3-X90F) is a x86 (Cherry Trail) 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 Tab 3 Pro'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 Tab 3 Pro to the acpi_quirk_skip_dmi_ids table to woraround this. ACPI_QUIRK_SKIP_I2C_CLIENTS handling uses i2c_acpi_known_good_ids[], so that PMICs and Audio codecs will still be enumerated properly. The Lenovo Yoga Tab 3 Pro uses a Whiskey Cove PMIC, add the INT34D3 HID for this PMIC to the i2c_acpi_known_good_ids[] list. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/x86/utils.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit b5c1acf012a7a73e3d0c5c3605ececcca6797267 Author: Christoph Hellwig Date: Tue Nov 29 14:32:55 2022 +0100 md: fold unbind_rdev_from_array into md_kick_rdev_from_array unbind_rdev_from_array is only called from md_kick_rdev_from_array, so merge it into its only caller. Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu drivers/md/md.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit d57d9d6965502fd0ca95f17180d655f6dc196002 Author: Christoph Hellwig Date: Tue Nov 29 14:32:54 2022 +0100 md: mark md_kick_rdev_from_array static md_kick_rdev_from_array is only used in md.c, so unexport it and mark the symbol static. Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu drivers/md/md.c | 3 +-- drivers/md/md.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit fb541ca4c36500b7b1d1a4def992059d9af56f14 Author: Christoph Hellwig Date: Tue Nov 29 14:32:53 2022 +0100 md: remove lock_bdev / unlock_bdev These wrappers for blkdev_get / blkdev_put just horribly confuse the code with their odd naming. Remove them and improve the error unwinding in md_import_device with the now folded code. Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu drivers/md/md.c | 63 ++++++++++++++++++++------------------------------------- 1 file changed, 22 insertions(+), 41 deletions(-) commit 89da5c476dd55c49590d8eaf1c04ab96dd7b9870 Author: Christophe JAILLET Date: Sat Nov 26 12:30:55 2022 +0100 ACPI: APEI: Remove a useless include This file does not use rcu, so there is no point in including . So just remove it. Signed-off-by: Christophe JAILLET Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/apei-base.c | 1 - 1 file changed, 1 deletion(-) commit 5656374b168c98377b6feee8d7500993eebda230 Merge: 74bee0cad8dc 06e155c44aa0 Author: Paolo Bonzini Date: Fri Dec 2 14:00:53 2022 -0500 Merge branch 'gpc-fixes' of git://git.infradead.org/users/dwmw2/linux into HEAD Pull Xen-for-KVM changes from David Woodhouse: * add support for 32-bit guests in SCHEDOP_poll * the rest of the gfn-to-pfn cache API cleanup "I still haven't reinstated the last of those patches to make gpc->len immutable." Signed-off-by: Paolo Bonzini commit 74bee0cad8dcd8ddec5e763c369239fc5990676a Author: Jim Mattson Date: Fri Oct 7 15:16:44 2022 -0700 KVM: x86: Advertise that the SMM_CTL MSR is not supported CPUID.80000021H:EAX[bit 9] indicates that the SMM_CTL MSR (0xc0010116) is not supported. This defeature can be advertised by KVM_GET_SUPPORTED_CPUID regardless of whether or not the host enumerates it; currently it will be included only if the host enumerates at least leaf 8000001DH, due to a preexisting bug in QEMU that KVM has to work around (commit f751d8eac176, "KVM: x86: work around QEMU issue with synthetic CPUID leaves", 2022-04-29). Signed-off-by: Jim Mattson Message-Id: <20221007221644.138355-1-jmattson@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 4 ++++ 1 file changed, 4 insertions(+) commit 41952551acb405080726aa38a8a7ce317d9de4bb Author: Eric Biggers Date: Thu Dec 1 11:14:52 2022 -0800 fscrypt: add additional documentation for SM4 support Add a paragraph about SM4, like there is for the other modes. Signed-off-by: Eric Biggers Reviewed-by: Tianjia Zhang Link: https://lore.kernel.org/r/20221201191452.6557-1-ebiggers@kernel.org Documentation/filesystems/fscrypt.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit 7d4b19ab6b89903fde8ad02f28a8943a4734e7b0 Merge: 4748f9687caa c0e3acdcdeb1 Author: Rafael J. Wysocki Date: Fri Dec 2 19:39:07 2022 +0100 Merge Intel thermal control drivers changes for v6.2 - Add Raptor Lake-S support to the intel_tcc_cooling driver (Zhang Rui). - Make the intel_tcc_cooling driver detect TCC locking (Zhang Rui). - Address Coverity warning in intel_hfi_process_event() (Ricardo Neri). - Prevent accidental clearing of HFI in the package thermal interrupt status (Srinivas Pandruvada). - Protect the clearing of status bits in MSR_IA32_PACKAGE_THERM_STATUS and MSR_IA32_THERM_STATUS (Srinivas Pandruvada). - Allow the HFI interrupt handler to ACK an event for the same timestamp (Srinivas Pandruvada). * thermal-intel: thermal: intel: hfi: ACK HFI for the same timestamp thermal: intel: Protect clearing of thermal status bits thermal: intel: Prevent accidental clearing of HFI status thermal: intel: intel_tcc_cooling: Add TCC cooling support for RaptorLake-S thermal: intel: intel_tcc_cooling: Detect TCC lock bit thermal: intel: hfi: Improve the type of hfi_features::nr_table_pages commit 0c2a04128f500ea4dfc6bc449507005b998b76ab Author: Paolo Bonzini Date: Fri Dec 2 13:34:45 2022 -0500 KVM: x86: remove unnecessary exports Several symbols are not used by vendor modules but still exported. Removing them ensures that new coupling between kvm.ko and kvm-*.ko is noticed and reviewed. Co-developed-by: Sean Christopherson Co-developed-by: Like Xu Signed-off-by: Sean Christopherson Signed-off-by: Like Xu Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 1 - arch/x86/kvm/irq.c | 2 -- arch/x86/kvm/lapic.c | 3 --- arch/x86/kvm/x86.c | 8 -------- 4 files changed, 14 deletions(-) commit 1524ceb14dd5ebd6f724d993c5ec1a9a8d445d8e Merge: 7428a253315c 188c9c2e0c7f Author: Greg Kroah-Hartman Date: Fri Dec 2 19:30:15 2022 +0100 Merge tag 'usb-serial-6.1-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial fixes for 6.1-rc8 Here are two fixes for a division-by-zero issue in the Fintek drivers. All have been in linux-next with no reported issues. * tag 'usb-serial-6.1-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: f81534: fix division by zero on line-speed change USB: serial: f81232: fix division by zero on line-speed change commit 6925ba3d9b8ccf1989b4cf13d6f0d7e341899481 Author: Hal Feng Date: Fri Nov 18 09:17:14 2022 +0800 RISC-V: defconfig: Enable CONFIG_SERIAL_8250_DW Add CONFIG_SERIAL_8250_DW=y, which is a necessary option for StarFive JH7110 and JH7100 SoCs to boot with serial ports. Reviewed-by: Conor Dooley Signed-off-by: Hal Feng Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221118011714.70877-9-hal.feng@starfivetech.com Signed-off-by: Palmer Dabbelt arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit d03407183d97554dfffea70f385b5bdd520f846c Author: Kalle Valo Date: Fri Dec 2 12:30:27 2022 +0200 wifi: ath10k: fix QCOM_SMEM dependency Nathan noticed that when HWSPINLOCK is disabled there's a Kconfig warning: WARNING: unmet direct dependencies detected for QCOM_SMEM Depends on [n]: (ARCH_QCOM [=y] || COMPILE_TEST [=n]) && HWSPINLOCK [=n] Selected by [m]: - ATH10K_SNOC [=m] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_ATH [=y] && ATH10K [=m] && (ARCH_QCOM [=y] || COMPILE_TEST [=n]) The problem here is that QCOM_SMEM depends on HWSPINLOCK so we cannot select QCOM_SMEM and instead we neeed to use 'depends on'. Reported-by: Nathan Chancellor Link: https://lore.kernel.org/all/Y4YsyaIW+CPdHWv3@dev-arch.thelio-3990X/ Fixes: 4d79f6f34bbb ("wifi: ath10k: Store WLAN firmware version in SMEM image table") Signed-off-by: Kalle Valo Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221202103027.25974-1-kvalo@kernel.org drivers/net/wireless/ath/ath10k/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bf46e35826d8dc4fc0a103dd0ccd94c072a4c6a Author: Colin Ian King Date: Thu Dec 1 09:13:54 2022 +0000 KVM: selftests: Fix spelling mistake "probabalistic" -> "probabilistic" There is a spelling mistake in some help text. Fix it. Signed-off-by: Colin Ian King Message-Id: <20221201091354.1613652-1-colin.i.king@gmail.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/dirty_log_perf_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb056c0f080a3d15c2a9ad9057a8b542d45e4ba0 Author: Sean Christopherson Date: Sat Nov 19 01:34:50 2022 +0000 tools: KVM: selftests: Convert clear/set_bit() to actual atomics Convert {clear,set}_bit() to atomics as KVM's ucall implementation relies on clear_bit() being atomic, they are defined in atomic.h, and the same helpers in the kernel proper are atomic. KVM's ucall infrastructure is the only user of clear_bit() in tools/, and there are no true set_bit() users. tools/testing/nvdimm/ does make heavy use of set_bit(), but that code builds into a kernel module of sorts, i.e. pulls in all of the kernel's header and so is already getting the kernel's atomic set_bit(). Signed-off-by: Sean Christopherson Message-Id: <20221119013450.2643007-10-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/arch/x86/include/asm/atomic.h | 5 +++++ tools/include/asm-generic/atomic-gcc.h | 11 +++++++++++ tools/include/asm-generic/bitops/atomic.h | 15 ++++++--------- 3 files changed, 22 insertions(+), 9 deletions(-) commit 36293352ff433061d45d52784983e44950c09ae3 Author: Sean Christopherson Date: Sat Nov 19 01:34:49 2022 +0000 tools: Drop "atomic_" prefix from atomic test_and_set_bit() Drop the "atomic_" prefix from tools' atomic_test_and_set_bit() to match the kernel nomenclature where test_and_set_bit() is atomic, and __test_and_set_bit() provides the non-atomic variant. Signed-off-by: Sean Christopherson Message-Id: <20221119013450.2643007-9-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/arch/x86/include/asm/atomic.h | 3 +-- tools/include/asm-generic/atomic-gcc.h | 2 +- tools/testing/selftests/kvm/lib/ucall_common.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) commit 7f32a6cf8b5a8067537f25a1f12744292431aae1 Author: Sean Christopherson Date: Sat Nov 19 01:34:48 2022 +0000 tools: Drop conflicting non-atomic test_and_{clear,set}_bit() helpers Drop tools' non-atomic test_and_set_bit() and test_and_clear_bit() helpers now that all users are gone. The names will be claimed in the future for atomic versions. Signed-off-by: Sean Christopherson Message-Id: <20221119013450.2643007-8-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/include/linux/bitmap.h | 34 ---------------------------------- 1 file changed, 34 deletions(-) commit 03a0c819e71755398d59993b9adee203544617d5 Author: Sean Christopherson Date: Sat Nov 19 01:34:47 2022 +0000 KVM: selftests: Use non-atomic clear/set bit helpers in KVM tests Use the dedicated non-atomic helpers for {clear,set}_bit() and their test variants, i.e. the double-underscore versions. Depsite being defined in atomic.h, and despite the kernel versions being atomic in the kernel, tools' {clear,set}_bit() helpers aren't actually atomic. Move to the double-underscore versions so that the versions that are expected to be atomic (for kernel developers) can be made atomic without affecting users that don't want atomic operations. Leave the usage in ucall_free() as-is, it's the one place in tools/ that actually wants/needs atomic behavior. Signed-off-by: Sean Christopherson Message-Id: <20221119013450.2643007-7-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/aarch64/arch_timer.c | 2 +- tools/testing/selftests/kvm/dirty_log_test.c | 34 +++++++++++----------- tools/testing/selftests/kvm/x86_64/hyperv_evmcs.c | 4 +-- .../testing/selftests/kvm/x86_64/hyperv_svm_test.c | 4 +-- 4 files changed, 22 insertions(+), 22 deletions(-) commit 75d7ba32f9829e778484cf6e96e6e8f80914b0b3 Author: Sean Christopherson Date: Sat Nov 19 01:34:46 2022 +0000 perf tools: Use dedicated non-atomic clear/set bit helpers Use the dedicated non-atomic helpers for {clear,set}_bit() and their test variants, i.e. the double-underscore versions. Depsite being defined in atomic.h, and despite the kernel versions being atomic in the kernel, tools' {clear,set}_bit() helpers aren't actually atomic. Move to the double-underscore versions so that the versions that are expected to be atomic (for kernel developers) can be made atomic without affecting users that don't want atomic operations. No functional change intended. Signed-off-by: Sean Christopherson Acked-by: Namhyung Kim Message-Id: <20221119013450.2643007-6-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/perf/bench/find-bit-bench.c | 2 +- tools/perf/builtin-c2c.c | 6 +++--- tools/perf/builtin-kwork.c | 6 +++--- tools/perf/builtin-record.c | 6 +++--- tools/perf/builtin-sched.c | 2 +- tools/perf/tests/bitmap.c | 2 +- tools/perf/tests/mem2node.c | 2 +- tools/perf/util/affinity.c | 4 ++-- tools/perf/util/header.c | 8 ++++---- tools/perf/util/mmap.c | 6 +++--- tools/perf/util/pmu.c | 2 +- tools/perf/util/scripting-engines/trace-event-perl.c | 2 +- tools/perf/util/scripting-engines/trace-event-python.c | 2 +- tools/perf/util/session.c | 2 +- tools/perf/util/svghelper.c | 2 +- 15 files changed, 27 insertions(+), 27 deletions(-) commit 7f2b47f22b825c16d9843e6e78bbb2370d2c31a0 Author: Sean Christopherson Date: Sat Nov 19 01:34:45 2022 +0000 tools: Take @bit as an "unsigned long" in {clear,set}_bit() helpers Take @bit as an unsigned long instead of a signed int in clear_bit() and set_bit() so that they match the double-underscore versions, __clear_bit() and __set_bit(). This will allow converting users that really don't want atomic operations to the double-underscores without introducing a functional change, which will in turn allow making {clear,set}_bit() atomic (as advertised). Practically speaking, this _should_ have no functional impact. KVM's selftests usage is either hardcoded (Hyper-V tests) or is artificially limited (arch_timer test and dirty_log test). In KVM, dirty_log test is the only mildly interesting case as it's use indirectly restricted to unsigned 32-bit values, but in theory it could generate a negative value when cast to a signed int. But in that case, taking an "unsigned long" is actually a bug fix. Perf's usage is more difficult to audit, but any code that is affected by the switch is likely already broken. perf_header__{set,clear}_feat() and perf_file_header__read() effectively use only hardcoded enums with small, positive values, atom_new() passes an unsigned long, but its value is capped at 128 via NR_ATOM_PER_PAGE, etc... The only real potential for breakage is in the perf flows that take a "cpu", but it's unlikely perf is subtly relying on a negative index into bitmaps, e.g. "cpu" can be "-1", but only as "not valid" placeholder. Note, tools/testing/nvdimm/ makes heavy use of set_bit(), but that code builds into a kernel module of sorts, i.e. pulls in all of the kernel's header and so is getting the kernel's atomic set_bit(). The NVDIMM test usage of atomics is likely unnecessary, e.g. ndtest_dimm_register() sets bits in a local variable, but that's neither here nor there as far as this change is concerned. Signed-off-by: Sean Christopherson Message-Id: <20221119013450.2643007-5-seanjc@google.com> Signed-off-by: Paolo Bonzini tools/include/asm-generic/bitops/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef16b2dff4d1c71eb32b306d400d4c0f3a383ba7 Author: Sean Christopherson Date: Sat Nov 19 01:34:44 2022 +0000 KVM: arm64: selftests: Enable single-step without a "full" ucall() Add a new ucall hook, GUEST_UCALL_NONE(), to allow tests to make ucalls without allocating a ucall struct, and use it to enable single-step in ARM's debug-exceptions test. Like the disable single-step path, the enabling path also needs to ensure that no exclusive access sequences are attempted after enabling single-step, as the exclusive monitor is cleared on ERET from the debug exception taken to EL2. The test currently "works" because clear_bit() isn't actually an atomic operation... yet. Signed-off-by: Sean Christopherson Message-Id: <20221119013450.2643007-4-seanjc@google.com> Signed-off-by: Paolo Bonzini .../selftests/kvm/aarch64/debug-exceptions.c | 21 +++++++++++---------- tools/testing/selftests/kvm/include/ucall_common.h | 8 ++++++++ 2 files changed, 19 insertions(+), 10 deletions(-) commit ef40757743b47cc95de9b4ed41525c94f8dc73d9 Author: Yuan ZhaoXiong Date: Fri Dec 2 20:36:14 2022 +0800 KVM: x86: fix APICv/x2AVIC disabled when vm reboot by itself When a VM reboots itself, the reset process will result in an ioctl(KVM_SET_LAPIC, ...) to disable x2APIC mode and set the xAPIC id of the vCPU to its default value, which is the vCPU id. That will be handled in KVM as follows: kvm_vcpu_ioctl_set_lapic kvm_apic_set_state kvm_lapic_set_base => disable X2APIC mode kvm_apic_state_fixup kvm_lapic_xapic_id_updated kvm_xapic_id(apic) != apic->vcpu->vcpu_id kvm_set_apicv_inhibit(APICV_INHIBIT_REASON_APIC_ID_MODIFIED) memcpy(vcpu->arch.apic->regs, s->regs, sizeof(*s)) => update APIC_ID When kvm_apic_set_state invokes kvm_lapic_set_base to disable x2APIC mode, the old 32-bit x2APIC id is still present rather than the 8-bit xAPIC id. kvm_lapic_xapic_id_updated will set the APICV_INHIBIT_REASON_APIC_ID_MODIFIED bit and disable APICv/x2AVIC. Instead, kvm_lapic_xapic_id_updated must be called after APIC_ID is changed. In fact, this fixes another small issue in the code in that potential changes to a vCPU's xAPIC ID need not be tracked for KVM_GET_LAPIC. Fixes: 3743c2f02517 ("KVM: x86: inhibit APICv/AVIC on changes to APIC ID or APIC base") Signed-off-by: Yuan ZhaoXiong Message-Id: <1669984574-32692-1-git-send-email-yuanzhaoxiong@baidu.com> Cc: stable@vger.kernel.org Reported-by: Alejandro Jimenez Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5f66e18755963537d6cd125bde4ec559f2991a75 Merge: 41555cc9e2e9 f32b4b467ebd Author: Palmer Dabbelt Date: Fri Dec 2 10:04:41 2022 -0800 Merge patch series "RISC-V: Dynamic ftrace support for RV32I" Jamie Iles says: This series enables dynamic ftrace support for RV32I bringing it to parity with RV64I. Most of the work is already there, this is largely just assembly fixes to handle register sizes, correct handling of the psABI calling convention and Kconfig change. Validated with all ftrace boot time self test with qemu for RV32I and RV64I in addition to real tracing on an RV32I FPGA design. * b4-shazam-merge: RISC-V: enable dynamic ftrace for RV32I RISC-V: preserve a1 in mcount RISC-V: reduce mcount save space on RV32 RISC-V: use REG_S/REG_L for mcount Link: https://lore.kernel.org/r/20221115200832.706370-1-jamie@jamieiles.com Signed-off-by: Palmer Dabbelt commit f32b4b467ebd8a035f8342b7ea27efc84b10d96b Author: Jamie Iles Date: Tue Nov 15 20:08:32 2022 +0000 RISC-V: enable dynamic ftrace for RV32I The RISC-V mcount function is now capable of supporting RV32I so make it available in the kernel config. Signed-off-by: Jamie Iles Link: https://lore.kernel.org/r/20221115200832.706370-5-jamie@jamieiles.com Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit dc58a24db8c12ea361e94eaf53adc5d471534694 Author: Jamie Iles Date: Tue Nov 15 20:08:31 2022 +0000 RISC-V: preserve a1 in mcount The RISC-V ELF psABI states that both a0 and a1 are used for return values so we should preserve them both in return_to_handler. This is especially important for RV32 for functions returning a 64-bit quantity otherwise the return value can be corrupted and undefined behaviour results. Reviewed-by: Andrew Jones Signed-off-by: Jamie Iles Link: https://lore.kernel.org/r/20221115200832.706370-4-jamie@jamieiles.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/mcount.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3bd7743f8d6d7171db9897a746038eefd52a1fbd Author: Jamie Iles Date: Tue Nov 15 20:08:30 2022 +0000 RISC-V: reduce mcount save space on RV32 For RV32 we can reduce the size of the ABI save+restore state by using SZREG so that register stores are packed rather than on an 8 byte boundary. Signed-off-by: Jamie Iles Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20221115200832.706370-3-jamie@jamieiles.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/mcount.S | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 8a6841c439dfbba2067a533b0e8264ea438689f6 Author: Jamie Iles Date: Tue Nov 15 20:08:29 2022 +0000 RISC-V: use REG_S/REG_L for mcount In preparation for rv32i ftrace support, convert mcount routines to use native sized loads/stores. Reviewed-by: Andrew Jones Signed-off-by: Jamie Iles Link: https://lore.kernel.org/r/20221115200832.706370-2-jamie@jamieiles.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/mcount.S | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit dd03cc90e09daeb8a9509e65a39eb576256790b2 Author: Sean Christopherson Date: Thu Dec 1 22:04:33 2022 +0000 KVM: Remove stale comment about KVM_REQ_UNHALT Remove a comment about KVM_REQ_UNHALT being set by kvm_vcpu_check_block() that was missed when KVM_REQ_UNHALT was dropped. Fixes: c59fb1275838 ("KVM: remove KVM_REQ_UNHALT") Signed-off-by: Sean Christopherson Message-Id: <20221201220433.31366-1-seanjc@google.com> Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 4 ---- 1 file changed, 4 deletions(-) commit b376144595b40c79d420d8d1c56915f7b3e13a8c Merge: 44bc6115d887 3ebcbd2244f5 Author: Paolo Bonzini Date: Fri Dec 2 12:56:25 2022 -0500 Merge tag 'kvm-x86-fixes-6.2-1' of https://github.com/kvm-x86/linux into HEAD Misc KVM x86 fixes and cleanups for 6.2: - One-off fixes for various emulation flows (SGX, VMXON, NRIPS=0). - Reinstate IBPB on emulated VM-Exit that was incorrectly dropped a few years back when eliminating unnecessary barriers when switching between vmcs01 and vmcs02. - Clean up the MSR filter docs. - Clean up vmread_error_trampoline() to make it more obvious that params must be passed on the stack, even for x86-64. - Let userspace set all supported bits in MSR_IA32_FEAT_CTL irrespective of the current guest CPUID. - Fudge around a race with TSC refinement that results in KVM incorrectly thinking a guest needs TSC scaling when running on a CPU with a constant TSC, but no hardware-enumerated TSC frequency. commit 44bc6115d88737fc9d394a9a3649a222ff852868 Merge: 10c5e80b2c4d 0c3265235fc1 Author: Paolo Bonzini Date: Fri Dec 2 12:55:55 2022 -0500 Merge tag 'kvm-selftests-6.2-2' of https://github.com/kvm-x86/linux into HEAD KVM selftests fixes for 6.2 - Fix an inverted check in the access tracking perf test, and restore support for asserting that there aren't too many idle pages when running on bare metal. - Fix an ordering issue in the AMX test introduced by recent conversions to use kvm_cpu_has(), and harden the code to guard against similar bugs in the future. Anything that tiggers caching of KVM's supported CPUID, kvm_cpu_has() in this case, effectively hides opt-in XSAVE features if the caching occurs before the test opts in via prctl(). - Fix build errors that occur in certain setups (unsure exactly what is unique about the problematic setup) due to glibc overriding static_assert() to a variant that requires a custom message. commit 10c5e80b2c4d67fa9a931ac57beab782cc3db2ef Author: Javier Martinez Canillas Date: Fri Dec 2 11:50:11 2022 +0100 KVM: Add missing arch for KVM_CREATE_DEVICE and KVM_{SET,GET}_DEVICE_ATTR The ioctls are missing an architecture property that is present in others. Suggested-by: Sergio Lopez Pascual Signed-off-by: Javier Martinez Canillas Message-Id: <20221202105011.185147-5-javierm@redhat.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 2 ++ 1 file changed, 2 insertions(+) commit 30ee198ce42d60101620d33f8bc70c3234798365 Author: Javier Martinez Canillas Date: Fri Dec 2 11:50:10 2022 +0100 KVM: Reference to kvm_userspace_memory_region in doc and comments There are still references to the removed kvm_memory_region data structure but the doc and comments should mention struct kvm_userspace_memory_region instead, since that is what's used by the ioctl that replaced the old one and this data structure support the same set of flags. Signed-off-by: Javier Martinez Canillas Message-Id: <20221202105011.185147-4-javierm@redhat.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 2 +- include/linux/kvm_host.h | 4 ++-- include/uapi/linux/kvm.h | 6 +++--- tools/include/uapi/linux/kvm.h | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) commit 66a9221d73e71199a120ca12ea5bfaac2aa670a3 Author: Javier Martinez Canillas Date: Fri Dec 2 11:50:09 2022 +0100 KVM: Delete all references to removed KVM_SET_MEMORY_ALIAS ioctl The documentation says that the ioctl has been deprecated, but it has been actually removed and the remaining references are just left overs. Suggested-by: Sean Christopherson Signed-off-by: Javier Martinez Canillas Message-Id: <20221202105011.185147-3-javierm@redhat.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 11 ----------- arch/x86/include/uapi/asm/kvm.h | 8 -------- include/uapi/linux/kvm.h | 2 -- tools/arch/x86/include/uapi/asm/kvm.h | 8 -------- tools/include/uapi/linux/kvm.h | 2 -- 5 files changed, 31 deletions(-) commit 61e15f871241ee86f217320909005cd022dd844f Author: Javier Martinez Canillas Date: Fri Dec 2 11:50:08 2022 +0100 KVM: Delete all references to removed KVM_SET_MEMORY_REGION ioctl The documentation says that the ioctl has been deprecated, but it has been actually removed and the remaining references are just left overs. Suggested-by: Sean Christopherson Signed-off-by: Javier Martinez Canillas Message-Id: <20221202105011.185147-2-javierm@redhat.com> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 16 ---------------- include/uapi/linux/kvm.h | 12 ------------ tools/include/uapi/linux/kvm.h | 12 ------------ 3 files changed, 40 deletions(-) commit d5ba85d6d8be7da660d4ac25761a48c74ade958d Author: Steven Rostedt (Google) Date: Wed Nov 30 17:31:34 2022 -0500 selftests/ftrace: Use long for synthetic event probe test On 32bit the trigger-synthetic-eprobe.tc selftest fails with the error: hist:syscalls:sys_exit_openat: error: Param type doesn't match synthetic event field type Command: hist:keys=common_pid:filename=$__arg__1,ret=ret:onmatch(syscalls.sys_enter_openat).trace(synth_open,$filename,$ret) ^ This is because the synth_open synthetic event is created with: echo "$SYNTH u64 filename; s64 ret;" > synthetic_events Which works fine on 64 bit, as filename is a pointer and the return is also a long. But for 32 bit architectures, it doesn't work. Use "unsigned long" and "long" instead so that it works for both 64 bit and 32 bit architectures. Signed-off-by: Steven Rostedt (Google) Signed-off-by: Shuah Khan .../ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfe843dce775f16e3d15a1bf14e5363bff2321f3 Author: Heiko Carstens Date: Wed Nov 30 10:40:34 2022 +0100 s390/checksum: support GENERIC_CSUM, enable it for KASAN This is the s390 variant of commit d911c67e10b4 ("x86: kasan: kmsan: support CONFIG_GENERIC_CSUM on x86, enable it for KASAN/KMSAN"). Even though most of the s390 specific checksum code is written in C there is still the csum_partial() inline assembly which could prevent KASAN and KMSAN from seeing all memory accesses. Therefore switch to GENERIC_CSUM if KASAN is enabled just like x86. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/Kconfig | 4 ++++ arch/s390/include/asm/checksum.h | 7 +++++++ 2 files changed, 11 insertions(+) commit 78c045c08a393285e615260c50cedf9cea5a7fa1 Author: Heiko Carstens Date: Tue Nov 29 17:31:45 2022 +0100 s390/appldata: remove power management callbacks Support for power managemant has been removed from s390 since quite some time. Therefore remove unused power managemant code from the appldata device driver. Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/appldata/appldata_base.c | 113 +------------------------------------ 1 file changed, 2 insertions(+), 111 deletions(-) commit f446022b932aff1d6a308ca5d537ec2b512debdc Author: Johan Hovold Date: Fri Nov 4 10:20:44 2022 +0100 arm64: dts: qcom: sc8280xp: fix UFS reference clocks There are three UFS reference clocks on SC8280XP which are used as follows: - The GCC_UFS_REF_CLKREF_CLK clock is fed to any UFS device connected to either controller. - The GCC_UFS_1_CARD_CLKREF_CLK and GCC_UFS_CARD_CLKREF_CLK clocks provide reference clocks to the two PHYs. Note that this depends on first updating the clock driver to reflect that all three clocks are sourced from CXO. Specifically, the UFS controller driver expects the device reference clock to have a valid frequency: ufshcd-qcom 1d84000.ufs: invalid ref_clk setting = 0 Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Fixes: 8d6b458ce6e9 ("arm64: dts: qcom: sc8280xp: fix ufs_card_phy ref clock") Fixes: f3aa975e230e ("arm64: dts: qcom: sc8280xp: correct ref clock for ufs_mem_phy") Link: https://lore.kernel.org/lkml/Y2OEjNAPXg5BfOxH@hovoldconsulting.com/ Cc: stable@vger.kernel.org # 5.20 Signed-off-by: Johan Hovold Reviewed-by: Brian Masney Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104092045.17410-2-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0922df8f52b88d5c718d0cfe10794ac44b95ac78 Author: Johan Hovold Date: Thu Nov 24 15:25:01 2022 +0100 arm64: dts: qcom: sc8280xp: fix PCIe DMA coherency The devices on the SC8280XP PCIe buses are cache coherent and must be marked as such to avoid data corruption. A coherent device can, for example, end up snooping stale data from the caches instead of using data written by the CPU through the non-cacheable mapping which is used for consistent DMA buffers for non-coherent devices. Note that this is much more likely to happen since commit c44094eee32f ("arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()") that was added in 6.1 and which removed the cache invalidation when setting up the non-cacheable mapping. Marking the PCIe devices as coherent specifically fixes the intermittent NVMe probe failures observed on the Thinkpad X13s, which was due to corruption of the submission and completion queues. This was typically observed as corruption of the admin submission queue (with well-formed completion): could not locate request for tag 0x0 nvme nvme0: invalid id 0 completed on queue 0 or corruption of the admin or I/O completion queues (malformed completion): could not locate request for tag 0x45f nvme nvme0: invalid id 25695 completed on queue 25965 presumably as these queues are small enough to not be allocated using CMA which in turn make them more likely to be cached (e.g. due to accesses to nearby pages through the cacheable linear map). Increasing the buffer sizes to two pages to force CMA allocation also appears to make the problem go away. Fixes: 813e83157001 ("arm64: dts: qcom: sc8280xp/sa8540p: add PCIe2-4 nodes") Signed-off-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124142501.29314-1-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c967c73c06a6827f1bbb34643dc4842423ce127d Merge: afcd946be11c cadaa773bcf1 Author: Bjorn Andersson Date: Fri Dec 2 11:09:58 2022 -0600 Merge branch 'arm64-fixes-for-6.1' into HEAD Mergeback arm64-fixes-for-6.1 to avoid merge conflicts. commit b058ea3ab5afea873ab8d976277539ca9e43869a Author: Joao Martins Date: Tue Nov 29 13:12:35 2022 +0000 vfio/iova_bitmap: refactor iova_bitmap_set() to better handle page boundaries Commit f38044e5ef58 ("vfio/iova_bitmap: Fix PAGE_SIZE unaligned bitmaps") had fixed the unaligned bitmaps by capping the remaining iterable set at the start of the bitmap. Although, that mistakenly worked around iova_bitmap_set() incorrectly setting bits across page boundary. Fix this by reworking the loop inside iova_bitmap_set() to iterate over a range of bits to set (cur_bit .. last_bit) which may span different pinned pages, thus updating @page_idx and @offset as it sets the bits. The previous cap to the first page is now adjusted to be always accounted rather than when there's only a non-zero pgoff. While at it, make @page_idx , @offset and @nbits to be unsigned int given that it won't be more than 512 and 4096 respectively (even a bigger PAGE_SIZE or a smaller struct page size won't make this bigger than the above 32-bit max). Also, delete the stale kdoc on Return type. Cc: Avihai Horon Fixes: f38044e5ef58 ("vfio/iova_bitmap: Fix PAGE_SIZE unaligned bitmaps") Co-developed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe Signed-off-by: Joao Martins Reviewed-by: Jason Gunthorpe Tested-by: Avihai Horon Link: https://lore.kernel.org/r/20221129131235.38880-1-joao.m.martins@oracle.com Signed-off-by: Alex Williamson drivers/vfio/iova_bitmap.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit 11fa7fefe3d8fac7da56bc9aa3dd5fb3081ca797 Author: Yang Yingliang Date: Fri Dec 2 11:02:37 2022 +0800 chardev: fix error handling in cdev_device_add() While doing fault injection test, I got the following report: ------------[ cut here ]------------ kobject: '(null)' (0000000039956980): is not initialized, yet kobject_put() is being called. WARNING: CPU: 3 PID: 6306 at kobject_put+0x23d/0x4e0 CPU: 3 PID: 6306 Comm: 283 Tainted: G W 6.1.0-rc2-00005-g307c1086d7c9 #1253 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:kobject_put+0x23d/0x4e0 Call Trace: cdev_device_add+0x15e/0x1b0 __iio_device_register+0x13b4/0x1af0 [industrialio] __devm_iio_device_register+0x22/0x90 [industrialio] max517_probe+0x3d8/0x6b4 [max517] i2c_device_probe+0xa81/0xc00 When device_add() is injected fault and returns error, if dev->devt is not set, cdev_add() is not called, cdev_del() is not needed. Fix this by checking dev->devt in error path. Fixes: 233ed09d7fda ("chardev: add helper function to register char devs with a struct device") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221202030237.520280-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman fs/char_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 728ac3389296caf68638628c987aeae6c8851e2d Author: Yang Yingliang Date: Fri Dec 2 01:38:50 2022 -0800 mcb: mcb-parse: fix error handing in chameleon_parse_gdd() If mcb_device_register() returns error in chameleon_parse_gdd(), the refcount of bus and device name are leaked. Fix this by calling put_device() to give up the reference, so they can be released in mcb_release_dev() and kobject_cleanup(). Fixes: 3764e82e5150 ("drivers: Introduce MEN Chameleon Bus") Reviewed-by: Johannes Thumshirn Signed-off-by: Yang Yingliang Signed-off-by: Johannes Thumshirn Link: https://lore.kernel.org/r/ebfb06e39b19272f0197fa9136b5e4b6f34ad732.1669624063.git.johannes.thumshirn@wdc.com Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7237462561fcd224fa687c56ccb68629f50fc0d Author: Zhengchao Shao Date: Fri Dec 2 01:38:49 2022 -0800 drivers: mcb: fix resource leak in mcb_probe() When probe hook function failed in mcb_probe(), it doesn't put the device. Compiled test only. Fixes: 7bc364097a89 ("mcb: Acquire reference to device in probe") Signed-off-by: Zhengchao Shao Signed-off-by: Johannes Thumshirn Link: https://lore.kernel.org/r/9f87de36bfb85158b506cb78c6fc9db3f6a3bad1.1669624063.git.johannes.thumshirn@wdc.com Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 90337f526c98129b0b180fc52dc5f57d8e7a8614 Merge: 169dd5c987e6 b7b275e60bcd Author: Jason Gunthorpe Date: Tue Nov 29 16:42:27 2022 -0400 Merge tag 'v6.1-rc7' into iommufd.git for-next Resolve conflicts in drivers/vfio/vfio_main.c by using the iommfd version. The rc fix was done a different way when iommufd patches reworked this code. Signed-off-by: Jason Gunthorpe commit 169dd5c987e60e62aa5785b30d22ded2ae000286 Merge: 2a54e347d990 01f70cbb26ea Author: Jason Gunthorpe Date: Tue Nov 29 16:39:33 2022 -0400 Merge patch series "Connect VFIO to IOMMUFD" Jason Gunthorpe says: ================== This series provides an alternative container layer for VFIO implemented using iommufd. This is optional, if CONFIG_IOMMUFD is not set then it will not be compiled in. At this point iommufd can be injected by passing in a iommfd FD to VFIO_GROUP_SET_CONTAINER which will use the VFIO compat layer in iommufd to obtain the compat IOAS and then connect up all the VFIO drivers as appropriate. This is temporary stopping point, a following series will provide a way to directly open a VFIO device FD and directly connect it to IOMMUFD using native ioctls that can expose the IOMMUFD features like hwpt, future vPASID and dynamic attachment. This series, in compat mode, has passed all the qemu tests we have available, including the test suites for the Intel GVT mdev. Aside from the temporary limitation with P2P memory this is belived to be fully compatible with VFIO. This is on github: https://github.com/jgunthorpe/linux/commits/vfio_iommufd It requires the iommufd series: https://lore.kernel.org/r/0-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com ================== Link: https://lore.kernel.org/r/0-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 01f70cbb26eadb5959344598977cb7159948263a Author: Jason Gunthorpe Date: Tue Nov 29 16:31:55 2022 -0400 iommufd: Allow iommufd to supply /dev/vfio/vfio If the VFIO container is compiled out, give a kconfig option for iommufd to provide the miscdev node with the same name and permissions as vfio uses. The compatibility node supports the same ioctls as VFIO and automatically enables the VFIO compatible pinned page accounting mode. Link: https://lore.kernel.org/r/10-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Reviewed-by: Alex Williamson Tested-by: Alex Williamson Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/Kconfig | 20 ++++++++++++++++++++ drivers/iommu/iommufd/main.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit e5a9ec7e096ab7a3b34022409a6ddc63e4e83674 Author: Jason Gunthorpe Date: Tue Nov 29 16:31:54 2022 -0400 vfio: Make vfio_container optionally compiled Add a kconfig CONFIG_VFIO_CONTAINER that controls compiling the container code. If 'n' then only iommufd will provide the container service. All the support for vfio iommu drivers, including type1, will not be built. This allows a compilation check that no inappropriate dependencies between the device/group and container have been created. Link: https://lore.kernel.org/r/9-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Alex Williamson Tested-by: Alex Williamson Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Signed-off-by: Jason Gunthorpe drivers/vfio/Kconfig | 35 ++++++++++++++++++--------- drivers/vfio/Makefile | 4 ++-- drivers/vfio/vfio.h | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 13 deletions(-) commit 81ab9890da97e07862476bf635c80adee9b1c515 Author: Jason Gunthorpe Date: Tue Nov 29 16:31:53 2022 -0400 vfio: Move container related MODULE_ALIAS statements into container.c The miscdev is in container.c, so should these related MODULE_ALIAS statements. This is necessary for the next patch to be able to fully disable /dev/vfio/vfio. Fixes: cdc71fe4ecbf ("vfio: Move container code into drivers/vfio/container.c") Link: https://lore.kernel.org/r/8-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Reviewed-by: Alex Williamson Tested-by: Alex Williamson Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Reported-by: Yi Liu Signed-off-by: Jason Gunthorpe drivers/vfio/container.c | 3 +++ drivers/vfio/vfio_main.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) commit 4741f2e941298ad7553b65e66624435e14793391 Author: Jason Gunthorpe Date: Tue Nov 29 16:31:52 2022 -0400 vfio-iommufd: Support iommufd for emulated VFIO devices Emulated VFIO devices are calling vfio_register_emulated_iommu_dev() and consist of all the mdev drivers. Like the physical drivers, support for iommufd is provided by the driver supplying the correct standard ops. Provide ops from the core that duplicate what vfio_register_emulated_iommu_dev() does. Emulated drivers are where it is more likely to see variation in the iommfd support ops. For instance IDXD will probably need to setup both a iommfd_device context linked to a PASID and an iommufd_access context to support all their mdev operations. Link: https://lore.kernel.org/r/7-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Alex Williamson Tested-by: Alex Williamson Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Signed-off-by: Jason Gunthorpe drivers/gpu/drm/i915/gvt/kvmgt.c | 3 + drivers/s390/cio/vfio_ccw_ops.c | 3 + drivers/s390/crypto/vfio_ap_ops.c | 3 + drivers/vfio/container.c | 110 ++++++---------------------------- drivers/vfio/iommufd.c | 58 ++++++++++++++++++ drivers/vfio/vfio.h | 10 +++- drivers/vfio/vfio_main.c | 122 +++++++++++++++++++++++++++++++++++++- include/linux/vfio.h | 14 +++++ 8 files changed, 229 insertions(+), 94 deletions(-) commit a4d1f91db5021c57e14721ac090616c90386ac70 Author: Jason Gunthorpe Date: Tue Nov 29 16:31:51 2022 -0400 vfio-iommufd: Support iommufd for physical VFIO devices This creates the iommufd_device for the physical VFIO drivers. These are all the drivers that are calling vfio_register_group_dev() and expect the type1 code to setup a real iommu_domain against their parent struct device. The design gives the driver a choice in how it gets connected to iommufd by providing bind_iommufd/unbind_iommufd/attach_ioas callbacks to implement as required. The core code provides three default callbacks for physical mode using a real iommu_domain. This is suitable for drivers using vfio_register_group_dev() Link: https://lore.kernel.org/r/6-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Alex Williamson Tested-by: Alex Williamson Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Signed-off-by: Jason Gunthorpe drivers/vfio/Makefile | 1 + drivers/vfio/fsl-mc/vfio_fsl_mc.c | 3 + drivers/vfio/iommufd.c | 100 +++++++++++++++++++++++++ drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 6 ++ drivers/vfio/pci/mlx5/main.c | 3 + drivers/vfio/pci/vfio_pci.c | 3 + drivers/vfio/platform/vfio_amba.c | 3 + drivers/vfio/platform/vfio_platform.c | 3 + drivers/vfio/vfio.h | 15 ++++ drivers/vfio/vfio_main.c | 15 +++- include/linux/vfio.h | 25 +++++++ 11 files changed, 175 insertions(+), 2 deletions(-) commit 2a3dab19a0a6c1823645764188776f271de1b3cf Author: Jason Gunthorpe Date: Tue Nov 29 16:31:50 2022 -0400 vfio-iommufd: Allow iommufd to be used in place of a container fd This makes VFIO_GROUP_SET_CONTAINER accept both a vfio container FD and an iommufd. In iommufd mode an IOAS will exist after the SET_CONTAINER, but it will not be attached to any groups. For VFIO this means that the VFIO_GROUP_GET_STATUS and VFIO_GROUP_FLAGS_VIABLE works subtly differently. With the container FD the iommu_group_claim_dma_owner() is done during SET_CONTAINER but for IOMMUFD this is done during VFIO_GROUP_GET_DEVICE_FD. Meaning that VFIO_GROUP_FLAGS_VIABLE could be set but GET_DEVICE_FD will fail due to viability. As GET_DEVICE_FD can fail for many reasons already this is not expected to be a meaningful difference. Reorganize the tests for if the group has an assigned container or iommu into a vfio_group_has_iommu() function and consolidate all the duplicated WARN_ON's etc related to this. Call container functions only if a container is actually present on the group. Link: https://lore.kernel.org/r/5-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Alex Williamson Tested-by: Alex Williamson Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Signed-off-by: Jason Gunthorpe drivers/vfio/Kconfig | 1 + drivers/vfio/container.c | 7 ++-- drivers/vfio/vfio.h | 2 ++ drivers/vfio/vfio_main.c | 88 ++++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 82 insertions(+), 16 deletions(-) commit 0d8227b622f3529661ad6a9702a52932e149a30d Author: Jason Gunthorpe Date: Tue Nov 29 16:31:49 2022 -0400 vfio: Use IOMMU_CAP_ENFORCE_CACHE_COHERENCY for vfio_file_enforced_coherent() iommufd doesn't establish the iommu_domains until after the device FD is opened, even if the container has been set. This design is part of moving away from the group centric iommu APIs. This is fine, except that the normal sequence of establishing the kvm wbinvd won't work: group = open("/dev/vfio/XX") ioctl(group, VFIO_GROUP_SET_CONTAINER) ioctl(kvm, KVM_DEV_VFIO_GROUP_ADD) ioctl(group, VFIO_GROUP_GET_DEVICE_FD) As the domains don't start existing until GET_DEVICE_FD. Further, GET_DEVICE_FD requires that KVM_DEV_VFIO_GROUP_ADD already be done as that is what sets the group->kvm and thus device->kvm for the driver to use during open. Now that we have device centric cap ops and the new IOMMU_CAP_ENFORCE_CACHE_COHERENCY we know what the iommu_domain will be capable of without having to create it. Use this to compute vfio_file_enforced_coherent() and resolve the ordering problems. VFIO always tries to upgrade domains to enforce cache coherency, it never attaches a device that supports enforce cache coherency to a less capable domain, so the cap test is a sufficient proxy for the ultimate outcome. iommufd also ensures that devices that set the cap will be connected to enforcing domains. Link: https://lore.kernel.org/r/4-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Alex Williamson Tested-by: Alex Williamson Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Signed-off-by: Jason Gunthorpe drivers/vfio/container.c | 5 +++-- drivers/vfio/vfio.h | 2 -- drivers/vfio/vfio_main.c | 29 ++++++++++++++++------------- 3 files changed, 19 insertions(+), 17 deletions(-) commit 04f930c3e44bb9010bba8521f970d00d95a94eb0 Author: Jason Gunthorpe Date: Tue Nov 29 16:31:48 2022 -0400 vfio: Rename vfio_device_assign/unassign_container() These functions don't really assign anything anymore, they just increment some refcounts and do a sanity check. Call them vfio_group_[un]use_container() Link: https://lore.kernel.org/r/3-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Reviewed-by: Alex Williamson Tested-by: Alex Williamson Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Signed-off-by: Jason Gunthorpe drivers/vfio/container.c | 14 ++++++-------- drivers/vfio/vfio.h | 4 ++-- drivers/vfio/vfio_main.c | 6 +++--- 3 files changed, 11 insertions(+), 13 deletions(-) commit bab6fabc01d99c7e0293807e835231740379b692 Author: Jason Gunthorpe Date: Tue Nov 29 16:31:47 2022 -0400 vfio: Move vfio_device_assign_container() into vfio_device_first_open() The only thing this function does is assert the group has an assigned container and incrs refcounts. The overall model we have is that once a container_users refcount is incremented it cannot be de-assigned from the group - vfio_group_ioctl_unset_container() will fail and the group FD cannot be closed. Thus we do not need to check this on every device FD open, just the first. Reorganize the code so that only the first open and last close manages the container. Link: https://lore.kernel.org/r/2-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Reviewed-by: Alex Williamson Tested-by: Alex Williamson Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Signed-off-by: Jason Gunthorpe drivers/vfio/container.c | 4 ++-- drivers/vfio/vfio_main.c | 24 +++++++++++------------- 2 files changed, 13 insertions(+), 15 deletions(-) commit 294aaccb50130f596943be892c5d3a3568b76c57 Author: Jason Gunthorpe Date: Tue Nov 29 16:31:46 2022 -0400 vfio: Move vfio_device driver open/close code to a function This error unwind is getting complicated. Move all the code into two pair'd function. The functions should be called when the open_count == 1 after incrementing/before decrementing. Link: https://lore.kernel.org/r/1-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Reviewed-by: Alex Williamson Tested-by: Alex Williamson Tested-by: Yi Liu Tested-by: Nicolin Chen Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Signed-off-by: Jason Gunthorpe drivers/vfio/vfio_main.c | 95 +++++++++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 42 deletions(-) commit 2a54e347d990574ceb047b71ea0b03979232b85e Author: Matthew Rosato Date: Fri Dec 2 05:54:02 2022 -0800 vfio/ap: Validate iova during dma_unmap and trigger irq disable Currently, each mapped iova is stashed in its associated vfio_ap_queue; when we get an unmap request, validate that it matches with one or more of these stashed values before attempting unpins. Each stashed iova represents IRQ that was enabled for a queue. Therefore, if a match is found, trigger IRQ disable for this queue to ensure that underlying firmware will no longer try to use the associated pfn after the page is unpinned. IRQ disable will also handle the associated unpin. Link: https://lore.kernel.org/r/20221202135402.756470-3-yi.l.liu@intel.com Reviewed-by: Tony Krowiak Signed-off-by: Matthew Rosato Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe drivers/s390/crypto/vfio_ap_ops.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 4dc334cab1c34efb17fa6cd10b12fbc9458e5760 Author: Yi Liu Date: Fri Dec 2 05:54:01 2022 -0800 i915/gvt: Move gvt mapping cache initialization to intel_vgpu_init_dev() vfio container registers .dma_unmap() callback after the device is opened. So it's fine for mdev drivers to initialize internal mapping cache in .open_device(). See vfio_device_container_register(). Now with iommufd an access ops with an unmap callback is registered when the device is bound to iommufd which is before .open_device() is called. This implies gvt's .dma_unmap() could be called before its internal mapping cache is initialized. The fix is moving gvt mapping cache initialization to vGPU init. While at it also move ptable initialization together. Link: https://lore.kernel.org/r/20221202135402.756470-2-yi.l.liu@intel.com Reviewed-by: Zhi Wang Reviewed-by: Zhenyu Wang Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe drivers/gpu/drm/i915/gvt/kvmgt.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit b43340ddaea3abafe5d4cdc50b03342fa6ba9a73 Author: zhang songyi Date: Fri Dec 2 10:28:15 2022 +0800 mips/pci: use devm_platform_ioremap_resource() Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: zhang songyi Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer arch/mips/pci/pci-rt3883.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4670ac706ff9b3d0adb766ef9e93cc36d9dda474 Author: Alex Deucher Date: Thu Dec 1 16:41:53 2022 -0500 drm/amdgpu: expand on GPUVM documentation Expand the GPUVM documentation to better describe the hardware functionality and use cases it serves. v2: Fixed a couple of spelling mistakes. Reviewed-by: Christian König Signed-off-by: Alex Deucher Link: https://lore.kernel.org/r/20221201214153.8453-2-alexander.deucher@amd.com Signed-off-by: Luben Tuikov Reviewed-by: Luben Tuikov drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 41 +++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 10 deletions(-) commit 57f019864b634a3b38f8ab3ebf425695b0607c25 Author: Alex Deucher Date: Thu Dec 1 16:41:52 2022 -0500 drm/amdgpu: add GART, GPUVM, and GTT to glossary Add definitions to clarify GPU virtual memory. v2: clarify the terms a bit more Reviewed-by: Christian König Reviewed-by: Luben Tuikov Suggested-by: Peter Maucher Signed-off-by: Alex Deucher Link: https://lore.kernel.org/r/20221201214153.8453-1-alexander.deucher@amd.com Documentation/gpu/amdgpu/amdgpu-glossary.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit b35a2a12901cd230309750777e3744fa0526543d Author: Prike Liang Date: Thu Dec 1 11:17:31 2022 +0800 drm/amdgpu/sdma_v4_0: turn off SDMA ring buffer in the s2idle suspend In the SDMA s0ix save process requires to turn off SDMA ring buffer for avoiding the SDMA in-flight request, otherwise will suffer from SDMA page fault which causes by page request from in-flight SDMA ring accessing at SDMA restore phase. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2248 Cc: stable@vger.kernel.org # 6.0,5.15+ Fixes: f8f4e2a51834 ("drm/amdgpu: skipping SDMA hw_init and hw_fini for S0ix.") Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Tested-by: Mario Limonciello Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 3f4c175d62d89819121cbbd5a0a30f4b80862025 Author: Jiadong.Zhu Date: Wed Sep 7 10:24:37 2022 +0800 drm/amdgpu: MCBP based on DRM scheduler (v9) Trigger Mid-Command Buffer Preemption according to the priority of the software rings and the hw fence signalling condition. The muxer saves the locations of the indirect buffer frames from the software ring together with the fence sequence number in its fifo queue, and pops out those records when the fences are signalled. The locations are used to resubmit packages in preemption scenarios by coping the chunks from the software ring. v2: Update comment style. v3: Fix conflict caused by previous modifications. v4: Remove unnecessary prints. v5: Fix corner cases for resubmission cases. v6: Refactor functions for resubmission, calling fence_process in irq handler. v7: Solve conflict for removing amdgpu_sw_ring.c. v8: Add time threshold to judge if preemption request is needed. v9: Correct comment spelling. Set fence emit timestamp before rsu assignment. Cc: Christian Koenig Cc: Luben Tuikov Cc: Andrey Grodzovsky Cc: Michel Dänzer Signed-off-by: Jiadong.Zhu Acked-by: Luben Tuikov Acked-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 54 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 12 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 8 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 351 ++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.h | 29 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +- 8 files changed, 422 insertions(+), 43 deletions(-) commit be2545506476b3e6c3a1df11892ed10ca4246eb7 Author: Jiadong.Zhu Date: Wed Jul 13 17:30:25 2022 +0800 drm/amdgpu: Modify unmap_queue format for gfx9 (v6) 1. Modify the unmap_queue package on gfx9. Add trailing fence to track the preemption done. 2. Modify emit_ce_meta emit_de_meta functions for the resumed ibs. v2: Restyle code not to use ternary operator. v3: Modify code format. v4: Enable Mid-Command Buffer Preemption for gfx9 by default. v5: Optimize the flag bit set for emit_fence. v6: Modify log message for preemption timeout. Cc: Christian Koenig Cc: Michel Dänzer Cc: Luben Tuikov Signed-off-by: Jiadong.Zhu Acked-by: Christian König Acked-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 182 ++++++++++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/soc15d.h | 2 + 3 files changed, 156 insertions(+), 29 deletions(-) commit f15e006b831384aaec4b4f13265c0dff88ef09dd Author: Dominique Martinet Date: Tue Nov 22 09:06:56 2022 +0900 9p/xen: do not memcpy header into req->rc while 'h' is packed and can be assumed to match the request payload, req->rc is a struct p9_fcall which is not packed and that memcpy could be wrong. Fix this by copying each fields individually instead. Reported-by: Christian Schoenebeck Reviewed-by: Christian Schoenebeck Suggested-by: Stefano Stabellini Reviewed-by: Stefano Stabellini Link: https://lkml.kernel.org/r/alpine.DEB.2.22.394.2211211454540.1049131@ubuntu-linux-20-04-desktop Link: https://lkml.kernel.org/r/20221122001025.119121-1-asmadeus@codewreck.org Signed-off-by: Dominique Martinet net/9p/trans_xen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0c97a19aa9940491f0374166fb2f2c47667b4e3d Author: Jiadong.Zhu Date: Wed Sep 7 10:03:10 2022 +0800 drm/amdgpu: Add software ring callbacks for gfx9 (v8) Set ring functions with software ring callbacks on gfx9. The software ring could be tested by debugfs_test_ib case. v2: Set sw_ring 2 to enable software ring by default. v3: Remove the parameter for software ring enablement. v4: Use amdgpu_ring_init/fini for software rings. v5: Update for code format. Fix conflict. v6: Remove unnecessary checks and enable software ring on gfx9 by default. v7: Use static array for software ring names and priorities. v8: Stop creating software rings if no gfx ring existed. Cc: Christian Koenig Cc: Luben Tuikov Cc: Andrey Grodzovsky Cc: Michel Dänzer Cc: Likun Gao Signed-off-by: Jiadong.Zhu Acked-by: Luben Tuikov Acked-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 20 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.h | 2 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 113 ++++++++++++++++++++++++++- 5 files changed, 136 insertions(+), 1 deletion(-) commit ded946f3f6399003ea0bdcc8911bc2fc3a7313c6 Author: Jiadong.Zhu Date: Wed Sep 7 09:40:47 2022 +0800 drm/amdgpu: Introduce gfx software ring (v9) The software ring is created to support priority context while there is only one hardware queue for gfx. Every software ring has its fence driver and could be used as an ordinary ring for the GPU scheduler. Multiple software rings are bound to a real ring with the ring muxer. The packages committed on the software ring are copied to the real ring. v2: Use array to store software ring entry. v3: Remove unnecessary prints. v4: Remove amdgpu_ring_sw_init/fini functions, using gtt for sw ring buffer for later dma copy optimization. v5: Allocate ring entry dynamically in the muxer. v6: Update comments for the ring muxer. v7: Modify for function naming. v8: Combine software ring functions into amdgpu_ring_mux.c v9: Use kernel-doc comment on the get_rptr function. Cc: Christian Koenig Cc: Luben Tuikov Cc: Andrey Grodzovsky Cc: Michel Dänzer Signed-off-by: Jiadong.Zhu Acked-by: Huang Rui Acked-by: Luben Tuikov Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 4 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 221 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.h | 76 +++++++++ 5 files changed, 306 insertions(+), 1 deletion(-) commit 30ebe41582d1ea5a7de990319f9e593dad4886f7 Author: Hamza Mahfooz Date: Tue Nov 15 11:58:45 2022 -0500 drm/amd/display: add FB_DAMAGE_CLIPS support Currently, userspace doesn't have a way to communicate selective updates to displays. So, enable support for FB_DAMAGE_CLIPS for DCN ASICs newer than DCN301, convert DRM damage clips to dc dirty rectangles and fill them into dirty_rects in fill_dc_dirty_rects(). Reviewed-by: Leo Li Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 130 +++++++++++++-------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 4 + 2 files changed, 88 insertions(+), 46 deletions(-) commit 26273ade77f54716e30dfd40ac6e85ceb54ac0f9 Author: Schspa Shi Date: Thu Dec 1 11:33:10 2022 +0800 9p: set req refcount to zero to avoid uninitialized usage When a new request is allocated, the refcount will be zero if it is reused, but if the request is newly allocated from slab, it is not fully initialized before being added to idr. If the p9_read_work got a response before the refcount initiated. It will use a uninitialized req, which will result in a bad request data struct. Here is the logs from syzbot. Corrupted memory at 0xffff88807eade00b [ 0xff 0x07 0x00 0x00 0x00 0x00 0x00 0x00 . . . . . . . . ] (in kfence-#110): p9_fcall_fini net/9p/client.c:248 [inline] p9_req_put net/9p/client.c:396 [inline] p9_req_put+0x208/0x250 net/9p/client.c:390 p9_client_walk+0x247/0x540 net/9p/client.c:1165 clone_fid fs/9p/fid.h:21 [inline] v9fs_fid_xattr_set+0xe4/0x2b0 fs/9p/xattr.c:118 v9fs_xattr_set fs/9p/xattr.c:100 [inline] v9fs_xattr_handler_set+0x6f/0x120 fs/9p/xattr.c:159 __vfs_setxattr+0x119/0x180 fs/xattr.c:182 __vfs_setxattr_noperm+0x129/0x5f0 fs/xattr.c:216 __vfs_setxattr_locked+0x1d3/0x260 fs/xattr.c:277 vfs_setxattr+0x143/0x340 fs/xattr.c:309 setxattr+0x146/0x160 fs/xattr.c:617 path_setxattr+0x197/0x1c0 fs/xattr.c:636 __do_sys_setxattr fs/xattr.c:652 [inline] __se_sys_setxattr fs/xattr.c:648 [inline] __ia32_sys_setxattr+0xc0/0x160 fs/xattr.c:648 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 Below is a similar scenario, the scenario in the syzbot log looks more complicated than this one, but this patch can fix it. T21124 p9_read_work ======================== second trans ================================= p9_client_walk p9_client_rpc p9_client_prepare_req p9_tag_alloc req = kmem_cache_alloc(p9_req_cache, GFP_NOFS); tag = idr_alloc << preempted >> req->tc.tag = tag; /* req->[refcount/tag] == uninitialized */ m->rreq = p9_tag_lookup(m->client, m->rc.tag); /* increments uninitalized refcount */ refcount_set(&req->refcount, 2); /* cb drops one ref */ p9_client_cb(req) /* reader thread drops its ref: request is incorrectly freed */ p9_req_put(req) /* use after free and ref underflow */ p9_req_put(req) To fix it, we can initialize the refcount to zero before add to idr. Link: https://lkml.kernel.org/r/20221201033310.18589-1-schspa@gmail.com Cc: stable@vger.kernel.org # 6.0+ due to 6cda12864cb0 ("9p: Drop kref usage") Fixes: 728356dedeff ("9p: Add refcount to p9_req_t") Reported-by: syzbot+8f1060e2aaf8ca55220b@syzkaller.appspotmail.com Signed-off-by: Schspa Shi Reviewed-by: Christian Schoenebeck Signed-off-by: Dominique Martinet net/9p/client.c | 5 +++++ 1 file changed, 5 insertions(+) commit 31fff92c9cadbca4cd294bcdff285ca3fc9bad7c Author: Christophe JAILLET Date: Sun Nov 27 15:46:45 2022 +0100 9p/net: Remove unneeded idr.h #include The 9p net files don't use IDR or IDA functionalities. So there is no point in including . Remove it. Link: https://lkml.kernel.org/r/9e386018601d7e4a9e5d7da8fc3e9555ebb25c87.1669560387.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: Christian Schoenebeck Signed-off-by: Dominique Martinet net/9p/trans_fd.c | 1 - net/9p/trans_rdma.c | 1 - net/9p/trans_virtio.c | 1 - 3 files changed, 3 deletions(-) commit 6e0149a55379d6b91948cf6e94e700eb7dbaa518 Author: Christophe JAILLET Date: Sun Nov 27 13:59:25 2022 +0100 9p/fs: Remove unneeded idr.h #include The 9p fs does not use IDR or IDA functionalities. So there is no point in including . Remove it. Link: https://lkml.kernel.org/r/3d1e0ed9714eaee7e18d9f5b0b4bfa49b00b286d.1669553950.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: Christian Schoenebeck [Dominique: reword subject] Signed-off-by: Dominique Martinet fs/9p/fid.c | 1 - fs/9p/v9fs.c | 1 - fs/9p/vfs_addr.c | 1 - fs/9p/vfs_dentry.c | 1 - fs/9p/vfs_dir.c | 1 - fs/9p/vfs_file.c | 1 - fs/9p/vfs_inode.c | 1 - fs/9p/vfs_inode_dotl.c | 1 - fs/9p/vfs_super.c | 1 - 9 files changed, 9 deletions(-) commit 38552ff676f072e7d15c5e0a877fda613e57ed2d Author: Andreas Gruenbacher Date: Wed Nov 2 17:06:58 2022 +0100 gfs2: Fix and clean up create / evict interaction When gfs2_create_inode() fails after creating a new inode, it uses the GIF_FREE_VFS_INODE and GIF_ALLOC_FAILED inode flags to communicate to gfs2_evict_inode() which parts of the inode need to be deallocated and destroyed. In some error cases, the inode ends up being allocated on disk and then accidentally left behind. In others, the inode is partially constructed and then not properly destroyed. Clean this up by completely handling the inode deallocation and destruction in gfs2_evict_inode(). This means that gfs2_evict_inode() may now be faced with partially constructed inodes, so add the necessary checks to cope with that. In particular, make sure that for incompletely constructed inodes, we're not accessing the buffers backing the on-disk blocks; the contents may be undefined. Signed-off-by: Andreas Gruenbacher fs/gfs2/inode.c | 26 ++++++++++++-------------- fs/gfs2/meta_io.c | 6 ++++++ fs/gfs2/super.c | 35 +++++++++++++++++++++-------------- fs/gfs2/xattr.c | 26 +++++++++++++++----------- 4 files changed, 54 insertions(+), 39 deletions(-) commit 3d0258bc11185ccb21f922332eca731e1928c5a4 Author: Andreas Gruenbacher Date: Wed Nov 2 18:34:42 2022 +0100 gfs2: Clean up initialization of "ip" in gfs2_create_inode Initialize variable "ip" earlier so that it can be used interchangeably with "inode" everywhere. Signed-off-by: Andreas Gruenbacher fs/gfs2/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 761fdbbce96fb3d0569f50a77b1214dbc4b17c44 Author: Andreas Gruenbacher Date: Fri Nov 4 13:26:46 2022 +0100 gfs2: Get rid of ghs[] in gfs2_create_inode In gfs2_create_inode, get rid of the ghs array in favor of two separate variables. This makes the code much less irritating. Signed-off-by: Andreas Gruenbacher fs/gfs2/inode.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 35c23fba4eb4b3043b42acbdd3fbabdd8824f56f Author: Andreas Gruenbacher Date: Wed Nov 2 23:57:50 2022 +0100 gfs2: Add extra error check in alloc_dinode We have reserved the number of blocks we want to allocate, so the actual allocation isn't expected to fail. Nevertheless, make the code behave correctly even when things go wrong. Signed-off-by: Andreas Gruenbacher fs/gfs2/inode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2496ee3821b0fd585c84a3b66d7c2894fc66503a Author: Colin Ian King Date: Wed Nov 30 18:04:58 2022 +0000 media: dvb-usb: m920x: make read-only arrays static const Don't populate the arrays on the stack, instead make them static const. Also makes the object code smaller. Signed-off-by: Colin Ian King Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Hans Verkuil drivers/media/usb/dvb-usb/m920x.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a04f1c81316d27e140c3df5561e5ef87794cd4bc Author: Mark Brown Date: Wed Nov 30 18:46:44 2022 +0000 drm: tda99x: Don't advertise non-existent capture support As far as I can tell none of the tda998x devices support audio capture so don't advertise support for it, ensuring that we don't confuse userspace. Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20221130184644.464820-3-broonie@kernel.org Signed-off-by: Mark Brown drivers/gpu/drm/i2c/tda998x_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit f77a066f4ed307db93aafee621e2683c3bda98ce Author: Mark Brown Date: Wed Nov 30 18:46:43 2022 +0000 ASoC: hdmi-codec: Allow playback and capture to be disabled Currently the hdmi-codec driver always registers both playback and capture capabilities but for most systems there's no actual capture capability, usually HDMI is transmit only. Provide platform data which allows the users to indicate what is supported so that we don't end up advertising things to userspace that we can't actually support. In order to avoid breaking existing users the flags in platform data are a bit awkward and specify what should be disabled rather than doing the perhaps more expected thing and defaulting to not supporting capture. Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20221130184644.464820-2-broonie@kernel.org Signed-off-by: Mark Brown include/sound/hdmi-codec.h | 4 ++++ sound/soc/codecs/hdmi-codec.c | 30 +++++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) commit 89e927bbcd45d507e5612ef72fda04182e544a38 Author: Kristen Carlson Accardi Date: Tue Nov 15 08:16:26 2022 -0800 x86/sgx: Replace kmap/kunmap_atomic() calls kmap_local_page() is the preferred way to create temporary mappings when it is feasible, because the mappings are thread-local and CPU-local. kmap_local_page() uses per-task maps rather than per-CPU maps. This in effect removes the need to disable preemption on the local CPU while the mapping is active, and thus vastly reduces overall system latency. It is also valid to take pagefaults within the mapped region. The use of kmap_atomic() in the SGX code was not an explicit design choice to disable page faults or preemption, and there is no compelling design reason to using kmap_atomic() vs. kmap_local_page(). Signed-off-by: Kristen Carlson Accardi Signed-off-by: Thomas Gleixner Reviewed-by: Jarkko Sakkinen Reviewed-by: Fabio M. De Francesco Reviewed-by: Ira Weiny Link: https://lore.kernel.org/linux-sgx/Y0biN3%2FJsZMa0yUr@kernel.org/ Link: https://lore.kernel.org/r/20221115161627.4169428-1-kristen@linux.intel.com arch/x86/kernel/cpu/sgx/encl.c | 12 ++++++------ arch/x86/kernel/cpu/sgx/ioctl.c | 4 ++-- arch/x86/kernel/cpu/sgx/main.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) commit 2833275568755eb937a52c358bf8bfa7125a463e Author: Rahul Tanwar Date: Thu Nov 24 16:41:43 2022 +0800 x86/of: Add support for boot time interrupt delivery mode configuration Presently, init/boot time interrupt delivery mode is enumerated only for ACPI enabled systems by parsing MADT table or for older systems by parsing MP table. But for OF based x86 systems, it is assumed & hardcoded to be legacy PIC mode. This causes a boot time crash for platforms which do not provide a 8259 compliant legacy PIC. Add support for configuration of init time interrupt delivery mode for x86 OF based systems by introducing a new optional boolean property 'intel,virtual-wire-mode' for the local APIC interrupt-controller node. This property emulates IMCRP Bit 7 of MP feature info byte 2 of MP floating pointer structure. Defaults to legacy PIC mode if absent. Configures it to virtual wire compatibility mode if present. Signed-off-by: Rahul Tanwar Signed-off-by: Thomas Gleixner Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221124084143.21841-5-rtanwar@maxlinear.com arch/x86/kernel/devicetree.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 535403323b4dcdc363e7ea265df62481b903826b Author: Rahul Tanwar Date: Thu Nov 24 16:41:42 2022 +0800 x86/of: Replace printk(KERN_LVL) with pr_lvl() Use pr_lvl() instead of the deprecated printk(KERN_LVL). Just a upgrade of print utilities usage. no functional changes. Suggested-by: Andy Shevchenko Signed-off-by: Rahul Tanwar Signed-off-by: Thomas Gleixner Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221124084143.21841-4-rtanwar@maxlinear.com arch/x86/kernel/devicetree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b3a9801cccefda304263b4e84e9dfe49057f3c29 Author: Rahul Tanwar Date: Thu Nov 24 16:41:41 2022 +0800 dt-bindings: x86: apic: Introduce new optional bool property for lapic X86 defines a few possible interrupt delivery modes. With respect to boot/init time, mainly two interrupt delivery modes are possible. - PIC Mode: Legacy external 8259 compliant PIC interrupt controller - Virtual Wire Mode: Use lapic as virtual wire interrupt delivery mode ACPI and MPS spec compliant systems provide this information, but for OF based systems, it is by default set to PIC mode. In fact it is hardcoded to legacy PIC mode for OF based x86 systems with no option to choose the configuration between PIC mode & virtual wire mode. For this purpose, introduce a new boolean property for the lapic interrupt controller node which allows to configure it for virtual wire mode as well. Property name: 'intel,virtual-wire-mode' Type: Boolean If not present/not defined, interrupt delivery mode defaults to legacy PIC mode. If present/defined, interrupt delivery mode is set to virtual wire mode. Suggested-by: Andy Shevchenko Signed-off-by: Rahul Tanwar Signed-off-by: Thomas Gleixner Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221124084143.21841-3-rtanwar@maxlinear.com .../bindings/interrupt-controller/intel,ce4100-lapic.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 2b822f474621bb2f4f21dd6dae6900e2ccca7e95 Author: Rahul Tanwar Date: Thu Nov 24 16:41:40 2022 +0800 dt-bindings: x86: apic: Convert Intel's APIC bindings to YAML schema The DT bindings for X86 local APIC (lapic) and I/O APIC (ioapic) are outdated. Rework them: - Convert the bindings for lapic and ioapic from text to YAML schema. - Separate lapic & ioapic schemas. - Add missing but required standard properties - Add missing descriptions Suggested-by: Andy Shevchenko Signed-off-by: Rahul Tanwar Signed-off-by: Thomas Gleixner Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221124084143.21841-2-rtanwar@maxlinear.com .../interrupt-controller/intel,ce4100-ioapic.txt | 26 ---------- .../interrupt-controller/intel,ce4100-ioapic.yaml | 60 ++++++++++++++++++++++ .../interrupt-controller/intel,ce4100-lapic.yaml | 57 ++++++++++++++++++++ 3 files changed, 117 insertions(+), 26 deletions(-) commit 9b09927c0cdec4d4e75f7f9e621eaec179a888fd Author: Andy Shevchenko Date: Thu Nov 24 20:48:24 2022 +0200 x86/of: Remove unused early_init_dt_add_memory_arch() Recently objtool started complaining about dead code in the object files, in particular vmlinux.o: warning: objtool: early_init_dt_scan_memory+0x191: unreachable instruction when CONFIG_OF=y. Indeed, early_init_dt_scan() is not used on x86 and making it compile (with help of CONFIG_OF) will abrupt the code flow since in the middle of it there is a BUG() instruction. Remove the pointless function. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221124184824.9548-1-andriy.shevchenko@linux.intel.com arch/x86/kernel/devicetree.c | 5 ----- 1 file changed, 5 deletions(-) commit 1d2633848e742be3e4dc2a7c064088a18b4756d8 Merge: ba62319a42c5 dafc7cde23dc Author: Mark Brown Date: Fri Dec 2 13:53:13 2022 +0000 Add MediaTek MT6357 PMIC support Merge series from Alexandre Mergnat : This adds regulator support for the MT6357 PMIC. commit e3998434da4f5b1f57f8d6a8a9f8502ee3723bae Author: Mateusz Jończyk Date: Tue Nov 29 22:50:08 2022 +0100 x86/apic: Handle no CONFIG_X86_X2APIC on systems with x2APIC enabled by BIOS A kernel that was compiled without CONFIG_X86_X2APIC was unable to boot on platforms that have x2APIC already enabled in the BIOS before starting the kernel. The kernel was supposed to panic with an approprite error message in validate_x2apic() due to the missing X2APIC support. However, validate_x2apic() was run too late in the boot cycle, and the kernel tried to initialize the APIC nonetheless. This resulted in an earlier panic in setup_local_APIC() because the APIC was not registered. In my experiments, a panic message in setup_local_APIC() was not visible in the graphical console, which resulted in a hang with no indication what has gone wrong. Instead of calling panic(), disable the APIC, which results in a somewhat working system with the PIC only (and no SMP). This way the user is able to diagnose the problem more easily. Disabling X2APIC mode is not an option because it's impossible on systems with locked x2APIC. The proper place to disable the APIC in this case is in check_x2apic(), which is called early from setup_arch(). Doing this in __apic_intr_mode_select() is too late. Make check_x2apic() unconditionally available and remove the empty stub. Reported-by: Paul Menzel Reported-by: Robert Elliott (Servers) Signed-off-by: Mateusz Jończyk Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/lkml/d573ba1c-0dc4-3016-712a-cc23a8a33d42@molgen.mpg.de Link: https://lore.kernel.org/lkml/20220911084711.13694-3-mat.jonczyk@o2.pl Link: https://lore.kernel.org/all/20221129215008.7247-1-mat.jonczyk@o2.pl arch/x86/Kconfig | 4 ++-- arch/x86/include/asm/apic.h | 3 +-- arch/x86/kernel/apic/apic.c | 13 ++++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) commit ff4c85c05333c6f24d3fe0a344c6dacd18a7ee49 Author: Brian Gerst Date: Tue Nov 15 13:43:28 2022 -0500 x86/asm/32: Remove setup_once() After the removal of the stack canary segment setup code, this function does nothing. Signed-off-by: Brian Gerst Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221115184328.70874-1-brgerst@gmail.com arch/x86/kernel/head_32.S | 22 ---------------------- 1 file changed, 22 deletions(-) commit 83571a4389039b1be2d77655b2ce47543d407e41 Author: Wolfram Sang Date: Fri Nov 4 16:06:42 2022 +0100 dt-bindings: timer: renesas,cmt: Add r8a779g0 CMT support Signed-off-by: Wolfram Sang Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221104150642.4587-1-wsa+renesas@sang-engineering.com Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/renesas,cmt.yaml | 2 ++ 1 file changed, 2 insertions(+) commit bbf687daab58ef8d09916d69537ff6fa2c849e88 Author: Wolfram Sang Date: Thu Nov 3 21:48:58 2022 +0100 dt-bindings: timer: renesas,tmu: Add r8a779g0 support Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221103204859.24667-1-wsa+renesas@sang-engineering.com Signed-off-by: Daniel Lezcano Documentation/devicetree/bindings/timer/renesas,tmu.yaml | 1 + 1 file changed, 1 insertion(+) commit dafc7cde23dca239987d3cd000b11cdccc3728ea Author: Fabien Parent Date: Tue Nov 29 16:57:06 2022 +0100 regulator: add mt6357 regulator Add regulator driver for the MT6357 PMIC. Signed-off-by: Fabien Parent Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20221005-mt6357-support-v7-7-477e60126749@baylibre.com Signed-off-by: Mark Brown drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/mt6357-regulator.c | 453 +++++++++++++++++++++++++++++ include/linux/regulator/mt6357-regulator.h | 51 ++++ 4 files changed, 514 insertions(+) commit b4387db19d7f1caf166852782a5f0e5a393bdf24 Author: Fabien Parent Date: Tue Nov 29 16:57:01 2022 +0100 regulator: dt-bindings: Add binding schema for mt6357 regulators Add YAML schema for the MediaTek MT6357 regulators. Signed-off-by: Fabien Parent Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20221005-mt6357-support-v7-2-477e60126749@baylibre.com Signed-off-by: Mark Brown .../regulator/mediatek,mt6357-regulator.yaml | 294 +++++++++++++++++++++ 1 file changed, 294 insertions(+) commit 4238568744c0a150d8901e7847092a0f871c938d Author: Christophe JAILLET Date: Tue Nov 1 22:13:58 2022 +0100 clocksource/drivers/arm_arch_timer: 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: Mark Rutland Link: https://lore.kernel.org/r/f430bb12e12eb225ab1206db0be64b755ddafbdc.1667336095.git.christophe.jaillet@wanadoo.fr Signed-off-by: Daniel Lezcano drivers/clocksource/arm_arch_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 180d35a7c05d520314a590c99ad8643d0213f28b Author: Yang Yingliang Date: Sat Oct 29 19:44:27 2022 +0800 clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock() If clk_get_rate() fails which is called after clk_prepare_enable(), clk_disable_unprepare() need be called in error path to disable the clock in dmtimer_systimer_init_clock(). Fixes: 52762fbd1c47 ("clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support") Signed-off-by: Yang Yingliang Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20221029114427.946520-1-yangyingliang@huawei.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-ti-dm-systimer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 822963b96dfdb72ec4fb1395fbdfa778656b49d1 Author: Tony Lindgren Date: Fri Oct 28 13:38:13 2022 +0300 clocksource/drivers/timer-ti-dm: Clear settings on probe and free Clear the timer control register on driver probe and omap_dm_timer_free(). Otherwise we assume the consumer driver takes care of properly initializing timer interrupts on PWM driver module reload for example. AFAIK this is not currently needed as a fix, I just happened to run into this while cleaning up things. Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20221028103813.40783-1-tony@atomide.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-ti-dm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit dedb2aced3e958c6f4811d3e6b392652ff0eea01 Author: Tony Lindgren Date: Fri Oct 28 13:36:04 2022 +0300 clocksource/drivers/timer-ti-dm: Make timer_get_irq static We can make timer_get_irq() static as noted by Janusz. It is only used by omap_rproc_get_timer_irq() via platform data. Reported-by: Janusz Krzysztofik Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20221028103604.40385-1-tony@atomide.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-ti-dm.c | 2 +- include/clocksource/timer-ti-dm.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 9688498b1648aa98a3ee45d9f07763c099f6fb12 Author: Tony Lindgren Date: Fri Oct 28 13:35:26 2022 +0300 clocksource/drivers/timer-ti-dm: Fix warning for omap_timer_match We can now get a warning for 'omap_timer_match' defined but not used. Let's fix this by dropping of_match_ptr for omap_timer_match. Reported-by: kernel test robot Fixes: ab0bbef3ae0f ("clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3") Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20221028103526.40319-1-tony@atomide.com Signed-off-by: Daniel Lezcano drivers/clocksource/timer-ti-dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba62319a42c50e6254e98b3f316464fac8e77968 Author: Yang Yingliang Date: Fri Dec 2 10:51:11 2022 +0800 regulator: core: fix resource leak in regulator_register() I got some resource leak reports while doing fault injection test: OF: ERROR: memory leak, expected refcount 1 instead of 100, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /i2c/pmic@64/regulators/buck1 unreferenced object 0xffff88810deea000 (size 512): comm "490-i2c-rt5190a", pid 253, jiffies 4294859840 (age 5061.046s) hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... ff ff ff ff ff ff ff ff a0 1e 00 a1 ff ff ff ff ................ backtrace: [<00000000d78541e2>] kmalloc_trace+0x21/0x110 [<00000000b343d153>] device_private_init+0x32/0xd0 [<00000000be1f0c70>] device_add+0xb2d/0x1030 [<00000000e3e6344d>] regulator_register+0xaf2/0x12a0 [<00000000e2f5e754>] devm_regulator_register+0x57/0xb0 [<000000008b898197>] rt5190a_probe+0x52a/0x861 [rt5190a_regulator] unreferenced object 0xffff88810b617b80 (size 32): comm "490-i2c-rt5190a", pid 253, jiffies 4294859904 (age 5060.983s) hex dump (first 32 bytes): 72 65 67 75 6c 61 74 6f 72 2e 32 38 36 38 2d 53 regulator.2868-S 55 50 50 4c 59 00 ff ff 29 00 00 00 2b 00 00 00 UPPLY...)...+... backtrace: [<000000009da9280d>] __kmalloc_node_track_caller+0x44/0x1b0 [<0000000025c6a4e5>] kstrdup+0x3a/0x70 [<00000000790efb69>] create_regulator+0xc0/0x4e0 [<0000000005ed203a>] regulator_resolve_supply+0x2d4/0x440 [<0000000045796214>] regulator_register+0x10b3/0x12a0 [<00000000e2f5e754>] devm_regulator_register+0x57/0xb0 [<000000008b898197>] rt5190a_probe+0x52a/0x861 [rt5190a_regulator] After calling regulator_resolve_supply(), the 'rdev->supply' is set by set_supply(), after this set, in the error path, the resources need be released, so call regulator_put() to avoid the leaks. Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator") Fixes: 8a866d527ac0 ("regulator: core: Resolve supply name earlier to prevent double-init") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221202025111.496402-1-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/regulator/core.c | 1 + 1 file changed, 1 insertion(+) commit 023e59d4cee91dd3ca811eb01db2c5fb9f783dc2 Author: Miaohe Lin Date: Tue Oct 11 19:38:03 2022 +0800 x86/alternative: Remove noinline from __ibt_endbr_seal[_end]() stubs Due to the explicit 'noinline' GCC-7.3 is not able to optimize away the argument setup of: apply_ibt_endbr(__ibt_endbr_seal, __ibt_enbr_seal_end); even when X86_KERNEL_IBT=n and the function is an empty stub, which leads to link errors due to missing __ibt_endbr_seal* symbols: ld: arch/x86/kernel/alternative.o: in function `alternative_instructions': alternative.c:(.init.text+0x15d): undefined reference to `__ibt_endbr_seal_end' ld: alternative.c:(.init.text+0x164): undefined reference to `__ibt_endbr_seal' Remove the explicit 'noinline' to help gcc optimize them away. Signed-off-by: Miaohe Lin Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221011113803.956808-1-linmiaohe@huawei.com arch/x86/kernel/alternative.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45ae272a948a03a7d55748bf52d2f47d3b4e1d5a Author: Joe Korty Date: Mon Nov 21 14:53:43 2022 +0000 clocksource/drivers/arm_arch_timer: Fix XGene-1 TVAL register math error The TVAL register is 32 bit signed. Thus only the lower 31 bits are available to specify when an interrupt is to occur at some time in the near future. Attempting to specify a larger interval with TVAL results in a negative time delta which means the timer fires immediately upon being programmed, rather than firing at that expected future time. The solution is for Linux to declare that TVAL is a 31 bit register rather than give its true size of 32 bits. This prevents Linux from programming TVAL with a too-large value. Note that, prior to 5.16, this little trick was the standard way to handle TVAL in Linux, so there is nothing new happening here on that front. The softlockup detector hides the issue, because it keeps generating short timer deadlines that are within the scope of the broken timer. Disable it, and you start using NO_HZ with much longer timer deadlines, which turns into an interrupt flood: 11: 1124855130 949168462 758009394 76417474 104782230 30210281 310890 1734323687 GICv2 29 Level arch_timer And "much longer" isn't that long: it takes less than 43s to underflow TVAL at 50MHz (the frequency of the counter on XGene-1). Some comments on the v1 version of this patch by Marc Zyngier: XGene implements CVAL (a 64bit comparator) in terms of TVAL (a countdown register) instead of the other way around. TVAL being a 32bit register, the width of the counter should equally be 32. However, TVAL is a *signed* value, and keeps counting down in the negative range once the timer fires. It means that any TVAL value with bit 31 set will fire immediately, as it cannot be distinguished from an already expired timer. Reducing the timer range back to a paltry 31 bits papers over the issue. Another problem cannot be fixed though, which is that the timer interrupt *must* be handled within the negative countdown period, or the interrupt will be lost (TVAL will rollover to a positive value, indicative of a new timer deadline). Cc: stable@vger.kernel.org # 5.16+ Fixes: 012f18850452 ("clocksource/drivers/arm_arch_timer: Work around broken CVAL implementations") Signed-off-by: Joe Korty Reviewed-by: Marc Zyngier [maz: revamped the commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221024165422.GA51107@zipoli.concurrent-rt.com Link: https://lore.kernel.org/r/20221121145343.896018-1-maz@kernel.org Signed-off-by: Daniel Lezcano drivers/clocksource/arm_arch_timer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit db78539fc95cf62b0b8f274368fcd8202eac91f9 Author: Jonathan Neuschäfer Date: Fri Nov 4 17:18:46 2022 +0100 clocksource/drivers/timer-npcm7xx: Enable timer 1 clock before use In the WPCM450 SoC, the clocks for each timer can be gated individually. To prevent the timer 1 clock from being gated, enable it explicitly. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20221104161850.2889894-3-j.neuschaefer@gmx.net Signed-off-by: Daniel Lezcano drivers/clocksource/timer-npcm7xx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit aa3f72ea9410f8c9394a5d25bbf40a4cfb56f5a0 Author: Jonathan Neuschäfer Date: Fri Nov 4 17:18:45 2022 +0100 dt-bindings: timer: nuvoton,npcm7xx-timer: Allow specifying all clocks The timer module contains multiple timers. In the WPCM450 SoC, each timer runs off a clock can be gated individually. To model this correctly, the timer node in the devicetree needs to take multiple clock inputs. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Rob Herring Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20221104161850.2889894-2-j.neuschaefer@gmx.net Signed-off-by: Daniel Lezcano .../devicetree/bindings/timer/nuvoton,npcm7xx-timer.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9ffa5e6b8f93ccf1a217dd12e204c1a5e211abef Author: Johan Jonker Date: Fri Oct 28 16:41:30 2022 +0200 dt-bindings: timer: rockchip: Add rockchip,rk3128-timer Add rockchip,rk3128-timer compatible string. Signed-off-by: Johan Jonker Acked-by: Krzysztof Kozlowski Reviewed-by: Heiko Stuebner Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/0e57f38f-bace-8556-7258-aa0b3c0ac103@gmail.com Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml | 1 + 1 file changed, 1 insertion(+) commit 6f855b39e4602b6b42a8e5cbcfefb8a1b8b5f0be Author: Vincent Donnefort Date: Tue Sep 27 11:12:59 2022 +0100 cpu/hotplug: Do not bail-out in DYING/STARTING sections The DYING/STARTING callbacks are not expected to fail. However, as reported by Derek, buggy drivers such as tboot are still free to return errors within those sections, which halts the hot(un)plug and leaves the CPU in an unrecoverable state. As there is no rollback possible, only log the failures and proceed with the following steps. This restores the hotplug behaviour prior to commit 453e41085183 ("cpu/hotplug: Add cpuhp_invoke_callback_range()") Fixes: 453e41085183 ("cpu/hotplug: Add cpuhp_invoke_callback_range()") Reported-by: Derek Dolney Signed-off-by: Vincent Donnefort Signed-off-by: Thomas Gleixner Tested-by: Derek Dolney Reviewed-by: Valentin Schneider Link: https://bugzilla.kernel.org/show_bug.cgi?id=215867 Link: https://lore.kernel.org/r/20220927101259.1149636-1-vdonnefort@google.com kernel/cpu.c | 56 ++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 16 deletions(-) commit d385febc9a19635d4ef197bfad3e84729002f57c Author: Phil Auld Date: Thu Nov 17 11:23:29 2022 -0500 cpu/hotplug: Set cpuhp target for boot cpu Since the boot cpu does not go through the hotplug process it ends up with state == CPUHP_ONLINE but target == CPUHP_OFFLINE. So set the target to match in boot_cpu_hotplug_init(). Signed-off-by: Phil Auld Signed-off-by: Thomas Gleixner Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20221117162329.3164999-3-pauld@redhat.com kernel/cpu.c | 1 + 1 file changed, 1 insertion(+) commit 64ea6e44f85b9b75925ebe1ba0e6e8430cc4e06f Author: Phil Auld Date: Thu Nov 17 11:23:28 2022 -0500 cpu/hotplug: Make target_store() a nop when target == state Writing the current state back in hotplug/target calls cpu_down() which will set cpu dying even when it isn't and then nothing will ever clear it. A stress test that reads values and writes them back for all cpu device files in sysfs will trigger the BUG() in select_fallback_rq once all cpus are marked as dying. kernel/cpu.c::target_store() ... if (st->state < target) ret = cpu_up(dev->id, target); else ret = cpu_down(dev->id, target); cpu_down() -> cpu_set_state() bool bringup = st->state < target; ... if (cpu_dying(cpu) != !bringup) set_cpu_dying(cpu, !bringup); Fix this by letting state==target fall through in the target_store() conditional. Also make sure st->target == target in that case. Fixes: 757c989b9994 ("cpu/hotplug: Make target state writeable") Signed-off-by: Phil Auld Signed-off-by: Thomas Gleixner Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20221117162329.3164999-2-pauld@redhat.com kernel/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 25483dedd2f5d9bc6928cd790ee59772fb880a79 Author: Vinod Koul Date: Fri Dec 2 17:11:44 2022 +0530 dmaengine: Revert "dmaengine: remove s3c24xx driver" This reverts cccc46ae3623 ("dmaengine: remove s3c24xx driver") as it causes regression due to missing header Signed-off-by: Vinod Koul drivers/dma/Kconfig | 12 + drivers/dma/Makefile | 1 + drivers/dma/s3c24xx-dma.c | 1428 +++++++++++++++++++++++++++++ include/linux/platform_data/dma-s3c24xx.h | 48 + 4 files changed, 1489 insertions(+) commit c4db2d3b70e586c7c856c891f4f7052e8d789a06 Author: Stephen Boyd Date: Thu May 19 13:22:01 2022 -0700 debugobjects: Print object pointer in debug_print_object() Delayed kobject debugging (CONFIG_DEBUG_KOBJECT_RELEASE) prints the kobject pointer that's being released in kobject_release() before scheduling a randomly delayed work to do the actual release work. If the caller of kobject_put() frees the kobject upon return then this will typically emit a debugobject warning about freeing an active timer. Usually the release function is the function that does the kfree() of the struct containing the kobject. For example the following print is seen kobject: 'queue' (ffff888114236190): kobject_release, parent 0000000000000000 (delayed 1000) ------------[ cut here ]------------ ODEBUG: free active (active state 0) object type: timer_list hint: kobject_delayed_cleanup+0x0/0x390 but the kobject printk cannot be matched with the debug object printk because it could be any number of kobjects that was released around that time. The random delay for the work doesn't help either. Print the address of the object being tracked to help to figure out which kobject is the problem here. Note that this does not use %px here to match the other %p usage in debugobject debugging. Due to %p usage it is required to disable pointer hashing to correlate the two pointer printks. Signed-off-by: Stephen Boyd Signed-off-by: Thomas Gleixner Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220519202201.2348343-1-swboyd@chromium.org lib/debugobjects.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90d758896787048fa3d4209309d4800f3920e66f Author: Alexey Izbyshev Date: Sat Nov 12 00:54:39 2022 +0300 futex: Resend potentially swallowed owner death notification Commit ca16d5bee598 ("futex: Prevent robust futex exit race") addressed two cases when tasks waiting on a robust non-PI futex remained blocked despite the futex not being owned anymore: * if the owner died after writing zero to the futex word, but before waking up a waiter * if a task waiting on the futex was woken up, but died before updating the futex word (effectively swallowing the notification without acting on it) In the second case, the task could be woken up either by the previous owner (after the futex word was reset to zero) or by the kernel (after the OWNER_DIED bit was set and the TID part of the futex word was reset to zero) if the previous owner died without the resetting the futex. Because the referenced commit wakes up a potential waiter only if the whole futex word is zero, the latter subcase remains unaddressed. Fix this by looking only at the TID part of the futex when deciding whether a wake up is needed. Fixes: ca16d5bee598 ("futex: Prevent robust futex exit race") Signed-off-by: Alexey Izbyshev Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221111215439.248185-1-izbyshev@ispras.ru kernel/futex/core.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 6f3a81b60091031c2c14eb2373d1937b027deb46 Author: Christophe Leroy Date: Fri Dec 2 09:31:43 2022 +0100 powerpc/code-patching: Remove protection against patching init addresses after init Once init section is freed, attempting to patch init code ends up in the weed. Commit 51c3c62b58b3 ("powerpc: Avoid code patching freed init sections") protected patch_instruction() against that, but it is the responsibility of the caller to ensure that the patched memory is valid. All callers have now been verified and fixed so the check can be removed. This improves ftrace activation by about 2% on 8xx. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/504310828f473d424e2ed229eff57bf075f52796.1669969781.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/code-patching.h | 2 -- arch/powerpc/lib/code-patching.c | 13 +------------ arch/powerpc/mm/mem.c | 1 - 3 files changed, 1 insertion(+), 15 deletions(-) commit b988e7797d09379057cf991ae082f9ad7a309a63 Author: Christophe Leroy Date: Fri Dec 2 09:31:42 2022 +0100 powerpc/feature-fixups: Do not patch init section after init Once init section is freed, attempting to patch init code ends up in the weed. Commit 51c3c62b58b3 ("powerpc: Avoid code patching freed init sections") protected patch_instruction() against that, but it is the responsibility of the caller to ensure that the patched memory is valid. In the same spirit as jump_label with its jump_label_can_update() function, add is_fixup_addr_valid() function to skip patching on freed init section. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8e9311fc1b057e4e6a2a3a0701ebcc74b787affe.1669969781.git.christophe.leroy@csgroup.eu arch/powerpc/lib/feature-fixups.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 3d1dbbca33a9c6dd3aafd4d14aaea9cc310723e1 Author: Christophe Leroy Date: Fri Dec 2 09:31:41 2022 +0100 powerpc/feature-fixups: Refactor other fixups patching Several fonctions have the same loop for patching instructions. Introduce function do_patch_fixups() to refactor those loops. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/58ab36949c18f94d466fc98d6c085783b0cd474f.1669969781.git.christophe.leroy@csgroup.eu arch/powerpc/lib/feature-fixups.c | 77 ++++++++++++++------------------------- 1 file changed, 28 insertions(+), 49 deletions(-) commit 6076dc349b1c587c74c37027efff76f0fa4646f4 Author: Christophe Leroy Date: Fri Dec 2 09:31:40 2022 +0100 powerpc/feature-fixups: Refactor entry fixups patching Several fonctions have the same loop for patching instructions. Introduce function do_patch_entry_fixups() to refactor those loops. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/79eeff7b20a98f7136da5f79b1f7c436928f27f3.1669969781.git.christophe.leroy@csgroup.eu arch/powerpc/lib/feature-fixups.c | 84 +++++++++++++++------------------------ 1 file changed, 32 insertions(+), 52 deletions(-) commit 84ecfe6f38ae4ee779ebd97ee173937fff565bf9 Author: Christophe Leroy Date: Fri Dec 2 09:31:39 2022 +0100 powerpc/code-patching: Remove #ifdef CONFIG_STRICT_KERNEL_RWX No need to have one implementation of patch_instruction() for CONFIG_STRICT_KERNEL_RWX and one for !CONFIG_STRICT_KERNEL_RWX. In patch_instruction(), call raw_patch_instruction() when !CONFIG_STRICT_KERNEL_RWX. In poking_init(), bail out immediately, it will be equivalent to the weak default implementation. Everything else is declared static and will be discarded by GCC when !CONFIG_STRICT_KERNEL_RWX. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f67d2a109404d03e8fdf1ea15388c8778337a76b.1669969781.git.christophe.leroy@csgroup.eu arch/powerpc/lib/code-patching.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit dbadae92728788d61e910506b0cb61986c7fdb4a Author: Gerhard Engleder Date: Wed Nov 30 20:37:08 2022 +0100 tsnep: Rework RX buffer allocation Refill RX queue in batches of descriptors to improve performance. Refill is allowed to fail as long as a minimum number of descriptors is active. Thus, a limited number of failed RX buffer allocations is now allowed for normal operation. Previously every failed allocation resulted in a dropped frame. If the minimum number of active descriptors is reached, then RX buffers are still reused and frames are dropped. This ensures that the RX queue never runs empty and always continues to operate. Prework for future XDP support. Signed-off-by: Gerhard Engleder Signed-off-by: David S. Miller drivers/net/ethernet/engleder/tsnep.h | 4 + drivers/net/ethernet/engleder/tsnep_ethtool.c | 7 + drivers/net/ethernet/engleder/tsnep_main.c | 203 ++++++++++++++++---------- 3 files changed, 140 insertions(+), 74 deletions(-) commit d3dfe8d6c04061a3eadfc299ba8009b38f4bc25b Author: Gerhard Engleder Date: Wed Nov 30 20:37:07 2022 +0100 tsnep: Throttle interrupts Without interrupt throttling, iperf server mode generates a CPU load of 100% (A53 1.2GHz). Also the throughput suffers with less than 900Mbit/s on a 1Gbit/s link. The reason is a high interrupt load with interrupts every ~20us. Reduce interrupt load by throttling of interrupts. Interrupt delay default is 64us. For iperf server mode the CPU load is significantly reduced to ~20% and the throughput reaches the maximum of 941MBit/s. Interrupts are generated every ~140us. RX and TX coalesce can be configured with ethtool. RX coalesce has priority over TX coalesce if the same interrupt is used. Signed-off-by: Gerhard Engleder Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/engleder/tsnep.h | 4 + drivers/net/ethernet/engleder/tsnep_ethtool.c | 134 ++++++++++++++++++++++++++ drivers/net/ethernet/engleder/tsnep_hw.h | 7 ++ drivers/net/ethernet/engleder/tsnep_main.c | 42 ++++++++ 4 files changed, 187 insertions(+) commit 4f661ccfcac70f3838f7e5ca53ac51c86e1acbb1 Author: Gerhard Engleder Date: Wed Nov 30 20:37:06 2022 +0100 tsnep: Add ethtool::get_channels support Allow user space to read number of TX and RX queue. This is useful for device dependent qdisc configurations like TAPRIO with hardware offload. Also ethtool::get_per_queue_coalesce / set_per_queue_coalesce requires that interface. Signed-off-by: Gerhard Engleder Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/engleder/tsnep_ethtool.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 91644df1ba01dd584d6f0fb2b2abd9014d484957 Author: Gerhard Engleder Date: Wed Nov 30 20:37:05 2022 +0100 tsnep: Consistent naming of struct net_device Signed-off-by: Gerhard Engleder Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/engleder/tsnep_ethtool.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 95cce3fae4d980af92bbccb56a6a64261a75be6d Author: Jonathan Toppins Date: Wed Nov 30 15:12:07 2022 -0500 Documentation: bonding: correct xmit hash steps Correct xmit hash steps for layer3+4 as introduced by commit 49aefd131739 ("bonding: do not discard lowest hash bit for non layer3+4 hashing"). Signed-off-by: Jonathan Toppins Signed-off-by: David S. Miller Documentation/networking/bonding.rst | 1 + 1 file changed, 1 insertion(+) commit f036b97da67f4551d703f189b9a90686cbaf0adb Author: Jonathan Toppins Date: Wed Nov 30 15:12:06 2022 -0500 Documentation: bonding: update miimon default to 100 With commit c1f897ce186a ("bonding: set default miimon value for non-arp modes if not set") the miimon default was changed from zero to 100 if arp_interval is also zero. Document this fact in bonding.rst. Fixes: c1f897ce186a ("bonding: set default miimon value for non-arp modes if not set") Signed-off-by: Jonathan Toppins Signed-off-by: David S. Miller Documentation/networking/bonding.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a479f9264bddfd0c266615b83f784222eccf9b91 Author: Andy Shevchenko Date: Wed Nov 30 14:36:13 2022 +0200 net: thunderbolt: Use bitwise types in the struct thunderbolt_ip_frame_header The main usage of the struct thunderbolt_ip_frame_header is to handle the packets on the media layer. The header is bound to the protocol in which the byte ordering is crucial. However the data type definition doesn't use that and sparse is unhappy, for example (17 altogether): .../thunderbolt.c:718:23: warning: cast to restricted __le32 .../thunderbolt.c:966:42: warning: incorrect type in assignment (different base types) .../thunderbolt.c:966:42: expected unsigned int [usertype] frame_count .../thunderbolt.c:966:42: got restricted __le32 [usertype] Switch to the bitwise types in the struct thunderbolt_ip_frame_header to reduce this, but not completely solving (9 left), because the same data type is used for Rx header handled locally (in CPU byte order). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: David S. Miller drivers/net/thunderbolt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0bbe50f3e85aadeb7417905b1011fc5f98d8c897 Author: Andy Shevchenko Date: Wed Nov 30 14:36:12 2022 +0200 net: thunderbolt: Switch from __maybe_unused to pm_sleep_ptr() etc Letting the compiler remove these functions when the kernel is built without CONFIG_PM_SLEEP support is simpler and less heavier for builds than the use of __maybe_unused attributes. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: David S. Miller drivers/net/thunderbolt.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 47b438cc27254fa68b7360de153db4093c9259f4 Author: Jiri Pirko Date: Wed Nov 30 09:52:50 2022 +0100 net: devlink: convert port_list into xarray Some devlink instances may contain thousands of ports. Storing them in linked list and looking them up is not scalable. Convert the linked list into xarray. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller net/core/devlink.c | 57 ++++++++++++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 30 deletions(-) commit 5074ffbec67ac592614901771d3a15e1198d759d Author: John Ogness Date: Tue Nov 22 10:01:23 2022 +0106 printk: htmldocs: add missing description Variable and return descriptions were missing from the SRCU read lock functions. Add them. Signed-off-by: John Ogness Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/87zgcjpdvo.fsf@jogness.linutronix.de kernel/printk/printk.c | 2 ++ 1 file changed, 2 insertions(+) commit ff707dfd79f7d984909c8e003a139168073a388e Author: John Ogness Date: Wed Nov 16 17:27:52 2022 +0106 tty: serial: sh-sci: use setup() callback for early console When setting up the early console, the setup() callback of the regular console is used. It is called manually before registering the early console instead of providing a setup() callback for the early console. This is probably because the early setup needs a different @options during the early stage. The issue here is that the setup() callback is called without the console_list_lock held and functions such as uart_set_options() expect that. Rather than manually calling the setup() function before registering, provide an early console setup() callback that will use the different early options. This ensures that the error checking, ordering, and locking context when setting up the early console are correct. Since this early console can only be registered via the earlyprintk= parameter, the @options argument of the setup() callback will always be NULL. Rather than simply ignoring the argument, add a WARN_ON() to get our attention in case the setup() callback semantics should change in the future. Note that technically the current implementation works because it is only used in early boot. And since the early console setup is performed before registering, it cannot race with anything and thus does not need any locking. However, longterm maintenance is easier when drivers rely on the subsystem API rather than manually implementing steps that could cause breakage in the future. Signed-off-by: John Ogness Reviewed-by: Geert Uytterhoeven Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-41-john.ogness@linutronix.de drivers/tty/serial/sh-sci.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 848a9c106625b10fa74022ea853845a2b7a834f0 Author: John Ogness Date: Wed Nov 16 17:27:51 2022 +0106 printk: relieve console_lock of list synchronization duties The console_list_lock provides synchronization for console list and console->flags updates. All call sites that were using the console_lock for this synchronization have either switched to use the console_list_lock or the SRCU list iterator. Remove console_lock usage for console list updates and console->flags updates. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-40-john.ogness@linutronix.de kernel/printk/printk.c | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) commit e2b39652283685edd7e84174b10736d79063d399 Author: John Ogness Date: Wed Nov 16 17:27:50 2022 +0106 tty: serial: kgdboc: use console_list_lock to trap exit kgdboc_earlycon_init() uses the console_lock to ensure that no consoles are unregistered until the kgdboc_earlycon is setup. The console_list_lock should be used instead because list synchronization responsibility will be removed from the console_lock in a later change. Signed-off-by: John Ogness Reviewed-by: Daniel Thompson Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-39-john.ogness@linutronix.de drivers/tty/serial/kgdboc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6193bc90849a711e3b67bc6051e1bb0254c51f2a Author: John Ogness Date: Wed Nov 16 17:27:49 2022 +0106 tty: serial: kgdboc: synchronize tty_find_polling_driver() and register_console() Calling tty_find_polling_driver() can lead to uart_set_options() being called (via the poll_init() callback of tty_operations) to configure the uart. But uart_set_options() can also be called by register_console() (via the setup() callback of console). Take the console_list_lock to synchronize against register_console() and also use it for console list traversal. This also ensures the console list cannot change until the polling console has been chosen. Signed-off-by: John Ogness Reviewed-by: Daniel Thompson Reviewed-by: Petr Mladek Reviewed-by: Douglas Anderson Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-38-john.ogness@linutronix.de drivers/tty/serial/kgdboc.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 66857443699b34c8c5951dd421f1c528c9554bb5 Author: John Ogness Date: Wed Nov 16 17:27:48 2022 +0106 tty: serial: kgdboc: use console_list_lock for list traversal configure_kgdboc() uses the console_lock for console list iteration. Use the console_list_lock instead because list synchronization responsibility will be removed from the console_lock in a later change. The SRCU iterator could have been used here, but a later change will relocate the locking of the console_list_lock to also provide synchronization against register_console(). Note, the console_lock is still needed to serialize the device() callback with other console operations. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Reviewed-by: Douglas Anderson Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-37-john.ogness@linutronix.de drivers/tty/serial/kgdboc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7e537af997748ea7a8df3f2b234a877ea9ef7791 Author: John Ogness Date: Wed Nov 16 17:27:47 2022 +0106 tty: serial: kgdboc: use srcu console list iterator Use srcu console list iteration for safe console list traversal. Note that this is a preparatory change for when console_lock no longer provides synchronization for the console list. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Reviewed-by: Douglas Anderson Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-36-john.ogness@linutronix.de drivers/tty/serial/kgdboc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 28de287a95362f52489c5a3f90acfb2b99524dae Author: John Ogness Date: Wed Nov 16 17:27:46 2022 +0106 proc: consoles: use console_list_lock for list iteration The console_lock is used in part to guarantee safe list iteration. The console_list_lock should be used because list synchronization responsibility will be removed from the console_lock in a later change. Note, the console_lock is still needed to serialize the device() callback with other console operations. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-35-john.ogness@linutronix.de fs/proc/consoles.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 7c2af0f634f1bc761ca827310dc7e8e586af502f Author: John Ogness Date: Wed Nov 16 17:27:45 2022 +0106 tty: tty_io: use console_list_lock for list synchronization show_cons_active() uses the console_lock to gather information on registered consoles. It requires that no consoles are unregistered until it is finished. The console_list_lock should be used because list synchronization responsibility will be removed from the console_lock in a later change. Note, the console_lock is still needed to serialize the device() callback with other console operations. Signed-off-by: John Ogness Reviewed-by: Greg Kroah-Hartman Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-34-john.ogness@linutronix.de drivers/tty/tty_io.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 6f8836756f3cbb02bfd1f0e033516585250318a9 Author: John Ogness Date: Wed Nov 16 17:27:44 2022 +0106 printk, xen: fbfront: create/use safe function for forcing preferred With commit 9e124fe16ff2("xen: Enable console tty by default in domU if it's not a dummy") a hack was implemented to make sure that the tty console remains the console behind the /dev/console device. The main problem with the hack is that, after getting the console pointer to the tty console, it is assumed the pointer is still valid after releasing the console_sem. This assumption is incorrect and unsafe. Make the hack safe by introducing a new function console_force_preferred_locked() and perform the full operation under the console_list_lock. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-33-john.ogness@linutronix.de drivers/video/fbdev/xen-fbfront.c | 12 ++++------ include/linux/console.h | 1 + kernel/printk/printk.c | 49 ++++++++++++++++++++++++++++++++++++--- 3 files changed, 51 insertions(+), 11 deletions(-) commit 2c6b4b7065a7006271a9c12b1a1e6c56dc6d3796 Author: John Ogness Date: Wed Nov 16 17:27:43 2022 +0106 netconsole: avoid CON_ENABLED misuse to track registration The CON_ENABLED flag is being misused to track whether or not the extended console should be or has been registered. Instead use a local variable to decide if the extended console should be registered and console_is_registered() to determine if it has been registered. Also add a check in cleanup_netconsole() to only unregister the extended console if it has been registered. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-32-john.ogness@linutronix.de drivers/net/netconsole.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 9490b22ab39d12a06ab60465f2c4fc6a18d99752 Author: John Ogness Date: Wed Nov 16 17:27:42 2022 +0106 usb: early: xhci-dbc: use console_is_registered() It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-31-john.ogness@linutronix.de drivers/usb/early/xhci-dbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b71a443cb0abdddaf08a5991e28fc510a8d3abd Author: John Ogness Date: Wed Nov 16 17:27:41 2022 +0106 tty: serial: xilinx_uartps: use console_is_registered() It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-30-john.ogness@linutronix.de drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad3b7f6141f8eeac275ca3f93c81596250125b4c Author: John Ogness Date: Wed Nov 16 17:27:40 2022 +0106 tty: serial: samsung_tty: use console_is_registered() It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-29-john.ogness@linutronix.de drivers/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5bea480f1367135b2017f075865115b2e40ba08 Author: John Ogness Date: Wed Nov 16 17:27:39 2022 +0106 tty: serial: pic32_uart: use console_is_registered() It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-28-john.ogness@linutronix.de drivers/tty/serial/pic32_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e35d977fa1e2840e40ad6f09deefdf39d8437b4 Author: John Ogness Date: Wed Nov 16 17:27:38 2022 +0106 tty: serial: earlycon: use console_is_registered() It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-27-john.ogness@linutronix.de drivers/tty/serial/earlycon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34d9541edef7f6527d22fde9707b785adbb6d19a Author: John Ogness Date: Wed Nov 16 17:27:37 2022 +0106 tty: hvc: use console_is_registered() It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-26-john.ogness@linutronix.de drivers/tty/hvc/hvc_console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 794c8e847d048e3f7179e2659945767e4cf9a396 Author: John Ogness Date: Wed Nov 16 17:27:36 2022 +0106 efi: earlycon: use console_is_registered() The CON_ENABLED status of a console is a runtime setting that does not involve the console driver. Drivers must not assume that if the console is disabled then proper hardware management is not needed. For the EFI earlycon case, it is about remapping/unmapping memory for the framebuffer. Use console_is_registered() instead of checking CON_ENABLED. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-25-john.ogness@linutronix.de drivers/firmware/efi/earlycon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit de61a1a3a08307103d4ccfe59724bc05570e5abd Author: John Ogness Date: Wed Nov 16 17:27:35 2022 +0106 tty: nfcon: use console_is_registered() Currently CON_ENABLED is being (mis)used to identify if the console has been registered. This is not reliable because it can be set even though registration failed or it can be unset, even though the console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-24-john.ogness@linutronix.de arch/m68k/emu/nfcon.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 452b9b24754044eced1508f9090611f3d9aa4ca5 Author: John Ogness Date: Wed Nov 16 17:27:34 2022 +0106 serial_core: replace uart_console_enabled() with uart_console_registered() All users of uart_console_enabled() really want to know if a console is registered. It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. A _locked() variant is provided because uart_set_options() is always called with the console_list_lock held and must check if a console is registered in order to synchronize with kgdboc. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-23-john.ogness@linutronix.de drivers/tty/serial/8250/8250_core.c | 2 +- drivers/tty/serial/pic32_uart.c | 2 +- drivers/tty/serial/serial_core.c | 14 +++++++------- include/linux/serial_core.h | 10 ++++++++-- 4 files changed, 17 insertions(+), 11 deletions(-) commit 1fd4224a6b641f1949e27bf350b5b1c1e47e2ccc Author: John Ogness Date: Wed Nov 16 17:27:33 2022 +0106 console: introduce console_is_registered() Currently it is not possible for drivers to detect if they have already successfully registered their console. Several drivers have multiple paths that lead to console registration. To avoid attempting a 2nd registration (which leads to a WARN), drivers are implementing their own solution. Introduce console_is_registered() so drivers can easily identify if their console is currently registered. A _locked() variant is also provided if the caller is already holding the console_list_lock. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-22-john.ogness@linutronix.de include/linux/console.h | 28 ++++++++++++++++++++++++++++ kernel/printk/printk.c | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) commit 8cb15f7f492f85d695a6f4d12044c47230f69d96 Author: John Ogness Date: Wed Nov 16 17:27:32 2022 +0106 printk: console_device: use srcu console list iterator Use srcu console list iteration for console list traversal. It is acceptable because the consoles might come and go at any time. Strict synchronizing with console registration code would not bring any advantage over srcu. Document why the console_lock is still necessary. Note that this is a preparatory change for when console_lock no longer provides synchronization for the console list. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-21-john.ogness@linutronix.de kernel/printk/printk.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 87f2e4b7d9e5c50756184b4f8d0b92680de61496 Author: John Ogness Date: Wed Nov 16 17:27:31 2022 +0106 printk: console_flush_on_panic: use srcu console list iterator With SRCU it is now safe to traverse the console list, even if the console_trylock() failed. However, overwriting console->seq when console_trylock() failed is still an issue. Switch to SRCU iteration and document remaining issue with console->seq. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-20-john.ogness@linutronix.de kernel/printk/printk.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit d792db6f6b902dad6b751dc2ef226fb4463efe62 Author: John Ogness Date: Wed Nov 16 17:27:30 2022 +0106 printk: console_unblank: use srcu console list iterator Use srcu console list iteration for console list traversal. Document why the console_lock is still necessary. Note that this is a preparatory change for when console_lock no longer provides synchronization for the console list. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-19-john.ogness@linutronix.de kernel/printk/printk.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 12f1da5fc4c728dc690a2fe3f4197d62f3a6fa7b Author: John Ogness Date: Wed Nov 16 17:27:29 2022 +0106 printk: console_is_usable: use console_srcu_read_flags All users of console_is_usable() are SRCU iterators. Use the appropriate wrapper function to locklessly read the flags. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-18-john.ogness@linutronix.de kernel/printk/printk.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit eb7f1ed2509c6223d960a7d69644a8eb506b13d0 Author: John Ogness Date: Wed Nov 16 17:27:28 2022 +0106 printk: __pr_flush: use srcu console list iterator Use srcu console list iteration for console list traversal. Document why the console_lock is still necessary. Note that this is a preparatory change for when console_lock no longer provides synchronization for the console list. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-17-john.ogness@linutronix.de kernel/printk/printk.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit fc956ae0de7fa25f99114609f21b76e7d38dc25c Author: John Ogness Date: Wed Nov 16 17:27:27 2022 +0106 printk: console_flush_all: use srcu console list iterator Guarantee safe iteration of the console list by using SRCU. Note that in the case of a handover, the SRCU read lock is also released. This is documented in the function description and as comments in the code. It is a bit tricky, but this preserves the lockdep lock ordering for the context handing over the console_lock: console_lock() | mutex_acquire(&console_lock_dep_map) <-- console lock | console_unlock() | console_flush_all() | | srcu_read_lock(&console_srcu) <-- srcu lock | | console_emit_next_record() | | | console_lock_spinning_disable_and_check() | | | | srcu_read_unlock(&console_srcu) <-- srcu unlock | | | | mutex_release(&console_lock_dep_map) <-- console unlock Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-16-john.ogness@linutronix.de kernel/printk/printk.c | 50 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) commit b8ef04be6e1935748ef98af98d81b0744cf225d0 Author: John Ogness Date: Wed Nov 16 17:27:26 2022 +0106 kdb: use srcu console list iterator Guarantee safe iteration of the console list by using SRCU. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Reviewed-by: Aaron Tomlin Reviewed-by: Douglas Anderson Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-15-john.ogness@linutronix.de kernel/debug/kdb/kdb_io.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 12335446e06f1b3c9112576f894df856d3d466fc Author: John Ogness Date: Wed Nov 16 17:27:25 2022 +0106 um: kmsg_dumper: use srcu console list iterator Rather than using the console_lock to guarantee safe console list traversal, use srcu console list iteration. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-14-john.ogness@linutronix.de arch/um/kernel/kmsg_dump.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 100bdef2c198b8dc64df011dc4a2152db913c8ba Author: John Ogness Date: Wed Nov 16 17:27:24 2022 +0106 console: introduce wrappers to read/write console flags After switching to SRCU for console list iteration, some readers will begin readings console->flags as a data race. Locklessly reading console->flags provides a consistent value because there is at most one CPU modifying console->flags and that CPU is using only read-modify-write operations. Introduce a wrapper for SRCU iterators to read console flags. Introduce a matching wrapper to write to flags of registered consoles. Writing to flags of registered consoles is synchronized by the console_list_lock. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-13-john.ogness@linutronix.de include/linux/console.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ kernel/printk/printk.c | 10 +++++----- 2 files changed, 50 insertions(+), 5 deletions(-) commit 4dc64682ad37abb02c54ca598430ac27de60c21a Author: John Ogness Date: Mon Nov 21 12:16:12 2022 +0106 printk: introduce console_list_lock Currently there exist races in register_console(), where the types of registered consoles are checked (without holding the console_lock) and then after acquiring the console_lock, it is assumed that the list has not changed. Also, some code that performs console_unregister() make similar assumptions. It might be possible to fix these races using the console_lock. But it would require a complex analysis of all console drivers to make sure that the console_lock is not taken in match() and setup() callbacks. And we really prefer to split up and reduce the responsibilities of console_lock rather than expand its complexity. Therefore, introduce a new console_list_lock to provide full synchronization for any console list changes. In addition, also use console_list_lock for synchronization of console->flags updates. All flags are either static or modified only during the console registration. There are only two exceptions. The first exception is CON_ENABLED, which is also modified by console_start()/console_stop(). Therefore, these functions must also take the console_list_lock. The second exception is when the flags are modified by the console driver init code before the console is registered. These will be ignored because they are not visible to the rest of the system via the console_drivers list. Note that one of the various responsibilities of the console_lock is also intended to provide console list and console->flags synchronization. Later changes will update call sites relying on the console_lock for these purposes. Once all call sites have been updated, the console_lock will be relieved of synchronizing console_list and console->flags updates. Suggested-by: Thomas Gleixner Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/87sficwokr.fsf@jogness.linutronix.de include/linux/console.h | 23 +++++++++++-- kernel/printk/printk.c | 89 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 100 insertions(+), 12 deletions(-) commit 8b5dd40088f7a3d85e6072f027ec50f309f64876 Author: John Ogness Date: Wed Nov 16 17:27:22 2022 +0106 proc: consoles: document console_lock usage The console_lock is held throughout the start/show/stop procedure to print out device/driver information about all registered consoles. Since the console_lock is being used for multiple reasons, explicitly document these reasons. This will be useful when the console_lock is split into fine-grained locking. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-11-john.ogness@linutronix.de fs/proc/consoles.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d25a2e748ae159e43d40f4bc0a9e89cc443e325f Author: John Ogness Date: Wed Nov 16 17:27:21 2022 +0106 tty: tty_io: document console_lock usage show_cons_active() uses the console_lock to gather information on registered consoles. Since the console_lock is being used for multiple reasons, explicitly document these reasons. This will be useful when the console_lock is split into fine-grained locking. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-10-john.ogness@linutronix.de drivers/tty/tty_io.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0fb413ea64603a71e19b4b15a6c5b704e3897d06 Author: John Ogness Date: Wed Nov 16 17:27:20 2022 +0106 tty: serial: kgdboc: document console_lock usage kgdboc_earlycon_init() uses the console_lock to ensure that no consoles are unregistered until the kgdboc_earlycon is setup. This is necessary because the trapping of the exit() callback assumes that the exit() callback is not called before the trap is setup. Explicitly document this non-typical console_lock usage. Signed-off-by: John Ogness Reviewed-by: Greg Kroah-Hartman Reviewed-by: Douglas Anderson Reviewed-by: Daniel Thompson Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-9-john.ogness@linutronix.de drivers/tty/serial/kgdboc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3860e7c57fd23e744e045436f9872fb9d01381e2 Author: John Ogness Date: Wed Nov 16 17:27:19 2022 +0106 um: kmsg_dump: only dump when no output console available The initial intention of the UML kmsg_dumper is to dump the kernel buffers to stdout if there is no console available to perform the regular crash output. However, if ttynull was registered as a console, no crash output was seen. Commit e23fe90dec28 ("um: kmsg_dumper: always dump when not tty console") tried to fix this by performing the kmsg_dump unless the stdio console was behind /dev/console or enabled. But this allowed kmsg dumping to occur even if other non-stdio consoles will output the crash output. Also, a console being the driver behind /dev/console has nothing to do with a crash scenario. Restore the initial intention by dumping the kernel buffers to stdout only if a non-ttynull console is registered and enabled. Also add detailed comments so that it is clear why these rules are applied. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-8-john.ogness@linutronix.de arch/um/kernel/kmsg_dump.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit a42427609368d773c4ab6b4c9686577817a4d219 Author: John Ogness Date: Wed Nov 16 17:27:18 2022 +0106 printk: fix setting first seq for consoles It used to be that all consoles were synchronized with respect to which message they were printing. After commit a699449bb13b ("printk: refactor and rework printing logic"), all consoles have their own @seq for tracking which message they are on. That commit also changed how the initial sequence number was chosen. Instead of choosing the next non-printed message, it chose the sequence number of the next message that will be added to the ringbuffer. That change created a possibility that a non-boot console taking over for a boot console might skip messages if the boot console was behind and did not have a chance to catch up before being unregistered. Since it is not known which boot console is the same device, flush all consoles and, if necessary, start with the message of the enabled boot console that is the furthest behind. If no boot consoles are enabled, begin with the next message that will be added to the ringbuffer. Also, since boot consoles are meant to be used at boot time, handle them the same as CON_PRINTBUFFER to ensure that no initial messages are skipped. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-7-john.ogness@linutronix.de kernel/printk/printk.c | 50 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) commit b80ea0e81b3954e4c519e0c257b095e77cf94d86 Author: John Ogness Date: Wed Nov 16 17:27:17 2022 +0106 printk: move @seq initialization to helper The code to initialize @seq for a new console needs to consider more factors when choosing an initial value. Move the code into a helper function console_init_seq() "as is" so this code can be expanded without causing register_console() to become too long. A later commit will implement the additional code. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-6-john.ogness@linutronix.de kernel/printk/printk.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 1145703612462b9bab2a325c305408ebfb6de304 Author: John Ogness Date: Wed Nov 16 17:27:16 2022 +0106 printk: register_console: use "registered" for variable names The @bootcon_enabled and @realcon_enabled local variables actually represent if such console types are registered. In general there has been a confusion about enabled vs. registered. Incorrectly naming such variables promotes such confusion. Rename the variables to _registered. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-5-john.ogness@linutronix.de kernel/printk/printk.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 6c4afa79147e4aa86665795695ac4a5f25e73176 Author: John Ogness Date: Wed Nov 16 17:27:15 2022 +0106 printk: Prepare for SRCU console list protection Provide an NMI-safe SRCU protected variant to walk the console list. Note that all console fields are now set before adding the console to the list to avoid the console becoming visible by SCRU readers before being fully initialized. This is a preparatory change for a new console infrastructure which operates independent of the console BKL. Suggested-by: Thomas Gleixner Signed-off-by: John Ogness Acked-by: Miguel Ojeda Reviewed-by: Paul E. McKenney Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-4-john.ogness@linutronix.de .clang-format | 1 + include/linux/console.h | 28 +++++++++++++++- kernel/printk/printk.c | 87 ++++++++++++++++++++++++++++++++++++++++--------- 3 files changed, 100 insertions(+), 16 deletions(-) commit d9a4af5690e26afa8a2eb83c575d3a9ef52cde1d Author: Thomas Gleixner Date: Wed Nov 16 17:27:14 2022 +0106 printk: Convert console_drivers list to hlist Replace the open coded single linked list with a hlist so a conversion to SRCU protected list walks can reuse the existing primitives. Co-developed-by: John Ogness Signed-off-by: John Ogness Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-3-john.ogness@linutronix.de fs/proc/consoles.c | 3 +- include/linux/console.h | 8 ++-- kernel/printk/printk.c | 101 ++++++++++++++++++++++++++---------------------- 3 files changed, 62 insertions(+), 50 deletions(-) commit 9e409c4778afbbd44759e56ec4bbed839fd31909 Author: Thomas Gleixner Date: Wed Nov 16 17:27:13 2022 +0106 serial: kgdboc: Lock console list in probe function Unprotected list walks are not necessarily safe. Signed-off-by: Thomas Gleixner Signed-off-by: John Ogness Reviewed-by: Greg Kroah-Hartman Reviewed-by: Douglas Anderson Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Reviewed-by: Daniel Thompson Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221116162152.193147-2-john.ogness@linutronix.de drivers/tty/serial/kgdboc.c | 2 ++ 1 file changed, 2 insertions(+) commit 4361251cef466839795691e2628285e3f5093a98 Author: Anshuman Khandual Date: Fri Dec 2 07:26:11 2022 +0530 arm_pmu: Drop redundant armpmu->map_event() in armpmu_event_init() __hw_perf_event_init() already calls armpmu->map_event() callback, and also returns its error code including -ENOENT, along with a debug callout. Hence an additional armpmu->map_event() check for -ENOENT is redundant. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland 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/20221202015611.338499-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 3 --- 1 file changed, 3 deletions(-) commit 2ae6feb1a1f6678fe11864f1b6920ed10b09ad6a Author: Tianjia Zhang Date: Fri Nov 25 20:18:11 2022 +0800 crypto: ccree,hisilicon - Fix dependencies to correct algorithm Commit d2825fa9365d ("crypto: sm3,sm4 - move into crypto directory") moves the SM3 and SM4 stand-alone library and the algorithm implementation for the Crypto API into the same directory, and the corresponding relationship of Kconfig is modified, CONFIG_CRYPTO_SM3/4 corresponds to the stand-alone library of SM3/4, and CONFIG_CRYPTO_SM3/4_GENERIC corresponds to the algorithm implementation for the Crypto API. Therefore, it is necessary for this module to depend on the correct algorithm. Fixes: d2825fa9365d ("crypto: sm3,sm4 - move into crypto directory") Cc: Jason A. Donenfeld Cc: stable@vger.kernel.org # v5.19+ Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 4 ++-- drivers/crypto/hisilicon/Kconfig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 4cb4f7c11deef5222ac15631b16ab54625b926b3 Author: Herbert Xu Date: Fri Nov 25 12:36:45 2022 +0800 crypto: caam - Set DMA alignment explicitly This driver has been implicitly relying on kmalloc alignment to be sufficient for DMA. This may no longer be the case with upcoming arm64 changes. This patch changes it to explicitly request DMA alignment from the Crypto API. Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 72 ++++++++-------- drivers/crypto/caam/caamalg_qi.c | 52 ++++++------ drivers/crypto/caam/caamalg_qi2.c | 173 +++++++++++++++++++------------------- drivers/crypto/caam/caamhash.c | 87 ++++++++++--------- drivers/crypto/caam/caampkc.c | 47 ++++++----- 5 files changed, 216 insertions(+), 215 deletions(-) commit a5a49249effb6f03086214b25719d415cc867b3d Author: Herbert Xu Date: Fri Nov 25 12:36:43 2022 +0800 crypto: kpp - Add ctx helpers with DMA alignment This patch adds helpers to access the kpp context structure and request context structure with an added alignment for DMA access. Signed-off-by: Herbert Xu include/crypto/internal/kpp.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 4ac3377645e98d319cb5404e72d40a4aa69d252c Author: Herbert Xu Date: Fri Nov 25 12:36:41 2022 +0800 crypto: akcipher - Add ctx helpers with DMA alignment This patch adds helpers to access the akcipher context structure and request context structure with an added alignment for DMA access. Signed-off-by: Herbert Xu include/crypto/internal/akcipher.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 1c799571976da15e055f32a0e244697500e97f64 Author: Herbert Xu Date: Fri Nov 25 12:36:39 2022 +0800 crypto: api - Increase MAX_ALGAPI_ALIGNMASK to 127 Previously we limited the maximum alignment mask to 63. This is mostly due to stack usage for shash. This patch introduces a separate limit for shash algorithms and increases the general limit to 127 which is the value that we need for DMA allocations on arm64. Signed-off-by: Herbert Xu crypto/shash.c | 9 +++++++-- include/crypto/algapi.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) commit 12658ac5e612214023c26f0689e6bbe8bbea0871 Author: Herbert Xu Date: Fri Nov 25 12:36:37 2022 +0800 crypto: skcipher - Add ctx helpers with DMA alignment This patch adds helpers to access the skcipher context structure and request context structure with an added alignment for DMA access. Signed-off-by: Herbert Xu include/crypto/internal/skcipher.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit b5f755fbd5d1102104c502ae213e9b42478c098f Author: Herbert Xu Date: Fri Nov 25 12:36:35 2022 +0800 crypto: hash - Add ctx helpers with DMA alignment This patch adds helpers to access the ahash context structure and request context structure with an added alignment for DMA access. Signed-off-by: Herbert Xu include/crypto/internal/hash.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit f8e4d1d0ac832de8efc98f302acf9476bbfffb55 Author: Herbert Xu Date: Fri Nov 25 12:36:33 2022 +0800 crypto: aead - Add ctx helpers with DMA alignment This patch adds helpers to access the aead context structure and request context structure with an added alignment for DMA access. Signed-off-by: Herbert Xu include/crypto/internal/aead.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit e634ac4a8aaab37bdc69177df9b40acf92eccc6d Author: Herbert Xu Date: Fri Nov 25 12:36:31 2022 +0800 crypto: api - Add crypto_tfm_ctx_dma This patch adds the helpers crypto_tfm_ctx_aligned and crypto_tfm_ctx_dma. The first aligns the tfm context to the value cra_alignmask. The second sets the alignment according to dma_cache_get_alignment(); This patch also moves crypto_tfm_ctx into algapi.h. Signed-off-by: Herbert Xu include/crypto/algapi.h | 41 +++++++++++++++++++++++++++++++++++++++-- include/linux/crypto.h | 5 ----- 2 files changed, 39 insertions(+), 7 deletions(-) commit 14386d471322a204344ae81a28738b71e261d3a0 Author: Herbert Xu Date: Fri Nov 25 12:36:28 2022 +0800 crypto: Prepare to move crypto_tfm_ctx The helper crypto_tfm_ctx is only used by the Crypto API algorithm code and should really be in algapi.h. However, for historical reasons many files relied on it to be in crypto.h. This patch changes those files to use algapi.h instead in prepartion for a move. Signed-off-by: Herbert Xu arch/arm/crypto/aes-cipher-glue.c | 2 +- arch/arm64/crypto/aes-ce-glue.c | 2 +- arch/arm64/crypto/aes-cipher-glue.c | 2 +- arch/arm64/crypto/sm4-ce-cipher-glue.c | 2 +- arch/x86/crypto/twofish_glue.c | 2 +- crypto/aes_generic.c | 2 +- crypto/aes_ti.c | 2 +- crypto/anubis.c | 2 +- crypto/blowfish_common.c | 3 ++- crypto/blowfish_generic.c | 3 ++- crypto/camellia_generic.c | 2 +- crypto/cast5_generic.c | 2 +- crypto/cast6_generic.c | 2 +- crypto/des_generic.c | 2 +- crypto/fcrypt.c | 2 +- crypto/khazad.c | 2 +- crypto/seed.c | 2 +- crypto/serpent_generic.c | 2 +- crypto/sm4_generic.c | 2 +- crypto/tea.c | 2 +- crypto/twofish_common.c | 2 +- crypto/twofish_generic.c | 2 +- drivers/crypto/nx/nx-842.h | 2 +- include/crypto/aria.h | 2 +- include/crypto/internal/acompress.h | 2 ++ include/crypto/internal/scompress.h | 3 ++- 26 files changed, 30 insertions(+), 25 deletions(-) commit 7bcceb4c9896b1b672b636ae70fe75110d6bf1ad Author: Shang XiaoJing Date: Thu Nov 24 14:49:40 2022 +0800 crypto: omap-sham - Use pm_runtime_resume_and_get() in omap_sham_probe() omap_sham_probe() calls pm_runtime_get_sync() and calls pm_runtime_put_sync() latter 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: b359f034c8bf ("crypto: omap-sham - Convert to use pm_runtime API") Signed-off-by: Shang XiaoJing Acked-by: Mark Greer Signed-off-by: Herbert Xu drivers/crypto/omap-sham.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c390c452ebeb44cb979b7374d3acc3859415e86c Author: Joe Fradley Date: Tue Nov 22 14:54:49 2022 -0800 crypto: x86/curve25519 - disable gcov curve25519-x86_64.c fails to build when CONFIG_GCOV_KERNEL is enabled. The error is "inline assembly requires more registers than available" thrown from the `fsqr()` function. Therefore, excluding this file from GCOV profiling until this issue is resolved. Thereby allowing CONFIG_GCOV_PROFILE_ALL to be enabled for x86. Signed-off-by: Joe Fradley Signed-off-by: Herbert Xu arch/x86/crypto/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 3d780c8a9850ad60dee47a8d971ba7888f3d1bd3 Author: Christophe JAILLET Date: Tue Nov 22 22:56:19 2022 +0100 crypto: amlogic - Remove kcalloc without check There is no real point in allocating dedicated memory for the irqs array. MAXFLOW is only 2, so it is easier to allocated the needed space directly within the 'meson_dev' structure. This saves some memory allocation and avoids an indirection when using the irqs array. Fixes: 48fe583fe541 ("crypto: amlogic - Add crypto accelerator...") Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu drivers/crypto/amlogic/amlogic-gxl-core.c | 1 - drivers/crypto/amlogic/amlogic-gxl.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 4d2b225a67e6df962bbeaad473bfd8f97cfbf478 Author: Herbert Xu Date: Tue Nov 22 18:09:16 2022 +0800 crypto: kpp - Move reqsize into tfm The value of reqsize cannot be determined in case of fallbacks. Therefore it must be stored in the tfm and not the alg object. Signed-off-by: Herbert Xu include/crypto/internal/kpp.h | 2 +- include/crypto/kpp.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit cb99fc0dd1f6985e8b6ade93e3d69f5e33930539 Author: Herbert Xu Date: Tue Nov 22 18:06:56 2022 +0800 crypto: dh - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Herbert Xu crypto/dh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3e71e5b0efcc730216f4450b796df4fdd627ecd0 Author: Herbert Xu Date: Tue Nov 22 18:03:35 2022 +0800 crypto: akcipher - Move reqsize into tfm The value of reqsize cannot be determined in case of fallbacks. Therefore it must be stored in the tfm and not the alg object. Signed-off-by: Herbert Xu include/crypto/akcipher.h | 7 ++++--- include/crypto/internal/akcipher.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) commit 93c446cd36a410b31519af7a2dd32e899cc03d06 Author: Herbert Xu Date: Tue Nov 22 17:42:26 2022 +0800 crypto: virtio - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Herbert Xu Acked-by: Gonglei Signed-off-by: Herbert Xu drivers/crypto/virtio/virtio_crypto_akcipher_algs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 908d383b6c94be0f89c5e2a5a346d99495efd4d4 Author: Herbert Xu Date: Tue Nov 22 17:40:51 2022 +0800 crypto: caam - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Herbert Xu Reviewed-by: Gaurav Jain Signed-off-by: Herbert Xu drivers/crypto/caam/caampkc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 80e62ad58db084920d8cf23323b713391e09f374 Author: Herbert Xu Date: Tue Nov 22 17:30:58 2022 +0800 crypto: qat - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Herbert Xu Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_asym_algs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5ba78373561f12d23c975b0a154104a07866f94b Author: Herbert Xu Date: Tue Nov 22 17:28:38 2022 +0800 crypto: hisilicon/hpre - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Herbert Xu Reviewed-by: Longfang Liu Signed-off-by: Herbert Xu drivers/crypto/hisilicon/hpre/hpre_crypto.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 56861cbde1b9f3b34d300e6ba87f2c3de1a9c309 Author: Herbert Xu Date: Tue Nov 22 17:24:01 2022 +0800 crypto: kpp - Add helper to set reqsize The value of reqsize should only be changed through a helper. To do so we need to first add a helper for this. Signed-off-by: Herbert Xu include/crypto/internal/kpp.h | 6 ++++++ 1 file changed, 6 insertions(+) commit bd71e0dced921e00599052b445f9a9f7916a5452 Author: Yushan Zhou Date: Tue Nov 22 15:49:00 2022 +0800 crypto: marvell/octeontx - remove redundant NULL check release_firmware() checks whether firmware pointer is NULL. Remove the redundant NULL check in release_tar_archive(). Signed-off-by: Yushan Zhou Signed-off-by: Herbert Xu drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5b11d1a360ea23c80c6d4ec3f5986a788d0a0995 Author: Herbert Xu Date: Tue Nov 22 13:53:38 2022 +0800 crypto: rsa-pkcs1pad - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Herbert Xu crypto/rsa-pkcs1pad.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6a83830f649a614aca445bbcadbd582c7929e63d Author: Nikolaus Voss Date: Mon Nov 21 15:12:41 2022 +0100 crypto: caam - warn if blob_gen key is insecure If CAAM is not in "trusted" or "secure" state, a fixed non-volatile key is used instead of the unique device key. This is the default mode of operation without secure boot (HAB). In this scenario, CAAM encrypted blobs should be used only for testing but not in a production environment, so issue a warning. Signed-off-by: Nikolaus Voss Reviewed-by: Ahmad Fatoum Signed-off-by: Herbert Xu drivers/crypto/caam/blob_gen.c | 9 +++++++++ drivers/crypto/caam/regs.h | 3 +++ 2 files changed, 12 insertions(+) commit 31f81401e23fb88cc030cd586abd28740e6c8136 Author: Wang Yufen Date: Mon Nov 21 19:27:34 2022 +0800 crypto: qat - fix error return code in adf_probe Fix to return a negative error code -EINVAL instead of 0. Fixes: 0cec19c761e5 ("crypto: qat - add support for compression for 4xxx") Signed-off-by: Wang Yufen Acked-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_4xxx/adf_drv.c | 1 + 1 file changed, 1 insertion(+) commit 77992f896745c63ae64bfccfdc429ab7b3d88da5 Author: Bartosz Golaszewski Date: Wed Nov 23 12:24:16 2022 +0100 configfs: remove mentions of committable items A proposition of implementation of committable items has been rejected due to the gpio-sim module being the only user and configfs not getting much development in general. In that case, let's remove the notion of committable items from docs and headers. Signed-off-by: Bartosz Golaszewski Signed-off-by: Christoph Hellwig Documentation/filesystems/configfs.rst | 48 ---------------------------------- include/linux/configfs.h | 3 --- 2 files changed, 51 deletions(-) commit c65234b283a65cfbfc94619655e820a5e55199eb Author: Chen Zhongjin Date: Mon Oct 17 09:42:30 2022 +0800 configfs: fix possible memory leak in configfs_create_dir() kmemleak reported memory leaks in configfs_create_dir(): unreferenced object 0xffff888009f6af00 (size 192): comm "modprobe", pid 3777, jiffies 4295537735 (age 233.784s) backtrace: kmem_cache_alloc (mm/slub.c:3250 mm/slub.c:3256 mm/slub.c:3263 mm/slub.c:3273) new_fragment (./include/linux/slab.h:600 fs/configfs/dir.c:163) configfs_register_subsystem (fs/configfs/dir.c:1857) basic_write (drivers/hwtracing/stm/p_basic.c:14) stm_p_basic do_one_initcall (init/main.c:1296) do_init_module (kernel/module/main.c:2455) ... unreferenced object 0xffff888003ba7180 (size 96): comm "modprobe", pid 3777, jiffies 4295537735 (age 233.784s) backtrace: kmem_cache_alloc (mm/slub.c:3250 mm/slub.c:3256 mm/slub.c:3263 mm/slub.c:3273) configfs_new_dirent (./include/linux/slab.h:723 fs/configfs/dir.c:194) configfs_make_dirent (fs/configfs/dir.c:248) configfs_create_dir (fs/configfs/dir.c:296) configfs_attach_group.isra.28 (fs/configfs/dir.c:816 fs/configfs/dir.c:852) configfs_register_subsystem (fs/configfs/dir.c:1881) basic_write (drivers/hwtracing/stm/p_basic.c:14) stm_p_basic do_one_initcall (init/main.c:1296) do_init_module (kernel/module/main.c:2455) ... This is because the refcount is not correct in configfs_make_dirent(). For normal stage, the refcount is changing as: configfs_register_subsystem() configfs_create_dir() configfs_make_dirent() configfs_new_dirent() # set s_count = 1 dentry->d_fsdata = configfs_get(sd); # s_count = 2 ... configfs_unregister_subsystem() configfs_remove_dir() remove_dir() configfs_remove_dirent() # s_count = 1 dput() ... *dentry_unlink_inode()* configfs_d_iput() # s_count = 0, release However, if we failed in configfs_create(): configfs_register_subsystem() configfs_create_dir() configfs_make_dirent() # s_count = 2 ... configfs_create() # fail ->out_remove: configfs_remove_dirent(dentry) configfs_put(sd) # s_count = 1 return PTR_ERR(inode); There is no inode in the error path, so the configfs_d_iput() is lost and makes sd and fragment memory leaked. To fix this, when we failed in configfs_create(), manually call configfs_put(sd) to keep the refcount correct. Fixes: 7063fbf22611 ("[PATCH] configfs: User-driven configuration filesystem") Signed-off-by: Chen Zhongjin Signed-off-by: Christoph Hellwig fs/configfs/dir.c | 2 ++ 1 file changed, 2 insertions(+) commit ad050d2390fccb22aa3e6f65e11757ce7a5a7ca5 Author: Michael Jeanson Date: Thu Dec 1 11:14:42 2022 -0500 powerpc/ftrace: fix syscall tracing on PPC64_ELF_ABI_V1 In v5.7 the powerpc syscall entry/exit logic was rewritten in C, on PPC64_ELF_ABI_V1 this resulted in the symbols in the syscall table changing from their dot prefixed variant to the non-prefixed ones. Since ftrace prefixes a dot to the syscall names when matching them to build its syscall event list, this resulted in no syscall events being available. Remove the PPC64_ELF_ABI_V1 specific version of arch_syscall_match_sym_name to have the same behavior across all powerpc variants. Fixes: 68b34588e202 ("powerpc/64/sycall: Implement syscall entry/exit logic in C") Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Michael Jeanson Reviewed-by: Mathieu Desnoyers Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221201161442.2127231-1-mjeanson@efficios.com arch/powerpc/include/asm/ftrace.h | 12 ------------ 1 file changed, 12 deletions(-) commit 7cd882df9485988f7d9b3fae04fde4e95a4c7a74 Author: Rohan McLure Date: Thu Dec 1 18:10:19 2022 +1100 powerpc/64: Sanitise user registers on interrupt in pseries, POWERNV Cause pseries and POWERNV platforms to default to zeroising all potentially user-defined registers when entering the kernel by means of any interrupt source, reducing user-influence of the kernel and the likelihood or producing speculation gadgets. Acked-by: Nicholas Piggin Signed-off-by: Rohan McLure Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221201071019.1953023-7-rmclure@linux.ibm.com arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efe1691ac814e4cf3653538b701662cbd905bddc Author: Rohan McLure Date: Thu Dec 1 18:10:18 2022 +1100 powerpc/64e: Clear gprs on interrupt routine entry on Book3E Zero GPRS r14-r31 on entry into the kernel for interrupt sources to limit influence of user-space values in potential speculation gadgets. Prior to this commit, all other GPRS are reassigned during the common prologue to interrupt handlers and so need not be zeroised explicitly. This may be done safely, without loss of register state prior to the interrupt, as the common prologue saves the initial values of non-volatiles, which are unconditionally restored in interrupt_64.S. Mitigation defaults to enabled by INTERRUPT_SANITIZE_REGISTERS. Reviewed-by: Nicholas Piggin Signed-off-by: Rohan McLure Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221201071019.1953023-6-rmclure@linux.ibm.com arch/powerpc/kernel/exceptions-64e.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1df45d78b8a89da6544fab5267e8f5da15073d28 Author: Rohan McLure Date: Thu Dec 1 18:10:17 2022 +1100 powerpc/64s: Zeroise gprs on interrupt routine entry on Book3S Zeroise user state in gprs (assign to zero) to reduce the influence of user registers on speculation within kernel syscall handlers. Clears occur at the very beginning of the sc and scv 0 interrupt handlers, with restores occurring following the execution of the syscall handler. Zeroise GPRS r0, r2-r11, r14-r31, on entry into the kernel for all other interrupt sources. The remaining gprs are overwritten by entry macros to interrupt handlers, irrespective of whether or not a given handler consumes these register values. If an interrupt does not select the IMSR_R12 IOption, zeroise r12. Prior to this commit, r14-r31 are restored on a per-interrupt basis at exit, but now they are always restored on 64bit Book3S. Remove explicit REST_NVGPRS invocations on 64-bit Book3S. 32-bit systems do not clear user registers on interrupt, and continue to depend on the return value of interrupt_exit_user_prepare to determine whether or not to restore non-volatiles. The mmap_bench benchmark in selftests should rapidly invoke pagefaults. See ~0.8% performance regression with this mitigation, but this indicates the worst-case performance due to heavier-weight interrupt handlers. This mitigation is able to be enabled/disabled through CONFIG_INTERRUPT_SANITIZE_REGISTERS. Reviewed-by: Nicholas Piggin Signed-off-by: Rohan McLure Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221201071019.1953023-5-rmclure@linux.ibm.com arch/powerpc/kernel/exceptions-64s.S | 27 ++++++++++++++++++--------- arch/powerpc/kernel/interrupt_64.S | 16 ++++++++++++++-- 2 files changed, 32 insertions(+), 11 deletions(-) commit 2487fd2e6d61b5293eed8ecd25add3cc78593d38 Author: Rohan McLure Date: Thu Dec 1 18:10:16 2022 +1100 powerpc/64s: IOption for MSR stored in r12 Interrupt handlers in asm/exceptions-64s.S contain a great deal of common code produced by the GEN_COMMON macros. Currently, at the exit point of the macro, r12 will contain the contents of the MSR. A future patch will cause these macros to zeroise architected registers to avoid potential speculation influence of user data. Provide an IOption that signals that r12 must be retained, as the interrupt handler assumes it to hold the contents of the MSR. Reviewed-by: Nicholas Piggin Signed-off-by: Rohan McLure Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221201071019.1953023-4-rmclure@linux.ibm.com arch/powerpc/kernel/exceptions-64s.S | 7 +++++++ 1 file changed, 7 insertions(+) commit 75c5d6b1e194c341371639469fcb8691afa0e254 Author: Rohan McLure Date: Thu Dec 1 18:10:15 2022 +1100 powerpc/64: Sanitise common exit code for interrupts Interrupt code is shared between Book3E/S 64-bit systems for interrupt handlers. Ensure that exit code correctly restores non-volatile gprs on each system when CONFIG_INTERRUPT_SANITIZE_REGISTERS is enabled. Also introduce macros for clearing/restoring registers on interrupt entry for when this configuration option is either disabled or enabled. Reviewed-by: Nicholas Piggin Signed-off-by: Rohan McLure Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221201071019.1953023-3-rmclure@linux.ibm.com arch/powerpc/kernel/interrupt_64.S | 6 ++++++ 1 file changed, 6 insertions(+) commit cbf892ba56677b942020d2bc7ca9b79281fa0bcc Author: Rohan McLure Date: Thu Dec 1 18:10:14 2022 +1100 powerpc/64: Add interrupt register sanitisation macros Include in asm/ppc_asm.h macros to be used in multiple successive patches to implement zeroising architected registers in interrupt handlers. Registers will be sanitised in this fashion in future patches to reduce the speculation influence of user-controlled register values. These mitigations will be configurable through the CONFIG_INTERRUPT_SANITIZE_REGISTERS Kconfig option. Included are macros for conditionally zeroising registers and restoring as required with the mitigation enabled. With the mitigation disabled, non-volatiles must be restored on demand at separate locations to those required by the mitigation. Reviewed-by: Nicholas Piggin Signed-off-by: Rohan McLure Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221201071019.1953023-2-rmclure@linux.ibm.com arch/powerpc/include/asm/ppc_asm.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 0e23347f1e0f2b1c98f87a4088231d0d6f59b962 Author: Rohan McLure Date: Thu Dec 1 18:10:13 2022 +1100 powerpc/64: Add INTERRUPT_SANITIZE_REGISTERS Kconfig Add Kconfig option for enabling clearing of registers on arrival in an interrupt handler. This reduces the speculation influence of registers on kernel internals. The option will be consumed by 64-bit systems that feature speculation and wish to implement this mitigation. This patch only introduces the Kconfig option, no actual mitigations. The primary overhead of this mitigation lies in an increased number of registers that must be saved and restored by interrupt handlers on Book3S systems. Enable by default on Book3E systems, which prior to this patch eagerly save and restore register state, meaning that the mitigation when implemented will have minimal overhead. Acked-by: Nicholas Piggin Signed-off-by: Rohan McLure Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221201071019.1953023-1-rmclure@linux.ibm.com arch/powerpc/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) commit 03f7c1d2a49acd30e38789cd809d3300721e9b0e Author: Kajol Jain Date: Wed Nov 30 23:15:13 2022 +0530 powerpc/hv-gpci: Fix hv_gpci event list Based on getPerfCountInfo v1.018 documentation, some of the hv_gpci events were deprecated for platform firmware that supports counter_info_version 0x8 or above. Fix the hv_gpci event list by adding a new attribute group called "hv_gpci_event_attrs_v6" and a "ENABLE_EVENTS_COUNTERINFO_V6" macro to enable these events for platform firmware that supports counter_info_version 0x6 or below. And assigning the hv_gpci event list based on output counter info version of underlying plaform. Fixes: 97bf2640184f ("powerpc/perf/hv-gpci: add the remaining gpci requests") Signed-off-by: Kajol Jain Reviewed-by: Madhavan Srinivasan Reviewed-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221130174513.87501-1-kjain@linux.ibm.com arch/powerpc/perf/hv-gpci-requests.h | 4 ++++ arch/powerpc/perf/hv-gpci.c | 35 +++++++++++++++++++++++++++++++++-- arch/powerpc/perf/hv-gpci.h | 1 + arch/powerpc/perf/req-gen/perf.h | 20 ++++++++++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) commit 4d0eea415216fe3791da2f65eb41399e70c7bedf Author: Yang Yingliang Date: Sat Oct 29 19:16:26 2022 +0800 powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe() If platform_device_add() is not called or failed, it can not call platform_device_del() to clean up memory, it should call platform_device_put() in error case. Fixes: 26f6cb999366 ("[POWERPC] fsl_soc: add support for fsl_spi") Signed-off-by: Yang Yingliang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221029111626.429971-1-yangyingliang@huawei.com arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6fdf29f7b99814d3673f2d9f4649262807cb836 Author: Uros Bizjak Date: Thu Dec 1 17:01:03 2022 +0100 posix_acl: Fix the type of sentinel in get_acl The type should be struct posix_acl * instead of void *. Cc: Christian Brauner Cc: Alexander Viro Signed-off-by: Uros Bizjak Signed-off-by: Christian Brauner (Microsoft) fs/posix_acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22db71bcba826c607324a8ee1b21f5cf7ec71e8b Merge: 94ba4f2c33f4 0b2199841a79 Author: Michael Ellerman Date: Fri Dec 2 18:04:56 2022 +1100 Merge branch 'topic/qspinlock' into next Merge Nick's powerpc qspinlock implementation. From his cover letter: This replaces the generic queued spinlock code (like s390 does) with our own implementation. Generic PV qspinlock code is causing latency / starvation regressions on large systems that are resulting in hard lockups reported (mostly in pathoogical cases). The generic qspinlock code has a number of issues important for powerpc hardware and hypervisors that aren't easily solved without changing code that would impact other architectures. Follow s390's lead and implement our own for now. Issues for powerpc using generic qspinlocks: - The previous lock value should not be loaded with simple loads, and need not be passed around from previous loads or cmpxchg results, because powerpc uses ll/sc-style atomics which can perform more complex operations that do not require this. powerpc implementations tend to prefer loads use larx for improved coherency performance. - The queueing process should absolutely minimise the number of stores to the lock word to reduce exclusive coherency probes, important for large system scalability. The pending logic is counter productive here. - Non-atomic unlock for paravirt locks is important (atomic instructions tend to still be more expensive than x86 CPUs). - Yielding to the lock owner is important in the oversubscribed paravirt case, which requires storing the owner CPU in the lock word. - More control of lock stealing for the paravirt case is important to keep latency down on large systems. - The lock acquisition operation should always be made with a special variant of atomic instructions with the lock hint bit set, including (especially) in the queueing paths. This is more a matter of adding more arch lock helpers so not an insurmountable problem for generic code. commit 94ba4f2c33f42dae7813dc169a177e922a39560c Author: Benjamin Gray Date: Mon Nov 28 15:19:43 2022 +1100 selftests/powerpc: Add ptrace setup_core_pattern() null-terminator - malloc() does not zero the buffer, - fread() does not null-terminate it's output, - `cat /proc/sys/kernel/core_pattern | hexdump -C` shows the file is not inherently null-terminated So using string operations on the buffer is risky. Explicitly add a null character to the end to make it safer. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221128041948.58339-3-bgray@linux.ibm.com tools/testing/selftests/powerpc/ptrace/core-pkey.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit aecfd680099ba518c34dff2941017c5aa97def52 Author: Benjamin Gray Date: Mon Nov 28 15:19:42 2022 +1100 selftests/powerpc: Use mfspr/mtspr macros No need to write inline asm for mtspr/mfspr, we have macros for this in reg.h Signed-off-by: Benjamin Gray Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221128041948.58339-2-bgray@linux.ibm.com tools/testing/selftests/powerpc/dscr/dscr.h | 17 +++++------------ tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c | 6 ++---- tools/testing/selftests/powerpc/ptrace/ptrace.h | 5 +---- tools/testing/selftests/powerpc/security/flush_utils.c | 3 ++- 4 files changed, 10 insertions(+), 21 deletions(-) commit 5921eb36d2a1b276b16a24e529788550e6a65449 Author: Tiezhu Yang Date: Thu Dec 1 10:49:57 2022 +0800 selftests: powerpc: Use "grep -E" instead of "egrep" The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this using "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl tools/testing/selftests/powerpc` 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: Michael Ellerman Link: https://lore.kernel.org/r/1669862997-31335-1-git-send-email-yangtiezhu@loongson.cn tools/testing/selftests/powerpc/scripts/hmi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b34a099faa123488b13caf704562f4dbe483fc4 Author: Nicholas Piggin Date: Mon Oct 24 13:01:50 2022 +1000 powerpc/64s/hash: add stress_hpt kernel boot option to increase hash faults This option increases the number of hash misses by limiting the number of kernel HPT entries, by keeping a per-CPU record of the last kernel HPTEs installed, and removing that from the hash table on the next hash insertion. A timer round-robins CPUs removing remaining kernel HPTEs and clearing the TLB (in the case of bare metal) to increase and slightly randomise kernel fault activity. Signed-off-by: Nicholas Piggin [mpe: Add comment about NR_CPUS usage, fixup whitespace] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221024030150.852517-1-npiggin@gmail.com Documentation/admin-guide/kernel-parameters.txt | 5 + arch/powerpc/mm/book3s64/hash_4k.c | 5 + arch/powerpc/mm/book3s64/hash_64k.c | 10 ++ arch/powerpc/mm/book3s64/hash_utils.c | 130 +++++++++++++++++++++++- arch/powerpc/mm/book3s64/internal.h | 11 ++ 5 files changed, 160 insertions(+), 1 deletion(-) commit dfecd06bc5524517ed7737c30eaaf747338b280a Author: Nicholas Piggin Date: Sun Nov 27 22:49:42 2022 +1000 powerpc: remove STACK_FRAME_OVERHEAD This is equal to STACK_FRAME_MIN_SIZE on 32-bit and 64-bit ELFv1, and no longer used in 64-bit ELFv2, so replace STACK_FRAME_OVERHEAD occurrences with STACK_FRAME_MIN_SIZE. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-18-npiggin@gmail.com arch/powerpc/include/asm/ptrace.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit cd52414d5a6ccea6ce956ef05161fe824522a107 Author: Nicholas Piggin Date: Sun Nov 27 22:49:41 2022 +1000 powerpc/64: ELFv2 use minimal stack frames in int and switch frame sizes Adjust the ELFv2 interrupt and switch frames to the minimum C ABI size, plus pt_regs, plus 16 bytes for the aligned regs marker for the int frame (and the switch frame needs to match that because it uses the same regs offset as the int frame). This saves 80 bytes of kernel stack per interrupt. It's the principle of getting our accounting right that's more important than the practical saving. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-17-npiggin@gmail.com arch/powerpc/include/asm/ptrace.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 90f1b43196c5e79f6c986a359011a19857984c27 Author: Nicholas Piggin Date: Sun Nov 27 22:49:40 2022 +1000 powerpc: allow minimum sized kernel stack frames This affects only 64-bit ELFv2 kernels, and reduces the minimum asm-created stack frame size from 112 to 32 byte on those kernels. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-16-npiggin@gmail.com arch/powerpc/kernel/head_40x.S | 2 +- arch/powerpc/kernel/head_44x.S | 6 +++--- arch/powerpc/kernel/head_64.S | 6 +++--- arch/powerpc/kernel/head_85xx.S | 4 ++-- arch/powerpc/kernel/head_8xx.S | 2 +- arch/powerpc/kernel/head_book3s_32.S | 4 ++-- arch/powerpc/kernel/irq.c | 4 ++-- arch/powerpc/kernel/misc_32.S | 2 +- arch/powerpc/kernel/misc_64.S | 4 ++-- arch/powerpc/kernel/process.c | 2 +- arch/powerpc/kernel/smp.c | 2 +- arch/powerpc/kernel/stacktrace.c | 2 +- 12 files changed, 20 insertions(+), 20 deletions(-) commit 4cefb0f6c555971b3e6544a9b15470f9d1f12089 Author: Nicholas Piggin Date: Sun Nov 27 22:49:39 2022 +1000 powerpc: split validate_sp into two functions Most callers just want to validate an arbitrary kernel stack pointer, some need a particular size. Make the size case the exceptional one with an extra function. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-15-npiggin@gmail.com arch/powerpc/include/asm/processor.h | 15 ++++++++++++--- arch/powerpc/kernel/process.c | 23 ++++++++++++++--------- arch/powerpc/kernel/stacktrace.c | 2 +- arch/powerpc/perf/callchain.c | 6 +++--- 4 files changed, 30 insertions(+), 16 deletions(-) commit edbd0387f3249cc7e102f86d4852a9a9f3bb1305 Author: Nicholas Piggin Date: Sun Nov 27 22:49:38 2022 +1000 powerpc: copy_thread add a back chain to the switch stack frame Stack unwinders need LR and the back chain as a minimum. The switch stack uses regs->nip for its return pointer rather than lrsave, so that was not set in the fork frame, and neither was the back chain. This change sets those fields in the stack. With this and the previous change, a stack trace in the switch or interrupt stack goes from looking like this: Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries Modules linked in: CPU: 3 PID: 90 Comm: systemd Not tainted NIP: c000000000011060 LR: c000000000010f68 CTR: 0000000000007fff [ ... regs ... ] NIP [c000000000011060] _switch+0x160/0x17c LR [c000000000010f68] _switch+0x68/0x17c Call Trace: To this: Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries CPU: 0 PID: 93 Comm: systemd Not tainted NIP: c000000000011060 LR: c000000000010f68 CTR: 0000000000007fff [ ... regs ... ] NIP [c000000000011060] _switch+0x160/0x17c LR [c000000000010f68] _switch+0x68/0x17c Call Trace: [c000000005a93e10] [c00000000000cdbc] ret_from_fork_scv+0x0/0x54 --- interrupt: 3000 at 0x7fffa72f56d8 NIP: 00007fffa72f56d8 LR: 0000000000000000 CTR: 0000000000000000 [ ... regs ... ] NIP [00007fffa72f56d8] 0x7fffa72f56d8 LR [0000000000000000] 0x0 --- interrupt: 3000 Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-14-npiggin@gmail.com arch/powerpc/kernel/process.c | 2 ++ 1 file changed, 2 insertions(+) commit 6895dfc0474170c492191c126fcfc420f7771a09 Author: Nicholas Piggin Date: Sun Nov 27 22:49:37 2022 +1000 powerpc: copy_thread fill in interrupt frame marker and back chain Backtraces will not recognise the fork system call interrupt without the regs marker. And regular interrupt entry from userspace creates the back chain to the user stack, so do this for the initial fork frame too, to be consistent. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-13-npiggin@gmail.com arch/powerpc/kernel/process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6f291a03819e4051ebc870471d26915ef2e6ba31 Author: Nicholas Piggin Date: Sun Nov 27 22:49:36 2022 +1000 powerpc: add a define for the switch frame size and regs offset This is open-coded in process.c, ppc32 uses a different define with the same value, and the C definition is name differently which makes it an extra indirection to grep for. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-12-npiggin@gmail.com arch/powerpc/include/asm/ptrace.h | 6 ++++-- arch/powerpc/kernel/asm-offsets.c | 2 +- arch/powerpc/kernel/entry_32.S | 6 +++--- arch/powerpc/kernel/process.c | 12 ++++++++---- 4 files changed, 16 insertions(+), 10 deletions(-) commit 1223e5a20f7fb3c31c91a328d1a04ed26d5e889b Author: Nicholas Piggin Date: Sun Nov 27 22:49:35 2022 +1000 powerpc: add a define for the user interrupt frame size The user interrupt frame is a different size from the kernel frame, so give it its own name. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-11-npiggin@gmail.com arch/powerpc/include/asm/ptrace.h | 6 +++--- arch/powerpc/kernel/process.c | 6 +++--- arch/powerpc/kernel/stacktrace.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit e856e336924b0ecd0b7058e65e6b3e7266ee0b95 Author: Nicholas Piggin Date: Sun Nov 27 22:49:34 2022 +1000 powerpc: Rename STACK_FRAME_MARKER and derive it from frame offset This is a count of longs from the stack pointer to the regs marker. Rename it to make it more distinct from the other byte offsets. It can be derived from the byte offset definitions just added. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-10-npiggin@gmail.com arch/powerpc/include/asm/ptrace.h | 4 ++-- arch/powerpc/kernel/process.c | 2 +- arch/powerpc/kernel/stacktrace.c | 2 +- arch/powerpc/perf/callchain.c | 2 +- arch/powerpc/xmon/xmon.c | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-) commit d2e8ff9f1492f44c5a6d93f759eea27574d753de Author: Nicholas Piggin Date: Sun Nov 27 22:49:33 2022 +1000 powerpc: add a definition for the marker offset within the interrupt frame Define a constant rather than open-code the offset for the "regs" marker. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-9-npiggin@gmail.com arch/powerpc/include/asm/ptrace.h | 2 ++ arch/powerpc/kernel/entry_32.S | 2 +- arch/powerpc/kernel/exceptions-64e.S | 2 +- arch/powerpc/kernel/exceptions-64s.S | 2 +- arch/powerpc/kernel/head_32.h | 2 +- arch/powerpc/kernel/head_booke.h | 2 +- arch/powerpc/kernel/interrupt_64.S | 10 +++++----- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 +- 8 files changed, 13 insertions(+), 11 deletions(-) commit c03be0a3f3cc656eab5c427b78959b8f1b169a11 Author: Nicholas Piggin Date: Sun Nov 27 22:49:32 2022 +1000 powerpc: add definition for pt_regs offset within an interrupt frame This is a common offset that currently uses the overloaded STACK_FRAME_OVERHEAD constant. It's easier to read and more flexible to use a specific regs offset for this. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-8-npiggin@gmail.com arch/powerpc/include/asm/ptrace.h | 2 + arch/powerpc/kernel/asm-offsets.c | 7 +-- arch/powerpc/kernel/entry_32.S | 6 +- arch/powerpc/kernel/exceptions-64e.S | 42 ++++++------- arch/powerpc/kernel/exceptions-64s.S | 80 ++++++++++++------------- arch/powerpc/kernel/head_32.h | 2 +- arch/powerpc/kernel/head_85xx.S | 4 +- arch/powerpc/kernel/head_booke.h | 2 +- arch/powerpc/kernel/interrupt_64.S | 22 +++---- arch/powerpc/kernel/kgdb.c | 2 +- arch/powerpc/kernel/optprobes_head.S | 4 +- arch/powerpc/kernel/ppc_save_regs.S | 2 +- arch/powerpc/kernel/process.c | 4 +- arch/powerpc/kernel/tm.S | 8 +-- arch/powerpc/kernel/trace/ftrace_mprofile.S | 2 +- arch/powerpc/lib/test_emulate_step_exec_instr.S | 2 +- arch/powerpc/perf/callchain.c | 2 +- arch/powerpc/xmon/xmon.c | 7 +-- 18 files changed, 100 insertions(+), 100 deletions(-) commit 37195b820d32c23bdefce3f460ed7de48a57e5e4 Author: Nicholas Piggin Date: Sun Nov 27 22:49:31 2022 +1000 powerpc: simplify ppc_save_regs Adjust the pt_regs pointer so the interrupt frame offsets can be used to save registers. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-7-npiggin@gmail.com arch/powerpc/kernel/ppc_save_regs.S | 57 ++++++++++--------------------------- 1 file changed, 15 insertions(+), 42 deletions(-) commit baa49d81a94bb4170e7f2f4d97016772117d0f60 Author: Nicholas Piggin Date: Sun Nov 27 22:49:30 2022 +1000 powerpc/pseries: hvcall stack frame overhead This call may use the min size stack frame. The scratch space used is in the caller's parameter area frame, not this function's frame. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-6-npiggin@gmail.com arch/powerpc/platforms/pseries/hvCall.S | 38 +++++++++++++++++---------------- 1 file changed, 20 insertions(+), 18 deletions(-) commit bc0677363d0ffaec0c56685291e97b080116976c Author: Nicholas Piggin Date: Sun Nov 27 22:49:29 2022 +1000 powerpc: Rearrange copy_thread child stack creation This makes it a bit clearer where the stack frame is created, and will allow easier use of some of the stack offset constants in a later change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-5-npiggin@gmail.com arch/powerpc/kernel/process.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 32c5209214bd8d4f8c4e9d9b630ef4c671f58e79 Author: Nicholas Piggin Date: Sun Nov 27 22:49:28 2022 +1000 powerpc/perf: callchain validate kernel stack pointer bounds The interrupt frame detection and loads from the hypothetical pt_regs are not bounds-checked. The next-frame validation only bounds-checks STACK_FRAME_OVERHEAD, which does not include the pt_regs. Add another test for this. The user could set r1 to be equal to the address matching the first interrupt frame - STACK_INT_FRAME_SIZE, which is in the previous page due to the kernel redzone, and induce the kernel to load the marker from there. Possibly this could cause a crash at least. If the user could induce the previous page to contain a valid marker, then it might be able to direct perf to read specific memory addresses in a way that could be transmitted back to the user in the perf data. Fixes: 20002ded4d93 ("perf_counter: powerpc: Add callchain support") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-4-npiggin@gmail.com arch/powerpc/perf/callchain.c | 1 + 1 file changed, 1 insertion(+) commit d6aee468e4ecbfec46a3eafae4d31d6efc0d4da4 Author: Nicholas Piggin Date: Sun Nov 27 22:49:27 2022 +1000 powerpc/64: Remove asm interrupt tracing call helpers These are now unused. Remove. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-3-npiggin@gmail.com arch/powerpc/include/asm/irqflags.h | 58 ------------------------------------- 1 file changed, 58 deletions(-) commit 5017b45946722bdd20ac255c9ae7273b78d1f12e Author: Nicholas Piggin Date: Mon Nov 28 14:15:39 2022 +1000 powerpc/64: Option to build big-endian with ELFv2 ABI Provide an option to build big-endian kernels using the ELFv2 ABI. This works on GCC only for now. Clang is rumored to support this, but core build files need updating first, at least. This gives big-endian kernels useful advantages of the ELFv2 ABI, e.g., less stack usage, -mprofile-kernel support, better compatibility with eBPF tools. BE+ELFv2 is not officially supported by the GNU toolchain, but it works fine in testing and has been used by some userspace for some time (e.g., Void Linux). Tested-by: Michal Suchánek Reviewed-by: Segher Boessenkool Signed-off-by: Nicholas Piggin Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221128041539.1742489-5-npiggin@gmail.com arch/powerpc/Kconfig | 21 +++++++++++++++++++++ arch/powerpc/platforms/Kconfig.cputype | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) commit 505ea33089dcfc3ee3201b0fcb94751165805413 Author: Nicholas Piggin Date: Mon Nov 28 14:15:38 2022 +1000 powerpc/64: Add big-endian ELFv2 flavour to crypto VMX asm generation This allows asm generation for big-endian ELFv2 builds. Signed-off-by: Nicholas Piggin Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221128041539.1742489-4-npiggin@gmail.com drivers/crypto/vmx/Makefile | 12 +++++++++++- drivers/crypto/vmx/ppc-xlate.pl | 10 ++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) commit de3d098dd1fc635535e3689c5d4aa0684242adde Author: Nicholas Piggin Date: Mon Nov 28 14:15:37 2022 +1000 powerpc/64: Add module check for ELF ABI version Override the generic module ELF check to provide a check for the ELF ABI version. This becomes important if we allow big-endian ELF ABI V2 builds but it doesn't hurt to check now. Signed-off-by: Nicholas Piggin Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221128041539.1742489-3-npiggin@gmail.com arch/powerpc/kernel/module_64.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f9231a996e229c13d23f907352c2cea84bd1c30a Author: Nicholas Piggin Date: Mon Nov 28 14:15:36 2022 +1000 module: add module_elf_check_arch for module-specific checks The elf_check_arch() function is also used to test compatibility of usermode binaries. Kernel modules may have more specific requirements, for example powerpc would like to test for ABI version compatibility. Add a weak module_elf_check_arch() that defaults to true, and call it from elf_validity_check(). Signed-off-by: Jessica Yu [np: added changelog, adjust name, rebase] Acked-by: Luis Chamberlain Signed-off-by: Nicholas Piggin Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221128041539.1742489-2-npiggin@gmail.com include/linux/moduleloader.h | 3 +++ kernel/module/main.c | 10 ++++++++++ 2 files changed, 13 insertions(+) commit 2f228ee1ade5d8d1f26cf94863a36c5693023c58 Author: Benjamin Gray Date: Wed Nov 9 15:51:12 2022 +1100 powerpc/code-patching: Consolidate and cache per-cpu patching context With the temp mm context support, there are CPU local variables to hold the patch address and pte. Use these in the non-temp mm path as well instead of adding a level of indirection through the text_poke_area vm_struct and pointer chasing the pte. As both paths use these fields now, there is no need to let unreferenced variables be dropped by the compiler, so it is cleaner to merge them into a single context struct. This has the additional benefit of removing a redundant CPU local pointer, as only one of cpu_patching_mm / text_poke_area is ever used, while remaining well-typed. It also groups each CPU's data into a single cacheline. Signed-off-by: Benjamin Gray [mpe: Shorten name to 'area' as suggested by Christophe] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221109045112.187069-10-bgray@linux.ibm.com arch/powerpc/lib/code-patching.c | 49 ++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 19 deletions(-) commit c28c15b6d28a776538482101522cbcd9f906b15c Author: Christopher M. Riedl Date: Wed Nov 9 15:51:11 2022 +1100 powerpc/code-patching: Use temporary mm for Radix MMU x86 supports the notion of a temporary mm which restricts access to temporary PTEs to a single CPU. A temporary mm is useful for situations where a CPU needs to perform sensitive operations (such as patching a STRICT_KERNEL_RWX kernel) requiring temporary mappings without exposing said mappings to other CPUs. Another benefit is that other CPU TLBs do not need to be flushed when the temporary mm is torn down. Mappings in the temporary mm can be set in the userspace portion of the address-space. Interrupts must be disabled while the temporary mm is in use. HW breakpoints, which may have been set by userspace as watchpoints on addresses now within the temporary mm, are saved and disabled when loading the temporary mm. The HW breakpoints are restored when unloading the temporary mm. All HW breakpoints are indiscriminately disabled while the temporary mm is in use - this may include breakpoints set by perf. Use the `poking_init` init hook to prepare a temporary mm and patching address. Initialize the temporary mm using mm_alloc(). Choose a randomized patching address inside the temporary mm userspace address space. The patching address is randomized between PAGE_SIZE and DEFAULT_MAP_WINDOW-PAGE_SIZE. Bits of entropy with 64K page size on BOOK3S_64: bits of entropy = log2(DEFAULT_MAP_WINDOW_USER64 / PAGE_SIZE) PAGE_SIZE=64K, DEFAULT_MAP_WINDOW_USER64=128TB bits of entropy = log2(128TB / 64K) bits of entropy = 31 The upper limit is DEFAULT_MAP_WINDOW due to how the Book3s64 Hash MMU operates - by default the space above DEFAULT_MAP_WINDOW is not available. Currently the Hash MMU does not use a temporary mm so technically this upper limit isn't necessary; however, a larger randomization range does not further "harden" this overall approach and future work may introduce patching with a temporary mm on Hash as well. Randomization occurs only once during initialization for each CPU as it comes online. The patching page is mapped with PAGE_KERNEL to set EAA[0] for the PTE which ignores the AMR (so no need to unlock/lock KUAP) according to PowerISA v3.0b Figure 35 on Radix. Based on x86 implementation: commit 4fc19708b165 ("x86/alternatives: Initialize temporary mm for patching") and: commit b3fd8e83ada0 ("x86/alternatives: Use temporary mm for text poking") From: Benjamin Gray Synchronisation is done according to ISA 3.1B Book 3 Chapter 13 "Synchronization Requirements for Context Alterations". Switching the mm is a change to the PID, which requires a CSI before and after the change, and a hwsync between the last instruction that performs address translation for an associated storage access. Instruction fetch is an associated storage access, but the instruction address mappings are not being changed, so it should not matter which context they use. We must still perform a hwsync to guard arbitrary prior code that may have accessed a userspace address. TLB invalidation is local and VA specific. Local because only this core used the patching mm, and VA specific because we only care that the writable mapping is purged. Leaving the other mappings intact is more efficient, especially when performing many code patches in a row (e.g., as ftrace would). Signed-off-by: Christopher M. Riedl Signed-off-by: Benjamin Gray [mpe: Use mm_alloc() per 107b6828a7cd ("x86/mm: Use mm_alloc() in poking_init()")] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221109045112.187069-9-bgray@linux.ibm.com arch/powerpc/lib/code-patching.c | 177 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 172 insertions(+), 5 deletions(-) commit 0b2199841a7952d01a717b465df028b40b2cf3e9 Author: Nicholas Piggin Date: Sat Nov 26 19:59:32 2022 +1000 powerpc/qspinlock: add compile-time tuning adjustments This adds compile-time options that allow the EH lock hint bit to be enabled or disabled, and adds some new options that may or may not help matters. To help with experimentation and tuning. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-18-npiggin@gmail.com arch/powerpc/include/asm/qspinlock.h | 61 ++++++++++++++++++++++++++++++++++-- arch/powerpc/lib/qspinlock.c | 39 +++++++++++++++++++++-- 2 files changed, 94 insertions(+), 6 deletions(-) commit 12b459a5ebf3308e718bc1dd48acb7c4cf7f1a75 Author: Nicholas Piggin Date: Sat Nov 26 19:59:31 2022 +1000 powerpc/qspinlock: provide accounting and options for sleepy locks Finding the owner or a queued waiter on a lock with a preempted vcpu is indicative of an oversubscribed guest causing the lock to get into trouble. Provide some options to detect this situation and have new CPUs avoid queueing for a longer time (more steal iterations) to minimise the problems caused by vcpu preemption on the queue. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-17-npiggin@gmail.com arch/powerpc/include/asm/qspinlock_types.h | 7 +- arch/powerpc/lib/qspinlock.c | 242 ++++++++++++++++++++++++++--- 2 files changed, 230 insertions(+), 19 deletions(-) commit 39dfc73596b48bb50cf7e4f3f54e38427dda5b4e Author: Nicholas Piggin Date: Sat Nov 26 19:59:30 2022 +1000 powerpc/qspinlock: allow indefinite spinning on a preempted owner Provide an option that holds off queueing indefinitely while the lock owner is preempted. This could reduce queueing latencies for very overcommitted vcpu situations. This is disabled by default. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-16-npiggin@gmail.com arch/powerpc/lib/qspinlock.c | 77 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 15 deletions(-) commit cc79701114154efe79663ba47d9e51aad2ed3c78 Author: Nicholas Piggin Date: Sat Nov 26 19:59:29 2022 +1000 powerpc/qspinlock: reduce remote node steal spins Allow for a reduction in the number of times a CPU from a different node than the owner can attempt to steal the lock before queueing. This could bias the transfer behaviour of the lock across the machine and reduce NUMA crossings. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-15-npiggin@gmail.com arch/powerpc/lib/qspinlock.c | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) commit 71c235027ce7940434acd3f553602ad8b5d36469 Author: Nicholas Piggin Date: Sat Nov 26 19:59:28 2022 +1000 powerpc/qspinlock: use spin_begin/end API Use the spin_begin/spin_cpu_relax/spin_end APIs in qspinlock, which helps to prevent threads issuing a lot of expensive priority nops which may not have much effect due to immediately executing low then medium priority. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-14-npiggin@gmail.com arch/powerpc/lib/qspinlock.c | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) commit f61ab43cc1a6146d6eef7e0713a452c3677ad13e Author: Nicholas Piggin Date: Sat Nov 26 19:59:27 2022 +1000 powerpc/qspinlock: allow lock stealing in trylock and lock fastpath This change allows trylock to steal the lock. It also allows the initial lock attempt to steal the lock rather than bailing out and going to the slow path. This gives trylock more strength: without this a continually-contended lock will never permit a trylock to succeed. With this change, the trylock has a small but non-zero chance. It also gives the lock fastpath most of the benefit of passing the reservation back through to the steal loop in the slow path without the complexity. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-13-npiggin@gmail.com arch/powerpc/include/asm/qspinlock.h | 22 ++++++++++++++++++++-- arch/powerpc/lib/qspinlock.c | 9 +++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) commit be742c573fdafcfa1752642ca1c7aaf08c258128 Author: Nicholas Piggin Date: Sat Nov 26 19:59:26 2022 +1000 powerpc/qspinlock: add ability to prod new queue head CPU After the head of the queue acquires the lock, it releases the next waiter in the queue to become the new head. Add an option to prod the new head if its vCPU was preempted. This may only have an effect if queue waiters are yielding. Disable this option by default for now, i.e., no logical change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-12-npiggin@gmail.com arch/powerpc/lib/qspinlock.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit 28db61e207ea3890d286cff3141c1ce67346074d Author: Nicholas Piggin Date: Sat Nov 26 19:59:25 2022 +1000 powerpc/qspinlock: allow propagation of yield CPU down the queue Having all CPUs poll the lock word for the owner CPU that should be yielded to defeats most of the purpose of using MCS queueing for scalability. Yet it may be desirable for queued waiters to yield to a preempted owner. With this change, queue waiters never sample the owner CPU directly from the lock word. The queue head (which is spinning on the lock) propagates the owner CPU back to the next waiter if it finds the owner has been preempted. That waiter then propagates the owner CPU back to the next waiter, and so on. s390 addresses this problem differenty, by having queued waiters sample the lock word to find the owner at a low frequency. That has the advantage of being simpler, the advantage of propagation is that the lock word never has to be accesed by queued waiters, and the transfer of cache lines to transmit the owner data is only required when lock holder vCPU preemption occurs. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-11-npiggin@gmail.com arch/powerpc/lib/qspinlock.c | 79 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit b4c3cdc1a698a2f6168768d0bed4bf062723722e Author: Nicholas Piggin Date: Sat Nov 26 19:59:24 2022 +1000 powerpc/qspinlock: allow stealing when head of queue yields If the head of queue is preventing stealing but it finds the owner vCPU is preempted, it will yield its cycles to the owner which could cause it to become preempted. Add an option to re-allow stealers before yielding, and disallow them again after returning from the yield. Disable this option by default for now, i.e., no logical change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-10-npiggin@gmail.com arch/powerpc/lib/qspinlock.c | 59 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) commit bd48287b2cf4cd6e95576db3a94fd2a7cdf9832d Author: Nicholas Piggin Date: Sat Nov 26 19:59:23 2022 +1000 powerpc/qspinlock: implement option to yield to previous node Queued waiters which are not at the head of the queue don't spin on the lock word but their qnode lock word, waiting for the previous queued CPU to release them. Add an option which allows these waiters to yield to the previous CPU if its vCPU is preempted. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-9-npiggin@gmail.com arch/powerpc/lib/qspinlock.c | 46 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) commit 085f03311bcede99550e08a1f7cad41bf758b460 Author: Nicholas Piggin Date: Sat Nov 26 19:59:22 2022 +1000 powerpc/qspinlock: paravirt yield to lock owner Waiters spinning on the lock word should yield to the lock owner if the vCPU is preempted. This improves performance when the hypervisor has oversubscribed physical CPUs. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-8-npiggin@gmail.com arch/powerpc/lib/qspinlock.c | 99 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 87 insertions(+), 12 deletions(-) commit e1a31e7fd7130628cfd229253da2b4630e7a809c Author: Nicholas Piggin Date: Sat Nov 26 19:59:21 2022 +1000 powerpc/qspinlock: store owner CPU in lock word Store the owner CPU number in the lock word so it may be yielded to, as powerpc's paravirtualised simple spinlocks do. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-7-npiggin@gmail.com arch/powerpc/include/asm/qspinlock.h | 12 ++++++++++-- arch/powerpc/include/asm/qspinlock_types.h | 12 +++++++++++- arch/powerpc/lib/qspinlock.c | 2 +- 3 files changed, 22 insertions(+), 4 deletions(-) commit 0944534ef4d5cf39c8133575524be0be3337dd62 Author: Nicholas Piggin Date: Sat Nov 26 19:59:20 2022 +1000 powerpc/qspinlock: theft prevention to control latency Give the queue head the ability to stop stealers. After a number of spins without successfully acquiring the lock, the queue head sets this, which halts stealing and will assure it is the next owner. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-6-npiggin@gmail.com arch/powerpc/include/asm/qspinlock_types.h | 8 ++++- arch/powerpc/lib/qspinlock.c | 53 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) commit 6aa42f883c438ea132a28801bef3f86f3883d14c Author: Nicholas Piggin Date: Sat Nov 26 19:59:19 2022 +1000 powerpc/qspinlock: allow new waiters to steal the lock before queueing Allow new waiters to "steal" the lock before queueing. That is, to acquire it while other CPUs have queued. This particularly helps paravirt performance when physical CPUs are oversubscribed, by keeping the lock from becoming a strict FIFO and vCPU preemption causing queue train wrecks. The new __queued_spin_trylock_steal() function is put in qspinlock.h to save having to move it, because it will be used there by a later change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-5-npiggin@gmail.com arch/powerpc/include/asm/qspinlock.h | 23 ++++++++ arch/powerpc/lib/qspinlock.c | 110 ++++++++++++++++++++++++++++++++--- 2 files changed, 124 insertions(+), 9 deletions(-) commit b3a73b7db2b6cb3b2e5bfda5518a0e92230ef673 Author: Nicholas Piggin Date: Sat Nov 26 19:59:18 2022 +1000 powerpc/qspinlock: convert atomic operations to assembly This uses more optimal ll/sc style access patterns (rather than cmpxchg), and also sets the EH=1 lock hint on those operations which acquire ownership of the lock. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-4-npiggin@gmail.com arch/powerpc/include/asm/qspinlock.h | 24 +++++++-- arch/powerpc/include/asm/qspinlock_types.h | 4 +- arch/powerpc/lib/qspinlock.c | 82 +++++++++++++++++------------- 3 files changed, 68 insertions(+), 42 deletions(-) commit 4c93c2e4b9e8988511c06b9c042f23d4b8f593ad Author: Nicholas Piggin Date: Sat Nov 26 19:59:17 2022 +1000 powerpc/qspinlock: use a half-word store to unlock to avoid larx/stcx. The first 16 bits of the lock are only modified by the owner, and other modifications always use atomic operations on the entire 32 bits, so unlocks can use plain stores on the 16 bits. This is the same kind of optimisation done by core qspinlock code. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-3-npiggin@gmail.com arch/powerpc/include/asm/qspinlock.h | 6 +----- arch/powerpc/include/asm/qspinlock_types.h | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 7 deletions(-) commit 84990b169557428c318df87b7836cd15f65b62dc Author: Nicholas Piggin Date: Sat Nov 26 19:59:16 2022 +1000 powerpc/qspinlock: add mcs queueing for contended waiters This forms the basis of the qspinlock slow path. Like generic qspinlocks and unlike the vanilla MCS algorithm, the lock owner does not participate in the queue, only waiters. The first waiter spins on the lock word, then when the lock is released it takes ownership and unqueues the next waiter. This is how qspinlocks can be implemented with the spinlock API -- lock owners don't need a node, only waiters do. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126095932.1234527-2-npiggin@gmail.com arch/powerpc/include/asm/qspinlock.h | 10 +- arch/powerpc/include/asm/qspinlock_types.h | 23 ++++ arch/powerpc/lib/qspinlock.c | 187 ++++++++++++++++++++++++++++- 3 files changed, 214 insertions(+), 6 deletions(-) commit 9f61521c7a284e799050cd2adacc9a611bd2b491 Author: Nicholas Piggin Date: Mon Nov 28 13:11:13 2022 +1000 powerpc/qspinlock: powerpc qspinlock implementation Add a powerpc specific implementation of queued spinlocks. This is the build framework with a very simple (non-queued) spinlock implementation to begin with. Later changes add queueing, and other features and optimisations one-at-a-time. It is done this way to more easily see how the queued spinlocks are built, and to make performance and correctness bisects more useful. Signed-off-by: Nicholas Piggin [mpe: Drop paravirt.h & processor.h changes to fix 32-bit build] [mpe: Fix 32-bit build of qspinlock.o & disallow GENERIC_LOCKBREAK per Nick] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/CONLLQB6DCJU.2ZPOS7T6S5GRR@bobo arch/powerpc/Kconfig | 3 +- arch/powerpc/include/asm/qspinlock.h | 86 +++++++++------------------ arch/powerpc/include/asm/qspinlock_paravirt.h | 7 --- arch/powerpc/include/asm/qspinlock_types.h | 13 ++++ arch/powerpc/include/asm/spinlock.h | 2 +- arch/powerpc/include/asm/spinlock_types.h | 2 +- arch/powerpc/lib/Makefile | 4 +- arch/powerpc/lib/qspinlock.c | 17 ++++++ 8 files changed, 65 insertions(+), 69 deletions(-) commit 3f5a4aa1c365e451c703525047b219d777b32936 Merge: 7d802c8098c5 7d0455e97072 Author: Jakub Kicinski Date: Thu Dec 1 20:26:24 2022 -0800 Merge branch 'hsr' Sebastian Andrzej Siewior says: ==================== I started playing with HSR and run into a problem. Tested latest upstream -rc and noticed more problems. Now it appears to work. For testing I have a small three node setup with iperf and ping. While iperf doesn't complain ping reports missing packets and duplicates. ==================== Link: https://lore.kernel.org/r/20221129164815.128922-1-bigeasy@linutronix.de/ Signed-off-by: Jakub Kicinski commit 7d0455e97072b81c03b6062dbcc1403ebf9d9da5 Author: Sebastian Andrzej Siewior Date: Tue Nov 29 17:48:15 2022 +0100 selftests: Add a basic HSR test. This test adds a basic HSRv0 network with 3 nodes. In its current shape it sends and forwards packets, announcements and so merges nodes based on MAC A/B information. It is able to detect duplicate packets and packetloss should any occur. Cc: Shuah Khan Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jakub Kicinski tools/testing/selftests/Makefile | 1 + tools/testing/selftests/net/hsr/Makefile | 7 + tools/testing/selftests/net/hsr/config | 4 + tools/testing/selftests/net/hsr/hsr_ping.sh | 256 ++++++++++++++++++++++++++++ 4 files changed, 268 insertions(+) commit 20d3c1e9b861b85e1a774e1876d6adeeb0251fc3 Author: Sebastian Andrzej Siewior Date: Tue Nov 29 17:48:14 2022 +0100 hsr: Use a single struct for self_node. self_node_db is a list_head with one entry of struct hsr_node. The purpose is to hold the two MAC addresses of the node itself. It is convenient to recycle the structure. However having a list_head and fetching always the first entry is not really optimal. Created a new data strucure contaning the two MAC addresses named hsr_self_node. Access that structure like an RCU protected pointer so it can be replaced on the fly without blocking the reader. Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Kurt Kanzenbach Signed-off-by: Jakub Kicinski net/hsr/hsr_device.c | 1 - net/hsr/hsr_framereg.c | 63 ++++++++++++++++++++++---------------------------- net/hsr/hsr_main.h | 8 ++++++- 3 files changed, 35 insertions(+), 37 deletions(-) commit 5c7aa13210c3abdd34fd421f62347665ec6eb551 Author: Sebastian Andrzej Siewior Date: Tue Nov 29 17:48:13 2022 +0100 hsr: Synchronize sequence number updates. hsr_register_frame_out() compares new sequence_nr vs the old one recorded in hsr_node::seq_out and if the new sequence_nr is higher then it will be written to hsr_node::seq_out as the new value. This operation isn't locked so it is possible that two frames with the same sequence number arrive (via the two slave devices) and are fed to hsr_register_frame_out() at the same time. Both will pass the check and update the sequence counter later to the same value. As a result the content of the same packet is fed into the stack twice. This was noticed by running ping and observing DUP being reported from time to time. Instead of using the hsr_priv::seqnr_lock for the whole receive path (as it is for sending in the master node) add an additional lock that is only used for sequence number checks and updates. Add a per-node lock that is used during sequence number reads and updates. Fixes: f421436a591d3 ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jakub Kicinski net/hsr/hsr_framereg.c | 9 ++++++++- net/hsr/hsr_framereg.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 06afd2c31d338fa762548580c1bf088703dd1e03 Author: Sebastian Andrzej Siewior Date: Tue Nov 29 17:48:12 2022 +0100 hsr: Synchronize sending frames to have always incremented outgoing seq nr. Sending frames via the hsr (master) device requires a sequence number which is tracked in hsr_priv::sequence_nr and protected by hsr_priv::seqnr_lock. Each time a new frame is sent, it will obtain a new id and then send it via the slave devices. Each time a packet is sent (via hsr_forward_do()) the sequence number is checked via hsr_register_frame_out() to ensure that a frame is not handled twice. This make sense for the receiving side to ensure that the frame is not injected into the stack twice after it has been received from both slave ports. There is no locking to cover the sending path which means the following scenario is possible: CPU0 CPU1 hsr_dev_xmit(skb1) hsr_dev_xmit(skb2) fill_frame_info() fill_frame_info() hsr_fill_frame_info() hsr_fill_frame_info() handle_std_frame() handle_std_frame() skb1's sequence_nr = 1 skb2's sequence_nr = 2 hsr_forward_do() hsr_forward_do() hsr_register_frame_out(, 2) // okay, send) hsr_register_frame_out(, 1) // stop, lower seq duplicate Both skbs (or their struct hsr_frame_info) received an unique id. However since skb2 was sent before skb1, the higher sequence number was recorded in hsr_register_frame_out() and the late arriving skb1 was dropped and never sent. This scenario has been observed in a three node HSR setup, with node1 + node2 having ping and iperf running in parallel. From time to time ping reported a missing packet. Based on tracing that missing ping packet did not leave the system. It might be possible (didn't check) to drop the sequence number check on the sending side. But if the higher sequence number leaves on wire before the lower does and the destination receives them in that order and it will drop the packet with the lower sequence number and never inject into the stack. Therefore it seems the only way is to lock the whole path from obtaining the sequence number and sending via dev_queue_xmit() and assuming the packets leave on wire in the same order (and don't get reordered by the NIC). Cover the whole path for the master interface from obtaining the ID until after it has been forwarded via hsr_forward_skb() to ensure the skbs are sent to the NIC in the order of the assigned sequence numbers. Fixes: f421436a591d3 ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jakub Kicinski net/hsr/hsr_device.c | 12 +++++++----- net/hsr/hsr_forward.c | 3 +-- 2 files changed, 8 insertions(+), 7 deletions(-) commit d5c7652eb16fa203d82546e0285136d7b321ffa9 Author: Sebastian Andrzej Siewior Date: Tue Nov 29 17:48:11 2022 +0100 hsr: Disable netpoll. The hsr device is a software device. Its net_device_ops::ndo_start_xmit() routine will process the packet and then pass the resulting skb to dev_queue_xmit(). During processing, hsr acquires a lock with spin_lock_bh() (hsr_add_node()) which needs to be promoted to the _irq() suffix in order to avoid a potential deadlock. Then there are the warnings in dev_queue_xmit() (due to local_bh_disable() with disabled interrupts) left. Instead trying to address those (there is qdisc and…) for netpoll sake, just disable netpoll on hsr. Disable netpoll on hsr and replace the _irqsave() locking with _bh(). Fixes: f421436a591d3 ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jakub Kicinski net/hsr/hsr_device.c | 14 ++++++-------- net/hsr/hsr_forward.c | 5 ++--- 2 files changed, 8 insertions(+), 11 deletions(-) commit 0c74d9f79ec4299365bbe803baa736ae0068179e Author: Sebastian Andrzej Siewior Date: Tue Nov 29 17:48:10 2022 +0100 hsr: Avoid double remove of a node. Due to the hashed-MAC optimisation one problem become visible: hsr_handle_sup_frame() walks over the list of available nodes and merges two node entries into one if based on the information in the supervision both MAC addresses belong to one node. The list-walk happens on a RCU protected list and delete operation happens under a lock. If the supervision arrives on both slave interfaces at the same time then this delete operation can occur simultaneously on two CPUs. The result is the first-CPU deletes the from the list and the second CPUs BUGs while attempting to dereference a poisoned list-entry. This happens more likely with the optimisation because a new node for the mac_B entry is created once a packet has been received and removed (merged) once the supervision frame has been received. Avoid removing/ cleaning up a hsr_node twice by adding a `removed' field which is set to true after the removal and checked before the removal. Fixes: f266a683a4804 ("net/hsr: Better frame dispatch") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jakub Kicinski net/hsr/hsr_framereg.c | 16 +++++++++++----- net/hsr/hsr_framereg.h | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) commit 5aa2820177af650293b2f9f1873c1f6f8e4ad7a4 Author: Sebastian Andrzej Siewior Date: Tue Nov 29 17:48:09 2022 +0100 hsr: Add a rcu-read lock to hsr_forward_skb(). hsr_forward_skb() a skb and keeps information in an on-stack hsr_frame_info. hsr_get_node() assigns hsr_frame_info::node_src which is from a RCU list. This pointer is used later in hsr_forward_do(). I don't see a reason why this pointer can't vanish midway since there is no guarantee that hsr_forward_skb() is invoked from an RCU read section. Use rcu_read_lock() to protect hsr_frame_info::node_src from its assignment until it is no longer used. Fixes: f266a683a4804 ("net/hsr: Better frame dispatch") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jakub Kicinski net/hsr/hsr_forward.c | 3 +++ 1 file changed, 3 insertions(+) commit e012764cebf6e33097f6833ff15a936fbe7b846c Author: Sebastian Andrzej Siewior Date: Tue Nov 29 17:48:08 2022 +0100 Revert "net: hsr: use hlist_head instead of list_head for mac addresses" The hlist optimisation (which not only uses hlist_head instead of list_head but also splits hsr_priv::node_db into an array of 256 slots) does not consider the "node merge": Upon starting the hsr network (with three nodes) a packet that is sent from node1 to node3 will also be sent from node1 to node2 and then forwarded to node3. As a result node3 will receive 2 packets because it is not able to filter out the duplicate. Each packet received will create a new struct hsr_node with macaddress_A only set the MAC address it received from (the two MAC addesses from node1). At some point (early in the process) two supervision frames will be received from node1. They will be processed by hsr_handle_sup_frame() and one frame will leave early ("Node has already been merged") and does nothing. The other frame will be merged as portB and have its MAC address written to macaddress_B and the hsr_node (that was created for it as macaddress_A) will be removed. From now on HSR is able to identify a duplicate because both packets sent from one node will result in the same struct hsr_node because hsr_get_node() will find the MAC address either on macaddress_A or macaddress_B. Things get tricky with the optimisation: If sender's MAC address is saved as macaddress_A then the lookup will work as usual. If the MAC address has been merged into macaddress_B of another hsr_node then the lookup won't work because it is likely that the data structure is in another bucket. This results in creating a new struct hsr_node and not recognising a possible duplicate. A way around it would be to add another hsr_node::mac_list_B and attach it to the other bucket to ensure that this hsr_node will be looked up either via macaddress_A _or_ macaddress_B. I however prefer to revert it because it sounds like an academic problem rather than real life workload plus it adds complexity. I'm not an HSR expert with what is usual size of a network but I would guess 40 to 60 nodes. With 10.000 nodes and assuming 60us for pass-through (from node to node) then it would take almost 600ms for a packet to almost wrap around which sounds a lot. Revert the hash MAC addresses optimisation. Fixes: 4acc45db71158 ("net: hsr: use hlist_head instead of list_head for mac addresses") Cc: Juhee Kang Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jakub Kicinski net/hsr/hsr_debugfs.c | 40 ++++------ net/hsr/hsr_device.c | 10 +-- net/hsr/hsr_forward.c | 7 +- net/hsr/hsr_framereg.c | 209 +++++++++++++++++++------------------------------ net/hsr/hsr_framereg.h | 14 +--- net/hsr/hsr_main.h | 9 +-- net/hsr/hsr_netlink.c | 4 +- 7 files changed, 106 insertions(+), 187 deletions(-) commit 7d802c8098c50fb7dcf5dfcb6466482e1f2b15e4 Author: Xin Long Date: Wed Nov 30 18:04:31 2022 -0500 sctp: delete free member from struct sctp_sched_ops After commit 9ed7bfc79542 ("sctp: fix memory leak in sctp_stream_outq_migrate()"), sctp_sched_set_sched() is the only place calling sched->free(), and it can actually be replaced by sched->free_sid() on each stream, and yet there's already a loop to traverse all streams in sctp_sched_set_sched(). This patch adds a function sctp_sched_free_sched() where it calls sched->free_sid() for each stream to replace sched->free() calls in sctp_sched_set_sched() and then deletes the unused free member from struct sctp_sched_ops. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Link: https://lore.kernel.org/r/e10aac150aca2686cb0bd0570299ec716da5a5c0.1669849471.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski include/net/sctp/stream_sched.h | 2 -- net/sctp/stream_sched.c | 38 ++++++++++++++++++++------------------ net/sctp/stream_sched_prio.c | 27 --------------------------- net/sctp/stream_sched_rr.c | 6 ------ 4 files changed, 20 insertions(+), 53 deletions(-) commit e6a34faf31fb7adb9b88f11186028affdf522cd5 Merge: a802073d1c9c 178d023208eb Author: Jakub Kicinski Date: Thu Dec 1 20:06:10 2022 -0800 Merge branch 'mptcp-pm-listener-events-selftests-cleanup' Matthieu Baerts says: ==================== mptcp: PM listener events + selftests cleanup Thanks to the patch 6/11, the MPTCP path manager now sends Netlink events when MPTCP listening sockets are created and closed. The reason why it is needed is explained in the linked ticket [1]: MPTCP for Linux, when not using the in-kernel PM, depends on the userspace PM to create extra listening sockets before announcing addresses and ports. Let's call these "PM listeners". With the existing MPTCP netlink events, a userspace PM can create PM listeners at startup time, or in response to an incoming connection. Creating sockets in response to connections is not optimal: ADD_ADDRs can't be sent until the sockets are created and listen()ed, and if all connections are closed then it may not be clear to the userspace PM daemon that PM listener sockets should be cleaned up. Hence this feature request: to add MPTCP netlink events for listening socket close & create, so PM listening sockets can be managed based on application activity. [1] https://github.com/multipath-tcp/mptcp_net-next/issues/313 Selftests for these new Netlink events have been added in patches 9,11/11. The remaining patches introduce different cleanups and small improvements in MPTCP selftests to ease the maintenance and the addition of new tests. ==================== Link: https://lore.kernel.org/r/20221130140637.409926-1-matthieu.baerts@tessares.net Signed-off-by: Jakub Kicinski commit 178d023208ebbc082de91d43a3b7c4c32a3c953f Author: Geliang Tang Date: Wed Nov 30 15:06:33 2022 +0100 selftests: mptcp: listener test for in-kernel PM This patch adds test coverage for listening sockets created by the in-kernel path manager in mptcp_join.sh. It adds the listener event checking in the existing "remove single address with port" test. The output looks like this: 003 remove single address with port syn[ ok ] - synack[ ok ] - ack[ ok ] add[ ok ] - echo [ ok ] - pt [ ok ] syn[ ok ] - synack[ ok ] - ack[ ok ] syn[ ok ] - ack [ ok ] rm [ ok ] - rmsf [ ok ] invert CREATE_LISTENER 10.0.2.1:10100[ ok ] CLOSE_LISTENER 10.0.2.1:10100 [ ok ] Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_join.sh | 58 ++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) commit a3735625572d8f9cac3eb12a43c869d97ccbf584 Author: Geliang Tang Date: Wed Nov 30 15:06:32 2022 +0100 selftests: mptcp: make evts global in mptcp_join This patch moves evts_ns1 and evts_ns2 out of do_transfer() as two global variables in mptcp_join.sh. Init them in init() and remove them in cleanup(). Add a new helper reset_with_events() to save the outputs of 'pm_nl_ctl events' command in them. And a new helper kill_events_pids() to kill pids of 'pm_nl_ctl events' command. Use these helpers in userspace pm tests. Suggested-by: Paolo Abeni Signed-off-by: Geliang Tang Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_join.sh | 52 ++++++++++++++----------- 1 file changed, 29 insertions(+), 23 deletions(-) commit 6c73008aa301b7456b80d0e1416a240815fe947b Author: Geliang Tang Date: Wed Nov 30 15:06:31 2022 +0100 selftests: mptcp: listener test for userspace PM This patch adds test coverage for listening sockets created by userspace processes. It adds a new test named test_listener() and a new verifying helper verify_listener_events(). The new output looks like this: CREATE_SUBFLOW 10.0.2.2 (ns2) => 10.0.2.1 (ns1) [OK] DESTROY_SUBFLOW 10.0.2.2 (ns2) => 10.0.2.1 (ns1) [OK] MP_PRIO TX [OK] MP_PRIO RX [OK] CREATE_LISTENER 10.0.2.2:37106 [OK] CLOSE_LISTENER 10.0.2.2:37106 [OK] Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/userspace_pm.sh | 76 +++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 1cc94ac1af4b18c69981425df6f0355f13d9304d Author: Geliang Tang Date: Wed Nov 30 15:06:30 2022 +0100 selftests: mptcp: make evts global in userspace_pm This patch makes server_evts and client_evts global in userspace_pm.sh, then these two variables could be used in test_announce(), test_remove() and test_subflows(). The local variable 'evts' in these three functions then could be dropped. Also move local variable 'file' as a global one. Suggested-by: Paolo Abeni Signed-off-by: Geliang Tang Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/userspace_pm.sh | 213 ++++++++++------------ 1 file changed, 93 insertions(+), 120 deletions(-) commit 7dff74f5716edf2f0288fe4cdcb4feeeb6a9383b Author: Geliang Tang Date: Wed Nov 30 15:06:29 2022 +0100 selftests: mptcp: enhance userspace pm tests Some userspace pm tests failed since pm listener events have been added. Now MPTCP_EVENT_LISTENER_CREATED event becomes the first item in the events list like this: type:15,family:2,sport:10006,saddr4:0.0.0.0 type:1,token:3701282876,server_side:1,family:2,saddr4:10.0.1.1,... And no token value in this MPTCP_EVENT_LISTENER_CREATED event. This patch fixes this by specifying the type 1 item to search for token values. Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_join.sh | 3 ++- tools/testing/selftests/net/mptcp/userspace_pm.sh | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit f8c9dfbd875b17fee59c7f1aa35a4944d4e6d810 Author: Geliang Tang Date: Wed Nov 30 15:06:28 2022 +0100 mptcp: add pm listener events This patch adds two new MPTCP netlink event types for PM listening socket create and close, named MPTCP_EVENT_LISTENER_CREATED and MPTCP_EVENT_LISTENER_CLOSED. Add a new function mptcp_event_pm_listener() to push the new events with family, port and addr to userspace. Invoke mptcp_event_pm_listener() with MPTCP_EVENT_LISTENER_CREATED in mptcp_listen() and mptcp_pm_nl_create_listen_socket(), invoke it with MPTCP_EVENT_LISTENER_CLOSED in __mptcp_close_ssk(). Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski include/uapi/linux/mptcp.h | 9 ++++++++ net/mptcp/pm_netlink.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++ net/mptcp/protocol.c | 3 +++ net/mptcp/protocol.h | 2 ++ 4 files changed, 71 insertions(+) commit 5f17f8e315ad77c7ba45afe169b4598efd5d5bc3 Author: Matthieu Baerts Date: Wed Nov 30 15:06:27 2022 +0100 selftests: mptcp: declare var as local Just to avoid classical Bash pitfall where variables are accidentally overridden by other functions because the proper scope has not been defined. That's also what is done in other MPTCP selftests scripts where all non local variables are defined at the beginning of the script and the others are defined with the "local" keyword. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 51 ++++++++++++---------- 1 file changed, 29 insertions(+), 22 deletions(-) commit de2392028a19e6841cd0ef14b9c832a7a2bc3a69 Author: Matthieu Baerts Date: Wed Nov 30 15:06:26 2022 +0100 selftests: mptcp: clearly declare global ns vars It is clearer to declare these global variables at the beginning of the file as it is done in other MPTCP selftests rather than in functions in the middle of the script. So for uniformity reason, we can do the same here in mptcp_sockopt.sh. Suggested-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 787eb1e4df93f469e932ef686dd9dc767a9a2392 Author: Matthieu Baerts Date: Wed Nov 30 15:06:25 2022 +0100 selftests: mptcp: uniform 'rndh' variable The definition of 'rndh' was probably copied from one script to another but some times, 'sec' was not defined, not used and/or not spelled properly. Here all the 'rndh' are now defined the same way. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/diag.sh | 1 + tools/testing/selftests/net/mptcp/mptcp_connect.sh | 3 +-- tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 +++-- tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 2 ++ tools/testing/selftests/net/mptcp/simult_flows.sh | 1 + tools/testing/selftests/net/mptcp/userspace_pm.sh | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) commit b71dd705179cfd493b17cdf67f90b19ccfe45069 Author: Matthieu Baerts Date: Wed Nov 30 15:06:24 2022 +0100 selftests: mptcp: removed defined but unused vars Some variables were set but never used. This was not causing any issues except adding some confusion and having shellcheck complaining about them. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_connect.sh | 3 --- tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 1 - tools/testing/selftests/net/mptcp/simult_flows.sh | 3 --- 3 files changed, 7 deletions(-) commit b4e0df4cafe112220c19d30439732d22289147f1 Author: Matthieu Baerts Date: Wed Nov 30 15:06:23 2022 +0100 selftests: mptcp: run mptcp_inq from a clean netns A new "sandbox" net namespace is available where no other netfilter rules have been added. Use this new netns instead of re-using "ns1" and clean it. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f8b435f93b7630afea2df958e0331c566496214b Author: Eric Biggers Date: Thu Dec 1 19:55:29 2022 -0800 fscrypt: remove unused Speck definitions These old unused definitions were originally left around to prevent the same mode numbers from being reused. However, we've now decided to reuse the mode numbers anyway. So let's completely remove these old unused definitions to avoid confusion. There is no reason for any code to be using these constants in any way; and indeed, Debian Code Search shows no uses of them (other than in copies or translations of the header). So this should be perfectly safe. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221202035529.55992-1-ebiggers@kernel.org include/uapi/linux/fscrypt.h | 2 -- 1 file changed, 2 deletions(-) commit 78b037bd402df8eca0f45ef003c6d0ab25a26ecc Author: Dave Marchevsky Date: Thu Dec 1 10:34:06 2022 -0800 selftests/bpf: Validate multiple ref release_on_unlock logic Modify list_push_pop_multiple to alloc and insert nodes 2-at-a-time. Without the previous patch's fix, this block of code: bpf_spin_lock(lock); bpf_list_push_front(head, &f[i]->node); bpf_list_push_front(head, &f[i + 1]->node); bpf_spin_unlock(lock); would fail check_reference_leak check as release_on_unlock logic would miss a ref that should've been released. Signed-off-by: Dave Marchevsky cc: Kumar Kartikeya Dwivedi Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221201183406.1203621-2-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/progs/linked_list.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 1f82dffc10ff8e44bd0c2c85ba6e21189b4a5695 Author: Dave Marchevsky Date: Thu Dec 1 10:34:05 2022 -0800 bpf: Fix release_on_unlock release logic for multiple refs Consider a verifier state with three acquired references, all with release_on_unlock = true: idx 0 1 2 state->refs = [2 4 6] (with 2, 4, and 6 being the ref ids). When bpf_spin_unlock is called, process_spin_lock will loop through all acquired_refs and, for each ref, if it's release_on_unlock, calls release_reference on it. That function in turn calls release_reference_state, which removes the reference from state->refs by swapping the reference state with the last reference state in refs array and decrements acquired_refs count. process_spin_lock's loop logic, which is essentially: for (i = 0; i < state->acquired_refs; i++) { if (!state->refs[i].release_on_unlock) continue; release_reference(state->refs[i].id); } will fail to release release_on_unlock references which are swapped from the end. Running this logic on our example demonstrates: state->refs = [2 4 6] (start of idx=0 iter) release state->refs[0] by swapping w/ state->refs[2] state->refs = [6 4] (start of idx=1) release state->refs[1], no need to swap as it's the last idx state->refs = [6] (start of idx=2, loop terminates) ref_id 6 should have been removed but was skipped. Fix this by looping from back-to-front, which results in refs that are candidates for removal being swapped with refs which have already been examined and kept. If we modify our initial example such that ref 6 is replaced with ref 7, which is _not_ release_on_unlock, and loop from the back, we'd see: state->refs = [2 4 7] (start of idx=2) state->refs = [2 4 7] (start of idx=1) state->refs = [2 7] (start of idx=0, refs 7 and 4 swapped) state->refs = [7] (after idx=0, 7 and 2 swapped, loop terminates) Signed-off-by: Dave Marchevsky Acked-by: Yonghong Song cc: Kumar Kartikeya Dwivedi Fixes: 534e86bc6c66 ("bpf: Add 'release on unlock' logic for bpf_list_push_{front,back}") Link: https://lore.kernel.org/r/20221201183406.1203621-1-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7f703ff2507f4e9f496da96cd4b78fd3026120c Author: Wang Yufen Date: Fri Dec 2 09:41:01 2022 +0800 binfmt: Fix error return code in load_elf_fdpic_binary() Fix to return a negative error code from create_elf_fdpic_tables() instead of 0. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Wang Yufen Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/1669945261-30271-1-git-send-email-wangyufen@huawei.com fs/binfmt_elf_fdpic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1d6df9d352bb2a3c2ddb32851dfcafb417c47762 Author: Yang Li Date: Fri Dec 2 09:17:13 2022 +0800 blk-cgroup: Fix some kernel-doc comments Make the description of @gendisk to @disk in blkcg_schedule_throttle() to clear the below warnings: block/blk-cgroup.c:1850: warning: Function parameter or member 'disk' not described in 'blkcg_schedule_throttle' block/blk-cgroup.c:1850: warning: Excess function parameter 'gendisk' description in 'blkcg_schedule_throttle' Fixes: de185b56e8a6 ("blk-cgroup: pass a gendisk to blkcg_schedule_throttle") Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3338 Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20221202011713.14834-1-yang.lee@linux.alibaba.com Signed-off-by: Jens Axboe block/blk-cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a802073d1c9ca2ffd757ab8df5afa9d73ba7e6b1 Author: Jakub Kicinski Date: Tue Nov 29 17:31:08 2022 -0800 bnxt: report FEC block stats via standard interface I must have missed that these stats are only exposed via the unstructured ethtool -S when they got merged. Plumb in the structured form. Reviewed-by: Michael Chan Link: https://lore.kernel.org/r/20221130013108.90062-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5620768a97594b703fab454c69b7df00f6fca945 Merge: 39e9d6f3cc7c ce36d7ef4e08 Author: Jakub Kicinski Date: Thu Dec 1 15:57:04 2022 -0800 Merge branch 'remove-label-cpu-from-dsa-dt-binding' Arınç ÜNAL says: ==================== remove label = "cpu" from DSA dt-binding With this patch series, we're completely getting rid of 'label = "cpu";' which is not used by the DSA dt-binding at all. Information for taking the patches for maintainers: Patch 1: netdev maintainers (based off netdev/net-next.git main) Patch 2-3: SoC maintainers (based off soc/soc.git soc/dt) Patch 4: MIPS maintainers (based off mips/linux.git mips-next) Patch 5: PowerPC maintainers (based off powerpc/linux.git next-test) I've been meaning to submit this for a few months. Find the relevant conversation here: https://lore.kernel.org/netdev/20220913155408.GA3802998-robh@kernel.org/ Here's how I did it, for the interested (or suggestions): Find the platforms which have got 'label = "cpu";' defined. grep -rnw . -e 'label = "cpu";' Remove the line where 'label = "cpu";' is included. sed -i /'label = "cpu";'/,+d arch/arm/boot/dts/* sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/freescale/* sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/marvell/* sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/mediatek/* sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/rockchip/* sed -i /'label = "cpu";'/,+d arch/mips/boot/dts/qca/* sed -i /'label = "cpu";'/,+d arch/mips/boot/dts/ralink/* sed -i /'label = "cpu";'/,+d arch/powerpc/boot/dts/turris1x.dts sed -i /'label = "cpu";'/,+d Documentation/devicetree/bindings/net/qca,ar71xx.yaml Restore the symlink files which typechange after running sed. ==================== Link: https://lore.kernel.org/r/20221130141040.32447-1-arinc.unal@arinc9.com Signed-off-by: Jakub Kicinski commit ce36d7ef4e085ad0dc415de2db32aeb0a12f7976 Author: Arınç ÜNAL Date: Wed Nov 30 17:10:36 2022 +0300 dt-bindings: net: qca,ar71xx: remove label = "cpu" from examples This is not used by the DSA dt-binding, so remove it from the examples. Signed-off-by: Arınç ÜNAL Reviewed-by: Oleksij Rempel Acked-by: Rob Herring Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/qca,ar71xx.yaml | 1 - 1 file changed, 1 deletion(-) commit 39e9d6f3cc7cd39712b7bb61bcc6fea02931f9a6 Merge: 19833ae2703d c5b8b515a211 Author: Jakub Kicinski Date: Thu Dec 1 15:53:08 2022 -0800 Merge branch 'net-tcp-dynamically-disable-tcp-md5-static-key' Dmitry Safonov says: ==================== net/tcp: Dynamically disable TCP-MD5 static key The static key introduced by commit 6015c71e656b ("tcp: md5: add tcp_md5_needed jump label") is a fast-path optimization aimed at avoiding a cache line miss. Once an MD5 key is introduced in the system the static key is enabled and never disabled. Address this by disabling the static key when the last tcp_md5sig_info in system is destroyed. Previously it was submitted as a part of TCP-AO patches set [1]. Now in attempt to split 36 patches submission, I send this independently. Version 5: https://lore.kernel.org/all/20221122185534.308643-1-dima@arista.com/T/#u Version 4: https://lore.kernel.org/all/20221115211905.1685426-1-dima@arista.com/T/#u Version 3: https://lore.kernel.org/all/20221111212320.1386566-1-dima@arista.com/T/#u Version 2: https://lore.kernel.org/all/20221103212524.865762-1-dima@arista.com/T/#u Version 1: https://lore.kernel.org/all/20221102211350.625011-1-dima@arista.com/T/#u [1]: https://lore.kernel.org/all/20221027204347.529913-1-dima@arista.com/T/#u ==================== Link: https://lore.kernel.org/r/20221123173859.473629-1-dima@arista.com Signed-off-by: Jakub Kicinski commit c5b8b515a211377e78bb7807fe3e6e7212626545 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Nov 23 17:38:59 2022 +0000 net/tcp: Separate initialization of twsk Convert BUG_ON() to WARN_ON_ONCE() and warn as well for unlikely static key int overflow error-path. Signed-off-by: Dmitry Safonov Acked-by: Jakub Kicinski Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/ipv4/tcp_minisocks.c | 61 +++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 26 deletions(-) commit b389d1affc2cc2dc8686cdab303a30b2ad3a81d4 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Nov 23 17:38:58 2022 +0000 net/tcp: Do cleanup on tcp_md5_key_copy() failure If the kernel was short on (atomic) memory and failed to allocate it - don't proceed to creation of request socket. Otherwise the socket would be unsigned and userspace likely doesn't expect that the TCP is not MD5-signed anymore. Signed-off-by: Dmitry Safonov Acked-by: Jakub Kicinski Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/ipv4/tcp_ipv4.c | 9 ++------- net/ipv6/tcp_ipv6.c | 15 ++++++++------- 2 files changed, 10 insertions(+), 14 deletions(-) commit 459837b522f7dff3b6681f534d8fff4eca19b7d1 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Nov 23 17:38:57 2022 +0000 net/tcp: Disable TCP-MD5 static key on tcp_md5sig_info destruction To do that, separate two scenarios: - where it's the first MD5 key on the system, which means that enabling of the static key may need to sleep; - copying of an existing key from a listening socket to the request socket upon receiving a signed TCP segment, where static key was already enabled (when the key was added to the listening socket). Now the life-time of the static branch for TCP-MD5 is until: - last tcp_md5sig_info is destroyed - last socket in time-wait state with MD5 key is closed. Which means that after all sockets with TCP-MD5 keys are gone, the system gets back the performance of disabled md5-key static branch. While at here, provide static_key_fast_inc() helper that does ref counter increment in atomic fashion (without grabbing cpus_read_lock() on CONFIG_JUMP_LABEL=y). This is needed to add a new user for a static_key when the caller controls the lifetime of another user. Signed-off-by: Dmitry Safonov Acked-by: Jakub Kicinski Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski include/net/tcp.h | 10 +++++-- net/ipv4/tcp.c | 5 +--- net/ipv4/tcp_ipv4.c | 71 +++++++++++++++++++++++++++++++++++++++--------- net/ipv4/tcp_minisocks.c | 16 ++++++++--- net/ipv4/tcp_output.c | 4 +-- net/ipv6/tcp_ipv6.c | 10 +++---- 6 files changed, 84 insertions(+), 32 deletions(-) commit f62c7517ffa1378cc60cb5646567fa98e4b388cd Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Nov 23 17:38:56 2022 +0000 net/tcp: Separate tcp_md5sig_info allocation into tcp_md5sig_info_add() Add a helper to allocate tcp_md5sig_info, that will help later to do/allocate things when info allocated, once per socket. Signed-off-by: Dmitry Safonov Reviewed-by: Eric Dumazet Acked-by: Jakub Kicinski Signed-off-by: Jakub Kicinski net/ipv4/tcp_ipv4.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit eb8c507296f6038d46010396d91b42a05c3b64d9 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Nov 23 17:38:55 2022 +0000 jump_label: Prevent key->enabled int overflow 1. With CONFIG_JUMP_LABEL=n static_key_slow_inc() doesn't have any protection against key->enabled refcounter overflow. 2. With CONFIG_JUMP_LABEL=y static_key_slow_inc_cpuslocked() still may turn the refcounter negative as (v + 1) may overflow. key->enabled is indeed a ref-counter as it's documented in multiple places: top comment in jump_label.h, Documentation/staging/static-keys.rst, etc. As -1 is reserved for static key that's in process of being enabled, functions would break with negative key->enabled refcount: - for CONFIG_JUMP_LABEL=n negative return of static_key_count() breaks static_key_false(), static_key_true() - the ref counter may become 0 from negative side by too many static_key_slow_inc() calls and lead to use-after-free issues. These flaws result in that some users have to introduce an additional mutex and prevent the reference counter from overflowing themselves, see bpf_enable_runtime_stats() checking the counter against INT_MAX / 2. Prevent the reference counter overflow by checking if (v + 1) > 0. Change functions API to return whether the increment was successful. Signed-off-by: Dmitry Safonov Acked-by: Jakub Kicinski Acked-by: Peter Zijlstra (Intel) Signed-off-by: Jakub Kicinski include/linux/jump_label.h | 21 +++++++++++++---- kernel/jump_label.c | 56 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 61 insertions(+), 16 deletions(-) commit cb9cfff82f6a862c1f54b8b01d9d9a979bb8ae78 Author: Dan Williams Date: Thu Dec 1 13:33:26 2022 -0800 cxl/acpi: Simplify cxl_nvdimm_bridge probing The 'struct cxl_nvdimm_bridge' object advertises platform CXL PMEM resources. It coordinates with libnvdimm to attach nvdimm devices and regions for each corresponding CXL object. That coordination is complicated, i.e. difficult to reason about, and it turns out redundant. It is already the case that the CXL core knows how to tear down a cxl_region when a cxl_memdev goes through ->remove(), so that pathway can be extended to directly cleanup cxl_nvdimm and cxl_pmem_region objects. Towards the goal of ripping out the cxl_nvdimm_bridge state machine, arrange for cxl_acpi to optionally pre-load the cxl_pmem driver so that the nvdimm bridge is active synchronously with devm_cxl_add_nvdimm_bridge(), and remove all the bind attributes for the cxl_nvdimm* objects since the cxl root device and cxl_memdev bind attributes are sufficient. Tested-by: Robert Richter Link: https://lore.kernel.org/r/166993040668.1882361.7450361097265836752.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams drivers/cxl/acpi.c | 1 + drivers/cxl/pmem.c | 9 +++++++++ 2 files changed, 10 insertions(+) commit 4cd9f1d320f905e7bc60f030566d15003745ba91 Author: Xiao Yang Date: Thu Dec 1 14:39:28 2022 +0000 RDMA/rxe: Enable atomic write capability for rxe device The capability shows that rxe device supports atomic write operation. Link: https://lore.kernel.org/r/1669905568-62-4-git-send-email-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_param.h | 5 +++++ 1 file changed, 5 insertions(+) commit 3aec427bb1499bd3325d2e251edb729a5a8643df Author: Xiao Yang Date: Thu Dec 1 14:39:27 2022 +0000 RDMA/rxe: Implement atomic write completion Generate an atomic write completion when the atomic write request has been finished. Link: https://lore.kernel.org/r/1669905568-62-3-git-send-email-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_comp.c | 4 ++++ 1 file changed, 4 insertions(+) commit 034e285f8b99062a0cf29112e1232154a6a44aa5 Author: Xiao Yang Date: Thu Dec 1 14:39:26 2022 +0000 RDMA/rxe: Make responder support atomic write on RC service Make responder process an atomic write request and send a read response on RC service. Link: https://lore.kernel.org/r/1669905568-62-2-git-send-email-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_resp.c | 84 +++++++++++++++++++++++++++++++++--- 1 file changed, 79 insertions(+), 5 deletions(-) commit abb633cf28049e6a7c37c44f83a8584f7dbded7d Author: Xiao Yang Date: Thu Dec 1 14:39:25 2022 +0000 RDMA/rxe: Make requester support atomic write on RC service Make requester process and send an atomic write request on RC service. Link: https://lore.kernel.org/r/1669905568-62-1-git-send-email-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_req.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 5c7af6c7938466aa2f3c52057f4dd28b4a1e9e42 Author: Xiao Yang Date: Thu Dec 1 14:37:08 2022 +0000 RDMA/rxe: Extend rxe packet format to support atomic write Extend rxe_wr_opcode_info[] and rxe_opcode[] for new atomic write opcode. Link: https://lore.kernel.org/r/1669905432-14-5-git-send-email-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_opcode.c | 18 ++++++++++++++++++ drivers/infiniband/sw/rxe/rxe_opcode.h | 3 +++ 2 files changed, 21 insertions(+) commit c2d939002934fa9d7b802f196b069963b46da194 Author: Xiao Yang Date: Thu Dec 1 14:37:07 2022 +0000 RDMA/rxe: Extend rxe user ABI to support atomic write Define an atomic_wr array to store 8-byte value. Link: https://lore.kernel.org/r/1669905432-14-4-git-send-email-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe include/uapi/rdma/rdma_user_rxe.h | 1 + 1 file changed, 1 insertion(+) commit 3ff81e827b8d5cea36ff374a11c200b4306f45d2 Author: Xiao Yang Date: Thu Dec 1 14:37:06 2022 +0000 RDMA: Extend RDMA kernel ABI to support atomic write 1) Define new atomic write request/completion in kernel. 2) Define new atomic write capability in kernel. 3) Define new atomic write opcode for RC service in packet. Link: https://lore.kernel.org/r/1669905432-14-3-git-send-email-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe include/rdma/ib_pack.h | 2 ++ include/rdma/ib_verbs.h | 3 +++ 2 files changed, 5 insertions(+) commit efa2afc3969e166702fd2ae3cfb1a7a195ef3533 Author: Xiao Yang Date: Thu Dec 1 14:37:05 2022 +0000 RDMA: Extend RDMA user ABI to support atomic write 1) Define new atomic write request/completion in userspace. 2) Define new atomic write capability in userspace. Link: https://lore.kernel.org/r/1669905432-14-2-git-send-email-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe include/uapi/rdma/ib_user_verbs.h | 4 ++++ 1 file changed, 4 insertions(+) commit 51f5f78a4f804aeb73cf12a7cbba6e5198abd908 Author: Zqiang Date: Wed Nov 9 15:36:38 2022 +0800 srcu: Make Tiny synchronize_srcu() check for readers This commit adds lockdep checks for illegal use of synchronize_srcu() within same-type SRCU read-side critical sections and within normal RCU read-side critical sections. It also makes synchronize_srcu() be a no-op during early boot. These changes bring Tiny synchronize_srcu() into line with both Tree synchronize_srcu() and Tiny synchronize_rcu(). Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney Tested-by: John Ogness kernel/rcu/srcutiny.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 19833ae2703d4b5ca184db50a11351cfa611da01 Merge: 4b6c6065fca1 d0c006402e79 Author: Jakub Kicinski Date: Thu Dec 1 15:36:27 2022 -0800 Merge branch 'locking/core' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull in locking/core from tip (just a single patch) to avoid a conflict with a jump_label change needed by a TCP cleanup. Link: https://lore.kernel.org/all/Y4B17nBArWS1Iywo@hirez.programming.kicks-ass.net/ Signed-off-by: Jakub Kicinski commit 0c3265235fc17e78773025ed0ddc7c0324b6ed89 Author: Sean Christopherson Date: Tue Nov 22 01:33:09 2022 +0000 KVM: selftests: Define and use a custom static assert in lib headers Define and use kvm_static_assert() in the common KVM selftests headers to provide deterministic behavior, and to allow creating static asserts without dummy messages. The kernel's static_assert() makes the message param optional, and on the surface, tools/include/linux/build_bug.h appears to follow suit. However, glibc may override static_assert() and redefine it as a direct alias of _Static_assert(), which makes the message parameter mandatory. This leads to non-deterministic behavior as KVM selftests code that utilizes static_assert() without a custom message may or not compile depending on the order of includes. E.g. recently added asserts in x86_64/processor.h fail on some systems with errors like In file included from lib/memstress.c:11:0: include/x86_64/processor.h: In function ‘this_cpu_has_p’: include/x86_64/processor.h:193:34: error: expected ‘,’ before ‘)’ token static_assert(low_bit < high_bit); \ ^ due to _Static_assert() expecting a comma before a message. The "message optional" version of static_assert() uses macro magic to strip away the comma when presented with empty an __VA_ARGS__ #ifndef static_assert #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) #endif // static_assert and effectively generates "_Static_assert(expr, #expr)". The incompatible version of static_assert() gets defined by this snippet in /usr/include/assert.h: #if defined __USE_ISOC11 && !defined __cplusplus # undef static_assert # define static_assert _Static_assert #endif which yields "_Static_assert(expr)" and thus fails as above. KVM selftests don't actually care about using C11, but __USE_ISOC11 gets defined because of _GNU_SOURCE, which many tests do #define. _GNU_SOURCE triggers a massive pile of defines in /usr/include/features.h, including _ISOC11_SOURCE: /* If _GNU_SOURCE was defined by the user, turn on all the other features. */ #ifdef _GNU_SOURCE # undef _ISOC95_SOURCE # define _ISOC95_SOURCE 1 # undef _ISOC99_SOURCE # define _ISOC99_SOURCE 1 # undef _ISOC11_SOURCE # define _ISOC11_SOURCE 1 # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200809L # undef _XOPEN_SOURCE # define _XOPEN_SOURCE 700 # undef _XOPEN_SOURCE_EXTENDED # define _XOPEN_SOURCE_EXTENDED 1 # undef _LARGEFILE64_SOURCE # define _LARGEFILE64_SOURCE 1 # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 # undef _ATFILE_SOURCE # define _ATFILE_SOURCE 1 #endif which further down in /usr/include/features.h leads to: /* This is to enable the ISO C11 extension. */ #if (defined _ISOC11_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) # define __USE_ISOC11 1 #endif To make matters worse, /usr/include/assert.h doesn't guard against multiple inclusion by turning itself into a nop, but instead #undefs a few macros and continues on. As a result, it's all but impossible to ensure the "message optional" version of static_assert() will actually be used, e.g. explicitly including assert.h and #undef'ing static_assert() doesn't work as a later inclusion of assert.h will again redefine its version. #ifdef _ASSERT_H # undef _ASSERT_H # undef assert # undef __ASSERT_VOID_CAST # ifdef __USE_GNU # undef assert_perror # endif #endif /* assert.h */ #define _ASSERT_H 1 #include Fixes: fcba483e8246 ("KVM: selftests: Sanity check input to ioctls() at build time") Fixes: ee3795536664 ("KVM: selftests: Refactor X86_FEATURE_* framework to prep for X86_PROPERTY_*") Fixes: 53a7dc0f215e ("KVM: selftests: Add X86_PROPERTY_* framework to retrieve CPUID values") Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221122013309.1872347-1-seanjc@google.com .../testing/selftests/kvm/include/kvm_util_base.h | 14 +++++++++++++- .../selftests/kvm/include/x86_64/processor.h | 22 +++++++++++----------- 2 files changed, 24 insertions(+), 12 deletions(-) commit 553d1652b8615b5ae3080bb1a561207aee87fa85 Author: Sean Christopherson Date: Mon Nov 28 22:57:35 2022 +0000 KVM: selftests: Do kvm_cpu_has() checks before creating VM+vCPU Move the AMX test's kvm_cpu_has() checks before creating the VM+vCPU, there are no dependencies between the two operations. Opportunistically add a comment to call out that enabling off-by-default XSAVE-managed features must be done before KVM_GET_SUPPORTED_CPUID is cached. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221128225735.3291648-5-seanjc@google.com tools/testing/selftests/kvm/x86_64/amx_test.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit cd5f3d210095347e9d40a9a1d464f5ee0bb5d7f2 Author: Sean Christopherson Date: Mon Nov 28 22:57:34 2022 +0000 KVM: selftests: Disallow "get supported CPUID" before REQ_XCOMP_GUEST_PERM Disallow using kvm_get_supported_cpuid() and thus caching KVM's supported CPUID info before enabling XSAVE-managed features that are off-by-default and must be enabled by ARCH_REQ_XCOMP_GUEST_PERM. Caching the supported CPUID before all XSAVE features are enabled can result in false negatives due to testing features that were cached before they were enabled. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221128225735.3291648-4-seanjc@google.com tools/testing/selftests/kvm/lib/x86_64/processor.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 2ceade1d363c934633a1788d0f98fc2332062b92 Author: Sean Christopherson Date: Mon Nov 28 22:57:33 2022 +0000 KVM: selftests: Move __vm_xsave_require_permission() below CPUID helpers Move __vm_xsave_require_permission() below the CPUID helpers so that a future change can reference the cached result of KVM_GET_SUPPORTED_CPUID while keeping the definition of the variable close to its intended user, kvm_get_supported_cpuid(). No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221128225735.3291648-3-seanjc@google.com tools/testing/selftests/kvm/lib/x86_64/processor.c | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 18eee7bfd18d6c9586dd224cf5b74258700fe815 Author: Lei Wang Date: Mon Nov 28 22:57:32 2022 +0000 KVM: selftests: Move XFD CPUID checking out of __vm_xsave_require_permission() Move the kvm_cpu_has() check on X86_FEATURE_XFD out of the helper to enable off-by-default XSAVE-managed features and into the one test that currenty requires XFD (XFeature Disable) support. kvm_cpu_has() uses kvm_get_supported_cpuid() and thus caches KVM_GET_SUPPORTED_CPUID, and so using kvm_cpu_has() before ARCH_REQ_XCOMP_GUEST_PERM effectively results in the test caching stale values, e.g. subsequent checks on AMX_TILE will get false negatives. Although off-by-default features are nonsensical without XFD, checking for XFD virtualization prior to enabling such features isn't strictly required. Signed-off-by: Lei Wang Fixes: 7fbb653e01fd ("KVM: selftests: Check KVM's supported CPUID, not host CPUID, for XFD") Link: https://lore.kernel.org/r/20221125023839.315207-1-lei4.wang@intel.com [sean: add Fixes, reword changelog] Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221128225735.3291648-2-seanjc@google.com tools/testing/selftests/kvm/lib/x86_64/processor.c | 2 -- tools/testing/selftests/kvm/x86_64/amx_test.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit 8fcee0421386344b58fdc1cd5940219617037968 Author: Sean Christopherson Date: Tue Nov 29 17:53:00 2022 +0000 KVM: selftests: Restore assert for non-nested VMs in access tracking test Restore the assert (on x86-64) that <10% of pages are still idle when NOT running as a nested VM in the access tracking test. The original assert was converted to a "warning" to avoid false failures when running the test in a VM, but the non-nested case does not suffer from the same "infinite TLB size" issue. Using the HYPERVISOR flag isn't infallible as VMMs aren't strictly required to enumerate the "feature" in CPUID, but practically speaking anyone that is running KVM selftests in VMs is going to be using a VMM and hypervisor that sets the HYPERVISOR flag. Cc: David Matlack Reviewed-by: Emanuele Giuseppe Esposito Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221129175300.4052283-3-seanjc@google.com tools/testing/selftests/kvm/access_tracking_perf_test.c | 17 ++++++++++++----- tools/testing/selftests/kvm/include/x86_64/processor.h | 1 + 2 files changed, 13 insertions(+), 5 deletions(-) commit a33004e844e4c60da86ecf8c249aab7179817fce Author: Sean Christopherson Date: Tue Nov 29 17:52:59 2022 +0000 KVM: selftests: Fix inverted "warning" in access tracking perf test Warn if the number of idle pages is greater than or equal to 10% of the total number of pages, not if the percentage of idle pages is less than 10%. The original code asserted that less than 10% of pages were still idle, but the check got inverted when the assert was converted to a warning. Opportunistically clean up the warning; selftests are 64-bit only, there is no need to use "%PRIu64" instead of "%lu". Fixes: 6336a810db5c ("KVM: selftests: replace assertion with warning in access_tracking_perf_test") Reviewed-by: Emanuele Giuseppe Esposito Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221129175300.4052283-2-seanjc@google.com tools/testing/selftests/kvm/access_tracking_perf_test.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 955f2ea3b9e94d0fa20ce3a78ef3063923d41b58 Author: Abel Vesa Date: Wed Nov 30 13:28:48 2022 +0200 clk: qcom: Add GCC driver for SM8550 Add Global Clock controller (GCC) driver for SM8550 SoC, which includes the gcc resets and gdsc. This patch is based on an initial downstream driver. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130112852.2977816-6-abel.vesa@linaro.org drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gcc-sm8550.c | 3387 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 3396 insertions(+) commit 1de7e70941fff80139df8a37d4b35264543e3fc0 Author: Abel Vesa Date: Wed Nov 30 13:28:47 2022 +0200 clk: qcom: Add LUCID_OLE PLL type for SM8550 Add a LUCID_OLE PLL type for SM8550 SoC from Qualcomm. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130112852.2977816-5-abel.vesa@linaro.org drivers/clk/qcom/clk-alpha-pll.c | 16 ++++++++++++++++ drivers/clk/qcom/clk-alpha-pll.h | 5 +++++ 2 files changed, 21 insertions(+) commit 7364379d725fc8240a90190dc9da662ada43d9d1 Author: Abel Vesa Date: Wed Nov 30 13:28:46 2022 +0200 clk: qcom: gdsc: Increase status poll timeout The SM8550 GCC GDSCs need a higher timeout value when polling for status, so increase it to 1500us, while leaving the delay between disable-enable sequence for votable gdscs to stay the same. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130112852.2977816-4-abel.vesa@linaro.org drivers/clk/qcom/gdsc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 47ba9c50bbeb1c5005eb06ca0a2ab92604a54b62 Author: Abel Vesa Date: Wed Nov 30 13:28:44 2022 +0200 dt-bindings: clock: Add SM8550 GCC clocks Add device tree bindings for global clock controller on SM8550 SoCs. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221130112852.2977816-2-abel.vesa@linaro.org .../devicetree/bindings/clock/qcom,sm8550-gcc.yaml | 62 ++++++ include/dt-bindings/clock/qcom,sm8550-gcc.h | 231 +++++++++++++++++++++ 2 files changed, 293 insertions(+) commit a9b6703459b1317354ae5da28acb5be918c16262 Author: Lin, Meng-Bo Date: Thu Nov 17 17:15:26 2022 +0000 clk: qcom: gcc-msm8939: Add rates to the GP clocks Similar to msm8916, msm8939 has (at least) 6 "General Purpose" clocks that can be muxed to SoC pins. These clocks are: GP_CLK{0, 1} : GPIO_{31, 32} (Belongs to CAMSS according to Linux) GP_CLK_{1-3}{A, B} : GPIO_{49-51, 97, 12, 13} (Belongs to GCC itself) GP_MN : GPIO_110 (Doesn't seem to be described in gcc, ignored in this patch) Those clocks may be used as e.g. PWM sources for external peripherals. Add more frequencies to the table for those clocks so it's possible for arbitrary peripherals to make use of them. Reference: https://lore.kernel.org/r/20220612145955.385787-5-nikita@trvn.ru Signed-off-by: Lin, Meng-Bo Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117171343.24216-1-linmengbo0689@protonmail.com drivers/clk/qcom/gcc-msm8939.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 0c44be063948bb02918c9ef5332e0e65daa94fc7 Author: Minghao Chi Date: Thu Nov 17 14:03:34 2022 +0800 clk: qcom: hfpll: 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 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/202211171403340042731@zte.com.cn drivers/clk/qcom/hfpll.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 35dc8e101a8e08f69f4725839b98ec0f11a8e2d3 Author: Robert Marko Date: Wed Nov 16 22:46:55 2022 +0100 clk: qcom: ipq8074: populate fw_name for all parents It appears that 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 all parent clocks in parent_data. Fixes: ae55ad32e273 ("clk: qcom: ipq8074: convert to parent data") Co-developed-by: Christian Marangi Signed-off-by: Christian Marangi Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko@gmail.com drivers/clk/qcom/gcc-ipq8074.c | 52 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 56a655e1c41a86445cf2de656649ad93424b2a63 Author: Christian Marangi Date: Wed Nov 9 01:56:31 2022 +0100 clk: qcom: krait-cc: convert to parent_data API Modernize the krait-cc driver to parent-data API and refactor to drop any use of parent_names. From Documentation all the required clocks should be declared in DTS so fw_name can be correctly used to get the parents for all the muxes. .name is also declared to save compatibility with old DT. While at it also drop some hardcoded index and introduce an enum to make index values more clear. Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221109005631.3189-5-ansuelsmth@gmail.com drivers/clk/qcom/krait-cc.c | 202 ++++++++++++++++++++++++-------------------- 1 file changed, 112 insertions(+), 90 deletions(-) commit 8ea9fb841a7e528bc8ae79d726ce951dcf7b46e2 Author: Christian Marangi Date: Wed Nov 9 01:56:30 2022 +0100 clk: qcom: krait-cc: convert to devm_clk_hw_register clk_register is now deprecated. Convert the driver to devm_clk_hw_register. Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221109005631.3189-4-ansuelsmth@gmail.com drivers/clk/qcom/krait-cc.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit e5dc1a4c01510da8438dddfdf4200b79d73990dc Author: Christian Marangi Date: Wed Nov 9 01:56:29 2022 +0100 clk: qcom: krait-cc: handle secondary mux sourcing out of acpu_aux Some bootloader may leave the system in an even more undefined state with the secondary mux of L2 or other cores sourcing out of the acpu_aux parent. This results in the clk set to the PXO rate or a PLL8 rate. The current logic to reset the mux and set them to a defined state only handle if the mux are configured to source out of QSB. Change this and force a new and defined state if the current clk is lower than the aux rate. This way we can handle any wrong configuration where the mux is sourcing out of QSB (rate 225MHz, currently set to a virtual rate of 1), PXO rate (rate 25MHz) or PLL8 (needs to be configured to run at 384Mhz). Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221109005631.3189-3-ansuelsmth@gmail.com drivers/clk/qcom/krait-cc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 18ae57b1e8abee6c453381470f6e18991d2901a8 Author: Christian Marangi Date: Wed Nov 9 01:56:28 2022 +0100 clk: qcom: krait-cc: also enable secondary mux and div clk clk-krait ignore any rate change if clk is not flagged as enabled. Correctly enable the secondary mux and div clk to correctly change rate instead of silently ignoring the request. Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221109005631.3189-2-ansuelsmth@gmail.com drivers/clk/qcom/krait-cc.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 8e456411abcbf899c04740b9dbb3dcefcd61c946 Author: Christian Marangi Date: Wed Nov 9 01:56:27 2022 +0100 clk: qcom: krait-cc: fix wrong parent order for secondary mux The secondary mux parent order is swapped. This currently doesn't cause problems as the secondary mux is used for idle clk and as a safe clk source while reprogramming the hfpll. Each mux have 2 or more output but he always have a safe source to switch while reprogramming the connected pll. We use a clk notifier to switch to the correct parent before clk core can apply the correct rate. The parent to switch is hardcoded in the mux struct. For the secondary mux the safe source to use is the qsb parent as it's the only fixed clk as the acpus_aux is a pll that can source from pxo or from pll8. The hardcoded safe parent for the secondary mux is set to index 0 that in the secondary mux map is set to 2. But the index 0 is actually acpu_aux in the parent list. Fix the swapped parents to correctly handle idle frequency and output a sane clk_summary report. Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221109005631.3189-1-ansuelsmth@gmail.com drivers/clk/qcom/krait-cc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3198106a99e73dbc4c02bd5128cec0997c73af82 Author: Christian Marangi Date: Tue Nov 8 22:58:27 2022 +0100 clk: qcom: krait-cc: use devm variant for clk notifier register Use devm variant for clk notifier register and correctly handle free resource on driver remove. Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221108215827.30475-1-ansuelsmth@gmail.com drivers/clk/qcom/krait-cc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d676d3a3717cf726d3affedbe5ba98fc4ccad7b3 Author: Christian Marangi Date: Tue Nov 8 22:56:25 2022 +0100 clk: qcom: clk-krait: fix wrong div2 functions Currently div2 value is applied to the wrong bits. This is caused by a bug in the code where the shift is done only for lpl, for anything else the mask is not shifted to the correct bits. Fix this by correctly shift if lpl is not supported. Fixes: 4d7dc77babfe ("clk: qcom: Add support for Krait clocks") Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221108215625.30186-1-ansuelsmth@gmail.com drivers/clk/qcom/clk-krait.c | 2 ++ 1 file changed, 2 insertions(+) commit 09be1a39e685d8c5edd471fd1cac9a8f8280d2de Author: Christian Marangi Date: Tue Nov 8 22:17:34 2022 +0100 clk: qcom: kpss-xcc: register it as clk provider krait-cc use this driver for the secondary mux. Register it as a clk provider to correctly use this clk in other drivers. Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221108211734.3707-1-ansuelsmth@gmail.com drivers/clk/qcom/kpss-xcc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit ce520e312918bc8f02d1c6bd58b288c2eb2d23c0 Author: Robert Marko Date: Mon Nov 7 14:29:01 2022 +0100 clk: qcom: ipq8074: add missing networking resets Downstream QCA 5.4 kernel defines networking resets which are not present in the mainline kernel but are required for the networking drivers. So, port the downstream resets and avoid using magic values for mask, construct mask for resets which require multiple bits to be set/cleared. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107132901.489240-3-robimarko@gmail.com drivers/clk/qcom/gcc-ipq8074.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit bb524058eb5635ee6ecbe3ef154d44088f7a2154 Author: Robert Marko Date: Mon Nov 7 14:29:00 2022 +0100 dt-bindings: clock: qcom: ipq8074: add missing networking resets Add bindings for the missing networking resets found in IPQ8074 GCC. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107132901.489240-2-robimarko@gmail.com include/dt-bindings/clock/qcom,gcc-ipq8074.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4a5210893625f89723ea210d7c630b730abb37ad Author: Robert Marko Date: Mon Nov 7 14:28:59 2022 +0100 clk: qcom: reset: support resetting multiple bits This patch adds the support for giving the complete bitmask in reset structure and reset operation will use this bitmask for all reset operations. Currently, reset structure only takes a single bit for each reset and then calculates the bitmask by using the BIT() macro. However, this is not sufficient anymore for newer SoC-s like IPQ8074, IPQ6018 and more, since their networking resets require multiple bits to be asserted in order to properly reset the HW block completely. So, in order to allow asserting multiple bits add "bitmask" field to qcom_reset_map, and then use that bitmask value if its populated in the driver, if its not populated, then we just default to existing behaviour and calculate the bitmask on the fly. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107132901.489240-1-robimarko@gmail.com drivers/clk/qcom/reset.c | 4 ++-- drivers/clk/qcom/reset.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit e3ad6c3f21ddb89e4b71361be8318da57dbe3597 Author: Douglas Anderson Date: Fri Nov 4 06:56:30 2022 -0700 clk: qcom: lpass-sc7180: Avoid an extra "struct dev_pm_ops" The two devices managed by lpasscorecc-sc7180.c each had their own "struct dev_pm_ops". This is not needed. They are exactly the same and the structure is "static const" so it can't possible change. combine the two. This matches what's done for sc7280. This should be a noop other than saving a few bytes. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104064055.3.I90ba14a47683a484f26531a08f7b46ace7f0a8a9@changeid drivers/clk/qcom/lpasscorecc-sc7180.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit ff1ccf59eaffd192efe21f7de9fb0c130faf1b1b Author: Douglas Anderson Date: Fri Nov 4 06:56:29 2022 -0700 clk: qcom: lpass-sc7180: Fix pm_runtime usage The sc7180 lpass clock controller's pm_runtime usage wasn't broken quite as spectacularly as the sc7280's pm_runtime usage, but it was still broken. Putting some printouts in at boot showed me this (with serial console enabled, which makes the prints slow and thus changes timing): [ 3.109951] DOUG: my_pm_clk_resume, usage=1 [ 3.114767] DOUG: my_pm_clk_resume, usage=1 [ 3.664443] DOUG: my_pm_clk_suspend, usage=0 [ 3.897566] DOUG: my_pm_clk_suspend, usage=0 [ 3.910137] DOUG: my_pm_clk_resume, usage=1 [ 3.923217] DOUG: my_pm_clk_resume, usage=0 [ 4.440116] DOUG: my_pm_clk_suspend, usage=-1 [ 4.444982] DOUG: my_pm_clk_suspend, usage=0 [ 14.170501] DOUG: my_pm_clk_resume, usage=1 [ 14.176245] DOUG: my_pm_clk_resume, usage=0 ...or this w/out serial console: [ 0.556139] DOUG: my_pm_clk_resume, usage=1 [ 0.556279] DOUG: my_pm_clk_resume, usage=1 [ 1.058422] DOUG: my_pm_clk_suspend, usage=-1 [ 1.058464] DOUG: my_pm_clk_suspend, usage=0 [ 1.186250] DOUG: my_pm_clk_resume, usage=1 [ 1.186292] DOUG: my_pm_clk_resume, usage=0 [ 1.731536] DOUG: my_pm_clk_suspend, usage=-1 [ 1.731557] DOUG: my_pm_clk_suspend, usage=0 [ 10.288910] DOUG: my_pm_clk_resume, usage=1 [ 10.289496] DOUG: my_pm_clk_resume, usage=0 It seems to be doing roughly the right sequence of calls, but just like with sc7280 this is more by luck than anything. Having a usage of -1 is just not OK. Let's fix this like we did with sc7280. Signed-off-by: Douglas Anderson Fixes: ce8c195e652f ("clk: qcom: lpasscc: Introduce pm autosuspend for SC7180") Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104064055.2.I49b25b9bda9430fc7ea21e5a708ca5a0aced2798@changeid drivers/clk/qcom/lpasscorecc-sc7180.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit d470be3c4f30b4666e43eef6bab80f543563cdb0 Author: Douglas Anderson Date: Fri Nov 4 06:56:28 2022 -0700 clk: qcom: lpass-sc7280: Fix pm_runtime usage The pm_runtime usage in lpass-sc7280 was broken in quite a few ways. Specifically: 1. At the end of probe it called "put" twice. This is a no-no and will end us up with a negative usage count. Even worse than calling "put" twice, it never called "get" once. Thus after bootup it could be seen that the runtime usage of the devices managed by this driver was -2. 2. In some error cases it manually called pm_runtime_disable() even though it had previously used devm_add_action_or_reset() to set this up to be called automatically. This meant that in these error cases we'd double-call pm_runtime_disable(). 3. It forgot to call undo pm_runtime_use_autosuspend(), which can sometimes have subtle problems (and the docs specifically mention that you need to undo this function). Overall the above seriously calls into question how this driver is working. It seems like a combination of "it doesn't", "by luck", and "because of the weirdness of runtime_pm". Specifically I put a printout to the serial console every time the runtime suspend/resume was called for the two devices created by this driver (I wrapped the pm_clk calls). When I had serial console enabled, I found that the calls got resumed at bootup (when the clk core probed and before our double-put) and then never touched again. That's no good. [ 0.829997] DOUG: my_pm_clk_resume, usage=1 [ 0.835487] DOUG: my_pm_clk_resume, usage=1 When I disabled serial console (speeding up boot), I got a different pattern, which I guess (?) is better: [ 0.089767] DOUG: my_pm_clk_resume, usage=1 [ 0.090507] DOUG: my_pm_clk_resume, usage=1 [ 0.151885] DOUG: my_pm_clk_suspend, usage=-2 [ 0.151914] DOUG: my_pm_clk_suspend, usage=-2 [ 1.825747] DOUG: my_pm_clk_resume, usage=-1 [ 1.825774] DOUG: my_pm_clk_resume, usage=-1 [ 1.888269] DOUG: my_pm_clk_suspend, usage=-2 [ 1.888282] DOUG: my_pm_clk_suspend, usage=-2 These different patterns have to do with the fact that the core PM Runtime code really isn't designed to be robust to negative usage counts and sometimes may happen to stumble upon a behavior that happens to "work". For instance, you can see that __pm_runtime_suspend() will treat any non-zero value (including negative numbers) as if the device is in use. In any case, let's fix the driver to be correct. We'll hold a pm_runtime reference for the whole probe and then drop it (once!) at the end. We'll get rid of manual pm_runtime_disable() calls in the error handling. We'll also switch to devm_pm_runtime_enable(), which magically handles undoing pm_runtime_use_autosuspend() as of commit b4060db9251f ("PM: runtime: Have devm_pm_runtime_enable() handle pm_runtime_dont_use_autosuspend()"). While we're at this, let's also use devm_pm_clk_create() instead of rolling it ourselves. Note that the above changes make it obvious that lpassaudio_create_pm_clks() was doing more than just creating clocks. It was also setting up pm_runtime parameters. Let's rename it. All of these problems were found by code inspection. I started looking at this driver because it was involved in a deadlock that I reported a while ago [1]. Though I bisected the deadlock to commit 1b771839de05 ("clk: qcom: gdsc: enable optional power domain support"), it was never really clear why that patch affected it other than a luck of timing changes. I'll also note that by fixing the timing (as done in this change) we also seem to aboid the deadlock, which is a nice benefit. Also note that some of the fixes here are much the same type of stuff that Dmitry did in commit 72cfc73f4663 ("clk: qcom: use devm_pm_runtime_enable and devm_pm_clk_create"), but I guess lpassaudiocc-sc7280.c didn't exist then. [1] https://lore.kernel.org/r/20220922154354.2486595-1-dianders@chromium.org Fixes: a9dd26639d05 ("clk: qcom: lpass: Add support for LPASS clock controller for SC7280") Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104064055.1.I00a0e4564a25489e85328ec41636497775627564@changeid drivers/clk/qcom/lpassaudiocc-sc7280.c | 55 +++++++++++++--------------------- 1 file changed, 21 insertions(+), 34 deletions(-) commit de917701da5d5ccb31825dca850ac49399e0f289 Author: Lad Prabhakar Date: Tue Nov 15 12:30:18 2022 +0000 dt-bindings: i2c: renesas,riic: Document RZ/Five SoC The RIIC block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,riic-r9a07g043" 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,riic-rz" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/renesas,riic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bf71889ad9a4d39b7665c105a005c5a33d730ba Author: Akhil R Date: Thu Nov 17 15:34:15 2022 +0530 i2c: tegra: Set ACPI node as primary fwnode Set ACPI node as the primary fwnode of I2C adapter to allow enumeration of child devices from the ACPI table Signed-off-by: Zubair Waheed Signed-off-by: Akhil R Reviewed-by: Thierry Reding Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 1 + 1 file changed, 1 insertion(+) commit 3d50b95b50db36de945bfc34d4d94b7e11ee8fd9 Author: Corentin Labbe Date: Mon Nov 14 11:56:06 2022 +0000 i2c: smbus: add DDR support for SPD On my x05 laptop I got: Memory type 0x12 not supported yet, not instantiating SPD Adding the 0x12 case lead to a successful instantiated SPD AT24 EEPROM. i801_smbus 0000:00:1f.3: SMBus using polling i2c i2c-6: 2/2 memory slots populated (from DMI) at24 6-0050: 256 byte spd EEPROM, read-only i2c i2c-6: Successfully instantiated SPD at 0x50 at24 6-0051: 256 byte spd EEPROM, read-only And then, I decoded it successfully via decode-dimms. Signed-off-by: Corentin Labbe Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/i2c-smbus.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d3a5738849e03990618cbb12e10db4eb82dbfda0 Author: Shin'ichiro Kawasaki Date: Thu Dec 1 15:10:36 2022 +0900 null_blk: support read-only and offline zone conditions In zoned mode, zones with write pointers can have conditions "read-only" or "offline". In read-only condition, zones can not be written. In offline condition, the zones can be neither written nor read. These conditions are intended for zones with media failures, then it is difficult to set those conditions to zones on real devices. To test handling of zones in the conditions, add a feature to null_blk to set up zones in read-only or offline condition. Add new configuration attributes "zone_readonly" and "zone_offline". Write a sector to the attribute files to specify the target zone to set the zone conditions. For example, following command lines do it: echo 0 > nullb1/zone_readonly echo 524288 > nullb1/zone_offline When the specified zones are already in read-only or offline condition, normal empty condition is restored to the zones. These condition changes can be done only after the null_blk device get powered, since status area of each zone is not yet allocated before power-on. Also improve zone condition checks to inhibit all commands for zones in offline conditions. In same manner, inhibit write and zone management commands for zones in read-only condition. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20221201061036.2342206-1-shinichiro.kawasaki@wdc.com Signed-off-by: Jens Axboe drivers/block/null_blk/main.c | 22 ++++++++- drivers/block/null_blk/null_blk.h | 8 ++++ drivers/block/null_blk/zoned.c | 95 +++++++++++++++++++++++++++++++++++++-- 3 files changed, 121 insertions(+), 4 deletions(-) commit 15a8348707ffd2a37516db9bede88cc0bb467e0b Author: Dave Jiang Date: Wed Nov 30 12:23:07 2022 -0700 libnvdimm: Introduce CONFIG_NVDIMM_SECURITY_TEST flag nfit_test overrode the security_show() sysfs attribute function in nvdimm dimm_devs in order to allow testing of security unlock. With the introduction of CXL security commands, the trick to override security_show() becomes significantly more complicated. By introdcing a security flag CONFIG_NVDIMM_SECURITY_TEST, libnvdimm can just toggle the check via a compile option. In addition the original override can can be removed from tools/testing/nvdimm/. The flag will also be used to bypass cpu_cache_invalidate_memregion() when set in a different commit. This allows testing on QEMU with nfit_test or cxl_test since cpu_cache_has_invalidate_memregion() checks whether X86_FEATURE_HYPERVISOR cpu feature flag is set on x86. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983618758.2734609.18031639517065867138.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/nvdimm/Kconfig | 12 ++++++++++++ drivers/nvdimm/dimm_devs.c | 9 ++++++++- drivers/nvdimm/security.c | 4 ++++ tools/testing/nvdimm/Kbuild | 1 - tools/testing/nvdimm/dimm_devs.c | 30 ------------------------------ 5 files changed, 24 insertions(+), 32 deletions(-) commit 452996fa079b1a8751a02ac04c54b1d69f512249 Author: Dave Jiang Date: Wed Nov 30 12:23:01 2022 -0700 cxl/pmem: add provider name to cxl pmem dimm attribute group Add provider name in order to associate cxl test dimm from cxl_test to the cxl pmem device when going through sysfs for security testing. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983618174.2734609.15600031015423828810.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-nvdimm | 8 ++++++++ drivers/cxl/pmem.c | 10 ++++++++++ 2 files changed, 18 insertions(+) commit 18fa556375c0e28f067f4a52e9f11d4fd2cf6842 Author: Dave Jiang Date: Wed Nov 30 12:22:56 2022 -0700 tools/testing/cxl: add mechanism to lock mem device for testing The mock cxl mem devs needs a way to go into "locked" status to simulate when the platform is rebooted. Add a sysfs mechanism so the device security state is set to "locked" and the frozen state bits are cleared. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983617602.2734609.7042497620931694717.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams tools/testing/cxl/test/mem.c | 48 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) commit bd429e5355cd58aeb7e38b905fbecee357a6379b Author: Dave Jiang Date: Wed Nov 30 12:22:50 2022 -0700 cxl/pmem: add id attribute to CXL based nvdimm Add an id group attribute for CXL based nvdimm object. The addition allows ndctl to display the "unique id" for the nvdimm. The serial number for the CXL memory device will be used for this id. [ { "dev":"nmem10", "id":"0x4", "security":"disabled" }, ] The id attribute is needed by the ndctl security key management to setup a keyblob with a unique file name tied to the mem device. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983617029.2734609.8251308562882142281.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams Documentation/ABI/testing/sysfs-bus-nvdimm | 6 ++++++ drivers/cxl/pmem.c | 28 +++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) commit dcedadfae28562ad04bc351cabfbc0c65b810847 Author: Dave Jiang Date: Wed Nov 30 12:22:44 2022 -0700 nvdimm/cxl/pmem: Add support for master passphrase disable security command The original nvdimm_security_ops ->disable() only supports user passphrase for security disable. The CXL spec introduced the disabling of master passphrase. Add a ->disable_master() callback to support this new operation and leaving the old ->disable() mechanism alone. A "disable_master" command is added for the sysfs attribute in order to allow command to be issued from userspace. ndctl will need enabling in order to utilize this new operation. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983616454.2734609.14204031148234398086.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/security.c | 21 ++++++++++++++++++--- drivers/nvdimm/security.c | 33 ++++++++++++++++++++++++++------- include/linux/libnvdimm.h | 2 ++ 3 files changed, 46 insertions(+), 10 deletions(-) commit 9f01733387460ee373eb8da4292062ffc5fa340b Author: Dave Jiang Date: Wed Nov 30 12:22:38 2022 -0700 tools/testing/cxl: Add "passphrase secure erase" opcode support Add support to emulate a CXL mem device support the "passphrase secure erase" operation. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983615879.2734609.5177049043677443736.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams tools/testing/cxl/test/mem.c | 102 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) commit 3b502e886d01c2f96b2774176be4c7bceef2516b Author: Dave Jiang Date: Wed Nov 30 12:22:32 2022 -0700 cxl/pmem: Add "Passphrase Secure Erase" security command support Create callback function to support the nvdimm_security_ops() ->erase() callback. Translate the operation to send "Passphrase Secure Erase" security command for CXL memory device. When the mem device is secure erased, cpu_cache_invalidate_memregion() is called in order to invalidate all CPU caches before attempting to access the mem device again. See CXL 3.0 spec section 8.2.9.8.6.6 for reference. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983615293.2734609.10358657600295932156.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/mbox.c | 1 + drivers/cxl/cxlmem.h | 8 ++++++++ drivers/cxl/security.c | 29 +++++++++++++++++++++++++++++ include/uapi/linux/cxl_mem.h | 1 + 4 files changed, 39 insertions(+) commit 8e80b18664934621c742f17cdac3c4fe00728612 Author: Dave Jiang Date: Wed Nov 30 12:22:27 2022 -0700 tools/testing/cxl: Add "Unlock" security opcode support Add support to emulate a CXL mem device support the "Unlock" operation. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983614730.2734609.2280484207184754073.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams tools/testing/cxl/test/mem.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 2bb692f7a6cd0a7b2c29d8d5029c4469c4ec02dd Author: Dave Jiang Date: Wed Nov 30 12:22:21 2022 -0700 cxl/pmem: Add "Unlock" security command support Create callback function to support the nvdimm_security_ops() ->unlock() callback. Translate the operation to send "Unlock" security command for CXL mem device. When the mem device is unlocked, cpu_cache_invalidate_memregion() is called in order to invalidate all CPU caches before attempting to access the mem device. See CXL rev3.0 spec section 8.2.9.8.6.4 for reference. Reviewed-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983614167.2734609.15124543712487741176.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/mbox.c | 1 + drivers/cxl/cxlmem.h | 1 + drivers/cxl/security.c | 27 +++++++++++++++++++++++++++ include/uapi/linux/cxl_mem.h | 1 + 4 files changed, 30 insertions(+) commit 410926e9d79b4aba516a6677f88e0c35cbbd5b04 Author: Dave Jiang Date: Wed Nov 30 12:22:16 2022 -0700 tools/testing/cxl: Add "Freeze Security State" security opcode support Add support to emulate a CXL mem device support the "Freeze Security State" operation. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983613604.2734609.1960672960407811362.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams tools/testing/cxl/test/mem.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit a072f7b7972fd85bdefefa1d6febec483438d420 Author: Dave Jiang Date: Wed Nov 30 12:22:10 2022 -0700 cxl/pmem: Add "Freeze Security State" security command support Create callback function to support the nvdimm_security_ops() ->freeze() callback. Translate the operation to send "Freeze Security State" security command for CXL memory device. See CXL rev3.0 spec section 8.2.9.8.6.5 for reference. Reviewed-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983613019.2734609.10645754779802492122.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/mbox.c | 1 + drivers/cxl/cxlmem.h | 1 + drivers/cxl/security.c | 10 ++++++++++ include/uapi/linux/cxl_mem.h | 1 + 4 files changed, 13 insertions(+) commit abf0c8380a487d050da58e344635f4e96dd3c467 Author: Dave Jiang Date: Wed Nov 30 12:22:04 2022 -0700 tools/testing/cxl: Add "Disable" security opcode support Add support to emulate a CXL mem device support the "Disable Passphrase" operation. The operation supports disabling of either a user or a master passphrase. The emulation will provide support for both user and master passphrase. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983612447.2734609.2767804273351656413.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams tools/testing/cxl/test/mem.c | 74 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit c4ef680d0b72815003a76074ca1cd872a2fecfc3 Author: Dave Jiang Date: Wed Nov 30 12:21:58 2022 -0700 cxl/pmem: Add Disable Passphrase security command support Create callback function to support the nvdimm_security_ops ->disable() callback. Translate the operation to send "Disable Passphrase" security command for CXL memory device. The operation supports disabling a passphrase for the CXL persistent memory device. In the original implementation of nvdimm_security_ops, this operation only supports disabling of the user passphrase. This is due to the NFIT version of disable passphrase only supported disabling of user passphrase. The CXL spec allows disabling of the master passphrase as well which nvidmm_security_ops does not support yet. In this commit, the callback function will only support user passphrase. See CXL rev3.0 spec section 8.2.9.8.6.3 for reference. Reviewed-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983611878.2734609.10602135274526390127.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/mbox.c | 1 + drivers/cxl/cxlmem.h | 8 ++++++++ drivers/cxl/security.c | 18 ++++++++++++++++++ include/uapi/linux/cxl_mem.h | 1 + 4 files changed, 28 insertions(+) commit 53d2ce6e7869d369d8bbed3bd8a3d2c9758cf7c7 Author: Dave Jiang Date: Wed Nov 30 12:21:53 2022 -0700 tools/testing/cxl: Add "Set Passphrase" opcode support Add support to emulate a CXL mem device supporting the "Set Passphrase" operation. The operation supports setting of either a user or a master passphrase. Reviewed-by: Jonathan Cameron Reviewed-by: Davidlohr Bueso Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983611314.2734609.12996309794483934484.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams tools/testing/cxl/test/mem.c | 88 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit 997469407f266250040f20ec73aecc77ad277145 Author: Dave Jiang Date: Wed Nov 30 12:21:47 2022 -0700 cxl/pmem: Add "Set Passphrase" security command support Create callback function to support the nvdimm_security_ops ->change_key() callback. Translate the operation to send "Set Passphrase" security command for CXL memory device. The operation supports setting a passphrase for the CXL persistent memory device. It also supports the changing of the currently set passphrase. The operation allows manipulation of a user passphrase or a master passphrase. See CXL rev3.0 spec section 8.2.9.8.6.2 for reference. However, the spec leaves a gap WRT master passphrase usages. The spec does not define any ways to retrieve the status of if the support of master passphrase is available for the device, nor does the commands that utilize master passphrase will return a specific error that indicates master passphrase is not supported. If using a device does not support master passphrase and a command is issued with a master passphrase, the error message returned by the device will be ambiguous. Reviewed-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983610751.2734609.4445075071552032091.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/core/mbox.c | 1 + drivers/cxl/cxlmem.h | 15 +++++++++++++++ drivers/cxl/security.c | 22 ++++++++++++++++++++++ include/uapi/linux/cxl_mem.h | 1 + 4 files changed, 39 insertions(+) commit 1fa99be35ab3591fbee99b652c10ac8af131d6ee Author: Dave Jiang Date: Wed Nov 30 12:21:41 2022 -0700 tools/testing/cxl: Add "Get Security State" opcode support Add the emulation support for handling "Get Security State" opcode for a CXL memory device for the cxl_test. The function will copy back device security state bitmask to the output payload. The security state data is added as platform_data for the mock mem device. Reviewed-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983610177.2734609.4953959949148428755.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams tools/testing/cxl/test/mem.c | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) commit fed58c70bb0764dda3085f2b21057e15209b6f9e Author: Peter Maucher Date: Thu Dec 1 16:38:24 2022 +0100 drm/amdgpu: mention RDNA support in docu The amdgpu kernel module has supported RDNA for a while, mention that in the module description. v2: Add CDNA as well (Alex) Signed-off-by: Peter Maucher Signed-off-by: Alex Deucher Documentation/gpu/amdgpu/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 570513ba3a488bff48f65a22384aaf2643d766ad Author: Peter Maucher Date: Thu Dec 1 16:38:20 2022 +0100 drm/amdgpu: improve GART and GTT documentation Document difference between amdgpu.gartsize and amdgpu.gttsize module parameters, as initially explained by Alex Deucher here: https://lists.freedesktop.org/archives/dri-devel/2022-October/375358.html v2: minor cleanups (Alex) Signed-off-by: Peter Maucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2cffcb667921559042fe3025d6d40d2a54f78922 Author: ye xingchen Date: Thu Dec 1 10:24:21 2022 +0800 drm/amdgpu: use sysfs_emit() to instead of scnprintf() Replace the open-code with sysfs_emit() to simplify the code. Reviewed-by: Luben Tuikov Signed-off-by: ye xingchen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 949933b0f34f42af180a9ae59c263fcf4b76b710 Author: Alex Deucher Date: Mon Nov 28 10:38:53 2022 -0500 drm/amd/display: use the proper fb offset for DM This fixes DMCU initialization in APU GPU passthrough. The DMCU needs the GPU physical address, not the CPU physical address. This ends up working out on bare metal because we always use the physical address, but doesn't work in passthrough because the addresses are different. Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 39dd895d05002ddbc69ed90fd1ac254696c79f73 Author: YuBiao Wang Date: Wed Nov 30 17:14:56 2022 +0800 drm/amdgpu: Add nv mailbox irq in soc21 Under virtualization guest needs to receive notification from host to perform reset in some cases. Add nv mailbox irq in soc21. Signed-off-by: YuBiao Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 82132ecc54322c58dd86012ebe9733d6b1f73bea Author: Leo Liu Date: Tue Nov 29 18:53:18 2022 -0500 drm/amdgpu: enable Vangogh VCN indirect sram mode So that uses PSP to initialize HW. Fixes: 0c2c02b66c672e ("drm/amdgpu/vcn: add firmware support for dimgrey_cavefish") Signed-off-by: Leo Liu Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 3 +++ 1 file changed, 3 insertions(+) commit e0cefada1383c5ceb5a35f08369d0d40a6629c18 Author: Tianjia Zhang Date: Thu Dec 1 20:58:19 2022 +0800 fscrypt: Add SM4 XTS/CTS symmetric algorithm support Add support for XTS and CTS mode variant of SM4 algorithm. The former is used to encrypt file contents, while the latter (SM4-CTS-CBC) is used to encrypt filenames. SM4 is a symmetric algorithm widely used in China, and is even mandatory algorithm in some special scenarios. We need to provide these users with the ability to encrypt files or disks using SM4-XTS. Signed-off-by: Tianjia Zhang Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221201125819.36932-3-tianjia.zhang@linux.alibaba.com Documentation/filesystems/fscrypt.rst | 1 + fs/crypto/keysetup.c | 15 +++++++++++++++ fs/crypto/policy.c | 5 +++++ include/uapi/linux/fscrypt.h | 2 ++ 4 files changed, 23 insertions(+) commit c3630df66f95e6c18987734b39f0239303dd72d8 Author: Miguel Ojeda Date: Thu Nov 10 17:41:16 2022 +0100 rust: samples: add `rust_print` example Add example to exercise the printing macros (`pr_*!`) introduced in the previous patches. Reviewed-by: Finn Behrens Reviewed-by: Wei Liu Tested-by: Sergio González Collado Signed-off-by: Miguel Ojeda samples/rust/Kconfig | 10 +++++++++ samples/rust/Makefile | 1 + samples/rust/rust_print.rs | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) commit fc6c7cac83f05f455be1f35160a618e9df103838 Author: Miguel Ojeda Date: Thu Nov 10 17:41:15 2022 +0100 rust: print: add `pr_cont!` macro This level is a bit different from the rest since it does not pass the module name to the `_printk()` call. Thus add a new parameter to the general `print_macro!` to handle it differently. Co-developed-by: Adam Bratschi-Kaye Signed-off-by: Adam Bratschi-Kaye Co-developed-by: Wedson Almeida Filho Signed-off-by: Wedson Almeida Filho Co-developed-by: Gary Guo Signed-off-by: Gary Guo Reviewed-by: Wei Liu Reviewed-by: Sergio González Collado Signed-off-by: Miguel Ojeda rust/kernel/print.rs | 72 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 9 deletions(-) commit 4c7f949906ae2ceb31d71fb235975f1bfa1adb21 Author: Miguel Ojeda Date: Thu Nov 10 17:41:14 2022 +0100 rust: print: add more `pr_*!` levels Currently, only `pr_info!` (for the minimal sample) and `pr_emerg!` (for the panic handler) are there. Add the other levels as new macros, i.e. `pr_alert!`, `pr_crit!`, `pr_err!`, `pr_warn!`, `pr_notice!` and `pr_debug!`. Co-developed-by: Adam Bratschi-Kaye Signed-off-by: Adam Bratschi-Kaye Co-developed-by: Wedson Almeida Filho Signed-off-by: Wedson Almeida Filho Co-developed-by: Gary Guo Signed-off-by: Gary Guo Reviewed-by: Boqun Feng Reviewed-by: Wei Liu Reviewed-by: Sergio Gonzalez Collado Signed-off-by: Miguel Ojeda rust/kernel/prelude.rs | 2 +- rust/kernel/print.rs | 154 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 155 insertions(+), 1 deletion(-) commit 474be445555ba8f2e776b4b6458c310bc215f76b Author: Miguel Ojeda Date: Thu Nov 10 17:41:13 2022 +0100 rust: prelude: split re-exports into groups Split the prelude re-exports into groups: first the ones coming from the `core` crate, then `alloc`, then our own crates and finally the ones from modules from `kernel` itself (i.e. `super`). We are doing this manually for the moment, but ideally, long-term, this could be automated via `rustfmt` with options such as `group_imports` and `imports_granularity` (both currently unstable). Reviewed-by: Boqun Feng Reviewed-by: Wei Liu Signed-off-by: Miguel Ojeda rust/kernel/prelude.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 7d721baea138696d5a6746fb5bce0a510a91bd65 Author: Mark Brown Date: Thu Dec 1 17:07:45 2022 +0000 kselftest/alsa: Add more coverage of sample rates and channel counts Now that we can skip unsupported configurations add some more test cases using that, cover 8kHz, 44.1kHz and 96kHz plus 8kHz mono and 48kHz 6 channel. 44.1kHz is a different clock base to the existing 48kHz tests and may therefore show problems with the clock configuration if only 8kHz based rates are really available (or help diagnose if bad clocking is due to only 44.1kHz based rates being supported). 8kHz mono and 48Hz 6 channel are real world formats and should show if clocking does not account for channel count properly. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221201170745.1111236-7-broonie@kernel.org Signed-off-by: Takashi Iwai tools/testing/selftests/alsa/pcm-test.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit ee12040dd53ac9034a782ed80eb8e8e496c05d9b Author: Mark Brown Date: Thu Dec 1 17:07:44 2022 +0000 kselftest/alsa: Provide more meaningful names for tests Rather than just numbering the tests try to provide semi descriptive names for what the tests are trying to cover. This also has the advantage of meaning we can add more tests without having to keep the list of tests ordered by existing number which should make it easier to understand what we're testing and why. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221201170745.1111236-6-broonie@kernel.org Signed-off-by: Takashi Iwai tools/testing/selftests/alsa/pcm-test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ae95efd9754c2afceca89635dacba29af794a131 Author: Mark Brown Date: Thu Dec 1 17:07:43 2022 +0000 kselftest/alsa: Don't any configuration in the sample config The values in the one example configuration file we currently have are the default values for the two tests we have so there's no need to actually set them. Comment them out as examples, with a rename for the tests so that we can update the tests in the code more easily. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221201170745.1111236-5-broonie@kernel.org Signed-off-by: Takashi Iwai .../alsa/conf.d/Lenovo_ThinkPad_P1_Gen2.conf | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) commit 8370d9b00c929398cc79572a9b584878024ceb59 Author: Mark Brown Date: Thu Dec 1 17:07:42 2022 +0000 kselftest/alsa: Report failures to set the requested channels as skips If constraint selection gives us a number of channels other than the one that we asked for that isn't a failure, that is the device implementing constraints and advertising that it can't support whatever we asked for. Report such cases as a test skip rather than failure so we don't have false positives. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221201170745.1111236-4-broonie@kernel.org Signed-off-by: Takashi Iwai tools/testing/selftests/alsa/pcm-test.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit f944f8b539ea76bd70348bfc35dfa0780e510c0f Author: Mark Brown Date: Thu Dec 1 17:07:41 2022 +0000 kselftest/alsa: Report failures to set the requested sample rate as skips If constraint selection gives us a sample rate other than the one that we asked for that isn't a failure, that is the device implementing sample rate constraints and advertising that it can't support whatever we asked for. Report such cases as a test skip rather than failure so we don't have false positives. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221201170745.1111236-3-broonie@kernel.org Signed-off-by: Takashi Iwai tools/testing/selftests/alsa/pcm-test.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 22eeb8f531c117943a3ef9a75d4d40cdbcc66fb1 Author: Mark Brown Date: Thu Dec 1 17:07:40 2022 +0000 kselftest/alsa: Refactor pcm-test to list the tests to run in a struct In order to help make the list of tests a bit easier to maintain refactor things so we pass the tests around as a struct with the parameters in, enabling us to add new tests by adding to a table with comments saying what each of the number are. We could also use named initializers if we get more parameters. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221201170745.1111236-2-broonie@kernel.org Signed-off-by: Takashi Iwai tools/testing/selftests/alsa/pcm-test.c | 53 ++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 20 deletions(-) commit d209ce353a324601f9d3c1eee43b1f0df53021b3 Author: Tianjia Zhang Date: Thu Dec 1 20:58:18 2022 +0800 blk-crypto: Add support for SM4-XTS blk crypto mode SM4 is a symmetric cipher algorithm widely used in China. The SM4-XTS variant is used to encrypt length-preserving data. This is the mandatory algorithm in some special scenarios. Add support for the algorithm to block inline encryption. This is needed for the inlinecrypt mount option to be supported via blk-crypto-fallback, as it is for the other fscrypt modes. Signed-off-by: Tianjia Zhang Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221201125819.36932-2-tianjia.zhang@linux.alibaba.com block/blk-crypto.c | 6 ++++++ include/linux/blk-crypto.h | 1 + 2 files changed, 7 insertions(+) commit 677b367275f8729546aee918e547056a90dbdc07 Author: Christoph Böhmwalder Date: Thu Dec 1 12:03:50 2022 +0100 drbd: add context parameter to expect() macro Originally-from: Andreas Gruenbacher Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221201110349.1282687-6-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe drivers/block/drbd/drbd_actlog.c | 4 +-- drivers/block/drbd/drbd_bitmap.c | 54 +++++++++++++++--------------- drivers/block/drbd/drbd_main.c | 8 ++--- drivers/block/drbd/drbd_nl.c | 2 +- drivers/block/drbd/drbd_polymorph_printk.h | 4 +-- drivers/block/drbd/drbd_receiver.c | 12 +++---- 6 files changed, 42 insertions(+), 42 deletions(-) commit e3fa02d7d420c7cfb7077cc6eeb62c886ba5ff39 Author: Christoph Böhmwalder Date: Thu Dec 1 12:03:49 2022 +0100 drbd: introduce drbd_ratelimit() Use call site specific ratelimit instead of one single static global. Also ratelimit ASSERTION messages generated by expect(). Originally-from: Lars Ellenberg Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221201110349.1282687-5-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe drivers/block/drbd/drbd_actlog.c | 2 +- drivers/block/drbd/drbd_bitmap.c | 6 +++--- drivers/block/drbd/drbd_int.h | 2 +- drivers/block/drbd/drbd_main.c | 2 +- drivers/block/drbd/drbd_polymorph_printk.h | 10 +++++++++- drivers/block/drbd/drbd_receiver.c | 4 ++-- drivers/block/drbd/drbd_req.c | 6 +++--- drivers/block/drbd/drbd_worker.c | 12 ++++++------ 8 files changed, 26 insertions(+), 18 deletions(-) commit aa034695971124f673d4ccdd39cd7f269904ea86 Author: Christoph Böhmwalder Date: Thu Dec 1 12:03:48 2022 +0100 drbd: introduce dynamic debug Incorporate as many out-of-tree changes as possible without changing the genl API. Over the years, we restructured this several times, and also changed the log format. One breaking change is that DRBD 9 gained "implicit options", like a connection name. This cannot be replayed here without changing the API, so save it for later. Originally-from: Andreas Gruenbacher Originally-from: Philipp Reisner Originally-from: Lars Ellenberg Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221201110349.1282687-4-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe drivers/block/drbd/drbd_polymorph_printk.h | 133 +++++++++++++++++++++-------- 1 file changed, 97 insertions(+), 36 deletions(-) commit 136160c1732e3f86afd70c19ec6d1f5e6f79a7e9 Author: Christoph Böhmwalder Date: Thu Dec 1 12:03:47 2022 +0100 drbd: split polymorph printk to its own file Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221201110349.1282687-3-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe drivers/block/drbd/drbd_int.h | 68 +--------------------------- drivers/block/drbd/drbd_polymorph_printk.h | 72 ++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 67 deletions(-) commit c3f8974198b41965c8f62099ba97f1293561cab2 Author: Christoph Böhmwalder Date: Thu Dec 1 12:03:46 2022 +0100 drbd: unify how failed assertions are logged Unify how failed assertions from D_ASSERT() and expect() are logged. Originally-from: Andreas Gruenbacher Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221201110349.1282687-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe drivers/block/drbd/drbd_int.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3363e0adb3931e987caa6404327b35ea2db231d8 Author: Xueqin Luo Date: Fri Nov 11 13:19:49 2022 +0800 PM: hibernate: Complain about memory map mismatches during resume The system memory map can change over a hibernation-restore cycle due to a defect in the platform firmware, and some of the page frames used by the kernel before hibernation may not be available any more during the subsequent restore which leads to the error below. [ T357] PM: Image loading progress: 0% [ T357] PM: Read 2681596 kbytes in 0.03 seconds (89386.53 MB/s) [ T357] PM: Error -14 resuming [ T357] PM: Failed to load hibernation image, recovering. [ T357] PM: Basic memory bitmaps freed [ T357] OOM killer enabled. [ T357] Restarting tasks ... done. [ T357] PM: resume from hibernation failed (-14) [ T357] PM: Hibernation image not present or could not be loaded. Add an error message to the unpack() function to allow problematic page frames to be identified and the source of the problem to be diagnosed more easily. This can save developers quite a bit of debugging time. Signed-off-by: Xueqin Luo [ rjw: New subject, edited changelog ] Signed-off-by: Rafael J. Wysocki kernel/power/snapshot.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e9ab0b2e680b069437f54bf4076310f636af05e6 Merge: 2551a92214cb f31f7cd9875c Author: Kalle Valo Date: Thu Dec 1 20:03:07 2022 +0200 Merge tag 'iwlwifi-next-for-kalle-2022-11-28' of http://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next This is the second pull request intended for v6.2 It contains two patch-sets sent before with the following content: * iwlwifi EHT adjustments * double-free fix in tx path * iwlmei PLDR flow fixes * iwlmei smatch fixes * a logging data improvement commit 2551a92214cb8140589d06945b38b4ca2ebfe739 Merge: 94b9b9de05b6 f23a0cea8bd6 Author: Kalle Valo Date: Thu Dec 1 19:58:20 2022 +0200 Merge tag 'mt76-for-kvalo-2022-12-01' of https://github.com/nbd168/wireless mt76 patches for 6.2 - fixes - WED support for mt7986 + mt7915 for flow offloading - new driver for the mt7996 wifi-7 chipset commit c4e8720f2eb0c7f59082f41ad73b82e5d3f19f69 Author: Mark Brown Date: Tue Nov 29 21:59:25 2022 +0000 kselftest/arm64: Allow epoll_wait() to return more than one result When everything is starting up we are likely to have a lot of child processes producing output at once. This means that we can reduce overhead a bit by allowing epoll_wait() to return more than one descriptor at once, it cuts down on the number of system calls we need to do which on virtual platforms where the syscall overhead is a bit more noticable and we're likely to have a lot more children active can make a small but noticable difference. On physical platforms the relatively small number of processes being run and vastly improved speeds push the effects of this change into the noise. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221129215926.442895-4-broonie@kernel.org Signed-off-by: Will Deacon tools/testing/selftests/arm64/fp/fp-stress.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 92145d88ce0b216c1b99aaac92fec1f6a7d6ddde Author: Mark Brown Date: Tue Nov 29 21:59:24 2022 +0000 kselftest/arm64: Don't drain output while spawning children Now we hold execution of the stress test programs until all children are started there is no need to drain output while that is happening. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221129215926.442895-3-broonie@kernel.org Signed-off-by: Will Deacon tools/testing/selftests/arm64/fp/fp-stress.c | 8 -------- 1 file changed, 8 deletions(-) commit 98102a2cb7860b4d8226d6c2996f068fb4da5ed5 Author: Mark Brown Date: Tue Nov 29 21:59:23 2022 +0000 kselftest/arm64: Hold fp-stress children until they're all spawned At present fp-stress has a bit of a thundering herd problem since the children it spawns start running immediately, meaning that they can start starving the parent process of CPU before it has even started all the children. This is much more severe on virtual platforms since they tend to support far more SVE and SME vector lengths, be slower in general and for some have issues with performance when simulating multiple CPUs. We can mitigate this problem by having all the child processes block before starting the test program, meaning that we at least have all the child processes started before we start heavily using CPU. We still have the same load issues while waiting for the actual stress test programs to start up and produce output but they're at least all ready to go before that kicks in, resulting in substantial reductions in overall runtime on some of the severely affected systems. One test was showing about 20% improvement. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221129215926.442895-2-broonie@kernel.org Signed-off-by: Will Deacon tools/testing/selftests/arm64/fp/fp-stress.c | 41 +++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit ddfdd530e43fcb3f7a0a69966e5f6c33497b4ae3 Author: Darrick J. Wong Date: Thu Dec 1 09:36:16 2022 -0800 xfs: invalidate xfs_bufs when allocating cow extents While investigating test failures in xfs/17[1-3] in alwayscow mode, I noticed through code inspection that xfs_bmap_alloc_userdata isn't setting XFS_ALLOC_USERDATA when allocating extents for a file's CoW fork. COW staging extents should be flagged as USERDATA, since user data are persisted to these blocks before being remapped into a file. This mis-classification has a few impacts on the behavior of the system. First, the filestreams allocator is supposed to keep allocating from a chosen AG until it runs out of space in that AG. However, it only does that for USERDATA allocations, which means that COW allocations aren't tied to the filestreams AG. Fortunately, few people use filestreams, so nobody's noticed. A more serious problem is that xfs_alloc_ag_vextent_small looks for a buffer to invalidate *if* the USERDATA flag is set and the AG is so full that the allocation had to come from the AGFL because the cntbt is empty. The consequences of not invalidating the buffer are severe -- if the AIL incorrectly checkpoints a buffer that is now being used to store user data, that action will clobber the user's written data. Fix filestreams and yet another data corruption vector by flagging COW allocations as USERDATA. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c25febf23963431686f04874b96321288504127 Author: Guo Xuenan Date: Thu Dec 1 09:36:16 2022 -0800 xfs: get rid of assert from xfs_btree_islastblock xfs_btree_check_block contains debugging knobs. With XFS_DEBUG setting up, turn on the debugging knob can trigger the assert of xfs_btree_islastblock, test script as follows: while true do mount $disk $mountpoint fsstress -d $testdir -l 0 -n 10000 -p 4 >/dev/null echo 1 > /sys/fs/xfs/sda/errortag/btree_chk_sblk sleep 10 umount $mountpoint done Kick off fsstress and only *then* turn on the debugging knob. If it happens that the knob gets turned on after the cntbt lookup succeeds but before the call to xfs_btree_islastblock, then we *can* end up in the situation where a previously checked btree block suddenly starts returning EFSCORRUPTED from xfs_btree_check_block. Kaboom. Darrick give a very detailed explanation as follows: Looking back at commit 27d9ee577dcce, I think the point of all this was to make sure that the cursor has actually performed a lookup, and that the btree block at whatever level we're asking about is ok. If the caller hasn't ever done a lookup, the bc_levels array will be empty, so cur->bc_levels[level].bp pointer will be NULL. The call to xfs_btree_get_block will crash anyway, so the "ASSERT(block);" part is pointless. If the caller did a lookup but the lookup failed due to block corruption, the corresponding cur->bc_levels[level].bp pointer will also be NULL, and we'll still crash. The "ASSERT(xfs_btree_check_block);" logic is also unnecessary. If the cursor level points to an inode root, the block buffer will be incore, so it had better always be consistent. If the caller ignores a failed lookup after a successful one and calls this function, the cursor state is garbage and the assert wouldn't have tripped anyway. So get rid of the assert. Fixes: 27d9ee577dcc ("xfs: actually check xfs_btree_check_block return in xfs_btree_islastblock") Signed-off-by: Guo Xuenan Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_btree.h | 1 - 1 file changed, 1 deletion(-) commit 948961964b2404ea474a3643fc0e1b77c592bb7c Merge: 575689fc0ffa b25d1984aa88 Author: Darrick J. Wong Date: Thu Dec 1 09:35:52 2022 -0800 Merge tag 'maxrefcount-fixes-6.2_2022-12-01' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.2-mergeD xfs: fix broken MAXREFCOUNT handling This series fixes a bug in the refcount code where we don't merge records correctly if the refcount is hovering around MAXREFCOUNT. This fixes regressions in xfs/179 when fsdax is enabled. xfs/179 itself will be modified to exploit the bug through the pagecache path. Signed-off-by: Darrick J. Wong * tag 'maxrefcount-fixes-6.2_2022-12-01' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: estimate post-merge refcounts correctly xfs: hoist refcount record merge predicates commit b25d1984aa884fc91a73a5a407b9ac976d441e9b Author: Darrick J. Wong Date: Wed Nov 30 09:25:51 2022 -0800 xfs: estimate post-merge refcounts correctly Upon enabling fsdax + reflink for XFS, xfs/179 began to report refcount metadata corruptions after being run. Specifically, xfs_repair noticed single-block refcount records that could be combined but had not been. The root cause of this is improper MAXREFCOUNT edge case handling in xfs_refcount_merge_extents. When we're trying to find candidates for a refcount btree record merge, we compute the refcount attribute of the merged record, but we fail to account for the fact that once a record hits rc_refcount == MAXREFCOUNT, it is pinned that way forever. Hence the computed refcount is wrong, and we fail to merge the extents. Fix this by adjusting the merge predicates to compute the adjusted refcount correctly. Fixes: 3172725814f9 ("xfs: adjust refcount of an extent of blocks in refcount btree") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Xiao Yang fs/xfs/libxfs/xfs_refcount.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 9d720a5a658f5135861773f26e927449bef93d61 Author: Darrick J. Wong Date: Wed Nov 30 09:25:51 2022 -0800 xfs: hoist refcount record merge predicates Hoist these multiline conditionals into separate static inline helpers to improve readability and set the stage for corruption fixes that will be introduced in the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Xiao Yang fs/xfs/libxfs/xfs_refcount.c | 129 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 113 insertions(+), 16 deletions(-) commit acb3f4bc2108dca531f81233383e21f0bdc02267 Author: Will Deacon Date: Thu Dec 1 17:31:12 2022 +0000 arm64/sysreg: Remove duplicate definitions from asm/sysreg.h With the new-fangled generation of asm/sysreg-defs.h, some definitions have ended up being duplicated between the two files. Remove these duplicate definitions, and consolidate the naming for GMID_EL1_BS_WIDTH. Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 6 ------ arch/arm64/lib/mte.S | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) commit da46ee19cbd8344d6860816b4827a7ce95764867 Author: Yang Yingliang Date: Thu Dec 1 20:27:05 2022 +0800 regulator: core: fix module refcount leak in set_supply() If create_regulator() fails in set_supply(), the module refcount needs be put to keep refcount balanced. Fixes: e2c09ae7a74d ("regulator: core: Increase refcount for regulator supply's module") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221201122706.4055992-2-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/regulator/core.c | 1 + 1 file changed, 1 insertion(+) commit 91bf30a42b16257f98345c9ba519d72babbbaf8a Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:16 2022 +0100 ARM: dts: sti: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: stih407-b2120.dtb: leds: 'green', 'red' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20221125144116.476877-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/stih410-b2260.dts | 8 ++++---- arch/arm/boot/dts/stih418-b2199.dts | 4 ++-- arch/arm/boot/dts/stih418-b2264.dts | 2 +- arch/arm/boot/dts/stihxxx-b2120.dtsi | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) commit 37dddd7f7621bd5e0234fb3b8288248f165833b4 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:18 2022 +0100 ARM: dts: am335x: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: am335x-baltos-ir2110.dtb: leds: 'app', 'power', 'wlan' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20221125144118.476905-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/am335x-baltos-leds.dtsi | 6 +++--- arch/arm/boot/dts/am335x-pocketbeagle.dts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit e920bcac0ec64b3010438d38724cefce361f7c3a Author: Krzysztof Kozlowski Date: Sun Nov 27 21:30:34 2022 +0100 ARM: dts: omap: echo: use preferred enable-gpios for LP5523 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: omap3-echo.dtb: lp5523A@32: 'enable-gpio' does not match any of the regexes: '^led@[0-8]$', '^multi-led@[0-8]$', 'pinctrl-[0-9]+' Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20221127203034.54092-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/omap3-echo.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95a45c667635d50de9beb3c5f5b3046dfa395bff Author: Krzysztof Kozlowski Date: Sun Nov 27 21:30:33 2022 +0100 ARM: dts: omap: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: omap3-beagle-ab4.dtb: leds: 'heartbeat', 'mmc', 'pmu_stat' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20221127203034.54092-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/omap3-beagle.dts | 6 +++--- arch/arm/boot/dts/omap3-devkit8000-common.dtsi | 8 ++++---- arch/arm/boot/dts/omap3-n900.dts | 2 +- arch/arm/boot/dts/omap3-overo-alto35-common.dtsi | 8 ++++---- arch/arm/boot/dts/omap3-overo-chestnut43-common.dtsi | 4 ++-- arch/arm/boot/dts/omap3-overo-gallop43-common.dtsi | 4 ++-- arch/arm/boot/dts/omap3-overo-palo35-common.dtsi | 4 ++-- arch/arm/boot/dts/omap3-overo-palo43-common.dtsi | 4 ++-- arch/arm/boot/dts/omap3-overo-summit-common.dtsi | 2 +- arch/arm/boot/dts/omap3-overo-tobi-common.dtsi | 2 +- arch/arm/boot/dts/omap4-panda-common.dtsi | 4 ++-- arch/arm/boot/dts/omap4-panda-es.dts | 4 ++-- 12 files changed, 26 insertions(+), 26 deletions(-) commit 0cd4cab6ac67b5ae88511b24d6c1a8c0e61f9f76 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:22 2022 +0100 ARM: dts: logicpd: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: logicpd-torpedo-37xx-devkit.dtb: leds: 'user0' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20221125144122.476962-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9db89b41117024f80b38b15954017fb293133364 Author: Kees Cook Date: Thu Nov 17 15:43:23 2022 -0800 exit: Expose "oops_count" to sysfs Since Oops count is now tracked and is a fairly interesting signal, add the entry /sys/kernel/oops_count to expose it to userspace. Cc: "Eric W. Biederman" Cc: Jann Horn Cc: Arnd Bergmann Reviewed-by: Luis Chamberlain Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221117234328.594699-3-keescook@chromium.org Documentation/ABI/testing/sysfs-kernel-oops_count | 6 ++++++ MAINTAINERS | 1 + kernel/exit.c | 22 ++++++++++++++++++++-- 3 files changed, 27 insertions(+), 2 deletions(-) commit d4ccd54d28d3c8598e2354acc13e28c060961dbb Author: Jann Horn Date: Thu Nov 17 15:43:22 2022 -0800 exit: Put an upper limit on how often we can oops Many Linux systems are configured to not panic on oops; but allowing an attacker to oops the system **really** often can make even bugs that look completely unexploitable exploitable (like NULL dereferences and such) if each crash elevates a refcount by one or a lock is taken in read mode, and this causes a counter to eventually overflow. The most interesting counters for this are 32 bits wide (like open-coded refcounts that don't use refcount_t). (The ldsem reader count on 32-bit platforms is just 16 bits, but probably nobody cares about 32-bit platforms that much nowadays.) So let's panic the system if the kernel is constantly oopsing. The speed of oopsing 2^32 times probably depends on several factors, like how long the stack trace is and which unwinder you're using; an empirically important one is whether your console is showing a graphical environment or a text console that oopses will be printed to. In a quick single-threaded benchmark, it looks like oopsing in a vfork() child with a very short stack trace only takes ~510 microseconds per run when a graphical console is active; but switching to a text console that oopses are printed to slows it down around 87x, to ~45 milliseconds per run. (Adding more threads makes this faster, but the actual oops printing happens under &die_lock on x86, so you can maybe speed this up by a factor of around 2 and then any further improvement gets eaten up by lock contention.) It looks like it would take around 8-12 days to overflow a 32-bit counter with repeated oopsing on a multi-core X86 system running a graphical environment; both me (in an X86 VM) and Seth (with a distro kernel on normal hardware in a standard configuration) got numbers in that ballpark. 12 days aren't *that* short on a desktop system, and you'd likely need much longer on a typical server system (assuming that people don't run graphical desktop environments on their servers), and this is a *very* noisy and violent approach to exploiting the kernel; and it also seems to take orders of magnitude longer on some machines, probably because stuff like EFI pstore will slow it down a ton if that's active. Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20221107201317.324457-1-jannh@google.com Reviewed-by: Luis Chamberlain Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221117234328.594699-2-keescook@chromium.org Documentation/admin-guide/sysctl/kernel.rst | 8 ++++++ kernel/exit.c | 42 +++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit 9360d035a579d95d1e76c471061b9065b18a0eb1 Author: Kees Cook Date: Thu Nov 17 15:43:21 2022 -0800 panic: Separate sysctl logic from CONFIG_SMP In preparation for adding more sysctls directly in kernel/panic.c, split CONFIG_SMP from the logic that adds sysctls. Cc: Petr Mladek Cc: Andrew Morton Cc: tangmeng Cc: "Guilherme G. Piccoli" Cc: Tiezhu Yang Cc: Sebastian Andrzej Siewior Reviewed-by: Luis Chamberlain Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221117234328.594699-1-keescook@chromium.org kernel/panic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 25226df4b9be7f6d5d722af5b75e86e76e5c3a80 Author: Gustavo A. R. Silva Date: Wed Sep 21 13:46:03 2022 -0500 mm/pgtable: Fix multiple -Wstringop-overflow warnings The actual size of the following arrays at run-time depends on CONFIG_X86_PAE. 427 pmd_t *u_pmds[MAX_PREALLOCATED_USER_PMDS]; 428 pmd_t *pmds[MAX_PREALLOCATED_PMDS]; If CONFIG_X86_PAE is not enabled, their final size will be zero (which is technically not a legal storage size in C, but remains "valid" via the GNU extension). In that case, the compiler complains about trying to access objects of size zero when calling functions where these objects are passed as arguments. Fix this by sanity-checking the size of those arrays just before the function calls. Also, the following warnings are fixed by these changes when building with GCC 11+ and -Wstringop-overflow enabled: arch/x86/mm/pgtable.c:437:13: warning: ‘preallocate_pmds.constprop’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=] arch/x86/mm/pgtable.c:440:13: warning: ‘preallocate_pmds.constprop’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=] arch/x86/mm/pgtable.c:462:9: warning: ‘free_pmds.constprop’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=] arch/x86/mm/pgtable.c:455:9: warning: ‘pgd_prepopulate_user_pmd’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=] arch/x86/mm/pgtable.c:464:9: warning: ‘free_pmds.constprop’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=] This is one of the last cases in the ongoing effort to globally enable -Wstringop-overflow. The alternative to this is to make the originally suggested change: make the pmds argument from an array pointer to a pointer pointer. That situation is considered "legal" for C in the sense that it does not have a way to reason about the storage. i.e.: -static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[]) +static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t **pmds) With the above change, there's no difference in binary output, and the compiler warning is silenced. However, with this patch, the compiler can actually figure out that it isn't using the code at all, and it gets dropped: text data bss dec hex filename 8218 718 32 8968 2308 arch/x86/mm/pgtable.o.before 7765 694 32 8491 212b arch/x86/mm/pgtable.o.after So this case (fixing a warning and reducing image size) is a clear win. Additionally drops an old work-around for GCC in the same code. Link: https://github.com/KSPP/linux/issues/203 Link: https://github.com/KSPP/linux/issues/181 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/Yytb67xvrnctxnEe@work arch/x86/mm/pgtable.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 38931d8989b5760b0bd17c9ec99e81986258e4cb Author: Kees Cook Date: Thu Sep 22 13:08:16 2022 -0700 mm: Make ksize() a reporting-only function With all "silently resizing" callers of ksize() refactored, remove the logic in ksize() that would allow it to be used to effectively change the size of an allocation (bypassing __alloc_size hints, etc). Users wanting this feature need to either use kmalloc_size_roundup() before an allocation, or use krealloc() directly. For kfree_sensitive(), move the unpoisoning logic inline. Replace the some of the partially open-coded ksize() in __do_krealloc with ksize() now that it doesn't perform unpoisoning. Adjust the KUnit tests to match the new ksize() behavior. Execution tested with: $ ./tools/testing/kunit/kunit.py run \ --kconfig_add CONFIG_KASAN=y \ --kconfig_add CONFIG_KASAN_GENERIC=y \ --arch x86_64 kasan Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Andrew Morton Cc: Roman Gushchin Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Vincenzo Frascino Cc: linux-mm@kvack.org Cc: kasan-dev@googlegroups.com Acked-by: Vlastimil Babka Acked-by: David Rientjes Enhanced-by: Andrey Konovalov Signed-off-by: Kees Cook mm/kasan/kasan_test.c | 19 +++++++++++++------ mm/slab_common.c | 26 ++++++++++---------------- 2 files changed, 23 insertions(+), 22 deletions(-) commit 0422c34c7d1e1d069afe73f242133f72d75d1eec Author: Tao Zhou Date: Tue Nov 29 11:52:19 2022 +0800 drm/amdgpu: enable VCN RAS poison for VCN v4.0 Configure related registers. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit a6b3b618c0f7abc3f543dd0c57b2b19a770bffec Author: Jack Xiao Date: Tue Nov 29 11:12:32 2022 +0800 drm/amdgpu/mes11: enable reg active poll Enable reg active poll in mes11. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Tested-and-acked-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 1 + 1 file changed, 1 insertion(+) commit 1e7bbdba68baf6af7500dd636f18b6fcce58e945 Author: Jack Xiao Date: Tue Nov 29 11:12:08 2022 +0800 drm/amd/amdgpu: update mes11 api def Update the api def of mes11. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Tested-and-acked-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/mes_v11_api_def.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b52c3de84bd02083f2bbaae130adb243a689dd63 Author: Mikulas Patocka Date: Tue Nov 1 16:54:27 2022 -0400 dm ioctl: fix a couple ioctl codes Change the ioctl codes from DM_DEV_ARM_POLL to DM_DEV_ARM_POLL_CMD and from DM_GET_TARGET_VERSION to DM_GET_TARGET_VERSION_CMD. Note that the "cmd" field of "struct _ioctls" is never used, thus this commit doesn't fix any bug, it just makes the code consistent. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d043f9a1ca929eee76dac940b4ccfb5429e6098f Author: Mikulas Patocka Date: Tue Nov 1 16:54:01 2022 -0400 dm ioctl: a small code cleanup in list_version_get_info No need to modify info->vers if we overwrite it immediately. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19eb1650afeb1aa86151f61900e9e5f1de5d8d02 Author: Luo Meng Date: Wed Nov 30 10:09:45 2022 +0800 dm thin: resume even if in FAIL mode If a thinpool set fail_io while suspending, resume will fail with: device-mapper: resume ioctl on vg-thinpool failed: Invalid argument The thin-pool also can't be removed if an in-flight bio is in the deferred list. This can be easily reproduced using: echo "offline" > /sys/block/sda/device/state dd if=/dev/zero of=/dev/mapper/thin bs=4K count=1 dmsetup suspend /dev/mapper/pool mkfs.ext4 /dev/mapper/thin dmsetup resume /dev/mapper/pool The root cause is maybe_resize_data_dev() will check fail_io and return error before called dm_resume. Fix this by adding FAIL mode check at the end of pool_preresume(). Cc: stable@vger.kernel.org Fixes: da105ed5fd7e ("dm thin metadata: introduce dm_pool_abort_metadata") Signed-off-by: Luo Meng Signed-off-by: Mike Snitzer drivers/md/dm-thin.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 6b9973861cb2e96dcd0bb0f1baddc5c034207c5c Author: Mike Snitzer Date: Wed Nov 30 14:02:47 2022 -0500 dm cache: set needs_check flag after aborting metadata Otherwise the commit that will be aborted will be associated with the metadata objects that will be torn down. Must write needs_check flag to metadata with a reset block manager. Found through code-inspection (and compared against dm-thin.c). Cc: stable@vger.kernel.org Fixes: 028ae9f76f29 ("dm cache: add fail io mode and needs_check flag") Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 352b837a5541690d4f843819028cf2b8be83d424 Author: Mike Snitzer Date: Wed Nov 30 13:26:32 2022 -0500 dm cache: Fix ABBA deadlock between shrink_slab and dm_cache_metadata_abort Same ABBA deadlock pattern fixed in commit 4b60f452ec51 ("dm thin: Fix ABBA deadlock between shrink_slab and dm_pool_abort_metadata") to DM-cache's metadata. Reported-by: Zhihao Cheng Cc: stable@vger.kernel.org Fixes: 028ae9f76f29 ("dm cache: add fail io mode and needs_check flag") Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 54 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 7 deletions(-) commit 8111964f1b8524c4bb56b02cd9c7a37725ea21fd Author: Zhihao Cheng Date: Wed Nov 30 21:31:34 2022 +0800 dm thin: Fix ABBA deadlock between shrink_slab and dm_pool_abort_metadata Following concurrent processes: P1(drop cache) P2(kworker) drop_caches_sysctl_handler drop_slab shrink_slab down_read(&shrinker_rwsem) - LOCK A do_shrink_slab super_cache_scan prune_icache_sb dispose_list evict ext4_evict_inode ext4_clear_inode ext4_discard_preallocations ext4_mb_load_buddy_gfp ext4_mb_init_cache ext4_read_block_bitmap_nowait ext4_read_bh_nowait submit_bh dm_submit_bio do_worker process_deferred_bios commit metadata_operation_failed dm_pool_abort_metadata down_write(&pmd->root_lock) - LOCK B __destroy_persistent_data_objects dm_block_manager_destroy dm_bufio_client_destroy unregister_shrinker down_write(&shrinker_rwsem) thin_map | dm_thin_find_block ↓ down_read(&pmd->root_lock) --> ABBA deadlock , which triggers hung task: [ 76.974820] INFO: task kworker/u4:3:63 blocked for more than 15 seconds. [ 76.976019] Not tainted 6.1.0-rc4-00011-g8f17dd350364-dirty #910 [ 76.978521] task:kworker/u4:3 state:D stack:0 pid:63 ppid:2 [ 76.978534] Workqueue: dm-thin do_worker [ 76.978552] Call Trace: [ 76.978564] __schedule+0x6ba/0x10f0 [ 76.978582] schedule+0x9d/0x1e0 [ 76.978588] rwsem_down_write_slowpath+0x587/0xdf0 [ 76.978600] down_write+0xec/0x110 [ 76.978607] unregister_shrinker+0x2c/0xf0 [ 76.978616] dm_bufio_client_destroy+0x116/0x3d0 [ 76.978625] dm_block_manager_destroy+0x19/0x40 [ 76.978629] __destroy_persistent_data_objects+0x5e/0x70 [ 76.978636] dm_pool_abort_metadata+0x8e/0x100 [ 76.978643] metadata_operation_failed+0x86/0x110 [ 76.978649] commit+0x6a/0x230 [ 76.978655] do_worker+0xc6e/0xd90 [ 76.978702] process_one_work+0x269/0x630 [ 76.978714] worker_thread+0x266/0x630 [ 76.978730] kthread+0x151/0x1b0 [ 76.978772] INFO: task test.sh:2646 blocked for more than 15 seconds. [ 76.979756] Not tainted 6.1.0-rc4-00011-g8f17dd350364-dirty #910 [ 76.982111] task:test.sh state:D stack:0 pid:2646 ppid:2459 [ 76.982128] Call Trace: [ 76.982139] __schedule+0x6ba/0x10f0 [ 76.982155] schedule+0x9d/0x1e0 [ 76.982159] rwsem_down_read_slowpath+0x4f4/0x910 [ 76.982173] down_read+0x84/0x170 [ 76.982177] dm_thin_find_block+0x4c/0xd0 [ 76.982183] thin_map+0x201/0x3d0 [ 76.982188] __map_bio+0x5b/0x350 [ 76.982195] dm_submit_bio+0x2b6/0x930 [ 76.982202] __submit_bio+0x123/0x2d0 [ 76.982209] submit_bio_noacct_nocheck+0x101/0x3e0 [ 76.982222] submit_bio_noacct+0x389/0x770 [ 76.982227] submit_bio+0x50/0xc0 [ 76.982232] submit_bh_wbc+0x15e/0x230 [ 76.982238] submit_bh+0x14/0x20 [ 76.982241] ext4_read_bh_nowait+0xc5/0x130 [ 76.982247] ext4_read_block_bitmap_nowait+0x340/0xc60 [ 76.982254] ext4_mb_init_cache+0x1ce/0xdc0 [ 76.982259] ext4_mb_load_buddy_gfp+0x987/0xfa0 [ 76.982263] ext4_discard_preallocations+0x45d/0x830 [ 76.982274] ext4_clear_inode+0x48/0xf0 [ 76.982280] ext4_evict_inode+0xcf/0xc70 [ 76.982285] evict+0x119/0x2b0 [ 76.982290] dispose_list+0x43/0xa0 [ 76.982294] prune_icache_sb+0x64/0x90 [ 76.982298] super_cache_scan+0x155/0x210 [ 76.982303] do_shrink_slab+0x19e/0x4e0 [ 76.982310] shrink_slab+0x2bd/0x450 [ 76.982317] drop_slab+0xcc/0x1a0 [ 76.982323] drop_caches_sysctl_handler+0xb7/0xe0 [ 76.982327] proc_sys_call_handler+0x1bc/0x300 [ 76.982331] proc_sys_write+0x17/0x20 [ 76.982334] vfs_write+0x3d3/0x570 [ 76.982342] ksys_write+0x73/0x160 [ 76.982347] __x64_sys_write+0x1e/0x30 [ 76.982352] do_syscall_64+0x35/0x80 [ 76.982357] entry_SYSCALL_64_after_hwframe+0x63/0xcd Function metadata_operation_failed() is called when operations failed on dm pool metadata, dm pool will destroy and recreate metadata. So, shrinker will be unregistered and registered, which could down write shrinker_rwsem under pmd_write_lock. Fix it by allocating dm_block_manager before locking pmd->root_lock and destroying old dm_block_manager after unlocking pmd->root_lock, then old dm_block_manager is replaced with new dm_block_manager under pmd->root_lock. So, shrinker register/unregister could be done without holding pmd->root_lock. Fetch a reproducer in [Link]. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216676 Cc: stable@vger.kernel.org #v5.2+ Fixes: e49e582965b3 ("dm thin: add read only and fail io modes") Signed-off-by: Zhihao Cheng Signed-off-by: Mike Snitzer drivers/md/dm-thin-metadata.c | 51 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 8 deletions(-) commit f23a0cea8bd62f4a348974340bd9e753dc9b2941 Author: Leon Yen Date: Thu Dec 1 18:38:42 2022 +0800 wifi: mt76: mt7921e: add pci .shutdown() support Some combinations of hosts cannnot detect mt7921e after reboot. The interoperability issue is caused by the status mismatch between host and chip fw. In such cases, the driver should stop chip activities and reset chip to default state before reboot. Suggested-by: angelogioacchino.delregno@collabora.com Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Leon Yen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 6a70a90dc1a74aa85598184f5a4c2f14316422b1 Author: Lorenzo Bianconi Date: Thu Dec 1 09:51:55 2022 +0100 wifi: mt76: mt7915: mmio: fix naming convention Rename mt7915_wed_release_rx_buf in mt7915_mmio_wed_release_rx_buf, mt7915_wed_init_rx_buf in mt7915_mmio_wed_init_rx_buf and mt7915_wed_release_rx_buf in mt7915_mmio_wed_release_rx_buf Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit cf6dc2db17fecd0bbae498f12c1b515f0964763b Author: Ryder Lee Date: Thu Dec 1 16:03:32 2022 +0800 wifi: mt76: mt7996: add support to configure spatial reuse parameter set The SPR parameter set comprises OBSS PD threshold for SRG and non SRG and Bitmap of BSS color and partial BSSID. This adds support to configure fields of SPR element to firmware. User can disable firmware SR algorithms by turning sr_scene_detect off. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/main.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 192 ++++++++++++++++++++- drivers/net/wireless/mediatek/mt76/mt7996/mcu.h | 7 + drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 4 +- 4 files changed, 196 insertions(+), 13 deletions(-) commit ea5d99d07fbff328f2ed56733178608fa1add793 Author: Ryder Lee Date: Thu Dec 1 11:44:43 2022 +0800 wifi: mt76: mt7996: enable ack signal support This reports signal strength of ACK packets from the peer as measured at each interface. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/init.c | 7 +++++++ drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 19 ++++++++++++++++++- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 8 ++++++++ drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 17 +++++++++-------- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 5 +++++ drivers/net/wireless/mediatek/mt76/mt7996/regs.h | 17 +++++++++++++---- 6 files changed, 60 insertions(+), 13 deletions(-) commit d75e739bba5957464e0065cae52b3feb78ed9ff9 Author: Ryder Lee Date: Thu Dec 1 11:44:42 2022 +0800 wifi: mt76: mt7996: enable use_cts_prot support This adds selectable RTC/CTS enablement for each interface. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 13 +++++++++++++ drivers/net/wireless/mediatek/mt76/mt7996/main.c | 3 +++ drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 2 ++ 3 files changed, 18 insertions(+) commit 3eb50cc90534376484ee0836d966c75d4c778d5f Author: Ryder Lee Date: Thu Dec 1 11:44:41 2022 +0800 wifi: mt76: mt7915: rely on band_idx of mt76_phy The commit dc44c45c8cd0 added band_idx into mt76_phy, so switching to rely on that. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt7915/debugfs.c | 16 ++- drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 12 +- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c | 14 +- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 150 +++++++++++---------- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 46 ++++--- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 48 ++++--- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 8 +- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 1 - .../net/wireless/mediatek/mt76/mt7915/testmode.c | 49 +++---- 10 files changed, 184 insertions(+), 166 deletions(-) commit e3296759f34752ea2562678706dbb5bf607af530 Author: Ryder Lee Date: Thu Nov 24 03:59:11 2022 +0800 wifi: mt76: mt7915: enable per bandwidth power limit support This power should override the per bandwidth max power that the device emits. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt7915/debugfs.c | 200 ++++++++++++++++++--- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 9 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 7 + 3 files changed, 184 insertions(+), 32 deletions(-) commit 54dd1dc796f7b5ad12e8aa02945cc669bc870591 Author: Ryder Lee Date: Thu Nov 24 03:59:10 2022 +0800 wifi: mt76: mt7915: introduce mt7915_get_power_bound() Add a helper for common boundary check. This is a preliminary patch to add per bandwidth power control. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 12 +++++------- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 12 ++++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) commit 5938196cc188ba4323bc6357f5ac55127d715888 Author: Xiongfeng Wang Date: Fri Nov 25 10:58:31 2022 +0800 mt76: mt7915: Fix PCI device refcount leak in mt7915_pci_init_hif2() As comment of pci_get_device() says, it returns a pci_device with its refcount increased. We need to call pci_dev_put() to decrease the refcount. Save the return value of pci_get_device() and call pci_dev_put() to decrease the refcount. Fixes: 9093cfff72e3 ("mt76: mt7915: add support for using a secondary PCIe link for gen1") Fixes: 2e30db0dde61 ("mt76: mt7915: add device id for mt7916") Signed-off-by: Xiongfeng Wang Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/pci.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit f37f76d43865c58cb96aa13c87164abb41f22d0b Author: Deren Wu Date: Thu Nov 24 22:20:38 2022 +0800 wifi: mt76: do not send firmware FW_FEATURE_NON_DL region skip invalid section to avoid potential risks Fixes: 23bdc5d8cadf ("wifi: mt76: mt7921: introduce Country Location Control support") Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 4 ++++ 1 file changed, 4 insertions(+) commit e5c6bc6f19d8c293f86b347cddab54d5a3830b38 Author: Deren Wu Date: Mon Nov 28 15:04:21 2022 +0800 wifi: mt76: mt7921: Add missing __packed annotation of struct mt7921_clc Add __packed annotation to avoid potential CLC parsing error Fixes: 23bdc5d8cadf ("wifi: mt76: mt7921: introduce Country Location Control support") Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03dd0d49de7db680a856fa566963bb8421f46368 Author: Deren Wu Date: Sun Nov 27 10:35:37 2022 +0800 wifi: mt76: fix coverity overrun-call in mt76_get_txpower() Make sure the nss is valid for nss_delta array. Return zero if the index is invalid. Coverity message: Event overrun-call: Overrunning callee's array of size 4 by passing argument "n_chains" (which evaluates to 15) in call to "mt76_tx_power_nss_delta". int delta = mt76_tx_power_nss_delta(n_chains); Fixes: 07cda406308b ("mt76: fix rounding issues on converting per-chain and combined txpower") Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 98686cd21624c75a043e96812beadddf4f6f48e5 Author: Shayne Chen Date: Tue Nov 22 16:45:46 2022 +0800 wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices The driver first supports Filogic 680 PCI device, which is a Wi-Fi 7 chipset supporting concurrent tri-band operation at 6 GHz, 5 GHz, and 2.4 GHz with 4x4 antennas on each band. Currently, mt7996 only supports tri-band HE or older mode. EHT mode and more variants of Filogic 680 support will be introduced in further patches. Reviewed-by: Ryder Lee Co-developed-by: Peter Chiu Signed-off-by: Peter Chiu Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Co-developed-by: Howard Hsu Signed-off-by: Howard Hsu Co-developed-by: MeiChia Chiu Signed-off-by: MeiChia Chiu Co-developed-by: StanleyYP Wang Signed-off-by: StanleyYP Wang Co-developed-by: Money Wang Signed-off-by: Money Wang Co-developed-by: Evelyn Tsai Signed-off-by: Evelyn Tsai Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/Kconfig | 1 + drivers/net/wireless/mediatek/mt76/Makefile | 1 + drivers/net/wireless/mediatek/mt76/mt7996/Kconfig | 12 + drivers/net/wireless/mediatek/mt76/mt7996/Makefile | 6 + .../net/wireless/mediatek/mt76/mt7996/debugfs.c | 851 +++++ drivers/net/wireless/mediatek/mt76/mt7996/dma.c | 360 ++ drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c | 229 ++ drivers/net/wireless/mediatek/mt76/mt7996/eeprom.h | 75 + drivers/net/wireless/mediatek/mt76/mt7996/init.c | 816 +++++ drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 2468 ++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7996/mac.h | 398 +++ drivers/net/wireless/mediatek/mt76/mt7996/main.c | 1325 ++++++++ drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3429 ++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7996/mcu.h | 662 ++++ drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 385 +++ drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 516 +++ drivers/net/wireless/mediatek/mt76/mt7996/pci.c | 222 ++ drivers/net/wireless/mediatek/mt76/mt7996/regs.h | 533 +++ 18 files changed, 12289 insertions(+) commit f4cfd3f95f297744e03fd494fcc21f3b65b95658 Author: Lorenzo Bianconi Date: Tue Nov 22 14:52:08 2022 +0100 wifi: mt76: mt76x0: remove dead code in mt76x0_phy_get_target_power tx_rate can't be greater than 3 in mt76x0_phy_get_target_power routine for cck rates. Get rid of dead code. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 3 --- 1 file changed, 3 deletions(-) commit 6f917bba8709c1eb73c0ed6201c305975c2cf729 Author: Ryder Lee Date: Tue Nov 22 15:53:12 2022 +0800 wifi: mt76: mt7915: fix band_idx usage The commit 006b9d4ad5bf introduced phy->band_idx to accommodate the band definition change for mt7986 so that the band_idx of main_phy can be 0 or 1. Accordingly, the source of band_idx 1 has switched to "phy != &dev->phy" or "dev->phy.band_idx = 1". We still use ext_phy to represent band 1 somewhere in driver, so fix it. Also, band_idx sounds more reasonable than dbdc_idx, so change it. Fixes: 006b9d4ad5bf ("mt76: mt7915: introduce band_idx in mt7915_phy") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt7915/debugfs.c | 10 +++--- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 13 ++++--- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 36 +++++++++---------- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 40 +++++++++++----------- .../net/wireless/mediatek/mt76/mt7915/testmode.c | 18 +++++----- 5 files changed, 58 insertions(+), 59 deletions(-) commit 66b181b8a9914a26ff424311f5ac19d7ec2199b9 Author: Ryder Lee Date: Tue Nov 22 15:53:11 2022 +0800 wifi: mt76: mt7915: enable .sta_set_txpwr support This adds support for adjusting the Txpower level while pushing traffic to an associated station. The allowed range is from 0 to the maximum power of channel. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 3 + drivers/net/wireless/mediatek/mt76/mt7915/main.c | 34 ++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 94 ++++++++++++++++++++-- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 8 ++ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 4 + 5 files changed, 137 insertions(+), 6 deletions(-) commit bd2404d428215eda4c2466d59a780d568546cdfd Author: Ryder Lee Date: Tue Nov 22 15:53:10 2022 +0800 wifi: mt76: mt7915: add basedband Txpower info into debugfs This helps user to debug Txpower propagation path easily. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c | 19 ++++++++++++++++--- drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 4 ++++ 2 files changed, 20 insertions(+), 3 deletions(-) commit 3dc00ecf242ee3d75aa0b2aebaf65f69eafc8d7d Author: Ryder Lee Date: Fri Nov 18 01:09:47 2022 +0800 wifi: mt76: mt7915: add support to configure spatial reuse parameter set The SPR parameter set comprises OBSS PD threshold for SRG and non SRG and Bitmap of BSS color and partial BSSID. This adds support to configure fields of SPR element to firmware. User can disable firmware SR algorithms by turning sr_scene_detect off. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/main.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 196 +++++++++++++++++++-- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 22 +++ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 4 +- 4 files changed, 207 insertions(+), 21 deletions(-) commit 3a46582c91502df34c81946350344dd70b1c0a90 Author: Ryder Lee Date: Fri Nov 18 01:09:46 2022 +0800 wifi: mt76: mt7915: add missing MODULE_PARM_DESC Add documentation for module_param so that they're visible with modinfo command. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 1 + 1 file changed, 1 insertion(+) commit c6cde7b751ee6fb0d4c2216c2edd9b0b5ffee04d Author: Sujuan Chen Date: Sat Nov 12 16:40:41 2022 +0100 wifi: mt76: mt7915: enable WED RX stats Introduce the capability to report WED RX stats to mac80211. Tested-by: Daniel Golle Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sujuan Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 6 +++++ drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 6 +++++ drivers/net/wireless/mediatek/mt76/mt7915/main.c | 8 +++++++ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 18 +++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 26 ++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 1 + 6 files changed, 65 insertions(+) commit 4f831d18d12da80cec0bebe5b8ca8702a528195a Author: Lorenzo Bianconi Date: Sat Nov 12 16:40:40 2022 +0100 wifi: mt76: mt7915: enable WED RX support Enable RX Wireless Ethernet Dispatch available on MT7986 Soc in oreder to offlad traffic received by WLAN NIC and forwarded to LAN/WAN one. Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 5 +- drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 20 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 4 + drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 293 ++++++++++++++------- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 2 + drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 7 + 6 files changed, 238 insertions(+), 93 deletions(-) commit d1369e515efe6b5d04e9a5f5884106643f7b1d8a Author: Sujuan Chen Date: Sat Nov 12 16:40:39 2022 +0100 wifi: mt76: connac: introduce mt76_connac_mcu_sta_wed_update utility routine This is a preliminary patch to introduce WED RX support for mt7915. Tested-by: Daniel Golle Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sujuan Chen Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 22 ++++++++++++++++++++++ .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 1 + 2 files changed, 23 insertions(+) commit c3137942771eceef923158980b6cccae572e81d1 Author: Sujuan Chen Date: Sat Nov 12 16:40:38 2022 +0100 wifi: mt76: add info parameter to rx_skb signature This is a preliminary patch to introduce WED RX support for mt7915. Tested-by: Daniel Golle Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sujuan Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/dma.c | 8 ++-- drivers/net/wireless/mediatek/mt76/mt76.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7603/dma.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02.h | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 43 +++++++++++++++++++--- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 +- drivers/net/wireless/mediatek/mt76/sdio.c | 2 +- drivers/net/wireless/mediatek/mt76/usb.c | 2 +- 14 files changed, 53 insertions(+), 22 deletions(-) commit 52546e27787ed005413ac622ae9e4c3087100b50 Author: Lorenzo Bianconi Date: Sat Nov 12 16:40:37 2022 +0100 wifi: mt76: add WED RX support to dma queue alloc Introduce the capability to allocate WED RX buffers in mt76_dma_wed_setup routine. Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/dma.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit c601baaf5cd89deda3643beee4b8a57ef151985c Author: Lorenzo Bianconi Date: Sat Nov 12 16:40:36 2022 +0100 wifi: mt76: add WED RX support to mt76_dma_rx_fill Introduce the capability to refill WED RX buffers in mt76_dma_rx_fill utility routine. Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/dma.c | 33 ++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) commit cd372b8c99c5a5cf6a464acebb7e4a79af7ec8ae Author: Lorenzo Bianconi Date: Sat Nov 12 16:40:35 2022 +0100 wifi: mt76: add WED RX support to mt76_dma_{add,get}_buf Introduce the capability to configure RX WED in mt76_dma_{add,get}_buf utility routines. Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/dma.c | 125 ++++++++++++++++++++---------- drivers/net/wireless/mediatek/mt76/mt76.h | 2 + 2 files changed, 88 insertions(+), 39 deletions(-) commit 2666bece0905a3e8ccb792602dbc76a63aaafe4b Author: Sujuan Chen Date: Sat Nov 12 16:40:34 2022 +0100 wifi: mt76: introduce rxwi and rx token utility routines This is a preliminary patch to introduce WED RX support for mt7915. Tested-by: Daniel Golle Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sujuan Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/dma.c | 68 +++++++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/dma.h | 8 ++++ drivers/net/wireless/mediatek/mt76/mac80211.c | 5 ++ drivers/net/wireless/mediatek/mt76/mt76.h | 16 ++++++- drivers/net/wireless/mediatek/mt76/tx.c | 30 ++++++++++++ 5 files changed, 126 insertions(+), 1 deletion(-) commit 7eefb93d4a6fbccd859e538d208c50fd10b44cb7 Author: YN Chen Date: Wed Nov 16 22:43:02 2022 +0800 wifi: mt76: mt7921: fix wrong power after multiple SAR set We should update CLC config before SAR set to synchronize all related settings. Fixes: 23bdc5d8cadf ("wifi: mt76: mt7921: introduce Country Location Control support") Signed-off-by: YN Chen Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/init.c | 1 + drivers/net/wireless/mediatek/mt76/mt7921/main.c | 6 ++++++ drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 ++ 3 files changed, 9 insertions(+) commit a6cf2b65fb5b37aef61f168b676a7ecd1ca85294 Author: Shayne Chen Date: Thu Nov 10 17:35:24 2022 +0800 wifi: mt76: connac: introduce helper for mt7996 chipset Introduce is_mt7996() helper for new chipset. This is a preliminary patch to support mt7996 driver. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac.h | 5 +++++ drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 98f191b1d782f069709a0d77f5980ae83a17a6ab Author: Shayne Chen Date: Thu Nov 10 17:35:23 2022 +0800 wifi: mt76: connac: add more starec command tags Add starec tags which will be used in new chipset. This is a preliminary patch to add mt7996 chipset support. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 ++ 1 file changed, 2 insertions(+) commit 9c402ac1c517907ae375d71dd2fee4703efc8bb4 Author: Shayne Chen Date: Thu Nov 10 17:35:22 2022 +0800 wifi: mt76: connac: add more bss info command tags Add bss info tags which will be used in new chipset. This is a preliminary patch to add mt7996 chipset support. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit ec361f7e415297dc07254e93ac6af1dbce4af87b Author: Shayne Chen Date: Thu Nov 10 17:35:21 2022 +0800 wifi: mt76: connac: introduce unified event table Add event IDs and related bit fields for unified event support. This is a preliminary patch to add mt7996 chipset support. Signed-off-by: Bo Jiao Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 779d34de055eb8b4cdf54d5429a50b560eb88727 Author: Shayne Chen Date: Thu Nov 10 17:35:20 2022 +0800 wifi: mt76: connac: add more unified command IDs Add more unified command IDs which will be used in new chipset. This is the preliminary patch for mt7996 support. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit cade693944ea0799cb5f15168dcc4447401f7d9e Author: Shayne Chen Date: Thu Nov 10 17:35:19 2022 +0800 wifi: mt76: connac: rework fields for larger bandwidth support in sta_rec_bf Rename nrow_bw160 and ncol_bw160 since channel width 320 MHz will share the same field. This is a preliminary patch to add mt7996 chipset support. Signed-off-by: MeiChia Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit 6deaf96ddd0b6894d7f36513d74635b40e337a26 Author: Shayne Chen Date: Thu Nov 10 17:35:18 2022 +0800 wifi: mt76: connac: update struct sta_rec_phy For connac3 generation, max_ampdu_len should be filled in struct sta_rec_phy. This is a preliminary patch to add mt7996 chipset support. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4c07129b05e42a0415ee409bf5958ac62e7e969e Author: Shayne Chen Date: Thu Nov 10 17:35:17 2022 +0800 wifi: mt76: connac: rework macros for unified command Rework some macros for connac3 unified command. This is a preliminary patch to add mt7996 chipset support. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 41ac53c899bd1493a75ab9b52c8f76176b7419e1 Author: Sean Wang Date: Tue Nov 15 08:11:24 2022 +0800 wifi: mt76: mt7921: introduce chanctx support The firmware can have the capability to manage the channel context scheduling on multiple roles running on the device including Station, AP and P2P GC/GO mode (will be extended based on the future patchset) to help users sharing the network with others on a single device. The firmware is able to support the channel chanctx up to 2 interface simultaneously running on the different channels. Another thing to be noted is that before the driver is going sent out the management frames, the driver has to get the privilege from the firmware to occupy the current channel context until the frame handshake is completed and then get the privilege back to the firmware. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/init.c | 33 +++++- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 8 -- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 111 ++++++++++++++++++++- drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 1 + drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 7 ++ drivers/net/wireless/mediatek/mt76/mt7921/sdio.c | 7 ++ drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 7 ++ 7 files changed, 157 insertions(+), 17 deletions(-) commit 034ae28b56f13dc1f2beb3fa294b455f57ede9cb Author: Sean Wang Date: Tue Nov 15 08:11:23 2022 +0800 wifi: mt76: mt7921: introduce remain_on_channel support Introduce remain_on_channel support. Additionally, we add mt7921_check_offload_capability to disable .remain_on_channel and .cancel_remain_on_channel and related configuration because those operations would rely on the fundamental MCU commands that will be only supported with newer firmware. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/init.c | 63 ++++++++++++ drivers/net/wireless/mediatek/mt76/mt7921/main.c | 112 +++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 24 +++++ drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 48 +++++++++ drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 33 ++++-- drivers/net/wireless/mediatek/mt76/mt7921/sdio.c | 23 ++++- drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 12 ++- 7 files changed, 303 insertions(+), 12 deletions(-) commit fe62788b6233df0fe43920e32f30c9583d584117 Author: Sean Wang Date: Fri Nov 11 05:23:47 2022 +0800 wifi: mt76: connac: accept hw scan request at a time The current hw scan cannot accept multiple hw scan requests at a time, we return the proper error code when the hw scan is still undergoing. Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 3 +++ 1 file changed, 3 insertions(+) commit 98678fc03c9599be3bac7a1e253d2697b3a26624 Author: Sean Wang Date: Fri Nov 11 05:23:46 2022 +0800 wifi: mt76: mt7921: drop ieee80211_[start, stop]_queues in driver The firmware would be in charge of braking and continuing the traffic while the channel contexts are switching between different BSS and HW SCAN in the background. Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 5b55b6da982c974fca3e521edb239163d133834f Author: Quan Zhou Date: Fri Nov 11 05:23:45 2022 +0800 wifi: mt76: mt7921: add unified ROC cmd/event support Add unified ROC cmd/event which is only supported by the newer fw. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Co-developed-by: Deren Wu Signed-off-by: Deren Wu Co-developed-by: Kaikai Hu Signed-off-by: Kaikai Hu Signed-off-by: Quan Zhou Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 10 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 119 +++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 19 ++++ 3 files changed, 146 insertions(+), 2 deletions(-) commit a0ab9c3160dfafece67ed39f43f35f533eeea428 Author: Sean Wang Date: Fri Nov 11 05:23:44 2022 +0800 wifi: mt76: mt7921: add chanctx parameter to mt76_connac_mcu_uni_add_bss signature Add a chanctx parameter to mt76_connac_mcu_uni_add_bss signature to allow the firmware binds the BSS into the specific channel context. Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 7 ++++--- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 3 ++- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 10 ++++++---- 5 files changed, 14 insertions(+), 10 deletions(-) commit c1eab2418fa44164a74448e62a5967f1e813e063 Author: Sean Wang Date: Fri Nov 11 05:23:43 2022 +0800 wifi: mt76: connac: add mt76_connac_mcu_uni_set_chctx add mt76_connac_mcu_uni_set_chctx to set up the channel context per BSS in the firmware Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 147 +++++++++++---------- .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 3 + 2 files changed, 82 insertions(+), 68 deletions(-) commit bd5dac7ced5a7c9faa4dc468ac9560c3256df845 Author: Lorenzo Bianconi Date: Thu Oct 13 21:07:37 2022 +0200 wifi: mt76: do not run mt76u_status_worker if the device is not running Fix the following NULL pointer dereference avoiding to run mt76u_status_worker thread if the device is not running yet. KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 PID: 98 Comm: kworker/u2:2 Not tainted 5.14.0+ #78 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 Workqueue: mt76 mt76u_tx_status_data RIP: 0010:mt76x02_mac_fill_tx_status.isra.0+0x82c/0x9e0 Code: c5 48 b8 00 00 00 00 00 fc ff df 80 3c 02 00 0f 85 94 01 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 34 24 4c 89 f2 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 89 01 00 00 41 8b 16 41 0f b7 RSP: 0018:ffffc900005af988 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffffc900005afae8 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff832fc661 RDI: ffffc900005afc2a RBP: ffffc900005afae0 R08: 0000000000000001 R09: fffff520000b5f3c R10: 0000000000000003 R11: fffff520000b5f3b R12: ffff88810b6132d8 R13: 000000000000ffff R14: 0000000000000000 R15: ffffc900005afc28 FS: 0000000000000000(0000) GS:ffff88811aa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa0eda6a000 CR3: 0000000118f17000 CR4: 0000000000750ef0 PKRU: 55555554 Call Trace: mt76x02_send_tx_status+0x1d2/0xeb0 mt76x02_tx_status_data+0x8e/0xd0 mt76u_tx_status_data+0xe1/0x240 process_one_work+0x92b/0x1460 worker_thread+0x95/0xe00 kthread+0x3a1/0x480 ret_from_fork+0x1f/0x30 Modules linked in: --[ end trace 8df5d20fc5040f65 ]-- RIP: 0010:mt76x02_mac_fill_tx_status.isra.0+0x82c/0x9e0 Code: c5 48 b8 00 00 00 00 00 fc ff df 80 3c 02 00 0f 85 94 01 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 34 24 4c 89 f2 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 89 01 00 00 41 8b 16 41 0f b7 RSP: 0018:ffffc900005af988 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffffc900005afae8 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff832fc661 RDI: ffffc900005afc2a RBP: ffffc900005afae0 R08: 0000000000000001 R09: fffff520000b5f3c R10: 0000000000000003 R11: fffff520000b5f3b R12: ffff88810b6132d8 R13: 000000000000ffff R14: 0000000000000000 R15: ffffc900005afc28 FS: 0000000000000000(0000) GS:ffff88811aa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa0eda6a000 CR3: 0000000118f17000 CR4: 0000000000750ef0 PKRU: 55555554 Moreover move stat_work schedule out of the for loop. Reported-by: Dokyung Song Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/usb.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit fa67120bc8c78e66bc23d385e6dfbc1de6c25134 Author: Evelyn Tsai Date: Fri Nov 11 15:36:15 2022 +0800 wifi: mt76: connac: update nss calculation in txs The hardware reports the number of transmitting antennas not the actual number of spatial streams Co-developed-by: Peter Chiu Signed-off-by: Peter Chiu Signed-off-by: Evelyn Tsai Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 510ef2269428f87146ad5076229994d8e05b8193 Author: Nicolas Cavallari Date: Thu Nov 10 16:39:53 2022 +0100 wifi: mt76: mt7915: don't claim 160MHz support with mt7915 DBDC The hardware simply does not support this in DBDC mode. Remove it from the HE capabilities. Signed-off-by: Nicolas Cavallari Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 47 ++++++++++++++++-------- 1 file changed, 31 insertions(+), 16 deletions(-) commit d44f5bca5166b5de65580c5854c3255e5980f6ad Author: Nicolas Cavallari Date: Thu Nov 10 16:39:52 2022 +0100 wifi: mt76: mt7915: Fix VHT beamforming capabilities with DBDC Do not hardcode beamformee 4 space-time streams support, because DBDC can only support up to 2. Fixes: 00b2e16e0063 ("mt76: mt7915: add TxBF capabilities") Signed-off-by: Nicolas Cavallari Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit de147cc28985a2a09e5d6d179fc5ef59b22fc058 Author: Nicolas Cavallari Date: Thu Nov 10 16:39:51 2022 +0100 wifi: mt76: mt7915: Fix chainmask calculation on mt7915 DBDC mt7915 does not have a per-band number of chains unlike the other chips, it only has a total number of chains. Yet the current code would consider the total number as a per-band number. For example, it would report that a 2x2 + 2x2 DBDC card have 4 chains on each band and set chainmask to 0b1111 for the first interface and 0b11110000 for the second. Fixes: 99ad32a4ca3a ("mt76: mt7915: add support for MT7986") Co-developed-by: Felix Fietkau Signed-off-by: Nicolas Cavallari Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c | 1 + 1 file changed, 1 insertion(+) commit 4dbcb9125cc3e10a6d879c10e4f5816d05a87c49 Author: Ryder Lee Date: Thu Nov 10 04:36:34 2022 +0800 wifi: mt76: mt7915: enable coredump support Host triggered and catastrophic event triggered firmware core dumping for basic firmware issues triage, including state reporting, task/irq info, function calltrace and MCU memory dump. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/Kconfig | 1 + drivers/net/wireless/mediatek/mt76/mt7915/Makefile | 3 +- .../net/wireless/mediatek/mt76/mt7915/coredump.c | 410 +++++++++++++++++++++ .../net/wireless/mediatek/mt76/mt7915/coredump.h | 136 +++++++ drivers/net/wireless/mediatek/mt76/mt7915/init.c | 12 +- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 73 +++- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 59 ++- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 22 ++ drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 34 +- 9 files changed, 742 insertions(+), 8 deletions(-) commit b662b71ac3cccb50e9a45aae194591fc50e433ce Author: Ryder Lee Date: Thu Nov 10 04:36:33 2022 +0800 wifi: mt76: mt7915: add full system reset into debugfs Trigger firmware crash and enable full system recovery through debugfs. This also renames knob "fw_ser" to a clear-cut name "sys_recovery". Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt7915/debugfs.c | 81 ++++++++++++++++++---- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 5 ++ drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 2 + drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 2 + drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 4 ++ 5 files changed, 80 insertions(+), 14 deletions(-) commit 8a55712d124fd8a919e8a69b70643e1a97280b4b Author: Bo Jiao Date: Thu Nov 10 04:36:32 2022 +0800 wifi: mt76: mt7915: enable full system reset support Add mt7915_reset() and refactor mt7915_mac_reset_work() to support full system recovery. Co-developed-by: Ryder Lee Signed-off-by: Ryder Lee Signed-off-by: Bo Jiao Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 11 +- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 211 ++++++++++++++++++++- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 18 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 24 ++- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 7 +- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 15 +- drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 4 + 7 files changed, 264 insertions(+), 26 deletions(-) commit d493bb5b9d98cbbd37eda1619ae56a626298c8e3 Author: Bo Jiao Date: Thu Nov 10 04:36:31 2022 +0800 wifi: mt76: mt7915: rework mt7915_dma_reset() Reuse mt7915_dma_disable() to reduce duplicated code. This is a preliminary patch to enable full system reset. Co-developed-by: Ryder Lee Signed-off-by: Ryder Lee Signed-off-by: Bo Jiao Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 110 +++++++++++++++++---- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 69 +------------ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 1 + 3 files changed, 91 insertions(+), 89 deletions(-) commit d107501ae881c20c1c822c8080a645f73a042c68 Author: Lorenzo Bianconi Date: Wed Nov 2 23:29:15 2022 +0100 wifi: mt76: move aggr_stats array in mt76_phy Move aggregation stats array per-phy instead of share it between multiple interfaces. This is a preliminary patch to add mt7996 driver support. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7603/debugfs.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c | 6 ++---- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 9 ++++----- .../net/wireless/mediatek/mt76/mt76x02_debugfs.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c | 5 ++--- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 21 ++++++++------------- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 5 ++--- drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 10 +++++----- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +- 13 files changed, 35 insertions(+), 45 deletions(-) commit 1b9ba30ec265c38aaef94a7c93f3f0c8f3aff3e4 Author: Lorenzo Bianconi Date: Wed Nov 2 23:29:14 2022 +0100 wifi: mt76: mt7615: rely on mt7615_phy in mt7615_mac_reset_counters This is a preliminary patch to move aggr_stats array in mt76_phy structure. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 8 +++----- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) commit 028b4f22b37b88821fd87b56ce47b180583c774e Author: Lorenzo Bianconi Date: Wed Nov 2 13:46:50 2022 +0100 wifi: mt76: mt7921: fix reporting of TX AGGR histogram Similar to mt7915, fix stats clash between bins [4-7] in 802.11 tx aggregation histogram. Fixes: 163f4d22c118d ("mt76: mt7921: add MAC support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 528d13e7f033b54d50e0077922dd52f005d648cf Author: Lorenzo Bianconi Date: Wed Nov 2 13:35:01 2022 +0100 wifi: mt76: mt7915: fix reporting of TX AGGR histogram Fix stats clash between bins [4-7] in 802.11 tx aggregation histogram. Fixes: e57b7901469fc ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e34235ccc5e378a234157ba4142f396c9662b985 Author: Ryder Lee Date: Tue Oct 25 08:31:01 2022 +0800 wifi: mt76: mt7615: enable use_cts_prot support This adds selectable RTC/CTS enablement for each interface. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 15 +++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7615/main.c | 3 +++ drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 2 ++ drivers/net/wireless/mediatek/mt76/mt7615/regs.h | 2 ++ 4 files changed, 22 insertions(+) commit 150b91419d3dee828cf23a6aa7b24925b2783cea Author: Ryder Lee Date: Tue Oct 25 08:31:00 2022 +0800 wifi: mt76: mt7915: enable use_cts_prot support This adds selectable RTC/CTS enablement for each interface. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 13 +++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/main.c | 3 +++ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 2 ++ 3 files changed, 18 insertions(+) commit df2632b3cea3524f4bb20246346f9e729873dc0f Author: Ming Yen Hsieh Date: Mon Oct 24 20:45:08 2022 +0800 wifi: mt76: fix bandwidth 80MHz link fail in 6GHz band Due to information missing, the firmware may be fail on bandwidth related settings in mt7921/mt7922. Add new cmd STA_REC_HE_V2 to apply additional capabilities in 6GHz band. Tested-by: Ben Greear Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Ming Yen Hsieh Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 34 ++++++++++++++++++++++ .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 11 +++++++ 2 files changed, 45 insertions(+) commit a71b648e352787db13184b9355c0b3ffc8a0824a Author: Ryder Lee Date: Fri Oct 14 10:57:48 2022 +0800 wifi: mt76: mt7915: add ack signal support This reports signal strength of ACK packets from the peer as measured at each interface. Tested-by: Shurong Wen Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 9 ++++----- drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/mt7915/init.c | 7 +++++++ drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 19 ++++++++++++++++++- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 8 ++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 6 +++++- drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 8 ++++++++ 7 files changed, 51 insertions(+), 7 deletions(-) commit b0bfa00595be6883a139a0b3a96c9c3d62874624 Author: Ryder Lee Date: Fri Oct 14 10:57:47 2022 +0800 wifi: mt76: mt7915: improve accuracy of time_busy calculation The MIB INFO command is fetching MIB_BUSY_TIME, MIB_TX_TIME, MIB_RX_TIME and MIB_OBSS_AIRTIME from the radio and filling out cc_busy, cc_tx, cc_bss_rx and cc_rx respectively. busy should be >= tx + rx >= tx + bss_rx but we don’t always quite see this. Sometimes tx + rx is a bit higher than busy due to inaccurate accounting, so this patch recalculates numbers to make them more reasonable. Reported-By: Kevin Schneider Tested-by: Kevin Schneider Tested-by: Chad Monroe Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 17 ++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 35 +++++++++++++++++------- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 8 ++++-- drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 14 ++++++++++ 4 files changed, 61 insertions(+), 13 deletions(-) commit 5b0fb852237622bd4f48e80079216107c2b9fc1c Author: Ben Greear Date: Sat Oct 1 07:19:20 2022 -0700 Revert "mt76: use IEEE80211_OFFLOAD_ENCAP_ENABLED instead of MT_DRV_AMSDU_OFFLOAD" This reverts commit f17f4864504d754bcbf31e4c89412cdf9946c409 and adds the MT_DRV_AMSDU_OFFLOAD flag for MT7921 USB/SDIO The reverted commit significantly decreases performance when running a test where two MT7915 radios have 16 station vdevs each, configured for AC mode, and transmitting UDP traffic to AP. Co-developed-by: Felix Fietkau Reported-by: Carson Vandegriffe Signed-off-by: Ben Greear Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 8 ++++++-- drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt7921/sdio.c | 1 + drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 3 ++- 6 files changed, 14 insertions(+), 5 deletions(-) commit eebb70976be5054feff92bc6b96174f1cf342a32 Author: Lorenzo Bianconi Date: Wed Sep 28 11:19:43 2022 +0200 wifi: mt76: mt7915: enable wed for mt7986-wmac chipset Enable WED tx support for mt7986-wmac chipset available on mt7986 board. Tested-by: Daniel Golle Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 74 ++++++++++++++++------ drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 67 ++++++++++++++------ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 4 +- drivers/net/wireless/mediatek/mt76/mt7915/pci.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 17 +++-- drivers/net/wireless/mediatek/mt76/mt7915/soc.c | 21 ++++-- 8 files changed, 134 insertions(+), 55 deletions(-) commit b7ebf46e2526c860d46f98ab93cab547069461f6 Author: Lorenzo Bianconi Date: Wed Sep 28 11:19:42 2022 +0200 wifi: mt76: mt7915: enable wed for mt7986 chipset Introduce wed tx support for MT7986 chipset Tested-by: Daniel Golle Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 1 + drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 11 +++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 8 ++++++++ 3 files changed, 20 insertions(+) commit 5498cee3c84f117286f70c687a9e78e7aa137f4e Author: Lorenzo Bianconi Date: Wed Sep 28 11:19:41 2022 +0200 wifi: mt76: mt7915: move wed init routines in mmio.c This is a preliminary patch to enable wed support for mt7986-wmac chipset. Tested-by: Daniel Golle Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 91 +++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 2 + drivers/net/wireless/mediatek/mt76/mt7915/pci.c | 93 +--------------------- 3 files changed, 94 insertions(+), 92 deletions(-) commit 0c881dc08fd71ca2673f31a64989fbb28eac26f4 Author: Ryder Lee Date: Sat Oct 1 09:42:44 2022 +0800 wifi: mt76: mt7915: fix mt7915_mac_set_timing() Correct mac timiing settings for different hardware generations. This improves 40-60Mbps performance. Fixes: 9aac2969fe5f ("mt76: mt7915: update mac timing settings") Reported-By: Carson Vandegriffe Tested-by: Chad Monroe Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 7a12e06dacdcf2db82e11d6be42e66e366b467d6 Author: Shayne Chen Date: Fri Sep 30 23:13:15 2022 +0800 wifi: mt76: mt7915: set correct antenna for radar detection on MT7915D For MT7915D, correct antenna index should be set to let DFS radar detection work on the 5 GHz band. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 15 +++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 1 + 2 files changed, 16 insertions(+) commit 7a9a957b2be6e894d7d207d987c343b566d71b1d Author: Shayne Chen Date: Fri Sep 30 23:13:14 2022 +0800 wifi: mt76: mt7915: add spatial extension index support In previous, we only allow user to configure tx antenna mask contiguously (e.g. 0x3, 0xf). This patch allows user to configure tx antenna mask interleavingly (e.g. 0x5, 0x8). By setting proper antenna mask and nss, user can prioritized the signal of different antennas, which helps to test their performance in normal mode. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/main.c | 3 --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 20 +++++++++++++++++++- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 1 + drivers/net/wireless/mediatek/mt76/mt7915/testmode.c | 4 +--- 4 files changed, 21 insertions(+), 7 deletions(-) commit faf2e7b5de08acd296bd12cfa20a32b92a8170cf Author: Shayne Chen Date: Fri Sep 30 23:13:13 2022 +0800 wifi: mt76: connac: introduce mt76_connac_spe_idx() Add mt76_connac_spe_idx() for antenna mask to spatial extension index conversion. This is used to support flexible control of tx antenna. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac.h | 11 +++++++++++ drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 11 ++++++++--- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) commit b61699d2cd5692cd8c366409c4715b2a1e0ff1af Author: Shayne Chen Date: Fri Sep 30 23:13:12 2022 +0800 wifi: mt76: mt7915: rework testmode tx antenna setting Let the configuration of testmode antenna mask on both band0 and band1 become antenna_mask rather than chainmask. This could simplify the settings for user and get rid of the conversion when sending fw command. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 7 +------ drivers/net/wireless/mediatek/mt76/mt7915/testmode.c | 18 ++++++++---------- 2 files changed, 9 insertions(+), 16 deletions(-) commit ee0863aecdecbd9035cf45acb8017bce67fc835c Author: Peter Chiu Date: Fri Sep 30 23:13:11 2022 +0800 wifi: mt76: mt7915: deal with special variant of mt7916 A variant of mt7916 supports up to 3 tx/rx paths but with only 2 spatial streams. An example usage of the 3rd path is to server as an auxiliary for beamforming. In order to deal with this case, this patch reworks some parts to correctly use paths or streams. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 37 ++++++++++++------------ drivers/net/wireless/mediatek/mt76/mt7915/main.c | 11 +++---- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 16 +++++----- 3 files changed, 32 insertions(+), 32 deletions(-) commit a7ec8bcf00034ce84d4c9a15dffd7577fbed4db2 Author: Shayne Chen Date: Fri Sep 30 23:13:10 2022 +0800 wifi: mt76: mt7915: rework eeprom tx paths and streams init Rework tx paths and streams init part to improve readability, and make sure that the available tx streams should be smaller than or equal to the available tx paths. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c | 57 +++++++++------------- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h | 5 -- 2 files changed, 23 insertions(+), 39 deletions(-) commit 7624ffcd4edf2668e6db90f39c7343967a94c88f Author: Evelyn Tsai Date: Fri Sep 30 22:14:41 2022 +0800 wifi: mt76: mt7915: reserve 8 bits for the index of rf registers The value of regidx of rf registers is combined with WF selection and offset. Extend the WF selection field from 4 to 8 bits since the adie index should also be specified. Signed-off-by: Evelyn Tsai Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2b685ba7d4247d7707af795719f4f33c9019feb6 Author: Ben Greear Date: Thu Sep 29 08:15:25 2022 -0700 wifi: mt76: mt7915: fix bounds checking for tx-free-done command According to the tx-free-done documentation, the DW4 can be repeated, so have to be more careful about how we test for walking off the end of the array. Signed-off-by: Ben Greear Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 03c2dd4d01a20edbadee408a622dee5e8a27f1e6 Author: Gaosheng Cui Date: Thu Sep 22 15:47:11 2022 +0800 wifi: mt76: Remove unused inline function mt76_wcid_mask_test() All uses of mt76_wcid_mask_test() have been removed since commit 8950a62f19c9 ("mt76: get rid of mt76_wcid_hw routine"), so remove it. Signed-off-by: Gaosheng Cui Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/util.h | 6 ------ 1 file changed, 6 deletions(-) commit c256ba6b1909f28b517274282b6845567e974143 Author: Sean Wang Date: Sat Sep 17 06:46:45 2022 +0800 wifi: mt76: mt7921: fix antenna signal are way off in monitor mode Group 3 in RxD is disabled in monitor mode. We should use the group 5 in RxD instead to fix antenna signal way off issue, e.g we would see the incorrect antenna signal value in wireshark. On the other hand, Group 5 wouldn't be used in STA or AP mode, so the patch shouldn't cause any harm to those modes. Fixes: cbaa0a404f8d ("mt76: mt7921: fix up the monitor mode") Reported-by: Adrian Granados Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 32 ++++++++++++++++--------- 1 file changed, 21 insertions(+), 11 deletions(-) commit ba45841ca5eb29245f9c9f452a39586d9d68bc12 Author: Felix Fietkau Date: Wed Sep 28 11:29:45 2022 +0200 wifi: mt76: mt76x02: simplify struct mt76x02_rate_power - remove stbc, because mt76x0 doesn't support it and mt76x2 uses the same values as HT/VHT - reduce vht array to 2 elements, because VHT MCS0-7 are the same as HT Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c | 24 ++++++---------------- drivers/net/wireless/mediatek/mt76/mt76x02.h | 5 ++--- .../net/wireless/mediatek/mt76/mt76x02_debugfs.c | 2 -- .../net/wireless/mediatek/mt76/mt76x02_eeprom.h | 2 -- drivers/net/wireless/mediatek/mt76/mt76x02_phy.c | 14 ++++++------- drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c | 14 +------------ 7 files changed, 17 insertions(+), 46 deletions(-) commit b376d96362d815331dff0c498a338ebe4c8c5bde Author: Felix Fietkau Date: Wed Sep 28 10:49:11 2022 +0200 wifi: mt76: move mt76_rate_power from core to mt76x02 driver code Its layout and code is mt76x02 specific Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/debugfs.c | 19 ------------------- drivers/net/wireless/mediatek/mt76/mt76.h | 15 --------------- drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.h | 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 10 +++++----- drivers/net/wireless/mediatek/mt76/mt76x02.h | 15 +++++++++++++++ drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c | 19 +++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt76x02_phy.c | 8 ++++---- drivers/net/wireless/mediatek/mt76/mt76x02_phy.h | 6 +++--- drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c | 12 ++++++------ drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.h | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2/init.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2/phy.c | 6 +++--- 15 files changed, 62 insertions(+), 62 deletions(-) commit 3e895a6460ec38edca956a5202c252bbbd37576b Author: Hector Martin Date: Tue May 3 00:08:56 2022 +0900 arm64: dts: apple: Add CPU topology & cpufreq nodes for t8103 Add the missing CPU topology/capacity information and the cpufreq nodes, so we can have CPU frequency scaling and the scheduler has the information it needs to make the correct decisions. Boost states are commented out, as they are not yet available (that requires CPU deep sleep support, to be eventually done via PSCI). The driver supports them fine; the hardware will just refuse to ever go into them at this time, so don't expose them to users until that's done. Acked-by: Marc Zyngier Acked-by: Viresh Kumar Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t8103.dtsi | 204 +++++++++++++++++++++++++++++++++-- 1 file changed, 194 insertions(+), 10 deletions(-) commit d1a8368d66976ed9cb270bc1c62b79b8727e31a0 Author: Hector Martin Date: Mon May 2 23:21:00 2022 +0900 dt-bindings: cpufreq: apple,soc-cpufreq: Add binding for Apple SoC cpufreq This binding represents the cpufreq/DVFS hardware present in Apple SoCs. The hardware has an independent controller per CPU cluster, and we represent them as unique nodes in order to accurately describe the hardware. The driver is responsible for binding them as a single cpufreq device (in the Linux cpufreq model). Acked-by: Marc Zyngier Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Acked-by: Viresh Kumar Signed-off-by: Hector Martin .../bindings/cpufreq/apple,cluster-cpufreq.yaml | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) commit 8b49c30d8fd6764978d1863152fe73b0325d868e Author: Hector Martin Date: Tue May 3 00:39:01 2022 +0900 MAINTAINERS: Add entries for Apple SoC cpufreq driver This MAINTAINERS update is split, as usual, to facilitate merges via the SoC tree and avoid conflicts. Acked-by: Marc Zyngier Acked-by: Viresh Kumar Signed-off-by: Hector Martin MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 2e833c8c8c42a3b6e22d6b3a9d2d18e425551261 Author: Randy Dunlap Date: Wed Nov 30 23:03:31 2022 -0800 block: bdev & blktrace: use consistent function doc. notation Use only one hyphen in kernel-doc notation between the function name and its short description. The is the documented kerenl-doc format. It also fixes the HTML presentation to be consistent with other functions. Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: linux-block@vger.kernel.org Link: https://lore.kernel.org/r/20221201070331.25685-1-rdunlap@infradead.org Signed-off-by: Jens Axboe block/bdev.c | 4 ++-- kernel/trace/blktrace.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit fa057722978ee52f319670f4ff4f181ecfa87290 Author: James Morse Date: Wed Nov 30 17:16:37 2022 +0000 arm64/sysreg: Convert ID_DFR1_EL1 to automatic generation Convert ID_DFR1_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-39-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 2 -- arch/arm64/tools/sysreg | 13 +++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) commit d044a9fbace769c0f47b52ab8bc39f69e8a6e922 Author: James Morse Date: Wed Nov 30 17:16:36 2022 +0000 arm64/sysreg: Convert ID_DFR0_EL1 to automatic generation Convert ID_DFR0_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Signed-off-by: James Morse Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20221130171637.718182-38-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 14 ------------ arch/arm64/tools/sysreg | 50 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 14 deletions(-) commit 58e010516ee63b04863de7030858670d1fc93471 Author: James Morse Date: Wed Nov 30 17:16:35 2022 +0000 arm64/sysreg: Convert ID_AFR0_EL1 to automatic generation Convert ID_AFR0_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-37-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 8a950efa1ff0393967d79428b16af88193591ab3 Author: James Morse Date: Wed Nov 30 17:16:34 2022 +0000 arm64/sysreg: Convert ID_MMFR5_EL1 to automatic generation Convert ID_MMFR5_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-36-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 3 --- arch/arm64/tools/sysreg | 12 ++++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) commit f70a810e01b2ad7eaad3470be1cf4220249bb251 Author: James Morse Date: Wed Nov 30 17:16:33 2022 +0000 arm64/sysreg: Convert MVFR2_EL1 to automatic generation Convert MVFR2_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-35-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 5 ----- arch/arm64/tools/sysreg | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) commit c9b718eda706179310821daf48caca7da7918a10 Author: James Morse Date: Wed Nov 30 17:16:32 2022 +0000 arm64/sysreg: Convert MVFR1_EL1 to automatic generation Convert MVFR1_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-34-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 10 ---------- arch/arm64/tools/sysreg | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 10 deletions(-) commit e79c94a2a487515aeb1557b6d3e540ae5f66a67a Author: James Morse Date: Wed Nov 30 17:16:31 2022 +0000 arm64/sysreg: Convert MVFR0_EL1 to automatic generation Convert MVFR0_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-33-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 10 ---------- arch/arm64/tools/sysreg | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 10 deletions(-) commit 039d372305fff8aa7dc22774c80637d57775eee6 Author: James Morse Date: Wed Nov 30 17:16:30 2022 +0000 arm64/sysreg: Convert ID_PFR2_EL1 to automatic generation Convert ID_PFR2_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-32-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 4 ---- arch/arm64/tools/sysreg | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) commit 1224308075f17dc42dc96043dfc031e221b87c98 Author: James Morse Date: Wed Nov 30 17:16:29 2022 +0000 arm64/sysreg: Convert ID_PFR1_EL1 to automatic generation Convert ID_PFR1_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-31-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 10 ---------- arch/arm64/tools/sysreg | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 10 deletions(-) commit fb0b8d1a24d8707e93b2338bf233df5a904cbdf6 Author: James Morse Date: Wed Nov 30 17:16:28 2022 +0000 arm64/sysreg: Convert ID_PFR0_EL1 to automatic generation Convert ID_PFR0_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Signed-off-by: James Morse Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20221130171637.718182-30-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 8 -------- arch/arm64/tools/sysreg | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 8 deletions(-) commit 5ea58a1b5c7a3830322e6921f9e415968ee2af54 Author: James Morse Date: Wed Nov 30 17:16:27 2022 +0000 arm64/sysreg: Convert ID_ISAR6_EL1 to automatic generation Convert ID_ISAR6_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-29-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 10 ---------- arch/arm64/tools/sysreg | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 10 deletions(-) commit f4e9ce12dd88d33c25019e2053ade587d7b95969 Author: James Morse Date: Wed Nov 30 17:16:26 2022 +0000 arm64/sysreg: Convert ID_ISAR5_EL1 to automatic generation Convert ID_ISAR5_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-28-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 8 -------- arch/arm64/tools/sysreg | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 8 deletions(-) commit 849cc9bd9f0ef532c208d1cc01a824dc119646e3 Author: James Morse Date: Wed Nov 30 17:16:25 2022 +0000 arm64/sysreg: Convert ID_ISAR4_EL1 to automatic generation Convert ID_ISAR4_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-27-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 10 ---------- arch/arm64/tools/sysreg | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 10 deletions(-) commit d07016c965300d5872a751b4f45a8934f576c9ca Author: James Morse Date: Wed Nov 30 17:16:24 2022 +0000 arm64/sysreg: Convert ID_ISAR3_EL1 to automatic generation Convert ID_ISAR3_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-26-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) commit dfa70ae8d8c2b24ecb55b8877f693f9b0a13fb95 Author: James Morse Date: Wed Nov 30 17:16:23 2022 +0000 arm64/sysreg: Convert ID_ISAR2_EL1 to automatic generation Convert ID_ISAR2_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-25-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) commit 892386a6a8073aa880ab4b89e0fe421fa429b7bb Author: James Morse Date: Wed Nov 30 17:16:22 2022 +0000 arm64/sysreg: Convert ID_ISAR1_EL1 to automatic generation Convert ID_ISAR1_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-24-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) commit 258a96b25a9d2ee54171653b801637edc3cc0b7f Author: James Morse Date: Wed Nov 30 17:16:21 2022 +0000 arm64/sysreg: Convert ID_ISAR0_EL1 to automatic generation Convert ID_ISAR0_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-23-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 9 --------- arch/arm64/tools/sysreg | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 9 deletions(-) commit 5b380ae0e2b3f354bd1274008286b10ee8585015 Author: James Morse Date: Wed Nov 30 17:16:20 2022 +0000 arm64/sysreg: Convert ID_MMFR4_EL1 to automatic generation Convert ID_MMFR4_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-22-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 10 ---------- arch/arm64/tools/sysreg | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 10 deletions(-) commit 8fe2a9c578b07c9a631fbf7cd9e278ffa6619869 Author: James Morse Date: Wed Nov 30 17:16:19 2022 +0000 arm64/sysreg: Convert ID_MMFR3_EL1 to automatic generation Convert ID_MMFR3_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-21-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) commit fbfba88b6ae136a6ae02dddd36bcf8f66f811128 Author: James Morse Date: Wed Nov 30 17:16:18 2022 +0000 arm64/sysreg: Convert ID_MMFR2_EL1 to automatic generation Convert ID_MMFR2_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-20-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) commit 7e2f00bea3dbbe082cf2ff33ca8711235d098207 Author: James Morse Date: Wed Nov 30 17:16:17 2022 +0000 arm64/sysreg: Convert ID_MMFR1_EL1 to automatic generation Convert ID_MMFR1_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-19-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 1 - arch/arm64/tools/sysreg | 49 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) commit 8893df290e3684e1900db52700d77a8ed78e2904 Author: James Morse Date: Wed Nov 30 17:16:16 2022 +0000 arm64/sysreg: Convert ID_MMFR0_EL1 to automatic generation Convert ID_MMFR0_EL1 to be automatically generated as per DDI0487I.a, no functional changes. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-18-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 10 --------- arch/arm64/tools/sysreg | 47 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 10 deletions(-) commit 7587cdef55928ef70d4e945003646711ad39e405 Author: James Morse Date: Wed Nov 30 17:16:15 2022 +0000 arm64/sysreg: Extend the maximum width of a register and symbol name 32bit has multiple values for its id registers, as extra properties were added to the CPUs. Some of these end up having long names, which exceed the fixed 48 character column that the sysreg awk script generates. For example, the ID_MMFR1_EL1.L1Hvd field has an encoding whose natural name would be 'invalidate Iside only'. Using this causes compile errors as the script generates the following: #define ID_MMFR1_EL1_L1Hvd_INVALIDATE_ISIDE_ONLYUL(0b0001) Add a few extra characters. Reviewed-by: Mark Brown Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-17-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/tools/gen-sysreg.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6e155e8e561dafcba9faf86598d7ec69942ab86 Author: James Morse Date: Wed Nov 30 17:16:14 2022 +0000 arm64/sysreg: Standardise naming for MVFR2_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the MVFR2_EL1 register use lower-case for feature names where the arm-arm does the same. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-16-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 4 ++-- arch/arm64/kernel/cpufeature.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit d3e1aa85b1b27b0e6d6f8d8b0bf0a9a04ed1d40a Author: James Morse Date: Wed Nov 30 17:16:13 2022 +0000 arm64/sysreg: Standardise naming for MVFR1_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the MVFR1_EL1 register use lower-case for feature names where the arm-arm does the same. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-15-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 16 ++++++++-------- arch/arm64/kernel/cpufeature.c | 24 ++++++++++++------------ 2 files changed, 20 insertions(+), 20 deletions(-) commit a3aab94801dee86cc9d7d43a611c71688a483908 Author: James Morse Date: Wed Nov 30 17:16:12 2022 +0000 arm64/sysreg: Standardise naming for MVFR0_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the MVFR0_EL1 register use lower-case for feature names where the arm-arm does the same. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-14-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 16 ++++++++-------- arch/arm64/kernel/cpufeature.c | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) commit d092106d73539905b5deadfa86be04ff141bcaa8 Author: James Morse Date: Wed Nov 30 17:16:11 2022 +0000 arm64/sysreg: Standardise naming for ID_DFR1_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the ID_DFR1_EL1 register have an _EL1 suffix. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-13-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 2 +- arch/arm64/kernel/cpufeature.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f4f5969e354235bbe729ff3881089fc902c0daff Author: James Morse Date: Wed Nov 30 17:16:10 2022 +0000 arm64/sysreg: Standardise naming for ID_DFR0_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the ID_DFR0_EL1 register have an _EL1 suffix, and use lower-case for feature names where the arm-arm does the same. The arm-arm has feature names for some of the ID_DFR0_EL1.PerMon encodings. Use these feature names in preference to the '8_4' indication of the architecture version they were introduced in. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-12-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 24 +++++++++++------------- arch/arm64/kernel/cpufeature.c | 14 +++++++------- arch/arm64/kvm/sys_regs.c | 4 ++-- 3 files changed, 20 insertions(+), 22 deletions(-) commit 1ecf3dcb136320359ffd79d1ca5908e078443b6b Author: James Morse Date: Wed Nov 30 17:16:09 2022 +0000 arm64/sysreg: Standardise naming for ID_PFR2_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the ID_PFR2_EL1 register have an _EL1 suffix. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-11-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 4 ++-- arch/arm64/kernel/cpufeature.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0a648056d68d4049dfb5d1c36b79ad3eba0090f0 Author: James Morse Date: Wed Nov 30 17:16:08 2022 +0000 arm64/sysreg: Standardise naming for ID_PFR1_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the ID_PFR1_EL1 register have an _EL1 suffix, and use lower case in feature names where the arm-arm does the same. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-10-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 16 ++++++++-------- arch/arm64/kernel/cpufeature.c | 26 +++++++++++++------------- 2 files changed, 21 insertions(+), 21 deletions(-) commit e0bf98fef3fd0f934deee3ebc3a03b88aec5b501 Author: James Morse Date: Wed Nov 30 17:16:07 2022 +0000 arm64/sysreg: Standardise naming for ID_PFR0_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the ID_PFR0_EL1 register have an _EL1 suffix, and use lower case in feature names where the arm-arm does the same. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-9-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 12 ++++++------ arch/arm64/kernel/cpufeature.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit eef4344f779f6aee9ec9d49a03ec2317a85a744e Author: James Morse Date: Wed Nov 30 17:16:06 2022 +0000 arm64/sysreg: Standardise naming for ID_ISAR6_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the ID_ISAR6_EL1 register have an _EL1 suffix. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-8-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 14 +++++++------- arch/arm64/kernel/cpufeature.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) commit 816c8638d8c66991dd6dacd32e578293d10393f4 Author: James Morse Date: Wed Nov 30 17:16:05 2022 +0000 arm64/sysreg: Standardise naming for ID_ISAR5_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the ID_ISAR5_EL1 register have an _EL1 suffix. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-7-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 12 ++++++------ arch/arm64/kernel/cpufeature.c | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) commit 3f08e378f00e1b1c14763fe225bf553b4733db67 Author: James Morse Date: Wed Nov 30 17:16:04 2022 +0000 arm64/sysreg: Standardise naming for ID_ISAR4_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the ID_ISAR4_EL1 register have an _EL1 suffix, and use lower-case for feature names where the arm-arm does the same. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-6-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 16 ++++++++-------- arch/arm64/kernel/cpufeature.c | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) commit 52b3dc559a4c240c33c58affdf8247bab485d422 Author: James Morse Date: Wed Nov 30 17:16:03 2022 +0000 arm64/sysreg: Standardise naming for ID_ISAR0_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the ID_ISAR0_EL1 register have an _EL1 suffix, and use lower-case for feature names where the arm-arm does the same. To functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-5-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 14 +++++++------- arch/arm64/kernel/cpufeature.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) commit 7b24177c631de0d75fd7473ee75666498faf225e Author: James Morse Date: Wed Nov 30 17:16:02 2022 +0000 arm64/sysreg: Standardise naming for ID_MMFR5_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the ID_MMFR5_EL1 register have an _EL1 suffix. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-4-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 2 +- arch/arm64/kernel/cpufeature.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5ea1534ec320ffaca144136cca3880877738e6d2 Author: James Morse Date: Wed Nov 30 17:16:01 2022 +0000 arm64/sysreg: Standardise naming for ID_MMFR4_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. Ensure symbols for the ID_MMFR4_EL1 register have an _EL1 suffix, and use lower case in feature names where the arm-arm does the same. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-3-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 16 ++++++++-------- arch/arm64/kernel/cpufeature.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) commit 37622bae3db306ee472acb02fa55c48f14ddd5a1 Author: James Morse Date: Wed Nov 30 17:16:00 2022 +0000 arm64/sysreg: Standardise naming for ID_MMFR0_EL1 To convert the 32bit id registers to use the sysreg generation, they must first have a regular pattern, to match the symbols the script generates. The scripts would like to follow exactly what is in the arm-arm, which uses lower case for some of these feature names. Ensure symbols for the ID_MMFR0_EL1 register have an _EL1 suffix, and use lower case in feature names where the arm-arm does the same. No functional change. Signed-off-by: James Morse Link: https://lore.kernel.org/r/20221130171637.718182-2-james.morse@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 16 ++++++++-------- arch/arm64/kernel/cpufeature.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) commit c8e320b00a2a720862b9c028153c681b1a50aa61 Author: Will Deacon Date: Wed Nov 16 17:03:25 2022 +0000 firmware: arm_ffa: Move comment before the field it is documenting This is consistent with the other comments in the struct. Co-developed-by: Andrew Walbran Signed-off-by: Andrew Walbran Signed-off-by: Quentin Perret Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20221116170335.2341003-3-qperret@google.com Signed-off-by: Will Deacon include/linux/arm_ffa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 229d58e31678dece365060c50a39a99a2b1dc729 Author: Will Deacon Date: Wed Nov 16 17:03:24 2022 +0000 firmware: arm_ffa: Move constants to header file FF-A function IDs and error codes will be needed in the hypervisor too, so move to them to the header file where they can be shared. Rename the version constants with an "FFA_" prefix so that they are less likely to clash with other code in the tree. Co-developed-by: Andrew Walbran Signed-off-by: Andrew Walbran Signed-off-by: Quentin Perret Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20221116170335.2341003-2-qperret@google.com Signed-off-by: Will Deacon drivers/firmware/arm_ffa/driver.c | 101 ++++---------------------------------- include/linux/arm_ffa.h | 83 +++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 91 deletions(-) commit 5f3e240321dd00b251f91a37c70fc551a140c87b Author: changfengnan Date: Sat Oct 8 20:05:18 2022 +0800 ext4: split ext4_journal_start trace for debug we might want to know why jbd2 thread using high io for detail, split ext4_journal_start trace to ext4_journal_start_sb and ext4_journal_start_inode, show ino and handle type when possible. Signed-off-by: changfengnan Link: https://lore.kernel.org/r/20221008120518.74870-1-changfengnan@bytedance.com Signed-off-by: Theodore Ts'o fs/ext4/ext4_jbd2.c | 14 +++++++---- fs/ext4/ext4_jbd2.h | 10 ++++---- fs/ext4/ialloc.c | 4 ++-- include/trace/events/ext4.h | 57 ++++++++++++++++++++++++++++++++++++--------- 4 files changed, 63 insertions(+), 22 deletions(-) commit e3ea75ee651daf5e434afbfdb7dbf75e200ea1f6 Author: Lukas Czerner Date: Tue Oct 4 15:58:03 2022 +0200 ext4: journal_path mount options should follow links Before the commit 461c3af045d3 ("ext4: Change handle_mount_opt() to use fs_parameter") ext4 mount option journal_path did follow links in the provided path. Bring this behavior back by allowing to pass pathwalk flags to fs_lookup_param(). Fixes: 461c3af045d3 ("ext4: Change handle_mount_opt() to use fs_parameter") Signed-off-by: Lukas Czerner Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20221004135803.32283-1-lczerner@redhat.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org Documentation/filesystems/mount_api.rst | 1 + fs/ext4/super.c | 2 +- fs/fs_parser.c | 3 ++- include/linux/fs_parser.h | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) commit 56d0d0b9289dae041becc7ee6bd966a00dd610e0 Author: Li Zhong Date: Fri Sep 16 17:28:16 2022 -0700 ext4: check the return value of ext4_xattr_inode_dec_ref() Check the return value of ext4_xattr_inode_dec_ref(), which could return error code and need to be warned. Signed-off-by: Li Zhong Link: https://lore.kernel.org/r/20220917002816.3804400-1-floridsleeves@gmail.com Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 71df9683827a17fb6279fcc2e52efdc7062a03b9 Author: Jinpeng Cui Date: Wed Aug 31 16:08:43 2022 +0000 ext4: remove redundant variable err Return value directly from ext4_group_extend_no_check() instead of getting value from redundant variable err. Reported-by: Zeal Robot Signed-off-by: Jinpeng Cui Link: https://lore.kernel.org/r/20220831160843.305836-1-cui.jinpeng2@zte.com.cn Signed-off-by: Theodore Ts'o fs/ext4/resize.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit eee22187b53611e173161e38f61de1c7ecbeb876 Author: Baokun Li Date: Wed Aug 17 21:27:01 2022 +0800 ext4: add inode table check in __ext4_get_inode_loc to aovid possible infinite loop In do_writepages, if the value returned by ext4_writepages is "-ENOMEM" and "wbc->sync_mode == WB_SYNC_ALL", retry until the condition is not met. In __ext4_get_inode_loc, if the bh returned by sb_getblk is NULL, the function returns -ENOMEM. In __getblk_slow, if the return value of grow_buffers is less than 0, the function returns NULL. When the three processes are connected in series like the following stack, an infinite loop may occur: do_writepages <--- keep retrying ext4_writepages mpage_map_and_submit_extent mpage_map_one_extent ext4_map_blocks ext4_ext_map_blocks ext4_ext_handle_unwritten_extents ext4_ext_convert_to_initialized ext4_split_extent ext4_split_extent_at __ext4_ext_dirty __ext4_mark_inode_dirty ext4_reserve_inode_write ext4_get_inode_loc __ext4_get_inode_loc <--- return -ENOMEM sb_getblk __getblk_gfp __getblk_slow <--- return NULL grow_buffers grow_dev_page <--- return -ENXIO ret = (block < end_block) ? 1 : -ENXIO; In this issue, bg_inode_table_hi is overwritten as an incorrect value. As a result, `block < end_block` cannot be met in grow_dev_page. Therefore, __ext4_get_inode_loc always returns '-ENOMEM' and do_writepages keeps retrying. As a result, the writeback process is in the D state due to an infinite loop. Add a check on inode table block in the __ext4_get_inode_loc function by referring to ext4_read_inode_bitmap to avoid this infinite loop. Cc: stable@kernel.org Signed-off-by: Baokun Li Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20220817132701.3015912-3-libaokun1@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 32975c491ee410598b33201344c123fcc81a7c33 Author: Geert Uytterhoeven Date: Wed Nov 23 17:39:18 2022 +0100 uapi: Add missing _UAPI prefix to include guard Signed-off-by: Geert Uytterhoeven Signed-off-by: Arnd Bergmann include/uapi/asm-generic/types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e346bebbd36b1576a3335331fed61bb48c6d8823 Author: Ard Biesheuvel Date: Tue Nov 29 18:23:08 2022 +0100 efi: libstub: Always enable initrd command line loader and bump version In preparation for setting a cross-architecture baseline for EFI boot support, remove the Kconfig option that permits the command line initrd loader to be disabled. Also, bump the minor version so that any image built with the new version can be identified as supporting this. Acked-by: Leif Lindholm Reviewed-by: Daniel Kiper Signed-off-by: Ard Biesheuvel drivers/firmware/efi/Kconfig | 15 --------------- drivers/firmware/efi/libstub/efi-stub-helper.c | 3 +-- include/linux/pe.h | 2 +- 3 files changed, 2 insertions(+), 18 deletions(-) commit 7a88b1a8263a8a0797a5e528b9cd3607e2462a3b Author: Kemeng Shi Date: Tue Oct 18 20:19:32 2022 +0800 blk-iocost: Correct comment in blk_iocost_init There is no iocg_pd_init function. The pd_alloc_fn function pointer of iocost policy is set with ioc_pd_init. Just correct it. Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221018121932.10792-6-shikemeng@huawei.com Signed-off-by: Jens Axboe block/blk-iocost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c31be320c52bad07e0317d2565ae8a4e5dab03b Author: Kemeng Shi Date: Tue Oct 18 20:19:31 2022 +0800 blk-iocost: Remove vrate member in struct ioc_now If we trace vtime_base_rate instead of vtime_rate, there is nowhere which accesses now->vrate except function ioc_now using now->vrate locally. Just remove it. Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221018121932.10792-5-shikemeng@huawei.com Signed-off-by: Jens Axboe block/blk-iocost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 63c9eac4b6d75859703f5820414986edefb01210 Author: Kemeng Shi Date: Tue Oct 18 20:19:30 2022 +0800 blk-iocost: Trace vtime_base_rate instead of vtime_rate Since commit ac33e91e2daca ("blk-iocost: implement vtime loss compensation") rename original vtime_rate to vtime_base_rate and current vtime_rate is original vtime_rate with compensation. The current rate showed in tracepoint is mixed with vtime_rate and vtime_base_rate: 1) In function ioc_adjust_base_vrate, the first trace_iocost_ioc_vrate_adj shows vtime_rate, the second trace_iocost_ioc_vrate_adj shows vtime_base_rate. 2) In function iocg_activate shows vtime_rate by calling TRACE_IOCG_PATH(iocg_activate... 3) In function ioc_check_iocgs shows vtime_rate by calling TRACE_IOCG_PATH(iocg_idle... Trace vtime_base_rate instead of vtime_rate as: 1) Before commit ac33e91e2daca ("blk-iocost: implement vtime loss compensation"), the traced rate is without compensation, so still show rate without compensation. 2) The vtime_base_rate is more stable while vtime_rate heavily depends on excess budeget on current period which may change abruptly in next period. Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221018121932.10792-4-shikemeng@huawei.com Signed-off-by: Jens Axboe block/blk-iocost.c | 2 +- include/trace/events/iocost.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit c6d2efdd38b4e45741e103b6338f08e5ff2aae03 Author: Kemeng Shi Date: Tue Oct 18 20:19:29 2022 +0800 blk-iocost: Reset vtime_base_rate in ioc_refresh_params Since commit ac33e91e2daca("blk-iocost: implement vtime loss compensation") split vtime_rate into vtime_rate and vtime_base_rate, we need reset both vtime_base_rate and vtime_rate when device parameters are refreshed. If vtime_base_rate is no reset here, vtime_rate will be overwritten with old vtime_base_rate soon in ioc_refresh_vrate. Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221018121932.10792-3-shikemeng@huawei.com Signed-off-by: Jens Axboe block/blk-iocost.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ecaaaabeead5329aa4c697c484bfc21cc129ab10 Author: Kemeng Shi Date: Tue Oct 18 20:19:28 2022 +0800 blk-iocost: Fix typo in comment soley -> solely Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221018121932.10792-2-shikemeng@huawei.com Signed-off-by: Jens Axboe block/blk-iocost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36369f46e91785688a5f39d7a5590e3f07981316 Author: Jan Kara Date: Wed Nov 30 18:56:53 2022 +0100 block: Do not reread partition table on exclusively open device Since commit 10c70d95c0f2 ("block: remove the bd_openers checks in blk_drop_partitions") we allow rereading of partition table although there are users of the block device. This has an undesirable consequence that e.g. if sda and sdb are assembled to a RAID1 device md0 with partitions, BLKRRPART ioctl on sda will rescan partition table and create sda1 device. This partition device under a raid device confuses some programs (such as libstorage-ng used for initial partitioning for distribution installation) leading to failures. Fix the problem refusing to rescan partitions if there is another user that has the block device exclusively open. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20221130135344.2ul4cyfstfs3znxg@quack3 Fixes: 10c70d95c0f2 ("block: remove the bd_openers checks in blk_drop_partitions") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221130175653.24299-1-jack@suse.cz [axboe: fold in followup fix] Signed-off-by: Jens Axboe block/blk.h | 2 +- block/genhd.c | 7 +++++-- block/ioctl.c | 12 +++++++----- 3 files changed, 13 insertions(+), 8 deletions(-) commit 94b9b9de05b62ac54d8766caa9865fb4d82cc47e Author: Felix Fietkau Date: Thu Dec 1 14:57:30 2022 +0100 wifi: mac80211: fix and simplify unencrypted drop check for mesh ieee80211_drop_unencrypted is called from ieee80211_rx_h_mesh_fwding and ieee80211_frame_allowed. Since ieee80211_rx_h_mesh_fwding can forward packets for other mesh nodes and is called earlier, it needs to check the decryptions status and if the packet is using the control protocol on its own, instead of deferring to the later call from ieee80211_frame_allowed. Because of that, ieee80211_drop_unencrypted has a mesh specific check that skips over the mesh header in order to check the payload protocol. This code is invalid when called from ieee80211_frame_allowed, since that happens after the 802.11->802.3 conversion. Fix this by moving the mesh specific check directly into ieee80211_rx_h_mesh_fwding. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20221201135730.19723-1-nbd@nbd.name Signed-off-by: Johannes Berg net/mac80211/rx.c | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) commit 7d360f6061db01830adfdb1eaa3977b19db0c30b Author: Felix Fietkau Date: Mon Oct 10 11:43:38 2022 +0200 wifi: mac80211: add support for restricting netdev features per vif This can be used to selectively disable feature flags for checksum offload, scatter/gather or GSO by changing vif->netdev_features. Removing features from vif->netdev_features does not affect the netdev features themselves, but instead fixes up skbs in the tx path so that the offloads are not needed in the driver. Aside from making it easier to deal with vif type based hardware limitations, this also makes it possible to optimize performance on hardware without native GSO support by declaring GSO support in hw->netdev_features and removing it from vif->netdev_features. This allows mac80211 to handle GSO segmentation after the sta lookup, but before itxq enqueue, thus reducing the number of unnecessary sta lookups, as well as some other per-packet processing. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20221010094338.78070-1-nbd@nbd.name Signed-off-by: Johannes Berg include/net/fq_impl.h | 16 +-- include/net/mac80211.h | 5 + net/mac80211/iface.c | 1 + net/mac80211/tx.c | 283 ++++++++++++++++++++++++++++++++----------------- 4 files changed, 202 insertions(+), 103 deletions(-) commit 209d70d34a7fd32e6fb6784f107913b0d18fe501 Author: Kieran Frewen Date: Mon Nov 7 11:16:02 2022 +1300 wifi: mac80211: update TIM for S1G specification changes Updates to the TIM information element to match changes made in the IEEE Std 802.11ah-2020. Signed-off-by: Kieran Frewen Co-developed-by: Gilad Itzkovitch Signed-off-by: Gilad Itzkovitch Link: https://lore.kernel.org/r/20221106221602.25714-1-gilad.itzkovitch@morsemicro.com [use skb_put_data/skb_put_u8] Signed-off-by: Johannes Berg net/mac80211/tx.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 8950b5988a9a2957b4c2c6f20143dfc2a0230a74 Author: Johannes Berg Date: Fri Oct 14 18:56:11 2022 +0200 wifi: mac80211: don't parse multi-BSSID in assoc resp It's not valid to have the multiple BSSID element in the association response (per 802.11 REVme D1.0), so don't try to parse it there, but only in the fallback beacon elements if needed. The other case that was parsing association requests was already changed in a previous commit. Change-Id: I659d2ef1253e079cc71c46a017044e116e31c024 Signed-off-by: Johannes Berg net/mac80211/mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61e41e5dfcc22e5e65b6537453fd2f03ac768b82 Author: Johannes Berg Date: Mon Oct 17 09:03:48 2022 +0200 wifi: cfg80211: use bss_from_pub() instead of container_of() There's no need to open-code container_of() when we have bss_from_pub(). Use it. Change-Id: I074723717909ba211a40e6499f0c36df0e2ba4be Signed-off-by: Johannes Berg net/wireless/scan.c | 41 +++++++++++------------------------------ 1 file changed, 11 insertions(+), 30 deletions(-) commit b2ddde566de409a3dbf708fe89ecbe114dd14cc3 Author: Johannes Berg Date: Wed Nov 2 09:47:47 2022 +0100 wifi: mac80211: remove unnecessary synchronize_net() The call to ieee80211_do_stop() right after will also do synchronize_rcu() to ensure the SDATA_STATE_RUNNING bit is cleared, so we don't need to synchronize_net() here. Change-Id: Id9f9ffcf195002013e5d9fde288877d219780864 Signed-off-by: Johannes Berg net/mac80211/iface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9445096319206814e462b904915b645c4f2bf514 Author: Alexander Wetzel Date: Mon Nov 7 17:13:28 2022 +0100 wifi: mac80211: Drop not needed check for NULL ieee80211_get_txq() can only be called with vif != NULL. Remove not needed NULL test in function. Signed-off-by: Alexander Wetzel Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/20221107161328.2883-1-alexander@wetzel-home.de Signed-off-by: Johannes Berg net/mac80211/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 833a9fd28c9b7ccb39a334721379e992dc1c0c89 Author: Chen Zhongjin Date: Wed Nov 9 17:02:37 2022 +0800 wifi: cfg80211: Fix not unregister reg_pdev when load_builtin_regdb_keys() fails In regulatory_init_db(), when it's going to return a error, reg_pdev should be unregistered. When load_builtin_regdb_keys() fails it doesn't do it and makes cfg80211 can't be reload with report: sysfs: cannot create duplicate filename '/devices/platform/regulatory.0' ... dump_stack_lvl+0x79/0x9b sysfs_warn_dup.cold+0x1c/0x29 sysfs_create_dir_ns+0x22d/0x290 kobject_add_internal+0x247/0x800 kobject_add+0x135/0x1b0 device_add+0x389/0x1be0 platform_device_add+0x28f/0x790 platform_device_register_full+0x376/0x4b0 regulatory_init+0x9a/0x4b2 [cfg80211] cfg80211_init+0x84/0x113 [cfg80211] ... Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking") Signed-off-by: Chen Zhongjin Link: https://lore.kernel.org/r/20221109090237.214127-1-chenzhongjin@huawei.com Signed-off-by: Johannes Berg net/wireless/reg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c1d3214d61d93eb4a3959c6b402230988d0f362d Author: JUN-KYU SHIN Date: Fri Nov 11 11:33:04 2022 +0900 wifi: cfg80211: fix comparison of BSS frequencies If the "channel->freq_offset" comparison is omitted in cmp_bss(), BSS with different kHz units cannot be distinguished in the S1G Band. So "freq_offset" should also be included in the comparison. Signed-off-by: JUN-KYU SHIN Link: https://lore.kernel.org/r/20221111023301.6395-1-jk.shin@newratek.com Signed-off-by: Johannes Berg net/wireless/scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 09d838a457a89883a926b8b0104d575158fd4b92 Author: Íñigo Huguet Date: Fri Nov 11 16:36:22 2022 +0100 wifi: mac80211: fix maybe-unused warning In ieee80211_lookup_key, the variable named `local` is unused if compiled without lockdep, getting this warning: net/mac80211/cfg.c: In function ‘ieee80211_lookup_key’: net/mac80211/cfg.c:542:26: error: unused variable ‘local’ [-Werror=unused-variable] struct ieee80211_local *local = sdata->local; ^~~~~ Fix it with __maybe_unused. Fixes: 8cbf0c2ab6df ("wifi: mac80211: refactor some key code") Signed-off-by: Íñigo Huguet Link: https://lore.kernel.org/r/20221111153622.29016-1-ihuguet@redhat.com Signed-off-by: Johannes Berg net/mac80211/cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0346843b1076b34a0278ff601f8f287535cb064 Author: David Howells Date: Thu Jan 30 21:48:13 2020 +0000 rxrpc: Transmit ACKs at the point of generation For ACKs generated inside the I/O thread, transmit the ACK at the point of generation. Where the ACK is generated outside of the I/O thread, it's offloaded to the I/O thread to transmit it. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 3 --- net/rxrpc/ar-internal.h | 5 +---- net/rxrpc/call_event.c | 17 ++--------------- net/rxrpc/io_thread.c | 5 ----- net/rxrpc/local_object.c | 2 -- net/rxrpc/output.c | 42 ++---------------------------------------- net/rxrpc/recvmsg.c | 3 --- net/rxrpc/sendmsg.c | 2 -- net/rxrpc/txbuf.c | 1 - 9 files changed, 5 insertions(+), 75 deletions(-) commit a2cf3264f331acfeb7e463ad7b7fe1ac647a829d Author: David Howells Date: Wed Nov 16 12:02:22 2022 +0000 rxrpc: Fold __rxrpc_unuse_local() into rxrpc_unuse_local() Fold __rxrpc_unuse_local() into rxrpc_unuse_local() as the latter is now the only user of the former. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 12 ------------ net/rxrpc/local_object.c | 12 ++++++++++-- 2 files changed, 10 insertions(+), 14 deletions(-) commit 5086d9a9dfec4866806da303115489b0606decb7 Author: David Howells Date: Fri Nov 11 13:47:35 2022 +0000 rxrpc: Move the cwnd degradation after transmitting packets When we've gone for >1RTT without transmitting a packet, we should reduce the ssthresh and cut the cwnd by half (as suggested in RFC2861 sec 3.1). However, we may receive ACK packets in a batch and the first of these may cut the cwnd, preventing further transmission, and each subsequent one cuts the cwnd yet further, reducing it to the floor and killing performance. Fix this by moving the cwnd reset to after doing the transmission and resetting the base time such that we don't cut the cwnd by half again for at least another RTT. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/call_event.c | 7 +++++++ net/rxrpc/input.c | 49 +++++++++++++++++++++++++++---------------------- net/rxrpc/proc.c | 5 +++-- 4 files changed, 39 insertions(+), 24 deletions(-) commit 32cf8edb079a6a687a2b5dba39a813a0bbd0ddf9 Author: David Howells Date: Fri Nov 11 13:47:35 2022 +0000 rxrpc: Trace/count transmission underflows and cwnd resets Add a tracepoint to log when a cwnd reset occurs due to lack of transmission on a call. Add stat counters to count transmission underflows (ie. when we have tx window space, but sendmsg doesn't manage to keep up), cwnd resets and transmission failures. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 38 ++++++++++++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 3 +++ net/rxrpc/call_event.c | 4 +++- net/rxrpc/input.c | 7 +++++-- net/rxrpc/output.c | 2 ++ net/rxrpc/proc.c | 14 ++++++++++---- 6 files changed, 61 insertions(+), 7 deletions(-) commit 3dd9c8b5f09fd24652729a3da5c5efa3ec2c4590 Author: David Howells Date: Fri Jan 24 10:21:15 2020 +0000 rxrpc: Remove the _bh annotation from all the spinlocks None of the spinlocks in rxrpc need a _bh annotation now as the RCU callback routines no longer take spinlocks and the bulk of the packet wrangling code is now run in the I/O thread, not softirq context. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/af_rxrpc.c | 4 ++-- net/rxrpc/call_accept.c | 8 ++++---- net/rxrpc/call_event.c | 4 ++-- net/rxrpc/call_object.c | 20 ++++++++++---------- net/rxrpc/conn_client.c | 4 ++-- net/rxrpc/conn_event.c | 16 ++++++++-------- net/rxrpc/conn_service.c | 10 +++++----- net/rxrpc/input.c | 4 ++-- net/rxrpc/output.c | 8 ++++---- net/rxrpc/peer_event.c | 16 ++++++++-------- net/rxrpc/peer_object.c | 8 ++++---- net/rxrpc/recvmsg.c | 36 ++++++++++++++++++------------------ net/rxrpc/sendmsg.c | 12 ++++++------ 13 files changed, 75 insertions(+), 75 deletions(-) commit 5e6ef4f1017c7f844e305283bbd8875af475e2fc Author: David Howells Date: Thu Jan 23 13:13:41 2020 +0000 rxrpc: Make the I/O thread take over the call and local processor work Move the functions from the call->processor and local->processor work items into the domain of the I/O thread. The call event processor, now called from the I/O thread, then takes over the job of cranking the call state machine, processing incoming packets and transmitting DATA, ACK and ABORT packets. In a future patch, rxrpc_send_ACK() will transmit the ACK on the spot rather than queuing it for later transmission. The call event processor becomes purely received-skb driven. It only transmits things in response to events. We use "pokes" to queue a dummy skb to make it do things like start/resume transmitting data. Timer expiry also results in pokes. The connection event processor, becomes similar, though crypto events, such as dealing with CHALLENGE and RESPONSE packets is offloaded to a work item to avoid doing crypto in the I/O thread. The local event processor is removed and VERSION response packets are generated directly from the packet parser. Similarly, ABORTs generated in response to protocol errors will be transmitted immediately rather than being pushed onto a queue for later transmission. Changes: ======== ver #2) - Fix a couple of introduced lock context imbalances. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 42 +++--- net/rxrpc/ar-internal.h | 50 +++---- net/rxrpc/call_accept.c | 126 ++++++++--------- net/rxrpc/call_event.c | 171 ++++++++++------------- net/rxrpc/call_object.c | 56 +++++--- net/rxrpc/conn_event.c | 60 ++++++++ net/rxrpc/conn_object.c | 93 +++++-------- net/rxrpc/input.c | 167 ++++++---------------- net/rxrpc/io_thread.c | 319 ++++++++++++++++++++----------------------- net/rxrpc/local_event.c | 43 +----- net/rxrpc/local_object.c | 69 +--------- net/rxrpc/output.c | 92 +++++-------- net/rxrpc/peer_event.c | 29 ++-- net/rxrpc/recvmsg.c | 9 +- net/rxrpc/sendmsg.c | 10 +- 15 files changed, 545 insertions(+), 791 deletions(-) commit 393a2a2007d13df7ae54c94328b45b6c2269b6a9 Author: David Howells Date: Thu Oct 20 22:36:20 2022 +0100 rxrpc: Extract the peer address from an incoming packet earlier Extract the peer address from an incoming packet earlier, at the beginning of rxrpc_input_packet() and thence pass a pointer to it to various functions that use it as part of the lookup rather than doing it on several separate paths. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/call_accept.c | 10 ++++++---- net/rxrpc/conn_object.c | 29 ++++++++--------------------- net/rxrpc/io_thread.c | 17 +++++++++++++++-- 4 files changed, 31 insertions(+), 27 deletions(-) commit cd21effb0552d666b2f8609560be764a1a56adbe Author: David Howells Date: Sat Oct 8 14:33:50 2022 +0100 rxrpc: Reduce the use of RCU in packet input Shrink the region of rxrpc_input_packet() that is covered by the RCU read lock so that it only covers the connection and call lookup. This means that the bits now outside of that can call sleepable functions such as kmalloc and sendmsg. Also take a ref on the conn or call we're going to use before we drop the RCU read lock. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 3 +-- net/rxrpc/call_accept.c | 13 +++------- net/rxrpc/input.c | 7 +++-- net/rxrpc/io_thread.c | 68 +++++++++++++++++++++++++++++++++++++------------ 4 files changed, 59 insertions(+), 32 deletions(-) commit 2d1faf7a0ca3c0b327cf064c80e4e775532c9319 Author: David Howells Date: Thu Oct 6 15:43:51 2022 +0100 rxrpc: Simplify skbuff accounting in receive path A received skbuff needs a ref when it gets put on a call data queue or conn packet queue, and rxrpc_input_packet() and co. jump through a lot of hoops to avoid double-dropping the skbuff ref so that we can avoid getting a ref when we queue the packet. Change this so that the skbuff ref is unconditionally dropped by the caller of rxrpc_input_packet(). An additional ref is then taken on the packet if it is pushed onto a queue. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 3 +- net/rxrpc/input.c | 45 ++++++++++++++-------------- net/rxrpc/io_thread.c | 70 ++++++++++++++++++++------------------------ 3 files changed, 56 insertions(+), 62 deletions(-) commit 29fb4ec385f18db98d9188c2173a0b07d2de6917 Author: David Howells Date: Wed Oct 12 15:42:06 2022 +0100 rxrpc: Remove RCU from peer->error_targets list Remove the RCU requirements from the peer's list of error targets so that the error distributor can call sleeping functions. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/call_accept.c | 6 ++++++ net/rxrpc/call_object.c | 2 +- net/rxrpc/conn_client.c | 4 ++++ net/rxrpc/conn_object.c | 6 +++--- net/rxrpc/output.c | 6 ------ net/rxrpc/peer_event.c | 15 ++++++++++++++- 6 files changed, 28 insertions(+), 11 deletions(-) commit cf37b5987508878647161ec3cdba0bb00a1b607a Author: David Howells Date: Thu Mar 31 23:55:08 2022 +0100 rxrpc: Move DATA transmission into call processor work item Move DATA transmission into the call processor work item. In a future patch, this will be called from the I/O thread rather than being itsown work item. This will allow DATA transmission to be driven directly by incoming ACKs, pokes and timers as those are processed. The Tx queue is also split: The queue of packets prepared by sendmsg is now places in call->tx_sendmsg and the packet dispatcher decants the packets into call->tx_buffer as space becomes available in the transmission window. This allows sendmsg to run ahead of the available space to try and prevent an underflow in transmission. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 6 +++- net/rxrpc/ar-internal.h | 5 ++- net/rxrpc/call_event.c | 83 ++++++++++++++++++++++++++++++++++++++++---- net/rxrpc/call_object.c | 6 ++++ net/rxrpc/output.c | 48 +++++++++++++++++++++++++ net/rxrpc/sendmsg.c | 83 +++++++------------------------------------- net/rxrpc/txbuf.c | 10 ++++-- 7 files changed, 161 insertions(+), 80 deletions(-) commit f3441d4125fc98995858550a5521b8d7daf0504a Author: David Howells Date: Thu Oct 20 21:58:36 2022 +0100 rxrpc: Copy client call parameters into rxrpc_call earlier Copy client call parameters into rxrpc_call earlier so that that can be used to convey them to the connection code - which can then be offloaded to the I/O thread. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 3 +++ net/rxrpc/ar-internal.h | 7 ++++++- net/rxrpc/call_accept.c | 2 ++ net/rxrpc/call_object.c | 50 +++++++++++++++++++++++++++----------------- net/rxrpc/conn_client.c | 2 +- net/rxrpc/io_thread.c | 4 ++-- net/rxrpc/output.c | 2 +- net/rxrpc/proc.c | 25 +++++++--------------- net/rxrpc/recvmsg.c | 8 +++---- net/rxrpc/security.c | 30 ++++++++++++++++++++++++++ net/rxrpc/txbuf.c | 2 +- 11 files changed, 87 insertions(+), 48 deletions(-) commit 15f661dc95daec9b38e8e4cc931c95afe0ae0cef Author: David Howells Date: Mon Oct 10 15:51:39 2022 +0100 rxrpc: Implement a mechanism to send an event notification to a call Provide a means by which an event notification can be sent to a call such that the I/O thread can process it rather than it being done in a separate workqueue. This will allow a lot of locking to be removed. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 52 ++++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 5 ++++- net/rxrpc/call_object.c | 24 ++++++++++++++++++++ net/rxrpc/input.c | 3 +-- net/rxrpc/io_thread.c | 20 +++++++++++++++-- net/rxrpc/local_object.c | 1 + 6 files changed, 100 insertions(+), 5 deletions(-) commit 81f2e8adc0fd10847637873dafe8610f3fb4cdff Author: David Howells Date: Mon Oct 10 13:13:47 2022 +0100 rxrpc: Don't use sk->sk_receive_queue.lock to guard socket state changes Don't use sk->sk_receive_queue.lock to guard socket state changes as the socket mutex is sufficient. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/af_rxrpc.c | 4 ---- 1 file changed, 4 deletions(-) commit 4041a8ff653ec4e4d9e6395802cb3f4fca59f7f3 Author: David Howells Date: Thu Jan 23 22:21:59 2020 +0000 rxrpc: Remove call->input_lock Remove call->input_lock as it was only necessary to serialise access to the state stored in the rxrpc_call struct by simultaneous softirq handlers presenting received packets. They now dump the packets in a queue and a single process-context handler now processes them. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 1 - net/rxrpc/call_object.c | 1 - net/rxrpc/input.c | 22 +++++----------------- 3 files changed, 5 insertions(+), 19 deletions(-) commit ff7348254e704b6d0121970e311a6b699268e1ac Author: David Howells Date: Mon Oct 10 11:47:31 2022 +0100 rxrpc: Move error processing into the local endpoint I/O thread Move the processing of error packets into the local endpoint I/O thread, leaving the handover from UDP to merely transfer them into the local endpoint queue. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 4 +++- net/rxrpc/io_thread.c | 29 +++++++++++++++++++++++++++++ net/rxrpc/peer_event.c | 41 ++++++----------------------------------- 3 files changed, 38 insertions(+), 36 deletions(-) commit 446b3e14525b477e441a6bb8ce56cea12512acc2 Author: David Howells Date: Mon Oct 10 10:55:24 2022 +0100 rxrpc: Move packet reception processing into I/O thread Split the packet input handler to make the softirq side just dump the received packet into the local endpoint receive queue and then call the remainder of the input function from the I/O thread. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 3 ++- net/rxrpc/call_event.c | 4 ++-- net/rxrpc/call_object.c | 2 +- net/rxrpc/io_thread.c | 61 ++++++++++++++++++++++++++++++++---------------- net/rxrpc/local_object.c | 2 +- 5 files changed, 47 insertions(+), 25 deletions(-) commit a275da62e8c111b897b9cb73eb91df2f4e475ca5 Author: David Howells Date: Mon Oct 10 08:45:20 2022 +0100 rxrpc: Create a per-local endpoint receive queue and I/O thread Create a per-local receive queue to which, in a future patch, all incoming packets will be directed and an I/O thread that will process those packets and perform all transmission of packets. Destruction of the local endpoint is also moved from the local processor work item (which will be absorbed) to the thread. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 10 ++++++++++ net/rxrpc/io_thread.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++- net/rxrpc/local_object.c | 39 ++++++++++++++++++++---------------- net/rxrpc/proc.c | 12 +++++++++--- 4 files changed, 91 insertions(+), 21 deletions(-) commit 96b2d69b43a075a38df600597133f17d28525f24 Author: David Howells Date: Thu Jan 23 13:01:33 2020 +0000 rxrpc: Split the receive code Split the code that handles packet reception in softirq mode as a prelude to moving all the packet processing beyond routing to the appropriate call and setting up of a new call out into process context. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/Makefile | 1 + net/rxrpc/ar-internal.h | 7 + net/rxrpc/input.c | 372 +----------------------------------------------- net/rxrpc/io_thread.c | 370 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 384 insertions(+), 366 deletions(-) commit 3cec055c56958c5498eeb3ed9fb2aef2d28c030f Author: David Howells Date: Fri Nov 25 12:43:50 2022 +0000 rxrpc: Don't hold a ref for connection workqueue Currently, rxrpc gives the connection's work item a ref on the connection when it queues it - and this is called from the timer expiration function. The problem comes when queue_work() fails (ie. the work item is already queued): the timer routine must put the ref - but this may cause the cleanup code to run. This has the unfortunate effect that the cleanup code may then be run in softirq context - which means that any spinlocks it might need to touch have to be guarded to disable softirqs (ie. they need a "_bh" suffix). (1) Don't give a ref to the work item. (2) Simplify handling of service connections by adding a separate active count so that the refcount isn't also used for this. (3) Connection destruction for both client and service connections can then be cleaned up by putting rxrpc_put_connection() out of line and making a tidy progression through the destruction code (offloaded to a workqueue if put from softirq or processor function context). The RCU part of the cleanup then only deals with the freeing at the end. (4) Make rxrpc_queue_conn() return immediately if it sees the active count is -1 rather then queuing the connection. (5) Make sure that the cleanup routine waits for the work item to complete. (6) Stash the rxrpc_net pointer in the conn struct so that the rcu free routine can use it, even if the local endpoint has been freed. Unfortunately, neither the timer nor the work item can simply get around the problem by just using refcount_inc_not_zero() as the waits would still have to be done, and there would still be the possibility of having to put the ref in the expiration function. Note the connection work item is mostly going to go away with the main event work being transferred to the I/O thread, so the wait in (6) will become obsolete. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 11 ++- net/rxrpc/ar-internal.h | 25 ++----- net/rxrpc/call_accept.c | 1 + net/rxrpc/conn_client.c | 31 ++------ net/rxrpc/conn_event.c | 4 - net/rxrpc/conn_object.c | 169 ++++++++++++++++++++++++------------------- net/rxrpc/conn_service.c | 4 +- net/rxrpc/net_ns.c | 2 +- net/rxrpc/proc.c | 5 +- 9 files changed, 123 insertions(+), 129 deletions(-) commit 3feda9d69c83983b530cea6287ba4fea0e5c3b87 Author: David Howells Date: Fri Nov 25 09:00:55 2022 +0000 rxrpc: Don't hold a ref for call timer or workqueue Currently, rxrpc gives the call timer a ref on the call when it starts it and this is passed along to the workqueue by the timer expiration function. The problem comes when queue_work() fails (ie. the work item is already queued): the timer routine must put the ref - but this may cause the cleanup code to run. This has the unfortunate effect that the cleanup code may then be run in softirq context - which means that any spinlocks it might need to touch have to be guarded to disable softirqs (ie. they need a "_bh" suffix). Fix this by: (1) Don't give a ref to the timer. (2) Making the expiration function not do anything if the refcount is 0. Note that this is more of an optimisation. (3) Make sure that the cleanup routine waits for timer to complete. However, this has a consequence that timer cannot give a ref to the work item. Therefore the following fixes are also necessary: (4) Don't give a ref to the work item. (5) Make the work item return asap if it sees the ref count is 0. (6) Make sure that the cleanup routine waits for the work item to complete. Unfortunately, neither the timer nor the work item can simply get around the problem by just using refcount_inc_not_zero() as the waits would still have to be done, and there would still be the possibility of having to put the ref in the expiration function. Note the call work item is going to go away with the work being transferred to the I/O thread, so the wait in (6) will become obsolete. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 6 +-- net/rxrpc/ar-internal.h | 6 +-- net/rxrpc/call_event.c | 11 ++--- net/rxrpc/call_object.c | 111 ++++++++++++++++--------------------------- net/rxrpc/txbuf.c | 2 + 5 files changed, 52 insertions(+), 84 deletions(-) commit 9a36a6bc22ca1c0a9d82228171e05dc785fa1154 Author: David Howells Date: Fri Oct 21 15:31:21 2022 +0100 rxrpc: trace: Don't use __builtin_return_address for sk_buff tracing In rxrpc tracing, use enums to generate lists of points of interest rather than __builtin_return_address() for the sk_buff tracepoint. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 57 +++++++++++++++++++++++++------------------- net/rxrpc/call_event.c | 4 ++-- net/rxrpc/call_object.c | 2 +- net/rxrpc/conn_event.c | 6 ++--- net/rxrpc/input.c | 36 ++++++++++++++-------------- net/rxrpc/local_event.c | 4 ++-- net/rxrpc/output.c | 6 ++--- net/rxrpc/peer_event.c | 8 +++---- net/rxrpc/recvmsg.c | 6 ++--- net/rxrpc/skbuff.c | 36 ++++++++++++---------------- 10 files changed, 84 insertions(+), 81 deletions(-) commit fa3492abb64b93b2b5d6fdf7a5b687a1fa810d74 Author: David Howells Date: Wed Nov 2 21:54:46 2022 +0000 rxrpc: Trace rxrpc_bundle refcount Add a tracepoint for the rxrpc_bundle refcounting. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 34 ++++++++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 4 ++-- net/rxrpc/conn_client.c | 27 ++++++++++++++++----------- net/rxrpc/conn_object.c | 2 +- net/rxrpc/conn_service.c | 3 ++- 5 files changed, 55 insertions(+), 15 deletions(-) commit cb0fc0c9722c0c001510e2a6d9b0a78b80421487 Author: David Howells Date: Fri Oct 21 14:39:26 2022 +0100 rxrpc: trace: Don't use __builtin_return_address for rxrpc_call tracing In rxrpc tracing, use enums to generate lists of points of interest rather than __builtin_return_address() for the rxrpc_call tracepoint Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 83 ++++++++++++++++++++--------------- net/rxrpc/ar-internal.h | 8 ++-- net/rxrpc/call_accept.c | 16 +++---- net/rxrpc/call_event.c | 8 ++-- net/rxrpc/call_object.c | 102 +++++++++++++++++++------------------------ net/rxrpc/conn_client.c | 2 +- net/rxrpc/input.c | 8 ++-- net/rxrpc/output.c | 2 +- net/rxrpc/peer_event.c | 2 +- net/rxrpc/recvmsg.c | 8 ++-- net/rxrpc/sendmsg.c | 4 +- 11 files changed, 121 insertions(+), 122 deletions(-) commit 7fa25105b2d32fcb0f38668bc20d0adf6508322f Author: David Howells Date: Fri Oct 21 14:06:16 2022 +0100 rxrpc: trace: Don't use __builtin_return_address for rxrpc_conn tracing In rxrpc tracing, use enums to generate lists of points of interest rather than __builtin_return_address() for the rxrpc_conn tracepoint Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 58 ++++++++++++++++++++++++++++---------------- net/rxrpc/ar-internal.h | 21 +++++++++------- net/rxrpc/call_accept.c | 9 +++---- net/rxrpc/call_object.c | 2 +- net/rxrpc/conn_client.c | 28 ++++++++++----------- net/rxrpc/conn_event.c | 4 +-- net/rxrpc/conn_object.c | 40 +++++++++++++++--------------- net/rxrpc/conn_service.c | 4 +-- net/rxrpc/input.c | 2 +- 9 files changed, 92 insertions(+), 76 deletions(-) commit 47c810a79844462d3468d831edc00971757693e0 Author: David Howells Date: Fri Oct 21 13:39:34 2022 +0100 rxrpc: trace: Don't use __builtin_return_address for rxrpc_peer tracing In rxrpc tracing, use enums to generate lists of points of interest rather than __builtin_return_address() for the rxrpc_peer tracepoint Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 43 ++++++++++++++++++++++++++----------------- net/rxrpc/af_rxrpc.c | 2 +- net/rxrpc/ar-internal.h | 11 ++++++----- net/rxrpc/call_accept.c | 8 +++++--- net/rxrpc/call_object.c | 2 +- net/rxrpc/conn_client.c | 8 ++++---- net/rxrpc/conn_object.c | 2 +- net/rxrpc/peer_event.c | 8 ++++---- net/rxrpc/peer_object.c | 34 ++++++++++++++++------------------ net/rxrpc/sendmsg.c | 2 +- 10 files changed, 65 insertions(+), 55 deletions(-) commit 0fde882fc9ee9cc2e66e8c5a5a93c83932d7ca95 Author: David Howells Date: Fri Oct 21 13:00:34 2022 +0100 rxrpc: trace: Don't use __builtin_return_address for rxrpc_local tracing In rxrpc tracing, use enums to generate lists of points of interest rather than __builtin_return_address() for the rxrpc_local tracepoint Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 49 ++++++++++++++++++++-------- net/rxrpc/af_rxrpc.c | 8 ++--- net/rxrpc/ar-internal.h | 41 ++++++++++++++++++----- net/rxrpc/call_accept.c | 4 +-- net/rxrpc/call_event.c | 2 +- net/rxrpc/conn_client.c | 2 +- net/rxrpc/conn_event.c | 4 +-- net/rxrpc/conn_object.c | 2 +- net/rxrpc/input.c | 4 +-- net/rxrpc/local_object.c | 78 ++++++++++++++++++++++++-------------------- net/rxrpc/output.c | 3 +- net/rxrpc/peer_event.c | 4 +-- net/rxrpc/peer_object.c | 4 +-- 13 files changed, 129 insertions(+), 76 deletions(-) commit f14febd8df5a490acc40b919808f163e997d7f03 Author: David Howells Date: Mon Nov 14 12:21:32 2022 +0000 rxrpc: Extract the code from a received ABORT packet much earlier Extract the code from a received rx ABORT packet much earlier and in a single place and harmonise the responses to malformed ABORT packets. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/conn_event.c | 12 +----------- net/rxrpc/input.c | 31 +++++++++++++++++++------------ 2 files changed, 20 insertions(+), 23 deletions(-) commit 2cc800863c49a1f4be1b10b756c09a878d3a3f00 Author: David Howells Date: Wed Oct 19 13:49:02 2022 +0100 rxrpc: Drop rxrpc_conn_parameters from rxrpc_connection and rxrpc_bundle Remove the rxrpc_conn_parameters struct from the rxrpc_connection and rxrpc_bundle structs and emplace the members directly. These are going to get filled in from the rxrpc_call struct in future. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 16 ++++++++++++-- net/rxrpc/call_accept.c | 6 +++--- net/rxrpc/call_event.c | 2 +- net/rxrpc/call_object.c | 6 +++--- net/rxrpc/conn_client.c | 53 ++++++++++++++++++++++++++++------------------- net/rxrpc/conn_event.c | 26 +++++++++++------------ net/rxrpc/conn_object.c | 22 ++++++++++---------- net/rxrpc/conn_service.c | 6 +++--- net/rxrpc/input.c | 4 ++-- net/rxrpc/key.c | 2 +- net/rxrpc/output.c | 32 ++++++++++++++-------------- net/rxrpc/proc.c | 6 +++--- net/rxrpc/rxkad.c | 54 ++++++++++++++++++++++++------------------------ net/rxrpc/security.c | 4 ++-- 14 files changed, 131 insertions(+), 108 deletions(-) commit e969c92ce597baf6aeff3f619d6c082d736575e0 Author: David Howells Date: Thu Oct 20 12:04:20 2022 +0100 rxrpc: Remove the [_k]net() debugging macros Remove the _net() and knet() debugging macros in favour of tracepoints. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 10 ---------- net/rxrpc/call_object.c | 6 ------ net/rxrpc/conn_client.c | 2 -- net/rxrpc/conn_object.c | 2 -- net/rxrpc/conn_service.c | 2 -- net/rxrpc/input.c | 1 - net/rxrpc/local_object.c | 8 -------- net/rxrpc/peer_event.c | 48 ++---------------------------------------------- net/rxrpc/peer_object.c | 6 +----- 9 files changed, 3 insertions(+), 82 deletions(-) commit 2ebdb26e6abd2a773ab5f009ac38a6de973a2bcf Author: David Howells Date: Thu Oct 20 11:51:06 2022 +0100 rxrpc: Remove the [k_]proto() debugging macros Remove the kproto() and _proto() debugging macros in preference to using tracepoints for this. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 60 ++++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 10 -------- net/rxrpc/conn_event.c | 4 --- net/rxrpc/input.c | 17 ------------- net/rxrpc/local_event.c | 3 --- net/rxrpc/output.c | 2 -- net/rxrpc/peer_event.c | 4 --- net/rxrpc/rxkad.c | 9 +++---- 8 files changed, 63 insertions(+), 46 deletions(-) commit 30efa3ce109d9e852a1a7bb9be19a414e633b1f0 Author: David Howells Date: Fri Nov 11 09:41:34 2022 +0000 rxrpc: Remove handling of duplicate packets in recvmsg_queue We should not now see duplicate packets in the recvmsg_queue. At one point, jumbo packets that overlapped with already queued data would be added to the queue and dealt with in recvmsg rather than in the softirq input code, but now jumbo packets are split/cloned before being processed by the input code and the subpackets can be discarded individually. So remove the recvmsg-side code for handling this. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/recvmsg.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 2ed83ed2be1b2395f11a95f0fec2b87ed71aebd8 Author: David Howells Date: Thu Nov 17 10:04:15 2022 +0000 rxrpc: Remove decl for rxrpc_kernel_call_is_complete() rxrpc_kernel_call_is_complete() has been removed, so remove its declaration too. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/net/af_rxrpc.h | 1 - 1 file changed, 1 deletion(-) commit 49df54a6b2953195243d037682cffb9038f9456a Author: David Howells Date: Mon Nov 28 09:24:06 2022 +0000 rxrpc: Fix call leak When retransmitting a packet, rxrpc_resend() shouldn't be attaching a ref to the call to the txbuf as that pins the call and prevents the call from clearing the packet buffer. Signed-off-by: David Howells Fixes: d57a3a151660 ("rxrpc: Save last ACK's SACK table rather than marking txbufs") cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/call_event.c | 1 - 1 file changed, 1 deletion(-) commit 75bfdbf2fca372e2709bcaa43e8cf1147766ae96 Author: David Howells Date: Thu Nov 3 22:27:52 2022 +0000 rxrpc: Implement an in-kernel rxperf server for testing purposes Implement an in-kernel rxperf server to allow kernel-based rxrpc services to be tested directly, unlike with AFS where they're accessed by the fileserver when the latter decides it wants to. This is implemented as a module that, if loaded, opens UDP port 7009 (afs3-rmtsys) and listens on it for incoming calls. Calls can be generated using the rxperf command shipped with OpenAFS, for example. Changes ======= ver #2) - Use min_t() instead of min(). Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: Jakub Kicinski include/net/af_rxrpc.h | 1 + net/rxrpc/Kconfig | 7 + net/rxrpc/Makefile | 3 + net/rxrpc/rxperf.c | 619 +++++++++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/server_key.c | 25 ++ 5 files changed, 655 insertions(+) commit 84924aac08a43169811b4814c67994a9154a6a82 Author: David Howells Date: Thu Dec 1 12:24:36 2022 +0000 rxrpc: Fix checker warning Fix the following checker warning: ../net/rxrpc/key.c:692:9: error: subtraction of different types can't work (different address spaces) Checker is wrong in this case, but cast the pointers to unsigned long to avoid the warning. Whilst we're at it, reduce the assertions to WARN_ON() and return an error. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/key.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 4b6c6065fca123d419afef005a696f51e6590470 Author: Juhee Kang Date: Wed Nov 30 01:12:44 2022 +0900 r8169: use tp_to_dev instead of open code The open code is defined as a helper function(tp_to_dev) on r8169_main.c, which the open code is &tp->pci_dev->dev. The helper function was added in commit 1e1205b7d3e9 ("r8169: add helper tp_to_dev"). And then later, commit f1e911d5d0df ("r8169: add basic phylib support") added r8169_phylink_handler function but it didn't use the helper function. Thus, tp_to_dev() replaces the open code. This patch doesn't change logic. Signed-off-by: Juhee Kang Reviewed-by: Heiner Kallweit Link: https://lore.kernel.org/r/20221129161244.5356-1-claudiajkang@gmail.com Signed-off-by: Paolo Abeni drivers/net/ethernet/realtek/r8169_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4d371d6e3746d84056f150fdaa66c85f65f60124 Author: Philipp Hortmann Date: Mon Nov 14 21:01:35 2022 +0100 wifi: cfg80211: Correct example of ieee80211_iface_limit Correct wrong closing bracket. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/20221114200135.GA100176@matrix-ESPRIMO-P710 Signed-off-by: Johannes Berg include/net/cfg80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13e5afd3d773c6fc6ca2b89027befaaaa1ea7293 Author: Zhengchao Shao Date: Thu Nov 17 14:45:00 2022 +0800 wifi: mac80211: fix memory leak in ieee80211_if_add() When register_netdevice() failed in ieee80211_if_add(), ndev->tstats isn't released. Fix it. Fixes: 5a490510ba5f ("mac80211: use per-CPU TX/RX statistics") Signed-off-by: Zhengchao Shao Link: https://lore.kernel.org/r/20221117064500.319983-1-shaozhengchao@huawei.com Signed-off-by: Johannes Berg net/mac80211/iface.c | 1 + 1 file changed, 1 insertion(+) commit 5cc58b376675981386c6192405fe887cd29c527a Author: Yuan Can Date: Tue Nov 29 01:42:11 2022 +0000 wifi: nl80211: Add checks for nla_nest_start() in nl80211_send_iface() As the nla_nest_start() may fail with NULL returned, the return value needs to be checked. Fixes: ce08cd344a00 ("wifi: nl80211: expose link information for interfaces") Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20221129014211.56558-1-yuancan@huawei.com Signed-off-by: Johannes Berg net/wireless/nl80211.c | 3 +++ 1 file changed, 3 insertions(+) commit 278ab9793116a8531ffaa52b4e61644971131e35 Author: Kees Cook Date: Wed Nov 30 13:26:45 2022 -0800 wifi: ieee80211: Do not open-code qos address offsets When building with -Wstringop-overflow, GCC's KASAN implementation does not correctly perform bounds checking within some complex structures when faced with literal offsets, and can get very confused. For example, this warning is seen due to literal offsets into sturct ieee80211_hdr that may or may not be large enough: drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c: In function 'iwl_mvm_rx_mpdu_mq': drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:2022:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 2022 | *qc &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT; In file included from drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h:32, from drivers/net/wireless/intel/iwlwifi/mvm/sta.h:15, from drivers/net/wireless/intel/iwlwifi/mvm/mvm.h:27, from drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:10: drivers/net/wireless/intel/iwlwifi/mvm/../fw/api/rx.h:559:16: note: at offset [78, 166] into destination object 'mpdu_len' of size 2 559 | __le16 mpdu_len; | ^~~~~~~~ Refactor ieee80211_get_qos_ctl() to avoid using literal offsets, requiring the creation of the actual structure that is described in the comments. Explicitly choose the desired offset, making the code more human-readable too. This is one of the last remaining warning to fix before enabling -Wstringop-overflow globally. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97490 Link: https://github.com/KSPP/linux/issues/181 Cc: Johannes Berg Cc: Kalle Valo Cc: Gregory Greenman Cc: "Gustavo A. R. Silva" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221130212641.never.627-kees@kernel.org Signed-off-by: Johannes Berg include/linux/ieee80211.h | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 9e855b1fe37f7ed6de7a2767edb49b851ab6c52f Merge: 682f560b8a87 87db82cb6149 Author: Paolo Abeni Date: Thu Dec 1 13:40:25 2022 +0100 Merge branch 'fix-rtnl_mutex-deadlock-with-dpaa2-and-sfp-modules' Vladimir Oltean says: ==================== Fix rtnl_mutex deadlock with DPAA2 and SFP modules This patch set deliberately targets net-next and lacks Fixes: tags due to caution on my part. While testing some SFP modules on the Solidrun Honeycomb LX2K platform, I noticed that rebooting causes a deadlock: ============================================ WARNING: possible recursive locking detected 6.1.0-rc5-07010-ga9b9500ffaac-dirty #656 Not tainted -------------------------------------------- systemd-shutdow/1 is trying to acquire lock: ffffa62db6cf42f0 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock+0x1c/0x30 but task is already holding lock: ffffa62db6cf42f0 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock+0x1c/0x30 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(rtnl_mutex); lock(rtnl_mutex); *** DEADLOCK *** May be due to missing lock nesting notation 6 locks held by systemd-shutdow/1: #0: ffffa62db6863c70 (system_transition_mutex){+.+.}-{4:4}, at: __do_sys_reboot+0xd4/0x260 #1: ffff2f2b0176f100 (&dev->mutex){....}-{4:4}, at: device_shutdown+0xf4/0x260 #2: ffff2f2b017be900 (&dev->mutex){....}-{4:4}, at: device_shutdown+0x104/0x260 #3: ffff2f2b017680f0 (&dev->mutex){....}-{4:4}, at: device_release_driver_internal+0x40/0x260 #4: ffff2f2b0e1608f0 (&dev->mutex){....}-{4:4}, at: device_release_driver_internal+0x40/0x260 #5: ffffa62db6cf42f0 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock+0x1c/0x30 stack backtrace: CPU: 6 PID: 1 Comm: systemd-shutdow Not tainted 6.1.0-rc5-07010-ga9b9500ffaac-dirty #656 Hardware name: SolidRun LX2160A Honeycomb (DT) Call trace: lock_acquire+0x68/0x84 __mutex_lock+0x98/0x460 mutex_lock_nested+0x2c/0x40 rtnl_lock+0x1c/0x30 sfp_bus_del_upstream+0x1c/0xac phylink_destroy+0x1c/0x50 dpaa2_mac_disconnect+0x28/0x70 dpaa2_eth_remove+0x1dc/0x1f0 fsl_mc_driver_remove+0x24/0x60 device_remove+0x70/0x80 device_release_driver_internal+0x1f0/0x260 device_links_unbind_consumers+0xe0/0x110 device_release_driver_internal+0x138/0x260 device_release_driver+0x18/0x24 bus_remove_device+0x12c/0x13c device_del+0x16c/0x424 fsl_mc_device_remove+0x28/0x40 __fsl_mc_device_remove+0x10/0x20 device_for_each_child+0x5c/0xac dprc_remove+0x94/0xb4 fsl_mc_driver_remove+0x24/0x60 device_remove+0x70/0x80 device_release_driver_internal+0x1f0/0x260 device_release_driver+0x18/0x24 bus_remove_device+0x12c/0x13c device_del+0x16c/0x424 fsl_mc_bus_remove+0x8c/0x10c fsl_mc_bus_shutdown+0x10/0x20 platform_shutdown+0x24/0x3c device_shutdown+0x15c/0x260 kernel_restart+0x40/0xa4 __do_sys_reboot+0x1e4/0x260 __arm64_sys_reboot+0x24/0x30 But fixing this appears to be not so simple. The patch set represents my attempt to address it. In short, the problem is that dpaa2_mac_connect() and dpaa2_mac_disconnect() call 2 phylink functions in a row, one takes rtnl_lock() itself - phylink_create(), and one which requires rtnl_lock() to be held by the caller - phylink_fwnode_phy_connect(). The existing approach in the drivers is too simple. We take rtnl_lock() when calling dpaa2_mac_connect(), which is what results in the deadlock. Fixing just that creates another problem. The drivers make use of rtnl_lock() for serializing with other code paths too. I think I've found all those code paths, and established other mechanisms for serializing with them. ==================== Link: https://lore.kernel.org/r/20221129141221.872653-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni commit 87db82cb614973a87a03ac298ad4ab4c5ca5d38e Author: Vladimir Oltean Date: Tue Nov 29 16:12:21 2022 +0200 net: dpaa2-mac: move rtnl_lock() only around phylink_{,dis}connect_phy() After the introduction of a private mac_lock that serializes access to priv->mac (and port_priv->mac in the switch), the only remaining purpose of rtnl_lock() is to satisfy the locking requirements of phylink_fwnode_phy_connect() and phylink_disconnect_phy(). But the functions these live in, dpaa2_mac_connect() and dpaa2_mac_disconnect(), have contradictory locking requirements. While phylink_fwnode_phy_connect() wants rtnl_lock() to be held, phylink_create() wants it to not be held. Move the rtnl_lock() from top-level (in the dpaa2-eth and dpaa2-switch drivers) to only surround the phylink calls that require it, in the dpaa2-mac library code. This is possible because dpaa2_mac_connect() and dpaa2_mac_disconnect() run unlocked, and there isn't any danger of an AB/BA deadlock between the rtnl_mutex and other private locks. Signed-off-by: Vladimir Oltean Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 ---- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 5 +++++ drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 4 ---- 3 files changed, 5 insertions(+), 8 deletions(-) commit 3c7f44fa9c4c8a9154935ca49e4cf45c14240335 Author: Vladimir Oltean Date: Tue Nov 29 16:12:20 2022 +0200 net: dpaa2-switch: serialize changes to priv->mac with a mutex The dpaa2-switch driver uses a DPMAC in the same way as the dpaa2-eth driver, so we need to duplicate the locking solution established by the previous change to the switch driver as well. Signed-off-by: Vladimir Oltean Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni .../freescale/dpaa2/dpaa2-switch-ethtool.c | 32 +++++++++++++++++----- .../net/ethernet/freescale/dpaa2/dpaa2-switch.c | 31 +++++++++++++++++++-- .../net/ethernet/freescale/dpaa2/dpaa2-switch.h | 2 ++ 3 files changed, 55 insertions(+), 10 deletions(-) commit 2291982e29b1aa6e628d3072ef533aeb6299945f Author: Vladimir Oltean Date: Tue Nov 29 16:12:19 2022 +0200 net: dpaa2-eth: serialize changes to priv->mac with a mutex The dpaa2 architecture permits dynamic connections between objects on the fsl-mc bus, specifically between a DPNI object (represented by a struct net_device) and a DPMAC object (represented by a struct phylink). The DPNI driver is notified when those connections are created/broken through the dpni_irq0_handler_thread() method. To ensure that ethtool operations, as well as netdev up/down operations serialize with the connection/disconnection of the DPNI with a DPMAC, dpni_irq0_handler_thread() takes the rtnl_lock() to block those other operations from taking place. There is code called by dpaa2_mac_connect() which wants to acquire the rtnl_mutex once again, see phylink_create() -> phylink_register_sfp() -> sfp_bus_add_upstream() -> rtnl_lock(). So the strategy doesn't quite work out, even though it's fairly simple. Create a different strategy, where all code paths in the dpaa2-eth driver access priv->mac only while they are holding priv->mac_lock. The phylink instance is not created or connected to the PHY under the priv->mac_lock, but only assigned to priv->mac then. This will eliminate the reliance on the rtnl_mutex. Add lockdep annotations and put comments where holding the lock is not necessary, and priv->mac can be dereferenced freely. Signed-off-by: Vladimir Oltean Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 43 ++++++++++++++-- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 6 +++ .../net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 58 ++++++++++++++++++---- 3 files changed, 91 insertions(+), 16 deletions(-) commit 55f90a4d07ec32279c622a25be4e2555ee9d7dff Author: Vladimir Oltean Date: Tue Nov 29 16:12:18 2022 +0200 net: dpaa2-eth: connect to MAC before requesting the "endpoint changed" IRQ dpaa2_eth_connect_mac() is called both from dpaa2_eth_probe() and from dpni_irq0_handler_thread(). It could happen that the DPNI gets connected to a DPMAC on the fsl-mc bus exactly during probe, as soon as the "endpoint change" interrupt is requested in dpaa2_eth_setup_irqs(). This will cause the dpni_irq0_handler_thread() to register a phylink instance for that DPMAC. Then, the probing function will also try to register a phylink instance for the same DPMAC, operation which should fail (and this will fail the probing of the driver). Reorder dpaa2_eth_setup_irqs() and dpaa2_eth_connect_mac(), such that dpni_irq0_handler_thread() never races with the DPMAC-related portion of the probing path. Also reorder dpaa2_eth_disconnect_mac() to be in the mirror position of dpaa2_eth_connect_mac() in the teardown path. Signed-off-by: Vladimir Oltean Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit bc230671bfb25c2d3c225f674fe6c03cea88d22e Author: Vladimir Oltean Date: Tue Nov 29 16:12:17 2022 +0200 net: dpaa2-switch replace direct MAC access with dpaa2_switch_port_has_mac() The helper function will gain a lockdep annotation in a future patch. Make sure to benefit from it. Signed-off-by: Vladimir Oltean Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29811d6e19d795efcf26644b66c4152abbac35a6 Author: Vladimir Oltean Date: Tue Nov 29 16:12:16 2022 +0200 net: dpaa2: publish MAC stringset to ethtool -S even if MAC is missing DPNIs and DPSW objects can connect and disconnect at runtime from DPMAC objects on the same fsl-mc bus. The DPMAC object also holds "ethtool -S" unstructured counters. Those counters are only shown for the entity owning the netdev (DPNI, DPSW) if it's connected to a DPMAC. The ethtool stringset code path is split into multiple callbacks, but currently, connecting and disconnecting the DPMAC takes the rtnl_lock(). This blocks the entire ethtool code path from running, see ethnl_default_doit() -> rtnl_lock() -> ops->prepare_data() -> strset_prepare_data(). This is going to be a problem if we are going to no longer require rtnl_lock() when connecting/disconnecting the DPMAC, because the DPMAC could appear between ops->get_sset_count() and ops->get_strings(). If it appears out of the blue, we will provide a stringset into an array that was dimensioned thinking the DPMAC wouldn't be there => array accessed out of bounds. There isn't really a good way to work around that, and I don't want to put too much pressure on the ethtool framework by playing locking games. Just make the DPMAC counters be always available. They'll be zeroes if the DPNI or DPSW isn't connected to a DPMAC. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 12 +++--------- drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c | 11 ++--------- 2 files changed, 5 insertions(+), 18 deletions(-) commit 88d64367cea019fa6197d0d97a85ac90279919b7 Author: Vladimir Oltean Date: Tue Nov 29 16:12:15 2022 +0200 net: dpaa2-switch: assign port_priv->mac after dpaa2_mac_connect() call The dpaa2-switch has the exact same locking requirements when connected to a DPMAC, so it needs port_priv->mac to always point either to NULL, or to a DPMAC with a fully initialized phylink instance. Make the same preparatory change in the dpaa2-switch driver as in the dpaa2-eth one. Signed-off-by: Vladimir Oltean Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 02d61948e8daf3844d0af41ba5d563ef03cc7c4f Author: Vladimir Oltean Date: Tue Nov 29 16:12:14 2022 +0200 net: dpaa2-eth: assign priv->mac after dpaa2_mac_connect() call There are 2 requirements for correct code: - Any time the driver accesses the priv->mac pointer at runtime, it either holds NULL to indicate a DPNI-DPNI connection (or unconnected DPNI), or a struct dpaa2_mac whose phylink instance was fully initialized (created and connected to the PHY). No changes are made to priv->mac while it is being used. Currently, rtnl_lock() watches over the call to dpaa2_eth_connect_mac(), so it serves the purpose of serializing this with all readers of priv->mac. - dpaa2_mac_connect() should run unlocked, because inside it are 2 phylink calls with incompatible locking requirements: phylink_create() requires that the rtnl_mutex isn't held, and phylink_fwnode_phy_connect() requires that the rtnl_mutex is held. The only way to solve those contradictory requirements is to let dpaa2_mac_connect() take rtnl_lock() when it needs to. To solve both requirements, we need to identify the writer side of the priv->mac pointer, which can be wrapped in a mutex private to the driver in a future patch. The dpaa2_mac_connect() cannot be part of the writer side critical section, because of an AB/BA deadlock with rtnl_lock(). So the strategy needs to be that where we prepare the DPMAC by calling dpaa2_mac_connect(), and only make priv->mac point to it once it's fully prepared. This ensures that the writer side critical section has the absolute minimum surface it can. The reverse strategy is adopted in the dpaa2_eth_disconnect_mac() code path. This makes sure that priv->mac is NULL when we start tearing down the DPMAC that we disconnected from, and concurrent code will simply not see it. No locking changes in this patch (concurrent code is still blocked by the rtnl_mutex). Signed-off-by: Vladimir Oltean Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit ccbd7822950fe9c7212d85a140ea18174f9b2c0f Author: Vladimir Oltean Date: Tue Nov 29 16:12:13 2022 +0200 net: dpaa2-mac: remove defensive check in dpaa2_mac_disconnect() dpaa2_mac_disconnect() will only be called with a NULL mac->phylink if dpaa2_mac_connect() failed, or was never called. The callers are these: dpaa2_eth_disconnect_mac(): if (dpaa2_eth_is_type_phy(priv)) dpaa2_mac_disconnect(priv->mac); dpaa2_switch_port_disconnect_mac(): if (dpaa2_switch_port_is_type_phy(port_priv)) dpaa2_mac_disconnect(port_priv->mac); priv->mac can be NULL, but in that case, dpaa2_eth_is_type_phy() returns false, and dpaa2_mac_disconnect() is never called. Similar for dpaa2-switch. When priv->mac is non-NULL, it means that dpaa2_mac_connect() returned zero (success), and therefore, priv->mac->phylink is also a valid pointer. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 3 --- 1 file changed, 3 deletions(-) commit 3853338881541093ce708beb6f26ce74b2a4fe0e Author: Vladimir Oltean Date: Tue Nov 29 16:12:12 2022 +0200 net: dpaa2-mac: absorb phylink_start() call into dpaa2_mac_start() The phylink handling is intended to be hidden inside the dpaa2_mac object. Move the phylink_start() call into dpaa2_mac_start(), and phylink_stop() into dpaa2_mac_stop(). Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 5 +---- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 8 ++++++++ drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 5 +---- 3 files changed, 10 insertions(+), 8 deletions(-) commit 320fefa9e2edc67011e235ea1d50f0d00ddfe004 Author: Vladimir Oltean Date: Tue Nov 29 16:12:11 2022 +0200 net: dpaa2: replace dpaa2_mac_is_type_fixed() with dpaa2_mac_is_type_phy() dpaa2_mac_is_type_fixed() is a header with no implementation and no callers, which is referenced from the documentation though. It can be deleted. On the other hand, it would be useful to reuse the code between dpaa2_eth_is_type_phy() and dpaa2_switch_port_is_type_phy(). That common code should be called dpaa2_mac_is_type_phy(), so let's create that. The removal and the addition are merged into the same patch because, in fact, is_type_phy() is the logical opposite of is_type_fixed(). Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni .../ethernet/freescale/dpaa2/mac-phy-support.rst | 9 ++++++--- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 7 +------ drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h | 10 ++++++++-- drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h | 7 +------ 4 files changed, 16 insertions(+), 17 deletions(-) commit 91c71bf14da49edaee5831ed3abd5837402e7a81 Author: Vladimir Oltean Date: Tue Nov 29 16:12:10 2022 +0200 net: dpaa2-eth: don't use -ENOTSUPP error code dpaa2_eth_setup_dpni() is called from the probe path and dpaa2_eth_set_link_ksettings() is propagated to user space. include/linux/errno.h says that ENOTSUPP is "Defined for the NFSv3 protocol". Conventional wisdom has it to not use it in networking drivers. Replace it with -EOPNOTSUPP. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 +- drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ebe11732838f39bd10bddafd4dfe2f97010fde62 Author: Lukas Bulwahn Date: Wed Nov 2 10:10:48 2022 +0100 clockevents: Repair kernel-doc for clockevent_delta2ns() Since the introduction of clockevents, i.e., commit d316c57ff6bf ("clockevents: add core functionality"), there has been a mismatch between the function and the kernel-doc comment for clockevent_delta2ns(). Hence, ./scripts/kernel-doc -none kernel/time/clockevents.c warns about it. Adjust the kernel-doc comment for clockevent_delta2ns() for make W=1 happiness. Signed-off-by: Lukas Bulwahn Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221102091048.15068-1-lukas.bulwahn@gmail.com kernel/time/clockevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c18b64bba3bcad1be94b404f47b94a04b91ce79 Author: John Thomson Date: Mon Nov 14 11:56:58 2022 +1000 mips: ralink: mt7621: do not use kzalloc too early With CONFIG_SLUB=y, following commit 6edf2576a6cc ("mm/slub: enable debugging memory wasting of kmalloc") mt7621 failed to boot very early, without showing any console messages. This exposed the pre-existing bug of mt7621.c using kzalloc before normal memory management was available. Prior to this slub change, there existed the unintended protection against "kmem_cache *s" being NULL as slab_pre_alloc_hook() happened to return NULL and bailed out of slab_alloc_node(). This allowed mt7621 prom_soc_init to fail in the soc_dev_init kzalloc, but continue booting without the SOC_BUS driver device registered. Console output from a DEBUG_ZBOOT vmlinuz kernel loading, with mm/slub modified to warn on kmem_cache zero or null: zimage at: 80B842A0 810B4BC0 Uncompressing Linux at load address 80001000 Copy device tree to address 80B80EE0 Now, booting the kernel... [ 0.000000] Linux version 6.1.0-rc3+ (john@john) (mipsel-buildroot-linux-gnu-gcc.br_real (Buildroot 2021.11-4428-g6b6741b) 12.2.0, GNU ld (GNU Binutils) 2.39) #73 SMP Wed Nov 2 05:10:01 AEST 2022 [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: CPU: 0 PID: 0 at mm/slub.c:3416 kmem_cache_alloc+0x5a4/0x5e8 [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.1.0-rc3+ #73 [ 0.000000] Stack : 810fff78 80084d98 00000000 00000004 00000000 00000000 80889d04 80c90000 [ 0.000000] 80920000 807bd328 8089d368 80923bd3 00000000 00000001 80889cb0 00000000 [ 0.000000] 00000000 00000000 807bd328 8084bcb1 00000002 00000002 00000001 6d6f4320 [ 0.000000] 00000000 80c97d3d 80c97d68 fffffffc 807bd328 00000000 00000000 00000000 [ 0.000000] 00000000 a0000000 80910000 8110a0b4 00000000 00000020 80010000 80010000 [ 0.000000] ... [ 0.000000] Call Trace: [ 0.000000] [<80008260>] show_stack+0x28/0xf0 [ 0.000000] [<8070c958>] dump_stack_lvl+0x60/0x80 [ 0.000000] [<8002e184>] __warn+0xc4/0xf8 [ 0.000000] [<8002e210>] warn_slowpath_fmt+0x58/0xa4 [ 0.000000] [<801c0fac>] kmem_cache_alloc+0x5a4/0x5e8 [ 0.000000] [<8092856c>] prom_soc_init+0x1fc/0x2b4 [ 0.000000] [<80928060>] prom_init+0x44/0xf0 [ 0.000000] [<80929214>] setup_arch+0x4c/0x6a8 [ 0.000000] [<809257e0>] start_kernel+0x88/0x7c0 [ 0.000000] [ 0.000000] ---[ end trace 0000000000000000 ]--- [ 0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3 [ 0.000000] printk: bootconsole [early0] enabled Allowing soc_device_register to work exposed oops in the mt7621 phy pci, and pci controller drivers from soc_device_match_attr, due to missing sentinels in the quirks tables. These were fixed with: commit 819b885cd886 ("phy: ralink: mt7621-pci: add sentinel to quirks table") not yet applied ("PCI: mt7621: add sentinel to quirks table") Link: https://lore.kernel.org/linux-mm/becf2ac3-2a90-4f3a-96d9-a70f67c66e4a@app.fastmail.com/ Fixes: 71b9b5e0130d ("MIPS: ralink: mt7621: introduce 'soc_device' initialization") Signed-off-by: John Thomson Signed-off-by: Thomas Bogendoerfer arch/mips/ralink/mt7621.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit b4767d4c072583dec987225b6fe3f5524a735f42 Author: John Thomson Date: Mon Nov 14 11:56:57 2022 +1000 mips: ralink: mt7621: soc queries and tests as functions Move the SoC register value queries and tests to specific functions, to remove repetition of logic No functional changes intended Signed-off-by: John Thomson Signed-off-by: Thomas Bogendoerfer arch/mips/ralink/mt7621.c | 86 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 25 deletions(-) commit a2cab953b4c077cc02878d424466d3a6eac32aaf Author: John Thomson Date: Mon Nov 14 11:56:56 2022 +1000 mips: ralink: mt7621: define MT7621_SYSC_BASE with __iomem So that MT7621_SYSC_BASE can be used later in multiple functions without needing to repeat this __iomem declaration each time Signed-off-by: John Thomson Signed-off-by: Thomas Bogendoerfer arch/mips/include/asm/mach-ralink/mt7621.h | 4 +++- arch/mips/ralink/mt7621.c | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit 0591b14ce0398125439c759f889647369aa616a0 Author: Rui Zhang Date: Thu Dec 1 11:38:06 2022 +0800 regulator: core: fix use_count leakage when handling boot-on I found a use_count leakage towards supply regulator of rdev with boot-on option. ┌───────────────────┐ ┌───────────────────┐ │ regulator_dev A │ │ regulator_dev B │ │ (boot-on) │ │ (boot-on) │ │ use_count=0 │◀──supply──│ use_count=1 │ │ │ │ │ └───────────────────┘ └───────────────────┘ In case of rdev(A) configured with `regulator-boot-on', the use_count of supplying regulator(B) will increment inside regulator_enable(rdev->supply). Thus, B will acts like always-on, and further balanced regulator_enable/disable cannot actually disable it anymore. However, B was also configured with `regulator-boot-on', we wish it could be disabled afterwards. Signed-off-by: Rui Zhang Link: https://lore.kernel.org/r/20221201033806.2567812-1-zr.zhang@vivo.com Signed-off-by: Mark Brown drivers/regulator/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 969357ec94e670571d6593f2a93aba25e4577d4f Author: David Rau Date: Mon Nov 21 05:07:44 2022 +0000 ASoC: da7219: Fix pole orientation detection on OMTP headsets when playing music The OMTP pin define headsets can be mis-detected as line out instead of OMTP, causing obvious issues with audio quality. This patch is to put increased resistances within the device at a suitable point. To solve this issue better, the new mechanism setup ground switches with conditional delay control and these allow for more stabile detection process to operate as intended. This conditional delay control will not impact the hardware process but use extra system resource. This commit improves control of ground switches in the AAD logic. Signed-off-by: David Rau Link: https://lore.kernel.org/r/20221121050744.2278-1-david.rau.zg@renesas.com Signed-off-by: Mark Brown sound/soc/codecs/da7219-aad.c | 42 ++++++++++++++++++++++++++++++++++++------ sound/soc/codecs/da7219-aad.h | 1 + 2 files changed, 37 insertions(+), 6 deletions(-) commit 7dbfa445ff7393d1c4c066c1727c9e0af1251958 Author: Alexander Sverdlin Date: Wed Nov 30 17:29:27 2022 +0100 spi: spidev: mask SPI_CS_HIGH in SPI_IOC_RD_MODE Commit f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") has changed the user-space interface so that bogus SPI_CS_HIGH started to appear in the mask returned by SPI_IOC_RD_MODE even for active-low CS pins. Commit 138c9c32f090 ("spi: spidev: Fix CS polarity if GPIO descriptors are used") fixed only SPI_IOC_WR_MODE part of the problem. Let's fix SPI_IOC_RD_MODE symmetrically. Test case: #include #include #include int main(int argc, char **argv) { char modew = SPI_CPHA; char moder; int f = open("/dev/spidev0.0", O_RDWR); if (f < 0) return 1; ioctl(f, SPI_IOC_WR_MODE, &modew); ioctl(f, SPI_IOC_RD_MODE, &moder); return moder == modew ? 0 : 2; } Fixes: f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20221130162927.539512-1-alexander.sverdlin@siemens.com Signed-off-by: Mark Brown drivers/spi/spidev.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 682f560b8a87bfdf174e836640e6ec66a2b3cd9c Author: Dan Carpenter Date: Tue Nov 29 12:43:47 2022 +0300 net: microchip: sparx5: Fix error handling in vcap_show_admin() If vcap_dup_rule() fails that leads to an error pointer dereference side the call to vcap_free_rule(). Also it only returns an error if the very last call to vcap_read_rule() fails and it returns success for other errors. I've changed it to just stop printing after the first error and return an error code. Fixes: 3a7921560d2f ("net: microchip: sparx5: Add VCAP rule debugFS support for the VCAP API") Signed-off-by: Dan Carpenter Reviewed-by: Steen Hegelund Link: https://lore.kernel.org/r/Y4XUUx9kzurBN+BV@kili Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 75ee07b03fc6ec0a7ac7407f9ea7b3e981efb28f Author: Zong-Zhe Yang Date: Tue Nov 29 16:31:30 2022 +0800 wifi: rtw89: link rtw89_vif and chanctx stuffs First, introduce struct rtw89_sub_entity for chanctx related stuffs. Second, add enum rtw89_sub_entity_idx to rtw89_vif for vif operation to access its/right chanctx stuffs after future multi-channel support. Besides, RTW89_SUB_ENTITY_0 is the default chanctx entry throughout driver, i.e. it's used for things which may not have a target chanctx yet. So, we need to ensure that RTW89_SUB_ENTITY_0 is always working. If there is at least one alive chanctx, then one of them must take RTW89_SUB_ENTITY_0. If no alive chanctx, RTW89_SUB_ENTITY_0 will be filled by rtw89_config_default_chandef(). Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129083130.45708-7-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/chan.c | 40 ++++++++++++++++++++++++--- drivers/net/wireless/realtek/rtw89/core.h | 20 +++++++++----- drivers/net/wireless/realtek/rtw89/mac80211.c | 1 + 3 files changed, 50 insertions(+), 11 deletions(-) commit c008c4b011baa26b9545f7be10e746c97409d45b Author: Zong-Zhe Yang Date: Tue Nov 29 16:31:29 2022 +0800 wifi: rtw89: fw: implement MCC related H2C These MCC H2C(s) require to wait for MCC C2H to determine if the execution is successful. Through rtw89_wait_for_cond(), we make them wait for either a completion with data from MCC C2H handlers, which calls rtw89_complete_cond(), or timeout. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129083130.45708-6-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/fw.c | 329 ++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/fw.h | 369 +++++++++++++++++++++++++++++++- 2 files changed, 697 insertions(+), 1 deletion(-) commit ef9dff4cb491210518ad3d249919a0971eff601b Author: Zong-Zhe Yang Date: Tue Nov 29 16:31:28 2022 +0800 wifi: rtw89: mac: process MCC related C2H Process C2H(s) related to MCC (multi-channel concurrency). These handling, which either call rtw89_complete_cond() or show message in debug mode, can be considered atomic/lock-free. So, they should be safe to be processed directly after C2H pre-check in previous patch. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129083130.45708-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 2 + drivers/net/wireless/realtek/rtw89/core.h | 5 + drivers/net/wireless/realtek/rtw89/fw.h | 68 ++++++++++++ drivers/net/wireless/realtek/rtw89/mac.c | 171 ++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/mac.h | 34 ++++++ 5 files changed, 280 insertions(+) commit 22b10cdb73921cfb28ccde5ce8b47d7fc434e7c6 Author: Zong-Zhe Yang Date: Tue Nov 29 16:31:27 2022 +0800 wifi: rtw89: introduce helpers to wait/complete on condition MCC (multi-channel concurrency) related H2Cs (host to chip commands) require to wait for C2H (chip to host events) responses to judge the execution result and data. We introduce helpers to assist this process. Besides, we would like the helpers to be generic for use in driver even outside of MCC H2C/C2H, so we make a independent patch for them. In the following, I describe the things first. ``` (A) C2H is generated by FW, and then transferred upto driver. Hence, driver cannot get it immediately without a bit waitting/blocking. For this, we choose to use wait_for_completion_*() instead of busy polling. (B) From the driver management perspective, a scenario, e.g. MCC, may have mulitple kind of H2C functions requiring this process to wait for corresponding C2Hs. But, the driver management flow uses mutex to protect each behavior. So, one scenario triggers one H2C function at one time. To avoid rampant instances of struct completion for each H2C function, we choose to use one struct completion with one condition flag for one scenario. (C) C2Hs, which H2Cs will be waitting for, cannot be ordered with driver management flow, i.e. cannot enqueue work to the same ordered workqueue and cannot lock by the same mutex, to prevent H2C side from getting no C2H responses. So, those C2Hs are parsed in interrupt context directly as done in previous commit. (D) Following (C), the above underline H2Cs and C2Hs will be handled in different contexts without sync. So, we use atomic_cmpxchg() to compare and change the condition in atomic. ``` So, we introduce struct rtw89_wait_info which combines struct completion and atomic_t. Then, the below are the descriptions for helper functions. * rtw89_wait_for_cond() to wait for a completion based on a condition. * rtw89_complete_cond() to complete a given condition and carry data. Each rtw89_wait_info instance independently determines the meaning of its waitting conditions. But, RTW89_WAIT_COND_IDLE (UINT_MAX) is reserved. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129083130.45708-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 35 +++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/core.h | 25 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) commit 860e8263ae92667a2002163886fd2ebd8c67f699 Author: Zong-Zhe Yang Date: Tue Nov 29 16:31:26 2022 +0800 wifi: rtw89: check if atomic before queuing c2h Before queuing C2H work, we check atomicity of the C2H's handler first now. If atomic or lock-free, handle it directly; otherwise, handle it with mutex in work as previous. This prepares for MAC MCC C2Hs which require to be processed directly. And, their handlers will be functions which can be considered atomic. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129083130.45708-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/fw.c | 47 +++++++++++++++++++++++++++++--- drivers/net/wireless/realtek/rtw89/fw.h | 14 ++++++++++ drivers/net/wireless/realtek/rtw89/mac.c | 10 +++++++ drivers/net/wireless/realtek/rtw89/mac.h | 1 + 4 files changed, 68 insertions(+), 4 deletions(-) commit 38f25dec521edfa289fa0b829676927b13fede91 Author: Zong-Zhe Yang Date: Tue Nov 29 16:31:25 2022 +0800 wifi: rtw89: rfk: rename rtw89_mcc_info to rtw89_rfk_mcc_info The `rtw89_mcc_info mcc` is only for RFK MCC stuffs instead of common MCC management info. Replace it with `rtw89_rfk_mcc_info rfk_mcc` to avoid confusion and reserve `struct rtw89_mcc_info mcc` for MCC management code. (No logic changes.) Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129083130.45708-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 4 ++-- drivers/net/wireless/realtek/rtw89/fw.c | 10 +++++----- drivers/net/wireless/realtek/rtw89/rtw8852c.c | 4 ++-- drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c | 20 ++++++++++---------- 4 files changed, 19 insertions(+), 19 deletions(-) commit 7c57d3dc43812653726902aae95ac9b36aa7e3ec Author: Ping-Ke Shih Date: Mon Nov 28 15:56:53 2022 +0800 wifi: rtw88: 8821c: enable BT device recovery mechanism 8821ce is a combo card, and BT is a USB device that could get card lost during stress test, and need WiFi firmware to detect and recover it, so driver sends a H2C to enable this mechanism. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221128075653.5221-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw88/fw.c | 10 ++++++++++ drivers/net/wireless/realtek/rtw88/fw.h | 6 ++++++ drivers/net/wireless/realtek/rtw88/mac.c | 18 +++++++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) commit a215b2b7055f02d8f7666f457d442e77097bb604 Author: Ping-Ke Shih Date: Fri Nov 25 15:24:16 2022 +0800 wifi: rtw89: 8852b: turn off PoP function in monitor mode PoP stands for Packet on Packet that can improve performance in noisy environment, but it could get RX stuck suddenly. In normal mode, firmware can help to resolve the stuck, but firmware doesn't work in monitor mode. Therefore, turn off PoP to avoid RX stuck. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221125072416.94752-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/reg.h | 2 ++ drivers/net/wireless/realtek/rtw89/rtw8852b.c | 7 +++++++ 2 files changed, 9 insertions(+) commit 51e8ed4e44b5efcf8da2c1f3478e52120a12cdf8 Author: Ping-Ke Shih Date: Fri Nov 25 15:24:15 2022 +0800 wifi: rtw89: add HE radiotap for monitor mode With basic HE radiotap, we can check data rate in sniffer data. To store the radiotap data, we reserve headroom of aligned 64 bytes, and then update HE radiotap in monitor mode, so it doesn't affect performance in normal mode. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221125072416.94752-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 22 ++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/core.h | 18 ++++++++++++++++++ drivers/net/wireless/realtek/rtw89/pci.c | 2 +- 3 files changed, 41 insertions(+), 1 deletion(-) commit cd9b6b3baf5278c73c91e242d41387684fc7f8d8 Author: Zong-Zhe Yang Date: Fri Nov 25 15:24:14 2022 +0800 wifi: rtw89: enable mac80211 virtual monitor interface For running with mac80211 channel context ops and using only as monitor, we need to enable WANT_MONITOR_VIF to let mac80211 process virtual monitor interface. Then, we are able to set channel on the monitor from user space. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221125072416.94752-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4920ab131b2dbae7464b72bdcac465d070254209 Author: Minsuk Kang Date: Wed Nov 16 23:29:52 2022 +0900 wifi: brcmfmac: Check the count value of channel spec to prevent out-of-bounds reads This patch fixes slab-out-of-bounds reads in brcmfmac that occur in brcmf_construct_chaninfo() and brcmf_enable_bw40_2g() when the count value of channel specifications provided by the device is greater than the length of 'list->element[]', decided by the size of the 'list' allocated with kzalloc(). The patch adds checks that make the functions free the buffer and return -EINVAL if that is the case. Note that the negative return is handled by the caller, brcmf_setup_wiphybands() or brcmf_cfg80211_attach(). Found by a modified version of syzkaller. Crash Report from brcmf_construct_chaninfo(): ================================================================== BUG: KASAN: slab-out-of-bounds in brcmf_setup_wiphybands+0x1238/0x1430 Read of size 4 at addr ffff888115f24600 by task kworker/0:2/1896 CPU: 0 PID: 1896 Comm: kworker/0:2 Tainted: G W O 5.14.0+ #132 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+0x57/0x7d print_address_description.constprop.0.cold+0x93/0x334 kasan_report.cold+0x83/0xdf brcmf_setup_wiphybands+0x1238/0x1430 brcmf_cfg80211_attach+0x2118/0x3fd0 brcmf_attach+0x389/0xd40 brcmf_usb_probe+0x12de/0x1690 usb_probe_interface+0x25f/0x710 really_probe+0x1be/0xa90 __driver_probe_device+0x2ab/0x460 driver_probe_device+0x49/0x120 __device_attach_driver+0x18a/0x250 bus_for_each_drv+0x123/0x1a0 __device_attach+0x207/0x330 bus_probe_device+0x1a2/0x260 device_add+0xa61/0x1ce0 usb_set_configuration+0x984/0x1770 usb_generic_driver_probe+0x69/0x90 usb_probe_device+0x9c/0x220 really_probe+0x1be/0xa90 __driver_probe_device+0x2ab/0x460 driver_probe_device+0x49/0x120 __device_attach_driver+0x18a/0x250 bus_for_each_drv+0x123/0x1a0 __device_attach+0x207/0x330 bus_probe_device+0x1a2/0x260 device_add+0xa61/0x1ce0 usb_new_device.cold+0x463/0xf66 hub_event+0x10d5/0x3330 process_one_work+0x873/0x13e0 worker_thread+0x8b/0xd10 kthread+0x379/0x450 ret_from_fork+0x1f/0x30 Allocated by task 1896: kasan_save_stack+0x1b/0x40 __kasan_kmalloc+0x7c/0x90 kmem_cache_alloc_trace+0x19e/0x330 brcmf_setup_wiphybands+0x290/0x1430 brcmf_cfg80211_attach+0x2118/0x3fd0 brcmf_attach+0x389/0xd40 brcmf_usb_probe+0x12de/0x1690 usb_probe_interface+0x25f/0x710 really_probe+0x1be/0xa90 __driver_probe_device+0x2ab/0x460 driver_probe_device+0x49/0x120 __device_attach_driver+0x18a/0x250 bus_for_each_drv+0x123/0x1a0 __device_attach+0x207/0x330 bus_probe_device+0x1a2/0x260 device_add+0xa61/0x1ce0 usb_set_configuration+0x984/0x1770 usb_generic_driver_probe+0x69/0x90 usb_probe_device+0x9c/0x220 really_probe+0x1be/0xa90 __driver_probe_device+0x2ab/0x460 driver_probe_device+0x49/0x120 __device_attach_driver+0x18a/0x250 bus_for_each_drv+0x123/0x1a0 __device_attach+0x207/0x330 bus_probe_device+0x1a2/0x260 device_add+0xa61/0x1ce0 usb_new_device.cold+0x463/0xf66 hub_event+0x10d5/0x3330 process_one_work+0x873/0x13e0 worker_thread+0x8b/0xd10 kthread+0x379/0x450 ret_from_fork+0x1f/0x30 The buggy address belongs to the object at ffff888115f24000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1536 bytes inside of 2048-byte region [ffff888115f24000, ffff888115f24800) Memory state around the buggy address: ffff888115f24500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888115f24580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888115f24600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888115f24680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888115f24700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Crash Report from brcmf_enable_bw40_2g(): ================================================================== BUG: KASAN: slab-out-of-bounds in brcmf_cfg80211_attach+0x3d11/0x3fd0 Read of size 4 at addr ffff888103787600 by task kworker/0:2/1896 CPU: 0 PID: 1896 Comm: kworker/0:2 Tainted: G W O 5.14.0+ #132 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+0x57/0x7d print_address_description.constprop.0.cold+0x93/0x334 kasan_report.cold+0x83/0xdf brcmf_cfg80211_attach+0x3d11/0x3fd0 brcmf_attach+0x389/0xd40 brcmf_usb_probe+0x12de/0x1690 usb_probe_interface+0x25f/0x710 really_probe+0x1be/0xa90 __driver_probe_device+0x2ab/0x460 driver_probe_device+0x49/0x120 __device_attach_driver+0x18a/0x250 bus_for_each_drv+0x123/0x1a0 __device_attach+0x207/0x330 bus_probe_device+0x1a2/0x260 device_add+0xa61/0x1ce0 usb_set_configuration+0x984/0x1770 usb_generic_driver_probe+0x69/0x90 usb_probe_device+0x9c/0x220 really_probe+0x1be/0xa90 __driver_probe_device+0x2ab/0x460 driver_probe_device+0x49/0x120 __device_attach_driver+0x18a/0x250 bus_for_each_drv+0x123/0x1a0 __device_attach+0x207/0x330 bus_probe_device+0x1a2/0x260 device_add+0xa61/0x1ce0 usb_new_device.cold+0x463/0xf66 hub_event+0x10d5/0x3330 process_one_work+0x873/0x13e0 worker_thread+0x8b/0xd10 kthread+0x379/0x450 ret_from_fork+0x1f/0x30 Allocated by task 1896: kasan_save_stack+0x1b/0x40 __kasan_kmalloc+0x7c/0x90 kmem_cache_alloc_trace+0x19e/0x330 brcmf_cfg80211_attach+0x3302/0x3fd0 brcmf_attach+0x389/0xd40 brcmf_usb_probe+0x12de/0x1690 usb_probe_interface+0x25f/0x710 really_probe+0x1be/0xa90 __driver_probe_device+0x2ab/0x460 driver_probe_device+0x49/0x120 __device_attach_driver+0x18a/0x250 bus_for_each_drv+0x123/0x1a0 __device_attach+0x207/0x330 bus_probe_device+0x1a2/0x260 device_add+0xa61/0x1ce0 usb_set_configuration+0x984/0x1770 usb_generic_driver_probe+0x69/0x90 usb_probe_device+0x9c/0x220 really_probe+0x1be/0xa90 __driver_probe_device+0x2ab/0x460 driver_probe_device+0x49/0x120 __device_attach_driver+0x18a/0x250 bus_for_each_drv+0x123/0x1a0 __device_attach+0x207/0x330 bus_probe_device+0x1a2/0x260 device_add+0xa61/0x1ce0 usb_new_device.cold+0x463/0xf66 hub_event+0x10d5/0x3330 process_one_work+0x873/0x13e0 worker_thread+0x8b/0xd10 kthread+0x379/0x450 ret_from_fork+0x1f/0x30 The buggy address belongs to the object at ffff888103787000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1536 bytes inside of 2048-byte region [ffff888103787000, ffff888103787800) Memory state around the buggy address: ffff888103787500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888103787580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888103787600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888103787680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888103787700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Reported-by: Dokyung Song Reported-by: Jisoo Jang Reported-by: Minsuk Kang Reviewed-by: Arend van Spriel Signed-off-by: Minsuk Kang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221116142952.518241-1-linuxlovemin@yonsei.ac.kr .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 7365df19e8ff7a031e1557616fc0b3aa6d794d7e Author: Xu Panda Date: Wed Nov 30 16:01:41 2022 +0800 printk: use strscpy() to instead of strlcpy() 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: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/202211301601416229001@zte.com.cn kernel/printk/printk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 035629547999d0e9095886f248c2580dc56f36c6 Author: Lukas Bulwahn Date: Wed Nov 23 09:31:59 2022 +0100 clocksource/drivers/ingenic-ost: Define pm functions properly in platform_driver struct Commit ca7b72b5a5f2 ("clocksource: Add driver for the Ingenic JZ47xx OST") adds the struct platform_driver ingenic_ost_driver, with the definition of pm functions under the non-existing config PM_SUSPEND, which means the intended pm functions were never actually included in any build. As the only callbacks are .suspend_noirq and .resume_noirq, we can assume that it is intended to be CONFIG_PM_SLEEP. Since commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones"), the default pattern for platform_driver definitions conditional for CONFIG_PM_SLEEP is to use pm_sleep_ptr(). As __maybe_unused annotations on the dev_pm_ops structure and its callbacks are not needed anymore, remove these as well. Suggested-by: Paul Cercueil Signed-off-by: Lukas Bulwahn Signed-off-by: Thomas Gleixner Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20221123083159.22821-1-lukas.bulwahn@gmail.com drivers/clocksource/ingenic-ost.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 3f44f7156f59cae06e9160eafb5d8b2dfd09e639 Author: Wolfram Sang Date: Wed Nov 30 22:06:09 2022 +0100 clocksource/drivers/sh_cmt: Access registers according to spec Documentation for most CMTs say that it takes two input clocks before changes propagate to the timer. This is especially relevant when the timer is stopped to change further settings. Implement the delays according to the spec. To avoid unnecessary delays in atomic mode, also check if the to-be-written value actually differs. CMCNT is a bit special because testing showed that it requires 3 cycles to propagate, which affects all CMTs. Also, the WRFLAG needs to be checked before writing. This fixes "cannot clear CMCNT" messages which occur often on R-Car Gen4 SoCs, but only very rarely on older SoCs for some reason. Fixes: 81b3b2711072 ("clocksource: sh_cmt: Add support for multiple channels per device") Signed-off-by: Wolfram Sang Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221130210609.7718-1-wsa+renesas@sang-engineering.com drivers/clocksource/sh_cmt.c | 88 +++++++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 33 deletions(-) commit f466fad9872e4d549e4fc3e1cb3356693978b2ac Author: Genjian Zhang Date: Thu Nov 24 13:58:16 2022 +0800 MIPS: Restore symbol versions for copy_page_cpu and clear_page_cpu The mips build generates two warnings: WARNING: modpost: EXPORT symbol "clear_page_cpu" [vmlinux] version generation failed, symbol will not be versioned. WARNING: modpost: EXPORT symbol "copy_page_cpu" [vmlinux] version generation failed, symbol will not be versioned. Add their prototypes to be defined in asm-prototypes.h, so that genksyms knows the types of these symbols and can generate CRCs for them. Reported-by: k2ci Signed-off-by: Genjian Zhang Signed-off-by: Thomas Bogendoerfer arch/mips/include/asm/asm-prototypes.h | 3 +++ 1 file changed, 3 insertions(+) commit 43b46e6bc69c2aa4331cfd7fa4e2943a894339e5 Author: Arınç ÜNAL Date: Wed Nov 30 17:10:39 2022 +0300 mips: dts: remove label = "cpu" from DSA dt-binding This is not used by the DSA dt-binding, so remove it from all devicetrees. Signed-off-by: Arınç ÜNAL Acked-by: Sergio Paracuellos Reviewed-by: Oleksij Rempel Signed-off-by: Thomas Bogendoerfer arch/mips/boot/dts/qca/ar9331.dtsi | 1 - arch/mips/boot/dts/ralink/mt7621.dtsi | 1 - 2 files changed, 2 deletions(-) commit cda52fe3da84891172cddef85b711cb36ddcf06a Author: Arınç ÜNAL Date: Tue Nov 29 14:17:11 2022 +0300 mips: ralink: mt7621: change DSA port labels to generic naming Change the labels of the DSA ports to generic naming for switch ports. Signed-off-by: Arınç ÜNAL Signed-off-by: Thomas Bogendoerfer arch/mips/boot/dts/ralink/mt7621.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 82e918f967ae580e6af79085f906794ca156a08b Author: Arınç ÜNAL Date: Tue Nov 29 00:32:38 2022 +0300 mips: ralink: mt7621: fix phy-mode of external phy on GB-PC2 The phy-mode property must be defined on the MAC instead of the PHY. Define phy-mode under gmac1 which the external phy is connected to. Tested-by: Petr Louda Signed-off-by: Arınç ÜNAL Acked-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6c494e8ee932b2b21ff4b718eebb378e91b3da0 Author: Jann Horn Date: Wed Nov 30 12:53:20 2022 +0100 vdso/timens: Refactor copy-pasted find_timens_vvar_page() helper into one copy find_timens_vvar_page() is not architecture-specific, as can be seen from how all five per-architecture versions of it are the same. (arm64, powerpc and riscv are exactly the same; x86 and s390 have two characters difference inside a comment, less blank lines, and mark the !CONFIG_TIME_NS version as inline.) Refactor the five copies into a central copy in kernel/time/namespace.c. Signed-off-by: Jann Horn Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221130115320.2918447-1-jannh@google.com arch/arm64/kernel/vdso.c | 22 ---------------------- arch/powerpc/kernel/vdso.c | 22 ---------------------- arch/riscv/kernel/vdso.c | 22 ---------------------- arch/s390/kernel/vdso.c | 20 -------------------- arch/x86/entry/vdso/vma.c | 23 ----------------------- include/linux/time_namespace.h | 6 ++++++ kernel/time/namespace.c | 18 ++++++++++++++++++ 7 files changed, 24 insertions(+), 109 deletions(-) commit 5c2e5a0cf5b12c156b0cb07af43b51627c086480 Author: Alexander Gordeev Date: Fri Jun 18 08:39:12 2021 +0200 s390/cio: sort out physical vs virtual pointers usage This does not fix a real bug, since virtual addresses are currently indentical to physical ones. Use virt_to_phys() for intparm interrupt parameter to convert a 64-bit virtual address to the 32-bit physical address, which is expected to be below 2GB. Reviewed-by: Peter Oberparleiter Signed-off-by: Alexander Gordeev drivers/s390/cio/chsc_sch.c | 3 ++- drivers/s390/cio/cio.c | 14 +++++++------- drivers/s390/cio/device.c | 2 +- drivers/s390/cio/device_fsm.c | 13 +++++++------ drivers/s390/cio/device_id.c | 2 +- drivers/s390/cio/device_pgid.c | 11 ++++++----- drivers/s390/cio/device_status.c | 3 ++- drivers/s390/cio/eadm_sch.c | 9 +++++---- drivers/s390/cio/fcx.c | 23 ++++++++++++----------- drivers/s390/cio/itcw.c | 3 ++- 10 files changed, 45 insertions(+), 38 deletions(-) commit e5214f363dabca240446272dac54d404501ad5e5 Author: Dan Carpenter Date: Mon Nov 28 14:06:14 2022 +0300 bonding: uninitialized variable in bond_miimon_inspect() The "ignore_updelay" variable needs to be initialized to false. Fixes: f8a65ab2f3ff ("bonding: fix link recovery in mode 2 when updelay is nonzero") Signed-off-by: Dan Carpenter Reviewed-by: Pavan Chebbi Acked-by: Jay Vosburgh Link: https://lore.kernel.org/r/Y4SWJlh3ohJ6EPTL@kili Signed-off-by: Paolo Abeni drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ff150aa6fe252e9b7713cf737c4dc5cbaa263ab Author: Melody Olvera Date: Fri Nov 18 10:24:16 2022 -0800 dt-bindings: cpufreq: cpufreq-qcom-hw: Add QDU1000/QRU1000 cpufreq Add cpufreq epss for QDU1000 and QRU1000 SoCs. Signed-off-by: Melody Olvera Reviewed-by: Krzysztof Kozlowski Signed-off-by: Viresh Kumar Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 1 + 1 file changed, 1 insertion(+) commit 32eb6453328c372a11559a21a53e5280ad44a421 Author: Christophe JAILLET Date: Sun Nov 20 18:19:02 2022 +0100 cpufreq: tegra186: Use flexible array to simplify memory allocation Use flexible array to simplify memory allocation. It saves some memory, avoids an indirection when reading the 'clusters' array and removes some LoC. Detailed explanation: ==================== Knowing that: - each devm_ allocation over-allocates 40 bytes for internal needs - Some rounding is done by the memory allocator on 8, 16, 32, 64, 96, 128, 192, 256, 512, 1024, 2048, 4096, 8192 boundaries and that: - sizeof(struct tegra186_cpufreq_data) = 24 - sizeof(struct tegra186_cpufreq_cluster) = 16 Memory allocations in tegra186_cpufreq_probe() are: data: (24 + 40) = 64 => 64 bytes data->clusters: (2 * 16 + 40) = 72 => 96 bytes So a total of 160 bytes are allocated. 56 for the real need, 80 for internal uses and 24 are wasted. If 'struct tegra186_cpufreq_data' is reordered so that 'clusters' is a flexible array: - it saves one pointer in the structure - only one allocation is needed So, only 96 bytes are allocated: 16 + 2 * 16 + 40 = 88 => 96 bytes Signed-off-by: Christophe JAILLET Signed-off-by: Viresh Kumar drivers/cpufreq/tegra186-cpufreq.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 10aa7cd398a9ead7464a7f8b49d4e4c843806813 Author: Yang Yang Date: Wed Nov 30 17:44:37 2022 +0800 IB/hfi1: Switch to netif_napi_add() There is no need to use netif_napi_add_weight() when the weight argument is 64. See "net: drop the weight argument from netif_napi_add". Signed-off-by: Yang Yang Link: https://lore.kernel.org/r/202211301744378304494@zte.com.cn Reviewed-by: xu xin Reviewed-by: Zhang Yunkai Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/netdev_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a89474aaf7cf27f2299e0a00fb64c94b6ad338a9 Author: Jason A. Donenfeld Date: Tue Nov 22 03:04:01 2022 +0100 efi: stub: use random seed from EFI variable EFI has a rather unique benefit that it has access to some limited non-volatile storage, where the kernel can store a random seed. Read that seed in EFISTUB and concatenate it with other seeds we wind up passing onward to the kernel in the configuration table. This is complementary to the current other two sources - previous bootloaders, and the EFI RNG protocol. Signed-off-by: Jason A. Donenfeld [ardb: check for non-NULL RNG protocol pointer, call GetVariable() without buffer first to obtain the size] Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/random.c | 68 ++++++++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 16 deletions(-) commit 63ffb573df66aea034d07fd00483d0a3cd4fed66 Author: Jason A. Donenfeld Date: Tue Nov 22 03:04:00 2022 +0100 efi: vars: prohibit reading random seed variables In anticipation of putting random seeds in EFI variables, it's important that the random GUID namespace of variables remains hidden from userspace. We accomplish this by not populating efivarfs with entries from that GUID, as well as denying the creation of new ones in that GUID. Signed-off-by: Jason A. Donenfeld Signed-off-by: Ard Biesheuvel fs/efivarfs/inode.c | 4 ++++ fs/efivarfs/super.c | 3 +++ 2 files changed, 7 insertions(+) commit 4e9050e5f95d94bea67ccd00c2719108649bee36 Author: Takashi Sakamoto Date: Thu Dec 1 12:01:00 2022 +0900 ALSA: dice: Remove left-over license text Following a commit 1dd0dd0b1fef ("ALSA: firewire: Remove some left-over license text in sound/firewire"), this patch removes it added carelessly. Fixes: 2133dc91d665 ("ALSA: dice: add support for Focusrite Saffire Pro 40 with TCD3070 ASIC") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20221201030100.31495-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai sound/firewire/dice/dice-focusrite.c | 2 -- 1 file changed, 2 deletions(-) commit 46115b276b21a781ddc119cc7bf8e1ea510ce458 Merge: bc66fa87d4fd 953d771587e2 Author: Jakub Kicinski Date: Wed Nov 30 22:05:19 2022 -0800 Merge tag 'mlx5-updates-2022-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2022-11-29 Misc update for mlx5 driver 1) Various trivial cleanups 2) Maor Dickman, Adds support for trap offload with additional actions 3) From Tariq, UMR (device memory registrations) cleanups, UMR WQE must be aligned to 64B per device spec, (not a bug fix). * tag 'mlx5-updates-2022-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: Support devlink reload of IPsec core net/mlx5e: TC, Add offload support for trap with additional actions net/mlx5e: Do early return when setup vports dests for slow path flow net/mlx5: Remove redundant check net/mlx5e: Delete always true DMA check net/mlx5e: Don't access directly DMA device pointer net/mlx5e: Don't use termination table when redundant net/mlx5: Fix orthography errors in documentation net/mlx5: Use generic definition for UMR KLM alignment net/mlx5: Generalize name of UMR alignment definition net/mlx5: Remove unused UMR MTT definitions net/mlx5e: Add padding when needed in UMR WQEs net/mlx5: Remove unused ctx variables net/mlx5e: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper net/mlx5e: Remove unneeded io-mapping.h #include ==================== Link: https://lore.kernel.org/r/20221130051152.479480-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit bc66fa87d4fda9053a8145e5718fc278c2b88253 Author: Xiaolei Wang Date: Wed Nov 30 10:12:16 2022 +0800 net: phy: Add link between phy dev and mac dev If the external phy used by current mac interface is managed by another mac interface, it means that this network port cannot work independently, especially when the system suspends and resumes, the following trace may appear, so we should create a device link between phy dev and mac dev. WARNING: CPU: 0 PID: 24 at drivers/net/phy/phy.c:983 phy_error+0x20/0x68 Modules linked in: CPU: 0 PID: 24 Comm: kworker/0:2 Not tainted 6.1.0-rc3-00011-g5aaef24b5c6d-dirty #34 Hardware name: Freescale i.MX6 SoloX (Device Tree) Workqueue: events_power_efficient phy_state_machine unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x68/0x90 dump_stack_lvl from __warn+0xb4/0x24c __warn from warn_slowpath_fmt+0x5c/0xd8 warn_slowpath_fmt from phy_error+0x20/0x68 phy_error from phy_state_machine+0x22c/0x23c phy_state_machine from process_one_work+0x288/0x744 process_one_work from worker_thread+0x3c/0x500 worker_thread from kthread+0xf0/0x114 kthread from ret_from_fork+0x14/0x28 Exception stack(0xf0951fb0 to 0xf0951ff8) Signed-off-by: Xiaolei Wang Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20221130021216.1052230-1-xiaolei.wang@windriver.com Signed-off-by: Jakub Kicinski drivers/net/phy/phy_device.c | 12 ++++++++++++ include/linux/phy.h | 4 ++++ 2 files changed, 16 insertions(+) commit 281f82037cba97c95f9d78ec0e09cadf4d2f865a Merge: a933e7f05bd4 cf4590b91db4 Author: Jakub Kicinski Date: Wed Nov 30 21:49:42 2022 -0800 Merge branch 'net-devlink-return-the-driver-name-in-devlink_nl_info_fill' Vincent Mailhol says: ==================== net: devlink: return the driver name in devlink_nl_info_fill The driver name is available in device_driver::name. Right now, drivers still have to report this piece of information themselves in their devlink_ops::info_get callback function. The goal of this series is to have the devlink core to report this information instead of the drivers. The first patch fulfills the actual goal of this series: modify devlink core to report the driver name and clean-up all drivers. Both have to be done in an atomic change to avoid attribute duplication. This same patch also removes the devlink_info_driver_name_put() function to prevent future drivers from reporting the driver name themselves. The second patch allows the core to call devlink_nl_info_fill() even if the devlink_ops::info_get() callback is NULL. This leads to the third and final patch which cleans up the drivers which have an empty info_get(). ==================== Link: https://lore.kernel.org/r/20221129095140.3913303-1-mailhol.vincent@wanadoo.fr Signed-off-by: Jakub Kicinski commit cf4590b91db4083b8716289dcfd95097195c6829 Author: Vincent Mailhol Date: Tue Nov 29 18:51:40 2022 +0900 net: devlink: clean-up empty devlink_ops::info_get() devlink_ops::info_get() is now optional and devlink will continue to report information even if that callback gets removed. Remove all the empty devlink_ops::info_get() callbacks from the drivers. Signed-off-by: Vincent Mailhol Reviewed-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/fungible/funeth/funeth_devlink.c | 7 ------- drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c | 7 ------- drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c | 8 -------- 3 files changed, 22 deletions(-) commit c5cd7c86847cda0fdd44956561c0f3d9adea032b Author: Vincent Mailhol Date: Tue Nov 29 18:51:39 2022 +0900 net: devlink: make the devlink_ops::info_get() callback optional Some drivers only reported the driver name in their devlink_ops::info_get() callback. Now that the core provides this information, the callback became empty. For such drivers, just removing the callback would prevent the core from executing devlink_nl_info_fill() meaning that "devlink dev info" would not return anything. Make the callback function optional by executing devlink_nl_info_fill() even if devlink_ops::info_get() is NULL. N.B.: the drivers with devlink support which previously did not implement devlink_ops::info_get() will now also be able to report the driver name. Signed-off-by: Vincent Mailhol Reviewed-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 226bf980550627c88549b112ac6c8fb40873afb4 Author: Vincent Mailhol Date: Tue Nov 29 18:51:38 2022 +0900 net: devlink: let the core report the driver name instead of the drivers The driver name is available in device_driver::name. Right now, drivers still have to report this piece of information themselves in their devlink_ops::info_get callback function. In order to factorize code, make devlink_nl_info_fill() add the driver name attribute. Now that the core sets the driver name attribute, drivers are not supposed to call devlink_info_driver_name_put() anymore. Remove devlink_info_driver_name_put() and clean-up all the drivers using this function in their callback. Signed-off-by: Vincent Mailhol Tested-by: Ido Schimmel # mlxsw Reviewed-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski .../crypto/marvell/octeontx2/otx2_cpt_devlink.c | 4 ---- drivers/net/dsa/hirschmann/hellcreek.c | 5 ----- drivers/net/dsa/mv88e6xxx/devlink.c | 5 ----- drivers/net/dsa/sja1105/sja1105_devlink.c | 12 +++------- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 4 ---- .../ethernet/freescale/dpaa2/dpaa2-eth-devlink.c | 11 +-------- .../net/ethernet/fungible/funeth/funeth_devlink.c | 2 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c | 5 ----- .../hisilicon/hns3/hns3vf/hclgevf_devlink.c | 5 ----- drivers/net/ethernet/intel/ice/ice_devlink.c | 6 ----- .../ethernet/marvell/octeontx2/af/rvu_devlink.c | 2 +- .../ethernet/marvell/octeontx2/nic/otx2_devlink.c | 9 +------- .../ethernet/marvell/prestera/prestera_devlink.c | 5 ----- drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 4 ---- drivers/net/ethernet/mellanox/mlxsw/core.c | 5 ----- drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 4 ---- .../net/ethernet/pensando/ionic/ionic_devlink.c | 4 ---- drivers/net/ethernet/qlogic/qed/qed_devlink.c | 4 ---- drivers/net/netdevsim/dev.c | 3 --- drivers/ptp/ptp_ocp.c | 4 ---- include/net/devlink.h | 2 -- net/core/devlink.c | 26 +++++++++++++++------- 22 files changed, 25 insertions(+), 106 deletions(-) commit a933e7f05bd413bcfd5fb103ad86519526a49446 Author: Luca Weiss Date: Mon Nov 28 18:37:43 2022 +0100 dt-bindings: nfc: nxp,nci: Document NQ310 compatible The NQ310 is another NFC chip from NXP, document the compatible in the bindings. Signed-off-by: Luca Weiss Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221128173744.833018-1-luca@z3ntu.xyz Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d862176238d078c5d3f5b19b76f36bf1ef802f3b Merge: c1d8e3fb1a3b 3af4b40b0f2f Author: Jakub Kicinski Date: Wed Nov 30 20:54:39 2022 -0800 Merge branch 'support-direct-read-from-region' Jacob Keller says: ==================== support direct read from region A long time ago when initially implementing devlink regions in ice I proposed the ability to allow reading from a region without taking a snapshot [1]. I eventually dropped this work from the original series due to size. Then I eventually lost track of submitting this follow up. This can be useful when interacting with some region that has some definitive "contents" from which snapshots are made. For example the ice driver has regions representing the contents of the device flash. If userspace wants to read the contents today, it must first take a snapshot and then read from that snapshot. This makes sense if you want to read a large portion of data or you want to be sure reads are consistently from the same recording of the flash. However if user space only wants to read a small chunk, it must first generate a snapshot of the entire contents, perform a read from the snapshot, and then delete the snapshot after reading. For such a use case, a direct read from the region makes more sense. This can be achieved by allowing the devlink region read command to work without a snapshot. Instead the portion to be read can be forwarded directly to the driver via a new .read callback. This avoids the need to read the entire region contents into memory first and avoids the software overhead of creating a snapshot and then deleting it. This series implements such behavior and hooks up the ice NVM and shadow RAM regions to allow it. [1] https://lore.kernel.org/netdev/20200130225913.1671982-1-jacob.e.keller@intel.com/ ==================== Link: https://lore.kernel.org/r/20221128203647.1198669-1-jacob.e.keller@intel.com Signed-off-by: Jakub Kicinski commit 3af4b40b0f2f194d32e90cc5d25ebb3daa96cd1f Author: Jacob Keller Date: Mon Nov 28 12:36:47 2022 -0800 ice: implement direct read for NVM and Shadow RAM regions Implement the .read handler for the NVM and Shadow RAM regions. This enables user space to read a small chunk of the flash without needing the overhead of creating a full snapshot. Update the documentation for ice to detail which regions have direct read support. Signed-off-by: Jacob Keller Acked-by: Jakub Kicinski Signed-off-by: Jakub Kicinski Documentation/networking/devlink/ice.rst | 8 +++- drivers/net/ethernet/intel/ice/ice_devlink.c | 69 ++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 2 deletions(-) commit 2d0197843f9e23c72e3c34303c3a4832bd81b3c3 Author: Jacob Keller Date: Mon Nov 28 12:36:46 2022 -0800 ice: document 'shadow-ram' devlink region 78ad87da9978 ("ice: devlink: add shadow-ram region to snapshot Shadow RAM") added support for the 'shadow-ram' devlink region, but did not document it in the ice devlink documentation. Fix this. Signed-off-by: Jacob Keller Acked-by: Jakub Kicinski Signed-off-by: Jakub Kicinski Documentation/networking/devlink/ice.rst | 5 +++++ 1 file changed, 5 insertions(+) commit ed23debec5d197956fbda4ad8fad66d910c6a6b6 Author: Jacob Keller Date: Mon Nov 28 12:36:45 2022 -0800 ice: use same function to snapshot both NVM and Shadow RAM The ice driver supports a region for both the flat NVM contents as well as the Shadow RAM which is a layer built on top of the flash during device initialization. These regions use an almost identical read function, except that the NVM needs to set the direct flag when reading, while Shadow RAM needs to read without the direct flag set. They each call ice_read_flat_nvm with the only difference being whether to set the direct flash flag. The NVM region read function also was fixed to read the NVM in blocks to avoid a situation where the firmware reclaims the lock due to taking too long. Note that the region snapshot function takes the ops pointer so the function can easily determine which region to read. Make use of this and re-use the NVM snapshot function for both the NVM and Shadow RAM regions. This makes Shadow RAM benefit from the same block approach as the NVM region. It also reduces code in the ice driver. Signed-off-by: Jacob Keller Acked-by: Jakub Kicinski Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_devlink.c | 95 +++++++--------------------- 1 file changed, 23 insertions(+), 72 deletions(-) commit af6397c9ee2b42988c912dcad2fca1f43d5c1c99 Author: Jacob Keller Date: Mon Nov 28 12:36:44 2022 -0800 devlink: support directly reading from region memory To read from a region, user space must currently request a new snapshot of the region and then read from that snapshot. This can sometimes be overkill if user space only reads a tiny portion. They first create the snapshot, then request a read, then destroy the snapshot. For regions which have a single underlying "contents", it makes sense to allow supporting direct reading of the region data. Extend the DEVLINK_CMD_REGION_READ to allow direct reading from a region if requested via the new DEVLINK_ATTR_REGION_DIRECT. If this attribute is set, then perform a direct read instead of using a snapshot. Direct read is mutually exclusive with DEVLINK_ATTR_REGION_SNAPSHOT_ID, and care is taken to ensure that we reject commands which provide incorrect attributes. Regions must enable support for direct read by implementing the .read() callback function. If a region does not support such direct reads, a suitable extended error message is reported. Signed-off-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski .../networking/devlink/devlink-region.rst | 13 ++++ include/net/devlink.h | 16 +++++ include/uapi/linux/devlink.h | 2 + net/core/devlink.c | 80 +++++++++++++++++----- 4 files changed, 94 insertions(+), 17 deletions(-) commit 2d4caf0988bd3e9663c300e95cead91f2f954fae Author: Jacob Keller Date: Mon Nov 28 12:36:43 2022 -0800 devlink: refactor region_read_snapshot_fill to use a callback function The devlink_nl_region_read_snapshot_fill is used to copy the contents of a snapshot into a message for reporting to userspace via the DEVLINK_CMG_REGION_READ netlink message. A future change is going to add support for directly reading from a region. Almost all of the logic for this new capability is identical. To help reduce code duplication and make this logic more generic, refactor the function to take a cb and cb_priv pointer for doing the actual copy. Add a devlink_region_snapshot_fill implementation that will simply copy the relevant chunk of the region. This does require allocating some storage for the chunk as opposed to simply passing the correct address forward to the devlink_nl_cmg_region_read_chunk_fill function. A future change to implement support for directly reading from a region without a snapshot will provide a separate implementation that calls the newly added devlink region operation. Signed-off-by: Jacob Keller Acked-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) commit 284e9d1ebbe2944d95120f85054d161a6fccbf7f Author: Jacob Keller Date: Mon Nov 28 12:36:42 2022 -0800 devlink: remove unnecessary parameter from chunk_fill function The devlink parameter of the devlink_nl_cmd_region_read_chunk_fill function is not used. Remove it, to simplify the function signature. Once removed, it is also obvious that the devlink parameter is not necessary for the devlink_nl_region_read_snapshot_fill either. Signed-off-by: Jacob Keller Acked-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit e004ea10599d1a8279e959c86e63fc9d0bf2032b Author: Jacob Keller Date: Mon Nov 28 12:36:41 2022 -0800 devlink: find snapshot in devlink_nl_cmd_region_read_dumpit The snapshot pointer is obtained inside of the function devlink_nl_region_read_snapshot_fill. Simplify this function by locating the snapshot upfront in devlink_nl_cmd_region_read_dumpit instead. This aligns with how other netlink attributes are handled, and allows us to exit slightly earlier if an invalid snapshot ID is provided. It also allows us to pass the snapshot pointer directly to the devlink_nl_region_read_snapshot_fill, and remove the now unused attrs parameter. Signed-off-by: Jacob Keller Acked-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 611fd12ce0fbc809d5e54febb1f39e93532c9deb Author: Jacob Keller Date: Mon Nov 28 12:36:40 2022 -0800 devlink: report extended error message in region_read_dumpit() Report extended error details in the devlink_nl_cmd_region_read_dumpit() function, by using the extack structure from the netlink_callback. Signed-off-by: Jacob Keller Acked-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 28e0c250f17ab3b6eb4dcee1a8208125bc77c61e Author: Jacob Keller Date: Mon Nov 28 12:36:39 2022 -0800 devlink: use min_t to calculate data_size The calculation for the data_size in the devlink_nl_read_snapshot_fill function uses an if statement that is better expressed using the min_t macro. Signed-off-by: Jacob Keller Acked-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c1d8e3fb1a3bef6d1b24a9b1326e4ed11a1fbf0b Author: Horatiu Vultur Date: Mon Nov 28 15:29:59 2022 +0100 net: microchip: vcap: Change how the rule id is generated Currently whenever a new rule id is generated, it picks up the next number bigger than previous id. So it would always be 1, 2, 3, etc. When the rule with id 1 will be deleted and a new rule will be added, it will have the id 4 and not id 1. In theory this can be a problem if at some point a rule will be added and removed ~0 times. Then no more rules can be added because there are no more ids. Change this such that when a new rule is added, search for an empty rule id starting with value of 1 as value 0 is reserved. Fixes: c9da1ac1c212 ("net: microchip: sparx5: Adding initial tc flower support for VCAP API") Signed-off-by: Horatiu Vultur Link: https://lore.kernel.org/r/20221128142959.8325-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/vcap/vcap_api.c | 7 +------ drivers/net/ethernet/microchip/vcap/vcap_api.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) commit 450f065053967f446afafc39328776b473305378 Author: Christophe JAILLET Date: Fri Nov 25 13:24:01 2022 +0100 octeontx2-af: Simplify a size computation in rvu_npc_exact_init() We know that table_size = table->mem_table.depth * table->mem_table.ways, so use it instead, it is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/5230dabe27f48948a9fd0f50a62e2437b65e6a6e.1669378798.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d135d9e2b004024b84bd7c308f58300b64d29b6 Author: Christophe JAILLET Date: Fri Nov 25 13:24:00 2022 +0100 octeontx2-af: Fix the size of memory allocated for the 'id_bmap' bitmap This allocation is really spurious. The size of the bitmap is 'tot_ids' and it is used as such in the driver. So we could expect something like: table->id_bmap = devm_kcalloc(rvu->dev, BITS_TO_LONGS(table->tot_ids), sizeof(long), GFP_KERNEL); However, when the bitmap is allocated, we allocate: BITS_TO_LONGS(table->tot_ids) * table->tot_ids ~= table->tot_ids / 32 * table->tot_ids ~= table->tot_ids^2 / 32 It is proportional to the square of 'table->tot_ids' which seems to potentially be big. Allocate the expected amount of memory, and switch to the bitmap API to have it more straightforward. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/ce2710771939065d68f95d86a27cf7cea7966365.1669378798.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 05a7b52ee5e489a0caf52299ee73c18409c086b3 Author: Christophe JAILLET Date: Fri Nov 25 13:23:59 2022 +0100 octeontx2-af: Use the bitmap API to allocate bitmaps Use devm_bitmap_zalloc() instead of hand-writing it. This also makes the comment "Allocate bitmap for 32 entry mcam" more explicit because now 32 is really used in the allocation function, instead of an obscure 'sizeof(long)'. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/24177a9ee7043259448b735263d9cfd6a70e89a4.1669378798.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b6a0ecaee2e683479353d0403fa31dcb4bd2be3a Author: Christophe JAILLET Date: Fri Nov 25 13:23:58 2022 +0100 octeontx2-af: Slightly simplify rvu_npc_exact_init() Use kzalloc() instead of kmalloc()/memset(). Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/60ea220ccf3b61963f7d5a97e3df2c76a5feb837.1669378798.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2450d7d93fd2424dfacbf4aebf3fa8829df9d16e Author: Christophe JAILLET Date: Fri Nov 25 13:23:57 2022 +0100 octeontx2-af: Fix a potentially spurious error message When this error message is displayed, we know that the all the bits in the bitmap are set. So, bitmap_weight() will return the number of bits of the bitmap, which is 'table->tot_ids'. It is unlikely that a bit will be cleared between mutex_unlock() and dev_err(), but, in order to simplify the code and avoid this possibility, just take 'table->tot_ids'. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/5ce01c402f86412dc57884ff0994b63f0c5b3871.1669378798.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68ad83188d782b2ecef2e41ac245d27e0710fe8e Author: Arun Easi Date: Tue Nov 29 01:26:34 2022 -0800 scsi: qla2xxx: Fix crash when I/O abort times out While performing CPU hotplug, a crash with the following stack was seen: Call Trace: qla24xx_process_response_queue+0x42a/0x970 [qla2xxx] qla2x00_start_nvme_mq+0x3a2/0x4b0 [qla2xxx] qla_nvme_post_cmd+0x166/0x240 [qla2xxx] nvme_fc_start_fcp_op.part.0+0x119/0x2e0 [nvme_fc] blk_mq_dispatch_rq_list+0x17b/0x610 __blk_mq_sched_dispatch_requests+0xb0/0x140 blk_mq_sched_dispatch_requests+0x30/0x60 __blk_mq_run_hw_queue+0x35/0x90 __blk_mq_delay_run_hw_queue+0x161/0x180 blk_execute_rq+0xbe/0x160 __nvme_submit_sync_cmd+0x16f/0x220 [nvme_core] nvmf_connect_admin_queue+0x11a/0x170 [nvme_fabrics] nvme_fc_create_association.cold+0x50/0x3dc [nvme_fc] nvme_fc_connect_ctrl_work+0x19/0x30 [nvme_fc] process_one_work+0x1e8/0x3c0 On abort timeout, completion was called without checking if the I/O was already completed. Verify that I/O and abort request are indeed outstanding before attempting completion. Fixes: 71c80b75ce8f ("scsi: qla2xxx: Do command completion on abort timeout") Reported-by: Marco Patalano Tested-by: Marco Patalano Cc: stable@vger.kernel.org Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20221129092634.15347-1-njavali@marvell.com Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 7fb42780d06c3417b21c3f31b6b99fd8e9ca6084 Author: Mike Christie Date: Mon Nov 21 21:26:03 2022 -0600 nvme: Convert NVMe errors to PR errors This converts the NVMe errors we commonly see during PR handling to PR_STS errors or -Exyz errors. pr_ops callers can then handle SCSI and NVMe errors without knowing the device types. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20221122032603.32766-5-michael.christie@oracle.com Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/nvme/host/core.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit 04b3c8c0025a1d91a0e133e9b2734a002960f472 Author: Mike Christie Date: Mon Nov 21 21:26:02 2022 -0600 scsi: sd: Convert SCSI errors to PR errors This converts the SCSI errors we commonly see during PR handling to PR_STS errors or -Exyz errors. pr_ops callers can then handle SCSI and NVMe errors without knowing the device types. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20221122032603.32766-4-michael.christie@oracle.com Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 35 ++++++++++++++++++++++++++++++++++- include/scsi/scsi.h | 1 + 2 files changed, 35 insertions(+), 1 deletion(-) commit c9293c1199ecd3cfa07931ec3630f37dba1ca1b8 Author: Mike Christie Date: Mon Nov 21 21:26:01 2022 -0600 scsi: core: Rename status_byte to sg_status_byte The next patch adds a helper status_byte function that works like host_byte, so this patch renames the old status_byte to sg_status_byte since it's only used for SG IO. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20221122032603.32766-3-michael.christie@oracle.com Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_ioctl.c | 2 +- drivers/scsi/sg.c | 2 +- include/scsi/sg.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 255c4f4a6d5b60cfcd218d8fdae517b886ff155a Author: Mike Christie Date: Mon Nov 21 21:26:00 2022 -0600 block: Add error codes for common PR failures If a PR operation fails we can return a device-specific error which is impossible to handle in some cases because we could have a mix of devices when DM is used, or future users like LIO only knows it's interacting with a block device so it doesn't know the type. This patch adds a new pr_status enum so drivers can convert errors to a common type which can be handled by the caller. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20221122032603.32766-2-michael.christie@oracle.com Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen include/uapi/linux/pr.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 9f5436f47c58463f91bfeebcc4613138625098c2 Author: Johannes Thumshirn Date: Wed Nov 30 02:36:16 2022 -0800 scsi: sd: sd_zbc: Trace zone append emulation Add tracepoints to the SCSI zone append emulation in order to trace the zone start to write-pointer aligned LBA translation and the corresponding completion. Signed-off-by: Johannes Thumshirn Link: https://lore.kernel.org/r/d103bcf5f90139143469f2a0084c74bd9e03ad4a.1669804487.git.johannes.thumshirn@wdc.com Reviewed-by: Christoph Hellwig Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen drivers/scsi/sd_trace.h | 84 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/sd_zbc.c | 6 ++++ 2 files changed, 90 insertions(+) commit 6456ab5d7ccd4fae6e136025480ad4ad91a7c795 Author: Christophe JAILLET Date: Sat Nov 26 12:13:27 2022 +0100 scsi: libfc: Include the correct header This file does not use rcu, so there is no point in including . The dependency has been removed in commit fa519f701d27 ("scsi: libfc: fixup 'sleeping function called from invalid context'") It turned a list_for_each_entry_rcu() into a list_for_each_entry(). So just #include now. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/960f34418358f0c35e645aa2cf7e0ec7fe6b60b9.1669461197.git.christophe.jaillet@wanadoo.fr Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_disc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3144bfa5078e0df7507a4de72061501e6a0e56be Author: Yonghong Song Date: Tue Nov 29 21:21:47 2022 -0800 bpf: Fix a compilation failure with clang lto build When building the kernel with clang lto (CONFIG_LTO_CLANG_FULL=y), the following compilation error will appear: $ make LLVM=1 LLVM_IAS=1 -j ... ld.lld: error: ld-temp.o :26889:1: symbol 'cgroup_storage_map_btf_ids' is already defined cgroup_storage_map_btf_ids:; ^ make[1]: *** [/.../bpf-next/scripts/Makefile.vmlinux_o:61: vmlinux.o] Error 1 In local_storage.c, we have BTF_ID_LIST_SINGLE(cgroup_storage_map_btf_ids, struct, bpf_local_storage_map) Commit c4bcfb38a95e ("bpf: Implement cgroup storage available to non-cgroup-attached bpf progs") added the above identical BTF_ID_LIST_SINGLE definition in bpf_cgrp_storage.c. With duplicated definitions, llvm linker complains with lto build. Also, extracting btf_id of 'struct bpf_local_storage_map' is defined four times for sk, inode, task and cgrp local storages. Let us define a single global one with a different name than cgroup_storage_map_btf_ids, which also fixed the lto compilation error. Fixes: c4bcfb38a95e ("bpf: Implement cgroup storage available to non-cgroup-attached bpf progs") Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221130052147.1591625-1-yhs@fb.com include/linux/btf_ids.h | 1 + kernel/bpf/bpf_cgrp_storage.c | 3 +-- kernel/bpf/bpf_inode_storage.c | 4 +--- kernel/bpf/bpf_task_storage.c | 4 ++-- net/core/bpf_sk_storage.c | 3 +-- 5 files changed, 6 insertions(+), 9 deletions(-) commit 3ebcbd2244f5a69e06e5f655bfbd8127c08201c7 Author: Anton Romanov Date: Wed Jun 8 18:35:26 2022 +0000 KVM: x86: Use current rather than snapshotted TSC frequency if it is constant Don't snapshot tsc_khz into per-cpu cpu_tsc_khz if the host TSC is constant, in which case the actual TSC frequency will never change and thus capturing TSC during initialization is unnecessary, KVM can simply use tsc_khz. This value is snapshotted from kvm_timer_init->kvmclock_cpu_online->tsc_khz_changed(NULL) On CPUs with constant TSC, but not a hardware-specified TSC frequency, snapshotting cpu_tsc_khz and using that to set a VM's target TSC frequency can lead to VM to think its TSC frequency is not what it actually is if refining the TSC completes after KVM snapshots tsc_khz. The actual frequency never changes, only the kernel's calculation of what that frequency is changes. Ideally, KVM would not be able to race with TSC refinement, or would have a hook into tsc_refine_calibration_work() to get an alert when refinement is complete. Avoiding the race altogether isn't practical as refinement takes a relative eternity; it's deliberately put on a work queue outside of the normal boot sequence to avoid unnecessarily delaying boot. Adding a hook is doable, but somewhat gross due to KVM's ability to be built as a module. And if the TSC is constant, which is likely the case for every VMX/SVM-capable CPU produced in the last decade, the race can be hit if and only if userspace is able to create a VM before TSC refinement completes; refinement is slow, but not that slow. For now, punt on a proper fix, as not taking a snapshot can help some uses cases and not taking a snapshot is arguably correct irrespective of the race with refinement. Signed-off-by: Anton Romanov Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20220608183525.1143682-1-romanton@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/x86.c | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) commit 328281155539b44539e12d62803e09310d86d11f Author: Dave Jiang Date: Wed Nov 30 12:21:36 2022 -0700 cxl/pmem: Introduce nvdimm_security_ops with ->get_flags() operation Add nvdimm_security_ops support for CXL memory device with the introduction of the ->get_flags() callback function. This is part of the "Persistent Memory Data-at-rest Security" command set for CXL memory device support. The ->get_flags() function provides the security state of the persistent memory device defined by the CXL 3.0 spec section 8.2.9.8.6.1. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/166983609611.2734609.13231854299523325319.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dan Williams drivers/cxl/Makefile | 2 +- drivers/cxl/core/mbox.c | 1 + drivers/cxl/cxlmem.h | 8 +++++++ drivers/cxl/pmem.c | 6 +++-- drivers/cxl/security.c | 56 ++++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/cxl_mem.h | 1 + tools/testing/cxl/Kbuild | 1 + 7 files changed, 72 insertions(+), 3 deletions(-) commit b80732fdc9b235046687a2999ed198fa55fde901 Author: Sean Christopherson Date: Tue Jun 7 23:23:53 2022 +0000 KVM: selftests: Verify userspace can stuff IA32_FEATURE_CONTROL at will Verify the KVM allows userspace to set all supported bits in the IA32_FEATURE_CONTROL MSR irrespective of the current guest CPUID, and that all unsupported bits are rejected. Throw the testcase into vmx_msrs_test even though it's not technically a VMX MSR; it's close enough, and the most frequently feature controlled by the MSR is VMX. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220607232353.3375324-4-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 2 + tools/testing/selftests/kvm/x86_64/vmx_msrs_test.c | 47 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit 2d6cd68636d60822219074b7c1d0bfe41321f106 Author: Sean Christopherson Date: Tue Jun 7 23:23:52 2022 +0000 KVM: VMX: Move MSR_IA32_FEAT_CTL.LOCKED check into "is valid" helper Move the check on IA32_FEATURE_CONTROL being locked, i.e. read-only from the guest, into the helper to check the overall validity of the incoming value. Opportunistically rename the helper to make it clear that it returns a bool. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220607232353.3375324-3-seanjc@google.com arch/x86/kvm/vmx/vmx.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit d2a00af2061db863890e32a4a99a6f82c330df1f Author: Sean Christopherson Date: Tue Jun 7 23:23:51 2022 +0000 KVM: VMX: Allow userspace to set all supported FEATURE_CONTROL bits Allow userspace to set all supported bits in MSR IA32_FEATURE_CONTROL irrespective of the guest CPUID model, e.g. via KVM_SET_MSRS. KVM's ABI is that userspace is allowed to set MSRs before CPUID, i.e. can set MSRs to values that would fault according to the guest CPUID model. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220607232353.3375324-2-seanjc@google.com arch/x86/kvm/vmx/vmx.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) commit 0b5e7a16a0a79a3742f0df9e45bca46f01b40e6a Author: Sean Christopherson Date: Wed Sep 28 23:20:15 2022 +0000 KVM: VMX: Make vmread_error_trampoline() uncallable from C code Declare vmread_error_trampoline() as an opaque symbol so that it cannot be called from C code, at least not without some serious fudging. The trampoline always passes parameters on the stack so that the inline VMREAD sequence doesn't need to clobber registers. regparm(0) was originally added to document the stack behavior, but it ended up being confusing because regparm(0) is a nop for 64-bit targets. Opportunustically wrap the trampoline and its declaration in #ifdeffery to make it even harder to invoke incorrectly, to document why it exists, and so that it's not left behind if/when CONFIG_CC_HAS_ASM_GOTO_OUTPUT is true for all supported toolchains. No functional change intended. Cc: Uros Bizjak Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220928232015.745948-1-seanjc@google.com arch/x86/kvm/vmx/vmenter.S | 2 ++ arch/x86/kvm/vmx/vmx_ops.h | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) commit 4a8fd4a720f8a8dbc370076d26388176c311218a Author: Sean Christopherson Date: Wed Aug 31 00:07:21 2022 +0000 KVM: nVMX: Reword comments about generating nested CR0/4 read shadows Reword the comments that (attempt to) document nVMX's overrides of the CR0/4 read shadows for L2 after calling vmx_set_cr0/4(). The important behavior that needs to be documented is that KVM needs to override the shadows to account for L1's masks even though the shadows are set by the common helpers (and that setting the shadows first would result in the correct shadows being clobbered). Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20220831000721.4066617-1-seanjc@google.com arch/x86/kvm/vmx/nested.c | 9 +++------ arch/x86/kvm/vmx/nested.h | 7 ++++--- 2 files changed, 7 insertions(+), 9 deletions(-) commit 1f158147181b83c5ae02273d0b3b9eddaebcc854 Author: Sean Christopherson Date: Wed Aug 31 00:17:06 2022 +0000 KVM: x86: Clean up KVM_CAP_X86_USER_SPACE_MSR documentation Clean up the KVM_CAP_X86_USER_SPACE_MSR documentation to eliminate misleading and/or inconsistent verbiage, and to actually document what accesses are intercepted by which flags. - s/will/may since not all #GPs are guaranteed to be intercepted - s/deflect/intercept to align with common KVM terminology - s/user space/userspace to align with the majority of KVM docs - Avoid using "trap" terminology, as KVM exits to userspace _before_ stepping, i.e. doesn't exhibit trap-like behavior - Actually document the flags Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220831001706.4075399-4-seanjc@google.com Documentation/virt/kvm/api.rst | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit b93d2ec34ef368bb854289db99d8d6ca7f523e25 Author: Sean Christopherson Date: Wed Aug 31 00:17:05 2022 +0000 KVM: x86: Reword MSR filtering docs to more precisely define behavior Reword the MSR filtering documentatiion to more precisely define the behavior of filtering using common virtualization terminology. - Explicitly document KVM's behavior when an MSR is denied - s/handled/allowed as there is no guarantee KVM will "handle" the MSR access - Drop the "fall back" terminology, which incorrectly suggests that there is existing KVM behavior to fall back to - Fix an off-by-one error in the range (the end is exclusive) - Call out the interaction between MSR filtering and KVM_CAP_X86_USER_SPACE_MSR's KVM_MSR_EXIT_REASON_FILTER - Delete the redundant paragraph on what '0' and '1' in the bitmap means, it's covered by the sections on KVM_MSR_FILTER_{READ,WRITE} - Delete the clause on x2APIC MSR behavior depending on APIC base, this is covered by stating that KVM follows architectural behavior when emulating/virtualizing MSR accesses Reported-by: Aaron Lewis Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220831001706.4075399-3-seanjc@google.com Documentation/virt/kvm/api.rst | 70 +++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 5c8c0b3273822cf982c250a9a19e003e4b315edb Author: Sean Christopherson Date: Wed Aug 31 00:17:04 2022 +0000 KVM: x86: Delete documentation for READ|WRITE in KVM_X86_SET_MSR_FILTER Delete the paragraph that describes the behavior when both KVM_MSR_FILTER_READ | KVM_MSR_FILTER_WRITE are set for a range. There is nothing special about KVM's handling of this combination, whereas explicitly documenting the combination suggests that there is some magic behavior the user needs to be aware of. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220831001706.4075399-2-seanjc@google.com Documentation/virt/kvm/api.rst | 7 ------- 1 file changed, 7 deletions(-) commit 1a65c39e2a521d2fb97d7ba5b16321dde057eb06 Merge: 69e61edebea0 57f0988706fe Author: Jason Gunthorpe Date: Tue Nov 29 16:34:36 2022 -0400 Merge patch series "IOMMUFD Generic interface" Jason Gunthorpe says: ================== iommufd is the user API to control the IOMMU subsystem as it relates to managing IO page tables that point at user space memory. It takes over from drivers/vfio/vfio_iommu_type1.c (aka the VFIO container) which is the VFIO specific interface for a similar idea. We see a broad need for extended features, some being highly IOMMU device specific: - Binding iommu_domain's to PASID/SSID - Userspace IO page tables, for ARM, x86 and S390 - Kernel bypassed invalidation of user page tables - Re-use of the KVM page table in the IOMMU - Dirty page tracking in the IOMMU - Runtime Increase/Decrease of IOPTE size - PRI support with faults resolved in userspace Many of these HW features exist to support VM use cases - for instance the combination of PASID, PRI and Userspace IO Page Tables allows an implementation of DMA Shared Virtual Addressing (vSVA) within a guest. Dirty tracking enables VM live migration with SRIOV devices and PASID support allow creating "scalable IOV" devices, among other things. As these features are fundamental to a VM platform they need to be uniformly exposed to all the driver families that do DMA into VMs, which is currently VFIO and VDPA. The pre-v1 series proposed re-using the VFIO type 1 data structure, however it was suggested that if we are doing this big update then we should also come with an improved data structure that solves the limitations that VFIO type1 has. Notably this addresses: - Multiple IOAS/'containers' and multiple domains inside a single FD - Single-pin operation no matter how many domains and containers use a page - A fine grained locking scheme supporting user managed concurrency for multi-threaded map/unmap - A pre-registration mechanism to optimize vIOMMU use cases by pre-pinning pages - Extended ioctl API that can manage these new objects and exposes domains directly to user space - domains are sharable between subsystems, eg VFIO and VDPA The bulk of this code is a new data structure design to track how the IOVAs are mapped to PFNs. iommufd intends to be general and consumable by any driver that wants to DMA to userspace. From a driver perspective it can largely be dropped in in-place of iommu_attach_device() and provides a uniform full feature set to all consumers. As this is a larger project this series is the first step. This series provides the iommfd "generic interface" which is designed to be suitable for applications like DPDK and VMM flows that are not optimized to specific HW scenarios. It is close to being a drop in replacement for the existing VFIO type 1 and supports existing qemu based VM flows. Several follow-on series are being prepared: - Patches integrating with qemu in native mode: https://github.com/yiliu1765/qemu/commits/qemu-iommufd-6.0-rc2 - A completed integration with VFIO now exists that covers "emulated" mdev use cases now, and can pass testing with qemu/etc in compatability mode: https://github.com/jgunthorpe/linux/commits/vfio_iommufd - A draft providing system iommu dirty tracking on top of iommufd, including iommu driver implementations: https://github.com/jpemartins/linux/commits/x86-iommufd This pairs with patches for providing a similar API to support VFIO-device tracking to give a complete vfio solution: https://lore.kernel.org/kvm/20220901093853.60194-1-yishaih@nvidia.com/ - Userspace page tables aka 'nested translation' for ARM and Intel iommu drivers: https://github.com/nicolinc/iommufd/commits/iommufd_nesting - "device centric" vfio series to expose the vfio_device FD directly as a normal cdev, and provide an extended API allowing dynamically changing the IOAS binding: https://github.com/yiliu1765/iommufd/commits/iommufd-v6.0-rc2-nesting-0901 - Drafts for PASID and PRI interfaces are included above as well Overall enough work is done now to show the merit of the new API design and at least draft solutions to many of the main problems. Several people have contributed directly to this work: Eric Auger, Joao Martins, Kevin Tian, Lu Baolu, Nicolin Chen, Yi L Liu. Many more have participated in the discussions that lead here, and provided ideas. Thanks to all! The v1/v2 iommufd series has been used to guide a large amount of preparatory work that has now been merged. The general theme is to organize things in a way that makes injecting iommufd natural: - VFIO live migration support with mlx5 and hisi_acc drivers. These series need a dirty tracking solution to be really usable. https://lore.kernel.org/kvm/20220224142024.147653-1-yishaih@nvidia.com/ https://lore.kernel.org/kvm/20220308184902.2242-1-shameerali.kolothum.thodi@huawei.com/ - Significantly rework the VFIO gvt mdev and remove struct mdev_parent_ops https://lore.kernel.org/lkml/20220411141403.86980-1-hch@lst.de/ - Rework how PCIe no-snoop blocking works https://lore.kernel.org/kvm/0-v3-2cf356649677+a32-intel_no_snoop_jgg@nvidia.com/ - Consolidate dma ownership into the iommu core code https://lore.kernel.org/linux-iommu/20220418005000.897664-1-baolu.lu@linux.intel.com/ - Make all vfio driver interfaces use struct vfio_device consistently https://lore.kernel.org/kvm/0-v4-8045e76bf00b+13d-vfio_mdev_no_group_jgg@nvidia.com/ - Remove the vfio_group from the kvm/vfio interface https://lore.kernel.org/kvm/0-v3-f7729924a7ea+25e33-vfio_kvm_no_group_jgg@nvidia.com/ - Simplify locking in vfio https://lore.kernel.org/kvm/0-v2-d035a1842d81+1bf-vfio_group_locking_jgg@nvidia.com/ - Remove the vfio notifiter scheme that faces drivers https://lore.kernel.org/kvm/0-v4-681e038e30fd+78-vfio_unmap_notif_jgg@nvidia.com/ - Improve the driver facing API for vfio pin/unpin pages to make the presence of struct page clear https://lore.kernel.org/kvm/20220723020256.30081-1-nicolinc@nvidia.com/ - Clean up in the Intel IOMMU driver https://lore.kernel.org/linux-iommu/20220301020159.633356-1-baolu.lu@linux.intel.com/ https://lore.kernel.org/linux-iommu/20220510023407.2759143-1-baolu.lu@linux.intel.com/ https://lore.kernel.org/linux-iommu/20220514014322.2927339-1-baolu.lu@linux.intel.com/ https://lore.kernel.org/linux-iommu/20220706025524.2904370-1-baolu.lu@linux.intel.com/ https://lore.kernel.org/linux-iommu/20220702015610.2849494-1-baolu.lu@linux.intel.com/ - Rework s390 vfio drivers https://lore.kernel.org/kvm/20220707135737.720765-1-farman@linux.ibm.com/ - Normalize vfio ioctl handling https://lore.kernel.org/kvm/0-v2-0f9e632d54fb+d6-vfio_ioctl_split_jgg@nvidia.com/ - VFIO API for dirty tracking (aka dma logging) managed inside a PCI device, with mlx5 implementation https://lore.kernel.org/kvm/20220901093853.60194-1-yishaih@nvidia.com - Introduce a struct device sysfs presence for struct vfio_device https://lore.kernel.org/kvm/20220901143747.32858-1-kevin.tian@intel.com/ - Complete restructuring the vfio mdev model https://lore.kernel.org/kvm/20220822062208.152745-1-hch@lst.de/ - Isolate VFIO container code in preperation for iommufd to provide an alternative implementation of it all https://lore.kernel.org/kvm/0-v1-a805b607f1fb+17b-vfio_container_split_jgg@nvidia.com - Simplify and consolidate iommu_domain/device compatability checking https://lore.kernel.org/linux-iommu/cover.1666042872.git.nicolinc@nvidia.com/ - Align iommu SVA support with the domain-centric model https://lore.kernel.org/all/20221031005917.45690-1-baolu.lu@linux.intel.com/ This is about 233 patches applied since March, thank you to everyone involved in all this work! Currently there are a number of supporting series still in progress: - DMABUF exporter support for VFIO to allow PCI P2P with VFIO https://lore.kernel.org/r/0-v2-472615b3877e+28f7-vfio_dma_buf_jgg@nvidia.com - Start to provide iommu_domain ops for POWER https://lore.kernel.org/all/20220714081822.3717693-1-aik@ozlabs.ru/ However, these are not necessary for this series to advance. Syzkaller coverage has been merged and is now running in the syzbot environment on linux-next: https://github.com/google/syzkaller/pull/3515 https://github.com/google/syzkaller/pull/3521 ================== Link: https://lore.kernel.org/r/0-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 57f0988706fec1b8dbc3fe00965828a47e2235a1 Author: Jason Gunthorpe Date: Tue Nov 29 16:29:42 2022 -0400 iommufd: Add a selftest Cover the essential functionality of the iommufd with a directed test from userspace. This aims to achieve reasonable functional coverage using the in-kernel self test framework. A second test does a failure injection sweep of the success paths to study error unwind behaviors. This allows achieving high coverage of the corner cases in pages.c. The selftest requires CONFIG_IOMMUFD_TEST to be enabled, and several huge pages which may require: echo 4 > /proc/sys/vm/nr_hugepages Link: https://lore.kernel.org/r/19-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Tested-by: Nicolin Chen Tested-by: Matthew Rosato # s390 Tested-by: Yi Liu Tested-by: Eric Auger # aarch64 Signed-off-by: Nicolin Chen Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe tools/testing/selftests/Makefile | 1 + tools/testing/selftests/iommu/.gitignore | 3 + tools/testing/selftests/iommu/Makefile | 12 + tools/testing/selftests/iommu/config | 2 + tools/testing/selftests/iommu/iommufd.c | 1654 ++++++++++++++++++++++ tools/testing/selftests/iommu/iommufd_fail_nth.c | 580 ++++++++ tools/testing/selftests/iommu/iommufd_utils.h | 278 ++++ 7 files changed, 2530 insertions(+) commit 52f528583bb395495f7dd35e6e4d548bccbf8a73 Author: Jason Gunthorpe Date: Tue Nov 29 16:29:41 2022 -0400 iommufd: Add additional invariant assertions These are on performance paths so we protect them using the CONFIG_IOMMUFD_TEST to not take a hit during normal operation. These are useful when running the test suite and syzkaller to find data structure inconsistencies early. Link: https://lore.kernel.org/r/18-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Tested-by: Yi Liu Tested-by: Matthew Rosato # s390 Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/device.c | 5 +++++ drivers/iommu/iommufd/io_pagetable.c | 22 +++++++++++++++++++ drivers/iommu/iommufd/io_pagetable.h | 3 +++ drivers/iommu/iommufd/pages.c | 42 ++++++++++++++++++++++++++++++++++-- 4 files changed, 70 insertions(+), 2 deletions(-) commit e26eed4f623da70913b535631a29764d108efe98 Author: Jason Gunthorpe Date: Tue Nov 29 16:29:40 2022 -0400 iommufd: Add some fault injection points This increases the coverage the fail_nth test gets, as well as via syzkaller. Link: https://lore.kernel.org/r/17-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Tested-by: Matthew Rosato # s390 Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/main.c | 3 +++ drivers/iommu/iommufd/pages.c | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit f4b20bb34c83dceade5470288f48f94ce3598ada Author: Jason Gunthorpe Date: Tue Nov 29 16:29:39 2022 -0400 iommufd: Add kernel support for testing iommufd Provide a mock kernel module for the iommu_domain that allows it to run without any HW and the mocking provides a way to directly validate that the PFNs loaded into the iommu_domain are correct. This exposes the access kAPI toward userspace to allow userspace to explore the functionality of pages.c and io_pagetable.c The mock also simulates the rare case of PAGE_SIZE > iommu page size as the mock will operate at a 2K iommu page size. This allows exercising all of the calculations to support this mismatch. This is also intended to support syzkaller exploring the same space. However, it is an unusually invasive config option to enable all of this. The config option should not be enabled in a production kernel. Link: https://lore.kernel.org/r/16-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Tested-by: Matthew Rosato # s390 Tested-by: Eric Auger # aarch64 Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/Kconfig | 12 + drivers/iommu/iommufd/Makefile | 2 + drivers/iommu/iommufd/device.c | 38 ++ drivers/iommu/iommufd/ioas.c | 3 + drivers/iommu/iommufd/iommufd_private.h | 35 ++ drivers/iommu/iommufd/iommufd_test.h | 93 ++++ drivers/iommu/iommufd/main.c | 14 + drivers/iommu/iommufd/pages.c | 8 + drivers/iommu/iommufd/selftest.c | 853 ++++++++++++++++++++++++++++++++ include/linux/iommufd.h | 3 + 10 files changed, 1061 insertions(+) commit d624d6652a65ad4f47a58b8651a1ec1163bb81d3 Author: Jason Gunthorpe Date: Tue Nov 29 16:29:38 2022 -0400 iommufd: vfio container FD ioctl compatibility iommufd can directly implement the /dev/vfio/vfio container IOCTLs by mapping them into io_pagetable operations. A userspace application can test against iommufd and confirm compatibility then simply make a small change to open /dev/iommu instead of /dev/vfio/vfio. For testing purposes /dev/vfio/vfio can be symlinked to /dev/iommu and then all applications will use the compatibility path with no code changes. A later series allows /dev/vfio/vfio to be directly provided by iommufd, which allows the rlimit mode to work the same as well. This series just provides the iommufd side of compatibility. Actually linking this to VFIO_SET_CONTAINER is a followup series, with a link in the cover letter. Internally the compatibility API uses a normal IOAS object that, like vfio, is automatically allocated when the first device is attached. Userspace can also query or set this IOAS object directly using the IOMMU_VFIO_IOAS ioctl. This allows mixing and matching new iommufd only features while still using the VFIO style map/unmap ioctls. While this is enough to operate qemu, it has a few differences: - Resource limits rely on memory cgroups to bound what userspace can do instead of the module parameter dma_entry_limit. - VFIO P2P is not implemented. The DMABUF patches for vfio are a start at a solution where iommufd would import a special DMABUF. This is to avoid further propogating the follow_pfn() security problem. - A full audit for pedantic compatibility details (eg errnos, etc) has not yet been done - powerpc SPAPR is left out, as it is not connected to the iommu_domain framework. It seems interest in SPAPR is minimal as it is currently non-working in v6.1-rc1. They will have to convert to the iommu subsystem framework to enjoy iommfd. The following are not going to be implemented and we expect to remove them from VFIO type1: - SW access 'dirty tracking'. As discussed in the cover letter this will be done in VFIO. - VFIO_TYPE1_NESTING_IOMMU https://lore.kernel.org/all/0-v1-0093c9b0e345+19-vfio_no_nesting_jgg@nvidia.com/ - VFIO_DMA_MAP_FLAG_VADDR https://lore.kernel.org/all/Yz777bJZjTyLrHEQ@nvidia.com/ Link: https://lore.kernel.org/r/15-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/Makefile | 3 +- drivers/iommu/iommufd/iommufd_private.h | 6 + drivers/iommu/iommufd/main.c | 16 +- drivers/iommu/iommufd/vfio_compat.c | 472 ++++++++++++++++++++++++++++++++ include/linux/iommufd.h | 7 + include/uapi/linux/iommufd.h | 36 +++ 6 files changed, 534 insertions(+), 6 deletions(-) commit 8d40205f6093f18e07fe3dc5920fc85e9f82b8b3 Author: Jason Gunthorpe Date: Tue Nov 29 16:29:37 2022 -0400 iommufd: Add kAPI toward external drivers for kernel access Kernel access is the mode that VFIO "mdevs" use. In this case there is no struct device and no IOMMU connection. iommufd acts as a record keeper for accesses and returns the actual struct pages back to the caller to use however they need. eg with kmap or the DMA API. Each caller must create a struct iommufd_access with iommufd_access_create(), similar to how iommufd_device_bind() works. Using this struct the caller can access blocks of IOVA using iommufd_access_pin_pages() or iommufd_access_rw(). Callers must provide a callback that immediately unpins any IOVA being used within a range. This happens if userspace unmaps the IOVA under the pin. The implementation forwards the access requests directly to the iopt infrastructure that manages the iopt_pages_access. Link: https://lore.kernel.org/r/14-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/device.c | 316 ++++++++++++++++++++++++++++++++ drivers/iommu/iommufd/io_pagetable.c | 8 +- drivers/iommu/iommufd/iommufd_private.h | 10 + drivers/iommu/iommufd/main.c | 3 + include/linux/iommufd.h | 43 ++++- 5 files changed, 377 insertions(+), 3 deletions(-) commit e8d57210035b6377d424ba964961892d01127cf6 Author: Jason Gunthorpe Date: Tue Nov 29 16:29:36 2022 -0400 iommufd: Add kAPI toward external drivers for physical devices Add the four functions external drivers need to connect physical DMA to the IOMMUFD: iommufd_device_bind() / iommufd_device_unbind() Register the device with iommufd and establish security isolation. iommufd_device_attach() / iommufd_device_detach() Connect a bound device to a page table Binding a device creates a device object ID in the uAPI, however the generic API does not yet provide any IOCTLs to manipulate them. Link: https://lore.kernel.org/r/13-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/Makefile | 1 + drivers/iommu/iommufd/device.c | 419 ++++++++++++++++++++++++++++++++ drivers/iommu/iommufd/iommufd_private.h | 5 + drivers/iommu/iommufd/main.c | 3 + include/linux/iommufd.h | 9 + 5 files changed, 437 insertions(+) commit ea4acfac57b9dee57a7d5840359a41cc3251de92 Author: Jason Gunthorpe Date: Tue Nov 29 16:29:35 2022 -0400 iommufd: Add a HW pagetable object The hw_pagetable object exposes the internal struct iommu_domain's to userspace. An iommu_domain is required when any DMA device attaches to an IOAS to control the io page table through the iommu driver. For compatibility with VFIO the hw_pagetable is automatically created when a DMA device is attached to the IOAS. If a compatible iommu_domain already exists then the hw_pagetable associated with it is used for the attachment. In the initial series there is no iommufd uAPI for the hw_pagetable object. The next patch provides driver facing APIs for IO page table attachment that allows drivers to accept either an IOAS or a hw_pagetable ID and for the driver to return the hw_pagetable ID that was auto-selected from an IOAS. The expectation is the driver will provide uAPI through its own FD for attaching its device to iommufd. This allows userspace to learn the mapping of devices to iommu_domains and to override the automatic attachment. The future HW specific interface will allow userspace to create hw_pagetable objects using iommu_domains with IOMMU driver specific parameters. This infrastructure will allow linking those domains to IOAS's and devices. Link: https://lore.kernel.org/r/12-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/Makefile | 1 + drivers/iommu/iommufd/hw_pagetable.c | 57 +++++++++++++++++++++++++++++++++ drivers/iommu/iommufd/ioas.c | 3 ++ drivers/iommu/iommufd/iommufd_private.h | 33 +++++++++++++++++++ drivers/iommu/iommufd/main.c | 3 ++ 5 files changed, 97 insertions(+) commit aad37e71d5c4dc1d3c25734f0bcd51c324f94b5e Author: Jason Gunthorpe Date: Tue Nov 29 16:29:34 2022 -0400 iommufd: IOCTLs for the io_pagetable Connect the IOAS to its IOCTL interface. This exposes most of the functionality in the io_pagetable to userspace. This is intended to be the core of the generic interface that IOMMUFD will provide. Every IOMMU driver should be able to implement an iommu_domain that is compatible with this generic mechanism. It is also designed to be easy to use for simple non virtual machine monitor users, like DPDK: - Universal simple support for all IOMMUs (no PPC special path) - An IOVA allocator that considers the aperture and the allowed/reserved ranges - io_pagetable allows any number of iommu_domains to be connected to the IOAS - Automatic allocation and re-use of iommu_domains Along with room in the design to add non-generic features to cater to specific HW functionality. Link: https://lore.kernel.org/r/11-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/Makefile | 1 + drivers/iommu/iommufd/ioas.c | 392 ++++++++++++++++++++++++++++++++ drivers/iommu/iommufd/iommufd_private.h | 33 +++ drivers/iommu/iommufd/main.c | 48 ++++ include/uapi/linux/iommufd.h | 258 ++++++++++++++++++++- 5 files changed, 731 insertions(+), 1 deletion(-) commit 51fe6141f0f64ae0bbc096a41a07572273e8c0ef Author: Jason Gunthorpe Date: Tue Nov 29 16:29:33 2022 -0400 iommufd: Data structure to provide IOVA to PFN mapping This is the remainder of the IOAS data structure. Provide an object called an io_pagetable that is composed of iopt_areas pointing at iopt_pages, along with a list of iommu_domains that mirror the IOVA to PFN map. At the top this is a simple interval tree of iopt_areas indicating the map of IOVA to iopt_pages. An xarray keeps track of a list of domains. Based on the attached domains there is a minimum alignment for areas (which may be smaller than PAGE_SIZE), an interval tree of reserved IOVA that can't be mapped and an IOVA of allowed IOVA that can always be mappable. The concept of an 'access' refers to something like a VFIO mdev that is accessing the IOVA and using a 'struct page *' for CPU based access. Externally an API is provided that matches the requirements of the IOCTL interface for map/unmap and domain attachment. The API provides a 'copy' primitive to establish a new IOVA map in a different IOAS from an existing mapping by re-using the iopt_pages. This is the basic mechanism to provide single pinning. This is designed to support a pre-registration flow where userspace would setup an dummy IOAS with no domains, map in memory and then establish an access to pin all PFNs into the xarray. Copy can then be used to create new IOVA mappings in a different IOAS, with iommu_domains attached. Upon copy the PFNs will be read out of the xarray and mapped into the iommu_domains, avoiding any pin_user_pages() overheads. Link: https://lore.kernel.org/r/10-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Signed-off-by: Yi Liu Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe .clang-format | 1 + drivers/iommu/iommufd/Makefile | 1 + drivers/iommu/iommufd/io_pagetable.c | 1186 +++++++++++++++++++++++++++++++ drivers/iommu/iommufd/io_pagetable.h | 55 ++ drivers/iommu/iommufd/iommufd_private.h | 52 ++ 5 files changed, 1295 insertions(+) commit 8d160cd4d5066f864ec0f2c981470e55ac03ac27 Author: Jason Gunthorpe Date: Tue Nov 29 16:29:32 2022 -0400 iommufd: Algorithms for PFN storage The iopt_pages which represents a logical linear list of full PFNs held in different storage tiers. Each area points to a slice of exactly one iopt_pages, and each iopt_pages can have multiple areas and accesses. The three storage tiers are managed to meet these objectives: - If no iommu_domain or in-kerenel access exists then minimal memory should be consumed by iomufd - If a page has been pinned then an iopt_pages will not pin it again - If an in-kernel access exists then the xarray must provide the backing storage to avoid allocations on domain removals - Otherwise any iommu_domain will be used for storage In a common configuration with only an iommu_domain the iopt_pages does not allocate significant memory itself. The external interface for pages has several logical operations: iopt_area_fill_domain() will load the PFNs from storage into a single domain. This is used when attaching a new domain to an existing IOAS. iopt_area_fill_domains() will load the PFNs from storage into multiple domains. This is used when creating a new IOVA map in an existing IOAS iopt_pages_add_access() creates an iopt_pages_access that tracks an in-kernel access of PFNs. This is some external driver that might be accessing the IOVA using the CPU, or programming PFNs with the DMA API. ie a VFIO mdev. iopt_pages_rw_access() directly perform a memcpy on the PFNs, without the overhead of iopt_pages_add_access() iopt_pages_fill_xarray() will load PFNs into the xarray and return a 'struct page *' array. It is used by iopt_pages_access's to extract PFNs for in-kernel use. iopt_pages_fill_from_xarray() is a fast path when it is known the xarray is already filled. As an iopt_pages can be referred to in slices by many areas and accesses it uses interval trees to keep track of which storage tiers currently hold the PFNs. On a page-by-page basis any request for a PFN will be satisfied from one of the storage tiers and the PFN copied to target domain/array. Unfill actions are similar, on a page by page basis domains are unmapped, xarray entries freed or struct pages fully put back. Significant complexity is required to fully optimize all of these data motions. The implementation calculates the largest consecutive range of same-storage indexes and operates in blocks. The accumulation of PFNs always generates the largest contiguous PFN range possible to optimize and this gathering can cross storage tier boundaries. For cases like 'fill domains' care is taken to avoid duplicated work and PFNs are read once and pushed into all domains. The map/unmap interaction with the iommu_domain always works in contiguous PFN blocks. The implementation does not require or benefit from any split/merge optimization in the iommu_domain driver. This design suggests several possible improvements in the IOMMU API that would greatly help performance, particularly a way for the driver to map and read the pfns lists instead of working with one driver call per page to read, and one driver call per contiguous range to store. Link: https://lore.kernel.org/r/9-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/io_pagetable.h | 74 +++ drivers/iommu/iommufd/pages.c | 843 +++++++++++++++++++++++++++++++++++ 2 files changed, 917 insertions(+) commit f394576eb11dbcd3a740fa41e577b97f0720d26e Author: Jason Gunthorpe Date: Tue Nov 29 16:29:31 2022 -0400 iommufd: PFN handling for iopt_pages The top of the data structure provides an IO Address Space (IOAS) that is similar to a VFIO container. The IOAS allows map/unmap of memory into ranges of IOVA called iopt_areas. Multiple IOMMU domains (IO page tables) and in-kernel accesses (like VFIO mdevs) can be attached to the IOAS to access the PFNs that those IOVA areas cover. The IO Address Space (IOAS) datastructure is composed of: - struct io_pagetable holding the IOVA map - struct iopt_areas representing populated portions of IOVA - struct iopt_pages representing the storage of PFNs - struct iommu_domain representing each IO page table in the system IOMMU - struct iopt_pages_access representing in-kernel accesses of PFNs (ie VFIO mdevs) - struct xarray pinned_pfns holding a list of pages pinned by in-kernel accesses This patch introduces the lowest part of the datastructure - the movement of PFNs in a tiered storage scheme: 1) iopt_pages::pinned_pfns xarray 2) Multiple iommu_domains 3) The origin of the PFNs, i.e. the userspace pointer PFN have to be copied between all combinations of tiers, depending on the configuration. The interface is an iterator called a 'pfn_reader' which determines which tier each PFN is stored and loads it into a list of PFNs held in a struct pfn_batch. Each step of the iterator will fill up the pfn_batch, then the caller can use the pfn_batch to send the PFNs to the required destination. Repeating this loop will read all the PFNs in an IOVA range. The pfn_reader and pfn_batch also keep track of the pinned page accounting. While PFNs are always stored and accessed as full PAGE_SIZE units the iommu_domain tier can store with a sub-page offset/length to support IOMMUs with a smaller IOPTE size than PAGE_SIZE. Link: https://lore.kernel.org/r/8-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Signed-off-by: Jason Gunthorpe .clang-format | 1 + drivers/iommu/iommufd/Makefile | 3 +- drivers/iommu/iommufd/double_span.h | 53 ++ drivers/iommu/iommufd/io_pagetable.h | 109 ++++ drivers/iommu/iommufd/iommufd_private.h | 24 + drivers/iommu/iommufd/pages.c | 1066 +++++++++++++++++++++++++++++++ include/linux/iommufd.h | 7 + 7 files changed, 1262 insertions(+), 1 deletion(-) commit ce5a23c835aa0f0a931b5bcde1e7811f951b0146 Author: Jason Gunthorpe Date: Tue Nov 29 16:29:30 2022 -0400 kernel/user: Allow user_struct::locked_vm to be usable for iommufd Following the pattern of io_uring, perf, skb, and bpf, iommfd will use user->locked_vm for accounting pinned pages. Ensure the value is included in the struct and export free_uid() as iommufd is modular. user->locked_vm is the good accounting to use for ulimit because it is per-user, and the security sandboxing of locked pages is not supposed to be per-process. Other places (vfio, vdpa and infiniband) have used mm->pinned_vm and/or mm->locked_vm for accounting pinned pages, but this is only per-process and inconsistent with the new FOLL_LONGTERM users in the kernel. Concurrent work is underway to try to put this in a cgroup, so everything can be consistent and the kernel can provide a FOLL_LONGTERM limit that actually provides security. Link: https://lore.kernel.org/r/7-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Signed-off-by: Jason Gunthorpe include/linux/sched/user.h | 2 +- kernel/user.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 2ff4bed7fee72ba1abfcff5f11ae8f8e570353f2 Author: Jason Gunthorpe Date: Tue Nov 29 16:29:29 2022 -0400 iommufd: File descriptor, context, kconfig and makefiles This is the basic infrastructure of a new miscdevice to hold the iommufd IOCTL API. It provides: - A miscdevice to create file descriptors to run the IOCTL interface over - A table based ioctl dispatch and centralized extendable pre-validation step - An xarray mapping userspace ID's to kernel objects. The design has multiple inter-related objects held within in a single IOMMUFD fd - A simple usage count to build a graph of object relations and protect against hostile userspace racing ioctls The only IOCTL provided in this patch is the generic 'destroy any object by handle' operation. Link: https://lore.kernel.org/r/6-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Reviewed-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe Documentation/userspace-api/ioctl/ioctl-number.rst | 1 + MAINTAINERS | 12 + drivers/iommu/Kconfig | 1 + drivers/iommu/Makefile | 2 +- drivers/iommu/iommufd/Kconfig | 12 + drivers/iommu/iommufd/Makefile | 5 + drivers/iommu/iommufd/iommufd_private.h | 109 +++++++ drivers/iommu/iommufd/main.c | 344 +++++++++++++++++++++ include/linux/iommufd.h | 31 ++ include/uapi/linux/iommufd.h | 55 ++++ 10 files changed, 571 insertions(+), 1 deletion(-) commit 658234de0d2ed3a1b86d793f4772e38a2e039b35 Author: Kevin Tian Date: Tue Nov 29 16:29:28 2022 -0400 iommufd: Document overview of iommufd Add iommufd into the documentation tree, and supply initial documentation. Much of this is linked from code comments by kdoc. Link: https://lore.kernel.org/r/5-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Reviewed-by: Bagas Sanjaya Reviewed-by: Eric Auger Signed-off-by: Kevin Tian Signed-off-by: Jason Gunthorpe Documentation/userspace-api/index.rst | 1 + Documentation/userspace-api/iommufd.rst | 223 ++++++++++++++++++++++++++++++++ 2 files changed, 224 insertions(+) commit 2e7eab81425ad6c875f2ed47c0ce01e78afc38a5 Author: Jim Mattson Date: Wed Oct 19 14:36:20 2022 -0700 KVM: VMX: Execute IBPB on emulated VM-exit when guest has IBRS According to Intel's document on Indirect Branch Restricted Speculation, "Enabling IBRS does not prevent software from controlling the predicted targets of indirect branches of unrelated software executed later at the same predictor mode (for example, between two different user applications, or two different virtual machines). Such isolation can be ensured through use of the Indirect Branch Predictor Barrier (IBPB) command." This applies to both basic and enhanced IBRS. Since L1 and L2 VMs share hardware predictor modes (guest-user and guest-kernel), hardware IBRS is not sufficient to virtualize IBRS. (The way that basic IBRS is implemented on pre-eIBRS parts, hardware IBRS is actually sufficient in practice, even though it isn't sufficient architecturally.) For virtual CPUs that support IBRS, add an indirect branch prediction barrier on emulated VM-exit, to ensure that the predicted targets of indirect branches executed in L1 cannot be controlled by software that was executed in L2. Since we typically don't intercept guest writes to IA32_SPEC_CTRL, perform the IBPB at emulated VM-exit regardless of the current IA32_SPEC_CTRL.IBRS value, even though the IBPB could technically be deferred until L1 sets IA32_SPEC_CTRL.IBRS, if IA32_SPEC_CTRL.IBRS is clear at emulated VM-exit. This is CVE-2022-2196. Fixes: 5c911beff20a ("KVM: nVMX: Skip IBPB when switching between vmcs01 and vmcs02") Cc: Sean Christopherson Signed-off-by: Jim Mattson Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221019213620.1953281-3-jmattson@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/vmx/nested.c | 11 +++++++++++ arch/x86/kvm/vmx/vmx.c | 6 ++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit 4f209989586c79e9bf59ba9381101f5fb449dfbb Author: Jim Mattson Date: Wed Oct 19 14:36:19 2022 -0700 KVM: VMX: Guest usage of IA32_SPEC_CTRL is likely At this point in time, most guests (in the default, out-of-the-box configuration) are likely to use IA32_SPEC_CTRL. Therefore, drop the compiler hint that it is unlikely for KVM to be intercepting WRMSR of IA32_SPEC_CTRL. Signed-off-by: Jim Mattson Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221019213620.1953281-2-jmattson@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cc409325ddd776f6fd6293d5ce93ce1248af6e4 Author: Sean Christopherson Date: Thu Oct 6 00:19:56 2022 +0000 KVM: nVMX: Inject #GP, not #UD, if "generic" VMXON CR0/CR4 check fails Inject #GP for if VMXON is attempting with a CR0/CR4 that fails the generic "is CRx valid" check, but passes the CR4.VMXE check, and do the generic checks _after_ handling the post-VMXON VM-Fail. The CR4.VMXE check, and all other #UD cases, are special pre-conditions that are enforced prior to pivoting on the current VMX mode, i.e. occur before interception if VMXON is attempted in VMX non-root mode. All other CR0/CR4 checks generate #GP and effectively have lower priority than the post-VMXON check. Per the SDM: IF (register operand) or (CR0.PE = 0) or (CR4.VMXE = 0) or ... THEN #UD; ELSIF not in VMX operation THEN IF (CPL > 0) or (in A20M mode) or (the values of CR0 and CR4 are not supported in VMX operation) THEN #GP(0); ELSIF in VMX non-root operation THEN VMexit; ELSIF CPL > 0 THEN #GP(0); ELSE VMfail("VMXON executed in VMX root operation"); FI; which, if re-written without ELSIF, yields: IF (register operand) or (CR0.PE = 0) or (CR4.VMXE = 0) or ... THEN #UD IF in VMX non-root operation THEN VMexit; IF CPL > 0 THEN #GP(0) IF in VMX operation THEN VMfail("VMXON executed in VMX root operation"); IF (in A20M mode) or (the values of CR0 and CR4 are not supported in VMX operation) THEN #GP(0); Note, KVM unconditionally forwards VMXON VM-Exits that occur in L2 to L1, i.e. there is no need to check the vCPU is not in VMX non-root mode. Add a comment to explain why unconditionally forwarding such exits is functionally correct. Reported-by: Eric Li Fixes: c7d855c2aff2 ("KVM: nVMX: Inject #UD if VMXON is attempted with incompatible CR0/CR4") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006001956.329314-1-seanjc@google.com arch/x86/kvm/vmx/nested.c | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) commit fe5759d5bfda312dd52fc81405ffc1d024b18039 Author: Yury Norov Date: Wed Nov 16 09:24:51 2022 -0800 cpumask: limit visibility of FORCE_NR_CPUS In current form, FORCE_NR_CPUS is visible to all users building their kernels, even not experts. It is also set in allmodconfig or allyesconfig, which is not a correct behavior. This patch fixes it. It also changes the parameter short description: removes implementation details and highlights the effect of the change. Link: https://lkml.kernel.org/r/20221116172451.274938-1-yury.norov@gmail.com Signed-off-by: Yury Norov Suggested-by: Geert Uytterhoeven Suggested-by: Linus Torvalds Reviewed-by: Valentin Schneider Cc: Alexey Klimov Cc: Andy Shevchenko Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Sander Vanheule Cc: Stephen Rothwell Cc: Thomas Gleixner Cc: Vlastimil Babka Signed-off-by: Andrew Morton lib/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5f31c655bcc01b6da53b836ac951c1556245305 Author: Zheng Yejian Date: Sat May 15 22:06:31 2021 +0800 acct: fix potential integer overflow in encode_comp_t() The integer overflow is descripted with following codes: > 317 static comp_t encode_comp_t(u64 value) > 318 { > 319 int exp, rnd; ...... > 341 exp <<= MANTSIZE; > 342 exp += value; > 343 return exp; > 344 } Currently comp_t is defined as type of '__u16', but the variable 'exp' is type of 'int', so overflow would happen when variable 'exp' in line 343 is greater than 65535. Link: https://lkml.kernel.org/r/20210515140631.369106-3-zhengyejian1@huawei.com Signed-off-by: Zheng Yejian Cc: Hanjun Guo Cc: Randy Dunlap Cc: Vlastimil Babka Cc: Zhang Jinhao Signed-off-by: Andrew Morton kernel/acct.c | 2 ++ 1 file changed, 2 insertions(+) commit 457139f16ae15d86df1e491fc45a9ea56def57b5 Author: Zheng Yejian Date: Sat May 15 22:06:30 2021 +0800 acct: fix accuracy loss for input value of encode_comp_t() Patch series "Fix encode_comp_t()". Type conversion in encode_comp_t() may look a bit problematic. This patch (of 2): See calculation of ac_{u,s}time in fill_ac(): > ac->ac_utime = encode_comp_t(nsec_to_AHZ(pacct->ac_utime)); > ac->ac_stime = encode_comp_t(nsec_to_AHZ(pacct->ac_stime)); Return value of nsec_to_AHZ() is always type of 'u64', but it is handled as type of 'unsigned long' in encode_comp_t, and accuracy loss would happen on 32-bit platform when 'unsigned long' value is 32-bit-width. So 'u64' value of encode_comp_t() may look better. Link: https://lkml.kernel.org/r/20210515140631.369106-1-zhengyejian1@huawei.com Link: https://lkml.kernel.org/r/20210515140631.369106-2-zhengyejian1@huawei.com Signed-off-by: Zheng Yejian Cc: Hanjun Guo Cc: Randy Dunlap # build-tested Cc: Vlastimil Babka Cc: Zhang Jinhao Signed-off-by: Andrew Morton kernel/acct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de985c109096b236d43e98da0c65376bf3bc24fb Author: Masahiro Yamada Date: Sun Nov 13 20:08:02 2022 +0900 linux/init.h: include and With CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y, the following code fails to build: ---------------->8---------------- #include int foo(void) { return 0; } core_initcall(foo); ---------------->8---------------- Include for static_assert() and for __stringify(). Link: https://lkml.kernel.org/r/20221113110802.3760705-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada Cc: Jiangshan Yi Cc: Kees Cook Cc: Peter Zijlstra Cc: Randy Dunlap # build-tested Cc: Sami Tolvanen Signed-off-by: Andrew Morton include/linux/init.h | 2 ++ 1 file changed, 2 insertions(+) commit e92a216d16bde65d21a3227e0fb2aa0794576525 Author: Yang Yingliang Date: Mon Nov 14 23:26:36 2022 +0800 rapidio: rio: fix possible name leak in rio_register_mport() If device_register() returns error, the name allocated by dev_set_name() need be freed. It should use put_device() to give up the reference in the error path, so that the name can be freed in kobject_cleanup(), and list_del() is called to delete the port from rio_mports. Link: https://lkml.kernel.org/r/20221114152636.2939035-3-yangyingliang@huawei.com Fixes: 2aaf308b95b2 ("rapidio: rework device hierarchy and introduce mport class of devices") Signed-off-by: Yang Yingliang Cc: Alexandre Bounine Cc: Matt Porter Signed-off-by: Andrew Morton drivers/rapidio/rio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f9574cd48679926e2a569e1957a5a1bcc8a719ac Author: Yang Yingliang Date: Mon Nov 14 23:26:35 2022 +0800 rapidio: fix possible name leaks when rio_add_device() fails Patch series "rapidio: fix three possible memory leaks". This patchset fixes three name leaks in error handling. - patch #1 fixes two name leaks while rio_add_device() fails. - patch #2 fixes a name leak while rio_register_mport() fails. This patch (of 2): If rio_add_device() returns error, the name allocated by dev_set_name() need be freed. It should use put_device() to give up the reference in the error path, so that the name can be freed in kobject_cleanup(), and the 'rdev' can be freed in rio_release_dev(). Link: https://lkml.kernel.org/r/20221114152636.2939035-1-yangyingliang@huawei.com Link: https://lkml.kernel.org/r/20221114152636.2939035-2-yangyingliang@huawei.com Fixes: e8de370188d0 ("rapidio: add mport char device driver") Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array") Signed-off-by: Yang Yingliang Cc: Alexandre Bounine Cc: Matt Porter Signed-off-by: Andrew Morton drivers/rapidio/devices/rio_mport_cdev.c | 7 +++++-- drivers/rapidio/rio-scan.c | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) commit 811b99fd237e17230d660c6000021f23ce3f3985 Author: Bo Liu Date: Fri Nov 11 02:56:48 2022 -0500 fat (exportfs): fix some kernel-doc warnings Fix the following W=1 kernel build warning(s): fs/fat/nfs.c:21: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst fs/fat/nfs.c:139: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Link: https://lkml.kernel.org/r/20221111075648.4005-1-liubo03@inspur.com Signed-off-by: Bo Liu Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton fs/fat/nfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce2fcf1516d674a174d9b34d1e1024d64de9fba3 Author: Li Zetao Date: Wed Nov 9 15:46:27 2022 +0800 ocfs2: fix memory leak in ocfs2_mount_volume() There is a memory leak reported by kmemleak: unreferenced object 0xffff88810cc65e60 (size 32): comm "mount.ocfs2", pid 23753, jiffies 4302528942 (age 34735.105s) hex dump (first 32 bytes): 10 00 00 00 00 00 00 00 00 01 01 01 01 01 01 01 ................ 01 01 01 01 01 01 01 01 00 00 00 00 00 00 00 00 ................ backtrace: [] __kmalloc+0x4d/0x150 [] ocfs2_compute_replay_slots+0x121/0x330 [ocfs2] [] ocfs2_check_volume+0x485/0x900 [ocfs2] [] ocfs2_mount_volume.isra.0+0x1e9/0x650 [ocfs2] [] ocfs2_fill_super+0xe0b/0x1740 [ocfs2] [] mount_bdev+0x312/0x400 [] legacy_get_tree+0xed/0x1d0 [] vfs_get_tree+0x7d/0x230 [] path_mount+0xd62/0x1760 [] do_mount+0xca/0xe0 [] __x64_sys_mount+0x12c/0x1a0 [] do_syscall_64+0x35/0x80 [] entry_SYSCALL_64_after_hwframe+0x46/0xb0 This call stack is related to two problems. Firstly, the ocfs2 super uses "replay_map" to trace online/offline slots, in order to recover offline slots during recovery and mount. But when ocfs2_truncate_log_init() returns an error in ocfs2_mount_volume(), the memory of "replay_map" will not be freed in error handling path. Secondly, the memory of "replay_map" will not be freed if d_make_root() returns an error in ocfs2_fill_super(). But the memory of "replay_map" will be freed normally when completing recovery and mount in ocfs2_complete_mount_recovery(). Fix the first problem by adding error handling path to free "replay_map" when ocfs2_truncate_log_init() fails. And fix the second problem by calling ocfs2_free_replay_slots(osb) in the error handling path "out_dismount". In addition, since ocfs2_free_replay_slots() is static, it is necessary to remove its static attribute and declare it in header file. Link: https://lkml.kernel.org/r/20221109074627.2303950-1-lizetao1@huawei.com Fixes: 9140db04ef18 ("ocfs2: recover orphans in offline slots during recovery and mount") Signed-off-by: Li Zetao Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/journal.c | 2 +- fs/ocfs2/journal.h | 1 + fs/ocfs2/super.c | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) commit fc0e7387926d7704ba54ff0d20db80051392583d Author: Rong Tao Date: Wed Nov 9 22:34:25 2022 +0800 lib/radix-tree.c: fix uninitialized variable compilation warning We need to set an initial value for offset to eliminate compilation warning. How to reproduce warning: $ make -C tools/testing/radix-tree radix-tree.c: In function `radix_tree_tag_clear': radix-tree.c:1046:17: warning: `offset' may be used uninitialized in this function [-Wmaybe-uninitialized] 1046 | node_tag_clear(root, parent, tag, offset); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link: https://lkml.kernel.org/r/tencent_DF74099967595DCEA93CBDC28D062026180A@qq.com Signed-off-by: Rong Tao Cc: Matthew Wilcox Signed-off-by: Andrew Morton lib/radix-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08fc35f31b9e14cb4e8ba5bf43f824559dbdbe88 Author: Stephen Brennan Date: Thu Oct 27 13:50:08 2022 -0700 vmcoreinfo: warn if we exceed vmcoreinfo data size Though vmcoreinfo is intended to be small, at just one page, useful information is still added to it, so we risk running out of space. Currently there is no runtime check to see whether the vmcoreinfo buffer has been exhausted. Add a warning for this case. Currently, my static checking tool[1] indicates that a good upper bound for vmcoreinfo size is currently 3415 bytes, but the best time to add warnings is before the risk becomes too high. [1] https://github.com/brenns10/kernel_stuff/blob/master/vmcoreinfosize/vmcoreinfosize.py Link: https://lkml.kernel.org/r/20221027205008.312534-1-stephen.s.brennan@oracle.com Signed-off-by: Stephen Brennan Acked-by: Baoquan He Cc: Dave Young Cc: Vivek Goyal Cc: Kees Cook Signed-off-by: Andrew Morton kernel/crash_core.c | 3 +++ 1 file changed, 3 insertions(+) commit 3965292ad0ca70320f1c632f2ac3b886c88b9e80 Author: Liao Chang Date: Fri Nov 4 15:05:23 2022 +0800 checkpatch: add check for array allocator family argument order These array allocator family are sometimes misused with the first and second arguments switched. Same issue with calloc, kvcalloc, kvmalloc_array etc. Bleat if sizeof is the first argument. Link: https://lore.kernel.org/lkml/5374345c-7973-6a3c-d559-73bf4ac15079@redhat.com/ Link: https://lkml.kernel.org/r/20221104070523.60296-1-liaochang1@huawei.com Signed-off-by: Liao Chang Acked-by: Joe Perches Cc: Lukas Bulwahn Cc: Christophe JAILLET Cc: Andy Whitcroft Cc: Bagas Sanjaya Cc: Dwaipayan Ray Cc: Paolo Bonzini Signed-off-by: Andrew Morton scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d04bb0852b8bd31c53981a04ff0132698d24523d Author: Jason A. Donenfeld Date: Wed Oct 19 09:55:41 2022 -0600 wifi: rt2x00: use explicitly signed or unsigned types On some platforms, `char` is unsigned, but this driver, for the most part, assumed it was signed. In other places, it uses `char` to mean an unsigned number, but only in cases when the values are small. And in still other places, `char` is used as a boolean. Put an end to this confusion by declaring explicit types, depending on the context. Link: https://lkml.kernel.org/r/20221019155541.3410813-1-Jason@zx2c4.com Signed-off-by: Jason A. Donenfeld Signed-off-by: Andrew Morton drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 8 ++-- drivers/net/wireless/ralink/rt2x00/rt2400pci.h | 2 +- drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 8 ++-- drivers/net/wireless/ralink/rt2x00/rt2500pci.h | 2 +- drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 8 ++-- drivers/net/wireless/ralink/rt2x00/rt2500usb.h | 2 +- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 60 +++++++++++++------------- drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 8 ++-- drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 6 +-- drivers/net/wireless/ralink/rt2x00/rt61pci.c | 4 +- drivers/net/wireless/ralink/rt2x00/rt61pci.h | 2 +- drivers/net/wireless/ralink/rt2x00/rt73usb.c | 4 +- drivers/net/wireless/ralink/rt2x00/rt73usb.h | 2 +- 13 files changed, 58 insertions(+), 58 deletions(-) commit d472cf797c4e268613dbce5ec9b95d0bcae19ecb Author: Akinobu Mita Date: Tue Sep 20 02:24:18 2022 +0900 debugfs: fix error when writing negative value to atomic_t debugfs file The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()"), so we have to use a 64-bit value to write a negative value for a debugfs file created by debugfs_create_atomic_t(). This restores the previous behaviour by introducing DEFINE_DEBUGFS_ATTRIBUTE_SIGNED for a signed value. Link: https://lkml.kernel.org/r/20220919172418.45257-4-akinobu.mita@gmail.com Fixes: 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()") Signed-off-by: Akinobu Mita Reported-by: Zhao Gongyi Reviewed-by: David Hildenbrand Reviewed-by: Greg Kroah-Hartman Cc: Alexander Viro Cc: Jonathan Corbet Cc: Oscar Salvador Cc: Rafael J. Wysocki Cc: Shuah Khan Cc: Wei Yongjun Cc: Yicong Yang Signed-off-by: Andrew Morton Documentation/fault-injection/fault-injection.rst | 10 ++++---- fs/debugfs/file.c | 28 ++++++++++++++++++----- include/linux/debugfs.h | 19 +++++++++++++-- 3 files changed, 43 insertions(+), 14 deletions(-) commit f883c3edd2c432a2931ec8773c70a570115a50fe Author: Akinobu Mita Date: Tue Sep 20 02:24:17 2022 +0900 lib/notifier-error-inject: fix error when writing -errno to debugfs file The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()"). This restores the previous behaviour by using newly introduced DEFINE_SIMPLE_ATTRIBUTE_SIGNED instead of DEFINE_SIMPLE_ATTRIBUTE. Link: https://lkml.kernel.org/r/20220919172418.45257-3-akinobu.mita@gmail.com Fixes: 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()") Signed-off-by: Akinobu Mita Reported-by: Zhao Gongyi Reviewed-by: David Hildenbrand Reviewed-by: Greg Kroah-Hartman Cc: Alexander Viro Cc: Jonathan Corbet Cc: Oscar Salvador Cc: Rafael J. Wysocki Cc: Shuah Khan Cc: Wei Yongjun Cc: Yicong Yang Signed-off-by: Andrew Morton lib/notifier-error-inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e41f274f9aa71cdcc69dc1f26a3f9304a651804 Author: Akinobu Mita Date: Tue Sep 20 02:24:16 2022 +0900 libfs: add DEFINE_SIMPLE_ATTRIBUTE_SIGNED for signed value Patch series "fix error when writing negative value to simple attribute files". The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()"), but some attribute files want to accept a negative value. This patch (of 3): The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()"), so we have to use a 64-bit value to write a negative value. This adds DEFINE_SIMPLE_ATTRIBUTE_SIGNED for a signed value. Link: https://lkml.kernel.org/r/20220919172418.45257-1-akinobu.mita@gmail.com Link: https://lkml.kernel.org/r/20220919172418.45257-2-akinobu.mita@gmail.com Fixes: 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()") Signed-off-by: Akinobu Mita Reported-by: Zhao Gongyi Reviewed-by: David Hildenbrand Reviewed-by: Greg Kroah-Hartman Cc: Alexander Viro Cc: Jonathan Corbet Cc: Oscar Salvador Cc: Rafael J. Wysocki Cc: Shuah Khan Cc: Wei Yongjun Cc: Yicong Yang Signed-off-by: Andrew Morton fs/libfs.c | 22 +++++++++++++++++++--- include/linux/fs.h | 12 ++++++++++-- 2 files changed, 29 insertions(+), 5 deletions(-) commit a8a12c0069b9e3c909b3c22bf8711d2f18a0af97 Author: Zhao Liu Date: Wed Sep 28 17:27:48 2022 +0800 KVM: SVM: Replace kmap_atomic() with kmap_local_page() The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1]. The main difference between atomic and local mappings is that local mappings don't disable page faults or preemption. There're 2 reasons we can use kmap_local_page() here: 1. SEV is 64-bit only and kmap_local_page() doesn't disable migration in this case, but here the function clflush_cache_range() uses CLFLUSHOPT instruction to flush, and on x86 CLFLUSHOPT is not CPU-local and flushes the page out of the entire cache hierarchy on all CPUs (APM volume 3, chapter 3, CLFLUSHOPT). So there's no need to disable preemption to ensure CPU-local. 2. clflush_cache_range() doesn't need to disable pagefault and the mapping is still valid even if sleeps. This is also true for sched out/in when preempted. In addition, though kmap_local_page() is a thin wrapper around page_address() on 64-bit, kmap_local_page() should still be used here in preference to page_address() since page_address() isn't suitable to be used in a generic function (like sev_clflush_pages()) where the page passed in is not easy to determine the source of allocation. Keeping the kmap* API in place means it can be used for things other than highmem mappings[2]. Therefore, sev_clflush_pages() is a function that should use kmap_local_page() in place of kmap_atomic(). Convert the calls of kmap_atomic() / kunmap_atomic() to kmap_local_page() / kunmap_local(). [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com [2]: https://lore.kernel.org/lkml/5d667258-b58b-3d28-3609-e7914c99b31b@intel.com/ Suggested-by: Dave Hansen Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Zhao Liu Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20220928092748.463631-1-zhao1.liu@linux.intel.com Signed-off-by: Sean Christopherson arch/x86/kvm/svm/sev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c30e8101e8d5d020b1d7119117889756a6ed713 Author: Sean Christopherson Date: Fri Sep 30 23:40:31 2022 +0000 KVM: SVM: Skip WRMSR fastpath on VM-Exit if next RIP isn't valid Skip the WRMSR fastpath in SVM's VM-Exit handler if the next RIP isn't valid, e.g. because KVM is running with nrips=false. SVM must decode and emulate to skip the WRMSR if the CPU doesn't provide the next RIP. Getting the instruction bytes to decode the WRMSR requires reading guest memory, which in turn means dereferencing memslots, and that isn't safe because KVM doesn't hold SRCU when the fastpath runs. Don't bother trying to enable the fastpath for this case, e.g. by doing only the WRMSR and leaving the "skip" until later. NRIPS is supported on all modern CPUs (KVM has considered making it mandatory), and the next RIP will be valid the vast, vast majority of the time. ============================= WARNING: suspicious RCU usage 6.0.0-smp--4e557fcd3d80-skip #13 Tainted: G O ----------------------------- include/linux/kvm_host.h:954 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by stable/206475: #0: ffff9d9dfebcc0f0 (&vcpu->mutex){+.+.}-{3:3}, at: kvm_vcpu_ioctl+0x8b/0x620 [kvm] stack backtrace: CPU: 152 PID: 206475 Comm: stable Tainted: G O 6.0.0-smp--4e557fcd3d80-skip #13 Hardware name: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 10.48.0 01/27/2022 Call Trace: dump_stack_lvl+0x69/0xaa dump_stack+0x10/0x12 lockdep_rcu_suspicious+0x11e/0x130 kvm_vcpu_gfn_to_memslot+0x155/0x190 [kvm] kvm_vcpu_gfn_to_hva_prot+0x18/0x80 [kvm] paging64_walk_addr_generic+0x183/0x450 [kvm] paging64_gva_to_gpa+0x63/0xd0 [kvm] kvm_fetch_guest_virt+0x53/0xc0 [kvm] __do_insn_fetch_bytes+0x18b/0x1c0 [kvm] x86_decode_insn+0xf0/0xef0 [kvm] x86_emulate_instruction+0xba/0x790 [kvm] kvm_emulate_instruction+0x17/0x20 [kvm] __svm_skip_emulated_instruction+0x85/0x100 [kvm_amd] svm_skip_emulated_instruction+0x13/0x20 [kvm_amd] handle_fastpath_set_msr_irqoff+0xae/0x180 [kvm] svm_vcpu_run+0x4b8/0x5a0 [kvm_amd] vcpu_enter_guest+0x16ca/0x22f0 [kvm] kvm_arch_vcpu_ioctl_run+0x39d/0x900 [kvm] kvm_vcpu_ioctl+0x538/0x620 [kvm] __se_sys_ioctl+0x77/0xc0 __x64_sys_ioctl+0x1d/0x20 do_syscall_64+0x3d/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 404d5d7bff0d ("KVM: X86: Introduce more exit_fastpath_completion enum values") Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220930234031.1732249-1-seanjc@google.com arch/x86/kvm/svm/svm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 17122c06b86c9f77f45b86b8e62c3ed440847a59 Author: Sean Christopherson Date: Fri Sep 30 23:36:32 2022 +0000 KVM: x86: Fail emulation during EMULTYPE_SKIP on any exception Treat any exception during instruction decode for EMULTYPE_SKIP as a "full" emulation failure, i.e. signal failure instead of queuing the exception. When decoding purely to skip an instruction, KVM and/or the CPU has already done some amount of emulation that cannot be unwound, e.g. on an EPT misconfig VM-Exit KVM has already processeed the emulated MMIO. KVM already does this if a #UD is encountered, but not for other exceptions, e.g. if a #PF is encountered during fetch. In SVM's soft-injection use case, queueing the exception is particularly problematic as queueing exceptions while injecting events can put KVM into an infinite loop due to bailing from VM-Enter to service the newly pending exception. E.g. multiple warnings to detect such behavior fire: ------------[ cut here ]------------ WARNING: CPU: 3 PID: 1017 at arch/x86/kvm/x86.c:9873 kvm_arch_vcpu_ioctl_run+0x1de5/0x20a0 [kvm] Modules linked in: kvm_amd ccp kvm irqbypass CPU: 3 PID: 1017 Comm: svm_nested_soft Not tainted 6.0.0-rc1+ #220 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kvm_arch_vcpu_ioctl_run+0x1de5/0x20a0 [kvm] Call Trace: kvm_vcpu_ioctl+0x223/0x6d0 [kvm] __x64_sys_ioctl+0x85/0xc0 do_syscall_64+0x2b/0x50 entry_SYSCALL_64_after_hwframe+0x46/0xb0 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 3 PID: 1017 at arch/x86/kvm/x86.c:9987 kvm_arch_vcpu_ioctl_run+0x12a3/0x20a0 [kvm] Modules linked in: kvm_amd ccp kvm irqbypass CPU: 3 PID: 1017 Comm: svm_nested_soft Tainted: G W 6.0.0-rc1+ #220 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kvm_arch_vcpu_ioctl_run+0x12a3/0x20a0 [kvm] Call Trace: kvm_vcpu_ioctl+0x223/0x6d0 [kvm] __x64_sys_ioctl+0x85/0xc0 do_syscall_64+0x2b/0x50 entry_SYSCALL_64_after_hwframe+0x46/0xb0 ---[ end trace 0000000000000000 ]--- Fixes: 6ea6e84309ca ("KVM: x86: inject exceptions produced by x86_decode_insn") Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20220930233632.1725475-1-seanjc@google.com arch/x86/kvm/x86.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 89903dcb3c2e134fb101de7921a19dd9f8418b4c Author: Pengcheng Yang Date: Tue Nov 29 18:40:41 2022 +0800 selftests/bpf: Add ingress tests for txmsg with apply_bytes Currently, the ingress redirect is not covered in "txmsg test apply". Signed-off-by: Pengcheng Yang Signed-off-by: Daniel Borkmann Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/1669718441-2654-5-git-send-email-yangpc@wangsu.com tools/testing/selftests/bpf/test_sockmap.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 9072931f020bfd907d6d89ee21ff1481cd78b407 Author: Pengcheng Yang Date: Tue Nov 29 18:40:40 2022 +0800 bpf, sockmap: Fix data loss caused by using apply_bytes on ingress redirect Use apply_bytes on ingress redirect, when apply_bytes is less than the length of msg data, some data may be skipped and lost in bpf_tcp_ingress(). If there is still data in the scatterlist that has not been consumed, we cannot move the msg iter. Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: Pengcheng Yang Signed-off-by: Daniel Borkmann Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/1669718441-2654-4-git-send-email-yangpc@wangsu.com net/ipv4/tcp_bpf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a351d6087bf7d3d8440d58d3bf244ec64b89394a Author: Pengcheng Yang Date: Tue Nov 29 18:40:39 2022 +0800 bpf, sockmap: Fix missing BPF_F_INGRESS flag when using apply_bytes When redirecting, we use sk_msg_to_ingress() to get the BPF_F_INGRESS flag from the msg->flags. If apply_bytes is used and it is larger than the current data being processed, sk_psock_msg_verdict() will not be called when sendmsg() is called again. At this time, the msg->flags is 0, and we lost the BPF_F_INGRESS flag. So we need to save the BPF_F_INGRESS flag in sk_psock and use it when redirection. Fixes: 8934ce2fd081 ("bpf: sockmap redirect ingress support") Signed-off-by: Pengcheng Yang Signed-off-by: Daniel Borkmann Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/1669718441-2654-3-git-send-email-yangpc@wangsu.com include/linux/skmsg.h | 1 + include/net/tcp.h | 4 ++-- net/core/skmsg.c | 9 ++++++--- net/ipv4/tcp_bpf.c | 11 ++++++----- net/tls/tls_sw.c | 6 ++++-- 5 files changed, 19 insertions(+), 12 deletions(-) commit 7a9841ca025275b5b0edfb0b618934abb6ceec15 Author: Pengcheng Yang Date: Tue Nov 29 18:40:38 2022 +0800 bpf, sockmap: Fix repeated calls to sock_put() when msg has more_data In tcp_bpf_send_verdict() redirection, the eval variable is assigned to __SK_REDIRECT after the apply_bytes data is sent, if msg has more_data, sock_put() will be called multiple times. We should reset the eval variable to __SK_NONE every time more_data starts. This causes: IPv4: Attempt to release TCP socket in state 1 00000000b4c925d7 ------------[ cut here ]------------ refcount_t: addition on 0; use-after-free. WARNING: CPU: 5 PID: 4482 at lib/refcount.c:25 refcount_warn_saturate+0x7d/0x110 Modules linked in: CPU: 5 PID: 4482 Comm: sockhash_bypass Kdump: loaded Not tainted 6.0.0 #1 Hardware name: Red Hat KVM, BIOS 1.11.0-2.el7 04/01/2014 Call Trace: __tcp_transmit_skb+0xa1b/0xb90 ? __alloc_skb+0x8c/0x1a0 ? __kmalloc_node_track_caller+0x184/0x320 tcp_write_xmit+0x22a/0x1110 __tcp_push_pending_frames+0x32/0xf0 do_tcp_sendpages+0x62d/0x640 tcp_bpf_push+0xae/0x2c0 tcp_bpf_sendmsg_redir+0x260/0x410 ? preempt_count_add+0x70/0xa0 tcp_bpf_send_verdict+0x386/0x4b0 tcp_bpf_sendmsg+0x21b/0x3b0 sock_sendmsg+0x58/0x70 __sys_sendto+0xfa/0x170 ? xfd_validate_state+0x1d/0x80 ? switch_fpu_return+0x59/0xe0 __x64_sys_sendto+0x24/0x30 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: cd9733f5d75c ("tcp_bpf: Fix one concurrency problem in the tcp_bpf_send_verdict function") Signed-off-by: Pengcheng Yang Signed-off-by: Daniel Borkmann Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/1669718441-2654-2-git-send-email-yangpc@wangsu.com net/ipv4/tcp_bpf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4265df667bbdc71c640e43c905bd9aeeead92365 Author: Peng Hao Date: Tue Nov 8 11:50:54 2022 +0800 KVM: x86: Keep the lock order consistent between SRCU and gpc spinlock Acquire SRCU before taking the gpc spinlock in wait_pending_event() so as to be consistent with all other functions that acquire both locks. It's not illegal to acquire SRCU inside a spinlock, nor is there deadlock potential, but in general it's preferable to order locks from least restrictive to most restrictive, e.g. if wait_pending_event() needed to sleep for whatever reason, it could do so while holding SRCU, but would need to drop the spinlock. Signed-off-by: Peng Hao Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/CAPm50a++Cb=QfnjMZ2EnCj-Sb9Y4UM-=uOEtHAcjnNLCAAf-dQ@mail.gmail.com Signed-off-by: Sean Christopherson arch/x86/kvm/xen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e0ff428042335c7b62785b3cf911c427a618bc86 Author: Ma Wupeng Date: Fri Nov 25 14:54:44 2022 +0800 mm/memory-failure.c: cleanup in unpoison_memory If freeit is true, the value of ret must be zero, there is no need to check the value of freeit after label unlock_mutex. We can drop variable freeit to do this cleanup. Link: https://lkml.kernel.org/r/20221125065444.3462681-1-mawupeng1@huawei.com Signed-off-by: Ma Wupeng Acked-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Cc: zhenwei pi Signed-off-by: Andrew Morton mm/memory-failure.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e833bc50340502a2a75b41bbd1a179aa769e2014 Author: Peter Xu Date: Fri Nov 25 13:58:57 2022 -0500 mm/thp: re-apply mkdirty for small pages after split We used to have 624a2c94f5b7 (Partly revert "mm/thp: carry over dirty bit when thp splits on pmd") fixing the regression reported here by Anatoly Pugachev on sparc64: https://lore.kernel.org/r/20221021160603.GA23307@u164.east.ru Where we temporarily ignored the dirty bit for small pages. Then, Hev also reported similar issue on loongarch: (the original mail was private, but Anatoly copied the list here) https://lore.kernel.org/r/CADxRZqxqb7f_WhMh=jweZP+ynf_JwGd-0VwbYgp4P+T0-AXosw@mail.gmail.com Hev pointed out that the issue is having HW write bit set within the pte_mkdirty() so the split pte can be written after split even if e.g. they were shared by more than one processes, causing data corrupt. Hev also tried to explain why loongarch set HW write bit in mkdirty: https://lore.kernel.org/r/CAHirt9itKO_K_HPboXh5AyJtt16Zf0cD73PtHvM=na39u_ztxA@mail.gmail.com One way to fix it is as what Huacai proposed here for loongarch (then we can re-apply the dirty bit in thp split): https://lore.kernel.org/r/20221117042532.4064448-1-chenhuacai@loongson.cnn We may need similar thing for sparc64, though. For now since we've found the root cause of the dirty bit issue the simpler solution (which won't lose the dirty bit for small) that will work for both is we wr-protect after pte_mkdirty(), so the HW write bit can be persistent after thp split. Add a comment for wrprotect, so we will not mess up the ordering later. With 624a2c94f5b7 (Partly revert "mm/thp: carry over dirty bit when thp splits on pmd") this is not a fix anymore, but just brings back the dirty bit for thp split safely, so we re-apply the optimization but in safe way. Provide a Tested-by credit to Hev too (not the exact same patch but the same outcome) for loongarch. Link: https://lkml.kernel.org/r/20221125185857.3110155-1-peterx@redhat.com Signed-off-by: Peter Xu Tested-by: Hev # loongarch Cc: Anatoly Pugachev Cc: Raghavendra K T Cc: Thorsten Leemhuis Cc: Mike Kravetz Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton mm/huge_memory.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 8ef9c32a12a8a0012a4988050947c45521260c5d Author: Xu Panda Date: Thu Nov 24 19:29:01 2022 +0800 mm: vmscan: use sysfs_emit() to instead of scnprintf() Replace open-coded snprintf() with sysfs_emit() to simplify the code. Link: https://lkml.kernel.org/r/202211241929015476424@zte.com.cn Signed-off-by: Xu Panda Signed-off-by: Yang Yang Signed-off-by: Andrew Morton mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e25de77bc5ea56cc3ff618fc8f4ea1896a4dbb3 Author: Anshuman Khandual Date: Fri Nov 25 09:15:02 2022 +0530 s390/mm: use pmd_pgtable_page() helper in __gmap_segment_gaddr() In __gmap_segment_gaddr() pmd level page table page is being extracted from the pmd pointer, similar to pmd_pgtable_page() implementation. This reduces some redundancy by directly using pmd_pgtable_page() instead, though first making it available. Link: https://lkml.kernel.org/r/20221125034502.1559986-1-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Alexander Gordeev Cc: Christian Borntraeger Cc: David Hildenbrand Cc: Heiko Carstens Signed-off-by: Andrew Morton arch/s390/mm/gmap.c | 5 ++--- include/linux/mm.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit 373dfda2bac1173971099dc76254a016646f62ab Author: Anshuman Khandual Date: Thu Nov 24 18:46:41 2022 +0530 mm/thp: rename pmd_to_page() as pmd_pgtable_page() Current pmd_to_page(), which derives the page table page containing the pmd address has a very misleading name. The problem being, it sounds similar to pmd_page() which derives page embedded in a given pmd entry either for next level page or a mapped huge page. Rename it as pmd_pgtable_page() instead. Link: https://lkml.kernel.org/r/20221124131641.1523772-1-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Cc: Mike Kravetz Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton include/linux/mm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8d9b63708ddd1ac51e0260c7b8f641daf01f4caf Author: Sergey Senozhatsky Date: Tue Nov 22 12:30:22 2022 +0900 zswap: do not allocate from atomic pool zswap_frontswap_load() should be called from preemptible context (we even call mutex_lock() there) and it does not look like we need to do GFP_ATOMIC allocaion for temp buffer. The same applies to zswap_writeback_entry(). Use GFP_KERNEL for temporary buffer allocation in both cases. Link: https://lkml.kernel.org/r/Y3xCTr6ikbtcUr/y@google.com Signed-off-by: Johannes Weiner Signed-off-by: Nhat Pham Signed-off-by: Sergey Senozhatsky Cc: Dan Streetman Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Vitaly Wool Signed-off-by: Andrew Morton mm/zpool.c | 7 +++++++ mm/zswap.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit 7ce5f7e16afa82d33dc47d633404b8b1142a5e44 Author: Anshuman Khandual Date: Wed Nov 23 10:43:19 2022 +0530 documentation/mm: update pmd_present() in arch_pgtable_helpers.rst Although pmd_present() might seem to indicate a valid and mapped pmd entry, in reality it returns true when pmd_page() points to a valid page in memory , regardless whether the pmd entry is mapped or not. Andrea Arcangeli had earlier explained [1] the required semantics for pmd_present(). This just updates the documentation for pmd_present() as required. [1] https://lore.kernel.org/lkml/20181017020930.GN30832@redhat.com/ Link: https://lkml.kernel.org/r/20221123051319.1312582-1-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: David Hildenbrand Cc: Jonathan Corbet Cc: Andrea Arcangeli Cc: Mike Rapoport Signed-off-by: Andrew Morton Documentation/mm/arch_pgtable_helpers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be21b32afe470c5ae98e27e49201158a47032942 Author: NARIBAYASHI Akira Date: Wed Oct 26 20:24:38 2022 +0900 mm, compaction: fix fast_isolate_around() to stay within boundaries Depending on the memory configuration, isolate_freepages_block() may scan pages out of the target range and causes panic. Panic can occur on systems with multiple zones in a single pageblock. The reason it is rare is that it only happens in special configurations. Depending on how many similar systems there are, it may be a good idea to fix this problem for older kernels as well. The problem is that pfn as argument of fast_isolate_around() could be out of the target range. Therefore we should consider the case where pfn < start_pfn, and also the case where end_pfn < pfn. This problem should have been addressd by the commit 6e2b7044c199 ("mm, compaction: make fast_isolate_freepages() stay within zone") but there was an oversight. Case1: pfn < start_pfn | node X's zone | node Y's zone +-----------------+------------------------------... pageblock ^ ^ ^ +-----------+-----------+-----------+-----------+... ^ ^ ^ ^ ^ end_pfn ^ start_pfn = cc->zone->zone_start_pfn pfn <---------> scanned range by "Scan After" Case2: end_pfn < pfn | node X's zone | node Y's zone +-----------------+------------------------------... pageblock ^ ^ ^ +-----------+-----------+-----------+-----------+... ^ ^ ^ ^ ^ pfn ^ end_pfn start_pfn <---------> scanned range by "Scan Before" It seems that there is no good reason to skip nr_isolated pages just after given pfn. So let perform simple scan from start to end instead of dividing the scan into "Before" and "After". Link: https://lkml.kernel.org/r/20221026112438.236336-1-a.naribayashi@fujitsu.com Fixes: 6e2b7044c199 ("mm, compaction: make fast_isolate_freepages() stay within zone"). Signed-off-by: NARIBAYASHI Akira Cc: David Rientjes Cc: Mel Gorman Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton mm/compaction.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit eba39236f18da7a50b6c51df5d902ee72c43e760 Author: Stefan Roesch Date: Fri Nov 18 16:52:15 2022 -0800 mm: document /sys/class/bdi//min_ratio_fine knob This documents the new /sys/class/bdi//max_ratio_fine knob. [akpm@linux-foundation.org: fix htmldocs warnings] Link: https://lkml.kernel.org/r/20221119005215.3052436-21-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton Documentation/ABI/testing/sysfs-class-bdi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ad3e6dabf6f7d9ffd68eb711191ef16cdbdd25f0 Author: Stefan Roesch Date: Fri Nov 18 16:52:14 2022 -0800 mm: add /sys/class/bdi//min_ratio_fine knob This adds the min_ratio_fine knob. The knob specifies the values not based on 1 of 100, but instead 1 per million. Link: https://lkml.kernel.org/r/20221119005215.3052436-20-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton mm/backing-dev.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 2c44af4f2aaa260199f218f11920c406e688693c Author: Stefan Roesch Date: Fri Nov 18 16:52:13 2022 -0800 mm: add bdi_set_min_ratio_no_scale() function This introduces bdi_set_min_ratio_no_scale(). It uses the max granularity for the ratio. This function by the new sysfs knob min_ratio_fine. Link: https://lkml.kernel.org/r/20221119005215.3052436-19-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton include/linux/backing-dev.h | 1 + mm/page-writeback.c | 7 +++++++ 2 files changed, 8 insertions(+) commit 54790f30fea74247e2f38b4a632ee3dc2fe42d86 Author: Stefan Roesch Date: Fri Nov 18 16:52:12 2022 -0800 mm: document /sys/class/bdi//max_ratio_fine knob This documents the new /sys/class/bdi//max_ratio_fine knob. [akpm@linux-foundation.org: fix htmldocs warnings] Link: https://lkml.kernel.org/r/20221119005215.3052436-18-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton Documentation/ABI/testing/sysfs-class-bdi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit bca52dcbadc583f4db6435599c44a79f97293f06 Author: Stefan Roesch Date: Fri Nov 18 16:52:11 2022 -0800 mm: add /sys/class/bdi//max_ratio_fine knob This adds the max_ratio_fine knob. The knob specifies the values not based on 1 of 100, but instead 1 per million. Link: https://lkml.kernel.org/r/20221119005215.3052436-17-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton mm/backing-dev.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 4e230b406eda9bdf7f8a71e2cc3df18a824abcb0 Author: Stefan Roesch Date: Fri Nov 18 16:52:10 2022 -0800 mm: add bdi_set_max_ratio_no_scale() function This introduces bdi_set_max_ratio_no_scale(). It uses the max granularity for the ratio. This function by the new sysfs knob max_ratio_fine. Link: https://lkml.kernel.org/r/20221119005215.3052436-16-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton include/linux/backing-dev.h | 1 + mm/page-writeback.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit 9c832a8d571784c998d0f9f5df480c62f7f3064c Author: Stefan Roesch Date: Fri Nov 18 16:52:09 2022 -0800 mm: document /sys/class/bdi//min_bytes knob This documents the new /sys/class/bdi//min_bytes knob. [akpm@linux-foundation.org: fix htmldocs warnings] Link: https://lkml.kernel.org/r/20221119005215.3052436-15-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton Documentation/ABI/testing/sysfs-class-bdi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 9c84819bd64ec15cb15d041c45ebe4725e9d4f3b Author: Stefan Roesch Date: Fri Nov 18 16:52:08 2022 -0800 mm: add /sys/class/bdi//min_bytes knob bdi has two existing knobs to limit the amount of dirty memory: min_ratio and max_ratio. However the granularity of the knobs is limited and often it is more convenient to specify limits in terms of bytes. This change adds the min_bytes knob. It does not store the min_bytes value, instead it converts the max_bytes value to a ratio. The value is therefore more an approximation than an absolute value. It also maintains the sum over all the bdi min_ratio values stored in the variable bdi_min_ratio. Link: https://lkml.kernel.org/r/20221119005215.3052436-14-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton mm/backing-dev.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 803c98050569850be5fd51a2025c67622de887d9 Author: Stefan Roesch Date: Fri Nov 18 16:52:07 2022 -0800 mm: add bdi_set_min_bytes() function This introduces the bdi_set_min_bytes() function. The min_bytes function does not store the min_bytes value. Instead it converts the min_bytes value into the corresponding ratio value. Link: https://lkml.kernel.org/r/20221119005215.3052436-13-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton include/linux/backing-dev.h | 1 + mm/page-writeback.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) commit 8021fb3232f265b81c7e4e7aba15bc3a04ff1fd3 Author: Stefan Roesch Date: Fri Nov 18 16:52:06 2022 -0800 mm: split off __bdi_set_min_ratio() function This splits off the __bdi_set_min_ratio() function from the bdi_set_min_ratio() function. The __bdi_set_min_ratio() function will also be called from the bdi_set_min_bytes() function, which will be introduced in the next patch. Link: https://lkml.kernel.org/r/20221119005215.3052436-12-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton mm/page-writeback.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 712c00d66a342a3ed375df41c3df7d3d2abad2c0 Author: Stefan Roesch Date: Fri Nov 18 16:52:05 2022 -0800 mm: add bdi_get_min_bytes() function This adds a function to return the specified value for min_bytes. It converts the stored min_ratio of the bdi to the corresponding bytes value. This is an approximation as it is based on the value that is returned by global_dirty_limits(), which can change. The returned value can be different than the value when the min_bytes value was set. Link: https://lkml.kernel.org/r/20221119005215.3052436-11-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton include/linux/backing-dev.h | 1 + mm/page-writeback.c | 5 +++++ 2 files changed, 6 insertions(+) commit c354d9268d7825eb8643f658c5091079d4f11a4a Author: Stefan Roesch Date: Fri Nov 18 16:52:04 2022 -0800 mm: document /sys/class/bdi//max_bytes knob This documents the new /sys/class/bdi//max_bytes knob. Link: https://lkml.kernel.org/r/20221119005215.3052436-10-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton Documentation/ABI/testing/sysfs-class-bdi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit c56e049a5e401a177c7c9b39a3bcc973ff5cec0b Author: Stefan Roesch Date: Fri Nov 18 16:52:03 2022 -0800 mm: add knob /sys/class/bdi//max_bytes This adds the new knob max_bytes to specify a dirty memory limit for the corresponding bdi. The specified bytes value is converted to a ratio. Link: https://lkml.kernel.org/r/20221119005215.3052436-9-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton mm/backing-dev.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 1bf27e98d26d1e62166a456ef17460be085cbe0b Author: Stefan Roesch Date: Fri Nov 18 16:52:02 2022 -0800 mm: add bdi_set_max_bytes() function This introduces the bdi_set_max_bytes() function. The max_bytes function does not store the max_bytes value. Instead it converts the max_bytes value into the corresponding ratio value. Link: https://lkml.kernel.org/r/20221119005215.3052436-8-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton include/linux/backing-dev.h | 1 + mm/page-writeback.c | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit efc3e6ad53ea14225b434fddca261c9a1c56c707 Author: Stefan Roesch Date: Fri Nov 18 16:52:01 2022 -0800 mm: split off __bdi_set_max_ratio() function This splits off __bdi_set_max_ratio() from bdi_set_max_ratio(). __bdi_set_max_ratio() will also be called from bdi_set_max_bytes(), which will be introduced in the next patch. Link: https://lkml.kernel.org/r/20221119005215.3052436-7-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton mm/page-writeback.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 00df7d51263b46ed93f7572e2d09579746f7b1eb Author: Stefan Roesch Date: Fri Nov 18 16:52:00 2022 -0800 mm: add bdi_get_max_bytes() function This adds a function to return the specified value for max_bytes. It converts the stored max_ratio of the bdi to the corresponding bytes value. It introduces the bdi_get_bytes helper function to do the conversion. This is an approximation as it is based on the value that is returned by global_dirty_limits(), which can change. The helper function will also be used by the min_bytes bdi knob. Link: https://lkml.kernel.org/r/20221119005215.3052436-6-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton include/linux/backing-dev.h | 1 + mm/page-writeback.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) commit ae82291e9ca47c3d6da6b77a00f427754aca413e Author: Stefan Roesch Date: Fri Nov 18 16:51:59 2022 -0800 mm: use part per 1000000 for bdi ratios To get finer granularity for ratio calculations use part per million instead of percentiles. This is especially important if we want to automatically convert byte values to ratios. Otherwise the values that are actually used can be quite different. This is also important for machines with more main memory (1% of 256GB is already 2.5GB). Link: https://lkml.kernel.org/r/20221119005215.3052436-5-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton include/linux/backing-dev.h | 3 +++ mm/backing-dev.c | 6 +++--- mm/page-writeback.c | 15 +++++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) commit 16b837eb84e6948f92411eb32e97a05f89733ddc Author: Stefan Roesch Date: Fri Nov 18 16:51:58 2022 -0800 mm: document /sys/class/bdi//strict_limit knob This documents the new /sys/class/bdi//strict_limit knob. Link: https://lkml.kernel.org/r/20221119005215.3052436-4-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton Documentation/ABI/testing/sysfs-class-bdi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 27bbe9d48d4e298864e18b39f091342c68b81637 Author: Stefan Roesch Date: Fri Nov 18 16:51:57 2022 -0800 mm: add knob /sys/class/bdi//strict_limit Add a new knob to /sys/class/bdi//strict_limit. This new knob allows to set/unset the flag BDI_CAP_STRICTLIMIT in the bdi capabilities. Link: https://lkml.kernel.org/r/20221119005215.3052436-3-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Chris Mason Cc: Jens Axboe Signed-off-by: Andrew Morton mm/backing-dev.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 8e9d5ead865a1a7af74a444d2f00f1ef4539bfba Author: Stefan Roesch Date: Fri Nov 18 16:51:56 2022 -0800 mm: add bdi_set_strict_limit() function Patch series "mm/block: add bdi sysfs knobs", v4. At meta network block devices (nbd) are used to implement remote block storage. In testing and during production it has been observed that these network block devices can consume a huge portion of the dirty writeback cache and writeback can take a considerable time. To be able to give stricter limits, I'm proposing the following changes: 1) introduce strictlimit knob Currently the max_ratio knob exists to limit the dirty_memory. However this knob only applies once (dirty_ratio + dirty_background_ratio) / 2 has been reached. With the BDI_CAP_STRICTLIMIT flag, the max_ratio can be applied without reaching that limit. This change exposes that knob. This knob can also be useful for NFS, fuse filesystems and USB devices. 2) Use part of 1000000 internal calculation The max_ratio is based on percentage. With the current machine sizes percentage values can be very high (1% of a 256GB main memory is already 2.5GB). This change uses part of 1000000 instead of percentages for the internal calculations. 3) Introduce two new sysfs knobs: min_bytes and max_bytes. Currently all calculations are based on ratio, but for a user it often more convenient to specify a limit in bytes. The new knobs will not store bytes values, instead they will translate the byte value to a corresponding ratio. As the internal values are now part of 1000, the ratio is closer to the specified value. However the value should be more seen as an approximation as it can fluctuate over time. 3) Introduce two new sysfs knobs: min_ratio_fine and max_ratio_fine. The granularity for the existing sysfs bdi knobs min_ratio and max_ratio is based on percentage values. The new sysfs bdi knobs min_ratio_fine and max_ratio_fine allow to specify the ratio as part of 1 million. This patch (of 20): This adds the bdi_set_strict_limit function to be able to set/unset the BDI_CAP_STRICTLIMIT flag. Link: https://lkml.kernel.org/r/20221119005215.3052436-1-shr@devkernel.io Link: https://lkml.kernel.org/r/20221119005215.3052436-2-shr@devkernel.io Signed-off-by: Stefan Roesch Cc: Jens Axboe Cc: Chris Mason Signed-off-by: Andrew Morton include/linux/backing-dev.h | 1 + mm/page-writeback.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) commit 845aad0aa038507c166cdc48fbf2e5d863fe73dc Author: Randy Dunlap Date: Fri Nov 18 21:51:17 2022 -0800 maple_tree: allow TEST_MAPLE_TREE only when DEBUG_KERNEL is set Prevent a kconfig warning that is caused by TEST_MAPLE_TREE by adding a "depends on" clause for TEST_MAPLE_TREE since 'select' does not follow any kconfig dependencies. WARNING: unmet direct dependencies detected for DEBUG_MAPLE_TREE Depends on [n]: DEBUG_KERNEL [=n] Selected by [y]: - TEST_MAPLE_TREE [=y] && RUNTIME_TESTING_MENU [=y] Link: https://lkml.kernel.org/r/20221119055117.14094-1-rdunlap@infradead.org Fixes: 120b116208a0 ("maple_tree: reorganize testing to restore module testing") Signed-off-by: Randy Dunlap Reported-by: Geert Uytterhoeven Reported-by: kernel test robot Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) commit f6fbb8b23b8155a6f7af1349b4595d0373167636 Author: Alexander Potapenko Date: Thu Nov 10 12:35:41 2022 +0100 Revert "kmsan: unpoison @tlb in arch_tlb_gather_mmu()" This reverts commit ac801e7e252c5588325e3c983c7d4167fc68c024. The patch in question was picked to -mm from the KMSAN v6 patch series (https://lore.kernel.org/linux-mm/20220905122452.2258262-1-glider@google.com/) and sneaked into mainline despite its removal from the v7 series (https://lore.kernel.org/linux-mm/20220915150417.722975-1-glider@google.com/) Currently KMSAN does not warn about origin chains hitting the maximum depth, so keeping @tlb poisoned won't result in any inconveniences. Link: https://lkml.kernel.org/r/20221110113541.1844156-1-glider@google.com Signed-off-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Marco Elver Cc: Peter Zijlstra (Intel) Cc: Will Deacon Signed-off-by: Andrew Morton mm/mmu_gather.c | 10 ---------- 1 file changed, 10 deletions(-) commit 7438899b0b8df16a73d9a5d49b2a345d165adfe8 Author: Vishal Moola (Oracle) Date: Thu Nov 17 23:30:55 2022 -0800 folio-compat: remove try_to_release_page() There are no more callers of try_to_release_page(), so remove it. This saves 85 bytes of kernel text. Link: https://lkml.kernel.org/r/20221118073055.55694-5-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Matthew Wilcox Cc: Naoya Horiguchi Cc: Theodore Ts'o Signed-off-by: Andrew Morton include/linux/pagemap.h | 1 - mm/folio-compat.c | 6 ------ 2 files changed, 7 deletions(-) commit ac5efa782041670b63a05c36d92d02a80e50bb63 Author: Vishal Moola (Oracle) Date: Thu Nov 17 23:30:54 2022 -0800 memory-failure: convert truncate_error_page() to use folio Replace try_to_release_page() with filemap_release_folio(). This change is in preparation for the removal of the try_to_release_page() wrapper. Link: https://lkml.kernel.org/r/20221118073055.55694-4-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Naoya Horiguchi Cc: Matthew Wilcox Cc: Theodore Ts'o Signed-off-by: Andrew Morton mm/memory-failure.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 64ab3195ea077eaeedc8b382939c3dc5ca56f369 Author: Vishal Moola (Oracle) Date: Thu Nov 17 23:30:53 2022 -0800 khugepage: replace try_to_release_page() with filemap_release_folio() Replace some calls with their folio equivalents. This change removes 4 calls to compound_head() and is in preparation for the removal of the try_to_release_page() wrapper. Link: https://lkml.kernel.org/r/20221118073055.55694-3-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Matthew Wilcox Cc: Naoya Horiguchi Cc: Theodore Ts'o Signed-off-by: Andrew Morton mm/khugepaged.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 6dd8fe86fa84729538d8bed3149faf9c5886bb5b Author: Vishal Moola (Oracle) Date: Thu Nov 17 23:30:52 2022 -0800 ext4: convert move_extent_per_page() to use folios Patch series "Removing the try_to_release_page() wrapper", v3. This patchset replaces the remaining calls of try_to_release_page() with the folio equivalent: filemap_release_folio(). This allows us to remove the wrapper. This patch (of 4): Convert move_extent_per_page() to use folios. This change removes 5 calls to compound_head() and is in preparation for the removal of the try_to_release_page() wrapper. Link: https://lkml.kernel.org/r/20221118073055.55694-1-vishal.moola@gmail.com Link: https://lkml.kernel.org/r/20221118073055.55694-2-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Matthew Wilcox Cc: Naoya Horiguchi Cc: Theodore Ts'o Signed-off-by: Andrew Morton fs/ext4/move_extent.c | 52 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 21 deletions(-) commit a4bafffb5dc5be6c7a3b77b2de0cbaf6776a3c8b Author: Mel Gorman Date: Tue Nov 22 13:12:29 2022 +0000 mm/page_alloc: simplify locking during free_unref_page_list While freeing a large list, the zone lock will be released and reacquired to avoid long hold times since commit c24ad77d962c ("mm/page_alloc.c: avoid excessive IRQ disabled times in free_unref_page_list()"). As suggested by Vlastimil Babka, the lockrelease/reacquire logic can be simplified by reusing the logic that acquires a different lock when changing zones. Link: https://lkml.kernel.org/r/20221122131229.5263-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Vlastimil Babka Signed-off-by: Andrew Morton mm/page_alloc.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 5749077415994eb02d660b2559b9d8278521e73d Author: Mel Gorman Date: Fri Nov 18 10:17:14 2022 +0000 mm/page_alloc: leave IRQs enabled for per-cpu page allocations The pcp_spin_lock_irqsave protecting the PCP lists is IRQ-safe as a task allocating from the PCP must not re-enter the allocator from IRQ context. In each instance where IRQ-reentrancy is possible, the lock is acquired using pcp_spin_trylock_irqsave() even though IRQs are disabled and re-entrancy is impossible. Demote the lock to pcp_spin_lock avoids an IRQ disable/enable in the common case at the cost of some IRQ allocations taking a slower path. If the PCP lists need to be refilled, the zone lock still needs to disable IRQs but that will only happen on PCP refill and drain. If an IRQ is raised when a PCP allocation is in progress, the trylock will fail and fallback to using the buddy lists directly. Note that this may not be a universal win if an interrupt-intensive workload also allocates heavily from interrupt context and contends heavily on the zone->lock as a result. [mgorman@techsingularity.net: migratetype might be wrong if a PCP was locked] Link: https://lkml.kernel.org/r/20221122131229.5263-2-mgorman@techsingularity.net [yuzhao@google.com: reported lockdep issue on IO completion from softirq] [hughd@google.com: fix list corruption, lock improvements, micro-optimsations] Link: https://lkml.kernel.org/r/20221118101714.19590-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Vlastimil Babka Cc: Marcelo Tosatti Cc: Marek Szyprowski Cc: Michal Hocko Signed-off-by: Andrew Morton mm/page_alloc.c | 124 ++++++++++++++++++++++++-------------------------------- 1 file changed, 54 insertions(+), 70 deletions(-) commit c3e58a70425ac6ddaae1529c8146e88b4f7252bb Author: Mel Gorman Date: Fri Nov 18 10:17:13 2022 +0000 mm/page_alloc: always remove pages from temporary list Patch series "Leave IRQs enabled for per-cpu page allocations", v3. This patch (of 2): free_unref_page_list() has neglected to remove pages properly from the list of pages to free since forever. It works by coincidence because list_add happened to do the right thing adding the pages to just the PCP lists. However, a later patch added pages to either the PCP list or the zone list but only properly deleted the page from the list in one path leading to list corruption and a subsequent failure. As a preparation patch, always delete the pages from one list properly before adding to another. On its own, this fixes nothing although it adds a fractional amount of overhead but is critical to the next patch. Link: https://lkml.kernel.org/r/20221118101714.19590-1-mgorman@techsingularity.net Link: https://lkml.kernel.org/r/20221118101714.19590-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reported-by: Hugh Dickins Reviewed-by: Vlastimil Babka Cc: Marcelo Tosatti Cc: Marek Szyprowski Cc: Michal Hocko Cc: Yu Zhao Signed-off-by: Andrew Morton mm/page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) commit 91a99f1d1248bdde674b66e20ac472ec76f6a202 Author: Peter Xu Date: Thu Nov 17 16:29:15 2022 -0500 selftests/vm: use memfd for hugepage-mmap test This test was overlooked with a hard-coded mntpoint path in test when we're removing the hugetlb mntpoint in commit 0796c7b8be84. Fix it up so the test can keep running. Link: https://lkml.kernel.org/r/Y3aojfUC2nSwbCzB@x1n Fixes: 0796c7b8be84 ("selftests/vm: drop mnt point for hugetlb in run_vmtests.sh") Signed-off-by: Peter Xu Reported-by: Joel Savitz Signed-off-by: Andrew Morton tools/testing/selftests/vm/hugepage-mmap.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 47939359add5242d27ee6a30e8bcb0cef15ba45c Author: Sergey Senozhatsky Date: Thu Nov 17 23:13:26 2022 +0900 zram: remove unused stats fields We don't show num_reads and num_writes since we removed corresponding sysfs nodes in 2017. Block layer stats are exposed via /sys/block/zramX/stat file. However, we still increment those atomic vars and store them in zram stats. Remove leftovers. Link: https://lkml.kernel.org/r/20221117141326.1105181-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Nitin Gupta Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 2 -- drivers/block/zram/zram_drv.h | 2 -- 2 files changed, 4 deletions(-) commit 4c74b65f478dc9353780a6be17fc82f1b06cea80 Author: Yang Li Date: Wed Nov 16 09:23:45 2022 +0800 mm/migrate.c: stop using 0 as NULL pointer mm/migrate.c:1198:24: warning: Using plain integer as NULL pointer Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3080 Link: https://lkml.kernel.org/r/20221116012345.84870-1-yang.lee@linux.alibaba.com Signed-off-by: Yang Li Reported-by: Abaci Robot Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 931b6a8b36a2de3985eca27e758900e70cd99779 Author: Yu Zhao Date: Tue Nov 15 18:38:08 2022 -0700 mm: multi-gen LRU: remove NULL checks on NODE_DATA() NODE_DATA() is preallocated for all possible nodes after commit 09f49dca570a ("mm: handle uninitialized numa nodes gracefully"). Checking its return value against NULL is now unnecessary. Link: https://lkml.kernel.org/r/20221116013808.3995280-2-yuzhao@google.com Signed-off-by: Yu Zhao Signed-off-by: Andrew Morton mm/vmscan.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit f347454d034184b4f0a2caf6e14daf7848cea01c Author: David Hildenbrand Date: Mon Oct 31 16:25:24 2022 +0100 mm/gup: disallow FOLL_FORCE|FOLL_WRITE on hugetlb mappings hugetlb does not support fake write-faults (write faults without write permissions). However, we are currently able to trigger a FAULT_FLAG_WRITE fault on a VMA without VM_WRITE. If we'd ever want to support FOLL_FORCE|FOLL_WRITE, we'd have to teach hugetlb to: (1) Leave the page mapped R/O after the fake write-fault, like maybe_mkwrite() does. (2) Allow writing to an exclusive anon page that's mapped R/O when FOLL_FORCE is set, like can_follow_write_pte(). E.g., __follow_hugetlb_must_fault() needs adjustment. For now, it's not clear if that added complexity is really required. History tolds us that FOLL_FORCE is dangerous and that we better limit its use to a bare minimum. -------------------------------------------------------------------------- #include #include #include #include #include #include #include #include int main(int argc, char **argv) { char *map; int mem_fd; map = mmap(NULL, 2 * 1024 * 1024u, PROT_READ, MAP_PRIVATE|MAP_ANON|MAP_HUGETLB|MAP_HUGE_2MB, -1, 0); if (map == MAP_FAILED) { fprintf(stderr, "mmap() failed: %d\n", errno); return 1; } mem_fd = open("/proc/self/mem", O_RDWR); if (mem_fd < 0) { fprintf(stderr, "open(/proc/self/mem) failed: %d\n", errno); return 1; } if (pwrite(mem_fd, "0", 1, (uintptr_t) map) == 1) { fprintf(stderr, "write() succeeded, which is unexpected\n"); return 1; } printf("write() failed as expected: %d\n", errno); return 0; } -------------------------------------------------------------------------- Fortunately, we have a sanity check in hugetlb_wp() in place ever since commit 1d8d14641fd9 ("mm/hugetlb: support write-faults in shared mappings"), that bails out instead of silently mapping a page writable in a !PROT_WRITE VMA. Consequently, above reproducer triggers a warning, similar to the one reported by szsbot: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 3612 at mm/hugetlb.c:5313 hugetlb_wp+0x20a/0x1af0 mm/hugetlb.c:5313 Modules linked in: CPU: 1 PID: 3612 Comm: syz-executor250 Not tainted 6.1.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 RIP: 0010:hugetlb_wp+0x20a/0x1af0 mm/hugetlb.c:5313 Code: ea 03 80 3c 02 00 0f 85 31 14 00 00 49 8b 5f 20 31 ff 48 89 dd 83 e5 02 48 89 ee e8 70 ab b7 ff 48 85 ed 75 5b e8 76 ae b7 ff <0f> 0b 41 bd 40 00 00 00 e8 69 ae b7 ff 48 b8 00 00 00 00 00 fc ff RSP: 0018:ffffc90003caf620 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000008640070 RCX: 0000000000000000 RDX: ffff88807b963a80 RSI: ffffffff81c4ed2a RDI: 0000000000000007 RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 000000000008c07e R12: ffff888023805800 R13: 0000000000000000 R14: ffffffff91217f38 R15: ffff88801d4b0360 FS: 0000555555bba300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fff7a47a1b8 CR3: 000000002378d000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: hugetlb_no_page mm/hugetlb.c:5755 [inline] hugetlb_fault+0x19cc/0x2060 mm/hugetlb.c:5874 follow_hugetlb_page+0x3f3/0x1850 mm/hugetlb.c:6301 __get_user_pages+0x2cb/0xf10 mm/gup.c:1202 __get_user_pages_locked mm/gup.c:1434 [inline] __get_user_pages_remote+0x18f/0x830 mm/gup.c:2187 get_user_pages_remote+0x84/0xc0 mm/gup.c:2260 __access_remote_vm+0x287/0x6b0 mm/memory.c:5517 ptrace_access_vm+0x181/0x1d0 kernel/ptrace.c:61 generic_ptrace_pokedata kernel/ptrace.c:1323 [inline] ptrace_request+0xb46/0x10c0 kernel/ptrace.c:1046 arch_ptrace+0x36/0x510 arch/x86/kernel/ptrace.c:828 __do_sys_ptrace kernel/ptrace.c:1296 [inline] __se_sys_ptrace kernel/ptrace.c:1269 [inline] __x64_sys_ptrace+0x178/0x2a0 kernel/ptrace.c:1269 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd [...] So let's silence that warning by teaching GUP code that FOLL_FORCE -- so far -- does not apply to hugetlb. Note that FOLL_FORCE for read-access seems to be working as expected. The assumption is that this has been broken forever, only ever since above commit, we actually detect the wrong handling and WARN_ON_ONCE(). I assume this has been broken at least since 2014, when mm/gup.c came to life. I failed to come up with a suitable Fixes tag quickly. Link: https://lkml.kernel.org/r/20221031152524.173644-1-david@redhat.com Fixes: 1d8d14641fd9 ("mm/hugetlb: support write-faults in shared mappings") Signed-off-by: David Hildenbrand Reported-by: Cc: Mike Kravetz Cc: Peter Xu Cc: John Hubbard Cc: Jason Gunthorpe Cc: Signed-off-by: Andrew Morton mm/gup.c | 3 +++ 1 file changed, 3 insertions(+) commit 052d9b0f7ae1200b4a0783cf934ee4a987d37fd7 Author: David Hildenbrand Date: Wed Nov 16 11:26:58 2022 +0100 habanalabs: remove FOLL_FORCE usage FOLL_FORCE is really only for ptrace access. As we unpin the pinned pages using unpin_user_pages_dirty_lock(true), the assumption is that all these pages are writable. FOLL_FORCE in this case seems to be due to copy-and-past from other drivers. Let's just remove it. Link: https://lkml.kernel.org/r/20221116102659.70287-20-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Oded Gabbay Cc: Oded Gabbay Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton drivers/misc/habanalabs/common/memory.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 20ea7783236c374ddb7f201132a5fb9624563a77 Author: David Hildenbrand Date: Wed Nov 16 11:26:57 2022 +0100 RDMA/hw/qib/qib_user_pages: remove FOLL_FORCE usage FOLL_FORCE is really only for ptrace access. As we unpin the pinned pages using unpin_user_pages_dirty_lock(true), the assumption is that all these pages are writable. FOLL_FORCE in this case seems to be a legacy leftover. Let's just remove it. Link: https://lkml.kernel.org/r/20221116102659.70287-19-david@redhat.com Signed-off-by: David Hildenbrand Cc: Dennis Dalessandro Cc: Jason Gunthorpe Cc: Leon Romanovsky Signed-off-by: Andrew Morton drivers/infiniband/hw/qib/qib_user_pages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c098ce73c247a0e36d8a6b8cfdc7d05e4bc81bd0 Author: David Hildenbrand Date: Wed Nov 16 11:26:56 2022 +0100 drm/exynos: remove FOLL_FORCE usage FOLL_FORCE is really only for ptrace access. As we unpin the pinned pages using unpin_user_pages_dirty_lock(true), the assumption is that all these pages are writable. FOLL_FORCE in this case seems to be a legacy leftover. Let's just remove it. Link: https://lkml.kernel.org/r/20221116102659.70287-18-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Daniel Vetter Cc: Inki Dae Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: David Airlie Cc: Krzysztof Kozlowski Signed-off-by: Andrew Morton drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb78a634f3f7ff743e19fbffcb72d794e4bd7f73 Author: David Hildenbrand Date: Wed Nov 16 11:26:55 2022 +0100 mm/frame-vector: remove FOLL_FORCE usage FOLL_FORCE is really only for ptrace access. According to commit 707947247e95 ("media: videobuf2-vmalloc: get_userptr: buffers are always writable"), get_vaddr_frames() currently pins all pages writable as a workaround for issues with read-only buffers. FOLL_FORCE, however, seems to be a legacy leftover as it predates commit 707947247e95 ("media: videobuf2-vmalloc: get_userptr: buffers are always writable"). Let's just remove it. Once the read-only buffer issue has been resolved, FOLL_WRITE could again be set depending on the DMA direction. Link: https://lkml.kernel.org/r/20221116102659.70287-17-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Daniel Vetter Acked-by: Hans Verkuil Acked-by: Tomasz Figa Cc: Marek Szyprowski Cc: Marek Szyprowski Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton drivers/media/common/videobuf2/frame_vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70b96f24a441e5a7e0853e3893edd9dc58b67996 Author: David Hildenbrand Date: Wed Nov 16 11:26:54 2022 +0100 media: pci/ivtv: remove FOLL_FORCE usage FOLL_FORCE is really only for ptrace access. R/O pinning a page is supposed to fail if the VMA misses proper access permissions (no VM_READ). Let's just remove FOLL_FORCE usage here; there would have to be a pretty good reason to allow arbitrary drivers to R/O pin pages in a PROT_NONE VMA. Most probably, FOLL_FORCE usage is just some legacy leftover. Link: https://lkml.kernel.org/r/20221116102659.70287-16-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Hans Verkuil Cc: Andy Walls Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton drivers/media/pci/ivtv/ivtv-udma.c | 2 +- drivers/media/pci/ivtv/ivtv-yuv.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) commit 7d96eb6a9164607df09c9589ed3ba9ef4e9cc2a6 Author: David Hildenbrand Date: Wed Nov 16 11:26:53 2022 +0100 drm/etnaviv: remove FOLL_FORCE usage GUP now supports reliable R/O long-term pinning in COW mappings, such that we break COW early. MAP_SHARED VMAs only use the shared zeropage so far in one corner case (DAXFS file with holes), which can be ignored because GUP does not support long-term pinning in fsdax (see check_vma_flags()). commit cd5297b0855f ("drm/etnaviv: Use FOLL_FORCE for userptr") documents that FOLL_FORCE | FOLL_WRITE was really only used for reliable R/O pinning. Consequently, FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM is no longer required for reliable R/O long-term pinning: FOLL_LONGTERM is sufficient. So stop using FOLL_FORCE, which is really only for ptrace access. Link: https://lkml.kernel.org/r/20221116102659.70287-15-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Daniel Vetter Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: David Airlie Signed-off-by: Andrew Morton drivers/gpu/drm/etnaviv/etnaviv_gem.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3298de2c66e0276abe6b95041fd3605a377523fc Author: David Hildenbrand Date: Wed Nov 16 11:26:52 2022 +0100 media: videobuf-dma-sg: remove FOLL_FORCE usage GUP now supports reliable R/O long-term pinning in COW mappings, such that we break COW early. MAP_SHARED VMAs only use the shared zeropage so far in one corner case (DAXFS file with holes), which can be ignored because GUP does not support long-term pinning in fsdax (see check_vma_flags()). Consequently, FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM is no longer required for reliable R/O long-term pinning: FOLL_LONGTERM is sufficient. So stop using FOLL_FORCE, which is really only for ptrace access. Link: https://lkml.kernel.org/r/20221116102659.70287-14-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Daniel Vetter Acked-by: Hans Verkuil Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton drivers/media/v4l2-core/videobuf-dma-sg.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 129e636fe9837fcfea68bfd368a07548d9880726 Author: David Hildenbrand Date: Wed Nov 16 11:26:51 2022 +0100 RDMA/siw: remove FOLL_FORCE usage GUP now supports reliable R/O long-term pinning in COW mappings, such that we break COW early. MAP_SHARED VMAs only use the shared zeropage so far in one corner case (DAXFS file with holes), which can be ignored because GUP does not support long-term pinning in fsdax (see check_vma_flags()). Consequently, FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM is no longer required for reliable R/O long-term pinning: FOLL_LONGTERM is sufficient. So stop using FOLL_FORCE, which is really only for ptrace access. Link: https://lkml.kernel.org/r/20221116102659.70287-13-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Jason Gunthorpe Cc: Bernard Metzler Cc: Leon Romanovsky Signed-off-by: Andrew Morton drivers/infiniband/sw/siw/siw_mem.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a9d0284033e974a355b806fdb5fbabf8301bcd16 Author: David Hildenbrand Date: Wed Nov 16 11:26:50 2022 +0100 RDMA/usnic: remove FOLL_FORCE usage GUP now supports reliable R/O long-term pinning in COW mappings, such that we break COW early. MAP_SHARED VMAs only use the shared zeropage so far in one corner case (DAXFS file with holes), which can be ignored because GUP does not support long-term pinning in fsdax (see check_vma_flags()). Consequently, FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM is no longer required for reliable R/O long-term pinning: FOLL_LONGTERM is sufficient. So stop using FOLL_FORCE, which is really only for ptrace access. Link: https://lkml.kernel.org/r/20221116102659.70287-12-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Jason Gunthorpe Cc: Christian Benvenuti Cc: Nelson Escobar Cc: Leon Romanovsky Signed-off-by: Andrew Morton drivers/infiniband/hw/usnic/usnic_uiom.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit b40656aa7d559adc1fe689396dc58b92a9a27286 Author: David Hildenbrand Date: Wed Nov 16 11:26:49 2022 +0100 RDMA/umem: remove FOLL_FORCE usage GUP now supports reliable R/O long-term pinning in COW mappings, such that we break COW early. MAP_SHARED VMAs only use the shared zeropage so far in one corner case (DAXFS file with holes), which can be ignored because GUP does not support long-term pinning in fsdax (see check_vma_flags()). Consequently, FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM is no longer required for reliable R/O long-term pinning: FOLL_LONGTERM is sufficient. So stop using FOLL_FORCE, which is really only for ptrace access. Link: https://lkml.kernel.org/r/20221116102659.70287-11-david@redhat.com Tested-by: Leon Romanovsky [over mlx4 and mlx5] Signed-off-by: David Hildenbrand Reviewed-by: Jason Gunthorpe Cc: Leon Romanovsky Signed-off-by: Andrew Morton drivers/infiniband/core/umem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 84209e87c6963f928194a890399e24e8ad299db1 Author: David Hildenbrand Date: Wed Nov 16 11:26:48 2022 +0100 mm/gup: reliable R/O long-term pinning in COW mappings We already support reliable R/O pinning of anonymous memory. However, assume we end up pinning (R/O long-term) a pagecache page or the shared zeropage inside a writable private ("COW") mapping. The next write access will trigger a write-fault and replace the pinned page by an exclusive anonymous page in the process page tables to break COW: the pinned page no longer corresponds to the page mapped into the process' page table. Now that FAULT_FLAG_UNSHARE can break COW on anything mapped into a COW mapping, let's properly break COW first before R/O long-term pinning something that's not an exclusive anon page inside a COW mapping. FAULT_FLAG_UNSHARE will break COW and map an exclusive anon page instead that can get pinned safely. With this change, we can stop using FOLL_FORCE|FOLL_WRITE for reliable R/O long-term pinning in COW mappings. With this change, the new R/O long-term pinning tests for non-anonymous memory succeed: # [RUN] R/O longterm GUP pin ... with shared zeropage ok 151 Longterm R/O pin is reliable # [RUN] R/O longterm GUP pin ... with memfd ok 152 Longterm R/O pin is reliable # [RUN] R/O longterm GUP pin ... with tmpfile ok 153 Longterm R/O pin is reliable # [RUN] R/O longterm GUP pin ... with huge zeropage ok 154 Longterm R/O pin is reliable # [RUN] R/O longterm GUP pin ... with memfd hugetlb (2048 kB) ok 155 Longterm R/O pin is reliable # [RUN] R/O longterm GUP pin ... with memfd hugetlb (1048576 kB) ok 156 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with shared zeropage ok 157 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with memfd ok 158 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with tmpfile ok 159 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with huge zeropage ok 160 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with memfd hugetlb (2048 kB) ok 161 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with memfd hugetlb (1048576 kB) ok 162 Longterm R/O pin is reliable Note 1: We don't care about short-term R/O-pinning, because they have snapshot semantics: they are not supposed to observe modifications that happen after pinning. As one example, assume we start direct I/O to read from a page and store page content into a file: modifications to page content after starting direct I/O are not guaranteed to end up in the file. So even if we'd pin the shared zeropage, the end result would be as expected -- getting zeroes stored to the file. Note 2: For shared mappings we'll now always fallback to the slow path to lookup the VMA when R/O long-term pining. While that's the necessary price we have to pay right now, it's actually not that bad in practice: most FOLL_LONGTERM users already specify FOLL_WRITE, for example, along with FOLL_FORCE because they tried dealing with COW mappings correctly ... Note 3: For users that use FOLL_LONGTERM right now without FOLL_WRITE, such as VFIO, we'd now no longer pin the shared zeropage. Instead, we'd populate exclusive anon pages that we can pin. There was a concern that this could affect the memlock limit of existing setups. For example, a VM running with VFIO could run into the memlock limit and fail to run. However, we essentially had the same behavior already in commit 17839856fd58 ("gup: document and work around "COW can break either way" issue") which got merged into some enterprise distros, and there were not any such complaints. So most probably, we're fine. Link: https://lkml.kernel.org/r/20221116102659.70287-10-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Daniel Vetter Reviewed-by: Vlastimil Babka Reviewed-by: John Hubbard Signed-off-by: Andrew Morton include/linux/mm.h | 27 ++++++++++++++++++++++++--- mm/gup.c | 10 +++++----- mm/huge_memory.c | 2 +- mm/hugetlb.c | 7 ++++--- 4 files changed, 34 insertions(+), 12 deletions(-) commit 8d6a0ac09a16c026e1e2a03a61e12e95c48a25a6 Author: David Hildenbrand Date: Wed Nov 16 11:26:47 2022 +0100 mm: extend FAULT_FLAG_UNSHARE support to anything in a COW mapping Extend FAULT_FLAG_UNSHARE to break COW on anything mapped into a COW (i.e., private writable) mapping and adjust the documentation accordingly. FAULT_FLAG_UNSHARE will now also break COW when encountering the shared zeropage, a pagecache page, a PFNMAP, ... inside a COW mapping, by properly replacing the mapped page/pfn by a private copy (an exclusive anonymous page). Note that only do_wp_page() needs care: hugetlb_wp() already handles FAULT_FLAG_UNSHARE correctly. wp_huge_pmd()/wp_huge_pud() also handles it correctly, for example, splitting the huge zeropage on FAULT_FLAG_UNSHARE such that we can handle FAULT_FLAG_UNSHARE on the PTE level. This change is a requirement for reliable long-term R/O pinning in COW mappings. Link: https://lkml.kernel.org/r/20221116102659.70287-9-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/mm_types.h | 8 ++++---- mm/memory.c | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) commit aea06577a9005ca81c35196d6171cac346d3b251 Author: David Hildenbrand Date: Wed Nov 16 11:26:46 2022 +0100 mm: don't call vm_ops->huge_fault() in wp_huge_pmd()/wp_huge_pud() for private mappings If we already have a PMD/PUD mapped write-protected in a private mapping and we want to break COW either due to FAULT_FLAG_WRITE or FAULT_FLAG_UNSHARE, there is no need to inform the file system just like on the PTE path. Let's just split (->zap) + fallback in that case. This is a preparation for more generic FAULT_FLAG_UNSHARE support in COW mappings. Link: https://lkml.kernel.org/r/20221116102659.70287-8-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Vlastimil Babka Signed-off-by: Andrew Morton mm/memory.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit b9086fde6d44e8a95dc95b822bd87386129b832d Author: David Hildenbrand Date: Wed Nov 16 11:26:45 2022 +0100 mm: rework handling in do_wp_page() based on private vs. shared mappings We want to extent FAULT_FLAG_UNSHARE support to anything mapped into a COW mapping (pagecache page, zeropage, PFN, ...), not just anonymous pages. Let's prepare for that by handling shared mappings first such that we can handle private mappings last. While at it, use folio-based functions instead of page-based functions where we touch the code either way. Link: https://lkml.kernel.org/r/20221116102659.70287-7-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Vlastimil Babka Signed-off-by: Andrew Morton mm/memory.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) commit 79881fed6052a9ce00cfb63297832b9faacf8cf3 Author: David Hildenbrand Date: Wed Nov 16 11:26:44 2022 +0100 mm: add early FAULT_FLAG_WRITE consistency checks Let's catch abuse of FAULT_FLAG_WRITE early, such that we don't have to care in all other handlers and might get "surprises" if we forget to do so. Write faults without VM_MAYWRITE don't make any sense, and our maybe_mkwrite() logic could have hidden such abuse for now. Write faults without VM_WRITE on something that is not a COW mapping is similarly broken, and e.g., do_wp_page() could end up placing an anonymous page into a shared mapping, which would be bad. This is a preparation for reliable R/O long-term pinning of pages in private mappings, whereby we want to make sure that we will never break COW in a read-only private mapping. Link: https://lkml.kernel.org/r/20221116102659.70287-6-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Vlastimil Babka Signed-off-by: Andrew Morton mm/memory.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit cdc5021cda194112bc0962d6a0e90b379968c504 Author: David Hildenbrand Date: Wed Nov 16 11:26:43 2022 +0100 mm: add early FAULT_FLAG_UNSHARE consistency checks For now, FAULT_FLAG_UNSHARE only applies to anonymous pages, which implies a COW mapping. Let's hide FAULT_FLAG_UNSHARE early if we're not dealing with a COW mapping, such that we treat it like a read fault as documented and don't have to worry about the flag throughout all fault handlers. While at it, centralize the check for mutual exclusion of FAULT_FLAG_UNSHARE and FAULT_FLAG_WRITE and just drop the check that either flag is set in the WP handler. Link: https://lkml.kernel.org/r/20221116102659.70287-5-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Vlastimil Babka Signed-off-by: Andrew Morton mm/huge_memory.c | 3 --- mm/hugetlb.c | 5 ----- mm/memory.c | 23 ++++++++++++++++++++--- 3 files changed, 20 insertions(+), 11 deletions(-) commit 97713a3abe338bb6c968e77264edbb68eb8d932a Author: David Hildenbrand Date: Wed Nov 16 11:26:42 2022 +0100 selftests/vm: cow: R/O long-term pinning reliability tests for non-anon pages Let's test whether R/O long-term pinning is reliable for non-anonymous memory: when R/O long-term pinning a page, the expectation is that we break COW early before pinning, such that actual write access via the page tables won't break COW later and end up replacing the R/O-pinned page in the page table. Consequently, R/O long-term pinning in private mappings would only target exclusive anonymous pages. For now, all tests fail: # [RUN] R/O longterm GUP pin ... with shared zeropage not ok 151 Longterm R/O pin is reliable # [RUN] R/O longterm GUP pin ... with memfd not ok 152 Longterm R/O pin is reliable # [RUN] R/O longterm GUP pin ... with tmpfile not ok 153 Longterm R/O pin is reliable # [RUN] R/O longterm GUP pin ... with huge zeropage not ok 154 Longterm R/O pin is reliable # [RUN] R/O longterm GUP pin ... with memfd hugetlb (2048 kB) not ok 155 Longterm R/O pin is reliable # [RUN] R/O longterm GUP pin ... with memfd hugetlb (1048576 kB) not ok 156 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with shared zeropage not ok 157 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with memfd not ok 158 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with tmpfile not ok 159 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with huge zeropage not ok 160 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with memfd hugetlb (2048 kB) not ok 161 Longterm R/O pin is reliable # [RUN] R/O longterm GUP-fast pin ... with memfd hugetlb (1048576 kB) not ok 162 Longterm R/O pin is reliable Link: https://lkml.kernel.org/r/20221116102659.70287-4-david@redhat.com Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton tools/testing/selftests/vm/cow.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit f8664f3c4a08f799122e8f0a8093056a7b3fbc8d Author: David Hildenbrand Date: Wed Nov 16 11:26:41 2022 +0100 selftests/vm: cow: basic COW tests for non-anonymous pages Let's add basic tests for COW with non-anonymous pages in private mappings: write access should properly trigger COW and result in the private changes not being visible through other page mappings. Especially, add tests for: * Zeropage * Huge zeropage * Ordinary pagecache pages via memfd and tmpfile() * Hugetlb pages via memfd Fortunately, all tests pass. Link: https://lkml.kernel.org/r/20221116102659.70287-3-david@redhat.com Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton tools/testing/selftests/vm/cow.c | 338 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 337 insertions(+), 1 deletion(-) commit 7aca5ca154930a06612f4d7b81f710f3e1027e04 Author: David Hildenbrand Date: Wed Nov 16 11:26:40 2022 +0100 selftests/vm: anon_cow: prepare for non-anonymous COW tests Patch series "mm/gup: remove FOLL_FORCE usage from drivers (reliable R/O long-term pinning)". For now, we did not support reliable R/O long-term pinning in COW mappings. That means, if we would trigger R/O long-term pinning in MAP_PRIVATE mapping, we could end up pinning the (R/O-mapped) shared zeropage or a pagecache page. The next write access would trigger a write fault and replace the pinned page by an exclusive anonymous page in the process page table; whatever the process would write to that private page copy would not be visible by the owner of the previous page pin: for example, RDMA could read stale data. The end result is essentially an unexpected and hard-to-debug memory corruption. Some drivers tried working around that limitation by using "FOLL_FORCE|FOLL_WRITE|FOLL_LONGTERM" for R/O long-term pinning for now. FOLL_WRITE would trigger a write fault, if required, and break COW before pinning the page. FOLL_FORCE is required because the VMA might lack write permissions, and drivers wanted to make that working as well, just like one would expect (no write access, but still triggering a write access to break COW). However, that is not a practical solution, because (1) Drivers that don't stick to that undocumented and debatable pattern would still run into that issue. For example, VFIO only uses FOLL_LONGTERM for R/O long-term pinning. (2) Using FOLL_WRITE just to work around a COW mapping + page pinning limitation is unintuitive. FOLL_WRITE would, for example, mark the page softdirty or trigger uffd-wp, even though, there actually isn't going to be any write access. (3) The purpose of FOLL_FORCE is debug access, not access without lack of VMA permissions by arbitrarty drivers. So instead, make R/O long-term pinning work as expected, by breaking COW in a COW mapping early, such that we can remove any FOLL_FORCE usage from drivers and make FOLL_FORCE ptrace-specific (renaming it to FOLL_PTRACE). More details in patch #8. This patch (of 19): Originally, the plan was to have a separate tests for testing COW of non-anonymous (e.g., shared zeropage) pages. Turns out, that we'd need a lot of similar functionality and that there isn't a really good reason to separate it. So let's prepare for non-anon tests by renaming to "cow". Link: https://lkml.kernel.org/r/20221116102659.70287-1-david@redhat.com Link: https://lkml.kernel.org/r/20221116102659.70287-2-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Vlastimil Babka Cc: Alexander Shishkin Cc: Alexander Viro Cc: Alex Williamson Cc: Andrea Arcangeli Cc: Andy Walls Cc: Anton Ivanov Cc: Arnaldo Carvalho de Melo Cc: Arnd Bergmann Cc: Bernard Metzler Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Benvenuti Cc: Christian Gmeiner Cc: Christophe Leroy Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Daniel Vetter Cc: Dave Hansen Cc: David Airlie Cc: David S. Miller Cc: Dennis Dalessandro Cc: "Eric W . Biederman" Cc: Greg Kroah-Hartman Cc: Hans Verkuil Cc: "H. Peter Anvin" Cc: Hugh Dickins Cc: Ingo Molnar Cc: Inki Dae Cc: Ivan Kokshaysky Cc: James Morris Cc: Jason Gunthorpe Cc: Jiri Olsa Cc: Johannes Berg Cc: John Hubbard Cc: Kees Cook Cc: Kentaro Takeda Cc: Krzysztof Kozlowski Cc: Kyungmin Park Cc: Leon Romanovsky Cc: Leon Romanovsky Cc: Linus Torvalds Cc: Lucas Stach Cc: Marek Szyprowski Cc: Mark Rutland Cc: Matthew Wilcox Cc: Matt Turner Cc: Mauro Carvalho Chehab Cc: Michael Ellerman Cc: Mike Kravetz Cc: Muchun Song Cc: Nadav Amit Cc: Namhyung Kim Cc: Nelson Escobar Cc: Nicholas Piggin Cc: Oded Gabbay Cc: Oleg Nesterov Cc: Paul Moore Cc: Peter Xu Cc: Peter Zijlstra Cc: Richard Henderson Cc: Richard Weinberger Cc: Russell King Cc: Serge Hallyn Cc: Seung-Woo Kim Cc: Shuah Khan Cc: Tetsuo Handa Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Tomasz Figa Cc: Will Deacon Signed-off-by: Andrew Morton tools/testing/selftests/vm/.gitignore | 2 +- tools/testing/selftests/vm/Makefile | 10 +++++----- tools/testing/selftests/vm/check_config.sh | 4 ++-- tools/testing/selftests/vm/{anon_cow.c => cow.c} | 25 ++++++++++++++---------- tools/testing/selftests/vm/run_vmtests.sh | 2 +- 5 files changed, 24 insertions(+), 19 deletions(-) commit 749477244b05be0d9b6dcc10c161bfa4c4749d78 Author: Lukas Bulwahn Date: Wed Nov 16 14:19:22 2022 +0100 mm: Kconfig: make config SECRETMEM visible with EXPERT Commit 6a108a14fa35 ("kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT") introduces CONFIG_EXPERT to carry the previous intent of CONFIG_EMBEDDED and just gives that intent a much better name. That has been clearly a good and long overdue renaming, and it is clearly an improvement to the kernel build configuration that has shown to help managing the kernel build configuration in the last decade. However, rather than bravely and radically just deleting CONFIG_EMBEDDED, this commit gives CONFIG_EMBEDDED a new intended semantics, but keeps it open for future contributors to implement that intended semantics: A new CONFIG_EMBEDDED option is added that automatically selects CONFIG_EXPERT when enabled and can be used in the future to isolate options that should only be considered for embedded systems (RISC architectures, SLOB, etc). Since then, this CONFIG_EMBEDDED implicitly had two purposes: - It can make even more options visible beyond what CONFIG_EXPERT makes visible. In other words, it may introduce another level of enabling the visibility of configuration options: always visible, visible with CONFIG_EXPERT and visible with CONFIG_EMBEDDED. - Set certain default values of some configurations differently, following the assumption that configuring a kernel build for an embedded system generally starts with a different set of default values compared to kernel builds for all other kind of systems. Considering the second purpose, note that already probably arguing that a kernel build for an embedded system would choose some values differently is already tricky: the set of embedded systems with Linux kernels is already quite diverse. Many embedded system have powerful CPUs and it would not be clear that all embedded systems just optimize towards one specific aspect, e.g., a smaller kernel image size. So, it is unclear if starting with "one set of default configuration" that is induced by CONFIG_EMBEDDED is a good offer for developers configuring their kernels. Also, the differences of needed user-space features in an embedded system compared to a non-embedded system are probably difficult or even impossible to name in some generic way. So it is not surprising that in the last decade hardly anyone has contributed changes to make something default differently in case of CONFIG_EMBEDDED=y. Currently, in v6.0-rc4, SECRETMEM is the only config switched off if CONFIG_EMBEDDED=y. As long as that is actually the only option that currently is selected or deselected, it is better to just make SECRETMEM configurable at build time by experts using menuconfig instead. Make SECRETMEM configurable when EXPERT is set and otherwise default to yes. Further, SECRETMEM needs ARCH_HAS_SET_DIRECT_MAP. This allows us to remove CONFIG_EMBEDDED in the close future. Link: https://lkml.kernel.org/r/20221116131922.25533-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Acked-by: Mike Rapoport Acked-by: Arnd Bergmann Reviewed-by: Masahiro Yamada Signed-off-by: Andrew Morton mm/Kconfig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 53b2d09bdd12092a7341c08b6b863560db62fa57 Author: Jason Gunthorpe Date: Wed Nov 16 16:07:09 2022 -0400 mm/gup: remove the restriction on locked with FOLL_LONGTERM This restriction was created because FOLL_LONGTERM used to scan the vma list, so it could not tolerate becoming unlocked. That was fixed in commit 52650c8b466b ("mm/gup: remove the vma allocation from gup_longterm_locked()") and the restriction on !vma was removed. However, the locked restriction remained, even though it isn't necessary anymore. Adjust __gup_longterm_locked() so it can handle the mmap_read_lock() becoming unlocked while it is looping for migration. Migration does not require the mmap_read_sem because it is only handling struct pages. If we had to unlock then ensure the whole thing returns unlocked. Remove __get_user_pages_remote() and __gup_longterm_unlocked(). These cases can now just directly call other functions. Link: https://lkml.kernel.org/r/0-v1-b9ae39aa8884+14dbb-gup_longterm_locked_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Cc: Alistair Popple Cc: John Hubbard Signed-off-by: Andrew Morton mm/gup.c | 109 ++++++++++++++++----------------------------------------------- 1 file changed, 27 insertions(+), 82 deletions(-) commit eff6aa17aa7c06c25c0df80060cd0fe621dac276 Author: Rong Tao Date: Sun Nov 13 08:38:45 2022 +0800 selftests/damon: fix unnecessary compilation warnings When testing overflow and overread, there is no need to keep unnecessary compilation warnings, we should simply ignore them. The motivation for this patch is to eliminate the compilation warning, maybe one day we will compile the kernel with "-Werror -Wall", at which point this compilation warning will turn into a compilation error, we should fix this error in advance. How to reproduce the problem (with gcc-11.3.1): $ make -C tools/testing/selftests/ ... warning: `write' reading 4294967295 bytes from a region of size 1 [-Wstringop-overread] warning: `read' writing 4294967295 bytes into a region of size 25 overflows the destination [-Wstringop-overflow=] "-Wno-stringop-overread" is supported at least in gcc-11.1.0. Link: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d14c547abd484d3540b692bb8048c4a6efe92c8b Link: https://lkml.kernel.org/r/tencent_51C4ACA8CB3895C2D7F35178440283602107@qq.com Signed-off-by: Rong Tao Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton tools/testing/selftests/damon/huge_count_read_write.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit dbaf7dc97ab8d526a20d3477419bc14b4890a82c Author: Li zeming Date: Mon Nov 7 09:56:59 2022 +0800 hugetlbfs: inode: remove unnecessary (void*) conversions The ei pointer does not need to cast the type. Link: https://lkml.kernel.org/r/20221107015659.3221-1-zeming@nfschina.com Signed-off-by: Li zeming Reviewed-by: Muchun Song Cc: Mike Kravetz Signed-off-by: Andrew Morton fs/hugetlbfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e83b39d6bbdb6d25bd6f5c258832774635d29b47 Author: Jan Kara Date: Tue Nov 15 13:32:55 2022 +0100 mm: make drop_caches keep reclaiming on all nodes Currently, drop_caches are reclaiming node-by-node, looping on each node until reclaim could not make progress. This can however leave quite some slab entries (such as filesystem inodes) unreclaimed if objects say on node 1 keep objects on node 0 pinned. So move the "loop until no progress" loop to the node-by-node iteration to retry reclaim also on other nodes if reclaim on some nodes made progress. This fixes problem when drop_caches was not reclaiming lots of otherwise perfectly fine to reclaim inodes. Link: https://lkml.kernel.org/r/20221115123255.12559-1-jack@suse.cz Signed-off-by: Jan Kara Reported-by: You Zhou Reported-by: Pengfei Xu Tested-by: Pengfei Xu Reviewed-by: Shakeel Butt Cc: Vladimir Davydov Signed-off-by: Andrew Morton mm/vmscan.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit d09e8ca6cb93bb4b97517a18fbbf7eccb0e9ff43 Author: Pasha Tatashin Date: Tue Nov 15 02:06:01 2022 +0000 mm: anonymous shared memory naming Since commit 9a10064f5625 ("mm: add a field to store names for private anonymous memory"), name for private anonymous memory, but not shared anonymous, can be set. However, naming shared anonymous memory just as useful for tracking purposes. Extend the functionality to be able to set names for shared anon. There are two ways to create anonymous shared memory, using memfd or directly via mmap(): 1. fd = memfd_create(...) mem = mmap(..., MAP_SHARED, fd, ...) 2. mem = mmap(..., MAP_SHARED | MAP_ANONYMOUS, -1, ...) In both cases the anonymous shared memory is created the same way by mapping an unlinked file on tmpfs. The memfd way allows to give a name for anonymous shared memory, but not useful when parts of shared memory require to have distinct names. Example use case: The VMM maps VM memory as anonymous shared memory (not private because VMM is sandboxed and drivers are running in their own processes). However, the VM tells back to the VMM how parts of the memory are actually used by the guest, how each of the segments should be backed (i.e. 4K pages, 2M pages), and some other information about the segments. The naming allows us to monitor the effective memory footprint for each of these segments from the host without looking inside the guest. Sample output: /* Create shared anonymous segmenet */ anon_shmem = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); /* Name the segment: "MY-NAME" */ rv = prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, anon_shmem, SIZE, "MY-NAME"); cat /proc//maps (and smaps): 7fc8e2b4c000-7fc8f2b4c000 rw-s 00000000 00:01 1024 [anon_shmem:MY-NAME] If the segment is not named, the output is: 7fc8e2b4c000-7fc8f2b4c000 rw-s 00000000 00:01 1024 /dev/zero (deleted) Link: https://lkml.kernel.org/r/20221115020602.804224-1-pasha.tatashin@soleen.com Signed-off-by: Pasha Tatashin Acked-by: David Hildenbrand Cc: Arnd Bergmann Cc: Bagas Sanjaya Cc: Colin Cross Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet Cc: "Kirill A . Shutemov" Cc: Liam Howlett Cc: Matthew Wilcox Cc: Mike Rapoport Cc: Paul Gortmaker Cc: Peter Xu Cc: Sean Christopherson Cc: Vincent Whitchurch Cc: Vlastimil Babka Cc: xu xin Cc: Yang Shi Cc: Yu Zhao Signed-off-by: Andrew Morton Documentation/filesystems/proc.rst | 8 +++++--- fs/proc/task_mmu.c | 15 +++++++++++---- include/linux/mm.h | 2 ++ include/linux/mm_types.h | 26 ++++++++++++-------------- mm/madvise.c | 7 ++----- mm/shmem.c | 29 +++++++++++++++++++++++++---- 6 files changed, 57 insertions(+), 30 deletions(-) commit b7217a0bbe00a98a8f4b15ebc2a8355a31a59e1e Author: T.J. Mercier Date: Mon Nov 14 23:59:49 2022 +0000 mm: shrinkers: add missing includes for undeclared types The shrinker.h header depends on a user including other headers before it for types used by shrinker.h. Fix this by including the appropriate headers in shrinker.h. ./include/linux/shrinker.h:13:9: error: unknown type name `gfp_t' 13 | gfp_t gfp_mask; | ^~~~~ ./include/linux/shrinker.h:71:26: error: field `list' has incomplete type 71 | struct list_head list; | ^~~~ ./include/linux/shrinker.h:82:9: error: unknown type name `atomic_long_t' 82 | atomic_long_t *nr_deferred; | Link: https://lkml.kernel.org/r/20221114235949.201749-1-tjmercier@google.com Fixes: 83aeeada7c69 ("vmscan: use atomic-long for shrinker batching") Fixes: b0d40c92adaf ("superblock: introduce per-sb cache shrinker infrastructure") Signed-off-by: T.J. Mercier Cc: Al Viro Cc: Dave Chinner Cc: Konstantin Khlebnikov Signed-off-by: Andrew Morton include/linux/shrinker.h | 3 +++ 1 file changed, 3 insertions(+) commit 369258ce41c6d7663a7b6d509356fecad577378d Author: Mike Kravetz Date: Mon Nov 14 15:55:07 2022 -0800 hugetlb: remove duplicate mmu notifications The common hugetlb unmap routine __unmap_hugepage_range performs mmu notification calls. However, in the case where __unmap_hugepage_range is called via __unmap_hugepage_range_final, mmu notification calls are performed earlier in other calling routines. Remove mmu notification calls from __unmap_hugepage_range. Add notification calls to the only other caller: unmap_hugepage_range. unmap_hugepage_range is called for truncation and hole punch, so change notification type from UNMAP to CLEAR as this is more appropriate. Link: https://lkml.kernel.org/r/20221114235507.294320-4-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Suggested-by: Peter Xu Cc: Wei Chen Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Mina Almasry Cc: Nadav Amit Cc: Naoya Horiguchi Cc: Rik van Riel Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/hugetlb.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit c2da319c2e2789dccb20fdafe520ac61c9df84f7 Author: Peter Xu Date: Sun Nov 13 19:04:47 2022 -0500 mm/uffd: sanity check write bit for uffd-wp protected ptes Let's add one sanity check for CONFIG_DEBUG_VM on the write bit in whatever chance we have when walking through the pgtables. It can bring the error earlier even before the app notices the data was corrupted on the snapshot. Also it helps us to identify this is a wrong pgtable setup, so hopefully a great information to have for debugging too. Link: https://lkml.kernel.org/r/20221114000447.1681003-3-peterx@redhat.com Signed-off-by: Peter Xu Cc: Andrea Arcangeli Cc: Alistair Popple Cc: Axel Rasmussen Cc: Mike Rapoport Cc: Nadav Amit Signed-off-by: Andrew Morton arch/x86/include/asm/pgtable.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 25e9fa22fbfec1e58c955d2670bf9a18f4ebe9ef Author: Yixuan Cao Date: Tue Nov 15 01:14:26 2022 +0800 mm/kmemleak.c: fix a comment I noticed a typo in a code comment and I fixed it. Link: https://lkml.kernel.org/r/20221114171426.91745-1-caoyixuan2019@email.szu.edu.cn Signed-off-by: Yixuan Cao Signed-off-by: Andrew Morton mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b34a307f39497198645de5e43f3f00b5e873249 Author: Jian Wen Date: Fri Nov 11 11:46:39 2022 +0800 docs: admin-guide: cgroup-v1: update description of inactive_file MADV_FREE pages have been moved into the LRU_INACTIVE_FILE list by commit f7ad2a6cb9f7 ("mm: move MADV_FREE pages into LRU_INACTIVE_FILE list"). Link: https://lkml.kernel.org/r/20221111034639.3593380-1-wenjian1@xiaomi.com Signed-off-by: Jian Wen Signed-off-by: Andrew Morton Documentation/admin-guide/cgroup-v1/memory.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a625ceee8a0ab0273534cb6b432ce6b331db5ee Author: Miaoqian Lin Date: Thu Nov 10 07:07:51 2022 +0400 mm/demotion: fix NULL vs IS_ERR checking in memory_tier_init alloc_memory_type() returns error pointers on error instead of NULL. Use IS_ERR() to check the return value to fix this. Link: https://lkml.kernel.org/r/20221110030751.1627266-1-linmq006@gmail.com Fixes: 7b88bda3761b ("mm/demotion/dax/kmem: set node's abstract distance to MEMTIER_DEFAULT_DAX_ADISTANCE") Signed-off-by: Miaoqian Lin Reviewed-by: "Huang, Ying" Cc: Aneesh Kumar K.V Cc: Wei Xu Signed-off-by: Andrew Morton mm/memory-tiers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eaec4e639f11413ce75fbf38affd1aa5c40979e9 Author: Huang Ying Date: Wed Nov 9 09:23:48 2022 +0800 migrate: convert migrate_pages() to use folios Quite straightforward, the page functions are converted to corresponding folio functions. Same for comments. THP specific code are converted to be large folio. Link: https://lkml.kernel.org/r/20221109012348.93849-3-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Baolin Wang Tested-by: Baolin Wang Cc: Zi Yan Cc: Yang Shi Cc: Oscar Salvador Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/migrate.c | 210 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 112 insertions(+), 98 deletions(-) commit 49f51859221a3dfee27488eaeaff800459cac6a9 Author: Huang Ying Date: Wed Nov 9 09:23:47 2022 +0800 migrate: convert unmap_and_move() to use folios Patch series "migrate: convert migrate_pages()/unmap_and_move() to use folios", v2. The conversion is quite straightforward, just replace the page API to the corresponding folio API. migrate_pages() and unmap_and_move() mostly work with folios (head pages) only. This patch (of 2): Quite straightforward, the page functions are converted to corresponding folio functions. Same for comments. Link: https://lkml.kernel.org/r/20221109012348.93849-1-ying.huang@intel.com Link: https://lkml.kernel.org/r/20221109012348.93849-2-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Yang Shi Reviewed-by: Zi Yan Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Baolin Wang Cc: Oscar Salvador Signed-off-by: Andrew Morton mm/migrate.c | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 16fd6b31dd9b24acf83d439a73a41c4138199424 Author: Baolin Wang Date: Wed Nov 9 16:40:27 2022 +0800 Revert "mm: migration: fix the FOLL_GET failure on following huge page" Revert commit 831568214883 ("mm: migration: fix the FOLL_GET failure on following huge page"), since after commit 1a6baaa0db73 ("s390/hugetlb: switch to generic version of follow_huge_pud()") and commit 57a196a58421 ("hugetlb: simplify hugetlb handling in follow_page_mask") were merged, now all the following huge page routines can support FOLL_GET operation. Link: https://lkml.kernel.org/r/496786039852aba90ffa68f10d0df3f4236a990b.1667983080.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Acked-by: Haiyue Wang Cc: Baolin Wang Cc: "Huang, Ying" Cc: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton mm/migrate.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit c66b6ead74ffdad8659eb829468343a88afc2f2c Author: Pavankumar Kondeti Date: Wed Nov 9 14:56:46 2022 +0530 mm/kfence: remove hung_task cruft commit fdf756f71271 ("sched: Fix more TASK_state comparisons") makes hung_task not to monitor TASK_IDLE tasks. The special handling to workaround hung_task warnings is not required anymore. Link: https://lkml.kernel.org/r/1667986006-25420-1-git-send-email-quic_pkondeti@quicinc.com Signed-off-by: Pavankumar Kondeti Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Peter Zijlstra Signed-off-by: Andrew Morton mm/kfence/core.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit c959a0e8de2c4db6ca6cc8f490223e2e1e58934b Author: Sergey Senozhatsky Date: Tue Nov 15 11:03:14 2022 +0900 Docs/ABI/zram: document zram recompress sysfs knobs Document zram re-compression sysfs knobs. Link: https://lkml.kernel.org/r/20221115020314.386235-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Nitin Gupta Signed-off-by: Andrew Morton Documentation/ABI/testing/sysfs-block-zram | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 77db7bb56bd711586243924a5582727f7a93fb7f Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:47 2022 +0900 zram: add incompressible flag to read_block_state() Add a new flag to zram block state that shows if the page is incompressible: that none of the algorithm (including secondary ones) could compress it. Link: https://lkml.kernel.org/r/20221109115047.2921851-14-senozhatsky@chromium.org Suggested-by: Minchan Kim Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Alexey Romanov Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton Documentation/admin-guide/blockdev/zram.rst | 11 +++++++---- drivers/block/zram/zram_drv.c | 6 ++++-- 2 files changed, 11 insertions(+), 6 deletions(-) commit b46f9ea3cb351587b2cfc68f7211f7a7cc5b6673 Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:46 2022 +0900 zram: add incompressible writeback Add support for incompressible pages writeback: echo incompressible > /sys/block/zramX/writeback Link: https://lkml.kernel.org/r/20221109115047.2921851-13-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Alexey Romanov Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton Documentation/admin-guide/blockdev/zram.rst | 7 ++++++- drivers/block/zram/zram_drv.c | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) commit 443dd798062c1549e790539e572cbda4b7a8df30 Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:45 2022 +0900 documentation: add zram recompression documentation Document user-space visible device attributes that are enabled by ZRAM_MULTI_COMP. Link: https://lkml.kernel.org/r/20221109115047.2921851-12-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Alexey Romanov Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton Documentation/admin-guide/blockdev/zram.rst | 81 +++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit a55cf9648d3de486ccf0eca980a02f0faff8ec45 Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:44 2022 +0900 zram: add algo parameter support to zram_recompress() Recompression iterates through all the registered secondary compression algorithms in order of their priorities so that we have higher chances of finding the algorithm that compresses a particular page. This, however, may not always be best approach and sometimes we may want to limit recompression to only one particular algorithm. For instance, when a higher priority algorithm uses too much power and device has a relatively low battery level we may want to limit recompression to use only a lower priority algorithm, which uses less power. Introduce algo= parameter support to recompression sysfs knob so that user-sapce can request recompression with particular algorithm only: echo "type=idle algo=zstd" > /sys/block/zramX/recompress Link: https://lkml.kernel.org/r/20221109115047.2921851-11-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Alexey Romanov Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 54 +++++++++++++++++++++++++++++++++++-------- drivers/block/zram/zram_drv.h | 1 + 2 files changed, 46 insertions(+), 9 deletions(-) commit 4942cf6ad07c487d24112ffbb27362f4e6b409b8 Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:43 2022 +0900 zram: remove redundant checks from zram_recompress() Size class index comparison is powerful enough so we can remove object size comparisons. Link: https://lkml.kernel.org/r/20221109115047.2921851-10-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Alexey Romanov Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 7c2af309abd24ff4e313246bf9b68f398d95c871 Author: Alexey Romanov Date: Wed Nov 9 20:50:42 2022 +0900 zram: add size class equals check into recompression It makes no sense for us to recompress the object if it will be in the same size class. We anyway don't get any memory gain. But, at the same time, we get a CPU time overhead when inserting this object into zspage and decompressing it afterwards. [senozhatsky: rebased and fixed conflicts] Link: https://lkml.kernel.org/r/20221109115047.2921851-9-senozhatsky@chromium.org Signed-off-by: Alexey Romanov Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 11 ++++++++++- include/linux/zsmalloc.h | 2 ++ mm/zsmalloc.c | 21 +++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) commit f24ee92cbe13242758635e654b2422dbf4912e4b Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:41 2022 +0900 zram: use IS_ERR_VALUE() to check for zs_malloc() errors Avoid typecasts that are needed for IS_ERR() and use IS_ERR_VALUE() instead. Link: https://lkml.kernel.org/r/20221109115047.2921851-8-senozhatsky@chromium.org Suggested-by: Andrew Morton Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Alexey Romanov Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9fda785dbd14cfc7d874d00d2b007cb143aa48d0 Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:40 2022 +0900 zram: clarify writeback_store() comment Re-phrase writeback BIO error comment. Link: https://lkml.kernel.org/r/20221109115047.2921851-7-senozhatsky@chromium.org Reported-by: Andrew Morton Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Alexey Romanov Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 60e9b39ebec56467c36c3da76eee28083196cdf1 Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:39 2022 +0900 zram: add recompress flag to read_block_state() Add a new flag to zram block state that shows if the page was recompressed (using alternative compression algorithm). Link: https://lkml.kernel.org/r/20221109115047.2921851-6-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Alexey Romanov Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton Documentation/admin-guide/blockdev/zram.rst | 9 ++++++--- drivers/block/zram/zram_drv.c | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) commit 84b33bf7888975d28c0e57011b75c445279c60ec Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:38 2022 +0900 zram: introduce recompress sysfs knob Allow zram to recompress (using secondary compression streams) pages. Re-compression algorithms (we support up to 3 at this stage) are selected via recomp_algorithm: echo "algo=zstd priority=1" > /sys/block/zramX/recomp_algorithm Please read documentation for more details. We support several recompression modes: 1) IDLE pages recompression is activated by `idle` mode echo "type=idle" > /sys/block/zram0/recompress 2) Since there may be many idle pages user-space may pass a size threshold value (in bytes) and we will recompress pages only of equal or greater size: echo "threshold=888" > /sys/block/zram0/recompress 3) HUGE pages recompression is activated by `huge` mode echo "type=huge" > /sys/block/zram0/recompress 4) HUGE_IDLE pages recompression is activated by `huge_idle` mode echo "type=huge_idle" > /sys/block/zram0/recompress [senozhatsky@chromium.org: we should always zero out err variable in recompress loop[ Link: https://lkml.kernel.org/r/20221110143423.3250790-1-senozhatsky@chromium.org Link: https://lkml.kernel.org/r/20221109115047.2921851-5-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Nathan Chancellor Cc: Alexey Romanov Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton drivers/block/zram/Kconfig | 9 ++ drivers/block/zram/zram_drv.c | 264 +++++++++++++++++++++++++++++++++++++++++- drivers/block/zram/zram_drv.h | 7 ++ 3 files changed, 277 insertions(+), 3 deletions(-) commit 5561347aa598b6b12fb6069788ccec9b5e5ebec1 Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:37 2022 +0900 zram: factor out WB and non-WB zram read functions We will use non-WB variant in ZRAM page recompression path. Link: https://lkml.kernel.org/r/20221109115047.2921851-4-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Alexey Romanov Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 72 +++++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 23 deletions(-) commit 001d9273570115b2eb360d5452bbc46f6cc063a1 Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:36 2022 +0900 zram: add recompression algorithm sysfs knob Introduce recomp_algorithm sysfs knob that controls secondary algorithm selection used for recompression. We will support up to 3 secondary compression algorithms which are sorted in order of their priority. To select an algorithm user has to provide its name and priority: echo "algo=zstd priority=1" > /sys/block/zramX/recomp_algorithm echo "algo=deflate priority=2" > /sys/block/zramX/recomp_algorithm During recompression zram iterates through the list of registered secondary algorithms in order of their priorities. We also have a short version for cases when there is only one secondary compression algorithm: echo "algo=zstd" > /sys/block/zramX/recomp_algorithm This will register zstd as the secondary algorithm with priority 1. Link: https://lkml.kernel.org/r/20221109115047.2921851-3-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Alexey Romanov Cc: Nhat Pham Cc: Nitin Gupta Cc: Suleiman Souhlal Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 124 +++++++++++++++++++++++++++++++++++------- 1 file changed, 105 insertions(+), 19 deletions(-) commit 7ac07a26dea79c3892436bce41cce03dcbd3c4c7 Author: Sergey Senozhatsky Date: Wed Nov 9 20:50:35 2022 +0900 zram: preparation for multi-zcomp support Patch series "zram: Support multiple compression streams", v5. This series adds support for multiple compression streams. The main idea is that different compression algorithms have different characteristics and zram may benefit when it uses a combination of algorithms: a default algorithm that is faster but have lower compression rate and a secondary algorithm that can use higher compression rate at a price of slower compression/decompression. There are several use-case for this functionality: - huge pages re-compression: zstd or deflate can successfully compress huge pages (~50% of huge pages on my synthetic ChromeOS tests), IOW pages that lzo was not able to compress. - idle pages re-compression: idle/cold pages sit in the memory and we may reduce zsmalloc memory usage if we recompress those idle pages. Userspace has a number of ways to control the behavior and impact of zram recompression: what type of pages should be recompressed, size watermarks, etc. Please refer to documentation patch. This patch (of 13): The patch turns compression streams and compressor algorithm name struct zram members into arrays, so that we can have multiple compression streams support (in the next patches). The patch uses a rather explicit API for compressor selection: - Get primary (default) compression stream zcomp_stream_get(zram->comps[ZRAM_PRIMARY_COMP]) - Get secondary compression stream zcomp_stream_get(zram->comps[ZRAM_SECONDARY_COMP]) We use similar API for compression streams put(). At this point we always have just one compression stream, since CONFIG_ZRAM_MULTI_COMP is not yet defined. Link: https://lkml.kernel.org/r/20221109115047.2921851-1-senozhatsky@chromium.org Link: https://lkml.kernel.org/r/20221109115047.2921851-2-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Minchan Kim Cc: Nitin Gupta Cc: Suleiman Souhlal Cc: Nhat Pham Cc: Alexey Romanov Signed-off-by: Andrew Morton drivers/block/zram/zcomp.c | 6 +-- drivers/block/zram/zcomp.h | 2 +- drivers/block/zram/zram_drv.c | 90 ++++++++++++++++++++++++++++++------------- drivers/block/zram/zram_drv.h | 14 ++++++- 4 files changed, 80 insertions(+), 32 deletions(-) commit f036c8184f8b6750fa642485fb01eb6ff036a86b Author: Alexander Gordeev Date: Wed Nov 16 08:49:30 2022 +0100 mm: mmu_gather: do not expose delayed_rmap flag Flag delayed_rmap of 'struct mmu_gather' is rather a private member, but it is still accessed directly. Instead, let the TLB gather code access the flag. Link: https://lkml.kernel.org/r/Y3SWCu6NRaMQ5dbD@li-4a3a4a4c-28e5-11b2-a85c-a8d192c6f089.ibm.com Signed-off-by: Alexander Gordeev Acked-by: Linus Torvalds Signed-off-by: Andrew Morton mm/memory.c | 3 +-- mm/mmu_gather.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 5df397dec7c4c08c23bd14f162f1228836faa4ce Author: Linus Torvalds Date: Wed Nov 9 12:30:51 2022 -0800 mm: delay page_remove_rmap() until after the TLB has been flushed When we remove a page table entry, we are very careful to only free the page after we have flushed the TLB, because other CPUs could still be using the page through stale TLB entries until after the flush. However, we have removed the rmap entry for that page early, which means that functions like folio_mkclean() would end up not serializing with the page table lock because the page had already been made invisible to rmap. And that is a problem, because while the TLB entry exists, we could end up with the following situation: (a) one CPU could come in and clean it, never seeing our mapping of the page (b) another CPU could continue to use the stale and dirty TLB entry and continue to write to said page resulting in a page that has been dirtied, but then marked clean again, all while another CPU might have dirtied it some more. End result: possibly lost dirty data. This extends our current TLB gather infrastructure to optionally track a "should I do a delayed page_remove_rmap() for this page after flushing the TLB". It uses the newly introduced 'encoded page pointer' to do that without having to keep separate data around. Note, this is complicated by a couple of issues: - we want to delay the rmap removal, but not past the page table lock, because that simplifies the memcg accounting - only SMP configurations want to delay TLB flushing, since on UP there are obviously no remote TLBs to worry about, and the page table lock means there are no preemption issues either - s390 has its own mmu_gather model that doesn't delay TLB flushing, and as a result also does not want the delayed rmap. As such, we can treat S390 like the UP case and use a common fallback for the "no delays" case. - we can track an enormous number of pages in our mmu_gather structure, with MAX_GATHER_BATCH_COUNT batches of MAX_TABLE_BATCH pages each, all set up to be approximately 10k pending pages. We do not want to have a huge number of batched pages that we then need to check for delayed rmap handling inside the page table lock. Particularly that last point results in a noteworthy detail, where the normal page batch gathering is limited once we have delayed rmaps pending, in such a way that only the last batch (the so-called "active batch") in the mmu_gather structure can have any delayed entries. NOTE! While the "possibly lost dirty data" sounds catastrophic, for this all to happen you need to have a user thread doing either madvise() with MADV_DONTNEED or a full re-mmap() of the area concurrently with another thread continuing to use said mapping. So arguably this is about user space doing crazy things, but from a VM consistency standpoint it's better if we track the dirty bit properly even when user space goes off the rails. [akpm@linux-foundation.org: fix UP build, per Linus] Link: https://lore.kernel.org/all/B88D3073-440A-41C7-95F4-895D3F657EF2@gmail.com/ Link: https://lkml.kernel.org/r/20221109203051.1835763-4-torvalds@linux-foundation.org Signed-off-by: Linus Torvalds Acked-by: Johannes Weiner Acked-by: Hugh Dickins Reported-by: Nadav Amit Tested-by: Nadav Amit Signed-off-by: Andrew Morton arch/s390/include/asm/tlb.h | 3 +++ include/asm-generic/tlb.h | 31 +++++++++++++++++++++++++++++-- mm/memory.c | 23 +++++++++++++++++------ mm/mmu_gather.c | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 82 insertions(+), 8 deletions(-) commit 7cc8f9c7146a5c2dad6e71653c4f69972e73df6b Author: Linus Torvalds Date: Wed Nov 9 12:30:50 2022 -0800 mm: mmu_gather: prepare to gather encoded page pointers with flags This is purely a preparatory patch that makes all the data structures ready for encoding flags with the mmu_gather page pointers. The code currently always sets the flag to zero and doesn't use it yet, but now it's tracking the type state along. The next step will be to actually start using it. Link: https://lkml.kernel.org/r/20221109203051.1835763-3-torvalds@linux-foundation.org Signed-off-by: Linus Torvalds Acked-by: Johannes Weiner Acked-by: Hugh Dickins Signed-off-by: Andrew Morton arch/s390/include/asm/tlb.h | 8 +++++--- include/asm-generic/tlb.h | 9 +++++---- include/linux/swap.h | 2 +- mm/mmu_gather.c | 8 ++++---- mm/swap_state.c | 11 ++++------- 5 files changed, 19 insertions(+), 19 deletions(-) commit 449c796768c9a1c738d1fa8671fb01663380b8a7 Author: Linus Torvalds Date: Wed Nov 9 12:30:49 2022 -0800 mm: teach release_pages() to take an array of encoded page pointers too release_pages() already could take either an array of page pointers, or an array of folio pointers. Expand it to also accept an array of encoded page pointers, which is what both the existing mlock() use and the upcoming mmu_gather use of encoded page pointers wants. Note that release_pages() won't actually use, or react to, any extra encoded bits. Instead, this is very much a case of "I have walked the array of encoded pages and done everything the extra bits tell me to do, now release it all". Also, while the "either page or folio pointers" dual use was handled with a cast of the pointer in "release_folios()", this takes a slightly different approach and uses the "transparent union" attribute to describe the set of arguments to the function: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html which has been supported by gcc forever, but the kernel hasn't used before. That allows us to avoid using various wrappers with casts, and just use the same function regardless of use. Link: https://lkml.kernel.org/r/20221109203051.1835763-2-torvalds@linux-foundation.org Signed-off-by: Linus Torvalds Acked-by: Johannes Weiner Acked-by: Hugh Dickins Signed-off-by: Andrew Morton include/linux/mm.h | 21 +++++++++++++++++++-- mm/swap.c | 16 ++++++++++++---- 2 files changed, 31 insertions(+), 6 deletions(-) commit 70fb4fdff5826a48886152fd5c5db04eb6c59a40 Author: Linus Torvalds Date: Wed Nov 9 12:30:48 2022 -0800 mm: introduce 'encoded' page pointers with embedded extra bits We already have this notion in parts of the MM code (see the mlock code with the LRU_PAGE and NEW_PAGE bits), but I'm going to introduce a new case, and I refuse to do the same thing we've done before where we just put bits in the raw pointer and say it's still a normal pointer. So this introduces a 'struct encoded_page' pointer that cannot be used for anything else than to encode a real page pointer and a couple of extra bits in the low bits. That way the compiler can trivially track the state of the pointer and you just explicitly encode and decode the extra bits. Note that this makes the alignment of 'struct page' explicit even for the case where CONFIG_HAVE_ALIGNED_STRUCT_PAGE is not set. That is entirely redundant in almost all cases, since the page structure already contains several word-sized entries. However, on m68k, the alignment of even 32-bit data is just 16 bits, and as such in theory the alignment of 'struct page' could be too. So let's just make it very very explicit that the alignment needs to be at least 32 bits, giving us a guarantee of two unused low bits in the pointer. Now, in practice, our page struct array is aligned much more than that anyway, even on m68k, and our existing code in mm/mlock.c obviously already depended on that. But since the whole point of this change is to be careful about the type system when hiding extra bits in the pointer, let's also be explicit about the assumptions we make. NOTE! This is being very careful in another way too: it has a build-time assertion that the 'flags' added to the page pointer actually fit in the two bits. That means that this helper must be inlined, and can only be used in contexts where the compiler can statically determine that the value fits in the available bits. [akpm@linux-foundation.org: kerneldoc on a forward-declared struct confuses htmldocs] Link: https://lore.kernel.org/all/Y2tKixpO4RO6DgW5@tuxmaker.boeblingen.de.ibm.com/ Link: https://lkml.kernel.org/r/20221109203051.1835763-1-torvalds@linux-foundation.org Signed-off-by: Linus Torvalds Acked-by: Johannes Weiner Acked-by: Hugh Dickins Reviewed-by: David Hildenbrand Cc: Alexander Gordeev Cc: Aneesh Kumar K.V Cc: Christian Borntraeger Cc: Gerald Schaefer Cc: Heiko Carstens [s390] Cc: Nadav Amit Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton include/linux/mm_types.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 07f8bac4982f98fc4b5ae05679d76fccc15079ea Author: David Hildenbrand Date: Tue Nov 8 18:46:52 2022 +0100 selftests/vm: anon_cow: add mprotect() optimization tests Let's extend the test to cover the possible mprotect() optimization when removing write-protection. mprotect() must not allow write-access to a COW-shared page by accident. Link: https://lkml.kernel.org/r/20221108174652.198904-8-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Dave Chinner Cc: Hugh Dickins Cc: Linus Torvalds Cc: Mel Gorman Cc: Michael Ellerman Cc: Mike Rapoport Cc: Nadav Amit Cc: Nicholas Piggin Cc: Peter Xu Cc: Vlastimil Babka Signed-off-by: Andrew Morton tools/testing/selftests/vm/anon_cow.c | 49 ++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) commit d6379159f47630813f06f97535cc82ce7b9eed49 Author: David Hildenbrand Date: Tue Nov 8 18:46:51 2022 +0100 mm: remove unused savedwrite infrastructure NUMA hinting no longer uses savedwrite, let's rip it out. ... and while at it, drop __pte_write() and __pmd_write() on ppc64. Link: https://lkml.kernel.org/r/20221108174652.198904-7-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Dave Chinner Cc: Hugh Dickins Cc: Linus Torvalds Cc: Mel Gorman Cc: Michael Ellerman Cc: Mike Rapoport Cc: Nadav Amit Cc: Nicholas Piggin Cc: Peter Xu Cc: Vlastimil Babka Signed-off-by: Andrew Morton arch/powerpc/include/asm/book3s/64/pgtable.h | 80 ++-------------------------- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 2 +- include/linux/pgtable.h | 24 --------- mm/debug_vm_pgtable.c | 32 ----------- 4 files changed, 5 insertions(+), 133 deletions(-) commit 6a56ccbcf6c69538b152644107a1d7383c876ca7 Author: David Hildenbrand Date: Tue Nov 8 18:46:50 2022 +0100 mm/autonuma: use can_change_(pte|pmd)_writable() to replace savedwrite commit b191f9b106ea ("mm: numa: preserve PTE write permissions across a NUMA hinting fault") added remembering write permissions using ordinary pte_write() for PROT_NONE mapped pages to avoid write faults when remapping the page !PROT_NONE on NUMA hinting faults. That commit noted: The patch looks hacky but the alternatives looked worse. The tidest was to rewalk the page tables after a hinting fault but it was more complex than this approach and the performance was worse. It's not generally safe to just mark the page writable during the fault if it's a write fault as it may have been read-only for COW so that approach was discarded. Later, commit 288bc54949fc ("mm/autonuma: let architecture override how the write bit should be stashed in a protnone pte.") introduced a family of savedwrite PTE functions that didn't necessarily improve the whole situation. One confusing thing is that nowadays, if a page is pte_protnone() and pte_savedwrite() then also pte_write() is true. Another source of confusion is that there is only a single pte_mk_savedwrite() call in the kernel. All other write-protection code seems to silently rely on pte_wrprotect(). Ever since PageAnonExclusive was introduced and we started using it in mprotect context via commit 64fe24a3e05e ("mm/mprotect: try avoiding write faults for exclusive anonymous pages when changing protection"), we do have machinery in place to avoid write faults when changing protection, which is exactly what we want to do here. Let's similarly do what ordinary mprotect() does nowadays when upgrading write permissions and reuse can_change_pte_writable() and can_change_pmd_writable() to detect if we can upgrade PTE permissions to be writable. For anonymous pages there should be absolutely no change: if an anonymous page is not exclusive, it could not have been mapped writable -- because only exclusive anonymous pages can be mapped writable. However, there *might* be a change for writable shared mappings that require writenotify: if they are not dirty, we cannot map them writable. While it might not matter in practice, we'd need a different way to identify whether writenotify is actually required -- and ordinary mprotect would benefit from that as well. Note that we don't optimize for the actual migration case: (1) When migration succeeds the new PTE will not be writable because the source PTE was not writable (protnone); in the future we might just optimize that case similarly by reusing can_change_pte_writable()/can_change_pmd_writable() when removing migration PTEs. (2) When migration fails, we'd have to recalculate the "writable" flag because we temporarily dropped the PT lock; for now keep it simple and set "writable=false". We'll remove all savedwrite leftovers next. Link: https://lkml.kernel.org/r/20221108174652.198904-6-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Dave Chinner Cc: Hugh Dickins Cc: Linus Torvalds Cc: Mel Gorman Cc: Michael Ellerman Cc: Mike Rapoport Cc: Nadav Amit Cc: Nicholas Piggin Cc: Peter Xu Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/mm.h | 2 ++ mm/huge_memory.c | 26 +++++++++++++++----------- mm/ksm.c | 9 ++++----- mm/memory.c | 16 +++++++++++++--- mm/mprotect.c | 7 ++----- 5 files changed, 36 insertions(+), 24 deletions(-) commit eb309ec89953d6a3e8e35a3a577bab13893858d8 Author: David Hildenbrand Date: Tue Nov 8 18:46:49 2022 +0100 mm/mprotect: factor out check whether manual PTE write upgrades are required Let's factor the check out into vma_wants_manual_pte_write_upgrade(), to be reused in NUMA hinting fault context soon. Link: https://lkml.kernel.org/r/20221108174652.198904-5-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Dave Chinner Cc: Hugh Dickins Cc: Linus Torvalds Cc: Mel Gorman Cc: Michael Ellerman Cc: Mike Rapoport Cc: Nadav Amit Cc: Nicholas Piggin Cc: Peter Xu Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/mm.h | 16 ++++++++++++++-- mm/mprotect.c | 17 ++++------------- 2 files changed, 18 insertions(+), 15 deletions(-) commit c27f479ef5428f691787fb6fe3703a70e931ae8c Author: David Hildenbrand Date: Tue Nov 8 18:46:48 2022 +0100 mm/huge_memory: try avoiding write faults when changing PMD protection Let's replicate what we have for PTEs in can_change_pte_writable() also for PMDs. While this might look like a pure performance improvement, we'll us this to get rid of savedwrite handling in do_huge_pmd_numa_page() next. Place do_huge_pmd_numa_page() strategically good for that purpose. Note that MM_CP_TRY_CHANGE_WRITABLE is currently only set when we come via mprotect_fixup(). Link: https://lkml.kernel.org/r/20221108174652.198904-4-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Dave Chinner Cc: Hugh Dickins Cc: Linus Torvalds Cc: Mel Gorman Cc: Michael Ellerman Cc: Mike Rapoport Cc: Nadav Amit Cc: Nicholas Piggin Cc: Peter Xu Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/huge_memory.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) commit 7ea7e333842ed50fe0a0b256c270b54f8ec2353e Author: David Hildenbrand Date: Tue Nov 8 18:46:47 2022 +0100 mm/mprotect: minor can_change_pte_writable() cleanups We want to replicate this code for handling PMDs soon. (1) No need to crash the kernel, warning and rejecting is good enough. As this will no longer get optimized out, drop the pte_write() check: no harm would be done. (2) Add a comment why PROT_NONE mapped pages are excluded. (3) Add a comment regarding MAP_SHARED handling and why we rely on the dirty bit in the PTE. Link: https://lkml.kernel.org/r/20221108174652.198904-3-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Dave Chinner Cc: Hugh Dickins Cc: Linus Torvalds Cc: Mel Gorman Cc: Michael Ellerman Cc: Mike Rapoport Cc: Nadav Amit Cc: Nicholas Piggin Cc: Peter Xu Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/mprotect.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit d84887739d5c982afa50b155aad628bb8ff206c5 Author: Nadav Amit Date: Tue Nov 8 18:46:46 2022 +0100 mm/mprotect: allow clean exclusive anon pages to be writable Patch series "mm/autonuma: replace savedwrite infrastructure", v2. As discussed in my talk at LPC, we can reuse the same mechanism for deciding whether to map a pte writable when upgrading permissions via mprotect() -- e.g., PROT_READ -> PROT_READ|PROT_WRITE -- to replace the savedwrite infrastructure used for NUMA hinting faults (e.g., PROT_NONE -> PROT_READ|PROT_WRITE). Instead of maintaining previous write permissions for a pte/pmd, we re-determine if the pte/pmd can be writable. The big benefit is that we have a common logic for deciding whether we can map a pte/pmd writable on protection changes. For private mappings, there should be no difference -- from what I understand, that is what autonuma benchmarks care about. I ran autonumabench for v1 on a system with 2 NUMA nodes, 96 GiB each via: perf stat --null --repeat 10 The numa01 benchmark is quite noisy in my environment and I failed to reduce the noise so far. numa01: mm-unstable: 146.88 +- 6.54 seconds time elapsed ( +- 4.45% ) mm-unstable++: 147.45 +- 13.39 seconds time elapsed ( +- 9.08% ) numa02: mm-unstable: 16.0300 +- 0.0624 seconds time elapsed ( +- 0.39% ) mm-unstable++: 16.1281 +- 0.0945 seconds time elapsed ( +- 0.59% ) It is worth noting that for shared writable mappings that require writenotify, we will only avoid write faults if the pte/pmd is dirty (inherited from the older mprotect logic). If we ever care about optimizing that further, we'd need a different mechanism to identify whether the FS still needs to get notified on the next write access. In any case, such an optimization will then not be autonuma-specific, but mprotect() permission upgrades would similarly benefit from it. This patch (of 7): Anonymous pages might have the dirty bit clear, but this should not prevent mprotect from making them writable if they are exclusive. Therefore, skip the test whether the page is dirty in this case. Note that there are already other ways to get a writable PTE mapping an anonymous page that is clean: for example, via MADV_FREE. In an ideal world, we'd have a different indication from the FS whether writenotify is still required. [david@redhat.com: return directly; update description] Link: https://lkml.kernel.org/r/20221108174652.198904-1-david@redhat.com Link: https://lkml.kernel.org/r/20221108174652.198904-2-david@redhat.com Signed-off-by: Nadav Amit Signed-off-by: David Hildenbrand Cc: Linus Torvalds Cc: Mel Gorman Cc: Dave Chinner Cc: Peter Xu Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Vlastimil Babka Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Mike Rapoport Cc: Anshuman Khandual Signed-off-by: Andrew Morton mm/mprotect.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1a1af17ea81115914c8efc1177fd94719c84fc11 Author: Rong Tao Date: Tue Nov 8 19:53:48 2022 +0800 tools/vm/page_owner: ignore page_owner_sort binary page_owner_sort was introduced since commit 48c96a368579 ("mm/page_owner: keep track of page owners"), and we should ignore it. Link: https://lkml.kernel.org/r/tencent_F6CAC0ABE16839E2B2419BD07316DA65BB06@qq.com Signed-off-by: Rong Tao Signed-off-by: Andrew Morton tools/vm/.gitignore | 1 + 1 file changed, 1 insertion(+) commit 96d82deb743ab42c8f0b911eb49db83f0e6db311 Author: Hugh Dickins Date: Tue Nov 22 01:51:50 2022 -0800 mm,thp,rmap: clean up the end of __split_huge_pmd_locked() It's hard to add a page_add_anon_rmap() into __split_huge_pmd_locked()'s HPAGE_PMD_NR set_pte_at() loop, without wincing at the "freeze" case's HPAGE_PMD_NR page_remove_rmap() loop below it. It's just a mistake to add rmaps in the "freeze" (insert migration entries prior to splitting huge page) case: the pmd_migration case already avoids doing that, so just follow its lead. page_add_ref() versus put_page() likewise. But why is one more put_page() needed in the "freeze" case? Because it's removing the pmd rmap, already removed when pmd_migration (and freeze and pmd_migration are mutually exclusive cases). Link: https://lkml.kernel.org/r/d43748aa-fece-e0b9-c4ab-f23c9ebc9011@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Dan Carpenter Cc: David Hildenbrand Cc: James Houghton Cc: Johannes Weiner Cc: John Hubbard Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mike Kravetz Cc: Mina Almasry Cc: Muchun Song Cc: Naoya Horiguchi Cc: Peter Xu Cc: Sidhartha Kumar Cc: Vlastimil Babka Cc: Yang Shi Cc: Yu Zhao Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/huge_memory.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 4b51634cd16a01b2be0f6b69cc0dae63de4751f2 Author: Hugh Dickins Date: Tue Nov 22 01:49:36 2022 -0800 mm,thp,rmap: subpages_mapcount COMPOUND_MAPPED if PMD-mapped Can the lock_compound_mapcount() bit_spin_lock apparatus be removed now? Yes. Not by atomic64_t or cmpxchg games, those get difficult on 32-bit; but if we slightly abuse subpages_mapcount by additionally demanding that one bit be set there when the compound page is PMD-mapped, then a cascade of two atomic ops is able to maintain the stats without bit_spin_lock. This is harder to reason about than when bit_spin_locked, but I believe safe; and no drift in stats detected when testing. When there are racing removes and adds, of course the sequence of operations is less well- defined; but each operation on subpages_mapcount is atomically good. What might be disastrous, is if subpages_mapcount could ever fleetingly appear negative: but the pte lock (or pmd lock) these rmap functions are called under, ensures that a last remove cannot race ahead of a first add. Continue to make an exception for hugetlb (PageHuge) pages, though that exception can be easily removed by a further commit if necessary: leave subpages_mapcount 0, don't bother with COMPOUND_MAPPED in its case, just carry on checking compound_mapcount too in folio_mapped(), page_mapped(). Evidence is that this way goes slightly faster than the previous implementation in all cases (pmds after ptes now taking around 103ms); and relieves us of worrying about contention on the bit_spin_lock. Link: https://lkml.kernel.org/r/3978f3ca-5473-55a7-4e14-efea5968d892@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Dan Carpenter Cc: David Hildenbrand Cc: James Houghton Cc: Johannes Weiner Cc: John Hubbard Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mike Kravetz Cc: Mina Almasry Cc: Muchun Song Cc: Naoya Horiguchi Cc: Peter Xu Cc: Sidhartha Kumar Cc: Vlastimil Babka Cc: Yang Shi Cc: Yu Zhao Cc: Zach O'Keefe Signed-off-by: Andrew Morton Documentation/mm/transhuge.rst | 7 +-- include/linux/mm.h | 19 ++++++- include/linux/rmap.h | 13 ++--- mm/page_alloc.c | 2 +- mm/rmap.c | 121 +++++++++-------------------------------- 5 files changed, 51 insertions(+), 111 deletions(-) commit be5ef2d9b006bbd93b1a03e1da2dbd19fb0b9f14 Author: Hugh Dickins Date: Tue Nov 22 01:42:04 2022 -0800 mm,thp,rmap: subpages_mapcount of PTE-mapped subpages Patch series "mm,thp,rmap: rework the use of subpages_mapcount", v2. This patch (of 3): Following suggestion from Linus, instead of counting every PTE map of a compound page in subpages_mapcount, just count how many of its subpages are PTE-mapped: this yields the exact number needed for NR_ANON_MAPPED and NR_FILE_MAPPED stats, without any need for a locked scan of subpages; and requires updating the count less often. This does then revert total_mapcount() and folio_mapcount() to needing a scan of subpages; but they are inherently racy, and need no locking, so Linus is right that the scans are much better done there. Plus (unlike in 6.1 and previous) subpages_mapcount lets us avoid the scan in the common case of no PTE maps. And page_mapped() and folio_mapped() remain scanless and just as efficient with the new meaning of subpages_mapcount: those are the functions which I most wanted to remove the scan from. The updated page_dup_compound_rmap() is no longer suitable for use by anon THP's __split_huge_pmd_locked(); but page_add_anon_rmap() can be used for that, so long as its VM_BUG_ON_PAGE(!PageLocked) is deleted. Evidence is that this way goes slightly faster than the previous implementation for most cases; but significantly faster in the (now scanless) pmds after ptes case, which started out at 870ms and was brought down to 495ms by the previous series, now takes around 105ms. Link: https://lkml.kernel.org/r/a5849eca-22f1-3517-bf29-95d982242742@google.com Link: https://lkml.kernel.org/r/eec17e16-4e1-7c59-f1bc-5bca90dac919@google.com Signed-off-by: Hugh Dickins Suggested-by: Linus Torvalds Acked-by: Kirill A. Shutemov Cc: Dan Carpenter Cc: David Hildenbrand Cc: James Houghton Cc: Johannes Weiner Cc: John Hubbard Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mike Kravetz Cc: Mina Almasry Cc: Muchun Song Cc: Naoya Horiguchi Cc: Peter Xu Cc: Sidhartha Kumar Cc: Vlastimil Babka Cc: Yang Shi Cc: Yu Zhao Cc: Zach O'Keefe Signed-off-by: Andrew Morton Documentation/mm/transhuge.rst | 3 +- include/linux/mm.h | 52 ++++++++------ include/linux/rmap.h | 9 +-- mm/huge_memory.c | 2 +- mm/rmap.c | 160 ++++++++++++++++++----------------------- 5 files changed, 107 insertions(+), 119 deletions(-) commit 11aad2631bf74b3c811dee76154702aab855a323 Author: Joao Martins Date: Mon Nov 7 15:39:22 2022 +0000 mm/hugetlb_vmemmap: remap head page to newly allocated page Today with `hugetlb_free_vmemmap=on` the struct page memory that is freed back to page allocator is as following: for a 2M hugetlb page it will reuse the first 4K vmemmap page to remap the remaining 7 vmemmap pages, and for a 1G hugetlb it will remap the remaining 4095 vmemmap pages. Essentially, that means that it breaks the first 4K of a potentially contiguous chunk of memory of 32K (for 2M hugetlb pages) or 16M (for 1G hugetlb pages). For this reason the memory that it's free back to page allocator cannot be used for hugetlb to allocate huge pages of the same size, but rather only of a smaller huge page size: Trying to assign a 64G node to hugetlb (on a 128G 2node guest, each node having 64G): * Before allocation: Free pages count per migrate type at order 0 1 2 3 4 5 6 7 8 9 10 ... Node 0, zone Normal, type Movable 340 100 32 15 1 2 0 0 0 1 15558 $ echo 32768 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages $ cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages 31987 * After: Node 0, zone Normal, type Movable 30893 32006 31515 7 0 0 0 0 0 0 0 Notice how the memory freed back are put back into 4K / 8K / 16K page pools. And it allocates a total of 31987 pages (63974M). To fix this behaviour rather than remapping second vmemmap page (thus breaking the contiguous block of memory backing the struct pages) repopulate the first vmemmap page with a new one. We allocate and copy from the currently mapped vmemmap page, and then remap it later on. The same algorithm works if there's a pre initialized walk::reuse_page and the head page doesn't need to be skipped and instead we remap it when the @addr being changed is the @reuse_addr. The new head page is allocated in vmemmap_remap_free() given that on restore there's no need for functional change. Note that, because right now one hugepage is remapped at a time, thus only one free 4K page at a time is needed to remap the head page. Should it fail to allocate said new page, it reuses the one that's already mapped just like before. As a result, for every 64G of contiguous hugepages it can give back 1G more of contiguous memory per 64G, while needing in total 128M new 4K pages (for 2M hugetlb) or 256k (for 1G hugetlb). After the changes, try to assign a 64G node to hugetlb (on a 128G 2node guest, each node with 64G): * Before allocation Free pages count per migrate type at order 0 1 2 3 4 5 6 7 8 9 10 ... Node 0, zone Normal, type Movable 1 1 1 0 0 1 0 0 1 1 15564 $ echo 32768 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages $ cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages 32394 * After: Node 0, zone Normal, type Movable 0 50 97 108 96 81 70 46 18 0 0 In the example above, 407 more hugeltb 2M pages are allocated i.e. 814M out of the 32394 (64788M) allocated. So the memory freed back is indeed being used back in hugetlb and there's no massive order-0..order-2 pages accumulated unused. [joao.m.martins@oracle.com: v3] Link: https://lkml.kernel.org/r/20221109200623.96867-1-joao.m.martins@oracle.com [joao.m.martins@oracle.com: add smp_wmb() to ensure page contents are visible prior to PTE write] Link: https://lkml.kernel.org/r/20221110121214.6297-1-joao.m.martins@oracle.com Link: https://lkml.kernel.org/r/20221107153922.77094-1-joao.m.martins@oracle.com Signed-off-by: Joao Martins Reviewed-by: Muchun Song Cc: Mike Kravetz Signed-off-by: Andrew Morton mm/hugetlb_vmemmap.c | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) commit d7ec8f421ade2817983963a106b0085cc478c17b Author: SeongJae Park Date: Mon Nov 7 16:50:01 2022 +0000 selftests/damon: test non-context inputs to rm_contexts file There was a bug[1] that triggered by writing non-context DAMON debugfs file names to the 'rm_contexts' DAMON debugfs file. Add a selftest for the bug to avoid it happen again. [1] https://lore.kernel.org/damon/000000000000ede3ac05ec4abf8e@google.com/ Link: https://lkml.kernel.org/r/20221107165001.5717-3-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton tools/testing/selftests/damon/Makefile | 1 + .../selftests/damon/debugfs_rm_non_contexts.sh | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) commit d8dd5e979d09c7463618853fb4aedd88e3efc8ae Author: Hugh Dickins Date: Wed Nov 9 18:18:49 2022 -0800 mm,thp,rmap: handle the normal !PageCompound case first Commit ("mm,thp,rmap: lock_compound_mapcounts() on THP mapcounts") propagated the "if (compound) {lock} else if (PageCompound) {lock} else {atomic}" pattern throughout; but Linus hated the way that gives primacy to the uncommon case: switch to "if (!PageCompound) {atomic} else if (compound) {lock} else {lock}" throughout. Linus has a bigger idea for how to improve it all, but here just make that rearrangement. Link: https://lkml.kernel.org/r/fca2f694-2098-b0ef-d4e-f1d8b94d318c@google.com Signed-off-by: Hugh Dickins Cc: David Hildenbrand Cc: James Houghton Cc: John Hubbard Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mike Kravetz Cc: Mina Almasry Cc: Muchun Song Cc: Naoya Horiguchi Cc: Peter Xu Cc: Sidhartha Kumar Cc: Vlastimil Babka Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton mm/rmap.c | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 9bd3155ed83b723be719e522760f107229e2a61b Author: Hugh Dickins Date: Wed Nov 2 18:53:45 2022 -0700 mm,thp,rmap: lock_compound_mapcounts() on THP mapcounts Fix the races in maintaining compound_mapcount, subpages_mapcount and subpage _mapcount by using PG_locked in the first tail of any compound page for a bit_spin_lock() on such modifications; skipping the usual atomic operations on those fields in this case. Bring page_remove_file_rmap() and page_remove_anon_compound_rmap() back into page_remove_rmap() itself. Rearrange page_add_anon_rmap() and page_add_file_rmap() and page_remove_rmap() to follow the same "if (compound) {lock} else if (PageCompound) {lock} else {atomic}" pattern (with a PageTransHuge in the compound test, like before, to avoid BUG_ONs and optimize away that block when THP is not configured). Move all the stats updates outside, after the bit_spin_locked section, so that it is sure to be a leaf lock. Add page_dup_compound_rmap() to manage compound locking versus atomics in sync with the rest. In particular, hugetlb pages are still using the atomics: to avoid unnecessary interference there, and because they never have subpage mappings; but this exception can easily be changed. Conveniently, page_dup_compound_rmap() turns out to suit an anon THP's __split_huge_pmd_locked() too. bit_spin_lock() is not popular with PREEMPT_RT folks: but PREEMPT_RT sensibly excludes TRANSPARENT_HUGEPAGE already, so its only exposure is to the non-hugetlb non-THP pte-mapped compound pages (with large folios being currently dependent on TRANSPARENT_HUGEPAGE). There is never any scan of subpages in this case; but we have chosen to use PageCompound tests rather than PageTransCompound tests to gate the use of lock_compound_mapcounts(), so that page_mapped() is correct on all compound pages, whether or not TRANSPARENT_HUGEPAGE is enabled: could that be a problem for PREEMPT_RT, when there is contention on the lock - under heavy concurrent forking for example? If so, then it can be turned into a sleeping lock (like folio_lock()) when PREEMPT_RT. A simple 100 X munmap(mmap(2GB, MAP_SHARED|MAP_POPULATE, tmpfs), 2GB) took 18 seconds on small pages, and used to take 1 second on huge pages, but now takes 115 milliseconds on huge pages. Mapping by pmds a second time used to take 860ms and now takes 86ms; mapping by pmds after mapping by ptes (when the scan is needed) used to take 870ms and now takes 495ms. Mapping huge pages by ptes is largely unaffected but variable: between 5% faster and 5% slower in what I've recorded. Contention on the lock is likely to behave worse than contention on the atomics behaved. Link: https://lkml.kernel.org/r/1b42bd1a-8223-e827-602f-d466c2db7d3c@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: David Hildenbrand Cc: James Houghton Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mike Kravetz Cc: Mina Almasry Cc: Muchun Song Cc: Naoya Horiguchi Cc: Peter Xu Cc: Sidhartha Kumar Cc: Vlastimil Babka Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton Documentation/mm/transhuge.rst | 16 +- include/linux/rmap.h | 14 +- mm/huge_memory.c | 3 +- mm/rmap.c | 333 +++++++++++++++++++++++------------------ 4 files changed, 204 insertions(+), 162 deletions(-) commit cb67f4282bf9693658dbda934a441ddbbb1446df Author: Hugh Dickins Date: Wed Nov 2 18:51:38 2022 -0700 mm,thp,rmap: simplify compound page mapcount handling Compound page (folio) mapcount calculations have been different for anon and file (or shmem) THPs, and involved the obscure PageDoubleMap flag. And each huge mapping and unmapping of a file (or shmem) THP involved atomically incrementing and decrementing the mapcount of every subpage of that huge page, dirtying many struct page cachelines. Add subpages_mapcount field to the struct folio and first tail page, so that the total of subpage mapcounts is available in one place near the head: then page_mapcount() and total_mapcount() and page_mapped(), and their folio equivalents, are so quick that anon and file and hugetlb don't need to be optimized differently. Delete the unloved PageDoubleMap. page_add and page_remove rmap functions must now maintain the subpages_mapcount as well as the subpage _mapcount, when dealing with pte mappings of huge pages; and correct maintenance of NR_ANON_MAPPED and NR_FILE_MAPPED statistics still needs reading through the subpages, using nr_subpages_unmapped() - but only when first or last pmd mapping finds subpages_mapcount raised (double-map case, not the common case). But are those counts (used to decide when to split an anon THP, and in vmscan's pagecache_reclaimable heuristic) correctly maintained? Not quite: since page_remove_rmap() (and also split_huge_pmd()) is often called without page lock, there can be races when a subpage pte mapcount 0<->1 while compound pmd mapcount 0<->1 is scanning - races which the previous implementation had prevented. The statistics might become inaccurate, and even drift down until they underflow through 0. That is not good enough, but is better dealt with in a followup patch. Update a few comments on first and second tail page overlaid fields. hugepage_add_new_anon_rmap() has to "increment" compound_mapcount, but subpages_mapcount and compound_pincount are already correctly at 0, so delete its reinitialization of compound_pincount. A simple 100 X munmap(mmap(2GB, MAP_SHARED|MAP_POPULATE, tmpfs), 2GB) took 18 seconds on small pages, and used to take 1 second on huge pages, but now takes 119 milliseconds on huge pages. Mapping by pmds a second time used to take 860ms and now takes 92ms; mapping by pmds after mapping by ptes (when the scan is needed) used to take 870ms and now takes 495ms. But there might be some benchmarks which would show a slowdown, because tail struct pages now fall out of cache until final freeing checks them. Link: https://lkml.kernel.org/r/47ad693-717-79c8-e1ba-46c3a6602e48@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: David Hildenbrand Cc: James Houghton Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mike Kravetz Cc: Mina Almasry Cc: Muchun Song Cc: Naoya Horiguchi Cc: Peter Xu Cc: Sidhartha Kumar Cc: Vlastimil Babka Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton Documentation/mm/transhuge.rst | 18 ------ include/linux/mm.h | 85 +++++++++++++++++------- include/linux/mm_types.h | 21 +++++- include/linux/page-flags.h | 21 ------ include/linux/rmap.h | 2 + mm/debug.c | 5 +- mm/folio-compat.c | 6 -- mm/huge_memory.c | 36 +++-------- mm/hugetlb.c | 2 + mm/khugepaged.c | 11 +--- mm/page_alloc.c | 27 ++++---- mm/rmap.c | 142 +++++++++++++++++++++++------------------ mm/util.c | 79 ----------------------- 13 files changed, 194 insertions(+), 261 deletions(-) commit dad6a5eb55564845aa17b8b20fa834af21e46c48 Author: Hugh Dickins Date: Wed Nov 2 18:48:45 2022 -0700 mm,hugetlb: use folio fields in second tail page Patch series "mm,huge,rmap: unify and speed up compound mapcounts". This patch (of 3): We want to declare one more int in the first tail of a compound page: that first tail page being valuable property, since every compound page has a first tail, but perhaps no more than that. No problem on 64-bit: there is already space for it. No problem with 32-bit THPs: 5.18 commit 5232c63f46fd ("mm: Make compound_pincount always available") kindly cleared the space for it, apparently not realizing that only 64-bit architectures enable CONFIG_THP_SWAP (whose use of tail page->private might conflict) - but make sure of that in its Kconfig. But hugetlb pages use tail page->private of the first tail page for a subpool pointer, which will conflict; and they also use page->private of the 2nd, 3rd and 4th tails. Undo "mm: add private field of first tail to struct page and struct folio"'s recent addition of private_1 to the folio tail: instead add hugetlb_subpool, hugetlb_cgroup, hugetlb_cgroup_rsvd, hugetlb_hwpoison to a second tail page of the folio: THP has long been using several fields of that tail, so make better use of it for hugetlb too. This is not how a generic folio should be declared in future, but it is an effective transitional way to make use of it. Delete the SUBPAGE_INDEX stuff, but keep __NR_USED_SUBPAGE: now 3. [hughd@google.com: prefix folio's page_1 and page_2 with double underscore, give folio's _flags_2 and _head_2 a line documentation each] Link: https://lkml.kernel.org/r/9e2cb6b-5b58-d3f2-b5ee-5f8a14e8f10@google.com Link: https://lkml.kernel.org/r/5f52de70-975-e94f-f141-543765736181@google.com Link: https://lkml.kernel.org/r/3818cc9a-9999-d064-d778-9c94c5911e6@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: David Hildenbrand Cc: James Houghton Cc: John Hubbard Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mike Kravetz Cc: Mina Almasry Cc: Muchun Song Cc: Naoya Horiguchi Cc: Peter Xu Cc: Sidhartha Kumar Cc: Vlastimil Babka Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton include/linux/hugetlb.h | 23 +++---------- include/linux/hugetlb_cgroup.h | 31 +++++------------- include/linux/mm_types.h | 74 ++++++++++++++++++++++++++++-------------- mm/Kconfig | 2 +- mm/memory-failure.c | 5 ++- 5 files changed, 67 insertions(+), 68 deletions(-) commit 634ba645f9bc888227ca954ea643579268d1b6d8 Author: Mike Kravetz Date: Thu Nov 3 18:16:32 2022 -0700 selftests/vm: update hugetlb madvise Commit 8ebe0a5eaaeb ("mm,madvise,hugetlb: fix unexpected data loss with MADV_DONTNEED on hugetlbfs") changed how the passed length was interpreted for hugetlb mappings. It was changed from align up to align down. The hugetlb-madvise test explicitly tests this behavior. Change test to expect new behavior. Link: https://lkml.kernel.org/r/20221104011632.357049-1-mike.kravetz@oracle.com Link: https://lore.kernel.org/oe-lkp/202211040619.2ec447d7-oliver.sang@intel.com Signed-off-by: Mike Kravetz Reported-by: kernel test robot Cc: David Hildenbrand Cc: Rik van Riel Signed-off-by: Andrew Morton tools/testing/selftests/vm/hugetlb-madvise.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 65917b538bcc4d8c0d8e199a6f7b7426acf13d58 Author: Deming Wang Date: Thu Nov 3 22:38:18 2022 -0400 zsmalloc: replace IS_ERR() with IS_ERR_VALUE() Avoid typecasts that are needed for IS_ERR() and use IS_ERR_VALUE() instead. Link: https://lkml.kernel.org/r/20221104023818.1728-1-wangdeming@inspur.com Signed-off-by: Deming Wang Signed-off-by: Andrew Morton mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15520a3f046998e3f57e695743e99b0875e2dae7 Author: Peter Xu Date: Sun Oct 30 17:41:51 2022 -0400 mm: use pte markers for swap errors PTE markers are ideal mechanism for things like SWP_SWAPIN_ERROR. Using a whole swap entry type for this purpose can be an overkill, especially if we already have PTE markers. Define a new bit for swapin error and replace it with pte markers. Then we can safely drop SWP_SWAPIN_ERROR and give one device slot back to swap. We used to have SWP_SWAPIN_ERROR taking the page pfn as part of the swap entry, but it's never used. Neither do I see how it can be useful because normally the swapin failure should not be caused by a bad page but bad swap device. Drop it alongside. Link: https://lkml.kernel.org/r/20221030214151.402274-3-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Huang Ying Reviewed-by: Miaohe Lin Acked-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Naoya Horiguchi Signed-off-by: Andrew Morton include/linux/swap.h | 6 +----- include/linux/swapops.h | 26 ++++++++++++++------------ mm/memory.c | 6 ++++-- mm/shmem.c | 2 +- mm/swapfile.c | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) commit ca92ea3dc5a2b01f98e9f02b7a6bc03be06fe124 Author: Peter Xu Date: Sun Oct 30 17:41:50 2022 -0400 mm: always compile in pte markers Patch series "mm: Use pte marker for swapin errors". This series uses the pte marker to replace the swapin error swap entry, then we save one more swap entry slot for swap devices. A new pte marker bit is defined. This patch (of 2): The PTE markers code is tiny and now it's enabled for most of the distributions. It's fine to keep it as-is, but to make a broader use of it (e.g. replacing read error swap entry) it needs to be there always otherwise we need special code path to take care of !PTE_MARKER case. It'll be easier just make pte marker always exist. Use this chance to extend its usage to anonymous too by simply touching up some of the old comments, because it'll be used for anonymous pages in the follow up patches. Link: https://lkml.kernel.org/r/20221030214151.402274-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20221030214151.402274-2-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Huang Ying Reviewed-by: Miaohe Lin Acked-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Naoya Horiguchi Cc: Peter Xu Signed-off-by: Andrew Morton include/linux/swap.h | 10 +++------- include/linux/swapops.h | 31 ------------------------------- mm/Kconfig | 7 ------- mm/memory.c | 7 +++---- 4 files changed, 6 insertions(+), 49 deletions(-) commit f15be1b8d449a8eebe82d77164bf760804753651 Author: Christophe JAILLET Date: Tue Nov 1 22:14:09 2022 +0100 mm: 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/03f9401a6c8b87a1c786a2138d16b048f8d0eb53.1667336095.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Acked-by: Pasha Tatashin Signed-off-by: Andrew Morton mm/page_table_check.c | 3 ++- mm/usercopy.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit e6aff38b2e25e934e95471351c96d1410bb17561 Author: Christophe JAILLET Date: Tue Nov 1 22:14:08 2022 +0100 mm/damon: 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/ed2b46489a513988688decb53850339cc228940c.1667336095.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/lru_sort.c | 3 ++- mm/damon/reclaim.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 1b0006daa36f2ccb7f213007365d504bcd016312 Author: SeongJae Park Date: Tue Nov 1 22:03:28 2022 +0000 Docs/ABI/damon: document 'schemes//tried_regions' sysfs directory Update DAMON ABI document for the 'tried_regions' directory of DAMON sysfs interface. Link: https://lkml.kernel.org/r/20221101220328.95765-9-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton Documentation/ABI/testing/sysfs-kernel-mm-damon | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 7f0a86f3c99bc9736445ef64aa65c9bd6161a47b Author: SeongJae Park Date: Tue Nov 1 22:03:27 2022 +0000 Docs/admin-guide/mm/damon/usage: document schemes//tried_regions sysfs directory Document 'tried_regions' directory in DAMON sysfs interface usage in the administrator guide. Link: https://lkml.kernel.org/r/20221101220328.95765-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 45 ++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 3 deletions(-) commit 2b3ee3f66c673312ea377bcfb54cb2b9abc8473b Author: SeongJae Park Date: Tue Nov 1 22:03:26 2022 +0000 tools/selftets/damon/sysfs: test tried_regions directory existence Add a simple test case for ensuring tried_regions directory existence. Link: https://lkml.kernel.org/r/20221101220328.95765-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/damon/sysfs.sh | 7 +++++++ 1 file changed, 7 insertions(+) commit 772c15e5adcb32a42dbbcdb905ec49f662312976 Author: SeongJae Park Date: Tue Nov 1 22:03:25 2022 +0000 mm/damon/sysfs-schemes: implement DAMOS-tried regions clear command When there are huge number of DAMON regions that specific scheme actions are tried to be applied, directories and files under 'tried_regions' scheme directory could waste some memory. Add another special input keyword ('clear_schemes_tried_regions') for 'state' file of each kdamond sysfs directory that can be used for cleanup of the 'tried_regions' sub-directories. [sj@kernel.org: skip regions clearing if the scheme directory was removed] Link: https://lkml.kernel.org/r/20221114182954.4745-3-sj@kernel.org Link: https://lkml.kernel.org/r/20221101220328.95765-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton mm/damon/sysfs-common.h | 4 ++++ mm/damon/sysfs-schemes.c | 14 +++++++++++++- mm/damon/sysfs.c | 20 ++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) commit f1d13cacabe140305844879e495ca67837e059cc Author: SeongJae Park Date: Tue Nov 1 22:03:24 2022 +0000 mm/damon/sysfs: implement DAMOS tried regions update command Implement the code for filling the data of 'tried_regions' DAMON sysfs directory. With this commit, DAMON sysfs interface users can write a special keyword, 'update_schemes_tried_regions' to the corresponding 'state' file of the kdamond. Then, DAMON sysfs interface will collect the tried regions information using the 'before_damos_apply()' callback for one aggregation interval and populate scheme region directories with the values. [sj@kernel.org: skip tried regions update if the scheme directory was removed] Link: https://lkml.kernel.org/r/20221114182954.4745-2-sj@kernel.org Link: https://lkml.kernel.org/r/20221101220328.95765-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton mm/damon/sysfs-common.h | 6 ++++ mm/damon/sysfs-schemes.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ mm/damon/sysfs.c | 57 ++++++++++++++++++++++++++++++++-- 3 files changed, 141 insertions(+), 2 deletions(-) commit 9277d0367ba18ef4bb98bafb1209e715844cdf7e Author: SeongJae Park Date: Tue Nov 1 22:03:23 2022 +0000 mm/damon/sysfs-schemes: implement scheme region directory Implement region directories under 'tried_regions' directory of each scheme DAMON sysfs directory. This directory will provide the address range, the monitored access frequency ('nr_accesses'), and the age of each DAMON region that corresponding DAMON-based operation scheme has tried to be applied. Note that this commit doesn't implement the code for filling the data but only the sysfs directory. Link: https://lkml.kernel.org/r/20221101220328.95765-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton mm/damon/sysfs-schemes.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 122 insertions(+), 1 deletion(-) commit 5181b75f438d2e5b7f27bf48c6ea88a87c2882b7 Author: SeongJae Park Date: Tue Nov 1 22:03:22 2022 +0000 mm/damon/sysfs-schemes: implement schemes/tried_regions directory For efficient and simple query-like DAMON monitoring results readings and deep level investigations of DAMOS, DAMON kernel API (include/linux/damon.h) users can use 'before_damos_apply' DAMON callback. However, DAMON sysfs interface users don't have such option. Add a directory, namely 'tried_regions', under each scheme directory to use it as the interface for the purpose. Note that this commit is implementing only the directory but the data filling. After the data filling change is made, users will be able to signal DAMON to fill the directory with the regions that corresponding scheme has tried to be applied. By setting the access pattern of the scheme, users could do the efficient query-like monitoring. Link: https://lkml.kernel.org/r/20221101220328.95765-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton mm/damon/sysfs-schemes.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 44467bbb7e81ebcef2a5bfc9d6546bf7cd015374 Author: SeongJae Park Date: Tue Nov 1 22:03:21 2022 +0000 mm/damon/core: add a callback for scheme target regions check Patch series "efficiently expose damos action tried regions information". DAMON users can retrieve the monitoring results via 'after_aggregation' callbacks if the user is using the kernel API, or 'damon_aggregated' tracepoint if the user is in the user space. Those are useful if full monitoring results are necessary. However, if the user has interest in only a snapshot of the results for some regions having specific access pattern, the interfaces could be inefficient. For example, some users only want to know which memory regions are not accessed for more than a specific time at the moment. Also, some DAMOS users would want to know exactly to what memory regions the schemes' actions tried to be applied, for a debugging or a tuning. As DAMOS has its internal mechanism for quota and regions prioritization, the users would need to simulate DAMOS' mechanism against the monitoring results. That's unnecessarily complex. This patchset implements DAMON kernel API callbacks and sysfs directory for efficient exposure of the information for the use cases. The new callback will be called for each region when a DAMOS action is gonna tried to be applied to it. The sysfs directory will be called 'tried_regions' and placed under each scheme sysfs directory. Users can write a special keyworkd, 'update_schemes_regions', to the 'state' file of a kdamond sysfs directory. Then, DAMON sysfs interface will fill the directory with the information of regions that corresponding scheme action was tried to be applied for next one aggregation interval. Patches Sequence ---------------- The first one (patch 1) implements the callback for the kernel space users. Following two patches (patches 2 and 3) implements sysfs directories for the information and its sub directories. Two patches (patches 4 and 5) for implementing the special keywords for filling the data to and cleaning up the directories follow. Patch 6 adds a selftest for the new sysfs directory. Finally, two patches (patches 7 and 8) document the new feature in the administrator guide and the ABI document. This patch (of 8): Getting DAMON monitoring results of only specific access pattern (e.g., getting address ranges of memory that not accessed at all for two minutes) can be useful for efficient monitoring of the system. The information can also be helpful for deep level investigation of DAMON-based operation schemes. For that, users need to record (in case of the user space users) or iterate (in case of the kernel space users) full monitoring results and filter it out for the specific access pattern. In case of the DAMOS investigation, users will even need to simulate DAMOS' quota and prioritization mechanisms. It's inefficient and complex. Add a new DAMON callback that will be called before each scheme is applied to each region. DAMON kernel API users will be able to do the query-like monitoring results collection, or DAMOS investigation in an efficient and simple way using it. Commits for providing the capability to the user space users will follow. Link: https://lkml.kernel.org/r/20221101220328.95765-1-sj@kernel.org Link: https://lkml.kernel.org/r/20221101220328.95765-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton include/linux/damon.h | 5 +++++ mm/damon/core.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 345c62d163496ae4b5c1ce530b1588067d8f5a8b Author: Sidhartha Kumar Date: Tue Nov 1 15:30:59 2022 -0700 mm/hugetlb: convert move_hugetlb_state() to folios Clean up unmap_and_move_huge_page() by converting move_hugetlb_state() to take in folios. [akpm@linux-foundation.org: fix CONFIG_HUGETLB_PAGE=n build] Link: https://lkml.kernel.org/r/20221101223059.460937-10-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Cc: Aneesh Kumar K.V Cc: Bui Quang Minh Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mina Almasry Signed-off-by: Andrew Morton include/linux/hugetlb.h | 11 ++++++++--- mm/hugetlb.c | 22 ++++++++++++---------- mm/migrate.c | 4 ++-- 3 files changed, 22 insertions(+), 15 deletions(-) commit 541b7c7b3ec0555a09782b463bcbc2cb86d97085 Author: Sidhartha Kumar Date: Tue Nov 1 15:30:58 2022 -0700 mm/hugeltb_cgroup: convert hugetlb_cgroup_commit_charge*() to folios Convert hugetlb_cgroup_commit_charge*() to internally use folios to clean up the code after __set_hugetlb_cgroup() was changed to take a folio. Link: https://lkml.kernel.org/r/20221101223059.460937-9-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Cc: Aneesh Kumar K.V Cc: Bui Quang Minh Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mina Almasry Signed-off-by: Andrew Morton mm/hugetlb_cgroup.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit d4ab0316cc33aeedf6dcb1c2c25e097a25766132 Author: Sidhartha Kumar Date: Tue Nov 1 15:30:57 2022 -0700 mm/hugetlb_cgroup: convert hugetlb_cgroup_uncharge_page() to folios Continue to use a folio inside free_huge_page() by converting hugetlb_cgroup_uncharge_page*() to folios. Link: https://lkml.kernel.org/r/20221101223059.460937-8-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Cc: Aneesh Kumar K.V Cc: Bui Quang Minh Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mina Almasry Signed-off-by: Andrew Morton include/linux/hugetlb_cgroup.h | 16 ++++++++-------- mm/hugetlb.c | 15 +++++++++------ mm/hugetlb_cgroup.c | 21 ++++++++++----------- 3 files changed, 27 insertions(+), 25 deletions(-) commit 0356c4b96f6890dd61af4c902f681764f4bdba09 Author: Sidhartha Kumar Date: Tue Nov 1 15:30:56 2022 -0700 mm/hugetlb: convert free_huge_page to folios Use folios inside free_huge_page(), this is in preparation for converting hugetlb_cgroup_uncharge_page() to take in a folio. Link: https://lkml.kernel.org/r/20221101223059.460937-7-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Cc: Aneesh Kumar K.V Cc: Bui Quang Minh Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mina Almasry Signed-off-by: Andrew Morton mm/hugetlb.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit d5e33bd8c16b6f5f47665d378f078bee72b85225 Author: Sidhartha Kumar Date: Tue Nov 1 15:30:55 2022 -0700 mm/hugetlb: convert isolate_or_dissolve_huge_page to folios Removes a call to compound_head() by using a folio when operating on the head page of a hugetlb compound page. Link: https://lkml.kernel.org/r/20221101223059.460937-6-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Cc: Aneesh Kumar K.V Cc: Bui Quang Minh Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mina Almasry Signed-off-by: Andrew Morton mm/hugetlb.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 29f394304f624b06fafb3cc9c3da8779f71f4bee Author: Sidhartha Kumar Date: Tue Nov 1 15:30:54 2022 -0700 mm/hugetlb_cgroup: convert hugetlb_cgroup_migrate to folios Cleans up intermediate page to folio conversion code in hugetlb_cgroup_migrate() by changing its arguments from pages to folios. Link: https://lkml.kernel.org/r/20221101223059.460937-5-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Cc: Aneesh Kumar K.V Cc: Bui Quang Minh Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mina Almasry Signed-off-by: Andrew Morton include/linux/hugetlb_cgroup.h | 8 ++++---- mm/hugetlb.c | 2 +- mm/hugetlb_cgroup.c | 8 +++----- 3 files changed, 8 insertions(+), 10 deletions(-) commit de656ed376c4cb47c5713fba52f8bbfbea44f387 Author: Sidhartha Kumar Date: Tue Nov 1 15:30:53 2022 -0700 mm/hugetlb_cgroup: convert set_hugetlb_cgroup*() to folios Allows __prep_new_huge_page() to operate on a folio by converting set_hugetlb_cgroup*() to take in a folio. Link: https://lkml.kernel.org/r/20221101223059.460937-4-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: Aneesh Kumar K.V Cc: Bui Quang Minh Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mina Almasry Cc: Muchun Song Signed-off-by: Andrew Morton include/linux/hugetlb_cgroup.h | 12 ++++++------ mm/hugetlb.c | 33 +++++++++++++++++++-------------- mm/hugetlb_cgroup.c | 11 ++++++----- 3 files changed, 31 insertions(+), 25 deletions(-) commit f074732d599e19a2a5b12e54743ad5eaccbe6550 Author: Sidhartha Kumar Date: Tue Nov 1 15:30:52 2022 -0700 mm/hugetlb_cgroup: convert hugetlb_cgroup_from_page() to folios Introduce folios in __remove_hugetlb_page() by converting hugetlb_cgroup_from_page() to use folios. Also gets rid of unsed hugetlb_cgroup_from_page_resv() function. Link: https://lkml.kernel.org/r/20221101223059.460937-3-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Muchun Song Cc: Aneesh Kumar K.V Cc: Bui Quang Minh Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mike Kravetz Cc: Mina Almasry Signed-off-by: Andrew Morton include/linux/hugetlb_cgroup.h | 39 ++++++++++++++++++++------------------- mm/hugetlb.c | 5 +++-- mm/hugetlb_cgroup.c | 13 ++++++++----- 3 files changed, 31 insertions(+), 26 deletions(-) commit a098c977722ca27d3b4bfeb966767af3cce45f85 Author: Sidhartha Kumar Date: Tue Nov 1 15:30:51 2022 -0700 mm/hugetlb_cgroup: convert __set_hugetlb_cgroup() to folios Patch series "convert hugetlb_cgroup helper functions to folios", v2. This patch series continues the conversion of hugetlb code from being managed in pages to folios by converting many of the hugetlb_cgroup helper functions to use folios. This allows the core hugetlb functions to pass in a folio to these helper functions. This patch (of 9); Change __set_hugetlb_cgroup() to use folios so it is explicit that the function operates on a head page. Link: https://lkml.kernel.org/r/20221101223059.460937-1-sidhartha.kumar@oracle.com Link: https://lkml.kernel.org/r/20221101223059.460937-2-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Cc: Aneesh Kumar K.V Cc: Bui Quang Minh Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Mina Almasry Signed-off-by: Andrew Morton include/linux/hugetlb_cgroup.h | 14 +++++++------- mm/hugetlb_cgroup.c | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) commit b2b23ba03cb9059d11b270cc280dcdfa6dbbdf53 Author: Kees Cook Date: Fri Oct 28 08:53:01 2022 -0700 mempool: do not use ksize() for poisoning Nothing appears to be using ksize() within the kmalloc-backed mempools except the mempool poisoning logic. Use the actual pool size instead of the ksize() to avoid needing any special handling of the memory as needed by KASAN, UBSAN_BOUNDS, nor FORTIFY_SOURCE. [vbabka@suse.cz: for slab mempools pool_data is not object size] Link: https://lkml.kernel.org/r/13c4bd6e-09d3-efce-43a5-5a99be8bc96b@suse.cz Link: https://lkml.kernel.org/r/20221028154823.you.615-kees@kernel.org Signed-off-by: Kees Cook Signed-off-by: Vlastimil Babka Suggested-by: Vlastimil Babka Link: https://lore.kernel.org/lkml/f4fc52c4-7c18-1d76-0c7a-4058ea2486b9@suse.cz/ Acked-by: Vlastimil Babka Reviewed-by: Andrey Konovalov Cc: David Rientjes Cc: Marco Elver Cc: Vincenzo Frascino Reported-by: Anders Roxell Link: https://lore.kernel.org/all/20221031105514.GB69385@mutt/ Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/mempool.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 6e7ba8b5e2380f941dda8a1025d70c5ce5b38982 Author: Liam Howlett Date: Fri Oct 28 14:45:34 2022 +0000 maple_tree: mte_set_full() and mte_clear_full() clang-analyzer clean up mte_set_full() and mte_clear_full() were incorrectly setting a pointer to a value without returning a result. Fix this by returning the modified pointer to be use as necessary. Also add a third function to return if the bit is set or not. Link: https://lore.kernel.org/lkml/20221026120029.12555-1-lukas.bulwahn@gmail.com/ Link: https://lkml.kernel.org/r/20221028144520.2776767-1-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Suggested-by: Lukas Bulwahn Suggested-by: Dan Carpenter Signed-off-by: Andrew Morton lib/maple_tree.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 57e9cc50f4dd926d6c38751799d25cad89fb2bd9 Author: Johannes Weiner Date: Wed Oct 26 14:01:33 2022 -0400 mm: vmscan: split khugepaged stats from direct reclaim stats Direct reclaim stats are useful for identifying a potential source for application latency, as well as spotting issues with kswapd. However, khugepaged currently distorts the picture: as a kernel thread it doesn't impose allocation latencies on userspace, and it explicitly opts out of kswapd reclaim. Its activity showing up in the direct reclaim stats is misleading. Counting it as kswapd reclaim could also cause confusion when trying to understand actual kswapd behavior. Break out khugepaged from the direct reclaim counters into new pgsteal_khugepaged, pgdemote_khugepaged, pgscan_khugepaged counters. Test with a huge executable (CONFIG_READ_ONLY_THP_FOR_FS): pgsteal_kswapd 1342185 pgsteal_direct 0 pgsteal_khugepaged 3623 pgscan_kswapd 1345025 pgscan_direct 0 pgscan_khugepaged 3623 Link: https://lkml.kernel.org/r/20221026180133.377671-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reported-by: Eric Bergen Cc: Matthew Wilcox (Oracle) Cc: Yang Shi Cc: Yosry Ahmed Signed-off-by: Andrew Morton Documentation/admin-guide/cgroup-v2.rst | 6 ++++++ include/linux/khugepaged.h | 6 ++++++ include/linux/vm_event_item.h | 3 +++ mm/khugepaged.c | 5 +++++ mm/memcontrol.c | 8 ++++++-- mm/vmscan.c | 32 ++++++++++++++++++++++++-------- mm/vmstat.c | 3 +++ 7 files changed, 53 insertions(+), 10 deletions(-) commit 1b0166387586cae69d7da783f0a4521864534aad Author: SeongJae Park Date: Mon Oct 24 17:46:19 2022 +0000 Docs/admin-guide/mm/damon/usage: fix wrong usage example of init_regions file DAMON debugfs interface assumes the users will write all inputs at once. However, redirecting a string of multiple lines sometimes end up writing line by line. Therefore, the example usage of 'init_regions' file, which writes input as a string of multiple lines can fail. Fix it to use a single line string instead. Also update the description of the usage to not assume users will write inputs in multiple lines. Link: https://lkml.kernel.org/r/20221024174619.15600-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Vinicius Petrucci Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit bd4149290c3edc09454a8a7e7ef3a5544cb9eed6 Author: SeongJae Park Date: Mon Oct 24 17:46:18 2022 +0000 Docs/admin-guide/mm/damon/usage: describe the rules of sysfs region directories Patch series "Docs/admin-buide/mm/damon/usage: minor fixes". DAMON usage document contains an unclear description and a wrong usage example. This patchset fixes the two minor problems. This patch (of 2): Target region directories of DAMON sysfs interface should contain no overlap and sorted by the address, but not clearly documented. Actually, a user had an issue[1] due to the poor documentation. Add clear description of it on the usage document. [1] https://lore.kernel.org/damon/CAEZ6=UNUcH2BvJj++OrT=XQLdkidU79wmCO=tantSOB36pPNTg@mail.gmail.com/ Link: https://lkml.kernel.org/r/20221024174619.15600-1-sj@kernel.org Link: https://lkml.kernel.org/r/20221024174619.15600-2-sj@kernel.org Signed-off-by: SeongJae Park Reported-by: Vinicius Petrucci Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 3 +++ 1 file changed, 3 insertions(+) commit 1cc53a047b0b9389c2d8f4a69499c6135572f23e Author: Muchun Song Date: Thu Oct 27 11:36:41 2022 +0800 mm: hugetlb_vmemmap: remove redundant list_del() The ->lru field will be assigned to a new value in __free_page(). So it is unnecessary to delete it from the @list. Just remove it to simplify the code. Link: https://lkml.kernel.org/r/20221027033641.66709-1-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Signed-off-by: Andrew Morton mm/hugetlb_vmemmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d302c2398ba269e788a4f37ae57c07a7fcabaa42 Author: Tony Luck Date: Fri Oct 21 13:01:20 2022 -0700 mm, hwpoison: when copy-on-write hits poison, take page offline Cannot call memory_failure() directly from the fault handler because mmap_lock (and others) are held. It is important, but not urgent, to mark the source page as h/w poisoned and unmap it from other tasks. Use memory_failure_queue() to request a call to memory_failure() for the page with the error. Also provide a stub version for CONFIG_MEMORY_FAILURE=n Link: https://lkml.kernel.org/r/20221021200120.175753-3-tony.luck@intel.com Signed-off-by: Tony Luck Reviewed-by: Miaohe Lin Cc: Christophe Leroy Cc: Dan Williams Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Naoya Horiguchi Cc: Nicholas Piggin Cc: Shuai Xue Signed-off-by: Andrew Morton include/linux/mm.h | 6 +++++- mm/memory.c | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) commit a873dfe1032a132bf89f9e19a6ac44f5a0b78754 Author: Tony Luck Date: Fri Oct 21 13:01:19 2022 -0700 mm, hwpoison: try to recover from copy-on write faults Patch series "Copy-on-write poison recovery", v3. Part 1 deals with the process that triggered the copy on write fault with a store to a shared read-only page. That process is send a SIGBUS with the usual machine check decoration to specify the virtual address of the lost page, together with the scope. Part 2 sets up to asynchronously take the page with the uncorrected error offline to prevent additional machine check faults. H/t to Miaohe Lin and Shuai Xue for pointing me to the existing function to queue a call to memory_failure(). On x86 there is some duplicate reporting (because the error is also signalled by the memory controller as well as by the core that triggered the machine check). Console logs look like this: This patch (of 2): If the kernel is copying a page as the result of a copy-on-write fault and runs into an uncorrectable error, Linux will crash because it does not have recovery code for this case where poison is consumed by the kernel. It is easy to set up a test case. Just inject an error into a private page, fork(2), and have the child process write to the page. I wrapped that neatly into a test at: git://git.kernel.org/pub/scm/linux/kernel/git/aegl/ras-tools.git just enable ACPI error injection and run: # ./einj_mem-uc -f copy-on-write Add a new copy_user_highpage_mc() function that uses copy_mc_to_kernel() on architectures where that is available (currently x86 and powerpc). When an error is detected during the page copy, return VM_FAULT_HWPOISON to caller of wp_page_copy(). This propagates up the call stack. Both x86 and powerpc have code in their fault handler to deal with this code by sending a SIGBUS to the application. Note that this patch avoids a system crash and signals the process that triggered the copy-on-write action. It does not take any action for the memory error that is still in the shared page. To handle that a call to memory_failure() is needed. But this cannot be done from wp_page_copy() because it holds mmap_lock(). Perhaps the architecture fault handlers can deal with this loose end in a subsequent patch? On Intel/x86 this loose end will often be handled automatically because the memory controller provides an additional notification of the h/w poison in memory, the handler for this will call memory_failure(). This isn't a 100% solution. If there are multiple errors, not all may be logged in this way. [tony.luck@intel.com: add call to kmsan_unpoison_memory(), per Miaohe Lin] Link: https://lkml.kernel.org/r/20221031201029.102123-2-tony.luck@intel.com Link: https://lkml.kernel.org/r/20221021200120.175753-1-tony.luck@intel.com Link: https://lkml.kernel.org/r/20221021200120.175753-2-tony.luck@intel.com Signed-off-by: Tony Luck Reviewed-by: Dan Williams Reviewed-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Reviewed-by: Alexander Potapenko Tested-by: Shuai Xue Cc: Christophe Leroy Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Nicholas Piggin Signed-off-by: Andrew Morton include/linux/highmem.h | 26 ++++++++++++++++++++++++++ mm/memory.c | 30 ++++++++++++++++++++---------- 2 files changed, 46 insertions(+), 10 deletions(-) commit f689054aace2ff13af2e9a44a74fbba650ca31ba Author: Shakeel Butt Date: Wed Nov 9 01:20:11 2022 +0000 percpu_counter: add percpu_counter_sum_all interface The percpu_counter is used for scenarios where performance is more important than the accuracy. For percpu_counter users, who want more accurate information in their slowpath, percpu_counter_sum is provided which traverses all the online CPUs to accumulate the data. The reason it only needs to traverse online CPUs is because percpu_counter does implement CPU offline callback which syncs the local data of the offlined CPU. However there is a small race window between the online CPUs traversal of percpu_counter_sum and the CPU offline callback. The offline callback has to traverse all the percpu_counters on the system to flush the CPU local data which can be a lot. During that time, the CPU which is going offline has already been published as offline to all the readers. So, as the offline callback is running, percpu_counter_sum can be called for one counter which has some state on the CPU going offline. Since percpu_counter_sum only traverses online CPUs, it will skip that specific CPU and the offline callback might not have flushed the state for that specific percpu_counter on that offlined CPU. Normally this is not an issue because percpu_counter users can deal with some inaccuracy for small time window. However a new user i.e. mm_struct on the cleanup path wants to check the exact state of the percpu_counter through check_mm(). For such users, this patch introduces percpu_counter_sum_all() which traverses all possible CPUs and it is used in fork.c:check_mm() to avoid the potential race. This issue is exposed by the later patch "mm: convert mm's rss stats into percpu_counter". Link: https://lkml.kernel.org/r/20221109012011.881058-1-shakeelb@google.com Signed-off-by: Shakeel Butt Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Andrew Morton include/linux/percpu_counter.h | 6 ++++++ kernel/fork.c | 5 +++++ lib/percpu_counter.c | 29 +++++++++++++++++++++++------ 3 files changed, 34 insertions(+), 6 deletions(-) commit f1a7941243c102a44e8847e3b94ff4ff3ec56f25 Author: Shakeel Butt Date: Mon Oct 24 05:28:41 2022 +0000 mm: convert mm's rss stats into percpu_counter Currently mm_struct maintains rss_stats which are updated on page fault and the unmapping codepaths. For page fault codepath the updates are cached per thread with the batch of TASK_RSS_EVENTS_THRESH which is 64. The reason for caching is performance for multithreaded applications otherwise the rss_stats updates may become hotspot for such applications. However this optimization comes with the cost of error margin in the rss stats. The rss_stats for applications with large number of threads can be very skewed. At worst the error margin is (nr_threads * 64) and we have a lot of applications with 100s of threads, so the error margin can be very high. Internally we had to reduce TASK_RSS_EVENTS_THRESH to 32. Recently we started seeing the unbounded errors for rss_stats for specific applications which use TCP rx0cp. It seems like vm_insert_pages() codepath does not sync rss_stats at all. This patch converts the rss_stats into percpu_counter to convert the error margin from (nr_threads * 64) to approximately (nr_cpus ^ 2). However this conversion enable us to get the accurate stats for situations where accuracy is more important than the cpu cost. This patch does not make such tradeoffs - we can just use percpu_counter_add_local() for the updates and percpu_counter_sum() (or percpu_counter_sync() + percpu_counter_read) for the readers. At the moment the readers are either procfs interface, oom_killer and memory reclaim which I think are not performance critical and should be ok with slow read. However I think we can make that change in a separate patch. Link: https://lkml.kernel.org/r/20221024052841.3291983-1-shakeelb@google.com Signed-off-by: Shakeel Butt Cc: Marek Szyprowski Signed-off-by: Andrew Morton include/linux/mm.h | 26 +++++---------- include/linux/mm_types.h | 7 ++-- include/linux/mm_types_task.h | 13 -------- include/linux/percpu_counter.h | 1 - include/linux/sched.h | 3 -- include/trace/events/kmem.h | 8 ++--- kernel/fork.c | 16 ++++++++- mm/memory.c | 73 +++++++----------------------------------- 8 files changed, 40 insertions(+), 107 deletions(-) commit eb3992e833d3a17f9b0a3e0371d0b1d3d566f740 Author: Sean Christopherson Date: Fri Sep 30 23:31:32 2022 +0000 KVM: VMX: Resume guest immediately when injecting #GP on ECREATE Resume the guest immediately when injecting a #GP on ECREATE due to an invalid enclave size, i.e. don't attempt ECREATE in the host. The #GP is a terminal fault, e.g. skipping the instruction if ECREATE is successful would result in KVM injecting #GP on the instruction following ECREATE. Fixes: 70210c044b4e ("KVM: VMX: Add SGX ENCLS[ECREATE] handler to enforce CPUID restrictions") Cc: stable@vger.kernel.org Cc: Kai Huang Signed-off-by: Sean Christopherson Reviewed-by: Kai Huang Link: https://lore.kernel.org/r/20220930233132.1723330-1-seanjc@google.com arch/x86/kvm/vmx/sgx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8c37df3d635eac64a8fbb4b26672fb881e0cb673 Author: Thomas Renninger Date: Wed Nov 23 12:18:10 2022 +0100 cpupower: rapl monitor - shows the used power consumption in uj for each rapl domain This CPU power monitor shows the power consumption as exposed by the powercap subsystem, cmp with: Documentation/power/powercap/powercap.rst cpupower monitor -m RAPL | RAPL CPU| pack | core | unco 0|6853926|967832|442381 8|6853926|967832|442381 1|6853926|967832|442381 9|6853926|967832|442381 Unfortunately RAPL domains cannot be directly mapped to the corresponding CPU socket/package, core it belongs to. Not sure this is possible at all with the current data exposed from the kernel. Still it can be worthful information for developers trying to optimize power consumption of workloads or their system in general. Signed-off-by: Thomas Renninger CC: Zhang Rui CC: Shuah Khan Signed-off-by: Shuah Khan tools/power/cpupower/Makefile | 1 + .../cpupower/utils/idle_monitor/cpupower-monitor.c | 7 +- .../cpupower/utils/idle_monitor/idle_monitors.def | 1 + .../cpupower/utils/idle_monitor/rapl_monitor.c | 148 +++++++++++++++++++++ 4 files changed, 154 insertions(+), 3 deletions(-) commit c2294c1496b7169d5b14c2fa27526ba35da9f5ac Author: Thomas Renninger Date: Wed Nov 23 12:18:09 2022 +0100 cpupower: Introduce powercap intel-rapl library and powercap-info command Read out powercap zone information via: cpupower powercap-info and show the zone hierarchy to the user: ./cpupower powercap-info Driver: intel-rapl Powercap domain hierarchy: Zone: package-0 (enabled) Power consumption can be monitored in micro Watts Zone: core (disabled) Power consumption can be monitored in micro Watts Zone: uncore (disabled) Power consumption can be monitored in micro Watts Zone: dram (disabled) Power consumption can be monitored in micro Watts There is a dummy -a option for powercap-info which can/should be used to show more detailed info later. Like that other args can be added easily later as well. A enable/disable option via powercap-set subcommand is also an enhancement for later. Also not all RAPL domains are shown. The func walking through RAPL subdomains is restricted and hardcoded to: "intel-rapl/intel-rapl:0" On my system above powercap domains map to: intel-rapl/intel-rapl:0 -> pack (age-0) intel-rapl/intel-rapl:0/intel-rapl:0:0 -> core intel-rapl/intel-rapl:0/intel-rapl:0:1 -> uncore Missing ones on my system are: intel-rapl-mmio/intel-rapl-mmio:0 -> pack (age-0) intel-rapl/intel-rapl:1 -> psys This could get enhanced in: struct powercap_zone *powercap_init_zones() and adopted to walk through all intel-rapl zones, but also to other powercap drivers like dtpm (Dynamic Thermal Power Management framework), cmp with: drivers/powercap/dtpm_* Signed-off-by: Thomas Renninger CC: Shuah Khan Signed-off-by: Shuah Khan tools/power/cpupower/Makefile | 14 +- tools/power/cpupower/lib/powercap.c | 290 ++++++++++++++++++++++ tools/power/cpupower/lib/powercap.h | 54 ++++ tools/power/cpupower/man/cpupower-powercap-info.1 | 25 ++ tools/power/cpupower/utils/builtin.h | 2 + tools/power/cpupower/utils/cpupower.c | 1 + tools/power/cpupower/utils/powercap-info.c | 117 +++++++++ 7 files changed, 499 insertions(+), 4 deletions(-) commit c67cae551f0df80421b5703ee56ff5e2fe9c4de6 Author: Alexei Starovoitov Date: Fri Nov 25 14:06:17 2022 -0800 bpf: Tighten ptr_to_btf_id checks. The networking programs typically don't require CAP_PERFMON, but through kfuncs like bpf_cast_to_kern_ctx() they can access memory through PTR_TO_BTF_ID. In such case enforce CAP_PERFMON. Also make sure that only GPL programs can access kernel data structures. All kfuncs require GPL already. Also remove allow_ptr_to_map_access. It's the same as allow_ptr_leaks and different name for the same check only causes confusion. Fixes: fd264ca02094 ("bpf: Add a kfunc to type cast from bpf uapi ctx to kernel ctx") Fixes: 50c6b8a9aea2 ("selftests/bpf: Add a test for btf_type_tag "percpu"") Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221125220617.26846-1-alexei.starovoitov@gmail.com include/linux/bpf.h | 5 ----- include/linux/bpf_verifier.h | 1 - kernel/bpf/verifier.c | 17 ++++++++++++++--- tools/testing/selftests/bpf/progs/btf_type_tag_percpu.c | 1 + tools/testing/selftests/bpf/verifier/map_ptr.c | 8 ++++---- 5 files changed, 19 insertions(+), 13 deletions(-) commit 4680b734e7291cd804c4ea2c377935a2332366b1 Author: Zurab Kargareteli Date: Tue Nov 29 00:01:27 2022 +0400 cpupower: Add Georgian translation Add Georgian language for cpupower Signed-off-by: Zurab Kargareteli Signed-off-by: Shuah Khan tools/power/cpupower/po/ka.po | 983 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 983 insertions(+) commit a5df8025f37a813f3f512ea3048ca505561b9c27 Author: Vincent Knecht Date: Wed Nov 30 15:15:25 2022 -0800 Input: msg2638 - only read linux,keycodes array if necessary The linux,keycodes property is optional. Fix the driver not probing when it's not specified. Fixes: c18ef50346f2 ("Input: msg2638 - add support for msg2138 key events") Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20221130210202.2069213-1-vincent.knecht@mailoo.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/msg2638.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit b2b80d9dd14cb5b70dc254bddbc4eea932694791 Author: Randy Dunlap Date: Wed Nov 30 15:01:07 2022 -0800 Input: wistron_btns - disable on UML The wistron_btns driver calls rtc_cmos_read(), which isn't available with UML builds, so disable this driver on UML. Prevents this build error: ld: drivers/input/misc/wistron_btns.o: in function `poll_bios': wistron_btns.c:(.text+0x4be): undefined reference to `rtc_cmos_read' Fixes: 0bbadafdc49d ("um: allow disabling NO_IOMEM") # v5.14+ Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20221130161604.1879-1-rdunlap@infradead.org Signed-off-by: Dmitry Torokhov drivers/input/misc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc19745ad0e46c1a069540973e376cff0130443c Merge: 617666521385 149b6fa228ed Author: Vlastimil Babka Date: Wed Nov 23 15:41:16 2022 +0100 Merge branch 'slub-tiny-v1r6' into slab/for-next Merge my series [1] to deprecate the SLOB allocator. - Renames CONFIG_SLOB to CONFIG_SLOB_DEPRECATED with deprecation notice. - The recommended replacement is CONFIG_SLUB, optionally with the new CONFIG_SLUB_TINY tweaks for systems with 16MB or less RAM. - Use cases that stopped working with CONFIG_SLUB_TINY instead of SLOB should be reported to linux-mm@kvack.org and slab maintainers, otherwise SLOB will be removed in few cycles. [1] https://lore.kernel.org/all/20221121171202.22080-1-vbabka@suse.cz/ commit 617666521385ba1a07f9388bc80d24941104e412 Merge: b5e72d27e39a 6cd6d33ca41f Author: Vlastimil Babka Date: Thu Dec 1 00:10:46 2022 +0100 Merge branch 'slab/for-6.2/kmalloc_redzone' into slab/for-next Add a new slub_kunit test for the extended kmalloc redzone check, by Feng Tang. Also prevent unwanted kfence interaction with all slub kunit tests. commit 149b6fa228eda1d191abc440af7162264d716d90 Author: Vlastimil Babka Date: Fri Nov 11 11:04:55 2022 +0100 mm, slob: rename CONFIG_SLOB to CONFIG_SLOB_DEPRECATED As explained in [1], we would like to remove SLOB if possible. - There are no known users that need its somewhat lower memory footprint so much that they cannot handle SLUB (after some modifications by the previous patches) instead. - It is an extra maintenance burden, and a number of features are incompatible with it. - It blocks the API improvement of allowing kfree() on objects allocated via kmem_cache_alloc(). As the first step, rename the CONFIG_SLOB option in the slab allocator configuration choice to CONFIG_SLOB_DEPRECATED. Add CONFIG_SLOB depending on CONFIG_SLOB_DEPRECATED as an internal option to avoid code churn. This will cause existing .config files and defconfigs with CONFIG_SLOB=y to silently switch to the default (and recommended replacement) SLUB, while still allowing SLOB to be configured by anyone that notices and needs it. But those should contact the slab maintainers and linux-mm@kvack.org as explained in the updated help. With no valid objections, the plan is to update the existing defconfigs to SLUB and remove SLOB in a few cycles. To make SLUB more suitable replacement for SLOB, a CONFIG_SLUB_TINY option was introduced to limit SLUB's memory overhead. There is a number of defconfigs specifying CONFIG_SLOB=y. As part of this patch, update them to select CONFIG_SLUB and CONFIG_SLUB_TINY. [1] https://lore.kernel.org/all/b35c3f82-f67b-2103-7d82-7a7ba7521439@suse.cz/ Cc: Russell King Cc: Aaro Koskinen Cc: Janusz Krzysztofik Cc: Tony Lindgren Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: Stafford Horne Cc: Yoshinori Sato Cc: Rich Felker Cc: Arnd Bergmann Cc: Josh Triplett Cc: Conor Dooley Cc: Damien Le Moal Cc: Christophe Leroy Cc: Geert Uytterhoeven Signed-off-by: Vlastimil Babka Acked-by: Aaro Koskinen # OMAP1 Reviewed-by: Damien Le Moal # riscv k210 Acked-by: Arnd Bergmann # arm Acked-by: Roman Gushchin Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter arch/arm/configs/clps711x_defconfig | 3 ++- arch/arm/configs/collie_defconfig | 3 ++- arch/arm/configs/multi_v4t_defconfig | 3 ++- arch/arm/configs/omap1_defconfig | 3 ++- arch/arm/configs/pxa_defconfig | 3 ++- arch/arm/configs/tct_hammer_defconfig | 3 ++- arch/arm/configs/xcep_defconfig | 3 ++- arch/openrisc/configs/or1ksim_defconfig | 3 ++- arch/openrisc/configs/simple_smp_defconfig | 3 ++- arch/riscv/configs/nommu_k210_defconfig | 3 ++- arch/riscv/configs/nommu_k210_sdcard_defconfig | 3 ++- arch/riscv/configs/nommu_virt_defconfig | 3 ++- arch/sh/configs/rsk7201_defconfig | 3 ++- arch/sh/configs/rsk7203_defconfig | 3 ++- arch/sh/configs/se7206_defconfig | 3 ++- arch/sh/configs/shmin_defconfig | 3 ++- arch/sh/configs/shx3_defconfig | 3 ++- kernel/configs/tiny.config | 5 +++-- mm/Kconfig | 17 +++++++++++++++-- 19 files changed, 52 insertions(+), 21 deletions(-) commit be784ba861b93c5cd2c0565c5819c290675b50be Author: Vlastimil Babka Date: Mon Nov 21 16:58:39 2022 +0100 mm, slub: don't aggressively inline with CONFIG_SLUB_TINY SLUB fastpaths use __always_inline to avoid function calls. With CONFIG_SLUB_TINY we would rather save the memory. Add a __fastpath_inline macro that's __always_inline normally but empty with CONFIG_SLUB_TINY. bloat-o-meter results on x86_64 mm/slub.o: add/remove: 3/1 grow/shrink: 1/8 up/down: 865/-1784 (-919) Function old new delta kmem_cache_free 20 281 +261 slab_alloc_node.isra - 245 +245 slab_free.constprop.isra - 231 +231 __kmem_cache_alloc_lru.isra - 128 +128 __kmem_cache_release 88 83 -5 __kmem_cache_create 1446 1436 -10 __kmem_cache_free 271 142 -129 kmem_cache_alloc_node 330 127 -203 kmem_cache_free_bulk.part 826 613 -213 __kmem_cache_alloc_node 230 10 -220 kmem_cache_alloc_lru 325 12 -313 kmem_cache_alloc 325 10 -315 kmem_cache_free.part 376 - -376 Total: Before=26103, After=25184, chg -3.52% Signed-off-by: Vlastimil Babka Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> mm/slub.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 0af8489b0216fa1dd83e264bef8063f2632633d7 Author: Vlastimil Babka Date: Tue Nov 15 18:14:31 2022 +0100 mm, slub: remove percpu slabs with CONFIG_SLUB_TINY SLUB gets most of its scalability by percpu slabs. However for CONFIG_SLUB_TINY the goal is minimal memory overhead, not scalability. Thus, #ifdef out the whole kmem_cache_cpu percpu structure and associated code. Additionally to the slab page savings, this reduces percpu allocator usage, and code size. This change builds on recent commit c7323a5ad078 ("mm/slub: restrict sysfs validation to debug caches and make it safe"), as caches with enabled debugging also avoid percpu slabs and all allocations and freeing ends up working with the partial list. With a bit more refactoring by the preceding patches, use the same code paths with CONFIG_SLUB_TINY. Signed-off-by: Vlastimil Babka Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter include/linux/slub_def.h | 4 ++ mm/slub.c | 102 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 103 insertions(+), 3 deletions(-) commit 56d5a2b9ba85a390473e86b4fe4697560242a248 Author: Vlastimil Babka Date: Mon Nov 21 16:23:50 2022 +0100 mm, slub: split out allocations from pre/post hooks In the following patch we want to introduce CONFIG_SLUB_TINY allocation paths that don't use the percpu slab. To prepare, refactor the allocation functions: Split out __slab_alloc_node() from slab_alloc_node() where the former does the actual allocation and the latter calls the pre/post hooks. Analogically, split out __kmem_cache_alloc_bulk() from kmem_cache_alloc_bulk(). Signed-off-by: Vlastimil Babka Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> mm/slub.c | 130 ++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 80 insertions(+), 50 deletions(-) commit 996c060e2bb90e5caef42849846b56da21ea88d9 Author: Daniel Borkmann Date: Wed Nov 30 23:20:49 2022 +0100 selftests/bpf: Add bench test to arm64 and s390x denylist BPF CI fails for arm64 and s390x each with the following result: [...] All error logs: serial_test_kprobe_multi_bench_attach:PASS:get_syms 0 nsec serial_test_kprobe_multi_bench_attach:PASS:kprobe_multi_empty__open_and_load 0 nsec libbpf: prog 'test_kprobe_empty': failed to attach: Operation not supported serial_test_kprobe_multi_bench_attach:FAIL:bpf_program__attach_kprobe_multi_opts unexpected error: -95 #92 kprobe_multi_bench_attach:FAIL [...] Add the test to the deny list. Fixes: 5b6c7e5c4434 ("selftests/bpf: Add attach bench test") Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/DENYLIST.aarch64 | 1 + tools/testing/selftests/bpf/DENYLIST.s390x | 1 + 2 files changed, 2 insertions(+) commit 6cd6d33ca41ff4af21bc25c331ab34b50b4a9c8c Author: Feng Tang Date: Wed Nov 30 16:54:51 2022 +0800 mm/slub, kunit: Add a test case for kmalloc redzone check kmalloc redzone check for slub has been merged, and it's better to add a kunit case for it, which is inspired by a real-world case as described in commit 120ee599b5bf ("staging: octeon-usb: prevent memory corruption"): " octeon-hcd will crash the kernel when SLOB is used. This usually happens after the 18-byte control transfer when a device descriptor is read. The DMA engine is always transferring full 32-bit words and if the transfer is shorter, some random garbage appears after the buffer. The problem is not visible with SLUB since it rounds up the allocations to word boundary, and the extra bytes will go undetected. " To avoid interrupting the normal functioning of kmalloc caches, a kmem_cache mimicing kmalloc cache is created with similar flags, and kmalloc_trace() is used to really test the orig_size and redzone setup. Suggested-by: Vlastimil Babka Signed-off-by: Feng Tang Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka lib/slub_kunit.c | 22 ++++++++++++++++++++++ mm/slab.h | 4 +++- 2 files changed, 25 insertions(+), 1 deletion(-) commit 9cd6ffa60256e931503d347006049b8bef508203 Author: SeongJae Park Date: Tue Oct 25 17:36:50 2022 +0000 selftests/damon: add tests for DAMON_LRU_SORT's enabled parameter Add simple test cases for DAMON_LRU_SORT's 'enabled' parameter. Those tests are focusing on the synchronous behavior of DAMON_RECLAIM enabling and disabling. Link: https://lkml.kernel.org/r/20221025173650.90624-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/damon/Makefile | 2 +- tools/testing/selftests/damon/lru_sort.sh | 41 +++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) commit 7a034fbba3361e94956431d17660d7c5674d13c3 Author: SeongJae Park Date: Tue Oct 25 17:36:49 2022 +0000 mm/damon/lru_sort: enable and disable synchronously Writing a value to DAMON_RECLAIM's 'enabled' parameter turns on or off DAMON in an ansychronous way. This means the parameter cannot be used to read the current status of DAMON_RECLAIM. 'kdamond_pid' parameter should be used instead for the purpose. The documentation is easy to be read as it works in a synchronous way, so it is a little bit confusing. It also makes the user space tooling dirty. There's no real reason to have the asynchronous behavior, though. Simply make the parameter works synchronously, rather than updating the document. Link: https://lkml.kernel.org/r/20221025173650.90624-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton mm/damon/lru_sort.c | 51 ++++++++++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 29 deletions(-) commit 4cc0ee7787d7dc595752a8de2e073efa68f7c965 Author: SeongJae Park Date: Tue Oct 25 17:36:48 2022 +0000 selftests/damon: add tests for DAMON_RECLAIM's enabled parameter Add simple test cases for DAMON_RECLAIM's 'enabled' parameter. Those tests are focusing on the synchronous behavior of DAMON_RECLAIM enabling and disabling. Link: https://lkml.kernel.org/r/20221025173650.90624-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/damon/Makefile | 1 + tools/testing/selftests/damon/reclaim.sh | 42 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit 04e98764befa371836a78b2b489e8b931a3a9e9a Author: SeongJae Park Date: Tue Oct 25 17:36:47 2022 +0000 mm/damon/reclaim: enable and disable synchronously Patch series "mm/damon/reclaim,lru_sort: enable/disable synchronously". Writing a value to DAMON_RECLAIM and DAMON_LRU_SORT's 'enabled' parameters turns on or off DAMON in an ansychronous way. This means the parameter cannot be used to read the current status of them. 'kdamond_pid' parameter should be used instead for the purpose. The documentation is easy to be read as it works in a synchronous way, so it is a little bit confusing. It also makes the user space tooling dirty. There's no real reason to have the asynchronous behavior, though. Simply make the parameter works synchronously, rather than updating the document. The first and second patches changes the behavior of the 'enabled' parameter for DAMON_RECLAIM and adds a selftest for the changed behavior, respectively. Following two patches make the same changes for DAMON_LRU_SORT. This patch (of 4): Writing a value to DAMON_RECLAIM's 'enabled' parameter turns on or off DAMON in an ansychronous way. This means the parameter cannot be used to read the current status of DAMON_RECLAIM. 'kdamond_pid' parameter should be used instead for the purpose. The documentation is easy to be read as it works in a synchronous way, so it is a little bit confusing. It also makes the user space tooling dirty. There's no real reason to have the asynchronous behavior, though. Simply make the parameter works synchronously, rather than updating the document. Link: https://lkml.kernel.org/r/20221025173650.90624-1-sj@kernel.org Link: https://lkml.kernel.org/r/20221025173650.90624-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton mm/damon/reclaim.c | 53 +++++++++++++++++++++++------------------------------ 1 file changed, 23 insertions(+), 30 deletions(-) commit b0d3dbd1b98660ec2154fccbd21c13916c967c05 Author: SeongJae Park Date: Wed Oct 26 22:59:43 2022 +0000 mm/damon/{reclaim,lru_sort}: remove unnecessarily included headers Some headers that 'reclaim.c' and 'lru_sort.c' are including are unnecessary now owing to previous cleanups and refactorings. Remove those. Link: https://lkml.kernel.org/r/20221026225943.100429-13-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/lru_sort.c | 2 -- mm/damon/reclaim.c | 2 -- 2 files changed, 4 deletions(-) commit 7ae2c17f53d5054d1fe5c1a103ad46068034617d Author: SeongJae Park Date: Wed Oct 26 22:59:42 2022 +0000 mm/damon/modules: deduplicate init steps for DAMON context setup DAMON_RECLAIM and DAMON_LRU_SORT has duplicated code for DAMON context and target initializations. Deduplicate the part by implementing a function for the initialization in 'modules-common.c' and using it. Link: https://lkml.kernel.org/r/20221026225943.100429-12-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/Makefile | 4 ++-- mm/damon/lru_sort.c | 17 +++-------------- mm/damon/modules-common.c | 42 ++++++++++++++++++++++++++++++++++++++++++ mm/damon/modules-common.h | 3 +++ mm/damon/reclaim.c | 17 +++-------------- 5 files changed, 53 insertions(+), 30 deletions(-) commit c8e7b4d0ba348a8ef14956a80c780f152f433764 Author: SeongJae Park Date: Wed Oct 26 22:59:41 2022 +0000 mm/damon/sysfs: split out schemes directory implementation to separate file DAMON sysfs interface for 'schemes' directory is implemented using about one thousand lines of code. It has no strong dependency with other parts of its file, so split it out to another file for better code management. Link: https://lkml.kernel.org/r/20221026225943.100429-11-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/Makefile | 2 +- mm/damon/sysfs-common.h | 22 + mm/damon/sysfs-schemes.c | 1068 ++++++++++++++++++++++++++++++++++++++++++++++ mm/damon/sysfs.c | 1064 --------------------------------------------- 4 files changed, 1091 insertions(+), 1065 deletions(-) commit 4acd715ff57fd05a481c64d074db68f2cf5711aa Author: SeongJae Park Date: Wed Oct 26 22:59:40 2022 +0000 mm/damon/sysfs: split out kdamond-independent schemes stats update logic into a new function 'damon_sysfs_schemes_update_stats()' is coupled with both damon_sysfs_kdamond and damon_sysfs_schemes. It's a wide range of types dependency. It makes splitting the logics a little bit distracting. Split the function so that each function is coupled with smaller range of types. Link: https://lkml.kernel.org/r/20221026225943.100429-10-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/sysfs.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit d332fe11debe69fee3de4c2d84fa0b6649678ad2 Author: SeongJae Park Date: Wed Oct 26 22:59:39 2022 +0000 mm/damon/sysfs: move unsigned long range directory to common module The implementation of unsigned long type range directories can be reused by multiple DAMON sysfs directories including those for DAMON-based Operation Schemes and the range of number of monitoring regions. Move the code into the files for DAMON sysfs common logics. Link: https://lkml.kernel.org/r/20221026225943.100429-9-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/sysfs-common.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++ mm/damon/sysfs-common.h | 13 +++++++ mm/damon/sysfs.c | 100 ------------------------------------------------ 3 files changed, 109 insertions(+), 100 deletions(-) commit 39240595917ec0c4f71d7b9dd7909790715968b5 Author: SeongJae Park Date: Wed Oct 26 22:59:38 2022 +0000 mm/damon/sysfs: move sysfs_lock to common module DAMON sysfs interface is implemented in a single file, sysfs.c, which has about 2,800 lines of code. As the interface is hierarchical and some of the code can be reused by different hierarchies, it would make more sense to split out the implementation into common parts and different parts in multiple files. As the beginning of the work, create files for common code and move the global mutex for directories modifications protection into the new file. Link: https://lkml.kernel.org/r/20221026225943.100429-8-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/Makefile | 2 +- mm/damon/sysfs-common.c | 11 +++++++++++ mm/damon/sysfs-common.h | 11 +++++++++++ mm/damon/sysfs.c | 4 +--- 4 files changed, 24 insertions(+), 4 deletions(-) commit 1f71981408ef5696ad8544f282d336d4fc60a807 Author: SeongJae Park Date: Wed Oct 26 22:59:37 2022 +0000 mm/damon/sysfs: remove parameters of damon_sysfs_region_alloc() 'damon_sysfs_region_alloc()' is always called with zero-filled 'struct damon_addr_range', because the start and end addresses should set by users. Remove unnecessary parameters of the function and simplify the body by using 'kzalloc()'. Link: https://lkml.kernel.org/r/20221026225943.100429-7-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/sysfs.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 789a230613c8dd14bdd41653de0c22783726276f Author: SeongJae Park Date: Wed Oct 26 22:59:36 2022 +0000 mm/damon/sysfs: use damon_addr_range for region's start and end values DAMON has a struct for each address range but DAMON sysfs interface is using the low type (unsigned long) for storing the start and end addresses of regions. Use the dedicated struct for better type safety. Link: https://lkml.kernel.org/r/20221026225943.100429-6-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/sysfs.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit 898810e5ca54691f4e173f5ffc92bbce0335bc69 Author: SeongJae Park Date: Wed Oct 26 22:59:35 2022 +0000 mm/damon/core: split out scheme quota adjustment logic into a new function DAMOS quota adjustment logic in 'kdamond_apply_schemes()', has some amount of code, and the logic is not so straightforward. Split it out to a new function for better readability. Link: https://lkml.kernel.org/r/20221026225943.100429-5-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/core.c | 91 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 43 deletions(-) commit d1cbbf621fc25950938be74a228ef518d05d93a1 Author: SeongJae Park Date: Wed Oct 26 22:59:34 2022 +0000 mm/damon/core: split out scheme stat update logic into a new function The function for applying a given DAMON scheme action to a given DAMON region, 'damos_apply_scheme()' is not quite short. Make it better to read by splitting out the stat update logic into a new function. Link: https://lkml.kernel.org/r/20221026225943.100429-4-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/core.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit e63a30c51f8400915db401c05d3c4db6743857e8 Author: SeongJae Park Date: Wed Oct 26 22:59:33 2022 +0000 mm/damon/core: split damos application logic into a new function The DAMOS action applying function, 'damon_do_apply_schemes()', is still long and not easy to read. Split out the code for applying a single action to a single region into a new function for better readability. Link: https://lkml.kernel.org/r/20221026225943.100429-3-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/core.c | 73 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 34 deletions(-) commit 2ea3498980f5e6f3001f2984b0b92736bf1b78cb Author: SeongJae Park Date: Wed Oct 26 22:59:32 2022 +0000 mm/damon/core: split out DAMOS-charged region skip logic into a new function Patch series "mm/damon: cleanup and refactoring code", v2. This patchset cleans up and refactors a range of DAMON code including the core, DAMON sysfs interface, and DAMON modules, for better readability and convenient future feature implementations. In detail, this patchset splits unnecessarily long and complex functions in core into smaller functions (patches 1-4). Then, it cleans up the DAMON sysfs interface by using more type-safe code (patch 5) and removing unnecessary function parameters (patch 6). Further, it refactor the code by distributing the code into multiple files (patches 7-10). Last two patches (patches 11 and 12) deduplicates and remove unnecessary header inclusion in DAMON modules (reclaim and lru_sort). This patch (of 12): The DAMOS action applying function, 'damon_do_apply_schemes()', is quite long and not so simple. Split out the already quota-charged region skip code, which is not a small amount of simple code, into a new function with some comments for better readability. Link: https://lkml.kernel.org/r/20221026225943.100429-1-sj@kernel.org Link: https://lkml.kernel.org/r/20221026225943.100429-2-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/core.c | 96 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 65 insertions(+), 31 deletions(-) commit 98519195e3d491532d61214e6c18f79e44c14a5f Author: Mika Penttilä Date: Wed Nov 30 14:58:16 2022 -0800 MAINTAINERS: change sis_i2c maintainer email address Signed-off-by: Mika Penttilä Link: https://lore.kernel.org/r/20221020061948.10221-1-mpenttil@redhat.com Signed-off-by: Dmitry Torokhov MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a38358c934f66bdff12db762998b88038d7bc44b Merge: ea0ffd0c08d0 1d351f189434 Author: Andrew Morton Date: Wed Nov 30 14:58:42 2022 -0800 Merge branch 'mm-hotfixes-stable' into mm-stable commit 4d9dd4b0ce88072ca2368dfdd5c92bc078366e1e Author: Feng Tang Date: Wed Nov 30 16:54:50 2022 +0800 mm/slub, kunit: add SLAB_SKIP_KFENCE flag for cache creation When kfence is enabled, the buffer allocated from the test case could be from a kfence pool, and the operation could be also caught and reported by kfence first, causing the case to fail. With default kfence setting, this is very difficult to be triggered. By changing CONFIG_KFENCE_NUM_OBJECTS from 255 to 16383, and CONFIG_KFENCE_SAMPLE_INTERVAL from 100 to 5, the allocation from kfence did hit 7 times in different slub_kunit cases out of 900 times of boot test. To avoid this, initially we tried is_kfence_address() to check this and repeated allocation till finding a non-kfence address. Vlastimil Babka suggested SLAB_SKIP_KFENCE flag could be used to achieve this, and better add a wrapper function for simplifying cache creation. Signed-off-by: Feng Tang Reviewed-by: Marco Elver Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka lib/slub_kunit.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 7d7cfb48d81353e826493d24c7cec7360950968f Author: Florian Westphal Date: Tue Nov 22 16:00:09 2022 +0100 netfilter: conntrack: set icmpv6 redirects as RELATED icmp conntrack will set icmp redirects as RELATED, but icmpv6 will not do this. For icmpv6, only icmp errors (code <= 128) are examined for RELATED state. ICMPV6 Redirects are part of neighbour discovery mechanism, those are handled by marking a selected subset (e.g. neighbour solicitations) as UNTRACKED, but not REDIRECT -- they will thus be flagged as INVALID. Add minimal support for REDIRECTs. No parsing of neighbour options is added for simplicity, so this will only check that we have the embeeded original header (ND_OPT_REDIRECT_HDR), and then attempt to do a flow lookup for this tuple. Also extend the existing test case to cover redirects. Fixes: 9fb9cbb1082d ("[NETFILTER]: Add nf_conntrack subsystem.") Reported-by: Eric Garver Link: https://github.com/firewalld/firewalld/issues/1046 Signed-off-by: Florian Westphal Acked-by: Eric Garver Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_icmpv6.c | 53 ++++++++++++++++++++++ .../selftests/netfilter/conntrack_icmp_related.sh | 36 ++++++++++++++- 2 files changed, 87 insertions(+), 2 deletions(-) commit f8186bf65ae6a4ce96d5cf52c2c9481c0e2193ce Author: Andrii Nakryiko Date: Wed Nov 30 12:00:13 2022 -0800 selftests/bpf: Make sure enum-less bpf_enable_stats() API works in C++ mode Just a simple test to make sure we don't introduce unwanted compiler warnings and API still supports passing enums as input argument. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221130200013.2997831-2-andrii@kernel.org tools/testing/selftests/bpf/test_cpp.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit b42693415b86f608049cf1b4870adc1dc65e58b0 Author: Andrii Nakryiko Date: Wed Nov 30 12:00:12 2022 -0800 libbpf: Avoid enum forward-declarations in public API in C++ mode C++ enum forward declarations are fundamentally not compatible with pure C enum definitions, and so libbpf's use of `enum bpf_stats_type;` forward declaration in libbpf/bpf.h public API header is causing C++ compilation issues. More details can be found in [0], but it comes down to C++ supporting enum forward declaration only with explicitly specified backing type: enum bpf_stats_type: int; In C (and I believe it's a GCC extension also), such forward declaration is simply: enum bpf_stats_type; Further, in Linux UAPI this enum is defined in pure C way: enum bpf_stats_type { BPF_STATS_RUN_TIME = 0; } And even though in both cases backing type is int, which can be confirmed by looking at DWARF information, for C++ compiler actual enum definition and forward declaration are incompatible. To eliminate this problem, for C++ mode define input argument as int, which makes enum unnecessary in libbpf public header. This solves the issue and as demonstrated by next patch doesn't cause any unwanted compiler warnings, at least with default warnings setting. [0] https://stackoverflow.com/questions/42766839/c11-enum-forward-causes-underlying-type-mismatch [1] Closes: https://github.com/libbpf/libbpf/issues/249 Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221130200013.2997831-1-andrii@kernel.org tools/lib/bpf/bpf.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 443f216448ab5ddd1b4d08ad6c9b69628ac25adf Author: Martin KaFai Lau Date: Mon Nov 28 23:09:00 2022 -0800 selftests/bpf: Avoid pinning prog when attaching to tc ingress in btf_skc_cls_ingress This patch removes the need to pin prog when attaching to tc ingress in the btf_skc_cls_ingress test. Instead, directly use the bpf_tc_hook_create() and bpf_tc_attach(). The qdisc clsact will go away together with the netns, so no need to bpf_tc_hook_destroy(). Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221129070900.3142427-8-martin.lau@linux.dev .../selftests/bpf/prog_tests/btf_skc_cls_ingress.c | 25 +++++++++------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 9b6a7773973707bad13f6c8b2a27e93ef4d46182 Author: Martin KaFai Lau Date: Mon Nov 28 23:08:59 2022 -0800 selftests/bpf: Remove serial from tests using {open,close}_netns After removing the mount/umount dance from {open,close}_netns() in the pervious patch, "serial_" can be removed from the tests using {open,close}_netns(). Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221129070900.3142427-7-martin.lau@linux.dev tools/testing/selftests/bpf/prog_tests/empty_skb.c | 2 +- tools/testing/selftests/bpf/prog_tests/tc_redirect.c | 2 +- tools/testing/selftests/bpf/prog_tests/test_tunnel.c | 2 +- tools/testing/selftests/bpf/prog_tests/xdp_do_redirect.c | 2 +- tools/testing/selftests/bpf/prog_tests/xdp_synproxy.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 3084097c369c57c9bbd81e5bf47b36b6b27390fc Author: Martin KaFai Lau Date: Mon Nov 28 23:08:58 2022 -0800 selftests/bpf: Remove the "/sys" mount and umount dance in {open,close}_netns The previous patches have removed the need to do the mount and umount dance when switching netns. In particular: * Avoid remounting /sys/fs/bpf to have a clean start * Avoid remounting /sys to get a ifindex of a particular netns This patch can finally remove the mount and umount dance in {open,close}_netns which is unnecessarily complicated and error-prone. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221129070900.3142427-6-martin.lau@linux.dev tools/testing/selftests/bpf/network_helpers.c | 51 +++------------------------ 1 file changed, 5 insertions(+), 46 deletions(-) commit 5dc42a7fc2866a56bc5616babace0a252458fe01 Author: Martin KaFai Lau Date: Mon Nov 28 23:08:57 2022 -0800 selftests/bpf: Avoid pinning bpf prog in the netns_load_bpf() callers This patch removes the need to pin prog in the remaining tests in tc_redirect.c by directly using the bpf_tc_hook_create() and bpf_tc_attach(). The clsact qdisc will go away together with the test netns, so no need to do bpf_tc_hook_destroy(). Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221129070900.3142427-5-martin.lau@linux.dev .../testing/selftests/bpf/prog_tests/tc_redirect.c | 83 +++++++--------------- 1 file changed, 27 insertions(+), 56 deletions(-) commit f1b73577bb3c5b23872fde2907386635ea726d6d Author: Martin KaFai Lau Date: Mon Nov 28 23:08:56 2022 -0800 selftests/bpf: Avoid pinning bpf prog in the tc_redirect_peer_l3 test This patch removes the need to pin prog in the tc_redirect_peer_l3 test by directly using the bpf_tc_hook_create() and bpf_tc_attach(). The clsact qdisc will go away together with the test netns, so no need to do bpf_tc_hook_destroy(). Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221129070900.3142427-4-martin.lau@linux.dev .../testing/selftests/bpf/prog_tests/tc_redirect.c | 32 ++++++++-------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit 57d0863f1d2812da543ef49172f60d6aa14bedcf Author: Martin KaFai Lau Date: Mon Nov 28 23:08:55 2022 -0800 selftests/bpf: Avoid pinning bpf prog in the tc_redirect_dtime test This patch removes the need to pin prog in the tc_redirect_dtime test by directly using the bpf_tc_hook_create() and bpf_tc_attach(). The clsact qdisc will go away together with the test netns, so no need to do bpf_tc_hook_destroy(). Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221129070900.3142427-3-martin.lau@linux.dev .../testing/selftests/bpf/prog_tests/tc_redirect.c | 149 ++++++++++++++------- 1 file changed, 100 insertions(+), 49 deletions(-) commit 052c82dcdcbb6eb89d0967c309c010cd293076d0 Author: Martin KaFai Lau Date: Mon Nov 28 23:08:54 2022 -0800 selftests/bpf: Use if_nametoindex instead of reading the /sys/net/class/*/ifindex When switching netns, the setns_by_fd() is doing dances in mount/umounting the /sys directories. One reason is the tc_redirect.c test is depending on the /sys/net/class/*/ifindex instead of using the if_nametoindex(). if_nametoindex() uses ioctl() to get the ifindex. This patch is to move all /sys/net/class/*/ifindex usages to if_nametoindex(). The current code checks ifindex >= 0 which is incorrect. ifindex > 0 should be checked instead. This patch also stores ifindex_veth_src and ifindex_veth_dst since the latter patch will need them. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221129070900.3142427-2-martin.lau@linux.dev .../testing/selftests/bpf/prog_tests/tc_redirect.c | 46 +++++++++------------- 1 file changed, 18 insertions(+), 28 deletions(-) commit 92a34c461719eb4a3f95353bb7b27a3238eb7478 Author: Pankaj Raghav Date: Wed Nov 30 13:30:03 2022 +0100 virtio-blk: replace ida_simple[get|remove] with ida_[alloc_range|free] ida_simple[get|remove] are deprecated, and are just wrappers to ida_[alloc_range|free]. Replace ida_simple[get|remove] with their corresponding counterparts. No functional changes. Signed-off-by: Pankaj Raghav Reviewed-by: Stefan Hajnoczi Link: https://lore.kernel.org/r/20221130123001.25473-1-p.raghav@samsung.com Signed-off-by: Jens Axboe drivers/block/virtio_blk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 87492c06e68d802852c7ba76b4d3fde50807d72a Merge: 2c3cdf5a8e06 ceb1c8c9b8aa 9d40c84cf5bc f733615e39aa 1324d95b1c22 f7dd16486572 Author: Paul E. McKenney Date: Wed Nov 30 13:20:05 2022 -0800 Merge branches 'doc.2022.10.20a', 'fixes.2022.10.21a', 'lazy.2022.11.30a', 'srcunmisafe.2022.11.09a', 'torture.2022.10.18c' and 'torturescript.2022.10.20a' into HEAD doc.2022.10.20a: Documentation updates. fixes.2022.10.21a: Miscellaneous fixes. lazy.2022.11.30a: Lazy call_rcu() and NOCB updates. srcunmisafe.2022.11.09a: NMI-safe SRCU readers. torture.2022.10.18c: Torture-test updates. torturescript.2022.10.20a: Torture-test scripting updates. commit 9d40c84cf5bcb5b1d124921ded2056d76be7640d Author: Eric Dumazet Date: Fri Nov 18 19:19:09 2022 +0000 net: devinet: Reduce refcount before grace period Currently, the inetdev_destroy() function waits for an RCU grace period before decrementing the refcount and freeing memory. This causes a delay with a new RCU configuration that tries to save power, which results in the network interface disappearing later than expected. The resulting delay causes test failures on ChromeOS. Refactor the code such that the refcount is freed before the grace period and memory is freed after. With this a ChromeOS network test passes that does 'ip netns del' and polls for an interface disappearing, now passes. Reported-by: Joel Fernandes (Google) Signed-off-by: Eric Dumazet Signed-off-by: Joel Fernandes (Google) Cc: David Ahern Cc: "David S. Miller" Cc: Hideaki YOSHIFUJI Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Signed-off-by: Paul E. McKenney net/ipv4/devinet.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 483c26ff63f42e8898ed43aca0b9953bc91f0cd4 Author: Joel Fernandes (Google) Date: Fri Nov 18 19:19:08 2022 +0000 net: Use call_rcu_hurry() for dst_release() In a networking test on ChromeOS, kernels built with the new CONFIG_RCU_LAZY=y Kconfig option fail a networking test in the teardown phase. This failure may be reproduced as follows: ip netns del The CONFIG_RCU_LAZY=y Kconfig option was introduced by earlier commits in this series for the benefit of certain battery-powered systems. This Kconfig option causes call_rcu() to delay its callbacks in order to batch them. This means that a given RCU grace period covers more callbacks, thus reducing the number of grace periods, in turn reducing the amount of energy consumed, which increases battery lifetime which can be a very good thing. This is not a subtle effect: In some important use cases, the battery lifetime is increased by more than 10%. This CONFIG_RCU_LAZY=y option is available only for CPUs that offload callbacks, for example, CPUs mentioned in the rcu_nocbs kernel boot parameter passed to kernels built with CONFIG_RCU_NOCB_CPU=y. Delaying callbacks is normally not a problem because most callbacks do nothing but free memory. If the system is short on memory, a shrinker will kick all currently queued lazy callbacks out of their laziness, thus freeing their memory in short order. Similarly, the rcu_barrier() function, which blocks until all currently queued callbacks are invoked, will also kick lazy callbacks, thus enabling rcu_barrier() to complete in a timely manner. However, there are some cases where laziness is not a good option. For example, synchronize_rcu() invokes call_rcu(), and blocks until the newly queued callback is invoked. It would not be a good for synchronize_rcu() to block for ten seconds, even on an idle system. Therefore, synchronize_rcu() invokes call_rcu_hurry() instead of call_rcu(). The arrival of a non-lazy call_rcu_hurry() callback on a given CPU kicks any lazy callbacks that might be already queued on that CPU. After all, if there is going to be a grace period, all callbacks might as well get full benefit from it. Yes, this could be done the other way around by creating a call_rcu_lazy(), but earlier experience with this approach and feedback at the 2022 Linux Plumbers Conference shifted the approach to call_rcu() being lazy with call_rcu_hurry() for the few places where laziness is inappropriate. Returning to the test failure, use of ftrace showed that this failure cause caused by the aadded delays due to this new lazy behavior of call_rcu() in kernels built with CONFIG_RCU_LAZY=y. Therefore, make dst_release() use call_rcu_hurry() in order to revert to the old test-failure-free behavior. [ paulmck: Apply s/call_rcu_flush/call_rcu_hurry/ feedback from Tejun Heo. ] Signed-off-by: Joel Fernandes (Google) Cc: David Ahern Cc: "David S. Miller" Cc: Hideaki YOSHIFUJI Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Reviewed-by: Eric Dumazet Signed-off-by: Paul E. McKenney net/core/dst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7e30c0e9a5f95b7f74e6272d9c75fd65c897721 Author: Uladzislau Rezki Date: Sun Oct 16 16:23:03 2022 +0000 workqueue: Make queue_rcu_work() use call_rcu_hurry() Earlier commits in this series allow battery-powered systems to build their kernels with the default-disabled CONFIG_RCU_LAZY=y Kconfig option. This Kconfig option causes call_rcu() to delay its callbacks in order to batch them. This means that a given RCU grace period covers more callbacks, thus reducing the number of grace periods, in turn reducing the amount of energy consumed, which increases battery lifetime which can be a very good thing. This is not a subtle effect: In some important use cases, the battery lifetime is increased by more than 10%. This CONFIG_RCU_LAZY=y option is available only for CPUs that offload callbacks, for example, CPUs mentioned in the rcu_nocbs kernel boot parameter passed to kernels built with CONFIG_RCU_NOCB_CPU=y. Delaying callbacks is normally not a problem because most callbacks do nothing but free memory. If the system is short on memory, a shrinker will kick all currently queued lazy callbacks out of their laziness, thus freeing their memory in short order. Similarly, the rcu_barrier() function, which blocks until all currently queued callbacks are invoked, will also kick lazy callbacks, thus enabling rcu_barrier() to complete in a timely manner. However, there are some cases where laziness is not a good option. For example, synchronize_rcu() invokes call_rcu(), and blocks until the newly queued callback is invoked. It would not be a good for synchronize_rcu() to block for ten seconds, even on an idle system. Therefore, synchronize_rcu() invokes call_rcu_hurry() instead of call_rcu(). The arrival of a non-lazy call_rcu_hurry() callback on a given CPU kicks any lazy callbacks that might be already queued on that CPU. After all, if there is going to be a grace period, all callbacks might as well get full benefit from it. Yes, this could be done the other way around by creating a call_rcu_lazy(), but earlier experience with this approach and feedback at the 2022 Linux Plumbers Conference shifted the approach to call_rcu() being lazy with call_rcu_hurry() for the few places where laziness is inappropriate. And another call_rcu() instance that cannot be lazy is the one in queue_rcu_work(), given that callers to queue_rcu_work() are not necessarily OK with long delays. Therefore, make queue_rcu_work() use call_rcu_hurry() in order to revert to the old behavior. [ paulmck: Apply s/call_rcu_flush/call_rcu_hurry/ feedback from Tejun Heo. ] Signed-off-by: Uladzislau Rezki Signed-off-by: Joel Fernandes (Google) Acked-by: Tejun Heo Cc: Lai Jiangshan Signed-off-by: Paul E. McKenney kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 343a72e5e37d380b70534fae3acd7e5e39adb769 Author: Joel Fernandes (Google) Date: Sun Oct 16 16:22:58 2022 +0000 percpu-refcount: Use call_rcu_hurry() for atomic switch Earlier commits in this series allow battery-powered systems to build their kernels with the default-disabled CONFIG_RCU_LAZY=y Kconfig option. This Kconfig option causes call_rcu() to delay its callbacks in order to batch callbacks. This means that a given RCU grace period covers more callbacks, thus reducing the number of grace periods, in turn reducing the amount of energy consumed, which increases battery lifetime which can be a very good thing. This is not a subtle effect: In some important use cases, the battery lifetime is increased by more than 10%. This CONFIG_RCU_LAZY=y option is available only for CPUs that offload callbacks, for example, CPUs mentioned in the rcu_nocbs kernel boot parameter passed to kernels built with CONFIG_RCU_NOCB_CPU=y. Delaying callbacks is normally not a problem because most callbacks do nothing but free memory. If the system is short on memory, a shrinker will kick all currently queued lazy callbacks out of their laziness, thus freeing their memory in short order. Similarly, the rcu_barrier() function, which blocks until all currently queued callbacks are invoked, will also kick lazy callbacks, thus enabling rcu_barrier() to complete in a timely manner. However, there are some cases where laziness is not a good option. For example, synchronize_rcu() invokes call_rcu(), and blocks until the newly queued callback is invoked. It would not be a good for synchronize_rcu() to block for ten seconds, even on an idle system. Therefore, synchronize_rcu() invokes call_rcu_hurry() instead of call_rcu(). The arrival of a non-lazy call_rcu_hurry() callback on a given CPU kicks any lazy callbacks that might be already queued on that CPU. After all, if there is going to be a grace period, all callbacks might as well get full benefit from it. Yes, this could be done the other way around by creating a call_rcu_lazy(), but earlier experience with this approach and feedback at the 2022 Linux Plumbers Conference shifted the approach to call_rcu() being lazy with call_rcu_hurry() for the few places where laziness is inappropriate. And another call_rcu() instance that cannot be lazy is the one on the percpu refcounter's "per-CPU to atomic switch" code path, which uses RCU when switching to atomic mode. The enqueued callback wakes up waiters waiting in the percpu_ref_switch_waitq. Allowing this callback to be lazy would result in unacceptable slowdowns for users of per-CPU refcounts, such as blk_pre_runtime_suspend(). Therefore, make __percpu_ref_switch_to_atomic() use call_rcu_hurry() in order to revert to the old behavior. [ paulmck: Apply s/call_rcu_flush/call_rcu_hurry/ feedback from Tejun Heo. ] Signed-off-by: Joel Fernandes (Google) Acked-by: Tejun Heo Signed-off-by: Paul E. McKenney Cc: Dennis Zhou Cc: Christoph Lameter Cc: lib/percpu-refcount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 06e155c44aa0e7921aa44d3c67f8ea464b16cb75 Author: Sean Christopherson Date: Thu Oct 13 21:12:32 2022 +0000 KVM: Skip unnecessary "unmap" if gpc is already valid during refresh When refreshing a gfn=>pfn cache, skip straight to unlocking if the cache already valid instead of stuffing the "old" variables to turn the unmapping outro into a nop. Signed-off-by: Sean Christopherson Signed-off-by: David Woodhouse virt/kvm/pfncache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 58f5ee5fedd981e05cb086cba4e8f923c3727a04 Author: Sean Christopherson Date: Thu Oct 13 21:12:31 2022 +0000 KVM: Drop @gpa from exported gfn=>pfn cache check() and refresh() helpers Drop the @gpa param from the exported check()+refresh() helpers and limit changing the cache's GPA to the activate path. All external users just feed in gpc->gpa, i.e. this is a fancy nop. Allowing users to change the GPA at check()+refresh() is dangerous as those helpers explicitly allow concurrent calls, e.g. KVM could get into a livelock scenario. It's also unclear as to what the expected behavior should be if multiple tasks attempt to refresh with different GPAs. Signed-off-by: Sean Christopherson Signed-off-by: David Woodhouse arch/x86/kvm/x86.c | 6 ++---- arch/x86/kvm/xen.c | 22 +++++++++++----------- include/linux/kvm_host.h | 8 +++----- virt/kvm/pfncache.c | 17 +++++++++++------ 4 files changed, 27 insertions(+), 26 deletions(-) commit 5762cb10235776dd1ed5f5f9d6c1aff2b73bec5c Author: Sean Christopherson Date: Thu Oct 13 21:12:30 2022 +0000 KVM: Do not partially reinitialize gfn=>pfn cache during activation Don't partially reinitialize a gfn=>pfn cache when activating the cache, and instead assert that the cache is not valid during activation. Bug the VM if the assertion fails, as use-after-free and/or data corruption is all but guaranteed if KVM ends up with a valid-but-inactive cache. Signed-off-by: Sean Christopherson Signed-off-by: David Woodhouse virt/kvm/pfncache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9f87791d686d85614584438d4f249eb32ef7964c Author: Sean Christopherson Date: Thu Oct 13 21:12:29 2022 +0000 KVM: Drop KVM's API to allow temporarily unmapping gfn=>pfn cache Drop kvm_gpc_unmap() as it has no users and unclear requirements. The API was added as part of the original gfn_to_pfn_cache support, but its sole usage[*] was never merged. Fold the guts of kvm_gpc_unmap() into the deactivate path and drop the API. Omit acquiring refresh_lock as as concurrent calls to kvm_gpc_deactivate() are not allowed (this is not enforced, e.g. via lockdep. due to it being called during vCPU destruction). If/when temporary unmapping makes a comeback, the desirable behavior is likely to restrict temporary unmapping to vCPU-exclusive mappings and require the vcpu->mutex be held to serialize unmap. Use of the refresh_lock to protect unmapping was somewhat specuatively added by commit 93984f19e7bc ("KVM: Fully serialize gfn=>pfn cache refresh via mutex") to guard against concurrent unmaps, but the primary use case of the temporary unmap, nested virtualization[*], doesn't actually need or want concurrent unmaps. [*] https://lore.kernel.org/all/20211210163625.2886-7-dwmw2@infradead.org Signed-off-by: Sean Christopherson Signed-off-by: David Woodhouse include/linux/kvm_host.h | 12 ------------ virt/kvm/pfncache.c | 44 ++++++++++++++++---------------------------- 2 files changed, 16 insertions(+), 40 deletions(-) commit 0318f207d1c2e297d1ec1c6e145bb8bd053236f9 Author: Michal Luczaj Date: Thu Oct 13 21:12:28 2022 +0000 KVM: Use gfn_to_pfn_cache's immutable "kvm" in kvm_gpc_refresh() Make kvm_gpc_refresh() use kvm instance cached in gfn_to_pfn_cache. No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: Michal Luczaj [sean: leave kvm_gpc_unmap() as-is] Signed-off-by: Sean Christopherson Signed-off-by: David Woodhouse arch/x86/kvm/x86.c | 2 +- arch/x86/kvm/xen.c | 10 ++++------ include/linux/kvm_host.h | 10 ++++------ virt/kvm/pfncache.c | 7 +++---- 4 files changed, 12 insertions(+), 17 deletions(-) commit 2a0b128a906ab28b1ab41ceedcaf462b6f74f1aa Author: Michal Luczaj Date: Thu Oct 13 21:12:27 2022 +0000 KVM: Clean up hva_to_pfn_retry() Make hva_to_pfn_retry() use kvm instance cached in gfn_to_pfn_cache. Suggested-by: Sean Christopherson Signed-off-by: Michal Luczaj Signed-off-by: Sean Christopherson Signed-off-by: David Woodhouse virt/kvm/pfncache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e308c24a358d1e79951b16c387cbc6c6593639a5 Author: Michal Luczaj Date: Thu Oct 13 21:12:26 2022 +0000 KVM: Use gfn_to_pfn_cache's immutable "kvm" in kvm_gpc_check() Make kvm_gpc_check() use kvm instance cached in gfn_to_pfn_cache. Suggested-by: Sean Christopherson Signed-off-by: Michal Luczaj Signed-off-by: Sean Christopherson Signed-off-by: David Woodhouse arch/x86/kvm/x86.c | 2 +- arch/x86/kvm/xen.c | 16 +++++++--------- include/linux/kvm_host.h | 4 +--- virt/kvm/pfncache.c | 5 ++--- 4 files changed, 11 insertions(+), 16 deletions(-) commit 8c82a0b3ba1a411b84af5d43a4cc5994efa897ec Author: Michal Luczaj Date: Thu Oct 13 21:12:24 2022 +0000 KVM: Store immutable gfn_to_pfn_cache properties Move the assignment of immutable properties @kvm, @vcpu, and @usage to the initializer. Make _activate() and _deactivate() use stored values. Note, @len is also effectively immutable for most cases, but not in the case of the Xen runstate cache, which may be split across two pages and the length of the first segment will depend on its address. Suggested-by: Sean Christopherson Signed-off-by: Michal Luczaj [sean: handle @len in a separate patch] Signed-off-by: Sean Christopherson [dwmw2: acknowledge that @len can actually change for some use cases] Signed-off-by: David Woodhouse arch/x86/kvm/x86.c | 14 +++++----- arch/x86/kvm/xen.c | 65 ++++++++++++++++++++++------------------------- include/linux/kvm_host.h | 37 +++++++++++++-------------- include/linux/kvm_types.h | 1 + virt/kvm/pfncache.c | 22 ++++++++++------ 5 files changed, 69 insertions(+), 70 deletions(-) commit 214b0a88c46d5f32d80abe0d1bc2eea1cbd38f11 Author: Metin Kaya Date: Mon Mar 21 11:05:32 2022 +0000 KVM: x86/xen: add support for 32-bit guests in SCHEDOP_poll This patch introduces compat version of struct sched_poll for SCHEDOP_poll sub-operation of sched_op hypercall, reads correct amount of data (16 bytes in 32-bit case, 24 bytes otherwise) by using new compat_sched_poll struct, copies it to sched_poll properly, and lets rest of the code run as is. Signed-off-by: Metin Kaya Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant arch/x86/kvm/xen.c | 33 +++++++++++++++++++++++++++++---- arch/x86/kvm/xen.h | 7 +++++++ 2 files changed, 36 insertions(+), 4 deletions(-) commit df51f287b5de3b9d4fd39593eafd1f8298d711c7 Author: Giovanni Gherdovich Date: Mon Nov 21 16:35:40 2022 +0100 cpufreq: intel_pstate: Add Sapphire Rapids support in no-HWP mode Users may disable HWP in firmware, in which case intel_pstate wouldn't load unless the CPU model is explicitly supported. See also the following past commits: commit d8de7a44e11f ("cpufreq: intel_pstate: Add Skylake servers support") commit 706c5328851d ("cpufreq: intel_pstate: Add Cometlake support in no-HWP mode") commit fbdc21e9b038 ("cpufreq: intel_pstate: Add Icelake servers support in no-HWP mode") commit 71bb5c82aaae ("cpufreq: intel_pstate: Add Tigerlake support in no-HWP mode") Signed-off-by: Giovanni Gherdovich Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 1 + 1 file changed, 1 insertion(+) commit 91fda1f88c0968f1491ab150bb01690525af150a Author: Xiongfeng Wang Date: Wed Nov 16 19:33:39 2022 +0800 cpufreq: amd_freq_sensitivity: Add missing pci_dev_put() pci_get_device() will increase the reference count for the returned pci_dev. We need to use pci_dev_put() to decrease the reference count after using pci_get_device(). Let's add it. Fixes: 59a3b3a8db16 ("cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ") Signed-off-by: Xiongfeng Wang Signed-off-by: Rafael J. Wysocki drivers/cpufreq/amd_freq_sensitivity.c | 2 ++ 1 file changed, 2 insertions(+) commit 5c51054896bcce1d33d39fead2af73fec24f40b6 Author: Yongqiang Liu Date: Thu Nov 10 14:23:07 2022 +0000 cpufreq: Init completion before kobject_init_and_add() In cpufreq_policy_alloc(), it will call uninitialed completion in cpufreq_sysfs_release() when kobject_init_and_add() fails. And that will cause a crash such as the following page fault in complete: BUG: unable to handle page fault for address: fffffffffffffff8 [..] RIP: 0010:complete+0x98/0x1f0 [..] Call Trace: kobject_put+0x1be/0x4c0 cpufreq_online.cold+0xee/0x1fd cpufreq_add_dev+0x183/0x1e0 subsys_interface_register+0x3f5/0x4e0 cpufreq_register_driver+0x3b7/0x670 acpi_cpufreq_init+0x56c/0x1000 [acpi_cpufreq] do_one_initcall+0x13d/0x780 do_init_module+0x1c3/0x630 load_module+0x6e67/0x73b0 __do_sys_finit_module+0x181/0x240 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 4ebe36c94aed ("cpufreq: Fix kobject memleak") Signed-off-by: Yongqiang Liu Acked-by: Viresh Kumar Cc: 5.2+ # 5.2+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9b4dc920d35cca8bf85ecce836ee6d23788e7cf Author: Lukas Bulwahn Date: Mon Nov 7 11:56:57 2022 +0100 notifier: repair slips in kernel-doc comments Invoking ./scripts/kernel-doc -none kernel/notifier.c warns: kernel/notifier.c:71: warning: Excess function parameter 'returns' description in 'notifier_call_chain' kernel/notifier.c:119: warning: Function parameter or member 'v' not described in 'notifier_call_chain_robust' These two warning are easy to fix, as they are just due to some minor slips that makes the comment not follow kernel-doc's syntactic expectation. Fix those minor slips in kernel-doc comments for make W=1 happiness. Signed-off-by: Lukas Bulwahn Signed-off-by: Rafael J. Wysocki kernel/notifier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f50cb2cbabd6c4a60add93d72451728f86e4791c Author: Luo Meng Date: Tue Nov 29 10:48:50 2022 +0800 dm integrity: Fix UAF in dm_integrity_dtr() Dm_integrity also has the same UAF problem when dm_resume() and dm_destroy() are concurrent. Therefore, cancelling timer again in dm_integrity_dtr(). Cc: stable@vger.kernel.org Fixes: 7eada909bfd7a ("dm: add integrity target") Signed-off-by: Luo Meng Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 2 ++ 1 file changed, 2 insertions(+) commit 6a459d8edbdbe7b24db42a5a9f21e6aa9e00c2aa Author: Luo Meng Date: Tue Nov 29 10:48:49 2022 +0800 dm cache: Fix UAF in destroy() Dm_cache also has the same UAF problem when dm_resume() and dm_destroy() are concurrent. Therefore, cancelling timer again in destroy(). Cc: stable@vger.kernel.org Fixes: c6b4fcbad044e ("dm: add cache target") Signed-off-by: Luo Meng Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 1 + 1 file changed, 1 insertion(+) commit e4b5957c6f749a501c464f92792f1c8e26b61a94 Author: Luo Meng Date: Tue Nov 29 10:48:48 2022 +0800 dm clone: Fix UAF in clone_dtr() Dm_clone also has the same UAF problem when dm_resume() and dm_destroy() are concurrent. Therefore, cancelling timer again in clone_dtr(). Cc: stable@vger.kernel.org Fixes: 7431b7835f554 ("dm: add clone target") Signed-off-by: Luo Meng Signed-off-by: Mike Snitzer drivers/md/dm-clone-target.c | 1 + 1 file changed, 1 insertion(+) commit 88430ebcbc0ec637b710b947738839848c20feff Author: Luo Meng Date: Tue Nov 29 10:48:47 2022 +0800 dm thin: Fix UAF in run_timer_softirq() When dm_resume() and dm_destroy() are concurrent, it will lead to UAF, as follows: BUG: KASAN: use-after-free in __run_timers+0x173/0x710 Write of size 8 at addr ffff88816d9490f0 by task swapper/0/0 Call Trace: dump_stack_lvl+0x73/0x9f print_report.cold+0x132/0xaa2 _raw_spin_lock_irqsave+0xcd/0x160 __run_timers+0x173/0x710 kasan_report+0xad/0x110 __run_timers+0x173/0x710 __asan_store8+0x9c/0x140 __run_timers+0x173/0x710 call_timer_fn+0x310/0x310 pvclock_clocksource_read+0xfa/0x250 kvm_clock_read+0x2c/0x70 kvm_clock_get_cycles+0xd/0x20 ktime_get+0x5c/0x110 lapic_next_event+0x38/0x50 clockevents_program_event+0xf1/0x1e0 run_timer_softirq+0x49/0x90 __do_softirq+0x16e/0x62c __irq_exit_rcu+0x1fa/0x270 irq_exit_rcu+0x12/0x20 sysvec_apic_timer_interrupt+0x8e/0xc0 One of the concurrency UAF can be shown as below: use free do_resume | __find_device_hash_cell | dm_get | atomic_inc(&md->holders) | | dm_destroy | __dm_destroy | if (!dm_suspended_md(md)) | atomic_read(&md->holders) | msleep(1) dm_resume | __dm_resume | dm_table_resume_targets | pool_resume | do_waker #add delay work | dm_put | atomic_dec(&md->holders) | | dm_table_destroy | pool_dtr | __pool_dec | __pool_destroy | destroy_workqueue | kfree(pool) # free pool time out __do_softirq run_timer_softirq # pool has already been freed This can be easily reproduced using: 1. create thin-pool 2. dmsetup suspend pool 3. dmsetup resume pool 4. dmsetup remove_all # Concurrent with 3 The root cause of this UAF bug is that dm_resume() adds timer after dm_destroy() skips cancelling the timer because of suspend status. After timeout, it will call run_timer_softirq(), however pool has already been freed. The concurrency UAF bug will happen. Therefore, cancelling timer again in __pool_destroy(). Cc: stable@vger.kernel.org Fixes: 991d9fa02da0d ("dm: add thin provisioning target") Signed-off-by: Luo Meng Signed-off-by: Mike Snitzer drivers/md/dm-thin.c | 2 ++ 1 file changed, 2 insertions(+) commit 63f93fd6fa5717769a78d6d7bea6f7f9a1ccca8e Author: Christoph Hellwig Date: Mon Nov 14 05:26:37 2022 +0100 block: mark blk_put_queue as potentially blocking We can't just say that the last reference release may block, as any reference dropped could be the last one. So move the might_sleep() from blk_free_queue to blk_put_queue and update the documentation. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221114042637.1009333-6-hch@lst.de Signed-off-by: Jens Axboe block/blk-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2bd85221a625b316114bafaab527770b607095d3 Author: Christoph Hellwig Date: Mon Nov 14 05:26:36 2022 +0100 block: untangle request_queue refcounting from sysfs The kobject embedded into the request_queue is used for the queue directory in sysfs, but that is a child of the gendisks directory and is intimately tied to it. Move this kobject to the gendisk and use a refcount_t in the request_queue for the actual request_queue refcounting that is completely unrelated to the device model. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221114042637.1009333-5-hch@lst.de Signed-off-by: Jens Axboe block/blk-core.c | 42 ++++++++++++++++++----- block/blk-crypto-sysfs.c | 4 +-- block/blk-ia-ranges.c | 3 +- block/blk-sysfs.c | 86 +++++++++++++----------------------------------- block/blk.h | 4 --- block/bsg.c | 11 ++++--- block/elevator.c | 2 +- include/linux/blkdev.h | 6 ++-- 8 files changed, 71 insertions(+), 87 deletions(-) commit 40602997be26887bdfa3d58659c3acb4579099e9 Author: Christoph Hellwig Date: Mon Nov 14 05:26:35 2022 +0100 block: fix error unwinding in blk_register_queue blk_register_queue fails to handle errors from blk_mq_sysfs_register, leaks various resources on errors and accidentally sets queue refs percpu refcount to percpu mode on kobject_add failure. Fix all that by properly unwinding on errors. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221114042637.1009333-4-hch@lst.de Signed-off-by: Jens Axboe block/blk-sysfs.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 6fc75f309d291d328b4ea2f91bef0ff56e4bc7c2 Author: Christoph Hellwig Date: Mon Nov 14 05:26:34 2022 +0100 block: factor out a blk_debugfs_remove helper Split the debugfs removal from blk_unregister_queue into a helper so that the it can be reused for blk_register_queue error handling. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221114042637.1009333-3-hch@lst.de Signed-off-by: Jens Axboe block/blk-sysfs.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 450deb93df7d457cdd93594a1987f9650c749b96 Author: Christoph Hellwig Date: Mon Nov 14 05:26:33 2022 +0100 blk-crypto: pass a gendisk to blk_crypto_sysfs_{,un}register Prepare for changes to the block layer sysfs handling by passing the readily available gendisk to blk_crypto_sysfs_{,un}register. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20221114042637.1009333-2-hch@lst.de Signed-off-by: Jens Axboe block/blk-crypto-internal.h | 10 ++++++---- block/blk-crypto-sysfs.c | 7 ++++--- block/blk-sysfs.c | 4 ++-- 3 files changed, 12 insertions(+), 9 deletions(-) commit e9374524950512a1769f610a868fcdf89ea59b8e Author: Vishwanath Pai Date: Tue Nov 22 20:30:57 2022 +0100 netfilter: ipset: Add support for new bitmask parameter Add a new parameter to complement the existing 'netmask' option. The main difference between netmask and bitmask is that bitmask takes any arbitrary ip address as input, it does not have to be a valid netmask. The name of the new parameter is 'bitmask'. This lets us mask out arbitrary bits in the ip address, for example: ipset create set1 hash:ip bitmask 255.128.255.0 ipset create set2 hash:ip,port family inet6 bitmask ffff::ff80 Signed-off-by: Vishwanath Pai Signed-off-by: Joshua Hunt Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/ipset/ip_set.h | 10 ++++ include/uapi/linux/netfilter/ipset/ip_set.h | 2 + net/netfilter/ipset/ip_set_hash_gen.h | 71 +++++++++++++++++++++++++---- net/netfilter/ipset/ip_set_hash_ip.c | 19 ++++---- net/netfilter/ipset/ip_set_hash_ipport.c | 24 +++++++++- net/netfilter/ipset/ip_set_hash_netnet.c | 26 +++++++++-- 6 files changed, 126 insertions(+), 26 deletions(-) commit a70e483460d58e64504dd679fd127e9549385c86 Author: Florian Westphal Date: Wed Nov 9 12:21:58 2022 +0100 netfilter: conntrack: merge ipv4+ipv6 confirm functions No need to have distinct functions. After merge, ipv6 can avoid protooff computation if the connection neither needs sequence adjustment nor helper invocation -- this is the normal case. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_core.h | 3 +- net/bridge/netfilter/nf_conntrack_bridge.c | 32 +------- net/netfilter/nf_conntrack_proto.c | 124 +++++++++++++---------------- 3 files changed, 57 insertions(+), 102 deletions(-) commit bbb09f8353c1192ce436eb32ffae9105bc6e1d27 Merge: c5527c1787e8 26e90ec7a840 Author: Greg Kroah-Hartman Date: Wed Nov 30 18:41:36 2022 +0100 Merge tag 'icc-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 6.2 These are the interconnect changes for the 6.2-rc1 merge window consisting of new drivers to enable both L3 and DDR scaling on sc8280xp platforms. There are also a few miscellaneous fixes. New osm-l3 driver: - interconnect: qcom: osm-l3: Use platform-independent node ids - interconnect: qcom: osm-l3: Squash common descriptors - interconnect: qcom: osm-l3: Add per-core EPSS L3 support - interconnect: qcom: osm-l3: Simplify osm_l3_set() - dt-bindings: interconnect: Add sm8350, sc8280xp and generic OSM L3 compatibles - dt-bindings: interconnect: qcom,msm8998-bwmon: Add sc8280xp bwmon instances Fixes: - interconnect: qcom: icc-rpm: Remove redundant dev_err call - interconnect: qcom: sc7180: fix dropped const of qcom_icc_bcm - interconnect: qcom: sc7180: drop double space - interconnect: qcom: sc8180x: constify pointer to qcom_icc_node Signed-off-by: Georgi Djakov * tag 'icc-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: sc8180x: constify pointer to qcom_icc_node interconnect: qcom: sc7180: drop double space interconnect: qcom: sc7180: fix dropped const of qcom_icc_bcm interconnect: qcom: icc-rpm: Remove redundant dev_err call dt-bindings: interconnect: qcom,msm8998-bwmon: Add sc8280xp bwmon instances dt-bindings: interconnect: Add sm8350, sc8280xp and generic OSM L3 compatibles interconnect: qcom: osm-l3: Simplify osm_l3_set() interconnect: qcom: osm-l3: Add per-core EPSS L3 support interconnect: qcom: osm-l3: Squash common descriptors interconnect: qcom: osm-l3: Use platform-independent node ids dt-bindings: interconnect: qcom,msm8998-bwmon: Correct SC7280 CPU compatible commit 7500194a630b11236761df35fef300009d7d3f6f Author: Pavel Begunkov Date: Wed Nov 30 15:21:59 2022 +0000 io_uring: reshuffle issue_flags Reshuffle issue flags to keep normal flags separate from the uring_cmd ctx-setup like flags. Shift the second type to the second byte so it's easier to add new ones in the future. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d6e4696c883943082d248716f4cd568f37b17a74.1669821213.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/linux/io_uring.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 77e3202a21967e7de5b4412c0534f2e34e175227 Author: Pavel Begunkov Date: Wed Nov 30 15:21:58 2022 +0000 io_uring: don't reinstall quiesce node for each tw There is no need to reinit data and install a new rsrc node every time we get a task_work, it's detrimental, just execute it and conitnue waiting. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3895d3344164cd9b3a0bbb24a6e357e20a13434b.1669821213.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rsrc.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) commit 0ced756f6412123b01cd72e5741d9dd6ae5f1dd5 Author: Pavel Begunkov Date: Wed Nov 30 15:21:57 2022 +0000 io_uring: improve rsrc quiesce refs checks Do a little bit of refactoring of io_rsrc_ref_quiesce(), flatten the data refs checks and so get rid of a conditional weird unlock-else-break construct. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d21283e9f88a77612c746ed526d86fe3bfb58a70.1669821213.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rsrc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 618d653a345a477aaae307a0455900eb8789e952 Author: Pavel Begunkov Date: Wed Nov 30 15:21:56 2022 +0000 io_uring: don't raw spin unlock to match cq_lock There is one newly added place when we lock ring with io_cq_lock() but unlocking is hand coded calling spin_unlock directly. It's ugly and troublesome in the long run. Make it consistent with the other completion locking. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4ca4f0564492b90214a190cd5b2a6c76522de138.1669821213.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 +- io_uring/io_uring.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 443e57550670234f1bd34983b3c577edcf2eeef5 Author: Pavel Begunkov Date: Wed Nov 30 15:21:55 2022 +0000 io_uring: combine poll tw handlers Merge apoll and regular poll tw handlers, it will help with inlining. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/482e59edb9fc81bd275fdbf486837330fb27120a.1669821213.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 54 +++++++++++++++++++++--------------------------------- 1 file changed, 21 insertions(+), 33 deletions(-) commit c3bfb57ea7011e0c04e4b7f28cb357a551b1efb9 Author: Pavel Begunkov Date: Wed Nov 30 15:21:54 2022 +0000 io_uring: improve poll warning handling Don't try to complete requests if their refs are broken and we've got a warning, it's much better to drop them and potentially leaking than double freeing. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/31edf9f96f05d03ab62c114508a231a2dce434cb.1669821213.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 047b6aef0966f9863e1940b57c256ebbb465a6b5 Author: Pavel Begunkov Date: Wed Nov 30 15:21:53 2022 +0000 io_uring: remove ctx variable in io_poll_check_events ctx is only used by io_poll_check_events() for multishot poll CQE posting, don't save it on stack in advance. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/552c1771f8a0e7688afdb4f538ead245f53e80e7.1669821213.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9805fa2d94993e16efd0e1adbd2b54d8d1fe2f9f Author: Pavel Begunkov Date: Wed Nov 30 15:21:52 2022 +0000 io_uring: carve io_poll_check_events fast path The fast path in io_poll_check_events() is when we have only one (i.e. master) reference. Move all verification, cancellations checks, edge case handling and so on under a common if. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8c21c5d5e027e32dc553705e88796dec79ff6f93.1669821213.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit f6f7f903e78dddcb1e1552b896e0e3e9c14c17ae Author: Pavel Begunkov Date: Wed Nov 30 15:21:51 2022 +0000 io_uring: kill io_poll_issue's PF_EXITING check We don't need to worry about checking PF_EXITING in io_poll_issue(). task works using the function should take care of it and never try to resubmit / retry if the task is dying. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2e9dc998dc07507c759a0c9cb5d2fbea0710d58c.1669821213.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 -- 1 file changed, 2 deletions(-) commit bff3d0534804452e19c097ae6b4eb4b4d846d67f Author: Sriram Yagnaraman Date: Fri Nov 4 18:18:35 2022 +0100 netfilter: conntrack: add sctp DATA_SENT state SCTP conntrack currently assumes that the SCTP endpoints will probe secondary paths using HEARTBEAT before sending traffic. But, according to RFC 9260, SCTP endpoints can send any traffic on any of the confirmed paths after SCTP association is up. SCTP endpoints that sends INIT will confirm all peer addresses that upper layer configures, and the SCTP endpoint that receives COOKIE_ECHO will only confirm the address it sent the INIT_ACK to. So, we can have a situation where the INIT sender can start to use secondary paths without the need to send HEARTBEAT. This patch allows DATA/SACK packets to create new connection tracking entry. A new state has been added to indicate that a DATA/SACK chunk has been seen in the original direction - SCTP_CONNTRACK_DATA_SENT. State transitions mostly follows the HEARTBEAT_SENT, except on receiving HEARTBEAT/HEARTBEAT_ACK/DATA/SACK in the reply direction. State transitions in original direction: - DATA_SENT behaves similar to HEARTBEAT_SENT for all chunks, except that it remains in DATA_SENT on receving HEARTBEAT, HEARTBEAT_ACK/DATA/SACK chunks State transitions in reply direction: - DATA_SENT behaves similar to HEARTBEAT_SENT for all chunks, except that it moves to HEARTBEAT_ACKED on receiving HEARTBEAT/HEARTBEAT_ACK/DATA/SACK chunks Note: This patch still doesn't solve the problem when the SCTP endpoint decides to use primary paths for association establishment but uses a secondary path for association shutdown. We still have to depend on timeout for connections to expire in such a case. Signed-off-by: Sriram Yagnaraman Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_conntrack_sctp.h | 1 + include/uapi/linux/netfilter/nfnetlink_cttimeout.h | 1 + net/netfilter/nf_conntrack_proto_sctp.c | 104 ++++++++++++--------- net/netfilter/nf_conntrack_standalone.c | 8 ++ 4 files changed, 71 insertions(+), 43 deletions(-) commit 575689fc0ffa6c4bb4e72fd18e31a6525a6124e0 Author: Guo Xuenan Date: Wed Nov 30 09:25:46 2022 -0800 xfs: fix super block buf log item UAF during force shutdown xfs log io error will trigger xlog shut down, and end_io worker call xlog_state_shutdown_callbacks to unpin and release the buf log item. The race condition is that when there are some thread doing transaction commit and happened not to be intercepted by xlog_is_shutdown, then, these log item will be insert into CIL, when unpin and release these buf log item, UAF will occur. BTW, add delay before `xlog_cil_commit` can increase recurrence probability. The following call graph actually encountered this bad situation. fsstress io end worker kworker/0:1H-216 xlog_ioend_work ->xlog_force_shutdown ->xlog_state_shutdown_callbacks ->xlog_cil_process_committed ->xlog_cil_committed ->xfs_trans_committed_bulk ->xfs_trans_apply_sb_deltas ->li_ops->iop_unpin(lip, 1); ->xfs_trans_getsb ->_xfs_trans_bjoin ->xfs_buf_item_init ->if (bip) { return 0;} //relog ->xlog_cil_commit ->xlog_cil_insert_items //insert into CIL ->xfs_buf_ioend_fail(bp); ->xfs_buf_ioend ->xfs_buf_item_done ->xfs_buf_item_relse ->xfs_buf_item_free when cil push worker gather percpu cil and insert super block buf log item into ctx->log_items then uaf occurs. ================================================================== BUG: KASAN: use-after-free in xlog_cil_push_work+0x1c8f/0x22f0 Write of size 8 at addr ffff88801800f3f0 by task kworker/u4:4/105 CPU: 0 PID: 105 Comm: kworker/u4:4 Tainted: G W 6.1.0-rc1-00001-g274115149b42 #136 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Workqueue: xfs-cil/sda xlog_cil_push_work Call Trace: dump_stack_lvl+0x4d/0x66 print_report+0x171/0x4a6 kasan_report+0xb3/0x130 xlog_cil_push_work+0x1c8f/0x22f0 process_one_work+0x6f9/0xf70 worker_thread+0x578/0xf30 kthread+0x28c/0x330 ret_from_fork+0x1f/0x30 Allocated by task 2145: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 __kasan_slab_alloc+0x54/0x60 kmem_cache_alloc+0x14a/0x510 xfs_buf_item_init+0x160/0x6d0 _xfs_trans_bjoin+0x7f/0x2e0 xfs_trans_getsb+0xb6/0x3f0 xfs_trans_apply_sb_deltas+0x1f/0x8c0 __xfs_trans_commit+0xa25/0xe10 xfs_symlink+0xe23/0x1660 xfs_vn_symlink+0x157/0x280 vfs_symlink+0x491/0x790 do_symlinkat+0x128/0x220 __x64_sys_symlink+0x7a/0x90 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 216: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 kasan_save_free_info+0x2a/0x40 __kasan_slab_free+0x105/0x1a0 kmem_cache_free+0xb6/0x460 xfs_buf_ioend+0x1e9/0x11f0 xfs_buf_item_unpin+0x3d6/0x840 xfs_trans_committed_bulk+0x4c2/0x7c0 xlog_cil_committed+0xab6/0xfb0 xlog_cil_process_committed+0x117/0x1e0 xlog_state_shutdown_callbacks+0x208/0x440 xlog_force_shutdown+0x1b3/0x3a0 xlog_ioend_work+0xef/0x1d0 process_one_work+0x6f9/0xf70 worker_thread+0x578/0xf30 kthread+0x28c/0x330 ret_from_fork+0x1f/0x30 The buggy address belongs to the object at ffff88801800f388 which belongs to the cache xfs_buf_item of size 272 The buggy address is located 104 bytes inside of 272-byte region [ffff88801800f388, ffff88801800f498) The buggy address belongs to the physical page: page:ffffea0000600380 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801800f208 pfn:0x1800e head:ffffea0000600380 order:1 compound_mapcount:0 compound_pincount:0 flags: 0x1fffff80010200(slab|head|node=0|zone=1|lastcpupid=0x1fffff) raw: 001fffff80010200 ffffea0000699788 ffff88801319db50 ffff88800fb50640 raw: ffff88801800f208 000000000015000a 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801800f280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801800f300: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801800f380: fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801800f400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801800f480: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Disabling lock debugging due to kernel taint Signed-off-by: Guo Xuenan Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf_item.c | 2 ++ 1 file changed, 2 insertions(+) commit 1eb52a6a71981b80f9acbd915acd6a05a5037196 Author: Guo Xuenan Date: Wed Nov 30 09:25:46 2022 -0800 xfs: wait iclog complete before tearing down AIL Fix uaf in xfs_trans_ail_delete during xlog force shutdown. In commit cd6f79d1fb32 ("xfs: run callbacks before waking waiters in xlog_state_shutdown_callbacks") changed the order of running callbacks and wait for iclog completion to avoid unmount path untimely destroy AIL. But which seems not enough to ensue this, adding mdelay in `xfs_buf_item_unpin` can prove that. The reproduction is as follows. To ensure destroy AIL safely, we should wait all xlog ioend workers done and sync the AIL. ================================================================== BUG: KASAN: use-after-free in xfs_trans_ail_delete+0x240/0x2a0 Read of size 8 at addr ffff888023169400 by task kworker/1:1H/43 CPU: 1 PID: 43 Comm: kworker/1:1H Tainted: G W 6.1.0-rc1-00002-gc28266863c4a #137 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Workqueue: xfs-log/sda xlog_ioend_work Call Trace: dump_stack_lvl+0x4d/0x66 print_report+0x171/0x4a6 kasan_report+0xb3/0x130 xfs_trans_ail_delete+0x240/0x2a0 xfs_buf_item_done+0x7b/0xa0 xfs_buf_ioend+0x1e9/0x11f0 xfs_buf_item_unpin+0x4c8/0x860 xfs_trans_committed_bulk+0x4c2/0x7c0 xlog_cil_committed+0xab6/0xfb0 xlog_cil_process_committed+0x117/0x1e0 xlog_state_shutdown_callbacks+0x208/0x440 xlog_force_shutdown+0x1b3/0x3a0 xlog_ioend_work+0xef/0x1d0 process_one_work+0x6f9/0xf70 worker_thread+0x578/0xf30 kthread+0x28c/0x330 ret_from_fork+0x1f/0x30 Allocated by task 9606: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 __kasan_kmalloc+0x7a/0x90 __kmalloc+0x59/0x140 kmem_alloc+0xb2/0x2f0 xfs_trans_ail_init+0x20/0x320 xfs_log_mount+0x37e/0x690 xfs_mountfs+0xe36/0x1b40 xfs_fs_fill_super+0xc5c/0x1a70 get_tree_bdev+0x3c5/0x6c0 vfs_get_tree+0x85/0x250 path_mount+0xec3/0x1830 do_mount+0xef/0x110 __x64_sys_mount+0x150/0x1f0 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 9662: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 kasan_save_free_info+0x2a/0x40 __kasan_slab_free+0x105/0x1a0 __kmem_cache_free+0x99/0x2d0 kvfree+0x3a/0x40 xfs_log_unmount+0x60/0xf0 xfs_unmountfs+0xf3/0x1d0 xfs_fs_put_super+0x78/0x300 generic_shutdown_super+0x151/0x400 kill_block_super+0x9a/0xe0 deactivate_locked_super+0x82/0xe0 deactivate_super+0x91/0xb0 cleanup_mnt+0x32a/0x4a0 task_work_run+0x15f/0x240 exit_to_user_mode_prepare+0x188/0x190 syscall_exit_to_user_mode+0x12/0x30 do_syscall_64+0x42/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888023169400 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 0 bytes inside of 128-byte region [ffff888023169400, ffff888023169480) The buggy address belongs to the physical page: page:ffffea00008c5a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888023168f80 pfn:0x23168 head:ffffea00008c5a00 order:1 compound_mapcount:0 compound_pincount:0 flags: 0x1fffff80010200(slab|head|node=0|zone=1|lastcpupid=0x1fffff) raw: 001fffff80010200 ffffea00006b3988 ffffea0000577a88 ffff88800f842ac0 raw: ffff888023168f80 0000000000150007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888023169300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888023169380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888023169400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888023169480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888023169500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Disabling lock debugging due to kernel taint Fixes: cd6f79d1fb32 ("xfs: run callbacks before waking waiters in xlog_state_shutdown_callbacks") Signed-off-by: Guo Xuenan Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit 4b4d11bbeca4e3ebb235c8c3c875a986a8c90427 Merge: cd14f15b0e64 4c6dbfd2756b Author: Darrick J. Wong Date: Wed Nov 30 09:25:25 2022 -0800 Merge tag 'random-fixes-6.2_2022-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.2-mergeC xfs: various fixes for 6.2 This is an assorted collection of bug fixes that have been bundled together. The first patch fixes a metadump corruption vector resulting from a three-way race between a slow-running blkid process, the kernel mounting, changing, and unmounting the fs, and xfs_db reading stale block device pagecache contents. The middle two patches address gcc warnings. The final patch fixes a subtle corruption bug wherein making a delalloc reservation on a filesystem with quotas enabled would sample the data mapping, try to attach dquots, unlock the inode to attach the dquots, relock the inode, and fail to reverify the sampled data. If another process updated the data mapping while the inode was unlocked, the reservation would proceed with stale data and corrupt the data fork. Signed-off-by: Darrick J. Wong * tag 'random-fixes-6.2_2022-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: attach dquots to inode before reading data/cow fork mappings xfs: shut up -Wuninitialized in xfsaild_push xfs: use memcpy, not strncpy, to format the attr prefix during listxattr xfs: invalidate block device page cache during unmount commit cd14f15b0e64b4dffa50ec6914093336fb1ac285 Merge: 7dd73802f97d 254e3459285c Author: Darrick J. Wong Date: Wed Nov 30 09:25:10 2022 -0800 Merge tag 'iomap-write-race-testing-6.2_2022-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.2-mergeC xfs: add knobs for testing iomap write race fixes This series is a followup to Dave Chinner's series entitled "xfs, iomap: fix data corruption due to stale cached iomaps". The two patches here add debugging knobs to introduce artificial delays into the pagecache write and writeback code to facilitate testing of the iomap invalidation code. New tracepoints are also introduced so that fstests can look for the invalidations. Signed-off-by: Darrick J. Wong * tag 'iomap-write-race-testing-6.2_2022-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: add debug knob to slow down write for fun xfs: add debug knob to slow down writeback for fun commit 4c6dbfd2756bd83a0085ed804e2bb7be9cc16bc5 Author: Darrick J. Wong Date: Mon Nov 28 17:24:43 2022 -0800 xfs: attach dquots to inode before reading data/cow fork mappings I've been running near-continuous integration testing of online fsck, and I've noticed that once a day, one of the ARM VMs will fail the test with out of order records in the data fork. xfs/804 races fsstress with online scrub (aka scan but do not change anything), so I think this might be a bug in the core xfs code. This also only seems to trigger if one runs the test for more than ~6 minutes via TIME_FACTOR=13 or something. https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfstests-dev.git/tree/tests/xfs/804?h=djwong-wtf I added a debugging patch to the kernel to check the data fork extents after taking the ILOCK, before dropping ILOCK, and before and after each bmapping operation. So far I've narrowed it down to the delalloc code inserting a record in the wrong place in the iext tree: xfs_bmap_add_extent_hole_delay, near line 2691: case 0: /* * New allocation is not contiguous with another * delayed allocation. * Insert a new entry. */ oldlen = newlen = 0; xfs_iunlock_check_datafork(ip); <-- ok here xfs_iext_insert(ip, icur, new, state); xfs_iunlock_check_datafork(ip); <-- bad here break; } I recorded the state of the data fork mappings and iext cursor state when a corrupt data fork is detected immediately after the xfs_bmap_add_extent_hole_delay call in xfs_bmapi_reserve_delalloc: ino 0x140bb3 func xfs_bmapi_reserve_delalloc line 4164 data fork: ino 0x140bb3 nr 0x0 nr_real 0x0 offset 0xb9 blockcount 0x1f startblock 0x935de2 state 1 ino 0x140bb3 nr 0x1 nr_real 0x1 offset 0xe6 blockcount 0xa startblock 0xffffffffe0007 state 0 ino 0x140bb3 nr 0x2 nr_real 0x1 offset 0xd8 blockcount 0xe startblock 0x935e01 state 0 Here we see that a delalloc extent was inserted into the wrong position in the iext leaf, same as all the other times. The extra trace data I collected are as follows: ino 0x140bb3 fork 0 oldoff 0xe6 oldlen 0x4 oldprealloc 0x6 isize 0xe6000 ino 0x140bb3 oldgotoff 0xea oldgotstart 0xfffffffffffffffe oldgotcount 0x0 oldgotstate 0 ino 0x140bb3 crapgotoff 0x0 crapgotstart 0x0 crapgotcount 0x0 crapgotstate 0 ino 0x140bb3 freshgotoff 0xd8 freshgotstart 0x935e01 freshgotcount 0xe freshgotstate 0 ino 0x140bb3 nowgotoff 0xe6 nowgotstart 0xffffffffe0007 nowgotcount 0xa nowgotstate 0 ino 0x140bb3 oldicurpos 1 oldleafnr 2 oldleaf 0xfffffc00f0609a00 ino 0x140bb3 crapicurpos 2 crapleafnr 2 crapleaf 0xfffffc00f0609a00 ino 0x140bb3 freshicurpos 1 freshleafnr 2 freshleaf 0xfffffc00f0609a00 ino 0x140bb3 newicurpos 1 newleafnr 3 newleaf 0xfffffc00f0609a00 The first line shows that xfs_bmapi_reserve_delalloc was called with whichfork=XFS_DATA_FORK, off=0xe6, len=0x4, prealloc=6. The second line ("oldgot") shows the contents of @got at the beginning of the call, which are the results of the first iext lookup in xfs_buffered_write_iomap_begin. Line 3 ("crapgot") is the result of duplicating the cursor at the start of the body of xfs_bmapi_reserve_delalloc and performing a fresh lookup at @off. Line 4 ("freshgot") is the result of a new xfs_iext_get_extent right before the call to xfs_bmap_add_extent_hole_delay. Totally garbage. Line 5 ("nowgot") is contents of @got after the xfs_bmap_add_extent_hole_delay call. Line 6 is the contents of @icur at the beginning fo the call. Lines 7-9 are the contents of the iext cursors at the point where the block mappings were sampled. I think @oldgot is a HOLESTARTBLOCK extent because the first lookup didn't find anything, so we filled in imap with "fake hole until the end". At the time of the first lookup, I suspect that there's only one 32-block unwritten extent in the mapping (hence oldicurpos==1) but by the time we get to recording crapgot, crapicurpos==2. Dave then added: Ok, that's much simpler to reason about, and implies the smoke is coming from xfs_buffered_write_iomap_begin() or xfs_bmapi_reserve_delalloc(). I suspect the former - it does a lot of stuff with the ILOCK_EXCL held..... .... including calling xfs_qm_dqattach_locked(). xfs_buffered_write_iomap_begin ILOCK_EXCL look up icur xfs_qm_dqattach_locked xfs_qm_dqattach_one xfs_qm_dqget_inode dquot cache miss xfs_iunlock(ip, XFS_ILOCK_EXCL); error = xfs_qm_dqread(mp, id, type, can_alloc, &dqp); xfs_ilock(ip, XFS_ILOCK_EXCL); .... xfs_bmapi_reserve_delalloc(icur) Yup, that's what is letting the magic smoke out - xfs_qm_dqattach_locked() can cycle the ILOCK. If that happens, we can pass a stale icur to xfs_bmapi_reserve_delalloc() and it all goes downhill from there. Back to Darrick now: So. Fix this by moving the dqattach_locked call up before we take the ILOCK, like all the other callers in that file. Fixes: a526c85c2236 ("xfs: move xfs_file_iomap_begin_delay around") # goes further back than this Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/xfs_iomap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e5827a007aa4bb737c63121fd2c77e089b18a372 Author: Darrick J. Wong Date: Mon Nov 28 17:24:42 2022 -0800 xfs: shut up -Wuninitialized in xfsaild_push -Wuninitialized complains about @target in xfsaild_push being uninitialized in the case where the waitqueue is active but there is no last item in the AIL to wait for. I /think/ it should never be the case that the subsequent xfs_trans_ail_cursor_first returns a log item and hence we'll never end up at XFS_LSN_CMP, but let's make this explicit. Signed-off-by: Darrick J. Wong Reviewed-by: Gao Xiang Reviewed-by: Dave Chinner fs/xfs/xfs_trans_ail.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fd5beaff250d7e88912a937fad072d9d24f219da Author: Darrick J. Wong Date: Mon Nov 28 17:24:42 2022 -0800 xfs: use memcpy, not strncpy, to format the attr prefix during listxattr When -Wstringop-truncation is enabled, the compiler complains about truncation of the null byte at the end of the xattr name prefix. This is intentional, since we're concatenating the two strings together and do _not_ want a null byte in the middle of the name. We've already ensured that the name buffer is long enough to handle prefix and name, and the prefix_len is supposed to be the length of the prefix string without the null byte, so use memcpy here instead. Signed-off-by: Darrick J. Wong Reviewed-by: Gao Xiang Reviewed-by: Dave Chinner fs/xfs/xfs_xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 032e160305f6872e590c77f11896fb28365c6d6c Author: Darrick J. Wong Date: Mon Nov 28 17:24:42 2022 -0800 xfs: invalidate block device page cache during unmount Every now and then I see fstests failures on aarch64 (64k pages) that trigger on the following sequence: mkfs.xfs $dev mount $dev $mnt touch $mnt/a umount $mnt xfs_db -c 'path /a' -c 'print' $dev 99% of the time this succeeds, but every now and then xfs_db cannot find /a and fails. This turns out to be a race involving udev/blkid, the page cache for the block device, and the xfs_db process. udev is triggered whenever anyone closes a block device or unmounts it. The default udev rules invoke blkid to read the fs super and create symlinks to the bdev under /dev/disk. For this, it uses buffered reads through the page cache. xfs_db also uses buffered reads to examine metadata. There is no coordination between xfs_db and udev, which means that they can run concurrently. Note there is no coordination between the kernel and blkid either. On a system with 64k pages, the page cache can cache the superblock and the root inode (and hence the root dir) with the same 64k page. If udev spawns blkid after the mkfs and the system is busy enough that it is still running when xfs_db starts up, they'll both read from the same page in the pagecache. The unmount writes updated inode metadata to disk directly. The XFS buffer cache does not use the bdev pagecache, nor does it invalidate the pagecache on umount. If the above scenario occurs, the pagecache no longer reflects what's on disk, xfs_db reads the stale metadata, and fails to find /a. Most of the time this succeeds because closing a bdev invalidates the page cache, but when processes race, everyone loses. Fix the problem by invalidating the bdev pagecache after flushing the bdev, so that xfs_db will see up to date metadata. Signed-off-by: Darrick J. Wong Reviewed-by: Gao Xiang Reviewed-by: Dave Chinner fs/xfs/xfs_buf.c | 1 + 1 file changed, 1 insertion(+) commit 69a485191b00565a02cdab17e0bef98f84a8ec9d Merge: e0d394e4eeec a5be5ce0e254 Author: Arnd Bergmann Date: Wed Nov 30 17:52:39 2022 +0100 Merge tag 'arm-soc/for-6.2/drivers' of https://github.com/Broadcom/stblinux into soc/drivers This pull request contains Broadcom SoCs driver changes for 6.2, please pull the following: - Yuan uses dev_err_probe() in the Raspberry Pi firmware provider to simplify the error handling code - Rafal adds support for initialiazing the BCM47xx NVMEM/NVRAM firmware provider out of memory-mapped flash devices. * tag 'arm-soc/for-6.2/drivers' of https://github.com/Broadcom/stblinux: firmware/nvram: bcm47xx: support init from IO memory firmware: raspberrypi: Use dev_err_probe() to simplify code Link: https://lore.kernel.org/r/20221129191755.542584-3-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit e0d394e4eeece0484bc86ed121a02508beace200 Merge: 4ddb1bf1a837 5acf07ff25f0 Author: Arnd Bergmann Date: Wed Nov 30 17:52:04 2022 +0100 Merge tag 'asahi-soc-rtkit-sart-6.2' of https://github.com/AsahiLinux/linux into soc/drivers Apple SoC RTKit/SART updates for 6.2. Just two minor correctness nits reported by the kernel test robot. * tag 'asahi-soc-rtkit-sart-6.2' of https://github.com/AsahiLinux/linux: soc: apple: rtkit: Stop casting function pointer signatures soc: apple: sart: Stop casting function pointer signatures Link: https://lore.kernel.org/r/57f84134-8645-35f6-2427-ee683800c413@marcan.st Signed-off-by: Arnd Bergmann commit 3880e0df2e149cbb67bf14dd8e35d8d4c403f22f Merge: 8f345960cec1 5f10311e42c0 Author: Arnd Bergmann Date: Wed Nov 30 17:51:04 2022 +0100 Merge tag 'at91-defconfig-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/defconfig AT91 defconfig for 6.2 #2 It contains: - updates for defconfigs to use the new CONFIG_VIDEO_MICROCHIP_ISC, CONFIG_VIDEO_MICROCHIP_XISC config flags that replaced the CONFIG_VIDEO_ATMEL_ISC, CONFIG_VIDEO_ATMEL_XISC. Drivers under CONFIG_VIDEO_ATMEL_* were moved to staging and considered deprecated. * tag 'at91-defconfig-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: configs: multi_v7: switch to new MICROCHIP_ISC driver ARM: configs: sama5/7: switch to new MICROCHIP_ISC driver Link: https://lore.kernel.org/r/20221125142736.385654-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit df0bb47baa95aad133820b149851d5b94cbc6790 Author: Paolo Bonzini Date: Wed Nov 30 11:14:35 2022 -0500 KVM: x86: fix uninitialized variable use on KVM_REQ_TRIPLE_FAULT If a triple fault was fixed by kvm_x86_ops.nested_ops->triple_fault (by turning it into a vmexit), there is no need to leave vcpu_enter_guest(). Any vcpu->requests will be caught later before the actual vmentry, and in fact vcpu_enter_guest() was not initializing the "r" variable. Depending on the compiler's whims, this could cause the x86_64/triple_fault_event_test test to fail. Cc: Maxim Levitsky Fixes: 92e7d5c83aff ("KVM: x86: allow L1 to not intercept triple fault") Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f345960cec1a6dda7be076e2fcb30a8dc723f9c Author: Bhupesh Sharma Date: Tue Nov 29 01:38:34 2022 +0530 arm64: defconfig: Enable Qualcomm SM6115 / SM4250 GCC and Pinctrl Enable the Qualcomm SM6115 / SM4250 TLMM pinctrl and GCC clock drivers. They need to be builtin to ensure that the UART is allowed to probe before user space needs a console. Signed-off-by: Bhupesh Sharma Acked-by: Konrad Dybcio Cc: Krzysztof Kozlowski Cc: Bjorn Andersson Link: https://lore.kernel.org/r/20221128200834.1776868-1-bhupesh.sharma@linaro.org Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit f8a9f2704a0f9c41c639614b10aa19eab72eb4d2 Merge: 9490ae741db6 e567e58d6819 Author: Arnd Bergmann Date: Wed Nov 30 17:41:56 2022 +0100 Merge tag 'arm-soc/for-6.2/devicetree-arm64' of https://github.com/Broadcom/stblinux into soc/dt This pull request contains Broadcom ARM64-based SoCs Device Tree updates for 6.2, please pull the following: - Rafal describes the timer/watchdog block for the BCM4908 and BCM6858 SoCs - Krzysztof corrects invalid "reg" properties for the memory nodes that were off by one digit - Pierre updates a number of cache Device Tree node properties to be schema compliant * tag 'arm-soc/for-6.2/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: Update cache properties for broadcom arm64: dts: broadcom: trim addresses to 8 digits arm64: dts: broadcom: bcmbca: bcm6858: add TWD block arm64: dts: broadcom: bcmbca: bcm4908: add TWD block timer Link: https://lore.kernel.org/r/20221129191755.542584-2-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit a79168a0c00d710420c1758f6c38df89e12f0763 Author: Brian Foster Date: Wed Nov 30 08:41:01 2022 -0800 fs/remap_range: avoid spurious writeback on zero length request generic_remap_checks() can reduce the effective request length (i.e., after the reflink extend to EOF case is handled) down to zero. If this occurs, __generic_remap_file_range_prep() proceeds through dio serialization, file mapping flush calls, and may invoke file_modified() before returning back to the filesystem caller, all of which immediately check for len == 0 and return. While this is mostly harmless, it is spurious and not completely without side effect. A filemap write call can submit I/O (but not wait on it) when the specified end byte precedes the start but happens to land on the same aligned page boundary, which can occur from __generic_remap_file_range_prep() when len is 0. The dedupe path already has a len == 0 check to break out before doing range comparisons. Lift this check a bit earlier in the function to cover the general case of len == 0 and avoid the unnecessary work. While here, account for the case where generic_remap_check_len() may also reduce length to zero. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/remap_range.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 9490ae741db64089819c263cb01bb195fcb554e6 Merge: 33423a8bd2d8 b23024676a2f Author: Arnd Bergmann Date: Wed Nov 30 17:39:09 2022 +0100 Merge tag 'arm-soc/for-6.2/devicetree' of https://github.com/Broadcom/stblinux into soc/dt This pull request contains Broadcom ARM-based SoCs Device Tree changes for 6.2, please pull the following: - Linus adds support for the D-Link DWL-8610AP which is based upon the BCM53016 SoC and the D-Link DIR-890L routers - Maxime resolves a long standing issue affecting Raspberry Pi devices by switching entirely over to the VPU firmware clock provider rather than mixing the "bare metal" clock driver and VPU - Rafal corrects the description of the TP-Link router partitions to use the "safeloader" partition parser - Stefan fixes a number of invalid underscores in the bcm283x DTS files and also moves the ACT LED into a separate DTS include file for better re-use - Krzysztof aligns the LEDs DT nodes to the proper schema format - Pierre adds missing cache properties to various SoCs * tag 'arm-soc/for-6.2/devicetree' of https://github.com/Broadcom/stblinux: arm: dts: Update cache properties for broadcom ARM: dts: broadcom: align LED node names with dtschema ARM: dts: bcm283x: Move ACT LED into separate dtsi ARM: dts: bcm283x: Fix underscores in node names ARM: dts: BCM5301X: Correct description of TP-Link partitions ARM: dts: bcm47094: Add devicetree for D-Link DIR-890L dt-bindings: ARM: add bindings for the D-Link DIR-890L ARM: dts: bcm2835-rpi: Use firmware clocks for display ARM: dts: bcm283x: Remove bcm2835-rpi-common.dtsi from SoC DTSI ARM: dts: bcm53016: Add devicetree for D-Link DWL-8610AP dt-bindings: ARM: add bindings for the D-Link DWL-8610AP Link: https://lore.kernel.org/r/20221129191755.542584-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 33423a8bd2d8a6624881fc45bd8aa64cbe94419f Merge: 7b16ab92bbf8 e15031539490 Author: Arnd Bergmann Date: Wed Nov 30 17:26:26 2022 +0100 Merge tag 'juno-updates-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/dt Armv8 Juno/FVP updates for v6.2 Just few addtions including updates to cache information on various platforms to align well with the bindings, addition of cache information on FVP Rev C model, addition of SPE to Foundation model and updates to LED node names. * tag 'juno-updates-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: ARM: dts: vexpress: align LED node names with dtschema arm64: dts: fvp: Add information about L1 and L2 caches arm64: dts: fvp: Add SPE to Foundation FVP arm64: dts: Update cache properties for Arm Ltd platforms arm64: dts: juno: Add thermal critical trip points Link: https://lore.kernel.org/r/20221129115111.2464233-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 7b16ab92bbf8bdf96984d30335e708e0ac138045 Author: Alexandre Torgue Date: Mon Nov 28 14:33:39 2022 +0100 Revert "ARM: dts: stm32: add fake interrupt propoerty for ASync notif - TEMP/TO REMOVE" This reverts commit fb4ce97d9c5daafe100a83670c697b92c9d1bb45. Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20221128133339.25055-1-alexandre.torgue@foss.st.com Signed-off-by: Arnd Bergmann arch/arm/boot/dts/stm32mp131.dtsi | 2 -- 1 file changed, 2 deletions(-) commit c1a81f3bd9b40edc1444dfaeac33f92cff0e770a Author: Michal Luczaj Date: Thu Oct 13 21:12:23 2022 +0000 KVM: x86: Remove unused argument in gpc_unmap_khva() Remove the unused @kvm argument from gpc_unmap_khva(). Signed-off-by: Michal Luczaj Signed-off-by: Sean Christopherson Signed-off-by: David Woodhouse Signed-off-by: Paolo Bonzini virt/kvm/pfncache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit aba3caef58626f09b629085440eec5dd1368669a Author: Michal Luczaj Date: Thu Oct 13 21:12:22 2022 +0000 KVM: Shorten gfn_to_pfn_cache function names Formalize "gpc" as the acronym and use it in function names. No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: Michal Luczaj Signed-off-by: Sean Christopherson Signed-off-by: David Woodhouse Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 8 ++++---- arch/x86/kvm/xen.c | 30 +++++++++++++++--------------- include/linux/kvm_host.h | 21 ++++++++++----------- virt/kvm/pfncache.c | 20 ++++++++++---------- 4 files changed, 39 insertions(+), 40 deletions(-) commit 8acc35186ed63436bfaf60051c8bb53f344dcbfc Author: David Woodhouse Date: Sat Nov 19 09:27:46 2022 +0000 KVM: x86/xen: Add runstate tests for 32-bit mode and crossing page boundary Torture test the cases where the runstate crosses a page boundary, and and especially the case where it's configured in 32-bit mode and doesn't, but then switching to 64-bit mode makes it go onto the second page. To simplify this, make the KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUST ioctl also update the guest runstate area. It already did so if the actual runstate changed, as a side-effect of kvm_xen_update_runstate(). So doing it in the plain adjustment case is making it more consistent, as well as giving us a nice way to trigger the update without actually running the vCPU again and changing the values. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant Signed-off-by: Paolo Bonzini arch/x86/kvm/xen.c | 2 + .../testing/selftests/kvm/x86_64/xen_shinfo_test.c | 115 +++++++++++++++++---- 2 files changed, 97 insertions(+), 20 deletions(-) commit d8ba8ba4c801b794f47852a6f1821ea48f83b5d1 Author: David Woodhouse Date: Sun Nov 27 12:22:10 2022 +0000 KVM: x86/xen: Allow XEN_RUNSTATE_UPDATE flag behaviour to be configured Closer inspection of the Xen code shows that we aren't supposed to be using the XEN_RUNSTATE_UPDATE flag unconditionally. It should be explicitly enabled by guests through the HYPERVISOR_vm_assist hypercall. If we randomly set the top bit of ->state_entry_time for a guest that hasn't asked for it and doesn't expect it, that could make the runtimes fail to add up and confuse the guest. Without the flag it's perfectly safe for a vCPU to read its own vcpu_runstate_info; just not for one vCPU to read *another's*. I briefly pondered adding a word for the whole set of VMASST_TYPE_* flags but the only one we care about for HVM guests is this, so it seemed a bit pointless. Signed-off-by: David Woodhouse Message-Id: <20221127122210.248427-3-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini Documentation/virt/kvm/api.rst | 34 ++++++++++--- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/x86.c | 3 +- arch/x86/kvm/xen.c | 57 +++++++++++++++++----- include/uapi/linux/kvm.h | 4 ++ .../testing/selftests/kvm/x86_64/xen_shinfo_test.c | 14 ++++++ 6 files changed, 93 insertions(+), 20 deletions(-) commit 5ec3289b31ab9bb209be59cee360aac4b03f320a Author: David Woodhouse Date: Fri Nov 18 14:32:38 2022 +0000 KVM: x86/xen: Compatibility fixes for shared runstate area The guest runstate area can be arbitrarily byte-aligned. In fact, even when a sane 32-bit guest aligns the overall structure nicely, the 64-bit fields in the structure end up being unaligned due to the fact that the 32-bit ABI only aligns them to 32 bits. So setting the ->state_entry_time field to something|XEN_RUNSTATE_UPDATE is buggy, because if it's unaligned then we can't update the whole field atomically; the low bytes might be observable before the _UPDATE bit is. Xen actually updates the *byte* containing that top bit, on its own. KVM should do the same. In addition, we cannot assume that the runstate area fits within a single page. One option might be to make the gfn_to_pfn cache cope with regions that cross a page — but getting a contiguous virtual kernel mapping of a discontiguous set of IOMEM pages is a distinctly non-trivial exercise, and it seems this is the *only* current use case for the GPC which would benefit from it. An earlier version of the runstate code did use a gfn_to_hva cache for this purpose, but it still had the single-page restriction because it used the uhva directly — because it needs to be able to do so atomically when the vCPU is being scheduled out, so it used pagefault_disable() around the accesses and didn't just use kvm_write_guest_cached() which has a fallback path. So... use a pair of GPCs for the first and potential second page covering the runstate area. We can get away with locking both at once because nothing else takes more than one GPC lock at a time so we can invent a trivial ordering rule. The common case where it's all in the same page is kept as a fast path, but in both cases, the actual guest structure (compat or not) is built up from the fields in @vx, following preset pointers to the state and times fields. The only difference is whether those pointers point to the kernel stack (in the split case) or to guest memory directly via the GPC. The fast path is also fixed to use a byte access for the XEN_RUNSTATE_UPDATE bit, then the only real difference is the dual memcpy. Finally, Xen also does write the runstate area immediately when it's configured. Flip the kvm_xen_update_runstate() and …_guest() functions and call the latter directly when the runstate area is set. This means that other ioctls which modify the runstate also write it immediately to the guest when they do so, which is also intended. Update the xen_shinfo_test to exercise the pathological case where the XEN_RUNSTATE_UPDATE flag in the top byte of the state_entry_time is actually in a different page to the rest of the 64-bit word. Signed-off-by: David Woodhouse Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/xen.c | 370 +++++++++++++++------ arch/x86/kvm/xen.h | 6 +- .../testing/selftests/kvm/x86_64/xen_shinfo_test.c | 12 +- 4 files changed, 276 insertions(+), 113 deletions(-) commit c93a25d77592fa191a14a3fe937f0b18047cafde Merge: 3deeb5b079f7 11f24029403e Author: Arnd Bergmann Date: Wed Nov 30 15:06:51 2022 +0100 Merge tag 'mvebu-dt-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt mvebu dt for 6.2 (part 1) Fix assigned-addresses for every PCIe Root Port Align LED node names with dtschema Add a new kirkwood based board: Zyxel NSA310S Fix compatible string for gpios for Armada 38x and 39x Add interrupts for watchdog on Armada XP Turris Omnia (Armada 385 based): - Add switch port 6 node - Add ethernet aliases Switch to using gpiod API in pm-board code * tag 'mvebu-dt-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: dts: armada-xp: add interrupts for watchdog ARM: dts: armada: align LED node names with dtschema ARM: mvebu: switch to using gpiod API in pm-board code ARM: dts: armada-39x: Fix compatible string for gpios ARM: dts: armada-38x: Fix compatible string for gpios ARM: dts: turris-omnia: Add switch port 6 node ARM: dts: turris-omnia: Add ethernet aliases ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port ARM: dts: kirkwood: Add Zyxel NSA310S board Link: https://lore.kernel.org/r/87cz979adf.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit c62256dda37133a48d56cecc15e4a4d527d4cc46 Author: Jens Axboe Date: Wed Nov 30 08:25:46 2022 -0700 Revert "blk-cgroup: Flush stats at blkgs destruction path" This reverts commit dae590a6c96c799434e0ff8156ef29b88c257e60. We've had a few reports on this causing a crash at boot time, because of a reference issue. While this problem seemginly did exist before the patch and needs solving separately, this patch makes it a lot easier to trigger. Link: https://lore.kernel.org/linux-block/CA+QYu4oxiRKC6hJ7F27whXy-PRBx=Tvb+-7TQTONN8qTtV3aDA@mail.gmail.com/ Link: https://lore.kernel.org/linux-block/69af7ccb-6901-c84c-0e95-5682ccfb750c@acm.org/ Signed-off-by: Jens Axboe block/blk-cgroup.c | 15 +-------------- include/linux/cgroup.h | 1 - kernel/cgroup/rstat.c | 20 -------------------- 3 files changed, 1 insertion(+), 35 deletions(-) commit 2133dc91d6658242009177b564ac47c49e08668a Author: Takashi Sakamoto Date: Wed Nov 30 23:33:13 2022 +0900 ALSA: dice: add support for Focusrite Saffire Pro 40 with TCD3070 ASIC TC Applied Technologies (TCAT) produces TCD3070 as final DICE ASIC for communication in IEEE 1394 bus for IEC 61883-1/6 protocol. As long as I know, latter model of Focusrite Saffire Pro 40 is an application of the ASIC and only in the market for consumers. This patchset adds support for the device. The device has several remarkable points. 1. No support for extended synchronization information section in TCAT general protocol. The value of GLOBAL_EXTENDED_STATUS register is always zero. Additionally, NOTIFY_EXT_STATUS message is never emitted. 2. No support for TCAT protocol extension. Hard coding is required for format of CIP payload. 3. During several seconds after changing sampling rate, the block to process PCM frames is under disfunction. When starting packet streaming during the state, the block is never function till configuring different sampling rate and several seconds. This commit adds support for the device. The item 1 and 2 can be adaptable, while item 3 is not. It's not preferable that user process is forced to sleep during the disfunction in the call of ioctl(2) with SNDRV_PCM_IOCTL_HW_PARAMS or SNDRV_PCM_IOCTL_PREPARE request. It's inconvenient but let user configure preferable sampling rate in advance of starting PCM substream. The content of configuration ROM in the device I used is available at: * https://github.com/takaswie/am-config-roms/ I note that any mixer control operation is implemented by unique transaction. The frame of request consists of 16 bytes header followed by payload. header (4 quadlets): 1st: the type of request, prefixed with 0x8000 2nd: counter at 2 bytes in MSB side, the length of data at 2 bytes in LSB side 3rd: parameter 0 4th: parameter 1 payload (variable length if need): 5th-: data according to parameters The request frame is sent by block write request to 0x'ffff'e040'01c0. The frame of response is similar to the frame of request, but it is header only, thus fixed to 16 bytes. The response frame is sent to the address which is registered by lock transaction to 0x'ffff'e040'0008. If the operation results in batch of data, the 2nd quadlet of header includes the length of data like request. The data is itself readable by read block request to 0x'ffff'e040'0030, which includes both header and payload for data, thus the length to read should be the length of data plus 16 bytes for header The actual value of request, parameter 0, parameter 1, and data is unclear yet. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20221130143313.43880-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai sound/firewire/dice/Makefile | 2 +- sound/firewire/dice/dice-focusrite.c | 25 +++++++++++++++++++++++++ sound/firewire/dice/dice.c | 10 ++++++++++ sound/firewire/dice/dice.h | 1 + 4 files changed, 37 insertions(+), 1 deletion(-) commit 7d579eff3e55a256fdd71624543747ed4d7fa38b 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 (cherry picked from commit 6ee6692520133a14b0d0f3ddddf8c44783cfee06) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d299f5bfe212b68bde981153a00926e817ee82a 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: 8e5f37828145 ("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 (cherry picked from commit 14347a9c889fbdbae81e500f6c6e313f5d8e5271) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/uc/intel_huc.c | 47 ++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 13 deletions(-) commit 3deeb5b079f7142608186d1cb8d8d5ed56693f3c Merge: ca1a1892f8eb 99d2900f5fa4 Author: Arnd Bergmann Date: Wed Nov 30 15:06:00 2022 +0100 Merge tag 'mvebu-dt64-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt mvebu dt64 for 6.2 (part 1) Update cache properties for various Marvell SoCs Reserved memory for optee firmware Turris Mox (Armada 3720 based Socs) - Define slot-power-limit-milliwatt for PCIe - Add missing interrupt for RTC * tag 'mvebu-dt64-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: dts: marvell: add optee FW definitions arm64: dts: Update cache properties for marvell arm64: dts: armada-3720-turris-mox: Add missing interrupt for RTC arm64: dts: armada-3720-turris-mox: Define slot-power-limit-milliwatt for PCIe Link: https://lore.kernel.org/r/87fse39aer.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit ca1a1892f8eb8697279f7fbcd55def12c361f8a3 Merge: 799423ec5a6d eb93f1d7c91d Author: Arnd Bergmann Date: Wed Nov 30 15:04:49 2022 +0100 Merge tag 'at91-dt-6.2-3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt AT91 DT for 6.2 #3 It contains: - proper power rail description for SDMMC devices available on SAMA7G5-EK - OTP controller has been added for LAN966X devices * tag 'at91-dt-6.2-3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: lan966x: Add otp support ARM: dts: at91: sama7g5ek: align power rails for sdmmc0/1 Link: https://lore.kernel.org/r/20221125140525.384928-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit 799423ec5a6defd9d56d50ebefc7690c06b2af73 Merge: 1e52d6c8113e 42a79edd4a3d Author: Arnd Bergmann Date: Wed Nov 30 15:03:42 2022 +0100 Merge tag 'musb-for-v6.2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/dt Devicetree related musb changes for omap3 for v6.2 Recent musb driver regressions eposed two issues for musb legacy probing. The changes to use device_set_of_node_from_dev() confuse the legacy interconnect code. And we now have to manually populate the musb core irq resources. The musb driver has a fix for these, but it's not a good long term solution. To fix the issue properly, let's just update musb to probe with ti-sysc interconnect driver with proper devicetree data. This allows dropping most of the musb driver workaround later on. And with these changes we have the omap2430 musb glue layer behaving the same way for all the SoCs using it. We need to patch the ti-sysc driver quirks, and add devicetree data to make things work. And we want to drop the legacy data too to avoid pointless warnings. As we have a musb driver workaround, these changes are not needed as fixes and can wait for the merge window. * tag 'musb-for-v6.2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Drop legacy hwmod data for omap3 otg ARM: dts: Update omap3 musb to probe with ti-sysc bus: ti-sysc: Add otg quirk flags for omap3 musb Link: https://lore.kernel.org/r/pull-1669364566-84575@atomide.com Signed-off-by: Arnd Bergmann commit 1e52d6c8113e91575ccf2579effb6ab7f1923e9b Merge: bcbc46852835 4f15fc7c0f28 Author: Arnd Bergmann Date: Wed Nov 30 15:03:08 2022 +0100 Merge tag 'omap-for-v6.2/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/dt Devicetree fixes for omaps for v6.2 Two devicetree fixes for omaps. These fixes are not urgent and can wait for the merge window: - Fix up the node names and missing #pwm-cells property for ti,omap-dmtimer-pwm to avoid warnings when the the related yaml binding gets merged - Fix TDA998x port addressing * tag 'omap-for-v6.2/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: Unify pwm-omap-dmtimer node names ARM: dts: am335x: Fix TDA998x ports addressing ARM: dts: am335x-pcm-953: Define fixed regulators in root node Link: https://lore.kernel.org/r/pull-1669363695-856423@atomide.com Signed-off-by: Arnd Bergmann commit bcbc46852835a64d002093424faf5111bce8864a Merge: 0c5f21291c1e afcd946be11c Author: Arnd Bergmann Date: Tue Nov 29 21:16:46 2022 +0100 Merge tag 'qcom-arm64-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt Qualcomm ARM64 DTS updates for 6.2 This introduces support for SM4250, SM6115, SM6375 and SDM670 platforms and Sony Xperia 10 IV, Google Pixel 3a, OnePlus 3, OnePlus 3T, Google Pazquel and OnePlus Nord N100. A wide variety of updates to align with DeviceTree bindings across many/most platforms is introduced, and incorrectly styled comments are adjusted across the tree. Apps RSC is added to the cluster-idle power-domain across SM8150, SM8250, SM8350 and SM8450, to ensure sleep and wake votes are flushed as the last core is being powered down. Remoteproc firmware patches are aligned with agreed upon structure used in linux-firmware across Inforce 6560, Lenovo Miix 630, various Sony Xperia devices and Samsung Galaxy Book2 (although these are not available in linux-firmware today). On IPQ8074 CPU clocks are added, thermal zones are introduced and vqmmc supply is specified for the HK01 board. Alcatel OneTouch Idol 3 gains LED nodes and Samsung Galaxy A3U gained vibrator support. The application subsystem's IOMMU and the display subsystem is enabled for MSM8953. A new CPU frequency table is introduced for MSM8996Pro, to properly describe it separate of MSM8996. The GPU opp-table is extended as well. On SC7180 USB is marked as a wakeup source, USB gains required-opps to ensure that the core voltage rail is voted for as needed. The description of the fingerprint sensor in Trogdor is corrected. On SC7280 Wake-on-WLAN is introduced, and PHY parameters for the SNPS USB PHY is defined across SC7280. The memory map across Google Herobrine is adjusted, to regain unused memory on the WiFi SKUs. A LTE SKU of the Evoker board is introduced and the bard gains touchscreen. NVME support is disabled on Villager boards, as it's not used. PCIe support is introduced on SC8280XP, with NVMe, SDX55 (5G) and WiFi enabled on the Lenovo Thinkpad X13s and Compute Reference Device. ADCs and thermal zones are intrduced for the same. Lenovo Thinkpad X13s gains LID switch support. Fairphone FP3 gains touchscreen support. Support for Xiaomi Poco F1 variant with EBBG panel. The round-robin ADC is enabled across DB845c, OnePlus devices and Pocophone F1 devices. The displayport controller on SDM845 is introduced. SM6350 gains SDHCI support and on Sony Xperia 10 III sd-card, touchscreen and GPI DMA is enabled. Fairphone FP4 got SD-card support. UFS PHY register ranges are corrected across SM8150, SM8250, SM8350 and SM8450. Sony Xperia 1 II got NFC support and Sony Xperia 5 III got PMIC regulators defined and USB definition corrected, to enable USB3. The SDHCI controller is described for SM8450 and microSD support is enabled for the HDK and QRD devices. SM8450 also gains camera CCI interface and display clock controller. * tag 'qcom-arm64-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (261 commits) arm64: dts: qcom: sdm845-polaris: Don't duplicate DMA assignment arm64: dts: qcom: sm8350-sagami: Wire up USB regulators and fix USB3 arm64: dts: qcom: sm8350-sagami: Add most RPMh regulators arm64: dts: qcom: sc7280: Make herobrine-audio-rt5682 mic dtsi's match more arm64: dts: qcom: trim addresses to 8 digits arm64: dts: msm8998: unify PCIe clock order withMSM8996 arm64: dts: msm8998: add MSM8998 specific compatible arm64: dts: qcom: sc8280xp-x13s: enable WiFi controller arm64: dts: qcom: sc8280xp-x13s: enable modem arm64: dts: qcom: sc8280xp-x13s: enable NVMe SSD arm64: dts: qcom: sc8280xp-crd: enable WiFi controller arm64: dts: qcom: sc8280xp-crd: enable SDX55 modem arm64: dts: qcom: sc8280xp-crd: enable NVMe SSD arm64: dts: qcom: sc8280xp-crd: rename backlight and misc regulators arm64: dts: qcom: sa8295p-adp: enable PCIe arm64: dts: qcom: sc8280xp/sa8540p: add PCIe2-4 nodes arm64: dts: qcom: add sdm670 and pixel 3a device trees arm64: dts: qcom: sc7280: Add Google Herobrine WIFI SKU dts fragment arm64: dts: qcom: sc7280: Mark all Qualcomm reference boards as LTE arm64: dts: qcom: sm7225-fairphone-fp4: Enable SD card ... Link: https://lore.kernel.org/r/20221124100650.1982448-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 9049e1ca41983ab773d7ea244bee86d7835ec9f5 Author: Yang Yingliang Date: Mon Nov 28 23:16:12 2022 +0800 genirq/irqdesc: Don't try to remove non-existing sysfs files Fault injection tests trigger warnings like this: kernfs: can not remove 'chip_name', no directory WARNING: CPU: 0 PID: 253 at fs/kernfs/dir.c:1616 kernfs_remove_by_name_ns+0xce/0xe0 RIP: 0010:kernfs_remove_by_name_ns+0xce/0xe0 Call Trace: remove_files.isra.1+0x3f/0xb0 sysfs_remove_group+0x68/0xe0 sysfs_remove_groups+0x41/0x70 __kobject_del+0x45/0xc0 kobject_del+0x29/0x40 free_desc+0x42/0x70 irq_free_descs+0x5e/0x90 The reason is that the interrupt descriptor sysfs handling does not roll back on a failing kobject_add() during allocation. If the descriptor is freed later on, kobject_del() is invoked with a not added kobject resulting in the above warnings. A proper rollback in case of a kobject_add() failure would be the straight forward solution. But this is not possible due to the way how interrupt descriptor sysfs handling works. Interrupt descriptors are allocated before sysfs becomes available. So the sysfs files for the early allocated descriptors are added later in the boot process. At this point there can be nothing useful done about a failing kobject_add(). For consistency the interrupt descriptor allocation always treats kobject_add() failures as non-critical and just emits a warning. To solve this problem, keep track in the interrupt descriptor whether kobject_add() was successful or not and make the invocation of kobject_del() conditional on that. [ tglx: Massage changelog, comments and use a state bit. ] Fixes: ecb3f394c5db ("genirq: Expose interrupt information through sysfs") Signed-off-by: Yang Yingliang Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20221128151612.1786122-1-yangyingliang@huawei.com kernel/irq/internals.h | 2 ++ kernel/irq/irqdesc.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) commit 50dc8d18f62d58a2330f08fddc069f263d191c90 Author: Stephen Rothwell Date: Wed Nov 30 12:32:57 2022 +1100 driver core: fix up missed drivers/s390/char/hmcdrv_dev.c class.devnode() conversion. Fixes: ff62b8e6588f ("driver core: make struct class.devnode() take a const *") Link: https://lore.kernel.org/r/20221130123851.6a9f2242@canb.auug.org.au Signed-off-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman drivers/s390/char/hmcdrv_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69b14fde0b8dd159ba19d2b2083a0f2958a9130c Author: Stephen Rothwell Date: Wed Nov 30 12:13:00 2022 +1100 driver core: fix up missed scsi/cxlflash class.devnode() conversion. Fixes: ff62b8e6588f ("driver core: make struct class.devnode() take a const *") Link: https://lore.kernel.org/r/20221130123851.6a9f2242@canb.auug.org.au Signed-off-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman drivers/scsi/cxlflash/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1dd6bf6199752890d8c59d895dd45094da51d1f Author: Artem Lukyanov Date: Wed Nov 30 11:52:47 2022 +0300 ASoC: amd: yc: Add Xiaomi Redmi Book Pro 14 2022 into DMI table This model requires an additional detection quirk to enable the internal microphone - BIOS doesn't seem to support AcpDmicConnected (nothing in acpidump output). Signed-off-by: Artem Lukyanov Link: https://lore.kernel.org/r/20221130085247.85126-1-dukzcry@ya.ru Signed-off-by: Mark Brown sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e063330a77edbdc57a142a27a82e51dc1361ab9d Author: Ricardo Ribalda Date: Sun Nov 27 21:04:15 2022 +0100 ASoC: SOF: mediatek: add shutdown callback If we do not shutdown the peripheral properly at shutdown, the whole system crashes after kexec() on the first io access. Let's implement the appropriate callback. Signed-off-by: Ricardo Ribalda Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221127-mtk-snd-v1-0-b7886faa612b@chromium.org Signed-off-by: Mark Brown sound/soc/sof/mediatek/mt8186/mt8186.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 63b8ed26cd093ecc1bcdd1fd841f238a52c11031 Author: Johan Hovold Date: Tue Nov 29 15:18:57 2022 +0100 USB: serial: xr: avoid requesting zero DTE rate When the requested line speed is B0 (hangup) there is no need to use the current speed in the line-coding request. This specifically avoids requesting a zero DTE rate when the current speed is B0, which could potentially confuse buggy firmware. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/xr_serial.c | 2 -- 1 file changed, 2 deletions(-) commit 188c9c2e0c7f4ae864113f80c40bafb394062271 Author: Johan Hovold Date: Tue Nov 29 15:18:19 2022 +0100 USB: serial: f81534: fix division by zero on line-speed change The driver leaves the line speed unchanged in case a requested speed is not supported. Make sure to handle the case where the current speed is B0 (hangup) without dividing by zero when determining the clock source. Fixes: 3aacac02f385 ("USB: serial: f81534: add high baud rate support") Cc: stable@vger.kernel.org # 4.16 Cc: Ji-Ze Hong (Peter Hong) Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/f81534.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit a08ca6ebafe615c9028c53fc4c9e6c9b2b1f2888 Author: Johan Hovold Date: Tue Nov 29 15:17:49 2022 +0100 USB: serial: f81232: fix division by zero on line-speed change The driver leaves the line speed unchanged in case a requested speed is not supported. Make sure to handle the case where the current speed is B0 (hangup) without dividing by zero when determining the clock source. Fixes: 268ddb5e9b62 ("USB: serial: f81232: add high baud rate support") Cc: stable@vger.kernel.org # 5.2 Cc: Ji-Ze Hong (Peter Hong) Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/f81232.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 7428a253315cefa34e6092a0119c56cb3a1c0c12 Author: Mathias Nyman Date: Wed Nov 30 11:19:44 2022 +0200 xhci: remove unused stream_id parameter from xhci_handle_halted_endpoint() The stream_id parameter is no longer used when handling halted endpoints. Remove it Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20221130091944.2171610-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit a1575120972ecd7baa6af6a69e4e7ea9213bde7c Author: Mathias Nyman Date: Wed Nov 30 11:19:43 2022 +0200 xhci: Prevent infinite loop in transaction errors recovery for streams Make sure to also limit the amount of soft reset retries for transaction errors on streams in cases where the transaction error event doesn't point to any specific TRB. In these cases we don't know the TRB or stream ring, but we do know which endpoint had the error. To keep error counting simple and functional, move the current err_count from ring structure to endpoint structure. Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20221130091944.2171610-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 14 ++++++++++---- drivers/usb/host/xhci.h | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) commit c3bbacd61baace2f4fbab17012c3d149df2d50f1 Author: Mathias Nyman Date: Wed Nov 30 11:19:42 2022 +0200 xhci: disable U3 suspended ports in S4 hibernate poweroff_late stage Disable U3 suspended ports in hibernate S4 poweroff_late for systems with XHCI_RESET_TO_DEFAULT quirk, if wakeup is not enabled. This reduces the number of self-powered usb devices from surviving in U3 suspended state into next reboot. Bootloader/firmware on these systems can't handle usb ports in U3, and will timeout, causing extra delay during reboot/restore from S4. Add pci_poweroff_late() callback to struct usb_hcd to get this done at the correct stage in hibernate. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20221130091944.2171610-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd-pci.c | 13 ++++++++++++ drivers/usb/host/xhci-pci.c | 52 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/usb/hcd.h | 3 +++ 3 files changed, 68 insertions(+) commit 705c333a7ad2003ad99d96c19a31619b19ad14b9 Author: Mathias Nyman Date: Wed Nov 30 11:19:41 2022 +0200 xhci: export two xhci_hub functions for xhci-pci module usage some Intel Alder Lake xHC hosts on ChromeOS platforms need special workarounds touching port registers at xHC pci host hibernate. Export xhci_port_state_to_neutral() and xhci_find_slot_id_by_port() so they can be called from xhci-pci.c and thus the xhci-pci module. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20221130091944.2171610-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit fed70b61ef2c0aed54456db3d485b215f6cc3209 Author: Reka Norman Date: Wed Nov 30 11:19:40 2022 +0200 xhci: Apply XHCI_RESET_TO_DEFAULT quirk to ADL-N ADL-N systems have the same issue as ADL-P, where a large boot firmware delay is seen if USB ports are left in U3 at shutdown. So apply the XHCI_RESET_TO_DEFAULT quirk to ADL-N as well. This patch depends on commit 34cd2db408d5 ("xhci: Add quirk to reset host back to default state at shutdown"). The issue it fixes is a ~20s boot time delay when booting from S5. It affects ADL-N devices, and ADL-N support was added starting from v5.16. Cc: stable@vger.kernel.org Signed-off-by: Reka Norman Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20221130091944.2171610-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2a25e66d676dfb9b018abd503deed3d38a892dec Author: Longfang Liu Date: Wed Nov 30 11:19:39 2022 +0200 xhci: print warning when HCE was set When HCE(Host Controller Error) is set, it means that the xhci hardware controller has an error at this time, but the current xhci driver software does not log this event. By adding an HCE event detection in the xhci interrupt processing interface, a warning log is output to the system, which is convenient for system device status tracking. Signed-off-by: Longfang Liu Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20221130091944.2171610-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 5 +++++ 1 file changed, 5 insertions(+) commit 51daa42d6b86efa366320b99e7bbe29a490ed348 Author: Greg Kroah-Hartman Date: Wed Nov 30 12:02:13 2022 +0100 Revert "i915: Move list_count() to list.h for broader use" This reverts commit a9efc04cfd05690e91279f41c2325c46335c43ef as it breaks the build. Link: https://lore.kernel.org/r/20221130131854.35b58b16@canb.auug.org.au Link: https://lore.kernel.org/r/202211301628.iwMjPVMp-lkp@intel.com Cc: Lucas De Marchi Cc: Jani Nikula Cc: Andy Shevchenko Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman drivers/gpu/drm/i915/gt/intel_engine_cs.c | 13 ++++++++++++- include/linux/list.h | 15 --------------- 2 files changed, 12 insertions(+), 16 deletions(-) commit 54aa8af53905e39a825773883914810033f4d3d3 Author: Greg Kroah-Hartman Date: Wed Nov 30 12:02:13 2022 +0100 Revert "usb: gadget: hid: Convert to use list_count()" This reverts commit 33f00f41d963c86176dba2f9faff9b428a542e60 as it breaks the build. Link: https://lore.kernel.org/r/20221130131854.35b58b16@canb.auug.org.au Link: https://lore.kernel.org/r/202211301628.iwMjPVMp-lkp@intel.com Cc: Andy Shevchenko Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/hid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit acebf61919199771b5d7b92c68c5b515dfcbf800 Author: Greg Kroah-Hartman Date: Wed Nov 30 12:02:12 2022 +0100 Revert "usb: gadget: udc: bcm63xx: Convert to use list_count()" This reverts commit c2d9d02f7bf3c641f9b8e6c9f5de1e564cdeca69 as it breaks the build. Link: https://lore.kernel.org/r/20221130131854.35b58b16@canb.auug.org.au Link: https://lore.kernel.org/r/202211301628.iwMjPVMp-lkp@intel.com Cc: Andy Shevchenko Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/bcm63xx_udc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 33379c054211a5144ffae84e9e3c80e2e62416a9 Author: Greg Kroah-Hartman Date: Wed Nov 30 12:02:11 2022 +0100 Revert "xhci: Convert to use list_count()" This reverts commit b47ec9727f47d1dce4e8cbc9aef01c80b2332535 as it breaks the build. Link: https://lore.kernel.org/r/20221130131854.35b58b16@canb.auug.org.au Link: https://lore.kernel.org/r/202211301628.iwMjPVMp-lkp@intel.com Cc: Mathias Nyman Cc: Andy Shevchenko Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 274d842fa1efd9449e62222c8896e0be11621f1f Author: Benjamin Gray Date: Wed Nov 9 15:51:10 2022 +1100 powerpc/tlb: Add local flush for page given mm_struct and psize Adds a local TLB flush operation that works given an mm_struct, VA to flush, and page size representation. Most implementations mirror the surrounding code. The book3s/32/tlbflush.h implementation is left as a BUILD_BUG because it is more complicated and not required for anything as yet. This removes the need to create a vm_area_struct, which the temporary patching mm work does not need. Signed-off-by: Benjamin Gray Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221109045112.187069-8-bgray@linux.ibm.com arch/powerpc/include/asm/book3s/32/tlbflush.h | 9 +++++++++ arch/powerpc/include/asm/book3s/64/tlbflush.h | 7 +++++++ arch/powerpc/include/asm/nohash/tlbflush.h | 7 +++++++ arch/powerpc/mm/nohash/tlb.c | 8 ++++++++ 4 files changed, 31 insertions(+) commit d34471c9bd5d47ab148dd68817631a4238f755c4 Author: Benjamin Gray Date: Wed Nov 9 15:51:09 2022 +1100 powerpc/mm: Remove flush_all_mm, local_flush_all_mm These functions were introduced for "cxl: Enable global TLBIs for cxl contexts" [1], which ended up using them for Radix only. They were never implemented on Hash (and creating an implementation appears to be difficult), so nothing can actually rely on them. They behave differently to the existing surrounding functions too, in that they actually need to do something on Hash. The other functions are primarily for use in generic code that expects their definitions, but Hash updates the TLB during PTE updates. After replacing the only usage with the Radix specific version, there are no more users of these functions, and given they are not implemented anyway it is safe to delete them. [1]: https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170903181513.29635-1-fbarrat@linux.vnet.ibm.com/ Signed-off-by: Benjamin Gray Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221109045112.187069-7-bgray@linux.ibm.com arch/powerpc/include/asm/book3s/64/tlbflush-hash.h | 22 ---------------------- arch/powerpc/include/asm/book3s/64/tlbflush.h | 15 --------------- 2 files changed, 37 deletions(-) commit 0f0a0a6091e678b1a75078ecd6b02176f3228dbb Author: Benjamin Gray Date: Wed Nov 9 15:51:08 2022 +1100 cxl: Use radix__flush_all_mm instead of generic flush_all_mm The generic implementation of this function isn't really generic (Hash is not implemented). Unfortunately, the runtime warnings cannot be replaced with BUILD_BUG's, so it seems safer not to provide a stub in the first place. Signed-off-by: Benjamin Gray Reviewed-by: Andrew Donnellan Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221109045112.187069-6-bgray@linux.ibm.com arch/powerpc/include/asm/mmu_context.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit baf1ed24b27db475b38f534953885d0425e2232d Author: Benjamin Gray Date: Wed Nov 9 15:51:07 2022 +1100 powerpc/mm: Remove empty hash__ functions The empty hash__* functions are unnecessary. The empty definitions were introduced when 64-bit Hash support was added, as the functions were still used in generic code. These empty definitions were prefixed with hash__ when Radix support was added, and new wrappers with the original names were added that selected the Radix or Hash version based on radix_enabled(). But the hash__ prefixed functions were not part of a public interface, so there is no need to include them for compatibility with anything. Generic code will use the non-prefixed wrappers, and Hash specific code will know that there is no point in calling them (or even worse, call them and expect them to do something). Signed-off-by: Benjamin Gray Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221109045112.187069-5-bgray@linux.ibm.com arch/powerpc/include/asm/book3s/64/tlbflush-hash.h | 28 ---------------------- arch/powerpc/include/asm/book3s/64/tlbflush.h | 27 +++++++-------------- 2 files changed, 9 insertions(+), 46 deletions(-) commit 071c95c1acbd96e76bab8b25b5cad0d71a011f37 Author: Benjamin Gray Date: Wed Nov 9 15:51:05 2022 +1100 powerpc/code-patching: Use WARN_ON and fix check in poking_init BUG_ON() when failing to initialise the code patching window is unnecessary, and use of BUG_ON is discouraged. We don't set poking_init_done in this case, so failure to init the boot CPU will result in a strict RWX error when a following patch_instruction uses raw_patch_instruction. If it only fails for later CPUs, they won't be onlined in the first place. The return value of cpuhp_setup_state() is also >= 0 on success, so check for < 0. Signed-off-by: Benjamin Gray Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221109045112.187069-3-bgray@linux.ibm.com arch/powerpc/lib/code-patching.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 3671f4ebe3eb12e7222e4d7b0f94e85cfe34253a Author: Jordan Niethe Date: Wed Nov 9 15:51:04 2022 +1100 powerpc: Allow clearing and restoring registers independent of saved breakpoint state For the coming temporary mm used for instruction patching, the breakpoint registers need to be cleared to prevent them from accidentally being triggered. As soon as the patching is done, the breakpoints will be restored. The breakpoint state is stored in the per-cpu variable current_brk[]. Add a suspend_breakpoints() function which will clear the breakpoint registers without touching the state in current_brk[]. Add a pair function restore_breakpoints() which will move the state in current_brk[] back to the registers. Signed-off-by: Jordan Niethe Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221109045112.187069-2-bgray@linux.ibm.com arch/powerpc/include/asm/debug.h | 2 ++ arch/powerpc/kernel/process.c | 38 +++++++++++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) commit e082e99f6f87f5204b2531d5a3db7bbd929d23b1 Author: Pali Rohár Date: Sat Aug 20 14:33:27 2022 +0200 powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary If there's no PCI host bridge with ISA then check for PCI host bridge with alias "pci0" (first PCI host bridge) and if it exists then choose it as the primary PCI host bridge. This makes choice of primary PCI host bridge more stable across boots and updates as the last fallback candidate for primary PCI host bridge (if there is no choice) is selected arbitrary. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220820123327.20551-1-pali@kernel.org arch/powerpc/sysdev/fsl_pci.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 67bbb62f61e810734da0a1577a9802ddaed24140 Author: Pali Rohár Date: Fri Sep 30 14:39:01 2022 +0200 powerpc: dts: turris1x.dts: Add channel labels for temperature sensor Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip itself is located on the board) and channel 1 of SA56004ED chip refers to external sensor which is connected to temperature diode of the P2020 CPU. Fixes: 54c15ec3b738 ("powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers") Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220930123901.10251-1-pali@kernel.org arch/powerpc/boot/dts/turris1x.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d5090716be6791ada9ee142163a4934c1c147aaa Author: Thomas Weißschuh Date: Sat Nov 26 06:10:00 2022 +0100 powerpc/book3e: remove #include Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include ") removed the usage of the define UTS_RELEASE but forgot to drop the include. utsrelease.h is potentially generated on each build. By removing the unused include we can get rid of some spurious recompilations. Fixes: 7ad4bd887d27 ("powerpc/book3e: get rid of #include ") Signed-off-by: Thomas Weißschuh Reviewed-by: Masahiro Yamada Reviewed-by: Christophe Leroy [mpe: Fix typo in change log and add more explanation] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221126051002.123199-2-linux@weissschuh.net arch/powerpc/mm/nohash/kaslr_booke.c | 1 - 1 file changed, 1 deletion(-) commit 260095926d3956071c6699a28824c3f0fa7cd97a Author: Naveen N. Rao Date: Tue Nov 22 12:10:54 2022 +0530 selftests/powerpc: Account for offline cpus in perf-hwbreak test For systemwide tests, use online cpu mask to only open events on online cpus. This enables this test to work on systems in lower SMT modes. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/15fd447dcefd19945a7d31f0a475349f548a3603.1669096083.git.naveen.n.rao@linux.vnet.ibm.com .../selftests/powerpc/ptrace/perf-hwbreak.c | 45 +++++++++++++++++++--- 1 file changed, 39 insertions(+), 6 deletions(-) commit 616ad3f4aac287c48b66c92cb777395b4465ed4f Author: Naveen N. Rao Date: Tue Nov 22 12:10:53 2022 +0530 selftests/powerpc: Bump up rlimit for perf-hwbreak test The systemwide perf hardware breakpoint test tries to open a perf event on each cpu. On large systems, we run out of file descriptors and fail the test. Instead, have the test set the file descriptor limit to an arbitraty high value. Reported-by: Rohan Deshpande Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/187fed5843cecc1e5066677b6296ee88337d7bef.1669096083.git.naveen.n.rao@linux.vnet.ibm.com tools/testing/selftests/powerpc/ptrace/perf-hwbreak.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 71ae6305ad41cfd1ac5aa91d356e71c7a537df2e Author: Naveen N. Rao Date: Tue Nov 22 12:10:52 2022 +0530 selftests/powerpc: Move perror closer to its use Right now, if perf_event_open() fails for the systemwide tests, error report is printed too late, sometimes after subsequent system calls. Move use of perror() to the main function, just after the syscall. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/372ac78c27899f1f612fbd6ac796604a4a9310aa.1669096083.git.naveen.n.rao@linux.vnet.ibm.com .../testing/selftests/powerpc/ptrace/perf-hwbreak.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit dea681c91d3cd5326f87d0a3c93079573e22ce9a Author: Christoph Hellwig Date: Tue Nov 22 08:22:25 2022 +0100 powerpc/ps3: mark ps3_system_bus_type static ps3_system_bus_type is only used inside of system-bus.c, so remove the external declaration and the very outdated comment next to it. Signed-off-by: Christoph Hellwig Acked-by: Geoff Levand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221122072225.423432-1-hch@lst.de arch/powerpc/include/asm/ps3.h | 4 ---- arch/powerpc/platforms/ps3/system-bus.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) commit 611c020239fde0e9e81435cd1690f566c0cdd0e0 Merge: 9a04b0febb07 2e7ec190a0e3 Author: Michael Ellerman Date: Wed Nov 30 21:46:06 2022 +1100 Merge branch 'fixes' into next Merge our fixes branch to bring in some changes that are prerequisites for work in next. commit f2f2494c8aa3cc317572c4674ef256005ebc092b Author: Andi Kleen Date: Fri Nov 18 15:43:57 2022 -0800 Add process name and pid to locks warning It's fairly useless to complain about using an obsolete feature without telling the user which process used it. My Fedora desktop randomly drops this message, but I would really need this patch to figure out what triggers is. [ jlayton: print pid as well as process name ] Signed-off-by: Andi Kleen Signed-off-by: Jeff Layton fs/locks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77c67530e1f95ac25c7075635f32f04367380894 Author: Jeff Layton Date: Wed Nov 16 09:36:07 2022 -0500 nfsd: use locks_inode_context helper nfsd currently doesn't access i_flctx safely everywhere. This requires a smp_load_acquire, as the pointer is set via cmpxchg (a release operation). Acked-by: Chuck Lever Reviewed-by: Christoph Hellwig Signed-off-by: Jeff Layton fs/nfsd/nfs4state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 17b985def2a859d66d27afee442147468a6a4ea6 Author: Jeff Layton Date: Wed Nov 16 09:55:36 2022 -0500 nfs: use locks_inode_context helper nfs currently doesn't access i_flctx safely. This requires a smp_load_acquire, as the pointer is set via cmpxchg (a release operation). Cc: Trond Myklebust Cc: Anna Schumaker Reviewed-by: Christoph Hellwig Signed-off-by: Jeff Layton fs/nfs/delegation.c | 2 +- fs/nfs/nfs4state.c | 2 +- fs/nfs/pagelist.c | 2 +- fs/nfs/write.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit 98b41ffe0afdfeaa1439a5d6bd2db4a94277e31b Author: Jeff Layton Date: Wed Nov 16 09:19:43 2022 -0500 lockd: use locks_inode_context helper lockd currently doesn't access i_flctx safely. This requires a smp_load_acquire, as the pointer is set via cmpxchg (a release operation). Cc: Trond Myklebust Cc: Anna Schumaker Cc: Chuck Lever Reviewed-by: Christoph Hellwig Signed-off-by: Jeff Layton fs/lockd/svcsubs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87f00aba211ef7308fd6c5d47d646a70bf196662 Author: Jeff Layton Date: Wed Nov 16 08:50:52 2022 -0500 ksmbd: use locks_inode_context helper ksmbd currently doesn't access i_flctx safely. This requires a smp_load_acquire, as the pointer is set via cmpxchg (a release operation). Cc: Steve French Acked-by: Namjae Jeon Reviewed-by: Christoph Hellwig Signed-off-by: Jeff Layton fs/ksmbd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1fde8ee771f92d2a8bbd79532149ddd34546bc1 Author: Jeff Layton Date: Wed Nov 16 08:49:25 2022 -0500 cifs: use locks_inode_context helper cifs currently doesn't access i_flctx safely. This requires a smp_load_acquire, as the pointer is set via cmpxchg (a release operation). Cc: Steve French Reviewed-by: Christoph Hellwig Signed-off-by: Jeff Layton fs/cifs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4e78663f6bc83db44041f224e58e0940662a912 Author: Jeff Layton Date: Wed Nov 16 08:44:25 2022 -0500 ceph: use locks_inode_context helper ceph currently doesn't access i_flctx safely. This requires a smp_load_acquire, as the pointer is set via cmpxchg (a release operation). Reviewed-by: Xiubo Li Reviewed-by: Christoph Hellwig Signed-off-by: Jeff Layton fs/ceph/locks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 401a8b8fd5acd51582b15238d72a8d0edd580e9f Author: Jeff Layton Date: Wed Nov 16 09:02:30 2022 -0500 filelock: add a new locks_inode_context accessor function There are a number of places in the kernel that are accessing the inode->i_flctx field without smp_load_acquire. This is required to ensure that the caller doesn't see a partially-initialized structure. Add a new accessor function for it to make this clear and convert all of the relevant accesses in locks.c to use it. Also, convert locks_free_lock_context to use the helper as well instead of just doing a "bare" assignment. Reviewed-by: Christoph Hellwig Signed-off-by: Jeff Layton fs/locks.c | 24 ++++++++++++------------ include/linux/fs.h | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 12 deletions(-) commit ab1ddef98a715eddb65309ffa83267e4e84a571e Author: Jeff Layton Date: Mon Nov 14 08:33:09 2022 -0500 filelock: new helper: vfs_inode_has_locks Ceph has a need to know whether a particular inode has any locks set on it. It's currently tracking that by a num_locks field in its filp->private_data, but that's problematic as it tries to decrement this field when releasing locks and that can race with the file being torn down. Add a new vfs_inode_has_locks helper that just returns whether any locks are currently held on the inode. Reviewed-by: Xiubo Li Reviewed-by: Christoph Hellwig Signed-off-by: Jeff Layton fs/locks.c | 23 +++++++++++++++++++++++ include/linux/fs.h | 6 ++++++ 2 files changed, 29 insertions(+) commit 9a04b0febb07c400902e4cbf9adce02008917932 Merge: a9ffb8ee7b65 6c645b01e536 Author: Michael Ellerman Date: Wed Nov 30 20:42:22 2022 +1100 Merge branch 'topic/ppc-kvm' into next Merge our KVM topic branch. commit 6c645b01e536757a9e1a9f72c13767f9b3f8559f Author: Nicholas Piggin Date: Sun Nov 27 22:49:26 2022 +1000 KVM: PPC: Book3E: Fix CONFIG_TRACE_IRQFLAGS support 32-bit does not trace_irqs_off() to match the trace_irqs_on() call in kvmppc_fix_ee_before_entry(). This can lead to irqs being enabled twice in the trace, and the irqs-off region between guest exit and the host enabling local irqs again is not properly traced. 64-bit code does call this, but from asm code where volatiles are live and so incorrectly get clobbered. Move the irq reconcile into C to fix both problems. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221127124942.1665522-2-npiggin@gmail.com arch/powerpc/include/asm/kvm_ppc.h | 12 ++++++++++++ arch/powerpc/kvm/booke.c | 3 +++ arch/powerpc/kvm/bookehv_interrupts.S | 9 --------- 3 files changed, 15 insertions(+), 9 deletions(-) commit fc8f93ad3e5485d45c992233c96acd902992dfc4 Author: Mark Zhang Date: Mon Nov 28 13:52:46 2022 +0200 RDMA/nldev: Fix failure to send large messages Return "-EMSGSIZE" instead of "-EINVAL" when filling a QP entry, so that new SKBs will be allocated if there's not enough room in current SKB. Fixes: 65959522f806 ("RDMA: Add support to dump resource tracker in RAW format") Signed-off-by: Mark Zhang Reviewed-by: Patrisious Haddad Link: https://lore.kernel.org/r/b5e9c62f6b8369acab5648b661bf539cbceeffdc.1669636336.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/nldev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67e6272d53386f9708f91c4d0015c4a1c470eef5 Author: Or Har-Toov Date: Mon Nov 28 13:52:45 2022 +0200 RDMA/nldev: Add NULL check to silence false warnings Using nlmsg_put causes static analysis tools to many false positives of not checking the return value of nlmsg_put. In all uses in nldev.c, payload parameter is 0 so NULL will never be returned. So let's add useless checks to silence the warnings. Signed-off-by: Or Har-Toov Reviewed-by: Michael Guralnik Link: https://lore.kernel.org/r/bd924da89d5b4f5291a4a01d9b5ae47c0a9b6a3f.1669636336.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/nldev.c | 44 +++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) commit 077bd80083abb4d67af8c2d30ea7f7eb2dee1f0d Merge: 92e11ddb2c3d d73b1d02de08 Author: Dave Airlie Date: Wed Nov 30 17:19:17 2022 +1000 Merge tag 'drm-msm-next-2022-11-28' of https://gitlab.freedesktop.org/drm/msm into drm-next msm-next for v6.2 (the gpu/gem bits) - Remove exclusive-fence hack that caused over-synchronization - Fix speed-bin detection vs. probe-defer - Enable clamp_to_idle on 7c3 - Improved hangcheck detection Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvT1h_S4d=YRgphgR8i7aMaxQaNW8mru7QaoUo9uiUk2A@mail.gmail.com commit 92e11ddb2c3d931241ddc7b3d82f0fe34ef757a7 Merge: f513a19a603a 8d1d17d47eae Author: Dave Airlie Date: Wed Nov 30 17:02:21 2022 +1000 Merge tag 'drm-msm-display-for-6.2' of https://gitlab.freedesktop.org/lumag/msm into drm-next drm/msm updates for 6.2 Core: - MSM_INFO_GET_FLAGS support - Cleaned up MSM IOMMU wrapper code DPU: - Added support for XR30 and P010 image formats - Reworked MDSS/DPU schema, added SM8250 MDSS bindings - Added Qualcomm SM6115 support DP: - Dropped unsane sanity checks DSI: - Fix calculation of DSC pps payload DSI PHY: - DSI PHY support for QCM2290 HDMI: - Reworked dev init path Signed-off-by: Dave Airlie From: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20221126102141.721353-1-dmitry.baryshkov@linaro.org commit d03a6d4e2beaa358b6c4e16fe106e813a57e927a Author: Johan Hovold Date: Tue Nov 29 15:15:39 2022 +0100 USB: serial: cp210x: add support for B0 hangup A request to set the line speed to B0 is used to hang up a modem connection by deasserting the modem control lines. Note that there is no need reconfigure the line speed in hardware when B0 is requested (even if some drivers do set it to an arbitrary value for implementation or protocol reasons). Reviewed-by: Alex Henrie Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit f513a19a603a76965f3eeb88a45c4442dac035c1 Merge: 02339a83dc82 10d2d1fc05f0 Author: Dave Airlie Date: Wed Nov 30 15:58:56 2022 +1000 Merge tag 'amd-drm-next-6.2-2022-11-25' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.2-2022-11-25: amdgpu: - Old GCC fix - GFX11 fixes - PSP suspend/resume fix - PCI ref count fix - DC KASAN fix - DCN 3.2.x fixes - Dell platform suspend/resume fixes - DCN 3.1.4 fixes - RAS fixes - SMU 13.x fixes - Flex array changes - VCN 4.0 RAS updates - Add missing licsense to some files - Documentation updates - SR-IOV fixes - DP MST DSC fix amdkfd: - Fix topology locking in error case Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20221125180519.6389-1-alexander.deucher@amd.com commit 6286bbb40576ffadfde206c332b61345c19af57f Author: Hector Martin Date: Mon Nov 28 23:29:11 2022 +0900 cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states This driver implements CPU frequency scaling for Apple Silicon SoCs, including M1 (t8103), M1 Max/Pro/Ultra (t600x), and M2 (t8112). Each CPU cluster has its own register set, and frequency management is fully automated by the hardware; the driver only has to write one register. There is boost frequency support, but the hardware will only allow their use if only a subset of cores in a cluster are in non-deep-idle. Since we don't support deep idle yet, these frequencies are not achievable, but the driver supports them. They will remain disabled in the device tree until deep idle is implemented, to avoid confusing users. This driver does not yet implement the memory controller performance state tuning that usually accompanies higher CPU p-states. This will be done in a future patch. Acked-by: Marc Zyngier Signed-off-by: Hector Martin Signed-off-by: Viresh Kumar drivers/cpufreq/Kconfig.arm | 9 + drivers/cpufreq/Makefile | 1 + drivers/cpufreq/apple-soc-cpufreq.c | 352 +++++++++++++++++++++++++++++++++++ drivers/cpufreq/cpufreq-dt-platdev.c | 2 + 4 files changed, 364 insertions(+) commit 91a7de85600d5dfa272cea3cef83052e067dc0ab Author: Willem de Bruijn Date: Mon Nov 28 09:02:10 2022 -0500 selftests/net: add csum offload test Test NIC hardware checksum offload: - Rx + Tx - IPv4 + IPv6 - TCP + UDP Optional features: - zero checksum 0xFFFF - checksum disable 0x0000 - transport encap headers - randomization See file header for detailed comments. Expected results differ depending on NIC features: - CHECKSUM_UNNECESSARY vs CHECKSUM_COMPLETE - NETIF_F_HW_CSUM (csum_start/csum_off) vs NETIF_F_IP(V6)_CSUM Signed-off-by: Willem de Bruijn Link: https://lore.kernel.org/r/20221128140210.553391-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski tools/testing/selftests/net/.gitignore | 1 + tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/csum.c | 986 +++++++++++++++++++++++++++++++++ 3 files changed, 988 insertions(+) commit 953d771587e232e537665d34086a94ed29b89e5f Author: Leon Romanovsky Date: Mon Aug 22 13:38:55 2022 +0300 net/mlx5e: Support devlink reload of IPsec core Change IPsec initialization flow to allow future creation of hardware resources that should be released and allocated during devlink reload operation. As part of that change, update function signature to be void as no callers are actually interested in it. Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 17 ++++++++--------- .../net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 5 ++--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 ++----- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 10 ++++------ 4 files changed, 16 insertions(+), 23 deletions(-) commit dcf19b9ce4fd2ad6d2fbfa1c3039919fc43968f4 Author: Maor Dickman Date: Thu Nov 24 14:21:03 2022 +0200 net/mlx5e: TC, Add offload support for trap with additional actions TC trap action offload is currently supported only when trap is the sole action in the flow. This patch remove this limitation by changing trap action offload to not use MLX5_ATTR_FLAG_SLOW_PATH flag and instead set the flow destination table explicitly to be the slow table. This will allow offload of the additional actions. TC flow example: tc filter add dev $REP2 protocol ip prio 2 root \ flower skip_sw dst_mac $mac0 \ action mirred egress redirect dev $REP3 \ action pedit ex munge eth dst set $mac2 pipe \ action trap Signed-off-by: Maor Dickman Reviewed-by: Raed Salem Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/en/tc/act/trap.c | 10 ++-------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 5 +++++ .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 22 +++++++++++----------- 3 files changed, 18 insertions(+), 19 deletions(-) commit 42760d95a0c192218b57f033ef39f7b493ffec59 Author: Roi Dayan Date: Mon Nov 21 12:14:50 2022 +0200 net/mlx5e: Do early return when setup vports dests for slow path flow Adding flow flag cases in setup vport dests before the slow path case is incorrect as the slow path should take precedence. Current code doesn't show this importance so make the slow path case return early and separate from the other cases and remove the redundant comparison of it in the sample case. Signed-off-by: Roi Dayan Reviewed-by: Chris Mi Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 3c683429b0786634fc75a2a4bf760d3f0fc3f25c Author: Leon Romanovsky Date: Thu Oct 13 15:48:43 2022 +0300 net/mlx5: Remove redundant check If ASO failed in creation, it won't be called to destroy either. The kernel coding pattern is to make sure that callers are calling to destroy only for valid objects. Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c | 3 --- 1 file changed, 3 deletions(-) commit d11c0ec2b831ee8420ff042819edeec7b5bb2418 Author: Leon Romanovsky Date: Thu Oct 13 15:13:39 2022 +0300 net/mlx5e: Delete always true DMA check DMA address always exists for MACsec ASO object. Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7c11eae2fdc8ff429b74f6f9cd91ebea9725d917 Author: Leon Romanovsky Date: Wed Oct 12 15:28:10 2022 +0300 net/mlx5e: Don't access directly DMA device pointer Use specialized helper to fetch DMA device pointer. Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14624d7247fcd0f3114a6f5f17b3c8d1020fbbb7 Author: Roi Dayan Date: Wed Nov 16 09:47:37 2022 +0200 net/mlx5e: Don't use termination table when redundant Current code used termination table for each vport destination while it's only required for hairpin, i.e. uplink to uplink, or when vlan push on rx action being used. Fix to skip using termination table for vport destinations that do not require it. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/eswitch_offloads_termtbl.c | 32 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) commit 2d04e1ce52a8b2ba77820383c1305122e0238be2 Author: Rahul Rameshbabu Date: Wed Oct 26 12:04:40 2022 -0700 net/mlx5: Fix orthography errors in documentation Improve general readability of the device driver documentation. Signed-off-by: Rahul Rameshbabu Reviewed-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../device_drivers/ethernet/mellanox/mlx5.rst | 82 +++++++++++----------- 1 file changed, 41 insertions(+), 41 deletions(-) commit daab2e9c54a52dea8dbd1af516e6f986eeed2556 Author: Tariq Toukan Date: Mon Oct 31 14:24:02 2022 +0200 net/mlx5: Use generic definition for UMR KLM alignment MLX5_UMR_KLM_ALIGNMENT is in units of number of entries, while MLX5_UMR_MTT_ALIGNMENT (generalized and renamed to MLX5_UMR_FLEX_ALIGNMENT) is in byte units. This is misleading and confusing. Replace this KLM definition with one based on the generic definition. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 10 +++++----- include/linux/mlx5/device.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 02648b4b09d506bd4df2e17bf109c229fc728640 Author: Tariq Toukan Date: Mon Oct 31 14:44:57 2022 +0200 net/mlx5: Generalize name of UMR alignment definition Per the device spec, MLX5_UMR_MTT_ALIGNMENT is good not only for UMR MTT entries, but for all other entries as well, like KLMs and KSMs. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/odp.c | 3 +-- drivers/infiniband/hw/mlx5/umr.c | 14 +++++++------- drivers/net/ethernet/mellanox/mlx5/core/en.h | 6 +++--- drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- include/linux/mlx5/device.h | 4 ++-- 6 files changed, 16 insertions(+), 17 deletions(-) commit 683d78a0d46235edfd3c50ddbc4af1065b422670 Author: Tariq Toukan Date: Mon Oct 31 14:30:23 2022 +0200 net/mlx5: Remove unused UMR MTT definitions Defines MLX5_UMR_MTT_MASK and MLX5_UMR_MTT_MIN_CHUNK_SIZE are not in use. Remove them. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed include/linux/mlx5/device.h | 2 -- 1 file changed, 2 deletions(-) commit b146658f2ed90768b769222ca418617274242b32 Author: Tariq Toukan Date: Mon Oct 31 14:18:22 2022 +0200 net/mlx5e: Add padding when needed in UMR WQEs Per the device spec, MTTs/KLMs list in a UMR WQE must be aligned to 64B. Per our SW design, the MTT/KLMs list would need alignment only if it's too small, for example on PPC when PAGE_SIZE is 64KB, and only 4 pages are needed to cover a MPWQE of size 256KB. Padding, if needed, is taken into account when calculating the UMR WQE fields (ds_cnt and xlt_octowords), however no entries are provided, instead garbage is passed. No real harm though, as these parts act as gaps between the RX MPWQEs and not used by any of them. Hence, in practice, device does not try to write any incoming packet to them. Still, prefer providing clean padding marking the end of the list, and do not map garbage into the RQ memory region. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 11 +++++++++++ include/linux/mlx5/device.h | 1 + 2 files changed, 12 insertions(+) commit 12eb0f84a601cec8920b56d7ffd4182a6bfd6521 Author: Petr Pavlu Date: Thu Sep 29 13:45:08 2022 +0200 net/mlx5: Remove unused ctx variables Remove mlx5_priv.ctx_list and ctx_lock which are no longer used after commit 601c10c89cbb ("net/mlx5: Delete custom device management logic"). Signed-off-by: Petr Pavlu Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 -- include/linux/mlx5/driver.h | 2 -- 2 files changed, 4 deletions(-) commit 5df5365ae4f793ce2e555d7d836abde3f5bd55b4 Author: Gustavo A. R. Silva Date: Mon Sep 26 16:50:42 2022 -0500 net/mlx5e: 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/222 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 02ca1732f41b23bfb5c062e52b5fc44105c0796a Author: Christophe JAILLET Date: Sun Nov 27 17:16:52 2022 +0100 net/mlx5e: Remove unneeded io-mapping.h #include The mlx5 net files don't use io_mapping functionalities. So there is no point in including . Remove it. Signed-off-by: Christophe JAILLET Reviewed-by: Pavan Chebbi Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/main.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/uar.c | 1 - 3 files changed, 3 deletions(-) commit a4bbf53d88c728da9ff6c316b1e4ded63a8f3940 Author: Eric Biggers Date: Mon Nov 28 20:51:39 2022 -0800 fsverity: simplify fsverity_get_digest() Instead of looking up the algorithm by name in hash_algo_name[] to get its hash_algo ID, just store the hash_algo ID in the fsverity_hash_alg struct. Verify at boot time that every fsverity_hash_alg has a valid hash_algo ID with matching digest size. Remove an unnecessary memset() of the whole digest array to 0 before the digest is copied into it. Finally, remove the pr_debug statement. There is already a pr_debug for the fsverity digest when the file is opened. Signed-off-by: Eric Biggers Reviewed-by: Mimi Zohar Link: https://lore.kernel.org/r/20221129045139.69803-1-ebiggers@kernel.org fs/verity/fsverity_private.h | 5 +++++ fs/verity/hash_algs.c | 6 ++++++ fs/verity/measure.c | 19 ++----------------- 3 files changed, 13 insertions(+), 17 deletions(-) commit 5cb0c51fe366cf96b7911d25db3e678401732246 Merge: b2d7b6e9e4a8 b198d7b40ad9 Author: Jakub Kicinski Date: Tue Nov 29 20:50:50 2022 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== ipsec-next 2022-11-26 1) Remove redundant variable in esp6. From Colin Ian King. 2) Update x->lastused for every packet. It was used only for outgoing mobile IPv6 packets, but showed to be usefull to check if the a SA is still in use in general. From Antony Antony. 3) Remove unused variable in xfrm_byidx_resize. From Leon Romanovsky. 4) Finalize extack support for xfrm. From Sabrina Dubroca. * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next: xfrm: add extack to xfrm_set_spdinfo xfrm: add extack to xfrm_alloc_userspi xfrm: add extack to xfrm_do_migrate xfrm: add extack to xfrm_new_ae and xfrm_replay_verify_len xfrm: add extack to xfrm_del_sa xfrm: add extack to xfrm_add_sa_expire xfrm: a few coding style clean ups xfrm: Remove not-used total variable xfrm: update x->lastused for every packet esp6: remove redundant variable err ==================== Link: https://lore.kernel.org/r/20221126110303.1859238-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit b2d7b6e9e4a8769497c1ae5bc13179e9b0a79bb9 Merge: 7f0c940be5c5 befd851de295 Author: Jakub Kicinski Date: Tue Nov 29 20:29:58 2022 -0800 Merge branch 'net-pcs-altera-tse-simplify-and-clean-up-the-driver' Maxime Chevallier says: ==================== net: pcs: altera-tse: simplify and clean-up the driver This small series does a bit of code cleanup in the altera TSE pcs driver, removing unused register definitions, handling 1000BaseX speed configuration correctly according to the datasheet, and making use of proper poll_timeout helpers. No functional change is introduced. ==================== Link: https://lore.kernel.org/r/20221125131801.64234-1-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit befd851de29543205246468abe3e7793f26c7e2f Author: Maxime Chevallier Date: Fri Nov 25 14:18:01 2022 +0100 net: pcs: altera-tse: remove unnecessary register definitions remove unused register definitions, left from the split with the altera-tse mac driver. Signed-off-by: Maxime Chevallier Signed-off-by: Jakub Kicinski drivers/net/pcs/pcs-altera-tse.c | 9 --------- 1 file changed, 9 deletions(-) commit b4a7bf9f5bb8e6b21d728d00dc3afe9fbee2420c Author: Maxime Chevallier Date: Fri Nov 25 14:18:00 2022 +0100 net: pcs: altera-tse: don't set the speed for 1000BaseX When disabling the SGMII mode bit, the PCS defaults to 1000BaseX mode. In that mode, we don't need to set the speed since it's always 1000Mbps. Signed-off-by: Maxime Chevallier Signed-off-by: Jakub Kicinski drivers/net/pcs/pcs-altera-tse.c | 1 - 1 file changed, 1 deletion(-) commit d1a0ff5ff9efba55cc39ca520ba076943cd9a425 Author: Maxime Chevallier Date: Fri Nov 25 14:17:59 2022 +0100 net: pcs: altera-tse: use read_poll_timeout to wait for reset Software resets on the TSE PCS don't clear registers, but rather reset all internal state machines regarding AN, comma detection and encoding/decoding. Use read_poll_timeout to wait for the reset to clear instead of manually polling the register. Signed-off-by: Maxime Chevallier Signed-off-by: Jakub Kicinski drivers/net/pcs/pcs-altera-tse.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 7f0c940be5c5f52b0a7acaf2b55df73337f5c7a8 Merge: f2bb566f5c97 ca7ae8916043 Author: Jakub Kicinski Date: Tue Nov 29 20:24:31 2022 -0800 Merge branch 'mptcp-msg_fastopen-and-tfo-listener-side-support' Matthieu Baerts says: ==================== mptcp: MSG_FASTOPEN and TFO listener side support Before this series, only the initiator of a connection was able to combine both TCP FastOpen and MPTCP when using TCP_FASTOPEN_CONNECT socket option. These new patches here add (in theory) the full support of TFO with MPTCP, which means: - MSG_FASTOPEN sendmsg flag support (patch 1/8) - TFO support for the listener side (patches 2-5/8) - TCP_FASTOPEN socket option (patch 6/8) - TCP_FASTOPEN_KEY socket option (patch 7/8) To support TFO for the server side, a few preparation patches are needed (patches 2 to 5/8). Some of them were inspired by a previous work from Benjamin Hesmans. Note that TFO support with MPTCP has been validated with selftests (patch 8/8) but also with Packetdrill tests running with a modified but still very WIP version supporting MPTCP. Both the modified tool and the tests are available online: https://github.com/multipath-tcp/packetdrill/ ==================== Link: https://lore.kernel.org/r/20221125222958.958636-1-matthieu.baerts@tessares.net Signed-off-by: Jakub Kicinski commit ca7ae89160434cd045a4795a235eb16587bd8f73 Author: Dmytro Shytyi Date: Fri Nov 25 23:29:54 2022 +0100 selftests: mptcp: mptfo Initiator/Listener This patch first adds TFO support in mptcp_connect.c. This can be enabled via a new option: -o MPTFO. Once enabled, the TCP_FASTOPEN socket option is enabled for the server side and a sendto() with MSG_FASTOPEN is used instead of a connect() for the client side. Note that the first SYN has a limit of bytes it can carry. In other words, it is allowed to send less data than the provided one. We then need to track more status info to properly allow the next sendmsg() starting from the next part of the data to send the rest. Also in TFO scenarios, we need to completely spool the partially xmitted buffer -- and account for that -- before starting sendfile/mmap xmit, otherwise the relevant tests will fail. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Dmytro Shytyi Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_connect.c | 171 ++++++++++++++++----- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 21 +++ 2 files changed, 150 insertions(+), 42 deletions(-) commit cb99816cb59d4253758827186d5a5616f9825b6c Author: Matthieu Baerts Date: Fri Nov 25 23:29:53 2022 +0100 mptcp: add support for TCP_FASTOPEN_KEY sockopt The goal of this socket option is to set different keys per listener, see commit 1fba70e5b6be ("tcp: socket option to set TCP fast open key") for more details about this socket option. The only thing to do here with MPTCP is to relay the request to the first subflow like it is already done for the other TCP_FASTOPEN* socket options. Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski net/mptcp/sockopt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4ffb0a02346c14f5e83711668f19b6b551cd32ed Author: Dmytro Shytyi Date: Fri Nov 25 23:29:52 2022 +0100 mptcp: add TCP_FASTOPEN sock option The TCP_FASTOPEN socket option is one way for the application to tell the kernel TFO support has to be enabled for the listener socket. The only thing to do here with MPTCP is to relay the request to the first subflow like it is already done for the other TCP_FASTOPEN* socket options. Acked-by: Paolo Abeni Signed-off-by: Dmytro Shytyi Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski net/mptcp/sockopt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 36b122baf6a8bd46b4a591f12f4ed17b22257408 Author: Dmytro Shytyi Date: Fri Nov 25 23:29:51 2022 +0100 mptcp: add subflow_v(4,6)_send_synack() The send_synack() needs to be overridden for MPTCP to support TFO for two reasons: - There is not be enough space in the TCP options if the TFO cookie has to be added in the SYN+ACK with other options: MSS (4), SACK OK (2), Timestamps (10), Window Scale (3+1), TFO (10+2), MP_CAPABLE (12). MPTCPv1 specs -- RFC 8684, section B.1 [1] -- suggest to drop the TCP timestamps option in this case. - The data received in the SYN has to be handled: the SKB can be dequeued from the subflow sk and transferred to the MPTCP sk. Counters need to be updated accordingly and the application can be notified at the end because some bytes have been received. [1] https://www.rfc-editor.org/rfc/rfc8684.html#section-b.1 Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Dmytro Shytyi Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski net/mptcp/fastopen.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ net/mptcp/protocol.c | 2 +- net/mptcp/protocol.h | 3 +++ net/mptcp/subflow.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 1 deletion(-) commit dfc8d06030335a816d81aa92fe5d1f84d06998ad Author: Dmytro Shytyi Date: Fri Nov 25 23:29:50 2022 +0100 mptcp: implement delayed seq generation for passive fastopen With fastopen in place, the first subflow socket is created before the MPC handshake completes, and we need to properly initialize the sequence numbers at MPC ACK reception. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Dmytro Shytyi Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski net/mptcp/Makefile | 2 +- net/mptcp/fastopen.c | 28 ++++++++++++++++++++++++++++ net/mptcp/options.c | 9 ++++++--- net/mptcp/protocol.c | 9 --------- net/mptcp/protocol.h | 16 +++++++++++++++- net/mptcp/subflow.c | 5 ++++- 6 files changed, 54 insertions(+), 15 deletions(-) commit b3ea6b272d79a43baaaa9af871ee66f6fda4688f Author: Paolo Abeni Date: Fri Nov 25 23:29:49 2022 +0100 mptcp: consolidate initial ack seq generation Currently the initial ack sequence is generated on demand whenever it's requested and the remote key is handy. The relevant code is scattered in different places and can lead to multiple, unneeded, crypto operations. This change consolidates the ack sequence generation code in a single helper, storing the sequence number at the subflow level. The above additionally saves a few conditional in fast-path and will simplify the upcoming fast-open implementation. Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski net/mptcp/options.c | 5 +++-- net/mptcp/protocol.c | 19 +----------------- net/mptcp/protocol.h | 9 ++++++--- net/mptcp/subflow.c | 57 ++++++++++++++++++++++++++++++++-------------------- 4 files changed, 45 insertions(+), 45 deletions(-) commit fe33d38626779ffcc1c88204b1931774dc204cb5 Author: Paolo Abeni Date: Fri Nov 25 23:29:48 2022 +0100 mptcp: track accurately the incoming MPC suboption type Currently in the receive path we don't need to discriminate between MPC SYN, MPC SYN-ACK and MPC ACK, but soon the fastopen code will need that info to properly track the fully established status. Track the exact MPC suboption type into the receive opt bitmap. No functional change intended. Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski net/mptcp/options.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 1e777f39b4d75e599a3aac8e0f67d739474f198c Author: Dmytro Shytyi Date: Fri Nov 25 23:29:47 2022 +0100 mptcp: add MSG_FASTOPEN sendmsg flag support Since commit 54f1944ed6d2 ("mptcp: factor out mptcp_connect()"), all the infrastructure is now in place to support the MSG_FASTOPEN flag, we just need to call into the fastopen path in mptcp_sendmsg(). Co-developed-by: Benjamin Hesmans Signed-off-by: Benjamin Hesmans Acked-by: Paolo Abeni Signed-off-by: Dmytro Shytyi Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski net/mptcp/protocol.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 02339a83dc828cf1b6dfcb42502f80f7c8d7e33f Merge: 795bd9bb21c6 08fef75f5e17 Author: Dave Airlie Date: Wed Nov 30 13:08:53 2022 +1000 Merge tag 'drm/tegra/for-6.2-rc1' of https://gitlab.freedesktop.org/drm/tegra into drm-next drm/tegra: Changes for v6.2-rc1 This contains a bunch of cleanups across the board as well as support for the NVDEC hardware found on the Tegra234 SoC. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20221125155219.3352952-1-thierry.reding@gmail.com commit 795bd9bb21c694ebcee38e8026ebeac4a63929bf Merge: 2847b6681547 8c5577a5ccc6 Author: Dave Airlie Date: Wed Nov 30 11:45:43 2022 +1000 Merge tag 'drm-accel-2022-11-22' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/accel into drm-next This tag contains the patches that add the new compute acceleration subsystem, which is part of the DRM subsystem. The patches: - Add a new directory at drivers/accel. - Add a new major (261) for compute accelerators. - Add a new DRM minor type for compute accelerators. - Integrate the accel core code with DRM core code. - Add documentation for the accel subsystem. Signed-off-by: Dave Airlie some acks from the list (some are in the patch series): Acked-by: Daniel Stone Acked-by: Sonal Santan Acked-by: Maxime Ripard Acked-by: Jacek Lawrynowicz Tested-by: Jacek Lawrynowicz Acked-by: Alex Deucher Acked-by: Thomas Zimmermann From: Oded Gabbay Link: https://patchwork.freedesktop.org/patch/msgid/20221122112222.GA352082@ogabbay-vm-u20.habana-labs.com commit 8008d88e6d160c4e73de5be7c3dcc54e3ccccf49 Author: Nícolas F. R. A. Prado Date: Mon Nov 28 17:03:40 2022 -0500 selftests/tpm2: Split async tests call to separate shell script runner When the async test case was introduced, despite being a completely independent test case, the command to run it was added to the same shell script as the smoke test case. Since a shell script implicitly returns the error code from the last run command, this effectively caused the script to only return as error code the result from the async test case, hiding the smoke test result (which could then only be seen from the python unittest logs). Move the async test case call to its own shell script runner to avoid the aforementioned issue. This also makes the output clearer to read, since each kselftest KTAP result now matches with one python unittest report. While at it, also make it so the async test case is skipped if /dev/tpmrm0 doesn't exist, since commit 8335adb8f9d3 ("selftests: tpm: add async space test with noneexisting handle") added a test that relies on it. Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Shuah Khan tools/testing/selftests/tpm2/Makefile | 2 +- tools/testing/selftests/tpm2/test_async.sh | 10 ++++++++++ tools/testing/selftests/tpm2/test_smoke.sh | 1 - 3 files changed, 11 insertions(+), 2 deletions(-) commit 177f504cb70cc034774bf708a6ec3f568e0d02a1 Author: Suzuki K Poulose Date: Fri Nov 25 15:42:01 2022 +0000 selftests: splice_read: Fix sysfs read cases sysfs now supports splice_* operations with commit f2d6c2708bd84 ("kernfs: wire up ->splice_read and ->splice_write") Update the selftests to expect success instead of failure. Cc: Shuah Khan Cc: Christoph Hellwig Cc: Siddharth Gupta Signed-off-by: Suzuki K Poulose Signed-off-by: Shuah Khan tools/testing/selftests/splice/short_splice_read.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 80fb249da98e6b9e7c3d356da912a67757e92e75 Author: Dan Carpenter Date: Wed Nov 23 09:43:27 2022 +0300 Input: elants_i2c - delete some dead code We shuffled the error handling around so this condition is dead code now. The "error" variable is always zero. Signed-off-by: Dan Carpenter Reviewed-by: Douglas Anderson Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/Y33BD9xkRC9euIdO@kili Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/elants_i2c.c | 2 -- 1 file changed, 2 deletions(-) commit 0cd7e350abc40eed5d3b60292dc102f700c88388 Author: Paul E. McKenney Date: Tue Nov 22 13:53:57 2022 -0800 rcu: Make SRCU mandatory Kernels configured with CONFIG_PRINTK=n and CONFIG_SRCU=n get build failures. This causes trouble for deep embedded systems. But given that there are more than 25 instances of "select SRCU" in the kernel, it is hard to believe that there are many kernels running in production without SRCU. This commit therefore makes SRCU mandatory. The SRCU Kconfig option remains for backwards compatibility, and will be removed when it is no longer used. [ paulmck: Update per kernel test robot feedback. ] Reported-by: John Ogness Reported-by: Petr Mladek Signed-off-by: Paul E. McKenney Cc: Acked-by: Randy Dunlap # build-tested Reviewed-by: John Ogness include/linux/rcutiny.h | 4 ---- include/linux/srcu.h | 9 +-------- kernel/rcu/Kconfig | 11 +++-------- kernel/rcu/Kconfig.debug | 3 --- kernel/rcu/rcu.h | 8 ++++++-- kernel/rcu/update.c | 18 +++++++----------- 6 files changed, 17 insertions(+), 36 deletions(-) commit 54d87b0a0c19bc3f740e4cd4b87ba14ce2e4ea73 Author: Uladzislau Rezki Date: Sun Oct 16 16:23:02 2022 +0000 scsi/scsi_error: Use call_rcu_hurry() instead of call_rcu() Earlier commits in this series allow battery-powered systems to build their kernels with the default-disabled CONFIG_RCU_LAZY=y Kconfig option. This Kconfig option causes call_rcu() to delay its callbacks in order to batch them. This means that a given RCU grace period covers more callbacks, thus reducing the number of grace periods, in turn reducing the amount of energy consumed, which increases battery lifetime which can be a very good thing. This is not a subtle effect: In some important use cases, the battery lifetime is increased by more than 10%. This CONFIG_RCU_LAZY=y option is available only for CPUs that offload callbacks, for example, CPUs mentioned in the rcu_nocbs kernel boot parameter passed to kernels built with CONFIG_RCU_NOCB_CPU=y. Delaying callbacks is normally not a problem because most callbacks do nothing but free memory. If the system is short on memory, a shrinker will kick all currently queued lazy callbacks out of their laziness, thus freeing their memory in short order. Similarly, the rcu_barrier() function, which blocks until all currently queued callbacks are invoked, will also kick lazy callbacks, thus enabling rcu_barrier() to complete in a timely manner. However, there are some cases where laziness is not a good option. For example, synchronize_rcu() invokes call_rcu(), and blocks until the newly queued callback is invoked. It would not be a good for synchronize_rcu() to block for ten seconds, even on an idle system. Therefore, synchronize_rcu() invokes call_rcu_hurry() instead of call_rcu(). The arrival of a non-lazy call_rcu_hurry() callback on a given CPU kicks any lazy callbacks that might be already queued on that CPU. After all, if there is going to be a grace period, all callbacks might as well get full benefit from it. Yes, this could be done the other way around by creating a call_rcu_lazy(), but earlier experience with this approach and feedback at the 2022 Linux Plumbers Conference shifted the approach to call_rcu() being lazy with call_rcu_hurry() for the few places where laziness is inappropriate. And another call_rcu() instance that cannot be lazy is the one in the scsi_eh_scmd_add() function. Leaving this instance lazy results in unacceptably slow boot times. Therefore, make scsi_eh_scmd_add() use call_rcu_hurry() in order to revert to the old behavior. [ paulmck: Apply s/call_rcu_flush/call_rcu_hurry/ feedback from Tejun Heo. ] Tested-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki Signed-off-by: Joel Fernandes (Google) Cc: "James E.J. Bottomley" Cc: Reviewed-by: Bart Van Assche Acked-by: Martin K. Petersen Signed-off-by: Paul E. McKenney drivers/scsi/scsi_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 405d8e91f0a99777d61f6b0ddc3484d8ea7ca393 Author: Joel Fernandes (Google) Date: Sun Oct 16 16:23:01 2022 +0000 rcu/rcutorture: Use call_rcu_hurry() where needed call_rcu() changes to save power will change the behavior of rcutorture tests. Use the call_rcu_hurry() API instead which reverts to the old behavior. [ paulmck: Apply s/call_rcu_flush/call_rcu_hurry/ feedback from Tejun Heo. ] Reported-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 723df859d8bba948ff2eb08eba32ab433acf7c9c Author: Joel Fernandes (Google) Date: Sun Oct 16 16:23:00 2022 +0000 rcu/rcuscale: Use call_rcu_hurry() for async reader test rcuscale uses call_rcu() to queue async readers. With recent changes to save power, the test will have fewer async readers in flight. Use the call_rcu_hurry() API instead to revert to the old behavior. [ paulmck: Apply s/call_rcu_flush/call_rcu_hurry/ feedback from Tejun Heo. ] Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney kernel/rcu/rcuscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7651d6b25086656eacfdd8356bfe3a21c0c2d79d Author: Joel Fernandes (Google) Date: Sun Oct 16 16:22:59 2022 +0000 rcu/sync: Use call_rcu_hurry() instead of call_rcu call_rcu() changes to save power will slow down rcu sync. Use the call_rcu_hurry() API instead which reverts to the old behavior. [ paulmck: Apply s/call_rcu_flush/call_rcu_hurry/ feedback from Tejun Heo. ] Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney kernel/rcu/sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 084e04fff1601787a121c225502716b8c0314433 Author: Joel Fernandes (Google) Date: Sun Oct 16 16:22:57 2022 +0000 rcuscale: Add laziness and kfree tests This commit adds 2 tests to rcuscale. The first one is a startup test to check whether we are not too lazy or too hard working. The second one causes kfree_rcu() itself to use call_rcu() and checks memory pressure. Testing indicates that the new call_rcu() keeps memory pressure under control roughly as well as does kfree_rcu(). [ paulmck: Apply checkpatch feedback. ] Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney kernel/rcu/rcuscale.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) commit c945b4da7a448a9a56becc5a8745d942b2b83d3c Author: Vineeth Pillai Date: Sun Oct 16 16:22:56 2022 +0000 rcu: Shrinker for lazy rcu The shrinker is used to speed up the free'ing of memory potentially held by RCU lazy callbacks. RCU kernel module test cases show this to be effective. Test is introduced in a later patch. Signed-off-by: Vineeth Pillai Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney kernel/rcu/tree_nocb.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 3d222a0c0cfef85bad2c9cff5d541836cb81cfbd Author: Joel Fernandes (Google) Date: Sun Oct 16 16:22:55 2022 +0000 rcu: Refactor code a bit in rcu_nocb_do_flush_bypass() This consolidates the code a bit and makes it cleaner. Functionally it is the same. Reported-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney kernel/rcu/tree_nocb.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 3cb278e73be58bfb780ecd55129296d2f74c1fb7 Author: Joel Fernandes (Google) Date: Sun Oct 16 16:22:54 2022 +0000 rcu: Make call_rcu() lazy to save power Implement timer-based RCU callback batching (also known as lazy callbacks). With this we save about 5-10% of power consumed due to RCU requests that happen when system is lightly loaded or idle. By default, all async callbacks (queued via call_rcu) are marked lazy. An alternate API call_rcu_hurry() is provided for the few users, for example synchronize_rcu(), that need the old behavior. The batch is flushed whenever a certain amount of time has passed, or the batch on a particular CPU grows too big. Also memory pressure will flush it in a future patch. To handle several corner cases automagically (such as rcu_barrier() and hotplug), we re-use bypass lists which were originally introduced to address lock contention, to handle lazy CBs as well. The bypass list length has the lazy CB length included in it. A separate lazy CB length counter is also introduced to keep track of the number of lazy CBs. [ paulmck: Fix formatting of inline call_rcu_lazy() definition. ] [ paulmck: Apply Zqiang feedback. ] [ paulmck: Apply s/call_rcu_flush/call_rcu_hurry/ feedback from Tejun Heo. ] Suggested-by: Paul McKenney Acked-by: Frederic Weisbecker Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 9 +++ kernel/rcu/Kconfig | 8 +++ kernel/rcu/rcu.h | 8 +++ kernel/rcu/tiny.c | 2 +- kernel/rcu/tree.c | 129 ++++++++++++++++++++++++-------------- kernel/rcu/tree.h | 11 ++-- kernel/rcu/tree_exp.h | 2 +- kernel/rcu/tree_nocb.h | 159 ++++++++++++++++++++++++++++++++++++++--------- 8 files changed, 246 insertions(+), 82 deletions(-) commit 66267814ba0ee0732c69ca87eb1fd6eb63bf0d5f Author: Jiangshan Yi Date: Wed Aug 17 10:59:28 2022 +0800 fs/ext4: replace ternary operator with min()/max() and min_t() Fix the following coccicheck warning: fs/ext4/inline.c:183: WARNING opportunity for min(). fs/ext4/extents.c:2631: WARNING opportunity for max(). fs/ext4/extents.c:2632: WARNING opportunity for min(). fs/ext4/extents.c:5559: WARNING opportunity for max(). fs/ext4/super.c:6908: WARNING opportunity for min(). min()/max() and min_t() macro is defined in include/linux/minmax.h. It avoids multiple evaluations of the arguments when non-constant and performs strict type-checking. Reported-by: kernel test robot Suggested-by: Lukas Czerner Signed-off-by: Jiangshan Yi Reviewed-by: Lukas Czerner Link: https://lore.kernel.org/r/20220817025928.612851-1-13667453960@163.com Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 8 +++----- fs/ext4/inline.c | 3 +-- fs/ext4/super.c | 3 +-- 3 files changed, 5 insertions(+), 9 deletions(-) commit 318cdc822c63b6e2befcfdc2088378ae6fa18def Author: Zhang Yi Date: Wed Jun 29 19:26:47 2022 +0800 ext4: check and assert if marking an no_delete evicting inode dirty In ext4_evict_inode(), if we evicting an inode in the 'no_delete' path, it cannot be raced by another mark_inode_dirty(). If it happens, someone else may accidentally dirty it without holding inode refcount and probably cause use-after-free issues in the writeback procedure. It's indiscoverable and hard to debug, so add an WARN_ON_ONCE() to check and detect this issue in advance. Suggested-by: Jan Kara Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20220629112647.4141034-2-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/inode.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f2bb566f5c977ff010baaa9e5e14d9a75b06e5f2 Merge: 7a945ce0c19b 01f856ae6d0c Author: Jakub Kicinski Date: Tue Nov 29 13:04:52 2022 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net tools/lib/bpf/ringbuf.c 927cbb478adf ("libbpf: Handle size overflow for ringbuf mmap") b486d19a0ab0 ("libbpf: checkpatch: Fixed code alignments in ringbuf.c") https://lore.kernel.org/all/20221121122707.44d1446a@canb.auug.org.au/ Signed-off-by: Jakub Kicinski commit 632ce1377dbbdabff575d33bec9c79d75ef0395a Author: Jason Gunthorpe Date: Tue Nov 29 16:29:27 2022 -0400 scripts/kernel-doc: support EXPORT_SYMBOL_NS_GPL() with -export Parse EXPORT_SYMBOL_NS_GPL() in addition to EXPORT_SYMBOL_GPL() for use with the -export flag. Link: https://lore.kernel.org/r/4-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Acked-by: Jonathan Corbet Signed-off-by: Jason Gunthorpe scripts/kernel-doc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 5fe937862c8426f24cd1dcbf7c22fb1a31069b4f Author: Jason Gunthorpe Date: Tue Nov 29 16:29:26 2022 -0400 interval-tree: Add a utility to iterate over spans in an interval tree The span iterator travels over the indexes of the interval_tree, not the nodes, and classifies spans of indexes as either 'used' or 'hole'. 'used' spans are fully covered by nodes in the tree and 'hole' spans have no node intersecting the span. This is done greedily such that spans are maximally sized and every iteration step switches between used/hole. As an example a trivial allocator can be written as: for (interval_tree_span_iter_first(&span, itree, 0, ULONG_MAX); !interval_tree_span_iter_done(&span); interval_tree_span_iter_next(&span)) if (span.is_hole && span.last_hole - span.start_hole >= allocation_size - 1) return span.start_hole; With all the tricky boundary conditions handled by the library code. The following iommufd patches have several algorithms for its overlapping node interval trees that are significantly simplified with this kind of iteration primitive. As it seems generally useful, put it into lib/. Link: https://lore.kernel.org/r/3-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Signed-off-by: Jason Gunthorpe .clang-format | 1 + include/linux/interval_tree.h | 58 +++++++++++++++++++ lib/Kconfig | 4 ++ lib/interval_tree.c | 132 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 195 insertions(+) commit 89395ccedbc153fecbc29342fbb94a6dfadf24cd Author: Lu Baolu Date: Tue Nov 29 16:29:25 2022 -0400 iommu: Add device-centric DMA ownership interfaces These complement the group interfaces used by VFIO and are for use by iommufd. The main difference is that multiple devices in the same group can all share the ownership by passing the same ownership pointer. Move the common code into shared functions. Link: https://lore.kernel.org/r/2-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Signed-off-by: Lu Baolu Signed-off-by: Jason Gunthorpe drivers/iommu/iommu.c | 121 +++++++++++++++++++++++++++++++++++++++----------- include/linux/iommu.h | 12 +++++ 2 files changed, 107 insertions(+), 26 deletions(-) commit 4989764d8ed3d3d1024e4e831ff2affc40ee01d6 Author: Jason Gunthorpe Date: Tue Nov 29 16:29:24 2022 -0400 iommu: Add IOMMU_CAP_ENFORCE_CACHE_COHERENCY This queries if a domain linked to a device should expect to support enforce_cache_coherency() so iommufd can negotiate the rules for when a domain should be shared or not. For iommufd a device that declares IOMMU_CAP_ENFORCE_CACHE_COHERENCY will not be attached to a domain that does not support it. Link: https://lore.kernel.org/r/1-v6-a196d26f289e+11787-iommufd_jgg@nvidia.com Reviewed-by: Lu Baolu Reviewed-by: Kevin Tian Tested-by: Nicolin Chen Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Signed-off-by: Jason Gunthorpe drivers/iommu/amd/iommu.c | 2 ++ drivers/iommu/intel/iommu.c | 16 +++++++++++----- include/linux/iommu.h | 5 +++++ 3 files changed, 18 insertions(+), 5 deletions(-) commit 503fa6d17040fa521dd682a94d2f48d9a289ded5 Merge: 9abf2313adc1 a46315295489 Author: Stephen Boyd Date: Tue Nov 29 12:16:27 2022 -0800 Merge tag 'mtk-clk-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/wens/linux into clk-mediatek Pull MediaTek clk driver changes from Chen-Yu Tsai: Some more cleanup work, and a new driver for frequency hopping controller hardware. - Remove flags from univ/main/syspll child fixed factor clocks across MediaTek platforms - The idea is to not have the clk core try to reconfigure the system PLLs, i.e. have them be stable - Fix clock dependency for ADC on MT7986 - New driver for frequency hopping controller hardware on MT8186 - This does frequency hopping and spread spectrum clocks in hardware * tag 'mtk-clk-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/wens/linux: clk: mediatek: fix dependency of MT7986 ADC clocks clk: mediatek: Change PLL register API for MT8186 clk: mediatek: Add new clock driver to handle FHCTL hardware dt-bindings: clock: mediatek: Add new bindings of MediaTek frequency hopping clk: mediatek: Export PLL operations symbols clk: mediatek: mt8186-topckgen: Add GPU clock mux notifier clk: mediatek: mt8186-mfg: Propagate rate changes to parent clk: mediatek: mt8195-topckgen: Drop flags for main/univpll fixed factors clk: mediatek: mt8192: Drop flags for main/univpll fixed factors clk: mediatek: mt6795-topckgen: Drop flags for main/sys/univpll fixed factors clk: mediatek: mt8173: Drop flags for main/sys/univpll fixed factors clk: mediatek: mt8183: Drop flags for sys/univpll fixed factors clk: mediatek: mt8183: Compress top_divs array entries clk: mediatek: mt8186-topckgen: Drop flags for main/univpll fixed factors clk: mediatek: clk-mtk: Allow specifying flags on mtk_fixed_factor clocks commit 0c5f21291c1ed0d57c868d16bcd32acf1a5fea93 Merge: c98ba7817618 848343c0b4d6 Author: Arnd Bergmann Date: Tue Nov 29 15:47:15 2022 +0100 Merge tag 'v6.2-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into asahi-wip New boards: - Model A and blade baseboards for the SOQuartz (rk3568) SoM, - Anberic RG351M, RG353V, RG353VS; Odroid Go Super, Advance gaming devices - Odroid M1 - Theobroma px30 SoM with baseboard - Rockchip's own rk3566 demo board Some core support for per SoC specifics: - crypto support for rk3399 and rk3328 - second I2S controller for rk3568 - Cache properties for follow the binding for rk3308 and rk3328 Bigger device support updates for: - SOQuartz: PCIe2, video output, gpu, HDMI sound - Rock 3A: eth regulator, eth clock input, Wifi+Bt, I2S, PCIe3 As well as some minor extensions for Rock960 (hdmi supplies), rk3566-roc-pc (PCIe2), Rock 4C+ (thermal support), Pinephone Pro (Wifi+Bt) * tag 'v6.2-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (51 commits) arm64: dts: rockchip: update cache properties for rk3308 and rk3328 arm64: dts: rockchip: Add SOQuartz Model A baseboard dt-bindings: arm: rockchip: Add SOQuartz Model A arm64: dts: rockchip: Add SOQuartz blade board dt-bindings: arm: rockchip: Add SOQuartz Blade arm64: dts: rockchip: Add Anbernic RG351M arm64: dts: rockchip: Add Odroid Go Super arm64: dts: rockchip: Add Odroid Go Advance Black Edition dt-bindings: arm: rockchip: Add more RK3326 devices arm64: dts: rockchip: Move most of Odroid Go Advance DTS into a DTSI arm64: dts: rockchip: Add support of regulator for ethernet node on Rock 3A SBC arm64: dts: rockchip: Add support of external clock to ethernet node on Rock 3A SBC arm64: dts: rockchip: Add HDMI supplies on Rock960 arm64: dts: rockchip: Add dts for rockchip rk3566 box demo board dt-bindings: rockchip: Add Rockchip rk3566 box demo board arm64: dts: rockchip: Enable PCIe 2 on SOQuartz CM4IO arm64: dts: rockchip: Enable HDMI sound on SOQuartz arm64: dts: rockchip: Enable video output and HDMI on SOQuartz arm64: dts: rockchip: Enable GPU on SOQuartz CM4 arm64: dts: rockchip: enable pcie2 on rk3566-roc-pc ... Link: https://lore.kernel.org/r/4716610.aeNJFYEL58@phil Signed-off-by: Arnd Bergmann commit c98ba7817618c2345b28ac42508de858aa6fd727 Merge: 2d5e7e2a3db5 599cb2c6d764 Author: Arnd Bergmann Date: Tue Nov 29 21:14:34 2022 +0100 Merge tag 'renesas-arm-dt-for-v6.2-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas ARM DT updates for v6.2 (take three) - Rename Renesas DTB overlay source files from .dts to .dtso. * tag 'renesas-arm-dt-for-v6.2-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: Rename DTB overlay source files from .dts to .dtso Link: https://lore.kernel.org/r/cover.1669283381.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit b55226f8553d255f5002c751c7c6ba9291f34bf2 Author: Xiu Jianfeng Date: Tue Nov 22 23:23:53 2022 +0800 clk: visconti: Fix memory leak in visconti_register_pll() @pll->rate_table has allocated memory by kmemdup(), if clk_hw_register() fails, it should be freed, otherwise it will cause memory leak issue, this patch fixes it. Fixes: b4cbe606dc36 ("clk: visconti: Add support common clock driver and reset driver") Signed-off-by: Xiu Jianfeng Link: https://lore.kernel.org/r/20221122152353.204132-1-xiujianfeng@huawei.com Acked-by: Nobuhiro Iwamatsu Signed-off-by: Stephen Boyd drivers/clk/visconti/pll.c | 1 + 1 file changed, 1 insertion(+) commit 5595eabd99934b464a4c845f968871ce029282bc Merge: 9abf2313adc1 8178e245fa95 Author: Stephen Boyd Date: Tue Nov 29 12:02:07 2022 -0800 Merge tag 'clk-imx-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux into clk-imx Pull i.MX clk driver updates from Abel Vesa: - Fix parent for FlexSPI clock for i.MX93 - Add USB suspend clock on i.MX8MP - Unmap anatop base on error for i.MX93 driver - Change enet clock parent to wakeup_axi_root for i.MX93 - Drop LPIT1, LPIT2, TPM1 and TPM3 clocks for i.MX93 - Mark HSIO bus clock and SYS_CNT clock as critical on i.MX93 - Add 320MHz and 640MHz entries to PLL146x - Add audio shared gate and SAI clocks for i.MX8MP * tag 'clk-imx-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux: clk: imx: rename imx_obtain_fixed_clk_hw() to imx_get_clk_hw_by_name() clk: imx8mn: fix imx8mn_enet_phy_sels clocks list clk: imx8mn: fix imx8mn_sai2_sels clocks list clk: imx: rename video_pll1 to video_pll clk: imx: replace osc_hdmi with dummy clk: imx8mn: rename vpu_pll to m7_alt_pll clk: imx: imxrt1050: add IMXRT1050_CLK_LCDIF_PIX clock gate clk: imx: imxrt1050: fix IMXRT1050_CLK_LCDIF_APB offsets clk: imx8mp: Add audio shared gate dt-bindings: clock: imx8mp: Add ids for the audio shared gate clk: imx: pll14xx: Add 320 MHz and 640 MHz entries for PLL146x clk: imx93: keep sys ctr clock always on clk: imx: keep hsio bus clock always on clk: imx93: drop tpm1/3, lpit1/2 clk dt-bindings: clock: imx93: drop TPM1/3 LPIT1/2 entry clk: imx93: correct enet clock clk: imx93: unmap anatop base in error handling path clk: imx: imx8mp: add shared clk gate for usb suspend clk dt-bindings: clocks: imx8mp: Add ID for usb suspend clock clk: imx93: correct the flexspi1 clock setting commit 266162b799a72e42bb722e81670328981b34da83 Merge: 9abf2313adc1 739a6a6bbdb7 Author: Stephen Boyd Date: Tue Nov 29 11:49:42 2022 -0800 Merge tag 'v6.2-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull Rockchip clk driver updates from Heiko Stuebner: - Support for the clock and reset unit of the rk3588 - Fix a possible memory leak in the error path of PLL creation * tag 'v6.2-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: Fix memory leak in rockchip_clk_register_pll() clk: rockchip: add clock controller for the RK3588 clk: rockchip: add lookup table support clk: rockchip: simplify rockchip_clk_add_lookup clk: rockchip: allow additional mux options for cpu-clock frequency changes clk: rockchip: add pll type for RK3588 clk: rockchip: add register offset of the cores select parent dt-bindings: clock: add rk3588 cru bindings dt-bindings: reset: add rk3588 reset definitions dt-bindings: clock: add rk3588 clock definitions clk: rockchip: use proper crypto0 name on rk3399 commit 41555cc9e2e9778ddc7c0293a4a2e4995e332643 Author: Conor Dooley Date: Fri Oct 21 17:00:30 2022 +0100 RISC-V: enable sparsemem by default for defconfig on an arch level, RISC-V defaults to FLATMEM. On PolarFire SoC, the memory layout is almost always sparse, with a maximum of 1 GiB at 0x8000_0000 & a possible 16 GiB range at 0x10_0000_0000. The Icicle kit, for example, has 2 GiB of DDR - so there's a big hole in the memory map between the two gigs. Prior to v6.1-rc1, boot times from defconfig builds were pretty bad on Icicle but enabling sparsemem would fix those issues. As of v6.1-rc1, the Icicle kit no longer boots from defconfig builds with the in-kernel devicetree. A change to the memory map resulted in a futher "sparse-ification", producing a splat on boot: OF: fdt: Ignoring memory range 0x80000000 - 0x80200000 Machine model: Microchip PolarFire-SoC Icicle Kit earlycon: ns16550a0 at MMIO32 0x0000000020100000 (options '115200n8') printk: bootconsole [ns16550a0] enabled printk: debug: skip boot console de-registration. efi: UEFI not found. Zone ranges: DMA32 [mem 0x0000000080200000-0x00000000ffffffff] Normal [mem 0x0000000100000000-0x000000107fffffff] Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000080200000-0x00000000bfbfffff] node 0: [mem 0x00000000bfc00000-0x00000000bfffffff] node 0: [mem 0x0000001040000000-0x000000107fffffff] Initmem setup node 0 [mem 0x0000000080200000-0x000000107fffffff] Kernel panic - not syncing: Failed to allocate 1073741824 bytes for node 0 memory map CPU: 0 PID: 0 Comm: swapper Not tainted 5.19.0-dirty #1 Hardware name: Microchip PolarFire-SoC Icicle Kit (DT) Call Trace: [] show_stack+0x30/0x3c [] dump_stack_lvl+0x4a/0x66 [] dump_stack+0x18/0x20 [] panic+0x124/0x2c6 [] free_area_init_core+0x0/0x11e [] free_area_init_node+0xc2/0xf6 [] free_area_init+0x222/0x260 [] misc_mem_init+0x62/0x9a [] setup_arch+0xb0/0xea [] start_kernel+0x88/0x4ee ---[ end Kernel panic - not syncing: Failed to allocate 1073741824 bytes for node 0 memory map ]--- With the aim of keeping defconfig builds booting on icicle, enable SPARSEMEM_MANUAL. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20221021160028.4042304-1-conor@kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit d800169041c0e035160c8b81f30d4b7e8f8ef777 Author: Borislav Petkov Date: Thu Nov 24 16:31:27 2022 +0100 x86/cpuid: Carve out all CPUID functionality Carve it out into a special header, where it belongs. No functional changes. Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221124164150.3040-1-bp@alien8.de arch/x86/include/asm/cpuid.h | 141 ++++++++++++++++++++++++++++++++++++++- arch/x86/include/asm/processor.h | 133 +----------------------------------- 2 files changed, 140 insertions(+), 134 deletions(-) commit 93d519a12a83baa19dae59d121439b04fb9dfded Merge: 97b801be6f8e a9d8723c72ea Author: Mark Brown Date: Tue Nov 29 19:29:05 2022 +0000 ASoC: Intel: avs: rt5682: Refactor jack handling Merge series from Cezary Rojewski : Leftover from recent series [1]. Following changes are proposed for the rt5682 sound card driver: 1) Move jack unassignment from platform_device->remove() to dai_link->exit(). This is done to make jack init and deinit flows symmetric 2) Remove platform_device->remove() function 3) Simplify card->suspend_pre() and card->resume_post() by making use of snd_soc_card_get_codec_dai() helper commit b2cf789f6cb6d449f2b457ee3fb055b7f431481f Merge: b7b275e60bcd 5d772916855f Author: Jens Axboe Date: Tue Nov 29 12:08:37 2022 -0700 Merge branch 'for-6.2/io_uring' into for-6.2/io_uring-next * for-6.2/io_uring: (41 commits) io_uring: keep unlock_post inlined in hot path io_uring: don't use complete_post in kbuf io_uring: spelling fix io_uring: remove io_req_complete_post_tw io_uring: allow multishot polled reqs to defer completion io_uring: remove overflow param from io_post_aux_cqe io_uring: add lockdep assertion in io_fill_cqe_aux io_uring: make io_fill_cqe_aux static io_uring: add io_aux_cqe which allows deferred completion io_uring: allow defer completion for aux posted cqes io_uring: defer all io_req_complete_failed io_uring: always lock in io_apoll_task_func io_uring: remove iopoll spinlock io_uring: iopoll protect complete_post io_uring: inline __io_req_complete_put() io_uring: remove io_req_tw_post_queue io_uring: use io_req_task_complete() in timeout io_uring: hold locks for io_req_complete_failed io_uring: add completion locking for iopoll io_uring: kill io_cqring_ev_posted() and __io_cq_unlock_post() ... commit f8fc65e50ad71c139a12a96e64eeba5005e491d5 Author: Nathan Barrett-Morrison Date: Mon Nov 28 11:41:47 2022 -0500 spi: cadence-quadspi: Add minimum operable clock rate warning to baudrate divisor calculation This Cadence QSPI IP has a 4-bit clock divisor field for baud rate division. For example: 0b0000 = /2 0b0001 = /4 0b0010 = /6 ... 0b1111 = /32 The maximum divisor is 32 (when div = CQSPI_REG_CONFIG_BAUD_MASK). If we assume a reference clock of 500MHz and we set our spi-max-frequency to something low, such as 10 MHz. The calculated bit field for the divisor ends up being: DIV_ROUND_UP(500000000/(2*10000000))-1 = 25 25 is 0b11001... which truncates to a divisor field of 0b1001 (or /20). This is higher than our anticipated max-frequency of 10MHz (500MHz/20 = 25 MHz). Instead, let's make sure we're always using the maximum divisor (/32) in this case and give the user a warning about the rate adjustment. Signed-off-by: Nathan Barrett-Morrison Link: https://lore.kernel.org/r/20221128164147.158441-1-nathan.morrison@timesys.com Signed-off-by: Mark Brown drivers/spi/spi-cadence-quadspi.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a9d8723c72eada2e303e16a3c81d43bc802fbc6d Author: Amadeusz Sławiński Date: Tue Nov 29 19:07:38 2022 +0100 ASoC: Intel: avs: rt5682: Refactor jack handling Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221129180738.2866290-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/rt5682.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 19bb7c3053ee54fd7fa7635f680fba3969f4a026 Author: Amadeusz Sławiński Date: Tue Nov 29 19:07:37 2022 +0100 ASoC: Intel: avs: rt5682: Add define for codec DAI name Following commits will make use of it to find codec DAI, define it first. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221129180738.2866290-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/rt5682.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 32c97d980e2eef25465d453f2956a9ca68926a3c Author: Gaurav Kohli Date: Fri Nov 25 22:14:51 2022 -0800 x86/hyperv: Remove unregister syscore call from Hyper-V cleanup Hyper-V cleanup code comes under panic path where preemption and irq is already disabled. So calling of unregister_syscore_ops might schedule out the thread even for the case where mutex lock is free. hyperv_cleanup unregister_syscore_ops mutex_lock(&syscore_ops_lock) might_sleep Here might_sleep might schedule out this thread, where voluntary preemption config is on and this thread will never comes back. And also this was added earlier to maintain the symmetry which is not required as this can comes during crash shutdown path only. To prevent the same, removing unregister_syscore_ops function call. Signed-off-by: Gaurav Kohli Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1669443291-2575-1-git-send-email-gauravkohli@linux.microsoft.com Signed-off-by: Wei Liu arch/x86/hyperv/hv_init.c | 2 -- 1 file changed, 2 deletions(-) commit 8d283ee62b077968e218531b24260e1cc51bd484 Author: Jinlong Chen Date: Tue Nov 29 23:46:38 2022 +0800 block: use bool as the return type of elv_iosched_allow_bio_merge We have bool type now, update the old signature. Signed-off-by: Jinlong Chen Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/0db0a0298758d60d0f4df8b7126ac6a381e5a5bb.1669736350.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/elevator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6451ede406b9f57fcd61d48433a6b8b2be862e3 Author: Jinlong Chen Date: Tue Nov 29 23:46:37 2022 +0800 block: replace "len+name" with "name+len" in elv_iosched_show The "pointer + offset" pattern is more resonable. Signed-off-by: Jinlong Chen Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/d9beaee71b14f7b2a39ab0db6458dc0f7d961ceb.1669736350.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/elevator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a3b3660fd30c028e7ae1cd82697933789962406 Author: Jinlong Chen Date: Tue Nov 29 23:46:36 2022 +0800 block: always use 'e' when printing scheduler name Printing e->elevator_name in all cases improves the readability, and 'e' and 'cur' are identical in this branch. Suggested-by: Christoph Hellwig Signed-off-by: Jinlong Chen Link: https://lore.kernel.org/r/4bae180ffbac608ea0cf46ffa9739ce0973b60aa.1669736350.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/elevator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5998249e3238428156b09911f1606b41113443c5 Author: Jinlong Chen Date: Tue Nov 29 23:46:35 2022 +0800 block: replace continue with else-if in elv_iosched_show else-if is more readable than continue here. Signed-off-by: Jinlong Chen Link: https://lore.kernel.org/r/77ac19ba556efd2c8639a6396eb4203c59bc13d6.1669736350.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/elevator.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7919d679ae09c0dc30dfecb7cbc02306cf95cdd7 Author: Jinlong Chen Date: Tue Nov 29 23:46:34 2022 +0800 block: include 'none' for initial elv_iosched_show call This makes the printing order of the io schedulers consistent, and removes a redundant q->elevator check. Signed-off-by: Jinlong Chen Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/bdd7083ed4f232e3285f39081e3c5f30b20b8da2.1669736350.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/elevator.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 97b801be6f8e53676b9f2b105f54e35c745c1b22 Author: Zhang Qilong Date: Thu Sep 29 00:04:02 2022 +0800 ASoC: pcm512x: Fix PM disable depth imbalance in pcm512x_probe The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. We fix it by going to err_pm instead of err_clk. Fixes:f086ba9d5389c ("ASoC: pcm512x: Support mastering BCLK/LRCLK using the PLL") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20220928160402.126140-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown sound/soc/codecs/pcm512x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f9cdf4130671d767071607d0a7568c9bd36a68d0 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 (cherry picked from commit 8d58bb7991c45f6b60710cc04c9498c6ea96db90) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1382901f75a5a7dc8eac05059fd0c7816def4eae 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 (cherry picked from commit 7674cd0b7d28b952151c3df26bbfa7e07eb2b4ec) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35aba5f51a39fb95351844ffb14ec02b8970e19f 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 (cherry picked from commit f301a29f143760ce8d3d6b6a8436d45d3448cde6) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_gt_requests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a5347293992e0412bc748dae11228a7081393fa 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 (cherry picked from commit f235dbd5b768e238d365fd05d92de5a32abc1c1f) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_gt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 8e5f37828145fa662f30f890f74924d55255d68d 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 (cherry picked from commit 02224691cb0f367acb476911bddfa21e2d596ca5) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/uc/intel_huc.c | 12 +++++++----- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) commit 4568180411e0fb5613e217da1c693466e39b9c27 Author: Oliver Upton Date: Fri Nov 18 21:15:03 2022 +0000 KVM: selftests: Build access_tracking_perf_test for arm64 Does exactly what it says on the tin. Reviewed-by: Gavin Shan Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221118211503.4049023-3-oliver.upton@linux.dev tools/testing/selftests/kvm/Makefile | 1 + 1 file changed, 1 insertion(+) commit 9ec1eb1bcceec735fb3c9255cdcdbcc2acf860a0 Author: Oliver Upton Date: Fri Nov 18 21:15:02 2022 +0000 KVM: selftests: Have perf_test_util signal when to stop vCPUs Signal that a test run is complete through perf_test_args instead of having tests open code a similar solution. Ensure that the field resets to false at the beginning of a test run as the structure is reused between test runs, eliminating a couple of bugs: access_tracking_perf_test hangs indefinitely on a subsequent test run, as 'done' remains true. The bug doesn't amount to much right now, as x86 supports a single guest mode. However, this is a precondition of enabling the test for other architectures with >1 guest mode, like arm64. memslot_modification_stress_test has the exact opposite problem, where subsequent test runs complete immediately as 'run_vcpus' remains false. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson [oliver: added commit message, preserve spin_wait_for_next_iteration()] Signed-off-by: Oliver Upton Reviewed-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221118211503.4049023-2-oliver.upton@linux.dev tools/testing/selftests/kvm/access_tracking_perf_test.c | 8 +------- tools/testing/selftests/kvm/include/perf_test_util.h | 3 +++ tools/testing/selftests/kvm/lib/perf_test_util.c | 3 +++ tools/testing/selftests/kvm/memslot_modification_stress_test.c | 6 +----- 4 files changed, 8 insertions(+), 12 deletions(-) commit 7ba63521a1e9d8ca6fb55ead19e6e2b850b8fd80 Author: Tharun Kumar P Date: Thu Oct 6 10:35:14 2022 +0530 spi: microchip: pci1xxxx: Add suspend and resume support for PCI1XXXX SPI driver Implement suspend, resume callbacks, store config at suspend and restore config at time of resume Signed-off-by: Tharun Kumar P Link: https://lore.kernel.org/r/20221006050514.115564-3-tharunkumar.pasumarthi@microchip.com Signed-off-by: Mark Brown drivers/spi/spi-pci1xxxx.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit f4f473f8392534a027f1db5f887ac01a9f0e8905 Merge: e8679db2970f 28baae9bfc1f Author: Mark Brown Date: Tue Nov 29 16:56:44 2022 +0000 ASoC: Intel: avs: Refactor jack handling Merge series from Cezary Rojewski : For all the boards included in this patchset, a similar set of changes is proposed: 1) Move jack unassignment from platform_device->remove() to dai_link->exit(). This is done to make jack init and deinit flows symmetric 2) Remove platform_device->remove() function 3) Simplify card->suspend_pre() and card->resume_post() by making use of snd_soc_card_get_codec_dai() helper While bdw_rt286 board - which is utilized by the catpt-driver - is definitely not part of "avs", same treatment applies. And thus decided to make it part of this series instead of sending it separately. commit 7a945ce0c19bbdf821d5f7ce1515e7fb8e444465 Author: Yuan Can Date: Tue Nov 29 01:39:34 2022 +0000 udp_tunnel: Add checks for nla_nest_start() in __udp_tunnel_nic_dump_write() As the nla_nest_start() may fail with NULL returned, the return value should be checked. Note that this is not a real bug, nothing will break here. The next nla_put() will fail as well and we'll bail (and nla_nest_cancel() can handle NULL). But we keep getting those "fixes" so whatever. Signed-off-by: Yuan Can Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20221129013934.55184-1-yuancan@huawei.com Signed-off-by: Jakub Kicinski net/ipv4/udp_tunnel_nic.c | 2 ++ 1 file changed, 2 insertions(+) commit d3568c7416384e72e3827611e841f98d66396de8 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:42:36 2022 +0100 ARM: dts: socfpga: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: socfpga_arria5_socdk.dtb: leds: 'hps0', 'hps1', 'hps2', 'hps3' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria5_socdk.dts | 8 ++++---- arch/arm/boot/dts/socfpga_cyclone5_de0_nano_soc.dts | 2 +- arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) commit 89f53acc117e83b5d26ed66d558faa6fa8d9f6b9 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:42:35 2022 +0100 arm64: dts: altera: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: altera/socfpga_stratix10_socdk.dtb: leds: 'hps0', 'hps1', 'hps2' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts | 6 +++--- arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_nand.dts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 56ee51222e571b1fa0f10ac9227d714d3a929d04 Author: Konstantin Meskhidze Date: Tue Nov 29 15:10:32 2022 +0800 drm/amdgpu: Fix logic error This commit fixes logic error in function 'amdgpu_hw_ip_info': - value 'uvd' might be 'vcn'. Signed-off-by: Konstantin Meskhidze Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75818afff631e1ea785a82c3e8bb82eb0dee539c Author: Konstantin Meskhidze Date: Mon Nov 28 23:02:54 2022 -0500 drm/amdkfd: Fix memory leakage This patch fixes potential memory leakage and seg fault in _gpuvm_import_dmabuf() function Fixes: d4ec4bdc0bd5 ("drm/amdkfd: Allow access for mmapping KFD BOs") Signed-off-by: Konstantin Meskhidze Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d271e2e0ad0663b2f064e8e902430c45c11214d Author: Randy Dunlap Date: Fri Nov 25 13:00:55 2022 -0800 drm/amdgpu: update docum. filename following rename Fix documentation build errors for amdgpu: correct the filename. Error: Cannot open file ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c Error: Cannot open file ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c Error: Cannot open file ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -sphinx-version 5.3.0 -function MMU Notifier ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c' failed with return code 1 WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -sphinx-version 5.3.0 -internal ../drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c' failed with return code 2 Fixes: d9483ecd327b ("drm/amdgpu: rename the files for HMM handling") Signed-off-by: Randy Dunlap Cc: Christian König Cc: Alex Deucher Cc: Felix Kuehling Cc: David Airlie Cc: Daniel Vetter Cc: Jonathan Corbet Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Alex Deucher Documentation/gpu/amdgpu/driver-core.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca54639c7752edf1304d92ff4d0c049d4efc9ba0 Author: Xiongfeng Wang Date: Tue Nov 22 19:30:43 2022 +0800 drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios() 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 amdgpu_atrm_get_bios() with 'pdev' not NULL, we need to call pci_dev_put() to decrease the refcount. Add the missing pci_dev_put() to avoid refcount leak. Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)") Signed-off-by: Xiongfeng Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 1 + 1 file changed, 1 insertion(+) commit abcb2acee0d65cccac7de6833d4a63674cb1905d Author: Guchun Chen Date: Thu Nov 24 13:23:09 2022 +0800 drm/amdgpu: use dev_dbg to print messages in runtime cycle Runtime PM can happen pretty frequently, as these printings may be annoyed, switch to dev_dbg. Suggested-by: Lijo Lazar Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f6015da7f2410109bd2ccd2e2828f26185aeb81d Author: Alvin Lee Date: Sat Nov 19 11:42:41 2022 -0500 drm/amd/display: Fix DTBCLK disable requests and SRC_SEL programming [Description] - When transitioning FRL / DP2 is not required, we will always request DTBCLK = 0Mhz, but PMFW returns the min freq - This causes us to make DTBCLK requests every time we call optimize after transitioning from FRL to non-FRL - If DTBCLK is not required, request the min instead (then we only need to make 1 extra request at boot time) - Also when programming PIPE_DTO_SRC_SEL, don't programming for DP first, just programming once for the required selection (programming DP on an HDMI connection then switching back causes corruption) Reviewed-by: Dillon Varone Acked-by: Jasdeep Dhillon Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) commit 7a259c6df9010fb9508dcbf34a3f5f16993ca37b Author: Stylon Wang Date: Tue Nov 15 20:10:05 2022 +0800 drm/amd/display: Create debugfs to tell if connector is DPIA link [Why] Tests need to tell if display is connected via USB4 DPIA link. Currently this is only possible via analyzing dmesg logs. [How] Create a per-connector debugfs entry to report if the link is tunneled via USB4 DPIA. Reviewed-by: Wayne Lin Acked-by: Jasdeep Dhillon Signed-off-by: Stylon Wang Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit bb622e0c004404b6131633faa6bd8c4939b1df42 Author: Dillon Varone Date: Thu Nov 17 20:04:46 2022 -0500 drm/amd/display: program output tf when required [Description] Output transfer function must be programmed per pipe as part of a front end update when the plane changes, or output transfer function changes for a given plane. Reviewed-by: Alvin Lee Acked-by: Jasdeep Dhillon Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d5bec4030fd7ab206e7f3c118de7c459ca20f7ef Author: Dillon Varone Date: Wed Nov 16 19:32:16 2022 -0500 drm/amd/display: Use DCC meta pitch for MALL allocation requirements [Description] Calculations for determining DCC meta size should be pitch*height*bpp/256. Reviewed-by: Alvin Lee Acked-by: Jasdeep Dhillon Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) commit 359bcc904e233c8285d40a92121c8a5056d36e6f Author: Dillon Varone Date: Thu Nov 17 13:57:31 2022 -0500 drm/amd/display: Fix arithmetic error in MALL size calculations for subvp [Description] Need to subtract unused section of the viewport when calculating required space in MALL for subvp instead of adding, to prevent over allocation. Reviewed-by: Alvin Lee Acked-by: Jasdeep Dhillon Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aaae52110a381033d960c087bd276e2a857eb7cb Author: Alvin Lee Date: Thu Nov 17 11:55:52 2022 -0500 drm/amd/display: Retain phantom pipes when min transition into subvp (#7358) [Description] - When entering into a SubVP config that requires a minimal transition we need to retain phantom pipes and also restore the mall config - This is because the min transition will remove phantom pipes from the context (shallow copy) and not restore it's original state - This is just a workaround, and needs a proper fix Reviewed-by: Jun Lei Acked-by: Jasdeep Dhillon Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 21 ++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dc_stream.h | 11 +++++++++++ .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 ++ .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 11 ----------- .../gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 ++ 6 files changed, 37 insertions(+), 12 deletions(-) commit fd9978aa7db9686a392be3486aa8f53ee8f86e55 Author: Alvin Lee Date: Fri Nov 18 13:49:11 2022 -0500 drm/amd/display: Don't overwrite subvp pipe info in fast updates [Description] - This is a workaround to avoid concurrency issues -- a fast update creates a shallow copy of the dc current_state, and removes all subvp/phantom related flags. - We want to prevent the fast update thread from removing those flags in case there's another thread running that requires the info for proper programming Reviewed-by: Jun Lei Acked-by: Jasdeep Dhillon Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 64 +++++++++++++--------- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 2 +- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 4 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- 5 files changed, 44 insertions(+), 30 deletions(-) commit 6609141c49df1b86fbad26a8643d4b4044f28b11 Author: Dmytro Laktyushkin Date: Tue Nov 22 10:06:19 2022 -0500 drm/amd/display: set per pipe dppclk to 0 when dpp is off The 'commit 52e4fdf09ebc ("drm/amd/display: use low clocks for no plane configs")' introduced a change that set low clock values for DCN31 and DCN32. As a result of these changes, DC started to spam the log with the following warning: ------------[ cut here ]------------ WARNING: CPU: 8 PID: 1486 at drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dccg.c:58 dccg2_update_dpp_dto+0x3f/0xf0 [amdgpu] [..] CPU: 8 PID: 1486 Comm: kms_atomic Tainted: G W 5.18.0+ #1 RIP: 0010:dccg2_update_dpp_dto+0x3f/0xf0 [amdgpu] RSP: 0018:ffffbbd8025334d0 EFLAGS: 00010206 RAX: 00000000000001ee RBX: ffffa02c87dd3de0 RCX: 00000000000a7f80 RDX: 000000000007dec3 RSI: 0000000000000000 RDI: ffffa02c87dd3de0 RBP: ffffbbd8025334e8 R08: 0000000000000001 R09: 0000000000000005 R10: 00000000000331a0 R11: ffffffffc0b03d80 R12: ffffa02ca576d000 R13: ffffa02cd02c0000 R14: 00000000001453bc R15: ffffa02cdc280000 [..] dcn20_update_clocks_update_dpp_dto+0x4e/0xa0 [amdgpu] dcn32_update_clocks+0x5d9/0x650 [amdgpu] dcn20_prepare_bandwidth+0x49/0x100 [amdgpu] dcn30_prepare_bandwidth+0x63/0x80 [amdgpu] dc_commit_state_no_check+0x39d/0x13e0 [amdgpu] dc_commit_streams+0x1f9/0x3b0 [amdgpu] dc_commit_state+0x37/0x120 [amdgpu] amdgpu_dm_atomic_commit_tail+0x5e5/0x2520 [amdgpu] ? _raw_spin_unlock_irqrestore+0x1f/0x40 ? down_trylock+0x2c/0x40 ? vprintk_emit+0x186/0x2c0 ? vprintk_default+0x1d/0x20 ? vprintk+0x4e/0x60 We can easily trigger this issue by using a 4k@120 or a 2k@165 and running some of the kms_atomic tests. This warning is triggered because the per-pipe clock update is not happening; this commit fixes this issue by ensuring that DPPCLK is updated when calculating the watermark and dlg is invoked. Fixes: 2641c7b78081 ("drm/amd/display: use low clocks for no plane configs") Reported-by: Mark Broadworth Reviewed-by: Rodrigo Siqueira Signed-off-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 3 +++ drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit ead08b95fa50f40618c72b93a849c4ae30c9cd50 Author: Stylon Wang Date: Thu Nov 10 21:53:01 2022 +0800 drm/amd/display: Fix race condition in DPIA AUX transfer [Why] This fix was intended for improving on coding style but in the process uncovers a race condition, which explains why we are getting incorrect length in DPIA AUX replies. Due to the call path of DPIA AUX going from DC back to DM layer then again into DC and the added complexities on top of current DC AUX implementation, a proper fix to rely on current dc_lock to address the race condition is difficult without a major overhual on how DPIA AUX is implemented. [How] - Add a mutex dpia_aux_lock to protect DPIA AUX transfers - Remove DMUB_ASYNC_TO_SYNC_ACCESS_* codes and rely solely on aux_return_code_type for error reporting and handling - Separate SET_CONFIG from DPIA AUX transfer because they have quiet different processing logic - Remove unnecessary type casting to and from void * type Reviewed-by: Nicholas Kazlauskas Acked-by: Jasdeep Dhillon Signed-off-by: Stylon Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 147 ++++++++++----------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 17 ++- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 10 +- 3 files changed, 89 insertions(+), 85 deletions(-) commit 719b59a3fac159e974164b3d52c9ad763a5d6bc8 Author: Dillon Varone Date: Wed Nov 16 10:03:23 2022 -0500 drm/amd/display: MALL SS calculations should iterate over all pipes for cursor [Description] MALL SS allocation calculations should iterate over all pipes to determine the the allocation size required for HW cursor. Reviewed-by: Alvin Lee Acked-by: Jasdeep Dhillon Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68a60f6bab476970e73690649b5c4b60e0249b65 Author: Aric Cyr Date: Mon Nov 21 00:12:38 2022 -0500 drm/amd/display: 3.2.214 This version brings along following fixes: -Program output transfer function when required -Fix arthmetic errror in MALL size caluclations for subvp -DCC Meta pitch used for MALL allocation -Debugfs entry to tell if connector is DPIA link -Use largest vready_offset in pipe group -Fixes race condition in DPIA Aux transfer Reviewed-by: Rodrigo Siqueira Acked-by: Jasdeep Dhillon Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5842abd985b792a3b13a89b6dae4869b56656c92 Author: Wesley Chalmers Date: Wed Nov 9 17:43:13 2022 -0500 drm/amd/display: Use the largest vready_offset in pipe group [WHY] Corruption can occur in LB if vready_offset is not large enough. DML calculates vready_offset for each pipe, but we currently select the top pipe's vready_offset, which is not necessarily enough for all pipes in the group. [HOW] Wherever program_global_sync is currently called, iterate through the entire pipe group and find the highest vready_offset. Reviewed-by: Dillon Varone Acked-by: Jasdeep Dhillon Signed-off-by: Wesley Chalmers Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 30 ++++++++++++++++++++-- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 29 +++++++++++++++++++-- 2 files changed, 55 insertions(+), 4 deletions(-) commit 725a521a18734f65de05b8d353b5bd0d3ca4c37a Author: Xiongfeng Wang Date: Tue Nov 22 19:30:42 2022 +0800 drm/radeon: Fix PCI device refcount leak in radeon_atrm_get_bios() 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 radeon_atrm_get_bios() with 'pdev' not NULL, we need to call pci_dev_put() to decrease the refcount. Add the missing pci_dev_put() to avoid refcount leak. Fixes: d8ade3526b2a ("drm/radeon: handle non-VGA class pci devices with ATRM") Fixes: c61e2775873f ("drm/radeon: split ATRM support out from the ATPX handler (v3)") Signed-off-by: Xiongfeng Wang Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_bios.c | 1 + 1 file changed, 1 insertion(+) commit 7d4f8db4a1448e0b6acbadf53c51cae8a2fef753 Author: Dan Carpenter Date: Fri Nov 25 10:39:49 2022 +0300 drm/amdkfd: Remove unnecessary condition in kfd_topology_add_device() We re-arranged this code recently so "ret" is always zero at this point. Signed-off-by: Dan Carpenter Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 484d7dcc709da46a5976c9530eeff931e9ecba82 Author: Yu Songping Date: Thu Nov 24 09:52:37 2022 +0800 swsmu/amdgpu_smu: Fix the wrong if-condition The logical operator '&&' will make smu->ppt_funcs->set_gfx_power_up_by_imu segment fault when smu->ppt_funcs is NULL. Signed-off-by: Yu Songping Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a2a19b7ac59d667d6a3221e7d50b4ab9937792b Author: Yushan Zhou Date: Wed Nov 23 15:44:37 2022 +0800 drm/amdgpu: remove redundant NULL check release_firmware() checks whether firmware pointer is NULL. Remove the redundant NULL check in psp_sw_fini(). Signed-off-by: Yushan Zhou Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 36 +++++++++++++++------------------ 1 file changed, 16 insertions(+), 20 deletions(-) commit 65009bf2b4d287ef7ad7e6eb082b7c3d35eb611f Author: Veerabadhran Gopalakrishnan Date: Wed Nov 23 20:10:32 2022 +0530 amdgpu/nv.c: Corrected typo in the video capabilities resolution Corrected the typo in the 4K resolution parameters. Fixes: b3a24461f9fb15 ("amdgpu/nv.c - Added codec query for Beige Goby") Fixes: 9075096b09e590 ("amdgpu/nv.c - Optimize code for video codec support structure") Fixes: 9ac0edaa0f8323 ("drm/amdgpu: add vcn_4_0_0 video codec query") Signed-off-by: Veerabadhran Gopalakrishnan Acked-by: Luben Tuikov Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nv.c | 28 ++++++++++++++-------------- drivers/gpu/drm/amd/amdgpu/soc15.c | 24 ++++++++++++------------ drivers/gpu/drm/amd/amdgpu/soc21.c | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) commit dfd0287bd3920e132a8dae2a0ec3d92eaff5f2dd Author: Liang He Date: Tue Nov 22 12:28:49 2022 +0800 drm/amdgpu: Fix potential double free and null pointer dereference In amdgpu_get_xgmi_hive(), we should not call kfree() after kobject_put() as the PUT will call kfree(). In amdgpu_device_ip_init(), we need to check the returned *hive* which can be NULL before we dereference it. Signed-off-by: Liang He Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) commit 2c83e3fd928b9cb1e35340e58d4b1bd2eea23ed6 Author: Tim Huang Date: Mon Nov 21 10:24:14 2022 +0800 drm/amdgpu: enable PSP IP v13.0.11 support Enable PSP FW loading for PSP IP v13.0.11 Signed-off-by: Tim Huang Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 1 + drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 3 +++ 2 files changed, 4 insertions(+) commit 2a0fe2ca6e9c9bf9c47a9f9f0d67c13281a13f8c Author: Saleemkhan Jamadar Date: Tue Nov 8 11:24:48 2022 +0530 drm/amdgpu: Enable pg/cg flags on GC11_0_4 for VCN This enable VCN PG, CG and JPEG PG, CG Signed-off-by: Saleemkhan Jamadar Reviewed-by: Leo Liu Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7308ceb44663f40bf9e7373c3b1aa4f7f433d625 Author: Yifan Zhang Date: Tue Oct 25 16:59:44 2022 +0800 drm/amdgpu/discovery: enable nbio support for NBIO v7.7.1 this patch is to enable nbio support for NBIO v7.7.1. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit 069a5af97ce3a1448a3566ce8b63b60e51e19958 Author: Tim Huang Date: Mon Oct 24 11:05:59 2022 +0800 drm/amdgpu/pm: use the specific mailbox registers only for SMU IP v13.0.4 The SMU IP v13.0.4 ppt interface is shared by IP v13.0.11, they use the different mailbox register offset. So use the specific mailbox registers offset for v13.0.4. Signed-off-by: Tim Huang Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 18ad18853cf2d8b94cef0112ba94f7a7535a9e89 Author: Tim Huang Date: Mon Oct 24 10:32:05 2022 +0800 drm/amdgpu/soc21: add mode2 asic reset for SMU IP v13.0.11 Set the default reset method to mode2 for SMU IP v13.0.11 Signed-off-by: Tim Huang Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 1 file changed, 1 insertion(+) commit 9f83e61201bb21957e4993736532edad7a11c7fa Author: Yifan Zhang Date: Wed Oct 12 13:17:40 2022 +0800 drm/amdgpu/pm: add GFXOFF control IP version check for SMU IP v13.0.11 Enable the SMU IP v13.0.11 GFXOFF control Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 1 + 1 file changed, 1 insertion(+) commit 51e7a2168769c2f46edd93a18d4cba4a6d4adb13 Author: Yifan Zhang Date: Wed Oct 12 13:16:25 2022 +0800 drm/amdgpu: add smu 13 support for smu 13.0.11 this patch to add smu 13 support for smu 13.0.11. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 ++ 2 files changed, 3 insertions(+) commit 16412a94364d1dcebded9217ecb693c9659eaabc Author: Yifan Zhang Date: Wed Oct 12 13:08:30 2022 +0800 drm/amdgpu/pm: enable swsmu for SMU IP v13.0.11 Add the entry to set the ppt functions for SMU IP v13.0.11. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 + 1 file changed, 1 insertion(+) commit 88c21c2b56aa21dd34290d43ada74033dc3bfe35 Author: Yifan Zhang Date: Wed Oct 12 13:01:22 2022 +0800 drm/amdkfd: add GC 11.0.4 KFD support Add initial support for GC 11.0.4 in KFD compute driver. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 ++ 2 files changed, 3 insertions(+) commit d0ca8248999e4c5b02ac64f40536ff46dc14dda7 Author: Yifan Zhang Date: Wed Oct 12 12:56:01 2022 +0800 drm/amdgpu: add gmc v11 support for GC 11.0.4 Add gmc v11 support for GC 11.0.4. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 1 + 1 file changed, 1 insertion(+) commit 311d52367d0a7985ee1132662bad46f09169eed2 Author: Yifan Zhang Date: Wed Oct 12 12:54:52 2022 +0800 drm/amdgpu: add soc21 common ip block support for GC 11.0.4 Add common soc21 ip block support for GC 11.0.4. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1763cb65e870e783e26d2dc9def4edbeadcb1050 Author: Yifan Zhang Date: Wed Oct 12 12:49:06 2022 +0800 drm/amdgpu: add gfx support for GC 11.0.4 this patch to add GC 11.0.4 gfx support to gfx11 implementation. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit dd2d9c7fd7716838d477e257f43facd68c53d3a9 Author: Yifan Zhang Date: Wed Oct 12 11:16:29 2022 +0800 drm/amdgpu/discovery: set the APU flag for GC 11.0.4 Set the APU flag appropriately for GC 11.0.4. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit 94ab70685844227b5c9cb9027a5c4acd3b0e4564 Author: Yifan Zhang Date: Wed Oct 12 11:15:24 2022 +0800 drm/amdgpu: set GC 11.0.4 family this patch is to set GC 11.0.4 family. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit 7c1389f1b1228b96e621815e63eaa2e89b9f7511 Author: Tim Huang Date: Mon Nov 21 16:19:44 2022 +0800 drm/amdgpu/discovery: add PSP IP v13.0.11 support Add PSP IP v13.0.11 ip discovery support. Signed-off-by: Tim Huang Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit 6a6af77570add4e58721386be429dbd02cd4b9dd Author: Yifan Zhang Date: Wed Oct 12 11:11:57 2022 +0800 drm/amdgpu/discovery: enable mes support for GC v11.0.4 this patch is to enable mes for GC 11.0.4. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit b952d6b3d3ff3c1570fab77f2137d5e5280a0e57 Author: Yifan Zhang Date: Wed Oct 12 11:11:09 2022 +0800 drm/amdgpu/discovery: enable gfx v11 for GC 11.0.4 Enable gfx v11 for GC 11.0.4. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit d5fd8c89ed206b2df3933bc4ea129401b2b60869 Author: Yifan Zhang Date: Wed Oct 12 11:09:50 2022 +0800 drm/amdgpu/discovery: enable gmc v11 for GC 11.0.4 Enable gmc (graphic memory controller) v11 for GC 11.0.4. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit 69dc98bbd44160930b6b3ca9ca558f89435d2702 Author: Yifan Zhang Date: Wed Oct 12 11:08:49 2022 +0800 drm/amdgpu/discovery: enable soc21 common for GC 11.0.4 Enable soc21 common for GC 11.0.4. Signed-off-by: Yifan Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit c0924ad731a8bbff14b5c733a87f572b000b290c Author: Likun Gao Date: Wed Nov 23 17:49:28 2022 +0800 drm/amdgpu: skip vram reserve on firmware_v2_2 for bare-metal vram_usagebyfirmware v2_2 is only used in SRIOV case, skip the related settings in bare-metal case currently. Signed-off-by: Likun Gao Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f4b09c295e54ef310085253f986f62999626865f Author: Guchun Chen Date: Wed Nov 23 09:39:40 2022 +0800 drm/amdgpu: add printing to indicate rpm completeness Add an explicit printing to tell when finishing rpm execution in amdgpu. Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 86a3c691dbcee3f71aa59a3a36d2aa055cea95d6 Author: Guchun Chen Date: Tue Nov 22 17:47:04 2022 +0800 drm/amd/pm/smu11: poll BACO status after RPM BACO exits After executing BACO exit, driver needs to poll the status to ensure FW has completed BACO exit sequence to prevent timing issue. v2: use usleep_range to replace msleep to fix checkpatch.pl warnings Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 6dca7efe6e522bf213c7dab691fa580d82f48f74 Author: Guchun Chen Date: Tue Nov 22 17:33:24 2022 +0800 drm/amd/pm/smu11: BACO is supported when it's in BACO state Return true early if ASIC is in BACO state already, no need to talk to SMU. It can fix the issue that driver was not calling BACO exit at all in runtime pm resume, and a timing issue leading to a PCI AER error happened eventually. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") Suggested-by: Lijo Lazar Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6d96ced7600e02ac1efb03a21af529fd9a95e3c6 Author: Tong Liu01 Date: Thu Nov 17 18:18:58 2022 +0800 drm/amdgpu: add drv_vram_usage_va for virt data exchange For vram_usagebyfirmware_v2_2, fw_vram_reserve is not used. So fw_vram_usage_va is NULL, and cannot do virt data exchange anymore. Should add drv_vram_usage_va to do virt data exchange in vram_usagebyfirmware_v2_2 case. And refine some code style checks in pre add vram reservation logic patch Signed-off-by: Tong Liu01 Acked-by: Luben Tuikov Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 16 ++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 54 +++++++++++++++--------- 4 files changed, 49 insertions(+), 29 deletions(-) commit c1420a5dd4dd2a1ffc86965ad1c6f439afb130bc Author: James Zhu Date: Thu Nov 17 15:57:52 2022 -0500 drm/amdgpu: fix stall on CPU when allocate large system memory -v2: 1. rename variable to redue confuse 2. optimize the code -v3: move new define out of the middle of the code -v4: squash in minmax error fix (Luben) When applications try to allocate large system (more than > 128GB), "stall cpu" is reported. for such large system memory, walk_page_range takes more than 20s usually. The warning message can be removed when splitting hmm range into smaller ones which is not more 64GB for each walk_page_range. [ 164.437617] amdgpu:amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu:1753: amdgpu: create BO VA 0x7f63c7a00000 size 0x2f16000000 domain CPU [ 164.488847] amdgpu:amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu:1785: amdgpu: creating userptr BO for user_addr = 7f63c7a00000 [ 185.439116] rcu: INFO: rcu_sched self-detected stall on CPU [ 185.439125] rcu: 8-....: (20999 ticks this GP) idle=e22/1/0x4000000000000000 softirq=2242/2242 fqs=5249 [ 185.439137] (t=21000 jiffies g=6325 q=1215) [ 185.439141] NMI backtrace for cpu 8 [ 185.439143] CPU: 8 PID: 3470 Comm: kfdtest Kdump: loaded Tainted: G O 5.12.0-0_fbk5_zion_rc1_5697_g2c723fb88626 #1 [ 185.439147] Hardware name: HPE ProLiant XL675d Gen10 Plus/ProLiant XL675d Gen10 Plus, BIOS A47 11/06/2020 [ 185.439150] Call Trace: [ 185.439153] [ 185.439157] dump_stack+0x64/0x7c [ 185.439163] nmi_cpu_backtrace.cold.7+0x30/0x65 [ 185.439165] ? lapic_can_unplug_cpu+0x70/0x70 [ 185.439170] nmi_trigger_cpumask_backtrace+0xf9/0x100 [ 185.439174] rcu_dump_cpu_stacks+0xc5/0xf5 [ 185.439178] rcu_sched_clock_irq.cold.97+0x112/0x38c [ 185.439182] ? tick_sched_handle.isra.21+0x50/0x50 [ 185.439185] update_process_times+0x8c/0xc0 [ 185.439189] tick_sched_timer+0x63/0x70 [ 185.439192] __hrtimer_run_queues+0xff/0x250 [ 185.439195] hrtimer_interrupt+0xf4/0x200 [ 185.439199] __sysvec_apic_timer_interrupt+0x51/0xd0 [ 185.439201] sysvec_apic_timer_interrupt+0x69/0x90 [ 185.439206] [ 185.439207] asm_sysvec_apic_timer_interrupt+0x12/0x20 [ 185.439211] RIP: 0010:clear_page_rep+0x7/0x10 [ 185.439214] Code: e8 fe 7c 51 00 44 89 e2 48 89 ee 48 89 df e8 60 ff ff ff c6 03 00 5b 5d 41 5c c3 cc cc cc cc cc cc cc cc b9 00 02 00 00 31 c0 48 ab c3 0f 1f 44 00 00 31 c0 b9 40 00 00 00 66 0f 1f 84 00 00 [ 185.439218] RSP: 0018:ffffc9000f58f818 EFLAGS: 00000246 [ 185.439220] RAX: 0000000000000000 RBX: 0000000000000881 RCX: 000000000000005c [ 185.439223] RDX: 0000000000100dca RSI: 0000000000000000 RDI: ffff88a59e0e5d20 [ 185.439225] RBP: ffffea0096783940 R08: ffff888118c35280 R09: ffffea0096783940 [ 185.439227] R10: ffff888000000000 R11: 0000160000000000 R12: ffffea0096783980 [ 185.439228] R13: ffffea0096783940 R14: ffff88b07fdfdd00 R15: 0000000000000000 [ 185.439232] prep_new_page+0x81/0xc0 [ 185.439236] get_page_from_freelist+0x13be/0x16f0 [ 185.439240] ? release_pages+0x16a/0x4a0 [ 185.439244] __alloc_pages_nodemask+0x1ae/0x340 [ 185.439247] alloc_pages_vma+0x74/0x1e0 [ 185.439251] __handle_mm_fault+0xafe/0x1360 [ 185.439255] handle_mm_fault+0xc3/0x280 [ 185.439257] hmm_vma_fault.isra.22+0x49/0x90 [ 185.439261] __walk_page_range+0x692/0x9b0 [ 185.439265] walk_page_range+0x9b/0x120 [ 185.439269] hmm_range_fault+0x4f/0x90 [ 185.439274] amdgpu_hmm_range_get_pages+0x24f/0x260 [amdgpu] [ 185.439463] amdgpu_ttm_tt_get_user_pages+0xc2/0x190 [amdgpu] [ 185.439603] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x49f/0x7a0 [amdgpu] [ 185.439774] kfd_ioctl_alloc_memory_of_gpu+0xfb/0x410 [amdgpu] Signed-off-by: James Zhu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 50 +++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 15 deletions(-) commit 60253f100c5846029f1370e51be6ebaeb160dcec Author: Uros Bizjak Date: Fri Nov 4 13:45:46 2022 +0100 x86/boot: Remove x86_32 PIC using %ebx workaround The currently supported minimum gcc version is 5.1. Before that, the PIC register, when generating Position Independent Code, was considered "fixed" in the sense that it wasn't in the set of registers available to the compiler's register allocator. Which, on x86-32, is already a very small set. What is more, the register allocator was unable to satisfy extended asm "=b" constraints. (Yes, PIC code uses %ebx on 32-bit as the base reg.) With gcc 5.1: "Reuse of the PIC hard register, instead of using a fixed register, was implemented on x86/x86-64 targets. This improves generated PIC code performance as more hard registers can be used. Shared libraries can significantly benefit from this optimization. Currently it is switched on only for x86/x86-64 targets. As RA infrastructure is already implemented for PIC register reuse, other targets might follow this in the future." (from: https://gcc.gnu.org/gcc-5/changes.html) which basically means that the register allocator has a higher degree of freedom when handling %ebx, including reloading it with the correct value before a PIC access. Furthermore: arch/x86/Makefile: # Never want PIC in a 32-bit kernel, prevent breakage with GCC built # with nonstandard options KBUILD_CFLAGS += -fno-pic $ gcc -Wp,-MMD,arch/x86/boot/.cpuflags.o.d ... -fno-pic ... -D__KBUILD_MODNAME=kmod_cpuflags -c -o arch/x86/boot/cpuflags.o arch/x86/boot/cpuflags.c so the 32-bit workaround in cpuid_count() is fixing exactly nothing because 32-bit configs don't even allow PIC builds. As to 64-bit builds: they're done using -mcmodel=kernel which produces RIP-relative addressing for PIC builds and thus does not apply here either. So get rid of the thing and make cpuid_count() nice and simple. There should be no functional changes resulting from this. [ bp: Expand commit message. ] Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221104124546.196077-1-ubizjak@gmail.com arch/x86/boot/cpuflags.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 1192b93ba3528feaf37dc4b5d8d6bdbb475791ad Author: Mark Brown Date: Tue Nov 15 09:46:40 2022 +0000 arm64/fp: Use a struct to pass data to fpsimd_bind_state_to_cpu() For reasons that are unclear to this reader fpsimd_bind_state_to_cpu() populates the struct fpsimd_last_state_struct that it uses to store the active floating point state for KVM guests by passing an argument for each member of the structure. As the richness of the architecture increases this is resulting in a function with a rather large number of arguments which isn't ideal. Simplify the interface by using the struct directly as the single argument for the function, renaming it as we lift the definition into the header. This could be built on further to reduce the work we do adding storage for new FP state in various places but for now it just simplifies this one interface. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20221115094640.112848-9-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 17 ++++++++++++----- arch/arm64/kernel/fpsimd.c | 34 ++++++---------------------------- arch/arm64/kvm/fpsimd.c | 24 ++++++++++++++---------- 3 files changed, 32 insertions(+), 43 deletions(-) commit 8c845e2731041f0fdf9287dea80b039b26332c9f Author: Mark Brown Date: Tue Nov 15 09:46:39 2022 +0000 arm64/sve: Leave SVE enabled on syscall if we don't context switch The syscall ABI says that the SVE register state not shared with FPSIMD may not be preserved on syscall, and this is the only mechanism we have in the ABI to stop tracking the extra SVE state for a process. Currently we do this unconditionally by means of disabling SVE for the process on syscall, causing userspace to take a trap to EL1 if it uses SVE again. These extra traps result in a noticeable overhead for using SVE instead of FPSIMD in some workloads, especially for simple syscalls where we can return directly to userspace and would not otherwise need to update the floating point registers. Tests with fp-pidbench show an approximately 70% overhead on a range of implementations when SVE is in use - while this is an extreme and entirely artificial benchmark it is clear that there is some useful room for improvement here. Now that we have the ability to track the decision about what to save seprately to TIF_SVE we can improve things by leaving TIF_SVE enabled on syscall but only saving the FPSIMD registers if we are in a syscall. This means that if we need to restore the register state from memory (eg, after a context switch or kernel mode NEON) we will drop TIF_SVE and reenable traps for userspace but if we can just return to userspace then traps will remain disabled. Since our current implementation and hence ABI has the effect of zeroing all the SVE register state not shared with FPSIMD on syscall we replace the disabling of TIF_SVE with a flush of the non-shared register state, this means that there is still some overhead for syscalls when SVE is in use but it is very much reduced. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20221115094640.112848-8-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 8 +++++++- arch/arm64/kernel/syscall.c | 19 +++++-------------- 2 files changed, 12 insertions(+), 15 deletions(-) commit bbc6172eefdb276be140415fd6ac6cc8a14a5263 Author: Mark Brown Date: Tue Nov 15 09:46:38 2022 +0000 arm64/fpsimd: SME no longer requires SVE register state Now that we track the type of the stored register state separately to what is active in the task, it is valid to have the FPSIMD register state stored while in streaming mode. Remove the special case handling for SME when setting FPSIMD register state. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20221115094640.112848-7-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 3 +-- arch/arm64/kernel/ptrace.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) commit a0136be443d51803da4900b52223302f3913812f Author: Mark Brown Date: Tue Nov 15 09:46:37 2022 +0000 arm64/fpsimd: Load FP state based on recorded data type Now that we are recording the type of floating point register state we are saving when we write the register state out to memory we can use that information when we load from memory to decide which format to load, bringing TIF_SVE into line with what we saved rather than relying on TIF_SVE to determine what to load. The SME state details are already recorded directly in the saved SVCR and handled based on the information there. Since we are not changing any of the save paths there should be no functional change from this patch, further patches will make use of this to optimise and clarify the code. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20221115094640.112848-6-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) commit 62021cc36add7b2c015b837f7893f2fb4b8c2586 Author: Mark Brown Date: Tue Nov 15 09:46:36 2022 +0000 arm64/fpsimd: Stop using TIF_SVE to manage register saving in KVM Now that we are explicitly telling the host FP code which register state it needs to save we can remove the manipulation of TIF_SVE from the KVM code, simplifying it and allowing us to optimise our handling of normal tasks. Remove the manipulation of TIF_SVE from KVM and instead rely on to_save to ensure we save the correct data for it. There should be no functional or performance impact from this change. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20221115094640.112848-5-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 22 ++++------------------ arch/arm64/kvm/fpsimd.c | 3 --- 2 files changed, 4 insertions(+), 21 deletions(-) commit deeb8f9a80fdae5a62525656d65c7070c28bd3a4 Author: Mark Brown Date: Tue Nov 15 09:46:35 2022 +0000 arm64/fpsimd: Have KVM explicitly say which FP registers to save In order to avoid needlessly saving and restoring the guest registers KVM relies on the host FPSMID code to save the guest registers when we context switch away from the guest. This is done by binding the KVM guest state to the CPU on top of the task state that was originally there, then carefully managing the TIF_SVE flag for the task to cause the host to save the full SVE state when needed regardless of the needs of the host task. This works well enough but isn't terribly direct about what is going on and makes it much more complicated to try to optimise what we're doing with the SVE register state. Let's instead have KVM pass in the register state it wants saving when it binds to the CPU. We introduce a new FP_STATE_CURRENT for use during normal task binding to indicate that we should base our decisions on the current task. This should not be used when actually saving. Ideally we might want to use a separate enum for the type to save but this enum and the enum values would then need to be named which has problems with clarity and ambiguity. In order to ease any future debugging that might be required this patch does not actually update any of the decision making about what to save, it merely starts tracking the new information and warns if the requested state is not what we would otherwise have decided to save. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20221115094640.112848-4-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 3 ++- arch/arm64/include/asm/processor.h | 1 + arch/arm64/kernel/fpsimd.c | 27 ++++++++++++++++++++++++--- arch/arm64/kvm/fpsimd.c | 9 ++++++++- 4 files changed, 35 insertions(+), 5 deletions(-) commit baa8515281b30861cff3da7db70662d2a25c6440 Author: Mark Brown Date: Tue Nov 15 09:46:34 2022 +0000 arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE When we save the state for the floating point registers this can be done in the form visible through either the FPSIMD V registers or the SVE Z and P registers. At present we track which format is currently used based on TIF_SVE and the SME streaming mode state but particularly in the SVE case this limits our options for optimising things, especially around syscalls. Introduce a new enum which we place together with saved floating point state in both thread_struct and the KVM guest state which explicitly states which format is active and keep it up to date when we change it. At present we do not use this state except to verify that it has the expected value when loading the state, future patches will introduce functional changes. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20221115094640.112848-3-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 2 +- arch/arm64/include/asm/kvm_host.h | 12 +++++++- arch/arm64/include/asm/processor.h | 6 ++++ arch/arm64/kernel/fpsimd.c | 58 ++++++++++++++++++++++++++++---------- arch/arm64/kernel/process.c | 2 ++ arch/arm64/kernel/ptrace.c | 3 ++ arch/arm64/kernel/signal.c | 7 ++++- arch/arm64/kvm/fpsimd.c | 3 +- 8 files changed, 74 insertions(+), 19 deletions(-) commit 93ae6b01bafee8fa385aa25ee7ebdb40057f6abe Author: Mark Brown Date: Tue Nov 15 09:46:33 2022 +0000 KVM: arm64: Discard any SVE state when entering KVM guests Since 8383741ab2e773a99 (KVM: arm64: Get rid of host SVE tracking/saving) KVM has not tracked the host SVE state, relying on the fact that we currently disable SVE whenever we perform a syscall. This may not be true in future since performance optimisation may result in us keeping SVE enabled in order to avoid needing to take access traps to reenable it. Handle this by clearing TIF_SVE and converting the stored task state to FPSIMD format when preparing to run the guest. This is done with a new call fpsimd_kvm_prepare() to keep the direct state manipulation functions internal to fpsimd.c. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20221115094640.112848-2-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 1 + arch/arm64/kernel/fpsimd.c | 23 +++++++++++++++++++++++ arch/arm64/kvm/fpsimd.c | 3 ++- 3 files changed, 26 insertions(+), 1 deletion(-) commit e8679db2970f04ee5281c042977fff880a3c045a Author: Srinivasa Rao Mandadapu Date: Tue Nov 29 18:23:48 2022 +0530 ASoC: qcom: lpass-sc7180: Add maybe_unused tag for system PM ops Add __maybe_unused tag for system PM ops suspend and resume. This is required to fix allmodconfig compilation issue. Fixes: a3a96e93cc88 ("ASoC: qcom: lpass-sc7280: Add system suspend/resume PM ops") Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1669726428-3140-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown sound/soc/qcom/lpass-sc7180.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e42d14be23f4cdb68a06ea40106eccf7db0b4bc Author: Jason A. Donenfeld Date: Tue Nov 29 01:55:11 2022 +0100 random: remove extraneous period and add a missing one in comments Just some trivial typo fixes, and reflowing of lines. Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit e29e3c7ce6d4b2f164ebd717e4794c626fc1c954 Author: David Girault Date: Tue Nov 29 14:55:35 2022 +0100 mac802154: Trace the registration of new PANs Add an internal trace when valid beacons are received. Signed-off-by: David Girault Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221129135535.532513-3-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/trace.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 51147284eb7d685a689a5d1b7772faec278a2338 Author: Miquel Raynal Date: Tue Nov 29 14:55:34 2022 +0100 ieee802154: Advertize coordinators discovery Let's introduce the basics for advertizing discovered PANs and coordinators, which is: - A new "scan" netlink message group. - A couple of netlink command/attribute. - The main netlink helper to send a netlink message with all the necessary information to forward the main information to the user. Two netlink attributes are proactively added to support future UWB complex channels, but are not actually used 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/20221129135535.532513-2-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt include/net/cfg802154.h | 18 ++++++++ include/net/nl802154.h | 43 +++++++++++++++++++ net/ieee802154/nl802154.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++ net/ieee802154/nl802154.h | 2 + 4 files changed, 166 insertions(+) commit 17d573984d4d5ad73c7cb5edcf2024c585475b0c Author: Yicong Yang Date: Thu Nov 17 16:41:36 2022 +0800 drivers/perf: hisi: Add TLP filter support The PMU support to filter the TLP when counting the bandwidth with below options: - only count the TLP headers - only count the TLP payloads - count both TLP headers and payloads In the current driver it's default to count the TLP payloads only, which will have an implicity side effects that on the traffic only have header only TLPs, we'll get no data. Make this user configuration through "len_mode" parameter and make it default to count both TLP headers and payloads when user not specified. Also update the documentation for it. Reviewed-by: Jonathan Cameron Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/20221117084136.53572-5-yangyicong@huawei.com Signed-off-by: Will Deacon Documentation/admin-guide/perf/hisi-pcie-pmu.rst | 18 ++++++++++++++++++ drivers/perf/hisilicon/hisi_pcie_pmu.c | 14 +++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) commit c8dff677e6d4221e00e864ef896b488908248b08 Author: Bagas Sanjaya Date: Thu Nov 17 16:41:35 2022 +0800 Documentation: perf: Indent filter options list of hisi-pcie-pmu The "Filter options" list have a rather ugly indentation. Also, the first paragraph after list name is rendered without separator (as continuation from the name). Align the list by indenting the list items and add a blank line separator for each list name. Reviewed-by: Jonathan Cameron Signed-off-by: Bagas Sanjaya Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/20221117084136.53572-4-yangyicong@huawei.com Signed-off-by: Will Deacon Documentation/admin-guide/perf/hisi-pcie-pmu.rst | 80 +++++++++++++----------- 1 file changed, 43 insertions(+), 37 deletions(-) commit eb79f12b4c41dd2403a0d16772ee72fcd6416015 Author: Yicong Yang Date: Thu Nov 17 16:41:34 2022 +0800 docs: perf: Fix PMU instance name of hisi-pcie-pmu The PMU instance will be called hisi_pcie_core rather than hisi_pcie_. Fix this in the documentation. Fixes: c8602008e247 ("docs: perf: Add description for HiSilicon PCIe PMU driver") Reviewed-by: Jonathan Cameron Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/20221117084136.53572-3-yangyicong@huawei.com Signed-off-by: Will Deacon Documentation/admin-guide/perf/hisi-pcie-pmu.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 6b4bb4f38dbfe85247f006f06135ba46450d5bf0 Author: Yicong Yang Date: Thu Nov 17 16:41:33 2022 +0800 drivers/perf: hisi: Fix some event id for hisi-pcie-pmu Some event id of hisi-pcie-pmu is incorrect, fix them. Fixes: 8404b0fbc7fb ("drivers/perf: hisi: Add driver for HiSilicon PCIe PMU") Reviewed-by: Jonathan Cameron Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/20221117084136.53572-2-yangyicong@huawei.com Signed-off-by: Will Deacon drivers/perf/hisilicon/hisi_pcie_pmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a61474c41e8c530c54a26db4f5434f050ef7718d Author: Yu Xiao Date: Fri Nov 25 12:30:30 2022 +0100 nfp: ethtool: support reporting link modes Add support for reporting link modes, including `Supported link modes` and `Advertised link modes`, via ethtool $DEV. A new command `SPCODE_READ_MEDIA` is added to read info from management firmware. Also, the mapping table `nfp_eth_media_table` associates the link modes between NFP and kernel. Both of them help to support this ability. Signed-off-by: Yu Xiao Reviewed-by: Louis Peens Signed-off-by: Simon Horman Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/r/20221125113030.141642-1-simon.horman@corigine.com Signed-off-by: Paolo Abeni drivers/net/ethernet/netronome/nfp/nfp_main.h | 1 + .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 73 ++++++++++++++++++++++ .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 17 +++++ .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 56 +++++++++++++++++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 26 ++++++++ 5 files changed, 173 insertions(+) commit cc91b9481605b1f62f947857231050c747ceda16 Author: Anshuman Khandual Date: Mon Nov 28 08:24:49 2022 +0530 arm64/perf: Replace PMU version number '0' with ID_AA64DFR0_EL1_PMUVer_NI __armv8pmu_probe_pmu() returns if detected PMU is either not implemented or implementation defined. Extracted ID_AA64DFR0_EL1_PMUVer value, when PMU is not implemented is '0' which can be replaced with ID_AA64DFR0_EL1_PMUVer_NI defined as '0b0000'. Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Cc: linux-perf-users@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Anshuman Khandual Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20221128025449.39085-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/perf_event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b310092e3eec6e7be36ed2436577f406a1e5e8de Author: Jaroslav Kysela Date: Tue Nov 29 09:53:06 2022 +0100 selftests: alsa - move shared library configuration code to conf.c The minimal alsa-lib configuration code is similar in both mixer and pcm tests. Move this code to the shared conf.c source file. Also, fix the build rules inspired by rseq tests. Build libatest.so which is linked to the both test utilities dynamically. Also, set the TEST_FILES variable for lib.mk. Cc: linux-kselftest@vger.kernel.org Cc: Shuah Khan Reported-by: Mark Brown Signed-off-by: Jaroslav Kysela Tested-by: Mark Brown Link: https://lore.kernel.org/r/20221129085306.2345763-1-perex@perex.cz Signed-off-by: Takashi Iwai tools/testing/selftests/alsa/Makefile | 13 +++++- tools/testing/selftests/alsa/alsa-local.h | 2 + tools/testing/selftests/alsa/conf.c | 69 ++++++++++++++++++++++++++++++ tools/testing/selftests/alsa/mixer-test.c | 53 +---------------------- tools/testing/selftests/alsa/pcm-test.c | 70 ------------------------------- 5 files changed, 85 insertions(+), 122 deletions(-) commit 67df411db3f0209e4bb5227d4dd9d41b21368b9d Author: John Keeping Date: Tue Nov 29 13:00:59 2022 +0000 ALSA: usb-audio: Add quirk for Tascam Model 12 Tascam's Model 12 is a mixer which can also operate as a USB audio interface. The audio interface uses explicit feedback but it seems that it does not correctly handle missing isochronous frames. When injecting an xrun (or doing anything else that pauses the playback stream) the feedback rate climbs (for example, at 44,100Hz nominal, I see a stable rate around 44,099 but xrun injection sees this peak at around 44,135 in most cases) and glitches are heard in the audio stream for several seconds - this is significantly worse than the single glitch expected for an underrun. While the stream does normally recover and the feedback rate returns to a stable value, I have seen some occurrences where this does not happen and the rate continues to increase while no audio is heard from the output. I have not found a solid reproduction for this. This misbehaviour can be avoided by totally resetting the stream state by switching the interface to alt 0 and back before restarting the playback stream. Add a new quirk flag which forces the endpoint and interface to be reconfigured whenever the stream is stopped, and use this for the Tascam Model 12. Separate interfaces are used for the playback and capture endpoints, so resetting the playback interface here will not affect the capture stream if it is running. While there are two endpoints on the interface, these are the OUT data endpoint and the IN explicit feedback endpoint corresponding to it and these are always stopped and started together. Signed-off-by: John Keeping Link: https://lore.kernel.org/r/20221129130100.1257904-1-john@metanate.com Signed-off-by: Takashi Iwai sound/usb/endpoint.c | 7 +++++++ sound/usb/quirks.c | 2 ++ sound/usb/usbaudio.h | 4 ++++ 3 files changed, 13 insertions(+) commit 8613dec04e746f698418e9b8344acf19efff4997 Merge: 3692fec8bb47 68c5444c3172 Author: Jens Axboe Date: Tue Nov 29 06:54:57 2022 -0700 Merge tag 'nvme-6.2-2022-11-29' of git://git.infradead.org/nvme into for-6.2/block Pull NVMe updates from Christoph: "nvme updates for Linux 6.2 - support some passthrough commands without CAP_SYS_ADMIN (Kanchan Joshi) - refactor PCIe probing and reset (Christoph Hellwig) - various fabrics authentication fixes and improvements (Sagi Grimberg) - avoid fallback to sequential scan due to transient issues (Uday Shankar) - implement support for the DEAC bit in Write Zeroes (Christoph Hellwig) - allow overriding the IEEE OUI and firmware revision in configfs for nvmet (Aleksandr Miloserdov) - force reconnect when number of queue changes in nvmet (Daniel Wagner) - minor fixes and improvements (Uros Bizjak, Joel Granados, Sagi Grimberg, Christoph Hellwig, Christophe JAILLET)" * tag 'nvme-6.2-2022-11-29' of git://git.infradead.org/nvme: (45 commits) nvmet: expose firmware revision to configfs nvmet: expose IEEE OUI to configfs nvme: rename the queue quiescing helpers nvmet: fix a memory leak in nvmet_auth_set_key nvme: return err on nvme_init_non_mdts_limits fail nvme: avoid fallback to sequential scan due to transient issues nvme-rdma: stop auth work after tearing down queues in error recovery nvme-tcp: stop auth work after tearing down queues in error recovery nvme-auth: have dhchap_auth_work wait for queues auth to complete nvme-auth: remove redundant auth_work flush nvme-auth: convert dhchap_auth_list to an array nvme-auth: check chap ctrl_key once constructed nvme-auth: no need to reset chap contexts on re-authentication nvme-auth: remove redundant deallocations nvme-auth: clear sensitive info right after authentication completes nvme-auth: guarantee dhchap buffers under memory pressure nvme-auth: don't keep long lived 4k dhchap buffer nvme-auth: remove redundant if statement nvme-auth: don't override ctrl keys before validation nvme-auth: don't ignore key generation failures when initializing ctrl keys ... commit 3b7c7478eda00945987d45f902bc3942c89243d3 Author: Andy Shevchenko Date: Mon Nov 28 21:00:54 2022 +0200 gpiolib: Provide to_gpio_device() helper Provide to_gpio_device() helper which can be utilized in the existing and future code. While at it, make sure it becomes no-op at compilation time. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 2 +- drivers/gpio/gpiolib.h | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) commit ce00d127a6068a0e4e9485424c1fd32564bce326 Author: Jiapeng Chong Date: Tue Nov 29 11:21:08 2022 +0800 perf/amlogic: Remove unused header inclusions of According to the "Abaci Robot": | ./drivers/perf/amlogic/meson_g12_ddr_pmu.c:15 linux/version.h not needed. | ./drivers/perf/amlogic/meson_ddr_pmu_core.c: 19 linux/version.h not needed. So drop the unnecessary #include directives. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3280 Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3282 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20221129032108.119661-1-jiapeng.chong@linux.alibaba.com Link: https://lore.kernel.org/r/20221129032108.119661-2-jiapeng.chong@linux.alibaba.com [will: Squashed patches together, filled out commit message a bit more] Signed-off-by: Will Deacon drivers/perf/amlogic/meson_ddr_pmu_core.c | 1 - drivers/perf/amlogic/meson_g12_ddr_pmu.c | 1 - 2 files changed, 2 deletions(-) commit 1143f6f55d967ab414a10a559d58a2700f32a54d Author: Heiko Carstens Date: Sat Nov 19 18:56:19 2022 +0100 s390/sclp: allow to change sclp_console_drop during runtime Make sclp's con_drop sysfs attribute also writable, and allow to change its value during runtime. This way handling of sclp console drop handling is consistent with the 3215 device driver. Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev drivers/s390/char/sclp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit a086c53de982d6ae3f1e7e3c0f94efa66743b333 Author: Heiko Carstens Date: Sat Nov 19 18:53:49 2022 +0100 s390/sclp: convert to use sysfs_emit() Use sysfs_emit() for all sclp sysfs show functions, which is the current standard way to generate output strings. Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev drivers/s390/char/sclp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2473be453c9023bafd6cc785a7f2ecd0eabda2fd Author: Heiko Carstens Date: Sat Nov 19 18:32:18 2022 +0100 s390/sclp: use kstrobool() to parse sclp_con_drop parameter Use kstrobool() to parse sclp_con_drop parameter. This way handling of valid values for the sclp_con_drop parameter is identical to the con3215_drop parameter. In particular this allows to pass values like "yes" and "true", which was not possible before. Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev drivers/s390/char/sclp.c | 9 ++------- drivers/s390/char/sclp.h | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) commit 75af41991955205fa0958feb587ce22b35aaa7b0 Author: V sujith kumar Reddy Date: Tue Nov 29 15:30:59 2022 +0530 ASoC: SOF: Add DAI configuration support for AMD platforms. Add support for configuring sp and hs DAI from topology. Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20221129100102.826781-1-vsujithkumar.reddy@amd.corp-partner.google.com Signed-off-by: Mark Brown include/sound/sof/dai-amd.h | 1 + include/sound/sof/dai.h | 2 ++ include/uapi/sound/sof/tokens.h | 5 +++++ sound/soc/sof/ipc3-pcm.c | 2 ++ sound/soc/sof/ipc3-topology.c | 36 ++++++++++++++++++++++++++++-------- sound/soc/sof/sof-audio.h | 1 + sound/soc/sof/topology.c | 10 ++++++++++ 7 files changed, 49 insertions(+), 8 deletions(-) commit aeb2e9c4eedc6fed264a51ca2ea17c83984d2a64 Merge: 863b9179cee4 3d1bb6cc1a65 Author: Mark Brown Date: Tue Nov 29 12:55:12 2022 +0000 ASoC: Merge up fixes Merge the fixes branch up so we can apply further AMD work. commit 7666dbec7268458505d44ef3ae22fd9181c09b01 Author: Jiri Pirko Date: Fri Nov 25 11:02:55 2022 +0100 net: devlink: add WARN_ON_ONCE to check return value of unregister_netdevice_notifier_net() call As the return value is not 0 only in case there is no such notifier block registered, add a WARN_ON_ONCE() to yell about it. Suggested-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/20221125100255.1786741-1-jiri@resnulli.us Signed-off-by: Paolo Abeni net/core/devlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62c73bfea048e66168df09da6d3e4510ecda40bb Author: Sven Peter Date: Mon Nov 28 17:15:26 2022 +0100 usb: dwc3: Fix race between dwc3_set_mode and __dwc3_set_mode dwc->desired_dr_role is changed by dwc3_set_mode inside a spinlock but then read by __dwc3_set_mode outside of that lock. This can lead to a race condition when very quick successive role switch events happen: CPU A dwc3_set_mode(DWC3_GCTL_PRTCAP_HOST) // first role switch event spin_lock_irqsave(&dwc->lock, flags); dwc->desired_dr_role = mode; // DWC3_GCTL_PRTCAP_HOST spin_unlock_irqrestore(&dwc->lock, flags); queue_work(system_freezable_wq, &dwc->drd_work); CPU B __dwc3_set_mode // .... spin_lock_irqsave(&dwc->lock, flags); // desired_dr_role is DWC3_GCTL_PRTCAP_HOST dwc3_set_prtcap(dwc, dwc->desired_dr_role); spin_unlock_irqrestore(&dwc->lock, flags); CPU A dwc3_set_mode(DWC3_GCTL_PRTCAP_DEVICE) // second event spin_lock_irqsave(&dwc->lock, flags); dwc->desired_dr_role = mode; // DWC3_GCTL_PRTCAP_DEVICE spin_unlock_irqrestore(&dwc->lock, flags); CPU B (continues running __dwc3_set_mode) switch (dwc->desired_dr_role) { // DWC3_GCTL_PRTCAP_DEVICE // .... case DWC3_GCTL_PRTCAP_DEVICE: // .... ret = dwc3_gadget_init(dwc); We then have DWC3_GCTL.DWC3_GCTL_PRTCAPDIR = DWC3_GCTL_PRTCAP_HOST and dwc->current_dr_role = DWC3_GCTL_PRTCAP_HOST but initialized the controller in device mode. It's also possible to get into a state where both host and device are intialized at the same time. Fix this race by creating a local copy of desired_dr_role inside __dwc3_set_mode while holding dwc->lock. Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly") Cc: stable Acked-by: Thinh Nguyen Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20221128161526.79730-1-sven@svenpeter.dev Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 4051a1c96e4883f3445cc8f239c214be622f4c6c Merge: b47ec9727f47 a5cfc9d65879 Author: Greg Kroah-Hartman Date: Tue Nov 29 13:26:13 2022 +0100 Merge tag 'thunderbolt-for-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Changes for v6.2 merge window This includes following Thunderbolt/USB4 changes for the v6.2 merge window: - Add wake on connect/disconnect for USB4 ports - A couple of minor cleanups All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Add wake on connect/disconnect on USB4 ports thunderbolt: ACPI: Use the helper fwnode_find_reference() thunderbolt: Remove redundant assignment to variable len thunderbolt: Use str_enabled_disabled() helper commit c5527c1787e84533f7b43fadb2d050e1ed115a50 Merge: ae27e8869fdb c767c3474013 Author: Greg Kroah-Hartman Date: Tue Nov 29 13:22:45 2022 +0100 Merge tag 'coresight-next-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next Suzuki writes: coresight: Update for v6.2 CoreSight updatesfor v6.2 includes : - Support for ETMv4 probing on hotplugged CPUs - Fix TRBE driver for cpuhp state refcounting - Fix CTI driver NULL pointer dereferencing - Fix comment for repeated word Signed-off-by: Suzuki K Poulose * tag 'coresight-next-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux: coresight: etm4x: fix repeated words in comments coresight: cti: Fix null pointer error on CTI init before ETM coresight: trbe: remove cpuhp instance node before remove cpuhp state coresight: etm4x: add CPU hotplug support for probing commit ae27e8869fdb17b3d6a336c81a2aac678525984a Merge: 449ef8fb9d35 19a17a9fb486 Author: Greg Kroah-Hartman Date: Tue Nov 29 13:19:29 2022 +0100 Merge tag 'misc-habanalabs-next-2022-11-23' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-next Oded writes: This tag contains habanalabs driver changes for v6.2: - New feature of graceful hard-reset. Instead of immediately killing the user-process when a command submission times out, we wait a bit and give the user-process notification and let it try to close things gracefully, with the ability to retrieve debug information. - Enhance the EventFD mechanism. Add new events such as access to illegal address (RAZWI), page fault, device unavailable. In addition, change the event workqueue to be handled in a single-threaded workqueue. - Allow the control device to work during reset of the ASIC, to enable monitoring applications to continue getting the data. - Add handling for Gaudi2 with PCI revision 2. - Reduce severity of prints due to power/thermal events. - Change how we use the h/w to perform memory scrubbing in Gaudi2. - Multiple bug fixes, refactors and renames. * tag 'misc-habanalabs-next-2022-11-23' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: (63 commits) habanalabs: fix VA range calculation habanalabs: fail driver load if EEPROM errors detected habanalabs: make print of engines idle mask more readable habanalabs: clear non-released encapsulated signals habanalabs: don't put context in hl_encaps_handle_do_release_sob() habanalabs: print context refcount value if hard reset fails habanalabs: add RMWREG32_SHIFTED to set a val within a mask habanalabs: fix rc when new CPUCP opcodes are not supported habanalabs/gaudi2: added memset for the cq_size register habanalabs: added return value check for hl_fw_dynamic_send_clear_cmd() habanalabs: increase the size of busy engines mask habanalabs/gaudi2: change memory scrub mechanism habanalabs: extend process wait timeout in device fine habanalabs: check schedule_hard_reset correctly habanalabs: reset device if still in use when released habanalabs/gaudi2: return to reset upon SM SEI BRESP error habanalabs/gaudi2: don't enable entries in the MSIX_GW table habanalabs/gaudi2: remove redundant firmware version check habanalabs/gaudi: fix print for firmware-alive event habanalabs: fix print for out-of-sync and pkt-failure events ... commit 28baae9bfc1fb9fdaff2e8bd328b2a5b12a14273 Author: Amadeusz Sławiński Date: Fri Nov 25 19:40:30 2022 +0100 ASoC: Intel: avs: rt298: Refactor jack handling Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221125184032.2565979-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/rt298.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit 1fa675a00a5028f4f49bd19eaab016ea2d765ba8 Author: Amadeusz Sławiński Date: Fri Nov 25 19:40:29 2022 +0100 ASoC: Intel: avs: rt298: Add define for codec DAI name Following commits will make use of it to find codec DAI, define it first. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221125184032.2565979-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/rt298.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2f292443b4c88ccd469e724d022c669349abcbb5 Author: Amadeusz Sławiński Date: Fri Nov 25 19:40:28 2022 +0100 ASoC: Intel: avs: rt286: Refactor jack handling Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221125184032.2565979-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/rt286.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit af8ced412d6ee680faca06700fa784bbef6de702 Author: Amadeusz Sławiński Date: Fri Nov 25 19:40:27 2022 +0100 ASoC: Intel: avs: rt286: Add define for codec DAI name Following commits will make use of it to find codec DAI, define it first. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221125184032.2565979-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/rt286.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a08797afc1f9792b16356f59ba047114dd06a25e Author: Amadeusz Sławiński Date: Fri Nov 25 19:40:26 2022 +0100 ASoC: Intel: avs: rt274: Refactor jack handling Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221125184032.2565979-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/rt274.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 58391e7ca04be3960579a51d9a47d0fbc1b1607e Author: Amadeusz Sławiński Date: Fri Nov 25 19:40:25 2022 +0100 ASoC: Intel: avs: rt274: Refer to DAI name through a constant There is existing define for codec DAI name, make use of it when setting codec DAI name. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221125184032.2565979-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/rt274.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9febcd7a0180b1ea5b49cda1838aef49ef936805 Author: Amadeusz Sławiński Date: Fri Nov 25 19:40:24 2022 +0100 ASoC: Intel: avs: nau8825: Refactor jack handling Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221125184032.2565979-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/nau8825.c | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) commit 833e250ef592c3c02dda400c1c44306f74241d33 Author: Amadeusz Sławiński Date: Fri Nov 25 19:40:23 2022 +0100 ASoC: Intel: avs: da7219: Refactor jack handling Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221125184032.2565979-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/da7219.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) commit d60a197e50eca5017076b3867c1a49cb5118d597 Author: Cezary Rojewski Date: Fri Nov 25 19:40:22 2022 +0100 ASoC: Intel: bdw_rt286: Refactor jack handling Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221125184032.2565979-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw_rt286.c | 55 +++++++++++--------------------------- 1 file changed, 16 insertions(+), 39 deletions(-) commit cb55ff7ac471bf011243a633d5ae58679eabd2ad Merge: 7a168f560e3c 4f141e367123 Author: Paolo Abeni Date: Tue Nov 29 13:08:26 2022 +0100 Merge branch 'add-support-for-lan966x-is2-vcap' Horatiu Vultur says: ==================== Add support for lan966x IS2 VCAP This provides initial support for lan966x for 'tc' traffic control userspace tool and its flower filter. For this is required to use the VCAP library. Currently supported flower filter keys and actions are: - source and destination MAC address keys - trap action ==================== Link: https://lore.kernel.org/r/20221125095010.124458-1-horatiu.vultur@microchip.com Signed-off-by: Paolo Abeni commit 4f141e3671233c29c973a3245f1f360d62b3c8eb Author: Horatiu Vultur Date: Fri Nov 25 10:50:10 2022 +0100 net: microchip: vcap: Implement w32be On lan966x the layout of the vcap memory is different than on sparx5. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/vcap/vcap_api.c | 116 ++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 4 deletions(-) commit 4426b78c626d6dd0a974263776d658d1ea8f0803 Author: Horatiu Vultur Date: Fri Nov 25 10:50:09 2022 +0100 net: lan966x: Add port keyset config and callback interface Implement vcap_operations and enable default port keyset configuration for each port. Now it is possible actually write/read/move entries in the VCAP. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni .../ethernet/microchip/lan966x/lan966x_vcap_impl.c | 366 +++++++++++++++++++++ 1 file changed, 366 insertions(+) commit 61caac2d1ab51a188f3439d0645b756fde317c1c Author: Horatiu Vultur Date: Fri Nov 25 10:50:08 2022 +0100 net: lan966x: add tc matchall goto action Extend matchall with action goto. This is needed to enable the lookup in the VCAP. It is needed to connect chain 0 to a chain that is recognized by the HW. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/lan966x/Makefile | 2 +- .../net/ethernet/microchip/lan966x/lan966x_goto.c | 54 ++++++++++++++++++++++ .../net/ethernet/microchip/lan966x/lan966x_main.h | 9 ++++ .../microchip/lan966x/lan966x_tc_matchall.c | 6 +++ 4 files changed, 70 insertions(+), 1 deletion(-) commit 3643abd6e6bc1adce8979e974ee7ede387948c1c Author: Horatiu Vultur Date: Fri Nov 25 10:50:07 2022 +0100 net: lan966x: add tc flower support for VCAP API Currently the only supported action is ACTION_TRAP and the only dissector is ETH_ADDRS. Others will be added in future patches. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/lan966x/Makefile | 3 +- .../net/ethernet/microchip/lan966x/lan966x_main.h | 3 + .../net/ethernet/microchip/lan966x/lan966x_tc.c | 2 + .../ethernet/microchip/lan966x/lan966x_tc_flower.c | 262 +++++++++++++++++++++ .../ethernet/microchip/lan966x/lan966x_vcap_impl.c | 152 ++++++++++++ 5 files changed, 421 insertions(+), 1 deletion(-) commit f919ccc93dc6185d321c229f7241057406615e1b Author: Horatiu Vultur Date: Fri Nov 25 10:50:06 2022 +0100 net: lan966x: add vcap registers Add registers used to access vcap controller. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni .../net/ethernet/microchip/lan966x/lan966x_main.c | 3 + .../net/ethernet/microchip/lan966x/lan966x_regs.h | 196 +++++++++++++++++++++ 2 files changed, 199 insertions(+) commit 39bedc169cff3f9320ba58339e82eec85cee140d Author: Horatiu Vultur Date: Fri Nov 25 10:50:05 2022 +0100 net: lan966x: Add is2 vcap model to vcap API. This provides the lan966x is2 model and adds it to the vcap control instance that will be provided to the vcap API. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/lan966x/Makefile | 2 +- .../microchip/lan966x/lan966x_vcap_ag_api.c | 1608 ++++++++++++++++++++ .../microchip/lan966x/lan966x_vcap_ag_api.h | 11 + .../ethernet/microchip/lan966x/lan966x_vcap_impl.c | 4 + 4 files changed, 1624 insertions(+), 1 deletion(-) commit b053122532d7aad88e4424f9e483fc2ad5b4cee0 Author: Horatiu Vultur Date: Fri Nov 25 10:50:04 2022 +0100 net: lan966x: Add initial VCAP When lan966x driver is initialized, initialize also the VCAP module for lan966x. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/lan966x/Kconfig | 1 + drivers/net/ethernet/microchip/lan966x/Makefile | 5 +++- .../net/ethernet/microchip/lan966x/lan966x_main.c | 8 +++++++ .../net/ethernet/microchip/lan966x/lan966x_main.h | 6 +++++ .../ethernet/microchip/lan966x/lan966x_vcap_impl.c | 28 ++++++++++++++++++++++ 5 files changed, 47 insertions(+), 1 deletion(-) commit ee72d90b042efcc2aec7c3bd54cb1f03f3d1b584 Author: Horatiu Vultur Date: Fri Nov 25 10:50:03 2022 +0100 net: microchip: vcap: Extend vcap with lan966x Add the keysets, keys, actionsets and actions used by lan966x in IS2. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/vcap/vcap_ag_api.h | 202 ++++++++++++++++------ 1 file changed, 146 insertions(+), 56 deletions(-) commit 0a335db8c745204a69ad0a18ab8b92a46a6098ea Author: Horatiu Vultur Date: Fri Nov 25 10:50:02 2022 +0100 net: microchip: vcap: Merge the vcap_ag_api_kunit.h into vcap_ag_api.h Currently there are 2 files that contain the keyfields, keys, actionfields and actions. First file is used by the kunit while the second one is used by VCAP api. The header file that is used by kunit is just a super set of the of the header file used by VCAP api. Therefore not to have duplicate information in different files which is also harder to maintain, create a single file that is used both by API and by kunit. Signed-off-by: Horatiu Vultur Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/vcap/vcap_ag_api.h | 467 ++++++++++++--- .../ethernet/microchip/vcap/vcap_ag_api_kunit.h | 643 --------------------- drivers/net/ethernet/microchip/vcap/vcap_api.h | 3 - 3 files changed, 393 insertions(+), 720 deletions(-) commit 7d9199995412fd30ea79e24d6c29f04a9b5d49ee Author: Paul Cercueil Date: Mon Oct 24 21:52:13 2022 +0100 pwm: jz4740: Use regmap_{set,clear}_bits Simplify a bit the code by using regmap_set_bits() and regmap_clear_bits() instead of regmap_update_bits() when possible. Signed-off-by: Paul Cercueil Reviewed-by: Philippe Mathieu-Daudé Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-jz4740.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 69ba53dac3b16a3b0aa65e7817901e67bc554b32 Author: Paul Cercueil Date: Mon Oct 24 21:52:12 2022 +0100 pwm: jz4740: Depend on MACH_INGENIC instead of MIPS The MACH_INGENIC Kconfig option will be selected when building a kernel targeting Ingenic SoCs, but also when compiling a generic MIPS kernel that happens to support Ingenic SoCs. Therefore, if MACH_INGENIC is not set, we know that we're not even trying to build a generic kernel that supports these SoCs, and we can hide the options to compile the SoC-specific drivers. Signed-off-by: Paul Cercueil Acked-by: Uwe Kleine-König Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 731c47930f63883bae5de0293241f851042cbd77 Author: Paul Cercueil Date: Mon Oct 24 21:52:11 2022 +0100 pwm: jz4740: Force dependency on Device Tree Ingenic SoCs all require CONFIG_OF, so there is no case where we want to use this driver without CONFIG_OF. Signed-off-by: Paul Cercueil Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 2 +- drivers/pwm/pwm-jz4740.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) commit c771b4eabd6a52afff0b6f01c361a9d04fa8cd9d Author: Jonathan Neuschäfer Date: Tue Nov 29 11:22:25 2022 +0100 spi: dt-bindings: nuvoton,wpcm450-fiu: Fix warning in example (missing reg property) Add missing "reg = <0>;" property to the flash@0 node in the example. Fixes: dd71cd4dd6c9b ("spi: Add Nuvoton WPCM450 Flash Interface Unit (FIU) bindings") Signed-off-by: Jonathan Neuschäfer Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221129102225.3598044-3-j.neuschaefer@gmx.net Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/nuvoton,wpcm450-fiu.yaml | 1 + 1 file changed, 1 insertion(+) commit 1e2872f5912fbc87a00d00d49af98e428f4ff8b7 Author: Jonathan Neuschäfer Date: Tue Nov 29 11:22:24 2022 +0100 spi: dt-bindings: nuvoton,wpcm450-fiu: Fix error in example (bogus include) The nuvoton,wpcm450-fiu binding's example includes nuvoton,wpcm450-clk.h, which has not been merged yet, thus causing a dt_binding_check error on -next. Fix this error by simply hardcoding the clock index in the example, before the breakage spreads any further. Fixes: dd71cd4dd6c9b ("spi: Add Nuvoton WPCM450 Flash Interface Unit (FIU) bindings") Reported-by: Rob Herring Reported-by: Conor Dooley Signed-off-by: Jonathan Neuschäfer Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221129102225.3598044-2-j.neuschaefer@gmx.net Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/nuvoton,wpcm450-fiu.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 863b9179cee4570e5da4206dcf8dbcdcc37c8348 Author: Matthias Kaehlcke Date: Tue Nov 29 00:16:54 2022 +0000 ASoC: qcom: lpass-sc7180: Delete redundant error log from _resume() sc7180_lpass_dev_resume() logs an error if clk_bulk_prepare_enable() fails. The clock framework already generates error logs if anything goes wrong, so the logging in _resume() is redundant, drop it. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20221129001633.v2.1.I8d1993f41f0da1eac0ecba321678ac489f9c0b9b@changeid Signed-off-by: Mark Brown sound/soc/qcom/lpass-sc7180.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit a3a96e93cc888c652e47e4d7346abe99b1b44c53 Author: Srinivasa Rao Mandadapu Date: Tue Nov 29 12:06:24 2022 +0530 ASoC: qcom: lpass-sc7280: Add system suspend/resume PM ops Update lpass sc7280 platform driver with PM ops, such as system supend and resume callbacks. This update is required to disable clocks during supend and avoid XO shutdown issue. Signed-off-by: Srinivasa Rao Mandadapu Tested-by: Rahul Ajmeriya Link: https://lore.kernel.org/r/1669703784-27589-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown sound/soc/qcom/lpass-sc7280.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 7a168f560e3c3829b74a893d3655caab14a7aef8 Merge: 4f5ed7fb6cd6 23dca7a90017 Author: Paolo Abeni Date: Tue Nov 29 11:40:27 2022 +0100 Merge branch 'refactor-mtk_wed-code-to-introduce-ser-support' Lorenzo Bianconi says: ==================== refactor mtk_wed code to introduce SER support Refactor mtk_wed support in order to introduce proper integration for hw reset between mtk_eth_soc/mtk_wed and mt76 drivers. ==================== Link: https://lore.kernel.org/r/cover.1669303154.git.lorenzo@kernel.org Signed-off-by: Paolo Abeni commit 23dca7a90017ff2512c501f7da4c7ca7a95c2d6e Author: Lorenzo Bianconi Date: Thu Nov 24 16:22:55 2022 +0100 net: ethernet: mtk_wed: add reset to tx_ring_setup callback Introduce reset parameter to mtk_wed_tx_ring_setup signature. This is a preliminary patch to add Wireless Ethernet Dispatcher reset support. Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Paolo Abeni drivers/net/ethernet/mediatek/mtk_wed.c | 19 +++++++++++-------- drivers/net/wireless/mediatek/mt76/dma.c | 2 +- include/linux/soc/mediatek/mtk_wed.h | 8 ++++---- 3 files changed, 16 insertions(+), 13 deletions(-) commit b08134c6e10938c8de3e47763674a2aa6f380d92 Author: Lorenzo Bianconi Date: Thu Nov 24 16:22:54 2022 +0100 net: ethernet: mtk_wed: add mtk_wed_rx_reset routine Introduce mtk_wed_rx_reset routine in order to reset rx DMA for Wireless Ethernet Dispatcher available on MT7986 SoC. Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Paolo Abeni drivers/net/ethernet/mediatek/mtk_wed.c | 190 +++++++++++++++++++++------ drivers/net/ethernet/mediatek/mtk_wed_regs.h | 9 ++ 2 files changed, 162 insertions(+), 37 deletions(-) commit f78cd9c783e09a0fe454b0fc8b39c22025d7869e Author: Lorenzo Bianconi Date: Thu Nov 24 16:22:53 2022 +0100 net: ethernet: mtk_wed: update mtk_wed_stop Update mtk_wed_stop routine and rename old mtk_wed_stop() to mtk_wed_deinit(). This is a preliminary patch to add Wireless Ethernet Dispatcher reset support. Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Paolo Abeni drivers/net/ethernet/mediatek/mtk_wed.c | 32 +++++++++++++++++++++++--------- include/linux/soc/mediatek/mtk_wed.h | 4 ++++ 2 files changed, 27 insertions(+), 9 deletions(-) commit 92b1169660ebe80e09c546555521a043cf7d26bc Author: Lorenzo Bianconi Date: Thu Nov 24 16:22:52 2022 +0100 net: ethernet: mtk_wed: move MTK_WDMA_RESET_IDX_TX configuration in mtk_wdma_tx_reset Remove duplicated code. Increase poll timeout to 10ms in order to be aligned with vendor sdk. This is a preliminary patch to add Wireless Ethernet Dispatcher reset support. Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Paolo Abeni drivers/net/ethernet/mediatek/mtk_wed.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit b0488c4598a599157ac9b588541c3c6c5055e80f Author: Lorenzo Bianconi Date: Thu Nov 24 16:22:51 2022 +0100 net: ethernet: mtk_wed: return status value in mtk_wdma_rx_reset Move MTK_WDMA_RESET_IDX configuration in mtk_wdma_rx_reset routine. Increase poll timeout to 10ms in order to be aligned with vendor sdk. This is a preliminary patch to add Wireless Ethernet Dispatcher reset support. Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Paolo Abeni drivers/net/ethernet/mediatek/mtk_wed.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit ba290d4f1f7733732896567d2a1874f01e20fff4 Author: Zhen Lei Date: Mon Nov 28 12:42:43 2022 +0100 ARM: 9277/1: Make the dumped instructions are consistent with the disassembled ones In ARM, the mapping of instruction memory is always little-endian, except some BE-32 supported ARM architectures. Such as ARMv7-R, its instruction endianness may be BE-32. Of course, its data endianness will also be BE-32 mode. Due to two negatives make a positive, the instruction stored in the register after reading is in little-endian format. But for the case of BE-8, the instruction endianness is LE, the instruction stored in the register after reading is in big-endian format, which is inconsistent with the disassembled one. For example: The content of disassembly: c0429ee8: e3500000 cmp r0, #0 c0429eec: 159f2044 ldrne r2, [pc, #68] c0429ef0: 108f2002 addne r2, pc, r2 c0429ef4: 1882000a stmne r2, {r1, r3} c0429ef8: e7f000f0 udf #0 The output of undefined instruction exception: Internal error: Oops - undefined instruction: 0 [#1] SMP ARM ... ... Code: 000050e3 44209f15 02208f10 0a008218 (f000f0e7) This inconveniences the checking of instructions. What's worse is that, for somebody who don't know about this, might think the instructions are all broken. So, when CONFIG_CPU_ENDIAN_BE8=y, let's convert the instructions to little-endian format before they are printed. The conversion result is as follows: Code: e3500000 159f2044 108f2002 1882000a (e7f000f0) Signed-off-by: Zhen Lei Signed-off-by: Russell King (Oracle) arch/arm/kernel/traps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4f5ed7fb6cd65eda3b64503aaecf61d7fb03fcbf Merge: d6dc62fca6b6 7a74c1265ab4 Author: Paolo Abeni Date: Tue Nov 29 10:46:41 2022 +0100 Merge branch 'marvell-nvmem-mac-addresses-support' Miquel Raynal says: ==================== Marvell nvmem mac addresses support Now that we are aligned on how to make information available from static storage media to drivers like Ethernet controller drivers or switch drivers by using nvmem cells and going through the whole nvmem infrastructure, here are two driver updates to reflect these changes. Prior to the driver updates, I propose: * Reverting binding changes which should have never been accepted like that. * A conversion of the (old) Prestera and DFX server bindings (optional, can be dropped if not considered necessary). * A better description of the more recent Prestera PCI switch. Please mind that this series cannot break anything since retrieving the MAC address Prestera driver has never worked upstream, because the (ONIE tlv) driver supposed to export the MAC address has not been accepted in its original form and has been updated to the nvmem-layout infrastructure (bindings have been merged, the code remains to be applied). ==================== Link: https://lore.kernel.org/r/20221124111556.264647-1-miquel.raynal@bootlin.com Signed-off-by: Paolo Abeni commit 7a74c1265ab4340b0fd5223084151003ef4c394a Author: Miquel Raynal Date: Thu Nov 24 12:15:56 2022 +0100 net: mvpp2: Consider NVMEM cells as possible MAC address source The ONIE standard describes the organization of tlv (type-length-value) arrays commonly stored within NVMEM devices on common networking hardware. Several drivers already make use of NVMEM cells for purposes like retrieving a default MAC address provided by the manufacturer. What made ONIE tables unusable so far was the fact that the information where "dynamically" located within the table depending on the manufacturer wishes, while Linux NVMEM support only allowed statically defined NVMEM cells. Fortunately, this limitation was eventually tackled with the introduction of discoverable cells through the use of NVMEM layouts, making it possible to extract and consistently use the content of tables like ONIE's tlv arrays. Parsing this table at runtime in order to get various information is now possible. So, because many Marvell networking switches already follow this standard, let's consider using NVMEM cells as a new valid source of information when looking for a base MAC address, which is one of the primary uses of these new fields. Indeed, manufacturers following the ONIE standard are encouraged to provide a default MAC address there, so let's eventually use it if no other MAC address has been found using the existing methods. Link: https://opencomputeproject.github.io/onie/design-spec/hw_requirements.html Signed-off-by: Miquel Raynal Signed-off-by: Paolo Abeni drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a48acad789ff33d90e079311ed0323e5e5fc5cbd Author: Miquel Raynal Date: Thu Nov 24 12:15:55 2022 +0100 net: marvell: prestera: Avoid unnecessary DT lookups This driver fist makes an expensive DT lookup to retrieve its DT node (this is a PCI driver) in order to later search for the base-mac-provider property. This property has no reality upstream and this code should not have been accepted like this in the first place. Instead, there is a proper nvmem interface that should be used. Let's avoid these extra lookups and rely on the nvmem internal logic. Signed-off-by: Miquel Raynal Signed-off-by: Paolo Abeni drivers/net/ethernet/marvell/prestera/prestera_main.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 4c47867bc789bdc722f3bb760355c2c246fbe9af Author: Miquel Raynal Date: Thu Nov 24 12:15:54 2022 +0100 of: net: export of_get_mac_address_nvmem() Export of_get_mac_addr_nvmem() and rename it to of_get_mac_address_nvmem() in order to fit the convention followed by the existing exported helpers of the same kind. This way, OF compatible drivers using eg. fwnode_get_mac_address() can do a direct call to it instead of calling of_get_mac_address() just for the nvmem step, avoiding to repeat an expensive DT lookup which has already been done once. Eventually, fwnode_get_mac_address() should probably be updated to perform the nvmem lookup directly, but as of today, nvmem cells seem not to be supported by ACPI yet which would defeat this kind of extension. Suggested-by: Marcin Wojtas Signed-off-by: Miquel Raynal Signed-off-by: Paolo Abeni include/linux/of_net.h | 6 ++++++ net/core/of_net.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit 39d1038620153d9c94a47235d061aefe681d3e65 Author: Miquel Raynal Date: Thu Nov 24 12:15:53 2022 +0100 dt-bindings: net: marvell,prestera: Describe PCI devices of the prestera family Even though the devices have very little in common beside the name and the main "switch" feature, Marvell Prestera switch family is also composed of PCI-only devices which can receive additional static properties, like nvmem cells to point at MAC addresses, for instance. Let's describe them. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Paolo Abeni .../devicetree/bindings/net/marvell,prestera.yaml | 62 +++++++++++++++++++--- 1 file changed, 54 insertions(+), 8 deletions(-) commit a429ab01163c8d55281ffd64bd924b32c501da57 Author: Miquel Raynal Date: Thu Nov 24 12:15:52 2022 +0100 dt-bindings: net: marvell,prestera: Convert to yaml The currently described switch family is named AlleyCat3, it is a memory mapped switch found on Armada XP boards. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Paolo Abeni .../devicetree/bindings/net/marvell,prestera.txt | 29 -------------- .../devicetree/bindings/net/marvell,prestera.yaml | 45 ++++++++++++++++++++++ 2 files changed, 45 insertions(+), 29 deletions(-) commit 63b956f9917595f63d3519131317e38ec8c876a7 Author: Miquel Raynal Date: Thu Nov 24 12:15:51 2022 +0100 dt-bindings: net: marvell,dfx-server: Convert to yaml Even though this description is not used anywhere upstream (no matching driver), while on this file I decided I would try a conversion to yaml in order to clarify the prestera family description. I cannot keep the nodename dfx-server@xxxx so I switched to dfx-bus@xxxx which matches simple-bus.yaml. Otherwise I took the example context from the only user of this compatible: armada-xp-98dx3236.dtsi, which is a rather old and not perfect DT. Signed-off-by: Miquel Raynal Reviewed-by: Krzysztof Kozlowski Signed-off-by: Paolo Abeni .../bindings/net/marvell,dfx-server.yaml | 62 ++++++++++++++++++++++ .../devicetree/bindings/net/marvell,prestera.txt | 18 ------- 2 files changed, 62 insertions(+), 18 deletions(-) commit 98eb05dc99fdbd9c7e3b865b2d2927768832b0ff Author: Miquel Raynal Date: Thu Nov 24 12:15:50 2022 +0100 Revert "dt-bindings: marvell,prestera: Add description for device-tree bindings" This reverts commit 40acc05271abc2852c32622edbebd75698736b9b. marvell,prestera.txt is an old file describing the old Alleycat3 standalone switches. The commit mentioned above actually hacked these bindings to add support for a device tree property for a more modern version of the IP connected over PCI, using only the generic compatible in order to retrieve the device node from the prestera driver to read one static property. The problematic property discussed here is "base-mac-provider". The original intent was to point to a nvmem device which could produce the relevant nvmem-cell. This property has never been acked by DT maintainers and fails all the layering that has been brought with the nvmem bindings by pointing at a nvmem producer, bypassing the existing nvmem bindings, rather than a nvmem cell directly. Furthermore, the property cannot even be used upstream because it expected the ONIE tlv driver to produce a specific cell, driver which used nacked bindings and thus was never merged, replaced by a more integrated concept: the nvmem-layout. So let's forget about this temporary addition, safely avoiding the need for any backward compatibility handling. A new (yaml) binding file will be brought with the prestera bindings, and there we will actually include a description of the modern IP over PCI, including the right way to point to a nvmem cell. Cc: Vadym Kochan Cc: Taras Chornyi Signed-off-by: Miquel Raynal Acked-by: Rob Herring Acked-by: Krzysztof Kozlowski Signed-off-by: Paolo Abeni .../devicetree/bindings/net/marvell,prestera.txt | 34 ---------------------- 1 file changed, 34 deletions(-) commit a4baf8d2639f24d4d31983ff67c01878e7a5393f Author: Peter Collingbourne Date: Thu Nov 3 18:10:41 2022 -0700 Documentation: document the ABI changes for KVM_CAP_ARM_MTE Document both the restriction on VM_MTE_ALLOWED mappings and the relaxation for shared mappings. Signed-off-by: Peter Collingbourne Acked-by: Catalin Marinas Reviewed-by: Cornelia Huck Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221104011041.290951-9-pcc@google.com Documentation/virt/kvm/api.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c911f0d4687947915f04024aa01803247fcf7f1a Author: Peter Collingbourne Date: Thu Nov 3 18:10:40 2022 -0700 KVM: arm64: permit all VM_MTE_ALLOWED mappings with MTE enabled Certain VMMs such as crosvm have features (e.g. sandboxing) that depend on being able to map guest memory as MAP_SHARED. The current restriction on sharing MAP_SHARED pages with the guest is preventing the use of those features with MTE. Now that the races between tasks concurrently clearing tags on the same page have been fixed, remove this restriction. Note that this is a relaxation of the ABI. Signed-off-by: Peter Collingbourne Reviewed-by: Catalin Marinas Reviewed-by: Steven Price Reviewed-by: Cornelia Huck Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221104011041.290951-8-pcc@google.com arch/arm64/kvm/mmu.c | 8 -------- 1 file changed, 8 deletions(-) commit d89585fbb30869011b326ef26c94c3137d228df9 Author: Peter Collingbourne Date: Thu Nov 3 18:10:39 2022 -0700 KVM: arm64: unify the tests for VMAs in memslots when MTE is enabled Previously we allowed creating a memslot containing a private mapping that was not VM_MTE_ALLOWED, but would later reject KVM_RUN with -EFAULT. Now we reject the memory region at memslot creation time. Since this is a minor tweak to the ABI (a VMM that created one of these memslots would fail later anyway), no VMM to my knowledge has MTE support yet, and the hardware with the necessary features is not generally available, we can probably make this ABI change at this point. Signed-off-by: Peter Collingbourne Reviewed-by: Catalin Marinas Reviewed-by: Steven Price Reviewed-by: Cornelia Huck Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221104011041.290951-7-pcc@google.com arch/arm64/kvm/mmu.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit d77e59a8fccde7fb5dd8c57594ed147b4291c970 Author: Catalin Marinas Date: Thu Nov 3 18:10:38 2022 -0700 arm64: mte: Lock a page for MTE tag initialisation Initialising the tags and setting PG_mte_tagged flag for a page can race between multiple set_pte_at() on shared pages or setting the stage 2 pte via user_mem_abort(). Introduce a new PG_mte_lock flag as PG_arch_3 and set it before attempting page initialisation. Given that PG_mte_tagged is never cleared for a page, consider setting this flag to mean page unlocked and wait on this bit with acquire semantics if the page is locked: - try_page_mte_tagging() - lock the page for tagging, return true if it can be tagged, false if already tagged. No acquire semantics if it returns true (PG_mte_tagged not set) as there is no serialisation with a previous set_page_mte_tagged(). - set_page_mte_tagged() - set PG_mte_tagged with release semantics. The two-bit locking is based on Peter Collingbourne's idea. Signed-off-by: Catalin Marinas Signed-off-by: Peter Collingbourne Reviewed-by: Steven Price Cc: Will Deacon Cc: Marc Zyngier Cc: Peter Collingbourne Reviewed-by: Cornelia Huck Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221104011041.290951-6-pcc@google.com arch/arm64/include/asm/mte.h | 35 ++++++++++++++++++++++++++++++++++- arch/arm64/include/asm/pgtable.h | 4 ++-- arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kernel/mte.c | 12 +++--------- arch/arm64/kvm/guest.c | 16 ++++++++++------ arch/arm64/kvm/mmu.c | 2 +- arch/arm64/mm/copypage.c | 2 ++ arch/arm64/mm/fault.c | 2 ++ arch/arm64/mm/mteswap.c | 14 +++++--------- 9 files changed, 60 insertions(+), 29 deletions(-) commit ef6458b1b6ca3fdb991ce4182e981a88d4c58c0f Author: Peter Collingbourne Date: Thu Nov 3 18:10:37 2022 -0700 mm: Add PG_arch_3 page flag As with PG_arch_2, this flag is only allowed on 64-bit architectures due to the shortage of bits available. It will be used by the arm64 MTE code in subsequent patches. Signed-off-by: Peter Collingbourne Cc: Will Deacon Cc: Marc Zyngier Cc: Steven Price [catalin.marinas@arm.com: added flag preserving in __split_huge_page_tail()] Signed-off-by: Catalin Marinas Reviewed-by: Steven Price Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221104011041.290951-5-pcc@google.com fs/proc/page.c | 1 + include/linux/kernel-page-flags.h | 1 + include/linux/page-flags.h | 1 + include/trace/events/mmflags.h | 1 + mm/huge_memory.c | 1 + 5 files changed, 5 insertions(+) commit 2dbf12ae132cc78048615cfa19c9be64baaf0ced Author: Catalin Marinas Date: Thu Nov 3 18:10:36 2022 -0700 KVM: arm64: Simplify the sanitise_mte_tags() logic Currently sanitise_mte_tags() checks if it's an online page before attempting to sanitise the tags. Such detection should be done in the caller via the VM_MTE_ALLOWED vma flag. Since kvm_set_spte_gfn() does not have the vma, leave the page unmapped if not already tagged. Tag initialisation will be done on a subsequent access fault in user_mem_abort(). Signed-off-by: Catalin Marinas [pcc@google.com: fix the page initializer] Signed-off-by: Peter Collingbourne Reviewed-by: Steven Price Cc: Will Deacon Cc: Marc Zyngier Cc: Peter Collingbourne Reviewed-by: Cornelia Huck Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221104011041.290951-4-pcc@google.com arch/arm64/kvm/mmu.c | 40 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 25 deletions(-) commit e059853d14ca4ed0f6a190d7109487918a22a976 Author: Catalin Marinas Date: Thu Nov 3 18:10:35 2022 -0700 arm64: mte: Fix/clarify the PG_mte_tagged semantics Currently the PG_mte_tagged page flag mostly means the page contains valid tags and it should be set after the tags have been cleared or restored. However, in mte_sync_tags() it is set before setting the tags to avoid, in theory, a race with concurrent mprotect(PROT_MTE) for shared pages. However, a concurrent mprotect(PROT_MTE) with a copy on write in another thread can cause the new page to have stale tags. Similarly, tag reading via ptrace() can read stale tags if the PG_mte_tagged flag is set before actually clearing/restoring the tags. Fix the PG_mte_tagged semantics so that it is only set after the tags have been cleared or restored. This is safe for swap restoring into a MAP_SHARED or CoW page since the core code takes the page lock. Add two functions to test and set the PG_mte_tagged flag with acquire and release semantics. The downside is that concurrent mprotect(PROT_MTE) on a MAP_SHARED page may cause tag loss. This is already the case for KVM guests if a VMM changes the page protection while the guest triggers a user_mem_abort(). Signed-off-by: Catalin Marinas [pcc@google.com: fix build with CONFIG_ARM64_MTE disabled] Signed-off-by: Peter Collingbourne Reviewed-by: Cornelia Huck Reviewed-by: Steven Price Cc: Will Deacon Cc: Marc Zyngier Cc: Peter Collingbourne Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221104011041.290951-3-pcc@google.com arch/arm64/include/asm/mte.h | 30 ++++++++++++++++++++++++++++++ arch/arm64/include/asm/pgtable.h | 2 +- arch/arm64/kernel/cpufeature.c | 4 +++- arch/arm64/kernel/elfcore.c | 2 +- arch/arm64/kernel/hibernate.c | 2 +- arch/arm64/kernel/mte.c | 17 +++++++++++------ arch/arm64/kvm/guest.c | 4 ++-- arch/arm64/kvm/mmu.c | 4 ++-- arch/arm64/mm/copypage.c | 5 +++-- arch/arm64/mm/fault.c | 2 +- arch/arm64/mm/mteswap.c | 2 +- 11 files changed, 56 insertions(+), 18 deletions(-) commit b0284cd29a957e62d60c2886fd663be93c56f9c0 Author: Catalin Marinas Date: Thu Nov 3 18:10:34 2022 -0700 mm: Do not enable PG_arch_2 for all 64-bit architectures Commit 4beba9486abd ("mm: Add PG_arch_2 page flag") introduced a new page flag for all 64-bit architectures. However, even if an architecture is 64-bit, it may still have limited spare bits in the 'flags' member of 'struct page'. This may happen if an architecture enables SPARSEMEM without SPARSEMEM_VMEMMAP as is the case with the newly added loongarch. This architecture port needs 19 more bits for the sparsemem section information and, while it is currently fine with PG_arch_2, adding any more PG_arch_* flags will trigger build-time warnings. Add a new CONFIG_ARCH_USES_PG_ARCH_X option which can be selected by architectures that need more PG_arch_* flags beyond PG_arch_1. Select it on arm64. Signed-off-by: Catalin Marinas [pcc@google.com: fix build with CONFIG_ARM64_MTE disabled] Signed-off-by: Peter Collingbourne Reported-by: kernel test robot Cc: Andrew Morton Cc: Steven Price Reviewed-by: Steven Price Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221104011041.290951-2-pcc@google.com arch/arm64/Kconfig | 1 + fs/proc/page.c | 2 +- include/linux/page-flags.h | 2 +- include/trace/events/mmflags.h | 8 ++++---- mm/Kconfig | 8 ++++++++ mm/huge_memory.c | 2 +- 6 files changed, 16 insertions(+), 7 deletions(-) commit 2d6c66f5253e7d168a76048d18e1209c52f98a2b Author: zhang songyi Date: Tue Nov 29 15:54:07 2022 +0800 RDMA/mlx4: 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}. Fix the following coccicheck warnings: /drivers/infiniband/hw/mlx4/main.c:1311:2-10: WARNING: WARNING NULL check before dev_{put, hold} functions is not needed. /drivers/infiniband/hw/mlx4/main.c:148:2-10: WARNING: WARNING NULL check before dev_{put, hold} functions is not needed. /drivers/infiniband/hw/mlx4/main.c:1959:3-11: WARNING: WARNING NULL check before dev_{put, hold} functions is not needed. /drivers/infiniband/hw/mlx4/main.c:1962:3-10: WARNING: WARNING NULL check before dev_{put, hold} functions is not needed. Signed-off-by: zhang songyi Link: https://lore.kernel.org/r/202211291554079687539@zte.com.cn Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx4/main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit fb12940f51d96ead10f9c0fd578e69b8de10ca81 Author: Greg Kroah-Hartman Date: Mon Nov 28 18:35:39 2022 +0100 driver core: fix up some missing class.devnode() conversions. In commit ff62b8e6588f ("driver core: make struct class.devnode() take a const *") the ->devnode callback changed the pointer to be const, but a few instances of PowerPC drivers were not caught for some reason. Fix this up by changing the pointers to be const. Fixes: ff62b8e6588f ("driver core: make struct class.devnode() take a const *") Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Frederic Barrat Cc: Andrew Donnellan Cc: Arnd Bergmann Cc: linuxppc-dev@lists.ozlabs.org Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20221128173539.3112234-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman arch/powerpc/platforms/book3s/vas-api.c | 2 +- drivers/misc/cxl/file.c | 2 +- drivers/misc/ocxl/file.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit b47ec9727f47d1dce4e8cbc9aef01c80b2332535 Author: Andy Shevchenko Date: Wed Nov 23 16:49:01 2022 +0200 xhci: Convert to use list_count() The list API now provides the list_count() 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/20221123144901.40493-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c2d9d02f7bf3c641f9b8e6c9f5de1e564cdeca69 Author: Andy Shevchenko Date: Wed Nov 23 16:49:00 2022 +0200 usb: gadget: udc: bcm63xx: Convert to use list_count() The list API now provides the list_count() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221123144901.40493-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/bcm63xx_udc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 33f00f41d963c86176dba2f9faff9b428a542e60 Author: Andy Shevchenko Date: Wed Nov 23 16:48:59 2022 +0200 usb: gadget: hid: Convert to use list_count() The list API now provides the list_count() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221123144901.40493-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/hid.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit a9efc04cfd05690e91279f41c2325c46335c43ef Author: Andy Shevchenko Date: Wed Nov 23 16:48:58 2022 +0200 i915: Move list_count() to list.h 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/20221123144901.40493-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/gpu/drm/i915/gt/intel_engine_cs.c | 13 +------------ include/linux/list.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 12 deletions(-) commit 944fe915d00d3cb1bacb1e77cabfb6dc82e6f8b8 Author: John Keeping Date: Tue Nov 22 12:35:23 2022 +0000 usb: gadget: f_hid: tidy error handling in hidg_alloc Unify error handling at the end of the function, reducing the risk of missing something on one of the error paths. Moving the increment of opts->refcnt later means there is no need to decrement it on the error path and is safe as this is guarded by opts->lock which is held for this entire section. Tested-by: Lee Jones Reviewed-by: Andrzej Pietrasiewicz Reviewed-by: Lee Jones Signed-off-by: John Keeping Link: https://lore.kernel.org/r/20221122123523.3068034-4-john@metanate.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_hid.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 70a3288a7586526315105c699b687d78cd32559a Author: John Keeping Date: Tue Nov 22 12:35:22 2022 +0000 usb: gadget: f_hid: fix refcount leak on error path When failing to allocate report_desc, opts->refcnt has already been incremented so it needs to be decremented to avoid leaving the options structure permanently locked. Fixes: 21a9476a7ba8 ("usb: gadget: hid: add configfs support") Tested-by: Lee Jones Reviewed-by: Andrzej Pietrasiewicz Reviewed-by: Lee Jones Signed-off-by: John Keeping Link: https://lore.kernel.org/r/20221122123523.3068034-3-john@metanate.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_hid.c | 1 + 1 file changed, 1 insertion(+) commit 89ff3dfac604614287ad5aad9370c3f984ea3f4b Author: John Keeping Date: Tue Nov 22 12:35:21 2022 +0000 usb: gadget: f_hid: fix f_hidg lifetime vs cdev The embedded struct cdev does not have its lifetime correctly tied to the enclosing struct f_hidg, so there is a use-after-free if /dev/hidgN is held open while the gadget is deleted. This can readily be replicated with libusbgx's example programs (for conciseness - operating directly via configfs is equivalent): gadget-hid exec 3<> /dev/hidg0 gadget-vid-pid-remove exec 3<&- Pull the existing device up in to struct f_hidg and make use of the cdev_device_{add,del}() helpers. This changes the lifetime of the device object to match struct f_hidg, but note that it is still added and deleted at the same time. Fixes: 71adf1189469 ("USB: gadget: add HID gadget driver") Tested-by: Lee Jones Reviewed-by: Andrzej Pietrasiewicz Reviewed-by: Lee Jones Signed-off-by: John Keeping Link: https://lore.kernel.org/r/20221122123523.3068034-2-john@metanate.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_hid.c | 52 ++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 24 deletions(-) commit 49b42475dd8a9fddbb2f3dc17ff6e4b115c80bfb Author: Allen-KH Cheng Date: Wed Nov 23 21:55:27 2022 +0800 dt-bindings: usb: mtu3: add compatible for mt8186 Add a new compatible for mt8186 SoC. Signed-off-by: Allen-KH Cheng Link: https://lore.kernel.org/r/20221123135531.23221-2-allen-kh.cheng@mediatek.com Acked-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 1 + 1 file changed, 1 insertion(+) commit 22683e480b370ad1b3a34cfa461028d1f51da12d Author: Jean Delvare Date: Sun Nov 27 15:52:30 2022 +0100 usb: misc: onboard_usb_hub: 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. Cc: Matthias Kaehlcke Cc: Greg Kroah-Hartman Signed-off-by: Jean Delvare Link: https://lore.kernel.org/r/20221127155230.144886b7@endymion.delvare Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae423ef5d095e09970f52c08020fdbf7f9d87c22 Author: Pawel Laszczak Date: Tue Nov 22 03:51:38 2022 -0500 usb: cdnsp: fix lack of ZLP for ep0 Patch implements the handling of ZLP for control transfer. To send the ZLP driver must prepare the extra TRB in TD with length set to zero and TRB type to TRB_NORMAL. The first TRB must have set TRB_CHAIN flag, TD_SIZE = 1 and TRB type to TRB_DATA. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") cc: Reviewed-by: Peter Chen Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20221122085138.332434-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman drivers/usb/cdns3/cdnsp-ring.c | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) commit 57f8e00d8a82073ab7893ab8ae4055580ef9552f Author: Tony Lindgren Date: Fri Nov 25 10:55:06 2022 +0200 usb: musb: Drop old unused am35x glue layer The am35x glue layer is no longer in use and can be dropped. There are no longer any SoCs passing platform data for it as they are booting using devicetree. In general, the am35x SoCs are similar to am335x and ti81xx and can use the musb_dsps glue layer as long as there is a proper phy driver available. Cc: Arnd Bergmann Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20221125085506.38127-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/Kconfig | 5 - drivers/usb/musb/Makefile | 1 - drivers/usb/musb/am35x.c | 610 ---------------------------------------------- 3 files changed, 616 deletions(-) commit ab3593eeef606816bcc28b12690c51379c3d12eb Author: Prashant Malani Date: Tue Nov 22 22:05:37 2022 +0000 platform/chrome: cros_ec_typec: Set parent of partner PD object In order to tell what Type-C device a PD object belongs to, its parent needs to be set. Use the Type-C partner USB PD registration wrapper to set the parent appropriately for PD objects which are created for connected Type-C partners. Cc: Benson Leung Cc: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20221122220538.2991775-3-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_ec_typec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 032399819dd5f135e6ffe446c8e97ab54eec3464 Author: Prashant Malani Date: Tue Nov 22 22:05:36 2022 +0000 usb: typec: Add partner PD object wrapper Some port drivers may want to set a Type-C partner as a parent for a USB Power Delivery object, but the Type-C partner struct isn't exposed outside of the Type-C class driver. Add a wrapper to usb_power_delivery_register() which sets the provided Type-C partner as a parent to the USB PD object. This helps to avoid exposing the Type-C partner's device struct unnecessarily. Cc: Benson Leung Suggested-by: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20221122220538.2991775-2-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/class.c | 19 +++++++++++++++++++ include/linux/usb/typec.h | 4 ++++ 2 files changed, 23 insertions(+) commit 03a88b0bafbe3f548729d970d8366f48718c9b19 Author: Chunfeng Yun Date: Mon Nov 28 14:33:37 2022 +0800 usb: xhci-mtk: fix leakage of shared hcd when fail to set wakeup irq Can not set the @shared_hcd to NULL before decrease the usage count by usb_put_hcd(), this will cause the shared hcd not released. Fixes: 04284eb74e0c ("usb: xhci-mtk: add support runtime PM") Cc: Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20221128063337.18124-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 1 - 1 file changed, 1 deletion(-) commit 27ef17849779edd5600aa27d1a246ad424761971 Author: Vincent Mailhol Date: Mon Nov 28 19:29:54 2022 +0900 usb: add usb_set_intfdata() documentation USB drivers do not need to call usb_set_intfdata(intf, NULL) in their usb_driver::disconnect callback because the core already does it in [1]. However, this fact is widely unknown, c.f.: $ git grep "usb_set_intfdata(.*NULL)" | wc -l 215 Especially, setting the interface to NULL before all action completed can result in a NULL pointer dereference. Not calling usb_set_intfdata() at all in disconnect() is the safest method. Add documentation to usb_set_intfdata() to clarify this point. Also remove the call in usb-skeletion's disconnect() not to confuse the new comers. [1] function usb_unbind_interface() from drivers/usb/core/driver.c Link: https://elixir.bootlin.com/linux/v6.0/source/drivers/usb/core/driver.c#L497 Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/r/20221128102954.3615579-1-mailhol.vincent@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/usb/usb-skeleton.c | 1 - include/linux/usb.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 01792c6036af577e4cb1aa7b9ffce7a4882c86b5 Author: Xu Yang Date: Mon Nov 28 16:13:06 2022 +0800 usb: host: fix a typo in ehci.h Change "ehci_hq" to "ehci_qh" in this comment. Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20221128081306.2772729-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f05f80f217bf52443a2582bca19fd78188333f25 Author: Shruthi Sanil Date: Fri Nov 25 16:23:27 2022 +0530 usb: dwc3: pci: Update PCIe device ID for USB3 controller on CPU sub-system for Raptor Lake The device ID 0xa70e is defined for the USB3 device controller in the CPU sub-system of Raptor Lake platform. Hence updating the ID accordingly. Fixes: bad0d1d726ac ("usb: dwc3: pci: Add support for Intel Raptor Lake") Cc: stable Reviewed-by: Heikki Krogerus Signed-off-by: Shruthi Sanil Link: https://lore.kernel.org/r/20221125105327.27945-1-shruthi.sanil@intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/dwc3-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c347cdafa3db43337870006e5c2d7b78a8dae20 Author: Yang Yingliang Date: Fri Nov 25 14:41:20 2022 +0800 usb: core: hcd: Fix return value check in usb_hcd_setup_local_mem() If dmam_alloc_attrs() fails, it returns NULL pointer and never return ERR_PTR(), so repleace IS_ERR() with IS_ERR_OR_NULL() and if it's NULL, returns -ENOMEM. Fixes: 9ba26f5cecd8 ("ARM: sa1100/assabet: move dmabounce hack to ohci driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221125064120.2842452-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 57b7b733b1a7aeab25bc2670afff608214284863 Author: Andrzej Pietrasiewicz Date: Wed Nov 23 12:07:46 2022 +0100 usb: gadget: function: Simplify diagnostic messaging in printer Don't issue messages which can be easily achieved with ftrace. In case of printer_open() the return code is propagated to other layers so the user will know about -EBUSY anyway. Signed-off-by: Andrzej Pietrasiewicz Link: https://lore.kernel.org/r/20221123110746.59611-1-andrzej.p@collabora.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_printer.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit e0dced9c7d4763fd97c86a13902d135f03cc42eb Author: Heikki Krogerus Date: Wed Nov 23 11:30:21 2022 +0200 usb: typec: ucsi: Resume in separate work It can take more than one second to check each connector when the system is resumed. So if you have, say, eight connectors, it may take eight seconds for ucsi_resume() to finish. That's a bit too much. This will modify ucsi_resume() so that it schedules a work where the interface is actually resumed instead of checking the connectors directly. The connections will also be checked in separate tasks which are queued for each connector separately. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216706 Fixes: 99f6d4361113 ("usb: typec: ucsi: Check the connection on resume") Cc: Reported-by: Todd Brandt Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221123093021.25981-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi.c | 17 +++++++++++++---- drivers/usb/typec/ucsi/ucsi.h | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) commit 1ab30c610630da5391a373cddb8a065bf4c4bc01 Author: Yang Yingliang Date: Tue Nov 22 19:12:26 2022 +0800 usb: roles: fix of node refcount leak in usb_role_switch_is_parent() I got the following report while doing device(mt6370-tcpc) load test with CONFIG_OF_UNITTEST and CONFIG_OF_DYNAMIC enabled: OF: ERROR: memory leak, expected refcount 1 instead of 2, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /i2c/pmic@34 The 'parent' returned by fwnode_get_parent() with refcount incremented. it needs be put after using. Fixes: 6fadd72943b8 ("usb: roles: get usb-role-switch from parent") Reviewed-by: Heikki Krogerus Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221122111226.251588-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/roles/class.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 98dc08bae6780bb950b5c0cdefeb662b22482655 Author: Eric Biggers Date: Mon Nov 28 23:04:01 2022 -0800 fsverity: stop using PG_error to track error status As a step towards freeing the PG_error flag for other uses, change ext4 and f2fs to stop using PG_error to track verity errors. Instead, if a verity error occurs, just mark the whole bio as failed. The coarser granularity isn't really a problem since it isn't any worse than what the block layer provides, and errors from a multi-page readahead aren't reported to applications unless a single-page read fails too. f2fs supports compression, which makes the f2fs changes a bit more complicated than desired, but the basic premise still works. Note: there are still a few uses of PageError in f2fs, but they are on the write path, so they are unrelated and this patch doesn't touch them. Reviewed-by: Chao Yu Acked-by: Jaegeuk Kim Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221129070401.156114-1-ebiggers@kernel.org fs/ext4/readpage.c | 8 ++----- fs/f2fs/compress.c | 64 ++++++++++++++++++++++++++---------------------------- fs/f2fs/data.c | 53 +++++++++++++++++++++++++++----------------- fs/verity/verify.c | 12 +++++----- 4 files changed, 72 insertions(+), 65 deletions(-) commit 1d8025ec722d5e011f9299c46274eb21fb54a428 Author: Andy Chi Date: Mon Nov 28 10:28:47 2022 +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/20221128022849.13759-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit a46315295489933209e902638cd287aeb5f982ab Author: Daniel Golle Date: Wed Oct 26 17:18:07 2022 +0100 clk: mediatek: fix dependency of MT7986 ADC clocks It seems like CLK_INFRA_ADC_FRC_CK always need to be enabled for CLK_INFRA_ADC_26M_CK to work. Instead of adding this dependency to the mtk-thermal and mt6577_auxadc drivers, add dependency to the clock driver clk-mt7986-infracfg.c. Fixes: ec97d23c8e22 ("clk: mediatek: add mt7986 clock support") Suggested-by: AngeloGioacchino Del Regno Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/5e55012567da74870e1fb2edc2dc513b5821e523.1666801017.git.daniel@makrotopia.org Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-mt7986-infracfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 633e34d0f46ed36f1de15ede00e4b31f4d7cccae Author: Johnson Wang Date: Mon Nov 21 20:29:57 2022 +0800 clk: mediatek: Change PLL register API for MT8186 Use mtk_clk_register_pllfhs() to enhance frequency hopping and spread spectrum clocking control for MT8186. Co-developed-by: Edward-JW Yang Signed-off-by: Edward-JW Yang Signed-off-by: Johnson Wang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221121122957.21611-5-johnson.wang@mediatek.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/Kconfig | 1 + drivers/clk/mediatek/clk-mt8186-apmixedsys.c | 66 ++++++++++++++++++++++++++-- 2 files changed, 64 insertions(+), 3 deletions(-) commit d7964de8a8ea800910fdd4e365c42a9e7d5c54aa Author: Johnson Wang Date: Mon Nov 21 20:29:56 2022 +0800 clk: mediatek: Add new clock driver to handle FHCTL hardware To implement frequency hopping and spread spectrum clocking function, we introduce new clock type and APIs to handle FHCTL hardware. Co-developed-by: Edward-JW Yang Signed-off-by: Edward-JW Yang Signed-off-by: Johnson Wang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221121122957.21611-4-johnson.wang@mediatek.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/Kconfig | 7 + drivers/clk/mediatek/Makefile | 1 + drivers/clk/mediatek/clk-fhctl.c | 244 ++++++++++++++++++++++++++++++++++ drivers/clk/mediatek/clk-fhctl.h | 26 ++++ drivers/clk/mediatek/clk-pllfh.c | 275 +++++++++++++++++++++++++++++++++++++++ drivers/clk/mediatek/clk-pllfh.h | 82 ++++++++++++ 6 files changed, 635 insertions(+) commit cfcefe36bf939107eeba7b1114e3d82e31f92893 Author: Johnson Wang Date: Mon Nov 21 20:29:55 2022 +0800 dt-bindings: clock: mediatek: Add new bindings of MediaTek frequency hopping Add the new binding documentation for MediaTek frequency hopping and spread spectrum clocking control. Co-developed-by: Edward-JW Yang Signed-off-by: Edward-JW Yang Signed-off-by: Johnson Wang Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221121122957.21611-3-johnson.wang@mediatek.com Signed-off-by: Chen-Yu Tsai .../bindings/clock/mediatek,mt8186-fhctl.yaml | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 029c936ae7e14ce49d043527087abb5f4b0ea48c Author: Johnson Wang Date: Mon Nov 21 20:29:54 2022 +0800 clk: mediatek: Export PLL operations symbols Export PLL operations and register functions for different type of clock driver used. Co-developed-by: Edward-JW Yang Signed-off-by: Edward-JW Yang Signed-off-by: Johnson Wang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221121122957.21611-2-johnson.wang@mediatek.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-pll.c | 84 +++++++++++++++++------------------------- drivers/clk/mediatek/clk-pll.h | 55 +++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 50 deletions(-) commit 3256ea4f6582d2cb9b63ad96451957c217a52582 Author: AngeloGioacchino Del Regno Date: Mon Oct 24 12:23:07 2022 +0200 clk: mediatek: mt8186-topckgen: Add GPU clock mux notifier Following the changes done to MT8183, MT8192, MT8195, register a clock notifier for MT8186, allowing safe clockrate updates for the MFG PLL. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221024102307.33722-11-angelogioacchino.delregno@collabora.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-mt8186-topckgen.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit ecc639ddbe0d7bf1c66f6c69ee54ee005484d886 Author: AngeloGioacchino Del Regno Date: Mon Oct 24 12:23:06 2022 +0200 clk: mediatek: mt8186-mfg: Propagate rate changes to parent Propagate the rate changes to MFG_BG3D's parent on MT8186 to allow for proper GPU DVFS. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221024102307.33722-10-angelogioacchino.delregno@collabora.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-mt8186-mfg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 327eeb6c240ab9293ab730789ea651fbc3fe6123 Author: AngeloGioacchino Del Regno Date: Mon Oct 24 12:23:05 2022 +0200 clk: mediatek: mt8195-topckgen: Drop flags for main/univpll fixed factors The main/univpll clocks are used as clock sources for multiple peripherals of different kind, some of which are critical (like AXIs); a rate change on any of these two will produce a rate change on many devices and that's likely to produce system instability if not done correctly: this is the reason why we have (a lot of) "fixed factor" main/univpll divider clocks, used by MUX clocks to provide different rates based on PLL output dividers. Following what was done on clk-mt8186-topckgen and also preventing the same GPU DVFS issue, drop CLK_SET_RATE_PARENT from the aforementioned clocks. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221024102307.33722-9-angelogioacchino.delregno@collabora.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-mt8195-topckgen.c | 78 +++++++++++++++--------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit b56603285f7e323591267bec9a9d6950e9bdb7cb Author: AngeloGioacchino Del Regno Date: Mon Oct 24 12:23:04 2022 +0200 clk: mediatek: mt8192: Drop flags for main/univpll fixed factors The main/univpll clocks are used as clock sources for multiple peripherals of different kind, some of which are critical (like AXIs); a rate change on any of these two will produce a rate change on many devices and that's likely to produce system instability if not done correctly: this is the reason why we have (a lot of) "fixed factor" main/univpll divider clocks, used by MUX clocks to provide different rates based on PLL output dividers. Following what was done on clk-mt8186-topckgen and also preventing the same GPU DVFS issue, drop CLK_SET_RATE_PARENT from the aforementioned clocks. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221024102307.33722-8-angelogioacchino.delregno@collabora.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-mt8192.c | 76 +++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) commit 0cf308ee3472019539582ee279b637beb34ad2ff Author: AngeloGioacchino Del Regno Date: Mon Oct 24 12:23:03 2022 +0200 clk: mediatek: mt6795-topckgen: Drop flags for main/sys/univpll fixed factors The main/sys/univpll clocks are used as clock sources for multiple peripherals of different kind, some of which are critical (like AXIs); a rate change on any of these two will produce a rate change on many devices and that's likely to produce system instability if not done correctly: this is the reason why we have (a lot of) "fixed factor" main/sys/univpll divider clocks, used by MUX clocks to provide different rates based on PLL output dividers. Following what was done on clk-mt8186-topckgen and also preventing the same GPU DVFS issue, drop CLK_SET_RATE_PARENT from the aforementioned clocks. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221024102307.33722-7-angelogioacchino.delregno@collabora.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-mt6795-topckgen.c | 76 +++++++++++++++--------------- 1 file changed, 38 insertions(+), 38 deletions(-) commit f757c9e951b89c40db41592a22785b5a25c58224 Author: AngeloGioacchino Del Regno Date: Mon Oct 24 12:23:02 2022 +0200 clk: mediatek: mt8173: Drop flags for main/sys/univpll fixed factors The main/sys/univpll clocks are used as clock sources for multiple peripherals of different kind, some of which are critical (like AXIs); a rate change on any of these two will produce a rate change on many devices and that's likely to produce system instability if not done correctly: this is the reason why we have (a lot of) "fixed factor" main/sys/univpll divider clocks, used by MUX clocks to provide different rates based on PLL output dividers. Following what was done on clk-mt8186-topckgen and also preventing the same GPU DVFS issue, drop CLK_SET_RATE_PARENT from the aforementioned clocks. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221024102307.33722-6-angelogioacchino.delregno@collabora.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-mt8173.c | 76 +++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) commit c01d64ca5166fa88d27c7c4a2a294dd10d20f780 Author: AngeloGioacchino Del Regno Date: Mon Oct 24 12:23:01 2022 +0200 clk: mediatek: mt8183: Drop flags for sys/univpll fixed factors The syspll and univpll clocks are used as clock sources for multiple peripherals of different kind, some of which are critical (like AXIs); a rate change on any of these two will produce a rate change on many devices and that's likely to produce system instability if not done correctly: this is the reason why we have (a lot of) "fixed factor" sys/univpll divider clocks, used by MUX clocks to provide different rates based on PLL output dividers. Following what was done on clk-mt8186-topckgen and also solving the same GPU DVFS issue, drop CLK_SET_RATE_PARENT from the aforementioned clocks. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221024102307.33722-5-angelogioacchino.delregno@collabora.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-mt8183.c | 76 +++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) commit 23037ab63336a4a1d98645bf7ee76240ed20bc65 Author: AngeloGioacchino Del Regno Date: Mon Oct 24 12:23:00 2022 +0200 clk: mediatek: mt8183: Compress top_divs array entries There's no need to split each FACTOR entry in two lines, as each of them does fit in one line just fine. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221024102307.33722-4-angelogioacchino.delregno@collabora.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-mt8183.c | 216 +++++++++++++------------------------- 1 file changed, 72 insertions(+), 144 deletions(-) commit 295de9d0d063cc576c5c6322aeeda64d3579d9e5 Author: AngeloGioacchino Del Regno Date: Mon Oct 24 12:22:59 2022 +0200 clk: mediatek: mt8186-topckgen: Drop flags for main/univpll fixed factors The mainpll and univpll clocks are used as clock sources for multiple peripherals of different kind, some of which are critical (like AXIs); a rate change on any of these two will produce a rate change on many devices and that's likely to produce system instability if not done correctly: this is the reason why we have "fixed factor" clocks, used by MUX clocks to provide different rates based on PLL output dividers. Though, there's one fundamental issue that must be resolved somehow: When performing GPU DVFS, we get a rate request that will try to change the frequency of MAINPLL due to the CLK_TOP_MFG mux having clk26m, mfgpll (the GPU dedicated PLL), mainpll_d3, mainpll_d5 (fixed factor dividers) as possible parents. In order to solve that, there are two ways: 1. Add new "fake" mainpll_d3_fixed, mainpll_d5_fixed clocks, clones of mainpll_d3, mainpll_d5 clocks, for the only purpose of not declaring CLK_SET_RATE_PARENT; or 2. Simply drop said flag from the original dividers. After some careful validation, I cannot see anything calling a rate change request during runtime for MAINPLL, nor for UNIVPLL (which would, again, mean that we're reclocking lots of peripherals at once!), so it is safe *and sane* to simply remove the CLK_SET_RATE_PARENT flag to all of the main/univpll fixed factor divider clocks. Besides, if for any (doubtful) reason main/univpll rate change will be required in the future, it's still possible to call that on the PLL main clocks, so we're still covered anyway. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221024102307.33722-3-angelogioacchino.delregno@collabora.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-mt8186-topckgen.c | 62 +++++++++++++++--------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 672c779e4cff5f4a103077e9b398f144c85db802 Author: AngeloGioacchino Del Regno Date: Mon Oct 24 12:22:58 2022 +0200 clk: mediatek: clk-mtk: Allow specifying flags on mtk_fixed_factor clocks Before this change, every mtk_fixed_factor clock forced clock flags to CLK_SET_RATE_PARENT: while this is harmless in some cases, it may not be desired in some others, especially when performing clock muxing on a clock having multiple parents of which one is a dedicated PLL and the others are not. This is especially seen on the GPU clocks on some SoCs, where we are muxing between multiple parents: a fixed clock (crystal), a programmable GPU PLL and one or more dividers for the MAINPLL, used for a number of devices; it happens that when a rate change is called for the GPU, the clock framework will try to satisfy the rate request by using one of the MAINPLL dividers, which have CLK_SET_RATE_PARENT and will set the rate on MAINPLL itself - overclocking or underclocking many devices in the system - and making it to lock up. Logically, it should be harmless (and would only reduce possible bugs) to change all of the univpll and mainpll related fixed factor clocks to not declare the CLK_SET_RATE_PARENT by default but, on some SoCs, this is also used for dividers of other PLLs for which a rate change based on the divider may be desired, hence introduce a new FACTOR_FLAGS() macro to use custom flags (or none) on selected fixed factor clocks. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221024102307.33722-2-angelogioacchino.delregno@collabora.com Signed-off-by: Chen-Yu Tsai drivers/clk/mediatek/clk-mtk.c | 2 +- drivers/clk/mediatek/clk-mtk.h | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit d6dc62fca6b6a1e75430618bf6d84cf135f1b3d8 Merge: 469d258d9e11 2b3e8f6f5b93 Author: Jakub Kicinski Date: Mon Nov 28 17:14:01 2022 -0800 Daniel Borkmann says: ==================== bpf-next 2022-11-25 We've added 101 non-merge commits during the last 11 day(s) which contain a total of 109 files changed, 8827 insertions(+), 1129 deletions(-). The main changes are: 1) Support for user defined BPF objects: the use case is to allocate own objects, build own object hierarchies and use the building blocks to build own data structures flexibly, for example, linked lists in BPF, from Kumar Kartikeya Dwivedi. 2) Add bpf_rcu_read_{,un}lock() support for sleepable programs, from Yonghong Song. 3) Add support storing struct task_struct objects as kptrs in maps, from David Vernet. 4) Batch of BPF map documentation improvements, from Maryam Tahhan and Donald Hunter. 5) Improve BPF verifier to propagate nullness information for branches of register to register comparisons, from Eduard Zingerman. 6) Fix cgroup BPF iter infra to hold reference on the start cgroup, from Hou Tao. 7) Fix BPF verifier to not mark fentry/fexit program arguments as trusted given it is not the case for them, from Alexei Starovoitov. 8) Improve BPF verifier's realloc handling to better play along with dynamic runtime analysis tools like KASAN and friends, from Kees Cook. 9) Remove legacy libbpf mode support from bpftool, from Sahid Orentino Ferdjaoui. 10) Rework zero-len skb redirection checks to avoid potentially breaking existing BPF test infra users, from Stanislav Fomichev. 11) Two small refactorings which are independent and have been split out of the XDP queueing RFC series, from Toke Høiland-Jørgensen. 12) Fix a memory leak in LSM cgroup BPF selftest, from Wang Yufen. 13) Documentation on how to run BPF CI without patch submission, from Daniel Müller. Signed-off-by: Jakub Kicinski ==================== Link: https://lore.kernel.org/r/20221125012450.441-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 3692fec8bb476e8583e559ff5783a6adef306cf2 Author: Damien Le Moal Date: Sat Nov 26 11:55:49 2022 +0900 block: mq-deadline: Rename deadline_is_seq_writes() Rename deadline_is_seq_writes() to deadline_is_seq_write() (remove the "s" plural) to more correctly reflect the fact that this function tests a single request, not multiple requests. Fixes: 015d02f48537 ("block: mq-deadline: Do not break sequential write streams to zoned HDDs") Signed-off-by: Damien Le Moal Link: https://lore.kernel.org/r/20221126025550.967914-2-damien.lemoal@opensource.wdc.com Signed-off-by: Jens Axboe block/mq-deadline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 254e3459285cbf2174350bbc0051e475e1bc5196 Author: Darrick J. Wong Date: Mon Nov 28 17:24:36 2022 -0800 xfs: add debug knob to slow down write for fun Add a new error injection knob so that we can arbitrarily slow down pagecache writes to test for race conditions and aberrant reclaim behavior if the writeback mechanisms are slow to issue writeback. This will enable functional testing for the ifork sequence counters introduced in commit 304a68b9c63b ("xfs: use iomap_valid method to detect stale cached iomaps") that fixes write racing with reclaim writeback. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_errortag.h | 4 +++- fs/xfs/xfs_error.c | 3 +++ fs/xfs/xfs_iomap.c | 14 ++++++++++++-- fs/xfs/xfs_trace.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 3 deletions(-) commit c2beff99eb03866df6fdbd3a93b08fd27eb8bf5c Author: Darrick J. Wong Date: Mon Nov 28 17:24:35 2022 -0800 xfs: add debug knob to slow down writeback for fun Add a new error injection knob so that we can arbitrarily slow down writeback to test for race conditions and aberrant reclaim behavior if the writeback mechanisms are slow to issue writeback. This will enable functional testing for the ifork sequence counters introduced in commit 745b3f76d1c8 ("xfs: maintain a sequence count for inode fork manipulations"). Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_errortag.h | 4 +++- fs/xfs/xfs_aops.c | 14 ++++++++++++-- fs/xfs/xfs_error.c | 16 ++++++++++++++++ fs/xfs/xfs_error.h | 13 +++++++++++++ fs/xfs/xfs_trace.c | 2 ++ fs/xfs/xfs_trace.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 90 insertions(+), 3 deletions(-) commit 7dd73802f97d2a1602b1cf5c1d6623fb08cb15c5 Merge: 28b4b0596343 6e8af15ccdc4 Author: Darrick J. Wong Date: Mon Nov 28 17:23:58 2022 -0800 Merge tag 'xfs-iomap-stale-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs into xfs-6.2-mergeB xfs, iomap: fix data corruption due to stale cached iomaps This patch series fixes a data corruption that occurs in a specific multi-threaded write workload. The workload combined racing unaligned adjacent buffered writes with low memory conditions that caused both writeback and memory reclaim to race with the writes. The result of this was random partial blocks containing zeroes instead of the correct data. The underlying problem is that iomap caches the write iomap for the duration of the write() operation, but it fails to take into account that the extent underlying the iomap can change whilst the write is in progress. The short story is that an iomap can span mutliple folios, and so under low memory writeback can be cleaning folios the write() overlaps. Whilst the overlapping data is cached in memory, this isn't a problem, but because the folios are now clean they can be reclaimed. Once reclaimed, the write() does the wrong thing when re-instantiating partial folios because the iomap no longer reflects the underlying state of the extent. e.g. it thinks the extent is unwritten, so it zeroes the partial range, when in fact the underlying extent is now written and so it should have read the data from disk. This is how we get random zero ranges in the file instead of the correct data. The gory details of the race condition can be found here: https://lore.kernel.org/linux-xfs/20220817093627.GZ3600936@dread.disaster.area/ Fixing the problem has two aspects. The first aspect of the problem is ensuring that iomap can detect a stale cached iomap during a write in a race-free manner. We already do this stale iomap detection in the writeback path, so we have a mechanism for detecting that the iomap backing the data range may have changed and needs to be remapped. In the case of the write() path, we have to ensure that the iomap is validated at a point in time when the page cache is stable and cannot be reclaimed from under us. We also need to validate the extent before we start performing any modifications to the folio state or contents. Combine these two requirements together, and the only "safe" place to validate the iomap is after we have looked up and locked the folio we are going to copy the data into, but before we've performed any initialisation operations on that folio. If the iomap fails validation, we then mark it stale, unlock the folio and end the write. This effectively means a stale iomap results in a short write. Filesystems should already be able to handle this, as write operations can end short for many reasons and need to iterate through another mapping cycle to be completed. Hence the iomap changes needed to detect and handle stale iomaps during write() operations is relatively simple... However, the assumption is that filesystems should already be able to handle write failures safely, and that's where the second (first?) part of the problem exists. That is, handling a partial write is harder than just "punching out the unused delayed allocation extent". This is because mmap() based faults can race with writes, and if they land in the delalloc region that the write allocated, then punching out the delalloc region can cause data corruption. This data corruption problem is exposed by generic/346 when iomap is converted to detect stale iomaps during write() operations. Hence write failure in the filesytems needs to handle the fact that the write() in progress doesn't necessarily own the data in the page cache over the range of the delalloc extent it just allocated. As a result, we can't just truncate the page cache over the range the write() didn't reach and punch all the delalloc extent. We have to walk the page cache over the untouched range and skip over any dirty data region in the cache in that range. Which is .... non-trivial. That is, iterating the page cache has to handle partially populated folios (i.e. block size < page size) that contain data. The data might be discontiguous within a folio. Indeed, there might be *multiple* discontiguous data regions within a single folio. And to make matters more complex, multi-page folios mean we just don't know how many sub-folio regions we might have to iterate to find all these regions. All the corner cases between the conversions and rounding between filesystem block size, folio size and multi-page folio size combined with unaligned write offsets kept breaking my brain. However, if we convert the code to track the processed write regions by byte ranges instead of fileystem block or page cache index, we could simply use mapping_seek_hole_data() to find the start and end of each discrete data region within the range we needed to scan. SEEK_DATA finds the start of the cached data region, SEEK_HOLE finds the end of the region. These are byte based interfaces that understand partially uptodate folio regions, and so can iterate discrete sub-folio data regions directly. This largely solved the problem of discovering the dirty regions we need to keep the delalloc extent over. However, to use mapping_seek_hole_data() without needing to export it, we have to move all the delalloc extent cleanup to the iomap core and so now the iomap core can clean up delayed allocation extents in a safe, sane and filesystem neutral manner. With all this done, the original data corruption never occurs anymore, and we now have a generic mechanism for ensuring that page cache writes do not do the wrong thing when writeback and reclaim change the state of the physical extent and/or page cache contents whilst the write is in progress. Signed-off-by: Dave Chinner Signed-off-by: Darrick J. Wong * tag 'xfs-iomap-stale-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: xfs: drop write error injection is unfixable, remove it xfs: use iomap_valid method to detect stale cached iomaps iomap: write iomap validity checks xfs: xfs_bmap_punch_delalloc_range() should take a byte range iomap: buffered write failure should not truncate the page cache xfs,iomap: move delalloc punching to iomap xfs: use byte ranges for write cleanup ranges xfs: punching delalloc extents on write failure is racy xfs: write page faults in iomap are not buffered writes commit 469d258d9e112fb7ed51a3b35c0c85ee106331e8 Author: Vladimir Oltean Date: Fri Nov 25 12:53:04 2022 +0200 Revert "net: stmmac: use sysfs_streq() instead of strncmp()" This reverts commit f72cd76b05ea1ce9258484e8127932d0ea928f22. This patch is so broken, it hurts. Apparently no one reviewed it and it passed the build testing (because the code was compiled out), but it was obviously never compile-tested, since it produces the following build error, due to an incomplete conversion where an extra argument was left, although the function being called was left: stmmac_main.c: In function ‘stmmac_cmdline_opt’: stmmac_main.c:7586:28: error: too many arguments to function ‘sysfs_streq’ 7586 | } else if (sysfs_streq(opt, "pause:", 6)) { | ^~~~~~~~~~~ In file included from ../include/linux/bitmap.h:11, from ../include/linux/cpumask.h:12, from ../include/linux/smp.h:13, from ../include/linux/lockdep.h:14, from ../include/linux/mutex.h:17, from ../include/linux/notifier.h:14, from ../include/linux/clk.h:14, from ../drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:17: ../include/linux/string.h:185:13: note: declared here 185 | extern bool sysfs_streq(const char *s1, const char *s2); | ^~~~~~~~~~~ What's even worse is that the patch is flat out wrong. The stmmac_cmdline_opt() function does not parse sysfs input, but cmdline input such as "stmmaceth=tc:1,pause:1". The pattern of using strsep() followed by strncmp() for such strings is not unique to stmmac, it can also be found mainly in drivers under drivers/video/fbdev/. With strncmp("tc:", 3), the code matches on the "tc:1" token properly. With sysfs_streq("tc:"), it doesn't. Fixes: f72cd76b05ea ("net: stmmac: use sysfs_streq() instead of strncmp()") Signed-off-by: Vladimir Oltean Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20221125105304.3012153-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2816c98606a912af626fc9e2b62a1063cf6000f0 Author: Davide Tronchin Date: Thu Nov 24 12:28:11 2022 +0100 net: usb: cdc_ether: add u-blox 0x1343 composition Add CDC-ECM support for LARA-L6. LARA-L6 module can be configured (by AT interface) in three different USB modes: * Default mode (Vendor ID: 0x1546 Product ID: 0x1341) with 4 serial interfaces * RmNet mode (Vendor ID: 0x1546 Product ID: 0x1342) with 4 serial interfaces and 1 RmNet virtual network interface * CDC-ECM mode (Vendor ID: 0x1546 Product ID: 0x1343) with 4 serial interface and 1 CDC-ECM virtual network interface In CDC-ECM mode LARA-L6 exposes the following interfaces: If 0: Diagnostic If 1: AT parser If 2: AT parser If 3: AT parset/alternative functions If 4: CDC-ECM interface Signed-off-by: Davide Tronchin Link: https://lore.kernel.org/r/20221124112811.3548-1-davide.tronchin.94@gmail.com Signed-off-by: Jakub Kicinski drivers/net/usb/cdc_ether.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 46a5cd8c8dcacc58912b4bf04ca4d84d2977bbbc Author: Steven Rostedt (Google) Date: Mon Oct 17 14:05:13 2022 -0400 tracing: Update MAINTAINERS file for new patchwork and mailing list The tracing subsystem now has its own mailing list (although patches should also be sent to LKML) as well as a new patchwork entry for kernel related tracing patches. Update the MAINTAINERS file to reflect the changes. Link: https://lore.kernel.org/linux-trace-kernel/20221017140513.14b9ce2e@gandalf.local.home Signed-off-by: Steven Rostedt (Google) MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit e567e58d6819adc002c57b81e16b88da24d3b4aa Author: Pierre Gondois Date: Tue Nov 22 17:32:07 2022 +0100 arm64: dts: Update cache properties for broadcom 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. Acked-by: William Zhang Signed-off-by: Pierre Gondois Link: https://lore.kernel.org/r/20221122163208.3810985-3-pierre.gondois@arm.com Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 1 + arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi | 1 + arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi | 1 + arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi | 1 + arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi | 1 + arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi | 1 + arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi | 1 + arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi | 1 + arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi | 4 ++++ 9 files changed, 12 insertions(+) commit b23024676a2f135dbde2221481e2f4af616d0445 Author: Pierre Gondois Date: Tue Nov 22 17:32:06 2022 +0100 arm: dts: Update cache properties for broadcom 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/20221122163208.3810985-2-pierre.gondois@arm.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm2711.dtsi | 1 + arch/arm/boot/dts/bcm2836.dtsi | 1 + arch/arm/boot/dts/bcm2837.dtsi | 1 + arch/arm/boot/dts/bcm47622.dtsi | 1 + arch/arm/boot/dts/bcm63148.dtsi | 1 + arch/arm/boot/dts/bcm63178.dtsi | 1 + arch/arm/boot/dts/bcm6756.dtsi | 1 + arch/arm/boot/dts/bcm6846.dtsi | 1 + arch/arm/boot/dts/bcm6855.dtsi | 1 + arch/arm/boot/dts/bcm6878.dtsi | 1 + 10 files changed, 10 insertions(+) commit af84101e3f2258a303fa2461ebec0878ce23ea10 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:27 2022 +0100 ARM: dts: broadcom: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: bcm4708-asus-rt-ac68u.dtb: leds: 'logo', 'power', 'usb2', 'usb3' do 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/20221125144128.477059-1-krzysztof.kozlowski@linaro.org Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 15 ++++++------ arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 8 +++---- .../dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi | 16 ++++++------- arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 16 ++++++------- arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 6 ++--- arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 2 +- arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 10 ++++---- arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 10 ++++---- arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 22 ++++++++--------- arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 10 ++++---- arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 14 +++++------ arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 16 ++++++------- arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 6 ++--- arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 20 ++++++++-------- arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 18 +++++++------- arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 6 ++--- arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 18 +++++++------- arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 16 ++++++------- arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 22 ++++++++--------- arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 18 +++++++------- arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 12 +++++----- arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 14 +++++------ arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts | 16 ++++++------- arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 28 +++++++++++----------- arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 4 ++-- arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts | 6 ++--- arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 4 ++-- arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts | 2 +- arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 20 ++++++++-------- arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 10 ++++---- arch/arm/boot/dts/bcm47094-netgear-r8500.dts | 14 +++++------ arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts | 4 ++-- arch/arm/boot/dts/bcm47189-luxul-xap-810.dts | 10 ++++---- arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 14 +++++------ arch/arm/boot/dts/bcm53016-dlink-dwl-8610ap.dts | 8 +++---- arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 6 ++--- arch/arm/boot/dts/bcm947189acdbmr.dts | 6 ++--- 37 files changed, 223 insertions(+), 224 deletions(-) commit 6e8af15ccdc4e138a5b529c1901a0013e1dcaa09 Author: Dave Chinner Date: Tue Nov 29 09:09:17 2022 +1100 xfs: drop write error injection is unfixable, remove it With the changes to scan the page cache for dirty data to avoid data corruptions from partial write cleanup racing with other page cache operations, the drop writes error injection no longer works the same way it used to and causes xfs/196 to fail. This is because xfs/196 writes to the file and populates the page cache before it turns on the error injection and starts failing -overwrites-. The result is that the original drop-writes code failed writes only -after- overwriting the data in the cache, followed by invalidates the cached data, then punching out the delalloc extent from under that data. On the surface, this looks fine. The problem is that page cache invalidation *doesn't guarantee that it removes anything from the page cache* and it doesn't change the dirty state of the folio. When block size == page size and we do page aligned IO (as xfs/196 does) everything happens to align perfectly and page cache invalidation removes the single page folios that span the written data. Hence the followup delalloc punch pass does not find cached data over that range and it can punch the extent out. IOWs, xfs/196 "works" for block size == page size with the new code. I say "works", because it actually only works for the case where IO is page aligned, and no data was read from disk before writes occur. Because the moment we actually read data first, the readahead code allocates multipage folios and suddenly the invalidate code goes back to zeroing subfolio ranges without changing dirty state. Hence, with multipage folios in play, block size == page size is functionally identical to block size < page size behaviour, and drop-writes is manifestly broken w.r.t to this case. Invalidation of a subfolio range doesn't result in the folio being removed from the cache, just the range gets zeroed. Hence after we've sequentially walked over a folio that we've dirtied (via write data) and then invalidated, we end up with a dirty folio full of zeroed data. And because the new code skips punching ranges that have dirty folios covering them, we end up leaving the delalloc range intact after failing all the writes. Hence failed writes now end up writing zeroes to disk in the cases where invalidation zeroes folios rather than removing them from cache. This is a fundamental change of behaviour that is needed to avoid the data corruption vectors that exist in the old write fail path, and it renders the drop-writes injection non-functional and unworkable as it stands. As it is, I think the error injection is also now unnecessary, as partial writes that need delalloc extent are going to be a lot more common with stale iomap detection in place. Hence this patch removes the drop-writes error injection completely. xfs/196 can remain for testing kernels that don't have this data corruption fix, but those that do will report: xfs/196 3s ... [not run] XFS error injection drop_writes unknown on this kernel. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_errortag.h | 12 +++++------- fs/xfs/xfs_error.c | 27 ++++++++++++++++++++------- fs/xfs/xfs_iomap.c | 9 --------- 3 files changed, 25 insertions(+), 23 deletions(-) commit 304a68b9c63bbfc1f6e159d68e8892fc54a06067 Author: Dave Chinner Date: Tue Nov 29 09:09:17 2022 +1100 xfs: use iomap_valid method to detect stale cached iomaps Now that iomap supports a mechanism to validate cached iomaps for buffered write operations, hook it up to the XFS buffered write ops so that we can avoid data corruptions that result from stale cached iomaps. See: https://lore.kernel.org/linux-xfs/20220817093627.GZ3600936@dread.disaster.area/ or the ->iomap_valid() introduction commit for exact details of the corruption vector. The validity cookie we store in the iomap is based on the type of iomap we return. It is expected that the iomap->flags we set in xfs_bmbt_to_iomap() is not perturbed by the iomap core and are returned to us in the iomap passed via the .iomap_valid() callback. This ensures that the validity cookie is always checking the correct inode fork sequence numbers to detect potential changes that affect the extent cached by the iomap. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 6 ++- fs/xfs/xfs_aops.c | 2 +- fs/xfs/xfs_iomap.c | 95 ++++++++++++++++++++++++++++++++++++++---------- fs/xfs/xfs_iomap.h | 5 ++- fs/xfs/xfs_pnfs.c | 6 ++- 5 files changed, 87 insertions(+), 27 deletions(-) commit d7b64041164ca177170191d2ad775da074ab2926 Author: Dave Chinner Date: Tue Nov 29 09:09:17 2022 +1100 iomap: write iomap validity checks A recent multithreaded write data corruption has been uncovered in the iomap write code. The core of the problem is partial folio writes can be flushed to disk while a new racing write can map it and fill the rest of the page: writeback new write allocate blocks blocks are unwritten submit IO ..... map blocks iomap indicates UNWRITTEN range loop { lock folio copyin data ..... IO completes runs unwritten extent conv blocks are marked written get next folio } Now add memory pressure such that memory reclaim evicts the partially written folio that has already been written to disk. When the new write finally gets to the last partial page of the new write, it does not find it in cache, so it instantiates a new page, sees the iomap is unwritten, and zeros the part of the page that it does not have data from. This overwrites the data on disk that was originally written. The full description of the corruption mechanism can be found here: https://lore.kernel.org/linux-xfs/20220817093627.GZ3600936@dread.disaster.area/ To solve this problem, we need to check whether the iomap is still valid after we lock each folio during the write. We have to do it after we lock the page so that we don't end up with state changes occurring while we wait for the folio to be locked. Hence we need a mechanism to be able to check that the cached iomap is still valid (similar to what we already do in buffered writeback), and we need a way for ->begin_write to back out and tell the high level iomap iterator that we need to remap the remaining write range. The iomap needs to grow some storage for the validity cookie that the filesystem provides to travel with the iomap. XFS, in particular, also needs to know some more information about what the iomap maps (attribute extents rather than file data extents) to for the validity cookie to cover all the types of iomaps we might need to validate. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/iomap/buffered-io.c | 29 ++++++++++++++++++++++++++++- fs/iomap/iter.c | 19 ++++++++++++++++++- include/linux/iomap.h | 43 +++++++++++++++++++++++++++++++++++-------- 3 files changed, 81 insertions(+), 10 deletions(-) commit 7348b322332d8602a4133f0b861334ea021b134a Author: Dave Chinner Date: Tue Nov 29 09:09:17 2022 +1100 xfs: xfs_bmap_punch_delalloc_range() should take a byte range All the callers of xfs_bmap_punch_delalloc_range() jump through hoops to convert a byte range to filesystem blocks before calling xfs_bmap_punch_delalloc_range(). Instead, pass the byte range to xfs_bmap_punch_delalloc_range() and have it do the conversion to filesystem blocks internally. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_aops.c | 16 ++++++---------- fs/xfs/xfs_bmap_util.c | 10 ++++++---- fs/xfs/xfs_bmap_util.h | 2 +- fs/xfs/xfs_iomap.c | 8 ++------ 4 files changed, 15 insertions(+), 21 deletions(-) commit f43dc4dc3eff028b5ddddd99f3a66c5a6bdd4e78 Author: Dave Chinner Date: Tue Nov 29 09:09:11 2022 +1100 iomap: buffered write failure should not truncate the page cache iomap_file_buffered_write_punch_delalloc() currently invalidates the page cache over the unused range of the delalloc extent that was allocated. While the write allocated the delalloc extent, it does not own it exclusively as the write does not hold any locks that prevent either writeback or mmap page faults from changing the state of either the page cache or the extent state backing this range. Whilst xfs_bmap_punch_delalloc_range() already handles races in extent conversion - it will only punch out delalloc extents and it ignores any other type of extent - the page cache truncate does not discriminate between data written by this write or some other task. As a result, truncating the page cache can result in data corruption if the write races with mmap modifications to the file over the same range. generic/346 exercises this workload, and if we randomly fail writes (as will happen when iomap gets stale iomap detection later in the patchset), it will randomly corrupt the file data because it removes data written by mmap() in the same page as the write() that failed. Hence we do not want to punch out the page cache over the range of the extent we failed to write to - what we actually need to do is detect the ranges that have dirty data in cache over them and *not punch them out*. To do this, we have to walk the page cache over the range of the delalloc extent we want to remove. This is made complex by the fact we have to handle partially up-to-date folios correctly and this can happen even when the FSB size == PAGE_SIZE because we now support multi-page folios in the page cache. Because we are only interested in discovering the edges of data ranges in the page cache (i.e. hole-data boundaries) we can make use of mapping_seek_hole_data() to find those transitions in the page cache. As we hold the invalidate_lock, we know that the boundaries are not going to change while we walk the range. This interface is also byte-based and is sub-page block aware, so we can find the data ranges in the cache based on byte offsets rather than page, folio or fs block sized chunks. This greatly simplifies the logic of finding dirty cached ranges in the page cache. Once we've identified a range that contains cached data, we can then iterate the range folio by folio. This allows us to determine if the data is dirty and hence perform the correct delalloc extent punching operations. The seek interface we use to iterate data ranges will give us sub-folio start/end granularity, so we may end up looking up the same folio multiple times as the seek interface iterates across each discontiguous data region in the folio. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/iomap/buffered-io.c | 195 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 180 insertions(+), 15 deletions(-) commit b6018af440a07bd0d74b58c4e18045f4a8dbfe6b Author: Tianjia Zhang Date: Fri Nov 25 20:18:40 2022 +0800 ima: Fix hash dependency to correct algorithm Commit d2825fa9365d ("crypto: sm3,sm4 - move into crypto directory") moves the SM3 and SM4 stand-alone library and the algorithm implementation for the Crypto API into the same directory, and the corresponding relationship of Kconfig is modified, CONFIG_CRYPTO_SM3/4 corresponds to the stand-alone library of SM3/4, and CONFIG_CRYPTO_SM3/4_GENERIC corresponds to the algorithm implementation for the Crypto API. Therefore, it is necessary for this module to depend on the correct algorithm. Fixes: d2825fa9365d ("crypto: sm3,sm4 - move into crypto directory") Cc: Jason A. Donenfeld Cc: stable@vger.kernel.org # v5.19+ Signed-off-by: Tianjia Zhang Signed-off-by: Mimi Zohar security/integrity/ima/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bded7af8b9af6e97514b0521004f90267905aef Author: Beau Belgrave Date: Wed Nov 23 10:32:48 2022 -0800 tracing/user_events: Fix call print_fmt leak If user_event_trace_register() fails within user_event_parse() the call's print_fmt member is not freed. Add kfree call to fix this. Link: https://lkml.kernel.org/r/20221123183248.554-1-beaub@linux.microsoft.com Fixes: aa3b2b4c6692 ("user_events: Add print_fmt generation support for basic types") Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_user.c | 1 + 1 file changed, 1 insertion(+) commit 8a47d228de6a4fd4c751142fb27d56f385b3fe41 Author: Yangtao Li Date: Thu Nov 24 00:44:02 2022 +0800 f2fs: introduce discard_urgent_util sysfs node Through this node, you can control the background discard to run more aggressively or not aggressively when reach the utilization rate of the space. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 8 ++++++++ fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 3 ++- fs/f2fs/sysfs.c | 9 +++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) commit 1cd2e6d544359ae13e6fd9029b6018b957cf08c3 Author: Yangtao Li Date: Thu Nov 24 00:44:01 2022 +0800 f2fs: define MIN_DISCARD_GRANULARITY macro Do cleanup in f2fs_tuning_parameters() and __init_discard_policy(), let's use macro instead of number. Suggested-by: Chao Yu Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 ++ fs/f2fs/segment.c | 4 ++-- fs/f2fs/super.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit 48c08c51f938d955dd8f5b8972bc29faa4c9556f Author: Yangtao Li Date: Fri Nov 18 11:46:00 2022 +0800 f2fs: init discard policy after thread wakeup Under the current logic, after the discard thread wakes up, it will not run according to the expected policy, but will use the expected policy before sleep. Move the strategy selection to after the thread wakes up, so that the running state of the thread meets expectations. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit e219aecfd4b766c4e878a3769057e9809f7fcadc Author: Yonggil Song Date: Tue Nov 22 18:03:20 2022 +0900 f2fs: avoid victim selection from previous victim section When f2fs chooses GC victim in large section & LFS mode, next_victim_seg[gc_type] is referenced first. After segment is freed, next_victim_seg[gc_type] has the next segment number. However, next_victim_seg[gc_type] still has the last segment number even after the last segment of section is freed. In this case, when f2fs chooses a victim for the next GC round, the last segment of previous victim section is chosen as a victim. Initialize next_victim_seg[gc_type] to NULL_SEGNO for the last segment in large section. Fixes: e3080b0120a1 ("f2fs: support subsectional garbage collection") Signed-off-by: Yonggil Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 78a99fe6254cad4be310cd84af39f6c46b668c72 Author: Chao Yu Date: Wed Nov 23 06:42:52 2022 +0800 f2fs: truncate blocks in batch in __complete_revoke_list() Use f2fs_do_truncate_blocks() to truncate all blocks in-batch in __complete_revoke_list(). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 620816393239890feff8608251e2746b1cc2cfa0 Author: Yangtao Li Date: Thu Nov 17 01:10:45 2022 +0800 f2fs: make __queue_discard_cmd() return void Since __queue_discard_cmd() never returns an error, let's make it return void. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit fc031877b8229ee2f56a2cc3868ca7f282b1231d Author: Yangtao Li Date: Sat Nov 19 01:40:28 2022 +0800 f2fs: fix description about discard_granularity node Let's fix the inconsistency in the text description. Default discard granularity is 16. For small devices, default value is 1. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b16bcaaf7a325f90967259a0b7cfcce4ff8c56ba Author: Sheng Yong Date: Fri Nov 11 18:08:30 2022 +0800 f2fs: move set_file_temperature into f2fs_new_inode Since the file name has already passed to f2fs_new_inode(), let's move set_file_temperature() into f2fs_new_inode(). Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 62 +++++++++++++++++++++++++++------------------------------ 1 file changed, 29 insertions(+), 33 deletions(-) commit 787caf1bdcd9f04058e4e8d8ed56db1dbafea0b7 Author: Sheng Yong Date: Fri Nov 11 18:08:29 2022 +0800 f2fs: fix to enable compress for newly created file if extension matches If compress_extension is set, and a newly created file matches the extension, the file could be marked as compression file. However, if inline_data is also enabled, there is no chance to check its extension since f2fs_should_compress() always returns false. This patch moves set_compress_inode(), which do extension check, in f2fs_should_compress() to check extensions before setting inline data flag. Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion") Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- fs/f2fs/namei.c | 329 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 164 insertions(+), 167 deletions(-) commit bc12ac98ea2e1b70adc6478c8b473a0003b659d3 Author: Zhang Yi Date: Wed Jun 29 19:26:46 2022 +0800 ext4: silence the warning when evicting inode with dioread_nolock When evicting an inode with default dioread_nolock, it could be raced by the unwritten extents converting kworker after writeback some new allocated dirty blocks. It convert unwritten extents to written, the extents could be merged to upper level and free extent blocks, so it could mark the inode dirty again even this inode has been marked I_FREEING. But the inode->i_io_list check and warning in ext4_evict_inode() missing this corner case. Fortunately, ext4_evict_inode() will wait all extents converting finished before this check, so it will not lead to inode use-after-free problem, every thing is OK besides this warning. The WARN_ON_ONCE was originally designed for finding inode use-after-free issues in advance, but if we add current dioread_nolock case in, it will become not quite useful, so fix this warning by just remove this check. ====== WARNING: CPU: 7 PID: 1092 at fs/ext4/inode.c:227 ext4_evict_inode+0x875/0xc60 ... RIP: 0010:ext4_evict_inode+0x875/0xc60 ... Call Trace: evict+0x11c/0x2b0 iput+0x236/0x3a0 do_unlinkat+0x1b4/0x490 __x64_sys_unlinkat+0x4c/0xb0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fa933c1115b ====== rm kworker ext4_end_io_end() vfs_unlink() ext4_unlink() ext4_convert_unwritten_io_end_vec() ext4_convert_unwritten_extents() ext4_map_blocks() ext4_ext_map_blocks() ext4_ext_try_to_merge_up() __mark_inode_dirty() check !I_FREEING locked_inode_to_wb_and_lock_list() iput() iput_final() evict() ext4_evict_inode() truncate_inode_pages_final() //wait release io_end inode_io_list_move_locked() ext4_release_io_end() trigger WARN_ON_ONCE() Cc: stable@kernel.org Fixes: ceff86fddae8 ("ext4: Avoid freeing inodes on dirty list") Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20220629112647.4141034-1-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4ff23a6547b81ca22adb852dfe93ee5fc45328ac Author: Sheng Yong Date: Thu Nov 17 23:10:54 2022 +0800 f2fs: set zstd compress level correctly Fixes: cf30f6a5f0c6 ("lib: zstd: Add kernel-specific API") Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Reviewed-by: Nick Terrell Signed-off-by: Jaegeuk Kim fs/f2fs/compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66aee5aaa237e5a3475581b462b8b22e0944d264 Author: Yuwei Guan Date: Tue Nov 15 14:35:37 2022 +0800 f2fs: change type for 'sbi->readdir_ra' Before this patch, the varibale 'readdir_ra' takes effect if it's equal to '1' or not, so we can change type for it from 'int' to 'bool'. Signed-off-by: Yuwei Guan Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 2 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/super.c | 2 +- fs/f2fs/sysfs.c | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) commit 777cd95b8066ced4e9a2534941b81f8ad98e74fb Author: Yuwei Guan Date: Tue Nov 15 14:35:36 2022 +0800 f2fs: cleanup for 'f2fs_tuning_parameters' function A cleanup patch for 'f2fs_tuning_parameters' function. Signed-off-by: Yuwei Guan Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b7ad23cec26a91a4f7c45ff7ff8e915f21ac5127 Author: Yuwei Guan Date: Tue Nov 15 14:35:35 2022 +0800 f2fs: fix to alloc_mode changed after remount on a small volume device The commit 84b89e5d943d8 ("f2fs: add auto tuning for small devices") add tuning for small volume device, now support to tune alloce_mode to 'reuse' if it's small size. But the alloc_mode will change to 'default' when do remount on this small size dievce. This patch fo fix alloc_mode changed when do remount for a small volume device. Signed-off-by: Yuwei Guan Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5b7b74b71c7fefbaa3e0ccc120c3cbd50b3fad86 Author: Yangtao Li Date: Sat Nov 12 00:13:49 2022 +0800 f2fs: remove submit label in __submit_discard_cmd() Complaint from Matthew Wilcox in another similar place: "submit? You don't submit anything at the 'submit' label. it should be called 'skip' or something. But I think this is just badly written and you don't need a goto at all." Let's remove submit label for readability. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d3b7b4afd6b2c344eabf9cc26b8bfa903c164c7c Author: Chao Yu Date: Tue Nov 15 00:08:47 2022 +0800 f2fs: fix to do sanity check on i_extra_isize in is_alive() syzbot found a f2fs bug: BUG: KASAN: slab-out-of-bounds in data_blkaddr fs/f2fs/f2fs.h:2891 [inline] BUG: KASAN: slab-out-of-bounds in is_alive fs/f2fs/gc.c:1117 [inline] BUG: KASAN: slab-out-of-bounds in gc_data_segment fs/f2fs/gc.c:1520 [inline] BUG: KASAN: slab-out-of-bounds in do_garbage_collect+0x386a/0x3df0 fs/f2fs/gc.c:1734 Read of size 4 at addr ffff888076557568 by task kworker/u4:3/52 CPU: 1 PID: 52 Comm: kworker/u4:3 Not tainted 6.1.0-rc4-syzkaller-00362-gfef7fd48922d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbb/0x1f0 mm/kasan/report.c:495 data_blkaddr fs/f2fs/f2fs.h:2891 [inline] is_alive fs/f2fs/gc.c:1117 [inline] gc_data_segment fs/f2fs/gc.c:1520 [inline] do_garbage_collect+0x386a/0x3df0 fs/f2fs/gc.c:1734 f2fs_gc+0x88c/0x20a0 fs/f2fs/gc.c:1831 f2fs_balance_fs+0x544/0x6b0 fs/f2fs/segment.c:410 f2fs_write_inode+0x57e/0xe20 fs/f2fs/inode.c:753 write_inode fs/fs-writeback.c:1440 [inline] __writeback_single_inode+0xcfc/0x1440 fs/fs-writeback.c:1652 writeback_sb_inodes+0x54d/0xf90 fs/fs-writeback.c:1870 wb_writeback+0x2c5/0xd70 fs/fs-writeback.c:2044 wb_do_writeback fs/fs-writeback.c:2187 [inline] wb_workfn+0x2dc/0x12f0 fs/fs-writeback.c:2227 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The root cause is that we forgot to do sanity check on .i_extra_isize in below path, result in accessing invalid address later, fix it. - gc_data_segment - is_alive - data_blkaddr - offset_in_addr Reported-by: syzbot+f8f3dfa4abc489e768a1@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-f2fs-devel/0000000000003cb3c405ed5c17f9@google.com/T/#u Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 41e8f85a75fc60e1543e4903428a1b481b672a17 Author: Daeho Jeong Date: Fri Nov 11 09:04:06 2022 -0800 f2fs: introduce F2FS_IOC_START_ATOMIC_REPLACE introduce a new ioctl to replace the whole content of a file atomically, which means it induces truncate and content update at the same time. We can start it with F2FS_IOC_START_ATOMIC_REPLACE and complete it with F2FS_IOC_COMMIT_ATOMIC_WRITE. Or abort it with F2FS_IOC_ABORT_ATOMIC_WRITE. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 3 +++ fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 21 +++++++++++++++------ fs/f2fs/segment.c | 13 ++++++++++++- include/uapi/linux/f2fs.h | 1 + 5 files changed, 32 insertions(+), 7 deletions(-) commit cf2fc8f8b2cbe7ca091fa6a1d6b3b6ec644d7651 Author: ye xingchen Date: Tue Nov 22 16:31:57 2022 +0800 pinctrl: qcom: 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/202211221631577017318@zte.com.cn Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm.c | 1 - drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 1 - drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 1 - 3 files changed, 3 deletions(-) commit e7d0040b4359815095a63e0297b8aa0ae8695b08 Merge: 6349c162b7dc eb78d3604d6b Author: Linus Walleij Date: Mon Nov 28 21:23:20 2022 +0100 Merge tag 'intel-pinctrl-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v6.2-2 * Enable PWM feature on Intel pin control IPs The following is an automated git shortlog grouped by driver: intel: - Enumerate PWM device when community has a capability pwm: - lpss: Rename pwm_lpss_probe() --> devm_pwm_lpss_probe() - lpss: Allow other drivers to enable PWM LPSS - lpss: Include headers we are the direct user of - lpss: Rename MAX_PWMS --> LPSS_MAX_PWMS - Add a stub for devm_pwmchip_add() commit 1e79a9e3ab96ecf8dbb8b6d237b3ae824bd79074 Merge: 29c46979b25d 99b63f55dc51 Author: Paolo Bonzini Date: Mon Nov 28 13:34:47 2022 -0500 Merge tag 'kvm-s390-next-6.2-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD - Second batch of the lazy destroy patches - First batch of KVM changes for kernel virtual != physical address support - Removal of a unused function commit 29c46979b25d5ca867e9859bfdd088d028739cdf Author: Jiaxi Chen Date: Fri Nov 25 20:58:45 2022 +0800 KVM: x86: Advertise PREFETCHIT0/1 CPUID to user space Latest Intel platform Granite Rapids has introduced a new instruction - PREFETCHIT0/1, which moves code to memory (cache) closer to the processor depending on specific hints. The bit definition: CPUID.(EAX=7,ECX=1):EDX[bit 14] PREFETCHIT0/1 is on a KVM-only subleaf. Plus an x86_FEATURE definition for this feature bit to direct it to the KVM entry. Advertise PREFETCHIT0/1 to KVM userspace. This is safe because there are no new VMX controls or additional host enabling required for guests to use this feature. Signed-off-by: Jiaxi Chen Message-Id: <20221125125845.1182922-9-jiaxi.chen@linux.intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/reverse_cpuid.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 9977f0877de7f8fc51391e2d52bc993efbd58b90 Author: Jiaxi Chen Date: Fri Nov 25 20:58:44 2022 +0800 KVM: x86: Advertise AVX-NE-CONVERT CPUID to user space AVX-NE-CONVERT is a new set of instructions which can convert low precision floating point like BF16/FP16 to high precision floating point FP32, and can also convert FP32 elements to BF16. This instruction allows the platform to have improved AI capabilities and better compatibility. The bit definition: CPUID.(EAX=7,ECX=1):EDX[bit 5] AVX-NE-CONVERT is on a KVM-only subleaf. Plus an x86_FEATURE definition for this feature bit to direct it to the KVM entry. Advertise AVX-NE-CONVERT to KVM userspace. This is safe because there are no new VMX controls or additional host enabling required for guests to use this feature. Signed-off-by: Jiaxi Chen Message-Id: <20221125125845.1182922-8-jiaxi.chen@linux.intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/reverse_cpuid.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 24d74b9f5f2a972ac9228372adeac62b2dc10ea2 Author: Jiaxi Chen Date: Fri Nov 25 20:58:43 2022 +0800 KVM: x86: Advertise AVX-VNNI-INT8 CPUID to user space AVX-VNNI-INT8 is a new set of instructions in the latest Intel platform Sierra Forest, aims for the platform to have superior AI capabilities. This instruction multiplies the individual bytes of two unsigned or unsigned source operands, then adds and accumulates the results into the destination dword element size operand. The bit definition: CPUID.(EAX=7,ECX=1):EDX[bit 4] AVX-VNNI-INT8 is on a new and sparse CPUID leaf and all bits on this leaf have no truly kernel use case for now. Given that and to save space for kernel feature bits, move this new leaf to KVM-only subleaf and plus an x86_FEATURE definition for AVX-VNNI-INT8 to direct it to the KVM entry. Advertise AVX-VNNI-INT8 to KVM userspace. This is safe because there are no new VMX controls or additional host enabling required for guests to use this feature. Signed-off-by: Jiaxi Chen Message-Id: <20221125125845.1182922-7-jiaxi.chen@linux.intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 6 +++++- arch/x86/kvm/reverse_cpuid.h | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 5e85c4ebf206e50c58e82ca44c15e2be2bac6923 Author: Jiaxi Chen Date: Fri Nov 25 20:58:42 2022 +0800 x86: KVM: Advertise AVX-IFMA CPUID to user space AVX-IFMA is a new instruction in the latest Intel platform Sierra Forest. This instruction packed multiplies unsigned 52-bit integers and adds the low/high 52-bit products to Qword Accumulators. The bit definition: CPUID.(EAX=7,ECX=1):EAX[bit 23] AVX-IFMA is on an expected-dense CPUID leaf and some other bits on this leaf have kernel usages. Given that, define this feature bit like X86_FEATURE_ in kernel. Considering AVX-IFMA itself has no truly kernel usages and /proc/cpuinfo has too much unreadable flags, hide this one in /proc/cpuinfo. Advertise AVX-IFMA to KVM userspace. This is safe because there are no new VMX controls or additional host enabling required for guests to use this feature. Signed-off-by: Jiaxi Chen Acked-by: Borislav Petkov Message-Id: <20221125125845.1182922-6-jiaxi.chen@linux.intel.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kvm/cpuid.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit af2872f6225476566bcbbd523a74dcaba29e159e Author: Chang S. Bae Date: Fri Nov 25 20:58:41 2022 +0800 x86: KVM: Advertise AMX-FP16 CPUID to user space Latest Intel platform Granite Rapids has introduced a new instruction - AMX-FP16, which performs dot-products of two FP16 tiles and accumulates the results into a packed single precision tile. AMX-FP16 adds FP16 capability and also allows a FP16 GPU trained model to run faster without loss of accuracy or added SW overhead. The bit definition: CPUID.(EAX=7,ECX=1):EAX[bit 21] AMX-FP16 is on an expected-dense CPUID leaf and some other bits on this leaf have kernel usages. Given that, define this feature bit like X86_FEATURE_ in kernel. Considering AMX-FP16 itself has no truly kernel usages and /proc/cpuinfo has too much unreadable flags, hide this one in /proc/cpuinfo. Advertise AMX-FP16 to KVM userspace. This is safe because there are no new VMX controls or additional host enabling required for guests to use this feature. Signed-off-by: Chang S. Bae Signed-off-by: Jiaxi Chen Acked-by: Borislav Petkov Message-Id: <20221125125845.1182922-5-jiaxi.chen@linux.intel.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kvm/cpuid.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 6a19d7aa5821522eec528fd44f24fe774b875377 Author: Jiaxi Chen Date: Fri Nov 25 20:58:40 2022 +0800 x86: KVM: Advertise CMPccXADD CPUID to user space CMPccXADD is a new set of instructions in the latest Intel platform Sierra Forest. This new instruction set includes a semaphore operation that can compare and add the operands if condition is met, which can improve database performance. The bit definition: CPUID.(EAX=7,ECX=1):EAX[bit 7] CMPccXADD is on an expected-dense CPUID leaf and some other bits on this leaf have kernel usages. Given that, define this feature bit like X86_FEATURE_ in kernel. Considering CMPccXADD itself has no truly kernel usages and /proc/cpuinfo has too much unreadable flags, hide this one in /proc/cpuinfo. Advertise CMPCCXADD to KVM userspace. This is safe because there are no new VMX controls or additional host enabling required for guests to use this feature. Signed-off-by: Jiaxi Chen Acked-by: Borislav Petkov Message-Id: <20221125125845.1182922-4-jiaxi.chen@linux.intel.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kvm/cpuid.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 047c7229906152fb85c23dc18fd25a00cd7cb4de Author: Sean Christopherson Date: Fri Nov 25 20:58:39 2022 +0800 KVM: x86: Update KVM-only leaf handling to allow for 100% KVM-only leafs Rename kvm_cpu_cap_init_scattered() to kvm_cpu_cap_init_kvm_defined() in anticipation of adding KVM-only CPUID leafs that aren't recognized by the kernel and thus not scattered, i.e. for leafs that are 100% KVM-defined. Adjust/add comments to kvm_only_cpuid_leafs and KVM_X86_FEATURE to document how to create new kvm_only_cpuid_leafs entries for scattered features as well as features that are entirely unknown to the kernel. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221125125845.1182922-3-jiaxi.chen@linux.intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 8 ++++---- arch/x86/kvm/reverse_cpuid.h | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) commit c4690d016182d271a862767145db8b2bc792f4a8 Author: Sean Christopherson Date: Fri Nov 25 20:58:38 2022 +0800 KVM: x86: Add BUILD_BUG_ON() to detect bad usage of "scattered" flags Add a compile-time assert in the SF() macro to detect improper usage, i.e. to detect passing in an X86_FEATURE_* flag that isn't actually scattered by the kernel. Upcoming feature flags will be 100% KVM-only and will have X86_FEATURE_* macros that point at a kvm_only_cpuid_leafs word, not a kernel-defined word. Using SF() and thus boot_cpu_has() for such feature flags would access memory beyond x86_capability[NCAPINTS] and at best incorrectly hide a feature, and at worst leak kernel state to userspace. Signed-off-by: Sean Christopherson Message-Id: <20221125125845.1182922-2-jiaxi.chen@linux.intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 7927e27549d3f02354233a9ab3f28e0080ede29b Author: David Woodhouse Date: Sat Nov 12 14:28:20 2022 +0000 MAINTAINERS: Add KVM x86/xen maintainer list Adding Paul as co-maintainer of Xen support to help ensure that things don't fall through the cracks when I spend three months at a time travelling... Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant Signed-off-by: Paolo Bonzini MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c3f3719952b9ab64e001e36df3d7bf24d5a4752d Author: David Woodhouse Date: Mon Nov 14 12:48:57 2022 -0800 KVM: x86/xen: Add CPL to Xen hypercall tracepoint Signed-off-by: David Woodhouse Signed-off-by: Paolo Bonzini arch/x86/kvm/trace.h | 15 +++++++++------ arch/x86/kvm/xen.c | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) commit 3ca9d84e722e8044c09e80992aa7b15bd904d3ce Author: Paolo Bonzini Date: Wed Nov 23 19:40:01 2022 -0500 KVM: always declare prototype for kvm_arch_irqchip_in_kernel Architecture code might want to use it even if CONFIG_HAVE_KVM_IRQ_ROUTING is false; for example PPC XICS has KVM_IRQ_LINE and wants to use kvm_arch_irqchip_in_kernel from there, but it does not have KVM_SET_GSI_ROUTING so the prototype was not provided. Fixes: d663b8a28598 ("KVM: replace direct irq.h inclusion") Reported-by: kernel test robot Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c767c34740132ffc478226864a7461493cdc2413 Author: Jilin Yuan Date: Wed Oct 19 20:49:53 2022 +0800 coresight: etm4x: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20221019124953.45885-1-yuanjilin@cdjrlc.com drivers/hwtracing/coresight/coresight-etm4x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3dc228b35387803d9c43ed1b098aabb1d3ae9c7d Author: Mike Leach Date: Wed Nov 23 19:38:18 2022 +0000 coresight: cti: Fix null pointer error on CTI init before ETM When CTI is discovered first then the function coresight_set_assoc_ectdev_mutex() is called to set the association between CTI and ETM device. Recent lockdep fix passes a null pointer. This patch passes the correct pointer. Before patch: log of boot oops sequence with CTI discovered first: [ 12.424091] cs_system_cfg: CoreSight Configuration manager initialised [ 12.483474] coresight cti_sys0: CTI initialized [ 12.488109] coresight cti_sys1: CTI initialized [ 12.503594] coresight cti_cpu0: CTI initialized [ 12.517877] coresight-cpu-debug 850000.debug: Coresight debug-CPU0 initialized [ 12.523479] coresight-cpu-debug 852000.debug: Coresight debug-CPU1 initialized [ 12.529926] coresight-cpu-debug 854000.debug: Coresight debug-CPU2 initialized [ 12.541808] coresight stm0: STM32 initialized [ 12.544421] coresight-cpu-debug 856000.debug: Coresight debug-CPU3 initialized [ 12.585639] coresight cti_cpu1: CTI initialized [ 12.614028] coresight cti_cpu2: CTI initialized [ 12.631679] CSCFG registered etm0 [ 12.633920] coresight etm0: CPU0: etm v4.0 initialized [ 12.656392] coresight cti_cpu3: CTI initialized ... [ 12.708383] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000348 ... [ 12.755094] Internal error: Oops: 0000000096000044 [#1] SMP [ 12.761817] Modules linked in: coresight_etm4x(+) coresight_tmc coresight_cpu_debug coresight_replicator coresight_funnel coresight_cti coresight_tpiu coresight_stm coresight [ 12.767210] CPU: 3 PID: 1346 Comm: systemd-udevd Not tainted 6.1.0-rc3tid-v6tid-v6-235166-gf7f7d7a2204a-dirty #498 [ 12.782827] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) [ 12.793154] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 12.800010] pc : coresight_set_assoc_ectdev_mutex+0x30/0x50 [coresight] [ 12.806694] lr : coresight_set_assoc_ectdev_mutex+0x30/0x50 [coresight] ... [ 12.885064] Call trace: [ 12.892352] coresight_set_assoc_ectdev_mutex+0x30/0x50 [coresight] [ 12.894693] cti_add_assoc_to_csdev+0x144/0x1b0 [coresight_cti] [ 12.900943] coresight_register+0x2c8/0x320 [coresight] [ 12.906844] etm4_add_coresight_dev.isra.27+0x148/0x280 [coresight_etm4x] [ 12.912056] etm4_probe+0x144/0x1c0 [coresight_etm4x] [ 12.918998] etm4_probe_amba+0x40/0x78 [coresight_etm4x] [ 12.924032] amba_probe+0x11c/0x1f0 After patch: similar log [ 12.444467] cs_system_cfg: CoreSight Configuration manager initialised [ 12.456329] coresight-cpu-debug 850000.debug: Coresight debug-CPU0 initialized [ 12.456754] coresight-cpu-debug 852000.debug: Coresight debug-CPU1 initialized [ 12.469672] coresight-cpu-debug 854000.debug: Coresight debug-CPU2 initialized [ 12.476098] coresight-cpu-debug 856000.debug: Coresight debug-CPU3 initialized [ 12.532409] coresight stm0: STM32 initialized [ 12.533708] coresight cti_sys0: CTI initialized [ 12.539478] coresight cti_sys1: CTI initialized [ 12.550106] coresight cti_cpu0: CTI initialized [ 12.633931] coresight cti_cpu1: CTI initialized [ 12.634664] coresight cti_cpu2: CTI initialized [ 12.638090] coresight cti_cpu3: CTI initialized [ 12.721136] CSCFG registered etm0 ... [ 12.762643] CSCFG registered etm1 [ 12.762666] coresight etm1: CPU1: etm v4.0 initialized [ 12.776258] CSCFG registered etm2 [ 12.776282] coresight etm2: CPU2: etm v4.0 initialized [ 12.784357] CSCFG registered etm3 [ 12.785455] coresight etm3: CPU3: etm v4.0 initialized Error can also be triggered by manually starting the modules using modprobe in the following order: root@linaro-developer:/home/linaro/cs-mods# modprobe coresight root@linaro-developer:/home/linaro/cs-mods# modprobe coresight-cti root@linaro-developer:/home/linaro/cs-mods# modprobe coresight-etm4x Tested on Dragonboard DB410c Applies to coresight/next Fixes: 23722fb46725 ("coresight: Fix possible deadlock with lock dependency") Signed-off-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20221123193818.6253-1-mike.leach@linaro.org drivers/hwtracing/coresight/coresight-cti-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20ee8c223f792947378196307d8e707c9cdc2d61 Author: Yang Shen Date: Tue Nov 22 17:03:55 2022 +0800 coresight: trbe: remove cpuhp instance node before remove cpuhp state cpuhp_state_add_instance() and cpuhp_state_remove_instance() should be used in pairs. Or there will lead to the warn on cpuhp_remove_multi_state() since the cpuhp_step list is not empty. The following is the error log with 'rmmod coresight-trbe': Error: Removing state 215 which has instances left. Call trace: __cpuhp_remove_state_cpuslocked+0x144/0x160 __cpuhp_remove_state+0xac/0x100 arm_trbe_device_remove+0x2c/0x60 [coresight_trbe] platform_remove+0x34/0x70 device_remove+0x54/0x90 device_release_driver_internal+0x1e4/0x250 driver_detach+0x5c/0xb0 bus_remove_driver+0x64/0xc0 driver_unregister+0x3c/0x70 platform_driver_unregister+0x20/0x30 arm_trbe_exit+0x1c/0x658 [coresight_trbe] __arm64_sys_delete_module+0x1ac/0x24c invoke_syscall+0x50/0x120 el0_svc_common.constprop.0+0x58/0x1a0 do_el0_svc+0x38/0xd0 el0_svc+0x2c/0xc0 el0t_64_sync_handler+0x1ac/0x1b0 el0t_64_sync+0x19c/0x1a0 ---[ end trace 0000000000000000 ]--- Fixes: 3fbf7f011f24 ("coresight: sink: Add TRBE driver") Reviewed-by: Anshuman Khandual Signed-off-by: Yang Shen Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20221122090355.23533-1-shenyang39@huawei.com drivers/hwtracing/coresight/coresight-trbe.c | 1 + 1 file changed, 1 insertion(+) commit 449ef8fb9d3591a16fc0d090dc5f043c5edb077a Merge: 6e6df27064aa fd5ac974fc25 Author: Greg Kroah-Hartman Date: Mon Nov 28 19:17:56 2022 +0100 Merge tag 'counter-fixes-for-6.1b' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next William writes: Second set of Counter fixes for 6.1 One change for stm32-lptimer-cnt fixing a check on arr and cmp registers update to ensure both registers are properly written before ending the loop. * tag 'counter-fixes-for-6.1b' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update commit 4ef339bc053a62dac9017f80f7bb8cff0412bd29 Author: Andy Shevchenko Date: Wed Nov 16 16:17:28 2022 +0200 gpiolib: Unify access to the device properties Some of the functions are using struct fwnode_handle, some struct device pointer. In the GPIO library the firmware node of the GPIO device is the same as GPIO node of the GPIO chip. Due to this fact we may use former to access properties everywhere in the code. Signed-off-by: Andy Shevchenko Reviewed-by: Brian Masney Tested-by: Marijn Suijten [Bartosz: stick to the 80-char limit where it's not hurting readability] Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 923d011febb4e2fb338036bb0ee6a0a7f9b10da1 Author: Christophe JAILLET Date: Sun Nov 27 22:52:10 2022 +0100 gpio: Do not include when not really needed. is included only for using container_of(). Include instead, it is much lighter. Signed-off-by: Christophe JAILLET Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski include/linux/of_gpio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8214118589881b2d390284410c5ff275e7a5e03c Author: Jeff Layton Date: Wed Nov 2 14:44:48 2022 -0400 nfsd: reorganize filecache.c In a coming patch, we're going to rework how the filecache refcounting works. Move some code around in the function to reduce the churn in the later patches, and rename some of the functions with (hopefully) clearer names: nfsd_file_flush becomes nfsd_file_fsync, and nfsd_file_unhash_and_dispose is renamed to nfsd_file_unhash_and_queue. Also, the nfsd_file_put_final tracepoint is renamed to nfsd_file_free, to better match the name of the function from which it's called. Signed-off-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 111 ++++++++++++++++++++++++++-------------------------- fs/nfsd/trace.h | 4 +- 2 files changed, 58 insertions(+), 57 deletions(-) commit 1f696e230ea5198e393368b319eb55651828d687 Author: Jeff Layton Date: Wed Nov 2 14:44:47 2022 -0400 nfsd: remove the pages_flushed statistic from filecache We're counting mapping->nrpages, but not all of those are necessarily dirty. We don't really have a simple way to count just the dirty pages, so just remove this stat since it's not accurate. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 296f3d7f419e02d676761aff06502fa005e13b52 Author: Chuck Lever Date: Mon Oct 31 10:01:30 2022 -0400 MAINTAINERS: NFSD should be responsible for fs/exportfs We recently received a patch for fs/exportfs/expfs.c, but there isn't a subsystem maintainer listed for fs/exportfs: Christian Brauner (commit_signer:2/2=100%,authored:1/2=50%,added_lines:3/6=50%,removed_lines:2/6=33%) Al Viro (commit_signer:1/2=50%,authored:1/2=50%,added_lines:3/6=50%,removed_lines:4/6=67%) Miklos Szeredi (commit_signer:1/2=50%) Amir Goldstein (commit_signer:1/2=50%) linux-kernel@vger.kernel.org (open list) Neil says: > Looking at recent commits, patches come in through multiple > different trees. > nfsd certainly has an interest in expfs.c. The only other user is > name_to_handle/open_by_handle API. > I see it as primarily nfsd functionality which is useful enough to > be exported directly to user-space. > (It was created by me when I was nfsd maintainer - does that > count?) Suggested-by: Neil Brown Signed-off-by: Chuck Lever Acked-by: Jeff Layton MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 3f054211b29c0fa06dfdcab402c795fd7e906be1 Author: Chuck Lever Date: Mon Oct 31 09:53:26 2022 -0400 NFSD: Fix licensing header in filecache.c Add a missing SPDX header. Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton fs/nfsd/filecache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d47b295e8d76a4d69f0e2ea0cd8a79c9d3488280 Author: Chuck Lever Date: Fri Oct 28 10:47:53 2022 -0400 NFSD: Use rhashtable for managing nfs4_file objects fh_match() is costly, especially when filehandles are large (as is the case for NFSv4). It needs to be used sparingly when searching data structures. Unfortunately, with common workloads, I see multiple thousands of objects stored in file_hashtbl[], which has just 256 buckets, making its bucket hash chains quite lengthy. Walking long hash chains with the state_lock held blocks other activity that needs that lock. Sizable hash chains are a common occurrance once the server has handed out some delegations, for example -- IIUC, each delegated file is held open on the server by an nfs4_file object. To help mitigate the cost of searching with fh_match(), replace the nfs4_file hash table with an rhashtable, which can dynamically resize its bucket array to minimize hash chain length. The result of this modification is an improvement in the latency of NFSv4 operations, and the reduction of nfsd CPU utilization due to eliminating the cost of multiple calls to fh_match() and reducing the CPU cache misses incurred while walking long hash chains in the nfs4_file hash table. Signed-off-by: Chuck Lever Reviewed-by: NeilBrown Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 97 ++++++++++++++++++++++++++++++++++------------------- fs/nfsd/state.h | 5 +-- 2 files changed, 63 insertions(+), 39 deletions(-) commit 15424748001a9b5ea62b3e6ad45f0a8b27f01df9 Author: Chuck Lever Date: Fri Oct 28 10:47:47 2022 -0400 NFSD: Refactor find_file() find_file() is now the only caller of find_file_locked(), so just fold these two together. Signed-off-by: Chuck Lever Reviewed-by: NeilBrown Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) commit 9270fc514ba7d415636b23bcb937573a1ce54f6a Author: Chuck Lever Date: Fri Oct 28 10:47:41 2022 -0400 NFSD: Clean up find_or_add_file() Remove the call to find_file_locked() in insert_nfs4_file(). Tracing shows that over 99% of these calls return NULL. Thus it is not worth the expense of the extra bucket list traversal. insert_file() already deals correctly with the case where the item is already in the hash bucket. Since nfsd4_file_hash_insert() is now just a wrapper around insert_file(), move the meat of insert_file() into nfsd4_file_hash_insert() and get rid of it. Signed-off-by: Chuck Lever Reviewed-by: NeilBrown fs/nfsd/nfs4state.c | 64 +++++++++++++++++++++++------------------------------ 1 file changed, 28 insertions(+), 36 deletions(-) commit 3341678f2fd6106055cead09e513fad6950a0d19 Author: Chuck Lever Date: Fri Oct 28 10:47:34 2022 -0400 NFSD: Add a nfsd4_file_hash_remove() helper Refactor to relocate hash deletion operation to a helper function that is close to most other nfs4_file data structure operations. The "noinline" annotation will become useful in a moment when the hlist_del_rcu() is replaced with a more complex rhash remove operation. It also guarantees that hash remove operations can be traced with "-p function -l remove_nfs4_file_locked". This also simplifies the organization of forward declarations: the to-be-added rhashtable and its param structure will be defined /after/ put_nfs4_file(). Signed-off-by: Chuck Lever Reviewed-by: NeilBrown Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 81a21fa3e7fdecb3c5b97014f0fc5a17d5806cae Author: Chuck Lever Date: Fri Oct 28 10:47:28 2022 -0400 NFSD: Clean up nfsd4_init_file() Name this function more consistently. I'm going to use nfsd4_file_ and nfsd4_file_hash_ for these helpers. Change the @fh parameter to be const pointer for better type safety. Finally, move the hash insertion operation to the caller. This is typical for most other "init_object" type helpers, and it is where most of the other nfs4_file hash table operations are located. Signed-off-by: Chuck Lever Reviewed-by: NeilBrown Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 3fe828caddd81e68e9d29353c6e9285a658ca056 Author: Chuck Lever Date: Fri Oct 28 10:47:22 2022 -0400 NFSD: Update file_hashtbl() helpers Enable callers to use const pointers for type safety. Signed-off-by: Chuck Lever Reviewed-by: NeilBrown Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b48f8056c034f28dd54668399f1d22be421b0bef Author: Chuck Lever Date: Fri Oct 28 10:47:16 2022 -0400 NFSD: Use const pointers as parameters to fh_ helpers Enable callers to use const pointers where they are able to. Signed-off-by: Chuck Lever Tested-by: Jeff Layton Reviewed-by: Jeff Layton Reviewed-by: NeilBrown fs/nfsd/nfsfh.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a1c74569bbde91299f24535abf711be5c84df9de Author: Chuck Lever Date: Fri Oct 28 10:47:09 2022 -0400 NFSD: Trace delegation revocations Delegation revocation is an exceptional event that is not otherwise visible externally (eg, no network traffic is emitted). Generate a trace record when it occurs so that revocation can be observed or other activity can be triggered. Example: nfsd-1104 [005] 1912.002544: nfsd_stid_revoke: client 633c9343:4e82788d stateid 00000003:00000001 ref=2 type=DELEG Trace infrastructure is provided for subsequent additional tracing related to nfs4_stid activity. Signed-off-by: Chuck Lever Tested-by: Jeff Layton Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 2 ++ fs/nfsd/trace.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) commit 20eee313ff4b8a7e71ae9560f5c4ba27cd763005 Author: Chuck Lever Date: Fri Oct 28 10:47:03 2022 -0400 NFSD: Trace stateids returned via DELEGRETURN Handing out a delegation stateid is recorded with the nfsd_deleg_read tracepoint, but there isn't a matching tracepoint for recording when the stateid is returned. Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton fs/nfsd/nfs4state.c | 1 + fs/nfsd/trace.h | 1 + 2 files changed, 2 insertions(+) commit eeff73f7c1c583f79a401284f46c619294859310 Author: Chuck Lever Date: Fri Oct 28 10:46:57 2022 -0400 NFSD: Clean up nfs4_preprocess_stateid_op() call sites Remove the lame-duck dprintk()s around nfs4_preprocess_stateid_op() call sites. Signed-off-by: Chuck Lever Tested-by: Jeff Layton Reviewed-by: Jeff Layton Reviewed-by: NeilBrown fs/nfsd/nfs4proc.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) commit b3276c1f5b268ff56622e9e125b792b4c3dc03ac Author: Chuck Lever Date: Tue Nov 1 13:30:46 2022 -0400 NFSD: Flesh out a documenting comment for filecache.c Record what we've learned recently about the NFSD filecache in a documenting comment so our future selves don't forget what all this is for. Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton fs/nfsd/filecache.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 4d1ea8455716ca070e3cd85767e6f6a562a58b1b Author: Chuck Lever Date: Fri Oct 28 10:46:51 2022 -0400 NFSD: Add an NFSD_FILE_GC flag to enable nfsd_file garbage collection NFSv4 operations manage the lifetime of nfsd_file items they use by means of NFSv4 OPEN and CLOSE. Hence there's no need for them to be garbage collected. Introduce a mechanism to enable garbage collection for nfsd_file items used only by NFSv2/3 callers. Note that the change in nfsd_file_put() ensures that both CLOSE and DELEGRETURN will actually close out and free an nfsd_file on last reference of a non-garbage-collected file. Link: https://bugzilla.linux-nfs.org/show_bug.cgi?id=394 Suggested-by: Trond Myklebust Signed-off-by: Chuck Lever Tested-by: Jeff Layton Reviewed-by: NeilBrown Reviewed-by: Jeff Layton fs/nfsd/filecache.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++------- fs/nfsd/filecache.h | 3 +++ fs/nfsd/nfs3proc.c | 4 ++-- fs/nfsd/trace.h | 3 ++- fs/nfsd/vfs.c | 4 ++-- 5 files changed, 64 insertions(+), 13 deletions(-) commit dcf3f80965ca787c70def402cdf1553c93c75529 Author: Chuck Lever Date: Fri Oct 28 10:46:44 2022 -0400 NFSD: Revert "NFSD: NFSv4 CLOSE should release an nfsd_file immediately" This reverts commit 5e138c4a750dc140d881dab4a8804b094bbc08d2. That commit attempted to make files available to other users as soon as all NFSv4 clients were done with them, rather than waiting until the filecache LRU had garbage collected them. It gets the reference counting wrong, for one thing. But it also misses that DELEGRETURN should release a file in the same fashion. In fact, any nfsd_file_put() on an file held open by an NFSv4 client needs potentially to release the file immediately... Clear the way for implementing that idea. Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton Reviewed-by: NeilBrown fs/nfsd/filecache.c | 18 ------------------ fs/nfsd/filecache.h | 1 - fs/nfsd/nfs4state.c | 4 ++-- 3 files changed, 2 insertions(+), 21 deletions(-) commit c252849082ff525af18b4f253b3c9ece94e951ed Author: Chuck Lever Date: Fri Oct 28 10:46:38 2022 -0400 NFSD: Pass the target nfsd_file to nfsd_commit() In a moment I'm going to introduce separate nfsd_file types, one of which is garbage-collected; the other, not. The garbage-collected variety is to be used by NFSv2 and v3, and the non-garbage-collected variety is to be used by NFSv4. nfsd_commit() is invoked by both NFSv3 and NFSv4 consumers. We want nfsd_commit() to find and use the correct variety of cached nfsd_file object for the NFS version that is in use. Signed-off-by: Chuck Lever Tested-by: Jeff Layton Reviewed-by: Jeff Layton Reviewed-by: NeilBrown fs/nfsd/nfs3proc.c | 10 +++++++++- fs/nfsd/nfs4proc.c | 11 ++++++++++- fs/nfsd/vfs.c | 15 ++++----------- fs/nfsd/vfs.h | 3 ++- 4 files changed, 25 insertions(+), 14 deletions(-) commit e0aa651068bfd520afcd357af8ecd2de005fc83d Author: Jeff Layton Date: Fri Oct 28 08:13:53 2022 -0400 nfsd: don't call nfsd_file_put from client states seqfile display We had a report of this: BUG: sleeping function called from invalid context at fs/nfsd/filecache.c:440 ...with a stack trace showing nfsd_file_put being called from nfs4_show_open. This code has always tried to call fput while holding a spinlock, but we recently changed this to use the filecache, and that started triggering the might_sleep() in nfsd_file_put. states_start takes and holds the cl_lock while iterating over the client's states, and we can't sleep with that held. Have the various nfs4_show_* functions instead hold the fi_lock instead of taking a nfsd_file reference. Fixes: 78599c42ae3c ("nfsd4: add file to display list of client's opens") Link: https://bugzilla.redhat.com/show_bug.cgi?id=2138357 Reported-by: Zhi Li Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 51 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 18 deletions(-) commit 427505ffeaa464f683faba945a88d3e3248f6979 Author: David Disseldorp Date: Fri Oct 21 14:24:14 2022 +0200 exportfs: use pr_debug for unreachable debug statements expfs.c has a bunch of dprintk statements which are unusable due to: #define dprintk(fmt, args...) do{}while(0) Use pr_debug so that they can be enabled dynamically. Also make some minor changes to the debug statements to fix some incorrect types, and remove __func__ which can be handled by dynamic debug separately. Signed-off-by: David Disseldorp Reviewed-by: NeilBrown Signed-off-by: Chuck Lever fs/exportfs/expfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2f3a4b2ac2f28b9be78ad21f401f31e263845214 Author: Jeff Layton Date: Tue Oct 18 07:47:56 2022 -0400 nfsd: allow disabling NFSv2 at compile time rpc.nfsd stopped supporting NFSv2 a year ago. Take the next logical step toward deprecating it and allow NFSv2 support to be compiled out. Add a new CONFIG_NFSD_V2 option that can be turned off and rework the CONFIG_NFSD_V?_ACL option dependencies. Add a description that discourages enabling it. Also, change the description of CONFIG_NFSD to state that the always-on version is now 3 instead of 2. Finally, add an #ifdef around "case 2:" in __write_versions. When NFSv2 is disabled at compile time, this should make the kernel ignore attempts to disable it at runtime, but still error out when trying to enable it. Signed-off-by: Jeff Layton Reviewed-by: Tom Talpey Signed-off-by: Chuck Lever fs/nfsd/Kconfig | 19 +++++++++++++++---- fs/nfsd/Makefile | 5 +++-- fs/nfsd/nfsctl.c | 2 ++ fs/nfsd/nfsd.h | 3 +-- fs/nfsd/nfssvc.c | 6 ++++++ 5 files changed, 27 insertions(+), 8 deletions(-) commit cb12fae1c34b1fa7eaae92c5aadc72d86d7fae19 Author: Jeff Layton Date: Tue Oct 18 07:47:55 2022 -0400 nfsd: move nfserrno() to vfs.c nfserrno() is common to all nfs versions, but nfsproc.c is specifically for NFSv2. Move it to vfs.c, and the prototype to vfs.h. While we're in here, remove the #ifdef EDQUOT check in this function. It's apparently a holdover from the initial merge of the nfsd code in 1997. No other place in the kernel checks that that symbol is defined before using it, so I think we can dispense with it here. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/blocklayout.c | 1 + fs/nfsd/blocklayoutxdr.c | 1 + fs/nfsd/export.h | 1 - fs/nfsd/flexfilelayout.c | 1 + fs/nfsd/nfs4idmap.c | 1 + fs/nfsd/nfsproc.c | 62 ----------------------------------------------- fs/nfsd/vfs.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/nfsd/vfs.h | 1 + 8 files changed, 68 insertions(+), 63 deletions(-) commit 8e823bafff2308753d430566256c83d8085952da Author: Jeff Layton Date: Tue Oct 18 07:47:54 2022 -0400 nfsd: ignore requests to disable unsupported versions The kernel currently errors out if you attempt to enable or disable a version that it doesn't recognize. Change it to ignore attempts to disable an unrecognized version. If we don't support it, then there is no harm in doing so. Signed-off-by: Jeff Layton Reviewed-by: Tom Talpey Signed-off-by: Chuck Lever fs/nfsd/nfsctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 841fd0a3cb490eae5dfd262eccb8c8b11d57f8b8 Author: Chuck Lever Date: Sun Oct 16 11:47:08 2022 -0400 NFSD: Finish converting the NFSv3 GETACL result encoder For some reason, the NFSv2 GETACL result encoder was fully converted to use the new nfs_stream_encode_acl(), but the NFSv3 equivalent was not similarly converted. Fixes: 20798dfe249a ("NFSD: Update the NFSv3 GETACL result encoder to use struct xdr_stream") Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs3acl.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) commit ea5021e911d3479346a75ac9b7d9dcd751b0fb99 Author: Chuck Lever Date: Sun Oct 16 11:47:02 2022 -0400 NFSD: Finish converting the NFSv2 GETACL result encoder The xdr_stream conversion inadvertently left some code that set the page_len of the send buffer. The XDR stream encoders should handle this automatically now. This oversight adds garbage past the end of the Reply message. Clients typically ignore the garbage, but NFSD does not need to send it, as it leaks stale memory contents onto the wire. Fixes: f8cba47344f7 ("NFSD: Update the NFSv2 GETACL result encoder to use struct xdr_stream") Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs2acl.c | 10 ---------- 1 file changed, 10 deletions(-) commit 5a717a6e0145481ea4c188d8be2d6217cefed270 Author: Chuck Lever Date: Sun Oct 16 11:46:56 2022 -0400 SUNRPC: Remove unused svc_rqst::rq_lock field Clean up after commit 22700f3c6df5 ("SUNRPC: Improve ordering of transport processing"). Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever include/linux/sunrpc/svc.h | 1 - net/sunrpc/svc.c | 1 - 2 files changed, 2 deletions(-) commit 69eed23baf877bbb1f14d7f4df54f89807c9ee2a Author: Colin Ian King Date: Mon Oct 10 21:24:23 2022 +0100 NFSD: Remove redundant assignment to variable host_err Variable host_err is assigned a value that is never read, it is being re-assigned a value in every different execution path in the following switch statement. The assignment is redundant and can be removed. Cleans up clang-scan warning: warning: Value stored to 'host_err' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/vfs.c | 1 - 1 file changed, 1 deletion(-) commit eeadcb75794516839078c28b3730132aeb700ce6 Author: Anna Schumaker Date: Tue Sep 13 14:01:51 2022 -0400 NFSD: Simplify READ_PLUS Chuck had suggested reverting READ_PLUS so it returns a single DATA segment covering the requested read range. This prepares the server for a future "sparse read" function so support can easily be added without needing to rip out the old READ_PLUS code at the same time. Signed-off-by: Anna Schumaker Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 139 +++++++++++++----------------------------------------- 1 file changed, 32 insertions(+), 107 deletions(-) commit 9c8921555907f4d723f01ed2d859b66f2d14f08e Author: Yang Yingliang Date: Mon Nov 28 14:55:12 2022 +0800 EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper() As the comment of pci_get_domain_bus_and_slot() says, it returns a PCI device with refcount incremented, so it doesn't need to call an extra pci_dev_get() in pci_get_dev_wrapper(), and the PCI device needs to be put in the error path. Fixes: d4dc89d069aa ("EDAC, i10nm: Add a driver for Intel 10nm server processors") Signed-off-by: Yang Yingliang Reviewed-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20221128065512.3572550-1-yangyingliang@huawei.com drivers/edac/i10nm_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9d1566e1f36b5167731372d2dfea97dbb4c43edf Merge: 907140462eb5 b7b275e60bcd Author: Greg Kroah-Hartman Date: Mon Nov 28 17:56:10 2022 +0100 Merge 6.1-rc7 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 02228f6aa6a64d588bc31e3267d05ff184d772eb Author: Ricardo Ribalda Date: Sun Nov 27 22:06:02 2022 +0100 regulator: da9211: Use irq handler when ready If the system does not come from reset (like when it is kexec()), the regulator might have an IRQ waiting for us. If we enable the IRQ handler before its structures are ready, we crash. This patch fixes: [ 1.141839] Unable to handle kernel read from unreadable memory at virtual address 0000000000000078 [ 1.316096] Call trace: [ 1.316101] blocking_notifier_call_chain+0x20/0xa8 [ 1.322757] cpu cpu0: dummy supplies not allowed for exclusive requests [ 1.327823] regulator_notifier_call_chain+0x1c/0x2c [ 1.327825] da9211_irq_handler+0x68/0xf8 [ 1.327829] irq_thread+0x11c/0x234 [ 1.327833] kthread+0x13c/0x154 Signed-off-by: Ricardo Ribalda Reviewed-by: Adam Ward Link: https://lore.kernel.org/r/20221124-da9211-v2-0-1779e3c5d491@chromium.org Signed-off-by: Mark Brown drivers/regulator/da9211-regulator.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit fea858dc5d901626e5d794037b5bff9f59b9ded7 Author: Nuno Das Neves Date: Thu Nov 17 12:11:39 2022 -0800 iommu/hyper-v: Allow hyperv irq remapping without x2apic If x2apic is not available, hyperv-iommu skips remapping irqs. This breaks root partition which always needs irqs remapped. Fix this by allowing irq remapping regardless of x2apic, and change hyperv_enable_irq_remapping() to return IRQ_REMAP_XAPIC_MODE in case x2apic is missing. Tested with root and non-root hyperv partitions. Signed-off-by: Nuno Das Neves Reviewed-by: Tianyu Lan Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1668715899-8971-1-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu arch/x86/kernel/cpu/mshyperv.c | 6 ++++++ drivers/iommu/Kconfig | 6 +++--- drivers/iommu/hyperv-iommu.c | 11 ++++++++--- 3 files changed, 17 insertions(+), 6 deletions(-) commit 0408f16b43e578e70ad12a857159a0a771cfaa7c Author: Stanislav Kinsburskiy Date: Fri Nov 4 20:40:55 2022 +0000 clocksource: hyper-v: Add TSC page support for root partition Microsoft Hypervisor root partition has to map the TSC page specified by the hypervisor, instead of providing the page to the hypervisor like it's done in the guest partitions. However, it's too early to map the page when the clock is initialized, so, the actual mapping is happening later. Signed-off-by: Stanislav Kinsburskiy CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Wei Liu CC: Dexuan Cui CC: Thomas Gleixner CC: Ingo Molnar CC: Borislav Petkov CC: Dave Hansen CC: x86@kernel.org CC: "H. Peter Anvin" CC: Daniel Lezcano CC: linux-hyperv@vger.kernel.org CC: linux-kernel@vger.kernel.org Reviewed-by: Michael Kelley Reviewed-by: Anirudh Rayabharam Link: https://lore.kernel.org/r/166759443644.385891.15921594265843430260.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net Signed-off-by: Wei Liu arch/x86/hyperv/hv_init.c | 2 ++ drivers/clocksource/hyperv_timer.c | 44 ++++++++++++++++++++++++++++++-------- include/clocksource/hyperv_timer.h | 1 + 3 files changed, 38 insertions(+), 9 deletions(-) commit 364adc45e9aff8cc08d7b87b6e61f6f272f70308 Author: Stanislav Kinsburskiy Date: Thu Nov 3 17:58:59 2022 +0000 clocksource: hyper-v: Use TSC PFN getter to map vvar page Instead of converting the virtual address to physical directly. This is a precursor patch for the upcoming support for TSC page mapping into Microsoft Hypervisor root partition, where TSC PFN will be defined by the hypervisor and thus can't be obtained by linear translation of the physical address. Signed-off-by: Stanislav Kinsburskiy CC: Andy Lutomirski CC: Thomas Gleixner CC: Ingo Molnar CC: Borislav Petkov CC: Dave Hansen CC: x86@kernel.org CC: "H. Peter Anvin" CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Wei Liu CC: Dexuan Cui CC: Daniel Lezcano CC: linux-kernel@vger.kernel.org CC: linux-hyperv@vger.kernel.org Reviewed-by: Michael Kelley Reviewed-by: Anirudh Rayabharam Link: https://lore.kernel.org/r/166749833939.218190.14095015146003109462.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net Signed-off-by: Wei Liu arch/x86/entry/vdso/vma.c | 7 +++---- drivers/clocksource/hyperv_timer.c | 3 ++- include/clocksource/hyperv_timer.h | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) commit e1f5c66db85fb3e0a17b803fc2e868e9c59c193a Author: Stanislav Kinsburskiy Date: Thu Nov 3 17:58:54 2022 +0000 clocksource: hyper-v: Introduce TSC PFN getter And rework the code to use it instead of the physical address, which isn't required by itself. This is a cleanup and precursor patch for upcoming support for TSC page mapping into Microsoft Hypervisor root partition, where TSC PFN will be defined by the hypervisor and not by the kernel. Signed-off-by: Stanislav Kinsburskiy CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Wei Liu CC: Dexuan Cui CC: Daniel Lezcano CC: Thomas Gleixner CC: linux-hyperv@vger.kernel.org CC: linux-kernel@vger.kernel.org Reviewed-by: Michael Kelley Reviewed-by: Anirudh Rayabharam Link: https://lore.kernel.org/r/166749833420.218190.2102763345349472395.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net Signed-off-by: Wei Liu drivers/clocksource/hyperv_timer.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 76be6331a81607359cb41ca20ec5388c68c855e3 Author: Stanislav Kinsburskiy Date: Thu Nov 3 17:58:48 2022 +0000 clocksource: hyper-v: Introduce a pointer to TSC page Will be used later keep the address of the remapped page for the root partition as it will be Microsoft Hypervisor defined (and thus won't be a static address). Signed-off-by: Stanislav Kinsburskiy CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Wei Liu CC: Dexuan Cui CC: Daniel Lezcano CC: Thomas Gleixner CC: linux-hyperv@vger.kernel.org CC: linux-kernel@vger.kernel.org Reviewed-by: Michael Kelley Reviewed-by: Anirudh Rayabharam Link: https://lore.kernel.org/r/166749832893.218190.16503272948154953294.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net Signed-off-by: Wei Liu drivers/clocksource/hyperv_timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 202818e1c8519ee301e930484707d7ddace639e0 Author: Saurabh Sengar Date: Fri Nov 4 11:38:43 2022 -0700 x86/hyperv: Expand definition of struct hv_vp_assist_page The struct hv_vp_assist_page has 24 bytes which is defined as u64[3], expand that to expose vtl_entry_reason, vtl_ret_x64rax and vtl_ret_x64rcx field. vtl_entry_reason is updated by hypervisor for the entry reason as to why the VTL was entered on the virtual processor. Guest updates the vtl_ret_* fields to provide the register values to restore on VTL return. The specific register values that are restored which will be updated on vtl_ret_x64rax and vtl_ret_x64rcx. Also added the missing fields for synthetic_time_unhalted_timer_expired, virtualization_fault_information and intercept_message. Signed-off-by: Saurabh Sengar Reviewed-by: Link: https://lore.kernel.org/r/1667587123-31645-1-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu arch/x86/include/asm/hyperv-tlfs.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 503112f4225fac761d2a0170e6a5f09b69ae1d36 Author: Olaf Hering Date: Mon Nov 7 17:18:31 2022 +0000 PCI: hv: update comment in x86 specific hv_arch_irq_unmask The function hv_set_affinity was removed in commit 831c1ae7 ("PCI: hv: Make the code arch neutral by adding arch specific interfaces"). Signed-off-by: Olaf Hering Link: https://lore.kernel.org/r/20221107171831.25283-1-olaf@aepfle.de Signed-off-by: Wei Liu drivers/pci/controller/pci-hyperv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fce444fa37bef2d3382b7b44e42c6ef65040ec67 Author: Olaf Hering Date: Sat Nov 5 11:54:01 2022 +0000 hv: fix comment typo in vmbus_channel/low_latency morev vs. more. Signed-off-by: Olaf Hering Link: https://lore.kernel.org/r/20221105115401.21592-1-olaf@aepfle.de Signed-off-by: Wei Liu include/linux/hyperv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d786e00d19f9fc80c2239a07643b08ea75b8b364 Author: Guilherme G. Piccoli Date: Fri Aug 19 19:17:30 2022 -0300 drivers: hv, hyperv_fb: Untangle and refactor Hyper-V panic notifiers Currently Hyper-V guests are among the most relevant users of the panic infrastructure, like panic notifiers, kmsg dumpers, etc. The reasons rely both in cleaning-up procedures (closing hypervisor <-> guest connection, disabling some paravirtualized timer) as well as to data collection (sending panic information to the hypervisor) and framebuffer management. The thing is: some notifiers are related to others, ordering matters, some functionalities are duplicated and there are lots of conditionals behind sending panic information to the hypervisor. As part of an effort to clean-up the panic notifiers mechanism and better document things, we hereby address some of the issues/complexities of Hyper-V panic handling through the following changes: (a) We have die and panic notifiers on vmbus_drv.c and both have goals of sending panic information to the hypervisor, though the panic notifier is also responsible for a cleaning-up procedure. This commit clears the code by splitting the panic notifier in two, one for closing the vmbus connection whereas the other is only for sending panic info to hypervisor. With that, it was possible to merge the die and panic notifiers in a single/well-documented function, and clear some conditional complexities on sending such information to the hypervisor. (b) There is a Hyper-V framebuffer panic notifier, which relies in doing a vmbus operation that demands a valid connection. So, we must order this notifier with the panic notifier from vmbus_drv.c, to guarantee that the framebuffer code executes before the vmbus connection is unloaded. Also, this commit removes a useless header. Although there is code rework and re-ordering, we expect that this change has no functional regressions but instead optimize the path and increase panic reliability on Hyper-V. This was tested on Hyper-V with success. Cc: Andrea Parri (Microsoft) Cc: Dexuan Cui Cc: Haiyang Zhang Cc: "K. Y. Srinivasan" Cc: Petr Mladek Cc: Stephen Hemminger Cc: Tianyu Lan Cc: Wei Liu Reviewed-by: Michael Kelley Tested-by: Fabio A M Martins Signed-off-by: Guilherme G. Piccoli Tested-by: Michael Kelley Link: https://lore.kernel.org/r/20220819221731.480795-11-gpiccoli@igalia.com Signed-off-by: Wei Liu drivers/hv/vmbus_drv.c | 105 ++++++++++++++++++++++++---------------- drivers/video/fbdev/hyperv_fb.c | 8 +++ 2 files changed, 72 insertions(+), 41 deletions(-) commit 1d044ca035dc22df0d3b39e56f2881071d9118bd Author: Guilherme G. Piccoli Date: Fri Aug 19 19:17:29 2022 -0300 video: hyperv_fb: Avoid taking busy spinlock on panic path The Hyper-V framebuffer code registers a panic notifier in order to try updating its fbdev if the kernel crashed. The notifier callback is straightforward, but it calls the vmbus_sendpacket() routine eventually, and such function takes a spinlock for the ring buffer operations. Panic path runs in atomic context, with local interrupts and preemption disabled, and all secondary CPUs shutdown. That said, taking a spinlock might cause a lockup if a secondary CPU was disabled with such lock taken. Fix it here by checking if the ring buffer spinlock is busy on Hyper-V framebuffer panic notifier; if so, bail-out avoiding the potential lockup scenario. Cc: Andrea Parri (Microsoft) Cc: Dexuan Cui Cc: Haiyang Zhang Cc: "K. Y. Srinivasan" Cc: Michael Kelley Cc: Stephen Hemminger Cc: Tianyu Lan Cc: Wei Liu Tested-by: Fabio A M Martins Signed-off-by: Guilherme G. Piccoli Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20220819221731.480795-10-gpiccoli@igalia.com Signed-off-by: Wei Liu drivers/hv/ring_buffer.c | 13 +++++++++++++ drivers/video/fbdev/hyperv_fb.c | 8 +++++++- include/linux/hyperv.h | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) commit dc60f2db39c3f8da4490c1ed827022bbc925d81c Author: Shradha Gupta Date: Thu Sep 29 23:01:39 2022 -0700 hv_balloon: Add support for configurable order free page reporting Newer versions of Hyper-V allow reporting unused guest pages in chunks smaller than 2 Mbytes. Using smaller chunks allows reporting more unused guest pages, but with increased overhead in the finding the small chunks. To make this tradeoff configurable, use the existing page_reporting_order module parameter to control the reporting order. Drop and refine checks that restricted the minimun page reporting order to 2Mbytes size pages. Add appropriate checks to make sure the underlying Hyper-V versions support cold discard hints of any order (and not just starting from 9) Signed-off-by: Shradha Gupta Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1664517699-1085-3-git-send-email-shradhagupta@linux.microsoft.com Signed-off-by: Wei Liu drivers/hv/hv_balloon.c | 94 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 73 insertions(+), 21 deletions(-) commit aebb02ce8b36d20464404206b89069dc9239a7f0 Author: Shradha Gupta Date: Thu Sep 29 23:01:38 2022 -0700 mm/page_reporting: Add checks for page_reporting_order param Current code allows the page_reporting_order parameter to be changed via sysfs to any integer value. The new value is used immediately in page reporting code with no validation, which could cause incorrect behavior. Fix this by adding validation of the new value. Export this parameter for use in the driver that is calling the page_reporting_register(). This is needed by drivers like hv_balloon to know the order of the pages reported. Traditionally the values provided in the kernel boot line or subsequently changed via sysfs take priority therefore, if page_reporting_order parameter's value is set, it takes precedence over the value passed while registering with the driver. Signed-off-by: Shradha Gupta Reviewed-by: Michael Kelley Acked-by: Andrew Morton Link: https://lore.kernel.org/r/1664517699-1085-2-git-send-email-shradhagupta@linux.microsoft.com Signed-off-by: Wei Liu mm/page_reporting.c | 50 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) commit 4cbb264d4e9136acab2c8fd39e39ab1b1402b84b Author: Ricardo Ribalda Date: Mon Nov 28 11:49:16 2022 +0100 ASoC: mediatek: mt8173: Enable IRQ when pdata is ready If the device does not come straight from reset, we might receive an IRQ before we are ready to handle it. Fixes: [ 2.334737] Unable to handle kernel read from unreadable memory at virtual address 00000000000001e4 [ 2.522601] Call trace: [ 2.525040] regmap_read+0x1c/0x80 [ 2.528434] mt8173_afe_irq_handler+0x40/0xf0 ... [ 2.598921] start_kernel+0x338/0x42c Signed-off-by: Ricardo Ribalda Fixes: ee0bcaff109f ("ASoC: mediatek: Add AFE platform driver") Link: https://lore.kernel.org/r/20221128-mt8173-afe-v1-0-70728221628f@chromium.org Signed-off-by: Mark Brown sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit cecf8179ad42b062c095fe58145d9e883fdfab4c Merge: 2d68148f8f85 b386acc043f4 Author: Mark Brown Date: Mon Nov 28 16:38:18 2022 +0000 ASoC: dt-bindings: Rework Qualcomm APR/GPR Sound nodes for SM8450 Merge series from Krzysztof Kozlowski : Adding sound support for Qualcomm SM8450 SoC (and later for SC8280XP) brought some changes to APR/GPR services bindings. These bindings are part of qcom,apr.yaml: apr-or-gpr-device-node <- qcom,apr.yaml apr-gpr-service@[0-9] <- qcom,apr.yaml service-specific-components <- /schemas/sound/qcom,q6*.yaml The schema for services (apr-gpr-service@[0-9]) was not complete and is still quite not specific. It allows several incorrect combinations, like adding a clock-controller to a APM device. Restricting it would complicate the schema even more. Bringing new support for sound on Qualcomm SM8450 and SC8280XP SoC would grow it as well. Refactor the bindings before extending them for Qualcomm SM8450 SoC. commit c6f7874687f7027d7c4b2f53ff6e4d22850f915d Author: Ricardo Ribalda Date: Mon Nov 28 12:00:01 2022 +0100 spi: mediatek: Enable irq when pdata is ready If the device does not come straight from reset, we might receive an IRQ before we are ready to handle it. Fixes: [ 0.832328] Unable to handle kernel read from unreadable memory at virtual address 0000000000000010 [ 1.040343] Call trace: [ 1.040347] mtk_spi_can_dma+0xc/0x40 ... [ 1.262265] start_kernel+0x338/0x42c Signed-off-by: Ricardo Ribalda Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221128-spi-mt65xx-v1-0-509266830665@chromium.org Signed-off-by: Mark Brown drivers/spi/spi-mt65xx.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 072e2623046ee97b88b34d4ce689dac3505370f4 Author: Carlos Bilbao Date: Thu Nov 24 11:02:42 2022 -0600 docs/sp_SP: Add process coding-style translation Translate Documentation/process/coding-style.rst into Spanish. Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20221124170242.1892751-7-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet .../translations/sp_SP/process/coding-style.rst | 1315 ++++++++++++++++++++ Documentation/translations/sp_SP/process/index.rst | 1 + 2 files changed, 1316 insertions(+) commit 9a40f45fbd5b43171fa485b9987d7f9231928247 Author: Carlos Bilbao Date: Thu Nov 24 11:02:41 2022 -0600 docs/sp_SP: Add kernel-docs.rst Spanish translation Translate Documentation/process/kernel-docs.rst into Spanish. Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20221124170242.1892751-6-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet Documentation/translations/sp_SP/process/index.rst | 1 + .../translations/sp_SP/process/kernel-docs.rst | 187 +++++++++++++++++++++ 2 files changed, 188 insertions(+) commit a0454bb599be7e933688eaa5f47ca2740786398f Author: Carlos Bilbao Date: Thu Nov 24 11:02:40 2022 -0600 docs: Create translations/sp_SP/process/, move submitting-patches.rst The organization of the Spanish translations should be consistent with the rest of kernel documentation. Create directory process/ and move submitting-patches.rst there. Update indexes accordingly. Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20221124170242.1892751-5-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet Documentation/translations/sp_SP/index.rst | 3 +-- Documentation/translations/sp_SP/process/index.rst | 13 +++++++++++++ .../translations/sp_SP/{ => process}/submitting-patches.rst | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) commit 516384b7ecad0d8d0e5eb2b7045c41aaeaebd958 Author: Carlos Bilbao Date: Thu Nov 24 11:02:39 2022 -0600 docs: Add book to process/kernel-docs.rst Include to process/kernel-docs.rst a book on Linux kernel development published in 2021 (with ISBN 978-1789953435). Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20221124170242.1892751-4-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet Documentation/process/kernel-docs.rst | 8 ++++++++ 1 file changed, 8 insertions(+) commit e11377d5d368930987d103b8385800d9d2e56be1 Author: Carlos Bilbao Date: Thu Nov 24 11:02:38 2022 -0600 docs: Retire old resources from kernel-docs.rst Remove outdated or obsolete resources from process/kernel-docs.rst, with the exception of foundational material. Update information regarding LWN.net. See Link below for further context. Link: https://lore.kernel.org/lkml/093907af-2e4e-d232-1eb0-7331ff2b9320@amd.com/ Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20221124170242.1892751-3-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet Documentation/process/kernel-docs.rst | 465 +--------------------------------- 1 file changed, 7 insertions(+), 458 deletions(-) commit 981471b3b452f30dcf1f2d436e69f76dddf2483c Author: Carlos Bilbao Date: Thu Nov 24 11:02:37 2022 -0600 docs: Update maintainer of kernel-docs.rst Set new maintainer of the Index of Further Kernel Documentation (document process/kernel_docs.rst). See Link for further context. Also remove line that keeps record of last update of the text -this information is already available elsewhere. Link: https://lore.kernel.org/lkml/20221118170942.2588412-1-carlos.bilbao@amd.com/ Reviewed-by: Miguel Ojeda Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20221124170242.1892751-2-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet Documentation/process/kernel-docs.rst | 8 +++----- MAINTAINERS | 5 +++++ 2 files changed, 8 insertions(+), 5 deletions(-) commit f31f7cd9875c2ab744006bd2ad25641db53f079d Author: Gregory Greenman Date: Wed Nov 23 23:02:09 2022 +0200 wifi: iwlwifi: mei: fix parameter passing to iwl_mei_alive_notif() Pass true explicitly to iwl_mei_alive_notif() when we can be sure that Alive notification was received. The issue was discovered by Smatch. Reported-by: Dan Carpenter Link: https://lore.kernel.org/all/Y3uYUEFnMiBY2ABQ@kili/ Link: https://lore.kernel.org/r/20221123225313.83c2251055c1.Ia028357e7ab36dfc2abf85106a5926ee7893a408@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 274d9aa97372094317fcf0d27af4fedb6659c7d4 Author: Avraham Stern Date: Wed Nov 23 23:02:08 2022 +0200 wifi: iwlwifi: mvm: return error value in case PLDR sync failed In case PLDR sync is required but iwlmei failed to get a response from CSME, the device cannot be brought up, so return an error value. Reported-by: Dan Carpenter Link: https://lore.kernel.org/all/Y3uYUEFnMiBY2ABQ@kili/ Signed-off-by: Avraham Stern Link: https://lore.kernel.org/r/20221123225313.08b345123f83.I13bfacc2f6da7de8ada90127fe7108d1bb73af92@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8133439bda70ff24e3bdb89bb55d204c3fea606 Author: Avraham Stern Date: Wed Nov 23 23:02:07 2022 +0200 wifi: iwlwifi: mvm: trigger PCI re-enumeration in case of PLDR sync When doing the PLDR flow, the fw goes through a re-read and needs PCI re-enumeration in order to recover. In this case, skip the mac start retry and fw dumps as all the fw and registers are invalid until the PCI re-enumeration. In addition, print the register that shows the re-read counter when loading the fw. Signed-off-by: Avraham Stern Link: https://lore.kernel.org/r/20221123225313.9ae77968961e.Ie06e886cef4b5921b65dacb7724db1276bed38cb@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 1 + drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 12 +++- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 10 +++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 + drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 3 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 85 +++++++++++++---------- 7 files changed, 73 insertions(+), 41 deletions(-) commit 0473cbae2137b963bd0eaa74336131cb1d3bc6c3 Author: Ben Greear Date: Wed Nov 23 23:02:06 2022 +0200 wifi: iwlwifi: mvm: fix double free on tx path. We see kernel crashes and lockups and KASAN errors related to ax210 firmware crashes. One of the KASAN dumps pointed at the tx path, and it appears there is indeed a way to double-free an skb. If iwl_mvm_tx_skb_sta returns non-zero, then the 'skb' sent into the method will be freed. But, in case where we build TSO skb buffer, the skb may also be freed in error case. So, return 0 in that particular error case and do cleanup manually. BUG: KASAN: use-after-free in __list_del_entry_valid+0x12/0x90 iwlwifi 0000:06:00.0: 0x00000000 | tsf hi Read of size 8 at addr ffff88813cfa4ba0 by task btserver/9650 CPU: 4 PID: 9650 Comm: btserver Tainted: G W 5.19.8+ #5 iwlwifi 0000:06:00.0: 0x00000000 | time gp1 Hardware name: Default string Default string/SKYBAY, BIOS 5.12 02/19/2019 Call Trace: dump_stack_lvl+0x55/0x6d print_report.cold.12+0xf2/0x684 iwlwifi 0000:06:00.0: 0x1D0915A8 | time gp2 ? __list_del_entry_valid+0x12/0x90 kasan_report+0x8b/0x180 iwlwifi 0000:06:00.0: 0x00000001 | uCode revision type ? __list_del_entry_valid+0x12/0x90 __list_del_entry_valid+0x12/0x90 iwlwifi 0000:06:00.0: 0x00000048 | uCode version major tcp_update_skb_after_send+0x5d/0x170 __tcp_transmit_skb+0xb61/0x15c0 iwlwifi 0000:06:00.0: 0xDAA05125 | uCode version minor ? __tcp_select_window+0x490/0x490 iwlwifi 0000:06:00.0: 0x00000420 | hw version ? trace_kmalloc_node+0x29/0xd0 ? __kmalloc_node_track_caller+0x12a/0x260 ? memset+0x1f/0x40 ? __build_skb_around+0x125/0x150 ? __alloc_skb+0x1d4/0x220 ? skb_zerocopy_clone+0x55/0x230 iwlwifi 0000:06:00.0: 0x00489002 | board version ? kmalloc_reserve+0x80/0x80 ? rcu_read_lock_bh_held+0x60/0xb0 tcp_write_xmit+0x3f1/0x24d0 iwlwifi 0000:06:00.0: 0x034E001C | hcmd ? __check_object_size+0x180/0x350 iwlwifi 0000:06:00.0: 0x24020000 | isr0 tcp_sendmsg_locked+0x8a9/0x1520 iwlwifi 0000:06:00.0: 0x01400000 | isr1 ? tcp_sendpage+0x50/0x50 iwlwifi 0000:06:00.0: 0x48F0000A | isr2 ? lock_release+0xb9/0x400 ? tcp_sendmsg+0x14/0x40 iwlwifi 0000:06:00.0: 0x00C3080C | isr3 ? lock_downgrade+0x390/0x390 ? do_raw_spin_lock+0x114/0x1d0 iwlwifi 0000:06:00.0: 0x00200000 | isr4 ? rwlock_bug.part.2+0x50/0x50 iwlwifi 0000:06:00.0: 0x034A001C | last cmd Id ? rwlock_bug.part.2+0x50/0x50 ? lockdep_hardirqs_on_prepare+0xe/0x200 iwlwifi 0000:06:00.0: 0x0000C2F0 | wait_event ? __local_bh_enable_ip+0x87/0xe0 ? inet_send_prepare+0x220/0x220 iwlwifi 0000:06:00.0: 0x000000C4 | l2p_control tcp_sendmsg+0x22/0x40 sock_sendmsg+0x5f/0x70 iwlwifi 0000:06:00.0: 0x00010034 | l2p_duration __sys_sendto+0x19d/0x250 iwlwifi 0000:06:00.0: 0x00000007 | l2p_mhvalid ? __ia32_sys_getpeername+0x40/0x40 iwlwifi 0000:06:00.0: 0x00000000 | l2p_addr_match ? rcu_read_lock_held_common+0x12/0x50 ? rcu_read_lock_sched_held+0x5a/0xd0 ? rcu_read_lock_bh_held+0xb0/0xb0 ? rcu_read_lock_sched_held+0x5a/0xd0 ? rcu_read_lock_sched_held+0x5a/0xd0 ? lock_release+0xb9/0x400 ? lock_downgrade+0x390/0x390 ? ktime_get+0x64/0x130 ? ktime_get+0x8d/0x130 ? rcu_read_lock_held_common+0x12/0x50 ? rcu_read_lock_sched_held+0x5a/0xd0 ? rcu_read_lock_held_common+0x12/0x50 ? rcu_read_lock_sched_held+0x5a/0xd0 ? rcu_read_lock_bh_held+0xb0/0xb0 ? rcu_read_lock_bh_held+0xb0/0xb0 __x64_sys_sendto+0x6f/0x80 do_syscall_64+0x34/0xb0 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f1d126e4531 Code: 00 00 00 00 0f 1f 44 00 00 f3 0f 1e fa 48 8d 05 35 80 0c 00 41 89 ca 8b 00 85 c0 75 1c 45 31 c9 45 31 c0 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 67 c3 66 0f 1f 44 00 00 55 48 83 ec 20 48 89 RSP: 002b:00007ffe21a679d8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000000000000ffdc RCX: 00007f1d126e4531 RDX: 0000000000010000 RSI: 000000000374acf0 RDI: 0000000000000014 RBP: 00007ffe21a67ac0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000010 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000 Allocated by task 9650: kasan_save_stack+0x1c/0x40 __kasan_slab_alloc+0x6d/0x90 kmem_cache_alloc_node+0xf3/0x2b0 __alloc_skb+0x191/0x220 tcp_stream_alloc_skb+0x3f/0x330 tcp_sendmsg_locked+0x67c/0x1520 tcp_sendmsg+0x22/0x40 sock_sendmsg+0x5f/0x70 __sys_sendto+0x19d/0x250 __x64_sys_sendto+0x6f/0x80 do_syscall_64+0x34/0xb0 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Freed by task 9650: kasan_save_stack+0x1c/0x40 kasan_set_track+0x21/0x30 kasan_set_free_info+0x20/0x30 __kasan_slab_free+0x102/0x170 kmem_cache_free+0xc8/0x3e0 iwl_mvm_mac_itxq_xmit+0x124/0x270 [iwlmvm] ieee80211_queue_skb+0x874/0xd10 [mac80211] ieee80211_xmit_fast+0xf80/0x1180 [mac80211] __ieee80211_subif_start_xmit+0x287/0x680 [mac80211] ieee80211_subif_start_xmit+0xcd/0x730 [mac80211] dev_hard_start_xmit+0xf6/0x420 __dev_queue_xmit+0x165b/0x1b50 ip_finish_output2+0x66e/0xfb0 __ip_finish_output+0x487/0x6d0 ip_output+0x11c/0x350 __ip_queue_xmit+0x36b/0x9d0 __tcp_transmit_skb+0xb35/0x15c0 tcp_write_xmit+0x3f1/0x24d0 tcp_sendmsg_locked+0x8a9/0x1520 tcp_sendmsg+0x22/0x40 sock_sendmsg+0x5f/0x70 __sys_sendto+0x19d/0x250 __x64_sys_sendto+0x6f/0x80 do_syscall_64+0x34/0xb0 entry_SYSCALL_64_after_hwframe+0x46/0xb0 The buggy address belongs to the object at ffff88813cfa4b40 which belongs to the cache skbuff_fclone_cache of size 472 The buggy address is located 96 bytes inside of 472-byte region [ffff88813cfa4b40, ffff88813cfa4d18) The buggy address belongs to the physical page: page:ffffea0004f3e900 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88813cfa6c40 pfn:0x13cfa4 head:ffffea0004f3e900 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x5fff8000010200(slab|head|node=0|zone=2|lastcpupid=0x3fff) raw: 005fff8000010200 ffffea0004656b08 ffffea0008e8cf08 ffff8881081a5240 raw: ffff88813cfa6c40 0000000000170015 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88813cfa4a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88813cfa4b00: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff88813cfa4b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88813cfa4c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88813cfa4c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Fixes: 08f7d8b69aaf ("iwlwifi: mvm: bring back mvm GSO code") Link: https://lore.kernel.org/linux-wireless/20220928193057.16132-1-greearb@candelatech.com/ Tested-by: Amol Jawale Signed-off-by: Ben Greear Link: https://lore.kernel.org/r/20221123225313.21b1ee31d666.I3b3ba184433dd2a544d91eeeda29b467021824ae@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 56731878c68255745dc0116300d531b24d950f0d Author: Daniel Gabay Date: Wed Nov 23 23:02:05 2022 +0200 wifi: iwlwifi: mvm: print OTP info after alive These are register values which are needed for debug regardless of alive fail/success. Signed-off-by: Daniel Gabay Link: https://lore.kernel.org/r/20221123225313.a5ae3679491b.Ic618934df084a9b269e56d892665523c79e40eee@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 0e21ec6edbb535126bef3a471cc5ec10374a81bb Author: Abhishek Naik Date: Tue Nov 22 22:10:41 2022 +0200 wifi: iwlwifi: nvm: Update EHT capabilities for GL device Update EHT MAC and PHY capabilities for GL device for station and softap interface. Add relevant code in nvm_fixup_sband_iftd. Signed-off-by: Abhishek Naik Link: https://lore.kernel.org/r/20221122220713.1da816ab7ffc.Ief570e27007c9e2ad3a97bee4b074e2fc1c75bae@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 3f44d44f0685778e8b07e52dc1959dd40f1ba964 Author: Johannes Berg Date: Tue Nov 22 22:10:39 2022 +0200 wifi: iwlwifi: nvm-parse: support A-MPDU in EHT 2.4 GHz We support large A-MPDU in EHT in 2.4 GHz, so add the right bits for that in the EHT capabilities. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20221122220713.3e7449760415.Id394d7fd0acaca48d429feccda4e66dbadaab993@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 3 +++ 1 file changed, 3 insertions(+) commit 35ea5f619480e81efb652c8e1cab5fd1a3964ae3 Author: Johannes Berg Date: Tue Nov 22 22:10:38 2022 +0200 wifi: iwlwifi: mvm: advertise 320 MHz in 6 GHz only conditionally We can't have it in AP mode unless for debug, since we don't have 160 MHz in HE PHY capabilities, and also set it only in 6 GHz even if (unlike in HE) it's always defined. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20221122220713.293ef3e5a1c4.I867526a6bd3f93ee50076ff359436dfb5ec6101c@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3895f1609c2e4e274a9a02b412e318a3b11e8032 Author: Johannes Berg Date: Tue Nov 22 22:10:37 2022 +0200 wifi: iwlwifi: mvm: set HE PHY bandwidth according to band The bits are reserved on the opposite bands, so we shouldn't always send them, only the 2G bit on 2.4 GHz and the 5G bits on 5/6GHz. Fix that. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20221122220713.0a075d00c796.Ib4cac0b7f90dfadebceceb1e07c8cdfd7a4138f6@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 27 ++++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) commit cb63eb438ee9264b086ec7e0b2f01c56983ebe61 Author: Miri Korenblit Date: Tue Nov 22 22:10:36 2022 +0200 wifi: iwlwifi: mvm: support PPE Thresholds for EHT In an EHT connection fill in the HE context command with PPE Thresholds field from EHT Capabilities IE. If PPE Thresholds field presents only in HE Capabilities IE, take the thresholds from there. If it's not present in both - set the Common Nominal Packet Padding field from EHT Capabilities IE. Signed-off-by: Miri Korenblit Link: https://lore.kernel.org/r/20221122220713.062ac86110f2.I0bcd5ee35f4d987a49f15501985f90e0d3ce7590@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/fw/api/mac.h | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 177 ++++++++++++++++++---- 2 files changed, 153 insertions(+), 30 deletions(-) commit 64e7dd3f9be68a53e760f184a6d8049a1121a060 Author: Mordechay Goodstein Date: Tue Nov 22 22:10:35 2022 +0200 wifi: iwlwifi: mvm: add support for EHT 1K aggregation size In 11be we can receive 1K aggregation size so update our max HW rx aggregation for mac80211 usage. Signed-off-by: Mordechay Goodstein Link: https://lore.kernel.org/r/20221122220713.ef0431f64975.Ie4d90c376c822694f4523ff0fb5731f20004c24d@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 701404f1091d8b4cdccfa835ceb05a3982b2c614 Author: Mordechay Goodstein Date: Tue Nov 22 22:10:34 2022 +0200 wifi: iwlwifi: rs: add support for parsing max MCS per NSS/BW in 11be Rate scale needs to be configured to what MCS it can use per BW and NSS, this is done by parsing our capabilities of TX and peer's capabilities of RX and setting the minimum for rate scale usage. Also do some cleanup removing redundant enum defines not used by FW/Driver. Signed-off-by: Mordechay Goodstein Link: https://lore.kernel.org/r/20221122220713.f71f3b4c4583.I7b5e8071df91146c4bee3e9bcb7ad62595b275e1@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/fw/api/rs.h | 10 +- drivers/net/wireless/intel/iwlwifi/fw/rs.c | 2 + drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 125 ++++++++++++++++++++++++- 3 files changed, 129 insertions(+), 8 deletions(-) commit 7ac875753a11589bfbebe707941ac8a11306ba25 Author: Johannes Berg Date: Tue Nov 22 22:10:33 2022 +0200 wifi: iwlwifi: mvm: support 320 MHz PHY configuration Support 320 MHz PHY configuration and while doing so rewrite the code since we'd otherwise double the number of cases in the switch statement. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20221122220713.964db911b733.If56c94a9bf20c050f35d2421b680e400a9f4aeb8@changeid Signed-off-by: Gregory Greenman .../net/wireless/intel/iwlwifi/fw/api/phy-ctxt.h | 33 +++++++------ drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 54 +++++++++++----------- 3 files changed, 44 insertions(+), 45 deletions(-) commit 26d7cc0abe6181148c50982ec2e8e0e46f74b419 Author: Ilan Peer Date: Tue Nov 22 22:10:32 2022 +0200 wifi: iwlwifi: mvm: Advertise EHT capabilities Add support for advertising EHT capabilities if supported by device SKU and not disabled by module parameters. Signed-off-by: Ilan Peer Link: https://lore.kernel.org/r/20221122220713.6bc00d851794.I214005645f3da21d8f2458a70355deeca04a19e8@changeid Signed-off-by: Gregory Greenman drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 3 + .../net/wireless/intel/iwlwifi/iwl-eeprom-parse.h | 3 +- drivers/net/wireless/intel/iwlwifi/iwl-modparams.h | 1 + drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 178 +++++++++++++++++++-- 4 files changed, 167 insertions(+), 18 deletions(-) commit eceb024ee3eed1bacb5c32a4847269f2685e2ea4 Merge: 823092a53556 7256f28767fa Author: Kalle Valo Date: Mon Nov 28 16:58:28 2022 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v6.2. Major changes: ath10k * store WLAN firmware version in SMEM image table commit 64d6820d64c0a206e744bd8945374d563a76c16c Author: Marc Zyngier Date: Thu Nov 24 10:44:59 2022 +0000 KVM: arm64: PMU: Sanitise PMCR_EL0.LP on first vcpu run Userspace can play some dirty tricks on us by selecting a given PMU version (such as PMUv3p5), restore a PMCR_EL0 value that has PMCR_EL0.LP set, and then switch the PMU version to PMUv3p1, for example. In this situation, we end-up with PMCR_EL0.LP being set and spreading havoc in the PMU emulation. This is specially hard as the first two step can be done on one vcpu and the third step on another, meaning that we need to sanitise *all* vcpus when the PMU version is changed. In orer to avoid a pretty complicated locking situation, defer the sanitisation of PMCR_EL0 to the point where the vcpu is actually run for the first tine, using the existing KVM_REQ_RELOAD_PMU request that calls into kvm_pmu_handle_pmcr(). There is still an obscure corner case where userspace could do the above trick, and then save the VM without running it. They would then observe an inconsistent state (PMUv3.1 + LP set), but that state will be fixed on the first run anyway whenever the guest gets restored on a host. Reported-by: Reiji Watanabe Signed-off-by: Marc Zyngier arch/arm64/kvm/pmu-emul.c | 6 ++++++ arch/arm64/kvm/sys_regs.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) commit 292e8f1494764ac46dd1b7dd46fa317db691436c Author: Marc Zyngier Date: Thu Nov 24 10:40:02 2022 +0000 KVM: arm64: PMU: Simplify PMCR_EL0 reset handling Resetting PMCR_EL0 is a pretty involved process that includes poisoning some of the writable bits, just because we can. It makes it hard to reason about about what gets configured, and just resetting things to 0 seems like a much saner option. Reduce reset_pmcr() to just preserving PMCR_EL0.N from the host, and setting PMCR_EL0.LC if we don't support AArch32. Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 86815735aa571d493cf5768cad5fa8e6fd9c7ba8 Author: Anshuman Khandual Date: Mon Nov 28 19:26:29 2022 +0530 KVM: arm64: PMU: Replace version number '0' with ID_AA64DFR0_EL1_PMUVer_NI kvm_host_pmu_init() returns when detected PMU is either not implemented, or implementation defined. kvm_pmu_probe_armpmu() also has a similar situation. Extracted ID_AA64DFR0_EL1_PMUVer value, when PMU is not implemented is '0', which can be replaced with ID_AA64DFR0_EL1_PMUVer_NI defined as '0b0000'. Cc: Arnaldo Carvalho de Melo Cc: Marc Zyngier Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Cc: linux-perf-users@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Anshuman Khandual Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221128135629.118346-1-anshuman.khandual@arm.com arch/arm64/kvm/pmu-emul.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b41b98e12a954c306e8eb9527ada0a70db339683 Author: Rong Tao Date: Mon Nov 28 20:05:49 2022 +0800 fs/ext2: Fix code indentation ts=4 can cause misunderstanding in code reading. It is better to replace 8 spaces with one tab. Signed-off-by: Rong Tao Signed-off-by: Jan Kara fs/ext2/balloc.c | 12 ++++++------ fs/ext2/super.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 823092a53556ebf8656623d0e857626d30fe1e18 Author: Ji-Pin Jou Date: Thu Nov 24 14:44:42 2022 +0800 wifi: rtw88: fix race condition when doing H2C command For SDIO/USB interface, since the tranferring speed is slower than that in PCIE, it may have race condition when the driver sets down H2C command to the FW. In the function rtw_fw_send_h2c_command, before the patch, box_reg is written first, then box_ex_reg is written. FW starts to work and fetch the value of box_ex_reg, when the most significant byte of box_reg(4 bytes) is written. Meanwhile, for SDIO/USB interface, since the transferring speed is slow, the driver is still in writing the new value of box_ex_reg through the bus, and FW may get the wrong value of box_ex_reg at the moment. To prevent the above driver/FW racing situation, box_ex_reg is written first then box_reg. Furthermore, it is written in 4 bytes at a time, instead of written in one byte one by one. It can increase the speed for SDIO/USB interface. Signed-off-by: Ji-Pin Jou Signed-off-by: Ping-Ke Shih Tested-by: Sascha Hauer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221124064442.28042-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw88/fw.c | 8 +++----- drivers/net/wireless/realtek/rtw88/fw.h | 5 +++++ 2 files changed, 8 insertions(+), 5 deletions(-) commit 3ca7f0b2523cac5d436cd09758db07e10b1a322a Author: Lukas Bulwahn Date: Tue Nov 22 14:12:48 2022 +0100 wifi: b43: remove reference to removed config B43_PCMCIA Commit 399500da18f7 ("ssb: pick PCMCIA host code support from b43 driver") removes the config B43_PCMCIA. Clean up the last reference to this removed config B43_PCMCIA in the b43_print_driverinfo() function. Signed-off-by: Lukas Bulwahn Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221122131248.23738-1-lukas.bulwahn@gmail.com drivers/net/wireless/broadcom/b43/main.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 7927afb5e27baac694f585b59c436ba323528dc2 Author: Bitterblue Smith Date: Mon Nov 21 22:56:58 2022 +0200 wifi: rtl8xxxu: Fix use after rcu_read_unlock in rtl8xxxu_bss_info_changed Commit a8b5aef2cca1 ("wifi: rtl8xxxu: gen2: Enable 40 MHz channel width") introduced a line where the pointer returned by ieee80211_find_sta() is used after rcu_read_unlock(). Move rcu_read_unlock() a bit lower to fix this. Fixes: a8b5aef2cca1 ("wifi: rtl8xxxu: gen2: Enable 40 MHz channel width") Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/3c82ad09-7593-3be1-1d2c-e58505fb43cb@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 895b3b06efc285c1245242e9638b9ae251dc13ec Author: Ziyang Xuan Date: Sat Nov 19 13:19:00 2022 +0800 wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx() urbs does not be freed in exception paths in __lf_x_usb_enable_rx(). That will trigger memory leak. To fix it, add kfree() for urbs within "error" label. Compile tested only. Fixes: 68d57a07bfe5 ("wireless: add plfxlc driver for pureLiFi X, XL, XC devices") Signed-off-by: Ziyang Xuan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221119051900.1192401-1-william.xuanziyang@huawei.com drivers/net/wireless/purelifi/plfxlc/usb.c | 1 + 1 file changed, 1 insertion(+) commit e4baf845364637bfe56228b282b8795a77d0f8af Author: John Keeping Date: Fri Nov 25 16:23:26 2022 +0000 ALSA: pcm: fix tracing reason in hw_ptr_error Strings need to be specially marked in trace events to ensure the content is captured, othewise the trace just shows the value of the pointer. Signed-off-by: John Keeping Reviewed-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20221125162327.297440-1-john@metanate.com Signed-off-by: Takashi Iwai sound/core/pcm_trace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9d86515c3d4c0564a0c31a2df87d735353a1971e Author: Liu Shixin Date: Sat Nov 26 10:14:29 2022 +0800 ALSA: asihpi: fix missing pci_disable_device() pci_disable_device() need be called while module exiting, switch to use pcim_enable(), pci_disable_device() will be called in pcim_release(). Fixes: 3285ea10e9b0 ("ALSA: asihpi - Interrelated HPI tidy up.") Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20221126021429.3029562-1-liushixin2@huawei.com Signed-off-by: Takashi Iwai sound/pci/asihpi/hpioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e279739d7312b8958ec816fa38dba2725638503 Author: Christophe JAILLET Date: Tue Nov 1 22:13:51 2022 +0100 irqchip/gic: 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 Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/755c4083122071bb27aa8ed5d98156a07bb63a39.1667336095.git.christophe.jaillet@wanadoo.fr drivers/irqchip/irq-gic-v3.c | 3 ++- drivers/irqchip/irq-gic.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 63d9a4d88499569210c445a862209515207c2732 Author: bayi cheng Date: Tue Nov 15 20:46:55 2022 +0800 spi: spi-mtk-nor: Unify write buffer on/off The logical structures of mtk_nor_write_buffer_enable and mtk_nor_write_buffer_disable are very similar, So it is necessary to combine them into one. Signed-off-by: bayi cheng Link: https://lore.kernel.org/r/20221115124655.10124-1-bayi.cheng@mediatek.com Signed-off-by: Mark Brown drivers/spi/spi-mtk-nor.c | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) commit f39f8709c217d82aabbf51d8669731137ce09aea Author: Sebastian Reichel Date: Thu Oct 20 22:42:49 2022 +0200 regulator: rk808: Use dev_err_probe Print error message for potential EPROBE_DEFER error using dev_err_probe, which captures the reason in /sys/kernel/debug/devices_deferred and otherwise silences the message. Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221020204251.108565-12-sebastian.reichel@collabora.com Signed-off-by: Mark Brown drivers/regulator/rk808-regulator.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 647e57351f8ebc37d8e12cbc0f4bf7471754a0cc Author: Sebastian Reichel Date: Thu Oct 20 22:42:40 2022 +0200 regulator: rk808: reduce 'struct rk808' usage Reduce usage of 'struct rk808' (driver data of the parent MFD), so that only the chip variant field is still being accessed directly. This allows restructuring the MFD driver to support SPI based PMICs. Acked-by: Mark Brown Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221020204251.108565-3-sebastian.reichel@collabora.com Signed-off-by: Mark Brown drivers/regulator/rk808-regulator.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 2d68148f8f85ca5a4bf5e80c821b56167cfc0f8b Author: Srinivasa Rao Mandadapu Date: Mon Nov 28 13:19:02 2022 +0530 ASoC: qcom: lpass-sc7180: Add system suspend/resume PM ops Update lpass sc7180 platform driver with PM ops, such as system supend and resume callbacks. This update is required to disable clocks during supend and avoid XO shutdown issue. Signed-off-by: Srinivasa Rao Mandadapu Tested-by: Rahul Ajmeriya Link: https://lore.kernel.org/r/1669621742-28524-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown sound/soc/qcom/lpass-sc7180.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 5fabcc90e79b460d72df582b31854f6018695965 Author: Oder Chiou Date: Mon Nov 28 15:08:25 2022 +0800 ASoC: rt5640: Fix Jack work after system suspend We found an corner case in RT5640 codec driver which schedules jack work after system suspend as IRQ was enabled. Due to this, hitting the error as register access happening after suspend as jack worker thread getting scheduled in irq handler. The patch disables the irq during the suspend to prevent the corner case happening. Signed-off-by: Oder Chiou Reported-by: Mohan Kumar D Link: https://lore.kernel.org/r/20221128070825.91215-1-oder_chiou@realtek.com Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 11e87890dab52d14af2b2f3945835ec6db473e3b Author: Jean Delvare Date: Sun Nov 27 19:35:49 2022 +0100 ASoC: SOF: 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 Link: https://lore.kernel.org/r/20221127193549.211bf8f7@endymion.delvare Signed-off-by: Mark Brown sound/soc/sof/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 082d3c998c7b5ee91472c12d2d7dc59d4d1ddec6 Author: Pavel Dobias Date: Wed Nov 23 16:38:18 2022 +0100 ASoC: max9867: Implement exact integer mode For 8kHz and 16kHz sample rates and certain PCLK values the codec can be programmed to operate in exact integer mode. If available, use it to achieve the exact sample rate. Signed-off-by: Pavel Dobias Link: https://lore.kernel.org/r/20221123153818.24650-1-dobias@2n.com Signed-off-by: Mark Brown sound/soc/codecs/max9867.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) commit 7aa6d95d7ff5b86f8632bb0b4fb90f0a8eeaa7b6 Author: Kuninori Morimoto Date: Mon Nov 28 05:46:28 2022 +0000 ASoC: rsnd: adg: use __clk_get_name() instead of local clk_name[] Current rsnd_adg_clk_dbg_info() is using locak clk_name[] to ndicating clk name, but we don't want to use local clk_name[] everywhere when we support R-Car Gen4 sound to handling non compatible clk naming. This patch uses __clk_get_name() instead of local clk_name[] for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v8mz8wcs.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5f81301d06898080c9a59eda91f6b8605f98a2a Author: Charles Keepax Date: Wed Nov 23 16:54:32 2022 +0000 ASoC: sdw-mockup: Switch to new snd_sdw_params_to_config helper The conversion from hw_params to SoundWire config is pretty standard as such most of the conversion can be handled by the new snd_sdw_params_to_config helper function. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221123165432.594972-9-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/sdw-mockup.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit 99ae8cf0a06b7911ec1d9c6d9190dcb3384255c9 Author: Charles Keepax Date: Wed Nov 23 16:54:31 2022 +0000 ASoC: rt715: Switch to new snd_sdw_params_to_config helper The conversion from hw_params to SoundWire config is pretty standard as such most of the conversion can be handled by the new snd_sdw_params_to_config helper function. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221123165432.594972-8-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/rt715-sdca.c | 25 ++++++++----------------- sound/soc/codecs/rt715.c | 25 ++++++++----------------- 2 files changed, 16 insertions(+), 34 deletions(-) commit 754bef6752259ce5633814a0333f96fa06f6e3e8 Author: Charles Keepax Date: Wed Nov 23 16:54:30 2022 +0000 ASoC: rt711: Switch to new snd_sdw_params_to_config helper The conversion from hw_params to SoundWire config is pretty standard as such most of the conversion can be handled by the new snd_sdw_params_to_config helper function. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221123165432.594972-7-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/rt711-sdca.c | 27 +++++++++------------------ sound/soc/codecs/rt711.c | 27 +++++++++------------------ 2 files changed, 18 insertions(+), 36 deletions(-) commit ae7ad90e7cf29f3337ac1fe4e60162c51782c2b5 Author: Charles Keepax Date: Wed Nov 23 16:54:29 2022 +0000 ASoC: rt700: Switch to new snd_sdw_params_to_config helper The conversion from hw_params to SoundWire config is pretty standard as such most of the conversion can be handled by the new snd_sdw_params_to_config helper function. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221123165432.594972-6-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/rt700.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) commit 5b75bc7fc28af62622c57d80f607536b19796d8f Author: Charles Keepax Date: Wed Nov 23 16:54:28 2022 +0000 ASoC: rt5682-sdw: Switch to new snd_sdw_params_to_config helper The conversion from hw_params to SoundWire config is pretty standard as such most of the conversion can be handled by the new snd_sdw_params_to_config helper function. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221123165432.594972-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/rt5682-sdw.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit 0725dd0461fc682e9c1bcf9f436e60160dba65a5 Author: Charles Keepax Date: Wed Nov 23 16:54:27 2022 +0000 ASoC: rt1316-sdw: Switch to new snd_sdw_params_to_config helper The conversion from hw_params to SoundWire config is pretty standard as such most of the conversion can be handled by the new snd_sdw_params_to_config helper function. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221123165432.594972-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/rt1316-sdw.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) commit 896c59edcdafc4e213761184294cbccf47126a23 Author: Charles Keepax Date: Wed Nov 23 16:54:26 2022 +0000 ASoC: rt1308-sdw: Switch to new snd_sdw_params_to_config helper The conversion from hw_params to SoundWire config is pretty standard as such most of the conversion can be handled by the new snd_sdw_params_to_config helper function. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221123165432.594972-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/rt1308-sdw.c | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) commit d12f106177288a65b58b236304b6ceea4370f65d Author: Charles Keepax Date: Wed Nov 23 16:54:25 2022 +0000 ASoC: max98373-sdw: Switch to new snd_sdw_params_to_config helper The conversion from hw_params to SoundWire config is pretty standard as such most of the conversion can be handled by the new snd_sdw_params_to_config helper function. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221123165432.594972-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/max98373-sdw.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit e45875168d19051ebf0fc4b091da6256f3ea3669 Author: Charles Keepax Date: Wed Nov 23 16:54:24 2022 +0000 sound: sdw: Add hw_params to SoundWire config helper function The vast majority of the current users of the SoundWire framework have almost identical code for converting from hw_params to SoundWire configuration. Whilst complex devices might require more, it is very likely that most new devices will follow the same pattern. Save a little code by factoring this out into a helper function. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221123165432.594972-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown include/sound/sdw.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit d695d089e35e28f3f0ed4595a242922cc28f9b20 Author: Jean Delvare Date: Sun Nov 27 19:34:41 2022 +0100 ASoC: rsnd: 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 Link: https://lore.kernel.org/r/20221127193441.0b54484d@endymion.delvare Signed-off-by: Mark Brown sound/soc/sh/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9fd3b5b11db2fbbf0438324696de8233c0a78dad Author: V sujith kumar Reddy Date: Wed Nov 23 17:49:10 2022 +0530 ASoC: SOF: amd: ADD HS and SP virtual DAI. ADD HS and SP virtual DAI driver to support AMD platforms. Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20221123121911.3446224-4-vsujithkumar.reddy@amd.corp-partner.google.com Signed-off-by: Mark Brown sound/soc/sof/amd/rembrandt.c | 16 ++++++++++++++++ sound/soc/sof/amd/renoir.c | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) commit f9ced7dbbb551885c63632f1594997bdaf2177ee Author: V sujith kumar Reddy Date: Wed Nov 23 17:49:09 2022 +0530 ASoC: SOF: amd: Fix for selecting clock source as external clock. By default clock source is selected as internal clock of 96Mhz which is not configurable. Now we select the clock source to external clock (ACLK) which can be configurable to different clock ranges depending on usecase. Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20221123121911.3446224-3-vsujithkumar.reddy@amd.corp-partner.google.com Signed-off-by: Mark Brown sound/soc/sof/amd/acp.c | 4 +++- sound/soc/sof/amd/acp.h | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit aae7e412b0ec0378e392b18c50b612dae09cdb74 Author: V sujith kumar Reddy Date: Wed Nov 23 17:49:08 2022 +0530 ASoC: SOF: amd: Fix for reading position updates from stream box. By default the position updates are read from dsp box when streambox size is not defined.if the streambox size is defined to some value then position updates can be read from the streambox. Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20221123121911.3446224-2-vsujithkumar.reddy@amd.corp-partner.google.com Signed-off-by: Mark Brown sound/soc/sof/amd/acp-common.c | 1 + sound/soc/sof/amd/acp-ipc.c | 30 +++++++++++++++++++++++++++++- sound/soc/sof/amd/acp.h | 4 ++++ 3 files changed, 34 insertions(+), 1 deletion(-) commit b386acc043f44a730d5117b71b75e818cede21cc Author: Krzysztof Kozlowski Date: Tue Nov 15 13:02:35 2022 +0100 ASoC: dt-bindings: qcom,q6apm: Add SM8450 bedais node On SM8450 and SC8280XP, the Q6APM is a bit different: 1. It is used as a platform DAI link, so it needs #sound-dai-cells. 2. It has two DAI children, so add new "bedais" node. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221115120235.167812-12-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/qcom,q6apm.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 8c7ac825481602e356d96db9424b4d4e23a6a1d3 Author: Krzysztof Kozlowski Date: Tue Nov 15 13:02:34 2022 +0100 ASoC: dt-bindings: qcom,q6apm-lpass-dais: Split to separate schema The Qualcomm DSP LPASS Audio DAIs are a bit different than Qualcomm DSP Audio FrontEnd (Q6AFE) DAIs - they do not use children nodes for each DAI. None of other properties from qcom,q6dsp-lpass-ports.yaml apply here as well, so move the qcom,q6apm-lpass-dais compatible to its own binding. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221115120235.167812-11-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../bindings/sound/qcom,q6apm-lpass-dais.yaml | 32 ++++++++++++++++++++++ .../bindings/sound/qcom,q6dsp-lpass-ports.yaml | 1 - 2 files changed, 32 insertions(+), 1 deletion(-) commit 7eea2bed3602a2b2e71146e0110d42f6edf917f5 Author: Krzysztof Kozlowski Date: Tue Nov 15 13:02:33 2022 +0100 ASoC: dt-bindings: qcom,q6core: Split to separate schema The APR/GPR bindings with services got complicated so move out the Q6Core service to its own binding. Previously the compatible was documented in qcom,apr.yaml. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221115120235.167812-10-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/qcom,q6core.yaml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 8009abe0f14052bbfadcdaba7887226b40dfdb51 Author: Krzysztof Kozlowski Date: Tue Nov 15 13:02:32 2022 +0100 ASoC: dt-bindings: qcom,q6prm: Split to separate schema The APR/GPR bindings with services got complicated so move out the Q6PRM service to its own binding. Previously the compatible was documented in qcom,apr.yaml. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221115120235.167812-9-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/qcom,q6prm.yaml | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 83c8fa5e85e556e6aa3e95e7070ef738964ebd17 Author: Krzysztof Kozlowski Date: Tue Nov 15 13:02:31 2022 +0100 ASoC: dt-bindings: qcom,q6asm: Split to separate schema The APR/GPR bindings with services got complicated so move out the Q6ASM service to its own binding. Previously the compatible was documented in qcom,apr.yaml. Move most of the examples from its children to this new file. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221115120235.167812-8-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/qcom,q6asm-dais.yaml | 48 +++++---------- .../devicetree/bindings/sound/qcom,q6asm.yaml | 68 ++++++++++++++++++++++ 2 files changed, 84 insertions(+), 32 deletions(-) commit f26a776ea5ea22b5a92b0619af54d202e4027524 Author: Krzysztof Kozlowski Date: Tue Nov 15 13:02:30 2022 +0100 ASoC: dt-bindings: qcom,q6adm: Split to separate schema The APR/GPR bindings with services got complicated so move out the Q6ADM service to its own binding. Previously the compatible was documented in qcom,apr.yaml. Move most of the examples from its children to this new file. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221115120235.167812-7-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../bindings/sound/qcom,q6adm-routing.yaml | 22 ++-------- .../devicetree/bindings/sound/qcom,q6adm.yaml | 51 ++++++++++++++++++++++ 2 files changed, 54 insertions(+), 19 deletions(-) commit 6180b3252010f7cccdef896faf305456df4c45cf Author: Krzysztof Kozlowski Date: Tue Nov 15 13:02:29 2022 +0100 ASoC: dt-bindings: qcom,q6apm: Split to separate schema The APR/GPR bindings with services got complicated so move out the Q6APM service to its own binding. Previously the compatible was documented in qcom,apr.yaml. Move most of the examples from its children to this new file. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221115120235.167812-6-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/qcom,q6apm-dai.yaml | 19 ++------ .../devicetree/bindings/sound/qcom,q6apm.yaml | 51 ++++++++++++++++++++++ 2 files changed, 54 insertions(+), 16 deletions(-) commit 3e9c0c86267377f1404bc55051f476a0456dcced Author: Krzysztof Kozlowski Date: Tue Nov 15 13:02:28 2022 +0100 ASoC: dt-bindings: qcom,q6afe: Split to separate schema The APR/GPR bindings with services got complicated so move out the Q6AFE service to its own binding. Previously the compatible was documented in qcom,apr.yaml. Move most of the examples from its children to this new file. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221115120235.167812-5-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/qcom,q6afe.yaml | 68 ++++++++++++++++++++++ .../bindings/sound/qcom,q6dsp-lpass-clocks.yaml | 40 +------------ .../bindings/sound/qcom,q6dsp-lpass-ports.yaml | 56 +++--------------- 3 files changed, 80 insertions(+), 84 deletions(-) commit cd9ba3d065bb94f3c20e36ed400269a285bfa46d Author: Krzysztof Kozlowski Date: Tue Nov 15 13:02:27 2022 +0100 ASoC: dt-bindings: qcom,apr: Correct and extend example Correct the APR/GPR example: 1. Use consistent 4-space indentation, 2. Add required properties to services nodes, so the binding check passes once schema for these services is improved, 3. Add few other properties as APR/GPR is part of a GLINK edge: qcom,glink-channels and qcom,intents. 4. Drop unnecessary services, to make the example compact. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221115120235.167812-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/soc/qcom/qcom,apr.yaml | 61 ++++++++++++++-------- 1 file changed, 39 insertions(+), 22 deletions(-) commit 41288c30583646e2b4158c75ccdbddc62597e1fa Author: Krzysztof Kozlowski Date: Tue Nov 15 13:02:26 2022 +0100 ASoC: dt-bindings: qcom,apr: Split services to shared schema The APR/GPR nodes are organized like: apr-or-gpr-device-node <- qcom,apr.yaml apr-gpr-service@[0-9] <- qcom,apr.yaml service-specific-components <- /schemas/sound/qcom,q6*.yaml The schema for services (apr-gpr-service@[0-9]) already grows considerably and is still quite not specific. It allows several incorrect combinations, like adding a clock-controller to a APM device. Restricting it would complicate the schema even more. Bringing new support for sound on Qualcomm SM8450 and SC8280XP SoC would grow it as well. Simplify the qcom,apr.yaml by splitting the services to a shared file which will be: 1. Referenced by qcom,apr.yaml with additionalProperties:true, 2. Referenced by specific bindings for services with additionalProperties:false (not yet in this commit). While moving the code, add also required 'reg' and 'qcom,protection-domain' to further constrain the bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221115120235.167812-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown .../bindings/soc/qcom/qcom,apr-services.yaml | 54 ++++++++++++ .../devicetree/bindings/soc/qcom/qcom,apr.yaml | 98 +--------------------- MAINTAINERS | 2 +- 3 files changed, 58 insertions(+), 96 deletions(-) commit 0dd3618e06f86bbdacad3a40b25bf79b8917000c Author: Krzysztof Kozlowski Date: Tue Nov 15 13:02:25 2022 +0100 ASoC: dt-bindings: qcom,apr: Add GLINK channel name for SM8450 On SM8450 and SC8280XP with Qualcomm GPR, the GLINK channel name (qcom,glink-channels) for ADSP is "adsp_apps". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221115120235.167812-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 0c76ef3f26d5ef2ac2c21b47e7620cff35809fbb Author: Li Huafei Date: Sat Nov 26 19:43:16 2022 +0800 kprobes: Fix check for probe enabled in kill_kprobe() In kill_kprobe(), the check whether disarm_kprobe_ftrace() needs to be called always fails. This is because before that we set the KPROBE_FLAG_GONE flag for kprobe so that "!kprobe_disabled(p)" is always false. The disarm_kprobe_ftrace() call introduced by commit: 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler") to fix the NULL pointer reference problem. When the probe is enabled, if we do not disarm it, this problem still exists. Fix it by putting the probe enabled check before setting the KPROBE_FLAG_GONE flag. Link: https://lore.kernel.org/all/20221126114316.201857-1-lihuafei1@huawei.com/ Fixes: 3031313eb3d54 ("kprobes: Fix to check probe enabled before disarm_kprobe_ftrace()") Signed-off-by: Li Huafei Acked-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Signed-off-by: Masami Hiramatsu (Google) kernel/kprobes.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 21d0798acf85e9ff8a6c7d8918df7d98e145d688 Author: Zhen Lei Date: Mon Nov 28 12:42:42 2022 +0100 ARM: 9276/1: Refactor dump_instr() 1. Rename local variable 'val16' to 'tmp'. So that the processing statements of thumb and arm can be aligned. 2. Fix two sparse check warnings: (add __user for type conversion) warning: incorrect type in initializer (different address spaces) expected unsigned short [noderef] __user *register __p got unsigned short [usertype] * 3. Prepare for the next patch to avoid repeated judgment. Before: if (!user_mode(regs)) { if (thumb) else } else { if (thumb) else } After: if (thumb) { if (user_mode(regs)) else } else { if (user_mode(regs)) else } Signed-off-by: Zhen Lei Signed-off-by: Russell King (Oracle) arch/arm/kernel/traps.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 59e2cf8d21e05391c42628eb9fb5bb40f9d9698f Author: Nathan Chancellor Date: Mon Nov 21 20:21:21 2022 +0100 ARM: 9275/1: Drop '-mthumb' from AFLAGS_ISA When building with CONFIG_THUMB2_KERNEL=y + a version of clang from Debian using CROSS_COMPILE=arm-linux-gnueabihf-, the following warning occurs frequently: :383:9: warning: '__thumb2__' macro redefined [-Wmacro-redefined] #define __thumb2__ 2 ^ :353:9: note: previous definition is here #define __thumb2__ 1 ^ 1 warning generated. Debian carries a downstream patch that changes the default CPU of the arm-linux-gnueabihf target from 'arm1176jzf-s' (v6) to 'cortex-a7' (v7). As a result, '-mthumb' defines both '__thumb__' and '__thumb2__'. The define of '__thumb2__' via the command line was purposefully added to catch a situation like this. In a similar vein as commit 26b12e084bce ("ARM: 9264/1: only use -mtp=cp15 for the compiler"), do not add '-mthumb' to AFLAGS_ISA, as it is already passed to the assembler via '-Wa,-mthumb' and '__thumb2__' is already defined for preprocessing. Link: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/raw/622dbcbd40b316ed3905a2d25d9623544a06e6b1/debian/patches/930008-arm.diff Fixes: 1d2e9b67b001 ("ARM: 9265/1: pass -march= only to compiler") Reported-by: "kernelci.org bot" Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Reviewed-by: Ard Biesheuvel Signed-off-by: Nathan Chancellor Signed-off-by: Russell King (Oracle) arch/arm/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fea53546be574f2e357fa53f4a582788b20f283c Author: Amit Daniel Kachhap Date: Thu Nov 17 07:10:35 2022 +0100 ARM: 9274/1: Add hwcap for Speculative Store Bypassing Safe Speculative Store Bypassing Safe(FEAT_SSBS) is a feature present in AArch32 state for Armv8 and is represented by ID_PFR2_EL1.SSBS identification register. This feature denotes the presence of PSTATE.ssbs bit and hence adding a hwcap will enable the userspace to check it before trying to set/unset this PSTATE. This commit adds the ID feature bit detection, and uses elf_hwcap2 accordingly. Reviewed-by: Linus Walleij Signed-off-by: Amit Daniel Kachhap Signed-off-by: Russell King (Oracle) arch/arm/include/uapi/asm/hwcap.h | 1 + arch/arm/kernel/setup.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit 3bda6d88489769fba5672dc66debdc1f5516c5fe Author: Amit Daniel Kachhap Date: Thu Nov 17 07:05:19 2022 +0100 ARM: 9273/1: Add hwcap for Speculation Barrier(SB) Speculation Barrier(FEAT_SB) is a feature present in AArch32 state for Armv8 and is represented by ISAR6.SB identification register. This feature denotes the presence of SB instruction and hence adding a hwcap will enable the userspace to check it before trying to use this instruction. This commit adds the ID feature bit detection, and uses elf_hwcap2 accordingly. Reviewed-by: Linus Walleij Signed-off-by: Amit Daniel Kachhap Signed-off-by: Russell King (Oracle) arch/arm/include/uapi/asm/hwcap.h | 1 + arch/arm/kernel/setup.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit 956ca3a4eb81c1b8cc3226af3083847544dcb098 Author: Amit Daniel Kachhap Date: Thu Nov 17 06:58:31 2022 +0100 ARM: 9272/1: vfp: Add hwcap for FEAT_AA32I8MM Int8 matrix multiplication (FEAT_AA32I8MM) is a feature present in AArch32 state for Armv8 and is represented by ISAR6.I8MM identification register. This feature denotes the presence of VSMMLA, VSUDOT, VUMMLA, VUSMMLA and VUSDOT instructions and hence adding a hwcap will enable the userspace to check it before trying to use those instructions. Reviewed-by: Linus Walleij Signed-off-by: Amit Daniel Kachhap Signed-off-by: Russell King (Oracle) arch/arm/include/uapi/asm/hwcap.h | 1 + arch/arm/kernel/setup.c | 1 + arch/arm/vfp/vfpmodule.c | 6 ++++++ 3 files changed, 8 insertions(+) commit 23b6d4ad6e7a3028dd88aff7e2b0e5a81da8565e Author: Amit Daniel Kachhap Date: Thu Nov 17 06:42:07 2022 +0100 ARM: 9271/1: vfp: Add hwcap for FEAT_AA32BF16 Advanced SIMD BFloat16 (FEAT_AA32BF16) is a feature present in AArch32 state for Armv8 and is represented by ISAR6.BF16 identification register. This feature denotes the presence of VCVT, VCVTB, VCVTT, VDOT, VFMAB, VFMAT and VMMLA instructions and hence adding a hwcap will enable the userspace to check it before trying to use those instructions. Reviewed-by: Linus Walleij Signed-off-by: Amit Daniel Kachhap Signed-off-by: Russell King (Oracle) arch/arm/include/uapi/asm/hwcap.h | 1 + arch/arm/kernel/setup.c | 1 + arch/arm/vfp/vfpmodule.c | 6 ++++++ 3 files changed, 8 insertions(+) commit ce4835497c20991574fde492ab37ec666563d3e4 Author: Amit Daniel Kachhap Date: Thu Nov 17 06:37:21 2022 +0100 ARM: 9270/1: vfp: Add hwcap for FEAT_FHM Floating-point half-precision multiplication (FHM) is a feature present in AArch32 state for Armv8 and is represented by ISAR6.FHM identification register. This feature denotes the presence of VFMAL and VMFSL instructions and hence adding a hwcap will enable the userspace to check it before trying to use those instructions. Reviewed-by: Linus Walleij Signed-off-by: Amit Daniel Kachhap Signed-off-by: Russell King (Oracle) arch/arm/include/uapi/asm/hwcap.h | 1 + arch/arm/kernel/setup.c | 1 + arch/arm/vfp/vfpmodule.c | 6 ++++++ 3 files changed, 8 insertions(+) commit 62ea0d873af3ef0a7e8387b67241ad43e3d377e1 Author: Amit Daniel Kachhap Date: Thu Nov 17 06:32:56 2022 +0100 ARM: 9269/1: vfp: Add hwcap for FEAT_DotProd Advanced Dot product is a feature present in AArch32 state for Armv8 and is represented by ISAR6 identification register. This feature denotes the presence of UDOT and SDOT instructions and hence adding a hwcap will enable the userspace to check it before trying to use those instructions. Reviewed-by: Linus Walleij Signed-off-by: Amit Daniel Kachhap Signed-off-by: Russell King (Oracle) arch/arm/include/uapi/asm/hwcap.h | 1 + arch/arm/kernel/setup.c | 1 + arch/arm/vfp/vfpmodule.c | 10 ++++++++++ 3 files changed, 12 insertions(+) commit c00a19c8b143db31d660ee965e6a6f782ef090ff Author: Amit Daniel Kachhap Date: Thu Nov 17 06:28:22 2022 +0100 ARM: 9268/1: vfp: Add hwcap FPHP and ASIMDHP for FEAT_FP16 Floating point half-precision (FPHP) and Advanced SIMD half-precision (ASIMDHP) are VFP features (FEAT_FP16) represented by MVFR1 identification register. These capabilities can optionally exist with VFPv3 and mandatory with VFPv4. Both these new features exist for Armv8 architecture in AArch32 state. These hwcaps may be useful for the userspace to add conditional check before trying to use FEAT_FP16 feature specific instructions. Reviewed-by: Linus Walleij Signed-off-by: Amit Daniel Kachhap Signed-off-by: Russell King (Oracle) arch/arm/include/asm/vfp.h | 6 ++++++ arch/arm/include/uapi/asm/hwcap.h | 2 ++ arch/arm/kernel/setup.c | 2 ++ arch/arm/vfp/vfpmodule.c | 4 ++++ 4 files changed, 14 insertions(+) commit 74c344e6f153dd9ae97c99ad751723e4030d4af9 Author: Amit Daniel Kachhap Date: Thu Nov 17 06:16:12 2022 +0100 ARM: 9267/1: Define Armv8 registers in AArch32 state AArch32 Instruction Set Attribute Register 6 (ID_ISAR6_EL1) and AArch32 Processor Feature Register 2 (ID_PFR2_EL1) identifies some new features for the Armv8 architecture. This registers will be utilized to add hwcaps for those cpu features. These registers are marked as reserved for Armv7 and should be a RAZ. Reviewed-by: Linus Walleij Signed-off-by: Amit Daniel Kachhap Signed-off-by: Russell King (Oracle) arch/arm/include/asm/cputype.h | 4 ++++ 1 file changed, 4 insertions(+) commit 83fb5b55cd0cf58038ad2caad02c70fc244d5c80 Author: Rob Herring Date: Tue Nov 22 16:06:20 2022 -0600 arm64: dts: apple: Add t600x L1/L2 cache properties and nodes The t600x CPU nodes are missing the cache hierarchy information. The cache hierarchy on Arm can not be detected and needs to be described in DT. The OS scheduler can make use of this information for scheduling decisions. The cache size information is based on various articles about the processors. There's also an L3 system level cache (SLC). It's not described here because SLCs typically have some MMIO interface which would need to be described. Signed-off-by: Rob Herring Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t6002.dtsi | 51 +++++++++++++++++++++++++++++ arch/arm64/boot/dts/apple/t600x-common.dtsi | 51 +++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) commit 63ab33c08c41130ad82155515803e90d0e71e8ef Merge: 247f34f7b803 3d12938dbc04 Author: Marc Zyngier Date: Mon Nov 28 11:50:41 2022 +0000 Merge branch irq/loongarch-acpi into irq/irqchip-next * irq/loongarch-acpi: : . : More APCI fixes and improvements for the LoongArch architecture: : : - Work around trigger type for INTx interrupts described : via ACPI (Jianmin Lv). : : - ACPI support got the HTVEC controller (Huacai Chen) : : - Suspend/resume across the board (Huacai Chen) : : - Fixes and random cleanups : . irqchip/loongarch: Adjust acpi_cascade_irqdomain_init() and sub-routines irqchip/loongson-pch-lpc: Add suspend/resume support irqchip/loongson-pch-pic: Add suspend/resume support irqchip/loongson-eiointc: Add suspend/resume support irqchip/loongson-htvec: Add suspend/resume support irqchip/loongson-htvec: Add ACPI init support irqchip/loongson-liointc: Support to set IRQ type for ACPI path irqchip/loongson-pch-pic: Support to set IRQ type for ACPI path irqchip/loongson-pch-pic: Fix translate callback for DT path ACPI / PCI: fix LPIC IRQ model default PCI IRQ polarity Signed-off-by: Marc Zyngier commit 3d12938dbc048ecb193fec69898d95f6b4813a4b Author: Huacai Chen Date: Thu Oct 20 22:25:14 2022 +0800 irqchip/loongarch: Adjust acpi_cascade_irqdomain_init() and sub-routines 1, Adjust the return of acpi_cascade_irqdomain_init() and check its return value. 2, Combine unnecessary short lines to one long line. Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020142514.1725514-1-chenhuacai@loongson.cn drivers/irqchip/irq-loongarch-cpu.c | 30 ++++++++++++++++++------------ drivers/irqchip/irq-loongson-eiointc.c | 30 +++++++++++++++++------------- drivers/irqchip/irq-loongson-pch-pic.c | 15 +++++++++------ 3 files changed, 44 insertions(+), 31 deletions(-) commit 5c4e0aac0b2a27168844da49cee2c5dff2925d22 Author: AngeloGioacchino Del Regno Date: Mon Nov 28 10:22:17 2022 +0100 irqchip/irq-mtk-cirq: Add support for System CIRQ on MT8192 On some SoCs the System CIRQ register layout is slightly different, as there are more registers per function and in some cases other differences later in the layout: this is seen on at least MT8192, but it's also valid for some other "contemporary" SoCs both for Chromebooks and for smartphones. Add the new "v2" register layout and use it if the compatible "mediatek,mt8192-cirq" is found. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221128092217.36552-5-angelogioacchino.delregno@collabora.com drivers/irqchip/irq-mtk-cirq.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 45ac01959edcecfa5d6652c2397d3866e55b0da8 Author: AngeloGioacchino Del Regno Date: Mon Nov 28 10:22:16 2022 +0100 irqchip/irq-mtk-cirq: Move register offsets to const array In preparation to add support for new SoCs having a different register layout, add an enumeration that documents register offsets and move the definitions for the same to a u32 array; Selecting the right register offsets array is done by adding an of_device_id array containing all of the currently supported compatible strings pointing to the "v1" offsets array (as data): since no devicetree declares the `mediatek,mtk-cirq` compatible without a SoC-specific one, it wasn't necessary to provide any legacy fallback. Every usage of the aforemementioned definitions was changed to get a register address through a newly introduced `mtk_cirq_reg()` accessor. This change brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221128092217.36552-4-angelogioacchino.delregno@collabora.com drivers/irqchip/irq-mtk-cirq.c | 82 +++++++++++++++++++++++++++++++++--------- 1 file changed, 65 insertions(+), 17 deletions(-) commit ea5ef136e215fdef35f14010bc51fcd6686e6922 Author: Yuan Can Date: Sat Nov 26 04:34:10 2022 +0000 RDMA/nldev: Add checks for nla_nest_start() in fill_stat_counter_qps() As the nla_nest_start() may fail with NULL returned, the return value needs to be checked. Fixes: c4ffee7c9bdb ("RDMA/netlink: Implement counter dumpit calback") Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20221126043410.85632-1-yuancan@huawei.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/nldev.c | 2 ++ 1 file changed, 2 insertions(+) commit 85de640c6b89eb76fc314a3b451d054bedd5e9dc Author: AngeloGioacchino Del Regno Date: Mon Nov 28 10:22:15 2022 +0100 dt-bindings: interrupt-controller: mediatek,cirq: Document MT8192 Add compatible to support the SYS_CIRQ controller found on MT8192. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221128092217.36552-3-angelogioacchino.delregno@collabora.com .../devicetree/bindings/interrupt-controller/mediatek,mtk-cirq.yaml | 1 + 1 file changed, 1 insertion(+) commit 7f3974ef4e31d730e7aa902b30800ba0962277da Author: AngeloGioacchino Del Regno Date: Mon Nov 28 10:22:14 2022 +0100 dt-bindings: interrupt-controller: mediatek,cirq: Migrate to dt schema Migrate mediatek,cirq.txt to dt schema as mediatek,mtk-cirq.yaml. While at it, I've also fixed some typos that were present in the original txt binding, as it was suggesting that the compatible string would have "mediatek,cirq" as compatible but, in reality, that's supposed to be "mediatek,mtk-cirq" instead. Little rewording on property descriptions also happened for them to be more concise. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221128092217.36552-2-angelogioacchino.delregno@collabora.com .../interrupt-controller/mediatek,cirq.txt | 33 ----------- .../interrupt-controller/mediatek,mtk-cirq.yaml | 67 ++++++++++++++++++++++ 2 files changed, 67 insertions(+), 33 deletions(-) commit 5acf07ff25f0c1c44105e6b8ebf88c55a0a04d2f Author: Sven Peter Date: Fri Nov 4 16:41:53 2022 +0100 soc: apple: rtkit: Stop casting function pointer signatures Fixes: 9bd1d9a0d8bb ("soc: apple: Add RTKit IPC library") Reported-by: kernel test robot Signed-off-by: Sven Peter Signed-off-by: Hector Martin drivers/soc/apple/rtkit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 422d0b860dc223b5dfc6d083697cae258bb5a4a1 Author: Sven Peter Date: Fri Nov 4 16:39:02 2022 +0100 soc: apple: sart: Stop casting function pointer signatures Fixes: b170143ae111 ("soc: apple: Add SART driver") Reported-by: kernel test robot Signed-off-by: Sven Peter Signed-off-by: Hector Martin drivers/soc/apple/sart.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c7a5518ac39751ffab0ec563172ea8668ebc927c Merge: 1056d314709d cab75e1c8e42 Author: Rafael J. Wysocki Date: Mon Nov 28 12:09:31 2022 +0100 Merge back earlier cpufreq material for v6.2. commit c672e37279896f570cfa44926d57497e8d16033b Author: Suman Ghosh Date: Thu Nov 24 12:05:48 2022 +0530 octeontx2-pf: Add support to filter packet based on IP fragment 1. Added support to filter packets based on IP fragment. For IPv4 packets check for ip_flag == 0x20 (more fragment bit set). For IPv6 packets check for next_header == 0x2c (next_header set to 'fragment header for IPv6') 2. Added configuration support from both "ethtool ntuple" and "tc flower". Signed-off-by: Suman Ghosh Signed-off-by: David S. Miller drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 4 ++++ drivers/net/ethernet/marvell/octeontx2/af/npc.h | 2 ++ .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 8 +++++++ .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 8 +++++++ .../ethernet/marvell/octeontx2/nic/otx2_common.h | 3 +++ .../ethernet/marvell/octeontx2/nic/otx2_flows.c | 25 ++++++++++++++++++---- .../net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 25 ++++++++++++++++++++++ 7 files changed, 71 insertions(+), 4 deletions(-) commit a66d79ee0bd5140a64b72cde588f8c83a55a1eb9 Author: Sujuan Chen Date: Thu Nov 24 11:18:14 2022 +0800 net: ethernet: mtk_wed: add wcid overwritten support for wed v1 All wed versions should enable the wcid overwritten feature, since the wcid size is controlled by the wlan driver. Tested-by: Sujuan Chen Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Signed-off-by: Sujuan Chen Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_wed.c | 13 ++++++++----- drivers/net/ethernet/mediatek/mtk_wed_regs.h | 2 ++ include/linux/soc/mediatek/mtk_wed.h | 3 +++ 3 files changed, 13 insertions(+), 5 deletions(-) commit 456b59e757b0c558df550764a4fd5ae6877e93f8 Author: Al Viro Date: Thu Nov 24 17:03:11 2022 +0000 ovl: update ->f_iocb_flags when ovl_change_flags() modifies ->f_flags ovl_change_flags() is an open-coded variant of fs/fcntl.c:setfl() and it got missed by commit 164f4064ca81 ("keep iocb_flags() result cached in struct file"); the same change applies there. Reported-by: Pierre Labastie Fixes: 164f4064ca81 ("keep iocb_flags() result cached in struct file") Cc: # v6.0 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216738 Signed-off-by: Al Viro Signed-off-by: Miklos Szeredi fs/overlayfs/file.c | 1 + 1 file changed, 1 insertion(+) commit 27e714c007e4ad01837bf0fac5c11913a38d7695 Author: Al Viro Date: Sat Nov 26 03:17:17 2022 +0000 ext2: unbugger ext2_empty_dir() In 27cfa258951a "ext2: fix fs corruption when trying to remove a non-empty directory with IO error" a funny thing has happened: - page = ext2_get_page(inode, i, dir_has_error, &page_addr); + page = ext2_get_page(inode, i, 0, &page_addr); - if (IS_ERR(page)) { - dir_has_error = 1; - continue; - } + if (IS_ERR(page)) + goto not_empty; And at not_empty: we hit ext2_put_page(page, page_addr), which does put_page(page). Which, unless I'm very mistaken, should oops immediately when given ERR_PTR(-E...) as page. OK, shit happens, insufficiently tested patches included. But when commit in question describes the fault-injection test that exercised that particular failure exit... Ow. CC: stable@vger.kernel.org Fixes: 27cfa258951a ("ext2: fix fs corruption when trying to remove a non-empty directory with IO error") Signed-off-by: Al Viro Signed-off-by: Jan Kara fs/ext2/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 672e4268b2863d7e4978dfed29552b31c2f9bd4e Author: Chen Zhongjin Date: Mon Nov 28 11:33:05 2022 +0100 ovl: fix use inode directly in rcu-walk mode ovl_dentry_revalidate_common() can be called in rcu-walk mode. As document said, "in rcu-walk mode, d_parent and d_inode should not be used without care". Check inode here to protect access under rcu-walk mode. Fixes: bccece1ead36 ("ovl: allow remote upper") Reported-and-tested-by: syzbot+a4055c78774bbf3498bb@syzkaller.appspotmail.com Signed-off-by: Chen Zhongjin Cc: # v5.7 Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 09f530f0c6d6689eee5e690c6d98f495fcc3a0f9 Author: Jason Gunthorpe Date: Wed Nov 23 20:27:14 2022 -0400 RDMA: Add netdevice_tracker to ib_device_set_netdev() This will cause an informative backtrace to print if the user of ib_device_set_netdev() isn't careful about tearing down the ibdevice before its the netdevice parent is destroyed. Such as like this: unregister_netdevice: waiting for vlan0 to become free. Usage count = 2 leaked reference. ib_device_set_netdev+0x266/0x730 siw_newlink+0x4e0/0xfd0 nldev_newlink+0x35c/0x5c0 rdma_nl_rcv_msg+0x36d/0x690 rdma_nl_rcv+0x2ee/0x430 netlink_unicast+0x543/0x7f0 netlink_sendmsg+0x918/0xe20 sock_sendmsg+0xcf/0x120 ____sys_sendmsg+0x70d/0x8b0 ___sys_sendmsg+0x11d/0x1b0 __sys_sendmsg+0xfa/0x1d0 do_syscall_64+0x35/0xb0 entry_SYSCALL_64_after_hwframe+0x63/0xcd This will help debug the issues syzkaller is seeing. Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v1-a7c81b3842ce+e5-netdev_tracker_jgg@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/device.c | 6 ++++-- include/rdma/ib_verbs.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit f5259b045c19f6e997bd12d53a5f76663537c1fd Author: Samuel Holland Date: Sat Nov 26 13:48:05 2022 -0600 irqchip/sifive-plic: Support wake IRQs The PLIC does not define any special method for marking interrupts as wakeup-capable, so it should have the IRQCHIP_SKIP_SET_WAKE flag set. Signed-off-by: Samuel Holland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221126194805.19431-1-samuel@sholland.org drivers/irqchip/irq-sifive-plic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e88906b169ebcb8046e8f0ad76edd09ab41cfdfe Author: Bruno Thomsen Date: Sun Nov 27 18:08:11 2022 +0100 USB: serial: cp210x: add Kamstrup RF sniffer PIDs The RF sniffers are based on cp210x where the RF frontends are based on a different USB stack. RF sniffers can analyze packets meta data including power level and perform packet injection. Can be used to perform RF frontend self-test when connected to a concentrator, ex. arch/arm/boot/dts/imx7d-flex-concentrator.dts Signed-off-by: Bruno Thomsen Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 2 ++ 1 file changed, 2 insertions(+) commit 5776a9cd2a66cdc037c8e6ee34cde40ee768893d Author: Trond Myklebust Date: Wed Nov 16 11:11:53 2022 -0500 NFS: Fix a race in nfs_call_unlink() We should check that the filehandles match before transferring the sillyrename data to the newly looked-up dentry in case the name was reused on the server. Signed-off-by: Trond Myklebust fs/nfs/unlink.c | 1 + 1 file changed, 1 insertion(+) commit 35e3b6ae84935d0d7ff76cbdaa83411b0ad5e471 Author: Trond Myklebust Date: Mon Nov 14 17:30:39 2022 -0500 NFS: Fix an Oops in nfs_d_automount() When mounting from a NFSv4 referral, path->dentry can end up being a negative dentry, so derive the struct nfs_server from the dentry itself instead. Fixes: 2b0143b5c986 ("VFS: normal filesystems (and lustre): d_inode() annotations") Signed-off-by: Trond Myklebust fs/nfs/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51069e4aef6257b0454057359faed0ab0c9af083 Author: Trond Myklebust Date: Fri Nov 4 13:20:01 2022 -0400 NFSv4: Fix a deadlock between nfs4_open_recover_helper() and delegreturn If we're asked to recover open state while a delegation return is outstanding, then the state manager thread cannot use a cached open, so if the server returns a delegation, we can end up deadlocked behind the pending delegreturn. To avoid this problem, let's just ask the server not to give us a delegation unless we're explicitly reclaiming one. Fixes: be36e185bd26 ("NFSv4: nfs4_open_recover_helper() must set share access") Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit e83458fce080dc23c25353a1af90bfecf79c7369 Author: Trond Myklebust Date: Thu Oct 27 16:50:12 2022 -0400 NFSv4: Fix a credential leak in _nfs4_discover_trunking() Fixes: 4f40a5b55446 ("NFSv4: Add an fattr allocation to _nfs4_discover_trunking()") Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 85aa8ddc3818718208c3cfdfda9c8c908c9dead1 Author: Benjamin Coddington Date: Tue Sep 20 13:00:21 2022 -0400 NFS: Trigger the "ls -l" readdir heuristic sooner Since commit 1a34c8c9a49e ("NFS: Support larger readdir buffers") has updated dtsize, and with recent improvements to the READDIRPLUS helper heuristic, the heuristic may not trigger until many dentries are emitted to userspace. This will cause many thousands of GETATTR calls for "ls -l" when the directory's pagecache has already been populated. This manifests as poor performance for long directory listings after an initially fast "ls -l". Fix this by emitting only 17 entries for any first pass through the NFS directory's ->iterate_shared(), which allows userpace to prime the counters for the heuristic. Signed-off-by: Benjamin Coddington Signed-off-by: Trond Myklebust fs/nfs/dir.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c528f70f504434eaff993a5ddd52203a2010d51f Author: Trond Myklebust Date: Wed Oct 19 13:12:11 2022 -0400 NFSv4.2: Fix initialisation of struct nfs4_label The call to nfs4_label_init_security() should return a fully initialised label. Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 43c1031f7110967c240cb6e922adcfc4b8899183 Author: Trond Myklebust Date: Tue Oct 18 18:21:14 2022 -0400 NFSv4.2: Fix a memory stomp in decode_attr_security_label We must not change the value of label->len if it is zero, since that indicates we stored a label. Fixes: b4487b935452 ("nfs: Fix getxattr kernel panic and memory overflow") Signed-off-by: Trond Myklebust fs/nfs/nfs4xdr.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit c8a62f440229ae7a10874776344dfcc17d860336 Author: Trond Myklebust Date: Tue Oct 18 17:41:30 2022 -0400 NFSv4.2: Always decode the security label If the server returns a reply that includes a security label, then we must decode it whether or not we can store the results. Fixes: 1e2f67da8931 ("NFS: Remove the nfs4_label argument from decode_getattr_*() functions") Signed-off-by: Trond Myklebust fs/nfs/nfs4xdr.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit eef7314caf2d73a94b68ba293cd105154d3a664e Author: Trond Myklebust Date: Tue Oct 18 16:44:47 2022 -0400 NFSv4.2: Clear FATTR4_WORD2_SECURITY_LABEL when done decoding We need to clear the FATTR4_WORD2_SECURITY_LABEL bitmap flag irrespective of whether or not the label is too long. Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Trond Myklebust fs/nfs/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0eb43812c0270ee3d005ff32f91f7d0a6c4943af Author: Trond Myklebust Date: Fri Aug 26 19:44:44 2022 -0400 NFS: Clear the file access cache upon login POSIX typically only refreshes the user's supplementary group information upon login. Since NFS servers may often refresh their concept of the user supplementary group membership at their own cadence, it is possible for the NFS client's access cache to become stale due to the user's group membership changing on the server after the user has already logged in on the client. While it is reasonable to expect that such group membership changes are rare, and that we do not want to optimise the cache to accommodate them, it is also not unreasonable for the user to expect that if they log out and log back in again, that the staleness would clear up. Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Signed-off-by: Trond Myklebust fs/nfs/dir.c | 23 +++++++++++++++++++++++ include/linux/nfs_fs.h | 1 + 2 files changed, 24 insertions(+) commit 99d2900f5fa4b8021631a604cf54b52b94587722 Author: Konstantin Porotchkin Date: Wed Nov 9 17:07:43 2022 +0200 arm64: dts: marvell: add optee FW definitions Add reserved memory and ARM firmware definitions for optee memory region in Marvell Armada SoCs to avoid protected memory access. Signed-off-by: Konstantin Porotchkin Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 5 +++++ arch/arm64/boot/dts/marvell/armada-ap80x.dtsi | 5 +++++ 2 files changed, 10 insertions(+) commit b5d971cf170e09fffc25b58b0de3cfdb0a1c342d Author: Pierre Gondois Date: Mon Oct 31 10:20:16 2022 +0100 arm64: dts: Update cache properties for marvell 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 recently added init_of_cache_level() function checks these properties. Add them if missing. Signed-off-by: Pierre Gondois Reviewed-by: Chris Packham Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi | 2 ++ arch/arm64/boot/dts/marvell/armada-ap807-quad.dtsi | 2 ++ 4 files changed, 6 insertions(+) commit 21aad8ba615e9c39cee6c5d0b76726f63791926c Author: Pali Rohár Date: Sat Sep 24 13:58:26 2022 +0200 arm64: dts: armada-3720-turris-mox: Add missing interrupt for RTC MCP7940MT-I/MNY RTC has connected interrupt line to GPIO2_5. Fixes: 7109d817db2e ("arm64: dts: marvell: add DTS for Turris Mox") Signed-off-by: Pali Rohár Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 3 +++ 1 file changed, 3 insertions(+) commit 11f24029403e6e24b6136c852511b7cfb7b39f5e Author: Chris Packham Date: Fri Feb 11 13:32:56 2022 +1300 ARM: dts: armada-xp: add interrupts for watchdog The first interrupt is for the regular watchdog timeout. Normally the RSTOUT line will trigger a reset before this interrupt fires but on systems with a non-standard reset it may still trigger. The second interrupt is for a timer1 which is used as a pre-timeout for the watchdog. Signed-off-by: Chris Packham Acked-by: Gregory CLEMENT Acked-by: Guenter Roeck Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 1 + arch/arm/boot/dts/armada-xp.dtsi | 1 + 2 files changed, 2 insertions(+) commit f4237d74e8ed507ccd39cdd35458c30b8d5c577b Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:32 2022 +0100 ARM: dts: armada: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: armada-370-seagate-personal-cloud.dtb: gpio-leds: 'red-sata0' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370-dlink-dns327l.dts | 6 +++--- arch/arm/boot/dts/armada-370-seagate-nas-4bay.dts | 4 ++-- arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi | 8 ++++---- arch/arm/boot/dts/armada-370-seagate-personal-cloud.dtsi | 2 +- arch/arm/boot/dts/armada-385-linksys-caiman.dts | 4 ++-- arch/arm/boot/dts/armada-385-linksys-cobra.dts | 4 ++-- arch/arm/boot/dts/armada-385-linksys-rango.dts | 8 ++++---- arch/arm/boot/dts/armada-385-linksys-shelby.dts | 4 ++-- arch/arm/boot/dts/armada-385-linksys.dtsi | 4 ++-- arch/arm/boot/dts/armada-385-synology-ds116.dts | 2 +- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) commit 4839e77bb305682c0ce418ab73d5543cf7f27e2a Author: Dmitry Torokhov Date: Tue Nov 15 15:12:41 2022 -0800 ARM: mvebu: switch to using gpiod API in pm-board code This switches PM code to use the newer gpiod API instead of legacy gpio API that we want to retire. Signed-off-by: Dmitry Torokhov Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/mach-mvebu/pm-board.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit d10886a4e6f85ee18d47a1066a52168461370ded Author: Pali Rohár Date: Thu Jul 14 20:33:28 2022 +0200 ARM: dts: armada-39x: Fix compatible string for gpios Armada 39x supports per CPU interrupts for gpios, like Armada XP. So add compatible string "marvell,armadaxp-gpio" for Armada 39x GPIO nodes. Driver gpio-mvebu.c which handles both pre-XP and XP variants already provides support for per CPU interrupts on XP and newer variants. Signed-off-by: Pali Rohár Fixes: d81a914fc630 ("ARM: dts: mvebu: armada-39x: add missing nodes describing GPIO's") Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-39x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c4de4667f15d04ef5920bacf41e514ec7d1ef03d Author: Pali Rohár Date: Thu Jul 14 20:33:27 2022 +0200 ARM: dts: armada-38x: Fix compatible string for gpios Armada 38x supports per CPU interrupts for gpios, like Armada XP. Pre-XP variants like Armada 370 do not support per CPU interrupts for gpios. So change compatible string for Armada 38x from "marvell,armada-370-gpio" which indicates pre-XP variant to "marvell,armadaxp-gpio" which indicates XP variant or new. Driver gpio-mvebu.c which handles both pre-XP and XP variants already provides support for per CPU interrupts on XP and newer variants. Signed-off-by: Pali Rohár Fixes: 7cb2acb3fbae ("ARM: dts: mvebu: Add PWM properties for armada-38x") Acked-by: Uwe Kleine-König Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-38x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f87db2005f73876602211af0ee156817019b6bda Author: Pali Rohár Date: Thu Aug 25 14:21:02 2022 +0200 ARM: dts: turris-omnia: Add switch port 6 node Switch port 6 is connected to eth0, so add appropriate device tree node for it. Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") Signed-off-by: Pali Rohár Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-turris-omnia.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f1f3e530c59a7e8c5f06172f4c28b945a6b4bfb8 Author: Pali Rohár Date: Wed Jul 27 15:09:26 2022 +0200 ARM: dts: turris-omnia: Add ethernet aliases This allows bootloader to correctly pass MAC addresses used by bootloader to individual interfaces into kernel device tree. Signed-off-by: Pali Rohár Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-turris-omnia.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 69236d2391b4d7324b11c3252921571577892e7b Author: Pali Rohár Date: Thu Aug 18 00:30:53 2022 +0200 ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself. Fixes: 538da83ddbea ("ARM: mvebu: add Device Tree files for Armada 39x SoC and board") Signed-off-by: Pali Rohár Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-39x.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 44f47b7a8fa4678ce4c38ea74837e4996b9df6d6 Author: Pali Rohár Date: Thu Aug 18 00:30:52 2022 +0200 ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself. Fixes: 0d3d96ab0059 ("ARM: mvebu: add Device Tree description of the Armada 380/385 SoCs") Signed-off-by: Pali Rohár Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-380.dtsi | 4 ++-- arch/arm/boot/dts/armada-385.dtsi | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 823956d2436f70ced74c0fe8ab99facd8abfc060 Author: Pali Rohár Date: Thu Aug 18 00:30:51 2022 +0200 ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself. Fixes: 4de59085091f ("ARM: mvebu: add Device Tree description of the Armada 375 SoC") Signed-off-by: Pali Rohár Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-375.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eab276787f456cbea89fabea110fe0728673d308 Author: Pali Rohár Date: Thu Aug 18 00:30:50 2022 +0200 ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself. Fixes: 9d8f44f02d4a ("arm: mvebu: add PCIe Device Tree informations for Armada XP") Fixes: 12b69a599745 ("ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable") Fixes: 2163e61c92d9 ("ARM: mvebu: fix second and third PCIe unit of Armada XP mv78260") Signed-off-by: Pali Rohár Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-mv78230.dtsi | 8 ++++---- arch/arm/boot/dts/armada-xp-mv78260.dtsi | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) commit d9208b0fa2e803d16b28d91bf1d46b7ee9ea13c6 Author: Pali Rohár Date: Thu Aug 18 00:30:49 2022 +0200 ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself. Fixes: a09a0b7c6ff1 ("arm: mvebu: add PCIe Device Tree informations for Armada 370") Signed-off-by: Pali Rohár Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dcc7d8c72b64a479b8017e4332d99179deb8802d Author: Pali Rohár Date: Thu Aug 18 00:30:48 2022 +0200 ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself. Fixes: 74ecaa403a74 ("ARM: dove: add PCIe controllers to SoC DT") Signed-off-by: Pali Rohár Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/dove.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e977a103840c57d72b52cbc8c17f87f86ef9aa8d Author: Pawel Dembicki Date: Sat Oct 29 22:57:38 2022 +0200 ARM: dts: kirkwood: Add Zyxel NSA310S board Zyxel NSA310S is a NAS based on Marvell kirkwood SoC. Specification: - Processor Marvell 88F6702 1 GHz - 256MB RAM - 128MB NAND - 1x GBE LAN port (PHY: Marvell 88E1318) - 2x USB 2.0 - 1x SATA - 3x button - 7x leds - serial on J1 connector (115200 8N1) (GND-NOPIN-RX-TX-VCC) Tested-by: Tony Dinh Signed-off-by: Pawel Dembicki Acked-by: Adam Baker Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/kirkwood-nsa310s.dts | 259 +++++++++++++++++++++++++++++++++ 2 files changed, 260 insertions(+) commit 3b730f48ac3be0f9afe8c87fcf404b65bd940b49 Author: Pali Rohár Date: Tue Sep 27 16:19:20 2022 +0200 arm64: dts: armada-3720-turris-mox: Define slot-power-limit-milliwatt for PCIe PCIe Slot Power Limit on Turris Mox is 10W. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 1 + 1 file changed, 1 insertion(+) commit 571650b3a30f67d70df242508631ed5e7de2c2df Author: Hans de Goede Date: Sun Nov 27 19:02:24 2022 +0100 power: supply: bq25890: Only use pdata->regulator_init_data for vbus bq25890_platform_data.regulator_init_data is intended to only provide regulator init_data for the vbus regulator. Remove this from the regulator_config before registering the vsys regulator. Otherwise the regulator_register() call for vsys will fail because it tries to register duplicate consumer_dev_name + supply names from init_data->consumer_supplies[], leading to the entire probe of the bq25890 driver failing: [ 32.017501] bq25890-charger i2c-bq25892_main: Failed to set supply vbus [ 32.017525] bq25890-charger i2c-bq25892_main: error -EBUSY: registering vsys regulator [ 32.124978] bq25890-charger: probe of i2c-bq25892_main failed with error -16 Fixes: 14a3d159abf8 ("power: supply: bq25890: Add Vsys regulator") Signed-off-by: Hans de Goede Reviewed-by: Marek Vasut Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 2 ++ 1 file changed, 2 insertions(+) commit fa9b88e459d710cadf3b01e8a64eda00cc91cdd6 Author: Vlastimil Babka Date: Mon Nov 21 16:06:38 2022 +0100 mm, slub: refactor free debug processing Since commit c7323a5ad078 ("mm/slub: restrict sysfs validation to debug caches and make it safe"), caches with debugging enabled use the free_debug_processing() function to do both freeing checks and actual freeing to partial list under list_lock, bypassing the fast paths. We will want to use the same path for CONFIG_SLUB_TINY, but without the debugging checks, so refactor the code so that free_debug_processing() does only the checks, while the freeing is handled by a new function free_to_partial_list(). For consistency, change return parameter alloc_debug_processing() from int to bool and correct the !SLUB_DEBUG variant to return true and not false. This didn't matter until now, but will in the following changes. Signed-off-by: Vlastimil Babka Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> mm/slub.c | 154 +++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 83 insertions(+), 71 deletions(-) commit 3d97d976e5d58554570003ca5297a67142ae4e29 Author: Vlastimil Babka Date: Wed Nov 16 16:48:23 2022 +0100 mm, slab: ignore SLAB_RECLAIM_ACCOUNT with CONFIG_SLUB_TINY SLAB_RECLAIM_ACCOUNT caches allocate their slab pages with __GFP_RECLAIMABLE and can help against fragmentation by grouping pages by mobility, but on tiny systems mobility grouping is likely disabled anyway and ignoring SLAB_RECLAIM_ACCOUNT might instead lead to merging of caches that are made incompatible just by the flag. Thus with CONFIG_SLUB_TINY, make SLAB_RECLAIM_ACCOUNT ineffective. Signed-off-by: Vlastimil Babka Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter include/linux/slab.h | 4 ++++ 1 file changed, 4 insertions(+) commit 2f7c1c1396b587e8cfe18a1f0d628cedaae56b6a Author: Vlastimil Babka Date: Tue Nov 15 18:19:28 2022 +0100 mm, slub: don't create kmalloc-rcl caches with CONFIG_SLUB_TINY Distinguishing kmalloc(__GFP_RECLAIMABLE) can help against fragmentation by grouping pages by mobility, but on tiny systems the extra memory overhead of separate set of kmalloc-rcl caches will probably be worse, and mobility grouping likely disabled anyway. Thus with CONFIG_SLUB_TINY, don't create kmalloc-rcl caches and use the regular ones. Signed-off-by: Vlastimil Babka Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter include/linux/slab.h | 9 +++++++-- mm/slab_common.c | 10 ++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) commit 90ce872c22b248724d1c87232410e3b38536e107 Author: Vlastimil Babka Date: Mon Nov 21 11:44:54 2022 +0100 mm, slub: lower the default slub_max_order with CONFIG_SLUB_TINY With CONFIG_SLUB_TINY we want to minimize memory overhead. By lowering the default slub_max_order we can make slab allocations use smaller pages. However depending on object sizes, order-0 might not be the best due to increased fragmentation. When testing on a 8MB RAM k210 system by Damien Le Moal [1], slub_max_order=1 had the best results, so use that as the default for CONFIG_SLUB_TINY. [1] https://lore.kernel.org/all/6a1883c4-4c3f-545a-90e8-2cd805bcf4ae@opensource.wdc.com/ Signed-off-by: Vlastimil Babka Acked-by: Roman Gushchin Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter mm/slub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5a8a3c1f73c6488d1a2c18ac1f5308b1fd2aa5f0 Author: Vlastimil Babka Date: Tue Nov 15 10:50:28 2022 +0100 mm, slub: retain no free slabs on partial list with CONFIG_SLUB_TINY SLUB will leave a number of slabs on the partial list even if they are empty, to avoid some slab freeing and reallocation. The goal of CONFIG_SLUB_TINY is to minimize memory overhead, so set the limits to 0 for immediate slab page freeing. Signed-off-by: Vlastimil Babka Acked-by: Roman Gushchin Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter mm/slub.c | 5 +++++ 1 file changed, 5 insertions(+) commit b1a413a39a1a7694acf3636a52c109821148ecdd Author: Vlastimil Babka Date: Mon Nov 14 18:18:39 2022 +0100 mm, slub: disable SYSFS support with CONFIG_SLUB_TINY Currently SLUB enables its sysfs support depending unconditionally on the general CONFIG_SYSFS setting. To reduce the configuration combination space, make CONFIG_SLUB_TINY disable SLUB's sysfs support by reusing the existing SLAB_SUPPORTS_SYSFS define. It is unlikely that real tiny systems would combine CONFIG_SLUB_TINY with CONFIG_SYSFS, but a randconfig might. Signed-off-by: Vlastimil Babka Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter include/linux/slub_def.h | 2 +- mm/slub.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit e240e53ae0abb0896e0f399bdfef41c69cec3123 Author: Vlastimil Babka Date: Mon Nov 14 18:13:45 2022 +0100 mm, slub: add CONFIG_SLUB_TINY For tiny systems that have used SLOB until now, SLUB might be impractical due to its higher memory usage. To help with that, introduce an option CONFIG_SLUB_TINY that modifies SLUB to use less memory. This is done by sacrificing scalability, security and debugging features, therefore not recommended for any system with more than 16MB RAM. This commit introduces the option and uses it to set other related options in a way that reduces memory usage. Signed-off-by: Vlastimil Babka Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter lib/Kconfig.kasan | 2 +- mm/Kconfig | 21 +++++++++++++++++---- mm/Kconfig.debug | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) commit 346907ceb9d11b9e22677c142b45ff50dd20a66a Author: Vlastimil Babka Date: Wed Nov 16 15:56:32 2022 +0100 mm, slab: ignore hardened usercopy parameters when disabled With CONFIG_HARDENED_USERCOPY not enabled, there are no __check_heap_object() checks happening that would use the struct kmem_cache useroffset and usersize fields. Yet the fields are still initialized, preventing merging of otherwise compatible caches. Also the fields contribute to struct kmem_cache size unnecessarily when unused. Thus #ifdef them out completely when CONFIG_HARDENED_USERCOPY is disabled. In kmem_dump_obj() print object_size instead of usersize, as that's actually the intention. In a quick virtme boot test, this has reduced the number of caches in /proc/slabinfo from 131 to 111. Cc: Kees Cook Signed-off-by: Vlastimil Babka Acked-by: Roman Gushchin Acked-by: Mike Rapoport Reviewed-by: Christoph Lameter include/linux/slab_def.h | 2 ++ include/linux/slub_def.h | 2 ++ mm/slab.h | 2 -- mm/slab_common.c | 13 ++++++++++--- mm/slub.c | 4 ++++ 5 files changed, 18 insertions(+), 5 deletions(-) commit 97fa21f65c3eb5bbab9b4734bed37fd624cddd86 Author: Borislav Petkov Date: Sun Nov 6 22:24:08 2022 +0100 x86/resctrl: Move MSR defines into msr-index.h msr-index.h should contain all MSRs for easier grepping for MSR numbers when dealing with unchecked MSR access warnings, for example. Move the resctrl ones. Prefix IA32_PQR_ASSOC with "MSR_" while at it. No functional changes. Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221106212923.20699-1-bp@alien8.de arch/x86/include/asm/msr-index.h | 21 +++++++++++++++------ arch/x86/include/asm/resctrl.h | 8 +++----- arch/x86/kernel/cpu/resctrl/core.c | 2 +- arch/x86/kernel/cpu/resctrl/internal.h | 10 ---------- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 4 ++-- 5 files changed, 21 insertions(+), 24 deletions(-) commit 6e6df27064aa0a95b6c8a2e2757de35a244649a5 Merge: 75621ae307ca 86fdd15e10e4 Author: Greg Kroah-Hartman Date: Sun Nov 27 15:05:05 2022 +0100 Merge tag 'iio-fixes-for-6.1d' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: 4th set of IIO fixes for 6.1 Single patch fixing a memory leak in an error path. Fine to queue either for 6.2 if too late for 6.1 * tag 'iio-fixes-for-6.1d' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: fix memory leak in iio_device_register_eventset() dt-bindings: iio: adc: Remove the property "aspeed,trim-data-valid" iio: adc: aspeed: Remove the trim valid dts property. iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails iio: accel: bma400: Fix memory leak in bma400_get_steps_reg() iio: light: rpr0521: add missing Kconfig dependencies iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw iio: health: afe4403: Fix oob read in afe4403_read_raw iio: light: apds9960: fix wrong register for gesture gain commit 75621ae307caf4efa0a61152b667bf7083850ffe Merge: 9bde43a0e2f4 f84eec02b724 Author: Greg Kroah-Hartman Date: Sun Nov 27 14:40:05 2022 +0100 Merge tag 'iio-for-6.2b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: 2nd set of IIO new device support, cleanups etc for 6.2 Includes a few late breaking fixes for old issues. Contains a large set of conversions from i2c probe() to probe_new() as part of an attempt to finally get rid of the old style probe(). New devices support * adi,ad74115 - New driver for this complex input/output device with 16 bit ADCs, 14 bit DACs amongst other features. - A few tidy ups / removal of unused data patches followed. * adi,adf4377 - New driver for this dual output integer-N phased locked loop and VCO chip. * maxim,max30208 - New driver for this high accuracy digital temperature sensor. * st,lsm6dsx - Support for LSM6DS016IS (chip specific data) - Support for ISM330IS (id entry only) Minor cleanups etc * adi,adis - Fix a deadlock on device instance specific mutex. - Tidy up by calling unlocked form of __adis_initial_startup() in all cases and dropping the locked version. * adi,ad4130 - Reference spi-peripehral-props.yaml in the dt-binding. * adi,ad74413r - Fix a bug brought on by integer promotion of signed value to unsigned type. - Add an spi_device_id table to allow module autoloading to work. - Add support for reset pin. * adi,ad7606_par - devm_platform_get_and_ioremap_resource() instead of opencoding. * adi,ad7923 - Add dt-bindings docs for ad7927 via a fallback to ad7928 and do similar for ad7924. * adi,ltc2983 - Drop a now unneeded $ref for -nanoamp property as dt-schema no covers this unit. * maxim,max11410 - Fix mask due to repeated use of VREFN instead of one of them being VREFP. * qcom,spmi-iadc - Add fallback compatibles to dt-binding. * renesas,rzg2l - Document use for RZ/Five SoC. * st,stm32-adc - Improved calibration support with error logging and a debugfs interface to read back the result. * ti,adc128s052 - Fix an issue with missing data members in the adc128_of_match table that meant all device were being handled as adc128s052 ADCs. * tag 'iio-for-6.2b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (178 commits) iio: addac: ad74413r: fix blank line after declaration warning iio: addac: ad74115: remove unused ad74115_dac_slew_rate_hz_tbl dt-bindings: iio: imu: st_lsm6dsx: add ism330is iio: imu: st_lsm6dsx: add support to ISM330IS iio: frequency: adf4377: add support for ADF4377 dt-bindings: iio: frequency: add adf4377 doc dt-bindings: iio: adc: ad4130: use spi-peripheral-props.yaml dt-bindings: iio: temperature: ltc2983: drop $ref for -nanoamp properties dt-bindings: iio: adc: renesas,rzg2l-adc: Document RZ/Five SoC iio: adc128s052: add proper .data members in adc128_of_match table iio: adc: stm32-adc: add debugfs to read raw calibration result iio: adc: stm32-adc: improve calibration error log iio: adc: stm32-adc: smart calibration support iio: addac: ad74413r: add support for reset-gpio dt-bindings: iio: ad74413r: add optional reset-gpios iio: addac: ad74413r: add spi_device_id table dt-bindings: iio/adc: qcom,spmi-iadc: use double compatibles dt-bindings: iio: imu: st_lsm6dsx: add lsm6dso16is iio: imu: st_lsm6dsx: add support to LSM6DSO16IS iio: addac: add AD74115 driver ... commit 248043299bf61134fb675d16963e11f49e79b05b Author: Andy Shevchenko Date: Fri Nov 25 12:12:49 2022 +0200 modpost: Mark uuid_le type to be suitable only for MEI The uuid_le type is used only in MEI ABI, do not advertise it for others. While at it, comment out that UUID types are not to be used in a new code. Signed-off-by: Andy Shevchenko scripts/mod/file2alias.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c4d33381b134da188ccd1084aef21e2b8c3c422e Author: Yuan Can Date: Thu Nov 24 03:19:32 2022 +0000 power: supply: ab8500: Fix error handling in ab8500_charger_init() The ab8500_charger_init() returns the platform_driver_register() directly without checking its return value, if platform_driver_register() failed, all ab8500_charger_component_drivers are not unregistered. Fix by unregister ab8500_charger_component_drivers when platform_driver_register() failed. Fixes: 1c1f13a006ed ("power: supply: ab8500: Move to componentized binding") Signed-off-by: Yuan Can Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_charger.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 6349c162b7dc69da82d508bccf68ef017893573e Author: Fabien Poussin Date: Sat Nov 26 13:16:36 2022 -0600 pinctrl: sunxi: d1: Add CAN bus pinmuxes The D1 pin controller contains muxes for two CAN buses. While the CAN bus controllers are only documented for the T113 SoC, the pin controller is the same across all SoC variants. Signed-off-by: Fabien Poussin Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221126191636.6673-1-samuel@sholland.org Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun20i-d1.c | 4 ++++ 1 file changed, 4 insertions(+) commit fd5ac974fc25feed084c2d1599d0dddb4e0556bc Author: Fabrice Gasnier Date: Wed Nov 23 14:36:09 2022 +0100 counter: stm32-lptimer-cnt: 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: d8958824cf07 ("iio: counter: Add support for STM32 LPTimer") Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20221123133609.465614-1-fabrice.gasnier@foss.st.com/ Signed-off-by: William Breathitt Gray drivers/counter/stm32-lptimer-cnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a60a3cdcf1875c965095eb9e22c3d12bbc5a53d Author: Liu Peibao Date: Fri Nov 4 19:07:12 2022 +0800 irqchip/loongson-liointc: Fix improper error handling in liointc_init() For cores less than 4, eg, loongson2k1000 with 2 cores, the of_property_match_string() may return with an error value, which causes that liointc could not work. At least isr0 is what should be checked like previous commit b2c4c3969fd7 ("irqchip/loongson-liointc: irqchip add 2.0 version") did. Fixes: 0858ed035a85 ("irqchip/loongson-liointc: Add ACPI init support") Signed-off-by: Liu Peibao Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221104110712.23300-1-liupeibao@loongson.cn drivers/irqchip/irq-loongson-liointc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d502c558fd2b190c9125e8da54bef3f302fa9b15 Author: Aidan MacDonald Date: Sat Nov 12 15:27:01 2022 +0000 irqchip/sl28cpld: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Reviewed-by: Michael Walle Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221112152701.41990-1-aidanmacdonald.0x0@gmail.com drivers/irqchip/irq-sl28cpld.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4208d4faf36573a507b5e5de17abe342e9276759 Author: Wei Yongjun Date: Tue Nov 15 09:25:32 2022 +0000 irqchip/wpcm450: Fix memory leak in wpcm450_aic_of_init() If of_iomap() failed, 'aic' should be freed before return. Otherwise there is a memory leak. Fixes: fead4dd49663 ("irqchip: Add driver for WPCM450 interrupt controller") Signed-off-by: Wei Yongjun Reviewed-by: Jonathan Neuschäfer Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221115092532.1704032-1-weiyongjun@huaweicloud.com drivers/irqchip/irq-wpcm450-aic.c | 1 + 1 file changed, 1 insertion(+) commit 4e08a286b1f7a0a32828d6411255296e4ef51fa6 Author: ye xingchen Date: Thu Nov 17 19:16:50 2022 +0800 irqchip/st: Use device_get_match_data() to simplify the code Directly get the match data with device_get_match_data(). Signed-off-by: ye xingchen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/202211171916504943604@zte.com.cn drivers/irqchip/irq-st.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 9869f37aa4ee2a2e08536529dab4ccda9e23ce0c Author: Jean Delvare Date: Mon Nov 21 16:16:22 2022 +0100 irqchip/al-fic: 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: Talel Shenhar Cc: Thomas Gleixner Cc: Marc Zyngier Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221121161622.6294a899@endymion.delvare drivers/irqchip/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9ee20c85b3a3ba0afd3672630ec4f93d339f015 Author: Shang XiaoJing Date: Thu Nov 24 14:51:50 2022 +0800 irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe() gic_probe() calls pm_runtime_get_sync() and added fail path as rpm_put 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: 9c8edddfc992 ("irqchip/gic: Add platform driver for non-root GICs that require RPM") Signed-off-by: Shang XiaoJing Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124065150.22809-1-shangxiaojing@huawei.com drivers/irqchip/irq-gic-pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 915649da01de13961f9d6a891b6db5a6255ac0b2 Author: wangjianli Date: Sat Oct 22 13:46:55 2022 +0800 irqchip/mips-gic: Drop repeated word in comment Delete the redundant word 'the'. Signed-off-by: wangjianli Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221022054655.36496-1-wangjianli@cdjrlc.com drivers/irqchip/irq-mips-gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d46b99656a16c450681985661a249dbb18e55cc4 Author: Konrad Dybcio Date: Sat Oct 22 01:55:23 2022 +0200 irqchip/apple-aic: Mark aic_info structs __initconst These structs hold information used only at init time that never gets modified, hence mark them __initconst. Signed-off-by: Konrad Dybcio Suggested-by: Marc Zyngier Reviewed-by: Eric Curtin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221021235523.76585-1-konrad.dybcio@somainline.org drivers/irqchip/irq-apple-aic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c7c75e32f8a61854c38326aef276e3a58dc7fd08 Author: Huacai Chen Date: Thu Oct 20 15:35:27 2022 +0800 irqchip/loongson-pch-lpc: Add suspend/resume support Add suspend/resume support for PCH-LPC irqchip, which is needed for upcoming suspend/hibernation. Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020073527.541845-5-chenhuacai@loongson.cn drivers/irqchip/irq-loongson-pch-lpc.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 1ed008a2c3310ada91e86bd96b354212a9025a61 Author: Huacai Chen Date: Thu Oct 20 15:35:26 2022 +0800 irqchip/loongson-pch-pic: Add suspend/resume support Add suspend/resume support for PCH-PIC irqchip, which is needed for upcoming suspend/hibernation. Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020073527.541845-4-chenhuacai@loongson.cn drivers/irqchip/irq-loongson-pch-pic.c | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit a90335c2dfb4ffe572816f77a3c4f2d1d388d724 Author: Huacai Chen Date: Thu Oct 20 15:35:25 2022 +0800 irqchip/loongson-eiointc: Add suspend/resume support Add suspend/resume support for EIOINTC irqchip, which is needed for upcoming suspend/hibernation. Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020073527.541845-3-chenhuacai@loongson.cn drivers/irqchip/irq-loongson-eiointc.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 1be356c9326d68c9b0161ca004a41f203864d7ee Author: Huacai Chen Date: Thu Oct 20 15:35:24 2022 +0800 irqchip/loongson-htvec: Add suspend/resume support Add suspend/resume support for HTVEC irqchip, which is needed for upcoming suspend/hibernation. Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020073527.541845-2-chenhuacai@loongson.cn drivers/irqchip/irq-loongson-htvec.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 70f7b6c008b37a0beb956e25a6c167edfd4b259e Author: Huacai Chen Date: Thu Oct 20 22:25:35 2022 +0800 irqchip/loongson-htvec: Add ACPI init support HTVECINTC stands for "HyperTransport Interrupts" that described in Section 14.3 of "Loongson 3A5000 Processor Reference Manual". For more information please refer Documentation/loongarch/irq-chip-model.rst. Though the extended model is the recommended one, there are still some legacy model machines. So we add ACPI init support for HTVECINTC. Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020142535.1725573-1-chenhuacai@loongson.cn arch/loongarch/include/asm/irq.h | 2 +- drivers/irqchip/Kconfig | 1 + drivers/irqchip/irq-loongson-htvec.c | 149 +++++++++++++++++++++++++-------- drivers/irqchip/irq-loongson-liointc.c | 25 +++++- 4 files changed, 141 insertions(+), 36 deletions(-) commit 17343d0b4039196517ab5c40d8fce3e8d394c526 Author: Jianmin Lv Date: Sat Oct 22 15:59:55 2022 +0800 irqchip/loongson-liointc: Support to set IRQ type for ACPI path For ACPI path, the xlate callback used IRQ_TYPE_NONE and ignored the IRQ type in intspec[1]. For supporting to set type for IRQs of the irqdomain, intspec[1] should be used to get IRQ type. Signed-off-by: Jianmin Lv Reviewed-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221022075955.11726-5-lvjianmin@loongson.cn drivers/irqchip/irq-loongson-liointc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 25f3514aab3748bfef4a279ed599f836ac83e62a Author: Jianmin Lv Date: Sat Oct 22 15:59:54 2022 +0800 irqchip/loongson-pch-pic: Support to set IRQ type for ACPI path For ACPI path, the translate callback used IRQ_TYPE_NONE and ignored the IRQ type in fwspec->param[1]. For supporting to set type for IRQs of the irqdomain, fwspec->param[1] should be used to get IRQ type. Signed-off-by: Jianmin Lv Reviewed-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221022075955.11726-4-lvjianmin@loongson.cn drivers/irqchip/irq-loongson-pch-pic.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit c7c00138015975c8f0e268564249cc47d8de632c Author: Jianmin Lv Date: Sat Oct 22 15:59:53 2022 +0800 irqchip/loongson-pch-pic: Fix translate callback for DT path In DT path of translate callback, if fwspec->param_count==1 and of_node is non-null, fwspec->param[1] will be accessed, which is introduced from previous commit bcdd75c596c8 (irqchip/loongson-pch-pic: Add ACPI init support). Before the patch, for non-null of_node, translate callback (use irq_domain_translate_twocell()) will return -EINVAL if fwspec->param_count < 2, so the check in the patch is added. Fixes: bcdd75c596c8 ("irqchip/loongson-pch-pic: Add ACPI init support") Signed-off-by: Jianmin Lv Reviewed-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221022075955.11726-3-lvjianmin@loongson.cn drivers/irqchip/irq-loongson-pch-pic.c | 3 +++ 1 file changed, 3 insertions(+) commit d0c50cc4b957b2cf6e43cec4998d212b5abe9220 Author: Jianmin Lv Date: Sat Oct 22 15:59:52 2022 +0800 ACPI / PCI: fix LPIC IRQ model default PCI IRQ polarity On LoongArch based systems, the PCI devices (e.g. SATA controllers and PCI-to-PCI bridge controllers) in Loongson chipsets output high-level interrupt signal to the interrupt controller they are connected (see Loongson 7A1000 Bridge User Manual v2.00, sec 5.3, "For the bridge chip, AC97 DMA interrupts are edge triggered, gpio interrupts can be configured to be level triggered or edge triggered as needed, and the rest of the interrupts are level triggered and active high."), while the IRQs are active low from the perspective of PCI (see Conventional PCI spec r3.0, sec 2.2.6, "Interrupts on PCI are optional and defined as level sensitive, asserted low."), which means that the interrupt output of PCI devices plugged into PCI-to-PCI bridges of Loongson chipset will be also converted to high-level. So high level triggered type is required to be passed to acpi_register_gsi() when creating mappings for PCI devices. Signed-off-by: Jianmin Lv Reviewed-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221022075955.11726-2-lvjianmin@loongson.cn drivers/acpi/pci_irq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6b2748ada244c7597e9b677a0bdda4e8781a8d8f Author: Liu Peibao Date: Mon Nov 14 19:38:24 2022 +0800 dt-bindings: interrupt-controller: add yaml for LoongArch CPU interrupt controller Current LoongArch compatible CPUs support 14 CPU IRQs. We can describe how the 14 IRQs are wired to the platform's internal interrupt controller by devicetree. Signed-off-by: Liu Peibao Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221114113824.1880-3-liupeibao@loongson.cn .../loongarch,cpu-interrupt-controller.yaml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 855d4ca4bdb366aab3d43408b74e02ab629d1d55 Author: Liu Peibao Date: Mon Nov 14 19:38:23 2022 +0800 irqchip: loongarch-cpu: add DT support LoongArch is coming to support booting with FDT, so DT support of this driver is desired. Signed-off-by: Liu Peibao Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221114113824.1880-2-liupeibao@loongson.cn drivers/irqchip/irq-loongarch-cpu.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit b198d7b40ad946206217224b8379626a089f73ed Merge: cc2bbbfd9a50 a74172168009 Author: Steffen Klassert Date: Sat Nov 26 11:32:19 2022 +0100 Merge branch 'xfrm: add extack support to some more message types' Sabrina Dubroca says: ============ This is the last part of my extack work for xfrm, adding extack messages to the last remaining operations: NEWSPDINFO, ALLOCSPI, MIGRATE, NEWAE, DELSA, EXPIRE. The first patch does a few clean ups on code that will be changed later on it the series. ============ Signed-off-by: Steffen Klassert commit 101620dbfb759f24bb130bbcee9f859fce1be767 Author: Aakarsh Jain Date: Mon Nov 14 11:50:23 2022 +0000 media: s5p-mfc: Add variant data for MFC v7 hardware for Exynos 3250 SoC Commit 5441e9dafdfc6dc40 ("[media] s5p-mfc: Core support for MFC v7") which adds mfc v7 support for Exynos3250 and use the same compatible string as used by Exynos5240 but both the IPs are a bit different in terms of IP clock. Add variant driver data based on the new compatible string "samsung,exynos3250-mfc" for Exynos3250 SoC. Suggested-by: Alim Akhtar Fixes: 5441e9dafdfc ("[media] s5p-mfc: Core support for MFC v7") Signed-off-by: Aakarsh Jain Reviewed-by: Alim Akhtar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 8d1d17d47eaebe4466459846d07e4ba8953fa585 Merge: 822ff993d33d 3581b7062cec d3c1a8663d0d c54155622c29 ad517059787a 5d8c0417ea62 Author: Dmitry Baryshkov Date: Sat Nov 26 12:06:29 2022 +0200 Merge branches 'msm-next-lumag-core', 'msm-next-lumag-dpu', 'msm-next-lumag-dp', 'msm-next-lumag-dsi', 'msm-next-lumag-hdmi' and 'msm-next-lumag-mdp5' into msm-next-lumag Core: - MSM_INFO_GET_FLAGS support - Cleaned up MSM IOMMU wrapper code DPU: - Added support for XR30 and P010 image formats - Reworked MDSS/DPU schema, added SM8250 MDSS bindings - Added Qualcomm SM6115 support DP: - Dropped unsane sanity checks DSI: - Fix calculation of DSC pps payload DSI PHY: - DSI PHY support for QCM2290 HDMI: - Reworked dev init path And, as usual, small misc fixes. Signed-off-by: Dmitry Baryshkov commit 3581b7062cec5a40b54acbd0dc28321d3aaa9fc7 Author: Adam Skladowski Date: Thu Nov 24 01:16:32 2022 +0100 drm/msm/disp/dpu1: add support for display on SM6115 Add required display hw catalog changes for SM6115. Reviewed-by: Dmitry Baryshkov Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/512875/ Link: https://lore.kernel.org/r/20221124001708.25720-3-a39.skl@gmail.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 87 ++++++++++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 + drivers/gpu/drm/msm/msm_mdss.c | 5 ++ 4 files changed, 94 insertions(+) commit b93bdff44a85777c97d33159a2b4bff08f4d0e07 Author: Adam Skladowski Date: Thu Nov 24 01:16:31 2022 +0100 dt-bindings: display/msm: add support for SM6115 Add DPU and MDSS schemas to describe MDSS and DPU blocks on the Qualcomm SM6115 platform. Configuration for DSI/PHY is shared with QCM2290 so compatibles are reused. Lack of dsi phy supply in example is intended due to fact on qcm2290, sm6115 and sm6125 this phy is supplied via power domain, not regulator. Signed-off-by: Adam Skladowski Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/512872/ Link: https://lore.kernel.org/r/20221124001708.25720-2-a39.skl@gmail.com Signed-off-by: Dmitry Baryshkov .../bindings/display/msm/qcom,sm6115-dpu.yaml | 94 +++++++++++ .../bindings/display/msm/qcom,sm6115-mdss.yaml | 182 +++++++++++++++++++++ 2 files changed, 276 insertions(+) commit 5d8c0417ea62fed3cec7f5daed06a20477efeb39 Author: Dmitry Baryshkov Date: Fri Nov 25 02:02:13 2022 +0200 drm/msm/mdp5: fix reading hw revision on db410c platform Since the commit commit c6122688f265 ("drm/msm/mdp5: stop overriding drvdata") reading the MDP5 hw revision on db410c will crash the board as the MDSS_GDSC is not enabled. Revert a part of the offending commit (moving rpm enablement) and set priv->kms earlier. This make it possible to use pm_runtime_get_sync() during read_mdp_hw_revision(), which will power up both the MDP5 and MDSS devices. Fixes: c6122688f265 ("drm/msm/mdp5: stop overriding drvdata") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/512985/ Link: https://lore.kernel.org/r/20221125000213.252115-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 4e80eef45ad775a54fb06a66bf8267a154781ce5 Author: Kirill A. Shutemov Date: Fri Nov 18 02:23:04 2022 +0300 scsi: sg: Fix get_user() in call sg_scsi_ioctl() get_user() expects the pointer to be pointer-to-simple-variable type, but sic->data is array of 'unsigned char'. It violates get_user() contracts. Explicitly take pointer to the first element of the array. It matches current behaviour. This is preparation for fixing sparse warnings caused by Linear Address Masking patchset. Signed-off-by: Kirill A. Shutemov Link: https://lore.kernel.org/r/20221117232304.1544-1-kirill.shutemov@linux.intel.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Martin K. Petersen drivers/scsi/scsi_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76dc609556c699676776d53222d342276afd0442 Author: Yu Zhe Date: Fri Nov 25 10:07:03 2022 +0800 scsi: megaraid_sas: Fix some spelling mistakes in comment Fix typos in comment. Reviewed-by: Randy Dunlap Signed-off-by: Yu Zhe Link: https://lore.kernel.org/r/20221125020703.22216-1-yuzhe@nfschina.com Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 425b27a04dd8b2f5abaf8023166071b8342dc079 Author: John Garry Date: Mon Nov 21 12:17:25 2022 +0000 scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host() Instead of using hardcoded '0' as the do_scsi_scan_host() -> scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20221121121725.1910795-3-john.g.garry@oracle.com Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35bd6f9fd33b8beb043aea0db51b726ca6edfd87 Author: John Garry Date: Mon Nov 21 12:17:24 2022 +0000 scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device() Instead of using hardcoded '1' as the __scsi_add_device() -> scsi_probe_and_add_lun() rescan arg, use proper macro SCSI_SCAN_RESCAN. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20221121121725.1910795-2-john.g.garry@oracle.com Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen drivers/scsi/scsi_scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d29c32efebf3f10b25e9f88ac75c962e7259412d Author: ChanWoo Lee Date: Mon Nov 21 09:33:38 2022 +0900 scsi: ufs: ufs-mediatek: Remove unnecessary return code Modify to remove unnecessary 'return 0' code. Signed-off-by: ChanWoo Lee Link: https://lore.kernel.org/r/20221121003338.11034-1-cw9316.lee@samsung.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit ee8c88cab4afbd5ee10a127d6cbecd6b200185a5 Author: Bart Van Assche Date: Fri Nov 18 15:37:03 2022 -0800 scsi: ufs: core: Fix the polling implementation Fix the following issues in ufshcd_poll(): - If polling succeeds, return a positive value. - Do not complete polling requests from interrupt context because the block layer expects these requests to be completed from thread context. From block/bio.c: If REQ_ALLOC_CACHE is set, the final put of the bio MUST be done from process context, not hard/soft IRQ. Fixes: eaab9b573054 ("scsi: ufs: Implement polling support") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221118233717.441298-1-bvanassche@acm.org Reviewed-by: Adrian Hunter Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 4d450cf2b00d34b53f52d93216dd23af57bdca73 Author: Jie Zhan Date: Fri Nov 18 16:37:14 2022 +0800 scsi: libsas: Do not export sas_ata_wait_after_reset() sas_ata_wait_after_reset() does not need to be exported since it is no longer referenced outside libsas. Signed-off-by: Jie Zhan Link: https://lore.kernel.org/r/20221118083714.4034612-6-zhanjie9@hisilicon.com Reviewed-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_ata.c | 3 +-- include/scsi/sas_ata.h | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) commit 3c2673a09cf1181318c07b7dbc1bc532ba3d33e3 Author: Jie Zhan Date: Fri Nov 18 16:37:13 2022 +0800 scsi: hisi_sas: Fix SATA devices missing issue during I_T nexus reset SATA devices on an expander may be removed and not be found again when I_T nexus reset and revalidation are processed simultaneously. The issue comes from: - Revalidation can remove SATA devices in link reset, e.g. in hisi_sas_clear_nexus_ha(). - However, hisi_sas_debug_I_T_nexus_reset() polls the state of a SATA device on an expander after sending link_reset, where it calls: hisi_sas_debug_I_T_nexus_reset sas_ata_wait_after_reset ata_wait_after_reset ata_wait_ready smp_ata_check_ready sas_ex_phy_discover sas_ex_phy_discover_helper sas_set_ex_phy The ex_phy's change count is updated in sas_set_ex_phy(), so SATA devices after a link reset may not be found later through revalidation. A similar issue was reported in: commit 0f3fce5cc77e ("[SCSI] libsas: fix ata_eh clobbering ex_phys via smp_ata_check_ready") commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling"). To address this issue, in hisi_sas_debug_I_T_nexus_reset(), we now call smp_ata_check_ready_type() that only polls the device type while not updating the ex_phy's data of libsas. Fixes: 71453bd9d1bf ("scsi: hisi_sas: Use sas_ata_wait_after_reset() in IT nexus reset") Signed-off-by: Jie Zhan Link: https://lore.kernel.org/r/20221118083714.4034612-5-zhanjie9@hisilicon.com Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 9181ce3cb5d96f0ee28246a857ca651830fa3746 Author: Jie Zhan Date: Fri Nov 18 16:37:12 2022 +0800 scsi: libsas: Add smp_ata_check_ready_type() Create function smp_ata_check_ready_type() for LLDDs to wait for SATA devices to come up after a link reset. Signed-off-by: Jie Zhan Link: https://lore.kernel.org/r/20221118083714.4034612-4-zhanjie9@hisilicon.com Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_ata.c | 25 +++++++++++++++++++++++++ drivers/scsi/libsas/sas_expander.c | 4 ++-- drivers/scsi/libsas/sas_internal.h | 2 ++ include/scsi/sas_ata.h | 6 ++++++ 4 files changed, 35 insertions(+), 2 deletions(-) commit 94a3555d1f0f51cf029a8668624e1cd40628880f Author: Jie Zhan Date: Fri Nov 18 16:37:11 2022 +0800 scsi: Revert "scsi: hisi_sas: Don't send bcast events from HW during nexus HA reset" This reverts commit f5f2a2716055ad8c0c4ff83e51d667646c6c5d8a. This is now unnecessary to solve the SATA devices missing issue in hisi_sas_clear_nexus_ha(). Hence, we should not ignore bcast events during sas_eh_handle_sas_errors() in case of missing bcast events, unless a justified need is found and a mechanism to defer (but not ignore) bcast events in sas_eh_handle_sas_errors() is provided. Also, in hisi_sas_clear_nexus_ha(), there is nothing further to handle in "out: " other than return, so that part can be reverted. Signed-off-by: Jie Zhan Link: https://lore.kernel.org/r/20221118083714.4034612-3-zhanjie9@hisilicon.com Reviewed-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 7e613be7c63d2b9041b38d51fc324b8ad67d31e3 Author: Jie Zhan Date: Fri Nov 18 16:37:10 2022 +0800 scsi: Revert "scsi: hisi_sas: Drain bcast events in hisi_sas_rescan_topology()" This reverts commit 11ff0c98fca35df16c84d4eee52008faecaf10a6. Draining or flushing events in hisi_sas_rescan_topology() can hang the driver, typically with phy up or phy down events being processed, i.e. sas_porte_bytes_dmaed() or sas_phye_loss_of_signal(). Signed-off-by: Jie Zhan Link: https://lore.kernel.org/r/20221118083714.4034612-2-zhanjie9@hisilicon.com Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 7 ------- 1 file changed, 7 deletions(-) commit 96a2dfa1df4b9df0cfa2e807153b4d254db2fa82 Author: ChanWoo Lee Date: Fri Nov 18 13:52:42 2022 +0900 scsi: ufs: ufs-mediatek: Modify the return value Be consistent with the rest of driver wrt. functions returning bool. 91: return !!(host->caps & UFS_MTK_CAP_BOOST_CRYPT_ENGINE); 98: return !!(host->caps & UFS_MTK_CAP_VA09_PWR_CTRL); 105: return !!(host->caps & UFS_MTK_CAP_BROKEN_VCC); Signed-off-by: ChanWoo Lee Link: https://lore.kernel.org/r/20221118045242.2770-1-cw9316.lee@samsung.com Reviewed-by: Stanley Chu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 541555285339313e831f8e446c03a7994c604d65 Author: ChanWoo Lee Date: Fri Nov 18 13:41:36 2022 +0900 scsi: ufs: ufs-mediatek: Remove unneeded code Remove unnecessary if/goto code. Signed-off-by: ChanWoo Lee Link: https://lore.kernel.org/r/20221118044136.921-1-cw9316.lee@samsung.com Reviewed-by: Stanley Chu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Martin K. Petersen drivers/ufs/host/ufs-mediatek.c | 2 -- 1 file changed, 2 deletions(-) commit 50759b881e1d6879e7cef15c74bdea2e937338c9 Author: Bart Van Assche Date: Thu Nov 17 10:36:26 2022 -0800 scsi: device_handler: alua: Call scsi_device_put() from non-atomic context Since commit f93ed747e2c7 ("scsi: core: Release SCSI devices synchronously"), scsi_device_put() might sleep. Avoid calling it from alua_rtpg_queue() with the pg_lock held. The lock only pretects h->pg, anyway. To avoid the pg being freed under us, because of a race with another thread, take a temporary reference. In alua_rtpg_queue(), verify that the pg still belongs to the sdev being passed before actually queueing the RTPG. This patch fixes the following smatch warning: drivers/scsi/device_handler/scsi_dh_alua.c:1013 alua_rtpg_queue() warn: sleeping in atomic context alua_check_vpd() <- disables preempt -> alua_rtpg_queue() -> scsi_device_put() Cc: Martin Wilck Cc: Hannes Reinecke Cc: Sachin Sant Cc: Benjamin Block Suggested-by: Martin Wilck Reported-by: Dan Carpenter Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221117183626.2656196-3-bvanassche@acm.org Tested-by: Sachin Sant Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit a500c4cc06cd2830c692b571dd0a1c3585f23150 Author: Bart Van Assche Date: Thu Nov 17 10:36:25 2022 -0800 scsi: device_handler: alua: Revert "Move a scsi_device_put() call out of alua_check_vpd()" There is a bug in commit 0b25e17e9018 ("scsi: alua: Move a scsi_device_put() call out of alua_check_vpd()"): that patch may cause alua_rtpg_queue() callers to call scsi_device_put() even if that function should not be called. Revert that commit to prepare for a different solution. Cc: Hannes Reinecke Cc: Martin Wilck Cc: Sachin Sant Cc: Benjamin Block Reported-by: Sachin Sant Reported-by: Benjamin Block Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221117183626.2656196-2-bvanassche@acm.org Tested-by: Sachin Sant Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit e118df492320176af94deec000ae034cc92be754 Author: Gaosheng Cui Date: Thu Nov 17 11:51:00 2022 +0800 scsi: snic: Fix possible UAF in snic_tgt_create() Smatch reports a warning as follows: drivers/scsi/snic/snic_disc.c:307 snic_tgt_create() warn: '&tgt->list' not removed from list If device_add() fails in snic_tgt_create(), tgt will be freed, but tgt->list will not be removed from snic->disc.tgt_list, then list traversal may cause UAF. Remove from snic->disc.tgt_list before free(). Fixes: c8806b6c9e82 ("snic: driver for Cisco SCSI HBA") Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20221117035100.2944812-1-cuigaosheng1@huawei.com Acked-by: Narsimhulu Musini Signed-off-by: Martin K. Petersen drivers/scsi/snic/snic_disc.c | 3 +++ 1 file changed, 3 insertions(+) commit 95da5e58172cd3c58b82cb01e6cd157b6c5eabe9 Author: Gleb Chesnokov Date: Tue Nov 15 12:38:08 2022 +0300 scsi: qla2xxx: Initialize vha->unknown_atio_[list, work] for NPIV hosts Initialization of vha->unknown_atio_list and vha->unknown_atio_work only happens for base_vha in qlt_probe_one_stage1(). But there is no initialization for NPIV hosts that are created in qla24xx_vport_create(). This causes a crash when trying to access these NPIV host fields. Fix this by adding initialization to qla_vport_create(). Signed-off-by: Gleb Chesnokov Link: https://lore.kernel.org/r/376c89a2-a9ac-bcf9-bf0f-dfe89a02fd4b@scst.dev Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 3 +++ 1 file changed, 3 insertions(+) commit 3620e174d260adf88fa6511e8a20831cbddc4b66 Author: Gleb Chesnokov Date: Tue Nov 15 12:38:05 2022 +0300 scsi: qla2xxx: Remove duplicate of vha->iocb_work initialization Commit 9b3e0f4d4147 ("scsi: qla2xxx: Move work element processing out of DPC thread") introduced the initialization of vha->iocb_work in qla2x00_create_host() function. This initialization is also called from qla2x00_probe_one() function, just after qla2x00_create_host(). Hence remove this duplicate call since it has already been called before. Signed-off-by: Gleb Chesnokov Link: https://lore.kernel.org/r/822b3823-f344-67d6-30f1-16e31cf68eed@scst.dev Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 1 - 1 file changed, 1 deletion(-) commit 4155658cee394b22b24c6d64e49247bf26d95b92 Author: Chen Zhongjin Date: Tue Nov 15 17:24:42 2022 +0800 scsi: fcoe: Fix transport not deattached when fcoe_if_init() fails fcoe_init() calls fcoe_transport_attach(&fcoe_sw_transport), but when fcoe_if_init() fails, &fcoe_sw_transport is not detached and leaves freed &fcoe_sw_transport on fcoe_transports list. This causes panic when reinserting module. BUG: unable to handle page fault for address: fffffbfff82e2213 RIP: 0010:fcoe_transport_attach+0xe1/0x230 [libfcoe] Call Trace: do_one_initcall+0xd0/0x4e0 load_module+0x5eee/0x7210 ... Fixes: 78a582463c1e ("[SCSI] fcoe: convert fcoe.ko to become an fcoe transport provider driver") Signed-off-by: Chen Zhongjin Link: https://lore.kernel.org/r/20221115092442.133088-1-chenzhongjin@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe.c | 1 + 1 file changed, 1 insertion(+) commit 42c5907728867df91045f532a38682e0ec7a955b Author: Shin'ichiro Kawasaki Date: Tue Nov 15 09:29:05 2022 +0900 scsi: sd: Use 16-byte SYNCHRONIZE CACHE on ZBC devices ZBC Zoned Block Commands specification mandates SYNCHRONIZE CACHE(16) for host-managed zoned block devices, but does not mandate SYNCHRONIZE CACHE(10). Call SYNCHRONIZE CACHE(16) in place of SYNCHRONIZE CACHE(10) to ensure that the command is always supported. For this purpose, add use_16_for_sync flag to struct scsi_device in same manner as use_16_for_rw flag. To be precise, ZBC does not mandate SYNCHRONIZE CACHE(16) for host-aware zoned block devices. However, modern devices should support 16-byte commands. Hence, call SYNCHRONIZE CACHE (16) on both types of ZBC devices, host-aware and host-managed. Of note is that READ(16) and WRITE(16) have same story and they are already called for both types of ZBC devices. Another note is that this patch depends on the fix commit ea045fd344cb ("ata: libata-scsi: fix SYNCHRONIZE CACHE (16) command failure"). Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20221115002905.1709006-1-shinichiro.kawasaki@wdc.com Reviewed-by: Damien Le Moal Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 16 ++++++++++++---- drivers/scsi/sd_zbc.c | 3 ++- include/scsi/scsi_device.h | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) commit e6f108bffc3708ddcff72324f7d40dfcd0204894 Author: Shang XiaoJing Date: Sun Nov 13 14:45:13 2022 +0800 scsi: ipr: Fix WARNING in ipr_init() ipr_init() will not call unregister_reboot_notifier() when pci_register_driver() fails, which causes a WARNING. Call unregister_reboot_notifier() when pci_register_driver() fails. notifier callback ipr_halt [ipr] already registered WARNING: CPU: 3 PID: 299 at kernel/notifier.c:29 notifier_chain_register+0x16d/0x230 Modules linked in: ipr(+) xhci_pci_renesas xhci_hcd ehci_hcd usbcore led_class gpu_sched drm_buddy video wmi drm_ttm_helper ttm drm_display_helper drm_kms_helper drm drm_panel_orientation_quirks agpgart cfbft CPU: 3 PID: 299 Comm: modprobe Tainted: G W 6.1.0-rc1-00190-g39508d23b672-dirty #332 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014 RIP: 0010:notifier_chain_register+0x16d/0x230 Call Trace: __blocking_notifier_chain_register+0x73/0xb0 ipr_init+0x30/0x1000 [ipr] do_one_initcall+0xdb/0x480 do_init_module+0x1cf/0x680 load_module+0x6a50/0x70a0 __do_sys_finit_module+0x12f/0x1c0 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: f72919ec2bbb ("[SCSI] ipr: implement shutdown changes and remove obsolete write cache parameter") Signed-off-by: Shang XiaoJing Link: https://lore.kernel.org/r/20221113064513.14028-1-shangxiaojing@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e6d773f93a49e0eda88a903a2a6542ca83380eb1 Author: Yang Yingliang Date: Sat Nov 12 21:10:10 2022 +0800 scsi: scsi_debug: Fix possible name leak in sdebug_add_host_helper() Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically, it needs be freed when device_register() returns error. As comment of device_register() says, one should use put_device() to give up the reference in the error path. Fix this by calling put_device(), then the name can be freed in kobject_cleanup(), and sdbg_host is freed in sdebug_release_adapter(). When the device release is not set, it means the device is not initialized. We can not call put_device() in this case. Use kfree() to free memory. Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221112131010.3757845-1-yangyingliang@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 47b6a122c7b69a876c7ee2fc064a26b09627de9d Author: Yang Yingliang Date: Sat Nov 12 17:43:10 2022 +0800 scsi: fcoe: Fix possible name leak when device_register() fails If device_register() returns an error, the name allocated by dev_set_name() needs to be freed. As the comment of device_register() says, one should use put_device() to give up the reference in the error path. Fix this by calling put_device(), then the name can be freed in kobject_cleanup(). The 'fcf' is freed in fcoe_fcf_device_release(), so the kfree() in the error path can be removed. The 'ctlr' is freed in fcoe_ctlr_device_release(), so don't use the error label, just return NULL after calling put_device(). Fixes: 9a74e884ee71 ("[SCSI] libfcoe: Add fcoe_sysfs") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221112094310.3633291-1-yangyingliang@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe_sysfs.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 07f2ca139d9a7a1ba71c4c03997c8de161db2346 Author: Harshit Mogalapalli Date: Fri Nov 11 23:06:12 2022 -0800 scsi: scsi_debug: Fix a warning in resp_report_zones() As 'alloc_len' is user controlled data, if user tries to allocate memory larger than(>=) MAX_ORDER, then kcalloc() will fail, it creates a stack trace and messes up dmesg with a warning. Add __GFP_NOWARN in order to avoid too large allocation warning. This is detected by static analysis using smatch. Fixes: 7db0e0c8190a ("scsi: scsi_debug: Fix buffer size of REPORT ZONES command") Signed-off-by: Harshit Mogalapalli Link: https://lore.kernel.org/r/20221112070612.2121535-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed0f17b748b20271cb568c7ca0b23b120316a47d Author: Harshit Mogalapalli Date: Fri Nov 11 23:00:31 2022 -0800 scsi: scsi_debug: Fix a warning in resp_verify() As 'vnum' is controlled by user, so if user tries to allocate memory larger than(>=) MAX_ORDER, then kcalloc() will fail, it creates a stack trace and messes up dmesg with a warning. Add __GFP_NOWARN in order to avoid too large allocation warning. This is detected by static analysis using smatch. Fixes: c3e2fe9222d4 ("scsi: scsi_debug: Implement VERIFY(10), add VERIFY(16)") Signed-off-by: Harshit Mogalapalli Link: https://lore.kernel.org/r/20221112070031.2121068-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb0cd225dd37df1f4a22e36dad59ff33178ecdfc Author: Chen Zhongjin Date: Fri Nov 11 15:40:46 2022 +0800 scsi: efct: Fix possible memleak in efct_device_init() In efct_device_init(), when efct_scsi_reg_fc_transport() fails, efct_scsi_tgt_driver_exit() is not called to release memory for efct_scsi_tgt_driver_init() and causes memleak: unreferenced object 0xffff8881020ce000 (size 2048): comm "modprobe", pid 465, jiffies 4294928222 (age 55.872s) backtrace: [<0000000021a1ef1b>] kmalloc_trace+0x27/0x110 [<000000004c3ed51c>] target_register_template+0x4fd/0x7b0 [target_core_mod] [<00000000f3393296>] efct_scsi_tgt_driver_init+0x18/0x50 [efct] [<00000000115de533>] 0xffffffffc0d90011 [<00000000d608f646>] do_one_initcall+0xd0/0x4e0 [<0000000067828cf1>] do_init_module+0x1cc/0x6a0 ... Fixes: 4df84e846624 ("scsi: elx: efct: Driver initialization routines") Signed-off-by: Chen Zhongjin Link: https://lore.kernel.org/r/20221111074046.57061-1-chenzhongjin@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/elx/efct/efct_driver.c | 1 + 1 file changed, 1 insertion(+) commit 222d227f375b4cfa517a8f1f0f266ebe0263ad05 Author: ChanWoo Lee Date: Fri Nov 11 15:23:01 2022 +0900 scsi: ufs: core: Fix unnecessary operation for early return Setting bitmap_len is not required when returning early. Defer until it is needed. Signed-off-by: ChanWoo Lee Link: https://lore.kernel.org/r/20221111062301.7423-1-cw9316.lee@samsung.com Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshpb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5277326d07fbf68aa7fc9e7bce6c381002e00fca Author: ChanWoo Lee Date: Fri Nov 11 15:22:09 2022 +0900 scsi: ufs: core: Switch 'check_for_bkops' to bool Only checks true and false so it can be converted to bool. Signed-off-by: ChanWoo Lee Link: https://lore.kernel.org/r/20221111062209.7365-1-cw9316.lee@samsung.com Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 859ed37c9c3f456510b97ecb0bf155cee2b9d3fc Author: ChanWoo Lee Date: Fri Nov 11 15:21:26 2022 +0900 scsi: ufs: core: Separate function name and message Separate the function name and message to make it easier to check the log. Modify messages to fit the format of others. Signed-off-by: ChanWoo Lee Link: https://lore.kernel.org/r/20221111062126.7307-1-cw9316.lee@samsung.com Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 6 +++--- drivers/ufs/core/ufshpb.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit fda34a5d304d0b98cc967e8763b52221b66dc202 Author: Yang Yingliang Date: Fri Nov 11 12:30:12 2022 +0800 scsi: hpsa: Fix possible memory leak in hpsa_add_sas_device() If hpsa_sas_port_add_rphy() returns an error, the 'rphy' allocated in sas_end_device_alloc() needs to be freed. Address this by calling sas_rphy_free() in the error path. Fixes: d04e62b9d63a ("hpsa: add in sas transport class") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221111043012.1074466-1-yangyingliang@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4ef174a3ad9b5d73c1b6573e244ebba2b0d86eac Author: Yang Yingliang Date: Thu Nov 10 23:11:29 2022 +0800 scsi: hpsa: Fix error handling in hpsa_add_sas_host() hpsa_sas_port_add_phy() does: ... sas_phy_add() -> may return error here sas_port_add_phy() ... Whereas hpsa_free_sas_phy() does: ... sas_port_delete_phy() sas_phy_delete() ... If hpsa_sas_port_add_phy() returns an error, hpsa_free_sas_phy() can not be called to free the memory because the port and the phy have not been added yet. Replace hpsa_free_sas_phy() with sas_phy_free() and kfree() to avoid kernel crash in this case. Fixes: d04e62b9d63a ("hpsa: add in sas transport class") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221110151129.394389-1-yangyingliang@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 78316e9dfc24906dd474630928ed1d3c562b568e Author: Yang Yingliang Date: Wed Nov 9 11:24:03 2022 +0800 scsi: mpt3sas: Fix possible resource leaks in mpt3sas_transport_port_add() In mpt3sas_transport_port_add(), if sas_rphy_add() returns error, sas_rphy_free() needs be called to free the resource allocated in sas_end_device_alloc(). Otherwise a kernel crash will happen: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000108 CPU: 45 PID: 37020 Comm: bash Kdump: loaded Tainted: G W 6.1.0-rc1+ #189 pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : device_del+0x54/0x3d0 lr : device_del+0x37c/0x3d0 Call trace: device_del+0x54/0x3d0 attribute_container_class_device_del+0x28/0x38 transport_remove_classdev+0x6c/0x80 attribute_container_device_trigger+0x108/0x110 transport_remove_device+0x28/0x38 sas_rphy_remove+0x50/0x78 [scsi_transport_sas] sas_port_delete+0x30/0x148 [scsi_transport_sas] do_sas_phy_delete+0x78/0x80 [scsi_transport_sas] device_for_each_child+0x68/0xb0 sas_remove_children+0x30/0x50 [scsi_transport_sas] sas_rphy_remove+0x38/0x78 [scsi_transport_sas] sas_port_delete+0x30/0x148 [scsi_transport_sas] do_sas_phy_delete+0x78/0x80 [scsi_transport_sas] device_for_each_child+0x68/0xb0 sas_remove_children+0x30/0x50 [scsi_transport_sas] sas_remove_host+0x20/0x38 [scsi_transport_sas] scsih_remove+0xd8/0x420 [mpt3sas] Because transport_add_device() is not called when sas_rphy_add() fails, the device is not added. When sas_rphy_remove() is subsequently called to remove the device in the remove() path, a NULL pointer dereference happens. Fixes: f92363d12359 ("[SCSI] mpt3sas: add new driver supporting 12GB SAS") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221109032403.1636422-1-yangyingliang@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_transport.c | 2 ++ 1 file changed, 2 insertions(+) commit cd8958420d8fd86591a318aff8deb10e00fe9125 Merge: 79dfd9d5e8b5 c619bd4268ff Author: Mark Brown Date: Fri Nov 25 21:39:20 2022 +0000 RK3588 Audio Support Merge series from Nicolas Frattaroli : This patchset refactors the Rockchip I2S/TDM driver in order to support the RK3588 SoC, and then adds the necessary compatible string to load the driver for it. Patch 1 rectifies a problem with the bindings where we were too strict about requiring the rockchip,grf property. Most features of this audio device don't need access to the GRF to function. Patch 2 modifies the driver to adjust its behaviour to what the changed bindings now allow, namely using most things without the GRF. Patch 3 and 4 are boring compatible string stuff that enables RK3588 support. No special data is needed to initialise the driver for this instance of the I2S/TDM IP. commit acdce7aa7a4fc1094661feb0b833ae2eec2ad2d0 Merge: a6d99022e56e bf0d29fb51ff Author: Mark Brown Date: Fri Nov 25 21:26:29 2022 +0000 fsi: Add regmap and refactor sbefifo Merge series from Eddie James : The SBEFIFO hardware can now be attached over a new I2C endpoint interface called the I2C Responder (I2CR). In order to use the existing SBEFIFO driver, add a regmap driver for the FSI bus and an endpoint driver for the I2CR. Then, refactor the SBEFIFO and OCC drivers to clean up and use the new regmap driver or the I2CR interface. This branch just has the regmap change so it can be shared with the FSI code. commit 79dfd9d5e8b5cab454ab8fafdfaed0c82b2e2f4b Merge: d067b3378a78 cd887a7ba74c Author: Mark Brown Date: Fri Nov 25 21:26:21 2022 +0000 ASoC: adau1372: fixes after debugging custom board Merge series from Maarten Zanders : A collection of fixes and improvements for the adau1372 driver. commit ea258f159da14a710f9cb88656558538b5ba5b76 Author: Zhen Lei Date: Fri Nov 25 17:13:58 2022 +0800 get rid of INT_LIMIT, use type_max() instead INT_LIMIT() tries to do what type_max() does, except that type_max() doesn't rely upon undefined behaviour[*], might as well use type_max() instead. [*] if T is an N-bit signed integer type, the maximal value in T is pow(2, N - 1) - 1, all right, but naive expression for that value ends up with a couple of wraparounds and as usual for wraparounds in signed types, that's an undefined behaviour. type_max() takes care to avoid those... Caught-by: UBSAN Suggested-by: Eric Biggers Signed-off-by: Zhen Lei Reviewed-by: Eric Biggers Signed-off-by: Al Viro include/linux/fs.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cf260db405b1a159e9076220b40f5f02ac480525 Author: Zhen Lei Date: Fri Nov 25 17:13:57 2022 +0800 btrfs: replace INT_LIMIT(loff_t) with OFFSET_MAX OFFSET_MAX is self-annotated and more readable. Signed-off-by: Zhen Lei Acked-by: David Sterba Reviewed-by: Eric Biggers Signed-off-by: Al Viro fs/btrfs/ordered-data.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ec4a04aa6962fff3cfa63d70536537844f7446d2 Author: Mika Westerberg Date: Tue Oct 25 09:46:23 2022 +0300 spi: intel: Add support for SFDP opcode The Intel SPI-NOR controller supports SFDP (Serial Flash Discoverable Parameter) opcode so add it to the list of supported opcodes. Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20221025064623.22808-5-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-intel.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 43f173e7e508ede3d6f5411b9ffbb33d6d284211 Author: Mika Westerberg Date: Tue Oct 25 09:46:22 2022 +0300 spi: intel: Take possible chip address into account in intel_spi_read/write_reg() The SPI-NOR operation can have non-zero chip address as well so take this into account in intel_spi_read/write_reg(). Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20221025064623.22808-4-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-intel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8a9a784fb337cfd07f305faf5358335d4c12a788 Author: Mika Westerberg Date: Tue Oct 25 09:46:21 2022 +0300 spi: intel: Implement adjust_op_size() This allows us to get rid of the checks in the intel_spi_[sh]w_cycle() and makes it possible for the SPI-NOR core to split the transaction into smaller chunks as needed. Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20221025064623.22808-3-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-intel.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f73f6bd200c399d52d7147f66b956a01c93d7606 Author: Mika Westerberg Date: Tue Oct 25 09:46:20 2022 +0300 spi: intel: Use ->replacement_op in intel_spi_hw_cycle() This way we do not need the SPI-NOR opcode -> Intel controller opcode mapping in the function anymore. Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20221025064623.22808-2-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-intel.c | 52 ++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 29 deletions(-) commit cd887a7ba74c8378ae8b52afa04adb0d49cdf13d Author: Maarten Zanders Date: Fri Oct 28 17:26:24 2022 +0200 ASoC: adau1372: add support for S24_LE mode The ADAU1372 contains 24bit ADCs and DACs. Allow the driver to use its native mode which uses the same settings as the current 32 bit mode. Signed-off-by: Maarten Zanders Link: https://lore.kernel.org/r/20221028152626.109603-3-maarten.zanders@mind.be Signed-off-by: Mark Brown sound/soc/codecs/adau1372.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit dffa0df699d7c20f447e6bd797666366c6bae4b3 Author: Maarten Zanders Date: Fri Oct 28 17:26:25 2022 +0200 ASoC: adau1372: correct PGA enable & mute bit The DAPM control for PGAx uses the PGA mute bit for power management. This bit is active high but is set to non-inverted (ie when powering, it will mute). The ALSA control "PGA x Capture Switch" uses the active high PGA_ENx bit, but is set to inverted. So when enabling this switch, the PGA gets disabled. To correct the behaviour, invert both these bits. Signed-off-by: Maarten Zanders Link: https://lore.kernel.org/r/20221028152626.109603-4-maarten.zanders@mind.be Signed-off-by: Mark Brown sound/soc/codecs/adau1372.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 27b6fa6145215c5f49d93e322a16144b928ecd3e Author: Maarten Zanders Date: Fri Oct 28 17:26:23 2022 +0200 ASoC: adau1372: fix mclk "mclk" is retrieved from the configuration and assigned to adau1372->clk. However adau1372->mclk (==NULL) is used for clk_prepare_enable() and clk_disable_unprepare() which don't have any effect. Remove .clk from struct adau1372 and use .mclk throughout. This change ensures that the input clock is switched on/off when the bias level is changed. Signed-off-by: Maarten Zanders Link: https://lore.kernel.org/r/20221028152626.109603-2-maarten.zanders@mind.be Signed-off-by: Mark Brown sound/soc/codecs/adau1372.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit d067b3378a78c9c3048ac535e31c171b6f5b5846 Author: Jiasheng Jiang Date: Wed Nov 16 11:07:50 2022 +0800 ASoC: mediatek: mtk-btcvsd: Add checks for write and read of mtk_btcvsd_snd As the mtk_btcvsd_snd_write and mtk_btcvsd_snd_read may return error, it should be better to catch the exception. Fixes: 4bd8597dc36c ("ASoC: mediatek: add btcvsd driver") Signed-off-by: Jiasheng Jiang Link: https://lore.kernel.org/r/20221116030750.40500-1-jiasheng@iscas.ac.cn Signed-off-by: Mark Brown sound/soc/mediatek/common/mtk-btcvsd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 34cb111f8a7b98b5fec809dd194003bca20ef1b2 Author: Dmitry Torokhov Date: Thu Oct 27 00:46:48 2022 -0700 ASoC: dt-bindings: wcd9335: fix reset line polarity in example When resetting the block, the reset line is being driven low and then high, which means that the line in DTS should be annotated as "active low". Fixes: 1877c9fda1b7 ("ASoC: dt-bindings: add dt bindings for wcd9335 audio codec") Signed-off-by: Dmitry Torokhov Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221027074652.1044235-2-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/qcom,wcd9335.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c619bd4268ff9895760dab303b4eb15ed3d0f7e9 Author: Nicolas Frattaroli Date: Tue Oct 25 14:41:32 2022 +0200 ASoC: rockchip: i2s_tdm: Add support for RK3588 This adds support for the RK3588 SoC to the I2S/TDM driver. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20221025124132.399729-5-frattaroli.nicolas@gmail.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s_tdm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0643fd3669f5c33bab5b05a813459a2d00a83465 Author: Nicolas Frattaroli Date: Tue Oct 25 14:41:31 2022 +0200 ASoC: dt-bindings: rockchip: i2s-tdm: Add RK3588 compatible This adds the compatible string for the RK3588 SoC. Signed-off-by: Nicolas Frattaroli Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221025124132.399729-4-frattaroli.nicolas@gmail.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml | 1 + 1 file changed, 1 insertion(+) commit d980004e349049a3fcbffc6096d14896f6a122ed Author: Nicolas Frattaroli Date: Tue Oct 25 14:41:30 2022 +0200 ASoC: rockchip: i2s_tdm: Make the grf property optional Only IO Multiplex and two TRCM modes need access to the GRF, so making it a hard requirement is not a wise idea, as it complicates support for newer SoCs which do not do these things. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20221025124132.399729-3-frattaroli.nicolas@gmail.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s_tdm.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 1024a5b29e90a18530588b3f161e81cf3fae7dcf Author: Nicolas Frattaroli Date: Tue Oct 25 14:41:29 2022 +0200 ASoC: dt-bindings: rockchip: i2s-tdm: Make grf property optional Turns out most things don't require the GRF, so making the property optional is the obvious move. Signed-off-by: Nicolas Frattaroli Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221025124132.399729-2-frattaroli.nicolas@gmail.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml | 1 - 1 file changed, 1 deletion(-) commit aa997990080877c3a6dab9f25609073816378b43 Author: Eric Biggers Date: Fri Nov 25 11:20:47 2022 -0800 fscrypt: add comment for fscrypt_valid_enc_modes_v1() Make it clear that nothing new should be added to this function. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221125192047.18916-1-ebiggers@kernel.org fs/crypto/policy.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bf0d29fb51ff5e6c13097dbfed7b99e0e35b4a15 Author: Eddie James Date: Wed Nov 2 15:51:44 2022 -0500 regmap: Add FSI bus support Add regmap support for the FSI bus. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20221102205148.1334459-2-eajames@linux.ibm.com Signed-off-by: Mark Brown drivers/base/regmap/Kconfig | 6 +- drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-fsi.c | 231 +++++++++++++++++++++++++++++++++++++++ include/linux/regmap.h | 37 +++++++ 4 files changed, 274 insertions(+), 1 deletion(-) commit 5cd4d3886780bf9a846eada29a2aefe8bfcac027 Merge: ef3232e3dbd1 f0c4d9fc9cc9 Author: Mark Brown Date: Fri Nov 25 19:16:05 2022 +0000 Merge tag 'v6.1-rc4' into spi-6.2 Linux 6.1-rc4 which should get my CI working on RPi3s again. commit 0b21b4dc9a2204fba599a248f5c7ed7822f56154 Merge: c4b02c92d967 f0c4d9fc9cc9 Author: Mark Brown Date: Fri Nov 25 19:15:32 2022 +0000 Merge tag 'v6.1-rc4' into regulator-6.2 Linux 6.1-rc4 which should get my CI working on RPi3s again. commit 4748f9687caaeefab8578285b97b2f30789fc4b4 Author: Yang Yingliang Date: Tue Nov 15 17:19:45 2022 +0800 thermal: core: fix some possible name leaks in error paths In some error paths before device_register(), the names allocated by dev_set_name() are not freed. Move dev_set_name() front to device_register(), so the name can be freed while calling put_device(). Fixes: 1dd7128b839f ("thermal/core: Fix null pointer dereference in thermal_release()") Signed-off-by: Yang Yingliang Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_core.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 62a0ec9dc1dfb0f58138f1e2527e4a26567268e5 Author: Hans de Goede Date: Thu Nov 24 11:53:05 2022 +0100 PNP: Do not disable devices on suspend when they cannot be re-enabled on resume On an Advantech MICA-071 tablet, with a builtin barcode scanner connected to ttyS0, the following message is shown on suspend: serial 00:02: disabled And after suspend/resume trying to use the barcode scanner / ttyS0 shows: serial 00:02: LSR safety check engaged! Indicating that the UARTs io-ports are no longer reachable. This is caused by __pnp_bus_suspend() calling pnp_stop_dev() on the "00:02" pnp device on suspend (this outputs the disabled message). The problem is that pnp_can_write() returns false for the "00:02" pnp device, so after disabling it (disabling its decoding of IO addresses) during suspend, it cannot be re-enabled. Add a pnp_can_write() check to the suspend path and only disable devices which can actually be re-enabled on resume. This fixes the Advantech MICA-071's ttyS0 no longer working after a suspend/resume. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/pnp/driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae8ac19655e0cd7ca5ac2f45837d386745aaed7f Author: Abel Vesa Date: Tue Nov 15 23:25:43 2022 +0200 PM: domains: Reverse the order of performance and enabling ops The ->set_performance_state() needs to be called before ->power_on() when a genpd is powered on, and after ->power_off() when a genpd is powered off. Do this in order to let the provider know to which performance state to power on the genpd, on the power on sequence, and also to maintain the performance for that genpd until after powering off, on power off sequence. There is no scenario where a consumer would need its genpd enabled and then its performance state increased. Instead, in every scenario, the consumer needs the genpd to be enabled from the start at a specific performance state. And same logic applies to the powering down. No consumer would need its genpd performance state dropped right before powering down. Now, there are currently two vendors which use ->set_performance_state() in their genpd providers. One of them is Tegra, but the only genpd provider (PMC) that makes use of ->set_performance_state() doesn't implement the ->power_on() or ->power_off(), and so it will not be affected by the ops reversal. The other vendor that uses it is Qualcomm, in multiple genpd providers actually (RPM, RPMh and CPR). But all Qualcomm genpd providers that make use of ->set_performance_state() need the order between enabling ops and the performance setting op to be reversed. And the reason for that is that it currently translates into two different voltages in order to power on a genpd to a specific performance state. Basically, ->power_on() switches to the minimum (enabling) voltage for that genpd, and then ->set_performance_state() sets it to the voltage level required by the consumer. By reversing the call order, we rely on the provider to know what to do on each call, but most popular usecase is to cache the performance state and postpone the voltage setting until the ->power_on() gets called. As for the reason of still needing the ->power_on() and ->power_off() for a provider which could get away with just having ->set_performance_state() implemented, there are consumers that do not (nor should) provide an opp-table. For those consumers, ->set_performance_state() will not be called, and so they will enable the genpd to its minimum performance state by a ->power_on() call. Same logic goes for the disabling. Signed-off-by: Abel Vesa Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit b586a59e14e61a4805e1ed08a8c4f67ed38ea7e4 Author: Chen Zhang Date: Wed Nov 2 16:12:48 2022 +0800 EDAC/i5400: Fix typo in comment: vaious -> various Fix spelling typo in comment: vaious -> various. [ bp: Massage. ] Reported-by: k2ci Signed-off-by: Chen Zhang Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102081248.45694-1-chenzhang@kylinos.cn drivers/edac/i5400_edac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit de4eda9de2d957ef2d6a8365a01e26a435e958cb Author: Al Viro Date: Thu Sep 15 20:25:47 2022 -0400 use less confusing names for iov_iter direction initializers READ/WRITE proved to be actively confusing - the meanings are "data destination, as used with read(2)" and "data source, as used with write(2)", but people keep interpreting those as "we read data from it" and "we write data to it", i.e. exactly the wrong way. Call them ITER_DEST and ITER_SOURCE - at least that is harder to misinterpret... Signed-off-by: Al Viro arch/s390/kernel/crash_dump.c | 2 +- arch/s390/mm/maccess.c | 2 +- arch/x86/kernel/cpu/microcode/intel.c | 2 +- arch/x86/kernel/crash_dump_64.c | 2 +- crypto/testmgr.c | 4 ++-- drivers/acpi/pfr_update.c | 2 +- drivers/block/drbd/drbd_main.c | 2 +- drivers/block/drbd/drbd_receiver.c | 2 +- drivers/block/loop.c | 12 ++++++------ drivers/block/nbd.c | 10 +++++----- drivers/char/random.c | 4 ++-- drivers/fsi/fsi-sbefifo.c | 6 +++--- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +- drivers/isdn/mISDN/l1oip_core.c | 2 +- drivers/misc/vmw_vmci/vmci_queue_pair.c | 6 +++--- drivers/net/ppp/ppp_generic.c | 2 +- drivers/nvme/host/tcp.c | 4 ++-- drivers/nvme/target/io-cmd-file.c | 4 ++-- drivers/nvme/target/tcp.c | 2 +- drivers/s390/char/zcore.c | 2 +- drivers/scsi/sg.c | 2 +- drivers/target/iscsi/iscsi_target_util.c | 4 ++-- drivers/target/target_core_file.c | 2 +- drivers/usb/usbip/usbip_common.c | 2 +- drivers/vhost/net.c | 6 +++--- drivers/vhost/scsi.c | 10 +++++----- drivers/vhost/vhost.c | 6 +++--- drivers/vhost/vringh.c | 4 ++-- drivers/vhost/vsock.c | 4 ++-- drivers/xen/pvcalls-back.c | 8 ++++---- fs/9p/vfs_addr.c | 4 ++-- fs/9p/vfs_dir.c | 2 +- fs/9p/xattr.c | 4 ++-- fs/afs/cmservice.c | 2 +- fs/afs/dir.c | 2 +- fs/afs/file.c | 4 ++-- fs/afs/internal.h | 4 ++-- fs/afs/rxrpc.c | 10 +++++----- fs/afs/write.c | 4 ++-- fs/aio.c | 4 ++-- fs/btrfs/ioctl.c | 4 ++-- fs/ceph/addr.c | 4 ++-- fs/ceph/file.c | 4 ++-- fs/cifs/connect.c | 6 +++--- fs/cifs/file.c | 4 ++-- fs/cifs/fscache.c | 4 ++-- fs/cifs/smb2ops.c | 4 ++-- fs/cifs/transport.c | 6 +++--- fs/coredump.c | 2 +- fs/erofs/fscache.c | 6 +++--- fs/fscache/io.c | 2 +- fs/fuse/ioctl.c | 4 ++-- fs/netfs/io.c | 6 +++--- fs/nfs/fscache.c | 4 ++-- fs/nfsd/vfs.c | 4 ++-- fs/ocfs2/cluster/tcp.c | 2 +- fs/orangefs/inode.c | 8 ++++---- fs/proc/vmcore.c | 6 +++--- fs/read_write.c | 12 ++++++------ fs/seq_file.c | 2 +- fs/splice.c | 10 +++++----- include/linux/uio.h | 3 +++ io_uring/net.c | 14 +++++++------- io_uring/rw.c | 10 +++++----- kernel/trace/trace_events_user.c | 2 +- mm/madvise.c | 2 +- mm/page_io.c | 4 ++-- mm/process_vm_access.c | 2 +- net/9p/client.c | 2 +- net/bluetooth/6lowpan.c | 2 +- net/bluetooth/a2mp.c | 2 +- net/bluetooth/smp.c | 2 +- net/ceph/messenger_v1.c | 4 ++-- net/ceph/messenger_v2.c | 14 +++++++------- net/compat.c | 3 ++- net/ipv4/tcp.c | 4 ++-- net/netfilter/ipvs/ip_vs_sync.c | 2 +- net/smc/smc_clc.c | 6 +++--- net/smc/smc_tx.c | 2 +- net/socket.c | 12 ++++++------ net/sunrpc/socklib.c | 6 +++--- net/sunrpc/svcsock.c | 4 ++-- net/sunrpc/xprtsock.c | 6 +++--- net/tipc/topsrv.c | 2 +- net/tls/tls_device.c | 4 ++-- net/xfrm/espintcp.c | 2 +- security/keys/keyctl.c | 4 ++-- 87 files changed, 195 insertions(+), 191 deletions(-) commit a41dad905e5a388f88435a517de102e9b2c8e43d Author: Al Viro Date: Thu Sep 15 20:11:15 2022 -0400 iov_iter: saner checks for attempt to copy to/from iterator instead of "don't do it to ITER_PIPE" check for ->data_source being false on copying from iterator. Check for !->data_source for copying to iterator, while we are at it. Signed-off-by: Al Viro lib/iov_iter.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit fc02f33787d8dd227b54f263eba983d5b249c032 Author: Al Viro Date: Thu Sep 15 19:16:56 2022 -0400 [xen] fix "direction" argument of iov_iter_kvec() Signed-off-by: Al Viro drivers/xen/pvcalls-back.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e3bf3df824675ea9cadc3cd2c75d08ee83a6ae26 Author: Al Viro Date: Thu Sep 15 19:09:39 2022 -0400 [vhost] fix 'direction' argument of iov_iter_{init,bvec}() READ means "data destination", WRITE - "data source". Signed-off-by: Al Viro drivers/vhost/vhost.c | 6 +++--- drivers/vhost/vringh.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit b676668d99155e6859d99bbf2df18b3f03851902 Author: Al Viro Date: Thu Sep 15 19:04:18 2022 -0400 [target] fix iov_iter_bvec() "direction" argument Signed-off-by: Al Viro drivers/target/target_core_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 77729412acde120712f5793e9134c2b1cbd1ee02 Author: Al Viro Date: Sun Oct 23 13:29:08 2022 -0400 [s390] memcpy_real(): WRITE is "data source", not destination... Signed-off-by: Al Viro arch/s390/mm/maccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ba48e1bae5f68af24d8d71d4f28de9eb658af1d Author: Al Viro Date: Thu Sep 15 19:02:47 2022 -0400 [s390] zcore: WRITE is "data source", not destination... Signed-off-by: Al Viro drivers/s390/char/zcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 355d2c2798e9dc39f6714fa7ef8902c0d4c5350b Author: Al Viro Date: Thu Sep 15 19:01:10 2022 -0400 [infiniband] READ is "data destination", not source... Signed-off-by: Al Viro drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 974c36fb828aeae7b4f9063f94860ae6c5633efd Author: Al Viro Date: Thu Sep 15 18:59:12 2022 -0400 [fsi] WRITE is "data source", not destination... Signed-off-by: Al Viro drivers/fsi/fsi-sbefifo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0e1e4a2238d465199e8f11eb7a779bcb224a0505 Author: Al Viro Date: Thu Sep 15 18:55:18 2022 -0400 [s390] copy_oldmem_kernel() - WRITE is "data source", not destination Signed-off-by: Al Viro arch/s390/kernel/crash_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c67f1fd2b2b79299e617eca1c17f168d19e58510 Author: Al Viro Date: Thu Sep 15 20:20:59 2022 -0400 csum_and_copy_to_iter(): handle ITER_DISCARD Not hard to implement - we are not copying anything here, so csum_and_memcpy() is not usable, but calculating a checksum of source directly is trivial... Signed-off-by: Al Viro lib/iov_iter.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 40a86061a5619da8b2840efe1b26696077785cf1 Author: Al Viro Date: Fri Jul 29 13:01:57 2022 -0400 get rid of unlikely() on page_copy_sane() calls Signed-off-by: Al Viro lib/iov_iter.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit b868a02e37255481c7e0a40d063d1c2240b7304b Author: Tiezhu Yang Date: Wed Nov 23 09:03:29 2022 +0800 selftests: ftrace: Use "grep -E" instead of "egrep" The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl tools/testing/selftests/ftrace` 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: Shuah Khan .../testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ba70290678c80ff4f0ab68a035ae5622e2359437 Author: Tiezhu Yang Date: Wed Nov 23 09:03:31 2022 +0800 selftests: gpio: Use "grep -E" instead of "egrep" The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl tools/testing/selftests/gpio` 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: Shuah Khan tools/testing/selftests/gpio/gpio-sim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b20ebaa7324a24f32ba27cd4c55dab52222c1abc Author: Tiezhu Yang Date: Wed Nov 23 09:03:33 2022 +0800 selftests: kselftest_deps: Use "grep -E" instead of "egrep" The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl tools/testing/selftests` 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: Shuah Khan tools/testing/selftests/kselftest_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5975e2558e2dea7ef35fbb1a29613e1c176bd190 Author: Saket Kumar Bhaskar Date: Wed Nov 23 13:52:08 2022 +0530 tools/cpupower: Choose base_cpu to display default cpupower details The default output of cpupower info utils shows unexpected output when CPU 0 is disabled. Considering a case where CPU 0 is disabled, output of cpupower idle-info: Before change: cpupower idle-info CPUidle driver: pseries_idle CPUidle governor: menu analyzing CPU 0: *is offline After change: ./cpupower idle-info CPUidle driver: pseries_idle CPUidle governor: menu analyzing CPU 50: Number of idle states: 2 Available idle states: snooze CEDE snooze: Flags/Description: snooze Latency: 0 Usage: 101748 Duration: 2724058 CEDE: Flags/Description: CEDE Latency: 12 Usage: 270004 Duration: 283019526849 If -c option is not passed, CPU 0 was chosen as the default chosen CPU to display details. However when CPU 0 is offline, it results in showing unexpected output. This commit chooses the base_cpu instead of CPU 0, hence keeping the output more relevant in all cases. The base_cpu is the number of CPU on which the calling thread is currently executing. Signed-off-by: Saket Kumar Bhaskar Signed-off-by: Shuah Khan tools/power/cpupower/utils/cpufreq-info.c | 4 ++-- tools/power/cpupower/utils/cpuidle-info.c | 4 ++-- tools/power/cpupower/utils/cpupower-info.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 9bde43a0e2f469961e18d0a3496a9a74379c22bf Author: Abel Vesa Date: Fri Nov 25 07:14:05 2022 +0000 misc: fastrpc: Add dma_mask to fastrpc_channel_ctx dma_set_mask_and_coherent only updates the mask to which the device dma_mask pointer points to. Add a dma_mask to the channel ctx and set the device dma_mask to point to that, otherwise the dma_set_mask will return an error and the dma_set_coherent_mask will be skipped too. Co-developed-by: Srinivas Kandagatla Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221125071405.148786-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 2 ++ 1 file changed, 2 insertions(+) commit 532ad70c6d449029cfa3eac8408f427e31334f33 Author: Abel Vesa Date: Fri Nov 25 07:14:04 2022 +0000 misc: fastrpc: Add mmap request assigning for static PD pool If the mmap request is to add pages and thre are VMIDs associated with that context, do a call to SCM to reassign that memory. Do not do this for remote heap allocation, that is done on init create static process only. Co-developed-by: Srinivas Kandagatla Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221125071405.148786-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 76e8e4ace1ed2c97dba3b1370e0e105e07c572bc Author: Abel Vesa Date: Fri Nov 25 07:14:03 2022 +0000 misc: fastrpc: Safekeep mmaps on interrupted invoke If the userspace daemon is killed in the middle of an invoke (e.g. audiopd listerner invoke), we need to skip the unmapping on device release, otherwise the DSP will crash. So lets safekeep all the maps only if there is in invoke interrupted, by attaching them to the channel context (which is resident until RPMSG driver is removed), and free them on RPMSG driver remove. Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221125071405.148786-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 0871561055e666da421d779397efcc1e5e964cab Author: Abel Vesa Date: Fri Nov 25 07:14:02 2022 +0000 misc: fastrpc: Add support for audiopd In order to be able to start the adsp listener for audiopd using adsprpcd, we need to add the corresponding ioctl for creating a static process. On that ioctl call we need to allocate the heap. Allocating the heap needs to be happening only once and needs to be kept between different device open calls, so attach it to the channel context to make sure that remains until the RPMSG driver is removed. Then, if there are any VMIDs associated with the static ADSP process, do a call to SCM to assign it. And then, send all the necessary info related to heap to the DSP. Co-developed-by: Srinivas Kandagatla Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221125071405.148786-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 135 ++++++++++++++++++++++++++++++++++++++++++++ include/uapi/misc/fastrpc.h | 7 +++ 2 files changed, 142 insertions(+) commit 72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2 Author: Abel Vesa Date: Fri Nov 25 07:14:01 2022 +0000 misc: fastrpc: Rework fastrpc_req_munmap Move the lookup of the munmap request to the fastrpc_req_munmap and pass on only the buf to the lower level fastrpc_req_munmap_impl. That way we can use the lower level fastrpc_req_munmap_impl on error path in fastrpc_req_mmap to free the buf without searching for the munmap request it belongs to. Co-developed-by: Srinivas Kandagatla Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221125071405.148786-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) commit 334f1a1cbe032d85fd58e771629e3a3b373b96d5 Author: Abel Vesa Date: Fri Nov 25 07:14:00 2022 +0000 misc: fastrpc: Use fastrpc_map_put in fastrpc_map_create on fail Move the kref_init right after the allocation so that we can use fastrpc_map_put on any following error case. Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221125071405.148786-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6f18c7e845346f365e08613fdc47a60fc201aedb Author: Abel Vesa Date: Fri Nov 25 07:13:59 2022 +0000 misc: fastrpc: Add fastrpc_remote_heap_alloc Split fastrpc_buf_alloc in such a way it allows allocation of remote heap too and add fastrpc_remote_heap_alloc to do so. Co-developed-by: Srinivas Kandagatla Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221125071405.148786-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 1ce91d45ba77a4f6bf9209d142d5c89c42cf877a Author: Abel Vesa Date: Fri Nov 25 07:13:58 2022 +0000 misc: fastrpc: Add reserved mem support The reserved mem support is needed for CMA heap support, which will be used by AUDIOPD. Co-developed-by: Srinivas Kandagatla Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221125071405.148786-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1959ab9edccd3de4bc8a876f97ce269bb9beeb31 Author: Abel Vesa Date: Fri Nov 25 07:13:57 2022 +0000 misc: fastrpc: Rename audio protection domain to root The AUDIO_PD will be done via static pd, so the proper name here is actually ROOT_PD. Co-developed-by: Srinivas Kandagatla Signed-off-by: Abel Vesa Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221125071405.148786-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/fastrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 70aa0a5551f6a752f3a071529fffde903f1a2637 Author: Abel Vesa Date: Fri Nov 25 07:13:56 2022 +0000 dt-bindings: misc: qcom,fastrpc: increase allowed iommus entries The fastrpc components on the SM8550 SoC can require up to 3 IOMMU entries, this bumps the maxItems to 3 for this purpose. Signed-off-by: Abel Vesa Signed-off-by: Neil Armstrong Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221125071405.148786-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56d784d1778c1d33e0803fdd00a59c2bb13989fb Merge: 02cd3032b154 12491d35551d Author: Greg Kroah-Hartman Date: Fri Nov 25 18:35:16 2022 +0100 Merge tag 'iio-for-6.2a-take2' 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, feature and cleanup for 6.2 (take2) We have finally managed to take the mlock mutex entirely private so as to avoid it being used for multiple purposes. Now it is just used to protect device mode transitions (typically to and from buffered capture). Includes merge of an immutable i2c branch to get the new i2c_client_get_device_id() (thanks to Wolfram for providing the branch). Based on rc3 to pick up some precursor fixes from early in the cycle and avoid an unnecessarily messy history. New device support * adi,ad4310 - New driver to support this very flexible measurement device including a 24 bit ADC. Later fix for documentation build issue. * adi,adxl355 - Add support of the ADXL359 accelerometer. * adi,ltc2983 - Support additional variants of the temperatures sensor: LTC2984 with an EEPROM LTC2985, LTC2986 with only 10 channels. * invensense,icm42600 - Add support for icm42631 (needed only ID and WHOAMI) * kionix,kx022a - New driver for this 3 axis accelerometer. * maxim,max11401 - New driver to support this 24-bit 10 channel ADC. Includes some new ABI to support configuration of notch filters. * mediatek,mt6370 - Add new driver to support the ADC part of the mt6370. * st,lsm6dsx - Add support for LSM6DSV accelerometer and gyroscope. Simple additional of chip specific data and IDs. - Add support for LSM6DSV16X accelerometer and gyroscope. Compatible with features currently implemented for the LSM6DSV. * st,stm32-adc - Add support for stm32pm13x SoCs. core / subsystem wide: - Add new IIO_STATIC_CONST_DEVICE_ATTR() which is a dance necessary to allow for the wrapping of attributes in the code that duplicates them for multiple buffers. - Harden against future issues with expectation that all buffer attributes are iio_dev_attrs by changing the code to take an array of pointers of the correct type. - Last transitions of drivers to local locks rather than missuses of mlock. - Add an iio_device_claim_buffer_mode() callback to avoid a race in the max30100 driver without directly using mlock. - Move mlock to the opaque IIO device structure to prevent misuse. - Add missing spi_device_id tables to support auto loading of modules. - Update some ADI maintainers in DT bindings. - A few more moves of bus drivers and core module sets to export name spaces. - Extensive use of new devm_regulator_get_enable() and friends. - Switch a bunch of i2c drivers to probe_new() including the bmp280 which makes use of the new i2c_client_get_device_id() helper to simplify this change. dt-bindings: - More use of spi-peripheral-props.yaml. Features * freescale,mpl115 - Use runtime PM to implement shutdown GPIO support. * melexis,mlx90632 - More sophisticated runtime power management - Provide access to sampling frequency. - Trivial follow up fixes. * microchip,mcp3911 - Support control of PGA. * st,lsm6dsx - Add support for software triggers for cases where the IRQ lines are not wired up. * vishay,vcnl4000 - Add control of integration time. Minor cleanups and fixes * adi,ad4130 - Improve ABI documentation formatting. - Kconfig dependency fixup. * adi,ad5758 - Minor dt binding fix. * adi,ad9834 - Tidy up line breaks. * adi,ade7854 - Minor improvement in code clarity by replacing a ternary. * adi,admv8818 - Harden code against hardware returning wrong values. * adi,adxl355 - Warn only if unknown device ID detected to allow for fall back device tree compatibles on future devices. * adi,ltc2983 - dt-bindings clarifications and general improvements. - Ensure DMA safe buffer for bulk writes without relying on current regmap implementation choices. * avago,adps9960 - Fix up a disconnect between event enable attributes and what was enabled. * bosch,bma400 - Switch to dev_err_probe() from open coded EPROBE_DEFER handling. * cosmic,cc10001 - Fully devm managed probe() and related tidying up. * meas,ms5611 - Add an example of spi-max-frequency. * meleixs,mlx90632 - Tidy up confusing error return value. - Style improvements. * multiplexer - Switch to dev_err_probe() from open coded EPROBE_DEFER handling. * qcom,spmi-vadc - Minor dt binding improvements. * rockchip,saradc - Add ID for rv1126. * semtech,sx9360 - Add SAMM0208 ACPI ID. Doesn't appear to be a valid vendor prefix but is in the wild. * st,lsm6dsx - Factor out common code as _device_set_enable(). - Fix up wrong docs after LSM6DSV addition. * st,stm32-adc - Manage the min sampling time on all internal channels. * trig,sysfs - Improve error labels. * tag 'iio-for-6.2a-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (146 commits) iio: pressure: bmp280: convert to i2c's .probe_new() iio: imu: st_lsm6dsx: fix LSM6DSV sensor description iio: adc: ad4130: depend on GPIOLIB staging: iio: meter: replace ternary operator by if condition iio: light: apds9960: Fix iio_event_spec structures dt-bindings: iio: imu: Add inv_icm42600 documentation iio: imu: inv_icm42600: Add support for icm42631 dt-bindings: iio: adc: rockchip-saradc: Add saradc for rv1126 dt-bindings: iio: dac: adi,ad5758: Drop 'contains' from 'adi,dc-dc-mode' dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsv16x iio: imu: st_lsm6dsx: add support to LSM6DSV16X iio: proximity: sx9360: Add a new ACPI hardware ID iio: temperature: mlx90632: Add missing static marking on devm_pm_ops iio: temperature: mlx90632: Add error handling for devm_pm_runtime_enable() iio: temperature: ltc2983: support more parts dt-bindings: iio: temperature: ltc2983: support more parts dt-bindings: iio: temperature: ltc2983: use generic node name in example dt-bindings: iio: temperature: ltc2983: describe broken mux delay property dt-bindings: iio: temperature: ltc2983: refine descriptions dt-bindings: iio: temperature: ltc2983: change default excitation for custom thermistors ... commit 6b291e8020a8bd90e94ee13d61f251040425c90d Author: Tanmay Shah Date: Mon Nov 14 15:39:40 2022 -0800 drivers: remoteproc: Add Xilinx r5 remoteproc driver This driver enables r5f dual core Real time Processing Unit subsystem available on Xilinx Zynq Ultrascale MPSoC Platform. RPU subsystem (cluster) can be configured in different modes e.g. split mode in which two r5f cores work independent of each other and lock-step mode in which both r5f cores execute same code clock-for-clock and notify if the result is different. The Xilinx r5 Remoteproc Driver boots the RPU cores via calls to the Xilinx Platform Management Unit that handles the R5 configuration, memory access and R5 lifecycle management. The interface to this manager is done in this driver via zynqmp_pm_* function calls. Signed-off-by: Ben Levinsky Signed-off-by: Tanmay Shah Reported-by: kernel test robot Link: https://lore.kernel.org/r/20221114233940.2096237-7-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier drivers/remoteproc/Kconfig | 13 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/xlnx_r5_remoteproc.c | 1067 +++++++++++++++++++++++++++++++ 3 files changed, 1081 insertions(+) commit a5e56980cfb7ecaeb9a207c74e2e90ec544f0bc0 Author: Ben Levinsky Date: Mon Nov 14 15:39:39 2022 -0800 firmware: xilinx: Add RPU configuration APIs This patch adds APIs to access to configure RPU and its processor-specific memory. That is query the run-time mode of RPU as either split or lockstep as well as API to set this mode. In addition add APIs to access configuration of the RPUs' tightly coupled memory (TCM). Signed-off-by: Ben Levinsky Signed-off-by: Tanmay Shah Acked-by: Michal Simek Link: https://lore.kernel.org/r/20221114233940.2096237-6-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier drivers/firmware/xilinx/zynqmp.c | 62 ++++++++++++++++++++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 18 +++++++++++ 2 files changed, 80 insertions(+) commit da22a04f4727694e2c562ae4eb61daf77eef0427 Author: Ben Levinsky Date: Mon Nov 14 15:39:38 2022 -0800 firmware: xilinx: Add shutdown/wakeup APIs Add shutdown/wakeup a resource eemi operations to shutdown or bringup a resource. Note alignment of args matches convention of other fn's in this file. The reason being that the long fn name results in aligned args that otherwise go over 80 chars so shift right to avoid this Signed-off-by: Ben Levinsky Signed-off-by: Tanmay Shah Acked-by: Michal Simek Link: https://lore.kernel.org/r/20221114233940.2096237-5-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier drivers/firmware/xilinx/zynqmp.c | 35 +++++++++++++++++++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 23 +++++++++++++++++++++++ 2 files changed, 58 insertions(+) commit b2bd0a8c3ab11f355392c7b81aec5187fc0d562e Author: Ben Levinsky Date: Mon Nov 14 15:39:37 2022 -0800 firmware: xilinx: Add ZynqMP firmware ioctl enums for RPU configuration. Add ZynqMP firmware ioctl enums for RPU configuration and TCM Nodes for later use via request_node and release_node Signed-off-by: Ben Levinsky Signed-off-by: Tanmay Shah Acked-by: Michal Simek Link: https://lore.kernel.org/r/20221114233940.2096237-4-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier include/linux/firmware/xlnx-zynqmp.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 400f6af048930bce01419f5d1e50bebc03429e35 Author: Tanmay Shah Date: Mon Nov 14 15:39:36 2022 -0800 arm64: dts: xilinx: zynqmp: Add RPU subsystem device node RPU subsystem can be configured in cluster-mode or split mode. Also each r5 core has separate power domains. Signed-off-by: Tanmay Shah Acked-by: Michal Simek Link: https://lore.kernel.org/r/20221114233940.2096237-3-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit ba4fde74fc7fdd5ef37066a42721f37621cb80f2 Author: Tanmay Shah Date: Mon Nov 14 15:39:35 2022 -0800 dt-bindings: remoteproc: Add Xilinx RPU subsystem bindings Xilinx ZynqMP platform has dual-core ARM Cortex R5 Realtime Processing Unit(RPU) subsystem. This patch adds dt-bindings for RPU subsystem (cluster). Signed-off-by: Tanmay Shah Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221114233940.2096237-2-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier .../bindings/remoteproc/xlnx,zynqmp-r5fss.yaml | 135 +++++++++++++++++++++ include/dt-bindings/power/xlnx-zynqmp-power.h | 6 + 2 files changed, 141 insertions(+) commit 892a0797dbbce234822f3bef9011518ffca7072e Author: Mark Brown Date: Fri Nov 25 15:36:54 2022 +0000 kselftest/alsa: Add a .gitignore for the newly added PCM test The newly added PCM test produces a binary which is not ignored by git when built in tree, fix that. Fixes: aba51cd0949a ("selftests: alsa - add PCM test") Signed-off-by: Mark Brown Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20221125153654.1037868-1-broonie@kernel.org Signed-off-by: Takashi Iwai tools/testing/selftests/alsa/.gitignore | 1 + 1 file changed, 1 insertion(+) commit e15031539490733279c41ba87f4ef2b440a685f5 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:12 2022 +0100 ARM: dts: vexpress: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern. vexpress-v2p-ca9.dtb: leds: 'user1', 'user2', 'user3', 'user4', 'user5', 'user6', 'user7', 'user8' do 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/20221125144112.476817-1-krzysztof.kozlowski@linaro.org Signed-off-by: Sudeep Holla arch/arm/boot/dts/vexpress-v2m.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 08fef75f5e17c80cdb9ab56d65685cb43c8e44d3 Author: Thierry Reding Date: Fri Nov 4 14:29:18 2022 +0100 gpu: host1x: Staticize host1x_syncpt_fence_ops This structure is never used outside the file, so make it locally scoped. Signed-off-by: Thierry Reding drivers/gpu/host1x/fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a1a310c0cfeabbbf4a9109ce9563e1059731413 Author: ruanjinjie Date: Mon Sep 26 10:29:59 2022 +0800 drm/tegra: Make gather_bo_ops static The symbol is not used outside of the file, so mark it static. Fixes the following warning: ./drivers/gpu/drm/tegra/submit.c:136:28: warning: symbol 'gather_bo_ops' was not declared. Should it be static? Signed-off-by: ruanjinjie Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/submit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a624bd9cbdcfdc4e0cf68bb0061af6de366ebd7d Author: Liu Shixin Date: Thu Sep 22 22:23:16 2022 +0800 gpu: host1x: Use DEFINE_SHOW_ATTRIBUTE to simplify debugfs code Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the debugfs code for the status and status_all entries. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Thierry Reding drivers/gpu/host1x/debug.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) commit de383d8008c15519ed13eecfdd0a90882d7009da Author: Dmitry Torokhov Date: Mon Nov 7 20:41:42 2022 -0800 drm/tegra: Switch to using devm_fwnode_gpiod_get() devm_gpiod_get_from_of_node() is going away and GPIO consumers should use generic device/firmware node APIs to fetch GPIOs assigned to them. Switch the driver to use devm_fwnode_gpiod_get() instead. Signed-off-by: Dmitry Torokhov Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/output.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fbc82b9b2400e1ce88dc73471c6d5aaf6053677a Author: Mikko Perttunen Date: Tue Sep 20 11:12:03 2022 +0300 drm/tegra: Add Tegra234 support to NVDEC driver Add support for the Tegra234 version of NVDEC to the NVDEC driver. This version sports a RISC-V controller and requires a few additional clocks. After firmware has been loaded, the behavior is, however, backwards compatible. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 1 + drivers/gpu/drm/tegra/nvdec.c | 140 +++++++++++++++++++++++++++++++++++++----- 2 files changed, 126 insertions(+), 15 deletions(-) commit b7dc179ec83e2579ba2cfc6c6a979d91b2c7ccd1 Author: Mikko Perttunen Date: Tue Sep 20 11:12:02 2022 +0300 drm/tegra: Add code for booting RISC-V based engines Add helper code for booting RISC-V based engines where firmware is located in a carveout. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/Makefile | 3 +- drivers/gpu/drm/tegra/riscv.c | 106 +++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/tegra/riscv.h | 30 ++++++++++++ 3 files changed, 138 insertions(+), 1 deletion(-) commit 95ffcb4c2ce62b6d666766f3956826552688687c Author: Mikko Perttunen Date: Tue Sep 20 11:12:01 2022 +0300 drm/tegra: nvdec: Support multiple clocks NVDEC on Tegra234 requires multiple clocks. Add support for that. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/nvdec.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 97b93b7a4adcf3f9b07a323571685e612388b7d8 Author: Mikko Perttunen Date: Tue Sep 20 11:12:00 2022 +0300 gpu: host1x: Add stream ID register data for NVDEC on Tegra234 Add entries for NVDEC to the Tegra234 SID table. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/dev.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7946920d402d9a4b5bf53c3adc3783105dbf3966 Author: Mikko Perttunen Date: Tue Sep 20 11:11:56 2022 +0300 memory: tegra: Add API for retrieving carveout bounds On Tegra234 NVDEC firmware is loaded from a secure carveout, where it has been loaded by a bootloader. When booting NVDEC, we need to tell it the address of this firmware, which we can determine by checking the starting address of the carveout. As such, add an MC API to query the bounds of carveouts, and add related information on Tegra234. Signed-off-by: Mikko Perttunen Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding drivers/memory/tegra/mc.c | 25 +++++++++++++++++++++++++ drivers/memory/tegra/tegra234.c | 5 +++++ include/soc/tegra/mc.h | 11 +++++++++++ 3 files changed, 41 insertions(+) commit 17c2984492c4b4fb130c50c85d48d382cbb9471f Author: Jani Nikula Date: Thu Sep 1 15:47:06 2022 +0300 drm/tegra: Convert to using is_hdmi from display info Prefer the parsed results for is_hdmi in display info over calling drm_detect_hdmi_monitor(). Cc: Thierry Reding Cc: linux-tegra@vger.kernel.org Signed-off-by: Jani Nikula Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/hdmi.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 7ad4384d53c67672a8720cdc2ef638d7d1710ab8 Author: Zhang Zekun Date: Tue Aug 2 08:50:50 2022 +0000 drm/tegra: Add missing clk_disable_unprepare() in tegra_dc_probe() Add the missing clk_disable_unprepare() before return from tegra_dc_probe() in the error handling path. Fixes: f68ba6912bd2 ("drm/tegra: dc: Link DC1 to DC0 on Tegra20") Signed-off-by: Zhang Zekun Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bbdca2d41b6c9e2ca8e26ad65ec3d7a1fc7ec8db Author: Qing Wang Date: Mon Oct 18 04:31:26 2021 -0700 drm/tegra: Switch over to vmemdup_user() This patch fixes the following Coccinelle warning: drivers/gpu/drm/tegra/submit.c:173: WARNING opportunity for vmemdup_user Use vmemdup_user() rather than duplicating its implementation. This is a little bit restricted to reduce false positives. Signed-off-by: Qing Wang Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/submit.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 8935002fc37fce1ad211d98a70f2fd42083c0594 Author: Mikko Perttunen Date: Wed Sep 7 11:38:42 2022 +0300 gpu: host1x: Select context device based on attached IOMMU On Tegra234, engines that are programmed through Host1x channels can be attached to either the NISO0 or NISO1 SMMU. Because of that, when selecting a context device to use with an engine, we need to select one that is also attached to the same SMMU. Add a parameter to host1x_memory_context_alloc to specify which device we are allocating a context for, and use it to pick an appropriate context device. Signed-off-by: Mikko Perttunen [treding@nvidia.com: update !IOMMU_API stub signature] Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/uapi.c | 2 +- drivers/gpu/host1x/context.c | 4 ++++ include/linux/host1x.h | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) commit ef3232e3dbd172fa17190fa8a852a3180a73bbdc Merge: 9c512e476b0b dd71cd4dd6c9 Author: Mark Brown Date: Fri Nov 25 14:58:57 2022 +0000 Nuvoton WPCM450 FIU SPI flash controller Merge series from Jonathan Neuschäfer : This patchset adds DT bindings and a driver for the Flash Interface Unit (FIU), the SPI flash controller in the Nuvoton WPCM450 BMC SoC. It supports four chip selects, and direct (memory-mapped) access to 16 MiB per chip. Larger flash chips can be accessed by software-defined SPI transfers. The existing NPCM7xx FIU driver is sufficitently incompatible with the WPCM450 FIU that I decided to write a new driver. commit af406c90977241bbaa436b121d3e79b1b2ffeeb2 Merge: eb73f6d6b877 e57d904ac4be Author: Mark Brown Date: Fri Nov 25 14:36:56 2022 +0000 firmware: cs_dsp: Switch to using namespaced exports Merge series from Richard Fitzgerald : Use EXPORT_SYMBOL_NS_GPL() instead of EXPORT_SYMBOL_GPL() and patch the three drivers that use cs_dsp to add the MODULE_IMPORT_NS(). To make the namespace more specific the KConfig symbol for cs_dsp is changed from CS_DSP to FW_CS_DSP. commit eb73f6d6b8775b2fc68be7ad38f06c2d85d42891 Merge: 57405d8be492 5e2cbc4a813e Author: Mark Brown Date: Fri Nov 25 14:23:11 2022 +0000 ASoC/soundwire: revisit interrupt and lcount handling Merge series from Bard Liao : The code in drivers/soundwire/intel_init.c is hardware-dependent and the code does not apply to new generations starting with MeteorLake. Refactor and clean-up the code to make this intel_init.c hardware-agnostic and move all hardware-dependencies in the SOF driver using chip descriptors. commit 57405d8be4921956b8092b2e4516389bb30bdab5 Merge: 830a35aa2121 7406bdbc4fb8 Author: Mark Brown Date: Fri Nov 25 14:23:03 2022 +0000 ASoC: wm_adsp: Report when a control write changes the value Merge series from Richard Fitzgerald : Writing a firmware control should be returning 1 if the control value changed, so these two patches add that. Though this is an ALSA requirement it is also useful for non-ALSA clients of cs_dsp to know if the control value changed, so the main handling is implemented in cs_dsp. TLV controls are specifically an ALSA thing so they are handled specially in wm_adsp. Simon Trimmer (2): firmware: cs_dsp: cs_dsp_coeff_write_ctrl() should report changed ASoC: wm_adsp: Return whether changed when writing controls drivers/firmware/cirrus/cs_dsp.c | 17 ++++++++++++----- sound/soc/codecs/wm_adsp.c | 27 ++++++++++++++++++--------- 2 files changed, 30 insertions(+), 14 deletions(-) -- 2.30.2 commit 5f10311e42c069ae43591ff16bb79a7f5a42dea1 Author: Eugen Hristev Date: Fri Nov 25 15:06:46 2022 +0200 ARM: configs: multi_v7: switch to new MICROCHIP_ISC driver The ATMEL_ISC and ATMEL_XISC have been deprecated and moved to staging. Use the new MICROCHIP_ISC/MICROCHIP_XISC symbols which are the replacement drivers. Signed-off-by: Eugen Hristev Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221125130646.454084-2-eugen.hristev@microchip.com arch/arm/configs/multi_v7_defconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 63a1e43e171cb3edeca3452e01792c14b4e742bd Author: Eugen Hristev Date: Fri Nov 25 15:06:45 2022 +0200 ARM: configs: sama5/7: switch to new MICROCHIP_ISC driver The ATMEL_ISC and ATMEL_XISC have been deprecated and moved to staging. Use the new MICROCHIP_ISC/MICROCHIP_XISC symbols which are the replacement drivers. Signed-off-by: Eugen Hristev Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221125130646.454084-1-eugen.hristev@microchip.com arch/arm/configs/sama5_defconfig | 2 +- arch/arm/configs/sama7_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4b7a21c57b14fbcd0e1729150189e5933f5088e9 Author: Ye Bin Date: Thu Nov 17 10:29:40 2022 +0800 blk-mq: fix possible memleak when register 'hctx' failed There's issue as follows when do fault injection test: unreferenced object 0xffff888132a9f400 (size 512): comm "insmod", pid 308021, jiffies 4324277909 (age 509.733s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 08 f4 a9 32 81 88 ff ff ...........2.... 08 f4 a9 32 81 88 ff ff 00 00 00 00 00 00 00 00 ...2............ backtrace: [<00000000e8952bb4>] kmalloc_node_trace+0x22/0xa0 [<00000000f9980e0f>] blk_mq_alloc_and_init_hctx+0x3f1/0x7e0 [<000000002e719efa>] blk_mq_realloc_hw_ctxs+0x1e6/0x230 [<000000004f1fda40>] blk_mq_init_allocated_queue+0x27e/0x910 [<00000000287123ec>] __blk_mq_alloc_disk+0x67/0xf0 [<00000000a2a34657>] 0xffffffffa2ad310f [<00000000b173f718>] 0xffffffffa2af824a [<0000000095a1dabb>] do_one_initcall+0x87/0x2a0 [<00000000f32fdf93>] do_init_module+0xdf/0x320 [<00000000cbe8541e>] load_module+0x3006/0x3390 [<0000000069ed1bdb>] __do_sys_finit_module+0x113/0x1b0 [<00000000a1a29ae8>] do_syscall_64+0x35/0x80 [<000000009cd878b0>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 Fault injection context as follows: kobject_add blk_mq_register_hctx blk_mq_sysfs_register blk_register_queue device_add_disk null_add_dev.part.0 [null_blk] As 'blk_mq_register_hctx' may already add some objects when failed halfway, but there isn't do fallback, caller don't know which objects add failed. To solve above issue just do fallback when add objects failed halfway in 'blk_mq_register_hctx'. Signed-off-by: Ye Bin Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20221117022940.873959-1-yebin@huaweicloud.com Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 9c512e476b0bf8b4f22982eac82db7ff7cc08f73 Author: Jean Delvare Date: Fri Nov 25 08:31:14 2022 +0100 spi: cadence: 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 Link: https://lore.kernel.org/r/20221125083114.67e7f83c@endymion.delvare Signed-off-by: Mark Brown drivers/spi/Kconfig | 2 +- drivers/spi/spi-cadence-xspi.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) commit dd71cd4dd6c9bede8ee8277d650fcb9c1b12702c Author: Jonathan Neuschäfer Date: Thu Nov 24 20:13:58 2022 +0100 spi: Add Nuvoton WPCM450 Flash Interface Unit (FIU) bindings The Flash Interface Unit (FIU) is the SPI flash controller in the Nuvoton WPCM450 BMC SoC. It supports four chip selects, and direct (memory-mapped) access to 16 MiB per chip. Larger flash chips can be accessed by software-defined SPI transfers. The FIU in newer NPCM7xx SoCs is not compatible with the WPCM450 FIU. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221124191400.287918-2-j.neuschaefer@gmx.net Signed-off-by: Mark Brown .../bindings/spi/nuvoton,wpcm450-fiu.yaml | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 9838c182471ee5532824bae7f2669d3539719f78 Author: Jonathan Neuschäfer Date: Thu Nov 24 20:14:00 2022 +0100 spi: wpcm-fiu: Add direct map support Besides software controlled SPI transfers (UMA, "user mode access"), FIU also supports a 16 MiB mapping window per attached flash chip. This patch implements direct mapped read access, to speed up flash reads. Without direct mapping: # time dd if=/dev/mtd0ro of=dump bs=1M 16+0 records in 16+0 records out real 1m 47.74s user 0m 0.00s sys 1m 47.75s With direct mapping: # time dd if=/dev/mtd0ro of=dump bs=1M 16+0 records in 16+0 records out real 0m 30.81s user 0m 0.00s sys 0m 30.81s Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221124191400.287918-4-j.neuschaefer@gmx.net Signed-off-by: Mark Brown drivers/spi/spi-wpcm-fiu.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 1f8811a2613ef9e233d56885a19dd4c6e81a5d94 Author: Jonathan Neuschäfer Date: Thu Nov 24 20:13:59 2022 +0100 spi: wpcm-fiu: Add driver for Nuvoton WPCM450 Flash Interface Unit (FIU) The Flash Interface Unit (FIU) is the SPI flash controller in the Nuvoton WPCM450 BMC SoC. It supports four chip selects, and direct (memory-mapped) access to 16 MiB per chip. Larger flash chips can be accessed by software-defined SPI transfers. The FIU in newer NPCM7xx SoCs is not compatible with the WPCM450 FIU. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221124191400.287918-3-j.neuschaefer@gmx.net Signed-off-by: Mark Brown drivers/spi/Kconfig | 11 ++ drivers/spi/Makefile | 1 + drivers/spi/spi-wpcm-fiu.c | 444 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 456 insertions(+) commit 5d772916855f593672de55c437925daccc8ecd73 Author: Pavel Begunkov Date: Thu Nov 24 19:46:41 2022 +0000 io_uring: keep unlock_post inlined in hot path This partially reverts 6c16fe3c16bdc ("io_uring: kill io_cqring_ev_posted() and __io_cq_unlock_post()") The redundancy of __io_cq_unlock_post() was always to keep it inlined into __io_submit_flush_completions(). Inline it back and rename with hope of clarifying the intention behind it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/372a16c485fca44c069be2e92fc5e7332a1d7fd7.1669310258.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit c3b490930dbe6a6c98d3820f445757ddec1efb08 Author: Pavel Begunkov Date: Thu Nov 24 19:46:40 2022 +0000 io_uring: don't use complete_post in kbuf Now we're handling IOPOLL completions more generically, get rid uses of _post() and send requests through the normal path. It may have some extra mertis performance wise, but we don't care much as there is a better interface for selected buffers. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4deded706587f55b006dc33adf0c13cfc3b2319f.1669310258.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/kbuf.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 10d8bc35416d9e83ffe9644478756281c7bd4f52 Author: Dylan Yudaken Date: Fri Nov 25 02:34:11 2022 -0800 io_uring: spelling fix s/pushs/pushes/ Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221125103412.1425305-3-dylany@meta.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27f35fe9096b183d45ff6f22ad277ddf107d8428 Author: Dylan Yudaken Date: Fri Nov 25 02:34:10 2022 -0800 io_uring: remove io_req_complete_post_tw It's only used in one place. Inline it. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221125103412.1425305-2-dylany@meta.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 +- io_uring/io_uring.h | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) commit 9a6924519e5e882631a7fff429facca838207e45 Author: Dylan Yudaken Date: Thu Nov 24 01:35:59 2022 -0800 io_uring: allow multishot polled reqs to defer completion Until now there was no reason for multishot polled requests to defer completions as there was no functional difference. However now this will actually defer the completions, for a performance win. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221124093559.3780686-10-dylany@meta.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b529c96a896b7bea8464a58d350836cc106d70bd Author: Dylan Yudaken Date: Thu Nov 24 01:35:58 2022 -0800 io_uring: remove overflow param from io_post_aux_cqe The only call sites which would not allow overflow are also call sites which would use the io_aux_cqe as they care about ordering. So remove this parameter from io_post_aux_cqe. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221124093559.3780686-9-dylany@meta.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 12 ++++++++---- io_uring/io_uring.h | 3 +-- io_uring/msg_ring.c | 4 ++-- io_uring/rsrc.c | 4 ++-- 4 files changed, 13 insertions(+), 10 deletions(-) commit 2e2ef4a1dab980d88a1ab45bf0e28c8851999e33 Author: Dylan Yudaken Date: Thu Nov 24 01:35:57 2022 -0800 io_uring: add lockdep assertion in io_fill_cqe_aux Add an assertion for the completion lock to io_fill_cqe_aux Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221124093559.3780686-8-dylany@meta.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 ++ 1 file changed, 2 insertions(+) commit a77ab745f28d5ab2ce51d0e44e85af942bb77d47 Author: Dylan Yudaken Date: Thu Nov 24 01:35:56 2022 -0800 io_uring: make io_fill_cqe_aux static This is only used in io_uring.c Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221124093559.3780686-7-dylany@meta.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 4 ++-- io_uring/io_uring.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) commit 9b8c54755a2b16d4f23c0ea184b75e2edf77d906 Author: Dylan Yudaken Date: Thu Nov 24 01:35:55 2022 -0800 io_uring: add io_aux_cqe which allows deferred completion Use the just introduced deferred post cqe completion state when possible in io_aux_cqe. If not possible fallback to io_post_aux_cqe. This introduces a complication because of allow_overflow. For deferred completions we cannot know without locking the completion_lock if it will overflow (and even if we locked it, another post could sneak in and cause this cqe to be in overflow). However since overflow protection is mostly a best effort defence in depth to prevent infinite loops of CQEs for poll, just checking the overflow bit is going to be good enough and will result in at most 16 (array size of deferred cqes) overflows. Suggested-by: Pavel Begunkov Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221124093559.3780686-6-dylany@meta.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 34 ++++++++++++++++++++++++++++++++++ io_uring/io_uring.h | 2 ++ io_uring/net.c | 7 ++++--- io_uring/poll.c | 4 ++-- 4 files changed, 42 insertions(+), 5 deletions(-) commit 931147ddfa6e9ffd814272f1c0370c4740acbe17 Author: Dylan Yudaken Date: Thu Nov 24 01:35:54 2022 -0800 io_uring: allow defer completion for aux posted cqes Multishot ops cannot use the compl_reqs list as the request must stay in the poll list, but that means they need to run each completion without benefiting from batching. Here introduce batching infrastructure for only small (ie 16 byte) CQEs. This restriction is ok because there are no use cases posting 32 byte CQEs. In the ring keep a batch of up to 16 posted results, and flush in the same way as compl_reqs. 16 was chosen through experimentation on a microbenchmark ([1]), as well as trying not to increase the size of the ring too much. This increases the size to 1472 bytes from 1216. [1]: https://github.com/DylanZA/liburing/commit/9ac66b36bcf4477bfafeff1c5f107896b7ae31cf Run with $ make -j && ./benchmark/reg.b -s 1 -t 2000 -r 10 Gives results: baseline 8309 k/s 8 18807 k/s 16 19338 k/s 32 20134 k/s Suggested-by: Pavel Begunkov Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221124093559.3780686-5-dylany@meta.com Signed-off-by: Jens Axboe include/linux/io_uring_types.h | 2 ++ io_uring/io_uring.c | 27 ++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) commit 973fc83f3a94bdffcacf482641db38f57c7c8609 Author: Dylan Yudaken Date: Thu Nov 24 01:35:53 2022 -0800 io_uring: defer all io_req_complete_failed All failures happen under lock now, and can be deferred. To be consistent when the failure has happened after some multishot cqe has been deferred (and keep ordering), always defer failures. To make this obvious at the caller (and to help prevent a future bug) rename io_req_complete_failed to io_req_defer_failed. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221124093559.3780686-4-dylany@meta.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 17 ++++++++--------- io_uring/io_uring.h | 2 +- io_uring/poll.c | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) commit c06c6c5d276707e04cedbcc55625e984922118aa Author: Dylan Yudaken Date: Thu Nov 24 01:35:52 2022 -0800 io_uring: always lock in io_apoll_task_func This is required for the failure case (io_req_complete_failed) and is missing. The alternative would be to only lock in the failure path, however all of the non-error paths in io_poll_check_events that do not do not return IOU_POLL_NO_ACTION end up locking anyway. The only extraneous lock would be for the multishot poll overflowing the CQE ring, however multishot poll would probably benefit from being locked as it will allow completions to be batched. So it seems reasonable to lock always. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221124093559.3780686-3-dylany@meta.com Signed-off-by: Jens Axboe io_uring/poll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 642978981ec8a79da00828c696c58b3732b993a6 Author: Mark Brown Date: Thu Nov 24 12:07:22 2022 +0000 kselftest/arm64: Set test names prior to starting children Since we now flush output immediately on starting children we should ensure that the child name is set beforehand so that any output that does get flushed from the newly created child has the name of the child attached. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221124120722.150988-1-broonie@kernel.org Signed-off-by: Will Deacon tools/testing/selftests/arm64/fp/fp-stress.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 453dfcee70c5c344ca09396ff5b0baf177eb327e Author: Ard Biesheuvel Date: Tue Nov 22 18:02:49 2022 +0100 arm64: booting: Require placement within 48-bit addressable memory Some configurations (i.e., 64k + LVA/LPA) can tolerate a physical placement of the kernel image outside of the 48-bit addressable region, but given that the loader has no way of knowing whether or not the image in question supports LVA/LPA, it currently has no choice but to place it below the 48-bit mark. Once we add support for LPA2, which allows 52-bit physical and virtual addressing when using 4k or 16k pages, but in way that relies on increasing the number of paging levels, there will be more variety in the configurations that may or may not support this. So redefine bit #3 in the Image header as 'must be placed within 48-bit addressable memory', as this is the current de facto meaning. Signed-off-by: Ard Biesheuvel Reviewed-by: Anshuman Khandual Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20221122170249.2453853-1-ardb@kernel.org Signed-off-by: Will Deacon Documentation/arm64/booting.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d503d01e5016370be8473fc23d800c7ff37ab7f6 Author: Mark Brown Date: Wed Nov 23 18:02:09 2022 +0000 arm64/asm: Remove unused assembler DAIF save/restore macros There are no longer any users of the assembler macros for saving and restoring DAIF so remove them to prevent further users being added, there are C equivalents available. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221123180209.634650-3-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 9 --------- 1 file changed, 9 deletions(-) commit a8bf2fc43fc63c0bd38b45c9a9616d43b683585d Author: Mark Brown Date: Wed Nov 23 18:02:08 2022 +0000 arm64/kpti: Move DAIF masking to C code We really don't want to take an exception while replacing TTBR1 so we mask DAIF during the actual update. Currently this is done in the assembly function idmap_cpu_replace_ttbr1() but it could equally be done in the only caller of that function, cpu_replace_ttbr1(). This simplifies the assembly code slightly and means that when working with the code around masking DAIF flags there is one less piece of assembly code which needs to be considered. While we're at it add a comment which makes explicit why we are masking DAIF in this code. There should be no functional effect. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221123180209.634650-2-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/mmu_context.h | 10 ++++++++++ arch/arm64/mm/proc.S | 4 ---- 2 files changed, 10 insertions(+), 4 deletions(-) commit 223d3a0d30b6e9f979f5642e430e1753d3e29f89 Author: Ren Zhijie Date: Thu Nov 24 02:24:29 2022 +0000 arm64: armv8_deprecated: fix unused-function error If CONFIG_SWP_EMULATION is not set and CONFIG_CP15_BARRIER_EMULATION is not set, aarch64-linux-gnu complained about unused-function : arch/arm64/kernel/armv8_deprecated.c:67:21: error: ‘aarch32_check_condition’ defined but not used [-Werror=unused-function] static unsigned int aarch32_check_condition(u32 opcode, u32 psr) ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors To fix this warning, modify aarch32_check_condition() with __maybe_unused. Fixes: 0c5f416219da ("arm64: armv8_deprecated: move aarch32 helper earlier") Signed-off-by: Ren Zhijie Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20221124022429.19024-1-renzhijie2@huawei.com Signed-off-by: Will Deacon arch/arm64/kernel/armv8_deprecated.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfce092dae95ed81391e49f273353a96cc6dec64 Author: Mark Rutland Date: Tue Nov 22 16:36:24 2022 +0000 ftrace: arm64: remove static ftrace The build test robot pointer out that there's a build failure when: CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y CONFIG_DYNAMIC_FTRACE_WITH_ARGS=n ... due to some mismatched ifdeffery, some of which checks CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS, and some of which checks CONFIG_DYNAMIC_FTRACE_WITH_ARGS, leading to some missing definitions expected by the core code when CONFIG_DYNAMIC_FTRACE=n and consequently CONFIG_DYNAMIC_FTRACE_WITH_ARGS=n. There's really not much point in supporting CONFIG_DYNAMIC_FTRACE=n (AKA static ftrace). All supported toolchains allow us to implement DYNAMIC_FTRACE, distributions all prefer DYNAMIC_FTRACE, and both powerpc and s390 removed support for static ftrace in commits: 0c0c52306f4792a4 ("powerpc: Only support DYNAMIC_FTRACE not static") 5d6a0163494c78ad ("s390/ftrace: enforce DYNAMIC_FTRACE if FUNCTION_TRACER is selected") ... and according to Steven, static ftrace is only supported on x86 to allow testing that the core code still functions in this configuration. Given that, let's simplify matters by removing arm64's support for static ftrace. This avoids the problem originally reported, and leaves us with less code to maintain. Fixes: 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS") Link: https://lore.kernel.org/r/202211212249.livTPi3Y-lkp@intel.com Suggested-by: Steven Rostedt Signed-off-by: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Acked-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20221122163624.1225912-1-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + arch/arm64/kernel/entry-ftrace.S | 39 --------------------------------------- arch/arm64/kernel/ftrace.c | 5 ----- 3 files changed, 1 insertion(+), 44 deletions(-) commit e57d904ac4be6de7ecc9083f51a9a38f72482f82 Author: Richard Fitzgerald Date: Thu Nov 24 13:45:56 2022 +0000 firmware: cs_dsp: Make the exports namespaced Move all the exports into a namespace. This also adds the MODULE_IMPORT_NS to the 3 drivers that use the exported functions. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20221124134556.3343784-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown drivers/firmware/cirrus/cs_dsp.c | 62 ++++++++++++++++++++-------------------- sound/pci/hda/cs35l41_hda.c | 1 + sound/pci/hda/hda_cs_dsp_ctl.c | 1 + sound/soc/codecs/wm_adsp.c | 1 + 4 files changed, 34 insertions(+), 31 deletions(-) commit d7cfdf17cb9d072b41547e7cc882ecd900aa6589 Author: Richard Fitzgerald Date: Thu Nov 24 13:45:55 2022 +0000 firmware: cs_dsp: Rename KConfig symbol CS_DSP -> FW_CS_DSP Qualify the KConfig symbol for cs_dsp by adding a FW_ prefix so that it is more explicit what is being referred to. This is preparation for using the symbol to namespace the exports. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20221124134556.3343784-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown drivers/firmware/cirrus/Kconfig | 2 +- drivers/firmware/cirrus/Makefile | 2 +- sound/pci/hda/Kconfig | 2 +- sound/soc/codecs/Kconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 6a5a4514854a637d01c50f5ea17b28f78b31ddb8 Author: Adam Borowski Date: Fri Sep 16 00:33:18 2022 +0100 media: ipu3-cio2: make the bridge depend on i2c drivers/media/pci/intel/ipu3/cio2-bridge.c: In function ‘cio2_bridge_unregister_sensors’: drivers/media/pci/intel/ipu3/cio2-bridge.c:258:17: error: implicit declaration of function ‘i2c_unregister_device’; did you mean ‘spi_unregister_device’? [-Werror=implicit-function-declaration] 258 | i2c_unregister_device(sensor->vcm_i2c_client); | ^~~~~~~~~~~~~~~~~~~~~ | spi_unregister_device Link: https://lore.kernel.org/linux-media/S230142AbiJTWql/20221020224641Z+958@vger.kernel.org Signed-off-by: Adam Borowski Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/intel/ipu3/Kconfig | 1 + 1 file changed, 1 insertion(+) commit bfe03e74f864130e9ef305a4d32506bff1322180 Author: Hans de Goede Date: Wed Nov 23 16:14:47 2022 +0000 media: MAINTAINERS: Add Hans de Goede as staging/atomisp maintainer Add myself as maintainer for the drivers/staging/media/atomisp code. Link: https://lore.kernel.org/linux-media/20221123161447.15834-1-hdegoede@redhat.com Signed-off-by: Hans de Goede Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit f50ebe10f5d8092c37e2bd430c78e03bf38b1e20 Author: Aakarsh Jain Date: Mon Nov 14 11:50:23 2022 +0000 media: s5p-mfc: Add variant data for MFC v7 hardware for Exynos 3250 SoC Commit 5441e9dafdfc6dc40 ("[media] s5p-mfc: Core support for MFC v7") which adds mfc v7 support for Exynos3250 and use the same compatible string as used by Exynos5240 but both the IPs are a bit different in terms of IP clock. Add variant driver data based on the new compatible string "samsung,exynos3250-mfc" for Exynos3250 SoC. Suggested-by: Alim Akhtar Fixes: 5441e9dafdfc ("[media] s5p-mfc: Core support for MFC v7") Signed-off-by: Aakarsh Jain Reviewed-by: Alim Akhtar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 3ab848bea7790583674a0e08eb5f8c1553d07751 Author: Aakarsh Jain Date: Mon Nov 14 11:50:22 2022 +0000 media: dt-bindings: s5p-mfc: Add new compatible string for Exynos3250 SoC Since MFC v7 support was present for both Exynos5420 and Exynos3250 SoC with same compatible string "samsung,mfc-v7". As both SoCs having different hardware properties and having same compatible string for both SoCs doesn't seems to be correct. Add new compatible for Exynos3250 SoC followed by mfc-v7 fallback which will differentiate the node properties for both SoCs which support MFC v7. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Tommaso Merciai Suggested-by: Alim Akhtar Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/s5p-mfc.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 95bc23513c9188065a22194f9af870376fc38fdd Author: Yunfei Dong Date: Thu Nov 17 09:24:53 2022 +0000 media: mediatek: vcodec: Core thread depends on core_list Core thread will continue to work when core_list is not empty, not depends on lat_list. Fixes: 365e4ba01df4 ("media: mtk-vcodec: Add work queue for core hardware decode") Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12ac20d60213a439d1552382d04aabb905e0b784 Author: Yunfei Dong Date: Thu Nov 17 09:24:52 2022 +0000 media: mediatek: vcodec: Setting lat buf to lat_list when lat decode error Need to set lat buf to lat_list when lat decode error, or lat buffer will be lost. Fixes: 5d418351ca8f ("media: mediatek: vcodec: support stateless VP9 decoding") Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 23d677bd9cdd10323e6d290578bbb0a408f43499 Author: Yunfei Dong Date: Thu Nov 17 09:24:51 2022 +0000 media: mediatek: vcodec: Fix h264 set lat buffer error Will set lat buffer to lat_list two times when lat decode timeout for inner racing mode. If core thread can't get frame buffer, need to return error value. Fixes: 59fba9eed5a7 ("media: mediatek: vcodec: support stateless H.264 decoding for mt8192") Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../mediatek/vcodec/vdec/vdec_h264_req_multi_if.c | 28 +++++++++++++--------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 3568ecd3f3a6d133ab7feffbba34955c8c79bbc4 Author: Yunfei Dong Date: Thu Nov 17 09:24:50 2022 +0000 media: mediatek: vcodec: Can't set dst buffer to done when lat decode error Core thread will call v4l2_m2m_buf_done to set dst buffer done for lat architecture. If lat call v4l2_m2m_buf_done_and_job_finish to free dst buffer when lat decode error, core thread will access kernel NULL pointer dereference, then crash. Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d879f770e4d1d5f0d9b692d3a2702f23ee441dbb Author: Yunfei Dong Date: Thu Nov 17 09:24:49 2022 +0000 media: mediatek: vcodec: Fix getting NULL pointer for dst buffer The driver may can't get v4l2 buffer when lat or core decode timeout, will lead to crash when call v4l2_m2m_buf_done to set dst buffer (NULL pointer) done. Fixes: 7b182b8d9c85 ("media: mediatek: vcodec: Refactor get and put capture buffer flow") Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 1ade3f3f16986cd7c6fce02feede957f03eb8a42 Author: Ming Qian Date: Mon Nov 21 06:34:42 2022 +0000 media: amphion: lock and check m2m_ctx in event handler driver needs to cancel vpu before releasing the vpu instance, so call v4l2_m2m_ctx_release() first, to handle the redundant event triggered after m2m_ctx is released. lock and check m2m_ctx in the event handler. 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 drivers/media/platform/amphion/vpu_msgs.c | 2 ++ drivers/media/platform/amphion/vpu_v4l2.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit b3dd974af9de342c733492565ad02d7e23372876 Author: Ming Qian Date: Mon Nov 21 06:34:07 2022 +0000 media: amphion: cancel vpu before release instance Revert "media: amphion: release m2m ctx when releasing vpu instance" This reverts commit d91d7bc85062309aae6d8064563ddf17947cb6bc. Call v4l2_m2m_ctx_release() to cancel vpu, afterwards release the vpu instance. Fixes: d91d7bc85062 ("media: amphion: release m2m ctx when releasing vpu instance") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vpu_v4l2.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 082744433f7b96db7214a98202ed96f367684693 Author: Ming Qian Date: Fri Nov 18 08:51:29 2022 +0000 media: amphion: try to wakeup vpu core to avoid failure firmware should be waked up by start or configure command, but there is a very small chance that firmware failed to wakeup. in such case, try to wakeup firmware again by sending a noop command Fixes: 6de8d628df6e ("media: amphion: add v4l2 m2m vpu decoder stateful driver") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vpu.h | 1 + drivers/media/platform/amphion/vpu_cmds.c | 39 +++++++++++++++++++++++++--- drivers/media/platform/amphion/vpu_malone.c | 1 + drivers/media/platform/amphion/vpu_windsor.c | 1 + 4 files changed, 38 insertions(+), 4 deletions(-) commit 26475355f98f6507b1cf40cf7a6089a380fbd3b5 Author: Irui Wang Date: Sat Oct 1 04:07:52 2022 +0100 media: dt-bindings: mediatek: vcodec: Add the platform compatible to schema There are venc node warnings when running dtbs_check, the clock-names was unexpected, missing properties '#address-cells' and '#size-cells'. Add the corresponding platform compatible to schema. Signed-off-by: Irui Wang Acked-by: Krzysztof Kozlowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/mediatek,vcodec-encoder.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit eb861c3d8298f5145c3fc3bfd2997fdf6ea25b2b Author: Peter Robinson Date: Fri Sep 16 12:41:57 2022 +0100 media: Add dependency on ARCH_ASPEED The VIDEO_ASPEED is part of the Aspeed silicon so it makes sense to depend on ARCH_ASPEED and for compile testing. Signed-off-by: Peter Robinson Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 8dec5779a065657d166d5b0a9fdf121633bb9727 Author: Deming Wang Date: Thu Sep 15 02:46:09 2022 +0100 media: vivid.rst: fix TV and S-Video Inputs section remove the double word 'in'. Signed-off-by: Deming Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/media/vivid.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 614f6e35a9e214c80270ab942bf58d85066a3e34 Author: Paul Kocialkowski Date: Fri Sep 9 14:39:54 2022 +0100 media: sun8i-a83t-mipi-csi2: Register async subdev with no sensor attached This allows the device to probe and register its async subdev without a sensor attached. The rationale is that the parent driver might otherwise wait for the subdev to be registered when it should be available (from the fwnode graph endpoint perspective). This is generally not problematic when the MIPI CSI-2 bridge is the only device attached to the parent, but in the case of a CSI controller that can feed from both MIPI CSI-2 and parallel, it would prevent using the parallel sensor due to the parent waiting for the MIPI CSI-2 subdev to register. Fixes: 576d196c522b ("media: sunxi: Add support for the A83T MIPI CSI-2 controller") Signed-off-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 67182951f1dde5a88479cf8befee5f32ea014a49 Author: Paul Kocialkowski Date: Fri Sep 9 14:39:53 2022 +0100 media: sun6i-mipi-csi2: Register async subdev with no sensor attached This allows the device to probe and register its async subdev without a sensor attached. The rationale is that the parent driver might otherwise wait for the subdev to be registered when it should be available (from the fwnode graph endpoint perspective). This is generally not problematic when the MIPI CSI-2 bridge is the only device attached to the parent, but in the case of a CSI controller that can feed from both MIPI CSI-2 and parallel, it would prevent using the parallel sensor due to the parent waiting for the MIPI CSI-2 subdev to register. Fixes: af54b4f4c17f ("media: sunxi: Add support for the A31 MIPI CSI-2 controller") Signed-off-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 8985fc724ba89d9b00694304b3f9faf69f4073d0 Author: Paul Kocialkowski Date: Fri Sep 9 14:39:52 2022 +0100 media: sun8i-a83t-mipi-csi2: Require both pads to be connected for streaming The bridge needs both its pads connected to be able to stream data. Enforcing this is useful to produce an error when no sensor is connected. Fixes: 576d196c522b ("media: sunxi: Add support for the A83T MIPI CSI-2 controller") Signed-off-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7256f28767fa40249254116a4bcb45efff35f31b Author: Kees Cook Date: Fri Nov 18 13:11:47 2022 -0800 wifi: carl9170: 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: Christian Lamparter Cc: Kalle Valo Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: "Gustavo A. R. Silva" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221118211146.never.395-kees@kernel.org drivers/net/wireless/ath/carl9170/fwcmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f042b08b833de3be810f8769d88ca44aeefd7eba Author: Paul Kocialkowski Date: Fri Sep 9 14:39:51 2022 +0100 media: sun6i-mipi-csi2: Require both pads to be connected for streaming The bridge needs both its pads connected to be able to stream data. Enforcing this is useful to produce an error when no sensor is connected. Fixes: af54b4f4c17f ("media: sunxi: Add support for the A31 MIPI CSI-2 controller") Signed-off-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4d79f6f34bbb01c6715b31ef457d5ab0390501a1 Author: Youghandhar Chintala Date: Thu Nov 17 23:35:34 2022 +0530 wifi: ath10k: Store WLAN firmware version in SMEM image table In a SoC based solution, it would be useful to know the versions of the various binary firmware blobs the system is running on. On a QCOM based SoC, this info can be obtained from socinfo debugfs infrastructure. For this to work, respective subsystem drivers have to export the firmware version information to an SMEM based version information table. Having firmware version information at one place will help quickly figure out the firmware versions of various subsystems on the device instead of going through builds/logs in an event of a system crash. Fill WLAN firmware version information in SMEM version table to be printed as part of socinfo debugfs infrastructure on a Qualcomm based SoC. This change is applicable only for SNOC/QMI based targets. Example: cat /sys/kernel/debug/qcom_socinfo/cnss/name QC_IMAGE_VERSION_STRING=WLAN.HL.3.2.2.c10-00754-QCAHLSWMTPL-1 Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.2.c10-00754-QCAHLSWMTPL-1 Signed-off-by: Youghandhar Chintala Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221117180534.2267-1-quic_youghand@quicinc.com drivers/net/wireless/ath/ath10k/Kconfig | 1 + drivers/net/wireless/ath/ath10k/qmi.c | 35 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit f1e525009493cbd569e7c8dd7d58157855f8658d Author: Juergen Gross Date: Wed Nov 23 12:45:23 2022 +0100 x86/boot: Skip realmode init code when running as Xen PV guest When running as a Xen PV guest there is no need for setting up the realmode trampoline, as realmode isn't supported in this environment. Trying to setup the trampoline has been proven to be problematic in some cases, especially when trying to debug early boot problems with Xen requiring to keep the EFI boot-services memory mapped (some firmware variants seem to claim basically all memory below 1Mb for boot services). Introduce new x86_platform_ops operations for that purpose, which can be set to a NOP by the Xen PV specific kernel boot code. [ bp: s/call_init_real_mode/do_init_real_mode/ ] Fixes: 084ee1c641a0 ("x86, realmode: Relocator for realmode code") Suggested-by: H. Peter Anvin Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221123114523.3467-1-jgross@suse.com arch/x86/include/asm/realmode.h | 1 + arch/x86/include/asm/x86_init.h | 4 ++++ arch/x86/kernel/setup.c | 2 +- arch/x86/kernel/x86_init.c | 3 +++ arch/x86/realmode/init.c | 8 ++++++-- arch/x86/xen/enlighten_pv.c | 2 ++ 6 files changed, 17 insertions(+), 3 deletions(-) commit 65884e940e7fd25c480a7263aee568f86edfb6cd Author: Ming Qian Date: Thu Aug 25 02:38:32 2022 +0100 media: amphion: encoder add support for contiguous planes encoder add support for contiguous formats NV12 Signed-off-by: Ming Qian Reviewed-by: Tommaso Merciai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/venc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit cffa4e0c1e46fe8f4585d88c8a0740840decb39b Author: Ming Qian Date: Thu Aug 25 02:38:31 2022 +0100 media: amphion: decoder add support for contiguous planes decoder add support for contiguous formats V4L2_PIX_FMT_NV12_8L128 and V4L2_PIX_FMT_NV12_10BE_8L128 Signed-off-by: Ming Qian Reviewed-by: Tommaso Merciai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vdec.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit d21ce554e1fc9c02d1a7f61156f794648bddb98f Author: Ming Qian Date: Thu Aug 25 02:38:30 2022 +0100 media: amphion: tell and handle contiguous and non contiguous format Driver should tell the number of memory planes and component planes. the amphion vpu support non contiguous planes, but for compatibility with other device that only support contiguous planes. driver can add support for contiguous planes in the same time. Then the mem_planes can be different from the comp_planes. driver need to handle buffer according mem_planes and comp_planes. So driver can support NV12 and NV12M. Signed-off-by: Ming Qian Reviewed-by: Tommaso Merciai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vdec.c | 187 ++++++++++++++------------- drivers/media/platform/amphion/venc.c | 33 ++--- drivers/media/platform/amphion/vpu.h | 4 +- drivers/media/platform/amphion/vpu_dbg.c | 8 +- drivers/media/platform/amphion/vpu_helpers.c | 45 ++++++- drivers/media/platform/amphion/vpu_helpers.h | 2 + drivers/media/platform/amphion/vpu_malone.c | 3 +- drivers/media/platform/amphion/vpu_v4l2.c | 169 ++++++++++++++++++------ drivers/media/platform/amphion/vpu_v4l2.h | 3 +- drivers/media/platform/amphion/vpu_windsor.c | 8 +- 10 files changed, 297 insertions(+), 165 deletions(-) commit 5b8bb216e91a2f4f4d5b82739c0101b3922064e5 Author: Ming Qian Date: Thu Aug 25 02:38:29 2022 +0100 media: add nv12_8l128 and nv12_10be_8l128 video format. add contiguous nv12 tiled format nv12_8l128 and nv12_10be_8l128 Signed-off-by: Ming Qian Reviewed-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst | 8 ++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ include/uapi/linux/videodev2.h | 2 ++ 3 files changed, 12 insertions(+) commit 0625b6b8233aac5232190be394ebacfa7e29b1bc Author: Xiu Jianfeng Date: Mon Jun 13 14:08:45 2022 +0100 media: v4l: Use memset_after() helper The CLEAR_AFTER_FIELD defined here is functionally the same as memset_after() helper, so replace it with memset_after() to simplify the code, no functional change in this patch. Signed-off-by: Xiu Jianfeng Reviewed-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 84 +++++++++++++++++------------------- 1 file changed, 39 insertions(+), 45 deletions(-) commit 928a6ea4267450c1b1baa4219f06b3756f4b1d84 Author: Niklas Söderlund Date: Sun Oct 9 19:35:51 2022 +0100 media: rcar-vin: Add support for Gen3 UDS (Up Down Scaler) Add support for the UDS (Up Down Scaler) found in some Gen3 SoCs. Not all Gen3 SoCs have scalers, and for those that do it's only available to the master node of each VIN group. The setup for which SoCs and nodes have access to a scaler are dealt with at probe time and then function transparently reusing the schema from the already present Gen2 scaler. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/renesas/rcar-vin/rcar-core.c | 9 +++ drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 70 ++++++++++++++++++++++ .../media/platform/renesas/rcar-vin/rcar-v4l2.c | 3 + drivers/media/platform/renesas/rcar-vin/rcar-vin.h | 1 + 4 files changed, 83 insertions(+) commit 3ad69c610ba8a3f7cf76bc856ca62c92d2bd955f Author: Niklas Söderlund Date: Sun Oct 9 19:35:50 2022 +0100 media: rcar-vin: Store scaler in a function pointer The scaler implementation is different between the VIN generations, and not all SoCs have a scaler. Currently only Gen2 scalers are supported. Prepare to add support for more scalers by storing the setup in a function pointer initialized at probe time. While at it move call site to after, instead of before, the generic capture setup, this have no effect on the Gen2 scaler but will be leveraged by the Gen3 scaler. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/renesas/rcar-vin/rcar-core.c | 13 +++++++-- drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 34 +++++++++++++++------- .../media/platform/renesas/rcar-vin/rcar-v4l2.c | 6 ++++ drivers/media/platform/renesas/rcar-vin/rcar-vin.h | 6 ++++ 4 files changed, 46 insertions(+), 13 deletions(-) commit f42a323252afc930eea0c9fd839037f952baf691 Author: Niklas Söderlund Date: Sun Oct 9 19:35:49 2022 +0100 media: rcar-vin: Do not cache remote rectangle Prepare for scaling support in the media controller part of the driver by not caching the remote rectangle. Mimic the omap3isp and look it up each time it's needed. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/renesas/rcar-vin/rcar-v4l2.c | 84 +++++++++++++++++----- drivers/media/platform/renesas/rcar-vin/rcar-vin.h | 2 - 2 files changed, 65 insertions(+), 21 deletions(-) commit a6e3d86ece0b42a571a11055ace5c3148cb7ce76 Merge: bed6e8659344 60aeca6dc474 Author: David S. Miller Date: Fri Nov 25 10:46:22 2022 +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 2022-11-23 (ice) This series contains updates to ice driver only. Karol adjusts check of PTP hardware to wait longer but check more often. Brett removes use of driver defined link speed; instead using the values from ethtool.h, utilizing static tables for indexing. Ben adds tracking of stats in order to accumulate reported statistics that were previously reset by hardware. Marcin fixes issues setting RXDID when queues are asymmetric. Anatolii re-introduces use of define over magic number; ICE_RLAN_BASE_S. --- v3: - Dropped, previous, patch 2 v2: Patch 5 - Convert some allocations to non-managed - Remove combined error checking; add error checks for each call - Remove excess NULL checks - Remove unnecessary NULL sets and newlines ==================== Signed-off-by: David S. Miller commit bed6e86593448c0581e4444cfb711e17575aac6a Merge: 8781994a5ebe c3a8d375f3b9 Author: David S. Miller Date: Fri Nov 25 10:44:01 2022 +0000 Merge branch 'net-remove-kmap_atomic' Anirudh Venkataramanan says: ==================== net: Remove uses of kmap_atomic() kmap_atomic() is being deprecated. This little series replaces the last few uses of kmap_atomic() in the networking subsystem. This series triggered a suggestion [1] that perhaps the Sun Cassini, LDOM Virtual Switch Driver and the LDOM virtual network drivers should be removed completely. I plan to do this in a follow up patchset. For completeness, this series still includes kmap_atomic() conversions that apply to the above referenced drivers. If for some reason we choose to not remove these drivers, at least they won't be using kmap_atomic() anymore. Also, the following maintainer entries for the Chelsio driver seem to be defunct: Vinay Kumar Yadav Rohit Maheshwari I can submit a follow up patch to remove these entries, but thought maybe the folks over at Chelsio would want to look into this first. Changes v1 -> v2: Use memcpy_from_page() in patches 2/6 and 4/6 Add new patch for the thunderbolt driver Update commit messages and cover letter ==================== Signed-off-by: David S. Miller commit c3a8d375f3b996e6e9a32e2b8249b6d704b358e3 Author: Anirudh Venkataramanan Date: Wed Nov 23 12:52:19 2022 -0800 net: thunderbolt: Use kmap_local_page() instead of kmap_atomic() kmap_atomic() is being deprecated in favor of kmap_local_page(). Replace kmap_atomic() and kunmap_atomic() with kmap_local_page() and kunmap_local() respectively. Note that kmap_atomic() disables preemption and page-fault processing, but kmap_local_page() doesn't. When converting uses of kmap_atomic(), one has to check if the code being executed between the map/unmap implicitly depends on page-faults and/or preemption being disabled. If yes, then code to disable page-faults and/or preemption should also be added for functional correctness. That however doesn't appear to be the case here, so just kmap_local_page() is used. Also note that the page being mapped is not allocated by the driver, and so the driver doesn't know if the page is in normal memory. This is the reason kmap_local_page() is used as opposed to page_address(). I don't have hardware, so this change has only been compile tested. Cc: Michael Jamet Cc: Mika Westerberg Cc: Yehezkel Bernat Cc: Ira Weiny Cc: Fabio M. De Francesco Signed-off-by: Anirudh Venkataramanan Acked-by: Mika Westerberg Signed-off-by: David S. Miller drivers/net/thunderbolt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 350d351389e9f3885697de477986f1f891f95fda Author: Anirudh Venkataramanan Date: Wed Nov 23 12:52:18 2022 -0800 sunvnet: Use kmap_local_page() instead of kmap_atomic() kmap_atomic() is being deprecated in favor of kmap_local_page(). Replace kmap_atomic() and kunmap_atomic() with kmap_local_page() and kunmap_local() respectively. Note that kmap_atomic() disables preemption and page-fault processing, but kmap_local_page() doesn't. When converting uses of kmap_atomic(), one has to check if the code being executed between the map/unmap implicitly depends on page-faults and/or preemption being disabled. If yes, then code to disable page-faults and/or preemption should also be added for functional correctness. That however doesn't appear to be the case here, so just kmap_local_page() is used. Also note that the page being mapped is not allocated by the driver, and so the driver doesn't know if the page is in normal memory. This is the reason kmap_local_page() is used as opposed to page_address(). I don't have hardware, so this change has only been compile tested. Cc: Ira Weiny Cc: Fabio M. De Francesco Signed-off-by: Anirudh Venkataramanan Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3128591b55a009558cfb5e1df99b719eb60ce62 Author: Anirudh Venkataramanan Date: Wed Nov 23 12:52:17 2022 -0800 cassini: Use memcpy_from_page() instead of k[un]map_atomic() kmap_atomic() is being deprecated in favor of kmap_local_page(). Replace the map-memcpy-unmap usage pattern (done using k[un]map_atomic()) with memcpy_from_page(), which internally uses kmap_local_page() and kunmap_local(). This renders the variable 'vaddr' unnecessary, and so remove this too. Note that kmap_atomic() disables preemption and page-fault processing, but kmap_local_page() doesn't. When converting uses of kmap_atomic(), one has to check if the code being executed between the map/unmap implicitly depends on page-faults and/or preemption being disabled. If yes, then code to disable page-faults and/or preemption should also be added for functional correctness. That however doesn't appear to be the case here, so just memcpy_from_page() is used. Also note that the page being mapped is not allocated by the driver, and so the driver doesn't know if the page is in normal memory. This is the reason kmap_local_page() is used (via memcpy_from_page()) as opposed to page_address(). I don't have hardware, so this change has only been compile tested. Cc: Ira Weiny Cc: Fabio M. De Francesco Suggested-by: Fabio M. De Francesco Signed-off-by: Anirudh Venkataramanan Signed-off-by: David S. Miller drivers/net/ethernet/sun/cassini.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit c191445874bba16a636a88fc4afc7c3ab09228fd Author: Anirudh Venkataramanan Date: Wed Nov 23 12:52:16 2022 -0800 cassini: Use page_address() instead of kmap_atomic() Pages for Rx buffers are allocated in cas_page_alloc() using either GFP_ATOMIC or GFP_KERNEL. Memory allocated with GFP_KERNEL/GFP_ATOMIC can't come from highmem and so there's no need to kmap() them. Just use page_address() instead. This makes the variable 'addr' unnecessary, so remove it too. Note that kmap_atomic() disables preemption and page-fault processing, but page_address() doesn't. When removing uses of kmap_atomic(), one has to check if the code being executed between the map/unmap implicitly depends on page-faults and/or preemption being disabled. If yes, then code to disable page-faults and/or preemption should also be added for functional correctness. That however doesn't appear to be the case here, so just page_address() is used. I don't have hardware, so this change has only been compile tested. Cc: Ira Weiny Cc: Fabio M. De Francesco Signed-off-by: Anirudh Venkataramanan Signed-off-by: David S. Miller drivers/net/ethernet/sun/cassini.c | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) commit f61e6d3ca4dac83d7093e7be7ceabce95e738e68 Author: Anirudh Venkataramanan Date: Wed Nov 23 12:52:15 2022 -0800 sfc: Use kmap_local_page() instead of kmap_atomic() kmap_atomic() is being deprecated in favor of kmap_local_page(). Replace kmap_atomic() and kunmap_atomic() with kmap_local_page() and kunmap_local() respectively. Note that kmap_atomic() disables preemption and page-fault processing, but kmap_local_page() doesn't. When converting uses of kmap_atomic(), one has to check if the code being executed between the map/unmap implicitly depends on page-faults and/or preemption being disabled. If yes, then code to disable page-faults and/or preemption should also be added for functional correctness. That however doesn't appear to be the case here, so just kmap_local_page() is used. Also note that the page being mapped is not allocated by the driver, and so the driver doesn't know if the page is in normal memory. This is the reason kmap_local_page() is used as opposed to page_address(). I don't have hardware, so this change has only been compile tested. Cc: Ira Weiny Cc: Fabio M. De Francesco Cc: Edward Cree Cc: Martin Habets Signed-off-by: Anirudh Venkataramanan Acked-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51337ef07a40652efec48bb4103880c39ad0f119 Author: Anirudh Venkataramanan Date: Wed Nov 23 12:52:14 2022 -0800 ch_ktls: Use memcpy_from_page() instead of k[un]map_atomic() kmap_atomic() is being deprecated in favor of kmap_local_page(). Replace the map-memcpy-unmap usage pattern (done using k[un]map_atomic()) with memcpy_from_page(), which internally uses kmap_local_page() and kunmap_local(). This renders the variables 'data' and 'vaddr' unnecessary, and so remove these too. Note that kmap_atomic() disables preemption and page-fault processing, but kmap_local_page() doesn't. When converting uses of kmap_atomic(), one has to check if the code being executed between the map/unmap implicitly depends on page-faults and/or preemption being disabled. If yes, then code to disable page-faults and/or preemption should also be added for functional correctness. That however doesn't appear to be the case here, so just memcpy_from_page() is used. Also note that the page being mapped is not allocated by the driver, and so the driver doesn't know if the page is in normal memory. This is the reason kmap_local_page() is used (via memcpy_from_page()) as opposed to page_address(). I don't have hardware, so this change has only been compile tested. Cc: Ayush Sawal Cc: Ira Weiny Cc: Fabio M. De Francesco Suggested-by: Fabio M. De Francesco Signed-off-by: Anirudh Venkataramanan Acked-by: Ayush Sawal Signed-off-by: David S. Miller .../chelsio/inline_crypto/ch_ktls/chcr_ktls.c | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) commit 7ebfe10ec36b80637fe746dc2371ff1d9ce71efa Author: Linus Walleij Date: Fri Nov 25 11:34:35 2022 +0100 pinctrl: loongson2: Fix some const correctness The kernel robot using sparse is complaining like this: drivers/pinctrl/pinctrl-loongson2.c:212:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void *[noderef] __iomem reg @@ (...) I think the problem is simply that the register base is defined as void * __iomem instead of void __iomem * and this is because of the way const correctness works with pointer infix order. Fix it up. I think. Reported-by: kernel test robot Cc: zhanghongchen Cc: Yinbo Zhu Fixes: f73f88acbc18 ("pinctrl: pinctrl-loongson2: add pinctrl driver support") Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-loongson2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5cfe469c2654c3a4dda8504b1209abdd8b379e95 Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:14 2022 +0530 microblaze/PCI: Moving PCI iounmap and dependent code Moving PCI iounmap function and et all dependent code to iomap.c. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-14-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/pci/Makefile | 2 +- arch/microblaze/pci/iomap.c | 36 ++++++++++++++++++++ arch/microblaze/pci/pci-common.c | 72 ---------------------------------------- 3 files changed, 37 insertions(+), 73 deletions(-) commit 41604bfdc9f3f73d15bc19b85e474227c1f86856 Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:13 2022 +0530 microblaze/PCI: Remove support for Xilinx PCI host bridge This patch removes support for the Xilinx PCI host bridge IPcore. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-13-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/Kconfig | 8 --- arch/microblaze/configs/mmu_defconfig | 1 - arch/microblaze/include/asm/pci-bridge.h | 6 -- arch/microblaze/include/asm/pci.h | 5 -- arch/microblaze/pci/Makefile | 1 - arch/microblaze/pci/xilinx_pci.c | 105 ------------------------------- 6 files changed, 126 deletions(-) commit cb0199c70ee1065c9c9f121e3508833f3ee11cd1 Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:12 2022 +0530 microblaze/PCI: Remove unused pci_iobar_pfn() and et al declarations Remove unused pci_iobar_pfn() and et al declarations. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-12-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/include/asm/pci-bridge.h | 2 -- arch/microblaze/include/asm/pci.h | 3 --- arch/microblaze/pci/pci-common.c | 19 ------------------- 3 files changed, 24 deletions(-) commit 3604ef61f18ae024b4bf2686361965469f9ff805 Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:11 2022 +0530 microblaze/PCI: Remove unused sys_pciconfig_iobase() and et al declaration Removed unused code which provides information of various I/O regions. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-11-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/include/asm/pci-bridge.h | 8 ------ arch/microblaze/include/asm/pci.h | 7 ----- arch/microblaze/pci/pci-common.c | 44 -------------------------------- 3 files changed, 59 deletions(-) commit 68c9858bf823514ead6cbff3f1d66a9998893af8 Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:10 2022 +0530 microblaze/PCI: Remove unused pci_address_to_pio() conversion of CPU address to I/O port Remove unused pci_address_to_pio() conversion of CPU address to I/O port function. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-10-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/pci/pci-common.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit d4a37561c8894a59a8546256425a757a27b01b3a Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:09 2022 +0530 microblaze/PCI: Remove unused PCI Indirect ops Remove unused variants of PCI indirect handling. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-9-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/include/asm/pci-bridge.h | 34 ------- arch/microblaze/pci/Makefile | 2 +- arch/microblaze/pci/indirect_pci.c | 158 ------------------------------- arch/microblaze/pci/xilinx_pci.c | 6 -- 4 files changed, 1 insertion(+), 199 deletions(-) commit 7df700afd9c4855617e9a102518bd988395eb249 Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:08 2022 +0530 microblaze/PCI: Remove unused PCI BIOS resource allocation Remove PCI BIOSn unused code which provide's resource allocation for all pci bus and pci host controller memory initialization. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-8-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/include/asm/pci-bridge.h | 2 - arch/microblaze/include/asm/pci.h | 4 - arch/microblaze/pci/pci-common.c | 489 ------------------------------- 3 files changed, 495 deletions(-) commit 4308e3c9e1ea9112865b10ed83c03b8d5d81aa32 Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:07 2022 +0530 microblaze/PCI: Remove unused allocation & free of PCI host bridge structure Remove unused allocation and freeing of PCI host bridge structure. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-7-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/include/asm/pci-bridge.h | 5 ----- arch/microblaze/pci/pci-common.c | 29 ----------------------------- arch/microblaze/pci/xilinx_pci.c | 6 ------ 3 files changed, 40 deletions(-) commit 3d6010ec098bbbe28e35f8a487e04ba02ce6bbe3 Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:06 2022 +0530 microblaze/PCI: Remove unused device tree parsing for a host bridge resources Remove unused pci_process_bridge_OF_ranges function, used to parse the "ranges" property of a PCI host device. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-6-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/include/asm/pci-bridge.h | 13 --- arch/microblaze/pci/pci-common.c | 163 ------------------------------- arch/microblaze/pci/xilinx_pci.c | 5 - 3 files changed, 181 deletions(-) commit fc6dd9c446f2e5273e2584b735b8d3e0d1d15924 Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:05 2022 +0530 microblaze/PCI: Remove unused PCI legacy IO's access on a bus Remove PCI legacy read,write and mmap access IO's on a bus Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-5-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/include/asm/pci.h | 10 --- arch/microblaze/pci/pci-common.c | 140 -------------------------------------- 2 files changed, 150 deletions(-) commit fcfb746c90cae48838daf012816b7b130158ef52 Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:04 2022 +0530 microblaze/PCI: Remove unused PCI bus scan if configured as a host This routine is meant to be used early during boot, when the PCI bus numbers have not yet been assigned, and you need to issue PCI config cycles to an OF device. It could also be used to "fix" RTAS config cycles if you want to set pci_assign_all_buses to 1 and still use RTAS for PCI config cycles. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-4-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/include/asm/pci-bridge.h | 4 ---- arch/microblaze/pci/pci-common.c | 19 ------------------- 2 files changed, 23 deletions(-) commit fe2b509768a4bf128428f206eda4cfab6735da9d Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:03 2022 +0530 microblaze/PCI: Remove Null PCI config access unused functions Remove unused NULL_PCI_OP config access functions, for the case when we can't find a hose. Remove unused EARLY_PCI_OP and other declarations. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-3-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/pci/pci-common.c | 64 ---------------------------------------- 1 file changed, 64 deletions(-) commit 68db4e9e5fcd3509cbd7f6bdc226ee761c140a24 Author: Thippeswamy Havalige Date: Tue Oct 25 12:22:02 2022 +0530 microblaze/PCI: Remove unused early_read_config_byte() et al declarations early_read_config_byte() and similar are declared but never defined. Remove the unused declarations. Signed-off-by: Thippeswamy Havalige Link: https://lore.kernel.org/r/20221025065214.4663-2-thippeswamy.havalige@amd.com Signed-off-by: Michal Simek arch/microblaze/include/asm/pci-bridge.h | 18 ------------ arch/microblaze/pci/pci-common.c | 5 ---- arch/microblaze/pci/xilinx_pci.c | 48 -------------------------------- 3 files changed, 71 deletions(-) commit 8781994a5ebef7ea06a6f6f54390fd747e8d97f1 Merge: 46da4aa2560f a825b611c7c1 Author: David S. Miller Date: Fri Nov 25 10:38:10 2022 +0000 Merge branch 'lan966x-extend-xdp-support' Horatiu Vultur says: ==================== net: lan966x: Extend xdp support Extend the current support of XDP in lan966x with the action XDP_TX and XDP_REDIRECT. The first patches just prepare the things such that it would be easier to add XDP_TX and XDP_REDIRECT actions. Like adding XDP_PACKET_HEADROOM, introduce helper functions, use the correct dma_dir for the page pool The last 2 patches introduce the XDP actions XDP_TX and XDP_REDIRECT. v4->v5: - add iterator declaration inside for loops - move the scope of port inside the function lan966x_fdma_rx_alloc_page_pool - create union for skb and xdpf inside struct lan966x_tx_dcb_buf v3->v4: - use napi_consume_skb instead of dev_kfree_skb_any - arrange members in struct lan966x_tx_dcb_buf not to have holes - fix when xdp program is added the check for determining if page pool needs to be recreated was wrong - change type for len in lan966x_tx_dcb_buf to u32 v2->v3: - make sure to update rxq memory model - update the page pool direction if there is any xdp program - in case of action XDP_TX give back to reuse the page - in case of action XDP_REDIRECT, remap the frame and make sure to unmap it when is transmitted. v1->v2: - use skb_reserve of using skb_put and skb_pull - make sure that data_len doesn't include XDP_PACKET_HEADROOM ==================== Signed-off-by: David S. Miller commit a825b611c7c186c8b53fa22ae0c027a75c5d4096 Author: Horatiu Vultur Date: Wed Nov 23 21:31:39 2022 +0100 net: lan966x: Add support for XDP_REDIRECT Extend lan966x XDP support with the action XDP_REDIRECT. This is similar with the XDP_TX, so a lot of functionality can be reused. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller .../net/ethernet/microchip/lan966x/lan966x_fdma.c | 79 ++++++++++++++++++---- .../net/ethernet/microchip/lan966x/lan966x_main.c | 1 + .../net/ethernet/microchip/lan966x/lan966x_main.h | 10 ++- .../net/ethernet/microchip/lan966x/lan966x_xdp.c | 29 +++++++- 4 files changed, 104 insertions(+), 15 deletions(-) commit 19c6f534f63608fbf966897b2c64fefcb916dc08 Author: Horatiu Vultur Date: Wed Nov 23 21:31:38 2022 +0100 net: lan966x: Add support for XDP_TX Extend lan966x XDP support with the action XDP_TX. In this case when the received buffer needs to execute XDP_TX, the buffer will be moved to the TX buffers. So a new RX buffer will be allocated. When the TX finish with the frame, it would give back the buffer to the page pool. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller .../net/ethernet/microchip/lan966x/lan966x_fdma.c | 79 ++++++++++++++++++++-- .../net/ethernet/microchip/lan966x/lan966x_main.c | 4 +- .../net/ethernet/microchip/lan966x/lan966x_main.h | 13 +++- .../net/ethernet/microchip/lan966x/lan966x_xdp.c | 8 +++ 4 files changed, 94 insertions(+), 10 deletions(-) commit 560c7223d6e48171d5a34ca07f6c886d364bcbdf Author: Horatiu Vultur Date: Wed Nov 23 21:31:37 2022 +0100 net: lan966x: Update dma_dir of page_pool_params To add support for XDP_TX it is required to be able to write to the DMA area therefore it is required that the pages will be mapped using DMA_BIDIRECTIONAL flag. Therefore check if there are any xdp programs on the interfaces and in that case set DMA_BIDRECTIONAL otherwise use DMA_FROM_DEVICE. Therefore when a new XDP program is added it is required to redo the page_pool. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller .../net/ethernet/microchip/lan966x/lan966x_fdma.c | 29 +++++++++++++++++----- .../net/ethernet/microchip/lan966x/lan966x_main.h | 2 ++ .../net/ethernet/microchip/lan966x/lan966x_xdp.c | 28 +++++++++++++++++++++ 3 files changed, 53 insertions(+), 6 deletions(-) commit 77ddda44411c36f6276616b9609a50ca98dc4d2c Author: Horatiu Vultur Date: Wed Nov 23 21:31:36 2022 +0100 net: lan966x: Update rxq memory model By default the rxq memory model is MEM_TYPE_PAGE_SHARED but to be able to reuse pages on the TX side, when the XDP action XDP_TX it is required to update the memory model to PAGE_POOL. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 49f5eea8c4f548ef174b17ef2e86f4d867a64516 Author: Horatiu Vultur Date: Wed Nov 23 21:31:35 2022 +0100 net: lan966x: Add len field to lan966x_tx_dcb_buf Currently when a frame was transmitted, it is required to unamp the frame that was transmitted. The length of the frame was taken from the transmitted skb. In the future we might not have an skb, therefore store the length skb directly in the lan966x_tx_dcb_buf and use this one to unamp the frame. While at this, also arrange the members in lan966x_tx_dcb_buf not to have any holes. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c | 5 +++-- drivers/net/ethernet/microchip/lan966x/lan966x_main.h | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) commit 3d66bc578655926ab1aff4bb0bb5037af16f914a Author: Horatiu Vultur Date: Wed Nov 23 21:31:34 2022 +0100 net: lan966x: Introduce helper functions Introduce lan966x_fdma_tx_setup_dcb and lan966x_fdma_tx_start functions and use of them inside lan966x_fdma_xmit. There is no functional change in here. They are introduced to be used when XDP_TX/REDIRECT actions are introduced. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller .../net/ethernet/microchip/lan966x/lan966x_fdma.c | 71 ++++++++++++++-------- 1 file changed, 44 insertions(+), 27 deletions(-) commit 7292bb064d627f5d97686d4e765508b604a13241 Author: Horatiu Vultur Date: Wed Nov 23 21:31:33 2022 +0100 net: lan966x: Add XDP_PACKET_HEADROOM Update the page_pool params to allocate XDP_PACKET_HEADROOM space as headroom for all received frames. This is needed for when the XDP_TX and XDP_REDIRECT are implemented. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c | 16 +++++++++++----- drivers/net/ethernet/microchip/lan966x/lan966x_xdp.c | 3 ++- 2 files changed, 13 insertions(+), 6 deletions(-) commit 46da4aa2560f44eb24d55d931533dc1da45b8e89 Author: Min Li Date: Wed Nov 23 14:52:07 2022 -0500 ptp: idt82p33: remove PEROUT_ENABLE_OUTPUT_MASK PEROUT_ENABLE_OUTPUT_MASK was there to allow us to enable/disable all the perout pins. But it is not standard procedure, we will have to discard it. Signed-off-by: Min Li Signed-off-by: David S. Miller drivers/ptp/ptp_idt82p33.c | 34 ---------------------------------- drivers/ptp/ptp_idt82p33.h | 1 - 2 files changed, 35 deletions(-) commit ad3cc7760dc45f30a772b312a01f965d6e74d36b Author: Min Li Date: Wed Nov 23 14:52:06 2022 -0500 ptp: idt82p33: Add PTP_CLK_REQ_EXTTS support 82P33 family of chips can trigger TOD read/write by external signal from one of the IN12/13/14 pins, which are set user space programs by calling PTP_PIN_SETFUNC through ptp_ioctl Signed-off-by: Min Li Signed-off-by: David S. Miller drivers/ptp/ptp_idt82p33.c | 683 +++++++++++++++++++++++++++++++++++++++++---- drivers/ptp/ptp_idt82p33.h | 20 +- 2 files changed, 640 insertions(+), 63 deletions(-) commit 0ed554fd769a19ea8464bb83e9ac201002ef74ad Author: Baisong Zhong Date: Sun Nov 20 06:59:18 2022 +0000 media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer() Wei Chen reports a kernel bug as blew: general protection fault, probably for non-canonical address KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] ... Call Trace: __i2c_transfer+0x77e/0x1930 drivers/i2c/i2c-core-base.c:2109 i2c_transfer+0x1d5/0x3d0 drivers/i2c/i2c-core-base.c:2170 i2cdev_ioctl_rdwr+0x393/0x660 drivers/i2c/i2c-dev.c:297 i2cdev_ioctl+0x75d/0x9f0 drivers/i2c/i2c-dev.c:458 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fd834a8bded In az6027_i2c_xfer(), if msg[i].addr is 0x99, a null-ptr-deref will caused when accessing msg[i].buf. For msg[i].len is 0 and msg[i].buf is null. Fix this by checking msg[i].len in az6027_i2c_xfer(). Link: https://lore.kernel.org/lkml/CAO4mrfcPHB5aQJO=mpqV+p8mPLNg-Fok0gw8gZ=zemAfMGTzMg@mail.gmail.com/ Link: https://lore.kernel.org/linux-media/20221120065918.2160782-1-zhongbaisong@huawei.com Fixes: 76f9a820c867 ("V4L/DVB: AZ6027: Initial import of the driver") Reported-by: Wei Chen Signed-off-by: Baisong Zhong Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/az6027.c | 4 ++++ 1 file changed, 4 insertions(+) commit a574359e2e71ce16be212df3a082ed60a4bd2c5f Author: Chen Zhongjin Date: Tue Nov 8 03:30:05 2022 +0000 media: dvb-core: Fix ignored return value in dvb_register_frontend() In dvb_register_frontend(), dvb_register_device() is possible to fail but its return value is ignored. It will cause use-after-free when module is removed, because in dvb_unregister_frontend() it tries to unregister a not registered device. BUG: KASAN: use-after-free in dvb_remove_device+0x18b/0x1f0 [dvb_core] Read of size 4 at addr ffff88800dff4824 by task rmmod/428 CPU: 3 PID: 428 Comm: rmmod Call Trace: ... dvb_remove_device+0x18b/0x1f0 [dvb_core] dvb_unregister_frontend+0x7b/0x130 [dvb_core] vidtv_bridge_remove+0x6e/0x160 [dvb_vidtv_bridge] ... Fix this by catching return value of dvb_register_device(). However the fe->refcount can't be put to zero immediately, because there are still modules calling dvb_frontend_detach() when dvb_register_frontend() fails. Link: https://lore.kernel.org/linux-media/20221108033005.169095-1-chenzhongjin@huawei.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Chen Zhongjin Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0f298a4379fa7b47b0d0af8777098913ab44264d Author: Yuan Can Date: Tue Sep 27 14:38:27 2022 +0100 media: dvb-usb: dib0700_devices: Remove unused struct dibx090p_adc After commit 5e9c85d98337("[media] dib8096: enhancement"), no one use struct dibx090p_adc, so remove it. Link: https://lore.kernel.org/linux-media/20220927133827.99097-1-yuancan@huawei.com Signed-off-by: Yuan Can Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dib0700_devices.c | 7 ------- 1 file changed, 7 deletions(-) commit 555924e217573d72b3ac9cb1e2052a21797d9bea Author: Gaosheng Cui Date: Tue Sep 20 02:59:02 2022 +0100 media: dib0700: remove orphan dvb_usb_dib0700_ir_proto declaration The dvb_usb_dib0700_ir_proto has been removed by commit 0ffd1ab34a00 ("V4L/DVB: dib0700: properly implement IR change_protocol"), so remove the orphan declaration. Link: https://lore.kernel.org/linux-media/20220920015902.785337-1-cuigaosheng1@huawei.com Signed-off-by: Gaosheng Cui Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dib0700.h | 1 - 1 file changed, 1 deletion(-) commit 94d90fb06b94a90c176270d38861bcba34ce377d Author: Mazin Al Haddad Date: Wed Aug 24 02:21:52 2022 +0100 media: dvb-usb: fix memory leak in dvb_usb_adapter_init() Syzbot reports a memory leak in "dvb_usb_adapter_init()". The leak is due to not accounting for and freeing current iteration's adapter->priv in case of an error. Currently if an error occurs, it will exit before incrementing "num_adapters_initalized", which is used as a reference counter to free all adap->priv in "dvb_usb_adapter_exit()". There are multiple error paths that can exit from before incrementing the counter. Including the error handling paths for "dvb_usb_adapter_stream_init()", "dvb_usb_adapter_dvb_init()" and "dvb_usb_adapter_frontend_init()" within "dvb_usb_adapter_init()". This means that in case of an error in any of these functions the current iteration is not accounted for and the current iteration's adap->priv is not freed. Fix this by freeing the current iteration's adap->priv in the "stream_init_err:" label in the error path. The rest of the (accounted for) adap->priv objects are freed in dvb_usb_adapter_exit() as expected using the num_adapters_initalized variable. Syzbot report: BUG: memory leak unreferenced object 0xffff8881172f1a00 (size 512): comm "kworker/0:2", pid 139, jiffies 4294994873 (age 10.960s) 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: [] dvb_usb_adapter_init drivers/media/usb/dvb-usb/dvb-usb-init.c:75 [inline] [] dvb_usb_init drivers/media/usb/dvb-usb/dvb-usb-init.c:184 [inline] [] dvb_usb_device_init.cold+0x4e5/0x79e drivers/media/usb/dvb-usb/dvb-usb-init.c:308 [] dib0700_probe+0x8d/0x1b0 drivers/media/usb/dvb-usb/dib0700_core.c:883 [] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396 [] call_driver_probe drivers/base/dd.c:542 [inline] [] really_probe.part.0+0xe7/0x310 drivers/base/dd.c:621 [] really_probe drivers/base/dd.c:583 [inline] [] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:752 [] driver_probe_device+0x2a/0x120 drivers/base/dd.c:782 [] __device_attach_driver+0xf6/0x140 drivers/base/dd.c:899 [] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:427 [] __device_attach+0x122/0x260 drivers/base/dd.c:970 [] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:487 [] device_add+0x5fb/0xdf0 drivers/base/core.c:3405 [] usb_set_configuration+0x8f2/0xb80 drivers/usb/core/message.c:2170 [] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238 [] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293 [] call_driver_probe drivers/base/dd.c:542 [inline] [] really_probe.part.0+0xe7/0x310 drivers/base/dd.c:621 [] really_probe drivers/base/dd.c:583 [inline] [] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:752 Link: https://syzkaller.appspot.com/bug?extid=f66dd31987e6740657be Reported-and-tested-by: syzbot+f66dd31987e6740657be@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-media/20220824012152.539788-1-mazinalhaddad05@gmail.com Signed-off-by: Mazin Al Haddad Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dvb-usb-init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0fc044b2b5e2d05a1fa1fb0d7f270367a7855d79 Author: Lin Ma Date: Sun Aug 7 15:59:52 2022 +0100 media: dvbdev: adopts refcnt to avoid UAF dvb_unregister_device() is known that prone to use-after-free. That is, the cleanup from dvb_unregister_device() releases the dvb_device even if there are pointers stored in file->private_data still refer to it. This patch adds a reference counter into struct dvb_device and delays its deallocation until no pointer refers to the object. Link: https://lore.kernel.org/linux-media/20220807145952.10368-1-linma@zju.edu.cn Signed-off-by: Lin Ma Reported-by: kernel test robot Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ca_en50221.c | 2 +- drivers/media/dvb-core/dvb_frontend.c | 2 +- drivers/media/dvb-core/dvbdev.c | 32 +++++++++++++++++++++++++------- include/media/dvbdev.h | 31 +++++++++++++++++-------------- 4 files changed, 44 insertions(+), 23 deletions(-) commit 9b7de3c2daf503f86ab0641f377402b8d7f5e485 Author: wangjianli Date: Sun Jul 24 08:32:42 2022 +0100 media: media/dvb-frontends: fix repeated words in comments Delete the redundant word 'in'. Link: https://lore.kernel.org/linux-media/20220724073242.15279-1-wangjianli@cdjrlc.com Signed-off-by: wangjianli Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2820r_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbffe6f6b933198260db6e2dcd78f7de3e6b5aa6 Author: YongSu Yoo Date: Thu Jun 23 11:35:43 2022 +0100 media: dvb_ringbuffer : Fix a bug in dvb_ringbuffer.c The function dvb_ringbuffer_pkt_next in /linux-next/drviers/media/dvb-core/dvb_ringbuffer.c, which searches the idx of the next valid packet in the ring buffer of the ca->slot_info[slot].rx_buffer at /linux-next/drivers/media/dvb-core/dvb_ca_en50221.c, has the following problem. In calculating the amounts of the consumed address of the ring buffer, if the read address(rbuf->pread) of the ring buffer is smaller than the idx, the amounts of the searched address should be (idx - rbuf->pread), whereas if the read address(rbuf->pread) of the ring buffer is larger than the idx, the amounts of the consumed address should be (idx - rbuf->pread + rbug->size). But there exists an incorrect logic that the rbug-size was not properly added on (idx - rbug->pread) in the later case. With this commit, we fixed this bug. Link: https://lore.kernel.org/linux-media/20220623103543.4138-1-yongsuyoo0215@gmail.com Signed-off-by: Yongsu Yoo Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ringbuffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 37e6d30e89d699449082b22845f515fe47648087 Author: Lecopzer Chen Date: Mon May 16 18:15:14 2022 +0100 media: mantis: Kconfig: add depends on DVB_CORE for MANTIS_CORE MANTIS_CORE needs DVB_CORE, set 'depends on' explicitly ERROR: modpost: "dvb_dmx_init" [drivers/media/pci/mantis/mantis_core.ko] undefined! ERROR: modpost: "dvb_unregister_adapter" [drivers/media/pci/mantis/mantis_core.ko] undefined! ERROR: modpost: "dvb_register_frontend" [drivers/media/pci/mantis/mantis_core.ko] undefined! ERROR: modpost: "dvb_ca_en50221_camchange_irq" [drivers/media/pci/mantis/mantis_core.ko] undefined! ERROR: modpost: "dvb_unregister_frontend" [drivers/media/pci/mantis/mantis_core.ko] undefined! >> ERROR: modpost: "dvb_ca_en50221_camready_irq" [drivers/media/pci/mantis/mantis_core.ko] undefined! >> ERROR: modpost: "dvb_frontend_detach" [drivers/media/pci/mantis/mantis_core.ko] undefined! >> ERROR: modpost: "dvb_dmxdev_release" [drivers/media/pci/mantis/mantis_core.ko] undefined! >> ERROR: modpost: "dvb_dmx_swfilter" [drivers/media/pci/mantis/mantis_core.ko] undefined! Link: https://lore.kernel.org/linux-media/20220516171515.16404-2-lecopzer.chen@mediatek.com Reported-by: kernel test robot Signed-off-by: Lecopzer Chen Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/mantis/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b0d0477fce747d4137aa65856318b55fba72198 Author: Keita Suzuki Date: Tue Apr 26 06:29:19 2022 +0100 media: dvb-core: Fix double free in dvb_register_device() In function dvb_register_device() -> dvb_register_media_device() -> dvb_create_media_entity(), dvb->entity is allocated and initialized. If the initialization fails, it frees the dvb->entity, and return an error code. The caller takes the error code and handles the error by calling dvb_media_device_free(), which unregisters the entity and frees the field again if it is not NULL. As dvb->entity may not NULLed in dvb_create_media_entity() when the allocation of dvbdev->pad fails, a double free may occur. This may also cause an Use After free in media_device_unregister_entity(). Fix this by storing NULL to dvb->entity when it is freed. Link: https://lore.kernel.org/linux-media/20220426052921.2088416-1-keitasuzuki.park@sslab.ics.keio.ac.jp Fixes: fcd5ce4b3936 ("media: dvb-core: fix a memory leak bug") Cc: stable@vger.kernel.org Cc: Wenwen Wang Signed-off-by: Keita Suzuki Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 1 + 1 file changed, 1 insertion(+) commit af0dc3b0afae85941338aae9d6d3c1f0904d9979 Author: Colin Ian King Date: Sun Apr 24 16:47:20 2022 +0100 media: dvbdev: remove redundant initialization of variable ret Variable ret is being ininitialized with a value that is never read. The ininitializtion is redundant and can be removed. Move the variable to the scope it is required. Link: https://lore.kernel.org/linux-media/20220424154720.1356873-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a15fe8d9f1bf460a804bcf18a890bfd2cf0d5caa Author: Yan Lei Date: Sun Apr 10 07:19:25 2022 +0100 media: dvb-frontends: fix leak of memory fw Link: https://lore.kernel.org/linux-media/20220410061925.4107-1-chinayanlei2002@163.com Signed-off-by: Yan Lei Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/bcm3510.c | 1 + 1 file changed, 1 insertion(+) commit 6745ea4bdde9cab08149be4820540abe6a0f4207 Author: Wan Jiabing Date: Fri Apr 8 10:28:30 2022 +0100 media: dvb-frontends: clean up unneeded else Clean up unneeded 'else'. Link: https://lore.kernel.org/linux-media/20220408092831.45755-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mxl5xx.c | 2 -- 1 file changed, 2 deletions(-) commit e704b44b550fbc9a4af15bc848fdbac5ff2eec47 Author: Robert Schlabbach Date: Fri Jan 21 21:18:49 2022 +0000 media: dvb-core: Enhance shared multi-frontend support Drivers for devices with multiple frontends which cannot be used concurrently due to hardware limitations which enforce that restriction by setting the mfe_shared field to 1 exhibit rather unfriendly behavior towards applications: The unavailable frontend devices cannot be opened at all, not even for read-only access to query information. Even worse, any open call is blocked for 5 seconds by default. Allow drivers for such devices to behave like regular busy frontend devices instead, i.e. still allowing concurrent read access to the unavailable frontend and denying concurrent write access with -EBUSY without delay. This patch does not alter the behavior of any existing driver to avoid regressions. Driver developers who wish to take advantage of this must ensure their driver can handle all read-only accesses to the unavailable frontend, and indicate the capability by setting the mfe_shared field to 2 instead of 1. Add a check to dvb-usb-init.c when automatically setting the mfe_shared field that when a driver has already set the field to 2, it is not overwritten. Document the additional capability in the code comment about mfe_shared. Link: https://lore.kernel.org/linux-media/trinity-22c77578-26b0-4867-9ff7-2668e5d22c64-1642799929896@3c-app-gmx-bap04 Signed-off-by: Robert Schlabbach Tested-by: Robert Schlabbach Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 12 +++++++++++- drivers/media/usb/dvb-usb/dvb-usb-init.c | 2 +- include/media/dvbdev.h | 6 +++++- 3 files changed, 17 insertions(+), 3 deletions(-) commit 6508a50fe84f9858e8b59b53dce3847aaeeab744 Author: Robert Schlabbach Date: Fri Jan 14 07:43:48 2022 +0000 media: dvb: add DVB-C2 and DVB-S2X parameter values Extend the DVB frontend parameter enums with additional values specified by the DVB-C2 (ETSI EN 302 769) and DVB-S2X (ETSI EN 302 307-2) standards to be ready for frontend drivers for such receivers. While most parameters will be "read-only" due to being autodetected by the receiver and only being reported back for informational purposes, the addition of SYS_DVBC2 to the delivery systems enum is required, because there are DVB-C2 capable receivers which are not capable of DVB-C/C2 autodetection and thus need this enum value to be explicitly instructed to search for a DVB-C2 signal. As for DVB-S2X, as that is an extension to DVB-S2, the same delivery system enum as for DVB-S2 can be used. Add the additional enum values and comments to the documentation. Link: https://lore.kernel.org/linux-media/trinity-1b7c5a66-85d4-4595-a690-0fde965d49b3-1642146228587@3c-app-gmx-bap69 Signed-off-by: Robert Schlabbach Signed-off-by: Mauro Carvalho Chehab .../media/dvb/fe_property_parameters.rst | 25 +++++---- include/uapi/linux/dvb/frontend.h | 59 +++++++++++++++++++++- 2 files changed, 74 insertions(+), 10 deletions(-) commit e2a227185de33fc041a88ceac42d2fce4ba1fb8a Author: Robert Schlabbach Date: Wed Jan 12 03:33:41 2022 +0000 media: dvb_frontend: add missing DSS switch cases While the documentation mentions the delivery system DSS as a satellite system, it was missing from all but one switch statement in the DVB frontend code, leading to tuning failures, because the frequency was not correctly handled as being in kHz rather than Hz. Add the missing switch cases so that DSS is handled like the other satellite systems. For the rolloff, assume 0.20 as per one publication found via Internet search. Link: https://lore.kernel.org/linux-media/trinity-5f5afda9-657a-4a91-bf15-842f4f249535-1641958421391@3c-app-gmx-bap21 Signed-off-by: Robert Schlabbach Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e6431a0c0d711af71a0628689463af4ec19c82f8 Author: Chuck Ritola Date: Fri Dec 31 03:53:27 2021 +0000 media: dvb-frontends: a8293: fix LNB powerup failure in PCTV 461e Fixes a8293 failure to raise LNB voltage in PCTV 461e DVB-S2 Stick affecting multiple users over several years as found here: http://www.linuxquestions.org/questions/linux-hardware-18/pctv-dvb-s2-stick-461e-not-feeding-lnb-4175529374/ https://www.linuxtv.org/wiki/index.php/Pinnacle_PCTV_DVB-S2_Stick_(461e) https://github.com/OpenELEC/OpenELEC.tv/issues/3731 Caused by vIN undervoltage lockout (status register bit 7) when raising LNB to 18V. Addressed by using the higher-precision voltages available on the a8293 to gradually increase (slew) the voltage when voltage increases are requested. Adds volt_slew_nanos_per_mv to a8293_platform_data struct for specifying slew rate. If value is <1 or non-sane (>1600), the original no-slew version for a8293_set_voltage is used. Link: https://lore.kernel.org/linux-media/20211231035326.6759-1-cjritola@gmail.com [mchehab: fixed some coding style issues] Signed-off-by: Chuck Ritola Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/a8293.c | 155 +++++++++++++++++++++++++++++++++- drivers/media/dvb-frontends/a8293.h | 3 + drivers/media/usb/em28xx/em28xx-dvb.c | 6 ++ 3 files changed, 161 insertions(+), 3 deletions(-) commit 5ead93289815a075d43c415e35c8beafafb801c9 Author: ZhangPeng Date: Fri Nov 25 07:01:56 2022 +0000 pinctrl: pinconf-generic: add missing of_node_put() of_node_put() needs to be called when jumping out of the loop, since for_each_available_child_of_node() will increase the refcount of node. Fixes: c7289500e29d ("pinctrl: pinconf-generic: scan also referenced phandle node") Signed-off-by: ZhangPeng Link: https://lore.kernel.org/r/20221125070156.3535855-1-zhangpeng362@huawei.com Signed-off-by: Linus Walleij drivers/pinctrl/pinconf-generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b5411dd4d506c373d4957e0b6c1c8e822dc8e511 Author: Geert Uytterhoeven Date: Fri Dec 17 09:08:52 2021 +0000 media: dvb_ringbuffer: Fix typo in dvb_ringbuffer_pkt_write() kerneldoc There is no such error code EVINAL. Link: https://lore.kernel.org/linux-media/270f5b7f79a24dc1a3e81d94f6f54fc0f08daf56.1639732105.git.geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Signed-off-by: Mauro Carvalho Chehab include/media/dvb_ringbuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eea7b3137218f0411b58b06fa27b86e2ed38ecbf Merge: b084f6cc3563 22f3c3257288 Author: David S. Miller Date: Fri Nov 25 09:42:14 2022 +0000 Merge branch 'sparx5-tc-protocol-all' Steen Hegelund says: ==================== net: TC protocol all support in Sparx5 IS2 VCAP This provides support for the TC flower filters 'protocol all' clause in the Sparx5 IS2 VCAP. It builds on top of the initial IS2 VCAP support found in these series: https://lore.kernel.org/all/20221020130904.1215072-1-steen.hegelund@microchip.com/ https://lore.kernel.org/all/20221109114116.3612477-1-steen.hegelund@microchip.com/ https://lore.kernel.org/all/20221111130519.1459549-1-steen.hegelund@microchip.com/ https://lore.kernel.org/all/20221117213114.699375-1-steen.hegelund@microchip.com/ Functionality: ============== As the configuration for the Sparx5 IS2 VCAP consists of one (or more) keyset(s) for each lookup/port per traffic classification, it is not always possible to cover all protocols with just one ordinary VCAP rule. To improve this situation the driver will try to find out what keysets a rule will need to cover a TC flower "protocol all" filter and then compare this set of keysets to what the hardware is currently configured for. In case multiple keysets are needed then the driver can create a rule per rule size (e.g. X6 and X12) and use a mask on the keyset type field to allow the VCAP to match more than one keyset with just one rule. This is possible because the keysets that have the same size typically has many keys in common, so the VCAP rule keys can make a common match. The result is that one TC filter command may create multiple IS2 VCAP rules of different sizes that have a type field with a masked type id. Delivery: ========= This is current plan for delivering the full VCAP feature set of Sparx5: - Sparx5 IS0 VCAP support - TC policer and drop action support (depends on the Sparx5 QoS support upstreamed separately) - Sparx5 ES0 VCAP support - TC flower template support - TC matchall filter support for mirroring and policing ports - TC flower filter mirror action support - Sparx5 ES2 VCAP support Version History: ================ v2 Fixed a NULL return value compiler warning. Moved the new vcap_find_actionfield function a bit up in the file. v1 Initial version ==================== Signed-off-by: David S. Miller commit 22f3c32572884ece55ed0acf292bef11bc2e6b63 Author: Steen Hegelund Date: Wed Nov 23 16:25:45 2022 +0100 net: microchip: sparx5: Add VCAP filter keys KUNIT test This tests the filtering of keys, either dropping unsupported keys or dropping keys specified in a list. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../net/ethernet/microchip/vcap/vcap_api_kunit.c | 194 +++++++++++++++++++++ 1 file changed, 194 insertions(+) commit 14b639caa6e4016a10112e0a1f6fcb5fdad4374c Author: Steen Hegelund Date: Wed Nov 23 16:25:44 2022 +0100 net: microchip: sparx5: Support for displaying a list of keysets This will display a list of keyset in case the type_id field in the VCAP rule has been wildcarded. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../net/ethernet/microchip/vcap/vcap_api_debugfs.c | 98 +++++++++++++--------- .../microchip/vcap/vcap_api_debugfs_kunit.c | 20 +++-- 2 files changed, 74 insertions(+), 44 deletions(-) commit 0ca60948487757b1163fd3a13884d2f868eb8ddf Author: Steen Hegelund Date: Wed Nov 23 16:25:43 2022 +0100 net: microchip: sparx5: Support for TC protocol all This allows support of TC protocol all for the Sparx5 IS2 VCAP. This is done by creating multiple rules that covers the rule size and traffic types in the IS2. Each rule size (e.g X16 and X6) may have multiple keysets and if there are more than one the type field in the VCAP rule will be wildcarded to support these keysets. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_tc_flower.c | 209 ++++++++++++++++++++- .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 18 +- .../ethernet/microchip/sparx5/sparx5_vcap_impl.h | 13 ++ 3 files changed, 234 insertions(+), 6 deletions(-) commit 465a38a269e93855393a217fb6a74de1e59767b8 Author: Steen Hegelund Date: Wed Nov 23 16:25:42 2022 +0100 net: microchip: sparx5: Support for copying and modifying rules in the API This adds support for making a copy of a rule and modify keys and actions to differentiate the copy. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/vcap_api.c | 185 ++++++++++++++++++++- .../net/ethernet/microchip/vcap/vcap_api_client.h | 22 ++- .../net/ethernet/microchip/vcap/vcap_api_kunit.c | 6 +- .../net/ethernet/microchip/vcap/vcap_api_private.h | 4 - 4 files changed, 206 insertions(+), 11 deletions(-) commit 83478938f78fd640c72af83d739a90c840e1b876 Author: Jason A. Donenfeld Date: Sat Nov 19 14:42:59 2022 +0100 hwrng: u2fzero - account for high quality RNG The U2F zero apparently has a real TRNG in it with maximum quality, not one with quality of "1", which was likely a misinterpretation of the field as a boolean. So remove the assignment entirely, so that we get the default quality setting. In the u2f-zero firmware, the 0x21 RNG command used by this driver is handled as such [1]: case U2F_CUSTOM_GET_RNG: if (atecc_send_recv(ATECC_CMD_RNG,ATECC_RNG_P1,ATECC_RNG_P2, NULL, 0, appdata.tmp, sizeof(appdata.tmp), &res) == 0 ) { memmove(msg->pkt.init.payload, res.buf, 32); U2FHID_SET_LEN(msg, 32); usb_write((uint8_t*)msg, 64); } else { U2FHID_SET_LEN(msg, 0); usb_write((uint8_t*)msg, 64); } This same call to `atecc_send_recv(ATECC_CMD_RNG,ATECC_RNG_P1, ATECC_RNG_P2,...)` is then also used in the token's cryptographically critical "u2f_new_keypair" function, as its rather straightforward source of random bytes [2]: int8_t u2f_new_keypair(uint8_t * handle, uint8_t * appid, uint8_t * pubkey) { struct atecc_response res; uint8_t private_key[36]; int i; watchdog(); if (atecc_send_recv(ATECC_CMD_RNG,ATECC_RNG_P1,ATECC_RNG_P2, NULL, 0, appdata.tmp, sizeof(appdata.tmp), &res) != 0 ) { return -1; } So it seems rather plain that the ATECC RNG is considered to provide good random numbers. [1] https://github.com/conorpp/u2f-zero/blob/master/firmware/src/custom.c [2] https://github.com/conorpp/u2f-zero/blob/master/firmware/src/u2f_atecc.c Cc: Andrej Shadura Cc: Jiri Kosina Cc: Herbert Xu Signed-off-by: Jason A. Donenfeld Acked-by: Andrej Shadura Signed-off-by: Herbert Xu drivers/hid/hid-u2fzero.c | 1 - 1 file changed, 1 deletion(-) commit 5f9c97a0e6dc873f662528ae591f2bd500eb5940 Author: Weili Qian Date: Sat Nov 19 17:50:03 2022 +0800 crypto: hisilicon/qm - add device status check when start fails In function 'hisi_qm_resume', if the device fails to be started, directly returning error code will cause the device to be unavailable. However, the failure may be caused by device error, which will be reported to the driver, and driver can reset and restart device. Therefore, check device status instead of returning error code directly. Returns 0 if device error has occurred, otherwise returns error code. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 3901355624d14afe3230252cb36bc3da8ff6890e Author: Weili Qian Date: Sat Nov 19 17:48:43 2022 +0800 crypto: hisilicon/qm - fix 'QM_XEQ_DEPTH_CAP' mask value 'QM_XEQ_DEPTH_CAP' mask value is GENMASK(31, 0) instead of GENMASK(15, 0). If the mask value is incorrect, will cause abnormal events cannot be handled. So fix it. Fixes: 129a9f340172 ("crypto: hisilicon/qm - get qp num and depth from hardware registers") Signed-off-by: Weili Qian Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa2ca3b275874d61f42e68f5eb13645bbeb5d72b Author: Uwe Kleine-König Date: Fri Nov 18 23:35:41 2022 +0100 crypto: atmel-sha204a - 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: Herbert Xu drivers/crypto/atmel-sha204a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b8ed0bff96393cbeef66f00f34fda2a4960b75e4 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:40 2022 +0100 crypto: atmel-ecc - 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: Herbert Xu drivers/crypto/atmel-ecc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c060e16ddb51a92b1f7fa84c628d287ea5799864 Author: Eric Biggers Date: Fri Nov 18 11:44:21 2022 -0800 Revert "crypto: shash - avoid comparing pointers to exported functions under CFI" This reverts commit 22ca9f4aaf431a9413dcc115dd590123307f274f because CFI no longer breaks cross-module function address equality, so crypto_shash_alg_has_setkey() can now be an inline function like before. This commit should not be backported to kernels that don't have the new CFI implementation. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/shash.c | 18 +++--------------- include/crypto/internal/hash.h | 8 +++++++- 2 files changed, 10 insertions(+), 16 deletions(-) commit cc7acaadf6ab5d44f43170eb568e1cc9739c3df4 Author: Eric Biggers Date: Fri Nov 18 11:44:20 2022 -0800 crypto: arm/nhpoly1305 - eliminate unnecessary CFI wrapper The arm architecture doesn't support CFI yet, and even if it did, the new CFI implementation supports indirect calls to assembly functions. Therefore, there's no need to use a wrapper function for nh_neon(). Acked-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/arm/crypto/nh-neon-core.S | 2 +- arch/arm/crypto/nhpoly1305-neon-glue.c | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) commit be8f6b6496076588fd49cbe5bfaaf3ab883eb779 Author: Eric Biggers Date: Fri Nov 18 11:44:19 2022 -0800 crypto: arm64/sm3 - fix possible crash with CFI enabled sm3_neon_transform() is called via indirect function calls. Therefore it needs to use SYM_TYPED_FUNC_START instead of SYM_FUNC_START to cause its type hash to be emitted when the kernel is built with CONFIG_CFI_CLANG=y. Otherwise, the code crashes with a CFI failure (if the compiler didn't happen to optimize out the indirect call). Fixes: c50d32859e70 ("arm64: Add types to indirect called assembly functions") Acked-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/arm64/crypto/sm3-neon-core.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e5e1c67e2f01d924e9583b67a907934948d852aa Author: Eric Biggers Date: Fri Nov 18 11:44:18 2022 -0800 crypto: arm64/nhpoly1305 - eliminate unnecessary CFI wrapper Since the CFI implementation now supports indirect calls to assembly functions, take advantage of that rather than use a wrapper function. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/arm64/crypto/nh-neon-core.S | 5 +++-- arch/arm64/crypto/nhpoly1305-neon-glue.c | 11 ++--------- 2 files changed, 5 insertions(+), 11 deletions(-) commit 2d203c46a0fa5df0785383b13b722483e1fd27a8 Author: Eric Biggers Date: Fri Nov 18 11:44:17 2022 -0800 crypto: x86/sm4 - fix crash with CFI enabled sm4_aesni_avx_ctr_enc_blk8(), sm4_aesni_avx_cbc_dec_blk8(), sm4_aesni_avx_cfb_dec_blk8(), sm4_aesni_avx2_ctr_enc_blk16(), sm4_aesni_avx2_cbc_dec_blk16(), and sm4_aesni_avx2_cfb_dec_blk16() are called via indirect function calls. Therefore they need to use SYM_TYPED_FUNC_START instead of SYM_FUNC_START to cause their type hashes to be emitted when the kernel is built with CONFIG_CFI_CLANG=y. Otherwise, the code crashes with a CFI failure. (Or at least that should be the case. For some reason the CFI checks in sm4_avx_cbc_decrypt(), sm4_avx_cfb_decrypt(), and sm4_avx_ctr_crypt() are not always being generated, using current tip-of-tree clang. Anyway, this patch is a good idea anyway.) Fixes: ccace936eec7 ("x86: Add types to indirectly called assembly functions") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/sm4-aesni-avx-asm_64.S | 7 ++++--- arch/x86/crypto/sm4-aesni-avx2-asm_64.S | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) commit 8ba490d9f5a56f52091644325a32d3f71a982776 Author: Eric Biggers Date: Fri Nov 18 11:44:16 2022 -0800 crypto: x86/sm3 - fix possible crash with CFI enabled sm3_transform_avx() is called via indirect function calls. Therefore it needs to use SYM_TYPED_FUNC_START instead of SYM_FUNC_START to cause its type hash to be emitted when the kernel is built with CONFIG_CFI_CLANG=y. Otherwise, the code crashes with a CFI failure (if the compiler didn't happen to optimize out the indirect call). Fixes: ccace936eec7 ("x86: Add types to indirectly called assembly functions") Acked-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/sm3-avx-asm_64.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a1d72fa33186ac69c7d8120c71f41ea4fc23dcc9 Author: Eric Biggers Date: Fri Nov 18 11:44:15 2022 -0800 crypto: x86/sha512 - fix possible crash with CFI enabled sha512_transform_ssse3(), sha512_transform_avx(), and sha512_transform_rorx() are called via indirect function calls. Therefore they need to use SYM_TYPED_FUNC_START instead of SYM_FUNC_START to cause their type hashes to be emitted when the kernel is built with CONFIG_CFI_CLANG=y. Otherwise, the code crashes with a CFI failure (if the compiler didn't happen to optimize out the indirect calls). Fixes: ccace936eec7 ("x86: Add types to indirectly called assembly functions") Acked-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/sha512-avx-asm.S | 3 ++- arch/x86/crypto/sha512-avx2-asm.S | 3 ++- arch/x86/crypto/sha512-ssse3-asm.S | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit 19940ebbb59c12146d05c5f8acd873197b290648 Author: Eric Biggers Date: Fri Nov 18 11:44:14 2022 -0800 crypto: x86/sha256 - fix possible crash with CFI enabled sha256_transform_ssse3(), sha256_transform_avx(), sha256_transform_rorx(), and sha256_ni_transform() are called via indirect function calls. Therefore they need to use SYM_TYPED_FUNC_START instead of SYM_FUNC_START to cause their type hashes to be emitted when the kernel is built with CONFIG_CFI_CLANG=y. Otherwise, the code crashes with a CFI failure (if the compiler didn't happen to optimize out the indirect calls). Fixes: ccace936eec7 ("x86: Add types to indirectly called assembly functions") Acked-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/sha256-avx-asm.S | 3 ++- arch/x86/crypto/sha256-avx2-asm.S | 3 ++- arch/x86/crypto/sha256-ssse3-asm.S | 3 ++- arch/x86/crypto/sha256_ni_asm.S | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) commit 32f34bf7e44eeaa241fb845d6f52af5104bc30fd Author: Eric Biggers Date: Fri Nov 18 11:44:13 2022 -0800 crypto: x86/sha1 - fix possible crash with CFI enabled sha1_transform_ssse3(), sha1_transform_avx(), and sha1_ni_transform() (but not sha1_transform_avx2()) are called via indirect function calls. Therefore they need to use SYM_TYPED_FUNC_START instead of SYM_FUNC_START to cause their type hashes to be emitted when the kernel is built with CONFIG_CFI_CLANG=y. Otherwise, the code crashes with a CFI failure (if the compiler didn't happen to optimize out the indirect calls). Fixes: ccace936eec7 ("x86: Add types to indirectly called assembly functions") Acked-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/sha1_ni_asm.S | 3 ++- arch/x86/crypto/sha1_ssse3_asm.S | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 0f8bc4bd48dd148046c19c38568cd9449c79b45f Author: Eric Biggers Date: Fri Nov 18 11:44:12 2022 -0800 crypto: x86/nhpoly1305 - eliminate unnecessary CFI wrappers Since the CFI implementation now supports indirect calls to assembly functions, take advantage of that rather than use wrapper functions. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/nh-avx2-x86_64.S | 5 +++-- arch/x86/crypto/nh-sse2-x86_64.S | 5 +++-- arch/x86/crypto/nhpoly1305-avx2-glue.c | 11 ++--------- arch/x86/crypto/nhpoly1305-sse2-glue.c | 11 ++--------- 4 files changed, 10 insertions(+), 22 deletions(-) commit c67b553a4f4a8bd921e4c9ceae00e111be09c488 Author: Eric Biggers Date: Fri Nov 18 11:44:11 2022 -0800 crypto: x86/aria - fix crash with CFI enabled aria_aesni_avx_encrypt_16way(), aria_aesni_avx_decrypt_16way(), aria_aesni_avx_ctr_crypt_16way(), aria_aesni_avx_gfni_encrypt_16way(), aria_aesni_avx_gfni_decrypt_16way(), and aria_aesni_avx_gfni_ctr_crypt_16way() are called via indirect function calls. Therefore they need to use SYM_TYPED_FUNC_START instead of SYM_FUNC_START to cause their type hashes to be emitted when the kernel is built with CONFIG_CFI_CLANG=y. Otherwise, the code crashes with a CFI failure. Fixes: ccace936eec7 ("x86: Add types to indirectly called assembly functions") Acked-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Cc: Taehee Yoo Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/aria-aesni-avx-asm_64.S | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 8bd9974b6bfcd1e14a001deeca051aed7295559a Author: Eric Biggers Date: Fri Nov 18 11:44:10 2022 -0800 crypto: x86/aegis128 - fix possible crash with CFI enabled crypto_aegis128_aesni_enc(), crypto_aegis128_aesni_enc_tail(), crypto_aegis128_aesni_dec(), and crypto_aegis128_aesni_dec_tail() are called via indirect function calls. Therefore they need to use SYM_TYPED_FUNC_START instead of SYM_FUNC_START to cause their type hashes to be emitted when the kernel is built with CONFIG_CFI_CLANG=y. Otherwise, the code crashes with a CFI failure (if the compiler didn't happen to optimize out the indirect calls). Fixes: ccace936eec7 ("x86: Add types to indirectly called assembly functions") Acked-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/aegis128-aesni-asm.S | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 57ddfecc72a6c9941d159543e1c0c0a74fe9afdd Author: Daniel Jordan Date: Wed Nov 16 20:28:04 2022 -0500 padata: Fix list iterator in padata_do_serial() list_for_each_entry_reverse() assumes that the iterated list is nonempty and that every list_head is embedded in the same type, but its use in padata_do_serial() breaks both rules. This doesn't cause any issues now because padata_priv and padata_list happen to have their list fields at the same offset, but we really shouldn't be relying on that. Fixes: bfde23ce200e ("padata: unbind parallel jobs from specific CPUs") Signed-off-by: Daniel Jordan Signed-off-by: Herbert Xu kernel/padata.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 34c3a47d20ae55b3600fed733bf96eafe9c500d5 Author: Daniel Jordan Date: Wed Nov 16 20:28:02 2022 -0500 padata: Always leave BHs disabled when running ->parallel() A deadlock can happen when an overloaded system runs ->parallel() in the context of the current task: padata_do_parallel ->parallel() pcrypt_aead_enc/dec padata_do_serial spin_lock(&reorder->lock) // BHs still enabled ... __do_softirq ... padata_do_serial spin_lock(&reorder->lock) It's a bug for BHs to be on in _do_serial as Steffen points out, so ensure they're off in the "current task" case like they are in padata_parallel_worker to avoid this situation. Reported-by: syzbot+bc05445bc14148d51915@syzkaller.appspotmail.com Fixes: 4611ce224688 ("padata: allocate work structures for parallel jobs from a pool") Signed-off-by: Daniel Jordan Acked-by: Steffen Klassert Signed-off-by: Herbert Xu kernel/padata.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1aa33fc8d4032227253ceb736f47c52b859d9683 Author: Zhang Yiqun Date: Wed Nov 16 17:24:11 2022 +0800 crypto: tcrypt - Fix multibuffer skcipher speed test mem leak In the past, the data for mb-skcipher test has been allocated twice, that means the first allcated memory area is without free, which may cause a potential memory leakage. So this patch is to remove one allocation to fix this error. Fixes: e161c5930c15 ("crypto: tcrypt - add multibuf skcipher...") Signed-off-by: Zhang Yiqun Signed-off-by: Herbert Xu crypto/tcrypt.c | 9 --------- 1 file changed, 9 deletions(-) commit 441cb1b730006bd2d636f72dc7f6e11a8a0ecce5 Author: Eric Biggers Date: Sun Nov 13 16:12:38 2022 -0800 crypto: algboss - compile out test-related code when tests disabled When CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is set, the code in algboss.c that handles CRYPTO_MSG_ALG_REGISTER is unnecessary, so make it be compiled out. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/algboss.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 790c4c9f532318e3fe8c6f0b498072abc80e1195 Author: Eric Biggers Date: Sun Nov 13 16:12:37 2022 -0800 crypto: kdf - silence noisy self-test Make the kdf_sp800108 self-test only print a message on success when fips_enabled, so that it's consistent with testmgr.c and doesn't spam the kernel log with a message that isn't really important. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/kdf_sp800108.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bf365c0efdd8fc03cb82e381ea4d76196c66bc2 Author: Eric Biggers Date: Sun Nov 13 16:12:36 2022 -0800 crypto: kdf - skip self-test when tests disabled Make kdf_sp800108 honor the CONFIG_CRYPTO_MANAGER_DISABLE_TESTS kconfig option, so that it doesn't always waste time running its self-test. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/kdf_sp800108.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 06bd9c967eaac5484c31c3dc6dfbef6183819508 Author: Eric Biggers Date: Sun Nov 13 16:12:35 2022 -0800 crypto: api - compile out crypto_boot_test_finished when tests disabled The crypto_boot_test_finished static key is unnecessary when self-tests are disabled in the kconfig, so optimize it out accordingly, along with the entirety of crypto_start_tests(). This mainly avoids the overhead of an unnecessary static_branch_enable() on every boot. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/algapi.c | 7 +++++-- crypto/api.c | 8 +++++--- crypto/internal.h | 20 +++++++++++++++++++- 3 files changed, 29 insertions(+), 6 deletions(-) commit 9cadd73adef1e1d53ea100f28e3e258698b92418 Author: Eric Biggers Date: Sun Nov 13 16:12:34 2022 -0800 crypto: algboss - optimize registration of internal algorithms Since algboss always skips testing of algorithms with the CRYPTO_ALG_INTERNAL flag, there is no need to go through the dance of creating the test kthread, which creates a lot of overhead. Instead, we can just directly finish the algorithm registration, like is now done when self-tests are disabled entirely. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/algapi.c | 3 ++- crypto/algboss.c | 13 +------------ 2 files changed, 3 insertions(+), 13 deletions(-) commit a7008584ab19d2df05caa95634cd72bc41f4cad3 Author: Eric Biggers Date: Sun Nov 13 16:12:33 2022 -0800 crypto: api - optimize algorithm registration when self-tests disabled Currently, registering an algorithm with the crypto API always causes a notification to be posted to the "cryptomgr", which then creates a kthread to self-test the algorithm. However, if self-tests are disabled in the kconfig (as is the default option), then this kthread just notifies waiters that the algorithm has been tested, then exits. This causes a significant amount of overhead, especially in the kthread creation and destruction, which is not necessary at all. For example, in a quick test I found that booting a "minimum" x86_64 kernel with all the crypto options enabled (except for the self-tests) takes about 400ms until PID 1 can start. Of that, a full 13ms is spent just doing this pointless dance, involving a kthread being created, run, and destroyed over 200 times. That's over 3% of the entire kernel start time. Fix this by just skipping the creation of the test larval and the posting of the registration notification entirely, when self-tests are disabled. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/algapi.c | 154 +++++++++++++++++++++++++++++++------------------------- crypto/api.c | 3 -- 2 files changed, 86 insertions(+), 71 deletions(-) commit f0052d7a1edb3d8921b4e154aa8c46c4845b3714 Author: Duke Xin Date: Sat Nov 19 17:44:47 2022 +0800 USB: serial: option: add Quectel EM05-G modem The EM05-G modem has 2 USB configurations that are configurable via the AT command AT+QCFG="usbnet",[ 0 | 2 ] which make the modem enumerate with the following interfaces, respectively: "RMNET" : AT + DIAG + NMEA + Modem + QMI "MBIM" : MBIM + AT + DIAG + NMEA + Modem The detailed description of the USB configuration for each mode as follows: RMNET Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 21 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0311 Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-G C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms MBIM Mode -------------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 16 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0311 Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-G C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Duke Xin Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+) commit 8178e245fa953f793670147368642717fcdb302e Author: Dario Binacchi Date: Sun Nov 13 19:08:39 2022 +0100 clk: imx: rename imx_obtain_fixed_clk_hw() to imx_get_clk_hw_by_name() The imx_obtain_fixed_clk_hw name was wrong and misleading. Renaming it to imx_get_clk_hw_by_name clarifies the purpose of the function, and will allow it to be used not only for fixed rate clocks but also in wider contexts. No functional changes intended. The replacements were made with the following command: grep -rl 'imx_obtain_fixed_clk_hw' ./ | \ xargs sed -i 's/imx_obtain_fixed_clk_hw/imx_get_clk_hw_by_name/g' Tested on a BSH SystemMaster (SMM) S2 board. Signed-off-by: Dario Binacchi Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221113180839.1625832-1-dario.binacchi@amarulasolutions.com drivers/clk/imx/clk-imx6sll.c | 8 ++++---- drivers/clk/imx/clk-imx6sx.c | 12 ++++++------ drivers/clk/imx/clk-imx6ul.c | 8 ++++---- drivers/clk/imx/clk-imx7d.c | 4 ++-- drivers/clk/imx/clk-imx7ulp.c | 10 +++++----- drivers/clk/imx/clk-imx8mm.c | 12 ++++++------ drivers/clk/imx/clk-imx8mn.c | 12 ++++++------ drivers/clk/imx/clk-imx8mp.c | 12 ++++++------ drivers/clk/imx/clk-imx8mq.c | 14 +++++++------- drivers/clk/imx/clk-imx93.c | 6 +++--- drivers/clk/imx/clk-imxrt1050.c | 2 +- drivers/clk/imx/clk.c | 5 ++--- drivers/clk/imx/clk.h | 3 +-- 13 files changed, 53 insertions(+), 55 deletions(-) commit 2626cf67f20b28446dfc3a5b9493dd535cdb747b Author: Dario Binacchi Date: Thu Nov 17 12:36:37 2022 +0100 clk: imx8mn: fix imx8mn_enet_phy_sels clocks list According to the "Clock Root" table of the reference manual (document IMX8MNRM Rev 2, 07/2022): Clock Root offset Source Select (CCM_TARGET_ROOTn[MUX]) ... ... ... ENET_PHY_REF_CLK_ROOT 0xAA80 000 - 24M_REF_CLK 001 - SYSTEM_PLL2_DIV20 010 - SYSTEM_PLL2_DIV8 011 - SYSTEM_PLL2_DIV5 100 - SYSTEM_PLL2_DIV2 101 - AUDIO_PLL1_CLK 110 - VIDEO_PLL_CLK 111 - AUDIO_PLL2_CLK ... ... ... while the imx8mn_enet_phy_sels list didn't contained audio_pll1_out for source select bits 101b. Fixes: 96d6392b54dbb ("clk: imx: Add support for i.MX8MN clock driver") Signed-off-by: Dario Binacchi Acked-by: Marco Felsch Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221117113637.1978703-6-dario.binacchi@amarulasolutions.com drivers/clk/imx/clk-imx8mn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34d996747a74e3a86990f9f9c48de09159d78edb Author: Dario Binacchi Date: Thu Nov 17 12:36:36 2022 +0100 clk: imx8mn: fix imx8mn_sai2_sels clocks list According to the "Clock Root" table of the reference manual (document IMX8MNRM Rev 2, 07/2022): Clock Root offset Source Select (CCM_TARGET_ROOTn[MUX]) ... ... ... SAI2_CLK_ROOT 0xA600 000 - 24M_REF_CLK 001 - AUDIO_PLL1_CLK 010 - AUDIO_PLL2_CLK 011 - VIDEO_PLL_CLK 100 - SYSTEM_PLL1_DIV6 110 - EXT_CLK_2 111 - EXT_CLK_3 ... ... ... while the imx8mn_sai2_sels list contained clk_ext3 and clk_ext4 for source select bits 110b and 111b. Fixes: 96d6392b54dbb ("clk: imx: Add support for i.MX8MN clock driver") Signed-off-by: Dario Binacchi Acked-by: Marco Felsch Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221117113637.1978703-5-dario.binacchi@amarulasolutions.com drivers/clk/imx/clk-imx8mn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bedcf9d1dcf88ed38731f0ac9620e5a421e1e9d6 Author: Dario Binacchi Date: Thu Nov 17 12:36:35 2022 +0100 clk: imx: rename video_pll1 to video_pll Unlike audio_pll1 and audio_pll2, there is no video_pll2. Further, the name used in the RM is video_pll. So, let's rename "video_pll1" to "video_pll" to be consistent with the RM and avoid misunderstandings. The IMX8MN_VIDEO_PLL1* constants have not been removed to ensure backward compatibility of the patch. No functional changes intended. Fixes: 96d6392b54dbb ("clk: imx: Add support for i.MX8MN clock driver") Signed-off-by: Dario Binacchi Acked-by: Marco Felsch Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221117113637.1978703-4-dario.binacchi@amarulasolutions.com drivers/clk/imx/clk-imx8mn.c | 96 ++++++++++++++++---------------- include/dt-bindings/clock/imx8mn-clock.h | 12 ++-- 2 files changed, 56 insertions(+), 52 deletions(-) commit e7fa365ff66f16772dc06b480cd78f858d10856b Author: Dario Binacchi Date: Thu Nov 17 12:36:34 2022 +0100 clk: imx: replace osc_hdmi with dummy There is no occurrence of the hdmi oscillator in the reference manual (document IMX8MNRM Rev 2, 07/2022). Further, if we consider the indexes 76-81 and 134 of the "Clock Root" table of chapter 5 of the RM, there is no entry for the source select bits 101b, which is the setting referenced by "osc_hdmi". Fix by renaming "osc_hdmi" with "dummy", a clock which has already been used for missing source select bits. Tested on the BSH SystemMaster (SMM) S2 board. Fixes: 96d6392b54dbb ("clk: imx: Add support for i.MX8MN clock driver") Signed-off-by: Dario Binacchi Acked-by: Marco Felsch Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221117113637.1978703-3-dario.binacchi@amarulasolutions.com drivers/clk/imx/clk-imx8mn.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a429c60baefd95ab43a2ce7f25d5b2d7a2e431df Author: Dario Binacchi Date: Thu Nov 17 12:36:33 2022 +0100 clk: imx8mn: rename vpu_pll to m7_alt_pll The IMX8MN platform does not have any video processing unit (VPU), and indeed in the reference manual (document IMX8MNRM Rev 2, 07/2022) there is no occurrence of its pll. From an analysis of the code and the RM itself, I think vpu pll is used instead of m7 alternate pll, probably for copy and paste of code taken from modules of similar architectures. As an example for all, if we consider the second row of the "Clock Root" table of chapter 5 (Clocks and Power Management) of the RM: Clock Root offset Source Select (CCM_TARGET_ROOTn[MUX]) ... ... ... ARM_M7_CLK_ROOT 0x8080 000 - 24M_REF_CLK 001 - SYSTEM_PLL2_DIV5 010 - SYSTEM_PLL2_DIV4 011 - M7_ALT_PLL_CLK 100 - SYSTEM_PLL1_CLK 101 - AUDIO_PLL1_CLK 110 - VIDEO_PLL_CLK 111 - SYSTEM_PLL3_CLK ... ... ... but in the source code, the imx8mn_m7_sels clocks list contains vpu_pll for the source select bits 011b. So, let's rename "vpu_pll" to "m7_alt_pll" to be consistent with the RM. The IMX8MN_VPU_* constants have not been removed to ensure backward compatibility of the patch. No functional changes intended. Fixes: 96d6392b54dbb ("clk: imx: Add support for i.MX8MN clock driver") Signed-off-by: Dario Binacchi Acked-by: Marco Felsch Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221117113637.1978703-2-dario.binacchi@amarulasolutions.com drivers/clk/imx/clk-imx8mn.c | 16 ++++++++-------- include/dt-bindings/clock/imx8mn-clock.h | 12 ++++++++---- 2 files changed, 16 insertions(+), 12 deletions(-) commit eb93f1d7c91d8d6fe6fc001e0b515d1bbd755fd2 Author: Horatiu Vultur Date: Fri Sep 16 21:49:46 2022 +0200 ARM: dts: lan966x: Add otp support Add OTP (one time programmable) support. The both lan966x SocS (lan9662 and lan9668) have the same OTP IP. Signed-off-by: Horatiu Vultur Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220916194946.2869510-1-horatiu.vultur@microchip.com arch/arm/boot/dts/lan966x.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit a741721680092b64ff71fc1f1c790123c6d40a02 Author: Sabrina Dubroca Date: Thu Nov 24 15:43:44 2022 +0100 xfrm: add extack to xfrm_set_spdinfo Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit c2dad11e0466a27d40041845cf63cdfb4fbd991f Author: Sabrina Dubroca Date: Thu Nov 24 15:43:43 2022 +0100 xfrm: add extack to xfrm_alloc_userspi Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert include/net/xfrm.h | 5 +++-- net/key/af_key.c | 4 ++-- net/xfrm/xfrm_state.c | 21 ++++++++++++++++----- net/xfrm/xfrm_user.c | 8 +++++--- 4 files changed, 26 insertions(+), 12 deletions(-) commit bd12240337f43522b99c43f8976af34c712b5f57 Author: Sabrina Dubroca Date: Thu Nov 24 15:43:42 2022 +0100 xfrm: add extack to xfrm_do_migrate Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert include/net/xfrm.h | 3 ++- net/key/af_key.c | 2 +- net/xfrm/xfrm_policy.c | 28 ++++++++++++++++++++-------- net/xfrm/xfrm_user.c | 16 +++++++++++----- 4 files changed, 34 insertions(+), 15 deletions(-) commit 643bc1a2ee30efc9ab832401e89c9400cd9f52ac Author: Sabrina Dubroca Date: Thu Nov 24 15:43:41 2022 +0100 xfrm: add extack to xfrm_new_ae and xfrm_replay_verify_len Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) commit 880e475d2b0b1131a6e91464b2145820893e4ddf Author: Sabrina Dubroca Date: Thu Nov 24 15:43:40 2022 +0100 xfrm: add extack to xfrm_del_sa Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a25b19f36f921b90bcb826c80b568266b8ad40a4 Author: Sabrina Dubroca Date: Thu Nov 24 15:43:39 2022 +0100 xfrm: add extack to xfrm_add_sa_expire Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f157c416c51ab8b7f5e833dfde8ace3a6325c19a Author: Sabrina Dubroca Date: Thu Nov 24 15:43:38 2022 +0100 xfrm: a few coding style clean ups Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 9 ++++++--- net/xfrm/xfrm_user.c | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) commit 6408cc05a50aaf88074a5a31d065e5af87a456f5 Author: Jean Delvare Date: Thu Nov 24 11:59:46 2022 +0100 mtd: rawnand: 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. Signed-off-by: Jean Delvare Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Naga Sureshkumar Relli Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221124115946.5edb771c@endymion.delvare drivers/mtd/nand/raw/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 719c547c6551d48ceb71c1a7ab6ffb96d218551f Merge: 8e96729fc26c 662233731d66 Author: Herbert Xu Date: Fri Nov 25 17:05:15 2022 +0800 Merge branch 'i2c/client_device_id_helper-immutable' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Merge i2c tree to pick up i2c_client_get_device_id helper. commit b99d744b3d406e7edb28f4df16b3b33afe09c3c2 Author: Lukas Bulwahn Date: Wed Nov 16 09:40:06 2022 +0000 media: i2c: refer to config VIDEO_DEV to make ov08x40 image sensor driver usable Commit 9958d30f38b9 ("media: Kconfig: cleanup VIDEO_DEV dependencies") removes the config VIDEO_V4L2 as it is merged with config VIDEO_DEV. Long after this change, commit 38fc5136ac16 ("media: i2c: Add ov08x40 image sensor driver") introduces and refers to the removed config VIDEO_V4L2, basically making this driver impossible to build, test and use due to dependencies that cannot be met. Refer to config VIDEO_DEV instead to make this driver usable. Signed-off-by: Lukas Bulwahn Fixes: 38fc5136ac16 ("media: i2c: Add ov08x40 image sensor driver") Reviewed-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f54f5fd05ee4d974dbc31a20f71a7054c12ae869 Author: Kieran Bingham Date: Mon Nov 21 17:39:50 2022 +0000 media: i2c: ov08x40: Make remove callback return void In commit ed5c2f5fd10d ("i2c: Make remove callback return void") drivers were updated to remove the return value of the remove callback, and return void. The OV08x40 was added after this commit but was not compile tested at the time due to a KConfig issue, and this warning was missed. Reported-by: kernel test robot Fixes: 38fc5136ac16 ("media: i2c: Add ov08x40 image sensor driver") Signed-off-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov08x40.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 483af3fe9031d6b720c85e3bf06b788099057b4f Author: Benjamin Mugnier Date: Thu Nov 10 13:41:02 2022 +0000 media: i2c: st-vgxy61: Fix smatch warnings Fix some 'vgxy61_write_reg' return vars not being signed int. Fix 'expo_long_max' not being initialized. Handle 'pm_runtime_get_sync' call that can return 1. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/st-vgxy61.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 3295abd1183230c5542694ccd65665fec1db8f44 Author: Benjamin Mugnier Date: Mon Nov 7 13:19:45 2022 +0000 media: Documentation: st-vgxy61: Fix driver specific documentation not being included in the index Fixes: 2378be892b6f ("media: Documentation: Add ST VGXY61 driver documentation") Reported-by: kernel test robot Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/drivers/index.rst | 1 + 1 file changed, 1 insertion(+) commit 17d4cb707a7112fdb3f332fcda4672aa9de5cb10 Author: Benjamin Mugnier Date: Mon Nov 7 13:19:44 2022 +0000 media: Documentation: st-vgxy61: Remove quotes around 'No HDR' identifier Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/drivers/st-vgxy61.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26abb35151e59e031bebbe64ccb671a2fcd19ab8 Author: Benjamin Mugnier Date: Mon Nov 7 13:19:43 2022 +0000 media: Documentation: st-vgxy61: Limit driver specific documentation to 80 characters Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/userspace-api/media/drivers/st-vgxy61.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 07fc05bd0a797dcc34620869933993e1cbf56b98 Author: Lad Prabhakar Date: Wed Nov 23 01:09:43 2022 +0000 media: platform: Add Renesas RZ/G2L CRU driver Add v4l driver for Renesas RZ/G2L Camera data Receiving Unit. Based on a patch in the BSP by Hien Huynh Signed-off-by: Lad Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/renesas/rzg2l-cru/Kconfig | 16 + drivers/media/platform/renesas/rzg2l-cru/Makefile | 3 + .../media/platform/renesas/rzg2l-cru/rzg2l-core.c | 338 +++++++ .../media/platform/renesas/rzg2l-cru/rzg2l-cru.h | 152 +++ .../media/platform/renesas/rzg2l-cru/rzg2l-ip.c | 255 +++++ .../media/platform/renesas/rzg2l-cru/rzg2l-video.c | 1057 ++++++++++++++++++++ 6 files changed, 1821 insertions(+) commit 51e8415e39a962db2a753940fca18e9710c24902 Author: Lad Prabhakar Date: Wed Nov 23 01:09:42 2022 +0000 media: platform: Add Renesas RZ/G2L MIPI CSI-2 receiver driver Add MIPI CSI-2 receiver driver for Renesas RZ/G2L. The MIPI CSI-2 is part of the CRU module found on RZ/G2L family. Based on a patch in the BSP by Hien Huynh Signed-off-by: Lad Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/renesas/Kconfig | 1 + drivers/media/platform/renesas/Makefile | 1 + drivers/media/platform/renesas/rzg2l-cru/Kconfig | 17 + drivers/media/platform/renesas/rzg2l-cru/Makefile | 3 + .../media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 877 +++++++++++++++++++++ 5 files changed, 899 insertions(+) commit a18004173a087573628ddc9910f0665a3829f48f Author: Lad Prabhakar Date: Wed Nov 2 00:43:27 2022 +0000 media: dt-bindings: Document Renesas RZ/G2L CRU block Document the CRU block found on Renesas RZ/G2L (and alike) SoCs. Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../bindings/media/renesas,rzg2l-cru.yaml | 157 +++++++++++++++++++++ 1 file changed, 157 insertions(+) commit 6c08bd7a6a7c7b3905de687519f80fd4b9fe8785 Author: Lad Prabhakar Date: Wed Nov 2 00:43:26 2022 +0000 media: dt-bindings: Document Renesas RZ/G2L CSI-2 block Document the CSI-2 block which is part of CRU found in Renesas RZ/G2L (and alike) SoCs. Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../bindings/media/renesas,rzg2l-csi2.yaml | 149 +++++++++++++++++++++ 1 file changed, 149 insertions(+) commit ec2289616bcba750e33a0eadb8f65a365a1901d5 Author: Jacopo Mondi Date: Mon Nov 21 17:48:33 2022 +0000 media: ar0521: Tab-align definitions Align some register and constant definitions using tab in place of mixed tab+spaces. Cosmetic change only. Signed-off-by: Jacopo Mondi Reviewed-by: Dave Stevenson Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ar0521.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit e0b8d21b62561516d5077ec0e57d755e1cf51953 Author: Jacopo Mondi Date: Fri Nov 4 14:24:52 2022 +0000 media: ar0521: Rework startup sequence The ar0521_write_mode() function explicitly programs the exposure time register and the test pattern register, which are now setup by the call to __v4l2_ctrl_handler_setup() in ar0521_set_stream(). Removing those register writes from ar0521_write_mode() reduces the function to two operations: geometry configuration and pll configuration. Move geomerty configuration in the ar0521_set_stream() caller and rename ar0521_write_mode() to ar0521_pll_config(). Signed-off-by: Jacopo Mondi Reviewed-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ar0521.c | 50 +++++++++++++++------------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) commit c79f0f15db3c7f2e047f78647a4c2561d9820fc8 Author: Jacopo Mondi Date: Fri Nov 4 14:24:51 2022 +0000 media: ar0521: Setup controls at s_stream time Setup all the registered controls at s_stream(1) time instead of manually configure gains. Signed-off-by: Jacopo Mondi Reviewed-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ar0521.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64114626f181692f3788a6c73eade53ab8498f84 Author: Jacopo Mondi Date: Fri Nov 4 14:24:50 2022 +0000 media: ar0521: Adjust exposure and blankings limits Adjust the control limits for V4L2_CID_VBLANK, V4L2_CID_HBLANK and V4L2_CID_EXPOSURE when a new format is applied to the sensor. Update the exposure control limits when a new blanking value is applied and change the controls initialization to use valid values for the default format. The exposure control default value is changed to report the default value of register 0x3012. Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ar0521.c | 84 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 16 deletions(-) commit f9746da3473c571b1021bc78bf2b2deea8d3fd1c Author: Jacopo Mondi Date: Fri Nov 4 14:24:49 2022 +0000 media: ar0521: Add LINK_FREQ control Add support for V4L2_CID_LINK_FREQ which currently reports a single hard-coded frequency which depends on the fixed pixel clock. Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ar0521.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6e27ef31a5c17068dc032289f3cc132ceedce2f8 Author: Jacopo Mondi Date: Fri Nov 4 14:24:48 2022 +0000 media: ar0521: Refuse unsupported controls Refuse unsupported controls by returning -EINVAL in the s_ctrl operation. While at it, remove a the default switch case in the first switch as it effectively is now a no-op. Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ar0521.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3a51fd71b6f59610abad0e88315c20fd3e5b4b79 Author: Jacopo Mondi Date: Fri Nov 4 14:24:47 2022 +0000 media: ar0521: Rework PLL computation Rework the PLL computation procedure to take into account the currently configured format bpp and the number of data lanes. Comment the PLL configuration procedure with information provided by the sensor chip manual and remove the hardcoded divider from the pixel clock calculation. Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ar0521.c | 113 +++++++++++++++++++++++++++++++++------------ 1 file changed, 84 insertions(+), 29 deletions(-) commit e4bdc249a9ac3c3721029609eccd51bf558a7f84 Author: Jacopo Mondi Date: Fri Nov 4 14:24:46 2022 +0000 media: ar0521: Set maximum resolution to 2592x1944 Change the largest visibile resolution to 2592x1944, which corresponds to the active pixel array area size. Take into account the horizontal and vertical limits when programming the visible sizes to skip dummy/inactive pixels. Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ar0521.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 114df30420e5a773e9b15411af5c5b7988f715fb Author: Jacopo Mondi Date: Fri Nov 4 14:24:45 2022 +0000 media: ar0521: Add V4L2_CID_ANALOG_GAIN Add support for V4L2_CID_ANALOG_GAIN. The control programs the global gain register which applies to all color channels. Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ar0521.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit f79101354cd8dd3f1cf298fcdf350525bcc2e187 Author: Jacopo Mondi Date: Fri Nov 4 14:24:44 2022 +0000 media: ar0521: Implement enum_frame_sizes Implement the enum_frame_size pad operation. The sensor supports a continuous size range of resolutions. Signed-off-by: Jacopo Mondi Reviewed-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ar0521.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 0958944a93058bfec7d9032518abd7d646009b17 Author: Marek Vasut Date: Tue Aug 23 23:22:16 2022 +0100 media: mt9p031: Increase post-reset delay The MT9P006 sensor driver sporadically fails to probe because the sensor responds with a NACK condition to I2C address on the bus during an attempt to read the sensor MT9P031_CHIP_VERSION register in mt9p031_registered(). Neither the MT9P006 nor MT9P031 datasheets are clear on reset signal timing. Older MT9M034 [1] datasheet provides those timing figures in Appendix-A and indicates it is necessary to wait 850000 EXTCLK cycles before starting any I2C communication. Add such a delay, which does make the sporadic I2C NACK go away, so it is likely similar constraint applies to this sensor. [1] https://www.onsemi.com/pdf/datasheet/mt9m034-d.pdf Signed-off-by: Marek Vasut Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9p031.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit c4cfd47eb4acefa593926c185db69eb56a0bc88b Author: Laurent Pinchart Date: Wed Jun 15 23:14:06 2022 +0100 media: dt-bindings: Use new video interface bus type macros in examples 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 binding examples. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml | 3 ++- Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml | 3 ++- Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml | 3 ++- Documentation/devicetree/bindings/media/microchip,xisc.yaml | 3 ++- Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml | 4 +++- 5 files changed, 11 insertions(+), 5 deletions(-) commit f7eeb00845934851b580b188f079545ab176fa5c Author: Laurent Pinchart Date: Wed Jun 15 23:14:05 2022 +0100 media: dt-bindings: media: Add macros for video interface bus types Add a new dt-bindings/media/video-interfaces.h header that defines macros corresponding to the bus types from media/video-interfaces.yaml. This allows avoiding hardcoded constants in device tree sources. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Reviewed-by: Jacopo Mondi Reviewed-by: Paul Elder Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab include/dt-bindings/media/video-interfaces.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e208ad015f9310a87b4bb1ba1e4d3e347f391aa4 Author: Marek Vasut Date: Sun Nov 20 14:13:04 2022 +0000 media: mt9p031: Drop bogus v4l2_subdev_get_try_crop() call from mt9p031_init_cfg() The mt9p031_init_cfg() already calls __mt9p031_get_pad_crop(), which correctly calls v4l2_subdev_get_try_crop() on V4L2_SUBDEV_FORMAT_TRY or returns &mt9p031->crop on V4L2_SUBDEV_FORMAT_ACTIVE. No need to call v4l2_subdev_get_try_crop() in mt9p031_init_cfg() again in case of both V4L2_SUBDEV_FORMAT_TRY and V4L2_SUBDEV_FORMAT_ACTIVE. This also fixes a splat generated by this call since commit 2ba3e38517f5a ("media: v4l: subdev: Fail graciously when getting try data for NULL state") because v4l2_subdev_get_try_crop() is called with sd_state = NULL in mt9p031_init_cfg(). Fixes: 69681cd041648 ("media: mt9p031: Move open subdev op init code into init_cfg") Signed-off-by: Marek Vasut Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9p031.c | 1 - 1 file changed, 1 deletion(-) commit 3bc80e89507258b9079f4a1eefe2325537bdb62e Author: Dave Stevenson Date: Wed Oct 5 16:20:18 2022 +0100 media: i2c: ov9282: Add support for regulators. The sensor takes 3 supply rails - AVDD, DVDD, and DOVDD. Add hooks into the regulator framework for each of these regulators. Signed-off-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 91707453eb1481d8c491b319c77ac0d7346b6f99 Author: Dave Stevenson Date: Wed Oct 5 16:20:17 2022 +0100 media: dt-bindings: media: ovti,ov9282: Add optional regulators The OV9282 image sensor takes 3 voltage supplies, so define the relevant regulators. Signed-off-by: Dave Stevenson Acked-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) commit 74b681bd24eefe0d240ef7e5e99aff5b12fd021a Author: Benjamin Mugnier Date: Mon Nov 7 15:00:00 2022 +0000 media: i2c: st-vgxy61: Fix regulator counter underflow Previously regulators were enabled on probe and never again. However, as regulators are disabled on power off. After a second power off the regulator counter will underflow. Plus regulators are not required for probing the sensor, but for streaming. Fix this by enabling regulators on power on to balance regulator counter properly. Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/st-vgxy61.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e645289459edd9415d3d657b5fc84034d34fecb3 Author: Andy Shevchenko Date: Tue Jul 26 13:05:56 2022 +0100 media: ov2740: Use traditional pattern when checking error codes Instead of 'if (!ret)' switch to "check for the error first" rule. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2740.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 6919695f0616e207ca45d61cd1d397a1d4a88b37 Author: Andy Shevchenko Date: Tue Jul 26 13:05:55 2022 +0100 media: ov2740: Add missed \n to the end of the messages Add missed \n to the end of the messages. Signed-off-by: Andy Shevchenko Reviewed-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2740.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a55ae53c554ed0b1557317286658fc13fc23b19c Author: Andy Shevchenko Date: Tue Jul 26 13:05:54 2022 +0100 media: ov2740: Switch to use dev_err_probe() Switch to use dev_err_probe() to simpify error path and unify message template. While at it, add missed \n to the end of the messages. Signed-off-by: Andy Shevchenko Reviewed-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2740.c | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) commit 3b0d0f33795403ec2d1ea87218a47d1a4d3c73f2 Author: Andy Shevchenko Date: Tue Jul 26 13:05:53 2022 +0100 media: ov2740: Drop redundant assignments of ret = 0 In some cases it might hide real bugs, in most cases here it's just redundant as it's being reassigned immediately after initial assignment. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2740.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 1de49712936fbe57e5a0ca88b927345b8aea84a7 Author: Andy Shevchenko Date: Tue Jul 26 13:05:52 2022 +0100 media: ov2740: Remove duplicate check for NULL fwnode fwnode API does proper checks and returns correct codes, no need to repeat it in the caller. Signed-off-by: Andy Shevchenko Reviewed-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2740.c | 3 --- 1 file changed, 3 deletions(-) commit 1ba4b745a0e47d99ddbf79b12a65f543db91eb0e Author: Andy Shevchenko Date: Tue Jul 26 13:05:51 2022 +0100 media: ov2740: Switch from __maybe_unused to pm_sleep_ptr() etc Letting the compiler remove these functions when the kernel is built without CONFIG_PM_SLEEP support is simpler and less heavier for builds than the use of __maybe_unused attributes. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2740.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 39cc0f20d1bc2bfd16aa8a05db84755d04d25b3c Author: Andy Shevchenko Date: Tue Jul 26 13:05:49 2022 +0100 media: ov2740: Remove duplicative pointer in struct nvm_data The struct i2c_client pointer is used only to get driver data, associated with a struct device or print messages on behalf. Moreover, the very same pointer to a struct device is already assigned by a regmap and can be retrieved from there. No need to keep a duplicative pointer. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2740.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) commit 67bfe08f82dbd0cb5fce16460017b0f21df734e4 Author: Marco Felsch Date: Mon Nov 7 09:42:12 2022 +0000 media: tc358746: drop selecting COMMON_CLK Still there are archs/platforms which do not support the common clk framework. If such a platform is used in combination with the module enabled the compiler will throw an error. Since the clock has stubs if not selected we can drop it, so it is up to the arch/platform to select the correct clock framework. Fixes: 80a21da36051 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver") Reported-by: kernel test robot Signed-off-by: Marco Felsch Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 27b0a9c2a67d483a9d4a941882b779a199ff281e Author: Christophe JAILLET Date: Sat Nov 12 20:51:06 2022 +0000 media: i2c: aptina-pll: Remove a useless include is not needed for this driver. Remove the corresponding #include. Signed-off-by: Christophe JAILLET Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/aptina-pll.c | 1 - 1 file changed, 1 deletion(-) commit 0352f880acb27d069a73403298b4527d8fe54602 Author: Ian Cowan Date: Mon Nov 14 16:17:00 2022 +0000 media: staging: omap4iss: remove cacheflush import The cacheflush import is never used, so it is safe to remove it as an import. Signed-off-by: Ian Cowan Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss_video.c | 2 -- 1 file changed, 2 deletions(-) commit 9f257f502c2e1f4bcc10004ddc4a18ebb7396136 Author: Laurent Pinchart Date: Tue May 10 19:37:05 2022 +0100 media: imx: Unstage the imx7-media-csi driver The imx7-media-csi driver, currently in staging, is ready for prime-time. The staging TODO file lists a few items specific to that driver, that are already addressed (the "all of the above" part) or can be addressed later: - The frame interval monitoring support is a software mechanism to monitor the device for unexpected stalls, and should be part of the V4L2 core if desired. - Restricting the support media bus formats based on the SoC integration only aims at reducing userspace confusion by not enumerating options that are known not to be possible, it won't cause regressions if handled later. Move the description of the media bus format restriction TODO item to the driver, drop the other TODO items, and move the driver out of staging. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Acked-by: Rui Miguel Silva Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 2 +- drivers/media/platform/nxp/Kconfig | 13 ++++++++++ drivers/media/platform/nxp/Makefile | 1 + .../imx => media/platform/nxp}/imx7-media-csi.c | 24 ++++++++++++++++++ drivers/staging/media/imx/Kconfig | 7 ------ drivers/staging/media/imx/Makefile | 1 - drivers/staging/media/imx/TODO | 29 ---------------------- 7 files changed, 39 insertions(+), 38 deletions(-) commit 3cf2291777abefe94b453d1d886e8a11f024912c Author: Eugen Hristev Date: Thu Nov 24 17:46:10 2022 +0200 ARM: dts: at91: sama7g5ek: align power rails for sdmmc0/1 On this board SDMMC0 has a 1.8 signaled eMMC device powered at 3.3V. Hence, correctly describe the connected rails from the PMIC. SDMMC1 is connected to a voltage switch that can change from 3.3V to 1.8V by a hardware controlled pin. However SDMMC1 at the moment works only in 3.3V mode (default speed, no UHS-I modes), thus connect the signaling to the 3.3V rail. Signed-off-by: Eugen Hristev [claudiu.beznea: reshaped a bit the commit message] Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221124154610.246790-1-eugen.hristev@microchip.com arch/arm/boot/dts/at91-sama7g5ek.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6593222693bfb53a58f902fdc3cce6a89ece6a94 Author: Laurent Pinchart Date: Tue May 10 16:46:33 2022 +0100 media: imx: Decouple imx8mq-mipi-csi2 from imx7-media-csi The imx8mq-mipi-csi2 driver targets SoCs that also run the imx7-media-csi driver, but they are distinct. Decouple them in Kconfig to prepare for destaging of the imx7-media-csi driver. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Tested-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Kconfig | 10 ++++++++++ drivers/staging/media/imx/Makefile | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) commit cccc08a95ca57624563daafd47df5691e8c38995 Author: Laurent Pinchart Date: Wed Sep 7 19:42:16 2022 +0100 media: imx: imx7-media-csi: Clear BIT_MIPI_DOUBLE_CMPNT for <16b formats Commit 9babbbaaeb87 ("media: imx: imx7-media-csi: Use dual sampling for YUV 1X16") set BIT_MIPI_DOUBLE_CMPNT in the CR18 register for 16-bit YUV formats in imx7_csi_configure(). The CR18 register is always updated with read-modify-write cycles, so if a 16-bit YUV format is selected, the bit will stay set forever, even if the format is changed. Fix it by clearing the bit at the beginning of the imx7_csi_configure() function. While at it, swap two of the bits being cleared to match the MSB to LSB order. This doesn't cause any functional change. Fixes: 9babbbaaeb87 ("media: imx: imx7-media-csi: Use dual sampling for YUV 1X16") Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Acked-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fa282e117b68bbdd42e99f9b6fb6b050b48fa492 Author: Laurent Pinchart Date: Wed Sep 7 00:04:01 2022 +0100 media: imx: imx7-media-csi: Rename phys variables to dma_addr All the phys variables and structure fields store a DMA address, not a physical address. Even if the two are effectively identical on all platforms where this driver is used due to the lack of IOMMU, rename the variables to dma_addr to make their usage clearer. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Acked-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 2f79df7260cdafbe0cb8fd6fd5b3d8024946f95f Author: Laurent Pinchart Date: Wed Sep 7 00:04:01 2022 +0100 media: imx: imx7-media-csi: Move variable to loop scope The phys variable is only used as a local loop variable in imx7_csi_setup_vb2_buf(), with each entry in the array being used in the corresponding iteration of the loop only. Move it to loop scope, simplifying the array to a single variable. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Acked-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a868d306de5848b1e2f4911a7aed941a902cc578 Author: Paul Elder Date: Wed Sep 7 12:47:37 2022 +0100 media: imx: imx7-media-csi: Add support for fast-tracking queued buffers The CSI hardware compatible with this driver handles buffers using a ping-pong mechanism with two sets of destination addresses. Normally, when an interrupt comes in to signal the completion of one buffer, say FB1, it assigns the next buffer in the queue to the next FB1, and the hardware starts to capture into FB2 in the meantime. In a buffer underrun situation, in the above example without loss of generality, if a new buffer is queued before the interrupt for FB1 comes in, we can program the buffer into FB2 (which is programmed with a dummy buffer, as there is a buffer underrun). This of course races with the interrupt that signals FB1 completion, as once that interrupt comes in, we are no longer guaranteed that the programming of FB2 was in time and must assume it was too late. This race is resolved partly by locking the programming of FB2. If it came after the interrupt for FB1, then the variable that is used to determine which FB to program would have been swapped by the interrupt handler. This alone isn't sufficient, however, because the interrupt could still be generated (thus the hardware starts capturing into the other fb) while the fast-tracking routine has the irq lock. Thus, after programming the fb register to fast-track the buffer, the isr also must be checked to confirm that an interrupt didn't come in the meantime. If it has, we must assume that programming the register for the fast-tracked buffer was not in time, and queue the buffer normally. Signed-off-by: Paul Elder Acked-by: Rui Miguel Silva Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 76 ++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 64a863e3fb9c6b046102f7a1f421082963aa080d Author: Christophe JAILLET Date: Sat Nov 12 21:24:34 2022 +0000 media: imx: imx7-media-csi: Remove a useless include is not needed for this driver. Remove the corresponding #include. Signed-off-by: Christophe JAILLET Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 1 - 1 file changed, 1 deletion(-) commit b55ec06e7e9805597f0cba124641020be57a8772 Merge: 387210edb983 fc6836b3b142 Author: Mauro Carvalho Chehab Date: Fri Nov 25 08:29:39 2022 +0000 Merge tag 'br-v6.2f' of git://linuxtv.org/hverkuil/media_tree into media_stage Tag branch * tag 'br-v6.2f' of git://linuxtv.org/hverkuil/media_tree: (26 commits) media: atmel: atmel-isc: move to staging media: microchip: microchip-isc: move media_pipeline_* to (un)prepare cb media: microchip: microchip-isc: implement media controller media: microchip: microchip-isc: prepare for media controller support media: microchip: add ISC driver as Microchip ISC media: atmel: move microchip_csi2dc to dedicated microchip platform vb2/au0828: move the v4l_vb2q_enable_media_source to the au0828 driver vb2: add (un)prepare_streaming queue ops media: admin-guide: cec.rst staging: media: sunxi: cedrus: make vb2_ops struct definition const media: amphion: Fix error handling in vpu_driver_init() media: platform: exynos4-is: Fix error handling in fimc_md_init() media: mtk-jpegdec: add missing destroy_workqueue() media: aspeed: Use v4l2_dbg to replace v4l2_warn to avoid log spam media: solo6x10: fix possible memory leak in solo_sysfs_init() media: cedrus: Relax HEVC SPS restrictions media: cedrus: h265: Support decoding 10-bit frames media: cedrus: Adjust buffer size based on codec media: s5p-mfc: Optimisation of code to remove error message media: s5p-mfc:fix usage of Block comment alignment ... Signed-off-by: Mauro Carvalho Chehab commit 5a2d96623670155d94aca72c320c0ac27bdc6bd2 Author: Yuan Can Date: Thu Nov 17 08:08:23 2022 +0000 platform/chrome: cros_usbpd_notify: Fix error handling in cros_usbpd_notify_init() The following WARNING message was given when rmmod cros_usbpd_notify: Unexpected driver unregister! WARNING: CPU: 0 PID: 253 at drivers/base/driver.c:270 driver_unregister+0x8a/0xb0 Modules linked in: cros_usbpd_notify(-) CPU: 0 PID: 253 Comm: rmmod Not tainted 6.1.0-rc3 #24 ... Call Trace: cros_usbpd_notify_exit+0x11/0x1e [cros_usbpd_notify] __x64_sys_delete_module+0x3c7/0x570 ? __ia32_sys_delete_module+0x570/0x570 ? lock_is_held_type+0xe3/0x140 ? syscall_enter_from_user_mode+0x17/0x50 ? rcu_read_lock_sched_held+0xa0/0xd0 ? syscall_enter_from_user_mode+0x1c/0x50 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f333fe9b1b7 The reason is that the cros_usbpd_notify_init() does not check the return value of platform_driver_register(), and the cros_usbpd_notify can install successfully even if platform_driver_register() failed. Fix by checking the return value of platform_driver_register() and unregister cros_usbpd_notify_plat_driver when it failed. Fixes: ec2daf6e33f9 ("platform: chrome: Add cros-usbpd-notify driver") Signed-off-by: Yuan Can Reviewed-by: Brian Norris Link: https://lore.kernel.org/r/20221117080823.77549-1-yuancan@huawei.com Signed-off-by: Prashant Malani drivers/platform/chrome/cros_usbpd_notify.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 387210edb98312ebde71e3bc2e2d97ccd866cdbb Author: Andy Shevchenko Date: Fri Nov 18 18:43:09 2022 +0000 media: atomisp: Make bds_factors_list be type of struct u32_fract The list contains the Bayer scale index, and rational fraction of it. The struct u32_fract is suitable type to hold that. Convert the driver to use latter instead of former. Signed-off-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../camera/pipe/interface/ia_css_pipe_binarydesc.h | 13 ++--- .../atomisp/pci/camera/pipe/src/pipe_binarydesc.c | 55 +++++++++------------- .../media/atomisp/pci/runtime/binary/src/binary.c | 42 ++++++----------- .../media/atomisp/pci/sh_css_param_shading.c | 19 ++++---- 4 files changed, 51 insertions(+), 78 deletions(-) commit 6f5c0bafa6d1311501e25c2dec096df40fcbe350 Author: Hans de Goede Date: Mon Oct 24 00:05:08 2022 +0100 media: atomisp_ov2680: Fix 1280x720 -> 1296x736 resolution The ov2680_720p_30fps register init list used for the 1296x736 resolution sets the hsize register to 1296 and the vsize register to 736. This is actually the right thing to do when combined with the atomISP2 because the ISP requires 16 bytes padding leaving userspace to see 1280x720. But the resolution list entries for this was incorrectly reporting the resolution being send to the ISP as already being 1280x720, leaving usespace to see 1274x704 as resolution. Worse then userspace seeing a weird resolution selecting the 1280x720 sensor resolution (which in reality is sending 1296x736) to the ISP was causing the ISP to hang on Cherry Trail based tablets (Bay Trail works fine for some reason). This commit also adds a bunch of comments annotating what the various register writes the init lists are doing. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/ov2680.h | 46 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 2527b8d1676aee0351c6f2babf2d1057709a4b80 Author: Hans de Goede Date: Mon Nov 14 16:07:45 2022 +0000 media: atomisp: Remove atomisp_ospm_dphy_up()/_down() functions atomisp_ospm_dphy_up() is an empty function now and atomisp_ospm_dphy_down() contains a couple of checks + goto done statements which don't matter since the function always ends up at the done label regardless and then it does 1 pci-config write. Move the single pci-config write directly to atomisp_power_off() and remove the atomisp_ospm_dphy_up()/_down() functions. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 34 ------------------------ drivers/staging/media/atomisp/pci/atomisp_cmd.h | 2 -- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 24 ++++++++--------- 3 files changed, 12 insertions(+), 48 deletions(-) commit 1ad2c1354bfa097e974d2edaa7491b6f2d43f481 Author: Hans de Goede Date: Mon Nov 14 16:00:51 2022 +0000 media: atomisp: Remove atomisp_ospm_dphy_down() call from probe error path The only thing which atomisp_ospm_dphy_down() does is disable the CSI pins, but if we failed to probe the ISP then these will never have been enabled (because the ISP never started streaming). So the atomisp_ospm_dphy_down() call in the probe error path is unnecessary, remove it. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 2 -- 1 file changed, 2 deletions(-) commit 5317baa0a39ec480d6b225cca639b2fb19583515 Author: Hans de Goede Date: Mon Nov 14 15:55:38 2022 +0000 media: atomisp: Move calling of css_[un]init() to power_on()/_off() atomisp_css_init() is always called after calling atomisp_power_on() either directly or through getting a runtime-pm reference. Likewise atomisp_css_uninit() is always called after calling atomisp_power_off(). Move the call site of these 2 functions to inside atomisp_power_on() / atomisp_power_off() to make this more explicit. Note this makes atomisp_reset() also set isp_fatal_error on atomisp_power_on() errors, where as before it only did this on atomisp_css_init() errors. This behavior change is for the better, since power-on failing is pretty fatal too. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 8 +++----- drivers/staging/media/atomisp/pci/atomisp_fops.c | 9 --------- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 5 ++++- 3 files changed, 7 insertions(+), 15 deletions(-) commit 6736a68fe15640e007a75f873cec86bdf9cc47a6 Author: Hans de Goede Date: Mon Nov 14 15:44:49 2022 +0000 media: atomisp: Remove duplication between runtime-pm and normal-pm code atomisp_suspend() contains a 1:1 copy of atomisp_runtime_suspend() and the same goes for the resume() functions. Rename the runtime functions to atomisp_power_on()/_off() and use these as runtime-pm handlers as well as helper in other places to remove the code duplication. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 8 ++--- drivers/staging/media/atomisp/pci/atomisp_cmd.h | 4 +-- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 46 ++++-------------------- 3 files changed, 12 insertions(+), 46 deletions(-) commit f1219d9efab15a95c28df85269db72669f6206a5 Author: Hans de Goede Date: Mon Nov 14 15:32:41 2022 +0000 media: atomisp: Remove sw_contex.power_state checks Remove the unnecessary sw_contex.power_state checks: 1. atomisp_freq_scaling() and atomisp_stop_streaming() only run when the ISP is powered up through runtime-pm, so the checks are not necessary 2. atomisp_mrfld_pre_power_down() and atomisp_runtime_resume() are only called through the driver-core pm handling code which already guarantees they are not called when already powered down / up. 3. atomisp_isr() also checks isp->css_initialized which only gets set by atomisp_css_init() which runs *after* powering up the ISP and which gets cleared by atomisp_css_uninit() *before* powering down the ISP. So all the checks are unnecessary, remove them as well as the sw_contex.power_state field itself. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 20 +----- .../staging/media/atomisp/pci/atomisp_internal.h | 1 - drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 75 ++++++++++------------ drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 19 ++---- 4 files changed, 43 insertions(+), 72 deletions(-) commit 586ef0c6917dc5f7937726733a1f8372ce200f7a Author: Hans de Goede Date: Mon Nov 14 15:09:52 2022 +0000 media: atomisp: Remove atomisp_css_suspend()/_resume() atomisp_css_suspend() is a 1:1 copy of atomisp_css_uninit() and atomisp_css_resume() is a 1:1 copy of atomisp_css_init(). Remove the 2 copies and have their one caller just call atomisp_css_uninit() / atomisp_css_init() instead. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 4 +-- drivers/staging/media/atomisp/pci/atomisp_compat.h | 4 --- .../media/atomisp/pci/atomisp_compat_css20.c | 29 ---------------------- 3 files changed, 2 insertions(+), 35 deletions(-) commit a419e3f5917713246bcf83ceff7bbf61f5389e84 Author: Hans de Goede Date: Mon Nov 14 15:07:18 2022 +0000 media: atomisp: Remove clearing of config from atomisp_css_uninit() atomisp_css_uninit() only runs when all streams are stopped and atomisp_css_stop() already clears the config, so the clearing of the config can be dropped from atomisp_css_uninit(). Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 9 --------- 1 file changed, 9 deletions(-) commit 10f2b0a3a12e360aff944750a18693a71c39d8f9 Author: Hans de Goede Date: Fri Nov 11 20:47:40 2022 +0000 media: atomisp: Remove atomisp_mrfld_power_down()/_up() atomisp_mrfld_power_down()/_up() are unnecessary wrappers around atomisp_mrfld_power() remove them and just call atomisp_mrfld_power() directly. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit 24aba5825c66ca717d552e90113e81a36218d24d Author: Hans de Goede Date: Fri Nov 11 17:48:14 2022 +0000 media: atomisp: Remove double atomisp_mrfld_power_down()/_up() calls from atomisp_reset() atomisp_reset() calls atomisp_mrfld_power_down() after calling atomisp_runtime_suspend(), which already calls atomisp_mrfld_power_down() itself. And the some goes for atomisp_runtime_resume() / atomisp_mrfld_power_up(). Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 16 +++++----------- drivers/staging/media/atomisp/pci/atomisp_cmd.h | 2 -- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 4 ++-- 3 files changed, 7 insertions(+), 15 deletions(-) commit f5cb5adaa8ec2dd5cf99ead2af57e076e1a495b0 Author: Hans de Goede Date: Tue Nov 8 19:34:56 2022 +0000 media: atomisp: Drop userptr support from hmm After the conversion to videobuf2 userptr support is no longer needed, drop it. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm.h | 1 - drivers/staging/media/atomisp/include/hmm/hmm_bo.h | 2 - drivers/staging/media/atomisp/pci/hmm/hmm.c | 20 +++----- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 53 +--------------------- 4 files changed, 7 insertions(+), 69 deletions(-) commit 86c9abf864fbf36dd7a53155841007f55bf99957 Author: Hans de Goede Date: Tue Nov 8 17:09:44 2022 +0000 media: atomisp: Remove unused ia_css_frame_*() functions After the conversion to videobuf2 a bunch of ia_css_frame_*() functions are unused, remove them. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/ia_css_frame_public.h | 74 ------------- .../media/atomisp/pci/runtime/frame/src/frame.c | 121 --------------------- 2 files changed, 195 deletions(-) commit 9ff83b98a89fb9b0c4ec42a2171c5cfb6f799a65 Author: Hans de Goede Date: Tue Oct 25 15:05:20 2022 +0100 media: atomisp: Remove atomisp_css_yuvpp_configure_viewfinder() function Remove atomisp_css_yuvpp_configure_viewfinder(), it is not used anywhere. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_compat.h | 7 ------- .../media/atomisp/pci/atomisp_compat_css20.c | 23 ---------------------- 2 files changed, 30 deletions(-) commit 183d3aa688fffb42430f8abf02ba08a646762e6e Author: Hans de Goede Date: Tue Oct 25 15:02:15 2022 +0100 media: atomisp: Remove 2 unused accelerator mode related functions Remove ia_css_pipe_get_acc_stage_desc() and sh_css_flush(), after removing the accelerator /dev/video# node and related ioctls these are no longer used. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../camera/pipe/interface/ia_css_pipe_stagedesc.h | 5 ----- .../atomisp/pci/camera/pipe/src/pipe_stagedesc.c | 21 --------------------- drivers/staging/media/atomisp/pci/sh_css.c | 9 --------- drivers/staging/media/atomisp/pci/sh_css_internal.h | 3 --- 4 files changed, 38 deletions(-) commit da0dd507fa279c33813ae6f28e47c61ce065586c Author: Hans de Goede Date: Sun Oct 23 21:22:14 2022 +0100 media: atomisp: Fix deadlock when the /dev/video# node is closed while still streaming atomisp_release() was taking pipe->vb_queue_mutex + isp->mutex at the same time. But if the /dev/video# node is closed while still streaming then vb2_queue_release() will call atomisp_stop_streaming() which takes isp->mutex itself, leading to a deadlock. To fix this only take isp->mutex after cleaning up the v4l2_fh / the vb2_queue. While at it switch to vb2_fop_release() which will take pipe->vb_queue_mutex for us, which also resolves a FIXME comment. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_fops.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit ac8dd062aa6cb095096e02240f497786891317b0 Author: Hans de Goede Date: Sun Oct 23 21:16:09 2022 +0100 media: atomisp: Log an error on failing to alloc private-mem I managed to trigger an atomisp_css_start() error by pushing my test system towards an OOM situation, this resulted in the following errors: atomisp-isp2 0000:00:03.0: alloc pages err... atomisp-isp2 0000:00:03.0: hmm_bo_alloc_pages failed. atomisp-isp2 0000:00:03.0: stream[0] start error. But it is not entirely clear what the root cause of the "alloc pages err..." error is. I suspect the root cause is alloc_pages_bulk_array() failing. Add a log message to make the root cause more clear if this is hit again. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 1 + 1 file changed, 1 insertion(+) commit 36c953e1efa8249fb2d85a1f396d885a9463e9a8 Author: Hans de Goede Date: Sun Oct 23 21:13:01 2022 +0100 media: atomisp: Flush queue on atomisp_css_start() error I managed to trigger an atomisp_css_start() error by pushing my test system towards an OOM situation, this triggered the following WARN_ON() in __vb2_queue_cancel() in videobuf2-core.c: /* * If you see this warning, then the driver isn't cleaning up properly * after a failed start_streaming(). See the start_streaming() * documentation in videobuf2-core.h for more information how buffers * should be returned to vb2 in start_streaming(). */ if (WARN_ON(atomic_read(&q->owned_by_drv_count))) { Fix this by calling atomisp_flush_video_pipe() to return any queued buffers back to the videobuf2-core on an atomisp_css_start() error. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit afbfe82cbba3aab816ef3b8bf13450bba7c25cad Author: Hans de Goede Date: Sat Oct 22 15:54:37 2022 +0100 media: atomisp: Remove unused QOS defines / structure member With the accel code gone this is unused, remove it. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../atomisp/pci/runtime/pipeline/interface/ia_css_pipeline.h | 2 -- drivers/staging/media/atomisp/pci/sh_css_internal.h | 9 --------- drivers/staging/media/atomisp/pci/sh_css_sp.c | 2 +- 3 files changed, 1 insertion(+), 12 deletions(-) commit 544b6bec67fc893bc8906d59ff03fb93f69c07fc Author: Hans de Goede Date: Thu Oct 20 22:28:51 2022 +0100 media: atomisp: Remove accelerator pipe creation code The ATOMISP_ACC_* custom ioctls and the ACC device node have been removed in commit a5c17adbadcb ("media: atomisp: Remove the ACC device node"). This means that pipe_configs[pipe_id].acc_extension now never gets set which causes atomisp_compat_css20.c: __create_pipe() to always skip creation of pipes with a pipe_id of IA_CSS_PIPE_ID_ACC / a mode of IA_CSS_PIPE_MODE_ACC. This allows removing of the acc_pipe creation / handling code from mainly sh_css.c and a bunch of other places. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp_compat_css20.c | 27 +- drivers/staging/media/atomisp/pci/ia_css_pipe.h | 3 +- .../staging/media/atomisp/pci/ia_css_pipe_public.h | 69 --- .../atomisp/pci/runtime/debug/src/ia_css_debug.c | 7 - .../atomisp/pci/runtime/pipeline/src/pipeline.c | 8 - drivers/staging/media/atomisp/pci/sh_css.c | 599 +-------------------- .../staging/media/atomisp/pci/sh_css_internal.h | 1 - drivers/staging/media/atomisp/pci/sh_css_legacy.h | 1 - 8 files changed, 6 insertions(+), 709 deletions(-) commit 8824864b840d854e409fd1957cf624e5226de743 Author: Hans de Goede Date: Thu Oct 20 20:56:17 2022 +0100 media: atomisp: Silence: 'atomisp_q_one_s3a_buffer: drop one s3a stat which has exp_id xx' log messages Standard v4l2 userspace apps do not consume the s3a statistics block data. Until we have a userspace consumer for this (libcamera), which might also involve changing the API for this, lower the log level of these messages to dev_dbg() to avoid them filling up the logs. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_fops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c5fafbadaeae0303514e194f37347a461577d0fb Author: Hans de Goede Date: Sun Oct 16 20:49:43 2022 +0100 media: atomisp: gc0310: 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 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 drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 14 ++++++++++++-- drivers/staging/media/atomisp/i2c/gc0310.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) commit eb314d873a6d7cd0e7ec1e58906035f8cb15d303 Author: Hans de Goede Date: Sun Oct 16 19:28:33 2022 +0100 media: atomisp: Remove __atomisp_get_pipe() helper Remove the complicated __atomisp_get_pipe() helper, atomisp_buf_done() only needs the pipe pointer in cases where it has a frame, so we can simply get the pipe from the frame using the vb_to_pipe() helper. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 98 +------------------------ 1 file changed, 4 insertions(+), 94 deletions(-) commit 7bc1bfa562a81e5023eb8e6bb715c2de45631123 Author: Hans de Goede Date: Sun Oct 16 19:00:07 2022 +0100 media: atomisp: Make atomisp_g_fmt_cap() default to YUV420 Make atomisp_g_fmt_cap() default to YUV420 so that it matches with what atomisp_try_fmt_cap() and atomisp_queue_setup() do when they need to pick a default pixelformat. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57e1222e8f9b08058bfe487478c14c624d03fd00 Author: Hans de Goede Date: Sun Oct 16 19:02:54 2022 +0100 media: atomisp: Fix atomisp_try_fmt_cap() always returning YUV420 pixelformat The atomisp_try_fmt() call in atomisp_try_fmt_cap() replaces the pixelformat passed by userspace with the sensors native pixelformat. Which always gets replaced by V4L2_PIX_FMT_YUV420 by atomisp_adjust_fmt() because raw sensor formats are not supported. This needs to be fixed so that userspace which does a try_fmt call before s_fmt does not end up always getting YUV420 even if it passed something else into the try_fmt call. To fix this restore the userspace requested pixelformat before the atomisp_adjust_fmt() call. atomisp_adjust_fmt() will replace this with V4L2_PIX_FMT_YUV420 in case an unsupported format is requested. Note this relies on the "media: atomisp: Refactor atomisp_adjust_fmt()" change, before that atomisp_adjust_fmt() would return -EINVAL for unsupported pixelformats. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4361af85109cdf89bd52f75157d818e4cecb2a4e Author: Hans de Goede Date: Sun Oct 16 10:35:03 2022 +0100 media: atomisp: Refactor atomisp_adjust_fmt() Refactor atomisp_adjust_fmt(): 1. The block starting at "format_bridge = atomisp_get_format_bridge(...)" and ending with "if (field == V4L2_FIELD_ANY) field = V4L2_FIELD_NONE;" is duplicated. With only the second block: a) Properly checking that format_bridge is not NULL; amd b) Having the special handling for IA_CSS_FRAME_FORMAT_RAW Remove the first block. 2. On a NULL return from atomisp_get_format_bridge(f->fmt.pix.pixelformat) fall back to V4L2_PIX_FMT_YUV420 just like in the IA_CSS_FRAME_FORMAT_RAW case. atomisp_adjust_fmt() is used in VIDIOC_TRY_FMT handling and that should jusy pick a fmt rather then returning -EINVAL. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) commit 795ac295eacb291302b8951605677301c7938bd7 Author: Hans de Goede Date: Sun Oct 16 10:43:11 2022 +0100 media: atomisp: Fix VIDIOC_REQBUFS failing when VIDIOC_S_FMT has not been called yet camorama calls VIDIOC_REQBUFS(V4L2_MEMORY_MMAP) to test if MMAP support works (this was added specifically because of the previously broken MMAP support in atomisp). Currently this fails because atomisp_get_css_frame_info() fails in this case. Although it is weird to call VIDIOC_REQBUFS before VIDIOC_S_FMT, it is allowed to do this. Fix this not working by doing a S_FMT to V4L2_PIX_FMT_YUV420 + the highest supported resolution. Note this will cause camorama to use mmap mode, which means it will also use libv4l2 to do format conversion. libv4l2 will pick V4L2_PIX_FMT_RGB565 as input format and this will lead to a garbled video display. This is a libv4lconvert bug, the RGB565 -> RGB24 path in libv4lconvert assumes that stride == width which is not true on the atomisp. I've already send out a libv4lconvert fix for this. Also this can be worked around by passing --dont-use-libv4l2 as argument to camorama. Link: https://git.linuxtv.org/v4l-utils.git/commit/?id=aecfcfccfc2f78d7531456ffa5465666c6bc641e Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp_compat_css20.c | 2 +- drivers/staging/media/atomisp/pci/atomisp_fops.c | 25 ++++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) commit 4bdab80981ca6d7b5af5dd0a5625d76cea8dd91e Author: Hans de Goede Date: Sat Oct 15 18:21:42 2022 +0100 media: atomisp: Make it possible to call atomisp_set_fmt() without a file handle To fix atomisp_queue_setup() sometimes failing it needs to be able to call atomisp_set_fmt(), but atomisp_queue_setup() (VIDIOC_REQBUFS) does not get passed a file handle by the videobuf2 core. Partly revert commit b3be98f984d4 ("media: atomisp: Remove a couple of not useful function wrappers") so that atomisp_set_fmt() can be used without a file handle. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +-- drivers/staging/media/atomisp/pci/atomisp_cmd.h | 2 +- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 10 +++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) commit cb48ae89be3b6e916fe1640a9ee23fe4c87a1ca6 Author: Hans de Goede Date: Sat Oct 8 17:39:32 2022 +0100 media: atomisp: Convert to videobuf2 Convert atomisp to use videobuf2. This fixes mmap not working and in general moving over to the more modern videobuf2 is a good plan. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 121 ++---- drivers/staging/media/atomisp/pci/atomisp_cmd.h | 3 +- drivers/staging/media/atomisp/pci/atomisp_common.h | 6 +- drivers/staging/media/atomisp/pci/atomisp_compat.h | 3 +- .../media/atomisp/pci/atomisp_compat_css20.c | 4 +- drivers/staging/media/atomisp/pci/atomisp_fops.c | 482 +++++++-------------- drivers/staging/media/atomisp/pci/atomisp_fops.h | 7 - drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 427 +++--------------- drivers/staging/media/atomisp/pci/atomisp_ioctl.h | 10 +- drivers/staging/media/atomisp/pci/atomisp_subdev.c | 1 + drivers/staging/media/atomisp/pci/atomisp_subdev.h | 15 +- .../media/atomisp/pci/ia_css_frame_public.h | 15 + 12 files changed, 303 insertions(+), 791 deletions(-) commit 9a29f5fc3404061d1909e05b98edf0b34686dd3f Author: Hans de Goede Date: Fri Oct 14 17:13:41 2022 +0100 media: atomisp: Add ia_css_frame_get_info() helper Several places rely on the [frame_]info member being the first member of struct ia_css_frame, so that &frame->info will yield NULL when frame is NULL (some places already explicitly check for a NULL frame pointer but not nearly all). For videobuf2 support the vb2_v4l2_buffer struct needs to be embedded in the frame struct and it needs to be the first member. Breaking the assumption that &frame->info will yield NULL when frame is NULL. Add a ia_css_frame_get_info() helper to return either the ia_css_frame_info struct embedded in the frame, or NULL when the frame pointer is NULL and use this in places where a ia_css_frame_info ptr or NULL is expected. To make sure that we catch all uses of the info field this patch also renames the info field to frame_info. This is a preparation patch for converting the driver to videobuf2. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_fops.c | 2 +- .../media/atomisp/pci/ia_css_frame_public.h | 10 ++- .../ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.c | 10 ++- .../yuv444_io_ls/ia_css_yuv444_io.host.c | 10 ++- .../pci/isp/kernels/ref/ref_1.0/ia_css_ref.host.c | 2 +- .../pci/isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.c | 4 +- .../atomisp/pci/runtime/debug/src/ia_css_debug.c | 26 ++++---- .../media/atomisp/pci/runtime/frame/src/frame.c | 76 +++++++++++----------- drivers/staging/media/atomisp/pci/sh_css.c | 38 +++++------ drivers/staging/media/atomisp/pci/sh_css_params.c | 17 +++-- drivers/staging/media/atomisp/pci/sh_css_sp.c | 52 +++++++-------- 11 files changed, 124 insertions(+), 123 deletions(-) commit ce8e2632835cda7e53936d9884d40e1cfe13e0ec Author: Hans de Goede Date: Sat Oct 8 16:27:26 2022 +0100 media: atomisp: Use new atomisp_flush_video_pipe() helper in atomisp_streamoff() Use the new atomisp_flush_video_pipe() helper instead of open-coding it. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 40 ++--------------------- 1 file changed, 2 insertions(+), 38 deletions(-) commit b7465077f72ca8a01aa5fe18b4ee2887761c1117 Author: Hans de Goede Date: Sat Oct 8 16:20:09 2022 +0100 media: atomisp: Add an index helper variable to atomisp_buf_done() With the videobuf2 conversion accessing the index of a frame is going to become more involved and writing this out each time is undesired. Add an 'i' helper variable for the index and assing this once as preparation for the videobuf2 conversion. This also makes use of the new rules wrt max line-lengths in the kernel to avoid breaking up a bunch of lines. Not breaking these lines results in better readable code (IMHO). Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 70 ++++++++++--------------- 1 file changed, 28 insertions(+), 42 deletions(-) commit 89f9829c4163bc0e4c5f7e74142fd791fc747696 Author: Hans de Goede Date: Sat Oct 8 16:08:08 2022 +0100 media: atomisp: Also track buffers in a list when submitted to the ISP Instead of using an integer to keep count of how many buffers have been handed over to the ISP (buffers_in_css) move buffers handed over to the ISP to a new buffers_in_css list_head so that we can easily loop over them. This removes the need for atomisp_flush_video_pipe() to loop over all buffers and then (ab)use the state to figure out if they were handed over to the ISP. Since the buffers are now always on a list when owned by the driver this also allows the buffer_done path on flush vs normal completion to be unified (both now need a list_del()) and this common code can now be factored out into a new atomisp_buffer_done() helper. This is a preparation patch for moving the driver over to the videobuf2 framework. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 91 ++++++++++++---------- drivers/staging/media/atomisp/pci/atomisp_cmd.h | 4 + drivers/staging/media/atomisp/pci/atomisp_fops.c | 24 +++--- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 2 +- drivers/staging/media/atomisp/pci/atomisp_subdev.c | 1 + drivers/staging/media/atomisp/pci/atomisp_subdev.h | 4 +- 6 files changed, 72 insertions(+), 54 deletions(-) commit b895be29a416ee4292978801fdbca2c038af1110 Author: Hans de Goede Date: Fri Oct 7 19:27:09 2022 +0100 media: atomisp: Remove unused atomisp_buffers_queued[_pipe] functions The atomisp_buffers_queued[_pipe] functions are not used anywhere, remove them. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_cmd.c | 15 --------------- drivers/staging/media/atomisp/pci/atomisp_cmd.h | 4 ---- 2 files changed, 19 deletions(-) commit c7194b21809ec53db2f8ae5a5e2389ed774d2af6 Author: Hans de Goede Date: Fri Sep 30 20:05:44 2022 +0100 media: atomisp: On streamoff wait for buffers owned by the CSS to be given back There is no guarantee that when we stop the pipeline all buffers owned by the CSS are cleanly returned to the videobuf queue. This is a problem with videobuf2 which will complain loudly when not all buffers have been returned after the streamoff() queue op has returned. And this also allows removing a WARN() in the continuous mode path. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_fops.c | 3 ++ drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 39 +++++++++------------- drivers/staging/media/atomisp/pci/atomisp_subdev.h | 3 +- 3 files changed, 21 insertions(+), 24 deletions(-) commit af6b9dfddcec827fe9c0a7975217f9e126d37454 Author: Hans de Goede Date: Fri Sep 30 16:54:27 2022 +0100 media: atomisp: Make atomisp_q_video_buffers_to_css() static atomisp_q_video_buffers_to_css() is only used insidd atomisp_fops.c, make it static. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp_fops.c | 10 +++++----- drivers/staging/media/atomisp/pci/atomisp_fops.h | 6 ------ 2 files changed, 5 insertions(+), 11 deletions(-) commit 391e14183ace47a4fc8d880a1693182f789dcfde Author: Hans de Goede Date: Mon Sep 26 20:43:54 2022 +0100 media: atomisp: Add ia_css_frame_init_from_info() function Add a function to initialize (rather then alloc/create) a ia_css_frame struct based on an ia_css_frame_info struct. This is a preparation patch for adding videobuf2 support. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/ia_css_frame_public.h | 11 +++++++++++ .../staging/media/atomisp/pci/runtime/frame/src/frame.c | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) commit 931d87d204aa17d1ee853c1c327d025ec9f7f4f7 Author: Hans de Goede Date: Mon Sep 26 18:45:46 2022 +0100 media: atomisp: Add hmm_create_from_vmalloc_buf() function Add a new hmm creating function to create a vmm object from a vmalloc-ed kernel buffer. This is a preparation patch for adding videobuf2 (and working MMAP mode) support. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/hmm/hmm.h | 2 ++ drivers/staging/media/atomisp/include/hmm/hmm_bo.h | 4 ++- drivers/staging/media/atomisp/pci/hmm/hmm.c | 20 +++++++++----- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 32 ++++++++++++++++++---- 4 files changed, 44 insertions(+), 14 deletions(-) commit b084f6cc3563faf4f4d16c98852c0c734fe18914 Author: Jiapeng Chong Date: Wed Nov 23 17:37:02 2022 +0800 lib/test_rhashtable: Remove set but unused variable 'insert_retries' Variable 'insert_retries' is not effectively used in the function, so delete it. lib/test_rhashtable.c:437:18: warning: variable 'insert_retries' set but not used. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3242 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Herbert Xu Signed-off-by: David S. Miller lib/test_rhashtable.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f72cd76b05ea1ce9258484e8127932d0ea928f22 Author: Xu Panda Date: Tue Nov 22 20:09:23 2022 +0800 net: stmmac: use sysfs_streq() instead of strncmp() Replace the open-code with sysfs_streq(). Signed-off-by: Xu Panda Signed-off-by: Yang Yang Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 813ceef062b53d68f296aa3cb944b21a091fabdb Author: Gautam Menghani Date: Wed Oct 19 06:02:14 2022 +0100 media: imon: fix a race condition in send_packet() The function send_packet() has a race condition as follows: func send_packet() { // do work call usb_submit_urb() mutex_unlock() wait_for_event_interruptible() <-- lock gone mutex_lock() } func vfd_write() { mutex_lock() call send_packet() <- prev call is not completed mutex_unlock() } When the mutex is unlocked and the function send_packet() waits for the call to complete, vfd_write() can start another call, which leads to the "URB submitted while active" warning in usb_submit_urb(). Fix this by removing the mutex_unlock() call in send_packet() and using mutex_lock_interruptible(). Link: https://syzkaller.appspot.com/bug?id=e378e6a51fbe6c5cc43e34f131cc9a315ef0337e Fixes: 21677cfc562a ("V4L/DVB: ir-core: add imon driver") Reported-by: syzbot+0c3cb6dc05fbbdc3ad66@syzkaller.appspotmail.com Signed-off-by: Gautam Menghani Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a42f363e6b58d1fc642d6d082dc660be73656ba5 Author: Wei Yongjun Date: Thu Sep 22 09:37:03 2022 +0100 media: ir-spi: silence no spi_device_id warnings SPI devices use the spi_device_id for module autoloading even on systems using device tree, after commit 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT compatible"), kernel warns as follows since the spi_device_id is missing: SPI driver ir-spi has no spi_device_id for ir-spi-led Add spi_device_id entries to silence the warning, and ensure driver module autoloading works. Signed-off-by: Wei Yongjun Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-spi.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 54607f29a204e10c15f4348f3782cee324360f29 Merge: 55927c98a2c8 76ad5c0a4546 Author: Mauro Carvalho Chehab Date: Fri Nov 25 07:55:03 2022 +0000 Merge tag 'br-v6.2g' of git://linuxtv.org/hverkuil/media_tree into media_stage Despite being big, the changes here are trivial: they just change the probing method for I2C. So, apply it as a merge. Tag branch * tag 'br-v6.2g' of git://linuxtv.org/hverkuil/media_tree: (96 commits) media: v4l2-core/tuner-core: Convert to i2c's .probe_new() media: usb: go7007: s2250-board: Convert to i2c's .probe_new() media: tuners/tua9001: Convert to i2c's .probe_new() media: tuners/tda18250: Convert to i2c's .probe_new() media: tuners/tda18212: Convert to i2c's .probe_new() media: tuners/qm1d1c0042: Convert to i2c's .probe_new() media: tuners/qm1d1b0004: Convert to i2c's .probe_new() media: tuners/mxl301rf: Convert to i2c's .probe_new() media: tuners/mt2060: Convert to i2c's .probe_new() media: tuners/m88rs6000t: Convert to i2c's .probe_new() media: tuners/fc2580: Convert to i2c's .probe_new() media: tuners/e4000: Convert to i2c's .probe_new() media: vidtv: Convert to i2c's .probe_new() media: radio/tef6862: Convert to i2c's .probe_new() media: radio/saa7706h: Convert to i2c's .probe_new() media: radio/radio-tea5764: Convert to i2c's .probe_new() media: i2c/wm8775: Convert to i2c's .probe_new() media: i2c/wm8739: Convert to i2c's .probe_new() media: i2c/vs6624: Convert to i2c's .probe_new() media: i2c/vpx3220: Convert to i2c's .probe_new() ... Signed-off-by: Mauro Carvalho Chehab commit 813abcd98fb1b2cccf850cdfa092a4bfc50b2363 Author: Frank Date: Tue Nov 22 16:42:32 2022 +0800 net: phy: add Motorcomm YT8531S phy id. We added patch for motorcomm.c to support YT8531S. This patch has been tested on AM335x platform which has one YT8531S interface card and passed all test cases. The tested cases indluding: YT8531S UTP function with support of 10M/100M/1000M; YT8531S Fiber function with support of 100M/1000M; and YT8531S Combo function that supports auto detection of media type. Since most functions of YT8531S are similar to YT8521 and we reuse some codes for YT8521 in the patch file. Signed-off-by: Frank Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 2 +- drivers/net/phy/motorcomm.c | 52 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 48 insertions(+), 6 deletions(-) commit 55927c98a2c88019e23353a87f44032107ca2854 Author: Eugen Hristev Date: Mon Nov 7 14:18:18 2022 +0000 media: atmel: atmel-isc: move to staging The Atmel ISC driver is not compliant with media controller specification. In order to evolve this driver, it has to move to media controller, to support enhanced features and future products which embed it. The move to media controller involves several changes which are not backwards compatible with the current usability of the driver. The best example is the way the format is propagated from the top video driver /dev/videoX down to the sensor. In a simple configuration sensor ==> isc , the isc just calls subdev s_fmt and controls the sensor directly. This is achieved by having a lot of code inside the driver that will query the subdev at probe time and make a list of formats which are usable. Basically the user has nothing to configure, as the isc will handle everything at the top level. This is an easy way to capture, but also comes with the drawback of lack of flexibility. In a more complicated pipeline sensor ==> controller 1 ==> controller 2 ==> isc this will not be achievable, as controller 1 and controller 2 might be media-controller configurable, and will not propagate the formats down to the sensor. After discussions with the media maintainers, the decision is to move Atmel ISC to staging as-is, to keep the Kconfig symbols and the users to the driver in staging. Thus, all the existing users of the non media-controller paradigm will continue to be happy and use the old config way. The new driver was added in the media subsystem with a different symbol, with the conversion to media controller done, and new users of the driver will be able to use all the new features. This patch is merely a file move to staging, not affecting any of the users. The exported symbols had to be renamed to atmel_* to avoid duplication with the new Microchip ISC driver. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 4 +- drivers/media/platform/atmel/Kconfig | 36 ----------------- drivers/media/platform/atmel/Makefile | 6 --- drivers/staging/media/Kconfig | 1 + drivers/staging/media/Makefile | 1 + drivers/staging/media/deprecated/atmel/Kconfig | 47 ++++++++++++++++++++++ drivers/staging/media/deprecated/atmel/Makefile | 8 ++++ drivers/staging/media/deprecated/atmel/TODO | 34 ++++++++++++++++ .../media/deprecated}/atmel/atmel-isc-base.c | 20 ++++----- .../media/deprecated}/atmel/atmel-isc-clk.c | 8 ++-- .../media/deprecated}/atmel/atmel-isc-regs.h | 0 .../media/deprecated}/atmel/atmel-isc.h | 16 ++++---- .../media/deprecated}/atmel/atmel-sama5d2-isc.c | 18 ++++----- .../media/deprecated}/atmel/atmel-sama7g5-isc.c | 18 ++++----- 14 files changed, 133 insertions(+), 84 deletions(-) commit 8a8f9cedcb36c6c707f1854e51e23fd0208b4687 Author: Eugen Hristev Date: Mon Nov 7 14:18:17 2022 +0000 media: microchip: microchip-isc: move media_pipeline_* to (un)prepare cb Move the media_pipeline_start/stop calls from start/stop streaming to the new prepare_streaming and unprepare_streaming callbacks. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/platform/microchip/microchip-isc-base.c | 27 ++++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 78ba0d79b7c854f0e8c2d25b5e8d5ee25374a57e Author: Eugen Hristev Date: Mon Nov 7 14:18:16 2022 +0000 media: microchip: microchip-isc: implement media controller As a top MC video driver, the microchip-isc should not propagate the format to the subdevice, it should rather check at start_streaming() time if the subdev is properly configured with a compatible format. Removed the whole format finding logic, and reworked the format verification at start_streaming time, such that the ISC will return an error if the subdevice is not properly configured. To achieve this, media_pipeline_start is called and a link_validate callback is created to check the formats. With this being done, the module parameter 'sensor_preferred' makes no sense anymore. The ISC should not decide which format the sensor is using. The ISC should only cope with the situation and inform userspace if the streaming is possible in the current configuration. The redesign of the format propagation has also risen the question of the enumfmt callback. If enumfmt is called with an mbus_code, the enumfmt handler should only return the formats that are supported for this mbus_code. Otherwise, the enumfmt will report all the formats that the ISC could output. With this rework, the dynamic list of user formats is removed. It makes no more sense to identify at complete time which formats the sensor could emit, and add those into a separate dynamic list. The ISC will start with a simple preconfigured default format, and at link validate time, decide whether it can use the format that is configured on the sink or not. >From now on, the driver also advertises the IO_MC capability. Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/microchip/Kconfig | 2 +- .../media/platform/microchip/microchip-isc-base.c | 416 +++++++++------------ .../platform/microchip/microchip-isc-scaler.c | 5 + drivers/media/platform/microchip/microchip-isc.h | 13 +- .../platform/microchip/microchip-sama5d2-isc.c | 20 + .../platform/microchip/microchip-sama7g5-isc.c | 20 + 6 files changed, 239 insertions(+), 237 deletions(-) commit 920b2665f39253c484973baeebd0da8093cc3d7b Author: Eugen Hristev Date: Mon Nov 7 14:18:15 2022 +0000 media: microchip: microchip-isc: prepare for media controller support Prepare the support for media-controller. This means that the capabilities of the driver have changed and now it's capable of media controller operations. The driver will register its media device, and add the video entity to this media device. The subdevices are registered to the same media device. The ISC will have a base entity which is auto-detected as microchip_isc_base. It will also register a subdevice that allows cropping of the incoming frame to the maximum frame size supported by the ISC. The ISC will create a link between the subdevice that is asynchronously registered and the microchip_isc_scaler entity. Then, the microchip_isc_scaler and microchip_isc_base are connected through another link. This patch does not change the previous capability of the driver, the fact that the format is still being propagated from the top video node down to the sensor. Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/microchip/Makefile | 2 +- .../media/platform/microchip/microchip-isc-base.c | 72 +++++- .../platform/microchip/microchip-isc-scaler.c | 262 +++++++++++++++++++++ drivers/media/platform/microchip/microchip-isc.h | 37 +++ .../platform/microchip/microchip-sama5d2-isc.c | 12 +- .../platform/microchip/microchip-sama7g5-isc.c | 12 +- 6 files changed, 391 insertions(+), 6 deletions(-) commit 91b4e487b0c6b83064ad57b7a3a8d38c3245f020 Author: Eugen Hristev Date: Mon Nov 7 14:18:14 2022 +0000 media: microchip: add ISC driver as Microchip ISC The Atmel ISC driver will be moved to staging to support old users that are not using the media controller paradigm. The ISC driver was converted to media controller in the public patch series: https://lore.kernel.org/lkml/20220503095127.48710-1-eugen.hristev@microchip.com/T/#m2c320fa8153c01379a1c35b1d90a00903949513a However the conversion cannot be done directly as it would affect existing users by breaking the old way of configuration for sama5d2 platforms. After discussions with the media maintainers, the decision is to move Atmel ISC to staging as-is, to keep the Kconfig symbols and the users to the driver in staging. Thus, all the existing users of the non media-controller paradigm will continue to be happy and use the old config way. The converted driver would support both sama5d2 and sama7g5 platforms with media controller paradigm, but it requires userspace configuration of the pipeline for all the pipeline modules. In a simple configuration sensor ==> isc , the old isc driver used to call subdev s_fmt and control the sensor directly. This was achieved by having a lot of code inside the driver that was querying the subdev at probe time and made a list of formats which are usable. Basically the user had nothing to configure, as the isc would handle everything at the top level. This was an easy way to capture, but also came with the drawback of lack of flexibility. In a more complicated pipeline sensor ==> controller 1 ==> controller 2 ==> isc this would not be achievable, as controller 1 and controller 2 might be media-controller configurable, and will not propagate the formats down to the sensor. The new driver Microchip ISC would solve all these problems and exposes pads entities and links to userspace. For the ease of tracking, the patches that convert to media controller come on top of this patch that simply readds the driver to the new location under the new Kconfig symbols. To differentiate between the old driver and the new driver, I have renamed the new driver to Microchip ISC, renaming the Kconfig symbols as well, and all the mentions inside the driver. The only thing that remains common is the file include/linux/atmel-isc-media.h which is the ABI for the v4l2 custom controls that the ISC exposes. This file is used by both driver, so I kept it as-is. To further avoid confusion all files have been renamed and all functions named isc_* as well. The exported symbols have been renamed with added microchip_ prefix, to avoid symbol duplication with the old driver, and to avoid confusion. Other than that, I have fixed small checkpatch issues when readding the driver. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 2 + drivers/media/platform/microchip/Kconfig | 42 + drivers/media/platform/microchip/Makefile | 6 + .../media/platform/microchip/microchip-isc-base.c | 2011 ++++++++++++++++++++ .../media/platform/microchip/microchip-isc-clk.c | 311 +++ .../media/platform/microchip/microchip-isc-regs.h | 413 ++++ drivers/media/platform/microchip/microchip-isc.h | 362 ++++ .../platform/microchip/microchip-sama5d2-isc.c | 653 +++++++ .../platform/microchip/microchip-sama7g5-isc.c | 616 ++++++ 9 files changed, 4416 insertions(+) commit 37dcaf1ed0fcc71e1f9a656440a6e459958701cd Author: Eugen Hristev Date: Mon Nov 7 14:18:13 2022 +0000 media: atmel: move microchip_csi2dc to dedicated microchip platform The Atmel ISC will be moved to staging thus the atmel platform will only have the ISI driver. The new media-controller converted ISC driver will be placed inside a dedicated microchip platform directory. It is then natural to have the microchip-csi2dc moved to this new platform directory. The next step is to add the Microchip ISC driver to the new platform directory and reside together with the Microchip CSI2DC driver. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 2 +- drivers/media/platform/Kconfig | 1 + drivers/media/platform/Makefile | 1 + drivers/media/platform/atmel/Kconfig | 15 --------------- drivers/media/platform/atmel/Makefile | 1 - drivers/media/platform/microchip/Kconfig | 19 +++++++++++++++++++ drivers/media/platform/microchip/Makefile | 3 +++ .../platform/{atmel => microchip}/microchip-csi2dc.c | 0 8 files changed, 25 insertions(+), 17 deletions(-) commit c4cd4c8bd72af0c159cd527ecedf6a339fba281e Author: Hans Verkuil Date: Wed Jun 22 10:31:45 2022 +0100 media: vb2/au0828: move the v4l_vb2q_enable_media_source to the au0828 driver With the new prepare_streaming op it is possible to move the ugly v4l_vb2q_enable_media_source() call in vb2_core_streamon to the driver. It was called incorrectly in vb2 as well: it was only called if sufficient buffers were queued at STREAMON time, but not if more buffers were queued later. This was not an issue with the au0828 driver since it never set min_buffers_needed. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/videobuf2-core.c | 3 --- drivers/media/usb/au0828/au0828-vbi.c | 2 ++ drivers/media/usb/au0828/au0828-video.c | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) commit a10b215325740376ed551814a37d1f8e9d6b1ced Author: Hans Verkuil Date: Wed Jun 22 10:31:44 2022 +0100 media: vb2: add (un)prepare_streaming queue ops When userspace called VIDIOC_STREAMON, then you want to claim any streaming resources needed and validate the video pipeline. Waiting for start_streaming to be called is too late, since that can be postponed until the required minimum of buffers is queued. So add a prepare_streaming op (optional) that can be used for that purpose, and a matching unprepare_streaming op (optional) that can release any claimed resources. The unprepare_streaming op is called when VIDIOC_STREAMOFF is called and q->streaming is 1, or when the filehandle is closed while q->streaming is 1. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/videobuf2-core.c | 25 +++++++++++++++++++++---- include/media/videobuf2-core.h | 14 ++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) commit e9305a003ffeb2adfdd860a659fc65ec82320acc Author: Hans Verkuil Date: Tue Sep 27 09:43:11 2022 +0100 media: admin-guide: cec.rst Document administration details about CEC devices. This was formerly documented in a cec-status.txt I kept on my website, but this really belongs here as an admin guide. Updated the original cec-status.txt, and converted it to .rst. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/media/cec-drivers.rst | 10 - Documentation/admin-guide/media/cec.rst | 369 +++++++++++++++++++++ Documentation/admin-guide/media/index.rst | 3 +- Documentation/admin-guide/media/pulse8-cec.rst | 13 - .../userspace-api/media/cec/cec-pin-error-inj.rst | 2 + MAINTAINERS | 1 - 6 files changed, 373 insertions(+), 25 deletions(-) commit b15a92f054070f47aaa2658bb48cc1780b2e1481 Author: Ian Cowan Date: Sun Nov 13 01:47:03 2022 +0000 media: staging: media: sunxi: cedrus: make vb2_ops struct definition const This cleans up a checkstyle warning where the vb2_ops struct definitions should be const. Signed-off-by: Ian Cowan Reviewed-by: Samuel Holland Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b8c5e4bec981a95cf8d7375286710f0e95b49cd Author: Yuan Can Date: Fri Nov 11 06:09:26 2022 +0000 media: amphion: Fix error handling in vpu_driver_init() A problem about modprobe amphion-vpu failed is triggered with the following log given: [ 2208.634841] Error: Driver 'amphion-vpu' is already registered, aborting... modprobe: ERROR: could not insert 'amphion_vpu': Device or resource busy The reason is that vpu_driver_init() returns vpu_core_driver_init() directly without checking its return value, if vpu_core_driver_init() failed, it returns without unregister amphion_vpu_driver, resulting the amphion-vpu can never be installed later. A simple call graph is shown as below: vpu_driver_init() platform_driver_register() # register amphion_vpu_driver vpu_core_driver_init() platform_driver_register() driver_register() bus_add_driver() dev = kzalloc(...) # OOM happened # return without unregister amphion_vpu_driver Fix by unregister amphion_vpu_driver when vpu_core_driver_init() returns error. Fixes: b50a64fc54af ("media: amphion: add amphion vpu device driver") Signed-off-by: Yuan Can Reviewed-by: ming_qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vpu_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 48ecee615983cf4b191a53b32770fb550cd63b68 Author: Yuan Can Date: Fri Nov 11 06:08:53 2022 +0000 media: platform: exynos4-is: Fix error handling in fimc_md_init() A problem about modprobe s5p_fimc failed is triggered with the following log given: [ 272.075275] Error: Driver 'exynos4-fimc' is already registered, aborting... modprobe: ERROR: could not insert 's5p_fimc': Device or resource busy The reason is that fimc_md_init() returns platform_driver_register() directly without checking its return value, if platform_driver_register() failed, it returns without unregister fimc_driver, resulting the s5p_fimc can never be installed later. A simple call graph is shown as below: fimc_md_init() fimc_register_driver() # register fimc_driver platform_driver_register() platform_driver_register() driver_register() bus_add_driver() dev = kzalloc(...) # OOM happened # return without unregister fimc_driver Fix by unregister fimc_driver when platform_driver_register() returns error. Fixes: d3953223b090 ("[media] s5p-fimc: Add the media device driver") Signed-off-by: Yuan Can Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/samsung/exynos4-is/fimc-core.c | 2 +- drivers/media/platform/samsung/exynos4-is/media-dev.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit ba7c0d344658eb3552c183ef8298c98e0e4ac5b7 Author: Yang Yingliang Date: Thu Nov 10 15:05:59 2022 +0000 media: mtk-jpegdec: add missing destroy_workqueue() destroy_workqueue() needs be called to when driver is unloading, fix it by using devm_add_action_or_reset() to make workqueuedevice-managed. Fixes: dedc21500334 ("media: mtk-jpegdec: add jpeg decode worker interface") Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit def4d25856b2fa41c1c1390f1e8d1b027166f5e9 Author: Jammy Huang Date: Thu Nov 10 09:56:11 2022 +0000 media: aspeed: Use v4l2_dbg to replace v4l2_warn to avoid log spam If the host is powered off, there will be many warning log. To avoid the log spam in this condition, replace v4l2_warn with v4l2_dbg. Signed-off-by: Jammy Huang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed/aspeed-video.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 262ad4f3d1f9e008c9ba38f4f3424ea71b79d6a0 Author: Yang Yingliang Date: Thu Nov 10 08:24:23 2022 +0000 media: solo6x10: fix possible memory leak in solo_sysfs_init() If device_register() returns error in solo_sysfs_init(), the name allocated by dev_set_name() need be freed. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanup(). Fixes: dcae5dacbce5 ("[media] solo6x10: sync to latest code from Bluecherry's git repo") Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/solo6x10/solo6x10-core.c | 1 + 1 file changed, 1 insertion(+) commit f9e02e9cfb9290a5ff8896cc08b6cbb759d55fcc Author: Jernej Skrabec Date: Wed Nov 9 18:23:09 2022 +0000 media: cedrus: Relax HEVC SPS restrictions Testing reference video TSUNEQBD_A_MAIN10_Technicolor_2 has show that Cedrus is capable of decoding frames with different chroma and luma bit depths. Relax restrictions so only highest depth is checked. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 65429ba825723c8670d5acc672f68b325eb80dff Author: Jernej Skrabec Date: Wed Nov 9 18:23:08 2022 +0000 media: cedrus: h265: Support decoding 10-bit frames 10-bit frames needs extra buffer space when 8-bit capture format is used. Use previously prepared infrastructure to adjust buffer size. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus.c | 21 ++++++++++++++ drivers/staging/media/sunxi/cedrus/cedrus.h | 1 + drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 35 ++++++++++++++++++++++++ drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 16 +++++++++++ 4 files changed, 73 insertions(+) commit 3d273e81f9102a7ac9b9208c3c0d3998feadc98f Author: Jernej Skrabec Date: Wed Nov 9 18:23:07 2022 +0000 media: cedrus: Adjust buffer size based on codec In some cases decoding engine needs extra space in capture buffers. This is the case for decoding 10-bit HEVC frames into 8-bit capture format. This commit only adds infrastructure for such cases. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus.h | 2 ++ drivers/staging/media/sunxi/cedrus/cedrus_video.c | 4 ++++ 2 files changed, 6 insertions(+) commit a7fa915634e6161e4ccbca819ad3d2bb614e5811 Author: Aakarsh Jain Date: Wed Nov 9 03:53:48 2022 +0000 media: s5p-mfc: Optimisation of code to remove error message Already error number provision is present for block failing, while requesting for DMA consistent memory allocation. So removing error message line from the block as recommended by scripts/checkpatch.pl. Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 1 - 1 file changed, 1 deletion(-) commit 203ef345f220849c5072cab3595a730b95f36e9f Author: Aakarsh Jain Date: Wed Nov 9 03:53:47 2022 +0000 media: s5p-mfc:fix usage of Block comment alignment Fix usage of block comment alignment in drivers/media/platform/samsung/ s5p-mfc/s5p_mfc.c as recommended by scripts/checkpatch.pl. Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 49 ++++++++++++++++-------- 1 file changed, 32 insertions(+), 17 deletions(-) commit 40928aea30968fb2374dff901eda121edb1bc3f2 Author: Aakarsh Jain Date: Wed Nov 9 03:53:46 2022 +0000 media: s5p-mfc: fix usage of symbolic permissions to octal Change symbolic permissions to octal equivalent as recommended by scripts/checkpatch.pl in drivers/media/platform/samsung/ s5p-mfc/s5p_mfc.c. Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 675807dee3e9e3b17ebe140085b3d78b7adc1a31 Author: Chen Zhongjin Date: Tue Nov 8 07:06:30 2022 +0000 media: vidtv: Fix use-after-free in vidtv_bridge_dvb_init() KASAN reports a use-after-free: BUG: KASAN: use-after-free in dvb_dmxdev_release+0x4d5/0x5d0 [dvb_core] Call Trace: ... dvb_dmxdev_release+0x4d5/0x5d0 [dvb_core] vidtv_bridge_probe+0x7bf/0xa40 [dvb_vidtv_bridge] platform_probe+0xb6/0x170 ... Allocated by task 1238: ... dvb_register_device+0x1a7/0xa70 [dvb_core] dvb_dmxdev_init+0x2af/0x4a0 [dvb_core] vidtv_bridge_probe+0x766/0xa40 [dvb_vidtv_bridge] ... Freed by task 1238: dvb_register_device+0x6d2/0xa70 [dvb_core] dvb_dmxdev_init+0x2af/0x4a0 [dvb_core] vidtv_bridge_probe+0x766/0xa40 [dvb_vidtv_bridge] ... It is because the error handling in vidtv_bridge_dvb_init() is wrong. First, vidtv_bridge_dmx(dev)_init() will clean themselves when fail, but goto fail_dmx(_dev): calls release functions again, which causes use-after-free. Also, in fail_fe, fail_tuner_probe and fail_demod_probe, j = i will cause out-of-bound when i finished its loop (i == NUM_FE). And the loop releasing is wrong, although now NUM_FE is 1 so it won't cause problem. Fix this by correctly releasing everything. Fixes: f90cf6079bf6 ("media: vidtv: add a bridge driver") Signed-off-by: Chen Zhongjin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/test-drivers/vidtv/vidtv_bridge.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 645e71337e1c31795f48f18dd62202a001101a85 Author: Deepak R Varma Date: Mon Nov 7 19:11:21 2022 +0000 media: staging: media: meson: vdec: use min() for comparison and assignment Use of standard min() helper macro is preferred over using ternary operator for logical evaluation and value assignment. This issue is identified by coccicheck using the minmax.cocci file. Signed-off-by: Deepak R Varma Reviewed-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/meson/vdec/codec_vp9.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0c078e310b6d16b9b9489bbc7bc1476430d19a7c Author: Daniel Almeida Date: Sat Nov 5 13:58:42 2022 +0000 media: visl: add virtual stateless decoder driver A virtual stateless device for stateless uAPI development purposes. This tool's objective is to help the development and testing of userspace applications that use the V4L2 stateless API to decode media. A userspace implementation can use visl to run a decoding loop even when no hardware is available or when the kernel uAPI for the codec has not been upstreamed yet. This can reveal bugs at an early stage. This driver can also trace the contents of the V4L2 controls submitted to it. It can also dump the contents of the vb2 buffers through a debugfs interface. This is in many ways similar to the tracing infrastructure available for other popular encode/decode APIs out there and can help develop a userspace application by using another (working) one as a reference. Note that no actual decoding of video frames is performed by visl. The V4L2 test pattern generator is used to write various debug information to the capture buffers instead. Signed-off-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/media/v4l-drivers.rst | 1 + Documentation/admin-guide/media/visl.rst | 175 +++++ MAINTAINERS | 6 + drivers/media/test-drivers/Kconfig | 1 + drivers/media/test-drivers/Makefile | 1 + drivers/media/test-drivers/visl/Kconfig | 29 + drivers/media/test-drivers/visl/Makefile | 8 + drivers/media/test-drivers/visl/visl-core.c | 541 +++++++++++++++ drivers/media/test-drivers/visl/visl-debugfs.c | 112 +++ drivers/media/test-drivers/visl/visl-debugfs.h | 40 ++ drivers/media/test-drivers/visl/visl-dec.c | 499 ++++++++++++++ drivers/media/test-drivers/visl/visl-dec.h | 67 ++ drivers/media/test-drivers/visl/visl-trace-fwht.h | 66 ++ drivers/media/test-drivers/visl/visl-trace-h264.h | 349 ++++++++++ drivers/media/test-drivers/visl/visl-trace-hevc.h | 405 +++++++++++ drivers/media/test-drivers/visl/visl-trace-mpeg2.h | 99 +++ .../media/test-drivers/visl/visl-trace-points.c | 10 + drivers/media/test-drivers/visl/visl-trace-vp8.h | 156 +++++ drivers/media/test-drivers/visl/visl-trace-vp9.h | 292 ++++++++ drivers/media/test-drivers/visl/visl-video.c | 767 +++++++++++++++++++++ drivers/media/test-drivers/visl/visl-video.h | 27 + drivers/media/test-drivers/visl/visl.h | 176 +++++ 22 files changed, 3827 insertions(+) commit ae2caf391fec8c2d449518ef4dabd36a32fd5ded Author: Ming Qian Date: Tue Nov 1 08:04:53 2022 +0000 media: amphion: apply vb2_queue_error instead of setting manually vb2_queue_error is help to set the error of vb2_queue, don't need to set it manually 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 drivers/media/platform/amphion/vpu_v4l2.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit e1b558cd9a735f5dc283ecdb5593ff53d398c9c6 Author: Ming Qian Date: Tue Nov 1 08:04:20 2022 +0000 media: amphion: add lock around vdec_g_fmt the capture format may be changed when sequence header is parsed, it may be read and write in the same time, add lock around vdec_g_fmt to synchronize it Fixes: 6de8d628df6e ("media: amphion: add v4l2 m2m vpu decoder stateful driver") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/amphion/vdec.c | 2 ++ 1 file changed, 2 insertions(+) commit f74d3f326d1d5b8951ce263c59a121ecfa65e7c0 Author: Chen Zhongjin Date: Thu Nov 10 07:26:33 2022 +0000 media: vimc: Fix wrong function called when vimc_init() fails In vimc_init(), when platform_driver_register(&vimc_pdrv) fails, platform_driver_unregister(&vimc_pdrv) is wrongly called rather than platform_device_unregister(&vimc_pdev), which causes kernel warning: Unexpected driver unregister! WARNING: CPU: 1 PID: 14517 at drivers/base/driver.c:270 driver_unregister+0x8f/0xb0 RIP: 0010:driver_unregister+0x8f/0xb0 Call Trace: vimc_init+0x7d/0x1000 [vimc] do_one_initcall+0xd0/0x4e0 do_init_module+0x1cf/0x6b0 load_module+0x65c2/0x7820 Fixes: 4a29b7090749 ("[media] vimc: Subdevices as modules") Signed-off-by: Chen Zhongjin Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/test-drivers/vimc/vimc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 131823c4341feefa8cdc8fca024856e5fb4cfd74 Author: Paul Kocialkowski Date: Thu Nov 3 16:37:17 2022 +0000 media: sun6i-csi: Add support for hooking to the isp devices In order to use the isp and csi together, both devices need to be parented to the same v4l2 and media devices. We use the isp as top-level device and let the csi code hook to its v4l2 and media devices when async subdev registration takes place. As a result v4l2/media device setup is only called when the ISP is missing and the capture device is registered after the devices are hooked. The bridge subdev and its notifier are registered without any device when the ISP is available. Top-level pointers for the devices are introduced to either redirect to the hooked ones (isp available) or the registered ones (isp missing). Also keep track of whether the capture node was setup or not to avoid cleaning up resources when it wasn't. Signed-off-by: Paul Kocialkowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 45 ++++++++++++++++++---- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 7 ++++ .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 32 +++++++++++++-- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 19 +++++++-- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.h | 1 + 5 files changed, 89 insertions(+), 15 deletions(-) commit 0fbbb09c024dc65ac2616967caf09d48778c20b4 Author: Paul Kocialkowski Date: Thu Nov 3 16:37:16 2022 +0000 media: sun6i-csi: Detect the availability of the ISP Add a helper to detect whether the ISP is available and connected and store the indication in the driver-specific device structure. Signed-off-by: Paul Kocialkowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 34 ++++++++++++++++++++++ drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 3 ++ 2 files changed, 37 insertions(+) commit 24e6c88a07670e301758d3b131e6f1f2b093a8d1 Author: Paul Kocialkowski Date: Thu Nov 3 16:37:15 2022 +0000 media: MAINTAINERS: Add entry for the Allwinner A31 ISP driver Add myself as maintainer of the Allwinner A31 ISP media driver. Signed-off-by: Paul Kocialkowski Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit e3185e1d7c14ebf0288ed2f71fc07e9e2a812c33 Author: Paul Kocialkowski Date: Thu Nov 3 16:37:14 2022 +0000 media: staging: media: Add support for the Allwinner A31 ISP Some Allwinner platforms come with an Image Signal Processor, which supports various features in order to enhance and transform data received by image sensors into good-looking pictures. In most cases, the data is raw bayer, which gets internally converted to RGB and finally YUV, which is what the hardware produces. This driver supports ISPs that are similar to the A31 ISP, which was the first standalone ISP found in Allwinner platforms. Simpler ISP blocks were found in the A10 and A20, where they are tied to a CSI controller. Newer generations of Allwinner SoCs (starting with the H6, H616, etc) come with a new camera subsystem and revised ISP. Even though these previous and next-generation ISPs are somewhat similar to the A31 ISP, they have enough significant differences to be out of the scope of this driver. While the ISP supports many features, including 3A and many enhancement blocks, this implementation is limited to the following: - V3s (V3/S3) platform support; - Bayer media bus formats as input; - Semi-planar YUV (NV12/NV21) as output; - Debayering with per-component gain and offset configuration; - 2D noise filtering with configurable coefficients. Since many features are missing from the associated uAPI, the driver is aimed to integrate staging until all features are properly described. On the technical side, it uses the v4l2 and media controller APIs, with a video node for capture, a processor subdev and a video node for parameters submission. A specific uAPI structure and associated v4l2 meta format are used to configure parameters of the supported modules. One particular thing about the hardware is that configuration for module registers needs to be stored in a DMA buffer and gets copied to actual registers by the hardware at the next vsync, when instructed by a flag. This is handled by the "state" mechanism in the driver. Signed-off-by: Paul Kocialkowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/Kconfig | 1 + drivers/staging/media/sunxi/Makefile | 1 + drivers/staging/media/sunxi/sun6i-isp/Kconfig | 15 + drivers/staging/media/sunxi/sun6i-isp/Makefile | 4 + drivers/staging/media/sunxi/sun6i-isp/TODO.txt | 6 + drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c | 555 +++++++++++++++ drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.h | 90 +++ .../media/sunxi/sun6i-isp/sun6i_isp_capture.c | 742 +++++++++++++++++++++ .../media/sunxi/sun6i-isp/sun6i_isp_capture.h | 78 +++ .../media/sunxi/sun6i-isp/sun6i_isp_params.c | 566 ++++++++++++++++ .../media/sunxi/sun6i-isp/sun6i_isp_params.h | 52 ++ .../staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c | 577 ++++++++++++++++ .../staging/media/sunxi/sun6i-isp/sun6i_isp_proc.h | 66 ++ .../staging/media/sunxi/sun6i-isp/sun6i_isp_reg.h | 275 ++++++++ .../media/sunxi/sun6i-isp/uapi/sun6i-isp-config.h | 43 ++ 15 files changed, 3071 insertions(+) commit 4c6f0bc17783c00d5ba412f2dc1c982547ef4337 Author: Paul Kocialkowski Date: Thu Nov 3 16:37:13 2022 +0000 media: dt-bindings: media: sun6i-a31-csi: Add internal output port to the ISP Some Allwinner devices come with an Image Signal Processor (ISP) that allows processing camera data to produce good-looking images, especially from raw bayer representations. The ISP does not have a dedicated capture path: it is fed directly by one of the CSI controllers, which can be selected at run-time. Represent this possibility as a graph connection between the CSI controller and the ISP in the device-tree bindings. Signed-off-by: Paul Kocialkowski Reviewed-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit da950c03beb365bf33daf237bc3ad4458a861a0d Author: Paul Kocialkowski Date: Thu Nov 3 16:37:12 2022 +0000 media: dt-bindings: media: Add Allwinner A31 ISP bindings documentation This introduces YAML bindings documentation for the Allwinner A31 Image Signal Processor (ISP). Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../bindings/media/allwinner,sun6i-a31-isp.yaml | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) commit d42d8c902ca970c653d339082ebfb1655324c0f0 Author: Paul Kocialkowski Date: Thu Nov 3 16:31:13 2022 +0000 media: MAINTAINERS: Add myself as sun6i-csi maintainer and rename/move entry Given the substantial rework of the driver that I carried out and the knowledge acquired about the hardware along the way, make myself a maintainer of the sun6i-csi driver. Also rename and move the entry while at it since the driver is not specific to the V3s. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit c1a022366feb066fdd21e4cd26395aa7e898c498 Author: Paul Kocialkowski Date: Thu Nov 3 16:31:12 2022 +0000 media: sun6i-csi: Request a shared interrupt Request our interrupt shared since it is typically shared with the isp block. The interrupt routine looks good to go for shared irq. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4656d8ab4bd9e0867defdceec614ac5ef2875c5e Author: Paul Kocialkowski Date: Thu Nov 3 16:31:11 2022 +0000 media: sun6i-csi: Add extra checks to the interrupt routine Check against the enabled bits and make sure capture is running before serving an interrupt, to add extra safety in the process. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5d34d90fff89a450423b0f1acbafa68c1e60344d Author: Paul Kocialkowski Date: Thu Nov 3 16:31:10 2022 +0000 media: sun6i-csi: Only configure capture when streaming Add a streaming element to the capture state structure to know if the capture device is used or not. Only configure things related to output when streaming, including the output format, irq, state (dma buffer) and window configuration registers. After this change, it becomes possible to use the bridge without the capture device, which will be the case in the isp media flow. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 50 ++++++++++++++-------- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 11 ++++- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.h | 1 + 3 files changed, 41 insertions(+), 21 deletions(-) commit a617f33d8eceb8287e8797aff7407cff0154f3dd Author: Paul Kocialkowski Date: Thu Nov 3 16:31:09 2022 +0000 media: sun6i-csi: Add support for MIPI CSI-2 to the bridge code Introduce MIPI CSI-2 support to the bridge with a new port, source and hardware configuration helper. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 1 + .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 46 ++++++++++++++++++++-- .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.h | 1 + 3 files changed, 44 insertions(+), 4 deletions(-) commit dc85e4cdbe1d21879994dfbf2def64c95b3b79cf Author: Paul Kocialkowski Date: Thu Nov 3 16:31:08 2022 +0000 media: sun6i-csi: Cleanup headers and includes, update copyright lines Cleanup includes, update copyright lines and some cosmetic changes. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 15 ++++++--------- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 10 +++++----- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 4 ++-- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.h | 22 ++++++++++++++++------ .../media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h | 9 +++++---- 5 files changed, 34 insertions(+), 26 deletions(-) commit 28bfb4182f3b98ca58043547468acdd2cc14559b Author: Paul Kocialkowski Date: Thu Nov 3 16:31:07 2022 +0000 media: sun6i-csi: Rename the capture video device to sun6i-csi-capture Now that the driver is properly split between bridge and capture, rename the video device to highlight its role and be in line with the bridge entity naming. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 3 ++- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit c55d98138f5cc489cb0f846cd4d7c7f1a640b2a7 Author: Paul Kocialkowski Date: Thu Nov 3 16:31:06 2022 +0000 media: sun6i-csi: Move hardware control to the bridge In order to support the isp workflow, we need to be able to configure the hardware from the bridge when the capture device is not used. As a result, move all hardware configuration calls from capture to the bridge. Only the window configuration part (which is specific to using capture) remains there. This effectively opens the way for hooking the bridge to the isp in the future. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 227 +++++++++++++++++++ .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 249 +-------------------- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.h | 3 + 3 files changed, 237 insertions(+), 242 deletions(-) commit e77c8f6f3bf5eda70e3e3de3f6f6020f3d880cc0 Author: Paul Kocialkowski Date: Thu Nov 3 16:31:05 2022 +0000 media: sun6i-csi: Get bridge subdev directly in capture stream ops The remote subdev connected to the capture video device is always our bridge, so get the bridge subdev directly instead of using a dedicated helper (which is removed by this commit). Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 30 +++------------------- 1 file changed, 3 insertions(+), 27 deletions(-) commit 1fd07a8040f9fb1d34fe790d72cb1e275e558ef4 Author: Paul Kocialkowski Date: Thu Nov 3 16:31:03 2022 +0000 media: sun6i-csi: Implement capture link validation with logic Rework the capture link validate implementation with actual logic that reflects the possibilities of the device instead of the combinatory helper functions, using the added match list helper sun6i_csi_is_format_supported() when needed. Remove the previous dedicated helper. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 120 ----------- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 11 - .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 223 +++++++++++++++++---- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.h | 5 + 4 files changed, 184 insertions(+), 175 deletions(-) commit 9ff5d37cebb0698627b959d032e86d49f80f0de1 Author: Paul Kocialkowski Date: Thu Nov 3 16:31:02 2022 +0000 media: sun6i-csi: Configure registers from format tables Switch over to using the static format table descriptions to configure registers. Rework the hardware configuration helpers to leverage information from the format structures and benefit from their logic. Remove the previous dedicated helpers. The intention is to make the interaction between the different formats and the hardware side more visible and clear. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 210 ++++----------------- .../media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h | 55 ------ 2 files changed, 36 insertions(+), 229 deletions(-) commit 53fd3926f5627c903c8a49fac393741291211cf7 Author: Paul Kocialkowski Date: Thu Nov 3 16:31:01 2022 +0000 media: sun6i-csi: Introduce capture format structure, list and helper Add a table that describes each pixel format and associated output register configuration with necessary tweaks. It will be used later on to configure the hardware. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 199 +++++++++++++++++---- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.h | 12 ++ 2 files changed, 175 insertions(+), 36 deletions(-) commit 21818a29058e685165a610d9dbeacf6b0ca25432 Author: Paul Kocialkowski Date: Thu Nov 3 16:31:00 2022 +0000 media: sun6i-csi: Introduce bridge format structure, list and helper Introduce a more informative format list for the bridge, with information about how to configure the input. This separation will later be useful when using the bridge standalone (without capture) for the isp workflow. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 169 ++++++++++++++++----- .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.h | 12 ++ 2 files changed, 145 insertions(+), 36 deletions(-) commit 2ed385697bb20304c74db0a1833358ba6ec6c181 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:59 2022 +0000 media: sun6i-csi: Tidy capture configure code Some misc code cleanups and preparation for upcoming changes. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 105 +++++++++------------ 1 file changed, 46 insertions(+), 59 deletions(-) commit 83b1356bbc7dbe092f0948ceb730035a706e5cd4 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:58 2022 +0000 media: sun6i-csi: Get mbus code from bridge instead of storing it Another instance of removing a duplicated variable and using common helpers instead. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 18 +++++------------- .../media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h | 1 - 2 files changed, 5 insertions(+), 14 deletions(-) commit 90449f4269dea24604b24240e99273b9c7428127 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:57 2022 +0000 media: sun6i-csi: Add bridge dimensions and format helpers Introduce new helpers to ease getting information about the bridge. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 20 ++++++++++++++++++++ .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.h | 7 +++++++ 2 files changed, 27 insertions(+) commit eee684635d1c8581121b0e6128ca831aaaa41013 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:56 2022 +0000 media: sun6i-csi: Remove custom format helper and rework configure Remove the custom sun6i_csi_get_bpp helper in favor of common v4l2 infrastructure and rework the related window configuration code. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 49 --------------- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 70 +++++++++++----------- 2 files changed, 35 insertions(+), 84 deletions(-) commit c2aad4113187b218f6191734cdf283099b13cf18 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:55 2022 +0000 media: sun6i-csi: Rework capture format management with helper Remove the need for local copies of the v4l2 format and add a common helper to prepare a format compatible with the driver, using the relevant v4l2 helpers. Report a raw colorspace for bayer-encoded pixel formats instead of SRGB. Also cleanup the size bound defines while at it. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 122 ++++++++++----------- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.h | 5 + 2 files changed, 66 insertions(+), 61 deletions(-) commit b79dca9b3f076e399e0cb5ee02de2d579e804fa6 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:54 2022 +0000 media: sun6i-csi: Move register configuration to capture Continue moving things over to capture in tidy helpers. Also take the occasion to remove the config struct, which is unwelcome redundancy and use the capture helpers instead. The code is only adapted to reflect the removal of the config structure. No functional change intended. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 363 -------------------- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 27 -- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 364 ++++++++++++++++++++- 3 files changed, 356 insertions(+), 398 deletions(-) commit d0895e0f81731cc781a25e4f298c2af07f16e4cf Author: Paul Kocialkowski Date: Thu Nov 3 16:30:53 2022 +0000 media: sun6i-csi: Move power management to runtime pm in capture Let's just enable the module when we start using it (at stream on) and benefit from runtime pm instead of enabling it at first open. Also reorder the call to v4l2_pipeline_pm_get. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 24 ------------- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 9 ----- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 41 ++++++++++++---------- 3 files changed, 22 insertions(+), 52 deletions(-) commit 85469b9e6634cf64836568587c82ecba330bb38f Author: Paul Kocialkowski Date: Thu Nov 3 16:30:52 2022 +0000 media: sun6i-csi: Split stream sequences and irq code in capture Create minimal helpers that split the enable/disable flow, which will make it easier to move control over to the bridge later on. Generally speaking the goal is to move register configuration to the capture code and later split it with the bridge code. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 26 ---------- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 7 --- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 58 ++++++++++++++++++++-- 3 files changed, 55 insertions(+), 36 deletions(-) commit dc8b931ca9def4ea9a5d232f73c229774a9054c5 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:51 2022 +0000 media: sun6i-csi: Implement address configuration without indirection Instead of calculating the planar_offset at one point and using it later in a dedicated function, reimplement address configuration with v4l2 format info in the buffer_configure function. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 27 ------------------ drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 10 ------- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 32 +++++++++++++++++++++- 3 files changed, 31 insertions(+), 38 deletions(-) commit 0f6417f1c802bae43384e5b7933ccea1f6572b83 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:50 2022 +0000 media: sun6i-csi: Add dimensions and format helpers to capture Define and export useful helpers to access dimensions and pixel format. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 19 +++++++++++++++++++ .../platform/sunxi/sun6i-csi/sun6i_csi_capture.h | 5 +++++ 2 files changed, 24 insertions(+) commit b3a07d8e3e06c048a72caeff123dd5b409771f16 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:49 2022 +0000 media: sun6i-csi: Rework register definitions, invert misleading fields This cleans up the register definitions a bit, adds a prefix, remove masks. Registers are now fully defined, some additional fields were added when needed. New format definitions are added for future use. Some fields are wrongly defined (inverted) in Allwinner literature (e.g. field vs frame prefixes), which is quite misleading. They are now corrected to reflect their actual behavior. This should only be a cosmetic commit. No functional change intended. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 182 +++++++------ .../media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h | 296 ++++++++++++--------- 2 files changed, 266 insertions(+), 212 deletions(-) commit b86f6ea010f2922eed661773c9c41e2717402665 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:48 2022 +0000 media: sun6i-csi: Add capture state using vsync for page flip The current implementation requires up to 3 buffers to properly implement page flipping without losing frames: one is configured before the video stream is started, one just after that and page flipping is synchronized to the frame done interrupt. The comment in the code mentions that "CSI will lookup the next dma buffer for next frame before the current frame done IRQ triggered". Based on observations of the CSI unit behavior, it seems that the buffer DMA address is sampled when the frame scan begins (in addition to starting the stream), which corresponds to the vblank interrupt that hits just before the frame-done interrupt of the previous frame. As a result, the address configured at the frame done interrupt is not actually used for the next frame but for the one after that. This proposal changes the page flipping sync point to the vsync interrupt, which allows the DMA address to be sampled for the next frame instead and allows operating with only two buffers. In addition to the change in the sync point, the code is refactored to introduce a notion of state that clarifies tracking of the buffers with tidy functions. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 4 + drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 3 - .../platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 259 ++++++++++++--------- .../platform/sunxi/sun6i-csi/sun6i_csi_capture.h | 23 +- 4 files changed, 165 insertions(+), 124 deletions(-) commit e9201cb299f9aa37565dfbedecbdf6486659f1a5 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:47 2022 +0000 media: sun6i-csi: Rename sun6i_video to sun6i_csi_capture In an effort to distinguish between the core csi engine (to be represented as the bridge) and the dma engine (the capture video device), rename the video component to capture, with the appropriate prefix. No functional change intended. [Sakari Ailus: fix wrong variable issue (video -> capture) missed in patch] Signed-off-by: Paul Kocialkowski Reviewed-by: Maxime Ripard Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/Makefile | 2 +- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 6 +- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 4 +- .../{sun6i_video.c => sun6i_csi_capture.c} | 344 +++++++++++---------- .../{sun6i_video.h => sun6i_csi_capture.h} | 14 +- 5 files changed, 187 insertions(+), 183 deletions(-) commit 0d2b746b1bef73de62d2d311e594a7ffed4ca434 Author: Paul Kocialkowski Date: Thu Nov 3 16:30:46 2022 +0000 media: sun6i-csi: Add bridge v4l2 subdev with port management Introduce a bridge v4l2 subdev to prepare for separation between the processing part (bridge) and the dma engine, which is required to properly support ths isp workflow later on. Currently the bridge just manages fwnode mapping to media pads, using an async notifier (which was previously in the main code). The s_stream video op just forwards to the connected v4l2 subdev (sensor or MIPI CSI-2 bridge). The video capture device is now registered after the bridge and attaches to it with a media link. Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/Makefile | 2 +- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 157 ++----- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 10 +- .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 450 +++++++++++++++++++++ .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.h | 49 +++ .../media/platform/sunxi/sun6i-csi/sun6i_video.c | 19 + 6 files changed, 548 insertions(+), 139 deletions(-) commit 34ec724806a2c965b4c1cd9578b16144ba067d3f Author: Dave Stevenson Date: Fri Oct 28 17:09:02 2022 +0100 media: i2c: ov9282: Support event handlers As noted in the headers for V4L2_SUBDEV_FL_HAS_EVENTS, "controls can send events, thus drivers exposing controls should set this flag". This driver exposes controls, but didn't reflect that it could generate events. Correct this, and add the default event handler functions. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 43ac0cac18f41fdf39635e2bd0f8fadc361cdb2f Author: Dave Stevenson Date: Fri Oct 28 17:09:01 2022 +0100 media: i2c: ov9282: Add support for 8bit readout The sensor supports 8 or 10 bit readout modes, but the driver only supported 10 bit. Add 8 bit readout. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 95 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 78 insertions(+), 17 deletions(-) commit c84f43a8424a998d3280f3a7bf600c87e38de60a Author: Dave Stevenson Date: Fri Oct 28 17:09:00 2022 +0100 media: i2c: ov9282: Add support for 1280x800 and 640x400 modes Adds register settings for additional modes. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 103 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 1 deletion(-) commit 2cb730c666f3773c36510f05be9b8417bf77d3a9 Author: Dave Stevenson Date: Fri Oct 28 17:08:59 2022 +0100 media: i2c: ov9282: Add selection API calls for cropping info As required by libcamera, add the relevant cropping targets to report which portion of the sensor is being read out in any mode. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit a387834c16ec0264cc0503f71f3d5a5d7de02478 Author: Dave Stevenson Date: Fri Oct 28 17:08:58 2022 +0100 media: i2c: ov9282: Make V4L2_CID_HBLANK r/w There's no reason why HBLANK has to be read-only as it only changes the TIMING_HTS register in the sensor. Remove the READ_ONLY flag, and add the relevant handling for it. The minimum value also varies based on whether continuous clock mode is being used or not, so allow hblank_min to depend on that. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit af2775dcba489cb5bdde898c7b0631406ae22613 Author: Dave Stevenson Date: Fri Oct 28 17:08:57 2022 +0100 media: i2c: ov9282: Add HFLIP and VFLIP support Adds support for V4L2_CID_HFLIP and V4L2_CID_VFLIP to allow flipping the image. The driver previously enabled H & V flips in the register table, therefore the controls default to the same settings to avoid changing the behaviour. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 52 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) commit ed80071b95b62a86441df15bafc6f079b390ca2c Author: Dave Stevenson Date: Fri Oct 28 17:08:56 2022 +0100 media: i2c: ov9282: Action CID_VBLANK when set. Programming the sensor with TIMING_VTS (aka LPFR) was done when triggered by a change in exposure or gain, but not when V4L2_CID_VBLANK was changed. Dynamic frame rate changes could therefore not be achieved. Separate out programming TIMING_VTS so that it is triggered by set_ctrl(V4L2_CID_VBLANK) Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit f6a88082004d46c17bd67a5b221bb5224ec648df Author: Dave Stevenson Date: Fri Oct 28 17:08:55 2022 +0100 media: i2c: ov9282: Add the properties from fwnode Use v4l2_ctrl_new_fwnode_properties to add V4L2_CID_CAMERA_ORIENTATION and V4L2_CID_CAMERA_SENSOR_ROTATION. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 6f7def3d8a6581ca3ccb626414ec119c13e71a57 Author: Dave Stevenson Date: Fri Oct 28 17:08:54 2022 +0100 media: i2c: ov9282: Add selection for CSI2 clock mode The sensor supports either having the CSI2 clock lane free running, or gated when there is no packet to transmit. The driver only selected gated (non-continuous) clock mode. Add code to allow fwnode to configure whether the clock is gated or free running. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 9fd61bb0e380cd31fdcd6c1af80adf91dcf0b231 Author: Dave Stevenson Date: Fri Oct 28 17:08:53 2022 +0100 media: i2c: ov9282: Reduce vblank_min values based on testing The configured vblank_min setting of 151 (meaning VTS of 720 + 151 = 871) is far higher than the setting that works on the sensor, and there are no obvious restrictions stated in the datasheet. Reduce the vblank_min to allow for faster frame rates. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b2a01c90e277d46f99321e4a1f50ee08c04abba Author: Dave Stevenson Date: Fri Oct 28 17:08:52 2022 +0100 media: i2c: ov9282: Correct HTS register for configured pixel rate The calculations from pixel rate, width+hblank, and height+vblank do not give the correct framerate - it's half the speed it should be. The datasheet lists the default for the TIMING_HTS registers (0x380c/d) as being 0x2d8 (728) which is less than the width of the image, so the units clearly can't be pixels. If TIMING_HTS is considered to be units of 2-pixels, then the resulting value of 0x5b0 (1456) makes all the calculations correct. This driver is reporting an HBLANK value of 250, with an image width of 1280, so TIMING_HTS is 1530 (0x5fa) pixels. However it was also setting the register to 0x5fa, thereby not taking into account it being units of 2-pixels. Correct the register value to 0x2fd so that all the timing calculations give the correct results. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 995809ce04a9e4c5c874b05fedd3a36b4285c2cd Author: Dave Stevenson Date: Fri Oct 28 17:08:51 2022 +0100 media: i2c: ov9282: Support more than 1 mode. The driver currently has multiple assumptions that there is only one supported mode. Convert supported_mode to an array, and fix up all references to correctly look at that array. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) commit f15b0612c031827f1d0b9bd5626f7465bd15fac5 Author: Dave Stevenson Date: Fri Oct 28 17:08:50 2022 +0100 media: i2c: ov9282: Remove pixel rate from mode definition The pixel rate is determined by the PLL setup in the common registers, not by the mode specific registers, therefore remove it from the mode definition and define it for all modes. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit bf3c4a5bb13a34701369cf6def3f3b665f205c66 Author: Dave Stevenson Date: Fri Oct 28 17:08:49 2022 +0100 media: i2c: ov9282: Remove format code from the mode The format code is independent of mode, and each mode could support both Y10 and Y8, so disassociate the code from the mode. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 7195aabf8f8b31ccff85969d26189170a7d6cb27 Author: Dave Stevenson Date: Fri Oct 28 17:08:48 2022 +0100 media: i2c: ov9282: Split registers into common and mode specific Currently only one mode is supported, so all registers were dropped in one list. In preparation for adding more modes, split out the common registers from those which configure the mode. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 77 ++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 30 deletions(-) commit 18330e986de17d9d342516cd060f9e3eccd9e110 Author: Dave Stevenson Date: Fri Oct 28 17:08:47 2022 +0100 media: i2c: ov9282: Remove duplication of registers TIMING_VTS (registers 0x380e/f), EXPOSURE (registers 0x3500/1/2), and GAIN (0x3509) are all set from ov9282_update_exp_gain as part of the control handler, therefore they do not need to be in the main list of registers. Remove them. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9282.c | 6 ------ 1 file changed, 6 deletions(-) commit 87fab0eb25e98a2daa5824aff1adb05848332a9f Author: Lad Prabhakar Date: Mon Oct 31 23:22:02 2022 +0000 media: i2c: ov5645: Call ov5645_entity_init_cfg() before registering the subdev Make sure we call ov5645_entity_init_cfg() before registering the subdev to make sure default formats are set up. Suggested-by: Sakari Ailus Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5645.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d781dce66df8e203c6593eaa855ce6843d69819d Author: Lad Prabhakar Date: Mon Oct 31 23:22:01 2022 +0000 media: i2c: ov5645: Make sure to call PM functions Make sure we call the PM functions while s_stream(0) even in case of errors in the code flow. v4l2-core takes care of warning the user so no need to add a warning message in the driver. Suggested-by: Sakari Ailus Signed-off-by: Lad Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5645.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 9a018670dfa06b44efac08793b82a167d8a167ff Author: Lad Prabhakar Date: Mon Oct 31 23:22:00 2022 +0000 media: i2c: ov5645: Drop empty comment Drop empty multiline comment. Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5645.c | 3 --- 1 file changed, 3 deletions(-) commit b504503954c7c3741112d4260fbfc9214c66de9b Author: Lad Prabhakar Date: Mon Oct 31 23:21:59 2022 +0000 media: i2c: ov5645: Use runtime PM Switch to using runtime PM for power management. Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5645.c | 133 +++++++++++++++++++++++---------------------- 1 file changed, 68 insertions(+), 65 deletions(-) commit 105c3bc0b30a248c55f6d46ea230af8ea0f5d6ba Author: Lad Prabhakar Date: Mon Oct 31 23:21:58 2022 +0000 media: dt-bindings: ov5645: Convert OV5645 binding to a schema Convert the simple OV5645 Device Tree binding to json-schema. The previous binding marked the below properties as required which was a driver requirement and not the device requirement so just drop them from the required list during the conversion. - clock-frequency - enable-gpios - reset-gpios Also drop the "clock-names" property as we have a single clock source for the sensor and the driver has been updated to drop the clk referencing by name. Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/ov5645.txt | 54 ----------- .../devicetree/bindings/media/i2c/ovti,ov5645.yaml | 104 +++++++++++++++++++++ 2 files changed, 104 insertions(+), 54 deletions(-) commit f8604f1f36a91bfc02bdab2641b3a1a46eca36ed Author: Lad Prabhakar Date: Mon Oct 31 23:21:57 2022 +0000 media: arm64: dts: renesas: aistarvision-mipi-adapter-2.1: Drop clock-names property Now that the driver has been updated to drop fetching the clk reference by name we no longer need the clock-names property in the ov5645 sensor node. This is in preparation for removal for clock-names property from the DT binding. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab arch/arm64/boot/dts/renesas/aistarvision-mipi-adapter-2.1.dtsi | 1 - 1 file changed, 1 deletion(-) commit a9d88b6aa964da802586baf4c5b6dcacba1ee211 Author: Lad Prabhakar Date: Mon Oct 31 23:21:56 2022 +0000 media: ARM: dts: imx6qdl-wandboard: Drop clock-names property Now that the driver has been updated to drop fetching the clk reference by name we no longer need the clock-names property in the ov5645 sensor node. This is in preparation for removal for clock-names property from the DT binding. Signed-off-by: Lad Prabhakar Acked-by: Shawn Guo Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 1 - 1 file changed, 1 deletion(-) commit f776916b6e2a707c369b1611a6d7eca6406ccc3b Author: Lad Prabhakar Date: Mon Oct 31 23:21:55 2022 +0000 media: ARM: dts: imx6qdl-pico: Drop clock-names property Now that the driver has been updated to drop fetching the clk reference by name we no longer need the clock-names property in the ov5645 sensor node. This is in preparation for removal for clock-names property from the DT binding. Signed-off-by: Lad Prabhakar Acked-by: Shawn Guo Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab arch/arm/boot/dts/imx6qdl-pico.dtsi | 1 - 1 file changed, 1 deletion(-) commit 1251663220d94bb2faa1c452832d0bc48cad2b90 Author: Bryan O'Donoghue Date: Fri Oct 14 19:04:17 2022 +0100 media: i2c: imx412: Add new compatible strings The Sony imx577 uses the same silicon enabling reference code in the available examples provided as the imx412. Add in compatible strings to enable and differentiate the parts. Cc: sakari.ailus@iki.fi Cc: dave.stevenson@raspberrypi.com Cc: jacopo@jmondi.org Cc: "Paul J. Murphy" Cc: Daniele Alessandrelli Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bryan O'Donoghue Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/imx412.c | 1 + 1 file changed, 1 insertion(+) commit 63575dd3d973bf82d034bb571423ccfdc9b6893e Author: Bryan O'Donoghue Date: Fri Oct 14 19:04:16 2022 +0100 media: i2c: imx412: Assign v4l2 device subname based on compat string imx412 and imx577 return the same chip-id when interrogated via i2c. I've confirmed this myself by Sakari suggested we should add a new compat which should be reflected in the name of the media entity https://patchwork.kernel.org/project/linux-media/patch/20220607134057.2427663-3-bryan.odonoghue@linaro.org/#24894500 Set up the .data parameter of of_device_id to pass a string which we use to set the media entity name. Once done we can add in imx577 as a compatible chips with the media names reflecting the directed compat string. Cc: sakari.ailus@iki.fi Cc: dave.stevenson@raspberrypi.com Cc: jacopo@jmondi.org Cc: "Paul J. Murphy" Cc: Daniele Alessandrelli Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bryan O'Donoghue Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/imx412.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit fd1c9499bdff5694ef4c36053675f416fad8ca2a Author: Bryan O'Donoghue Date: Fri Oct 14 19:04:15 2022 +0100 media: dt-bindings: imx412: Extend compatible strings Add compatible bindings for imx577 which uses the same silicon enabling reference code from Sony in the available examples provided. Cc: sakari.ailus@iki.fi Cc: dave.stevenson@raspberrypi.com Cc: jacopo@jmondi.org Cc: "Paul J. Murphy" Cc: Daniele Alessandrelli Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bryan O'Donoghue Acked-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b358332270d9177595d9996086837105ebcdbf6d Author: Andy Shevchenko Date: Tue Sep 27 18:30:11 2022 +0100 media: staging: media: tegra-video: Replace custom implementation of device_match_fwnode() Replace custom implementation of the device_match_fwnode(). Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/tegra-video/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 026df23098b8816df44b46504de79a46f23aecfa Author: Andy Shevchenko Date: Tue Sep 27 18:16:18 2022 +0100 media: subdev: Replace custom implementation of device_match_fwnode() Replace custom implementation of the device_match_fwnode(). Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-subdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cda2ed05aade303b7d89844a0333168c3484634a Author: Christoph Hellwig Date: Mon Oct 31 13:46:26 2022 +0100 fs: simplify vfs_get_super Remove the pointless keying argument and associated enum and pass the fill_super callback and a "bool reconf" instead. Also mark the function static given that there are no users outside of super.c. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro Documentation/filesystems/mount_api.rst | 11 ------ fs/super.c | 60 +++++---------------------------- include/linux/fs_context.h | 14 -------- 3 files changed, 9 insertions(+), 76 deletions(-) commit 38ba2f11d9ce0e7c9444e57cb1bb418d1979534b Author: Al Viro Date: Sun Sep 4 23:24:11 2022 -0400 [elf] get rid of get_note_info_size() it's trivial now... Signed-off-by: Al Viro fs/binfmt_elf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit e92edb85d87e9f8c8bead9cdb7cb2da4b51fd7f8 Author: Al Viro Date: Mon Sep 5 00:41:05 2022 -0400 [elf] unify regset and non-regset cases The only real difference is in filling per-thread notes - getting the values of registers. And this is the only part that is worth an ifdef - we don't need to duplicate the logics regarding gathering threads, filling other notes, etc. It would've been hard to do back when regset-based variant had been introduced, mostly due to sharing bits and pieces of helpers with aout coredumps. As the result, too much had been duplicated and the copies had drifted away since then. Now it can be done cleanly... Signed-off-by: Al Viro fs/binfmt_elf.c | 230 ++++++++++---------------------------------------------- 1 file changed, 38 insertions(+), 192 deletions(-) commit e961d370fc7b806a0d668413a9f1b006760eaee6 Author: Al Viro Date: Sun Sep 4 17:17:26 2022 -0400 [elf][non-regset] use elf_core_copy_task_regs() for dumper as well elf_core_copy_regs() is equivalent to elf_core_copy_task_regs() of current on all architectures. Signed-off-by: Al Viro fs/binfmt_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdbadfcc37c5c8f9f2a401a18eae71b0c28799ee Author: Al Viro Date: Sat Sep 3 20:23:56 2022 -0400 [elf][non-regset] uninline elf_core_copy_task_fpregs() (and lose pt_regs argument) Don't bother with pointless macros - we are not sharing it with aout coredumps anymore. Just convert the underlying functions to the same arguments (nobody uses regs, actually) and call them elf_core_copy_task_fpregs(). And unexport the entire bunch, while we are at it. [added missing includes in arch/{csky,m68k,um}/kernel/process.c to avoid extra warnings about the lack of externs getting added to huge piles for those files. Pointless, but...] Signed-off-by: Al Viro arch/alpha/include/asm/elf.h | 6 ------ arch/alpha/kernel/process.c | 8 +++----- arch/csky/kernel/process.c | 4 ++-- arch/m68k/kernel/process.c | 4 ++-- arch/microblaze/kernel/process.c | 2 +- arch/um/kernel/process.c | 3 ++- arch/x86/um/asm/elf.h | 4 ---- fs/binfmt_elf.c | 5 ++--- include/linux/elfcore.h | 11 +---------- 9 files changed, 13 insertions(+), 34 deletions(-) commit 61d8e42667716f71f2c26e327e66f2940d809f80 Author: Al Viro Date: Thu Nov 24 22:55:57 2022 -0500 copy_mnt_ns(): handle a corner case (overmounted mntns bindings) saner copy_mnt_ns() has the old tree copied, with mntns binding *and* anything bound on top of them skipped. Then it proceeds to walk both trees in parallel. Unfortunately, it doesn't get the "skip the stuff we'd skipped when copying" quite right. Consequences are minor (the ->mnt_root comparison will return the situation to sanity pretty soon and the worst we get is the unexpected subset of opened non-directories being switched to new namespace), but it's confusing enough and it's not hard to get the expected behaviour... Signed-off-by: Al Viro fs/namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3ffa9f713c39a213a08d9ff13ab983a8aa5d8b5d Author: Yuan Can Date: Thu Nov 24 11:33:32 2022 +0000 HSI: omap_ssi_core: Fix error handling in ssi_init() The ssi_init() returns the platform_driver_register() directly without checking its return value, if platform_driver_register() failed, the ssi_pdriver is not unregistered. Fix by unregister ssi_pdriver when the last platform_driver_register() failed. Fixes: 0fae198988b8 ("HSI: omap_ssi: built omap_ssi and omap_ssi_port into one module") Signed-off-by: Yuan Can Signed-off-by: Sebastian Reichel drivers/hsi/controllers/omap_ssi_core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 2b3e8f6f5b939ceeb2e097339bf78ebaaf11dfe9 Author: Maryam Tahhan Date: Wed Nov 23 09:00:43 2022 +0000 docs/bpf: Add BPF_MAP_TYPE_XSKMAP documentation Add documentation for BPF_MAP_TYPE_XSKMAP including kernel version introduced, usage and examples. Signed-off-by: Maryam Tahhan Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221123090043.83945-1-mtahhan@redhat.com Documentation/bpf/map_xskmap.rst | 192 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) commit 19a2bdbaaddc71405494bd35fa034d9cf582b05e Author: Rong Tao Date: Tue Nov 22 10:32:56 2022 +0800 samples/bpf: Fix wrong allocation size in xdp_router_ipv4_user prefix_key->data allocates three bytes using alloca(), but four bytes are actually accessed in the program. Signed-off-by: Rong Tao Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/tencent_F9E2E81922B0C181D05B96DAE5AB0ACE6B06@qq.com samples/bpf/xdp_router_ipv4_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b74344cbede22fdfc1366348b3d576eac0131380 Author: Rong Tao Date: Tue Nov 22 08:50:42 2022 +0800 docs/bpf: Update btf selftests program and add link Commit c64779e24e88("selftests/bpf: Merge most of test_btf into test_progs") renamed the BTF selftest from 'test_btf.c' to 'prog_tests/btf.c'. Signed-off-by: Rong Tao Signed-off-by: Daniel Borkmann Acked-by: David Vernet Link: https://lore.kernel.org/bpf/tencent_1FA6904156E8E599CAE4ABDBE80F22830106@qq.com Documentation/bpf/btf.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c6b0337f01205decb31ed5e90e5aa760ac2d5b41 Author: Alexei Starovoitov Date: Thu Nov 24 13:53:14 2022 -0800 bpf: Don't mark arguments to fentry/fexit programs as trusted. The PTR_TRUSTED flag should only be applied to pointers where the verifier can guarantee that such pointers are valid. The fentry/fexit/fmod_ret programs are not in this category. Only arguments of SEC("tp_btf") and SEC("iter") programs are trusted (which have BPF_TRACE_RAW_TP and BPF_TRACE_ITER attach_type correspondingly) This bug was masked because convert_ctx_accesses() was converting trusted loads into BPF_PROBE_MEM loads. Fix it as well. The loads from trusted pointers don't need exception handling. Fixes: 3f00c5239344 ("bpf: Allow trusted pointers to be passed to KF_TRUSTED_ARGS kfuncs") Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221124215314.55890-1-alexei.starovoitov@gmail.com kernel/bpf/btf.c | 16 +++++++++++++--- kernel/bpf/verifier.c | 3 --- 2 files changed, 13 insertions(+), 6 deletions(-) commit 97f2b4ddb0aa700d673691a7d5e44d226d22bab7 Author: Shang XiaoJing Date: Thu Nov 17 10:45:58 2022 +0800 power: supply: cw2015: Fix potential null-ptr-deref in cw_bat_probe() cw_bat_probe() calls create_singlethread_workqueue() and not checked the ret value, which may return NULL. And a null-ptr-deref may happen: cw_bat_probe() create_singlethread_workqueue() # failed, cw_bat->wq is NULL queue_delayed_work() queue_delayed_work_on() __queue_delayed_work() # warning here, but continue __queue_work() # access wq->flags, null-ptr-deref Check the ret value and return -ENOMEM if it is NULL. Fixes: b4c7715c10c1 ("power: supply: add CellWise cw2015 fuel gauge driver") Signed-off-by: Shang XiaoJing Signed-off-by: Sebastian Reichel drivers/power/supply/cw2015_battery.c | 3 +++ 1 file changed, 3 insertions(+) commit 955bee204f3dd307642c101b75e370662987e735 Author: Zhang Qilong Date: Mon Nov 21 09:18:31 2022 +0800 power: supply: z2_battery: Fix possible memleak in z2_batt_probe() If devm_gpiod_get_optional() returns error, the charger should be freed before z2_batt_probe returns according to the context. We fix it by just gotoing to 'err' branch. Fixes: a3b4388ea19b ("power: supply: z2_battery: Convert to GPIO descriptors") Signed-off-by: Zhang Qilong Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel drivers/power/supply/z2_battery.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6099754a1493467d2db15a20756e32e9a69c2cec Merge: f471748b7fe5 48671232fcb8 Author: Alexei Starovoitov Date: Thu Nov 24 12:27:13 2022 -0800 Merge branch 'bpf: Add bpf_rcu_read_lock() support' Yonghong Song says: ==================== Currently, without rcu attribute info in BTF, the verifier treats rcu tagged pointer as a normal pointer. This might be a problem for sleepable program where rcu_read_lock()/unlock() is not available. For example, for a sleepable fentry program, if rcu protected memory access is interleaved with a sleepable helper/kfunc, it is possible the memory access after the sleepable helper/kfunc might be invalid since the object might have been freed then. Even without a sleepable helper/kfunc, without rcu_read_lock() protection, it is possible that the rcu protected object might be release in the middle of bpf program execution which may cause incorrect result. To prevent above cases, enable btf_type_tag("rcu") attributes, introduce new bpf_rcu_read_lock/unlock() kfuncs and add verifier support. In the rest of patch set, Patch 1 enabled btf_type_tag for __rcu attribute. Patche 2 added might_sleep in bpf_func_proto. Patch 3 added new bpf_rcu_read_lock/unlock() kfuncs and verifier support. Patch 4 added some tests for these two new kfuncs. Changelogs: v9 -> v10: . if no rcu tag support in vmlinux btf, using bpf_rcu_read_lock/unlock() will cause verification error. . at bpf_rcu_read_unlock(), invalidate rcu ptr to PTR_UNTRUSTED instead of SCALAR_VALUE. . a few other comment changes and other minor changes. v8 -> v9: . remove sleepable prog check for ld_abs/ind checking in rcu read lock region. . fix a test failure with gcc-compiled kernel. . a couple of other minor fixes. v7 -> v8: . add might_sleep in bpf_func_proto so we can easily identify whether a helper is sleepable or not. . do not enforce rcu rules for sleepable, e.g., rcu dereference must be in a bpf_rcu_read_lock region. This is to keep old code working fine. . Mark 'b' in 'b = a->b' (b is tagged with __rcu) as MEM_RCU only if 'b = a->b' in rcu read region and 'a' is trusted. This adds safety guarantee for 'b' inside the rcu read region. v6 -> v7: . rebase on top of bpf-next. . remove the patch which enables sleepable program using cgrp_local_storage map. This is orthogonal to this patch set and will be addressed separately. . mark the rcu pointer dereference result as UNTRUSTED if inside a bpf_rcu_read_lock() region. v5 -> v6: . fix selftest prog miss_unlock which tested nested locking. . add comments in selftest prog cgrp_succ to explain how to handle nested memory access after rcu memory load. v4 -> v5: . add new test to aarch64 deny list. v3 -> v4: . fix selftest failures when built with gcc. gcc doesn't support btf_type_tag yet and some tests relies on that. skip these tests if vmlinux BTF does not have btf_type_tag("rcu"). v2 -> v3: . went back to MEM_RCU approach with invalidate rcu ptr registers at bpf_rcu_read_unlock() place. . remove KF_RCU_LOCK/UNLOCK flag and compare btf_id at verification time instead. v1 -> v2: . use kfunc instead of helper for bpf_rcu_read_lock/unlock. . not use MEM_RCU bpf_type_flag, instead use active_rcu_lock in reg state to identify rcu ptr's. . Add more self tests. . add new test to s390x deny list. ==================== Signed-off-by: Alexei Starovoitov commit 48671232fcb81b76be13c11b0df7089b16baea57 Author: Yonghong Song Date: Wed Nov 23 21:32:22 2022 -0800 selftests/bpf: Add tests for bpf_rcu_read_lock() Add a few positive/negative tests to test bpf_rcu_read_lock() and its corresponding verifier support. The new test will fail on s390x and aarch64, so an entry is added to each of their respective deny lists. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221124053222.2374650-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/DENYLIST.aarch64 | 1 + tools/testing/selftests/bpf/DENYLIST.s390x | 1 + .../selftests/bpf/prog_tests/rcu_read_lock.c | 158 +++++++++++ tools/testing/selftests/bpf/progs/rcu_read_lock.c | 290 +++++++++++++++++++++ 4 files changed, 450 insertions(+) commit 9bb00b2895cbfe0ad410457b605d0a72524168c1 Author: Yonghong Song Date: Wed Nov 23 21:32:17 2022 -0800 bpf: Add kfunc bpf_rcu_read_lock/unlock() Add two kfunc's bpf_rcu_read_lock() and bpf_rcu_read_unlock(). These two kfunc's can be used for all program types. The following is an example about how rcu pointer are used w.r.t. bpf_rcu_read_lock()/bpf_rcu_read_unlock(). struct task_struct { ... struct task_struct *last_wakee; struct task_struct __rcu *real_parent; ... }; Let us say prog does 'task = bpf_get_current_task_btf()' to get a 'task' pointer. The basic rules are: - 'real_parent = task->real_parent' should be inside bpf_rcu_read_lock region. This is to simulate rcu_dereference() operation. The 'real_parent' is marked as MEM_RCU only if (1). task->real_parent is inside bpf_rcu_read_lock region, and (2). task is a trusted ptr. So MEM_RCU marked ptr can be 'trusted' inside the bpf_rcu_read_lock region. - 'last_wakee = real_parent->last_wakee' should be inside bpf_rcu_read_lock region since it tries to access rcu protected memory. - the ptr 'last_wakee' will be marked as PTR_UNTRUSTED since in general it is not clear whether the object pointed by 'last_wakee' is valid or not even inside bpf_rcu_read_lock region. The verifier will reset all rcu pointer register states to untrusted at bpf_rcu_read_unlock() kfunc call site, so any such rcu pointer won't be trusted any more outside the bpf_rcu_read_lock() region. The current implementation does not support nested rcu read lock region in the prog. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221124053217.2373910-1-yhs@fb.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 3 + include/linux/bpf_verifier.h | 5 +- kernel/bpf/btf.c | 3 + kernel/bpf/helpers.c | 12 ++++ kernel/bpf/verifier.c | 162 +++++++++++++++++++++++++++++++++++-------- 5 files changed, 155 insertions(+), 30 deletions(-) commit 01685c5bddaa6df3d662c8afed5e5289fcc68e5a Author: Yonghong Song Date: Wed Nov 23 21:32:11 2022 -0800 bpf: Introduce might_sleep field in bpf_func_proto Introduce bpf_func_proto->might_sleep to indicate a particular helper might sleep. This will make later check whether a helper might be sleepable or not easier. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221124053211.2373553-1-yhs@fb.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 1 + kernel/bpf/bpf_lsm.c | 6 ++++-- kernel/bpf/helpers.c | 2 ++ kernel/bpf/verifier.c | 5 +++++ kernel/trace/bpf_trace.c | 4 ++-- 5 files changed, 14 insertions(+), 4 deletions(-) commit 5a0f663f0189cf9e031e444f97c029717a99548d Author: Yonghong Song Date: Wed Nov 23 21:32:06 2022 -0800 compiler_types: Define __rcu as __attribute__((btf_type_tag("rcu"))) Currently, without rcu attribute info in BTF, the verifier treats rcu tagged pointer as a normal pointer. This might be a problem for sleepable program where rcu_read_lock()/unlock() is not available. For example, for a sleepable fentry program, if rcu protected memory access is interleaved with a sleepable helper/kfunc, it is possible the memory access after the sleepable helper/kfunc might be invalid since the object might have been freed then. To prevent such cases, introducing rcu tagging for memory accesses in verifier can help to reject such programs. To enable rcu tagging in BTF, during kernel compilation, define __rcu as attribute btf_type_tag("rcu") so __rcu information can be preserved in dwarf and btf, and later can be used for bpf prog verification. Acked-by: KP Singh Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221124053206.2373141-1-yhs@fb.com Signed-off-by: Alexei Starovoitov include/linux/compiler_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f84eec02b7248b6ae3bd8ef18a66f6f64eeab971 Author: Cosmin Tanislav Date: Thu Nov 24 17:30:49 2022 +0200 iio: addac: ad74413r: fix blank line after declaration warning Checkpatch wants a blank line after all declarations. Add it now, even though the patch has already been submitted. Signed-off-by: Cosmin Tanislav Link: https://lore.kernel.org/r/20221124153049.8851-1-cosmin.tanislav@analog.com Signed-off-by: Jonathan Cameron drivers/iio/addac/ad74413r.c | 1 + 1 file changed, 1 insertion(+) commit f1e24342401a69da0519b289f0942fcd69e7db55 Author: Cosmin Tanislav Date: Thu Nov 24 17:25:59 2022 +0200 iio: addac: ad74115: remove unused ad74115_dac_slew_rate_hz_tbl This table was supposed to be used for handling the DAC rate, but it ended up being unused. Remove it. Signed-off-by: Cosmin Tanislav Reported-by: kernel test robot Link: https://lore.kernel.org/r/20221124152559.7895-1-cosmin.tanislav@analog.com Signed-off-by: Jonathan Cameron drivers/iio/addac/ad74115.c | 4 ---- 1 file changed, 4 deletions(-) commit 91f46207056d6af2052495f911901a5ff337e364 Author: Lorenzo Bianconi Date: Thu Nov 24 09:49:28 2022 +0100 dt-bindings: iio: imu: st_lsm6dsx: add ism330is Add device bindings for ism330is IMU sensor. Use lsm6dso16is as fallback device for ism330is since it implements all the features currently supported by ism330is. Signed-off-by: Lorenzo Bianconi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/a7a8a00037952928364269615ee8b6da4547795b.1669279604.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 3a042fda8813dcb1012347665a69572adbaef1f1 Author: Lorenzo Bianconi Date: Thu Nov 24 09:49:27 2022 +0100 iio: imu: st_lsm6dsx: add support to ISM330IS Add support to STM ISM330IS (accelerometer and gyroscope) Mems sensor. The ISM330IS sensor can use LSM6DSO16IS as fallback device since it implements all the ISM330IS features currently implemented in st_lsm6dsx. Datasheet: https://www.st.com/resource/en/datasheet/ism330is.pdf Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/4cd1614060e06f49cd92f5930d8fd40117c07920.1669279604.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/Kconfig | 4 ++-- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 ++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 8 ++++++-- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 +++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 +++++ 5 files changed, 20 insertions(+), 4 deletions(-) commit 830a35aa2121258d0c8283abe45ebb5c3d2fd791 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:37 2022 +0100 ASoC: codecs: src4xxx-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 Link: https://lore.kernel.org/r/20221118224540.619276-604-uwe@kleine-koenig.org Reviewed-by: Matt Flax Signed-off-by: Mark Brown sound/soc/codecs/src4xxx-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2ff85020ec5db4af3b55d35f5b8385e830c39fdd Author: Uwe Kleine-König Date: Fri Nov 18 23:45:36 2022 +0100 ASoC: max98396: 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-603-uwe@kleine-koenig.org Signed-off-by: Mark Brown sound/soc/codecs/max98396.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 88ade2abba1e46fe581610911240054538f8db88 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:38 2022 +0100 ASoC: codecs: tas2780: 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-605-uwe@kleine-koenig.org Signed-off-by: Mark Brown sound/soc/codecs/tas2780.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 784252bac835c831e10c48be633cd1ff0d697326 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:35 2022 +0100 ASoC: codecs: es8326: 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-602-uwe@kleine-koenig.org Signed-off-by: Mark Brown sound/soc/codecs/es8326.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4cb55a9a1ab7842af037aed9ba2a4e2118d660d2 Merge: 248579fc9a4f 662233731d66 Author: Mark Brown Date: Thu Nov 24 19:20:09 2022 +0000 Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into HEAD so we can apply I2C cleanups. commit 0edf42cbcc8690ef349d4432fea74d7791e3c645 Author: Cheng Xu Date: Wed Nov 16 10:31:07 2022 +0800 RDMA/erdma: Notify the latest PI to FW for reflushing when necessary Firmware is responsible for flushing WRs in HW, and it's a little difficult for firmware to get the latest PI of QPs, especially for RQs after QP state being changed to ERROR. So we introduce a new CMDQ command, by which driver can notify to latest PI to FW, and then FW can flush all posted WRs. Link: https://lore.kernel.org/r/20221116023107.82835-4-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma_qp.c | 30 +++++++++++++++++++++--------- drivers/infiniband/hw/erdma/erdma_verbs.h | 5 +++++ 2 files changed, 26 insertions(+), 9 deletions(-) commit 54d8fffc2a500953ba90ff9462ae06bb05ca2354 Author: Cheng Xu Date: Wed Nov 16 10:31:06 2022 +0800 RDMA/erdma: Implement the lifecycle of reflushing work for each QP Each QP has a work for reflushing purpose. In the work, driver will report the latest pi to hardware. Link: https://lore.kernel.org/r/20221116023107.82835-3-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma_hw.h | 8 ++++++++ drivers/infiniband/hw/erdma/erdma_verbs.c | 18 ++++++++++++++++++ drivers/infiniband/hw/erdma/erdma_verbs.h | 2 ++ 3 files changed, 28 insertions(+) commit 35765dccaf3485575a4420da529c72484c980345 Author: Cheng Xu Date: Wed Nov 16 10:31:05 2022 +0800 RDMA/erdma: Add a workqueue for WRs reflushing ERDMA driver use a workqueue for asynchronous reflush command posting. Implement the lifecycle of this workqueue. Link: https://lore.kernel.org/r/20221116023107.82835-2-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma.h | 1 + drivers/infiniband/hw/erdma/erdma_main.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit b4d46c57d2fb0fa2611fa2ffbaf715925989f83f Author: Cheng Xu Date: Thu Nov 24 19:49:33 2022 +0800 RDMA/erdma: Fix a typo in annotation A non-ASCII character was wrongly put in a comment, use the ACSII version. Fixes: bee85e0e31ec ("RDMA/erdma: Add main include file") Link: https://lore.kernel.org/r/20221124114933.77250-1-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/erdma/erdma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bea3ce759b4664f20f1f57c53fe018c3b67da147 Author: Matt Ranostay Date: Tue Nov 22 19:24:13 2022 -0800 phy: ti: phy-j721e-wiz: add j721s2-wiz-10g module support Add support for j721s2-wiz-10g device which is similar to j721e-wiz-10g but uses clock-names interface versus explicitly defining clock nodes within device tree node. Signed-off-by: Matt Ranostay Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20221123032413.1193961-3-mranostay@ti.com Signed-off-by: Vinod Koul drivers/phy/ti/phy-j721e-wiz.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit f12faa3be8e84fa9232a4654bccb30f46bbfee5c Author: Matt Ranostay Date: Tue Nov 22 19:24:12 2022 -0800 dt-bindings: phy-j721e-wiz: add j721s2 compatible string Add ti,j721s2-wiz-10g compatible string to binding documentation. Signed-off-by: Matt Ranostay Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221123032413.1193961-2-mranostay@ti.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml | 1 + 1 file changed, 1 insertion(+) commit b53e19799d45edf7ca7cfd0cf5d6fb2d5179edec Author: Minghao Chi Date: Thu Nov 17 14:11:43 2022 +0800 phy: 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 Link: https://lore.kernel.org/r/202211171411439883050@zte.com.cn Signed-off-by: Vinod Koul drivers/phy/marvell/phy-mmp3-hsic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4d0c2165e64eec00c19b68b1abc83e57e9633db9 Author: Samuel Holland Date: Sun Nov 13 20:21:13 2022 -0600 phy: allwinner: phy-sun6i-mipi-dphy: Add the A100 DPHY variant A100 features an updated DPHY, which moves PLL control inside the DPHY register space (previously the PLL was controlled from the CCU). It also requires a modified analog power-on sequence. This "combo PHY" can also be used as an LVDS PHY, but that is not yet supported by the driver. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221114022113.31694-9-samuel@sholland.org Signed-off-by: Vinod Koul drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 143 +++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 1 deletion(-) commit 3fd490a7197857dc3aa409e56e31deaeab097c5f Author: Samuel Holland Date: Sun Nov 13 20:21:12 2022 -0600 phy: allwinner: phy-sun6i-mipi-dphy: Add a variant power-on hook The A100 variant uses the same values for the timing registers, and it uses the same final power-on sequence, but it needs a different analog register configuration in the middle. Support this by moving the variant-specific parts to a hook provided by the variant. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221114022113.31694-8-samuel@sholland.org Signed-off-by: Vinod Koul drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 59 +++++++++++++++++------------ 1 file changed, 35 insertions(+), 24 deletions(-) commit cb7f49a31597066b25c9bc6a0bf0781454dd4d2b Author: Samuel Holland Date: Sun Nov 13 20:21:11 2022 -0600 phy: allwinner: phy-sun6i-mipi-dphy: Set the enable bit last The A100 variant of the DPHY requires configuring the analog registers before setting the global enable bit. Since this order also works on the other variants, always use it, to minimize the differences between them. Reviewed-by: Paul Kocialkowski Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221114022113.31694-7-samuel@sholland.org Signed-off-by: Vinod Koul drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a709ae51e22802822de85ec7b672cf1cc5412fc0 Author: Samuel Holland Date: Sun Nov 13 20:21:10 2022 -0600 phy: allwinner: phy-sun6i-mipi-dphy: Make RX support optional While all variants of the DPHY likely support RX mode, the new variant in the A100 is not used in this direction by the BSP, and it has some analog register changes, so its RX power-on sequence is unknown. To be safe, limit RX support to variants where the power-on sequence is known. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221114022113.31694-6-samuel@sholland.org Signed-off-by: Vinod Koul drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit e7a838694185c7d0965baa9ed2515f2e0ff8d502 Author: Samuel Holland Date: Sun Nov 13 20:21:09 2022 -0600 dt-bindings: sun6i-a31-mipi-dphy: Add the A100 DPHY variant A100 features an updated DPHY, which moves PLL control inside the DPHY register space. (Previously PLL-MIPI was controlled from the CCU. This does not affect the "clocks" property because the link between PLL-MIPI and the DPHY was never represented in the devicetree.) It also requires a modified analog power-on sequence. Finally, the new DPHY adds support for operating as an LVDS PHY. D1 uses this same variant. Acked-by: Krzysztof Kozlowski Reviewed-by: Paul Kocialkowski Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221114022113.31694-5-samuel@sholland.org Signed-off-by: Vinod Koul .../devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 5a0d2df462568486b85a88ed2c88ffbfa1645cd1 Author: Samuel Holland Date: Sun Nov 13 20:21:06 2022 -0600 dt-bindings: sun6i-a31-mipi-dphy: Add the interrupts property The sun6i DPHY can generate several interrupts, mostly for reporting error conditions, but also for detecting BTA and UPLS sequences. Document this capability in order to accurately describe the hardware. The DPHY has no interrupt number provided in the vendor documentation because its interrupt line is shared with the DSI controller. A trivial interrupt handler was used to verify that interrupts were in fact generated by the DPHY and not the DSI controller. Signed-off-by: Samuel Holland Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221114022113.31694-2-samuel@sholland.org Signed-off-by: Vinod Koul .../devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit e8511f407b078330dfcca0c7200e72b7638b6e17 Author: Johan Hovold Date: Fri Nov 11 10:42:39 2022 +0100 phy: qcom-qmp-pcie: drop redundant clock allocation Since the QMP driver split, there is no reason to allocate the fixed-rate pipe clock structure separately from the driver data. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221111094239.11547-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 64e1f12b2658c1abca55cffd9413f2d3c3bbfa8f Author: Johan Hovold Date: Fri Nov 11 10:42:38 2022 +0100 phy: qcom-qmp-usb: drop redundant clock allocation Since the QMP driver split, there is no reason to allocate the fixed-rate pipe clock structure separately from the driver data. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221111094239.11547-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 905abf1229efd33aa57f3f65881c378770dfbb65 Author: Johan Hovold Date: Fri Nov 11 10:42:37 2022 +0100 phy: qcom-qmp: drop unused type header The PHY type defines are no longer used in the PCIe, UFS and USB QMP drivers so drop the corresponding include. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221111094239.11547-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 2 -- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 -- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 2 -- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 2 -- 4 files changed, 8 deletions(-) commit 3b41b61a2fe4174ba43fdb599c9d6accd35ac179 Author: Johan Hovold Date: Fri Nov 11 10:38:56 2022 +0100 phy: qcom-qmp-usb: drop sc8280xp reference-clock source The source clock for the reference clock is not used by the PHY directly and should not be described by the devicetree (instead this relationship should be modelled in the clock driver). Drop the driver management of the reference-clock source for SC8280XP. Once the other clock drivers have been updated, the corresponding change can be done also for the other QMP v4 platforms. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111093857.11360-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 1446d03ec290760788b1868b5aa967383d86dd77 Author: Johan Hovold Date: Fri Nov 11 10:38:55 2022 +0100 dt-bindings: phy: qcom,sc8280xp-qmp-usb3-uni: drop reference-clock source The source clock for the reference clock is not used by the PHY directly and should not be included in the devicetree binding. Fixes: e8e58e29a0c9 ("dt-bindings: phy: qcom,qmp-usb: fix sc8280xp binding") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111093857.11360-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul .../devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 83a0bbe39b1797cab47665efcf689f774b42af88 Author: Johan Hovold Date: Mon Nov 21 09:50:56 2022 +0100 phy: qcom-qmp-combo: add support for updated sc8280xp binding Add support for the new SC8280XP binding. Note that the binding does not try to describe every register subregion and instead the driver holds the corresponding offsets. Also note that (possibly) unlike on earlier platforms, the TX registers are used by both the USB and DP implementation. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-14-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 145 +++++++++++++++++++++++++++--- 1 file changed, 134 insertions(+), 11 deletions(-) commit 133836a7edf4e5783ab0caa669cdb94ab02b9b62 Author: Johan Hovold Date: Mon Nov 21 09:50:55 2022 +0100 phy: qcom-qmp-combo: rename DP_PHY register pointer The DP_PHY registers have erroneously been referred to as "PCS" registers since DisplayPort support was added to the QMP drivers (including in the devicetree binding). Rename the corresponding pointer to match the register names. Note that the repeated "dp" in the field name is intentional and this DP register block is called "DP_PHY" (not just "PHY"). Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-13-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 139 +++++++++++++++--------------- 1 file changed, 70 insertions(+), 69 deletions(-) commit 9e5b59ea6c216d9b36e3250c2efa081ab4ea2ff5 Author: Johan Hovold Date: Mon Nov 21 09:50:54 2022 +0100 phy: qcom-qmp-combo: rename common-register pointers The common registers are shared by the USB and DP parts of the PHY so drop the misleading "dp" prefix from the corresponding pointers. Note that the "DP" prefix could also be dropped from the corresponding defines, but leave that in place for now. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-12-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b71bf1ebe936cc63983e5339d218918ed56e9804 Author: Johan Hovold Date: Mon Nov 21 09:50:53 2022 +0100 phy: qcom-qmp-combo: clean up DP clock callbacks Clean up the DP clock callbacks somewhat by dropping the redundant "qcom" prefix and removing line breaks after type specifiers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-11-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 33 +++++++++++++------------------ 1 file changed, 14 insertions(+), 19 deletions(-) commit ce51f7a70a3bbc20c07079c06e7721cabfe34dd9 Author: Johan Hovold Date: Mon Nov 21 09:50:52 2022 +0100 phy: qcom-qmp-combo: separate clock and provider registration In preparation for supporting devicetree bindings which do not use child nodes, separate clock registration from clock-provider registration. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 44 ++++++++++++++----------------- 1 file changed, 20 insertions(+), 24 deletions(-) commit 74401c85fb3b134d884d5de968c66784527d12d1 Author: Johan Hovold Date: Mon Nov 21 09:50:51 2022 +0100 phy: qcom-qmp-combo: add clock registration helper In preparation for supporting devicetree bindings which do not use child nodes, add a clock registration helper to handle the registration of both the USB and DP clocks. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-9-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 55b1c39b4990ebdab2faa2e4c06d17476d6d2d3c Author: Johan Hovold Date: Mon Nov 21 09:50:50 2022 +0100 phy: qcom-qmp-combo: drop redundant clock allocation Since the QMP driver split, there is no reason to allocate the fixed-rate pipe clock structure separately from the driver data. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-8-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ee81f2eb0ee0c99a109f91a9617a8d7698479181 Author: Johan Hovold Date: Mon Nov 21 09:50:49 2022 +0100 phy: qcom-qmp-combo: drop redundant clock structure Drop the unnecessary DP clock structure and instead store the clocks directly in the driver data. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 52 ++++++++++--------------------- 1 file changed, 17 insertions(+), 35 deletions(-) commit 0dd521d593ade3e8494d29abb653fda5bec5d508 Author: Johan Hovold Date: Mon Nov 21 09:50:48 2022 +0100 phy: qcom-qmp-combo: generate pipe clock name In preparation for supporting devicetree bindings which do not use child nodes, generate also the USB3 pipe clock name based on the platform device name as is done for the DP clocks. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit b3982f2144e10bd542189e38cd47709e55389606 Author: Johan Hovold Date: Mon Nov 21 09:50:47 2022 +0100 phy: qcom-qmp-combo: restructure PHY creation In preparation for supporting devicetree bindings which do not use child nodes, move the PHY creation to probe() proper and parse the serdes, dp_com and dp_serdes resources in a dedicated legacy devicetree helper. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-5-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 89 +++++++++++++++++-------------- 1 file changed, 48 insertions(+), 41 deletions(-) commit 774903ca6c499887f554234bb019c91aa0a8f741 Author: Johan Hovold Date: Mon Nov 21 09:50:46 2022 +0100 phy: qcom-qmp-combo: drop v4 reference-clock source The source clock for the reference clock should not be described by the devicetree and instead this relationship should be modelled in the clock driver. Drop the management of the source clock from the driver for SC8180X and SC8280XP. Note that support for the former is not yet in mainline. Also note that the binding has never been updated to describe the v4 clocks for SC8180X. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1c4c5436b4ad579762fbe78bfabc8aef59bd5b1 Author: Johan Hovold Date: Mon Nov 21 09:50:45 2022 +0100 dt-bindings: phy: qcom,qmp-usb3-dp: fix sc8280xp binding The current QMP USB3-DP PHY bindings are based on the original MSM8996 binding which provided multiple PHYs per IP block and these in turn were described by child nodes. The QMP USB3-DP PHY block provides a single multi-protocol PHY and even if some resources are only used by either the USB or DP part of the device there is no real benefit in describing these resources in child nodes. The original MSM8996 binding also ended up describing the individual register blocks as belonging to either the wrapper node or the PHY child nodes. This is an unnecessary level of detail which has lead to problems when later IP blocks using different register layouts have been forced to fit the original mould rather than updating the binding. The bindings are arguable also incomplete as they only the describe register blocks used by the current Linux drivers (e.g. does not include the PCS LANE registers). This is specifically true for later USB4-USB3-DP QMP PHYs where the TX registers are used by both the USB3 and DP parts of the PHY (and where the USB4 part of the PHY was not covered by the binding at all). Notably there are also no DP "RX" (sic) registers as described by the current bindings and the DP "PCS" region is really a set of DP_PHY registers. Add a new binding for the USB4-USB3-DP QMP PHYs found on SC8280XP which further bindings can be based on. Note that the binding uses a PHY index to access either the USB3 or DP part of the PHY and that this can later be used also for the USB4 part if needed. Similarly, the clock inputs and outputs can later be extended to support USB4. Also note that the current binding is simply removed instead of being deprecated as it was only recently merged and would not allow for supporting DP mode. Reviewed-by: Rob Herring Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul .../bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml | 12 --- .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 99 ++++++++++++++++++++++ include/dt-bindings/phy/phy-qcom-qmp.h | 20 +++++ 3 files changed, 119 insertions(+), 12 deletions(-) commit 32efdb0bb6e19965337fb63991237ecd99e0f9a4 Author: Johan Hovold Date: Mon Nov 21 09:50:44 2022 +0100 dt-bindings: phy: qcom,qmp-usb3-dp: rename current bindings The current QMP USB3-DP PHY bindings are based on the original MSM8996 binding which provided multiple PHYs per IP block and these in turn were described by child nodes. The QMP USB3-DP PHY block provides a single multi-protocol PHY and even if some resources are only used by either the USB or DP part of the device there is no real benefit in describing these resources in child nodes. The original MSM8996 binding also ended up describing the individual register blocks as belonging to either the wrapper node or the PHY child nodes. This is an unnecessary level of detail which has lead to problems when later IP blocks using different register layouts have been forced to fit the original mould rather than updating the binding. The bindings are arguable also incomplete as they only the describe register blocks used by the current Linux drivers (e.g. does not include the PCS_LANE registers). In preparation for adding new bindings for SC8280XP which further bindings can be based on, rename the current schema file after SC7180, which was the first supported platform, and add a reference to the SC8280XP bindings. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221121085058.31213-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul ...mp-usb3-dp-phy.yaml => qcom,sc7180-qmp-usb3-dp-phy.yaml} | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 526103b7a6759e4afd1bcdd4de619642689a78d2 Author: Johan Hovold Date: Mon Nov 14 12:06:21 2022 +0100 phy: qcom-qmp-combo: clean up DP callback names Clean up and unify the DP callbacks by dropping the redundant "qcom" and "phy" prefix and infix and by using a common naming scheme ("qmp" + version + callback name). Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-23-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 82 +++++++++++++++---------------- 1 file changed, 41 insertions(+), 41 deletions(-) commit 44aff8e31080e13a24313120aae259c659b04cd1 Author: Johan Hovold Date: Mon Nov 14 12:06:20 2022 +0100 phy: qcom-qmp-combo: clean up probe initialisation Stop abusing the driver data pointer and instead pass the driver state structure directly to the initialisation helpers during probe. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-22-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 61 ++++++++++++++----------------- 1 file changed, 27 insertions(+), 34 deletions(-) commit 6c7c449a008b7a279e15254a829d096a7ea72ee3 Author: Johan Hovold Date: Mon Nov 14 12:06:19 2022 +0100 phy: qcom-qmp-combo: clean up device-tree parsing Since the QMP driver split there will be precisely two child nodes so drop the obsolete iteration construct. While at it, drop the verbose error logging that would have been printed also on probe deferrals. Note that there is no need to check if there are additional child nodes (the kernel is not a devicetree validator), but let's return an error if either child node is missing. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-21-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 82 +++++++++++-------------------- 1 file changed, 28 insertions(+), 54 deletions(-) commit dd1153651b0383ee9597609bc449d1751eefdcae Author: Johan Hovold Date: Mon Nov 14 12:06:18 2022 +0100 phy: qcom-qmp-combo: merge driver data The QMP combo driver manages a single PHY (even if it provides two interfaces for USB and DP, respectively) so merge the old qcom_qmp and qmp_phy structures and drop the PHY array. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-20-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 688 ++++++++++++++---------------- 1 file changed, 312 insertions(+), 376 deletions(-) commit 9e62877eefacecdcd0467cfeb6bcd20786465f9b Author: Johan Hovold Date: Mon Nov 14 12:06:17 2022 +0100 phy: qcom-qmp-combo: merge USB and DP configurations It does not really make any sense to keep separate configuration structures for the USB and DP parts of the same PHY so merge them. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-19-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 182 ++++++++++-------------------- 1 file changed, 57 insertions(+), 125 deletions(-) commit ba0af7b346db8149e33a2f6e1a7b8265cabbfacb Author: Johan Hovold Date: Mon Nov 14 12:06:16 2022 +0100 phy: qcom-qmp-combo: drop lanes config parameter Since the QMP driver split there is really no need for the 'lanes' configuration parameter as all of these USB-C PHYs support dual-lane SuperSpeed USB and quad-lane (uni-directional) DP (even if the driver still only supports CC1 orientation using lanes 2 and 3). Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221114110621.4639-18-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 62 ++++++++++--------------------- 1 file changed, 20 insertions(+), 42 deletions(-) commit 488f116de075f2fd0cb90205a76e2ca0756efaff Author: Johan Hovold Date: Mon Nov 14 12:06:15 2022 +0100 phy: qcom-qmp-combo: add DP configuration tables In preparation for merging the USB and DP configurations, add dedicated pointers for the DP serdes and tx tables to the configurations. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-17-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 45 ++++++++++++++++--------------- 1 file changed, 24 insertions(+), 21 deletions(-) commit ad4db91d60636c2c28487c3f518eab5952511923 Author: Johan Hovold Date: Mon Nov 14 12:06:14 2022 +0100 phy: qcom-qmp-combo: rename sc8280xp config In preparation for merging the USB and DP configurations, drop the "combo" infix from the SC8280XP combined configuration for consistency with the other platforms. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-16-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bc8615888f3e4dc8f3448b6b4f8dec04b8b5bce2 Author: Johan Hovold Date: Mon Nov 14 12:06:13 2022 +0100 phy: qcom-qmp-combo: clean up DP configurations In preparation for merging the USB and DP configurations, align the initialisations of the DP function pointers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-15-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 40 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 4197a2a22df7804b40335ab638eae211acd1a81b Author: Johan Hovold Date: Mon Nov 14 12:06:12 2022 +0100 phy: qcom-qmp-combo: add dedicated DP iomem pointers In preparation for merging the driver data, add separate iomem pointers for the DP part of the PHY. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-14-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 246 +++++++++++++++--------------- 1 file changed, 126 insertions(+), 120 deletions(-) commit c7fbe5bd14145425d38a3b1e4d59f1b3acff3eba Author: Johan Hovold Date: Mon Nov 14 12:06:11 2022 +0100 phy: qcom-qmp-combo: separate USB and DP devicetree parsing Separate the devicetree parsing of the USB and DP child nodes in two dedicated helpers in preparation for merging the driver data. Note that only the USB part of the PHY has a pipe clock and that the DP implementation only uses the tx/tx2 and pcs register regions. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-13-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 82 ++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 24 deletions(-) commit dae95d7f667d20ab81976f846ed0bf2c71dbfe18 Author: Johan Hovold Date: Mon Nov 14 12:06:10 2022 +0100 phy: qcom-qmp-combo: clean up serdes initialisation Clean up serdes initialisation somewhat by making the current helper a dedicated helper for the DP part of the PHY. Note that no error is currently returned for non-supported link rates. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-12-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 49 +++++++++++++++---------------- 1 file changed, 24 insertions(+), 25 deletions(-) commit 3ade3ede57a0093da3b432ecceda36386d13a5e5 Author: Johan Hovold Date: Mon Nov 14 12:06:09 2022 +0100 phy: qcom-qmp-combo: separate USB and DP power-on ops Separate the USB and DP power-on and power-off operations in two dedicated implementations. Note that the pipe clock is only used by the USB part of the PHY and that no DP configuration has a pcs (or rx) table or has has_pwrdn_delay set. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-11-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 100 ++++++++++++++++++------------ 1 file changed, 59 insertions(+), 41 deletions(-) commit 186266f65e68c16ba6714c9b7f561ddcd4998cae Author: Johan Hovold Date: Mon Nov 14 12:06:08 2022 +0100 phy: qcom-qmp-combo: rename DP PHY ops Rename the configure and calibrate DP PHY ops using the common prefix for consistency. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8c75d9eab1dd402bde2fb1337db2130a409c2743 Author: Johan Hovold Date: Mon Nov 14 12:06:07 2022 +0100 phy: qcom-qmp-combo: separate USB and DP init ops Separate the USB and DP init and exit operations by calling the common initialisation code directly from the USB operation and adding a "dp" infix to the DP callbacks. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-9-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 36 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 0537692bbec18a173e1bda87f2bd024b3684b47d Author: Johan Hovold Date: Mon Nov 14 12:06:06 2022 +0100 phy: qcom-qmp-combo: drop unnecessary debug message Drop the unnecessary (verbose) debug message from the init PHY op. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-8-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 -- 1 file changed, 2 deletions(-) commit ae1cdc709762129c33ab64f400c38c9a177189f1 Author: Johan Hovold Date: Mon Nov 14 12:06:05 2022 +0100 phy: qcom-qmp-combo: rename USB PHY ops Add a "usb" infix to the USB PHY operation functions and name them after the corresponding operations (e.g. "init" rather than "enable"). Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 73d262f8e7ff095965bac0c4bf538f601257f53b Author: Johan Hovold Date: Mon Nov 14 12:06:04 2022 +0100 phy: qcom-qmp-combo: drop unused DP PHY mode op The set-mode operation is currently only used by the USB part of the PHY so drop the corresponding callback from the DP PHY ops. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 1 - 1 file changed, 1 deletion(-) commit d6c81688f9cd1d198475383c963cd3d9576d29c2 Author: Johan Hovold Date: Mon Nov 14 12:06:03 2022 +0100 phy: qcom-qmp-combo: rename PHY ops structures Rename the PHY operation structures so that they have a "phy_ops" suffix and move them next to the implementation. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-5-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 40 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 987a505fa7d79691013ec4bd325ecc5664781c81 Author: Johan Hovold Date: Mon Nov 14 12:06:02 2022 +0100 phy: qcom-qmp-combo: move pm ops Move the PM ops structure next to the implementation to keep the driver callbacks grouped. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5c5f9fbc15aa58c1bac22724f429e6e399a2f2b5 Author: Johan Hovold Date: Mon Nov 14 12:06:01 2022 +0100 phy: qcom-qmp-combo: move device-id table Move the device-id table after probe() and next to the driver structure to keep the driver callback functions grouped together. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit a173ee25a758927adc12664d1ec162a18324a4bd Author: Johan Hovold Date: Mon Nov 14 12:06:00 2022 +0100 phy: qcom-qmp-combo: sort device-id table Sort the device-id table by compatible string to make it easier to find and add new entries. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114110621.4639-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8d84e39d76bd83474b26cb44f4b338635676e7e8 Author: Christian Brauner Date: Tue Nov 22 11:40:32 2022 +0100 fs: use consistent setgid checks in is_sxid() Now that we made the VFS setgid checking consistent an inode can't be marked security irrelevant even if the setgid bit is still set. Make this function consistent with all other helpers. Note that enforcing consistent setgid stripping checks for file modification and mode- and ownership changes will cause the setgid bit to be lost in more cases than useed to be the case. If an unprivileged user wrote to a non-executable setgid file that they don't have privilege over the setgid bit will be dropped. This will lead to temporary failures in some xfstests until they have been updated. Reported-by: Miklos Szeredi Signed-off-by: Christian Brauner (Microsoft) include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2756526450d19bca28714565062a8f286c05049 Author: Randy Dunlap Date: Wed Nov 23 22:30:13 2022 -0800 genirq/irqreturn: Fix kernel-doc warnings irqreturn.h:6: warning: missing initial short description on line: * enum irqreturn irqreturn.h:15: warning: Enum value 'IRQ_NONE' not described in enum 'irqreturn' irqreturn.h:15: warning: Enum value 'IRQ_HANDLED' not described in enum 'irqreturn' irqreturn.h:15: warning: Enum value 'IRQ_WAKE_THREAD' not described in enum 'irqreturn' Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221124063013.28479-1-rdunlap@infradead.org include/linux/irqreturn.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c4b02c92d9673ef4704fd0c8f008fec183517b64 Author: Jean Delvare Date: Thu Nov 24 14:47:08 2022 +0100 regulator: 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 several occurrences of of_match_ptr(), __maybe_unused and some ifdef guarding, as we now know what all of this will resolve to, we might as well save cpp some work. Signed-off-by: Jean Delvare Cc: Liam Girdwood Cc: Mark Brown Cc: Icenowy Zheng Link: https://lore.kernel.org/r/20221124144708.64371b98@endymion.delvare Signed-off-by: Mark Brown drivers/regulator/Kconfig | 10 +++++----- drivers/regulator/fan53880.c | 16 +++++++--------- drivers/regulator/mp886x.c | 2 +- drivers/regulator/sy8106a-regulator.c | 4 ++-- drivers/regulator/sy8824x.c | 2 +- drivers/regulator/sy8827n.c | 4 +--- 6 files changed, 17 insertions(+), 21 deletions(-) commit ff62b8e6588fb07bedda7423622c140c4edd66a7 Author: Greg Kroah-Hartman Date: Wed Nov 23 13:25:20 2022 +0100 driver core: make struct class.devnode() take a const * The devnode() in struct class 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: Fenghua Yu Cc: Reinette Chatre Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: FUJITA Tomonori Cc: Jens Axboe Cc: Justin Sanders Cc: Arnd Bergmann Cc: Sumit Semwal Cc: Benjamin Gaignard Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: John Stultz Cc: "Christian König" Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: Dennis Dalessandro Cc: Dmitry Torokhov Cc: Mauro Carvalho Chehab Cc: Sean Young Cc: Frank Haverkamp Cc: Jiri Slaby Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Alex Williamson Cc: Cornelia Huck Cc: Kees Cook Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Hans Verkuil Cc: Christophe JAILLET Cc: Xie Yongji Cc: Gautam Dawar Cc: Dan Carpenter Cc: Eli Cohen Cc: Parav Pandit Cc: Maxime Coquelin Cc: alsa-devel@alsa-project.org Cc: dri-devel@lists.freedesktop.org Cc: kvm@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: linux-block@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: linux-rdma@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Link: https://lore.kernel.org/r/20221123122523.1332370-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 4 ++-- arch/x86/kernel/cpuid.c | 2 +- arch/x86/kernel/msr.c | 2 +- block/bsg.c | 2 +- drivers/block/aoe/aoechr.c | 2 +- drivers/char/mem.c | 2 +- drivers/char/misc.c | 4 ++-- drivers/dma-buf/dma-heap.c | 2 +- drivers/gpu/drm/drm_sysfs.c | 2 +- drivers/infiniband/core/user_mad.c | 2 +- drivers/infiniband/core/uverbs_main.c | 2 +- drivers/infiniband/hw/hfi1/device.c | 4 ++-- drivers/input/input.c | 2 +- drivers/media/dvb-core/dvbdev.c | 4 ++-- drivers/media/pci/ddbridge/ddbridge-core.c | 4 ++-- drivers/media/rc/rc-main.c | 2 +- drivers/misc/genwqe/card_base.c | 2 +- drivers/tty/tty_io.c | 2 +- drivers/usb/core/file.c | 2 +- drivers/vdpa/vdpa_user/vduse_dev.c | 2 +- drivers/vfio/vfio_main.c | 2 +- fs/pstore/pmsg.c | 2 +- include/linux/device/class.h | 2 +- sound/sound_core.c | 2 +- 24 files changed, 29 insertions(+), 29 deletions(-) commit 23680f0b7d7f67a935adb38058110d2d81bbe6ea Author: Greg Kroah-Hartman Date: Wed Nov 23 13:25:19 2022 +0100 driver core: make struct class.dev_uevent() take a const * The dev_uevent() in struct class 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: Luis Chamberlain Cc: Russ Weight Cc: Jean Delvare Cc: Johan Hovold Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: Karsten Keil Cc: Mauro Carvalho Chehab Cc: Keith Busch Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Dominik Brodowski Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Johannes Berg Cc: Wolfram Sang Cc: Raed Salem Cc: Chen Zhongjin Cc: Tetsuo Handa Cc: Avihai Horon Cc: "Matthew Wilcox (Oracle)" Cc: Alan Stern Cc: Colin Ian King Cc: Geert Uytterhoeven Cc: Jakob Koschel Cc: Antoine Tenart Cc: Frederic Weisbecker Cc: Wang Yufen Cc: linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: linux-nvme@lists.infradead.org Cc: linux-pm@vger.kernel.org Cc: linux-rdma@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Sebastian Reichel Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221123122523.1332370-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman block/genhd.c | 4 ++-- drivers/base/firmware_loader/sysfs.c | 6 +++--- drivers/base/firmware_loader/sysfs.h | 2 +- drivers/firmware/dmi-id.c | 2 +- drivers/gnss/core.c | 6 +++--- drivers/infiniband/core/device.c | 2 +- drivers/isdn/mISDN/core.c | 4 ++-- drivers/media/dvb-core/dvbdev.c | 4 ++-- drivers/nvme/host/core.c | 4 ++-- drivers/pcmcia/cs.c | 4 ++-- drivers/power/supply/power_supply.h | 2 +- drivers/power/supply/power_supply_sysfs.c | 8 ++++---- drivers/usb/gadget/udc/core.c | 4 ++-- include/linux/device/class.h | 2 +- include/linux/mISDNif.h | 2 +- net/atm/atm_sysfs.c | 4 ++-- net/core/net-sysfs.c | 4 ++-- net/rfkill/core.c | 2 +- 18 files changed, 33 insertions(+), 33 deletions(-) commit c209b1b0e1e87e862099482e62a2f2d0bef8e989 Author: Johan Hovold Date: Mon Nov 14 09:13:46 2022 +0100 phy: qcom-qmp-combo: clean up common initialisation Commit 52e013d0bffa ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy") added support for the DisplayPort part of QMP PHYs but unfortunately did so by duplicating parts of the shared configuration, something which has lead to subtle bugs depending on probe order. As the resources have always been requested based on the USB configuration, make sure to not rely on fields from the DP configuration when using them (e.g. in case they get out of sync) and remove the now unused fields from the DP configurations. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114081346.5116-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 47 +++---------------------------- 1 file changed, 4 insertions(+), 43 deletions(-) commit c7b98de745cffdceefc077ad5cf9cda032ef8959 Author: Johan Hovold Date: Mon Nov 14 09:13:45 2022 +0100 phy: qcom-qmp-combo: fix runtime suspend Drop the confused runtime-suspend type check which effectively broke runtime PM if the DP child node happens to be parsed before the USB child node during probe (e.g. due to order of child nodes in the devicetree). Instead use the new driver data USB PHY pointer to access the USB configuration and resources. Fixes: 52e013d0bffa ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy") Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114081346.5116-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 7a7d86d14d073dfa3429c550667a8e78b99edbd4 Author: Johan Hovold Date: Mon Nov 14 09:13:44 2022 +0100 phy: qcom-qmp-combo: fix broken power on The PHY is powered on during phy-init by setting the SW_PWRDN bit in the COM_POWER_DOWN_CTRL register and then setting the same bit in the in the PCS_POWER_DOWN_CONTROL register that belongs to the USB part of the PHY. Currently, whether power on succeeds depends on probe order and having the USB part of the PHY be initialised first. In case the DP part of the PHY is instead initialised first, the intended power on of the USB block results in a corrupted DP_PHY register (e.g. DP_PHY_AUX_CFG8). Add a pointer to the USB part of the PHY to the driver data and use that to power on the PHY also if the DP part of the PHY is initialised first. Fixes: 52e013d0bffa ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy") Cc: stable@vger.kernel.org # 5.10 Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114081346.5116-5-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 910dd4883d757af5faac92590f33f0f7da963032 Author: Johan Hovold Date: Mon Nov 14 09:13:43 2022 +0100 phy: qcom-qmp-combo: fix sc8180x reset The SC8180X has two resets but the DP configuration erroneously described only one. In case the DP part of the PHY is initialised before the USB part (e.g. depending on probe order), then only the first reset would be asserted. Fixes: 1633802cd4ac ("phy: qcom: qmp: Add SC8180x USB/DP combo") Cc: stable@vger.kernel.org # 5.15 Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114081346.5116-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e965ab8216a419fadb4520b65a95dc7017daa800 Author: Johan Hovold Date: Mon Nov 14 09:13:42 2022 +0100 phy: qcom-qmp-combo: fix sdm845 reset The SDM845 has two resets but the DP configuration erroneously described only one. In case the DP part of the PHY is initialised before the USB part (e.g. depending on probe order), then only the first reset would be asserted. Add a dedicated configuration for SDM845 rather than reuse the incompatible SC7180 configuration. Fixes: d88497fb6bbd ("phy: qualcomm: phy-qcom-qmp: add support for combo USB3+DP phy on SDM845") Cc: stable@vger.kernel.org # 6.1 Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114081346.5116-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 39 ++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit d8a5b59c5fc75c99ba17e3eb1a8f580d8d172b28 Author: Johan Hovold Date: Mon Nov 14 09:13:41 2022 +0100 phy: qcom-qmp-combo: fix out-of-bounds clock access The SM8250 only uses three clocks but the DP configuration erroneously described four clocks. In case the DP part of the PHY is initialised before the USB part, this would lead to uninitialised memory beyond the bulk-clocks array to be treated as a clock pointer as the clocks are requested based on the USB configuration. Fixes: aff188feb5e1 ("phy: qcom-qmp: add support for sm8250-usb3-dp phy") Cc: stable@vger.kernel.org # 5.13 Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221114081346.5116-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 248579fc9a4f3bf36e7cfe9f6a354cee0f9848dc Author: Jiaxin Yu Date: Thu Nov 24 10:30:50 2022 +0800 ASoC: mediatek: mt8186: Correct I2S shared clocks In mt8186 platform, I2S2 should be the main I2S port that provide the clock, on the contrary I2S3 should be the second I2S port that use this clock. Fixes: 9986bdaee477 ("ASoC: mediatek: mt8186: Configure shared clocks") Signed-off-by: Jiaxin Yu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221124023050.4470-1-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c | 2 +- sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b992f35568cb5768c5944fc3b4f02df337dc1ece Author: David Lin Date: Thu Nov 24 13:56:58 2022 +0800 ASoC: dt-bindings: add compatible string for NAU8318 The audio amplifier NAU8318 is almost functionally identical to NAU8315. Adds compatible string "nuvoton,nau8318" for driver reuse. Signed-off-by: David Lin Link: https://lore.kernel.org/r/20221124055658.53828-2-CTLIN0@nuvoton.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/nau8315.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 9ffe8bbb8fcf93d1bf0a948635de1ced9247a811 Author: David Lin Date: Thu Nov 24 13:56:57 2022 +0800 ASoC: nau8315: add new acpi id and compatible id Add new acpi id and compatible id for nau8315. Signed-off-by: David Lin Link: https://lore.kernel.org/r/20221124055658.53828-1-CTLIN0@nuvoton.com Signed-off-by: Mark Brown sound/soc/codecs/nau8315.c | 2 ++ 1 file changed, 2 insertions(+) commit 8d89cf6ff229ff31cd4f73f5b3928564b81fc41e Author: Srinivas Kandagatla Date: Thu Nov 24 14:03:51 2022 +0000 ASoC: qcom: cleanup and fix dependency of QCOM_COMMON SND_SOC_QCOM_COMMON depends on SOUNDWIRE for some symbols but this is not explicitly specified using Kconfig depends. On the other hand SND_SOC_QCOM_COMMON is also directly selected by the sound card Kconfigs, this could result in various combinations and some symbols ending up in modules and soundcard that uses those symbols as in-build driver. Fix these issues by explicitly specifying the dependencies of SND_SOC_QCOM_COMMON and also use imply a to select SND_SOC_QCOM_COMMON so that the symbol is selected based on its dependencies. Also remove dummy stubs in common.c around CONFIG_SOUNDWIRE Fixes: 3bd975f3ae0a ("ASoC: qcom: sm8250: move some code to common") Reported-by: kernel test robot Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221124140351.407506-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/Kconfig | 16 +++++++++------- sound/soc/qcom/common.c | 2 -- sound/soc/qcom/common.h | 23 ----------------------- 3 files changed, 9 insertions(+), 32 deletions(-) commit 1bf5ee979076ceb121ee51c95197d890b1cee7f4 Author: Yuan Can Date: Thu Nov 24 14:05:10 2022 +0000 ASoC: qcom: 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: 24caf8d9eb10 ("ASoC: qcom: lpass-sc7180: Add platform driver for lpass audio") Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20221124140510.63468-1-yuancan@huawei.com Signed-off-by: Mark Brown sound/soc/qcom/lpass-sc7180.c | 3 +++ 1 file changed, 3 insertions(+) commit 14e5f71e31ff3925cc970fa7907393ee7f4b748d Author: Stanislav Fomichev Date: Tue Nov 22 20:09:47 2022 -0800 net: use %pS for kfree_skb tracing event location For the cases where 'reason' doesn't give any clue, it's still nice to be able to track the kfree_skb caller location. %p doesn't help much so let's use %pS which prints the symbol+offset. Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20221123040947.1015721-1-sdf@google.com Signed-off-by: Paolo Abeni include/trace/events/skb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0d3da982c96aeddc1bbf1cf9469dbb9ebdca657 Author: Thomas Gleixner Date: Wed Nov 23 21:18:57 2022 +0100 Bluetooth: hci_qca: Fix the teardown problem for real While discussing solutions for the teardown problem which results from circular dependencies between timers and workqueues, where timers schedule work from their timer callback and workqueues arm the timers from work items, it was discovered that the recent fix to the QCA code is incorrect. That commit fixes the obvious problem of using del_timer() instead of del_timer_sync() and reorders the teardown calls to destroy_workqueue(wq); del_timer_sync(t); This makes it less likely to explode, but it's still broken: destroy_workqueue(wq); /* After this point @wq cannot be touched anymore */ ---> timer expires queue_work(wq) <---- Results in a NULL pointer dereference deep in the work queue core code. del_timer_sync(t); Use the new timer_shutdown_sync() function to ensure that the timers are disarmed, no timer callbacks are running and the timers cannot be armed again. This restores the original teardown sequence: timer_shutdown_sync(t); destroy_workqueue(wq); which is now correct because the timer core silently ignores potential rearming attempts which can happen when destroy_workqueue() drains pending work before mopping up the workqueue. Fixes: 72ef98445aca ("Bluetooth: hci_qca: Use del_timer_sync() before freeing") Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Acked-by: Luiz Augusto von Dentz Link: https://lore.kernel.org/all/87iljhsftt.ffs@tglx Link: https://lore.kernel.org/r/20221123201625.435907114@linutronix.de drivers/bluetooth/hci_qca.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a31323bef2b66455920d054b160c17d4240f8fd4 Author: Steven Rostedt (Google) Date: Wed Nov 23 21:18:55 2022 +0100 timers: Update the documentation to reflect on the new timer_shutdown() API In order to make sure that a timer is not re-armed after it is stopped before freeing, a new shutdown state is added to the timer code. The API timer_shutdown_sync() and timer_shutdown() must be called before the object that holds the timer can be freed. Update the documentation to reflect this new workflow. [ tglx: Updated to the new semantics and updated the zh_CN version ] Signed-off-by: Steven Rostedt (Google) Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/r/20221110064147.712934793@goodmis.org Link: https://lore.kernel.org/r/20221123201625.375284489@linutronix.de Documentation/RCU/Design/Requirements/Requirements.rst | 2 +- Documentation/core-api/local_ops.rst | 2 +- Documentation/kernel-hacking/locking.rst | 5 +++++ Documentation/translations/zh_CN/core-api/local_ops.rst | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) commit f571faf6e443b6011ccb585d57866177af1f643c Author: Thomas Gleixner Date: Wed Nov 23 21:18:53 2022 +0100 timers: Provide timer_shutdown[_sync]() Tearing down timers which have circular dependencies to other functionality, e.g. workqueues, where the timer can schedule work and work can arm timers, is not trivial. In those cases it is desired to shutdown the timer in a way which prevents rearming of the timer. The mechanism to do so is to set timer->function to NULL and use this as an indicator for the timer arming functions to ignore the (re)arm request. Expose new interfaces for this: timer_shutdown_sync() and timer_shutdown(). timer_shutdown_sync() has the same functionality as timer_delete_sync() plus the NULL-ification of the timer function. timer_shutdown() has the same functionality as timer_delete() plus the NULL-ification of the timer function. In both cases the rearming of the timer is prevented by silently discarding rearm attempts due to timer->function being NULL. Co-developed-by: Steven Rostedt Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home Link: https://lore.kernel.org/all/20221110064101.429013735@goodmis.org Link: https://lore.kernel.org/r/20221123201625.314230270@linutronix.de include/linux/timer.h | 2 ++ kernel/time/timer.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) commit 0cc04e80458a822300b93f82ed861a513edde194 Author: Thomas Gleixner Date: Wed Nov 23 21:18:52 2022 +0100 timers: Add shutdown mechanism to the internal functions Tearing down timers which have circular dependencies to other functionality, e.g. workqueues, where the timer can schedule work and work can arm timers, is not trivial. In those cases it is desired to shutdown the timer in a way which prevents rearming of the timer. The mechanism to do so is to set timer->function to NULL and use this as an indicator for the timer arming functions to ignore the (re)arm request. Add a shutdown argument to the relevant internal functions which makes the actual deactivation code set timer->function to NULL which in turn prevents rearming of the timer. Co-developed-by: Steven Rostedt Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home Link: https://lore.kernel.org/all/20221110064101.429013735@goodmis.org Link: https://lore.kernel.org/r/20221123201625.253883224@linutronix.de kernel/time/timer.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 8 deletions(-) commit 8553b5f2774a66b1f293b7d783934210afb8f23c Author: Thomas Gleixner Date: Wed Nov 23 21:18:50 2022 +0100 timers: Split [try_to_]del_timer[_sync]() to prepare for shutdown mode Tearing down timers which have circular dependencies to other functionality, e.g. workqueues, where the timer can schedule work and work can arm timers, is not trivial. In those cases it is desired to shutdown the timer in a way which prevents rearming of the timer. The mechanism to do so is to set timer->function to NULL and use this as an indicator for the timer arming functions to ignore the (re)arm request. Split the inner workings of try_do_del_timer_sync(), del_timer_sync() and del_timer() into helper functions to prepare for implementing the shutdown functionality. No functional change. Co-developed-by: Steven Rostedt Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home Link: https://lore.kernel.org/all/20221110064101.429013735@goodmis.org Link: https://lore.kernel.org/r/20221123201625.195147423@linutronix.de kernel/time/timer.c | 143 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 92 insertions(+), 51 deletions(-) commit d02e382cef06cc73561dd32dfdc171c00dcc416d Author: Thomas Gleixner Date: Thu Nov 24 09:22:36 2022 +0100 timers: Silently ignore timers with a NULL function Tearing down timers which have circular dependencies to other functionality, e.g. workqueues, where the timer can schedule work and work can arm timers, is not trivial. In those cases it is desired to shutdown the timer in a way which prevents rearming of the timer. The mechanism to do so is to set timer->function to NULL and use this as an indicator for the timer arming functions to ignore the (re)arm request. In preparation for that replace the warnings in the relevant code paths with checks for timer->function == NULL. If the pointer is NULL, then discard the rearm request silently. Add debug_assert_init() instead of the WARN_ON_ONCE(!timer->function) checks so that debug objects can warn about non-initialized timers. The warning of debug objects does not warn if timer->function == NULL. It warns when timer was not initialized using timer_setup[_on_stack]() or via DEFINE_TIMER(). If developers fail to enable debug objects and then waste lots of time to figure out why their non-initialized timer is not firing, they deserve it. Same for initializing a timer with a NULL function. Co-developed-by: Steven Rostedt Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home Link: https://lore.kernel.org/all/20221110064101.429013735@goodmis.org Link: https://lore.kernel.org/r/87wn7kdann.ffs@tglx kernel/time/timer.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 5 deletions(-) commit 87bdd932e85881895d4720255b40ac28749c4e32 Author: Thomas Gleixner Date: Wed Nov 23 21:18:47 2022 +0100 Documentation: Replace del_timer/del_timer_sync() Adjust to the new preferred function names. Suggested-by: Steven Rostedt Signed-off-by: Thomas Gleixner Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/r/20221123201625.075320635@linutronix.de Documentation/RCU/Design/Requirements/Requirements.rst | 2 +- Documentation/core-api/local_ops.rst | 2 +- Documentation/kernel-hacking/locking.rst | 11 +++++------ Documentation/timers/hrtimers.rst | 2 +- Documentation/translations/it_IT/kernel-hacking/locking.rst | 10 +++++----- Documentation/translations/zh_CN/core-api/local_ops.rst | 2 +- 6 files changed, 14 insertions(+), 15 deletions(-) commit bb663f0f3c396c6d05f6c5eeeea96ced20ff112e Author: Thomas Gleixner Date: Wed Nov 23 21:18:45 2022 +0100 timers: Rename del_timer() to timer_delete() The timer related functions do not have a strict timer_ prefixed namespace which is really annoying. Rename del_timer() to timer_delete() and provide del_timer() as a wrapper. Document that del_timer() is not for new code. Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Steven Rostedt (Google) Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/r/20221123201625.015535022@linutronix.de include/linux/timer.h | 15 ++++++++++++++- kernel/time/timer.c | 6 +++--- 2 files changed, 17 insertions(+), 4 deletions(-) commit 9b13df3fb64ee95e2397585404e442afee2c7d4f Author: Thomas Gleixner Date: Wed Nov 23 21:18:44 2022 +0100 timers: Rename del_timer_sync() to timer_delete_sync() The timer related functions do not have a strict timer_ prefixed namespace which is really annoying. Rename del_timer_sync() to timer_delete_sync() and provide del_timer_sync() as a wrapper. Document that del_timer_sync() is not for new code. Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Steven Rostedt (Google) Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/r/20221123201624.954785441@linutronix.de include/linux/timer.h | 15 ++++++++++++++- kernel/time/timer.c | 18 +++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) commit 168f6b6ffbeec0b9333f3582e4cf637300858db5 Author: Thomas Gleixner Date: Wed Nov 23 21:18:42 2022 +0100 timers: Use del_timer_sync() even on UP del_timer_sync() is assumed to be pointless on uniprocessor systems and can be mapped to del_timer() because in theory del_timer() can never be invoked while the timer callback function is executed. This is not entirely true because del_timer() can be invoked from interrupt context and therefore hit in the middle of a running timer callback. Contrary to that del_timer_sync() is not allowed to be invoked from interrupt context unless the affected timer is marked with TIMER_IRQSAFE. del_timer_sync() has proper checks in place to detect such a situation. Give up on the UP optimization and make del_timer_sync() unconditionally available. Co-developed-by: Steven Rostedt Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home Link: https://lore.kernel.org/all/20221110064101.429013735@goodmis.org Link: https://lore.kernel.org/r/20221123201624.888306160@linutronix.de include/linux/timer.h | 7 +------ kernel/time/timer.c | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) commit 14f043f1340bf30bc60af127bff39f55889fef26 Author: Thomas Gleixner Date: Wed Nov 23 21:18:40 2022 +0100 timers: Update kernel-doc for various functions The kernel-doc of timer related functions is partially uncomprehensible word salad. Rewrite it to make it useful. Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/r/20221123201624.828703870@linutronix.de kernel/time/timer.c | 148 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 90 insertions(+), 58 deletions(-) commit 82ed6f7ef58f9634fe4462dd721902c580f01569 Author: Thomas Gleixner Date: Wed Nov 23 21:18:39 2022 +0100 timers: Replace BUG_ON()s The timer code still has a few BUG_ON()s left which are crashing the kernel in situations where it still can recover or simply refuse to take an action. Remove the one in the hotplug callback which checks for the CPU being offline. If that happens then the whole hotplug machinery will explode in colourful ways. Replace the rest with WARN_ON_ONCE() and conditional returns where appropriate. Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/r/20221123201624.769128888@linutronix.de kernel/time/timer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 9a5a305686971f4be10c6d7251c8348d74b3e014 Author: Thomas Gleixner Date: Wed Nov 23 21:18:37 2022 +0100 timers: Get rid of del_singleshot_timer_sync() del_singleshot_timer_sync() used to be an optimization for deleting timers which are not rearmed from the timer callback function. This optimization turned out to be broken and got mapped to del_timer_sync() about 17 years ago. Get rid of the undocumented indirection and use del_timer_sync() directly. No functional change. Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/r/20221123201624.706987932@linutronix.de drivers/char/tpm/tpm-dev-common.c | 4 ++-- drivers/staging/wlan-ng/hfa384x_usb.c | 4 ++-- drivers/staging/wlan-ng/prism2usb.c | 6 +++--- include/linux/timer.h | 2 -- kernel/time/timer.c | 2 +- net/sunrpc/xprt.c | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) commit 6e1fc2591f116dfb20b65cf27356475461d61bd8 Author: Steven Rostedt (Google) Date: Wed Nov 23 21:18:36 2022 +0100 clocksource/drivers/sp804: Do not use timer namespace for timer_shutdown() function A new "shutdown" timer state is being added to the generic timer code. One of the functions to change the timer into the state is called "timer_shutdown()". This means that there can not be other functions called "timer_shutdown()" as the timer code owns the "timer_*" name space. Rename timer_shutdown() to evt_timer_shutdown() to avoid this conflict. Signed-off-by: Steven Rostedt (Google) Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lkml.kernel.org/r/20221106212702.182883323@goodmis.org Link: https://lore.kernel.org/all/20221105060155.592778858@goodmis.org/ Link: https://lore.kernel.org/r/20221110064147.158230501@goodmis.org Link: https://lore.kernel.org/r/20221123201624.634354813@linutronix.de drivers/clocksource/timer-sp804.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 73737a5833ace25a8408b0d3b783637cb6bf29d1 Author: Steven Rostedt (Google) Date: Wed Nov 23 21:18:34 2022 +0100 clocksource/drivers/arm_arch_timer: Do not use timer namespace for timer_shutdown() function A new "shutdown" timer state is being added to the generic timer code. One of the functions to change the timer into the state is called "timer_shutdown()". This means that there can not be other functions called "timer_shutdown()" as the timer code owns the "timer_*" name space. Rename timer_shutdown() to arch_timer_shutdown() to avoid this conflict. Signed-off-by: Steven Rostedt (Google) Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Acked-by: Marc Zyngier Link: https://lkml.kernel.org/r/20221106212702.002251651@goodmis.org Link: https://lore.kernel.org/all/20221105060155.409832154@goodmis.org/ Link: https://lore.kernel.org/r/20221110064146.981725531@goodmis.org Link: https://lore.kernel.org/r/20221123201624.574672568@linutronix.de drivers/clocksource/arm_arch_timer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 80b55772d41d8afec68dbc4ff0368a9fe5d1f390 Author: Steven Rostedt (Google) Date: Wed Nov 23 21:18:32 2022 +0100 ARM: spear: Do not use timer namespace for timer_shutdown() function A new "shutdown" timer state is being added to the generic timer code. One of the functions to change the timer into the state is called "timer_shutdown()". This means that there can not be other functions called "timer_shutdown()" as the timer code owns the "timer_*" name space. Rename timer_shutdown() to spear_timer_shutdown() to avoid this conflict. Signed-off-by: Steven Rostedt (Google) Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Acked-by: Arnd Bergmann Acked-by: Viresh Kumar Link: https://lkml.kernel.org/r/20221106212701.822440504@goodmis.org Link: https://lore.kernel.org/all/20221105060155.228348078@goodmis.org/ Link: https://lore.kernel.org/r/20221110064146.810953418@goodmis.org Link: https://lore.kernel.org/r/20221123201624.513863211@linutronix.de arch/arm/mach-spear/time.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b0b0aa5d858d4d2fe39a5e4486e0550e858108f6 Author: Thomas Gleixner Date: Wed Nov 23 21:18:31 2022 +0100 Documentation: Remove bogus claim about del_timer_sync() del_timer_sync() does not return the number of times it tried to delete the timer which rearms itself. It's clearly documented: The function returns whether it has deactivated a pending timer or not. This part of the documentation is from 2003 where del_timer_sync() really returned the number of deletion attempts for unknown reasons. The code was rewritten in 2005, but the documentation was not updated. Signed-off-by: Thomas Gleixner Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/r/20221123201624.452282769@linutronix.de Documentation/kernel-hacking/locking.rst | 3 +-- Documentation/translations/it_IT/kernel-hacking/locking.rst | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) commit 90b0296ece4bd8f70419f0addc1171be6feee195 Author: Ye Bin Date: Mon Nov 7 11:39:56 2022 +0800 block: fix crash in 'blk_mq_elv_switch_none' Syzbot found the following issue: general protection fault, probably for non-canonical address 0xdffffc000000001d: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x00000000000000e8-0x00000000000000ef] CPU: 0 PID: 5234 Comm: syz-executor931 Not tainted 6.1.0-rc3-next-20221102-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 RIP: 0010:__elevator_get block/elevator.h:94 [inline] RIP: 0010:blk_mq_elv_switch_none block/blk-mq.c:4593 [inline] RIP: 0010:__blk_mq_update_nr_hw_queues block/blk-mq.c:4658 [inline] RIP: 0010:blk_mq_update_nr_hw_queues+0x304/0xe40 block/blk-mq.c:4709 RSP: 0018:ffffc90003cdfc08 EFLAGS: 00010206 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: 000000000000001d RSI: 0000000000000002 RDI: 00000000000000e8 RBP: ffff88801dbd0000 R08: ffff888027c89398 R09: ffffffff8de2e517 R10: fffffbfff1bc5ca2 R11: 0000000000000000 R12: ffffc90003cdfc70 R13: ffff88801dbd0008 R14: ffff88801dbd03f8 R15: ffff888027c89380 FS: 0000555557259300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000005d84c8 CR3: 000000007a7cb000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: nbd_start_device+0x153/0xc30 drivers/block/nbd.c:1355 nbd_start_device_ioctl drivers/block/nbd.c:1405 [inline] __nbd_ioctl drivers/block/nbd.c:1481 [inline] nbd_ioctl+0x5a1/0xbd0 drivers/block/nbd.c:1521 blkdev_ioctl+0x36e/0x800 block/ioctl.c:614 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/0x200 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd As after dd6f7f17bf58 commit move '__elevator_get(qe->type)' before set 'qe->type', so will lead to access wild pointer. To solve above issue get 'qe->type' after set 'qe->type'. Reported-by: syzbot+746a4eece09f86bc39d7@syzkaller.appspotmail.com Fixes:dd6f7f17bf58("block: add proper helpers for elevator_type module refcount management") Signed-off-by: Ye Bin Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221107033956.3276891-1-yebin@huaweicloud.com Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9f9ef15b84222f4cc686b1013ee3fd192b0bab8 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:48 2022 +0100 regulator: pv88080-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-555-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/pv88080-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8348c710b51bac713a6fd2e07d64eb71d5680e2e Author: Uwe Kleine-König Date: Fri Nov 18 23:44:47 2022 +0100 regulator: pfuze100-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-554-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/pfuze100-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 69518d21deaa448be65b7c0be67aab230e88eaa7 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:36 2022 +0100 regulator: isl6271a-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-543-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/isl6271a-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 655425650f5e361224a86aa11bf3c044bf04df2a Author: Uwe Kleine-König Date: Fri Nov 18 23:44:35 2022 +0100 regulator: fan53555: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-542-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/fan53555.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3d2a78ae5df5d7f48c002e5f73d18d8c7628d266 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:32 2022 +0100 regulator: act8865-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-539-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/act8865-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8692814b77ca4228a99da8a005de0acf40af6132 Author: Wang ShaoBo Date: Thu Nov 24 09:58:17 2022 +0800 drbd: destroy workqueue when drbd device was freed A submitter workqueue is dynamically allocated by init_submitter() called by drbd_create_device(), we should destroy it when this device is not needed or destroyed. Fixes: 113fef9e20e0 ("drbd: prepare to queue write requests on a submit worker") Signed-off-by: Wang ShaoBo Link: https://lore.kernel.org/r/20221124015817.2729789-3-bobo.shaobowang@huawei.com Signed-off-by: Jens Axboe drivers/block/drbd/drbd_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6e7b854e4c1b02dba00760dfa79d8dbf6cce561e Author: Wang ShaoBo Date: Thu Nov 24 09:58:16 2022 +0800 drbd: remove call to memset before free device/resource/connection This revert c2258ffc56f2 ("drbd: poison free'd device, resource and connection structs"), add memset is odd here for debugging, there are some methods to accurately show what happened, such as kdump. Signed-off-by: Wang ShaoBo Link: https://lore.kernel.org/r/20221124015817.2729789-2-bobo.shaobowang@huawei.com Signed-off-by: Jens Axboe drivers/block/drbd/drbd_main.c | 3 --- 1 file changed, 3 deletions(-) commit 015d02f48537cf2d1a65eeac50717566f9db6eec Author: Damien Le Moal Date: Thu Nov 24 11:12:08 2022 +0900 block: mq-deadline: Do not break sequential write streams to zoned HDDs mq-deadline ensures an in order dispatching of write requests to zoned block devices using a per zone lock (a bit). This implies that for any purely sequential write workload, the drive is exercised most of the time at a maximum queue depth of one. However, when such sequential write workload crosses a zone boundary (when sequentially writing multiple contiguous zones), zone write locking may prevent the last write to one zone to be issued (as the previous write is still being executed) but allow the first write to the following zone to be issued (as that zone is not yet being writen and not locked). This result in an out of order delivery of the sequential write commands to the device every time a zone boundary is crossed. While such behavior does not break the sequential write constraint of zoned block devices (and does not generate any write error), some zoned hard-disks react badly to seeing these out of order writes, resulting in lower write throughput. This problem can be addressed by always dispatching the first request of a stream of sequential write requests, regardless of the zones targeted by these sequential writes. To do so, the function deadline_skip_seq_writes() is introduced and used in deadline_next_request() to select the next write command to issue if the target device is an HDD (blk_queue_nonrot() being false). deadline_fifo_request() is modified using the new deadline_earlier_request() and deadline_is_seq_write() helpers to ignore requests in the fifo list that have a preceding request in lba order that is sequential. With this fix, a sequential write workload executed with the following fio command: fio --name=seq-write --filename=/dev/sda --zonemode=zbd --direct=1 \ --size=68719476736 --ioengine=libaio --iodepth=32 --rw=write \ --bs=65536 results in an increase from 225 MB/s to 250 MB/s of the write throughput of an SMR HDD (11% increase). Cc: Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20221124021208.242541-3-damien.lemoal@opensource.wdc.com Signed-off-by: Jens Axboe block/mq-deadline.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 4 deletions(-) commit 2820e5d0820ac4daedff1272616a53d9c7682fd2 Author: Damien Le Moal Date: Thu Nov 24 11:12:07 2022 +0900 block: mq-deadline: Fix dd_finish_request() for zoned devices dd_finish_request() tests if the per prio fifo_list is not empty to determine if request dispatching must be restarted for handling blocked write requests to zoned devices with a call to blk_mq_sched_mark_restart_hctx(). While simple, this implementation has 2 problems: 1) Only the priority level of the completed request is considered. However, writes to a zone may be blocked due to other writes to the same zone using a different priority level. While this is unlikely to happen in practice, as writing a zone with different IO priorirites does not make sense, nothing in the code prevents this from happening. 2) The use of list_empty() is dangerous as dd_finish_request() does not take dd->lock and may run concurrently with the insert and dispatch code. Fix these 2 problems by testing the write fifo list of all priority levels using the new helper dd_has_write_work(), and by testing each fifo list using list_empty_careful(). Fixes: c807ab520fc3 ("block/mq-deadline: Add I/O priority support") Cc: Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20221124021208.242541-2-damien.lemoal@opensource.wdc.com Signed-off-by: Jens Axboe block/mq-deadline.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 67df56d99df31dfb109fe6e586c6ee7c5367dc3f Merge: 1a165a067ffd bcd58c8ca0f8 Author: Mark Brown Date: Thu Nov 24 13:25:53 2022 +0000 Introduce Socionext F_OSPI SPI flash controller Merge series from Kunihiko Hayashi : This series adds dt-bindings and a driver for Socionext F_OSPI controller for connecting an SPI Flash memory over up to 8-bit wide bus. The controller supports up to 4 chip selects. commit 0c3852adae830d09d7dd62f03173c0225f617c86 Merge: be3392b65f2b c3eb11fbb826 Author: Arnaldo Carvalho de Melo Date: Thu Nov 24 10:08:03 2022 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo commit be3392b65f2b989badcadf5f6a353c7924d3ccf4 Author: Ian Rogers Date: Thu Nov 17 18:46:07 2022 -0800 perf list: List callback support for libpfm Missed previously, add libpfm support for 'perf list' callbacks and thereby JSON support. Committer notes: Add __maybe_unused to the args of the new print_libpfm_events() in the else HAVE_LIBPFM block. Fixes: e42b0ee61282a2f9 ("perf list: Add JSON output option") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221118024607.409083-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pfm.c | 154 ++++++++++++++++++++++---------------------------- tools/perf/util/pfm.h | 7 ++- 2 files changed, 71 insertions(+), 90 deletions(-) commit 1284ded7d05952f2657f5abeeda5a3f74ca9cffc Author: Ian Rogers Date: Thu Nov 17 18:46:06 2022 -0800 perf list: JSON escape encoding improvements Use strbuf to make the string under construction's length unlimited. Use the format %s to mean a literal string copy and %S to signify a need to escape the string. Add supported for escaping a newline character. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221118024607.409083-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-list.c | 109 ++++++++++++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 42 deletions(-) commit 1a9c20b45d193ead21dc63b07d1abb40b0a237c2 Author: Ian Rogers Date: Thu Nov 17 18:46:05 2022 -0800 perf list: Support newlines in wordwrap Rather than a newline starting from column 0, record a newline was seen and then add the newline and space before the next word. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221118024607.409083-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-list.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit f1a033cc6b9eb6d80322008422df3c87aa5d47a0 Author: Juergen Gross Date: Wed Nov 9 14:44:18 2022 +0100 x86/paravirt: Use common macro for creating simple asm paravirt functions There are some paravirt assembler functions which are sharing a common pattern. Introduce a macro DEFINE_PARAVIRT_ASM() for creating them. Note that this macro is including explicit alignment of the generated functions, leading to __raw_callee_save___kvm_vcpu_is_preempted(), _paravirt_nop() and paravirt_ret0() to be aligned at 4 byte boundaries now. The explicit _paravirt_nop() prototype in paravirt.c isn't needed, as it is included in paravirt_types.h already. Signed-off-by: Juergen Gross Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Srivatsa S. Bhat (VMware) Link: https://lkml.kernel.org/r/20221109134418.6516-1-jgross@suse.com arch/x86/include/asm/paravirt.h | 12 ++++++++ arch/x86/include/asm/qspinlock_paravirt.h | 47 +++++++++++++------------------ arch/x86/kernel/kvm.c | 19 ++++--------- arch/x86/kernel/paravirt.c | 23 ++------------- 4 files changed, 40 insertions(+), 61 deletions(-) commit 6f520ce17920b3cdfbd2479b3ccf27f9706219d0 Author: Ajay Kaher Date: Wed Nov 23 15:48:16 2022 +0530 perf symbol: correction while adjusting symbol perf doesn't provide proper symbol information for specially crafted .debug files. Sometimes .debug file may not have similar program header as runtime ELF file. For example if we generate .debug file using objcopy --only-keep-debug resulting file will not contain .text, .data and other runtime sections. That means corresponding program headers will have zero FileSiz and modified Offset. Example: program header of text section of libxxx.so: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x00000000003d3000 0x00000000003d3000 0x00000000003d3000 0x000000000055ae80 0x000000000055ae80 R E 0x1000 Same program header after executing: objcopy --only-keep-debug libxxx.so libxxx.so.debug LOAD 0x0000000000001000 0x00000000003d3000 0x00000000003d3000 0x0000000000000000 0x000000000055ae80 R E 0x1000 Offset and FileSiz have been changed. Following formula will not provide correct value, if program header taken from .debug file (syms_ss): sym.st_value -= phdr.p_vaddr - phdr.p_offset; Correct program header information is located inside runtime ELF file (runtime_ss). Fixes: 2d86612aacb7805f ("perf symbol: Correct address for bss symbols") Signed-off-by: Ajay Kaher Cc: Alexander Shishkin Cc: Alexey Makhalov Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Srivatsa S. Bhat Cc: Steven Rostedt (VMware) Cc: Vasavi Sirnapalli Link: http://lore.kernel.org/lkml/1669198696-50547-1-git-send-email-akaher@vmware.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5736b1b70170e15d66ec02e500db917ef42ade83 Author: Kees Cook Date: Sat Sep 3 00:37:06 2022 -0700 x86/paravirt: Remove clobber bitmask from .parainstructions The u16 "clobber" value is not used in .parainstructions since commit 27876f3882fd ("x86/paravirt: Remove clobbers from struct paravirt_patch_site") Remove the u16 from the section macro, the argument from all macros, and all now-unused CLBR_* macros. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220903073706.3193746-1-keescook@chromium.org arch/x86/include/asm/paravirt_types.h | 61 +++++++---------------------------- 1 file changed, 12 insertions(+), 49 deletions(-) commit 4c12f41a14d6c4dd2b4e387eaea249cee68bc01a Author: Zhengjun Xing Date: Thu Nov 24 11:14:41 2022 +0800 perf vendor events intel: Update events and metrics for alderlake Update JSON events and metrics for alderlake to perf. Based on ADL JSON event list v1.16: https://github.com/intel/perfmon/tree/main/ADL/events Generate the event list and metrics with the converter scripts: https://github.com/intel/perfmon/pull/32 Reviewed-by: Kan Liang Signed-off-by: Xing Zhengjun Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221124031441.110134-4-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/alderlake/adl-metrics.json | 73 +- .../perf/pmu-events/arch/x86/alderlake/cache.json | 1391 ++++++-------- .../arch/x86/alderlake/floating-point.json | 91 +- .../pmu-events/arch/x86/alderlake/frontend.json | 224 +-- .../perf/pmu-events/arch/x86/alderlake/memory.json | 214 +-- .../perf/pmu-events/arch/x86/alderlake/other.json | 132 +- .../pmu-events/arch/x86/alderlake/pipeline.json | 1932 +++++++------------- .../arch/x86/alderlake/uncore-memory.json | 185 +- .../arch/x86/alderlake/uncore-other.json | 73 +- .../arch/x86/alderlake/virtual-memory.json | 223 +-- tools/perf/pmu-events/arch/x86/mapfile.csv | 2 +- 11 files changed, 1687 insertions(+), 2853 deletions(-) commit 2bb3fbad4c3b3b5b6d5ac537b6ab404443fc5224 Author: Zhengjun Xing Date: Thu Nov 24 11:14:40 2022 +0800 perf vendor events intel: Add metrics for Alderlake-N Add JSON metrics for Alderlake-N to perf. It only included E-core metrics. E-core metrics based on E-core TMA v2.2 (E-core_TMA_Metrics.csv) It is downloaded from: https://github.com/intel/perfmon/ Reviewed-by: Kan Liang Signed-off-by: Xing Zhengjun Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221124031441.110134-3-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/alderlaken/adln-metrics.json | 583 +++++++++++++++++++++ 1 file changed, 583 insertions(+) commit a6a29bcf596141f95fc0f9756ba68de31ba1f46c Author: Zhengjun Xing Date: Thu Nov 24 11:14:39 2022 +0800 perf vendor events intel: Add uncore event list for Alderlake-N Add JSON uncore events for Alderlake-N Based on JSON list v1.16: https://github.com/intel/perfmon/tree/main/ADL/events/ Reviewed-by: Kan Liang Signed-off-by: Xing Zhengjun Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221124031441.110134-2-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/alderlaken/uncore-memory.json | 175 +++++++++++++++++++++ .../arch/x86/alderlaken/uncore-other.json | 33 ++++ 2 files changed, 208 insertions(+) commit eafcbb6838b67ae67bcab3f794dff593250a71bb Author: Zhengjun Xing Date: Thu Nov 24 11:14:38 2022 +0800 perf vendor events intel: Add core event list for Alderlake-N Alderlake-N only has E-core, it has been moved to non-hybrid code path on the kernel side, so add the cpuid for Alderlake-N separately. Add core event list for Alderlake-N, it is based on the ADL gracemont v1.16 JSON file. https://github.com/intel/perfmon/tree/main/ADL/events/ Reviewed-by: Kan Liang Signed-off-by: Xing Zhengjun Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221124031441.110134-1-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/alderlaken/cache.json | 330 +++++++++++++ .../arch/x86/alderlaken/floating-point.json | 18 + .../pmu-events/arch/x86/alderlaken/frontend.json | 26 + .../pmu-events/arch/x86/alderlaken/memory.json | 81 ++++ .../perf/pmu-events/arch/x86/alderlaken/other.json | 38 ++ .../pmu-events/arch/x86/alderlaken/pipeline.json | 533 +++++++++++++++++++++ .../arch/x86/alderlaken/virtual-memory.json | 47 ++ tools/perf/pmu-events/arch/x86/mapfile.csv | 3 +- 8 files changed, 1075 insertions(+), 1 deletion(-) commit 765d4e497fc51c64b50e5947d0b63bc3ccbd83d3 Author: Namhyung Kim Date: Wed Nov 23 10:02:08 2022 -0800 perf stat: Tidy up JSON metric-only output when no metrics It printed empty strings for each metric. I guess it's needed for CSV output to match the column number. We could just ignore the empty metrics in JSON but it ended up with a broken JSON object with a trailing comma. So I added a dummy '"metric-value" : "none"' part. To do that, it needs to pass struct outstate to print_metric_end() to check if any metric value is printed or not. Before: # perf stat -aj --metric-only --per-socket --for-each-cgroup system.slice true {"socket" : "S0", "cpu-count" : 8, "cgroup" : "system.slice", "" : "", "" : "", "" : "", "" : "", "" : "", "" : "", "" : "", "" : ""} After: # perf stat -aj --metric-only --per-socket --for-each-cgroup system.slice true {"socket" : "S0", "cpu-count" : 8, "cgroup" : "system.slice", "metric-value" : "none"} Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-16-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit c4b41b83c25073c09bfcc4e5ec496c9dd316656b Author: Namhyung Kim Date: Wed Nov 23 10:02:07 2022 -0800 perf stat: Rename "aggregate-number" to "cpu-count" in JSON As the JSON output has been broken for a little while, I guess there are not many users. Let's rename the field to more intuitive one. :) Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-15-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ab6baaae273572909f1e957fc27a9459fc95dd8c Author: Namhyung Kim Date: Wed Nov 23 10:02:06 2022 -0800 perf stat: Fix JSON output in metric-only mode It generated a broken JSON output when aggregation mode or cgroup is used with --metric-only option. Also get rid of the header line and make the output single line for each entry. It needs to know whether the current metric is the first one or not. So add 'first' field in the outstate and mark it false after printing. Before: # perf stat -a -j --metric-only true {"unit" : "GHz"}{"unit" : "insn per cycle"}{"unit" : "branch-misses of all branches"} {{"metric-value" : "0.797"}{"metric-value" : "1.65"}{"metric-value" : "0.89"} ^ # perf stat -a -j --metric-only --per-socket true {"unit" : "GHz"}{"unit" : "insn per cycle"}{"unit" : "branch-misses of all branches"} {"socket" : "S0", "aggregate-number" : 8, {"metric-value" : "0.295"}{"metric-value" : "1.88"}{"metric-value" : "0.64"} ^ After: # perf stat -a -j --metric-only true {"GHz" : "0.990", "insn per cycle" : "2.06", "branch-misses of all branches" : "0.59"} # perf stat -a -j --metric-only --per-socket true {"socket" : "S0", "aggregate-number" : 8, "GHz" : "0.439", "insn per cycle" : "2.14", "branch-misses of all branches" : "0.51"} Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-14-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) commit 5f334d88c25e0dbdbc199ad38becc5cc5aa33081 Author: Namhyung Kim Date: Wed Nov 23 10:02:05 2022 -0800 perf stat: Pass through 'struct outstate' Now most of the print functions take a pointer to the struct outstate. We have one in the evlist__print_counters() and pass it through the child functions. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-13-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/iostat.c | 4 +- tools/perf/util/iostat.c | 3 +- tools/perf/util/iostat.h | 4 +- tools/perf/util/stat-display.c | 102 ++++++++++++++++---------------------- 4 files changed, 50 insertions(+), 63 deletions(-) commit 01577597493dc8bded8a5880fbf84a6d5bf13f1b Author: Namhyung Kim Date: Wed Nov 23 10:02:04 2022 -0800 perf stat: Do not pass runtime_stat to printout() It always passes a pointer to rt_stat as it's the only one. Let's not pass it and directly refer it in the printout(). Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-12-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit e7f4da312259e61877ae8e26d216993c4128bddc Author: Namhyung Kim Date: Wed Nov 23 10:02:03 2022 -0800 perf stat: Pass struct outstate to printout() The printout() takes a lot of arguments and sets an outstate with the value. Instead, we can fill the outstate first and then pass it to reduce the number of arguments. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-11-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) commit 922ae948c429a9b396761f2071eebf6a19688dd2 Author: Namhyung Kim Date: Wed Nov 23 10:02:02 2022 -0800 perf stat: Pass 'struct outstate' to print_metric_begin() It passes prefix and cgroup pointers but the outstate already has them. Let's pass the outstate pointer instead. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-10-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 50 +++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 22 deletions(-) commit 92ccf7f11d68fa55dc82cb7ae01043b3691918cf Author: Namhyung Kim Date: Wed Nov 23 10:02:01 2022 -0800 perf stat: Use 'struct outstate' in evlist__print_counters() This is a preparation for the later cleanup. No functional changes intended. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 991991ab99635d9e368f9671fa8c30ec1113042c Author: Namhyung Kim Date: Wed Nov 23 10:02:00 2022 -0800 perf stat: Pass const char *prefix to display routines This is a minor cleanup and preparation for the later change. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/iostat.h | 2 +- tools/perf/util/stat-display.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) commit ce551ec923445b821893bddfb13c116d7e8fe454 Author: Namhyung Kim Date: Wed Nov 23 10:01:59 2022 -0800 perf stat: Remove metric_only argument in print_counter_aggrdata() It already passes the stat_config argument, then it can find the value in the config. No need to pass it separately. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit f123b2d84ecec9a3c551e745f43d36bba1d69e1c Author: Namhyung Kim Date: Wed Nov 23 10:01:58 2022 -0800 perf stat: Remove prefix argument in print_metric_headers() It always passes a whitespace to the function, thus we can just add it to the function body. Furthermore, it's only used in the normal output mode. Well, actually CSV used it but it doesn't need to since we don't care about the indentation or alignment in the CSV output. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit a7ec1dd2d744208ca814ebde8c97f94e041625ef Author: Namhyung Kim Date: Wed Nov 23 10:01:57 2022 -0800 perf stat: Use scnprintf() in prepare_interval() It should not use sprintf() anymore. Let's pass the buffer size and use the safer scnprintf() instead. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8e55ae24c08fd5bf39b632df72122a7c2591c03c Author: Namhyung Kim Date: Wed Nov 23 10:01:56 2022 -0800 perf stat: Do not align time prefix in CSV output We don't care about the alignment in the CSV output as it's intended for machine processing. Let's get rid of it to make the output more compact. Before: # perf stat -a --summary -I 1 -x, true 0.001149309,219.20,msec,cpu-clock,219322251,100.00,219.200,CPUs utilized 0.001149309,144,,context-switches,219241902,100.00,656.935,/sec 0.001149309,38,,cpu-migrations,219173705,100.00,173.358,/sec 0.001149309,61,,page-faults,219093635,100.00,278.285,/sec 0.001149309,10679310,,cycles,218746228,100.00,0.049,GHz 0.001149309,6288296,,instructions,218589869,100.00,0.59,insn per cycle 0.001149309,1386904,,branches,218428851,100.00,6.327,M/sec 0.001149309,56863,,branch-misses,218219951,100.00,4.10,of all branches summary,219.20,msec,cpu-clock,219322251,100.00,20.025,CPUs utilized summary,144,,context-switches,219241902,100.00,656.935,/sec summary,38,,cpu-migrations,219173705,100.00,173.358,/sec summary,61,,page-faults,219093635,100.00,278.285,/sec summary,10679310,,cycles,218746228,100.00,0.049,GHz summary,6288296,,instructions,218589869,100.00,0.59,insn per cycle summary,1386904,,branches,218428851,100.00,6.327,M/sec summary,56863,,branch-misses,218219951,100.00,4.10,of all branches After: 0.001148449,224.75,msec,cpu-clock,224870589,100.00,224.747,CPUs utilized 0.001148449,176,,context-switches,224775564,100.00,783.103,/sec 0.001148449,38,,cpu-migrations,224707428,100.00,169.079,/sec 0.001148449,61,,page-faults,224629326,100.00,271.416,/sec 0.001148449,12172071,,cycles,224266368,100.00,0.054,GHz 0.001148449,6901907,,instructions,224108764,100.00,0.57,insn per cycle 0.001148449,1515655,,branches,223946693,100.00,6.744,M/sec 0.001148449,70027,,branch-misses,223735385,100.00,4.62,of all branches summary,224.75,msec,cpu-clock,224870589,100.00,21.066,CPUs utilized summary,176,,context-switches,224775564,100.00,783.103,/sec summary,38,,cpu-migrations,224707428,100.00,169.079,/sec summary,61,,page-faults,224629326,100.00,271.416,/sec summary,12172071,,cycles,224266368,100.00,0.054,GHz summary,6901907,,instructions,224108764,100.00,0.57,insn per cycle summary,1515655,,branches,223946693,100.00,6.744,M/sec summary,70027,,branch-misses,223735385,100.00,4.62,of all branches Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6d74ed369d4342bb7d4fecbc1cde6061b5bb5604 Author: Namhyung Kim Date: Wed Nov 23 10:01:55 2022 -0800 perf stat: Move summary prefix printing logic in CSV output It matches to the prefix (interval timestamp), so better to have them together. No functional change intended. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 15792642db6946890416a6d1616b03ab25c26fa7 Author: Namhyung Kim Date: Wed Nov 23 10:01:54 2022 -0800 perf stat: Fix cgroup display in JSON output It missed the 'else' keyword after checking json output mode. Fixes: 41cb875242e71bf1 ("perf stat: Split print_cgroup() function") Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221123180208.2068936-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9ffb8ee7b65a468474d6a2be7e9cca4b8f8ea5f Author: Tiezhu Yang Date: Fri Nov 18 17:40:29 2022 +0800 powerpc: Use "grep -E" instead of "egrep" The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl arch/powerpc` 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: Michael Ellerman Link: https://lore.kernel.org/r/1668764429-11540-1-git-send-email-yangtiezhu@loongson.cn arch/powerpc/boot/wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f622f3f80cbf8999ff5955a2fcfbd801a1f32e0 Author: Nayna Jain Date: Sun Nov 6 15:58:39 2022 -0500 powerpc/pseries: fix plpks_read_var() code for different consumers Even though plpks_read_var() is currently called to read variables owned by different consumers, it internally supports only OS consumer. Fix plpks_read_var() to handle different consumers correctly. Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore") Signed-off-by: Nayna Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221106205839.600442-7-nayna@linux.ibm.com arch/powerpc/platforms/pseries/plpks.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 212dd5cfbee7815f3c665a51c501701edb881599 Author: Nayna Jain Date: Sun Nov 6 15:58:38 2022 -0500 powerpc/pseries: replace kmalloc with kzalloc in PLPKS driver Replace kmalloc with kzalloc in construct_auth() function to default initialize structure with zeroes. Signed-off-by: Nayna Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221106205839.600442-6-nayna@linux.ibm.com arch/powerpc/platforms/pseries/plpks.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8888ea772972323362660e9a1339175294664a6c Author: Nayna Jain Date: Sun Nov 6 15:58:37 2022 -0500 powerpc/pseries: cleanup error logs in plpks driver Logging H_CALL return codes in PLPKS driver are easy to confuse with Linux error codes. Let the caller of the function log the converted linux error code. Signed-off-by: Nayna Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221106205839.600442-5-nayna@linux.ibm.com arch/powerpc/platforms/pseries/plpks.c | 10 ---------- 1 file changed, 10 deletions(-) commit bb8e4c7cb759b90a04f2e94056b50288ff46a0ed Author: Nayna Jain Date: Sun Nov 6 15:58:36 2022 -0500 powerpc/pseries: Return -EIO instead of -EINTR for H_ABORTED error Some commands for eg. "cat" might continue to retry on encountering EINTR. This is not expected for original error code H_ABORTED. Map H_ABORTED to more relevant Linux error code EIO. Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore") Signed-off-by: Nayna Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221106205839.600442-4-nayna@linux.ibm.com arch/powerpc/platforms/pseries/plpks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af223e1728c448073d1e12fe464bf344310edeba Author: Nayna Jain Date: Sun Nov 6 15:58:35 2022 -0500 powerpc/pseries: Fix the H_CALL error code in PLPKS driver PAPR Spec defines H_P1 actually as H_PARAMETER and maps H_ABORTED to a different numerical value. Fix the error codes as per PAPR Specification. Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore") Signed-off-by: Nayna Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221106205839.600442-3-nayna@linux.ibm.com arch/powerpc/include/asm/hvcall.h | 3 +-- arch/powerpc/platforms/pseries/plpks.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit 2330757e0be0acad88852e211dcd6106390a729b Author: Nayna Jain Date: Sun Nov 6 15:58:34 2022 -0500 powerpc/pseries: fix the object owners enum value in plpks driver OS_VAR_LINUX enum in PLPKS driver should be 0x02 instead of 0x01. Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore") Signed-off-by: Nayna Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221106205839.600442-2-nayna@linux.ibm.com arch/powerpc/platforms/pseries/plpks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59dc2d94bc12dac53a5d2368ad97ca24e7cc5682 Author: Chen Lifu Date: Thu Nov 3 15:01:22 2022 +0800 powerpc/powermac: Fix symbol not declared warnings 1. ppc_override_l2cr and ppc_override_l2cr_value are only used in l2cr_init() function, remove them and used *l2cr directly. 2. has_l2cache is not used outside of the file, so mark it static and do not initialise statics to 0. Fixes the following warnings: arch/powerpc/platforms/powermac/setup.c:73:5: warning: symbol 'ppc_override_l2cr' was not declared. Should it be static? arch/powerpc/platforms/powermac/setup.c:74:5: warning: symbol 'ppc_override_l2cr_value' was not declared. Should it be static? arch/powerpc/platforms/powermac/setup.c:75:5: warning: symbol 'has_l2cache' was not declared. Should it be static? Signed-off-by: Chen Lifu Reviewed-by: Christophe Leroy [mpe: Unwrap printk string] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221103070122.340773-1-chenlifu@huawei.com arch/powerpc/platforms/powermac/setup.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit afa1cda4097077e37639ca7098c2147e1885b2df Author: Bo Liu Date: Mon Oct 31 02:37:06 2022 -0400 powerpc/pseries/eeh: Fix some kernel-doc warnings Fixes the following W=1 kernel build warning(s): arch/powerpc/platforms/pseries/eeh_pseries.c:163: warning: Function parameter or member 'config_addr' not described in 'pseries_eeh_phb_reset' arch/powerpc/platforms/pseries/eeh_pseries.c:163: warning: Excess function parameter 'config_adddr' description in 'pseries_eeh_phb_reset' arch/powerpc/platforms/pseries/eeh_pseries.c:198: warning: Function parameter or member 'config_addr' not described in 'pseries_eeh_phb_configure_bridge' arch/powerpc/platforms/pseries/eeh_pseries.c:198: warning: Excess function parameter 'config_adddr' description in 'pseries_eeh_phb_configure_bridge' Signed-off-by: Bo Liu Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221031063706.2770-1-liubo03@inspur.com arch/powerpc/platforms/pseries/eeh_pseries.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f668027521561d1071ccf54500c82a58a1918b2b Author: Russell Currey Date: Mon Oct 24 15:13:46 2022 +1100 powerpc/8xx: Fix warning in hw_breakpoint_handler() In hw_breakpoint_handler(), ea is set by wp_get_instr_detail() except for 8xx, leading the variable to be passed uninitialised to wp_check_constraints(). This is safe as wp_check_constraints() returns early without using ea, so just set it to make the compiler happy. Signed-off-by: Russell Currey Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221024041346.103608-1-ruscur@russell.cc arch/powerpc/kernel/hw_breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad8284ead833379fc57d90e50dbae1352b116c2b Author: Shaomin Deng Date: Sat Oct 29 05:46:43 2022 -0400 selftests/powerpc: Remove repeated word in comments Remove the repeated word "not" in comments. Signed-off-by: Shaomin Deng Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221029094643.5595-1-dengshaomin@cdjrlc.com tools/testing/selftests/powerpc/include/pkeys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04757c5e21ea17615b66f45e38f1cab32a7a0654 Author: Colin Ian King Date: Fri Oct 21 09:45:45 2022 +0100 selftests/powerpc: Fix spelling mistake "mmaping" -> "mmapping" There is a spelling mistake in a perror message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221021084545.65973-1-colin.i.king@gmail.com tools/testing/selftests/powerpc/ptrace/core-pkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 266b1991a433cd55bb86a933216b3f6762737d47 Author: Naveen N. Rao Date: Thu Oct 20 22:58:59 2022 +0530 powerpc/kprobes: Use preempt_enable() rather than the no_resched variant preempt_enable_no_resched() is just the same as preempt_enable() when we are in a irqs disabled context. kprobe_handler() and the post/fault handlers are all called with irqs disabled. As such, convert those to just use preempt_enable(). Reported-by: Nicholas Piggin Signed-off-by: Naveen N. Rao Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/72639f75fe66f931ec8c2165276ffbfb0fe1006f.1666262278.git.naveen.n.rao@linux.vnet.ibm.com arch/powerpc/kernel/kprobes.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 04ec5d5782fb346c291a05a2efe59483d8ada4c4 Author: Naveen N. Rao Date: Thu Oct 20 22:58:58 2022 +0530 powerpc/kprobes: Have optimized_callback() use preempt_enable() Similar to x86 commit 2e62024c265aa6 ("kprobes/x86: Use preempt_enable() in optimized_callback()"), change powerpc optprobes to use preempt_enable() rather than preempt_enable_no_resched() since powerpc also removed irq disabling for optprobes in commit f72180cc93a2c6 ("powerpc/kprobes: Do not disable interrupts for optprobes and kprobes_on_ftrace"). Reported-by: Nicholas Piggin Signed-off-by: Naveen N. Rao Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1885bab182626c33d9bf6421f430abf924c521a5.1666262278.git.naveen.n.rao@linux.vnet.ibm.com arch/powerpc/kernel/optprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fa9482334b0593b7edc371a13c0cca81daaa89e Author: Naveen N. Rao Date: Thu Oct 20 22:58:57 2022 +0530 powerpc/kprobes: Remove preempt disable around call to get_kprobe() in arch_prepare_kprobe() arch_prepare_kprobe() is called from register_kprobe() via prepare_kprobe(), or through register_aggr_kprobe(), both with the kprobe_mutex held. Per the comment for get_kprobe(): /* * This routine is called either: * - under the 'kprobe_mutex' - during kprobe_[un]register(). * OR * - with preemption disabled - from architecture specific code. */ As such, there is no need to disable preemption around the call to get_kprobe(). Drop the same. Reported-by: Nicholas Piggin Signed-off-by: Naveen N. Rao Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1043d06a0affed83a4a46dd29466e72820ee215d.1666262278.git.naveen.n.rao@linux.vnet.ibm.com arch/powerpc/kernel/kprobes.c | 2 -- 1 file changed, 2 deletions(-) commit 16a3f41ff3322830683d3ccc14d77736829c61bf Author: ruanjinjie Date: Wed Oct 19 14:34:14 2022 +0800 powerpc/mpic_msgr: fix cast removes address space of expression warnings When build Linux kernel, encounter the following warnings: ./arch/powerpc/sysdev/mpic_msgr.c:230:38: warning: cast removes address space '__iomem' of expression ./arch/powerpc/sysdev/mpic_msgr.c:230:27: warning: incorrect type in assignment (different address spaces) The data type of msgr->mer and msgr->base are 'u32 __iomem *', but converted to 'u32 *' and 'u8 *' directly and cause above warnings, now instead of using a type cast, change the size of the pointer offset to fix these warnings. Signed-off-by: ruanjinjie Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221019063414.3758087-1-ruanjinjie@huawei.com arch/powerpc/sysdev/mpic_msgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b49670f3bb3f10cd4d5a6dca17f5a31b173ecdc Author: Yang Yingliang Date: Mon Oct 17 11:23:33 2022 +0800 powerpc/xive: add missing iounmap() in error path in xive_spapr_populate_irq_data() If remapping 'data->trig_page' fails, the 'data->eoi_mmio' need be unmapped before returning from xive_spapr_populate_irq_data(). Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") Signed-off-by: Yang Yingliang Reviewed-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221017032333.1852406-1-yangyingliang@huawei.com arch/powerpc/sysdev/xive/spapr.c | 1 + 1 file changed, 1 insertion(+) commit 579aee9fc594af94c242068c011b0233563d4bbf Author: Stephen Rothwell Date: Mon Oct 10 16:57:21 2022 +1100 powerpc: suppress some linker warnings in recent linker versions This is a follow on from commit 0d362be5b142 ("Makefile: link with -z noexecstack --no-warn-rwx-segments") for arch/powerpc/boot to address wanrings like: ld: warning: opal-calls.o: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker ld: warning: arch/powerpc/boot/zImage.epapr has a LOAD segment with RWX permissions This fixes issue https://github.com/linuxppc/issues/issues/417 Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221010165721.106267e6@canb.auug.org.au arch/powerpc/boot/wrapper | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 2cb1dfac6f792f9e4a092793215f0d26e9f8d5b2 Author: Christophe JAILLET Date: Sun Oct 9 12:49:50 2022 +0200 powerpc/sysdev: Remove some duplicate prefix in some messages At the beginning of the file, we have: #define pr_fmt(fmt) "xive: " fmt So, there is no need to duplicate "XIVE:" in debug and error messages. For the records, these useless prefix have been added in commit 5af50993850a ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller") Signed-off-by: Christophe JAILLET Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7b8b5915a2c7c1616b33e8433ebe0a0bf07070a2.1665312579.git.christophe.jaillet@wanadoo.fr arch/powerpc/sysdev/xive/native.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f985adaf2ff934ec869b32ca1f7f97e2825e3a49 Author: Nicholas Piggin Date: Thu Oct 6 20:56:53 2022 +1000 powerpc: 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 ade7667a981b ("powerpc: Add cputime_to_nsecs()") did that, but justdidn't remove the then-unused cputime_to_usecs(), cputime_t type, and associated remnants. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221006105653.115829-1-npiggin@gmail.com arch/powerpc/include/asm/cputime.h | 17 +---------------- arch/powerpc/kernel/time.c | 23 ++--------------------- 2 files changed, 3 insertions(+), 37 deletions(-) commit d90bb7b4fdaff3f2fa68c7af85de2ce9e70189b1 Author: Michael Ellerman Date: Thu Oct 6 14:20:19 2022 +1100 powerpc: Print instruction dump on a single line Although the previous commit made the powerpc instruction dump usable with scripts/decodecode, there are still some problems. Because the dump is split across multiple lines, the script doesn't cope with printk timestamps or caller info. That can be fixed by printing the entire dump on one line, eg: [ 12.016307][ T112] --- interrupt: c00 [ 12.016605][ T112] Code: 4b7aae15 60000000 3d22016e 3c62ffec 39291160 38639bc0 e8890000 4b7aadf9 60000000 4bfffee8 7c0802a6 60000000 <0fe00000> 60420000 3c4c008f 384268a0 [ 12.017655][ T112] ---[ end trace 0000000000000000 ]--- That output can then be piped directly into scripts/decodecode and interpreted correctly. Printing the dump on a single line does produce a very long line, about 173 characters. That is still shorter than x86, which prints nearly 200 characters even without timestamps etc. All consoles I'm aware of will wrap the line if it's too long, so the length should not be a functional problem. If anything it should help on consoles like VGA by using less vertical space. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221006032019.1128624-2-mpe@ellerman.id.au arch/powerpc/kernel/process.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3e65412709293d5fb65249408e8e801b23b72635 Author: Michael Ellerman Date: Thu Oct 6 14:20:18 2022 +1100 powerpc: Make instruction dump work with scripts/decodecode Matt reported that scripts/decodecode doesn't work for the instruction dump in the powerpc oops output. Although there are scripts around that can decode it, it would be preferable if the standard in-tree script worked. All other arches prefix the instruction dump with "Code:", and that's what the script looks for, so use that. The script then works as expected: $ CROSS_COMPILE=powerpc64le-linux-gnu- ./scripts/decodecode Code: fbc1fff0 f821ffc1 7c7d1b78 7c9c2378 ebc30028 7fdff378 48000018 60000000 60000000 ebff0008 7c3ef840 41820048 <815f0060> e93f0000 5529077c 7d295378 ^D All code ======== 0: f0 ff c1 fb std r30,-16(r1) 4: c1 ff 21 f8 stdu r1,-64(r1) 8: 78 1b 7d 7c mr r29,r3 ... Note that the script doesn't cope well with printk timestamps or printk caller info. Reported-by: Matthew Wilcox Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221006032019.1128624-1-mpe@ellerman.id.au arch/powerpc/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5825603f67bc5ff445a1847302884154f0afa627 Author: Joel Stanley Date: Fri Sep 30 16:20:12 2022 +0930 powerpc/microwatt: Add litesd This is the register layout of the litesd peripheral for the fusesoc based Microwatt SoC. It requires a description of the system clock, which is hardcoded to 100MHz. Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220930065012.2860577-1-joel@jms.id.au arch/powerpc/boot/dts/microwatt.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 0b4721815c5328e08c3acdee4a53890e012d830b Author: Christophe Leroy Date: Wed Sep 28 08:29:22 2022 +0200 powerpc/8xx: Reverse order entries are written by __set_pte_at() At the time being, with 16k pages __set_pte_at() writes table entries in reverse order: 294: 91 49 00 0c stw r10,12(r9) 298: 91 49 00 08 stw r10,8(r9) 29c: 91 49 00 04 stw r10,4(r9) 2a0: 91 49 00 00 stw r10,0(r9) Allthough there should be no impact at all as it stays in a single cacheline, reverse the writing in a more natural order. 288: 91 49 00 0c stw r10,0(r9) 28c: 91 49 00 08 stw r10,4(r9) 290: 91 49 00 04 stw r10,8(r9) 294: 91 49 00 00 stw r10,12(r9) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/67c3b5d44edfec054234ea9b4d05fc4b4f7f8a0e.1664346554.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/nohash/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2c45962cc618c12f69fd46e6ebc20b9cd7f15ac Author: Christophe Leroy Date: Wed Sep 28 08:29:00 2022 +0200 powerpc/8xx: Simplify pte_update() with 16k pages While looking at code generated for code patching, I saw that pte_clear generated: 2d8: 38 a0 00 00 li r5,0 2dc: 38 e0 10 00 li r7,4096 2e0: 39 00 20 00 li r8,8192 2e4: 39 40 30 00 li r10,12288 2e8: 90 a9 00 00 stw r5,0(r9) 2ec: 90 e9 00 04 stw r7,4(r9) 2f0: 91 09 00 08 stw r8,8(r9) 2f4: 91 49 00 0c stw r10,12(r9) With 16k pages, only the first entry is used by the kernel, so no need to adapt the address of other entries. Only duplicate the first entry for hardware. Now it is: 2cc: 39 40 00 00 li r10,0 2d0: 91 49 00 00 stw r10,0(r9) 2d4: 91 49 00 04 stw r10,4(r9) 2d8: 91 49 00 08 stw r10,8(r9) 2dc: 91 49 00 0c stw r10,12(r9) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/65f76300de07091a59a042a3db2d0ce9b939a05c.1664346532.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/nohash/32/pgtable.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 4e87bd14e501030619d1bad29b3ec1f947f84fc4 Author: Dmitry Torokhov Date: Tue Sep 27 12:23:58 2022 -0700 powerpc/sgy_cts1000: convert to using gpiod API and facelift This patch converts the driver to newer gpiod API, and away from OF-specific legacy gpio API that we want to stop using. While at it, let's address a few more issues: - switch to using dev_info()/pr_info() and friends - cancel work when unbinding the driver Note that the original code handled halt GPIO polarity incorrectly: in halt callback, when line polarity is "low" it would set trigger to "1" and drive halt line high, which is counter to the annotation. gpiod API will drive such line low. However I do not see any DTSes in mainline that have a DT node with "sgy,gpio-halt" compatible. Signed-off-by: Dmitry Torokhov Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YzNNznewTyCJiGFz@google.com arch/powerpc/platforms/85xx/sgy_cts1000.c | 132 ++++++++++++------------------ 1 file changed, 53 insertions(+), 79 deletions(-) commit 1892e87a3e9170146549779622cb844582f1e2bb Author: Dmitry Torokhov Date: Mon Sep 26 23:03:25 2022 -0700 powerpc/warp: switch to using gpiod API This switches PIKA Warp away from legacy gpio API and to newer gpiod API, so that we can eventually deprecate the former. Because LEDs are normally driven by leds-gpio driver, but the platform code also wants to access the LEDs during thermal shutdown, and gpiod API does not allow locating GPIO without requesting it, the platform code is now responsible for locating GPIOs through device tree and requesting them. It then constructs platform data for leds-gpio platform device and registers it. This allows platform code to retain access to LED GPIO descriptors and use them when needed. Signed-off-by: Dmitry Torokhov Acked-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YzKSLcrYmV5kjyeX@google.com arch/powerpc/boot/dts/warp.dts | 4 +- arch/powerpc/platforms/44x/warp.c | 105 +++++++++++++++++++++++++++++++++----- 2 files changed, 94 insertions(+), 15 deletions(-) commit 1c4a4a4c8410be4a231a58b23e7a30923ff954ac Author: Gustavo A. R. Silva Date: Fri Sep 16 15:15:04 2022 +0100 powerpc/xmon: Fix -Wswitch-unreachable warning in bpt_cmds When building with automatic stack variable initialization, GCC 12 complains about variables defined outside of switch case statements. Move the variable into the case that uses it, which silences the warning: arch/powerpc/xmon/xmon.c: In function ‘bpt_cmds’: arch/powerpc/xmon/xmon.c:1529:13: warning: statement will never be executed [-Wswitch-unreachable] 1529 | int mode; | ^~~~ Fixes: 09b6c1129f89 ("powerpc/xmon: Fix compile error with PPC_8xx=y") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YySE6FHiOcbWWR+9@work arch/powerpc/xmon/xmon.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4ac9d3187cc7ccba25f76a3faef3e08a366f77b9 Author: Kajol Jain Date: Fri Sep 16 16:27:36 2022 +0530 powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C") removed the PMU save/restore functions from assembly code and implemented these functions in C, for power9 and later platforms. After the code refactoring, Performance Monitoring Unit (PMU) registers became part of "p9_host_os_sprs" structure and now this structure is used to save/restore pmu host registers, for power9 and later platfroms. But we still have old unused registers references. Patch removes unused host_mmcr references for Monitor Mode Control Register 3 (MMCR3)/ Sampled Instruction Event Register 2 (SIER2)/ SIER3 registers from "struct kvmppc_host_state". Fixes: 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C") Signed-off-by: Kajol Jain Reviewed-by: Nicholas Piggin Reviewed-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220916105736.268153-3-disgoel@linux.vnet.ibm.com arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2223552256dfc48435e0699dbe1e9b8d2cd56b06 Author: Disha Goel Date: Fri Sep 16 16:27:35 2022 +0530 powerpc/kvm: Remove unused macros from asm-offset The kvm code was refactored to convert some of kvm assembly routines to C. This includes commits which moved code path for the kvm guest entry/exit for p7/8 from aseembly to C. As part of the code changes, usage of some of the macros were removed. But definitions still exist in the assembly files. Commits are listed below: Commit 2e1ae9cd56f8 ("KVM: PPC: Book3S HV: Implement radix prefetch workaround by disabling MMU") Commit 9769a7fd79b6 ("KVM: PPC: Book3S HV: Remove radix guest support from P7/8 path") Commit fae5c9f3664b ("KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path") Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C") Many of the asm-offset macro definitions were missed to remove. Patch fixes by removing the unused macros. Signed-off-by: Disha Goel Reviewed-by: Nicholas Piggin Reviewed-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220916105736.268153-2-disgoel@linux.vnet.ibm.com arch/powerpc/kernel/asm-offsets.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit d87a233717da400792fa601b29fa74a7d28e03c2 Author: Xiu Jianfeng Date: Sun Sep 11 16:43:44 2022 +0800 powerpc/pasemi: Add __init/__exit annotations to module init/exit funcs Add missing __init/__exit annotations to module init/exit funcs. Signed-off-by: Xiu Jianfeng Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220911084344.196353-1-xiujianfeng@huawei.com arch/powerpc/platforms/pasemi/gpio_mdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b86cf14f240e002e001fd4f2bf49114c7836fd5c Author: Nicholas Piggin Date: Fri Sep 9 15:23:12 2022 +1000 powerpc: add compile-time support for lbarx, lharx ISA v2.06 (POWER7 and up) as well as e6500 support lbarx and lharx. Add a compile option that allows code to use it, and add support in cmpxchg and xchg 8 and 16 bit values without shifting and masking. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220909052312.63916-1-npiggin@gmail.com arch/powerpc/Kconfig | 3 + arch/powerpc/include/asm/cmpxchg.h | 231 ++++++++++++++++++++++++++++++++- arch/powerpc/lib/sstep.c | 21 +-- arch/powerpc/platforms/Kconfig.cputype | 5 + 4 files changed, 249 insertions(+), 11 deletions(-) commit ff8fae94e26f5cd2779ceda0ee6d714a10501abd Author: Shaomin Deng Date: Sun Sep 4 11:51:02 2022 -0400 drivers/ps3: Fix double word in comments Drop the repeated word "when" in comments. Signed-off-by: Shaomin Deng Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220904155102.26957-1-dengshaomin@cdjrlc.com drivers/ps3/ps3-lpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit addebe1cfa71eb29caa9d5c6bc719171e4e76414 Author: Nicholas Miehlbradt Date: Wed Aug 10 04:03:21 2022 +0000 docs: powerpc: add POWER9 and POWER10 to CPU families Add POWER9 and POWER10 to CPU families and list Radix MMU. Signed-off-by: Nicholas Miehlbradt Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220810040321.375396-1-nicholas@linux.ibm.com Documentation/powerpc/cpu_families.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 7af82ff90a2b0690c2c45818fcce4c4ac3b187f3 Author: Naveen N. Rao Date: Tue Aug 9 16:24:25 2022 +0530 powerpc/ftrace: Ignore weak functions Extend commit b39181f7c6907d ("ftrace: Add FTRACE_MCOUNT_MAX_OFFSET to avoid adding weak function") to ppc32 and ppc64 -mprofile-kernel by defining FTRACE_MCOUNT_MAX_OFFSET. For ppc64 -mprofile-kernel ABI, we can have two instructions at function entry for TOC setup followed by 'mflr r0' and 'bl _mcount'. So, the mcount location is at most the 4th instruction in a function. For ppc32, mcount location is always the 3rd instruction in a function, preceded by 'mflr r0' and 'stw r0,4(r1)'. With this patch, and with ppc64le_guest_defconfig and some ftrace/bpf config items enabled: # grep __ftrace_invalid_address available_filter_functions | wc -l 79 Signed-off-by: Naveen N. Rao Acked-by: Steven Rostedt (Google) Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220809105425.424045-1-naveen.n.rao@linux.vnet.ibm.com arch/powerpc/include/asm/ftrace.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 14b5d59a261b1947db287b3b52f4bb1dc496dede Author: Deming Wang Date: Fri Jul 1 05:45:53 2022 -0400 powerpc/pseries: Fix formatting to make code look more beautiful Operators should be separated by spaces in tce_buildmulti_pSeriesLP() Signed-off-by: Deming Wang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220701094553.1722-1-wangdeming@inspur.com arch/powerpc/platforms/pseries/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f58cad1e4c65bebee34292696c6d2105eeb2027 Author: Yang Yingliang Date: Mon Nov 21 23:43:39 2022 +0800 ocxl: fix pci device refcount leak when calling get_function_0() get_function_0() calls pci_get_domain_bus_and_slot(), as comment says, it returns a pci device with refcount increment, so after using it, pci_dev_put() needs be called. Get the device reference when get_function_0() is not called, so pci_dev_put() can be called in the error path and callers unconditionally. And add comment above get_dvsec_vendor0() to tell callers to call pci_dev_put(). Fixes: 87db7579ebd5 ("ocxl: control via sysfs whether the FPGA is reloaded on a link reset") Suggested-by: Andrew Donnellan Signed-off-by: Yang Yingliang Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221121154339.4088935-1-yangyingliang@huawei.com drivers/misc/ocxl/config.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 295faa17722a11cac8dbf51e4c9f9405a5e07ef1 Author: Yang Yingliang Date: Fri Nov 11 22:59:29 2022 +0800 ocxl: fix possible name leak in ocxl_file_register_afu() If device_register() returns error in ocxl_file_register_afu(), the name allocated by dev_set_name() need be freed. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanup(), and info is freed in info_release(). Fixes: 75ca758adbaf ("ocxl: Create a clear delineation between ocxl backend & frontend") Signed-off-by: Yang Yingliang Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221111145929.2429271-1-yangyingliang@huawei.com drivers/misc/ocxl/file.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8bf03f557d6c6e108cf47bea32f4a68e276e1157 Author: Yang Yingliang Date: Fri Nov 11 22:54:40 2022 +0800 cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter() If device_register() fails in cxl_pci_afu|adapter(), the device is not added, device_unregister() can not be called in the error path, otherwise it will cause a null-ptr-deref because of removing not added device. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So split device_unregister() into device_del() and put_device(), then goes to put dev when register fails. Fixes: f204e0b8cedd ("cxl: Driver code for powernv PCIe based cards for userspace access") Signed-off-by: Yang Yingliang Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221111145440.2426970-2-yangyingliang@huawei.com drivers/misc/cxl/pci.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit f949ccee1dde970bc77dc871b4f0b5e651577344 Author: Yang Yingliang Date: Fri Nov 11 22:54:39 2022 +0800 cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter() If device_register() fails in cxl_register_afu|adapter(), the device is not added, device_unregister() can not be called in the error path, otherwise it will cause a null-ptr-deref because of removing not added device. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So split device_unregister() into device_del() and put_device(), then goes to put dev when register fails. Fixes: 14baf4d9c739 ("cxl: Add guest-specific code") Signed-off-by: Yang Yingliang Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221111145440.2426970-1-yangyingliang@huawei.com drivers/misc/cxl/guest.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 1d09697ff22908ae487fc8c4fbde1811732be523 Author: Miaoqian Lin Date: Sun Jun 5 10:00:38 2022 +0400 cxl: Fix refcount leak in cxl_calc_capp_routing of_get_next_parent() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. This function only calls of_node_put() in normal path, missing it in the error path. Add missing of_node_put() to avoid refcount leak. Fixes: f24be42aab37 ("cxl: Add psl9 specific code") Signed-off-by: Miaoqian Lin Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220605060038.62217-1-linmq006@gmail.com drivers/misc/cxl/pci.c | 1 + 1 file changed, 1 insertion(+) commit 37195edebf479b94f1e20c2a83a29e4beebe7ff5 Author: Julia Lawall Date: Sat May 21 13:11:32 2022 +0200 cxl: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220521111145.81697-82-Julia.Lawall@inria.fr include/misc/cxl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 932c6dea4f32f7d71488137c475b60a77e56bb2a Author: Deming Wang Date: Wed Apr 13 06:55:07 2022 -0400 powerpc/xive: remove unused parameter The parameter xc to xive_cleanup_single_escalation() is unused, so we can remove it. Signed-off-by: Deming Wang [mpe: Reword change log, unwrap lines < 90 columns] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220413105507.1729-1-wangdeming@inspur.com arch/powerpc/kvm/book3s_xive.c | 6 ++---- arch/powerpc/kvm/book3s_xive.h | 3 +-- arch/powerpc/kvm/book3s_xive_native.c | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) commit 4562bffb83b88e61ea9c9912e50efbd5a941f0b3 Author: Randy Dunlap Date: Wed Nov 23 22:19:18 2022 -0800 powerpc/mpc52xx_lpbfifo: fix all kernel-doc warnings Fix multiple kernel-doc warnings in mpc52xx_lpbfifo.c: arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c:377: warning: expecting prototype for mpc52xx_lpbfifo_bcom_poll(). Prototype was for mpc52xx_lpbfifo_poll() instead mpc52xx_lpbfifo.c:221: warning: No description found for return value of 'mpc52xx_lpbfifo_irq' mpc52xx_lpbfifo.c:327: warning: No description found for return value of 'mpc52xx_lpbfifo_bcom_irq' mpc52xx_lpbfifo.c:398: warning: No description found for return value of 'mpc52xx_lpbfifo_submit' mpc52xx_lpbfifo.c:64: warning: Function parameter or member 'req' not described in 'mpc52xx_lpbfifo_kick' mpc52xx_lpbfifo.c:220: warning: contents before sections mpc52xx_lpbfifo.c:223: warning: Function parameter or member 'irq' not described in 'mpc52xx_lpbfifo_irq' mpc52xx_lpbfifo.c:223: warning: Function parameter or member 'dev_id' not described in 'mpc52xx_lpbfifo_irq' mpc52xx_lpbfifo.c:328: warning: contents before sections mpc52xx_lpbfifo.c:331: warning: Function parameter or member 'irq' not described in 'mpc52xx_lpbfifo_bcom_irq' mpc52xx_lpbfifo.c:331: warning: Function parameter or member 'dev_id' not described in 'mpc52xx_lpbfifo_bcom_irq' Reported-by: kernel test robot Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221124061918.1967-1-rdunlap@infradead.org arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit e75d07bd8303588c33e6f1f180a9081fb58c872e Author: Christophe Leroy Date: Wed Mar 9 10:29:50 2022 +0100 powerpc: Remove find_current_mm_pte() Last usage of find_current_mm_pte() was removed by commit 15759cb054ef ("powerpc/perf/callchain: Use __get_user_pages_fast in read_user_stack_slow") Remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ec79f462a3bfa8365b7df505e574d5d85246bc68.1646818177.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/pte-walk.h | 25 ------------------------- arch/powerpc/mm/book3s64/pgtable.c | 4 ++-- 2 files changed, 2 insertions(+), 27 deletions(-) commit 5836947613ef33d311b4eff6a32d019580a214f5 Author: Christophe JAILLET Date: Sat Jan 29 08:16:04 2022 +0100 powerpc/52xx: Fix a resource leak in an error handling path The error handling path of mpc52xx_lpbfifo_probe() has a request_irq() that is not balanced by a corresponding free_irq(). Add the missing call, as already done in the remove function. Fixes: 3c9059d79f5e ("powerpc/5200: add LocalPlus bus FIFO device driver") Signed-off-by: Christophe JAILLET Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/dec1496d46ccd5311d0f6e9f9ca4238be11bf6a6.1643440531.git.christophe.jaillet@wanadoo.fr arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 1 + 1 file changed, 1 insertion(+) commit dbaa3105736d4d73063ea0a3b01cd7fafce924e6 Author: Xie Shaowen Date: Tue Aug 2 15:41:48 2022 +0800 macintosh/macio-adb: check the return value of ioremap() The function ioremap() in macio_init() can fail, so its return value should be checked. Fixes: 36874579dbf4c ("[PATCH] powerpc: macio-adb build fix") Reported-by: Hacash Robot Signed-off-by: Xie Shaowen Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220802074148.3213659-1-studentxswpy@163.com drivers/macintosh/macio-adb.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5ca86eae55a2f006e6c1edd2029b2cacb6979515 Author: Yang Yingliang Date: Fri Nov 4 11:25:51 2022 +0800 macintosh: fix possible memory leak in macio_add_one_device() Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically. It needs to be freed when of_device_register() fails. Call put_device() to give up the reference that's taken in device_initialize(), so that it can be freed in kobject_cleanup() when the refcount hits 0. macio device is freed in macio_release_dev(), so the kfree() can be removed. Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array") Signed-off-by: Yang Yingliang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221104032551.1075335-1-yangyingliang@huawei.com drivers/macintosh/macio_asic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3aa16303dc98b7b8baa2adbc3210fd513ec0e810 Author: Yang Yingliang Date: Fri Sep 16 22:16:38 2022 +0800 macintosh: Switch to use for_each_child_of_node() macro Use for_each_child_of_node() macro instead of open coding it. No functional change. Signed-off-by: Yang Yingliang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220916141638.685575-1-yangyingliang@huawei.com drivers/macintosh/windfarm_smu_controls.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit e3e528d29d13c01289f382a0d3ddb5312ac3dae3 Author: Li zeming Date: Thu Jul 7 09:59:49 2022 +0800 macintosh/windfarm_pid: Add header file macro definition I think the header file could avoid redefinition errors at compile time by adding macro definitions. Signed-off-by: Li zeming [mpe: Add endif comment] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220707015949.3733-1-zeming@nfschina.com drivers/macintosh/windfarm_pid.h | 5 +++++ 1 file changed, 5 insertions(+) commit 2dfcace75e1e1dfbd89af63fce1bfe8aebe38427 Author: Li zeming Date: Thu Jul 7 09:53:52 2022 +0800 macintosh/ams/ams: Add header file macro definition Add header file macro definition. Signed-off-by: Li zeming [mpe: Add endif comment] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220707015352.3391-1-zeming@nfschina.com drivers/macintosh/ams/ams.h | 5 +++++ 1 file changed, 5 insertions(+) commit a0542d2c45a64162e63ad2d80684e57de0566271 Author: Stephen Kitt Date: Thu Jun 16 19:04:24 2022 +0200 macintosh/via-pmu-backlight: Use backlight helper backlight_properties.fb_blank is deprecated. The states it represents are handled by other properties; but instead of accessing those properties directly, drivers should use the helpers provided by backlight.h. 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 Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220616170425.1346081-1-steve@sk2.org drivers/macintosh/via-pmu-backlight.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 27f9690a81d7acf185b78be8d03d4b3a243116b1 Author: Finn Thain Date: Mon Mar 21 20:28:00 2022 +1100 macintosh/via-pmu: Avoid compiler warnings when CONFIG_PROC_FS is disabled drivers/macintosh/via-pmu.c:897:12: warning: 'pmu_battery_proc_show' defined but not used [-Wunused-function] static int pmu_battery_proc_show(struct seq_file *m, void *v) ^~~~~~~~~~~~~~~~~~~~~ drivers/macintosh/via-pmu.c:871:12: warning: 'pmu_irqstats_proc_show' defined but not used [-Wunused-function] static int pmu_irqstats_proc_show(struct seq_file *m, void *v) ^~~~~~~~~~~~~~~~~~~~~~ drivers/macintosh/via-pmu.c:860:12: warning: 'pmu_info_proc_show' defined but not used [-Wunused-function] static int pmu_info_proc_show(struct seq_file *m, void *v) ^~~~~~~~~~~~~~~~~~ Add some #ifdefs to avoid unused code warnings when CONFIG_PROC_FS is disabled. Reported-by: Randy Dunlap Suggested-by: Christophe Leroy Signed-off-by: Finn Thain Tested-by: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0c11c0770fc4ec7e80a4b2e0ffce1055b792cfdb.1647854880.git.fthain@linux-m68k.org drivers/macintosh/via-pmu.c | 4 ++++ 1 file changed, 4 insertions(+) commit fc21ed8f26d980428f9b4e08e0fb72c7f7ffc9b8 Author: Haowen Bai Date: Thu Mar 17 17:24:49 2022 +0800 macintosh/macio-adb: Fix warning comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. Signed-off-by: Haowen Bai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1647509089-4280-1-git-send-email-baihaowen@meizu.com drivers/macintosh/macio-adb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a823307bf0a3b79b27eea916bf6499ba4377cdf9 Author: Haowen Bai Date: Thu Mar 17 10:57:02 2022 +0800 macintosh/windfarm_pm121: Fix warning comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. Signed-off-by: Haowen Bai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1647485822-16717-1-git-send-email-baihaowen@meizu.com drivers/macintosh/windfarm_pm121.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88316944c3b3aa3ce3249c51689ef1621049df9d Author: Haowen Bai Date: Thu Mar 17 10:42:33 2022 +0800 macintosh/windfarm_pm91: Fix warning comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. Signed-off-by: Haowen Bai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1647484953-15249-1-git-send-email-baihaowen@meizu.com drivers/macintosh/windfarm_pm91.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f59562c140d3119328f869126e8e593a99a392f Author: Haowen Bai Date: Thu Mar 17 10:35:54 2022 +0800 macintosh/adb: Fix warning comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. Signed-off-by: Haowen Bai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1647484554-13258-1-git-send-email-baihaowen@meizu.com drivers/macintosh/adb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e0acfdd13474815696595206e11169736b4bca9d Author: Haowen Bai Date: Thu Mar 17 10:32:39 2022 +0800 macintosh/windfarm_pm81: Fix warning comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. Signed-off-by: Haowen Bai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1647484359-12402-1-git-send-email-baihaowen@meizu.com drivers/macintosh/windfarm_pm81.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d05921a09a5a72805a1d669dce0fcbd66df86237 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:31 2022 +0100 macintosh/windfarm_smu_sat: 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: Michael Ellerman Link: https://lore.kernel.org/r/20221118224540.619276-298-uwe@kleine-koenig.org drivers/macintosh/windfarm_smu_sat.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2d7a9d780444c8f31ee6af522a92a99492d9eeb2 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:30 2022 +0100 macintosh/windfarm_max6690_sensor: 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: Michael Ellerman Link: https://lore.kernel.org/r/20221118224540.619276-297-uwe@kleine-koenig.org drivers/macintosh/windfarm_max6690_sensor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0e2211b3373ea718d2161bcc360cd4d9a3bcebc6 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:29 2022 +0100 macintosh/windfarm_lm87_sensor: 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: Michael Ellerman Link: https://lore.kernel.org/r/20221118224540.619276-296-uwe@kleine-koenig.org drivers/macintosh/windfarm_lm87_sensor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 51a9e1755cdd8b127191030d15b74b97f7d3ce75 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:28 2022 +0100 macintosh/windfarm_lm75_sensor: 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: Michael Ellerman Link: https://lore.kernel.org/r/20221118224540.619276-295-uwe@kleine-koenig.org drivers/macintosh/windfarm_lm75_sensor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 472e4c61d2bb4977ade8e2491953954bf9723563 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:27 2022 +0100 macintosh/windfarm_fcu_controls: 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: Michael Ellerman Link: https://lore.kernel.org/r/20221118224540.619276-294-uwe@kleine-koenig.org drivers/macintosh/windfarm_fcu_controls.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9d533bdf4a582f037327f1a38ed8cf689d67cab4 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:26 2022 +0100 macintosh/windfarm_ad7417_sensor: 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: Michael Ellerman Link: https://lore.kernel.org/r/20221118224540.619276-293-uwe@kleine-koenig.org drivers/macintosh/windfarm_ad7417_sensor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dc9be0735c3e245fe60775307cf7842b1f9b45a2 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:25 2022 +0100 macintosh/therm_windtunnel: 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: Michael Ellerman Link: https://lore.kernel.org/r/20221118224540.619276-292-uwe@kleine-koenig.org drivers/macintosh/therm_windtunnel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0424113fed923a2fcb699b5f3aa335d16e092f3d Author: Uwe Kleine-König Date: Fri Nov 18 23:40:24 2022 +0100 macintosh/therm_adt746x: 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: Michael Ellerman Link: https://lore.kernel.org/r/20221118224540.619276-291-uwe@kleine-koenig.org drivers/macintosh/therm_adt746x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8daa9c1dc9b4a3422801017ca46d935073dc14c0 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:23 2022 +0100 macintosh/ams-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 Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221118224540.619276-290-uwe@kleine-koenig.org drivers/macintosh/ams/ams-i2c.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 963c7fe6cdbfe72c2760c4ed91c808540a4bfb9e Merge: 247f34f7b803 662233731d66 Author: Michael Ellerman Date: Thu Nov 24 23:09:51 2022 +1100 Merge branch i2c/client_device_id_helper-immutable of wsa/linux into next Merge Wolfram's topic branch holding the new i2c_client_get_device_id() helper, so that we can apply conversion patches that depend on it. commit dd0df58bc9a3f919657deb3f9281c07d142b788b Merge: c23fdf9e5063 e6e3776d682d Author: Mark Brown Date: Thu Nov 24 12:02:39 2022 +0000 regulator: qcom-rpmh: Add support for PM8550 Merge series from Abel Vesa : This patchset adds regulator support for the new Qualcomm PM8550 PMIC. commit 2399401feee27c639addc5b7e6ba519d3ca341bf Author: Zheng Yongjun Date: Sat Nov 19 07:33:07 2022 +0000 mtd: maps: pxa2xx-flash: fix memory leak in probe Free 'info' upon remapping error to avoid a memory leak. Fixes: e644f7d62894 ("[MTD] MAPS: Merge Lubbock and Mainstone drivers into common PXA2xx driver") Signed-off-by: Zheng Yongjun [: Reword the commit log] Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221119073307.22929-1-zhengyongjun3@huawei.com drivers/mtd/maps/pxa2xx-flash.c | 2 ++ 1 file changed, 2 insertions(+) commit 56570bdad5e31c5c538cd6efff5c4510256e1bb4 Author: Shang XiaoJing Date: Sat Nov 19 14:39:15 2022 +0800 mtd: core: Fix refcount error in del_mtd_device() del_mtd_device() will call of_node_put() to mtd_get_of_node(mtd), which is mtd->dev.of_node. However, memset(&mtd->dev, 0) is called before of_node_put(). As the result, of_node_put() won't do anything in del_mtd_device(), and causes the refcount leak. del_mtd_device() memset(&mtd->dev, 0, sizeof(mtd->dev) # clear mtd->dev of_node_put() mtd_get_of_node(mtd) # mtd->dev is cleared, can't locate of_node # of_node_put(NULL) won't do anything Fix the error by caching the pointer of the device_node. OF: ERROR: memory leak, expected refcount 1 instead of 2, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /spi/spi-sram@0 CPU: 3 PID: 275 Comm: python3 Tainted: G N 6.1.0-rc3+ #54 0d8a1edddf51f172ff5226989a7565c6313b08e2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x67/0x83 kobject_get+0x155/0x160 of_node_get+0x1f/0x30 of_fwnode_get+0x43/0x70 fwnode_handle_get+0x54/0x80 fwnode_get_nth_parent+0xc9/0xe0 fwnode_full_name_string+0x3f/0xa0 device_node_string+0x30f/0x750 pointer+0x598/0x7a0 vsnprintf+0x62d/0x9b0 ... cfs_overlay_release+0x30/0x90 config_item_release+0xbe/0x1a0 config_item_put+0x5e/0x80 configfs_rmdir+0x3bd/0x540 vfs_rmdir+0x18c/0x320 do_rmdir+0x198/0x330 __x64_sys_rmdir+0x2c/0x40 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 00596576a051 ("mtd: core: clear out unregistered devices a bit more") Signed-off-by: Shang XiaoJing [: Light reword of the commit log] Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221119063915.11108-1-shangxiaojing@huawei.com drivers/mtd/mtdcore.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bcd58c8ca0f89fe6a890f909916bc97561341a06 Author: Kunihiko Hayashi Date: Thu Nov 24 09:33:50 2022 +0900 spi: Add Socionext F_OSPI controller bindings Add devicetree binding documentation for Socionext F_OSPI SPI flash controller. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221124003351.7792-2-hayashi.kunihiko@socionext.com Signed-off-by: Mark Brown .../devicetree/bindings/spi/socionext,f-ospi.yaml | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 1b74dd64c8612619e399e5a31da79a3636914495 Author: Kunihiko Hayashi Date: Thu Nov 24 09:33:51 2022 +0900 spi: Add Socionext F_OSPI SPI flash controller driver Introduce Socionext F_OSPI controller driver. This controller is used to communicate with slave devices such as SPI Flash memories. It supports 4 slave devices and up to 8-bit wide bus, but supports master mode only. This driver uses spi-mem framework for SPI flash memory access, and can only operate indirect access mode and single data rate mode. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20221124003351.7792-3-hayashi.kunihiko@socionext.com Signed-off-by: Mark Brown drivers/spi/Kconfig | 9 + drivers/spi/Makefile | 1 + drivers/spi/spi-sn-f-ospi.c | 703 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 713 insertions(+) commit a96b20758b23be7e9f693218908228d6100c3c26 Author: Christophe JAILLET Date: Sat Jul 9 17:56:43 2022 +0200 KVM: PPC: Book3S HV: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/52e843a460bc374973149b8da0bd04f9761b80b7.1657382184.git.christophe.jaillet@wanadoo.fr arch/powerpc/kvm/book3s_hv_uvmem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6fa1efeaa6671fb7339a6c62ceeec19e8e787963 Author: Deming Wang Date: Sun Jul 3 13:29:32 2022 -0400 KVM: PPC: Book3s: Use arg->size directly in kvm_vm_ioctl_create_spapr_tce() The size variable is just a copy of args->size, neither size nor args are modifed, so just use args->size directly. Signed-off-by: Deming Wang [mpe: Reword change log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220703172932.11329-1-wangdeming@inspur.com arch/powerpc/kvm/book3s_64_vio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 392a58f1eaab0c90b80d7ba4a03dbf6eaaeabe60 Author: Zhang Jiaming Date: Thu Jun 23 18:20:31 2022 +0800 KVM: PPC: Book3S HV: XIVE: Fix spelling mistakes Change 'subsquent' to 'subsequent'. Change 'accross' to 'across'. Signed-off-by: Zhang Jiaming Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220623102031.15359-1-jiaming@nfschina.com arch/powerpc/kvm/book3s_xive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 61119786de40f61b8843aa57217b678361763d67 Author: XueBing Chen Date: Fri Jun 17 23:50:19 2022 +0800 KVM: PPC: Use __func__ to get function's name Prefer using '"%s...", __func__' to get current function's name in output messages. Signed-off-by: XueBing Chen Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/13b2c857.beb.181725bad35.Coremail.chenxuebing@jari.cn arch/powerpc/kvm/book3s_64_mmu_hv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e2e6a217a84d09785848a82599729c9a41566e3a Author: Hui Tang Date: Sat Nov 19 13:48:58 2022 +0800 clk: microchip: check for null return of devm_kzalloc() Because of the possible failure of devm_kzalloc(), name might be NULL and will cause null pointer dereference later. Therefore, it might be better to check it and directly return -ENOMEM. Fixes: d39fb172760e ("clk: microchip: add PolarFire SoC fabric clock support") Signed-off-by: Hui Tang Reviewed-by: Conor Dooley [claudiu.beznea: s/refrence/reference/, s/possilble/possible] Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221119054858.178629-1-tanghui20@huawei.com drivers/clk/microchip/clk-mpfs-ccc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 17b8d847b92d815d1638f0de154654081d66b281 Author: Xiongfeng Wang Date: Fri Nov 18 14:31:37 2022 +0800 perf/x86/intel/uncore: Fix reference count leak in __uncore_imc_init_box() pci_get_device() will increase the reference count for the returned pci_dev, so tgl_uncore_get_mc_dev() will return a pci_dev with its reference count increased. We need to call pci_dev_put() to decrease the reference count before exiting from __uncore_imc_init_box(). Add pci_dev_put() for both normal and error path. Fixes: fdb64822443e ("perf/x86: Add Intel Tiger Lake uncore support") Signed-off-by: Xiongfeng Wang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221118063137.121512-5-wangxiongfeng2@huawei.com arch/x86/events/intel/uncore_snb.c | 3 +++ 1 file changed, 3 insertions(+) commit 8ebd16c11c346751b3944d708e6c181ed4746c39 Author: Xiongfeng Wang Date: Fri Nov 18 14:31:36 2022 +0800 perf/x86/intel/uncore: Fix reference count leak in snr_uncore_mmio_map() pci_get_device() will increase the reference count for the returned pci_dev, so snr_uncore_get_mc_dev() will return a pci_dev with its reference count increased. We need to call pci_dev_put() to decrease the reference count. Let's add the missing pci_dev_put(). Fixes: ee49532b38dd ("perf/x86/intel/uncore: Add IMC uncore support for Snow Ridge") Signed-off-by: Xiongfeng Wang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221118063137.121512-4-wangxiongfeng2@huawei.com arch/x86/events/intel/uncore_snbep.c | 2 ++ 1 file changed, 2 insertions(+) commit 1ff9dd6e7071a561f803135c1d684b13c7a7d01d Author: Xiongfeng Wang Date: Fri Nov 18 14:31:35 2022 +0800 perf/x86/intel/uncore: Fix reference count leak in hswep_has_limit_sbox() pci_get_device() will increase the reference count for the returned 'dev'. We need to call pci_dev_put() to decrease the reference count. Since 'dev' is only used in pci_read_config_dword(), let's add pci_dev_put() right after it. Fixes: 9d480158ee86 ("perf/x86/intel/uncore: Remove uncore extra PCI dev HSWEP_PCI_PCU_3") Signed-off-by: Xiongfeng Wang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221118063137.121512-3-wangxiongfeng2@huawei.com arch/x86/events/intel/uncore_snbep.c | 1 + 1 file changed, 1 insertion(+) commit c508eb042d9739bf9473526f53303721b70e9100 Author: Xiongfeng Wang Date: Fri Nov 18 14:31:34 2022 +0800 perf/x86/intel/uncore: Fix reference count leak in sad_cfg_iio_topology() pci_get_device() will increase the reference count for the returned pci_dev, and also decrease the reference count for the input parameter *from* if it is not NULL. If we break the loop in sad_cfg_iio_topology() with 'dev' not NULL. We need to call pci_dev_put() to decrease the reference count. Since pci_dev_put() can handle the NULL input parameter, we can just add one pci_dev_put() right before 'return ret'. Fixes: c1777be3646b ("perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on SNR") Signed-off-by: Xiongfeng Wang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221118063137.121512-2-wangxiongfeng2@huawei.com arch/x86/events/intel/uncore_snbep.c | 2 ++ 1 file changed, 2 insertions(+) commit d5b73506b5b1b4a6e675c54b7977ea08e64cba19 Author: Alexander Antonov Date: Thu Nov 17 12:28:33 2022 +0000 perf/x86/intel/uncore: Make set_mapping() procedure void Return value of set_mapping() is not needed to be checked anymore. So, make this procedure void. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221117122833.3103580-12-alexander.antonov@linux.intel.com arch/x86/events/intel/uncore.h | 2 +- arch/x86/events/intel/uncore_snbep.c | 41 +++++++++++++++++------------------- 2 files changed, 20 insertions(+), 23 deletions(-) commit 61fb0f7e974ac00ead611c00a57efdafac7785b5 Author: Alexander Antonov Date: Thu Nov 17 12:28:32 2022 +0000 perf/x86/intel/uncore: Update sysfs-devices-mapping file Add description for /sys/devices/uncore_upi_*/die* attributes to sysfs-devices-mapping. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221117122833.3103580-11-alexander.antonov@linux.intel.com Documentation/ABI/testing/sysfs-devices-mapping | 30 ++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 9a3b675cd393a4430d5e6cbf94c5de43414613cd Author: Alexander Antonov Date: Thu Nov 17 12:28:31 2022 +0000 perf/x86/intel/uncore: Enable UPI topology discovery for Sapphire Rapids UPI topology discovery on SPR is same as in ICX but UBOX device has different Device ID 0x3250. This patch enables /sys/devices/uncore_upi_*/die* attributes on SPR. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221117122833.3103580-10-alexander.antonov@linux.intel.com arch/x86/events/intel/uncore_snbep.c | 43 +++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit f680b6e6062ef3c944ffc966d685f067958fca33 Author: Alexander Antonov Date: Thu Nov 17 12:28:30 2022 +0000 perf/x86/intel/uncore: Enable UPI topology discovery for Icelake Server UPI topology discovery relies on data from KTILP0 (offset 0x94) and KTIPCSTS (offset 0x120) as well as on SKX but on Icelake Server these registers reside under UBOX (Device ID 0x3450) bus. This patch enables /sys/devices/uncore_upi_*/die* attributes on Icelake Server. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221117122833.3103580-9-alexander.antonov@linux.intel.com arch/x86/events/intel/uncore_snbep.c | 75 ++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit c4aebdb3b5f50fd0d83bf0fc2d49ac299f8b61df Author: Alexander Antonov Date: Thu Nov 17 12:28:29 2022 +0000 perf/x86/intel/uncore: Get UPI NodeID and GroupID The GIDNIDMAP register of UBOX device is used to get the topology information in the snbep_pci2phy_map_init(). The same approach will be used to discover UPI topology for ICX and SPR platforms. Move common code that will be reused in next patches. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221117122833.3103580-8-alexander.antonov@linux.intel.com arch/x86/events/intel/uncore_snbep.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit 4cfce57fa42d277497cd2c425021312eae2f223c Author: Alexander Antonov Date: Thu Nov 17 12:28:28 2022 +0000 perf/x86/intel/uncore: Enable UPI topology discovery for Skylake Server UPI topology discovery relies on data from KTILP0 (offset 0x94) and KTIPCSTS (offset 0x120) registers which reside under IIO bus(3) on SKX/CLX. This patch enable UPI topology discovery on Skylake Server. Topology is exposed through attributes /sys/devices/uncore_upi_/dieX, where dieX is file which holds "upi_:die_" connected to this UPI link. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221117122833.3103580-7-alexander.antonov@linux.intel.com arch/x86/events/intel/uncore_snbep.c | 130 +++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) commit 07813e2a59c93f10716ffa33d608d2c0685cf85b Author: Alexander Antonov Date: Thu Nov 17 12:28:27 2022 +0000 perf/x86/intel/uncore: Generalize get_topology() for SKX PMUs Factor out a generic code from skx_iio_get_topology() to skx_pmu_get_topology() to avoid code duplication. This code will be used by get_topology() procedure for SKX UPI PMUs in the further patch. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221117122833.3103580-6-alexander.antonov@linux.intel.com arch/x86/events/intel/uncore_snbep.c | 38 ++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) commit efe062705d149b20a15498cb999a9edbb8241e6f Author: Alexander Antonov Date: Thu Nov 17 12:28:26 2022 +0000 perf/x86/intel/uncore: Disable I/O stacks to PMU mapping on ICX-D Current implementation of I/O stacks to PMU mapping doesn't support ICX-D. Detect ICX-D system to disable mapping. Fixes: 10337e95e04c ("perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on ICX") Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221117122833.3103580-5-alexander.antonov@linux.intel.com arch/x86/events/intel/uncore.h | 1 + arch/x86/events/intel/uncore_snbep.c | 5 +++++ 2 files changed, 6 insertions(+) commit 6532783310e2b2f50dc13f46c49aa6546cb6e7a3 Author: Alexander Antonov Date: Thu Nov 17 12:28:25 2022 +0000 perf/x86/intel/uncore: Clear attr_update properly Current clear_attr_update procedure in pmu_set_mapping() sets attr_update field in NULL that is not correct because intel_uncore_type pmu types can contain several groups in attr_update field. For example, SPR platform already has uncore_alias_group to update and then UPI topology group will be added in next patches. Fix current behavior and clear attr_update group related to mapping only. Fixes: bb42b3d39781 ("perf/x86/intel/uncore: Expose an Uncore unit to IIO PMON mapping") Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221117122833.3103580-4-alexander.antonov@linux.intel.com arch/x86/events/intel/uncore_snbep.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit cee4eebd9158d9eb3f8c1708c297b219e8ea861f Author: Alexander Antonov Date: Thu Nov 17 12:28:24 2022 +0000 perf/x86/intel/uncore: Introduce UPI topology type This patch introduces new 'uncore_upi_topology' topology type to support UPI topology discovery. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221117122833.3103580-3-alexander.antonov@linux.intel.com arch/x86/events/intel/uncore.h | 7 +++++++ arch/x86/events/intel/uncore_snbep.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 4d13be8ab5d4aa6106331baa9674632a75b884b0 Author: Alexander Antonov Date: Thu Nov 17 12:28:23 2022 +0000 perf/x86/intel/uncore: Generalize IIO topology support Current implementation of uncore mapping doesn't support different types of uncore PMUs which have its own topology context. This patch generalizes Intel uncore topology implementation to be able easily introduce support for new uncore blocks. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221117122833.3103580-2-alexander.antonov@linux.intel.com arch/x86/events/intel/uncore.h | 14 +++- arch/x86/events/intel/uncore_snbep.c | 152 +++++++++++++++++++++++++---------- 2 files changed, 122 insertions(+), 44 deletions(-) commit bf480f9385667309a8866e65833f261d4773df9a Author: Ravi Bangoria Date: Tue Nov 22 13:33:26 2022 +0530 perf/core: Don't allow grouping events from different hw pmus Event group from different hw pmus does not make sense and thus perf has never allowed it. However, with recent rewrite that restriction has been inadvertently removed. Fix it. Fixes: bd2756811766 ("perf: Rewrite core context handling") Signed-off-by: Ravi Bangoria Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221122080326.228-1-ravi.bangoria@amd.com kernel/events/core.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 30093056f7b2f759ff180d3a86d29f68315e469b Author: Ravi Bangoria Date: Tue Nov 15 15:09:04 2022 +0530 perf/amd/ibs: Make IBS a core pmu So far, only one pmu was allowed to be registered as core pmu and thus IBS pmus were being registered as uncore. However, with the event context rewrite, that limitation no longer exists and thus IBS pmus can also be registered as core pmu. This makes IBS much more usable, for ex, user will be able to do per-process precise monitoring on AMD: Before patch: $ sudo perf record -e cycles:pp ls Error: Invalid event (cycles:pp) in per-thread mode, enable system wide with '-a' After patch: $ sudo perf record -e cycles:pp ls [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.017 MB perf.data (33 samples) ] Signed-off-by: Ravi Bangoria Signed-off-by: Peter Zijlstra (Intel) Acked-by: Ian Rogers Link: https://lkml.kernel.org/r/20221115093904.1799-1-ravi.bangoria@amd.com arch/x86/events/amd/ibs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1af6239d1d3e61d33fd2f0ba53d3d1a67cc50574 Author: Peter Zijlstra Date: Wed Nov 16 22:40:17 2022 +0100 perf: Fix function pointer case With the advent of CFI it is no longer acceptible to cast function pointers. The robot complains thusly: kernel-events-core.c:warning:cast-from-int-(-)(struct-perf_cpu_pmu_context-)-to-remote_function_f-(aka-int-(-)(void-)-)-converts-to-incompatible-function-type Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) kernel/events/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 634a9d5ec78ae2899725950dfb97b98ce7a2f0e4 Author: Shaokun Zhang Date: Tue Nov 8 18:41:17 2022 +0800 perf/x86/amd: Remove the repeated declaration The function 'amd_brs_disable_all' is declared twice in commit ada543459cab ("perf/x86/amd: Add AMD Fam19h Branch Sampling support"). Remove one of them. Signed-off-by: Shaokun Zhang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221108104117.46642-1-zhangshaokun@hisilicon.com arch/x86/events/perf_event.h | 1 - 1 file changed, 1 deletion(-) commit 7963ba02b2d1de681ba1ee33060db42eb4cf4c07 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:47 2022 +0100 gpio: pcf857x: 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: Bartosz Golaszewski drivers/gpio/gpio-pcf857x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1287341c1980e0cf9eb19bdd370405d755392f2f Author: Uwe Kleine-König Date: Fri Nov 18 23:35:46 2022 +0100 gpio: pca953x: 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: Bartosz Golaszewski drivers/gpio/gpio-pca953x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8ac813f7e663bcf03e09291517359111d0cf9785 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:45 2022 +0100 gpio: max732x: 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: Bartosz Golaszewski drivers/gpio/gpio-max732x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 06fa87fc9311bdb97902ce015dee1ef5015eba12 Merge: 40059212f99c 662233731d66 Author: Bartosz Golaszewski Date: Thu Nov 24 09:20:26 2022 +0100 Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into gpio/for-next Introduce the i2c_client_get_device_id() helper. commit cc3fdda2876e58a7e83e558ab51853cf106afb6a Author: Ard Biesheuvel Date: Tue Nov 22 17:10:17 2022 +0100 x86/efi: Make the deprecated EFI handover protocol optional The EFI handover protocol permits a bootloader to invoke the kernel as a EFI PE/COFF application, while passing a bootparams struct as a third argument to the entrypoint function call. This has no basis in the UEFI specification, and there are better ways to pass additional data to a UEFI application (UEFI configuration tables, UEFI variables, UEFI protocols) than going around the StartImage() boot service and jumping to a fixed offset in the loaded image, just to call a different function that takes a third parameter. The reason for handling struct bootparams in the bootloader was that the EFI stub could only load initrd images from the EFI system partition, and so passing it via struct bootparams was needed for loaders like GRUB, which pass the initrd in memory, and may load it from anywhere, including from the network. Another motivation was EFI mixed mode, which could not use the initrd loader in the EFI stub at all due to 32/64 bit incompatibilities (which will be fixed shortly [0]), and could not invoke the ordinary PE/COFF entry point either, for the same reasons. Given that loaders such as GRUB already carried the bootparams handling in order to implement non-EFI boot, retaining that code and just passing bootparams to the EFI stub was a reasonable choice (although defining an alternate entrypoint could have been avoided.) However, the GRUB side changes never made it upstream, and are only shipped by some of the distros in their downstream versions. In the meantime, EFI support has been added to other Linux architecture ports, as well as to U-boot and systemd, including arch-agnostic methods for passing initrd images in memory [1], and for doing mixed mode boot [2], none of them requiring anything like the EFI handover protocol. So given that only out-of-tree distro GRUB relies on this, let's permit it to be omitted from the build, in preparation for retiring it completely at a later date. (Note that systemd-boot does have an implementation as well, but only uses it as a fallback for booting images that do not implement the LoadFile2 based initrd loading method, i.e., v5.8 or older) [0] https://lore.kernel.org/all/20220927085842.2860715-1-ardb@kernel.org/ [1] ec93fc371f01 ("efi/libstub: Add support for loading the initrd from a device path") [2] 97aa276579b2 ("efi/x86: Add true mixed mode entry point into .compat section") Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-18-ardb@kernel.org arch/x86/Kconfig | 17 +++++++++++++++++ arch/x86/boot/compressed/head_64.S | 4 +++- arch/x86/boot/header.S | 2 +- arch/x86/boot/tools/build.c | 2 ++ 4 files changed, 23 insertions(+), 2 deletions(-) commit 61de13df95901bc58456bc5acdbd3c18c66cf859 Author: Ard Biesheuvel Date: Tue Nov 22 17:10:16 2022 +0100 x86/boot/compressed: Only build mem_encrypt.S if AMD_MEM_ENCRYPT=y Avoid building the mem_encrypt.o object if memory encryption support is not enabled to begin with. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-17-ardb@kernel.org arch/x86/boot/compressed/Makefile | 2 +- arch/x86/boot/compressed/mem_encrypt.S | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 30c9ca16a5271ba6f8ad9c86507ff1c789c94677 Author: Ard Biesheuvel Date: Tue Nov 22 17:10:15 2022 +0100 x86/boot/compressed: Adhere to calling convention in get_sev_encryption_bit() Make get_sev_encryption_bit() follow the ordinary i386 calling convention, and only call it if CONFIG_AMD_MEM_ENCRYPT is actually enabled. This clarifies the calling code, and makes it more maintainable. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-16-ardb@kernel.org arch/x86/boot/compressed/head_64.S | 5 +++-- arch/x86/boot/compressed/mem_encrypt.S | 10 ---------- 2 files changed, 3 insertions(+), 12 deletions(-) commit 9d7eaae6a071ff1f718e0aa5e610bb712f8cc632 Author: Ard Biesheuvel Date: Tue Nov 22 17:10:14 2022 +0100 x86/boot/compressed: Move startup32_check_sev_cbit() out of head_64.S Now that the startup32_check_sev_cbit() routine can execute from anywhere and behaves like an ordinary function, it can be moved where it belongs. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-15-ardb@kernel.org arch/x86/boot/compressed/head_64.S | 71 ---------------------------------- arch/x86/boot/compressed/mem_encrypt.S | 68 ++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 71 deletions(-) commit b5d854cd4b6a314edd6c15dabc4233b84a0f8e5e Author: Ard Biesheuvel Date: Tue Nov 22 17:10:13 2022 +0100 x86/boot/compressed: Move startup32_check_sev_cbit() into .text Move startup32_check_sev_cbit() into the .text section and turn it into an ordinary function using the ordinary 32-bit calling convention, instead of saving/restoring the registers that are known to be live at the only call site. This improves maintainability, and makes it possible to move this function out of head_64.S and into a separate compilation unit that is specific to memory encryption. Note that this requires the call site to be moved before the mixed mode check, as %eax will be live otherwise. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-14-ardb@kernel.org arch/x86/boot/compressed/head_64.S | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit 9ea813be3d345dfb8ac5bf6fbb29e6a63647a39d Author: Ard Biesheuvel Date: Tue Nov 22 17:10:12 2022 +0100 x86/boot/compressed: Move startup32_load_idt() out of head_64.S Now that startup32_load_idt() has been refactored into an ordinary callable function, move it into mem-encrypt.S where it belongs. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-13-ardb@kernel.org arch/x86/boot/compressed/head_64.S | 72 ---------------------------------- arch/x86/boot/compressed/mem_encrypt.S | 72 +++++++++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 73 deletions(-) commit c6355995ba471d7ad574174e593192ce805c7e1a Author: Ard Biesheuvel Date: Tue Nov 22 17:10:11 2022 +0100 x86/boot/compressed: Move startup32_load_idt() into .text section Convert startup32_load_idt() into an ordinary function and move it into the .text section. This involves turning the rva() immediates into ones derived from a local label, and preserving/restoring the %ebp and %ebx as per the calling convention. Also move the #ifdef to the only existing call site. This makes it clear that the function call does nothing if support for memory encryption is not compiled in. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-12-ardb@kernel.org arch/x86/boot/compressed/head_64.S | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit d73a257f7f86871c3aac24dc20538e3983096647 Author: Ard Biesheuvel Date: Tue Nov 22 17:10:10 2022 +0100 x86/boot/compressed: Pull global variable reference into startup32_load_idt() In preparation for moving startup32_load_idt() out of head_64.S and turning it into an ordinary function using the ordinary 32-bit calling convention, pull the global variable reference to boot32_idt up into startup32_load_idt() so that startup32_set_idt_entry() does not need to discover its own runtime physical address, which will no longer be correlated with startup_32 once this code is moved into .text. While at it, give startup32_set_idt_entry() static linkage. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-11-ardb@kernel.org arch/x86/boot/compressed/head_64.S | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 6aac80a8da46d70f2ae7ff97c9f45a15c7c9b3ef Author: Ard Biesheuvel Date: Tue Nov 22 17:10:09 2022 +0100 x86/boot/compressed: Avoid touching ECX in startup32_set_idt_entry() Avoid touching register %ecx in startup32_set_idt_entry(), by folding the MOV, SHL and ORL instructions into a single ORL which no longer requires a temp register. This permits ECX to be used as a function argument in a subsequent patch. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-10-ardb@kernel.org arch/x86/boot/compressed/head_64.S | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 630f337f0c4fd80390e8600adcab31550aea33df Author: Ard Biesheuvel Date: Tue Nov 22 17:10:08 2022 +0100 x86/boot/compressed: Simplify IDT/GDT preserve/restore in the EFI thunk Tweak the asm and remove some redundant instructions. While at it, fix the associated comment for style and correctness. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-9-ardb@kernel.org arch/x86/boot/compressed/efi_mixed.S | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 4b52016247aeaa55ca3e3bc2e03cd91114c145c2 Author: Ard Biesheuvel Date: Tue Nov 22 17:10:07 2022 +0100 x86/boot/compressed, efi: Merge multiple definitions of image_offset into one There is no need for head_32.S and head_64.S both declaring a copy of the global 'image_offset' variable, so drop those and make the extern C declaration the definition. When image_offset is moved to the .c file, it needs to be placed particularly in the .data section because it lands by default in the .bss section which is cleared too late, in .Lrelocated, before the first access to it and thus garbage gets read, leading to SEV guests exploding in early boot. This happens only when the SEV guest kernel is loaded through grub. If supplied with qemu's -kernel command line option, that memory is always cleared upfront by qemu and all is fine there. [ bp: Expand commit message with SEV aspect. ] Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-8-ardb@kernel.org arch/x86/boot/compressed/head_32.S | 4 ---- arch/x86/boot/compressed/head_64.S | 4 ---- drivers/firmware/efi/libstub/x86-stub.c | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) commit 4370232c727bf45940345dd1b88dbd8c2e42ec56 Author: Manivannan Sadhasivam Date: Thu Nov 17 11:01:44 2022 +0530 cpufreq: qcom-hw: Add CPU clock provider support Qcom CPUFreq hardware (EPSS/OSM) controls clock and voltage to the CPU cores. But this relationship is not represented with the clk framework so far. So, let's make the qcom-cpufreq-hw driver a clock provider. This makes the clock producer/consumer relationship cleaner and is also useful for CPU related frameworks like OPP to know the frequency at which the CPUs are running. The clock frequency provided by the driver is for each frequency domain. We cannot get the frequency of each CPU core because, not all platforms support per-core DCVS feature. Also the frequency supplied by the driver is the actual frequency that comes out of the EPSS/OSM block after the DCVS operation. This frequency is not same as what the CPUFreq framework has set but it is the one that gets supplied to the CPUs after throttling by LMh. Signed-off-by: Manivannan Sadhasivam [ Xiu: Fixed memleak. ] Signed-off-by: Xiu Jianfeng Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 170d97739de484cc052d65043d57acce7ed10480 Merge: 64a8f8f7127d f8a65ab2f3ff Author: Jakub Kicinski Date: Wed Nov 23 20:15:13 2022 -0800 Merge branch 'bonding-fix-bond-recovery-in-mode-2' Jonathan Toppins says: ==================== bonding: fix bond recovery in mode 2 When a bond is configured with a non-zero updelay and in mode 2 the bond never recovers after all slaves lose link. The first patch adds selftests that demonstrate the issue and the second patch fixes the issue by ignoring the updelay when there are no usable slaves. ==================== Link: https://lore.kernel.org/r/cover.1669147951.git.jtoppins@redhat.com Signed-off-by: Jakub Kicinski commit f8a65ab2f3ff7410921ebbf0dc55453102c33c56 Author: Jonathan Toppins Date: Tue Nov 22 16:24:29 2022 -0500 bonding: fix link recovery in mode 2 when updelay is nonzero Before this change when a bond in mode 2 lost link, all of its slaves lost link, the bonding device would never recover even after the expiration of updelay. This change removes the updelay when the bond currently has no usable links. Conforming to bonding.txt section 13.1 paragraph 4. Fixes: 41f891004063 ("bonding: ignore updelay param when there is no active slave") Signed-off-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski drivers/net/bonding/bond_main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit d43eff0b85ae28dd2b95dab18a3e7dcb813d7bc1 Author: Jonathan Toppins Date: Tue Nov 22 15:25:04 2022 -0500 selftests: bonding: up/down delay w/ slave link flapping Verify when a bond is configured with {up,down}delay and the link state of slave members flaps if there are no remaining members up the bond should immediately select a member to bring up. (from bonding.txt section 13.1 paragraph 4) Suggested-by: Liang Li Signed-off-by: Jonathan Toppins Signed-off-by: Jakub Kicinski .../testing/selftests/drivers/net/bonding/Makefile | 4 +- .../selftests/drivers/net/bonding/lag_lib.sh | 106 +++++++++++++++++++++ .../drivers/net/bonding/mode-1-recovery-updelay.sh | 45 +++++++++ .../drivers/net/bonding/mode-2-recovery-updelay.sh | 45 +++++++++ .../testing/selftests/drivers/net/bonding/settings | 2 +- 5 files changed, 200 insertions(+), 2 deletions(-) commit 64a8f8f7127da228d59a39e2c5e75f86590f90b4 Author: Maxim Korotkov Date: Tue Nov 22 15:29:01 2022 +0300 ethtool: avoiding integer overflow in ethtool_phys_id() The value of an arithmetic expression "n * id.data" is subject to possible overflow due to a failure to cast operands to a larger data type before performing arithmetic. Used macro for multiplication instead operator for avoiding overflow. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Maxim Korotkov Reviewed-by: Alexander Lobakin Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20221122122901.22294-1-korotkov.maxim.s@gmail.com Signed-off-by: Jakub Kicinski net/ethtool/ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9c9ff300e0de07475796495d86f449340d454a0c Author: Yuan Can Date: Tue Nov 22 01:57:51 2022 +0000 scsi: hpsa: Fix possible memory leak in hpsa_init_one() The hpda_alloc_ctlr_info() allocates h and its field reply_map. However, in hpsa_init_one(), if alloc_percpu() failed, the hpsa_init_one() jumps to clean1 directly, which frees h and leaks the h->reply_map. Fix by calling hpda_free_ctlr_info() to release h->replay_map and h instead free h directly. Fixes: 8b834bff1b73 ("scsi: hpsa: fix selection of reply queue") Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20221122015751.87284-1-yuancan@huawei.com Reviewed-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfee29ffb45b1c9798011b19d454637d1b0fe87d Author: Wenchao Hao Date: Wed Nov 23 20:21:37 2022 +0800 scsi: core: Do not increase scsi_device's iorequest_cnt if dispatch failed If scsi_dispatch_cmd() failed, the SCSI command was not sent to the target. scsi_queue_rq() would return BLK_STS_RESOURCE if scsi_dispatch_cmd() failed, and the related request would be requeued. The timeout of this request would not fire, so noone would increase iodone_cnt. Signed-off-by: Wenchao Hao Link: https://lore.kernel.org/r/20221123122137.150776-3-haowenchao@huawei.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ec9780e48c77f469c339b53940ef0c5eacc8b9d2 Author: Wenchao Hao Date: Wed Nov 23 20:21:36 2022 +0800 scsi: core: Increase scsi_device's iodone_cnt in scsi_timeout() If a SCSI command times out and is going to be aborted, we should increase the iodone_cnt of the related scsi_device. Otherwise the iodone_cnt would be smaller than iorequest_cnt. Increasing iodone_cnt in scsi_timeout() would not cause a double accounting issue. Brief analysis follows: - We add the iodone_cnt when BLK_EH_DONE is returned in scsi_timeout(). The related command's timeout event would not happen. - If the abort succeeds and the command is not retried, the command would be completed with scsi_finish_command() which would not increase iodone_cnt. - If the abort succeeds and the command is retried, it would be requeue. A scsi_dispatch_cmd() would be called and iorequest_cnt would be increased again. - If the abort fails, the error handler successfully recovers the device, and the command is not retried, the command would be completed with scsi_finish_command() which would not increase iodone_cnt. - If the abort fails, the error handler successfully recovers the device, and the command is retried, the iorequest_cnt would be increased again. Signed-off-by: Wenchao Hao Link: https://lore.kernel.org/r/20221123122137.150776-2-haowenchao@huawei.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 1 + 1 file changed, 1 insertion(+) commit 0c26a2d7c98039e913e63f9250fde738a3f88a60 Author: Wenchao Hao Date: Tue Nov 22 18:11:05 2022 +0000 scsi: iscsi: Rename iscsi_set_param() to iscsi_if_set_param() There are two iscsi_set_param() functions defined in libiscsi.c and scsi_transport_iscsi.c respectively which is confusing. Rename the one in scsi_transport_iscsi.c to iscsi_if_set_param(). Signed-off-by: Wenchao Hao Link: https://lore.kernel.org/r/20221122181105.4123935-1-haowenchao@huawei.com Reviewed-by: Mike Christie Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a72629b5cdbc43e28a4a19b0fce8d17c582c4db4 Author: Maurizio Lombardi Date: Mon Nov 21 10:27:03 2022 +0100 scsi: target: core: Fix hard lockup when executing a compare-and-write command While handling an I/O completion for the compare portion of a COMPARE_AND_WRITE command, it may happen that the compare_and_write_callback function submits new bio structs while still in softirq context. Low level drivers like md raid5 do not expect their make_request call to be used in softirq context, they call into schedule() and create a deadlocked system. __schedule at ffffffff873a0807 schedule at ffffffff873a0cc5 raid5_get_active_stripe at ffffffffc0875744 [raid456] raid5_make_request at ffffffffc0875a50 [raid456] md_handle_request at ffffffff8713b9f9 md_make_request at ffffffff8713bacb generic_make_request at ffffffff86e6f14b submit_bio at ffffffff86e6f27c iblock_submit_bios at ffffffffc0b4e4dc [target_core_iblock] iblock_execute_rw at ffffffffc0b4f3ce [target_core_iblock] __target_execute_cmd at ffffffffc1090079 [target_core_mod] compare_and_write_callback at ffffffffc1093602 [target_core_mod] target_cmd_interrupted at ffffffffc108d1ec [target_core_mod] target_complete_cmd_with_sense at ffffffffc108d27c [target_core_mod] iblock_complete_cmd at ffffffffc0b4e23a [target_core_iblock] dm_io_dec_pending at ffffffffc00db29e [dm_mod] clone_endio at ffffffffc00dbf07 [dm_mod] raid5_align_endio at ffffffffc086d6c2 [raid456] blk_update_request at ffffffff86e6d950 scsi_end_request at ffffffff87063d48 scsi_io_completion at ffffffff87063ee8 blk_complete_reqs at ffffffff86e77b05 __softirqentry_text_start at ffffffff876000d7 This problem appears to be an issue between target_cmd_interrupted() and compare_and_write_callback(). target_cmd_interrupted() calls the se_cmd's transport_complete_callback function pointer if the se_cmd is being stopped or aborted, and CMD_T_ABORTED was set on the se_cmd. When calling compare_and_write_callback(), the success parameter was set to false. target_cmd_interrupted() seems to expect this means the callback will do cleanup that does not require a process context. But compare_and_write_callback() ignores the parameter if there was I/O done for the compare part of COMPARE_AND_WRITE. Since there was data, the function continued on, passed the compare, and issued a write while ignoring the value of the success parameter. The submit of a bio for the write portion of the COMPARE_AND_WRITE then causes schedule to be unsafely called from the softirq context. Fix the bug in compare_and_write_callback by jumping to the out label if success == "false", after checking if we have been called by transport_generic_request_failure(); The command is being aborted or stopped so there is no need to submit the write bio for the write part of the COMPARE_AND_WRITE command. Signed-off-by: Maurizio Lombardi Link: https://lore.kernel.org/r/20221121092703.316489-1-mlombard@redhat.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_sbc.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit fec1b2fa62c162d03f5dcd7b03e3c89d3116d49f Author: Maurizio Lombardi Date: Tue Nov 15 13:56:38 2022 +0100 scsi: target: iscsi: Fix a race condition between login_work and the login thread In case a malicious initiator sends some random data immediately after a login PDU; the iscsi_target_sk_data_ready() callback will schedule the login_work and, at the same time, the negotiation may end without clearing the LOGIN_FLAGS_INITIAL_PDU flag (because no additional PDU exchanges are required to complete the login). The login has been completed but the login_work function will find the LOGIN_FLAGS_INITIAL_PDU flag set and will never stop from rescheduling itself; at this point, if the initiator drops the connection, the iscsit_conn structure will be freed, login_work will dereference a released socket structure and the kernel crashes. BUG: kernel NULL pointer dereference, address: 0000000000000230 PF: supervisor write access in kernel mode PF: error_code(0x0002) - not-present page Workqueue: events iscsi_target_do_login_rx [iscsi_target_mod] RIP: 0010:_raw_read_lock_bh+0x15/0x30 Call trace: iscsi_target_do_login_rx+0x75/0x3f0 [iscsi_target_mod] process_one_work+0x1e8/0x3c0 Fix this bug by forcing login_work to stop after the login has been completed and the socket callbacks have been restored. Add a comment to clearify the return values of iscsi_target_do_login() Signed-off-by: Maurizio Lombardi Link: https://lore.kernel.org/r/20221115125638.102517-1-mlombard@redhat.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/iscsi/iscsi_target_nego.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 2847b6681547022e5c8f1f6dc104c9256a120c0a Merge: 9040ef6f68a2 76cdcb87d391 Author: Dave Airlie Date: Thu Nov 24 12:49:32 2022 +1000 Merge tag 'mediatek-drm-next-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 6.2 1. Fixup of dpi and hdmi 2. Move panel connector to head 3. Add MT8188 dpi support 4. Add MT8195 AFBC support Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20221123234855.2485-1-chunkuang.hu@kernel.org commit 9040ef6f68a29114ff77c423d3f78be09391ae97 Merge: d47f9580839e ff6d979454ee Author: Dave Airlie Date: Thu Nov 24 12:38:30 2022 +1000 Merge tag 'drm-next-20221122' of git://linuxtv.org/pinchartl/media into drm-next Kconfig fix for RZ/G2L DSI Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/Y3wYk/Bn/qVa9ha0@pendragon.ideasonboard.com commit 689d94ec208cfdf95101d99319cb4bdc5f55774d Author: Anastasia Kovaleva Date: Mon Nov 14 13:25:00 2022 +0300 scsi: target: core: Change the way target_xcopy_do_work() sets restiction on max I/O To determine how many blocks sends in one command, the minimum value is selected from the hw_max_sectors of both devices. In target_xcopy_do_work, hw_max_sectors are used as blocks, not sectors; it also ignores the fact that sectors can be of different sizes, for example 512 and 4096 bytes. Because of this, a number of blocks can be transmitted that the device will not be able to accept. Change the selection of max transmission size into bytes. Reviewed-by: Konstantin Shelekhin Reviewed-by: Dmitriy Bogdanov Signed-off-by: Anastasia Kovaleva Link: https://lore.kernel.org/r/20221114102500.88892-4-a.kovaleva@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_xcopy.c | 97 +++++++++++++++++++++----------------- drivers/target/target_core_xcopy.h | 2 +- 2 files changed, 54 insertions(+), 45 deletions(-) commit 9375031ee40b66c8fd2fc24d5fbea47b69f53de6 Author: Anastasia Kovaleva Date: Mon Nov 14 13:24:59 2022 +0300 scsi: target: core: Make hw_max_sectors store the sectors amount in blocks By default, hw_max_sectors stores its value in 512 blocks in iblock, despite the fact that the block size can be 4096 bytes. Change hw_max_sectors to store the number of sectors in hw_block_size blocks. Reviewed-by: Konstantin Shelekhin Reviewed-by: Dmitriy Bogdanov Signed-off-by: Anastasia Kovaleva Link: https://lore.kernel.org/r/20221114102500.88892-3-a.kovaleva@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_iblock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7870d24817890bccee98db0718acececd6399d04 Author: Anastasia Kovaleva Date: Mon Nov 14 13:24:58 2022 +0300 scsi: target: core: Send max transfer length in blocks A MAXIMUM TRANSFER LENGTH value indicates the maximum transfer length in logical blocks that the device server accepts for a single command. Fix function sending the length in sectors instead of blocks. This patch also removes the special casing for fileio in block_size_store since this logic in now unified in spc_emulate_evpd_b0() for all backends. Reviewed-by: Konstantin Shelekhin Reviewed-by: Dmitriy Bogdanov Signed-off-by: Anastasia Kovaleva Link: https://lore.kernel.org/r/20221114102500.88892-2-a.kovaleva@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_configfs.c | 2 -- drivers/target/target_core_file.c | 1 - drivers/target/target_core_spc.c | 6 +++++- include/target/target_core_base.h | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) commit cdd9344e00b4fe3a4683a0ee58826c7a5ce778e0 Author: Thomas Gleixner Date: Sun Nov 13 21:33:59 2022 +0100 scsi: lpfc: Remove linux/msi.h include Nothing in this file needs anything from linux/msi.h Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221113202428.436270297@linutronix.de Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Reviewed-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 1 - 1 file changed, 1 deletion(-) commit d57d98fef46fead01d954afa1b585405b617a4e4 Author: Justin Tee Date: Tue Nov 15 17:19:21 2022 -0800 scsi: lpfc: Update lpfc version to 14.2.0.9 Update lpfc version to 14.2.0.9. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20221116011921.105995-7-justintee8345@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f471748b7fe5ab7ec6de4cbadffabfa7bb5b6240 Author: David Vernet Date: Tue Nov 22 08:53:00 2022 -0600 selftests/bpf: Add selftests for bpf_task_from_pid() Add some selftest testcases that validate the expected behavior of the bpf_task_from_pid() kfunc that was added in the prior patch. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221122145300.251210-3-void@manifault.com Signed-off-by: Alexei Starovoitov .../testing/selftests/bpf/prog_tests/task_kfunc.c | 4 ++ .../selftests/bpf/progs/task_kfunc_common.h | 1 + .../selftests/bpf/progs/task_kfunc_failure.c | 13 ++++ .../selftests/bpf/progs/task_kfunc_success.c | 73 ++++++++++++++++++++++ 4 files changed, 91 insertions(+) commit 3f0e6f2b41d35d4446160c745e8f09037447dd8f Author: David Vernet Date: Tue Nov 22 08:52:59 2022 -0600 bpf: Add bpf_task_from_pid() kfunc Callers can currently store tasks as kptrs using bpf_task_acquire(), bpf_task_kptr_get(), and bpf_task_release(). These are useful if a caller already has a struct task_struct *, but there may be some callers who only have a pid, and want to look up the associated struct task_struct * from that to e.g. find task->comm. This patch therefore adds a new bpf_task_from_pid() kfunc which allows BPF programs to get a struct task_struct * kptr from a pid. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221122145300.251210-2-void@manifault.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit d47f9580839eb6fe568e38b2084d94887fbf5ce0 Merge: 3d335a523b93 eb7081409f94 Author: Dave Airlie Date: Thu Nov 24 11:05:43 2022 +1000 Backmerge tag 'v6.1-rc6' into drm-next Linux 6.1-rc6 This is needed for drm-misc-next and tegra. Signed-off-by: Dave Airlie commit 5bad3587b7a292148cea10185cd8770baaeb7445 Author: Stanislav Fomichev Date: Wed Nov 23 16:28:38 2022 -0800 bpf: Unify and simplify btf_func_proto_check error handling Replace 'err = x; break;' with 'return x;'. Suggested-by: Daniel Borkmann Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221124002838.2700179-1-sdf@google.com kernel/bpf/btf.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 72b43bde38de4aa05e6a7fa12d7965f48180deb6 Author: Ji Rongfeng Date: Fri Nov 18 16:18:18 2022 +0800 bpf: Update bpf_{g,s}etsockopt() documentation * append missing optnames to the end * simplify bpf_getsockopt()'s doc Signed-off-by: Ji Rongfeng Link: https://lore.kernel.org/r/DU0P192MB15479B86200B1216EC90E162D6099@DU0P192MB1547.EURP192.PROD.OUTLOOK.COM Signed-off-by: Martin KaFai Lau include/uapi/linux/bpf.h | 21 ++++++++++++--------- tools/include/uapi/linux/bpf.h | 23 +++++++++++++---------- 2 files changed, 25 insertions(+), 19 deletions(-) commit bd604f3db49c5b21171abea0414a2020dcbf2646 Author: Steven Rostedt (Google) Date: Tue Nov 22 18:09:05 2022 -0500 ftrace: Avoid needless updates of the ftrace function call Song Shuai reported: The list func (ftrace_ops_list_func) will be patched first before the transition between old and new calls are set, which fixed the race described in this commit `59338f75`. While ftrace_trace_function changes from the list func to a ftrace_ops func, like unregistering the klp_ops to leave the only global_ops in ftrace_ops_list, the ftrace_[regs]_call will be replaced with the list func although it already exists. So there should be a condition to avoid this. And suggested using another variable to keep track of what the ftrace function is set to. But this could be simplified by using a helper function that does the same with a static variable. Link: https://lore.kernel.org/lkml/20221026132039.2236233-1-suagrfillet@gmail.com/ Link: https://lore.kernel.org/linux-trace-kernel/20221122180905.737b6f52@gandalf.local.home Reported-by: Song Shuai Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/ftrace.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 96e6122cb79616c622ae0d025eb9f981120b568d Author: Zheng Yejian Date: Thu Nov 10 10:03:19 2022 +0800 tracing: Optimize event type allocation with IDA After commit 060fa5c83e67 ("tracing/events: reuse trace event ids after overflow"), trace events with dynamic type are linked up in list 'ftrace_event_list' through field 'trace_event.list'. Then when max event type number used up, it's possible to reuse type number of some freed one by traversing 'ftrace_event_list'. As instead, using IDA to manage available type numbers can make codes simpler and then the field 'trace_event.list' can be dropped. Since 'struct trace_event' is used in static tracepoints, drop 'trace_event.list' can make vmlinux smaller. Local test with about 2000 tracepoints, vmlinux reduced about 64KB: before:-rwxrwxr-x 1 root root 76669448 Nov 8 17:14 vmlinux after: -rwxrwxr-x 1 root root 76604176 Nov 8 17:15 vmlinux Link: https://lkml.kernel.org/r/20221110020319.1259291-1-zhengyejian1@huawei.com Signed-off-by: Zheng Yejian Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) include/linux/trace_events.h | 1 - kernel/trace/trace_output.c | 66 +++++++++++--------------------------------- 2 files changed, 16 insertions(+), 51 deletions(-) commit a76d4648a0bbd624a1322c15073b5032a5135f01 Author: Xiu Jianfeng Date: Tue Nov 22 17:14:56 2022 +0800 tracing: Make tracepoint_print_iter static After change in commit 4239174570da ("tracing: Make tracepoint_printk a static_key"), this symbol is not used outside of the file, so mark it static. Link: https://lkml.kernel.org/r/20221122091456.72055-1-xiujianfeng@huawei.com Signed-off-by: Xiu Jianfeng Signed-off-by: Steven Rostedt (Google) kernel/trace/trace.c | 2 +- kernel/trace/trace.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 9430cd62b6ccdf1f06915cc06561f0e364809604 Author: Chuang Wang Date: Mon Nov 21 16:08:31 2022 +0800 tracing/perf: Use strndup_user instead of kzalloc/strncpy_from_user This patch uses strndup_user instead of kzalloc + strncpy_from_user, which makes the code more concise. Link: https://lkml.kernel.org/r/20221121080831.707409-1-nashuiliang@gmail.com Signed-off-by: Chuang Wang Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_event_perf.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 67543cd6b8eee53959e624b9ce420ca4d47be0c8 Author: Daniel Bristot de Oliveira Date: Thu Nov 17 14:46:20 2022 +0100 Documentation/osnoise: Add osnoise/options documentation Add the documentation about the osnoise/options file, along with an explanation about the OSNOISE_WORKLOAD option. Link: https://lkml.kernel.org/r/777af8f3d87beedd304805f98eff6c8291d64226.1668692096.git.bristot@kernel.org Cc: Daniel Bristot de Oliveira Cc: Masami Hiramatsu Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) Documentation/trace/osnoise-tracer.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 30838fcd81078d078b10209bc18a6357ba4dd5fa Author: Daniel Bristot de Oliveira Date: Thu Nov 17 14:46:19 2022 +0100 tracing/osnoise: Add OSNOISE_WORKLOAD option The osnoise tracer is not only a tracer, and a set of tracepoints, but also a workload dispatcher. In preparation for having other workloads, e.g., in user-space, add an option to avoid dispatching the workload. By not dispatching the workload, the osnoise: tracepoints become generic events to measure the execution time of *any* task on Linux. For example: # cd /sys/kernel/tracing/ # cat osnoise/options DEFAULTS OSNOISE_WORKLOAD # echo NO_OSNOISE_WORKLOAD > osnoise/options # cat osnoise/options NO_DEFAULTS NO_OSNOISE_WORKLOAD # echo osnoise > set_event # echo osnoise > current_tracer # tail -8 trace make-94722 [002] d..3. 1371.794507: thread_noise: make:94722 start 1371.794302286 duration 200897 ns sh-121042 [020] d..3. 1371.794534: thread_noise: sh:121042 start 1371.781610976 duration 8943683 ns make-121097 [005] d..3. 1371.794542: thread_noise: make:121097 start 1371.794481522 duration 60444 ns <...>-40 [005] d..3. 1371.794550: thread_noise: migration/5:40 start 1371.794542256 duration 7154 ns -0 [018] dNh2. 1371.794554: irq_noise: reschedule:253 start 1371.794553547 duration 40 ns -0 [018] dNh2. 1371.794561: irq_noise: local_timer:236 start 1371.794556222 duration 4890 ns -0 [018] .Ns2. 1371.794563: softirq_noise: SCHED:7 start 1371.794561803 duration 992 ns -0 [018] d..3. 1371.794566: thread_noise: swapper/18:0 start 1371.781368110 duration 13191798 ns In preparation for the rtla exec_time tracer/tool and rtla osnoise --user option. Link: https://lkml.kernel.org/r/f5cfbd37aefd419eefe9243b4d2fc38ed5753fe4.1668692096.git.bristot@kernel.org Cc: Daniel Bristot de Oliveira Cc: Masami Hiramatsu Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_osnoise.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit b179d48b6aab21f3999f5006685ea4254c0618a9 Author: Daniel Bristot de Oliveira Date: Thu Nov 17 14:46:18 2022 +0100 tracing/osnoise: Add osnoise/options file Add the tracing/osnoise/options file to control osnoise/timerlat tracer features. It is a single file to contain multiple features, similar to the sched/features file. Reading the file displays a list of options. Writing the OPTION_NAME enables it, writing NO_OPTION_NAME disables it. The DEAFULTS is a particular option that resets the options to the default ones. It uses a bitmask to keep track of the status of the option. When needed, we can add a list of static keys, but for now it does not justify the memory increase. Link: https://lkml.kernel.org/r/f8d34aefdb225d2603fcb4c02a120832a0cd3339.1668692096.git.bristot@kernel.org Cc: Daniel Bristot de Oliveira Cc: Masami Hiramatsu Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_osnoise.c | 170 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) commit 04aabc32fb677f91d676fd306bca1043805e78d5 Author: Song Chen Date: Thu Oct 20 22:06:51 2022 +0800 ring_buffer: Remove unused "event" parameter After commit a389d86f7fd0 ("ring-buffer: Have nested events still record running time stamp"), the "event" parameter is no longer used in either ring_buffer_unlock_commit() or rb_commit(). Best to remove it. Link: https://lkml.kernel.org/r/1666274811-24138-1-git-send-email-chensong_2000@189.cn Signed-off-by: Song Chen Signed-off-by: Steven Rostedt (Google) include/linux/ring_buffer.h | 3 +-- kernel/trace/ring_buffer.c | 12 +++++------- kernel/trace/ring_buffer_benchmark.c | 2 +- kernel/trace/trace.c | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) commit a01fdc897fa56ffb596d0a0cd7ea2ab3bd8398c5 Author: Steven Rostedt (Google) Date: Thu Oct 20 21:00:56 2022 -0400 tracing: Add trace_trigger kernel command line option Allow triggers to be enabled at kernel boot up. For example: trace_trigger="sched_switch.stacktrace if prev_state == 2" The above will enable the stacktrace trigger on top of the sched_switch event and only trigger if its prev_state is 2 (TASK_UNINTERRUPTIBLE). Then at boot up, a stacktrace will trigger and be recorded in the tracing ring buffer every time the sched_switch happens where the previous state is TASK_INTERRUPTIBLE. Another useful trigger would be "traceoff" which can stop tracing on an event if a field of the event matches a certain value defined by the filter ("if" statement). Link: https://lore.kernel.org/linux-trace-kernel/20221020210056.0d8d0a5b@gandalf.local.home Signed-off-by: Steven Rostedt (Google) Documentation/admin-guide/kernel-parameters.txt | 19 +++++++ kernel/trace/trace_events.c | 72 ++++++++++++++++++++++++- 2 files changed, 89 insertions(+), 2 deletions(-) commit 8230f27b1ccc4b8976c137e3d6d690f9d4ffca8d Author: Steven Rostedt (Google) Date: Fri Oct 14 08:04:56 2022 -0400 tracing: Add __cpumask to denote a trace event field that is a cpumask_t The trace events have a __bitmask field that can be used for anything that requires bitmasks. Although currently it is only used for CPU masks, it could be used in the future for any type of bitmasks. There is some user space tooling that wants to know if a field is a CPU mask and not just some random unsigned long bitmask. Introduce "__cpumask()" helper functions that work the same as the current __bitmask() helpers but displays in the format file: field:__data_loc cpumask_t *[] mask; offset:36; size:4; signed:0; Instead of: field:__data_loc unsigned long[] mask; offset:32; size:4; signed:0; The main difference is the type. Instead of "unsigned long" it is "cpumask_t *". Note, this type field needs to be a real type in the __dynamic_array() logic that both __cpumask and__bitmask use, but the comparison field requires it to be a scalar type whereas cpumask_t is a structure (non-scalar). But everything works when making it a pointer. Valentin added changes to remove the need of passing in "nr_bits" and the __cpumask will always use nr_cpumask_bits as its size. Link: https://lkml.kernel.org/r/20221014080456.1d32b989@rorschach.local.home Requested-by: Valentin Schneider Reviewed-by: Valentin Schneider Signed-off-by: Valentin Schneider Signed-off-by: Steven Rostedt (Google) include/trace/bpf_probe.h | 6 +++++ include/trace/perf.h | 6 +++++ include/trace/stages/stage1_struct_define.h | 6 +++++ include/trace/stages/stage2_data_offsets.h | 6 +++++ include/trace/stages/stage3_trace_output.h | 6 +++++ include/trace/stages/stage4_event_fields.h | 6 +++++ include/trace/stages/stage5_get_offsets.h | 6 +++++ include/trace/stages/stage6_event_callback.h | 20 ++++++++++++++++ include/trace/stages/stage7_class_define.h | 2 ++ samples/trace_events/trace-events-sample.c | 2 +- samples/trace_events/trace-events-sample.h | 34 +++++++++++++++++++++------- 11 files changed, 91 insertions(+), 9 deletions(-) commit 78a01feb4024ffb6c6321e45dc2bfcafb2d1d1e5 Author: Zheng Yejian Date: Tue Oct 25 15:39:23 2022 +0000 ftrace: Clean comments related to FTRACE_OPS_FL_PER_CPU Commit b3a88803ac5b ("ftrace: Kill FTRACE_OPS_FL_PER_CPU") didn't completely remove the comments related to FTRACE_OPS_FL_PER_CPU. Link: https://lkml.kernel.org/r/20221025153923.1995973-1-zhengyejian1@huawei.com Fixes: b3a88803ac5b ("ftrace: Kill FTRACE_OPS_FL_PER_CPU") Signed-off-by: Zheng Yejian Signed-off-by: Steven Rostedt (Google) kernel/trace/ftrace.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 539886a32a6a4601241d928dc8b776b052c04ed0 Author: Donald Hunter Date: Tue Nov 22 14:39:33 2022 +0000 docs/bpf: Fix sphinx warnings in BPF map docs Fix duplicate C declaration warnings when using sphinx >= 3.1. Reported-by: Akira Yokosawa Signed-off-by: Donald Hunter Signed-off-by: Daniel Borkmann Reviewed-by: Akira Yokosawa Link: https://lore.kernel.org/bpf/ed4dac84-1b12-5c58-e4de-93ab9ac67c09@gmail.com Link: https://lore.kernel.org/bpf/20221122143933.91321-1-donald.hunter@gmail.com Documentation/bpf/map_array.rst | 20 +++++++++++++++---- Documentation/bpf/map_hash.rst | 33 +++++++++++++++++++++++++++----- Documentation/bpf/map_lpm_trie.rst | 24 +++++++++++++++++++---- Documentation/bpf/map_of_maps.rst | 6 +++++- Documentation/bpf/map_queue_stack.rst | 36 +++++++++++++++++++++++++++++------ 5 files changed, 99 insertions(+), 20 deletions(-) commit 79268e9c62ec6eb6233a85a25c8795fa322aea82 Merge: 0fa32dad1e78 8332f0ed4f18 Author: Paolo Bonzini Date: Wed Nov 23 18:52:29 2022 -0500 Merge branch 'kvm-dwmw2-fixes' into HEAD This brings in a few important fixes for Xen emulation. While nobody should be enabling it, the bug effectively allows userspace to read arbitrary memory. Signed-off-by: Paolo Bonzini commit 8e898aaa733eca61393fc036c8a4b5834fee5dd3 Author: Stanislav Fomichev Date: Tue Nov 22 19:54:21 2022 -0800 selftests/bpf: Add reproducer for decl_tag in func_proto argument It should trigger a WARN_ON_ONCE in btf_type_id_size: RIP: 0010:btf_type_id_size+0x8bd/0x940 kernel/bpf/btf.c:1952 btf_func_proto_check kernel/bpf/btf.c:4506 [inline] btf_check_all_types kernel/bpf/btf.c:4734 [inline] btf_parse_type_sec+0x1175/0x1980 kernel/bpf/btf.c:4763 btf_parse kernel/bpf/btf.c:5042 [inline] btf_new_fd+0x65a/0xb00 kernel/bpf/btf.c:6709 bpf_btf_load+0x6f/0x90 kernel/bpf/syscall.c:4342 __sys_bpf+0x50a/0x6c0 kernel/bpf/syscall.c:5034 __do_sys_bpf kernel/bpf/syscall.c:5093 [inline] __se_sys_bpf kernel/bpf/syscall.c:5091 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5091 do_syscall_64+0x54/0x70 arch/x86/entry/common.c:48 Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221123035422.872531-1-sdf@google.com tools/testing/selftests/bpf/prog_tests/btf.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f17472d4599697d701aa239b4c475a506bccfd19 Author: Stanislav Fomichev Date: Tue Nov 22 19:54:22 2022 -0800 bpf: Prevent decl_tag from being referenced in func_proto arg Syzkaller managed to hit another decl_tag issue: btf_func_proto_check kernel/bpf/btf.c:4506 [inline] btf_check_all_types kernel/bpf/btf.c:4734 [inline] btf_parse_type_sec+0x1175/0x1980 kernel/bpf/btf.c:4763 btf_parse kernel/bpf/btf.c:5042 [inline] btf_new_fd+0x65a/0xb00 kernel/bpf/btf.c:6709 bpf_btf_load+0x6f/0x90 kernel/bpf/syscall.c:4342 __sys_bpf+0x50a/0x6c0 kernel/bpf/syscall.c:5034 __do_sys_bpf kernel/bpf/syscall.c:5093 [inline] __se_sys_bpf kernel/bpf/syscall.c:5091 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5091 do_syscall_64+0x54/0x70 arch/x86/entry/common.c:48 This seems similar to commit ea68376c8bed ("bpf: prevent decl_tag from being referenced in func_proto") but for the argument. Reported-by: syzbot+8dd0551dda6020944c5d@syzkaller.appspotmail.com Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221123035422.872531-2-sdf@google.com kernel/bpf/btf.c | 5 +++++ 1 file changed, 5 insertions(+) commit d9dcb63677fcdf0a5a8cd3c138ab174cf1e9b871 Author: Thomas Gleixner Date: Sun Nov 13 21:34:10 2022 +0100 iommu/of: Remove linux/msi.h include Nothing in this file needs anything from linux/msi.h Signed-off-by: Thomas Gleixner Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20221113202428.889624434@linutronix.de drivers/iommu/of_iommu.c | 1 - 1 file changed, 1 deletion(-) commit 616eb7bf325fbf25df2b5046536b50fe896d4ab6 Author: Thomas Gleixner Date: Sun Nov 13 21:34:08 2022 +0100 vfio/fsl-mc: Remove linux/msi.h include Nothing in this file needs anything from linux/msi.h Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Alex Williamson Link: https://lore.kernel.org/r/20221113202428.826924043@linutronix.de drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c | 1 - 1 file changed, 1 deletion(-) commit 20e2e09c0998ef0c325edeb00560a8ff67b35913 Author: Thomas Gleixner Date: Sun Nov 13 21:34:07 2022 +0100 soc: fsl: dpio: Remove linux/msi.h include Nothing in this file needs anything from linux/msi.h Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221113202428.760225831@linutronix.de drivers/soc/fsl/dpio/dpio-driver.c | 1 - 1 file changed, 1 deletion(-) commit 9d4c8175b8298a361d0ea91f435b1b4ed2ea06e3 Author: Thomas Gleixner Date: Sun Nov 13 21:34:00 2022 +0100 bus: fsl-mc: Remove linux/msi.h includes Neither dprc-driver.c nor fsl-mc-bus.c need anything from linux/msi.h. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221113202428.511591041@linutronix.de drivers/bus/fsl-mc/dprc-driver.c | 1 - drivers/bus/fsl-mc/fsl-mc-bus.c | 1 - 2 files changed, 2 deletions(-) commit 264c21867a0e1b9a820732ba7c0cf19c6784e5fe Author: Donald Hunter Date: Wed Nov 23 14:11:51 2022 +0000 docs/bpf: Document BPF_MAP_TYPE_BLOOM_FILTER Add documentation for BPF_MAP_TYPE_BLOOM_FILTER including kernel BPF helper usage, userspace usage and examples. Signed-off-by: Donald Hunter Signed-off-by: Daniel Borkmann Acked-by: Joanne Koong Link: https://lore.kernel.org/bpf/20221123141151.54556-1-donald.hunter@gmail.com Documentation/bpf/map_bloom_filter.rst | 174 +++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) commit c645eee4d35b58bffc90ee086f7a087fa942fd52 Author: Maryam Tahhan Date: Wed Nov 23 09:23:21 2022 +0000 docs/bpf: Fix sphinx warnings for devmap Sphinx version >=3.1 warns about duplicate function declarations in the DEVMAP documentation. This is because the function name is the same for kernel and user space BPF progs but the parameters and return types they take is what differs. This patch moves from using the ``c:function::`` directive to using the ``code-block:: c`` directive. The patches also fix the indentation for the text associated with the "new" code block delcarations. The missing support of c:namespace-push:: and c:namespace-pop:: directives by helper scripts for kernel documentation prevents using the ``c:function::`` directive with proper namespacing. Signed-off-by: Maryam Tahhan Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221123092321.88558-3-mtahhan@redhat.com Documentation/bpf/map_devmap.rst | 68 +++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 26 deletions(-) commit 3685b0dc0d02ad89a36893d9d6be1675dd40a5fd Author: Maryam Tahhan Date: Wed Nov 23 09:23:20 2022 +0000 docs/bpf: Fix sphinx warnings for cpumap Sphinx version >=3.1 warns about duplicate function declarations in the CPUMAP documentation. This is because the function name is the same for kernel and user space BPF progs but the parameters and return types they take is what differs. This patch moves from using the ``c:function::`` directive to using the ``code-block:: c`` directive. The patches also fix the indentation for the text associated with the "new" code block delcarations. The missing support of c:namespace-push:: and c:namespace-pop:: directives by helper scripts for kernel documentation prevents using the ``c:function::`` directive with proper namespacing. Signed-off-by: Maryam Tahhan Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221123092321.88558-2-mtahhan@redhat.com Documentation/bpf/map_cpumap.rst | 56 ++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 22 deletions(-) commit c742cb7c3ebdeb358794b9c76d93d8be7b631b9a Author: Donald Hunter Date: Mon Nov 21 12:17:34 2022 +0000 docs/bpf: Add table of BPF program types to libbpf docs Extend the libbpf documentation with a table of program types, attach points and ELF section names. Signed-off-by: Donald Hunter Signed-off-by: Andrii Nakryiko Reviewed-by: Bagas Sanjaya Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20221121121734.98329-1-donald.hunter@gmail.com Documentation/bpf/libbpf/index.rst | 3 + Documentation/bpf/libbpf/program_types.rst | 203 +++++++++++++++++++++++++++++ Documentation/bpf/programs.rst | 3 + 3 files changed, 209 insertions(+) commit beb3d47d1d3d7185bb401af628ad32ee204a9526 Author: Yonghong Song Date: Wed Nov 23 07:57:59 2022 -0800 bpf: Fix a BTF_ID_LIST bug with CONFIG_DEBUG_INFO_BTF not set With CONFIG_DEBUG_INFO_BTF not set, we hit the following compilation error, /.../kernel/bpf/verifier.c:8196:23: error: array index 6 is past the end of the array (that has type 'u32[5]' (aka 'unsigned int[5]')) [-Werror,-Warray-bounds] if (meta->func_id == special_kfunc_list[KF_bpf_cast_to_kern_ctx]) ^ ~~~~~~~~~~~~~~~~~~~~~~~ /.../kernel/bpf/verifier.c:8174:1: note: array 'special_kfunc_list' declared here BTF_ID_LIST(special_kfunc_list) ^ /.../include/linux/btf_ids.h:207:27: note: expanded from macro 'BTF_ID_LIST' #define BTF_ID_LIST(name) static u32 __maybe_unused name[5]; ^ /.../kernel/bpf/verifier.c:8443:19: error: array index 5 is past the end of the array (that has type 'u32[5]' (aka 'unsigned int[5]')) [-Werror,-Warray-bounds] btf_id == special_kfunc_list[KF_bpf_list_pop_back]; ^ ~~~~~~~~~~~~~~~~~~~~ /.../kernel/bpf/verifier.c:8174:1: note: array 'special_kfunc_list' declared here BTF_ID_LIST(special_kfunc_list) ^ /.../include/linux/btf_ids.h:207:27: note: expanded from macro 'BTF_ID_LIST' #define BTF_ID_LIST(name) static u32 __maybe_unused name[5]; ... Fix the problem by increase the size of BTF_ID_LIST to 16 to avoid compilation error and also prevent potentially unintended issue due to out-of-bound access. Reported-by: kernel test robot Reported-by: Dan Carpenter Reported-by: Nathan Chancellor Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221123155759.2669749-1-yhs@fb.com Signed-off-by: Alexei Starovoitov include/linux/btf_ids.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eda549e2e52496d0d374ce457f514a4f14172aa5 Author: Antoniu Miclaus Date: Tue Nov 15 13:00:41 2022 +0200 iio: frequency: adf4377: add support for ADF4377 The ADF4377 is a high performance, ultralow jitter, dual output integer-N phased locked loop (PLL) with integrated voltage controlled oscillator (VCO) ideally suited for data converter and mixed signal front end (MxFE) clock applications. Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/adf4377.pdf Signed-off-by: Antoniu Miclaus Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221115110041.71495-2-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron drivers/iio/frequency/Kconfig | 10 + drivers/iio/frequency/Makefile | 1 + drivers/iio/frequency/adf4377.c | 994 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1005 insertions(+) commit 1407438a7ad513a9dd5c70bc996200f97960584c Author: Antoniu Miclaus Date: Tue Nov 15 13:00:40 2022 +0200 dt-bindings: iio: frequency: add adf4377 doc Add device tree bindings for the ADF4377 driver. Signed-off-by: Antoniu Miclaus Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221115110041.71495-1-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron .../bindings/iio/frequency/adi,adf4377.yaml | 92 ++++++++++++++++++++++ MAINTAINERS | 8 ++ 2 files changed, 100 insertions(+) commit e0736b1bb71b21faeebf85efc725d01c7ecf2ebe Author: Cosmin Tanislav Date: Tue Nov 15 17:19:55 2022 +0200 dt-bindings: iio: adc: ad4130: use spi-peripheral-props.yaml Reference the "spi-peripheral-props.yaml" schema to allow using all SPI device properties. Signed-off-by: Cosmin Tanislav Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221115151955.394030-1-cosmin.tanislav@analog.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/adi,ad4130.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a0666f7f0f9470bfe64ab60324bc0a7830ce9035 Author: Cosmin Tanislav Date: Tue Nov 15 17:16:53 2022 +0200 dt-bindings: iio: temperature: ltc2983: drop $ref for -nanoamp properties Currently there are -nanoamp properties both with and without a $ref. dt-schema has been modified to handle it as a standard unit, but the change has been reverted since there were still occurrences of -nanoamp properties with a $ref. Remove this since it's the only occurrence left. Signed-off-by: Cosmin Tanislav Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221115151653.393559-1-cosmin.tanislav@analog.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 1 - 1 file changed, 1 deletion(-) commit 32abe97b48fb1532c752495dab3f8255db8f5c2a Author: Lad Prabhakar Date: Tue Nov 15 12:41:28 2022 +0000 dt-bindings: iio: adc: renesas,rzg2l-adc: Document RZ/Five SoC The ADC block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,r9a07g043-adc" 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-adc" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221115124128.1183144-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2af60f5900c6ade53477b494ffb54690eee11f5 Author: Rasmus Villemoes Date: Tue Nov 15 14:23:23 2022 +0100 iio: adc128s052: add proper .data members in adc128_of_match table Prior to commit bd5d54e4d49d ("iio: adc128s052: add ACPI _HID AANT1280"), the driver unconditionally used spi_get_device_id() to get the index into the adc128_config array. However, with that commit, OF-based boards now incorrectly treat all supported sensors as if they are an adc128s052, because all the .data members of the adc128_of_match table are implicitly 0. Our board, which has an adc122s021, thus exposes 8 channels whereas it really only has two. Fixes: bd5d54e4d49d ("iio: adc128s052: add ACPI _HID AANT1280") Signed-off-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221115132324.1078169-1-linux@rasmusvillemoes.dk Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-adc128s052.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 51bcacc6fce8db7085c8652069b68123c6c1897c Author: Olivier Moysan Date: Tue Nov 15 11:31:23 2022 +0100 iio: adc: stm32-adc: add debugfs to read raw calibration result Add debugfs to read linear ADC STM32 self calibration results. Signed-off-by: Fabrice Gasnier Signed-off-by: Olivier Moysan Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20221115103124.70074-4-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 2206732b9ad1be8c59f714f2912539bf95cf2961 Author: Olivier Moysan Date: Tue Nov 15 11:31:22 2022 +0100 iio: adc: stm32-adc: improve calibration error log Add more information in calibration error log to differentiate single-ended and differential calibration. Signed-off-by: Olivier Moysan Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20221115103124.70074-3-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9d901e356c8d3640940cb72ff7969f03e85c2e95 Author: Olivier Moysan Date: Tue Nov 15 11:31:21 2022 +0100 iio: adc: stm32-adc: smart calibration support Add smart calibration support for STM32MP1. - STM32MP15x: both linear & offset calibration are supported - STM32MP13x: Only offset calibration is supported Linear calibration: Linear calibration is SoC dependent and does not change over time so it can be done only once. Linear calibration may have already been done in u-boot. Skip calibration execution if calibration data are already available. Save calibration factors in private data and restore them from private data on next ADC start. Offset calibration: This calibration may vary over time, depending on temperature or voltage. Run offset single-ended and differential calibration on each ADC start, as it is not time consuming. This calibration do not need to be saved. So, remove calfact_s and calfact_d value and bitfields that are no longer used. Signed-off-by: Olivier Moysan Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20221115103124.70074-2-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc-core.h | 1 + drivers/iio/adc/stm32-adc.c | 108 +++++++++++++++++++-------------------- 2 files changed, 53 insertions(+), 56 deletions(-) commit f237cf1914e24ebba88670ecc36e8209c888c9a2 Author: Rasmus Villemoes Date: Tue Nov 15 10:55:17 2022 +0100 iio: addac: ad74413r: add support for reset-gpio We have a board where the reset pin of the ad74412 is connected to a gpio, but also pulled low (i.e., asserted) by default. Hence to get the chip out of reset, the driver needs to know about that gpio and deassert the reset signal before attempting to communicate with the chip. When a reset-gpio is given in device tree, use that instead of the software reset. According to the data sheet, the two methods are functionally equivalent. Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20221115095517.1008632-4-linux@rasmusvillemoes.dk Signed-off-by: Jonathan Cameron drivers/iio/addac/ad74413r.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6aaf7045697aa93589bea1b33e751814b0776991 Author: Rasmus Villemoes Date: Tue Nov 15 10:55:16 2022 +0100 dt-bindings: iio: ad74413r: add optional reset-gpios The ad74412 and ad74413 devices have an active-low reset pin. Add a binding allowing one to specify a gpio tied to that. Signed-off-by: Rasmus Villemoes Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221115095517.1008632-3-linux@rasmusvillemoes.dk Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 7b2366008125b0849dcbd18afbcb33cbc30c3477 Author: Rasmus Villemoes Date: Tue Nov 15 10:55:15 2022 +0100 iio: addac: ad74413r: add spi_device_id table Silence the run-time warning SPI driver ad74413r has no spi_device_id for adi,ad74412r Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20221115095517.1008632-2-linux@rasmusvillemoes.dk Signed-off-by: Jonathan Cameron drivers/iio/addac/ad74413r.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 58ae95f9671ddf98082e021ee42643d126912e71 Author: Luca Weiss Date: Mon Oct 31 19:24:54 2022 +0100 dt-bindings: iio/adc: qcom,spmi-iadc: use double compatibles As in other bindings, let's use specific compatibles together with the fallback compatible. Adjust the bindings for it. Signed-off-by: Luca Weiss Acked-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221031182456.952648-1-luca@z3ntu.xyz Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1842fff0f7b603e587e0fe45804d9ebfba329e38 Author: Lorenzo Bianconi Date: Wed Nov 16 14:40:04 2022 +0100 dt-bindings: iio: imu: st_lsm6dsx: add lsm6dso16is Add device bindings for lsm6dso16is IMU sensor. Signed-off-by: Lorenzo Bianconi Acked-by: Rob Herring Link: https://lore.kernel.org/r/55b15b3e8453a12edcf8195ef9c9243a76f87096.1668605631.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 1 + 1 file changed, 1 insertion(+) commit f35e1ee9cb5d617efeb0f3695ff65169eb2b9cdd Author: Lorenzo Bianconi Date: Wed Nov 16 14:40:03 2022 +0100 iio: imu: st_lsm6dsx: add support to LSM6DSO16IS Add support to STM LSM6DSO16IS (accelerometer and gyroscope) Mems sensor. Datasheet: https://www.st.com/resource/en/datasheet/lsm6dso16is.pdf Tested-by: Mario Tesi Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/df6a9d4653cd69f7204190f8b6a9b618fd48bd23.1668605631.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/Kconfig | 4 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 128 ++++++++++++++++++++++++++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 ++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 ++ 5 files changed, 141 insertions(+), 3 deletions(-) commit 2094dbbd82f9ef180385e6466f03c40a98a7dfde Merge: e80bd08fd75a 1fa082734076 Author: Jakub Kicinski Date: Wed Nov 23 12:50:11 2022 -0800 Merge branch 'net-complete-conversion-to-i2c_probe_new' Jakub Kicinski says: ==================== net: Complete conversion to i2c_probe_new Reposting for Uwe the networking slice of his mega-series: https://lore.kernel.org/all/20221118224540.619276-1-uwe@kleine-koenig.org/ so that our build bot can confirm the obvious. fix mlx5 -> mlxsw while at it. ==================== Link: https://lore.kernel.org/r/20221123045507.2091409-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 1fa082734076fe2c34d3e4a64334f79bee4a5bf9 Author: Uwe Kleine-König Date: Tue Nov 22 20:55:07 2022 -0800 nfc: st21nfca: 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 Signed-off-by: Jakub Kicinski drivers/nfc/st21nfca/i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 75cc560ff661ee05ab261c92dc158471e48efdd3 Author: Uwe Kleine-König Date: Tue Nov 22 20:55:06 2022 -0800 nfc: st-nci: 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: Jakub Kicinski drivers/nfc/st-nci/i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0fc00c085d71b2777b91b6db22afd35ddab4c0c7 Author: Uwe Kleine-König Date: Tue Nov 22 20:55:05 2022 -0800 nfc: s3fwrn5: 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: Jakub Kicinski drivers/nfc/s3fwrn5/i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2338adb2e0914904f3a23ffdbb8c5d13ff38638e Author: Uwe Kleine-König Date: Tue Nov 22 20:55:04 2022 -0800 nfc: pn544: 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: Jakub Kicinski drivers/nfc/pn544/i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d72c9828a3cbf3110b0c5ce26a81fabc68312254 Author: Uwe Kleine-König Date: Tue Nov 22 20:55:03 2022 -0800 nfc: pn533: 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: Jakub Kicinski drivers/nfc/pn533/i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bf1f6f2975288a373c4879c4e23e7fc2dab2634f Author: Uwe Kleine-König Date: Tue Nov 22 20:55:02 2022 -0800 NFC: nxp-nci: 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: Jakub Kicinski drivers/nfc/nxp-nci/i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a9f656c88a903ef704b70efe12c2e8feb08a85eb Author: Uwe Kleine-König Date: Tue Nov 22 20:55:01 2022 -0800 nfc: mrvl: 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: Jakub Kicinski drivers/nfc/nfcmrvl/i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f72eed59eab42414f3844f4a8e3ce0c4e6280733 Author: Uwe Kleine-König Date: Tue Nov 22 20:55:00 2022 -0800 nfc: microread: 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: Jakub Kicinski drivers/nfc/microread/i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cb405c2a40400c7329b08bef386b79dd3ec4e78f Author: Uwe Kleine-König Date: Tue Nov 22 20:54:59 2022 -0800 net/mlxsw: 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: Ido Schimmel Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dfd5e53dd72113f37663f59a6337fe9a0dfbf0f6 Author: Uwe Kleine-König Date: Tue Nov 22 20:54:58 2022 -0800 net: dsa: xrs700x: 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: Jakub Kicinski drivers/net/dsa/xrs700x/xrs700x_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f925e2154de9ddfa57091bd8b6ba1b2509c55a85 Author: Uwe Kleine-König Date: Tue Nov 22 20:54:57 2022 -0800 net: dsa: microchip: ksz9477: 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: Jakub Kicinski drivers/net/dsa/microchip/ksz9477_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c479babce5b1f7b6e6ec172bdca075534343be55 Author: Uwe Kleine-König Date: Tue Nov 22 20:54:56 2022 -0800 net: dsa: lan9303: 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: Jakub Kicinski drivers/net/dsa/lan9303_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 48ea75598db2b38e4a4b5738d65f226be717bd59 Author: Cosmin Tanislav Date: Thu Nov 17 10:09:16 2022 +0200 iio: addac: add AD74115 driver The AD74115H is a single-channel, software-configurable, input and output device for industrial control applications. The AD74115H provides a wide range of use cases, integrated on a single chip. These use cases include analog output, analog input, digital output, digital input, resistance temperature detector (RTD), and thermocouple measurement capability. The AD74115H also has an integrated HART modem. A serial peripheral interface (SPI) is used to handle all communications to the device, including communications with the HART modem. The digital input and digital outputs can be accessed via the SPI or the general-purpose input and output (GPIO) pins to support higher speed data rates. The device features a 16-bit, sigma-delta analog-to-digital converter (ADC) and a 14-bit digital-to-analog converter (DAC). The AD74115H contains a high accuracy 2.5 V on-chip reference that can be used as the DAC and ADC reference. Signed-off-by: Cosmin Tanislav Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20221117080916.411766-3-cosmin.tanislav@analog.com Signed-off-by: Jonathan Cameron MAINTAINERS | 1 + drivers/iio/addac/Kconfig | 14 + drivers/iio/addac/Makefile | 1 + drivers/iio/addac/ad74115.c | 1947 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1963 insertions(+) commit 0e69ba0dd56700b173100984f8a89fe4605591a5 Author: Cosmin Tanislav Date: Thu Nov 17 10:09:15 2022 +0200 dt-bindings: iio: addac: add AD74115 The AD74115H is a single-channel, software-configurable, input and output device for industrial control applications. The AD74115H provides a wide range of use cases, integrated on a single chip. These use cases include analog output, analog input, digital output, digital input, resistance temperature detector (RTD), and thermocouple measurement capability. The AD74115H also has an integrated HART modem. A serial peripheral interface (SPI) is used to handle all communications to the device, including communications with the HART modem. The digital input and digital outputs can be accessed via the SPI or the general-purpose input and output (GPIO) pins to support higher speed data rates. The device features a 16-bit, sigma-delta analog-to-digital converter (ADC) and a 14-bit digital-to-analog converter (DAC). The AD74115H contains a high accuracy 2.5 V on-chip reference that can be used as the DAC and ADC reference. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221117080916.411766-2-cosmin.tanislav@analog.com Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/addac/adi,ad74115.yaml | 373 +++++++++++++++++++++ MAINTAINERS | 7 + 2 files changed, 380 insertions(+) commit 980389d06d08442fad0139874bff455c76125e47 Author: Rasmus Villemoes Date: Fri Nov 18 13:32:08 2022 +0100 iio: addac: ad74413r: fix integer promotion bug in ad74413_get_input_current_offset() The constant AD74413R_ADC_RESULT_MAX is defined via GENMASK, so its type is "unsigned long". Hence in the expression voltage_offset * AD74413R_ADC_RESULT_MAX, voltage_offset is first promoted to unsigned long, and since it may be negative, that results in a garbage value. For example, when range is AD74413R_ADC_RANGE_5V_BI_DIR, voltage_offset is -2500 and voltage_range is 5000, so the RHS of this assignment is, depending on sizeof(long), either 826225UL or 3689348814709142UL, which after truncation to int then results in either 826225 or 1972216214 being the output from in_currentX_offset. Casting to int avoids that promotion and results in the correct -32767 output. Signed-off-by: Rasmus Villemoes Fixes: fea251b6a5db (iio: addac: add AD74413R driver) Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221118123209.1658420-1-linux@rasmusvillemoes.dk Cc: Signed-off-by: Jonathan Cameron drivers/iio/addac/ad74413r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8aa2e715ca65757e0eb625862491f95e8baf0328 Author: Minghao Chi Date: Tue Nov 22 09:35:33 2022 +0800 iio: 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: Nuno Sá Link: https://lore.kernel.org/r/202211220935338446115@zte.com.cn Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7606_par.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8ac88eece8009428e2577c345080a458e4507e2f Author: Stanislav Fomichev Date: Wed Nov 23 12:08:29 2022 -0800 selftests/bpf: Mount debugfs in setns_by_fd Jiri reports broken test_progs after recent commit 68f8e3d4b916 ("selftests/bpf: Make sure zero-len skbs aren't redirectable"). Apparently we don't remount debugfs when we switch back networking namespace. Let's explicitly mount /sys/kernel/debug. 0: https://lore.kernel.org/bpf/63b85917-a2ea-8e35-620c-808560910819@meta.com/T/#ma66ca9c92e99eee0a25e40f422489b26ee0171c1 Fixes: a30338840fa5 ("selftests/bpf: Move open_netns() and close_netns() into network_helpers.c") Reported-by: Jiri Olsa Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20221123200829.2226254-1-sdf@google.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/network_helpers.c | 4 ++++ tools/testing/selftests/bpf/prog_tests/empty_skb.c | 2 +- tools/testing/selftests/bpf/prog_tests/xdp_do_redirect.c | 2 +- tools/testing/selftests/bpf/prog_tests/xdp_synproxy.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) commit c613afc1f257e1e3229b8dcade43a104a26541c8 Author: Ramona Bolboaca Date: Tue Nov 22 10:27:57 2022 +0200 iio: imu: adis: Remove adis_initial_startup function Remove adis_initial_startup function since it is not used anymore. Signed-off-by: Ramona Bolboaca Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221122082757.449452-10-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron include/linux/iio/imu/adis.h | 12 ------------ 1 file changed, 12 deletions(-) commit 60105b59cc12813267b922fa5969e38f9e8f9b50 Author: Ramona Bolboaca Date: Tue Nov 22 10:27:56 2022 +0200 staging: iio: accel: adis16240: Call '__adis_initial_startup()' Call '__adis_initial_startup()' instead of its locked variant in 'adis16240_probe()'. The locks are not needed at this point. Signed-off-by: Ramona Bolboaca Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221122082757.449452-9-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16240.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3b0ab42a875d3c4b05311bd1ebcc0322a55c30c Author: Ramona Bolboaca Date: Tue Nov 22 10:27:55 2022 +0200 staging: iio: accel: adis16203: Call '__adis_initial_startup()' Call '__adis_initial_startup()' instead of its locked variant in 'adis16203_probe()'. The locks are not needed at this point. Signed-off-by: Ramona Bolboaca Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221122082757.449452-8-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16203.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40fd61b0698c1ecf73f8da61b461937b7d91ee26 Author: Ramona Bolboaca Date: Tue Nov 22 10:27:54 2022 +0200 iio: imu: adis16400: Call '__adis_initial_startup()' in probe Call '__adis_initial_startup()' instead of its locked variant in 'adis16400_probe()'. The locks are not needed at this point. Signed-off-by: Ramona Bolboaca Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221122082757.449452-7-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron drivers/iio/imu/adis16400.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2647f0e4d397fa5f80c78370d514b05a2110f987 Author: Ramona Bolboaca Date: Tue Nov 22 10:27:53 2022 +0200 iio: gyro: adis16260: Call '__adis_initial_startup()' in probe Call '__adis_initial_startup()' instead of its locked variant in 'adis16260_probe()'. The locks are not needed at this point. Signed-off-by: Ramona Bolboaca Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221122082757.449452-6-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron drivers/iio/gyro/adis16260.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5de7d4c026f4c4310e6cb1e06e1ae0bd57cd838 Author: Ramona Bolboaca Date: Tue Nov 22 10:27:52 2022 +0200 iio: gyro: adis16136: Call '__adis_initial_startup()' in probe Call '__adis_initial_startup()' instead of its locked variant in 'adis16136_probe()'. The locks are not needed at this point. Signed-off-by: Ramona Bolboaca Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221122082757.449452-5-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron drivers/iio/gyro/adis16136.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09f8360f3a8843733d9e54960405c902982062f4 Author: Ramona Bolboaca Date: Tue Nov 22 10:27:51 2022 +0200 iio: accel: adis16209: Call '__adis_initial_startup()' in probe Call '__adis_initial_startup()' instead of its locked variant in 'adis16209_probe()'. The locks are not needed at this point. Signed-off-by: Ramona Bolboaca Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221122082757.449452-4-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron drivers/iio/accel/adis16209.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 594ff4c49e9dd7aba84d82052643c1e4b09b8788 Author: Ramona Bolboaca Date: Tue Nov 22 10:27:50 2022 +0200 iio: accel: adis16201: Call '__adis_initial_startup()' in probe Call '__adis_initial_startup()' instead of its locked variant in 'adis16201_probe()'. The locks are not needed at this point. Signed-off-by: Ramona Bolboaca Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221122082757.449452-3-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron drivers/iio/accel/adis16201.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99c05e4283a19a02a256f14100ca4ec3b2da3f62 Author: Ramona Bolboaca Date: Tue Nov 22 10:27:49 2022 +0200 iio: adis: add '__adis_enable_irq()' implementation Add '__adis_enable_irq()' implementation which is the unlocked version of 'adis_enable_irq()'. Call '__adis_enable_irq()' instead of 'adis_enable_irq()' from '__adis_intial_startup()' to keep the expected unlocked functionality. This fix is needed to remove a deadlock for all devices which are using 'adis_initial_startup()'. The deadlock occurs because the same mutex is acquired twice, without releasing it. The mutex is acquired once inside 'adis_initial_startup()', before calling '__adis_initial_startup()', and once inside 'adis_enable_irq()', which is called by '__adis_initial_startup()'. The deadlock is removed by calling '__adis_enable_irq()', instead of 'adis_enable_irq()' from within '__adis_initial_startup()'. Fixes: b600bd7eb3335 ("iio: adis: do not disabe IRQs in 'adis_init()'") Signed-off-by: Ramona Bolboaca Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221122082757.449452-2-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron drivers/iio/imu/adis.c | 28 ++++++++++------------------ include/linux/iio/imu/adis.h | 13 ++++++++++++- 2 files changed, 22 insertions(+), 19 deletions(-) commit 99b43a15915543484d7538cb32f49901e802628a Author: Ibrahim Tilki Date: Tue Nov 22 14:47:18 2022 +0300 iio: adc: max11410: fix incomplete vref buffer mask VREFP bit was missing from channel configuration mask and VREFN bit was included twice instead which fails to enable positive reference buffer when requested by a channel. Channels that don't enable vrefp buffer were not affected. Fixes: a44ef7c46097 ("iio: adc: add max11410 adc driver") Reported-by: kernel test robot Reported-by: Julia Lawall Signed-off-by: Ibrahim Tilki Link: https://lore.kernel.org/r/20221122114718.17557-1-Ibrahim.Tilki@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/max11410.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1140f96cd4af9bcf0065b0295c4486e1dba8426e Author: Edmund Berenson Date: Tue Nov 22 17:14:37 2022 +0100 dt-bindings: iio: adc: ad7923: adjust documentation - The ad7927 is fully compatible with ad7928 driver, add documentation for device. - ad7923 and ad7924 are treated the same in the driver, show the relationship in the documentation. Suggested-by: Lukasz Zemla Signed-off-by: Edmund Berenson Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221122161437.18937-1-edmund.berenson@emlix.com Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/adi,ad7923.yaml | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 9ee95ae4cffd04e0773f16118b343104bab80634 Author: Rajat Khandelwal Date: Tue Nov 22 23:23:00 2022 +0530 iio: temperature: Add driver support for Maxim MAX30208 Maxim MAX30208 is a digital temperature sensor with 0.1°C accuracy. Add support for max30208 driver in iio subsystem. Datasheet: https://datasheets.maximintegrated.com/en/ds/MAX30208.pdf Signed-off-by: Rajat Khandelwal Link: https://lore.kernel.org/r/20221122175300.800956-1-rajat.khandelwal@linux.intel.com Signed-off-by: Jonathan Cameron MAINTAINERS | 6 + drivers/iio/temperature/Kconfig | 10 ++ drivers/iio/temperature/Makefile | 1 + drivers/iio/temperature/max30208.c | 252 +++++++++++++++++++++++++++++++++++++ 4 files changed, 269 insertions(+) commit 9fe1614f96af91ffd876da529cf9d667992e73a6 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:02 2022 +0100 staging: iio: ade7854: 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-569-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7854-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 67ab4155b2391b7901c83c69a6dec97a4e0f709d Author: Uwe Kleine-König Date: Fri Nov 18 23:45:01 2022 +0100 staging: iio: ad5933: 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-568-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/staging/iio/impedance-analyzer/ad5933.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8282ef72a6e5e075f7f2f2f905b2a1adcc0bdcc9 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:00 2022 +0100 staging: iio: adt7316: 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-567-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/staging/iio/addac/adt7316-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6a9113195fff8e48d8898cdab82c96bb77780228 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:44 2022 +0100 iio: temperature: tsys02d: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-191-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/temperature/tsys02d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d7c9422850aad0e57316f74c2f9cdfc18be39459 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:43 2022 +0100 iio: temperature: tsys01: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-190-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/temperature/tsys01.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f1e7d53ddfc309149521a2812c3ffcd54eb67b04 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:42 2022 +0100 iio: temperature: tmp007: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-189-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/temperature/tmp007.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 89824f4cb65e7a7174cb24e4c0835e4c37f74a21 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:41 2022 +0100 iio: temperature: tmp006: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-188-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/temperature/tmp006.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 40fbb59b9c132e401b7487ab2792e6dcd3f14809 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:40 2022 +0100 iio: temperature: mlx90632: 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: Crt Mori Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-187-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/temperature/mlx90632.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 160c7140bb25a1921c4f3845bb15423721bcc0fb Author: Uwe Kleine-König Date: Fri Nov 18 23:38:39 2022 +0100 iio: temperature: mlx90614: 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: Crt Mori Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-186-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/temperature/mlx90614.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7660d32e6f9608b5bea7d066c74d63fc7666c510 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:38 2022 +0100 iio: proximity: sx9500: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-185-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9500.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 038b0fac0abe2f5d9beee2511434f231a58f41fd Author: Uwe Kleine-König Date: Fri Nov 18 23:38:37 2022 +0100 iio: proximity: srf08: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-184-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/srf08.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 576eb2b091084425eea6edd36d4407d139387d6d Author: Uwe Kleine-König Date: Fri Nov 18 23:38:36 2022 +0100 iio: proximity: rfd77402: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-183-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/rfd77402.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 94c80ea7677c9d1886673a4f6764e19c5309b11c Author: Uwe Kleine-König Date: Fri Nov 18 23:38:35 2022 +0100 iio: proximity: pulsedlight-lidar-lite-v2: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-182-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5c5c482e02bcd09bf113853b7520ad121dba081b Author: Uwe Kleine-König Date: Fri Nov 18 23:38:34 2022 +0100 iio: proximity: mb1232: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-181-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/mb1232.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9d6f774dd4ff150ce7a5bb2bf64918b3b72cda11 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:33 2022 +0100 iio: proximity: isl29501: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-180-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/isl29501.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1bee48f48a69013cdd5ed5fdbff1e0410a18a381 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:32 2022 +0100 iio: pressure: zpa2326_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-179-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/zpa2326_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit aa9b3321735d42d3a2a2e58ce25be5586396c8a8 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:31 2022 +0100 iio: pressure: t5403: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-178-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/t5403.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a52833a526b5e38be1aaf3e8f2e74a21bc679cb3 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:30 2022 +0100 iio: pressure: st_pressure_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-177-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/st_pressure_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f80ccc71c3f38d55662a6cfdec5a9e0907f6dfb6 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:29 2022 +0100 iio: pressure: ms5637: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-176-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/ms5637.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit eba7dcb65337dc2b081508317e10d0f1187121a9 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:28 2022 +0100 iio: pressure: ms5611_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-175-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/ms5611_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0586ce78a70c2792c4dfd415d1a427ea447bebd4 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:27 2022 +0100 iio: pressure: mpl3115: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-174-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/mpl3115.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8afce858762fc767dbd52d313adf058098332aaf Author: Uwe Kleine-König Date: Fri Nov 18 23:38:26 2022 +0100 iio: pressure: mpl115_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-173-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/mpl115_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7a5da8b28618426a81f53f496de3a83d47df2634 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:25 2022 +0100 iio: pressure: icp10100: 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: Andy Shevchenko Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20221118224540.619276-172-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/icp10100.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 240c69e09d3f77673653f56867aba2c69a66264d Author: Uwe Kleine-König Date: Fri Nov 18 23:38:24 2022 +0100 iio: pressure: hp206c: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-171-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/hp206c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3d5f5d599f61a2ab99768471cf56c61b1751f98f Author: Uwe Kleine-König Date: Fri Nov 18 23:38:23 2022 +0100 iio: pressure: hp03: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-170-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/hp03.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 92a54a29cf39f8f18632f9af43aa5baf4ff805bb Author: Uwe Kleine-König Date: Fri Nov 18 23:38:22 2022 +0100 iio: pressure: dps310: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-169-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/dps310.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 046ae105f266aae218f76dc6321eebebeead6b94 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:21 2022 +0100 iio: pressure: dlhl60d: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-168-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/dlhl60d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 576306ab4ceb16a032b5f67aeb635f385390193c Author: Uwe Kleine-König Date: Fri Nov 18 23:38:19 2022 +0100 iio: pressure: abp060mg: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-166-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/pressure/abp060mg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7d8b3e100abeeff40f54853ce82bc1d900cb2bf4 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:18 2022 +0100 iio: potentiostat: lmp91000: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-165-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/potentiostat/lmp91000.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4c1142cc436842eefffcd800ca41f8327bf61f88 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:17 2022 +0100 iio: potentiometer: tpl0102: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-164-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/potentiometer/tpl0102.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e005024112dd3800e78d056facf958fc6451ba10 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:16 2022 +0100 iio: potentiometer: max5432: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-163-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/potentiometer/max5432.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 705f1ce22b967b8fd7fc3cb0de31830ec9eda3c0 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:15 2022 +0100 iio: potentiometer: ds1803: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-162-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/potentiometer/ds1803.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b11df8374c0d0581474e0b8f74a7ba8f4a10be7d Author: Uwe Kleine-König Date: Fri Nov 18 23:38:14 2022 +0100 iio: potentiometer: ad5272: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-161-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/potentiometer/ad5272.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fcd969675290cd3cbe911b350502332be58f100b Author: Uwe Kleine-König Date: Fri Nov 18 23:38:13 2022 +0100 iio: magnetometer: yamaha-yas530: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-160-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/yamaha-yas530.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e7a45a76351b6b5163af4a581ab46fdad137d62a Author: Uwe Kleine-König Date: Fri Nov 18 23:38:12 2022 +0100 iio: magnetometer: mmc35240: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-159-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/mmc35240.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cee51403c696aac364fd991bc3a95a90722678b1 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:11 2022 +0100 iio: magnetometer: mag3110: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-158-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/mag3110.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bcf73c37f7c7e7c1d0cac6ebea36cfd7bf626727 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:10 2022 +0100 iio: magnetometer: hmc5843: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-157-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/hmc5843_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f23215c1e5a1255ed2097afe3e564dec96f73911 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:09 2022 +0100 iio: magnetometer: bmc150_magn_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-156-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/bmc150_magn_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f64eecea19ba974f03e3614ebcc3749d9a24da77 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:08 2022 +0100 iio: magnetometer: ak8975: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-155-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/ak8975.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 149a5043b6f9b100471a1fdbdc22a395602fadd1 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:07 2022 +0100 iio: magnetometer: ak8974: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-154-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/ak8974.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6811c7a52f025ab50f53b3107e6071132a8fe1f5 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:06 2022 +0100 iio: light: zopt2201: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-153-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/zopt2201.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f90b8694f355566c2ff70564942d4932d76e28e0 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:05 2022 +0100 iio: light: veml6070: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-152-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/veml6070.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e465524d64d11fbd25a9eb65ce4e77b965979291 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:04 2022 +0100 iio: light: veml6030: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-151-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/veml6030.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9da43dcc54a19fe40e3aa7dc03fbca3f8c0395ff Author: Uwe Kleine-König Date: Fri Nov 18 23:38:03 2022 +0100 iio: light: vcnl4035: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-150-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/vcnl4035.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e61295e0d7cf6de3d7cc25e7f387ffe021f0b0a1 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:02 2022 +0100 iio: light: vcnl4000: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-149-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/vcnl4000.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3ed2b14de4d36a9335e93798bf966c521df42a95 Author: Uwe Kleine-König Date: Fri Nov 18 23:38:01 2022 +0100 iio: light: us5182d: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-148-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/us5182d.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 081f6b9dc055f9ccb19a86346b80df691972120b Author: Uwe Kleine-König Date: Fri Nov 18 23:38:00 2022 +0100 iio: light: tsl4531: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-147-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/tsl4531.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e723b95135b1510873c832eaf8361e6b8d76bfb8 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:59 2022 +0100 iio: light: tsl2772: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-146-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/tsl2772.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dcc484a21108441f7970c4813b1223154dd23ea6 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:58 2022 +0100 iio: light: tsl2583: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-145-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/tsl2583.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 74cd01b3f9041ef3e44cc043b8bb10f79ec52c43 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:57 2022 +0100 iio: light: tsl2563: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-144-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/tsl2563.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e498cc544eae9b6264c9a535f8784aafe5788965 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:56 2022 +0100 iio: light: tcs3472: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-143-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/tcs3472.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b30cfdeb9f7fe03103472c4c79e65e382935082a Author: Uwe Kleine-König Date: Fri Nov 18 23:37:55 2022 +0100 iio: light: tcs3414: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-142-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/tcs3414.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9046d80dce04c65c92ea5550f220a2de236e3ff0 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:54 2022 +0100 iio: light: stk3310: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-141-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/stk3310.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c3ff326a9d3c809b493775bd65c07dccb73258cf Author: Uwe Kleine-König Date: Fri Nov 18 23:37:53 2022 +0100 iio: light: st_uvis25_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-140-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/st_uvis25_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fb006652dc597b2807bab56d25fe3b3404f87e53 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:52 2022 +0100 iio: light: si1145: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-139-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/si1145.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 122b0c0ba505a2faebb883bbfc178449d47c4fba Author: Uwe Kleine-König Date: Fri Nov 18 23:37:51 2022 +0100 iio: light: si1133: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-138-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/si1133.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 314ba3b4208b8fdc66ca6a94dac778ab673444e2 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:50 2022 +0100 iio: light: rpr0521: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-137-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/rpr0521.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e16302076d8a42b760878fe603593e2c59106948 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:49 2022 +0100 iio: light: pa12203001: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-136-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/pa12203001.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 06d10073283e5b301bd850a9ded6f592fb74a803 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:48 2022 +0100 iio: light: opt3001: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-135-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/opt3001.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c49135d99f5285a3e781a50ee7111f68150d5cd2 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:47 2022 +0100 iio: light: noa1305: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-134-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/noa1305.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0978ef36b24cb10937417e94d49d5a3f1092e3d4 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:45 2022 +0100 iio: light: max44000: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-132-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/max44000.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f0a6f7674ef29e01e8db2986f534476f60aac3cf Author: Uwe Kleine-König Date: Fri Nov 18 23:37:44 2022 +0100 iio: light: lv0104cs: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-131-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/lv0104cs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 958f5a0de0f67289e6bc0fa7850056b2af0c14f2 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:43 2022 +0100 iio: light: ltr501: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-130-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/ltr501.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dd97aab4f02c72d053335424752ee648a572ff81 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:42 2022 +0100 iio: light: jsa1212: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-129-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/jsa1212.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3059126a449c8c62c6b766da7744f853cce6ad36 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:41 2022 +0100 iio: light: isl29125: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-128-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/isl29125.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2086bafffdf7200238ba887a4ac9bdba0c4503e4 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:40 2022 +0100 iio: light: isl29028: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-127-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/isl29028.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ee6e0241f854b23f2177b05a6cdd538bcfe8d9cb Author: Uwe Kleine-König Date: Fri Nov 18 23:37:39 2022 +0100 iio: light: isl29018: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-126-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/isl29018.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a969195001bcf0d8baa5363fc8a1b4d3fc5aff0f Author: Uwe Kleine-König Date: Fri Nov 18 23:37:38 2022 +0100 iio: light: gp2ap020a00f: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-125-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/gp2ap020a00f.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b3f8e22e737e7991a3754675c7418215cdb461b9 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:37 2022 +0100 iio: light: gp2ap002: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-124-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/gp2ap002.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 31ceb2f5b4fbd7dd46d7d679b990e9195f1b3db6 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:36 2022 +0100 iio: light: cm36651: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-123-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/cm36651.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ebbcdb1a9ddec05b37347d3fbf537e1741876901 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:35 2022 +0100 iio: light: cm3323: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-122-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/cm3323.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f8232aad7609a946d4bbb76b747cb9d73b8180f3 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:34 2022 +0100 iio: light: cm3232: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-121-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/cm3232.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ed5c6b1ce4e1d412f9a97973348c7b8f3e12025a Author: Uwe Kleine-König Date: Fri Nov 18 23:37:33 2022 +0100 iio: light: bh1780: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-120-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/bh1780.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 058d6333ea4fe069cce36adb12d6a6341ddcb540 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:32 2022 +0100 iio: light: bh1750: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-119-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/bh1750.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 783964ae9752541356e40f47b677069151543c80 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:31 2022 +0100 iio: light: apds9960: 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: Matt Ranostay Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-118-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/apds9960.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit debe8c7568242ae7e49803c6bffc56362e43bfd0 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:30 2022 +0100 iio: light: apds9300: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-117-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/apds9300.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a76c90301f86107240eebb404d9881f16344f779 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:29 2022 +0100 iio: light: al3320a: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-116-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/al3320a.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ad428de325d27964f1c471ae496232df89b22885 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:28 2022 +0100 iio: light: al3010: 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: David Heidelberg Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-115-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/al3010.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fd63b0a46acf4b00ff69e6c60ecdd3c78a68fc71 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:27 2022 +0100 iio: light: adux1020: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-114-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/adux1020.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 39c7d963d54a4dee2c6d95a4c5461600b26ca295 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:26 2022 +0100 iio: light: adjd_s311: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-113-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/light/adjd_s311.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b7dbc0aecb2f4ca38475f0ef9d1b6ab6137be599 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:25 2022 +0100 iio: imu: st_lsm6dsx: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-112-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4bf718bc3b7f07f82895d4e56a2af93b9a89f43a Author: Uwe Kleine-König Date: Fri Nov 18 23:37:24 2022 +0100 iio: imu: kmx61: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-111-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/imu/kmx61.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4f218ae01c5c365f78f97e5d5b2c8cb15b503fe3 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:23 2022 +0100 iio: imu: inv_mpu6050: 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: Jean-Baptiste Maneyrol Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-110-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4fee985aaf3afaa4ce908342a854439fd8480196 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:22 2022 +0100 iio: imu: fxos8700_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-109-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/imu/fxos8700_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 97202c55041806ba3fcddd6ca1b467154b5812cd Author: Uwe Kleine-König Date: Fri Nov 18 23:37:21 2022 +0100 iio: imu: bmi160/bmi160_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-108-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/imu/bmi160/bmi160_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e6b610550e2c17b9eb83b10109462fc88f9a6367 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:20 2022 +0100 iio: humidity: si7020: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-107-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/humidity/si7020.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e18594f6d87f8f7f2623263eb230139382e1a080 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:19 2022 +0100 iio: humidity: si7005: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-106-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/humidity/si7005.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1a144b6320f32feec3e54dbbda8b4c58b69f86c7 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:18 2022 +0100 iio: humidity: htu21: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-105-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/humidity/htu21.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7b64a83ce6f94bbb91d91a66555f17bf3e9bc085 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:17 2022 +0100 iio: humidity: hts221_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-104-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/humidity/hts221_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0a78deeb639a464c9160f6bba912c97567f18b17 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:16 2022 +0100 iio: humidity: hdc2010: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-103-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/humidity/hdc2010.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c5f1c4fdbfa2ac6ca247bf5f32fb4c35ba0b1ec5 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:15 2022 +0100 iio: humidity: hdc100x: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-102-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/humidity/hdc100x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1b1a60e70b0cd7ec46df424f6e7d342585c446b3 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:14 2022 +0100 iio: humidity: am2315: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-101-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/humidity/am2315.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 15818f0890133372fb7eb875841dbcdb8c8ed592 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:13 2022 +0100 iio: health: max30102: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-100-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/health/max30102.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3ef7e6e019c66beb6e4c8749a70d09d26326be8d Author: Uwe Kleine-König Date: Fri Nov 18 23:37:12 2022 +0100 iio: health: max30100: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-99-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/health/max30100.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d4764a4045b14a938594a082662b780c2c8eec78 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:11 2022 +0100 iio: health: afe4404: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-98-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/health/afe4404.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1522b453c153cd93fe295a6dbd589f0f62fb168b Author: Uwe Kleine-König Date: Fri Nov 18 23:37:10 2022 +0100 iio: gyro: st_gyro_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-97-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/gyro/st_gyro_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b97db5284e9ae169de79f78c3f09514d661407a7 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:09 2022 +0100 iio: gyro: mpu3050-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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-96-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/gyro/mpu3050-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8312841060b8bc4b463dcf6a2cb8cc2452c6ac8f Author: Uwe Kleine-König Date: Fri Nov 18 23:37:08 2022 +0100 iio: gyro: itg3200_core: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-95-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/gyro/itg3200_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 840ef016c202fc196c91f020750fab08c9a0779f Author: Uwe Kleine-König Date: Fri Nov 18 23:37:07 2022 +0100 iio: gyro: bmg160_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-94-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/gyro/bmg160_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3de8dd69fad2c2ee7ca623d78fb2806d7b8b5a80 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:06 2022 +0100 iio: dac: ti-dac5571: 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: Andy Shevchenko Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-93-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/dac/ti-dac5571.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 818fe4546521f5e836ab02eeb6533bfd6aee6829 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:05 2022 +0100 iio: dac: mcp4725: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-92-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/dac/mcp4725.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 62b001dad803e40274db2c712dd4dc0d3a4a37d3 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:04 2022 +0100 iio: dac: max5821: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-91-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/dac/max5821.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 090515edf46dc1f2ff7dbc78a60ba7692ff8420f Author: Uwe Kleine-König Date: Fri Nov 18 23:37:03 2022 +0100 iio: dac: max517: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-90-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/dac/max517.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 44d7a03c98f466c1567a8cad84908ce6a9d1f2c3 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:02 2022 +0100 iio: dac: m62332: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-89-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/dac/m62332.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 53f46605c3656c181e49df0d5fdba014cffa498e Author: Uwe Kleine-König Date: Fri Nov 18 23:37:01 2022 +0100 iio: dac: ds4424: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-88-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/dac/ds4424.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 92cd05a0968d60b3d76dc8d3a5880b25b1af96b9 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:00 2022 +0100 iio: dac: ad5696-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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-87-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5696-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a17c748115cb1f95675b322e955763cd9bb628ad Author: Uwe Kleine-König Date: Fri Nov 18 23:36:59 2022 +0100 iio: dac: ad5593r: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-86-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5593r.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 94e5ddbaac1ea9b5bda64af53d8a57b19be890ae Author: Uwe Kleine-König Date: Fri Nov 18 23:36:58 2022 +0100 iio: dac: ad5446: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-85-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5446.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4b2b4370a8459982d78d5716361a7a51089fecbb Author: Uwe Kleine-König Date: Fri Nov 18 23:36:57 2022 +0100 iio: dac: ad5380: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-84-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5380.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 16fb97c4aacf5db311f4fb54745f852d1183e662 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:56 2022 +0100 iio: dac: ad5064: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-83-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5064.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d8535ee52f0392f6293e564e3ff4522d6c37cfd Author: Uwe Kleine-König Date: Fri Nov 18 23:36:55 2022 +0100 iio: chemical: vz89x: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-82-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/chemical/vz89x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 07eda54d92f7ae7439a77903b9a43bfe563ebf21 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:54 2022 +0100 iio: chemical: sgp40: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-81-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/chemical/sgp40.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 67eba68bfccbdf6598200d70f80971e454d1ee2f Author: Uwe Kleine-König Date: Fri Nov 18 23:36:53 2022 +0100 iio: chemical: sgp30: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-80-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/chemical/sgp30.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2f2adc666335cad150b720a6b19cec33464e2680 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:52 2022 +0100 iio: chemical: scd4x: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-79-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/chemical/scd4x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 684e57366e68e4ba2abc5ab56041b4d6534f28ad Author: Uwe Kleine-König Date: Fri Nov 18 23:36:51 2022 +0100 iio: chemical: ccs811: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-78-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/chemical/ccs811.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5aa377658458cb7c4ea20dab7405b795a5cc8a11 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:50 2022 +0100 iio: chemical: bme680_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-77-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/chemical/bme680_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 50c359245069f7e64880fe01b06d40954df71d9f Author: Uwe Kleine-König Date: Fri Nov 18 23:36:49 2022 +0100 iio: chemical: atlas-sensor: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-76-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/chemical/atlas-sensor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e9c812ca569f1314f0a9c0420cb17c9db0a55457 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:48 2022 +0100 iio: chemical: atlas-ezo-sensor: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-75-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/chemical/atlas-ezo-sensor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 89d63224e20c8409afb553d334d38bb2675757ec Author: Uwe Kleine-König Date: Fri Nov 18 23:36:47 2022 +0100 iio: chemical: ams-iaq-core: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-74-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/chemical/ams-iaq-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9b1cd21eafc34beb50194a060e1cd3902b763a82 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:46 2022 +0100 iio: cdc: ad7746: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-73-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/cdc/ad7746.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7558eaa9727dbf2efd41d29101d1639975cf778e Author: Uwe Kleine-König Date: Fri Nov 18 23:36:45 2022 +0100 iio: cdc: ad7150: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-72-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/cdc/ad7150.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0143ce1039f70e2656865d75c163ed4dbf40db30 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:44 2022 +0100 iio: adc: ti-ads1015: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-71-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads1015.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4b50867f6a328c13d40223937c34b4146eafd883 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:43 2022 +0100 iio: adc: ti-adc081c: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-70-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-adc081c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6168215dbfea1c1d42a7aff145efbbcbdb5d6051 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:42 2022 +0100 iio: adc: mcp3422: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-69-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/mcp3422.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d59ecbc48a1c74cfe6bc2d4ff503fb3e7455d19f Author: Uwe Kleine-König Date: Fri Nov 18 23:36:41 2022 +0100 iio: adc: max9611: 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: Jacopo Mondi Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-68-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/max9611.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a69e45a411ea3ae0bbec474e4303c4281f3f8376 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:40 2022 +0100 iio: adc: max1363: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-67-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/max1363.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3a79844428c39fa54a30ec11eaad5a8e577ef706 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:39 2022 +0100 iio: adc: ltc2497: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-66-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/ltc2497.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 11e67cc9675f1289556e1524fa7717cc95282487 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:38 2022 +0100 iio: adc: ltc2485: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-65-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/ltc2485.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7b8c4fa43583ea1a7e60658ad23302608fe19ce9 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:37 2022 +0100 iio: adc: ltc2471: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-64-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/ltc2471.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 203a5e83dd3f7ea4d0d827563a317bd656d2f579 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:36 2022 +0100 iio: adc: ina2xx-adc: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-63-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/ina2xx-adc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 28ae41885ab2bec935a61a9c811713df6e70043e Author: Uwe Kleine-König Date: Fri Nov 18 23:36:35 2022 +0100 iio: adc: ad799x: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-62-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/ad799x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3ff5dd78f6b7e5aa73ddbc8f609f5ba53d1d49bc Author: Uwe Kleine-König Date: Fri Nov 18 23:36:34 2022 +0100 iio: adc: ad7291: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-61-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7291.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fe44f0738dd142a173e1b62e13b59d134abca003 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:33 2022 +0100 iio: adc: ad7091r5: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-60-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7091r5.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 50434e4605d66a55e7422cb24804c88b57cfb2bc Author: Uwe Kleine-König Date: Fri Nov 18 23:36:32 2022 +0100 iio: accel: mma9553: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-59-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/accel/mma9553.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6dae5d11e29d2935e7995d05468d72660dde5f7b Author: Uwe Kleine-König Date: Fri Nov 18 23:36:31 2022 +0100 iio: accel: mma9551: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-58-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/accel/mma9551.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 226d6dbac88336f37b1fae76aabe6fa610e9b872 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:30 2022 +0100 iio: accel: mma8452: 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: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-57-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/accel/mma8452.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 12491d35551df69709777bd7769e1e33641943cc Author: Angel Iglesias Date: Sun Nov 13 18:54:46 2022 +0100 iio: pressure: bmp280: convert to i2c's .probe_new() Use i2c_client_get_device_id() to get the i2c_device_id* parameter in the .new_probe() callback. Signed-off-by: Angel Iglesias Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/5dcaa389ea2ffe7050091b07a3bc4b0c1c9d586b.1668361368.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/pressure/bmp280-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 17b9a72f4a11c64a12d7cd4a7951ba44c5f2f374 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:29 2022 +0100 iio: accel: mma7455_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-56-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/accel/mma7455_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b15654dd11e62ed348d5ec7f93b8ea3ad72f8c56 Merge: d94fbd9231a2 662233731d66 Author: Jonathan Cameron Date: Mon Nov 14 20:38:30 2022 +0000 Merge remote-tracking branch 'i2c/i2c/client_device_id_helper-immutable' into togreg commit 09cec0835243b17316995bce30532f5ad51db355 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:28 2022 +0100 iio: accel: kxcjk-1013: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-55-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/accel/kxcjk-1013.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a8fab44897dd959c01a88a806fd4252a29c62055 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:27 2022 +0100 iio: accel: da280: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-54-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/accel/da280.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a141d225f6d62809d2b6a6c916929a8bbaaaaad5 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:26 2022 +0100 iio: accel: bmc150: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-53-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/accel/bmc150-accel-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e599500f96fb51417320b8b51ae4c36868672b13 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:25 2022 +0100 iio: accel: bma400: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-52-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/accel/bma400_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c476246bd5abb1f6d40054d83fea3f1a407ccb11 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:24 2022 +0100 iio: accel: bma180: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-51-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/accel/bma180.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2c5c45e236c4706a261042f67766b0486c72d603 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:23 2022 +0100 iio: accel: adxl372_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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221118224540.619276-50-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron drivers/iio/accel/adxl372_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d94fbd9231a2b4062cf5972629999402ea7dd6fa Author: Lorenzo Bianconi Date: Mon Nov 14 10:25:34 2022 +0100 iio: imu: st_lsm6dsx: fix LSM6DSV sensor description Fix sensor ODR description for LSM6DSV/LSM6DSVX Fixes: a1c6d631ff12 ("iio: imu: st_lsm6dsx: add support to LSM6DSV") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/653e14bf79bb88d8581d2bc42da2f784caaf3776.1668417770.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 10c4539d1d5581646997d7f9b430319bcb9245b1 Author: Cosmin Tanislav Date: Mon Nov 14 15:36:49 2022 +0200 iio: adc: ad4130: depend on GPIOLIB Fixes undefined references to 'gpiochip_get_data' and 'devm_gpiochip_add_data_with_key'. Signed-off-by: Cosmin Tanislav Reported-by: kernel test robot Fixes: 62094060cf3a ("iio: adc: ad4130: add AD4130 driver") Link: https://lore.kernel.org/r/20221114133649.1737027-1-cosmin.tanislav@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 572cc583c92e7b113a0d0f650b02d80505920eef Author: Deepak R Varma Date: Sun Nov 13 10:58:20 2022 +0530 staging: iio: meter: replace ternary operator by if condition Replace ternary operator by simple if based evaluation of the return value. Issue identified using coccicheck. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y3CAdCa17WdWDYUa@qemulion Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7854-i2c.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5ae34494cf37ae6383f4bd674f343ef20833024d Author: Subhajit Ghosh Date: Thu Nov 10 18:12:41 2022 +0800 iio: light: apds9960: Fix iio_event_spec structures There is only one interrupt enable option for both ALS low and high thresholds, and one for both Proximity low and high thresholds. Signed-off-by: Subhajit Ghosh Reviewed-by: Matt Ranostay Link: https://lore.kernel.org/r/20221110101241.10576-1-subhajit.ghosh@vixtechnology.com Signed-off-by: Jonathan Cameron drivers/iio/light/apds9960.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 7b4452381a966de33707718aa8d79672cc8caa2f Author: Jay Greco Date: Thu Nov 10 19:29:33 2022 +0000 dt-bindings: iio: imu: Add inv_icm42600 documentation Update the required documentation for the icm42631. Signed-off-by: Jay Greco Acked-by: Krzysztof Kozlowski Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20221110192933.13616-3-grecojay@amazon.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml | 1 + 1 file changed, 1 insertion(+) commit c896b9f0920fdcb9a815014ca1917522ba2c9b9a Author: Jay Greco Date: Thu Nov 10 19:29:32 2022 +0000 iio: imu: inv_icm42600: Add support for icm42631 Add the required WHOAMI and device_id definitions to support the icm42631. Signed-off-by: Jay Greco Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20221110192933.13616-2-grecojay@amazon.com Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_icm42600/inv_icm42600.h | 2 ++ drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 5 +++++ drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 3 +++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 +++ 4 files changed, 13 insertions(+) commit 6809ec97686f00b667468f7e8e582a6e3d50169b Author: Jagan Teki Date: Tue Nov 8 09:43:53 2022 +0530 dt-bindings: iio: adc: rockchip-saradc: Add saradc for rv1126 Add saradc compatible string for rockchip rv1126. Cc: linux-iio@vger.kernel.org Cc: Jonathan Cameron Signed-off-by: Jagan Teki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221108041400.157052-4-jagan@edgeble.ai Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml | 1 + 1 file changed, 1 insertion(+) commit 84aea36299a411f46d4372dc2d51c037ae70341a Author: Rob Herring Date: Fri Nov 11 15:28:46 2022 -0600 dt-bindings: iio: dac: adi,ad5758: Drop 'contains' from 'adi,dc-dc-mode' 'contains' applies to arrays, but 'adi,dc-dc-mode' is a scalar. So drop 'contains' from the 'if' schema. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20221111212846.4104059-1-robh@kernel.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 03e8373c070daf14eed069783e3cf343470ca5cd Author: Lorenzo Bianconi Date: Sun Nov 6 15:36:54 2022 +0100 dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsv16x Add device bindings for lsm6dsv16x IMU sensor. Use lsm6dsv as fallback device for lsm6dsv16x since it implements all the features currently supported by lsm6dsv16x. Signed-off-by: Lorenzo Bianconi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/8d10a63ec6abd22863ab25addd8c2f578dbc9cd9.1667745215.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 46975081f75105de5a6bda05af90323a4894d2be Author: Lorenzo Bianconi Date: Sun Nov 6 15:36:53 2022 +0100 iio: imu: st_lsm6dsx: add support to LSM6DSV16X Add support to STM LSM6DSV16X (accelerometer and gyroscope) Mems sensor. The LSM6DSV16X sensor can use LSM6DSV as fallback device since it implements all the LSM6DSV16X features currently implemented in st_lsm6dsx. Datasheet: https://www.st.com/resource/en/datasheet/lsm6dsv16x.pdf Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/284b251f861dff30c399e5736a843c8e3a497249.1667745215.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/Kconfig | 3 ++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 ++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 6 +++++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 +++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 +++++ 5 files changed, 19 insertions(+), 2 deletions(-) commit c486b7019398a7a451631d5d99b67480768bfd25 Author: Gwendal Grignou Date: Sat Nov 5 15:51:57 2022 -0700 iio: proximity: sx9360: Add a new ACPI hardware ID From https://treexy.com/products/driver-fusion/database/sensors/semtech/sx9360-proximity/ sx9360 SAR sensor can be presented with ACPI ID SAMM0208. Whilst this does not appear to be an official ACPI ID, it is in the wild (perhaps due to a typo on the SAM PnP ID). Reported-by: Jordi Torres Signed-off-by: Gwendal Grignou Link: https://lore.kernel.org/r/20221105225157.10081-1-gwendal@chromium.org Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9360.c | 1 + 1 file changed, 1 insertion(+) commit 2fcc6081a7bf8f7f531cffdc58b630b822e700a1 Author: David Vernet Date: Wed Nov 23 07:52:53 2022 -0600 bpf: Don't use idx variable when registering kfunc dtors In commit fda01efc6160 ("bpf: Enable cgroups to be used as kptrs"), I added an 'int idx' variable to kfunc_init() which was meant to dynamically set the index of the btf id entries of the 'generic_dtor_ids' array. This was done to make the code slightly less brittle as the struct cgroup * kptr kfuncs such as bpf_cgroup_aquire() are compiled out if CONFIG_CGROUPS is not defined. This, however, causes an lkp build warning: >> kernel/bpf/helpers.c:2005:40: warning: multiple unsequenced modifications to 'idx' [-Wunsequenced] .btf_id = generic_dtor_ids[idx++], Fix the warning by just hard-coding the indices. Fixes: fda01efc6160 ("bpf: Enable cgroups to be used as kptrs") Reported-by: kernel test robot Signed-off-by: David Vernet Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221123135253.637525-1-void@manifault.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 99043ba702243f69d1853bd8aeca01e22836ede3 Author: Jonathan Cameron Date: Sat Nov 5 12:51:08 2022 +0000 iio: temperature: mlx90632: Add missing static marking on devm_pm_ops Only used within this file, so should be marked static. Fixes: 2aebc223fc7c ("iio: temperature: mlx90632 Add runtime powermanagement modes") Signed-off-by: Jonathan Cameron Acked-off-by: Crt Mori Link: https://lore.kernel.org/r/20221105125108.383193-3-jic23@kernel.org drivers/iio/temperature/mlx90632.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bcf22afd2ce0b8bd4fad50bfda92e8cbbc483c72 Author: Jonathan Cameron Date: Sat Nov 5 12:51:07 2022 +0000 iio: temperature: mlx90632: Add error handling for devm_pm_runtime_enable() This call can fail so handling is necessary even if it is very unlikely. Reported-by: coverity-bot Addresses-Coverity-ID: 1527134 ("Error handling issues") Fixes: 2aebc223fc7c ("iio: temperature: mlx90632 Add runtime powermanagement modes") Signed-off-by: Jonathan Cameron Acked-off-by: Crt Mori Link: https://lore.kernel.org/r/20221105125108.383193-2-jic23@kernel.org drivers/iio/temperature/mlx90632.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6f7cadcf664b04df3b2e9b9c6d65bf626aa1b411 Author: Cosmin Tanislav Date: Thu Nov 3 15:00:41 2022 +0200 iio: temperature: ltc2983: support more parts Add support for the following parts: * LTC2984 * LTC2986 * LTM2985 The LTC2984 is a variant of the LTC2983 with EEPROM. The LTC2986 is a variant of the LTC2983 with only 10 channels, EEPROM and support for active analog temperature sensors. The LTM2985 is software-compatible with the LTC2986. Signed-off-by: Cosmin Tanislav Link: https://lore.kernel.org/r/20221103130041.2153295-14-demonsingur@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/temperature/ltc2983.c | 183 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 176 insertions(+), 7 deletions(-) commit d24052695057eb5254d9fedcb5494428f23d3ecb Author: Cosmin Tanislav Date: Thu Nov 3 15:00:40 2022 +0200 dt-bindings: iio: temperature: ltc2983: support more parts Add support for the following parts: * LTC2984 * LTC2986 * LTM2985 The LTC2984 is a variant of the LTC2983 with EEPROM. The LTC2986 is a variant of the LTC2983 with only 10 channels, EEPROM and support for active analog temperature sensors. The LTM2985 is software-compatible with the LTC2986. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221103130041.2153295-13-demonsingur@gmail.com Signed-off-by: Jonathan Cameron .../bindings/iio/temperature/adi,ltc2983.yaml | 60 ++++++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) commit cf738c544da333f6a8b7927f848ea388d7e58421 Author: Cosmin Tanislav Date: Thu Nov 3 15:00:39 2022 +0200 dt-bindings: iio: temperature: ltc2983: use generic node name in example Examples should use the generic IIO node name of temperature-sensor. Fix it. Signed-off-by: Cosmin Tanislav Link: https://lore.kernel.org/r/20221103130041.2153295-12-demonsingur@gmail.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93144097f51bf01591da5b8f8e37b6c616a0b23a Author: Cosmin Tanislav Date: Thu Nov 3 15:00:38 2022 +0200 dt-bindings: iio: temperature: ltc2983: describe broken mux delay property The 'adi,mux-delay-config-us' property is broken. It was supposed to be in us, but the value is actually written directly to the register. Describe the fact that it is broken and how it actually works. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221103130041.2153295-11-demonsingur@gmail.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 95027f5b3999b1b47a407ae4aa7bee18591164d1 Author: Cosmin Tanislav Date: Thu Nov 3 15:00:37 2022 +0200 dt-bindings: iio: temperature: ltc2983: refine descriptions Some descriptions are too verbose, while others are too succint. Rewrite them all. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221103130041.2153295-10-demonsingur@gmail.com Signed-off-by: Jonathan Cameron .../bindings/iio/temperature/adi,ltc2983.yaml | 163 ++++++++------------- 1 file changed, 65 insertions(+), 98 deletions(-) commit ee7e336c48d3f8f5bef748b202792290d0fa0c1e Author: Cosmin Tanislav Date: Thu Nov 3 15:00:36 2022 +0200 dt-bindings: iio: temperature: ltc2983: change default excitation for custom thermistors Excitation cannot be set to auto-range when using a custom thermistor or Steinhart sensor type. Default it to 1000nA to match the driver and remove the auto-range value from the enum. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221103130041.2153295-9-demonsingur@gmail.com Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b3805fc3dcf35512266bddf8c785eb82a24325bc Author: Cosmin Tanislav Date: Thu Nov 3 15:00:35 2022 +0200 dt-bindings: iio: temperature: ltc2983: require 4 wire rtd for current rotate The driver will error out when current rotation is enabled but the RTD is not 4-wire. Require it in the binding too. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221103130041.2153295-8-demonsingur@gmail.com Signed-off-by: Jonathan Cameron .../bindings/iio/temperature/adi,ltc2983.yaml | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) commit a2ebc8d281de63797fea5188f2aaa402cdb63cf1 Author: Cosmin Tanislav Date: Thu Nov 3 15:00:34 2022 +0200 dt-bindings: iio: temperature: ltc2983: require custom sensor tables The driver will error out when a custom sensor type is used but a custom sensor table is not provided. Require it in the binding too. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221103130041.2153295-7-demonsingur@gmail.com Signed-off-by: Jonathan Cameron .../bindings/iio/temperature/adi,ltc2983.yaml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 6cf75e90c5cc268d47ea67bfdf05961c1439dee4 Author: Cosmin Tanislav Date: Thu Nov 3 15:00:33 2022 +0200 dt-bindings: iio: temperature: ltc2983: describe matrix items Give a little bit of information on what each item in the matrix is supposed to be. Also, some matrices put the 'minItems' and 'maxItems' keywords in the wrong level. They should be on the same level as the 'items' keyword. Fix it. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221103130041.2153295-6-demonsingur@gmail.com Signed-off-by: Jonathan Cameron .../bindings/iio/temperature/adi,ltc2983.yaml | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 828a6c2252babdb79c7870080e872729ea90df17 Author: Cosmin Tanislav Date: Thu Nov 3 15:00:32 2022 +0200 dt-bindings: iio: temperature: ltc2983: remove qutations from phandle ref Not needed, so why have them? Signed-off-by: Cosmin Tanislav Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221103130041.2153295-5-demonsingur@gmail.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d449fb5146b9ba93cb72a0676c3da3dd7a1743a9 Author: Cosmin Tanislav Date: Thu Nov 3 15:00:31 2022 +0200 dt-bindings: iio: temperature: ltc2983: use hex for sensor address Addresses should be in hex, fix it. Although the driver initially specified 1-20, it can be made free-range since the address is supposed to match reg, onto which we can impose restrictions based on the compatible property value. Signed-off-by: Cosmin Tanislav Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221103130041.2153295-4-demonsingur@gmail.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ecee36077698bc5c759571106cd29321a886735 Author: Cosmin Tanislav Date: Thu Nov 3 15:00:30 2022 +0200 dt-bindings: iio: temperature: ltc2983: add default values Binding properties should have default values to let the reader know if they should change it. Add them based on driver logic. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221103130041.2153295-3-demonsingur@gmail.com Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5e0176213949724fbe9a8e4a39817edce337b8a0 Author: Cosmin Tanislav Date: Thu Nov 3 15:00:29 2022 +0200 iio: temperature: ltc2983: make bulk write buffer DMA-safe regmap_bulk_write() does not guarantee implicit DMA-safety, even though the current implementation duplicates the given buffer. Do not rely on it. Fixes: f110f3188e56 ("iio: temperature: Add support for LTC2983") Signed-off-by: Cosmin Tanislav Link: https://lore.kernel.org/r/20221103130041.2153295-2-demonsingur@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/temperature/ltc2983.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ed81d3de8eacf70c96f7012e4e16257efc2e12a9 Author: Bagas Sanjaya Date: Sun Nov 6 21:02:33 2022 +0700 Documentation: ad4130: format list of in_voltage-voltage_filter_mode_available modes Sphinx reports two warnings on sysfs documentation for AD4130 driver: Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130:2: WARNING: Unexpected indentation. Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130:2: WARNING: Block quote ends without a blank line; unexpected unindent. These are due to misformatting of sinc* modes list. Format it with bullet list. Since each entry spans multiple lines, separate each with a blank line. Fixes: 62094060cf3a ("iio: adc: ad4130: add AD4130 driver") Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20221106140233.74112-1-bagasdotme@gmail.com Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130 | 48 +++++++++++++--------- 1 file changed, 29 insertions(+), 19 deletions(-) commit d3532d69757f9c6a73155d73bd9b94b64b12ef72 Author: Ramona Bolboaca Date: Mon Oct 31 12:51:29 2022 +0200 drivers: iio: accel: Add support for ADXL359 device Add support for ADXL359 device in already existing ADXL355 driver. Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/adxl359.pdf Signed-off-by: Ramona Bolboaca Link: https://lore.kernel.org/r/20221031105129.47740-4-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron drivers/iio/accel/adxl355.h | 20 ++++++++- drivers/iio/accel/adxl355_core.c | 87 +++++++++++++++++++++++++++++++--------- drivers/iio/accel/adxl355_i2c.c | 22 ++++++++-- drivers/iio/accel/adxl355_spi.c | 19 +++++++-- 4 files changed, 121 insertions(+), 27 deletions(-) commit b311d2e170761fbf73184d236f53187e3db8bd14 Author: Ramona Bolboaca Date: Mon Oct 31 12:51:28 2022 +0200 dt-bindings: iio: accel: Add docs for ADXL359 Update ADXL355 existing documentation with documentation for ADXL359 device. Signed-off-by: Ramona Bolboaca Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221031105129.47740-3-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 75347e30f142521c140ba1f5011d4fb175c1406b Author: Ramona Bolboaca Date: Mon Oct 31 12:51:27 2022 +0200 drivers: iio: accel: Use warning if invalid device id is detected Use warning instead of failing driver probe if invalid device id is detected for ADXL355 device. Signed-off-by: Ramona Bolboaca Link: https://lore.kernel.org/r/20221031105129.47740-2-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron drivers/iio/accel/adxl355_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9b4901528f57fe88c7e0a0bfdf69d8edcaad46fb Author: Lorenzo Bianconi Date: Mon Oct 31 12:41:26 2022 +0100 dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsv device bindings Introduce device bindings for LSM6DSV IMU sensor. Signed-off-by: Lorenzo Bianconi Acked-by: Rob Herring Link: https://lore.kernel.org/r/c34cea4468dc26050dff812f47e1a21f8e544758.1667216004.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 1 + 1 file changed, 1 insertion(+) commit a1c6d631ff12cd41201c3ab824f3c4db66621c13 Author: Lorenzo Bianconi Date: Mon Oct 31 12:41:25 2022 +0100 iio: imu: st_lsm6dsx: add support to LSM6DSV Add support to STM LSM6DSV (accelerometer and gyroscope) Mems sensor. Datasheet: https://www.st.com/resource/en/datasheet/lsm6dsv.pdf Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/aad879e7af0fe583bbf043a2b93e32fade79fa19.1667216004.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/Kconfig | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 202 +++++++++++++++++++++++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 + 6 files changed, 216 insertions(+), 2 deletions(-) commit 2cfb2180c3e8002719234c43b88b040e4f89396f Author: Lorenzo Bianconi Date: Fri Oct 28 13:23:42 2022 +0200 iio: imu: st_lsm6dsx: introduce sw trigger support There are some hw configuration where irq0 and/or irq1 pins are not connected to the SPI or I2C/I3C controller. In order to avoid polling the output register introduce iio-sw trigger support when irq line is not available (or hw FIFO is not supported). Suggested-by: Mario Tesi Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/93ae6ff1150b531a9d7a4d3d1b1adb8383613717.1666955685.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 3 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 78 ++++++++++++++++++++++++++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 4 +- 3 files changed, 81 insertions(+), 4 deletions(-) commit ea4b79e98ae0aedc0ebbe4adbb8f73b6c34f21d7 Author: Krzysztof Kozlowski Date: Thu Oct 27 10:34:11 2022 -0400 dt-bindings: iio: adc: qcom,spmi-vadc: extend example Cleanup existing example (generic node name for spmi, use 4-space indentation) and add example for ADCv7 copied from Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221027143411.277980-2-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron .../bindings/iio/adc/qcom,spmi-vadc.yaml | 94 ++++++++++++++-------- 1 file changed, 62 insertions(+), 32 deletions(-) commit 306935570f23e25bff22a3273bc6f92c8f13c910 Author: Krzysztof Kozlowski Date: Thu Oct 27 10:34:10 2022 -0400 dt-bindings: iio: adc: qcom,spmi-vadc: simplify compatible enum The second compatible item in oneOf is just an enum, not a list. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221027143411.277980-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit c5269fe908635c67c1eb4876df625efcfb156827 Author: Jonathan Cameron Date: Sun Oct 16 18:09:50 2022 +0100 iio: adc: cc10001: Switch remaining IIO calls in probe to devm_ forms. As everything else is now handled by devm managed releases the triggered buffer setup and IIO device registration can also be moved over to their devm forms allowing dropping of remove(). Only user of drvdata associated with the struct device was the remove function, so also drop the platform_set_drvdata() call. Signed-off-by: Jonathan Cameron Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016170950.387751-6-jic23@kernel.org drivers/iio/adc/cc10001_adc.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) commit a43d5155b9455d38c4b3e4656131d79af61a2978 Author: Jonathan Cameron Date: Sun Oct 16 18:09:49 2022 +0100 iio: adc: cc10001: Use devm_ to call device power down. It is presumably safe to call the powerdown whether or not we are in the commented shared state (the driver always did this). The power down was previously out of order wrt to the probe() function so move using devm_ will ensure it occurs after the userspace interfaces are removed. Signed-off-by: Jonathan Cameron Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016170950.387751-5-jic23@kernel.org drivers/iio/adc/cc10001_adc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit c247e0d8c0d50793f459d2a7997d2f8f2105c973 Author: Jonathan Cameron Date: Sun Oct 16 18:09:48 2022 +0100 iio: adc: cc10001: Use devm_clk_get_enabled() to avoid boilerplate. As this driver just enables clock in probe() and disables in remove() we can use this new function to replace boilerplate and simplify error paths. Signed-off-by: Jonathan Cameron Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016170950.387751-4-jic23@kernel.org drivers/iio/adc/cc10001_adc.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit dc0ba516d103532b7f289b20119374fe3797f81b Author: Jonathan Cameron Date: Sun Oct 16 18:09:47 2022 +0100 iio: adc: cc10001: Add devm_add_action_or_reset() to disable regulator. As the voltage of this regulator is queried, we cannot use the devm_regulator_get_enable() call and have to role our own disable. Signed-off-by: Jonathan Cameron Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016170950.387751-3-jic23@kernel.org drivers/iio/adc/cc10001_adc.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 26bfb581931a020eaf560612f01009b3e179db0a Author: Jonathan Cameron Date: Sun Oct 16 18:09:46 2022 +0100 iio: adc: cc10001: Add local struct device *dev variable to avoid repitition There are lots of uses of this in probe() and we are about to introduce some more, so add a local variable to simplify this. Signed-off-by: Jonathan Cameron Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016170950.387751-2-jic23@kernel.org drivers/iio/adc/cc10001_adc.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 0a33755c4b01ed62a6d025cb585928304f9653d7 Author: Matti Vaittinen Date: Mon Oct 3 11:13:53 2022 +0300 iio: Don't silently expect attribute types The iio_triggered_buffer_setup_ext() and the devm_iio_kfifo_buffer_setup_ext() were changed by commit 15097c7a1adc ("iio: buffer: wrap all buffer attributes into iio_dev_attr") to silently expect that all attributes given in buffer_attrs array are device-attributes. This expectation was not forced by the API - and some drivers did register attributes created by IIO_CONST_ATTR(). When using IIO_CONST_ATTRs the added attribute "wrapping" does not copy the pointer to stored string constant and when the sysfs file is read the kernel will access to invalid location. Change the function signatures to expect an array of iio_dev_attrs to avoid similar errors in the future. Merge conflict resolved whilst applying due to patch crossing with two new drivers (kx022a accelerometer and ad4130 ADC). Signed-off-by: Matti Vaittinen Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/63f54787a684eb1232f1c5d275a09c786987fe4a.1664782676.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/adxl367.c | 10 +++++----- drivers/iio/accel/adxl372.c | 10 +++++----- drivers/iio/accel/bmc150-accel-core.c | 12 ++++++------ drivers/iio/accel/kionix-kx022a.c | 6 +++--- drivers/iio/adc/ad4130.c | 10 +++++----- drivers/iio/adc/at91-sama5d2_adc.c | 12 ++++++------ drivers/iio/buffer/industrialio-buffer-dmaengine.c | 4 ++-- drivers/iio/buffer/industrialio-triggered-buffer.c | 4 ++-- drivers/iio/buffer/kfifo_buf.c | 2 +- drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 6 +++--- drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 8 ++++---- drivers/iio/industrialio-buffer.c | 11 +++++++---- include/linux/iio/buffer_impl.h | 2 +- include/linux/iio/kfifo_buf.h | 3 ++- include/linux/iio/triggered_buffer.h | 6 +++--- 15 files changed, 55 insertions(+), 51 deletions(-) commit c1531e3ad43f5e66cd04ae19644343b9222204d2 Author: Matti Vaittinen Date: Mon Oct 3 11:13:31 2022 +0300 iio: at91-sama5d2_adc: Use IIO_STATIC_CONST_DEVICE_ATTR() Slightly simplify by dropping open-coded constant data iio_dev_attr functions and using the IIO_STATIC_CONST_DEVICE_ATTR() instead. Signed-off-by: Matti Vaittinen Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/4476a4ce852febb3eb863878e66751c787195b18.1664782676.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/at91-sama5d2_adc.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit c02b2a5166a58823e8a335c486ee71ce4f22f2b7 Author: Matti Vaittinen Date: Mon Oct 3 11:13:10 2022 +0300 iio: bmc150-accel-core: Use IIO_STATIC_CONST_DEVICE_ATTR() Slightly simplify by dropping open-coded constant data iio_dev_attr functions and using the IIO_STATIC_CONST_DEVICE_ATTR() instead. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/b1b0d662705b43d68594639fb7719bc431101f79.1664782676.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/bmc150-accel-core.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit f7e6804509eeb27accc6625150db3f02d0b93ad7 Author: Matti Vaittinen Date: Mon Oct 3 11:12:48 2022 +0300 iio: adxl372: Use IIO_STATIC_CONST_DEVICE_ATTR() Slightly simplify by dropping open-coded constant data iio_dev_attr functions and using the IIO_STATIC_CONST_DEVICE_ATTR() instead. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/3632af8849ef101c54ec1f739596f22c773b067c.1664782676.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/adxl372.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit f0ab171b80d49a2a47b88f79de38ca64c7d641d4 Author: Matti Vaittinen Date: Mon Oct 3 11:12:25 2022 +0300 iio: adxl367: Use IIO_STATIC_CONST_DEVICE_ATTR() Slightly simplify by dropping open-coded constant data iio_dev_attr functions and using the IIO_STATIC_CONST_DEVICE_ATTR() instead. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/c96c55363b8f36017ef7f18fdfe810cd3990e2a4.1664782676.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/adxl367.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 2cc64a23c4e26107887af23a62f8ba3c79ff7ab5 Author: Matti Vaittinen Date: Mon Oct 3 11:12:04 2022 +0300 iio: Add IIO_STATIC_CONST_DEVICE_ATTR Add IIO_STATIC_CONST_DEVICE_ATTR macro for creating an read-only iio_dev_attr which returns constant value. This macro is intended to be used when replacing the IIO_CONST_ATTR - attributes for triggered buffers because the triggered buffer attributes must be of type iio_dev_attr. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/8dd853dd0ef8eb40cb980cc6f6e7a43166de3afb.1664782676.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron include/linux/iio/sysfs.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6abcb19e0a6a371b5dafe4473ea886a6891a5cd5 Author: Colin Ian King Date: Fri Nov 4 09:31:48 2022 +0000 iio: adc: ad4130: Fix spelling mistake "diffreential" -> "differential" There is a spelling mistake in an error message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221104093148.167765-1-colin.i.king@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad4130.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d269e0d60761e9d2a6ca2adb9b3b44323a2f55cb Author: Matti Vaittinen Date: Mon Oct 24 15:40:58 2022 +0300 MAINTAINERS: Add KX022A maintainer entry Add maintainer entry for ROHM/Kionix KX022A accelerometer sensor driver. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/7895435f7fd31a3b576fc6a59b01eb3202c85d36.1666614295.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 7c1d1677b3227c6b18ac999f2b84778baa280b8f Author: Matti Vaittinen Date: Mon Oct 24 15:40:29 2022 +0300 iio: accel: Support Kionix/ROHM KX022A accelerometer KX022A is a 3-axis accelerometer from ROHM/Kionix. The sensor features include variable ODRs, I2C and SPI control, FIFO/LIFO with watermark IRQ, tap/motion detection, wake-up & back-to-sleep events, four acceleration ranges (2, 4, 8 and 16g), and probably some other cool features. Add support for the basic accelerometer features such as getting the acceleration data via IIO. (raw reads, triggered buffer [data-ready] or using the WMI IRQ). Important things to be added include the double-tap, motion detection and wake-up as well as the runtime power management. Signed-off-by: Matti Vaittinen Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/758b00d6aea0a6431a5a3a78d557d449c113b21e.1666614295.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/accel/Kconfig | 21 + drivers/iio/accel/Makefile | 3 + drivers/iio/accel/kionix-kx022a-i2c.c | 51 ++ drivers/iio/accel/kionix-kx022a-spi.c | 58 ++ drivers/iio/accel/kionix-kx022a.c | 1142 +++++++++++++++++++++++++++++++++ drivers/iio/accel/kionix-kx022a.h | 82 +++ 6 files changed, 1357 insertions(+) commit b52e2f19f80240365d7eaa3fdd320afcf14cf4c0 Author: Matti Vaittinen Date: Mon Oct 24 15:40:11 2022 +0300 dt-bindings: iio: Add KX022A accelerometer KX022A is a 3-axis Accelerometer from ROHM/Kionix. The sensor features include variable ODRs, I2C and SPI control, FIFO/LIFO with watermark IRQ, tap/motion detection, wake-up & back-to-sleep events, four acceleration ranges (2, 4, 8 and 16g) and probably some other cool features. Add the basic device tree description for the accelerometer. Only basic accelerometer features are considered as of now - new properties may or may not be needed in the future when rest of the features are supported. Signed-off-by: Matti Vaittinen Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/06f8e1ab29d02ed216db10091a269df4b6abad9a.1666614295.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron .../bindings/iio/accel/kionix,kx022a.yaml | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit f7626504432a6d30178bc6946d50a9d4a1bb4e31 Author: Yang Yingliang Date: Mon Oct 24 18:52:50 2022 +0800 iio: trigger: sysfs: rename error label in iio_sysfs_trigger_probe() Rename error label in iio_sysfs_trigger_probe() to make more readable. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221024105250.873394-1-yangyingliang@huawei.com Signed-off-by: Jonathan Cameron drivers/iio/trigger/iio-trig-sysfs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a95ccebde759f1f6a6070819cd43dce1ad06750d Author: Crt Mori Date: Mon Oct 24 12:22:05 2022 +0200 iio: temperature: mlx90632 Style alignment for the driver Changing and aligning the overall style of the driver with the recent reviews. There is no functional change, only type generalization and moving to the reverse Christmas tree for variable declarations. Reviewed-by: Andy Shevchenko Signed-off-by: Crt Mori Link: https://lore.kernel.org/r/d59aad00891c1a64e044a0f5bc7d40e42d47e9c7.1666606912.git.cmo@melexis.com Signed-off-by: Jonathan Cameron drivers/iio/temperature/mlx90632.c | 65 +++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 29 deletions(-) commit 2ca0b16f6ce23cf586c27a9139cf426b3f64d242 Author: Uwe Kleine-König Date: Sun Oct 23 15:23:02 2022 +0200 iio: accel: vl6180: 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/20221023132302.911644-24-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/light/vl6180.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9492c00d83ee8b2b141e29acbcd3e56dd11aa436 Author: Uwe Kleine-König Date: Sun Oct 23 15:23:01 2022 +0200 iio: accel: st_magn: 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/20221023132302.911644-23-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/st_magn_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d18e70608e01a5845fd75e7ec1956ce422b07184 Author: Uwe Kleine-König Date: Sun Oct 23 15:23:00 2022 +0200 iio: accel: stk8ba50: 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/20221023132302.911644-22-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/stk8ba50.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3d8a49ebd6576b7803181e0a9fa4e7930f011f1b Author: Uwe Kleine-König Date: Sun Oct 23 15:22:59 2022 +0200 iio: accel: stk8312: 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/20221023132302.911644-21-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/stk8312.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 76e4a118c85a7e93ff5264ff8d92f76f675be352 Author: Uwe Kleine-König Date: Sun Oct 23 15:22:58 2022 +0200 iio: accel: mxc6255: 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/20221023132302.911644-20-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/mxc6255.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a97d9d95a188d21f5d1cbedbbc7c990b00bf5744 Author: Uwe Kleine-König Date: Sun Oct 23 15:22:57 2022 +0200 iio: accel: mxc4005: 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/20221023132302.911644-19-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/mxc4005.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 76403ea698adffb6661e083545f21e50fef5b3ac Author: Uwe Kleine-König Date: Sun Oct 23 15:22:53 2022 +0200 iio: accel: mma7660: 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/20221023132302.911644-15-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/mma7660.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ded7a4f8f90286e63eefcd32443ac911d926e118 Author: Uwe Kleine-König Date: Sun Oct 23 15:22:51 2022 +0200 iio: accel: mc3230: 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/20221023132302.911644-13-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/mc3230.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2ba423fefb1c87d080e3a7964ccfa7e929ed6f07 Author: Uwe Kleine-König Date: Sun Oct 23 15:22:50 2022 +0200 iio: accel: kxsd9: 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/20221023132302.911644-12-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5019025fc3a9869c438ad33ab18a4fdad46a996d Author: Uwe Kleine-König Date: Sun Oct 23 15:22:48 2022 +0200 iio: accel: dmard10: 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/20221023132302.911644-10-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/dmard10.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d61f79d383f548df8b3b9da58ab687c7db1a93c7 Author: Uwe Kleine-König Date: Sun Oct 23 15:22:47 2022 +0200 iio: accel: dmard09: 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/20221023132302.911644-9-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/dmard09.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 72907238b193be0fc18f2859b7f4c6741b73aedc Author: Uwe Kleine-König Date: Sun Oct 23 15:22:46 2022 +0200 iio: accel: dmard06: 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/20221023132302.911644-8-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/dmard06.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a9e38f1ecc461c43aa26849394c552e38593ad38 Author: Uwe Kleine-König Date: Sun Oct 23 15:22:45 2022 +0200 iio: accel: da311: 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/20221023132302.911644-7-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/da311.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ecff5cb471b5dc20b996378c0533bd5f34e85c89 Author: Uwe Kleine-König Date: Sun Oct 23 15:22:40 2022 +0200 iio: accel: adxl367: 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/20221023132302.911644-2-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron drivers/iio/accel/adxl367_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1db96143df6b81a402e9b88d08f04374f1353ed0 Author: Jonathan Cameron Date: Sun Oct 16 17:34:07 2022 +0100 iio: proximity: sx_common: Use devm_regulator_bulk_get_enable() This driver only turns the power for some regulators on at probe and off via a custom devm_add_action_or_reset() callback. The new devm_regulator_bulk_get_enable() replaces all this boilerplate code. Signed-off-by: Jonathan Cameron Cc: Gwendal Grignou Reviewed-by: Stephen Boyd Reviewed-by: Matti Vaittinen Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016163409.320197-13-jic23@kernel.org drivers/iio/proximity/sx_common.c | 23 +++-------------------- drivers/iio/proximity/sx_common.h | 2 -- 2 files changed, 3 insertions(+), 22 deletions(-) commit b620be5f32621b953313056c396894818d5a2ed9 Author: Jonathan Cameron Date: Sun Oct 16 17:34:06 2022 +0100 iio: light: noa1305: Use devm_regulator_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_get_enable() replaces this boilerplate code. Signed-off-by: Jonathan Cameron Cc: Martyn Welch Reviewed-by: Matti Vaittinen Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016163409.320197-12-jic23@kernel.org drivers/iio/light/noa1305.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) commit c437c977c1d2116e0f3667de7222544f348032e4 Author: Jonathan Cameron Date: Sun Oct 16 17:34:05 2022 +0100 iio: light: ltr501: Use devm_regulator_bulk_get_enable() This driver only turns the power for some regulators on at probe and off via a custom devm_add_action_or_reset() callback. The new devm_regulator_bulk_get_enable() replaces all this boilerplate code. Signed-off-by: Jonathan Cameron Reviewed-by: Matti Vaittinen Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016163409.320197-11-jic23@kernel.org drivers/iio/light/ltr501.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) commit 2c97f7b404b8610ebca645d60a6ed1e68d08fbe3 Author: Jonathan Cameron Date: Sun Oct 16 17:34:04 2022 +0100 iio: humidity: hts211: Use devm_regulator_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_get_enable() replaces this boilerplate code. Signed-off-by: Jonathan Cameron Acked-by: Lorenzo Bianconi Reviewed-by: Matti Vaittinen Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016163409.320197-10-jic23@kernel.org drivers/iio/humidity/hts221.h | 2 -- drivers/iio/humidity/hts221_core.c | 27 ++++----------------------- 2 files changed, 4 insertions(+), 25 deletions(-) commit d86186a6e0247394c70239713994df5e2c66220c Author: Jonathan Cameron Date: Sun Oct 16 17:34:03 2022 +0100 iio: frequency: ad9523: Use devm_regulator_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_get_enable() replaces this boilerplate code. Note that in event of an error on the devm_regulator_get() the driver would have continued without enabling the regulator which is probably not a good idea. So here we handle any error as a reason to fail the probe(). In theory this may expose breakage on a platform that was previously papered over but it seems low risk. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich Reviewed-by: Matti Vaittinen Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016163409.320197-9-jic23@kernel.org drivers/iio/frequency/ad9523.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) commit 9e855d77b1ec57704d23e25761a97e6e64abed66 Author: Jonathan Cameron Date: Sun Oct 16 17:34:02 2022 +0100 iio: st_sensors: core and lsm9ds0 switch to devm_regulator_bulk_get_enable() These drivers only turns the power on at probe and off via a custom devm_add_action_or_reset() callback. The two regulators were handled separately so also switch to bulk registration. The new devm_regulator_bulk_get_enable() replaces all this boilerplate code. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Cc: Andy Shevchenko Reviewed-by: Matti Vaittinen Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016163409.320197-8-jic23@kernel.org drivers/iio/common/st_sensors/st_sensors_core.c | 39 +++------------ drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c | 65 +++---------------------- include/linux/iio/common/st_sensors.h | 4 -- 3 files changed, 14 insertions(+), 94 deletions(-) commit 72ce527c7bb599ac1d64ec5393f66a673b75de6b Author: Jonathan Cameron Date: Sun Oct 16 17:34:01 2022 +0100 iio: cdc: ad7150: Use devm_regulator_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_get_enable() replaces this boilerplate code. Signed-off-by: Jonathan Cameron Reviewed-by: Matti Vaittinen Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016163409.320197-7-jic23@kernel.org drivers/iio/cdc/ad7150.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit eefa008b1677244d73ba47920172be36570c87c1 Author: Jonathan Cameron Date: Sun Oct 16 17:34:00 2022 +0100 iio: accel: msa311: Use devm_regulator_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_get_enable() replaces this boilerplate code. Signed-off-by: Jonathan Cameron Cc: Dmitry Rokosov Reviewed-by: Dmitry Rokosov Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016163409.320197-6-jic23@kernel.org drivers/iio/accel/msa311.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit 1fa4ff1f249983b38394ee79379e028c1c501ae5 Author: Jonathan Cameron Date: Sun Oct 16 17:33:59 2022 +0100 iio: accel: kxcjk-1013: 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 Reviewed-by: Matti Vaittinen Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016163409.320197-5-jic23@kernel.org drivers/iio/accel/kxcjk-1013.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) commit 5b30e739ceaf37aa5817195a20cd1fa7a4607623 Author: Jonathan Cameron Date: Sun Oct 16 17:33:58 2022 +0100 iio: accel: fxls8962af: Use devm_regulator_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_get_enable() replaces this boilerplate code. Signed-off-by: Jonathan Cameron Cc: Sean Nyekjaer Reviewed-by: Sean Nyekjaer Reviewed-by: Matti Vaittinen Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016163409.320197-4-jic23@kernel.org drivers/iio/accel/fxls8962af-core.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit e9b96e18cf47133e51f4cb67d9dd9d163abc5f6d Author: Jonathan Cameron Date: Sun Oct 16 17:33:56 2022 +0100 iio: accel: adxl367: 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: Cosmin Tanislav Reviewed-by: Matti Vaittinen Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221016163409.320197-2-jic23@kernel.org drivers/iio/accel/adxl367.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) commit e54ec96c7201507db1b2c053068cda32f3c42cc7 Author: Deepak R Varma Date: Mon Oct 17 12:02:30 2022 +0530 staging: iio: frequency: ad9834: merge unnecessary split lines Improve code readability by merging unnecessary split lines that are well within the code-style guidelines post merge. Signed-off-by: Deepak R Varma Acked-by: Julia Lawall Link: https://lore.kernel.org/r/Y0z2/qFe3kW96MTs@debian-BULLSEYE-live-builder-AMD64 Signed-off-by: Jonathan Cameron drivers/staging/iio/frequency/ad9834.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 62094060cf3acaf52e277457d807ea753269b89e Author: Cosmin Tanislav Date: Fri Oct 21 13:41:15 2022 +0300 iio: adc: ad4130: add AD4130 driver AD4130-8 is an ultra-low power, high precision, measurement solution for low bandwidth battery operated applications. The fully integrated AFE (Analog Front-End) includes a multiplexer for up to 16 single-ended or 8 differential inputs, PGA (Programmable Gain Amplifier), 24-bit Sigma-Delta ADC, on-chip reference and oscillator, selectable filter options, smart sequencer, sensor biasing and excitation options, diagnostics, and a FIFO buffer. Signed-off-by: Cosmin Tanislav Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221021104115.1812486-3-demonsingur@gmail.com Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130 | 36 + MAINTAINERS | 2 + drivers/iio/adc/Kconfig | 14 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ad4130.c | 2100 ++++++++++++++++++++ 5 files changed, 2153 insertions(+) commit 36a4df5003c91663bd2d68a3cf452c0495ce583c Author: Cosmin Tanislav Date: Fri Oct 21 13:41:14 2022 +0300 dt-bindings: iio: adc: add AD4130 AD4130-8 is an ultra-low power, high precision, measurement solution for low bandwidth battery operated applications. The fully integrated AFE (Analog Front-End) includes a multiplexer for up to 16 single-ended or 8 differential inputs, PGA (Programmable Gain Amplifier), 24-bit Sigma-Delta ADC, on-chip reference and oscillator, selectable filter options, smart sequencer, sensor biasing and excitation options, diagnostics, and a FIFO buffer. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221021104115.1812486-2-demonsingur@gmail.com Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/adi,ad4130.yaml | 259 +++++++++++++++++++++ MAINTAINERS | 7 + 2 files changed, 266 insertions(+) commit fd4fc88d0b6fc452571152d4d3b2fc8078be3825 Author: Mitja Spes Date: Fri Oct 21 15:58:22 2022 +0200 dt-bindings: iio: pressure: meas,ms5611: add max SPI frequency to the example Added max SPI frequency setting to the example. Signed-off-by: Mitja Spes Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221021135827.1444793-4-mitja@lxnav.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml | 1 + 1 file changed, 1 insertion(+) commit 563746c26db6c203d30bed2daa301416b27b77fb Author: Matti Vaittinen Date: Fri Aug 19 22:21:02 2022 +0300 iio: amplifier: hmc425a: simplify using devm_regulator_get_enable() Drop open-coded pattern: 'devm_regulator_get(), regulator_enable(), add_action_or_reset(regulator_disable)' and use the devm_regulator_get_enable() and drop the pointer to the regulator. This simplifies code and makes it less tempting to add manual control for the regulator which is also controlled by devm. Signed-off-by: Matti Vaittinen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/8b1193fdefb231a6d721e2bded52c48e56039c20.1660934107.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/amplifiers/hmc425a.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 3dfa1d4f63baf41774bbc77467729de39e0ac8a6 Author: Matti Vaittinen Date: Fri Aug 19 22:20:47 2022 +0300 iio: adc: max1363: simplify using devm_regulator_get_enable() Drop open-coded pattern: 'devm_regulator_get(), regulator_enable(), add_action_or_reset(regulator_disable)' and use the devm_regulator_get_enable() and drop the pointer to the regulator. This simplifies code and makes it less tempting to add manual control for the regulator which is also controlled by devm. Signed-off-by: Matti Vaittinen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/1286ea127d190e5708a0aaff271819b2d3f8802d.1660934107.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/max1363.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit f55c8e6696425ef22b7d08fc05b920d3a1a5dbf6 Author: Matti Vaittinen Date: Fri Aug 19 22:20:32 2022 +0300 iio: adc: max1241: simplify using devm_regulator_get_enable() Drop open-coded pattern: 'devm_regulator_get(), regulator_enable(), add_action_or_reset(regulator_disable)' and use the devm_regulator_get_enable() and drop the pointer to the regulator. This simplifies code and makes it less tempting to add manual control for the regulator which is also controlled by devm. Signed-off-by: Matti Vaittinen Acked-by: Alexandru Lazar Link: https://lore.kernel.org/r/7c759bf6c06e72ae70bffeebc1939d9903427278.1660934107.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/max1241.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) commit fd5b6c48ec3345d5c243e283fbdb69618ada2be8 Author: Matti Vaittinen Date: Fri Aug 19 22:20:18 2022 +0300 iio: adc: ad7606: simplify using devm_regulator_get_enable() Drop open-coded pattern: 'devm_regulator_get(), regulator_enable(), add_action_or_reset(regulator_disable)' and use the devm_regulator_get_enable() and drop the pointer to the regulator. This simplifies code and makes it less tempting to add manual control for the regulator which is also controlled by devm. Whilst here also switch to dev_err_probe() to provide more information if a deferred probe occurs. Signed-off-by: Matti Vaittinen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/521c52f5a9bdc2db04d5775b36df4b233ae338da.1660934107.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7606.c | 22 +++------------------- drivers/iio/adc/ad7606.h | 2 -- 2 files changed, 3 insertions(+), 21 deletions(-) commit 7ff0ad35aa6f70fe32fee33bc6e0aa356af99f76 Author: Matti Vaittinen Date: Fri Aug 19 22:20:03 2022 +0300 iio: adc: ad7476: simplify using devm_regulator_get_enable() Drop open-coded pattern: 'devm_regulator_get(), regulator_enable(), add_action_or_reset(regulator_disable)' and use the devm_regulator_get_enable() Signed-off-by: Matti Vaittinen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/33070d66b9b976acac1cee5570facef9278b6b61.1660934107.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7476.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 6900cdbfb99e8600572da340576509297a684a3a Author: Matti Vaittinen Date: Fri Aug 19 22:19:46 2022 +0300 iio: imu: st_lsm6dsx: Simplify using devm_regulator_*get_enable() Use devm_regulator_bulk_get_enable() instead of open coded bulk-get, bulk-enable, add-action-to-disable-at-detach - pattern. A functional change (which seems like a bugfix) is that if regulator_bulk_get fails, the enable is not attempted. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/876e58428cec056d51070e49eff559e2d7c23b12.1660934107.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 -- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 30 +++++----------------------- 2 files changed, 5 insertions(+), 27 deletions(-) commit 2c620883a46b6e2299cf9e4b4683e5b3cc67a61e Author: Matti Vaittinen Date: Fri Aug 19 22:19:31 2022 +0300 iio: gyro: bmg160_core: Simplify using devm_regulator_*get_enable() Use devm_regulator_bulk_get_enable() instead of open coded bulk-get, bulk-enable, add-action-to-disable-at-detach - pattern. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/3fd11489356b1c73a3d7b4bd9dec7e12c9fe8788.1660934107.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/gyro/bmg160_core.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit 08f75f180db06566d134b1cac1d8a4b8f266761e Author: Matti Vaittinen Date: Fri Aug 19 22:19:17 2022 +0300 iio: dac: ltc2688: Simplify using devm_regulator_*get_enable() Use devm_regulator_bulk_get_enable() instead of open coded bulk-get, bulk-enable, add-action-to-disable-at-detach - pattern. Signed-off-by: Matti Vaittinen Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/a29493f594c84b3bd852e462bbd3e591a8575a27.1660934107.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/dac/ltc2688.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit 1ccef2e6e9205e209ad958d2e591bcca60981007 Author: Matti Vaittinen Date: Fri Aug 19 22:19:01 2022 +0300 iio: adc: ad7192: Simplify using devm_regulator_get_enable() Use devm_regulator_get_enable() instead of open coded get, enable, add-action-to-disable-at-detach - pattern. Also drop the seemingly unused struct member 'dvdd'. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/9719c445c095d3d308e2fc9f4f93294f5806c41c.1660934107.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7192.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 62bfa12c87ac7468a69e81ea870eb68b0adabf37 Author: Jonathan Cameron Date: Sun Sep 25 16:57:19 2022 +0100 iio: imu: inv_mpu: Move exports to IIO_MPU6050 namespace As these exports are only relevant to core module and users in the bus specific modules, move them out of the main kernel namespace. Includes using EXPORT_NS_GPL_DEV_PM_OPS() and the simplifications that brings by allowing the compiler to remove unused struct dev_pm_ops and callbacks without needing explicit __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Jean-Baptiste Maneyrol Cc: Linus Walleij -- Dropped Linus' tag as the new patch is significantly different. v2: Switch to more flexible version of EXPORT* macro from Paul. Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20220925155719.3316280-6-jic23@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 17 ++++++++--------- drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 3 ++- drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 3 ++- 3 files changed, 12 insertions(+), 11 deletions(-) commit ef5a5ef29c8f70ca640d785b7173101417c78d24 Author: Jonathan Cameron Date: Sun Sep 25 16:57:18 2022 +0100 iio: imu: inv_icm42600: Move exports to IIO_ICM42600 namespace As these exports are only relevant to core module and users in the bus specific modules, move them out of the main kernel namespace. Includes using EXPORT_NS_GPL_DEV_PM_OPS() and the simplifications that brings by allowing the compiler to remove unused struct dev_pm_ops and callbacks without needing explicit __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Jean-Baptiste Maneyrol -- EXPORT_NS_GPL_DEV_PM_OPS() v2: Switch to Paul's more flexible version of the Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20220925155719.3316280-5-jic23@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 21 ++++++++++----------- drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 3 ++- drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 ++- 3 files changed, 14 insertions(+), 13 deletions(-) commit 02e082c433c65f06f4cb359688993377c1d7b6d1 Author: Jonathan Cameron Date: Sun Sep 25 16:57:17 2022 +0100 iio: gyro: fxas210002c: Move exports to IIO_FXAS210002C namespace. Includes using EXPORT_NS_GPL_DEV_PM_OPS() and the simplifications that brings by allowing the compiler to remove unused struct dev_pm_ops and callbacks without needing explicit __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Rui Miguel Silva Signed-off-by: Jonathan Cameron -- Dropped Rui's tag on basis this is rather different from v1 due to the different macro implementation. v2: Switch to Paul's more flexible approach to EXPORT_NS_GPL_DEV_PM_OPS() Acked-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20220925155719.3316280-4-jic23@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/gyro/fxas21002c_core.c | 21 ++++++++++----------- drivers/iio/gyro/fxas21002c_i2c.c | 3 ++- drivers/iio/gyro/fxas21002c_spi.c | 3 ++- 3 files changed, 14 insertions(+), 13 deletions(-) commit 687c8848c642c093c190bb182e4a6ac2ed86b4eb Author: Jonathan Cameron Date: Sun Sep 25 16:57:16 2022 +0100 iio: accel: fxls8962af: Use new EXPORT_NS_GPL_DEV_PM_OPS() Using this macro allows the compiler to remove unused structures and callbacks if we are not building with CONFIG_PM* without needing __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Sean Nyekjaer -- Switched to Paul Cercueil's more flexible implementation fo the macro. Dropped Sean's Ack given new form of macro being used. Acked-by: Sean Nyekjaer Link: https://lore.kernel.org/r/20220925155719.3316280-3-jic23@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/accel/fxls8962af-core.c | 16 +++++++--------- drivers/iio/accel/fxls8962af-i2c.c | 2 +- drivers/iio/accel/fxls8962af-spi.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) commit 0c3a333524a3e5ba4b6c7b2638faef8420cfdb2a Author: Rajat Khandelwal Date: Mon Oct 10 23:07:20 2022 +0530 iio: pressure: mpl115: Implementing low power mode by shutdown gpio MPL115 supports shutdown gpio which can be used to set the state to low power mode. Power from all internal circuits and registers is removed. This is done by pulling the SHDN pin to low. This patch enables runtime PM on MPL115 to increase power savings. According to spec., a wakeup time period of ~5 ms exists between waking up and actually communicating with the device. This is implemented using sleep delay. Signed-off-by: Rajat Khandelwal Link: https://lore.kernel.org/r/20221010173720.568916-1-rajat.khandelwal@linux.intel.com Signed-off-by: Jonathan Cameron drivers/iio/pressure/mpl115.c | 62 ++++++++++++++++++++++++++++++++++++++- drivers/iio/pressure/mpl115.h | 5 ++++ drivers/iio/pressure/mpl115_i2c.c | 1 + drivers/iio/pressure/mpl115_spi.c | 1 + 4 files changed, 68 insertions(+), 1 deletion(-) commit 16afe125b53f88b855d2713c8ba253d905dcf3cc Author: Nuno Sá Date: Wed Oct 12 17:16:20 2022 +0200 iio: core: move 'mlock' to 'struct iio_dev_opaque' Now that there are no more users accessing 'mlock' directly, we can move it to the iio_dev private structure. Hence, it's now explicit that new driver's should not directly use this lock. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221012151620.1725215-5-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/TODO | 3 --- drivers/iio/industrialio-buffer.c | 29 +++++++++++++++++------------ drivers/iio/industrialio-core.c | 26 +++++++++++++++----------- drivers/iio/industrialio-event.c | 4 ++-- drivers/iio/industrialio-trigger.c | 12 ++++++------ include/linux/iio/iio-opaque.h | 2 ++ include/linux/iio/iio.h | 3 --- 7 files changed, 42 insertions(+), 37 deletions(-) commit 6b701cda3632c9cffaea6f79c5fe638800c8f7f1 Author: Nuno Sá Date: Wed Oct 12 17:16:19 2022 +0200 iio: health: max30102: do not use internal iio_dev lock The pattern used in this device does not quite fit in the iio_device_claim_direct_mode() typical usage. In this case, we want to know if we are in buffered mode or not to know if the device is powered (buffer mode) or not. And depending on that max30102_get_temp() will power on the device if needed. Hence, in order to keep the same functionality, we try to: 1. Claim Buffered mode; 2: If 1) succeeds call max30102_get_temp() without powering on the device; 3: Release Buffered mode; 4: If 1) fails, Claim Direct mode; 5: If 4) succeeds call max30102_get_temp() with powering on the device; 6: Release Direct mode; 7: If 4) fails, goto to 1) and try again. This dance between buffered and direct mode is not particularly pretty (as well as the loop introduced by the goto statement) but it does allow us to get rid of the mlock usage while keeping the same behavior. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221012151620.1725215-4-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/health/max30102.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 1555790c86286933dc674fffe9c1104250d093ce Author: Nuno Sá Date: Wed Oct 12 17:16:18 2022 +0200 iio: health: max30100: do not use internal iio_dev lock The pattern used in this device does not quite fit in the iio_device_claim_direct_mode() typical usage. In this case, iio_buffer_enabled() was being used not to prevent the raw access but to allow it. Hence, let's make use of the new iio_device_claim_buffer_mode() API to make sure we stay in buffered mode during the complete read. Note that we are shadowing the error code returned by iio_device_claim_buffer_mode() so that we keep the original one (-EAGAIN). The reason is that some userspace stack might already be relying on this particular code so that we are not taking chances and leave it alone. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20221012151620.1725215-3-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/health/max30100.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 0a8565425afd8ba0e1a0ea73e21da119ee6dacea Author: Nuno Sá Date: Wed Oct 12 17:16:17 2022 +0200 iio: core: introduce iio_device_{claim|release}_buffer_mode() APIs These APIs are analogous to iio_device_claim_direct_mode() and iio_device_release_direct_mode() but, as the name suggests, with the logic flipped. While this looks odd enough, it will have at least two users (in following changes) and it will be important to move the IIO mlock to the private struct. Signed-off-by: Nuno Sá Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221012151620.1725215-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/industrialio-core.c | 38 ++++++++++++++++++++++++++++++++++++++ include/linux/iio/iio.h | 2 ++ 2 files changed, 40 insertions(+) commit 7cb2303dd02487cc18bc9ff0fc1338e8c78ae846 Author: Olivier Moysan Date: Wed Oct 12 16:22:01 2022 +0200 iio: adc: stm32: manage min sampling time on all internal channels Force minimum sampling time for all internal channels according to datasheet requirement. This value can be increased through DT st,min-sample-time-ns property. Signed-off-by: Olivier Moysan Reviewed-by: Andy Shevchenko Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20221012142205.13041-5-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit cf0fb80ae1675179620d964d629b43ca57219ced Author: Olivier Moysan Date: Wed Oct 12 16:22:00 2022 +0200 iio: adc: stm32-adc: add stm32mp13 support Add STM32 ADC support for STM32MP13x SOCs family. On STM32MP13x, each ADC peripheral has a single ADC block. These ADC peripherals, ADC1 and ADC2, are fully independent. This introduces changes in common registers handling. Some features such as boost mode, channel preselection and linear calibration are not supported by the STM32MP13x ADC. Add diversity management for these features. The STM32MP13x ADC introduces registers and bitfield variants on existing features such as calibration factors and internal channels. Add register diversity management. Add also support for new internal channels VDDCPU and VDDQ_DDR. Signed-off-by: Olivier Moysan Reviewed-by: Fabrice Gasnier Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221012142205.13041-4-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc-core.c | 30 +++++- drivers/iio/adc/stm32-adc-core.h | 30 ++++++ drivers/iio/adc/stm32-adc.c | 210 ++++++++++++++++++++++++++++++++++----- 3 files changed, 239 insertions(+), 31 deletions(-) commit 6cafcdb19ee4a0a073e4a8b0828698f8816c800c Author: Olivier Moysan Date: Wed Oct 12 16:21:59 2022 +0200 dt-bindings: iio: adc: stm32-adc: add stm32mp13 compatibles Add st,stm32mp13-adc-core and st,stm32mp13-adc compatibles to support STM32MPU13 SoC. On STM32MP13x, each ADC peripheral has a single ADC block. These ADC peripherals, ADC1 and ADC2, are fully independent. Main characteristics of STM32MP13x ADC: - One interrupt line per ADC - 6 to 12 bits resolution - 19 channels ADC2 instance supports two extra internal channels VDDCPU and VDDQ_DDR. Add "vddcpu" and "vddq_ddr" internal channels names to the reserved labels list. Signed-off-by: Olivier Moysan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221012142205.13041-3-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/st,stm32-adc.yaml | 68 +++++++++++++++++++++- 1 file changed, 65 insertions(+), 3 deletions(-) commit cd83c5c10036a2a156d725725daf3409832c8a24 Author: Lorenzo Bianconi Date: Mon Oct 10 13:07:26 2022 +0200 iio: imu: st_lsm6dsx: introduce st_lsm6dsx_device_set_enable routine Introduce st_lsm6dsx_device_set_enable utility routine and remove duplicated code used to enable/disable sensors Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/e3fbe5d4a3bed41130908669f745f78c8505cf47.1665399959.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 11 +++++++++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 14 +++----------- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 14 ++------------ 3 files changed, 16 insertions(+), 23 deletions(-) commit c1404d1b659fe3d7d13bdbd59e5161ab508dc101 Author: ChiaEn Wu Date: Tue Oct 11 12:05:45 2022 +0800 iio: adc: mt6370: Add MediaTek MT6370 support MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Type-C and PD standards. Add support for the MT6370 ADC driver for system monitoring, including charger current, voltage, and temperature. Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Andy Shevchenko Signed-off-by: ChiaEn Wu Link: https://lore.kernel.org/r/81ec58ae89030e48508d6810396de2679c40d26c.1665488982.git.chiaen_wu@richtek.com Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 12 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/mt6370-adc.c | 305 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 318 insertions(+) commit 8d2caf8b98f17f44f76a002ced7c7ce6425652bc Author: Ibrahim Tilki Date: Mon Oct 3 13:59:03 2022 +0300 Documentation: ABI: testing: add max11410 doc Adding documentation for Analog Devices max11410 adc userspace sysfs. Signed-off-by: Ibrahim Tilki Link: https://lore.kernel.org/r/20221003105903.229-4-Ibrahim.Tilki@analog.com Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio-adc-max11410 | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 089ec09f4973898c60c6781c448384bf828e7f45 Author: Ibrahim Tilki Date: Mon Oct 3 13:59:02 2022 +0300 dt-bindings: iio: adc: add adi,max11410.yaml Adding devicetree binding documentation for max11410 adc. Signed-off-by: Ibrahim Tilki Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221003105903.229-3-Ibrahim.Tilki@analog.com Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/adi,max11410.yaml | 177 +++++++++++++++++++++ 1 file changed, 177 insertions(+) commit a44ef7c4609724e2f395d8a24d4a863cd860bbba Author: Ibrahim Tilki Date: Mon Oct 3 13:59:01 2022 +0300 iio: adc: add max11410 adc driver Adding support for max11410 24-bit, 1.9ksps delta-sigma adc which has 3 differential reference and 10 differential channel inputs. Inputs and references can be buffered internally. Inputs can also be amplified with internal PGA. Device has four digital filter modes: FIR50/60, FIR50, FIR60 and SINC4. FIR 50Hz and 60Hz rejections can be enabled/disabled separately. Digital filter selection affects sampling frequency range so driver has to consider the configured filter when configuring sampling frequency. Signed-off-by: Ibrahim Tilki Link: https://lore.kernel.org/r/20221003105903.229-2-Ibrahim.Tilki@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 13 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/max11410.c | 1050 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1064 insertions(+) commit 85250a2400ad43542d02b46b6e269343ea835331 Author: Krzysztof Kozlowski Date: Tue Oct 4 13:56:42 2022 +0200 dt-bindings: iio: resolver: adi,ad2s90: use spi-peripheral-props.yaml For devices connectable by SPI bus (e.g. already using "spi-max-frequency" property), reference the "spi-peripheral-props.yaml" schema to allow using all SPI device properties, even these which device bindings author did not tried yet. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221004115642.63749-8-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/resolver/adi,ad2s90.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e91d40216890874791ee43ef40cc883ba412a84f Author: Krzysztof Kozlowski Date: Tue Oct 4 13:56:41 2022 +0200 dt-bindings: iio: proximity: ams,as3935: use spi-peripheral-props.yaml For devices connectable by SPI bus (e.g. already using "spi-max-frequency" property), reference the "spi-peripheral-props.yaml" schema to allow using all SPI device properties, even these which device bindings author did not tried yet. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221004115642.63749-7-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/proximity/ams,as3935.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 87748b25c65a0fda5f605b7cf07cf9b79b257308 Author: Krzysztof Kozlowski Date: Tue Oct 4 13:56:40 2022 +0200 dt-bindings: iio: pressure: use spi-peripheral-props.yaml For devices connectable by SPI bus (e.g. already using "spi-max-frequency" property), reference the "spi-peripheral-props.yaml" schema to allow using all SPI device properties, even these which device bindings author did not tried yet. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221004115642.63749-6-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml | 5 ++++- Documentation/devicetree/bindings/iio/pressure/murata,zpa2326.yaml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit acce6052cdf9f9fc03f2668f63a1d9e42dc8a424 Author: Krzysztof Kozlowski Date: Tue Oct 4 13:56:39 2022 +0200 dt-bindings: iio: imu: adi,adis16475: use spi-peripheral-props.yaml For devices connectable by SPI bus (e.g. already using "spi-max-frequency" property), reference the "spi-peripheral-props.yaml" schema to allow using all SPI device properties, even these which device bindings author did not tried yet. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20221004115642.63749-5-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d29c7f8ce90d549727d7a07b6096615f26b38e85 Author: Krzysztof Kozlowski Date: Tue Oct 4 13:56:38 2022 +0200 dt-bindings: iio: gyroscope: use spi-peripheral-props.yaml For devices connectable by SPI bus (e.g. already using "spi-max-frequency" property), reference the "spi-peripheral-props.yaml" schema to allow using all SPI device properties, even these which device bindings author did not tried yet. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221004115642.63749-4-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml | 5 ++++- Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit 00407a680e86db4d2fee43250849b7fa205507d3 Author: Krzysztof Kozlowski Date: Tue Oct 4 13:56:37 2022 +0200 dt-bindings: iio: frequency: use spi-peripheral-props.yaml For devices connectable by SPI bus (e.g. already using "spi-max-frequency" property), reference the "spi-peripheral-props.yaml" schema to allow using all SPI device properties, even these which device bindings author did not tried yet. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221004115642.63749-3-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/frequency/adi,adf4350.yaml | 7 +++++-- Documentation/devicetree/bindings/iio/frequency/adi,admv1013.yaml | 5 ++++- Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yaml | 5 ++++- Documentation/devicetree/bindings/iio/frequency/adi,admv4420.yaml | 6 +++++- Documentation/devicetree/bindings/iio/frequency/adi,adrf6780.yaml | 5 ++++- 5 files changed, 22 insertions(+), 6 deletions(-) commit 1b96d663d97da5205526d7020dad5258b88baee2 Author: Krzysztof Kozlowski Date: Tue Oct 4 13:56:36 2022 +0200 dt-bindings: iio: addac: adi,ad74413r: improve example Improve example by: dropping unrelated properties (status and cs-gpios) and using generic node name. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221004115642.63749-2-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d26b79732d27ff45c83109e2484b96dcac223355 Author: Krzysztof Kozlowski Date: Tue Oct 4 13:56:35 2022 +0200 dt-bindings: iio: addac: adi,ad74413r: use spi-peripheral-props.yaml Reference the spi-peripheral-props.yaml schema to allow using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221004115642.63749-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8add74e75ea2a2356d5b4579cacbaef7f4828e35 Author: Nuno Sá Date: Wed Oct 5 10:50:44 2022 +0200 dt-bindings: iio: frequency: change admv4420 maintainer As the maintainer email no longer exists, change it to myself. Signed-off-by: Nuno Sá Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221005085044.204701-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/frequency/adi,admv4420.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b0c44bdb72e99f17b600ba5ba9acc81cf67e335 Author: Nuno Sá Date: Wed Oct 5 10:50:43 2022 +0200 dt-bindings: iio: dac: change ad5766 maintainer As the maintainer email no longer exists, change it to myself. Signed-off-by: Nuno Sá Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221005085044.204701-1-nuno.sa@analog.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cc36cabc669fffa7f04931e3dd25dc47314ec06 Author: Nuno Sá Date: Tue Oct 4 15:49:05 2022 +0200 iio: gyro: itg3200_core: do not use internal iio_dev lock The iio_device lock is only meant for internal use. Hence define a device local lock to protect against concurrent accesses. While at it, properly include "mutex.h" for mutex related APIs. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20221004134909.1692021-13-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/gyro/itg3200_core.c | 10 +++++++--- include/linux/iio/gyro/itg3200.h | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) commit d711a5a7eff4855deb0e2c2663e679dc205e2d9f Author: Nuno Sá Date: Tue Oct 4 15:49:04 2022 +0200 iio: common: scmi_iio: do not use internal iio_dev lock The iio_device lock is only meant for internal use. Hence define a device local lock to protect against concurrent accesses. While at it, properly include "mutex.h" for mutex related APIs. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20221004134909.1692021-12-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/common/scmi_sensors/scmi_iio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4e15cad8dbf9991d430c31166040575bf972b179 Author: Nuno Sá Date: Tue Oct 4 15:49:03 2022 +0200 iio: adc: vf610_adc: vf610_adc: do not use internal iio_dev lock In order to drop the internal lock usage we needed two different things: 1) The first place where 'mlock' was being used was a typical case where iio_device_claim_direct_mode() fits perfectly. 2) In the second case, it was being used to prevent concurrent accesses to the device and shared data but nothing was being enforced with regards to buffering (i.e, there was nothing preventing from changing the conversion mode while buffering). Hence, in this case, a new lock was introduced in the state structure. Note that the goal is not to introduce any functional change and that is the reason why a new lock was introduced to guarantee 2). While at it, properly include "mutex.h" for mutex related APIs. Signed-off-by: Nuno Sá Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/20221004134909.1692021-11-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/vf610_adc.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit f2bdea865e776b571557035eac2e8afde8ea7844 Author: Nuno Sá Date: Tue Oct 4 15:49:02 2022 +0200 iio: adc: vf610_adc: add helper function to read samples This is a precursor change to make it simpler to remove the 'mlock' usage. Having the code in it's own helper function, also makes it easier to read the error paths. Signed-off-by: Nuno Sá Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/20221004134909.1692021-10-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/vf610_adc.c | 94 ++++++++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 40 deletions(-) commit 8433aa3591afff6f4dc641a2e274e6171f66a4b7 Author: Nuno Sá Date: Tue Oct 4 15:49:01 2022 +0200 iio: adc: sc27xx_adc: do not use internal iio_dev lock The iio_device lock is only meant for internal use. Hence define a device local lock to protect against concurrent accesses. While at it, properly include "mutex.h" for mutex related APIs. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20221004134909.1692021-9-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/sc27xx_adc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit bb690935df8dd8f97612b422c669bd1a5fe87096 Author: Nuno Sá Date: Tue Oct 4 15:49:00 2022 +0200 iio: adc: rockchip_saradc: do not use internal iio_dev lock The iio_device lock is only meant for internal use. Hence define a device local lock to protect against concurrent accesses. While at it, properly include "mutex.h" for mutex related APIs. Signed-off-by: Nuno Sá Acked-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221004134909.1692021-8-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/rockchip_saradc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit d0c09264f1a64ba8435acfaa70380f61239fc0d4 Author: Nuno Sá Date: Tue Oct 4 15:48:59 2022 +0200 iio: adc: meson_saradc: do not use internal iio_dev lock The iio_device lock is only meant for internal use. Hence define a device local lock to protect against concurrent accesses. While at it, properly include "mutex.h" for mutex related APIs. Signed-off-by: Nuno Sá Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221004134909.1692021-7-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit da8091f8acfa953ac55e2aa8d4218e49b18206a7 Author: Nuno Sá Date: Tue Oct 4 15:48:58 2022 +0200 iio: adc: ltc2947-core: do not use internal iio_dev lock The iio_device lock is only meant for internal use. Hence define a device local lock to protect against concurrent accesses. While at it, properly include "mutex.h" for mutex related APIs. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20221004134909.1692021-6-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ltc2497-core.c | 7 +++++-- drivers/iio/adc/ltc2497.h | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 98c4fb93d1d448db191eea795a40072dc61da07d Author: Nuno Sá Date: Tue Oct 4 15:48:57 2022 +0200 iio: adc: lpc32xx_adc: do not use internal iio_dev lock The iio_device lock is only meant for internal use. Hence define a device local lock to protect against concurrent accesses. While at it, properly include "mutex.h" for mutex related APIs. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20221004134909.1692021-5-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/lpc32xx_adc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 7dde7ec2a84d598eb755883540d48a5ee73948ec Author: Nuno Sá Date: Tue Oct 4 15:48:56 2022 +0200 iio: adc: imx7d_adc: do not use internal iio_dev lock The iio_device lock is only meant for internal use. Hence define a device local lock to protect against concurrent accesses. While at it, properly include "mutex.h" for mutex related APIs. Signed-off-by: Nuno Sá Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/20221004134909.1692021-4-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/imx7d_adc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit ed3aa67167bed8825993e6483c6dbeae607c1ff9 Author: Nuno Sá Date: Tue Oct 4 15:48:55 2022 +0200 iio: adc: axp288_adc: do not use internal iio_dev lock The iio_device lock is only meant for internal use. Hence define a device local lock to protect against concurrent accesses. While at it, properly include "mutex.h" for mutex related APIs. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20221004134909.1692021-3-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/axp288_adc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 8f347c565df4e8dd2c862a48a3056bfe59d315e9 Author: Nuno Sá Date: Tue Oct 4 15:48:54 2022 +0200 iio: adc: ad799x: do not use internal iio_dev lock 'mlock' was being grabbed when setting the device frequency. In order to not introduce any functional change a new lock is added. With that in mind, the lock also needs to be grabbed in the places where 'mlock' is since it was also being used to protect st->config against the current device state. On the other places the lock was being used, we can just drop it since we are only doing one i2c bus read/write which is already safe. While at it, properly include "mutex.h" for mutex related APIs. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20221004134909.1692021-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad799x.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 3a258747a01f1f21fd4c10a07499bde684f8ca2a Author: Wei Yongjun Date: Wed Sep 21 16:36:20 2022 +0000 iio: adc: ad7124: Silence no spi_device_id warnings SPI devices use the spi_device_id for module autoloading even on systems using device tree, after commit 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT compatible"), kernel warns as follows since the spi_device_id is missing: SPI driver ad7124 has no spi_device_id for adi,ad7124-4 SPI driver ad7124 has no spi_device_id for adi,ad7124-8 Add spi_device_id entries to silence the warnings, and ensure driver module autoloading works. Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20220921163620.805879-6-weiyongjun@huaweicloud.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7124.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 935779eac00aaae02fa61e12c81775e165b11164 Author: Wei Yongjun Date: Wed Sep 21 16:36:19 2022 +0000 iio: adc: ad7192: Silence no spi_device_id warnings SPI devices use the spi_device_id for module autoloading even on systems using device tree, after commit 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT compatible"), kernel warns as follows since the spi_device_id is missing: SPI driver ad7192 has no spi_device_id for adi,ad7190 SPI driver ad7192 has no spi_device_id for adi,ad7193 SPI driver ad7192 has no spi_device_id for adi,ad7195 Add spi_device_id entries to silence the warnings, and ensure driver module autoloading works. Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20220921163620.805879-5-weiyongjun@huaweicloud.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7192.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 283026528e0ee8ea89a60f9addaf0f2eda167c42 Author: Wei Yongjun Date: Wed Sep 21 16:36:18 2022 +0000 iio: adc: ad9467: Silence no spi_device_id warnings SPI devices use the spi_device_id for module autoloading even on systems using device tree, after commit 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT compatible"), kernel warns as follows since the spi_device_id is missing: SPI driver ad9467 has no spi_device_id for adi,ad9265 SPI driver ad9467 has no spi_device_id for adi,ad9434 Add spi_device_id entries to silence the warnings, and ensure driver module autoloading works. Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20220921163620.805879-4-weiyongjun@huaweicloud.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad9467.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 35dab731c4d2b1e71827a56826ef60f53e97fc32 Author: Wei Yongjun Date: Wed Sep 21 16:36:17 2022 +0000 iio: accel: sca3300: Silence no spi_device_id warning SPI devices use the spi_device_id for module autoloading even on systems using device tree, after commit 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT compatible"), kernel warns as follows since the spi_device_id is missing: SPI driver sca3300 has no spi_device_id for murata,scl3300 Add spi_device_id entries to silence the warning, and ensure driver module autoloading works. Signed-off-by: Wei Yongjun Reviewed-by: Tomas Melin Link: https://lore.kernel.org/r/20220921163620.805879-3-weiyongjun@huaweicloud.com Signed-off-by: Jonathan Cameron drivers/iio/accel/sca3300.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 4eb61e1a3338d0f8c9f7a28b72f3289cc92133c6 Author: Wei Yongjun Date: Wed Sep 21 16:36:16 2022 +0000 iio: adc: ti-ads131e08: Silence no spi_device_id warnings SPI devices use the spi_device_id for module autoloading even on systems using device tree, after commit 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT compatible"), kernel warns as follows since the spi_device_id is missing: SPI driver ads131e08 has no spi_device_id for ti,ads131e04 SPI driver ads131e08 has no spi_device_id for ti,ads131e06 Add spi_device_id entries to silence the warnings, and ensure driver module autoloading works. Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20220921163620.805879-2-weiyongjun@huaweicloud.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads131e08.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 55e00b871ce2fc5689af7991638e5889dcd2ea7a Author: Yang Yingliang Date: Tue Sep 27 14:48:41 2022 +0800 iio: multiplexer: 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 Link: https://lore.kernel.org/r/20220927064841.319291-1-yangyingliang@huawei.com Signed-off-by: Jonathan Cameron drivers/iio/multiplexer/iio-mux.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 85e2c6a23f851f65b2b14c1d87685168be620f87 Author: Mårten Lindahl Date: Mon Sep 26 11:19:00 2022 +0200 iio: light: vcnl4000: Add ps_it attributes for vcnl4040 Add read/write attribute for proximity integration time, and read attribute for available proximity integration times for the vcnl4040 chip. Signed-off-by: Mårten Lindahl Link: https://lore.kernel.org/r/20220926091900.1724105-3-marten.lindahl@axis.com Signed-off-by: Jonathan Cameron drivers/iio/light/vcnl4000.c | 131 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 3 deletions(-) commit e21b5b1f26694a4498ca11a15e09ccc0a72abb81 Author: Mårten Lindahl Date: Mon Sep 26 11:18:59 2022 +0200 iio: light: vcnl4000: Preserve conf bits when toggle power As the vcnl4040 and vcnl4200 chip uses runtime power management for turning the ambient light and proximity sensors on/off, it overwrites the entire register each time. In ALS_CONF register bit fields ALS_IT, ALS_PERS, ALS_INT_EN are overwritten. In PS_CONF1 register bit fields PS_DUTY, PS_PERS, PS_IT, PS_HD, and PS_INT are overwritten. Add functions for preserving the affected bit fields when changing power state. Signed-off-by: Mårten Lindahl Link: https://lore.kernel.org/r/20220926091900.1724105-2-marten.lindahl@axis.com Signed-off-by: Jonathan Cameron drivers/iio/light/vcnl4000.c | 54 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) commit 3f4033a811bcd1a1f077ce5297488a5c4dd30eb1 Author: Wei Yongjun Date: Thu Sep 22 11:58:48 2022 +0000 iio: filter: admv8818: close potential out-of-bounds read in __admv8818_read_[h|l]pf_freq() ADMV8818_SW_IN_WR0_MSK and ADMV8818_SW_OUT_WR0_MSK have 3 bits, which means a length of 8, but freq_range_hpf and freq_range_lpf array size is 4, may end up reading 4 elements beyond the end of those arrays. Check value first before access freq_range_hpf and freq_range_lpf to harden against the hardware allowing out of range values. Signed-off-by: Wei Yongjun Reviewed-by: Antoniu Miclaus Link: https://lore.kernel.org/r/20220922115848.1800021-1-weiyongjun@huaweicloud.com Signed-off-by: Jonathan Cameron drivers/iio/filter/admv8818.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8cf5f0329128efdfe18f12a8697752d39821fbdf Author: Marcus Folkesson Date: Thu Sep 22 21:46:39 2022 +0200 iio: adc: mcp3911: add support to set PGA Add support for setting the Programmable Gain Amplifiers by adjust the scale value. Signed-off-by: Marcus Folkesson Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220922194639.1118971-1-marcus.folkesson@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/adc/mcp3911.c | 104 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 80 insertions(+), 24 deletions(-) commit 4e6151403631255828a5530d9d6233caedcd2976 Author: Crt Mori Date: Thu Sep 22 10:13:24 2022 +0200 iio: temperature: mlx90632 Change return value of sensor measurement channel The current EINVAL value is more applicable to embedded library, where user can actually put the fixed value to the sensor. In case of the driver if the value of the channel is invalid it is better in inform userspace that Channel was out of range as that implies more to internal driver error than invalid input. It also makes for easier debugging of where the error comes from during the development. Signed-off-by: Crt Mori Link: https://lore.kernel.org/r/565d4df2592d751dc0f40908f2569b7c9af8e56e.1663834141.git.cmo@melexis.com Signed-off-by: Jonathan Cameron drivers/iio/temperature/mlx90632.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eff07b20700a55e5b39e76960934d6eeb56a12d9 Author: Crt Mori Date: Thu Sep 22 10:13:23 2022 +0200 iio: temperature: mlx90632 Read sampling frequency Allow users to read sensor sampling frequency to better plan the application measurement requests. Signed-off-by: Crt Mori Link: https://lore.kernel.org/r/0bd6d6d665b4bd39e4565f6f44cb1bdc03386e23.1663834141.git.cmo@melexis.com Signed-off-by: Jonathan Cameron drivers/iio/temperature/mlx90632.c | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 2aebc223fc7ce613140ef2b64ca3c0f1a4f458cb Author: Crt Mori Date: Thu Sep 22 10:13:22 2022 +0200 iio: temperature: mlx90632 Add runtime powermanagement modes The sensor can operate in lower power modes and even make measurements when in those lower powered modes. The decision was taken that if measurement is not requested within 2 seconds the sensor will remain in SLEEP_STEP power mode, where measurements are triggered on request with setting the start of measurement bit (SOB). In this mode the measurements are taking a bit longer because we need to start it and complete it. Currently, in continuous mode we read ready data and this mode is activated if sensor measurement is requested within 2 seconds. The suspend timeout is increased to 6 seconds (instead of 3 before), because that enables more measurements in lower power mode (SLEEP_STEP), with the lowest refresh rate (2 seconds). Signed-off-by: Crt Mori Link: https://lore.kernel.org/r/be405068f081f2d518843897b13cd0289c280b5d.1663834141.git.cmo@melexis.com Signed-off-by: Jonathan Cameron drivers/iio/temperature/mlx90632.c | 377 ++++++++++++++++++++++++++++++------- 1 file changed, 309 insertions(+), 68 deletions(-) commit 2a22b40aea42dd516e669257ab5faf10396c2fad Author: Yuan Can Date: Wed Sep 21 02:39:15 2022 +0000 iio: accel: bma400: Switch to use dev_err_probe() helper In the probe path, dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20220921023915.47300-1-yuancan@huawei.com Signed-off-by: Jonathan Cameron drivers/iio/accel/bma400_core.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 20228a1d5a55e7db0c6720840f2c7d2b48c55f69 Author: Nuno Sá Date: Tue Sep 20 13:28:07 2022 +0200 iio: adc: ad_sigma_delta: do not use internal iio_dev lock Drop 'mlock' usage by making use of iio_device_claim_direct_mode(). This change actually makes sure we cannot do a single conversion while buffering is enable. Note there was a potential race in the previous code since we were only acquiring the lock after checking if the bus is enabled. Fixes: af3008485ea0 ("iio:adc: Add common code for ADI Sigma Delta devices") Signed-off-by: Nuno Sá Reviewed-by: Miquel Raynal Cc: #No rush as race is very old. Link: https://lore.kernel.org/r/20220920112821.975359-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad_sigma_delta.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c0e3acdcdeb14099765de38224dfe0ad019c8482 Author: Srinivas Pandruvada Date: Wed Nov 16 15:14:59 2022 -0800 thermal: intel: hfi: ACK HFI for the same timestamp Some processors issue more than one HFI interrupt with the same timestamp. Each interrupt must be acknowledged to let the hardware issue new HFI interrupts. But this can't be done without some additional flow modification in the existing interrupt handling. For background, the HFI interrupt is a package level thermal interrupt delivered via a LVT. This LVT is common for both the CPU and package level interrupts. Hence, all CPUs receive the HFI interrupts. But only one CPU should process interrupt and others simply exit by issuing EOI to LAPIC. The current HFI interrupt processing flow: 1. Receive Thermal interrupt 2. Check if there is an active HFI status in MSR_IA32_THERM_STATUS 3. Try and get spinlock, one CPU will enter spinlock and others will simply return from here to issue EOI. (Let's assume CPU 4 is processing interrupt) 4. Check the stored time-stamp from the HFI memory time-stamp 5. if same 6. ignore interrupt, unlock and return 7. Copy the HFI message to local buffer 8. unlock spinlock 9. ACK HFI interrupt 10. Queue the message for processing in a work-queue It is tempting to simply acknowledge all the interrupts even if they have the same timestamp. This may cause some interrupts to not be processed. Let's say CPU5 is slightly late and reaches step 4 while CPU4 is between steps 8 and 9. Currently we simply ignore interrupts with the same timestamp. No issue here for CPU5. When CPU4 acknowledges the interrupt, the next HFI interrupt can be delivered. If we acknowledge interrupts with the same timestamp (at step 6), there is a race condition. Under the same scenario, CPU 5 will acknowledge the HFI interrupt. This lets hardware generate another HFI interrupt, before CPU 4 start executing step 9. Once CPU 4 complete step 9, it will acknowledge the newly arrived HFI interrupt, without actually processing it. Acknowledge the interrupt when holding the spinlock. This avoids contention of the interrupt acknowledgment. Updated flow: 1. Receive HFI Thermal interrupt 2. Check if there is an active HFI status in MSR_IA32_THERM_STATUS 3. Try and get spin-lock Let's assume CPU 4 is processing interrupt 4.1 Read MSR_IA32_PACKAGE_THERM_STATUS and check HFI status bit 4.2 If hfi status is 0 4.3 unlock spinlock 4.4 return 4.5 Check the stored time-stamp from the HFI memory time-stamp 5. if same 6.1 ACK HFI Interrupt, 6.2 unlock spinlock 6.3 return 7. Copy the HFI message to local buffer 8. ACK HFI interrupt 9. unlock spinlock 10. Queue the message for processing in a work-queue To avoid taking the lock unnecessarily, intel_hfi_process_event() checks the status of the HFI interrupt before taking the lock. If CPU5 is late, when it starts processing the interrupt there are two scenarios: a) CPU4 acknowledged the HFI interrupt before CPU5 read MSR_IA32_THERM_STATUS. CPU5 exits. b) CPU5 reads MSR_IA32_THERM_STATUS before CPU4 has acknowledged the interrupt. CPU5 will take the lock if CPU4 has released it. It then re-reads MSR_IA32_THERM_STATUS. If there is not a new interrupt, the HFI status bit is clear and CPU5 exits. If a new HFI interrupt was generated it will find that the status bit is set and it will continue to process the interrupt. In this case even if timestamp is not changed, the ACK can be issued as this is a new interrupt. Signed-off-by: Srinivas Pandruvada Reviewed-by: Ricardo Neri Tested-by: Arshad, Adeel Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/intel_hfi.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 930d06bf071aa746db11d68d2d75660b449deff3 Author: Srinivas Pandruvada Date: Tue Nov 15 18:54:17 2022 -0800 thermal: intel: Protect clearing of thermal status bits The clearing of the package thermal status is done by Read-Modify-Write operation. This may result in clearing of some new status bits which are being or about to be processed. For example, while clearing of HFI status, after read of thermal status register, a new thermal status bit is set by the hardware. But during write back, the newly generated status bit will be set to 0 or cleared. So, it is not safe to do read-modify-write. Since thermal status Read-Write bits can be set to only 0 not 1, it is safe to set all other bits to 1 which are not getting cleared. Create a common interface for clearing package thermal status bits. Use this interface to replace existing code to clear thermal package status bits. It is safe to call from different CPUs without protection as there is no read-modify-write. Also wrmsrl results in just single instruction. For example while CPU 0 and CPU 3 are clearing bit 1 and 3 respectively. If CPU 3 wins the race, it will write 0x4000aa2, then CPU 1 will write 0x4000aa8. The bits which are not part of clear are set to 1. The default mask for bits, which can be written here is 0x4000aaa. Signed-off-by: Srinivas Pandruvada Reviewed-by: Ricardo Neri Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/intel_hfi.c | 8 ++------ drivers/thermal/intel/therm_throt.c | 23 ++++++++++++----------- drivers/thermal/intel/thermal_interrupt.h | 6 ++++++ drivers/thermal/intel/x86_pkg_temp_thermal.c | 9 ++------- 4 files changed, 22 insertions(+), 24 deletions(-) commit 6fe1e64b60269aa58fa00568807738025ae3bd05 Author: Srinivas Pandruvada Date: Tue Nov 15 18:54:16 2022 -0800 thermal: intel: Prevent accidental clearing of HFI status When there is a package thermal interrupt with PROCHOT log, it will be processed and cleared. It is possible that there is an active HFI event status, which is about to get processed or getting processed. While clearing PROCHOT log bit, it will also clear HFI status bit. This means that hardware is free to update HFI memory. When clearing a package thermal interrupt, some processors will generate a "general protection fault" when any of the read only bit is set to 1. The driver maintains a mask of all read-write bits which can be set. This mask doesn't include HFI status bit. This bit will also be cleared, as it will be assumed read-only bit. So, add HFI status bit 26 to the mask. Signed-off-by: Srinivas Pandruvada Reviewed-by: Ricardo Neri Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/therm_throt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2613cc29c5723881ca603b1a3b50f0107010d5d6 Author: Pierre Gondois Date: Wed Nov 16 10:49:58 2022 +0100 cacheinfo: Remove of_node_put() for fw_token fw_token is used for DT/ACPI systems to identify CPUs sharing caches. For DT based systems, fw_token is set to a pointer to a DT node. commit 3da72e18371c ("cacheinfo: Decrement refcount in cache_setup_of_node()") doesn't increment the refcount of fw_token anymore in cache_setup_of_node(). fw_token is indeed used as a token and not as a (struct device_node*), so no reference to fw_token should be kept. However, [1] is triggered when hotplugging a CPU multiple times since cache_shared_cpu_map_remove() decrements the refcount to fw_token at each CPU unplugging, eventually reaching 0. Remove of_node_put() for fw_token in cache_shared_cpu_map_remove(). [1] ------------[ cut here ]------------ refcount_t: saturated; leaking memory. WARNING: CPU: 4 PID: 32 at lib/refcount.c:22 refcount_warn_saturate (lib/refcount.c:22 (discriminator 3)) Modules linked in: CPU: 4 PID: 32 Comm: cpuhp/4 Tainted: G W 6.1.0-rc1-14091-g9fdf2ca7b9c8 #76 Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Oct 31 2022 pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : refcount_warn_saturate (lib/refcount.c:22 (discriminator 3)) lr : refcount_warn_saturate (lib/refcount.c:22 (discriminator 3)) [...] Call trace: [...] of_node_release (drivers/of/dynamic.c:335) kobject_put (lib/kobject.c:677 lib/kobject.c:704 ./include/linux/kref.h:65 lib/kobject.c:721) of_node_put (drivers/of/dynamic.c:49) free_cache_attributes.part.0 (drivers/base/cacheinfo.c:712) cacheinfo_cpu_pre_down (drivers/base/cacheinfo.c:718) cpuhp_invoke_callback (kernel/cpu.c:247 (discriminator 4)) cpuhp_thread_fun (kernel/cpu.c:785) smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) kthread (kernel/kthread.c:376) ret_from_fork (arch/arm64/kernel/entry.S:861) ---[ end trace 0000000000000000 ]--- Fixes: 3da72e18371c ("cacheinfo: Decrement refcount in cache_setup_of_node()") Reported-by: Geert Uytterhoeven Reported-by: Marek Szyprowski Tested-by: Geert Uytterhoeven Tested-by: Sudeep Holla Reviewed-by: Sudeep Holla Signed-off-by: Pierre Gondois Link: https://lore.kernel.org/r/20221116094958.2141072-1-pierre.gondois@arm.com Signed-off-by: Greg Kroah-Hartman drivers/base/cacheinfo.c | 2 -- 1 file changed, 2 deletions(-) commit 02cd3032b154fa02fdf90e7467abaeed889330b2 Author: Yang Yingliang Date: Fri Nov 11 22:54:40 2022 +0800 cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter() If device_register() fails in cxl_pci_afu|adapter(), the device is not added, device_unregister() can not be called in the error path, otherwise it will cause a null-ptr-deref because of removing not added device. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So split device_unregister() into device_del() and put_device(), then goes to put dev when register fails. Fixes: f204e0b8cedd ("cxl: Driver code for powernv PCIe based cards for userspace access") Signed-off-by: Yang Yingliang Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Link: https://lore.kernel.org/r/20221111145440.2426970-2-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/misc/cxl/pci.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 61c80d1c3833e196256fb060382db94f24d3d9a7 Author: Yang Yingliang Date: Fri Nov 11 22:54:39 2022 +0800 cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter() If device_register() fails in cxl_register_afu|adapter(), the device is not added, device_unregister() can not be called in the error path, otherwise it will cause a null-ptr-deref because of removing not added device. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So split device_unregister() into device_del() and put_device(), then goes to put dev when register fails. Fixes: 14baf4d9c739 ("cxl: Add guest-specific code") Signed-off-by: Yang Yingliang Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Link: https://lore.kernel.org/r/20221111145440.2426970-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/misc/cxl/guest.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit fa1ba41c17cd786925720bc1a9554d6c6624923d Author: Peng Wu Date: Tue Nov 15 09:11:38 2022 +0000 firmware: google: fix a NULL vs IS_ERR() check in cbmem_entry_probe() The devm_memremap() function returns error pointers on error, it doesn't return NULL. Fixes: 19d54020883c ("firmware: google: Implement cbmem in sysfs driver") Signed-off-by: Peng Wu Reviewed-by: Guenter Roeck Reviewed-by: Jack Rosenthal Link: https://lore.kernel.org/r/20221115091138.51614-1-wupeng58@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/cbmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab760791c0cfbb1d7a668f46a135264f56c8f018 Author: D Scott Phillips Date: Mon Nov 14 13:22:12 2022 -0800 char: misc: Increase the maximum number of dynamic misc devices to 1048448 On AmpereOne, 128 dynamic misc devices is not enough for the per-cpu coresight_tmc devices. Switch the dynamic minors allocator to an ida and add logic to allocate in the ranges [0..127] and [256..1048575], leaving [128..255] for static misc devices. Dynamic allocations start from 127 growing downwards and then increasing from 256, so device numbering for the first 128 devices remain the same as before. Signed-off-by: D Scott Phillips Link: https://lore.kernel.org/r/20221114212212.9279-1-scott@os.amperecomputing.com Signed-off-by: Greg Kroah-Hartman drivers/char/misc.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) commit 7b51161696e803fd5f9ad55b20a64c2df313f95c Author: Yang Yingliang Date: Thu Nov 17 15:06:36 2022 +0800 firmware: raspberrypi: fix possible memory leak in rpi_firmware_probe() In rpi_firmware_probe(), if mbox_request_channel() fails, the 'fw' will not be freed through rpi_firmware_delete(), fix this leak by calling kfree() in the error path. Fixes: 1e7c57355a3b ("firmware: raspberrypi: Keep count of all consumers") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221117070636.3849773-1-yangyingliang@huawei.com Acked-by: Joel Savitz Signed-off-by: Greg Kroah-Hartman drivers/firmware/raspberrypi.c | 1 + 1 file changed, 1 insertion(+) commit 3127a86a3702bd3a2ff43503d49919d666739ae8 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:40 2022 +0100 misc: ds1682: 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-487-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/ds1682.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 781edb0530a1009f89e7888726ca87b255d2526b Author: Uwe Kleine-König Date: Fri Nov 18 23:43:39 2022 +0100 misc: bh1770glc: 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-486-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/bh1770glc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9f28b675c160519c79daed9f73bc38ab3d6c9015 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:37 2022 +0100 misc: apds9802als: 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-484-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/apds9802als.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6757c6480d7f34cb272d28339dfac096b94c8638 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:38 2022 +0100 misc: apds990x: 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-485-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/apds990x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 244179dbe11e707a0ef596246a9b80327492fc35 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:42 2022 +0100 misc: eeprom/idt_89hpesx: 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-489-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/idt_89hpesx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db687ce71845aeb639be7452f4d8a272cf190cd1 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:46 2022 +0100 misc: isl29003: 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-493-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/isl29003.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9c18dad44dc1de202a69c8ccef983e6070740acd Author: Uwe Kleine-König Date: Fri Nov 18 23:43:45 2022 +0100 misc: ics932s401: 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-492-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/ics932s401.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 654700c9fc2860d33d57b42fd39cae2310dbc2ba Author: Uwe Kleine-König Date: Fri Nov 18 23:43:44 2022 +0100 misc: hmc6352: 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-491-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/hmc6352.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 99b0cb3f5f8d67f4552c24d9b0aa6cda38f558aa Author: Uwe Kleine-König Date: Fri Nov 18 23:43:43 2022 +0100 misc: eeprom/max6875: 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-490-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/max6875.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 327e1ad186d91b12b6ece0b21178c07edef01806 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:47 2022 +0100 misc: isl29020: 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-494-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/isl29020.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8427bd8bdee8f35797cade56fe173fbea990e38c Author: Uwe Kleine-König Date: Fri Nov 18 23:43:49 2022 +0100 misc: tsl2550: 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-496-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/tsl2550.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 59ee8ca4eeda35d850e4c81ec3065dba10023842 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:41 2022 +0100 misc: eeprom/eeprom: 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-488-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/eeprom.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7198cf0f1ca90581f27452664216a662ad72aed5 Author: Uwe Kleine-König Date: Fri Nov 18 23:43:48 2022 +0100 misc: lis3lv02d/lis3lv02d_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 Link: https://lore.kernel.org/r/20221118224540.619276-495-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 643a16a0eb1d6ac23744bb6e90a00fc21148a9dc Author: Zheng Wang Date: Thu Nov 10 11:50:33 2022 +0800 misc: sgi-gru: fix use-after-free error in gru_set_context_option, gru_fault and gru_handle_user_call_os In some bad situation, the gts may be freed gru_check_chiplet_assignment. The call chain can be gru_unload_context->gru_free_gru_context->gts_drop and kfree finally. However, the caller didn't know if the gts is freed or not and use it afterwards. This will trigger a Use after Free bug. Fix it by introducing a return value to see if it's in error path or not. Free the gts in caller if gru_check_chiplet_assignment check failed. Fixes: 55484c45dbec ("gru: allow users to specify gru chiplet 2") Signed-off-by: Zheng Wang Acked-by: Dimitri Sivanich Link: https://lore.kernel.org/r/20221110035033.19498-1-zyytlz.wz@163.com Signed-off-by: Greg Kroah-Hartman drivers/misc/sgi-gru/grufault.c | 13 +++++++++++-- drivers/misc/sgi-gru/grumain.c | 22 ++++++++++++++++++---- drivers/misc/sgi-gru/grutables.h | 2 +- 3 files changed, 30 insertions(+), 7 deletions(-) commit fd2c930cf6a5b9176382c15f9acb1996e76e25ad Author: ruanjinjie Date: Thu Nov 17 14:47:25 2022 +0800 misc: tifm: fix possible memory leak in tifm_7xx1_switch_media() If device_register() returns error in tifm_7xx1_switch_media(), name of kobject which is allocated in dev_set_name() called in device_add() is leaked. Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Fixes: 2428a8fe2261 ("tifm: move common device management tasks from tifm_7xx1 to tifm_core") Signed-off-by: ruanjinjie Link: https://lore.kernel.org/r/20221117064725.3478402-1-ruanjinjie@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/misc/tifm_7xx1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dbb4f0235a450f22e518124cbf9b922802ce38f Author: Andy Shevchenko Date: Wed Nov 16 18:29:56 2022 +0200 virt: acrn: Mark the uuid field as unused After the commits for userspace (see Link tags below) the uuid field is not being used in the ACRN code. Update kernel to reflect these changes, i.e. do the following: - adding a comment explaining that it's not used anymore - replacing the specific type by a raw buffer - updating the example code accordingly The advertised field confused users and actually never been used. So the wrong part here is that kernel puts something which userspace never used and hence this may confuse a reader of this code. Note, that there is only a single tool that had been prepared a year ago for these forthcoming changes in the kernel. Link: https://github.com/projectacrn/acrn-hypervisor/commit/da0d24326ed6 Link: https://github.com/projectacrn/acrn-hypervisor/commit/bb0327e70097 Signed-off-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221116162956.72658-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman include/uapi/linux/acrn.h | 5 ++--- samples/acrn/vm-sample.c | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) commit e68a558fb2af06daa38f86dad25061ddd90ab131 Author: Samuel Thibault Date: Fri Nov 18 02:22:06 2022 +0100 speakup: Fix building as extmod spk_priv_keyinfo.h should be opened from the speakup directory. When building as extmod we should thus open it from the module directory rather than the main Linux source. Signed-off-by: Samuel Thibault  Link: https://lore.kernel.org/r/20221118012206.j6hq6b6nfx2jhqg6@begin Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/Makefile | 4 +++- drivers/accessibility/speakup/makemapdata.c | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) commit 27158c72678b39ee01cc01de1aba6b51c71abe2f Author: Yang Yingliang Date: Mon Nov 21 23:43:39 2022 +0800 ocxl: fix pci device refcount leak when calling get_function_0() get_function_0() calls pci_get_domain_bus_and_slot(), as comment says, it returns a pci device with refcount increment, so after using it, pci_dev_put() needs be called. Get the device reference when get_function_0() is not called, so pci_dev_put() can be called in the error path and callers unconditionally. And add comment above get_dvsec_vendor0() to tell callers to call pci_dev_put(). Fixes: 87db7579ebd5 ("ocxl: control via sysfs whether the FPGA is reloaded on a link reset") Suggested-by: Andrew Donnellan Signed-off-by: Yang Yingliang Acked-by: Andrew Donnellan Link: https://lore.kernel.org/r/20221121154339.4088935-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/misc/ocxl/config.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit a4cb1004aeed2ab893a058fad00a5b41a12c4691 Author: Yang Yingliang Date: Fri Nov 11 22:59:29 2022 +0800 misc: ocxl: fix possible name leak in ocxl_file_register_afu() If device_register() returns error in ocxl_file_register_afu(), the name allocated by dev_set_name() need be freed. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanup(), and info is freed in info_release(). Fixes: 75ca758adbaf ("ocxl: Create a clear delineation between ocxl backend & frontend") Signed-off-by: Yang Yingliang Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Link: https://lore.kernel.org/r/20221111145929.2429271-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/misc/ocxl/file.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7610615e8cdb3f6f5bbd9d8e7a5d8a63e3cabf2e Author: Zhengchao Shao Date: Sat Nov 19 11:57:21 2022 +0800 test_firmware: fix memory leak in test_firmware_init() When misc_register() failed in test_firmware_init(), the memory pointed by test_fw_config->name is not released. The memory leak information is as follows: unreferenced object 0xffff88810a34cb00 (size 32): comm "insmod", pid 7952, jiffies 4294948236 (age 49.060s) hex dump (first 32 bytes): 74 65 73 74 2d 66 69 72 6d 77 61 72 65 2e 62 69 test-firmware.bi 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 n............... backtrace: [] __kmalloc_node_track_caller+0x4b/0xc0 [] kstrndup+0x46/0xc0 [] __test_firmware_config_init+0x29/0x380 [test_firmware] [] 0xffffffffa040f068 [] do_one_initcall+0x141/0x780 [] do_init_module+0x1c3/0x630 [] load_module+0x623e/0x76a0 [] __do_sys_finit_module+0x181/0x240 [] do_syscall_64+0x39/0xb0 [] entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: c92316bf8e94 ("test_firmware: add batched firmware tests") Signed-off-by: Zhengchao Shao Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/20221119035721.18268-1-shaozhengchao@huawei.com Signed-off-by: Greg Kroah-Hartman lib/test_firmware.c | 1 + 1 file changed, 1 insertion(+) commit 72b8ec15f97bbabbb2379c87cb5f7a9dc63f0d88 Author: Mushahid Hussain Date: Tue Nov 15 15:05:30 2022 +0500 accessibility: speakup: phonetic spelling while arrowing letter by letter This patch includes an enhancement requested frequently on the mailing list.[1][2] It adds a variable, cur_phonetic in the spk_vars, which can be set as a module parameter, as well as in /sys/speakup/cur_phonetic. This patch also documents cur_phonetic as a sysfs attribute in sysfs-driver-speakup. When cur_phonetic=1, it causes speakup to speak letters phonetically if paused on the character while arrowing through a word. When a user does not set cur_phonetic to any value, the default value for it would be 0. [1]: https://github.com/linux-speakup/speakup/issues/6 [2]: https://github.com/linux-speakup/speakup/issues/5 since V1: - removed unnecessary lines Signed-off-by: Mushahid Hussain Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221115100530.91174-3-mushi.shar@gmail.com Signed-off-by: Greg Kroah-Hartman Documentation/ABI/stable/sysfs-driver-speakup | 9 +++++++++ drivers/accessibility/speakup/kobjects.c | 3 +++ drivers/accessibility/speakup/main.c | 14 +++++++++++--- drivers/accessibility/speakup/speakup.h | 1 + drivers/accessibility/speakup/spk_types.h | 2 +- drivers/accessibility/speakup/varhandlers.c | 1 + 6 files changed, 26 insertions(+), 4 deletions(-) commit f43241aafedb1c7d72825cea1a521cef183ee61d Author: Mushahid Hussain Date: Tue Nov 15 15:05:29 2022 +0500 accessibility: speakup: Specify spk_vars among module parameters This is an enhancement which allows setting default variables for speakup module at the boot rather than setting the sys variables after the boot. Signed-off-by: Mushahid Hussain Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221115100530.91174-2-mushi.shar@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/main.c | 60 ++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 13 deletions(-) commit a606dd6253b8de8dc81a1112ab702edfe7a98d72 Author: Osama Muhammad Date: Thu Nov 10 02:51:08 2022 +0500 Accessiblity: speakup_acntsa: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding default variables to the speakup_acntsa module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-16-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_acntsa.c | 37 ++++++++++++++++++++------ 1 file changed, 29 insertions(+), 8 deletions(-) commit cf0b4652d6acaed768b81b153872476a10b7db3b Author: Osama Muhammad Date: Thu Nov 10 02:51:07 2022 +0500 Accessiblity: speakup_acntpc: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding default variables to the speakup_acntpc module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-15-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_acntpc.c | 38 ++++++++++++++++++++------ 1 file changed, 30 insertions(+), 8 deletions(-) commit dfa6c10c89f8e9d001d649201bd5a5d821c23c36 Author: Osama Muhammad Date: Thu Nov 10 02:51:06 2022 +0500 Accessiblity: speakup_txprt: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding a default variables to the speakup_txprt module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Link: https://lore.kernel.org/r/20221109215108.7933-14-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_txprt.c | 45 ++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 8 deletions(-) commit 9744f41fe0879eb971a5cab950f7022ac49c0a92 Author: Osama Muhammad Date: Thu Nov 10 02:51:05 2022 +0500 Accessiblity: speakup_spkout: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding default variables to the speakup_spkout module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-13-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_spkout.c | 43 ++++++++++++++++++++------ 1 file changed, 34 insertions(+), 9 deletions(-) commit 88dce45b3282647ac0b2916d4820956cd239a1e9 Author: Osama Muhammad Date: Thu Nov 10 02:51:04 2022 +0500 Accessiblity: speakup_ltlk: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding default variables to the speakup_ltlk module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-12-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_ltlk.c | 53 ++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 11 deletions(-) commit 031c122f8950f939b715781dadea0b7659f1ea3b Author: Osama Muhammad Date: Thu Nov 10 02:51:03 2022 +0500 Accessiblity: speakup_keypc: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding default variables to the speakup_keypc module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-11-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_keypc.c | 29 +++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit 81188dd195788a1b314570c5d901a88de2179cf4 Author: Osama Muhammad Date: Thu Nov 10 02:51:02 2022 +0500 Accessiblity: speakup_dummy: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding default variables to the speakup_dummy module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-10-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_dummy.c | 53 +++++++++++++++++++++------ 1 file changed, 42 insertions(+), 11 deletions(-) commit 251ca7da3087361d25bfd05e23ebd711e82ccf20 Author: Osama Muhammad Date: Thu Nov 10 02:51:01 2022 +0500 Accessiblity: speakup_dtlk: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding default variables to the speakup_dtlk module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-9-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_dtlk.c | 50 ++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 11 deletions(-) commit 44d3e977dd361f4491bd5adc31f32ca13243703b Author: Osama Muhammad Date: Thu Nov 10 02:51:00 2022 +0500 Accessiblity: speakup_dectlk: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding a default variables to the speakup_dectlk module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-8-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_dectlk.c | 45 ++++++++++++++++++++------ 1 file changed, 35 insertions(+), 10 deletions(-) commit b75cfeb116de5894a2e7cc6f8bcf53c4910a7c6f Author: Osama Muhammad Date: Thu Nov 10 02:50:59 2022 +0500 Accessiblity: speakup_decpc: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding default variables to the speakup_decpc module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-7-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_decpc.c | 48 +++++++++++++++++++++------ 1 file changed, 38 insertions(+), 10 deletions(-) commit f613f00eb046970f20f4abe1ab8b26c1424a4f5a Author: Osama Muhammad Date: Thu Nov 10 02:50:58 2022 +0500 Accessiblity: speakup_decext: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding a default variables to the speakup_decext module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-6-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_decext.c | 44 ++++++++++++++++++++------ 1 file changed, 34 insertions(+), 10 deletions(-) commit 95892c4e70f391955dcd69dd25bd6be8f888590f Author: Osama Muhammad Date: Thu Nov 10 02:50:57 2022 +0500 Accessiblity: speakup_bns: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding default variables to the speakup_bns module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-5-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_bns.c | 36 ++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) commit d5dab7ff97b8370d8bf406d9be2113b1df7d2f0c Author: Osama Muhammad Date: Thu Nov 10 02:50:56 2022 +0500 Accessiblity: speakup_audptr: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding a default variables to the speakup_audptr module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-4-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_audptr.c | 42 ++++++++++++++++++++------ 1 file changed, 33 insertions(+), 9 deletions(-) commit 5e3e27f040ec3611db14a5efe23c9108831c38be Author: Osama Muhammad Date: Thu Nov 10 02:50:55 2022 +0500 Accessiblity: speakup_apollo: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding default variables to the speakup_apollo module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-3-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_apollo.c | 46 +++++++++++++++++++++----- 1 file changed, 37 insertions(+), 9 deletions(-) commit b9bf27386dddab16bc455124c54cbeea6cb9a1ca Author: Osama Muhammad Date: Thu Nov 10 02:50:54 2022 +0500 Accessiblity: speakup_soft: specifying the default driver parameters among the module params This is an enhancement which allows to specify the default driver parameters among the module parameters. Adding default variables to the speakup_soft module allows to easily set that at boot, rather than setting the sys variables after boot. More details can be found here: https://github.com/linux-speakup/speakup/issues/7 Signed-off-by: Osama Muhammad Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221109215108.7933-2-osmtendev@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/accessibility/speakup/speakup_soft.c | 59 ++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 16 deletions(-) commit 5f115bb92a631b01bee7ca2310c6c353a770656e Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:46 2022 +0000 dt-bindings: slimbus: qcom,slim-ngd: convert to DT schema Convert the Qualcomm SoC SLIMBus Non Generic Device (NGD) controller bindings to DT Schema. During conversion add iommus already present in DTS and extend the example based on SDM845. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-13-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/slimbus/qcom,slim-ngd.yaml | 120 +++++++++++++++++++++ .../bindings/slimbus/slim-ngd-qcom-ctrl.txt | 82 -------------- 2 files changed, 120 insertions(+), 82 deletions(-) commit 717bd3dfc4ced0a12bc177b267a0c6fd23eec620 Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:45 2022 +0000 dt-bindings: slimbus: qcom,slim: convert to DT schema Convert the Qualcomm SoC SLIMbus controller bindings to DT Schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-12-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/slimbus/qcom,slim.yaml | 86 ++++++++++++++++++++++ .../devicetree/bindings/slimbus/slim-qcom-ctrl.txt | 36 --------- 2 files changed, 86 insertions(+), 36 deletions(-) commit c53627f83abc9fb4ac5cbd9dc1c898008bcc2ac8 Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:44 2022 +0000 dt-bindings: slimbus: convert bus description to DT schema Convert the SLIMbus bus description bindings to DT Schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/slimbus/bus.txt | 60 -------------- .../bindings/slimbus/slim-ngd-qcom-ctrl.txt | 2 - .../devicetree/bindings/slimbus/slim-qcom-ctrl.txt | 3 - .../devicetree/bindings/slimbus/slimbus.yaml | 95 ++++++++++++++++++++++ 4 files changed, 95 insertions(+), 65 deletions(-) commit 319a538d618fea33434387c4502361bb8f047e11 Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:43 2022 +0000 slimbus: qcom-ngd-ctrl: reinit the reconf completion flag Reinitialize the reconf completion flag when ngd registers are not retainied or when enumeration is lost for ngd. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/slimbus/qcom-ngd-ctrl.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1d01bcb4659cfca87d92075b87cdadb0a9897d14 Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:42 2022 +0000 slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource() Simplify the code with devm_platform_get_and_ioremap_resource(). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/slimbus/qcom-ngd-ctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3d58b933c9eb2da5745c485bc7008d29c0eaddac Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:41 2022 +0000 slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname() Simplify the code with devm_platform_ioremap_resource_byname(). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/slimbus/qcom-ctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8c8112d7c442579cca821836bbcc46b747ceca74 Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:40 2022 +0000 slimbus: qcom-ctrl: drop unneeded qcom,apq8064-slim compatible Bindings require usage of fallback "qcom,slim" compatible, so "qcom,apq8064-slim" is redundant. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/slimbus/qcom-ctrl.c | 1 - 1 file changed, 1 deletion(-) commit a82b1ec34e9bea94058f429560e311e5ca634356 Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:39 2022 +0000 slimbus: stream: add checks for invalid unprepare/disable usage slim_disable_stream() and slim_stream_unprepare() are exported, so add sanity checks preventing unmatched/invalid calls. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/slimbus/stream.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4594cb4b76c6cf9acf81d3044c6a6817ed4a3781 Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:38 2022 +0000 slimbus: qcom-ngd-ctrl: add support for 44.1 Khz frequency Add support for 44.1Khz frequency by dynamically calculating the slimbus parameters instead of statically defining them. Co-developed-by: Prudhvi Yarlagadda Signed-off-by: Prudhvi Yarlagadda Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/slimbus/qcom-ngd-ctrl.c | 64 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 5 deletions(-) commit 434d25728171aa72ed1b1c4d248527cbf6b6c99b Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:37 2022 +0000 slimbus: stream: handle unsupported bitrates for presence rate Handle errors of getting presence rate for unsupported stream bitrate, instead of sending -EINVAL in change content message. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/slimbus/stream.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 63c60a226c908f46589b57b5bcb220ca82a76cc5 Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:36 2022 +0000 slimbus: qcom-ngd-ctrl: drop PM runtime counter on transfer error paths If transfer in qcom_slim_ngd_xfer_msg_sync() fails, we need to drop the PM runtime usage counter to have it balanced. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/slimbus/qcom-ngd-ctrl.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 97e1a5309190aca528c7e12697a898bda793a460 Author: Krzysztof Kozlowski Date: Fri Nov 18 06:52:35 2022 +0000 slimbus: qcom-ngd-ctrl: check for device runtime PM status during ISR Slimbus core interrupt is getting fired after suspend. At this point ADSP slimbus hardware is off with gated clocks which is leading to an unclocked access when HLOS slimbus tried to read the interrupt status register in the ISR. Co-developed-by: Chandana Kishori Chiluveru Signed-off-by: Chandana Kishori Chiluveru Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118065246.6835-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/slimbus/qcom-ngd-ctrl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ce9c0b06abc44d51e81ce36b83a81e960034f3ee Author: Miquel Raynal Date: Fri Nov 18 06:39:32 2022 +0000 dt-bindings: nvmem: add YAML schema for the ONIE tlv layout Add a schema for the ONIE tlv NVMEM layout that can be found on any ONIE compatible networking device. Describe all the possible NVMEM cells that can be produced by this layout parser. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-14-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman .../bindings/nvmem/layouts/nvmem-layout.yaml | 1 + .../bindings/nvmem/layouts/onie,tlv-layout.yaml | 147 +++++++++++++++++++++ 2 files changed, 148 insertions(+) commit b6c88f10e8bb20f0ccaabe4c0a4ac3c6c1fb8768 Author: Miquel Raynal Date: Fri Nov 18 06:39:31 2022 +0000 dt-bindings: vendor-prefixes: Add ONIE As described on their website (see link below), "The Open Network Install Environment (ONIE) is an open source initiative that defines an open “install environment” for modern networking hardware." It is not a proper corporation per-se but rather more a group which tries to spread the use of open source standards in the networking hardware world. Link: https://opencomputeproject.github.io/onie/ Signed-off-by: Miquel Raynal Acked-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-13-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit e33cfae0eff66dca02ed482cf3ef01bb61f84fb0 Author: Michael Walle Date: Fri Nov 18 06:39:30 2022 +0000 dt-bindings: nvmem: add YAML schema for the sl28 vpd layout Add a schema for the NVMEM layout on Kontron's sl28 boards. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-12-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman .../bindings/nvmem/layouts/kontron,sl28-vpd.yaml | 64 ++++++++++++++++++++++ .../bindings/nvmem/layouts/nvmem-layout.yaml | 3 + 2 files changed, 67 insertions(+) commit ca104926184db10d486e91e64cec725e6c2bd8ae Author: Miquel Raynal Date: Fri Nov 18 06:39:29 2022 +0000 dt-bindings: eeprom: Inherit from nvmem.yaml EEPROMs can be nvmem providers. Let's make all EEPROM bindings reference nvmem.yaml as they should, so that nvmem cells and layout parsers can be safely described within the EEPROM nodes. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/eeprom/at24.yaml | 5 ++++- Documentation/devicetree/bindings/eeprom/at25.yaml | 1 + Documentation/devicetree/bindings/eeprom/microchip,93lc46b.yaml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) commit 27dfc44e1ba30d2d49675e21918bf4b3b3b59fa6 Author: Miquel Raynal Date: Fri Nov 18 06:39:28 2022 +0000 dt-bindings: nvmem: Introduce the nvmem-layout container The nvmem devices description works like this: * Most cases (EEPROM & co): eeprom@x { compatible = ""; ... }; * MTD case: flash@y { compatible = ""; ... otp { compatible = "user-otp"; /* or "factory-otp" */ ... }; }; In the former case, the nvmem device is "eeprom@x", while in the latter case the nvmem device is "otp". Nvmem devices can produce nvmem cells. The current way to describe nvmem cells is to locate them by providing their static byte and bit offset and length. These information are stored in subnodes of the nvmem device. It is now a fact that such description does not fit more advanced use cases where the location or the size of the cells may vary. There are currently three known situations which require being described differently: Kontron's SL28 VPD, ONIE's TLV table and U-Boot's environment variables. Hence, we need a way to describe the parsers that must be used in order to make the dynamic discovery of the nvmem cells. This new description must fit both use cases (the generic situation and the MTD case). Let's create in both cases a container node named nvmem-layout whose content will depend on the parser. Right now nvmem-layout.yaml is "empty", but references to additional layout parser bindings will be inserted in the near future. The final goal being something that looks like: * Most cases (EEPROM & co): eeprom@x { compatible = ""; ... nvmem-layout { compatible = ""; ... }; }; * MTD case: flash@y { compatible = ""; ... otp { compatible = "user-otp"; /* or "factory-otp" */ ... nvmem-layout { compatible = ""; ... }; }; }; Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman .../bindings/nvmem/layouts/nvmem-layout.yaml | 30 ++++++++++++++++++++++ Documentation/devicetree/bindings/nvmem/nvmem.yaml | 7 +++++ 2 files changed, 37 insertions(+) commit ada84d07af6097b2addd18262668ce6cb9e15206 Author: Rafał Miłecki Date: Fri Nov 18 06:39:27 2022 +0000 nvmem: u-boot-env: add Broadcom format support Broadcom uses U-Boot for a lot of their bcmbca familiy chipsets. They decided to store U-Boot environment data inside U-Boot partition and to use a custom header (with "uEnv" magic and env data length). Add support for Broadcom's specific binding and their custom format. Ref: 6b0584c19d87 ("dt-bindings: nvmem: u-boot,env: add Broadcom's variant binding") Signed-off-by: Rafał Miłecki Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/u-boot-env.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit fb817c4ef63e8cfb6e77ae4a2875ae854c80708f Author: Colin Ian King Date: Fri Nov 18 06:39:26 2022 +0000 nvmem: Kconfig: Fix spelling mistake "controlls" -> "controls" There is a spelling mistake in a Kconfig description. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42b868b032901075f8e9bdcd8d700cb9c0d03ba5 Author: Miquel Raynal Date: Fri Nov 18 06:39:25 2022 +0000 dt-bindings: nvmem: Fix example Despite not being listed nor required within the top level nvmem yaml file, the "compatible" property is mandatory and is actually enforced by all the nvmem provider bindings. Unfortunately, the lack of compatible in the nvmem.yaml to level description file lead to the example not matching anything and thus not being checked at all. Let's pick a compatible almost randomly (one which is already used with the qfprom label) to make the example at least valid on a semantic point of view and getting it checked. Signed-off-by: Miquel Raynal Acked-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/nvmem.yaml | 1 + 1 file changed, 1 insertion(+) commit 06aac0e11960a7ddccc1888326b5906d017e0f24 Author: Jiangshan Yi Date: Fri Nov 18 06:39:24 2022 +0000 nvmem: stm32: fix spelling typo in comment Fix spelling typo in comment. Reported-by: k2ci Signed-off-by: Jiangshan Yi Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/stm32-romem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 107548adf89d581d1271cb2c81858bc793930306 Author: Patrick Delaunay Date: Fri Nov 18 06:39:23 2022 +0000 dt-bindings: nvmem: add new stm32mp13 compatible for stm32-romem Add a new compatible for stm32mp13 support. Acked-by: Rob Herring Signed-off-by: Patrick Delaunay Reviewed-by: Fabrice Gasnier Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml | 1 + 1 file changed, 1 insertion(+) commit a3816a7d7c097c1da46aad5f5d1e229b607dce04 Author: Patrick Delaunay Date: Fri Nov 18 06:39:22 2022 +0000 nvmem: stm32: add nvmem type attribute Inform NVMEM framework of type attribute for stm32-romem as NVMEM_TYPE_OTP so userspace is able to know how the data is stored in BSEC. Signed-off-by: Patrick Delaunay Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/stm32-romem.c | 1 + 1 file changed, 1 insertion(+) commit d61784e6410f3df2028e6eb91b06ffed37a660e0 Author: Patrick Delaunay Date: Fri Nov 18 06:39:21 2022 +0000 nvmem: stm32: add warning when upper OTPs are updated As the upper OTPs are ECC protected, they support only one 32 bits word programming. For a second modification of this word, these ECC become invalid and this OTP will be no more accessible, the shadowed value is invalid. This patch adds a warning to indicate an upper OTP update, because this operation is dangerous as OTP is not locked by the driver after the first update to avoid a second update. Signed-off-by: Patrick Delaunay Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/stm32-romem.c | 3 +++ 1 file changed, 3 insertions(+) commit fbfc4ca465a1f8d81bf2d67d95bf7fc67c3cf0c2 Author: Patrick Delaunay Date: Fri Nov 18 06:39:20 2022 +0000 nvmem: stm32: move STM32MP15_BSEC_NUM_LOWER in config Support STM32MP15_BSEC_NUM_LOWER in stm32 romem config to prepare the next SoC in STM32MP family. Signed-off-by: Patrick Delaunay Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221118063932.6418-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/nvmem/stm32-romem.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit e6278a5445780c71cc3dfc6ceda2875838eac8e5 Author: Cédric Le Goater Date: Tue Nov 22 14:46:43 2022 +0100 virtio_console: Introduce an ID allocator for virtual console numbers When a virtio console port is initialized, it is registered as an hvc console using a virtual console number. If a KVM guest is started with multiple virtio console devices, the same vtermno (or virtual console number) can be used to allocate different hvc consoles, which leads to various communication problems later on. This is also reported in debugfs : # grep vtermno /sys/kernel/debug/virtio-ports/* /sys/kernel/debug/virtio-ports/vport1p1:console_vtermno: 1 /sys/kernel/debug/virtio-ports/vport2p1:console_vtermno: 1 /sys/kernel/debug/virtio-ports/vport3p1:console_vtermno: 2 /sys/kernel/debug/virtio-ports/vport4p1:console_vtermno: 3 Replace the next_vtermno global with an ID allocator and start the allocation at 1 as it is today. Also recycle IDs when a console port is removed. Signed-off-by: Cédric Le Goater Reviewed-by: Thomas Huth Link: https://lore.kernel.org/r/20221122134643.376184-1-clg@kaod.org Signed-off-by: Greg Kroah-Hartman drivers/char/virtio_console.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit adc40221bf676f3e722d135889a7b913b4162dc2 Author: Yuma Ueda Date: Fri Nov 18 22:36:31 2022 +0900 scripts/kallsyms.c Make the comment up-to-date with current implementation The comment in scripts/kallsyms.c describing the usage of scripts/kallsyms does not reflect the latest implementation. Fix the comment to be equivalent to what the usage() function prints. Signed-off-by: Yuma Ueda Reviewed-by: Miguel Ojeda Link: https://lore.kernel.org/r/20221118133631.4554-1-cyan@0x00a1e9.dev Signed-off-by: Greg Kroah-Hartman scripts/kallsyms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c002f04c0bc79ec00d4beb75fb631d5bf37419bd Author: Eli Billauer Date: Thu Nov 17 09:18:25 2022 +0200 char: xillybus: Fix trivial bug with mutex @unit_mutex protects @unit from being freed, so obviously it should be released after @unit is used, and not before. This is a follow-up to commit 282a4b71816b ("char: xillybus: Prevent use-after-free due to race condition") which ensures, among others, the protection of @private_data after @unit_mutex has been released. Reported-by: Hyunwoo Kim Signed-off-by: Eli Billauer Link: https://lore.kernel.org/r/20221117071825.3942-1-eli.billauer@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/char/xillybus/xillybus_class.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0ef77698b85603d21453daf32ae70f76ae62ccae Author: Alexander Usyskin Date: Wed Nov 16 14:47:35 2022 +0200 mei: bus-fixup: change pxp mode only if message was sent Move PXP mode state machine to SETUP mode only if memory ready message sent successfully to the firmware. Leave it in INIT mode otherwise to allow try to send message later. Signed-off-by: Alexander Usyskin Link: https://lore.kernel.org/r/20221116124735.2493847-3-alexander.usyskin@intel.com Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus-fixup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 83f47eea742c1152c237398fc040ceba04fc5d76 Author: Alexander Usyskin Date: Wed Nov 16 14:47:34 2022 +0200 mei: add timeout to send When driver wakes up the firmware from the low power state, it is sending a memory ready message. The send is done via synchronous/blocking function to ensure that firmware is in ready state. However, in case of firmware undergoing reset send might be block forever. To address this issue a timeout is added to blocking write command on the internal bus. Introduce the __mei_cl_send_timeout function to use instead of __mei_cl_send in cases where timeout is required. The mei_cl_write has only two callers and there is no need to split it into two functions. Signed-off-by: Alexander Usyskin Link: https://lore.kernel.org/r/20221116124735.2493847-2-alexander.usyskin@intel.com Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus-fixup.c | 7 +++++-- drivers/misc/mei/bus.c | 22 +++++++++++++++++++++- drivers/misc/mei/client.c | 20 ++++++++++++++++---- drivers/misc/mei/client.h | 2 +- drivers/misc/mei/main.c | 2 +- drivers/misc/mei/mei_dev.h | 2 ++ 6 files changed, 46 insertions(+), 9 deletions(-) commit 6865788f5ad998f261e37f6b029d61d3bb7dc373 Author: Andra Paraschiv Date: Tue Nov 8 20:59:12 2022 +0200 MAINTAINERS: Update entries from the Nitro Enclaves section Update the list of maintainers for the Nitro Enclaves project. Alex (lexnv@) is not working at Amazon anymore and there will be the same case for me starting with 2023. Add a reference to the mailing list of the Nitro Enclaves development team. Signed-off-by: Andra Paraschiv Acked-by: Alexandru Vasile Link: https://lore.kernel.org/r/20221108185912.15792-1-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 08c9d2f56178db6e6642895f0744119d67d7fbfe Merge: e246e4691f5f 5562c6a9657e Author: Greg Kroah-Hartman Date: Wed Nov 23 19:37:24 2022 +0100 Merge tag 'mhi-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: "MHI Host: Core: - Use mhi_soc_reset() API for resetting the modem in case of crash. - Fixed a race condition between mhi_prepare_channel() and M0 state transition. This can happen when mhi_prepare_channel() was updating the read/write pointers and in parallel, the mhi_pm_m0_transition() rings the doorbell of all channels without checking if it was enabled or not. Fixed the race by ringing the doorbell only for the enabled channels in mhi_pm_m0_transition(). pci_generic: - Added a secondary "AT" port using the OEM reserved channel of Telit FN990 modem. - Added support for a SDX55 variant modem that exists in the Qualcomm SC8280XP Compute Reference Design (CRD). - Added support for a T99W175 variant modem manufactured by HP. The modem uses the same configuration as of T99W175, but with a different VID:PID. - Added local definitions for some VIDs (Thales and Quectel). MAINTAINERS: - Removed Hemant from MHI MAINTAINERS list since he left Qualcomm and expressed his wish to not continue doing reviews for MHI patches." * tag 'mhi-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: pci_generic: Add definition for some VIDs bus: mhi: host: pci_generic: Add HP variant of T99W175 bus: mhi: host: pci_generic: add support for sc8280xp-crd SDX55 variant MAINTAINERS: Remove Hemant from MHI bus bus: mhi: host: pci_generic: Add a secondary AT port to Telit FN990 bus: mhi: host: Fix race between channel preparation and M0 event bus: mhi: host: Use mhi_soc_reset() API in place of register write commit 05e6b4313755742a179cc2315da5dd58df552f7d Author: Sudeep Holla Date: Wed Nov 16 07:49:30 2022 +0000 ACPI: processor: Silence missing prototype warnings Silence the following warnings when built with W=1: | CC drivers/acpi/acpi_processor.c | warning: no previous prototype for 'arch_register_cpu' [-Wmissing-prototypes] | int __weak arch_register_cpu(int cpu) | ^ | CC drivers/acpi/acpi_processor.c | warning: no previous prototype for 'arch_unregister_cpu' [-Wmissing-prototypes] | void __weak arch_unregister_cpu(int cpu) {} | ^ Reported-by: kernel test robot Signed-off-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki include/acpi/processor.h | 5 +++++ 1 file changed, 5 insertions(+) commit 314363737cc92246f8d709292e86e147ab8b3fb0 Author: Sudeep Holla Date: Wed Nov 16 07:49:27 2022 +0000 ACPI: processor_idle: Silence missing prototype warnings Silence the following warnings when built with W=1: | CC drivers/acpi/processor_idle.c | warning: no previous prototype for 'acpi_processor_ffh_lpi_probe' [-Wmissing-prototypes] | int __weak acpi_processor_ffh_lpi_probe(unsigned int cpu) | ^ | CC drivers/acpi/processor_idle.c | warning: no previous prototype for 'acpi_processor_ffh_lpi_enter' [-Wmissing-prototypes] | int __weak acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi) | ^ Reported-by: kernel test robot Signed-off-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki include/acpi/processor.h | 5 +++++ 1 file changed, 5 insertions(+) commit e246e4691f5f3af2a2ded07f863675c7b4ef8891 Merge: 210a671cc304 ee31d5038c06 Author: Greg Kroah-Hartman Date: Wed Nov 23 19:36:19 2022 +0100 Merge tag 'fpga-for-6.2-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.2-rc1 Zynq: - Yang's change Switch to use dev_err_probe() helper Lattice: - Ivan's change add support for Lattice Sysconfig FPGA reprogrammer All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-next branch). Signed-off-by: Xu Yilun * tag 'fpga-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: dt-bindings: fpga: document Lattice sysCONFIG FPGA manager fpga: lattice-sysconfig-spi: add Lattice sysCONFIG FPGA manager fpga: zynq: Switch to use dev_err_probe() helper commit d96d30d836380e3b4cb64625d4a1ebe79b796ec5 Author: Sudeep Holla Date: Wed Nov 16 07:49:29 2022 +0000 ACPI: PM: Silence missing prototype warning Silence the following warning when built with W=1: | CC drivers/acpi/device_pm.c | warning: no previous prototype for function 'acpi_subsys_restore_early' [-Wmissing-prototypes] | int acpi_subsys_restore_early(struct device *dev) | ^ Reported-by: kernel test robot Signed-off-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki include/linux/acpi.h | 2 ++ 1 file changed, 2 insertions(+) commit 9dc5f12f95e00fb0e0500ea4a8da0c0f29e718cb Author: Andy Shevchenko Date: Tue Nov 22 15:36:00 2022 +0200 device property: Add a blank line in Kconfig of tests Seems the blank line to separate entries in Kconfig was missing. Add it. Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221122133600.49897-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/base/test/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4d57b4f215e8ba86c36540eaccd3b17bc5ee39c0 Author: Andy Shevchenko Date: Tue Nov 22 15:35:59 2022 +0200 device property: Rename goto label to be more precise In the fwnode_property_match_string() the goto label out has an additional task. Rename the label to be more precise on what is going to happen if goto it. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221122133600.49897-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/base/property.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c6c76563bd13871739539e20fd3116159e491f5b Author: Andy Shevchenko Date: Tue Nov 22 15:35:58 2022 +0200 device property: Move PROPERTY_ENTRY_BOOL() a bit down Let's order ARRAY and non-ARRAY macros in the same way. The PROPERTY_ENTRY_BOOL() is special, move it a bit down in the code so it won't break ordering of the rest. Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221122133600.49897-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman include/linux/property.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 40eb28dc17f87cfac69d7755447039e92ac5fbda Author: Andy Shevchenko Date: Tue Nov 22 15:35:57 2022 +0200 device property: Get rid of __PROPERTY_ENTRY_ARRAY_EL*SIZE*() First of all, _ELEMENT_SIZE() repeats existing sizeof_field() macro. Second, usage of _ARRAY_ELSIZE_LEN() adds unnecessary indirection to the data layout. It's more understandable when the data structure is placed explicitly. That said, get rid of those macros by replacing them with the existing helper and explicit data structure layout. Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221122133600.49897-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman include/linux/property.h | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) commit e78963f5c528e484910a5c90fa3330dda03212e7 Author: Sudeep Holla Date: Wed Nov 16 07:49:26 2022 +0000 ACPI: APEI: Silence missing prototype warnings Silence the following warnings when make W=1: | CC drivers/acpi/apei/apei-base.c | warning: no previous prototype for 'arch_apei_enable_cmcff' [-Wmissing-prototypes] | int __weak arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, | ^ | CC drivers/acpi/apei/apei-base.c | warning: no previous prototype for 'arch_apei_report_mem_error' [-Wmissing-prototypes] | void __weak arch_apei_report_mem_error(int sev, | ^ Reported-by: kernel test robot Signed-off-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/apei-base.c | 1 + 1 file changed, 1 insertion(+) commit 3223417d1fc44d0a487ad8147b4548f83af24153 Author: Sudeep Holla Date: Wed Nov 16 07:49:28 2022 +0000 ACPI: FFH: Silence missing prototype warnings Silence the following warnings when built with W=1: | CC drivers/acpi/acpi_ffh.c | warning: no previous prototype for 'acpi_ffh_address_space_arch_setup' [-Wmissing-prototypes] | int __weak acpi_ffh_address_space_arch_setup(void *handler_ctxt, | ^ | CC drivers/acpi/acpi_ffh.c | warning: no previous prototype for 'acpi_ffh_address_space_arch_handler' [-Wmissing-prototypes] | int __weak acpi_ffh_address_space_arch_handler(acpi_integer *value, | ^ Reported-by: kernel test robot Signed-off-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki include/linux/acpi.h | 4 ++++ 1 file changed, 4 insertions(+) commit f2ae44ae5335864794acb5b0490746ba9db3ccd7 Author: Hanjun Guo Date: Tue Nov 22 16:53:28 2022 +0800 ACPI: fan: Bail out if extract package failed Bail out if we extract the _FIF package failed, or we will end of referencing the garbage information in fields[], the fan control will be in mess, fix it. Fiexes: d445571fa369 ("ACPI: fan: Optimize struct acpi_fan_fif") Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki drivers/acpi/fan_core.c | 1 + 1 file changed, 1 insertion(+) commit 24b3e3dd9c9c742a4dd18e71b6963f9e7ab72911 Author: Randy Dunlap Date: Fri Nov 11 19:14:56 2022 -0800 kernfs: fix all kernel-doc warnings and multiple typos Fix kernel-doc warnings. Many of these are about a function's return value, so use the kernel-doc Return: format to fix those Use % prefix on numeric constant values. dir.c: fix typos/spellos file.c fix typo: s/taret/target/ Fix all of these kernel-doc warnings: dir.c:305: warning: missing initial short description on line: * kernfs_name_hash dir.c:137: warning: No description found for return value of 'kernfs_path_from_node_locked' dir.c:196: warning: No description found for return value of 'kernfs_name' dir.c:224: warning: No description found for return value of 'kernfs_path_from_node' dir.c:292: warning: No description found for return value of 'kernfs_get_parent' dir.c:312: warning: No description found for return value of 'kernfs_name_hash' dir.c:404: warning: No description found for return value of 'kernfs_unlink_sibling' dir.c:588: warning: No description found for return value of 'kernfs_node_from_dentry' dir.c:806: warning: No description found for return value of 'kernfs_find_ns' dir.c:879: warning: No description found for return value of 'kernfs_find_and_get_ns' dir.c:904: warning: No description found for return value of 'kernfs_walk_and_get_ns' dir.c:927: warning: No description found for return value of 'kernfs_create_root' dir.c:996: warning: No description found for return value of 'kernfs_root_to_node' dir.c:1016: warning: No description found for return value of 'kernfs_create_dir_ns' dir.c:1048: warning: No description found for return value of 'kernfs_create_empty_dir' dir.c:1306: warning: No description found for return value of 'kernfs_next_descendant_post' dir.c:1568: warning: No description found for return value of 'kernfs_remove_self' dir.c:1630: warning: No description found for return value of 'kernfs_remove_by_name_ns' dir.c:1667: warning: No description found for return value of 'kernfs_rename_ns' file.c:66: warning: No description found for return value of 'of_on' file.c:88: warning: No description found for return value of 'kernfs_deref_open_node_locked' file.c:1036: warning: No description found for return value of '__kernfs_create_file' inode.c:100: warning: No description found for return value of 'kernfs_setattr' mount.c:160: warning: No description found for return value of 'kernfs_root_from_sb' mount.c:198: warning: No description found for return value of 'kernfs_node_dentry' mount.c:302: warning: No description found for return value of 'kernfs_super_ns' mount.c:318: warning: No description found for return value of 'kernfs_get_tree' symlink.c:28: warning: No description found for return value of 'kernfs_create_link' Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Tejun Heo Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221112031456.22980-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman fs/kernfs/dir.c | 82 +++++++++++++++++++++++++++------------------ fs/kernfs/file.c | 18 ++++++---- fs/kernfs/inode.c | 8 ++--- fs/kernfs/kernfs-internal.h | 2 +- fs/kernfs/mount.c | 10 ++++-- fs/kernfs/symlink.c | 2 +- 6 files changed, 74 insertions(+), 48 deletions(-) commit e335beed78ec82656dcb554f9fe560709f0dc408 Author: Wang ShaoBo Date: Fri Nov 18 14:32:19 2022 +0800 ACPI: pfr_update: use ACPI_FREE() to free acpi_object acpi_evaluate_dsm_typed()/acpi_evaluate_dsm() should be coupled with ACPI_FREE() to free the ACPI memory, because we need to track the allocation of acpi_object when ACPI_DBG_TRACK_ALLOCATIONS enabled, so use ACPI_FREE() instead of kfree(). Fixes: 0db89fa243e5 ("ACPI: Introduce Platform Firmware Runtime Update device driver") Signed-off-by: Wang ShaoBo Reviewed-by: Chen Yu Signed-off-by: Rafael J. Wysocki drivers/acpi/pfr_update.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0f2aa7fc2a9aee05bafb965d5b1638d3e74b4c61 Author: Wang ShaoBo Date: Fri Nov 18 14:32:18 2022 +0800 ACPI: pfr_telemetry: use ACPI_FREE() to free acpi_object acpi_evaluate_dsm_typed()/acpi_evaluate_dsm() should be coupled with ACPI_FREE() to free the ACPI memory, because we need to track the allocation of acpi_object when ACPI_DBG_TRACK_ALLOCATIONS enabled, so use ACPI_FREE() instead of kfree(). Fixes: b0013e037a8b ("ACPI: Introduce Platform Firmware Runtime Telemetry driver") Signed-off-by: Wang ShaoBo Reviewed-by: Chen Yu Signed-off-by: Rafael J. Wysocki drivers/acpi/pfr_telemetry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6c0eb5ba3500f6da367351ff3c4452c029cb72fa Author: Dawei Li Date: Mon Nov 14 00:26:09 2022 +0800 ACPI: make remove callback of ACPI driver void For bus-based driver, device removal is implemented as: 1 device_remove()-> 2 bus->remove()-> 3 driver->remove() Driver core needs no inform from callee(bus driver) about the result of remove callback. In that case, commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned. Now we have the situation that both 1 & 2 of calling chain are void-returned, so it does not make much sense for 3(driver->remove) to return non-void to its caller. So the basic idea behind this change is making remove() callback of any bus-based driver to be void-returned. This change, for itself, is for device drivers based on acpi-bus. Acked-by: Uwe Kleine-König Acked-by: Lee Jones Acked-by: Dmitry Torokhov Reviewed-by: Hans de Goede Signed-off-by: Dawei Li Reviewed-by: Maximilian Luz # for drivers/platform/surface/* Signed-off-by: Rafael J. Wysocki arch/ia64/hp/common/aml_nfw.c | 4 ++-- arch/x86/platform/olpc/olpc-xo15-sci.c | 3 +-- drivers/acpi/ac.c | 8 +++----- drivers/acpi/acpi_pad.c | 3 +-- drivers/acpi/acpi_video.c | 8 +++----- drivers/acpi/battery.c | 5 ++--- drivers/acpi/button.c | 5 ++--- drivers/acpi/ec.c | 5 ++--- drivers/acpi/hed.c | 3 +-- drivers/acpi/nfit/core.c | 3 +-- drivers/acpi/sbs.c | 9 ++++----- drivers/acpi/sbshc.c | 7 +++---- drivers/acpi/thermal.c | 7 +++---- drivers/acpi/tiny-power-button.c | 10 +++++++--- drivers/char/sonypi.c | 3 +-- drivers/char/tpm/tpm_crb.c | 4 +--- drivers/hv/vmbus_drv.c | 4 +--- drivers/hwmon/acpi_power_meter.c | 5 ++--- drivers/hwmon/asus_atk0110.c | 6 ++---- drivers/input/misc/atlas_btns.c | 4 +--- drivers/net/fjes/fjes_main.c | 4 +--- drivers/platform/chrome/chromeos_privacy_screen.c | 3 +-- drivers/platform/chrome/wilco_ec/event.c | 4 +--- drivers/platform/surface/surfacepro3_button.c | 3 +-- drivers/platform/x86/asus-laptop.c | 3 +-- drivers/platform/x86/asus-wireless.c | 3 +-- drivers/platform/x86/classmate-laptop.c | 20 +++++++++----------- drivers/platform/x86/dell/dell-rbtn.c | 6 ++---- drivers/platform/x86/eeepc-laptop.c | 3 +-- drivers/platform/x86/fujitsu-laptop.c | 4 +--- drivers/platform/x86/fujitsu-tablet.c | 3 +-- drivers/platform/x86/intel/rst.c | 4 +--- drivers/platform/x86/lg-laptop.c | 4 +--- drivers/platform/x86/panasonic-laptop.c | 8 +++----- drivers/platform/x86/sony-laptop.c | 9 +++------ drivers/platform/x86/system76_acpi.c | 4 +--- drivers/platform/x86/topstar-laptop.c | 3 +-- drivers/platform/x86/toshiba_acpi.c | 4 +--- drivers/platform/x86/toshiba_bluetooth.c | 6 +++--- drivers/platform/x86/toshiba_haps.c | 4 +--- drivers/platform/x86/wireless-hotkey.c | 3 +-- drivers/platform/x86/xo15-ebook.c | 3 +-- drivers/ptp/ptp_vmw.c | 3 +-- drivers/thermal/intel/intel_menlow.c | 8 +++----- drivers/video/backlight/apple_bl.c | 3 +-- drivers/watchdog/ni903x_wdt.c | 4 +--- drivers/xen/xen-acpi-pad.c | 3 +-- include/acpi/acpi_bus.h | 2 +- 48 files changed, 88 insertions(+), 149 deletions(-) commit 6d7d3c287410c0ad499e478e2338dc3d7e3392b1 Author: Huisong Li Date: Sat Nov 12 10:05:28 2022 +0800 mailbox: pcc: Reset pcc_chan_count to zero in case of PCC probe failure Currently, 'pcc_chan_count' is remains set to a non-zero value if PCC subspaces are parsed successfully but something else fail later during the initial PCC probing phase. This will result in pcc_mbox_request_channel trying to access the resources that are not initialised or allocated and may end up in a system crash. Reset pcc_chan_count to 0 when the PCC probe fails in order to prevent the possible issue as described above. Fixes: ce028702ddbc ("mailbox: pcc: Move bulk of PCCT parsing into pcc_mbox_probe") Signed-off-by: Huisong Li Reviewed-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/mailbox/pcc.c | 1 + 1 file changed, 1 insertion(+) commit a10b1c99e2dccee69838b512419843c21b2b87f8 Author: Huisong Li Date: Sat Nov 12 10:05:27 2022 +0800 ACPI: PCC: Setup PCC Opregion handler only if platform interrupt is available Currently, PCC OpRegion handler depends on the availability of platform interrupt to be functional currently. If it is not available, the OpRegion can't be executed successfully or the desired outcome won't be possible. So let's reject setting up the PCC OpRegion handler on the platform if it doesn't support or have platform interrupt available. Signed-off-by: Huisong Li Reviewed-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_pcc.c | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) commit 2dac1a159216b39ced8d78dba590c5d2f4249586 Author: Pavel Begunkov Date: Wed Nov 23 11:33:42 2022 +0000 io_uring: remove iopoll spinlock This reverts commit 2ccc92f4effcfa1c51c4fcf1e34d769099d3cad4 io_req_complete_post() should now behave well even in case of IOPOLL, we can remove completion_lock locking. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7e171c8b530656b14a671c59100ca260e46e7f2a.1669203009.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1bec951c3809051f64a6957fe86d1b4786cc0313 Author: Pavel Begunkov Date: Wed Nov 23 11:33:41 2022 +0000 io_uring: iopoll protect complete_post io_req_complete_post() may be used by iopoll enabled rings, grab locks in this case. That requires to pass issue_flags to propagate the locking state. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/cc6d854065c57c838ca8e8806f707a226b70fd2d.1669203009.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 21 +++++++++++++++------ io_uring/io_uring.h | 10 ++++++++-- io_uring/kbuf.c | 4 ++-- io_uring/poll.c | 2 +- io_uring/uring_cmd.c | 2 +- 5 files changed, 27 insertions(+), 12 deletions(-) commit fa18fa2272c7469e470dcb7bf838ea50a25494ca Author: Pavel Begunkov Date: Wed Nov 23 11:33:40 2022 +0000 io_uring: inline __io_req_complete_put() Inline __io_req_complete_put() into io_req_complete_post(), there are no other users. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1923a4dfe80fa877f859a22ed3df2d5fc8ecf02b.1669203009.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 833b5dfffc26c81835ce38e2a5df9ac5fa142735 Author: Pavel Begunkov Date: Wed Nov 23 11:33:39 2022 +0000 io_uring: remove io_req_tw_post_queue Remove io_req_tw_post() and io_req_tw_post_queue(), we can use io_req_task_complete() instead. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b9b73c08022c7f1457023ac841f35c0100e70345.1669203009.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 12 ------------ io_uring/io_uring.h | 8 +++++++- io_uring/timeout.c | 6 +++--- 3 files changed, 10 insertions(+), 16 deletions(-) commit 624fd779fd869bdcb2c0ccca0f09456eed71ed52 Author: Pavel Begunkov Date: Wed Nov 23 11:33:38 2022 +0000 io_uring: use io_req_task_complete() in timeout Use a more generic io_req_task_complete() in timeout completion task_work instead of io_req_complete_post(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bda1710b58c07bf06107421c2a65c529ea9cdcac.1669203009.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/timeout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e276ae344a770f91912a81c6a338d92efd319be2 Author: Pavel Begunkov Date: Wed Nov 23 11:33:37 2022 +0000 io_uring: hold locks for io_req_complete_failed A preparation patch, make sure we always hold uring_lock around io_req_complete_failed(). The only place deviating from the rule is io_cancel_defer_files(), queue a tw instead. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/70760344eadaecf2939287084b9d4ba5c05a6984.1669203009.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2ccc92f4effcfa1c51c4fcf1e34d769099d3cad4 Author: Pavel Begunkov Date: Wed Nov 23 11:33:36 2022 +0000 io_uring: add completion locking for iopoll There are pieces of code that may allow iopoll to race filling cqes, temporarily add spinlocking around posting events. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/84d86b5c117feda075471c5c9e65208e0dccf5d0.1669203009.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 85168d416e5d3184b77dbec8fee75c9439894afa Author: Bart Van Assche Date: Wed Nov 23 09:29:23 2022 -0800 blk-crypto: Add a missing include directive Allow the compiler to verify consistency of function declarations and function definitions. This patch fixes the following sparse errors: block/blk-crypto-profile.c:241:14: error: no previous prototype for ‘blk_crypto_get_keyslot’ [-Werror=missing-prototypes] 241 | blk_status_t blk_crypto_get_keyslot(struct blk_crypto_profile *profile, | ^~~~~~~~~~~~~~~~~~~~~~ block/blk-crypto-profile.c:318:6: error: no previous prototype for ‘blk_crypto_put_keyslot’ [-Werror=missing-prototypes] 318 | void blk_crypto_put_keyslot(struct blk_crypto_keyslot *slot) | ^~~~~~~~~~~~~~~~~~~~~~ block/blk-crypto-profile.c:344:6: error: no previous prototype for ‘__blk_crypto_cfg_supported’ [-Werror=missing-prototypes] 344 | bool __blk_crypto_cfg_supported(struct blk_crypto_profile *profile, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ block/blk-crypto-profile.c:373:5: error: no previous prototype for ‘__blk_crypto_evict_key’ [-Werror=missing-prototypes] 373 | int __blk_crypto_evict_key(struct blk_crypto_profile *profile, | ^~~~~~~~~~~~~~~~~~~~~~ Cc: Eric Biggers Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221123172923.434339-1-bvanassche@acm.org Signed-off-by: Jens Axboe block/blk-crypto-profile.c | 1 + 1 file changed, 1 insertion(+) commit 1a165a067ffdba66af3a696f49dfab24a0e0449e Author: Uwe Kleine-König Date: Fri Nov 18 23:44:59 2022 +0100 spi: xcomm: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-566-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/spi/spi-xcomm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c7f635bc16cefcd7c7ab6e508b2ae73d66af9ffa Author: Uwe Kleine-König Date: Fri Nov 18 23:44:58 2022 +0100 spi: sc18is602: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-565-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/spi/spi-sc18is602.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 41948bd9cf01394a083d819e92f87e4b87c9c6a3 Merge: f732646d0ccd 662233731d66 Author: Mark Brown Date: Wed Nov 23 17:24:52 2022 +0000 Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into spi-6.2 so we can use the new API in the I2C cleanup. commit c23fdf9e5063d89cfbbd9c89ad7f6fef38bdb9f3 Merge: 3b5b07dde998 662a9bf883f4 Author: Mark Brown Date: Wed Nov 23 17:22:52 2022 +0000 regulator: ROHM BDxxxxx minor print improvements Merge series from Matti Vaittinen : Minor (printing) improvements for ROHM regulator drivers. This series: - Drops an unnecessary info print from bd718x7. (Added a fixes tag for this but not really sure if worth adding to stable) - Convert the ROHM BDxxxxx PMIC regulator drivers to use dev_err_probe(). - Change the probe logic for bd718x7 to favor the more usual devm-style where errors are returned immediately. commit 674b745e22b3caae48ad20422795eefd3f832a7b Author: Ran Tian Date: Wed Nov 23 22:45:14 2022 +0800 cgroup: remove rcu_read_lock()/rcu_read_unlock() in critical section of spin_lock_irq() spin_lock_irq() already disable preempt, so remove rcu_read_lock(). Signed-off-by: Ran Tian Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 2 -- 1 file changed, 2 deletions(-) commit 5f697b25009ccfebede5e42c6693c4b18de11b37 Author: Frank Li Date: Wed Nov 2 10:10:14 2022 -0400 PCI: endpoint: pci-epf-vntb: Fix sparse ntb->reg build warning pci-epf-vntb.c:1128:33: sparse: expected void [noderef] __iomem *base pci-epf-vntb.c:1128:33: sparse: got struct epf_ntb_ctrl *reg Add __iomem type cast in vntb_epf_peer_spad_read() and vntb_epf_peer_spad_write(). Link: https://lore.kernel.org/r/20221102141014.1025893-8-Frank.Li@nxp.com Reported-by: kernel test robot Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi Acked-by: Manivannan Sadhasivam drivers/pci/endpoint/functions/pci-epf-vntb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 01dcec6d57ce62d535b2016fc4a617627fff506d Author: Frank Li Date: Wed Nov 2 10:10:13 2022 -0400 PCI: endpoint: pci-epf-vntb: Fix sparse build warning for epf_db Use epf_db[i] dereference instead of readl() because epf_db is in memory allocated by dma_alloc_coherent(), not I/O. Remove useless/duplicated readl() in the process. Link: https://lore.kernel.org/r/20221102141014.1025893-7-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi drivers/pci/endpoint/functions/pci-epf-vntb.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 7406bdbc4fb8b99cf0150cb2056a585c95ceafe7 Author: Simon Trimmer Date: Wed Nov 23 16:58:11 2022 +0000 ASoC: wm_adsp: Return whether changed when writing controls Functions that update cs_dsp controls need to handle return codes that indicate whether the control value changed. A return code of 1 indicates a change, 0 indicates no-change and a negative value is an error condition. Acked controls implicitly change value when written so a successful write shall always report that the value changed. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20221123165811.3014472-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit c56f4b2442d33bd94c418697f753271099384bee Author: Simon Trimmer Date: Wed Nov 23 16:58:10 2022 +0000 firmware: cs_dsp: cs_dsp_coeff_write_ctrl() should report changed ALSA callers need to know whether there was a change to the value so that they can report a control write change correctly. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20221123165811.3014472-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown drivers/firmware/cirrus/cs_dsp.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 60aeca6dc47493a681199f8f53fabd5b96adfa44 Author: Anatolii Gerasymenko Date: Thu Nov 3 15:30:05 2022 +0100 ice: Use ICE_RLAN_BASE_S instead of magic number Commit 72adf2421d9b ("ice: Move common functions out of ice_main.c part 2/7") moved an older version of ice_setup_rx_ctx() function with usage of magic number 7. Reimplement the commit 5ab522443bd1 ("ice: Cleanup magic number") to use ICE_RLAN_BASE_S instead of magic number. Signed-off-by: Anatolii Gerasymenko Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7cb9dfc57a2aff7a7f270c883cbe0f5cd3f68e1 Author: Marcin Szycik Date: Mon Nov 7 17:10:38 2022 +0100 ice: Fix configuring VIRTCHNL_OP_CONFIG_VSI_QUEUES with unbalanced queues Currently the VIRTCHNL_OP_CONFIG_VSI_QUEUES command may fail if there are less RX queues than TX queues requested. To fix it, only configure RXDID if RX queue exists. Fixes: e753df8fbca5 ("ice: Add support Flex RXD") Signed-off-by: Marcin Szycik Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_virtchnl.c | 37 ++++++++++++--------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit 288ecf491b1654845ae99c79b7fefad2d3ea47bd Author: Benjamin Mikailenko Date: Fri Nov 18 16:20:02 2022 -0500 ice: Accumulate ring statistics over reset Resets may occur with or without user interaction. For example, a TX hang or reconfiguration of parameters will result in a reset. During reset, the VSI is freed, freeing any statistics structures inside as well. This would create an issue for the user where a reset happens in the background, statistics set to zero, and the user checks ring statistics expecting them to be populated. To ensure this doesn't happen, accumulate ring statistics over reset. Define a new ring statistics structure, ice_ring_stats. The new structure lives in the VSI's parent, preserving ring statistics when VSI is freed. 1. Define a new structure vsi_ring_stats in the PF scope 2. Allocate/free stats only during probe, unload, or change in ring size 3. Replace previous ring statistics functionality with new structure Signed-off-by: Benjamin Mikailenko Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice.h | 6 + drivers/net/ethernet/intel/ice/ice_ethtool.c | 12 +- drivers/net/ethernet/intel/ice/ice_lib.c | 233 +++++++++++++++++++++++++- drivers/net/ethernet/intel/ice/ice_main.c | 66 ++++++-- drivers/net/ethernet/intel/ice/ice_repr.c | 10 +- drivers/net/ethernet/intel/ice/ice_txrx.c | 40 +++-- drivers/net/ethernet/intel/ice/ice_txrx.h | 18 +- drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 2 +- drivers/net/ethernet/intel/ice/ice_xsk.c | 25 ++- 9 files changed, 351 insertions(+), 61 deletions(-) commit 2fd5e433cd2685d4af471209e48be1a951687193 Author: Benjamin Mikailenko Date: Fri Nov 18 16:20:01 2022 -0500 ice: Accumulate HW and Netdev statistics over reset Resets happen with or without user interaction. For example, incidents such as TX hang or a reconfiguration of parameters will result in a reset. During reset, hardware and software statistics were set to zero. This created an issue for the user where a reset happens in the background, statistics set to zero, and the user checks statistics expecting them to be populated. To ensure this doesn't happen, keep accumulating stats over reset. 1. Remove function calls which reset hardware and netdev statistics. 2. Do not rollover statistics in ice_stat_update40 during reset. Signed-off-by: Benjamin Mikailenko Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 3 +++ drivers/net/ethernet/intel/ice/ice_lib.c | 7 +++++++ drivers/net/ethernet/intel/ice/ice_main.c | 30 ++++++++++++++++++++++++---- 4 files changed, 37 insertions(+), 4 deletions(-) commit 1d0e28a9be1fa02309b16dd68db31b4c8e716912 Author: Brett Creeley Date: Mon Oct 31 10:09:12 2022 -0700 ice: Remove and replace ice speed defines with ethtool.h versions The driver is currently using ICE_LINK_SPEED_* defines that mirror what ethtool.h defines, with one exception ICE_LINK_SPEED_UNKNOWN. This issue is fixed by the following changes: 1. replace ICE_LINK_SPEED_UNKNOWN with 0 because SPEED_UNKNOWN in ethtool.h is "-1" and that doesn't match the driver's expected behavior 2. transform ICE_LINK_SPEED_*MBPS to SPEED_* using static tables and fls()-1 to convert from BIT() to an index in a table. Suggested-by: Alexander Lobakin Signed-off-by: Brett Creeley Co-developed-by: Jesse Brandeburg Signed-off-by: Jesse Brandeburg Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_common.c | 41 +++++++++++- drivers/net/ethernet/intel/ice/ice_common.h | 1 + drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 12 ---- drivers/net/ethernet/intel/ice/ice_lib.c | 32 ++------- drivers/net/ethernet/intel/ice/ice_vf_mbx.c | 92 +++++++------------------- 5 files changed, 69 insertions(+), 109 deletions(-) commit a711a3288cc69af93148db343d3bfaf5a177a6b0 Author: Karol Kolacinski Date: Mon Oct 3 11:55:18 2022 +0200 ice: Check for PTP HW lock more frequently It was observed that PTP HW semaphore can be held for ~50 ms in worst case. SW should wait longer and check more frequently if the HW lock is held. Signed-off-by: Karol Kolacinski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 264bc5d3ebc5d695339ff84d8635773c23e34ba9 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 (cherry picked from commit 529d95a6067b74da9d4d5d9ab3009b35c98c5fce) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/selftest_engine_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71b6b2557058d4374d11e792ec550a1a098fb7a9 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 (cherry picked from commit e746f84b8e813816951b63485134927ed6763a1b) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_uncore.h | 44 +++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 14 deletions(-) commit dfa5e6ef3ccefff9fa8a70d9f5fa6ef6244aa312 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 (cherry picked from commit 8b7f7a9b10b704ba7d73199ff0f01354e0bad7a5) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddb97ea7cdb6462d7a719c649f58858b083f7eed 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 (cherry picked from commit f1c87a94a1087a26f41007ee83264033007421b5) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_display.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit eaa96d2c22989d7d2b54a4cfcf885bd5986be6a7 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 (cherry picked from commit 71feb6f901ecba962177a0a029dc545c91a4b396) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 41f425adbce9013a0e91a9670bf43fa141ab9414 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 (cherry picked from commit 192bb40f030a41ca95c5cff8c9340b725bc7ba8b) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/intel_gt.c | 6 +++--- drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 18 ++++++++++-------- drivers/gpu/drm/i915/gt/intel_gt_mcr.h | 12 ++++++------ 3 files changed, 19 insertions(+), 17 deletions(-) commit 76cdcb87d391a8e426d81b26be0afc221291cfc2 Author: Justin Green Date: Wed Nov 16 14:33:35 2022 -0500 drm/mediatek: Add MT8195 ovl driver support MT8195 ovl driver is similar to MT8183 ovl driver but support AFBC buffer format. Signed-off-by: Justin Green Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20221116193335.36320-1-greenjustin@google.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c410fa9b07c32cc69968ec83a148366d16c76dc4 Author: Justin Green Date: Wed Nov 16 14:33:35 2022 -0500 drm/mediatek: Add AFBC support to Mediatek DRM driver Tested on MT8195 and confirmed both correct video output and improved DRAM bandwidth performance. Signed-off-by: Justin Green Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20221116193335.36320-1-greenjustin@google.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 46 +++++++++++++++++++- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 74 ++++++++++++++++++++++++++++++-- drivers/gpu/drm/mediatek/mtk_drm_plane.h | 8 ++++ 3 files changed, 123 insertions(+), 5 deletions(-) commit e6e3776d682d7f06e1a49be0d2a95dc6456f8be2 Author: Abel Vesa Date: Wed Nov 23 17:36:38 2022 +0200 regulator: qcom-rpmh: Add support for PM8550 regulators Add the rpmh regulators found in PM8550 PMIC and its variants, along with their compatibles and configuration data. They also contain some FT-SMPS 525, so add their configuration as well. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221123153638.721254-3-abel.vesa@linaro.org Signed-off-by: Mark Brown drivers/regulator/qcom-rpmh-regulator.c | 81 +++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 0a60d098261dfdf2d7e892ab1faf935fea612826 Author: Abel Vesa Date: Wed Nov 23 17:36:37 2022 +0200 regulator: dt-bindings: qcom,rpmh: Add compatible for PM8550 Add compatible string for PM8550 used in SM8550 boards. Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221123153638.721254-2-abel.vesa@linaro.org Signed-off-by: Mark Brown .../bindings/regulator/qcom,rpmh-regulator.yaml | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 9c252ecf30360cb7b4dbcc275aebe5642174fd39 Author: Artem Bityutskiy Date: Tue Nov 22 09:00:14 2022 +0200 platform/x86: intel-uncore-freq: add Emerald Rapids support Make Intel uncore frequency driver support Emerald Rapids by adding its CPU model to the match table. Emerald Rapids uncore frequency control is the same as in Sapphire Rapids. Signed-off-by: Artem Bityutskiy Acked-by: Srinivas Pandruvada Acked-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c | 1 + 1 file changed, 1 insertion(+) commit 63a4dc0a0bb0e9bfeb2c88ccda81abdde4cdd6b8 Author: Li Hua Date: Mon Nov 21 11:06:20 2022 +0800 test_kprobes: Fix implicit declaration error of test_kprobes If KPROBES_SANITY_TEST and ARCH_CORRECT_STACKTRACE_ON_KRETPROBE is enabled, but STACKTRACE is not set. Build failed as below: lib/test_kprobes.c: In function ‘stacktrace_return_handler’: lib/test_kprobes.c:228:8: error: implicit declaration of function ‘stack_trace_save’; did you mean ‘stacktrace_driver’? [-Werror=implicit-function-declaration] ret = stack_trace_save(stack_buf, STACK_BUF_SIZE, 0); ^~~~~~~~~~~~~~~~ stacktrace_driver cc1: all warnings being treated as errors scripts/Makefile.build:250: recipe for target 'lib/test_kprobes.o' failed make[2]: *** [lib/test_kprobes.o] Error 1 To fix this error, Select STACKTRACE if ARCH_CORRECT_STACKTRACE_ON_KRETPROBE is enabled. Link: https://lore.kernel.org/all/20221121030620.63181-1-hucool.lihua@huawei.com/ Fixes: 1f6d3a8f5e39 ("kprobes: Add a test case for stacktrace from kretprobe handler") Cc: stable@vger.kernel.org Signed-off-by: Li Hua Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) commit d5f30a7da8ea8e6450250275cec5670cee3c4264 Author: Steven Rostedt (Google) Date: Thu Nov 17 21:42:49 2022 -0500 tracing: Fix race where eprobes can be called before the event The flag that tells the event to call its triggers after reading the event is set for eprobes after the eprobe is enabled. This leads to a race where the eprobe may be triggered at the beginning of the event where the record information is NULL. The eprobe then dereferences the NULL record causing a NULL kernel pointer bug. Test for a NULL record to keep this from happening. Link: https://lore.kernel.org/linux-trace-kernel/20221116192552.1066630-1-rafaelmendsr@gmail.com/ Link: https://lore.kernel.org/all/20221117214249.2addbe10@gandalf.local.home/ Cc: stable@vger.kernel.org Fixes: 7491e2c442781 ("tracing: Add a probe that attaches to trace events") Reported-by: Rafael Mendonca Signed-off-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) kernel/trace/trace_eprobe.c | 3 +++ 1 file changed, 3 insertions(+) commit 5e2cbc4a813e866885f812f1b64fdf33a9a16700 Author: Pierre-Louis Bossart Date: Fri Nov 11 12:26:53 2022 +0800 ASoC: SOF: Intel: hda: read multi-link capabilities earlier There's no reason to delay the multi-link parsing, this can be done earlier before checking the SoundWire capabilities. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111042653.45520-9-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2cd24c318cc943b54cbd2d855cee798314619c4e Author: Pierre-Louis Bossart Date: Fri Nov 11 12:26:52 2022 +0800 soundwire: intel_init: remove check on number of links The number of links is checked with a chip-dependent helper in the caller, remove the check in drivers/soundwire/intel_init.c This change makes intel_init.c hardware-agnostic - which is quite fitting for a layer that only creates auxiliary devices. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Acked-By: Vinod Koul Link: https://lore.kernel.org/r/20221111042653.45520-8-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown drivers/soundwire/intel_init.c | 12 ------------ 1 file changed, 12 deletions(-) commit 562bb228cebea475cc967c4a53df97ca62aa90b5 Author: Pierre-Louis Bossart Date: Fri Nov 11 12:26:51 2022 +0800 soundwire: intel_init: remove sdw_intel_enable_irq() The functionality is implemented with per-chip callbacks, there are no users of this symbol, remove the code. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Acked-By: Vinod Koul Link: https://lore.kernel.org/r/20221111042653.45520-7-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown drivers/soundwire/intel_init.c | 24 ------------------------ include/linux/soundwire/sdw_intel.h | 2 -- 2 files changed, 26 deletions(-) commit 625339caaea15c0e69d833227652d2f5b6e365cc Author: Pierre-Louis Bossart Date: Fri Nov 11 12:26:50 2022 +0800 ASoC: SOF: Intel: hda: add callback to check SoundWire lcount information The number of links is stored in different registers depending on the IP version, add sdw_check_lcount() callback. This callback only checks that the number of links supported in hardware is compatible with the number of links exposed in ACPI _DSD properties. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111042653.45520-6-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/hda.c | 39 +++++++++++++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.h | 6 ++++++ sound/soc/sof/intel/icl.c | 1 + sound/soc/sof/intel/mtl.c | 1 + sound/soc/sof/intel/shim.h | 1 + sound/soc/sof/intel/tgl.c | 4 ++++ 7 files changed, 54 insertions(+) commit aa70a580930a42781f57ac0d8b281ed2f6b0d8ec Author: Pierre-Louis Bossart Date: Fri Nov 11 12:26:49 2022 +0800 ASoC: SOF: Intel: mtl: move SoundWire interrupt enabling to callback There's no real rationale for enabling the SoundWire interrupt in the init, this can be done from the enable_sdw_irq() callback. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111042653.45520-5-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/mtl.c | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) commit 00f4f3380745da4950de2bf65f15af767d54dfe1 Author: Pierre-Louis Bossart Date: Fri Nov 11 12:26:48 2022 +0800 ASoC: SOF: Intel: mtl: factor interrupt enable/disable interrupt functions The offsets and sequences are identical for interrupt enabling and disabling, we can refactor the code with a single routine and a boolean. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111042653.45520-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/mtl.c | 116 +++++++++++++++------------------------------- 1 file changed, 38 insertions(+), 78 deletions(-) commit 8ebc90741e96646af7320336ac4433eea175390a Author: Pierre-Louis Bossart Date: Fri Nov 11 12:26:47 2022 +0800 ASoC: SOF: Intel: hda: add per-chip enable_sdw_irq() callback Different generations of Intel hardware rely on different programming sequences to enable SoundWire IP. In existing hardware, the SoundWire interrupt is enabled with a register field in the DSP register space. With HDaudio multi-link extensions registers, the SoundWire interrupt will be enabled with a generic interrupt enable field in LCTL, without any dependency on the DSP being enabled. Add a per-chip callback following the example of the check_sdw_irq() model already upstream. Note that the callback is not populated yet for MeteorLake (MTL) since the interrupts are already enabled in the init. A follow-up patch will move the functionality to this callback after a couple of cleanups. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111042653.45520-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/hda.c | 20 +++++++++++++++++++- sound/soc/sof/intel/hda.h | 6 ++++++ sound/soc/sof/intel/icl.c | 1 + sound/soc/sof/intel/shim.h | 1 + sound/soc/sof/intel/tgl.c | 4 ++++ 6 files changed, 33 insertions(+), 1 deletion(-) commit c5e5da1eb3d3009ed861f1514b41bec323c191d1 Author: Pierre-Louis Bossart Date: Fri Nov 11 12:26:46 2022 +0800 soundwire: intel_init: remove useless interrupt enablement in interrupt thread When the code reaches the SoundWire interrupt thread handling, the interrupt was enabled already, and there is no code that disables it -> this is a no-op sequence. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Acked-By: Vinod Koul Link: https://lore.kernel.org/r/20221111042653.45520-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown drivers/soundwire/intel_init.c | 1 - 1 file changed, 1 deletion(-) commit 10d2d1fc05f03ee1626b60761a3425622767513e Author: Alex Deucher Date: Mon Nov 21 12:34:14 2022 -0500 drm/amdgpu: Partially revert "drm/amdgpu: update drm_display_info correctly when the edid is read" This partially reverts 20543be93ca45968f344261c1a997177e51bd7e1. Calling drm_connector_update_edid_property() in amdgpu_connector_free_edid() causes a noticeable pause in the system every 10 seconds on polled outputs so revert this part of the change. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2257 Cc: Claudio Suarez Acked-by: Luben Tuikov Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 1 - 1 file changed, 1 deletion(-) commit e93e075d340859af772214c267d27f09f9db3e51 Author: Alex Deucher Date: Mon Nov 21 12:17:33 2022 -0500 drm/amdgpu: add missing license to some files The driver is MIT, so add the licenses. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2265 Acked-by: Luben Tuikov Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_smu11_driver_if.h | 1 + drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_smu13_driver_if.h | 1 + drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_0_0_offset.h | 1 + drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_0_0_sh_mask.h | 1 + drivers/gpu/drm/amd/include/yellow_carp_offset.h | 1 + 5 files changed, 5 insertions(+) commit 244b8edbdf01497c4cc3282914bd936f0a9af1b6 Author: Tao Zhou Date: Thu Oct 27 17:12:05 2022 +0800 drm/amdgpu: enable RAS poison for VCN 2.6 Configure related settings to enable it. Signed-off-by: Tao Zhou Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit f701acb6a4ed0acc0ba85a7ee18b12a75c0c58f0 Author: Felix Kuehling Date: Wed Nov 16 15:38:44 2022 -0500 drm/amdkfd: Release the topology_lock in error case Move the topology-locked part of kfd_topology_add_device into a separate function to simlpify error handling and release the topology lock consistently. Reported-by: Dan Carpenter Signed-off-by: Felix Kuehling Signed-off-by: Ma Jun Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 120 ++++++++++++++++-------------- 1 file changed, 65 insertions(+), 55 deletions(-) commit 88733d68014f06d4aae8ef0673ee31602ef1f0a7 Author: Tao Zhou Date: Thu Oct 27 17:50:56 2022 +0800 drm/amdgpu: add register definition for VCN RAS initialization Prepare for enableing VCN RAS poison. v2: move SHIFT and MASK definitions to related sh_mask.h file. Signed-off-by: Tao Zhou Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher .../drm/amd/include/asic_reg/vcn/vcn_2_5_offset.h | 3 ++- .../drm/amd/include/asic_reg/vcn/vcn_2_5_sh_mask.h | 27 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) commit 3c22c1ead6b2e6a9c0f2eeef143948f5d701dd08 Author: Shikang Fan Date: Fri Nov 18 17:35:33 2022 +0800 drm/amdgpu: fix for suspend/resume kiq fence fallback under sriov - in device_resume, sriov configure interrupt should be in full access, so release_full_gpu should be done after kfd_resume. - remove the previous workaround solution for sriov. Fixes: ec4927d463cb ("drm/amdgpu: fix for suspend/resume sequence under sriov") Signed-off-by: Shikang Fan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 6066aaf74f510fc171dbe9375153aee2d60d37aa Author: Aurabindo Pillai Date: Mon Nov 21 15:48:23 2022 -0500 drm/amd/display: trigger timing sync only if TG is running [Why&How] If the timing generator isnt running, it does not make sense to trigger a sync on the corresponding OTG. Check this condition before starting. Otherwise, this will cause error like: *ERROR* GSL: Timeout on reset trigger! Fixes: dc55b106ad47 ("drm/amd/display: Disable phantom OTG after enable for plane disable") Signed-off-by: Aurabindo Pillai Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 25b2483c1f0c6089a2297caf0aa198dc7701d5e4 Author: Paulo Miguel Almeida Date: Mon Nov 21 20:25:58 2022 +1300 drm/amdgpu: Replace remaining 1-element array with flex-array 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 GOP_VBIOS_CONTENT and refactor the rest of the code accordingly. Important to mention is that doing a build before/after this patch results in no functional 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/238 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/atombios.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 501fd2470effb4e977a24a7334f388d46bcc4958 Author: Alex Deucher Date: Thu Nov 17 09:37:16 2022 -0500 Revert "drm/amd/display: fix dpms_off issue when disabling bios mode" This reverts commit 5aa663752ff6f844c6bfc97d89231e98884ae769. This causes a blank screen on boot on an Asus G513QY / 6800M laptop. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2259 Cc: Aric Cyr Cc: Tom Chung Cc: Zhongwei Zhang Cc: Harry Wentland Tested-by: Mike Lothian Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7a3260c73d274daee652d57cbc934f47d1c0ef0 Author: Ren Zhijie Date: Mon Nov 21 13:04:18 2022 +0000 drm/amdgpu: fix unused-function error If CONFIG_DRM_AMDGPU=y and CONFIG_DRM_AMD_DC is not set, gcc complained about unused-function : drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1705:13: error: ‘amdgpu_discovery_set_sriov_display’ defined but not used [-Werror=unused-function] static void amdgpu_discovery_set_sriov_display(struct amdgpu_device *adev) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors To fix this error, use CONFIG_DRM_AMD_DC to wrap the definition of amdgpu_discovery_set_sriov_display(). Fixes: 25263da37693 ("drm/amdgpu: rework SR-IOV virtual display handling") Signed-off-by: Ren Zhijie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 ++ 1 file changed, 2 insertions(+) commit abd51738fe754a684ec44b7a9eca1981e1704ad9 Author: Luben Tuikov Date: Mon Nov 21 12:18:36 2022 -0500 drm/amdgpu: Fix minmax warning Fix minmax warning by using min_t() macro and explicitly specifying the assignment type. Cc: Alex Deucher Signed-off-by: Luben Tuikov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 0317d73954850c48268f3db00a49e676d12b10cf Author: Stanley.Yang Date: Wed Nov 16 17:08:22 2022 +0800 drm/amdgpu: fix use-after-free during gpu recovery [Why] [ 754.862560] refcount_t: underflow; use-after-free. [ 754.862898] Call Trace: [ 754.862903] [ 754.862913] amdgpu_job_free_cb+0xc2/0xe1 [amdgpu] [ 754.863543] drm_sched_main.cold+0x34/0x39 [amd_sched] [How] The fw_fence may be not init, check whether dma_fence_init is performed before job free Signed-off-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2b35c886556a24f1531edf38a4dab53bbbea4db4 Author: Frank Li Date: Wed Nov 2 10:10:12 2022 -0400 PCI: endpoint: pci-epf-vntb: Replace hardcoded 4 with sizeof(u32) NTB spad entry item size is sizeof(u32), replace hardcoded 4 with it. Link: https://lore.kernel.org/r/20221102141014.1025893-6-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi Acked-by: Manivannan Sadhasivam drivers/pci/endpoint/functions/pci-epf-vntb.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 03d426ae5426caf46cb96534ca77fa50a018dd3a Author: Frank Li Date: Wed Nov 2 10:10:11 2022 -0400 PCI: endpoint: pci-epf-vntb: Remove unused epf_db_phy struct member epf_db_phy member in struct epf_ntb is not used, remove it. Link: https://lore.kernel.org/r/20221102141014.1025893-5-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi Acked-by: Manivannan Sadhasivam drivers/pci/endpoint/functions/pci-epf-vntb.c | 1 - 1 file changed, 1 deletion(-) commit e036ea81c0a12c5fad55fa4c5350019ce99c3e8d Author: Heiko Carstens Date: Fri Nov 18 16:01:20 2022 +0100 s390/3270: make raw3270_state_final() depend on CONFIG_TN3270_CONSOLE If CONFIG_TN3270_CONSOLE is not enabled clang emits the following warning: drivers/s390/char/raw3270.c:114:19: error: unused function 'raw3270_state_final' [-Werror,-Wunused-function] static inline int raw3270_state_final(struct raw3270 *rp) Get rid of this warning by making raw3270_state_final() only available if CONFIG_TN3270_CONSOLE is enabled. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev drivers/s390/char/raw3270.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 9a435b7bc911d971490f0ce37aa0c6a1308722f4 Author: Heiko Carstens Date: Fri Nov 18 15:22:51 2022 +0100 s390/kprobes: define insn cache ops within private header file clang warns about an unused insn cache ops function: arch/s390/kernel/kprobes.c:34:1: error: unused function 'is_kprobe_s390_insn_slot' [-Werror,-Wunused-function] DEFINE_INSN_CACHE_OPS(s390_insn); ^ ./include/linux/kprobes.h:335:20: note: expanded from macro 'DEFINE_INSN_CACHE_OPS' static inline bool is_kprobe_##__name##_slot(unsigned long addr) \ ^ :88:1: note: expanded from here is_kprobe_s390_insn_slot ^ Move the definition to a private header file, which is also similar to the generic insn cache ops. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/kprobes.c | 3 +-- arch/s390/kernel/kprobes.h | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) commit 17ca7df6fcc44470199b66752b8d8459e17aa077 Author: Heiko Carstens Date: Fri Nov 18 15:22:14 2022 +0100 s390/mm: remove unused get_page_state() function Remove unused get_page_state() function: arch/s390/mm/page-states.c:61:29: error: unused function 'get_page_state' [-Werror,-Wunused-function] Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/mm/page-states.c | 11 ----------- 1 file changed, 11 deletions(-) commit 12a6c2c182c1160c46500d80c2f8922cd2747f41 Author: Heiko Carstens Date: Fri Nov 18 15:21:49 2022 +0100 s390/hypfs: remove unused info_blk_hdr__pcpus() function Remove unused info_blk_hdr__pcpus() function: arch/s390/hypfs/hypfs_diag.c:71:21: error: unused function 'info_blk_hdr__pcpus' [-Werror,-Wunused-function] Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/hypfs/hypfs_diag.c | 8 -------- 1 file changed, 8 deletions(-) commit a78c2e31f6c769d7746989273cf9348944cf504d Author: Heiko Carstens Date: Fri Nov 18 15:21:02 2022 +0100 s390/debug: remove function type cast clang warns about an incompatible function type cast: CC arch/s390/kernel/debug.o arch/s390/kernel/debug.c:142:2: error: cast from 'int (*)(debug_info_t *, struct debug_view *, char *, debug_sprintf_entry_t *)' (aka 'int (*)(struct debug_info *, struct debug_view *, char *, debug_sprintf_entry_t *)') to 'debug_format_proc_t *' (aka 'int (*)(struct debug_info *, struct debug_view *, char *, const char *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] (debug_format_proc_t *)&debug_sprintf_format_fn, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get rid of this warning by changing debug_sprintf_format_fn() so it matches the debug_format_proc_t function type, and do the cast of the last parameter within the function itself. This is the standard way of handling such cases anyway. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/debug.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0c031262d2ddfb938f9668d620d7ed674771646c Author: Frank Li Date: Wed Nov 2 10:10:10 2022 -0400 PCI: endpoint: pci-epf-vntb: Fix call pci_epc_mem_free_addr() in error path Replace pci_epc_mem_free_addr() with pci_epf_free_space() in the error handle path to match pci_epf_alloc_space(). Link: https://lore.kernel.org/r/20221102141014.1025893-4-Frank.Li@nxp.com Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP") Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi drivers/pci/endpoint/functions/pci-epf-vntb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8818039f959b2efc0d6f2cb101f8061332f0c77e Author: Ivan Vecera Date: Mon Nov 21 09:48:45 2022 -0500 kbuild: add ability to make source rpm buildable using koji Changes: - added new target 'srcrpm-pkg' to generate source rpm - added required build tools to spec file - removed locally compiled host tools to force their re-compile Signed-off-by: Ivan Vecera Signed-off-by: Jonathan Toppins Acked-by: Íñigo Huguet Tested-by: Ivan Vecera Signed-off-by: Masahiro Yamada scripts/Makefile.package | 10 ++++++++++ scripts/package/mkspec | 7 +++++++ 2 files changed, 17 insertions(+) commit 1d118fed348f65bcc08e9bfb947085c276d05b52 Author: Frank Li Date: Wed Nov 2 10:10:09 2022 -0400 PCI: endpoint: pci-epf-vntb: Fix struct epf_ntb_ctrl indentation Align the indentation of struct epf_ntb_ctrl with other structs in the driver. Link: https://lore.kernel.org/r/20221102141014.1025893-3-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi drivers/pci/endpoint/functions/pci-epf-vntb.c | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 9298804840457c29c7e115f3a87bec406c262c81 Author: Frank Li Date: Wed Nov 2 10:10:08 2022 -0400 PCI: endpoint: pci-epf-vntb: Clean up kernel_doc warning Cleanup warning found by scripts/kernel-doc. Consolidate terms: - host, host1 to HOST - vhost, vHost, Vhost, VHOST2 to VHOST Link: https://lore.kernel.org/r/20221102141014.1025893-2-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi Acked-by: Manivannan Sadhasivam drivers/pci/endpoint/functions/pci-epf-vntb.c | 83 +++++++++++++++++---------- 1 file changed, 54 insertions(+), 29 deletions(-) commit b9ea48e9e8c62bfce0953d843689bec2777d26c8 Author: Thomas Gleixner Date: Sat Nov 12 19:47:52 2022 +0100 s390/pci: Use irq_data_get_msi_desc() No point in doing another lookup of irq_data, it's already provided as an argument. Signed-off-by: Thomas Gleixner Reviewed-by: Alexander Gordeev Reviewed-by: Niklas Schnelle Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/linux-s390/8735aoui07.ffs@tglx/ [agordeev@linux.ibm.com added Link tag] Signed-off-by: Alexander Gordeev arch/s390/pci/pci_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9b25bdf57e4ab2a3084f9649318738ac9c006d3 Author: Christophe JAILLET Date: Tue Nov 1 22:14:14 2022 +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. While at it, include the corresponding header file () Link: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/ Signed-off-by: Christophe JAILLET Signed-off-by: Alexander Gordeev arch/s390/kernel/ipl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 254b2fd02e34a5761cd2a3aad8b24a7ddd8962e1 Author: Heiko Carstens Date: Mon Oct 31 14:11:57 2022 +0100 s390/mm: provide minimal setup_per_cpu_areas() implementation s390 allows to enable CONFIG_NUMA, mainly to enable a couple of system calls which are only present if NUMA is enabled. The NUMA specific system calls are required by a couple of applications, which wouldn't work if the system calls wouldn't be present. The NUMA implementation itself maps all CPUs and memory to node 0. A special case is the generic percpu setup code, which doesn't expect an s390 like implementation and therefore emits a message/warning: "percpu: cpu 0 has no node -1 or node-local memory". In order to get rid of this message, and also to provide sane CPU to node and CPU distance mappings implement a minimal setup_per_cpu_areas() function, which is very close to the generic variant. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/Kconfig | 2 ++ arch/s390/mm/init.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 2847cd7e64038d8b554a98a07a4c0e6ec05e06b0 Author: xinlei lee Date: Thu Oct 20 19:45:53 2022 +0800 drm/mediatek: Add mt8188 dpi compatibles and platform data For MT8188, the vdosys0 only supports 1T1P mode, so we need to add the compatible for mt8188 edp-intf. Signed-off-by: xinlei lee Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1666266353-16670-3-git-send-email-xinlei.lee@mediatek.com/ Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++ drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 ++ 2 files changed, 19 insertions(+) commit c1a26a9807bf629c7c4ca6cdd0b4ee3d613b9f90 Author: xinlei lee Date: Thu Oct 20 19:45:52 2022 +0800 dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8188 For MT8188, the vdosys0 only supports 1T1P mode while the vdosys0 supports 2T1P mode in MT8195. So we need to add dt-binding documentation of dpi for MediaTek MT8188 SoC. Signed-off-by: xinlei lee Acked-by: Krzysztof Kozlowski Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1666266353-16670-2-git-send-email-xinlei.lee@mediatek.com/ Signed-off-by: Chun-Kuang Hu Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 + 1 file changed, 1 insertion(+) commit ba6ed462dcf41a83b36eb9a74a8c4720040f9762 Author: Serge Semin Date: Sun Nov 13 22:13:01 2022 +0300 PCI: dwc: Add Baikal-T1 PCIe controller support Baikal-T1 SoC is equipped with DWC PCIe v4.60a host controller. It can be trained to work up to Gen.3 speed over up to x4 lanes. The host controller is attached to the DW PCIe 3.0 PCS via the PIPE-4 interface, which in its turn is connected to the DWC 10G PHY. The whole system is supposed to be fed up with four clock sources: DBI peripheral clock, AXI application clocks and external PHY/core reference clock generating the 100MHz signal. In addition to that the platform provide a way to reset each part of the controller: sticky/non-sticky bits, host controller core, PIPE interface, PCS/PHY and Hot/Power reset signal. The driver also provides a way to handle the GPIO-based PERST# signal. Note due to the Baikal-T1 MMIO peculiarity we have to implement the DBI interface accessors which make sure the IO operations are dword-aligned. Link: https://lore.kernel.org/r/20221113191301.5526-21-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi drivers/pci/controller/dwc/Kconfig | 9 + drivers/pci/controller/dwc/Makefile | 1 + drivers/pci/controller/dwc/pcie-bt1.c | 643 ++++++++++++++++++++++++++++++++++ 3 files changed, 653 insertions(+) commit ef69f852a9784017e646e50e3efc715dac7e3fc4 Author: Serge Semin Date: Sun Nov 13 22:13:00 2022 +0300 PCI: dwc: Introduce generic platform clocks and resets Currently almost each platform driver uses its own resets and clocks naming in order to get the corresponding descriptors. It makes the code harder to maintain and comprehend especially seeing the DWC PCIe core main resets and clocks signals set hasn't changed much for about at least one major IP-core release. So in order to organize things around these signals we suggest to create a generic interface for them in accordance with the naming introduced in the DWC PCIe IP-core reference manual: Application clocks: - "dbi" - data bus interface clock (on some DWC PCIe platforms it's referred as "pclk", "pcie", "sys", "ahb", "cfg", "iface", "gio", "reg", "pcie_apb_sys"); - "mstr" - AXI-bus master interface clock (some DWC PCIe glue drivers refer to this clock as "port", "bus", "pcie_bus", "bus_master/master_bus/axi_m", "pcie_aclk"); - "slv" - AXI-bus slave interface clock (also called as "port", "bus", "pcie_bus", "bus_slave/slave_bus/axi_s", "pcie_aclk", "pcie_inbound_axi"). Core clocks: - "pipe" - core-PCS PIPE interface clock coming from external PHY (it's normally named by the platform drivers as just "pipe"); - "core" - primary clock of the controller (none of the platform drivers declare such a clock but in accordance with the ref. manual the devices may have it separately specified); - "aux" - auxiliary PMC domain clock (it is named by some platforms as "pcie_aux" and just "aux"); - "ref" - Generic reference clock (it is a generic clock source, which can be used as a signal source for multiple interfaces, some platforms call it as "ref", "general", "pcie_phy", "pcie_phy_ref"). Application resets: - "dbi" - Data-bus interface reset (it's CSR interface clock and is normally called as "apb" though technically it's not APB but DWC PCIe-specific interface); - "mstr" - AXI-bus master reset (some platforms call it as "port", "apps", "bus", "axi_m"); - "slv" - ABI-bus slave reset (some platforms call it as "port", "apps", "bus", "axi_s"). Core resets: - "non-sticky" - non-sticky CSR flags reset; - "sticky" - sticky CSR flags reset; - "pipe" - PIPE-interface (Core-PCS) logic reset (some platforms call it just "pipe"); - "core" - controller primary reset (resets everything except PMC module, some platforms refer to this signal as "soft", "pci"); - "phy" - PCS/PHY block reset (strictly speaking it is normally connected to the input of an external block, but the reference manual says it must be available for the PMC working correctly, some existing platforms call it "pciephy", "phy", "link"); - "hot" - PMC hot reset signal (also called as "sleep"); - "pwr" - cold reset signal (can be referred as "pwr", "turnoff"). Bus reset: - "perst" - PCIe standard signal used to reset the PCIe peripheral devices. As you can see each platform uses it's own naming for basically the same set of the signals. In the framework of this commit we suggest to add a set of the clocks and reset signals resources, corresponding names and identifiers for each denoted entity. At current stage the platforms will be able to use the provided infrastructure to automatically request all these resources and manipulate with them in the Host/EP init callbacks. Alas it isn't that easy to create a common cold/hot reset procedure due to too many platform-specifics in the procedure, like the external flags exposure and the delays requirement. Link: https://lore.kernel.org/r/20221113191301.5526-20-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi drivers/pci/controller/dwc/pcie-designware.c | 91 ++++++++++++++++++++++++++++ drivers/pci/controller/dwc/pcie-designware.h | 42 +++++++++++++ 2 files changed, 133 insertions(+) commit 9f67ecdd9579228d656192a4b6e951c757085db8 Author: Serge Semin Date: Sun Nov 13 22:12:59 2022 +0300 PCI: dwc: Combine iATU detection procedures Since the iATU CSR region is now retrieved in the DW PCIe resources getter there is no much benefits in the iATU detection procedures splitting up. Therefore let's join the iATU unroll/viewport detection procedure with the rest of the iATU parameters detection code. The resultant method will be as coherent as before, while the redundant functions will be eliminated thus producing more readable code. Link: https://lore.kernel.org/r/20221113191301.5526-19-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware.c | 39 +++++++--------------------- 1 file changed, 10 insertions(+), 29 deletions(-) commit ef8c58877fe77c7807777f61f59cffaee89881f7 Author: Serge Semin Date: Sun Nov 13 22:12:58 2022 +0300 PCI: dwc: Introduce generic resources getter Currently the DW PCIe Root Port and Endpoint CSR spaces are retrieved in the separate parts of the DW PCIe core driver. It doesn't really make sense since the both controller types have identical set of the core CSR regions: DBI, DBI CS2 and iATU/eDMA. Thus we can simplify the DW PCIe Host and EP initialization methods by moving the platform-specific registers space getting and mapping into a common method. It gets to be even more justified seeing the CSRs base address pointers are preserved in the common DW PCIe descriptor. Note all the OF-based common DW PCIe settings initialization will be moved to the new method too in order to have a single function for all the generic platform properties handling in single place. A nice side-effect of this change is that the pcie-designware-host.c and pcie-designware-ep.c drivers are cleaned up from all the direct dw_pcie storage modification, which makes the DW PCIe core, Root Port and Endpoint modules more coherent. Link: https://lore.kernel.org/r/20221113191301.5526-18-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring drivers/pci/controller/dwc/pcie-designware-ep.c | 25 +------- drivers/pci/controller/dwc/pcie-designware-host.c | 15 ++--- drivers/pci/controller/dwc/pcie-designware.c | 75 +++++++++++++++++------ drivers/pci/controller/dwc/pcie-designware.h | 3 + 4 files changed, 65 insertions(+), 53 deletions(-) commit 7f9e982dc4fcf7b4bc7e9dc8a9f344395fc125b8 Author: Serge Semin Date: Sun Nov 13 22:12:57 2022 +0300 PCI: dwc: Introduce generic controller capabilities interface Since in addition to the already available iATU unrolled mapping we are about to add a few more DW PCIe platform-specific capabilities (CDM-check and generic clocks/resets resources) let's add a generic interface to set and get the flags indicating their availability. The new interface shall improve maintainability of the platform-specific code. Link: https://lore.kernel.org/r/20221113191301.5526-17-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware.c | 11 ++++++----- drivers/pci/controller/dwc/pcie-designware.h | 12 +++++++++++- 2 files changed, 17 insertions(+), 6 deletions(-) commit 8522e17d4cab47b35d43943ca13d677e76ab01b7 Author: Serge Semin Date: Sun Nov 13 22:12:56 2022 +0300 PCI: dwc: Introduce dma-ranges property support for RC-host In accordance with the generic PCIe Root Port DT-bindings the "dma-ranges" property has the same format as the "ranges" property. The only difference is in their semantics. The "dma-ranges" property describes the PCIe-to-CPU memory mapping in opposite to the CPU-to-PCIe mapping of the "ranges" property. Even though the DW PCIe controllers are normally equipped with the internal Address Translation Unit which inbound and outbound tables can be used to implement both properties semantics, it was surprising for me to discover that the host-related part of the DW PCIe driver currently supports the "ranges" property only while the "dma-ranges" windows are just ignored. Having the "dma-ranges" supported in the driver would be very handy for the platforms, that don't tolerate the 1:1 CPU-PCIe memory mapping and require a customized PCIe memory layout. So let's fix that by introducing the "dma-ranges" property support. First of all we suggest to rename the dw_pcie_prog_inbound_atu() method to dw_pcie_prog_ep_inbound_atu() and create a new version of the dw_pcie_prog_inbound_atu() function. Thus we'll have two methods for the RC and EP controllers respectively in the same way as it has been developed for the outbound ATU setup methods. Secondly aside with the memory window index and type the new dw_pcie_prog_inbound_atu() function will accept CPU address, PCIe address and size as its arguments. These parameters define the PCIe and CPU memory ranges which will be used to setup the respective inbound ATU mapping. The passed parameters need to be verified against the ATU ranges constraints in the same way as it is done for the outbound ranges. Finally the DMA-ranges detected for the PCIe controller need to be converted to the inbound ATU entries during the host controller initialization procedure. It will be done in the framework of the dw_pcie_iatu_setup() method. Note before setting the inbound ranges up we need to disable all the inbound ATU entries in order to prevent unexpected PCIe TLPs translations defined by some third party software like bootloaders. Link: https://lore.kernel.org/r/20221113191301.5526-16-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-ep.c | 4 +- drivers/pci/controller/dwc/pcie-designware-host.c | 32 +++++++++++-- drivers/pci/controller/dwc/pcie-designware.c | 56 ++++++++++++++++++++++- drivers/pci/controller/dwc/pcie-designware.h | 6 ++- 4 files changed, 89 insertions(+), 9 deletions(-) commit ce27c4e61f2dcc41d13f54cbecbd3a4b15db86c8 Author: Serge Semin Date: Sun Nov 13 22:12:55 2022 +0300 dt-bindings: PCI: dwc: Add Baikal-T1 PCIe Root Port bindings Baikal-T1 SoC is equipped with DWC PCIe v4.60a Root Port controller, which link can be trained to work on up to Gen.3 speed over up to x4 lanes. The controller is supposed to be fed up with four clock sources: DBI peripheral clock, AXI application Tx/Rx clocks and external PHY/core reference clock generating the 100MHz signal. In addition to that the platform provide a way to reset each part of the controller: sticky/non-sticky bits, host controller core, PIPE interface, PCS/PHY and Hot/Power reset signal. The Root Port controller is equipped with multiple IRQ lines like MSI, system AER, PME, HP, Bandwidth change, Link equalization request and eDMA ones. The registers space is accessed over the DBI interface. There can be no more than four inbound or outbound iATU windows configured. Link: https://lore.kernel.org/r/20221113191301.5526-15-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring .../devicetree/bindings/pci/baikal,bt1-pcie.yaml | 168 +++++++++++++++++++++ 1 file changed, 168 insertions(+) commit 98b59129cb9f43a37bb92a577145f29ca54353a7 Author: Serge Semin Date: Sun Nov 13 22:12:54 2022 +0300 dt-bindings: PCI: dwc: Apply common schema to Rockchip DW PCIe nodes As the DT-bindings description states the Rockchip PCIe controller is based on the DW PCIe RP IP-core thus its DT-nodes are supposed to be compatible with the common DW PCIe controller schema. Let's make sure they are evaluated against it by referring to the snps,dw-pcie.yaml schema in the allOf sub-schemas composition. Link: https://lore.kernel.org/r/20221113191301.5526-14-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4a8972542a6d1eee81c7cc27699b0a47f6a6619e Author: Serge Semin Date: Sun Nov 13 22:12:53 2022 +0300 dt-bindings: PCI: dwc: Add dma-coherent property DW PCIe EP/RP AXI- and TRGT1-master interfaces are responsible for the application memory access. They are used by the RP/EP PCIe buses (MWr/MWr TLPs emitted by the peripheral PCIe devices) and the eDMA block. Since all of them mainly involve the system memory and basically mean DMA we can expect the corresponding platforms can be designed in a way to make sure the transactions are cache-coherent. As such the DW PCIe DT-nodes can have the 'dma-coherent' property specified. Let's permit it in the DT-bindings then. Link: https://lore.kernel.org/r/20221113191301.5526-13-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Documentation/devicetree/bindings/pci/snps,dw-pcie-common.yaml | 2 ++ 1 file changed, 2 insertions(+) commit bd9504af9169131156e753a6e47de34ad7a97b7d Author: Serge Semin Date: Sun Nov 13 22:12:52 2022 +0300 dt-bindings: PCI: dwc: Add clocks/resets common properties DW PCIe RP/EP reference manuals explicit define all the clocks and reset requirements in [1] and [2]. Seeing the DW PCIe vendor-specific DT-bindings have already started assigning random names to the same set of the clocks and resets lines, let's define a generic names sets and add them to the DW PCIe common DT-schema. Note since there are DW PCI-based vendor-specific DT-bindings with the custom names assigned to the same clocks and resets resources we have no much choice but to add them to the generic DT-schemas in order to have the schemas being applicable for such devices. These names are marked as vendor-specific and should be avoided being used in new bindings in favor of the generic names. [1] Synopsys DesignWare Cores PCI Express Controller Databook - DWC PCIe Root Port, Version 5.40a, March 2019, p.55 - 78. [2] Synopsys DesignWare Cores PCI Express Controller Databook - DWC PCIe Endpoint, Version 5.40a, March 2019, p.58 - 81. Link: https://lore.kernel.org/r/20221113191301.5526-12-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring .../bindings/pci/snps,dw-pcie-common.yaml | 120 +++++++++++++++++++++ .../devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 6 ++ .../devicetree/bindings/pci/snps,dw-pcie.yaml | 2 - 3 files changed, 126 insertions(+), 2 deletions(-) commit 4cc13eedb892c53f3d61fb5a1f6d57724541441a Author: Serge Semin Date: Sun Nov 13 22:12:51 2022 +0300 dt-bindings: PCI: dwc: Add reg/reg-names common properties Even though there is a more-or-less limited set of the CSR spaces can be defined for each DW PCIe controller the generic DT-schema currently doesn't specify much limitations on the reg-space names used for one or another range. In order to prevent the vendor-specific controller schemas further deviation from the generic interface let's fix that by introducing the reg-names definition in the common DW PCIe DT-schemas and preserving the generic "reg" and "reg-names" properties in there. New DW PCIe device DT-bindings are encouraged to use the generic set of the CSR spaces defined in the generic DW PCIe RP/EP DT-bindings, while the already available vendor-specific DT-bindings can still apple the common DT-schemas. Note the number of reg/reg-names items need to be changed in the DW PCIe EP DT-schema since aside with the "dbi" CSRs space these arrays can have "dbi2", "addr_space", "atu", etc ranges. Also note since there are DW PCIe-based vendor-specific DT-bindings with the custom names assigned to the same CSR resources we have no much choice but to add them to the generic DT-schemas in order to have the schemas being applicable for such devices. These names are marked as vendor-specific and should be avoided being used in new bindings in favor of the generic names. Link: https://lore.kernel.org/r/20221113191301.5526-11-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring .../bindings/pci/snps,dw-pcie-common.yaml | 22 ++++++ .../devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 82 ++++++++++++++++++++-- .../devicetree/bindings/pci/snps,dw-pcie.yaml | 78 ++++++++++++++++++-- 3 files changed, 169 insertions(+), 13 deletions(-) commit 35486813c41b3a5229b4987857ff597704feda21 Author: Serge Semin Date: Sun Nov 13 22:12:50 2022 +0300 dt-bindings: PCI: dwc: Add interrupts/interrupt-names common properties Currently the 'interrupts' and 'interrupt-names' properties are defined being too generic to really describe any actual IRQ interface. Moreover the DW PCIe End-point devices are left with no IRQ signals. All of that can be fixed by adding the IRQ-related properties to the common DW PCIe DT-schemas in accordance with the hardware reference manual. The DW PCIe common DT-schema will contain the generic properties definitions with just a number of entries per property, while the DW PCIe RP/EP-specific schemas will have the particular number of items and the generic resource names listed. Note since there are DW PCI-based vendor-specific DT-bindings with the custom names assigned to the same IRQ resources we have no much choice but to add them to the generic DT-schemas in order to have the schemas being applicable for such devices. These names are marked as vendor-specific and should be avoided being used in new bindings in favor of the generic names. Link: https://lore.kernel.org/r/20221113191301.5526-10-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring .../bindings/pci/snps,dw-pcie-common.yaml | 19 +++++ .../devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 52 +++++++++++++ .../devicetree/bindings/pci/snps,dw-pcie.yaml | 90 +++++++++++++++++++++- 3 files changed, 158 insertions(+), 3 deletions(-) commit 12f7936c7a0e0c40069ff12ddfd091a29da6e77c Author: Serge Semin Date: Sun Nov 13 22:12:49 2022 +0300 dt-bindings: PCI: dwc: Add max-functions EP property In accordance with [1] the CX_NFUNC IP-core synthesize parameter is responsible for the number of physical functions to support in the EP mode. Its upper limit is 32. Let's use it to constrain the number of PCIe functions the DW PCIe EP DT-nodes can advertise. [1] Synopsys DesignWare Cores PCI Express Controller Databook - DWC PCIe Endpoint, Version 5.40a, March 2019, p. 887. Link: https://lore.kernel.org/r/20221113191301.5526-9-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit f133396e2d0063d589362122da659fe047643384 Author: Serge Semin Date: Sun Nov 13 22:12:48 2022 +0300 dt-bindings: PCI: dwc: Apply generic schema for generic device only Having the generic compatible strings constraints with the 'any'+'generic string' semantic implicitly encourages either to add new DW PCIe-based DT-bindings with the generic compatible string attached or just forget about adding new DT-bindings since the corresponding DT-node will be evaluated anyway. Moreover having that semantic implemented in the generic DT-schema causes the DT-validation tool to apply the schema twice: first by implicit compatible-string-based selection and second by means of the 'allOf: [ $ref ]' statement. Let's fix all of that by dropping the compatible property constraints and selecting the generic DT-schema only for the purely generic DW PCIe DT-nodes. The later is required since there is a driver for such devices. (Though there are no such DT-nodes currently defined in the kernel DT sources.) Link: https://lore.kernel.org/r/20221113191301.5526-8-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring .../devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 16 ++++++++++------ Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) commit eaa9d886528730bcd7213f0b22c8dd468460f495 Author: Serge Semin Date: Sun Nov 13 22:12:47 2022 +0300 dt-bindings: PCI: dwc: Add max-link-speed common property In accordance with [1] DW PCIe controllers support up to Gen5 link speed. Let's add the max-link-speed property upper bound to 5 then. The DT bindings of the particular devices are expected to setup more strict constraint on that parameter. [1] Synopsys DesignWare Cores PCI Express Controller Databook, Version 5.40a, March 2019, p. 27 Link: https://lore.kernel.org/r/20221113191301.5526-7-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Documentation/devicetree/bindings/pci/snps,dw-pcie-common.yaml | 3 +++ Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 2 ++ Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml | 1 + 3 files changed, 6 insertions(+) commit 875596361910711f3e7ba6314075d867e4b74fd1 Author: Serge Semin Date: Sun Nov 13 22:12:46 2022 +0300 dt-bindings: PCI: dwc: Add phys/phy-names common properties It's normal to have the DW PCIe RP/EP DT-nodes equipped with the explicit PHY phandle references. There can be up to 16 PHYs attach in accordance with the maximum number of supported PCIe lanes. Let's extend the common DW PCIe controller schema with the 'phys' and 'phy-names' properties definition. There two types PHY names are defined: preferred generic names '^pcie[0-9]+$' and non-preferred vendor-specific names '^pcie([0-9]+|-?phy[0-9]*)?$' so to match the names currently supported by the DW PCIe platform drivers ("pcie": meson; "pciephy": qcom, imx6; "pcie-phy": uniphier, rockchip, spear13xx; "pcie": intel-gw; "pcie-phy%d": keystone, dra7xx; "pcie": histb, etc). Link: https://lore.kernel.org/r/20221113191301.5526-6-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring .../bindings/pci/snps,dw-pcie-common.yaml | 24 ++++++++++++++++++++++ .../devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 3 +++ .../devicetree/bindings/pci/snps,dw-pcie.yaml | 3 +++ 3 files changed, 30 insertions(+) commit b9fe9985aee2cb62814671b883b9cbfa1c941ab3 Author: Serge Semin Date: Sun Nov 13 22:12:45 2022 +0300 dt-bindings: PCI: dwc: Remove bus node from the examples It's absolutely redundant seeing by default each node is embedded into its own example-X node with address and size cells set to 1. Link: https://lore.kernel.org/r/20221113191301.5526-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring .../devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 16 ++++------ .../devicetree/bindings/pci/snps,dw-pcie.yaml | 35 +++++++++++----------- 2 files changed, 24 insertions(+), 27 deletions(-) commit 057646a5db2f8873efba90eeffd165c2525b413f Author: Serge Semin Date: Sun Nov 13 22:12:44 2022 +0300 dt-bindings: PCI: dwc: Detach common RP/EP DT bindings Currently both DW PCIe Root Port and End-point DT bindings are defined as separate schemas. Carefully looking at them, at the hardware reference manuals and seeing there is a generic part of the driver used by the both RP and EP drivers we can greatly simplify the DW PCIe controller bindings by moving some of the properties into the common DT schema. It concerns the PERST GPIO control, number of lanes, number of iATU windows and CDM check properties. They will be defined in the snps,dw-pcie-common.yaml schema which will be referenced in the DW PCIe Root Port and End-point DT bindings in order to evaluate the common for both of these controllers properties. The rest of properties like reg{,-names}, clock{s,-names}, reset{s,-names}, etc will be consolidate there in one of the next commits. Link: https://lore.kernel.org/r/20221113191301.5526-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring .../bindings/pci/snps,dw-pcie-common.yaml | 76 ++++++++++++++++++++++ .../devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 31 +-------- .../devicetree/bindings/pci/snps,dw-pcie.yaml | 33 +--------- 3 files changed, 78 insertions(+), 62 deletions(-) commit 4cf4b9b70ab2785461190c08a3542d2d74c28b46 Author: Serge Semin Date: Sun Nov 13 22:12:43 2022 +0300 dt-bindings: visconti-pcie: Fix interrupts array max constraints In accordance with the way the device DT-node is actually defined in arch/arm64/boot/dts/toshiba/tmpv7708.dtsi and the way the device is probed by the DW PCIe driver there are two IRQs it actually has. It's MSI IRQ the DT-bindings lack. Let's extend the interrupts property constraints then and fix the schema example so one would be acceptable by the actual device DT-bindings. Link: https://lore.kernel.org/r/20221113191301.5526-3-Sergey.Semin@baikalelectronics.ru Fixes: 17c1b16340f0 ("dt-bindings: pci: Add DT binding for Toshiba Visconti PCIe controller") Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring Acked-by: Nobuhiro Iwamatsu Documentation/devicetree/bindings/pci/toshiba,visconti-pcie.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b8a83e600bdde93e7da41ea3204b2b3832a3c99b Author: Serge Semin Date: Sun Nov 13 22:12:42 2022 +0300 dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq Originally as it was defined the legacy bindings the pcie_inbound_axi and pcie_aux clock names were supposed to be used in the fsl,imx6sx-pcie and fsl,imx8mq-pcie devices respectively. But the bindings conversion has been incorrectly so now the fourth clock name is defined as "pcie_inbound_axi for imx6sx-pcie, pcie_aux for imx8mq-pcie", which is completely wrong. Let's fix that by conditionally apply the clock-names constraints based on the compatible string content. Link: https://lore.kernel.org/r/20221113191301.5526-2-Sergey.Semin@baikalelectronics.ru Fixes: 751ca492f131 ("dt-bindings: PCI: imx6: convert the imx pcie controller to dtschema") Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Alexander Stein .../devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 46 ++++++++++++++++++++-- 1 file changed, 42 insertions(+), 4 deletions(-) commit 19a17a9fb486b2961dbd7f3fff0d79a144c9a3b6 Author: Ohad Sharabi Date: Sun Nov 20 15:12:26 2022 +0200 habanalabs: fix VA range calculation Current implementation is fixing the page size to PAGE_SIZE whereas the input page size may be different. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/memory.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 5354a2a0018345774ab2517fc2fe107a6cd894fa Author: Ofir Bitton Date: Tue Nov 22 09:59:27 2022 +0200 habanalabs: fail driver load if EEPROM errors detected In case EEPROM is not burned, firmware sets default EEPROM values. As this is not valid in production, driver should fail load upon any EEPROM error reported by firmware. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/firmware_if.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 1b18cf33d6ce63a9f5fe3764d7b20c4738dd1245 Author: Tomer Tayar Date: Thu Nov 17 18:57:49 2022 +0200 habanalabs: make print of engines idle mask more readable The engines idle mask was increased to be an array of 4 u64 entries. To make the print of this mask more readable, remove the "0x" prefix, and zero-pad each u64 to 16 bytes if either it isn't zero or if any of the higher-order u64's is not zero. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 893afb248c7a1f24d17719a5e5f4fe4174ecb60c Author: Tomer Tayar Date: Thu Nov 17 15:22:31 2022 +0200 habanalabs: clear non-released encapsulated signals Reserved encapsulated signals which were not released hold the context refcount, leading to a failure when killing the user process on device reset or device fini. Add the release of these left signals in the CS roll-back process. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../misc/habanalabs/common/command_submission.c | 46 +++++++++++++++---- drivers/misc/habanalabs/common/context.c | 53 +++++++++++++--------- drivers/misc/habanalabs/common/habanalabs.h | 3 +- 3 files changed, 71 insertions(+), 31 deletions(-) commit 2a599113b2f093874283a86bf8dd6c41023015c6 Author: ZhenGuo Yin Date: Fri Nov 18 16:24:07 2022 +0800 drm/amdgpu: update documentation of parameter amdgpu_gtt_size Fixes: f7ba887f606b ("drm/amdgpu: Adjust logic around GTT size (v3)") Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: ZhenGuo Yin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 98928baeb9b323a54b79838065f9bb5e9fa9b17e Author: Jane Jian Date: Wed Nov 16 18:22:52 2022 +0800 drm/amdgpu/vcn: re-use original vcn0 doorbell value root cause that S2A need to use deduct offset flag. after setting this flag, vcn0 doorbell value works. so return it as before Signed-off-by: Jane Jian Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmsch_v4_0.h | 1 - drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) commit ef5fca9f7294509ee5013af9e879edc5837c1d6c Author: lyndonli Date: Mon Nov 21 09:10:20 2022 +0800 drm/amdgpu: add the fan abnormal detection feature Update the SW CTF limit from existing register when there's a fan failure detected via SMU interrupt. Signed-off-by: lyndonli Reviewed-by: Hawking Zhang Reviewed-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 28 ++++++++++++++++++++++ .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 1 + 3 files changed, 30 insertions(+) commit 1ec13219a1a7e65a37d7c02a7dd4de470564b3c2 Author: lyndonli Date: Mon Nov 21 09:08:42 2022 +0800 drm/amd/pm: update driver if header for smu_13_0_7 update driver if header for smu_13_0_7 Signed-off-by: lyndonli Reviewed-by: Hawking Zhang Reviewed-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h | 117 ++++++++++++++------- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 80 insertions(+), 39 deletions(-) commit 48aa62f07467c8fcd4b4ec7851e13c83e89a1558 Author: Candice Li Date: Thu Nov 17 20:34:15 2022 +0800 drm/amd/pm: Enable bad memory page/channel recording support for smu v13_0_0 Send message to SMU to update bad memory page and bad channel info. Signed-off-by: Candice Li Reviewed-by: Evan Quan Signed-off-by: Alex Deucher .../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_0_ppsmc.h | 8 ++++- drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 4 ++- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 39 ++++++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) commit 177817d0afa609b9832cee302e6acde09c016c83 Author: Aric Cyr Date: Sun Nov 13 21:35:51 2022 -0500 drm/amd/display: 3.2.213 This version brings along following fixes: -Add configuration 2 for ABM 2.3/2.4. -Add margin for HUBP for SubVp + DRR. -Fix no display after resume from WB/CB. -Limit HW cursor size to be less than 64 x 64 bytes when the stream is >= 4K. -Lower watermarks for enter/enter+exit latency. -Update support types for DCN314 to include z8 only and z8_z10 only state. -Add new value for soc bounding box and dummy pstate. -Override fclk chang latency when calculating prefetch schedule for subvp with low uclk. -Add check for DET fetch latency for dcn32. -Add check if PSR enabled when entering MALL. -Use base MALL allocation size calculations off vewport height. -Add YCBCR2020 to CSC matrix. -Implement DP-Tx portion to interact with DPIA. -Add debug option for increasing phantom lines. -Fix phantom plane/stream retain after fail validation. -Fix display corruption with VSR enable. -Set valid divider value for virtual and FRL/DP2. -Add new num clk levels struct for max mclk index. -Fix check for phantom BPP. -Fix rotated cursor offset calculation. Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e640536a3c3dfa3734fc8cf101b9dec7116b62e5 Author: David Galiffi Date: Thu Nov 10 14:40:20 2022 -0500 drm/amd/display: Fix rotated cursor offset calculation [Why] Underflow is observed when cursor is still enabled when the cursor rectangle is outside the bounds of it's surface viewport. [How] Update parameters used to determine when cursor should be disabled. Reviewed-by: Martin Leung Acked-by: Brian Chang Signed-off-by: David Galiffi Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 34 ++++++++++++++++------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 28 +++++++++++++------ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 32 +++++++++++++-------- 3 files changed, 64 insertions(+), 30 deletions(-) commit 1a97a13152185d7fdc5b96bd1aa36ba209a605c7 Author: Alvin Lee Date: Fri Nov 11 16:21:54 2022 -0500 drm/amd/display: Revert check for phantom BPP [Description] Revert change since enabling SubVP on 8K60 single cable results in corruption Reviewed-by: Nevenko Stupar Reviewed-by: Martin Leung Acked-by: Brian Chang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 982ccdb2b9f91fdb83db06df1939035523c1323c Author: Dillon Varone Date: Fri Nov 11 14:06:58 2022 -0500 drm/amd/display: Use new num clk levels struct for max mclk index [WHY?] When calculating watermark and dlg values, the max mclk level index and associated speed are needed to find the correlated dummy latency value. Currently the incorrect index is given due to a clock manager refactor. [HOW?] Use num_memclk_level from num_entries_per_clk struct for getting the correct max mem speed. Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3aa827e2ab3ec40ca97a3f846892aac81ce5e3c Author: Taimur Hassan Date: Fri Nov 11 14:11:00 2022 -0500 drm/amd/display: Avoid setting pixel rate divider to N/A [Why] Pixel rate divider values should never be set to N/A (0xF) as the K1/K2 field is only 1/2 bits wide. [How] Set valid divider values for virtual and FRL/DP2 cases. Reviewed-by: Nicholas Kazlauskas Acked-by: Brian Chang Signed-off-by: Taimur Hassan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c | 6 ++---- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 4 +++- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 4 +--- 4 files changed, 13 insertions(+), 8 deletions(-) commit e643cd384270fd3a4b66f65f15dafc8db0607adc Author: Ilya Bakoulin Date: Fri Nov 11 12:03:54 2022 -0500 drm/amd/display: Fix display corruption w/ VSR enable [Why] Brief corruption is observed on hotplug/unplug with certain display configurations when VSR is enabled. [How] Work around the issue by avoiding 2to1 ODM when stream plane_count is 0. Reviewed-by: Dillon Varone Acked-by: Brian Chang Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b216b7e38f5381bcc3ad21c5ac614aa577ab8f2 Author: Alvin Lee Date: Fri Nov 11 12:14:37 2022 -0500 drm/amd/display: Retain phantom plane/stream if validation fails [Description] - If we fail validation, we should retain the phantom stream/planes - Full updates assume that phantom pipes will be fully removed, but if validation fails we keep the phantom pipes - Therefore we have to retain the plane/stream if validation fails (since the refcount is decremented before validation, and the expectation is that it's fully freed when the old dc_state is released) Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 13 +++++++++++++ .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 22 ++++++++++++++++++++++ .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 3 +++ .../drm/amd/display/dc/dcn321/dcn321_resource.c | 1 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 1 + 5 files changed, 40 insertions(+) commit e49c5e127918fc9756180f244c1f4814b8dfaa1e Author: Alvin Lee Date: Fri Nov 11 12:14:34 2022 -0500 drm/amd/display: Add debug options for increasing phantom lines [Description] - Add debug option for increasing number of phantom lines Reviewed-by: Nevenko Stupar Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 3 +++ 2 files changed, 4 insertions(+) commit fe4e2662b2ddccd7fa8fc034ed71880626fab279 Author: Mustapha Ghaddar Date: Wed Nov 2 10:14:16 2022 -0400 drm/amd/display: Phase 1 Add Bw Allocation source and header files [WHY] To implement BW Allocation as per USB4 spec chapter 10.7 [HOW] Implement the DP-Tx portion of the logic to interact with DPIA Reviewed-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Mustapha Ghaddar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_link.h | 14 +++++ .../gpu/drm/amd/display/dc/link/link_dp_dpia_bw.c | 28 +++++++++ .../gpu/drm/amd/display/dc/link/link_dp_dpia_bw.h | 69 ++++++++++++++++++++++ 3 files changed, 111 insertions(+) commit 7ce24a3606855f656f30c174e3078a1c642f1e41 Author: Rodrigo Siqueira Date: Thu Nov 3 09:38:14 2022 -0400 drm/amd/display: Add YCBCR2020 coefficients to CSC matrix When some of the IGT tests are executed in DCN31, it is possible to see multiple occurrences of this warning: WARNING: CPU: 9 PID: 3482 at drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dcn30/dcn30_dpp.c:154 dpp3_program_post_csc+0x196/0x220 [amdgpu] [..] PU: 9 PID: 3482 Comm: amd_hdr Tainted: G W 5.18.0+ #3 IP: 0010:dpp3_program_post_csc+0x196/0x220 [amdgpu] [..] all Trace: dpp3_cnv_setup+0x5d9/0x5f0 [amdgpu] ? dcn20_blank_pixel_data+0x30a/0x330 [amdgpu] dcn20_program_pipe+0x259/0xb40 [amdgpu] ? offset_to_id+0x1b0/0x1c0 [amdgpu] dcn20_program_front_end_for_ctx+0x36a/0x450 [amdgpu] commit_planes_for_stream+0x8eb/0x13e0 [amdgpu] This commit fix the above issue by adding YCBCR2020 coefficients to the DPP Color Space Converter (CSC) matrix. Reviewed-by: Nawwar Ali Acked-by: Brian Chang Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit fa5633c039cb6608d12276c91da627fad3944f79 Author: Dillon Varone Date: Thu Nov 10 12:13:47 2022 -0500 drm/amd/display: Use viewport height for subvp mall allocation size [WHY?] MALL allocation size depends on the viewport height, not the addressable vertical lines, which will not match when scaling. [HOW?] Base MALL allocation size calculations off viewport height. Reviewed-by: Alvin Lee Reviewed-by: Martin Leung Acked-by: Brian Chang Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf29274d77888f55cace715ec4e7bcd107aa8316 Author: Alvin Lee Date: Tue Nov 8 18:46:52 2022 -0500 drm/amd/display: Check if PSR enabled when entering MALL [Description] - When attempting to enter MALL SS when a PSR panel is connected, we have to check that the PSR panel has already entered PSR because the vsync interrupt call is per display index (can be called for the non-PSR panel first) - Also don't override link settings when programming phantom stream (main and phantom pipe share the same link) Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 9 +++++++-- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) commit 6d4727c80947de0e6fad58b196a9d215e3b32608 Author: Dillon Varone Date: Tue Nov 8 18:45:33 2022 -0500 drm/amd/display: Add check for DET fetch latency hiding for dcn32 [WHY?] Some configurations are constructed with very marginal DET buffers relative to the worst possible time required to fetch a swath. [HOW?] Add a check to see that the DET buffer allocated for each pipe can hide the latency for all pipes to fetch at least one swath. Reviewed-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 39 ++++++++++++ .../dc/dml/dcn32/display_mode_vba_util_32.c | 69 ++++++++++++++++++++++ .../dc/dml/dcn32/display_mode_vba_util_32.h | 18 ++++++ .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 2 + 4 files changed, 128 insertions(+) commit 0fc099c02a4eac89b67b2ce2e70e6c2a09a23853 Author: Dillon Varone Date: Mon Nov 7 14:58:55 2022 -0500 drm/amd/display: Use dummy pstate latency for subvp when needed on dcn32 [WHY?] Prefetch is not budgetting time for dummy pstate when using subvp and low uclk. [HOW?] Override fclk change latency to use dummy pstate latency when calculating prefetch schedule for subvp configs with low uclk. Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 61 +++++++++++++++++----- 1 file changed, 49 insertions(+), 12 deletions(-) commit c09e37fe666909718f9ae2eaa97d319f12f246d4 Author: Dillon Varone Date: Mon Nov 7 15:18:47 2022 -0500 drm/amd/display: Update soc bounding box for dcn32/dcn321 [Description] New values for soc bounding box and dummy pstate. Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit 80676936805e46c79c38008e5142a77a1b2f2dc7 Author: Nicholas Kazlauskas Date: Mon Nov 7 11:37:25 2022 -0500 drm/amd/display: Add Z8 allow states to z-state support list [Why] Even if we block Z9 based on crossover threshold it's possible to allow for Z8. [How] There's support for this on DCN314, so update the support types to include a z8 only and z8_z10 only state. Update the decide_zstate_support function to allow for specifying these modes based on the Z8 threshold. DCN31 has z-state disabled, but still update the legacy code to map z8_only = disallow and z10_z8_only = z10_only to keep the support the same. Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c | 4 ++-- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c | 12 ++++++++++-- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 12 +++++++++--- 4 files changed, 23 insertions(+), 7 deletions(-) commit fa24e116f1ce3dcc55474f0b6ab0cac4e3ee34e1 Author: Nicholas Kazlauskas Date: Mon Nov 7 11:35:25 2022 -0500 drm/amd/display: Update Z8 watermarks for DCN314 [Why & How] Update from HW, need to lower watermarks for enter/enter+exit latency. Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1f997af90102d99e14e59c72122ffa3a53752063 Author: Alvin Lee Date: Wed Nov 9 09:27:45 2022 -0500 drm/amd/display: Limit HW cursor size of >= 4k [Description] - For SubVP, we cannot support HW cursor if it's greater than 64 x 64 x 4 bytes in size - However, on certain config changes (i.e. pixel format) we can exit SubVP (then change to HW cursor) then re-enter SubVP without changing back to SW cursor because there is no SetCursorAttributes call - To workaround this issue, limit the HW cursor size to be less than 64 x 64 x 4 bytes whenever the stream is >= 4K - Also ensure this W/A only affects DCN that supports SubVP Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 16 ++++++++++++++-- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) commit 503dc81c32b7138b55133ea2146a6b850155098d Author: Tsung-hua Lin Date: Wed Nov 9 12:54:22 2022 +0800 drm/amd/display: No display after resume from WB/CB [why] First MST sideband message returns AUX_RET_ERROR_HPD_DISCON on certain intel platform. Aux transaction considered failure if HPD unexpected pulled low. The actual aux transaction success in such case, hence do not return error. [how] Not returning error when AUX_RET_ERROR_HPD_DISCON detected on the first sideband message. v2: squash in fix (Alex) Reviewed-by: Jerry Zuo Acked-by: Brian Chang Signed-off-by: Tsung-hua Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit ae7169a9a2edf915da436db57c71af7f3935feac Author: Alvin Lee Date: Mon Nov 7 17:07:32 2022 -0500 drm/amd/display: Add margin on DRR vblank start for subvp [Description] - Add margin for HUBP "jitter" for SubVp + DRR case - Also do a min transition even if MPO is added on a non SubVP pipe (i.e. added on DRR pipe for SubVP + DRR) Reviewed-by: Jun Lei Acked-by: Brian Chang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 18 +++++++++++++++++- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 1 + drivers/gpu/drm/amd/display/dc/dc_stream.h | 2 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + .../gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 1 + drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 3 ++- 7 files changed, 24 insertions(+), 3 deletions(-) commit 2aae59444cca97b580143d77c0c4f60c559848db Author: Camille Cho Date: Thu Aug 4 13:21:01 2022 +0800 drm/amd/display: new ABM config 2 [Why & How] Add configuration 2 for ABM 2.3/2.4 to suit customer preferences, which is to lower the brightness curves in 80%-100% range compared to the existing default config 0. Reviewed-by: Josip Pavic Acked-by: Brian Chang Signed-off-by: Camille Cho Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6110a80f31b74773a28394259695513e0ac38406 Author: Lyude Paul Date: Mon Nov 14 17:20:45 2022 -0500 drm/amd/dc/dce120: Fix audio register mapping, stop triggering KASAN There's been a very long running bug that seems to have been neglected for a while, where amdgpu consistently triggers a KASAN error at start: BUG: KASAN: global-out-of-bounds in read_indirect_azalia_reg+0x1d4/0x2a0 [amdgpu] Read of size 4 at addr ffffffffc2274b28 by task modprobe/1889 After digging through amd's rather creative method for accessing registers, I eventually discovered the problem likely has to do with the fact that on my dce120 GPU there are supposedly 7 sets of audio registers. But we only define a register mapping for 6 sets. So, fix this and fix the KASAN warning finally. Signed-off-by: Lyude Paul Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b85e285e3d6352b02947fc1b72303673dfacb0aa Author: Yang Yingliang Date: Thu Nov 17 23:00:03 2022 +0800 drm/amdgpu: fix pci device refcount leak As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, when finish using it, the caller must decrement the reference count by calling pci_dev_put(). So before returning from amdgpu_device_resume|suspend_display_audio(), pci_dev_put() is called to avoid refcount leak. Fixes: 3f12acc8d6d4 ("drm/amdgpu: put the audio codec into suspend state before gpu reset V3") Reviewed-by: Evan Quan Signed-off-by: Yang Yingliang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 96e1a88fafe6a9afd371fadc0c7de41b883aaec9 Author: Alex Deucher Date: Wed Nov 16 11:26:53 2022 -0500 drm/amdgpu/psp: don't free PSP buffers on suspend We can reuse the same buffers on resume. v2: squash in S4 fix from Shikai Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2213 Reviewed-by: Christian König Tested-by: Guilherme G. Piccoli Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 33ac94dbdfd5f0fdd820c82ef930e20ad346a063 Author: Lyude Paul Date: Fri Nov 18 14:54:05 2022 -0500 drm/amdgpu/dm/mst: Fix uninitialized var in pre_compute_mst_dsc_configs_for_state() Coverity noticed this one, so let's fix it. Fixes: 7cce4cd628be ("drm/amdgpu/mst: Stop ignoring error codes and deadlocking") Signed-off-by: Lyude Paul Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Cc: stable@vger.kernel.org # v5.6+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2b1df9296da6dd71bd1fe96d2df5509e13c372c Author: Jack Xiao Date: Wed Nov 16 16:44:21 2022 +0800 drm/amd/amdgpu: reserve vm invalidation engine for firmware If mes enabled, reserve VM invalidation engine 5 for firmware. Signed-off-by: Jack Xiao Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d0c2dd737bdea63c6c33be1436c63f12aaf87a5b Author: Bob zhou Date: Tue Nov 15 12:21:47 2022 +0800 drm/amd/display: 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 = flag_vlevel; i < context->bw_ctx.dml.soc.num_states; i++) { Signed-off-by: Bob zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1f615120fc9d24a8df7f14b0d1e79f3402330855 Author: Tomer Tayar Date: Wed Nov 16 13:14:02 2022 +0200 habanalabs: don't put context in hl_encaps_handle_do_release_sob() hl_encaps_handle_do_release_sob() can be called only when the last reference to the context object is released and hl_ctx_do_release() is initiated, and therefore it shouldn't call hl_ctx_put(). Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/context.c | 1 - 1 file changed, 1 deletion(-) commit 408c46bd6eb7a4e2fb9fd686218e4a13b9de844c Author: Tomer Tayar Date: Mon Nov 14 13:26:21 2022 +0200 habanalabs: print context refcount value if hard reset fails Failing to kill a user process during a hard reset can be due to a reference to the user context which isn't released. To make it easier to understand if this the reason for the failure and not something else, add a print of the context refcount value. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 0abcae8b48850e0f488d0eb7232323d93bdc4b13 Author: Dafna Hirschfeld Date: Sun Oct 30 16:49:42 2022 +0200 habanalabs: add RMWREG32_SHIFTED to set a val within a mask This is similar to RMWREG32, but the given 'val' is already shifted according to the mask. This allows several 'ORed' vals and masks to be set at once The patch also fixes wrong usage of RMWREG32 by replacing it with RMWREG32_SHIFTED Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs.h | 10 +++------- drivers/misc/habanalabs/gaudi2/gaudi2.c | 6 +++--- 2 files changed, 6 insertions(+), 10 deletions(-) commit 56fb517775f4d71dbca2b1fb3562276138361072 Author: Tomer Tayar Date: Fri Nov 18 15:08:33 2022 +0200 habanalabs: fix rc when new CPUCP opcodes are not supported When the new CPUCP opcodes are not supported and a CPUCP packet fails, the return value is the F/W error resposone which is a positive value. If this packet is sent from IOCTL and the positive value is used, the ICOTL will not be considered as unsuccessful. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/firmware_if.c | 1 + 1 file changed, 1 insertion(+) commit 7cbf00bd4142cd88ac7ecbc4ea7b917a220cb721 Author: Pierre-Louis Bossart Date: Fri Nov 11 09:31:34 2022 +0800 soundwire: intel: split auxdevice to different file The auxdevice layer is completely generic, it should be split from intel.c which is only geared to the 'cnl' hw_ops now. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111013135.38289-8-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/Makefile | 2 +- drivers/soundwire/intel.c | 657 ---------------------------------- drivers/soundwire/intel.h | 11 +- drivers/soundwire/intel_auxdevice.c | 678 ++++++++++++++++++++++++++++++++++++ drivers/soundwire/intel_auxdevice.h | 18 + drivers/soundwire/intel_init.c | 1 + 6 files changed, 700 insertions(+), 667 deletions(-) commit 36e3b385f35a33a10b792ec46350dd87d79e84dd Author: Pierre-Louis Bossart Date: Fri Nov 11 09:31:33 2022 +0800 soundwire: intel: add in-band wake callbacks in hw_ops No functionality change, only add indirection for in-band wake management helpers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111013135.38289-7-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/intel.c | 11 +++++++---- drivers/soundwire/intel.h | 13 +++++++++++++ include/linux/soundwire/sdw_intel.h | 5 +++++ 3 files changed, 25 insertions(+), 4 deletions(-) commit 49c9ff45991a5a62e040c8b43c89a9ab38a0a91f Author: Pierre-Louis Bossart Date: Fri Nov 11 09:31:32 2022 +0800 soundwire: intel: add link power management callbacks in hw_ops No functionality change, only add indirection for link power management helpers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111013135.38289-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/intel.c | 23 +++++++++++++---------- drivers/soundwire/intel.h | 14 ++++++++++++++ include/linux/soundwire/sdw_intel.h | 5 +++++ 3 files changed, 32 insertions(+), 10 deletions(-) commit 3db0c5a6a2832c7b4b40676299e4bbbe1a96bc8b Author: Pierre-Louis Bossart Date: Fri Nov 11 09:31:31 2022 +0800 soundwire: intel: add bus management callbacks in hw_ops No functionality change, only add indirection for bus management helpers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111013135.38289-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/intel.c | 24 +++++++++++++++--------- drivers/soundwire/intel.h | 34 ++++++++++++++++++++++++++++++++++ include/linux/soundwire/sdw_intel.h | 11 +++++++++++ 3 files changed, 60 insertions(+), 9 deletions(-) commit b6234bcc6589a0719ec91d810114c0b556a5b88b Author: Pierre-Louis Bossart Date: Fri Nov 11 09:31:30 2022 +0800 soundwire: intel: add register_dai callback in hw_ops No functionality change, only add indirection for DAI registration helper. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111013135.38289-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/intel.c | 4 +++- drivers/soundwire/intel.h | 7 +++++++ include/linux/soundwire/sdw_intel.h | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) commit fb2dc6a0a5f885233d632b1e92be9c0be977b0dc Author: Pierre-Louis Bossart Date: Fri Nov 11 09:31:29 2022 +0800 soundwire: intel: add debugfs callbacks in hw_ops No functionality change, only add indirection for debugfs helpers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111013135.38289-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/intel.c | 7 +++++-- drivers/soundwire/intel.h | 16 ++++++++++++++++ include/linux/soundwire/sdw_intel.h | 5 +++++ 3 files changed, 26 insertions(+), 2 deletions(-) commit b3ad31f33982497dbc7a66a9d3013b1ac6985dfe Author: Pierre-Louis Bossart Date: Fri Nov 11 09:31:28 2022 +0800 soundwire: intel: start using hw_ops Before introducing new hardware with completely different register spaces and programming sequences, we need to abstract some of the existing routines in hw_ops that will be platform-specific. For now we only use the 'cnl' ops - after the first Intel platform with SoundWire capabilities. Rather than one big intrusive patch, hw_ops are introduced in this patch so show the dependencies between drivers. Follow-up patches will introduce callbacks for debugfs, power and bus management. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111013135.38289-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/intel.c | 38 +++++++++++++++++++++++++++++-------- drivers/soundwire/intel.h | 3 +++ drivers/soundwire/intel_init.c | 1 + include/linux/soundwire/sdw_intel.h | 15 +++++++++++++++ sound/soc/sof/intel/hda.c | 2 ++ 5 files changed, 51 insertions(+), 8 deletions(-) commit 6825b5f81f273fcc1ec61e7e203b0ea40d9987fc Author: Marco Pagani Date: Wed Nov 23 09:56:39 2022 +0100 habanalabs/gaudi2: added memset for the cq_size register The clang-analyzer reported a warning: "Value stored to 'cq_size_addr' is never read". The cq_size register of dcore0 is not being zeroed using gaudi2_memset_device_lbw(), along with the other cq_* registers, even though the corresponding cq_size_addr variable is set. Signed-off-by: Marco Pagani Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 1 + 1 file changed, 1 insertion(+) commit ca1c131ccf6e09f4976aeca035f12529c9a7d8a9 Merge: febc50b82bc9 49a467310dc4 Author: Vinod Koul Date: Wed Nov 23 19:51:09 2022 +0530 Merge branch 'fixes' into next Merge fixes into next as Intel driver has a dependency commit 3b5b07dde998f6ade7433a8db019cf816c7e35af Author: Uwe Kleine-König Date: Fri Nov 18 23:44:53 2022 +0100 regulator: tps65023-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-560-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/tps65023-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 18804160277ec2ab992373385f86c6af2322b28b Author: Uwe Kleine-König Date: Fri Nov 18 23:44:51 2022 +0100 regulator: tps62360-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-558-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/tps62360-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4e85e5d64f66ac5e4b0286ee4b6f8e8ce1044d42 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:45 2022 +0100 regulator: max8973-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-552-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/max8973-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dbf31dac703009174226bb87b3914bd092040327 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:43 2022 +0100 regulator: max8660: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-550-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/max8660.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 78c8f6cdb51d471928d481ed3b2c82dbc110a1ed Author: Uwe Kleine-König Date: Fri Nov 18 23:44:40 2022 +0100 regulator: ltc3589: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-547-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/ltc3589.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 87feccb347b25f5dc6ff451123b832c9ad5dddfe Author: Uwe Kleine-König Date: Fri Nov 18 23:44:38 2022 +0100 regulator: lp872x: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-545-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/lp872x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7f69edba960bbdcbc829d8d0995b1117ce29e8b1 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:33 2022 +0100 regulator: ad5398: 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: Michael Hennerich Acked-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-540-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/ad5398.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5908560a7f14171d1100f4a357deda659dc26868 Author: Marco Pagani Date: Wed Nov 16 14:41:25 2022 +0100 habanalabs: added return value check for hl_fw_dynamic_send_clear_cmd() The clang-analyzer reported a warning: "Value stored to 'rc' is never read". The return value check for the first hl_fw_dynamic_send_clear_cmd() call in hl_fw_dynamic_send_protocol_cmd() appears to be missing. Signed-off-by: Marco Pagani Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/firmware_if.c | 2 ++ 1 file changed, 2 insertions(+) commit 01907ba5252164ca6bf0de670660cd94d77c378c Author: Tomer Tayar Date: Sun Oct 23 12:55:21 2022 +0300 habanalabs: increase the size of busy engines mask Increase the size of the busy engines mask in 'struct hl_info_hw_idle', for future ASICs with more than 128 engines. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 9 +++++---- include/uapi/misc/habanalabs.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) commit 18cd948204fffa61660d3f8454fc9d275c1f6c94 Author: farah kassabri Date: Tue Nov 8 15:24:33 2022 +0200 habanalabs/gaudi2: change memory scrub mechanism Currently the scrubbing mechanism used the EDMA engines by directly setting the engine core registers to scrub a chunk of memory. Due to a sporadic failure with this mechanism, it was decided to initiate the engines via its QMAN using LIN-DMA packets. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 129 ++++++++++++++++++++------------ 1 file changed, 83 insertions(+), 46 deletions(-) commit b585daa89d572210a94c7f11a746bd5489017003 Author: Oded Gabbay Date: Thu Nov 10 17:24:02 2022 +0200 habanalabs: extend process wait timeout in device fine Processes that use our device are likely to use at the same time other devices such as remote storage. In case our device is removed and a user process is still using the device, we need to kill the user process. However, if that process has a thread waiting for i/o to complete on remote storage, for example, the process won't terminate. Let's give it enough time to terminate before giving up. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar drivers/misc/habanalabs/common/device.c | 6 ++++-- drivers/misc/habanalabs/common/habanalabs.h | 11 ++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) commit f69c3e460a614cba8939f7c623f7b77f0bcb3584 Author: Oded Gabbay Date: Thu Nov 10 17:05:24 2022 +0200 habanalabs: check schedule_hard_reset correctly schedule_hard_reset can be true only if we didn't do hard-reset. Therefore, no point of checking it in case hard_reset is true. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar drivers/misc/habanalabs/common/device.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit bc8e4bae70237f4671e07f83bcfb726eb14d86ed Author: Tomer Tayar Date: Wed Nov 9 18:08:38 2022 +0200 habanalabs: reset device if still in use when released If the device file is released while a context is still held, it won't be possible to reopen it until the context is eventually released. If that doesn't happen, only a device reset will revert it back to an operational state, i.e. need to wait for a CS timeout or an error, or to wait for an external intervention of injecting a reset via sysfs. At this stage, after the device was released by user, context is held either because of CS which were left running on the device and are not relevant anymore, or due to missing cleanup steps from user side. All of this is in any case handled in the device reset flow, so initiate the reset at this point instead of waiting for it. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9c604af0c9d4efe4f308761229186768b3f3a6a9 Author: Tomer Tayar Date: Thu Oct 20 14:40:16 2022 +0300 habanalabs/gaudi2: return to reset upon SM SEI BRESP error Due to a H/W issue in the LBW path to the PCIE_DBI MSI-X doorbell, there were false sporadic error responses in SM when it was configured to write to there, and hence no reset was done as part of handling the relevant event. Now that the virtual MSI-X doorbell is used, such errors in SM are not expected and reset shouldn't be skipped. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 2c77ec14c2db228f76a74e9123aecbb5b8c994f5 Author: Tomer Tayar Date: Thu Oct 20 12:05:09 2022 +0300 habanalabs/gaudi2: don't enable entries in the MSIX_GW table User should use the virtual MSI-X doorbell to generate interrupts from the device, so there is no need to enable entries in the MSIX_GW table. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit 24c983c88f5e7865de972e3b395baf2c237485ca Author: farah kassabri Date: Tue Nov 8 13:23:17 2022 +0200 habanalabs/gaudi2: remove redundant firmware version check Firmware 1.7 is the first official firmware, so no need to check if we are running a version below it. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fe3e88c9470ceb2ea67651aa397f29e80453eed1 Author: Tomer Tayar Date: Mon Nov 7 16:34:32 2022 +0200 habanalabs/gaudi: fix print for firmware-alive event Add missing le{32,64}_to_cpu conversions. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5f8981d699ed33017ff2212ec17f6cde89212756 Author: Tomer Tayar Date: Mon Nov 7 16:20:03 2022 +0200 habanalabs: fix print for out-of-sync and pkt-failure events Add missing le32_to_cpu() conversions, and use %d for the value returned from atomic_read(). Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 4 ++-- drivers/misc/habanalabs/gaudi2/gaudi2.c | 8 ++++---- drivers/misc/habanalabs/goya/goya.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit d3027f4a625063c18becd6953b4a2a273033b071 Author: Dani Liberman Date: Mon Oct 31 23:04:14 2022 +0200 habanalabs/gaudi2: add page fault notify event Each time page fault happens, besides capturing its data, also notify the user about it. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit a63de89bee7ff01dc184fbe289eade5b5ab5f49a Author: Ofir Bitton Date: Sun Nov 6 12:07:03 2022 +0200 habanalabs/gaudi2: classify power/thermal events as info As power and thermal envelope events are pure informative and not indicating an error, we reduce the print level to info only. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 1 + 1 file changed, 1 insertion(+) commit b829e01025f8936bb85bdc39cbd1faddcca290d0 Author: Ohad Sharabi Date: Sun Nov 6 09:26:01 2022 +0200 habanalabs: skip events info ioctl if not supported Some ASICs haven't yet implemented this functionality and so the ioctl call should fail and the user should be notified of the reason. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs_ioctl.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3daa64eea1fb219c8cfb3bb6948dc2993652e201 Author: farah kassabri Date: Thu Sep 22 14:24:35 2022 +0300 habanalabs: fix firmware descriptor copy operation This is needed to allow adding more data to the lkd_fw_comms_desc structure. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/firmware_if.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 413bdb176eaa7d02c979a3c738738aea91fe6ed7 Author: Dani Liberman Date: Sun Oct 30 14:46:19 2022 +0200 habanalabs/gaudi2: add razwi notify event Each time razwi (read-only zero, write ignored) event happens, besides capturing its data, also notify the user about it. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 4 +- drivers/misc/habanalabs/gaudi2/gaudi2.c | 140 ++++++++++++++++++-------------- 2 files changed, 82 insertions(+), 62 deletions(-) commit 91bd822448e57a55d12dc0461909b5c585485a6c Author: Ofir Bitton Date: Sun Oct 30 15:10:13 2022 +0200 habanalabs/gaudi2: implement fp32 not supported event Due to binning, Gaudi2 does not always support fp32. We add support for such an event in case fp32 is used by the user in such a device. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 5 +++++ drivers/misc/habanalabs/include/gaudi2/gaudi2_async_events.h | 1 + .../misc/habanalabs/include/gaudi2/gaudi2_async_ids_map_extended.h | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) commit aff6354afd1f9eae1e10658c157c26e316806f56 Author: Dani Liberman Date: Mon Oct 31 11:44:45 2022 +0200 habanalabs/gaudi: add page fault notify event Each time page fault happens, besides capturing its data, also notify the user about it. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 9 +++++++++ drivers/misc/habanalabs/common/habanalabs.h | 2 ++ drivers/misc/habanalabs/gaudi/gaudi.c | 6 +++--- include/uapi/misc/habanalabs.h | 2 ++ 4 files changed, 16 insertions(+), 3 deletions(-) commit cd21701cde33123fc53c6401192219ba14832da3 Author: Dani Liberman Date: Thu Oct 27 20:38:26 2022 +0300 habanalabs: use single threaded WQ for event handling Creating event queue workqueue using alloc_workqueue made it run in multi threaded mode, which caused parallel dumping of events as well as parallel events notifying to user, causing logs with multiple events to be out of order. Fixed by creating event queue workqueue as single threaded work queue. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb5fb665f30388cf8cb9becae86dcb84ace0ca88 Author: Dani Liberman Date: Sun Oct 30 13:08:37 2022 +0200 habanalabs/gaudi: add razwi notify event Each time razwi (read-only zero, write ignore) happens, besides capturing its data, also notify the user about it. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 8 +++++++ drivers/misc/habanalabs/common/habanalabs.h | 2 ++ drivers/misc/habanalabs/gaudi/gaudi.c | 37 +++++++++++++++-------------- include/uapi/misc/habanalabs.h | 2 ++ 4 files changed, 31 insertions(+), 18 deletions(-) commit 841cd2d7658d92e09354640c1887797f0da3d444 Author: Ofir Bitton Date: Wed Oct 26 16:20:45 2022 +0300 habanalabs/gaudi2: add PCI revision 2 support Add support for Gaudi2 Device with PCI revision 2. Functionality is exactly the same as revision 1, the only difference is device name exposed to user. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 4 ++++ drivers/misc/habanalabs/common/habanalabs.h | 2 ++ drivers/misc/habanalabs/common/habanalabs_drv.c | 26 +++++++++++++++------- drivers/misc/habanalabs/common/habanalabs_ioctl.c | 6 +++-- drivers/misc/habanalabs/common/mmu/mmu.c | 1 + drivers/misc/habanalabs/common/sysfs.c | 2 ++ drivers/misc/habanalabs/gaudi2/gaudi2.c | 6 +---- drivers/misc/habanalabs/gaudi2/gaudi2P.h | 2 -- .../habanalabs/include/hw_ip/pci/pci_general.h | 7 ++++++ include/uapi/misc/habanalabs.h | 7 ++++++ 10 files changed, 46 insertions(+), 17 deletions(-) commit 306206985a4bcfc12b45596d56c7bd8ba6f0f6b1 Author: Ofir Bitton Date: Wed Oct 26 18:20:49 2022 +0300 habanalabs: remove redundant gaudi2_sec asic type As Gaudi2 has a single PCI id, the secured asic type is redundant. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 3 --- drivers/misc/habanalabs/common/habanalabs.h | 2 -- drivers/misc/habanalabs/common/mmu/mmu.c | 1 - drivers/misc/habanalabs/common/sysfs.c | 2 -- drivers/misc/habanalabs/gaudi2/gaudi2.c | 2 +- 5 files changed, 1 insertion(+), 9 deletions(-) commit bdfef91e7c9c2bae083ce1965f53115d88329773 Author: Ofir Bitton Date: Wed Oct 19 14:05:18 2022 +0300 habanalabs: add warning print upon a PCI error In order to know if driver catches PCI errors correctly, we need to print a warning per each error. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs_drv.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit fc69aa8640f8baf9c1246c17ca858bab9aea98b0 Author: Tomer Tayar Date: Mon Oct 24 01:14:18 2022 +0300 habanalabs: fix PCIe access to SRAM via debugfs hl_access_sram_dram_region() uses a region base which is set within the hl_set_dram_bar() function. However, for SRAM access this function is not called, and we end up with a wrong value of region base and with a bad calculated address. Fix it by initializing the region base value independently of whether hl_set_dram_bar() is called or not. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 679e968908a4997d02c2a7df294e97b066f9149f Author: farah kassabri Date: Tue Sep 20 11:48:40 2022 +0300 habanalabs: zero ts registration buff when allocated To avoid memory corruption in kernel memory while using timestamp registration nodes, zero the kernel buff memory when its allocated. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a9c6e2cdf2b4128f5204b9cf14e3a788a8511df Author: Tal Cohen Date: Tue Oct 18 17:35:06 2022 +0300 habanalabs: no consecutive err when user context is enabled Consecutive error protects a device reset loop from being triggered due to h/w issues and enters the device into an unavailable state. When user may cause the error, an unavailable state will prevent the user from running its workloads. The commit prevents entering consecutive state when a user context is enabled. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1b363adc7fbe37c4b6c18864c1f7043d85b4af6e Author: Tomer Tayar Date: Fri Sep 30 17:02:19 2022 +0300 habanalabs: use graceful hard reset for CS timeouts Use graceful hard reset when detecting a CS timeout that requires a device reset. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/command_submission.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d1ce7e5ea140bb01d8c6faded09b9264bb83f722 Author: Tomer Tayar Date: Fri Sep 30 16:57:54 2022 +0300 habanalabs/gaudi2: use graceful hard reset for F/W events Use graceful hard reset for F/W events on Gaudi2 device that require a device reset. While at it, do a small refactor of the checks and function calls, to simplify it and to avoid code duplication. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 5b8873b39c5d4ee93e382389b199d553b38b19f3 Author: Tomer Tayar Date: Fri Sep 30 16:43:47 2022 +0300 habanalabs/gaudi: use graceful hard reset for F/W events Use graceful hard reset for F/W events on Gaudi device that require a device reset. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi/gaudi.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 11669b58fa1cee8442ae31ad4ba71398729727b5 Author: Tomer Tayar Date: Fri Sep 30 16:37:41 2022 +0300 habanalabs: add an option to control watchdog timeout via debugfs Add an option to control the timeout value for the driver's watchdog of the reset process. The timeout represents the amount of the user has to close his process once he gets a device reset notification from the driver. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Documentation/ABI/testing/debugfs-driver-habanalabs | 7 +++++++ drivers/misc/habanalabs/common/debugfs.c | 5 +++++ 2 files changed, 12 insertions(+) commit a88a6f5f5cdfce21aaf988370287e0e78970c8ad Author: Tomer Tayar Date: Fri Sep 30 15:08:13 2022 +0300 habanalabs: add support for graceful hard reset Calling hl_device_reset() for a hard reset will lead to a quite immediate device reset and to killing user process. For resets that follow errors, it disables the option to debug the errors on both the device side and the user application side. This patch adds a 'graceful hard reset' option and a new hl_device_cond_reset() function. Under some conditions, mainly if there is no user process or if he is not registered to driver notifications, this function will execute hard reset as usual. Otherwise, the reset will be postponed and a notification will be sent to user, to let him perform post-error actions and then to release the device, after which reset will take place. If device is not released by user in some defined time, a watchdog work will execute the reset in any case. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 141 +++++++++++++++++++++++++--- drivers/misc/habanalabs/common/habanalabs.h | 14 ++- 2 files changed, 140 insertions(+), 15 deletions(-) commit d1e0ac37ed41e581c030a8fffe4ad1d0bb987872 Author: Ohad Sharabi Date: Sun Oct 23 14:46:08 2022 +0300 habanalabs: avoid divide by zero in device utilization Currently there is no verification whether the divisor is legal. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 6bcb2d05a59b3534821a194f8642808ae56f2d10 Author: Dani Liberman Date: Wed Oct 19 20:24:55 2022 +0300 habanalabs: fix user mappings calculation in case of page fault As there are 2 types of user mappings, pmmu and hmmu, calculate only the relevant mappings for the requested type. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5ad06bb1d2c073c8b071016226fb9ebe2163e660 Author: Tomer Tayar Date: Thu Oct 20 11:29:03 2022 +0300 habanalabs/gaudi2: remove configurations to access the MSI-X doorbell The virtual MSI-X doorbell is supported now in F/W, so all configurations to access the PCIE_DBI MSI-X doorbell can be removed. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 34 +++------------------------------ 1 file changed, 3 insertions(+), 31 deletions(-) commit e325d5dbf34500fd42d5847d5b8c4e097f8030af Author: Ohad Sharabi Date: Wed Sep 14 08:53:29 2022 +0300 habanalabs: allow setting HBM BAR to other regions Up until now the use-case in the driver was that the HBM is accessed using the HBM BAR, yet the BAR sometimes cannot cover the whole HBM and so we needed to set the BAR to other HBM offset. Now we are facing the need to access other PCI memory regions that can be covered by the HBM BAR. To answer that we are allowing the caller to determine if the HBM BAR need to be set or not regardless of the PCI memory region. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 29 ++++++++++++++++------------- drivers/misc/habanalabs/common/habanalabs.h | 2 ++ 2 files changed, 18 insertions(+), 13 deletions(-) commit 24fdfb359cadd222de8ba9d2d6a3f4dfc514878a Author: Ohad Sharabi Date: Tue Oct 18 08:51:33 2022 +0300 habanalabs: fix using freed pointer The code uses the pointer for trace purpose (without actually dereference it) but still get static analysis warning. This patch eliminate the warning. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit dc8d243caea8056bd2580b0f1703fe019d3b4419 Author: Dilip Puri Date: Wed Oct 12 11:06:48 2022 +0300 habanalabs/gaudi2: unsecure CBU_EARLY_BRESP registers NIC ARCs need to have access to CBU_EARLY_BRESP, hence we unsecure those registers. Signed-off-by: Dilip Puri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2_security.c | 1 + 1 file changed, 1 insertion(+) commit 27cd39afde454ca8f9a438cfc84d676e96b36bd7 Author: Tal Cohen Date: Mon Oct 3 13:55:50 2022 +0300 habanalabs: verify no zero event is sent The event notifier mechanism should not raise an empty event (event equals zero). Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 5 +++++ drivers/misc/habanalabs/gaudi/gaudi.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 4f11694f27582fa0875c4be7d133e0ae88ad36f8 Author: Dani Liberman Date: Thu Sep 29 10:28:36 2022 +0300 habanalabs/gaudi2: capture page fault data Capture page fault data when it happens. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 1 + 1 file changed, 1 insertion(+) commit 15ac503cdc0d9a1275d82a926c673359cf69ebef Author: Dani Liberman Date: Wed Sep 28 22:14:55 2022 +0300 habanalabs/gaudi2: capture RAZWI information Added function to calculate possible engines which caused RAZWI (read-only zero, write ignored), from a given router id or module index. When getting RAZWI via PSOC IP, first the router id is calculated and then the possible engines that caused the RAZWI are calculated. There is a possibility that the RAZWI initiator is not an engine. In that case, it will not be included in possible engines as it doesn't have an engine id. RAZWI information is captured when receiving event from engine or via PSOC IP. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 255 +++++++++++++++++++++++++++++--- include/uapi/misc/habanalabs.h | 4 + 2 files changed, 242 insertions(+), 17 deletions(-) commit 17f3f42af2bcddc38ff08b355e007f3b6d5ce70c Author: Dani Liberman Date: Thu Sep 29 10:21:28 2022 +0300 habanalabs: handle HBM MMU when capturing page fault data In case of HBM MMU page fault, capture its relevant mappings. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 1eebb259290b1be5398fec953bdd7923a5cbf33e Author: Tomer Tayar Date: Fri Sep 30 14:36:27 2022 +0300 habanalabs: move reset workqueue to be under hl_device 'struct hl_device_reset_work' is used as a wrapper for the reset work and its parameters, including the reset workqueue on which it runs. In a future commit, another reset related work with similar parameters is going to be added, but it won't use the reset workqueue. As in any case there is a single reset workqueue, and to allow the resue of this structure, move the reset workqueue to 'struct hl_device'. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 15 ++++++--------- drivers/misc/habanalabs/common/habanalabs.h | 12 ++++++------ 2 files changed, 12 insertions(+), 15 deletions(-) commit 51236cd95e7bcea41e57fb2cf238312be21dcf58 Author: Tomer Tayar Date: Fri Sep 30 14:19:21 2022 +0300 habanalabs: allow unregistering eventfd when device non-operational Unregistering eventfd is for releasing host resources and doesn't involve an access to the device. As such, there is no reason to disallow it when device isn't operational. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs_ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3a83ebc521b2e57af070b5667c60ac2d50347658 Author: Tomer Tayar Date: Fri Sep 30 14:09:32 2022 +0300 habanalabs: skip idle status check if reset on device release If reset upon device release is enabled, there is no need to check the device idle status in hpriv_release(), because device is going to be reset in any case. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 5731b6e6f08a4a3adf944fd0436f77f3e9ce1725 Author: Tal Cohen Date: Wed Sep 28 18:33:19 2022 +0300 habanalabs/gaudi2: add device unavailable notification Device unavailable notifies the user that there isn't an option to retrieve debug information from the device. When a critical device error occurs and the f/w performs the device reset, a device unavailable notification shall be sent to the user process. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 16448d644404351e685466ab14e7e043ad67673c Author: Koby Elbaz Date: Wed Sep 28 15:56:13 2022 +0300 habanalabs/gaudi2: remove privileged MME clock configuration Privileged MME clock configuration is removed as it is done by the f/w. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 189b203ebbea181d678b4d8bf3547eb78c8ae44a Author: Dafna Hirschfeld Date: Wed Sep 28 11:38:00 2022 +0300 habanalabs: replace 'pf' to 'prefetch' pf was an abbreviation for prefetch but because pf already stands for 'physical function', we decided to change it to 'prefetch'. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 14 +++++++------- drivers/misc/habanalabs/common/habanalabs.h | 8 ++++---- drivers/misc/habanalabs/common/mmu/mmu.c | 22 +++++++++++----------- 3 files changed, 22 insertions(+), 22 deletions(-) commit dd600db47ba60c3c69d4d24c73c43133c6040118 Author: Dani Liberman Date: Sun Sep 18 21:37:31 2022 +0300 habanalabs: add page fault info uapi Only the first page fault will be saved. Besides the address which caused the page fault, the driver captures all of the mmu user mappings. User can retrieve this data via the new uapi (new opcode in INFO ioctl). Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 58 +++++++++++++++++++++++ drivers/misc/habanalabs/common/habanalabs.h | 22 ++++++++- drivers/misc/habanalabs/common/habanalabs_drv.c | 1 + drivers/misc/habanalabs/common/habanalabs_ioctl.c | 42 ++++++++++++++++ drivers/misc/habanalabs/gaudi/gaudi.c | 2 + include/uapi/misc/habanalabs.h | 31 ++++++++++++ 6 files changed, 155 insertions(+), 1 deletion(-) commit 6d1c567f2ac66391edf5423247f27c82f6b82d86 Author: Tomer Tayar Date: Thu Sep 22 15:25:46 2022 +0300 habanalabs/gaudi2: fix module ID for RAZWI handling RAZWI is optionally handled as part of the generic QM SEI error handling, but it always uses PDMA as the module ID. Fix it to use the suitable module ID according to the specific event. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/gaudi2/gaudi2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0502df9bbea0bd0e77c4a283e4cc34801038899a Author: Bharat Jauhari Date: Tue Sep 27 14:38:38 2022 +0300 habanalabs: use lower_32_bits() This fixes sparse warning on doing cast to 32-bits Signed-off-by: Bharat Jauhari Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/habanalabs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 52d5e5469526216bcc418f26a2796d5af6226023 Author: Dani Liberman Date: Mon Sep 19 18:51:59 2022 +0300 habanalabs: refactor razwi event notification This event notification was compatible only with gaudi, where razwi and page fault happens together. To make it compatible with all ASICs, this refactor contains: 1. Razwi notification will only notify about razwi info. New notification will be added in future patch, to retrieve data about page fault error. 2. Changed razwi info structure to support all ASICs. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 22 ++++++++ drivers/misc/habanalabs/common/habanalabs.h | 31 +++-------- drivers/misc/habanalabs/common/habanalabs_drv.c | 2 +- drivers/misc/habanalabs/common/habanalabs_ioctl.c | 12 ++--- drivers/misc/habanalabs/gaudi/gaudi.c | 64 ++++++++++------------- include/uapi/misc/habanalabs.h | 45 ++++++++++------ 6 files changed, 90 insertions(+), 86 deletions(-) commit ea73ef14ddf93b8b1ae6ce1963846f43a81bb510 Author: Oded Gabbay Date: Thu Sep 22 12:30:32 2022 +0300 habanalabs: Use simplified API for p2p dist calc Use the simplified API that calculates distance between two devices. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a925d90b365aa38565191857bddc3c12d80fda96 Author: Ofir Bitton Date: Tue Aug 23 15:14:14 2022 +0300 habanalabs: allow control device open during reset Monitoring apps would like to query device state at any time so we should allow it also during reset because it doesn't involve accessing the h/w. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/device.c | 22 ++++++++++++++++++++++ drivers/misc/habanalabs/common/habanalabs.h | 2 ++ drivers/misc/habanalabs/common/habanalabs_drv.c | 4 ++-- 3 files changed, 26 insertions(+), 2 deletions(-) commit 8749c27895a369a99e4a21709b3e3bec4785778f Author: Yang Yingliang Date: Fri Sep 23 22:39:13 2022 +0800 habanalabs: fix return value check in hl_fw_get_sec_attest_data() If hl_cpu_accessible_dma_pool_alloc() fails, we should check 'req_cpu_addr', fix it. Fixes: 0c88760f8f5e ("habanalabs/gaudi2: add secured attestation info uapi") Signed-off-by: Yang Yingliang Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/common/firmware_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 739a6a6bbdb793bd57938cb24aa5a6df89983546 Author: Xiu Jianfeng Date: Wed Nov 23 17:12:01 2022 +0800 clk: rockchip: Fix memory leak in rockchip_clk_register_pll() If clk_register() fails, @pll->rate_table may have allocated memory by kmemdup(), so it needs to be freed, otherwise will cause memory leak issue, this patch fixes it. Fixes: 90c590254051 ("clk: rockchip: add clock type for pll clocks and pll used on rk3066") Signed-off-by: Xiu Jianfeng Link: https://lore.kernel.org/r/20221123091201.199819-1-xiujianfeng@huawei.com Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-pll.c | 1 + 1 file changed, 1 insertion(+) commit 4284354758d67cf77ab2a4494e28d4c05fb83074 Author: Jinlong Chen Date: Tue Nov 22 22:21:26 2022 +0800 elevator: remove an outdated comment in elevator_change mq is no longer a special case. Signed-off-by: Jinlong Chen Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/cbf47824fc726440371e74c867bf635ae1b671a3.1669126766.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/elevator.c | 3 --- 1 file changed, 3 deletions(-) commit f69b5e8f356e4e57e94b806ca1dcb9771933bb9c Author: Jinlong Chen Date: Tue Nov 22 22:21:25 2022 +0800 elevator: update the document of elevator_match elevator_match does not care about elevator_features any more. Remove related descriptions from its document. Fixes: ffb86425ee2c ("block: don't check for required features in elevator_match") Signed-off-by: Jinlong Chen Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/a58424555202c07a9ccf7f60c3ad7e247da09e25.1669126766.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/elevator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e0cca8bc9cd8d6176921cb3f5f466d3ccfbc6b99 Author: Jinlong Chen Date: Tue Nov 22 22:21:24 2022 +0800 elevator: printk a warning if switching to a new io scheduler fails printk a warning to indicate that the io scheduler has been set to none if switching to a new io scheduler fails. Suggested-by: Christoph Hellwig Signed-off-by: Jinlong Chen Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/d51ed0fb457db7a4f9cbb0dbce36d534e22be457.1669126766.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/elevator.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e80bd08fd75a644e2337fb535c1afdb6417357ff Author: Edward Cree Date: Mon Nov 21 21:37:08 2022 +0000 sfc: ensure type is valid before updating seen_gen In the case of invalid or corrupted v2 counter update packets, efx_tc_rx_version_2() returns EFX_TC_COUNTER_TYPE_MAX. In this case we should not attempt to update generation counts as this will write beyond the end of the seen_gen array. Reported-by: coverity-bot Addresses-Coverity-ID: 1527356 ("Memory - illegal accesses") Fixes: 25730d8be5d8 ("sfc: add extra RX channel to receive MAE counter updates on ef100") Signed-off-by: Edward Cree Reviewed-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/sfc/tc_counters.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit ac1171bd2c7a3a32dfbdd3c347919fee32b745a1 Author: Jinlong Chen Date: Tue Nov 22 22:21:23 2022 +0800 elevator: update the document of elevator_switch We no longer support falling back to the old io scheduler if switching to the new one fails. Update the document to indicate that. Fixes: a1ce35fa4985 ("block: remove dead elevator code") Signed-off-by: Jinlong Chen Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/94250961689ba7d2e67a7d9e7995a11166fedb31.1669126766.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/elevator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c66a36af7ba3a628453da1d91f42ee64fb36ea5a Author: Namhyung Kim Date: Fri Nov 18 11:01:09 2022 -0800 perf lock contention: Do not use BPF task local storage It caused some troubles when a lock inside kmalloc is contended because task local storage would allocate memory using kmalloc. It'd create a recusion and even crash in my system. There could be a couple of workarounds but I think the simplest one is to use a pre-allocated hash map. We could fix the task local storage to use the safe BPF allocator, but it takes time so let's change this until it happens actually. Signed-off-by: Namhyung Kim Acked-by: Martin KaFai Lau Cc: Adrian Hunter Cc: Blake Jones Cc: Chris Li 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/20221118190109.1512674-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_lock_contention.c | 1 + tools/perf/util/bpf_skel/lock_contention.bpf.c | 34 +++++++++++++++++--------- 2 files changed, 23 insertions(+), 12 deletions(-) commit 7b7c22ccdf275018f715af95b7d052e8d4c6c690 Author: John Garry Date: Mon Nov 21 11:30:18 2022 +0000 MAINTAINERS: Update John Garry's email address for arm64 perf tooling Update my address. Signed-off-by: John Garry Acked-by: Will Deacon Cc: Ian Rogers Link: https://lore.kernel.org/r/20221121113018.1899426-1-john.g.garry@oracle.com Signed-off-by: Arnaldo Carvalho de Melo MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e9f5bda2f036aa38312fbeb99ff7e19c0221578 Author: Michael Petlan Date: Tue Nov 22 09:31:21 2022 +0100 perf test: Fix record test on KVM guests Using precise flag with br_inst_retired.near_call causes the test fail on KVM guests, even when the guests have PMU forwarding enabled and the event itself is supported. Remove the precise flag in order to make the test work on KVM guests. Signed-off-by: Michael Petlan Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20221122083121.6012-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19030564ab116757e3270a567fd9d5b20b411d74 Author: Namhyung Kim Date: Fri Nov 18 16:27:50 2022 -0800 perf inject: Set PERF_RECORD_MISC_BUILD_ID_SIZE With perf inject -b, it synthesizes build-id event for DSOs. But it missed to set the size and resulted in having trailing zeros. As perf record sets the size in write_build_id(), let's set the size here as well. Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221119002750.1568027-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/synthetic-events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7d54a4acd8c1de3ea70d31424757dcdb7f0a231a Author: Naveen N. Rao Date: Mon Nov 21 15:57:47 2022 +0530 perf test: Skip watchpoint tests if no watchpoints available On IBM Power9, perf watchpoint tests fail since no hardware breakpoints are available. Detect this by checking the error returned by perf_event_open() and skip the tests in that case. Reported-by: Disha Goel Signed-off-by: Naveen N. Rao Acked-by: Ian Rogers Reviewed-by: Kajol Jain Tested-by: Kajol Jain Link: https://lore.kernel.org/r/20221121102747.208289-1-naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo Cc: Ravi Bangoria Cc: Arnaldo Carvalho de Melo Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Cc: linux-perf-users@vger.kernel.org tools/perf/tests/wp.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 8daf87f5922730468c98ae588573386042bc2992 Author: Leo Yan Date: Mon Nov 21 07:52:37 2022 +0000 perf trace: Remove unused bpf map 'syscalls' augmented_raw_syscalls.c defines the bpf map 'syscalls' which is initialized by perf tool in user space to indicate which system calls are enabled for tracing, on the other flip eBPF program relies on the map to filter out the trace events which are not enabled. The map also includes a field 'string_args_len[6]' which presents the string length if the corresponding argument is a string type. Now the map 'syscalls' is not used, bpf program doesn't use it as filter anymore, this is replaced by using the function bpf_tail_call() and PROG_ARRAY syscalls map. And we don't need to explicitly set the string length anymore, bpf_probe_read_str() is smart to copy the string and return string length. Therefore, it's safe to remove the bpf map 'syscalls'. To consolidate the code, this patch removes the definition of map 'syscalls' from augmented_raw_syscalls.c and drops code for using the map in the perf trace. Note, since function trace__set_ev_qualifier_bpf_filter() is removed, calling trace__init_syscall_bpf_progs() from it is also removed. We don't need to worry it because trace__init_syscall_bpf_progs() is still invoked from trace__init_syscalls_bpf_prog_array_maps() for initialization the system call's bpf program callback. After: # perf trace -e examples/bpf/augmented_raw_syscalls.c,open* --max-events 10 perf stat --quiet sleep 0.001 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libelf.so.1", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libdw.so.1", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libunwind.so.8", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libunwind-aarch64.so.8", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libcrypto.so.3", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libslang.so.2", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libperl.so.5.34", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 # perf trace -e examples/bpf/augmented_raw_syscalls.c --max-events 10 perf stat --quiet sleep 0.001 ... [continued]: execve()) = 0 brk(NULL) = 0xaaaab1d28000 faccessat(-100, "/etc/ld.so.preload", 4) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 close(3) = 0 openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, 0xfffff33f70d0, 832) = 832 munmap(0xffffb5519000, 28672) = 0 munmap(0xffffb55b7000, 32880) = 0 mprotect(0xffffb55a6000, 61440, PROT_NONE) = 0 Signed-off-by: Leo Yan Tested-by: Arnaldo Carvalho de Melo Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221121075237.127706-6-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 101 ----------------------- tools/perf/examples/bpf/augmented_raw_syscalls.c | 17 ---- 2 files changed, 118 deletions(-) commit 9bc427a0613da358f56fe499c690d97ce5d1af26 Author: Leo Yan Date: Mon Nov 21 07:52:36 2022 +0000 perf augmented_raw_syscalls: Remove unused variable 'syscall' The local variable 'syscall' is not used anymore, remove it. Signed-off-by: Leo Yan Tested-by: Arnaldo Carvalho de Melo Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221121075237.127706-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/examples/bpf/augmented_raw_syscalls.c | 1 - 1 file changed, 1 deletion(-) commit 03e9a5d8eb552a1bf692a9c8a5ecd50f4e428006 Author: Leo Yan Date: Mon Nov 21 07:52:35 2022 +0000 perf trace: Handle failure when trace point folder is missed On Arm64 a case is perf tools fails to find the corresponding trace point folder for system calls listed in the table 'syscalltbl_arm64', e.g. the generated system call table contains "lookup_dcookie" but we cannot find out the matched trace point folder for it. We need to figure out if there have any issue for the generated system call table, on the other hand, we need to handle the case when trace point folder is missed under sysfs, this patch sets the flag syscall::nonexistent as true and returns the error from trace__read_syscall_info(). Another problem is for trace__syscall_info(), it returns two different values if a system call doesn't exist: at the first time calling trace__syscall_info() it returns NULL when the system call doesn't exist, later if call trace__syscall_info() again for the same missed system call, it returns pointer of syscall. trace__syscall_info() checks the condition 'syscalls.table[id].name == NULL', but the name will be assigned in the first invoking even the system call is not found. So checking system call's name in trace__syscall_info() is not the right thing to do, this patch simply checks flag syscall::nonexistent to make decision if a system call exists or not, finally trace__syscall_info() returns the consistent result (NULL) if a system call doesn't existed. Fixes: b8b1033fcaa091d8 ("perf trace: Mark syscall ids that are not allocated to avoid unnecessary error messages") Signed-off-by: Leo Yan Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: bpf@vger.kernel.org Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221121075237.127706-4-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit d4223e1776c30b2ce8d0e6eaadcbf696e60fca3c Author: Leo Yan Date: Mon Nov 21 07:52:34 2022 +0000 perf trace: Return error if a system call doesn't exist When a system call is not detected, the reason is either because the system call ID is out of scope or failure to find the corresponding path in the sysfs, trace__read_syscall_info() returns zero. Finally, without returning an error value it introduces confusion for the caller. This patch lets the function trace__read_syscall_info() to return -EEXIST when a system call doesn't exist. Fixes: b8b1033fcaa091d8 ("perf trace: Mark syscall ids that are not allocated to avoid unnecessary error messages") Signed-off-by: Leo Yan Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: bpf@vger.kernel.org Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221121075237.127706-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eadcab4c7a66e1df03d32da0db55d89fd9343fcc Author: Leo Yan Date: Mon Nov 21 07:52:33 2022 +0000 perf trace: Use macro RAW_SYSCALL_ARGS_NUM to replace number This patch defines a macro RAW_SYSCALL_ARGS_NUM to replace the open coded number '6'. Signed-off-by: Leo Yan Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221121075237.127706-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 6ed249441a7d3ead8e81cc926e68d5e7ae031032 Author: Ian Rogers Date: Thu Nov 17 13:43:37 2022 -0300 perf list: Add JSON output option Output events and metrics in a JSON format by overriding the print callbacks. Currently other command line options aren't supported and metrics are repeated once per metric group. Committer testing: $ perf list cache List of pre-defined events (to be used in -e or -M): L1-dcache-load-misses [Hardware cache event] L1-dcache-loads [Hardware cache event] L1-dcache-prefetches [Hardware cache event] L1-icache-load-misses [Hardware cache event] L1-icache-loads [Hardware cache event] branch-load-misses [Hardware cache event] branch-loads [Hardware cache event] dTLB-load-misses [Hardware cache event] dTLB-loads [Hardware cache event] iTLB-load-misses [Hardware cache event] iTLB-loads [Hardware cache event] $ perf list --json cache [ { "Unit": "cache", "EventName": "L1-dcache-load-misses", "EventType": "Hardware cache event" }, { "Unit": "cache", "EventName": "L1-dcache-loads", "EventType": "Hardware cache event" }, { "Unit": "cache", "EventName": "L1-dcache-prefetches", "EventType": "Hardware cache event" }, { "Unit": "cache", "EventName": "L1-icache-load-misses", "EventType": "Hardware cache event" }, { "Unit": "cache", "EventName": "L1-icache-loads", "EventType": "Hardware cache event" }, { "Unit": "cache", "EventName": "branch-load-misses", "EventType": "Hardware cache event" }, { "Unit": "cache", "EventName": "branch-loads", "EventType": "Hardware cache event" }, { "Unit": "cache", "EventName": "dTLB-load-misses", "EventType": "Hardware cache event" }, { "Unit": "cache", "EventName": "dTLB-loads", "EventType": "Hardware cache event" }, { "Unit": "cache", "EventName": "iTLB-load-misses", "EventType": "Hardware cache event" }, { "Unit": "cache", "EventName": "iTLB-loads", "EventType": "Hardware cache event" } ] $ Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20221114210723.2749751-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-list.txt | 4 + tools/perf/builtin-list.c | 308 ++++++++++++++++++++++++++------- 2 files changed, 245 insertions(+), 67 deletions(-) commit e5c6109f4813246aa21e2c441e3cde549efa1f18 Author: Ian Rogers Date: Mon Nov 14 13:07:22 2022 -0800 perf list: Reorganize to use callbacks to allow honouring command line options Rather than controlling the list output with passed flags, add callbacks that are called when an event or metric are encountered. State is passed to the callback so that command line options can be respected, alternatively the callbacks can be changed. Fix a few bugs: - wordwrap to columns metric descriptions and expressions; - remove unnecessary whitespace after PMU event names; - the metric filter is a glob but matched using strstr which will always fail, switch to using a proper globmatch, - the detail flag gives details for extra kernel PMU events like branch-instructions. In metricgroup.c switch from struct mep being a rbtree of metricgroups containing a list of metrics, to the tree directly containing all the metrics. In general the alias for a name is passed to the print routine rather than being contained in the name with OR. Committer notes: Check the asprint() return to address this on fedora 36: util/print-events.c: In function ‘print_sdt_events’: util/print-events.c:183:33: error: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 183 | asprintf(&evt_name, "%s@%s(%.12s)", sdt_name->s, path, bid); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors $ gcc --version | head -1 gcc (GCC) 12.2.1 20220819 (Red Hat 12.2.1-2) $ Fix ps.pmu_glob setting when dealing with *:* events, it was being left with a freed pointer that then at the end of cmd_list() would be double freed. Check if pmu_name is NULL in default_print_event() before calling strglobmatch(pmu_name, ...) to avoid a segfault. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20221114210723.2749751-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-list.c | 333 +++++++++++++++++++++++++++++++------ tools/perf/util/metricgroup.c | 243 ++++++++------------------- tools/perf/util/metricgroup.h | 4 +- tools/perf/util/pmu.c | 145 ++++++---------- tools/perf/util/pmu.h | 5 +- tools/perf/util/print-events.c | 364 ++++++++++++++++++++++------------------- tools/perf/util/print-events.h | 42 +++-- 7 files changed, 624 insertions(+), 512 deletions(-) commit a3720e969c6de39210809ca9aaebec81919d6c6c Author: Ian Rogers Date: Wed Nov 16 14:46:31 2022 -0800 perf build: Fix LIBTRACEEVENT_DYNAMIC The tools/lib includes fixes break LIBTRACEVENT_DYNAMIC as the makefile erroneously had dependencies on building libtraceevent even when not linking with it. This change fixes the issues with LIBTRACEEVENT_DYNAMIC by making the built files optional. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221116224631.207631-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 25 ++++++++++++++++++++++--- tools/perf/util/setup.py | 3 ++- 2 files changed, 24 insertions(+), 4 deletions(-) commit 0b77fe474696aaaa592d52c7316c135401337aec Author: Namhyung Kim Date: Wed Nov 16 15:38:54 2022 -0800 perf test: Replace data symbol test workload with datasym So that it can get rid of requirement of a compiler. $ sudo ./perf test -v 109 109: Test data symbol : --- start --- test child forked, pid 844526 Recording workload... [ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 0.354 MB /tmp/__perf_test.perf.data.GFeZO (4847 samples) ] Cleaning up files... test child finished with 0 ---- end ---- Test data symbol: Ok Signed-off-by: Namhyung Kim Tested-by: James Clark Cc: Adrian Hunter Cc: Athira Jajeev Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-13-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/test_data_symbol.sh | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) commit 3dfc01fe9d12a1e832f49deab37279faa8a9ebc8 Author: Namhyung Kim Date: Wed Nov 16 15:38:53 2022 -0800 perf test: Add 'datasym' test workload The datasym workload is to check if perf mem command gets the data addresses precisely. This is needed for data symbol test. $ perf test -w datasym I had to keep the buf1 in the data section, otherwise it could end up in the BSS and was mmaped as a separate //anon region, then it was not symbolized at all. It needs to be fixed separately. Committer notes: Add a -U _FORTIFY_SOURCE to the datasym CFLAGS, as the main perf flags set it and it requires building with optimization, and this new test has a -O0. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-12-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/tests.h | 1 + tools/perf/tests/workloads/Build | 2 ++ tools/perf/tests/workloads/datasym.c | 24 ++++++++++++++++++++++++ 4 files changed, 28 insertions(+) commit 7bc1dd96cf48e1b44773698e7c97481f5f455f6c Author: Namhyung Kim Date: Wed Nov 16 15:38:52 2022 -0800 perf test: Replace brstack test workload So that it can get rid of requirement of a compiler. Also rename the symbols to match with the perf test workload. Signed-off-by: Namhyung Kim Tested-by: James Clark Acked-by: German Gomez Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-11-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/test_brstack.sh | 66 +++++++--------------------------- 1 file changed, 12 insertions(+), 54 deletions(-) commit a104f0ea99d846df19aad8a5476eb9bc39fa42ca Author: Namhyung Kim Date: Wed Nov 16 15:38:51 2022 -0800 perf test: Add 'brstack' test workload The brstack is to run different kinds of branches repeatedly. This is necessary for brstack test case to verify if it has correct branch info. $ perf test -w brstack I renamed the internal functions to have brstack_ prefix as it's too generic name. Add a -U_FORTIFY_SOURCE to the brstack CFLAGS, as the main perf flags set it and it requires building with optimization, and this new test has a -O0. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-10-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/tests.h | 1 + tools/perf/tests/workloads/Build | 2 ++ tools/perf/tests/workloads/brstack.c | 40 ++++++++++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+) commit e011979ec4c3482b68be05e2fdf98fefce4cd75b Author: Namhyung Kim Date: Wed Nov 16 15:38:50 2022 -0800 perf test: Replace arm spe fork test workload with sqrtloop So that it can get rid of requirement of a compiler. I've also removed killall as it'll kill perf process now and run the test workload for 10 sec instead. Signed-off-by: Namhyung Kim Tested-by: James Clark Tested-by: Leo Yan Cc: Adrian Hunter Cc: Athira Jajeev Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/test_arm_spe_fork.sh | 44 +---------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) commit 39281709a6e2301ac4c6ac7015c7793392ca2dfe Author: Namhyung Kim Date: Wed Nov 16 15:38:49 2022 -0800 perf test: Add 'sqrtloop' test workload The sqrtloop creates a child process to run an infinite loop calling sqrt() with rand(). This is needed for ARM SPE fork test. $ perf test -w sqrtloop It can take an optional argument to specify how long it will run in seconds (default: 1). Committer notes: Explicitely ignored the sqrt() return to fix the build on systems where the compiler complains it isn't being used. And added a sqrtloop specific CFLAGS to disable optimizations to make this a bit more robust wrt dead code elimination. Doing that a -U_FORTIFY_SOURCE needs to be added, as -O0 is incompatible with it. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/tests.h | 1 + tools/perf/tests/workloads/Build | 2 ++ tools/perf/tests/workloads/sqrtloop.c | 45 +++++++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+) commit 7cf0b4a73a4a4f36bb4ef53d066b811b7621c635 Author: Namhyung Kim Date: Wed Nov 16 15:38:48 2022 -0800 perf test: Replace arm callgraph fp test workload with leafloop So that it can get rid of requirement of a compiler. Reviewed-by: Leo Yan Signed-off-by: Namhyung Kim Tested-by: James Clark Cc: Adrian Hunter Cc: Athira Jajeev Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/test_arm_callgraph_fp.sh | 34 +++---------------------- 1 file changed, 3 insertions(+), 31 deletions(-) commit 41522f7442905814c654dbe2ca7b8d3605c7e0cc Author: Namhyung Kim Date: Wed Nov 16 15:38:47 2022 -0800 perf test: Add 'leafloop' test workload The leafloop workload is to run an infinite loop in the test_leaf function. This is needed for the ARM fp callgraph test to verify if it gets the correct callchains. $ perf test -w leafloop Committer notes: Add a: -U_FORTIFY_SOURCE to the leafloop CFLAGS as the main perf flags set it and it requires building with optimization, and this new test has a -O0. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/tests.h | 1 + tools/perf/tests/workloads/Build | 3 +++ tools/perf/tests/workloads/leafloop.c | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+) commit 4ddb1bf1a83783cebdb174b0efaf62f63ad64e0b Author: Arnd Bergmann Date: Wed Nov 23 14:21:16 2022 +0100 tegra: mark BPMP driver as little-endian only The BPMP firmware driver never worked on big-endian kernels, and cannot easily be made portable. Add a dependency to make this clear in case anyone ever wants to try a big-endian kernel on this hardware. Link: https://lore.kernel.org/linux-arm-kernel/Y34FCQ3xTmcjqKRT@orome/ Signed-off-by: Arnd Bergmann drivers/firmware/tegra/Kconfig | 1 + 1 file changed, 1 insertion(+) commit dc8d006d15b623c1d80b90b45d6dcb6e890dad09 Author: Wang ShaoBo Date: Wed Nov 23 11:46:16 2022 +0800 regulator: core: use kfree_const() to free space conditionally Use kfree_const() to free supply_name conditionally in create_regulator() as supply_name may be allocated from kmalloc() or directly from .rodata section. Fixes: 87fe29b61f95 ("regulator: push allocations in create_regulator() outside of lock") Signed-off-by: Wang ShaoBo Link: https://lore.kernel.org/r/20221123034616.3609537-1-bobo.shaobowang@huawei.com Signed-off-by: Mark Brown drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 662a9bf883f42d09145cf083d93dadf0307f15ea Author: Matti Vaittinen Date: Wed Nov 23 14:00:38 2022 +0200 regulator: bd718x7: Use dev_err_probe() The dev_err_probe() has (at least) following benefits over dev_err() when printing an error print for a failed function call at a device driver probe: - Omit error level print if error is 'EPRBE_DEFER' - Standardized print format for returned error - return the error value allowing shortening calls like: if (ret) { dev_err(...); return ret; } to if (ret) return dev_err_probe(...); Convert the ROHM BD718x7 regulator driver to use the dev_err_probe() when returned error is not hard-coded constant. NOTE: This commit also changes the error handling path to return immediately from a spot where the error is spotted instead of using a single point of exit. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/fee54c2d04bb41b51381e31523f9ed31575206d2.1669203610.git.mazziesaccount@gmail.com Signed-off-by: Mark Brown drivers/regulator/bd718x7-regulator.c | 51 +++++++++++++---------------------- 1 file changed, 19 insertions(+), 32 deletions(-) commit d4e93e8da012880882671a46ac6ae3aefcae8076 Author: Matti Vaittinen Date: Wed Nov 23 14:00:21 2022 +0200 regulator: bd71815: bd71828: bd9576: Use dev_err_probe() The dev_err_probe() has (at least) following benefits over dev_err() when printing an error print for a failed function call at a device driver probe: - Omit error level print if error is 'EPRBE_DEFER' - Standardized print format for returned error - return the error value allowing shortening calls like: if (ret) { dev_err(...); return ret; } to if (ret) return dev_err_probe(...); Convert the ROHM BD71828, ROHM BD71815 and ROHM BD9576 regulator drivers to use the dev_err_probe() when returned error is not hard-coded constant. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/0b644da4a8f58558ffe474d2593f85c46de2f965.1669203610.git.mazziesaccount@gmail.com Signed-off-by: Mark Brown drivers/regulator/bd71815-regulator.c | 10 +++---- drivers/regulator/bd71828-regulator.c | 21 ++++++-------- drivers/regulator/bd9576-regulator.c | 54 ++++++++++++++++------------------- 3 files changed, 38 insertions(+), 47 deletions(-) commit 44501eba9bb28946382b7a53099ce8098d1610f0 Author: Matti Vaittinen Date: Wed Nov 23 14:00:05 2022 +0200 regulator: bd718x7: Drop unnecessary info print A device-tree node name was printed when bd718x7 driver's feedback-loop feature was developed. This print was accidentally left in driver. The info-level print just pollutes the log. Drop unnecessary pr_info() Fixes: d2ad981151b3 ("regulator: bd718x7: Support external connection to scale voltages") Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/33fd99abf2451999938fef4ba6cf7b3f19e9b992.1669203610.git.mazziesaccount@gmail.com Signed-off-by: Mark Brown drivers/regulator/bd718x7-regulator.c | 2 -- 1 file changed, 2 deletions(-) commit 9f225444467b98579cf28d94f4ad053460dfdb84 Author: Stanislav Fomichev Date: Mon Nov 21 10:29:13 2022 -0800 ppp: associate skb with a device at tx Syzkaller triggered flow dissector warning with the following: r0 = openat$ppp(0xffffffffffffff9c, &(0x7f0000000000), 0xc0802, 0x0) ioctl$PPPIOCNEWUNIT(r0, 0xc004743e, &(0x7f00000000c0)) ioctl$PPPIOCSACTIVE(r0, 0x40107446, &(0x7f0000000240)={0x2, &(0x7f0000000180)=[{0x20, 0x0, 0x0, 0xfffff034}, {0x6}]}) pwritev(r0, &(0x7f0000000040)=[{&(0x7f0000000140)='\x00!', 0x2}], 0x1, 0x0, 0x0) [ 9.485814] WARNING: CPU: 3 PID: 329 at net/core/flow_dissector.c:1016 __skb_flow_dissect+0x1ee0/0x1fa0 [ 9.485929] skb_get_poff+0x53/0xa0 [ 9.485937] bpf_skb_get_pay_offset+0xe/0x20 [ 9.485944] ? ppp_send_frame+0xc2/0x5b0 [ 9.485949] ? _raw_spin_unlock_irqrestore+0x40/0x60 [ 9.485958] ? __ppp_xmit_process+0x7a/0xe0 [ 9.485968] ? ppp_xmit_process+0x5b/0xb0 [ 9.485974] ? ppp_write+0x12a/0x190 [ 9.485981] ? do_iter_write+0x18e/0x2d0 [ 9.485987] ? __import_iovec+0x30/0x130 [ 9.485997] ? do_pwritev+0x1b6/0x240 [ 9.486016] ? trace_hardirqs_on+0x47/0x50 [ 9.486023] ? __x64_sys_pwritev+0x24/0x30 [ 9.486026] ? do_syscall_64+0x3d/0x80 [ 9.486031] ? entry_SYSCALL_64_after_hwframe+0x63/0xcd Flow dissector tries to find skb net namespace either via device or via socket. Neigher is set in ppp_send_frame, so let's manually use ppp->dev. Cc: Paul Mackerras Cc: linux-ppp@vger.kernel.org Reported-by: syzbot+41cab52ab62ee99ed24a@syzkaller.appspotmail.com Signed-off-by: Stanislav Fomichev Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 2 ++ 1 file changed, 2 insertions(+) commit c84f6f6c2bb5cd907cd1e770c5b29adb7bf2ae0e Author: Bagas Sanjaya Date: Mon Nov 21 10:58:55 2022 +0700 Documentation: devlink: Add blank line padding on numbered lists in Devlink Port documentation kernel test robot reported indentation warnings: Documentation/networking/devlink/devlink-port.rst:220: WARNING: Unexpected indentation. Documentation/networking/devlink/devlink-port.rst:222: WARNING: Block quote ends without a blank line; unexpected unindent. These warnings cause lists (arbitration flow for which the warnings blame to and 3-step subfunction setup) to be rendered inline instead. Also, for the former list, automatic list numbering is messed up. Fix these warnings by adding missing blank line padding. Link: https://lore.kernel.org/linux-doc/202211200926.kfOPiVti-lkp@intel.com/ Fixes: 242dd64375b80a ("Documentation: Add documentation for new devlink-rate attributes") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Signed-off-by: David S. Miller Documentation/networking/devlink/devlink-port.rst | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit e9a45c8aca0c83f61a7dffcbb996952919f4ae54 Merge: 3115be55138a f3fbb553f985 Author: Mark Brown Date: Wed Nov 23 12:22:12 2022 +0000 ASoC: Intel: avs: DSP recovery and resume fixes Merge series from Cezary Rojewski : Two fixes that are result of the recent discussions [1][2]. First adds missing locking around snd_pcm_stop() while the second fix sets substream state to DISCONNECTED if any suspend/resume related operation fails so that userspace has means to be aware that something went wrong during said operation. commit 149f52664bb3ffe95e6212f20971d40efec2aa68 Merge: e34782316281 662233731d66 Author: Mark Brown Date: Wed Nov 23 12:17:51 2022 +0000 Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into regulator-6.2 so we can apply I2C API fixups. commit a7a7c00cdcc80762350aaf6d62422346e9f3fa7a Merge: 66b55cae4956 c11b537e4177 Author: Arnd Bergmann Date: Wed Nov 23 13:07:02 2022 +0100 Merge tag 'ti-driver-soc-for-v6.2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers TI SoC driver updates for v6.2 v2 * Minor bugfixes for knav_qmss_queue, smartreflex drivers * API optimizations including using devm, bitmap apis to ti-sci, soc-info drivers * k3-ringacc can now be built as modules for certain distros that mandate such usage. * k3-socinfo can now detect AM62A SoCs. * tag 'ti-driver-soc-for-v6.2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: soc: ti: k3-socinfo: Add AM62Ax JTAG ID soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe soc: ti: knav_qmss_queue: Fix PM disable depth imbalance in knav_queue_probe firmware: ti_sci: Use devm_bitmap_zalloc when applicable soc: ti: k3-ringacc: Allow the driver to be built as module firmware: ti_sci: Fix polled mode during system suspend firmware: ti_sci: Use the non-atomic bitmap API when applicable firmware: ti_sci: Use the bitmap API to allocate bitmaps drivers: soc: ti: knav_qmss_queue: Mark knav_acc_firmwares as static Link: https://lore.kernel.org/r/20221122223856.fwackjg7fbd5jcz7@wannabe Signed-off-by: Arnd Bergmann commit 8b7f4dd73879598ac6876753732e158055d8b671 Merge: c93d8b457461 7e8edf55cf72 Author: Arnd Bergmann Date: Wed Nov 23 13:05:06 2022 +0100 Merge tag 'ti-keystone-soc-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/soc ARM: keystone: TI Updates for v6.2 Updates: * Switch over to standard PSCI for keystone2 platforms. * tag 'ti-keystone-soc-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: ARM: keystone: Replace platform SMP with PSCI Link: https://lore.kernel.org/r/20221122185650.nrh7s2g5obndj5vj@dental Signed-off-by: Arnd Bergmann commit 2d5e7e2a3db513b99e6994b9a494255184086809 Merge: 62cc4a55fd7b 62e73f000696 Author: Arnd Bergmann Date: Wed Nov 23 13:03:02 2022 +0100 Merge tag 'amlogic-arm64-dt-for-v6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic ARM64 DT changes for v6.2: - meson-gxl: add SPI pinctrl nodes for CLK - meson-gxbb: add SPI pinctrl nodes for CLK - Enable active coling using gpio-fan on Odroid N2/N2+ - remove clock-frequency from rtc - Update cache properties for amlogic - Add DDR PMU node for G12 series SoC - document Odroid Go Ultra compatible - add initial Odroid Go Ultra DTS * tag 'amlogic-arm64-dt-for-v6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: arm64: dts: amlogic: add initial Odroid Go Ultra DTS dt-bindings: amlogic: document Odroid Go Ultra compatible arm64: dts: meson: Add DDR PMU node arm64: dts: Update cache properties for amlogic arm64: dts: meson: remove clock-frequency from rtc arm64: dts: meson: Enable active coling using gpio-fan on Odroid N2/N2+ arm64: dts: meson-gxbb: add SPI pinctrl nodes for CLK arm64: dts: meson-gxl: add SPI pinctrl nodes for CLK Link: https://lore.kernel.org/r/8faa1d3c-5a17-2c3f-92d1-f8fe3df74131@linaro.org Signed-off-by: Arnd Bergmann commit 62cc4a55fd7bfa2fcc2f0ac6c1f048e54f79f9ad Merge: 58fd11a796bd 88cfe56ea64a Author: Arnd Bergmann Date: Wed Nov 23 12:39:47 2022 +0100 Merge tag 'nuvoton-6.2-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into soc/dt Nuvoton device tree updates for 6.2 - Update fix-partition syntax - WPCM450 updates for SPI controller, clock, watchdog, serial - GPIO line names for Supermicro X9SCI-LN4F BMC * tag 'nuvoton-6.2-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: ARM: dts: nuvoton: wpcm450: Add missing aliases for serial0/serial1 ARM: dts: wpcm450: Enable watchdog by default ARM: dts: wpcm450: Add clock controller node ARM: dts: wpcm450-supermicro-x9sci-ln4f: Add SPI flash ARM: dts: wpcm450: Add FIU SPI controller node ARM: dts: nuvoton: Remove bogus unit addresses from fixed-partition nodes ARM: dts: nuvoton,wpcm450-supermicro-x9sci-ln4f: Add GPIO line names Link: https://lore.kernel.org/r/CACPK8XffL5_L5D_ZGQid0r4h0wfTc+XBGUO1-0QW7ErPPrrvEQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit 58fd11a796bde81ab2c09f589fa5c2b2bc393e9d Merge: 375aab101818 fae14a1cb8dd Author: Arnd Bergmann Date: Wed Nov 23 12:37:11 2022 +0100 Merge tag 'ti-k3-dt-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/dt TI K3 devicetree updates for v6.2 New Features: J721e: * PWMs, BeagleBone AI-64 platform. J721s2: * Crypto AM65/AM62: * General purpose Timer support (system timer is still arch timer) Fixes: * Bunch of fixes in crypto usage and GPIO intr * Minor schema related fixes for audio, addressing etc. Cleanups: * Refactor of device tree to "disable" peripherals at SoC level for nodes that are un-usable without board level properties. TI K3 devices have large number of peripherals of which only a smaller subset is actually enabled on platforms. Switching to this approach enables two benefits: lesser confusion in creating board level devicetrees as only relevant pinned out device nodes need enabled, as well as smaller board device trees as most un-used peripherals don't need to explicitly disabled. * tag 'ti-k3-dt-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: (61 commits) arm64: dts: ti: Add k3-j721e-beagleboneai64 dt-bindings: arm: ti: Add bindings for BeagleBone AI-64 arm64: dts: ti: k3-j721s2-main: Enable crypto accelerator arm64: dts: ti: k3-am64-main: Drop RNG clock arm64: dts: ti: k3-j721e-main: Drop RNG clock arm64: dts: ti: k3-am65-main: Drop RNG clock arm64: dts: ti: j721e-common-proc-board: Fix sound node-name arm64: dts: ti: k3-j721s2: Fix the interrupt ranges property for main & wkup gpio intr arm64: dts: ti: k3-j7200-mcu-wakeup: Drop dma-coherent in crypto node arm64: dts: ti: k3-j721e-main: Drop dma-coherent in crypto node arm64: dts: ti: k3-am65-main: Drop dma-coherent in crypto node arm64: dts: ti: k3-am62: Add general purpose timers for am62 arm64: dts: ti: k3-am65: Add general purpose timers for am65 arm64: dts: ti: k3-am65: Configure pinctrl for timer IO pads arm64: dts: ti: Trim addresses to 8 digits arm64: dts: ti: k3-j721e-sk: Add pinmux for RPi Header arm64: dts: ti: k3-j721e-main: Add dts nodes for EHRPWMs arm64: dts: ti: k3-am65: Enable McASP nodes at the board level arm64: dts: ti: k3-am65: Enable Mailbox nodes at the board level arm64: dts: ti: k3-am65: Enable PCIe nodes at the board level ... Link: https://lore.kernel.org/r/20221122190209.jwfj56d6kxpxdkua@untreated Signed-off-by: Arnd Bergmann commit 375aab1018181a9f7d123c5ec72fae8867afa8a1 Merge: 714aac5dcd3a 3973fc0f9f07 Author: Arnd Bergmann Date: Wed Nov 23 12:29:23 2022 +0100 Merge tag 'aspeed-6.2-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into soc/dt ASPEED device tree updates for 6.2 - New machines * IBM Bonnell AST2600 BMC, for a Power10 server * Delta AHE-50DC AST1250 BMC, for a 1U Open19 power shelf - Removed machines * IBM Mihawk AST2500 BMC, a Power9 server similar to Witherspoon - Fixes and updates for bletchley, mtjade/mtmitchell, rainier/everest * tag 'aspeed-6.2-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: ARM: dts: aspeed: mtjade: Add SMPro nodes ARM: dts: aspeed: mtjade,mtmitchell: Add BMC SSIF nodes ARM: dts: aspeed: Add Delta AHE-50DC BMC dt-bindings: arm: aspeed: document Delta AHE-50DC BMC ARM: dts: aspeed: rainier: Fix pca9551 nodes ARM: dts: aspeed: p10bmc: Add occ-hwmon nodes ARM: dts: aspeed-g6: Add aliases for mdio nodes ARM: dts: aspeed: Remove Mihawk ARM: dts: aspeed: rainier,everest: Move reserved memory regions ARM: dts: aspeed: Add IBM Bonnell system BMC devicetree ARM: dts: aspeed: bletchley: Enable emmc and ehci1 ARM: dts: aspeed: bletchley: Update and fix gpio-line-names ARM: dts: aspeed: bletchley: Update fusb302 nodes ARM: dts: aspeed: bletchley: Bind presence-sledX pins via gpio-keys ARM: dts: aspeed: bletchley: Disable GPIOV2 pull-down ARM: dts: aspeed: bletchley: Change LED sys_log_id to active low Link: https://lore.kernel.org/r/CACPK8Xfsc8BaL_qAgV+3Rk-AFcQoDVfTpMzHvq_rR-UYqwpNNQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit 714aac5dcd3a03cefa42ec4d7597eca36dd1a75f Merge: 8ccf49d7fb75 e4185804e191 Author: Arnd Bergmann Date: Mon Nov 21 11:03:55 2022 +0100 Merge tag 'tegra-for-6.2-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt ARM: tegra: Device tree changes for v6.2-rc1 This fixes various minor issues in device trees that are flagged by the DT validation tools. * tag 'tegra-for-6.2-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Remove duplicate pin entry in pinmux ARM: tegra: Remove unused interrupt-parent properties ARM: tegra: Fix nvidia,io-reset properties ARM: tegra: Add missing power-supply for panels ARM: tegra: Fixup pinmux node names ARM: tegra: Use correct compatible string for ASUS TF101 panel Link: https://lore.kernel.org/r/20221119012025.3968358-6-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 50315945d178eebec4e8e2c50c265767ddb926eb Author: Geert Uytterhoeven Date: Mon Nov 21 17:13:42 2022 +0100 dt-bindings: pwm: renesas,tpu: Add r8a779g0 support Document support for the 16-Bit Timer Pulse Unit (TPU) in the Renesas R-Car V4H (R8A779G0) SoC. Based on a patch in the BSP by CongDang. Signed-off-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Reviewed-by: Wolfram Sang Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml | 1 + 1 file changed, 1 insertion(+) commit 5719efcc5abb34ceb47b03e58709d99713f80db1 Author: Geert Uytterhoeven Date: Mon Nov 21 17:13:02 2022 +0100 dt-bindings: pwm: renesas,pwm-rcar: Add r8a779g0 support Document support for the PWM timers in the Renesas R-Car V4H (R8A779G0) SoC. Based on a patch in the BSP by CongDang. Signed-off-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Reviewed-by: Wolfram Sang Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.yaml | 1 + 1 file changed, 1 insertion(+) commit 3115be55138afb9fb9ae1b4e99378da34bcfd164 Author: Richard Fitzgerald Date: Fri Nov 4 16:02:52 2022 +0000 ASoC: soc-dai: Do not call snd_soc_link_be_hw_params_fixup() twice For a BE link snd_soc_link_be_hw_params_fixup() is called by dpcm_be_dai_hw_params() to initialize the params before it passes them to __soc_pcm_hw_params(). Then __soc_pcm_hw_params() refines params to match the BE codec and passes that to snd_soc_dai_hw_params(). The second call of snd_soc_link_be_hw_params_fixup() within snd_soc_dai_hw_params() was overwriting the refined params with the original BE CPU DAI params. This would then lead to various problems, for example passing an invalid number of channels to the codec driver hw_params(), or enabling more AIF widgets on the codec than are actually mapped by TDM slots. These errors may not be noticed on a simple 1:1 link between one CPU DAI and one codec DAI, because most likely they have the same DAI config (though this is not necessarily true, for example if the CPU end has dummy TDM slots to achieve a desirable BCLK). For 1:N mappings there are likely to be multiple codecs using different subsets of the TDM slots and this overwriting of the refined params can cause incorrect configuration of each codec on the link. The erroneous extra call to the BE fixup function() was introduced by: commit a655de808cbd ("ASoC: core: Allow topology to override machine driver FE DAI link config.") at that time, the call to the BE fixup was already done by dpcm_be_dai_hw_params(), which was introduced several years earlier by: commit 01d7584cd2e5 ("ASoC: dpcm: Add Dynamic PCM core operations.") The erroneous code has changed and moved to a different source file since the patch that introduced it, so this fix patch won't directly apply as a fix on top of code older than: commit 8b4ba1d31771 ("ASoC: soc-dai: fix up hw params only if it is needed") though it can be applied with some minor adjustment to code before that patch but after: commit aa6166c2ac28 ("ASoC: soc-dai: mv soc_dai_hw_params() to soc-dai") On any tree older than that the code is in soc-pcm.c. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20221104160252.166114-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/soc-dai.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit fe07130870c8540bc0cddbaa8d4521ecdba6b560 Author: Richard Fitzgerald Date: Wed Nov 9 16:53:29 2022 +0000 ASoC: wm_adsp: Allow client to hook into pre_run callback Some HALO-based codecs need some additional custom setup in the pre_run stage of cs_dsp. Implement the callback in wm_adsp to call an optional codec driver callback. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20221109165331.29332-11-rf@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 11 +++++++++++ sound/soc/codecs/wm_adsp.h | 1 + 2 files changed, 12 insertions(+) commit 66b55cae49564e0e9a52616247f3c96a61774c2b Merge: 919977b690ca aa9f474014b1 Author: Arnd Bergmann Date: Tue Nov 22 22:53:22 2022 +0100 Merge tag 'qcom-drivers-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers Qualcomm driver updates for 6.2 The qcom,msm-id and qcom,board-id DeviceTree properties are documented, to allow them to be used in configurations or devices requiring these and the socinfo driver is updated to reuse the introduced identifiers. The rpmh-rsc driver is extended to register for PM runtime notifications from the CPU clusters, in order to submit sleep and wake votes the last core in a cluster is being powered down. A mechanism for keeping rpmhpd resources voted until sync_state is introduced, this ensures that power-domains required during boot are kept enabled. The rpmhpd power-domains for SDM670 are also added. Support for the new QDU1000/QRU1000 platform is introduced in the rpmhpd and socinfo drivers. The APR driver gains missing error handling. QMI message descriptors in the PDR driver are made const. Support for the RPM found in SM6375 is added. The SPM driver gains support for MSM8939 and MSM8976 platforms. The stats and command-db drvers are marked as not having PM support. * tag 'qcom-drivers-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (36 commits) dt-bindings: firmware: scm: add sdm670 compatible soc: qcom: rpmh-rsc: Write CONTROL_TCS with next timer wakeup soc: qcom: rpmh-rsc: Save base address of drv PM: domains: Store the next hrtimer wakeup in genpd soc: qcom: rpmh-rsc: Attach RSC to cluster PM domain dt-bindings: soc: qcom: Update devicetree binding document for rpmh-rsc dt-bindings: soc: qcom: qcom,smd-rpm: Use qcom,smd-channels on MSM8976 soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index soc: qcom: socinfo: Add QDU1000/QRU1000 SoC IDs to the soc_id table dt-bindings: arm: qcom,ids: Add SoC IDs for QDU1000/QRU1000 soc: qcom: rpmhpd: Add QDU1000/QRU1000 power domains dt-bindings: power: rpmpd: Add QDU1000/QRU1000 to rpmpd binding dt-bindings: qcom: smp2p: Add WPSS node names to pattern property soc: qcom: spm: Implement support for SAWv2.3, MSM8976 L2 PM dt-bindings: soc: qcom: spm: Add compatibles for MSM8976 L2 soc: qcom: llcc: make irq truly optional soc: qcom: spm: Add MSM8939 SPM register data dt-bindings: soc: qcom: spm: Add MSM8939 CPU compatible dt-bindings: soc: qcom: aoss: Add sc8280xp compatible dt-bindings: firmware: document Qualcomm SM6375 SCM ... Link: https://lore.kernel.org/r/20221122202748.1854487-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 3d7be6e5fb27f1653a74659eed2ab09382608874 Merge: 5658baf2e3f5 cea42b8d7966 Author: Arnd Bergmann Date: Wed Nov 23 12:01:09 2022 +0100 Merge tag 'qcom-defconfig-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM defconfig updates This enables remaining Qualcomm TLMM pinctrl drivers in the qcom_defconfig. * tag 'qcom-defconfig-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: qcom_defconfig: enable rest of ARMv7 SoCs pinctrl drivers Link: https://lore.kernel.org/r/20221122203452.1855254-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 5658baf2e3f5e34f978dd106f18bd3a83e25a6c7 Merge: f8d331698dee c03fa428ac6e Author: Arnd Bergmann Date: Wed Nov 23 11:59:16 2022 +0100 Merge tag 'qcom-arm64-defconfig-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM64 defconfig updates for 6.2 This enables more Qualcomm TLMM pinctrl drivers, and the Qualcomm crypto drivers. It makes the SC7180 and SM8450 interconnect drivers builtin, in order to ensure that a console will be registered before init needs it. * tag 'qcom-arm64-defconfig-for-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: build-in Qualcomm SC7180 and SM8450 interconnects arm64: defconfig: Enable Qualcomm QCE crypto arm64: defconfig: enable rest of Qualcomm ARMv8 SoCs pinctrl drivers commit a39818a3fb2bf12ae945a7c5fba8c5d9048a0e96 Author: Michael Ellerman Date: Wed Nov 23 21:26:10 2022 +1100 objtool/powerpc: Implement arch_pc_relative_reloc() Provide an implementation for arch_pc_relative_reloc(). It is needed to pass the build once 61c6065ef7ec ("objtool: Allow !PC relative relocations") is merged. Signed-off-by: Michael Ellerman tools/objtool/arch/powerpc/decode.c | 9 +++++++++ tools/objtool/include/objtool/arch.h | 2 ++ 2 files changed, 11 insertions(+) commit f8d331698dee72c0b28d1abb0af056c2005e3174 Merge: 58e1a96d2845 9f7e3ed26852 Author: Arnd Bergmann Date: Wed Nov 23 10:53:56 2022 +0100 Merge tag 'ti-k3-config-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/defconfig arm64: TI K3 defconfig updates for v6.2 * Enable TI_TFP410 DVI bridge as module for J721e-sk platform * tag 'ti-k3-config-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: arm64: defconfig: Enable TI_TFP410 DVI bridge Link: https://lore.kernel.org/r/20221122190233.63o3tjtkimlimgtq@armrest Signed-off-by: Arnd Bergmann commit 58e1a96d284562baa9b3371fc0999fb0eab9f3d3 Merge: 972d89438dc9 83f3da586828 Author: Arnd Bergmann Date: Wed Nov 23 10:47:53 2022 +0100 Merge tag 'v6.1-next-defconfig' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/defconfig - enable missing drivers for to boot from MT8183 based chromebooks * tag 'v6.1-next-defconfig' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: defconfig: Enable missing configs for mt8183-jacuzzi-juniper Link: https://lore.kernel.org/r/610edfca-0a3a-fd41-5208-71978866be4f@gmail.com Signed-off-by: Arnd Bergmann commit 99b63f55dc514a357c2ecf25e9aab149879329f0 Author: Heiko Carstens Date: Fri Nov 18 16:11:33 2022 +0100 KVM: s390: remove unused gisa_clear_ipm_gisc() function clang warns about an unused function: arch/s390/kvm/interrupt.c:317:20: error: unused function 'gisa_clear_ipm_gisc' [-Werror,-Wunused-function] static inline void gisa_clear_ipm_gisc(struct kvm_s390_gisa *gisa, u32 gisc) Remove gisa_clear_ipm_gisc(), since it is unused and get rid of this warning. Signed-off-by: Heiko Carstens Reviewed-by: Thomas Huth Link: https://lore.kernel.org/r/20221118151133.2974602-1-hca@linux.ibm.com Signed-off-by: Christian Borntraeger Signed-off-by: Janosch Frank arch/s390/kvm/interrupt.c | 5 ----- 1 file changed, 5 deletions(-) commit dbec280045f8ca568de2a88ac4712a35f82f2cb1 Author: Nico Boehr Date: Fri Nov 18 11:04:29 2022 +0100 s390/vfio-ap: GISA: sort out physical vs virtual pointers usage Fix virtual vs physical address confusion (which currently are the same) for the GISA when enabling the IRQ. Signed-off-by: Nico Boehr Reviewed-by: Halil Pasic Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20221118100429.70453-1-nrb@linux.ibm.com Message-Id: <20221118100429.70453-1-nrb@linux.ibm.com> Signed-off-by: Janosch Frank drivers/s390/crypto/vfio_ap_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc726886079febfa2384d77486d7f3a11f951ea9 Author: Claudio Imbrenda Date: Fri Nov 11 18:06:32 2022 +0100 KVM: s390: pv: module parameter to fence asynchronous destroy Add the module parameter "async_destroy", to allow the asynchronous destroy mechanism to be switched off. This might be useful for debugging purposes. The parameter is enabled by default since the feature is opt-in anyway. Signed-off-by: Claudio Imbrenda Reviewed-by: Janosch Frank Reviewed-by: Steffen Eiden Reviewed-by: Nico Boehr Link: https://lore.kernel.org/r/20221111170632.77622-7-imbrenda@linux.ibm.com Message-Id: <20221111170632.77622-7-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/kvm/kvm-s390.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f7866f582b1c9d80d1a3bd0953170185668c52ca Author: Claudio Imbrenda Date: Fri Nov 11 18:06:31 2022 +0100 KVM: s390: pv: support for Destroy fast UVC Add support for the Destroy Secure Configuration Fast Ultravisor call, and take advantage of it for asynchronous destroy. When supported, the protected guest is destroyed immediately using the new UVC, leaving only the memory to be cleaned up asynchronously. Signed-off-by: Claudio Imbrenda Reviewed-by: Nico Boehr Reviewed-by: Janosch Frank Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20221111170632.77622-6-imbrenda@linux.ibm.com Message-Id: <20221111170632.77622-6-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/uv.h | 10 ++++++++ arch/s390/kvm/pv.c | 61 ++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 63 insertions(+), 8 deletions(-) commit afe20eb8df9108e4be9bdec88a4f90d2de863ca2 Author: Claudio Imbrenda Date: Fri Nov 11 18:06:30 2022 +0100 KVM: s390: pv: avoid export before import if possible If the appropriate UV feature bit is set, there is no need to perform an export before import. The misc feature indicates, among other things, that importing a shared page from a different protected VM will automatically also transfer its ownership. Signed-off-by: Claudio Imbrenda Reviewed-by: Nico Boehr Reviewed-by: Janosch Frank Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20221111170632.77622-5-imbrenda@linux.ibm.com Message-Id: <20221111170632.77622-5-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/kernel/uv.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8c516b25d6e9c70e6d76627932b14b0ef03a82c4 Author: Claudio Imbrenda Date: Fri Nov 11 18:06:29 2022 +0100 KVM: s390: pv: add KVM_CAP_S390_PROTECTED_ASYNC_DISABLE Add KVM_CAP_S390_PROTECTED_ASYNC_DISABLE to signal that the KVM_PV_ASYNC_DISABLE and KVM_PV_ASYNC_DISABLE_PREPARE commands for the KVM_S390_PV_COMMAND ioctl are available. Signed-off-by: Claudio Imbrenda Reviewed-by: Nico Boehr Reviewed-by: Steffen Eiden Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20221111170632.77622-4-imbrenda@linux.ibm.com Message-Id: <20221111170632.77622-4-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/kvm/kvm-s390.c | 3 +++ include/uapi/linux/kvm.h | 1 + 2 files changed, 4 insertions(+) commit d9459922a15ce7a20a85b38a976494ac7f445732 Author: Claudio Imbrenda Date: Fri Nov 11 18:06:28 2022 +0100 KVM: s390: pv: api documentation for asynchronous destroy Add documentation for the new commands added to the KVM_S390_PV_COMMAND ioctl. Signed-off-by: Claudio Imbrenda Reviewed-by: Nico Boehr Reviewed-by: Steffen Eiden Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20221111170632.77622-3-imbrenda@linux.ibm.com Message-Id: <20221111170632.77622-3-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank Documentation/virt/kvm/api.rst | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) commit fb491d5500a7ca551e49bc32d9b19d226023f68d Author: Claudio Imbrenda Date: Fri Nov 11 18:06:27 2022 +0100 KVM: s390: pv: asynchronous destroy for reboot Until now, destroying a protected guest was an entirely synchronous operation that could potentially take a very long time, depending on the size of the guest, due to the time needed to clean up the address space from protected pages. This patch implements an asynchronous destroy mechanism, that allows a protected guest to reboot significantly faster than previously. This is achieved by clearing the pages of the old guest in background. In case of reboot, the new guest will be able to run in the same address space almost immediately. The old protected guest is then only destroyed when all of its memory has been destroyed or otherwise made non protected. Two new PV commands are added for the KVM_S390_PV_COMMAND ioctl: KVM_PV_ASYNC_CLEANUP_PREPARE: set aside the current protected VM for later asynchronous teardown. The current KVM VM will then continue immediately as non-protected. If a protected VM had already been set aside for asynchronous teardown, but without starting the teardown process, this call will fail. There can be at most one VM set aside at any time. Once it is set aside, the protected VM only exists in the context of the Ultravisor, it is not associated with the KVM VM anymore. Its protected CPUs have already been destroyed, but not its memory. This command can be issued again immediately after starting KVM_PV_ASYNC_CLEANUP_PERFORM, without having to wait for completion. KVM_PV_ASYNC_CLEANUP_PERFORM: tears down the protected VM previously set aside using KVM_PV_ASYNC_CLEANUP_PREPARE. Ideally the KVM_PV_ASYNC_CLEANUP_PERFORM PV command should be issued by userspace from a separate thread. If a fatal signal is received (or if the process terminates naturally), the command will terminate immediately without completing. All protected VMs whose teardown was interrupted will be put in the need_cleanup list. The rest of the normal KVM teardown process will take care of properly cleaning up all remaining protected VMs, including the ones on the need_cleanup list. Signed-off-by: Claudio Imbrenda Reviewed-by: Nico Boehr Reviewed-by: Janosch Frank Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20221111170632.77622-2-imbrenda@linux.ibm.com Message-Id: <20221111170632.77622-2-imbrenda@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/kvm_host.h | 2 + arch/s390/kvm/kvm-s390.c | 49 +++++-- arch/s390/kvm/kvm-s390.h | 3 + arch/s390/kvm/pv.c | 295 +++++++++++++++++++++++++++++++++++++-- include/uapi/linux/kvm.h | 2 + 5 files changed, 333 insertions(+), 18 deletions(-) commit 6373ab4dfee731deec62b4452ea641611feff9b3 Author: Jiri Slaby (SUSE) Date: Wed Nov 23 09:27:36 2022 +0100 serial: atmel: don't stop the transmitter when doing PIO Writing ATMEL_US_TXDIS to ATMEL_US_CR makes the transmitter NOT to send the just queued character. This means when the character is last and uart calls ops->stop_tx(), the character is not sent at all. The usart datasheet is not much specific on this, it just says the transmitter is stopped. But apparently, the character is dropped. So we should stop the transmitter only for DMA and PDC transfers to not send any more characters. For PIO, this is unexpected and deviates from other drivers. In particular, the below referenced commit broke TX as it added a call to ->stop_tx() after the very last character written to the transmitter. So fix this by limiting the write of ATMEL_US_TXDIS to DMA transfers only. Even there, I don't know if it is correctly implemented. Are all the queued characters sent once ->start_tx() is called? Anyone tested flow control -- be it hard (RTSCTS) or the soft (XOFF/XON) one? Fixes: 2d141e683e9a ("tty: serial: use uart_port_tx() helper") Cc: Richard Genoud Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Cc: linux-arm-kernel@lists.infradead.org Reported-by: Michael Walle Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221123082736.24566-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 94ec165c9f98189ce9aa50cfcb7181ba23f92eb7 Author: Jiri Slaby (SUSE) Date: Wed Nov 23 09:27:35 2022 +0100 serial: atmel: cleanup atmel_start+stop_tx() Define local variables holding information about whether pdc or dma is used in the HW. These are retested several times by calls to atmel_use_pdc_tx() and atmel_use_dma_tx(). So to make the code more readable, simply cache the values. This is also a preparatory patch for the next one (where is_pdc is used once more in atmel_stop_tx()). Cc: Richard Genoud Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Cc: linux-arm-kernel@lists.infradead.org Reported-by: Michael Walle Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221123082736.24566-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 8682ab0eea89c300ebb120c02ead3999ca5560a8 Author: Sherry Sun Date: Wed Nov 23 10:36:19 2022 +0800 tty: serial: fsl_lpuart: switch to new dmaengine_terminate_* API Convert dmaengine_terminate_all() calls to synchronous and asynchronous versions where appropriate. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20221123023619.30173-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1a6ec673fb627c26e2267ca0a03849f91dbd9b40 Author: Yuan Can Date: Wed Nov 23 06:12:12 2022 +0000 serial: sunsab: Fix error handling in sunsab_init() The sunsab_init() returns the platform_driver_register() directly without checking its return value, if platform_driver_register() failed, the allocated sunsab_ports is leaked. Fix by free sunsab_ports and set it to NULL when platform_driver_register() failed. Fixes: c4d37215a824 ("[SERIAL] sunsab: Convert to of_driver framework.") Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20221123061212.52593-1-yuancan@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sunsab.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1307c5d33cce8a41dd77c2571e4df65a5b627feb Author: Gabriel Somlo Date: Tue Nov 22 15:04:26 2022 -0500 serial: altera_uart: fix locking in polling mode Since altera_uart_interrupt() may also be called from a poll timer in "serving_softirq" context, use spin_[lock_irqsave|unlock_irqrestore] variants, which are appropriate for both softirq and hardware interrupt contexts. Fixes: 2f8b9c15cd88 ("altera_uart: Add support for polling mode (IRQ-less)") Signed-off-by: Gabriel Somlo Link: https://lore.kernel.org/r/20221122200426.888349-1-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_uart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c93d8b457461d235ccff6c6864ead6a55ef1c18b Author: Linus Walleij Date: Mon Nov 21 23:10:15 2022 +0100 ARM: ixp4xx: Remove unused debug iomap If we don't provide the .map_io() callback, the LL debug defines will kick in anyway, so delete the UART debug map as well. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221121221015.1454948-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann arch/arm/mach-ixp4xx/ixp4xx-of.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit b02897e56b4e1fa6445be695ce5d605bb098435c 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 (cherry picked from commit e3ddd2d25533d1cc6f9fea421e4a5f16b60b3434) drivers/gpu/drm/drm_fb_helper.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 1ab4de28cb1074dabf684076996d570afbe1dc4e 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 (cherry picked from commit 8b83e1a455382dc667898a525a93f4eb6716cc41) drivers/gpu/drm/drm_fb_helper.c | 9 +-------- drivers/video/fbdev/core/fb_defio.c | 16 ---------------- include/linux/fb.h | 1 - 3 files changed, 1 insertion(+), 25 deletions(-) commit b138777786f780b9d5ce1989032608acbede0493 Author: Dave Marchevsky Date: Tue Oct 25 09:10:17 2022 -0700 fuse: Rearrange fuse_allow_current_process checks This is a followup to a previous commit of mine [0], which added the allow_sys_admin_access && capable(CAP_SYS_ADMIN) check. This patch rearranges the order of checks in fuse_allow_current_process without changing functionality. Commit 9ccf47b26b73 ("fuse: Add module param for CAP_SYS_ADMIN access bypassing allow_other") added allow_sys_admin_access && capable(CAP_SYS_ADMIN) check to the beginning of the function, with the reasoning that allow_sys_admin_access should be an 'escape hatch' for users with CAP_SYS_ADMIN, allowing them to skip any subsequent checks. However, placing this new check first results in many capable() calls when allow_sys_admin_access is set, where another check would've also returned 1. This can be problematic when a BPF program is tracing capable() calls. At Meta we ran into such a scenario recently. On a host where allow_sys_admin_access is set but most of the FUSE access is from processes which would pass other checks - i.e. they don't need CAP_SYS_ADMIN 'escape hatch' - this results in an unnecessary capable() call for each fs op. We also have a daemon tracing capable() with BPF and doing some data collection, so tracing these extraneous capable() calls has the potential to regress performance for an application doing many FUSE ops. So rearrange the order of these checks such that CAP_SYS_ADMIN 'escape hatch' is checked last. Add a small helper, fuse_permissible_uidgid, to make the logic easier to understand. Previously, if allow_other is set on the fuse_conn, uid/git checking doesn't happen as current_in_userns result is returned. These semantics are maintained here: fuse_permissible_uidgid check only happens if allow_other is not set. Signed-off-by: Dave Marchevsky Suggested-by: Andrii Nakryiko Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Miklos Szeredi fs/fuse/dir.c | 35 ++++++++++++++++++++--------------- fs/fuse/fuse_i.h | 2 +- 2 files changed, 21 insertions(+), 16 deletions(-) commit 153524053bbb0d27bb2e0be36d1b46862e9ce74c Author: Dharmendra Singh Date: Fri Jun 17 12:40:27 2022 +0530 fuse: allow non-extending parallel direct writes on the same file In general, as of now, in FUSE, direct writes on the same file are serialized over inode lock i.e we hold inode lock for the full duration of the write request. I could not find in fuse code and git history a comment which clearly explains why this exclusive lock is taken for direct writes. Following might be the reasons for acquiring an exclusive lock but not be limited to 1) Our guess is some USER space fuse implementations might be relying on this lock for serialization. 2) The lock protects against file read/write size races. 3) Ruling out any issues arising from partial write failures. This patch relaxes the exclusive lock for direct non-extending writes only. File size extending writes might not need the lock either, but we are not entirely sure if there is a risk to introduce any kind of regression. Furthermore, benchmarking with fio does not show a difference between patch versions that take on file size extension a) an exclusive lock and b) a shared lock. A possible example of an issue with i_size extending writes are write error cases. Some writes might succeed and others might fail for file system internal reasons - for example ENOSPACE. With parallel file size extending writes it _might_ be difficult to revert the action of the failing write, especially to restore the right i_size. With these changes, we allow non-extending parallel direct writes on the same file with the help of a flag called FOPEN_PARALLEL_DIRECT_WRITES. If this flag is set on the file (flag is passed from libfuse to fuse kernel as part of file open/create), we do not take exclusive lock anymore, but instead use a shared lock that allows non-extending writes to run in parallel. FUSE implementations which rely on this inode lock for serialization can continue to do so and serialized direct writes are still the default. Implementations that do not do write serialization need to be updated and need to set the FOPEN_PARALLEL_DIRECT_WRITES flag in their file open/create reply. On patch review there were concerns that network file systems (or vfs multiple mounts of the same file system) might have issues with parallel writes. We believe this is not the case, as this is just a local lock, which network file systems could not rely on anyway. I.e. this lock is just for local consistency. Signed-off-by: Dharmendra Singh Signed-off-by: Bernd Schubert Signed-off-by: Miklos Szeredi fs/fuse/file.c | 43 ++++++++++++++++++++++++++++++++++++++++--- include/uapi/linux/fuse.h | 3 +++ 2 files changed, 43 insertions(+), 3 deletions(-) commit e2283a736676554f72dbdcb62fdc1d23daf7044f Author: ye xingchen Date: Thu Sep 1 07:42:59 2022 +0000 fuse: remove the unneeded result variable Return the value fuse_dev_release() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen Signed-off-by: Miklos Szeredi fs/fuse/cuse.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 00d369bc2de5986504fc0d60bfeae4c342b2cad5 Author: Christian Brauner Date: Fri Sep 9 11:40:21 2022 +0200 fuse: port to vfs{g,u}id_t and associated helpers A while ago we introduced a dedicated vfs{g,u}id_t type in commit 1e5267cd0895 ("mnt_idmapping: add vfs{g,u}id_t"). We already switched over a good part of the VFS. Ultimately we will remove all legacy idmapped mount helpers that operate only on k{g,u}id_t in favor of the new type safe helpers that operate on vfs{g,u}id_t. Cc: Seth Forshee (Digital Ocean) Cc: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) Signed-off-by: Miklos Szeredi fs/fuse/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0618021e34c6b1edc4fc754ec53ab7fdcc98aaec Author: Jann Horn Date: Wed Sep 14 16:26:32 2022 +0200 fuse: Remove user_ns check for FUSE_DEV_IOC_CLONE Commit 8ed1f0e22f49e ("fs/fuse: fix ioctl type confusion") fixed a type confusion bug by adding an ->f_op comparison. Based on some off-list discussion back then, another check was added to compare the f_cred->user_ns. This is not for security reasons, but was based on the idea that a FUSE device FD should be using the UID/GID mappings of its f_cred->user_ns, and those translations are done using fc->user_ns, which matches the f_cred->user_ns of the initial FUSE device FD thanks to the check in fuse_fill_super(). See also commit 8cb08329b0809 ("fuse: Support fuse filesystems outside of init_user_ns"). But FUSE_DEV_IOC_CLONE is, at a higher level, a *cloning* operation that copies an existing context (with a weird API that involves first opening /dev/fuse, then tying the resulting new FUSE device FD to an existing FUSE instance). So if an application is already passing FUSE FDs across userns boundaries and dealing with the resulting ID mapping complications somehow, it doesn't make much sense to block this cloning operation. I've heard that this check is an obstacle for some folks, and I don't see a good reason to keep it, so remove it. Signed-off-by: Jann Horn Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ccc031e26afe60d2a5a3d93dabd9c978210825fb Author: Jiachen Zhang Date: Wed Sep 28 20:19:34 2022 +0800 fuse: always revalidate rename target dentry The previous commit df8629af2934 ("fuse: always revalidate if exclusive create") ensures that the dentries are revalidated on O_EXCL creates. This commit complements it by also performing revalidation for rename target dentries. Otherwise, a rename target file that only exists in kernel dentry cache but not in the filesystem will result in EEXIST if RENAME_NOREPLACE flag is used. Signed-off-by: Jiachen Zhang Signed-off-by: Zhang Tianci Signed-off-by: Miklos Szeredi fs/fuse/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f8d37020e1fd0bf6ee9381ba918135ef3712efd Author: Miklos Szeredi Date: Fri Oct 28 14:25:21 2022 +0200 fuse: add "expire only" mode to FUSE_NOTIFY_INVAL_ENTRY Add a flag to entry expiration that lets the filesystem expire a dentry without kicking it out from the cache immediately. This makes a difference for overmounted dentries, where plain invalidation would detach all submounts before dropping the dentry from the cache. If only expiry is set on the dentry, then any overmounts are left alone and until ->d_revalidate() is called. Note: ->d_revalidate() is not called for the case of following a submount, so invalidation will only be triggered for the non-overmounted case. The dentry could also be mounted in a different mount instance, in which case any submounts will still be detached. Suggested-by: Jakob Blomer Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 4 ++-- fs/fuse/dir.c | 6 ++++-- fs/fuse/fuse_i.h | 2 +- include/uapi/linux/fuse.h | 13 +++++++++++-- 4 files changed, 18 insertions(+), 7 deletions(-) commit a1db2f7edef095a385d477ab81e780694d63eebd Author: Fabio M. De Francesco Date: Wed Oct 12 13:23:23 2022 +0200 fs/fuse: 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 fuse_readdir_cached(), it being the only call site of kmap() currently left in fs/fuse. Cc: "Venkataramanan, Anirudh" Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Signed-off-by: Miklos Szeredi fs/fuse/readdir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 713befe89390c1d22a671491b2c7b2f07856f44a 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 (cherry picked from commit 7aa3d63e1ad56c174536a5aba76d8a54c4c5acb4) drivers/gpu/drm/drm_fb_helper.c | 9 +++++++++ include/drm/drm_fb_helper.h | 2 ++ 2 files changed, 11 insertions(+) commit 0c0860d190ca430fea27045f714d3bf3b3810a4d 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 (cherry picked from commit a189b2ee938f6b15ad9f95bdef63f95a3a092418) include/linux/fb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b0c09eb681773e771965405e0ad711c752f293f Merge: 29583dfcd2dd 3d335a523b93 Author: Thomas Zimmermann Date: Wed Nov 23 08:55:56 2022 +0100 Merge drm/drm-next into drm-misc-next-fixes Backmerging to update drm-misc-next-fixes for the final phase of the release cycle, again. Signed-off-by: Thomas Zimmermann commit cf59e1e4c79bf741905484cdb13c130b53576a16 Author: Baisong Zhong Date: Mon Nov 21 19:16:30 2022 +0800 ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT Shifting signed 32-bit value by 31 bits is undefined, so changing significant bit to unsigned. The UBSAN warning calltrace like below: UBSAN: shift-out-of-bounds in sound/core/seq/seq_clientmgr.c:509:22 left shift of 1 by 31 places cannot be represented in type 'int' ... Call Trace: dump_stack_lvl+0x8d/0xcf ubsan_epilogue+0xa/0x44 __ubsan_handle_shift_out_of_bounds+0x1e7/0x208 snd_seq_deliver_single_event.constprop.21+0x191/0x2f0 snd_seq_deliver_event+0x1a2/0x350 snd_seq_kernel_client_dispatch+0x8b/0xb0 snd_seq_client_notify_subscription+0x72/0xa0 snd_seq_ioctl_subscribe_port+0x128/0x160 snd_seq_kernel_client_ctl+0xce/0xf0 snd_seq_oss_create_client+0x109/0x15b alsa_seq_oss_init+0x11c/0x1aa do_one_initcall+0x80/0x440 kernel_init_freeable+0x370/0x3c3 kernel_init+0x1b/0x190 ret_from_fork+0x1f/0x30 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Baisong Zhong Link: https://lore.kernel.org/r/20221121111630.3119259-1-zhongbaisong@huawei.com Signed-off-by: Takashi Iwai include/uapi/sound/asequencer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b5172e62458f8e6ff359e5f096044a488db90ac5 Author: Baisong Zhong Date: Mon Nov 21 19:00:44 2022 +0800 ALSA: pcm: fix undefined behavior in bit shift for SNDRV_PCM_RATE_KNOT Shifting signed 32-bit value by 31 bits is undefined, so changing significant bit to unsigned. The UBSAN warning calltrace like below: UBSAN: shift-out-of-bounds in sound/core/pcm_native.c:2676:21 left shift of 1 by 31 places cannot be represented in type 'int' ... Call Trace: dump_stack_lvl+0x8d/0xcf ubsan_epilogue+0xa/0x44 __ubsan_handle_shift_out_of_bounds+0x1e7/0x208 snd_pcm_open_substream+0x9f0/0xa90 snd_pcm_oss_open.part.26+0x313/0x670 snd_pcm_oss_open+0x30/0x40 soundcore_open+0x18b/0x2e0 chrdev_open+0xe2/0x270 do_dentry_open+0x2f7/0x620 path_openat+0xd66/0xe70 do_filp_open+0xe3/0x170 do_sys_openat2+0x357/0x4a0 do_sys_open+0x87/0xd0 do_syscall_64+0x34/0x80 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Baisong Zhong Link: https://lore.kernel.org/r/20221121110044.3115686-1-zhongbaisong@huawei.com Signed-off-by: Takashi Iwai include/sound/pcm.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 9124a26401483bf2b13a99cb4317dce3f677060f Author: Kees Cook Date: Thu Sep 29 01:58:59 2022 -0700 kunit/fortify: Validate __alloc_size attribute results Validate the effect of the __alloc_size attribute on allocators. If the compiler doesn't support __builtin_dynamic_object_size(), skip the associated tests. (For GCC, just remove the "--make_options" line below...) $ ./tools/testing/kunit/kunit.py run --arch x86_64 \ --kconfig_add CONFIG_FORTIFY_SOURCE=y \ --make_options LLVM=1 fortify ... [15:16:30] ================== fortify (10 subtests) =================== [15:16:30] [PASSED] known_sizes_test [15:16:30] [PASSED] control_flow_split_test [15:16:30] [PASSED] alloc_size_kmalloc_const_test [15:16:30] [PASSED] alloc_size_kmalloc_dynamic_test [15:16:30] [PASSED] alloc_size_vmalloc_const_test [15:16:30] [PASSED] alloc_size_vmalloc_dynamic_test [15:16:30] [PASSED] alloc_size_kvmalloc_const_test [15:16:30] [PASSED] alloc_size_kvmalloc_dynamic_test [15:16:30] [PASSED] alloc_size_devm_kmalloc_const_test [15:16:30] [PASSED] alloc_size_devm_kmalloc_dynamic_test [15:16:30] ===================== [PASSED] fortify ===================== [15:16:30] ============================================================ [15:16:30] Testing complete. Ran 10 tests: passed: 10 [15:16:31] Elapsed time: 8.348s total, 0.002s configuring, 6.923s building, 1.075s running For earlier GCC prior to version 12, the dynamic tests will be skipped: [15:18:59] ================== fortify (10 subtests) =================== [15:18:59] [PASSED] known_sizes_test [15:18:59] [PASSED] control_flow_split_test [15:18:59] [PASSED] alloc_size_kmalloc_const_test [15:18:59] [SKIPPED] alloc_size_kmalloc_dynamic_test [15:18:59] [PASSED] alloc_size_vmalloc_const_test [15:18:59] [SKIPPED] alloc_size_vmalloc_dynamic_test [15:18:59] [PASSED] alloc_size_kvmalloc_const_test [15:18:59] [SKIPPED] alloc_size_kvmalloc_dynamic_test [15:18:59] [PASSED] alloc_size_devm_kmalloc_const_test [15:18:59] [SKIPPED] alloc_size_devm_kmalloc_dynamic_test [15:18:59] ===================== [PASSED] fortify ===================== [15:18:59] ============================================================ [15:18:59] Testing complete. Ran 10 tests: passed: 6, skipped: 4 [15:18:59] Elapsed time: 11.965s total, 0.002s configuring, 10.540s building, 1.068s running Cc: David Gow Cc: linux-hardening@vger.kernel.org Signed-off-by: Kees Cook lib/Makefile | 1 + lib/fortify_kunit.c | 255 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 256 insertions(+) commit af42736301cb8b4a949d3afa0dc9aaf89522601a Merge: 8263ee81f659 5e8d3dc73e80 Author: Jakub Kicinski Date: Tue Nov 22 20:42:11 2022 -0800 Merge branch 'revert-veth-avoid-drop-packets-when-xdp_redirect-performs-and-its-fix' Heng Qi says: ==================== Revert "veth: Avoid drop packets when xdp_redirect performs" and its fix This patch 2e0de6366ac16 enables napi of the peer veth automatically when the veth loads the xdp, but it breaks down as reported by Paolo and John. So reverting it and its fix, we will rework the patch and make it more robust based on comments. ==================== Link: https://lore.kernel.org/r/20221122035015.19296-1-hengqi@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 5e8d3dc73e800027f116ec964885d761d3c00777 Author: Heng Qi Date: Tue Nov 22 11:50:15 2022 +0800 Revert "veth: Avoid drop packets when xdp_redirect performs" This reverts commit 2e0de6366ac16ab4d0abb2aaddbc8a1eba216d11. Based on the issues reported by John and Paolo and their comments, this patch and the corresponding fix 5e5dc33d5da are reverted, and we'll remake it. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Signed-off-by: Jakub Kicinski drivers/net/veth.c | 88 ++++++++---------------------------------------------- 1 file changed, 12 insertions(+), 76 deletions(-) commit b535d681adda8e3bf1cb399dd1c448c8e8fd98e6 Author: Heng Qi Date: Tue Nov 22 11:50:14 2022 +0800 Revert "bpf: veth driver panics when xdp prog attached before veth_open" This reverts commit 5e5dc33d5dacb34b0165061bc5a10efd2fd3b66f. This patch fixes the panic maked by 2e0de6366ac16. Now Paolo and Toke suggest reverting the patch 2e0de6366ac16 and making it stronger, so do this first. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Signed-off-by: Jakub Kicinski drivers/net/veth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8263ee81f659ff773e5ee0a6f2adb9c6b5b4b0cc Merge: 815bc3ac75e9 5917bfe68867 Author: Jakub Kicinski Date: Tue Nov 22 20:41:57 2022 -0800 Merge branch 'remove-dsa_priv-h' Vladimir Oltean says: ==================== Remove dsa_priv.h After working on the "Autoload DSA tagging driver when dynamically changing protocol" series: https://patchwork.kernel.org/project/netdevbpf/cover/20221115011847.2843127-1-vladimir.oltean@nxp.com/ it became clear to me that the situation with DSA headers is a bit messy, and I put the tagging protocol driver macros in a pretty random temporary spot in dsa_priv.h. Now is the time to make the net/dsa/ folder a bit more organized, and to make tagging protocol driver modules include just headers they're going to use. Another thing is the merging and cleanup of dsa.c and dsa2.c. Before, dsa.c had 589 lines and dsa2.c had 1817 lines. Now, the combined dsa.c has 1749 lines, the rest went to some other places. Sorry for the set size, I know the rules, but since this is basically code movement for the most part, I thought more patches are better. ==================== Link: https://lore.kernel.org/r/20221121135555.1227271-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 5917bfe688672a6afc816ad472a274eb16c9bb7a Author: Vladimir Oltean Date: Mon Nov 21 15:55:55 2022 +0200 net: dsa: kill off dsa_priv.h The last remnants in dsa_priv.h are a netlink-related definition for which we create a new header, and DSA_MAX_NUM_OFFLOADING_BRIDGES which is only used from dsa.c, so move it there. Some inclusions need to be adjusted now that we no longer have headers included transitively from dsa_priv.h. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/dsa.c | 4 +++- net/dsa/dsa_priv.h | 19 ------------------- net/dsa/netlink.c | 2 +- net/dsa/netlink.h | 8 ++++++++ net/dsa/slave.c | 2 +- net/dsa/switch.c | 2 +- net/dsa/tag_8021q.c | 1 - net/dsa/tag_hellcreek.c | 1 - 8 files changed, 14 insertions(+), 25 deletions(-) commit 19d05ea712ecbbb67d302664da5ec58b37b9aece Author: Vladimir Oltean Date: Mon Nov 21 15:55:54 2022 +0200 net: dsa: move tag_8021q headers to their proper place tag_8021q definitions are all over the place. Some are exported to linux/dsa/8021q.h (visible by DSA core, taggers, switch drivers and everyone else), and some are in dsa_priv.h. Move the structures that don't need external visibility into tag_8021q.c, and the ones which don't need the world or switch drivers to see them into tag_8021q.h. We also have the tag_8021q.h inclusion from switch.c, which is basically the entire reason why tag_8021q.c was built into DSA in commit 8b6e638b4be2 ("net: dsa: build tag_8021q.c as part of DSA core"). I still don't know how to better deal with that, so leave it alone. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski include/linux/dsa/8021q.h | 31 +------------------------------ include/net/dsa.h | 1 + net/dsa/dsa_priv.h | 8 -------- net/dsa/port.c | 1 + net/dsa/switch.c | 1 + net/dsa/tag_8021q.c | 15 +++++++++++++++ net/dsa/tag_8021q.h | 27 +++++++++++++++++++++++++++ net/dsa/tag_ocelot_8021q.c | 1 + net/dsa/tag_sja1105.c | 1 + 9 files changed, 48 insertions(+), 38 deletions(-) commit 8e396fec21469610e6f1efb6ae8324e72ae8e135 Author: Vladimir Oltean Date: Mon Nov 21 15:55:53 2022 +0200 net: dsa: move definitions from dsa_priv.h to slave.c There are some definitions in dsa_priv.h which are only used from slave.c. So move them to slave.c. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/dsa_priv.h | 42 ------------------------------------------ net/dsa/slave.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 42 deletions(-) commit 47d2ce03dcfb6b7f0373aac6c667715d94caba78 Author: Vladimir Oltean Date: Mon Nov 21 15:55:52 2022 +0200 net: dsa: rename dsa2.c back into dsa.c and create its header The previous change moved the code into the larger file (dsa2.c) to minimize the delta. Rename that now to dsa.c, and create dsa.h, where all related definitions from dsa_priv.h go. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/Makefile | 2 +- net/dsa/{dsa2.c => dsa.c} | 1 + net/dsa/dsa.h | 40 ++++++++++++++++++++++++++++++++++++++++ net/dsa/dsa_priv.h | 28 ---------------------------- net/dsa/master.c | 2 +- net/dsa/port.c | 2 +- net/dsa/slave.c | 1 + net/dsa/switch.c | 1 + 8 files changed, 46 insertions(+), 31 deletions(-) commit 165c2fb93bed2e73c63d064b315a9da15a3e4694 Author: Vladimir Oltean Date: Mon Nov 21 15:55:51 2022 +0200 net: dsa: merge dsa.c into dsa2.c There is no longer a meaningful distinction between what goes into dsa2.c and what goes into dsa.c. Merge the 2 into a single file. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/Makefile | 1 - net/dsa/dsa.c | 234 ----------------------------------------------------- net/dsa/dsa2.c | 222 +++++++++++++++++++++++++++++++++++++++++++++++++- net/dsa/dsa_priv.h | 2 - 4 files changed, 221 insertions(+), 238 deletions(-) commit 495550a4844bb4b4d10e26a7d22e9e231adb1b84 Author: Vladimir Oltean Date: Mon Nov 21 15:55:50 2022 +0200 net: dsa: move notifier definitions to switch.h Reduce bloat in dsa_priv.h by moving the cross-chip notifier data structures to switch.h. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/dsa_priv.h | 104 +------------------------------------------------- net/dsa/switch.h | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 108 insertions(+), 105 deletions(-) commit 6dbdfce7735786f9f2dd3af615c8a03ffa1246f5 Author: Vladimir Oltean Date: Mon Nov 21 15:55:49 2022 +0200 net: dsa: move dsa_tree_notify() and dsa_broadcast() to switch.c There isn't an intuitive place for these 2 cross-chip notifier functions according to the function-to-file classification based on names (dsa_switch_*() goes to switch.c), but I consider these to be part of the cross-chip notifier handling, therefore part of switch.c. Move them there to reduce bloat in dsa2.c (the place where all code with no better place to go goes). Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/dsa2.c | 46 ---------------------------------------------- net/dsa/dsa_priv.h | 2 -- net/dsa/switch.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ net/dsa/switch.h | 4 ++++ 4 files changed, 50 insertions(+), 48 deletions(-) commit 0c603136e1e0868fb5325c3b2addc669a10ed384 Author: Vladimir Oltean Date: Mon Nov 21 15:55:48 2022 +0200 net: dsa: move headers exported by switch.c to switch.h Reduce code bloat in dsa_priv.h by moving the prototypes exported by switch.h into their own header file. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/dsa2.c | 1 + net/dsa/dsa_priv.h | 4 ---- net/dsa/port.c | 1 + net/dsa/switch.c | 1 + net/dsa/switch.h | 11 +++++++++++ net/dsa/tag_8021q.c | 1 + 6 files changed, 15 insertions(+), 4 deletions(-) commit bd954b826032e7bd6be8a53e30eb81c1b348aef6 Author: Vladimir Oltean Date: Mon Nov 21 15:55:47 2022 +0200 net: dsa: move tagging protocol code to tag.{c,h} It would be nice if tagging protocol drivers could include just the header they need, since they are (mostly) data path and isolated from most of the other DSA core code does. Create a tag.c and a tag.h file which are meant to support tagging protocol drivers. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/Makefile | 1 + net/dsa/dsa.c | 229 +-------------------------------- net/dsa/dsa2.c | 1 + net/dsa/dsa_priv.h | 296 ------------------------------------------- net/dsa/master.c | 1 + net/dsa/slave.c | 1 + net/dsa/tag.c | 243 +++++++++++++++++++++++++++++++++++ net/dsa/tag.h | 310 +++++++++++++++++++++++++++++++++++++++++++++ net/dsa/tag_8021q.c | 1 + net/dsa/tag_ar9331.c | 2 +- net/dsa/tag_brcm.c | 2 +- net/dsa/tag_dsa.c | 2 +- net/dsa/tag_gswip.c | 2 +- net/dsa/tag_hellcreek.c | 1 + net/dsa/tag_ksz.c | 3 +- net/dsa/tag_lan9303.c | 2 +- net/dsa/tag_mtk.c | 2 +- net/dsa/tag_none.c | 2 +- net/dsa/tag_ocelot.c | 3 +- net/dsa/tag_ocelot_8021q.c | 3 +- net/dsa/tag_qca.c | 2 +- net/dsa/tag_rtl4_a.c | 2 +- net/dsa/tag_rtl8_4.c | 2 +- net/dsa/tag_rzn1_a5psw.c | 2 +- net/dsa/tag_sja1105.c | 3 +- net/dsa/tag_trailer.c | 2 +- net/dsa/tag_xrs700x.c | 2 +- 27 files changed, 581 insertions(+), 541 deletions(-) commit 09f92341681a23346c456938bcb2670de2cd99d4 Author: Vladimir Oltean Date: Mon Nov 21 15:55:46 2022 +0200 net: dsa: move headers exported by slave.c to slave.h Minimize the use of the bloated dsa_priv.h by moving the prototypes exported by slave.c to their own header file. This is just approximate to get the code structure right. There are some interdependencies with static inline code left in dsa_priv.h, so leave slave.h included from there for now. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/dsa.c | 1 + net/dsa/dsa2.c | 1 + net/dsa/dsa_priv.h | 59 ++-------------------------------------------- net/dsa/netlink.c | 1 + net/dsa/port.c | 1 + net/dsa/slave.c | 1 + net/dsa/slave.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ net/dsa/switch.c | 1 + 8 files changed, 77 insertions(+), 57 deletions(-) commit 94ef6fad3bf317b43cdc59ba171dff2486e59975 Author: Vladimir Oltean Date: Mon Nov 21 15:55:45 2022 +0200 net: dsa: move headers exported by master.c to master.h Minimize the use of the bloated dsa_priv.h by moving the prototypes exported by master.c to their own header file. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/dsa2.c | 1 + net/dsa/dsa_priv.h | 9 --------- net/dsa/master.c | 6 ++++++ net/dsa/master.h | 19 +++++++++++++++++++ net/dsa/slave.c | 1 + 5 files changed, 27 insertions(+), 9 deletions(-) commit 022bba63c3ca02fc074c68b4e7b949bddcf320d6 Author: Vladimir Oltean Date: Mon Nov 21 15:55:44 2022 +0200 net: dsa: move headers exported by port.c to port.h Minimize the use of the bloated dsa_priv.h by moving the prototypes exported by port.c to their own header file. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/dsa2.c | 1 + net/dsa/dsa_priv.h | 97 -------------------------------------------- net/dsa/master.c | 1 + net/dsa/port.c | 1 + net/dsa/port.h | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++ net/dsa/slave.c | 1 + net/dsa/switch.c | 1 + net/dsa/tag_8021q.c | 1 + 8 files changed, 120 insertions(+), 97 deletions(-) commit 7aea535d40eaba97cb116ba2b30ecd897eee0f43 Author: Vladimir Oltean Date: Mon Nov 21 15:55:43 2022 +0200 net: dsa: move rest of devlink setup/teardown to devlink.c The code that needed further refactoring into dedicated functions in dsa2.c was left aside. Move it now to devlink.c, and make dsa2.c stop including net/devlink.h. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/devlink.c | 38 +++++++++++++++++++++++++++++++++++++- net/dsa/devlink.h | 7 +++++-- net/dsa/dsa2.c | 24 +++++++----------------- 3 files changed, 49 insertions(+), 20 deletions(-) commit d95fa75061fbd09a7ae78a76bc8902a84b8538a5 Author: Vladimir Oltean Date: Mon Nov 21 15:55:42 2022 +0200 net: dsa: if ds->setup is true, ds->devlink is always non-NULL Simplify dsa_switch_teardown() to remove the NULL checking for ds->devlink. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/dsa2.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 5cf2c75b5b91bcf81d61b2d2ea1c71363bcacf89 Author: Vladimir Oltean Date: Mon Nov 21 15:55:41 2022 +0200 net: dsa: move bulk of devlink code to devlink.{c,h} dsa.c and dsa2.c are bloated with too much off-topic code. Identify all code related to devlink and move it to a new devlink.c file. Steer clear of the dsa_priv.h dumping ground antipattern and create a dedicated devlink.h for it, which will be included only by the C files which need it. Usage of dsa_priv.h will be minimized in later patches. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/Makefile | 1 + net/dsa/devlink.c | 355 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ net/dsa/devlink.h | 13 ++ net/dsa/dsa.c | 107 ---------------- net/dsa/dsa2.c | 240 +----------------------------------- 5 files changed, 370 insertions(+), 346 deletions(-) commit d2be320495b93ffb469e53100ba1668d0cd7eedc Author: Vladimir Oltean Date: Mon Nov 21 15:55:40 2022 +0200 net: dsa: modularize DSA_TAG_PROTO_NONE There is no reason that I can see why the no-op tagging protocol should be registered manually, so make it a module and make all drivers which have any sort of reference to DSA_TAG_PROTO_NONE select it. Note that I don't know if ksz_get_tag_protocol() really needs this, or if it's just the logic which is poorly written. All switches seem to have their own tagging protocol, and DSA_TAG_PROTO_NONE is just a fallback that never gets used. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski drivers/net/dsa/Kconfig | 2 ++ drivers/net/dsa/b53/Kconfig | 1 + drivers/net/dsa/microchip/Kconfig | 1 + net/dsa/Kconfig | 6 ++++++ net/dsa/Makefile | 1 + net/dsa/dsa.c | 21 --------------------- net/dsa/dsa_priv.h | 1 - net/dsa/tag_none.c | 30 ++++++++++++++++++++++++++++++ 8 files changed, 41 insertions(+), 22 deletions(-) commit c5fb8ead3283955dc68671f853017b181f96fdc1 Author: Vladimir Oltean Date: Mon Nov 21 15:55:39 2022 +0200 net: dsa: unexport dsa_dev_to_net_device() dsa.o and dsa2.o are linked into the same dsa_core.o, there is no reason to export this symbol when its only caller is local. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski include/net/dsa.h | 2 -- net/dsa/dsa.c | 1 - net/dsa/dsa_priv.h | 2 ++ 3 files changed, 2 insertions(+), 3 deletions(-) commit 815bc3ac75e9e34727f8ca78380266f34a3b6c66 Author: Moshe Shemesh Date: Sun Nov 20 10:36:52 2022 +0200 devlink: remove redundant health state set to error Reporter health_state is set twice to error in devlink_health_report(). Remove second time as it is redundant. Signed-off-by: Moshe Shemesh Reviewed-by: Eran Ben Elisha Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/1668933412-5498-1-git-send-email-moshe@nvidia.com Signed-off-by: Jakub Kicinski net/core/devlink.c | 2 -- 1 file changed, 2 deletions(-) commit c90b6b1005ec7423c7d0063eb27a9728498f6ec8 Author: Saeed Mahameed Date: Tue Nov 22 10:41:58 2022 -0800 tcp: Fix build break when CONFIG_IPV6=n The cited commit caused the following build break when CONFIG_IPV6 was disabled net/ipv4/tcp_input.c: In function ‘tcp_syn_flood_action’: include/net/sock.h:387:37: error: ‘const struct sock_common’ has no member named ‘skc_v6_rcv_saddr’; did you mean ‘skc_rcv_saddr’? Fix by using inet6_rcv_saddr() macro which handles this situation nicely. Fixes: d9282e48c608 ("tcp: Add listening address to SYN flood message") Signed-off-by: Saeed Mahameed Reported-by: Geert Uytterhoeven CC: Matthieu Baerts CC: Jamie Bainbridge Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20221122184158.170798-1-saeed@kernel.org Signed-off-by: Jakub Kicinski net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c43c0e589e69f5bc49932b03a920dd2392385d37 Merge: 339e79dfb087 662233731d66 Author: Jakub Kicinski Date: Tue Nov 22 19:50:20 2022 -0800 Merge branch 'i2c/client_device_id_helper-immutable' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull in a dependency for an API cleanup: https://lore.kernel.org/all/20221118224540.619276-1-uwe@kleine-koenig.org/ Signed-off-by: Jakub Kicinski commit 93c68cc46a070775cc6675e3543dd909eb9f6c9e Author: Christoph Böhmwalder Date: Tue Nov 22 14:43:01 2022 +0100 drbd: use consistent license DRBD currently has a mix of GPL-2.0 and GPL-2.0-or-later SPDX license identifiers. We have decided to stick with GPL 2.0 only, so consistently use that identifier. Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221122134301.69258-5-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe drivers/block/drbd/Kconfig | 2 +- drivers/block/drbd/Makefile | 2 +- drivers/block/drbd/drbd_actlog.c | 2 +- drivers/block/drbd/drbd_bitmap.c | 2 +- drivers/block/drbd/drbd_debugfs.c | 2 +- drivers/block/drbd/drbd_debugfs.h | 2 +- drivers/block/drbd/drbd_int.h | 2 +- drivers/block/drbd/drbd_interval.c | 2 +- drivers/block/drbd/drbd_interval.h | 2 +- drivers/block/drbd/drbd_main.c | 2 +- drivers/block/drbd/drbd_nl.c | 2 +- drivers/block/drbd/drbd_nla.c | 2 +- drivers/block/drbd/drbd_nla.h | 2 +- drivers/block/drbd/drbd_proc.c | 2 +- drivers/block/drbd/drbd_protocol.h | 2 +- drivers/block/drbd/drbd_receiver.c | 2 +- drivers/block/drbd/drbd_req.c | 2 +- drivers/block/drbd/drbd_req.h | 2 +- drivers/block/drbd/drbd_state.c | 2 +- drivers/block/drbd/drbd_state.h | 2 +- drivers/block/drbd/drbd_state_change.h | 2 +- drivers/block/drbd/drbd_strings.c | 2 +- drivers/block/drbd/drbd_strings.h | 2 +- drivers/block/drbd/drbd_vli.h | 2 +- drivers/block/drbd/drbd_worker.c | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) commit 2cd10a496a86787367716b684dadfecbb594095b Author: Joel Colledge Date: Tue Nov 22 14:43:00 2022 +0100 lru_cache: remove unused lc_private, lc_set, lc_index_of Signed-off-by: Joel Colledge Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221122134301.69258-4-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe include/linux/lru_cache.h | 3 --- lib/lru_cache.c | 44 -------------------------------------------- 2 files changed, 47 deletions(-) commit 9933438430b3b787f96bb434b4490b0dda59c9b3 Author: Christoph Böhmwalder Date: Tue Nov 22 14:42:59 2022 +0100 lru_cache: remove compiled out code Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221122134301.69258-3-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe lib/lru_cache.c | 11 ----------- 1 file changed, 11 deletions(-) commit f2d03d89615ef65b5dff3aae6581df0b5fcbaa3b Author: Lars Ellenberg Date: Tue Nov 22 14:42:58 2022 +0100 lru_cache: use atomic operations when accessing lc->flags, always Or, depending on the way locking is implemented at the call sites, some updates could be lost (has not been observed). Signed-off-by: Lars Ellenberg Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221122134301.69258-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe lib/lru_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76c340e93f5aa5d66cf62dd0a78777e499f36952 Author: Andy Shevchenko Date: Tue Nov 22 15:07:32 2022 +0200 clk: fractional-divider: Regroup inclusions For the better maintenance regroup inclusions as follows: - split CCF related headers in its own group - order groups from generic to particular - sort each group alphabetically Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221122130732.48537-3-andriy.shevchenko@linux.intel.com Signed-off-by: Stephen Boyd drivers/clk/clk-fractional-divider.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ac49a19280dfc229c4f2cd262787d27b91b944ea Author: Andy Shevchenko Date: Tue Nov 22 15:07:31 2022 +0200 clk: fractional-divider: Show numerator and denominator in debugfs It's very useful to see what are the values of the fractional divider. For that, add respective debugfs files. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221122130732.48537-2-andriy.shevchenko@linux.intel.com Signed-off-by: Stephen Boyd drivers/clk/clk-fractional-divider.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 7fffdb777371cbc20929cc648509765e1923937d Author: Andy Shevchenko Date: Tue Nov 22 15:07:30 2022 +0200 clk: fractional-divider: Split out clk_fd_get_div() helper Split out clk_fd_get_div() helper for the future use elsewhere. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221122130732.48537-1-andriy.shevchenko@linux.intel.com Signed-off-by: Stephen Boyd drivers/clk/clk-fractional-divider.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 5381dc785312e2ea77febd8274834ee5b59f580e Author: Kory Maincent Date: Tue Nov 15 14:58:13 2022 +0100 clk: spear: Fix SSP clock definition on SPEAr600 There is no SPEAr600 device named "ssp-pl022.x". Instead, the description of the SSP (Synchronous Serial Port) was recently added to the Device Tree, and the device name is "xxx.spi", so we should associate the SSP gateable clock to these device names. Signed-off-by: Kory Maincent Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20221115135814.214388-3-kory.maincent@bootlin.com Signed-off-by: Stephen Boyd drivers/clk/spear/spear6xx_clock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9a856bee524b65405ba58e28c26e6bd1278d7930 Author: Kory Maincent Date: Tue Nov 15 14:58:12 2022 +0100 clk: spear: Fix CLCD clock definition on SPEAr600 There is no SPEAr600 device named "clcd". Instead, the description of the CLCD (color liquid crystal display controller) name is "fc200000.clcd", so we should associate the CLCD gateable clock to this device name. Signed-off-by: Kory Maincent Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20221115135814.214388-2-kory.maincent@bootlin.com Signed-off-by: Stephen Boyd drivers/clk/spear/spear6xx_clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12897adc8eea9e56e44482dcdf71d4c98a08dbde Author: Christophe JAILLET Date: Sat Nov 12 22:43:03 2022 +0100 clk: Remove a useless include is not needed for these drivers. Remove the corresponding #include. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/12dd5cb49efa7714f8e0389e4c7b3bc829e8a90e.1668289299.git.christophe.jaillet@wanadoo.fr Acked-by: Heiko Stuebner Acked-by: Jerome Brunet Reviewed-by: Luca Ceresoli Signed-off-by: Stephen Boyd drivers/clk/clk-versaclock5.c | 1 - drivers/clk/meson/clk-pll.c | 1 - drivers/clk/rockchip/clk.c | 1 - 3 files changed, 3 deletions(-) commit 9f4211bf7f811b653aa6acfb9aea38222436a458 Author: Eray Orçunus Date: Tue Nov 22 17:46:55 2022 -0800 HID: add mapping for camera access keys HUTRR72 added 3 new usage codes for keys that are supposed to enable, disable and toggle camera access. These are useful, considering many laptops today have key(s) for toggling access to camera. This patch adds new key definitions for KEY_CAMERA_ACCESS_ENABLE, KEY_CAMERA_ACCESS_DISABLE and KEY_CAMERA_ACCESS_TOGGLE. Additionally hid-debug is adjusted to recognize this new usage codes as well. Signed-off-by: Eray Orçunus Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20221029120311.11152-3-erayorcunus@gmail.com Signed-off-by: Dmitry Torokhov drivers/hid/hid-debug.c | 3 +++ drivers/hid/hid-input.c | 3 +++ include/uapi/linux/input-event-codes.h | 3 +++ 3 files changed, 9 insertions(+) commit 9c7babf94a0d686b552e53aded8d4703d1b8b92b Author: Dave Chinner Date: Wed Nov 23 12:44:38 2022 +1100 xfs,iomap: move delalloc punching to iomap Because that's what Christoph wants for this error handling path only XFS uses. It requires a new iomap export for handling errors over delalloc ranges. This is basically the XFS code as is stands, but even though Christoph wants this as iomap funcitonality, we still have to call it from the filesystem specific ->iomap_end callback, and call into the iomap code with yet another filesystem specific callback to punch the delalloc extent within the defined ranges. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/iomap/buffered-io.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_iomap.c | 47 +++++++-------------------------------- include/linux/iomap.h | 4 ++++ 3 files changed, 72 insertions(+), 39 deletions(-) commit b71f889c18ada210a97aa3eb5e00c0de552234c6 Author: Dave Chinner Date: Wed Nov 23 12:40:12 2022 +1100 xfs: use byte ranges for write cleanup ranges xfs_buffered_write_iomap_end() currently converts the byte ranges passed to it to filesystem blocks to pass them to the bmap code to punch out delalloc blocks, but then has to convert filesytem blocks back to byte ranges for page cache truncate. We're about to make the page cache truncate go away and replace it with a page cache walk, so having to convert everything to/from/to filesystem blocks is messy and error-prone. It is much easier to pass around byte ranges and convert to page indexes and/or filesystem blocks only where those units are needed. In preparation for the page cache walk being added, add a helper that converts byte ranges to filesystem blocks and calls xfs_bmap_punch_delalloc_range() and convert xfs_buffered_write_iomap_end() to calculate limits in byte ranges. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong fs/xfs/xfs_iomap.c | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) commit 198dd8aedee6a7d2de0dfa739f9a008a938f6848 Author: Dave Chinner Date: Wed Nov 23 12:40:11 2022 +1100 xfs: punching delalloc extents on write failure is racy xfs_buffered_write_iomap_end() has a comment about the safety of punching delalloc extents based holding the IOLOCK_EXCL. This comment is wrong, and punching delalloc extents is not race free. When we punch out a delalloc extent after a write failure in xfs_buffered_write_iomap_end(), we punch out the page cache with truncate_pagecache_range() before we punch out the delalloc extents. At this point, we only hold the IOLOCK_EXCL, so there is nothing stopping mmap() write faults racing with this cleanup operation, reinstantiating a folio over the range we are about to punch and hence requiring the delalloc extent to be kept. If this race condition is hit, we can end up with a dirty page in the page cache that has no delalloc extent or space reservation backing it. This leads to bad things happening at writeback time. To avoid this race condition, we need the page cache truncation to be atomic w.r.t. the extent manipulation. We can do this by holding the mapping->invalidate_lock exclusively across this operation - this will prevent new pages from being inserted into the page cache whilst we are removing the pages and the backing extent and space reservation. Taking the mapping->invalidate_lock exclusively in the buffered write IO path is safe - it naturally nests inside the IOLOCK (see truncate and fallocate paths). iomap_zero_range() can be called from under the mapping->invalidate_lock (from the truncate path via either xfs_zero_eof() or xfs_truncate_page(), but iomap_zero_iter() will not instantiate new delalloc pages (because it skips holes) and hence will not ever need to punch out delalloc extents on failure. Fix the locking issue, and clean up the code logic a little to avoid unnecessary work if we didn't allocate the delalloc extent or wrote the entire region we allocated. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/xfs_iomap.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) commit 53949843d30c3fc03a55d51b2320ff31e0001c56 Author: Dario Binacchi Date: Sun Nov 6 16:56:25 2022 +0100 clk: ti: fix typo in ti_clk_retry_init() code comment Replace "not" with "node". Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20221106155625.3476564-1-dario.binacchi@amarulasolutions.com Signed-off-by: Stephen Boyd drivers/clk/ti/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e49aacaaf4a1380ba4d3cb4a22923193f5fdf40 Author: Dario Binacchi Date: Sun Nov 13 19:11:47 2022 +0100 clk: ti: dra7-atl: don't allocate `parent_names' variable The `parent_names' variable was freed also in case of kzalloc() error. Instead of modifying the code to perform a proper memory release, I decided to fix the bug by not allocating memory. Since only one parent name is referenced, it is not necessary to allocate this variable at runtime and therefore you can avoid calling the kzalloc() function. This simplifies the code (even calls to kfree can be removed) and improves the performance of the routine. Signed-off-by: Dario Binacchi Reported-by: kernel test robot Link: https://lore.kernel.org/r/20221113181147.1626585-2-dario.binacchi@amarulasolutions.com Tested-by: Tony Lindgren Reviewed-by: Tony Lindgren Signed-off-by: Stephen Boyd drivers/clk/ti/clk-dra7-atl.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 3400d546a741a2b2001d88e7fa29110d45a3930d Author: Dario Binacchi Date: Sun Nov 13 19:11:46 2022 +0100 clk: ti: change ti_clk_register[_omap_hw]() API The ti_clk_register() and ti_clk_register_omap_hw() functions are always called with the parameter of type "struct device" set to NULL, since the functions from which they are called always have a parameter of type "struct device_node". Replacing "struct device" type parameter with "struct device_node" will allow you to register a TI clock to the common clock framework by taking advantage of the facilities provided by the "struct device_node" type. Further, adding the "of_" prefix to the name of these functions explicitly binds them to the "struct device_node" type. The patch has been tested on a Beaglebone board. Signed-off-by: Dario Binacchi Tested-by: Tony Lindgren Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20221113181147.1626585-1-dario.binacchi@amarulasolutions.com Signed-off-by: Stephen Boyd drivers/clk/ti/apll.c | 4 ++-- drivers/clk/ti/clk-dra7-atl.c | 2 +- drivers/clk/ti/clk.c | 34 ++++++++++++++++------------------ drivers/clk/ti/clkctrl.c | 4 ++-- drivers/clk/ti/clock.h | 10 +++++----- drivers/clk/ti/composite.c | 2 +- drivers/clk/ti/divider.c | 2 +- drivers/clk/ti/dpll.c | 4 ++-- drivers/clk/ti/fixed-factor.c | 2 +- drivers/clk/ti/gate.c | 6 +++--- drivers/clk/ti/interface.c | 7 ++++--- drivers/clk/ti/mux.c | 6 +++--- 12 files changed, 41 insertions(+), 42 deletions(-) commit 9f8e30559b0425d4372c643aef4ddea547a3c1ac Merge: 9abf2313adc1 f64603c9729a Author: Stephen Boyd Date: Tue Nov 22 16:51:29 2022 -0800 Merge tag 'sunxi-clk-for-6.2-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clk driver updates from Jernej Skrabec: - Fixed header guard for V3S clocks - Add IR module clock for f1c100s * tag 'sunxi-clk-for-6.2-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: f1c100s: Add IR mod clock clk: sunxi-ng: v3s: Correct the header guard of ccu-sun8i-v3s.h commit 01e6bf9921eef8ab25586162a2b1d2ca6292b7f4 Merge: 57d894e77237 777bcc85e1fb Author: Stephen Boyd Date: Tue Nov 22 16:47:59 2022 -0800 Merge tag 'renesas-clk-for-v6.2-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: - Correct the parent clocks for the (High Speed) Serial Communication Interfaces with FIFO ((H)SCIF) modules and the mixed-up Ethernet Switch clocks on R-Car S4-8 - Add timer (TMU, CMT) and Cortex-A76 CPU core (Z0) clocks on R-Car V4H * tag 'renesas-clk-for-v6.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a779f0: Fix Ethernet Switch clocks clk: renesas: r8a779g0: Add Z0 clock support clk: renesas: r8a779g0: Add CMT clocks clk: renesas: r8a779g0: Add TMU and SASYNCRT clocks clk: renesas: r8a779f0: Fix SCIF parent clocks clk: renesas: r8a779f0: Fix HSCIF parent clocks commit d0b1c69288cf0f6b68eac0ebdf96d3e2d89f61df Merge: 9abf2313adc1 d73406ed2dcf Author: Stephen Boyd Date: Tue Nov 22 16:25:08 2022 -0800 Merge tag 'clk-meson-v6.2-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull Amlogic clk driver updates from Jerome Brunet: - Add 2 PLL driver fixups * tag 'clk-meson-v6.2-1' of https://github.com/BayLibre/clk-meson: clk: meson: pll: add pcie lock retry workaround clk: meson: pll: adjust timeout in meson_clk_pll_wait_lock() commit ad517059787a5f37018f369f3112164eccd3d6c1 Author: Dan Carpenter Date: Fri Nov 18 16:03:37 2022 +0300 drm/msm/hdmi: remove unnecessary NULL check This code was recently refactored in commit and now the "hdmi" pointer can't be NULL. Checking for NULL leads to a Smatch warning: drivers/gpu/drm/msm/hdmi/hdmi.c:141 msm_hdmi_init() warn: variable dereferenced before check 'hdmi' (see line 119) Fixes: 69a88d8633ec ("drm/msm/hdmi: move resource allocation to probe function") Signed-off-by: Dan Carpenter Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/512163/ Link: https://lore.kernel.org/r/Y3eCqQ2pm1uQnktV@kadam Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c54155622c29297560a0840640e2d7431add2cb3 Author: Bryan O'Donoghue Date: Wed Sep 7 01:00:55 2022 +0100 dt-bindings: msm: dsi-controller-main: Drop redundant phy-names Adding in msm8939 which is based msm8916 dtsi I stumbled across a binding check complaining about the phy name for msm8916 which we were reusing for msm8939. The currently inconsistent upstream dtsi naming of "dsi" and "dsi-phy" is not captured in the yaml for this driver. The driver however doesn't care about the name of DSI phy, hence the yaml check is redundant. Both Krzysztof and Rob suggested we could drop the phy-names entirely if it really isn't a dependency. So, drop the inconsistent and unnecessary phy-names field from the yaml. Signed-off-by: Bryan O'Donoghue Signed-off-by: Dmitry Baryshkov Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d335a523b938a445a674be24d1dd5c7a4c86fb6 Merge: 242eb7b0a0a2 d2eae8e98d59 Author: Dave Airlie Date: Wed Nov 23 08:03:07 2022 +1000 Merge tag 'drm-intel-next-2022-11-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-next GVT Changes: - gvt-next stuff mostly with refactor for the new MDEV interface. i915 Changes: - PSR fixes and improvements (Jouni) - DP DSC fixes (Vinod, Jouni) - More general display cleanups (Jani) - More display collor management cleanup targetting degamma (Ville) - remove circ_buf.h includes (Jiri) - wait power off delay at driver remove to optimize probe (Jani) - More audio cleanup targeting the ELD precompute readout (Ville) - Enable DC power states on all eDP ports (Imre) - RPL-P stepping info (Matt Atwood) - MTL enabling patches (RK) - Removal of DG2 force_probe (Matt) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y3f71obyEkImXoUF@intel.com commit 8a2162a9227dda936a21fe72014a9931a3853a7b Merge: dc79f035b206 227a89cf5041 Author: Alexei Starovoitov Date: Tue Nov 22 14:45:41 2022 -0800 Merge branch 'Support storing struct cgroup * objects as kptrs' David Vernet says: ==================== In [0], we added support for storing struct task_struct * objects as kptrs. This patch set extends this effort to also include storing struct cgroup * object as kptrs. As with tasks, there are many possible use cases for storing cgroups in maps. During tracing, for example, it could be useful to query cgroup statistics such as PSI averages, or tracking which tasks are migrating to and from the cgroup. [0]: https://lore.kernel.org/all/20221120051004.3605026-1-void@manifault.com/ ==================== Acked-by: Tejun Heo Signed-off-by: Alexei Starovoitov commit 227a89cf504188759fd3d8933a3a06fc60cca7f2 Author: David Vernet Date: Mon Nov 21 23:54:58 2022 -0600 selftests/bpf: Add selftests for bpf_cgroup_ancestor() kfunc bpf_cgroup_ancestor() allows BPF programs to access the ancestor of a struct cgroup *. This patch adds selftests that validate its expected behavior. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221122055458.173143-5-void@manifault.com Signed-off-by: Alexei Starovoitov .../testing/selftests/bpf/prog_tests/cgrp_kfunc.c | 1 + .../selftests/bpf/progs/cgrp_kfunc_common.h | 1 + .../selftests/bpf/progs/cgrp_kfunc_success.c | 45 ++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit 5ca7867078296cfa9c100f9a3b2d24be1e139825 Author: David Vernet Date: Mon Nov 21 23:54:57 2022 -0600 bpf: Add bpf_cgroup_ancestor() kfunc struct cgroup * objects have a variably sized struct cgroup *ancestors[] field which stores pointers to their ancestor cgroups. If using a cgroup as a kptr, it can be useful to access these ancestors, but doing so requires variable offset accesses for PTR_TO_BTF_ID, which is currently unsupported. This is a very useful field to access for cgroup kptrs, as programs may wish to walk their ancestor cgroups when determining e.g. their proportional cpu.weight. So as to enable this functionality with cgroup kptrs before var_off is supported for PTR_TO_BTF_ID, this patch adds a bpf_cgroup_ancestor() kfunc which accesses the cgroup node on behalf of the caller, and acquires a reference on it. Once var_off is supported for PTR_TO_BTF_ID, and fields inside a struct can be marked as trusted so they retain the PTR_TRUSTED modifier when walked, this can be removed. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221122055458.173143-4-void@manifault.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit f583ddf15e57746e60f3b68d529afc9faa2e2cb3 Author: David Vernet Date: Mon Nov 21 23:54:56 2022 -0600 selftests/bpf: Add cgroup kfunc / kptr selftests This patch adds a selftest suite to validate the cgroup kfuncs that were added in the prior patch. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221122055458.173143-3-void@manifault.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/DENYLIST.s390x | 1 + .../testing/selftests/bpf/prog_tests/cgrp_kfunc.c | 174 ++++++++++++++ .../selftests/bpf/progs/cgrp_kfunc_common.h | 71 ++++++ .../selftests/bpf/progs/cgrp_kfunc_failure.c | 260 +++++++++++++++++++++ .../selftests/bpf/progs/cgrp_kfunc_success.c | 125 ++++++++++ 5 files changed, 631 insertions(+) commit fda01efc61605af7c6fa03c4109f14d59c9228b7 Author: David Vernet Date: Mon Nov 21 23:54:55 2022 -0600 bpf: Enable cgroups to be used as kptrs Now that tasks can be used as kfuncs, and the PTR_TRUSTED flag is available for us to easily add basic acquire / get / release kfuncs, we can do the same for cgroups. This patch set adds the following kfuncs which enable using cgroups as kptrs: struct cgroup *bpf_cgroup_acquire(struct cgroup *cgrp); struct cgroup *bpf_cgroup_kptr_get(struct cgroup **cgrpp); void bpf_cgroup_release(struct cgroup *cgrp); A follow-on patch will add a selftest suite which validates these kfuncs. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221122055458.173143-2-void@manifault.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 3 deletions(-) commit 572302af1258459e124437b8f3369357447afac7 Author: Roberto Sassu Date: Thu Nov 10 10:46:35 2022 +0100 reiserfs: Add missing calls to reiserfs_security_free() Commit 57fe60df6241 ("reiserfs: add atomic addition of selinux attributes during inode creation") defined reiserfs_security_free() to free the name and value of a security xattr allocated by the active LSM through security_old_inode_init_security(). However, this function is not called in the reiserfs code. Thus, add a call to reiserfs_security_free() whenever reiserfs_security_init() is called, and initialize value to NULL, to avoid to call kfree() on an uninitialized pointer. Finally, remove the kfree() for the xattr name, as it is not allocated anymore. Fixes: 57fe60df6241 ("reiserfs: add atomic addition of selinux attributes during inode creation") Cc: stable@vger.kernel.org Cc: Jeff Mahoney Cc: Tetsuo Handa Reported-by: Mimi Zohar Reported-by: Tetsuo Handa Signed-off-by: Roberto Sassu Reviewed-by: Mimi Zohar Signed-off-by: Paul Moore fs/reiserfs/namei.c | 4 ++++ fs/reiserfs/xattr_security.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 848343c0b4d64821aec19b2cff47b58f77362d38 Author: Pierre Gondois Date: Mon Nov 7 16:57:12 2022 +0100 arm64: dts: rockchip: update cache properties for rk3308 and rk3328 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/20221107155825.1644604-20-pierre.gondois@arm.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3308.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3328.dtsi | 1 + 2 files changed, 2 insertions(+) commit afbaed737fb45bcae91e4606025fb31da71b9dfe Author: Andrew Powers-Holmes Date: Wed Nov 16 12:53:37 2022 +0100 arm64: dts: rockchip: Add SOQuartz Model A baseboard This patch adds the device tree for the "Model A" baseboard for the SOQuartz CM4 SoM, which is not to be confused with the Quartz64 Model A, which is the same form factor and SoC, but is not a CM4 carrier board. The board features a PCIe 2 x1 slot, USB 2 host ports, CSI/DSI connectors, an eDP FFC connector, gigabit ethernet, HDMI, and a 12V DC barrel jack. Also present is a microSD card slot, 40-pin GPIO, and a power and reset button. Signed-off-by: Andrew Powers-Holmes [rebase, misc fixes, reword] Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20221116115337.541601-5-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3566-soquartz-model-a.dts | 232 +++++++++++++++++++++ 2 files changed, 233 insertions(+) commit 7441d8c437883581dddfb616a087b399338244f0 Author: Nicolas Frattaroli Date: Wed Nov 16 12:53:36 2022 +0100 dt-bindings: arm: rockchip: Add SOQuartz Model A The SOQuartz Model A base board is a carrier board for the CM4 form factor, designed around the PINE64 SOQuartz CM4 SoM. The board sports "Model A" dimensions like the Quartz64 Model A, but is not to be confused with that. As for I/O, it features USB 2 ports, Gigabit Ethernet, a PCIe 2 x1 slot, HDMI, a 40-pin GPIO header, CSI/DSI connectors, an eDP flat-flex cable connector, a 12V DC barrel jack for power input and power/reset buttons as well as a microSD card slot. Signed-off-by: Nicolas Frattaroli Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221116115337.541601-4-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.yaml | 1 + 1 file changed, 1 insertion(+) commit a5c826ecde5222f755e7d8a0c8d795189c5c1228 Author: Andrew Powers-Holmes Date: Wed Nov 16 12:53:35 2022 +0100 arm64: dts: rockchip: Add SOQuartz blade board This adds a device tree for the PINE64 SOQuartz blade baseboard, a 1U rack mountable baseboard for the CM4 form factor with PoE support designed for the SOQuartz CM4 System-on-Module. The board takes power from either PoE or a 5V DC input, and allows for mounting an M.2 SSD. The board also features one USB 2.0 host port, one HDMI output, a 3.5mm jack for UART, and the aforementioned gigabit networking port. Signed-off-by: Andrew Powers-Holmes [rebase, squash, reword, misc fixes] Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20221116115337.541601-3-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3566-soquartz-blade.dts | 194 +++++++++++++++++++++ 2 files changed, 195 insertions(+) commit 8c84c2e51f3ee39b40e8078ebe3ad9c01fb17aff Author: Nicolas Frattaroli Date: Wed Nov 16 12:53:34 2022 +0100 dt-bindings: arm: rockchip: Add SOQuartz Blade Add a compatible for the SOQuartz Blade base board to the rockchip platforms binding. The SOQuartz Blade is a PoE-capable carrier board for the CM4 SoM form factor, designed around the SOQuartz CM4 System-on-Module. The board features the usual connectivity (GPIO, USB, HDMI, Ethernet) and an M.2 slot for SSDs. It may also be powered from a 5V barrel jack input, and has a 3.5mm jack for UART debug output. Signed-off-by: Nicolas Frattaroli Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221116115337.541601-2-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.yaml | 1 + 1 file changed, 1 insertion(+) commit 5f964b02468599696bfa7ea7f1eab140a224127a Author: Jean Delvare Date: Tue Nov 22 14:19:52 2022 -0800 Input: stmpe-ts - 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 Link: https://lore.kernel.org/r/20221121145203.1efb0c08@endymion.delvare Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e2347dbd618f88865408709cb7c06ab1f5f3f4a Author: Maya Matuszczyk Date: Thu Nov 17 22:59:54 2022 +0100 arm64: dts: rockchip: Add Anbernic RG351M This device is a clone of Odroid Go Advance, with added PWM motor, internal gamepad connected on USB instead of just having it be on GPIO + ADC, and missing battery shunt resistor. Due to missing shunt resistor and lack of a workaround in rk817_charger driver rk817_charger is not enabled in dts. There's also an LED on GPIO 77(I *guess* PB5 on &gpio2), that is controlled in a weird way: - It is set to red by setting output value to 1 - Set to green by setting output value to 0 - Set to yellow by setting gpio direction to input I have no idea how to describe that in DTS, without adding a custom driver, for now it's just left out. Signed-off-by: Maya Matuszczyk Link: https://lore.kernel.org/r/20221117215954.4114202-6-maccraft123mc@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3326-anbernic-rg351m.dts | 33 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit 2f217d71aa89504abc9ab95286b807efaa03e11a Author: Maya Matuszczyk Date: Thu Nov 17 22:59:53 2022 +0100 arm64: dts: rockchip: Add Odroid Go Super This device is another revision of Odroid Go Advance, with added two volume buttons, a second analog stick and a bigger screen that isn't yet supported in the mainline kernel. Signed-off-by: Maya Matuszczyk Link: https://lore.kernel.org/r/20221117215954.4114202-5-maccraft123mc@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts | 185 +++++++++++++++++++++ 2 files changed, 186 insertions(+) commit abba44b3e7c3f7530b607e8d2e2db96e6460fc73 Author: Maya Matuszczyk Date: Thu Nov 17 22:59:52 2022 +0100 arm64: dts: rockchip: Add Odroid Go Advance Black Edition This device is a minor revision of the origin Odroid Go Advance, with added two more buttons and a WiFi card Signed-off-by: Maya Matuszczyk Link: https://lore.kernel.org/r/20221117215954.4114202-4-maccraft123mc@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3326-odroid-go2-v11.dts | 156 +++++++++++++++++++++ 2 files changed, 157 insertions(+) commit 76eeb9b665d72ee53e5e93f154b23536f9d1c9c0 Author: Maya Matuszczyk Date: Thu Nov 17 22:59:51 2022 +0100 dt-bindings: arm: rockchip: Add more RK3326 devices This patch adds Anbernic RG351M, Odroid Go Advance Black Edition and Odroid Go Super into dt bindings. Signed-off-by: Maya Matuszczyk Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221117215954.4114202-3-maccraft123mc@gmail.com Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 04ea3e30386e632c028654409e9a86c4c6b7accb Author: Maya Matuszczyk Date: Thu Nov 17 22:59:50 2022 +0100 arm64: dts: rockchip: Move most of Odroid Go Advance DTS into a DTSI To support more devices that are clones of this device or minor revisions without duplication move most of go2's dts into a dtsi file. Signed-off-by: Maya Matuszczyk Link: https://lore.kernel.org/r/20221117215954.4114202-2-maccraft123mc@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi | 600 ++++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts | 619 +-------------------- 2 files changed, 608 insertions(+), 611 deletions(-) commit 8ccf49d7fb7597ca90f6d3ba60b9e6baa9bde69e Merge: 029467886185 885e153ed7c1 Author: Arnd Bergmann Date: Tue Nov 22 23:10:15 2022 +0100 Merge tag 'v6.1-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into soc/dt Fix check warnings all over the place. mt7986: - Add crypto, I2C and SPI nodes mt6795: - Add clock nodes - Add DMA support for UARTs - Add MMC nodes - Add basic support for Sonyx Xperia M5 mt8195: - Add video enconder node - Add PCIe support - Fine tune capacity-dmips-mhz - Add support for internal and external display port * tag 'v6.1-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (35 commits) arm64: dts: mt7986: add spi related device nodes arm64: dts: mt7986: move wed_pcie node arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone dt-bindings: arm: mediatek: Add compatible for MT6795 Sony Xperia M5 arm64: dts: mediatek: mt6795: Add support for eMMC/SD/SDIO controllers arm64: dts: mediatek: mt6795: Add support for APDMA and wire up UART DMAs arm64: dts: mediatek: mt6795: Replace UART dummy clocks with pericfg arm64: dts: mediatek: mt6795: Add topckgen, infra, peri clocks/resets arm64: dts: mediatek: cherry: Add edptx and dptx support arm64: dts: mediatek: cherry: Add dp-intf ports arm64: dts: mt8195: Add edptx and dptx nodes arm64: dts: mt8195: Add dp-intf nodes arm64: dts: mediatek: mt6797: Fix 26M oscillator unit name arm64: dts: mediatek: pumpkin-common: Fix devicetree warnings arm64: dts: mt2712-evb: Fix usb vbus regulators unit names arm64: dts: mt2712-evb: Fix vproc fixed regulators unit names arm64: dts: mt2712e: Fix unit address for pinctrl node arm64: dts: mt2712e: Fix unit_address_vs_reg warning for oscillators arm64: dts: mt6779: Fix devicetree build warnings arm64: dts: mt7896a: Fix unit_address_vs_reg warning for oscillator ... Link: https://lore.kernel.org/r/8933d687-71f0-e9ad-a7c6-2e5a8993463d@gmail.com Signed-off-by: Arnd Bergmann commit 79aa02ddc682558edb9bd56522ad841759c99201 Author: Anand Moon Date: Wed Nov 16 20:01:45 2022 +0000 arm64: dts: rockchip: Add support of regulator for ethernet node on Rock 3A SBC Add regulator support for ethernet node Fix following warning. [ 7.365199] rk_gmac-dwmac fe010000.ethernet: no regulator found Signed-off-by: Anand Moon Acked-by: Michael Riesch Tested-by: Michael Riesch Link: https://lore.kernel.org/r/20221116200150.4657-4-linux.amoon@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 1 + 1 file changed, 1 insertion(+) commit ef9f4b4a50206bedd931f45dd9fd57fd4c1714a6 Author: Anand Moon Date: Wed Nov 16 20:01:44 2022 +0000 arm64: dts: rockchip: Add support of external clock to ethernet node on Rock 3A SBC Add support of external clock gmac1_clkin which is used as input clock to ethernet node. Signed-off-by: Anand Moon Reviewed-by: Michael Riesch Tested-by: Michael Riesch Link: https://lore.kernel.org/r/20221116200150.4657-3-linux.amoon@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit c11b537e417723d1279bc267b1089f11e8ec1ca5 Author: Vignesh Raghavendra Date: Sat Nov 19 20:54:47 2022 +0530 soc: ti: k3-socinfo: Add AM62Ax JTAG ID Add JTAG ID entry to help identify AM62Ax SoC in kernel. Signed-off-by: Vignesh Raghavendra Reviewed-by: Bryan Brattlof Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221119152447.241166-1-vigneshr@ti.com drivers/soc/ti/k3-socinfo.c | 1 + 1 file changed, 1 insertion(+) commit 029467886185e99175a91d571dc2b1aa85b3b517 Merge: 83cbe78a9cdf 1002a361127b Author: Arnd Bergmann Date: Tue Nov 22 23:02:24 2022 +0100 Merge tag 'tegra-for-6.2-arm64-dt-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt arm64: tegra: Device tree changes for v6.2-rc1 This contains many new additions, primarily for Tegra234, as well as a slew of cleanups for issues flagged by the DT validation tools. * tag 'tegra-for-6.2-arm64-dt-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (30 commits) arm64: tegra: Remove unneeded clock-names for Tegra132 PWM arm64: tegra: Fix up compatible string for SDMMC1 on Tegra234 arm64: tegra: Remove unused reset-names for QSPI arm64: tegra: Fixup pinmux node names arm64: tegra: Remove reset-names for QSPI arm64: tegra: Use correct compatible string for Tegra234 HDA arm64: tegra: Use correct compatible string for Tegra194 HDA arm64: tegra: Use vbus-gpios property arm64: tegra: Restructure Tegra210 PMC pinmux nodes arm64: tegra: Update cache properties arm64: tegra: Remove 'enable-active-low' arm64: tegra: Add dma-channel-mask in GPCDMA node arm64: tegra: Fix non-prefetchable aperture of PCIe C3 controller arm64: tegra: Add missing compatible string to Ethernet USB device arm64: tegra: Separate AON pinmux from main pinmux on Tegra194 arm64: tegra: Add ECAM aperture info for all the PCIe controllers arm64: tegra: Remove clock-names from PWM nodes arm64: tegra: Enable GTE nodes arm64: tegra: Update console for Jetson Xavier and Orin arm64: tegra: Enable PWM users on Jetson AGX Orin ... Link: https://lore.kernel.org/r/20221121171239.2041835-7-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 83cbe78a9cdff4d64d11d8f5f96b0d8f39b9a319 Merge: 867531d95cf0 97351cd8bea8 Author: Arnd Bergmann Date: Tue Nov 22 23:00:52 2022 +0100 Merge tag 'tegra-for-6.2-dt-bindings-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt dt-bindings: Changes for v6.2-rc1 New memory client IDs and IOMMU stream IDs, as well as new compatible strings are introduced to support more hardware on Tegra234. Some device tree bindings are converted to json-schema to allow formal validation. * tag 'tegra-for-6.2-dt-bindings-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: usb: tegra-xusb: Convert to json-schema dt-bindings: pwm: tegra: Convert to json-schema dt-bindings: pinctrl: tegra194: Separate instances dt-bindings: pinctrl: tegra: Convert to json-schema dt-bindings: PCI: tegra234: Add ECAM support dt-bindings: pwm: tegra: Document Tegra234 PWM dt-bindings: Add bindings for Tegra234 NVDEC dt-bindings: tegra: Update headers for Tegra234 dt-bindings: Add headers for NVDEC on Tegra234 Link: https://lore.kernel.org/r/20221121171239.2041835-4-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 867531d95cf0100d420676017cf901d4698ef27c Merge: 6721cf8585bc 31354121bf03 Author: Arnd Bergmann Date: Tue Nov 22 23:00:03 2022 +0100 Merge tag 'socfpga_dts_updates_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into soc/dt SoCFPGA dts updates for v6.2 - Use the "clk-phase-sd-hs" property for SDMMC - Remove the "clk-phase" fom the sdmmc_clk that is no longer used - Clean dtschema for mmc node - Increase NAND partition for Arria10 * tag 'socfpga_dts_updates_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: socfpga: Add clk-phase-sd-hs property to the sdmmc node arm: dts: socfpga: Add clk-phase-sd-hs property to the sdmmc node arm: dts: socfpga: remove "clk-phase" in sdmmc_clk arm: dts: socfpga: align mmc node names with dtschema ARM: dts: socfpga: arria10: Increase NAND boot partition size Link: https://lore.kernel.org/r/20221121163259.341974-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit f16fb37dad4fcbd8185499ed7fb01c4012e5eed4 Author: Raul E Rangel Date: Tue Nov 22 13:57:20 2022 -0800 Input: raydium_ts_i2c - don't set wake_capable and wake_irq The i2c-core will now handle setting the wake_irq and wake capability for DT and ACPI systems. Signed-off-by: Raul E Rangel Link: https://lore.kernel.org/r/20220929093200.v6.13.Ia0b24ab02c22125c5fd686cc25872bd26c27ac23@changeid Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/raydium_i2c_ts.c | 9 --------- 1 file changed, 9 deletions(-) commit 44a87dd73be4e6e0a3d7babb4f7166b2a805bc7b Author: Raul E Rangel Date: Tue Nov 22 13:57:07 2022 -0800 Input: elants_i2c - don't set wake_capable and wake_irq The i2c-core will now handle setting the wake_irq and wake capability for DT and ACPI systems. Signed-off-by: Raul E Rangel Link: https://lore.kernel.org/r/20220929093200.v6.12.I031ffbe411e1bae20bf16a1876da5baf444c7928@changeid Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/elants_i2c.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 1076fc5621bd025409bb357d249c97130d41837a Author: Raul E Rangel Date: Tue Nov 22 13:56:55 2022 -0800 Input: elan_i2c - don't set wake_capable and wake_irq The i2c-core will now handle setting the wake_irq and wake capability for DT and ACPI systems. Signed-off-by: Raul E Rangel Link: https://lore.kernel.org/r/20220929093200.v6.11.I7309b8f322082437b93581c6e2953886eeb998d7@changeid Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 327c8b23a25d374dba93673979cc132e8c805890 Author: Raul E Rangel Date: Tue Nov 22 13:56:42 2022 -0800 HID: i2c-hid: Don't set wake_capable and wake_irq The i2c-core will now handle setting the wake_irq for DT and ACPI systems. Signed-off-by: Raul E Rangel Acked-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20220929093200.v6.10.Id22d056440953134d8e8fe2c2aff79c79bc78424@changeid Signed-off-by: Dmitry Torokhov drivers/hid/i2c-hid/i2c-hid-core.c | 9 --------- 1 file changed, 9 deletions(-) commit 1796f808e4bb2c074824dc32258ed1e719370cb3 Author: Raul E Rangel Date: Tue Nov 22 13:55:40 2022 -0800 HID: i2c-hid: acpi: Stop setting wakeup_capable This is now handled by the i2c-core driver. Signed-off-by: Raul E Rangel Acked-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20220929093200.v6.9.I2efb7f551e0aa2dc4c53b5fd5bbea91a1cdd9b32@changeid Signed-off-by: Dmitry Torokhov drivers/hid/i2c-hid/i2c-hid-acpi.c | 5 ----- 1 file changed, 5 deletions(-) commit d86388c902b45fe2550eac08c47272541c726f84 Author: Raul E Rangel Date: Tue Nov 22 13:44:35 2022 -0800 Input: raydium_ts_i2c - use PM subsystem to manage wake irq The raydium I2C touchscreen driver is currently manually managing the wake IRQ. This change removes the explicit enable_irq_wake / disable_irq_wake and instead relies on the PM subsystem. This is done by calling dev_pm_set_wake_irq. i2c_device_probe already calls dev_pm_set_wake_irq when using device tree, and i2c_device_remove also already calls dev_pm_clear_wake_irq. There could be some device tree systems that have incorrectly declared `wake` capabilities, so this change will set the wake irq if one is missing. This matches the previous behavior. Signed-off-by: Raul E Rangel Link: https://lore.kernel.org/r/20220929093200.v6.4.I06b417b274bbecb31775a73993a7a3c1bc80de7b@changeid Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/raydium_i2c_ts.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 2e758f535e234aa3896e3b5fc6c193268b353515 Author: Raul E Rangel Date: Tue Nov 22 13:44:22 2022 -0800 Input: elants_i2c - use PM subsystem to manage wake irq The Elan I2C touchscreen driver is currently manually managing the wake IRQ. This change removes the explicit enable_irq_wake/disable_irq_wake and instead relies on the PM subsystem. This is done by calling dev_pm_set_wake_irq. i2c_device_probe already calls dev_pm_set_wake_irq when using device tree, and i2c_device_remove also already calls dev_pm_clear_wake_irq. There could be some device tree systems that have incorrectly declared `wake` capabilities, so this change will set the wake irq if one is missing. This matches the previous behavior. Signed-off-by: Raul E Rangel Link: https://lore.kernel.org/r/20220929093200.v6.3.I5862429ee3e4de0f9ad5ba01ce07ad99eec10cf0@changeid Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/elants_i2c.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit a6d4439af581be9483e9b5b19b6c8f6dfcd47762 Author: Raul E Rangel Date: Tue Nov 22 13:44:11 2022 -0800 Input: elan_i2c - use PM subsystem to manage wake irq The Elan I2C touchpad driver is currently manually managing the wake IRQ. This change removes the explicit enable_irq_wake/disable_irq_wake and instead relies on the PM subsystem. This is done by calling dev_pm_set_wake_irq. i2c_device_probe already calls dev_pm_set_wake_irq when using device tree, and i2c_device_remove also already calls dev_pm_clear_wake_irq. There could be some device tree systems that have incorrectly declared `wake` capabilities, so this change will set the wake irq if one is missing. This matches the previous behavior. I tested this on an ACPI system where the touchpad doesn't have _PRW defined. I verified I can still wake the system and that the wake source was the touchpad IRQ GPIO. Signed-off-by: Raul E Rangel Link: https://lore.kernel.org/r/20220929093200.v6.2.Id022caf53d01112188308520915798f08a33cd3e@changeid Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit d08999cc593ea18a3dc5993faea5e413ae29ff96 Author: Raul E Rangel Date: Tue Nov 22 13:39:06 2022 -0800 HID: i2c-hid: Use PM subsystem to manage wake irq The I2C hid driver is currently manually managing the wake IRQ. This change removes the explicit enable_irq_wake/disable_irq_wake and instead relies on the PM subsystem. This is done by calling dev_pm_set_wake_irq. i2c_device_probe already calls dev_pm_set_wake_irq when using device tree, and i2c_device_remove also already calls dev_pm_clear_wake_irq. There could be some device tree systems that have incorrectly declared `wake` capabilities, so this change will set the wake irq if one is missing. This matches the previous behavior. I tested this on an ACPI system that has a HID touchscreen and verified the IRQ was armed for wake on suspend. Signed-off-by: Raul E Rangel Acked-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20220929093200.v6.1.Id4b4bdfe06e2caf2d5a3c9dd4a9b1080c38b539c@changeid Signed-off-by: Dmitry Torokhov drivers/hid/i2c-hid/i2c-hid-core.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit 6721cf8585bc744782733fcaa21bd7141d2aa44f Merge: 1e9629820ab3 4563db4b7988 Author: Arnd Bergmann Date: Tue Nov 22 22:57:53 2022 +0100 Merge tag 'riscv-dt-for-v6.2-mw0' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/dt RISC-V DeviceTrees for v6.2 dt-bindings: - new compatibles to support the StarFive VisionFive & thead CPU cores - a fix for the PolarFire SoC's pwm binding, merged through my tree as suggested by the PWM maintainers Microchip: - Non-urgent fix for the node address not matches the reg in a way that the checkers don't complain about - Add GPIO controlled LEDs for Icicle - Support for the "CCC" clocks in the FPGA fabric. Previously these used fixed-frequency clocks in the dt, but if which CCC is in use is known, as in the v2022.09 Icicle Kit Reference Design, the rates can be read dynamically. It's an "is known" as it *can* be set via constraints in the FPGA tooling but does not have to be. - A fix for the Icicle's pwm-cells - Removal of some unused PCI clocks StarFive: - Addition of the VisionFive DT, which has been a long time coming! Signed-off-by: Conor Dooley * tag 'riscv-dt-for-v6.2-mw0' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: dt-bindings: riscv: Add T-HEAD C906 and C910 compatibles riscv: dts: microchip: remove unused pcie clocks riscv: dts: microchip: remove pcie node from the sev kit riscv: dts: microchip: fix the icicle's #pwm-cells dt-bindings: pwm: fix microchip corePWM's pwm-cells riscv: dts: starfive: Add StarFive VisionFive V1 device tree riscv: dts: starfive: Add common DT for JH7100 based boards dt-bindings: riscv: starfive: Add StarFive VisionFive V1 board riscv: dts: microchip: fix memory node unit address for icicle riscv: dts: microchip: icicle: Add GPIO controlled LEDs riscv: dts: microchip: add the mpfs' fabric clock control Signed-off-by: Arnd Bergmann commit 919977b690caf87785d39692040c2a427d3a5e50 Merge: 19e54b0547ac 7fd731a82643 Author: Arnd Bergmann Date: Tue Nov 22 22:39:09 2022 +0100 Merge tag 'v6.1-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into soc/drivers mmsys: - add support for MT8186 - add correct compatible solution for vdosys[0,1] on MT8195 pmic wrapper: - add support for MT8365 * tag 'v6.1-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: soc: mediatek: Add deprecated compatible to mmsys soc: mediatek: pwrap: add mt8365 SoC support soc: mediatek: pwrap: add support for sys & tmr clocks dt-bindings: soc: mediatek: pwrap: add MT8365 SoC bindings soc: mediatek: add mtk-mmsys support for mt8195 vdosys0 Revert "soc: mediatek: add mtk-mmsys support for mt8195 vdosys0" dt-bindings: arm: mediatek: mmsys: change compatible for MT8195 soc: mediatek: Add all settings to mtk_mmsys_ddp_dpi_fmt_config func Link: https://lore.kernel.org/r/cc756001-a942-90b0-b79d-62c1fc189828@gmail.com Signed-off-by: Arnd Bergmann commit 19e54b0547acf82d9b0ce4df696017ab13f77b25 Merge: 381abc230be0 5cd24ca0985f Author: Arnd Bergmann Date: Tue Nov 22 22:38:00 2022 +0100 Merge tag 'tegra-for-6.2-memory-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers memory: tegra: Changes for v6.2-rc1 Some cleanups replace open-coded debugfs attributes and memory client IDs are added for the DLA IP found on Tegra234 SoCs. * tag 'tegra-for-6.2-memory-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: memory: tegra: Add DLA clients for Tegra234 memory: tegra186-emc: Use DEFINE_SHOW_ATTRIBUTE to simplify code memory: tegra210-emc: Use DEFINE_SHOW_ATTRIBUTE to simplify code memory: tegra30-emc: Use DEFINE_SHOW_ATTRIBUTE to simplify code memory: tegra20-emc: Use DEFINE_SHOW_ATTRIBUTE to simplify code dt-bindings: tegra: Update headers for Tegra234 dt-bindings: Add headers for NVDEC on Tegra234 Link: https://lore.kernel.org/r/20221121171239.2041835-5-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 381abc230be01839362f8a28bcb9d30e1ee88aad Merge: a6eeafba1141 1d9e77b644d2 Author: Arnd Bergmann Date: Tue Nov 22 22:36:04 2022 +0100 Merge tag 'tegra-for-6.2-clk-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers clk: tegra: Changes for v6.2-rc1 Implements new ABI flags for certain clocks for which the parent rate or clock state cannot be changed. * tag 'tegra-for-6.2-clk-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: tegra: Support BPMP-FW ABI deny flags Link: https://lore.kernel.org/r/20221121171239.2041835-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit dc79f035b2062e4ff4f6432eda18f461f82b1333 Author: Alexei Starovoitov Date: Tue Nov 22 09:15:29 2022 -0800 selftests/bpf: Workaround for llvm nop-4 bug Currently LLVM fails to recognize .data.* as data section and defaults to .text section. Later BPF backend tries to emit 4-byte NOP instruction which doesn't exist in BPF ISA and aborts. The fix for LLVM is pending: https://reviews.llvm.org/D138477 While waiting for the fix lets workaround the linked_list test case by using .bss.* prefix which is properly recognized by LLVM as BSS section. Fix libbpf to support .bss. prefix and adjust tests. Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 3 ++- tools/testing/selftests/bpf/prog_tests/linked_list.c | 6 +++--- tools/testing/selftests/bpf/progs/linked_list.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit 0b2971a2703c015b5737d66688c2c7c81a5e391b Author: Alexei Starovoitov Date: Tue Nov 22 08:50:04 2022 -0800 Revert "selftests/bpf: Temporarily disable linked list tests" This reverts commit 0a2f85a1be4328d29aefa54684d10c23a3298fef. Signed-off-by: Alexei Starovoitov .../testing/selftests/bpf/prog_tests/linked_list.c | 21 +++++++-------------- tools/testing/selftests/bpf/progs/linked_list.c | 11 +---------- tools/testing/selftests/bpf/progs/linked_list.h | 2 -- .../testing/selftests/bpf/progs/linked_list_fail.c | 16 ++++++++-------- 4 files changed, 16 insertions(+), 34 deletions(-) commit 98cbc40e4f7d15bc21a314a151071566e14ca39c Author: Dan Carpenter Date: Tue Nov 15 16:26:07 2022 +0300 netfilter: nft_inner: fix IS_ERR() vs NULL check The __nft_expr_type_get() function returns NULL on error. It never returns error pointers. Fixes: 3a07327d10a0 ("netfilter: nft_inner: support for inner tunnel header matching") Signed-off-by: Dan Carpenter Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6eeafba1141c48b0b38e96f1aa715de4035b6d5 Merge: 2a26daeeb851 198d4649b0b8 Author: Arnd Bergmann Date: Tue Nov 22 22:14:31 2022 +0100 Merge tag 'tegra-for-6.2-firmware-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers firmware: tegra: Changes for v6.2-rc1 This adds new BPMP ABI so that newer features can be enabled. Furthermore, the BPMP driver is updated to use iosys-map helpers to allow working with shared memory regions that are located in system memory. Apart from that, several minor cleanups are included. * tag 'tegra-for-6.2-firmware-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: Remove surplus dev_err() when using platform_get_irq_byname() firmware: tegra: Update BPMP ABI firmware: tegra: bpmp: Do not support big-endian firmware: tegra: bpmp: Use iosys-map helpers firmware: tegra: bpmp: Prefer u32 over uint32_t Link: https://lore.kernel.org/r/20221121171239.2041835-2-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 0a2cafe6c7c25597a026ab961c3182c8179c7959 Author: Kamalesh Babulal Date: Thu Nov 17 12:45:57 2022 +0530 cgroup/cpuset: Improve cpuset_css_alloc() description Change the function argument in the description of cpuset_css_alloc() from 'struct cgroup' -> 'struct cgroup_subsys_state'. The change to the argument type was introduced by commit eb95419b023a ("cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods"). Also, add more information to its description. Signed-off-by: Kamalesh Babulal Acked-by: Waiman Long Acked-by: Joel Savitz Signed-off-by: Tejun Heo kernel/cgroup/cpuset.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 2a26daeeb851522ff6fbee1cdab700fdedfafa1f Merge: 862fe29b89b3 b6c6bbfc65f5 Author: Arnd Bergmann Date: Tue Nov 22 22:04:37 2022 +0100 Merge tag 'tegra-for-6.2-soc-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers soc/tegra: Changes for v6.2-rc1 In addition to a number of improvements and cleanups this contains a fix for the FUSE access on newer chips, adds Tegra234 I/O pad support and fixes various issues with wake events. The SoC sysfs revision attribute is updated to include the platform information so drivers can check for silicon vs. pre-silicon, among other things. * tag 'tegra-for-6.2-soc-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: cbb: Remove redundant dev_err call soc/tegra: cbb: Use DEFINE_SHOW_ATTRIBUTE to simplify tegra_cbb_err firmware: tegra: include IVC header file only once soc/tegra: cbb: Check firewall before enabling error reporting soc/tegra: cbb: Add checks for potential out of bound errors soc/tegra: cbb: Update slave maps for Tegra234 soc/tegra: cbb: Use correct master_id mask for CBB NOC in Tegra194 soc/tegra: fuse: Use platform info with SoC revision soc/tegra: pmc: Process wake events during resume soc/tegra: pmc: Fix dual edge triggered wakes soc/tegra: pmc: Add I/O pad table for Tegra234 soc/tegra: fuse: Add nvmem keepout list soc/tegra: fuse: Use SoC specific nvmem cells soc/tegra: pmc: Select IRQ_DOMAIN_HIERARCHY Link: https://lore.kernel.org/r/20221121171239.2041835-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 1e85591db11b7ac097a1b34887c682e6353798c4 Author: Kamalesh Babulal Date: Fri Nov 18 15:43:30 2022 +0530 kselftest/cgroup: Add cleanup() to test_cpuset_prs.sh Install a cleanup function using the trap command for signals EXIT, SIGINT, SIGQUIT and SIGABRT. The cleanup function will perform: 1. Online the CPUs that were made offline during the test. 2. Removing the cgroups created. 3. Restoring the original /sys/kernel/debug/sched/verbose value, currently it's left turned on, irrespective of the original configuration value. the test performs steps 1 and 2, on the successful runs, but not during all of the failed runs. With the cleanup(), the system will perform all three steps during failed/passed test runs. Signed-off-by: Kamalesh Babulal Acked-by: Waiman Long Signed-off-by: Tejun Heo tools/testing/selftests/cgroup/test_cpuset_prs.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 9676f40618df9f8e1ab681486021d6c0df86c5fa Author: Ian Cowan Date: Sat Nov 12 09:28:57 2022 -0500 PCI: shpchp: Remove unused get_mode1_ECC_cap callback The ->get_mode1_ECC_cap callback in the shpchp_hpc_ops struct is never called, so remove it. [bhelgaas: squash] Link: https://lore.kernel.org/r/20221112142859.319733-2-ian@linux.cowan.aero Link: https://lore.kernel.org/r/20221112142859.319733-3-ian@linux.cowan.aero Link: https://lore.kernel.org/r/20221112142859.319733-4-ian@linux.cowan.aero Signed-off-by: Ian Cowan Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/TODO | 3 --- drivers/pci/hotplug/shpchp.h | 1 - drivers/pci/hotplug/shpchp_hpc.c | 18 ------------------ 3 files changed, 22 deletions(-) commit f67376d801499f4fa0838c18c1efcad8840e550d Author: Zhang Xiaoxu Date: Tue Nov 22 23:14:37 2022 +0800 RDMA/rxe: Fix NULL-ptr-deref in rxe_qp_do_cleanup() when socket create failed There is a null-ptr-deref when mount.cifs over rdma: BUG: KASAN: null-ptr-deref in rxe_qp_do_cleanup+0x2f3/0x360 [rdma_rxe] Read of size 8 at addr 0000000000000018 by task mount.cifs/3046 CPU: 2 PID: 3046 Comm: mount.cifs Not tainted 6.1.0-rc5+ #62 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc3 Call Trace: dump_stack_lvl+0x34/0x44 kasan_report+0xad/0x130 rxe_qp_do_cleanup+0x2f3/0x360 [rdma_rxe] execute_in_process_context+0x25/0x90 __rxe_cleanup+0x101/0x1d0 [rdma_rxe] rxe_create_qp+0x16a/0x180 [rdma_rxe] create_qp.part.0+0x27d/0x340 ib_create_qp_kernel+0x73/0x160 rdma_create_qp+0x100/0x230 _smbd_get_connection+0x752/0x20f0 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 The root cause of the issue is the socket create failed in rxe_qp_init_req(). So move the reset rxe_qp_do_cleanup() after the NULL ptr check. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20221122151437.1057671-1-zhangxiaoxu5@huawei.com Signed-off-by: Zhang Xiaoxu Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_qp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cb6562c380832a930ffd1722ac9d479b454aed4e Author: Jason Gunthorpe Date: Tue Nov 22 15:37:39 2022 -0400 RDMA/rxe: Do not NULL deref on debugging failure path Correct the mistake, mr is obviously NULL in this code path. Fixes: 2778b72b1df0 ("RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_mr.c") Link: https://lore.kernel.org/r/Y3eeJW0AdyJYhYyQ@kili Reported-by: Dan Carpenter Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e34782316281c78c5911f86d4699d4f35a607c9d Author: Uwe Kleine-König Date: Fri Nov 18 23:44:52 2022 +0100 regulator: tps6286x-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-559-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/tps6286x-regulator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d4885f306304ff29eec06b9ad5f526a1099e0418 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:50 2022 +0100 regulator: tps51632-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-557-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/tps51632-regulator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d85d02d17a608b558d44510e9824668c5d4fe5d8 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:49 2022 +0100 regulator: rpi-panel-attiny-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-556-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/rpi-panel-attiny-regulator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ed56fa6e804cb13bbe29e9214792308817f6e553 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:46 2022 +0100 regulator: pca9450-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-553-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/pca9450-regulator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c20c36735949b3b7984692fbab3d92b0e8a845ec Author: Uwe Kleine-König Date: Fri Nov 18 23:44:44 2022 +0100 regulator: max8952: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-551-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/max8952.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3cf4417385d0ac8f02f22888e12a6d21d97d89fc Author: Uwe Kleine-König Date: Fri Nov 18 23:44:42 2022 +0100 regulator: max8649: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-549-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/max8649.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3d54f7ba248b0ad1791bc356e9ad3d9020a1c472 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:41 2022 +0100 regulator: max1586: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-548-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/max1586.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cb28f74b4809a00b40fdf0c44ccf51ab950581d3 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:39 2022 +0100 regulator: lp8755: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-546-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/lp8755.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2532d5f8d5c20d5a0a8a0d57a311bc5df00dea04 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:37 2022 +0100 regulator: lp3972: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-544-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/lp3972.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 020cf73b47414a84b666d3e6736a6ae957e27840 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:34 2022 +0100 regulator: da9121-regulator: 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-for-MFD-by: Lee Jones Acked-for-Backlight-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-541-uwe@kleine-koenig.org Signed-off-by: Mark Brown drivers/regulator/da9121-regulator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 110d7b0325c55ff3620073ba4201845f59e22ebf Author: Yang Yingliang Date: Fri Nov 11 09:23:58 2022 +0800 PNP: fix name memory leak in pnp_alloc_dev() After commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically, move dev_set_name() after pnp_add_id() to avoid memory leak. Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array") Signed-off-by: Yang Yingliang Reviewed-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki drivers/pnp/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f3fbb553f98563f692e356aca87d656baba910a0 Author: Cezary Rojewski Date: Wed Nov 16 12:55:50 2022 +0100 ASoC: Intel: avs: Disconnect substream if suspend or resume fails To improve performance and overall system stability, suspend/resume operations for ASoC cards always return success status and defer the actual work. Because of that, if a substream fails to resume, userspace may still attempt to invoke commands on it as from their perspective the operation completed successfully. Set substream's state to DISCONNECTED to ensure no further commands are attempted. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221116115550.1100398-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/pcm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit c30c8f9d51ec24b36e2c65a6307a5c8cbc5a0ebc Author: Cezary Rojewski Date: Wed Nov 16 12:55:49 2022 +0100 ASoC: Intel: avs: Lock substream before snd_pcm_stop() snd_pcm_stop() shall be called with stream lock held to prevent any races between nonatomic streaming operations. Fixes: 2f1f570cd730 ("ASoC: Intel: avs: Coredump and recovery flow") Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221116115550.1100398-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/ipc.c | 3 +++ 1 file changed, 3 insertions(+) commit c63a3be76df678b173c59f1d5dc19a21b2d1c753 Author: Rafael J. Wysocki Date: Mon Nov 21 19:16:57 2022 +0100 PCI: acpiphp: Avoid setting is_hotplug_bridge for PCIe Upstream Ports It is reported that on some systems pciehp binds to an Upstream Port and attempts to operate it which causes devices below the Port to disappear from the bus. This happens because acpiphp sets dev->is_hotplug_bridge for that Port (after receiving a Device Check notification on it from the platform firmware via ACPI) during the enumeration of PCI devices. get_port_device_capability() sees that dev->is_hotplug_bridge is set and adds PCIE_PORT_SERVICE_HP to Port services, which allows pciehp to bind to the Port in question. Even though this particular problem can be addressed by making the portdrv_core checks more robust, it also causes power management to work differently on the affected systems which generally is not desirable (PCIe Ports with dev->is_hotplug_bridge set have to pass additional tests to be allowed to go into the D3hot/cold power states which affects runtime PM of devices below these Ports). For this reason, amend check_hotplug_bridge() with a PCIe type check to prevent it from setting dev->is_hotplug_bridge for Upstream Ports. Suggested-by: Lukas Wunner Link: https://lore.kernel.org/r/2262230.ElGaqSPkdT@kreacher Reported-by: Rodrigo Vivi Tested-by: Rodrigo Vivi Signed-off-by: Rafael J. Wysocki Signed-off-by: Bjorn Helgaas Reviewed-by: Rodrigo Vivi Reviewed-by: Lukas Wunner drivers/pci/hotplug/acpiphp_glue.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 05f5747414c6ecb8a7f9b0c1dc10bcffa6dfb5ba Author: Rafael J. Wysocki Date: Mon Nov 21 19:15:18 2022 +0100 PCI/portdrv: Set PCIE_PORT_SERVICE_HP for Root and Downstream Ports only It is reported that on some systems pciehp binds to an Upstream Port and attempts to operate it which causes devices below the Port to disappear from the bus. This happens because acpiphp sets dev->is_hotplug_bridge for that Port (after receiving a Device Check notification on it from the platform firmware via ACPI) during the enumeration of PCI devices. get_port_device_capability() sees that dev->is_hotplug_bridge is set and adds PCIE_PORT_SERVICE_HP to Port services (which allows pciehp to bind to the Port in question) without consulting the PCIe type, which should be either Root Port or Downstream Port for the hotplug capability to be present. Per PCIe r6.0, sec 7.5.3.2, the Slot Implemented bit is only valid for Downstream Ports (including Root Ports), and PCIe hotplug depends on the Slot Capabilities / Control / Status registers. Make get_port_device_capability() more robust by adding a PCIe type check to it before adding PCIE_PORT_SERVICE_HP to Port services which helps to avoid the problem. [bhelgaas: add spec citation] Suggested-by: Lukas Wunner Link: https://lore.kernel.org/r/4786090.31r3eYUQgx@kreacher Reported-by: Rodrigo Vivi Signed-off-by: Rafael J. Wysocki Signed-off-by: Bjorn Helgaas Reviewed-by: Lukas Wunner drivers/pci/pcie/portdrv_core.c | 2 ++ 1 file changed, 2 insertions(+) commit eb78d3604d6bcbe9743e036114c33a5a17090a0a Author: Andy Shevchenko Date: Thu Nov 17 13:08:06 2022 +0200 pinctrl: intel: Enumerate PWM device when community has a capability Some of the Communities may have PWM capability. In such cases, enumerate the PWM device via respective driver. A user is still responsible for setting correct pin muxing for the line that needs to output the signal. Signed-off-by: Andy Shevchenko Acked-by: Thierry Reding Reviewed-by: Mika Westerberg Acked-by: Linus Walleij Acked-by: Uwe Kleine-König drivers/pinctrl/intel/pinctrl-intel.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 7f22ca396778fea9332d83ec2359dbe8396e9a06 Author: Ard Biesheuvel Date: Tue Nov 22 17:10:06 2022 +0100 x86/boot/compressed: Move efi32_pe_entry() out of head_64.S Move the implementation of efi32_pe_entry() into efi-mixed.S, which is a more suitable location that only gets built if EFI mixed mode is actually enabled. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-7-ardb@kernel.org arch/x86/boot/compressed/efi_mixed.S | 82 +++++++++++++++++++++++++++++++++ arch/x86/boot/compressed/head_64.S | 87 +----------------------------------- 2 files changed, 83 insertions(+), 86 deletions(-) commit 73a6dec80e2acedaef3ca603d4b5799049f6e9f8 Author: Ard Biesheuvel Date: Tue Nov 22 17:10:05 2022 +0100 x86/boot/compressed: Move efi32_entry out of head_64.S Move the efi32_entry() routine out of head_64.S and into efi-mixed.S, which reduces clutter in the complicated startup routines. It also permits linkage of some symbols used by code to be made local. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-6-ardb@kernel.org arch/x86/boot/compressed/efi_mixed.S | 57 +++++++++++++++++++++++++++++------- arch/x86/boot/compressed/head_64.S | 45 ---------------------------- 2 files changed, 47 insertions(+), 55 deletions(-) commit 91592b5c0c2f076ff9d8cc0c14aa563448ac9fc4 Author: Ard Biesheuvel Date: Tue Nov 22 17:10:04 2022 +0100 x86/boot/compressed: Move efi32_pe_entry into .text section Move efi32_pe_entry() into the .text section, so that it can be moved out of head_64.S and into a separate compilation unit in a subsequent patch. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-5-ardb@kernel.org arch/x86/boot/compressed/head_64.S | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 0848e94c3954051e1a52bb088240ed63758b309b Author: Alicja Michalska Date: Tue Nov 22 00:20:40 2022 +0100 ASoC: Intel: avs: Add missing audio amplifier for KBL KBL platform is missing the definition of 'max98357a' audio amplifier. This amplifier is used on many KBL Chromebooks, for instance variant 'nami' of 'Google/poppy' baseboard. Reported-by: CoolStar Signed-off-by: Alicja Michalska Link: https://lore.kernel.org/r/Y3wHyJ/EcsLRHGr3@tora Signed-off-by: Mark Brown sound/soc/intel/avs/board_selection.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5c3a85f35b583259cf5ca0344cd79c8899ba1bb7 Author: Ard Biesheuvel Date: Tue Nov 22 17:10:03 2022 +0100 x86/boot/compressed: Move bootargs parsing out of 32-bit startup code Move the logic that chooses between the different EFI entrypoints out of the 32-bit boot path, and into a 64-bit helper that can perform the same task much more cleanly. While at it, document the mixed mode boot flow in a code comment. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-4-ardb@kernel.org arch/x86/boot/compressed/efi_mixed.S | 43 ++++++++++++++++++++++++++++++++++++ arch/x86/boot/compressed/head_64.S | 24 ++++---------------- 2 files changed, 47 insertions(+), 20 deletions(-) commit e2ab9eab324cdf240de89741e4a1aa79919f0196 Author: Ard Biesheuvel Date: Tue Nov 22 17:10:02 2022 +0100 x86/boot/compressed: Move 32-bit entrypoint code into .text section Move the code that stores the arguments passed to the EFI entrypoint into the .text section, so that it can be moved into a separate compilation unit in a subsequent patch. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-3-ardb@kernel.org arch/x86/boot/compressed/head_64.S | 48 +++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 14 deletions(-) commit cb8bda8ad4438b4bcfcf89697fc84803fb210017 Author: Ard Biesheuvel Date: Tue Nov 22 17:10:01 2022 +0100 x86/boot/compressed: Rename efi_thunk_64.S to efi-mixed.S In preparation for moving the mixed mode specific code out of head_64.S, rename the existing file to clarify that it contains more than just the mixed mode thunk. While at it, clean up the Makefile rules that add it to the build. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-2-ardb@kernel.org arch/x86/boot/compressed/Makefile | 6 +++--- arch/x86/boot/compressed/{efi_thunk_64.S => efi_mixed.S} | 0 2 files changed, 3 insertions(+), 3 deletions(-) commit c957387c402a1a213102e38f92b800d7909a728d Author: Peng Wu Date: Tue Nov 22 08:22:42 2022 +0000 regulator: of: fix a NULL vs IS_ERR() check in of_regulator_bulk_get_all() The regulator_get() function never returns NULL. It returns error pointers. Fixes: 27b9ecc7a9ba ("regulator: Add of_regulator_bulk_get_all") Signed-off-by: Peng Wu Link: https://lore.kernel.org/r/20221122082242.82937-1-wupeng58@huawei.com Signed-off-by: Mark Brown drivers/regulator/of_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9211402fe72428bffe8e474448e671deeb6c52cb Author: Richard Fitzgerald Date: Wed Nov 9 16:53:26 2022 +0000 regulator: arizona-micsupp: Don't use a common regulator name The Arizona and Madera codecs all have a datasheet name of "MICVDD" for the regulator output. But future codecs with a regulator that can be controlled by this driver have different naming convention for the output of the regulator. Move the setting of the supply name from arizona_micsupp_common_init() to arizona_micsupp_probe() and madera_micsupp_probe(). Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20221109165331.29332-8-rf@opensource.cirrus.com Signed-off-by: Mark Brown drivers/regulator/arizona-micsupp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2da34b2301386bfed929d41c2e5367d484a140fe Author: Richard Fitzgerald Date: Wed Nov 9 16:53:25 2022 +0000 regulator: arizona-micsupp: Don't hardcode use of ARIZONA defines When Madera support was added to this driver the code was left using ARIZONA_* defines. This wasn't causing any problem because those defines just happened to have the same value as the equivalent MADERA_* defines. But it is not ideal to assume this, and future devices that can share this driver do not have the same register map. Fix the code to refer to the register data in struct regulator_desc. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20221109165331.29332-7-rf@opensource.cirrus.com Signed-off-by: Mark Brown drivers/regulator/arizona-micsupp.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 8be3a7bf773700534a6e8f87f6ed2ed111254be5 Author: Xiongfeng Wang Date: Tue Nov 22 19:45:59 2022 +0800 serial: pch: Fix PCI device refcount leak in pch_request_dma() As comment of pci_get_slot() says, it returns a pci_device with its refcount increased. The caller must decrement the reference count by calling pci_dev_put(). Since 'dma_dev' is only used to filter the channel in filter(), we can call pci_dev_put() before exiting from pch_request_dma(). Add the missing pci_dev_put() for the normal and error path. Fixes: 3c6a483275f4 ("Serial: EG20T: add PCH_UART driver") Signed-off-by: Xiongfeng Wang Link: https://lore.kernel.org/r/20221122114559.27692-1-wangxiongfeng2@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pch_uart.c | 4 ++++ 1 file changed, 4 insertions(+) commit 22cf92bb3908e1bbc22b03371e9e67e7bd455e0f Author: Sherry Sun Date: Thu Nov 10 19:38:59 2022 +0800 tty: serial: fsl_lpuart: Use pm_ptr() to avoid need to make pm __maybe_unused Use pm_ptr() to remove the need to mark the pm functions as __maybe_unused when the kernel is built without CONFIG_PM support. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20221110113859.8485-4-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 43543e6f539b3e646348c253059f75e27d63c94d Author: Sherry Sun Date: Thu Nov 10 19:38:58 2022 +0800 tty: serial: fsl_lpuart: Add runtime pm support Add runtime pm support to manage the lpuart clock. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20221110113859.8485-3-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 4f5cb8c5e9151c678fc2be533c070c6f7522940e Author: Sherry Sun Date: Thu Nov 10 19:38:57 2022 +0800 tty: serial: fsl_lpuart: enable wakeup source for lpuart LPUART supports both synchronous wakeup and asynchronous wakeup(wakeup the system when the UART clocks are shut-off), the synchronous wakeup is configured by UARTCTRL_RIE interrupt, and the asynchronous wakeup is configured by UARTBAUD_RXEDGIE interrupt. Add lpuart_uport_is_active() to determine if the uart port needs to get into the suspend states, also add lpuart_suspend_noirq() and lpuart_resume_noirq() to enable and disable the wakeup irq bits if the uart port needs to be set as wakeup source. When use lpuart with DMA mode, it still needs to switch to the cpu mode in .suspend() that enable cpu interrupts RIE and RXEDGIE as wakeup source, after system resume back, needs to setup DMA again, .resume() will share the HW setup code with .startup(), so abstract the same code to the api like lpuart32_hw_setup(). Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20221110113859.8485-2-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 281 ++++++++++++++++++++++++++++------------ 1 file changed, 200 insertions(+), 81 deletions(-) commit 96e8298945010d4b0a0c21841566401848a42afc Author: Andy Shevchenko Date: Mon Nov 14 17:18:13 2022 +0200 serdev: Replace poll loop by readx_poll_timeout() macro The readx_poll_timeout() consolidates the necessary code under macro. Replace current code with it. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221114151813.37294-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman include/linux/serdev.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 24ce048b0d4d4d8542c26459e53be4b7840d374c Author: Paul Fulghum Date: Tue Nov 15 09:38:32 2022 -0800 tty: synclink_gt: unwind actions in error path of net device open Resent again, last attempt still altered the plain text. Zhengchao Shao identified by inspection bugs in the error path of hdlcdev_open() in synclink_gt.c The function did not fully unwind actions in the error path. The use of try_module_get()/module_put() is unnecessary, potentially hazardous and is removed. The synclink_gt driver is already pinned any point the net device is registered, a requirement for calling this entry point. The call hdlc_open() to init the generic HDLC layer is moved to after driver level init/checks and proper rollback of previous actions is added. This is a more sensible ordering as the most common error paths are at the driver level and the driver level rollbacks require less processing than hdlc_open()/hdlc_close(). This has been tested with supported hardware. Signed-off-by:Paul Fulghum Link: https://lore.kernel.org/r/7599F007-8985-4469-BE00-52BD1530210E@microgate.com Signed-off-by: Greg Kroah-Hartman drivers/tty/synclink_gt.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 0d114e9ff940ebad8e88267013bf96c605a6b336 Author: Valentin Caron Date: Fri Nov 18 18:06:02 2022 +0100 serial: stm32: move dma_request_chan() before clk_prepare_enable() If dma_request_chan() returns a PROBE_DEFER error, clk_disable_unprepare() will be called and USART clock will be disabled. But early console can be still active on the same USART. While moving dma_request_chan() before clk_prepare_enable(), the clock won't be taken in case of a DMA PROBE_DEFER error, and so it doesn't need to be disabled. Then USART is still clocked for early console. Fixes: a7770a4bfcf4 ("serial: stm32: defer probe for dma devices") Reported-by: Uwe Kleine-König Signed-off-by: Valentin Caron Link: https://lore.kernel.org/r/20221118170602.1057863-1-valentin.caron@foss.st.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 47 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 24 deletions(-) commit b30e66863c60bb5c7da2151a65afb2ee419b9df4 Author: Rob Herring Date: Fri Nov 11 15:28:38 2022 -0600 dt-bindings: serial: xlnx,opb-uartlite: Drop 'contains' from 'xlnx,use-parity' 'contains' applies to arrays, but 'xlnx,use-parity' is a scalar. So drop 'contains' from the 'if' schema. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20221111212838.4103828-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 032d5a71ed378ffc6a2d41a187d8488a4f9fe415 Author: delisun Date: Thu Nov 10 10:01:08 2022 +0800 serial: pl011: Do not clear RX FIFO & RX interrupt in unthrottle. Clearing the RX FIFO will cause data loss. Copy the pl011_enabl_interrupts implementation, and remove the clear interrupt and FIFO part of the code. Fixes: 211565b10099 ("serial: pl011: UPSTAT_AUTORTS requires .throttle/unthrottle") Signed-off-by: delisun Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221110020108.7700-1-delisun@pateo.com.cn Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 94cdb9f33698478b0e7062586633c42c6158a786 Author: Jiamei Xie Date: Thu Nov 17 18:32:37 2022 +0800 serial: amba-pl011: avoid SBSA UART accessing DMACR register Chapter "B Generic UART" in "ARM Server Base System Architecture" [1] documentation describes a generic UART interface. Such generic UART does not support DMA. In current code, sbsa_uart_pops and amba_pl011_pops share the same stop_rx operation, which will invoke pl011_dma_rx_stop, leading to an access of the DMACR register. This commit adds a using_rx_dma check in pl011_dma_rx_stop to avoid the access to DMACR register for SBSA UARTs which does not support DMA. When the kernel enables DMA engine with "CONFIG_DMA_ENGINE=y", Linux SBSA PL011 driver will access PL011 DMACR register in some functions. For most real SBSA Pl011 hardware implementations, the DMACR write behaviour will be ignored. So these DMACR operations will not cause obvious problems. But for some virtual SBSA PL011 hardware, like Xen virtual SBSA PL011 (vpl011) device, the behaviour might be different. Xen vpl011 emulation will inject a data abort to guest, when guest is accessing an unimplemented UART register. As Xen VPL011 is SBSA compatible, it will not implement DMACR register. So when Linux SBSA PL011 driver access DMACR register, it will get an unhandled data abort fault and the application will get a segmentation fault: Unhandled fault at 0xffffffc00944d048 Mem abort info: ESR = 0x96000000 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x00: ttbr address size fault Data abort info: ISV = 0, ISS = 0x00000000 CM = 0, WnR = 0 swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000020e2e000 [ffffffc00944d048] pgd=100000003ffff803, p4d=100000003ffff803, pud=100000003ffff803, pmd=100000003fffa803, pte=006800009c090f13 Internal error: ttbr address size fault: 96000000 [#1] PREEMPT SMP ... Call trace: pl011_stop_rx+0x70/0x80 tty_port_shutdown+0x7c/0xb4 tty_port_close+0x60/0xcc uart_close+0x34/0x8c tty_release+0x144/0x4c0 __fput+0x78/0x220 ____fput+0x1c/0x30 task_work_run+0x88/0xc0 do_notify_resume+0x8d0/0x123c el0_svc+0xa8/0xc0 el0t_64_sync_handler+0xa4/0x130 el0t_64_sync+0x1a0/0x1a4 Code: b9000083 b901f001 794038a0 8b000042 (b9000041) ---[ end trace 83dd93df15c3216f ]--- note: bootlogd[132] exited with preempt_count 1 /etc/rcS.d/S07bootlogd: line 47: 132 Segmentation fault start-stop-daemon This has been discussed in the Xen community, and we think it should fix this in Linux. See [2] for more information. [1] https://developer.arm.com/documentation/den0094/c/?lang=en [2] https://lists.xenproject.org/archives/html/xen-devel/2022-11/msg00543.html Fixes: 0dd1e247fd39 (drivers: PL011: add support for the ARM SBSA generic UART) Signed-off-by: Jiamei Xie Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20221117103237.86856-1-jiamei.xie@arm.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 3 +++ 1 file changed, 3 insertions(+) commit 4d167f635a4d33f6b645f60c2a265f93668fdd8d Author: Jiri Slaby (SUSE) Date: Tue Nov 15 08:17:24 2022 +0100 tty: serial: altera_jtaguart: remove struct altera_jtaguart It contains only struct uart_port, so no need for another structure. Remove it and convert the rest to use struct uart_port directly. Cc: Tobias Klauser Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Tobias Klauser Link: https://lore.kernel.org/r/20221115071724.5185-4-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_jtaguart.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit 4e2b16a62d9975c4f6135e6a79a8e00cbad812d6 Author: Jiri Slaby (SUSE) Date: Tue Nov 15 08:17:23 2022 +0100 tty: serial: altera_jtaguart: use uart_port::read_status_mask Instead of self-defined struct altera_jtaguart::imr, use preexisting uart_port::read_status_mask. Note that imr was ulong. But there is no reason for that, its values are uints. And readl/writel's are used to read it/write to it. Cc: Tobias Klauser Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Tobias Klauser Link: https://lore.kernel.org/r/20221115071724.5185-3-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_jtaguart.c | 41 ++++++++++++++---------------------- 1 file changed, 16 insertions(+), 25 deletions(-) commit 070fa1d2bf089937559183320c4066c065312665 Author: Jiri Slaby (SUSE) Date: Tue Nov 15 08:17:22 2022 +0100 tty: serial: altera_jtaguart: remove unused altera_jtaguart::sigs Nothing uses struct altera_jtaguart::sigs. Remove it. Cc: Tobias Klauser Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Tobias Klauser Link: https://lore.kernel.org/r/20221115071724.5185-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_jtaguart.c | 1 - 1 file changed, 1 deletion(-) commit cbdf6759e5b798b35ceafbae50fb7dd2340c9751 Author: Jiri Slaby (SUSE) Date: Tue Nov 15 08:17:21 2022 +0100 tty: serial: altera_jtaguart: remove flag from altera_jtaguart_rx_chars() TTY_NORMAL is the only value it contains, so remove the variable and use the constant instead. Cc: Tobias Klauser Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Tobias Klauser Link: https://lore.kernel.org/r/20221115071724.5185-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_jtaguart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 947d66b68f3c4e7cf8f3f3500807b9d2a0de28ce Author: Ilpo Järvinen Date: Fri Nov 11 16:25:02 2022 +0200 n_tty: Rename tail to old_tail in n_tty_read() The local tail variable in n_tty_read() is used for one purpose, it keeps the old tail. Thus, rename it appropriately to improve code readability. Signed-off-by: Ilpo Järvinen Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/22b37499-ff9a-7fc1-f6e0-58411328d122@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 42a62da0ae660e71c280bd8b287b994c1af1352c Merge: a3be423f0657 eb7081409f94 Author: Greg Kroah-Hartman Date: Tue Nov 22 17:38:38 2022 +0100 Merge 6.1-rc6 into tty-next We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 9f041c5d8296b3a04cf3ead473a124fb538490dc Author: Greg Kroah-Hartman Date: Mon Nov 21 10:46:49 2022 +0100 driver core: pass a const * into of_device_uevent() of_device_uevent() does not modify the struct device * passed into it, so make it a const * to enforce this. Also the documentation for the function was really wrong so fix that up at the same time. Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Link: https://lore.kernel.org/r/20221121094649.1556002-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/of/device.c | 6 +++--- include/linux/of_device.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit a53d1acc978321734a8fd7388f2c050a7219ab69 Author: Greg Kroah-Hartman Date: Mon Nov 21 10:46:48 2022 +0100 kobject: kset_uevent_ops: make name() callback take a const * The name() 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 the single existing name() callback to have the correct signature to preserve the build. Acked-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20221121094649.1556002-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 4 ++-- include/linux/kobject.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit c45a88bb3f6cdaeb29d8ee98463610ad815721ab Author: Greg Kroah-Hartman Date: Mon Nov 21 10:46:47 2022 +0100 kobject: kset_uevent_ops: make filter() callback take a const * The filter() 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 filter() callbacks to have the correct signature to preserve the build. Cc: Sumit Semwal Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Acked-by: Rafael J. Wysocki Acked-by: Christian König for the changes to Link: https://lore.kernel.org/r/20221121094649.1556002-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/base/bus.c | 2 +- drivers/base/core.c | 4 ++-- drivers/dma-buf/dma-buf-sysfs-stats.c | 2 +- include/linux/kobject.h | 2 +- kernel/params.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 542aa24646ca20ccedb70829a95254ce602cdcbd Author: Greg Kroah-Hartman Date: Mon Nov 21 10:46:46 2022 +0100 kobject: make kobject_namespace take a const * kobject_namespace() should take a const *kobject as it does not modify the kobject passed to it. Change that, and the functions kobj_child_ns_ops() and kobj_ns_ops() needed to also be changed to const *. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221121094649.1556002-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman include/linux/kobject.h | 2 +- include/linux/kobject_ns.h | 4 ++-- lib/kobject.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit 02a476d932287cf3096f78962ccb70d94d6203c6 Author: Greg Kroah-Hartman Date: Mon Nov 21 10:46:45 2022 +0100 kobject: make kobject_get_ownership() take a constant kobject * The call, kobject_get_ownership(), does not modify the kobject passed into it, so make it const. This propagates down into the kobj_type function callbacks so make the kobject passed into them also const, ensuring that nothing in the kobject is being changed here. This helps make it more obvious what calls and callbacks do, and do not, modify structures passed to them. Cc: Trond Myklebust Cc: Anna Schumaker Cc: Roopa Prabhu Cc: "David S. Miller" Cc: Eric Dumazet Cc: Paolo Abeni Cc: Chuck Lever Cc: Jeff Layton Cc: linux-nfs@vger.kernel.org Cc: bridge@lists.linux-foundation.org Cc: netdev@vger.kernel.org Acked-by: Jakub Kicinski Acked-by: Rafael J. Wysocki Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20221121094649.1556002-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/base/class.c | 2 +- drivers/base/core.c | 8 ++++---- fs/nfs/sysfs.c | 4 ++-- include/linux/kobject.h | 8 ++++---- lib/kobject.c | 4 ++-- net/bridge/br_if.c | 2 +- net/core/net-sysfs.c | 8 ++++---- net/sunrpc/sysfs.c | 8 ++++---- 8 files changed, 22 insertions(+), 22 deletions(-) commit 907140462eb511f3d98aa89c0665da1b618d3545 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:06 2022 +0100 usb: usb251xb: 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: Richard Leitner Link: https://lore.kernel.org/r/20221118224540.619276-573-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb251xb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4b1e537ad367b415f30fc37c1f4403ddd12a88d5 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:07 2022 +0100 usb: misc: usb3503: 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-574-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb3503.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d4468280d8bcd68a7303efcb5a404efb680de1fc Author: Uwe Kleine-König Date: Fri Nov 18 23:45:08 2022 +0100 usb: usb4604: 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-575-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb4604.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c3ed6965fe7400c97d806edb282ad08810acdee9 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:09 2022 +0100 usb: isp1301-omap: 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-576-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-isp1301-omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f7cc30769ac0681669b963ede092f12afe829b6 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:10 2022 +0100 usb: phy: isp1301: 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-577-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-isp1301.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cfb8e41ae81311eef73fc50e401e93543204de3e Author: Uwe Kleine-König Date: Fri Nov 18 23:45:11 2022 +0100 usb: typec: anx7411: 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-578-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/anx7411.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b5583ea8b9ea659241e3f0cb8c9ca56f9a9630b3 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:12 2022 +0100 usb: typec: hd3ss3220: 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: Heikki Krogerus Link: https://lore.kernel.org/r/20221118224540.619276-579-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/hd3ss3220.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3646730ee44f42dd91619e30c917c0140853a948 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:13 2022 +0100 usb: typec: tcpm/fusb302: 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: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221118224540.619276-580-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/fusb302.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bdd0400d0f7245091ca8eff781825e93db1a135f Author: Uwe Kleine-König Date: Fri Nov 18 23:45:14 2022 +0100 usb: typec: tcpm/tcpci: 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 Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221118224540.619276-581-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c852ec1c0192ff0ce032a1f0bbf23be01c98479d Author: Uwe Kleine-König Date: Fri Nov 18 23:45:15 2022 +0100 usb: typec: tcpm/tcpci_maxim: 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 Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221118224540.619276-582-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpci_maxim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f02586d70aeb491a17c179c857aa4a361760bf0c Author: Uwe Kleine-König Date: Fri Nov 18 23:45:16 2022 +0100 usb: typec: tcpm/tcpci_rt1711h: 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: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221118224540.619276-583-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpci_rt1711h.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d24182b10cd5c734499c6185e9c63403ee1de5ac Author: Uwe Kleine-König Date: Fri Nov 18 23:45:17 2022 +0100 usb: typec: ucsi/ucsi_ccg: 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: Heikki Krogerus Link: https://lore.kernel.org/r/20221118224540.619276-584-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi_ccg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 05b2e347a58385b8b00051fef61f10a512b5aa20 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:18 2022 +0100 usb: typec: ucsi: stm32g0: 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: Heikki Krogerus Link: https://lore.kernel.org/r/20221118224540.619276-585-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi_stm32g0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit afdc12887f2b2ecf20d065a7d81ad29824155083 Author: Jiantao Zhang Date: Mon Nov 21 13:08:05 2022 +0000 USB: gadget: Fix use-after-free during usb config switch In the process of switching USB config from rndis to other config, if the hardware does not support the ->pullup callback, or the hardware encounters a low probability fault, both of them may cause the ->pullup callback to fail, which will then cause a system panic (use after free). The gadget drivers sometimes need to be unloaded regardless of the hardware's behavior. Analysis as follows: ======================================================================= (1) write /config/usb_gadget/g1/UDC "none" gether_disconnect+0x2c/0x1f8 rndis_disable+0x4c/0x74 composite_disconnect+0x74/0xb0 configfs_composite_disconnect+0x60/0x7c usb_gadget_disconnect+0x70/0x124 usb_gadget_unregister_driver+0xc8/0x1d8 gadget_dev_desc_UDC_store+0xec/0x1e4 (2) rm /config/usb_gadget/g1/configs/b.1/f1 rndis_deregister+0x28/0x54 rndis_free+0x44/0x7c usb_put_function+0x14/0x1c config_usb_cfg_unlink+0xc4/0xe0 configfs_unlink+0x124/0x1c8 vfs_unlink+0x114/0x1dc (3) rmdir /config/usb_gadget/g1/functions/rndis.gs4 panic+0x1fc/0x3d0 do_page_fault+0xa8/0x46c do_mem_abort+0x3c/0xac el1_sync_handler+0x40/0x78 0xffffff801138f880 rndis_close+0x28/0x34 eth_stop+0x74/0x110 dev_close_many+0x48/0x194 rollback_registered_many+0x118/0x814 unregister_netdev+0x20/0x30 gether_cleanup+0x1c/0x38 rndis_attr_release+0xc/0x14 kref_put+0x74/0xb8 configfs_rmdir+0x314/0x374 If gadget->ops->pullup() return an error, function rndis_close() will be called, then it will causes a use-after-free problem. ======================================================================= Fixes: 0a55187a1ec8 ("USB: gadget core: Issue ->disconnect() callback from usb_gadget_disconnect()") Signed-off-by: Jiantao Zhang Signed-off-by: TaoXue Link: https://lore.kernel.org/r/20221121130805.10735-1-water.zhangjiantao@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 581c848b610dbf3fe1ed4d85fd53d0743c61faba Author: Marek Vasut Date: Sun Nov 20 15:15:09 2022 +0100 extcon: usbc-tusb320: Update state on probe even if no IRQ pending Currently this driver triggers extcon and typec state update in its probe function, to read out current state reported by the chip and report the correct state to upper layers. This synchronization is performed correctly, but only in case the chip indicates a pending interrupt in reg09 register. This fails to cover the situation where all interrupts reported by the chip were already handled by Linux before reboot, then the system rebooted, and then Linux starts again. In this case, the TUSB320 no longer reports any interrupts in reg09, and the state update does not perform any update as it depends on that interrupt indication. Fix this by turning tusb320_irq_handler() into a thin wrapper around tusb320_state_update_handler(), where the later now contains the bulk of the code of tusb320_irq_handler(), but adds new function parameter "force_update". The "force_update" parameter can be used by the probe function to assure that the state synchronization is always performed, independent of the interrupt indicated in reg09. The interrupt handler tusb320_irq_handler() callback uses force_update=false to avoid state updates on potential spurious interrupts and retain current behavior. Fixes: 06bc4ca115cdd ("extcon: Add driver for TI TUSB320") Signed-off-by: Marek Vasut Reviewed-by: Alvin Šipraga Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221120141509.81012-1-marex@denx.de Signed-off-by: Greg Kroah-Hartman drivers/extcon/extcon-usbc-tusb320.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 3205054dc6fe2425ff24827a51fdf7cbbb528680 Author: Lukas Bulwahn Date: Wed Nov 16 12:04:44 2022 +0100 usb: dwc3: improve the config dependency of USB_DWC3_XILINX A request to Manish Narani (see Link) asked for clarification of the reference to the config ARCH_VERSAL in the support of Xilinx SoCs with DesignWare Core USB3 IP. As there is no response, clean up the reference to the non-existing config symbol. While at it, follow up on Felipe Balbi's request to add the alternative COMPILE_TEST dependency. Link: https://lore.kernel.org/all/CAKXUXMwgWfX8+OvY0aCwRNukencwJERAZzU7p4eOLXQ2zv6rAg@mail.gmail.com/ Signed-off-by: Lukas Bulwahn Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20221116110444.8340-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ffbe2feac59b37c8dc536727552b4f375e1b9aec Author: Tony Lindgren Date: Fri Nov 18 12:25:32 2022 +0200 usb: musb: omap2430: Fix probe regression for missing resources Probe for omap2430 glue layer is now broken for interrupt resources in all cases. Commit 239071064732 ("partially Revert "usb: musb: Set the DT node on the child device"") broke probing for SoCs using ti-sysc interconnect target module as the dt node is not found. Commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core") caused omap3 to fail with error "-ENXIO: IRQ mc not found" as the IRQ resources are no longer automatically populated from devicetree. Let's fix the issues by calling device_set_of_node_from_dev() only if the SoC has been updated to probe with ti-sysc. And for legacy SoCs, let's populate the resources manually as needed. Note that once we have updated the SoCs to probe with proper devicetree data in all cases, this is no longer needed. But doing that requires patching both devicetree and SoC code, so let's fix the probe issues first. Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core") Fixes: 239071064732 ("partially Revert "usb: musb: Set the DT node on the child device"") Cc: H. Nikolaus Schaller Reported-by: Sicelo Mhlongo Tested-by: Sicelo Mhlongo Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20221118102532.34458-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/omap2430.c | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 53a256ea9596ec78a9f5dd51f2b49c2355b15d6e Author: Sven Peter Date: Mon Nov 14 18:44:49 2022 +0100 usb: typec: tipd: Move tps6598x_disconnect error path to its own label While the code currently correctly calls tps6598x_disconnect before jumping to the error cleanup label it's inconsistent compared to all the other cleanup actions and prone to introduce bugs if any more resources are added. Signed-off-by: Sven Peter Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221114174449.34634-4-sven@svenpeter.dev Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tipd/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4c8f27ba9ede0118cac9d775204f9b0ecdb877b0 Author: Sven Peter Date: Mon Nov 14 18:44:48 2022 +0100 usb: typec: tipd: Fix typec_unregister_port error paths typec_unregister_port is only called for some error paths after typec_register_port was successful. Ensure it's called in all cases. Fixes: 92440202a880 ("usb: typec: tipd: Only update power status on IRQ") Signed-off-by: Sven Peter Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221114174449.34634-3-sven@svenpeter.dev Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tipd/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 782c70edc4852a5d39be12377a85501546236212 Author: Sven Peter Date: Mon Nov 14 18:44:47 2022 +0100 usb: typec: tipd: Fix spurious fwnode_handle_put in error path The err_role_put error path always calls fwnode_handle_put to release the fwnode. This path can be reached after probe itself has already released that fwnode though. Fix that by moving fwnode_handle_put in the happy path to the very end. Fixes: 18a6c866bb19 ("usb: typec: tps6598x: Add USB role switching logic") Signed-off-by: Sven Peter Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221114174449.34634-2-sven@svenpeter.dev Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tipd/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19c220e9ab00f50edefb9667e3101e84a5112df2 Author: Sven Peter Date: Mon Nov 14 18:44:46 2022 +0100 usb: typec: tipd: Cleanup resources if devm_tps6598_psy_register fails We can't just return if devm_tps6598_psy_register fails since previous resources are not devres managed and have yet to be cleaned up. Fixes: 10eb0b6ac63a ("usb: typec: tps6598x: Export some power supply properties") Signed-off-by: Sven Peter Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221114174449.34634-1-sven@svenpeter.dev Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tipd/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e99e1a7d6f88b9c54dc32671bac29f26e58bde80 Author: Chunfeng Yun Date: Fri Nov 18 19:01:16 2022 +0800 usb: host: xhci-mtk: omit shared hcd if either root hub has no ports There is error log when add a usb3 root hub without ports: "hub 4-0:1.0: config failed, hub doesn't have any ports! (err -19)" so omit the shared hcd if either of the root hubs has no ports, but usually there is no usb3 port. Signed-off-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221118110116.20165-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 72 +++++++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 26 deletions(-) commit 0384e87e3fec735e47f1c133c796f32ef7a72a9b Author: Yang Yingliang Date: Mon Nov 21 14:24:16 2022 +0800 usb: typec: tcpci: fix of node refcount leak in tcpci_register_port() I got the following report while doing device(mt6370-tcpc) load test with CONFIG_OF_UNITTEST and CONFIG_OF_DYNAMIC enabled: OF: ERROR: memory leak, expected refcount 1 instead of 2, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /i2c/pmic@34/tcpc/connector The 'fwnode' set in tcpci_parse_config() which is called in tcpci_register_port(), its node refcount is increased in device_get_named_child_node(). It needs be put while exiting, so call fwnode_handle_put() in the error path of tcpci_register_port() and in tcpci_unregister_port() to avoid leak. Fixes: 5e85a04c8c0d ("usb: typec: add fwnode to tcpc") Signed-off-by: Yang Yingliang Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221121062416.1026192-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6552ba4cd0841c23486368ed4feb2229e0abd1b3 Author: Abel Vesa Date: Wed Nov 16 17:06:00 2022 +0200 dt-bindings: usb: dwc3: Add SM8550 compatible Document the SM8550 dwc3 compatible. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221116150600.3011160-1-abel.vesa@linaro.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 +++ 1 file changed, 3 insertions(+) commit b6ddd180e3d9f92c1e482b3cdeec7dda086b1341 Author: Sven Peter Date: Mon Nov 14 17:59:24 2022 +0100 usb: typec: Check for ops->exit instead of ops->enter in altmode_exit typec_altmode_exit checks if ops->enter is not NULL but then calls ops->exit a few lines below. Fix that and check for the function pointer it's about to call instead. Fixes: 8a37d87d72f0 ("usb: typec: Bus type for alternate modes") Signed-off-by: Sven Peter Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221114165924.33487-1-sven@svenpeter.dev Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b462b05e47adaf11358f5c2c24db85c487b613e Author: Colin Ian King Date: Fri Nov 11 16:57:24 2022 +0000 usb: ftdi-elan: remove variable l Variable l is just being accumulated and it's never used anywhere else. The variable and the addition are redundant so remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221111165724.557152-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ftdi-elan.c | 2 -- 1 file changed, 2 deletions(-) commit 488c2c67463cc704715e9d4b68c9edfcc20f299d Author: Lukas Bulwahn Date: Tue Nov 15 11:31:53 2022 +0100 MAINTAINERS: rectify entry for MICROCHIP USB251XB DRIVER Commit fff61d4ccf3d ("dt-bindings: usb: usb251xb: Convert to YAML schema") converts usb251xb.txt to usb251xb.yaml, but misses to adjust its reference in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file reference in MICROCHIP USB251XB DRIVER. Signed-off-by: Lukas Bulwahn Acked-by: Marek Vasut Link: https://lore.kernel.org/r/20221115103153.28502-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 202f785b1863d8feef53f6489afd9abcb744e7bf Author: Christophe JAILLET Date: Mon Nov 14 21:38:04 2022 +0100 usb: fotg210-udc: Remove a useless assignment There is no need to use an intermediate array for these memory allocations, so, axe it. While at it, turn a '== NULL' into a shorter '!' when testing memory allocation failure. Signed-off-by: Christophe JAILLET Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/deab9696fc4000499470e7ccbca7c36fca17bd4e.1668458274.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/fotg210-udc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f8b729ce97f66807f6b958e891888d0b1ed20a9e Author: Linus Walleij Date: Mon Nov 14 12:52:01 2022 +0100 fotg210-udc: Get IRQ using platform_get_irq() The platform_get_irq() is necessary to use to get dynamic IRQ resolution when instantiating the device from the device tree. IRQs are not passed as resources in that case. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221114115201.302887-4-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/fotg210-udc.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 718a38d092ec920dd84a5e25510cc6721f527c3e Author: Linus Walleij Date: Mon Nov 14 12:52:00 2022 +0100 fotg210-udc: Handle PCLK This adds optional handling of the peripheral clock PCLK. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221114115201.302887-3-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/fotg210-udc.c | 30 ++++++++++++++++++++++++++++-- drivers/usb/fotg210/fotg210-udc.h | 1 + 2 files changed, 29 insertions(+), 2 deletions(-) commit 5f217ccd520f155c2e3b3dd95627140dd5ec947e Author: Linus Walleij Date: Mon Nov 14 12:51:59 2022 +0100 fotg210-udc: Support optional external PHY This adds support for an optional external PHY to the FOTG210 UDC driver. Tested with the GPIO VBUS PHY driver on the Gemini SoC. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221114115201.302887-2-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/fotg210-udc.c | 72 +++++++++++++++++++++++++++++++++++++++ drivers/usb/fotg210/fotg210-udc.h | 2 ++ 2 files changed, 74 insertions(+) commit d40eaada4209959264be63b21e18e15030db0a38 Author: Linus Walleij Date: Mon Nov 14 12:51:58 2022 +0100 fotg210-udc: Use dev pointer in probe and dev_messages Add a local struct device *dev pointer and use dev_err() etc to report status. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221114115201.302887-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/fotg210-udc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 6d36e0e1a14ac9a382c7a157bce5354fd8b68134 Author: Geert Uytterhoeven Date: Mon Nov 21 16:22:19 2022 +0100 usb: USB_FOTG210 should depend on ARCH_GEMINI The Faraday Technology FOTG210 USB2 Dual Role Controller is only present on Cortina Systems Gemini SoCs. Hence add a dependency on ARCH_GEMINI, to prevent asking the user about its drivers when configuring a kernel without Cortina Systems Gemini SoC support. Fixes: 1dd33a9f1b95ab59 ("usb: fotg210: Collect pieces of dual mode controller") Signed-off-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/a989b3b798ecaf3b45f35160e30e605636d66a77.1669044086.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ddacd6ef44cac60c4fb8cd1a994fb13e32c1c761 Author: Linus Walleij Date: Fri Nov 11 15:48:21 2022 +0100 usb: fotg210: Fix Kconfig for USB host modules The kernel robot reports a link failure when activating the FOTG210 host subdriver with =y on a system where the USB host core is a module (CONFIG_USB=m). This is a bit of special case, so mimic the Kconfig incantations from DWC3: let the subdrivers for host or peripheral depend on the host or gadget support being =y or the same as the FOTG210 core itself. This should ensure that either: - The host (CONFIG_USB) or gadget (CONFIG_GADGET) is compiled in and then the FOTG210 can be either module or compiled in. - The host or gadget is modular, and then the FOTG210 module must be a module too, or we cannot resolve the symbols at link time. Reported-by: kernel test robot Link: https://lore.kernel.org/linux-usb/202211112132.0BUPGKCd-lkp@intel.com/ Cc: Arnd Bergmann Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221111144821.113665-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a5e9f1f83e3271a9f05933a80b870fe55ebbb3d Author: Alexander Aring Date: Tue Nov 22 09:48:01 2022 -0500 fs: dlm: fix building without lockdep This patch uses assert_spin_locked() instead of lockdep_is_held() where it's available to use because lockdep_is_held() is only available if CONFIG_LOCKDEP is set. In other cases like lockdep_sock_is_held() we surround it by a CONFIG_LOCKDEP idef. Fixes: dbb751ffab0b ("fs: dlm: parallelize lowcomms socket handling") Reported-by: kernel test robot Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 55228db2697c09abddcb9487c3d9fa5854a932cd Author: YingChi Long Date: Fri Nov 18 08:55:35 2022 +0800 x86/fpu: Use _Alignof to avoid undefined behavior in TYPE_ALIGN WG14 N2350 specifies that it is an undefined behavior to have type definitions within offsetof", see https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm This specification is also part of C23. Therefore, replace the TYPE_ALIGN macro with the _Alignof builtin to avoid undefined behavior. (_Alignof itself is C11 and the kernel is built with -gnu11). ISO C11 _Alignof is subtly different from the GNU C extension __alignof__. Latter is the preferred alignment and _Alignof the minimal alignment. For long long on x86 these are 8 and 4 respectively. The macro TYPE_ALIGN's behavior matches _Alignof rather than __alignof__. [ bp: Massage commit message. ] Signed-off-by: YingChi Long Signed-off-by: Borislav Petkov Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20220925153151.2467884-1-me@inclyc.cn arch/x86/kernel/fpu/init.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c93924267fe6f2b44af1849f714ae9cd8117a9cd Author: Zhao Gongyi Date: Tue Nov 22 19:26:26 2022 +0800 selftests/efivarfs: Add checking of the test return value Add checking of the test return value, otherwise it will report success forever for test_create_read(). Fixes: dff6d2ae56d0 ("selftests/efivarfs: clean up test files from test_create*()") Signed-off-by: Zhao Gongyi Signed-off-by: Shuah Khan tools/testing/selftests/efivarfs/efivarfs.sh | 5 +++++ 1 file changed, 5 insertions(+) commit bce3e9f0f655224384c1ce89703cbeec47f4d9bd Merge: e5d4d2b23aed 0050e3d3d43d Author: Mark Brown Date: Tue Nov 22 15:20:52 2022 +0000 ASoC: Intel: add Dell SKU 0C11 support Merge series from Bard Liao : Add Dell SKU 0C11 support with rt1318 codec. commit 6007878a782eb96f50a71c3a06cf3e931cf8aac1 Author: Juergen Gross Date: Fri Nov 4 08:27:01 2022 +0100 x86/cpu: Switch to cpu_feature_enabled() for X86_FEATURE_XENPV Convert the remaining cases of static_cpu_has(X86_FEATURE_XENPV) and boot_cpu_has(X86_FEATURE_XENPV) to use cpu_feature_enabled(), allowing more efficient code in case the kernel is configured without CONFIG_XEN_PV. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lore.kernel.org/r/20221104072701.20283-6-jgross@suse.com arch/x86/kernel/cpu/amd.c | 2 +- arch/x86/kernel/cpu/bugs.c | 2 +- arch/x86/kernel/cpu/hygon.c | 2 +- arch/x86/kernel/process_64.c | 4 ++-- arch/x86/kernel/topology.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit d76c4f7a610ac56c5b06e34258859945e77d190c Author: Juergen Gross Date: Fri Nov 4 08:27:00 2022 +0100 x86/cpu: Remove X86_FEATURE_XENPV usage in setup_cpu_entry_area() Testing of X86_FEATURE_XENPV in setup_cpu_entry_area() can be removed, as this code path is 32-bit only, and Xen PV guests are 64-bit only. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lore.kernel.org/r/20221104072701.20283-5-jgross@suse.com arch/x86/mm/cpu_entry_area.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit dfbd9e4059c4edad4d92ef7f3deb4954f76e4ba0 Author: Juergen Gross Date: Fri Nov 4 08:26:59 2022 +0100 x86/cpu: Drop 32-bit Xen PV guest code in update_task_stack() Testing for Xen PV guest mode in a 32-bit only code section can be dropped, as Xen PV guests are supported in 64-bit mode only. While at it, switch from boot_cpu_has() to cpu_feature_enabled() in the 64-bit part of the code. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lore.kernel.org/r/20221104072701.20283-4-jgross@suse.com arch/x86/include/asm/switch_to.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 0bafc51babe2344e9b0ff6629a4f044727728349 Author: Juergen Gross Date: Fri Nov 4 08:26:58 2022 +0100 x86/cpu: Remove unneeded 64-bit dependency in arch_enter_from_user_mode() The check for 64-bit mode when testing X86_FEATURE_XENPV isn't needed, as Xen PV guests are no longer supported in 32-bit mode, see a13f2ef168cb ("x86/xen: remove 32-bit Xen PV guest support"). While at it switch from boot_cpu_has() to cpu_feature_enabled(). Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lore.kernel.org/r/20221104072701.20283-3-jgross@suse.com arch/x86/include/asm/entry-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73f5fc5f884ad0c5f7d57f66303af64f9f002526 Author: Yuan Can Date: Mon Nov 21 08:20:22 2022 +0000 iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe() The fsl_pamu_probe() returns directly when create_csd() failed, leaving irq and memories unreleased. Fix by jumping to error if create_csd() returns error. Fixes: 695093e38c3e ("iommu/fsl: Freescale PAMU driver and iommu implementation.") Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20221121082022.19091-1-yuancan@huawei.com Signed-off-by: Joerg Roedel drivers/iommu/fsl_pamu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15e15d64bd8e12d835f6bb1b1ce3ffa13fa03a66 Author: Juergen Gross Date: Fri Nov 4 08:26:57 2022 +0100 x86/cpufeatures: Add X86_FEATURE_XENPV to disabled-features.h Add X86_FEATURE_XENPV to the features handled specially in disabled-features.h. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lore.kernel.org/r/20221104072701.20283-2-jgross@suse.com arch/x86/include/asm/disabled-features.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 598afa050403ddbb015ad4d9f8e6b911c3c93d33 Author: Masahiro Yamada Date: Sat Nov 19 04:15:51 2022 +0900 kbuild: warn objects shared among multiple modules If an object is shared among multiple modules, and some of them are configured as 'm', but the others as 'y', the shared object is built as modular, then linked to the modules and vmlinux. This is a potential issue because the expected CFLAGS are different between modules and builtins. Commit 637a642f5ca5 ("zstd: Fixing mixed module-builtin objects") reported that this could be even more fatal in some cases such as Clang LTO. That commit fixed lib/zlib/zstd_{compress,decompress}, but there are still more instances of breakage. This commit adds a W=1 warning for shared objects, so that the kbuild test robot, which provides build tests with W=1, will avoid a new breakage slipping in. Quick compile tests on v6.1-rc4 detected the following: scripts/Makefile.build:252: ./drivers/block/rnbd/Makefile: rnbd-common.o is added to multiple modules: rnbd-client rnbd-server 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 scripts/Makefile.build:252: ./drivers/edac/Makefile: skx_common.o is added to multiple modules: i10nm_edac skx_edac scripts/Makefile.build:252: ./drivers/gpu/drm/bridge/imx/Makefile: imx-ldb-helper.o is added to multiple modules: imx8qm-ldb imx8qxp-ldb scripts/Makefile.build:252: ./drivers/mfd/Makefile: rsmu_core.o is added to multiple modules: rsmu-i2c rsmu-spi scripts/Makefile.build:252: ./drivers/mtd/tests/Makefile: mtd_test.o is added to multiple modules: mtd_nandbiterrs mtd_oobtest mtd_pagetest mtd_readtest mtd_speedtest mtd_stresstest mtd_subpagetest mtd_torturetest scripts/Makefile.build:252: ./drivers/net/dsa/ocelot/Makefile: felix.o is added to multiple modules: mscc_felix mscc_seville scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: cn23xx_pf_device.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: cn23xx_vf_device.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: cn66xx_device.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: cn68xx_device.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: lio_core.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: lio_ethtool.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: octeon_device.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: octeon_droq.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: octeon_mailbox.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: octeon_mem_ops.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: octeon_nic.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: request_manager.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/cavium/liquidio/Makefile: response_manager.o is added to multiple modules: liquidio liquidio_vf scripts/Makefile.build:252: ./drivers/net/ethernet/freescale/dpaa2/Makefile: dpaa2-mac.o is added to multiple modules: fsl-dpaa2-eth fsl-dpaa2-switch scripts/Makefile.build:252: ./drivers/net/ethernet/freescale/dpaa2/Makefile: dpmac.o is added to multiple modules: fsl-dpaa2-eth fsl-dpaa2-switch scripts/Makefile.build:252: ./drivers/net/ethernet/freescale/enetc/Makefile: enetc_cbdr.o is added to multiple modules: fsl-enetc fsl-enetc-vf scripts/Makefile.build:252: ./drivers/net/ethernet/freescale/enetc/Makefile: enetc_ethtool.o is added to multiple modules: fsl-enetc fsl-enetc-vf scripts/Makefile.build:252: ./drivers/net/ethernet/freescale/enetc/Makefile: enetc.o is added to multiple modules: fsl-enetc fsl-enetc-vf scripts/Makefile.build:252: ./drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_cmd.o is added to multiple modules: hclge hclgevf scripts/Makefile.build:252: ./drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_rss.o is added to multiple modules: hclge hclgevf scripts/Makefile.build:252: ./drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_tqp_stats.o is added to multiple modules: hclge hclgevf scripts/Makefile.build:252: ./drivers/net/ethernet/marvell/octeontx2/nic/Makefile: otx2_dcbnl.o is added to multiple modules: rvu_nicpf rvu_nicvf scripts/Makefile.build:252: ./drivers/net/ethernet/marvell/octeontx2/nic/Makefile: otx2_devlink.o is added to multiple modules: rvu_nicpf rvu_nicvf scripts/Makefile.build:252: ./drivers/net/ethernet/ti/Makefile: cpsw_ale.o is added to multiple modules: keystone_netcp keystone_netcp_ethss ti_cpsw ti_cpsw_new scripts/Makefile.build:252: ./drivers/net/ethernet/ti/Makefile: cpsw_ethtool.o is added to multiple modules: ti_cpsw ti_cpsw_new scripts/Makefile.build:252: ./drivers/net/ethernet/ti/Makefile: cpsw_priv.o is added to multiple modules: ti_cpsw ti_cpsw_new scripts/Makefile.build:252: ./drivers/net/ethernet/ti/Makefile: cpsw_sl.o is added to multiple modules: ti_cpsw ti_cpsw_new scripts/Makefile.build:252: ./drivers/net/ethernet/ti/Makefile: davinci_cpdma.o is added to multiple modules: ti_cpsw ti_cpsw_new ti_davinci_emac scripts/Makefile.build:252: ./drivers/platform/x86/intel/int3472/Makefile: common.o is added to multiple modules: intel_skl_int3472_discrete intel_skl_int3472_tps68470 scripts/Makefile.build:252: ./sound/soc/codecs/Makefile: wcd-clsh-v2.o is added to multiple modules: snd-soc-wcd9335 snd-soc-wcd934x snd-soc-wcd938x Once all the warnings are fixed, it can become an error without the W= option. Signed-off-by: Masahiro Yamada Reviewed-by: Alexander Lobakin Tested-by: Alexander Lobakin Reviewed-by: Nicolas Schier scripts/Makefile.build | 6 ++++++ 1 file changed, 6 insertions(+) commit a2430b25c31840a6dcbf95c65415d5fee2984dbc Author: Masahiro Yamada Date: Sat Nov 19 04:15:50 2022 +0900 kbuild: add kbuild-file macro While building, installing, cleaning, Kbuild visits sub-directories and includes 'Kbuild' or 'Makefile' that exists there. Add 'kbuild-file' macro, and reuse it from scripts/Makefie.* Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Reviewed-by: Alexander Lobakin Tested-by: Alexander Lobakin scripts/Kbuild.include | 5 +++++ scripts/Makefile.asm-generic | 6 +++--- scripts/Makefile.build | 6 +----- scripts/Makefile.clean | 5 +---- scripts/Makefile.dtbinst | 2 +- scripts/Makefile.modpost | 2 +- 6 files changed, 12 insertions(+), 14 deletions(-) commit 339e79dfb087075cbc27d3a902457574c4dac182 Merge: 837a3d66d698 877e7b7c3b12 Author: Paolo Abeni Date: Tue Nov 22 15:36:45 2022 +0100 Merge branch 'cleanup-ocelot_stats-exposure' Colin Foster says: ==================== cleanup ocelot_stats exposure The ocelot_stats structures became redundant across all users. Replace this redundancy with a static const struct. After doing this, several definitions inside include/soc/mscc/ocelot.h no longer needed to be shared. Patch 2 removes them. Checkpatch throws an error for a complicated macro not in parentheses. I understand the reason for OCELOT_COMMON_STATS was to allow expansion, but interestingly this patch set is essentially reverting the ability for expansion. I'm keeping the macro in this set, but am open to remove it, since it doesn't _actually_ provide any immediate benefits anymore. ==================== Link: https://lore.kernel.org/r/20221119231406.3167852-1-colin.foster@in-advantage.com Signed-off-by: Paolo Abeni commit 877e7b7c3b12d78f0488b767ed10ec21166ee422 Author: Colin Foster Date: Sat Nov 19 15:14:06 2022 -0800 net: mscc: ocelot: issue a warning if stats are incorrectly ordered Ocelot uses regmap_bulk_read() operations to efficiently read stats registers. Currently the implementation relies on the stats layout to be ordered to be most efficient. Issue a warning if any future implementations happen to break this pattern. Signed-off-by: Colin Foster Co-developed-by: Vladimir Oltean Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni drivers/net/ethernet/mscc/ocelot_stats.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a3bb8f521fd8703cdb429d3e52f3e6802706c87d Author: Colin Foster Date: Sat Nov 19 15:14:05 2022 -0800 net: mscc: ocelot: remove unnecessary exposure of stats structures Since commit 4d1d157fb6a4 ("net: mscc: ocelot: share the common stat definitions between all drivers") there is no longer a need to share the stats structures to the world. Relocate these definitions to inside ocelot_stats.c instead of a global include header. Signed-off-by: Colin Foster Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni drivers/net/ethernet/mscc/ocelot_stats.c | 216 +++++++++++++++++++++++++++++++ include/soc/mscc/ocelot.h | 215 ------------------------------ 2 files changed, 216 insertions(+), 215 deletions(-) commit 33d5eeb9a684a2e962ca0be3fe557a2c9f48d8e2 Author: Colin Foster Date: Sat Nov 19 15:14:04 2022 -0800 net: mscc: ocelot: remove redundant stats_layout pointers Ever since commit 4d1d157fb6a4 ("net: mscc: ocelot: share the common stat definitions between all drivers") the stats_layout entry in ocelot and felix drivers have become redundant. Remove the unnecessary code. Suggested-by: Vladimir Oltean Signed-off-by: Colin Foster Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni drivers/net/dsa/ocelot/felix.c | 1 - drivers/net/dsa/ocelot/felix.h | 1 - drivers/net/dsa/ocelot/felix_vsc9959.c | 5 ----- drivers/net/dsa/ocelot/seville_vsc9953.c | 5 ----- drivers/net/ethernet/mscc/ocelot_stats.c | 20 ++++++++++++-------- drivers/net/ethernet/mscc/ocelot_vsc7514.c | 5 ----- include/soc/mscc/ocelot.h | 1 - 7 files changed, 12 insertions(+), 26 deletions(-) commit f0f31de35644537a18059dac0e4a06f8b1c1c6c0 Author: Andy Shevchenko Date: Thu Nov 17 13:08:04 2022 +0200 pwm: lpss: Rename pwm_lpss_probe() --> devm_pwm_lpss_probe() The pwm_lpss_probe() uses managed resources. Show this to the users explicitly by adding devm prefix to its name. Signed-off-by: Andy Shevchenko Acked-by: Uwe Kleine-König drivers/pwm/pwm-lpss-pci.c | 2 +- drivers/pwm/pwm-lpss-platform.c | 2 +- drivers/pwm/pwm-lpss.c | 6 +++--- include/linux/platform_data/x86/pwm-lpss.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 2fd36aa0ad1c714d0c92a025ae28c8721ffe108e Author: Andy Shevchenko Date: Thu Nov 17 13:08:03 2022 +0200 pwm: lpss: Allow other drivers to enable PWM LPSS The PWM LPSS device can be embedded in another device. In order to enable it, allow that drivers to probe a corresponding device. Signed-off-by: Andy Shevchenko Acked-by: Thierry Reding Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede Acked-by: Uwe Kleine-König drivers/pwm/pwm-lpss.h | 22 +------------------- include/linux/platform_data/x86/pwm-lpss.h | 33 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 21 deletions(-) commit 878cf979c1458f835d436debb886f9dfff59012a Author: Andy Shevchenko Date: Thu Nov 17 13:08:02 2022 +0200 pwm: lpss: Include headers we are the direct user of For the sake of integrity, include headers we are the direct user of. Replace the inclusion of device.h by a forward declaration of struct device plus a (cheaper) of types.h as device.h is an expensive include (measured in compiler effort). Signed-off-by: Andy Shevchenko Acked-by: Thierry Reding Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede Acked-by: Uwe Kleine-König drivers/pwm/pwm-lpss.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 739f90fc48be7fb40f6dfe1212745c7fe56f2ab1 Author: Andy Shevchenko Date: Thu Nov 17 13:08:01 2022 +0200 pwm: lpss: Rename MAX_PWMS --> LPSS_MAX_PWMS The MAX_PWMS definition is already being used by the PWM core. Using the same name in the certain driver confuses people and potentially can clash with it. Hence, rename it by adding LPSS prefix. Reported-by: Uwe Kleine-König Signed-off-by: Andy Shevchenko Acked-by: Thierry Reding Reviewed-by: Mika Westerberg Reviewed-by: Uwe Kleine-König drivers/pwm/pwm-lpss.c | 2 +- drivers/pwm/pwm-lpss.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 88da4e8113110d5f4ebdd2f8cd0899e300cd1954 Author: Andy Shevchenko Date: Thu Nov 17 13:08:00 2022 +0200 pwm: Add a stub for devm_pwmchip_add() The devm_pwmchip_add() can be called by a module that optionally instantiates PWM chip. In the case of CONFIG_PWM=n, the compilation can't be performed. Hence, add a necessary stub. Signed-off-by: Andy Shevchenko Acked-by: Thierry Reding Reviewed-by: Mika Westerberg Acked-by: Uwe Kleine-König include/linux/pwm.h | 5 +++++ 1 file changed, 5 insertions(+) commit 862fe29b89b319d511709dd9e51d7b5ab97b8683 Merge: fe04716e1716 8fbf94fea0b4 Author: Arnd Bergmann Date: Tue Nov 22 15:27:59 2022 +0100 Merge tag 'riscv-soc-for-v6.2-mw0' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers RISC-V SoC drivers for v6.2 SiFive: - add probe error handling to the ccache driver * tag 'riscv-soc-for-v6.2-mw0' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: soc: sifive: ccache: fix missing of_node_put() in sifive_ccache_init() soc: sifive: ccache: fix missing free_irq() in error path in sifive_ccache_init() soc: sifive: ccache: fix missing iounmap() in error path in sifive_ccache_init() Link: https://lore.kernel.org/r/Y3u0Oydiv2Wauda2@spud Signed-off-by: Arnd Bergmann commit a115aa00b18f7b8982b8f458149632caf64a862a Author: Zhengchao Shao Date: Sat Nov 19 15:08:34 2022 +0800 RDMA/hns: fix memory leak in hns_roce_alloc_mr() When hns_roce_mr_enable() failed in hns_roce_alloc_mr(), mr_key is not released. Compiled test only. Fixes: 9b2cf76c9f05 ("RDMA/hns: Optimize PBL buffer allocation process") Signed-off-by: Zhengchao Shao Link: https://lore.kernel.org/r/20221119070834.48502-1-shaozhengchao@huawei.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hns/hns_roce_mr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit be84d8ed3f04e9154a3a55e29a27dcd416f05b31 Author: Julian Pidancet Date: Thu Oct 27 22:49:06 2022 +0200 x86/alternative: Consistently patch SMP locks in vmlinux and modules alternatives_smp_module_add() restricts patching of SMP lock prefixes to the text address range passed as an argument. For vmlinux, patching all the instructions located between the _text and _etext symbols is allowed. That includes the .text section but also other sections such as .text.hot and .text.unlikely. As per the comment inside the 'struct smp_alt_module' definition, the original purpose of this restriction is to avoid patching the init code because in the case when one boots with a single CPU, the LOCK prefixes to the locking primitives are removed. Later on, when other CPUs are onlined, those LOCK prefixes get added back in but by that time the .init code is very likely removed so patching that would be a bad idea. For modules, the current code only allows patching instructions located inside the .text segment, excluding other sections such as .text.hot or .text.unlikely, which may need patching. Make patching of the kernel core and modules more consistent by allowing all text sections of modules except .init.text to be patched in module_finalize(). For that, use mod->core_layout.base/mod->core_layout.text_size as the address range allowed to be patched, which include all the code sections except the init code. [ bp: Massage and expand commit message. ] Signed-off-by: Julian Pidancet Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221027204906.511277-1-julian.pidancet@oracle.com arch/x86/kernel/module.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9907526d25c4ad8a6e3006487a544140776ba005 Author: Mustafa Ismail Date: Mon Nov 21 18:44:10 2022 -0600 RDMA/irdma: Initialize net_type before checking it The av->net_type is not initialized before it is checked in irdma_modify_qp_roce. This leads to an incorrect update to the ARP cache and QP context. RoCEv2 connections might fail as result. Set the net_type using rdma_gid_attr_network_type. Fixes: 80005c43d4c8 ("RDMA/irdma: Use net_type to check network type") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20221122004410.1471-1-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/verbs.c | 1 + 1 file changed, 1 insertion(+) commit e7b813b32a42a3a6281a4fd9ae7700a0257c1d50 Author: Jason A. Donenfeld Date: Wed Nov 16 17:16:42 2022 +0100 efi: random: refresh non-volatile random seed when RNG is initialized EFI has a rather unique benefit that it has access to some limited non-volatile storage, where the kernel can store a random seed. Register a notification for when the RNG is initialized, and at that point, store a new random seed. Reviewed-by: Ard Biesheuvel Signed-off-by: Jason A. Donenfeld drivers/firmware/efi/efi.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 898f1e5c3741ccabda5653f180051cd4aeff3794 Author: Jason A. Donenfeld Date: Wed Nov 16 17:16:38 2022 +0100 vsprintf: initialize siphash key using notifier Rather than polling every second, use the new notifier to do this at exactly the right moment. Reviewed-by: Petr Mladek Signed-off-by: Jason A. Donenfeld lib/vsprintf.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit bbc7e1bed1f5297581325e739f0e47f650a386fa Author: Jason A. Donenfeld Date: Wed Nov 16 17:16:37 2022 +0100 random: add back async readiness notifier This is required by vsprint, because it can't do things synchronously from hardirq context, and it will be useful for an EFI notifier as well. I didn't initially want to do this, but with two potential consumers now, it seems worth it. Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 22 ++++++++++++++++++++++ include/linux/random.h | 1 + 2 files changed, 23 insertions(+) commit d4b2e0d433769cb7c87e4c93dc048733388d1c46 Author: Shin'ichiro Kawasaki Date: Tue Nov 22 17:49:17 2022 +0900 block: fix missing nr_hw_queues update in blk_mq_realloc_tag_set_tags The commit ee9d55210c2f ("blk-mq: simplify blk_mq_realloc_tag_set_tags") cleaned up the function blk_mq_realloc_tag_set_tags. After this change, the function does not update nr_hw_queues of struct blk_mq_tag_set when new nr_hw_queues value is smaller than original. This results in failure of queue number change of block devices. To avoid the failure, add the missing nr_hw_queues update. Fixes: ee9d55210c2f ("blk-mq: simplify blk_mq_realloc_tag_set_tags") Reported-by: Chaitanya Kulkarni Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/linux-block/20221118140640.featvt3fxktfquwh@shindev/ Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221122084917.2034220-1-shinichiro.kawasaki@wdc.com Signed-off-by: Jens Axboe block/blk-mq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c16fe3c16bdc420719768f7ea97b82bd6303eec Author: Jens Axboe Date: Mon Nov 21 07:51:15 2022 -0700 io_uring: kill io_cqring_ev_posted() and __io_cq_unlock_post() __io_cq_unlock_post() is identical to io_cq_unlock_post(), and io_cqring_ev_posted() has a single caller so migth as well just inline it there. Signed-off-by: Jens Axboe io_uring/io_uring.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 4061f0ef730cca5171351b7018b34a45b76df9c2 Author: Jens Axboe Date: Sun Nov 20 10:20:46 2022 -0700 Revert "io_uring: disallow self-propelled ring polling" This reverts commit 7fdbc5f014c3f71bc44673a2d6c5bb2d12d45f25. This patch dealt with a subset of the real problem, which is a potential circular dependency on the wakup path for io_uring itself. Outside of io_uring, eventfd can also trigger this (see details in 03e02acda8e2) and so can epoll (see details in caf1aeaffc3b). Now that we have a generic solution to this problem, get rid of the io_uring specific work-around. Signed-off-by: Jens Axboe io_uring/poll.c | 2 -- 1 file changed, 2 deletions(-) commit 4464853277d0ccdb9914608dd1332f0fa2f9846f Author: Jens Axboe Date: Sun Nov 20 10:18:45 2022 -0700 io_uring: pass in EPOLL_URING_WAKE for eventfd signaling and wakeups Pass in EPOLL_URING_WAKE when signaling eventfd or doing poll related wakups, so that we can check for a circular event dependency between eventfd and epoll. If this flag is set when our wakeup handlers are called, then we know we have a dependency that needs to terminate multishot requests. eventfd and epoll are the only such possible dependencies. Cc: stable@vger.kernel.org # 6.0 Signed-off-by: Jens Axboe io_uring/io_uring.c | 4 ++-- io_uring/io_uring.h | 15 +++++++++++---- io_uring/poll.c | 8 ++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) commit 03e02acda8e267a8183e1e0ed289ff1ef9cd7ed8 Author: Jens Axboe Date: Sun Nov 20 10:13:44 2022 -0700 eventfd: provide a eventfd_signal_mask() helper This is identical to eventfd_signal(), but it allows the caller to pass in a mask to be used for the poll wakeup key. The use case is avoiding repeated multishot triggers if we have a dependency between eventfd and io_uring. If we setup an eventfd context and register that as the io_uring eventfd, and at the same time queue a multishot poll request for the eventfd context, then any CQE posted will repeatedly trigger the multishot request until it terminates when the CQ ring overflows. In preparation for io_uring detecting this circular dependency, add the mentioned helper so that io_uring can pass in EPOLL_URING as part of the poll wakeup key. Cc: stable@vger.kernel.org # 6.0 [axboe: fold in !CONFIG_EVENTFD fix from Zhang Qilong] Signed-off-by: Jens Axboe fs/eventfd.c | 37 +++++++++++++++++++++---------------- include/linux/eventfd.h | 7 +++++++ 2 files changed, 28 insertions(+), 16 deletions(-) commit 5e806c5812e8012a83496cf96bdba266b3aec428 Author: Oliver Upton Date: Fri Nov 18 18:22:22 2022 +0000 KVM: arm64: Reject shared table walks in the hyp code Exclusive table walks are the only supported table walk in the hyp, as there is no construct like RCU available in the hypervisor code. Reject any attempt to do a shared table walk by returning an error and allowing the caller to clean up the mess. Suggested-by: Will Deacon Signed-off-by: Oliver Upton Acked-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221118182222.3932898-4-oliver.upton@linux.dev arch/arm64/include/asm/kvm_pgtable.h | 17 +++++++++++++++-- arch/arm64/kvm/hyp/pgtable.c | 5 ++++- 2 files changed, 19 insertions(+), 3 deletions(-) commit b7833bf202e3068abb77c642a0843f696e9c8d38 Author: Oliver Upton Date: Fri Nov 18 18:22:21 2022 +0000 KVM: arm64: Don't acquire RCU read lock for exclusive table walks Marek reported a BUG resulting from the recent parallel faults changes, as the hyp stage-1 map walker attempted to allocate table memory while holding the RCU read lock: BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0 preempt_count: 0, expected: 0 RCU nest depth: 1, expected: 0 2 locks held by swapper/0/1: #0: ffff80000a8a44d0 (kvm_hyp_pgd_mutex){+.+.}-{3:3}, at: __create_hyp_mappings+0x80/0xc4 #1: ffff80000a927720 (rcu_read_lock){....}-{1:2}, at: kvm_pgtable_walk+0x0/0x1f4 CPU: 2 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc3+ #5918 Hardware name: Raspberry Pi 3 Model B (DT) Call trace: dump_backtrace.part.0+0xe4/0xf0 show_stack+0x18/0x40 dump_stack_lvl+0x8c/0xb8 dump_stack+0x18/0x34 __might_resched+0x178/0x220 __might_sleep+0x48/0xa0 prepare_alloc_pages+0x178/0x1a0 __alloc_pages+0x9c/0x109c alloc_page_interleave+0x1c/0xc4 alloc_pages+0xec/0x160 get_zeroed_page+0x1c/0x44 kvm_hyp_zalloc_page+0x14/0x20 hyp_map_walker+0xd4/0x134 kvm_pgtable_visitor_cb.isra.0+0x38/0x5c __kvm_pgtable_walk+0x1a4/0x220 kvm_pgtable_walk+0x104/0x1f4 kvm_pgtable_hyp_map+0x80/0xc4 __create_hyp_mappings+0x9c/0xc4 kvm_mmu_init+0x144/0x1cc kvm_arch_init+0xe4/0xef4 kvm_init+0x3c/0x3d0 arm_init+0x20/0x30 do_one_initcall+0x74/0x400 kernel_init_freeable+0x2e0/0x350 kernel_init+0x24/0x130 ret_from_fork+0x10/0x20 Since the hyp stage-1 table walkers are serialized by kvm_hyp_pgd_mutex, RCU protection really doesn't add anything. Don't acquire the RCU read lock for an exclusive walk. Reported-by: Marek Szyprowski Signed-off-by: Oliver Upton Acked-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221118182222.3932898-3-oliver.upton@linux.dev arch/arm64/include/asm/kvm_pgtable.h | 14 ++++++++------ arch/arm64/kvm/hyp/pgtable.c | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) commit 3a5154c723ba5ceb9ce374a7307e03263c03fd29 Author: Oliver Upton Date: Fri Nov 18 18:22:20 2022 +0000 KVM: arm64: Take a pointer to walker data in kvm_dereference_pteref() Rather than passing through the state of the KVM_PGTABLE_WALK_SHARED flag, just take a pointer to the whole walker structure instead. Move around struct kvm_pgtable and the RCU indirection such that the associated ifdeffery remains in one place while ensuring the walker + flags definitions precede their use. No functional change intended. Signed-off-by: Oliver Upton Acked-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221118182222.3932898-2-oliver.upton@linux.dev arch/arm64/include/asm/kvm_pgtable.h | 144 ++++++++++++++++++----------------- arch/arm64/kvm/hyp/pgtable.c | 6 +- 2 files changed, 76 insertions(+), 74 deletions(-) commit e5b0feb4361a4830b9133f57ed13923d70409b69 Author: Lu Baolu Date: Tue Nov 22 08:29:49 2022 +0800 iommu/vt-d: Use real field for indication of first level The dmar_domain uses bit field members to indicate the behaviors. Add a bit field for using first level and remove the flags member to avoid duplication. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20221118132451.114406-8-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 25 ++++++++++--------------- drivers/iommu/intel/iommu.h | 15 +++++---------- 2 files changed, 15 insertions(+), 25 deletions(-) commit b1cf1563f3b7396a2cb76b12b3bcdd7046b46372 Author: Lu Baolu Date: Tue Nov 22 08:29:48 2022 +0800 iommu/vt-d: Remove unnecessary domain_context_mapped() The device_domain_info::domain accurately records the domain attached to the device. It is unnecessary to check whether the context is present in the attach_dev path. Remove it to make the code neat. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20221118132451.114406-7-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 47 +++------------------------------------------ 1 file changed, 3 insertions(+), 44 deletions(-) commit a8204479f284a9d21c22e2fd7c9f7564b5828553 Author: Lu Baolu Date: Tue Nov 22 08:29:47 2022 +0800 iommu/vt-d: Rename domain_add_dev_info() dmar_domain_attach_device() is more meaningful according to what this helper does. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20221118132451.114406-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ba502132f5430d66f768569f2af32b8f268322a8 Author: Lu Baolu Date: Tue Nov 22 08:29:46 2022 +0800 iommu/vt-d: Rename iommu_disable_dev_iotlb() Rename iommu_disable_dev_iotlb() to iommu_disable_pci_caps() to pair with iommu_enable_pci_caps(). Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20221118132451.114406-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 35a99c54dd60103930db4a472dd15f232e754867 Author: Lu Baolu Date: Tue Nov 22 08:29:45 2022 +0800 iommu/vt-d: Add blocking domain support The Intel IOMMU hardwares support blocking DMA transactions by clearing the translation table entries. This implements a real blocking domain to avoid using an empty UNMANAGED domain. The detach_dev callback of the domain ops is not used in any path. Remove it to avoid dead code as well. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20221118132451.114406-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit c7be17c2903d4acbf9aa372bfb6e2a418387fce0 Author: Lu Baolu Date: Tue Nov 22 08:29:44 2022 +0800 iommu/vt-d: Add device_block_translation() helper If domain attaching to device fails, the IOMMU driver should bring the device to blocking DMA state. The upper layer is expected to recover it by attaching a new domain. Use device_block_translation() in the error path of dev_attach to make the behavior specific. The difference between device_block_translation() and the previous dmar_remove_one_dev_info() is that, in the scalable mode, it is the RID2PASID entry instead of context entry being cleared. As a result, enabling PCI capabilities is moved up. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20221118132451.114406-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) commit ec62b4424174f41bdcedd08d12d7bed80088453d Author: Lu Baolu Date: Tue Nov 22 08:29:43 2022 +0800 iommu/vt-d: Allocate pasid table in device probe path Whether or not a domain is attached to the device, the pasid table should always be valid as long as it has been probed. This moves the pasid table allocation from the domain attaching device path to device probe path and frees it in the device release path. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20221118132451.114406-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 0050e3d3d43db6a60b96eb8cbd2b9bcb0cd5db17 Author: Gongjun Song Date: Thu Nov 17 08:27:58 2022 +0800 ASoC: Intel: soc-acpi: add SKU 0C11 SoundWire configuration Audio hardware configuration of SKU 0C11 product is rt711 on link0, two rt1318s on link1 and link2, rt714 on link3 Signed-off-by: Gongjun Song Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221117002758.496211-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-rpl-match.c | 48 +++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit d84e10da17e7fc07e758a8b8f1fd6150bcd8ba08 Author: Gongjun Song Date: Thu Nov 17 08:27:57 2022 +0800 ASoC: Intel: sof_sdw: Add support for SKU 0C11 product SKU 0C11 product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Gongjun Song Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221117002758.496211-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8c4b3a8ea2c04d7979f378165e5c3dfa270659b6 Author: Gongjun Song Date: Thu Nov 17 08:27:56 2022 +0800 ASoC: intel: sof_sdw: add rt1318 codec support. Add rt1318 sdca codec support in sof_sdw machine driver. Signed-off-by: Gongjun Song Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221117002758.496211-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 1 + sound/soc/intel/boards/Makefile | 4 +- sound/soc/intel/boards/sof_sdw.c | 7 ++ sound/soc/intel/boards/sof_sdw_common.h | 7 ++ sound/soc/intel/boards/sof_sdw_rt1318.c | 120 ++++++++++++++++++++++++++++++++ 5 files changed, 137 insertions(+), 2 deletions(-) commit 837a3d66d698516ad2330e122eba9752ec3a48ed Author: Björn Töpel Date: Sat Nov 19 18:18:41 2022 +0100 selftests: net: Add cross-compilation support for BPF programs The selftests/net does not have proper cross-compilation support, and does not properly state libbpf as a dependency. Mimic/copy the BPF build from selftests/bpf, which has the nice side-effect that libbpf is built as well. Signed-off-by: Björn Töpel Reviewed-by: Anders Roxell Link: https://lore.kernel.org/r/20221119171841.2014936-1-bjorn@kernel.org Signed-off-by: Paolo Abeni tools/testing/selftests/net/bpf/Makefile | 45 +++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-) commit 9dadff066244543780e5d9ee406b3ec7af19e22c Author: Uwe Kleine-König Date: Fri Nov 18 23:45:02 2022 +0100 staging: iio: ade7854: 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-569-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/meter/ade7854-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6dcd6d0152200794a26b52ff762a110268551ba6 Author: Tiezhu Yang Date: Sat Nov 19 10:55:04 2022 +0800 samples: pktgen: Use "grep -E" instead of "egrep" The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl samples/pktgen` 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 Link: https://lore.kernel.org/r/1668826504-32162-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Paolo Abeni samples/pktgen/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b62649822e8c03ec1319f9d33c753106b8c80bcd Author: Uwe Kleine-König Date: Fri Nov 18 23:45:04 2022 +0100 staging: olpc_dcon: 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-571-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9a2c1d64c8eb4fab0387c0943eb6666b246f96aa Author: Uwe Kleine-König Date: Fri Nov 18 23:45:03 2022 +0100 staging: most: 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 Link: https://lore.kernel.org/r/20221118224540.619276-570-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman drivers/staging/most/i2c/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6d99022e56e8c1ddc4c75895ed9e3ce5da88453 Author: Michael Walle Date: Mon Nov 21 16:08:42 2022 +0100 regmap: add regmap_might_sleep() With the dawn of MMIO gpio-regmap users, it is desirable to let gpio-regmap ask the regmap if it might sleep during an access so it can pass that information to gpiochip. Add a new regmap_might_sleep() to query the regmap. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20221121150843.1562603-1-michael@walle.cc Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 13 +++++++++++++ include/linux/regmap.h | 7 +++++++ 2 files changed, 20 insertions(+) commit e5d4d2b23aed20a7815d1b500dbcd50af1da0023 Author: Lili Li Date: Mon Nov 21 18:47:42 2022 +0800 ASoC: Intel: Skylake: Fix Kconfig dependency Commit e4746d94d00c ("ASoC: Intel: Skylake: Introduce HDA codec init and exit routines") introduced HDA codec init routine which depends on SND_HDA. Select SND_SOC_HDAC_HDA unconditionally to fix following compile error: ERROR: modpost: "snd_hda_codec_device_init" [sound/soc/intel/skylake/snd-soc-skl.ko] undefined! Fixes: e4746d94d00c ("ASoC: Intel: Skylake: Introduce HDA codec init and exit routines") Reviewed-by: Junxiao Chang Suggested-by: Cezary Rojewski Signed-off-by: Lili Li Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221121104742.1007486-1-lili.li@intel.com Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a37265046618b890adf7d7a1f9f1f5fbae908a7 Author: David Lin Date: Tue Nov 22 15:38:56 2022 +0800 ASoC: nau8825: Add a manually mechanism for detection failure This patch is to use saradc to check the jack type when auto detection is still failure. Signed-off-by: David Lin Link: https://lore.kernel.org/r/20221122073855.43024-2-CTLIN0@nuvoton.com Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 128 +++++++++++++++++++++++++++++++++++++++++++-- sound/soc/codecs/nau8825.h | 23 ++++++++ 2 files changed, 148 insertions(+), 3 deletions(-) commit fa0fb0738e9c412d3c4a9fe655948ac9a87c6274 Author: David Lin Date: Tue Nov 22 15:38:55 2022 +0800 ASoC: nau8825: Adjust internal clock during jack detection This patch is to rasie up internal clock during jack detection. The fast clock will accelerate charge and discharge effect. So this mechanism will make jack detection more robust. Signed-off-by: David Lin Link: https://lore.kernel.org/r/20221122073855.43024-1-CTLIN0@nuvoton.com Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a9248c868c39440369c614598b2465d1a1b1cf62 Author: Gongjun Song Date: Tue Nov 22 13:20:52 2022 +0800 ASoC: Intel: sof_sdw: Add support for SKU 0C4F product SKU 0C4F product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Gongjun Song Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221122052052.687281-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f198d34759eb3d110d37bb42f6c39cd90bd0b0cb Author: Umang Jain Date: Fri Nov 18 14:12:44 2022 +0530 vc04_services: bcm2835-camera: Use bool values for mmal_fmt.remove_padding mmal_fmt.remove_padding is defined as a boolean type hence, use boolean values for it instead of 0/1 integers. This enhances code readability. Signed-off-by: Umang Jain Reviewed-by: Dave Stevenson Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/r/20221118084244.199909-4-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/bcm2835-camera.c | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) commit c0012a39cf6c7197ad93da0bdba7245c094f8469 Author: Umang Jain Date: Fri Nov 18 14:12:43 2022 +0530 vc04_services: mmal-vchiq: Use bool for vchiq_mmal_component.in_use In commit 7967656ffbfa ("coding-style: Clarify the expectations around bool") the check to dis-allow bool structure members was removed from checkpatch.pl. It promotes bool structure members to store boolean values. This enhances code readability. Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Reviewed-by: Dave Stevenson Link: https://lore.kernel.org/r/20221118084244.199909-3-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 6 +++--- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 733611730676de202fade0cb73792c17d5aa9903 Author: Umang Jain Date: Fri Nov 18 14:12:42 2022 +0530 Revert "staging: mmal-vchiq: Avoid use of bool in structures" This reverts commit 640e77466e69d9c28de227bc76881f5501f532ca. In commit 7967656ffbfa ("coding-style: Clarify the expectations around bool") the check to dis-allow bool structure members was removed from checkpatch.pl. It promotes bool structure members to store boolean values. This enhances code readability. Signed-off-by: Umang Jain Reviewed-by: Dave Stevenson Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/r/20221118084244.199909-2-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 12 ++++++------ drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) commit 2b7962bd05163f5b20fb5f933092b997debf8ed6 Author: Brent Pappas Date: Thu Nov 17 14:54:43 2022 -0500 staging: gdm724x: Replace macro GDM_TTY_READY with static inline function Replace the macro GDM_TTY_READY with a static inline function to follow the Linux kernel coding style. Signed-off-by: Brent Pappas Link: https://lore.kernel.org/r/20221117195443.19616-1-bpappas@pappasbrent.com Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_tty.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 357057ee55d3c99a5de5abe8150f7bca04f8e53b Author: Gaosheng Cui Date: Thu Nov 17 11:59:14 2022 +0800 staging: vme_user: Fix possible UAF in tsi148_dma_list_add Smatch report warning as follows: drivers/staging/vme_user/vme_tsi148.c:1757 tsi148_dma_list_add() warn: '&entry->list' not removed from list In tsi148_dma_list_add(), the error path "goto err_dma" will not remove entry->list from list->entries, but entry will be freed, then list traversal may cause UAF. Fix by removeing it from list->entries before free(). Fixes: b2383c90a9d6 ("vme: tsi148: fix first DMA item mapping") Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20221117035914.2954454-1-cuigaosheng1@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/staging/vme_user/vme_tsi148.c | 1 + 1 file changed, 1 insertion(+) commit 4f15fc7c0f28ffcd6e9a56396db6edcdfa4c9925 Author: Tony Lindgren Date: Fri Nov 18 14:19:24 2022 +0200 ARM: dts: Unify pwm-omap-dmtimer node names There is no reg property for pwm-omap-dmtimer. Cc: Krzysztof Kozlowski Cc: Rob Herring Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-guardian.dts | 3 ++- arch/arm/boot/dts/am3517-evm.dts | 2 +- arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi | 2 +- arch/arm/boot/dts/motorola-mapphone-common.dtsi | 4 ++-- arch/arm/boot/dts/omap3-gta04.dtsi | 2 +- arch/arm/boot/dts/omap3-n900.dts | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) commit c5ed1fe0801f0c66b0fbce2785239a5664629057 Author: Yang Yingliang Date: Fri Nov 4 11:39:45 2022 +0800 MIPS: vpe-cmp: fix possible memory leak while module exiting dev_set_name() allocates memory for name, it need be freed when module exiting, call put_device() to give up reference, so that it can be freed in kobject_cleanup() when the refcount hit to 0. The vpe_device is static, so remove kfree() from vpe_device_release(). Fixes: 17a1d523aa58 ("MIPS: APRP: Add VPE loader support for CMP platforms.") Signed-off-by: Yang Yingliang Signed-off-by: Thomas Bogendoerfer arch/mips/kernel/vpe-cmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5822e8cc84ee37338ab0bdc3124f6eec04dc232d Author: Yang Yingliang Date: Fri Nov 4 11:39:44 2022 +0800 MIPS: vpe-mt: fix possible memory leak while module exiting Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically, it need be freed when module exiting, call put_device() to give up reference, so that it can be freed in kobject_cleanup() when the refcount hit to 0. The vpe_device is static, so remove kfree() from vpe_device_release(). Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array") Signed-off-by: Yang Yingliang Signed-off-by: Thomas Bogendoerfer arch/mips/kernel/vpe-mt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42a79edd4a3dc1bb8e89fd2849f9e8e1e1c13977 Author: Tony Lindgren Date: Tue Nov 22 13:25:14 2022 +0200 ARM: OMAP2+: Drop legacy hwmod data for omap3 otg With complete devicetree data available to probe with ti-sysc interconnect target module driver, we can now drop the related SoC data. Cc: H. Nikolaus Schaller Tested-by: Sicelo A. Mhlongo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 99 ------------------------------ 1 file changed, 99 deletions(-) commit 02871d2d4e092b03bce04e460bc1a63d663dd77c Author: Tony Lindgren Date: Tue Nov 22 13:25:14 2022 +0200 ARM: dts: Update omap3 musb to probe with ti-sysc We can drop the legacy booting for the related musb driver if we update the omap3 SoCs variants to boot using ti-sysc interconnect target module. devicetree@vger.kernel.org Cc: H. Nikolaus Schaller Tested-by: Sicelo A. Mhlongo Signed-off-by: Tony Lindgren arch/arm/boot/dts/am3517.dtsi | 38 ++++++++++++++++++++++++++++++-------- arch/arm/boot/dts/omap3.dtsi | 40 +++++++++++++++++++++++++++++++--------- arch/arm/boot/dts/omap34xx.dtsi | 4 ++++ arch/arm/boot/dts/omap36xx.dtsi | 4 ++++ 4 files changed, 69 insertions(+), 17 deletions(-) commit 41c3b936624acf8b98803a6c90d021ae1199e9cb Author: Tony Lindgren Date: Tue Nov 22 13:25:14 2022 +0200 bus: ti-sysc: Add otg quirk flags for omap3 musb To prepare for probing omap3 musb with ti-sysc, these quirk flags are needed similar to what we have for omap4. Cc: Greg Kroah-Hartman Cc: H. Nikolaus Schaller Tested-by: Sicelo A. Mhlongo Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8c5577a5ccc632685e65168fc6890b72a779f93a Author: Oded Gabbay Date: Sat Nov 19 21:54:20 2022 +0200 doc: add documentation for accel subsystem Add an introduction section for the accel subsystem. Most of the relevant data is in the DRM documentation, so the introduction only presents the why of the new subsystem, how are the compute accelerators exposed to user-space and what changes need to be done in a standard DRM driver to register it to the new accel subsystem. Signed-off-by: Oded Gabbay Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jeffrey Hugo Reviewed-by: Dave Airlie Acked-by: Thomas Zimmermann Acked-by: Jacek Lawrynowicz Tested-by: Jacek Lawrynowicz Reviewed-by: Melissa Wen Documentation/accel/index.rst | 17 ++++++ Documentation/accel/introduction.rst | 110 +++++++++++++++++++++++++++++++++++ Documentation/subsystem-apis.rst | 1 + MAINTAINERS | 1 + 4 files changed, 129 insertions(+) commit 7428ff70a18adc8940f41a6c4510fb3b908ac755 Author: Oded Gabbay Date: Mon Oct 31 15:31:07 2022 +0200 drm: initialize accel framework Now that we have the accel framework code ready, let's call the accel functions from all the appropriate places. These places are the drm module init/exit functions, and all the drm_minor handling functions. Signed-off-by: Oded Gabbay Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jeffrey Hugo Reviewed-by: Dave Airlie Acked-by: Thomas Zimmermann Acked-by: Jacek Lawrynowicz Tested-by: Jacek Lawrynowicz Reviewed-by: Melissa Wen drivers/gpu/drm/drm_drv.c | 101 ++++++++++++++++++++++++++++++++------------ drivers/gpu/drm/drm_sysfs.c | 24 +++++++---- 2 files changed, 90 insertions(+), 35 deletions(-) commit 2c204f3d53218dd2d14a51a4d0ad510c8d6e775a Author: Oded Gabbay Date: Mon Oct 31 15:33:06 2022 +0200 accel: add dedicated minor for accelerator devices The accelerator devices are exposed to user-space using a dedicated major. In addition, they are represented in /dev with new, dedicated device char names: /dev/accel/accel*. This is done to make sure any user-space software that tries to open a graphic card won't open the accelerator device by mistake. The above implies that the minor numbering should be separated from the rest of the DRM devices. However, to avoid code duplication, we want the drm_minor structure to be able to represent the accelerator device. To achieve this, we add a new drm_minor* to drm_device that represents the accelerator device. This pointer is initialized for drivers that declare they handle compute accelerator, using a new driver feature flag called DRIVER_COMPUTE_ACCEL. It is important to note that this driver feature is mutually exclusive with DRIVER_RENDER. Devices that want to expose both graphics and compute device char files should be handled by two drivers that are connected using the auxiliary bus framework. In addition, we define a different IDR to handle the accelerators minors. This is done to make the minor's index be identical to the device index in /dev/. Any access to the IDR is done solely by functions in accel_drv.c, as the IDR is define as static. The DRM core functions call those functions in case they detect the minor's type is DRM_MINOR_ACCEL. We define a separate accel_open function (from drm_open) that the accel drivers should set as their open callback function. Both these functions eventually call the same drm_open_helper(), which had to be changed to be non-static so it can be called from accel_drv.c. accel_open() only partially duplicates drm_open as I removed some code from it that handles legacy devices. To help new drivers, I defined DEFINE_DRM_ACCEL_FOPS macro to easily set the required function operations pointers structure. Signed-off-by: Oded Gabbay Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jeffrey Hugo Reviewed-by: Dave Airlie Acked-by: Thomas Zimmermann Acked-by: Jacek Lawrynowicz Tested-by: Jacek Lawrynowicz Reviewed-by: Melissa Wen drivers/accel/drm_accel.c | 242 ++++++++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/drm_file.c | 2 +- include/drm/drm_accel.h | 65 ++++++++++++ include/drm/drm_device.h | 3 + include/drm/drm_drv.h | 8 ++ include/drm/drm_file.h | 21 +++- 6 files changed, 338 insertions(+), 3 deletions(-) commit 8bf4889762a8f5ea25610e426f132f585e9b5ed6 Author: Oded Gabbay Date: Mon Oct 31 15:28:35 2022 +0200 drivers/accel: define kconfig and register a new major Add a new Kconfig for the accel subsystem. The Kconfig currently contains only the basic CONFIG_DRM_ACCEL option that will be used to decide whether to compile the accel registration code. Therefore, the kconfig option is defined as bool. The accel code will be compiled as part of drm.ko and will be called directly from the DRM core code. The reason we compile it as part of drm.ko and not as a separate module is because of cyclic dependency between drm.ko and the separate module (if it would have existed). This is due to the fact that DRM core code calls accel functions and vice-versa. The accelerator devices will be exposed to the user space with a new, dedicated major number - 261. The accel init function registers the new major number as a char device and create corresponding sysfs and debugfs root entries, similar to what is done in DRM init function. I added a new header called drm_accel.h to include/drm/, that will hold the prototypes of the drm_accel.c functions. In case CONFIG_DRM_ACCEL is set to 'N', that header will contain empty inline implementations of those functions, to allow DRM core code to compile successfully without dependency on CONFIG_DRM_ACCEL. I Updated the MAINTAINERS file accordingly with the newly added folder and I have taken the liberty to appropriate the dri-devel mailing list and the dri-devel IRC channel for the accel subsystem. Signed-off-by: Oded Gabbay Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jeffrey Hugo Reviewed-by: Dave Airlie Acked-by: Thomas Zimmermann Acked-by: Jacek Lawrynowicz Tested-by: Jacek Lawrynowicz Reviewed-by: Melissa Wen Documentation/admin-guide/devices.txt | 5 +++ MAINTAINERS | 8 ++++ drivers/Kconfig | 2 + drivers/accel/Kconfig | 24 ++++++++++ drivers/accel/drm_accel.c | 83 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/Makefile | 1 + include/drm/drm_accel.h | 32 ++++++++++++++ 7 files changed, 155 insertions(+) commit 7b0592a23e4f27196f4ea207a926838e7651c5b5 Author: Wang Honghui Date: Tue Nov 22 16:50:36 2022 +0800 printk: fix a typo of comment Fix a typo of comment Signed-off-by: Wang Honghui Reviewed-by: John Ogness Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/77522C532189E547+Y3yG91g6XALbtdJr@TP-P15V.lan Link: https://lore.kernel.org/r/0C7C980DB815FAE1+Y3yNXJCqZ3Nzxa5V@TP-P15V.lan kernel/printk/printk_ringbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7299fdc1cfff0e45e4ca4efd77f250965598b41c Author: Jiucheng Xu Date: Tue Nov 22 16:40:28 2022 +0800 perf/amlogic: Fix build error for x86_64 allmodconfig The driver misses including , which causes a compilation error with x86_64 'allmodconfig': drivers/perf/amlogic/meson_g12_ddr_pmu.c: In function 'dmc_g12_get_freq_quick': drivers/perf/amlogic/meson_g12_ddr_pmu.c:135:15: error: implicit declaration of function 'readl' [-Werror=implicit-function-declaration] 135 | val = readl(info->pll_reg); | ^~~~~ drivers/perf/amlogic/meson_g12_ddr_pmu.c: In function 'dmc_g12_counter_enable': drivers/perf/amlogic/meson_g12_ddr_pmu.c:204:9: error: implicit declaration of function 'writel' [-Werror=implicit-function-declaration] 204 | writel(clock_count, info->ddr_reg[0] + DMC_MON_G12_TIMER); | ^~~~~~ Add the missing header to fix the build. Fixes: 2016e2113d35 ("perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver") Reported-by: Stephen Rothwell Signed-off-by: Jiucheng Xu Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20221122084028.572494-1-jiucheng.xu@amlogic.com Signed-off-by: Will Deacon drivers/perf/amlogic/meson_g12_ddr_pmu.c | 1 + 1 file changed, 1 insertion(+) commit 3b79d4bad3a0e73d9becb409a5f6112bc61e2c93 Author: Kees Cook Date: Fri Nov 18 15:42:44 2022 -0800 wifi: p54: 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 (most especially because struct pda_antenna_gain is unused). The struct is kept for future reference. [1] https://github.com/KSPP/linux/issues/78 Cc: Christian Lamparter Cc: Kalle Valo Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: "Gustavo A. R. Silva" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221118234240.gonna.369-kees@kernel.org drivers/net/wireless/intersil/p54/eeprom.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e2f177de1bfb7d891bf38140bda54831ecef30d Author: Zong-Zhe Yang Date: Fri Nov 18 12:23:22 2022 +0800 wifi: rtw89: fix physts IE page check The index RTW89_PHYSTS_BITMAP_NUM is not a valid physts IE page. So, fix the check condition. Fixes: eb4e52b3f38d ("rtw89: fix incorrect channel info during scan") Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221118042322.26794-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac3a9f1838d8f5e5f9c8b6e2582b65c48a1e7bc1 Author: Ping-Ke Shih Date: Thu Nov 17 16:52:35 2022 +0800 wifi: rtw89: avoid inaccessible IO operations during doing change_interface() During doing change_interface(), hardware is power-off, so some components are inaccessible and return error. This causes things unexpected, and we don't have a warning message for that. So, ignore some IO operations in this situation, and add a warning message to indicate something wrong. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221117085235.53777-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/mac.c | 7 +++++++ drivers/net/wireless/realtek/rtw89/mac80211.c | 11 ++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) commit 29136c95fdc5d9bbfb56131408388fefdba4ed95 Author: Eric Huang Date: Thu Nov 17 14:30:01 2022 +0800 wifi: rtw89: switch BANDEDGE and TX_SHAPE based on OFDMA trigger frame There are some registers for transmit waveform control, two of them used in this change are for BANDEDGE and TX_SHAPE control. BANDEDGE controls whether to apply band edge filter to transmit waveform. TX_SHAPE controls whether to apply triangular mask to transmit waveform. It is found for some chip, these two should be turned off during OFDMA UL traffic for better performance. Signed-off-by: Eric Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221117063001.42967-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 2 + drivers/net/wireless/realtek/rtw89/core.h | 9 ++ drivers/net/wireless/realtek/rtw89/debug.h | 1 + drivers/net/wireless/realtek/rtw89/phy.c | 127 +++++++++++++++++++++++++- drivers/net/wireless/realtek/rtw89/phy.h | 5 + drivers/net/wireless/realtek/rtw89/rtw8852a.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852b.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852c.c | 1 + 8 files changed, 146 insertions(+), 1 deletion(-) commit 10cd4092f67eaf0cade4f50c68ecb055d4ee3a93 Author: Eric Huang Date: Thu Nov 17 14:30:00 2022 +0800 wifi: rtw89: read CFO from FD or preamble CFO field of phy status ie_type 1 accordingly Add macro to get FD(frequency domain) CFO field from ie_type 1, and correct the naming for preamble CFO field. Each IC could assign the CFO source to either FD CFO or preamble CFO in chip_info. Based on the suggestion from HW designer, rtw8852b and its derived versions will have better CFO tracking performance with FD CFO. Signed-off-by: Eric Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221117063001.42967-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 6 +++++- drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/rtw8852a.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852b.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852c.c | 1 + drivers/net/wireless/realtek/rtw89/txrx.h | 4 +++- 6 files changed, 12 insertions(+), 2 deletions(-) commit 79ca91a3c1f1e5d871f393791e7538f9386a7711 Author: Ping-Ke Shih Date: Thu Nov 17 14:18:32 2022 +0800 wifi: rtw89: 8852b: correct TX power controlled by BT-coexistence When coexistence mechanism is under free-run mode, it could adjust WiFi and BT TX power to avoid interference with each other. For other cases, it should keep original TX power from regular predefined tables, so set correct values to 255 for these cases. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221117061832.42057-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b.c | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 633a9b6f514c12b3ee42b3a4e647f137aca1e198 Author: Gustavo A. R. Silva Date: Tue Nov 15 15:55:34 2022 -0600 wifi: brcmfmac: Use struct_size() in code ralated to struct brcmf_dload_data_le Prefer struct_size() over open-coded versions of idiom: sizeof(struct-with-flex-array) + sizeof(typeof-flex-array-elements) * count where count is the max number of items the flexible array is supposed to contain. In this particular case, in the open-coded version sizeof(typeof-flex-array-elements) is implicit in _count_ because the type of the flex array data is u8: drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h:941: 941 struct brcmf_dload_data_le { 942 __le16 flag; 943 __le16 dload_type; 944 __le32 len; 945 __le32 crc; 946 u8 data[]; 947 }; Link: https://github.com/KSPP/linux/issues/160 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/41845ad3660ed4375f0c03fd36a67b2e12fafed5.1668548907.git.gustavoars@kernel.org drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0001650b3d89683bbea0cc3262c2a509dac9e78e Author: Gustavo A. R. Silva Date: Tue Nov 15 15:53:27 2022 -0600 wifi: brcmfmac: replace one-element array with flexible-array member in struct brcmf_dload_data_le 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_dload_data_le. Important to mention is 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/230 Link: https://github.com/KSPP/linux/issues/79 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/905f5b68cf93c812360d081caae5b15221db09b6.1668548907.git.gustavoars@kernel.org drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 4 ++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit f0e0897b4c7eb590581463125c553bd6bb029808 Author: Gustavo A. R. Silva Date: Mon Nov 14 17:02:06 2022 -0600 wifi: brcmfmac: Use struct_size() and array_size() in code ralated to struct brcmf_gscan_config Prefer struct_size() over open-coded versions of idiom: sizeof(struct-with-flex-array) + sizeof(typeof-flex-array-elements) * count where count is the max number of items the flexible array is supposed to contain. Also, use array_size() in call to memcpy(). Link: https://github.com/KSPP/linux/issues/160 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/de0226a549c8d000d8974e207ede786220a3df1a.1668466470.git.gustavoars@kernel.org drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 61b0853d0314a474f9135537ebf96ef85a7216df Author: Gustavo A. R. Silva Date: Mon Nov 14 17:01:11 2022 -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_gscan_config. Important to mention is 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/241 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/7694550aa9a2753a73a687f61af9441c8cf52fd7.1668466470.git.gustavoars@kernel.org drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8e96729fc26c8967db45a3fb7a60387619f77a22 Author: Uwe Kleine-König Date: Mon Nov 21 18:22:36 2022 +0100 crypto: ccree - Make cc_debugfs_global_fini() available for module init function ccree_init() calls cc_debugfs_global_fini(), the former is an init function and the latter an exit function though. A modular build emits: WARNING: modpost: drivers/crypto/ccree/ccree.o: section mismatch in reference: init_module (section: .init.text) -> cc_debugfs_global_fini (section: .exit.text) (with CONFIG_DEBUG_SECTION_MISMATCH=y). Fixes: 4f1c596df706 ("crypto: ccree - Remove debugfs when platform_driver_register failed") Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 674b3e164238a31f236ac63f82d5d160f7d4c201 Author: Suman Ghosh Date: Fri Nov 18 11:03:29 2022 +0530 octeontx2-pf: Add additional checks while configuring ucast/bcast/mcast rules 1. If a profile does not support DMAC extraction then avoid installing NPC flow rules for unicast. Similarly, if LXMB(L2 and L3) extraction is not supported by the profile then avoid installing broadcast and multicast rules. 2. Allow MCAM entry insertion for promiscuous mode. 3. For the profiles where DMAC is not extracted in MKEX key default unicast entry installed by AF is not valid. Hence do not use action from the AF installed default unicast entry for such cases. 4. Adjacent packet header fields in a packet like IP header source and destination addresses or UDP/TCP header source port and destination can be extracted together in MKEX profile. Therefore MKEX profile can be configured to in two ways: a. Total of 4 bytes from start of UDP header(src port + destination port) or b. Two bytes from start and two bytes from offset 2 Signed-off-by: Suman Ghosh Signed-off-by: Subbaraya Sundeep Link: https://lore.kernel.org/r/20221118053329.2288486-1-sumang@marvell.com Signed-off-by: Paolo Abeni drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 14 ++++ drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 1 + .../net/ethernet/marvell/octeontx2/af/rvu_npc.c | 22 +++++++ .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 76 ++++++++++++++++++---- .../ethernet/marvell/octeontx2/nic/otx2_flows.c | 27 +++++++- 5 files changed, 124 insertions(+), 16 deletions(-) commit f04ae51dd965bc0b7f2e01c5d85fc214877b4061 Merge: 30a0b95b1335 4428673bc89b Author: Joerg Roedel Date: Tue Nov 22 09:39:01 2022 +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.2 - Report a warning if we fail to disable the MMU-500 prefetcher - Usual mass of devicetree binding additions - Qualcomm SMMU refactoring and generic "qcom,smmu-500" addition commit a8acc11643082a706de86a19f1f824712d971984 Author: ZhangPeng Date: Tue Nov 22 07:58:53 2022 +0000 pinctrl: k210: call of_node_put() Since for_each_available_child_of_node() will increase the refcount of node, we need to call of_node_put() manually when breaking out of the iteration. Fixes: d4c34d09ab03 ("pinctrl: Add RISC-V Canaan Kendryte K210 FPIOA driver") Signed-off-by: ZhangPeng Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20221122075853.2496680-1-zhangpeng362@huawei.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-k210.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ac8a616c32e12f01878d54f2e7077720dc3dc305 Author: Geert Uytterhoeven Date: Mon Nov 21 16:50:58 2022 +0100 pinctrl: starfive: Use existing variable gpio Use the existing variable "gpio", instead of obtaining the hwirq number again. Signed-off-by: Geert Uytterhoeven Reviewed-by: Emil Renner Berthing Link: https://lore.kernel.org/r/3b6b8597792a393d0f21b8489dd933663dfd2b90.1669045778.git.geert+renesas@glider.be Signed-off-by: Linus Walleij drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c8b2eb7a38abc2f7c5f8fe40fd7fbf149a836585 Author: Neil Armstrong Date: Mon Nov 21 15:11:57 2022 +0100 dt-bindings: pinctrl: semtech,sx150xq: fix match patterns for 16 GPIOs matching The current pattern for SX1503 and SX1509Q with 16 GPIOs only matches "gpio0", "gpio1", and "gpio5" instead of "gpio0" to "gpio15" included. Fix these patterns to match the whole 16 GPIO line names. Fixes: 29c10bcec50a ("dt-bindings: pinctrl: convert semtech,sx150xq bindings to dt-schema") Reported-by: Sander Vanheule Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20221121-sx150xq_bindings_fixup-v1-0-e754f183b611@linaro.org Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 894799e1f4969822d7039628897e102835677140 Author: Christoph Niedermaier Date: Thu Nov 17 11:51:31 2022 +0100 MAINTAINERS: Add DHCOR to the DH electronic i.MX6 board support Add DHCOR to the DH electronic i.MX6 board support to cover the DHCOR i.MX6ULL SoM. It is a solderable SoM. Signed-off-by: Christoph Niedermaier Acked-by: Shawn Guo Signed-off-by: Arnd Bergmann MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9b51d072da1d27e1193e84708201c48e385ad912 Author: Xiongfeng Wang Date: Thu Nov 17 21:15:46 2022 +0800 RDMA/hfi: Decrease PCI device reference count in error path pci_get_device() will increase the reference count for the returned pci_dev, and also decrease the reference count for the input parameter *from* if it is not NULL. If we break out the loop in node_affinity_init() with 'dev' not NULL, we need to call pci_dev_put() to decrease the reference count. Add missing pci_dev_put() in error path. Fixes: c513de490f80 ("IB/hfi1: Invalid NUMA node information can cause a divide by zero") Signed-off-by: Xiongfeng Wang Link: https://lore.kernel.org/r/20221117131546.113280-1-wangxiongfeng2@huawei.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/affinity.c | 2 ++ 1 file changed, 2 insertions(+) commit 9916bc8c29c5172978e960a352ff596678c1910e Author: Geert Uytterhoeven Date: Mon Nov 21 17:11:09 2022 +0100 ARM: dts: am335x: Fix TDA998x ports addressing Fix addressing in the NXP TDA998x HDMI transmitters' subnodes: - Add missing #{address,size}-cells properties to ports capsule, - Add missing reg properties to port child nodes, - Drop bogus unit addresses from endpoint grandchildren nodes. Signed-off-by: Geert Uytterhoeven Message-Id: Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-boneblack-hdmi.dtsi | 7 ++++++- arch/arm/boot/dts/am335x-myirtech-myd.dts | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit 1799cd8540b67b88514c82f5fae1c75b986bcbd8 Author: Sudip Mukherjee Date: Tue Sep 20 19:48:08 2022 +0100 mtd: spi-nor: add SFDP fixups for Quad Page Program SFDP table of some flash chips do not advertise support of Quad Input Page Program even though it has support. Use flags and add hardware cap for these chips. Signed-off-by: Sudip Mukherjee [tudor.ambarus@microchip.com: move pp setting in spi_nor_init_default_params] Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20220920184808.44876-2-sudip.mukherjee@sifive.com drivers/mtd/spi-nor/core.c | 6 ++++++ drivers/mtd/spi-nor/core.h | 2 ++ drivers/mtd/spi-nor/issi.c | 1 + 3 files changed, 9 insertions(+) commit a30f53d8bc0f9b55b4e8eea0e17b68cfd1f07f34 Author: Sudip Mukherjee Date: Tue Sep 20 19:48:07 2022 +0100 mtd: spi-nor: issi: is25wp256: Init flash based on SFDP The datasheet of is25wp256 says it supports SFDP. Get rid of the static initialization of the flash parameters and init them when parsing SFDP. Testing showed the flash using SPINOR_OP_READ_1_1_4_4B 0x6c, SPINOR_OP_PP_4B 0x12 and SPINOR_OP_BE_4K_4B 0x21 before enabling SFDP. After this patch, it parses the SFDP information and still uses the same opcodes. Set sector_size and n_sectors to zero as they will be discovered when parsing SFDP. Signed-off-by: Sudip Mukherjee [tudor.ambarus@microchip.com: set sector_size and n_sectors to zero] Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20220920184808.44876-1-sudip.mukherjee@sifive.com drivers/mtd/spi-nor/issi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 696450c05181559a35d4d5bee55c465b1ac6fe2e Author: Florian Fainelli Date: Fri Nov 18 13:37:54 2022 -0800 net: bcmgenet: Clear RGMII_LINK upon link down Clear the RGMII_LINK bit upon detecting link down to be consistent with setting the bit upon link up. We also move the clearing of the out-of-band disable to the runtime initialization rather than for each link up/down transition. Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20221118213754.1383364-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/genet/bcmmii.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 4e9a61394dc47d651690f4f87398ac5944e02678 Author: Dan Carpenter Date: Fri Nov 18 18:12:52 2022 +0300 net: microchip: sparx5: fix uninitialized variables Smatch complains that "err" can be uninitialized on these paths. Also it's just nicer to "return 0;" instead of "return err;" Fixes: 3a344f99bb55 ("net: microchip: sparx5: Add support for TC flower ARP dissector") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Y3eg9Ml/LmLR3L3C@kili Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 32634819ad37290b5d5a84bf8b71ef5e972c4a20 Author: Eric Dumazet Date: Fri Nov 18 04:38:43 2022 +0000 net: fix __sock_gen_cookie() I was mistaken how atomic64_try_cmpxchg(&sk_cookie, &res, new) is working. I was assuming @res would contain the final sk_cookie value, regardless of the success of our cmpxchg() We could do something like: if (atomic64_try_cmpxchg(&sk_cookie, &res, new) res = new; But we can avoid a conditional and read sk_cookie again. atomic64_cmpxchg(&sk_cookie, res, new); res = atomic64_read(&sk_cookie); Reported-by: coverity-bot Addresses-Coverity-ID: 1527347 ("Error handling issues") Fixes: 4ebf802cf1c6 ("net: __sock_gen_cookie() cleanup") Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20221118043843.3703186-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/core/sock_diag.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 242eb7b0a0a27719a674675562f7db1f33e8c885 Merge: fc58764bbf60 4bb9ca7ee074 Author: Dave Airlie Date: Tue Nov 22 13:51:02 2022 +1000 Merge tag 'drm-intel-gt-next-2022-11-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Core Changes: - Backmerge of drm-next Driver Changes: - Restore probe_range behaviour for userptr (Matt A) - Fix use-after-free on lmem_userfault_list (Matt A) - Never purge busy TTM objects (Matt A) - Meteorlake enabling (Daniele, Badal, Daniele, Stuart, Aravind, Alan) - Demote GuC kernel contexts to normal priority (John) - Use RC6 residency types as arguments to residency functions (Ashutosh, Rodrigo, Jani) - Convert some legacy DRM debugging macros to new ones (Tvrtko) - Don't deadlock GuC busyness stats vs reset (John) - Remove excessive line feeds in GuC state dumps (John) - Use i915_sg_dma_sizes() for all backends (Matt A) - Prefer REG_FIELD_GET in intel_rps_get_cagf (Ashutosh, Rodrigo) - Use GEN12_RPSTAT register for GT freq (Don, Badal, Ashutosh) - Remove unwanted TTM ghost obj check (Matt A) - Update workaround documentation (Lucas) - Coding style and static checker fixes and cleanups (Jani, Umesh, Tvrtko, Lucas, Andrzej) - Selftest improvements (Chris, Daniele, Riana, Andrzej) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/Y3dMd9HDpfDehhWm@jlahtine-mobl.ger.corp.intel.com commit fc58764bbf602b65a6f63c53e5fd6feae76c510c Merge: 819683a1fc2f aec3bb3a01de Author: Dave Airlie Date: Tue Nov 22 13:41:11 2022 +1000 Merge tag 'amd-drm-next-6.2-2022-11-18' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.2-2022-11-18: amdgpu: - SR-IOV fixes - Clean up DC checks - DCN 3.2.x fixes - DCN 3.1.x fixes - Don't enable degamma on asics which don't support it - IP discovery fixes - BACO fixes - Fix vbios allocation handling when vkms is enabled - Drop buggy tdr advanced mode GPU reset handling - Fix the build when DCN is not set in kconfig - MST DSC fixes - Userptr fixes - FRU and RAS EEPROM fixes - VCN 4.x RAS support - Aldrebaran CU occupancy reporting fix - PSP ring cleanup amdkfd: - Memory limit fix - Enable cooperative launch on gfx 10.3 amd-drm-next-6.2-2022-11-11: amdgpu: - SMU 13.x updates - GPUVM TLB race fix - DCN 3.1.4 updates - DCN 3.2.x updates - PSR fixes - Kerneldoc fix - Vega10 fan fix - GPUVM locking fixes in error pathes - BACO fix for Beige Goby - EEPROM I2C address cleanup - GFXOFF fix - Fix DC memory leak in error pathes - Flexible array updates - Mtype fix for GPUVM PTEs - Move Kconfig into amdgpu directory - SR-IOV updates - Fix possible memory leak in CS IOCTL error path amdkfd: - Fix possible memory overrun - CRIU fixes radeon: - ACPI ref count fix - HDA audio notifier support - Move Kconfig into radeon directory UAPI: - Add new GEM_CREATE flags to help to transition more KFD functionality to the DRM UAPI. These are used internally in the driver to align location based memory coherency requirements from memory allocated in the KFD with how we manage GPUVM PTEs. They are currently blocked in the GEM_CREATE IOCTL as we don't have a user right now. They are just used internally in the kernel driver for now for existing KFD memory allocations. So a change to the UAPI header, but no functional change in the UAPI. From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20221118170807.6505-1-alexander.deucher@amd.com Signed-off-by: Dave Airlie commit 819683a1fc2f7e64017d50caf539e7bafcb37b81 Merge: 4302423c8823 a3b4c2f9b039 Author: Dave Airlie Date: Tue Nov 22 12:29:47 2022 +1000 Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next please pull the following etnaviv changes for the next merge window. Mostly some small workarounds to get new hardware support going. But also more fixes to the softpin MMU handling and a nice addition from Christian to make the kernel logs on hang detection more useful. Signed-off-by: Dave Airlie From: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/adcb1b3dec89a18d6c3c4ee6e179b9b2c9f25046.camel@pengutronix.de commit 88cfe56ea64a4cc1038c18b9dd416d817d1c8ae5 Author: Jonathan Neuschäfer Date: Sat Oct 8 15:08:22 2022 +0200 ARM: dts: nuvoton: wpcm450: Add missing aliases for serial0/serial1 Without these, /chosen/stdout-path = "serial0:115200n8" does not work. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221008130822.1227104-1-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley arch/arm/boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts | 5 +++++ 1 file changed, 5 insertions(+) commit c3a636be6b8d65aadd5d1ac3aed51c7704206a85 Author: Jonathan Neuschäfer Date: Thu Jun 9 23:48:29 2022 +0200 ARM: dts: wpcm450: Enable watchdog by default The watchdog timer is always usable, regardless of board design, so there is no point in marking the watchdog device as disabled-by-default in nuvoton-wpcm450.dtsi. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20220609214830.127003-1-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley arch/arm/boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts | 4 ---- arch/arm/boot/dts/nuvoton-wpcm450.dtsi | 1 - 2 files changed, 5 deletions(-) commit 362e8be2ec04a6aa04db7d2984b8558815a6b956 Author: Jonathan Neuschäfer Date: Fri Nov 4 17:18:48 2022 +0100 ARM: dts: wpcm450: Add clock controller node This declares the clock controller and the necessary 48 Mhz reference clock in the WPCM450 device. Switching devices over to the clock controller is intentionally done in a separate patch to give time for the clock controller driver to land. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221104161850.2889894-5-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley arch/arm/boot/dts/nuvoton-wpcm450.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 4b90b148e0e2cc3b5df1e0dd7bb8008463c7eeac Author: Jonathan Neuschäfer Date: Sat Nov 5 19:59:09 2022 +0100 ARM: dts: wpcm450-supermicro-x9sci-ln4f: Add SPI flash Add the BMC firmware flash to the devicetree, so that it can be accessed from Linux. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221105185911.1547847-7-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley arch/arm/boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 38abcb0d68767ac64e5650cbf7daafb428002590 Author: Jonathan Neuschäfer Date: Sat Nov 5 19:59:08 2022 +0100 ARM: dts: wpcm450: Add FIU SPI controller node Add the SPI controller (FIU, Flash Interface Unit) to the WPCM450 devicetree, according to the newly defined binding, as well as the SHM (shared memory interface) syscon. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221105185911.1547847-6-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley arch/arm/boot/dts/nuvoton-wpcm450.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ff6d979454ee21bf2d21040c8f2996b8f66726f2 Author: Biju Das Date: Mon Nov 21 18:11:21 2022 +0000 drm: rcar-du: Fix Kconfig dependency between DRM and RZG2L_MIPI_DSI When CONFIG_DRM=m and CONFIG_DRM_RZG2L_MIPI_DSI=y, it results in a build failure. This patch fixes the build issue by adding dependency to DRM. Fixes: 7a043f978ed1 ("drm: rcar-du: Add RZ/G2L DSI driver") Reported-by: kernel test robot Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4302423c8823d2a1a778792f0f2205bd252a78e9 Merge: 4e291f2f5853 35c3a2d02f0d Author: Dave Airlie Date: Tue Nov 22 09:21:10 2022 +1000 Merge tag 'drm-misc-next-2022-11-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 6.2: UAPI Changes: Cross-subsystem Changes: - fbdev: Add support for the nomodeset kernel parameter Core Changes: - client: Add kunit tests for drm_connector_pick_cmdline_mode() - dma-buf: Move dma_buf_mmap_internal() to new locking specification - edid: Dump EDID on drm_edid_get_panel_id() failure, Stop using a temporary device to load the EDID through the firmware mechanism - fb-helper: Remove damage worker - gem-vram: Fix deadlock in drm_gem_vram_vmap() - modes: Named mode parsing improvements - tests: Add Kunit helpers to create a DRM device Driver Changes: - hisilicon: convert to drm_mode_init() - malidp: Use drm-managed resources - msm: convert to drm_mode_init() and drm_mode_copy() - mtk: convert to drm_mode_init() - nouveau: Support backlight control for nva3 - rockchip: convert to drm_mode_copy() - sti: convert to drm_mode_copy() - v3d: Switch to drm-managed resources - vc4: Fix potential NULL pointer dereference - panels: - New panel: NewVision NV3051D Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221117083628.mzij5nrbdzokek7c@houat commit 2d9cd957d40c3ac491b358e7cff0515bb07a3a9c Author: Zeng Heng Date: Mon Nov 21 10:00:29 2022 +0800 PCI: Check for alloc failure in pci_request_irq() When kvasprintf() fails to allocate memory, it returns a NULL pointer. Return error from pci_request_irq() so we don't dereference it. [bhelgaas: commit log] Fixes: 704e8953d3e9 ("PCI/irq: Add pci_request_irq() and pci_free_irq() helpers") Link: https://lore.kernel.org/r/20221121020029.3759444-1-zengheng4@huawei.com Signed-off-by: Zeng Heng Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/irq.c | 2 ++ 1 file changed, 2 insertions(+) commit ec689c152985deb4ee17f5203f7e243221de647c Author: Giulio Benetti Date: Thu Nov 17 19:10:12 2022 +0100 clk: imx: imxrt1050: add IMXRT1050_CLK_LCDIF_PIX clock gate Add IMXRT1050_CLK_LCDIF_PIX clock gate. Cc: Jesse Taube Signed-off-by: Giulio Benetti Acked-by: Jesse Taube Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221117181014.851505-2-giulio.benetti@benettiengineering.com drivers/clk/imx/clk-imxrt1050.c | 1 + 1 file changed, 1 insertion(+) commit 3095c02f95e537c553e0b30948c2f6c7cbed87ee Author: Giulio Benetti Date: Thu Nov 17 19:10:11 2022 +0100 clk: imx: imxrt1050: fix IMXRT1050_CLK_LCDIF_APB offsets Fix IMXRT1050_CLK_LCDIF_APB offsets. Fixes: 7154b046d8f3 ("clk: imx: Add initial support for i.MXRT1050 clock driver") Cc: Jesse Taube Signed-off-by: Giulio Benetti Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221117181014.851505-1-giulio.benetti@benettiengineering.com drivers/clk/imx/clk-imxrt1050.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1f12a685d459c3fc898b12d0b052acfab2e3018 Author: Abel Vesa Date: Mon Nov 7 16:50:07 2022 +0800 clk: imx8mp: Add audio shared gate According to the RM, the CCGR101 is shared for the following root clocks: - AUDIO_AHB_CLK_ROOT - AUDIO_AXI_CLK_ROOT - SAI1_CLK_ROOT - SAI2_CLK_ROOT - SAI3_CLK_ROOT - SAI5_CLK_ROOT - SAI6_CLK_ROOT - SAI7_CLK_ROOT - PDM_CLK_ROOT IMX8MP_CLK_AUDIO_ROOT is same as AUDIO_AHB_CLK_ROOT which can avoid break any users. Signed-off-by: Abel Vesa Signed-off-by: Shengjiu Wang Reviewed-by: Peng Fan Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/1667811007-19222-3-git-send-email-shengjiu.wang@nxp.com drivers/clk/imx/clk-imx8mp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 36759c4fe217263a4688aabf384302afbe1004fa Author: Abel Vesa Date: Mon Nov 7 16:50:06 2022 +0800 dt-bindings: clock: imx8mp: Add ids for the audio shared gate All these IDs are for one single HW gate (CCGR101) that is shared between these root clocks. Signed-off-by: Abel Vesa Signed-off-by: Shengjiu Wang Reviewed-by: Peng Fan Acked-by: Krzysztof Kozlowski Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/1667811007-19222-2-git-send-email-shengjiu.wang@nxp.com include/dt-bindings/clock/imx8mp-clock.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 6a11d3a00dc1f152e8cdf97171128c4186695a9d Author: Marek Vasut Date: Mon Oct 31 21:48:38 2022 +0100 clk: imx: pll14xx: Add 320 MHz and 640 MHz entries for PLL146x The PLL146x is used to implement SYS_PLL3 on i.MX8MP and can be used to drive UARTn_ROOT clock. By setting the PLL3 to 320 MHz or 640 MHz, the PLL3 output can be divided down to supply UARTn_ROOT clock with precise 64 MHz, which divided down further by 16x oversampling factor used by the i.MX UART core yields 4 Mbdps baud base for the UART IP. This is useful e.g. for BCM bluetooth chips, which can operate up to 4 Mbdps. Add 320 MHz and 640 MHz entries so the PLL can be configured accordingly. Signed-off-by: Marek Vasut Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221031204838.195292-1-marex@denx.de drivers/clk/imx/clk-pll14xx.c | 2 ++ 1 file changed, 2 insertions(+) commit f8aa5f6dc1cb71d472d023f87d05f53b1672983f Author: Jacky Bai Date: Fri Oct 28 17:52:11 2022 +0800 clk: imx93: keep sys ctr clock always on Keep sys ctr clock always on to make sure its register can be accessed for cpuidle. Reviewed-by: Peng Fan Signed-off-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221028095211.2598312-7-peng.fan@oss.nxp.com drivers/clk/imx/clk-imx93.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c9dcb4c1b6d53bfe74fd863957a1cbb57aea4909 Author: Jacky Bai Date: Fri Oct 28 17:52:10 2022 +0800 clk: imx: keep hsio bus clock always on During Linux System suspend/resume stress test after System Sleep enabled, system will stuck sometimes. It is because NICMIX is powered down, which HSIOMIX(always on) is not powered down. When NICMIX powering down, HSIOMIX will get a hardware handshake, without HSIO ROOT clk, the handshake will lose. Then after NICMIX power on when system resume, the access to HSIOMIX through NICMIX would be broken. So keep HSIO ROOT always on. Signed-off-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221028095211.2598312-6-peng.fan@oss.nxp.com drivers/clk/imx/clk-imx93.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0ce096db719ebaf46d4faf93e1ed1341c1853919 Merge: 2d08a893b87c eb7081409f94 Author: Ingo Molnar Date: Mon Nov 21 22:54:36 2022 +0100 Merge tag 'v6.1-rc6' into x86/core, to resolve conflicts Resolve conflicts between these commits in arch/x86/kernel/asm-offsets.c: # upstream: debc5a1ec0d1 ("KVM: x86: use a separate asm-offsets.c file") # retbleed work in x86/core: 5d8213864ade ("x86/retbleed: Add SKL return thunk") ... and these commits in include/linux/bpf.h: # upstram: 18acb7fac22f ("bpf: Revert ("Fix dispatcher patchable function entry to 5 bytes nop")") # x86/core commits: 931ab63664f0 ("x86/ibt: Implement FineIBT") bea75b33895f ("x86/Kconfig: Introduce function padding") The latter two modify BPF_DISPATCHER_ATTRIBUTES(), which was removed upstream. Conflicts: arch/x86/kernel/asm-offsets.c include/linux/bpf.h Signed-off-by: Ingo Molnar commit fae14a1cb8dddb83bb923093aade3470a872f048 Author: Robert Nelson Date: Fri Nov 18 10:31:39 2022 -0600 arm64: dts: ti: Add k3-j721e-beagleboneai64 BeagleBoard.org BeagleBone AI-64 is an open source hardware single board computer based on the Texas Instruments TDA4VM SoC featuring dual-core 2.0GHz Arm Cortex-A72 processor, C7x+MMA and 2 C66x floating-point VLIW DSPs, 3x dual Arm Cortex-R5 co-processors, 2x 6-core Programmable Real-Time Unit and Industrial Communication SubSystem, PowerVR Rogue 8XE GE8430 3D GPU. The board features 4GB DDR4, USB3.0 Type-C, 2x USB SS Type-A, miniDisplayPort, 2x 4-lane CSI, DSI, 16GB eMMC flash, 1G Ethernet, M.2 E-key for WiFi/BT, and BeagleBone expansion headers. This board family can be indentified by the BBONEAI-64-B0 in the at24 eeprom: [aa 55 33 ee 01 37 00 10 2e 00 42 42 4f 4e 45 41 |.U3..7....BBONEA|] [49 2d 36 34 2d 42 30 2d 00 00 42 30 30 30 37 38 |I-64-B0-..B00078|] https://beagleboard.org/ai-64 https://git.beagleboard.org/beagleboard/beaglebone-ai-64 Signed-off-by: Robert Nelson Reviewed-by: Andrew Davis CC: Nishanth Menon CC: Vignesh Raghavendra CC: Tero Kristo CC: Jason Kridner CC: Drew Fustini Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221118163139.3592054-2-robertcnelson@gmail.com arch/arm64/boot/dts/ti/Makefile | 1 + arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts | 1055 ++++++++++++++++++++ 2 files changed, 1056 insertions(+) commit dd3553793a759e4f7f21c1aaffd5cb2de7a0068d Author: Björn Töpel Date: Fri Nov 18 18:15:56 2022 +0100 Documentation: riscv: Document the sv57 VM layout RISC-V has been supporting the "sv57" address translation mode for a while, but is has not been added to the VM layout documentation. Let us fix that. Signed-off-by: Björn Töpel Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20221118171556.1612190-1-bjorn@kernel.org Signed-off-by: Jonathan Corbet Documentation/riscv/vm-layout.rst | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 8b7e58409b1813c58eea542d9f3b8db35b4ac1f7 Author: Andreas Bergmeier Date: Fri Nov 11 20:45:26 2022 +0100 HID: logitech HID++: Send SwID in GetProtocolVersion According to docs a SwID should be sent for GetProtocolVersion. > 0x10.DeviceIndex.0x00.0x1n where n is SwID. Signed-off-by: Andreas Bergmeier Reviewed-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f13039ceec58a89f1457db5270a38b7ad4a9f07b Author: Randy Dunlap Date: Fri Nov 18 15:14:22 2022 -0800 Documentation: USB: correct possessive "its" usage Correct uses of "it's" to possessive "its" or "its" to "it's" as needed. Correct associated grammar in one location. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20221118231422.14076-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet Documentation/usb/CREDITS | 6 +++--- Documentation/usb/functionfs.rst | 2 +- Documentation/usb/gadget_multi.rst | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit a898db21cc8ff4205784253355d330517983bbbb Author: Liam Beguin Date: Fri Nov 18 13:23:09 2022 -0500 math64: fix kernel-doc return value warnings Fix the following kernel-doc warnings by adding a description for return values of div_[us]64. math64.h:126: warning: No description found for return value of 'div_u64' math64.h:139: warning: No description found for return value of 'div_s64' Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20221118182309.3824530-3-liambeguin@gmail.com Signed-off-by: Jonathan Corbet include/linux/math64.h | 4 ++++ 1 file changed, 4 insertions(+) commit 090f13cac84d618d8d391e72646bea462aae9486 Author: Liam Beguin Date: Fri Nov 18 13:23:08 2022 -0500 math64: add kernel-doc for DIV64_U64_ROUND_UP Add kernel-doc for DIV64_U64_ROUND_UP so that it appears in the documentation. Signed-off-by: Liam Beguin Acked-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20221118182309.3824530-2-liambeguin@gmail.com Signed-off-by: Jonathan Corbet include/linux/math64.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d28a1de5d1128d6caef15fdc04d3f6484dc7264b Author: Liam Beguin Date: Fri Nov 18 13:23:07 2022 -0500 math64: favor kernel-doc from header files Fix the kernel-doc markings for div64 functions to point to the header file instead of the lib/ directory. This avoids having implementation specific comments in generic documentation. Furthermore, given that some kernel-doc comments are identical, drop them from lib/math64 and only keep there comments that add implementation details. Signed-off-by: Liam Beguin Acked-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20221118182309.3824530-1-liambeguin@gmail.com Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 3 --- include/linux/math64.h | 12 ++++++------ lib/math/div64.c | 15 ++------------- 3 files changed, 8 insertions(+), 22 deletions(-) commit 163a7fbff7a78c7c055e6c0ad26124ae551fe313 Author: Marcus Folkesson Date: Thu Nov 17 13:13:14 2022 +0100 HID: hid-elan: use default remove for hid device hid_device_remove() will call hid_hw_stop() as default .remove function if no function is specified. Signed-off-by: Marcus Folkesson Signed-off-by: Jiri Kosina drivers/hid/hid-elan.c | 6 ------ 1 file changed, 6 deletions(-) commit 989f7cc94f1174269282a4a46bb735c7f11527de Author: Marcus Folkesson Date: Thu Nov 17 13:13:22 2022 +0100 HID: hid-alps: use default remove for hid device hid_device_remove() will call hid_hw_stop() as default .remove function if no function is specified. Signed-off-by: Marcus Folkesson Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 6 ------ 1 file changed, 6 deletions(-) commit 1f050e904dd6f2955eecbd22031d912ccb2e7683 Author: Maxim Cournoyer Date: Wed Nov 16 14:02:09 2022 -0500 doc: add texinfodocs and infodocs targets Sphinx supports generating Texinfo sources and Info documentation, which can be navigated easily and is convenient to search (via the indexed nodes or anchors, for example). Signed-off-by: Maxim Cournoyer Link: https://lore.kernel.org/r/20221116190210.28407-2-maxim.cournoyer@gmail.com Signed-off-by: Jonathan Corbet Documentation/Makefile | 11 +++++++++++ Documentation/userspace-api/media/Makefile | 3 ++- Makefile | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) commit 9d013910df22de91333a0acc81d1dbb115bd76f6 Author: Marcus Folkesson Date: Thu Nov 17 13:13:26 2022 +0100 HID: hid-sensor-custom: set fixed size for custom attributes This is no bugfix (so no Fixes: tag is necessary) as it is taken care of in hid_sensor_custom_add_attributes(). The motivation for this patch is that: hid_sensor_custom_field.attr_name and hid_sensor_custom_field.attrs has the size of HID_CUSTOM_TOTAL_ATTRS and used in same context. We compare against HID_CUSTOM_TOTAL_ATTRS when looping through hid_custom_attrs. We will silent the smatch error: hid_sensor_custom_add_attributes() error: buffer overflow 'hid_custom_attrs' 8 <= 10 Signed-off-by: Marcus Folkesson Acked-by: Jonathan Cameron Signed-off-by: Jiri Kosina drivers/hid/hid-sensor-custom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84de206f63353ca46c5eab887b9d7b5233d856de Author: Yang Yingliang Date: Wed Nov 2 10:44:30 2022 +0800 Documentation: devres: add missing PWM helper Add missing devm_pwmchip_add() to devres.rst. It's introduced by commit bcda91bf86c1 ("pwm: Add a device-managed function to add PWM chips"). Fixes: bcda91bf86c1 ("pwm: Add a device-managed function to add PWM chips") Cc: Thierry Reding Cc: "Uwe Kleine-König" Cc: Jonathan Corbet Signed-off-by: Yang Yingliang Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221102024430.1444714-1-yangyingliang@huawei.com Signed-off-by: Jonathan Corbet Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) commit 5e5ff73c2e5863f93fc5fd78d178cd8f2af12464 Author: Sai Prakash Ranjan Date: Mon Oct 17 20:04:50 2022 +0530 asm-generic/io: Add _RET_IP_ to MMIO trace for more accurate debug info Due to compiler optimizations like inlining, there are cases where MMIO traces using _THIS_IP_ for caller information might not be sufficient to provide accurate debug traces. 1) With optimizations (Seen with GCC): In this case, _THIS_IP_ works fine and prints the caller information since it will be inlined into the caller and we get the debug traces on who made the MMIO access, for ex: rwmmio_read: qcom_smmu_tlb_sync+0xe0/0x1b0 width=32 addr=0xffff8000087447f4 rwmmio_post_read: qcom_smmu_tlb_sync+0xe0/0x1b0 width=32 val=0x0 addr=0xffff8000087447f4 2) Without optimizations (Seen with Clang): _THIS_IP_ will not be sufficient in this case as it will print only the MMIO accessors itself which is of not much use since it is not inlined as below for example: rwmmio_read: readl+0x4/0x80 width=32 addr=0xffff8000087447f4 rwmmio_post_read: readl+0x48/0x80 width=32 val=0x4 addr=0xffff8000087447f4 So in order to handle this second case as well irrespective of the compiler optimizations, add _RET_IP_ to MMIO trace to make it provide more accurate debug information in all these scenarios. Before: rwmmio_read: readl+0x4/0x80 width=32 addr=0xffff8000087447f4 rwmmio_post_read: readl+0x48/0x80 width=32 val=0x4 addr=0xffff8000087447f4 After: rwmmio_read: qcom_smmu_tlb_sync+0xe0/0x1b0 -> readl+0x4/0x80 width=32 addr=0xffff8000087447f4 rwmmio_post_read: qcom_smmu_tlb_sync+0xe0/0x1b0 -> readl+0x4/0x80 width=32 val=0x0 addr=0xffff8000087447f4 Fixes: 210031971cdd ("asm-generic/io: Add logging support for MMIO accessors") Signed-off-by: Sai Prakash Ranjan Signed-off-by: Arnd Bergmann include/asm-generic/io.h | 80 +++++++++++++++++++++---------------------- include/trace/events/rwmmio.h | 43 ++++++++++++++--------- lib/trace_readwrite.c | 16 ++++----- 3 files changed, 75 insertions(+), 64 deletions(-) commit 68f8e3d4b916531ea3bb8b83e35138cf78f2fce5 Author: Stanislav Fomichev Date: Mon Nov 21 10:03:40 2022 -0800 selftests/bpf: Make sure zero-len skbs aren't redirectable LWT_XMIT to test L3 case, TC to test L2 case. v2: - s/veth_ifindex/ipip_ifindex/ in two places (Martin) - add comment about which condition triggers the rejection (Martin) Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20221121180340.1983627-2-sdf@google.com Signed-off-by: Martin KaFai Lau tools/testing/selftests/bpf/prog_tests/empty_skb.c | 146 +++++++++++++++++++++ tools/testing/selftests/bpf/progs/empty_skb.c | 37 ++++++ 2 files changed, 183 insertions(+) commit 114039b342014680911c35bd6b72624180fd669a Author: Stanislav Fomichev Date: Mon Nov 21 10:03:39 2022 -0800 bpf: Move skb->len == 0 checks into __bpf_redirect To avoid potentially breaking existing users. Both mac/no-mac cases have to be amended; mac_header >= network_header is not enough (verified with a new test, see next patch). Fixes: fd1894224407 ("bpf: Don't redirect packets with invalid pkt_len") Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20221121180340.1983627-1-sdf@google.com Signed-off-by: Martin KaFai Lau net/bpf/test_run.c | 3 --- net/core/filter.c | 11 ++++++----- 2 files changed, 6 insertions(+), 8 deletions(-) commit 4ec9a8b9b00b289e7d3a81533bbe710f79edb58c Author: Peng Fan Date: Fri Oct 28 17:52:09 2022 +0800 clk: imx93: drop tpm1/3, lpit1/2 clk Per Reference Mannual System Clocks Table, LPIT1 and TPM1 sources from bus_aon_root LPIT2 and TPM3 sources from bus_wakeup_root So update driver to reflect that. Reviewed-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221028095211.2598312-5-peng.fan@oss.nxp.com drivers/clk/imx/clk-imx93.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 352a308af7c0c48070a8aeefd435a43d40bbbc57 Author: Peng Fan Date: Fri Oct 28 17:52:08 2022 +0800 dt-bindings: clock: imx93: drop TPM1/3 LPIT1/2 entry Per updated Reference Mannual, the TPM[1,3] LPIT[1,2] root clock entries are reserved, it is because writing the CCM registers does nothing because the TPM[1,3] and LPIT[1,2] IPs source from bus clk, not from the TPM[1,3] LPIT[1,2] entries. And because there is no SW entity is using the entries since adding them, let's drop them. Reviewed-by: Jacky Bai Signed-off-by: Peng Fan Acked-by: Krzysztof Kozlowski Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221028095211.2598312-4-peng.fan@oss.nxp.com include/dt-bindings/clock/imx93-clock.h | 4 ---- 1 file changed, 4 deletions(-) commit 4be5d91b9433f1dc76de485e240ca6aaa2d19f65 Author: Peng Fan Date: Fri Oct 28 17:52:07 2022 +0800 clk: imx93: correct enet clock Per update Reference Mannual, correct the enet clock parent to wakeup_axi_root. Fixes: 24defbe194b6 ("clk: imx: add i.MX93 clk") Reviewed-by: Ye Li Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221028095211.2598312-3-peng.fan@oss.nxp.com drivers/clk/imx/clk-imx93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bda7b7f396f94d8df89ecacc88f2826908e8762c Author: Peng Fan Date: Fri Oct 28 17:52:06 2022 +0800 clk: imx93: unmap anatop base in error handling path The anatop base is not unmapped during error handling path, fix it. Fixes: 24defbe194b6 ("clk: imx: add i.MX93 clk") Reported-by: Dan Carpenter Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221028095211.2598312-2-peng.fan@oss.nxp.com drivers/clk/imx/clk-imx93.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 4428673bc89b547a35019f0d3bd8821beacf86ef Merge: f87f6e5b4539 3811a7283a0a Author: Will Deacon Date: Mon Nov 21 19:21:53 2022 +0000 Merge branch 'for-joerg/arm-smmu/bindings' into for-joerg/arm-smmu/updates SMMUv2 DT binding additions, including a generic Qualcomm compatible string ("qcom,smmu-500") which will hopefully spell the end for pointless SoC-specific additions in future. * for-joerg/arm-smmu/bindings: iommu/arm-smmu-qcom: Add SM6350 SMMUv2 dt-bindings: arm-smmu: Add SM6350 GPU SMMUv2 iommu/arm-smmu-qcom: Add generic qcom,smmu-500 match entry iommu/arm-smmu-qcom: Stop using mmu500 reset for v2 MMUs iommu/arm-smmu-qcom: Merge table from arm-smmu-qcom-debug into match data iommu/arm-smmu-qcom: provide separate implementation for SDM845-smmu-500 iommu/arm-smmu-qcom: Move the qcom,adreno-smmu check into qcom_smmu_create iommu/arm-smmu-qcom: Move implementation data into match data dt-bindings: arm-smmu: Add generic qcom,smmu-500 bindings dt-bindings: arm-smmu: add special case for Google Cheza platform dt-bindings: arm-smmu: fix clocks/clock-names schema dt-bindings: arm-smmu: Add missing Qualcomm SMMU compatibles dt-bindings: iommu: arm-smmu: add sdm670 compatible iommu/arm-smmu-qcom: Add SM6115 support dt-bindings: arm-smmu: Add compatible for Qualcomm SM6115 drivers: arm-smmu-impl: Add QDU1000 and QRU1000 iommu implementation dt-bindings: arm-smmu: Add 'compatible' for QDU1000 and QRU1000 commit d7d4332155efe82a3d70ab179dde30cad3b094a4 Author: Sudeep Holla Date: Fri Nov 18 14:00:59 2022 +0000 ACPI: bus: Fix the _OSC capability check for FFH OpRegion As per the ACPI specification(vide section Platform-Wide OSPM Capabilities) the OSPM must set this bit to indicate support for the usage of Functional Fixed Hardware (FFixedHW) Operation Regions rather than the firmware as expected in the code. Update the check accordingly to reflect the requirement as stated in the specification. Reported-by: Jose Marinho Signed-off-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/acpi/bus.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 2a402120a8d413238999a67ebff5b7dca0e5d14c Author: Maurizio Lombardi Date: Wed Nov 16 10:45:35 2022 +0100 IB/isert: use the ISCSI_LOGIN_CURRENT_STAGE macro Use the proper macro to get the current_stage value. Link: https://lore.kernel.org/r/20221116094535.138298-1-mlombard@redhat.com Signed-off-by: Maurizio Lombardi Reviewed-by: Mike Christie Acked-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/isert/ib_isert.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3569788c08235c6f3e9e6ca724b2df44787ff487 Author: Christoph Hellwig Date: Mon Nov 14 05:29:44 2022 +0100 blk-crypto: move internal only declarations to blk-crypto-internal.h blk_crypto_get_keyslot, blk_crypto_put_keyslot, __blk_crypto_evict_key and __blk_crypto_cfg_supported are only used internally by the blk-crypto code, so move the out of blk-crypto-profile.h, which is included by drivers that supply blk-crypto functionality. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20221114042944.1009870-4-hch@lst.de Signed-off-by: Jens Axboe block/blk-crypto-internal.h | 12 ++++++++++++ include/linux/blk-crypto-profile.h | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 6715c98b6cf003f26b1b2f655393134e9d999a05 Author: Christoph Hellwig Date: Mon Nov 14 05:29:43 2022 +0100 blk-crypto: add a blk_crypto_config_supported_natively helper Add a blk_crypto_config_supported_natively helper that wraps __blk_crypto_cfg_supported to retrieve the crypto_profile from the request queue. With this fscrypt can stop including blk-crypto-profile.h and rely on the public consumer interface in blk-crypto.h. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20221114042944.1009870-3-hch@lst.de Signed-off-by: Jens Axboe block/blk-crypto.c | 21 ++++++++++++--------- fs/crypto/inline_crypt.c | 6 ++---- include/linux/blk-crypto.h | 2 ++ 3 files changed, 16 insertions(+), 13 deletions(-) commit fce3caea0f241f5d34855c82c399d5e0e2d91f07 Author: Christoph Hellwig Date: Mon Nov 14 05:29:42 2022 +0100 blk-crypto: don't use struct request_queue for public interfaces Switch all public blk-crypto interfaces to use struct block_device arguments to specify the device they operate on instead of th request_queue, which is a block layer implementation detail. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20221114042944.1009870-2-hch@lst.de Signed-off-by: Jens Axboe Documentation/block/inline-encryption.rst | 12 ++++++------ block/blk-crypto.c | 24 ++++++++++++++---------- drivers/md/dm-table.c | 2 +- fs/crypto/inline_crypt.c | 8 +++----- include/linux/blk-crypto.h | 11 ++++------- 5 files changed, 28 insertions(+), 29 deletions(-) commit fd9678d3beaa5c78dfd878f67bc543f1702cc9d9 Author: Jiucheng Xu Date: Mon Nov 21 10:16:00 2022 +0800 dt-binding: perf: Add Amlogic DDR PMU Add binding documentation for the Amlogic G12 series DDR performance monitor unit. Signed-off-by: Jiucheng Xu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221121021602.3306998-3-jiucheng.xu@amlogic.com Signed-off-by: Will Deacon .../bindings/perf/amlogic,g12-ddr-pmu.yaml | 54 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 55 insertions(+) commit 537216e59f0c126670749f8dc09f5c4f03375234 Author: Jiucheng Xu Date: Mon Nov 21 10:15:59 2022 +0800 docs/perf: Add documentation for the Amlogic G12 DDR PMU Add a user guide to show how to use DDR PMU to monitor DDR bandwidth on Amlogic G12 SoC Signed-off-by: Jiucheng Xu Reviewed-by: Chris Healy Link: https://lore.kernel.org/r/20221121021602.3306998-2-jiucheng.xu@amlogic.com Signed-off-by: Will Deacon Documentation/admin-guide/perf/index.rst | 1 + Documentation/admin-guide/perf/meson-ddr-pmu.rst | 70 ++++++++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 72 insertions(+) commit 2016e2113d35ba06866961a39e9a9c822f2ffabd Author: Jiucheng Xu Date: Mon Nov 21 10:15:58 2022 +0800 perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver Add support for Amlogic Meson G12 Series SOC - DDR bandwidth PMU driver framework and interfaces. The PMU can not only monitor the total DDR bandwidth, but also individual IP module bandwidth. Signed-off-by: Jiucheng Xu Tested-by: Chris Healy Link: https://lore.kernel.org/r/20221121021602.3306998-1-jiucheng.xu@amlogic.com Signed-off-by: Will Deacon MAINTAINERS | 8 + drivers/perf/Kconfig | 2 + drivers/perf/Makefile | 1 + drivers/perf/amlogic/Kconfig | 10 + drivers/perf/amlogic/Makefile | 5 + drivers/perf/amlogic/meson_ddr_pmu_core.c | 562 ++++++++++++++++++++++++++++++ drivers/perf/amlogic/meson_g12_ddr_pmu.c | 394 +++++++++++++++++++++ include/soc/amlogic/meson_ddr_pmu.h | 66 ++++ 8 files changed, 1048 insertions(+) commit 7fd731a8264346bbcaed7d47058533a4de686219 Author: Matthias Brugger Date: Fri Nov 11 09:29:12 2022 +0100 soc: mediatek: Add deprecated compatible to mmsys For backward compatibility we add the deprecated compatible. Signed-off-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221111082912.14557-1-matthias.bgg@kernel.org Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-mmsys.c | 4 ++++ 1 file changed, 4 insertions(+) commit ba136b5ef5877f9ac2a14295f9007074106f5524 Author: Fabien Parent Date: Mon Oct 31 10:33:58 2022 +0100 soc: mediatek: pwrap: add mt8365 SoC support Add PMIC Wrap support for MT8365 SoC. Signed-off-by: Fabien Parent Signed-off-by: Fadwa CHIBY Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221031093401.22916-4-fchiby@baylibre.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 78 ++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit 55924157da8cd24f107c786a162f89a5a066c293 Author: Fabien Parent Date: Mon Oct 31 10:33:57 2022 +0100 soc: mediatek: pwrap: add support for sys & tmr clocks MT8365 requires an extra 2 clocks to be enabled to behave correctly. Add support these 2 clocks, they are made optional since they seem to be present only on MT8365. Signed-off-by: Fabien Parent Signed-off-by: Fadwa CHIBY Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221031093401.22916-3-fchiby@baylibre.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) commit 415c0282f370fa57171bed5a8bc3a6f018a64d18 Author: Fabien Parent Date: Mon Oct 31 10:33:56 2022 +0100 dt-bindings: soc: mediatek: pwrap: add MT8365 SoC bindings Add pwrap binding documentation for Signed-off-by: Fabien Parent Signed-off-by: Fadwa CHIBY Acked-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221031093401.22916-2-fchiby@baylibre.com Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 3 +++ 1 file changed, 3 insertions(+) commit b2b99a7a9b40d5c5dbf1feb8c6baceb281241901 Author: Jason-JH.Lin Date: Tue Sep 27 23:27:01 2022 +0800 soc: mediatek: add mtk-mmsys support for mt8195 vdosys0 1. Add mt8195 driver data with compatible "mediatek-mt8195-vdosys0". 2. Add mt8195 routing table settings of vdosys0. Signed-off-by: Jason-JH.Lin Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220927152704.12018-4-jason-jh.lin@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mt8195-mmsys.h | 370 ++++++++++++++++++++++++++++++++++++ drivers/soc/mediatek/mtk-mmsys.c | 11 ++ 2 files changed, 381 insertions(+) commit 8d8ccdd2e6e3b80bd973e26588edc57f4f4ac727 Author: Jason-JH.Lin Date: Tue Sep 27 23:27:00 2022 +0800 Revert "soc: mediatek: add mtk-mmsys support for mt8195 vdosys0" This reverts commit b804923b7ccb9c9629703364e927b48cd02a9254. Due to the compatible changing of mt8195 from "mediatek,mt8195-mmsys" to "mediatek,mt8195-vdosys0", we have to revert this patch and send a new patch with the new compatible. Signed-off-by: Jason-JH.Lin Link: https://lore.kernel.org/r/20220927152704.12018-3-jason-jh.lin@mediatek.com Signed-off-by: Matthias Brugger drivers/soc/mediatek/mt8195-mmsys.h | 370 ------------------------------------ drivers/soc/mediatek/mtk-mmsys.c | 152 ++------------- drivers/soc/mediatek/mtk-mmsys.h | 6 - 3 files changed, 11 insertions(+), 517 deletions(-) commit b237efd47df7d25b78c306e90b97c5aa0ff4c4fc Author: Jason-JH.Lin Date: Tue Sep 27 23:26:59 2022 +0800 dt-bindings: arm: mediatek: mmsys: change compatible for MT8195 For previous MediaTek SoCs, such as MT8173, there are 2 display HW pipelines binding to 1 mmsys with the same power domain, the same clock driver and the same mediatek-drm driver. For MT8195, VDOSYS0 and VDOSYS1 are 2 display HW pipelines binding to 2 different power domains, different clock drivers and different mediatek-drm drivers. Moreover, Hardware pipeline of VDOSYS0 has these components: COLOR, CCORR, AAL, GAMMA, DITHER. They are related to the PQ (Picture Quality) and they makes VDOSYS0 supports PQ function while they are not including in VDOSYS1. Hardware pipeline of VDOSYS1 has the component ETHDR (HDR related component). It makes VDOSYS1 supports the HDR function while it's not including in VDOSYS0. To summarize0: Only VDOSYS0 can support PQ adjustment. Only VDOSYS1 can support HDR adjustment. Therefore, we need to separate these two different mmsys hardwares to 2 different compatibles for MT8195. Fixes: 81c5a41d10b9 ("dt-bindings: arm: mediatek: mmsys: add mt8195 SoC binding") Signed-off-by: Jason-JH.Lin Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220927152704.12018-2-jason-jh.lin@mediatek.com Signed-off-by: Matthias Brugger .../devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 28b4b0596343d19d140da059eee0e5c2b5328731 Author: Long Li Date: Thu Nov 17 13:02:56 2022 -0800 xfs: fix incorrect i_nlink caused by inode racing The following error occurred during the fsstress test: XFS: Assertion failed: VFS_I(ip)->i_nlink >= 2, file: fs/xfs/xfs_inode.c, line: 2452 The problem was that inode race condition causes incorrect i_nlink to be written to disk, and then it is read into memory. Consider the following call graph, inodes that are marked as both XFS_IFLUSHING and XFS_IRECLAIMABLE, i_nlink will be reset to 1 and then restored to original value in xfs_reinit_inode(). Therefore, the i_nlink of directory on disk may be set to 1. xfsaild xfs_inode_item_push xfs_iflush_cluster xfs_iflush xfs_inode_to_disk xfs_iget xfs_iget_cache_hit xfs_iget_recycle xfs_reinit_inode inode_init_always xfs_reinit_inode() needs to hold the ILOCK_EXCL as it is changing internal inode state and can race with other RCU protected inode lookups. On the read side, xfs_iflush_cluster() grabs the ILOCK_SHARED while under rcu + ip->i_flags_lock, and so xfs_iflush/xfs_inode_to_disk() are protected from racing inode updates (during transactions) by that lock. Fixes: ff7bebeb91f8 ("xfs: refactor the inode recycling code") # goes further back than this Signed-off-by: Long Li Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_icache.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9984fbf55b9bd998b4ff66395cbb118020c1effa Author: Dmitry Torokhov Date: Fri Nov 18 09:02:45 2022 -0800 HID: i2c: let RMI devices decide what constitutes wakeup event HID-RMI is special in the sense that it does not carry HID events directly, but rather uses HID protocol as a wrapper/transport for RMI protocol. Therefore we should not assume that all data coming from the device via interrupt is associated with user activity and report wakeup event indiscriminately, but rather let HID-RMI do that when appropriate. HID-RMI devices tag responses to the commands issued by the host as RMI_READ_DATA_REPORT_ID whereas motion and other input events from the device are tagged as RMI_ATTN_REPORT_ID. Change hid-rmi to report wakeup events when receiving the latter packets. This allows ChromeOS to accurately identify wakeup source and make correct decision on the mode of the resume the system should take ("dark" where the display stays off vs normal one). Fixes: d951ae1ce803 ("HID: i2c-hid: Report wakeup events") Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina drivers/hid/hid-rmi.c | 2 ++ drivers/hid/i2c-hid/i2c-hid-core.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 885e153ed7c1b0ec8bc25651f0644b3cb65ecaf4 Author: Sam Shih Date: Fri Nov 18 20:01:21 2022 +0100 arm64: dts: mt7986: add spi related device nodes This patch adds spi support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221118190126.100895-7-linux@fw-web.de Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 35 ++++++++++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 28 ++++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 35 ++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) commit e63ae3f836e66bf956072a0d6dd09fbe2d45bf7a Author: ye xingchen Date: Thu Nov 17 15:41:06 2022 +0800 remoteproc: core: Use device_match_of_node() Replace the open-code with device_match_of_node(). Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202211171541061366938@zte.com.cn Signed-off-by: Mathieu Poirier drivers/remoteproc/remoteproc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99cce13b82a9366cfdd230ba6ddb48ba30d2741f Author: Frank Wunderlich Date: Fri Nov 18 20:01:16 2022 +0100 arm64: dts: mt7986: move wed_pcie node Move the wed_pcie node to have node aligned by address. Fixes: 00b9903996b3 ("arm64: dts: mediatek: mt7986: add support for Wireless Ethernet Dispatch") Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221118190126.100895-2-linux@fw-web.de Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0e2e12166238e25cb2b907a6e591107d9dc363f9 Author: Sergio Paracuellos Date: Thu Oct 6 06:29:45 2022 +0200 dt-bindings: mips: brcm: add Broadcom SoCs bindings Add the yaml binding for MIPS Broadcom cable/DSL/settop platforms. Acked-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer .../devicetree/bindings/mips/brcm/soc.yaml | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit c8dabef8643bd0b88087c0280ccf555ba8d45087 Author: Sergio Paracuellos Date: Thu Oct 6 06:29:44 2022 +0200 dt-bindings: mips: add CPU bindings for MIPS architecture Add the yaml binding for available CPUs in MIPS architecture. Reviewed-by: Rob Herring Signed-off-by: Sergio Paracuellos Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer .../devicetree/bindings/mips/brcm/brcm,bmips.txt | 8 -- Documentation/devicetree/bindings/mips/cpus.yaml | 115 +++++++++++++++++++++ .../bindings/mips/ingenic/ingenic,cpu.yaml | 69 ------------- 3 files changed, 115 insertions(+), 77 deletions(-) commit f98be3b3216deb69967fae282f55c6597aa501cc Author: Rafał Miłecki Date: Tue Nov 8 09:50:32 2022 +0100 mips: dts: brcm: bcm7435: add "interrupt-names" for NAND controller Second interrupt can be DMA or EDU one. Specify it explicitly using interrupt-names property. This matches documented binding. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer arch/mips/boot/dts/brcm/bcm7435.dtsi | 1 + 1 file changed, 1 insertion(+) commit d3db4b96ab7f212733ee17d246b13075c703ab3f Author: Rafał Miłecki Date: Sun Nov 13 10:09:04 2022 +0100 mips: dts: bcm63268: add TWD block timer BCM63268 TWD contains block with 3 timers. Add binding for it. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer arch/mips/boot/dts/brcm/bcm63268.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit d42f0c6ad502c9f612410e125ebdf290cce8bdc3 Author: Tiezhu Yang Date: Fri Nov 18 16:28:11 2022 +0800 MIPS: Use "grep -E" instead of "egrep" The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. 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: Thomas Bogendoerfer arch/mips/Makefile | 2 +- arch/mips/vdso/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ca637c0ece144ce62ec8ef75dc127bcccd4f442a Author: Dmitry Torokhov Date: Fri Nov 18 08:43:47 2022 -0800 MIPS: DTS: CI20: fix reset line polarity of the ethernet controller The reset line is called PWRST#, annotated as "active low" in the binding documentation, and is driven low and then high by the driver to reset the chip. However in device tree for CI20 board it was incorrectly marked as "active high". Fix it. Because (as far as I know) the ci20.dts is always built in the kernel I elected not to also add a quirk to gpiolib to force the polarity there. Fixes: db49ca38579d ("net: davicom: dm9000: switch to using gpiod API") Reported-by: Paul Cercueil Signed-off-by: Dmitry Torokhov Acked-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer arch/mips/boot/dts/ingenic/ci20.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8589e92675aa4727bede3f9230709624619844f3 Author: Hou Tao Date: Mon Nov 21 15:34:40 2022 +0800 selftests/bpf: Add test for cgroup iterator on a dead cgroup The test closes both iterator link fd and cgroup fd, and removes the cgroup file to make a dead cgroup before reading from cgroup iterator. It also uses kern_sync_rcu() and usleep() to wait for the release of start cgroup. If the start cgroup is not pinned by cgroup iterator, reading from iterator fd will trigger use-after-free. Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Hao Luo Link: https://lore.kernel.org/bpf/20221121073440.1828292-4-houtao@huaweicloud.com .../testing/selftests/bpf/prog_tests/cgroup_iter.c | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 2a42461a88314bbeaa3dcad3d19a4bb3d9aa546f Author: Hou Tao Date: Mon Nov 21 15:34:39 2022 +0800 selftests/bpf: Add cgroup helper remove_cgroup() Add remove_cgroup() to remove a cgroup which doesn't have any children or live processes. It will be used by the following patch to test cgroup iterator on a dead cgroup. Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221121073440.1828292-3-houtao@huaweicloud.com tools/testing/selftests/bpf/cgroup_helpers.c | 19 +++++++++++++++++++ tools/testing/selftests/bpf/cgroup_helpers.h | 1 + 2 files changed, 20 insertions(+) commit 1a5160d4d8fe63ba4964cfff4a85831b6af75f2d Author: Hou Tao Date: Mon Nov 21 15:34:38 2022 +0800 bpf: Pin the start cgroup in cgroup_iter_seq_init() bpf_iter_attach_cgroup() has already acquired an extra reference for the start cgroup, but the reference may be released if the iterator link fd is closed after the creation of iterator fd, and it may lead to user-after-free problem when reading the iterator fd. An alternative fix is pinning iterator link when opening iterator, but it will make iterator link being still visible after the close of iterator link fd and the behavior is different with other link types, so just fixing it by acquiring another reference for the start cgroup. Fixes: d4ccaf58a847 ("bpf: Introduce cgroup iter") Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221121073440.1828292-2-houtao@huaweicloud.com kernel/bpf/cgroup_iter.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b784c27f40cfac1a0097f43bc68207c1bf350f2e Author: Robert Nelson Date: Fri Nov 18 10:31:38 2022 -0600 dt-bindings: arm: ti: Add bindings for BeagleBone AI-64 This board is based on the ti,j721e https://beagleboard.org/ai-64 https://git.beagleboard.org/beagleboard/beaglebone-ai-64 Signed-off-by: Robert Nelson Acked-by: Rob Herring CC: Nishanth Menon CC: Jason Kridner CC: Drew Fustini Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221118163139.3592054-1-robertcnelson@gmail.com Documentation/devicetree/bindings/arm/ti/k3.yaml | 1 + 1 file changed, 1 insertion(+) commit ed1f4ccfe947a3e1018a3bd7325134574c7ff9b3 Author: Li Jun Date: Fri Sep 30 22:54:22 2022 +0800 clk: imx: imx8mp: add shared clk gate for usb suspend clk 32K usb suspend clock gate is shared with usb_root_clk, this shared clock gate was initially defined only for usb suspend clock, usb suspend clk is kept on while system is active or system sleep with usb wakeup enabled, so usb root clock is fine with this situation; with the commit cf7f3f4fa9e5 ("clk: imx8mp: fix usb_root_clk parent"), this clock gate is changed to be for usb root clock, but usb root clock will be off while usb is suspended, so usb suspend clock will be gated too, this cause some usb functionalities will not work, so define this clock to be a shared clock gate to conform with the real HW status. Fixes: 9c140d9926761 ("clk: imx: Add support for i.MX8MP clock driver") Cc: stable@vger.kernel.org # v5.19+ Tested-by: Alexander Stein Signed-off-by: Li Jun Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/1664549663-20364-2-git-send-email-jun.li@nxp.com drivers/clk/imx/clk-imx8mp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5c1f7f1090947d494c30042123e0ec846f696336 Author: Li Jun Date: Fri Sep 30 22:54:21 2022 +0800 dt-bindings: clocks: imx8mp: Add ID for usb suspend clock usb suspend clock has a gate shared with usb_root_clk. Fixes: 9c140d9926761 ("clk: imx: Add support for i.MX8MP clock driver") Cc: stable@vger.kernel.org # v5.19+ Acked-by: Krzysztof Kozlowski Tested-by: Alexander Stein Signed-off-by: Li Jun Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/1664549663-20364-1-git-send-email-jun.li@nxp.com include/dt-bindings/clock/imx8mp-clock.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 62dfdbcc16e767b91ed35d4fc0428c86d4688505 Author: Haibo Chen Date: Mon Oct 24 13:26:39 2022 +0800 clk: imx93: correct the flexspi1 clock setting Correct IMX93_CLK_FLEXSPI1_GATE CCGR setting. Otherwise the flexspi always can't be assigned to a parent clock when dump the clock tree. Fixes: 24defbe194b6 ("clk: imx: add i.MX93 clk") Reviewed-by: Peng Fan Signed-off-by: Haibo Chen Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/1666589199-1199-1-git-send-email-haibo.chen@nxp.com drivers/clk/imx/clk-imx93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe04716e1716b56de90e6065505c938cc027866d Merge: 26a1200241f8 8dd7e4af5853 Author: Arnd Bergmann Date: Mon Nov 21 16:52:35 2022 +0100 Merge tag 'memory-controller-drv-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.2, part two 1. ARM PL353: document PL354 in bindings. 2. TI/OMAP GPMC: allow setting wait-pin polarity. * tag 'memory-controller-drv-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: omap-gpmc: fix coverity issue "Control flow issues" dt-bindings: memory-controllers: ti,gpmc: add wait-pin polarity memory: omap-gpmc: wait pin additions MAINTAINERS: arm,pl353-smc: correct dt-binding path dt-bindings: memory-controllers: arm,pl353-smc: Extend to support 'arm,pl354' SMC Link: https://lore.kernel.org/r/20221116093509.19657-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit dbb751ffab0b764720e360efd642ba6bf076d87f Author: Alexander Aring Date: Thu Nov 17 17:11:57 2022 -0500 fs: dlm: parallelize lowcomms socket handling This patch is rework of lowcomms handling, the main goal was here to handle recvmsg() and sendpage() to run parallel. Parallel in two senses: 1. per connection and 2. that recvmsg()/sendpage() doesn't block each other. Currently recvmsg()/sendpage() cannot run parallel because two workqueues "dlm_recv" and "dlm_send" are ordered workqueues. That means only one work item can be executed. The amount of queue items will be increased about the amount of nodes being inside the cluster. The current two workqueues for sending and receiving can also block each other if the same connection is executed at the same time in dlm_recv and dlm_send workqueue because a per connection mutex for the socket handling. To make it more parallel we introduce one "dlm_io" workqueue which is not an ordered workqueue, the amount of workers are not limited. Due per connection flags SEND/RECV pending we schedule workers ordered per connection and per send and receive task. To get rid of the mutex blocking same workers to do socket handling we switched to a semaphore which handles socket operations as read lock and sock releases as write operations, to prevent sock_release() being called while the socket is being used. There might be more optimization removing the semaphore and replacing it with other synchronization mechanism, however due other circumstances e.g. othercon behaviour it seems complicated to doing this change. I added comments to remove the othercon handling and moving to a different synchronization mechanism as this is done. We need to do that to the next dlm major version upgrade because it is not backwards compatible with the current connect mechanism. The processing of dlm messages need to be still handled by a ordered workqueue. An dlm_process ordered workqueue was introduced which gets filled by the receive worker. This is probably the next bottleneck of DLM but the application can't currently parse dlm messages parallel. A comment was introduced to lift the workqueue context of dlm processing in a non-sleepable softirq to get messages processing done fast. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 1024 +++++++++++++++++++++++++++++------------------------ fs/dlm/midcomms.c | 45 ++- fs/dlm/midcomms.h | 1 + 3 files changed, 586 insertions(+), 484 deletions(-) commit 1351975ac1377225cef5d858971e17252c06ff51 Author: Alexander Aring Date: Thu Nov 17 17:11:56 2022 -0500 fs: dlm: don't init error value This patch removes a init of an error value to -EINVAL which is not necessary. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c852a6d70698d5e4a9f3670ecabf9656ff00c73c Author: Alexander Aring Date: Thu Nov 17 17:11:55 2022 -0500 fs: dlm: use saved sk_error_report() This patch changes the handling of calling the original sk_error_report() by not putting it on the stack and calling it later. If the listen_sock.sk_error_report() is NULL in this moment it indicates a bug in our implementation. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit e9dd5fd849f1ac125919a79eb4be66f078dd7f51 Author: Alexander Aring Date: Thu Nov 17 17:11:54 2022 -0500 fs: dlm: use sock2con without checking null This patch removes null checks on private data for sockets. If we have a null dereference there we having a bug in our implementation that such callback occurs in this state. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 6f0b0b5d7ae70423c94915989c45b29e87c61ad7 Author: Alexander Aring Date: Thu Nov 17 17:11:53 2022 -0500 fs: dlm: remove dlm_node_addrs lookup list This patch merges the dlm_node_addrs lookup list to the connection structure. It is a per node mapping to some configuration setup by configfs. We don't need two lookup structures. The connection hash has now a lifetime like the dlm_node_addrs entries. Means we add only new entries when configure cluster and not while new connections are coming in, remove connection when a node got fenced and cleanup all connection when the dlm exits. It should work the same and even will show more issues because we don't try to somehow keep those two data structures in sync with the current cluster configuration. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 290 +++++++++++++++++++++++++----------------------------- 1 file changed, 136 insertions(+), 154 deletions(-) commit c51c9cd8addcfbdc097dbefd59f022402183644b Author: Alexander Aring Date: Thu Nov 17 17:11:52 2022 -0500 fs: dlm: don't put dlm_local_addrs on heap This patch removes to allocate the dlm_local_addr[] pointers on the heap. Instead we directly store the type of "struct sockaddr_storage". This removes function deinit_local() because it was freeing memory only. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) commit c3d88dfd15835f42c79467eee2c40db3095e5271 Author: Alexander Aring Date: Thu Nov 17 17:11:51 2022 -0500 fs: dlm: cleanup listen sock handling This patch removes save_listen_callbacks() and add_listen_sock() as they are only used once in lowcomms functionality. For shutdown lowcomms it's not necessary to whole flush the workqueues to synchronize with restoring the old sk_data_ready() callback. Only the listen con receive work need to be cancelled. For each individual node shutdown we should be sure that last ack was been transmitted which is done by flushing per connection swork worker. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 51 +++++++++++++++++---------------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) commit 4f567acb0b8622fe265aac4b0037a03ef544ba24 Author: Alexander Aring Date: Thu Nov 17 17:11:50 2022 -0500 fs: dlm: remove socket shutdown handling Since commit 489d8e559c65 ("fs: dlm: add reliable connection if reconnect") we have functionality like TCP offers for half-closed sockets on dlm application protocol layer. This feature is required because the cluster manager events about leaving resource memberships can be locally already occurred but other cluster nodes having a pending leaving membership over the cluster manager protocol happening. In this time the local dlm node already shutdown it's connection and don't transmit anymore any new dlm messages, but however it still needs to be able to accept dlm messages because the pending leave membership request of the cluster manager protocol which the dlm kernel implementation has no control about it. We have this functionality on the application for two reasons, the main reason is that SCTP does not support such functionality on socket layer. But we can do it inside application layer. Another small issue is that this feature is broken in the TCP world because some NAT devices does not implement such functionality correctly. This is the same reason why the reliable connection session layer in DLM exists. We give up on middle devices in the networking which sends e.g. TCP resets out. In DLM we cannot have any message dropping and we ensure it over a session layer that it can't happen. Back to the half-closed grace shutdown handling. It's not necessary anymore to do it on socket layer (which is only support for TCP sockets) because we do it on application layer. This patch removes this handling, if there are still issues then we have a problem on the application layer for such handling. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 127 ++++++++++-------------------------------------------- fs/dlm/lowcomms.h | 1 + fs/dlm/midcomms.c | 6 ++- 3 files changed, 27 insertions(+), 107 deletions(-) commit 1037c2a94ab51997d8b1ef9e7f6ed697e6e17d84 Author: Alexander Aring Date: Thu Nov 17 17:11:49 2022 -0500 fs: dlm: use listen sock as dlm running indicator This patch will switch from dlm_allow_conn to check if dlm lowcomms is running or not to if we actually have a listen socket set or not. The list socket will be set and unset in lowcomms start and shutdown functionality. To synchronize with data_ready() callback we will set the socket callback to NULL while socket lock is held. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/config.c | 4 ++-- fs/dlm/lowcomms.c | 17 ++++++----------- fs/dlm/lowcomms.h | 4 ++-- 3 files changed, 10 insertions(+), 15 deletions(-) commit dd070a56e0fa36f03bcd09fbf1521c733cf2aa21 Author: Alexander Aring Date: Thu Nov 17 17:11:48 2022 -0500 fs: dlm: use list_first_entry_or_null Instead of check on list_empty() we can do the same with list_first_entry_or_null() and return NULL if the returned value is NULL. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 01ea3d7701cb52dece379384f8aa7b8840f1d7c7 Author: Alexander Aring Date: Thu Nov 17 17:11:47 2022 -0500 fs: dlm: remove twice INIT_WORK This patch removed a twice INIT_WORK() functionality. We already doing this inside of dlm_lowcomms_init() functionality which is called only once dlm is loaded. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 1 - 1 file changed, 1 deletion(-) commit 8b0188b0d60b6f6183b48380bac49fe080c5ded9 Author: Alexander Aring Date: Thu Nov 17 17:11:46 2022 -0500 fs: dlm: add midcomms init/start functions This patch introduces leftovers of init, start, stop and exit functionality. The dlm application layer should always call the midcomms layer which getting aware of such event and redirect it to the lowcomms layer. Some functionality which is currently handled inside the start functionality of midcomms and lowcomms should be handled in the init functionality as it only need to be initialized once when dlm is loaded. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lockspace.c | 5 ++--- fs/dlm/lowcomms.c | 16 ++++++++++------ fs/dlm/lowcomms.h | 1 + fs/dlm/main.c | 7 +++++-- fs/dlm/midcomms.c | 17 ++++++++++++++++- fs/dlm/midcomms.h | 3 +++ 6 files changed, 37 insertions(+), 12 deletions(-) commit 17827754e503d6c72b05a1c4603469ec9bf35d48 Author: Alexander Aring Date: Thu Nov 17 17:11:45 2022 -0500 fs: dlm: add dst nodeid for msg tracing In DLM when we send a dlm message it is easy to add the lock resource name, but additional lookup is required when to trace the receive message side. The idea here is to move the lookup work to the user by using a lookup to find the right send message with recv message. As note DLM can't drop any message which is guaranteed by a special session layer. For doing the lookup a 3 tupel is required as an unique identification which is dst nodeid, src nodeid and sequence number. This patch adds the destination nodeid to the dlm message trace points. The source nodeid is given by the h_nodeid field inside the header. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/midcomms.c | 10 ++++++---- include/trace/events/dlm.h | 38 ++++++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 20 deletions(-) commit 81889255c2e6ed1eef448375b5d6330a2f1453de Author: Alexander Aring Date: Thu Nov 17 17:11:44 2022 -0500 fs: dlm: rename seq to h_seq for msg tracing This patch renames seq to h_seq as it is named in the dlm header structure. Signed-off-by: Alexander Aring Signed-off-by: David Teigland include/trace/events/dlm.h | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 554d849616769339b9dce833a4830251fc4b91ba Author: Alexander Aring Date: Thu Nov 17 17:11:43 2022 -0500 fs: dlm: rename DLM_IFL_NEED_SCHED to DLM_IFL_CB_PENDING This patch renames DLM_IFL_NEED_SCHED to DLM_IFL_CB_PENDING because CB_PENDING is a proper name to describe this flag. This flag is set when callback enqueue will return DLM_ENQUEUE_CALLBACK_NEED_SCHED because the callback worker need to be queued. The flag tells that callbacks are currently pending to be called and will be unset if the callback work for the specific lkb is done. The term need schedule is part of this time but a proper name is to say that there are some callbacks pending to being called. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/ast.c | 9 ++++----- fs/dlm/dlm_internal.h | 2 +- fs/dlm/user.c | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-) commit 740bb8fc10d226d64c7da2271cf0b25dab1538dc Author: Alexander Aring Date: Thu Nov 17 17:11:42 2022 -0500 fs: dlm: ast do WARN_ON_ONCE() on hotpath This patch changes the ast hotpath functionality in very unlikely cases that we do WARN_ON_ONCE() instead of WARN_ON() to not spamming the console output if we run into states that it would occur over and over again. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/ast.c | 6 +++--- fs/dlm/user.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit 9267c85769e62c10961451fd28e88de996fdf401 Author: Alexander Aring Date: Thu Nov 17 17:11:41 2022 -0500 fs: dlm: drop lkb ref in bug case This patch will drop the lkb reference in an very unlikely case which should in practice not happened. However if it happens we cleanup the reference just in case. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/ast.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f217d7ccb9f9ae8d9525958f902c059db1c78355 Author: Alexander Aring Date: Thu Nov 17 17:11:40 2022 -0500 fs: dlm: avoid false-positive checker warning This patch avoid the false-positive checker warning about writing 112 bytes into a 88 bytes field "e->request", see: [ 54.891560] dlm: csmb1: dlm_recover_directory 23 out 2 messages [ 54.990542] ------------[ cut here ]------------ [ 54.991012] memcpy: detected field-spanning write (size 112) of single field "&e->request" at fs/dlm/requestqueue.c:47 (size 88) [ 54.992150] WARNING: CPU: 0 PID: 297 at fs/dlm/requestqueue.c:47 dlm_add_requestqueue+0x177/0x180 [ 54.993002] CPU: 0 PID: 297 Comm: kworker/u4:3 Not tainted 6.1.0-rc5-00008-ge01d50cbd6ee #248 [ 54.993878] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-1.fc36 04/01/2014 [ 54.994718] Workqueue: dlm_recv process_recv_sockets [ 54.995230] RIP: 0010:dlm_add_requestqueue+0x177/0x180 [ 54.995731] Code: e7 01 0f 85 3b ff ff ff b9 58 00 00 00 48 c7 c2 c0 41 74 82 4c 89 ee 48 c7 c7 20 42 74 82 c6 05 8b 8d 30 02 01 e8 51 07 be 00 <0f> 0b e9 12 ff ff ff 66 90 0f 1f 44 00 00 41 57 48 8d 87 10 08 00 [ 54.997483] RSP: 0018:ffffc90000b1fbe8 EFLAGS: 00010282 [ 54.997990] RAX: 0000000000000000 RBX: ffff888024fc3d00 RCX: 0000000000000000 [ 54.998667] RDX: 0000000000000001 RSI: ffffffff81155014 RDI: fffff52000163f73 [ 54.999342] RBP: ffff88800dbac000 R08: 0000000000000001 R09: ffffc90000b1fa5f [ 54.999997] R10: fffff52000163f4b R11: 203a7970636d656d R12: ffff88800cfb0018 [ 55.000673] R13: 0000000000000070 R14: ffff888024fc3d18 R15: 0000000000000000 [ 55.001344] FS: 0000000000000000(0000) GS:ffff88806d600000(0000) knlGS:0000000000000000 [ 55.002078] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 55.002603] CR2: 00007f35d4f0b9a0 CR3: 0000000025495002 CR4: 0000000000770ef0 [ 55.003258] PKRU: 55555554 [ 55.003514] Call Trace: [ 55.003756] [ 55.003953] dlm_receive_buffer+0x1c0/0x200 [ 55.004348] dlm_process_incoming_buffer+0x46d/0x780 [ 55.004786] ? kernel_recvmsg+0x8b/0xc0 [ 55.005150] receive_from_sock.isra.0+0x168/0x420 [ 55.005582] ? process_listen_recv_socket+0x10/0x10 [ 55.006018] ? finish_task_switch.isra.0+0xe0/0x400 [ 55.006469] ? __switch_to+0x2fe/0x6a0 [ 55.006808] ? read_word_at_a_time+0xe/0x20 [ 55.007197] ? strscpy+0x146/0x190 [ 55.007505] process_one_work+0x3d0/0x6b0 [ 55.007863] worker_thread+0x8d/0x620 [ 55.008209] ? __kthread_parkme+0xd8/0xf0 [ 55.008565] ? process_one_work+0x6b0/0x6b0 [ 55.008937] kthread+0x171/0x1a0 [ 55.009251] ? kthread_exit+0x60/0x60 [ 55.009582] ret_from_fork+0x1f/0x30 [ 55.009903] [ 55.010120] ---[ end trace 0000000000000000 ]--- [ 55.025783] dlm: csmb1: dlm_recover 5 generation 3 done: 201 ms [ 55.026466] gfs2: fsid=smbcluster:csmb1.0: recover generation 3 done It seems the checker is unable to detect the additional length bytes which was allocated additionally for the flexible array in struct dlm_message. To solve it we split the memcpy() into copy for the 88 bytes struct and another memcpy() for the flexible array m_extra field. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/requestqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ef434f08b0562069cf431873a052692357d325a1 Author: Jae Hyun Yoo Date: Fri Jul 15 17:06:43 2022 -0700 mtd: spi-nor: winbond: add support for W25Q512NW-IQ Add support for Winbond W25Q512NW-IQ/IN Signed-off-by: Jae Hyun Yoo Signed-off-by: Tudor Ambarus Reviewed-by: Cédric Le Goater Reviewed-by: Michael Walle Link: https://www.winbond.com/resource-files/W25Q512NW%20RevB%2007192021.pdf Link: https://lore.kernel.org/r/20220716000643.3541839-2-quic_jaehyoo@quicinc.com drivers/mtd/spi-nor/winbond.c | 3 +++ 1 file changed, 3 insertions(+) commit bcc0c61e6134066f4629845691a514ea33465653 Author: Eliav Farber Date: Thu Oct 20 09:20:58 2022 +0000 mtd: spi-nor: micron-st: Enable locking for mt25qu256a mt25qu256a [1] uses the 4 bit Block Protection scheme and supports Top/Bottom protection via the BP and TB bits of the Status Register. BP3 is located in bit 6 of the Status Register. Tested on MT25QU256ABA8ESF-0SIT. [1] https://www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-a/mt25q_qljs_u_256_aba_0.pdf Signed-off-by: Eliav Farber Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20221020092058.33844-1-farbere@amazon.com drivers/mtd/spi-nor/micron-st.c | 2 ++ 1 file changed, 2 insertions(+) commit caf1aeaffc3b09649a56769e559333ae2c4f1802 Author: Jens Axboe Date: Sun Nov 20 10:10:53 2022 -0700 eventpoll: add EPOLL_URING_WAKE poll wakeup flag We can have dependencies between epoll and io_uring. Consider an epoll context, identified by the epfd file descriptor, and an io_uring file descriptor identified by iofd. If we add iofd to the epfd context, and arm a multishot poll request for epfd with iofd, then the multishot poll request will repeatedly trigger and generate events until terminated by CQ ring overflow. This isn't a desired behavior. Add EPOLL_URING so that io_uring can pass it in as part of the poll wakeup key, and io_uring can check for that to detect a potential recursive invocation. Cc: stable@vger.kernel.org # 6.0 Signed-off-by: Jens Axboe fs/eventpoll.c | 18 ++++++++++-------- include/uapi/linux/eventpoll.h | 6 ++++++ 2 files changed, 16 insertions(+), 8 deletions(-) commit f9d567c75ec216447f36da6e855500023504fa04 Author: Pavel Begunkov Date: Thu Nov 17 18:41:06 2022 +0000 io_uring: inline __io_req_complete_post() There is only one user of __io_req_complete_post(), inline it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ef4c9059950a3da5cf68df00f977f1fd13bd9306.1668597569.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 11 +++-------- io_uring/io_uring.h | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) commit d75936062049522172a107c994242b76c89777f9 Author: Pavel Begunkov Date: Fri Nov 11 16:54:09 2022 +0000 io_uring: split tw fallback into a function When the target process is dying and so task_work_add() is not allowed we push all task_work item to the fallback workqueue. Move the part responsible for moving tw items out of __io_req_task_work_add() into a separate function. Makes it a bit cleaner and gives the compiler a bit of extra info. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e503dab9d7af95470ca6b214c6de17715ae4e748.1668162751.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit e52d2e583e4ad1d5d0b804d79c2b8752eb0e5ceb Author: Pavel Begunkov Date: Fri Nov 11 16:54:08 2022 +0000 io_uring: inline io_req_task_work_add() __io_req_task_work_add() is huge but marked inline, that makes compilers to generate lots of garbage. Inline the wrapper caller io_req_task_work_add() instead. before and after: text data bss dec hex filename 47347 16248 8 63603 f873 io_uring/io_uring.o text data bss dec hex filename 45303 16248 8 61559 f077 io_uring/io_uring.o Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/26dc8c28ca0160e3269ef3e55c5a8b917c4d4450.1668162751.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 7 +------ io_uring/io_uring.h | 7 ++++++- 2 files changed, 7 insertions(+), 7 deletions(-) commit 23a6c9ac4dbd7cccf5b909e78aa84192b65f2833 Author: Lin Ma Date: Thu Nov 10 20:21:03 2022 +0800 io_uring: update outdated comment of callbacks Previous commit ebc11b6c6b87 ("io_uring: clean io-wq callbacks") rename io_free_work() into io_wq_free_work() for consistency. This patch also updates relevant comment to avoid misunderstanding. Fixes: ebc11b6c6b87 ("io_uring: clean io-wq callbacks") Signed-off-by: Lin Ma Link: https://lore.kernel.org/r/20221110122103.20120-1-linma@zju.edu.cn Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd42a53d25d489317b9ae5213da721cde8cb7071 Author: Lin Ma Date: Thu Nov 10 14:03:13 2022 +0800 io_uring/poll: remove outdated comments of caching Previous commit 13a99017ff19 ("io_uring: remove events caching atavisms") entirely removes the events caching optimization introduced by commit 81459350d581 ("io_uring: cache req->apoll->events in req->cflags"). Hence the related comment should also be removed to avoid misunderstanding. Fixes: 13a99017ff19 ("io_uring: remove events caching atavisms") Signed-off-by: Lin Ma Link: https://lore.kernel.org/r/20221110060313.16303-1-linma@zju.edu.cn Signed-off-by: Jens Axboe io_uring/poll.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit e2ad599d1ed38fe743106f10d58a0cbfc00b51e2 Author: Dylan Yudaken Date: Mon Nov 7 04:52:35 2022 -0800 io_uring: allow multishot recv CQEs to overflow With commit aa1df3a360a0 ("io_uring: fix CQE reordering"), there are stronger guarantees for overflow ordering. Specifically ensuring that userspace will not receive out of order receive CQEs. Therefore this is not needed any more for recv/recvmsg. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221107125236.260132-4-dylany@meta.com Signed-off-by: Jens Axboe io_uring/net.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 515e26961295bee9da5e26916c27739dca6c10e1 Author: Dylan Yudaken Date: Mon Nov 21 07:43:42 2022 -0700 io_uring: revert "io_uring fix multishot accept ordering" This is no longer needed after commit aa1df3a360a0 ("io_uring: fix CQE reordering"), since all reordering is now taken care of. This reverts commit cbd25748545c ("io_uring: fix multishot accept ordering"). Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221107125236.260132-2-dylany@meta.com Signed-off-by: Jens Axboe io_uring/net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ef67fcb41de6d3d5bbb16aaa66d4c706c4cacf54 Author: Dylan Yudaken Date: Mon Nov 7 04:33:49 2022 -0800 io_uring: do not always force run task_work in io_uring_register Running task work when not needed can unnecessarily delay operations. Specifically IORING_SETUP_DEFER_TASKRUN tries to avoid running task work until the user requests it. Therefore do not run it in io_uring_register any more. The one catch is that io_rsrc_ref_quiesce expects it to have run in order to process all outstanding references, and so reorder it's loop to do this. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20221107123349.4106213-1-dylany@meta.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 -- io_uring/rsrc.c | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) commit df730ec21f7ba395b1b22e7f93a3a85b1d1b7882 Author: Xinghui Li Date: Wed Nov 2 16:25:03 2022 +0800 io_uring: fix two assignments in if conditions Fixes two errors: "ERROR: do not use assignment in if condition 130: FILE: io_uring/net.c:130: + if (!(issue_flags & IO_URING_F_UNLOCKED) && ERROR: do not use assignment in if condition 599: FILE: io_uring/poll.c:599: + } else if (!(issue_flags & IO_URING_F_UNLOCKED) &&" reported by checkpatch.pl in net.c and poll.c . Signed-off-by: Xinghui Li Reported-by: kernel test robot Link: https://lore.kernel.org/r/20221102082503.32236-1-korantwork@gmail.com [axboe: style tweaks] Signed-off-by: Jens Axboe io_uring/net.c | 16 +++++++++------- io_uring/poll.c | 7 +++++-- 2 files changed, 14 insertions(+), 9 deletions(-) commit 42385b02baad0df55474b7f36dc13e0d4ffd0cc0 Author: Pavel Begunkov Date: Fri Nov 4 10:59:46 2022 +0000 io_uring/net: move mm accounting to a slower path We can also move mm accounting to the extended callbacks. It removes a few cycles from the hot path including skipping one function call and setting io_req_task_complete as a callback directly. For user backed I/O it shouldn't make any difference taking into considering atomic mm accounting and page pinning. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1062f270273ad11c1b7b45ec59a6a317533d5e64.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 3 +++ io_uring/notif.c | 31 +++++++++++++------------------ 2 files changed, 16 insertions(+), 18 deletions(-) commit 40725d1b960f19a11a1ebd1ab537844ebf39347c Author: Pavel Begunkov Date: Fri Nov 4 10:59:45 2022 +0000 io_uring: move zc reporting from the hot path Add custom tw and notif callbacks on top of usual bits also handling zc reporting. That moves it from the hot path. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/40de4a6409042478e1f35adc4912e23226cb1b5c.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 22 ++++++++++++++-------- io_uring/notif.c | 31 +++++++++++++++++++++++++++---- io_uring/notif.h | 1 + 3 files changed, 42 insertions(+), 12 deletions(-) commit bedd20bcf3b08c5d2f03f30a83a10022bde5e596 Author: Pavel Begunkov Date: Fri Nov 4 10:59:44 2022 +0000 io_uring/net: inline io_notif_flush() io_notif_flush() is pretty simple, we can inline it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/332359e7bd124138dfe51340bbec829c9b265c18.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/notif.c | 10 ---------- io_uring/notif.h | 11 ++++++++++- 2 files changed, 10 insertions(+), 11 deletions(-) commit 7fa8e84192fd8dbc97b4c8c1acfd10017c3dd7b6 Author: Pavel Begunkov Date: Fri Nov 4 10:59:43 2022 +0000 io_uring/net: rename io_uring_tx_zerocopy_callback Just a simple renaming patch, io_uring_tx_zerocopy_callback() is too bulky and doesn't follow usual naming style. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/24d78325403ca6dcb1ec4bced1e33cacc9b832a5.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/notif.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit fc1dd0d4fa523916529ddf7c56d7b866312c4262 Author: Pavel Begunkov Date: Fri Nov 4 10:59:42 2022 +0000 io_uring/net: preset notif tw handler We're going to have multiple notification tw functions. In preparation for future changes default the tw callback in advance so later we can replace it with other versions. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7acdbea5e20eadd844513320cd454af14ba50f64.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/notif.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 5bc8e8884b4e9579ca57e33d42d60090b7288050 Author: Pavel Begunkov Date: Fri Nov 4 10:59:41 2022 +0000 io_uring/net: remove extra notif rsrc setup io_send_zc_prep() sets up notification's rsrc_node when needed, don't unconditionally install it on notif alloc. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/dbe4875ac33e180b9799d8537a5e27935e82aac4.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/notif.c | 1 - 1 file changed, 1 deletion(-) commit 3671163beb633fbe3297b8e30369b640ce4bd690 Author: Pavel Begunkov Date: Fri Nov 4 10:59:40 2022 +0000 io_uring: move kbuf put out of generic tw complete There are multiple users of io_req_task_complete() including zc notifications, but only read requests use selected buffers. As we already have an rw specific tw function, move io_put_kbuf() in there. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/94374c7649aaefc3a17808dc4701f25ccd457e25.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 6 ------ io_uring/rw.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) commit e307e6698165ca6508ed42c69cb1be76c8eb6a3c Author: Stefan Metzmacher Date: Thu Oct 27 20:34:45 2022 +0200 io_uring/net: introduce IORING_SEND_ZC_REPORT_USAGE flag It might be useful for applications to detect if a zero copy transfer with SEND[MSG]_ZC was actually possible or not. The application can fallback to plain SEND[MSG] in order to avoid the overhead of two cqes per request. Or it can generate a log message that could indicate to an administrator that no zero copy was possible and could explain degraded performance. Cc: stable@vger.kernel.org # 6.1 Link: https://lore.kernel.org/io-uring/fb6a7599-8a9b-15e5-9b64-6cd9d01c6ff4@gmail.com/T/#m2b0d9df94ce43b0e69e6c089bdff0ce6babbdfaa Signed-off-by: Stefan Metzmacher Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/8945b01756d902f5d5b0667f20b957ad3f742e5e.1666895626.git.metze@samba.org Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 18 ++++++++++++++++++ io_uring/net.c | 6 +++++- io_uring/notif.c | 12 ++++++++++++ io_uring/notif.h | 3 +++ 4 files changed, 38 insertions(+), 1 deletion(-) commit fdc20370d93e8c6d2f448a539d08c2c064af7694 Author: Allen-KH Cheng Date: Mon Oct 31 20:46:33 2022 +0800 mtd: spi-nor: Fix the number of bytes for the dummy cycles The number of bytes used by spi_nor_spimem_check_readop() may be incorrect for the dummy cycles. Since nor->read_dummy is not initialized before spi_nor_spimem_adjust_hwcaps(). We use both mode and wait state clock cycles instead of nor->read_dummy. Fixes: 0e30f47232ab ("mtd: spi-nor: add support for DTR protocol") Co-developed-by: Bayi Cheng Signed-off-by: Bayi Cheng Signed-off-by: Allen-KH Cheng Signed-off-by: Tudor Ambarus Tested-by: Dhruva Gole Tested-by: AngeloGioacchino Del Regno Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20221031124633.13189-1-allen-kh.cheng@mediatek.com drivers/mtd/spi-nor/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4dc49062a7e9c0c7261807fb855df1c611eb78c3 Author: Yaliang Wang Date: Mon Oct 17 01:19:01 2022 +0800 mtd: spi-nor: gigadevice: gd25q256: replace gd25q256_default_init with gd25q256_post_bfpt When utilizing PARSE_SFDP to initialize the flash parameter, the deprecated initializing method spi_nor_init_params_deprecated() and the function spi_nor_manufacturer_init_params() within it will never be executed, which results in the default_init hook function will also never be executed. This is okay for 'D' generation of GD25Q256, because 'D' generation is implementing the JESD216B standards, it has QER field defined in BFPT, parsing the SFDP can properly set the quad_enable function. The 'E' generation also implements the JESD216B standards, and it has the same status register definitions as 'D' generation, parsing the SFDP to set the quad_enable function should also work for 'E' generation. However, the same thing can't apply to 'C' generation. 'C' generation 'GD25Q256C' implements the JESD216 standards, and it doesn't have the QER field defined in BFPT, since it does have QE bit in status register 1, the quad_enable hook needs to be tweaked to properly set the quad_enable function, this can be done in post_bfpt fixup hook. Fixes: 047275f7de18 ("mtd: spi-nor: gigadevice: gd25q256: Init flash based on SFDP") Reported-by: kernel test robot Signed-off-by: Yaliang Wang [tudor.ambarus@microchip.com: Update comment in gd25q256_post_bfpt] Signed-off-by: Tudor Ambarus Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221016171901.1483542-2-yaliang.wang@windriver.com drivers/mtd/spi-nor/gigadevice.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit ceb35b666d42c2e91b1f94aeca95bb5eb0943268 Author: Kees Cook Date: Fri Nov 18 10:34:14 2022 -0800 bpf/verifier: Use kmalloc_size_roundup() to match ksize() usage Most allocation sites in the kernel want an explicitly sized allocation (and not "more"), and that dynamic runtime analysis tools (e.g. KASAN, UBSAN_BOUNDS, FORTIFY_SOURCE, etc) are looking for precise bounds checking (i.e. not something that is rounded up). A tiny handful of allocations were doing an implicit alloc/realloc loop that actually depended on ksize(), and didn't actually always call realloc. This has created a long series of bugs and problems over many years related to the runtime bounds checking, so these callers are finally being adjusted to _not_ depend on the ksize() side-effect, by doing one of several things: - tracking the allocation size precisely and just never calling ksize() at all [1]. - always calling realloc and not using ksize() at all. (This solution ends up actually be a subset of the next solution.) - using kmalloc_size_roundup() to explicitly round up the desired allocation size immediately [2]. The bpf/verifier case is this another of this latter case, and is the last outstanding case to be fixed in the kernel. Because some of the dynamic bounds checking depends on the size being an _argument_ to an allocator function (i.e. see the __alloc_size attribute), the ksize() users are rare, and it could waste local variables, it was been deemed better to explicitly separate the rounding up from the allocation itself [3]. Round up allocations with kmalloc_size_roundup() so that the verifier's use of ksize() is always accurate. [1] e.g.: https://git.kernel.org/linus/712f210a457d https://git.kernel.org/linus/72c08d9f4c72 [2] e.g.: https://git.kernel.org/netdev/net-next/c/12d6c1d3a2ad https://git.kernel.org/netdev/net-next/c/ab3f7828c979 https://git.kernel.org/netdev/net-next/c/d6dd508080a3 [3] https://lore.kernel.org/lkml/0ea1fc165a6c6117f982f4f135093e69cb884930.camel@redhat.com/ Signed-off-by: Kees Cook Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221118183409.give.387-kees@kernel.org kernel/bpf/verifier.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 1e9629820ab333a26353477863e494f95fec8fc0 Merge: 2092ad3a79ca 884af88b756c Author: Arnd Bergmann Date: Mon Nov 21 11:56:08 2022 +0100 Merge tag 'renesas-arm-dt-for-v6.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas ARM DT updates for v6.2 (take two) - Timer (TMU and CMT) and quad Cortex-A76 CPU topology support for the R-Car V4H SoC, - Watchdog, L2 cache, and system controller support for the RZ/V2M SoC on the RZ/V2M Evaluation Kit 2.0, - Ethernet Switch and SERDES supports for the R-Car S4-8 SoC and the Spider development board, - Miscellaneous fixes and improvements. * tag 'renesas-arm-dt-for-v6.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (21 commits) arm64: dts: renesas: spider-ethernet: Enable Ethernet Switch and SERDES arm64: dts: renesas: r8a779f0: Add Ethernet Switch and SERDES nodes arm64: dts: renesas: r9a09g011: Add system controller node arm64: dts: renesas: r8a779g0: Add CA76 operating points arm64: dts: renesas: r8a779g0: Add CPU core clocks arm64: dts: renesas: r8a779g0: Add CPUIdle support arm64: dts: renesas: r8a779g0: Add secondary CA76 CPU cores arm64: dts: renesas: r8a779g0: Add L3 cache controller arm64: dts: renesas: r9a09g011: Add L2 Cache node arm64: dts: renesas: rzv2mevk2: Enable watchdog arm64: dts: renesas: r9a09g011: Add watchdog node arm64: dts: renesas: spider-cpu: Switch from SCIF3 to HSCIF0 arm64: dts: renesas: rzg2l: Drop #address-cells from pinctrl nodes arm64: dts: renesas: r9a09g011: Fix I2C SoC specific strings arm64: dts: renesas: rzg2l: Add missing cache-level properties arm64: dts: renesas: r8a779g0: Add CMT node arm64: dts: renesas: r9a09g011: Fix unit address format error arm64: dts: renesas: white-hawk-cpu: Sort RWDT entry correctly arm64: dts: renesas: r8a779g0: Add TMU nodes arm64: dts: renesas: r8a779f0: Fix SCIF "brg_int" clock ... Link: https://lore.kernel.org/r/cover.1668788921.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 2092ad3a79ca6d987f994e8b9b72f9fde5f29aa8 Merge: f241625bb3ae 40005cb6093e Author: Arnd Bergmann Date: Mon Nov 21 11:53:45 2022 +0100 Merge tag 'renesas-riscv-dt-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas RISC-V DT updates for v6.2 - Add initial support for the Renesas RZ/Five SoC and the Renesas RZ/Five SMARC EVK development board. * tag 'renesas-riscv-dt-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: riscv: dts: renesas: rzfive-smarc: Enable CANFD/I2C riscv: dts: renesas: r9a07g043f/rzfive-smarc-som: Enable ADC/OPP/Thermal Zones/TSU MAINTAINERS: Add entry for Renesas RISC-V riscv: dts: renesas: Add minimal DTS for Renesas RZ/Five SMARC EVK riscv: dts: renesas: Add initial devicetree for Renesas RZ/Five SoC Link: https://lore.kernel.org/r/cover.1668788930.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit f241625bb3aeb8aab3e2f67848456d55da529564 Merge: 27269ac4f68d a884f187760e Author: Arnd Bergmann Date: Mon Nov 21 11:53:09 2022 +0100 Merge tag 'renesas-dt-bindings-for-v6.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DT binding updates for v6.2 (take two) - Document support for the Andes Technology AX45MP RISC-V CPU Core, as used on the Renesas RZ/Five SoC, - Document support for the Renesas RZ/V2M System Configuration. * tag 'renesas-dt-bindings-for-v6.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration dt-bindings: riscv: Add Andes AX45MP core to the list dt-bindings: riscv: Sort the CPU core list alphabetically Link: https://lore.kernel.org/r/cover.1668788927.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 27269ac4f68d9cb16edc8e2d9f97aa5801d3dccf Merge: 4614161b0667 d8515330a63e Author: Arnd Bergmann Date: Mon Nov 21 11:44:13 2022 +0100 Merge tag 'stm32-dt-for-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into soc/dt STM32 DT for v6.2, round 1 Highlights: ---------- - MPU: - ST boards: - Add MCP23017 IO expander support on stm32mp135f-dk board. - Add stm32g0 support for USB typeC on stm32mp135f-dk - Add USB (EHCI / OTG) on stm32mp135f-dk - Add ADC support on stm32mp135f-dk - Add USB2514B onboard hub on stm32mp157c-ev1 - DH: - Fix severals Yaml DT validation issues * tag 'stm32-dt-for-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (28 commits) ARM: dts: stm32: Rename mdio0 to mdio on DHCOR Testbench board ARM: dts: stm32: add mcp23017 IO expander on I2C1 on stm32mp135f-dk ARM: dts: stm32: add mcp23017 pinctrl entry for stm32mp13 ARM: dts: stm32: enable USB OTG in dual role mode on stm32mp135f-dk ARM: dts: stm32: add pins for stm32g0 typec controller on stm32mp13 ARM: dts: stm32: enable USB Host EHCI on stm32mp135f-dk ARM: dts: stm32: enable USB HS phys on stm32mp135f-dk ARM: dts: stm32: add fixed regulators to support usb on stm32mp135f-dk ARM: dts: stm32: add USB OTG HS support on stm32mp131 ARM: dts: stm32: add UBSH EHCI and OHCI support on stm32mp131 ARM: dts: stm32: add USBPHYC and dual USB HS PHY support on stm32mp131 ARM: dts: stm32: add PWR fixed regulators on stm32mp131 ARM: dts: stm32: Fix AV96 WLAN regulator gpio property ARM: dts: stm32: add adc support on stm32mp135f-dk ARM: dts: stm32: add dummy vdd_adc regulator on stm32mp135f-dk ARM: dts: stm32: add adc pins muxing on stm32mp135f-dk ARM: dts: stm32: add adc support to stm32mp13 ARM: dts: stm32: Drop MMCI interrupt-names ARM: dts: stm32: update vbus-supply of usbphyc_port0 on stm32mp157c-ev1 ARM: dts: stm32: add support for USB2514B onboard hub on stm32mp157c-ev1 ... Link: https://lore.kernel.org/r/3235e5be-d89f-f76c-5e25-5d1210feb857@foss.st.com Signed-off-by: Arnd Bergmann commit 4614161b0667db4fd94b59b9fdd13587cdf4df63 Merge: efa0b8251f95 0de459a3260a Author: Arnd Bergmann Date: Mon Nov 21 11:43:39 2022 +0100 Merge tag 'hisi-arm64-dt-for-6.2' of https://github.com/hisilicon/linux-hisi into soc/dt ARM64: DT: HiSilicon ARM64 DT updates for 6.2 - Add missing cache-level properties * tag 'hisi-arm64-dt-for-6.2' of https://github.com/hisilicon/linux-hisi: arm64: dts: Update cache properties for hisilicon Link: https://lore.kernel.org/r/63744D38.9010700@hisilicon.com Signed-off-by: Arnd Bergmann commit efa0b8251f953d790f19083fb90f58b241e957f7 Merge: 4be0308a5196 4c33cb31282c Author: Arnd Bergmann Date: Mon Nov 21 11:40:29 2022 +0100 Merge tag 'imx-dt64-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX arm64 device tree update for 6.2: - New device trees for i.MX8MM based Cloos PHG and WB15 SoM/EVK. - A set of tqma8mpql/mba8mpxl changes, adding USB Host, PCIe, PWM fan support. - Rename DTB overlay source files from .dts to .dtso. - A series from Frank Li to add USB, ADC, FlexSPI, LPSPI support for i.MX8DXL. - A couple of librem5-devkit changes, switching LED to use PWM and using function and color properties for LED. - Enable wakeup-source for USB PHY for i.MX8MM/N EVK. - A set of random changes from Marcel Ziswiler to improve i.MX8M based Verdin device trees. - A series from Marek Vasut to update Data Modul i.MX8M Mini eDM SBC and DH electronics i.MX8M Plus DHCOM, modeling PMIC to SNVS RTC clock path, dropping QCA clk_out setup, adding bluetooth UART, etc. - A bunch of changes from Peng Fan to add LPSPI, TPM etc for i.MX93, update i.MX8MP/N EVK with UART, I2C addition. - Update cache properties per DeviceTree Specification v0.3. - Add gpio-ranges property for i.MX8DXL and i.MX8Q LSIO Subsystem. - Misc small and random changes. * tag 'imx-dt64-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (60 commits) arm64: dts: freescale: Rename DTB overlay source files from .dts to .dtso arm64: dts: imx8mm-evk: add vcc supply for pca6416 arm64: dts: imx8m[m,q]-evk: change to use off-on-delay-us in regulator arm64: dts: imx8mn-evk: enable uart1 arm64: dts: imx8mn-evk: add i2c gpio recovery settings arm64: dts: imx8mn-evk: set off-on-delay-us in regulator arm64: dts: imx8mn-evk: update vdd_soc dvs voltage arm64: dts: imx8mp-evk: enable I2C2 node arm64: dts: imx8mp-evk: enable fspi nor on imx8mp evk arm64: dts: imx8mp-evk: enable uart1/3 ports ARM64: dts: imx8mp-evk: add pwm support arm64: dts: imx8mp: add mlmix power domain arm64: dts: imx8mq: fix dtschema warning for imx7-csi arm64: dts: Update cache properties for freescale arm64: dts: imx8mm-phg: Add initial board support arm64: dts: imx8qxp-ss-lsio: add gpio-ranges property arm64: dts: imx8qm-ss-lsio: add gpio-ranges property arm64: dts: imx8dxl-ss-lsio: add gpio-ranges property arm64: dts: imx8dxl_evk: add lpspi0 support arm64: dts: imx8dxl: add lpspi support ... Link: https://lore.kernel.org/r/20221119125733.32719-5-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 4be0308a51960f229c9386bfbc99ac26de013dfd Merge: 3a8a1ab8f444 bd5880e10982 Author: Arnd Bergmann Date: Mon Nov 21 11:08:01 2022 +0100 Merge tag 'imx-dt-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX arm device tree update for 6.2: - New device tree for Kobo Aura 2 E-Boot reader which is built on i.MX6SL SoC. - Enable backlight and boost support for imx6sl-tolino-shine2hd. - Enable CYTTSP5 touchscreen support for E60K02. - Enable Silergy SY7636A EPD PMIC on imx7d-remarkable2 epaper tablet. - Add watchdog property 'fsl,suspend-in-wait' for i.MX6UL Phytec Phycore SoM to avoid watchdog triggering in 'freeze' low power mode. - Correct the polarity of AT86RF233 reset line for vf610-zii-dev-rev-c board. - A bunch of Colibri device tree updates from Marcel Ziswiler and Philippe Schenker, correct USBH_PEN property, remove spurious debounce property, add USB dual-role switching, and some cosmetic change. - Other small and random changes. * tag 'imx-dt-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: colibri-imx6ull: Enable dual-role switching ARM: dts: imx: e60k02: Add touchscreen ARM: dts: imx6qdl-sabre: Add mmc aliases ARM: dts: imx6ul/ull: suspend i.MX6UL watchdog in wait mode ARM: dts: imx7d-remarkable2: Enable silergy,sy7636a ARM: dts: imx6sl-tolino-shine2hd: Add backlight boost ARM: dts: imx6sl-tolino-shine2hd: Add backlight ARM: dts: colibri-imx7: fix confusing naming ARM: dts: colibri-imx6ull: add -hog to gpio hogs ARM: dts: colibri-imx6ull: enable default peripherals ARM: dts: colibri-imx6ull: keep peripherals disabled ARM: dts: ls1021: correct indentation ARM: dts: vf610-zii-dev-rev-c: fix polarity of at86rf233 reset line ARM: dts: imx7-colibri: remove spurious debounce property ARM: dts: colibri-imx6: specify usbh_pen gpio being active-low ARM: dts: colibri-imx6: move vbus-supply to module level device tree ARM: dts: colibri-imx6: usb dual-role switching ARM: dts: imx: Add devicetree for Kobo Aura 2 Link: https://lore.kernel.org/r/20221119125733.32719-4-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 3a8a1ab8f44450ffae8d1a9be96ce0b5056eb5e8 Merge: cdd1db76607d 651ae85e5c5b Author: Arnd Bergmann Date: Mon Nov 21 11:06:42 2022 +0100 Merge tag 'imx-bindings-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX dt-bindings update for 6.2: - New vendor prefix for Cloos and InnoComm. - New compatible for Cloos PHG board, InnoComm WB15 EVK and Kobo Aura 2. - Improve snvs-lpgpr bindings schema regarding i.MX8M SNVS LPGRP compatible strings. - Improve fsl-imx-cspi bindings schema for i.MX8MP ECSPI. - Add bindings schema for i.MX8M ANATOP device. - Update SCU firmware resource ID header by syncing with the latest available SCFW kit version 1.13.0. * tag 'imx-bindings-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: Add an entry for Cloos PHG board dt-bindings: vendor-prefixes: Add an entry for Cloos dt-bindings: nvmem: snvs-lpgpr: Fix i.MX8M compatible strings dt-bindings: spi: fsl-imx-cspi: update i.MX8MP binding dt-bindings: arm: fsl: add compatible string for Kobo Aura 2 dt-bindings: clock: add i.MX8M Anatop dt-bindings: arm: fsl: Add InnoComm WB15 EVK dt-bindings: vendor-prefixes: Add prefix for InnoComm dt-bindings: firmware: imx: sync with SCFW kit v1.13.0 Link: https://lore.kernel.org/r/20221119125733.32719-3-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 270450a1b6d8bef423cfe619ab8bb99b2f874cad Author: Jonathan Neuschäfer Date: Tue Nov 1 17:29:06 2022 +0100 mtd: spi-nor: Fix formatting in spi_nor_read_raw() kerneldoc comment It doesn't make sense to put "set" on its own line like that. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Tudor Ambarus Acked-by: Pratyush Yadav Link: https://lore.kernel.org/r/20221101162906.990125-1-j.neuschaefer@gmx.net drivers/mtd/spi-nor/sfdp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c21dd79e9909c9cf90f8b1ca8ad2753cedb6c655 Author: Niyas Sait Date: Thu Nov 17 12:35:42 2022 +0000 pinconf-generic: fix style issues in pin_config_param doc Fixes following issues introduced in a previous commit to clarify values for pin config pull up and down types. - replace spaces with tabs to be consistent with rest of the doc - use capitalization for unit (ohms -> Ohms) Signed-off-by: Niyas Sait Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221117123542.1154252-1-niyas.sait@linaro.org Signed-off-by: Linus Walleij include/linux/pinctrl/pinconf-generic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a92de16b61b5d7a52d2910f81325f0506b2fc3b Author: Michael Walle Date: Thu Aug 11 00:06:54 2022 +0200 mtd: spi-nor: sysfs: print JEDEC ID for generic flash driver We don't have a database entry for the generic SPI-NOR flash driver and thus we don't have a JEDEC ID to print. Print the (cached) JEDEC ID instead. Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus Reviewed-by: Takahiro Kuwano Link: https://lore.kernel.org/r/20220810220654.1297699-8-michael@walle.cc drivers/mtd/spi-nor/sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 773bbe10449731c9525457873e0c2342e5cf883b Author: Michael Walle Date: Thu Aug 11 00:06:53 2022 +0200 mtd: spi-nor: add generic flash driver Our SFDP parsing is everything we need to support all basic operations of a flash device. If the flash isn't found in our in-kernel flash database, gracefully fall back to a driver described solely by its SFDP tables. Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus Tested-by: Tudor Ambarus Reviewed-by: Takahiro Kuwano Link: https://lore.kernel.org/r/20220810220654.1297699-7-michael@walle.cc drivers/mtd/spi-nor/core.c | 26 ++++++++++++++++++++++++-- drivers/mtd/spi-nor/core.h | 1 + drivers/mtd/spi-nor/sfdp.c | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) commit 39eece67a3cf027aa5b39d7da5feadc4711504e6 Author: Michael Walle Date: Thu Aug 11 00:06:52 2022 +0200 mtd: spi-nor: fix select_uniform_erase to skip 0 erase size 4bait will set the erase size to 0 if there is no corresponding opcode for the 4byte erase. Fix spi_nor_select_uniform_erase to skip the 0 erase size to avoid mtd device registration failure cases. Reported-by: Jae Hyun Yoo Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20220810220654.1297699-6-michael@walle.cc drivers/mtd/spi-nor/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit fa06bb26a40ca08fa0d653b04d8ce92d243aa2ce Author: Michael Walle Date: Thu Aug 11 00:06:51 2022 +0200 mtd: spi-nor: move function declaration out of sfdp.h sfdp.h should only contain constants related to the JEDEC SFDP specification(s). Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus Reviewed-by: Takahiro Kuwano Link: https://lore.kernel.org/r/20220810220654.1297699-5-michael@walle.cc drivers/mtd/spi-nor/core.h | 2 ++ drivers/mtd/spi-nor/sfdp.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 28ef7670414e309d8bbee41f9389b7e21a58572c Author: Michael Walle Date: Thu Aug 11 00:06:50 2022 +0200 mtd: spi-nor: remember full JEDEC flash ID At the moment, we print the JEDEC ID that is stored in our database. The generic flash support won't have such an entry in our database. To find out the JEDEC ID later we will have to cache it. There is also another advantage: If the flash is found in the database, the ID could be truncated because the ID of the entry is used which can be shorter. Some flashes still holds valuable information in the bytes after the JEDEC ID and come in handy during debugging of when coping with INFO6() entries. These are not accessible for now. Save a copy of the ID bytes after reading and display it via debugfs. Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus Reviewed-by: Takahiro Kuwano Link: https://lore.kernel.org/r/20220810220654.1297699-4-michael@walle.cc drivers/mtd/spi-nor/core.c | 5 +++++ drivers/mtd/spi-nor/debugfs.c | 2 +- include/linux/mtd/spi-nor.h | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 0d9270f2762b8a2bd0df7c4a2e7e651703783793 Author: Michael Walle Date: Thu Aug 11 00:06:49 2022 +0200 mtd: spi-nor: sysfs: hide manufacturer if it is not set The manufacturer may be optional when pure SFDP flashes are supported. Hide the sysfs property if no manufacturer is set. Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus Reviewed-by: Takahiro Kuwano Link: https://lore.kernel.org/r/20220810220654.1297699-3-michael@walle.cc Documentation/ABI/testing/sysfs-bus-spi-devices-spi-nor | 3 +++ drivers/mtd/spi-nor/sysfs.c | 2 ++ 2 files changed, 5 insertions(+) commit 7d388551b6888f3725e6c957f472526b35161a5b Author: Michael Walle Date: Thu Aug 11 00:06:48 2022 +0200 mtd: spi-nor: hide jedec_id sysfs attribute if not present Some non-jedec compliant flashes (like the Everspin flashes) don't have an ID at all. Hide the attribute in this case. Fixes: 36ac02286265 ("mtd: spi-nor: add initial sysfs support") Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus Reviewed-by: Takahiro Kuwano Link: https://lore.kernel.org/r/20220810220654.1297699-2-michael@walle.cc Documentation/ABI/testing/sysfs-bus-spi-devices-spi-nor | 3 +++ drivers/mtd/spi-nor/sysfs.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+) commit c0f358fde37a6af517850c1f90e7d4241f472da9 Author: Ren Zhijie Date: Mon Nov 21 13:26:08 2022 +0000 pinctrl: pinctrl-loongson2: fix Kconfig dependency If CONFIG_PINCTRL_LOONGSON2=y and CONFIG_OF is not set, gcc complained about undefined reference: drivers/pinctrl/pinctrl-loongson2.o: In function `pinconf_generic_dt_node_to_map_all': pinctrl-loongson2.c:(.text+0x1c4): undefined reference to `pinconf_generic_dt_node_to_map' To fix this error, add depends on OF to config PINCTRL_LOONGSON2. Fixes: f73f88acbc18 ("pinctrl: pinctrl-loongson2: add pinctrl driver support") Signed-off-by: Ren Zhijie Link: https://lore.kernel.org/r/20221121132608.230645-1-renzhijie2@huawei.com Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dcc7f001b44c30a377f44413471217cecddbee9a Author: Shaokun Zhang Date: Fri Nov 18 14:54:00 2022 +0800 MAINTAINERS: Update HiSilicon PMU maintainers Now Qi Liu has left HiSilicon and will no longer access to the necessary hardware and document, remove the mail and thanks for her's work. While add the new maintainer Jonathan Cameron, He is skilled with kernel and enough knowledge of the driver. Cc: Jonathan Cameron Cc: Qi Liu Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Shaokun Zhang Acked-by: Jonathan Cameron Acked-by: Qi Liu Link: https://lore.kernel.org/r/20221118065400.48836-1-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c45455ea1a32a45200562ad99f238aae34ce496 Merge: 7a7160edf1bf a3400e8746b6 Author: David S. Miller Date: Mon Nov 21 13:09:08 2022 +0000 Merge branch 'mptcp-netlink' Mat Martineau says: ==================== mptcp: More specific netlink command errors This series makes the error reporting for the MPTCP_PM_CMD_ADD_ADDR netlink command more specific, since there are multiple reasons the command could fail. Note that patch 2 adds a GENL_SET_ERR_MSG_FMT() macro to genetlink.h, which is outside the MPTCP subsystem. Patch 1 refactors in-kernel listening socket and endpoint creation to simplify the second patch. Patch 2 updates the error values returned by the in-kernel path manager when it fails to create a local endpoint. ==================== Signed-off-by: David S. Miller commit a3400e8746b626531099e4d9fd8eac41be066683 Author: Paolo Abeni Date: Fri Nov 18 10:46:08 2022 -0800 mptcp: more detailed error reporting on endpoint creation Endpoint creation can fail for a number of reasons; in case of failure append the error number to the extended ack message, using a newly introduced generic helper. Additionally let mptcp_pm_nl_append_new_local_addr() report different error reasons. Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller include/net/genetlink.h | 3 +++ net/mptcp/pm_netlink.c | 24 +++++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) commit 976d302fb6165ad620778d7ba834cde6e3fe9f9f Author: Paolo Abeni Date: Fri Nov 18 10:46:07 2022 -0800 mptcp: deduplicate error paths on endpoint creation When endpoint creation fails, we need to free the newly allocated entry and eventually destroy the paired mptcp listener socket. Consolidate such action in a single point let all the errors path reach it. Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller net/mptcp/pm_netlink.c | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) commit 7a7160edf1bfde25422262fb26851cef65f695d3 Author: Kuniyuki Iwashima Date: Fri Nov 18 10:25:06 2022 -0800 net: Return errno in sk->sk_prot->get_port(). We assume the correct errno is -EADDRINUSE when sk->sk_prot->get_port() fails, so some ->get_port() functions return just 1 on failure and the callers return -EADDRINUSE instead. However, mptcp_get_port() can return -EINVAL. Let's not ignore the error. Note the only exception is inet_autobind(), all of whose callers return -EAGAIN instead. Fixes: cec37a6e41aa ("mptcp: Handle MP_CAPABLE options for outgoing connections") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/ipv4/af_inet.c | 4 ++-- net/ipv4/inet_connection_sock.c | 7 ++++--- net/ipv4/ping.c | 2 +- net/ipv4/udp.c | 2 +- net/ipv6/af_inet6.c | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) commit b8fadb396414972c7e526f3f94c0b4d114d2b2a1 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:39 2022 +0100 ipmi: ssif_bmc: 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 Message-Id: <20221118224540.619276-606-uwe@kleine-koenig.org> Signed-off-by: Corey Minyard drivers/char/ipmi/ssif_bmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1cb50726329070a6e3235b6bac38dfb8d5fd18c2 Author: Yoshihiro Shimoda Date: Fri Nov 18 09:27:24 2022 +0900 net: ethernet: renesas: rswitch: Fix MAC address info Smatch detected the following warning. drivers/net/ethernet/renesas/rswitch.c:1717 rswitch_init() warn: '%pM' cannot be followed by 'n' The 'n' should be '\n'. Reported-by: Dan Carpenter Suggested-by: Geert Uytterhoeven Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/renesas/rswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26a1200241f8eb4b6a84660b07843c743ba6b64c Merge: cb667ad7524a 98572487e5c6 Author: Arnd Bergmann Date: Mon Nov 21 13:54:29 2022 +0100 Merge tag 'imx-drivers-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/drivers i.MX drivers change for 6.2: - Improve imx8m-blk-ctrl driver to allow deferred probe in case that 'bus' genpd is not yet ready. - Add missing USB_1_PHY PD for i.MX scu-pd firmware driver. - Add GENPD_FLAG_ACTIVE_WAKEUP flag for i.MX8MM/N in GPCv2 driver, so that the power domain remains on if USB remote wakeup is enabled. * tag 'imx-drivers-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: gpcv2: add GENPD_FLAG_ACTIVE_WAKEUP flag for usb of imx8mm/n firmware: imx: scu-pd: add missed USB_1_PHY pd soc: imx: imx8m-blk-ctrl: Defer probe if 'bus' genpd is not yet ready Link: https://lore.kernel.org/r/20221119125733.32719-1-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit cb667ad7524aa5786137da7ec6312454433d6702 Merge: f5014dcd931f 7e2004405231 Author: Arnd Bergmann Date: Mon Nov 21 13:53:33 2022 +0100 Merge tag 'renesas-drivers-for-v6.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers Renesas driver updates for v6.2 (take two) - Add support for identifying the SoC revision on RZ/V2M. * tag 'renesas-drivers-for-v6.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: Identify RZ/V2M SoC Link: https://lore.kernel.org/r/cover.1668788925.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 32d495b0c3305546f4773b9aafcd4e90188ddb9e Author: Will Deacon Date: Mon Nov 21 12:52:07 2022 +0000 Revert "arm64/mm: Drop redundant BUG_ON(!pgtable_alloc)" This reverts commit 9ed2b4616d4e846ece2a04cb5007ce1d1bd9e3f3. Nathan reports early boot failures bisected to this change which look related to the kPTI nG repainting. In any case, consolidating the BUG_ON()s to a single location needs more thought, so revert the change until this is figured out properly. Link: https://lore.kernel.org/r/Y3pS5fdZ3MdLZ00t@dev-arch.thelio-3990X Reported-by: Nathan Chancellor Signed-off-by: Will Deacon arch/arm64/mm/mmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f5014dcd931fde4537c60b64d3f65b9b4380cba7 Merge: 06ebd23a33ec bd52407221b4 Author: Arnd Bergmann Date: Mon Nov 21 13:38:00 2022 +0100 Merge tag 'optee-for-6.2' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers Add missing __init/__exit annotations to OP-TEE driver * tag 'optee-for-6.2' of https://git.linaro.org/people/jens.wiklander/linux-tee: optee: Add __init/__exit annotations to module init/exit funcs Link: https://lore.kernel.org/r/Y3d4CHWl3Ofx5OrX@jade Signed-off-by: Arnd Bergmann commit 1002a361127b6b42b8d1ef686a4c1fa68541d6f5 Author: Thierry Reding Date: Thu Nov 17 09:32:41 2022 +0100 arm64: tegra: Remove unneeded clock-names for Tegra132 PWM There's only a single clock for this IP block, so it doesn't need a clock-names property. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra132.dtsi | 1 - 1 file changed, 1 deletion(-) commit 132b552cba159f41b576fbd0da8e0684460f9ab3 Author: Thierry Reding Date: Fri Nov 4 13:38:34 2022 +0100 arm64: tegra: Fix up compatible string for SDMMC1 on Tegra234 The compatible string list for SDHCI on Tegra234 should be "nvidia,tegra234-sdhci", followed by the "nvidia,tegra186-sdhci" fallback. Use that consistently for all SDHCI controllers. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8e194786a89ac3c9f7657e97eb38a2238519bd3 Author: Thierry Reding Date: Fri Nov 4 13:35:57 2022 +0100 arm64: tegra: Remove unused reset-names for QSPI The Tegra QSPI controller uses a single reset line, so there's no need for a reset-names property. Remove such properties. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 - arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 -- 2 files changed, 3 deletions(-) commit efe499d8854f73686c6ebc1c89b33d8ee4a30181 Author: Thierry Reding Date: Fri Nov 4 13:35:08 2022 +0100 arm64: tegra: Fixup pinmux node names Pinmux node names should have a pinmux- prefix and not use underscores. Fix up some cases that didn't follow those rules. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra132-norrin.dts | 2 +- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 4 ++-- arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 4 ++-- arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 4 ++-- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 18 ++++++++++++------ 5 files changed, 19 insertions(+), 13 deletions(-) commit e9ddebc3a210f434f69ec7e68dd857b8af3b8300 Author: Thierry Reding Date: Mon Sep 5 18:08:55 2022 +0200 arm64: tegra: Remove reset-names for QSPI The Tegra QSPI controllers use a single reset control, so reset-names is not necessary and therefore not specified in the DT bindings. Drop the property from device tree files to avoid validation warnings. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194.dtsi | 2 -- 1 file changed, 2 deletions(-) commit b2fbcbe1ae1946d2aae47fac02a2547c6475fffa Author: Thierry Reding Date: Fri Nov 4 14:14:16 2022 +0100 arm64: tegra: Use correct compatible string for Tegra234 HDA The Tegra234 HDA controller is not backwards-compatible with Tegra30, so drop the corresponding compatible string from the list. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f0ea5acfc195076a0a4042d18a4abd18a080772 Author: Thierry Reding Date: Fri Nov 4 14:11:04 2022 +0100 arm64: tegra: Use correct compatible string for Tegra194 HDA The Tegra194 HDA controller is not backwards-compatible with Tegra30, so drop the corresponding compatible string from the list. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d5d63e96af46a3658272bcd25ba4c20997d19b9 Author: Thierry Reding Date: Fri Nov 4 14:10:17 2022 +0100 arm64: tegra: Use vbus-gpios property Instead of using the deprecated vbus-gpio property, switch to using the more standard vbus-gpios property. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194-p3509-0000.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 85ab13c184dcc4dbd70552376fc9c1bc47d8e1d9 Author: Thierry Reding Date: Tue Dec 7 15:03:41 2021 +0100 arm64: tegra: Restructure Tegra210 PMC pinmux nodes The PMC pinmux configuration nodes need to be part of a top-level pinmux node. Add that new "pinmux" node and move the configuration nodes into it. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 40 +++++++++++++++----------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit 27f1568b1d5fe35014074f92717b250afbe67031 Author: Pierre Gondois Date: Mon Nov 7 16:57:08 2022 +0100 arm64: tegra: 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 Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra234.dtsi | 33 ++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) commit 14910d68718cae5f287c95997dcc9a99531109d6 Author: Fabio Estevam Date: Mon Sep 19 07:43:50 2022 -0300 arm64: tegra: Remove 'enable-active-low' The 'enable-active-low' property is not a valid one. Only 'enable-active-high' is valid, and when this property is absent the gpio regulator will act as active low by default. Remove the invalid 'enable-active-low' property. Signed-off-by: Fabio Estevam Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi | 1 - 1 file changed, 1 deletion(-) commit dd0be8278ab9675d168390c990110f8d2f62ca38 Author: Akhil R Date: Thu Nov 10 22:47:47 2022 +0530 arm64: tegra: Add dma-channel-mask in GPCDMA node Add dma-channel-mask property in Tegra GPCDMA device tree node. The property would help to specify the channels to be used in kernel and reserve few for the firmware. This was previously achieved by limiting the channel number to 31 in the driver. This is wrong and does not align with the hardware. Correct this and update the interrupts property to list all 32 interrupts. Signed-off-by: Akhil R Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 4 +++- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 4 +++- arch/arm64/boot/dts/nvidia/tegra234.dtsi | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) commit 47a2f35d9ea76d92aa2385671f527b75aa9dfe45 Author: Vidya Sagar Date: Tue Oct 25 23:55:08 2022 +0530 arm64: tegra: Fix non-prefetchable aperture of PCIe C3 controller Fix the starting address of the non-prefetchable aperture of PCIe C3 controller. Fixes: ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT") Signed-off-by: Vidya Sagar Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8f44643d68cdf64cebc42d276b5e4094f98a01f Author: Thierry Reding Date: Thu Nov 3 12:35:48 2022 +0100 arm64: tegra: Add missing compatible string to Ethernet USB device According to the DT schema in usb-device.yaml, each USB device node needs a compatible string, so add one for the built-in USB Ethernet device on Jetson TX1. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 1 + 1 file changed, 1 insertion(+) commit 6f380a4ec04fc97d7f006f525fd7ece0b2bfe238 Author: Thierry Reding Date: Fri Nov 4 15:23:45 2022 +0100 arm64: tegra: Separate AON pinmux from main pinmux on Tegra194 The registers for the AON pinmux reside in a partition different from the registers for the main pinmux. Instead of treating them as one and the same device, split them up so that they are each their own devices. Also add gpio-ranges properties to the corresponding GPIO controllers such that the pinmux and GPIO controllers can be paired up properly. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194.dtsi | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 794b834d4cd3fa05e1b4476c46dc64a6b21cf4d4 Author: Vidya Sagar Date: Mon Nov 14 15:53:33 2022 +0000 arm64: tegra: Add ECAM aperture info for all the PCIe controllers Add the ECAM aperture information for all the PCIe controllers of Tegra234. Signed-off-by: Vidya Sagar Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 55 +++++++++++++++++++------------- 1 file changed, 33 insertions(+), 22 deletions(-) commit b6e097df67df38b8699f26ccc9d5be97831cb3d2 Author: Thierry Reding Date: Fri Nov 4 12:43:49 2022 +0100 arm64: tegra: Remove clock-names from PWM nodes The Tegra PWFM controllers use a single clock, so there's no need for a clock-names property. Suggested-by: Krzysztof Kozlowski Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 8 -------- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 8 -------- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 - arch/arm64/boot/dts/nvidia/tegra234.dtsi | 8 -------- 4 files changed, 25 deletions(-) commit 8fbd2d118917381c9d3247d6ae03f3b7d7d7604d Author: Dipen Patel Date: Thu Nov 3 10:45:22 2022 -0700 arm64: tegra: Enable GTE nodes Add and enable AON and LIC GTE nodes by default. Signed-off-by: Dipen Patel Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 501c9e7ca66bfd6a98f5fceac6a1aaa5eb9507ed Author: Jon Hunter Date: Fri Oct 28 13:35:56 2022 +0100 arm64: tegra: Update console for Jetson Xavier and Orin The Tegra Combined UART (TCU) is the default serial interface for Jetson Xavier and Orin platforms and so update the bootargs for these platforms to use the TCU. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 2 +- arch/arm64/boot/dts/nvidia/tegra194-p3668.dtsi | 2 +- arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit daf92599762a658a9f65eae9e6c19db5bf3c2543 Author: Sandipan Patra Date: Mon Sep 19 19:44:55 2022 +0530 arm64: tegra: Enable PWM users on Jetson AGX Orin Enable additional PWM controllers in device tree so that the PWM pins on the Jetson AGX Orin Developer Kit 40-pin header can be used. Signed-off-by: Sandipan Patra Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 58bf48a25af13421e12dc854fef6560f8b3eadf7 Author: Thierry Reding Date: Mon Oct 24 16:05:57 2022 +0200 arm64: tegra: Add missing whitespace The unit-address of a node should be separated from the opening brace by a space. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78159542034f42846f0cccb17ff5ca8b82bfda91 Author: Thierry Reding Date: Mon Oct 24 16:05:16 2022 +0200 arm64: tegra: Sort nodes by unit-address The P2U nodes that were recently added were not added in the correct order. Sort them in the right place by unit-address. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 384 +++++++++++++++---------------- 1 file changed, 192 insertions(+), 192 deletions(-) commit d71b893a119df4ddf63351cffe8557db1cba850f Author: Prathamesh Shete Date: Fri Oct 7 22:29:41 2022 +0530 arm64: tegra: Add Tegra234 SDMMC1 device tree node Add device tree node for Tegra234 SDMMC1 instance. Add and enable SD card instance in device tree. Signed-off-by: Prathamesh Shete Signed-off-by: Thierry Reding .../arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi | 7 +++ arch/arm64/boot/dts/nvidia/tegra234.dtsi | 56 ++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit 1bbba854bc402f7799898a0a5a9f7c9efd07e04b Author: Jon Hunter Date: Wed Oct 19 15:47:00 2022 +0100 arm64: tegra: Add SBSA UART for Tegra234 Populate the SBSA UART for Tegra234 and enable this UART for Jetson AGX Orin. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 5 +++++ arch/arm64/boot/dts/nvidia/tegra234.dtsi | 7 +++++++ 2 files changed, 12 insertions(+) commit 7a2c613bdbd83097d5b220b814be0523721d58c4 Author: Jon Hunter Date: Wed Oct 19 14:29:03 2022 +0100 arm64: tegra: Add PWM fan for Jetson AGX Orin Add the PWM fan node for the Tegra234 Jetson AGX Orin platform. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding .../boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 2566d28c4097a500a3d1fb0d8636531e6ded6986 Author: Jon Hunter Date: Wed Oct 19 14:29:02 2022 +0100 arm64: tegra: Populate Tegra234 PWMs Populate all the PWM devices for Tegra234. Finally, update the compatible string for the existing 'pwm1' node to just be 'tegra194-pwm' and remove the fallback to 'tegra186-pwm', which aligns with the binding documentation. Signed-off-by: Jon Hunter Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 80 +++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 2 deletions(-) commit 04491207d2d1e0da6ea7451b958506a76e275c51 Author: Jon Hunter Date: Wed Oct 19 14:16:13 2022 +0100 arm64: tegra: Remove unused property for I2C Commit 156af9de0932 ("arm64: tegra: Add Tegra234 I2C devicetree nodes") populated the I2C device nodes for Tegra234. One of these nodes contains the property 'nvidia,hw-instance-id' which is neither documented or used. Remove this unused property. Fixes: 156af9de0932 ("arm64: tegra: Add Tegra234 I2C devicetree nodes") Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 1 - 1 file changed, 1 deletion(-) commit 248400656b1cd85de37f3742d065dc1826cdf589 Author: Vidya Sagar Date: Wed Sep 28 11:57:31 2022 +0530 arm64: tegra: Fix Prefetchable aperture ranges of Tegra234 PCIe controllers commit edf408b946d3 ("PCI: dwc: Validate iATU outbound mappings against hardware constraints") exposes an issue with the existing partitioning of the aperture space where the Prefetchable apertures of controllers C5, C7 and C9 in Tegra234 cross the 32GB boundary hardware constraint. This patch makes sure that the Prefetchable region doesn't spill over the 32GB boundary. Fixes: ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT") Signed-off-by: Vidya Sagar Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 68c31ad01105f5cb15f5c863e90fe97a770c951f Author: Mikko Perttunen Date: Tue Sep 20 11:11:59 2022 +0300 arm64: tegra: Add NVDEC on Tegra234 Add a device tree node for NVDEC on Tegra234. Booting the firmware requires some information regarding offsets within the firmware binary. These are passed through the device tree, but since the values vary depending on the firmware version, and the firmware itself is not available to the OS, the flasher is expected to provide a device tree overlay with values corresponding to the firmware it is flashing. The overlay then replaces the placeholder values here. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra234.dtsi | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit e25770feb6d60099dcd93f0a9829936398cb4447 Author: Mikko Perttunen Date: Tue Sep 6 14:01:34 2022 +0300 arm64: tegra: Fix ranges for host1x nodes The currently specified 'ranges' properties don't actually include all devices under the host1x bus on Tegra194 and Tegra234. Expand them appropriately. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194.dtsi | 2 +- arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 20aa3352c741698a658b15e74332270d8b5fc24b Merge: 9abf2313adc1 41155b6f6db8 Author: Thierry Reding Date: Mon Nov 21 13:29:45 2022 +0100 Merge branch for-6.2/dt-bindings into for-6.2/arm64/dt commit 5cd24ca0985f2dfb5628354fb63ede67b1dd993d Author: Jon Hunter Date: Fri Oct 28 13:37:41 2022 +0100 memory: tegra: Add DLA clients for Tegra234 Add the memory clients on Tegra234 which are needed for initialising the SMMU for the Deep Learning Accelerator (DLA). Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding drivers/memory/tegra/tegra234.c | 160 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) commit 4aa42217c200efdc34d57e119a24c721dfd1bc23 Author: Liu Shixin Date: Thu Sep 22 22:33:44 2022 +0800 memory: tegra186-emc: Use DEFINE_SHOW_ATTRIBUTE to simplify code Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Thierry Reding drivers/memory/tegra/tegra186-emc.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit d4a5db55c7b8e1904a5fa4470f908cffe552ac04 Author: Liu Shixin Date: Thu Sep 22 22:33:43 2022 +0800 memory: tegra210-emc: Use DEFINE_SHOW_ATTRIBUTE to simplify code Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Thierry Reding drivers/memory/tegra/tegra210-emc-core.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit db70b3325b90a54fef382a6bf7b9e87250d14751 Author: Liu Shixin Date: Thu Sep 22 22:33:42 2022 +0800 memory: tegra30-emc: Use DEFINE_SHOW_ATTRIBUTE to simplify code Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Thierry Reding drivers/memory/tegra/tegra30-emc.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit f5275319034938c1bcb3aaa2822222a34840dc54 Author: Liu Shixin Date: Thu Sep 22 22:33:41 2022 +0800 memory: tegra20-emc: Use DEFINE_SHOW_ATTRIBUTE to simplify code Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Thierry Reding drivers/memory/tegra/tegra20-emc.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit c556e5de3110a04c615c4c2cc4f0ca48bdbf2a73 Merge: 9abf2313adc1 41155b6f6db8 Author: Thierry Reding Date: Mon Nov 21 13:28:43 2022 +0100 Merge branch for-6.2/dt-bindings into for-6.2/memory commit 97351cd8bea8e284cf62b4b7f35fa12059b47d7f Author: Thierry Reding Date: Mon Nov 22 17:23:26 2021 +0100 dt-bindings: usb: tegra-xusb: Convert to json-schema Convert the Tegra XUSB controller bindings from the free-form text format to json-schema. Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/usb/nvidia,tegra124-xusb.txt | 132 -------------- .../bindings/usb/nvidia,tegra124-xusb.yaml | 202 +++++++++++++++++++++ .../bindings/usb/nvidia,tegra186-xusb.yaml | 173 ++++++++++++++++++ .../bindings/usb/nvidia,tegra194-xusb.yaml | 179 ++++++++++++++++++ .../bindings/usb/nvidia,tegra210-xusb.yaml | 199 ++++++++++++++++++++ 5 files changed, 753 insertions(+), 132 deletions(-) commit 9efc0fa5192fbbd23ed74cd1edb035ccebcf6f7c Author: Thierry Reding Date: Thu Nov 17 22:42:48 2022 +0100 dt-bindings: pwm: tegra: Convert to json-schema Convert the Tegra PWFM bindings from the free-form text format to json-schema. Signed-off-by: Thierry Reding Reviewed-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding .../devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 78 ------------------ .../bindings/pwm/nvidia,tegra20-pwm.yaml | 96 ++++++++++++++++++++++ 2 files changed, 96 insertions(+), 78 deletions(-) commit 1f8f3bf099fdc3b8cef9db6ad8b3d19cc82e7465 Author: Thierry Reding Date: Fri Jul 1 16:52:24 2022 +0200 dt-bindings: pinctrl: tegra194: Separate instances Tegra194 has two separate instances of the pin controller, one called AON (in the always-on domain) and another called "main". Instead of treating them as a single pin controller, split them up into two separate controllers. Doing so allows the mapping between the pinmux and GPIO controllers to be trivial identity mappings and more cleanly separates the AON from the main IP blocks. Note that while this changes the DT node in an incompatible way, this doesn't have any practical implications for backwards-compatibility. The reason for this is that device trees have only reconfigured a very narrow subset of pins of the main controller, so the new driver will remain backwards-compatible with old device trees. Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/pinctrl/nvidia,tegra194-pinmux.yaml | 235 +++++++++++++++++++-- 1 file changed, 215 insertions(+), 20 deletions(-) commit de1835e3b52540d34c926cf25eda4d6e051b01b6 Author: Thierry Reding Date: Mon Nov 22 13:28:40 2021 +0100 dt-bindings: pinctrl: tegra: Convert to json-schema Convert the NVIDIA Tegra pinmux controller bindings from the free-form text format to json-schema. Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/clock/nvidia,tegra124-dfll.txt | 2 +- .../pinctrl/nvidia,tegra-pinmux-common.yaml | 178 +++++++++++++++++++++ .../bindings/pinctrl/nvidia,tegra114-pinmux.txt | 131 --------------- .../bindings/pinctrl/nvidia,tegra114-pinmux.yaml | 155 ++++++++++++++++++ .../bindings/pinctrl/nvidia,tegra124-pinmux.txt | 153 ------------------ .../bindings/pinctrl/nvidia,tegra124-pinmux.yaml | 176 ++++++++++++++++++++ .../bindings/pinctrl/nvidia,tegra194-pinmux.txt | 107 ------------- .../bindings/pinctrl/nvidia,tegra194-pinmux.yaml | 89 +++++++++++ .../bindings/pinctrl/nvidia,tegra20-pinmux.txt | 143 ----------------- .../bindings/pinctrl/nvidia,tegra20-pinmux.yaml | 112 +++++++++++++ .../bindings/pinctrl/nvidia,tegra210-pinmux.txt | 166 ------------------- .../bindings/pinctrl/nvidia,tegra210-pinmux.yaml | 142 ++++++++++++++++ .../bindings/pinctrl/nvidia,tegra30-pinmux.txt | 144 ----------------- .../bindings/pinctrl/nvidia,tegra30-pinmux.yaml | 176 ++++++++++++++++++++ 14 files changed, 1029 insertions(+), 845 deletions(-) commit 5c3741492d2e7b2d533179a731bcc1a1061649f5 Author: Vidya Sagar Date: Mon Nov 14 15:53:32 2022 +0000 dt-bindings: PCI: tegra234: Add ECAM support Add support for ECAM aperture that is only supported for Tegra234 devices. Signed-off-by: Vidya Sagar Co-developed-by: Jon Hunter Signed-off-by: Jon Hunter Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/pci/nvidia,tegra194-pcie.yaml | 34 ++++++++++++++++++++-- .../devicetree/bindings/pci/snps,dw-pcie.yaml | 2 +- 2 files changed, 33 insertions(+), 3 deletions(-) commit 0f1dfbd1ea257d9ec3d9eb76fb10b8a18379c59d Author: Sandipan Patra Date: Mon Sep 19 19:44:53 2022 +0530 dt-bindings: pwm: tegra: Document Tegra234 PWM Add compatible for nvidia,tegra234-pwm with nvidia,tegra194-pwm as a fallback. The PWM controller blocks are identical to the ones found on the Tegra194 SoC. No driver changes are required and compatible string "nvidia,tegra194-pwm" will be used as a fallback. Signed-off-by: Sandipan Patra Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 1 + 1 file changed, 1 insertion(+) commit 7d096252aa7f53e6a9c66d339347c8c0cab51853 Author: Mikko Perttunen Date: Tue Sep 20 11:11:58 2022 +0300 dt-bindings: Add bindings for Tegra234 NVDEC Update NVDEC bindings for Tegra234. This new engine version only has two memory clients, but now requires three clocks, and as a bigger change the engine loads firmware from a secure carveout configured by the bootloader. For the latter, we need to add a phandle to the memory controller to query the location of this carveout, and several other properties containing offsets into the firmware inside the carveout. This carveout is not accessible by the CPU, but is needed by NVDEC, so we need this information to be relayed from the bootloader. As the binding was getting large with many conditional properties, also split the Tegra234 version out into a separate file. Signed-off-by: Mikko Perttunen Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/gpu/host1x/nvidia,tegra234-nvdec.yaml | 156 +++++++++++++++++++++ 1 file changed, 156 insertions(+) commit 41155b6f6db8742c5f5247a141eca89c601c258c Author: Jon Hunter Date: Mon Oct 3 13:51:41 2022 +0100 dt-bindings: tegra: Update headers for Tegra234 Update the device-tree clock, memory, power and reset headers for Tegra234 by adding the definitions for all the various devices. Signed-off-by: Jon Hunter Acked-by: Rob Herring Signed-off-by: Thierry Reding include/dt-bindings/clock/tegra234-clock.h | 635 ++++++++++++++++++++++++- include/dt-bindings/memory/tegra234-mc.h | 439 ++++++++++++++++- include/dt-bindings/power/tegra234-powergate.h | 14 + include/dt-bindings/reset/tegra234-reset.h | 110 ++++- 4 files changed, 1167 insertions(+), 31 deletions(-) commit c9e7d2166a71030bcad4d4814421202537b660c9 Author: AngeloGioacchino Del Regno Date: Thu Oct 27 11:55:04 2022 +0200 arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone Add a basic support for the Sony Xperia M5 (codename "Holly") smartphone, powered by a MediaTek Helio X10 SoC. This achieves a console boot. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221027095504.37432-7-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/Makefile | 1 + .../boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 88 ++++++++++++++++++++++ 2 files changed, 89 insertions(+) commit 434cdafabcbafdd2b6cc65c59ba7a6a7120d491e Author: AngeloGioacchino Del Regno Date: Thu Oct 27 11:55:03 2022 +0200 dt-bindings: arm: mediatek: Add compatible for MT6795 Sony Xperia M5 Add a compatible for the Sony Xperia M5 smartphone. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221027095504.37432-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/arm/mediatek.yaml | 1 + 1 file changed, 1 insertion(+) commit d83f8a42e601b60e3133c6406ed4d16c67b316da Author: AngeloGioacchino Del Regno Date: Thu Oct 27 11:55:02 2022 +0200 arm64: dts: mediatek: mt6795: Add support for eMMC/SD/SDIO controllers Add the mmc nodes to support all of the four controllers, used for eMMC, SD/MicroSD and SDIO storage. All of these controller nodes are left disabled by default, as usage is board dependent. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221027095504.37432-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 09608ccc8a8c92d0d7fabaf8c7699163fc0f16d9 Author: AngeloGioacchino Del Regno Date: Thu Oct 27 11:55:01 2022 +0200 arm64: dts: mediatek: mt6795: Add support for APDMA and wire up UART DMAs This SoC has a DMA controller with tx/rx channels for all of the UART controller IPs: add the apdma node and wire up the DMAs on all controllers. When one of the UART controllers is used as a serial console, the DMA will be automatically ignored. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221027095504.37432-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 12a36f028af0188d19e449f964f9591c61f4eb0e Author: AngeloGioacchino Del Regno Date: Thu Oct 27 11:55:00 2022 +0200 arm64: dts: mediatek: mt6795: Replace UART dummy clocks with pericfg The UART nodes had a dummy clock for early bringup, as it is expected that these are left on by the bootloader: now that the pericfg clock controller is supported, we can replace them with the real clocks. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221027095504.37432-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit f89afcfc33b2e83970215a2dbaa30ad41e97b00c Author: AngeloGioacchino Del Regno Date: Thu Oct 27 11:54:59 2022 +0200 arm64: dts: mediatek: mt6795: Add topckgen, infra, peri clocks/resets Add nodes for topckgen, infracfg and pericfg, providing various clocks and resets and needed to support basic IPs of this SoC. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221027095504.37432-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6795.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 957d4ac7c51a5b142a223433f20b51c1a0afde81 Author: Bo-Chen Chen Date: Thu Nov 10 14:37:16 2022 +0800 arm64: dts: mediatek: cherry: Add edptx and dptx support In cherry projects, we use edptx as the internal display interface and use dptx as the external display interface. To support this, we need to add more properties. - Add pinctrls for edptx and dptx. - Add ports for edptx and dptx. The port connections for the internal and external display: dp-intf0 -> edptx -> panel dp-intf1 -> dptx The edptx endpoint is kept empty for now, as the panel addition will come in a later commit. Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221110063716.25677-5-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 68 +++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit b1bf55700a247ac30f2afcfdbae9a6fb31342124 Author: Bo-Chen Chen Date: Thu Nov 10 14:37:15 2022 +0800 arm64: dts: mediatek: cherry: Add dp-intf ports Dp-intfs provide the pixel data to edptx and dptx. To support edptx and dptx, we need to add dp-intf0 and dp-intf1 ports. Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221110063716.25677-4-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 64196979f91832b7b7bae1fb60f7998b7b88935f Author: Bo-Chen Chen Date: Thu Nov 10 14:37:14 2022 +0800 arm64: dts: mt8195: Add edptx and dptx nodes In MT8195, we use edptx as the internal display interface and use dptx as the external display interface. Therefore, we need to add these nodes to support the internal display and the external display. - Add dp calibration data in the efuse node. - Add edptx and dptx nodes for MT8195. Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221110063716.25677-3-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 6c2503b5856aa5fbeb7f9147400dd7d6988b9373 Author: Bo-Chen Chen Date: Thu Nov 10 14:37:13 2022 +0800 arm64: dts: mt8195: Add dp-intf nodes Dp-intfs provide the pixel data to edptx and dptx. To support edptx and dptx, we need to add dp-intf0 and dp-intf1 nodes. Dp-intf0 is for edptx and dp-intf1 is for dptx. Signed-off-by: Bo-Chen Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221110063716.25677-2-rex-bc.chen@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 5f535cc583759c9c60d4cc9b8d221762e2d75387 Author: AngeloGioacchino Del Regno Date: Thu Oct 13 17:22:12 2022 +0200 arm64: dts: mediatek: mt6797: Fix 26M oscillator unit name Update its unit name to oscillator-26m and remove the unneeded unit address to fix a unit_address_vs_reg warning. Fixes: 464c510f60c6 ("arm64: dts: mediatek: add mt6797 support") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221013152212.416661-9-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6797.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 509438336ce75c8b4e6ce8e8d507dc77d0783bdd Author: AngeloGioacchino Del Regno Date: Thu Oct 13 17:22:11 2022 +0200 arm64: dts: mediatek: pumpkin-common: Fix devicetree warnings Fix the pinctrl submodes and optee node to remove unneeded unit address, fixing all unit_address_vs_reg warnings. Fixes: 9983822c8cf9 ("arm64: dts: mediatek: add pumpkin board dts") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221013152212.416661-8-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ec1ae39a8d25cfb067b5459fac7c5b7b9bce6f6a Author: AngeloGioacchino Del Regno Date: Thu Oct 13 17:22:10 2022 +0200 arm64: dts: mt2712-evb: Fix usb vbus regulators unit names Update the names to regulator-usb-p{0-3}-vbus to fix unit_address_vs_reg warnings for those. Fixes: 1724f4cc5133 ("arm64: dts: Add USB3 related nodes for MT2712") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221013152212.416661-7-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 377063156893bf6c088309ac799fe5c6dce2822d Author: AngeloGioacchino Del Regno Date: Thu Oct 13 17:22:09 2022 +0200 arm64: dts: mt2712-evb: Fix vproc fixed regulators unit names Update the names to regulator-vproc-buck{0,1} to fix unit_addres_vs_reg warnings for those. Fixes: f75dd8bdd344 ("arm64: dts: mediatek: add mt2712 cpufreq related device nodes") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221013152212.416661-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1d4516f53a611b362db7ba7a8889923d469f57e1 Author: AngeloGioacchino Del Regno Date: Thu Oct 13 17:22:08 2022 +0200 arm64: dts: mt2712e: Fix unit address for pinctrl node The unit address for the pinctrl node is (0x)1000b000 and not (0x)10005000, which is the syscfg_pctl_a address instead. This fixes the following warning: arch/arm64/boot/dts/mediatek/mt2712e.dtsi:264.40-267.4: Warning (unique_unit_address): /syscfg_pctl_a@10005000: duplicate unit-address (also used in node /pinctrl@10005000) Fixes: f0c64340b748 ("arm64: dts: mt2712: add pintcrl device node.") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221013152212.416661-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4495a0a8b3d84816c9a46edf3ce060bbf267475 Author: AngeloGioacchino Del Regno Date: Thu Oct 13 17:22:07 2022 +0200 arm64: dts: mt2712e: Fix unit_address_vs_reg warning for oscillators Rename the fixed-clock oscillators to remove the unit address. This solves unit_address_vs_reg warnings. Fixes: 5d4839709c8e ("arm64: dts: mt2712: Add clock controller device nodes") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221013152212.416661-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 4d759c524c15dc4151e40b9e3f368147fda7b789 Author: AngeloGioacchino Del Regno Date: Thu Oct 13 17:22:06 2022 +0200 arm64: dts: mt6779: Fix devicetree build warnings Rename fixed-clock oscillators to oscillator-26m and oscillator-32k and remove the unit address to fix the unit_address_vs_reg warning; fix the unit address for interrupt and intpol controllers by removing a leading zero in their unit address. This commit fixes the following warnings: (unit_address_vs_reg): /oscillator@0: node has a unit name, but no reg or ranges property (unit_address_vs_reg): /oscillator@1: node has a unit name, but no reg or ranges property (simple_bus_reg): /soc/interrupt-controller@0c000000: simple-bus unit address format error, expected "c000000" (simple_bus_reg): /soc/intpol-controller@0c53a650: simple-bus unit address format error, expected "c53a650" Fixes: 4c7a6260775d ("arm64: dts: add dts nodes for MT6779") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221013152212.416661-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6779.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7898d047b1eb2bec2622668cd70181442a580c6d Author: AngeloGioacchino Del Regno Date: Thu Oct 13 17:22:05 2022 +0200 arm64: dts: mt7896a: Fix unit_address_vs_reg warning for oscillator Rename the oscillator fixed-clock to oscillator-40m and remove the unit address to fix warnings. arch/arm64/boot/dts/mediatek/mt7986a.dtsi:17.23-22.4: Warning (unit_address_vs_reg): /oscillator@0: node has a unit name, but no reg or ranges property Fixes: 1f9986b258c2 ("arm64: dts: mediatek: add clock support for mt7986a") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221013152212.416661-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 513c43328b189874fdfee3ae99cac81e5502e7f7 Author: AngeloGioacchino Del Regno Date: Wed Oct 5 11:34:03 2022 +0200 arm64: dts: mediatek: mt8195: Fix CPUs capacity-dmips-mhz The capacity-dmips-mhz parameter was miscalculated: this SoC runs the first (Cortex-A55) cluster at a maximum of 2000MHz and the second (Cortex-A78) cluster at a maximum of 3000MHz. In order to calculate the right capacity-dmips-mhz, the following test was performed: 1. CPUFREQ governor was set to 'performance' on both clusters 2. Ran dhrystone with 500000000 iterations for 10 times on each cluster 3. Calculate the mean result for each cluster 4. Calculate DMIPS/MHz: dmips_mhz = dmips_per_second / cpu_mhz 5. Scale results to 1024: result_c0 = (dmips_mhz_c0 - min_dmips_mhz(c0, c1)) / (max_dmips_mhz(c0, c1) - min_dmips_mhz(c0, c1)) * 1024 The mean results for this SoC are: Cluster 0 (LITTLE): 11990400 Dhry/s Cluster 1 (BIG): 59809036 Dhry/s The calculated scaled results are: Cluster 0: 307,934312801831 (rounded to 308) Cluster 1: 1024 Fixes: 37f2582883be ("arm64: dts: Add mediatek SoC mt8195 and evaluation board") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221005093404.33102-1-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0fa32dad1e78629cb42999dacd82489503fdf4c2 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:26 2022 +0100 KVM: selftests: Rename 'evmcs_test' to 'hyperv_evmcs' Conform to the rest of Hyper-V emulation selftests which have 'hyperv' prefix. Get rid of '_test' suffix as well as the purpose of this code is fairly obvious. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-49-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 2 +- tools/testing/selftests/kvm/Makefile | 2 +- tools/testing/selftests/kvm/x86_64/{evmcs_test.c => hyperv_evmcs.c} | 0 3 files changed, 2 insertions(+), 2 deletions(-) commit 9c2e881945dca4904e8817acf4f0a928570bd400 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:25 2022 +0100 KVM: selftests: hyperv_svm_test: Introduce L2 TLB flush test Enable Hyper-V L2 TLB flush and check that Hyper-V TLB flush hypercalls from L2 don't exit to L1 unless 'TlbLockCount' is set in the Partition assist page. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-48-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/svm.h | 4 ++ .../testing/selftests/kvm/x86_64/hyperv_svm_test.c | 59 ++++++++++++++++++++-- 2 files changed, 58 insertions(+), 5 deletions(-) commit 4b5d8b222bf185bda25b56de403afde7b6d3c466 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:24 2022 +0100 KVM: selftests: evmcs_test: Introduce L2 TLB flush test Enable Hyper-V L2 TLB flush and check that Hyper-V TLB flush hypercalls from L2 don't exit to L1 unless 'TlbLockCount' is set in the Partition assist page. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-47-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/evmcs.h | 2 + tools/testing/selftests/kvm/x86_64/evmcs_test.c | 50 +++++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) commit 75ee7505feae16bbfbed62115e04f762047c4765 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:23 2022 +0100 KVM: selftests: Introduce rdmsr_from_l2() and use it for MSR-Bitmap tests Hyper-V MSR-Bitmap tests do RDMSR from L2 to exit to L1. While 'evmcs_test' correctly clobbers all GPRs (which are not preserved), 'hyperv_svm_test' does not. Introduce a more generic rdmsr_from_l2() to avoid code duplication and remove hardcoding of MSRs. Do not put it in common code because it is really just a selftests bug rather than a processor feature that requires it. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-46-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/evmcs_test.c | 27 ++++++++-------------- .../testing/selftests/kvm/x86_64/hyperv_svm_test.c | 17 ++++++++++---- 2 files changed, 23 insertions(+), 21 deletions(-) commit 8fda37cf3d41f1dfb0667c4b10e3dd01d17735b8 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:22 2022 +0100 KVM: selftests: Stuff RAX/RCX with 'safe' values in vmmcall()/vmcall() vmmcall()/vmcall() are used to exit from L2 to L1 and no concrete hypercall ABI is currenty followed. With the introduction of Hyper-V L2 TLB flush it becomes (theoretically) possible that L0 will take responsibility for handling the call and no L1 exit will happen. Prevent this by stuffing RAX (KVM ABI) and RCX (Hyper-V ABI) with 'safe' values. While on it, convert vmmcall() to 'static inline', make it setup stack frame and move to include/x86_64/svm_util.h. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-45-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/processor.h | 5 ----- tools/testing/selftests/kvm/include/x86_64/svm_util.h | 14 ++++++++++++++ tools/testing/selftests/kvm/include/x86_64/vmx.h | 15 ++++++++++----- 3 files changed, 24 insertions(+), 10 deletions(-) commit 6c15c3c46520374e1a144942e5228f963f5eb2d5 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:21 2022 +0100 KVM: selftests: Allocate Hyper-V partition assist page In preparation to testing Hyper-V L2 TLB flush hypercalls, allocate so-called Partition assist page. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-44-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/hyperv.h | 5 +++++ tools/testing/selftests/kvm/lib/x86_64/hyperv.c | 5 +++++ 2 files changed, 10 insertions(+) commit 2dc458b8622182ac4d89de793c548cf04f632801 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:20 2022 +0100 KVM: selftests: Create a vendor independent helper to allocate Hyper-V specific test pages There's no need to pollute VMX and SVM code with Hyper-V specific stuff and allocate Hyper-V specific test pages for all test as only few really need them. Create a dedicated struct and an allocation helper. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-43-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/evmcs.h | 4 ++-- .../testing/selftests/kvm/include/x86_64/hyperv.h | 15 +++++++++++++++ tools/testing/selftests/kvm/include/x86_64/vmx.h | 8 -------- tools/testing/selftests/kvm/lib/x86_64/hyperv.c | 20 ++++++++++++++++++++ tools/testing/selftests/kvm/lib/x86_64/vmx.c | 12 ------------ tools/testing/selftests/kvm/x86_64/evmcs_test.c | 22 +++++++++++----------- 6 files changed, 48 insertions(+), 33 deletions(-) commit cd8f11bd6bbd00565cf39c6335cf2788795fdca7 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:19 2022 +0100 KVM: selftests: Split off load_evmcs() from load_vmcs() In preparation to putting Hyper-V specific test pages to a dedicated struct, move eVMCS load logic from load_vmcs(). Tests call load_vmcs() directly and the only one which needs 'enlightened' version is evmcs_test so there's not much gain in having this merged. Temporary pass both GPA and HVA to load_evmcs(). Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-42-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/evmcs.h | 10 +++++++ tools/testing/selftests/kvm/lib/x86_64/vmx.c | 32 ++++++++-------------- tools/testing/selftests/kvm/x86_64/evmcs_test.c | 4 +-- 3 files changed, 24 insertions(+), 22 deletions(-) commit e8f3d23c02d09210a980ef211b3e8a99d44cb602 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:18 2022 +0100 KVM: selftests: Move Hyper-V VP assist page enablement out of evmcs.h Hyper-V VP assist page is not eVMCS specific, it is also used for enlightened nSVM. Move the code to vendor neutral place. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-41-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/Makefile | 1 + tools/testing/selftests/kvm/include/x86_64/evmcs.h | 40 ++-------------------- .../testing/selftests/kvm/include/x86_64/hyperv.h | 31 +++++++++++++++++ tools/testing/selftests/kvm/lib/x86_64/hyperv.c | 21 ++++++++++++ tools/testing/selftests/kvm/x86_64/evmcs_test.c | 1 + 5 files changed, 56 insertions(+), 38 deletions(-) commit d7b14a868ac2122459b2d702fe05c75c48a687bf Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:17 2022 +0100 KVM: selftests: Sync 'struct hv_vp_assist_page' definition with hyperv-tlfs.h 'struct hv_vp_assist_page' definition doesn't match TLFS. Also, define 'struct hv_nested_enlightenments_control' and use it instead of opaque '__u64'. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-40-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/evmcs.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 1ad51c0c0cdd5315405d1c93a345635451c245bb Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:16 2022 +0100 KVM: selftests: Sync 'struct hv_enlightened_vmcs' definition with hyperv-tlfs.h 'struct hv_enlightened_vmcs' definition in selftests is not '__packed' and so we rely on the compiler doing the right padding. This is not obvious so it seems beneficial to use the same definition as in kernel. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-39-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/evmcs.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 9e7726a8a08a65ed48e2749ef62ec4970bdf851f Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:15 2022 +0100 KVM: selftests: Hyper-V PV TLB flush selftest Introduce a selftest for Hyper-V PV TLB flush hypercalls (HvFlushVirtualAddressSpace/HvFlushVirtualAddressSpaceEx, HvFlushVirtualAddressList/HvFlushVirtualAddressListEx). The test creates one 'sender' vCPU and two 'worker' vCPU which do busy loop reading from a certain GVA checking the observed value. Sender vCPU swaos the data page with another page filled with a different value. The expectation for workers is also altered. Without TLB flush on worker vCPUs, they may continue to observe old value. To guard against accidental TLB flushes for worker vCPUs the test is repeated 100 times. Hyper-V TLB flush hypercalls are tested in both 'normal' and 'XMM fast' modes. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-38-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 1 + .../testing/selftests/kvm/include/x86_64/hyperv.h | 1 + .../selftests/kvm/x86_64/hyperv_tlb_flush.c | 690 +++++++++++++++++++++ 4 files changed, 693 insertions(+) commit 4dca1319a796bc4c17e57a8727c1d95cecc892da Merge: 418e0721d408 552b7d131aa0 Author: David S. Miller Date: Mon Nov 21 11:33:02 2022 +0000 Merge branch 'sarx5-VCAP-debugfs' netdev.vger.kernel.org archive mirror Steen Hegelund says: ==================== net: Add support for VCAP debugFS in Sparx5 This provides support for getting VCAP instance, VCAP rule and VCAP port keyset configuration information via the debug file system. It builds on top of the initial IS2 VCAP support found in these series: https://lore.kernel.org/all/20221020130904.1215072-1-steen.hegelund@microchip.com/ https://lore.kernel.org/all/20221109114116.3612477-1-steen.hegelund@microchip.com/ https://lore.kernel.org/all/20221111130519.1459549-1-steen.hegelund@microchip.com/ Functionality: ============== The VCAP API exposes a /sys/kernel/debug/sparx5/vcaps folder containing the following entries: - raw__ This is a raw dump of the VCAP instance with a line for each available VCAP rule. This information is limited to the VCAP rule address, the rule size and the rule keyset name as this requires very little information from the VCAP cache. This can be used to detect if a valid rule is stored at the correct address. - _ This dumps the VCAP instance configuration: address ranges, chain id ranges, word size of keys and actions etc, and for each VCAP rule the details of keys (values and masks) and actions are shown. This is useful when discovering if the expected rule is present and in which order it will be matched. - This shows the keyset configuration per lookup and traffic type and the set of sticky bits (common for all interfaces). This is cleared when shown, so it is possible to sample over a period of time. It also shows if this port/lookup is enabled for matching in the VCAP. This can be used to find out which keyset the traffic being sent to a port, will be matched against, and if such traffic has been seen by one of the ports. Delivery: ========= This is current plan for delivering the full VCAP feature set of Sparx5: - TC protocol all support for IS2 VCAP - Sparx5 IS0 VCAP support - TC policer and drop action support (depends on the Sparx5 QoS support upstreamed separately) - Sparx5 ES0 VCAP support - TC flower template support - TC matchall filter support for mirroring and policing ports - TC flower filter mirror action support - Sparx5 ES2 VCAP support Version History: ================ v2 Removed a 'support' folder (used for integration testing) that had been added in patch 6/8 by a mistake. Wrapped long lines. v1 Initial version ==================== Signed-off-by: David S. Miller commit 552b7d131aa01bcb046fb635d66e256c3e7e13ee Author: Steen Hegelund Date: Thu Nov 17 22:31:14 2022 +0100 net: microchip: sparx5: Add VCAP debugfs KUNIT test This tests the functionality of the debugFS support: - finding valid keyset on an address - raw VCAP output - full rule VCAP output Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/Kconfig | 1 + .../net/ethernet/microchip/vcap/vcap_api_debugfs.c | 4 + .../microchip/vcap/vcap_api_debugfs_kunit.c | 545 +++++++++++++++++++++ .../net/ethernet/microchip/vcap/vcap_api_kunit.c | 6 +- 4 files changed, 553 insertions(+), 3 deletions(-) commit 71c9de995260222e739020104d477af4775a6d26 Author: Steen Hegelund Date: Thu Nov 17 22:31:13 2022 +0100 net: microchip: sparx5: Add VCAP locking to protect rules This ensures that the VCAP cache and the lists maintained in the VCAP instance is protected when accessed by different clients. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.c | 2 ++ drivers/net/ethernet/microchip/vcap/vcap_api.c | 10 ++++++++++ drivers/net/ethernet/microchip/vcap/vcap_api.h | 1 + drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c | 2 ++ 4 files changed, 15 insertions(+) commit 72d84dd609bea135f823e8d1a60380b4aa443ee5 Author: Steen Hegelund Date: Thu Nov 17 22:31:12 2022 +0100 net: microchip: sparx5: Add VCAP debugFS key/action support for the VCAP API This add support for displaying the keys and actions in a rule. The keys and action display format will be determined by the size and the type of the key or action. The longer keys will typically be displayed as a hexadecimal byte array. The actionset is not decoded in full as the Sparx5 IS2 only has one supported action, so this will be added later with other VCAP types. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/vcap_api.c | 12 +- .../net/ethernet/microchip/vcap/vcap_api_debugfs.c | 315 ++++++++++++++++++++- .../net/ethernet/microchip/vcap/vcap_api_private.h | 16 ++ 3 files changed, 333 insertions(+), 10 deletions(-) commit 3a7921560d2fd38433fdb2e9b8728ab832880680 Author: Steen Hegelund Date: Thu Nov 17 22:31:11 2022 +0100 net: microchip: sparx5: Add VCAP rule debugFS support for the VCAP API This add support to show all rules in a VCAP instance. The information shown is: - rule id - address range - size - chain id - keyset name, subword size, register span - actionset name, subword size, register span - counter value - sticky bit (one bit width counter) Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/vcap_api.c | 15 ++- .../net/ethernet/microchip/vcap/vcap_api_debugfs.c | 116 +++++++++++++++++++++ .../net/ethernet/microchip/vcap/vcap_api_private.h | 14 +++ 3 files changed, 141 insertions(+), 4 deletions(-) commit d4134d41e3cb589b55996429a0369dfff37a7180 Author: Steen Hegelund Date: Thu Nov 17 22:31:10 2022 +0100 net: microchip: sparx5: Add raw VCAP debugFS support for the VCAP API This adds support for decoding VCAP rules with a minimum number of attributes: address, rule size and keyset. This allows for a quick inspection of a VCAP instance to determine if the rule are present and in the correct order. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../microchip/sparx5/sparx5_vcap_debugfs.c | 179 +++++++++++++- drivers/net/ethernet/microchip/vcap/vcap_api.c | 65 ++--- .../net/ethernet/microchip/vcap/vcap_api_debugfs.c | 274 ++++++++++++++++++++- .../net/ethernet/microchip/vcap/vcap_api_private.h | 73 ++++++ 4 files changed, 535 insertions(+), 56 deletions(-) commit e0305cc1d125d76e6614a675b1126f00152d6789 Author: Steen Hegelund Date: Thu Nov 17 22:31:09 2022 +0100 net: microchip: sparx5: Add VCAP debugFS support Add a debugFS root folder for Sparx5 and add a vcap folder underneath with the VCAP instances and the ports Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/sparx5/Makefile | 1 + .../net/ethernet/microchip/sparx5/sparx5_main.c | 3 + .../net/ethernet/microchip/sparx5/sparx5_main.h | 3 + .../microchip/sparx5/sparx5_vcap_debugfs.c | 23 ++++++ .../microchip/sparx5/sparx5_vcap_debugfs.h | 33 ++++++++ .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 65 ++------------- .../ethernet/microchip/sparx5/sparx5_vcap_impl.h | 48 +++++++++++ drivers/net/ethernet/microchip/vcap/Makefile | 1 + drivers/net/ethernet/microchip/vcap/vcap_api.h | 13 ++- .../net/ethernet/microchip/vcap/vcap_api_debugfs.c | 93 ++++++++++++++++++++++ .../net/ethernet/microchip/vcap/vcap_api_debugfs.h | 41 ++++++++++ .../net/ethernet/microchip/vcap/vcap_api_kunit.c | 6 +- 12 files changed, 266 insertions(+), 64 deletions(-) commit 277e9179efe5cf3719c7cf181404d26a348c37cf Author: Steen Hegelund Date: Thu Nov 17 22:31:08 2022 +0100 net: microchip: sparx5: Ensure VCAP last_used_addr is set back to default This ensures that the last_used_addr in a VCAP instance is returned to the default value when all rules have been deleted. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/vcap_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcddc196d48182fbbe4b0add157baf50ae0e3d52 Author: Steen Hegelund Date: Thu Nov 17 22:31:07 2022 +0100 net: microchip: sparx5: Ensure L3 protocol has a default value This ensures that the l3_proto always have a valid value and that any dissector parsing errors causes the flower rule to be discarded. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 92f3bfaced6ef26ae2fa43c7952c80a31ba3d87d Merge: 54721ff7d696 8292493c22c8 Author: Arnd Bergmann Date: Mon Nov 21 12:29:25 2022 +0100 Merge tag 'renesas-riscv-soc-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/soc Renesas RISC-V SoC updates for v6.2 - Add Kconfig option for Renesas RISC-V SoCs. * tag 'renesas-riscv-soc-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: riscv: Kconfig.socs: Add ARCH_RENESAS kconfig option Link: https://lore.kernel.org/r/cover.1668788933.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 54721ff7d696b02b994fa736cd6613758078017b Merge: b8d0b1bef204 72684faf703c Author: Arnd Bergmann Date: Mon Nov 21 12:28:09 2022 +0100 Merge tag 'imx-soc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC change for 6.2: - A couple of cleanups from Geert Uytterhoeven to drop unneeded include of pinctrl machine header from i.MX3 and MXS code. * tag 'imx-soc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx3: Remove unneeded #include ARM: mxs: Remove unneeded #include Link: https://lore.kernel.org/r/20221119125733.32719-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit b8d0b1bef204037567b5eefae3270747577c3554 Merge: 566fb6711f18 dc6e328a8d28 Author: Arnd Bergmann Date: Mon Nov 21 12:27:39 2022 +0100 Merge tag 'ixp4xx-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/soc IXP4xx patches for v6.2: - Dropped the final static mappings. - Fixed some errors in the MAINTAINERS file. * tag 'ixp4xx-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: ixp4xx: Remove unused static map MAINTAINERS: adjust ARM/INTEL IXP4XX ARM ARCHITECTURE to ixp4xx clean-up Link: https://lore.kernel.org/r/CACRpkdYNwyZ1FDM07MkUfYyYGtXFQfy1xP9Utc5+K2+gn_ZW9g@mail.gmail.com Signed-off-by: Arnd Bergmann commit 418e0721d408e90564b22d4c74342557b7911d77 Merge: d9e8da558580 a5affbd8a73e Author: David S. Miller Date: Mon Nov 21 10:52:14 2022 +0000 Merge branch 'gve-alternate-missed-completions' Jeroen de Borst says: ==================== gve: Handle alternate miss-completions Some versions of the virtual NIC present miss-completions in an alternative way. Let the diver handle these alternate completions and announce this capability to the device. The capability is announced uing a new AdminQ command that sends driver information to the device. The device can refuse a driver if it is lacking support for a capability, or it can adopt it's behavior to work around OS specific issues. Changed in v5: - Removed comments in fucntion calls - Switched ENOTSUPP back to EOPNOTSUPP and made sure it gets passed Changed in v4: - Clarified new AdminQ command in cover letter - Changed EOPNOTSUPP to ENOTSUPP to match device's response Changed in v3: - Rewording cover letter - Added 'Reviewed-by: Jesse Brandeburg ' Changes in v2: - Changed the subject to include 'gve:' ==================== Signed-off-by: David S. Miller commit a5affbd8a73eb0a62378767f9d44527738213c07 Author: Jeroen de Borst Date: Thu Nov 17 08:27:01 2022 -0800 gve: Handle alternate miss completions The virtual NIC has 2 ways of indicating a miss-path completion. This handles the alternate. Signed-off-by: Jeroen de Borst Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve_adminq.h | 4 +++- drivers/net/ethernet/google/gve/gve_desc_dqo.h | 5 +++++ drivers/net/ethernet/google/gve/gve_tx_dqo.c | 20 +++++++++++++------- 3 files changed, 21 insertions(+), 8 deletions(-) commit c2a0c3ed5b64750a41cec052e40cb377b5c4b9bc Author: Jeroen de Borst Date: Thu Nov 17 08:27:00 2022 -0800 gve: Adding a new AdminQ command to verify driver Check whether the driver is compatible with the device presented. Signed-off-by: Jeroen de Borst Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve.h | 1 + drivers/net/ethernet/google/gve/gve_adminq.c | 21 ++++++++++- drivers/net/ethernet/google/gve/gve_adminq.h | 49 ++++++++++++++++++++++++++ drivers/net/ethernet/google/gve/gve_main.c | 52 ++++++++++++++++++++++++++++ 4 files changed, 122 insertions(+), 1 deletion(-) commit 62e73f000696cc41cfd237a1ad90b001ad0f76c6 Author: Neil Armstrong Date: Fri Nov 18 16:50:06 2022 +0100 arm64: dts: amlogic: add initial Odroid Go Ultra DTS This adds initial support for the Hardkernel Odroid Go Ultra. The Odroid Go Ultra is a portable gaming device with the following characteristics: - Amlogic S922X SoC - RK817 & RK818 PMICs - 2GiB LPDDR4 - On board 16GiB eMMC - Micro SD Card slot - 5inch 854×480 MIPI-DSI TFT LCD - Earphone stereo jack, 0.5Watt 8Ω Mono speaker - Li-Polymer 3.7V/4000mAh Battery - USB-A 2.0 Host Connector - x16 GPIO Input Buttons - 2x ADC Analog Joysticks - USB-C Port for USB2 Device and Charging The following are not yet handled: - Battery RK818 Gauge and Charging - Earphone stereo jack detect - 5inch 854×480 MIPI-DSI TFT LCD Link: https://lore.kernel.org/r/20221031-b4-odroid-go-ultra-initial-v2-2-a3df1e09b0af@linaro.org Signed-off-by: Neil Armstrong arch/arm64/boot/dts/amlogic/Makefile | 1 + .../dts/amlogic/meson-g12b-odroid-go-ultra.dts | 722 +++++++++++++++++++++ 2 files changed, 723 insertions(+) commit 66af218f8669a262b1bf89ba80f2acf1a3be429c Author: Neil Armstrong Date: Fri Nov 18 16:50:05 2022 +0100 dt-bindings: amlogic: document Odroid Go Ultra compatible This documents the Odroid Go Ultra, a portable gaming device, with the following characteristics: - Amlogic S922X SoC - RK817 & RK818 PMICs - 2GiB LPDDR4 - On board 16GiB eMMC - Micro SD Card slot - 5inch 854×480 MIPI-DSI TFT LCD - Earphone stereo jack, 0.5Watt 8Ω Mono speaker - Li-Polymer 3.7V/4000mAh Battery - USB-A 2.0 Host Connector - x16 GPIO Input Buttons - 2x ADC Analog Joysticks - USB-C Port for USB2 Device and Charging Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221031-b4-odroid-go-ultra-initial-v2-1-a3df1e09b0af@linaro.org Signed-off-by: Neil Armstrong Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + 1 file changed, 1 insertion(+) commit d9e8da558580513318a36f4ecb1b6e28e41b4de0 Author: Dmitry Vyukov Date: Thu Nov 17 17:21:01 2022 +0100 NFC: nci: Extend virtual NCI deinit test Extend the test to check the scenario when NCI core tries to send data to already closed device to ensure that nothing bad happens. Signed-off-by: Dmitry Vyukov Cc: Bongsu Jeon Cc: Krzysztof Kozlowski Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller tools/testing/selftests/nci/nci_dev.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 148b1da88605bd8e357fa3f8f4d5e3a8eccff3c5 Merge: 62a45b384a28 2e1f2c1066c1 Author: David S. Miller Date: Mon Nov 21 10:36:04 2022 +0000 Merge branch 'axiennet-mdio-bus-freq' Andy Chiu says: ==================== net: axienet: Use a DT property to configure frequency of the MDIO bus Some FPGA platforms have to set frequency of the MDIO bus lower than 2.5 MHz. Thus, we use a DT property, which is "clock-frequency", to work with it at boot time. The default 2.5 MHz would be set if the property is not pressent. Also, factor out mdio enable/disable functions due to the api change since 253761a0e61b7. Changelog: --- v5 --- 1. Make dt-binding patch prior to the implementation patch. 2. Disable mdio bus in error path. 3. Update description of some functions. --- v4 --- 1. change MAX_MDIO_FREQ to DEFAULT_MDIO_FREQ as suggested by Andrew. --- v3 RESEND --- 1. Repost the exact same patch again --- v3 --- 1. Fix coding style, and make probing of the driver fail if MDC overflow --- v2 --- 1. Use clock-frequency, as defined in mdio.yaml, to configure MDIO clock. 2. Only print out frequency if it is set to a non-standard value. 3. Reduce the scope of axienet_mdio_enable and remove axienet_mdio_disable because no one really uses it anymore. ==================== Signed-off-by: David S. Miller commit 2e1f2c1066c14bfdd915b556f50ff412d7c9f622 Author: Andy Chiu Date: Thu Nov 17 23:40:14 2022 +0800 net: axienet: set mdio clock according to bus-frequency Some FPGA platforms have 80KHz MDIO bus frequency constraint when connecting Ethernet to its on-board external Marvell PHY. Thus, we may have to set MDIO clock according to the DT. Otherwise, use the default 2.5 MHz, as specified by 802.3, if the entry is not present. Also, change MAX_MDIO_FREQ to DEFAULT_MDIO_FREQ because we may actually set MDIO bus frequency higher than 2.5MHz if undelying devices support it. And properly disable the mdio bus clock in error path. Signed-off-by: Andy Chiu Reviewed-by: Radhey Shyam Pandey Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 70 ++++++++++++++++------- 1 file changed, 49 insertions(+), 21 deletions(-) commit 6830604ec0c73ff8ecafb48046db7332210e58fd Author: Andy Chiu Date: Thu Nov 17 23:40:13 2022 +0800 dt-bindings: describe the support of "clock-frequency" in mdio mdio bus frequency is going to be configurable at boottime by a property in DT now, so add a description to it. Signed-off-by: Andy Chiu Reviewed-by: Greentime Hu Reviewed-by: Andrew Lunn Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/xilinx_axienet.txt | 2 ++ 1 file changed, 2 insertions(+) commit 29f8eefba3ba3c9a3416ee09dc868b288a09fc25 Author: Andy Chiu Date: Thu Nov 17 23:40:12 2022 +0800 net: axienet: Unexport and remove unused mdio functions Both axienet_mdio_{enable/disable} functions are no longer used in xilinx_axienet_main.c due to 253761a0e61b7. And axienet_mdio_disable is not even used in the mdio.c. So unexport and remove them. Signed-off-by: Andy Chiu Reviewed-by: Greentime Hu Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet.h | 2 -- drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 13 +------------ 2 files changed, 1 insertion(+), 14 deletions(-) commit e32354bb8fe3394ab37faa86c11ff4e06e296f72 Author: Hans de Goede Date: Sun Nov 20 23:48:20 2022 +0100 platform/x86/intel/hid: Add module-params for 5 button array + SW_TABLET_MODE reporting The driver has DMI-quirk tables for force-enabling 5 button array support and for 2 different ways of enabling SW_TABLET_MODE reporting. Add module parameters to allow user to enable the driver behavior currently only available through DMI quirks. This is useful for users to test this in bug-reports and for users to use as a workaround while new DMI quirks find their way upstream. Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/822 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20221120224820.746478-1-hdegoede@redhat.com drivers/platform/x86/intel/hid.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) commit 301e0d766d7018a579063f539837f0f1fa1b2948 Author: Hans de Goede Date: Thu Nov 17 12:02:44 2022 +0100 platform/x86: ideapad-laptop: Make touchpad_ctrl_via_ec a module option Remove the ACPI-HID + DMI-id deny-lists for touchpad_ctrl_via_ec and instead make it a module option which defaults to false. The touchpad sysfs attribute allowing directly writing VPCCMD_W_TOUCHPAD from userspace has been leading to a lot of bug-reports / patches adding both ACPI HID + dmi-id based deny-lists for it which then need to be expanded all the time going forward leading to a high maintenance load. At the same time the touchpad sysfs attribute is not a standard Linux userspace API. So it is not used in standard desktop-enviroments, instead it is only used in the following 2 rare circumstances: 1. Ideapad specific control-panel like applets 2. Custom scripts written by users For 1. these applets need to already deal with the touchpad sysfs attr sometimes not being there because of the existing deny lists so hiding it be default should not cause an issue; and most desktop environments already have a touchpad-disable option in their native control-panel, so having an ideapad specific toggle for this is not necessary. For 2. since these users are already customizing their systems they can add the module option if they want to keep using the touchpad sysfs attribute. Signed-off-by: Hans de Goede Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Tested-by: Maxim Mikityanskiy Link: https://lore.kernel.org/r/20221117110244.67811-7-hdegoede@redhat.com drivers/platform/x86/ideapad-laptop.c | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) commit a10ba160d427e78ffa2ab15a86cacaec291fa58a Author: Hans de Goede Date: Thu Nov 17 12:02:43 2022 +0100 platform/x86: ideapad-laptop: Stop writing VPCCMD_W_TOUCHPAD at probe time Commit d69cd7eea93e ("platform/x86: ideapad-laptop: Disable touchpad_switch for ELAN0634") from Janary 2021 added a flag hiding the touchpad sysfs-attr and disabling ideapad_sync_touchpad_state() because some devices "do not use EC to switch touchpad". At the same time this added a write(VPCCMD_W_TOUCHPAD, 1) call at probe time on these same devices. This seems to be copied from the rfkill code which does something similar when hw rfkill support is disabled. But for the rfkill code this is known to be necessary on some models, where as for the touchpad control no motivation is given for doing this and prior to this patch there were no reports of needing to do this. So this seems unnecessary; and it is best to avoid poking the hardware unnecessary to avoid unwanted side effects, so remove this. Signed-off-by: Hans de Goede Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Tested-by: Maxim Mikityanskiy Link: https://lore.kernel.org/r/20221117110244.67811-6-hdegoede@redhat.com drivers/platform/x86/ideapad-laptop.c | 4 ---- 1 file changed, 4 deletions(-) commit 5829f8a897e4f030cd2d32a930eea8954ab5dcd3 Author: Hans de Goede Date: Thu Nov 17 12:02:42 2022 +0100 platform/x86: ideapad-laptop: Send KEY_TOUCHPAD_TOGGLE on some models On recent Ideapad models the EC does not control the touchpad at all, so instead of sending KEY_TOUCHPAD_ON/ _OFF on touchpad toggle hotkey events, ideapad-laptop should send KEY_TOUCHPAD_TOGGLE and let userspace handle the toggling. Check for this by checking if the value read from VPCCMD_R_TOUCHPAD actually changes when receiving a touchpad-toggle hotkey event; and if it does not change send KEY_TOUCHPAD_TOGGLE to userspace to let userspace enable/disable the touchpad in software. Note this also drops the priv->features.touchpad_ctrl_via_ec check from ideapad_sync_touchpad_state() so that KEY_TOUCHPAD_TOGGLE will be send on laptops where this is not set too. This can be safely dropped now because the i8042_command(I8042_CMD_AUX_ENABLE/_DISABLE) call is now guarded by its own feature flag. Signed-off-by: Hans de Goede Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Tested-by: Maxim Mikityanskiy Link: https://lore.kernel.org/r/20221117110244.67811-5-hdegoede@redhat.com drivers/platform/x86/ideapad-laptop.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit c69e7d843d2c34b80b8731a5dc57c34ea04a3edf Author: Hans de Goede Date: Thu Nov 17 12:02:41 2022 +0100 platform/x86: ideapad-laptop: Only toggle ps2 aux port on/off on select models Recently there have been multiple patches to disable the ideapad-laptop's touchpad control code, because it is causing issues on various laptops: Commit d69cd7eea93e ("platform/x86: ideapad-laptop: Disable touchpad_switch for ELAN0634") Commit a231224a601c ("platform/x86: ideapad-laptop: Disable touchpad_switch") The turning on/off of the ps2 aux port was added specifically for the IdeaPad Z570, where the EC does toggle the touchpad on/off LED and toggles the value returned by reading VPCCMD_R_TOUCHPAD, but it does not actually turn on/off the touchpad. The ideapad-laptop code really should not be messing with the i8042 controller on all devices just for this special case. Add a new ctrl_ps2_aux_port flag set based on a DMI based allow-list for devices which need this workaround, populating it with just the Ideapad Z570 for now. This also adds a module parameter so that this behavior can easily be enabled on other models which may need it. Signed-off-by: Hans de Goede Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Tested-by: Maxim Mikityanskiy Link: https://lore.kernel.org/r/20221117110244.67811-4-hdegoede@redhat.com drivers/platform/x86/ideapad-laptop.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit f4dd8c44bb831ff885680bc77111fa39c193a93f Author: Hans de Goede Date: Thu Nov 17 12:02:40 2022 +0100 platform/x86: ideapad-laptop: Do not send KEY_TOUCHPAD* events on probe / resume The sending of KEY_TOUCHPAD* events is causing spurious touchpad OSD showing on resume. Disable the sending of events on probe / resume to fix this. Signed-off-by: Hans de Goede Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Tested-by: Maxim Mikityanskiy Link: https://lore.kernel.org/r/20221117110244.67811-3-hdegoede@redhat.com drivers/platform/x86/ideapad-laptop.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 289a59895e7a380cdc7fe2780d3073f4b9237020 Author: Hans de Goede Date: Thu Nov 17 12:02:39 2022 +0100 platform/x86: ideapad-laptop: Refactor ideapad_sync_touchpad_state() Add an error exit for read_ec_data() failing instead of putting the main body in an if (success) block. Signed-off-by: Hans de Goede Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Tested-by: Maxim Mikityanskiy Link: https://lore.kernel.org/r/20221117110244.67811-2-hdegoede@redhat.com drivers/platform/x86/ideapad-laptop.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 62a45b384a2833fbdff4658a56dab38e9d6f4580 Author: Dan Carpenter Date: Thu Nov 17 18:29:05 2022 +0300 net: microchip: sparx5: prevent uninitialized variable Smatch complains that: drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c:112 sparx5_dcb_apptrust_validate() error: uninitialized symbol 'match'. This would only happen if the: if (sparx5_dcb_apptrust_policies[i].nselectors != nselectors) condition is always true (they are not equal). The "nselectors" variable comes from dcbnl_ieee_set() and it is a number between 0-256. This seems like a probably a real bug. Fixes: 23f8382cd95d ("net: microchip: sparx5: add support for apptrust") Signed-off-by: Dan Carpenter Reviewed-by: Daniel Machon Signed-off-by: David S. Miller drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36273e5b4e3a934c6d346c8f0b16b97e018094af Author: Christoph Hellwig Date: Sun Nov 13 17:29:02 2022 +0100 udf: remove ->writepage ->writepage is a very inefficient method to write back data, and only used through write_cache_pages or as a fallback when no ->migrate_folio method is present. Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation in extfat. Signed-off-by: Christoph Hellwig Signed-off-by: Jan Kara fs/udf/inode.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit a27c442d61cea70f38d9340528225b234888885b Author: Christoph Hellwig Date: Sun Nov 13 17:28:55 2022 +0100 ext2: remove ->writepage ->writepage is a very inefficient method to write back data, and only used through write_cache_pages or as a fallback when no ->migrate_folio method is present. Signed-off-by: Christoph Hellwig Signed-off-by: Jan Kara fs/ext2/inode.c | 6 ------ 1 file changed, 6 deletions(-) commit bc943f4872a722c5cc64d1cf41daaaf4ec63158e Author: Jan Kara Date: Wed Nov 16 19:08:23 2022 +0100 ext2: 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. Signed-off-by: Jan Kara fs/ext2/dir.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit 76ad5c0a4546d38afe9ebdccbe6dd49f2a79cb71 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:26 2022 +0100 media: v4l2-core/tuner-core: 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: Hans Verkuil [hverkuil: deleted kerneldoc reference to removed id argument] drivers/media/v4l2-core/tuner-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 80458f6311e6a969fc1ebafc18ae0b65d5755824 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:25 2022 +0100 media: usb: go7007: s2250-board: 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: Hans Verkuil drivers/media/usb/go7007/s2250-board.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 14fb55160cc6e9374b2e6045f981877a27de225d Author: Uwe Kleine-König Date: Fri Nov 18 23:42:24 2022 +0100 media: tuners/tua9001: 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: Hans Verkuil drivers/media/tuners/tua9001.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 14b9e482d1a03e4aa873554e651dee8e72631053 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:23 2022 +0100 media: tuners/tda18250: 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: Hans Verkuil drivers/media/tuners/tda18250.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1d3264c1197af12e21987d248ad427f2afe84ac2 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:22 2022 +0100 media: tuners/tda18212: 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: Hans Verkuil drivers/media/tuners/tda18212.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c737ea120d5f0bcc501fc4a586f6258b98750a4f Author: Uwe Kleine-König Date: Fri Nov 18 23:42:20 2022 +0100 media: tuners/qm1d1c0042: 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 Tested-by: Akihiro Tsukada Signed-off-by: Hans Verkuil drivers/media/tuners/qm1d1c0042.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f181b01bce791ecd6f68f77b36c35340160df0c4 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:19 2022 +0100 media: tuners/qm1d1b0004: 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 Tested-by: Akihiro Tsukada Signed-off-by: Hans Verkuil drivers/media/tuners/qm1d1b0004.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35923dcd48ac0bce5de4b1a7638056850a58b091 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:18 2022 +0100 media: tuners/mxl301rf: 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 Tested-by: Akihiro Tsukada Signed-off-by: Hans Verkuil drivers/media/tuners/mxl301rf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9ebd054327b3525e726f758d4a47c63501192841 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:17 2022 +0100 media: tuners/mt2060: 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: Hans Verkuil drivers/media/tuners/mt2060.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0be78933ae7d1da37548d1abfd6b649469638177 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:16 2022 +0100 media: tuners/m88rs6000t: 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: Hans Verkuil drivers/media/tuners/m88rs6000t.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0bc67cfcab2c7757adb2ada2e16994e7e1a1a8f3 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:15 2022 +0100 media: tuners/fc2580: 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: Hans Verkuil drivers/media/tuners/fc2580.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 58bf44e80feafae4a1ca751acd97b4cf6a6d3ffa Author: Uwe Kleine-König Date: Fri Nov 18 23:42:14 2022 +0100 media: tuners/e4000: 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: Hans Verkuil drivers/media/tuners/e4000.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7d4833b166021047b00bcc138572ddfa5c1a81e6 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:13 2022 +0100 media: vidtv: Convert to i2c's .probe_new() The probe functions 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: Hans Verkuil drivers/media/test-drivers/vidtv/vidtv_demod.c | 5 ++--- drivers/media/test-drivers/vidtv/vidtv_tuner.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) commit d73a6a4308c04bc4a9be993511638ec19b923285 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:12 2022 +0100 media: radio/tef6862: 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: Hans Verkuil drivers/media/radio/tef6862.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f6b100b41b2f16041718e22eb5d691bcea1b4dea Author: Uwe Kleine-König Date: Fri Nov 18 23:42:11 2022 +0100 media: radio/saa7706h: 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: Hans Verkuil drivers/media/radio/saa7706h.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit df3d5d5dd8df6e2f6d59b02b04d66a8afaa16d72 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:10 2022 +0100 media: radio/radio-tea5764: 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: Hans Verkuil drivers/media/radio/radio-tea5764.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 72c6a95ee8f3a98f6d8490d5736c9931c99b37e5 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:09 2022 +0100 media: i2c/wm8775: 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: Hans Verkuil drivers/media/i2c/wm8775.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 299b012900bc1b79d07a6bb2f6965e177cc22d81 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:08 2022 +0100 media: i2c/wm8739: 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: Hans Verkuil drivers/media/i2c/wm8739.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 655ec4497c5ddf5ec7d9966185b48abfe4b9c034 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:07 2022 +0100 media: i2c/vs6624: 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: Hans Verkuil drivers/media/i2c/vs6624.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b7a45a228fff4ae8e820ee28d47b2cb235ec00b7 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:06 2022 +0100 media: i2c/vpx3220: 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: Hans Verkuil drivers/media/i2c/vpx3220.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ce263690ce2b370ff03e569b076a60d1536efac0 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:05 2022 +0100 media: i2c/vp27smpx: 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: Hans Verkuil drivers/media/i2c/vp27smpx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bd38d13785458af4f96172d0b83dedeea837269b Author: Uwe Kleine-König Date: Fri Nov 18 23:42:03 2022 +0100 media: i2c/upd64083: 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: Hans Verkuil drivers/media/i2c/upd64083.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b75ac196ef2365d01e93a7a20994dc476cd3511b Author: Uwe Kleine-König Date: Fri Nov 18 23:42:02 2022 +0100 media: i2c/upd64031a: 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: Hans Verkuil drivers/media/i2c/upd64031a.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 835fb18984d4dc53f910c0ab6491b1f7a86a55f7 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:01 2022 +0100 media: i2c/uda1342: 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: Hans Verkuil drivers/media/i2c/uda1342.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dc90c426dd8711a3e0e1eb1fd604c9ea34103c99 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:00 2022 +0100 media: i2c/tw9910: 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: Hans Verkuil drivers/media/i2c/tw9910.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4059fd7ecfd7222753f230330dc05b4d9b9df283 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:59 2022 +0100 media: i2c/tw9906: 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: Hans Verkuil drivers/media/i2c/tw9906.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4fa8bcc3e2294ee502aa479e1dc048cb5083992d Author: Uwe Kleine-König Date: Fri Nov 18 23:41:58 2022 +0100 media: i2c/tw9903: 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: Hans Verkuil drivers/media/i2c/tw9903.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4f484686bc92774651d205a95615c296d0afa590 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:57 2022 +0100 media: i2c/tw2804: 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: Hans Verkuil drivers/media/i2c/tw2804.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c788e8756bb773db4562caf3b484e6fd2c0712bd Author: Uwe Kleine-König Date: Fri Nov 18 23:41:54 2022 +0100 media: i2c/tlv320aic23b: 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: Hans Verkuil drivers/media/i2c/tlv320aic23b.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f15f764b33562fc1a1d32cf809568026c0bf2188 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:53 2022 +0100 media: i2c/ths7303: 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: Hans Verkuil drivers/media/i2c/ths7303.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8569336fc06c7675f28cc2a983d4bccc44d34713 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:52 2022 +0100 media: i2c/tea6420: 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: Hans Verkuil drivers/media/i2c/tea6420.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 40fd1cc96aee8b7cb21b504b620ef9b7b6dd0ae6 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:51 2022 +0100 media: i2c/tea6415c: 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: Hans Verkuil drivers/media/i2c/tea6415c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2cd4987d743a1ce6c9fb30287006460dd02cac96 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:50 2022 +0100 media: i2c/tda9840: 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: Hans Verkuil drivers/media/i2c/tda9840.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 32231a537a86cd93d6a71b9084aa11ff683aaefc Author: Uwe Kleine-König Date: Fri Nov 18 23:41:49 2022 +0100 media: i2c/tda7432: 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: Hans Verkuil drivers/media/i2c/tda7432.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3e985fcc1967dbee497b77d3d9031af1697b8ffd Author: Uwe Kleine-König Date: Fri Nov 18 23:41:47 2022 +0100 media: i2c/sr030pc30: 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: Hans Verkuil drivers/media/i2c/sr030pc30.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a22e9128e318f39fa17ebc458a7834924f768d3b Author: Uwe Kleine-König Date: Fri Nov 18 23:41:46 2022 +0100 media: i2c/sony-btf-mpx: 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: Hans Verkuil drivers/media/i2c/sony-btf-mpx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a6d8c502303109c811875e077c05eac33371caab Author: Uwe Kleine-König Date: Fri Nov 18 23:41:45 2022 +0100 media: i2c/saa7185: 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: Hans Verkuil drivers/media/i2c/saa7185.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9b3c009e0b2a2cab110d6627304f4149dd09011c Author: Uwe Kleine-König Date: Fri Nov 18 23:41:44 2022 +0100 media: i2c/saa717x: 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: Hans Verkuil drivers/media/i2c/saa717x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3f92c3e9d96c4e68cc9b74233704000a676f87b3 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:41 2022 +0100 media: i2c/saa7110: 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: Hans Verkuil drivers/media/i2c/saa7110.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit afc473e2540f6de5515e642ea0339d415f53a4e5 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:40 2022 +0100 media: i2c/saa6752hs: 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: Hans Verkuil drivers/media/i2c/saa6752hs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0764554c03a7ae88a3ca277a039504e8fbd4bc60 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:39 2022 +0100 media: i2c/saa6588: 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: Hans Verkuil drivers/media/i2c/saa6588.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d7ba9d380bae0d2f80eb425381da8f78f1092cee Author: Uwe Kleine-König Date: Fri Nov 18 23:41:38 2022 +0100 media: i2c/s5k6aa: 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: Hans Verkuil drivers/media/i2c/s5k6aa.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3461898ded3bdd3a5eb9f8777a3b32832fffec4a Author: Uwe Kleine-König Date: Fri Nov 18 23:41:37 2022 +0100 media: i2c/s5k4ecgx: 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: Hans Verkuil drivers/media/i2c/s5k4ecgx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e9d8b2bb476d75e11245eb9ecc1686e5f9654391 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:36 2022 +0100 media: i2c/rj54n1cb0c: 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: Hans Verkuil drivers/media/i2c/rj54n1cb0c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5555116e3462cb627f4d45f110ed414030f3659b Author: Uwe Kleine-König Date: Fri Nov 18 23:41:35 2022 +0100 media: i2c/ov9640: 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: Hans Verkuil drivers/media/i2c/ov9640.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 00e9546f9f1991cd5aa85f04e96167f6ca110603 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:33 2022 +0100 media: i2c/ov7640: 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: Hans Verkuil drivers/media/i2c/ov7640.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a2e2910963cdcb4ae0a943a3670650b6ae07be41 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:32 2022 +0100 media: i2c/ov6650: 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: Janusz Krzysztofik Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil drivers/media/i2c/ov6650.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2ab6e40840b66c1dd360ea71bc2d46cd423cae10 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:31 2022 +0100 media: i2c/ov13858: 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: Hans Verkuil drivers/media/i2c/ov13858.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 50f6875df4a2cdeb38b327bdd54a0a896ad8fba0 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:30 2022 +0100 media: i2c/noon010pc30: 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: Hans Verkuil drivers/media/i2c/noon010pc30.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e3df7926f0d4d4ce89bc48f8d77415dedcc5924e Author: Uwe Kleine-König Date: Fri Nov 18 23:41:28 2022 +0100 media: i2c/mt9v011: 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: Hans Verkuil drivers/media/i2c/mt9v011.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 749f885b50da2437fc1307b6aae5538b7a7261ac Author: Uwe Kleine-König Date: Fri Nov 18 23:41:27 2022 +0100 media: i2c/mt9t112: 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: Hans Verkuil drivers/media/i2c/mt9t112.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fac1faca7473cffc04170eb5455e9c674187ce39 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:26 2022 +0100 media: i2c/mt9t001: 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: Hans Verkuil drivers/media/i2c/mt9t001.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7e4454a965b2413d9580047aa8b2c1b4ab141a3e Author: Uwe Kleine-König Date: Fri Nov 18 23:41:24 2022 +0100 media: i2c/mt9m032: 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: Hans Verkuil drivers/media/i2c/mt9m032.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c14e858922d18cb2cc8b110eb2b639382ea1182f Author: Uwe Kleine-König Date: Fri Nov 18 23:41:22 2022 +0100 media: i2c/ml86v7667: 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: Hans Verkuil drivers/media/i2c/ml86v7667.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2ac2793f8d7f957c3a1a8c0a0f3e8b671efce48f Author: Uwe Kleine-König Date: Fri Nov 18 23:41:21 2022 +0100 media: m5mols: 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: Hans Verkuil drivers/media/i2c/m5mols/m5mols_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 270d9afa5b75f38e5da73dc1db1b0708d859fab4 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:20 2022 +0100 media: i2c/m52790: 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: Hans Verkuil drivers/media/i2c/m52790.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit be353426dbfb0dd5222829b8c881b2ece732fd01 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:19 2022 +0100 media: i2c/lm3646: 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: Hans Verkuil drivers/media/i2c/lm3646.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8dba8bc95ece7885791213d662e0fa59eec6fc1c Author: Uwe Kleine-König Date: Fri Nov 18 23:41:18 2022 +0100 media: i2c/lm3560: 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: Hans Verkuil drivers/media/i2c/lm3560.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2a47e9fd51991cf95f0f0aa72f56f02e944541af Author: Uwe Kleine-König Date: Fri Nov 18 23:41:17 2022 +0100 media: i2c/ks0127: 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: Hans Verkuil drivers/media/i2c/ks0127.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c6d4866e3868d9a5372c40fa05410339b932420 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:15 2022 +0100 media: cx25840: 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: Hans Verkuil drivers/media/i2c/cx25840/cx25840-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a594a221314ff89b45474e81a7f4442afedc9a5d Author: Uwe Kleine-König Date: Fri Nov 18 23:41:13 2022 +0100 media: i2c/cs5345: 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: Hans Verkuil drivers/media/i2c/cs5345.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5fb1abe16b443fcefcb5e98f4fae646dde794d23 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:12 2022 +0100 media: i2c/cs3308: 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: Hans Verkuil drivers/media/i2c/cs3308.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 320451afdc46c71adc39add179a39f5fde93ddcc Author: Uwe Kleine-König Date: Fri Nov 18 23:41:11 2022 +0100 media: i2c/bt866: 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: Hans Verkuil drivers/media/i2c/bt866.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b1995c5600099c4721ec41ef58e335572ff32fe5 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:10 2022 +0100 media: i2c/bt856: 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: Hans Verkuil drivers/media/i2c/bt856.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0a1533e3e68c3c0b5fa101774fc03c65310d7557 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:09 2022 +0100 media: i2c/bt819: 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: Hans Verkuil drivers/media/i2c/bt819.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit da6381ba93152fdc36f676280076d62e89060c35 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:08 2022 +0100 media: i2c/ak881x: 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: Hans Verkuil drivers/media/i2c/ak881x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ce409f0e95f6e80a846b83e2661b099ac254bb57 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:07 2022 +0100 media: i2c/adv7842: 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: Hans Verkuil drivers/media/i2c/adv7842.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 22d045d6cc4605f0c8ab04d5617d4a55051be653 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:05 2022 +0100 media: i2c/adv7511-v4l2: 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: Hans Verkuil drivers/media/i2c/adv7511-v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 60622dd6ee7faeb063c118346341faeffe3b3f15 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:04 2022 +0100 media: i2c/adv7393: 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: Hans Verkuil drivers/media/i2c/adv7393.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f31dab40c5225b86154ff18950d5700a19e1b7f9 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:03 2022 +0100 media: i2c/adv7183: 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: Hans Verkuil drivers/media/i2c/adv7183.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e42e75836df05c71e742035af305b4cd2a1fa00a Author: Uwe Kleine-König Date: Fri Nov 18 23:41:01 2022 +0100 media: i2c/adv7175: 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: Hans Verkuil drivers/media/i2c/adv7175.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1c511423f828cf00689b44d7c9f44b89fec60ab4 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:00 2022 +0100 media: i2c/adv7170: 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: Hans Verkuil drivers/media/i2c/adv7170.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8981b1e816fb0812765a0532654772b413a8538d Author: Uwe Kleine-König Date: Fri Nov 18 23:40:59 2022 +0100 media: i2c/adp1653: 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: Hans Verkuil drivers/media/i2c/adp1653.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 45d7e83cc5a866291954ecf8a79a48b90c4c10b5 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:58 2022 +0100 media: i2c/ad9389b: 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: Hans Verkuil drivers/media/i2c/ad9389b.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ed24a642142e8436ef26961b139270973eeda98 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:57 2022 +0100 media: i2c/ad5820: 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: Hans Verkuil drivers/media/i2c/ad5820.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 49a7233fee0f2684dcbfd471c53fc46ca83ab150 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:56 2022 +0100 media: dvb-frontends/ts2020: 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: Hans Verkuil drivers/media/dvb-frontends/ts2020.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2caaba0b90d461c731e35a4545e4efe0cf171943 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:55 2022 +0100 media: dvb-frontends/tda10071: 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: Hans Verkuil drivers/media/dvb-frontends/tda10071.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ce087f3102b86ac0546e7e8d05e5585beb476669 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:53 2022 +0100 media: dvb-frontends/stv6110x: 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: Hans Verkuil drivers/media/dvb-frontends/stv6110x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit be95f69c043aefb00f63b68328035905c745c4b6 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:52 2022 +0100 media: dvb-frontends/stv090x: 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: Hans Verkuil drivers/media/dvb-frontends/stv090x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 06a61dc55ab237f9f30f248c9fa7e35ddbad6d37 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:51 2022 +0100 media: dvb-frontends/sp2: 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: Hans Verkuil drivers/media/dvb-frontends/sp2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c7c631957b6010ebfeee904989f363b6a06134aa Author: Uwe Kleine-König Date: Fri Nov 18 23:40:50 2022 +0100 media: dvb-frontends/si2168: 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: Hans Verkuil drivers/media/dvb-frontends/si2168.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3be25b9ee3c1626c6d24ef167f03ffbb0e4f7cfe Author: Uwe Kleine-König Date: Fri Nov 18 23:40:49 2022 +0100 media: dvb-frontends/si2165: 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: Hans Verkuil drivers/media/dvb-frontends/si2165.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit db33c3cd8364f5482a395170d4753a8caeefadff Author: Uwe Kleine-König Date: Fri Nov 18 23:40:48 2022 +0100 media: dvb-frontends/rtl2832: 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: Hans Verkuil drivers/media/dvb-frontends/rtl2832.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 75bcbaf722540c41e6d219ec854002b4906e2fc6 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:47 2022 +0100 media: dvb-frontends/rtl2830: 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: Hans Verkuil drivers/media/dvb-frontends/rtl2830.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f35a7249b829a428469ce395658375416eaf23e0 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:46 2022 +0100 media: dvb-frontends/mxl692: 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: Hans Verkuil drivers/media/dvb-frontends/mxl692.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 32f2129cce26d5fadf5a2edc7dd9dea0ad7c5b03 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:45 2022 +0100 media: dvb-frontends/mn88473: 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: Hans Verkuil drivers/media/dvb-frontends/mn88473.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d5f96d7a358b9bdf68c702838dc5facbe8866eb6 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:44 2022 +0100 media: dvb-frontends/mn88472: 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: Hans Verkuil drivers/media/dvb-frontends/mn88472.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0bada33eefd725fce668f106443510fab010b1ff Author: Uwe Kleine-König Date: Fri Nov 18 23:40:41 2022 +0100 media: dvb-frontends/lgdt330x: 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: Hans Verkuil drivers/media/dvb-frontends/lgdt330x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f11b4a06b4ffc6343212b6f3666f6bc4ebf1cfb9 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:40 2022 +0100 media: dvb-frontends/lgdt3306a: 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: Hans Verkuil drivers/media/dvb-frontends/lgdt3306a.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 006dfdbb05ce66195f66f5367e689542a927e077 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:39 2022 +0100 media: dvb-frontends/helene: 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: Hans Verkuil drivers/media/dvb-frontends/helene.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8f17faa5c6d32bac949f1b32a0215a537b903d45 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:37 2022 +0100 media: dvb-frontends/cxd2820r_core: 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: Hans Verkuil drivers/media/dvb-frontends/cxd2820r_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 36628e8ed252d6425c35b863b2cfc5fc4d6c0ff5 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:36 2022 +0100 media: dvb-frontends/cxd2099: 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: Hans Verkuil drivers/media/dvb-frontends/cxd2099.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3a29275de5fe05f8bd4ac16c826c884e44197507 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:35 2022 +0100 media: dvb-frontends/au8522_decoder: 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: Hans Verkuil drivers/media/dvb-frontends/au8522_decoder.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 479ac4dd6daef129ddf14e7fcb2e9742b05e4d38 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:34 2022 +0100 media: dvb-frontends/af9033: 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: Hans Verkuil drivers/media/dvb-frontends/af9033.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e84171209b17f3cdc67bd5319ac3c45a0d1f7fb0 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:33 2022 +0100 media: dvb-frontends/af9013: 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: Hans Verkuil drivers/media/dvb-frontends/af9013.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6266daa65234be4bd9389bad13cdb2f64bc0a2ec Author: Uwe Kleine-König Date: Fri Nov 18 23:40:32 2022 +0100 media: dvb-frontends/a8293: 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: Hans Verkuil drivers/media/dvb-frontends/a8293.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cdd1db76607d0732bae522833c7aa673b8882203 Merge: 55aa08a5be90 dcad240c15c1 Author: Arnd Bergmann Date: Mon Nov 21 11:01:48 2022 +0100 Merge branch 'dt/dtbo-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux into soc/dt * 'dt/dtbo-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: kbuild: Cleanup DT Overlay intermediate files as appropriate staging: pi433: overlay: Rename overlay source file from .dts to .dtso of: overlay: rename overlay source files from .dts to .dtso kbuild: Allow DTB overlays to built into .dtbo.S files kbuild: Allow DTB overlays to built from .dtso named source files Link: https://lore.kernel.org/r/20221118211103.GA1334449-robh@kernel.org Signed-off-by: Arnd Bergmann commit 55aa08a5be90f6dba0f8759d039de41fc1841c4a Merge: 285fde40c112 b13d48408e9f Author: Arnd Bergmann Date: Mon Nov 21 10:57:29 2022 +0100 Merge tag 'sunxi-dt-for-6.2-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/dt - Added H616 USB node - Enabled bluetooth on Pinebook A64 - Added f1c100s PWM, I2C, CIR and LRADC nodes - Added USB HCI0 PHYs property to H3/H5 * tag 'sunxi-dt-for-6.2-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sunxi: H3/H5: Add phys property to USB HCI0 ARM: dts: suniv: f1c100s: add LRADC node ARM: dts: suniv: f1c100s: add CIR DT node dt-bindings: media: IR: Add F1C100s IR compatible string ARM: dts: suniv: f1c100s: add I2C DT nodes ARM: dts: suniv: f1c100s: add PWM node dt-bindings: pwm: allwinner,sun4i-a10: Add F1C100s compatible arm64: dts: allwinner: a64: enable Bluetooth on Pinebook arm64: dts: allwinner: h616: X96 Mate: Add USB nodes arm64: dts: allwinner: h616: OrangePi Zero 2: Add USB nodes arm64: dts: allwinner: h616: Add USB nodes dt-bindings: usb: Add H616 compatible string ARM: dts: axp22x/axp809: Add GPIO controller nodes ARM: dts: axp803/axp81x: Drop GPIO LDO pinctrl nodes Link: https://lore.kernel.org/r/Y3fuAosinWbrj+Dy@jernej-laptop Signed-off-by: Arnd Bergmann commit 285fde40c1122e67ba011b2a2d5c5b4cac0f0956 Merge: bdeaf22dfaca 7a3c62678699 Author: Arnd Bergmann Date: Mon Nov 21 10:56:43 2022 +0100 Merge tag 'at91-dt-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt AT91 DT for 6.2 #2 It contains: - one typo fix for a SAMA7G5 pin; the pin is not used anywhere in the device trees. * tag 'at91-dt-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama7g5: fix signal name of pin PD8 Link: https://lore.kernel.org/r/20221118131214.301678-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit 7fdc03a7370fb64d12d5e93359464f9f72af5adc Author: David E. Box Date: Fri Nov 18 16:23:43 2022 -0800 tools/arch/x86: intel_sdsi: Add support for reading meter certificates Add option to read and decode On Demand meter certificates. Link: https://github.com/intel/intel-sdsi/blob/master/meter-certificate.rst Signed-off-by: David E. Box Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221119002343.1281885-10-david.e.box@linux.intel.com Signed-off-by: Hans de Goede tools/arch/x86/intel_sdsi/intel_sdsi.c | 110 ++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 2 deletions(-) commit bdeaf22dfacaea87003abe7498f91b4e516861bf Author: Kunihiko Hayashi Date: Fri Nov 18 01:32:19 2022 +0900 ARM: dts: uniphier: Add Pro5 board support Initial version of devicetree sources for Pro5 EPCORE and ProEX boards. These boards have UART, I2C, USB, eMMC and PCI endpoint in common. Pro5 EPCORE board is a kind of Pro5 reference board with PCIe endpoint card edge connector. ProEX board shares peripherals with Linux and other systems, and some of these ports are available in Linux. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20221117163219.3673-3-hayashi.kunihiko@socionext.com Signed-off-by: Arnd Bergmann arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/uniphier-pro5-epcore.dts | 76 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/uniphier-pro5-proex.dts | 59 +++++++++++++++++++++++ 3 files changed, 137 insertions(+) commit 2dbcd8b4f208de94c43c76ef401a87e64457ee2c Author: Kunihiko Hayashi Date: Fri Nov 18 01:32:18 2022 +0900 dt-bindings: arm: uniphier: Add Pro5 boards Add compatible string for Pro5 EP-Core board and ProEX board support. Signed-off-by: Kunihiko Hayashi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221117163219.3673-2-hayashi.kunihiko@socionext.com Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/arm/socionext/uniphier.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 429e789c67b8b5dc84ab5d5c83725f6e295a0adc Author: David E. Box Date: Fri Nov 18 16:23:42 2022 -0800 tools/arch/x86: intel_sdsi: Add support for new GUID The structure and content of the On Demand registers is based on the GUID which is read from hardware through sysfs. Add support for decoding the registers of a new GUID 0xF210D9EF. Signed-off-by: David E. Box Link: https://lore.kernel.org/r/20221119002343.1281885-9-david.e.box@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede tools/arch/x86/intel_sdsi/intel_sdsi.c | 36 +++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit a8041a89b7a4ae13db28f02402996a0c6edffe25 Author: David E. Box Date: Fri Nov 18 16:23:41 2022 -0800 tools/arch/x86: intel_sdsi: Read more On Demand registers Add decoding of the following On Demand register fields: 1. NVRAM content authorization error status 2. Enabled features: telemetry and attestation 3. Key provisioning status 4. NVRAM update limit 5. PCU_CR3_CAPID_CFG Link: https://github.com/intel/intel-sdsi/blob/master/state-certificate-encoding.rst Signed-off-by: David E. Box Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221119002343.1281885-8-david.e.box@linux.intel.com Signed-off-by: Hans de Goede tools/arch/x86/intel_sdsi/intel_sdsi.c | 50 ++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 5 deletions(-) commit 334599bccbf2ad638498e4576e29db77ebf09f04 Author: David E. Box Date: Fri Nov 18 16:23:40 2022 -0800 tools/arch/x86: intel_sdsi: Add Intel On Demand text Intel Software Defined Silicon (SDSi) is now officially known as Intel On Demand. Change text in tool to indicate this. Signed-off-by: David E. Box Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221119002343.1281885-7-david.e.box@linux.intel.com Signed-off-by: Hans de Goede tools/arch/x86/intel_sdsi/intel_sdsi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3088258ea762eba3bc4e9377f8d49229d6ee094c Author: David E. Box Date: Fri Nov 18 16:23:39 2022 -0800 tools/arch/x86: intel_sdsi: Add support for reading state certificates Add option to read and decode On Demand state certificates. Link: https://github.com/intel/intel-sdsi/blob/master/state-certificate-encoding.rst Signed-off-by: David E. Box Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221119002343.1281885-6-david.e.box@linux.intel.com Signed-off-by: Hans de Goede tools/arch/x86/intel_sdsi/intel_sdsi.c | 268 ++++++++++++++++++++++++--------- 1 file changed, 198 insertions(+), 70 deletions(-) commit a96f1b9c48e56bc82a8cba11020ab29c28bfab51 Author: David E. Box Date: Fri Nov 18 16:23:38 2022 -0800 platform/x86/intel/sdsi: Add meter certificate support Add support for reading the meter certificate from Intel On Demand hardware. The meter certificate [1] is used to access the utilization metrics of enabled features in support of the Intel On Demand consumption model. Similar to the state certificate, the meter certificate is read by mailbox command. While making similar changes also use the BIN_ATTR_ADMIN_RO helper to create the 'registers' sysfs file. Link: https://github.com/intel-sandbox/debox1.intel_sdsi/blob/gnr-review/meter-certificate.rst [1] Signed-off-by: David E. Box Link: https://lore.kernel.org/r/20221119002343.1281885-5-david.e.box@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Documentation/ABI/testing/sysfs-driver-intel_sdsi | 10 +++++ drivers/platform/x86/intel/sdsi.c | 49 ++++++++++++++++++----- 2 files changed, 48 insertions(+), 11 deletions(-) commit 25612c0fb22d20142363765ab99b6f87ea3c45cf Author: David E. Box Date: Fri Nov 18 16:23:37 2022 -0800 platform/x86/intel/sdsi: Support different GUIDs Newer versions of Intel On Demand hardware may have an expanded list of registers to support new features. The register layout is identified by a unique GUID that's read during driver probe. Add support for handling different GUIDs and add support for current GUIDs [1]. Link: https://github.com/intel/intel-sdsi/blob/master/os-interface.rst [1] Signed-off-by: David E. Box Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221119002343.1281885-4-david.e.box@linux.intel.com Signed-off-by: Hans de Goede drivers/platform/x86/intel/sdsi.c | 50 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) commit aa546b28163f0bd12e1129cd0fb05b89089485e9 Author: David E. Box Date: Fri Nov 18 16:23:36 2022 -0800 platform/x86/intel/sdsi: Hide attributes if hardware doesn't support Provisioning capabilities are enabled by a bit set by BIOS. Read this bit and hide the provisioning attributes if the On Demand feature is not enabled. Also, remove the sdsi_enabled boolean from private and instead add a features register since this will be used for future features. Signed-off-by: David E. Box Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221119002343.1281885-3-david.e.box@linux.intel.com Signed-off-by: Hans de Goede drivers/platform/x86/intel/sdsi.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit 4ea629155c29051dd1323ab9eded21c545b50c2c Author: David E. Box Date: Fri Nov 18 16:23:35 2022 -0800 platform/x86/intel/sdsi: Add Intel On Demand text Intel Software Defined Silicon (SDSi) is now officially known as Intel On Demand. Add On Demand to the description in the kconfig, documentation, and driver source. Signed-off-by: David E. Box Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221119002343.1281885-2-david.e.box@linux.intel.com Signed-off-by: Hans de Goede Documentation/ABI/testing/sysfs-driver-intel_sdsi | 37 ++++++++++++----------- drivers/platform/x86/intel/Kconfig | 8 ++--- drivers/platform/x86/intel/sdsi.c | 4 +-- 3 files changed, 25 insertions(+), 24 deletions(-) commit 6f8d2a203799a087bb747f81d76e70fc5c6795a5 Merge: 84b63565f887 21f6546e8bf6 Author: Arnd Bergmann Date: Mon Nov 21 10:53:52 2022 +0100 Merge tag 'samsung-dt64-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt Samsung DTS ARM64 changes for v6.2 Correct pin drive strength macros (names) and values used on Tesla FSD SoC. * tag 'samsung-dt64-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: fsd: fix drive strength values as per FSD HW UM arm64: dts: fsd: fix drive strength macros as per FSD HW UM Link: https://lore.kernel.org/r/20221116093010.18515-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 84b63565f887bfbd5c25710eeba715816672e763 Author: Aakarsh Jain Date: Wed Nov 16 10:30:09 2022 +0100 ARM: dts: exynos: Add new SoC specific compatible string for Exynos3250 SoC Exynos3250 and Exynos5420 are using same compatible string for MFC codec device but they have different clock hierarchy and complexity. Add new compatible string followed by mfc-v7 fallback for Exynos3250 SoC. Suggested-by: Alim Akhtar Signed-off-by: Aakarsh Jain Signed-off-by: Krzysztof Kozlowski Reviewed-by: Tommaso Merciai Link: https://lore.kernel.org/r/20221114115024.69591-4-aakarsh.jain@samsung.com Link: https://lore.kernel.org/r/20221116093010.18515-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann arch/arm/boot/dts/exynos3250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 972d89438dc959358466df15e0dda80996ff658b Merge: 4b7067ae9309 7353bdfaca60 Author: Arnd Bergmann Date: Mon Nov 21 10:51:06 2022 +0100 Merge tag 'imx-defconfig-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig i.MX defconfig change for 6.2: - Enable Renesas 9-series PCIe clock generator, SNVS LPGRP and i.MX8MP interconnect driver support in arm64 defconfig. - Enable Silergy SY7636A EPD PMIC, CYTTSP5 touchscreen and USB GPIO extcon support in imx_v6_v7_defconfig. * tag 'imx-defconfig-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: Add Renesas 9-series PCIe clock generator ARM: imx_v6_v7_defconfig: Enable the cyttsp5 touchscreen ARM: imx_v6_v7_defconfig: Enable silergy,sy7636a ARM: imx_v6_v7_defconfig: Enable USB GPIO extcon support arm64: defconfig: enable i.mx 8m plus specific interconnect support arm64: defconfig: enable snvs lpgpr support Link: https://lore.kernel.org/r/20221119125733.32719-6-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 4b7067ae9309a0bd22ae80ac74993e195af700cf Merge: 267511c9778b b4c8adc40f49 Author: Arnd Bergmann Date: Mon Nov 21 10:50:01 2022 +0100 Merge tag 'tegra-for-6.2-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfig arm64: tegra: Default configuration updates for v6.2-rc1 This enables several audio-related options, as well as the Tegra186 timer and hardware timestamping engine drivers. * tag 'tegra-for-6.2-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: defconfig: Enable HTE config arm64: defconfig: Enable Tegra186 timer support arm64: defconfig: Enable SND_ALOOP arm64: defconfig: Enable couple of audio codecs Link: https://lore.kernel.org/r/20221119012025.3968358-8-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 267511c9778b76aa2a85c9d707a04dd1eedfd608 Merge: 1d4456221fe3 1776fca7fadb Author: Arnd Bergmann Date: Mon Nov 21 10:49:40 2022 +0100 Merge tag 'renesas-riscv-defconfig-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas RISC-V defconfig updates for v6.2 - Enable support for the Renesas RZ/Five SoC and the RZ/Five SMARC EVK board in the risc-v defconfig. * tag 'renesas-riscv-defconfig-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: riscv: configs: defconfig: Enable Renesas RZ/Five SoC Link: https://lore.kernel.org/r/cover.1668788928.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 1d4456221fe394eab50b4ce7902b5c76cf650c00 Merge: 6bd7179385f6 fa8eec595709 Author: Arnd Bergmann Date: Mon Nov 21 10:48:17 2022 +0100 Merge tag 'renesas-arm-defconfig-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM defconfig updates for v6.2 - Enable support for Renesas R-Car S4-8 Spider Ethernet devices in the arm64 defconfig. * tag 'renesas-arm-defconfig-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable Renesas R-Car S4-8 Spider Ethernet devices Link: https://lore.kernel.org/r/cover.1668788920.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit ef8c373bd91df3cf70596497da0955d218961ead Author: Lorenzo Bianconi Date: Thu Nov 17 15:29:53 2022 +0100 net: ethernet: mtk_eth_soc: fix RSTCTRL_PPE{0,1} definitions Fix RSTCTRL_PPE0 and RSTCTRL_PPE1 register mask definitions for MTK_NETSYS_V2. Remove duplicated definitions. Fixes: 160d3a9b1929 ("net: ethernet: mtk_eth_soc: introduce MTK_NETSYS_V2 support") Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 13 +++++++------ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 10 +++------- 2 files changed, 10 insertions(+), 13 deletions(-) commit aa5ac4be8da1b0ea7c588b55aa5214efb94644bc Author: Horatiu Vultur Date: Thu Nov 17 14:28:12 2022 +0100 net: microchip: sparx5: kunit test: Fix compile warnings. When VCAP_KUNIT_TEST is enabled the following warnings are generated: drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:257:34: warning: Using plain integer as NULL pointer drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:258:41: warning: Using plain integer as NULL pointer drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:342:23: warning: Using plain integer as NULL pointer drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:359:23: warning: Using plain integer as NULL pointer drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1327:34: warning: Using plain integer as NULL pointer drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1328:41: warning: Using plain integer as NULL pointer Therefore fix this. Fixes: dccc30cc4906 ("net: microchip: sparx5: Add KUNIT test of counters and sorted rules") Fixes: c956b9b318d9 ("net: microchip: sparx5: Adding KUNIT tests of key/action values in VCAP API") Fixes: 67d637516fa9 ("net: microchip: sparx5: Adding KUNIT test for the VCAP API") Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6bd7179385f68f2ac1b30f13ba0f5358af733936 Author: Fabrice Gasnier Date: Thu Nov 17 11:39:31 2022 +0100 ARM: multi_v7_defconfig: enable Type-C UCSI and STM32G0 as modules Enable the USB Type-C UCSI, and the STM32G0 UCSI drivers as modules, since used on STM32MP13 board. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20221117103931.26174-1-alexandre.torgue@foss.st.com Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit c5ad454a12c6a6d08dd67c971a0b12adc9953304 Author: Gayatri Kammela Date: Mon Nov 14 10:32:57 2022 -0800 platform/x86: intel/pmc/core: Add Meteor Lake support to pmc core driver Add Meteor Lake client and mobile support to pmc core driver. This patch adds legacy support. Cc: David E Box Suggested-by: David E Box Reviewed-by: "David E. Box" Signed-off-by: Sukumar Ghorai Signed-off-by: Gayatri Kammela Signed-off-by: "David E. Box" Link: https://lore.kernel.org/r/20221114183257.2067662-9-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmc/Makefile | 2 +- drivers/platform/x86/intel/pmc/core.c | 7 ++++- drivers/platform/x86/intel/pmc/core.h | 13 +++++++++ drivers/platform/x86/intel/pmc/mtl.c | 52 +++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 2 deletions(-) commit 08876884b9eac0666a510ef4f7e7a7c2d377aae5 Author: Gayatri Kammela Date: Mon Nov 14 10:32:56 2022 -0800 platform/x86: intel/pmc: Relocate Alder Lake PCH support Create adl.c for Alder Lake PCH specific structures and init(). This file supports Alder Lake, Raptor Lake and Raptor Lake S platforms There are no functional changes involved. Cc: David E Box Reviewed-by: "David E. Box" Signed-off-by: Gayatri Kammela Signed-off-by: "David E. Box" Link: https://lore.kernel.org/r/20221114183257.2067662-8-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmc/Makefile | 3 +- drivers/platform/x86/intel/pmc/adl.c | 325 ++++++++++++++++++++++++++++++++ drivers/platform/x86/intel/pmc/core.c | 315 ------------------------------- drivers/platform/x86/intel/pmc/core.h | 18 ++ 4 files changed, 345 insertions(+), 316 deletions(-) commit 92f530edd7c9557c225edd6db051e00b3ef9a2ac Author: Gayatri Kammela Date: Mon Nov 14 10:32:55 2022 -0800 platform/x86: intel/pmc: Relocate Tiger Lake PCH support Create tgl.c for Tiger Lake PCH specific structures and init(). This file supports Tiger Lake, Elkhart Lake, Rocket Lake, Alder Lake mobile, Alder Lake N and Raptor Lake P platforms. There are no functional changes involved. Cc: David E Box Reviewed-by: "David E. Box" Signed-off-by: Gayatri Kammela Signed-off-by: "David E. Box" Link: https://lore.kernel.org/r/20221114183257.2067662-7-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmc/Makefile | 2 +- drivers/platform/x86/intel/pmc/core.c | 264 +------------------------------ drivers/platform/x86/intel/pmc/core.h | 14 ++ drivers/platform/x86/intel/pmc/tgl.c | 269 ++++++++++++++++++++++++++++++++ 4 files changed, 285 insertions(+), 264 deletions(-) commit fd2ed6dbc34979fbb2a745a259f2a3b201f64299 Author: Xi Pardee Date: Mon Nov 14 10:32:54 2022 -0800 platform/x86: intel/pmc: Relocate Ice Lake PCH support Create icl.c for Ice Lake PCH specific structures and init(). This file supports Ice Lake, Ice Lake NNPI and Jasper Lake platforms. There are no functional changes involved. Cc: David E Box Reviewed-by: "David E. Box" Signed-off-by: Xi Pardee Signed-off-by: "David E. Box" Link: https://lore.kernel.org/r/20221114183257.2067662-6-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmc/Makefile | 2 +- drivers/platform/x86/intel/pmc/core.c | 45 -------------------------- drivers/platform/x86/intel/pmc/core.h | 3 ++ drivers/platform/x86/intel/pmc/icl.c | 56 +++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 46 deletions(-) commit d6cd0cc8d16dadf2a3c0ddc93e21cd1d13b02fbb Author: Xi Pardee Date: Mon Nov 14 10:32:53 2022 -0800 platform/x86: intel/pmc: Relocate Cannon Lake Point PCH support Create cnp.c for Cannon Lake Point PCH specific structures and init(). This file supports Cannon Lake and Comet Lake platforms. There are no functional changes involved. Cc: David E Box Reviewed-by: "David E. Box" Signed-off-by: Xi Pardee Signed-off-by: "David E. Box" Link: https://lore.kernel.org/r/20221114183257.2067662-5-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmc/Makefile | 2 +- drivers/platform/x86/intel/pmc/cnp.c | 210 ++++++++++++++++++++++++++++++++ drivers/platform/x86/intel/pmc/core.c | 199 ------------------------------ drivers/platform/x86/intel/pmc/core.h | 8 ++ 4 files changed, 219 insertions(+), 200 deletions(-) commit f23e21a345956e3bd234c6d5a3d29818604dfe74 Author: Rajvi Jingar Date: Mon Nov 14 10:32:52 2022 -0800 platform/x86: intel/pmc: Relocate Sunrise Point PCH support Create spt.c for Sunrise Point PCH specific structures and init(). This file supports Sky Lake and Kaby Lake platforms. There are no functional changes involved. Cc: David E Box Reviewed-by: "David E. Box" Signed-off-by: Rajvi Jingar Signed-off-by: "David E. Box" Link: https://lore.kernel.org/r/20221114183257.2067662-4-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmc/Makefile | 2 +- drivers/platform/x86/intel/pmc/core.c | 129 ----------------------------- drivers/platform/x86/intel/pmc/core.h | 7 ++ drivers/platform/x86/intel/pmc/spt.c | 140 ++++++++++++++++++++++++++++++++ 4 files changed, 148 insertions(+), 130 deletions(-) commit 03c58a1e949d16faa922dd0501db1f2585d66eb3 Author: Xi Pardee Date: Mon Nov 14 10:32:51 2022 -0800 platform/x86: intel/pmc: Move variable declarations and definitions to header and core.c Move the msr_map variable declaration to core.h and move the pmc_lpm_modes definition to core.c. This is a prepartory patch for redesigning the pmc core driver as the variables will be used in multiple PCH specific files. Cc: David E Box Reviewed-by: "David E. Box" Signed-off-by: Xi Pardee Signed-off-by: "David E. Box" Link: https://lore.kernel.org/r/20221114183257.2067662-3-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmc/core.c | 15 ++++++++++++++- drivers/platform/x86/intel/pmc/core.h | 13 ++----------- 2 files changed, 16 insertions(+), 12 deletions(-) commit 284c01b72ac9cad03b972324a72782759ef980af Author: Gayatri Kammela Date: Mon Nov 14 10:32:50 2022 -0800 platform/x86: intel/pmc: Replace all the reg_map with init functions The current implementation of pmc core driver has the reg_map assigned to the CPUID of each platform. Replace the reg_map with init functions that are defined for each platform. This is a preparatory patch for redesigning the pmc core driver. Cc: David E Box Reviewed-by: "David E. Box" Signed-off-by: Gayatri Kammela Signed-off-by: "David E. Box" Link: https://lore.kernel.org/r/20221114183257.2067662-2-gayatri.kammela@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmc/core.c | 114 +++++++++++++++++++++++----------- drivers/platform/x86/intel/pmc/core.h | 13 ++++ 2 files changed, 90 insertions(+), 37 deletions(-) commit b5e72d27e39a092c956b34b286f6564ceee4134c Merge: 90e9b23a60d5 6fa57d78aa7f Author: Vlastimil Babka Date: Mon Nov 21 10:37:36 2022 +0100 Merge branch 'slab/for-6.2/alloc_size' into slab/for-next Two patches from Kees Cook [1]: These patches work around a deficiency in GCC (>=11) and Clang (<16) where the __alloc_size attribute does not apply to inlines. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96503 This manifests as reduced overflow detection coverage for many allocation sites under CONFIG_FORTIFY_SOURCE=y, where the allocation size was not actually being propagated to __builtin_dynamic_object_size(). [1] https://lore.kernel.org/all/20221118034713.gonna.754-kees@kernel.org/ commit d9c3b34d3b3af22d548007d5d36e83ad12140ee7 Merge: dd65a243a915 eb7081409f94 Author: Greg Kroah-Hartman Date: Mon Nov 21 10:37:10 2022 +0100 Merge 6.1-rc6 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 90e9b23a60d5b4c8317f58e01ed05d3bdf063440 Merge: 76537db3b95c 946fa0dbf2d8 Author: Vlastimil Babka Date: Fri Nov 11 09:08:18 2022 +0100 Merge branch 'slab/for-6.2/kmalloc_redzone' into slab/for-next kmalloc() redzone improvements by Feng Tang From cover letter [1]: kmalloc's API family is critical for mm, and one of its nature is that it will round up the request size to a fixed one (mostly power of 2). When user requests memory for '2^n + 1' bytes, actually 2^(n+1) bytes could be allocated, so there is an extra space than what is originally requested. This patchset tries to extend the redzone sanity check to the extra kmalloced buffer than requested, to better detect un-legitimate access to it. (depends on SLAB_STORE_USER & SLAB_RED_ZONE) [1] https://lore.kernel.org/all/20221021032405.1825078-1-feng.tang@intel.com/ commit 76537db3b95cbf5d0189ce185c16db9f93017021 Merge: 1c1aaa3319ab 130d4df57390 Author: Vlastimil Babka Date: Thu Nov 10 10:42:34 2022 +0100 Merge branch 'slab/for-6.2/fit_rcu_head' into slab/for-next A series by myself to reorder fields in struct slab to allow the embedded rcu_head to grow (for debugging purposes). Requires changes to isolate_movable_page() to skip slab pages which can otherwise become false-positive __PageMovable due to its use of low bits in page->mapping. commit 1c1aaa3319ab860883791edd2ba3e55610214c2e Merge: c64b95d3dd02 654058e67b94 Author: Vlastimil Babka Date: Thu Nov 10 10:41:06 2022 +0100 Merge branch 'slab/for-6.2/tools' into slab/for-next A patch for tools/vm/slabinfo to give more useful feedback when not run as a root, by Rong Tao. commit c64b95d3dd0236062ded3caa928175a3b5cc1f97 Merge: 14d3eb66e16a 7c82b3b308f9 Author: Vlastimil Babka Date: Thu Nov 10 09:53:26 2022 +0100 Merge branch 'slab/for-6.2/slub-sysfs' into slab/for-next - Two patches for SLUB's sysfs by Rasmus Villemoes to remove dead code and optimize boot time with late initialization. - Allow SLUB's sysfs 'failslab' parameter to be runtime-controllable again as it can be both useful and safe, by Alexander Atanasov. commit 14d3eb66e16a55d279598c8ed7ae1ca85066ff5b Merge: 4b28ba9eeab4 b539ce9f1a31 Author: Vlastimil Babka Date: Thu Nov 10 09:48:37 2022 +0100 Merge branch 'slab/for-6.2/locking' into slab/for-next A patch from Jiri Kosina that makes SLAB's list_lock a raw_spinlock_t. While there are no plans to make SLAB actually compatible with PREEMPT_RT or any other future, it makes !PREEMPT_RT lockdep happy. commit 4b28ba9eeab4345af43e45e6eb4056eb2f1cb764 Merge: c18c20f16219 838de63b1011 Author: Vlastimil Babka Date: Thu Nov 10 09:44:07 2022 +0100 Merge branch 'slab/for-6.2/cleanups' into slab/for-next - Removal of dead code from deactivate_slab() by Hyeonggon Yoo. - Fix of BUILD_BUG_ON() for sufficient early percpu size by Baoquan He. - Make kmem_cache_alloc() kernel-doc less misleading, by myself. commit 6fa57d78aa7f212fd7c0de70f5756e18513dcdcf Author: Kees Cook Date: Thu Nov 17 19:51:59 2022 -0800 slab: Remove special-casing of const 0 size allocations Passing a constant-0 size allocation into kmalloc() or kmalloc_node() does not need to be a fast-path operation, so the static return value can be removed entirely. This makes sure that all paths through the inlines result in a full extern function call, where __alloc_size() hints will actually be seen[1] by GCC. (A constant return value of 0 means the "0" allocation size won't be propagated by the inline.) [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96503 Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: Roman Gushchin Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: linux-mm@kvack.org Signed-off-by: Kees Cook Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka include/linux/slab.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 3bf019334fbbb51723587f9819c62d3d6f9d6f3f Author: Kees Cook Date: Thu Nov 17 19:51:58 2022 -0800 slab: Clean up SLOB vs kmalloc() definition As already done for kmalloc_node(), clean up the #ifdef usage in the definition of kmalloc() so that the SLOB-only version is an entirely separate and much more readable function. Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: Roman Gushchin Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: linux-mm@kvack.org Signed-off-by: Kees Cook Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka include/linux/slab.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 130d4df57390a29521cb7cccd1b3144c184c111c Author: Vlastimil Babka Date: Fri Aug 26 11:09:12 2022 +0200 mm/sl[au]b: rearrange struct slab fields to allow larger rcu_head Joel reports [1] that increasing the rcu_head size for debugging purposes used to work before struct slab was split from struct page, but now runs into the various SLAB_MATCH() sanity checks of the layout. This is because the rcu_head in struct page is in union with large sub-structures and has space to grow without exceeding their size, while in struct slab (for SLAB and SLUB) it's in union only with a list_head. On closer inspection (and after the previous patch) we can put all fields except slab_cache to a union with rcu_head, as slab_cache is sufficient for the rcu freeing callbacks to work and the rest can be overwritten by rcu_head without causing issues. This is only somewhat complicated by the need to keep SLUB's freelist+counters aligned for cmpxchg_double. As a result the fields need to be reordered so that slab_cache is first (after page flags) and the union with rcu_head follows. For consistency, do that for SLAB as well, although not necessary there. As a result, the rcu_head field in struct page and struct slab is no longer at the same offset, but that doesn't matter as there is no casting that would rely on that in the slab freeing callbacks, so we can just drop the respective SLAB_MATCH() check. Also we need to update the SLAB_MATCH() for compound_head to reflect the new ordering. While at it, also add a static_assert to check the alignment needed for cmpxchg_double so mistakes are found sooner than a runtime GPF. [1] https://lore.kernel.org/all/85afd876-d8bb-0804-b2c5-48ed3055e702@joelfernandes.org/ Reported-by: Joel Fernandes Signed-off-by: Vlastimil Babka Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> mm/slab.h | 54 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 22 deletions(-) commit 8b8817630ae80032e80b2eaf334de756ac1ff6a3 Author: Vlastimil Babka Date: Fri Nov 4 15:57:26 2022 +0100 mm/migrate: make isolate_movable_page() skip slab pages In the next commit we want to rearrange struct slab fields to allow a larger rcu_head. Afterwards, the page->mapping field will overlap with SLUB's "struct list_head slab_list", where the value of prev pointer can become LIST_POISON2, which is 0x122 + POISON_POINTER_DELTA. Unfortunately the bit 1 being set can confuse PageMovable() to be a false positive and cause a GPF as reported by lkp [1]. To fix this, make isolate_movable_page() skip pages with the PageSlab flag set. This is a bit tricky as we need to add memory barriers to SLAB and SLUB's page allocation and freeing, and their counterparts to isolate_movable_page(). Based on my RFC from [2]. Added a comment update from Matthew's variant in [3] and, as done there, moved the PageSlab checks to happen before trying to take the page lock. [1] https://lore.kernel.org/all/208c1757-5edd-fd42-67d4-1940cc43b50f@intel.com/ [2] https://lore.kernel.org/all/aec59f53-0e53-1736-5932-25407125d4d4@suse.cz/ [3] https://lore.kernel.org/all/YzsVM8eToHUeTP75@casper.infradead.org/ Reported-by: kernel test robot Signed-off-by: Vlastimil Babka Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> mm/migrate.c | 15 ++++++++++++--- mm/slab.c | 6 +++++- mm/slub.c | 6 +++++- 3 files changed, 22 insertions(+), 5 deletions(-) commit 05df6ab8eba625a1d97eb67ee06d786b8e460685 Merge: 1d926e259d8f eb7081409f94 Author: Greg Kroah-Hartman Date: Mon Nov 21 10:21:53 2022 +0100 Merge 6.1-rc6 into driver-core-next We need the kernfs changes in here as well. Signed-off-by: Greg Kroah-Hartman commit 838de63b101147fc7d8af828465cf6d1d30232a8 Author: Vlastimil Babka Date: Thu Nov 10 09:10:30 2022 +0100 mm/slab: move and adjust kernel-doc for kmem_cache_alloc Alexander reports an issue with the kmem_cache_alloc() comment in mm/slab.c: > The current comment mentioned that the flags only matters if the > cache has no available objects. It's different for the __GFP_ZERO > flag which will ensure that the returned object is always zeroed > in any case. > I have the feeling I run into this question already two times if > the user need to zero the object or not, but the user does not need > to zero the object afterwards. However another use of __GFP_ZERO > and only zero the object if the cache has no available objects would > also make no sense. and suggests thus mentioning __GFP_ZERO as the exception. But on closer inspection, the part about flags being only relevant if cache has no available objects is misleading. The slab user has no reliable way to determine if there are available objects, and e.g. the might_sleep() debug check can be performed even if objects are available, so passing correct flags given the allocation context always matters. Thus remove that sentence completely, and while at it, move the comment to from SLAB-specific mm/slab.c to the common include/linux/slab.h The comment otherwise refers flags description for kmalloc(), so add __GFP_ZERO comment there and remove a very misleading GFP_HIGHUSER (not applicable to slab) description from there. Mention kzalloc() and kmem_cache_zalloc() shortcuts. Reported-by: Alexander Aring Link: https://lore.kernel.org/all/20221011145413.8025-1-aahringo@redhat.com/ Signed-off-by: Vlastimil Babka include/linux/slab.h | 23 +++++++++++++++++------ mm/slab.c | 10 ---------- 2 files changed, 17 insertions(+), 16 deletions(-) commit a0dc161ae77377ae770b5626bce9b72cff5d9ed6 Author: Baoquan He Date: Mon Oct 24 16:14:35 2022 +0800 mm/slub, percpu: correct the calculation of early percpu allocation size SLUB allocator relies on percpu allocator to initialize its ->cpu_slab during early boot. For that, the dynamic chunk of percpu which serves the early allocation need be large enough to satisfy the kmalloc creation. However, the current BUILD_BUG_ON() in alloc_kmem_cache_cpus() doesn't consider the kmalloc array with NR_KMALLOC_TYPES length. Fix that with correct calculation. Signed-off-by: Baoquan He 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> Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Dennis Zhou Signed-off-by: Vlastimil Babka mm/slub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e8753e416c7ec39812cf92608aa95640caca70fa Author: Baoquan He Date: Sun Nov 13 18:08:27 2022 +0800 percpu: adjust the value of PERCPU_DYNAMIC_EARLY_SIZE LKP reported a build failure as below on the following patch "mm/slub, percpu: correct the calculation of early percpu allocation size" ~~~~~~ In file included from : In function 'alloc_kmem_cache_cpus', inlined from 'kmem_cache_open' at mm/slub.c:4340:6: >> >> include/linux/compiler_types.h:357:45: error: call to '__compiletime_assert_474' declared with attribute error: BUILD_BUG_ON failed: PERCPU_DYNAMIC_EARLY_SIZE < NR_KMALLOC_TYPES * KMALLOC_SHIFT_HIGH * sizeof(struct kmem_cache_cpu) 357 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ~~~~~~ From the kernel config file provided by LKP, the building was made on arm64 with below Kconfig item enabled: CONFIG_ZONE_DMA=y CONFIG_SLUB_CPU_PARTIAL=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_SLUB_STATS=y CONFIG_ARM64_PAGE_SHIFT=16 CONFIG_ARM64_64K_PAGES=y Then we will have: NR_KMALLOC_TYPES:4 KMALLOC_SHIFT_HIGH:17 sizeof(struct kmem_cache_cpu):184 The product of them is 12512, which is bigger than PERCPU_DYNAMIC_EARLY_SIZE, 12K. Hence, the BUILD_BUG_ON in alloc_kmem_cache_cpus() is triggered. Earlier, in commit 099a19d91ca4 ("percpu: allow limited allocation before slab is online"), PERCPU_DYNAMIC_EARLY_SIZE was introduced and set to 12K which is equal to the then PERPCU_DYNAMIC_RESERVE. Later, in commit 1a4d76076cda ("percpu: implement asynchronous chunk population"), PERPCU_DYNAMIC_RESERVE was increased by 8K, while PERCPU_DYNAMIC_EARLY_SIZE was kept unchanged. So, here increase PERCPU_DYNAMIC_EARLY_SIZE by 8K too to accommodate to the slub's requirement. Reported-by: kernel test robot Signed-off-by: Baoquan He Acked-by: Dennis Zhou Signed-off-by: Vlastimil Babka include/linux/percpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 599cb2c6d76485c55b150868482c4003976327a1 Author: Andrew Davis Date: Mon Oct 24 12:34:32 2022 -0500 arm64: dts: renesas: 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/renesas directory. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20221024173434.32518-6-afd@ti.com Signed-off-by: Geert Uytterhoeven .../{draak-ebisu-panel-aa104xd12.dts => draak-ebisu-panel-aa104xd12.dtso} | 0 .../{salvator-panel-aa104xd12.dts => salvator-panel-aa104xd12.dtso} | 0 2 files changed, 0 insertions(+), 0 deletions(-) commit 210a671cc30429c7178a332b1feb5ebc2709dcd6 Merge: e8433659bf70 eb7081409f94 Author: Greg Kroah-Hartman Date: Mon Nov 21 10:05:34 2022 +0100 Merge 6.1-rc6 into char-misc-next We need the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit e5dc5f23456c92e2acfdab9f4618d323cd128753 Merge: 884af88b756c dcad240c15c1 Author: Geert Uytterhoeven Date: Mon Nov 21 09:56:46 2022 +0100 Merge branch 'dt/dtbo-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux into renesas-arm-dt-for-v6.2 Merge Rob's stable branch for the .dts to .dtso rename. commit dca508cd88397cc578cce063405e082c3ff5be97 Merge: 8719a1c30d3a 859a497fe80c Author: David S. Miller Date: Mon Nov 21 08:51:36 2022 +0000 Merge branch 'nfp-ipsec-offload' Simon Horman says: ==================== nfp: IPsec offload support Huanhuan Wang says: this series adds support for IPsec offload to the NFP driver. It covers three enhancements: 1. Patches 1/3: - Extend the capability word and control word to to support new features. 2. Patch 2/3: - Add framework to support IPsec offloading for NFP driver, but IPsec offload control plane interface xfrm callbacks which interact with upper layer are not implemented in this patch. 3. Patch 3/3: - IPsec control plane interface xfrm callbacks are implemented in this patch. Changes since v3 * Remove structure fields that describe firmware but are not used for Kernel offload * Add WARN_ON(!xa_empty()) before call to xa_destroy() * Added helpers for hash methods Changes since v2 * OFFLOAD_HANDLE_ERROR macro and the associated code removed * Unnecessary logging removed * Hook function xdo_dev_state_free in struct xfrmdev_ops removed * Use Xarray to maintain SA entries Changes since v1 * Explicitly return failure when XFRM_STATE_ESN is set * Fix the issue that AEAD algorithm is not correctly offloaded ==================== Signed-off-by: David S. Miller commit 859a497fe80ce1b4727d14fd43067c7b6fa2a85b Author: Huanhuan Wang Date: Thu Nov 17 14:21:02 2022 +0100 nfp: implement xfrm callbacks and expose ipsec offload feature to upper layer Xfrm callbacks are implemented to offload SA info into firmware by mailbox. It supports 16K SA info in total. Expose ipsec offload feature to upper layer, this feature will signal the availability of the offload. Based on initial work of Norm Bagley . Signed-off-by: Huanhuan Wang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Acked-by: Steffen Klassert Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/crypto/ipsec.c | 484 ++++++++++++++++++++- .../net/ethernet/netronome/nfp/nfp_net_common.c | 6 + drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 4 +- 3 files changed, 490 insertions(+), 4 deletions(-) commit 57f273adbcd44172cbe0bd10b8b7408dd255699f Author: Huanhuan Wang Date: Thu Nov 17 14:21:01 2022 +0100 nfp: add framework to support ipsec offloading A new metadata type and config structure are introduced to interact with firmware to support ipsec offloading. This feature relies on specific firmware that supports ipsec encrypt/decrypt by advertising related capability bit. The xfrm callbacks which interact with upper layer are implemented in the following patch. Based on initial work of Norm Bagley . Signed-off-by: Huanhuan Wang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/netronome/Kconfig | 11 +++ drivers/net/ethernet/netronome/nfp/Makefile | 2 + drivers/net/ethernet/netronome/nfp/crypto/crypto.h | 23 +++++ drivers/net/ethernet/netronome/nfp/crypto/ipsec.c | 107 +++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfd3/dp.c | 58 +++++++++-- drivers/net/ethernet/netronome/nfp/nfd3/ipsec.c | 18 ++++ drivers/net/ethernet/netronome/nfp/nfd3/nfd3.h | 8 ++ drivers/net/ethernet/netronome/nfp/nfp_net.h | 9 ++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 3 + drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 4 + 10 files changed, 233 insertions(+), 10 deletions(-) commit 484963ce9f1eb89720055de8cad91e8c9fc7f3e6 Author: Yinjun Zhang Date: Thu Nov 17 14:21:00 2022 +0100 nfp: extend capability and control words Currently the 32-bit capability word is almost exhausted, now allocate some more words to support new features, and control word is also extended accordingly. Packet-type offloading is implemented in NIC application firmware, but it's not used in kernel driver, so reserve this bit here in case it's redefined for other use. Signed-off-by: Yinjun Zhang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 ++ drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 1 + drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 14 +++++++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) commit ffcb754584603adf7039d7972564fbf6febdc542 Author: Christoph Hellwig Date: Wed Nov 9 08:37:17 2022 +0100 dma-mapping: reject __GFP_COMP in dma_alloc_attrs DMA allocations can never be turned back into a page pointer, so requesting compound pages doesn't make sense and it can't even be supported at all by various backends. Reject __GFP_COMP with a warning in dma_alloc_attrs, and stop clearing the flag in the arm dma ops and dma-iommu. Signed-off-by: Christoph Hellwig Acked-by: Marek Szyprowski arch/arm/mm/dma-mapping.c | 17 ----------------- drivers/iommu/dma-iommu.c | 3 --- kernel/dma/mapping.c | 8 ++++++++ 3 files changed, 8 insertions(+), 20 deletions(-) commit 3306877aff07363f9bede7f9edf2c4ea4f5b20be Author: Christoph Hellwig Date: Wed Nov 9 08:25:17 2022 +0100 ALSA: memalloc: don't pass bogus GFP_ flags to dma_alloc_* dma_alloc_coherent/dma_alloc_wc is an opaque allocator that only uses the GFP_ flags for allocation context control. Don't pass __GFP_COMP which makes no sense for an allocation that can't in any way be converted to a page pointer. Note that for dma_alloc_noncoherent and dma_alloc_noncontigous in combination with the DMA mmap helpers __GFP_COMP looks sketchy as well, so I would suggest to drop that as well after a careful audit. Signed-off-by: Christoph Hellwig sound/core/memalloc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c08004eede4b2d8a42a9a14ee50904f47cb239a1 Author: Christoph Hellwig Date: Wed Nov 9 08:23:05 2022 +0100 s390/ism: don't pass bogus GFP_ flags to dma_alloc_coherent dma_alloc_coherent is an opaque allocator that only uses the GFP_ flags for allocation context control. Don't pass __GFP_COMP which makes no sense for an allocation that can't in any way be converted to a page pointer. Signed-off-by: Christoph Hellwig Acked-by: Wenjia Zhang drivers/s390/net/ism_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bb73955c0b1dc5717c2dda3fb5eb3f3706f6d859 Author: Christoph Hellwig Date: Wed Nov 9 08:21:04 2022 +0100 cnic: don't pass bogus GFP_ flags to dma_alloc_coherent dma_alloc_coherent is an opaque allocator that only uses the GFP_ flags for allocation context control. Don't pass __GFP_COMP which makes no sense for an allocation that can't in any way be converted to a page pointer. Signed-off-by: Christoph Hellwig drivers/net/ethernet/broadcom/cnic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2fce26a15f1709090ca70f4c7da017424b3b78b3 Author: Christoph Hellwig Date: Wed Nov 9 08:17:46 2022 +0100 RDMA/qib: don't pass bogus GFP_ flags to dma_alloc_coherent dma_alloc_coherent is an opaque allocator that only uses the GFP_ flags for allocation context control. Don't pass GFP_USER which doesn't make sense for a kernel DMA allocation or __GFP_COMP which makes no sense for an allocation that can't in any way be converted to a page pointer. Signed-off-by: Christoph Hellwig Acked-by: Jason Gunthorpe drivers/infiniband/hw/qib/qib_iba6120.c | 2 +- drivers/infiniband/hw/qib/qib_init.c | 21 ++++----------------- 2 files changed, 5 insertions(+), 18 deletions(-) commit 82c310c33ace7d25c0475e49a6051727c48a8cc6 Author: Christoph Hellwig Date: Wed Nov 9 08:15:00 2022 +0100 RDMA/hfi1: don't pass bogus GFP_ flags to dma_alloc_coherent dma_alloc_coherent is an opaque allocator that only uses the GFP_ flags for allocation context control. Don't pass GFP_USER which doesn't make sense for a kernel DMA allocation or __GFP_COMP which makes no sense for an allocation that can't in any way be converted to a page pointer. Signed-off-by: Christoph Hellwig Acked-by: Jason Gunthorpe Acked-by: Dean Luick Tested-by: Dean Luick drivers/infiniband/hw/hfi1/init.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit b3dc3f8e49577840dc8ac8a365c5b3da4edb10b8 Author: Christoph Hellwig Date: Wed Dec 18 11:39:07 2019 +0100 media: videobuf-dma-contig: use dma_mmap_coherent dma_alloc_coherent does not return a physical address, but a DMA address, which might be remapped or have an offset. Passing the DMA address to vm_iomap_memory is thus broken. Use the proper dma_mmap_coherent helper instead, and stop passing __GFP_COMP to dma_alloc_coherent, as the memory management inside the DMA allocator is hidden from the callers and does not require it. With this the gfp_t argument to __videobuf_dc_alloc can be removed and hard coded to GFP_KERNEL. Fixes: a8f3c203e19b ("[media] videobuf-dma-contig: add cache support") Signed-off-by: Christoph Hellwig drivers/media/v4l2-core/videobuf-dma-contig.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 8719a1c30d3a1b4f347afca8e78be201d66d5c49 Author: Gustavo A. R. Silva Date: Wed Nov 16 10:59:44 2022 -0600 bna: Avoid clashing function prototypes When built with Control Flow Integrity, function prototypes between caller and function declaration must match. These mismatches are visible at compile time with the new -Wcast-function-type-strict in Clang[1]. Fix a total of 227 warnings like these: drivers/net/ethernet/brocade/bna/bna_enet.c:519:3: warning: cast from 'void (*)(struct bna_ethport *, enum bna_ethport_event)' to 'bfa_fsm_t' (aka 'void (*)(void *, int)') converts to incompatible function type [-Wcast-function-type-strict] bfa_fsm_set_state(ethport, bna_ethport_sm_down); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The bna state machine code heavily overloads its state machine functions, so these have been separated into their own sets of structs, enums, typedefs, and helper functions. There are almost zero binary code changes, all seem to be related to header file line numbers changing, or the addition of the new stats helper. Important to mention is that while I was manually implementing this changes I was staring at this[2] patch from Kees Cook. Thanks, Kees. :) Link: https://github.com/KSPP/linux/issues/240 [1] https://reviews.llvm.org/D134831 [2] https://lore.kernel.org/linux-hardening/20220929230334.2109344-1-keescook@chromium.org/ Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bfa_cs.h | 60 ++++++++++++++++++---------- drivers/net/ethernet/brocade/bna/bfa_ioc.c | 10 ++--- drivers/net/ethernet/brocade/bna/bfa_ioc.h | 8 +++- drivers/net/ethernet/brocade/bna/bfa_msgq.h | 8 +++- drivers/net/ethernet/brocade/bna/bna_enet.c | 6 +-- drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 6 +-- drivers/net/ethernet/brocade/bna/bna_types.h | 27 ++++++++++--- 7 files changed, 82 insertions(+), 43 deletions(-) commit 29583dfcd2dd72c766422bd05c16f06c6b1fb356 Merge: 39dd0cc2e5bd 4e291f2f5853 Author: Thomas Zimmermann Date: Mon Nov 21 09:03:13 2022 +0100 Merge drm/drm-next into drm-misc-next-fixes Backmerging to update drm-misc-next-fixes for the final phase of the release cycle. Signed-off-by: Thomas Zimmermann commit 2ebc336be08160debfe27f87660cf550d710f3e9 Author: Alexander Sverdlin Date: Fri Nov 19 09:14:12 2021 +0100 mtd: spi-nor: Check for zero erase size in spi_nor_find_best_erase_type() Erase can be zeroed in spi_nor_parse_4bait() or spi_nor_init_non_uniform_erase_map(). In practice it happened with mt25qu256a, which supports 4K, 32K, 64K erases with 3b address commands, but only 4K and 64K erase with 4b address commands. Fixes: dc92843159a7 ("mtd: spi-nor: fix erase_type array to indicate current map conf") Signed-off-by: Alexander Sverdlin Signed-off-by: Tudor Ambarus Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20211119081412.29732-1-alexander.sverdlin@nokia.com drivers/mtd/spi-nor/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 68c5444c317208f5a114f671140373f47f0a2cf6 Author: Aleksandr Miloserdov Date: Tue Nov 15 14:58:10 2022 +0300 nvmet: expose firmware revision to configfs Allow user to set currently active firmware revision Reviewed-by: Konstantin Shelekhin Reviewed-by: Dmitriy Bogdanov Signed-off-by: Aleksandr Miloserdov Signed-off-by: Christoph Hellwig drivers/nvme/target/admin-cmd.c | 2 +- drivers/nvme/target/configfs.c | 63 +++++++++++++++++++++++++++++++++++++++++ drivers/nvme/target/core.c | 15 ++++++++-- drivers/nvme/target/nvmet.h | 2 ++ 4 files changed, 79 insertions(+), 3 deletions(-) commit 23855abdc4be03e17564f665b5d0029ef27abf7b Author: Aleksandr Miloserdov Date: Tue Nov 15 14:58:09 2022 +0300 nvmet: expose IEEE OUI to configfs Allow user to set OUI for the controller vendor. Reviewed-by: Konstantin Shelekhin Reviewed-by: Dmitriy Bogdanov Signed-off-by: Aleksandr Miloserdov Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/admin-cmd.c | 7 ++---- drivers/nvme/target/configfs.c | 49 +++++++++++++++++++++++++++++++++++++++++ drivers/nvme/target/core.c | 2 ++ drivers/nvme/target/nvmet.h | 1 + 4 files changed, 54 insertions(+), 5 deletions(-) commit f9281ab6b8366a6697df27c11946f84a626f93b5 Author: Manivannan Sadhasivam Date: Thu Nov 17 11:01:42 2022 +0530 dt-bindings: cpufreq: cpufreq-qcom-hw: Add cpufreq clock provider Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. Document the same in the binding to reflect the actual implementation. CPUFreq HW will become the clock provider and CPU cores will become the clock consumers. The clock index for each CPU core is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Viresh Kumar .../devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c72cf0cb1d77f6b1b58c334dcc3d09fa13111c4c Author: Manivannan Sadhasivam Date: Thu Nov 17 11:01:45 2022 +0530 cpufreq: qcom-hw: Fix the frequency returned by cpufreq_driver->get() The cpufreq_driver->get() callback is supposed to return the current frequency of the CPU and not the one requested by the CPUFreq core. Fix it by returning the frequency that gets supplied to the CPU after the DCVS operation of EPSS/OSM. Fixes: 2849dd8bc72b ("cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver") Reported-by: Sudeep Holla Signed-off-by: Manivannan Sadhasivam Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 42 +++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 13 deletions(-) commit 0dff89c4488f90c01807d9c12023433703206523 Author: Kefeng Wang Date: Thu Sep 8 20:07:14 2022 +0800 sched: Move numa_balancing sysctls to its own file The sysctl_numa_balancing_promote_rate_limit and sysctl_numa_balancing are part of sched, move them to its own file. Signed-off-by: Kefeng Wang Signed-off-by: Luis Chamberlain include/linux/sched/sysctl.h | 6 ------ kernel/sched/core.c | 13 ++++++++++++- kernel/sched/fair.c | 18 +++++++++++++++--- kernel/sysctl.c | 19 ------------------- 4 files changed, 27 insertions(+), 29 deletions(-) commit 5724ac5589ad93d35d95a845222f566175c681b8 Author: Masahiro Yamada Date: Thu Nov 17 10:30:33 2022 +0900 kbuild: deb-pkg: get rid of |flex:native workaround from Build-Depends "| flex:native" was a workaround (suggested by Ben, see Link) because "MultiArch: foreign" was missing in the flex package on some old distros when commit e3a22850664f ("deb-pkg: generate correct build dependencies") was applied. It seems fixing the flex package has been completed. Get rid of the workaround. Link: https://lore.kernel.org/linux-kbuild/ab49b0582ef12b14b1a68877263b81813e2492a2.camel@decadent.org.uk/ Link: https://wiki.debian.org/CrossBuildPackagingGuidelines Signed-off-by: Masahiro Yamada Reviewed-by: Ben Hutchings scripts/package/mkdebian | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8f4dc7685c72c8ef86420566a38a4f786613851 Author: Masahiro Yamada Date: Tue Nov 15 03:10:55 2022 +0900 scripts/jobserver-exec: parse the last --jobserver-auth= option In the GNU Make manual, the section "Sharing Job Slots with GNU make" says: Be aware that the MAKEFLAGS variable may contain multiple instances of the --jobserver-auth= option. Only the last instance is relevant. Take the last element of the array, not the first. Link: https://www.gnu.org/software/make/manual/html_node/Job-Slots.html Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier scripts/jobserver-exec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit be5ea98983efe2a2c5156c3b43e35a076d5b640d Author: Masahiro Yamada Date: Sun Nov 13 19:59:43 2022 +0900 kconfig: remove redundant (void *) cast in search_conf() The (void *) cast is redundant because the last argument of show_textbox_ext() is an opaque pointer. Signed-off-by: Masahiro Yamada scripts/kconfig/mconf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4d980fd111237ab64705b982f61f284c2a7885e5 Author: Masahiro Yamada Date: Sun Nov 13 19:59:42 2022 +0900 kconfig: remove const qualifier from str_get() update_text() apparently edits the buffer returned by str_get(). (and there is no reason why it shouldn't) Remove 'const' quailifier and casting. Signed-off-by: Masahiro Yamada scripts/kconfig/lkc.h | 2 +- scripts/kconfig/mconf.c | 4 ++-- scripts/kconfig/util.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 1791360cb37ff5ef797afe9006cb315ebb7e969e Author: Masahiro Yamada Date: Sun Nov 13 19:59:41 2022 +0900 kconfig: remove unneeded variable in get_prompt_str() The variable 'accessible' is redundant. Signed-off-by: Masahiro Yamada scripts/kconfig/menu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 30daacc571d1416f24abd4cc49910ff9322a8cf6 Author: KaiLong Wang Date: Sun Nov 13 17:29:50 2022 +0800 modpost: fix array_size.cocci warning Fix following coccicheck warning: scripts/mod/sumversion.c:219:48-49: WARNING: Use ARRAY_SIZE scripts/mod/sumversion.c:156:48-49: WARNING: Use ARRAY_SIZE Signed-off-by: KaiLong Wang Signed-off-by: Masahiro Yamada scripts/mod/sumversion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f8fe647797a4bc049bc7cceaf3a63584678ba04 Author: Nick Desaulniers Date: Thu Nov 10 11:59:05 2022 -0800 Makefile.debug: support for -gz=zstd Make DEBUG_INFO_COMPRESSED a choice; DEBUG_INFO_COMPRESSED_NONE is the default, DEBUG_INFO_COMPRESSED_ZLIB uses zlib, DEBUG_INFO_COMPRESSED_ZSTD uses zstd. This renames the existing KConfig option DEBUG_INFO_COMPRESSED to DEBUG_INFO_COMPRESSED_ZLIB so users upgrading may need to reset the new Kconfigs. Some quick N=1 measurements with du, /usr/bin/time -v, and bloaty: clang-16, x86_64 defconfig plus CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_COMPRESSED_NONE=y: Elapsed (wall clock) time (h:mm:ss or m:ss): 0:55.43 488M vmlinux 27.6% 136Mi 0.0% 0 .debug_info 6.1% 30.2Mi 0.0% 0 .debug_str_offsets 3.5% 17.2Mi 0.0% 0 .debug_line 3.3% 16.3Mi 0.0% 0 .debug_loclists 0.9% 4.62Mi 0.0% 0 .debug_str clang-16, x86_64 defconfig plus CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_COMPRESSED_ZLIB=y: Elapsed (wall clock) time (h:mm:ss or m:ss): 1:00.35 385M vmlinux 21.8% 85.4Mi 0.0% 0 .debug_info 2.1% 8.26Mi 0.0% 0 .debug_str_offsets 2.1% 8.24Mi 0.0% 0 .debug_loclists 1.9% 7.48Mi 0.0% 0 .debug_line 0.5% 1.94Mi 0.0% 0 .debug_str clang-16, x86_64 defconfig plus CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_COMPRESSED_ZSTD=y: Elapsed (wall clock) time (h:mm:ss or m:ss): 0:59.69 373M vmlinux 21.4% 81.4Mi 0.0% 0 .debug_info 2.3% 8.85Mi 0.0% 0 .debug_loclists 1.5% 5.71Mi 0.0% 0 .debug_line 0.5% 1.95Mi 0.0% 0 .debug_str_offsets 0.4% 1.62Mi 0.0% 0 .debug_str That's only a 3.11% overall binary size savings over zlib, but at no performance regression. Link: https://maskray.me/blog/2022-09-09-zstd-compressed-debug-sections Link: https://maskray.me/blog/2022-01-23-compressed-debug-sections Suggested-by: Sedat Dilek (DHL Supply Chain) Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Masahiro Yamada lib/Kconfig.debug | 29 +++++++++++++++++++++++++++-- scripts/Makefile.debug | 6 +++++- 2 files changed, 32 insertions(+), 3 deletions(-) commit 0d2573a2b7838a4f6934c2835e6730b38df4bcc9 Author: Geert Uytterhoeven Date: Wed Nov 9 14:30:55 2022 +0100 modpost: Join broken long printed messages Breaking long printed messages in multiple lines makes it very hard to look up where they originated from. Signed-off-by: Geert Uytterhoeven Reviewed-by: Nicolas Schier Signed-off-by: Masahiro Yamada scripts/mod/file2alias.c | 18 +++++++----------- scripts/mod/modpost.c | 8 +++----- 2 files changed, 10 insertions(+), 16 deletions(-) commit 35ffb1d9bff01cf3e2a55fcc8ab001cbb087c9cb Merge: 99429b224f61 52df1a8aabad Author: Alexei Starovoitov Date: Sun Nov 20 16:17:46 2022 -0800 Merge branch 'clean-up bpftool from legacy support' Sahid Orentino Ferdjaoui says: ==================== As part of commit 93b8952d223a ("libbpf: deprecate legacy BPF map definitions") and commit bd054102a8c7 ("libbpf: enforce strict libbpf 1.0 behaviors") The --legacy option is not relevant anymore. #1 is removing it. #4 is cleaning the code from using libbpf_get_error(). About patches #2 and #3 They are changes discovered while working on this series (credits to Quentin Monnet). #2 is cleaning-up usage of an unnecessary PTR_ERR(NULL), finally #3 is fixing an invalid value passed to strerror(). v1 -> v2: - Addressed review comments from Yonghong Song on patch #4 - Added a patch #5 that removes unwanted function noticed by Yonghong Song v2 -> v3 - Addressed review comments from Andrii Nakryiko on patch #2, #3, #4 * clean-up usage of libbpf_get_error() (#2, #3) * fix possible return of an uninitialized local variable err * fix returned errors using errno v3 -> v4 - Addressed review comments from Quentin Monnet * fix line moved from patch #2 to patch #3 * fix missing returned errors using errno * fix some returned values to errno instead of -1 ==================== Reviewed-by: Quentin Monnet Signed-off-by: Alexei Starovoitov commit 52df1a8aabadeba1e4c2fe157784637ddec76301 Author: Sahid Orentino Ferdjaoui Date: Sun Nov 20 11:26:43 2022 +0000 bpftool: remove function free_btf_vmlinux() The function contains a single btf__free() call which can be inlined. Credits to Yonghong Song. Signed-off-by: Sahid Orentino Ferdjaoui Acked-by: Yonghong Song Suggested-by: Yonghong Song Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20221120112515.38165-6-sahid.ferdjaoui@industrialdiscipline.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/map.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d1313e01271d2d8f33d6c82f1afb77e820a3540d Author: Sahid Orentino Ferdjaoui Date: Sun Nov 20 11:26:32 2022 +0000 bpftool: clean-up usage of libbpf_get_error() bpftool is now totally compliant with libbpf 1.0 mode and is not expected to be compiled with pre-1.0, let's clean-up the usage of libbpf_get_error(). The changes stay aligned with returned errors always negative. - In tools/bpf/bpftool/btf.c This fixes an uninitialized local variable `err` in function do_dump() because it may now be returned without having been set. - This also removes the checks on NULL pointers before calling btf__free() because that function already does the check. Signed-off-by: Sahid Orentino Ferdjaoui Link: https://lore.kernel.org/r/20221120112515.38165-5-sahid.ferdjaoui@industrialdiscipline.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/btf.c | 19 ++++++++----------- tools/bpf/bpftool/btf_dumper.c | 2 +- tools/bpf/bpftool/gen.c | 10 ++++------ tools/bpf/bpftool/iter.c | 10 ++++++---- tools/bpf/bpftool/main.c | 7 +++---- tools/bpf/bpftool/map.c | 15 +++++++-------- tools/bpf/bpftool/prog.c | 10 +++++----- tools/bpf/bpftool/struct_ops.c | 11 +++++------ 8 files changed, 39 insertions(+), 45 deletions(-) commit d2973ffd25c2295055349212ca26c18929e5e9f5 Author: Sahid Orentino Ferdjaoui Date: Sun Nov 20 11:26:18 2022 +0000 bpftool: fix error message when function can't register struct_ops It is expected that errno be passed to strerror(). This also cleans this part of code from using libbpf_get_error(). Signed-off-by: Sahid Orentino Ferdjaoui Acked-by: Yonghong Song Suggested-by: Quentin Monnet Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20221120112515.38165-4-sahid.ferdjaoui@industrialdiscipline.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/struct_ops.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 989f285159b84831c54d277112dcf803da51e722 Author: Sahid Orentino Ferdjaoui Date: Sun Nov 20 11:26:07 2022 +0000 bpftool: replace return value PTR_ERR(NULL) with 0 There is no reasons to keep PTR_ERR() when kern_btf=NULL, let's just return 0. This also cleans this part of code from using libbpf_get_error(). Signed-off-by: Sahid Orentino Ferdjaoui Acked-by: Yonghong Song Suggested-by: Quentin Monnet Link: https://lore.kernel.org/r/20221120112515.38165-3-sahid.ferdjaoui@industrialdiscipline.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/struct_ops.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9b8107553424fd87955fed257a807672c2097297 Author: Sahid Orentino Ferdjaoui Date: Sun Nov 20 11:25:55 2022 +0000 bpftool: remove support of --legacy option for bpftool Following: commit bd054102a8c7 ("libbpf: enforce strict libbpf 1.0 behaviors") commit 93b8952d223a ("libbpf: deprecate legacy BPF map definitions") The --legacy option is no longer relevant as libbpf no longer supports it. libbpf_set_strict_mode() is a no-op operation. Signed-off-by: Sahid Orentino Ferdjaoui Acked-by: Yonghong Song Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20221120112515.38165-2-sahid.ferdjaoui@industrialdiscipline.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/Documentation/common_options.rst | 9 --------- tools/bpf/bpftool/Documentation/substitutions.rst | 2 +- tools/bpf/bpftool/bash-completion/bpftool | 2 +- tools/bpf/bpftool/main.c | 15 --------------- tools/bpf/bpftool/main.h | 3 +-- tools/bpf/bpftool/prog.c | 5 ----- tools/testing/selftests/bpf/test_bpftool_synctypes.py | 6 +++--- 7 files changed, 6 insertions(+), 36 deletions(-) commit 99429b224f6107f691c365ef9bdc1bbe4ee43ede Merge: e181d3f143f7 58d84bee5846 Author: Alexei Starovoitov Date: Sun Nov 20 15:43:37 2022 -0800 Merge branch 'bpf: Implement two type cast kfuncs' Yonghong Song says: ==================== Currenty, a non-tracing bpf program typically has a single 'context' argument with predefined uapi struct type. Following these uapi struct, user is able to access other fields defined in uapi header. Inside the kernel, the user-seen 'context' argument is replaced with 'kernel context' (or 'kctx' in short) which can access more information than what uapi header provides. To access other info not in uapi header, people typically do two things: (1). extend uapi to access more fields rooted from 'context'. (2). use bpf_probe_read_kernl() helper to read particular field based on kctx. Using (1) needs uapi change and using (2) makes code more complex since direct memory access is not allowed. There are already a few instances trying to access more information from kctx: . trying to access some fields from perf_event kctx ([1]). . trying to access some fields from xdp kctx ([2]). This patch set tried to allow direct memory access for kctx fields by introducing bpf_cast_to_kern_ctx() kfunc. Martin mentioned a use case like type casting below: #define skb_shinfo(SKB) ((struct skb_shared_info *)(skb_end_pointer(SKB))) basically a 'unsigned char *" casted to 'struct skb_shared_info *'. This patch set tries to support such a use case as well with bpf_rdonly_cast(). For the patch series, Patch 1 added support for a kfunc available to all prog types. Patch 2 added bpf_cast_to_kern_ctx() kfunc. Patch 3 added bpf_rdonly_cast() kfunc. Patch 4 added a few positive and negative tests. [1] https://lore.kernel.org/bpf/ad15b398-9069-4a0e-48cb-4bb651ec3088@meta.com/ [2] https://lore.kernel.org/bpf/20221109215242.1279993-1-john.fastabend@gmail.com/ Changelog: v3 -> v4: - remove unnecessary bpf_ctx_convert.t error checking - add and use meta.ret_btf_id instead of meta.arg_constant.value for bpf_cast_to_kern_ctx(). - add PTR_TRUSTED to the return PTR_TO_BTF_ID type for bpf_cast_to_kern_ctx(). v2 -> v3: - rebase on top of bpf-next (for merging conflicts) - add the selftest to s390x deny list rfcv1 -> v2: - break original one kfunc into two. - add missing error checks and error logs. - adapt to the new conventions in https://lore.kernel.org/all/20221118015614.2013203-1-memxor@gmail.com/ for example, with __ign and __k suffix. - added support in fixup_kfunc_call() to replace kfunc calls with a single mov. ==================== Signed-off-by: Alexei Starovoitov commit 58d84bee58465cc9f6a63ca3931240419497f917 Author: Yonghong Song Date: Sun Nov 20 11:54:42 2022 -0800 bpf: Add type cast unit tests Three tests are added. One is from John Fastabend ({1]) which tests tracing style access for xdp program from the kernel ctx. Another is a tc test to test both kernel ctx tracing style access and explicit non-ctx type cast. The third one is for negative tests including two tests, a tp_bpf test where the bpf_rdonly_cast() returns a untrusted ptr which cannot be used as helper argument, and a tracepoint test where the kernel ctx is a u64. Also added the test to DENYLIST.s390x since s390 does not currently support calling kernel functions in JIT mode. [1] https://lore.kernel.org/bpf/20221109215242.1279993-1-john.fastabend@gmail.com/ Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221120195442.3114844-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/DENYLIST.s390x | 1 + tools/testing/selftests/bpf/prog_tests/type_cast.c | 114 +++++++++++++++++++++ tools/testing/selftests/bpf/progs/type_cast.c | 83 +++++++++++++++ 3 files changed, 198 insertions(+) commit a35b9af4ec2c7f69286ef861fd2074a577e354cb Author: Yonghong Song Date: Sun Nov 20 11:54:37 2022 -0800 bpf: Add a kfunc for generic type cast Implement bpf_rdonly_cast() which tries to cast the object to a specified type. This tries to support use case like below: #define skb_shinfo(SKB) ((struct skb_shared_info *)(skb_end_pointer(SKB))) where skb_end_pointer(SKB) is a 'unsigned char *' and needs to be casted to 'struct skb_shared_info *'. The signature of bpf_rdonly_cast() looks like void *bpf_rdonly_cast(void *obj, __u32 btf_id) The function returns the same 'obj' but with PTR_TO_BTF_ID with btf_id. The verifier will ensure btf_id being a struct type. Since the supported type cast may not reflect what the 'obj' represents, the returned btf_id is marked as PTR_UNTRUSTED, so the return value and subsequent pointer chasing cannot be used as helper/kfunc arguments. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221120195437.3114585-1-yhs@fb.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 6 ++++++ kernel/bpf/verifier.c | 20 ++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) commit fd264ca020948a743e4c36731dfdecc4a812153c Author: Yonghong Song Date: Sun Nov 20 11:54:32 2022 -0800 bpf: Add a kfunc to type cast from bpf uapi ctx to kernel ctx Implement bpf_cast_to_kern_ctx() kfunc which does a type cast of a uapi ctx object to the corresponding kernel ctx. Previously if users want to access some data available in kctx but not in uapi ctx, bpf_probe_read_kernel() helper is needed. The introduction of bpf_cast_to_kern_ctx() allows direct memory access which makes code simpler and easier to understand. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221120195432.3113982-1-yhs@fb.com Signed-off-by: Alexei Starovoitov include/linux/btf.h | 5 +++++ kernel/bpf/btf.c | 20 ++++++++++++++++++++ kernel/bpf/helpers.c | 6 ++++++ kernel/bpf/verifier.c | 22 ++++++++++++++++++++++ 4 files changed, 53 insertions(+) commit cfe1456440c8feaf6558577a400745d774418379 Author: Yonghong Song Date: Sun Nov 20 11:54:26 2022 -0800 bpf: Add support for kfunc set with common btf_ids Later on, we will introduce kfuncs bpf_cast_to_kern_ctx() and bpf_rdonly_cast() which apply to all program types. Currently kfunc set only supports individual prog types. This patch added support for kfunc applying to all program types. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221120195426.3113828-1-yhs@fb.com Signed-off-by: Alexei Starovoitov kernel/bpf/btf.c | 8 ++++++++ kernel/bpf/helpers.c | 12 +++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) commit e181d3f143f7957a73c8365829249d8084602606 Author: Kumar Kartikeya Dwivedi Date: Mon Nov 21 02:56:10 2022 +0530 bpf: Disallow bpf_obj_new_impl call when bpf_mem_alloc_init fails In the unlikely event that bpf_global_ma is not correctly initialized, instead of checking the boolean everytime bpf_obj_new_impl is called, simply check it while loading the program and return an error if bpf_global_ma_set is false. Suggested-by: Alexei Starovoitov Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221120212610.2361700-1-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 2 -- kernel/bpf/verifier.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) commit dc6e328a8d28e1c0c6e4f19e90cca17bb8fc126b Author: Linus Walleij Date: Sun Nov 20 23:47:06 2022 +0100 ARM: ixp4xx: Remove unused static map The IXP4xx is just using the device tree now, only keep the static UART map if and only if we are debugging. Signed-off-by: Linus Walleij arch/arm/mach-ixp4xx/ixp4xx-of.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) commit 738b1985cbd1eec3f0be645c807745b16d378705 Author: Lukas Bulwahn Date: Tue Nov 15 13:31:02 2022 +0100 MAINTAINERS: adjust ARM/INTEL IXP4XX ARM ARCHITECTURE to ixp4xx clean-up Commit c83227a5d05e ("irq/gpio: ixp4xx: Drop boardfile probe path") and commit 155e4306107f ("clocksource/drivers/ixp4xx: Drop boardfile probe path") remove files include/linux/irqchip/irq-ixp4xx.h and include/linux/platform_data/timer-ixp4xx.h, but miss to adjust MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about broken references. Remove file entries for those files in ARM/INTEL IXP4XX ARM ARCHITECTURE. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20221115123102.22732-1-lukas.bulwahn@gmail.com Signed-off-by: Linus Walleij MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit d53f77d77f08321b2c7e405fdb310c59e906098e Merge: 91dd31146f06 80d34260f36c Author: Linus Walleij Date: Sun Nov 20 23:34:45 2022 +0100 Merge tag 'renesas-pinctrl-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.2 - Use dynamic GPIO base on combined pincctrl/gpio controllers on SH/R-Mobile SoCs, - Miscellaneous improvements. commit 922bde5a095540fe3870245e4f0b625a20967ea4 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:30 2022 +0100 power: supply: z2_battery: 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: Sebastian Reichel drivers/power/supply/z2_battery.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8a4f891b2a10f6bbc7bac256b2f745f03d2b7185 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:29 2022 +0100 power: supply: ucs1002: 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: Sebastian Reichel drivers/power/supply/ucs1002_power.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6d43a4b0b2f8ab6c9893e2673a133d1798b230e1 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:28 2022 +0100 power: supply: smb347: 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: Sebastian Reichel drivers/power/supply/smb347-charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 02d1a40141a7b9d9cb8ef151c14e7d7aeaa56966 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:27 2022 +0100 power: supply: sbs-manager: 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: Sebastian Reichel drivers/power/supply/sbs-manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ef3f6e07d55aeb32880fd24993de4efa9ec09c41 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:26 2022 +0100 power: supply: sbs: 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: Sebastian Reichel drivers/power/supply/sbs-charger.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2adfc4370ebb745380a44c3e5418486a32a9ba67 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:25 2022 +0100 power: supply: rt9455: 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: Sebastian Reichel drivers/power/supply/rt9455_charger.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f40ec8bc0888ee785317e0aa4ffa239f73b03d97 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:24 2022 +0100 power: supply: rt5033_battery: 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: Sebastian Reichel drivers/power/supply/rt5033_battery.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d9ac265b57b8625e4ce1b1bd6a6baa862d51c1f2 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:23 2022 +0100 power: supply: max17042_battery: 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: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a07fca69378c26ea034826feb0011256e25ad237 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:22 2022 +0100 power: supply: max17040: 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: Sebastian Reichel drivers/power/supply/max17040_battery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b17018dee05a145e428d1de12d962d25d5f8837d Author: Uwe Kleine-König Date: Fri Nov 18 23:44:21 2022 +0100 power: supply: max14656: 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: Sebastian Reichel drivers/power/supply/max14656_charger_detector.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 97bdbe0d04b183e5680cf0a487fb0abd4de85a0f Author: Uwe Kleine-König Date: Fri Nov 18 23:44:20 2022 +0100 power: supply: ltc4162-l: 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: Sebastian Reichel drivers/power/supply/ltc4162-l-charger.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 66d9e8fc2bacffb80300d496c54d2fc072229656 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:19 2022 +0100 power: supply: ltc2941: 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: Sebastian Reichel drivers/power/supply/ltc2941-battery-gauge.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d9cafca1f200ab4bce13a42ffae82718aba29eb9 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:18 2022 +0100 power: supply: lp8727: 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: Sebastian Reichel drivers/power/supply/lp8727_charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 433e380226799bfcd823adca1c5e1aec8e2ef72a Author: Uwe Kleine-König Date: Fri Nov 18 23:44:17 2022 +0100 power: supply: ds2782: 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: Sebastian Reichel drivers/power/supply/ds2782_battery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 67f56c79a5723cbdd9dd7bbb1a0375895c2d122f Author: Uwe Kleine-König Date: Fri Nov 18 23:44:16 2022 +0100 power: supply: bq27xxx: 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: Sebastian Reichel drivers/power/supply/bq27xxx_battery_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 79fc7c26602f990e49471df1d237466b9530ccdb Author: Uwe Kleine-König Date: Fri Nov 18 23:44:15 2022 +0100 power: supply: bq25980: 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: Sebastian Reichel drivers/power/supply/bq25980_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c5cddca2351b291c8787b45cd046b1dfeb86979f Author: Uwe Kleine-König Date: Fri Nov 18 23:44:14 2022 +0100 power: supply: bq25890: 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: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fb94ef2efa1c3e2af52d8144b68eb9c90b0b31ed Author: Uwe Kleine-König Date: Fri Nov 18 23:44:13 2022 +0100 power: supply: bq256xx: 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: Sebastian Reichel drivers/power/supply/bq256xx_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ed4e2c7570a7b0972f449b2961e2efb9b48849b2 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:12 2022 +0100 power: supply: bq2515x: 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: Sebastian Reichel drivers/power/supply/bq2515x_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit aaf5339e295baaee2b03c2dc45ac9dc8c2573a76 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:11 2022 +0100 power: supply: bq24735: 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: Sebastian Reichel drivers/power/supply/bq24735-charger.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 924668b4ed02dc6c134f6f3b30bd4c22f8dd4a82 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:10 2022 +0100 power: supply: bq24257: 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: Sebastian Reichel drivers/power/supply/bq24257_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 31731754b9257a1e2ebad60f270ecbe089d2ebd0 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:09 2022 +0100 power: supply: bq24190: 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: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 31c050513c7ac1e455d0f1b1b6a882d96c94d5da Author: Uwe Kleine-König Date: Fri Nov 18 23:44:08 2022 +0100 power: supply: bq2415x: 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: Sebastian Reichel drivers/power/supply/bq2415x_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 02c70e915967c372d80f6015ef56744285350251 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:07 2022 +0100 power: supply: adp5061: 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: Sebastian Reichel drivers/power/supply/adp5061.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2f88b7050d6721cdb0771beec2dc85ab4c17c2eb Merge: 332d7d0c6dd7 662233731d66 Author: Sebastian Reichel Date: Sun Nov 20 20:09:22 2022 +0100 Merge 'i2c/client_device_id_helper-immutable' Merge immutable branch adding 'i2c_client_get_device_id()' function, so that drivers can easily be converted to use i2c_driver::probe_new. Signed-off-by: Sebastian Reichel commit efc1970d683fa7c53a2bc561d40436bf11a18dc0 Merge: ee748cd95e3a fe147956fca4 Author: Alexei Starovoitov Date: Sun Nov 20 09:16:21 2022 -0800 Merge branch 'Support storing struct task_struct objects as kptrs' David Vernet says: ==================== Now that BPF supports adding new kernel functions with kfuncs, and storing kernel objects in maps with kptrs, we can add a set of kfuncs which allow struct task_struct objects to be stored in maps as referenced kptrs. The possible use cases for doing this are plentiful. During tracing, for example, it would be useful to be able to collect some tasks that performed a certain operation, and then periodically summarize who they are, which cgroup they're in, how much CPU time they've utilized, etc. Doing this now would require storing the tasks' pids along with some relevant data to be exported to user space, and later associating the pids to tasks in other event handlers where the data is recorded. Another useful by-product of this is that it allows a program to pin a task in a BPF program, and by proxy therefore also e.g. pin its task local storage. In order to support this, we'll need to expand KF_TRUSTED_ARGS to support receiving trusted, non-refcounted pointers. It currently only supports either PTR_TO_CTX pointers, or refcounted pointers. What this means in terms of the implementation is that check_kfunc_args() would have to also check for the PTR_TRUSTED or MEM_ALLOC type modifiers when determining if a trusted KF_ARG_PTR_TO_ALLOC_BTF_ID or KF_ARG_PTR_TO_BTF_ID pointer requires a refcount. Note that PTR_UNTRUSTED is insufficient for this purpose, as it does not cover all of the possible types of potentially unsafe pointers. For example, a pointer obtained from walking a struct is not PTR_UNTRUSTED. To account for this and enable us to expand KF_TRUSTED_ARGS to include allow-listed arguments such as those passed by the kernel to tracepoints and struct_ops callbacks, this patch set also introduces a new PTR_TRUSTED type flag modifier which records if a pointer was obtained passed from the kernel in a trusted context. Currently, both PTR_TRUSTED and MEM_ALLOC are used to imply that a pointer is trusted. Longer term, PTR_TRUSTED should be the sole source of truth for whether a pointer is trusted. This requires us to set PTR_TRUSTED when appropriate (e.g. when setting MEM_ALLOC), and unset it when appropriate (e.g. when setting PTR_UNTRUSTED). We don't do that in this patch, as we need to do more clean up before this can be done in a clear and well-defined manner. In closing, this patch set: 1. Adds the new PTR_TRUSTED register type modifier flag, and updates the verifier and existing selftests accordingly. Also expands KF_TRUSTED_ARGS to also include trusted pointers that were not obtained from walking structs. 2. Adds a new set of kfuncs that allows struct task_struct* objects to be used as kptrs. 3. Adds a new selftest suite to validate these new task kfuncs. --- Changelog: v8 -> v9: - Moved check for release register back to where we check for !PTR_TO_BTF_ID || socket. Change the verifier log message to reflect really what's being tested (the presence of unsafe modifiers) (Alexei) - Fix verifier_test error tests to reflect above changes - Remove unneeded parens around bitwise operator checks (Alexei) - Move updates to reg_type_str() which allow multiple type modifiers to be present in the prefix string, to a separate patch (Alexei) - Increase TYPE_STR_BUF_LEN size to 128 to reflect larger prefix size in reg_type_str(). v7 -> v8: - Rebased onto Kumar's latest patch set which, adds a new MEM_ALLOC reg type modifier for bpf_obj_new() calls. - Added comments to bpf_task_kptr_get() describing some of the subtle races we're protecting against (Alexei and John) - Slightly rework process_kf_arg_ptr_to_btf_id(), and add a new reg_has_unsafe_modifiers() function which validates that a register containing a kfunc release arg doesn't have unsafe modifiers. Note that this is slightly different than the check for KF_TRUSTED_ARGS. An alternative here would be to treat KF_RELEASE as implicitly requiring KF_TRUSTED_ARGS. - Export inline bpf_type_has_unsafe_modifiers() function from bpf_verifier.h so that it can be used from bpf_tcp_ca.c. Eventually this function should likely be changed to bpf_type_is_trusted(), once PTR_TRUSTED is the real source of truth. v6 -> v7: - Removed the PTR_WALKED type modifier, and instead define a new PTR_TRUSTED type modifier which is set on registers containing pointers passed from trusted contexts (i.e. as tracepoint or struct_ops callback args) (Alexei) - Remove the new KF_OWNED_ARGS kfunc flag. This can be accomplished by defining a new type that wraps an existing type, such as with struct nf_conn___init (Alexei) - Add a test_task_current_acquire_release testcase which verifies we can acquire a task struct returned from bpf_get_current_task_btf(). - Make bpf_task_acquire() no longer return NULL, as it can no longer be called with a NULL task. - Removed unnecessary is_test_kfunc_task() checks from failure testcases. v5 -> v6: - Add a new KF_OWNED_ARGS kfunc flag which may be used by kfuncs to express that they require trusted, refcounted args (Kumar) - Rename PTR_NESTED -> PTR_WALKED in the verifier (Kumar) - Convert reg_type_str() prefixes to use snprintf() instead of strncpy() (Kumar) - Add PTR_TO_BTF_ID | PTR_WALKED to missing struct btf_reg_type instances -- specifically btf_id_sock_common_types, and percpu_btf_ptr_types. - Add a missing PTR_TO_BTF_ID | PTR_WALKED switch case entry in check_func_arg_reg_off(), which is required when validating helper calls (Kumar) - Update reg_type_mismatch_ok() to check base types for the registers (i.e. to accommodate type modifiers). Additionally, add a lengthy comment that explains why this is being done (Kumar) - Update convert_ctx_accesses() to also issue probe reads for PTR_TO_BTF_ID | PTR_WALKED (Kumar) - Update selftests to expect new prefix reg type strings. - Rename task_kfunc_acquire_trusted_nested testcase to task_kfunc_acquire_trusted_walked, and fix a comment (Kumar) - Remove KF_TRUSTED_ARGS from bpf_task_release(), which already includes KF_RELEASE (Kumar) - Add bpf-next in patch subject lines (Kumar) v4 -> v5: - Fix an improperly formatted patch title. v3 -> v4: - Remove an unnecessary check from my repository that I forgot to remove after debugging something. v2 -> v3: - Make bpf_task_acquire() check for NULL, and include KF_RET_NULL (Martin) - Include new PTR_NESTED register modifier type flag which specifies whether a pointer was obtained from walking a struct. Use this to expand the meaning of KF_TRUSTED_ARGS to include trusted pointers that were passed from the kernel (Kumar) - Add more selftests to the task_kfunc selftest suite which verify that you cannot pass a walked pointer to bpf_task_acquire(). - Update bpf_task_acquire() to also specify KF_TRUSTED_ARGS. v1 -> v2: - Rename tracing_btf_ids to generic_kfunc_btf_ids, and add the new kfuncs to that list instead of making a separate btf id list (Alexei). - Don't run the new selftest suite on s390x, which doesn't appear to support invoking kfuncs. - Add a missing __diag_ignore block for -Wmissing-prototypes (lkp@intel.com). - Fix formatting on some of the SPDX-License-Identifier tags. - Clarified the function header comment a bit on bpf_task_kptr_get(). ==================== Signed-off-by: Alexei Starovoitov commit fe147956fca4604b920e6be652abc9bea8ce8952 Author: David Vernet Date: Sat Nov 19 23:10:04 2022 -0600 bpf/selftests: Add selftests for new task kfuncs A previous change added a series of kfuncs for storing struct task_struct objects as referenced kptrs. This patch adds a new task_kfunc test suite for validating their expected behavior. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221120051004.3605026-5-void@manifault.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/DENYLIST.s390x | 1 + .../testing/selftests/bpf/prog_tests/task_kfunc.c | 159 +++++++++++++ .../selftests/bpf/progs/task_kfunc_common.h | 71 ++++++ .../selftests/bpf/progs/task_kfunc_failure.c | 260 +++++++++++++++++++++ .../selftests/bpf/progs/task_kfunc_success.c | 149 ++++++++++++ 5 files changed, 640 insertions(+) commit 90660309b0c76c564a31a21f3a81d6641a9acaa0 Author: David Vernet Date: Sat Nov 19 23:10:03 2022 -0600 bpf: Add kfuncs for storing struct task_struct * as a kptr Now that BPF supports adding new kernel functions with kfuncs, and storing kernel objects in maps with kptrs, we can add a set of kfuncs which allow struct task_struct objects to be stored in maps as referenced kptrs. The possible use cases for doing this are plentiful. During tracing, for example, it would be useful to be able to collect some tasks that performed a certain operation, and then periodically summarize who they are, which cgroup they're in, how much CPU time they've utilized, etc. In order to enable this, this patch adds three new kfuncs: struct task_struct *bpf_task_acquire(struct task_struct *p); struct task_struct *bpf_task_kptr_get(struct task_struct **pp); void bpf_task_release(struct task_struct *p); A follow-on patch will add selftests validating these kfuncs. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221120051004.3605026-4-void@manifault.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 3 deletions(-) commit 3f00c52393445ed49aadc1a567aa502c6333b1a1 Author: David Vernet Date: Sat Nov 19 23:10:02 2022 -0600 bpf: Allow trusted pointers to be passed to KF_TRUSTED_ARGS kfuncs Kfuncs currently support specifying the KF_TRUSTED_ARGS flag to signal to the verifier that it should enforce that a BPF program passes it a "safe", trusted pointer. Currently, "safe" means that the pointer is either PTR_TO_CTX, or is refcounted. There may be cases, however, where the kernel passes a BPF program a safe / trusted pointer to an object that the BPF program wishes to use as a kptr, but because the object does not yet have a ref_obj_id from the perspective of the verifier, the program would be unable to pass it to a KF_ACQUIRE | KF_TRUSTED_ARGS kfunc. The solution is to expand the set of pointers that are considered trusted according to KF_TRUSTED_ARGS, so that programs can invoke kfuncs with these pointers without getting rejected by the verifier. There is already a PTR_UNTRUSTED flag that is set in some scenarios, such as when a BPF program reads a kptr directly from a map without performing a bpf_kptr_xchg() call. These pointers of course can and should be rejected by the verifier. Unfortunately, however, PTR_UNTRUSTED does not cover all the cases for safety that need to be addressed to adequately protect kfuncs. Specifically, pointers obtained by a BPF program "walking" a struct are _not_ considered PTR_UNTRUSTED according to BPF. For example, say that we were to add a kfunc called bpf_task_acquire(), with KF_ACQUIRE | KF_TRUSTED_ARGS, to acquire a struct task_struct *. If we only used PTR_UNTRUSTED to signal that a task was unsafe to pass to a kfunc, the verifier would mistakenly allow the following unsafe BPF program to be loaded: SEC("tp_btf/task_newtask") int BPF_PROG(unsafe_acquire_task, struct task_struct *task, u64 clone_flags) { struct task_struct *acquired, *nested; nested = task->last_wakee; /* Would not be rejected by the verifier. */ acquired = bpf_task_acquire(nested); if (!acquired) return 0; bpf_task_release(acquired); return 0; } To address this, this patch defines a new type flag called PTR_TRUSTED which tracks whether a PTR_TO_BTF_ID pointer is safe to pass to a KF_TRUSTED_ARGS kfunc or a BPF helper function. PTR_TRUSTED pointers are passed directly from the kernel as a tracepoint or struct_ops callback argument. Any nested pointer that is obtained from walking a PTR_TRUSTED pointer is no longer PTR_TRUSTED. From the example above, the struct task_struct *task argument is PTR_TRUSTED, but the 'nested' pointer obtained from 'task->last_wakee' is not PTR_TRUSTED. A subsequent patch will add kfuncs for storing a task kfunc as a kptr, and then another patch will add selftests to validate. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221120051004.3605026-3-void@manifault.com Signed-off-by: Alexei Starovoitov Documentation/bpf/kfuncs.rst | 30 +++++----- include/linux/bpf.h | 30 ++++++++++ include/linux/bpf_verifier.h | 7 +++ include/linux/btf.h | 65 ++++++++++++-------- kernel/bpf/btf.c | 8 +++ kernel/bpf/verifier.c | 69 ++++++++++++++++++---- kernel/trace/bpf_trace.c | 2 +- net/ipv4/bpf_tcp_ca.c | 4 +- tools/testing/selftests/bpf/verifier/calls.c | 2 +- .../testing/selftests/bpf/verifier/ref_tracking.c | 4 +- 10 files changed, 164 insertions(+), 57 deletions(-) commit ef66c5475d7fb864c2418d3bdd19dee46324624b Author: David Vernet Date: Sat Nov 19 23:10:01 2022 -0600 bpf: Allow multiple modifiers in reg_type_str() prefix reg_type_str() in the verifier currently only allows a single register type modifier to be present in the 'prefix' string which is eventually stored in the env type_str_buf. This currently works fine because there are no overlapping type modifiers, but once PTR_TRUSTED is added, that will no longer be the case. This patch updates reg_type_str() to support having multiple modifiers in the prefix string, and updates the size of type_str_buf to be 128 bytes. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20221120051004.3605026-2-void@manifault.com Signed-off-by: Alexei Starovoitov include/linux/bpf_verifier.h | 2 +- kernel/bpf/verifier.c | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) commit 0b8ff0ba2744f364e8f5fb695ae323bae0ecfd19 Author: Namhyung Kim Date: Wed Nov 16 15:38:46 2022 -0800 perf test: Replace record test workload with thloop So that it can get rid of requirements for a compiler. $ sudo ./perf test -v 92 92: perf record tests : --- start --- test child forked, pid 740204 Basic --per-thread mode test Basic --per-thread mode test [Success] Register capture test Register capture test [Success] Basic --system-wide mode test Basic --system-wide mode test [Success] Basic target workload test Basic target workload test [Success] test child finished with 0 ---- end ---- perf record tests: Ok Signed-off-by: Namhyung Kim Tested-by: James Clark Cc: Adrian Hunter Cc: Athira Jajeev Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record.sh | 59 ++-------------------------------------- 1 file changed, 3 insertions(+), 56 deletions(-) commit 69b352927885b17f03d3ee4ee38f580699af107a Author: Namhyung Kim Date: Wed Nov 16 15:38:45 2022 -0800 perf test: Add 'thloop' test workload The thloop is similar to noploop but runs in two threads. This is needed to verify perf record --per-thread to handle multi-threaded programs properly. $ perf test -w thloop It also takes an optional argument to specify runtime in seconds (default: 1). Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/tests.h | 1 + tools/perf/tests/workloads/Build | 1 + tools/perf/tests/workloads/thloop.c | 53 +++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+) commit 24e733b29f13284aac30c4d1fb9f19201951d770 Author: Namhyung Kim Date: Wed Nov 16 15:38:44 2022 -0800 perf test: Replace pipe test workload with noploop So that it can get rid of requirement of a compiler. Also define and use more local symbols to ease future changes. $ sudo ./perf test -v pipe 87: perf pipe recording and injection test : --- start --- test child forked, pid 748003 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.000 MB - ] 748014 748014 -1 |perf [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.000 MB - ] 99.83% perf perf [.] noploop [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.000 MB - ] 99.85% perf perf [.] noploop [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.160 MB /tmp/perf.data.2XYPdw (4007 samples) ] 99.83% perf perf [.] noploop test child finished with 0 ---- end ---- perf pipe recording and injection test: Ok Signed-off-by: Namhyung Kim Tested-by: James Clark Cc: Adrian Hunter Cc: Athira Jajeev Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/pipe_test.sh | 55 +++++++------------------------------ 1 file changed, 10 insertions(+), 45 deletions(-) commit f215054d749b17c56e014fdca2fcc592dac4529c Author: Namhyung Kim Date: Wed Nov 16 15:38:43 2022 -0800 perf test: Add -w/--workload option The -w/--workload option is to run a simple workload used by testing. This adds a basic framework to run the workloads and 'noploop' workload as an example. $ perf test -w noploop The noploop does a loop doing nothing (NOP) for a second by default. It can have an optional argument to specify the time in seconds. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: German Gomez Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Zhengjun Xing Link: https://lore.kernel.org/r/20221116233854.1596378-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/Build | 2 ++ tools/perf/tests/builtin-test.c | 24 ++++++++++++++++++++++++ tools/perf/tests/tests.h | 22 ++++++++++++++++++++++ tools/perf/tests/workloads/Build | 3 +++ tools/perf/tests/workloads/noploop.c | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 83 insertions(+) commit e664f31e21a2d201507704f302ab32f498871b11 Author: Ian Rogers Date: Wed Nov 16 16:43:56 2022 -0800 tools lib traceevent: Make install_headers clearer Add libtraceevent to the name so that this install_headers build appears different to similar targets in different libraries. Add ; after kbuffer.h install target for consistency. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Song Liu Cc: Stanislav Fomichev Cc: Stephane Eranian Cc: Yonghong Song Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221117004356.279422-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 77dce6890a2a715b186bdc149c843571a5bb47df Author: Ian Rogers Date: Wed Nov 16 16:43:55 2022 -0800 tools lib subcmd: Make install_headers clearer Add libsubcmd to the name so that this install_headers build appears different to similar targets in different libraries. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Song Liu Cc: Stanislav Fomichev Cc: Stephane Eranian Cc: Yonghong Song Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221117004356.279422-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/subcmd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8951bfb4cb325a6b80310790dc78ac9b4a147eb Author: Ian Rogers Date: Wed Nov 16 16:43:54 2022 -0800 tools lib perf: Make install_headers clearer Add libperf to the name so that this install_headers build appears different to similar targets in different libraries. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Song Liu Cc: Stanislav Fomichev Cc: Stephane Eranian Cc: Yonghong Song Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221117004356.279422-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 806dda31b856d83d8ec211aa9831bac5f978271e Author: Ian Rogers Date: Wed Nov 16 16:43:53 2022 -0800 tools lib symbol: Clean up build output Missing @ when building libsymbol. Make the install echo specific to installing the libsymbol headers. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Song Liu Cc: Stanislav Fomichev Cc: Stephane Eranian Cc: Yonghong Song Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221117004356.279422-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/symbol/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit daa45f3f3577556801c7b0b2df85eed1289fbcb6 Author: Ian Rogers Date: Wed Nov 16 16:43:52 2022 -0800 tools lib bpf: Avoid install_headers make warning The perf build makes the install_headers target, however, as there is no action for this target a warning is always produced of: make[3]: Nothing to be done for 'install_headers'. Solve this by adding a display of 'INSTALL libbpf_headers'. Signed-off-by: Ian Rogers Acked-by: Andrii Nakryiko Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Song Liu Cc: Stanislav Fomichev Cc: Stephane Eranian Cc: Yonghong Song Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221117004356.279422-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/Makefile | 1 + 1 file changed, 1 insertion(+) commit 586cb1d65cc44371115600bc981626725c864029 Author: Ian Rogers Date: Wed Nov 16 16:43:51 2022 -0800 tools lib api: Clean up install_headers Add missing backslash that caused an install command to always appear in build output. Make the install headers more specific. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Song Liu Cc: Stanislav Fomichev Cc: Stephane Eranian Cc: Yonghong Song Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20221117004356.279422-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b3c39b1a96a67a7e246d562f44d04ce6f9ef878f Merge: 63a3bf5e8d9e 77c51ba552a1 Author: Arnaldo Carvalho de Melo Date: Sun Nov 20 11:29:39 2022 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes and check if libraries used that comes from other trees continue to work with tools/perf, such as tools/lib/bpf. Signed-off-by: Arnaldo Carvalho de Melo commit 5fdded8448924e3631d466eea499b11606c43640 Author: Kant Fan Date: Tue Oct 25 15:21:09 2022 +0800 PM/devfreq: governor: Add a private governor_data for governor The member void *data in the structure devfreq can be overwrite by governor_userspace. For example: 1. The device driver assigned the devfreq governor to simple_ondemand by the function devfreq_add_device() and init the devfreq member void *data to a pointer of a static structure devfreq_simple_ondemand_data by the function devfreq_add_device(). 2. The user changed the devfreq governor to userspace by the command "echo userspace > /sys/class/devfreq/.../governor". 3. The governor userspace alloced a dynamic memory for the struct userspace_data and assigend the member void *data of devfreq to this memory by the function userspace_init(). 4. The user changed the devfreq governor back to simple_ondemand by the command "echo simple_ondemand > /sys/class/devfreq/.../governor". 5. The governor userspace exited and assigned the member void *data in the structure devfreq to NULL by the function userspace_exit(). 6. The governor simple_ondemand fetched the static information of devfreq_simple_ondemand_data in the function devfreq_simple_ondemand_func() but the member void *data of devfreq was assigned to NULL by the function userspace_exit(). 7. The information of upthreshold and downdifferential is lost and the governor simple_ondemand can't work correctly. The member void *data in the structure devfreq is designed for a static pointer used in a governor and inited by the function devfreq_add_device(). This patch add an element named governor_data in the devfreq structure which can be used by a governor(E.g userspace) who want to assign a private data to do some private things. Fixes: ce26c5bb9569 ("PM / devfreq: Add basic governors") Cc: stable@vger.kernel.org # 5.10+ Reviewed-by: Chanwoo Choi Acked-by: MyungJoo Ham Signed-off-by: Kant Fan Signed-off-by: Chanwoo Choi drivers/devfreq/devfreq.c | 6 ++---- drivers/devfreq/governor_userspace.c | 12 ++++++------ include/linux/devfreq.h | 7 ++++--- 3 files changed, 12 insertions(+), 13 deletions(-) commit 4563db4b7988613570d435e7846e553ecf92e521 Merge: f4e700fd9466 41adc2fbad8b Author: Conor Dooley Date: Sun Nov 20 11:12:13 2022 +0000 Merge branch 'riscv-thead_c9xx' into riscv-dt-for-next The bouffalolabs stuff is going to need the thead,c906 compatible too, so there is no point waiting the D1 stuff to land for it. Signed-off-by: Conor Dooley commit 41adc2fbad8bc42ed5fdf480e5318133a4941bbb Author: Samuel Holland Date: Mon Aug 15 00:08:05 2022 -0500 dt-bindings: riscv: Add T-HEAD C906 and C910 compatibles The C906 and C910 are RISC-V CPU cores from T-HEAD Semiconductor. Notably, the C906 core is used in the Allwinner D1 SoC. Signed-off-by: Samuel Holland Acked-by: Rob Herring Reviewed-by: Heiko Stuebner Signed-off-by: Conor Dooley Documentation/devicetree/bindings/riscv/cpus.yaml | 2 ++ 1 file changed, 2 insertions(+) commit ea3ce4cf076ba11bb591c8013c5315136cae52c8 Author: Jonathan Neuschäfer Date: Mon Oct 31 23:15:52 2022 +0100 ARM: dts: nuvoton: Remove bogus unit addresses from fixed-partition nodes The unit addresses do not correspond to the nodes' reg properties, because they don't have any. Fixes: e42b650f828d ("ARM: dts: nuvoton: Add new device nodes to NPCM750 EVB") Fixes: ee33e2fb3d70 ("ARM: dts: nuvoton: Add Quanta GBS BMC Device Tree") Fixes: 59f5abe09f0a ("ARM: dts: nuvoton: Add Quanta GSJ BMC") Fixes: 14579c76f5ca ("ARM: dts: nuvoton: Add Fii Kudo system") Signed-off-by: Jonathan Neuschäfer Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20221031221553.163273-1-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley arch/arm/boot/dts/nuvoton-npcm730-gbs.dts | 2 +- arch/arm/boot/dts/nuvoton-npcm730-gsj.dts | 2 +- arch/arm/boot/dts/nuvoton-npcm730-kudo.dts | 6 +++--- arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 4 ++-- arch/arm/boot/dts/nuvoton-npcm750-runbmc-olympus.dts | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) commit 62d127eeac27e9a43ede8035b6a070279769897b Author: Jonathan Neuschäfer Date: Tue Nov 1 11:29:16 2022 +0100 ARM: dts: nuvoton,wpcm450-supermicro-x9sci-ln4f: Add GPIO line names To make gpioinfo output more useful and enable gpiofind usage, add line names for GPIOs where the function is known. This patch follows the naming convention defined for OpenBMC, as much as possible: https://github.com/openbmc/docs/blob/master/designs/device-tree-gpio-naming.md Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221101102916.440526-1-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley .../boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 3973fc0f9f07fc4186bb581014404fbf77a659b5 Author: Quan Nguyen Date: Fri Nov 18 13:51:09 2022 +0700 ARM: dts: aspeed: mtjade: Add SMPro nodes Add SMPro nodes to Mt. Jade BMC. Signed-off-by: Quan Nguyen Link: https://lore.kernel.org/r/20221118065109.2339066-1-quan@os.amperecomputing.com Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit c1b175dbfce86e37d84c1d895d46e01d0e72d9b9 Author: Quan Nguyen Date: Mon Oct 24 15:11:15 2022 +0700 ARM: dts: aspeed: mtjade,mtmitchell: Add BMC SSIF nodes Add BMC SSIF node to support IPMI in-band communication. Signed-off-by: Quan Nguyen Link: https://lore.kernel.org/r/20221024081115.3320584-1-quan@os.amperecomputing.com Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 4 ++++ arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 4 ++++ 2 files changed, 8 insertions(+) commit f7f0518ba8fa975dbbd46a32c0422b64484ce05f Author: Zev Weiss Date: Mon Nov 7 16:15:51 2022 -0800 ARM: dts: aspeed: Add Delta AHE-50DC BMC This is a 1U Open19 power shelf with six PSUs and 50 12VDC outputs via LM25066 efuses. It's managed by a pair of AST1250 BMCs in a redundant active/active configuration using a PCA9541 on each I2C bus to arbitrate access between the two. Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20221108001551.18175-3-zev@bewilderbeest.net Signed-off-by: Joel Stanley arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/aspeed-bmc-delta-ahe50dc.dts | 418 +++++++++++++++++++++++++ 2 files changed, 419 insertions(+) commit 8ba848a6e7fcd274bbb23e86ea3d1acb806b8232 Author: Zev Weiss Date: Mon Nov 7 16:15:50 2022 -0800 dt-bindings: arm: aspeed: document Delta AHE-50DC BMC Document Delta AHE-50DC BMC board compatible. Signed-off-by: Zev Weiss Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221108001551.18175-2-zev@bewilderbeest.net Signed-off-by: Joel Stanley Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml | 1 + 1 file changed, 1 insertion(+) commit 9b4a78d6ed2d004fad2a95f4578974867919d61e Author: Santosh Puranik Date: Thu Nov 3 09:05:54 2022 +1030 ARM: dts: aspeed: rainier: Fix pca9551 nodes The pca9551 compatible LED drivers are under the pca9546 mux on Rainier pass > 1. On pass 1, they are directly connected to the aspeed i2c. Signed-off-by: Santosh Puranik Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20221102223554.1738642-1-joel@jms.id.au arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 208 +++++++++++++-------------- 1 file changed, 104 insertions(+), 104 deletions(-) commit 943aaf336e7a60dd3cd88935a48883ef633bff7f Author: Eddie James Date: Tue Nov 1 16:32:12 2022 -0500 ARM: dts: aspeed: p10bmc: Add occ-hwmon nodes Add the occ-hwmon nodes in order to specify that the occ-hwmon driver should not poll the OCC during initialization. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20221101213212.643472-1-eajames@linux.ibm.com Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts | 10 +++++++ arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts | 40 ++++++++++++++++++++++++++++ arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 20 ++++++++++++++ 3 files changed, 70 insertions(+) commit 2fb4955ac2a90d7e9c5b2c151e2a542ccf939d2b Author: Potin Lai Date: Tue Oct 25 13:50:46 2022 +0800 ARM: dts: aspeed-g6: Add aliases for mdio nodes Add aliases for mdio nodes so that we can use name to lookup the bus address of Aspeed SOC. For example: root@bletchley:~# cat /sys/firmware/devicetree/base/aliases/mdio0 /ahb/mdio@1e650000 root@bletchley:~# cat /sys/firmware/devicetree/base/aliases/mdio1 /ahb/mdio@1e650008 root@bletchley:~# cat /sys/firmware/devicetree/base/aliases/mdio2 /ahb/mdio@1e650010 root@bletchley:~# cat /sys/firmware/devicetree/base/aliases/mdio3 /ahb/mdio@1e650018 Signed-off-by: Potin Lai Link: https://lore.kernel.org/r/20221025055046.1704920-1-potin.lai.pt@gmail.com Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g6.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit fe87f88eaf696b064231143536a33a618d5e0cd2 Author: Joel Stanley Date: Fri Oct 21 09:14:20 2022 +1030 ARM: dts: aspeed: Remove Mihawk The platform has been removed from OpenBMC as it is unmaintained. Link: https://lore.kernel.org/r/20221020224420.635938-1-joel@jms.id.au Signed-off-by: Joel Stanley arch/arm/boot/dts/Makefile | 1 - arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts | 1381 --------------------------- 2 files changed, 1382 deletions(-) commit e184d42a6e085f95f5c4f1a4fbabebab2984cb68 Author: Adriana Kobylak Date: Fri Sep 16 14:55:35 2022 -0500 ARM: dts: aspeed: rainier,everest: Move reserved memory regions Move the reserved regions to account for a decrease in DRAM when ECC is enabled. ECC takes 1/9th of memory. Running on HW with ECC off, u-boot prints: DRAM: already initialized, 1008 MiB (capacity:1024 MiB, VGA:16 MiB, ECC:off) And with ECC on, u-boot prints: DRAM: already initialized, 896 MiB (capacity:1024 MiB, VGA:16 MiB, ECC:on, ECC size:896 MiB) This implies that MCR54 is configured for ECC to be bounded at the bottom of a 16MiB VGA memory region: 1024MiB - 16MiB (VGA) = 1008MiB 1008MiB / 9 (for ECC) = 112MiB 1008MiB - 112MiB = 896MiB (available DRAM) The flash_memory region currently starts at offset 896MiB: 0xb8000000 (flash_memory offset) - 0x80000000 (base memory address) = 0x38000000 = 896MiB This is the end of the available DRAM with ECC enabled and therefore it needs to be moved. Since the flash_memory is 64MiB in size and needs to be 64MiB aligned, it can just be moved up by 64MiB and would sit right at the end of the available DRAM buffer. The ramoops region currently follows the flash_memory, but it can be moved to sit above flash_memory which would minimize the address-space fragmentation. Signed-off-by: Adriana Kobylak Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20220916195535.1020185-1-anoo@linux.ibm.com Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts | 17 ++++++++--------- arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 16 +++++++++------- 2 files changed, 17 insertions(+), 16 deletions(-) commit 65b697e5dec798920315e72bd55d0ca3a9703908 Author: Eddie James Date: Thu Aug 18 15:24:22 2022 -0500 ARM: dts: aspeed: Add IBM Bonnell system BMC devicetree Add a devicetree for the new Bonnell system. Signed-off-by: Eddie James Reviewed-by: Jim Wright Link: https://lore.kernel.org/r/20220818202422.741275-1-eajames@linux.ibm.com Signed-off-by: Joel Stanley arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts | 911 +++++++++++++++++++++++++++ 2 files changed, 912 insertions(+) commit 7ee94e1869005446c2ad8847d66181217867b830 Author: Potin Lai Date: Thu Sep 29 09:31:30 2022 +0800 ARM: dts: aspeed: bletchley: Enable emmc and ehci1 Enable both emmc-controller and emmc nodes for storage soultion on bletchley, and enable ehci1 node as second storage plan. Signed-off-by: Potin Lai Reviewed-by: Patrick Williams Link: https://lore.kernel.org/r/20220929013130.1916525-3-potin.lai.pt@gmail.com Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b837a18271712880b4af917f2482833326d8af4a Author: Potin Lai Date: Thu Sep 29 09:31:29 2022 +0800 ARM: dts: aspeed: bletchley: Update and fix gpio-line-names Update new GPIOM7 line name, and fixed typo of GPION6 line name New GPIO: - GPIOM7: USB_DEBUG_PWR_BTN_N Fixed GPIO: - GPION6: LED_POSTCODE_5 --> LED_POSTCODE_6 Signed-off-by: Potin Lai Reviewed-by: Patrick Williams Link: https://lore.kernel.org/r/20220929013130.1916525-2-potin.lai.pt@gmail.com Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7057242b3f2ec4cc176e054948902049c287c981 Author: Potin Lai Date: Mon Jun 13 17:51:50 2022 +0800 ARM: dts: aspeed: bletchley: Update fusb302 nodes 1. Add interrupt pin of fusb302 on each sled. 2. Add vbus-supply property in each fusb302 node. 3. Fix BMC power-role at source and data-role at host. 4. Disable PD to avoid "HARD Reset" due to incompatible PD ver. Signed-off-by: Potin Lai Reviewed-by: Patrick Williams Link: https://lore.kernel.org/r/20220613095150.21917-5-potin.lai.pt@gmail.com Signed-off-by: Joel Stanley .../arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 150 ++++++++++++++------- 1 file changed, 102 insertions(+), 48 deletions(-) commit 7d5e4318ea8d8165630c1461db30eeec082f2440 Author: Potin Lai Date: Mon Jun 13 17:51:49 2022 +0800 ARM: dts: aspeed: bletchley: Bind presence-sledX pins via gpio-keys Bind presence-sledX pins via gpio-keys driver to monitor and export GPIO pin values on DBUS using phosphor-gpio-presence service. Signed-off-by: Potin Lai Reviewed-by: Patrick Williams Link: https://lore.kernel.org/r/20220613095150.21917-4-potin.lai.pt@gmail.com Signed-off-by: Joel Stanley .../arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 9f1cff4314df5defbe6c733e20b9aa9dd01c759b Author: Potin Lai Date: Mon Jun 13 17:51:48 2022 +0800 ARM: dts: aspeed: bletchley: Disable GPIOV2 pull-down The external pull-up cannot drive GPIOV2, so disable GPIOV2 internal pull-down resistor by the request form HW team. Signed-off-by: Potin Lai Reviewed-by: Patrick Williams Link: https://lore.kernel.org/r/20220613095150.21917-3-potin.lai.pt@gmail.com Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1bc111b69ad5ad1115426ab270fcf2e625dc689c Author: Potin Lai Date: Mon Jun 13 17:51:47 2022 +0800 ARM: dts: aspeed: bletchley: Change LED sys_log_id to active low change LED sys_log_id to active low base on DVT schematic. Signed-off-by: Potin Lai Reviewed-by: Patrick Williams Link: https://lore.kernel.org/r/20220613095150.21917-2-potin.lai.pt@gmail.com Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee92fa03918d114d3ac9c36a8bf2c032ede75a3b Author: Jiapeng Chong Date: Fri Apr 22 04:25:56 2022 +0800 x86/kaslr: Fix process_mem_region()'s return value Fix the following coccicheck warning: ./arch/x86/boot/compressed/kaslr.c:670:8-9: WARNING: return of 0/1 in function 'process_mem_region' with return type bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220421202556.129799-1-jiapeng.chong@linux.alibaba.com arch/x86/boot/compressed/kaslr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ec0b7e06835b857f892feb2fe6121db1393425d Author: Eddie James Date: Tue Nov 1 15:53:37 2022 -0500 watchdog: aspeed: Enable pre-timeout interrupt Enable the core pre-timeout interrupt on AST2500 and AST2600. Signed-off-by: Eddie James Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221101205338.577427-2-eajames@linux.ibm.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/aspeed_wdt.c | 104 +++++++++++++++++++++++++++++++++++------- 1 file changed, 88 insertions(+), 16 deletions(-) commit ef9b7bf52c2f47f0a9bf988543c577b92c92d15e Author: Mika Westerberg Date: Fri Oct 28 09:27:50 2022 +0300 watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running Daniel reported that the commit 1ae3e78c0820 ("watchdog: iTCO_wdt: No need to stop the timer in probe") makes QEMU implementation of the iTCO watchdog not to trigger reboot anymore when NO_REBOOT flag is initially cleared using this option (in QEMU command line): -global ICH9-LPC.noreboot=false The problem with the commit is that it left the unconditional setting of NO_REBOOT that is not cleared anymore when the kernel keeps pinging the watchdog (as opposed to the previous code that called iTCO_wdt_stop() that cleared it). Fix this so that we only set NO_REBOOT if the watchdog was not initially running. Fixes: 1ae3e78c0820 ("watchdog: iTCO_wdt: No need to stop the timer in probe") Reported-by: Daniel P. Berrangé Signed-off-by: Mika Westerberg Tested-by: Daniel P. Berrangé Reviewed-by: Daniel P. Berrangé Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221028062750.45451-1-mika.westerberg@linux.intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/iTCO_wdt.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 47c008050aec3e9a13af29dd74cd8b4c112bc07b Author: Marcus Folkesson Date: Fri Oct 28 09:50:19 2022 +0200 watchdog: rn5t618: add support for read out bootstatus The PMIC does store the power-off factor internally. Read it out and report it as bootstatus. Signed-off-by: Marcus Folkesson Acked-by: Lee Jones Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221028075019.2757812-1-marcus.folkesson@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/rn5t618_wdt.c | 12 ++++++++++++ include/linux/mfd/rn5t618.h | 9 +++++++++ 2 files changed, 21 insertions(+) commit 758f46c2e67c4901ea49e684e12adb698b1b2bbd Author: Paul Cercueil Date: Thu Oct 20 19:50:47 2022 +0100 watchdog: kempld: Remove #ifdef guards for PM related functions Use the pm_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. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221020185047.1001522-5-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/kempld_wdt.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 0327476d6ef32c347e1590e6215616adc847afe1 Author: Paul Cercueil Date: Thu Oct 20 19:50:46 2022 +0100 watchdog: omap: Remove #ifdef guards for PM related functions Use the pm_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. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Acked-by: Aaro Koskinen Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221020185047.1001522-4-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/omap_wdt.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit d36eda79c600518fb6bc8ad9e3f2f5f201ec1fb9 Author: Paul Cercueil Date: Thu Oct 20 19:50:45 2022 +0100 watchdog: twl4030: Remove #ifdef guards for PM related functions Use the pm_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. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221020185047.1001522-3-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/twl4030_wdt.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit b49e2a3cfb84290b878999ade1410a3edb65706c Author: Paul Cercueil Date: Thu Oct 20 19:50:44 2022 +0100 watchdog: at91rm9200: Remove #ifdef guards for PM related functions Use the pm_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. Not using #ifdef guards means that the code is always compiled independently of any Kconfig option, and thanks to that bugs and regressions are easier to catch. Signed-off-by: Paul Cercueil Reviewed-by: Guenter Roeck Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221020185047.1001522-2-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/at91rm9200_wdt.c | 11 ++--------- drivers/watchdog/db8500_wdt.c | 9 ++------- 2 files changed, 4 insertions(+), 16 deletions(-) commit 08435c2aab3aea369182bdec3c71ab78b15f8c82 Author: Thomas Kastner Date: Wed Oct 19 09:39:03 2022 +0200 watchdog: Add Advantech EC watchdog driver This patch adds the 'advantech_ec_wdt' kernel module which provides WDT support for Advantech platforms with ITE based Embedded Controller. Signed-off-by: Thomas Kastner Reviewed-by: Guenter Roeck Tested-by: Thomas Kastner Link: https://lore.kernel.org/r/Y0+pl/26e3pcEUPk@EIS-S230 Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 7 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/advantech_ec_wdt.c | 205 ++++++++++++++++++++++++++++++++++++ 3 files changed, 213 insertions(+) commit 1d8e67ecf114ef4140a1df7f1581e0e2cab6739a Author: Allen-KH Cheng Date: Fri Oct 7 17:34:37 2022 +0800 dt-bindings: watchdog: mediatek,mtk-wdt: Add compatible for MT8173 Add the mediatek,mt8173-wdt compatible using mediatek,mt6589-wdt as fallback. Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Reviewed-by: Guenter Roeck Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221101090116.27130-8-allen-kh.cheng@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml | 1 + 1 file changed, 1 insertion(+) commit c389e1f5068f13aa9891fead50dc83a747426bc6 Author: AngeloGioacchino Del Regno Date: Fri Oct 7 17:34:35 2022 +0800 dt-bindings: watchdog: mediatek,mtk-wdt: Add compatible for MT6795 Add the mediatek,mt6795-wdt compatible. Signed-off-by: AngeloGioacchino Del Regno Co-developed-by: Allen-KH Cheng Signed-off-by: Allen-KH Cheng Acked-by: Rob Herring Reviewed-by: Guenter Roeck Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221101090116.27130-7-allen-kh.cheng@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml | 1 + 1 file changed, 1 insertion(+) commit 4d1363a46cdfcc00460adf1f0fcb81bb5ba69d94 Author: AngeloGioacchino Del Regno Date: Fri Oct 7 17:34:34 2022 +0800 dt-bindings: watchdog: mediatek: Convert mtk-wdt to json-schema Convert the MediaTek watchdog bindings to schema. The original binding only had 4 without a fallback but there is a reset controller on the "mediatek,mt7986-wdt", "mediatek,mt8186-wdt", "mediatek,mt8188-wdt" and "mediatek,mt8195-wdt" Since there is no reset controller for the mt6589, we remove "mediatek,mt6589-wdt" as a fallback. Signed-off-by: AngeloGioacchino Del Regno Co-developed-by: Allen-KH Cheng Signed-off-by: Allen-KH Cheng Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221101090116.27130-6-allen-kh.cheng@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../bindings/watchdog/mediatek,mtk-wdt.yaml | 78 ++++++++++++++++++++++ .../devicetree/bindings/watchdog/mtk-wdt.txt | 43 ------------ 2 files changed, 78 insertions(+), 43 deletions(-) commit bc7313652a6370df2f73e146483abfa5a69b85cf Author: Runyang Chen Date: Wed Oct 26 14:33:27 2022 +0800 watchdog: mediatek: mt8188: add wdt support Support MT8188 watchdog device. Signed-off-by: Runyang Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Guenter Roeck Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20221026063327.20037-4-Runyang.Chen@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/mtk_wdt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit fea58041af4c1a8ac2e8b461a772599e205d0d1f Author: Runyang Chen Date: Wed Oct 26 14:33:26 2022 +0800 dt-bindings: reset: mt8188: add toprgu reset-controller header file Add toprgu reset-controller header file for MT8188 Signed-off-by: Runyang Chen Acked-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221026063327.20037-3-Runyang.Chen@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck include/dt-bindings/reset/mt8188-resets.h | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 52f46a6aea59caf63798b2dd09050d4806398890 Author: Runyang Chen Date: Wed Oct 26 14:33:25 2022 +0800 dt-bindings: watchdog: Add compatible for MediaTek MT8188 Add dt-binding documentation of watchdog for MediaTek MT8188 Soc Signed-off-by: Runyang Chen Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221026063327.20037-2-Runyang.Chen@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 1 + 1 file changed, 1 insertion(+) commit 28927f6c483d4a4c9ba8050f2a0e5af1b3557105 Author: AngeloGioacchino Del Regno Date: Fri Oct 7 17:34:36 2022 +0800 watchdog: mtk_wdt: Add support for MT6795 Helio X10 watchdog and toprgu Add support for the toprgu reset controller and watchdog for the MediaTek MT6795 SoC. Signed-off-by: AngeloGioacchino Del Regno Co-developed-by: Allen-KH Cheng Signed-off-by: Allen-KH Cheng Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221005113517.70628-6-angelogioacchino.delregno@collabora.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/mtk_wdt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d56bdce586e7fabd2b3339f476e0e4c059b24e19 Author: Marc Zyngier Date: Sun Nov 13 16:38:32 2022 +0000 KVM: arm64: PMU: Make kvm_pmc the main data structure The PMU code has historically been torn between referencing a counter as a pair vcpu+index or as the PMC pointer. Given that it is pretty easy to go from one representation to the other, standardise on the latter which, IMHO, makes the code slightly more readable. YMMV. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-17-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 174 +++++++++++++++++++++++----------------------- 1 file changed, 87 insertions(+), 87 deletions(-) commit 9bad925dd741408825590eccc495d073cc246de0 Author: Marc Zyngier Date: Sun Nov 13 16:38:31 2022 +0000 KVM: arm64: PMU: Simplify vcpu computation on perf overflow notification The way we compute the target vcpu on getting an overflow is a bit odd, as we use the PMC array as an anchor for kvm_pmc_to_vcpu, while we could directly compute the correct address. Get rid of the intermediate step and directly compute the target vcpu. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-16-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1f7c978282855d6b2abd608064004c74902e791d Author: Marc Zyngier Date: Sun Nov 13 16:38:30 2022 +0000 KVM: arm64: PMU: Allow PMUv3p5 to be exposed to the guest Now that the infrastructure is in place, bump the PMU support up to PMUv3p5. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-15-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11af4c37165e36a6090172ded5d06acdf15206da Author: Marc Zyngier Date: Sun Nov 13 16:38:29 2022 +0000 KVM: arm64: PMU: Implement PMUv3p5 long counter support PMUv3p5 (which is mandatory with ARMv8.5) comes with some extra features: - All counters are 64bit - The overflow point is controlled by the PMCR_EL0.LP bit Add the required checks in the helpers that control counter width and overflow, as well as the sysreg handling for the LP bit. A new kvm_pmu_is_3p5() helper makes it easy to spot the PMUv3p5 specific handling. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-14-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 8 +++++--- arch/arm64/kvm/sys_regs.c | 4 ++++ include/kvm/arm_pmu.h | 7 +++++++ 3 files changed, 16 insertions(+), 3 deletions(-) commit d82e0dfdfda73f91e7282e1083a2cd7cd366ea87 Author: Marc Zyngier Date: Sun Nov 13 16:38:28 2022 +0000 KVM: arm64: PMU: Allow ID_DFR0_EL1.PerfMon to be set from userspace Allow userspace to write ID_DFR0_EL1, on the condition that only the PerfMon field can be altered and be something that is compatible with what was computed for the AArch64 view of the guest. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-13-maz@kernel.org arch/arm64/kvm/sys_regs.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) commit 60e651ff1f48bfdf8fec80d35510bd89ecf8c766 Author: Marc Zyngier Date: Sun Nov 13 16:38:27 2022 +0000 KVM: arm64: PMU: Allow ID_AA64DFR0_EL1.PMUver to be set from userspace Allow userspace to write ID_AA64DFR0_EL1, on the condition that only the PMUver field can be altered and be at most the one that was initially computed for the guest. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-12-maz@kernel.org arch/arm64/kvm/sys_regs.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit 3d0dba5764b94308b8c4257ad64e383f11ce0c92 Author: Marc Zyngier Date: Sun Nov 13 16:38:26 2022 +0000 KVM: arm64: PMU: Move the ID_AA64DFR0_EL1.PMUver limit to VM creation As further patches will enable the selection of a PMU revision from userspace, sample the supported PMU revision at VM creation time, rather than building each time the ID_AA64DFR0_EL1 register is accessed. This shouldn't result in any change in behaviour. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-11-maz@kernel.org arch/arm64/include/asm/kvm_host.h | 4 ++++ arch/arm64/kvm/arm.c | 6 ++++++ arch/arm64/kvm/pmu-emul.c | 11 +++++++++++ arch/arm64/kvm/sys_regs.c | 36 ++++++++++++++++++++++++++++-------- include/kvm/arm_pmu.h | 6 ++++++ 5 files changed, 55 insertions(+), 8 deletions(-) commit 26d2d0594d7016dbcbce4038aa202c2858d5a944 Author: Marc Zyngier Date: Sun Nov 13 16:38:25 2022 +0000 KVM: arm64: PMU: Do not let AArch32 change the counters' top 32 bits Even when using PMUv3p5 (which implies 64bit counters), there is no way for AArch32 to write to the top 32 bits of the counters. The only way to influence these bits (other than by counting events) is by writing PMCR.P==1. Make sure we obey the architecture and preserve the top 32 bits on a counter update. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-10-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit 1a63b58082869273bfbab1b945007193f7bd3a78 Author: Jithu Joseph Date: Wed Nov 16 19:59:35 2022 -0800 Revert "platform/x86/intel/ifs: Mark as BROKEN" Issues with user interface [1] to load scan test images have been addressed so remove the dependency on BROKEN. Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Sohil Mehta Reviewed-by: Hans de Goede Link: https://lore.kernel.org/lkml/26102aca-a730-ddf8-d024-2e7367696757@redhat.com/ [1] Link: https://lore.kernel.org/r/20221117035935.4136738-17-jithu.joseph@intel.com drivers/platform/x86/intel/ifs/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit 72a0f445fc091bd18873b10b9ab56573e490f00d Author: Jithu Joseph Date: Wed Nov 16 19:59:34 2022 -0800 Documentation/ABI: Update IFS ABI doc Remove reload documentation and add current_batch documentation. Update the kernel version and date for all the entries. Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Sohil Mehta Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221117035935.4136738-16-jithu.joseph@intel.com Documentation/ABI/testing/sysfs-platform-intel-ifs | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 4fb858f3dcd25cf568e35ff53ce8fa8a660fc372 Author: Jithu Joseph Date: Wed Nov 16 19:59:33 2022 -0800 platform/x86/intel/ifs: Add current_batch sysfs entry Initial implementation assumed a single IFS test image file with a fixed name ff-mm-ss.scan. (where ff, mm, ss refers to family, model and stepping of the core). Subsequently, it became evident that supporting more than one test image file is needed to provide more comprehensive test coverage. (Test coverage in this scenario refers to testing more transistors in the core to identify faults). The other alternative of increasing the size of a single scan test image file would not work as the upper bound is limited by the size of memory area reserved by BIOS for loading IFS test image. Introduce "current_batch" file which accepts a number. Writing a number to the current_batch file would load the test image file by name ff-mm-ss-.scan, where is the number written to the "current_batch" file in hex. Range check of the input is done to verify it not greater than 0xff. For e.g if the scan test image comprises of 6 files, they would be named: 06-8f-06-01.scan 06-8f-06-02.scan 06-8f-06-03.scan 06-8f-06-04.scan 06-8f-06-05.scan 06-8f-06-06.scan And writing 3 to current_batch would result in loading 06-8f-06-03.scan above. The file can also be read to know the currently loaded file. And testing a system looks like: for each scan file do load the IFS test image file (write to the batch file) for each core do test the core with this set of tests done done Qualify few error messages with the test image file suffix to provide better context. [ bp: Massage commit message. Add link to the discussion. ] Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Sohil Mehta Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221107225323.2733518-13-jithu.joseph@intel.com drivers/platform/x86/intel/ifs/core.c | 1 + drivers/platform/x86/intel/ifs/ifs.h | 23 ++++++++++++++----- drivers/platform/x86/intel/ifs/load.c | 18 ++++++++++----- drivers/platform/x86/intel/ifs/runtest.c | 10 +++++---- drivers/platform/x86/intel/ifs/sysfs.c | 38 ++++++++++++++++++++++++++++++++ 5 files changed, 74 insertions(+), 16 deletions(-) commit bf835ee852be38e9fab1fdb330eccdd9728aec34 Author: Jithu Joseph Date: Wed Nov 16 19:59:32 2022 -0800 platform/x86/intel/ifs: Remove reload sysfs entry Reload sysfs entry will be replaced by current_batch, drop it. Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Sohil Mehta Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221117035935.4136738-14-jithu.joseph@intel.com drivers/platform/x86/intel/ifs/sysfs.c | 29 ----------------------------- 1 file changed, 29 deletions(-) commit 48c6e7dc19051c5ef725490cf8673d768cda7748 Author: Jithu Joseph Date: Thu Nov 17 15:04:08 2022 -0800 platform/x86/intel/ifs: Add metadata validation The data portion of a IFS test image file contains a metadata region containing possibly multiple metadata structures in addition to test data and hashes. IFS Metadata layout +----------------------+ 0 |META_TYPE_IFS (=1) | +----------------------+ |meta_size | +----------------------+ |test type | +----------------------+ |fusa info | +----------------------+ |total images | +----------------------+ |current image# | +----------------------+ |total chunks | +----------------------+ |starting chunk | +----------------------+ |size per chunk | +----------------------+ |chunks per stride | +----------------------+ |Reserved[54] | +----------------------+ 256 | | | Test Data/Chunks | | | +----------------------+ meta_size | META_TYPE_END (=0) | +----------------------+ meta_size + 4 | size of end (=8) | +----------------------+ meta_size + 8 Introduce the layout of this meta_data structure and validate the sanity of certain fields of the new image before loading. Tweak references to IFS test image chunks to reflect the updated layout of the test image. [ bp: Massage commit message. ] Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Sohil Mehta Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221117230408.30331-1-jithu.joseph@intel.com drivers/platform/x86/intel/ifs/ifs.h | 2 ++ drivers/platform/x86/intel/ifs/load.c | 58 ++++++++++++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 1 deletion(-) commit aa63e0fda85edf9a8431fc31a2b2d4f3f40592f9 Author: Jithu Joseph Date: Thu Nov 17 14:50:39 2022 -0800 platform/x86/intel/ifs: Use generic microcode headers and functions Existing implementation (broken) of IFS used a header format (for IFS test images) which was very similar to microcode format, but didn’t accommodate extended signatures. This meant same IFS test image had to be duplicated for different steppings and the validation code in the driver was only looking at the primary header parameters. Going forward, IFS test image headers have been tweaked to become fully compatible with the microcode format. Newer IFS test image headers will use header version 2 in order to distinguish it from microcode images and older IFS test images. In light of the above, reuse struct microcode_header_intel directly in the IFS driver and reuse microcode functions for validation and sanity checking. [ bp: Massage commit message. ] Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Sohil Mehta Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221117225039.30166-1-jithu.joseph@intel.com arch/x86/include/asm/microcode_intel.h | 1 + drivers/platform/x86/intel/ifs/load.c | 104 +++++++-------------------------- 2 files changed, 21 insertions(+), 84 deletions(-) commit b09b56734fae28be9332021ae3e84c9b05020fda Author: Denis Arefev Date: Fri Nov 18 13:42:52 2022 +0300 iommu/amd: Check return value of mmu_notifier_register() Аdded a return value check for the function mmu_notifier_register(). Return value of a function 'mmu_notifier_register' called at iommu_v2.c:642 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/20221118104252.122809-1-arefev@swemel.ru [joro: Fix commit message ] Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu_v2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6cf0981c2233f97d56938d9d61845383d6eb227c Author: Yang Yingliang Date: Fri Nov 18 17:36:04 2022 +0800 iommu/amd: Fix pci device refcount leak in ppr_notifier() As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, when finish using it, the caller must decrement the reference count by calling pci_dev_put(). So call it before returning from ppr_notifier() to avoid refcount leak. Fixes: daae2d25a477 ("iommu/amd: Don't copy GCR3 table root pointer") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221118093604.216371-1-yangyingliang@huawei.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu_v2.c | 1 + 1 file changed, 1 insertion(+) commit b169a180bef26679b44484ad24b7d8ae32623a10 Author: Robin Murphy Date: Tue Nov 15 15:26:43 2022 +0000 iommu/io-pgtable: Remove map/unmap With all users now calling {map,unmap}_pages, retire the redundant single-page callbacks. Signed-off-by: Robin Murphy Acked-by: Will Deacon Link: https://lore.kernel.org/r/a5a3cbf95c3279982e378cc43dad830322a59868.1668100209.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel include/linux/io-pgtable.h | 6 ------ 1 file changed, 6 deletions(-) commit b9bf41e249f8c8bf79389cec9d29faf03f79aad2 Author: Robin Murphy Date: Tue Nov 15 15:26:42 2022 +0000 iommu/io-pgtable-arm-v7s: Remove map/unmap With all users now calling {map,unmap}_pages, remove the wrappers. Signed-off-by: Robin Murphy Acked-by: Will Deacon Link: https://lore.kernel.org/r/98481dd7e3576b74149ce2de8f217338ee1dd490.1668100209.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/io-pgtable-arm-v7s.c | 41 ++++++++++++++------------------------ 1 file changed, 15 insertions(+), 26 deletions(-) commit 99cbb8e436344ddd0554108a3d8afb7ce5c4994e Author: Robin Murphy Date: Tue Nov 15 15:26:41 2022 +0000 iommu/io-pgtable-arm: Remove map/unmap With all users now calling {map,unmap}_pages, remove the wrappers. Signed-off-by: Robin Murphy Acked-by: Will Deacon Link: https://lore.kernel.org/r/162e58e83ed42f78c3fbefe78c9b5410dd1dc412.1668100209.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/io-pgtable-arm.c | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) commit fa8ce5743039bc7ea5cb4217423efaebe381fc54 Author: Robin Murphy Date: Tue Nov 15 15:26:40 2022 +0000 iommu/qcom: Update to {map,unmap}_pages Update map/unmap to the new multi-page interfaces, which is dead easy since we just pass them through to io-pgtable anyway. Signed-off-by: Robin Murphy Acked-by: Will Deacon Link: https://lore.kernel.org/r/ccff9a133d12ec938741720be6baf5d788b71ea0.1668100209.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu/qcom_iommu.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 0a17bbab2330aecd026696d4decc2636bd31e790 Author: Robin Murphy Date: Tue Nov 15 15:26:39 2022 +0000 iommu/ipmmu-vmsa: Update to {map,unmap}_pages Update map/unmap to the new multi-page interfaces, which is dead easy since we just pass them through to io-pgtable anyway. Since these are domain ops now, the domain is inherently valid (not to mention that container_of() wouldn't return NULL anyway), so garbage-collect that check in the process. Signed-off-by: Robin Murphy Acked-by: Will Deacon Link: https://lore.kernel.org/r/ad859ccc24720d72f8eafd03817c1fc11255ddc1.1668100209.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8b35cdcf9bf82098dd15ed02a2a51cdf5f5ca090 Author: Robin Murphy Date: Tue Nov 15 15:26:38 2022 +0000 iommu/msm: Update to {map,unmap}_pages Update map/unmap to the new multi-page interfaces, which is dead easy since we just pass them through to io-pgtable anyway. Signed-off-by: Robin Murphy Acked-by: Will Deacon Link: https://lore.kernel.org/r/24a8f522710ddd6bbac4da154aa28799e939ebe4.1668100209.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/msm_iommu.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 85637380dad6d97071018cba6f2aa90667f716b3 Author: Robin Murphy Date: Tue Nov 15 15:26:37 2022 +0000 iommu/mediatek: Update to {map,unmap}_pages Update map/unmap to the new multi-page interfaces, which is dead easy since we just pass them through to io-pgtable anyway. Signed-off-by: Robin Murphy Acked-by: Will Deacon Link: https://lore.kernel.org/r/25b65b71e7e5d1006469aee48bab07ca87227bfa.1668100209.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit a05d5857cec3efef02af557dcb5ed257364356e6 Author: Robin Murphy Date: Tue Nov 15 15:26:36 2022 +0000 iommu/sprd: Update to {map,unmap}_pages Now that the core API has a proper notion of multi-page mappings, clean up the old pgsize_bitmap hack by implementing the new interfaces instead. This time we'll get the return values for unmaps correct too. Signed-off-by: Robin Murphy Acked-by: Will Deacon Link: https://lore.kernel.org/r/9026464e8380b92d10d09103e215eb4306a5df7c.1668100209.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/sprd-iommu.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit b577f7e679b763b706032e7a65c7b3a05c5f2184 Author: Robin Murphy Date: Tue Nov 15 15:26:35 2022 +0000 iommu/mediatek-v1: Update to {map,unmap}_pages Now that the core API has a proper notion of multi-page mappings, clean up the old pgsize_bitmap hack by implementing the new interfaces instead. This also brings a slight simplification since we no longer need to worry about rolling back partial mappings on failure. Signed-off-by: Robin Murphy Acked-by: Will Deacon Link: https://lore.kernel.org/r/768e90ff0c2d61e4723049c1349d8bac58daa437.1668100209.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu_v1.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit 8382fee3bb86526bde1bfb1a06834f056140e0dd Author: Ashok Raj Date: Wed Nov 16 19:59:29 2022 -0800 platform/x86/intel/ifs: Add metadata support One of the existing reserved fields in the microcode header has been allocated to indicate the size of metadata structures. The location of metadata section within microcode header is as shown below: Microcode Blob Format +----------------------+ Base |Header Version | +----------------------+ |Update revision | +----------------------+ |Date DDMMYYYY | +----------------------+ |Sig | +----------------------+ |Checksum | +----------------------+ |Loader Version | +----------------------+ |Processor Flags | +----------------------+ |Data Size | +----------------------+ |Total Size | +----------------------+ |Meta Size | +----------------------+ |Reserved | +----------------------+ |Reserved | +----------------------+ Base+48 | | | Microcode | | Data | | | +----------------------+ Base+48+data_size- | | meta_size | Meta Data | | structure(s) | | | +----------------------+ Base+48+data_size | | | Extended Signature | | Table | | | +----------------------+ Base+total_size Add an accessor function which will return a pointer to the start of a specific meta_type being queried. [ bp: Massage commit message. ] Signed-off-by: Ashok Raj Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Sohil Mehta Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221117035935.4136738-11-jithu.joseph@intel.com drivers/platform/x86/intel/ifs/load.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit bbc4d205d93f52ee18dfa7858d51489c0506547f Author: Marek Szyprowski Date: Thu Nov 10 16:44:07 2022 +0100 iommu/exynos: Fix driver initialization sequence Registering a SYSMMU platform driver might directly trigger initializing IOMMU domains and performing the initial mappings. Also the IOMMU core might use the IOMMU hardware once it has been registered with iommu_device_register() function. Ensure that all driver resources are allocated and initialized before the driver advertise its presence to the platform bus and the IOMMU subsystem. Signed-off-by: Marek Szyprowski Reviewed-by: Sam Protsenko Link: https://lore.kernel.org/r/20221110154407.26531-1-m.szyprowski@samsung.com Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 21c1f9021f0e7d28c3edfcc70e1ca1926ea3774e Author: Niklas Schnelle Date: Wed Nov 9 15:29:03 2022 +0100 s390/pci: use lock-free I/O translation updates I/O translation tables on s390 use 8 byte page table entries and tables which are allocated lazily but only freed when the entire I/O translation table is torn down. Also each IOVA can at any time only translate to one physical address Furthermore I/O table accesses by the IOMMU hardware are cache coherent. With a bit of care we can thus use atomic updates to manipulate the translation table without having to use a global lock at all. This is done analogous to the existing I/O translation table handling code used on Intel and AMD x86 systems. Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/r/20221109142903.4080275-6-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel arch/s390/include/asm/pci.h | 1 - arch/s390/pci/pci_dma.c | 74 +++++++++++++++++++++++++++------------------ drivers/iommu/s390-iommu.c | 37 ++++++++--------------- 3 files changed, 58 insertions(+), 54 deletions(-) commit 08955af0600303455f57fe2f2a26f24f9b496b49 Author: Niklas Schnelle Date: Wed Nov 9 15:29:02 2022 +0100 iommu/s390: Optimize IOMMU table walking When invalidating existing table entries for unmap there is no need to know the physical address beforehand so don't do an extra walk of the IOMMU table to get it. Also when invalidating entries not finding an entry indicates an invalid unmap and not a lack of memory we also don't need to undo updates in this case. Implement this by splitting s390_iommu_update_trans() in a variant for validating and one for invalidating translations. Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/r/20221109142903.4080275-5-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel drivers/iommu/s390-iommu.c | 69 +++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 26 deletions(-) commit 2ba8336dab5fb81452aea9c21dfc870050a017f3 Author: Niklas Schnelle Date: Wed Nov 9 15:29:01 2022 +0100 iommu/s390: Use RCU to allow concurrent domain_list iteration The s390_domain->devices list is only added to when new devices are attached but is iterated through in read-only fashion for every mapping operation as well as for I/O TLB flushes and thus in performance critical code causing contention on the s390_domain->list_lock. Fortunately such a read-mostly linked list is a standard use case for RCU. This change closely follows the example fpr RCU protected list given in Documentation/RCU/listRCU.rst. Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/r/20221109142903.4080275-4-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel arch/s390/include/asm/pci.h | 1 + arch/s390/pci/pci.c | 2 +- drivers/iommu/s390-iommu.c | 44 +++++++++++++++++++++++++++----------------- 3 files changed, 29 insertions(+), 18 deletions(-) commit c228f5a043370ef02867e4f0aab1bdc8422500e6 Author: Niklas Schnelle Date: Wed Nov 9 15:29:00 2022 +0100 iommu/s390: Add I/O TLB ops Currently s390-iommu does an I/O TLB flush (RPCIT) for every update of the I/O translation table explicitly. For one this is wasteful since RPCIT can be skipped after a mapping operation if zdev->tlb_refresh is unset. Moreover we can do a single RPCIT for a range of pages including whne doing lazy unmapping. Thankfully both of these optimizations can be achieved by implementing the IOMMU operations common code provides for the different types of I/O tlb flushes: * flush_iotlb_all: Flushes the I/O TLB for the entire IOVA space * iotlb_sync: Flushes the I/O TLB for a range of pages that can be gathered up, for example to implement lazy unmapping. * iotlb_sync_map: Flushes the I/O TLB after a mapping operation Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/r/20221109142903.4080275-3-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel drivers/iommu/s390-iommu.c | 67 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 11 deletions(-) commit 59bbf596791b89c7f88fdcac29dfc39c1221d25d Author: Niklas Schnelle Date: Wed Nov 9 15:28:59 2022 +0100 iommu/s390: Make attach succeed even if the device is in error state If a zPCI device is in the error state while switching IOMMU domains zpci_register_ioat() will fail and we would end up with the device not attached to any domain. In this state since zdev->dma_table == NULL a reset via zpci_hot_reset_device() would wrongfully re-initialize the device for DMA API usage using zpci_dma_init_device(). As automatic recovery is currently disabled while attached to an IOMMU domain this only affects slot resets triggered through other means but will affect automatic recovery once we switch to using dma-iommu. Additionally with that switch common code expects attaching to the default domain to always work so zpci_register_ioat() should only fail if there is no chance to recover anyway, e.g. if the device has been unplugged. Improve the robustness of attach by specifically looking at the status returned by zpci_mod_fc() to determine if the device is unavailable and in this case simply ignore the error. Once the device is reset zpci_hot_reset_device() will then correctly set the domain's DMA translation tables. Signed-off-by: Niklas Schnelle Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20221109142903.4080275-2-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel arch/s390/include/asm/pci.h | 2 +- arch/s390/kvm/pci.c | 6 ++++-- arch/s390/pci/pci.c | 11 ++++++----- arch/s390/pci/pci_dma.c | 3 ++- drivers/iommu/s390-iommu.c | 9 +++++++-- 5 files changed, 20 insertions(+), 11 deletions(-) commit 01657bc14a3990c665375f77978631fee77b1fce Author: Robin Murphy Date: Fri Nov 4 19:51:43 2022 +0000 iommu: Avoid races around device probe We currently have 3 different ways that __iommu_probe_device() may be called, but no real guarantee that multiple callers can't tread on each other, especially once asynchronous driver probe gets involved. It would likely have taken a fair bit of luck to hit this previously, but commit 57365a04c921 ("iommu: Move bus setup to IOMMU device registration") ups the odds since now it's not just omap-iommu that may trigger multiple bus_iommu_probe() calls in parallel if probing asynchronously. Add a lock to ensure we can't try to double-probe a device, and also close some possible race windows to make sure we're truly robust against trying to double-initialise a group via two different member devices. Reported-by: Brian Norris Signed-off-by: Robin Murphy Tested-by: Brian Norris Fixes: 57365a04c921 ("iommu: Move bus setup to IOMMU device registration") Link: https://lore.kernel.org/r/1946ef9f774851732eed78760a78ec40dbc6d178.1667591503.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 3cd0e4a34d5a9bcff90e0c104800700346e42658 Author: Fabien Parent Date: Wed Nov 2 16:18:09 2022 +0100 iommu/mediatek: add support for MT8365 SoC Add IOMMU support for MT8365 SoC. Signed-off-by: Fabien Parent Reviewed-by: Amjad Ouled-Ameur Tested-by: Amjad Ouled-Ameur Signed-off-by: Markus Schneider-Pargmann Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Yong Wu Signed-off-by: Alexandre Mergnat Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20221001-iommu-support-v6-3-be4fe8da254b@baylibre.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 65df7d824f82f4dd3552b5a62ae8db07f25e423f Author: Fabien Parent Date: Wed Nov 2 16:18:08 2022 +0100 iommu/mediatek: add support for 6-bit encoded port IDs Until now the port ID was always encoded as a 5-bit data. On MT8365, the port ID is encoded as a 6-bit data. This requires to add extra macro F_MMU_INT_ID_LARB_ID_EXT, and F_MMU_INT_ID_PORT_ID_EXT in order to support 6-bit encoded port IDs. Signed-off-by: Fabien Parent Signed-off-by: Markus Schneider-Pargmann Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Yong Wu Signed-off-by: Alexandre Mergnat Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20221001-iommu-support-v6-2-be4fe8da254b@baylibre.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 59a316fdc4d564dc5e811321a8b20a444fc0094c Author: Fabien Parent Date: Wed Nov 2 16:18:07 2022 +0100 dt-bindings: iommu: mediatek: add binding documentation for MT8365 SoC Add IOMMU binding documentation for the MT8365 SoC. Signed-off-by: Fabien Parent Signed-off-by: Markus Schneider-Pargmann Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Reviewed-by: Yong Wu Signed-off-by: Alexandre Mergnat Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20221001-iommu-support-v6-1-be4fe8da254b@baylibre.com Signed-off-by: Joerg Roedel .../devicetree/bindings/iommu/mediatek,iommu.yaml | 2 + .../dt-bindings/memory/mediatek,mt8365-larb-port.h | 90 ++++++++++++++++++++++ 2 files changed, 92 insertions(+) commit 73b6924cdebc899de9b719e1319aa86c6bed4acf Author: Yang Yingliang Date: Sat Oct 29 18:35:50 2022 +0800 iommu/mediatek: Check return value after calling platform_get_resource() platform_get_resource() may return NULL pointer, we need check its return value to avoid null-ptr-deref in resource_size(). Fixes: 42d57fc58aeb ("iommu/mediatek: Initialise/Remove for multi bank dev") Signed-off-by: Yang Yingliang Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20221029103550.3774365-1-yangyingliang@huawei.com Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu.c | 2 ++ 1 file changed, 2 insertions(+) commit 1198d2316dc4265a97d0e8445a22c7a6d17580a4 Author: Kim Phillips Date: Mon Sep 19 10:56:38 2022 -0500 iommu/amd: Fix ill-formed ivrs_ioapic, ivrs_hpet and ivrs_acpihid options Currently, these options cause the following libkmod error: libkmod: ERROR ../libkmod/libkmod-config.c:489 kcmdline_parse_result: \ Ignoring bad option on kernel command line while parsing module \ name: 'ivrs_xxxx[XX:XX' Fix by introducing a new parameter format for these options and throw a warning for the deprecated format. Users are still allowed to omit the PCI Segment if zero. Adding a Link: to the reason why we're modding the syntax parsing in the driver and not in libkmod. Fixes: ca3bf5d47cec ("iommu/amd: Introduces ivrs_acpihid kernel parameter") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-modules/20200310082308.14318-2-lucas.demarchi@intel.com/ Reported-by: Kim Phillips Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Kim Phillips Link: https://lore.kernel.org/r/20220919155638.391481-2-kim.phillips@amd.com Signed-off-by: Joerg Roedel Documentation/admin-guide/kernel-parameters.txt | 27 +++++++-- drivers/iommu/amd/init.c | 79 +++++++++++++++++-------- 2 files changed, 76 insertions(+), 30 deletions(-) commit 5f18e9f8868c6d4eae71678e7ebd4977b7d8c8cf Author: Kim Phillips Date: Mon Sep 19 10:56:37 2022 -0500 iommu/amd: Fix ivrs_acpihid cmdline parsing code The second (UID) strcmp in acpi_dev_hid_uid_match considers "0" and "00" different, which can prevent device registration. Have the AMD IOMMU driver's ivrs_acpihid parsing code remove any leading zeroes to make the UID strcmp succeed. Now users can safely specify "AMDxxxxx:00" or "AMDxxxxx:0" and expect the same behaviour. Fixes: ca3bf5d47cec ("iommu/amd: Introduces ivrs_acpihid kernel parameter") Signed-off-by: Kim Phillips Cc: stable@vger.kernel.org Cc: Suravee Suthikulpanit Cc: Joerg Roedel Link: https://lore.kernel.org/r/20220919155638.391481-1-kim.phillips@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/init.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1cf47b044acdf248155bf40ba99be92baa22c47d Author: Uwe Kleine-König Date: Fri Nov 18 23:45:34 2022 +0100 ALSA: ppc: keywest: 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-601-uwe@kleine-koenig.org Signed-off-by: Takashi Iwai sound/ppc/keywest.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 58b9d4c00fa6e90792327c27da9ec65f732d421b Author: Uwe Kleine-König Date: Fri Nov 18 23:45:33 2022 +0100 ALSA: hda: cs35l41: 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-600-uwe@kleine-koenig.org Signed-off-by: Takashi Iwai sound/pci/hda/cs35l41_hda_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ba3ee1f288cbbf95e0d8210cb1c941127a9b91d Author: Uwe Kleine-König Date: Fri Nov 18 23:45:32 2022 +0100 ALSA: aoa: tas: 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-599-uwe@kleine-koenig.org Signed-off-by: Takashi Iwai sound/aoa/codecs/tas.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fc6dfd5547794b0bf10790576a9d97443d975439 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:31 2022 +0100 ALSA: aoa: onyx: 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-598-uwe@kleine-koenig.org Signed-off-by: Takashi Iwai sound/aoa/codecs/onyx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f9e510dc92df270756b6a42d98c738525d01e8c3 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:06 2022 +0100 platform/chrome: cros_ec: 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 Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221118224540.619276-513-uwe@kleine-koenig.org drivers/platform/chrome/cros_ec_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4c33cb31282c3968000a08223591c532128dfcfd Author: Andrew Davis Date: Mon Oct 24 12:34:31 2022 -0500 arm64: dts: freescale: 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/freescale directory. Signed-off-by: Andrew Davis Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Shawn Guo .../dts/freescale/{fsl-ls1028a-qds-13bb.dts => fsl-ls1028a-qds-13bb.dtso} | 0 .../dts/freescale/{fsl-ls1028a-qds-65bb.dts => fsl-ls1028a-qds-65bb.dtso} | 0 .../dts/freescale/{fsl-ls1028a-qds-7777.dts => fsl-ls1028a-qds-7777.dtso} | 0 .../dts/freescale/{fsl-ls1028a-qds-85bb.dts => fsl-ls1028a-qds-85bb.dtso} | 0 .../dts/freescale/{fsl-ls1028a-qds-899b.dts => fsl-ls1028a-qds-899b.dtso} | 0 .../dts/freescale/{fsl-ls1028a-qds-9999.dts => fsl-ls1028a-qds-9999.dtso} | 0 ...mm-venice-gw72xx-0x-imx219.dts => imx8mm-venice-gw72xx-0x-imx219.dtso} | 0 ...ice-gw72xx-0x-rs232-rts.dts => imx8mm-venice-gw72xx-0x-rs232-rts.dtso} | 0 ...x8mm-venice-gw72xx-0x-rs422.dts => imx8mm-venice-gw72xx-0x-rs422.dtso} | 0 ...x8mm-venice-gw72xx-0x-rs485.dts => imx8mm-venice-gw72xx-0x-rs485.dtso} | 0 ...mm-venice-gw73xx-0x-imx219.dts => imx8mm-venice-gw73xx-0x-imx219.dtso} | 0 ...ice-gw73xx-0x-rs232-rts.dts => imx8mm-venice-gw73xx-0x-rs232-rts.dtso} | 0 ...x8mm-venice-gw73xx-0x-rs422.dts => imx8mm-venice-gw73xx-0x-rs422.dtso} | 0 ...x8mm-venice-gw73xx-0x-rs485.dts => imx8mm-venice-gw73xx-0x-rs485.dtso} | 0 14 files changed, 0 insertions(+), 0 deletions(-) commit 76b3bd159f2531fc95831237d7555dd6d5918cb6 Merge: c6c93f788219 dcad240c15c1 Author: Shawn Guo Date: Sat Nov 19 14:29:30 2022 +0800 Merge remote-tracking branch 'robh/dt/dtbo-rename' into imx/dt64 commit 8bd8dcc5e47f0f9dc40187c3b8b42d992181eee1 Author: Felix Fietkau Date: Wed Nov 16 09:07:34 2022 +0100 net: ethernet: mediatek: ppe: assign per-port queues for offloaded traffic Keeps traffic sent to the switch within link speed limits Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20221116080734.44013-7-nbd@nbd.name Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_ppe.c | 18 ++++++++++++++++++ drivers/net/ethernet/mediatek/mtk_ppe.h | 4 ++++ drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 12 +++++++++--- 3 files changed, 31 insertions(+), 3 deletions(-) commit d169ecb536e46985e3e2acf5f2b39efae3953c2d Author: Felix Fietkau Date: Wed Nov 16 09:07:33 2022 +0100 net: dsa: tag_mtk: assign per-port queues Keeps traffic sent to the switch within link speed limits Signed-off-by: Felix Fietkau Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20221116080734.44013-6-nbd@nbd.name Signed-off-by: Jakub Kicinski net/dsa/tag_mtk.c | 2 ++ 1 file changed, 2 insertions(+) commit f63959c7eec3151c30a2ee0d351827b62e742dcb Author: Felix Fietkau Date: Wed Nov 16 09:07:32 2022 +0100 net: ethernet: mtk_eth_soc: implement multi-queue support for per-port queues When sending traffic to multiple ports with different link speeds, queued packets to one port can drown out tx to other ports. In order to better handle transmission to multiple ports, use the hardware shaper feature to implement weighted fair queueing between ports. Weight and maximum rate are automatically adjusted based on the link speed of the port. The first 3 queues are unrestricted and reserved for non-DSA direct tx on GMAC ports. The following queues are automatically assigned by the MTK DSA tag driver based on the target port number. The PPE offload code configures the queues for offloaded traffic in the same way. This feature is only supported on devices supporting QDMA. All queues still share the same DMA ring and descriptor pool. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20221116080734.44013-5-nbd@nbd.name Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 281 +++++++++++++++++++++++----- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 26 ++- 2 files changed, 258 insertions(+), 49 deletions(-) commit 71ba8e4891c799f9f79ea219f155ac795750af41 Author: Felix Fietkau Date: Wed Nov 16 09:07:31 2022 +0100 net: ethernet: mtk_eth_soc: avoid port_mg assignment on MT7622 and newer On newer chips, this field is unused and contains some bits related to queue assignment. Initialize it to 0 in those cases. Fix offload_version on MT7621 and MT7623, which still need the previous value. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20221116080734.44013-4-nbd@nbd.name Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++-- drivers/net/ethernet/mediatek/mtk_ppe.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) commit f4b2fa2c25e1ade78f766aa82e733a0b5198d484 Author: Felix Fietkau Date: Wed Nov 16 09:07:30 2022 +0100 net: ethernet: mtk_eth_soc: drop packets to WDMA if the ring is full Improves handling of DMA ring overflow. Clarify other WDMA drop related comment. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20221116080734.44013-3-nbd@nbd.name Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 ++++- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit c30e0b9b88b3cf460bd88d50784591fc97b05576 Author: Felix Fietkau Date: Wed Nov 16 09:07:29 2022 +0100 net: ethernet: mtk_eth_soc: increase tx ring size for QDMA devices In order to use the hardware traffic shaper feature, a larger tx ring is needed, especially for the scratch ring, which the hardware shaper uses to reorder packets. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20221116080734.44013-2-nbd@nbd.name Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 38 +++++++++++++++++------------ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 1 + 2 files changed, 23 insertions(+), 16 deletions(-) commit dbc4af768ba1670018c053b35a8613b811874f9c Author: Lukas Bulwahn Date: Wed Nov 16 11:24:50 2022 +0100 net: fman: remove reference to non-existing config PCS Commit a7c2a32e7f22 ("net: fman: memac: Use lynx pcs driver") makes the Freescale Data-Path Acceleration Architecture Frame Manager use lynx pcs driver by selecting PCS_LYNX. It also selects the non-existing config PCS as well, which has no effect. Remove this select to a non-existing config. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20221116102450.13928-1-lukas.bulwahn@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/fman/Kconfig | 1 - 1 file changed, 1 deletion(-) commit c6c93f78821996bed390e255fec3ac3a8c61b0bd Author: Adrian Alonso Date: Thu Nov 17 17:54:03 2022 +0800 arm64: dts: imx8mm-evk: add vcc supply for pca6416 pca6146 requires vcc-supply to work on i.MX8MM-EVK board. Reviewed-by: Shengjiu Wang Signed-off-by: Adrian Alonso Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 1 + 1 file changed, 1 insertion(+) commit 2a6b56aafb0cb3cd8bbedde4f7e5498acb30fad8 Author: Haibo Chen Date: Thu Nov 17 17:54:02 2022 +0800 arm64: dts: imx8m[m,q]-evk: change to use off-on-delay-us in regulator Some SD Card controller and power circuitry has increased capacitance, so the usual toggling of regulator to power the card off and on is insufficient. According to SD spec, for sd card power reset operation, the sd card supply voltage needs to be lower than 0.5v and keep over 1ms, otherwise, next time power back the sd card supply voltage to 3.3v, sd card can't support SD3.0 mode again. This patch add the off-on-delay-us, make sure the sd power reset behavior is align with the specification. Without this patch, when do quick system suspend/resume test, some sd card can't work at SD3.0 mode after system resume back. Signed-off-by: Haibo Chen Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 1 + 2 files changed, 2 insertions(+) commit a8ea275d16230e5272080d101c3ab88d400f49a6 Author: Peng Fan Date: Thu Nov 17 17:54:01 2022 +0800 arm64: dts: imx8mn-evk: enable uart1 Enable uart1 for BT usage Configure the clock to source from IMX8MN_SYS_PLL1_80M, because the uart could only support max 1.5M buadrate if using OSC_24M as clock source. Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit c0c4c4562b7c8115e44d60547b4f7c039ceca92b Author: Peng Fan Date: Thu Nov 17 17:54:00 2022 +0800 arm64: dts: imx8mn-evk: add i2c gpio recovery settings Add I2C gpio recovery iomuxc settings Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit cbc44b22c8a8d9f63390221e84354a2c500f0c85 Author: Peng Fan Date: Thu Nov 17 17:53:59 2022 +0800 arm64: dts: imx8mn-evk: set off-on-delay-us in regulator Some SD Card controller and power circuitry has increased capacitance, so the usual toggling of regulator to power the card off and on is insufficient. According to SD spec, for sd card power reset operation, the sd card supply voltage needs to be lower than 0.5v and keep over 1ms, otherwise, next time power back the sd card supply voltage to 3.3v, sd card can't support SD3.0 mode again. This patch add the off-on-delay-us, make sure the sd power reset behavior is align with the specification. Without this patch, when do quick system suspend/resume test, some sd card can't work at SD3.0 mode after system resume back. Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 1 + 1 file changed, 1 insertion(+) commit f4927bb2a2f8b72c0ace0233c05c3924285892a9 Author: Peng Fan Date: Thu Nov 17 17:53:58 2022 +0800 arm64: dts: imx8mn-evk: update vdd_soc dvs voltage Per schematic, BUCK1 is for VDD_SOC&DRAM&PU_0V9. The nxp,dvs-run-voltage and nxp,dvs-standby-voltage need set for BUCK1, not BUCK2. BUCK2 is for A53, which is handled by DVFS, so no need dvs property. nxp,dvs-run-voltage is not needed, since bootloader must configure voltage to make system boot well. Signed-off-by: Peng Fan Acked-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mn-evk.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e4c12d9decf55621278e58cd9010b98a6ca4ef91 Author: Peng Fan Date: Thu Nov 17 17:53:57 2022 +0800 arm64: dts: imx8mp-evk: enable I2C2 node Enable I2C node for i.MX8MP-EVK Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 7a2f7d763d94b79a0b0af25b7868abb8e550a45d Author: Han Xu Date: Thu Nov 17 17:53:56 2022 +0800 arm64: dts: imx8mp-evk: enable fspi nor on imx8mp evk enable fspi nor on imx8mp evk dts Reviewed-by: Frank Li Signed-off-by: Han Xu Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit c2f812df0f833bb3304b1cb5009c9279ec707b1e Author: Peng Fan Date: Thu Nov 17 17:53:55 2022 +0800 arm64: dts: imx8mp-evk: enable uart1/3 ports Enable uart1/3 ports for evk board. Configure the clock to source from IMX8MP_SYS_PLL1_80M, because the uart could only support max 1.5M buadrate if using OSC_24M as clock source. Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 2f6f2a0c8b064b4544f330d0f713cccf6b59d419 Author: Clark Wang Date: Thu Nov 17 17:53:54 2022 +0800 ARM64: dts: imx8mp-evk: add pwm support Enable pwm1/2/4 support. Enable pwm1 on pin GPIO1_IO01 for DSI_BL_PWM pwm2 on pin GPIO1_IO11 for LVDS_BL_PWM pwm4 on pin SAI5_RXFS for J21-32 Acked-by: Fugang Duan Signed-off-by: Clark Wang Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 834464c8504c5326b609f3f8052351de8b60ffec Author: Peng Fan Date: Thu Nov 17 17:53:52 2022 +0800 arm64: dts: imx8mp: add mlmix power domain Add mlmix power domain Signed-off-by: Peng Fan Acked-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit c73a72f4cbb47672c8cc7f7d7aba52f1cb15baca Author: Jakub Kicinski Date: Thu Nov 17 19:39:03 2022 -0800 netlink: remove the flex array from struct nlmsghdr I've added a flex array to struct nlmsghdr in commit 738136a0e375 ("netlink: split up copies in the ack construction") to allow accessing the data easily. It leads to warnings with clang, if user space wraps this structure into another struct and the flex array is not at the end of the container. Reviewed-by: Kees Cook Reviewed-by: David Ahern Link: https://lore.kernel.org/all/20221114023927.GA685@u2004-local/ Link: https://lore.kernel.org/r/20221118033903.1651026-1-kuba@kernel.org Signed-off-by: Jakub Kicinski include/uapi/linux/netlink.h | 2 -- net/netlink/af_netlink.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit bd5880e109827f244636e9b8fba64fa0d41bf18d Author: Philippe Schenker Date: Tue Nov 15 19:05:54 2022 +0100 ARM: dts: colibri-imx6ull: Enable dual-role switching The Colibri standard provides a GPIO called USBC_DET to switch from USB Host to USB Device and back. Make use of this GPIO by adding it with usb-connector framework. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ull-colibri.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 1d9e77b644d2e5c49e6d35f77684bd260ad98557 Author: Peter De Schrijver Date: Thu Oct 27 15:13:55 2022 +0300 clk: tegra: Support BPMP-FW ABI deny flags Support BPMP_CLK_STATE_CHANGE_DENIED by not populating state changing operations when the flag is set. Support BPMP_CLK_RATE_PARENT_CHANGE_DENIED by not populating rate or parent changing operations when the flag is set. Signed-off-by: Peter De Schrijver Acked-by: Stephen Boyd Signed-off-by: Thierry Reding drivers/clk/tegra/clk-bpmp.c | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) commit 3d8a3ae3d9660acd432b853c5f91d99bdaa63a23 Author: Niklas Cassel Date: Mon Nov 14 18:21:59 2022 +0100 ata: libata: fix commands incorrectly not getting retried during NCQ error A NCQ error means that the device has aborted processing of all active commands. To get the single NCQ command that caused the NCQ error, host software has to read the NCQ error log, which also takes the device out of error state. When the device encounters a NCQ error, we receive an error interrupt from the HBA, and call ata_do_link_abort() to mark all outstanding commands on the link as ATA_QCFLAG_FAILED (which means that these commands are owned by libata EH), and then call ata_qc_complete() on them. ata_qc_complete() will call fill_result_tf() for all commands marked as ATA_QCFLAG_FAILED. The taskfile is simply the latest status/error as seen from the device's perspective. The taskfile will have ATA_ERR set in the status field and ATA_ABORTED set in the error field. When we fill the current taskfile values for all outstanding commands, that means that qc->result_tf will have ATA_ERR set for all commands owned by libata EH. When ata_eh_link_autopsy() later analyzes all commands owned by libata EH, it will call ata_eh_analyze_tf(), which will check if qc->result_tf has ATA_ERR set, if it does, it will set qc->err_mask (which marks the command as an error). When ata_eh_finish() later calls __ata_qc_complete() on all commands owned by libata EH, it will call qc->complete_fn() (ata_scsi_qc_complete()), ata_scsi_qc_complete() will call ata_gen_ata_sense() to generate sense data if qc->err_mask is set. This means that we will generate sense data for commands that should not have any sense data set. Having sense data set for the non-failed commands will cause SCSI to finish these commands instead of retrying them. While this incorrect behavior has existed for a long time, this first became a problem once we started reading the correct taskfile register in commit 4ba09d202657 ("ata: libahci: read correct status and error field for NCQ commands"). Before this commit, NCQ commands would read the taskfile values received from the last non-NCQ command completion, which most likely did not have ATA_ERR set, since the last non-NCQ command was most likely not an error. Fix this by changing ata_eh_analyze_ncq_error() to mark all non-failed commands as ATA_QCFLAG_RETRY, and change the loop in ata_eh_link_autopsy() to skip commands marked as ATA_QCFLAG_RETRY. While at it, make sure that we clear ATA_ERR and any error bits for all commands except the actual command that caused the NCQ error, so that no other libata code will be able to misinterpret these commands as errors. Fixes: 4ba09d202657 ("ata: libahci: read correct status and error field for NCQ commands") Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal drivers/ata/libata-eh.c | 1 + drivers/ata/libata-sata.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit c3150e524e85b5092ce9a5ed282f96b054d8b510 Author: Martin Kepplinger Date: Fri Sep 9 10:39:40 2022 +0200 arm64: dts: imx8mq: fix dtschema warning for imx7-csi According to dtschema for the csi bridge, compatible is an enum and only one must be used. Fixing this removes the following warning: compatible: 'oneOf' conditional failed, one must be fixed Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c5e259b06a8efc69f929ad777ea49281bb58e37 Author: Luoyouming Date: Tue Nov 8 21:38:47 2022 +0800 RDMA/hns: Fix incorrect sge nums calculation The user usually configures the number of sge through the max_send_sge parameter when creating qp, and configures the maximum size of inline data that can be sent through max_inline_data. Inline uses sge to fill data to send. Expect the following: 1) When the sge space cannot hold inline data, the sge space needs to be expanded to accommodate all inline data 2) When the sge space is enough to accommodate inline data, the upper limit of inline data can be increased so that users can send larger inline data Currently case one is not implemented. When the inline data is larger than the sge space, an error of insufficient sge space occurs. This part of the code needs to be reimplemented according to the expected rules. The calculation method of sge num is modified to take the maximum value of max_send_sge and the sge for max_inline_data to solve this problem. Fixes: 05201e01be93 ("RDMA/hns: Refactor process of setting extended sge") Fixes: 30b707886aeb ("RDMA/hns: Support inline data in extented sge space for RC") Link: https://lore.kernel.org/r/20221108133847.2304539-3-xuhaoyue1@hisilicon.com Signed-off-by: Luoyouming Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_device.h | 3 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 12 +--- drivers/infiniband/hw/hns/hns_roce_main.c | 18 ++++- drivers/infiniband/hw/hns/hns_roce_qp.c | 107 +++++++++++++++++++++++----- include/uapi/rdma/hns-abi.h | 15 ++++ 5 files changed, 125 insertions(+), 30 deletions(-) commit 8eaa6f7d569b4a22bfc1b0a3fdfeeb401feb65a4 Author: Luoyouming Date: Tue Nov 8 21:38:46 2022 +0800 RDMA/hns: Fix ext_sge num error when post send In the HNS ROCE driver, The sge is divided into standard sge and extended sge. There are 2 standard sge in RC/XRC, and the UD standard sge is 0. In the scenario of RC SQ inline, if the data does not exceed 32bytes, the standard sge will be used. If it exceeds, only the extended sge will be used to fill the data. Currently, when filling the extended sge, max_gs is directly used as the number of the extended sge, which did not subtract the number of standard sge. There is a logical error. The new algorithm subtracts the number of standard sge from max_gs to get the actual number of extended sge. Fixes: 30b707886aeb ("RDMA/hns: Support inline data in extented sge space for RC") Link: https://lore.kernel.org/r/20221108133847.2304539-2-xuhaoyue1@hisilicon.com Signed-off-by: Luoyouming Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 7d984dac8f6bf4ebd3398af82b357e1d181ecaac Author: Li Zhijian Date: Sun Oct 30 03:04:33 2022 +0000 RDMA/rxe: Fix mr->map double free rxe_mr_cleanup() which tries to free mr->map again will be called when rxe_mr_init_user() fails: CPU: 0 PID: 4917 Comm: rdma_flush_serv Kdump: loaded Not tainted 6.1.0-rc1-roce-flush+ #25 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x45/0x5d panic+0x19e/0x349 end_report.part.0+0x54/0x7c kasan_report.cold+0xa/0xf rxe_mr_cleanup+0x9d/0xf0 [rdma_rxe] __rxe_cleanup+0x10a/0x1e0 [rdma_rxe] rxe_reg_user_mr+0xb7/0xd0 [rdma_rxe] ib_uverbs_reg_mr+0x26a/0x480 [ib_uverbs] ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x1a2/0x250 [ib_uverbs] ib_uverbs_cmd_verbs+0x1397/0x15a0 [ib_uverbs] This issue was firstly exposed since commit b18c7da63fcb ("RDMA/rxe: Fix memory leak in error path code") and then we fixed it in commit 8ff5f5d9d8cf ("RDMA/rxe: Prevent double freeing rxe_map_set()") but this fix was reverted together at last by commit 1e75550648da (Revert "RDMA/rxe: Create duplicate mapping tables for FMRs") Simply let rxe_mr_cleanup() always handle freeing the mr->map once it is successfully allocated. Fixes: 1e75550648da ("Revert "RDMA/rxe: Create duplicate mapping tables for FMRs"") Link: https://lore.kernel.org/r/1667099073-2-1-git-send-email-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_mr.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 8e1a76493be9868fef34f977296a69769dcdfa6f Author: Zhu Yanjun Date: Fri Nov 11 21:35:37 2022 -0500 RDMA/rxe: Remove reliable datagram support The rdma_rxe driver does not actually support the reliable datagram transport but contains a variable with RD opcodes in driver code. And this variable is never used. So remove it. Link: https://lore.kernel.org/r/20221112023537.432912-1-yanjun.zhu@intel.com Signed-off-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_hdr.h | 1 - 1 file changed, 1 deletion(-) commit 0445d1bae1cce00ae4e99c8cde33784a8199bad6 Author: Jason A. Donenfeld Date: Thu Nov 3 01:50:05 2022 +0100 lib: assume char is unsigned Now that we use -funsigned-char, there's no need for this kind of ifdef. Signed-off-by: Jason A. Donenfeld lib/is_signed_type_kunit.c | 4 ---- lib/test_printf.c | 12 ------------ 2 files changed, 16 deletions(-) commit 3bc753c06dd02a3517c9b498e3846ebfc94ac3ee Author: Jason A. Donenfeld Date: Wed Oct 19 10:26:48 2022 -0600 kbuild: treat char as always unsigned Recently, some compile-time checking I added to the clamp_t family of functions triggered a build error when a poorly written driver was compiled on ARM, because the driver assumed that the naked `char` type is signed, but ARM treats it as unsigned, and the C standard says it's architecture-dependent. I doubt this particular driver is the only instance in which unsuspecting authors make assumptions about `char` with no `signed` or `unsigned` specifier. We were lucky enough this time that that driver used `clamp_t(char, negative_value, positive_value)`, so the new checking code found it, and I've sent a patch to fix it, but there are likely other places lurking that won't be so easily unearthed. So let's just eliminate this particular variety of heisensign bugs entirely. Set `-funsigned-char` globally, so that gcc makes the type unsigned on all architectures. This will break things in some places and fix things in others, so this will likely cause a bit of churn while reconciling the type misuse. Cc: Masahiro Yamada Cc: Kees Cook Cc: Andrew Morton Cc: Linus Torvalds Cc: Andy Shevchenko Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/lkml/202210190108.ESC3pc3D-lkp@intel.com/ Signed-off-by: Jason A. Donenfeld Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit daf4218bf8dd9750d1ad93846aee98bf2e08eeee Author: Jason A. Donenfeld Date: Thu Nov 3 01:15:37 2022 +0100 media: atomisp: make hive_int8 explictly signed The current definition of hive_int8 is a naked char, without any sign specifier. This is incorrect on platforms such as arm, where char is unsigned. Fortunately nothing in the kernel actually uses a hive_int8 type, but in case it gets used later rather than removed, this makes it explicitly signed. Cc: Mauro Carvalho Chehab Cc: Sakari Ailus Cc: Greg Kroah-Hartman Signed-off-by: Jason A. Donenfeld drivers/staging/media/atomisp/pci/hive_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7392134428c92a4cb541bd5c8f4f5c8d2e88364d Author: Jason A. Donenfeld Date: Mon Oct 24 17:23:43 2022 +0200 media: stv0288: use explicitly signed char With char becoming unsigned by default, and with `char` alone being ambiguous and based on architecture, signed chars need to be marked explicitly as such. Use `s8` and `u8` types here, since that's what surrounding code does. This fixes: drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: assigning (-9) to unsigned variable 'tm' drivers/media/dvb-frontends/stv0288.c:471 stv0288_set_frontend() warn: we never enter this loop Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld drivers/media/dvb-frontends/stv0288.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 51c9daec79b4fa8140cd5490abec4f1f3685ecd8 Author: Jason A. Donenfeld Date: Fri Oct 28 16:22:56 2022 +0200 sparc: sbus: treat CPU index as integer Using a `char` to fit a CPU index is too small, and assigning -1 to it isn't correct either, since `char` is sometimes signed and sometimes not. In this case, it's been fine since this driver only works on sparc, but that will soon be changing when chars become unsigned everywhere. So instead, use a normal `int` type, which matches the `int cpu` function argument that this is being compared against. Cc: David S. Miller Signed-off-by: Jason A. Donenfeld drivers/sbus/char/envctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit adcd7118caadac54666081be39bbbc3e9b5e1f7d Author: Alexey Dobriyan Date: Thu Oct 20 12:49:45 2022 +0300 perf/x86: Make struct p4_event_bind::cntr signed array struct p4_event_bind::cntr[][] should be signed because of the following code: int i, j; for (i = 0; i < P4_CNTR_LIMIT; i++) { ---> j = bind->cntr[thread][i]; if (j != -1 && !test_bit(j, used_mask)) return j; } Making this member unsigned will make "j" 255 and fail "j != -1" comparison. Signed-off-by: Alexey Dobriyan Signed-off-by: Jason A. Donenfeld arch/x86/events/intel/p4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f649b57856b855f8a28724321e7ae72e31d513a Author: Kees Cook Date: Fri Nov 18 13:58:51 2022 -0800 IB/hfi1: Replace 1-element array with singleton 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 "lvs" in struct opa_port_data_counters_msg and struct opa_port_error_counters64_msg. Additionally, the "port" member of several structs is defined as a single-element, but is only ever accessed at index 0. Replace it with a singleton so that flexible array usage is sane. This results in no differences in binary output. [1] https://github.com/KSPP/linux/issues/78 Link: https://lore.kernel.org/r/20221118215847.never.416-kees@kernel.org Signed-off-by: Kees Cook Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/mad.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit ee748cd95e3adf4acdb05194b2ea68e4073e09b6 Author: Tiezhu Yang Date: Fri Nov 18 17:50:01 2022 +0800 bpf, samples: Use "grep -E" instead of "egrep" The latest version of grep (3.8+) claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E Fix this up by moving the related file to use "grep -E" instead. Signed-off-by: Tiezhu Yang Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/1668765001-12477-1-git-send-email-yangtiezhu@loongson.cn samples/bpf/test_cgrp2_tc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1e91173cd29ba13c5953d1820a7543140feec93 Author: Maryam Tahhan Date: Tue Nov 15 09:49:21 2022 -0500 bpf, docs: DEVMAPs and XDP_REDIRECT Add documentation for BPF_MAP_TYPE_DEVMAP and BPF_MAP_TYPE_DEVMAP_HASH including kernel version introduced, usage and examples. Add documentation that describes XDP_REDIRECT. Signed-off-by: Maryam Tahhan Signed-off-by: Daniel Borkmann Reviewed-by: Toke Høiland-Jørgensen Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221115144921.165483-1-mtahhan@redhat.com Documentation/bpf/index.rst | 1 + Documentation/bpf/map_devmap.rst | 222 +++++++++++++++++++++++++++++++++++++++ Documentation/bpf/redirect.rst | 81 ++++++++++++++ net/core/filter.c | 8 +- 4 files changed, 310 insertions(+), 2 deletions(-) commit f80e16b614f303b520465b7c704ff89fab800f2f Author: Andrii Nakryiko Date: Thu Nov 17 11:28:24 2022 -0800 libbpf: Ignore hashmap__find() result explicitly in btf_dump Coverity is reporting that btf_dump_name_dups() doesn't check return result of hashmap__find() call. This is intentional, so make it explicit with (void) cast. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221117192824.4093553-1-andrii@kernel.org tools/lib/bpf/btf_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6fbd8cbf3ed1915a7b957f2801f7c306a686c08 Author: Paul Moore Date: Wed Nov 9 14:14:35 2022 -0500 lsm,fs: fix vfs_getxattr_alloc() return type and caller error paths The vfs_getxattr_alloc() function currently returns a ssize_t value despite the fact that it only uses int values internally for return values. Fix this by converting vfs_getxattr_alloc() to return an int type and adjust the callers as necessary. As part of these caller modifications, some of the callers are fixed to properly free the xattr value buffer on both success and failure to ensure that memory is not leaked in the failure case. Reviewed-by: Serge Hallyn Reviewed-by: Mimi Zohar Signed-off-by: Paul Moore fs/xattr.c | 5 +++-- include/linux/xattr.h | 6 +++--- security/apparmor/domain.c | 3 +-- security/commoncap.c | 22 ++++++++++------------ security/integrity/evm/evm_crypto.c | 5 +++-- security/integrity/evm/evm_main.c | 7 +++++-- security/integrity/ima/ima.h | 5 +++-- security/integrity/ima/ima_appraise.c | 6 +++--- security/integrity/ima/ima_main.c | 6 ++++-- security/integrity/ima/ima_template_lib.c | 11 +++++------ 10 files changed, 40 insertions(+), 36 deletions(-) commit 7b9cbc7701d562e60ae0836dbad27ea9cf7e0f8d Author: Colin Ian King Date: Tue Nov 8 11:07:12 2022 +0000 scripts/spelling.txt: add more spellings to spelling.txt Some of the more common spelling mistakes and typos that I've found while fixing up spelling mistakes in the kernel in the past year. Link: https://lkml.kernel.org/r/20221108110712.114611-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton scripts/spelling.txt | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 8baceabca656d5ef4494cdeb3b9b9fbb844ac613 Author: Uros Bizjak Date: Mon Aug 22 19:39:56 2022 +0200 sched/fair: use try_cmpxchg in task_numa_work Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in task_numa_work. 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. Link: https://lkml.kernel.org/r/20220822173956.82525-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Signed-off-by: Andrew Morton kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 333d073dee3a6865171d43e3b0a9ff688bff5891 Author: YueHaibing Date: Sat Nov 5 19:06:11 2022 +0800 selftests: cgroup: fix unsigned comparison with less than zero 'size' is unsigned, it never less than zero. Link: https://lkml.kernel.org/r/20221105110611.28920-1-yuehaibing@huawei.com Fixes: 6c26df84e1f2 ("selftests: cgroup: return -errno from cg_read()/cg_write() on failure") Signed-off-by: YueHaibing Reviewed-by: Yosry Ahmed Acked-by: Roman Gushchin Reviewed-by: Kamalesh Babulal Cc: David Rientjes Cc: Johannes Weiner Cc: Shakeel Butt Cc: Shuah Khan Cc: Tejun Heo Cc: zefan li Signed-off-by: Andrew Morton tools/testing/selftests/cgroup/cgroup_util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d51cf40d38cb58575eca75481fb851bf3a348d78 Author: Zhao Gongyi Date: Thu Nov 3 08:57:54 2022 +0800 selftests/vm: add local_config.h and local_config.mk to .gitignore Add local_config.h and local_config.mk to .gitignore to avoid accidentally checking it in. Link: https://lkml.kernel.org/r/20221103005754.205420-1-zhaogongyi@huawei.com Signed-off-by: Zhao Gongyi Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/vm/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit c7e8d3279c984e41165a7b510759bd1771ac3941 Author: Baokun Li Date: Tue Nov 1 15:33:43 2022 +0800 squashfs: fix null-ptr-deref in squashfs_fill_super When squashfs_read_table() returns an error or `sb->s_magic != SQUASHFS_MAGIC`, enters the error branch and calls msblk->thread_ops->destroy(msblk) to destroy msblk. However, msblk->thread_ops has not been initialized. Therefore, the following problem is triggered: ================================================================== BUG: KASAN: null-ptr-deref in squashfs_fill_super+0xe7a/0x13b0 Read of size 8 at addr 0000000000000008 by task swapper/0/1 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc3-next-20221031 #367 Call Trace: dump_stack_lvl+0x73/0x9f print_report+0x743/0x759 kasan_report+0xc0/0x120 __asan_load8+0xd3/0x140 squashfs_fill_super+0xe7a/0x13b0 get_tree_bdev+0x27b/0x450 squashfs_get_tree+0x19/0x30 vfs_get_tree+0x49/0x150 path_mount+0xaae/0x1350 init_mount+0xad/0x100 do_mount_root+0xbc/0x1d0 mount_block_root+0x173/0x316 mount_root+0x223/0x236 prepare_namespace+0x1eb/0x237 kernel_init_freeable+0x528/0x576 kernel_init+0x29/0x250 ret_from_fork+0x1f/0x30 ================================================================== To solve this issue, msblk->thread_ops is initialized immediately after msblk is assigned a value. Link: https://lkml.kernel.org/r/20221101073343.3961562-1-libaokun1@huawei.com Fixes: b0645770d3c7 ("squashfs: add the mount parameter theads=") Signed-off-by: Baokun Li Reviewed-by: Xiaoming Ni Reviewed-by: Phillip Lougher Cc: Yu Kuai Cc: Zhang Yi Signed-off-by: Andrew Morton fs/squashfs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 13b6269dd022aaa69ca8d1df374ab327504121cf Author: Shang XiaoJing Date: Tue Nov 1 19:15:33 2022 +0800 ocfs2: fix memory leak in ocfs2_stack_glue_init() ocfs2_table_header should be free in ocfs2_stack_glue_init() if ocfs2_sysfs_init() failed, otherwise kmemleak will report memleak. BUG: memory leak unreferenced object 0xffff88810eeb5800 (size 128): comm "modprobe", pid 4507, jiffies 4296182506 (age 55.888s) hex dump (first 32 bytes): c0 40 14 a0 ff ff ff ff 00 00 00 00 01 00 00 00 .@.............. 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000001e59e1cd>] __register_sysctl_table+0xca/0xef0 [<00000000c04f70f7>] 0xffffffffa0050037 [<000000001bd12912>] do_one_initcall+0xdb/0x480 [<0000000064f766c9>] do_init_module+0x1cf/0x680 [<000000002ba52db0>] load_module+0x6441/0x6f20 [<000000009772580d>] __do_sys_finit_module+0x12f/0x1c0 [<00000000380c1f22>] do_syscall_64+0x3f/0x90 [<000000004cf473bc>] entry_SYSCALL_64_after_hwframe+0x63/0xcd Link: https://lkml.kernel.org/r/41651ca1-432a-db34-eb97-d35744559de1@linux.alibaba.com Fixes: 3878f110f71a ("ocfs2: Move the hb_ctl_path sysctl into the stack glue.") Signed-off-by: Shang XiaoJing Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/stackglue.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 9629c2b9057b9c7d770e0f1aa5546f4f702dbcef Author: Xiongfeng Wang Date: Mon Oct 31 17:15:57 2022 +0800 tools/accounting/procacct: remove some unused variables Drop the following unused variables inherited from getdelays.c: 'aggr_len', 'len2', 'cmd_type', 'tid', 'containerset', 'containerpath' and 'sigset'. Link: https://lkml.kernel.org/r/20221031091557.192180-1-wangxiongfeng2@huawei.com Signed-off-by: Xiongfeng Wang Cc: "Dr. Thomas Orgis" Cc: Ismael Luceno Cc: Xiongfeng Wang Cc: Yang Yingliang Signed-off-by: Andrew Morton tools/accounting/procacct.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 7960546c8a284f59a87ce3e1b90b68a9062e0287 Author: Tetsuo Handa Date: Sat Sep 24 14:11:25 2022 +0900 rapidio/tsi721: replace flush_scheduled_work() with flush_work() Like commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue() using a macro") says, flush_scheduled_work() is dangerous and will be forbidden. We are on the way for removing all flush_scheduled_work() callers from the kernel, and this patch is for removing flush_scheduled_work() call from tsi721 driver. Since "struct tsi721_device" is per a device struct, I assume that tsi721_remove() needs to wait for only two works associated with that device. Therefore, wait for only these works using flush_work(). Link: https://lkml.kernel.org/r/0e8a2023-7526-f03a-f520-efafbb0ef45c@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Cc: Alexandre Bounine Cc: Arnd Bergmann Cc: Christophe JAILLET Cc: Matt Porter Signed-off-by: Andrew Morton drivers/rapidio/devices/tsi721.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6fe888c4d2fb174408e4540bb2d5602b9f507f90 Author: Gaosheng Cui Date: Mon Oct 31 19:38:29 2022 +0800 lib/fonts: fix undefined behavior in bit shift for get_default_font Shifting signed 32-bit value by 31 bits is undefined, so changing significant bit to unsigned. The UBSAN warning calltrace like below: UBSAN: shift-out-of-bounds in lib/fonts/fonts.c:139:20 left shift of 1 by 31 places cannot be represented in type 'int' dump_stack_lvl+0x7d/0xa5 dump_stack+0x15/0x1b ubsan_epilogue+0xe/0x4e __ubsan_handle_shift_out_of_bounds+0x1e7/0x20c get_default_font+0x1c7/0x1f0 fbcon_startup+0x347/0x3a0 do_take_over_console+0xce/0x270 do_fbcon_takeover+0xa1/0x170 do_fb_registered+0x2a8/0x340 fbcon_fb_registered+0x47/0xe0 register_framebuffer+0x294/0x4a0 __drm_fb_helper_initial_config_and_unlock+0x43c/0x880 [drm_kms_helper] drm_fb_helper_initial_config+0x52/0x80 [drm_kms_helper] drm_fbdev_client_hotplug+0x156/0x1b0 [drm_kms_helper] drm_fbdev_generic_setup+0xfc/0x290 [drm_kms_helper] bochs_pci_probe+0x6ca/0x772 [bochs] local_pci_probe+0x4d/0xb0 pci_device_probe+0x119/0x320 really_probe+0x181/0x550 __driver_probe_device+0xc6/0x220 driver_probe_device+0x32/0x100 __driver_attach+0x195/0x200 bus_for_each_dev+0xbb/0x120 driver_attach+0x27/0x30 bus_add_driver+0x22e/0x2f0 driver_register+0xa9/0x190 __pci_register_driver+0x90/0xa0 bochs_pci_driver_init+0x52/0x1000 [bochs] do_one_initcall+0x76/0x430 do_init_module+0x61/0x28a load_module+0x1f82/0x2e50 __do_sys_finit_module+0xf8/0x190 __x64_sys_finit_module+0x23/0x30 do_syscall_64+0x58/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Link: https://lkml.kernel.org/r/20221031113829.4183153-1-cuigaosheng1@huawei.com Fixes: c81f717cb9e0 ("fbcon: Fix typo and bogus logic in get_default_font") Signed-off-by: Gaosheng Cui Signed-off-by: Andrew Morton lib/fonts/fonts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fb40fe04f9df23114782d5edd1c5d017ae9d0ca8 Author: Xiaoming Ni Date: Wed Oct 19 11:09:30 2022 +0800 squashfs: allows users to configure the number of decompression threads The maximum number of threads in the decompressor_multi.c file is fixed and cannot be adjusted according to user needs. Therefore, the mount parameter needs to be added to allow users to configure the number of threads as required. The upper limit is num_online_cpus() * 2. Link: https://lkml.kernel.org/r/20221019030930.130456-3-nixiaoming@huawei.com Signed-off-by: Xiaoming Ni Reviewed-by: Phillip Lougher Cc: Jianguo Chen Cc: Jubin Zhong Cc: Zhang Yi Signed-off-by: Andrew Morton fs/squashfs/Kconfig | 16 ++++++++++-- fs/squashfs/decompressor_multi.c | 4 +-- fs/squashfs/squashfs_fs_sb.h | 1 + fs/squashfs/super.c | 55 +++++++++++++++++++++++++++++++++++----- 4 files changed, 66 insertions(+), 10 deletions(-) commit 80f784098ff44e086f68f0e8c98b6c6da8702ec4 Author: Xiaoming Ni Date: Wed Oct 19 11:09:29 2022 +0800 squashfs: add the mount parameter theads= Patch series 'squashfs: Add the mount parameter "threads="'. Currently, Squashfs supports multiple decompressor parallel modes. However, this mode can be configured only during kernel building and does not support flexible selection during runtime. In the current patch set, the mount parameter "threads=" is added to allow users to select the parallel decompressor mode and configure the number of decompressors when mounting a file system. "threads=" The upper limit is num_online_cpus() * 2. This patch (of 2): Squashfs supports three decompression concurrency modes: Single-thread mode: concurrent reads are blocked and the memory overhead is small. Multi-thread mode/percpu mode: reduces concurrent read blocking but increases memory overhead. The corresponding schema must be fixed at compile time. During mounting, the concurrent decompression mode cannot be adjusted based on file read blocking. The mount parameter theads= is added to select the concurrent decompression mode of a single SquashFS file system image. Link: https://lkml.kernel.org/r/20221019030930.130456-1-nixiaoming@huawei.com Link: https://lkml.kernel.org/r/20221019030930.130456-2-nixiaoming@huawei.com Signed-off-by: Xiaoming Ni Reviewed-by: Phillip Lougher Cc: Jianguo Chen Cc: Jubin Zhong Cc: Zhang Yi Signed-off-by: Andrew Morton fs/squashfs/Kconfig | 39 ++++++++++++++++++++--- fs/squashfs/block.c | 2 +- fs/squashfs/decompressor.c | 2 +- fs/squashfs/decompressor_multi.c | 16 +++++++--- fs/squashfs/decompressor_multi_percpu.c | 23 +++++++++----- fs/squashfs/decompressor_single.c | 15 ++++++--- fs/squashfs/squashfs.h | 23 +++++++++++--- fs/squashfs/squashfs_fs_sb.h | 3 +- fs/squashfs/super.c | 56 +++++++++++++++++++++++++++++++-- 9 files changed, 147 insertions(+), 32 deletions(-) commit 4197530bf167d5f15e68c4e4e982368c3d0a0112 Author: XU pengfei Date: Wed Oct 26 16:05:18 2022 +0800 initramfs: remove unnecessary (void*) conversion Remove unnecessary void* type casting. Link: https://lkml.kernel.org/r/20221026080517.3221-1-xupengfei@nfschina.com Signed-off-by: XU pengfei Cc: Christian Brauner Cc: David Disseldorp Cc: "Eric W . Biederman" Cc: Martin Wilck Cc: Mike Rapoport Cc: wuchi Signed-off-by: Andrew Morton init/initramfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebeccaaef67a4895d2496ab8d9c2fb8d89201211 Author: Ryusuke Konishi Date: Thu Oct 27 13:43:06 2022 +0900 nilfs2: fix shift-out-of-bounds due to too large exponent of block size If field s_log_block_size of superblock data is corrupted and too large, init_nilfs() and load_nilfs() still can trigger a shift-out-of-bounds warning followed by a kernel panic (if panic_on_warn is set): shift exponent 38973 is too large for 32-bit type 'int' Call Trace: dump_stack_lvl+0xcd/0x134 ubsan_epilogue+0xb/0x50 __ubsan_handle_shift_out_of_bounds.cold.12+0x17b/0x1f5 init_nilfs.cold.11+0x18/0x1d [nilfs2] nilfs_mount+0x9b5/0x12b0 [nilfs2] ... This fixes the issue by adding and using a new helper function for getting block size with sanity check. Link: https://lkml.kernel.org/r/20221027044306.42774-3-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Tested-by: Ryusuke Konishi Signed-off-by: Andrew Morton fs/nilfs2/the_nilfs.c | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) commit 610a2a3d7d8be3537458a378ec69396a76c385b6 Author: Ryusuke Konishi Date: Thu Oct 27 13:43:05 2022 +0900 nilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset() Patch series "nilfs2: fix UBSAN shift-out-of-bounds warnings on mount time". The first patch fixes a bug reported by syzbot, and the second one fixes the remaining bug of the same kind. Although they are triggered by the same super block data anomaly, I divided it into the above two because the details of the issues and how to fix it are different. Both are required to eliminate the shift-out-of-bounds issues at mount time. This patch (of 2): If the block size exponent information written in an on-disk superblock is corrupted, nilfs_sb2_bad_offset helper function can trigger shift-out-of-bounds warning followed by a kernel panic (if panic_on_warn is set): shift exponent 38983 is too large for 64-bit type 'unsigned long long' Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_shift_out_of_bounds+0x33d/0x3b0 lib/ubsan.c:322 nilfs_sb2_bad_offset fs/nilfs2/the_nilfs.c:449 [inline] nilfs_load_super_block+0xdf5/0xe00 fs/nilfs2/the_nilfs.c:523 init_nilfs+0xb7/0x7d0 fs/nilfs2/the_nilfs.c:577 nilfs_fill_super+0xb1/0x5d0 fs/nilfs2/super.c:1047 nilfs_mount+0x613/0x9b0 fs/nilfs2/super.c:1317 ... In addition, since nilfs_sb2_bad_offset() performs multiplication without considering the upper bound, the computation may overflow if the disk layout parameters are not normal. This fixes these issues by inserting preliminary sanity checks for those parameters and by converting the comparison from one involving multiplication and left bit-shifting to one using division and right bit-shifting. Link: https://lkml.kernel.org/r/20221027044306.42774-1-konishi.ryusuke@gmail.com Link: https://lkml.kernel.org/r/20221027044306.42774-2-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: syzbot+e91619dd4c11c4960706@syzkaller.appspotmail.com Tested-by: Ryusuke Konishi Signed-off-by: Andrew Morton fs/nilfs2/the_nilfs.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit dc3f4dee81cd85b039d07b8d75cfbae4668a15d2 Author: Stanislaw Gruszka Date: Thu Oct 27 15:43:34 2022 +0200 scripts: checkpatch: allow "case" macros Do not report errors like below: ./scripts/checkpatch.pl -f drivers/net/wireless/ath/ath10k/wmi.h ERROR: Macros with complex values should be enclosed in parentheses +#define C2S(x) case x: return #x since many "case ..." macros are already used by some in-kernel drivers. Link: https://lkml.kernel.org/r/20221027134334.164301-1-stf_xl@wp.pl Signed-off-by: Stanislaw Gruszka Acked-by: Joe Perches Signed-off-by: Andrew Morton scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) commit 5cc81d5c81af0dee54da9a67a3ebe4be076a13db Author: Alexey Dobriyan Date: Mon Oct 24 21:08:09 2022 +0300 proc: fixup uptime selftest syscall(3) returns -1 and sets errno on error, unlike "syscall" instruction. Systems which have <= 32/64 CPUs are unaffected. Test won't bounce to all CPUs before completing if there are more of them. Link: https://lkml.kernel.org/r/Y1bUiT7VRXlXPQa1@p183 Fixes: 1f5bd0547654 ("proc: selftests: test /proc/uptime") Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton tools/testing/selftests/proc/proc-uptime-002.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 33cd3003644b2f64a1b1c27e10ba2ed55792e1cc Author: Bjorn Helgaas Date: Thu Oct 13 19:19:10 2022 -0500 ia64: remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions Remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions. Link: https://lkml.kernel.org/r/20221014001911.3342485-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Signed-off-by: Andrew Morton arch/ia64/include/asm/io.h | 4 ---- 1 file changed, 4 deletions(-) commit b98db4776446b2d0050d7db10e948b3b6570b62c Author: Gaosheng Cui Date: Wed Sep 14 20:47:07 2022 +0800 ia64/kprobes: remove orphan declarations from arch/ia64/include/asm/kprobes.h flush_register_stack() and invalidate_stacked_regs() have been removed since commit 0aeaf6b3a345 ("ia64/kprobes: Remove jprobe implementation"), so remove them. Link: https://lkml.kernel.org/r/20220914124707.1483471-1-cuigaosheng1@huawei.com Signed-off-by: Gaosheng Cui Cc: Ingo Molnar Cc: Masami Hiramatsu (Google) Signed-off-by: Andrew Morton arch/ia64/include/asm/kprobes.h | 2 -- 1 file changed, 2 deletions(-) commit 1c6dbcc4dae761800df0c29a7147c3b6c38f0c8d Author: ye xingchen Date: Thu Oct 20 11:30:04 2022 +0000 ia64: replace IS_ERR() with IS_ERR_VALUE() Avoid typecasts that are needed for IS_ERR() and use IS_ERR_VALUE() instead. Link: https://lkml.kernel.org/r/20221020113004.400031-1-ye.xingchen@zte.com.cn Signed-off-by: ye xingchen Signed-off-by: Sergei Trofimovich Signed-off-by: Andrew Morton arch/ia64/kernel/sys_ia64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 941baf6febaa88c057192084ca280d976c7c7239 Author: Alexey Dobriyan Date: Thu Sep 8 21:21:54 2022 +0300 proc: give /proc/cmdline size Most /proc files don't have length (in fstat sense). This leads to inefficiencies when reading such files with APIs commonly found in modern programming languages. They open file, then fstat descriptor, get st_size == 0 and either assume file is empty or start reading without knowing target size. cat(1) does OK because it uses large enough buffer by default. But naive programs copy-pasted from SO aren't: let mut f = std::fs::File::open("/proc/cmdline").unwrap(); let mut buf: Vec = Vec::new(); f.read_to_end(&mut buf).unwrap(); will result in openat(AT_FDCWD, "/proc/cmdline", O_RDONLY|O_CLOEXEC) = 3 statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Bad address) statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=0, ...}) = 0 lseek(3, 0, SEEK_CUR) = 0 read(3, "BOOT_IMAGE=(hd3,gpt2)/vmlinuz-5.", 32) = 32 read(3, "19.6-100.fc35.x86_64 root=/dev/m", 32) = 32 read(3, "apper/fedora_localhost--live-roo"..., 64) = 64 read(3, "ocalhost--live-swap rd.lvm.lv=fe"..., 128) = 116 read(3, "", 12) open/stat is OK, lseek looks silly but there are 3 unnecessary reads because Rust starts with 32 bytes per Vec and grows from there. In case of /proc/cmdline, the length is known precisely. Make variables readonly while I'm at it. P.S.: I tried to scp /proc/cpuinfo today and got empty file but this is separate story. Link: https://lkml.kernel.org/r/YxoywlbM73JJN3r+@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton fs/proc/cmdline.c | 6 +++++- include/linux/init.h | 1 + init/main.c | 7 +++++-- 3 files changed, 11 insertions(+), 3 deletions(-) commit 9b71f79f6e349251e529ef25f2d3bf8aa6168d26 Author: Bjorn Helgaas Date: Wed Oct 19 15:28:43 2022 -0500 checkpatch: add warning for non-lore mailing list URLs The lkml.org, marc.info, spinics.net, etc archives are not quite as useful as lore.kernel.org because they use different styles, add advertising, and may disappear in the future. The lore archives are more consistent and more likely to stick around, so prefer https://lore.kernel.org URLs when they exist. [bhelgaas@google.com: only warn if we see "http" before the archive hostname] Link: https://lkml.kernel.org/r/20221114224315.GA939630@bhelgaas Link: https://lkml.kernel.org/r/20221019202843.40810-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Peter Collingbourne Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Kees Cook Cc: Lukas Bulwahn Cc: Randy Dunlap # build-tested Cc: Joe Perches Signed-off-by: Andrew Morton scripts/checkpatch.pl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit f1f1f2569901ec5b9d425f2e91c09a0e320768f3 Author: Ivan Babrou Date: Thu Sep 22 15:40:26 2022 -0700 proc: report open files as size in stat() for /proc/pid/fd Many monitoring tools include open file count as a metric. Currently the only way to get this number is to enumerate the files in /proc/pid/fd. The problem with the current approach is that it does many things people generally don't care about when they need one number for a metric. In our tests for cadvisor, which reports open file counts per cgroup, we observed that reading the number of open files is slow. Out of 35.23% of CPU time spent in `proc_readfd_common`, we see 29.43% spent in `proc_fill_cache`, which is responsible for filling dentry info. Some of this extra time is spinlock contention, but it's a contention for the lock we don't want to take to begin with. We considered putting the number of open files in /proc/pid/status. Unfortunately, counting the number of fds involves iterating the open_files bitmap, which has a linear complexity in proportion with the number of open files (bitmap slots really, but it's close). We don't want to make /proc/pid/status any slower, so instead we put this info in /proc/pid/fd as a size member of the stat syscall result. Previously the reported number was zero, so there's very little risk of breaking anything, while still providing a somewhat logical way to count the open files with a fallback if it's zero. RFC for this patch included iterating open fds under RCU. Thanks to Frank Hofmann for the suggestion to use the bitmap instead. Previously: ``` $ sudo stat /proc/1/fd | head -n2 File: /proc/1/fd Size: 0 Blocks: 0 IO Block: 1024 directory ``` With this patch: ``` $ sudo stat /proc/1/fd | head -n2 File: /proc/1/fd Size: 65 Blocks: 0 IO Block: 1024 directory ``` Correctness check: ``` $ sudo ls /proc/1/fd | wc -l 65 ``` I added the docs for /proc//fd while I'm at it. [ivan@cloudflare.com: use bitmap_weight() to count the bits] Link: https://lkml.kernel.org/r/20221018045844.37697-1-ivan@cloudflare.com [akpm@linux-foundation.org: include linux/bitmap.h for bitmap_weight()] [ivan@cloudflare.com: return errno from proc_fd_getattr() instead of setting negative size] Link: https://lkml.kernel.org/r/20221024173140.30673-1-ivan@cloudflare.com Link: https://lkml.kernel.org/r/20220922224027.59266-1-ivan@cloudflare.com Signed-off-by: Ivan Babrou Cc: Alexey Dobriyan Cc: Al Viro Cc: Christoph Anton Mitterer Cc: David Hildenbrand Cc: David Laight Cc: Ivan Babrou Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Kalesh Singh Cc: Mike Rapoport Cc: Paul Gortmaker Cc: Theodore Ts'o Signed-off-by: Andrew Morton Documentation/filesystems/proc.rst | 17 ++++++++++++++ fs/proc/fd.c | 45 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) commit 2122e2a4efc2cd139474079e11939b6e07adfacd Author: Jason A. Donenfeld Date: Mon Sep 26 15:34:35 2022 +0200 minmax: clamp more efficiently by avoiding extra comparison Currently the clamp algorithm does: if (val > hi) val = hi; if (val < lo) val = lo; But since hi > lo by definition, this can be made more efficient with: if (val > hi) val = hi; else if (val < lo) val = lo; So fix up the clamp and clamp_t functions to do this, adding the same argument checking as for min and min_t. For simple cases, code generation on x86_64 and aarch64 stay about the same: before: cmp edi, edx mov eax, esi cmova edi, edx cmp edi, esi cmovnb eax, edi ret after: cmp edi, esi mov eax, edx cmovnb esi, edi cmp edi, edx cmovb eax, esi ret before: cmp w0, w2 csel w8, w0, w2, lo cmp w8, w1 csel w0, w8, w1, hi ret after: cmp w0, w1 csel w8, w0, w1, hi cmp w0, w2 csel w0, w8, w2, lo ret On MIPS64, however, code generation improves, by removing arithmetic in the second branch: before: sltu $3,$6,$4 bne $3,$0,.L2 move $2,$6 move $2,$4 .L2: sltu $3,$2,$5 bnel $3,$0,.L7 move $2,$5 .L7: jr $31 nop after: sltu $3,$4,$6 beq $3,$0,.L13 move $2,$6 sltu $3,$4,$5 bne $3,$0,.L12 move $2,$4 .L13: jr $31 nop .L12: jr $31 move $2,$5 For more complex cases with surrounding code, the effects are a bit more complicated. For example, consider this simplified version of timestamp_truncate() from fs/inode.c on x86_64: struct timespec64 timestamp_truncate(struct timespec64 t, struct inode *inode) { struct super_block *sb = inode->i_sb; unsigned int gran = sb->s_time_gran; t.tv_sec = clamp(t.tv_sec, sb->s_time_min, sb->s_time_max); if (t.tv_sec == sb->s_time_max || t.tv_sec == sb->s_time_min) t.tv_nsec = 0; return t; } before: mov r8, rdx mov rdx, rsi mov rcx, QWORD PTR [r8] mov rax, QWORD PTR [rcx+8] mov rcx, QWORD PTR [rcx+16] cmp rax, rdi mov r8, rcx cmovge rdi, rax cmp rdi, rcx cmovle r8, rdi cmp rax, r8 je .L4 cmp rdi, rcx jge .L4 mov rax, r8 ret .L4: xor edx, edx mov rax, r8 ret after: mov rax, QWORD PTR [rdx] mov rdx, QWORD PTR [rax+8] mov rax, QWORD PTR [rax+16] cmp rax, rdi jg .L6 mov r8, rax xor edx, edx .L2: mov rax, r8 ret .L6: cmp rdx, rdi mov r8, rdi cmovge r8, rdx cmp rax, r8 je .L4 xor eax, eax cmp rdx, rdi cmovl rax, rsi mov rdx, rax mov rax, r8 ret .L4: xor edx, edx jmp .L2 In this case, we actually gain a branch, unfortunately, because the compiler's replacement axioms no longer as cleanly apply. So all and all, this change is a bit of a mixed bag. Link: https://lkml.kernel.org/r/20220926133435.1333846-2-Jason@zx2c4.com Signed-off-by: Jason A. Donenfeld Cc: Andy Shevchenko Cc: Kees Cook Signed-off-by: Andrew Morton include/linux/minmax.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5efcecd9a3b18078d3398b359a84c83f549e22cf Author: Jason A. Donenfeld Date: Mon Sep 26 15:34:34 2022 +0200 minmax: sanity check constant bounds when clamping The clamp family of functions only makes sense if hi>=lo. If hi and lo are compile-time constants, then raise a build error. Doing so has already caught buggy code. This also introduces the infrastructure to improve the clamping function in subsequent commits. [akpm@linux-foundation.org: coding-style cleanups] [akpm@linux-foundation.org: s@&&\@&& \@] Link: https://lkml.kernel.org/r/20220926133435.1333846-1-Jason@zx2c4.com Signed-off-by: Jason A. Donenfeld Reviewed-by: Andy Shevchenko Cc: Kees Cook Signed-off-by: Andrew Morton include/linux/minmax.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit f07c647c1f62b3334c2be50b75609ffb20df71d3 Author: Chen Lifu Date: Thu Sep 29 12:29:36 2022 +0800 ARM: kexec: make machine_crash_nonpanic_core() static This symbol is not used outside of the file, so mark it static. Fixes the following warning: arch/arm/kernel/machine_kexec.c:76:6: warning: symbol 'machine_crash_nonpanic_core' was not declared. Should it be static? Link: https://lkml.kernel.org/r/20220929042936.22012-5-bhe@redhat.com Signed-off-by: Chen Lifu Signed-off-by: Baoquan He Acked-by: Baoquan He Cc: "Eric W . Biederman" Cc: Petr Mladek Cc: Russell King Cc: Benjamin Herrenschmidt Cc: Jianglei Nie Cc: Li Chen Cc: Michael Ellerman Cc: Paul Mackerras Cc: ye xingchen Cc: Zeal Robot Signed-off-by: Andrew Morton arch/arm/kernel/machine_kexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cade589fdf697dd4981056c09f83924db8e4e4ed Author: Li Chen Date: Thu Sep 29 12:29:35 2022 +0800 kexec: replace crash_mem_range with range We already have struct range, so just use it. Link: https://lkml.kernel.org/r/20220929042936.22012-4-bhe@redhat.com Signed-off-by: Li Chen Signed-off-by: Baoquan He Acked-by: Baoquan He Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Chen Lifu Cc: "Eric W . Biederman" Cc: Jianglei Nie Cc: Petr Mladek Cc: Russell King Cc: ye xingchen Cc: Zeal Robot Signed-off-by: Andrew Morton arch/powerpc/kexec/file_load_64.c | 2 +- arch/powerpc/kexec/ranges.c | 8 ++++---- include/linux/kexec.h | 7 ++----- kernel/kexec_file.c | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) commit 32d0c98e428a3ec483d5d342983db467d7324f2b Author: ye xingchen Date: Thu Sep 29 12:29:34 2022 +0800 kexec: remove the unneeded result variable Return the value kimage_add_entry() directly instead of storing it in another redundant variable. Link: https://lkml.kernel.org/r/20220929042936.22012-3-bhe@redhat.com Signed-off-by: ye xingchen Signed-off-by: Baoquan He Reported-by: Zeal Robot Acked-by: Baoquan He Cc: Benjamin Herrenschmidt Cc: Chen Lifu Cc: "Eric W . Biederman" Cc: Jianglei Nie Cc: Li Chen Cc: Michael Ellerman Cc: Paul Mackerras Cc: Petr Mladek Cc: Russell King Signed-off-by: Andrew Morton kernel/kexec_core.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 12b9d301ff73122aebd78548fa4c04ca69ed78fe Author: Jianglei Nie Date: Thu Sep 29 12:29:33 2022 +0800 proc/vmcore: fix potential memory leak in vmcore_init() Patch series "Some minor cleanup patches resent". The first three patches trivial clean up patches. And for the patch "kexec: replace crash_mem_range with range", I got a ibm-p9wr ppc64le system to test, it works well. This patch (of 4): elfcorehdr_alloc() allocates a memory chunk for elfcorehdr_addr with kzalloc(). If is_vmcore_usable() returns false, elfcorehdr_addr is a predefined value. If parse_crash_elf_headers() gets some error and returns a negetive value, the elfcorehdr_addr should be released with elfcorehdr_free(). Fix it by calling elfcorehdr_free() when parse_crash_elf_headers() fails. Link: https://lkml.kernel.org/r/20220929042936.22012-1-bhe@redhat.com Link: https://lkml.kernel.org/r/20220929042936.22012-2-bhe@redhat.com Signed-off-by: Jianglei Nie Signed-off-by: Baoquan He Acked-by: Baoquan He Cc: Benjamin Herrenschmidt Cc: Chen Lifu Cc: "Eric W . Biederman" Cc: Li Chen Cc: Michael Ellerman Cc: Paul Mackerras Cc: Petr Mladek Cc: Russell King Cc: ye xingchen Cc: Zeal Robot Signed-off-by: Andrew Morton fs/proc/vmcore.c | 1 + 1 file changed, 1 insertion(+) commit b270f492dc45b59d573cd80795e8b4781e959836 Author: Joseph Qi Date: Fri Oct 7 20:48:46 2022 +0800 ocfs2/dlm: use bitmap API instead of hand-writing it Use bitmap_zero/bitmap_copy/bitmap_qeual directly for bitmap operations. Link: https://lkml.kernel.org/r/20221007124846.186453-3-joseph.qi@linux.alibaba.com Signed-off-by: Joseph Qi Cc: Changwei Ge Cc: Gang He Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/dlm/dlmcommon.h | 2 +- fs/ocfs2/dlm/dlmdomain.c | 17 +++++++---------- fs/ocfs2/dlm/dlmmaster.c | 30 +++++++++++++++--------------- fs/ocfs2/dlm/dlmrecovery.c | 2 +- 4 files changed, 24 insertions(+), 27 deletions(-) commit 6d4a93b6809270e5c7d7216b20f4ef2e88213eb3 Author: Joseph Qi Date: Fri Oct 7 20:48:45 2022 +0800 ocfs2: use bitmap API in fill_node_map Pass bits directly into fill_node_map helper and use bitmap API directly to simplify code. Link: https://lkml.kernel.org/r/20221007124846.186453-2-joseph.qi@linux.alibaba.com Signed-off-by: Joseph Qi Cc: Changwei Ge Cc: Gang He Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/cluster/heartbeat.c | 18 ++++++++---------- fs/ocfs2/cluster/heartbeat.h | 2 +- fs/ocfs2/cluster/netdebug.c | 2 +- fs/ocfs2/cluster/tcp.c | 6 ++---- fs/ocfs2/dlm/dlmdomain.c | 2 +- fs/ocfs2/stack_o2cb.c | 6 +++--- 6 files changed, 16 insertions(+), 20 deletions(-) commit 71dd5d651be7c99c401ad642e9f3cba88b956bce Author: Joseph Qi Date: Fri Oct 7 20:48:44 2022 +0800 ocfs2/cluster: use bitmap API instead of hand-writing it Use bitmap_zero/bitmap_copy/bitmap_equal directly for bitmap operations. Link: https://lkml.kernel.org/r/20221007124846.186453-1-joseph.qi@linux.alibaba.com Signed-off-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/cluster/heartbeat.c | 20 ++++++++++---------- fs/ocfs2/cluster/nodemanager.c | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) commit 5d5dd3e4a86a64cc69fa0fdd32f769b1d97a9a83 Author: Andy Shevchenko Date: Sat Oct 8 22:59:14 2022 +0300 panic: use str_enabled_disabled() helper Use str_enabled_disabled() helper instead of open coding the same. Link: https://lkml.kernel.org/r/20221008195914.54199-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton kernel/panic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6a6d7602caec1b49dda423b0d15a8c4f72c9c73d Author: Uros Bizjak Date: Mon Oct 17 16:52:26 2022 +0200 llist: avoid extra memory read in llist_add_batch try_cmpxchg implicitly assigns old head->first value to "first" when cmpxchg fails. There is no need to re-read the value in the loop. Link: https://lkml.kernel.org/r/20221017145226.4044-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Signed-off-by: Andrew Morton lib/llist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit add891f68d9d17dece8e1592c5e59a484fb7090e Author: Palmer Dabbelt Date: Thu Oct 13 14:46:38 2022 -0700 MAINTAINERS: git://github -> https://github.com for linux-test-project Github deprecated the git:// links about a year ago, so let's move to the https:// URLs instead. Link: https://lkml.kernel.org/r/20221013214638.30953-1-palmer@rivosinc.com Reported-by: Conor Dooley Link: https://github.blog/2021-09-01-improving-git-protocol-security-github/ Signed-off-by: Palmer Dabbelt Reviewed-by: Cyril Hrubis Reviewed-by: Petr Vorel Signed-off-by: Andrew Morton MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1aae9056b1ce29ed9a691e0f6c4bb3b08b5d7374 Author: Colin Ian King Date: Mon Oct 17 22:45:56 2022 +0100 lib/oid_registry.c: remove redundant assignment to variable num The variable num is being assigned a value that is never read, it is being re-assigned a new value in both paths if an if-statement. The assignment is redundant and can be removed. Cleans up clang scan build warning: lib/oid_registry.c:149:3: warning: Value stored to 'num' is never read [deadcode.DeadStores] Link: https://lkml.kernel.org/r/20221017214556.863357-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton lib/oid_registry.c | 1 - 1 file changed, 1 deletion(-) commit 8603b6f58637ce196d68f7749633ea81af196d66 Author: Oleksandr Natalenko Date: Sat Sep 3 08:43:30 2022 +0200 core_pattern: add CPU specifier Statistically, in a large deployment regular segfaults may indicate a CPU issue. Currently, it is not possible to find out what CPU the segfault happened on. There are at least two attempts to improve segfault logging with this regard, but they do not help in case the logs rotate. Hence, lets make sure it is possible to permanently record a CPU the task ran on using a new core_pattern specifier. Link: https://lkml.kernel.org/r/20220903064330.20772-1-oleksandr@redhat.com Signed-off-by: Oleksandr Natalenko Suggested-by: Renaud Métrich Reviewed-by: Oleg Nesterov Cc: Alexander Viro Cc: "Eric W . Biederman" Cc: Grzegorz Halat Cc: "Guilherme G. Piccoli" Cc: "Huang, Ying" Cc: Jason A. Donenfeld Cc: Joel Savitz Cc: Jonathan Corbet Cc: Kees Cook Cc: Laurent Dufour Cc: Luis Chamberlain Cc: Rob Herring Cc: Stephen Kitt Cc: Will Deacon Cc: Xiaoming Ni Signed-off-by: Andrew Morton Documentation/admin-guide/sysctl/kernel.rst | 1 + fs/coredump.c | 5 +++++ include/linux/coredump.h | 1 + 3 files changed, 7 insertions(+) commit 28377e56ed22ecce60260eb8afdf0c9837b3505f Author: Jithu Joseph Date: Wed Nov 16 19:59:28 2022 -0800 x86/microcode/intel: Use a reserved field for metasize Intel is using microcode file format for IFS test images too. IFS test images use one of the existing reserved fields in microcode header to indicate the size of the region in the file allocated for metadata structures. In preparation for this, rename first of the existing reserved fields in microcode header to metasize. In subsequent patches IFS specific code will make use of this field while parsing IFS images. Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Ashok Raj Reviewed-by: Sohil Mehta Link: https://lore.kernel.org/r/20221117035935.4136738-10-jithu.joseph@intel.com arch/x86/include/asm/microcode_intel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e0788c3281a72386e75b53a010de4bfbac7e80db Author: Jithu Joseph Date: Wed Nov 16 19:59:27 2022 -0800 x86/microcode/intel: Add hdr_type to intel_microcode_sanity_check() IFS test images and microcode blobs use the same header format. Microcode blobs use header type of 1, whereas IFS test images will use header type of 2. In preparation for IFS reusing intel_microcode_sanity_check(), add header type as a parameter for sanity check. [ bp: Touchups. ] Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Ashok Raj Link: https://lore.kernel.org/r/20221117035935.4136738-9-jithu.joseph@intel.com arch/x86/include/asm/cpu.h | 2 +- arch/x86/include/asm/microcode_intel.h | 1 + arch/x86/kernel/cpu/intel.c | 21 ++++++++++++++++++--- arch/x86/kernel/cpu/microcode/intel.c | 4 ++-- 4 files changed, 22 insertions(+), 6 deletions(-) commit 514ee839c6d0750c1c4456502e6fa08599e57931 Author: Jithu Joseph Date: Wed Nov 16 19:59:26 2022 -0800 x86/microcode/intel: Reuse microcode_sanity_check() IFS test image carries the same microcode header as regular Intel microcode blobs. Reuse microcode_sanity_check() in the IFS driver to perform sanity check of the IFS test images too. Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Ashok Raj Reviewed-by: Sohil Mehta Link: https://lore.kernel.org/r/20221117035935.4136738-8-jithu.joseph@intel.com arch/x86/include/asm/cpu.h | 1 + arch/x86/kernel/cpu/intel.c | 99 +++++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/microcode/intel.c | 102 +--------------------------------- 3 files changed, 102 insertions(+), 100 deletions(-) commit c86a514f5fad1fdd11f690c6538161413f63d777 Author: Yang Li Date: Fri Nov 18 08:58:52 2022 +0800 kallsyms: Remove unneeded semicolon ./kernel/kallsyms_selftest.c:136:2-3: Unneeded semicolon Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3208 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Luis Chamberlain kernel/kallsyms_selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e13ab0158dd4a033d61a5baa8f9b5b7c9ea8431 Author: Jithu Joseph Date: Wed Nov 16 19:59:25 2022 -0800 x86/microcode/intel: Use appropriate type in microcode_sanity_check() The data type of the @print_err parameter used by microcode_sanity_check() is int. In preparation for exporting this function to be used by the IFS driver convert it to a more appropriate bool type for readability. No functional change intended. Suggested-by: Tony Luck Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Ashok Raj Reviewed-by: Sohil Mehta Link: https://lore.kernel.org/r/20221117035935.4136738-7-jithu.joseph@intel.com arch/x86/kernel/cpu/microcode/intel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 716f380275866350ee44447b3c7c999f39c3178d Author: Jithu Joseph Date: Wed Nov 16 19:59:24 2022 -0800 x86/microcode/intel: Reuse find_matching_signature() IFS uses test images provided by Intel that can be regarded as firmware. An IFS test image carries microcode header with an extended signature table. Reuse find_matching_signature() for verifying if the test image header or the extended signature table indicate whether that image is fit to run on a system. No functional changes. Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Ashok Raj Reviewed-by: Sohil Mehta Link: https://lore.kernel.org/r/20221117035935.4136738-6-jithu.joseph@intel.com arch/x86/include/asm/cpu.h | 1 + arch/x86/kernel/cpu/intel.c | 29 +++++++++++++++++++++++ arch/x86/kernel/cpu/microcode/intel.c | 44 +++++++---------------------------- 3 files changed, 38 insertions(+), 36 deletions(-) commit dcad240c15c10bebdccd1f29f1a44787528f2d76 Author: Andrew Davis Date: Mon Nov 14 14:59:39 2022 -0600 kbuild: Cleanup DT Overlay intermediate files as appropriate %.dtbo.o and %.dtbo.S files are used to build-in DT Overlay. They should should not be removed by Make or the kernel will be needlessly rebuilt. These should be removed by "clean" and ignored by git like other intermediate files. Reported-by: Andy Shevchenko Signed-off-by: Andrew Davis Fixes: 941214a512d8 ("kbuild: Allow DTB overlays to built into .dtbo.S files") Tested-by: Andy Shevchenko Acked-by: Masahiro Yamada Link: https://lore.kernel.org/r/20221114205939.27994-1-afd@ti.com Signed-off-by: Rob Herring .gitignore | 1 + Makefile | 4 +++- scripts/Makefile.build | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) commit cb5eceee816bf05667089869d822b9cbc919465a Author: Jithu Joseph Date: Thu Nov 17 11:59:57 2022 -0800 platform/x86/intel/ifs: Remove memory allocation from load path IFS requires tests to be authenticated once for each CPU socket on a system. scan_chunks_sanity_check() was dynamically allocating memory to store the state of whether tests have been authenticated on each socket for every load operation. Move the memory allocation to init path and store the pointer in ifs_data struct. Also rearrange the adjacent error checking in init for a more simplified and natural flow. Suggested-by: Borislav Petkov Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221117195957.28225-1-jithu.joseph@intel.com drivers/platform/x86/intel/ifs/core.c | 20 ++++++++++++++++---- drivers/platform/x86/intel/ifs/ifs.h | 2 ++ drivers/platform/x86/intel/ifs/load.c | 14 ++++---------- 3 files changed, 22 insertions(+), 14 deletions(-) commit d2eae8e98d5979aa4a767e1cbf53ab9f6a83a38e Author: Matt Roper Date: Tue Nov 8 16:13:28 2022 -0800 drm/i915/dg2: Drop force_probe requirement DG2 has been very usable for a while now, and all of the uapi changes related to fundamental platform usage have been finalized. Recent CI results have also been healthy, so we're ready to drop the force_probe requirement and enable the platform by default. Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Jani Nikula Signed-off-by: Matt Roper Acked-by: Tvrtko Ursulin Acked-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221109001328.732000-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 - 1 file changed, 1 deletion(-) commit a4c30fa4ead5e6628e5ff5a45664ba7181acf6f1 Author: Jithu Joseph Date: Wed Nov 16 19:59:22 2022 -0800 platform/x86/intel/ifs: Remove image loading during init IFS test image is unnecessarily loaded during driver initialization. Drop image loading during ifs_init() and improve module load time. With this change, user has to load one when starting the tests. As a consequence, make ifs_sem static as it is only used within sysfs.c Suggested-by: Hans de Goede Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Sohil Mehta Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221117035935.4136738-4-jithu.joseph@intel.com drivers/platform/x86/intel/ifs/core.c | 6 +----- drivers/platform/x86/intel/ifs/ifs.h | 2 -- drivers/platform/x86/intel/ifs/sysfs.c | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) commit f4e209e956b5d66f0e6e34e89f19811c2c1e596e Author: Jithu Joseph Date: Wed Nov 16 19:59:21 2022 -0800 platform/x86/intel/ifs: Return a more appropriate error code scan_chunks_sanity_check() returns -ENOMEM if it encounters an error while copying IFS test image from memory to Secure Memory. Return -EIO in this scenario, as it is more appropriate. Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Sohil Mehta Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221117035935.4136738-3-jithu.joseph@intel.com drivers/platform/x86/intel/ifs/load.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 97c11d6e31547183e2404087f0fb23b34dbe2cc3 Author: Kumar Kartikeya Dwivedi Date: Sat Nov 19 00:29:38 2022 +0530 selftests/bpf: Skip spin lock failure test on s390x Instead of adding the whole test to DENYLIST.s390x, which also has success test cases that should be run, just skip over failure test cases in case the JIT does not support kfuncs. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118185938.2139616-3-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/spin_lock.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2d4a5f91837f4a75cf02010b9a52bfe52d0efd40 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:13 2022 +0100 KVM: selftests: Export vm_vaddr_unused_gap() to make it possible to request unmapped ranges Currently, tests can only request a new vaddr range by using vm_vaddr_alloc()/vm_vaddr_alloc_page()/vm_vaddr_alloc_pages() but these functions allocate and map physical pages too. Make it possible to request unmapped range too. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-36-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util_base.h | 1 + tools/testing/selftests/kvm/lib/kvm_util.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 56fc7732031d9999a35cb43b3de30d52ae30fd3f Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:12 2022 +0100 KVM: selftests: Fill in vm->vpages_mapped bitmap in virt_map() too Similar to vm_vaddr_alloc(), virt_map() needs to reflect the mapping in vm->vpages_mapped. While on it, remove unneeded code wrapping in vm_vaddr_alloc(). Reviewed-by: Andrew Jones Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-35-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/kvm_util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 998489245d8469c21f1517c4bbe192e0ef3c3374 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:11 2022 +0100 KVM: selftests: Hyper-V PV IPI selftest Introduce a selftest for Hyper-V PV IPI hypercalls (HvCallSendSyntheticClusterIpi, HvCallSendSyntheticClusterIpiEx). The test creates one 'sender' vCPU and two 'receiver' vCPU and then issues various combinations of send IPI hypercalls in both 'normal' and 'fast' (with XMM input where necessary) mode. Later, the test checks whether IPIs were delivered to the expected destination vCPU[s]. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-34-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 1 + .../testing/selftests/kvm/include/x86_64/hyperv.h | 35 ++- .../testing/selftests/kvm/x86_64/hyperv_features.c | 2 +- tools/testing/selftests/kvm/x86_64/hyperv_ipi.c | 314 +++++++++++++++++++++ 5 files changed, 349 insertions(+), 4 deletions(-) commit caf4110fbaa89a20733facb062381e89961ce698 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:10 2022 +0100 KVM: selftests: Move the function doing Hyper-V hypercall to a common header All Hyper-V specific tests issuing hypercalls need this. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-33-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/hyperv.h | 19 +++++++++++++++++++ tools/testing/selftests/kvm/x86_64/hyperv_features.c | 20 +------------------- 2 files changed, 20 insertions(+), 19 deletions(-) commit 244c679b4b8c45b7ecba873ae1c83482665eaac8 Author: Radhakrishna Sripada Date: Thu Nov 17 13:30:15 2022 -0800 drm/i915/mtl: Skip doubling channel numbers for LPDDR4/LPDDDR5 MTL LPDDR5 reported 16b with 8 channels. Previous platforms reported 32b with 4 channels and hence needed a multiplication by a factor of 2. Skip increasing the channels for MTL. v2: Use version check instead of platform check(MattR) Bspec: 64631 Cc: Matt Roper Signed-off-by: Radhakrishna Sripada Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221117213015.584417-2-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/display/intel_bw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c05a0a71c5d0aea010af19f21ccdc0d576066790 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:09 2022 +0100 KVM: selftests: Move HYPERV_LINUX_OS_ID definition to a common header HYPERV_LINUX_OS_ID needs to be written to HV_X64_MSR_GUEST_OS_ID by each Hyper-V specific selftest. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-32-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/hyperv.h | 3 +++ tools/testing/selftests/kvm/x86_64/hyperv_features.c | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit 676a863ce605caca3a559bdb8e40f640c15f1fde Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:08 2022 +0100 KVM: selftests: Better XMM read/write helpers set_xmm()/get_xmm() helpers are fairly useless as they only read 64 bits from 128-bit registers. Moreover, these helpers are not used. Borrow _kvm_read_sse_reg()/_kvm_write_sse_reg() from KVM limiting them to XMM0-XMM8 for now. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-31-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini .../selftests/kvm/include/x86_64/processor.h | 70 +++++++++++----------- 1 file changed, 36 insertions(+), 34 deletions(-) commit f4de6a1fa3ee81197239603756fc5c4259e5ef1b Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:07 2022 +0100 KVM: x86: Expose Hyper-V L2 TLB flush feature With both nSVM and nVMX implementations in place, KVM can now expose Hyper-V L2 TLB flush feature to userspace. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-30-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 1 + 1 file changed, 1 insertion(+) commit 3f4a812edf5cb0a50e65fbdfafdb3e688da18f16 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:06 2022 +0100 KVM: nSVM: hyper-v: Enable L2 TLB flush Implement Hyper-V L2 TLB flush for nSVM. The feature needs to be enabled both in extended 'nested controls' in VMCB and VP assist page. According to Hyper-V TLFS, synthetic vmexit to L1 is performed with - HV_SVM_EXITCODE_ENL exit_code. - HV_SVM_ENL_EXITCODE_TRAP_AFTER_FLUSH exit_info_1. Note: VP assist page is cached in 'struct kvm_vcpu_hv' so recalc_intercepts() doesn't need to read from guest's memory. KVM needs to update the case upon each VMRUN and after svm_set_nested_state (svm_get_nested_state_pages()) to handle the case when the guest got migrated while L2 was running. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-29-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/hyperv-tlfs.h | 4 ++++ arch/x86/kvm/hyperv.h | 11 +++++++++++ arch/x86/kvm/svm/hyperv.c | 7 +++++++ arch/x86/kvm/svm/hyperv.h | 15 +++++++++++++++ arch/x86/kvm/svm/nested.c | 35 +++++++++++++++++++++++++++++++++-- 5 files changed, 70 insertions(+), 2 deletions(-) commit b415d8d417bbe5403626b74e1041101ac23d602f Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:05 2022 +0100 KVM: x86: Make kvm_hv_get_assist_page() return 0/-errno Convert kvm_hv_get_assist_page() to return 'int' and propagate possible errors from kvm_read_guest_cached(). Suggested-by: Sean Christopherson Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-28-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 8 ++++---- arch/x86/kvm/hyperv.h | 2 +- arch/x86/kvm/vmx/hyperv.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit c30e9bc8b606077142969a807ada42ca921e605a Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:04 2022 +0100 KVM: nVMX: hyper-v: Enable L2 TLB flush Enable L2 TLB flush feature on nVMX when: - Enlightened VMCS is in use. - The feature flag is enabled in eVMCS. - The feature flag is enabled in partition assist page. Perform synthetic vmexit to L1 after processing TLB flush call upon request (HV_VMX_SYNTHETIC_EXIT_REASON_TRAP_AFTER_FLUSH). Note: nested_evmcs_l2_tlb_flush_enabled() uses cached VP assist page copy which gets updated from nested_vmx_handle_enlightened_vmptrld(). This is also guaranteed to happen post migration with eVMCS backed L2 running. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-27-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/hyperv-tlfs.h | 9 +++++++++ arch/x86/kvm/vmx/hyperv.c | 17 +++++++++++++++++ arch/x86/kvm/vmx/hyperv.h | 1 + arch/x86/kvm/vmx/nested.c | 20 ++++++++++++++++++++ 4 files changed, 47 insertions(+) commit 046f5756c49106471bc98bd32b87a62d0717ddda Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:03 2022 +0100 KVM: nVMX: hyper-v: Cache VP assist page in 'struct kvm_vcpu_hv' In preparation to enabling L2 TLB flush, cache VP assist page in 'struct kvm_vcpu_hv'. While on it, rename nested_enlightened_vmentry() to nested_get_evmptr() and make it return eVMCS GPA directly. No functional change intended. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-26-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/hyperv.c | 10 ++++++---- arch/x86/kvm/hyperv.h | 3 +-- arch/x86/kvm/vmx/hyperv.c | 21 +++++++-------------- arch/x86/kvm/vmx/hyperv.h | 2 +- arch/x86/kvm/vmx/nested.c | 6 +++--- 6 files changed, 20 insertions(+), 24 deletions(-) commit d4baf1a9a572910d7b4cd63d23bf4be89b7648bd Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:02 2022 +0100 KVM: x86: hyper-v: Introduce fast guest_hv_cpuid_has_l2_tlb_flush() check Introduce a helper to quickly check if KVM needs to handle VMCALL/VMMCALL from L2 in L0 to process L2 TLB flush requests. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-25-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit c58a318f6090efe06e6702b8882e2026f44f620e Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:01 2022 +0100 KVM: x86: hyper-v: L2 TLB flush Handle L2 TLB flush requests by going through all vCPUs and checking whether there are vCPUs running the same VM_ID with a VP_ID specified in the requests. Perform synthetic exit to L2 upon finish. Note, while checking VM_ID/VP_ID of running vCPUs seem to be a bit racy, we count on the fact that KVM flushes the whole L2 VPID upon transition. Also, KVM_REQ_HV_TLB_FLUSH request needs to be done upon transition between L1 and L2 to make sure all pending requests are always processed. For the reference, Hyper-V TLFS refers to the feature as "Direct Virtual Flush". Note, nVMX/nSVM code does not handle VMCALL/VMMCALL from L2 yet. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-24-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 80 ++++++++++++++++++++++++++++++++++++++++++--------- arch/x86/kvm/hyperv.h | 3 -- arch/x86/kvm/trace.h | 21 ++++++++------ 3 files changed, 80 insertions(+), 24 deletions(-) commit 3c9eb0655fc03fb5e84f1db334ebc832d9c5ac31 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:54:00 2022 +0100 KVM: x86: hyper-v: Introduce kvm_hv_is_tlb_flush_hcall() The newly introduced helper checks whether vCPU is performing a Hyper-V TLB flush hypercall. This is required to filter out L2 TLB flush hypercalls for processing. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-23-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit b0c9c25e46252a576a974dd659f2396774e0dbb1 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:59 2022 +0100 KVM: x86: Introduce .hv_inject_synthetic_vmexit_post_tlb_flush() nested hook Hyper-V supports injecting synthetic L2->L1 exit after performing L2 TLB flush operation but the procedure is vendor specific. Introduce .hv_inject_synthetic_vmexit_post_tlb_flush nested hook for it. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-22-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/Makefile | 3 ++- arch/x86/kvm/svm/hyperv.c | 11 +++++++++++ arch/x86/kvm/svm/hyperv.h | 2 ++ arch/x86/kvm/svm/nested.c | 1 + arch/x86/kvm/vmx/hyperv.c | 4 ++++ arch/x86/kvm/vmx/hyperv.h | 1 + arch/x86/kvm/vmx/nested.c | 1 + 8 files changed, 23 insertions(+), 1 deletion(-) commit e45aa2444d280747d27d4d98685d761125c4e364 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:58 2022 +0100 KVM: nSVM: Keep track of Hyper-V hv_vm_id/hv_vp_id Similar to nSVM, KVM needs to know L2's VM_ID/VP_ID and Partition assist page address to handle L2 TLB flush requests. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-21-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/hyperv.h | 15 +++++++++++++++ arch/x86/kvm/svm/nested.c | 2 ++ 2 files changed, 17 insertions(+) commit 38edb45231832ef2aa191e2f3f77e30ad0bb4b61 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:57 2022 +0100 KVM: nVMX: Keep track of hv_vm_id/hv_vp_id when eVMCS is in use To handle L2 TLB flush requests, KVM needs to keep track of L2's VM_ID/ VP_IDs which are set by L1 hypervisor. 'Partition assist page' address is also needed to handle post-flush exit to L1 upon request. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-20-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 6 ++++++ arch/x86/kvm/vmx/nested.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) commit 7d5e88d301f84a7b64602dbe3640f288223095ea Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:56 2022 +0100 KVM: x86: hyper-v: Use preallocated buffer in 'struct kvm_vcpu_hv' instead of on-stack 'sparse_banks' To make kvm_hv_flush_tlb() ready to handle L2 TLB flush requests, KVM needs to allow for all 64 sparse vCPU banks regardless of KVM_MAX_VCPUs as L1 may use vCPU overcommit for L2. To avoid growing on-stack allocation, make 'sparse_banks' part of per-vCPU 'struct kvm_vcpu_hv' which is allocated dynamically. Note: sparse_set_to_vcpu_mask() can't currently be used to handle L2 requests as KVM does not keep L2 VM_ID -> L2 VCPU_ID -> L1 vCPU mappings, i.e. its vp_bitmap array is still bounded by the number of L1 vCPUs and so can remain an on-stack allocation. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-19-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 3 +++ arch/x86/kvm/hyperv.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 53ca765a041d5a24650d3f01bced791be5d72df7 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:55 2022 +0100 KVM: x86: hyper-v: Create a separate fifo for L2 TLB flush To handle L2 TLB flush requests, KVM needs to use a separate fifo from regular (L1) Hyper-V TLB flush requests: e.g. when a request to flush something in L2 is made, the target vCPU can transition from L2 to L1, receive a request to flush a GVA for L1 and then try to enter L2 back. The first request needs to be processed at this point. Similarly, requests to flush GVAs in L1 must wait until L2 exits to L1. No functional change as KVM doesn't handle L2 TLB flush requests from L2 yet. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-18-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 8 +++++++- arch/x86/kvm/hyperv.c | 11 +++++++---- arch/x86/kvm/hyperv.h | 19 ++++++++++++++++--- 3 files changed, 30 insertions(+), 8 deletions(-) commit b6c2c22fa7012616b3039c9f559bf01195137b9d Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:54 2022 +0100 KVM: x86: hyper-v: Don't use sparse_set_to_vcpu_mask() in kvm_hv_send_ipi() Get rid of on-stack allocation of vcpu_mask and optimize kvm_hv_send_ipi() for a smaller number of vCPUs in the request. When Hyper-V TLB flush is in use, HvSendSyntheticClusterIpi{,Ex} calls are not commonly used to send IPIs to a large number of vCPUs (and are rarely used in general). Introduce hv_is_vp_in_sparse_set() to directly check if the specified VP_ID is present in sparse vCPU set. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-17-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) commit ca7372aca7f4b2f1b29a9941053999d224d1e7c7 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:53 2022 +0100 KVM: x86: hyper-v: Use HV_MAX_SPARSE_VCPU_BANKS/HV_VCPUS_PER_SPARSE_BANK instead of raw '64' It may not be clear from where the '64' limit for the maximum sparse bank number comes from, use HV_MAX_SPARSE_VCPU_BANKS define instead. Use HV_VCPUS_PER_SPARSE_BANK in KVM_HV_MAX_SPARSE_VCPU_SET_BITS's definition. Opportunistically adjust the comment around BUILD_BUG_ON(). No functional change. Suggested-by: Sean Christopherson Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-16-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit bd19c94a19b09b563a20862c651859f6e3d73847 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:52 2022 +0100 x86/hyperv: Introduce HV_MAX_SPARSE_VCPU_BANKS/HV_VCPUS_PER_SPARSE_BANK constants It may not come clear from where the magical '64' value used in __cpumask_to_vpset() come from. Moreover, '64' means both the maximum sparse bank number as well as the number of vCPUs per bank. Add defines to make things clear. These defines are also going to be used by KVM. No functional change. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-15-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini include/asm-generic/hyperv-tlfs.h | 5 +++++ include/asm-generic/mshyperv.h | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) commit aee738236dca0d0870789138ec494e15d6303566 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:51 2022 +0100 KVM: x86: Prepare kvm_hv_flush_tlb() to handle L2's GPAs To handle L2 TLB flush requests, KVM needs to translate the specified L2 GPA to L1 GPA to read hypercall arguments from there. No functional change as KVM doesn't handle VMCALL/VMMCALL from L2 yet. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-14-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f84fcb66568c0b00626f7f03e28db7d0dcba8098 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:50 2022 +0100 KVM: x86: hyper-v: Expose support for extended gva ranges for flush hypercalls Extended GVA ranges support bit seems to indicate whether lower 12 bits of GVA can be used to specify up to 4095 additional consequent GVAs to flush. This is somewhat described in TLFS. Previously, KVM was handling HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST{,EX} requests by flushing the whole VPID so technically, extended GVA ranges were already supported. As such requests are handled more gently now, advertizing support for extended ranges starts making sense to reduce the size of TLB flush requests. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-13-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/hyperv-tlfs.h | 2 ++ arch/x86/kvm/hyperv.c | 1 + 2 files changed, 3 insertions(+) commit 260970862c88b4130e9e12be023c7e2c2d37a966 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:49 2022 +0100 KVM: x86: hyper-v: Handle HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST{,EX} calls gently Currently, HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST{,EX} calls are handled the exact same way as HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE{,EX}: by flushing the whole VPID and this is sub-optimal. Switch to handling these requests with 'flush_tlb_gva()' hooks instead. Use the newly introduced TLB flush fifo to queue the requests. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-12-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 111 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 95 insertions(+), 16 deletions(-) commit 56b5354fd8f9173de2e1614864e5fb7bec8c50c4 Author: Sean Christopherson Date: Tue Nov 1 15:53:48 2022 +0100 KVM: x86: hyper-v: Add helper to read hypercall data for array Move the guts of kvm_get_sparse_vp_set() to a helper so that the code for reading a guest-provided array can be reused in the future, e.g. for getting a list of virtual addresses whose TLB entries need to be flushed. Opportunisticaly swap the order of the data and XMM adjustment so that the XMM/gpa offsets are bundled together. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-11-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 53 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 20 deletions(-) commit 0823570f01989d3703751f66534a138d4fae062e Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:47 2022 +0100 KVM: x86: hyper-v: Introduce TLB flush fifo To allow flushing individual GVAs instead of always flushing the whole VPID a per-vCPU structure to pass the requests is needed. Use standard 'kfifo' to queue two types of entries: individual GVA (GFN + up to 4095 following GFNs in the lower 12 bits) and 'flush all'. The size of the fifo is arbitrarily set to '16'. Note, kvm_hv_flush_tlb() only queues 'flush all' entries for now and kvm_hv_vcpu_flush_tlb() doesn't actually read the fifo just resets the queue before returning -EOPNOTSUPP (which triggers full TLB flush) so the functional change is very small but the infrastructure is prepared to handle individual GVA flush requests. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-10-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 20 ++++++++++++++++++ arch/x86/kvm/hyperv.c | 47 +++++++++++++++++++++++++++++++++++++++++ arch/x86/kvm/hyperv.h | 15 +++++++++++++ arch/x86/kvm/svm/svm.c | 2 +- arch/x86/kvm/x86.c | 11 ++++++++-- 5 files changed, 92 insertions(+), 3 deletions(-) commit adc43caa0a25746e1a9dabbab241abd01120dbfe Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:46 2022 +0100 KVM: x86: hyper-v: Resurrect dedicated KVM_REQ_HV_TLB_FLUSH flag In preparation to implementing fine-grained Hyper-V TLB flush and L2 TLB flush, resurrect dedicated KVM_REQ_HV_TLB_FLUSH request bit. As KVM_REQ_TLB_FLUSH_GUEST is a stronger operation, clear KVM_REQ_HV_TLB_FLUSH request in kvm_vcpu_flush_tlb_guest(). The flush itself is temporary handled by kvm_vcpu_flush_tlb_guest(). No functional change intended. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-9-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/hyperv.c | 4 ++-- arch/x86/kvm/svm/svm.c | 7 +++++++ arch/x86/kvm/x86.c | 9 +++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) commit e94cea0930195adee67c93140ad9f95e430b2be8 Author: Sean Christopherson Date: Tue Nov 1 15:53:45 2022 +0100 KVM: x86: Move clearing of TLB_FLUSH_CURRENT to kvm_vcpu_flush_tlb_all() Clear KVM_REQ_TLB_FLUSH_CURRENT in kvm_vcpu_flush_tlb_all() instead of in its sole caller that processes KVM_REQ_TLB_FLUSH. Regardless of why/when kvm_vcpu_flush_tlb_all() is called, flushing "all" TLB entries also flushes "current" TLB entries. Ideally, there will never be another caller of kvm_vcpu_flush_tlb_all(), and moving the handling "requires" extra work to document the ordering requirement, but future Hyper-V paravirt TLB flushing support will add similar logic for flush "guest" (Hyper-V can flush a subset of "guest" entries). And in the Hyper-V case, KVM needs to do more than just clear the request, the queue of GPAs to flush also needs to purged, and doing all only in the request path is undesirable as kvm_vcpu_flush_tlb_guest() does have multiple callers (though it's unlikely KVM's paravirt TLB flush will coincide with Hyper-V's paravirt TLB flush). Move the logic even though it adds extra "work" so that KVM will be consistent with how flush requests are processed when the Hyper-V support lands. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-8-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit a789aeba419647c44d7e7320de20fea037c211d0 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:44 2022 +0100 KVM: VMX: Rename "vmx/evmcs.{ch}" to "vmx/hyperv.{ch}" To conform with SVM, rename VMX specific Hyper-V files from "evmcs.{ch}" to "hyperv.{ch}". While Enlightened VMCS is a lion's share of these files, some stuff (e.g. enlightened MSR bitmap, the upcoming Hyper-V L2 TLB flush, ...) goes beyond that. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-7-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/Makefile | 2 +- arch/x86/kvm/vmx/{evmcs.c => hyperv.c} | 3 +-- arch/x86/kvm/vmx/{evmcs.h => hyperv.h} | 8 +++++--- arch/x86/kvm/vmx/nested.c | 1 - arch/x86/kvm/vmx/vmx.c | 1 - arch/x86/kvm/vmx/vmx_ops.h | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) commit b83237ad2167a0f9a43b909adb42623941b741b8 Author: Vitaly Kuznetsov Date: Tue Nov 1 15:53:43 2022 +0100 KVM: x86: Rename 'enable_direct_tlbflush' to 'enable_l2_tlb_flush' To make terminology between Hyper-V-on-KVM and KVM-on-Hyper-V consistent, rename 'enable_direct_tlbflush' to 'enable_l2_tlb_flush'. The change eliminates the use of confusing 'direct' and adds the missing underscore. No functional change. Reviewed-by: Maxim Levitsky Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-6-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm-x86-ops.h | 2 +- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/svm/svm_onhyperv.c | 2 +- arch/x86/kvm/svm/svm_onhyperv.h | 6 +++--- arch/x86/kvm/vmx/vmx.c | 6 +++--- arch/x86/kvm/x86.c | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) commit 26b516bb39215cf60aa1fb55d0a6fd73058698fa Author: Sean Christopherson Date: Tue Nov 1 15:53:42 2022 +0100 x86/hyperv: KVM: Rename "hv_enlightenments" to "hv_vmcb_enlightenments" Now that KVM isn't littered with "struct hv_enlightenments" casts, rename the struct to "hv_vmcb_enlightenments" to highlight the fact that the struct is specifically for SVM's VMCB. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Michael Kelley Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-5-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/hyperv-tlfs.h | 2 +- arch/x86/include/asm/svm.h | 2 +- arch/x86/kvm/svm/nested.c | 2 +- arch/x86/kvm/svm/svm.h | 2 +- arch/x86/kvm/svm/svm_onhyperv.c | 2 +- arch/x86/kvm/svm/svm_onhyperv.h | 6 +++--- tools/testing/selftests/kvm/include/x86_64/svm.h | 4 ++-- tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) commit 68ae7c7bc56a4504ed5efde7c2f8d6024148a35e Author: Sean Christopherson Date: Tue Nov 1 15:53:41 2022 +0100 KVM: SVM: Add a proper field for Hyper-V VMCB enlightenments Add a union to provide hv_enlightenments side-by-side with the sw_reserved bytes that Hyper-V's enlightenments overlay. Casting sw_reserved everywhere is messy, confusing, and unnecessarily unsafe. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/svm.h | 7 ++++++- arch/x86/kvm/svm/nested.c | 9 ++++----- arch/x86/kvm/svm/svm.h | 5 ++++- arch/x86/kvm/svm/svm_onhyperv.c | 2 +- arch/x86/kvm/svm/svm_onhyperv.h | 15 +++++++-------- tools/testing/selftests/kvm/include/x86_64/svm.h | 5 ++++- tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c | 3 +-- 7 files changed, 27 insertions(+), 19 deletions(-) commit 381fc63ac0754e05d3921e9d399b89dfdfd2b2e5 Author: Sean Christopherson Date: Tue Nov 1 15:53:40 2022 +0100 KVM: selftests: Move "struct hv_enlightenments" to x86_64/svm.h Move Hyper-V's VMCB "struct hv_enlightenments" to the svm.h header so that the struct can be referenced in "struct vmcb_control_area". Alternatively, a dedicated header for SVM+Hyper-V could be added, a la x86_64/evmcs.h, but it doesn't appear that Hyper-V will end up needing a wholesale replacement for the VMCB. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/x86_64/svm.h | 17 +++++++++++++++++ tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c | 18 ------------------ 2 files changed, 17 insertions(+), 18 deletions(-) commit 089fe572a2e0a89e36a455d299d801770293d08f Author: Sean Christopherson Date: Tue Nov 1 15:53:39 2022 +0100 x86/hyperv: Move VMCB enlightenment definitions to hyperv-tlfs.h Move Hyper-V's VMCB enlightenment definitions to the TLFS header; the definitions come directly from the TLFS[*], not from KVM. No functional change intended. [*] https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_svm_enlightened_vmcb_fields [vitaly: rename VMCB_HV_ -> HV_VMCB_ to match the rest of hyperv-tlfs.h, keep svm/hyperv.h] Signed-off-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20221101145426.251680-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/hyperv-tlfs.h | 22 ++++++++++++++++++++++ arch/x86/kvm/svm/hyperv.h | 22 ---------------------- arch/x86/kvm/svm/nested.c | 2 +- arch/x86/kvm/svm/svm_onhyperv.c | 2 +- arch/x86/kvm/svm/svm_onhyperv.h | 4 ++-- .../testing/selftests/kvm/x86_64/hyperv_svm_test.c | 6 +++--- 6 files changed, 29 insertions(+), 29 deletions(-) commit ec35c41d91052a3a15dd3767075620af448b8030 Author: Radhakrishna Sripada Date: Thu Nov 17 13:30:14 2022 -0800 drm/i915/mtl: Fix dram info readout MEM_SS_INFO_GLOBAL Register info read from the hardware is cached in val. However the variable is being modified when determining the DRAM type thereby clearing out the channels and qgv info extracted later in the function xelpdp_get_dram_info. Preserve the register value and use extracted fields in the switch statement. Fixes: 825477e77912 ("drm/i915/mtl: Obtain SAGV values from MMIO instead of GT pcode mailbox") Cc: Matt Roper Signed-off-by: Radhakrishna Sripada Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221117213015.584417-1-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/intel_dram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0ad811cc08a937d875cbad0149c1bab17f84ba05 Author: Nathan Chancellor Date: Wed Nov 2 08:56:23 2022 -0700 drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/gpu/drm/sti/sti_hda.c:637:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)' with an expression of type 'int (struct drm_connector *, struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict] .mode_valid = sti_hda_connector_mode_valid, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/sti/sti_dvo.c:376:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)' with an expression of type 'int (struct drm_connector *, struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict] .mode_valid = sti_dvo_connector_mode_valid, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/sti/sti_hdmi.c:1035:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)' with an expression of type 'int (struct drm_connector *, struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict] .mode_valid = sti_hdmi_connector_mode_valid, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ->mode_valid() in 'struct drm_connector_helper_funcs' expects a return type of 'enum drm_mode_status', not 'int'. Adjust the return type of sti_{dvo,hda,hdmi}_connector_mode_valid() to match the prototype's to resolve the warning and CFI failure. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221102155623.3042869-1-nathan@kernel.org drivers/gpu/drm/sti/sti_dvo.c | 5 +++-- drivers/gpu/drm/sti/sti_hda.c | 5 +++-- drivers/gpu/drm/sti/sti_hdmi.c | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) commit 96d845a67b7e406cfed7880a724c8ca6121e022e Author: Nathan Chancellor Date: Wed Nov 2 08:42:15 2022 -0700 drm/fsl-dcu: Fix return type of fsl_dcu_drm_connector_mode_valid() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c:74:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)' with an expression of type 'int (struct drm_connector *, struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict] .mode_valid = fsl_dcu_drm_connector_mode_valid, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ->mode_valid() in 'struct drm_connector_helper_funcs' expects a return type of 'enum drm_mode_status', not 'int'. Adjust the return type of fsl_dcu_drm_connector_mode_valid() to match the prototype's to resolve the warning and CFI failure. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Reported-by: Sami Tolvanen Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221102154215.78059-1-nathan@kernel.org drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 74c8e6bffbe10c4470139496f930c0b0752c85c9 Author: Kees Cook Date: Sat Oct 29 00:47:34 2022 -0700 driver core: Add __alloc_size hint to devm allocators Mark the devm_*alloc()-family of allocations with appropriate __alloc_size()/__realloc_size() hints so the compiler can attempt to reason about buffer lengths from allocations. Cc: Greg Kroah-Hartman Cc: Rasmus Villemoes Cc: Thomas Gleixner Cc: Jason Gunthorpe Cc: Nishanth Menon Cc: Michael Kelley Cc: Dan Williams Cc: Won Chung Signed-off-by: Kees Cook Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20221029074734.gonna.276-kees@kernel.org include/linux/device.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 31354121bf03dac6498a4236928a38490745d601 Author: Dinh Nguyen Date: Thu Sep 15 20:45:37 2022 -0500 arm64: dts: socfpga: Add clk-phase-sd-hs property to the sdmmc node The sdmmc controller's CIU(Card Interface Unit) clock's phase can be adjusted through the register in the system manager. Add the binding "altr,sysmgr-syscon" to the SDMMC node for the driver to access the system manager. Add the "clk-phase-sd-hs" property in the SDMMC node to designate the smpsel and drvsel properties for the CIU clock. Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 1 + arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts | 1 + arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 1 + arch/arm64/boot/dts/intel/socfpga_agilex_socdk.dts | 1 + arch/arm64/boot/dts/intel/socfpga_n5x_socdk.dts | 1 + 5 files changed, 5 insertions(+) commit 3b500ff37ce3ef5d7fbb731d082ef8f4cddce0f1 Author: Dinh Nguyen Date: Mon Oct 3 13:26:50 2022 -0500 arm: dts: socfpga: Add clk-phase-sd-hs property to the sdmmc node The sdmmc controller's CIU(Card Interface Unit) clock's phase can be adjusted through the register in the system manager. Add the binding "altr,sysmgr-syscon" to the SDMMC node for the driver to access the system manager. Add the "clk-phase-sd-hs" property in the SDMMC node to designate the smpsel and drvsel properties for the CIU clock. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 1 + arch/arm/boot/dts/socfpga_arria10.dtsi | 1 + arch/arm/boot/dts/socfpga_arria10_mercury_aa1.dtsi | 1 + arch/arm/boot/dts/socfpga_arria10_socdk_sdmmc.dts | 1 + arch/arm/boot/dts/socfpga_arria5.dtsi | 1 + arch/arm/boot/dts/socfpga_cyclone5.dtsi | 1 + arch/arm/boot/dts/socfpga_cyclone5_mcv.dtsi | 1 + 7 files changed, 7 insertions(+) commit 63fb606a59a4e51572b2f34589b4afd00536f185 Author: Dinh Nguyen Date: Tue Oct 4 12:53:28 2022 -0500 arm: dts: socfpga: remove "clk-phase" in sdmmc_clk Now that the SDMMC driver can use the "clk-phase-sd-hs" binding, we don't need the clk-phase in the sdmmc_clk anymore. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 1 - arch/arm/boot/dts/socfpga_arria10.dtsi | 1 - 2 files changed, 2 deletions(-) commit 2dbf5494ceec6b70388e16550426a8e65945776b Author: Dinh Nguyen Date: Thu Oct 20 12:44:21 2022 -0500 arm: dts: socfpga: align mmc node names with dtschema dwmmc0@ff704000: $nodename:0: 'dwmmc0@ff704000' does not match '^mmc(@.*)?$' Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 2 +- arch/arm/boot/dts/socfpga_arria10.dtsi | 2 +- arch/arm/boot/dts/socfpga_arria5.dtsi | 2 +- arch/arm/boot/dts/socfpga_cyclone5.dtsi | 2 +- arch/arm/boot/dts/socfpga_vt.dts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 44ecda71fd8a70185c270f5914ac563827fe1d4c Author: Anshuman Khandual Date: Wed Nov 16 19:39:15 2022 +0530 arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption If a Cortex-A715 cpu sees a page mapping permissions change from executable to non-executable, it may corrupt the ESR_ELx and FAR_ELx registers, on the next instruction abort caused by permission fault. Only user-space does executable to non-executable permission transition via mprotect() system call which calls ptep_modify_prot_start() and ptep_modify _prot_commit() helpers, while changing the page mapping. The platform code can override these helpers via __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION. Work around the problem via doing a break-before-make TLB invalidation, for all executable user space mappings, that go through mprotect() system call. This overrides ptep_modify_prot_start() and ptep_modify_prot_commit(), via defining HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION on the platform thus giving an opportunity to intercept user space exec mappings, and do the necessary TLB invalidation. Similar interceptions are also implemented for HugeTLB. Cc: Catalin Marinas Cc: Will Deacon Cc: Jonathan Corbet Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20221116140915.356601-3-anshuman.khandual@arm.com Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.rst | 2 ++ arch/arm64/Kconfig | 16 ++++++++++++++++ arch/arm64/include/asm/hugetlb.h | 9 +++++++++ arch/arm64/include/asm/pgtable.h | 9 +++++++++ arch/arm64/kernel/cpu_errata.c | 7 +++++++ arch/arm64/mm/hugetlbpage.c | 21 +++++++++++++++++++++ arch/arm64/mm/mmu.c | 21 +++++++++++++++++++++ arch/arm64/tools/cpucaps | 1 + 8 files changed, 86 insertions(+) commit 07e39e60bbf0ccd5f895568e1afca032193705c0 Author: Anshuman Khandual Date: Wed Nov 16 19:39:14 2022 +0530 arm64: Add Cortex-715 CPU part definition Add the CPU Partnumbers for the new Arm designs. Cc: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose Cc: James Morse Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Acked-by: Catalin Marinas Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/20221116140915.356601-2-anshuman.khandual@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/cputype.h | 2 ++ 1 file changed, 2 insertions(+) commit dc73ac63e63ac1c0b8bd3d29cf0c17c98ea92146 Author: Matt Atwood Date: Thu Nov 17 13:41:32 2022 -0800 drm/i915/rpl-p: Add stepping info Add stepping-substepping info in accordance to bpsec changes. Bspec: 55376 Cc: Anusha Srivatsa Signed-off-by: Matt Atwood Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221117214132.152061-1-matthew.s.atwood@intel.com drivers/gpu/drm/i915/intel_step.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6c7b2202e4d11572ab23a89aeec49005b94bb966 Author: Paolo Bonzini Date: Thu Nov 17 12:25:02 2022 -0500 KVM: x86: avoid memslot check in NX hugepage recovery if it cannot succeed Since gfn_to_memslot() is relatively expensive, it helps to skip it if it the memslot cannot possibly have dirty logging enabled. In order to do this, add to struct kvm a counter of the number of log-page memslots. While the correct value can only be read with slots_lock taken, the NX recovery thread is content with using an approximate value. Therefore, the counter is an atomic_t. Based on https://lore.kernel.org/kvm/20221027200316.2221027-2-dmatlack@google.com/ by David Matlack. Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 22 +++++++++++++++++++--- include/linux/kvm_host.h | 5 +++++ virt/kvm/kvm_main.c | 8 ++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) commit fa8eec59570923f4132253e61c45f9d70377f049 Author: Yoshihiro Shimoda Date: Fri Nov 18 21:09:53 2022 +0900 arm64: defconfig: Enable Renesas R-Car S4-8 Spider Ethernet devices Enable Renesas "Ethernet Switch", Ethernet SERDES and Marvell 10G PHY drivers to be used by NFS root on the Renesas Spider board. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221118120953.1186392-4-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/configs/defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit db6f6ba74ea237356564a06882adf6e95d6cf3e1 Merge: bc64f30eb9a5 27b9ecc7a9ba Author: Mark Brown Date: Fri Nov 18 16:11:05 2022 +0000 regulator: Add of_regulator_bulk_get_all() Merge series from Corentin Labbe : This adds a new regulator_bulk_get_all() which grab all supplies properties in a DT node, for use in implementing generic handling for things like MDIO PHYs where the physical standardisation of the bus does not extend to power supplies. commit 884af88b756ccb57ed7cb6241c1fbd1080732124 Author: Yoshihiro Shimoda Date: Fri Nov 18 21:09:52 2022 +0900 arm64: dts: renesas: spider-ethernet: Enable Ethernet Switch and SERDES Enable Ethernet Switch and SERDES for R-Car S4-8 (r8a779f0). Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221118120953.1186392-3-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven .../boot/dts/renesas/r8a779f0-spider-ethernet.dtsi | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit 387e16cbee4c56b3a88025a45998a624ab13eaa9 Author: Yoshihiro Shimoda Date: Fri Nov 18 21:09:51 2022 +0900 arm64: dts: renesas: r8a779f0: Add Ethernet Switch and SERDES nodes Add Ethernet Switch and SERDES nodes into R-Car S4-8 (r8a779f0). Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221118120953.1186392-2-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 110 ++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) commit c7eb967d70446971413061effca3226578cb4dab Author: Cezary Rojewski Date: Thu Oct 27 10:58:40 2022 +0200 ASoC: core: Exit all links before removing their components Flows leading to link->init() and link->exit() are not symmetric. Currently the relevant part of card probe sequence goes as: for_each_card_rtds(card, rtd) for_each_rtd_components(rtd, i, component) component->probe() for_each_card_rtds(card, rtd) for_each_rtd_dais(rtd, i, dai) dai->probe() for_each_card_rtds(card, rtd) rtd->init() On the other side, equivalent remove sequence goes as: for_each_card_rtds(card, rtd) for_each_rtd_dais(rtd, i, dai) dai->remove() for_each_card_rtds(card, rtd) for_each_rtd_components(rtd, i, component) component->remove() for_each_card_rtds(card, rtd) rtd->exit() what can lead to errors as link->exit() may still operate on resources owned by its components despite the probability of them being freed during the component->remove(). This change modifies the remove sequence to: for_each_card_rtds(card, rtd) rtd->exit() for_each_card_rtds(card, rtd) for_each_rtd_dais(rtd, i, dai) dai->remove() for_each_card_rtds(card, rtd) for_each_rtd_components(rtd, i, component) component->remove() so code found in link->exit() is safe to touch any component stuff as component->remove() has not been called yet. Signed-off-by: Cezary Rojewski Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20221027085840.1562698-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/soc-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b2d5025e129289d9b914c696646e64495a7453c0 Author: Sudeep Holla Date: Fri Nov 18 15:10:17 2022 +0000 arm64: dts: fvp: Add information about L1 and L2 caches Add the information about L1 and L2 caches on FVP RevC platform. Though the cache size is configurable through the model parameters, having default values in the device tree helps to exercise and debug any code utilising the cache information without the need of real hardware. Link: https://lore.kernel.org/r/20221118151017.704716-1-sudeep.holla@arm.com Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/fvp-base-revc.dts | 73 +++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 1acefaca782a32731fdd03d004e492a3fd2857c7 Author: Imre Deak Date: Mon Nov 14 14:22:51 2022 +0200 drm/i915/mtl+: Don't enable the AUX_IO power for non-eDP port main links MTL+ requires the AUX_IO power for the main link only on eDP, so don't enable it in other cases. v2: - Rebased on checking intel_encoder_can_psr() instead of crtc->has_psr. Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114122251.21327-10-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 637c7aa261acd820252b1fb99c03e41e86c68fb5 Author: Imre Deak Date: Mon Nov 14 14:22:50 2022 +0200 drm/i915: Factor out function to get/put AUX_IO power for main link Factor out functions to get/put the AUX_IO power domain for the main link on DDI ports. While at it clarify the corresponding code comment. No functional change. v2: - s/(get/put)_aux_power_for_main_link/main_link_aux_power_domain_(get/put) (Jani) - Clarify in the code comment that AUX_IO is needed only by TypeC besides eDP/PSR. v3: - Rebased on checking intel_encoder_can_psr() instead of crtc->has_psr. v4: - Don't call fetch_and_zero() with side-effect during variable declaration. (Ville) Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114122251.21327-9-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 85 +++++++++++++++++++------------- 1 file changed, 52 insertions(+), 33 deletions(-) commit 406a95df61a87813f065f4a6f1fb570834a8db4d Author: Imre Deak Date: Mon Nov 14 14:22:49 2022 +0200 drm/i915: Add missing DC_OFF power domain->well mappings Add the missing DC_OFF power domain -> DC_OFF power well mappings on all platforms. This didn't cause a problem as the DC_OFF power domain is only used on JSL, where the mapping was already correct. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114122251.21327-8-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_display_power_map.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ab04edc5a20d4c71789bcd7e1dd992e29dd8b6b1 Author: Imre Deak Date: Mon Nov 14 14:22:48 2022 +0200 drm/i915: Add missing AUX_IO_A power domain->well mappings BXT and GLK were missing the AUX_IO_A power domain -> PHY A common power well mapping, add these now. This didn't cause a problem as the AUX_IO_A and DDI_LANES_A power domains are acquired together. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114122251.21327-7-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_display_power_map.c | 2 ++ 1 file changed, 2 insertions(+) commit f645cbda12b80929d4f479fe33fff179fc1f7796 Author: Imre Deak Date: Mon Nov 14 14:22:47 2022 +0200 drm/i915/tgl+: Enable display DC power states on all eDP ports Starting with TGL eDP is supported on ports B+ (besides port A), so make sure DC states are not blocked on any such ports. For this add an AUX_IO_ power domain for each port with eDP support. These domains similarly to AUX_IO_A enable only the AUX_IO_ power well for an enabled port, whereas the existing AUX_ domains enable both the AUX_IO_ and the DC_OFF power wells as required by DP AUX transfers. v2: (Ville) - Split the change using AUX vs. AUX_IO on port A to a separate patch. - Select AUX_IO vs. AUX based on crtc_state->has_psr instead of is_edp(). v3: - Rebased on checking intel_encoder_can_psr() instead of crtc->has_psr. v4: - Fix warn in intel_display_power_aux_io_domain(). (Ville) Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114122251.21327-6-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 6 ++- drivers/gpu/drm/i915/display/intel_display_power.c | 30 ++++++++++++ drivers/gpu/drm/i915/display/intel_display_power.h | 7 +++ .../gpu/drm/i915/display/intel_display_power_map.c | 53 ++++++++++++++++++++-- 4 files changed, 89 insertions(+), 7 deletions(-) commit b2e00dd378eed5274a043f6cdfd4f8e2731bb6b5 Author: Imre Deak Date: Mon Nov 14 14:22:46 2022 +0200 drm/i915: Use the AUX_IO power domain only for eDP/PSR port Use the AUX_IO_A display power domain only for eDP on port A where PSR is also supported. This is the case where DC states need to be enabled while the output is enabled - ensured by AUX_IO_A domain not enabling the DC_OFF power well. Otherwise port A can be treated the same way as other ports with an external DP output: using the AUX_ domain which disables the unrequired DC states. This change prepares for the next patch enabling DC states on all ports supporting eDP/PSR besides port A. v2: - Check the encoder PSR capability instead of PSR being enabled in the crtc_state, as the latter can be changed with a fastset. Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114122251.21327-5-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5c30cfcd4020963502d318ab76599fbbbdf307a6 Author: Imre Deak Date: Mon Nov 14 14:22:45 2022 +0200 drm/i915: Move the POWER_DOMAIN_AUX_IO_A definition to its logical place Move the definition of the AUX_IO_A power domain, requiring only the corresponding AUX_IO_A power well to be enabled, before all the AUX_ power domains, which require both the AUX_IO_ and the DC_OFF power wells to be enabled. No functional change. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114122251.21327-4-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_display_power.c | 4 ++-- drivers/gpu/drm/i915/display/intel_display_power.h | 5 +++-- drivers/gpu/drm/i915/display/intel_display_power_map.c | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) commit 7ed310025e75826f74f6b3587047118e7176b409 Author: Imre Deak Date: Mon Nov 14 14:22:44 2022 +0200 drm/i915: Preallocate the debug power domain wakerefs array Since the current size of intel_display_power_domain_set struct is close to 1kB, it's better to use preallocated memory for it. The only user of the intel_display_power_get/put_in_set() allocating the struct on stack is hsw_get_pipe_config(), so we can avoid potential stack overallocations by moving the struct here to the preallocated intel_crtc struct (hsw_get_pipe_config() is non-reentrant wrt. each CRTC). This patch replaces https://lore.kernel.org/intel-gfx/20221107170917.3566758-5-imre.deak@intel.com/T/#md3f6cdf17fcd Suggested-by: Ville Syrjälä Cc: Ville Syrjälä Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114122251.21327-3-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_display.c | 11 +++++------ drivers/gpu/drm/i915/display/intel_display_types.h | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) commit 10b85f0e1d922210ae857afed6d012ec32c4b6cb Author: Imre Deak Date: Mon Nov 14 14:22:43 2022 +0200 drm/i915: Fix warn in intel_display_power_*_domain() functions The intel_display_power_*_domain() functions should always warn if a default domain is returned as a fallback, fix this up. Spotted by Ville. Fixes: 979e1b32e0e2 ("drm/i915: Sanitize the port -> DDI/AUX power domain mapping for each platform") Cc: Ville Syrjälä Cc: Jouni Högander Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114122251.21327-2-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_display_power.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4c8bcfd3e1c30edbf252529f7189da87d169f1dd Merge: 041fe8858475 abc7edb0329c Author: Mark Brown Date: Fri Nov 18 15:13:50 2022 +0000 ASoC: mchp-spdiftx: add power saving features Merge series from Claudiu Beznea : This series adds support for runtime PM and system suspend/resume for Microchip SPDIFTX (patches 2/3, 3/3). Along with it I took the chance and added a minor cleanup (patch 1/3). commit 27b9ecc7a9ba1d0014779bfe5a6dbf630899c6e7 Author: Corentin Labbe Date: Tue Nov 15 07:36:01 2022 +0000 regulator: Add of_regulator_bulk_get_all It work exactly like regulator_bulk_get() but instead of working on a provided list of names, it seek all consumers properties matching xxx-supply. Signed-off-by: Corentin Labbe Link: https://lore.kernel.org/r/20221115073603.3425396-2-clabbe@baylibre.com Signed-off-by: Mark Brown drivers/regulator/of_regulator.c | 92 ++++++++++++++++++++++++++++++++++++++ include/linux/regulator/consumer.h | 8 ++++ 2 files changed, 100 insertions(+) commit fc6836b3b142dd80fa6a1a2c2a3bde2b8095867d Author: Eugen Hristev Date: Mon Nov 7 16:18:18 2022 +0200 media: atmel: atmel-isc: move to staging The Atmel ISC driver is not compliant with media controller specification. In order to evolve this driver, it has to move to media controller, to support enhanced features and future products which embed it. The move to media controller involves several changes which are not backwards compatible with the current usability of the driver. The best example is the way the format is propagated from the top video driver /dev/videoX down to the sensor. In a simple configuration sensor ==> isc , the isc just calls subdev s_fmt and controls the sensor directly. This is achieved by having a lot of code inside the driver that will query the subdev at probe time and make a list of formats which are usable. Basically the user has nothing to configure, as the isc will handle everything at the top level. This is an easy way to capture, but also comes with the drawback of lack of flexibility. In a more complicated pipeline sensor ==> controller 1 ==> controller 2 ==> isc this will not be achievable, as controller 1 and controller 2 might be media-controller configurable, and will not propagate the formats down to the sensor. After discussions with the media maintainers, the decision is to move Atmel ISC to staging as-is, to keep the Kconfig symbols and the users to the driver in staging. Thus, all the existing users of the non media-controller paradigm will continue to be happy and use the old config way. The new driver was added in the media subsystem with a different symbol, with the conversion to media controller done, and new users of the driver will be able to use all the new features. This patch is merely a file move to staging, not affecting any of the users. The exported symbols had to be renamed to atmel_* to avoid duplication with the new Microchip ISC driver. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil MAINTAINERS | 4 +- drivers/media/platform/atmel/Kconfig | 36 ----------------- drivers/media/platform/atmel/Makefile | 6 --- drivers/staging/media/Kconfig | 1 + drivers/staging/media/Makefile | 1 + drivers/staging/media/deprecated/atmel/Kconfig | 47 ++++++++++++++++++++++ drivers/staging/media/deprecated/atmel/Makefile | 8 ++++ drivers/staging/media/deprecated/atmel/TODO | 34 ++++++++++++++++ .../media/deprecated}/atmel/atmel-isc-base.c | 20 ++++----- .../media/deprecated}/atmel/atmel-isc-clk.c | 8 ++-- .../media/deprecated}/atmel/atmel-isc-regs.h | 0 .../media/deprecated}/atmel/atmel-isc.h | 16 ++++---- .../media/deprecated}/atmel/atmel-sama5d2-isc.c | 18 ++++----- .../media/deprecated}/atmel/atmel-sama7g5-isc.c | 18 ++++----- 14 files changed, 133 insertions(+), 84 deletions(-) commit 05255605d378db23b20c0a54c0158ccda5a5d015 Author: Eugen Hristev Date: Mon Nov 7 16:18:17 2022 +0200 media: microchip: microchip-isc: move media_pipeline_* to (un)prepare cb Move the media_pipeline_start/stop calls from start/stop streaming to the new prepare_streaming and unprepare_streaming callbacks. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil .../media/platform/microchip/microchip-isc-base.c | 27 ++++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 86ff588c9ea47b92bfa99d6d1e466b2573baf51c Author: Eugen Hristev Date: Mon Nov 7 16:18:16 2022 +0200 media: microchip: microchip-isc: implement media controller As a top MC video driver, the microchip-isc should not propagate the format to the subdevice, it should rather check at start_streaming() time if the subdev is properly configured with a compatible format. Removed the whole format finding logic, and reworked the format verification at start_streaming time, such that the ISC will return an error if the subdevice is not properly configured. To achieve this, media_pipeline_start is called and a link_validate callback is created to check the formats. With this being done, the module parameter 'sensor_preferred' makes no sense anymore. The ISC should not decide which format the sensor is using. The ISC should only cope with the situation and inform userspace if the streaming is possible in the current configuration. The redesign of the format propagation has also risen the question of the enumfmt callback. If enumfmt is called with an mbus_code, the enumfmt handler should only return the formats that are supported for this mbus_code. Otherwise, the enumfmt will report all the formats that the ISC could output. With this rework, the dynamic list of user formats is removed. It makes no more sense to identify at complete time which formats the sensor could emit, and add those into a separate dynamic list. The ISC will start with a simple preconfigured default format, and at link validate time, decide whether it can use the format that is configured on the sink or not. From now on, the driver also advertises the IO_MC capability. Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil drivers/media/platform/microchip/Kconfig | 2 +- .../media/platform/microchip/microchip-isc-base.c | 416 +++++++++------------ .../platform/microchip/microchip-isc-scaler.c | 5 + drivers/media/platform/microchip/microchip-isc.h | 13 +- .../platform/microchip/microchip-sama5d2-isc.c | 20 + .../platform/microchip/microchip-sama7g5-isc.c | 20 + 6 files changed, 239 insertions(+), 237 deletions(-) commit de32105cbe3c6f334c3ddc5c493efeeb439764be Author: Eugen Hristev Date: Mon Nov 7 16:18:15 2022 +0200 media: microchip: microchip-isc: prepare for media controller support Prepare the support for media-controller. This means that the capabilities of the driver have changed and now it's capable of media controller operations. The driver will register its media device, and add the video entity to this media device. The subdevices are registered to the same media device. The ISC will have a base entity which is auto-detected as microchip_isc_base. It will also register a subdevice that allows cropping of the incoming frame to the maximum frame size supported by the ISC. The ISC will create a link between the subdevice that is asynchronously registered and the microchip_isc_scaler entity. Then, the microchip_isc_scaler and microchip_isc_base are connected through another link. This patch does not change the previous capability of the driver, the fact that the format is still being propagated from the top video node down to the sensor. Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil drivers/media/platform/microchip/Makefile | 2 +- .../media/platform/microchip/microchip-isc-base.c | 72 +++++- .../platform/microchip/microchip-isc-scaler.c | 262 +++++++++++++++++++++ drivers/media/platform/microchip/microchip-isc.h | 37 +++ .../platform/microchip/microchip-sama5d2-isc.c | 12 +- .../platform/microchip/microchip-sama7g5-isc.c | 12 +- 6 files changed, 391 insertions(+), 6 deletions(-) commit a5517d53d4a69b8e8c46befc7f905278e78c3459 Author: Eugen Hristev Date: Mon Nov 7 16:18:14 2022 +0200 media: microchip: add ISC driver as Microchip ISC The Atmel ISC driver will be moved to staging to support old users that are not using the media controller paradigm. The ISC driver was converted to media controller in the public patch series: https://lore.kernel.org/lkml/20220503095127.48710-1-eugen.hristev@microchip.com/T/#m2c320fa8153c01379a1c35b1d90a00903949513a However the conversion cannot be done directly as it would affect existing users by breaking the old way of configuration for sama5d2 platforms. After discussions with the media maintainers, the decision is to move Atmel ISC to staging as-is, to keep the Kconfig symbols and the users to the driver in staging. Thus, all the existing users of the non media-controller paradigm will continue to be happy and use the old config way. The converted driver would support both sama5d2 and sama7g5 platforms with media controller paradigm, but it requires userspace configuration of the pipeline for all the pipeline modules. In a simple configuration sensor ==> isc , the old isc driver used to call subdev s_fmt and control the sensor directly. This was achieved by having a lot of code inside the driver that was querying the subdev at probe time and made a list of formats which are usable. Basically the user had nothing to configure, as the isc would handle everything at the top level. This was an easy way to capture, but also came with the drawback of lack of flexibility. In a more complicated pipeline sensor ==> controller 1 ==> controller 2 ==> isc this would not be achievable, as controller 1 and controller 2 might be media-controller configurable, and will not propagate the formats down to the sensor. The new driver Microchip ISC would solve all these problems and exposes pads entities and links to userspace. For the ease of tracking, the patches that convert to media controller come on top of this patch that simply readds the driver to the new location under the new Kconfig symbols. To differentiate between the old driver and the new driver, I have renamed the new driver to Microchip ISC, renaming the Kconfig symbols as well, and all the mentions inside the driver. The only thing that remains common is the file include/linux/atmel-isc-media.h which is the ABI for the v4l2 custom controls that the ISC exposes. This file is used by both driver, so I kept it as-is. To further avoid confusion all files have been renamed and all functions named isc_* as well. The exported symbols have been renamed with added microchip_ prefix, to avoid symbol duplication with the old driver, and to avoid confusion. Other than that, I have fixed small checkpatch issues when readding the driver. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil MAINTAINERS | 2 + drivers/media/platform/microchip/Kconfig | 42 + drivers/media/platform/microchip/Makefile | 6 + .../media/platform/microchip/microchip-isc-base.c | 2011 ++++++++++++++++++++ .../media/platform/microchip/microchip-isc-clk.c | 311 +++ .../media/platform/microchip/microchip-isc-regs.h | 413 ++++ drivers/media/platform/microchip/microchip-isc.h | 362 ++++ .../platform/microchip/microchip-sama5d2-isc.c | 653 +++++++ .../platform/microchip/microchip-sama7g5-isc.c | 616 ++++++ 9 files changed, 4416 insertions(+) commit 5c0185625dabf39af1937b647957b112e9f8ae4e Author: Eugen Hristev Date: Mon Nov 7 16:18:13 2022 +0200 media: atmel: move microchip_csi2dc to dedicated microchip platform The Atmel ISC will be moved to staging thus the atmel platform will only have the ISI driver. The new media-controller converted ISC driver will be placed inside a dedicated microchip platform directory. It is then natural to have the microchip-csi2dc moved to this new platform directory. The next step is to add the Microchip ISC driver to the new platform directory and reside together with the Microchip CSI2DC driver. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil MAINTAINERS | 2 +- drivers/media/platform/Kconfig | 1 + drivers/media/platform/Makefile | 1 + drivers/media/platform/atmel/Kconfig | 15 --------------- drivers/media/platform/atmel/Makefile | 1 - drivers/media/platform/microchip/Kconfig | 19 +++++++++++++++++++ drivers/media/platform/microchip/Makefile | 3 +++ .../platform/{atmel => microchip}/microchip-csi2dc.c | 0 8 files changed, 25 insertions(+), 17 deletions(-) commit c4a7df49d8cb9e1e912aa15293a0e6aa1655d3cc Author: Hans Verkuil Date: Wed Jun 22 11:31:45 2022 +0200 vb2/au0828: move the v4l_vb2q_enable_media_source to the au0828 driver With the new prepare_streaming op it is possible to move the ugly v4l_vb2q_enable_media_source() call in vb2_core_streamon to the driver. It was called incorrectly in vb2 as well: it was only called if sufficient buffers were queued at STREAMON time, but not if more buffers were queued later. This was not an issue with the au0828 driver since it never set min_buffers_needed. Signed-off-by: Hans Verkuil drivers/media/common/videobuf2/videobuf2-core.c | 3 --- drivers/media/usb/au0828/au0828-vbi.c | 2 ++ drivers/media/usb/au0828/au0828-video.c | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) commit 36c6f1fb2ef769c36c417c8c1106439704eeb8c0 Author: Hans Verkuil Date: Wed Jun 22 11:31:44 2022 +0200 vb2: add (un)prepare_streaming queue ops When userspace called VIDIOC_STREAMON, then you want to claim any streaming resources needed and validate the video pipeline. Waiting for start_streaming to be called is too late, since that can be postponed until the required minimum of buffers is queued. So add a prepare_streaming op (optional) that can be used for that purpose, and a matching unprepare_streaming op (optional) that can release any claimed resources. The unprepare_streaming op is called when VIDIOC_STREAMOFF is called and q->streaming is 1, or when the filehandle is closed while q->streaming is 1. Signed-off-by: Hans Verkuil drivers/media/common/videobuf2/videobuf2-core.c | 25 +++++++++++++++++++++---- include/media/videobuf2-core.h | 14 ++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) commit 73937efbbe8de9c2abf2259ec2f2505e53632f19 Author: Hans Verkuil Date: Tue Sep 27 10:43:11 2022 +0200 media: admin-guide: cec.rst Document administration details about CEC devices. This was formerly documented in a cec-status.txt I kept on my website, but this really belongs here as an admin guide. Updated the original cec-status.txt, and converted it to .rst. Signed-off-by: Hans Verkuil Documentation/admin-guide/media/cec-drivers.rst | 10 - Documentation/admin-guide/media/cec.rst | 369 +++++++++++++++++++++ Documentation/admin-guide/media/index.rst | 3 +- Documentation/admin-guide/media/pulse8-cec.rst | 13 - .../userspace-api/media/cec/cec-pin-error-inj.rst | 2 + MAINTAINERS | 1 - 6 files changed, 373 insertions(+), 25 deletions(-) commit 74b20039b6a537f297054f2c206985fd0fd8e97d Author: Ian Cowan Date: Sat Nov 12 20:47:03 2022 -0500 staging: media: sunxi: cedrus: make vb2_ops struct definition const This cleans up a checkstyle warning where the vb2_ops struct definitions should be const. Signed-off-by: Ian Cowan Reviewed-by: Samuel Holland Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a95cc6d11aae16a7b2d043b073a40de81bbea689 Author: Yuan Can Date: Fri Nov 11 06:09:26 2022 +0000 media: amphion: Fix error handling in vpu_driver_init() A problem about modprobe amphion-vpu failed is triggered with the following log given: [ 2208.634841] Error: Driver 'amphion-vpu' is already registered, aborting... modprobe: ERROR: could not insert 'amphion_vpu': Device or resource busy The reason is that vpu_driver_init() returns vpu_core_driver_init() directly without checking its return value, if vpu_core_driver_init() failed, it returns without unregister amphion_vpu_driver, resulting the amphion-vpu can never be installed later. A simple call graph is shown as below: vpu_driver_init() platform_driver_register() # register amphion_vpu_driver vpu_core_driver_init() platform_driver_register() driver_register() bus_add_driver() dev = kzalloc(...) # OOM happened # return without unregister amphion_vpu_driver Fix by unregister amphion_vpu_driver when vpu_core_driver_init() returns error. Fixes: b50a64fc54af ("media: amphion: add amphion vpu device driver") Signed-off-by: Yuan Can Reviewed-by: ming_qian Signed-off-by: Hans Verkuil drivers/media/platform/amphion/vpu_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b434422c45282a0573d8123239abc41fa72665d4 Author: Yuan Can Date: Fri Nov 11 06:08:53 2022 +0000 media: platform: exynos4-is: Fix error handling in fimc_md_init() A problem about modprobe s5p_fimc failed is triggered with the following log given: [ 272.075275] Error: Driver 'exynos4-fimc' is already registered, aborting... modprobe: ERROR: could not insert 's5p_fimc': Device or resource busy The reason is that fimc_md_init() returns platform_driver_register() directly without checking its return value, if platform_driver_register() failed, it returns without unregister fimc_driver, resulting the s5p_fimc can never be installed later. A simple call graph is shown as below: fimc_md_init() fimc_register_driver() # register fimc_driver platform_driver_register() platform_driver_register() driver_register() bus_add_driver() dev = kzalloc(...) # OOM happened # return without unregister fimc_driver Fix by unregister fimc_driver when platform_driver_register() returns error. Fixes: d3953223b090 ("[media] s5p-fimc: Add the media device driver") Signed-off-by: Yuan Can Signed-off-by: Hans Verkuil drivers/media/platform/samsung/exynos4-is/fimc-core.c | 2 +- drivers/media/platform/samsung/exynos4-is/media-dev.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 9b358183b405651bc917c70975c17754da574c03 Author: Yang Yingliang Date: Thu Nov 10 23:05:59 2022 +0800 media: mtk-jpegdec: add missing destroy_workqueue() destroy_workqueue() needs be called to when driver is unloading, fix it by using devm_add_action_or_reset() to make workqueuedevice-managed. Fixes: dedc21500334 ("media: mtk-jpegdec: add jpeg decode worker interface") Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 246f4226f1590f25d9e0020989e66c1269979d11 Author: Jammy Huang Date: Thu Nov 10 17:56:11 2022 +0800 media: aspeed: Use v4l2_dbg to replace v4l2_warn to avoid log spam If the host is powered off, there will be many warning log. To avoid the log spam in this condition, replace v4l2_warn with v4l2_dbg. Signed-off-by: Jammy Huang Signed-off-by: Hans Verkuil drivers/media/platform/aspeed/aspeed-video.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7f5866dd96d95b74e439f6ee17b8abd8195179fb Author: Yang Yingliang Date: Thu Nov 10 16:24:23 2022 +0800 media: solo6x10: fix possible memory leak in solo_sysfs_init() If device_register() returns error in solo_sysfs_init(), the name allocated by dev_set_name() need be freed. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanup(). Fixes: dcae5dacbce5 ("[media] solo6x10: sync to latest code from Bluecherry's git repo") Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil drivers/media/pci/solo6x10/solo6x10-core.c | 1 + 1 file changed, 1 insertion(+) commit 458c13ae10e72901a2420cb546b183daae102984 Author: Jernej Skrabec Date: Wed Nov 9 19:23:09 2022 +0100 media: cedrus: Relax HEVC SPS restrictions Testing reference video TSUNEQBD_A_MAIN10_Technicolor_2 has show that Cedrus is capable of decoding frames with different chroma and luma bit depths. Relax restrictions so only highest depth is checked. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 9fde8e9fabdf55024c550b1df8d3cce2b482fc75 Author: Jernej Skrabec Date: Wed Nov 9 19:23:08 2022 +0100 media: cedrus: h265: Support decoding 10-bit frames 10-bit frames needs extra buffer space when 8-bit capture format is used. Use previously prepared infrastructure to adjust buffer size. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus.c | 21 ++++++++++++++ drivers/staging/media/sunxi/cedrus/cedrus.h | 1 + drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 35 ++++++++++++++++++++++++ drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 16 +++++++++++ 4 files changed, 73 insertions(+) commit 4ac19b53a101e858be99faa4acecd53eb6767a18 Author: Jernej Skrabec Date: Wed Nov 9 19:23:07 2022 +0100 media: cedrus: Adjust buffer size based on codec In some cases decoding engine needs extra space in capture buffers. This is the case for decoding 10-bit HEVC frames into 8-bit capture format. This commit only adds infrastructure for such cases. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus.h | 2 ++ drivers/staging/media/sunxi/cedrus/cedrus_video.c | 4 ++++ 2 files changed, 6 insertions(+) commit ab0bfa90930a70ed11754c373b23b1eff5d9788b Author: Aakarsh Jain Date: Wed Nov 9 09:23:48 2022 +0530 media: s5p-mfc: Optimisation of code to remove error message Already error number provision is present for block failing, while requesting for DMA consistent memory allocation. So removing error message line from the block as recommended by scripts/checkpatch.pl. Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 1 - 1 file changed, 1 deletion(-) commit 1f755f2c012b69ca7c46cc16163cfe9a52b28158 Author: Aakarsh Jain Date: Wed Nov 9 09:23:47 2022 +0530 media: s5p-mfc:fix usage of Block comment alignment Fix usage of block comment alignment in drivers/media/platform/samsung/ s5p-mfc/s5p_mfc.c as recommended by scripts/checkpatch.pl. Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 49 ++++++++++++++++-------- 1 file changed, 32 insertions(+), 17 deletions(-) commit e6c55184f411fb680eaaa9395a434fe307985886 Author: Aakarsh Jain Date: Wed Nov 9 09:23:46 2022 +0530 media: s5p-mfc: fix usage of symbolic permissions to octal Change symbolic permissions to octal equivalent as recommended by scripts/checkpatch.pl in drivers/media/platform/samsung/ s5p-mfc/s5p_mfc.c. Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba8d9405935097e296bcf7a942c3a01df0edb865 Author: Chen Zhongjin Date: Tue Nov 8 15:06:30 2022 +0800 media: vidtv: Fix use-after-free in vidtv_bridge_dvb_init() KASAN reports a use-after-free: BUG: KASAN: use-after-free in dvb_dmxdev_release+0x4d5/0x5d0 [dvb_core] Call Trace: ... dvb_dmxdev_release+0x4d5/0x5d0 [dvb_core] vidtv_bridge_probe+0x7bf/0xa40 [dvb_vidtv_bridge] platform_probe+0xb6/0x170 ... Allocated by task 1238: ... dvb_register_device+0x1a7/0xa70 [dvb_core] dvb_dmxdev_init+0x2af/0x4a0 [dvb_core] vidtv_bridge_probe+0x766/0xa40 [dvb_vidtv_bridge] ... Freed by task 1238: dvb_register_device+0x6d2/0xa70 [dvb_core] dvb_dmxdev_init+0x2af/0x4a0 [dvb_core] vidtv_bridge_probe+0x766/0xa40 [dvb_vidtv_bridge] ... It is because the error handling in vidtv_bridge_dvb_init() is wrong. First, vidtv_bridge_dmx(dev)_init() will clean themselves when fail, but goto fail_dmx(_dev): calls release functions again, which causes use-after-free. Also, in fail_fe, fail_tuner_probe and fail_demod_probe, j = i will cause out-of-bound when i finished its loop (i == NUM_FE). And the loop releasing is wrong, although now NUM_FE is 1 so it won't cause problem. Fix this by correctly releasing everything. Fixes: f90cf6079bf6 ("media: vidtv: add a bridge driver") Signed-off-by: Chen Zhongjin Signed-off-by: Hans Verkuil drivers/media/test-drivers/vidtv/vidtv_bridge.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 8465cdb14d889b48c4ae48fc04d8dab9bc76a56b Author: Deepak R Varma Date: Tue Nov 8 00:41:21 2022 +0530 staging: media: meson: vdec: use min() for comparison and assignment Use of standard min() helper macro is preferred over using ternary operator for logical evaluation and value assignment. This issue is identified by coccicheck using the minmax.cocci file. Signed-off-by: Deepak R Varma Reviewed-by: Neil Armstrong Signed-off-by: Hans Verkuil drivers/staging/media/meson/vdec/codec_vp9.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 04e27f7953b6ba6cefc52c9b981b6eeafefea103 Author: Daniel Almeida Date: Sat Nov 5 10:58:42 2022 -0300 media: visl: add virtual stateless decoder driver A virtual stateless device for stateless uAPI development purposes. This tool's objective is to help the development and testing of userspace applications that use the V4L2 stateless API to decode media. A userspace implementation can use visl to run a decoding loop even when no hardware is available or when the kernel uAPI for the codec has not been upstreamed yet. This can reveal bugs at an early stage. This driver can also trace the contents of the V4L2 controls submitted to it. It can also dump the contents of the vb2 buffers through a debugfs interface. This is in many ways similar to the tracing infrastructure available for other popular encode/decode APIs out there and can help develop a userspace application by using another (working) one as a reference. Note that no actual decoding of video frames is performed by visl. The V4L2 test pattern generator is used to write various debug information to the capture buffers instead. Signed-off-by: Daniel Almeida Signed-off-by: Hans Verkuil Documentation/admin-guide/media/v4l-drivers.rst | 1 + Documentation/admin-guide/media/visl.rst | 175 +++++ MAINTAINERS | 6 + drivers/media/test-drivers/Kconfig | 1 + drivers/media/test-drivers/Makefile | 1 + drivers/media/test-drivers/visl/Kconfig | 29 + drivers/media/test-drivers/visl/Makefile | 8 + drivers/media/test-drivers/visl/visl-core.c | 541 +++++++++++++++ drivers/media/test-drivers/visl/visl-debugfs.c | 112 +++ drivers/media/test-drivers/visl/visl-debugfs.h | 40 ++ drivers/media/test-drivers/visl/visl-dec.c | 499 ++++++++++++++ drivers/media/test-drivers/visl/visl-dec.h | 67 ++ drivers/media/test-drivers/visl/visl-trace-fwht.h | 66 ++ drivers/media/test-drivers/visl/visl-trace-h264.h | 349 ++++++++++ drivers/media/test-drivers/visl/visl-trace-hevc.h | 405 +++++++++++ drivers/media/test-drivers/visl/visl-trace-mpeg2.h | 99 +++ .../media/test-drivers/visl/visl-trace-points.c | 10 + drivers/media/test-drivers/visl/visl-trace-vp8.h | 156 +++++ drivers/media/test-drivers/visl/visl-trace-vp9.h | 292 ++++++++ drivers/media/test-drivers/visl/visl-video.c | 767 +++++++++++++++++++++ drivers/media/test-drivers/visl/visl-video.h | 27 + drivers/media/test-drivers/visl/visl.h | 176 +++++ 22 files changed, 3827 insertions(+) commit 9d175a81e28f260916a0a13f457dd8b940eafb4e Author: Ming Qian Date: Tue Nov 1 16:04:53 2022 +0800 media: amphion: apply vb2_queue_error instead of setting manually vb2_queue_error is help to set the error of vb2_queue, don't need to set it manually Fixes: 3cd084519c6f ("media: amphion: add vpu v4l2 m2m support") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil drivers/media/platform/amphion/vpu_v4l2.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 8480dd5fb3c82b5887d456b3fbe4201d99231814 Author: Ming Qian Date: Tue Nov 1 16:04:20 2022 +0800 media: amphion: add lock around vdec_g_fmt the capture format may be changed when sequence header is parsed, it may be read and write in the same time, add lock around vdec_g_fmt to synchronize it Fixes: 6de8d628df6e ("media: amphion: add v4l2 m2m vpu decoder stateful driver") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil drivers/media/platform/amphion/vdec.c | 2 ++ 1 file changed, 2 insertions(+) commit 5b468dad6e5cf4998bdc05efbc5526c111666027 Author: Anshuman Khandual Date: Thu Nov 17 18:01:44 2022 +0530 arm64/mm: Drop unused restore_ttbr1 restore_ttbr1 procedure is not used anywhere, hence just drop it. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Andrew Morton Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20221117123144.403582-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 11 ----------- 1 file changed, 11 deletions(-) commit 4585a934203d0ee1009bd31724190116aed01c10 Author: Mark Rutland Date: Thu Nov 17 12:09:02 2022 +0000 arm64: move on_thread_stack() to Currently on_thread_stack() is defined in , depending upon definitiong from despite this header not being included. This ends up being fragile, and any user of on_thread_stack() must include both and . We organised things this way due to header dependencies back in commit: 0b3e336601b82c6a ("arm64: Add support for STACKLEAK gcc plugin") ... but now that we no longer use current_top_of_stack(), and given that stackleak includes via , we no longer need the definition to live in . Move on_thread_stack() to , where all its dependencies are guaranteed to be defined. This requires having arm64's irq.c explicitly include , and I've taken the opportunity to sort the includes, which were slightly out of order. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Kees Cook Cc: Will Deacon Reviewed-by: Kees Cook Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20221117120902.3974163-3-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/processor.h | 2 -- arch/arm64/include/asm/stacktrace.h | 2 ++ arch/arm64/kernel/irq.c | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) commit c8c384d7b397991584de4ed074541a54809cdd52 Author: Mark Rutland Date: Thu Nov 17 12:09:01 2022 +0000 arm64: remove current_top_of_stack() We no longer use current_top_of_stack() on arm64, so it can be removed. We introduced current_top_of_stack() for STACKLEAK in commit: 0b3e336601b82c6a ("arm64: Add support for STACKLEAK gcc plugin") ... then we figured out the intended semantics were unclear, and reworked it in commit: e85094c31ddb794a ("arm64: stackleak: fix current_top_of_stack()") ... then we removed the only user in commit: 0cfa2ccd285d98ad ("stackleak: rework stack high bound handling") Given that it's no longer used, and it's very easy to misuse, this patch removes current_top_of_stack(). For the moment, on_thread_stack() is left where it is as moving it will change some header dependencies. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Kees Cook Cc: Will Deacon Reviewed-by: Kees Cook Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20221117120902.3974163-2-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/processor.h | 11 ----------- 1 file changed, 11 deletions(-) commit 284d2b44a8cc0df8ed25596092fa864bc57b5bab Author: Mark Brown Date: Thu Nov 17 11:41:30 2022 +0000 kselftest/arm64: Use preferred form for predicate load/stores The preferred form of the str/ldr for predicate registers with an immediate of zero is to omit the zero, and the clang built in assembler rejects the zero immediate. Drop the immediate. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221117114130.687261-1-broonie@kernel.org Signed-off-by: Will Deacon tools/testing/selftests/arm64/abi/syscall-abi-asm.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56eea7f87fb66d7e9508b1b883a602b8df122b03 Author: Mark Rutland Date: Thu Nov 17 13:16:50 2022 +0000 arm64: alternatives: make apply_alternatives_vdso() static We define and use apply_alternatives_vdso() within alternative.c, and don't provide a prototype in a header. There's no need for it to be visible outside of alternative.c, so mark it as static. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Joey Gouly Cc: Will Deacon Link: https://lore.kernel.org/r/20221117131650.4056636-1-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/alternative.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3811a7283a0a07fa84ccde69b3d48115d34e79af Author: Konrad Dybcio Date: Thu Nov 17 10:44:22 2022 +0100 iommu/arm-smmu-qcom: Add SM6350 SMMUv2 SM6350 uses a qcom,smmu-v2-style SMMU just for Adreno and friends. Add a compatible for it. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221117094422.11000-3-konrad.dybcio@linaro.org Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + 1 file changed, 1 insertion(+) commit 5a47cb4df38bee861de37c12aaa4ef5510dd533b Author: Konrad Dybcio Date: Thu Nov 17 10:44:21 2022 +0100 dt-bindings: arm-smmu: Add SM6350 GPU SMMUv2 SM6350 has a qcom,smmu-v2-style SMMU just for Adreno and friends. Document it. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221117094422.11000-2-konrad.dybcio@linaro.org Signed-off-by: Will Deacon Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 2 ++ 1 file changed, 2 insertions(+) commit a9ae89df737756d92f0e14873339cf393f7f7eb0 Author: Zhen Lei Date: Wed Nov 16 20:10:44 2022 +0800 arm64: kdump: Support crashkernel=X fall back to reserve region above DMA zones For crashkernel=X without '@offset', select a region within DMA zones first, and fall back to reserve region above DMA zones. This allows users to use the same configuration on multiple platforms. Signed-off-by: Zhen Lei Acked-by: Baoquan He Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20221116121044.1690-3-thunder.leizhen@huawei.com Signed-off-by: Will Deacon Documentation/admin-guide/kernel-parameters.txt | 2 +- arch/arm64/mm/init.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) commit a149cf00b158e1793a8dd89ca492379c366300d2 Author: Zhen Lei Date: Wed Nov 16 20:10:43 2022 +0800 arm64: kdump: Provide default size when crashkernel=Y,low is not specified Try to allocate at least 128 MiB low memory automatically for the case that crashkernel=,high is explicitly specified, while crashkenrel=,low is omitted. This allows users to focus more on the high memory requirements of their business rather than the low memory requirements of the crash kernel booting. Signed-off-by: Zhen Lei Acked-by: Baoquan He Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20221116121044.1690-2-thunder.leizhen@huawei.com Signed-off-by: Will Deacon Documentation/admin-guide/kernel-parameters.txt | 13 +++++-------- arch/arm64/mm/init.c | 8 ++++++-- 2 files changed, 11 insertions(+), 10 deletions(-) commit d3d10f0d370c6c83e88cd79e450e70c31c6ae50c Author: Anshuman Khandual Date: Wed Nov 16 14:13:02 2022 +0530 arm64/mm: Drop idmap_pg_end[] declaration idmap_pg_end[] is not used anywhere, hence just drop its declaration. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Andrew Morton Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/20221116084302.320685-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 1 - 1 file changed, 1 deletion(-) commit 9ed2b4616d4e846ece2a04cb5007ce1d1bd9e3f3 Author: Anshuman Khandual Date: Fri Nov 18 11:01:02 2022 +0530 arm64/mm: Drop redundant BUG_ON(!pgtable_alloc) __create_pgd_mapping_locked() expects a page allocator used while mapping a virtual range. This page allocator function propagates down the call chain, while building intermediate levels in the page table. Passed page allocator is a necessary ingredient required to build the page table but its presence can be asserted just once in the very beginning rather than in all the down stream functions. This consolidates BUG_ON(!pgtable_alloc) checks just in a single place i.e __create_pgd_mapping_locked(). Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Andrew Morton Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20221118053102.500216-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon arch/arm64/mm/mmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 041fe8858475a0337b28404ec5136f4fc583b3aa Author: Pierre-Louis Bossart Date: Fri Nov 18 09:51:06 2022 +0800 ASoC: Intel: sof_sdw_amp: mark coeff tables with __maybe_unused The same file provides two tables used in separate drivers, make them as __maybe_unused to avoid errors: sound/soc/intel/boards/sof_sdw_amp_coeff_tables.h:163:17: error: ‘dell_0b00_bq_params’ defined but not used [-Werror=unused-const-variable=] 163 | static const u8 dell_0b00_bq_params[] = { Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221118015106.532302-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw_amp_coeff_tables.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f38d4c72cb2d68e73d3e54feb68febd6b7c4bfd2 Author: Cezary Rojewski Date: Fri Nov 18 12:30:52 2022 +0100 ASoC: Intel: avs: Initialize private data for subsequent HDA FEs HDAudio implementation found in sound/pci/hda expects a valid stream pointer in substream->runtime->private_data location. For ASoC users, that should point to a valid link stream which is assigned when BE opens. As BE borrows its runtime from FE, the information may be lost when reparenting comes into picture - see dpcm_be_reparent(). To support the DPCM reparenting functionality for HDAudio scenarios while still fulfilling expectations of HDAudio common code, have all FEs point to the same private data. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221118113052.1340593-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/pcm.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 10d4853e4c5cd64b9ef1e5579bb2e89bceab4175 Author: Jithu Joseph Date: Wed Nov 16 19:59:20 2022 -0800 platform/x86/intel/ifs: Remove unused selection CONFIG_INTEL_IFS_DEVICE is not used anywhere. The selection in Kconfig is therefore pointless. Delete it. Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Sohil Mehta Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221117035935.4136738-2-jithu.joseph@intel.com drivers/platform/x86/intel/ifs/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 26299b3f6ba26bfc234b73126d14bdf4dec5275a Author: Mark Rutland Date: Thu Nov 3 17:05:20 2022 +0000 ftrace: arm64: move from REGS to ARGS This commit replaces arm64's support for FTRACE_WITH_REGS with support for FTRACE_WITH_ARGS. This removes some overhead and complexity, and removes some latent issues with inconsistent presentation of struct pt_regs (which can only be reliably saved/restored at exception boundaries). FTRACE_WITH_REGS has been supported on arm64 since commit: 3b23e4991fb66f6d ("arm64: implement ftrace with regs") As noted in the commit message, the major reasons for implementing FTRACE_WITH_REGS were: (1) To make it possible to use the ftrace graph tracer with pointer authentication, where it's necessary to snapshot/manipulate the LR before it is signed by the instrumented function. (2) To make it possible to implement LIVEPATCH in future, where we need to hook function entry before an instrumented function manipulates the stack or argument registers. Practically speaking, we need to preserve the argument/return registers, PC, LR, and SP. Neither of these need a struct pt_regs, and only require the set of registers which are live at function call/return boundaries. Our calling convention is defined by "Procedure Call Standard for the Arm® 64-bit Architecture (AArch64)" (AKA "AAPCS64"), which can currently be found at: https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst Per AAPCS64, all function call argument and return values are held in the following GPRs: * X0 - X7 : parameter / result registers * X8 : indirect result location register * SP : stack pointer (AKA SP) Additionally, ad function call boundaries, the following GPRs hold context/return information: * X29 : frame pointer (AKA FP) * X30 : link register (AKA LR) ... and for ftrace we need to capture the instrumented address: * PC : program counter No other GPRs are relevant, as none of the other arguments hold parameters or return values: * X9 - X17 : temporaries, may be clobbered * X18 : shadow call stack pointer (or temorary) * X19 - X28 : callee saved This patch implements FTRACE_WITH_ARGS for arm64, only saving/restoring the minimal set of registers necessary. This is always sufficient to manipulate control flow (e.g. for live-patching) or to manipulate function arguments and return values. This reduces the necessary stack usage from 336 bytes for pt_regs down to 112 bytes for ftrace_regs + 32 bytes for two frame records, freeing up 188 bytes. This could be reduced further with changes to the unwinder. As there is no longer a need to save different sets of registers for different features, we no longer need distinct `ftrace_caller` and `ftrace_regs_caller` trampolines. This allows the trampoline assembly to be simpler, and simplifies code which previously had to handle the two trampolines. I've tested this with the ftrace selftests, where there are no unexpected failures. Co-developed-by: Florent Revest Signed-off-by: Mark Rutland Signed-off-by: Florent Revest Cc: Catalin Marinas Cc: Masami Hiramatsu Cc: Steven Rostedt Cc: Will Deacon Reviewed-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20221103170520.931305-5-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/Kconfig | 18 +++--- arch/arm64/Makefile | 2 +- arch/arm64/include/asm/ftrace.h | 72 ++++++++++++++++++++++-- arch/arm64/kernel/asm-offsets.c | 13 +++++ arch/arm64/kernel/entry-ftrace.S | 117 +++++++++++++++------------------------ arch/arm64/kernel/ftrace.c | 82 +++++++++++++++------------ arch/arm64/kernel/module.c | 3 - 7 files changed, 184 insertions(+), 123 deletions(-) commit 94d095ffa0e16bb7f161a2b73bbe5c2795d499a8 Author: Mark Rutland Date: Thu Nov 3 17:05:19 2022 +0000 ftrace: abstract DYNAMIC_FTRACE_WITH_ARGS accesses In subsequent patches we'll arrange for architectures to have an ftrace_regs which is entirely distinct from pt_regs. In preparation for this, we need to minimize the use of pt_regs to where strictly necessary in the core ftrace code. This patch adds new ftrace_regs_{get,set}_*() helpers which can be used to manipulate ftrace_regs. When CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y, these can always be used on any ftrace_regs, and when CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=n these can be used when regs are available. A new ftrace_regs_has_args(fregs) helper is added which code can use to check when these are usable. Co-developed-by: Florent Revest Signed-off-by: Florent Revest Signed-off-by: Mark Rutland Cc: Masami Hiramatsu Cc: Steven Rostedt Reviewed-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20221103170520.931305-4-mark.rutland@arm.com Signed-off-by: Will Deacon arch/powerpc/include/asm/ftrace.h | 19 +++++++++++++++++++ arch/s390/include/asm/ftrace.h | 19 +++++++++++++++++++ arch/x86/include/asm/ftrace.h | 16 ++++++++++++++++ include/linux/ftrace.h | 29 +++++++++++++++++++++++++++++ kernel/trace/Kconfig | 6 +++--- 5 files changed, 86 insertions(+), 3 deletions(-) commit 0ef86097f127d0d73e19aa4dcf86106105e7db09 Author: Mark Rutland Date: Thu Nov 3 17:05:18 2022 +0000 ftrace: rename ftrace_instruction_pointer_set() -> ftrace_regs_set_instruction_pointer() In subsequent patches we'll add a sew of ftrace_regs_{get,set}_*() helpers. In preparation, this patch renames ftrace_instruction_pointer_set() to ftrace_regs_set_instruction_pointer(). There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Florent Revest Cc: Masami Hiramatsu Cc: Steven Rostedt Reviewed-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20221103170520.931305-3-mark.rutland@arm.com Signed-off-by: Will Deacon arch/powerpc/include/asm/ftrace.h | 5 +++-- arch/s390/include/asm/ftrace.h | 5 +++-- arch/x86/include/asm/ftrace.h | 2 +- include/linux/ftrace.h | 9 ++++----- kernel/livepatch/patch.c | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) commit 9705bc70960459ae09f4a5e77283973bb3a40f57 Author: Mark Rutland Date: Thu Nov 3 17:05:17 2022 +0000 ftrace: pass fregs to arch_ftrace_set_direct_caller() In subsequent patches we'll arrange for architectures to have an ftrace_regs which is entirely distinct from pt_regs. In preparation for this, we need to minimize the use of pt_regs to where strictly necessary in the core ftrace code. This patch changes the prototype of arch_ftrace_set_direct_caller() to take ftrace_regs rather than pt_regs, and moves the extraction of the pt_regs into arch_ftrace_set_direct_caller(). On x86, arch_ftrace_set_direct_caller() can be used even when CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=n, and defines struct ftrace_regs. Due to this, it's necessary to define arch_ftrace_set_direct_caller() as a macro to avoid using an incomplete type. I've also moved the body of arch_ftrace_set_direct_caller() after the CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y defineidion of struct ftrace_regs. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Florent Revest Cc: Masami Hiramatsu Cc: Steven Rostedt Reviewed-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20221103170520.931305-2-mark.rutland@arm.com Signed-off-by: Will Deacon arch/s390/include/asm/ftrace.h | 5 ++++- arch/x86/include/asm/ftrace.h | 31 ++++++++++++++++++------------- include/linux/ftrace.h | 9 ++++----- kernel/trace/ftrace.c | 3 +-- 4 files changed, 27 insertions(+), 21 deletions(-) commit a91bbd5c9984a2b15e68aad7a79c2809fbd10fbe Author: Besar Wicaksono Date: Wed Nov 16 14:39:52 2022 -0600 perf: arm_cspmu: Fix module cyclic dependency Build on arm64 allmodconfig failed with: | depmod: ERROR: Cycle detected: arm_cspmu -> nvidia_cspmu -> arm_cspmu | depmod: ERROR: Found 2 modules in dependency cycles! The arm_cspmu.c provides standard functions to operate the PMU and the vendor code provides vendor specific attributes. Both need to be built as single kernel module. Update the makefile to compile sources under arm_cspmu into one module. Signed-off-by: Besar Wicaksono Reviewed-and-Tested-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20221116203952.34168-1-bwicaksono@nvidia.com Signed-off-by: Will Deacon drivers/perf/arm_cspmu/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e72dbf9085b56bbc19ff332f82adec1891077637 Author: Besar Wicaksono Date: Wed Nov 16 13:04:55 2022 -0600 perf: arm_cspmu: Fix build failure on x86_64 Building on x86_64 allmodconfig failed: | drivers/perf/arm_cspmu/arm_cspmu.c:1114:29: error: implicit | declaration of function 'get_acpi_id_for_cpu' get_acpi_id_for_cpu is a helper function from ARM64. Fix by adding ARM64 dependency. Signed-off-by: Besar Wicaksono Reviewed-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20221116190455.55651-1-bwicaksono@nvidia.com Signed-off-by: Will Deacon drivers/perf/arm_cspmu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab0377803dafc58f1e22296708c1c28e309414d6 Author: Schspa Shi Date: Wed Nov 16 19:45:11 2022 +0800 mrp: introduce active flags to prevent UAF when applicant uninit The caller of del_timer_sync must prevent restarting of the timer, If we have no this synchronization, there is a small probability that the cancellation will not be successful. And syzbot report the fellowing crash: ================================================================== BUG: KASAN: use-after-free in hlist_add_head include/linux/list.h:929 [inline] BUG: KASAN: use-after-free in enqueue_timer+0x18/0xa4 kernel/time/timer.c:605 Write at addr f9ff000024df6058 by task syz-fuzzer/2256 Pointer tag: [f9], memory tag: [fe] CPU: 1 PID: 2256 Comm: syz-fuzzer Not tainted 6.1.0-rc5-syzkaller-00008- ge01d50cbd6ee #0 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace.part.0+0xe0/0xf0 arch/arm64/kernel/stacktrace.c:156 dump_backtrace arch/arm64/kernel/stacktrace.c:162 [inline] show_stack+0x18/0x40 arch/arm64/kernel/stacktrace.c:163 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x68/0x84 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x1a8/0x4a0 mm/kasan/report.c:395 kasan_report+0x94/0xb4 mm/kasan/report.c:495 __do_kernel_fault+0x164/0x1e0 arch/arm64/mm/fault.c:320 do_bad_area arch/arm64/mm/fault.c:473 [inline] do_tag_check_fault+0x78/0x8c arch/arm64/mm/fault.c:749 do_mem_abort+0x44/0x94 arch/arm64/mm/fault.c:825 el1_abort+0x40/0x60 arch/arm64/kernel/entry-common.c:367 el1h_64_sync_handler+0xd8/0xe4 arch/arm64/kernel/entry-common.c:427 el1h_64_sync+0x64/0x68 arch/arm64/kernel/entry.S:576 hlist_add_head include/linux/list.h:929 [inline] enqueue_timer+0x18/0xa4 kernel/time/timer.c:605 mod_timer+0x14/0x20 kernel/time/timer.c:1161 mrp_periodic_timer_arm net/802/mrp.c:614 [inline] mrp_periodic_timer+0xa0/0xc0 net/802/mrp.c:627 call_timer_fn.constprop.0+0x24/0x80 kernel/time/timer.c:1474 expire_timers+0x98/0xc4 kernel/time/timer.c:1519 To fix it, we can introduce a new active flags to make sure the timer will not restart. Reported-by: syzbot+6fd64001c20aa99e34a4@syzkaller.appspotmail.com Signed-off-by: Schspa Shi Signed-off-by: David S. Miller include/net/mrp.h | 1 + net/802/mrp.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) commit 8cf4f8c7d99addb6c2c2273fac7c20ca7c50db45 Merge: fd896e38e5df 66f6fd278c67 Author: David S. Miller Date: Fri Nov 18 12:09:20 2022 +0000 Merge tag 'rxrpc-next-20221116' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fix oops and missing config conditionals The patches that were pulled into net-next previously[1] had some issues that this patchset fixes: (1) Fix missing IPV6 config conditionals. (2) Fix an oops caused by calling udpv6_sendmsg() directly on an AF_INET socket. (3) Fix the validation of network addresses on entry to socket functions so that we don't allow an AF_INET6 address if we've selected an AF_INET transport socket. Link: https://lore.kernel.org/r/166794587113.2389296.16484814996876530222.stgit@warthog.procyon.org.uk/ [1] ==================== Signed-off-by: David S. Miller commit fd896e38e5df2c5b68c78eee2fc425c4dcd3b4dd Author: Eric Dumazet Date: Thu Nov 17 09:26:41 2022 +0000 net: fix napi_disable() logic error Dan reported a new warning after my recent patch: New smatch warnings: net/core/dev.c:6409 napi_disable() error: uninitialized symbol 'new'. Indeed, we must first wait for STATE_SCHED and STATE_NPSVC to be cleared, to make sure @new variable has been initialized properly. Fixes: 4ffa1d1c6842 ("net: adopt try_cmpxchg() in napi_{enable|disable}()") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38461894838bbbebab54cbd5a5459cc8d1b6dd9b Author: Dan Carpenter Date: Thu Nov 17 10:44:02 2022 +0300 rxrpc: uninitialized variable in rxrpc_send_ack_packet() The "pkt" was supposed to have been deleted in a previous patch. It leads to an uninitialized variable bug. Fixes: 72f0c6fb0579 ("rxrpc: Allocate ACK records at proposal and queue for transmission") Signed-off-by: Dan Carpenter Acked-by: David Howells Signed-off-by: David S. Miller net/rxrpc/output.c | 2 -- 1 file changed, 2 deletions(-) commit 101c1bb6c55691d01c73915c118828f7ca17a049 Author: Dan Carpenter Date: Thu Nov 17 10:43:38 2022 +0300 rxrpc: fix rxkad_verify_response() The error handling for if skb_copy_bits() fails was accidentally deleted so the rxkad_decrypt_ticket() function is not called. Fixes: 5d7edbc9231e ("rxrpc: Get rid of the Rx ring") Signed-off-by: Dan Carpenter Acked-by: David Howells Signed-off-by: David S. Miller net/rxrpc/rxkad.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ec8cd134eeeecef9cccb5431b1a3f140ff2a413a Author: Lorenzo Bianconi Date: Thu Nov 17 00:58:46 2022 +0100 net: ethernet: mtk_eth_soc: remove cpu_relax in mtk_pending_work Get rid of cpu_relax in mtk_pending_work routine since MTK_RESETTING is set only in mtk_pending_work() and it runs holding rtnl lock Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit b677d6c7a695dad1b02d2e0e428c39b3b344f270 Author: Lorenzo Bianconi Date: Thu Nov 17 00:35:04 2022 +0100 net: ethernet: mtk_eth_soc: do not overwrite mtu configuration running reset routine Restore user configured MTU running mtk_hw_init() during tx timeout routine since it will be overwritten after a hw reset. Reported-by: Felix Fietkau Fixes: 9ea4d311509f ("net: ethernet: mediatek: add the whole ethernet reset into the reset process") Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 53 ++++++++++++++++++----------- 1 file changed, 34 insertions(+), 19 deletions(-) commit f732646d0ccd22f42ed7de5e59c0abb7a848e034 Author: Tudor Ambarus Date: Thu Nov 17 12:52:45 2022 +0200 spi: atmel-quadspi: Add support for configuring CS timing The at91 QSPI IP uses a default value of half of the period of the QSPI clock period for the cs-setup time, which is not always enough, an example being the sst26vf064b SPI NOR flash which requires a minimum cs-setup time of 5 ns. It was observed that none of the at91 SoCs can fulfill the minimum CS setup time for the aforementioned flash, as they operate at high frequencies and half a period does not suffice for the required CS setup time. Add support for configuring the CS timing in the controller. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20221117105249.115649-5-tudor.ambarus@microchip.com Signed-off-by: Mark Brown drivers/spi/atmel-quadspi.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 684a47847ae639689e7b823251975348a8e5434f Author: Tudor Ambarus Date: Thu Nov 17 12:52:44 2022 +0200 spi: Reintroduce spi_set_cs_timing() commit 4ccf359849ce ("spi: remove spi_set_cs_timing()"), removed the method as noboby used it. Nobody used it probably because some SPI controllers use some default large cs-setup time that covers the usual cs-setup time required by the spi devices. There are though SPI controllers that have a smaller granularity for the cs-setup time and their default value can't fulfill the spi device requirements. That's the case for the at91 QSPI IPs where the default cs-setup time is half of the QSPI clock period. This was observed when using an sst26vf064b SPI NOR flash which needs a spi-cs-setup-ns = <7>; in order to be operated close to its maximum 104 MHz frequency. Call spi_set_cs_timing() in spi_setup() just before calling spi_set_cs(), as the latter needs the CS timings already set. If spi->controller->set_cs_timing is not set, the method will return 0. There's no functional impact expected for the existing drivers. Even if the spi-mt65xx.c and spi-tegra114.c drivers set the set_cs_timing method, there's no user for them as of now. The only tested user of this support will be a SPI NOR flash that comunicates with the Atmel QSPI controller for which the support follows in the next patches. One will notice that this support is a bit different from the one that was removed in commit 4ccf359849ce ("spi: remove spi_set_cs_timing()"), because this patch adapts to the changes done after the removal: the move of the cs delays to the spi device, the retirement of the lelgacy GPIO handling. The mutex handling was removed from spi_set_cs_timing() because we now always call spi_set_cs_timing() in spi_setup(), which already handles the spi->controller->io_mutex, so use the mutex handling from spi_setup(). Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20221117105249.115649-4-tudor.ambarus@microchip.com Signed-off-by: Mark Brown drivers/spi/spi.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 33a2fde5f77bd744b8bd0c694bc173cc968e55a5 Author: Tudor Ambarus Date: Thu Nov 17 12:52:43 2022 +0200 spi: Introduce spi-cs-setup-ns property SPI NOR flashes have specific cs-setup time requirements without which they can't work at frequencies close to their maximum supported frequency, as they miss the first bits of the instruction command. Unrecognized commands are ignored, thus the flash will be unresponsive. Introduce the spi-cs-setup-ns property to allow spi devices to specify their cs setup time. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20221117105249.115649-3-tudor.ambarus@microchip.com Signed-off-by: Mark Brown drivers/spi/spi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f6c911f3308c1cfb97ae1da6654080d7104e2df2 Author: Tudor Ambarus Date: Thu Nov 17 12:52:42 2022 +0200 spi: dt-bindings: Introduce spi-cs-setup-ns property SPI NOR flashes have specific cs-setup time requirements without which they can't work at frequencies close to their maximum supported frequency, as they miss the first bits of the instruction command. Unrecognized commands are ignored, thus the flash will be unresponsive. Introduce the spi-cs-setup-ns property to allow spi devices to specify their cs setup time. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20221117105249.115649-2-tudor.ambarus@microchip.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit abc7edb0329cd2eabc0b948f5e248c85f6268296 Author: Claudiu Beznea Date: Thu Nov 17 14:37:50 2022 +0200 ASoC: mchp-spdiftx: add support for system suspend/resume Add support for system suspend/resume by moving the enable/disable of interrupts in mchp_spdiftx_trigger() on SNDRV_PCM_TRIGGER_SUSPEND/ SNDRV_PCM_TRIGGER_RESUME commands. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221117123750.291911-4-claudiu.beznea@microchip.com Signed-off-by: Mark Brown sound/soc/atmel/mchp-spdiftx.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 4bf54ca60f99643cfaa3e5b532f139f6501f318e Author: Claudiu Beznea Date: Thu Nov 17 14:37:49 2022 +0200 ASoC: mchp-spdiftx: add runtime pm support Add runtime PM support for Microchip SPDIFTX driver. The runtime PM APIs disables/enables IP's clock and enables/disable caching for regmap. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221117123750.291911-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown sound/soc/atmel/mchp-spdiftx.c | 116 ++++++++++++++++++++++++++++++----------- 1 file changed, 86 insertions(+), 30 deletions(-) commit 215450eb8b0fac000a42c1cd52c8966fb5159037 Author: Claudiu Beznea Date: Thu Nov 17 14:37:48 2022 +0200 ASoC: mchp-spdiftx: simplify locking around ctrl->ch_stat Use a temporary variable to keep the AES3 value. With this a spin_unlock_irqrestore() call has been removed from the final code. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221117123750.291911-2-claudiu.beznea@microchip.com Signed-off-by: Mark Brown sound/soc/atmel/mchp-spdiftx.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 3bd7a0219082c2c91570b81afc35f2aec57cade2 Author: James Clark Date: Thu Nov 17 10:25:36 2022 +0000 arm64: dts: fvp: Add SPE to Foundation FVP Add SPE DT node to FVP model. If the model doesn't support SPE (e.g., turned off via parameter), the driver will skip the initialisation accordingly and thus is safe. Signed-off-by: James Clark Link: https://lore.kernel.org/r/20221117102536.237515-1-james.clark@arm.com Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/foundation-v8.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit b1af5b34d6b315ed34abb0fa9049bcf1babbd537 Author: Samuel Holland Date: Tue Nov 15 21:46:21 2022 -0600 ASoC: dt-bindings: sun50i-dmic: Add D1 compatible string The Allwinner D1 SoC has a DMIC codec like the one in the H6. It appears to be register-compatible with the H6 variant, and the existing Linux driver has been tested on a D1-based board, the Lichee RV 86 Panel. Signed-off-by: Samuel Holland Acked-by: Ban Tao Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221116034621.37762-1-samuel@sholland.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3420fdb8ae99f0a08d78d2b80f42a71971cf478d Author: Gaosheng Cui Date: Fri Nov 18 11:00:56 2022 +0800 ASoC: amd: acp: Fix possible UAF in acp_dma_open Smatch report warning as follows: sound/soc/amd/acp/acp-platform.c:199 acp_dma_open() warn: '&stream->list' not removed from list If snd_pcm_hw_constraint_integer() fails in acp_dma_open(), stream will be freed, but stream->list will not be removed from adata->stream_list, then list traversal may cause UAF. Fix by adding the newly allocated stream to the list once it's fully initialised. Fixes: 7929985cfe36 ("ASoC: amd: acp: Initialize list to store acp_stream during pcm_open") Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20221118030056.3135960-1-cuigaosheng1@huawei.com Signed-off-by: Mark Brown sound/soc/amd/acp/acp-platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 13c459fa37c9f26e9bf884a832dd67598b5c4d3e Author: Brent Lu Date: Thu Nov 17 17:19:19 2022 -0600 ASoC: Intel: sof_nau8825: support rt1015p speaker amplifier Add rt1015p speaker amplifier support with a new board info 'adl_rt1015p_nau8825' which supports NAU8825 on SSP0 and ALC1015Q on SSP1. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221117231919.112483-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_nau8825.c | 16 ++++++++++++++++ sound/soc/intel/common/soc-acpi-intel-adl-match.c | 12 ++++++++++++ 2 files changed, 28 insertions(+) commit 15b4f993d12b5bb81f50a1ce0693343fb7a94fcf Author: Alex Elder Date: Wed Nov 16 16:37:18 2022 -0600 net: ipa: avoid a null pointer dereference Dan Carpenter reported that Smatch found an instance where a pointer which had previously been assumed could be null (as indicated by a null check) was later dereferenced without a similar check. In practice this doesn't lead to a problem because currently the pointers used are all non-null. Nevertheless this patch addresses the reported problem. In addition, I spotted another bug that arose in the same commit. When the command to initialize a routing table memory region was added, the number of entries computed for the non-hashed table was wrong (it ended up being a Boolean rather than the count intended). This bug is fixed here as well. Reported-by: Dan Carpenter Link: https://lore.kernel.org/kernel-janitors/Y3OOP9dXK6oEydkf@kili Tested-by: Caleb Connolly Fixes: 5cb76899fb47 ("net: ipa: reduce arguments to ipa_table_init_add()") Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa_table.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit c609d739947894d7370eae4cf04eb2c49e910bcf Merge: 22700706adac e7e40cc6555c Author: David S. Miller Date: Fri Nov 18 11:44:36 2022 +0000 Merge tag 'wireless-next-2022-11-18' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.2 Second set of patches for v6.2. Only driver patches this time, nothing really special. Unused platform data support was removed from wl1251 and rtw89 got WoWLAN support. Major changes: ath11k * support configuring channel dwell time during scan rtw89 * new dynamic header firmware format support * Wake-over-WLAN support rtl8xxxu * enable IEEE80211_HW_SUPPORT_FAST_XMIT ==================== Signed-off-by: David S. Miller commit 22700706adac57608ca78ef527b0df56c11f85e6 Merge: 0b6ffefbb018 a61bd7b9fef3 Author: David S. Miller Date: Fri Nov 18 11:42:54 2022 +0000 Merge branch 'sctp-vrf' Xin Long says: ==================== sctp: support vrf processing This patchset adds the VRF processing in SCTP. Simliar to TCP/UDP, it includes socket bind and socket/association lookup changes. For socket bind change, it allows sockets to bind to a VRF device and allows multiple sockets with the same IP and PORT to bind to different interfaces in patch 1-3. For socket/association lookup change, it adds dif and sdif check in both asoc and ep lookup in patch 4 and 5, and when binding to nodev, users can decide if accept the packets received from one l3mdev by setup a sysctl option in patch 6. Note with VRF support, in a netns, an association will be decided by src ip + src port + dst ip + dst port + bound_dev_if, and it's possible for ss to have: State Local Address:Port Peer Address:Port ESTAB 192.168.1.2%vrf-s1:1234 `- ESTAB 192.168.1.2%veth1:1234 192.168.1.1:1234 ESTAB 192.168.1.2%vrf-s2:1234 `- ESTAB 192.168.1.2%veth2:1234 192.168.1.1:1234 See the selftest in patch 7 for more usage. Also, thanks Carlo for testing this patch series on their use. v1->v2: - In Patch 5, move sctp_sk_bound_dev_eq() definition to net/sctp/ input.c to avoid a build error when IP_SCTP is disabled, as Paolo suggested. - In Patch 7, avoid one sleep by disabling the IPv6 dad, and remove another sleep by using ss to check if the server's ready, and also delete two unncessary sleeps in sctp_hello.c, as Paolo suggested. ==================== Signed-off-by: David S. Miller commit a61bd7b9fef34484a3fe144a62f4ec78cc42e20e Author: Xin Long Date: Wed Nov 16 15:01:22 2022 -0500 selftests: add a selftest for sctp vrf This patch adds 12 small test cases: 01-04 test for the sysctl net.sctp.l3mdev_accept. 05-10 test for only binding to a right l3mdev device, the connection can be created. 11-12 test for two socks binding to different l3mdev devices at the same time, each of them can process the packets from the corresponding peer. The tests run for both IPv4 and IPv6 SCTP. Signed-off-by: Xin Long Signed-off-by: David S. Miller tools/testing/selftests/net/Makefile | 2 + tools/testing/selftests/net/sctp_hello.c | 137 ++++++++++++++++++++++++ tools/testing/selftests/net/sctp_vrf.sh | 178 +++++++++++++++++++++++++++++++ 3 files changed, 317 insertions(+) commit b712d0328c2c3ab456847f29f711e785f70cd8a5 Author: Xin Long Date: Wed Nov 16 15:01:21 2022 -0500 sctp: add sysctl net.sctp.l3mdev_accept This patch is to add sysctl net.sctp.l3mdev_accept to allow users to change the pernet global l3mdev_accept. Signed-off-by: Xin Long Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.rst | 9 +++++++++ net/sctp/sysctl.c | 11 +++++++++++ 2 files changed, 20 insertions(+) commit 0af03170637f47fb5cc6501d4b2dcbf1c14772a9 Author: Xin Long Date: Wed Nov 16 15:01:20 2022 -0500 sctp: add dif and sdif check in asoc and ep lookup This patch at first adds a pernet global l3mdev_accept to decide if it accepts the packets from a l3mdev when a SCTP socket doesn't bind to any interface. It's set to 1 to avoid any possible incompatible issue, and in next patch, a sysctl will be introduced to allow to change it. Then similar to inet/udp_sk_bound_dev_eq(), sctp_sk_bound_dev_eq() is added to check either dif or sdif is equal to sk_bound_dev_if, and to check sid is 0 or l3mdev_accept is 1 if sk_bound_dev_if is not set. This function is used to match a association or a endpoint, namely called by sctp_addrs_lookup_transport() and sctp_endpoint_is_match(). All functions that needs updating are: sctp_rcv(): asoc: __sctp_rcv_lookup() __sctp_lookup_association() -> sctp_addrs_lookup_transport() __sctp_rcv_lookup_harder() __sctp_rcv_init_lookup() __sctp_lookup_association() -> sctp_addrs_lookup_transport() __sctp_rcv_walk_lookup() __sctp_rcv_asconf_lookup() __sctp_lookup_association() -> sctp_addrs_lookup_transport() ep: __sctp_rcv_lookup_endpoint() -> sctp_endpoint_is_match() sctp_connect(): sctp_endpoint_is_peeled_off() __sctp_lookup_association() sctp_has_association() sctp_lookup_association() __sctp_lookup_association() -> sctp_addrs_lookup_transport() sctp_diag_dump_one(): sctp_transport_lookup_process() -> sctp_addrs_lookup_transport() Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/netns/sctp.h | 4 ++ include/net/sctp/sctp.h | 6 ++- include/net/sctp/structs.h | 8 ++-- net/sctp/diag.c | 3 +- net/sctp/endpointola.c | 13 ++++-- net/sctp/input.c | 108 +++++++++++++++++++++++++-------------------- net/sctp/protocol.c | 4 ++ net/sctp/socket.c | 4 +- 8 files changed, 89 insertions(+), 61 deletions(-) commit 33e93ed2209d5971043bed41dd194bc583b57ef3 Author: Xin Long Date: Wed Nov 16 15:01:19 2022 -0500 sctp: add skb_sdif in struct sctp_af Add skb_sdif function in struct sctp_af to get the enslaved device for both ipv4 and ipv6 when adding SCTP VRF support in sctp_rcv in the next patch. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 1 + net/sctp/ipv6.c | 8 +++++++- net/sctp/protocol.c | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) commit f87b1ac06c887210782eab9f105ffd9045be74cc Author: Xin Long Date: Wed Nov 16 15:01:18 2022 -0500 sctp: check sk_bound_dev_if when matching ep in get_port In sctp_get_port_local(), when binding to IP and PORT, it should also check sk_bound_dev_if to match listening sk if it's set by SO_BINDTOIFINDEX, so that multiple sockets with the same IP and PORT, but different sk_bound_dev_if can be listened at the same time. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6fe1e52490a91cb23f6b3aafc93e7c5beb99f862 Author: Xin Long Date: Wed Nov 16 15:01:17 2022 -0500 sctp: check ipv6 addr with sk_bound_dev if set When binding to an ipv6 address, it calls ipv6_chk_addr() to check if this address is on any dev. If a socket binds to a l3mdev but no dev is passed to do this check, all l3mdev and slaves will be skipped and the check will fail. This patch is to pass the bound_dev to make sure the devices under the same l3mdev can be returned in ipv6_chk_addr(). When the bound_dev is not a l3mdev or l3slave, l3mdev_master_dev_rcu() will return NULL in __ipv6_chk_addr_and_flags(), it will keep compitable with before when NULL dev was passed. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/ipv6.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 26943aefa8704ca7871c34a2d1b2b2a418372666 Author: Xin Long Date: Wed Nov 16 15:01:16 2022 -0500 sctp: verify the bind address with the tb_id from l3mdev After binding to a l3mdev, it should use the route table from the corresponding VRF to verify the addr when binding to an address. Note ipv6 doesn't need it, as binding to ipv6 address does not verify the addr with route lookup. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/protocol.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 0b6ffefbb018462856dd8ee22735f8c9aecb2c80 Author: Jiawen Wu Date: Wed Nov 16 09:58:35 2022 +0800 net: libwx: Fix dead code for duplicate check Fix duplicate check on polling timeout. Fixes: 1efa9bfe58c5 ("net: libwx: Implement interaction with firmware") Signed-off-by: Jiawen Wu Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/wangxun/libwx/wx_hw.c | 2 -- 1 file changed, 2 deletions(-) commit 196dff2712ca5a2e651977bb2fe6b05474111a83 Author: Ard Biesheuvel Date: Thu Oct 20 10:39:10 2022 +0200 efi: random: combine bootloader provided RNG seed with RNG protocol output Instead of blindly creating the EFI random seed configuration table if the RNG protocol is implemented and works, check whether such a EFI configuration table was provided by an earlier boot stage and if so, concatenate the existing and the new seeds, leaving it up to the core code to mix it in and credit it the way it sees fit. This can be used for, e.g., systemd-boot, to pass an additional seed to Linux in a way that can be consumed by the kernel very early. In that case, the following definitions should be used to pass the seed to the EFI stub: struct linux_efi_random_seed { u32 size; // of the 'seed' array in bytes u8 seed[]; }; The memory for the struct must be allocated as EFI_ACPI_RECLAIM_MEMORY pool memory, and the address of the struct in memory should be installed as a EFI configuration table using the following GUID: LINUX_EFI_RANDOM_SEED_TABLE_GUID 1ce1e5bc-7ceb-42f2-81e5-8aadf180f57b Note that doing so is safe even on kernels that were built without this patch applied, but the seed will simply be overwritten with a seed derived from the EFI RNG protocol, if available. The recommended seed size is 32 bytes, and seeds larger than 512 bytes are considered corrupted and ignored entirely. In order to preserve forward secrecy, seeds from previous bootloaders are memzero'd out, and in order to preserve memory, those older seeds are also freed from memory. Freeing from memory without first memzeroing is not safe to do, as it's possible that nothing else will ever overwrite those pages used by EFI. Reviewed-by: Jason A. Donenfeld [ardb: incorporate Jason's followup changes to extend the maximum seed size on the consumer end, memzero() it and drop a needless printk] Signed-off-by: Ard Biesheuvel drivers/firmware/efi/efi.c | 4 ++-- drivers/firmware/efi/libstub/efistub.h | 2 ++ drivers/firmware/efi/libstub/random.c | 42 +++++++++++++++++++++++++++++----- include/linux/efi.h | 2 -- 4 files changed, 40 insertions(+), 10 deletions(-) commit 0dc33c65835d456e42de509ba17563caa6a9d4c1 Author: Antoine Tenart Date: Tue Nov 15 16:44:51 2022 +0100 net: phy: mscc: macsec: do not copy encryption keys Following 1b16b3fdf675 ("net: phy: mscc: macsec: clear encryption keys when freeing a flow"), go one step further and instead of calling memzero_explicit on the key when freeing a flow, simply not copy the key in the first place as it's only used when a new flow is set up. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/phy/mscc/mscc_macsec.c | 57 ++++++++++++++++++++------------------ drivers/net/phy/mscc/mscc_macsec.h | 2 -- 2 files changed, 30 insertions(+), 29 deletions(-) commit 75df46b598b5b46b0857ee7d2410deaf215e23d1 Author: Wenkai Lin Date: Sat Nov 12 08:51:05 2022 +0000 crypto: hisilicon/sec - remove continuous blank lines Fix that put two or more continuous blank lines inside function. Signed-off-by: Wenkai Lin Signed-off-by: Kai Ye Signed-off-by: Herbert Xu drivers/crypto/hisilicon/sec2/sec_crypto.c | 1 - drivers/crypto/hisilicon/sec2/sec_main.c | 1 - 2 files changed, 2 deletions(-) commit 2132d4efaa66388f1f79c79a920908a22464686b Author: Kai Ye Date: Sat Nov 12 08:51:04 2022 +0000 crypto: hisilicon/sec - fix spelling mistake 'ckeck' -> 'check' There are a couple of spelling mistakes in sec2. Fix them. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu drivers/crypto/hisilicon/sec2/sec_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c75609842f091fa814153d21243b07988dc8ef3 Author: Kai Ye Date: Sat Nov 12 02:12:53 2022 +0000 crypto: hisilicon/qm - the command dump process is modified Reduce the function complexity by use the function table in the process of dumping queue. The function input parameters are unified. And maintainability is enhanced. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu drivers/crypto/hisilicon/debugfs.c | 130 +++++++++++++++++++++++++------------ 1 file changed, 90 insertions(+), 40 deletions(-) commit 94476b2b6d60bc926a585ae62e1bf69bd22c1dff Author: Kai Ye Date: Sat Nov 12 02:12:52 2022 +0000 crypto: hisilicon/qm - split a debugfs.c from qm Considering that the qm feature and debugfs feature are independent. The code related to debugfs is getting larger and larger. It should be separate as a debugfs file. So move some debugfs code to new file from qm file. The qm code logic is not modified. And maintainability is enhanced. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu drivers/crypto/hisilicon/Makefile | 2 +- drivers/crypto/hisilicon/debugfs.c | 1097 +++++++++++++++++++++++++++ drivers/crypto/hisilicon/qm.c | 1348 +++------------------------------- drivers/crypto/hisilicon/qm_common.h | 87 +++ 4 files changed, 1277 insertions(+), 1257 deletions(-) commit b40b62ed7b0ffe8eb2e6fe8bcfb47027c9a93e93 Author: Kai Ye Date: Sat Nov 12 02:12:51 2022 +0000 crypto: hisilicon/qm - modify the process of regs dfx The last register logic and different register logic are combined. Use "u32" instead of 'int' in the regs function input parameter to simplify some checks. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu drivers/crypto/hisilicon/hpre/hpre_main.c | 7 +- drivers/crypto/hisilicon/qm.c | 151 +++++++++++++++++------------- drivers/crypto/hisilicon/sec2/sec_main.c | 7 +- drivers/crypto/hisilicon/zip/zip_main.c | 7 +- include/linux/hisi_acc_qm.h | 8 +- 5 files changed, 99 insertions(+), 81 deletions(-) commit 7bbbc9d81be588ae4fb28b5b202e4421dbfef197 Author: Kai Ye Date: Sat Nov 12 02:12:50 2022 +0000 crypto: hisilicon/qm - delete redundant null assignment operations There is no security data in the pointer. It is only a value transferred as a structure. It makes no sense to zero a variable that is on the stack. So not need to set the pointer to null. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 1 - 1 file changed, 1 deletion(-) commit e6cb02bd0a52457e486a752da5db7b67f2540c16 Author: Herbert Xu Date: Fri Nov 11 18:05:41 2022 +0800 crypto: skcipher - Allow sync algorithms with large request contexts Some sync algorithms may require a large amount of temporary space during its operations. There is no reason why they should be limited just because some legacy users want to place all temporary data on the stack. Such algorithms can now set a flag to indicate that they need extra request context, which will cause them to be invisible to users that go through the sync_skcipher interface. Signed-off-by: Herbert Xu crypto/skcipher.c | 2 +- include/crypto/internal/skcipher.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit cc7710d0d4ebc6998f04035cde4f32c5ddbe9d7f Author: Xiongfeng Wang Date: Fri Nov 11 18:00:36 2022 +0800 crypto: hisilicon/qm - add missing pci_dev_put() in q_num_set() pci_get_device() will increase the reference count for the returned pci_dev. We need to use pci_dev_put() to decrease the reference count before q_num_set() returns. Fixes: c8b4b477079d ("crypto: hisilicon - add HiSilicon HPRE accelerator") Signed-off-by: Xiongfeng Wang Reviewed-by: Weili Qian Signed-off-by: Herbert Xu include/linux/hisi_acc_qm.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3a58c231172537f7b0e19d93ed33decd04f80eab Author: Herbert Xu Date: Fri Nov 11 17:59:17 2022 +0800 crypto: cryptd - Use request context instead of stack for sub-request cryptd is buggy as it tries to use sync_skcipher without going through the proper sync_skcipher interface. In fact it doesn't even need sync_skcipher since it's already a proper skcipher and can easily access the request context instead of using something off the stack. Fixes: 36b3875a97b8 ("crypto: cryptd - Remove VLA usage of skcipher") Signed-off-by: Herbert Xu crypto/cryptd.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 824db5cd1ec9b95c254fc317c3999f6b53e98b12 Author: Tianjia Zhang Date: Thu Nov 10 18:42:04 2022 +0800 crypto: arm64 - Fix unused variable compilation warnings of cpu_feature The cpu feature defined by MODULE_DEVICE_TABLE is only referenced when compiling as a module, and the warning of unused variable will be encountered when compiling with intree. The warning can be removed by adding the __maybe_unused flag. Fixes: 03c9a333fef1 ("crypto: arm64/ghash - add NEON accelerated fallback for 64-bit PMULL") Fixes: ae1b83c7d572 ("crypto: arm64/sm4 - add CE implementation for GCM mode") Reported-by: kernel test robot Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/ghash-ce-glue.c | 2 +- arch/arm64/crypto/sm4-ce-gcm-glue.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4f1c596df706c9aca662b6c214fad84047ae2a97 Author: Gaosheng Cui Date: Tue Nov 8 16:29:12 2022 +0800 crypto: ccree - Remove debugfs when platform_driver_register failed When platform_driver_register failed, we need to remove debugfs, which will caused a resource leak, fix it. Failed logs as follows: [ 32.606488] debugfs: Directory 'ccree' with parent '/' already present! Fixes: 4c3f97276e15 ("crypto: ccree - introduce CryptoCell driver") Signed-off-by: Gaosheng Cui Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_driver.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7cdc5e6bcd02ab45d0a2991b35861b448e355276 Author: Tomas Marek Date: Tue Nov 8 07:42:40 2022 +0100 hwrng: stm32 - rename readl return value Use a more meaningful name for the readl return value variable. Link: https://lore.kernel.org/all/Y1J3QwynPFIlfrIv@loth.rohan.me.apana.org.au/ Signed-off-by: Tomas Marek Signed-off-by: Herbert Xu drivers/char/hw_random/stm32-rng.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 16bdbae394280f1d97933d919023eccbf0b564bd Author: Jason A. Donenfeld Date: Mon Nov 7 13:24:55 2022 +0100 hwrng: core - treat default_quality as a maximum and default to 1024 Most hw_random devices return entropy which is assumed to be of full quality, but driver authors don't bother setting the quality knob. Some hw_random devices return less than full quality entropy, and then driver authors set the quality knob. Therefore, the entropy crediting should be opt-out rather than opt-in per-driver, to reflect the actual reality on the ground. For example, the two Raspberry Pi RNG drivers produce full entropy randomness, and both EDK2 and U-Boot's drivers for these treat them as such. The result is that EFI then uses these numbers and passes the to Linux, and Linux credits them as boot, thereby initializing the RNG. Yet, in Linux, the quality knob was never set to anything, and so on the chance that Linux is booted without EFI, nothing is ever credited. That's annoying. The same pattern appears to repeat itself throughout various drivers. In fact, very very few drivers have bothered setting quality=1024. Looking at the git history of existing drivers and corresponding mailing list discussion, this conclusion tracks. There's been a decent amount of discussion about drivers that set quality < 1024 -- somebody read and interepreted a datasheet, or made some back of the envelope calculation somehow. But there's been very little, if any, discussion about most drivers where the quality is just set to 1024 or unset (or set to 1000 when the authors misunderstood the API and assumed it was base-10 rather than base-2); in both cases the intent was fairly clear of, "this is a hardware random device; it's fine." So let's invert this logic. A hw_random struct's quality knob now controls the maximum quality a driver can produce, or 0 to specify 1024. Then, the module-wide switch called "default_quality" is changed to represent the maximum quality of any driver. By default it's 1024, and the quality of any particular driver is then given by: min(default_quality, rng->quality ?: 1024); This way, the user can still turn this off for weird reasons (and we can replace whatever driver-specific disabling hacks existed in the past), yet we get proper crediting for relevant RNGs. Cc: Dominik Brodowski Cc: Ard Biesheuvel Cc: Herbert Xu Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu arch/um/drivers/random.c | 1 - drivers/char/hw_random/cavium-rng-vf.c | 1 - drivers/char/hw_random/cn10k-rng.c | 1 - drivers/char/hw_random/core.c | 9 +++------ drivers/char/hw_random/mpfs-rng.c | 1 - drivers/char/hw_random/npcm-rng.c | 1 - drivers/char/hw_random/s390-trng.c | 1 - drivers/char/hw_random/timeriomem-rng.c | 2 -- drivers/char/hw_random/virtio-rng.c | 1 - drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c | 1 - drivers/crypto/atmel-sha204a.c | 1 - drivers/crypto/caam/caamrng.c | 1 - drivers/firmware/turris-mox-rwtm.c | 1 - drivers/s390/crypto/zcrypt_api.c | 6 ------ drivers/usb/misc/chaoskey.c | 1 - include/linux/hw_random.h | 2 +- 16 files changed, 4 insertions(+), 27 deletions(-) commit a63ae7db698a58ba9450b24742394c0f16b2899e Author: Krzysztof Kozlowski Date: Tue Nov 15 11:50:49 2022 +0100 ARM: dts: lpc32xx: trim addresses to 8 digits Hex numbers in addresses and sizes should be rather eight digits, not nine. Drop leading zeros. No functional change (same DTB). Link: https://lore.kernel.org/r/20221115105049.95313-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/lpc32xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4231f626e780e3186fe4561b8cadf57673e3cd0 Author: Krzysztof Kozlowski Date: Tue Nov 15 11:50:51 2022 +0100 ARM: dts: imx: trim addresses to 8 digits Hex numbers in addresses and sizes should be rather eight digits, not nine. Drop leading zeros. No functional change (same DTB). Link: https://lore.kernel.org/r/20221115105051.95345-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/imx6sx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2bb0f35ab02a226400122a109633042076e1dd26 Author: Krzysztof Kozlowski Date: Tue Nov 15 11:50:53 2022 +0100 ARM: dts: omap: trim addresses to 8 digits Hex numbers in addresses and sizes should be rather eight digits, not nine. Drop leading zeros. No functional change (same DTB). Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20221115105053.95430-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/am335x-evm.dts | 2 +- arch/arm/boot/dts/am335x-igep0033.dtsi | 4 ++-- arch/arm/boot/dts/am437x-idk-evm.dts | 2 +- arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- arch/arm/boot/dts/am57xx-idk-common.dtsi | 2 +- arch/arm/boot/dts/dra7-evm-common.dtsi | 2 +- arch/arm/boot/dts/dra7-evm.dts | 2 +- arch/arm/boot/dts/dra72-evm-common.dtsi | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) commit 91dd31146f06f37cdf59c5478d0058ac9f246a72 Merge: 196270c5d6f3 b14ef61314b3 Author: Linus Walleij Date: Fri Nov 18 09:20:20 2022 +0100 Merge tag 'intel-pinctrl-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v6.2-1 * Add Intel Moorefield pin control driver * Deduplicate COMMUNITY() macro in the Intel pin control drivers * Switch Freescale GPIO driver to use fwnode instead of of_node * Miscellaneous clenups here and there The following is an automated git shortlog grouped by driver: alderlake: - Deduplicate COMMUNITY macro code cannonlake: - Deduplicate COMMUNITY macro code device property: - Introduce fwnode_device_is_compatible() helper icelake: - Deduplicate COMMUNITY macro code intel: - Add Intel Moorefield pin controller support - Use temporary variable for struct device - Use str_enable_disable() helper merrifield: - Use temporary variable for struct device qcom: - lpass-lpi: Add missed bitfield.h soc: - fsl: qe: Switch to use fwnode instead of of_node sunrisepoint: - Deduplicate COMMUNITY macro code tigerlake: - Deduplicate COMMUNITY macro code commit 2fb6999dd06f3718dcca2cf9b11ea6c9ea9da833 Author: Smita Koralahalli Date: Fri Oct 28 20:09:50 2022 +0000 efi/cper, cxl: Decode CXL Error Log Print the CXL Error Log field as found in CXL Protocol Error Section. The CXL RAS Capability structure will be reused by OS First Handling and the duplication/appropriate placement will be addressed eventually. Signed-off-by: Smita Koralahalli Reviewed-by: Jonathan Cameron Signed-off-by: Ard Biesheuvel drivers/firmware/efi/cper_cxl.c | 27 +++++++++++++++++++++++++++ include/linux/cxl_err.h | 22 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit abdbf1a25daf42983a7becb6f6532ac7917951b0 Author: Smita Koralahalli Date: Fri Oct 28 20:09:49 2022 +0000 efi/cper, cxl: Decode CXL Protocol Error Section Add support for decoding CXL Protocol Error Section as defined in UEFI 2.10 Section N.2.13. Do the section decoding in a new cper_cxl.c file. This new file will be used in the future for more CXL CPERs decode support. Add this to the existing UEFI_CPER config. Signed-off-by: Smita Koralahalli Reviewed-by: Jonathan Cameron Signed-off-by: Ard Biesheuvel drivers/firmware/efi/Makefile | 2 +- drivers/firmware/efi/cper.c | 9 +++ drivers/firmware/efi/cper_cxl.c | 152 ++++++++++++++++++++++++++++++++++++++++ drivers/firmware/efi/cper_cxl.h | 66 +++++++++++++++++ 4 files changed, 228 insertions(+), 1 deletion(-) commit d981a88c1669aa350f06db142860564e4330ed0c Author: Jialin Zhang Date: Tue Nov 8 10:53:10 2022 +0800 efi: libstub: fix efi_load_initrd_dev_path() kernel-doc comment commit f4dc7fffa987 ("efi: libstub: unify initrd loading between architectures") merge the first and the second parameters into a struct without updating the kernel-doc. Let's fix it. Signed-off-by: Jialin Zhang Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/efi-stub-helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1fff234de2b6047ee311c6bf88f31ad5008f2889 Author: Ard Biesheuvel Date: Mon Nov 7 09:17:16 2022 +0100 efi: x86: Move EFI runtime map sysfs code to arch/x86 The EFI runtime map code is only wired up on x86, which is the only architecture that has a need for it in its implementation of kexec. So let's move this code under arch/x86 and drop all references to it from generic code. To ensure that the efi_runtime_map_init() is invoked at the appropriate time use a 'sync' subsys_initcall() that will be called right after the EFI initcall made from generic code where the original invocation of efi_runtime_map_init() resided. Signed-off-by: Ard Biesheuvel Reviewed-by: Dave Young arch/x86/Kconfig | 11 +++++++++ arch/x86/include/asm/efi.h | 22 +++++++++++++++++ arch/x86/platform/efi/Makefile | 1 + .../x86/platform}/efi/runtime-map.c | 7 +++--- drivers/firmware/efi/Kconfig | 11 --------- drivers/firmware/efi/Makefile | 1 - drivers/firmware/efi/efi.c | 5 +--- include/linux/efi.h | 28 ---------------------- 8 files changed, 39 insertions(+), 47 deletions(-) commit 8dfac4d8ad27c168c6e778adbebaac85b92606d8 Author: Ard Biesheuvel Date: Mon Nov 7 08:42:08 2022 +0100 efi: runtime-maps: Clarify purpose and enable by default for kexec The current Kconfig logic for CONFIG_EFI_RUNTIME_MAPS does not convey that without it, a kexec kernel is not able to boot in EFI mode at all. So clarify this, and make the option only configurable via the menu system if CONFIG_EXPERT is set. Signed-off-by: Ard Biesheuvel Reviewed-by: Dave Young drivers/firmware/efi/Kconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 36d5786a1c5533049dc1c26c75e98682bc803a31 Author: Guilherme G. Piccoli Date: Tue Nov 1 15:48:07 2022 -0300 efi: pstore: Add module parameter for setting the record size By default, the efi-pstore backend hardcode the UEFI variable size as 1024 bytes. The historical reasons for that were discussed by Ard in threads [0][1]: "there is some cargo cult from prehistoric EFI times going on here, it seems. Or maybe just misinterpretation of the maximum size for the variable *name* vs the variable itself.". "OVMF has OvmfPkg/OvmfPkgX64.dsc: gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 OvmfPkg/OvmfPkgX64.dsc: gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x8400 where the first one is without secure boot and the second with secure boot. Interestingly, the default is gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x400 so this is probably where this 1k number comes from." With that, and since there is not such a limit in the UEFI spec, we have the confidence to hereby add a module parameter to enable advanced users to change the UEFI record size for efi-pstore data collection, this way allowing a much easier reading of the collected log, which wouldn't be scattered anymore among many small files. Through empirical analysis we observed that extreme low values (like 8 bytes) could eventually cause writing issues, so given that and the OVMF default discussed, we limited the minimum value to 1024 bytes, which also is still the default. [0] https://lore.kernel.org/lkml/CAMj1kXF4UyRMh2Y_KakeNBHvkHhTtavASTAxXinDO1rhPe_wYg@mail.gmail.com/ [1] https://lore.kernel.org/lkml/CAMj1kXFy-2KddGu+dgebAdU9v2sindxVoiHLWuVhqYw+R=kqng@mail.gmail.com/ Signed-off-by: Guilherme G. Piccoli Signed-off-by: Ard Biesheuvel drivers/firmware/efi/efi-pstore.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit d85e3e34940788578eeffd94e8b7e1d28e7278e9 Author: Ard Biesheuvel Date: Sat Oct 1 17:17:36 2022 +0200 efi: xen: Set EFI_PARAVIRT for Xen dom0 boot on all architectures Currently, the EFI_PARAVIRT flag is only used by Xen dom0 boot on x86, even though other architectures also support pseudo-EFI boot, where the core kernel is invoked directly and provided with a set of data tables that resemble the ones constructed by the EFI stub, which never actually runs in that case. Let's fix this inconsistency, and always set this flag when booting dom0 via the EFI boot path. Note that Xen on x86 does not provide the EFI memory map in this case, whereas other architectures do, so move the associated EFI_PARAVIRT check into the x86 platform code. Signed-off-by: Ard Biesheuvel arch/x86/platform/efi/efi.c | 8 +++++--- arch/x86/platform/efi/memmap.c | 3 +++ drivers/firmware/efi/fdtparams.c | 4 ++++ drivers/firmware/efi/memmap.c | 3 --- 4 files changed, 12 insertions(+), 6 deletions(-) commit fdc6d38d64a20c542b1867ebeb8dd03b98829336 Author: Ard Biesheuvel Date: Sat Oct 1 19:09:24 2022 +0200 efi: memmap: Move manipulation routines into x86 arch tree The EFI memory map is a description of the memory layout as provided by the firmware, and only x86 manipulates it in various different ways for its own memory bookkeeping. So let's move the memmap routines that are only used by x86 into the x86 arch tree. Signed-off-by: Ard Biesheuvel arch/x86/include/asm/efi.h | 12 +++ arch/x86/platform/efi/Makefile | 3 +- arch/x86/platform/efi/memmap.c | 236 ++++++++++++++++++++++++++++++++++++++++ drivers/firmware/efi/memmap.c | 240 ++--------------------------------------- include/linux/efi.h | 10 +- 5 files changed, 261 insertions(+), 240 deletions(-) commit 4059ba656ce5c13c8ca345955712152ae41420c8 Author: Ard Biesheuvel Date: Sat Oct 1 18:38:15 2022 +0200 efi: memmap: Move EFI fake memmap support into x86 arch tree The EFI fake memmap support is specific to x86, which manipulates the EFI memory map in various different ways after receiving it from the EFI stub. On other architectures, we have managed to push back on this, and the EFI memory map is kept pristine. So let's move the fake memmap code into the x86 arch tree, where it arguably belongs. Signed-off-by: Ard Biesheuvel arch/x86/Kconfig | 20 ++++++ arch/x86/include/asm/efi.h | 5 ++ arch/x86/kernel/setup.c | 1 + arch/x86/platform/efi/Makefile | 1 + .../firmware => arch/x86/platform}/efi/fake_mem.c | 79 +++++++++++++++++++++- drivers/firmware/efi/Kconfig | 22 ------ drivers/firmware/efi/Makefile | 4 -- drivers/firmware/efi/fake_mem.h | 10 --- drivers/firmware/efi/x86_fake_mem.c | 75 -------------------- include/linux/efi.h | 6 -- 10 files changed, 103 insertions(+), 120 deletions(-) commit 75e1a2460d79566bf1e43e5a3a7a9039510a82e0 Author: Ard Biesheuvel Date: Mon Sep 26 23:23:04 2022 +0200 efi: libstub: Undeprecate the command line initrd loader The initrd= command line loader can be useful for development, but it was limited to loading files from the same file system as the loaded kernel (and it didn't work on x86 mixed mode). As both issues have been fixed, and the initrd= can now be used with files residing on any simple file system exposed by the EFI firmware, let's permit it to be enabled on RISC-V and LoongArch, which did not support it up to this point. Note that LoadFile2 remains the preferred option, as it is much simpler to use and implement, but generic loaders (including the UEFI shell) may not implement this so there, initrd= can now be used as well (if enabled in the build) Signed-off-by: Ard Biesheuvel drivers/firmware/efi/Kconfig | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit f8a31244d73288bd623a0247512f6c0b81844a92 Author: Ard Biesheuvel Date: Mon Sep 26 22:17:21 2022 +0200 efi: libstub: Add mixed mode support to command line initrd loader Now that we have support for calling protocols that need additional marshalling for mixed mode, wire up the initrd command line loader. Signed-off-by: Ard Biesheuvel arch/x86/include/asm/efi.h | 11 ++++ drivers/firmware/efi/libstub/efi-stub-helper.c | 2 +- drivers/firmware/efi/libstub/efistub.h | 81 +++++++++++++++++--------- drivers/firmware/efi/libstub/file.c | 32 +++++----- 4 files changed, 83 insertions(+), 43 deletions(-) commit a61962d8e7d3f11f68cbaebd477fbd8e1f7b9f6d Author: Ard Biesheuvel Date: Mon Sep 26 21:14:23 2022 +0200 efi: libstub: Permit mixed mode return types other than efi_status_t Rework the EFI stub macro wrappers around protocol method calls and other indirect calls in order to allow return types other than efi_status_t. This means the widening should be conditional on whether or not the return type is efi_status_t, and should be omitted otherwise. Also, switch to _Generic() to implement the type based compile time conditionals, which is more concise, and distinguishes between efi_status_t and u64 properly. Signed-off-by: Ard Biesheuvel arch/x86/boot/compressed/efi_thunk_64.S | 6 --- arch/x86/include/asm/efi.h | 65 +++++++++++++++------------------ drivers/firmware/efi/libstub/efistub.h | 20 +++++++--- 3 files changed, 44 insertions(+), 47 deletions(-) commit 70912985545adc81716164271401c9ffb0acdd0f Author: Ard Biesheuvel Date: Mon Sep 26 21:32:16 2022 +0200 efi: libstub: Implement devicepath support for initrd commandline loader Currently, the initrd= command line option to the EFI stub only supports loading files that reside on the same volume as the loaded image, which is not workable for loaders like GRUB that don't even implement the volume abstraction (EFI_SIMPLE_FILE_SYSTEM_PROTOCOL), and load the kernel from an anonymous buffer in memory. For this reason, another method was devised that relies on the LoadFile2 protocol. However, the command line loader is rather useful when using the UEFI shell or other generic loaders that have no awareness of Linux specific protocols so let's make it a bit more flexible, by permitting textual device paths to be provided to initrd= as well, provided that they refer to a file hosted on a EFI_SIMPLE_FILE_SYSTEM_PROTOCOL volume. E.g., initrd=PciRoot(0x0)/Pci(0x3,0x0)/HD(1,MBR,0xBE1AFDFA,0x3F,0xFBFC1)/rootfs.cpio.gz Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/efistub.h | 15 +++++++ drivers/firmware/efi/libstub/file.c | 78 ++++++++++++++++++++++++++++------ include/linux/efi.h | 6 +++ 3 files changed, 87 insertions(+), 12 deletions(-) commit 9cf42bca30e98a1c6c9e8abf876940a551eaa3d1 Author: Ard Biesheuvel Date: Tue Aug 2 11:00:16 2022 +0200 efi: libstub: use EFI_LOADER_CODE region when moving the kernel in memory The EFI spec is not very clear about which permissions are being given when allocating pages of a certain type. However, it is quite obvious that EFI_LOADER_CODE is more likely to permit execution than EFI_LOADER_DATA, which becomes relevant once we permit booting the kernel proper with the firmware's 1:1 mapping still active. Ostensibly, recent systems such as the Surface Pro X grant executable permissions to EFI_LOADER_CODE regions but not EFI_LOADER_DATA regions. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/alignedmem.c | 5 +++-- drivers/firmware/efi/libstub/arm64-stub.c | 6 ++++-- drivers/firmware/efi/libstub/efistub.h | 6 ++++-- drivers/firmware/efi/libstub/mem.c | 3 ++- drivers/firmware/efi/libstub/randomalloc.c | 5 +++-- 5 files changed, 16 insertions(+), 9 deletions(-) commit 977122898ea5e3d568014ec9fe089cfba7c73e76 Merge: 094226ad94f4 c51e97e7f129 Author: Ard Biesheuvel Date: Fri Nov 18 09:13:57 2022 +0100 Merge tag 'efi-zboot-direct-for-v6.2' into efi/next commit c984aef8c8326035570ff6e01d0ff9e79a5dfa76 Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:54 2022 +0530 objtool/powerpc: Add --mcount specific implementation This patch enables objtool --mcount on powerpc, and adds implementation specific to powerpc. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-17-sv@linux.ibm.com arch/powerpc/Kconfig | 1 + tools/objtool/arch/powerpc/decode.c | 16 ++++++++++++++++ tools/objtool/arch/powerpc/include/arch/elf.h | 2 ++ 3 files changed, 19 insertions(+) commit e52ec98c5ab18c0710ea22bf52f45e60a725adaf Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:53 2022 +0530 objtool/powerpc: Enable objtool to be built on ppc This patch adds [stub] implementations for required functions, inorder to enable objtool build on powerpc. [Christophe Leroy: powerpc: Add missing asm/asm.h for objtool, Use local variables for type and imm in arch_decode_instruction(), Adapt len for prefixed instructions.] Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-16-sv@linux.ibm.com arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/asm.h | 7 ++ tools/objtool/arch/powerpc/Build | 2 + tools/objtool/arch/powerpc/decode.c | 85 ++++++++++++++++++++++ tools/objtool/arch/powerpc/include/arch/cfi_regs.h | 11 +++ tools/objtool/arch/powerpc/include/arch/elf.h | 8 ++ tools/objtool/arch/powerpc/include/arch/special.h | 21 ++++++ tools/objtool/arch/powerpc/special.c | 19 +++++ 8 files changed, 154 insertions(+) commit 4ca993d498987332ceeedee5380101b84accaf35 Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:52 2022 +0530 objtool: Add arch specific function arch_ftrace_match() Add architecture specific function to look for relocation records pointing to architecture specific symbols. Suggested-by: Christophe Leroy Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-15-sv@linux.ibm.com tools/objtool/arch/x86/decode.c | 5 +++++ tools/objtool/check.c | 2 +- tools/objtool/include/objtool/arch.h | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) commit c1449735211dd8c4c2d54fa0ece6890ecbd74e24 Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:51 2022 +0530 objtool: Use macros to define arch specific reloc types Make relocation types architecture specific. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-14-sv@linux.ibm.com tools/objtool/arch/x86/include/arch/elf.h | 2 ++ tools/objtool/check.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit de6fbcedf5abce4c321eeb15d7d286b79804b8b6 Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:50 2022 +0530 objtool: Read special sections with alts only when specific options are selected Call add_special_section_alts() only when stackval or orc or uaccess or noinstr options are passed to objtool. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-13-sv@linux.ibm.com tools/objtool/check.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 280981d6994e0700abd36647b141e73059851e66 Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:49 2022 +0530 objtool: Add --mnop as an option to --mcount Some architectures (powerpc) may not support ftrace locations being nop'ed out at build time. Introduce CONFIG_HAVE_OBJTOOL_NOP_MCOUNT for objtool, as a means for architectures to enable nop'ing of ftrace locations. Add --mnop as an option to objtool --mcount, to indicate support for the same. Also, make sure that --mnop can be passed as an option to objtool only when --mcount is passed. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-12-sv@linux.ibm.com Makefile | 4 +++- arch/x86/Kconfig | 1 + kernel/trace/Kconfig | 7 +++++++ scripts/Makefile.lib | 3 +++ tools/objtool/builtin-check.c | 14 ++++++++++++++ tools/objtool/check.c | 19 ++++++++++--------- tools/objtool/include/objtool/builtin.h | 1 + 7 files changed, 39 insertions(+), 10 deletions(-) commit 86ea7f361537f825a699e86fdc9e49be19f128d1 Author: Christophe Leroy Date: Mon Nov 14 23:27:48 2022 +0530 objtool: Use target file class size instead of a compiled constant In order to allow using objtool on cross-built kernels, determine size of long from elf data instead of using sizeof(long) at build time. For the time being this covers only mcount. [Sathvika Vasireddy: Rename variable "size" to "addrsize" and function "elf_class_size()" to "elf_class_addrsize()", and modify create_mcount_loc_sections() function to follow reverse christmas tree format to order local variable declarations.] Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-11-sv@linux.ibm.com tools/objtool/check.c | 18 ++++++++++-------- tools/objtool/elf.c | 8 ++++++-- tools/objtool/include/objtool/elf.h | 8 ++++++++ 3 files changed, 24 insertions(+), 10 deletions(-) commit 0646c28b417b7fe307c9da72ca1c508e43b57dc0 Author: Christophe Leroy Date: Mon Nov 14 23:27:47 2022 +0530 objtool: Use target file endianness instead of a compiled constant Some architectures like powerpc support both endianness, it's therefore not possible to fix the endianness via arch/endianness.h because there is no easy way to get the target endianness at build time. Use the endianness recorded in the file objtool is working on. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-10-sv@linux.ibm.com tools/objtool/arch/x86/include/arch/endianness.h | 9 ------- tools/objtool/check.c | 2 +- tools/objtool/include/objtool/endianness.h | 32 ++++++++++++------------ tools/objtool/orc_dump.c | 11 ++++++-- tools/objtool/orc_gen.c | 4 +-- tools/objtool/special.c | 3 ++- 6 files changed, 30 insertions(+), 31 deletions(-) commit efb11fdb3e1a9f694fa12b70b21e69e55ec59c36 Author: Christophe Leroy Date: Mon Nov 14 23:27:46 2022 +0530 objtool: Fix SEGFAULT find_insn() will return NULL in case of failure. Check insn in order to avoid a kernel Oops for NULL pointer dereference. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-9-sv@linux.ibm.com tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0160bd5d389da247fb5affb6a35ea393d22fedb Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:45 2022 +0530 powerpc/vdso: Skip objtool from running on VDSO files Do not run objtool on VDSO files, by using OBJECT_FILES_NON_STANDARD. Suggested-by: Christophe Leroy Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-8-sv@linux.ibm.com arch/powerpc/kernel/vdso/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 2da37761671b5bdedbe04e6469cfa57cd6b6ae45 Author: Christophe Leroy Date: Mon Nov 14 23:27:44 2022 +0530 powerpc/32: Fix objtool unannotated intra-function call warnings Fix several annotations in assembly files on PPC32. [Sathvika Vasireddy: Changed subject line and removed Kconfig change to enable objtool, as it is a part of "objtool/powerpc: Enable objtool to be built on ppc" patch in this series.] Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Signed-off-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-7-sv@linux.ibm.com arch/powerpc/kernel/cpu_setup_6xx.S | 26 +++++++++++++++++-------- arch/powerpc/kernel/cpu_setup_e500.S | 8 ++++++-- arch/powerpc/kernel/entry_32.S | 9 ++++++--- arch/powerpc/kernel/head_40x.S | 5 ++++- arch/powerpc/kernel/head_85xx.S | 5 ++++- arch/powerpc/kernel/head_8xx.S | 5 ++++- arch/powerpc/kernel/head_book3s_32.S | 29 +++++++++++++++++++--------- arch/powerpc/kernel/swsusp_32.S | 5 ++++- arch/powerpc/kvm/fpu.S | 17 +++++++++++----- arch/powerpc/platforms/52xx/lite5200_sleep.S | 15 ++++++++++---- 10 files changed, 89 insertions(+), 35 deletions(-) commit 1c137323e9a2a970b4a5bf8cf3c50e0ea1cefbeb Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:43 2022 +0530 crypto: vmx: Skip objtool from running on aesp8-ppc.o With objtool enabled, below warnings are seen when trying to build: drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: aes_p8_set_encrypt_key+0x44: unannotated intra-function call drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: .text+0x2448: unannotated intra-function call drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: .text+0x2d68: unannotated intra-function call Skip objtool from running on drivers/crypto/vmx/aesp8-ppc.o file for the following reasons: - Since this file comes from OpenSSL, and since it is a perl file which generates a .S file, it may not be the best choice to make too many code changes to such files, unless absolutely necessary. - As far as the objtool --mcount functionality is concerned, we do not have to run objtool on this file because there are no calls to _mcount(). Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-6-sv@linux.ibm.com drivers/crypto/vmx/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 9f27bd701d18f012646a06bc6c1b35d81f30359b Author: Christoph Hellwig Date: Tue Nov 15 11:22:14 2022 +0100 nvme: rename the queue quiescing helpers Naming the nvme helpers that wrap the block quiesce functionality _start/_stop is rather confusing. Switch to using the quiesce naming used by the block layer instead. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/apple.c | 12 ++++++------ drivers/nvme/host/core.c | 24 ++++++++++++------------ drivers/nvme/host/fc.c | 16 ++++++++-------- drivers/nvme/host/nvme.h | 8 ++++---- drivers/nvme/host/pci.c | 16 ++++++++-------- drivers/nvme/host/rdma.c | 26 +++++++++++++------------- drivers/nvme/host/tcp.c | 28 ++++++++++++++-------------- drivers/nvme/target/loop.c | 6 +++--- 8 files changed, 68 insertions(+), 68 deletions(-) commit b76f64caa42e9bb78e177ae94e1062d876a401b1 Author: Uwe Kleine-König Date: Thu Nov 17 22:16:16 2022 -0800 Input: max8997 - convert to modern way to get a reference to a PWM pwm_request() isn't recommended to be used any more because it relies on global IDs for the PWM which comes with different difficulties. The new way to do things is to find the right PWM using a reference from the platform device. (This can be created either using a device-tree or a platform lookup table, see e.g. commit 5a4412d4a82f ("ARM: pxa: tavorevb: Use PWM lookup table") how to do this.) There are no in-tree users, so there are no other code locations that need adaption. Signed-off-by: Uwe Kleine-König Acked-by: Lee Jones Link: https://lore.kernel.org/r/20221117073543.3790449-1-u.kleine-koenig@pengutronix.de Signed-off-by: Dmitry Torokhov drivers/input/misc/max8997_haptic.c | 7 +++---- include/linux/mfd/max8997.h | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-) commit a85fbd6498441694475716a4d5c65f9d3e073faf Author: Douglas Anderson Date: Thu Nov 17 21:49:19 2022 -0800 Input: elants_i2c - properly handle the reset GPIO when power is off As can be seen in elants_i2c_power_off(), we want the reset GPIO asserted when power is off. The reset GPIO is active low so we need the reset line logic low when power is off to avoid leakage. We have a problem, though, at probe time. At probe time we haven't powered the regulators on yet but we have: devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_LOW); While that _looks_ right, it turns out that it's not. The GPIOD_OUT_LOW doesn't mean to init the GPIO to low. It means init the GPIO to "not asserted". Since this is an active low GPIO that inits it to be high. Let's fix this to properly init the GPIO. Now after both probe and power off the state of the GPIO is consistent (it's "asserted" or level low). Once we fix this, we can see that at power on time we no longer to assert the reset GPIO as the first thing. The reset GPIO is _always_ asserted before powering on. Let's fix powering on to account for this. Fixes: afe10358e47a ("Input: elants_i2c - wire up regulator support") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20221117123805.1.I9959ac561dd6e1e8e1ce7085e4de6167b27c574f@changeid Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/elants_i2c.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit c7f43645de7895a8e90cb267a9b3c46e989d8ca6 Author: Chris Morgan Date: Thu Nov 17 22:09:18 2022 -0800 Input: hynitron_cstxxx - initialize tmp to 0 to fix uninitialized variable issue In the very unlikely event the cst3xx_i2c_write() fails inside of the cst3xx_bootloader_enter() function 5 times in a row, the uninitalized value of tmp will get compared to CST3XX_BOOTLDR_CHK_VAL. Initialize the value of tmp to 0 so that in this unlikely event we are comparing 0 instead of an uninitalized variable. Fixes: 66603243f528 ("Input: add driver for Hynitron cstxxx touchscreens") Signed-off-by: Chris Morgan Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/20221117195921.2291-1-macroalpha82@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/hynitron_cstxxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a452d30f3f17e59a585beafd015ca826a609f549 Merge: 647541ea06a7 7569805ec26e Author: Jakub Kicinski Date: Thu Nov 17 21:46:58 2022 -0800 Merge branch 'net-ipa-change-gsi-firmware-load-specification' Alex Elder says: ==================== net: ipa: change GSI firmware load specification Currently, GSI firmware must be loaded for IPA before it can be used--either by the modem, or by the AP. New hardware supports a third option, with the bootloader taking responsibility for loading GSI firmware. In that case, neither the AP nor the modem needs to do that. The first patch in this series deprecates the "modem-init" Device Tree property in the IPA binding, using a new "qcom,gsi-loader" property instead. The second and third implement logic in the code to support either the "old" or the "new" way of specifying how GSI firmware is loaded. The last two patches implement a new value for the "qcom,gsi-loader" property. If the value is "skip", neither the AP nor modem needs to load the GSI firmware. The first of these patches implements the change in the IPA binding; the second implements it in the code. ==================== Link: https://lore.kernel.org/r/20221116073257.34010-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 7569805ec26e9df454ed97a4521003cde53899bb Author: Alex Elder Date: Wed Nov 16 01:32:56 2022 -0600 net: ipa: permit GSI firmware loading to be skipped Define a new value "skip" for the "qcom,gsi-loader" Device Tree property. If used, it indicates that neither the AP nor the modem need to load GSI firmware (because it has already been loaded--for example by the boot loader). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_main.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit a49c3ab7d75fe51bfaa82b7f307f1d79a827d914 Author: Alex Elder Date: Wed Nov 16 01:32:55 2022 -0600 dt-bindings: net: qcom,ipa: support skipping GSI firmware load Add a new enumerated value to those defined for the qcom,gsi-loader property. If the qcom,gsi-loader is "skip", the GSI firmware will already be loaded, so neither the AP nor modem is required to load GSI firmware. Signed-off-by: Alex Elder Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/qcom,ipa.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 07f2f8e1b7478ff1e1b3186563199305af2cd86a Author: Alex Elder Date: Wed Nov 16 01:32:54 2022 -0600 net: ipa: introduce "qcom,gsi-loader" property Introduce a new way of specifying how the GSI firmware gets loaded for IPA. Currently, this is indicated by the presence or absence of the Boolean "modem-init" Device Tree property. The new property must have a value--either "self" or "modem"--which indicates whether the AP or modem is the GSI firmware loader, respectively. For legacy systems, the new property will not exist, and the "modem-init" property will be used. For newer systems, the "qcom,gsi-loader" property *must* exist, and must have one of the two prescribed values. It is an error to have both properties defined, and it is an error for the new property to have an unrecognized value. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_main.c | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) commit 50f803d4aa7173d05a8d5106704dd1b2c68a4cb4 Author: Alex Elder Date: Wed Nov 16 01:32:53 2022 -0600 net: ipa: encapsulate decision about firmware load The GSI layer used for IPA requires firmware to be loaded. Currently either the AP or the modem loads the firmware, distinguished by whether the "modem-init" Device Tree property is defined. Some newer systems implement a third option. In preparation for that, encapsulate the code that determines how the GSI firmware gets loaded in a new function, ipa_firmware_loader(). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_main.c | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) commit 4ca0c6474f71cb136acf103aa963715e1bd2939a Author: Alex Elder Date: Wed Nov 16 01:32:52 2022 -0600 dt-bindings: net: qcom,ipa: deprecate modem-init GSI firmware for IPA must be loaded during initialization, either by the AP or by the modem. The loader is currently specified based on whether the Boolean modem-init property is present. Instead, use a new property with an enumerated value to indicate explicitly how GSI firmware gets loaded. With this in place, a third approach can be added in an upcoming patch. The new qcom,gsi-loader property has two defined values: - self: The AP loads GSI firmware - modem: The modem loads GSI firmware The modem-init property must still be supported, but is now marked deprecated. Update the example so it represents the SC7180 SoC, and provide examples for the qcom,gsi-loader, memory-region, and firmware-name properties. Signed-off-by: Alex Elder Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jakub Kicinski .../devicetree/bindings/net/qcom,ipa.yaml | 76 ++++++++++++++++------ 1 file changed, 55 insertions(+), 21 deletions(-) commit 647541ea06a7bbbcf941e501c726b3e26328c102 Author: Xin Long Date: Tue Nov 15 10:40:21 2022 -0500 sctp: move SCTP_PAD4 and SCTP_TRUNC4 to linux/sctp.h Move these two macros from net/sctp/sctp.h to linux/sctp.h, so that it will be enough to include only linux/sctp.h in nft_exthdr.c and xt_sctp.c. It should not include "net/sctp/sctp.h" if a module does not have a dependence on SCTP module. Signed-off-by: Xin Long Reviewed-by: Saeed Mahameed Link: https://lore.kernel.org/r/ef6468a687f36da06f575c2131cd4612f6b7be88.1668526821.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski include/linux/sctp.h | 5 +++++ include/net/sctp/sctp.h | 5 ----- net/netfilter/nft_exthdr.c | 1 - net/netfilter/xt_sctp.c | 1 - 4 files changed, 5 insertions(+), 7 deletions(-) commit b78c4162823dddc621649edae704b14c5973298c Author: Xin Long Date: Tue Nov 15 10:39:53 2022 -0500 sctp: change to include linux/sctp.h in net/sctp/checksum.h Currently "net/sctp/checksum.h" including "net/sctp/sctp.h" is included in quite some places in netfilter and openswitch and net/sched. It's not necessary to include "net/sctp/sctp.h" if a module does not have dependence on SCTP, "linux/sctp.h" is the right one to include. Signed-off-by: Xin Long Reviewed-by: Saeed Mahameed Link: https://lore.kernel.org/r/ca7ea96d62a26732f0491153c3979dc1c0d8d34a.1668526793.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski include/net/sctp/checksum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24f627a3a85f2b3c71e0e975a641e4f6df5df4a2 Merge: 4ab45e973c3f 242dd64375b8 Author: Jakub Kicinski Date: Thu Nov 17 21:41:41 2022 -0800 Merge branch 'implement-devlink-rate-api-and-extend-it' Michal Wilczynski says: ==================== Implement devlink-rate API and extend it This patch series implements devlink-rate for ice driver. Unfortunately current API isn't flexible enough for our use case, so there is a need to extend it. Some functions have been introduced to enable the driver to export current Tx scheduling configuration. Pasting justification for this series from commit implementing devlink-rate in ice driver(that is a part of this series): There is a need to support modification of Tx scheduler tree, in the ice driver. This will allow user to control Tx settings of each node in the internal hierarchy of nodes. As a result user will be able to use Hierarchy QoS implemented entirely in the hardware. This patch implemenents devlink-rate API. It also exports initial default hierarchy. It's mostly dictated by the fact that the tree can't be removed entirely, all we can do is enable the user to modify it. For example root node shouldn't ever be removed, also nodes that have children are off-limits. Example initial tree with 2 VF's: [root@fedora ~]# devlink port function rate show pci/0000:4b:00.0/node_27: type node parent node_26 pci/0000:4b:00.0/node_26: type node parent node_0 pci/0000:4b:00.0/node_34: type node parent node_33 pci/0000:4b:00.0/node_33: type node parent node_32 pci/0000:4b:00.0/node_32: type node parent node_16 pci/0000:4b:00.0/node_19: type node parent node_18 pci/0000:4b:00.0/node_18: type node parent node_17 pci/0000:4b:00.0/node_17: type node parent node_16 pci/0000:4b:00.0/node_21: type node parent node_20 pci/0000:4b:00.0/node_20: type node parent node_3 pci/0000:4b:00.0/node_14: type node parent node_5 pci/0000:4b:00.0/node_5: type node parent node_3 pci/0000:4b:00.0/node_13: type node parent node_4 pci/0000:4b:00.0/node_12: type node parent node_4 pci/0000:4b:00.0/node_11: type node parent node_4 pci/0000:4b:00.0/node_10: type node parent node_4 pci/0000:4b:00.0/node_9: type node parent node_4 pci/0000:4b:00.0/node_8: type node parent node_4 pci/0000:4b:00.0/node_7: type node parent node_4 pci/0000:4b:00.0/node_6: type node parent node_4 pci/0000:4b:00.0/node_4: type node parent node_3 pci/0000:4b:00.0/node_3: type node parent node_16 pci/0000:4b:00.0/node_16: type node parent node_15 pci/0000:4b:00.0/node_15: type node parent node_0 pci/0000:4b:00.0/node_2: type node parent node_1 pci/0000:4b:00.0/node_1: type node parent node_0 pci/0000:4b:00.0/node_0: type node pci/0000:4b:00.0/1: type leaf parent node_27 pci/0000:4b:00.0/2: type leaf parent node_27 Let me visualize part of the tree: +---------+ | node_0 | +---------+ | +----v----+ | node_26 | +----+----+ | +----v----+ | node_27 | +----+----+ | |-----------------| +----v----+ +----v----+ | VF 1 | | VF 2 | +----+----+ +----+----+ So at this point there is a couple things that can be done. For example we could only assign parameters to VF's. [root@fedora ~]# devlink port function rate set pci/0000:4b:00.0/1 \ tx_max 5Gbps This would cap the VF 1 BW to 5Gbps. But let's say you would like to create a completely new branch. This can be done like this: [root@fedora ~]# devlink port function rate add \ pci/0000:4b:00.0/node_custom parent node_0 [root@fedora ~]# devlink port function rate add \ pci/0000:4b:00.0/node_custom_1 parent node_custom [root@fedora ~]# devlink port function rate set \ pci/0000:4b:00.0/1 parent node_custom_1 This creates a completely new branch and reassigns VF 1 to it. A number of parameters is supported per each node: tx_max, tx_share, tx_priority and tx_weight. ==================== Link: https://lore.kernel.org/r/20221115104825.172668-1-michal.wilczynski@intel.com Signed-off-by: Jakub Kicinski commit 242dd64375b80aecd7eacb1e7c4b052c481c15e7 Author: Michal Wilczynski Date: Tue Nov 15 11:48:25 2022 +0100 Documentation: Add documentation for new devlink-rate attributes Provide documentation for newly introduced netlink attributes for devlink-rate: tx_priority and tx_weight. Mention the possibility to export tree from the driver. Signed-off-by: Michal Wilczynski Signed-off-by: Jakub Kicinski Documentation/networking/devlink/devlink-port.rst | 33 ++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 16eb4afc5d80c40a62d26cd459e89da74d602246 Author: Michal Wilczynski Date: Tue Nov 15 11:48:24 2022 +0100 ice: Add documentation for devlink-rate implementation Add documentation to a newly added devlink-rate feature. Provide some examples on how to use the commands, which netlink attributes are supported and descriptions of the attributes. Signed-off-by: Michal Wilczynski Signed-off-by: Jakub Kicinski Documentation/networking/devlink/ice.rst | 115 +++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) commit 80fe30a8c1f4d2177e1d25922cc6a8c439198103 Author: Michal Wilczynski Date: Tue Nov 15 11:48:23 2022 +0100 ice: Prevent ADQ, DCB coexistence with Custom Tx scheduler ADQ, DCB might interfere with Custom Tx Scheduler changes that user might introduce using devlink-rate API. Check if ADQ, DCB is active, when user tries to change any setting in exported Tx scheduler tree. If any of those are active block the user from doing so, and log an appropriate message. Remove the exported hierarchy if user enable ADQ or DCB. Prevent ADQ or DCB from getting configured if user already made some changes using devlink-rate API. Signed-off-by: Michal Wilczynski Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 7 +++ drivers/net/ethernet/intel/ice/ice_devlink.c | 91 ++++++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_devlink.h | 1 + drivers/net/ethernet/intel/ice/ice_main.c | 6 ++ drivers/net/ethernet/intel/ice/ice_repr.c | 5 ++ drivers/net/ethernet/intel/ice/ice_type.h | 1 + 6 files changed, 111 insertions(+) commit 42c2eb6b1f43b1f5ac06b1a4dcae5fcb036b5b20 Author: Michal Wilczynski Date: Tue Nov 15 11:48:22 2022 +0100 ice: Implement devlink-rate API There is a need to support modification of Tx scheduler tree, in the ice driver. This will allow user to control Tx settings of each node in the internal hierarchy of nodes. As a result user will be able to use Hierarchy QoS implemented entirely in the hardware. This patch implemenents devlink-rate API. It also exports initial default hierarchy. It's mostly dictated by the fact that the tree can't be removed entirely, all we can do is enable the user to modify it. For example root node shouldn't ever be removed, also nodes that have children are off-limits. Example initial tree with 2 VF's: [root@fedora ~]# devlink port function rate show pci/0000:4b:00.0/node_27: type node parent node_26 pci/0000:4b:00.0/node_26: type node parent node_0 pci/0000:4b:00.0/node_34: type node parent node_33 pci/0000:4b:00.0/node_33: type node parent node_32 pci/0000:4b:00.0/node_32: type node parent node_16 pci/0000:4b:00.0/node_19: type node parent node_18 pci/0000:4b:00.0/node_18: type node parent node_17 pci/0000:4b:00.0/node_17: type node parent node_16 pci/0000:4b:00.0/node_21: type node parent node_20 pci/0000:4b:00.0/node_20: type node parent node_3 pci/0000:4b:00.0/node_14: type node parent node_5 pci/0000:4b:00.0/node_5: type node parent node_3 pci/0000:4b:00.0/node_13: type node parent node_4 pci/0000:4b:00.0/node_12: type node parent node_4 pci/0000:4b:00.0/node_11: type node parent node_4 pci/0000:4b:00.0/node_10: type node parent node_4 pci/0000:4b:00.0/node_9: type node parent node_4 pci/0000:4b:00.0/node_8: type node parent node_4 pci/0000:4b:00.0/node_7: type node parent node_4 pci/0000:4b:00.0/node_6: type node parent node_4 pci/0000:4b:00.0/node_4: type node parent node_3 pci/0000:4b:00.0/node_3: type node parent node_16 pci/0000:4b:00.0/node_16: type node parent node_15 pci/0000:4b:00.0/node_15: type node parent node_0 pci/0000:4b:00.0/node_2: type node parent node_1 pci/0000:4b:00.0/node_1: type node parent node_0 pci/0000:4b:00.0/node_0: type node pci/0000:4b:00.0/1: type leaf parent node_27 pci/0000:4b:00.0/2: type leaf parent node_27 Let me visualize part of the tree: +---------+ | node_0 | +---------+ | +----v----+ | node_26 | +----+----+ | +----v----+ | node_27 | +----+----+ | |-----------------| +----v----+ +----v----+ | VF 1 | | VF 2 | +----+----+ +----+----+ So at this point there is a couple things that can be done. For example we could only assign parameters to VF's. [root@fedora ~]# devlink port function rate set pci/0000:4b:00.0/1 \ tx_max 5Gbps This would cap the VF 1 BW to 5Gbps. But let's say you would like to create a completely new branch. This can be done like this: [root@fedora ~]# devlink port function rate add \ pci/0000:4b:00.0/node_custom parent node_0 [root@fedora ~]# devlink port function rate add \ pci/0000:4b:00.0/node_custom_1 parent node_custom [root@fedora ~]# devlink port function rate set \ pci/0000:4b:00.0/1 parent node_custom_1 This creates a completely new branch and reassigns VF 1 to it. A number of parameters is supported per each node: tx_max, tx_share, tx_priority and tx_weight. Signed-off-by: Michal Wilczynski Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_devlink.c | 411 +++++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_devlink.h | 2 + drivers/net/ethernet/intel/ice/ice_repr.c | 13 + 3 files changed, 426 insertions(+) commit bdf96d965a204dab8085b8f8e361b3844e6667f9 Author: Michal Wilczynski Date: Tue Nov 15 11:48:21 2022 +0100 ice: Add an option to pre-allocate memory for ice_sched_node devlink-rate API requires a priv object to be allocated when node still doesn't have a parent. This is problematic, because ice_sched_node can't be currently created without a parent. Add an option to pre-allocate memory for ice_sched_node struct. Add new arguments to ice_sched_add() and ice_sched_add_elems() that allow for pre-allocation of memory for ice_sched_node struct. Signed-off-by: Michal Wilczynski Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_common.c | 4 ++-- drivers/net/ethernet/intel/ice/ice_dcb.c | 2 +- drivers/net/ethernet/intel/ice/ice_sched.c | 23 +++++++++++++++++------ drivers/net/ethernet/intel/ice/ice_sched.h | 6 ++++-- 4 files changed, 24 insertions(+), 11 deletions(-) commit 16dfa49406bc5e1f4cbb115027cbd719d7e6c930 Author: Michal Wilczynski Date: Tue Nov 15 11:48:20 2022 +0100 ice: Introduce new parameters in ice_sched_node To support new devlink-rate API ice_sched_node struct needs to store a number of additional parameters. This includes tx_max, tx_share, tx_weight, and tx_priority. Add new fields to ice_sched_node struct. Add new functions to configure the hardware with new parameters. Introduce new xarray to identify nodes uniquely. Signed-off-by: Michal Wilczynski Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 4 +- drivers/net/ethernet/intel/ice/ice_common.c | 3 + drivers/net/ethernet/intel/ice/ice_sched.c | 81 +++++++++++++++++++++++-- drivers/net/ethernet/intel/ice/ice_sched.h | 27 +++++++++ drivers/net/ethernet/intel/ice/ice_type.h | 8 +++ 5 files changed, 116 insertions(+), 7 deletions(-) commit f2fc15e271f2d17f2bee2c5a3b3e50252a7ba91f Author: Michal Wilczynski Date: Tue Nov 15 11:48:19 2022 +0100 devlink: Allow to set up parent in devl_rate_leaf_create() Currently the driver is able to create leaf nodes for the devlink-rate, but is unable to set parent for them. This wasn't as issue before the possibility to export hierarchy from the driver. After adding the export feature, in order for the driver to supply correct hierarchy, it's necessary for it to be able to supply a parent name to devl_rate_leaf_create(). Introduce a new parameter 'parent_name' in devl_rate_leaf_create(). Signed-off-by: Michal Wilczynski Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c | 4 ++-- drivers/net/netdevsim/dev.c | 2 +- include/net/devlink.h | 4 +++- net/core/devlink.c | 9 ++++++++- 4 files changed, 14 insertions(+), 5 deletions(-) commit 04d674f04e32d4109f0ee505a8855a384481212d Author: Michal Wilczynski Date: Tue Nov 15 11:48:18 2022 +0100 devlink: Allow for devlink-rate nodes parent reassignment Currently it's not possible to reassign the parent of the node using one command. As the previous commit introduced a way to export entire hierarchy from the driver, being able to modify and reassign parents become important. This way user might easily change QoS settings without interrupting traffic. Example command: devlink port function rate set pci/0000:4b:00.0/1 parent node_custom_1 This reassigns leaf node parent to node_custom_1. Signed-off-by: Michal Wilczynski Reviewed-by: Przemek Kitszel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit caba177d7f4d7693a9157ece8c9a30944c949e34 Author: Michal Wilczynski Date: Tue Nov 15 11:48:17 2022 +0100 devlink: Enable creation of the devlink-rate nodes from the driver Intel 100G card internal firmware hierarchy for Hierarchicial QoS is very rigid and can't be easily removed. This requires an ability to export default hierarchy to allow user to modify it. Currently the driver is only able to create the 'leaf' nodes, which usually represent the vport. This is not enough for HQoS implemented in Intel hardware. Introduce new function devl_rate_node_create() that allows for creation of the devlink-rate nodes from the driver. Signed-off-by: Michal Wilczynski Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/net/devlink.h | 3 +++ net/core/devlink.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 6e2d7e84fcfee62d70e62aa9e469d10b8b6a7dc7 Author: Michal Wilczynski Date: Tue Nov 15 11:48:16 2022 +0100 devlink: Introduce new attribute 'tx_weight' to devlink-rate To fully utilize offload capabilities of Intel 100G card QoS capabilities new attribute 'tx_weight' needs to be introduced. This attribute allows for usage of Weighted Fair Queuing arbitration scheme among siblings. This arbitration scheme can be used simultaneously with the strict priority. Introduce new attribute in devlink-rate that will allow for configuration of Weighted Fair Queueing. New attribute is optional. Signed-off-by: Michal Wilczynski Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/net/devlink.h | 5 +++++ include/uapi/linux/devlink.h | 2 ++ net/core/devlink.c | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) commit cd502236835b678738810ecd501c85a3a7a11150 Author: Michal Wilczynski Date: Tue Nov 15 11:48:15 2022 +0100 devlink: Introduce new attribute 'tx_priority' to devlink-rate To fully utilize offload capabilities of Intel 100G card QoS capabilities new attribute 'tx_priority' needs to be introduced. This attribute allows for usage of strict priority arbiter among siblings. This arbitration scheme attempts to schedule nodes based on their priority as long as the nodes remain within their bandwidth limit. Introduce new attribute in devlink-rate that will allow for configuration of strict priority. New attribute is optional. Signed-off-by: Michal Wilczynski Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/net/devlink.h | 6 ++++++ include/uapi/linux/devlink.h | 1 + net/core/devlink.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) commit 4ab45e973c3fd9e460b1e23cd018ea7f3d8a8b67 Merge: 4a8c14384fa9 0184c07a11a2 Author: Jakub Kicinski Date: Thu Nov 17 21:16:46 2022 -0800 Merge branch 'autoload-dsa-tagging-driver-when-dynamically-changing-protocol' Vladimir Oltean says: ==================== Autoload DSA tagging driver when dynamically changing protocol This patch set solves the issue reported by Michael and Heiko here: https://lore.kernel.org/lkml/20221027113248.420216-1-michael@walle.cc/ making full use of Michael's suggestion of having two modaliases: one gets used for loading the tagging protocol when it's the default one reported by the switch driver, the other gets loaded at user's request, by name. # modinfo tag_ocelot filename: /lib/modules/6.1.0-rc4+/kernel/net/dsa/tag_ocelot.ko license: GPL v2 alias: dsa_tag:seville alias: dsa_tag:id-21 alias: dsa_tag:ocelot alias: dsa_tag:id-15 depends: dsa_core intree: Y name: tag_ocelot vermagic: 6.1.0-rc4+ SMP preempt mod_unload modversions aarch64 Tested on NXP LS1028A-RDB with the following device tree addition: &mscc_felix_port4 { dsa-tag-protocol = "ocelot-8021q"; }; &mscc_felix_port5 { dsa-tag-protocol = "ocelot-8021q"; }; CONFIG_NET_DSA and everything that depends on it is built as module. Everything auto-loads, and "cat /sys/class/net/eno2/dsa/tagging" shows "ocelot-8021q". Traffic works as well. Furthermore, "echo ocelot-8021q" into the aforementioned sysfs file now auto-loads the driver for it. ==================== Link: https://lore.kernel.org/r/20221115011847.2843127-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 0184c07a11a243569cb90104980237c8e101f363 Author: Vladimir Oltean Date: Tue Nov 15 03:18:47 2022 +0200 net: dsa: autoload tag driver module on tagging protocol change Issue a request_module() call when an attempt to change the tagging protocol is made, either by sysfs or by device tree. In the case of ocelot (the only driver for which the default and the alternative tagging protocol are compiled as different modules), the user is now no longer required to insert tag_ocelot_8021q.ko manually. In the particular case of ocelot, this solves a problem where tag_ocelot_8021q.ko is built as module, and this is present in the device tree: &mscc_felix_port4 { dsa-tag-protocol = "ocelot-8021q"; }; &mscc_felix_port5 { dsa-tag-protocol = "ocelot-8021q"; }; Because no one attempts to load the module into the kernel at boot time, the switch driver will fail to probe (actually forever defer) until someone manually inserts tag_ocelot_8021q.ko. This is now no longer necessary and happens automatically. Rename dsa_find_tagger_by_name() to denote the change in functionality: there is now feature parity with dsa_tag_driver_get_by_id(), i.o.w. we also load the module if it's missing. Link: https://lore.kernel.org/lkml/20221027113248.420216-1-michael@walle.cc/ Suggested-by: Michael Walle Signed-off-by: Vladimir Oltean Tested-by: Michael Walle # on kontron-sl28 w/ ocelot_8021q Tested-by: Michael Walle Signed-off-by: Jakub Kicinski net/dsa/dsa.c | 4 +++- net/dsa/dsa2.c | 2 +- net/dsa/dsa_priv.h | 2 +- net/dsa/master.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) commit 54c087e83945eda014064f78c4807c5da1e09842 Author: Vladimir Oltean Date: Tue Nov 15 03:18:46 2022 +0200 net: dsa: rename dsa_tag_driver_get() to dsa_tag_driver_get_by_id() A future patch will introduce one more way of getting a reference on a tagging protocl driver (by name). Rename the current method to "by_id". Signed-off-by: Vladimir Oltean Tested-by: Michael Walle Signed-off-by: Jakub Kicinski net/dsa/dsa.c | 2 +- net/dsa/dsa2.c | 2 +- net/dsa/dsa_priv.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit e8666130b995a6a1a99c319d33fae2046213c39b Author: Vladimir Oltean Date: Tue Nov 15 03:18:45 2022 +0200 net: dsa: strip sysfs "tagging" string of trailing newline Currently, dsa_find_tagger_by_name() uses sysfs_streq() which works both with strings that contain \n at the end (echo ocelot > .../dsa/tagging) and with strings that don't (printf ocelot > .../dsa/tagging). There will be a problem once we'll want to construct the modalias string based on which we auto-load the protocol kernel module. If the sysfs buffer ends in a newline, we need to strip it first. This is a preparatory patch specifically for that. Signed-off-by: Vladimir Oltean Tested-by: Michael Walle Signed-off-by: Jakub Kicinski net/dsa/dsa.c | 4 ++-- net/dsa/dsa_priv.h | 2 +- net/dsa/master.c | 13 ++++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) commit 94793a56b3df0ff2b8c5680f926c19effd8b9ccc Author: Vladimir Oltean Date: Tue Nov 15 03:18:44 2022 +0200 net: dsa: provide a second modalias to tag proto drivers based on their name Currently, tagging protocol drivers have a modalias of "dsa_tag:id-", where the number is one of DSA_TAG_PROTO_*_VALUE. This modalias makes it possible for the request_module() call in dsa_tag_driver_get() to work, given the input it has - an integer returned by ds->ops->get_tag_protocol(). It is also possible to change tagging protocols at (pseudo-)runtime, via sysfs or via device tree, and this works via the name string of the tagging protocol rather than via its id (DSA_TAG_PROTO_*_VALUE). In the latter case, there is no request_module() call, because there is no association that the DSA core has between the string name and the ID, to construct the modalias. The module is simply assumed to have been inserted. This is actually slightly problematic when the tagging protocol change should take place at probe time, since it's expected that the dependency module should get autoloaded. For this purpose, let's introduce a second modalias, so that the DSA core can call request_module() by name. There is no reason to make the modalias by name optional, so just modify the MODULE_ALIAS_DSA_TAG_DRIVER() macro to take both the ID and the name as arguments, and generate two modaliases behind the scenes. Suggested-by: Michael Walle Signed-off-by: Vladimir Oltean Tested-by: Michael Walle # on kontron-sl28 w/ ocelot_8021q Tested-by: Michael Walle Signed-off-by: Jakub Kicinski net/dsa/dsa_priv.h | 6 +++++- net/dsa/tag_ar9331.c | 6 ++++-- net/dsa/tag_brcm.c | 16 ++++++++++------ net/dsa/tag_dsa.c | 11 +++++++---- net/dsa/tag_gswip.c | 6 ++++-- net/dsa/tag_hellcreek.c | 6 ++++-- net/dsa/tag_ksz.c | 21 +++++++++++++-------- net/dsa/tag_lan9303.c | 6 ++++-- net/dsa/tag_mtk.c | 6 ++++-- net/dsa/tag_ocelot.c | 11 +++++++---- net/dsa/tag_ocelot_8021q.c | 6 ++++-- net/dsa/tag_qca.c | 6 ++++-- net/dsa/tag_rtl4_a.c | 6 ++++-- net/dsa/tag_rtl8_4.c | 7 +++++-- net/dsa/tag_rzn1_a5psw.c | 6 ++++-- net/dsa/tag_sja1105.c | 11 +++++++---- net/dsa/tag_trailer.c | 6 ++++-- net/dsa/tag_xrs700x.c | 6 ++++-- 18 files changed, 98 insertions(+), 51 deletions(-) commit 2610937d7e95d010e7301277408457cd385a9288 Author: Vladimir Oltean Date: Tue Nov 15 03:18:43 2022 +0200 net: dsa: rename tagging protocol driver modalias It's autumn cleanup time, and today's target are modaliases. Michael says that for users of modinfo, "dsa_tag-20" is not the most suggestive name, and recommends a change to "dsa_tag-id-20". Andrew points out that other modaliases have a prefix delimited by colons, so he recommends "dsa_tag:20" instead of "dsa_tag-20". To satisfy both proposals, Florian recommends "dsa_tag:id-20". The modaliases are not stable ABI, and the essential information (protocol ID) is still conveyed in the new string, which request_module() must be adapted to form. Link: 20221027210830.3577793-1-vladimir.oltean@nxp.com Suggested-by: Andrew Lunn Suggested-by: Michael Walle Suggested-by: Florian Fainelli Signed-off-by: Vladimir Oltean Tested-by: Michael Walle Signed-off-by: Jakub Kicinski net/dsa/dsa.c | 2 +- net/dsa/dsa_priv.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 9999f85ba34651726018e0f50d4afdf6c8cc8096 Author: Vladimir Oltean Date: Tue Nov 15 03:18:42 2022 +0200 net: dsa: stop exposing tag proto module helpers to the world The DSA tagging protocol driver macros are in the public include/net/dsa.h probably because that's also where the DSA_TAG_PROTO_*_VALUE macros are (MODULE_ALIAS_DSA_TAG_DRIVER hinges on those macro definitions). But there is no reason to expose these helpers to . That header is shared between switch drivers (drivers/net/dsa/), tagging protocol drivers (net/dsa/tag_*.c), the DSA core (net/dsa/ sans tag_*.c), and the rest of the world (DSA master drivers, network stack, etc). Too much exposure. On the other hand, net/dsa/dsa_priv.h is included only by the DSA core and by DSA tagging protocol drivers (or IOW, "friend" modules). Also a bit too much exposure - I've contemplated creating a new header which is only included by tagging protocol drivers, but completely separating a new dsa_tag_proto.h from dsa_priv.h is not immediately trivial - for example dsa_slave_to_port() is used both from the fast path and from the control path. So for now, move these definitions to dsa_priv.h which at least hides them from the world. Signed-off-by: Vladimir Oltean Tested-by: Michael Walle Signed-off-by: Jakub Kicinski include/net/dsa.h | 70 ------------------------------------------------------ net/dsa/dsa_priv.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 70 deletions(-) commit 4a8c14384fa96c0bd6c1a534667f2a72165faacf Author: Robert Marko Date: Mon Nov 14 20:47:33 2022 +0100 dt-bindings: net: ipq4019-mdio: document required clock-names IPQ5018, IPQ6018 and IPQ8074 require clock-names to be set as driver is requesting the clock based on it and not index, so document that and make it required for the listed SoC-s. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221114194734.3287854-4-robimarko@gmail.com Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit e50c50367d98297703f8a02e3c9241e8b4c37b8f Author: Robert Marko Date: Mon Nov 14 20:47:32 2022 +0100 dt-bindings: net: ipq4019-mdio: require and validate clocks Now that we can match the platforms requiring clocks by compatible start using those to allow clocks per compatible and make them required. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221114194734.3287854-3-robimarko@gmail.com Signed-off-by: Jakub Kicinski .../devicetree/bindings/net/qcom,ipq4019-mdio.yaml | 27 ++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) commit 05c1cbb96f3d133ce52986aeab7a782684e408ce Author: Robert Marko Date: Mon Nov 14 20:47:31 2022 +0100 dt-bindings: net: ipq4019-mdio: add IPQ8074 compatible Allow using IPQ8074 specific compatible along with the fallback IPQ4019 one in order to be able to specify which compatibles require clocks to be able to validate them via schema. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221114194734.3287854-2-robimarko@gmail.com Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml | 1 + 1 file changed, 1 insertion(+) commit cbe5f7c0fbcd3184fe9a5c1880799e2b23ec9c6d Author: Robert Marko Date: Mon Nov 14 20:47:30 2022 +0100 dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible Document IPQ6018 compatible that is already being used in the DTS along with the fallback IPQ4019 compatible as driver itself only gets probed on IPQ4019 and IPQ5018 compatibles. This is also required in order to specify which platform require clock to be defined and validate it in schema. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221114194734.3287854-1-robimarko@gmail.com Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 2ffff1449ddd35cad113614fce2424da235f7560 Merge: f20a0a0519f3 b8790661d90d Author: Jakub Kicinski Date: Thu Nov 17 19:40:13 2022 -0800 Merge branch 'net-dsa-use-more-appropriate-net_name_-constants-for-user-ports' Rasmus Villemoes says: ==================== net: dsa: use more appropriate NET_NAME_* constants for user ports The intention of commit 685343fc3ba6 ("net: add name_assign_type netdev attribute") was clearly that drivers be switched over one by one to select appropriate NET_NAME_* constants instead of NET_NAME_UNKNOWN. This small series attempts to do that for DSA user ports. This is obviously and intentionally user-visible changes, so there's a small chance that it could lead to a regression. To make it easy to revert either of the "label in DT" and "fallback to eth%d" changes, this is done as a refactoring which shouldn't introduce any functional change (but by itself adds code which looks a little odd, with the two identical assignments in the two branches), followed by changing the constant used in each case in two different patches. ==================== Link: https://lore.kernel.org/r/20221116105205.1127843-1-linux@rasmusvillemoes.dk Signed-off-by: Jakub Kicinski commit b8790661d90d7bbfb745df40262d13a0e8ae6400 Author: Rasmus Villemoes Date: Wed Nov 16 11:52:04 2022 +0100 net: dsa: set name_assign_type to NET_NAME_ENUM for enumerated user ports When a user port does not have a label in device tree, and we thus fall back to the eth%d scheme, the proper constant to use is NET_NAME_ENUM. See also commit e9f656b7a214 ("net: ethernet: set default assignment identifier to NET_NAME_ENUM"), which in turn quoted commit 685343fc3ba6 ("net: add name_assign_type netdev attribute"): ... when the kernel has given the interface a name using global device enumeration based on order of discovery (ethX, wlanY, etc) ... are labelled NET_NAME_ENUM. Signed-off-by: Rasmus Villemoes Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fdb038420407d9781b2ba2429f836434a25e91a Author: Rasmus Villemoes Date: Wed Nov 16 11:52:03 2022 +0100 net: dsa: use NET_NAME_PREDICTABLE for user ports with name given in DT When a user port has a label in device tree, the corresponding netdevice is, to quote include/uapi/linux/netdevice.h, "predictably named by the kernel". This is also explicitly one of the intended use cases for NET_NAME_PREDICTABLE, quoting 685343fc3ba6 ("net: add name_assign_type netdev attribute"): NET_NAME_PREDICTABLE: The ifname has been assigned by the kernel in a predictable way [...] Examples include [...] and names deduced from hardware properties (including being given explicitly by the firmware). Expose that information properly for the benefit of userspace tools that make decisions based on the name_assign_type attribute, e.g. a systemd-udev rule with "kernel" in NamePolicy. Signed-off-by: Rasmus Villemoes Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0171a1d22bb99174671484f409f66f5b96c073b4 Author: Rasmus Villemoes Date: Wed Nov 16 11:52:02 2022 +0100 net: dsa: refactor name assignment for user ports The following two patches each have a (small) chance of causing regressions for userspace and will in that case of course need to be reverted. In order to prepare for that and make those two patches independent and individually revertable, refactor the code which sets the names for user ports by moving the "fall back to eth%d if no label is given in device tree" to dsa_slave_create(). No functional change (at least none intended). Signed-off-by: Rasmus Villemoes Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/dsa/dsa2.c | 3 --- net/dsa/slave.c | 13 +++++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) commit f20a0a0519f35a3a34236ed2d38b067c5cb22b9f Author: Vincent Mailhol Date: Thu Nov 17 02:18:28 2022 +0900 ethtool: doc: clarify what drivers can implement in their get_drvinfo() Many of the drivers which implement ethtool_ops::get_drvinfo() will prints the .driver, .version or .bus_info of struct ethtool_drvinfo. To have a glance of current state, do: $ git grep -W "get_drvinfo(struct" Printing in those three fields is useless because: - since [1], the driver version should be the kernel version (at least for upstream drivers). Arguably, out of tree drivers might still want to set a custom version, but out of tree is not our focus. - since [2], the core is able to provide default values for .driver and .bus_info. In summary, drivers may provide .fw_version and .erom_version, the rest is expected to be done by the core. In struct ethtool_ops doc from linux/ethtool: rephrase field get_drvinfo() doc to discourage developers from implementing this callback. In struct ethtool_drvinfo doc from uapi/linux/ethtool.h: remove the paragraph mentioning what drivers should do. Rationale: no need to repeat what is already written in struct ethtool_ops doc. But add a note that .fw_version and .erom_version are driver defined. Also update the dummy driver and simply remove the callback in order not to confuse the newcomers: most of the drivers will not need this callback function any more. [1] commit 6a7e25c7fb48 ("net/core: Replace driver version to be kernel version") Link: https://git.kernel.org/torvalds/linux/c/6a7e25c7fb48 [2] commit edaf5df22cb8 ("ethtool: ethtool_get_drvinfo: populate drvinfo fields even if callback exits") Link: https://git.kernel.org/netdev/net-next/c/edaf5df22cb8 Reviewed-by: Leon Romanovsky Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/r/20221116171828.4093-1-mailhol.vincent@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/dummy.c | 7 ------- include/linux/ethtool.h | 8 ++++---- include/uapi/linux/ethtool.h | 10 ++++------ 3 files changed, 8 insertions(+), 17 deletions(-) commit db6bf999544c8c8dcae093e91eba4570647874b1 Merge: 98b2afc8a67f 0a2f85a1be43 Author: Alexei Starovoitov Date: Thu Nov 17 19:11:34 2022 -0800 Merge branch 'Allocated objects, BPF linked lists' Kumar Kartikeya Dwivedi says: ==================== This series introduces user defined BPF objects of a type in program BTF. This allows BPF programs to allocate their own objects, build their own object hierarchies, and use the basic building blocks provided by BPF runtime to build their own data structures flexibly. Then, we introduce the support for single ownership BPF linked lists, which can be put inside BPF maps, or allocated objects, and hold such allocated objects as elements. It works as an instrusive collection, which is done to allow making allocated objects part of multiple data structures at the same time in the future. The eventual goal of this and future patches is to allow one to do some limited form of kernel style programming in BPF C, and allow programmers to build their own complex data structures flexibly out of basic building blocks. The key difference will be that such programs are verified to be safe, preserve runtime integrity of the system, and are proven to be bug free as far as the invariants of BPF specific APIs are concerned. One immediate use case that will be using the entire infrastructure this series is introducing will be managing percpu NMI safe linked lists inside BPF programs. The other use case this will serve in the near future will be linking kernel structures like XDP frame and sk_buff directly into user data structures (rbtree, pifomap, etc.) for packet queueing. This will follow single ownership concept included in this series. The user has complete control of the internal locking, and hence also the batching of operations for each critical section. The features are: - Allocated objects. - bpf_obj_new, bpf_obj_drop to allocate and free them. - Single ownership BPF linked lists. - Support for them in BPF maps. - Support for them in allocated objects. - Global spin locks. - Spin locks inside allocated objects. Some other notable things: - Completely static verification of locking. - Kfunc argument handling has been completely reworked. - Argument rewriting support for kfuncs. - A new bpf_experimental.h header as a dumping ground for these APIs. Any functionality exposed in this series is NOT part of UAPI. It is only available through use of kfuncs, and structs that can be added to map value may also change their size or name in the future. Hence, every feature in this series must be considered experimental. Follow-ups: ----------- * Support for kptrs (local and kernel) in local storage and percpu maps + kptr tests * Fixes for helper access checks rebasing on top of this series Next steps: ----------- * NMI safe percpu single ownership linked lists (using local_t protection). * Lockless linked lists. * Allow RCU protected BPF allocated objects. This then allows RCU protected list lookups, since spinlock protection for readers does not scale. * Introduce bpf_refcount for local kptrs, shared ownership. * Introduce shared ownership linked lists. * Documentation. Changelog: ---------- v9 -> v10 v9: https://lore.kernel.org/bpf/20221117225510.1676785-1-memxor@gmail.com * Deduplicate code to find btf_record of reg (Alexei) * Add linked_list test to DENYLIST.aarch64 (Alexei) * Disable some linked list tests for now so that they compile with clang nightly (Alexei) v8 -> v9 v8: https://lore.kernel.org/bpf/20221117162430.1213770-1-memxor@gmail.com * Fix up commit log of patch 2, Simplify patch 3 * Explain the implicit requirement of bpf_list_head requiring map BTF to match in btf_record_equal in a separate patch. v7 -> v8 v7: https://lore.kernel.org/bpf/20221114191547.1694267-1-memxor@gmail.com * Fix early return in map_check_btf (Dan Carpenter) * Fix two memory leak bugs in local storage maps, outer maps * Address comments from Alexei and Dave * More local kptr -> allocated object renaming * Use krealloc with NULL instead kmalloc + krealloc * Drop WARN_ON_ONCE for field_offs parsing * Combine kfunc add + remove patches into one * Drop STRONG suffix from KF_ARG_PTR_TO_KPTR * Rename is_kfunc_arg_ret_buf_size to is_kfunc_arg_scalar_with_name * Remove redundant check for reg->type and arg type in it * Drop void * ret type check * Remove code duplication in checks for NULL pointer with offset != 0 * Fix two bpf_list_node typos * Improve log message for bpf_list_head operations * Improve comments for active_lock struct * Improve comments for Implementation details of process_spin_lock * Add Dave's acks v6 -> v7 v6: https://lore.kernel.org/bpf/20221111193224.876706-1-memxor@gmail.com * Fix uninitialized variable warning (Dan Carpenter, Kernel Test Robot) * One more local_kptr renaming v5 -> v6 v5: https://lore.kernel.org/bpf/20221107230950.7117-1-memxor@gmail.com * Replace (i && !off) check with next_off, include test (Andrii) * Drop local kptrs naming (Andrii, Alexei) * Drop reg->precise == EXACT patch (Andrii) * Add comment about ptr member of struct active_lock (Andrii) * Use btf__new_empty + btf__add_xxx APIs (Andrii) * Address other misc nits from Andrii v4 -> v5 v4: https://lore.kernel.org/bpf/20221103191013.1236066-1-memxor@gmail.com * Add a lot more selftests (failure, success, runtime, BTF) * Make sure series is bisect friendly * Move list draining out of spin lock * This exposed an issue where bpf_mem_free can now be called in map_free path without migrate_disable, also fixed that. * Rename MEM_ALLOC -> MEM_RINGBUF, MEM_TYPE_LOCAL -> MEM_ALLOC (Alexei) * Group lock identity into a struct active_lock { ptr, id } (Dave) * Split set_release_on_unlock logic into separate patch (Alexei) v3 -> v4 v3: https://lore.kernel.org/bpf/20221102202658.963008-1-memxor@gmail.com * Fix compiler error for !CONFIG_BPF_SYSCALL (Kernel Test Robot) * Fix error due to BUILD_BUG_ON on 32-bit platforms (Kernel Test Robot) v2 -> v3 v2: https://lore.kernel.org/bpf/20221013062303.896469-1-memxor@gmail.com * Add ack from Dave for patch 5 * Rename btf_type_fields -> btf_record, btf_type_fields_off -> btf_field_offs, rename functions similarly (Alexei) * Remove 'kind' component from contains declaration tag (Alexei) * Move bpf_list_head, bpf_list_node definitions to UAPI bpf.h (Alexei) * Add note in commit log about modifying btf_struct_access API (Dave) * Downgrade WARN_ON_ONCE to verbose(env, "...") and return -EFAULT (Dave) * Add type_is_local_kptr wrapper to avoid noisy checks (Dave) * Remove unused flags parameter from bpf_kptr_new (Alexei) * Rename bpf_kptr_new -> bpf_obj_new, bpf_kptr_drop -> bpf_obj_drop (Alexei) * Reword comment in ref_obj_id_set_release_on_unlock (Dave) * Fix return type of ref_obj_id_set_release_on_unlock (Dave) * Introduce is_bpf_list_api_kfunc to dedup checks (Dave) * Disallow BPF_WRITE to untrusted local kptrs * Add details about soundness of check_reg_allocation_locked logic * List untrusted local kptrs for PROBE_MEM handling v1 -> v2 v1: https://lore.kernel.org/bpf/20221011012240.3149-1-memxor@gmail.com * Rebase on bpf-next to resolve merge conflict in DENYLIST.s390x * Fix a couple of mental lapses in bpf_list_head_free RFC v1 -> v1 RFC v1: https://lore.kernel.org/bpf/20220904204145.3089-1-memxor@gmail.com * Mostly a complete rewrite of BTF parsing, refactor existing code (Kartikeya) * Rebase kfunc rewrite for bpf-next, add support for more changes * Cache type metadata in BTF to avoid recomputation inside verifier (Kartikeya) * Remove __kernel tag, make things similar to map values, reserve bpf_ prefix * bpf_kptr_new, bpf_kptr_drop * Rename precision state enum values (Alexei) * Drop explicit constructor/destructor support (Alexei) * Rewrite code for constructing/destructing objects and offload to runtime * Minimize duplication in bpf_map_value_off_desc handling (Alexei) * Expose global memory allocator (Alexei) * Address other nits from Alexei * Split out local kptrs in maps, more kptrs in maps support into a follow up Links: ------ * Dave's BPF RB-Tree RFC series v1 (Discussion thread) https://lore.kernel.org/bpf/20220722183438.3319790-1-davemarchevsky@fb.com v2 (With support for static locks) https://lore.kernel.org/bpf/20220830172759.4069786-1-davemarchevsky@fb.com * BPF Linked Lists Discussion https://lore.kernel.org/bpf/CAP01T74U30+yeBHEgmgzTJ-XYxZ0zj71kqCDJtTH9YQNfTK+Xw@mail.gmail.com * BPF Memory Allocator from Alexei https://lore.kernel.org/bpf/20220902211058.60789-1-alexei.starovoitov@gmail.com * BPF Memory Allocator UAPI Discussion https://lore.kernel.org/bpf/d3f76b27f4e55ec9e400ae8dcaecbb702a4932e8.camel@fb.com ==================== Signed-off-by: Alexei Starovoitov commit 0a2f85a1be4328d29aefa54684d10c23a3298fef Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:14 2022 +0530 selftests/bpf: Temporarily disable linked list tests The latest clang nightly as of writing crashes with the given test case for BPF linked lists wherever global glock, ghead, glock2 are used, hence comment out the parts that cause the crash, and prepare this commit so that it can be reverted when the fix has been made. More context in [0]. [0]: https://lore.kernel.org/bpf/d56223f9-483e-fbc1-4564-44c0858a1e3e@meta.com Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-25-memxor@gmail.com Signed-off-by: Alexei Starovoitov .../testing/selftests/bpf/prog_tests/linked_list.c | 21 ++++++++++++++------- tools/testing/selftests/bpf/progs/linked_list.c | 11 ++++++++++- tools/testing/selftests/bpf/progs/linked_list.h | 2 ++ .../testing/selftests/bpf/progs/linked_list_fail.c | 16 ++++++++-------- 4 files changed, 34 insertions(+), 16 deletions(-) commit dc2df7bf4c8a24a55ef02ef45dd3e49abc105f76 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:13 2022 +0530 selftests/bpf: Add BTF sanity tests Preparing the metadata for bpf_list_head involves a complicated parsing step and type resolution for the contained value. Ensure that corner cases are tested against and invalid specifications in source are duly rejected. Also include tests for incorrect ownership relationships in the BTF. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-24-memxor@gmail.com Signed-off-by: Alexei Starovoitov .../testing/selftests/bpf/prog_tests/linked_list.c | 485 +++++++++++++++++++++ 1 file changed, 485 insertions(+) commit 300f19dcdb99b708353d9e46fd660a4765ab277d Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:12 2022 +0530 selftests/bpf: Add BPF linked list API tests Include various tests covering the success and failure cases. Also, run the success cases at runtime to verify correctness of linked list manipulation routines, in addition to ensuring successful verification. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-23-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/DENYLIST.aarch64 | 1 + tools/testing/selftests/bpf/DENYLIST.s390x | 1 + .../testing/selftests/bpf/prog_tests/linked_list.c | 255 +++++++++ tools/testing/selftests/bpf/progs/linked_list.c | 370 +++++++++++++ tools/testing/selftests/bpf/progs/linked_list.h | 56 ++ .../testing/selftests/bpf/progs/linked_list_fail.c | 581 +++++++++++++++++++++ 6 files changed, 1264 insertions(+) commit c48748aea4f806587813f02219ca0b4910646c5e Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:11 2022 +0530 selftests/bpf: Add failure test cases for spin lock pairing First, ensure that whenever a bpf_spin_lock is present in an allocation, the reg->id is preserved. This won't be true for global variables however, since they have a single map value per map, hence the verifier harcodes it to 0 (so that multiple pseudo ldimm64 insns can yield the same lock object per map at a given offset). Next, add test cases for all possible combinations (kptr, global, map value, inner map value). Since we lifted restriction on locking in inner maps, also add test cases for them. Currently, each lookup into an inner map gets a fresh reg->id, so even if the reg->map_ptr is same, they will be treated as separate allocations and the incorrect unlock pairing will be rejected. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-22-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/spin_lock.c | 89 ++++++++- .../selftests/bpf/progs/test_spin_lock_fail.c | 204 +++++++++++++++++++++ 2 files changed, 292 insertions(+), 1 deletion(-) commit d85aedac4dc43deaba7aabc78198d0600bb84887 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:10 2022 +0530 selftests/bpf: Update spinlock selftest Make updates in preparation for adding more test cases to this selftest: - Convert from CHECK_ to ASSERT macros. - Use BPF skeleton - Fix typo sping -> spin - Rename spinlock.c -> spin_lock.c Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-21-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/spin_lock.c | 49 ++++++++++++++++++++++ tools/testing/selftests/bpf/prog_tests/spinlock.c | 45 -------------------- tools/testing/selftests/bpf/progs/test_spin_lock.c | 4 +- 3 files changed, 51 insertions(+), 47 deletions(-) commit 64069c72b4b8e44f6876249cc8f2e2ee4d209a93 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:09 2022 +0530 selftests/bpf: Add __contains macro to bpf_experimental.h Add user facing __contains macro which provides a convenient wrapper over the verbose kernel specific BTF declaration tag required to annotate BPF list head structs in user types. Acked-by: Dave Marchevsky Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-20-memxor@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/bpf_experimental.h | 2 ++ 1 file changed, 2 insertions(+) commit c22dfdd21592c5d56b49d5fba8de300ad7bf293c Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:08 2022 +0530 bpf: Add comments for map BTF matching requirement for bpf_list_head The old behavior of bpf_map_meta_equal was that it compared timer_off to be equal (but not spin_lock_off, because that was not allowed), and did memcmp of kptr_off_tab. Now, we memcmp the btf_record of two bpf_map structs, which has all fields. We preserve backwards compat as we kzalloc the array, so if only spin lock and timer exist in map, we only compare offset while the rest of unused members in the btf_field struct are zeroed out. In case of kptr, btf and everything else is of vmlinux or module, so as long type is same it will match, since kernel btf, module, dtor pointer will be same across maps. Now with list_head in the mix, things are a bit complicated. We implicitly add a requirement that both BTFs are same, because struct btf_field_list_head has btf and value_rec members. We obviously shouldn't force BTFs to be equal by default, as that breaks backwards compatibility. Currently it is only implicitly required due to list_head matching struct btf and value_rec member. value_rec points back into a btf_record stashed in the map BTF (btf member of btf_field_list_head). So that pointer and btf member has to match exactly. Document all these subtle details so that things don't break in the future when touching this code. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-19-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/btf.c | 3 +++ kernel/bpf/map_in_map.c | 5 +++++ kernel/bpf/syscall.c | 14 ++++++++++++++ 3 files changed, 22 insertions(+) commit 534e86bc6c66e1e0c798a1c0a6a680bb231c08db Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:07 2022 +0530 bpf: Add 'release on unlock' logic for bpf_list_push_{front,back} This commit implements the delayed release logic for bpf_list_push_front and bpf_list_push_back. Once a node has been added to the list, it's pointer changes to PTR_UNTRUSTED. However, it is only released once the lock protecting the list is unlocked. For such PTR_TO_BTF_ID | MEM_ALLOC with PTR_UNTRUSTED set but an active ref_obj_id, it is still permitted to read them as long as the lock is held. Writing to them is not allowed. This allows having read access to push items we no longer own until we release the lock guarding the list, allowing a little more flexibility when working with these APIs. Note that enabling write support has fairly tricky interactions with what happens inside the critical section. Just as an example, currently, bpf_obj_drop is not permitted, but if it were, being able to write to the PTR_UNTRUSTED pointer while the object gets released back to the memory allocator would violate safety properties we wish to guarantee (i.e. not crashing the kernel). The memory could be reused for a different type in the BPF program or even in the kernel as it gets eventually kfree'd. Not enabling bpf_obj_drop inside the critical section would appear to prevent all of the above, but that is more of an artifical limitation right now. Since the write support is tangled with how we handle potential aliasing of nodes inside the critical section that may or may not be part of the list anymore, it has been deferred to a future patch. Acked-by: Dave Marchevsky Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-18-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf_verifier.h | 5 ++++ kernel/bpf/verifier.c | 58 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 1 deletion(-) commit 8cab76ec634995e59a8b6346bf8b835ab7fad3a3 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:06 2022 +0530 bpf: Introduce single ownership BPF linked list API Add a linked list API for use in BPF programs, where it expects protection from the bpf_spin_lock in the same allocation as the bpf_list_head. For now, only one bpf_spin_lock can be present hence that is assumed to be the one protecting the bpf_list_head. The following functions are added to kick things off: // Add node to beginning of list void bpf_list_push_front(struct bpf_list_head *head, struct bpf_list_node *node); // Add node to end of list void bpf_list_push_back(struct bpf_list_head *head, struct bpf_list_node *node); // Remove node at beginning of list and return it struct bpf_list_node *bpf_list_pop_front(struct bpf_list_head *head); // Remove node at end of list and return it struct bpf_list_node *bpf_list_pop_back(struct bpf_list_head *head); The lock protecting the bpf_list_head needs to be taken for all operations. The verifier ensures that the lock that needs to be taken is always held, and only the correct lock is taken for these operations. These checks are made statically by relying on the reg->id preserved for registers pointing into regions having both bpf_spin_lock and the objects protected by it. The comment over check_reg_allocation_locked in this change describes the logic in detail. Note that bpf_list_push_front and bpf_list_push_back are meant to consume the object containing the node in the 1st argument, however that specific mechanism is intended to not release the ref_obj_id directly until the bpf_spin_unlock is called. In this commit, nothing is done, but the next commit will be introducing logic to handle this case, so it has been left as is for now. bpf_list_pop_front and bpf_list_pop_back delete the first or last item of the list respectively, and return pointer to the element at the list_node offset. The user can then use container_of style macro to get the actual entry type. The verifier however statically knows the actual type, so the safety properties are still preserved. With these additions, programs can now manage their own linked lists and store their objects in them. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-17-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 55 ++++- kernel/bpf/verifier.c | 275 ++++++++++++++++++++++++- tools/testing/selftests/bpf/bpf_experimental.h | 28 +++ 3 files changed, 349 insertions(+), 9 deletions(-) commit df57f38a0d081f05ec48ea5aa7ca0564918ed915 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:05 2022 +0530 bpf: Permit NULL checking pointer with non-zero fixed offset Pointer increment on seeing PTR_MAYBE_NULL is already protected against, hence make an exception for PTR_TO_BTF_ID | MEM_ALLOC while still keeping the warning for other unintended cases that might creep in. bpf_list_pop_{front,_back} helpers planned to be introduced in next commit will return a MEM_ALLOC register with incremented offset pointing to bpf_list_node field. The user is supposed to then obtain the pointer to the entry using container_of after NULL checking it. The current restrictions trigger a warning when doing the NULL checking. Revisiting the reason, it is meant as an assertion which seems to actually work and catch the bad case. Hence, under no other circumstances can reg->off be non-zero for a register that has the PTR_MAYBE_NULL type flag set. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-16-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit ac9f06050a3580cf4076a57a470cd71f12a81171 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:04 2022 +0530 bpf: Introduce bpf_obj_drop Introduce bpf_obj_drop, which is the kfunc used to free allocated objects (allocated using bpf_obj_new). Pairing with bpf_obj_new, it implicitly destructs the fields part of object automatically without user intervention. Just like the previous patch, btf_struct_meta that is needed to free up the special fields is passed as a hidden argument to the kfunc. For the user, a convenience macro hides over the kernel side kfunc which is named bpf_obj_drop_impl. Continuing the previous example: void prog(void) { struct foo *f; f = bpf_obj_new(typeof(*f)); if (!f) return; bpf_obj_drop(f); } Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-15-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 11 +++++ kernel/bpf/verifier.c | 66 +++++++++++++++++++++----- tools/testing/selftests/bpf/bpf_experimental.h | 13 +++++ 3 files changed, 79 insertions(+), 11 deletions(-) commit 958cf2e273f0929c66169e0788031310e8118722 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:03 2022 +0530 bpf: Introduce bpf_obj_new Introduce type safe memory allocator bpf_obj_new for BPF programs. The kernel side kfunc is named bpf_obj_new_impl, as passing hidden arguments to kfuncs still requires having them in prototype, unlike BPF helpers which always take 5 arguments and have them checked using bpf_func_proto in verifier, ignoring unset argument types. Introduce __ign suffix to ignore a specific kfunc argument during type checks, then use this to introduce support for passing type metadata to the bpf_obj_new_impl kfunc. The user passes BTF ID of the type it wants to allocates in program BTF, the verifier then rewrites the first argument as the size of this type, after performing some sanity checks (to ensure it exists and it is a struct type). The second argument is also fixed up and passed by the verifier. This is the btf_struct_meta for the type being allocated. It would be needed mostly for the offset array which is required for zero initializing special fields while leaving the rest of storage in unitialized state. It would also be needed in the next patch to perform proper destruction of the object's special fields. Under the hood, bpf_obj_new will call bpf_mem_alloc and bpf_mem_free, using the any context BPF memory allocator introduced recently. To this end, a global instance of the BPF memory allocator is initialized on boot to be used for this purpose. This 'bpf_global_ma' serves all allocations for bpf_obj_new. In the future, bpf_obj_new variants will allow specifying a custom allocator. Note that now that bpf_obj_new can be used to allocate objects that can be linked to BPF linked list (when future linked list helpers are available), we need to also free the elements using bpf_mem_free. However, since the draining of elements is done outside the bpf_spin_lock, we need to do migrate_disable around the call since bpf_list_head_free can be called from map free path where migration is enabled. Otherwise, when called from BPF programs migration is already disabled. A convenience macro is included in the bpf_experimental.h header to hide over the ugly details of the implementation, leading to user code looking similar to a language level extension which allocates and constructs fields of a user type. struct bar { struct bpf_list_node node; }; struct foo { struct bpf_spin_lock lock; struct bpf_list_head head __contains(bar, node); }; void prog(void) { struct foo *f; f = bpf_obj_new(typeof(*f)); if (!f) return; ... } A key piece of this story is still missing, i.e. the free function, which will come in the next patch. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-14-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 21 +++-- include/linux/bpf_verifier.h | 2 + kernel/bpf/core.c | 16 ++++ kernel/bpf/helpers.c | 47 ++++++++++-- kernel/bpf/verifier.c | 102 +++++++++++++++++++++++-- tools/testing/selftests/bpf/bpf_experimental.h | 25 ++++++ 6 files changed, 190 insertions(+), 23 deletions(-) commit a50388dbb328a4267c2b91ad4aefe81b08e49b2d Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:02 2022 +0530 bpf: Support constant scalar arguments for kfuncs Allow passing known constant scalars as arguments to kfuncs that do not represent a size parameter. We use mark_chain_precision for the constant scalar argument to mark it precise. This makes the search pruning optimization of verifier more conservative for such kfunc calls, and each non-distinct argument is considered unequivalent. We will use this support to then expose a bpf_obj_new function where it takes the local type ID of a type in program BTF, and returns a PTR_TO_BTF_ID | MEM_ALLOC to the local type, and allows programs to allocate their own objects. Each type ID resolves to a distinct type with a possibly distinct size, hence the type ID constant matters in terms of program safety and its precision needs to be checked between old and cur states inside regsafe. The use of mark_chain_precision enables this. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-13-memxor@gmail.com Signed-off-by: Alexei Starovoitov Documentation/bpf/kfuncs.rst | 24 +++++++++++++++++++ kernel/bpf/verifier.c | 57 +++++++++++++++++++++++++++++++++----------- 2 files changed, 67 insertions(+), 14 deletions(-) commit 00b85860feb809852af9a88cb4ca8766d7dff6a3 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:01 2022 +0530 bpf: Rewrite kfunc argument handling As we continue to add more features, argument types, kfunc flags, and different extensions to kfuncs, the code to verify the correctness of the kfunc prototype wrt the passed in registers has become ad-hoc and ugly to read. To make life easier, and make a very clear split between different stages of argument processing, move all the code into verifier.c and refactor into easier to read helpers and functions. This also makes sharing code within the verifier easier with kfunc argument processing. This will be more and more useful in later patches as we are now moving to implement very core BPF helpers as kfuncs, to keep them experimental before baking into UAPI. Remove all kfunc related bits now from btf_check_func_arg_match, as users have been converted away to refactored kfunc argument handling. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-12-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 11 - include/linux/bpf_verifier.h | 2 - include/linux/btf.h | 31 +- kernel/bpf/btf.c | 380 +------------- kernel/bpf/verifier.c | 545 ++++++++++++++++++++- .../selftests/bpf/prog_tests/kfunc_dynptr_param.c | 2 +- tools/testing/selftests/bpf/verifier/calls.c | 2 +- .../testing/selftests/bpf/verifier/ref_tracking.c | 4 +- 8 files changed, 573 insertions(+), 404 deletions(-) commit b7ff97925b55a0603a7c215305df4b43ab632948 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:26:00 2022 +0530 bpf: Allow locking bpf_spin_lock in inner map values There is no need to restrict users from locking bpf_spin_lock in map values of inner maps. Each inner map lookup gets a unique reg->id assigned to the returned PTR_TO_MAP_VALUE which will be preserved after the NULL check. Distinct lookups into different inner map get unique IDs, and distinct lookups into same inner map also get unique IDs. Hence, lift the restriction by removing the check return -ENOTSUPP in map_in_map.c. Later commits will add comprehensive test cases to ensure that invalid cases are rejected. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-11-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/map_in_map.c | 5 ----- 1 file changed, 5 deletions(-) commit d0d78c1df9b1dbfb5e172de473561ce09d5e9d39 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:25:59 2022 +0530 bpf: Allow locking bpf_spin_lock global variables Global variables reside in maps accessible using direct_value_addr callbacks, so giving each load instruction's rewrite a unique reg->id disallows us from holding locks which are global. The reason for preserving reg->id as a unique value for registers that may point to spin lock is that two separate lookups are treated as two separate memory regions, and any possible aliasing is ignored for the purposes of spin lock correctness. This is not great especially for the global variable case, which are served from maps that have max_entries == 1, i.e. they always lead to map values pointing into the same map value. So refactor the active_spin_lock into a 'active_lock' structure which represents the lock identity, and instead of the reg->id, remember two fields, a pointer and the reg->id. The pointer will store reg->map_ptr or reg->btf. It's only necessary to distinguish for the id == 0 case of global variables, but always setting the pointer to a non-NULL value and using the pointer to check whether the lock is held simplifies code in the verifier. This is generic enough to allow it for global variables, map lookups, and allocated objects at the same time. Note that while whether a lock is held can be answered by just comparing active_lock.ptr to NULL, to determine whether the register is pointing to the same held lock requires comparing _both_ ptr and id. Finally, as a result of this refactoring, pseudo load instructions are not given a unique reg->id, as they are doing lookup for the same map value (max_entries is never greater than 1). Essentially, we consider that the tuple of (ptr, id) will always be unique for any kind of argument to bpf_spin_{lock,unlock}. Note that this can be extended in the future to also remember offset used for locking, so that we can introduce multiple bpf_spin_lock fields in the same allocation. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-10-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf_verifier.h | 16 +++++++++++++++- kernel/bpf/verifier.c | 41 ++++++++++++++++++++++++++++------------- 2 files changed, 43 insertions(+), 14 deletions(-) commit 4e814da0d59917c6d758a80e63e79b5ee212cf11 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:25:58 2022 +0530 bpf: Allow locking bpf_spin_lock in allocated objects Allow locking a bpf_spin_lock in an allocated object, in addition to already supported map value pointers. The handling is similar to that of map values, by just preserving the reg->id of PTR_TO_BTF_ID | MEM_ALLOC as well, and adjusting process_spin_lock to work with them and remember the id in verifier state. Refactor the existing process_spin_lock to work with PTR_TO_BTF_ID | MEM_ALLOC in addition to PTR_TO_MAP_VALUE. We need to update the reg_may_point_to_spin_lock which is used in mark_ptr_or_null_reg to preserve reg->id, that will be used in env->cur_state->active_spin_lock to remember the currently held spin lock. Also update the comment describing bpf_spin_lock implementation details to also talk about PTR_TO_BTF_ID | MEM_ALLOC type. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-9-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 2 ++ kernel/bpf/verifier.c | 90 +++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 67 insertions(+), 25 deletions(-) commit 865ce09a49d79d2b2c1d980f4c05ffc0b3517bdc Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:25:57 2022 +0530 bpf: Verify ownership relationships for user BTF types Ensure that there can be no ownership cycles among different types by way of having owning objects that can hold some other type as their element. For instance, a map value can only hold allocated objects, but these are allowed to have another bpf_list_head. To prevent unbounded recursion while freeing resources, elements of bpf_list_head in local kptrs can never have a bpf_list_head which are part of list in a map value. Later patches will verify this by having dedicated BTF selftests. Also, to make runtime destruction easier, once btf_struct_metas is fully populated, we can stash the metadata of the value type directly in the metadata of the list_head fields, as that allows easier access to the value type's layout to destruct it at runtime from the btf_field entry of the list head itself. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-8-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 1 + include/linux/btf.h | 1 + kernel/bpf/btf.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/syscall.c | 4 +++ 4 files changed, 77 insertions(+) commit 8ffa5cc142137a59d6a10eb5273fa2ba5dcd4947 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:25:56 2022 +0530 bpf: Recognize lock and list fields in allocated objects Allow specifying bpf_spin_lock, bpf_list_head, bpf_list_node fields in a allocated object. Also update btf_struct_access to reject direct access to these special fields. A bpf_list_head allows implementing map-in-map style use cases, where an allocated object with bpf_list_head is linked into a list in a map value. This would require embedding a bpf_list_node, support for which is also included. The bpf_spin_lock is used to protect the bpf_list_head and other data. While we strictly don't require to hold a bpf_spin_lock while touching the bpf_list_head in such objects, as when have access to it, we have complete ownership of the object, the locking constraint is still kept and may be conditionally lifted in the future. Note that the specification of such types can be done just like map values, e.g.: struct bar { struct bpf_list_node node; }; struct foo { struct bpf_spin_lock lock; struct bpf_list_head head __contains(bar, node); struct bpf_list_node node; }; struct map_value { struct bpf_spin_lock lock; struct bpf_list_head head __contains(foo, node); }; To recognize such types in user BTF, we build a btf_struct_metas array of metadata items corresponding to each BTF ID. This is done once during the btf_parse stage to avoid having to do it each time during the verification process's requirement to inspect the metadata. Moreover, the computed metadata needs to be passed to some helpers in future patches which requires allocating them and storing them in the BTF that is pinned by the program itself, so that valid access can be assumed to such data during program runtime. A key thing to note is that once a btf_struct_meta is available for a type, both the btf_record and btf_field_offs should be available. It is critical that btf_field_offs is available in case special fields are present, as we extensively rely on special fields being zeroed out in map values and allocated objects in later patches. The code ensures that by bailing out in case of errors and ensuring both are available together. If the record is not available, the special fields won't be recognized, so not having both is also fine (in terms of being a verification error and not a runtime bug). Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-7-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 7 ++ include/linux/btf.h | 35 +++++++++ kernel/bpf/btf.c | 197 ++++++++++++++++++++++++++++++++++++++++++++++----- kernel/bpf/syscall.c | 4 ++ 4 files changed, 225 insertions(+), 18 deletions(-) commit 282de143ead96a5d53331e946f31c977b4610a74 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:25:55 2022 +0530 bpf: Introduce allocated objects support Introduce support for representing pointers to objects allocated by the BPF program, i.e. PTR_TO_BTF_ID that point to a type in program BTF. This is indicated by the presence of MEM_ALLOC type flag in reg->type to avoid having to check btf_is_kernel when trying to match argument types in helpers. Whenever walking such types, any pointers being walked will always yield a SCALAR instead of pointer. In the future we might permit kptr inside such allocated objects (either kernel or program allocated), and it will then form a PTR_TO_BTF_ID of the respective type. For now, such allocated objects will always be referenced in verifier context, hence ref_obj_id == 0 for them is a bug. It is allowed to write to such objects, as long fields that are special are not touched (support for which will be added in subsequent patches). Note that once such a pointer is marked PTR_UNTRUSTED, it is no longer allowed to write to it. No PROBE_MEM handling is therefore done for loads into this type unless PTR_UNTRUSTED is part of the register type, since they can never be in an undefined state, and their lifetime will always be valid. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-6-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 11 +++++++++++ kernel/bpf/btf.c | 5 +++++ kernel/bpf/verifier.c | 25 +++++++++++++++++++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) commit f73e601aafb2ad9f2b2012b969f86f4a41141a7d Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:25:54 2022 +0530 bpf: Populate field_offs for inner_map_meta Far too much code simply assumes that both btf_record and btf_field_offs are set to valid pointers together, or both are unset. They go together hand in hand as btf_record describes the special fields and btf_field_offs is compact representation for runtime copying/zeroing. It is very difficult to make this clear in the code when the only exception to this universal invariant is inner_map_meta which is used as reg->map_ptr in the verifier. This is simply a bug waiting to happen, as in verifier context we cannot easily distinguish if PTR_TO_MAP_VALUE is coming from an inner map, and if we ever end up using field_offs for any reason in the future, we will silently ignore the special fields for inner map case (as NULL is not an error but unset field_offs). Hence, simply copy field_offs from inner map together with btf_record. While at it, refactor code to unwind properly on errors with gotos. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-5-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/map_in_map.c | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) commit d48995723c9a1c4896206be382c72d722accbfbc Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:25:53 2022 +0530 bpf: Free inner_map_meta when btf_record_dup fails Whenever btf_record_dup fails, we must free inner_map_meta that was allocated before. This fixes a memory leak (in case of errors) during inner map creation. Fixes: aa3496accc41 ("bpf: Refactor kptr_off_tab into btf_record") Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-4-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/map_in_map.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d7f5ef653c3dd0c0d649cae6ef2708053bb1fb2b Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:25:52 2022 +0530 bpf: Do btf_record_free outside map_free callback Since the commit being fixed, we now miss freeing btf_record for local storage maps which will have a btf_record populated in case they have bpf_spin_lock element. This was missed because I made the choice of offloading the job to free kptr_off_tab (now btf_record) to the map_free callback when adding support for kptrs. Revisiting the reason for this decision, there is the possibility that the btf_record gets used inside map_free callback (e.g. in case of maps embedding kptrs) to iterate over them and free them, hence doing it before the map_free callback would be leaking special field memory, and do invalid memory access. The btf_record keeps module references which is critical to ensure the dtor call made for referenced kptr is safe to do. If doing it after map_free callback, the map area is already freed, so we cannot access bpf_map structure anymore. To fix this and prevent such lapses in future, move bpf_map_free_record out of the map_free callback, and do it after map_free by remembering the btf_record pointer. There is no need to access bpf_map structure in that case, and we can avoid missing this case when support for new map types is added for other special fields. Since a btf_record and its btf_field_offs are used together, for consistency delay freeing of field_offs as well. While not a problem right now, a lot of code assumes that either both record and field_offs are set or none at once. Note that in case of map of maps (outer maps), inner_map_meta->record is only used during verification, not to free fields in map value, hence we simply keep the bpf_map_free_record call as is in bpf_map_meta_free and never touch map->inner_map_meta in bpf_map_free_deferred. Add a comment making note of these details. Fixes: db559117828d ("bpf: Consolidate spin_lock, timer management into btf_record") Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-3-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/arraymap.c | 1 - kernel/bpf/hashtab.c | 1 - kernel/bpf/syscall.c | 18 ++++++++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) commit c237bfa5283a562cd5d74dd74b2d9016acd97f45 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 18 07:25:51 2022 +0530 bpf: Fix early return in map_check_btf Instead of returning directly with -EOPNOTSUPP for the timer case, we need to free the btf_record before returning to userspace. Fixes: db559117828d ("bpf: Consolidate spin_lock, timer management into btf_record") Reported-by: Dan Carpenter Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221118015614.2013203-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 224b744abf9f0663ca6762a79c7298b663fa4f04 Merge: b4b221bd79a1 847ccab8fdcf Author: Jakub Kicinski Date: Thu Nov 17 16:19:14 2022 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net include/linux/bpf.h 1f6e04a1c7b8 ("bpf: Fix offset calculation error in __copy_map_value and zero_map_value") aa3496accc41 ("bpf: Refactor kptr_off_tab into btf_record") f71b2f64177a ("bpf: Refactor map->off_arr handling") https://lore.kernel.org/all/20221114095000.67a73239@canb.auug.org.au/ Signed-off-by: Jakub Kicinski commit 9148de3196edcba4045cfe717c8e6819fa5adeaf Author: Jason A. Donenfeld Date: Thu Nov 17 17:47:12 2022 +0100 random: reseed in delayed work rather than on-demand Currently, we reseed when random bytes are requested, if the current seed is too old. Since random bytes can be requested from all contexts, including hard IRQ, this means sometimes we wind up adding a bit of latency to hard IRQ. This was so much of a problem on s390x that now s390x just doesn't provide its architectural RNG from hard IRQ context, so we miss out in that case. Instead, let's just schedule a persistent delayed work, so that the reseeding and potentially expensive operations will always happen from process context, reducing unexpected latencies from hard IRQ. This also has the nice effect of accumulating a transcript of random inputs over time, since it means that we amass more input values. And it should make future vDSO integration a bit easier. Cc: Harald Freudenberger Cc: Juergen Christ Cc: Alexander Gordeev Cc: Dominik Brodowski Cc: Sebastian Andrzej Siewior Cc: Tejun Heo Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 68 ++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 36 deletions(-) commit d7bf7f3b813e3755226bcb5114ad2ac477514ebf Author: Jason A. Donenfeld Date: Wed Jun 1 22:45:33 2022 +0200 random: always mix cycle counter in add_latent_entropy() add_latent_entropy() is called every time a process forks, in kernel_clone(). This in turn calls add_device_randomness() using the latent entropy global state. add_device_randomness() does two things: 2) Mixes into the input pool the latent entropy argument passed; and 1) Mixes in a cycle counter, a sort of measurement of when the event took place, the high precision bits of which are presumably difficult to predict. (2) is impossible without CONFIG_GCC_PLUGIN_LATENT_ENTROPY=y. But (1) is always possible. However, currently CONFIG_GCC_PLUGIN_LATENT_ENTROPY=n disables both (1) and (2), instead of just (2). This commit causes the CONFIG_GCC_PLUGIN_LATENT_ENTROPY=n case to still do (1) by passing NULL (len 0) to add_device_randomness() when add_latent_ entropy() is called. Cc: Dominik Brodowski Cc: PaX Team Cc: Emese Revfy Fixes: 38addce8b600 ("gcc-plugins: Add latent_entropy plugin") Signed-off-by: Jason A. Donenfeld include/linux/random.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit db516da95ce458f0cab5e7ae2db93fd821484d7d Author: Jason A. Donenfeld Date: Sun Nov 6 16:02:43 2022 +0100 hw_random: use add_hwgenerator_randomness() for early entropy Rather than calling add_device_randomness(), the add_early_randomness() function should use add_hwgenerator_randomness(), so that the early entropy can be potentially credited, which allows for the RNG to initialize earlier without having to wait for the kthread to come up. This requires some minor API refactoring, by adding a `sleep_after` parameter to add_hwgenerator_randomness(), so that we don't hit a blocking sleep from add_early_randomness(). Tested-by: AngeloGioacchino Del Regno Tested-by: Marek Szyprowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Dominik Brodowski Acked-by: Herbert Xu Signed-off-by: Jason A. Donenfeld drivers/char/hw_random/core.c | 8 +++++--- drivers/char/random.c | 12 ++++++------ include/linux/random.h | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) commit 19258d05b619d26622bdcfa11eca1f457b69e4da Author: Jason A. Donenfeld Date: Fri Nov 4 12:47:43 2022 +0100 random: modernize documentation comment on get_random_bytes() The prior text was very old and made outdated references to TCP sequence numbers, which should use one of the integer functions instead, since batched entropy was introduced. The current way of describing the quality of functions is just to say that it's as good as /dev/urandom, which now all the functions are. Fixes: f5b98461cb81 ("random: use chacha20 for get_random_int/long") Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b240bab51888d5c8e389dc179d7c67a869587148 Author: Jason A. Donenfeld Date: Tue Nov 1 20:08:32 2022 +0100 random: adjust comment to account for removed function Since de492c83cae0 ("prandom: remove unused functions"), get_random_int() no longer exists, so remove its reference from this comment. Fixes: de492c83cae0 ("prandom: remove unused functions") Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c03e16f44993d45f064580adb0eb408b513ad72 Author: Jason A. Donenfeld Date: Sat Oct 29 01:18:04 2022 +0200 random: remove early archrandom abstraction The arch_get_random*_early() abstraction is not completely useful and adds complexity, because it's not a given that there will be no calls to arch_get_random*() between random_init_early(), which uses arch_get_random*_early(), and init_cpu_features(). During that gap, crng_reseed() might be called, which uses arch_get_random*(), since it's mostly not init code. Instead we can test whether we're in the early phase in arch_get_random*() itself, and in doing so avoid all ambiguity about where we are. Fortunately, the only architecture that currently implements arch_get_random*_early() also has an alternatives-based cpu feature system, one flag of which determines whether the other flags have been initialized. This makes it possible to do the early check with zero cost once the system is initialized. Reviewed-by: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Jean-Philippe Brucker Signed-off-by: Jason A. Donenfeld arch/arm64/include/asm/archrandom.h | 48 ++++++++----------------------------- drivers/char/random.c | 4 ++-- include/linux/random.h | 20 ---------------- 3 files changed, 12 insertions(+), 60 deletions(-) commit b9b01a5625b5a9e9d96d14d4a813a54e8a124f4b Author: Jason A. Donenfeld Date: Tue Nov 1 13:03:55 2022 +0100 random: use random.trust_{bootloader,cpu} command line option only It's very unusual to have both a command line option and a compile time option, and apparently that's confusing to people. Also, basically everybody enables the compile time option now, which means people who want to disable this wind up having to use the command line option to ensure that anyway. So just reduce the number of moving pieces and nix the compile time option in favor of the more versatile command line option. Signed-off-by: Jason A. Donenfeld Documentation/admin-guide/kernel-parameters.txt | 20 ++++++------ arch/powerpc/configs/microwatt_defconfig | 1 - arch/s390/configs/debug_defconfig | 2 -- arch/s390/configs/defconfig | 2 -- arch/s390/configs/zfcpdump_defconfig | 1 - drivers/char/Kconfig | 36 ---------------------- drivers/char/random.c | 10 +++--- .../testing/selftests/wireguard/qemu/kernel.config | 2 -- 8 files changed, 14 insertions(+), 60 deletions(-) commit 622754e84b106a131fbac3f336bb45abf218849b Author: Jason A. Donenfeld Date: Sun Oct 23 22:14:23 2022 +0200 stackprotector: actually use get_random_canary() The RNG always mixes in the Linux version extremely early in boot. It also always includes a cycle counter, not only during early boot, but each and every time it is invoked prior to being fully initialized. Together, this means that the use of additional xors inside of the various stackprotector.h files is superfluous and over-complicated. Instead, we can get exactly the same thing, but better, by just calling `get_random_canary()`. Acked-by: Guo Ren # for csky Acked-by: Catalin Marinas # for arm64 Acked-by: Greg Kroah-Hartman Signed-off-by: Jason A. Donenfeld arch/arm/include/asm/stackprotector.h | 9 +-------- arch/arm64/include/asm/stackprotector.h | 9 +-------- arch/csky/include/asm/stackprotector.h | 10 +--------- arch/mips/include/asm/stackprotector.h | 9 +-------- arch/powerpc/include/asm/stackprotector.h | 10 +--------- arch/riscv/include/asm/stackprotector.h | 10 +--------- arch/sh/include/asm/stackprotector.h | 10 +--------- arch/x86/include/asm/stackprotector.h | 14 +------------- arch/xtensa/include/asm/stackprotector.h | 9 +-------- 9 files changed, 9 insertions(+), 81 deletions(-) commit b3883a9a1f09e7b41f4dcb1bbd7262216a62d253 Author: Jason A. Donenfeld Date: Sun Oct 23 22:06:00 2022 +0200 stackprotector: move get_random_canary() into stackprotector.h This has nothing to do with random.c and everything to do with stack protectors. Yes, it uses randomness. But many things use randomness. random.h and random.c are concerned with the generation of randomness, not with each and every use. So move this function into the more specific stackprotector.h file where it belongs. Acked-by: Greg Kroah-Hartman Signed-off-by: Jason A. Donenfeld arch/x86/kernel/cpu/common.c | 2 +- arch/x86/kernel/setup_percpu.c | 2 +- arch/x86/kernel/smpboot.c | 1 + arch/x86/xen/enlighten_pv.c | 2 +- include/linux/random.h | 19 ------------------- include/linux/stackprotector.h | 19 +++++++++++++++++++ kernel/fork.c | 2 +- 7 files changed, 24 insertions(+), 23 deletions(-) commit e8a533cbeb79809206f8724e89961e0079508c3c Author: Jason A. Donenfeld Date: Sun Oct 9 20:44:02 2022 -0600 treewide: use get_random_u32_inclusive() when possible These cases were done with this Coccinelle: @@ expression H; expression L; @@ - (get_random_u32_below(H) + L) + get_random_u32_inclusive(L, H + L - 1) @@ expression H; expression L; expression E; @@ get_random_u32_inclusive(L, H - + E - - E ) @@ expression H; expression L; expression E; @@ get_random_u32_inclusive(L, H - - E - + E ) @@ expression H; expression L; expression E; expression F; @@ get_random_u32_inclusive(L, H - - E + F - + E ) @@ expression H; expression L; expression E; expression F; @@ get_random_u32_inclusive(L, H - + E + F - - E ) And then subsequently cleaned up by hand, with several automatic cases rejected if it didn't make sense contextually. Reviewed-by: Kees Cook Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe # for infiniband Signed-off-by: Jason A. Donenfeld arch/x86/kernel/module.c | 2 +- crypto/rsa-pkcs1pad.c | 2 +- crypto/testmgr.c | 10 ++++----- drivers/bus/mhi/host/internal.h | 2 +- drivers/dma-buf/st-dma-fence-chain.c | 2 +- drivers/infiniband/core/cma.c | 2 +- drivers/infiniband/hw/hns/hns_roce_ah.c | 5 ++--- drivers/mtd/nand/raw/nandsim.c | 2 +- drivers/net/wireguard/selftest/allowedips.c | 8 +++---- .../net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 +- fs/f2fs/segment.c | 6 +++--- kernel/kcsan/selftest.c | 2 +- lib/test_hexdump.c | 8 +++---- lib/test_printf.c | 2 +- lib/test_vmalloc.c | 6 +++--- mm/kasan/kasan_test.c | 6 +++--- mm/kfence/kfence_test.c | 2 +- mm/swapfile.c | 5 ++--- net/bluetooth/mgmt.c | 5 ++--- net/core/pktgen.c | 25 +++++++++------------- net/ipv4/tcp_input.c | 2 +- net/ipv6/addrconf.c | 6 +++--- net/xfrm/xfrm_state.c | 2 +- 24 files changed, 54 insertions(+), 62 deletions(-) commit d247aabd391c3b2fa4f26874ed9136a7a142fcfd Author: Jason A. Donenfeld Date: Sun Oct 9 20:44:02 2022 -0600 treewide: use get_random_u32_{above,below}() instead of manual loop These cases were done with this Coccinelle: @@ expression E; identifier I; @@ - do { ... when != I - I = get_random_u32(); ... when != I - } while (I > E); + I = get_random_u32_below(E + 1); @@ expression E; identifier I; @@ - do { ... when != I - I = get_random_u32(); ... when != I - } while (I >= E); + I = get_random_u32_below(E); @@ expression E; identifier I; @@ - do { ... when != I - I = get_random_u32(); ... when != I - } while (I < E); + I = get_random_u32_above(E - 1); @@ expression E; identifier I; @@ - do { ... when != I - I = get_random_u32(); ... when != I - } while (I <= E); + I = get_random_u32_above(E); @@ identifier I; @@ - do { ... when != I - I = get_random_u32(); ... when != I - } while (!I); + I = get_random_u32_above(0); @@ identifier I; @@ - do { ... when != I - I = get_random_u32(); ... when != I - } while (I == 0); + I = get_random_u32_above(0); @@ expression E; @@ - E + 1 + get_random_u32_below(U32_MAX - E) + get_random_u32_above(E) Reviewed-by: Kees Cook Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jason A. Donenfeld fs/ext4/mmp.c | 8 +------- lib/test_fprobe.c | 5 +---- lib/test_kprobes.c | 5 +---- net/ipv6/output_core.c | 8 +------- net/vmw_vsock/af_vsock.c | 3 +-- 5 files changed, 5 insertions(+), 24 deletions(-) commit 8032bf1233a74627ce69b803608e650f3f35971c Author: Jason A. Donenfeld Date: Sun Oct 9 20:44:02 2022 -0600 treewide: use get_random_u32_below() instead of deprecated function This is a simple mechanical transformation done by: @@ expression E; @@ - prandom_u32_max + get_random_u32_below (E) Reviewed-by: Kees Cook Reviewed-by: Greg Kroah-Hartman Acked-by: Darrick J. Wong # for xfs Reviewed-by: SeongJae Park # for damon Reviewed-by: Jason Gunthorpe # for infiniband Reviewed-by: Russell King (Oracle) # for arm Acked-by: Ulf Hansson # for mmc Signed-off-by: Jason A. Donenfeld arch/arm/kernel/process.c | 2 +- arch/arm64/kernel/process.c | 2 +- arch/loongarch/kernel/process.c | 2 +- arch/loongarch/kernel/vdso.c | 2 +- arch/mips/kernel/process.c | 2 +- arch/mips/kernel/vdso.c | 2 +- arch/parisc/kernel/vdso.c | 2 +- arch/powerpc/crypto/crc-vpmsum_test.c | 4 +- arch/powerpc/kernel/process.c | 2 +- arch/s390/kernel/process.c | 2 +- arch/s390/kernel/vdso.c | 2 +- arch/sparc/vdso/vma.c | 2 +- arch/um/kernel/process.c | 2 +- arch/x86/entry/vdso/vma.c | 2 +- arch/x86/kernel/module.c | 2 +- arch/x86/kernel/process.c | 2 +- arch/x86/mm/pat/cpa-test.c | 4 +- crypto/rsa-pkcs1pad.c | 2 +- crypto/testmgr.c | 86 +++++++++++----------- drivers/block/drbd/drbd_receiver.c | 4 +- drivers/bus/mhi/host/internal.h | 2 +- drivers/dma-buf/st-dma-fence-chain.c | 6 +- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +- .../gpu/drm/i915/gt/intel_execlists_submission.c | 2 +- drivers/gpu/drm/i915/intel_memory_region.c | 4 +- drivers/infiniband/core/cma.c | 2 +- drivers/infiniband/hw/cxgb4/id_table.c | 4 +- drivers/infiniband/hw/hns/hns_roce_ah.c | 4 +- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +- drivers/md/bcache/request.c | 2 +- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 8 +- drivers/media/test-drivers/vidtv/vidtv_demod.c | 8 +- .../media/test-drivers/vivid/vivid-kthread-cap.c | 2 +- .../media/test-drivers/vivid/vivid-kthread-out.c | 2 +- drivers/media/test-drivers/vivid/vivid-radio-rx.c | 4 +- drivers/media/test-drivers/vivid/vivid-sdr-cap.c | 2 +- drivers/media/test-drivers/vivid/vivid-touch-cap.c | 2 +- drivers/mmc/core/core.c | 4 +- drivers/mmc/host/dw_mmc.c | 2 +- drivers/mtd/nand/raw/nandsim.c | 4 +- drivers/mtd/tests/mtd_nandecctest.c | 10 +-- drivers/mtd/tests/stresstest.c | 8 +- drivers/mtd/ubi/debug.c | 2 +- drivers/mtd/ubi/debug.h | 6 +- drivers/net/ethernet/broadcom/cnic.c | 2 +- .../chelsio/inline_crypto/chtls/chtls_io.c | 4 +- drivers/net/phy/at803x.c | 2 +- drivers/net/team/team_mode_random.c | 2 +- drivers/net/wireguard/selftest/allowedips.c | 20 ++--- drivers/net/wireguard/timers.c | 4 +- .../net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 +- drivers/pci/p2pdma.c | 2 +- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/fcoe/fcoe_ctlr.c | 4 +- drivers/scsi/qedi/qedi_main.c | 2 +- drivers/scsi/scsi_debug.c | 6 +- fs/ceph/inode.c | 2 +- fs/ceph/mdsmap.c | 2 +- fs/ext2/ialloc.c | 2 +- fs/ext4/ialloc.c | 2 +- fs/ext4/super.c | 5 +- fs/f2fs/gc.c | 2 +- fs/f2fs/segment.c | 8 +- fs/ubifs/debug.c | 8 +- fs/ubifs/lpt_commit.c | 14 ++-- fs/ubifs/tnc_commit.c | 2 +- fs/xfs/libxfs/xfs_alloc.c | 2 +- fs/xfs/libxfs/xfs_ialloc.c | 2 +- fs/xfs/xfs_error.c | 2 +- include/linux/damon.h | 2 +- include/linux/nodemask.h | 2 +- kernel/bpf/core.c | 4 +- kernel/kcsan/selftest.c | 4 +- kernel/locking/test-ww_mutex.c | 4 +- kernel/time/clocksource.c | 2 +- lib/fault-inject.c | 2 +- lib/find_bit_benchmark.c | 4 +- lib/kobject.c | 2 +- lib/reed_solomon/test_rslib.c | 6 +- lib/sbitmap.c | 4 +- lib/test-string_helpers.c | 2 +- lib/test_hexdump.c | 10 +-- lib/test_list_sort.c | 2 +- lib/test_printf.c | 2 +- lib/test_rhashtable.c | 6 +- lib/test_vmalloc.c | 8 +- mm/kasan/kasan_test.c | 6 +- mm/kfence/core.c | 4 +- mm/kfence/kfence_test.c | 4 +- mm/slub.c | 2 +- mm/swapfile.c | 4 +- net/802/garp.c | 2 +- net/802/mrp.c | 2 +- net/batman-adv/bat_iv_ogm.c | 4 +- net/batman-adv/bat_v_elp.c | 2 +- net/batman-adv/bat_v_ogm.c | 4 +- net/batman-adv/network-coding.c | 2 +- net/bluetooth/mgmt.c | 4 +- net/can/j1939/socket.c | 2 +- net/can/j1939/transport.c | 2 +- net/ceph/mon_client.c | 2 +- net/ceph/osd_client.c | 2 +- net/core/neighbour.c | 4 +- net/core/pktgen.c | 28 +++---- net/core/stream.c | 2 +- net/ipv4/icmp.c | 2 +- net/ipv4/igmp.c | 6 +- net/ipv4/inet_connection_sock.c | 2 +- net/ipv4/inet_hashtables.c | 2 +- net/ipv4/route.c | 4 +- net/ipv4/tcp_bbr.c | 2 +- net/ipv4/tcp_input.c | 3 +- net/ipv6/addrconf.c | 8 +- net/ipv6/mcast.c | 10 +-- net/ipv6/route.c | 2 +- net/netfilter/ipvs/ip_vs_twos.c | 4 +- net/netfilter/nf_conntrack_core.c | 4 +- net/netfilter/nf_nat_helper.c | 2 +- net/netlink/af_netlink.c | 2 +- net/packet/af_packet.c | 4 +- net/sched/act_gact.c | 2 +- net/sched/act_sample.c | 2 +- net/sched/sch_choke.c | 2 +- net/sched/sch_netem.c | 4 +- net/sctp/socket.c | 2 +- net/sctp/transport.c | 2 +- net/sunrpc/cache.c | 2 +- net/sunrpc/xprtsock.c | 2 +- net/tipc/socket.c | 2 +- net/vmw_vsock/af_vsock.c | 2 +- net/xfrm/xfrm_state.c | 2 +- 132 files changed, 280 insertions(+), 280 deletions(-) commit 7f576b2593a978451416424e75f69ad1e3ae4efe Author: Jason A. Donenfeld Date: Wed Oct 19 23:19:35 2022 -0600 random: add helpers for random numbers with given floor or range Now that we have get_random_u32_below(), it's nearly trivial to make inline helpers to compute get_random_u32_above() and get_random_u32_inclusive(), which will help clean up open coded loops and manual computations throughout the tree. One snag is that in order to make get_random_u32_inclusive() operate on closed intervals, we have to do some (unlikely) special case handling if get_random_u32_inclusive(0, U32_MAX) is called. The least expensive way of doing this is actually to adjust the slowpath of get_random_u32_below() to have its undefined 0 result just return the output of get_random_u32(). We can make this basically free by calling get_random_u32() before the branch, so that the branch latency gets interleaved. Cc: stable@vger.kernel.org # to ease future backports that use this api Reviewed-by: Kees Cook Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 18 +++++++++++++++++- include/linux/random.h | 25 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) commit cd57e443831d8eeb083c7165bce195d886e216d4 Author: Kees Cook Date: Thu Nov 17 16:31:55 2022 -0800 exec: Remove FOLL_FORCE for stack setup It does not appear that FOLL_FORCE should be needed for setting up the stack pages. They are allocated using the nascent brpm->vma, which was newly created with VM_STACK_FLAGS, which an arch can override, but they all appear to include VM_WRITE | VM_MAYWRITE. Remove FOLL_FORCE. Cc: Eric Biederman Cc: David Hildenbrand Cc: Linus Torvalds Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Link: https://lore.kernel.org/lkml/202211171439.CDE720EAD@keescook/ Signed-off-by: Kees Cook fs/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4185804e191bdaeb10ebe00b1b4aa9e2f147a56 Author: Thierry Reding Date: Fri Nov 4 13:25:50 2022 +0100 ARM: tegra: Remove duplicate pin entry in pinmux For Tegra30 Pegatron Chagall, the sdmmc3_dat3_pb5 pin was defined multiple times, leading to a DT validation error. Remove the duplicate entry. Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra30-pegatron-chagall.dts | 1 - 1 file changed, 1 deletion(-) commit 447ee082e33a0b91e2207bf17a81bb65fe51d7a1 Author: Thierry Reding Date: Fri Nov 4 13:22:57 2022 +0100 ARM: tegra: Remove unused interrupt-parent properties Some boards are using the interrupt-parent property to point at the GPIO controller since it handles the interrupts for the GPIO keys. However, a node needs an interrupts property for interrupt-parent to be meaningful, which these boards don't have. gpio-keys in these cases will directly use the GPIO lines specified in the key definitions and rely on the implicit conversion of those GPIOs to interrupts by the operating system, so explicit specification of the interrupts is not required. Remove the unnecessary interrupt-parent properties. Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi | 2 -- arch/arm/boot/dts/tegra30-pegatron-chagall.dts | 2 -- 2 files changed, 4 deletions(-) commit 9cd84b279e98efd17ce9cf63b301c790b0907a7a Author: Thierry Reding Date: Fri Nov 4 13:21:08 2022 +0100 ARM: tegra: Fix nvidia,io-reset properties Rename the unknown nvidia,ioreset property to nvidia,io-reset, as specified in the DT bindings and supported by the driver. Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra30-asus-transformer-common.dtsi | 8 ++++---- arch/arm/boot/dts/tegra30-pegatron-chagall.dts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit a77d8806aa92d32cc5c10378c91573e0141bd94d Author: Thierry Reding Date: Fri Nov 4 13:19:44 2022 +0100 ARM: tegra: Add missing power-supply for panels Tegra124 Nyan and Venice 2 boards were missing the required power-supply property in their display panel device tree nodes. Add these properties to fix validation errors. Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-nyan-big.dts | 1 + arch/arm/boot/dts/tegra124-nyan-blaze.dts | 1 + arch/arm/boot/dts/tegra124-venice2.dts | 1 + 3 files changed, 3 insertions(+) commit 1ca3b45e9e68ce72c4f4600ee798e8445c66fe43 Author: Thierry Reding Date: Fri Nov 4 13:18:37 2022 +0100 ARM: tegra: Fixup pinmux node names Pinmux node names should have a pinmux- prefix and not use underscores. Fix up some cases that didn't follow those rules. Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra114-asus-tf701t.dts | 24 ++++++++++++------------ arch/arm/boot/dts/tegra124-nyan-big.dts | 2 +- arch/arm/boot/dts/tegra124-nyan-blaze.dts | 2 +- arch/arm/boot/dts/tegra124-venice2.dts | 2 +- arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 6 +++--- arch/arm/boot/dts/tegra20-asus-tf101.dts | 6 +++--- arch/arm/boot/dts/tegra20-seaboard.dts | 6 +++--- arch/arm/boot/dts/tegra20-tamonten.dtsi | 6 +++--- arch/arm/boot/dts/tegra20-ventana.dts | 6 +++--- 9 files changed, 30 insertions(+), 30 deletions(-) commit 06888f8bbe128247b24355333e0bc163065c49b3 Author: Thierry Reding Date: Fri Nov 4 14:09:59 2022 +0100 ARM: tegra: Use correct compatible string for ASUS TF101 panel Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra20-asus-tf101.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98b2afc8a67f651ed01fc7d5a7e2528e63dd4e08 Author: Björn Töpel Date: Tue Nov 15 19:20:51 2022 +0100 selftests/bpf: Pass target triple to get_sys_includes macro When cross-compiling [1], the get_sys_includes make macro should use the target system include path, and not the build hosts system include path. Make clang honor the CROSS_COMPILE triple. [1] e.g. "ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- make" Signed-off-by: Björn Töpel Signed-off-by: Andrii Nakryiko Tested-by: Anders Roxell Link: https://lore.kernel.org/bpf/20221115182051.582962-2-bjorn@kernel.org tools/testing/selftests/bpf/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c4525f05ca3ca2795fc626252fb1c1cbb310111b Author: Björn Töpel Date: Tue Nov 15 19:20:50 2022 +0100 selftests/bpf: Explicitly pass RESOLVE_BTFIDS to sub-make When cross-compiling selftests/bpf, the resolve_btfids binary end up in a different directory, than the regular resolve_btfids builds. Populate RESOLVE_BTFIDS for sub-make, so it can find the binary. Signed-off-by: Björn Töpel Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20221115182051.582962-1-bjorn@kernel.org tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aec3bb3a01de09058fbebed4821ed7d07e1ed994 Author: Alex Deucher Date: Wed Nov 16 11:06:03 2022 -0500 drm/amdgpu: make psp_ring_init common All of the IP specific versions are the same now, so we can just use a common function. Acked-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 -- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 27 --------------------------- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 27 --------------------------- drivers/gpu/drm/amd/amdgpu/psp_v11_0_8.c | 27 --------------------------- drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 27 --------------------------- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 27 --------------------------- drivers/gpu/drm/amd/amdgpu/psp_v13_0_4.c | 27 --------------------------- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 27 --------------------------- 9 files changed, 26 insertions(+), 191 deletions(-) commit 54037bdfb1feca4688754fc77f9f7152b77729fa Author: Alex Deucher Date: Wed Nov 16 10:56:31 2022 -0500 drm/amdgpu/psp12: move ih_reroute into ring_create This matches what we do for psp 3.1 and makes ring_init common for all PSP versions. Acked-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef8d147fd4425b1c46ad8f2df567632b6c5897e1 Author: Randy Dunlap Date: Thu Nov 17 09:20:09 2022 -0800 drm/amd/display: fix kernel-doc issues in dc.h Fix these kernel-doc complaints: drivers/gpu/drm/amd/display/dc/dc.h:505: warning: cannot understand function prototype: 'struct dc_clocks ' dc.h:472: warning: Enum value 'MPC_SPLIT_AVOID' not described in enum 'pipe_split_policy' dc.h:472: warning: Enum value 'MPC_SPLIT_AVOID_MULT_DISP' not described in enum 'pipe_split_policy' dc.h:532: warning: Incorrect use of kernel-doc format: * @fw_based_mclk_switching Fixes: ea76895ffab1 ("drm/amd/display: Document pipe split policy") Fixes: 1682bd1a6b5f ("drm/amd/display: Expand kernel doc for DC") Signed-off-by: Randy Dunlap Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: Harry Wentland Cc: Leo Li Cc: amd-gfx@lists.freedesktop.org Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit beb15bc1c65aa1346ce15e57ac2bee86f3c16f7f Author: Jonathan Kim Date: Wed Oct 12 14:23:10 2022 -0400 drm/amdkfd: enable cooperative launch for gfx10.3 FW fix available to enable cooperative launch for GFX10.3. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cff7d3b7df3aadf0c0f3c1fd3f6739a8540c3140 Author: Ramesh Errabolu Date: Wed Nov 16 10:46:08 2022 -0600 drm/amdgpu: Enable Aldebaran devices to report CU Occupancy Allow user to know number of compute units (CU) that are in use at any given moment. Enable access to the method kgd_gfx_v9_get_cu_occupancy that computes CU occupancy. Signed-off-by: Ramesh Errabolu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c | 1 + 1 file changed, 1 insertion(+) commit 86e8255f941e86e69de7b13a6f716adfc04b77b3 Author: Tao Zhou Date: Thu Oct 20 17:35:36 2022 +0800 drm/amdgpu: add JPEG 4.0 RAS poison consumption handling Register related irq handler. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit ea5309de738885bae03caba66d3913c7120e3815 Author: Tao Zhou Date: Thu Oct 20 17:33:38 2022 +0800 drm/amdgpu: add VCN 4.0 RAS poison consumption handling Register irq handler. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 56ea353ea49ad21dd4c14e7baa235493ec27e766 Author: Tao Zhou Date: Thu Oct 20 17:28:48 2022 +0800 drm/amdgpu: add irq source id definition for VCN/JPEG 4.0 Add interrupt source id macros. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/ivsrcid/vcn/irqsrcs_vcn_4_0.h | 3 +++ 1 file changed, 3 insertions(+) commit 53317458013323e16001ca20e47b08fbe96e851c Author: Tao Zhou Date: Thu Oct 20 16:48:50 2022 +0800 drm/amdgpu: add RAS error query for JPEG 4.0 Initialize JPEG RAS structure and add error query interface. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 63 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.h | 7 ++++ 2 files changed, 70 insertions(+) commit 377d02215ffb829f16d116e2f11b4d5218a4d581 Author: Tao Zhou Date: Thu Oct 20 16:46:35 2022 +0800 drm/amdgpu: add RAS query support for VCN 4.0 Initialize VCN RAS structure and add RAS status query function. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 60 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/vcn_v4_0.h | 6 ++++ 2 files changed, 66 insertions(+) commit 214c76427d2276ba48dde4097ba57b963286657d Author: Tao Zhou Date: Thu Oct 20 16:40:50 2022 +0800 drm/amdgpu: define common jpeg_set_ras_funcs Make the code reusable. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 13 +------------ 3 files changed, 19 insertions(+), 12 deletions(-) commit 2ddb629be200ab229eec62299ca3599a0abb05c2 Author: Tao Zhou Date: Thu Oct 20 16:38:08 2022 +0800 drm/amdgpu: define common vcn_set_ras_funcs So the code can be reused. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 13 +------------ 3 files changed, 19 insertions(+), 12 deletions(-) commit 07615da1bf8eaa130ccfcf00f4687aec440652d8 Author: Tao Zhou Date: Thu Oct 20 16:29:00 2022 +0800 drm/amdgpu: enable RAS for VCN/JPEG v4.0 Set support flag for VCN/JPEG 4.0. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a11a65d5395ccdcd07f19a75da82a3d74c368dd Author: YiPeng Chai Date: Tue Nov 8 17:11:18 2022 +0800 drm/amdgpu: Enable mode-1 reset for RAS recovery in fatal error mode The patch is enabling mode-1 reset for RAS recovery in fatal error mode. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 64a3dbb06ad88d89a0958ccafc4f01611657f641 Author: Luben Tuikov Date: Tue Nov 15 00:36:03 2022 -0500 drm/amdgpu: Add support for RAS table at 0x40000 Add support for RAS table at I2C EEPROM address of 0x40000, since on some ASICs it is not at 0, but at 0x40000. Cc: Alex Deucher Cc: Kent Russell Signed-off-by: Luben Tuikov Tested-by: Kent Russell Reviewed-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0dbf2c56262532fbd498f590c91c4085413b8829 Author: Luben Tuikov Date: Tue Nov 15 00:23:14 2022 -0500 drm/amdgpu: Interpret IPMI data for product information (v2) Don't assume FRU MCU memory locations for the FRU data fields, or their sizes, instead read and interpret the IPMI data, as stipulated in the IPMI spec version 1.0 rev 1.2. Extract the Product Name, Product Part/Model Number, and the Product Serial Number by interpreting the IPMI data. Check the checksums of the stored IPMI data to make sure we don't read and give corrupted data back the the user. Eliminate small I2C reads, and instead read the whole Product Info Area in one go, and then extract the information we're seeking from it. Eliminates a whole function, making this file smaller. v2: Clarify changes in the commit message. Cc: Alex Deucher Cc: Kent Russell Signed-off-by: Luben Tuikov Tested-by: Kent Russell Reviewed-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 183 ++++++++++++------------- 1 file changed, 85 insertions(+), 98 deletions(-) commit afbe5d1e4bd7c798bf5ea53f79ce7f9e59f60301 Author: Luben Tuikov Date: Mon Nov 14 21:21:55 2022 -0500 drm/amdgpu: Bug-fix: Reading I2C FRU data on newer ASICs Set the new correct default FRU MCU I2C address for newer ASICs, so that we can correctly read the Product Name, Product Part/Model Number and Serial Number. On newer ASICs, the FRU MCU was moved to I2C address 0x58. Cc: Alex Deucher Cc: Kent Russell Signed-off-by: Luben Tuikov Tested-by: Kent Russell Reviewed-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 36 ++++++++++++++++++-------- 1 file changed, 25 insertions(+), 11 deletions(-) commit 6a4a745c42a23c5ffca0f0c76ca2ed2593b9389b Author: Luben Tuikov Date: Mon Nov 14 20:48:40 2022 -0500 drm/amdgpu: Allow non-standard EEPROM I2C address Allow non-standard EEPROM I2C address of 0x58, where the Device Type Identifier is 1011b, where we form 1011000b = 0x58 I2C address, as on some ASICs the FRU data lives there. Cc: Alex Deucher Cc: Kent Russell Signed-off-by: Luben Tuikov Tested-by: Kent Russell Reviewed-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc64cc12bcd14219afb91b55d23192c3eb45aa43 Author: Bo Liu Date: Mon Nov 14 22:17:57 2022 -0500 binfmt_elf: replace IS_ERR() with IS_ERR_VALUE() Avoid typecasts that are needed for IS_ERR() and use IS_ERR_VALUE() instead. Signed-off-by: Bo Liu Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221115031757.2426-1-liubo03@inspur.com fs/binfmt_elf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 198d4649b0b813bc9fc1605cfb843b6624518f92 Author: Yang Li Date: Wed Oct 26 13:34:33 2022 +0800 firmware: tegra: Remove surplus dev_err() when using platform_get_irq_byname() There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. ./drivers/firmware/tegra/bpmp-tegra210.c:204:2-9: line 204 is redundant because platform_get_irq() already prints an error ./drivers/firmware/tegra/bpmp-tegra210.c:216:2-9: line 216 is redundant because platform_get_irq() already prints an error Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2579 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp-tegra210.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 332d7d0c6dd7db50109d304802e0d1a9d086188f Author: Matti Vaittinen Date: Wed Nov 16 12:05:56 2022 +0200 power: supply: 88pm860x: simplify using devm Use devm variants for requesting threaded IRQ and for power-supply registration. Clean up error path and remove the .remove-callback. Signed-off-by: Matti Vaittinen Signed-off-by: Sebastian Reichel drivers/power/supply/88pm860x_charger.c | 38 ++++++++------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) commit 5b79480ce1978864ac3f06f2134dfa3b6691fe74 Author: Zeng Heng Date: Thu Nov 17 16:32:19 2022 +0800 power: supply: fix residue sysfs file in error handle route of __power_supply_register() If device_add() succeeds, we should call device_del() when want to get rid of it, so move it into proper jump symbol. Otherwise, when __power_supply_register() returns fail and goto wakeup_init_failed to exit, there is still residue device file in sysfs. When attempt to probe device again, sysfs would complain as below: sysfs: cannot create duplicate filename '/devices/platform/i2c/i2c-0/0-001c/power_supply/adp5061' Call Trace: dump_stack_lvl+0x68/0x85 sysfs_warn_dup.cold+0x1c/0x29 sysfs_create_dir_ns+0x1b1/0x1d0 kobject_add_internal+0x143/0x390 kobject_add+0x108/0x170 Fixes: 80c6463e2fa3 ("power_supply: Fix Oops from NULL pointer dereference from wakeup_source_activate") Signed-off-by: Zeng Heng Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c78ba3cf38a784ffcb4c038bfb45a861db3af60f Merge: 9abf2313adc1 b204b92be306 Author: Thierry Reding Date: Thu Nov 17 23:35:35 2022 +0100 Merge branch 'for-6.2/firmware' into for-6.2/clk commit b204b92be30621a6ca99097155a8997e323c66e7 Author: Peter De Schrijver Date: Thu Oct 27 15:13:53 2022 +0300 firmware: tegra: Update BPMP ABI Update the BPMP ABI to align with the the latest version. Signed-off-by: Peter De Schrijver Acked-by: Stephen Boyd Signed-off-by: Thierry Reding include/soc/tegra/bpmp-abi.h | 1802 +++++++++++++++++++++++++++++++----------- 1 file changed, 1357 insertions(+), 445 deletions(-) commit b6c6bbfc65f53c4d314ea69ff11bad04606e83e4 Author: Shang XiaoJing Date: Fri Sep 23 18:14:35 2022 +0800 soc/tegra: cbb: Remove redundant dev_err call devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message. Signed-off-by: Shang XiaoJing Signed-off-by: Thierry Reding drivers/soc/tegra/cbb/tegra194-cbb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fa9b5246e260925d43c6f9e97deca2ff51465da0 Author: Liu Shixin Date: Thu Sep 22 22:27:15 2022 +0800 soc/tegra: cbb: Use DEFINE_SHOW_ATTRIBUTE to simplify tegra_cbb_err Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Thierry Reding drivers/soc/tegra/cbb/tegra-cbb.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit b76bd1b36813a253f004d634e210d6e3909322c1 Author: Manish Bhardwaj Date: Thu Sep 22 15:56:27 2022 +0530 firmware: tegra: include IVC header file only once Add the necessary definition to prevent compilation errors from the ivc.h file being included multiple times. This does not currently cause any compilation issues, but fix this anyway. Signed-off-by: Manish Bhardwaj Signed-off-by: Thierry Reding include/soc/tegra/ivc.h | 1 + 1 file changed, 1 insertion(+) commit 8acbca3a92b859e3dfe0538254acd5bd5b4632b1 Author: Christophe JAILLET Date: Sun Sep 11 13:56:59 2022 +0200 headers: Remove some left-over license text in include/uapi/linux/hsi/ Remove some left-over from commit e2be04c7f995 ("License cleanup: add SPDX license identifier to uapi header files with a license") When the SPDX-License-Identifier tag has been added, the corresponding license text has not been removed. Signed-off-by: Christophe JAILLET Acked-by: Kai Vehmanen Acked-by: Peter Ujfalusi Signed-off-by: Sebastian Reichel include/uapi/linux/hsi/cs-protocol.h | 14 -------------- include/uapi/linux/hsi/hsi_char.h | 14 -------------- 2 files changed, 28 deletions(-) commit 1aff514e1d2bd47854dbbdf867970b9d463d4c57 Author: Yang Yingliang Date: Mon Oct 31 15:43:37 2022 +0800 HSI: omap_ssi_core: fix possible memory leak in ssi_probe() If ssi_add_controller() returns error, it should call hsi_put_controller() to give up the reference that was set in hsi_alloc_controller(), so that it can call hsi_controller_release() to free controller and ports that allocated in hsi_alloc_controller(). Fixes: b209e047bc74 ("HSI: Introduce OMAP SSI driver") Signed-off-by: Yang Yingliang Signed-off-by: Sebastian Reichel drivers/hsi/controllers/omap_ssi_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c13bf589e5cff0d05ce63c4832de3fab2a19c62d Author: Hamish Martin Date: Thu Nov 10 12:13:25 2022 +1300 mtd: rawnand: marvell: Enable NFC/DEVBUS arbiter The CN9130 SoC (an ARMADA 8K type) has both a NAND Flash Controller and a generic local bus controller (Device Bus Controller) that share common pins. With a board design that incorporates both a NAND flash and uses the Device Bus (in our case for an SRAM) accessing the Device Bus device fails unless the NfArbiterEn bit is set. Setting the bit enables arbitration between the Device Bus and the NAND flash. Since there is no obvious downside in enabling this for designs that don't require arbitration, we always enable it. Signed-off-by: Hamish Martin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221109231325.7714-1-hamish.martin@alliedtelesis.co.nz drivers/mtd/nand/raw/marvell_nand.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 085679b15b5af65f9610f619afde41da0f966194 Author: Lukas Bulwahn Date: Wed Nov 16 13:49:32 2022 +0100 mtd: parsers: refer to ARCH_BCMBCA instead of ARCH_BCM4908 Commit dd5c672d7ca9 ("arm64: bcmbca: Merge ARCH_BCM4908 to ARCH_BCMBCA") removes config ARCH_BCM4908 as config ARCH_BCMBCA has the same intent. Probably due to concurrent development, commit 002181f5b150 ("mtd: parsers: add Broadcom's U-Boot parser") introduces 'Broadcom's U-Boot partition parser' that depends on ARCH_BCM4908, but this use was not visible during the config refactoring from the commit above. Hence, these two changes create a reference to a non-existing config symbol. Adjust the MTD_BRCM_U_BOOT definition to refer to ARCH_BCMBCA instead of ARCH_BCM4908 to remove the reference to the non-existing config symbol ARCH_BCM4908. Signed-off-by: Lukas Bulwahn Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221116124932.4748-1-lukas.bulwahn@gmail.com drivers/mtd/parsers/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f05bff26c9e847ac5f68370eaf3e5f5d3bc58ce Author: Rob Herring Date: Fri Nov 11 15:28:24 2022 -0600 dt-bindings: mtd: fixed-partitions: Fix 'sercomm,scpart-id' schema The schema for 'sercomm,scpart-id' is broken. The 'if' condition is never true because 'compatible' is in the parent node, not the child node the sub-schema applies to. The example passes as there are no constraints on additional/unevaluated properties. That's a secondary issue which is complicated due to nested partitions. Drop the if/then schema and the unnecessary 'allOf' so that the 'sercomm,scpart-id' property is at least defined. Cc: Mikhail Zhilkin Signed-off-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221111212824.4103514-1-robh@kernel.org .../bindings/mtd/partitions/fixed-partitions.yaml | 29 ++++++++-------------- 1 file changed, 11 insertions(+), 18 deletions(-) commit 74f4d7974d2fc88fa39538c0748a2e44ae6c8b9d Author: Miquel Raynal Date: Mon Nov 14 10:03:15 2022 +0100 dt-bindings: mtd: Standardize the style in the examples As recently requested by the binding maintaines, let's use 4 spaces in the examples. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-18-miquel.raynal@bootlin.com .../bindings/mtd/arm,pl353-nand-r2p1.yaml | 32 ++--- .../devicetree/bindings/mtd/brcm,brcmnand.yaml | 80 ++++++------ .../devicetree/bindings/mtd/denali,nand.yaml | 2 +- .../devicetree/bindings/mtd/ingenic,nand.yaml | 144 ++++++++++----------- .../devicetree/bindings/mtd/intel,lgm-ebunand.yaml | 38 +++--- .../bindings/mtd/microchip,mchp48l640.yaml | 16 +-- .../bindings/mtd/partitions/qcom,smem-part.yaml | 34 ++--- .../devicetree/bindings/mtd/qcom,nandc.yaml | 128 +++++++++--------- .../bindings/mtd/st,stm32-fmc2-nand.yaml | 47 +++---- .../devicetree/bindings/mtd/ti,am654-hbmc.yaml | 36 +++--- 10 files changed, 279 insertions(+), 278 deletions(-) commit d963af0b23ca4a72d913b0ce56ce5e270dcfa00f Author: Miquel Raynal Date: Mon Nov 14 10:03:14 2022 +0100 dt-bindings: mtd: Drop object types when referencing other files Setting an object type is redundant when a reference is made, so drop these useless lines. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-17-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/mtd.yaml | 1 - 1 file changed, 1 deletion(-) commit d85cebfbc6f97b38a23527649758521a04b577e1 Author: Miquel Raynal Date: Mon Nov 14 10:03:13 2022 +0100 dt-bindings: mtd: Argue in favor of keeping additionalProperties set to true In most cases we try to avoid it but in some cases this is needed. Clarify why by adding a small comment. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-16-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/mtd.yaml | 1 + Documentation/devicetree/bindings/mtd/nand-chip.yaml | 1 + Documentation/devicetree/bindings/mtd/nand-controller.yaml | 1 + Documentation/devicetree/bindings/mtd/partitions/partition.yaml | 1 + 4 files changed, 4 insertions(+) commit f4b37577a431fe1e79b859f6ad3890e29cfcf747 Author: Miquel Raynal Date: Mon Nov 14 10:03:12 2022 +0100 dt-bindings: mtd: nvmem-cells: Inherit from MTD partitions The aim of MTD nvmem-cells is to treat MTD partitions as NVMEM providers. Hence, MTD partition properties are valid here. Let's reference mtd/partition.yaml which gives us a chance to drop "additionalProperties: true" in favor of "unevaluatedProperties: false". Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-15-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c0fc45f7d305688f727fb44a66554233b1624ab9 Author: Miquel Raynal Date: Mon Nov 14 10:03:11 2022 +0100 dt-bindings: mtd: nvmem-cells: Drop range property from example Memory mapped devices such as parallel NOR flash could make use of the 'ranges' property to translate a nvmem 'reg' cell address to a CPU address but in practice there is no upstream user nor any declaration of this property being valid in this case yet, leading to a warning when constraining a bit more the schema: .../mtd/partitions/nvmem-cells.example.dtb: calibration@f00000: Unevaluated properties are not allowed ('ranges' was unexpected) So let's drop the property from the example, knowing that someone might actually properly define it some day. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-14-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml | 1 - 1 file changed, 1 deletion(-) commit e141ee8234d02727b421058df56f5959b7dc0ed0 Author: Miquel Raynal Date: Mon Nov 14 10:03:10 2022 +0100 dt-bindings: mtd: partitions: Change qcom,smem-part partition type As described in dd638202dfb6 ("dt-bindings: mtd: partitions: add additional example for qcom,smem-part"), the aim of documenting the subnodes was to be able to declare nvmem cells. Hence, the partition property does not really apply directly here, let's instead reference nvmem-cells.yaml first. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-13-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/partitions/qcom,smem-part.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 991088a637c54377b395520631bd1e8f068d524a Author: Miquel Raynal Date: Mon Nov 14 10:03:09 2022 +0100 dt-bindings: mtd: partitions: Constrain the list of parsers Parser compatibles cannot be used anywhere, and the list is limited. In order to constrain this list, enumerate them all under the top "partitions" subnode. New parsers will have to add their own compatible here as well. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-12-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/mtd.yaml | 3 +++ .../bindings/mtd/partitions/arm,arm-firmware-suite.yaml | 2 ++ .../bindings/mtd/partitions/brcm,bcm4908-partitions.yaml | 2 ++ .../mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml | 2 ++ .../bindings/mtd/partitions/linksys,ns-partitions.yaml | 2 ++ .../devicetree/bindings/mtd/partitions/partitions.yaml | 12 ++++++++++-- .../devicetree/bindings/mtd/partitions/qcom,smem-part.yaml | 2 ++ .../devicetree/bindings/mtd/partitions/redboot-fis.yaml | 6 ++++++ 8 files changed, 29 insertions(+), 2 deletions(-) commit 7bdc671822e9099dd5328431867e4cf718b107f5 Author: Miquel Raynal Date: Mon Nov 14 10:03:08 2022 +0100 dt-bindings: mtd: physmap: Reuse the generic definitions The memory mapped MTD devices also share a lot with all the other MTD devices, so let's share the properties by referencing mtd.yaml. We can then drop mentioning the properties, to the cost of mentioning the possible "sram" node name prefix. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-11-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/mtd-physmap.yaml | 7 +++---- Documentation/devicetree/bindings/mtd/mtd.yaml | 2 +- Documentation/devicetree/bindings/mtd/nand-controller.yaml | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) commit e9a399caf0314a69593b653ddf0efadbb11ffb9a Author: Miquel Raynal Date: Mon Nov 14 10:03:07 2022 +0100 dt-bindings: mtd: spi-nor: Drop common properties When redefining common properties does not bring any additional information, just drop them from the SPI-NOR bindings because these properties already are definied in mtd.yaml. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-10-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 14 -------------- 1 file changed, 14 deletions(-) commit c68fc5ed9529987d69d34b367cb390b2285c3ac9 Author: Miquel Raynal Date: Mon Nov 14 10:03:06 2022 +0100 dt-bindings: mtd: sunxi-nand: Add an example to validate the bindings Copy-paste an existing DT node to ensure the dt_binding_check target would catch any unforeseen difference. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-9-miquel.raynal@bootlin.com .../bindings/mtd/allwinner,sun4i-a10-nand.yaml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit eb6fa33657da9526a9e5f43088d80b99a5c0315e Author: Miquel Raynal Date: Mon Nov 14 10:03:05 2022 +0100 dt-bindings: mtd: onenand: Mention the expected node name The chip node name in this driver is expected to be different and should be prefixed with onenand instead of the regular "flash" string, so mention it. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-8-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/ti,gpmc-onenand.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 73fc6320651ab13da88ee3f4a4bb7499f0b21e20 Author: Miquel Raynal Date: Mon Nov 14 10:03:04 2022 +0100 dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated Defining partitions as subnodes of the controller has been deprecated long time ago, but unlike having partitions within the controller node, having an enveloppe named "partitions" (which is not itself within a chip subnode) is not that common, so keep this deprecated definition in this file. Signed-off-by: Miquel Raynal Acked-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-7-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/ingenic,nand.yaml | 1 + 1 file changed, 1 insertion(+) commit 488f19adf040329cbc0f9d3bea4829ccd0ebb57b Author: Miquel Raynal Date: Mon Nov 14 10:03:03 2022 +0100 dt-bindings: mtd: nand: Standardize the child node name In almost all the schema mentioning a NAND chip child node, the name of the subnode contains a single index number. In practice there are currently no controller supporting more than 8 cs so even the [a-f] numbers are not needed. But let's be safe and limit the number of touched files by just allow a single number everywhere, so in practice up to 16 CS at most. This value can anyway be limited in each schema. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-6-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml | 2 +- Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e598511b0bfe7d9fd5165d53f1afb94e1a9be62d Author: Miquel Raynal Date: Mon Nov 14 10:03:02 2022 +0100 dt-bindings: mtd: nand: Drop common properties already defined in generic files generic files, so let's drop these properties from the individual NAND controller bindings when no additional information is provided rather than the possible presence of the property. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-5-miquel.raynal@bootlin.com .../devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml | 9 +-------- .../devicetree/bindings/mtd/arasan,nand-controller.yaml | 5 +---- Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml | 10 +--------- Documentation/devicetree/bindings/mtd/qcom,nandc.yaml | 3 --- 4 files changed, 3 insertions(+), 24 deletions(-) commit 71a2026a66511d3296cd657bd3066dbf2f5ab11e Author: Miquel Raynal Date: Mon Nov 14 10:03:01 2022 +0100 dt-bindings: mtd: nand-chip: Reference mtd.yaml A NAND chip is an MTD device. mtd.yaml already defines many useful and relevant properties, let's reference this file here to get access to these additional property definitions. Signed-off-by: Miquel Raynal Acked-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-4-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/nand-chip.yaml | 3 +++ 1 file changed, 3 insertions(+) commit f902baa917b6c1f2d70d008b2ebbe5acf79ba392 Author: Miquel Raynal Date: Mon Nov 14 10:03:00 2022 +0100 dt-bindings: mtd: Remove useless file about partitions There is already a real partitions.yaml file, so assuming everybody knows hot to read yaml schema now, this text file is no longer needed, so drop it. Depending on the situation, the lines referring to this file are either dropped or edited to point to mtd.yaml which includes partition{,s}.yaml. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-3-miquel.raynal@bootlin.com .../devicetree/bindings/mtd/atmel-nand.txt | 6 ++-- .../devicetree/bindings/mtd/ingenic,nand.yaml | 1 - .../devicetree/bindings/mtd/lpc32xx-mlc.txt | 2 +- .../devicetree/bindings/mtd/lpc32xx-slc.txt | 2 +- Documentation/devicetree/bindings/mtd/mtk-nand.txt | 2 +- .../devicetree/bindings/mtd/partition.txt | 33 ---------------------- drivers/mtd/parsers/Kconfig | 2 +- 7 files changed, 6 insertions(+), 42 deletions(-) commit 5d96ea42eb63da72ed2eb4c1769d3181706d8cf3 Author: Miquel Raynal Date: Mon Nov 14 10:02:59 2022 +0100 dt-bindings: mtd: Clarify all partition subnodes Over time the various ways to define MTD partitions has evolved. Most of the controllers support several different bindings. Let's define all possible choices in one file and mark the legacy ones deprecated. This way, we can just reference this file and avoid dupplicating these definitions. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20221114090315.848208-2-miquel.raynal@bootlin.com Documentation/devicetree/bindings/mtd/mtd.yaml | 17 +++++++++++ .../bindings/mtd/partitions/partitions.yaml | 33 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit 6bdd45d795adf9e73b38ced5e7f750cd199499ff Author: Hui Tang Date: Mon Nov 14 17:02:40 2022 +0800 mtd: lpddr2_nvm: Fix possible null-ptr-deref It will cause null-ptr-deref when resource_size(add_range) invoked, if platform_get_resource() returns NULL. Fixes: 96ba9dd65788 ("mtd: lpddr: add driver for LPDDR2-NVM PCM memories") Signed-off-by: Hui Tang Acked-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221114090240.244172-1-tanghui20@huawei.com drivers/mtd/lpddr/lpddr2_nvm.c | 2 ++ 1 file changed, 2 insertions(+) commit 9b533a6e41df8315422575764a7f9a72bda2d995 Author: Rafał Miłecki Date: Tue Nov 8 10:31:02 2022 +0100 dt-bindings: mtd: partitions: allow SafeLoader dynamic subpartitions TP-Link SafeLoader partitioning means flash contains multiple partitions defined in the on-flash table. Some of those partitions may have a special meaning and may require describing additionally. Allow that. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221108093102.8360-1-zajec5@gmail.com .../bindings/mtd/partitions/tplink,safeloader-partitions.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 80d34260f36c6c55f03c3c33be4a11ec06202e98 Author: Geert Uytterhoeven Date: Wed Nov 9 14:33:04 2022 +0100 pinctrl: renesas: gpio: Use dynamic GPIO base if no function GPIOs Since commit 502df79b860563d7 ("gpiolib: Warn on drivers still using static gpiobase allocation") in gpio/for-next, one or more warnings are printed during boot on systems where the pin controller also provides GPIO functionality: gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation. Fix this for ARM-based SH/R-Mobile SoCs by: 1. Taking into account a non-zero GPIO base in the various GPIO chip callbacks, 2. Switching to dynamic allocation of the GPIO base when support for legacy function GPIOs is not enabled. On SuperH SoCs using legacy function GPIOs, the GPIO bases of the GPIO controller and the GPIO function controller must not be changed, as all board files rely on the fixed GPIO_* and GPIO_FN_* definitions provided by the various header files. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/df2cf30ac4c3cbee726799f32b727c1ebe62819c.1668000684.git.geert+renesas@glider.be drivers/pinctrl/renesas/gpio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8610e98f0b48a7f9974cb12c5f501433c4afa958 Author: Bjorn Helgaas Date: Wed Nov 16 14:50:59 2022 -0600 PCI: Drop of_match_ptr() to avoid unused variables We have stubs for most OF interfaces even when CONFIG_OF is not set, so we allow building of most controller drivers in that case for compile testing. When CONFIG_OF is not set, "of_match_ptr()" compiles to NULL, which leaves unused, resulting in errors like this: $ make W=1 drivers/pci/controller/pci-xgene.c:636:34: error: ‘xgene_pcie_match_table’ defined but not used [-Werror=unused-const-variable=] Drop of_match_ptr() to avoid the unused variable warning. See also 1dff012f636d ("PCI: Drop of_match_ptr() to avoid unused variables"). Link: https://lore.kernel.org/r/20221025191339.667614-2-helgaas@kernel.org Link: https://lore.kernel.org/r/20221116205100.1136224-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas drivers/pci/controller/pci-ftpci100.c | 2 +- drivers/pci/controller/pci-v3-semi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 40005cb6093e92d24a1bdbc444311c25e4b28878 Author: Lad Prabhakar Date: Tue Nov 15 10:51:35 2022 +0000 riscv: dts: renesas: rzfive-smarc: Enable CANFD/I2C Enable CANFD and I2C on RZ/Five SMARC EVK. Note, these blocks are enabled in RZ/G2UL SMARC EVK DTSI [0] hence deleting these disabled nodes from RZ/Five SMARC EVK DTSI enables them here too as we include [0] in RZ/Five SMARC EVK DTSI. [0] arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi Signed-off-by: Lad Prabhakar Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221115105135.1180490-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/riscv/boot/dts/renesas/rzfive-smarc.dtsi | 27 --------------------------- 1 file changed, 27 deletions(-) commit 42d3345eb3466587798c25a7e5704e15b738263e Author: Lad Prabhakar Date: Tue Nov 15 10:51:34 2022 +0000 riscv: dts: renesas: r9a07g043f/rzfive-smarc-som: Enable ADC/OPP/Thermal Zones/TSU Enable support for below blocks found on RZ/Five SMARC EVK SoC/SoM: - ADC - OPP - Thermal Zones - TSU Note, these blocks are enabled in RZ/G2UL SMARC SoM DTSI [0] hence deleting these disabled nodes from RZ/Five SMARC SoM DTSI enables them 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 Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221115105135.1180490-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 2 ++ arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi | 11 ----------- 2 files changed, 2 insertions(+), 11 deletions(-) commit b9e88ba6dcda4cd2d36e27dadb6acab4fad8a80f Author: Biju Das Date: Wed Nov 16 10:21:40 2022 +0000 arm64: dts: renesas: r9a09g011: Add system controller node Add system controller node to RZ/V2M SoC dtsi. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20221116102140.852889-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 9a0e630655361c97e2684b42bd08857ef4cce9ce Author: Geert Uytterhoeven Date: Mon Nov 14 13:49:04 2022 +0100 arm64: dts: renesas: r8a779g0: Add CA76 operating points Add operating points for running the Cortex-A76 CPU cores on R-Car V4H at various speeds, up to the Normal (1.7 GHz) performance mode. Based on a patch in the BSP by Tho Vu. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/8afb32f5dc123ebf2b941703483152ff0992191d.1668429870.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit ee8ce199c7017123b8f2d20f03bfa93351db399b Author: Geert Uytterhoeven Date: Mon Nov 14 13:49:03 2022 +0100 arm64: dts: renesas: r8a779g0: Add CPU core clocks Describe the clocks for the four Cortex-A76 CPU cores. CA76 Sub-Systems 0/1 (both clusters / all CPU cores) are clocked by Z0φ. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/aa6e9ae21e451ebd40d54d986bd0296571128d5b.1668429870.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 5bb355a8d62383b1cbc244897bf6c95724ffbf6e Author: Geert Uytterhoeven Date: Mon Nov 14 13:49:02 2022 +0100 arm64: dts: renesas: r8a779g0: Add CPUIdle support Support CPUIdle for ARM Cortex-A76 on R-Car V4H. Based on patches in the BSP by Tho Vu and Vincent Bryce. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/f6d4076983eb45cf23595a045747f28cbdcdf4e6.1668429870.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 68c9c53d45fa9c48a89d8a9a4d1555b9e91add69 Author: Geert Uytterhoeven Date: Mon Nov 14 13:49:01 2022 +0100 arm64: dts: renesas: r8a779g0: Add secondary CA76 CPU cores Complete the description of the Cortex-A76 CPU cores and L3 cache controllers on the Renesas R-Car V4H (R8A779G0) SoC, including CPU topology and PSCI support for enabling CPU cores. R-Car V4H has 4 Cortex-A76 cores, grouped in 2 clusters. Based on a patch in the BSP by Takeshi Kihara. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/ccb55458bd87f8ba70d28c61bcc254f22184824c.1668429870.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 70 ++++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 5 deletions(-) commit f08407210db921a4c9eaeaa92d0c434858b9c6c4 Author: Geert Uytterhoeven Date: Mon Nov 14 13:49:00 2022 +0100 arm64: dts: renesas: r8a779g0: Add L3 cache controller Describe the cache configuration for the first Cortex-A76 CPU core on the Renesas R-Car V4H (R8A779G0) SoC. Extracted from a larger patch in the BSP by Takeshi Kihara. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/dfd743b32198295afb78bc0ac337ef283fa3879a.1668429870.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit f4e700fd9466e80597952c8bd44827b510832e80 Author: Conor Dooley Date: Tue Nov 15 15:25:47 2022 +0000 riscv: dts: microchip: remove unused pcie clocks The PCIe root port in the designs that ship with the PolarBerry and M100PFSEVP are connected via one, not two Fabric Interface Controllers (FIC). The one at 0x20_0000_0000 is fic0, so remove the fic1 clocks from the dt node. The same clock provides both, so this is harmless but inaccurate. Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs-m100pfs-fabric.dtsi | 4 ++-- arch/riscv/boot/dts/microchip/mpfs-polarberry-fabric.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 1150f4cff831e1d7db673417bcb81833d6544cf8 Author: Conor Dooley Date: Tue Nov 15 15:25:46 2022 +0000 riscv: dts: microchip: remove pcie node from the sev kit The SEV kit reference design does not hook up the PCIe root port to the core complex including it is misleading. The entry is a re-use mistake - I was not aware of this when I moved the PCIe node out of mpfs.dtsi so that individual bistreams could connect it to different fics etc. The node is disabled, so there should be no functional change here. Fixes: 978a17d1a688 ("riscv: dts: microchip: add sevkit device tree") Signed-off-by: Conor Dooley .../boot/dts/microchip/mpfs-sev-kit-fabric.dtsi | 29 ---------------------- 1 file changed, 29 deletions(-) commit 7e20044052317d5f2942b061c4cacdb6790790a2 Author: Phil Edworthy Date: Wed Nov 16 10:21:39 2022 +0000 soc: renesas: Identify RZ/V2M SoC Add support for identifying the RZ/V2M (R9A09G011) SoC. Note that the SoC does not have a identification register. Signed-off-by: Phil Edworthy [biju: removed config changes ] Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20221116102140.852889-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/soc/renesas/renesas-soc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a884f187760ee0c6033296aa50845e2d1e0e8430 Author: Phil Edworthy Date: Wed Nov 16 10:21:38 2022 +0000 dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration Add DT binding documentation for System Configuration (SYS) found on RZ/V2M SoC's. SYS block contains the SYS_VERSION register which can be used to retrieve SoC version information. Signed-off-by: Phil Edworthy Signed-off-by: Biju Das Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221116102140.852889-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven .../soc/renesas/renesas,r9a09g011-sys.yaml | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 00e07cfbdf0b232f7553f0175f8f4e8d792f7e90 Author: Kuppuswamy Sathyanarayanan Date: Wed Nov 16 14:38:20 2022 -0800 selftests/tdx: Test TDX attestation GetReport support Attestation is used to verify the trustworthiness of a TDX guest. During the guest bring-up, the Intel TDX module measures and records the initial contents and configuration of the guest, and at runtime, guest software uses runtime measurement registers (RMTRs) to measure and record details related to kernel image, command line params, ACPI tables, initrd, etc. At guest runtime, the attestation process is used to attest to these measurements. The first step in the TDX attestation process is to get the TDREPORT data. It is a fixed size data structure generated by the TDX module which includes the above mentioned measurements data, a MAC ID to protect the integrity of the TDREPORT, and a 64-Byte of user specified data passed during TDREPORT request which can uniquely identify the TDREPORT. Intel's TDX guest driver exposes TDX_CMD_GET_REPORT0 IOCTL interface to enable guest userspace to get the TDREPORT subtype 0. Add a kernel self test module to test this ABI and verify the validity of the generated TDREPORT. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Dave Hansen Reviewed-by: Tony Luck Reviewed-by: Mika Westerberg Acked-by: Kai Huang Acked-by: Wander Lairson Costa Acked-by: Kirill A. Shutemov Link: https://lore.kernel.org/all/20221116223820.819090-4-sathyanarayanan.kuppuswamy%40linux.intel.com tools/testing/selftests/Makefile | 1 + tools/testing/selftests/tdx/Makefile | 7 ++ tools/testing/selftests/tdx/config | 1 + tools/testing/selftests/tdx/tdx_guest_test.c | 163 +++++++++++++++++++++++++++ 4 files changed, 172 insertions(+) commit 6c8c1406a6d6a3f2e61ac590f5c0994231bc6be7 Author: Kuppuswamy Sathyanarayanan Date: Wed Nov 16 14:38:19 2022 -0800 virt: Add TDX guest driver TDX guest driver exposes IOCTL interfaces to service TDX guest user-specific requests. Currently, it is only used to allow the user to get the TDREPORT to support TDX attestation. Details about the TDX attestation process are documented in Documentation/x86/tdx.rst, and the IOCTL details are documented in Documentation/virt/coco/tdx-guest.rst. Operations like getting TDREPORT involves sending a blob of data as input and getting another blob of data as output. It was considered to use a sysfs interface for this, but it doesn't fit well into the standard sysfs model for configuring values. It would be possible to do read/write on files, but it would need multiple file descriptors, which would be somewhat messy. IOCTLs seem to be the best fitting and simplest model for this use case. The AMD sev-guest driver also uses the IOCTL interface to support attestation. [Bagas Sanjaya: Ack is for documentation portion] Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Dave Hansen Reviewed-by: Bagas Sanjaya Reviewed-by: Tony Luck Reviewed-by: Mika Westerberg Acked-by: Kai Huang Acked-by: Kirill A. Shutemov Acked-by: Wander Lairson Costa Link: https://lore.kernel.org/all/20221116223820.819090-3-sathyanarayanan.kuppuswamy%40linux.intel.com Documentation/virt/coco/tdx-guest.rst | 52 ++++++++++++++++ Documentation/virt/index.rst | 1 + Documentation/x86/tdx.rst | 43 ++++++++++++++ drivers/virt/Kconfig | 2 + drivers/virt/Makefile | 1 + drivers/virt/coco/tdx-guest/Kconfig | 10 ++++ drivers/virt/coco/tdx-guest/Makefile | 2 + drivers/virt/coco/tdx-guest/tdx-guest.c | 102 ++++++++++++++++++++++++++++++++ include/uapi/linux/tdx-guest.h | 42 +++++++++++++ 9 files changed, 255 insertions(+) commit 51acfe89af1118f906f9b68d95fdfb22832ac960 Author: Kuppuswamy Sathyanarayanan Date: Wed Nov 16 14:38:18 2022 -0800 x86/tdx: Add a wrapper to get TDREPORT0 from the TDX Module To support TDX attestation, the TDX guest driver exposes an IOCTL interface to allow userspace to get the TDREPORT0 (a.k.a. TDREPORT subtype 0) from the TDX module via TDG.MR.TDREPORT TDCALL. In order to get the TDREPORT0 in the TDX guest driver, instead of using a low level function like __tdx_module_call(), add a tdx_mcall_get_report0() wrapper function to handle it. This is a preparatory patch for adding attestation support. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Dave Hansen Acked-by: Wander Lairson Costa Link: https://lore.kernel.org/all/20221116223820.819090-2-sathyanarayanan.kuppuswamy%40linux.intel.com arch/x86/coco/tdx/tdx.c | 40 ++++++++++++++++++++++++++++++++++++++++ arch/x86/include/asm/tdx.h | 2 ++ 2 files changed, 42 insertions(+) commit ccdbe14b77a5e39496baf632e157f9daf322dd27 Author: Philipp Hortmann Date: Sun Nov 13 05:36:15 2022 +0100 staging: rtl8192e: Rename pHTInfo Rename variable pHTInfo to ht_info to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/88cdc0ef393c92cb2102a66893c5320e8c8606df.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 10 +- drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 12 +- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 50 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +- drivers/staging/rtl8192e/rtl819x_BAProc.c | 20 +- drivers/staging/rtl8192e/rtl819x_HTProc.c | 354 ++++++++++++------------- drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 4 +- drivers/staging/rtl8192e/rtllib_module.c | 6 +- drivers/staging/rtl8192e/rtllib_rx.c | 12 +- drivers/staging/rtl8192e/rtllib_softmac.c | 78 +++--- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 8 +- drivers/staging/rtl8192e/rtllib_tx.c | 54 ++-- 14 files changed, 307 insertions(+), 307 deletions(-) commit 41fa3d42a3210f09771a10d4e30896c6e3062a82 Author: Philipp Hortmann Date: Sun Nov 13 05:36:09 2022 +0100 staging: rtl8192e: Rename InterruptLog, RxCounter and bHwRfOffAction Rename variable InterruptLog to int_log, RxCounter to rx_ctr and bHwRfOffAction to hw_rf_off_action to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/82ea07ddd894ac9b863ce90ddb9ba78065bd1f4e.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 6 +++--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 4 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 8 ++++---- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 +++--- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) commit 62310f889a73ea2089f31209a426307887435e86 Author: Philipp Hortmann Date: Sun Nov 13 05:36:02 2022 +0100 staging: rtl8192e: Rename bFilterSour.., CCKPresentAt.. and ResetProg.. Rename variable bFilterSourceStationFrame to fltr_src_sta_frame, CCKPresentAttentuation to cck_present_attn and ResetProgress to rst_progress to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/25ab52350a4a3249a1f76b28eea10c44e2f9552d.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 12 ++++++------ drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 20 ++++++++++---------- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 14 +++++++------- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 4 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 20 ++++++++++---------- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 12 ++++++------ drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_rx.c | 2 +- 8 files changed, 43 insertions(+), 43 deletions(-) commit 8e5d08ceb8db933bdb1f60772984ffc166d2eb55 Author: Philipp Hortmann Date: Sun Nov 13 05:35:55 2022 +0100 staging: rtl8192e: Rename bNetPromisc.., IntelPromiscu.. and bPromiscu.. Rename variable bNetPromiscuousMode to net_promiscuous_md, IntelPromiscuousModeInfo to intel_promiscuous_md_info and bPromiscuousOn to promiscuous_on to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/69d9998a30ce2286c3ae6cb4510174e1255b3f9e.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 10 +++++----- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 20 ++++++++++---------- drivers/staging/rtl8192e/rtllib.h | 6 +++--- drivers/staging/rtl8192e/rtllib_rx.c | 8 ++++---- drivers/staging/rtl8192e/rtllib_softmac.c | 4 ++-- 6 files changed, 25 insertions(+), 25 deletions(-) commit 7e5cfa3c77d324fa235e94cc4363b14624ff2c45 Author: Philipp Hortmann Date: Sun Nov 13 05:35:49 2022 +0100 staging: rtl8192e: Rename LinkDetectInfo Rename variable LinkDetectInfo to link_detect_info to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/48d043893fa755490e810af204e5b7ad2ba606de.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 58 ++++++++++++++-------------- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_rx.c | 14 +++---- drivers/staging/rtl8192e/rtllib_softmac.c | 26 ++++++------- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 8 ++-- 6 files changed, 55 insertions(+), 55 deletions(-) commit ab4bcf795e46de03772c583e5180dfaa67eb0293 Author: Philipp Hortmann Date: Sun Nov 13 05:35:43 2022 +0100 staging: rtl8192e: Rename RFInProgres.., bEnableHT and RegChannelPlan Rename variable RFInProgressTimeOut to rf_in_progress_timeout, bEnableHT to enable_ht and RegChannelPlan to reg_chnl_plan to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/aa3b8fd4a51fc9b1c32566cd079590bf11a9190d.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 4 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 12 ++++++------ drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +- drivers/staging/rtl8192e/rtl819x_HT.h | 2 +- drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 ++-- drivers/staging/rtl8192e/rtllib_softmac.c | 14 +++++++------- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 8 ++++---- 8 files changed, 24 insertions(+), 24 deletions(-) commit ca0298c09a5ec55954c0c0c1585e6a5643b8d3ca Author: Philipp Hortmann Date: Sun Nov 13 05:35:34 2022 +0100 staging: rtl8192e: Rename pPSC Rename variable pPSC to psc to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/47ded8a906e55d6f09b51cd8f2dfb78b7b92c1cc.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 14 +++++----- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 16 +++++------ drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 32 +++++++++++----------- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 10 +++---- drivers/staging/rtl8192e/rtllib.h | 10 +++---- drivers/staging/rtl8192e/rtllib_softmac.c | 38 +++++++++++++------------- 6 files changed, 60 insertions(+), 60 deletions(-) commit ca25401e21ab40539a5ed4b86aecc3698f89b86f Author: Philipp Hortmann Date: Sun Nov 13 05:35:27 2022 +0100 staging: rtl8192e: Rename Regdot11TxHT.., dot11HTOpera.. and RegHTSuppRa.. Rename variable Regdot11TxHTOperationalRateSet to reg_dot11tx_ht_oper_rate_set, dot11HTOperationalRateSet to dot11ht_oper_rate_set and RegHTSuppRateSet to reg_ht_supp_rate_set to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0c87e7ffc94be1c26f6400f5e12419f2df0418a3.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +++--- drivers/staging/rtl8192e/rtl819x_HTProc.c | 14 +++++++------- drivers/staging/rtl8192e/rtllib.h | 6 +++--- drivers/staging/rtl8192e/rtllib_softmac.c | 10 +++++----- 5 files changed, 19 insertions(+), 19 deletions(-) commit c7bf6d33d095637fb78ba484a181d17bc1a73a68 Author: Philipp Hortmann Date: Sun Nov 13 05:35:12 2022 +0100 staging: rtl8192e: Rename Regdot11HTOper.., bSupportM.. and PowerSaveCo.. Rename variable Regdot11HTOperationalRateSet to reg_dot11ht_oper_rate_set, bSupportMode to support_mode and PowerSaveControl to pwr_save_ctrl to avoid CamelCase which is not accepted by checkpatch. Fix unnecessary parentheses warning from checkpatch when used with this variables. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1ef7fd22b4a037c4d1f8685065ce7916b6f0930b.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 30 +++++++++++++------------- drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 10 ++++----- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 4 ++-- drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 4 ++-- drivers/staging/rtl8192e/rtllib_softmac.c | 10 ++++----- 7 files changed, 31 insertions(+), 31 deletions(-) commit b397fc48c5d9b70ad17ffeaf8607a4f49055c0d9 Author: Philipp Hortmann Date: Sun Nov 13 05:34:54 2022 +0100 staging: rtl8192e: Rename bTxDisableRate.., RegMaxLPSAwa.. and bTxUseD.. Rename variable bTxDisableRateFallBack to tx_dis_rate_fallback, RegMaxLPSAwakeIntvl to reg_max_lps_awake_intvl and bTxUseDriverAssingedRate to tx_use_drv_assinged_rate to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/092eb2dc73d37daf851ea9ef9cb7e4df6f766845.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 4 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 10 +++++----- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +- drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 ++-- drivers/staging/rtl8192e/rtllib.h | 10 +++++----- drivers/staging/rtl8192e/rtllib_softmac.c | 14 +++++++------- drivers/staging/rtl8192e/rtllib_tx.c | 24 ++++++++++++------------ 7 files changed, 34 insertions(+), 34 deletions(-) commit 7209757311d6eec4c531feba31b170c33122491e Author: Michael Straube Date: Fri Nov 11 09:37:33 2022 +0100 staging: r8188eu: binstallGrpkey is set to _FAIL The variable binstallGrpkey is set to _FAIL which is defined as 0. Use false to set the variable to get rid of another use of _FAIL. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20221111083733.3144-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64ce3acd0a50b3ad7ff345fe11bbb3d39cab216b Author: Michael Straube Date: Fri Nov 11 09:37:32 2022 +0100 staging: r8188eu: convert _rtw_init_xmit_priv() to common error logic Convert the function _rtw_init_xmit_priv() 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. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20221111083733.3144-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_xmit.c | 28 ++++++++-------------------- drivers/staging/r8188eu/include/rtw_xmit.h | 2 +- drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 3 files changed, 10 insertions(+), 22 deletions(-) commit 8985814bb3732aaf7ce5bf892d2827bd4d854fc7 Author: Michael Straube Date: Fri Nov 11 09:37:31 2022 +0100 staging: r8188eu: convert rtw_xmit_resource_alloc() to common error logic Convert the function rtw_xmit_resource_alloc() 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. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20221111083733.3144-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_xmit.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 9b35a6926c613457e0dce179871028a0aa6efb06 Author: Michael Straube Date: Fri Nov 11 09:37:30 2022 +0100 staging: r8188eu: convert aes_cipher() to void The function aes_cipher() returns always _SUCCESS and its callers do not use the return value. So we can convert the return type to void and get rid of another use of _SUCCESS. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20221111083733.3144-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_security.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a3f3e97a039cab5b7efc754dc2907ab5044c7c88 Author: Michael Straube Date: Thu Nov 10 10:09:27 2022 +0100 staging: r8188eu: rename three functions Prefix the names of the following functions with the driver name. The original names are bad for the global namespace. While at it, convert is_IBSS_empty() to all lower case to follow kernel coding style. is_client_associated_to_ap() is_client_associated_to_ibss() is_IBSS_empty() Suggested-by: Greg Kroah-Hartman Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20221110090927.17274-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 14 +++++++------- drivers/staging/r8188eu/core/rtw_wlan_util.c | 8 ++++---- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) commit d73b1d02de0858b96f743e1e8b767fb092ae4c1b Author: Rob Clark Date: Mon Nov 14 11:30:41 2022 -0800 drm/msm: Hangcheck progress detection If the hangcheck timer expires, check if the fw's position in the cmdstream has advanced (changed) since last timer expiration, and allow it up to three additional "extensions" to it's alotted time. The intention is to continue to catch "shader stuck in a loop" type hangs quickly, but allow more time for things that are actually making forward progress. Because we need to sample the CP state twice to detect if there has not been progress, this also cuts the the timer's duration in half. v2: Fix typo (REG_A6XX_CP_CSQ_IB2_STAT), add comment v3: Only halve hangcheck timer duration for generations which support progress detection (hdanton); removed unused a5xx progress (without knowing how to adjust for data buffered in ROQ it is too likely to report a false negative) v4: Comment updates to better describe the total hangcheck duration when progress detection is applied Reviewed-by: Chia-I Wu Tested-by: Chia-I Wu # dEQP-GLES2.functional.flush_finish.wait Signed-off-by: Rob Clark Reviewed-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/511584/ Link: https://lore.kernel.org/r/20221114193049.1533391-3-robdclark@gmail.com drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 34 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/msm_drv.c | 1 - drivers/gpu/drm/msm/msm_drv.h | 8 +++++++- drivers/gpu/drm/msm/msm_gpu.c | 31 ++++++++++++++++++++++++++++++- drivers/gpu/drm/msm/msm_gpu.h | 10 ++++++++++ drivers/gpu/drm/msm/msm_ringbuffer.h | 28 ++++++++++++++++++++++++++++ 6 files changed, 109 insertions(+), 3 deletions(-) commit cade05b2a88558847984287dd389fae0c7de31d6 Author: Rob Clark Date: Mon Nov 14 11:30:40 2022 -0800 drm/msm/adreno: Simplify read64/write64 helpers The _HI reg is always following the _LO reg, so no need to pass these offsets seprately. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/511581/ Link: https://lore.kernel.org/r/20221114193049.1533391-2-robdclark@gmail.com drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 3 +-- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 27 ++++++++++----------------- drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 4 +--- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 24 ++++++++---------------- drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 3 +-- drivers/gpu/drm/msm/msm_gpu.h | 12 ++++++------ 6 files changed, 27 insertions(+), 46 deletions(-) commit e8b8feb5cdae23104b32e3ccfb1dc7ebe4a6c361 Author: Rob Clark Date: Tue Nov 15 08:42:12 2022 -0800 drm/msm: Enable unpin/eviction by default We've had this enabled in the CrOS kernel for a while now without seeing issues, so let's flip the switch upstream now. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/511694/ Link: https://lore.kernel.org/r/20221115164212.1619306-1-robdclark@gmail.com drivers/gpu/drm/msm/msm_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c1b7748100e2e40155722589201f24c23ae5d53 Author: Rob Clark Date: Tue Nov 15 07:55:33 2022 -0800 drm/msm: Enable clamp_to_idle for 7c3 This was overlooked. Signed-off-by: Rob Clark Reviewed-by: Douglas Anderson Reviewed-by: Chia-I Wu Patchwork: https://patchwork.freedesktop.org/patch/511693/ Link: https://lore.kernel.org/r/20221115155535.1615278-1-robdclark@gmail.com drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f6d1918794ef92b4e26b80c3d40365347b76b1fd Author: Rob Clark Date: Tue Nov 15 07:46:34 2022 -0800 drm/msm/a6xx: Fix speed-bin detection vs probe-defer If we get an error (other than -ENOENT) we need to propagate that up the stack. Otherwise if the nvmem driver hasn't probed yet, we'll end up end up claiming that we support all the OPPs which is not likely to be true (and on some generations impossible to be true, ie. if there are conflicting OPPs). v2: Update commit msg, gc unused label, etc v3: Add previously missing \n's Fixes: fe7952c629da ("drm/msm: Add speed-bin support to a618 gpu") Signed-off-by: Rob Clark Reviewed-by: Douglas Anderson Reviewed-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/511690/ Link: https://lore.kernel.org/r/20221115154637.1613968-1-robdclark@gmail.com drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 1d926e259d8f8195fdfaeea7951149001894b473 Author: Jim Cromie Date: Thu Nov 17 10:16:33 2022 -0700 vmlinux.lds.h: add HEADERED_SECTION_* macros These macros elaborate on BOUNDED_SECTION_(PRE|POST)_LABEL macros, prepending an optional KEEP(.gnu.linkonce##_sec_) reservation, and a linker-symbol to address it. This allows a developer to define a header struct (which must fit with the section's base struct-type), and could contain: 1- fields whose value is common to the entire set of data-records. This allows the header & data structs to specialize, complement each other, and shrink. 2- an uplink pointer to an organizing struct which refs other related/sub data-tables header record is addressable via the extern'd header linker-symbol Once the linker-symbols created by the macro are ref'd extern in code, that code can compute a record's index (ptr - start) in the "primary" table, then use it to index into the related/sub tables. Adding a primary.map_* field foreach sub-table would then allow deduplication and remapping of that sub-table. This is aimed at dyndbg's struct _ddebug __dyndbg[] section, whose 3 columns: function, file, module are 50%, 90%, 100% redundant. The module column is fully recoverable after dynamic_debug_init() saves it to each ddebug_table.module as the builtin __dyndbg[] table is parsed. Given that those 3 columns use 24/56 of a _ddebug record, a dyndbg=y kernel with ~5k callsites could reduce kernel memory substantially. Returning that memory to the kernel buddy-allocator? is then possible. Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20221117171633.923628-3-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman include/asm-generic/vmlinux.lds.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 435d6b6564568b82ec74ee7d4d0bcb1f24ccb5f5 Author: Jim Cromie Date: Thu Nov 17 10:16:32 2022 -0700 vmlinux.lds.h: fix BOUNDED_SECTION_(PRE|POST)_LABEL macros Commit 2f465b921bb8 ("vmlinux.lds.h: place optional header space in BOUNDED_SECTION") added BOUNDED_SECTION_(PRE|POST)_LABEL macros, encapsulating the basic boilerplate to KEEP/pack records into a section, and to mark the begin and end of the section with linker-symbols. But it tried to do extra, adding KEEP(*(.gnu.linkonce.##_sec_)) to optionally reserve a header record in front of the data. It wrongly placed the KEEP after the linker-symbol starting the section, so if a header was added, it would wind up in the data. Moving the KEEP to the "correct" place proved brittle, and too clever by half. The obvious safe fix is to remove the KEEP and restore the plain old boilerplate. The header can be added later, with separate macros. Also, the macro var-names: _s_, _e_ are nearly invisible, change them to more obvious names: _BEGIN_, _END_ Fixes: 2f465b921bb8 ("vmlinux.lds.h: place optional header space in BOUNDED_SECTION") Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20221117171633.923628-2-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman include/asm-generic/vmlinux.lds.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 97f256913c5d8a633efe4f11d4ed2d6a3ea42635 Author: Justin Tee Date: Tue Nov 15 17:19:19 2022 -0800 scsi: lpfc: Fix crash involving race between FLOGI timeout and devloss handler When a FLOGI completes with a sequence timeout error, a freed kref ptr dereference crash can occur due to a timing race involving ndlp referencing in lpfc_dev_loss_tmo_callbk. Fix by ensuring the driver accounts for an outstanding FLOGI when dev_loss is active. Also, don't remove the HBA_FLOGI_OUTSTANDING flag when the FLOGI is retried to allow the driver to handle the reference counts correctly in lpfc_dev_loss_tmo_handler. Reported-by: Dietmar Hahn Tested-by: Dietmar Hahn Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20221116011921.105995-5-justintee8345@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 36 +++++++++++++++++++++++++++++++----- drivers/scsi/lpfc/lpfc_hbadisc.c | 36 ++++++++++++++++++++++++++---------- 2 files changed, 57 insertions(+), 15 deletions(-) commit d99af587d59ca39747b4328dad0b193655835c90 Author: Justin Tee Date: Tue Nov 15 17:19:18 2022 -0800 scsi: lpfc: Fix MI capability display in cmf_info sysfs attribute The dynamic mi_ver value holds the currently configured MI setting. mi_ver was being displayed as part of the cmf_info sysfs attribute, when the output string meant to display MI capabilities instead. Add a mi_cap member in the lpfc_pc_sli4_params structure that will store MI capabilities during initialization so that cmf_info prints out capabilities instead of current configuration. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20221116011921.105995-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 2 +- drivers/scsi/lpfc/lpfc_init.c | 3 +++ drivers/scsi/lpfc/lpfc_sli4.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) commit ae696255d655bec673e5a5707f37ff6a098e89c2 Author: Justin Tee Date: Tue Nov 15 17:19:17 2022 -0800 scsi: lpfc: Correct bandwidth logging during receipt of congestion sync WCQE The lpfc_cmf_timer adjusts phba->cmf_link_byte_count periodically and can artifically inflate bandwidth percent. During bandwidth calculation, correct for this by setting a cap of logging a maximum of 100%. Bandwidth calculation is only used for display under LOG_CGN_MGMT so there is no expectation of impacts on performance. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20221116011921.105995-3-justintee8345@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2c1a0a7584f5084f3ec79f86c9a54ee4c55307c4 Author: Justin Tee Date: Tue Nov 15 17:19:16 2022 -0800 scsi: lpfc: Fix WQ|CQ|EQ resource check Adapter configurations with limited EQ resources may fail to initialize. Firmware resources are queried in lpfc_sli4_read_config(). The driver parameters cfg_irq_chann and cfg_hdw_queue are adjusted from defaults if constrained by firmware resources. The minimum resource check includes a special allocation for queues such as ELS, MBOX, NVME LS. However the additional reservation was also incorrectly applied to EQ resources. Reordered WQ|CQ|EQ resource checks to apply the special allocation adjustment to WQ and CQ resources only. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20221116011921.105995-2-justintee8345@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit c4c5fa35563a47957fa4f9c299ca1c6aadc27d50 Author: Gustavo A. R. Silva Date: Tue Nov 15 14:25:16 2022 -0600 scsi: bfa: 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 fdmi_attr_s. Important to mention is 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/209 Link: https://github.com/KSPP/linux/issues/79 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/Y3P1rEEBq7HzJygq@work Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfa_fc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0824050682aef5151ade16129b3a0498a07ca6c9 Author: Colin Ian King Date: Fri Nov 11 17:08:24 2022 +0000 scsi: libfc: Remove redundant variable ev_qual Variable ev_qual is being assigned and modified but the end result is never used. The variable is redundant and can be removed. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221111170824.558250-1-colin.i.king@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_disc.c | 3 --- 1 file changed, 3 deletions(-) commit b29e91385ce2d3aae70906f80f517f9b93d97a7b Author: Xiu Jianfeng Date: Fri Nov 11 15:43:10 2022 +0800 scsi: lpfc: Use memset_startat() helper Use memset_startat() helper to simplify the code, no functional changes in this patch. Signed-off-by: Xiu Jianfeng Link: https://lore.kernel.org/r/20221111074310.132125-1-xiujianfeng@huawei.com Reviewed-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 216e179724c1d9f57a8ababf8bd7aaabef67f01b Author: Harshit Mogalapalli Date: Fri Nov 11 02:05:25 2022 -0800 scsi: scsi_debug: Fix a warning in resp_write_scat() As 'lbdof_blen' is coming from user, if the size in kzalloc() is >= MAX_ORDER then we hit a warning. Call trace: sg_ioctl sg_ioctl_common scsi_ioctl sg_scsi_ioctl blk_execute_rq blk_mq_sched_insert_request blk_mq_run_hw_queue __blk_mq_delay_run_hw_queue __blk_mq_run_hw_queue blk_mq_sched_dispatch_requests __blk_mq_sched_dispatch_requests blk_mq_dispatch_rq_list scsi_queue_rq scsi_dispatch_cmd scsi_debug_queuecommand schedule_resp resp_write_scat If you try to allocate a memory larger than(>=) MAX_ORDER, then kmalloc() will definitely fail. It creates a stack trace and messes up dmesg. The user controls the size here so if they specify a too large size it will fail. Add __GFP_NOWARN in order to avoid too large allocation warning. This is detected by static analysis using smatch. Fixes: 481b5e5c7949 ("scsi: scsi_debug: add resp_write_scat function") Signed-off-by: Harshit Mogalapalli Link: https://lore.kernel.org/r/20221111100526.1790533-1-harshit.m.mogalapalli@oracle.com Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ae45329a956ff86ff8bec36463b6f49d2ca9bea Author: Don Brace Date: Tue Nov 8 13:22:14 2022 -0600 scsi: smartpqi: Change version to 2.1.20-035 Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Gerry Morong Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Link: https://lore.kernel.org/r/166793533417.322537.3074216622272955440.stgit@brunhilda Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 921800a1deeaa832e4303e9335a31b4234c41ac1 Author: Don Brace Date: Tue Nov 8 13:22:09 2022 -0600 scsi: smartpqi: Initialize feature section info Initialize features to 0 before processing. Reviewed-by: Scott Benesh Reviewed-by: Mike Mcgowan Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Link: https://lore.kernel.org/r/166793532902.322537.2436075977808555348.stgit@brunhilda Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14063fb625c4541f48ff0dc7ae005b0d5a159c3f Author: Gilbert Wu Date: Tue Nov 8 13:22:03 2022 -0600 scsi: smartpqi: Add controller cache flush during rmmod Add in a call to flush the controller cache during driver removal. Reviewed-by: Scott Benesh Reviewed-by: Mike Mcgowan Reviewed-by: Kevin Barnett Signed-off-by: Gilbert Wu Signed-off-by: Don Brace Link: https://lore.kernel.org/r/166793532388.322537.878022136408270892.stgit@brunhilda Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit cc9befcbbb5ebce77726f938508700d913530035 Author: Kumar Meiyappan Date: Tue Nov 8 13:21:58 2022 -0600 scsi: smartpqi: Correct device removal for multi-actuator devices Correct device count for multi-actuator drives which can cause kernel panics. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike Mcgowan Reviewed-by: Kevin Barnett Signed-off-by: Kumar Meiyappan Signed-off-by: Don Brace Link: https://lore.kernel.org/r/166793531872.322537.9003385780343419275.stgit@brunhilda Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 33 ++++++++++++++++++++++++--------- 2 files changed, 25 insertions(+), 10 deletions(-) commit cbe42ac15698a23b204a9b5c66eb0067b22cbd42 Author: Kevin Barnett Date: Tue Nov 8 13:21:53 2022 -0600 scsi: smartpqi: Change sysfs raid_level attribute to N/A for controllers Change the sysfs raid_level attribute from "RAID-0" to N/A. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowan Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Link: https://lore.kernel.org/r/166793531357.322537.8639138137605612362.stgit@brunhilda Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c56850637ea820a89ce2f52fca66c5ae12d0f0a Author: Kevin Barnett Date: Tue Nov 8 13:21:48 2022 -0600 scsi: smartpqi: Correct max LUN number Correct maximum LUN number for multi-actuator devices. When multi-actuator support was added to smartpqi, the maximum number of LUNs supported for multi-actuator devices was supposed to be changed from unlimited to 256, but the setting was inadvertently left at unlimited. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Link: https://lore.kernel.org/r/166793530842.322537.816949081443241857.stgit@brunhilda Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 1 - 1 file changed, 1 deletion(-) commit 0b93cf2a9097b1c3d75642ef878ba87f15f03043 Author: Mike McGowen Date: Tue Nov 8 13:21:43 2022 -0600 scsi: smartpqi: Add new controller PCI IDs All PCI ID entries in Hex. Add PCI IDs for ByteDance controllers: VID / DID / SVID / SDID ---- ---- ---- ---- ByteHBA JGH43024-8 9005 / 028f / 1e93 / 1000 ByteHBA JGH43034-8 9005 / 028f / 1e93 / 1001 ByteHBA JGH44014-8 9005 / 028f / 1e93 / 1002 Add PCI IDs for new Inspur controllers: VID / DID / SVID / SDID ---- ---- ---- ---- INSPUR RT0800M7E 9005 / 028f / 1bd4 / 0086 INSPUR RT0800M7H 9005 / 028f / 1bd4 / 0087 INSPUR RT0804M7R 9005 / 028f / 1bd4 / 0088 INSPUR RT0808M7R 9005 / 028f / 1bd4 / 0089 Add PCI IDs for new FAB A controllers: VID / DID / SVID / SDID ---- ---- ---- ---- Adaptec SmartRAID 3254-16e /e 9005 / 028f / 9005 / 1475 Adaptec HBA 1200-16e 9005 / 028f / 9005 / 14c3 Adaptec HBA 1200-8e 9005 / 028f / 9005 / 14c4 Add H3C controller PCI IDs: VID / DID / SVID / SDID ---- ---- ---- ---- H3C H4508-Mf-8i 9005 / 028f / 193d / 110b Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Mike McGowen Signed-off-by: Don Brace Link: https://lore.kernel.org/r/166793530327.322537.6056884426657539311.stgit@brunhilda Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit b27ac2faa2fc0b2677cf1cbd270af734a1f5fd95 Author: Don Brace Date: Tue Nov 8 13:21:38 2022 -0600 scsi: smartpqi: Convert to host_tagset Add support for host_tagset. Also move the reserved command slots to the end of the pool to eliminate an addition operation for every SCSI request. This patch was originally authored by Hannes Reinecke here: Link: https://lore.kernel.org/linux-block/20191126131009.71726-8-hare@suse.de/ But we NAKed this patch because we wanted to fully test multipath failover operations. Suggested-by: Hannes Reinecke Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mahesh Rajashekhara Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Link: https://lore.kernel.org/r/166793529811.322537.3294617845448383948.stgit@brunhilda Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi.h | 3 -- drivers/scsi/smartpqi/smartpqi_init.c | 68 ++++++++++++++++++++++------------- 2 files changed, 43 insertions(+), 28 deletions(-) commit 729c287e9f7481d630b69c73960e2ac990cd04fc Author: Colin Ian King Date: Tue Nov 8 10:36:20 2022 -0800 scsi: lpfc: Remove redundant pointer 'lp' Pointer lp is being initialized and incremented but the result is never read. The pointer is redundant and can be removed. Once lp is removed, pcmd is not longer used. So remove pcmd as well Signed-off-by: Colin Ian King Signed-off-by: James Smart Link: https://lore.kernel.org/r/20221108183620.93978-1-jsmart2021@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 5 ----- 1 file changed, 5 deletions(-) commit effae0e3d9e1139d583e9b5d050f4f948825b8a3 Author: Lad Prabhakar Date: Tue Nov 15 10:51:33 2022 +0000 riscv: Kconfig: Enable cpufreq kconfig menu Enable cpufreq kconfig menu for RISC-V. Signed-off-by: Lad Prabhakar Reviewed-by: Conor Dooley Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20221115105135.1180490-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit d347a951906b506c485ee9ffb76fe473b41f3e10 Author: Sreekanth Reddy Date: Fri Nov 11 15:52:46 2022 +0530 scsi: mpi3mr: Remove usage of dma_get_required_mask() API Remove the usage of dma_get_required_mask() API. Directly set the DMA mask to 63/64 if the system is a 64bit machine. Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20221111102246.19995-2-sreekanth.reddy@broadcom.com Signed-off-by: Martin K. Petersen drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 06e472acf964649a58b7de35fc9cdc3151acb970 Author: Sreekanth Reddy Date: Fri Oct 28 14:46:55 2022 +0530 scsi: mpt3sas: Remove usage of dma_get_required_mask() API Remove the usage of dma_get_required_mask() API. Directly set the DMA mask to 63/64 if the system is a 64bit machine. Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20221028091655.17741-2-sreekanth.reddy@broadcom.com Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9718d7b2a7ea3e55f1717be3c15bd5cdaaea985e Author: Ville Syrjälä Date: Tue Nov 8 17:18:28 2022 +0200 drm/i915/audio: Realign some function arguments Fix up some function argument alignment fails. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221108151839.31567-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_audio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 734d06d2b2b7b1825d17ba547e4b7a5f29c9d049 Author: Ville Syrjälä Date: Tue Nov 8 17:18:27 2022 +0200 drm/i915/audio: Unify get_saved_enc() Make the two branches of get_saved_enc() look alike. Currently they look different even though they do exactly the same thing apart from == vs. != for the MST comparison. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221108151839.31567-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_audio.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit d6c4f95039aa0c0168bb4f67bf4d320d4a54a4a4 Author: Ville Syrjälä Date: Mon Nov 7 21:46:02 2022 +0200 drm/i915: Treat HDMI as DVI when cloning When doing HDMI+non-HDMI cloning the other sink can't get the infoframes/etc. so stuff like limited range output is not a good idea. Similarly when doing HDMI+HDMI cloning on g4x (only platform where we allow it) only one of the ports can receive infoframes and so again using any fancy stuff is a bad idea. We also don't track the inforames/audio state per-port so we'd end up with some kind of random mismash state when multipled encoders try to compute the same stuff. And the hardware will in fact automagically disable audio/infoframe transmission if you try to enable it for multiple HDMI ports at the same time. Thus disable all HDMI specific features when cloning. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221107194604.15227-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_hdmi.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 390a7d305cb3799b6d1901bedd61b32470390b68 Author: Ville Syrjälä Date: Mon Nov 7 21:46:01 2022 +0200 drm/i915: Force RGB output for DVI sink YCbCr output requires infoframes and whatnot, so don't allow it when dealing with a DVI sink (or a HDMI sink we wish to treat as DVI). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221107194604.15227-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_hdmi.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 95067dc6481509fe3b9959cd1d36fc744508de11 Author: Ville Syrjälä Date: Mon Nov 7 21:46:00 2022 +0200 drm/i915: Introduce g4x_hdmi_compute_config() Start pulling some of the more platform specific things out from intel_hdmi_compute_config(). has_pch_encoder is clearly one such thing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221107194604.15227-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/g4x_hdmi.c | 14 +++++++++++++- drivers/gpu/drm/i915/display/intel_hdmi.c | 3 --- 2 files changed, 13 insertions(+), 4 deletions(-) commit 9c1f06d9a76ae7e7a50f7eaeb892f851de9c86fb Author: Ville Syrjälä Date: Mon Nov 14 17:37:17 2022 +0200 drm/i915: Reorder 12.4 lut udw vs. ldw functions Satisfy my ocd and define ilk_lut_12p4_ldw() before ilk_lut_12p4_udw(). That is the order all the other similar functions use. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_color.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 59c676a29b0ef37e5777e61654a400169b5924a3 Author: Ville Syrjälä Date: Mon Nov 14 17:37:16 2022 +0200 drm/i915: Clean up chv CGM (de)gamma defines Add the missing ldw vs. udw information to the CGM (de)gamma bit definitions to make it a bit easier to see which should be used where. Also use the these appropriately in the LUT entry pack/unpack functions. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_color.c | 18 +++++++++--------- drivers/gpu/drm/i915/i915_reg.h | 16 ++++++++++------ 2 files changed, 19 insertions(+), 15 deletions(-) commit c136d7efa8ae86066c09dc276d8923733f4740c9 Author: Ville Syrjälä Date: Mon Nov 14 17:37:15 2022 +0200 drm/i915: Clean up 12.4bit precision palette defines Use consistent bit definitions for the 12.4bit precision palette bits. We just define these alongside the ilk/snb register definitions and point to those from the icl+ superfine segment defines (and we also already pointed to them from the ivb+ precision palette defines). Also use the these appropriately in the LUT entry pack/unpack functions. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_color.c | 22 ++++++++++++---------- drivers/gpu/drm/i915/i915_reg.h | 15 +++++++++------ 2 files changed, 21 insertions(+), 16 deletions(-) commit 732d578a60afa1df31deeb96d1ddc0a32b172fa1 Author: Ville Syrjälä Date: Mon Nov 14 17:37:14 2022 +0200 drm/i915: Clean up 10bit precision palette defines Use consistent bit definitions for the 10bit precision palette bits. We just define these alongside the ilk/snb register definitions and point to those from the ivb+ defines. Also use the these appropriately in the LUT entry pack/unpack functions. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_color.c | 12 ++++++------ drivers/gpu/drm/i915/i915_reg.h | 11 +++++------ 2 files changed, 11 insertions(+), 12 deletions(-) commit c267f05668f6243a2cdf9409efc2eabcadee7e6a Author: Ville Syrjälä Date: Mon Nov 14 17:37:13 2022 +0200 drm/i915: Clean up legacy palette defines Use consistent bit definitions for the legacy gamma LUT. We just define these alongside the pre-ilk register definitions and point to those from the ilk+ defines. Also use the these appropriately in the LUT entry pack/unpack functions. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_color.c | 24 ++++++++++++------------ drivers/gpu/drm/i915/i915_reg.h | 11 +++++------ 2 files changed, 17 insertions(+), 18 deletions(-) commit 6b3960b1cb42f9fc58373e89252aec1821b6010e Author: Ville Syrjälä Date: Fri Nov 11 14:31:20 2022 +0200 drm/i915: Add device name to display tracepoints Include dev_name() in the tracpoints so one can filter based on the device. Example: echo 'dev=="0000:00:02.0"' > events/i915/intel_cpu_fifo_underrun/filter v2: Reduce the magic macros, rebase Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221111123120.7759-5-ville.syrjala@linux.intel.com Acked-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display_trace.h | 161 ++++++++++++++------- 1 file changed, 107 insertions(+), 54 deletions(-) commit 44aad8d03e72e2164e377025e308620ace9b5b69 Author: Ville Syrjälä Date: Fri Nov 11 14:31:19 2022 +0200 drm/i915: Pass i915 to frontbuffer tracepoints Pass the device to the frontbuffer tracpoints. Will be used later to include the device name in the tracpoints. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221111123120.7759-4-ville.syrjala@linux.intel.com Acked-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display_trace.h | 10 ++++++---- drivers/gpu/drm/i915/display/intel_frontbuffer.c | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) commit 2ceea5d88048b570ba02d00c84c06a971f606357 Author: Ville Syrjälä Date: Fri Nov 11 14:31:18 2022 +0200 drm/i915: Print plane name in fbc tracepoints Print the name of the plane in the fbc tracepoints. As the pipe<->plane assignment can vary on old hw it's probably more helpful to see both the plane and the pipe names together. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221111123120.7759-3-ville.syrjala@linux.intel.com Acked-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display_trace.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit b5423d1f82bf20e845faac15b3e2b81988018234 Author: Ville Syrjälä Date: Fri Nov 11 14:31:17 2022 +0200 drm/i915: Pass intel_plane to plane tracepoints Pass intel_plane rather than drm_plane to the plane tracepoints. Matches what we do eg. with the fbc tracepoints. Using the same type for everything will help with digging out the device name from the plane in the future. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221111123120.7759-2-ville.syrjala@linux.intel.com Acked-by: Jani Nikula drivers/gpu/drm/i915/display/intel_atomic_plane.c | 6 ++--- drivers/gpu/drm/i915/display/intel_display_trace.h | 26 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) commit 771a579c6e74f305eff97752d91e9b05c4e46323 Merge: eb298605705a 05311ce954ae Author: Paolo Bonzini Date: Thu Nov 17 11:50:23 2022 -0500 Merge branch 'kvm-svm-harden' into HEAD This fixes three issues in nested SVM: 1) in the shutdown_interception() vmexit handler we call kvm_vcpu_reset(). However, if running nested and L1 doesn't intercept shutdown, the function resets vcpu->arch.hflags without properly leaving the nested state. This leaves the vCPU in inconsistent state and later triggers a kernel panic in SVM code. The same bug can likely be triggered by sending INIT via local apic to a vCPU which runs a nested guest. On VMX we are lucky that the issue can't happen because VMX always intercepts triple faults, thus triple fault in L2 will always be redirected to L1. Plus, handle_triple_fault() doesn't reset the vCPU. INIT IPI can't happen on VMX either because INIT events are masked while in VMX mode. Secondarily, KVM doesn't honour SHUTDOWN intercept bit of L1 on SVM. A normal hypervisor should always intercept SHUTDOWN, a unit test on the other hand might want to not do so. Finally, the guest can trigger a kernel non rate limited printk on SVM from the guest, which is fixed as well. Signed-off-by: Paolo Bonzini commit e9a688bcb19348862afe30d7c85bc37c4c293471 Author: Jason A. Donenfeld Date: Sat Oct 8 20:42:54 2022 -0600 random: use rejection sampling for uniform bounded random integers Until the very recent commits, many bounded random integers were calculated using `get_random_u32() % max_plus_one`, which not only incurs the price of a division -- indicating performance mostly was not a real issue -- but also does not result in a uniformly distributed output if max_plus_one is not a power of two. Recent commits moved to using `prandom_u32_max(max_plus_one)`, which replaces the division with a faster multiplication, but still does not solve the issue with non-uniform output. For some users, maybe this isn't a problem, and for others, maybe it is, but for the majority of users, probably the question has never been posed and analyzed, and nobody thought much about it, probably assuming random is random is random. In other words, the unthinking expectation of most users is likely that the resultant numbers are uniform. So we implement here an efficient way of generating uniform bounded random integers. Through use of compile-time evaluation, and avoiding divisions as much as possible, this commit introduces no measurable overhead. At least for hot-path uses tested, any potential difference was lost in the noise. On both clang and gcc, code generation is pretty small. The new function, get_random_u32_below(), lives in random.h, rather than prandom.h, and has a "get_random_xxx" function name, because it is suitable for all uses, including cryptography. In order to be efficient, we implement a kernel-specific variant of Daniel Lemire's algorithm from "Fast Random Integer Generation in an Interval", linked below. The kernel's variant takes advantage of constant folding to avoid divisions entirely in the vast majority of cases, works on both 32-bit and 64-bit architectures, and requests a minimal amount of bytes from the RNG. Link: https://arxiv.org/pdf/1805.10941.pdf Cc: stable@vger.kernel.org # to ease future backports that use this api Signed-off-by: Jason A. Donenfeld drivers/char/random.c | 22 ++++++++++++++++++++++ include/linux/prandom.h | 18 ++---------------- include/linux/random.h | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 16 deletions(-) commit 6ce625939e58174df5a006ba8aa9d4c0013dfcf8 Author: Jason A. Donenfeld Date: Sun Oct 16 22:42:25 2022 -0600 kcsan: remove rng selftest The first test of the kcsan selftest appears to test if get_random_u32() returns two zeros in a row, and requires that it doesn't. This seems like a bogus criteron. Remove it. Acked-by: Marco Elver Signed-off-by: Jason A. Donenfeld kernel/kcsan/selftest.c | 8 -------- 1 file changed, 8 deletions(-) commit eb298605705a5c6b3d61c754e3c80ac8ef8e8724 Author: David Matlack Date: Thu Nov 3 13:44:21 2022 -0700 KVM: x86/mmu: Do not recover dirty-tracked NX Huge Pages Do not recover (i.e. zap) an NX Huge Page that is being dirty tracked, as it will just be faulted back in at the same 4KiB granularity when accessed by a vCPU. This may need to be changed if KVM ever supports 2MiB (or larger) dirty tracking granularity, or faulting huge pages during dirty tracking for reads/executes. However for now, these zaps are entirely wasteful. In order to check if this commit increases the CPU usage of the NX recovery worker thread I used a modified version of execute_perf_test [1] that supports splitting guest memory into multiple slots and reports /proc/pid/schedstat:se.sum_exec_runtime for the NX recovery worker just before tearing down the VM. The goal was to force a large number of NX Huge Page recoveries and see if the recovery worker used any more CPU. Test Setup: echo 1000 > /sys/module/kvm/parameters/nx_huge_pages_recovery_period_ms echo 10 > /sys/module/kvm/parameters/nx_huge_pages_recovery_ratio Test Command: ./execute_perf_test -v64 -s anonymous_hugetlb_1gb -x 16 -o | kvm-nx-lpage-re:se.sum_exec_runtime | | ---------------------------------------- | Run | Before | After | ------- | ------------------ | ------------------- | 1 | 730.084105 | 724.375314 | 2 | 728.751339 | 740.581988 | 3 | 736.264720 | 757.078163 | Comparing the median results, this commit results in about a 1% increase CPU usage of the NX recovery worker when testing a VM with 16 slots. However, the effect is negligible with the default halving time of NX pages, which is 1 hour rather than 10 seconds given by period_ms = 1000, ratio = 10. [1] https://lore.kernel.org/kvm/20221019234050.3919566-2-dmatlack@google.com/ Signed-off-by: David Matlack Message-Id: <20221103204421.1146958-1-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 3af43ba4c6019b29c048921eb8147eb010165329 Author: Hou Tao Date: Wed Nov 16 15:50:58 2022 +0800 bpf: Pass map file to .map_update_batch directly Currently bpf_map_do_batch() first invokes fdget(batch.map_fd) to get the target map file, then it invokes generic_map_update_batch() to do batch update. generic_map_update_batch() will get the target map file by using fdget(batch.map_fd) again and pass it to bpf_map_update_value(). The problem is map file returned by the second fdget() may be NULL or a totally different file compared by map file in bpf_map_do_batch(). The reason is that the first fdget() only guarantees the liveness of struct file instead of file descriptor and the file description may be released by concurrent close() through pick_file(). It doesn't incur any problem as for now, because maps with batch update support don't use map file in .map_fd_get_ptr() ops. But it is better to fix the potential access of an invalid map file. Using __bpf_map_get() again in generic_map_update_batch() can not fix the problem, because batch.map_fd may be closed and reopened, and the returned map file may be different with map file got in bpf_map_do_batch(), so just passing the map file directly to .map_update_batch() in bpf_map_do_batch(). Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221116075059.1551277-1-houtao@huaweicloud.com include/linux/bpf.h | 5 +++-- kernel/bpf/syscall.c | 32 ++++++++++++++------------------ 2 files changed, 17 insertions(+), 20 deletions(-) commit 63d28a25e04cb48e6bd15141506645ac99d9f8b2 Author: Paolo Bonzini Date: Thu Nov 17 11:05:51 2022 -0500 KVM: x86/mmu: simplify kvm_tdp_mmu_map flow when guest has to retry A removed SPTE is never present, hence the "if" in kvm_tdp_mmu_map only fails in the exact same conditions that the earlier loop tested in order to issue a "break". So, instead of checking twice the condition (upper level SPTEs could not be created or was frozen), just exit the loop with a goto---the usual poor-man C replacement for RAII early returns. While at it, do not use the "ret" variable for return values of functions that do not return a RET_PF_* enum. This is clearer and also makes it possible to initialize ret to RET_PF_RETRY. Suggested-by: Robert Hoo Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/tdp_mmu.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit 260ad3de718301ed8c22e28558e3a31c99f54cf6 Author: Mario Limonciello Date: Wed Nov 16 09:43:41 2022 -0600 platform/x86/amd: pmc: Add a workaround for an s0i3 issue on Cezanne Cezanne platforms under the right circumstances have a synchronization problem where attempting to enter s2idle may fail if the x86 cores are put into HLT before hardware resume from the previous attempt has completed. To avoid this issue add a 10-20ms delay before entering s2idle another time. This workaround will only be applied on interrupts that wake the hardware but don't break the s2idle loop. Cc: stable@vger.kernel.org # 6.1 Cc: "Mahapatra, Rajib" Cc: "Raul Rangel" Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20221116154341.13382-1-mario.limonciello@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2658963084567eb9505292470d40f7322006a69a Author: Matthias Brugger Date: Mon Nov 14 13:16:53 2022 +0100 arm64: dts: mediatek: mt7986: Add SoC compatible Missing SoC compatible in the board file causes dt bindings check. Signed-off-by: Matthias Brugger Link: https://lore.kernel.org/r/20221114121653.14739-1-matthias.bgg@kernel.org Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 2 +- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 1 + arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 2 +- arch/arm64/boot/dts/mediatek/mt7986b.dtsi | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) commit c4b33d28ea51c7d194b19a41c96a4f973cc0a280 Author: David Matlack Date: Wed Nov 9 10:59:05 2022 -0800 KVM: x86/mmu: Split huge pages mapped by the TDP MMU on fault Now that the TDP MMU has a mechanism to split huge pages, use it in the fault path when a huge page needs to be replaced with a mapping at a lower level. This change reduces the negative performance impact of NX HugePages. Prior to this change if a vCPU executed from a huge page and NX HugePages was enabled, the vCPU would take a fault, zap the huge page, and mapping the faulting address at 4KiB with execute permissions enabled. The rest of the memory would be left *unmapped* and have to be faulted back in by the guest upon access (read, write, or execute). If guest is backed by 1GiB, a single execute instruction can zap an entire GiB of its physical address space. For example, it can take a VM longer to execute from its memory than to populate that memory in the first place: $ ./execute_perf_test -s anonymous_hugetlb_1gb -v96 Populating memory : 2.748378795s Executing from memory : 2.899670885s With this change, such faults split the huge page instead of zapping it, which avoids the non-present faults on the rest of the huge page: $ ./execute_perf_test -s anonymous_hugetlb_1gb -v96 Populating memory : 2.729544474s Executing from memory : 0.111965688s <--- This change also reduces the performance impact of dirty logging when eager_page_split=N. eager_page_split=N (abbreviated "eps=N" below) can be desirable for read-heavy workloads, as it avoids allocating memory to split huge pages that are never written and avoids increasing the TLB miss cost on reads of those pages. | Config: ept=Y, tdp_mmu=Y, 5% writes | | Iteration 1 dirty memory time | | --------------------------------------------- | vCPU Count | eps=N (Before) | eps=N (After) | eps=Y | ------------ | -------------- | ------------- | ------------ | 2 | 0.332305091s | 0.019615027s | 0.006108211s | 4 | 0.353096020s | 0.019452131s | 0.006214670s | 8 | 0.453938562s | 0.019748246s | 0.006610997s | 16 | 0.719095024s | 0.019972171s | 0.007757889s | 32 | 1.698727124s | 0.021361615s | 0.012274432s | 64 | 2.630673582s | 0.031122014s | 0.016994683s | 96 | 3.016535213s | 0.062608739s | 0.044760838s | Eager page splitting remains beneficial for write-heavy workloads, but the gap is now reduced. | Config: ept=Y, tdp_mmu=Y, 100% writes | | Iteration 1 dirty memory time | | --------------------------------------------- | vCPU Count | eps=N (Before) | eps=N (After) | eps=Y | ------------ | -------------- | ------------- | ------------ | 2 | 0.317710329s | 0.296204596s | 0.058689782s | 4 | 0.337102375s | 0.299841017s | 0.060343076s | 8 | 0.386025681s | 0.297274460s | 0.060399702s | 16 | 0.791462524s | 0.298942578s | 0.062508699s | 32 | 1.719646014s | 0.313101996s | 0.075984855s | 64 | 2.527973150s | 0.455779206s | 0.079789363s | 96 | 2.681123208s | 0.673778787s | 0.165386739s | Further study is needed to determine if the remaining gap is acceptable for customer workloads or if eager_page_split=N still requires a-priori knowledge of the VM workload, especially when considering these costs extrapolated out to large VMs with e.g. 416 vCPUs and 12TB RAM. Signed-off-by: David Matlack Reviewed-by: Mingwei Zhang Message-Id: <20221109185905.486172-3-dmatlack@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/tdp_mmu.c | 73 ++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 38 deletions(-) commit c901a8cae606078e9242d26d72f8f5b8a8001e29 Author: Rob Clark Date: Tue Nov 1 14:40:51 2022 -0700 drm/msm: Remove exclusive-fence hack The workaround was initially necessary due to dma_resv having only a single exclusive fence slot, yet whe don't necessarily know what order the gpu scheduler will schedule jobs. Unfortunately this workaround also has the result of forcing implicit sync, even when userspace does not want it. However, since commit 047a1b877ed4 ("dma-buf & drm/amdgpu: remove dma_resv workaround") the workaround is no longer needed. So remove it. This effectively reverts commit f1b3f696a084 ("drm/msm: Don't break exclusive fence ordering") Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/509457/ Link: https://lore.kernel.org/r/20221101214051.159988-1-robdclark@gmail.com drivers/gpu/drm/msm/msm_gem_submit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4bb9ca7ee07455bec0a802ecf0aa5b09496888e2 Author: Badal Nilawar Date: Mon Nov 14 18:03:48 2022 +0530 drm/i915/mtl: C6 residency and C state type for MTL SAMedia Add support for C6 residency and C state type for MTL SAMedia. Also add mtl_drpc. v2: Fixed review comments (Ashutosh) v3: Sort registers and fix whitespace errors in intel_gt_regs.h (Matt R) Remove MTL_CC_SHIFT (Ashutosh) Adapt to RC6 residency register code refactor (Jani N) v4: Move MTL branch to top in drpc_show v5: Use FORCEWAKE_MT identical to gen6_drpc (Ashutosh) v6: Add MISSING_CASE for gt_core_status switch statement (Rodrigo) Change state name for MTL_CC0 to C0 (from "on") (Rodrigo) v7: Change state name for MTL_CC0 to RC0 (Rodrigo) Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221114123348.3474216-6-badal.nilawar@intel.com drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 59 ++++++++++++++++++++++++++- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 5 +++ drivers/gpu/drm/i915/gt/intel_rc6.c | 17 ++++++-- 3 files changed, 76 insertions(+), 5 deletions(-) commit 78d0b4552c37c52139816ce967aedd981fb79a30 Author: Ashutosh Dixit Date: Mon Nov 14 18:03:47 2022 +0530 drm/i915/gt: Use RC6 residency types as arguments to residency functions Previously RC6 residency functions directly accepted RC6 residency register MMIO offsets (there are four RC6 residency registers). This worked but required an assumption on the residency register layout so was not future proof. Therefore change RC6 residency functions to accept RC6 residency types instead of register MMIO offsets. The knowledge of register offsets as well as ID to offset mapping is now maintained solely in intel_rc6 and can be tailored for different platforms and different register layouts as need arises. v2: Address review comments by Jani N - Change residency functions to accept RC6 residency types instead of register ID's - s/intel_rc6_print_rc5_res/intel_rc6_print_residency/ - Remove "const enum" in function arguments - Naming: intel_rc6_* for enum - Use INTEL_RC6_RES_MAX and other minor changes v3: Don't include intel_rc6_types.h in intel_rc6.h (Jani) Suggested-by: Rodrigo Vivi Suggested-by: Jani Nikula Reported-by: Jani Nikula Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi Signed-off-by: Badal Nilawar Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221114123348.3474216-5-badal.nilawar@intel.com drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 27 ++++--------- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 12 +++--- drivers/gpu/drm/i915/gt/intel_rc6.c | 55 ++++++++++++++++----------- drivers/gpu/drm/i915/gt/intel_rc6.h | 11 ++++-- drivers/gpu/drm/i915/gt/intel_rc6_types.h | 15 +++++++- drivers/gpu/drm/i915/gt/selftest_rc6.c | 6 +-- drivers/gpu/drm/i915/i915_pmu.c | 6 +-- 7 files changed, 72 insertions(+), 60 deletions(-) commit 22009b6dad6621893e9b5c14665f247b6162499c Author: Badal Nilawar Date: Mon Nov 14 18:03:46 2022 +0530 drm/i915/mtl: Modify CAGF functions for MTL Update CAGF functions for MTL to get actual resolved frequency of 3D and SAMedia. v2: Update MTL_MIRROR_TARGET_WP1 position/formatting (MattR) Move MTL branches in cagf functions to top (MattR) Fix commit message (Andi) v3: Added comment about registers not needing forcewake for Gen12+ and returning 0 freq in RC6 v4: Use REG_FIELD_GET and uncore (Rodrigo) Bspec: 66300 Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar Reviewed-by: Ashutosh Dixit Acked-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221114123348.3474216-4-badal.nilawar@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 4 ++++ drivers/gpu/drm/i915/gt/intel_rps.c | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit 01b8c2e60e96ce8a30d23683fba56b478be7287c Author: Don Hiatt Date: Mon Nov 14 18:03:45 2022 +0530 drm/i915: Use GEN12_RPSTAT register for GT freq On GEN12+ use GEN12_RPSTAT register to get actual resolved GT freq. GEN12_RPSTAT does not require a forcewake and will return 0 freq if GT is in RC6. v2: - Fixed review comments(Ashutosh) - Added function intel_rps_read_rpstat_fw to read RPSTAT without forcewake, required especially for GEN6_RPSTAT1 (Ashutosh, Tvrtko) v3: - Updated commit title and message for more clarity (Ashutosh) - Replaced intel_rps_read_rpstat with direct read to GEN12_RPSTAT1 in read_cagf (Ashutosh) v4: Remove GEN12_CAGF_SHIFT and use REG_FIELD_GET (Rodrigo) Cc: Don Hiatt Cc: Andi Shyti Signed-off-by: Don Hiatt Signed-off-by: Badal Nilawar Signed-off-by: Ashutosh Dixit Reviewed-by: Andi Shyti Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221114123348.3474216-3-badal.nilawar@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/gt/intel_rps.c | 32 ++++++++++++++++++++++++++++---- drivers/gpu/drm/i915/gt/intel_rps.h | 2 ++ drivers/gpu/drm/i915/i915_pmu.c | 3 +-- 4 files changed, 32 insertions(+), 6 deletions(-) commit 2c0a284c5d70638c8a4eb47323420d114360c6d7 Author: Ashutosh Dixit Date: Mon Nov 14 18:03:44 2022 +0530 drm/i915/rps: Prefer REG_FIELD_GET in intel_rps_get_cagf Instead of masks/shifts settle on REG_FIELD_GET as the standard way to extract reg fields. This allows future patches touching this code to also consistently use REG_FIELD_GET and friends. Suggested-by: Rodrigo Vivi Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi Signed-off-by: Badal Nilawar Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221114123348.3474216-2-badal.nilawar@intel.com drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 2 +- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 12 ++++-------- drivers/gpu/drm/i915/gt/intel_rps.c | 11 +++++------ 3 files changed, 10 insertions(+), 15 deletions(-) commit 26e90ec7a8403fc8f7a4507098d7d262e9c2d302 Merge: c1c537cf30bc 2d710b00f22f Author: Georgi Djakov Date: Thu Nov 17 17:40:04 2022 +0200 Merge branch 'icc-sc8280xp-l3' into icc-next The SC8280XP currently shows depressing results in memory benchmarks. Fix this by introducing support for the platform in the OSM (and EPSS) L3 driver and support for the platform in the bwmon binding. Link: https://lore.kernel.org/r/20221111032515.3460-1-quic_bjorande@quicinc.com Signed-off-by: Georgi Djakov commit 9917264d74d9063341968a8e071266358496777b Author: Marc Zyngier Date: Sun Nov 13 16:38:24 2022 +0000 KVM: arm64: PMU: Simplify setting a counter to a specific value kvm_pmu_set_counter_value() is pretty odd, as it tries to update the counter value while taking into account the value that is currently held by the running perf counter. This is not only complicated, this is quite wrong. Nowhere in the architecture is it said that the counter would be offset by something that is pending. The counter should be updated with the value set by SW, and start counting from there if required. Remove the odd computation and just assign the provided value after having released the perf event (which is then restarted). Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-9-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0cb9c3c87a9d3287eaf353936e6846d885102439 Author: Marc Zyngier Date: Sun Nov 13 16:38:23 2022 +0000 KVM: arm64: PMU: Add counter_index_to_*reg() helpers In order to reduce the boilerplate code, add two helpers returning the counter register index (resp. the event register) in the vcpu register file from the counter index. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-8-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit 0f1e172b54f7574ca6aa46b851b332896add955f Author: Marc Zyngier Date: Sun Nov 13 16:38:22 2022 +0000 KVM: arm64: PMU: Only narrow counters that are not 64bit wide The current PMU emulation sometimes narrows counters to 32bit if the counter isn't the cycle counter. As this is going to change with PMUv3p5 where the counters are all 64bit, fix the couple of cases where this happens unconditionally. Signed-off-by: Marc Zyngier Reviewed-by: Reiji Watanabe Link: https://lore.kernel.org/r/20221113163832.3154370-7-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 001d85bd6c039d3662a4f33a5d212ef3e0438b27 Author: Marc Zyngier Date: Sun Nov 13 16:38:21 2022 +0000 KVM: arm64: PMU: Narrow the overflow checking when required For 64bit counters that overflow on a 32bit boundary, make sure we only check the bottom 32bit to generate a CHAIN event. Signed-off-by: Marc Zyngier Reviewed-by: Reiji Watanabe Link: https://lore.kernel.org/r/20221113163832.3154370-6-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c82d28cbf1d4f9fe174041b4485c635cb970afa7 Author: Marc Zyngier Date: Sun Nov 13 16:38:20 2022 +0000 KVM: arm64: PMU: Distinguish between 64bit counter and 64bit overflow The PMU architecture makes a subtle difference between a 64bit counter and a counter that has a 64bit overflow. This is for example the case of the cycle counter, which can generate an overflow on a 32bit boundary if PMCR_EL0.LC==0 despite the accumulation being done on 64 bits. Use this distinction in the few cases where it matters in the code, as we will reuse this with PMUv3p5 long counters. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-5-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) commit acdd8a4e13a008a83c6da88bb53eecbecda9714c Author: Marc Zyngier Date: Sun Nov 13 16:38:19 2022 +0000 KVM: arm64: PMU: Always advertise the CHAIN event Even when the underlying HW doesn't offer the CHAIN event (which happens with QEMU), we can always support it as we're in control of the counter overflow. Always advertise the event via PMCEID0_EL0. Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-4-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 2 ++ 1 file changed, 2 insertions(+) commit c1c537cf30bc539d8f6fa4ac315a8def23fd4ae8 Author: Krzysztof Kozlowski Date: Thu Oct 27 11:48:48 2022 -0400 interconnect: qcom: sc8180x: constify pointer to qcom_icc_node Pointers to struct qcom_icc_node are const. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221027154848.293523-3-krzysztof.kozlowski@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/sc8180x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7870c7076aa07d9caaf53652d6b5a3cd74b1d157 Author: Krzysztof Kozlowski Date: Thu Oct 27 11:48:47 2022 -0400 interconnect: qcom: sc7180: drop double space Drop double white-space. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221027154848.293523-2-krzysztof.kozlowski@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/sc7180.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f24227a640344f894522045f74bb2decbdc4f55e Author: Krzysztof Kozlowski Date: Thu Oct 27 11:48:46 2022 -0400 interconnect: qcom: sc7180: fix dropped const of qcom_icc_bcm Pointers to struct qcom_icc_bcm are const, but the change was dropped during merge. Fixes: 016fca59f95f ("Merge branch 'icc-const' into icc-next") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221027154848.293523-1-krzysztof.kozlowski@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/sc7180.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c423f01633eb948ba6f8c98872b4119685e007fb Author: Shang XiaoJing Date: Sat Sep 24 09:50:43 2022 +0800 interconnect: qcom: icc-rpm: Remove redundant dev_err call devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message. Signed-off-by: Shang XiaoJing Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220924015043.25130-1-shangxiaojing@huawei.com Signed-off-by: Georgi Djakov drivers/interconnect/qcom/icc-rpm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit bead02204e9806807bb290137b1ccabfcb4b16fd Author: Marc Zyngier Date: Sun Nov 13 16:38:18 2022 +0000 KVM: arm64: PMU: Align chained counter implementation with architecture pseudocode Ricardo recently pointed out that the PMU chained counter emulation in KVM wasn't quite behaving like the one on actual hardware, in the sense that a chained counter would expose an overflow on both halves of a chained counter, while KVM would only expose the overflow on the top half. The difference is subtle, but significant. What does the architecture say (DDI0087 H.a): - Up to PMUv3p4, all counters but the cycle counter are 32bit - A 32bit counter that overflows generates a CHAIN event on the adjacent counter after exposing its own overflow status - The CHAIN event is accounted if the counter is correctly configured (CHAIN event selected and counter enabled) This all means that our current implementation (which uses 64bit perf events) prevents us from emulating this overflow on the lower half. How to fix this? By implementing the above, to the letter. This largely results in code deletion, removing the notions of "counter pair", "chained counters", and "canonical counter". The code is further restructured to make the CHAIN handling similar to SWINC, as the two are now extremely similar in behaviour. Reported-by: Ricardo Koller Signed-off-by: Marc Zyngier Reviewed-by: Reiji Watanabe Link: https://lore.kernel.org/r/20221113163832.3154370-3-maz@kernel.org arch/arm64/kvm/pmu-emul.c | 320 +++++++++++++--------------------------------- include/kvm/arm_pmu.h | 2 - 2 files changed, 86 insertions(+), 236 deletions(-) commit d017eeabd5092565c3dd1c8a7b00ba724c33c18f Author: Marc Zyngier Date: Sun Nov 13 16:38:17 2022 +0000 arm64: Add ID_DFR0_EL1.PerfMon values for PMUv3p7 and IMP_DEF Align the ID_DFR0_EL1.PerfMon values with ID_AA64DFR0_EL1.PMUver. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221113163832.3154370-2-maz@kernel.org arch/arm64/include/asm/sysreg.h | 2 ++ 1 file changed, 2 insertions(+) commit 383f1a8df8faba88a3bafaddc02f59421bad6829 Author: Daniel Müller Date: Wed Nov 16 17:43:58 2022 +0000 bpf/docs: Include blank lines between bullet points in bpf_devel_QA.rst Commit 26a9b433cf08 ("bpf/docs: Document how to run CI without patch submission") caused a warning to be generated when compiling the documentation: > bpf_devel_QA.rst:55: WARNING: Unexpected indentation. > bpf_devel_QA.rst:56: WARNING: Block quote ends without a blank line This change fixes the problem by inserting the required blank lines. Fixes: 26a9b433cf08 ("bpf/docs: Document how to run CI without patch submission") Reported-by: Akira Yokosawa Signed-off-by: Daniel Müller Signed-off-by: Daniel Borkmann Reviewed-by: Akira Yokosawa Link: https://lore.kernel.org/bpf/20221116174358.2744613-1-deso@posteo.net Documentation/bpf/bpf_devel_QA.rst | 3 +++ 1 file changed, 3 insertions(+) commit 2d710b00f22f3fcbc4e0189524bbf36731d9baf4 Author: Bjorn Andersson Date: Thu Nov 10 19:25:14 2022 -0800 dt-bindings: interconnect: qcom,msm8998-bwmon: Add sc8280xp bwmon instances The sc8280xp platform has two BWMON instances, one v4 and one v5. Extend the existing qcom,msm8998-bwmon and qcom,sc7280-llcc-bwmon to describe these. Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20221111032515.3460-10-quic_bjorande@quicinc.com Signed-off-by: Georgi Djakov .../devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit c70edc06773976f4e6ccfe250030a73c2896e131 Author: Bjorn Andersson Date: Thu Nov 10 19:25:10 2022 -0800 dt-bindings: interconnect: Add sm8350, sc8280xp and generic OSM L3 compatibles Add EPSS L3 compatibles for sm8350 and sc8280xp, but while at it also introduce generic compatible for both qcom,osm-l3 and qcom,epss-l3. Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20221111032515.3460-6-quic_bjorande@quicinc.com Signed-off-by: Georgi Djakov .../bindings/interconnect/qcom,osm-l3.yaml | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit d474d92d70250d43e7ce0c7cb8623f31ee7c40f6 Author: Thomas Gleixner Date: Fri Nov 11 14:55:17 2022 +0100 x86/apic: Remove X86_IRQ_ALLOC_CONTIGUOUS_VECTORS Now that the PCI/MSI core code does early checking for multi-MSI support X86_IRQ_ALLOC_CONTIGUOUS_VECTORS is not required anymore. Remove the flag and rely on MSI_FLAG_MULTI_PCI_MSI. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122015.865042356@linutronix.de arch/x86/include/asm/irqdomain.h | 4 +--- arch/x86/kernel/apic/msi.c | 6 ++---- arch/x86/kernel/apic/vector.c | 4 ---- drivers/iommu/amd/iommu.c | 7 ------- drivers/iommu/intel/irq_remapping.c | 7 ------- drivers/pci/controller/pci-hyperv.c | 15 +-------------- 6 files changed, 4 insertions(+), 39 deletions(-) commit 2569f62ca473584a8ba389f455fc00805389f7da Author: Thomas Gleixner Date: Fri Nov 11 14:55:15 2022 +0100 genirq/msi: Remove msi_domain_ops:: Msi_check() No more users. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122015.807616900@linutronix.de include/linux/msi.h | 4 ---- kernel/irq/msi.c | 17 +---------------- 2 files changed, 1 insertion(+), 20 deletions(-) commit 9c03b2589da2b2b259a960f2a325731f6b38d115 Author: Thomas Gleixner Date: Fri Nov 11 14:55:14 2022 +0100 PCI/MSI: Remove redundant msi_check() callback All these sanity checks are now done _before_ any allocation work happens. No point in doing it twice. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.749446904@linutronix.de drivers/pci/msi/irqdomain.c | 48 --------------------------------------------- 1 file changed, 48 deletions(-) commit 4644d22eb673f173252610a93aaaba4c2bff7b41 Author: Thomas Gleixner Date: Fri Nov 11 14:55:12 2022 +0100 PCI/MSI: Validate MSI-X contiguous restriction early With interrupt domains the sanity check for MSI-X vector validation can be done _before_ any allocation happens. The sanity check only applies to the allocation functions which have an 'entries' array argument. The entries array is filled by the caller with the requested MSI-X indices. Some drivers have gaps in the index space which is not supported on all architectures. The PCI/MSI irq domain has a 'feature' bit to enforce this validation late during the allocation phase. Just do it right away before doing any other work along with the other sanity checks on that array. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.691357406@linutronix.de drivers/pci/msi/msi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 99f3d279765725920aa5924fa445537a20129a6f Author: Thomas Gleixner Date: Fri Nov 11 14:55:11 2022 +0100 PCI/MSI: Reject MSI-X early Similar to PCI multi-MSI reject MSI-X enablement when a irq domain is attached to the device which does not support MSI-X. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.631728309@linutronix.de drivers/pci/msi/msi.c | 4 ++++ 1 file changed, 4 insertions(+) commit d2a463b297415ca6dd4d60bb1c867dd7c931587b Author: Thomas Gleixner Date: Fri Nov 11 14:55:09 2022 +0100 PCI/MSI: Reject multi-MSI early When hierarchical MSI interrupt domains are enabled then there is no point to do tons of work and detect the missing support for multi-MSI late in the allocation path. Just query the domain feature flags right away. The query function is going to be used for other purposes later and has a mode argument which influences the result: ALLOW_LEGACY returns true when: - there is no irq domain attached (legacy support) - there is a irq domain attached which has the feature flag set DENY_LEGACY returns only true when: - there is a irq domain attached which has the feature flag set This allows to use the function universally without ifdeffery in the calling code. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.574339988@linutronix.de drivers/pci/msi/irqdomain.c | 22 ++++++++++++++++++++++ drivers/pci/msi/msi.c | 4 ++++ drivers/pci/msi/msi.h | 9 +++++++++ 3 files changed, 35 insertions(+) commit bab65e48cb064d67b488efb6888c06fd977a8245 Author: Thomas Gleixner Date: Fri Nov 11 14:55:07 2022 +0100 PCI/MSI: Sanitize MSI-X checks There is no point in doing the same sanity checks over and over in a loop during MSI-X enablement. Put them in front of the loop and return early when they fail. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.516946468@linutronix.de drivers/pci/msi/msi.c | 65 ++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) commit 12910ffd189e23d8996e0d19b723518accf57b76 Author: Ahmed S. Darwish Date: Fri Nov 11 14:55:06 2022 +0100 PCI/MSI: Reorder functions in msi.c There is no way to navigate msi.c without banging the head against the wall every now and then because MSI and MSI-X specific functions are intermingled and the code flow is completely non-obvious. Reorder everthing so common helpers, MSI and MSI-X specific functions are grouped together. Suggested-by: Thomas Gleixner Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.459089736@linutronix.de drivers/pci/msi/msi.c | 639 +++++++++++++++++++++++++------------------------- 1 file changed, 326 insertions(+), 313 deletions(-) commit 88614075a952b1af50f5fb10c958e311f6b4f68a Author: Ahmed S. Darwish Date: Fri Nov 11 14:55:04 2022 +0100 Documentation: PCI: Add reference to PCI/MSI device driver APIs All exported device-driver MSI APIs are now grouped in one place at drivers/pci/msi/api.c with comprehensive kernel-docs added. Reference these kernel-docs in the official PCI/MSI howto. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.397739421@linutronix.de Documentation/PCI/msi-howto.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 57127da98bc87688324cc2d29927b340d7754701 Author: Ahmed S. Darwish Date: Fri Nov 11 14:55:03 2022 +0100 PCI/MSI: Move pci_msi_restore_state() to api.c To disentangle the maze in msi.c, all exported device-driver MSI APIs are now to be grouped in one file, api.c. Move pci_msi_enabled() and add kernel-doc for the function. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.331584998@linutronix.de drivers/pci/msi/api.c | 15 +++++++++++++++ drivers/pci/msi/msi.c | 11 ++--------- drivers/pci/msi/msi.h | 2 ++ 3 files changed, 19 insertions(+), 9 deletions(-) commit 897a0b6aa8c7ee0015e8d1f781e8e61069aafe16 Author: Ahmed S. Darwish Date: Fri Nov 11 14:55:01 2022 +0100 PCI/MSI: Move pci_msi_enabled() to api.c To disentangle the maze in msi.c, all exported device-driver MSI APIs are now to be grouped in one file, api.c. Move pci_msi_enabled() and make its kernel-doc comprehensive. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.271447896@linutronix.de drivers/pci/msi/api.c | 12 ++++++++++++ drivers/pci/msi/msi.c | 14 +------------- drivers/pci/msi/msi.h | 3 +++ 3 files changed, 16 insertions(+), 13 deletions(-) commit be37b8428b7b7740bbbc29c17cfa2ee42b9e2d8b Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:59 2022 +0100 PCI/MSI: Move pci_irq_get_affinity() to api.c To disentangle the maze in msi.c, all exported device-driver MSI APIs are now to be grouped in one file, api.c. Move pci_irq_get_affinity() and let its kernel-doc match rest of the file. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.214792769@linutronix.de drivers/pci/msi/api.c | 43 +++++++++++++++++++++++++++++++++++++++++++ drivers/pci/msi/msi.c | 38 -------------------------------------- 2 files changed, 43 insertions(+), 38 deletions(-) commit 18e1926b8c8b7c2249c24057d5f836c578e29f08 Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:58 2022 +0100 PCI/MSI: Move pci_disable_msix() to api.c To disentangle the maze in msi.c, all exported device-driver MSI APIs are now to be grouped in one file, api.c. Move pci_disable_msix() and make its kernel-doc comprehensive. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.156785224@linutronix.de drivers/pci/msi/api.c | 24 ++++++++++++++++++++++++ drivers/pci/msi/msi.c | 14 +------------- drivers/pci/msi/msi.h | 1 + 3 files changed, 26 insertions(+), 13 deletions(-) commit 7b50f62776672e7b328455eddc90ceb01b64ac3e Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:56 2022 +0100 PCI/MSI: Move pci_msix_vec_count() to api.c To disentangle the maze in msi.c, all exported device-driver MSI APIs are now to be grouped in one file, api.c. Move pci_msix_vec_count() and make its kernel-doc comprehensive. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.099461602@linutronix.de drivers/pci/msi/api.c | 20 ++++++++++++++++++++ drivers/pci/msi/msi.c | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) commit 059f778d66ba88e1acad89a46cfb35eb8703feef Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:54 2022 +0100 PCI/MSI: Move pci_free_irq_vectors() to api.c To disentangle the maze in msi.c, all exported device-driver MSI APIs are now to be grouped in one file, api.c. Move pci_free_irq_vectors() and make its kernel-doc comprehensive. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122015.042870570@linutronix.de drivers/pci/msi/api.c | 15 +++++++++++++++ drivers/pci/msi/msi.c | 13 ------------- 2 files changed, 15 insertions(+), 13 deletions(-) commit 017239c8db209307d2acfc0f9a3b104c39f911b3 Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:53 2022 +0100 PCI/MSI: Move pci_irq_vector() to api.c To disentangle the maze in msi.c, all exported device-driver MSI APIs are now to be grouped in one file, api.c. Move pci_irq_vector() and let its kernel-doc match the rest of the file. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.984490384@linutronix.de drivers/pci/msi/api.c | 23 +++++++++++++++++++++++ drivers/pci/msi/msi.c | 24 ------------------------ 2 files changed, 23 insertions(+), 24 deletions(-) commit beddb5efb43ee5b1c048e49225f75b03f8d36aac Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:51 2022 +0100 PCI/MSI: Move pci_alloc_irq_vectors_affinity() to api.c To disentangle the maze in msi.c, all exported device-driver MSI APIs are now to be grouped in one file, api.c. Move pci_alloc_irq_vectors_affinity() and let its kernel-doc reference pci_alloc_irq_vectors() documentation added in parent commit. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.927531290@linutronix.de drivers/pci/msi/api.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/pci/msi/msi.c | 65 --------------------------------------------------- 2 files changed, 59 insertions(+), 65 deletions(-) commit 5c0997dc33ac24b7dc0124c2fc1caa37ae39461a Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:50 2022 +0100 PCI/MSI: Move pci_alloc_irq_vectors() to api.c To disentangle the maze in msi.c, all exported device-driver MSI APIs are now to be grouped in one file, api.c. Make pci_alloc_irq_vectors() a real function instead of wrapper and add proper kernel doc to it. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.870888193@linutronix.de drivers/pci/msi/api.c | 33 +++++++++++++++++++++++++++++++++ include/linux/pci.h | 15 +++++++++++---- 2 files changed, 44 insertions(+), 4 deletions(-) commit be7496c1ef47e1ba8c4b389ee23178fcf066cc4e Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:48 2022 +0100 PCI/MSI: Move pci_enable_msix_range() to api.c To disentangle the maze in msi.c, all exported device-driver MSI APIs are now to be grouped in one file, api.c. Move pci_enable_msix_range() and make its kernel-doc comprehensive. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.813792885@linutronix.de drivers/pci/msi/api.c | 32 ++++++++++++++++++++++++++++++++ drivers/pci/msi/msi.c | 30 ++++-------------------------- drivers/pci/msi/msi.h | 3 +++ 3 files changed, 39 insertions(+), 26 deletions(-) commit bbda3407982211123caadbfdee23594647bd4516 Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:46 2022 +0100 PCI/MSI: Move pci_enable_msi() API to api.c To disentangle the maze in msi.c all exported device-driver MSI APIs are now to be grouped in one file, api.c. Move pci_enable_msi() and make its kernel-doc comprehensive. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.755178149@linutronix.de drivers/pci/msi/api.c | 23 +++++++++++++++++++++++ drivers/pci/msi/msi.c | 14 ++------------ drivers/pci/msi/msi.h | 1 + 3 files changed, 26 insertions(+), 12 deletions(-) commit b12d0bec385b7a58b9e83751e6cd9f04ec3b23a4 Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:45 2022 +0100 PCI/MSI: Move pci_disable_msi() to api.c msi.c is a maze of randomly sorted functions which makes the code unreadable. As a first step split the driver visible API and the internal implementation which also allows proper API documentation via one file. Create drivers/pci/msi/api.c to group all exported device-driver PCI/MSI APIs in one C file. Begin by moving pci_disable_msi() there and add kernel-doc for the function as appropriate. Suggested-by: Thomas Gleixner Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.696798036@linutronix.de drivers/pci/msi/Makefile | 3 +-- drivers/pci/msi/api.c | 37 +++++++++++++++++++++++++++++++++++++ drivers/pci/msi/msi.c | 22 +++++----------------- drivers/pci/msi/msi.h | 4 ++++ 4 files changed, 47 insertions(+), 19 deletions(-) commit c93fd5266cff2afa908659c817c6aff4d5ed6283 Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:43 2022 +0100 PCI/MSI: Move mask and unmask helpers to msi.h The upcoming support for per device MSI interrupt domains needs to share some of the inline helpers with the MSI implementation. Move them to the header file. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.640052354@linutronix.de drivers/pci/msi/msi.c | 61 +------------------------------------ drivers/pci/msi/msi.h | 83 ++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 74 insertions(+), 70 deletions(-) commit db537dd3bf83169d78e5617b75158f64deabcb0b Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:42 2022 +0100 PCI/MSI: Get rid of externs in msi.h Follow the style of Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.582175082@linutronix.de drivers/pci/msi/msi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 13e7accb81d6c07993385af8342238ff22b41ac8 Author: Thomas Gleixner Date: Fri Nov 11 14:54:40 2022 +0100 genirq: Get rid of GENERIC_MSI_IRQ_DOMAIN Adjust to reality and remove another layer of pointless Kconfig indirection. CONFIG_GENERIC_MSI_IRQ is good enough to serve all purposes. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122014.524842979@linutronix.de drivers/base/Makefile | 2 +- drivers/bus/fsl-mc/Kconfig | 2 +- drivers/dma/Kconfig | 2 +- drivers/dma/qcom/hidma.c | 8 ++++---- drivers/iommu/Kconfig | 2 +- drivers/irqchip/Kconfig | 6 +++--- drivers/mailbox/Kconfig | 2 +- drivers/pci/Kconfig | 1 - drivers/perf/Kconfig | 2 +- drivers/soc/ti/Kconfig | 2 +- include/asm-generic/msi.h | 4 ++-- include/linux/device.h | 8 +++----- include/linux/gpio/driver.h | 2 +- include/linux/msi.h | 8 +++----- kernel/irq/Kconfig | 7 +------ kernel/irq/msi.c | 3 --- 16 files changed, 24 insertions(+), 37 deletions(-) commit a474d3fbe287625c6c1cfc56c2a456c5fb7c479e Author: Thomas Gleixner Date: Fri Nov 11 14:54:38 2022 +0100 PCI/MSI: Get rid of PCI_MSI_IRQ_DOMAIN What a zoo: PCI_MSI select GENERIC_MSI_IRQ PCI_MSI_IRQ_DOMAIN def_bool y depends on PCI_MSI select GENERIC_MSI_IRQ_DOMAIN Ergo PCI_MSI enables PCI_MSI_IRQ_DOMAIN which in turn selects GENERIC_MSI_IRQ_DOMAIN. So all the dependencies on PCI_MSI_IRQ_DOMAIN are just an indirection to PCI_MSI. Match the reality and just admit that PCI_MSI requires GENERIC_MSI_IRQ_DOMAIN. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.467556921@linutronix.de arch/um/drivers/Kconfig | 1 - arch/um/include/asm/pci.h | 2 +- arch/x86/Kconfig | 1 - arch/x86/include/asm/pci.h | 4 +-- drivers/pci/Kconfig | 8 ++---- drivers/pci/controller/Kconfig | 30 ++++++++++----------- drivers/pci/controller/dwc/Kconfig | 48 ++++++++++++++++----------------- drivers/pci/controller/mobiveil/Kconfig | 6 ++--- drivers/pci/msi/Makefile | 2 +- drivers/pci/probe.c | 2 -- include/linux/msi.h | 29 ++++++++------------ 11 files changed, 58 insertions(+), 75 deletions(-) commit b2bdda205c0c256d6483231d0afe58a6d68fd3ed Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:37 2022 +0100 PCI/MSI: Let the MSI core free descriptors Let the core do the freeing of descriptors and just keep it around for the legacy case. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.409654736@linutronix.de drivers/pci/msi/irqdomain.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 38c0c10ae6a3d386c50e182227f606d8243124b8 Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:35 2022 +0100 PCI/MSI: Use msi_domain_info:: Bus_token Set the bus token in the msi_domain_info structure and let the core code handle the update. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122014.352437595@linutronix.de drivers/pci/msi/irqdomain.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 22db089a4437a72277677f99717af499560b13f2 Author: Ahmed S. Darwish Date: Fri Nov 11 14:54:33 2022 +0100 genirq/msi: Add bus token to struct msi_domain_info Add a bus token member to struct msi_domain_info and let msi_create_irq_domain() set the bus token. That allows to remove the bus token updates at the call sites. Suggested-by: Thomas Gleixner Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122014.294554462@linutronix.de include/linux/msi.h | 19 +++++++++++-------- kernel/irq/msi.c | 7 +++++-- 2 files changed, 16 insertions(+), 10 deletions(-) commit aeef20527c87fed37c6f159d9eafd063a099f6ed Author: Thomas Gleixner Date: Fri Nov 11 14:54:32 2022 +0100 genirq/irqdomain: Move bus token enum into a seperate header Split the bus token defines out into a seperate header file to avoid inclusion of irqdomain.h in msi.h. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122014.237221143@linutronix.de include/linux/irqdomain.h | 22 +--------------------- include/linux/irqdomain_defs.h | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 21 deletions(-) commit 057c97a1cd665ebb38841418adcd35f57b33cc21 Author: Thomas Gleixner Date: Fri Nov 11 14:54:30 2022 +0100 genirq/msi: Make __msi_domain_free_irqs() static Now that the last user is gone, confine it to the core code. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122014.179595843@linutronix.de include/linux/msi.h | 4 ---- kernel/irq/msi.c | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) commit c4bc51b1dd611fcce53849254c6582334368c715 Author: Thomas Gleixner Date: Fri Nov 11 14:54:28 2022 +0100 powerpc/pseries/msi: Use msi_domain_ops:: Msi_post_free() Use the new msi_post_free() callback which is invoked after the interrupts have been freed to tell the hypervisor about the shutdown. This allows to remove the exposure of __msi_domain_free_irqs(). Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122014.120489922@linutronix.de arch/powerpc/platforms/pseries/msi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f6d3486a3d2f3c67d732641834eec872fcc66472 Author: Thomas Gleixner Date: Fri Nov 11 14:54:27 2022 +0100 genirq/msi: Provide msi_domain_ops:: Post_free() To prepare for removing the exposure of __msi_domain_free_irqs() provide a post_free() callback in the MSI domain ops which can be used to solve the problem of the only user of __msi_domain_free_irqs() in arch/powerpc. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122014.063153448@linutronix.de include/linux/msi.h | 4 ++++ kernel/irq/msi.c | 2 ++ 2 files changed, 6 insertions(+) commit 762687ceb31fc296e2e1406559e8bb50251c5277 Author: Thomas Gleixner Date: Fri Nov 11 14:54:25 2022 +0100 genirq/msi: Make __msi_domain_alloc_irqs() static Nothing outside of the core code requires this. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122014.004725919@linutronix.de include/linux/msi.h | 7 ++----- kernel/irq/msi.c | 6 ++++-- 2 files changed, 6 insertions(+), 7 deletions(-) commit fdd5340411b25450612767270ac3cd0d8454183c Author: Thomas Gleixner Date: Fri Nov 11 14:54:23 2022 +0100 genirq/msi: Add missing kernel doc to msi_next_desc() W=1 complains about this. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122013.947071142@linutronix.de kernel/irq/msi.c | 1 + 1 file changed, 1 insertion(+) commit 2f2940d168236a92df524a1bd99fc7b0325918b5 Author: Thomas Gleixner Date: Fri Nov 11 14:54:22 2022 +0100 genirq/msi: Remove filter from msi_free_descs_free_range() When a range of descriptors is freed then all of them are not associated to a linux interrupt. Remove the filter and add a warning to the free function. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122013.888850936@linutronix.de drivers/base/platform-msi.c | 2 +- include/linux/msi.h | 5 ++--- kernel/irq/msi.c | 19 ++++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) commit befd780253e774ea9388dd8dfad7c627a0aa7e02 Author: Thomas Gleixner Date: Fri Nov 11 14:54:20 2022 +0100 genirq/msi: Use MSI_DESC_ALL in msi_add_simple_msi_descs() There are no associated MSI descriptors in the requested range when the MSI descriptor allocation fails. Use MSI_DESC_ALL as the filter which prepares the next step to get rid of the filter for freeing. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221111122013.831151822@linutronix.de kernel/irq/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c82f0d3fcdcb509a7ba1a2c8f58890155750b00 Author: Thomas Gleixner Date: Fri Nov 11 14:54:19 2022 +0100 iommu/amd: Remove bogus check for multi MSI-X PCI/Multi-MSI is MSI specific and not supported for MSI-X Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221111122013.772447165@linutronix.de drivers/iommu/amd/iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 527f378c42eaac0b48a8c6ff16da99a6177ff9e3 Author: Thomas Gleixner Date: Fri Nov 11 14:54:17 2022 +0100 iommu/vt-d: Remove bogus check for multi MSI-X PCI/Multi-MSI is MSI specific and not supported for MSI-X. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Link: https://lore.kernel.org/r/20221111122013.713848846@linutronix.de drivers/iommu/intel/irq_remapping.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fe97f59a78fefda6c4a8c8ee6a070b1f769fc801 Author: Thomas Gleixner Date: Fri Nov 11 14:54:15 2022 +0100 PCI/MSI: Check for MSI enabled in __pci_msix_enable() PCI/MSI and PCI/MSI-X are mutually exclusive, but the MSI-X enable code lacks a check for already enabled MSI. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20221111122013.653556720@linutronix.de drivers/pci/msi/msi.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6af0ffc0db93f66e25d93ef841e5dc42708c71ee Author: Jani Nikula Date: Wed Nov 9 16:42:09 2022 +0200 drm/i915/display: move restore state and ctx under display sub-struct Move display suspend/resume and display reset modeset state and ctx members under drm_i915_private display sub-struct. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221109144209.3624739-4-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.c | 14 +++++++------- drivers/gpu/drm/i915/display/intel_display_core.h | 7 +++++++ drivers/gpu/drm/i915/i915_drv.h | 3 --- 3 files changed, 14 insertions(+), 10 deletions(-) commit e2925e19c006d5c3f80c08cdbebed2866c712965 Author: Jani Nikula Date: Wed Nov 9 16:42:08 2022 +0200 drm/i915/display: move global_obj_list under display sub-struct Move display global state member under drm_i915_private display sub-struct. Prefer adding anonymous sub-structs even for single members that aren't our own structs. Remove a nearby stale comment while at it. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221109144209.3624739-3-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_display_core.h | 4 ++++ drivers/gpu/drm/i915/display/intel_global_state.c | 4 ++-- drivers/gpu/drm/i915/display/intel_global_state.h | 2 +- drivers/gpu/drm/i915/i915_drv.h | 4 ---- 5 files changed, 8 insertions(+), 8 deletions(-) commit 62749912540b23d3806f5dc8de21b4c5cf5425aa Author: Jani Nikula Date: Wed Nov 9 16:42:07 2022 +0200 drm/i915/display: move hti under display sub-struct Move display hti/hdport related members under drm_i915_private display sub-struct. Prefer adding anonymous sub-structs even for single members that aren't our own structs. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221109144209.3624739-2-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display_core.h | 10 ++++++++++ drivers/gpu/drm/i915/display/intel_hti.c | 10 +++++----- drivers/gpu/drm/i915/i915_drv.h | 8 -------- 3 files changed, 15 insertions(+), 13 deletions(-) commit 03120feffb21703bb4d61ae85c574889c6cb13d7 Author: Jani Nikula Date: Wed Nov 9 16:42:06 2022 +0200 drm/i915/hti: abstract hti handling The HTI or HDPORT handling is sprinkled around. Centralize to one place. Add a note about how subtle the mapping from HDPORT_STATE register to dpll mask actually is. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221109144209.3624739-1-jani.nikula@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_ddi.c | 9 ++----- drivers/gpu/drm/i915/display/intel_display.c | 8 ++---- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 11 ++------ drivers/gpu/drm/i915/display/intel_hti.c | 38 +++++++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_hti.h | 18 +++++++++++++ drivers/gpu/drm/i915/display/intel_hti_regs.h | 16 +++++++++++ drivers/gpu/drm/i915/i915_reg.h | 5 ---- 8 files changed, 79 insertions(+), 27 deletions(-) commit 92292c1de21dffaee0c64576cd29e91af72ca6b6 Merge: ecb89a51724b 5c107f7085f4 Author: Paolo Bonzini Date: Thu Nov 17 09:03:55 2022 -0500 Merge tag 'kvm-selftests-6.2-1' of https://github.com/kvm-x86/linux into HEAD KVM selftests updates for 6.2 perf_util: - Add support for pinning vCPUs in dirty_log_perf_test. - Add a lightweight psuedo RNG for guest use, and use it to randomize the access pattern and write vs. read percentage in the so called "perf util" tests. - Rename the so called "perf_util" framework to "memstress". ucall: - Add a common pool-based ucall implementation (code dedup and pre-work for running SEV (and beyond) guests in selftests. - Fix an issue in ARM's single-step test when using the new pool-based implementation; LDREX/STREX don't play nice with single-step exceptions. init: - Provide a common constructor and arch hook, which will eventually be used by x86 to automatically select the right hypercall (AMD vs. Intel). x86: - Clean up x86's page tabe management. - Clean up and enhance the "smaller maxphyaddr" test, and add a related test to cover generic emulation failure. - Clean up the nEPT support checks. - Add X86_PROPERTY_* framework to retrieve multi-bit CPUID values. commit 82b21ca1912723a53534086864ee0daceb604cb5 Author: Andy Shevchenko Date: Thu Nov 17 12:32:23 2022 +0200 ASoC: SOF: probes: Check ops before memory allocation We may check ops before spending resources on memory allocation. While at it, utilize dev_get_platdata() helper. Signed-off-by: Andy Shevchenko Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221117103223.74425-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-client-probes.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 164312df95a6704da99e528b652720d007500413 Merge: 36d357169891 04ec334e1a03 Author: Rodrigo Vivi Date: Thu Nov 17 08:46:48 2022 -0500 Merge tag 'gvt-next-2022-11-17' of https://github.com/intel/gvt-linux into drm-intel-next gvt-next-2022-11-17 - kernel doc fixes - remove vgpu->released sanity check - small clean up Signed-off-by: Rodrigo Vivi From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20221117064106.GT30028@zhen-hp.sh.intel.com commit 7a3c62678699d7e56736c2d0579d077a7773e77c Author: Mihai Sain Date: Thu Nov 17 15:30:18 2022 +0200 ARM: dts: at91: sama7g5: fix signal name of pin PD8 The signal name of pin PD8 with function D is A22_NANDCLE as it is defined in the datasheet. Signed-off-by: Mihai Sain [claudiu.beznea: rebased on top of 6.1-rc1, removed fixes tag] Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221114151035.2926-1-mihai.sain@microchip.com arch/arm/boot/dts/sama7g5-pinfunc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4b221bd79a1c698d9653e3ae2c3cb61cdc9aee7 Author: Dan Carpenter Date: Tue Nov 15 16:09:55 2022 +0300 net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification() The rswitch_etha_wait_link_verification() is supposed to return zero on success or negative error codes. Unfortunately it is declared as a bool so the caller treats everything as success. Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Dan Carpenter Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/Y3OPo6AOL6PTvXFU@kili Signed-off-by: Paolo Abeni drivers/net/ethernet/renesas/rswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd19ce77993a49f3afc56bb4cae7eafb1ec69e0c Author: Angus Chen Date: Fri Oct 7 18:32:36 2022 +0800 genirq: Remove unused argument force of irq_set_affinity_deactivated() The force parameter in irq_set_affinity_deactivated() is not used, get rid of it. Signed-off-by: Angus Chen Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221007103236.599-1-angus.chen@jaguarmicro.com kernel/irq/manage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e5dfd093eca01a5d8d967f959a2372d7d82eb59c Author: Thomas Gleixner Date: Sun Nov 13 22:21:15 2022 +0100 clocksource/drivers/hyper-v: Include asm/hyperv-tlfs.h not asm/mshyperv.h clocksource/hyperv_timer.h is included into the VDSO build. It includes asm/mshyperv.h which in turn includes the world and some more. This worked so far by chance, but any subtle change in the include chain results in a build breakage because VDSO builds are building user space libraries. Include asm/hyperv-tlfs.h instead which contains everything what the VDSO build needs except the hv_get_raw_timer() define. Move this define into a separate header file, which contains the prerequisites (msr.h) and is included by clocksource/hyperv_timer.h. Fixup drivers/hv/vmbus_drv.c which relies on the indirect include of asm/mshyperv.h. With that the VDSO build only pulls in the minimum requirements. Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/87fsemtut0.ffs@tglx arch/x86/include/asm/hyperv_timer.h | 9 +++++++++ arch/x86/include/asm/mshyperv.h | 2 -- drivers/hv/vmbus_drv.c | 1 + include/clocksource/hyperv_timer.h | 4 +++- 4 files changed, 13 insertions(+), 3 deletions(-) commit d9e38350a7b10f2e1006cd85a664b8698d027e7c Author: Zhi-Jun You Date: Fri Nov 11 00:40:25 2022 +0800 wifi: ath10k: Remove redundant argument offset This argument of ath10k_htt_rx_h_frag_pn_check() is always set to 0 so drop this. Signed-off-by: Zhi-Jun You Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221110164025.14418-1-hujy652@gmail.com drivers/net/wireless/ath/ath10k/htt_rx.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 2af7749047d8d6ad43feff69f555a13a6a6c2831 Author: Xiu Jianfeng Date: Thu Nov 10 14:19:26 2022 +0800 wifi: ath10k: Fix return value in ath10k_pci_init() This driver is attempting to register to support two different buses. if either of these is successful then ath10k_pci_init() should return 0 so that hardware attached to the successful bus can be probed and supported. only if both of these are unsuccessful should ath10k_pci_init() return an errno. Fixes: 0b523ced9a3c ("ath10k: add basic skeleton to support ahb") Signed-off-by: Xiu Jianfeng Reviewed-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221110061926.18163-1-xiujianfeng@huawei.com drivers/net/wireless/ath/ath10k/pci.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit e7e40cc6555ca0b395a09fc6b9a036e4a8ac6f41 Merge: a1d0b9535cd8 b0b9b80599a3 Author: Kalle Valo Date: Thu Nov 17 14:53:45 2022 +0200 Merge tag 'iwlwifi-next-for-kalle-2022-11-06-v2' of http://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next iwlwifi patches intended for v6.2 * iwlmei fixes * Debug mechanism update for new devices (BZ) * Checksum offload fix for the new devices (BZ) * A few rate scale fixes and cleanups * A fix for iwlwifi debug mechanism * Start of MLO preparations - supporting new key API commit b2e44aac91b25abbed57d785089c4b7af926a7bd Author: Dmitry Vyukov Date: Tue Nov 15 11:00:17 2022 +0100 NFC: nci: Allow to create multiple virtual nci devices The current virtual nci driver is great for testing and fuzzing. But it allows to create at most one "global" device which does not allow to run parallel tests and harms fuzzing isolation and reproducibility. Restructure the driver to allow creation of multiple independent devices. This should be backwards compatible for existing tests. Signed-off-by: Dmitry Vyukov Reviewed-by: Bongsu Jeon Cc: Bongsu Jeon Cc: Krzysztof Kozlowski Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20221115100017.787929-1-dvyukov@google.com Signed-off-by: Paolo Abeni drivers/nfc/virtual_ncidev.c | 147 +++++++++++++++++++++---------------------- 1 file changed, 71 insertions(+), 76 deletions(-) commit 710cfc6ab4b85ac5388828b4be63a5f20c8a9dd9 Author: Colin Ian King Date: Tue Nov 15 09:31:37 2022 +0000 sundance: remove unused variable cnt Variable cnt is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20221115093137.144002-1-colin.i.king@gmail.com Signed-off-by: Paolo Abeni drivers/net/ethernet/dlink/sundance.c | 2 -- 1 file changed, 2 deletions(-) commit b0798310f84c97d91e02c950d54677cad91ec5dd Author: Li zeming Date: Tue Nov 15 10:07:05 2022 +0800 sctp: sm_statefuns: Remove pointer casts of the same type The subh.addip_hdr pointer is also of type (struct sctp_addiphdr *), so it does not require a cast. Signed-off-by: Li zeming Link: https://lore.kernel.org/r/20221115020705.3220-1-zeming@nfschina.com Signed-off-by: Paolo Abeni net/sctp/sm_statefuns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5562c6a9657e1bffd4d66df841db142c596f411c Author: Slark Xiao Date: Mon Nov 7 19:27:00 2022 +0800 bus: mhi: host: pci_generic: Add definition for some VIDs To make code neat and for convenience purpose, add definition for some VIDs. Adding it locally until these VIDs are used in multiple places. Signed-off-by: Slark Xiao Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20221107112700.773-1-slark_xiao@163.com Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/pci_generic.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 34a046f08b62fb855ac590c1f4dfb1934f1fdb64 Author: Guoqing Jiang Date: Thu Nov 17 18:19:45 2022 +0800 RDMA/rtrs-srv: Remove kobject_del from rtrs_srv_destroy_once_sysfs_root_folders The kobj_paths which is created dynamically by kobject_create_and_add, and per the comment above kobject_create_and_add, we only need to call kobject_put which is not same as other kobjs such as stats->kobj_stats and srv_path->kobj. Acked-by: Md Haris Iqbal Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20221117101945.6317-9-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c | 1 - 1 file changed, 1 deletion(-) commit 6af4609c18b3aa69209d022b9c00e6db78c57ae5 Author: Guoqing Jiang Date: Thu Nov 17 18:19:44 2022 +0800 RDMA/rtrs-srv: Fix several issues in rtrs_srv_destroy_path_files There are several issues in the function which is supposed to be paired with rtrs_srv_create_path_files. 1. rtrs_srv_stats_attr_group is not removed though it is created in rtrs_srv_create_stats_files. 2. it makes more sense to check kobj_stats.state_in_sysfs before destroy kobj_stats instead of rely on kobj.state_in_sysfs. 3. kobject_init_and_add is used for both kobjs (srv_path->kobj and srv_path->stats->kobj_stats), however we missed to call kobject_del for srv_path->kobj which was called in free_path. 4. rtrs_srv_destroy_once_sysfs_root_folders is independent of either kobj or kobj_stats. Acked-by: Md Haris Iqbal Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20221117101945.6317-8-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 7526198f27107278c600a3aee41f1a77ed84dd78 Author: Guoqing Jiang Date: Thu Nov 17 18:19:43 2022 +0800 RDMA/rtrs: Clean up rtrs_rdma_dev_pd_ops Let's remove them since the three members are not used. Acked-by: Md Haris Iqbal Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20221117101945.6317-7-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-pri.h | 3 --- drivers/infiniband/ulp/rtrs/rtrs.c | 22 ++++------------------ 2 files changed, 4 insertions(+), 21 deletions(-) commit a4399563356c86eafeadcdc155d5d93320713b6e Author: Guoqing Jiang Date: Thu Nov 17 18:19:42 2022 +0800 RDMA/rtrs-srv: Remove outdated comments from create_con Remove the orphan comments. Acked-by: Md Haris Iqbal Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20221117101945.6317-6-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-srv.c | 6 ------ 1 file changed, 6 deletions(-) commit f5708e6699c230f64736107c90b63a53bdc0a613 Author: Guoqing Jiang Date: Thu Nov 17 18:19:41 2022 +0800 RDMA/rtrs-clt: Correct the checking of ib_map_mr_sg We should check with count, also the only successful case is that all sg elements are mapped, so make it explicitly. Acked-by: Jack Wang Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20221117101945.6317-5-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-clt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 102d2f70ec0999a5cde181f1ccbe8a81cba45b10 Author: Guoqing Jiang Date: Thu Nov 17 18:19:40 2022 +0800 RDMA/rtrs-srv: Correct the checking of ib_map_mr_sg We should check with nr_sgt, also the only successful case is that all sg elements are mapped, so make it explicitly. Acked-by: Jack Wang Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20221117101945.6317-4-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f597ac618d04beb9de997fda59a29c9d3818fb2 Author: Guoqing Jiang Date: Thu Nov 17 18:19:39 2022 +0800 RDMA/rtrs-srv: Refactor the handling of failure case in map_cont_bufs Let's call unmap_cont_bufs when failure happens, and also only update mrs_num after everything is settled which means we can remove 'mri'. Acked-by: Md Haris Iqbal Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20221117101945.6317-3-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-srv.c | 47 +++++++++++++++------------------- 1 file changed, 20 insertions(+), 27 deletions(-) commit d7115727e32e94c77a5441892e74ae0339afa1a5 Author: Guoqing Jiang Date: Thu Nov 17 18:19:38 2022 +0800 RDMA/rtrs-srv: Refactor rtrs_srv_rdma_cm_handler The RDMA_CM_EVENT_CONNECT_REQUEST is quite different to other types, let's check it separately at the beginning of routine, then we can avoid the indentation accordingly. Acked-by: Jack Wang Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20221117101945.6317-2-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/rtrs/rtrs-srv.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 36d3571698910c833f2ad447a518d30b174bd116 Author: Jani Nikula Date: Wed Nov 16 17:06:57 2022 +0200 drm/i915/edp: wait power off delay at driver remove to optimize probe Panel power off delay is the time the panel power needs to remain off after being switched off, before it can be switched on again. For the purpose of respecting panel power off delay at driver probe, assuming the panel was last switched off at driver probe is overly pessimistic. If the panel was never on, we'd end up waiting for no reason. We don't know what has happened before kernel boot, but we can make some assumptions: - The panel may have been switched off right before kernel boot by some pre-os environment. - After kernel boot, the panel may only be switched off by i915. - At i915 driver probe, only a previously loaded and removed i915 may have switched the panel power off. With these assumptions, we can initialize the last power off time to kernel boot time, if we also ensure i915 driver remove waits for the panel power off delay after switching panel power off. This shaves off the time it takes from kernel boot to i915 probe from the first panel enable, if (and only if) the panel was not already enabled at boot. The encoder destroy hook is pretty much the last place where we can wait, right after we've ensured the panel power has been switched off, and before the whole encoder is destroyed. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7417 Cc: Lee Shawn C Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Tested-by: Lee Shawn C Link: https://patchwork.freedesktop.org/patch/msgid/20221116150657.1347504-1-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 6 ++++++ drivers/gpu/drm/i915/display/intel_pps.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 2f117484329b233455ee278f2d9b0a4356835060 Author: Barnabás Pőcze Date: Mon Nov 14 19:54:23 2022 +0000 timerqueue: Use rb_entry_safe() in timerqueue_getnext() When `timerqueue_getnext()` is called on an empty timer queue, it will use `rb_entry()` on a NULL pointer, which is invalid. Fix that by using `rb_entry_safe()` which handles NULL pointers. This has not caused any issues so far because the offset of the `rb_node` member in `timerqueue_node` is 0, so `rb_entry()` is essentially a no-op. Fixes: 511885d7061e ("lib/timerqueue: Rely on rbtree semantics for next timer") Signed-off-by: Barnabás Pőcze Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221114195421.342929-1-pobrn@protonmail.com include/linux/timerqueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e8e5cc818bd93ee7f2699676f2e5b30d26d83f8 Author: Jeff Layton Date: Fri Nov 11 06:46:52 2022 -0500 filelock: WARN_ON_ONCE when ->fl_file and filp don't match vfs_lock_file, vfs_test_lock and vfs_cancel_lock all take both a struct file argument and a file_lock. The file_lock has a fl_file field in it howevever and it _must_ match the file passed in. While most of the locks.c routines use the separately-passed file argument, some filesystems rely on fl_file being filled out correctly. I'm working on a patch series to remove the redundant argument from these routines, but for now, let's ensure that the callers always set this properly by issuing a WARN_ON_ONCE if they ever don't match. Cc: Chuck Lever Cc: Trond Myklebust Signed-off-by: Jeff Layton fs/locks.c | 3 +++ 1 file changed, 3 insertions(+) commit d8515330a63eda80ac7ad8423de535b747bb2c46 Author: Marek Vasut Date: Thu Oct 27 20:38:26 2022 +0200 ARM: dts: stm32: Rename mdio0 to mdio on DHCOR Testbench board Replace "mdio0" node with "mdio" to match mdio.yaml DT schema. Fixes: c8ce0dd75515b ("ARM: dts: stm32: Add DHCOR based Testbench board") Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15xx-dhcor-testbench.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cc71374002e90bd0caadfb1d2c2bfaa8fb7d92a Author: Amelie Delaunay Date: Mon Oct 24 11:46:48 2022 +0200 ARM: dts: stm32: add mcp23017 IO expander on I2C1 on stm32mp135f-dk MCP23017 is an IO expander offering 16 input/output port expander with interrupt output. On stm32mp135f-dk, only INTA is routed (on PG12), but MCP23017 can mirror the bank B interrupts on INTA, that's why the property microchip,irq-mirror is used. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp135f-dk.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit e1f15571c96c765891c36651324a74ad9fd872ae Author: Amelie Delaunay Date: Mon Oct 24 11:46:47 2022 +0200 ARM: dts: stm32: add mcp23017 pinctrl entry for stm32mp13 MCP23017 interrupt line (routed on PG12) requires to be pulled-up. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp13-pinctrl.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 196270c5d6f3cfabd609e6202858fbccec14691f Author: Niyas Sait Date: Tue Nov 15 17:54:14 2022 +0000 pinconf-generic: clarify pull up and pull down config values PIN_CONFIG_BIAS_PULL_DOWN and PIN_CONFIG_BIAS_PULL_UP values can be custom or an SI unit such as ohms Signed-off-by: Niyas Sait Link: https://lore.kernel.org/r/20221115175415.650690-3-niyas.sait@linaro.org Signed-off-by: Linus Walleij include/linux/pinctrl/pinconf-generic.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 457ff9fb29d7b7f9ff670f3ad20d64bcebe07283 Author: Yinbo Zhu Date: Mon Nov 14 10:49:42 2022 +0800 dt-bindings: pinctrl: add loongson-2 pinctrl Add the Loongson-2 pinctrl binding with DT schema format using json-schema. Signed-off-by: Yinbo Zhu Link: https://lore.kernel.org/r/20221114024942.8111-2-zhuyinbo@loongson.cn Reviewed-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/loongson,ls2k-pinctrl.yaml | 123 +++++++++++++++++++++ MAINTAINERS | 8 ++ 2 files changed, 131 insertions(+) commit f73f88acbc18a679def4c16eb8648cc279995075 Author: zhanghongchen Date: Mon Nov 14 10:49:41 2022 +0800 pinctrl: pinctrl-loongson2: add pinctrl driver support The Loongson-2 SoC has a few pins that can be used as GPIOs or take multiple other functions. Add a driver for the pinmuxing. There is currently no support for GPIO pin pull-up and pull-down. Signed-off-by: zhanghongchen Co-developed-by: Yinbo Zhu Signed-off-by: Yinbo Zhu Link: https://lore.kernel.org/r/20221114024942.8111-1-zhuyinbo@loongson.cn Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 11 ++ drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-loongson2.c | 311 ++++++++++++++++++++++++++++++++++++ 3 files changed, 323 insertions(+) commit da67eff50ceff2f33c284aac35648851b9c9c8cf Author: Sebastian Reichel Date: Fri Oct 21 19:20:12 2022 +0200 dt-bindings: pinctrl: rockchip: further increase max amount of device functions Apparently RK3588 pinctrl has 13 different device functions, but dt-validate only checks for pin configuration being referenced so I did not notice. Fixes: ed1f77b78322 ("dt-bindings: pinctrl: rockchip: increase max amount of device functions") Signed-off-by: Sebastian Reichel Acked-by: Krzysztof Kozlowski Acked-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221021172012.87954-1-sebastian.reichel@collabora.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9aad576944677cead84b8f8467317db8131b46e3 Merge: 29c10bcec50a 86bfee318b54 Author: Linus Walleij Date: Thu Nov 17 10:11:10 2022 +0100 Merge tag 'qcom-pinctrl-6.2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into devel Qualcomm pinctrl Devicetree bindings changes for v6.2, part two Continuation of refactoring and improving Qualcomm pin controller bindings: 1. Narrow compatible combinations in PMIC MPP. 2. Convert several bindings from TXT to DT schema format: QCS404, IPQ8074, MSM8660, MSM8916, MSM8960 and MSM8976. commit 29c10bcec50a4fc9d483701418a9efe99ee4ae18 Author: Neil Armstrong Date: Tue Nov 15 11:06:47 2022 +0100 dt-bindings: pinctrl: convert semtech,sx150xq bindings to dt-schema This converts the Semtech SX150Xq bindings to dt-schemas, add necessary bindings documentation to cover all differences between HW variants and current bindings usage. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221005-mdm9615-sx1509q-yaml-v3-0-e8b349eb1900@linaro.org Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/pinctrl-sx150x.txt | 72 ------- .../bindings/pinctrl/semtech,sx1501q.yaml | 208 +++++++++++++++++++++ 2 files changed, 208 insertions(+), 72 deletions(-) commit 8f7e2daa6336f9f4b6f8a4715a809674606df16b Author: Mustafa Ismail Date: Mon Nov 14 19:17:01 2022 -0600 RDMA/irdma: Do not request 2-level PBLEs for CQ alloc When allocating PBLE's for a large CQ, it is possible that a 2-level PBLE is returned which would cause the CQ allocation to fail since 1-level is assumed and checked for. Fix this by requesting a level one PBLE only. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20221115011701.1379-4-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/verbs.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 24419777e9431137d5923a747f546facb1e49b1f Author: Mustafa Ismail Date: Mon Nov 14 19:17:00 2022 -0600 RDMA/irdma: Fix RQ completion opcode The opcode written by HW, in the RQ CQE, is the RoCEv2/iWARP protocol opcode from the received packet and not the SW opcode as currently assumed. Fix this by returning the raw operation type and queue type in the CQE to irdma_process_cqe and add 2 helpers set_ib_wc_op_sq set_ib_wc_op_rq to map IRDMA HW op types to IB op types. Note that for iWARP, only Write with Immediate is supported so the opcode can only be IB_WC_RECV_RDMA_WITH_IMM when there is immediate data present. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20221115011701.1379-3-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/uk.c | 21 +++++++-------- drivers/infiniband/hw/irdma/user.h | 1 + drivers/infiniband/hw/irdma/utils.c | 2 ++ drivers/infiniband/hw/irdma/verbs.c | 39 +++++---------------------- drivers/infiniband/hw/irdma/verbs.h | 53 +++++++++++++++++++++++++++++++++++++ 5 files changed, 71 insertions(+), 45 deletions(-) commit 4f44e519b6a945068755708119cca5b74d01d1f6 Author: Mustafa Ismail Date: Mon Nov 14 19:16:59 2022 -0600 RDMA/irdma: Fix inline for multiple SGE's Currently, inline send and inline write assume a single SGE and only copy data from the first one. Add support for multiple SGE's. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20221115011701.1379-2-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/uk.c | 149 ++++++++++++++++++++++++------------ drivers/infiniband/hw/irdma/user.h | 19 +---- drivers/infiniband/hw/irdma/verbs.c | 55 +++++-------- 3 files changed, 119 insertions(+), 104 deletions(-) commit 35c3a2d02f0dc153a5f2f304ba33e1436b6a8d8f Author: Maxime Ripard Date: Wed Nov 16 16:18:33 2022 +0100 drm/tests: helpers: Add SPDX header The SPDX header is missing, let's add it and fix the corresponding checkpatch warning. Suggested-by: Maíra Canal Fixes: 44a3928324e9 ("drm/tests: Add Kunit Helpers") Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221116151833.1679379-2-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/tests/drm_kunit_helpers.c | 2 ++ drivers/gpu/drm/tests/drm_kunit_helpers.h | 2 ++ 2 files changed, 4 insertions(+) commit 8b9fe8add3dc55d88b8a2de22fdb9ba0b00728af Author: Maxime Ripard Date: Wed Nov 16 16:18:32 2022 +0100 drm/tests: client: Remove extra blank lines Some extra blank lines slipped through, remove them. Fixes: 8fc0380f6ba7 ("drm/client: Add some tests for drm_connector_pick_cmdline_mode()") Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221116151833.1679379-1-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/tests/drm_client_modeset_test.c | 2 -- 1 file changed, 2 deletions(-) commit c453e64cbc9532c0c2edfa999c35d29dad16b8bb Author: Wang Yufen Date: Tue Nov 15 11:29:40 2022 +0800 selftests/bpf: fix memory leak of lsm_cgroup kmemleak reports this issue: unreferenced object 0xffff88810b7835c0 (size 32): comm "test_progs", pid 270, jiffies 4294969007 (age 1621.315s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 03 00 00 00 03 00 00 00 0f 00 00 00 00 00 00 00 ................ backtrace: [<00000000376cdeab>] kmalloc_trace+0x27/0x110 [<000000003bcdb3b6>] selinux_sk_alloc_security+0x66/0x110 [<000000003959008f>] security_sk_alloc+0x47/0x80 [<00000000e7bc6668>] sk_prot_alloc+0xbd/0x1a0 [<0000000002d6343a>] sk_alloc+0x3b/0x940 [<000000009812a46d>] unix_create1+0x8f/0x3d0 [<000000005ed0976b>] unix_create+0xa1/0x150 [<0000000086a1d27f>] __sock_create+0x233/0x4a0 [<00000000cffe3a73>] __sys_socket_create.part.0+0xaa/0x110 [<0000000007c63f20>] __sys_socket+0x49/0xf0 [<00000000b08753c8>] __x64_sys_socket+0x42/0x50 [<00000000b56e26b3>] do_syscall_64+0x3b/0x90 [<000000009b4871b8>] entry_SYSCALL_64_after_hwframe+0x63/0xcd The issue occurs in the following scenarios: unix_create1() sk_alloc() sk_prot_alloc() security_sk_alloc() call_int_hook() hlist_for_each_entry() entry1->hook.sk_alloc_security <-- selinux_sk_alloc_security() succeeded, <-- sk->security alloced here. entry2->hook.sk_alloc_security <-- bpf_lsm_sk_alloc_security() failed goto out_free; ... <-- the sk->security not freed, memleak The core problem is that the LSM is not yet fully stacked (work is actively going on in this space) which means that some LSM hooks do not support multiple LSMs at the same time. To fix, skip the "EPERM" test when it runs in the environments that already have non-bpf lsms installed Fixes: dca85aac8895 ("selftests/bpf: lsm_cgroup functional test") Signed-off-by: Wang Yufen Cc: Stanislav Fomichev Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/1668482980-16163-1-git-send-email-wangyufen@huawei.com Signed-off-by: Martin KaFai Lau tools/testing/selftests/bpf/prog_tests/lsm_cgroup.c | 17 +++++++++++++---- tools/testing/selftests/bpf/progs/lsm_cgroup.c | 8 ++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) commit 04ec334e1a0381c3305da4d277cef9250769ca43 Author: Jiapeng Chong Date: Mon Sep 26 14:40:43 2022 +0800 drm/i915/gvt: Remove the unused function get_pt_type() The function get_pt_type is defined in the gtt.c file, but not called elsewhere, so delete this unused function. drivers/gpu/drm/i915/gvt/gtt.c:285:19: warning: unused function 'get_pt_type'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2277 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20220926064044.53016-1-jiapeng.chong@linux.alibaba.com Reviewed-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 5 ----- 1 file changed, 5 deletions(-) commit a105fa52dd0714850260610cec79cbec4f30b4bf Author: wangjianli Date: Sat Oct 22 14:13:27 2022 +0800 drm/i915: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: wangjianli Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20221022061327.65275-1-wangjianli@cdjrlc.com Reviewed-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d3bc8754360d0557faaa295a3b4404d0473a2d4 Author: Zhi Wang Date: Fri Nov 4 14:56:50 2022 +0000 drm/i915/gvt: remove the vgpu->released and its sanity check The life cycle of a vGPU, which is represented by a vfio_device, has been managed by the VFIO core logic. Remove the vgpu->released, which was used for a sanity check on the removal path of the vGPU instance. The sanity check has already been covered in the VFIO core logic. Cc: Zhenyu Wang Cc: Kevin Tian Cc: Jason Gunthorpe Cc: intel-gvt-dev@lists.freedesktop.org Suggested-by: Alex Williamson Signed-off-by: Zhi Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20221104145652.1570-1-zhi.a.wang@intel.com Reviewed-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 2 -- drivers/gpu/drm/i915/gvt/kvmgt.c | 4 ---- 2 files changed, 6 deletions(-) commit a34985dcacdf31892510571c29b38330272c76f4 Author: Paulo Miguel Almeida Date: Sun Oct 30 16:36:28 2022 +1300 i915/gvt: remove hardcoded value on crc32_start calculation struct gvt_firmware_header has a crc32 member in which all members that come after the that field are used to calculate it. The previous implementation added the value '4' (crc32's u32 size) to calculate the crc32_start offset which came across as a bit cryptic until you take a deeper look at the struct. This patch changes crc32_start offset to the 'version' member which is the first member of the struct gvt_firmware_header after crc32. It's worth mentioning that doing a build before/after this patch results in no binary output differences. Signed-off-by: Paulo Miguel Almeida Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20221030033628.GA279284@mail.google.com Reviewed-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df947eb63f16c7e07d3148121757526d5e3bc53b Author: Mauro Carvalho Chehab Date: Wed Jul 13 09:11:55 2022 +0100 drm/i915: gvt: fix kernel-doc trivial warnings Some functions seem to have been renamed without updating the kernel-doc markup causing warnings. Also, struct intel_vgpu_dmabuf_obj is not properly documented, but has a kerneld-doc markup. Fix those warnings: drivers/gpu/drm/i915/gvt/aperture_gm.c:308: warning: expecting prototype for inte_gvt_free_vgpu_resource(). Prototype was for intel_vgpu_free_resource() instead drivers/gpu/drm/i915/gvt/aperture_gm.c:344: warning: expecting prototype for intel_alloc_vgpu_resource(). Prototype was for intel_vgpu_alloc_resource() instead drivers/gpu/drm/i915/gvt/cfg_space.c:257: warning: expecting prototype for intel_vgpu_emulate_cfg_read(). Prototype was for intel_vgpu_emulate_cfg_write() instead drivers/gpu/drm/i915/gvt/dmabuf.h:61: warning: Function parameter or member 'vgpu' not described in 'intel_vgpu_dmabuf_obj' drivers/gpu/drm/i915/gvt/dmabuf.h:61: warning: Function parameter or member 'info' not described in 'intel_vgpu_dmabuf_obj' drivers/gpu/drm/i915/gvt/dmabuf.h:61: warning: Function parameter or member 'dmabuf_id' not described in 'intel_vgpu_dmabuf_obj' drivers/gpu/drm/i915/gvt/dmabuf.h:61: warning: Function parameter or member 'kref' not described in 'intel_vgpu_dmabuf_obj' drivers/gpu/drm/i915/gvt/dmabuf.h:61: warning: Function parameter or member 'initref' not described in 'intel_vgpu_dmabuf_obj' drivers/gpu/drm/i915/gvt/dmabuf.h:61: warning: Function parameter or member 'list' not described in 'intel_vgpu_dmabuf_obj' drivers/gpu/drm/i915/gvt/handlers.c:3066: warning: expecting prototype for intel_t_default_mmio_write(). Prototype was for intel_vgpu_default_mmio_write() instead drivers/gpu/drm/i915/gvt/mmio_context.c:560: warning: expecting prototype for intel_gvt_switch_render_mmio(). Prototype was for intel_gvt_switch_mmio() instead drivers/gpu/drm/i915/gvt/page_track.c:131: warning: expecting prototype for intel_vgpu_enable_page_track(). Prototype was for intel_vgpu_disable_page_track() instead drivers/gpu/drm/i915/gvt/vgpu.c:215: warning: expecting prototype for intel_gvt_active_vgpu(). Prototype was for intel_gvt_activate_vgpu() instead drivers/gpu/drm/i915/gvt/vgpu.c:230: warning: expecting prototype for intel_gvt_deactive_vgpu(). Prototype was for intel_gvt_deactivate_vgpu() instead drivers/gpu/drm/i915/gvt/vgpu.c:358: warning: expecting prototype for intel_gvt_destroy_vgpu(). Prototype was for intel_gvt_destroy_idle_vgpu() instead Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/375c0c0ca2ef414f25e14f274457f77373a9268d.1657699522.git.mchehab@kernel.org Acked-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cfg_space.c | 2 +- drivers/gpu/drm/i915/gvt/dmabuf.h | 2 +- drivers/gpu/drm/i915/gvt/page_track.c | 2 +- drivers/gpu/drm/i915/gvt/vgpu.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) commit af02a7fcf253a55ffbf0e15ce3dd5a2ed0a99dc5 Author: Colin Ian King Date: Tue Mar 15 20:24:49 2022 +0000 drm/i915/reg: Fix spelling mistake "Unsupport" -> "Unsupported" There is a spelling mistake in a gvt_vgpu_err error message. Fix it. Fixes: 695fbc08d80f ("drm/i915/gvt: replace the gvt_err with gvt_vgpu_err") Signed-off-by: Colin Ian King Signed-off-by: Zhi Wang Link: http://patchwork.freedesktop.org/patch/msgid/20220315202449.2952845-1-colin.i.king@gmail.com Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4cbff464d2932a71d7d3b7d17ffef7700b58edd Author: Christian König Date: Wed Nov 9 12:41:08 2022 +0100 drm/amdgpu: cleanup amdgpu_hmm_range_get_pages Remove unused parameters and cleanup dead code. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 14 +++----------- drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h | 7 +++---- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 ++--- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 6 +++--- 4 files changed, 11 insertions(+), 21 deletions(-) commit d9483ecd327b7537c6a51cab515b5faad21b8200 Author: Christian König Date: Wed Nov 9 12:28:46 2022 +0100 drm/amdgpu: rename the files for HMM handling Clean that up a bit, no functional change. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 7 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +-- .../drm/amd/amdgpu/{amdgpu_mn.c => amdgpu_hmm.c} | 37 +++++++++++----------- .../drm/amd/amdgpu/{amdgpu_mn.h => amdgpu_hmm.h} | 8 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 1 - drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +- 9 files changed, 33 insertions(+), 31 deletions(-) commit fec8fdb54e8f74d88951c9f998f47bf4f2031fe0 Author: Christian König Date: Thu Nov 10 12:31:41 2022 +0100 drm/amdgpu: fix userptr HMM range handling v2 The basic problem here is that it's not allowed to page fault while holding the reservation lock. So it can happen that multiple processes try to validate an userptr at the same time. Work around that by putting the HMM range object into the mutex protected bo list for now. v2: make sure range is set to NULL in case of an error Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling CC: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 12 ++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 53 +++++++----------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 14 +++++-- 7 files changed, 46 insertions(+), 51 deletions(-) commit 631945e04e1e243a503089f4487cad797476e8ca Author: Christian König Date: Wed Nov 9 12:14:44 2022 +0100 drm/amdgpu: always register an MMU notifier for userptr Since switching to HMM we always need that because we no longer grab references to the pages. Signed-off-by: Christian König Reviewed-by: Alex Deucher Acked-by: Felix Kuehling CC: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 14b651b22224251b35618259da714adb0b5f10ee Author: Lyude Paul Date: Mon Nov 14 17:17:55 2022 -0500 drm/amdgpu/dm/dp_mst: Don't grab mst_mgr->lock when computing DSC state Now that we've fixed the issue with using the incorrect topology manager, we're actually grabbing the topology manager's lock - and consequently deadlocking. Luckily for us though, there's actually nothing in AMD's DSC state computation code that really should need this lock. The one exception is the mutex_lock() in dm_dp_mst_is_port_support_mode(), however we grab no locks beneath &mgr->lock there so that should be fine to leave be. Gitlab issue: https://gitlab.freedesktop.org/drm/amd/-/issues/2171 Signed-off-by: Lyude Paul Fixes: 8c20a1ed9b4f ("drm/amd/display: MST DSC compute fair share") Cc: # v5.6+ Reviewed-by: Wayne Lin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 4 ---- 1 file changed, 4 deletions(-) commit d3e2c664ec9a3b16a28b558d6d1acde6d997ac04 Author: Lyude Paul Date: Mon Nov 14 17:17:54 2022 -0500 drm/amdgpu/dm/mst: Use the correct topology mgr pointer in amdgpu_dm_connector This bug hurt me. Basically, it appears that we've been grabbing the entirely wrong mutex in the MST DSC computation code for amdgpu! While we've been grabbing: amdgpu_dm_connector->mst_mgr That's zero-initialized memory, because the only connectors we'll ever actually be doing DSC computations for are MST ports. Which have mst_mgr zero-initialized, and instead have the correct topology mgr pointer located at: amdgpu_dm_connector->mst_port->mgr; I'm a bit impressed that until now, this code has managed not to crash anyone's systems! It does seem to cause a warning in LOCKDEP though: [ 66.637670] DEBUG_LOCKS_WARN_ON(lock->magic != lock) This was causing the problems that appeared to have been introduced by: commit 4d07b0bc4034 ("drm/display/dp_mst: Move all payload info into the atomic state") This wasn't actually where they came from though. Presumably, before the only thing we were doing with the topology mgr pointer was attempting to grab mst_mgr->lock. Since the above commit however, we grab much more information from mst_mgr including the atomic MST state and respective modesetting locks. This patch also implies that up until now, it's quite likely we could be susceptible to race conditions when going through the MST topology state for DSC computations since we technically will not have grabbed any lock when going through it. So, let's fix this by adjusting all the respective code paths to look at the right pointer and skip things that aren't actual MST connectors from a topology. Gitlab issue: https://gitlab.freedesktop.org/drm/amd/-/issues/2171 Signed-off-by: Lyude Paul Fixes: 8c20a1ed9b4f ("drm/amd/display: MST DSC compute fair share") Cc: # v5.6+ Reviewed-by: Wayne Lin Signed-off-by: Alex Deucher .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 37 +++++++++++----------- 1 file changed, 18 insertions(+), 19 deletions(-) commit a3ae99598b9f89dd5ac9d2900fb7ffb3dcfa3d35 Author: Lyude Paul Date: Mon Nov 14 17:17:53 2022 -0500 drm/display/dp_mst: Fix drm_dp_mst_add_affected_dsc_crtcs() return code Looks like that we're accidentally dropping a pretty important return code here. For some reason, we just return -EINVAL if we fail to get the MST topology state. This is wrong: error codes are important and should never be squashed without being handled, which here seems to have the potential to cause a deadlock. Signed-off-by: Lyude Paul Reviewed-by: Wayne Lin Fixes: 8ec046716ca8 ("drm/dp_mst: Add helper to trigger modeset on affected DSC MST CRTCs") Cc: # v5.6+ Signed-off-by: Alex Deucher drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cce4cd628bee0d0caff7518c377cf8f599aa38f Author: Lyude Paul Date: Mon Nov 14 17:17:52 2022 -0500 drm/amdgpu/mst: Stop ignoring error codes and deadlocking It appears that amdgpu makes the mistake of completely ignoring the return values from the DP MST helpers, and instead just returns a simple true/false. In this case, it seems to have come back to bite us because as a result of simply returning false from compute_mst_dsc_configs_for_state(), amdgpu had no way of telling when a deadlock happened from these helpers. This could definitely result in some kernel splats. V2: * Address Wayne's comments (fix another bunch of spots where we weren't passing down return codes) Signed-off-by: Lyude Paul Fixes: 8c20a1ed9b4f ("drm/amd/display: MST DSC compute fair share") Cc: Harry Wentland Cc: # v5.6+ Reviewed-by: Wayne Lin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 18 +- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 235 ++++++++++++--------- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.h | 12 +- 3 files changed, 147 insertions(+), 118 deletions(-) commit c6023d73a31b03f9b482a518f7b27acccc013895 Author: Roman Li Date: Mon Nov 14 15:50:27 2022 -0500 drm/amd/display: Align dcn314_smu logging with other DCNs [Why] Assert on non-OK response from SMU is unnecessary. It was replaced with respective log message on other asics in the past with commit: "drm/amd/display: Removing assert statements for Linux" [How] Remove assert and add dbg logging as on other DCNs. Signed-off-by: Roman Li Reviewed-by: Saaem Rizvi Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 5ca9b33ece9aa048b6ec9411f054e1b781662327 Author: Alex Deucher Date: Wed Nov 16 11:54:27 2022 -0500 drm/amd/display: fix the build when DRM_AMD_DC_DCN is not set Move the new callback outside of the guard. Fixes: dc55b106ad47 ("drm/amd/display: Disable phantom OTG after enable for plane disable") CC: Alvin Lee CC: Alan Liu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64c80dfd04d1dd2ecf550542c8f3f41b54b20207 Author: Lukas Herbolt Date: Wed Nov 16 19:20:21 2022 -0800 xfs: Print XFS UUID on mount and umount events. As of now only device names are printed out over __xfs_printk(). The device names are not persistent across reboots which in case of searching for origin of corruption brings another task to properly identify the devices. This patch add XFS UUID upon every mount/umount event which will make the identification much easier. Signed-off-by: Lukas Herbolt [sandeen: rebase onto current upstream kernel] Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/xfs_log.c | 10 ++++++---- fs/xfs/xfs_super.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) commit 59f6ab40fd8735c9a1a15401610a31cc06a0bbd6 Author: Long Li Date: Wed Nov 16 19:20:20 2022 -0800 xfs: fix sb write verify for lazysbcount When lazysbcount is enabled, fsstress and loop mount/unmount test report the following problems: XFS (loop0): SB summary counter sanity check failed XFS (loop0): Metadata corruption detected at xfs_sb_write_verify+0x13b/0x460, xfs_sb block 0x0 XFS (loop0): Unmount and run xfs_repair XFS (loop0): First 128 bytes of corrupted metadata buffer: 00000000: 58 46 53 42 00 00 10 00 00 00 00 00 00 28 00 00 XFSB.........(.. 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000020: 69 fb 7c cd 5f dc 44 af 85 74 e0 cc d4 e3 34 5a i.|._.D..t....4Z 00000030: 00 00 00 00 00 20 00 06 00 00 00 00 00 00 00 80 ..... .......... 00000040: 00 00 00 00 00 00 00 81 00 00 00 00 00 00 00 82 ................ 00000050: 00 00 00 01 00 0a 00 00 00 00 00 04 00 00 00 00 ................ 00000060: 00 00 0a 00 b4 b5 02 00 02 00 00 08 00 00 00 00 ................ 00000070: 00 00 00 00 00 00 00 00 0c 09 09 03 14 00 00 19 ................ XFS (loop0): Corruption of in-memory data (0x8) detected at _xfs_buf_ioapply +0xe1e/0x10e0 (fs/xfs/xfs_buf.c:1580). Shutting down filesystem. XFS (loop0): Please unmount the filesystem and rectify the problem(s) XFS (loop0): log mount/recovery failed: error -117 XFS (loop0): log mount failed This corruption will shutdown the file system and the file system will no longer be mountable. The following script can reproduce the problem, but it may take a long time. #!/bin/bash device=/dev/sda testdir=/mnt/test round=0 function fail() { echo "$*" exit 1 } mkdir -p $testdir while [ $round -lt 10000 ] do echo "******* round $round ********" mkfs.xfs -f $device mount $device $testdir || fail "mount failed!" fsstress -d $testdir -l 0 -n 10000 -p 4 >/dev/null & sleep 4 killall -w fsstress umount $testdir xfs_repair -e $device > /dev/null if [ $? -eq 2 ];then echo "ERR CODE 2: Dirty log exception during repair." exit 1 fi round=$(($round+1)) done With lazysbcount is enabled, There is no additional lock protection for reading m_ifree and m_icount in xfs_log_sb(), if other cpu modifies the m_ifree, this will make the m_ifree greater than m_icount. For example, consider the following sequence and ifreedelta is postive: CPU0 CPU1 xfs_log_sb xfs_trans_unreserve_and_mod_sb ---------- ------------------------------ percpu_counter_sum(&mp->m_icount) percpu_counter_add_batch(&mp->m_icount, idelta, XFS_ICOUNT_BATCH) percpu_counter_add(&mp->m_ifree, ifreedelta); percpu_counter_sum(&mp->m_ifree) After this, incorrect inode count (sb_ifree > sb_icount) will be writen to the log. In the subsequent writing of sb, incorrect inode count (sb_ifree > sb_icount) will fail to pass the boundary check in xfs_validate_sb_write() that cause the file system shutdown. When lazysbcount is enabled, we don't need to guarantee that Lazy sb counters are completely correct, but we do need to guarantee that sb_ifree <= sb_icount. On the other hand, the constraint that m_ifree <= m_icount must be satisfied any time that there /cannot/ be other threads allocating or freeing inode chunks. If the constraint is violated under these circumstances, sb_i{count,free} (the ondisk superblock inode counters) maybe incorrect and need to be marked sick at unmount, the count will be rebuilt on the next mount. Fixes: 8756a5af1819 ("libxfs: add more bounds checking to sb sanity checks") Signed-off-by: Long Li Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_sb.c | 4 +++- fs/xfs/xfs_mount.c | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) commit 2653d53345bda90604f673bb211dd060a5a5c232 Author: Darrick J. Wong Date: Wed Nov 16 19:20:20 2022 -0800 xfs: fix incorrect error-out in xfs_remove Clean up resources if resetting the dotdot entry doesn't succeed. Observed through code inspection. Fixes: 5838d0356bb3 ("xfs: reset child dir '..' entry when unlinking child") Signed-off-by: Darrick J. Wong Reviewed-by: Andrey Albershteyn fs/xfs/xfs_inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b082b5e8afa2426e2d6ec87466b492a681801a9 Merge: cc5f38fa12fc f36b954a1f1b Author: Darrick J. Wong Date: Wed Nov 16 19:19:30 2022 -0800 Merge tag 'scrub-check-metadata-inode-records-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.2-mergeA xfs: scrub inode core when checking metadata files Running the online fsck QA fuzz tests, I noticed that we were consistently missing fuzzed records in the inode cores of the realtime freespace files and the quota files. This patch adds the ability to check inode cores in xchk_metadata_inode_forks. Signed-off-by: Darrick J. Wong * tag 'scrub-check-metadata-inode-records-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: check inode core when scrubbing metadata files xfs: don't warn about files that are exactly s_maxbytes long commit cc5f38fa12fc51b4a049194231252c416e66895b Merge: 7aab8a05e7c7 5eef46358fae Author: Darrick J. Wong Date: Wed Nov 16 19:19:22 2022 -0800 Merge tag 'scrub-bmap-enhancements-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.2-mergeA xfs: strengthen file mapping scrub This series strengthens the file extent mapping scrubber in various ways, such as confirming that there are enough bmap records to match up with the rmap records for this file, checking delalloc reservations, checking for no unwritten extents in metadata files, invalid CoW fork formats, and weird things like shared CoW fork extents. Signed-off-by: Darrick J. Wong * tag 'scrub-bmap-enhancements-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: teach scrub to flag non-extents format cow forks xfs: check that CoW fork extents are not shared xfs: check quota files for unwritten extents xfs: block map scrub should handle incore delalloc reservations xfs: teach scrub to check for adjacent bmaps when rmap larger than bmap xfs: fix perag loop in xchk_bmap_check_rmaps commit 7aab8a05e7c709c83de5e7a2097119be8f58213f Merge: b76f593b33aa e74331d6fa2c Author: Darrick J. Wong Date: Wed Nov 16 19:19:13 2022 -0800 Merge tag 'scrub-fscounters-enhancements-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.2-mergeA xfs: enhance fs summary counter scrubber This series makes two changes to the fs summary counter scrubber: first, we should mark the scrub incomplete when we can't read the AG headers. Second, it fixes a functionality gap where we don't actually check the free rt extent count. v23.2: fix pointless inline Signed-off-by: Darrick J. Wong * tag 'scrub-fscounters-enhancements-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: online checking of the free rt extent count xfs: skip fscounters comparisons when the scan is incomplete commit b76f593b33aaab8def7a83aeea42c9025492a620 Merge: 3d8426b13bac 5f369dc5b4eb Author: Darrick J. Wong Date: Wed Nov 16 19:19:05 2022 -0800 Merge tag 'scrub-fix-rtmeta-ilocking-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.2-mergeA xfs: improve rt metadata use for scrub This short series makes some small changes to the way we handle the realtime metadata inodes. First, we now make sure that the bitmap and summary file forks are always loaded at mount time so that every scrubber won't have to call xfs_iread_extents. This won't be easy if we're, say, cross-referencing realtime space allocations. The second change makes the ILOCK annotations more consistent with the rest of XFS. Signed-off-by: Darrick J. Wong * tag 'scrub-fix-rtmeta-ilocking-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: make rtbitmap ILOCKing consistent when scanning the rt bitmap file xfs: load rtbitmap and rtsummary extent mapping btrees at mount time commit 3d8426b13bac65d6729a836eda70a172e02afd62 Merge: af1077fa87c3 93b0c58ed04b Author: Darrick J. Wong Date: Wed Nov 16 19:18:54 2022 -0800 Merge tag 'scrub-fix-return-value-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.2-mergeA xfs: fix incorrect return values in online fsck Here we fix a couple of problems with the errno values that we return to userspace. v23.2: fix vague wording of comment v23.3: fix the commit message to discuss what's really going on in this patch Signed-off-by: Darrick J. Wong * tag 'scrub-fix-return-value-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: don't return -EFSCORRUPTED from repair when resources cannot be grabbed xfs: don't retry repairs harder when EAGAIN is returned xfs: fix return code when fatal signal encountered during dquot scrub xfs: return EINTR when a fatal signal terminates scrub commit af1077fa87c33bc1d7c453321f112c8a562afad8 Merge: 823ca26a8f07 306195f355bb Author: Darrick J. Wong Date: Wed Nov 16 19:18:38 2022 -0800 Merge tag 'scrub-cleanup-malloc-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.2-mergeA xfs: clean up memory allocations in online fsck This series standardizes the GFP_ flags that we use for memory allocation in online scrub, and convert the callers away from the old kmem_alloc code that was ported from Irix. Signed-off-by: Darrick J. Wong * tag 'scrub-cleanup-malloc-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: pivot online scrub away from kmem.[ch] xfs: initialize the check_owner object fully xfs: standardize GFP flags usage in online scrub commit 823ca26a8f0740598ccabb2652a638eec150e4e9 Merge: f0c4d9fc9cc9 b255fab0f80c Author: Darrick J. Wong Date: Wed Nov 16 19:18:11 2022 -0800 Merge tag 'scrub-fix-ag-header-handling-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.2-mergeA xfs: fix handling of AG[IF] header buffers during scrub While reading through the online fsck code, I noticed that the setup code for AG metadata scrubs will attach the AGI, the AGF, and the AGFL buffers to the transaction. It isn't necessary to hold the AGFL buffer, since any code that wants to do anything with the AGFL will need to hold the AGF to know which parts of the AGFL are active. Therefore, we only need to hold the AGFL when scrubbing the AGFL itself. The second bug fixed by this patchset is one that I observed while testing online repair. When a buffer is held across a transaction roll, its buffer log item will be detached if the bli was clean before the roll. If we are holding the AG headers to maintain a lock on an AG, we then need to set the buffer type on the new bli to avoid confusing the logging code later. There's also a bug fix for uninitialized memory in the directory scanner that didn't fit anywhere else. Ths patchset finishes off by teaching the AGFL repair function to look for and discard crosslinked blocks instead of putting them back on the AGFL. v23.2: Log the buffers before rolling the transaction to keep the moving forward in the log and avoid the bli falling off. Signed-off-by: Darrick J. Wong * tag 'scrub-fix-ag-header-handling-6.2_2022-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: make AGFL repair function avoid crosslinked blocks xfs: log the AGI/AGF buffers when rolling transactions during an AG repair xfs: don't track the AGFL buffer in the scrub AG context xfs: fully initialize xfs_da_args in xchk_directory_blocks commit 027b85ca972f321629af85793bb49d45382e9006 Author: Jayesh Choudhary Date: Tue Nov 1 01:36:33 2022 +0530 arm64: dts: ti: k3-j721s2-main: Enable crypto accelerator Add the node for SA2UL for supporting hardware crypto algorithms, including SHA1, SHA256, SHA512, AES, 3DES and AEAD suites. Add rng node for hardware random number generator. Signed-off-by: Jayesh Choudhary Signed-off-by: Nishanth Menon Reviewed-by: Manorit Chawdhry Acked-by: Matt Ranostay Acked-by: Andrew Davis Link: https://lore.kernel.org/r/20221031200633.26997-1-j-choudhary@ti.com arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit c1e56c8250a234d9bcd9e2f060da229688dfd9eb Author: Jayesh Choudhary Date: Mon Nov 7 16:36:07 2022 +0530 arm64: dts: ti: k3-am64-main: Drop RNG clock The x1-clk used by trng submodule comes directly from the system clock after a fixed divider. It is always running and has a fixed frequency that cannot be changed, making it uncontrollable. Hence this property should be dropped from the rng node. Signed-off-by: Jayesh Choudhary Reviewed-by: Manorit Chawdhry Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221107110607.59216-4-j-choudhary@ti.com arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 1 - 1 file changed, 1 deletion(-) commit a315097a23eb1976e8eac397c02ada82618858bb Author: Jayesh Choudhary Date: Mon Nov 7 16:36:06 2022 +0530 arm64: dts: ti: k3-j721e-main: Drop RNG clock The x1-clk used by trng submodule comes directly from the system clock after a fixed divider. It is always running and has a fixed frequency that cannot be changed, making it uncontrollable. Hence this property should be dropped from the rng node. Signed-off-by: Jayesh Choudhary Reviewed-by: Manorit Chawdhry Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221107110607.59216-3-j-choudhary@ti.com arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 1 - 1 file changed, 1 deletion(-) commit cfc75a93d7256d65c7b463620e7c13bd8219707b Author: Jayesh Choudhary Date: Mon Nov 7 16:36:05 2022 +0530 arm64: dts: ti: k3-am65-main: Drop RNG clock The x1-clk used by trng submodule comes directly from the system clock after a fixed divider. It is always running and has a fixed frequency that cannot be changed, making it uncontrollable. Hence this property should be dropped from the rng node. Signed-off-by: Jayesh Choudhary Reviewed-by: Manorit Chawdhry Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221107110607.59216-2-j-choudhary@ti.com arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 - 1 file changed, 1 deletion(-) commit f789fd29650b6fcee8995f53077d03d509a5d9f5 Author: Jayesh Choudhary Date: Wed Sep 28 17:55:09 2022 +0530 arm64: dts: ti: j721e-common-proc-board: Fix sound node-name If root-node has no reg property, the unit-address should not be appended at the end of node-name. 'sound' node has no 'reg' property, so remove the unit-address. Signed-off-by: Jayesh Choudhary Signed-off-by: Nishanth Menon Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20220928122509.143342-1-j-choudhary@ti.com arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8aa36c22da7d64c5a5d89ccb4a2abb9aeaab2e3 Author: Keerthy Date: Thu Sep 22 12:59:50 2022 +0530 arm64: dts: ti: k3-j721s2: Fix the interrupt ranges property for main & wkup gpio intr The parent's input irq number is wrongly subtracted with 32 instead of using the exact numbers in: https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j721s2/interrupt_cfg.html The GPIO interrupts are not working because of that. The toggling works fine but interrupts are not firing. Fix the parent's input irq that specifies the base for parent irq. Tested for MAIN_GPIO0_6 interrupt on the j721s2 EVM. Fixes: b8545f9d3a54 ("arm64: dts: ti: Add initial support for J721S2 SoC") Signed-off-by: Keerthy Signed-off-by: Nishanth Menon Reviewed-by: Vaishnav Achath Link: https://lore.kernel.org/r/20220922072950.9157-1-j-keerthy@ti.com arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ecb89a51724b3cd89c13ba7364e82f9879b68dcf Author: David Matlack Date: Wed Nov 16 12:42:28 2022 -0800 KVM: selftests: Check for KVM nEPT support using "feature" MSRs When checking for nEPT support in KVM, use kvm_get_feature_msr() instead of vcpu_get_msr() to retrieve KVM's default TRUE_PROCBASED_CTLS and PROCBASED_CTLS2 MSR values, i.e. don't require a VM+vCPU to query nEPT support. Suggested-by: Sean Christopherson Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20220927165209.930904-1-dmatlack@google.com [sean: rebase on merged code, write changelog] Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/include/x86_64/vmx.h | 2 +- tools/testing/selftests/kvm/lib/x86_64/vmx.c | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) commit 5c107f7085f45e071bbcf13006fffccd8e5de0e1 Author: David Matlack Date: Wed Nov 16 12:46:31 2022 -0800 KVM: selftests: Assert in prepare_eptp() that nEPT is supported Now that a VM isn't needed to check for nEPT support, assert that KVM supports nEPT in prepare_eptp() instead of skipping the test, and push the TEST_REQUIRE() check out to individual tests. The require+assert are somewhat redundant and will incur some amount of ongoing maintenance burden, but placing the "require" logic in the test makes it easier to find/understand a test's requirements and in this case, provides a very strong hint that the test cares about nEPT. Suggested-by: Sean Christopherson Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20220927165209.930904-1-dmatlack@google.com [sean: rebase on merged code, write changelog] Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/lib/x86_64/memstress.c | 1 + tools/testing/selftests/kvm/lib/x86_64/vmx.c | 2 +- tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit b941ba2380ccf51e048dc58ff0e6bdf11828f6d9 Author: Sean Christopherson Date: Thu Oct 6 00:51:25 2022 +0000 KVM: selftests: Drop helpers for getting specific KVM supported CPUID entry Drop kvm_get_supported_cpuid_entry() and its inner helper now that all known usage can use X86_FEATURE_*, X86_PROPERTY_*, X86_PMU_FEATURE_*, or the dedicated Family/Model helpers. Providing "raw" access to CPUID leafs is undesirable as it encourages open coding CPUID checks, which is often error prone and not self-documenting. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-13-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 11 ----------- 1 file changed, 11 deletions(-) commit 074e9d4c9c6046f4605c9e37e90cff404119c525 Author: Sean Christopherson Date: Thu Oct 6 00:51:24 2022 +0000 KVM: selftests: Add and use KVM helpers for x86 Family and Model Add KVM variants of the x86 Family and Model helpers, and use them in the PMU event filter test. Open code the retrieval of KVM's supported CPUID entry 0x1.0 in anticipation of dropping kvm_get_supported_cpuid_entry(). No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-12-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 19 ++++++++++++++++-- .../selftests/kvm/x86_64/pmu_event_filter_test.c | 23 +++++++++++----------- 2 files changed, 28 insertions(+), 14 deletions(-) commit 24f3f9898e3c463b39dac8a03870c628dab8176e Author: Sean Christopherson Date: Thu Oct 6 00:51:23 2022 +0000 KVM: selftests: Add dedicated helpers for getting x86 Family and Model Add dedicated helpers for getting x86's Family and Model, which are the last holdouts that "need" raw access to CPUID information. FMS info is a mess and requires not only splicing together multiple values, but requires doing so conditional in the Family case. Provide wrappers to reduce the odds of copy+paste errors, but mostly to allow for the eventual removal of kvm_get_supported_cpuid_entry(). No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-11-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 52 +++++++++++++++------- tools/testing/selftests/kvm/lib/x86_64/processor.c | 4 +- 2 files changed, 36 insertions(+), 20 deletions(-) commit 5228c02a4c541a065ec071ea7ec2c1c76f3723dd Author: Sean Christopherson Date: Thu Oct 6 00:51:22 2022 +0000 KVM: selftests: Add PMU feature framework, use in PMU event filter test Add an X86_PMU_FEATURE_* framework to simplify probing architectural events on Intel PMUs, which require checking the length of a bit vector and the _absence_ of a "feature" bit. Add helpers for both KVM and "this CPU", and use the newfangled magic (along with X86_PROPERTY_*) to clean up pmu_event_filter_test. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-10-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 41 +++++++++++++++++ .../selftests/kvm/x86_64/pmu_event_filter_test.c | 51 +++------------------- 2 files changed, 48 insertions(+), 44 deletions(-) commit 4feb9d21a407318129b6ea3a6735f1866439b9ab Author: Sean Christopherson Date: Thu Oct 6 00:51:21 2022 +0000 KVM: selftests: Convert vmx_pmu_caps_test to use X86_PROPERTY_* Add X86_PROPERTY_PMU_VERSION and use it in vmx_pmu_caps_test to replace open coded versions of the same functionality. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-9-seanjc@google.com .../testing/selftests/kvm/include/x86_64/processor.h | 6 ++---- .../testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c | 19 ++----------------- 2 files changed, 4 insertions(+), 21 deletions(-) commit 5dc19f1c7dd302f48a9f7fe7f29bb186d3477795 Author: Sean Christopherson Date: Thu Oct 6 00:51:20 2022 +0000 KVM: selftests: Convert AMX test to use X86_PROPRETY_XXX Add and use x86 "properties" for the myriad AMX CPUID values that are validated by the AMX test. Drop most of the test's single-usage helpers so that the asserts more precisely capture what check failed. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-8-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 9 ++ tools/testing/selftests/kvm/x86_64/amx_test.c | 101 +++++---------------- 2 files changed, 31 insertions(+), 79 deletions(-) commit 40854713e3254f7a4fc4a92388309140e51e046c Author: Sean Christopherson Date: Thu Oct 6 00:51:19 2022 +0000 KVM: selftests: Add kvm_cpu_*() support for X86_PROPERTY_* Extent X86_PROPERTY_* support to KVM, i.e. add kvm_cpu_property() and kvm_cpu_has_p(), and use the new helpers in kvm_get_cpu_address_width(). No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-7-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 34 ++++++++++++++++++---- tools/testing/selftests/kvm/lib/x86_64/processor.c | 17 ++++++----- 2 files changed, 39 insertions(+), 12 deletions(-) commit a29e6e383b0d0d59a93ebbf6e93d3d41b905d336 Author: Sean Christopherson Date: Thu Oct 6 00:51:18 2022 +0000 KVM: selftests: Refactor kvm_cpuid_has() to prep for X86_PROPERTY_* support Refactor kvm_cpuid_has() to prepare for extending X86_PROPERTY_* support to KVM as well as "this CPU". No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-6-seanjc@google.com tools/testing/selftests/kvm/lib/x86_64/processor.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit d80ddad2a8e042e6499d69d5a45a17051092e161 Author: Sean Christopherson Date: Thu Oct 6 00:51:17 2022 +0000 KVM: selftests: Use X86_PROPERTY_MAX_KVM_LEAF in CPUID test Use X86_PROPERTY_MAX_KVM_LEAF to replace the equivalent open coded check on KVM's maximum paravirt CPUID leaf. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-5-seanjc@google.com tools/testing/selftests/kvm/x86_64/cpuid_test.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 53a7dc0f215ec91b098e3e6d7bb4bb9cef43a99a Author: Sean Christopherson Date: Thu Oct 6 00:51:16 2022 +0000 KVM: selftests: Add X86_PROPERTY_* framework to retrieve CPUID values Introduce X86_PROPERTY_* to allow retrieving values/properties from CPUID leafs, e.g. MAXPHYADDR from CPUID.0x80000008. Use the same core code as X86_FEATURE_*, the primary difference is that properties are multi-bit values, whereas features enumerate a single bit. Add this_cpu_has_p() to allow querying whether or not a property exists based on the maximum leaf associated with the property, e.g. MAXPHYADDR doesn't exist if the max leaf for 0x8000_xxxx is less than 0x8000_0008. Use the new property infrastructure in vm_compute_max_gfn() to prove that the code works as intended. Future patches will convert additional selftests code. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-4-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 68 ++++++++++++++++++++++ tools/testing/selftests/kvm/lib/x86_64/processor.c | 18 +++--- 2 files changed, 76 insertions(+), 10 deletions(-) commit ee3795536664e514196cbe7396d3eb4c9925de98 Author: Sean Christopherson Date: Thu Oct 6 00:51:15 2022 +0000 KVM: selftests: Refactor X86_FEATURE_* framework to prep for X86_PROPERTY_* Refactor the X86_FEATURE_* framework to prepare for extending the core logic to support "properties". The "feature" framework allows querying a single CPUID bit to detect the presence of a feature; the "property" framework will extend the idea to allow querying a value, i.e. to get a value that is a set of contiguous bits in a CPUID leaf. Opportunistically add static asserts to ensure features are fully defined at compile time, and to try and catch mistakes in the definition of features. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-3-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 38 ++++++++++++++-------- 1 file changed, 25 insertions(+), 13 deletions(-) commit 3bd396353d18b4f4e4f9953e5f5c46b0045a5477 Author: Sean Christopherson Date: Thu Oct 6 00:51:14 2022 +0000 KVM: selftests: Add X86_FEATURE_PAE and use it calc "fallback" MAXPHYADDR Add X86_FEATURE_PAE and use it to guesstimate the MAXPHYADDR when the MAXPHYADDR CPUID entry isn't supported. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006005125.680782-2-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 1 + tools/testing/selftests/kvm/lib/x86_64/processor.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) commit 3ae5b759c3c033b4ca2b7ef19836622902151517 Author: David Matlack Date: Wed Nov 2 11:46:54 2022 -0700 KVM: selftests: Add a test for KVM_CAP_EXIT_ON_EMULATION_FAILURE Add a selftest to exercise the KVM_CAP_EXIT_ON_EMULATION_FAILURE capability. This capability is also exercised through smaller_maxphyaddr_emulation_test, but that test requires allow_smaller_maxphyaddr=Y, which is off by default on Intel when ept=Y and unconditionally disabled on AMD when npt=Y. This new test ensures that KVM_CAP_EXIT_ON_EMULATION_FAILURE is exercised independent of allow_smaller_maxphyaddr. Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20221102184654.282799-11-dmatlack@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 1 + .../kvm/x86_64/exit_on_emulation_failure_test.c | 45 ++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit a323845d6c3d2f667274bde8145906580359fe06 Author: David Matlack Date: Wed Nov 2 11:46:53 2022 -0700 KVM: selftests: Expect #PF(RSVD) when TDP is disabled Change smaller_maxphyaddr_emulation_test to expect a #PF(RSVD), rather than an emulation failure, when TDP is disabled. KVM only needs to emulate instructions to emulate a smaller guest.MAXPHYADDR when TDP is enabled. Fixes: 39bbcc3a4e39 ("selftests: kvm: Allows userspace to handle emulation errors.") Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20221102184654.282799-10-dmatlack@google.com [sean: massage comment to talk about having to emulate due to MAXPHYADDR] Signed-off-by: Sean Christopherson .../kvm/x86_64/smaller_maxphyaddr_emulation_test.c | 51 +++++++++++++++++++--- 1 file changed, 46 insertions(+), 5 deletions(-) commit b9635930f0a73c1ef7b465121896c3fb2e3b77cd Author: Sean Christopherson Date: Wed Nov 2 11:46:52 2022 -0700 KVM: selftests: Provide error code as a KVM_ASM_SAFE() output Provide the error code on a fault in KVM_ASM_SAFE(), e.g. to allow tests to assert that #PF generates the correct error code without needing to manually install a #PF handler. Use r10 as the scratch register for the error code, as it's already clobbered by the asm blob (loaded with the RIP of the to-be-executed instruction). Deliberately load the output "error_code" even in the non-faulting path so that error_code is always initialized with deterministic data (the aforementioned RIP), i.e to ensure a selftest won't end up with uninitialized consumption regardless of how KVM_ASM_SAFE() is used. Don't clear r10 in the non-faulting case and instead load error code with the RIP (see above). The error code is valid if and only if an exception occurs, and '0' isn't necessarily a better "invalid" value, e.g. '0' could result in false passes for a buggy test. Signed-off-by: Sean Christopherson Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20221102184654.282799-9-dmatlack@google.com .../selftests/kvm/include/x86_64/processor.h | 39 +++++++++++++++------- tools/testing/selftests/kvm/lib/x86_64/processor.c | 1 + .../testing/selftests/kvm/x86_64/hyperv_features.c | 3 +- 3 files changed, 30 insertions(+), 13 deletions(-) commit f2e5b53b4ba9bc10d3febc3682bdf22e946bf6eb Author: Sean Christopherson Date: Wed Nov 2 11:46:51 2022 -0700 KVM: selftests: Avoid JMP in non-faulting path of KVM_ASM_SAFE() Clear R9 in the non-faulting path of KVM_ASM_SAFE() and fall through to to a common load of "vector" to effectively load "vector" with '0' to reduce the code footprint of the asm blob, to reduce the runtime overhead of the non-faulting path (when "vector" is stored in a register), and so that additional output constraints that are valid if and only if a fault occur are loaded even in the non-faulting case. A future patch will add a 64-bit output for the error code, and if its output is not explicitly loaded with _something_, the user of the asm blob can end up technically consuming uninitialized data. Using a common path to load the output constraints will allow using an existing scratch register, e.g. r10, to hold the error code in the faulting path, while also guaranteeing the error code is initialized with deterministic data in the non-faulting patch (r10 is loaded with the RIP of to-be-executed instruction). Consuming the error code when a fault doesn't occur would obviously be a test bug, but there's no guarantee the compiler will detect uninitialized consumption. And conversely, it's theoretically possible that the compiler might throw a false positive on uninitialized data, e.g. if the compiler can't determine that the non-faulting path won't touch the error code. Alternatively, the error code could be explicitly loaded in the non-faulting path, but loading a 64-bit memory|register output operand with an explicitl value requires a sign-extended "MOV imm32, r/m64", which isn't exactly straightforward and has a largish code footprint. And loading the error code with what is effectively garbage (from a scratch register) avoids having to choose an arbitrary value for the non-faulting case. Opportunistically remove a rogue asterisk in the block comment. Signed-off-by: Sean Christopherson Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20221102184654.282799-8-dmatlack@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 77f7813cc2b9d95166a3539a5203663d5bbb0fd0 Author: David Matlack Date: Wed Nov 2 11:46:50 2022 -0700 KVM: selftests: Copy KVM PFERR masks into selftests Copy KVM's macros for page fault error masks into processor.h so they can be used in selftests. Signed-off-by: David Matlack Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221102184654.282799-7-dmatlack@google.com Signed-off-by: Sean Christopherson .../selftests/kvm/include/x86_64/processor.h | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit d6ecfe976ac342e5c3249b9439da762f65e98015 Author: David Matlack Date: Wed Nov 2 11:46:49 2022 -0700 KVM: x86/mmu: Use BIT{,_ULL}() for PFERR masks Use the preferred BIT() and BIT_ULL() to construct the PFERR masks rather than open-coding the bit shifting. No functional change intended. Signed-off-by: David Matlack Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221102184654.282799-6-dmatlack@google.com Signed-off-by: Sean Christopherson arch/x86/include/asm/kvm_host.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 19a2b32f5d242844e49764cf88256cfd53de0082 Author: David Matlack Date: Wed Nov 2 11:46:48 2022 -0700 KVM: selftests: Move flds instruction emulation failure handling to header Move the flds instruction emulation failure handling code to a header so it can be re-used in an upcoming test. No functional change intended. Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20221102184654.282799-5-dmatlack@google.com Signed-off-by: Sean Christopherson .../testing/selftests/kvm/x86_64/flds_emulation.h | 55 ++++++++++++++++++++++ .../kvm/x86_64/smaller_maxphyaddr_emulation_test.c | 44 ++--------------- 2 files changed, 59 insertions(+), 40 deletions(-) commit 50824c6eee39eb2d7a60d665b4b245552e852705 Author: David Matlack Date: Wed Nov 2 11:46:47 2022 -0700 KVM: selftests: Delete dead ucall code Delete a bunch of code related to ucall handling from smaller_maxphyaddr_emulation_test. The only thing smaller_maxphyaddr_emulation_test needs to check is that the vCPU exits with UCALL_DONE after the second vcpu_run(). Signed-off-by: David Matlack Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221102184654.282799-4-dmatlack@google.com Signed-off-by: Sean Christopherson .../kvm/x86_64/smaller_maxphyaddr_emulation_test.c | 61 +--------------------- 1 file changed, 1 insertion(+), 60 deletions(-) commit 48e59373398a554098863bc7a3d1350cd0d5c4d0 Author: David Matlack Date: Wed Nov 2 11:46:46 2022 -0700 KVM: selftests: Explicitly require instructions bytes Hard-code the flds instruction and assert the exact instruction bytes are present in run->emulation_failure. The test already requires the instruction bytes to be present because that's the only way the test will advance the RIP past the flds and get to GUEST_DONE(). Note that KVM does not necessarily return exactly 2 bytes in run->emulation_failure since it may not know the exact instruction length in all cases. So just assert that run->emulation_failure.insn_size is at least 2. Signed-off-by: David Matlack Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221102184654.282799-3-dmatlack@google.com Signed-off-by: Sean Christopherson .../kvm/x86_64/smaller_maxphyaddr_emulation_test.c | 68 +++++++--------------- 1 file changed, 20 insertions(+), 48 deletions(-) commit 52d3a4fb5be1579b0fb8d48f8abaf9a9c7db1083 Author: David Matlack Date: Wed Nov 2 11:46:45 2022 -0700 KVM: selftests: Rename emulator_error_test to smaller_maxphyaddr_emulation_test Rename emulator_error_test to smaller_maxphyaddr_emulation_test and update the comment at the top of the file to document that this is explicitly a test to validate that KVM emulates instructions in response to an EPT violation when emulating a smaller MAXPHYADDR. Signed-off-by: David Matlack Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221102184654.282799-2-dmatlack@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/.gitignore | 2 +- tools/testing/selftests/kvm/Makefile | 2 +- .../{emulator_error_test.c => smaller_maxphyaddr_emulation_test.c} | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) commit 376bc1b458c9a6db347c70f02fa6eb8b5f187455 Author: Gautam Menghani Date: Mon Oct 17 23:28:19 2022 +0530 KVM: selftests: Don't assume vcpu->id is '0' in xAPIC state test In xapic_state_test's test_icr(), explicitly skip iterations that would match vcpu->id instead of assuming vcpu->id is '0', so that IPIs are are correctly sent to non-existent vCPUs. Suggested-by: Sean Christopherson Link: https://lore.kernel.org/kvm/YyoZr9rXSSMEtdh5@google.com Signed-off-by: Gautam Menghani Link: https://lore.kernel.org/r/20221017175819.12672-1-gautammenghani201@gmail.com [sean: massage shortlog and changelog] Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/x86_64/xapic_state_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2115713cfab05dd6efd48ad6bf56e67f556dcec5 Author: Vishal Annapurve Date: Tue Nov 15 21:38:45 2022 +0000 KVM: selftests: Add arch specific post vm creation hook Add arch specific API kvm_arch_vm_post_create to perform any required setup after VM creation. Suggested-by: Sean Christopherson Reviewed-by: Andrew Jones Reviewed-by: Peter Gonda Signed-off-by: Vishal Annapurve Link: https://lore.kernel.org/r/20221115213845.3348210-4-vannapurve@google.com [sean: place x86's implementation by vm_arch_vcpu_add()] Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/include/kvm_util_base.h | 2 ++ tools/testing/selftests/kvm/lib/kvm_util.c | 8 +++++--- tools/testing/selftests/kvm/lib/x86_64/processor.c | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) commit e1ab31245c4efe973db4dcd6c82a41c2aec09b27 Author: Vishal Annapurve Date: Tue Nov 15 21:38:44 2022 +0000 KVM: selftests: Add arch specific initialization Introduce arch specific API: kvm_selftest_arch_init to allow each arch to handle initialization before running any selftest logic. Suggested-by: Sean Christopherson Reviewed-by: Andrew Jones Reviewed-by: Peter Gonda Signed-off-by: Vishal Annapurve Link: https://lore.kernel.org/r/20221115213845.3348210-3-vannapurve@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/include/kvm_util_base.h | 7 +++++++ tools/testing/selftests/kvm/lib/aarch64/processor.c | 18 +++++++++--------- tools/testing/selftests/kvm/lib/kvm_util.c | 6 ++++++ 3 files changed, 22 insertions(+), 9 deletions(-) commit 197ebb713ad04518ffef6d966954b519a0805100 Author: Vishal Annapurve Date: Tue Nov 15 21:38:43 2022 +0000 KVM: selftests: move common startup logic to kvm_util.c Consolidate common startup logic in one place by implementing a single setup function with __attribute((constructor)) for all selftests within kvm_util.c. This allows moving logic like: /* Tell stdout not to buffer its content */ setbuf(stdout, NULL); to a single file for all selftests. This will also allow any required setup at entry in future to be done in common main function. Link: https://lore.kernel.org/lkml/Ywa9T+jKUpaHLu%2Fl@google.com Suggested-by: Sean Christopherson Reviewed-by: Andrew Jones Reviewed-by: Peter Gonda Signed-off-by: Vishal Annapurve Link: https://lore.kernel.org/r/20221115213845.3348210-2-vannapurve@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/aarch64/arch_timer.c | 3 --- tools/testing/selftests/kvm/aarch64/hypercalls.c | 2 -- tools/testing/selftests/kvm/aarch64/vgic_irq.c | 3 --- tools/testing/selftests/kvm/lib/kvm_util.c | 6 ++++++ tools/testing/selftests/kvm/memslot_perf_test.c | 3 --- tools/testing/selftests/kvm/rseq_test.c | 3 --- tools/testing/selftests/kvm/s390x/memop.c | 2 -- tools/testing/selftests/kvm/s390x/resets.c | 2 -- tools/testing/selftests/kvm/s390x/sync_regs_test.c | 3 --- tools/testing/selftests/kvm/set_memory_region_test.c | 3 --- tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c | 3 --- tools/testing/selftests/kvm/x86_64/emulator_error_test.c | 3 --- tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 3 --- tools/testing/selftests/kvm/x86_64/platform_info_test.c | 3 --- tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c | 3 --- tools/testing/selftests/kvm/x86_64/set_sregs_test.c | 3 --- tools/testing/selftests/kvm/x86_64/svm_nested_soft_inject_test.c | 3 --- tools/testing/selftests/kvm/x86_64/sync_regs_test.c | 3 --- tools/testing/selftests/kvm/x86_64/userspace_io_test.c | 3 --- tools/testing/selftests/kvm/x86_64/userspace_msr_exit_test.c | 3 --- 20 files changed, 6 insertions(+), 54 deletions(-) commit 96b69958c77d84e49c06ebe2e3502e4c1620e3c0 Author: Sean Christopherson Date: Thu Oct 6 00:45:12 2022 +0000 KVM: selftests: Play nice with huge pages when getting PTEs/GPAs Play nice with huge pages when getting PTEs and translating GVAs to GPAs, there's no reason to disallow using huge pages in selftests. Use PG_LEVEL_NONE to indicate that the caller doesn't care about the mapping level and just wants to get the pte+level. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006004512.666529-8-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 11 +++++- tools/testing/selftests/kvm/lib/x86_64/processor.c | 45 ++++++++++++++++++---- 2 files changed, 47 insertions(+), 9 deletions(-) commit efe91dc307d00766911fbcb5021bdc3a1cf9c79e Author: Sean Christopherson Date: Thu Oct 6 00:45:11 2022 +0000 KVM: selftests: Use vm_get_page_table_entry() in addr_arch_gva2gpa() Use vm_get_page_table_entry() in addr_arch_gva2gpa() to get the leaf PTE instead of manually walking page tables. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006004512.666529-7-seanjc@google.com tools/testing/selftests/kvm/lib/x86_64/processor.c | 38 +++------------------- 1 file changed, 4 insertions(+), 34 deletions(-) commit 99d51c6eef2dadc204363ab3bf58c91d02f895be Author: Sean Christopherson Date: Thu Oct 6 00:45:10 2022 +0000 KVM: selftests: Use virt_get_pte() when getting PTE pointer Use virt_get_pte() in vm_get_page_table_entry() instead of open coding equivalent code. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006004512.666529-6-seanjc@google.com tools/testing/selftests/kvm/lib/x86_64/processor.c | 29 +++++----------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit ed0b58fc6f0bdde360c28314e0faedc9a0a6c3de Author: Sean Christopherson Date: Thu Oct 6 00:45:09 2022 +0000 KVM: selftests: Verify parent PTE is PRESENT when getting child PTE Verify the parent PTE is PRESENT when getting a child via virt_get_pte() so that the helper can be used for getting PTEs/GPAs without losing sanity checks that the walker isn't wandering into the weeds. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006004512.666529-5-seanjc@google.com tools/testing/selftests/kvm/lib/x86_64/processor.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 91add12d384c650d243b8ccdee1f2ddea3c9a85d Author: Sean Christopherson Date: Thu Oct 6 00:45:08 2022 +0000 KVM: selftests: Remove useless shifts when creating guest page tables Remove the pointless shift from GPA=>GFN and immediately back to GFN=>GPA when creating guest page tables. Ignore the other walkers that have a similar pattern for the moment, they will be converted to use virt_get_pte() in the near future. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006004512.666529-4-seanjc@google.com tools/testing/selftests/kvm/include/x86_64/processor.h | 3 ++- tools/testing/selftests/kvm/lib/x86_64/processor.c | 17 ++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 751f280017b697d98936618a21ca3defdc03a9f4 Author: Sean Christopherson Date: Thu Oct 6 00:45:07 2022 +0000 KVM: selftests: Drop reserved bit checks from PTE accessor Drop the reserved bit checks from the helper to retrieve a PTE, there's very little value in sanity checking the constructed page tables as any will quickly be noticed in the form of an unexpected #PF. The checks also place unnecessary restrictions on the usage of the helpers, e.g. if a test _wanted_ to set reserved bits for whatever reason. Removing the NX check in particular allows for the removal of the @vcpu param, which will in turn allow the helper to be reused nearly verbatim for addr_gva2gpa(). Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006004512.666529-3-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 3 +-- tools/testing/selftests/kvm/lib/x86_64/processor.c | 26 +--------------------- .../selftests/kvm/x86_64/emulator_error_test.c | 2 +- 3 files changed, 3 insertions(+), 28 deletions(-) commit 816c54b74742ac1a74a74de9355ab982d11e63e6 Author: Sean Christopherson Date: Thu Oct 6 00:45:06 2022 +0000 KVM: selftests: Drop helpers to read/write page table entries Drop vm_{g,s}et_page_table_entry() and instead expose the "inner" helper (was _vm_get_page_table_entry()) that returns a _pointer_ to the PTE, i.e. let tests directly modify PTEs instead of bouncing through helpers that just make life difficult. Opportunsitically use BIT_ULL() in emulator_error_test, and use the MAXPHYADDR define to set the "rogue" GPA bit instead of open coding the same value. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006004512.666529-2-seanjc@google.com .../selftests/kvm/include/x86_64/processor.h | 6 ++---- tools/testing/selftests/kvm/lib/x86_64/processor.c | 21 ++------------------- .../selftests/kvm/x86_64/emulator_error_test.c | 6 ++++-- 3 files changed, 8 insertions(+), 25 deletions(-) commit 9a6418dacd241169df9e0eeefc7980b3f9b40794 Author: Colin Ian King Date: Wed Sep 28 22:34:58 2022 +0100 KVM: selftests: Fix spelling mistake "begining" -> "beginning" There is a spelling mistake in an assert message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20220928213458.64089-1-colin.i.king@gmail.com [sean: fix an ironic typo in the changelog] Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/lib/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 426729b2cf2e02ff4bd5c988832c044c8b77f4c7 Author: Peter Gonda Date: Thu Oct 6 00:34:09 2022 +0000 KVM: selftests: Add ucall pool based implementation To play nice with guests whose stack memory is encrypted, e.g. AMD SEV, introduce a new "ucall pool" implementation that passes the ucall struct via dedicated memory (which can be mapped shared, a.k.a. as plain text). Because not all architectures have access to the vCPU index in the guest, use a bitmap with atomic accesses to track which entries in the pool are free/used. A list+lock could also work in theory, but synchronizing the individual pointers to the guest would be a mess. Note, there's no need to rewalk the bitmap to ensure success. If all vCPUs are simply allocating, success is guaranteed because there are enough entries for all vCPUs. If one or more vCPUs are freeing and then reallocating, success is guaranteed because vCPUs _always_ walk the bitmap from 0=>N; if vCPU frees an entry and then wins a race to re-allocate, then either it will consume the entry it just freed (bit is the first free bit), or the losing vCPU is guaranteed to see the freed bit (winner consumes an earlier bit, which the loser hasn't yet visited). Reviewed-by: Andrew Jones Signed-off-by: Peter Gonda Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006003409.649993-8-seanjc@google.com tools/testing/selftests/kvm/include/ucall_common.h | 9 ++- tools/testing/selftests/kvm/lib/aarch64/ucall.c | 7 +-- tools/testing/selftests/kvm/lib/riscv/ucall.c | 2 +- tools/testing/selftests/kvm/lib/s390x/ucall.c | 2 +- tools/testing/selftests/kvm/lib/ucall_common.c | 72 ++++++++++++++++++++-- tools/testing/selftests/kvm/lib/x86_64/ucall.c | 2 +- 6 files changed, 77 insertions(+), 17 deletions(-) commit 28a65567acb51759079adf5c6e3fcd047cda8120 Author: Sean Christopherson Date: Thu Oct 6 00:34:08 2022 +0000 KVM: selftests: Drop now-unnecessary ucall_uninit() Drop ucall_uninit() and ucall_arch_uninit() now that ARM doesn't modify the host's copy of ucall_exit_mmio_addr, i.e. now that there's no need to reset the pointer before potentially creating a new VM. The few calls to ucall_uninit() are all immediately followed by kvm_vm_free(), and that is likely always going to hold true, i.e. it's extremely unlikely a test will want to effectively disable ucall in the middle of a test. Reviewed-by: Andrew Jones Tested-by: Peter Gonda Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006003409.649993-7-seanjc@google.com tools/testing/selftests/kvm/aarch64/aarch32_id_regs.c | 1 - tools/testing/selftests/kvm/dirty_log_test.c | 1 - tools/testing/selftests/kvm/include/ucall_common.h | 6 ------ tools/testing/selftests/kvm/kvm_page_table_test.c | 1 - tools/testing/selftests/kvm/lib/aarch64/ucall.c | 14 ++------------ tools/testing/selftests/kvm/lib/memstress.c | 1 - tools/testing/selftests/kvm/lib/riscv/ucall.c | 4 ---- tools/testing/selftests/kvm/lib/s390x/ucall.c | 4 ---- tools/testing/selftests/kvm/lib/x86_64/ucall.c | 4 ---- 9 files changed, 2 insertions(+), 34 deletions(-) commit 03b4750533fc6519845ac2ca0e1d88a81ac260a1 Author: Sean Christopherson Date: Thu Oct 6 00:34:07 2022 +0000 KVM: selftests: Make arm64's MMIO ucall multi-VM friendly Fix a mostly-theoretical bug where ARM's ucall MMIO setup could result in different VMs stomping on each other by cloberring the global pointer. Fix the most obvious issue by saving the MMIO gpa into the VM. A more subtle bug is that creating VMs in parallel (on multiple tasks) could result in a VM using the wrong address. Synchronizing a global to a guest effectively snapshots the value on a per-VM basis, i.e. the "global" is already prepped to work with multiple VMs, but setting the global in the host is not thread-safe. To fix that bug, add write_guest_global() to allow stuffing a VM's copy of a "global" without modifying the host value. Reviewed-by: Andrew Jones Tested-by: Peter Gonda Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006003409.649993-6-seanjc@google.com tools/testing/selftests/kvm/include/kvm_util_base.h | 15 +++++++++++++++ tools/testing/selftests/kvm/lib/aarch64/ucall.c | 19 ++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) commit cf4694be2b2cf74945e50d39a02ea2307c4495f4 Author: Peter Gonda Date: Thu Oct 6 00:34:06 2022 +0000 tools: Add atomic_test_and_set_bit() Add x86 and generic implementations of atomic_test_and_set_bit() to allow KVM selftests to atomically manage bitmaps. Note, the generic version is taken from arch_test_and_set_bit() as of commit 415d83249709 ("locking/atomic: Make test_and_*_bit() ordered on failure"). Signed-off-by: Peter Gonda Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006003409.649993-5-seanjc@google.com tools/arch/x86/include/asm/atomic.h | 7 +++++++ tools/include/asm-generic/atomic-gcc.h | 12 ++++++++++++ 2 files changed, 19 insertions(+) commit dc88244bf5488b04fb7bbe47d8d9c38ff8f7dbb4 Author: Sean Christopherson Date: Thu Oct 6 00:34:05 2022 +0000 KVM: selftests: Automatically do init_ucall() for non-barebones VMs Do init_ucall() automatically during VM creation to kill two (three?) birds with one stone. First, initializing ucall immediately after VM creations allows forcing aarch64's MMIO ucall address to immediately follow memslot0. This is still somewhat fragile as tests could clobber the MMIO address with a new memslot, but it's safe-ish since tests have to be conversative when accounting for memslot0. And this can be hardened in the future by creating a read-only memslot for the MMIO page (KVM ARM exits with MMIO if the guest writes to a read-only memslot). Add a TODO to document that selftests can and should use a memslot for the ucall MMIO (doing so requires yet more rework because tests assumes thay can use all memslots except memslot0). Second, initializing ucall for all VMs prepares for making ucall initialization meaningful on all architectures. aarch64 is currently the only arch that needs to do any setup, but that will change in the future by switching to a pool-based implementation (instead of the current stack-based approach). Lastly, defining the ucall MMIO address from common code will simplify switching all architectures (except s390) to a common MMIO-based ucall implementation (if there's ever sufficient motivation to do so). Cc: Oliver Upton Reviewed-by: Andrew Jones Tested-by: Peter Gonda Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006003409.649993-4-seanjc@google.com .../selftests/kvm/aarch64/aarch32_id_regs.c | 2 - tools/testing/selftests/kvm/aarch64/arch_timer.c | 1 - .../selftests/kvm/aarch64/debug-exceptions.c | 2 - tools/testing/selftests/kvm/aarch64/hypercalls.c | 1 - tools/testing/selftests/kvm/aarch64/psci_test.c | 1 - tools/testing/selftests/kvm/aarch64/vgic_init.c | 2 - tools/testing/selftests/kvm/aarch64/vgic_irq.c | 1 - tools/testing/selftests/kvm/dirty_log_test.c | 2 - tools/testing/selftests/kvm/include/ucall_common.h | 6 +-- tools/testing/selftests/kvm/kvm_page_table_test.c | 1 - tools/testing/selftests/kvm/lib/aarch64/ucall.c | 54 ++-------------------- tools/testing/selftests/kvm/lib/kvm_util.c | 11 +++++ tools/testing/selftests/kvm/lib/memstress.c | 2 - tools/testing/selftests/kvm/lib/riscv/ucall.c | 2 +- tools/testing/selftests/kvm/lib/s390x/ucall.c | 2 +- tools/testing/selftests/kvm/lib/x86_64/ucall.c | 2 +- tools/testing/selftests/kvm/memslot_perf_test.c | 1 - tools/testing/selftests/kvm/rseq_test.c | 1 - tools/testing/selftests/kvm/steal_time.c | 1 - .../selftests/kvm/system_counter_offset_test.c | 1 - 20 files changed, 20 insertions(+), 76 deletions(-) commit ef38871eb22879438d2af8642ed7a52c1616f410 Author: Sean Christopherson Date: Thu Oct 6 00:34:04 2022 +0000 KVM: selftests: Consolidate boilerplate code in get_ucall() Consolidate the actual copying of a ucall struct from guest=>host into the common get_ucall(). Return a host virtual address instead of a guest virtual address even though the addr_gva2hva() part could be moved to get_ucall() too. Conceptually, get_ucall() is invoked from the host and should return a host virtual address (and returning NULL for "nothing to see here" is far superior to returning 0). Use pointer shenanigans instead of an unnecessary bounce buffer when the caller of get_ucall() provides a valid pointer. Reviewed-by: Andrew Jones Tested-by: Peter Gonda Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006003409.649993-3-seanjc@google.com tools/testing/selftests/kvm/include/ucall_common.h | 8 ++------ tools/testing/selftests/kvm/lib/aarch64/ucall.c | 14 +++----------- tools/testing/selftests/kvm/lib/riscv/ucall.c | 19 +++---------------- tools/testing/selftests/kvm/lib/s390x/ucall.c | 16 +++------------- tools/testing/selftests/kvm/lib/ucall_common.c | 19 +++++++++++++++++++ tools/testing/selftests/kvm/lib/x86_64/ucall.c | 16 +++------------- 6 files changed, 33 insertions(+), 59 deletions(-) commit 7046638192d52416adbfc273c36950f0e3311191 Author: Sean Christopherson Date: Thu Oct 6 00:34:03 2022 +0000 KVM: selftests: Consolidate common code for populating ucall struct Make ucall() a common helper that populates struct ucall, and only calls into arch code to make the actually call out to userspace. Rename all arch-specific helpers to make it clear they're arch-specific, and to avoid collisions with common helpers (one more on its way...) Add WRITE_ONCE() to stores in ucall() code (as already done to aarch64 code in commit 9e2f6498efbb ("selftests: KVM: Handle compiler optimizations in ucall")) to prevent clang optimizations breaking ucalls. Cc: Colton Lewis Reviewed-by: Andrew Jones Tested-by: Peter Gonda Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221006003409.649993-2-seanjc@google.com tools/testing/selftests/kvm/Makefile | 1 + tools/testing/selftests/kvm/include/ucall_common.h | 23 +++++++++++++++++++--- tools/testing/selftests/kvm/lib/aarch64/ucall.c | 22 +++++---------------- tools/testing/selftests/kvm/lib/riscv/ucall.c | 23 +++++----------------- tools/testing/selftests/kvm/lib/s390x/ucall.c | 23 +++++----------------- tools/testing/selftests/kvm/lib/ucall_common.c | 20 +++++++++++++++++++ tools/testing/selftests/kvm/lib/x86_64/ucall.c | 23 +++++----------------- 7 files changed, 61 insertions(+), 74 deletions(-) commit b3d937722de0e64eebe267451a0e3d5ed5107ef7 Author: Sean Christopherson Date: Thu Nov 17 00:23:50 2022 +0000 KVM: arm64: selftests: Disable single-step without relying on ucall() Automatically disable single-step when the guest reaches the end of the verified section instead of using an explicit ucall() to ask userspace to disable single-step. An upcoming change to implement a pool-based scheme for ucall() will add an atomic operation (bit test and set) in the guest ucall code, and if the compiler generate "old school" atomics, e.g. 40e57c: c85f7c20 ldxr x0, [x1] 40e580: aa100011 orr x17, x0, x16 40e584: c80ffc31 stlxr w15, x17, [x1] 40e588: 35ffffaf cbnz w15, 40e57c <__aarch64_ldset8_sync+0x1c> the guest will hang as the local exclusive monitor is reset by eret, i.e. the stlxr will always fail due to the debug exception taken to EL2. Link: https://lore.kernel.org/all/20221006003409.649993-8-seanjc@google.com Cc: Oliver Upton Cc: Marc Zyngier Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221117002350.2178351-3-seanjc@google.com Reviewed-by: Oliver Upton .../selftests/kvm/aarch64/debug-exceptions.c | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 1cec8bbc1764964de24d19983fbf9fee6ce3c09d Author: Sean Christopherson Date: Thu Nov 17 00:23:49 2022 +0000 KVM: arm64: selftests: Disable single-step with correct KVM define Disable single-step by setting debug.control to KVM_GUESTDBG_ENABLE, not to SINGLE_STEP_DISABLE. The latter is an arbitrary test enum that just happens to have the same value as KVM_GUESTDBG_ENABLE, and so effectively disables single-step debug. No functional change intended. Cc: Reiji Watanabe Fixes: b18e4d4aebdd ("KVM: arm64: selftests: Add a test case for KVM_GUESTDBG_SINGLESTEP") Signed-off-by: Sean Christopherson Link: https://lore.kernel.org/r/20221117002350.2178351-2-seanjc@google.com Reviewed-by: Oliver Upton tools/testing/selftests/kvm/aarch64/debug-exceptions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f36b954a1f1bf06b5746fea7ecf0fa639ac65324 Author: Darrick J. Wong Date: Wed Nov 16 16:08:03 2022 -0800 xfs: check inode core when scrubbing metadata files Metadata files (e.g. realtime bitmaps and quota files) do not show up in the bulkstat output, which means that scrub-by-handle does not work; they can only be checked through a specific scrub type. Therefore, each scrub type calls xchk_metadata_inode_forks to check the metadata for whatever's in the file. Unfortunately, that function doesn't actually check the inode record itself. Refactor the function a bit to make that happen. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/common.c | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) commit bd5ab5f9874109586cbae5bc98e1f9ff574627e2 Author: Darrick J. Wong Date: Wed Nov 16 16:08:03 2022 -0800 xfs: don't warn about files that are exactly s_maxbytes long We can handle files that are exactly s_maxbytes bytes long; we just can't handle anything larger than that. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dae590a6c96c799434e0ff8156ef29b88c257e60 Author: Waiman Long Date: Fri Nov 4 20:59:02 2022 -0400 blk-cgroup: Flush stats at blkgs destruction path As noted by Michal, the blkg_iostat_set's in the lockless list hold reference to blkg's to protect against their removal. Those blkg's hold reference to blkcg. When a cgroup is being destroyed, cgroup_rstat_flush() is only called at css_release_work_fn() which is called when the blkcg reference count reaches 0. This circular dependency will prevent blkcg from being freed until some other events cause cgroup_rstat_flush() to be called to flush out the pending blkcg stats. To prevent this delayed blkcg removal, add a new cgroup_rstat_css_flush() function to flush stats for a given css and cpu and call it at the blkgs destruction path, blkcg_destroy_blkgs(), whenever there are still some pending stats to be flushed. This will ensure that blkcg reference count can reach 0 ASAP. Signed-off-by: Waiman Long Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221105005902.407297-4-longman@redhat.com Signed-off-by: Jens Axboe block/blk-cgroup.c | 15 ++++++++++++++- include/linux/cgroup.h | 1 + kernel/cgroup/rstat.c | 20 ++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) commit 3b8cc6298724021da845f2f9fd7dd4b6829a6817 Author: Waiman Long Date: Fri Nov 4 20:59:01 2022 -0400 blk-cgroup: Optimize blkcg_rstat_flush() For a system with many CPUs and block devices, the time to do blkcg_rstat_flush() from cgroup_rstat_flush() can be rather long. It can be especially problematic as interrupt is disabled during the flush. It was reported that it might take seconds to complete in some extreme cases leading to hard lockup messages. As it is likely that not all the percpu blkg_iostat_set's has been updated since the last flush, those stale blkg_iostat_set's don't need to be flushed in this case. This patch optimizes blkcg_rstat_flush() by keeping a lockless list of recently updated blkg_iostat_set's in a newly added percpu blkcg->lhead pointer. The blkg_iostat_set is added to a lockless list on the update side in blk_cgroup_bio_start(). It is removed from the lockless list when flushed in blkcg_rstat_flush(). Due to racing, it is possible that blk_iostat_set's in the lockless list may have no new IO stats to be flushed, but that is OK. To protect against destruction of blkg, a percpu reference is gotten when putting into the lockless list and put back when removed. When booting up an instrumented test kernel with this patch on a 2-socket 96-thread system with cgroup v2, out of the 2051 calls to cgroup_rstat_flush() after bootup, 1788 of the calls were exited immediately because of empty lockless list. After an all-cpu kernel build, the ratio became 6295424/6340513. That was more than 99%. Signed-off-by: Waiman Long Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221105005902.407297-3-longman@redhat.com Signed-off-by: Jens Axboe block/blk-cgroup.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++++----- block/blk-cgroup.h | 10 +++++++ 2 files changed, 80 insertions(+), 6 deletions(-) commit b5a9adcbd5dc95d34d1f5fc84eff9af6fc60d284 Author: Waiman Long Date: Fri Nov 4 20:59:00 2022 -0400 blk-cgroup: Return -ENOMEM directly in blkcg_css_alloc() error path For blkcg_css_alloc(), the only error that will be returned is -ENOMEM. Simplify error handling code by returning this error directly instead of setting an intermediate "ret" variable. Signed-off-by: Waiman Long Reviewed-by: Ming Lei Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221105005902.407297-2-longman@redhat.com Signed-off-by: Jens Axboe block/blk-cgroup.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 5e7a0af793ce7ed528117145f856224deb81b7a7 Author: Matti Vaittinen Date: Wed Nov 16 11:08:19 2022 -0800 fixp-arith: do not require users to include bug.h The fixp_sin32_rad() contains a call to BUG_ON(). If users of fixp-arith.h have not included the bug.h prior including the fixp-arith.h the compiler will not find the BUG_ON. Thus every user of fixp-arith.h must also include bug.h (or roll own variant of BUG_ON()). Include bug.h from fixp-arith.h so every user of fixp-arith.h does not need to include the bug.h prior inclusion of fixp-arith.h Fixes: 559addc25b00 ("[media] fixp-arith: replace sin/cos table by a better precision one") Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/Y3SgVdVey9legtX+@dc75zzyyyyyyyyyyyyydt-3.rev.dnainternet.fi Signed-off-by: Dmitry Torokhov include/linux/fixp-arith.h | 1 + 1 file changed, 1 insertion(+) commit c18ef50346f213c4f20e3b56fd713a1e26ab5db3 Author: Vincent Knecht Date: Wed Nov 16 15:49:15 2022 -0800 Input: msg2638 - add support for msg2138 key events Some devices with msg2138 have back/menu/home keys. Add support for them. Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20221116211622.2155747-3-vincent.knecht@mailoo.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/msg2638.c | 62 ++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 4 deletions(-) commit 8f076b98f13b8dcf8b2c0d8978dc6512bb1f18ff Author: Vincent Knecht Date: Wed Nov 16 15:48:52 2022 -0800 dt-bindings: input: touchscreen: msg2638: Document keys support Document optional linux,keycodes support. Acked-by: Rob Herring Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20221116211622.2155747-2-vincent.knecht@mailoo.org Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/touchscreen/mstar,msg2638.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit da03e502bb22ec859af4f7d1f7d4d5f237b6c3fe Author: Roderick Colenbrander Date: Wed Nov 16 08:00:22 2022 -0800 HID: playstation: fix DualShock4 bluetooth CRC endian issue. The driver was by accident reading the CRC directly from a hardware structure instead of using get_unaligned_le32. Fixes: 2d77474a2392 ("HID: playstation: add DualShock4 bluetooth support.") Reported-by: kernel test robot Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 54980d30eff608545884416576416060b80d011e Author: Roderick Colenbrander Date: Wed Nov 16 08:00:21 2022 -0800 HID: playstation: fix DualShock4 bluetooth memory corruption bug. The size of the output buffer used for output reports was not updated to the larger size needed for Bluetooth. This ultimately resulted in memory corruption of surrounding structures e.g. due to memsets. Fixes: 2d77474a2392 ("HID: playstation: add DualShock4 bluetooth support.") Reported-by: Benjamin Tissoires Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e68bfbd3b3c3a0ec3cf8c230996ad8cabe90322f Author: Wang Weiyang Date: Tue Oct 25 19:31:01 2022 +0800 device_cgroup: Roll back to original exceptions after copy failure When add the 'a *:* rwm' entry to devcgroup A's whitelist, at first A's exceptions will be cleaned and A's behavior is changed to DEVCG_DEFAULT_ALLOW. Then parent's exceptions will be copyed to A's whitelist. If copy failure occurs, just return leaving A to grant permissions to all devices. And A may grant more permissions than parent. Backup A's whitelist and recover original exceptions after copy failure. Cc: stable@vger.kernel.org Fixes: 4cef7299b478 ("device_cgroup: add proper checking when changing default behavior") Signed-off-by: Wang Weiyang Reviewed-by: Aristeu Rozanski Signed-off-by: Paul Moore security/device_cgroup.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit 5eef46358fae1a6018d9f886a3ecd30e843728dd Author: Darrick J. Wong Date: Sun Nov 6 17:03:22 2022 -0800 xfs: teach scrub to flag non-extents format cow forks CoW forks only exist in memory, which means that they can only ever have an incore extent tree. Hence they must always be FMT_EXTENTS, so check this when we're scrubbing them. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/bmap.c | 2 ++ 1 file changed, 2 insertions(+) commit 31785537010a91a0d1dc403e5d049a38a3d4a30b Author: Darrick J. Wong Date: Sun Nov 6 17:03:21 2022 -0800 xfs: check that CoW fork extents are not shared Ensure that extents in an inode's CoW fork are not marked as shared in the refcount btree. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/bmap.c | 2 ++ 1 file changed, 2 insertions(+) commit f23c40443d1c2af87c99c1424f9e43bbd7307f92 Author: Darrick J. Wong Date: Sun Nov 6 17:03:21 2022 -0800 xfs: check quota files for unwritten extents Teach scrub to flag quota files containing unwritten extents. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/quota.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 830ffa09fb130d31f111848a75b65506fdac623d Author: Darrick J. Wong Date: Sun Nov 6 17:03:20 2022 -0800 xfs: block map scrub should handle incore delalloc reservations Enhance the block map scrubber to check delayed allocation reservations. Though there are no physical space allocations to check, we do need to make sure that the range of file offsets being mapped are correct, and to bump the lastoff cursor so that key order checking works correctly. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/bmap.c | 55 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 19 deletions(-) commit 6a5777865eebee1b53d7ae0fd2fa9ec2c6596df6 Author: Darrick J. Wong Date: Sun Nov 6 17:03:20 2022 -0800 xfs: teach scrub to check for adjacent bmaps when rmap larger than bmap When scrub is checking file fork mappings against rmap records and the rmap record starts before or ends after the bmap record, check the adjacent bmap records to make sure that they're adjacent to the one we're checking. This helps us to detect cases where the rmaps cover territory that the bmaps do not. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/bmap.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 2 deletions(-) commit 033985b6fe875a7a971cf4e3941e1f3085ba037c Author: Darrick J. Wong Date: Sun Nov 6 17:03:19 2022 -0800 xfs: fix perag loop in xchk_bmap_check_rmaps sparse complains that we can return an uninitialized error from this function and that pag could be uninitialized. We know that there are no zero-AG filesystems and hence we had to call xchk_bmap_check_ag_rmaps at least once, so this is not actually possible, but I'm too worn out from automated complaints from unsophisticated AIs so let's just fix this and move on to more interesting problems, eh? Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/bmap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e74331d6fa2c21a8ecccfe0648dad5193b83defe Author: Darrick J. Wong Date: Sun Nov 6 17:03:19 2022 -0800 xfs: online checking of the free rt extent count Teach the summary count checker to count the number of free realtime extents and compare that to the superblock copy. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/fscounters.c | 86 +++++++++++++++++++++++++++++++++++++++++++++-- fs/xfs/scrub/scrub.h | 8 ----- 2 files changed, 84 insertions(+), 10 deletions(-) commit 5f369dc5b4eb2becbdfd08924dcaf00e391f4ea1 Author: Darrick J. Wong Date: Sun Nov 6 17:03:18 2022 -0800 xfs: make rtbitmap ILOCKing consistent when scanning the rt bitmap file xfs_rtalloc_query_range scans the realtime bitmap file in order of increasing file offset, so this caller can take ILOCK_SHARED on the rt bitmap inode instead of ILOCK_EXCL. This isn't going to yield any practical benefits at mount time, but we'd like to make the locking usage consistent around xfs_rtalloc_query_all calls. Make all the places we do this use the same xfs_ilock lockflags for consistency. Fixes: 4c934c7dd60c ("xfs: report realtime space information via the rtbitmap") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/xfs_fsmap.c | 4 ++-- fs/xfs/xfs_rtalloc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 93b0c58ed04b6cbe45354f23bb5628fff31f9084 Author: Darrick J. Wong Date: Sun Nov 6 17:03:17 2022 -0800 xfs: don't return -EFSCORRUPTED from repair when resources cannot be grabbed If we tried to repair something but the repair failed with -EDEADLOCK, that means that the repair function couldn't grab some resource it needed and wants us to try again. If we try again (with TRY_HARDER) but still can't get all the resources we need, the repair fails and errors remain on the filesystem. Right now, repair returns the -EDEADLOCK to the caller as -EFSCORRUPTED, which results in XFS_SCRUB_OFLAG_CORRUPT being passed out to userspace. This is not correct because repair has not determined that anything is corrupt. If the repair had been invoked on an object that could be optimized but wasn't corrupt (OFLAG_PREEN), the inability to grab resources will be reported to userspace as corrupt metadata, and users will be unnecessarily alarmed that their suboptimal metadata turned into a corruption. Fix this by returning zero so that the results of the actual scrub will be copied back out to userspace. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/repair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11f97e684583469fc342a561387cc44fac4f9b1f Author: Darrick J. Wong Date: Sun Nov 6 17:03:19 2022 -0800 xfs: skip fscounters comparisons when the scan is incomplete If any part of the per-AG summary counter scan loop aborts without collecting all of the data we need, the scrubber's observation data will be invalid. Set the incomplete flag so that we abort the scrub without reporting false corruptions. Document the data dependency here too. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/fscounters.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 9e13975bb0620c2bfa1a4d2943e7eb8514f7708e Author: Darrick J. Wong Date: Sun Nov 6 17:03:18 2022 -0800 xfs: load rtbitmap and rtsummary extent mapping btrees at mount time It turns out that GETFSMAP and online fsck have had a bug for years due to their use of ILOCK_SHARED to coordinate their linear scans of the realtime bitmap. If the bitmap file's data fork happens to be in BTREE format and the scan occurs immediately after mounting, the incore bmbt will not be populated, leading to ASSERTs tripping over the incorrect inode state. Because the bitmap scans always lock bitmap buffers in increasing order of file offset, it is appropriate for these two callers to take a shared ILOCK to improve scalability. To fix this problem, load both data and attr fork state into memory when mounting the realtime inodes. Realtime metadata files aren't supposed to have an attr fork so the second step is likely a nop. On most filesystems this is unlikely since the rtbitmap data fork is usually in extents format, but it's possible to craft a filesystem that will by fragmenting the free space in the data section and growfsing the rt section. Fixes: 4c934c7dd60c ("xfs: report realtime space information via the rtbitmap") Also-Fixes: 46d9bfb5e706 ("xfs: cross-reference the realtime bitmap") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/xfs_rtalloc.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) commit 306195f355bbdcc3eff6cffac05bcd93a5e419ed Author: Darrick J. Wong Date: Sun Nov 6 17:03:16 2022 -0800 xfs: pivot online scrub away from kmem.[ch] Convert all the online scrub code to use the Linux slab allocator functions directly instead of going through the kmem wrappers. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/agheader_repair.c | 2 +- fs/xfs/scrub/attr.c | 2 +- fs/xfs/scrub/bitmap.c | 11 ++++++----- fs/xfs/scrub/btree.c | 9 ++++----- fs/xfs/scrub/dabtree.c | 4 ++-- fs/xfs/scrub/fscounters.c | 2 +- fs/xfs/scrub/refcount.c | 12 ++++++------ fs/xfs/scrub/scrub.c | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) commit 6bf2f87915970160ded16c310e2e8887deff97a2 Author: Darrick J. Wong Date: Sun Nov 6 17:03:17 2022 -0800 xfs: don't retry repairs harder when EAGAIN is returned Repair functions will not return EAGAIN -- if they were not able to obtain resources, they should return EDEADLOCK (like the rest of online fsck) to signal that we need to grab all the resources and try again. Hence we don't need to deal with this case except as a debugging assertion. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/repair.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit fcd2a43488d5a211aec94e28369b2a72c28258a2 Author: Darrick J. Wong Date: Sun Nov 6 17:03:15 2022 -0800 xfs: initialize the check_owner object fully Initialize the check_owner list head so that we don't corrupt the list. Reduce the scope of the object pointer. Fixes: 858333dcf021 ("xfs: check btree block ownership with bnobt/rmapbt when scrubbing btree") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/btree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0a713bd41ea2b19904232b9c5278012c4361bc04 Author: Darrick J. Wong Date: Sun Nov 6 17:03:17 2022 -0800 xfs: fix return code when fatal signal encountered during dquot scrub If the scrub process is sent a fatal signal while we're checking dquots, the predicate for this will set the error code to -EINTR. Don't then squash that into -ECANCELED, because the wrong errno turns up in the trace output. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7a0f9a5503f4da3b6489583ce4ef9abc0ab2475 Author: Darrick J. Wong Date: Sun Nov 6 17:03:16 2022 -0800 xfs: return EINTR when a fatal signal terminates scrub If the program calling online fsck is terminated with a fatal signal, bail out to userspace by returning EINTR, not EAGAIN. EAGAIN is used by scrubbers to indicate that we should try again with more resources locked, and not to indicate that the operation was cancelled. The miswiring is mostly harmless, but it shows up in the trace data. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b255fab0f80cc65a334fcd90cd278673cddbc988 Author: Darrick J. Wong Date: Sun Nov 6 17:03:14 2022 -0800 xfs: make AGFL repair function avoid crosslinked blocks Teach the AGFL repair function to check each block of the proposed AGFL against the rmap btree. If the rmapbt finds any mappings that are not OWN_AG, strike that block from the list. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/agheader_repair.c | 78 +++++++++++++++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 12 deletions(-) commit 48ff40458f871fb19e7b1b40e0e5084b8751d9cb Author: Darrick J. Wong Date: Sun Nov 6 17:03:15 2022 -0800 xfs: standardize GFP flags usage in online scrub Memory allocation usage is the same throughout online fsck -- we want kernel memory, we have to be able to back out if we can't allocate memory, and we don't want to spray dmesg with memory allocation failure reports. Standardize the GFP flag usage and document these requirements. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/agheader.c | 2 +- fs/xfs/scrub/attr.c | 9 ++++----- fs/xfs/scrub/scrub.h | 9 +++++++++ fs/xfs/scrub/symlink.c | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) commit 3e59c0103e66d6e687a8b47fd70169542aba938e Author: Darrick J. Wong Date: Sun Nov 6 17:03:14 2022 -0800 xfs: log the AGI/AGF buffers when rolling transactions during an AG repair Currently, the only way to lock an allocation group is to hold the AGI and AGF buffers. If a repair needs to roll the transaction while repairing some AG metadata, it maintains that lock by holding the two buffers across the transaction roll and joins them afterwards. However, repair is not like other parts of XFS that employ the bhold - roll - bjoin sequence because it's possible that the AGI or AGF buffers are not actually dirty before the roll. This presents two problems -- First, we need to redirty those buffers to keep them moving along in the log to avoid pinning the log tail. Second, a clean buffer log item can detach from the buffer. If this happens, the buffer type state is discarded along with the bli and must be reattached before the next time the buffer is logged. If it is not, the logging code will complain and log recovery will not work properly. An earlier version of this patch tried to fix the second problem by re-setting the buffer type in the bli after joining the buffer to the new transaction, but that looked weird and didn't solve the first problem. Instead, solve both problems by logging the buffer before rolling the transaction. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/repair.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit be1317fdb8d4e3ccbac43e199b360c248c600d99 Author: Darrick J. Wong Date: Sun Nov 6 17:03:14 2022 -0800 xfs: don't track the AGFL buffer in the scrub AG context While scrubbing an allocation group, we don't need to hold the AGFL buffer as part of the scrub context. All that is necessary to lock an AG is to hold the AGI and AGF buffers, so fix all the existing users of the AGFL buffer to grab them only when necessary. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/agheader.c | 47 ++++++++++++++++++++++++++---------------- fs/xfs/scrub/agheader_repair.c | 1 - fs/xfs/scrub/common.c | 8 ------- fs/xfs/scrub/repair.c | 11 +++++----- fs/xfs/scrub/scrub.h | 1 - 5 files changed, 35 insertions(+), 33 deletions(-) commit 9a48b4a6fd512bdaed7e38ba844be743163d49c6 Author: Darrick J. Wong Date: Sun Nov 6 17:03:13 2022 -0800 xfs: fully initialize xfs_da_args in xchk_directory_blocks While running the online fsck test suite, I noticed the following assertion in the kernel log (edited for brevity): XFS: Assertion failed: 0, file: fs/xfs/xfs_health.c, line: 571 ------------[ cut here ]------------ WARNING: CPU: 3 PID: 11667 at fs/xfs/xfs_message.c:104 assfail+0x46/0x4a [xfs] CPU: 3 PID: 11667 Comm: xfs_scrub Tainted: G W 5.19.0-rc7-xfsx #rc7 6e6475eb29fd9dda3181f81b7ca7ff961d277a40 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014 RIP: 0010:assfail+0x46/0x4a [xfs] Call Trace: xfs_dir2_isblock+0xcc/0xe0 xchk_directory_blocks+0xc7/0x420 xchk_directory+0x53/0xb0 xfs_scrub_metadata+0x2b6/0x6b0 xfs_scrubv_metadata+0x35e/0x4d0 xfs_ioc_scrubv_metadata+0x111/0x160 xfs_file_ioctl+0x4ec/0xef0 __x64_sys_ioctl+0x82/0xa0 do_syscall_64+0x2b/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 This assertion triggers in xfs_dirattr_mark_sick when the caller passes in a whichfork value that is neither of XFS_{DATA,ATTR}_FORK. The cause of this is that xchk_directory_blocks only partially initializes the xfs_da_args structure that is passed to xfs_dir2_isblock. If the data fork is not correct, the XFS_IS_CORRUPT clause will trigger. My development branch reports this failure to the health monitoring subsystem, which accesses the uninitialized args->whichfork field, leading the the assertion tripping. We really shouldn't be passing random stack contents around, so the solution here is to force the compiler to zero-initialize the struct. Found by fuzzing u3.bmx[0].blockcount = middlebit on xfs/1554. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/dir.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6ea25770b043c7997ab21d1ce95ba5de4d3d85d9 Author: Kyle Huey Date: Tue Nov 15 15:09:32 2022 -0800 selftests/vm/pkeys: Add a regression test for setting PKRU through ptrace This tests PTRACE_SETREGSET with NT_X86_XSTATE modifying PKRU directly and removing the PKRU bit from XSTATE_BV. Signed-off-by: Kyle Huey Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20221115230932.7126-7-khuey%40kylehuey.com tools/testing/selftests/vm/pkey-x86.h | 12 +++ tools/testing/selftests/vm/protection_keys.c | 131 ++++++++++++++++++++++++++- 2 files changed, 141 insertions(+), 2 deletions(-) commit d7e5aceace514a2b1b3ca3dc44f93f1704766ca7 Author: Kyle Huey Date: Tue Nov 15 15:09:31 2022 -0800 x86/fpu: Emulate XRSTOR's behavior if the xfeatures PKRU bit is not set The hardware XRSTOR instruction resets the PKRU register to its hardware init value (namely 0) if the PKRU bit is not set in the xfeatures mask. Emulating that here restores the pre-5.14 behavior for PTRACE_SET_REGSET with NT_X86_XSTATE, and makes sigreturn (which still uses XRSTOR) and ptrace behave identically. KVM has never used XRSTOR and never had this behavior, so KVM opts-out of this emulation by passing a NULL pkru pointer to copy_uabi_to_xstate(). Fixes: e84ba47e313d ("x86/fpu: Hook up PKRU into ptrace()") Signed-off-by: Kyle Huey Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20221115230932.7126-6-khuey%40kylehuey.com arch/x86/kernel/fpu/core.c | 8 ++++++++ arch/x86/kernel/fpu/xstate.c | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit 4a804c4f8356393d6b5eff7600f07615d7869c13 Author: Kyle Huey Date: Tue Nov 15 15:09:30 2022 -0800 x86/fpu: Allow PKRU to be (once again) written by ptrace. Move KVM's PKRU handling code in fpu_copy_uabi_to_guest_fpstate() to copy_uabi_to_xstate() so that it is shared with other APIs that write the XSTATE such as PTRACE_SETREGSET with NT_X86_XSTATE. This restores the pre-5.14 behavior of ptrace. The regression can be seen by running gdb and executing `p $pkru`, `set $pkru = 42`, and `p $pkru`. On affected kernels (5.14+) the write to the PKRU register (which gdb performs through ptrace) is ignored. [ dhansen: removed stable@ tag for now. The ABI was broken for long enough that this is not urgent material. Let's let it stew in tip for a few weeks before it's submitted to stable because there are so many ABIs potentially affected. ] Fixes: e84ba47e313d ("x86/fpu: Hook up PKRU into ptrace()") Signed-off-by: Kyle Huey Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20221115230932.7126-5-khuey%40kylehuey.com arch/x86/kernel/fpu/core.c | 13 +------------ arch/x86/kernel/fpu/xstate.c | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 13 deletions(-) commit 2c87767c35ee9744f666ccec869d5fe742c3de0a Author: Kyle Huey Date: Tue Nov 15 15:09:29 2022 -0800 x86/fpu: Add a pkru argument to copy_uabi_to_xstate() In preparation for moving PKRU handling code out of fpu_copy_uabi_to_guest_fpstate() and into copy_uabi_to_xstate(), add an argument that copy_uabi_from_kernel_to_xstate() can use to pass the canonical location of the PKRU value. For copy_sigframe_from_user_to_xstate() the kernel will actually restore the PKRU value from the fpstate, but pass in the thread_struct's pkru location anyways for consistency. Signed-off-by: Kyle Huey Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20221115230932.7126-4-khuey%40kylehuey.com arch/x86/kernel/fpu/xstate.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 1c813ce0305571e1b2e4cc4acca451da9e6ad18f Author: Kyle Huey Date: Tue Nov 15 15:09:28 2022 -0800 x86/fpu: Add a pkru argument to copy_uabi_from_kernel_to_xstate(). Both KVM (through KVM_SET_XSTATE) and ptrace (through PTRACE_SETREGSET with NT_X86_XSTATE) ultimately call copy_uabi_from_kernel_to_xstate(), but the canonical locations for the current PKRU value for KVM guests and processes in a ptrace stop are different (in the kvm_vcpu_arch and the thread_state structs respectively). In preparation for eventually handling PKRU in copy_uabi_to_xstate, pass in a pointer to the PKRU location. Signed-off-by: Kyle Huey Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20221115230932.7126-3-khuey%40kylehuey.com arch/x86/kernel/fpu/core.c | 2 +- arch/x86/kernel/fpu/regset.c | 2 +- arch/x86/kernel/fpu/xstate.c | 2 +- arch/x86/kernel/fpu/xstate.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 6a877d2450ace4f27c012519e5a1ae818f931983 Author: Kyle Huey Date: Tue Nov 15 15:09:27 2022 -0800 x86/fpu: Take task_struct* in copy_sigframe_from_user_to_xstate() This will allow copy_sigframe_from_user_to_xstate() to grab the address of thread_struct's pkru value in a later patch. Signed-off-by: Kyle Huey Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20221115230932.7126-2-khuey%40kylehuey.com arch/x86/kernel/fpu/signal.c | 2 +- arch/x86/kernel/fpu/xstate.c | 4 ++-- arch/x86/kernel/fpu/xstate.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 86ef3c735ec81566cd38174ed5e90e9721473064 Author: Kees Cook Date: Tue Nov 1 17:05:29 2022 -0700 LSM: Better reporting of actual LSMs at boot Enhance the details reported by "lsm.debug" in several ways: - report contents of "security=" - report contents of "CONFIG_LSM" - report contents of "lsm=" - report any early LSM details - whitespace-align the output of similar phases for easier visual parsing - change "disabled" to more accurate "skipped" - explain what "skipped" and "ignored" mean in a parenthetical Upgrade the "security= is ignored" warning from pr_info to pr_warn, and include full arguments list to make the cause even more clear. Replace static "Security Framework initializing" pr_info with specific list of the resulting order of enabled LSMs. For example, if the kernel is built with: CONFIG_SECURITY_SELINUX=y CONFIG_SECURITY_APPARMOR=y CONFIG_SECURITY_LOADPIN=y CONFIG_SECURITY_YAMA=y CONFIG_SECURITY_SAFESETID=y CONFIG_SECURITY_LOCKDOWN_LSM=y CONFIG_SECURITY_LANDLOCK=y CONFIG_INTEGRITY=y CONFIG_BPF_LSM=y CONFIG_DEFAULT_SECURITY_APPARMOR=y CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,selinux, smack,tomoyo,apparmor,bpf" Booting without options will show: LSM: initializing lsm=lockdown,capability,landlock,yama,loadpin, safesetid,integrity,selinux,bpf landlock: Up and running. Yama: becoming mindful. LoadPin: ready to pin (currently not enforcing) SELinux: Initializing. LSM support for eBPF active Boot with "lsm.debug" will show: LSM: legacy security= *unspecified* LSM: CONFIG_LSM=landlock,lockdown,yama,loadpin,safesetid,integrity, selinux,smack,tomoyo,apparmor,bpf LSM: boot arg lsm= *unspecified* LSM: early started: lockdown (enabled) LSM: first ordered: capability (enabled) LSM: builtin ordered: landlock (enabled) LSM: builtin ignored: lockdown (not built into kernel) LSM: builtin ordered: yama (enabled) LSM: builtin ordered: loadpin (enabled) LSM: builtin ordered: safesetid (enabled) LSM: builtin ordered: integrity (enabled) LSM: builtin ordered: selinux (enabled) LSM: builtin ignored: smack (not built into kernel) LSM: builtin ignored: tomoyo (not built into kernel) LSM: builtin ordered: apparmor (enabled) LSM: builtin ordered: bpf (enabled) LSM: exclusive chosen: selinux LSM: exclusive disabled: apparmor LSM: initializing lsm=lockdown,capability,landlock,yama,loadpin, safesetid,integrity,selinux,bpf LSM: cred blob size = 32 LSM: file blob size = 16 LSM: inode blob size = 72 LSM: ipc blob size = 8 LSM: msg_msg blob size = 4 LSM: superblock blob size = 80 LSM: task blob size = 8 LSM: initializing capability LSM: initializing landlock landlock: Up and running. LSM: initializing yama Yama: becoming mindful. LSM: initializing loadpin LoadPin: ready to pin (currently not enforcing) LSM: initializing safesetid LSM: initializing integrity LSM: initializing selinux SELinux: Initializing. LSM: initializing bpf LSM support for eBPF active And some examples of how the lsm.debug ordering report changes... With "lsm.debug security=selinux": LSM: legacy security=selinux LSM: CONFIG_LSM=landlock,lockdown,yama,loadpin,safesetid,integrity, selinux,smack,tomoyo,apparmor,bpf LSM: boot arg lsm= *unspecified* LSM: early started: lockdown (enabled) LSM: first ordered: capability (enabled) LSM: security=selinux disabled: apparmor (only one legacy major LSM) LSM: builtin ordered: landlock (enabled) LSM: builtin ignored: lockdown (not built into kernel) LSM: builtin ordered: yama (enabled) LSM: builtin ordered: loadpin (enabled) LSM: builtin ordered: safesetid (enabled) LSM: builtin ordered: integrity (enabled) LSM: builtin ordered: selinux (enabled) LSM: builtin ignored: smack (not built into kernel) LSM: builtin ignored: tomoyo (not built into kernel) LSM: builtin ordered: apparmor (disabled) LSM: builtin ordered: bpf (enabled) LSM: exclusive chosen: selinux LSM: initializing lsm=lockdown,capability,landlock,yama,loadpin, safesetid,integrity,selinux,bpf With "lsm.debug lsm=integrity,selinux,loadpin,crabability,bpf, loadpin,loadpin": LSM: legacy security= *unspecified* LSM: CONFIG_LSM=landlock,lockdown,yama,loadpin,safesetid,integrity, selinux,smack,tomoyo,apparmor,bpf LSM: boot arg lsm=integrity,selinux,loadpin,capability,bpf,loadpin, loadpin LSM: early started: lockdown (enabled) LSM: first ordered: capability (enabled) LSM: cmdline ordered: integrity (enabled) LSM: cmdline ordered: selinux (enabled) LSM: cmdline ordered: loadpin (enabled) LSM: cmdline ignored: crabability (not built into kernel) LSM: cmdline ordered: bpf (enabled) LSM: cmdline skipped: apparmor (not in requested order) LSM: cmdline skipped: yama (not in requested order) LSM: cmdline skipped: safesetid (not in requested order) LSM: cmdline skipped: landlock (not in requested order) LSM: exclusive chosen: selinux LSM: initializing lsm=lockdown,capability,integrity,selinux,loadpin,bpf Cc: Paul Moore Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Casey Schaufler Acked-by: Mickaël Salaün [PM: line wrapped commit description] Signed-off-by: Paul Moore security/security.c | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) commit a6ceee26fd5ed9b5bd37322b1ca88e4548cee4a3 Author: Alexander Stein Date: Wed Sep 21 09:41:41 2022 +0200 rtc: pcf85063: Fix reading alarm If the alarms are disabled the topmost bit (AEN_*) is set in the alarm registers. This is also interpreted in BCD number leading to this warning: rtc rtc0: invalid alarm value: 2022-09-21T80:80:80 Fix this by masking alarm enabling and reserved bits. Fixes: 05cb3a56ee8c ("rtc: pcf85063: add alarm support") Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20220921074141.3903104-1-alexander.stein@ew.tq-group.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85063.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fe0157ba679dc95407dd5eae6550a4ceaea75040 Author: paulmn Date: Mon Aug 29 14:46:39 2022 +0200 rtc: pcf8523: fix for stop bit Bugfix for an issue detected when a goldcap capacitor gets fully discharged due to a long absence of the power supply, and then recharges again. The RTC failed to continue to keep the real-time clock. This was caused by the incorrect handling of the STOP bit in the RTC internal register. This fix solves the problem. Signed-off-by: paulmn Link: https://lore.kernel.org/r/20220829124639.10906-1-paulmn@axis.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf8523.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 077a4033541fc96fb0a955985aab7d1f353da831 Author: Yu Kuai Date: Tue Nov 15 22:10:54 2022 +0800 block: don't allow a disk link holder to itself After creating a dm device, then user can reload such dm with itself, and dead loop will be triggered because dm keep looking up to itself. Test procedures: 1) dmsetup create test --table "xxx sda", assume dm-0 is created 2) dmsetup suspend test 3) dmsetup reload test --table "xxx dm-0" 4) dmsetup resume test Test result: BUG: TASK stack guard page was hit at 00000000736a261f (stack is 000000008d12c88d..00000000c8dd82d5) stack guard page: 0000 [#1] PREEMPT SMP CPU: 29 PID: 946 Comm: systemd-udevd Not tainted 6.1.0-rc3-next-20221101-00006-g17640ca3b0ee #1295 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014 RIP: 0010:dm_prepare_ioctl+0xf/0x1e0 Code: da 48 83 05 4a 7c 99 0b 01 41 89 c4 eb cd e8 b8 1f 40 00 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 57 48 83 05 a1 5a 99 0b 01 <41> 56 49 89 d6 41 55 4c 8d af 90 02 00 00 9 RSP: 0018:ffffc90002090000 EFLAGS: 00010206 RAX: ffff8881049d6800 RBX: ffff88817e589000 RCX: 0000000000000000 RDX: ffffc90002090010 RSI: ffffc9000209001c RDI: ffff88817e589000 RBP: 00000000484a101d R08: 0000000000000000 R09: 0000000000000007 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000005331 R13: 0000000000005331 R14: 0000000000000000 R15: 0000000000000000 FS: 00007fddf9609200(0000) GS:ffff889fbfd40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc9000208fff8 CR3: 0000000179043000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: dm_blk_ioctl+0x50/0x1c0 ? dm_prepare_ioctl+0xe0/0x1e0 dm_blk_ioctl+0x88/0x1c0 dm_blk_ioctl+0x88/0x1c0 ......(a lot of same lines) dm_blk_ioctl+0x88/0x1c0 dm_blk_ioctl+0x88/0x1c0 blkdev_ioctl+0x184/0x3e0 __x64_sys_ioctl+0xa3/0x110 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fddf7306577 Code: b3 66 90 48 8b 05 11 89 2c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e1 88 8 RSP: 002b:00007ffd0b2ec318 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00005634ef478320 RCX: 00007fddf7306577 RDX: 0000000000000000 RSI: 0000000000005331 RDI: 0000000000000007 RBP: 0000000000000007 R08: 00005634ef4843e0 R09: 0000000000000080 R10: 00007fddf75cfb38 R11: 0000000000000246 R12: 00000000030d4000 R13: 0000000000000000 R14: 0000000000000000 R15: 00005634ef48b800 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:dm_prepare_ioctl+0xf/0x1e0 Code: da 48 83 05 4a 7c 99 0b 01 41 89 c4 eb cd e8 b8 1f 40 00 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 57 48 83 05 a1 5a 99 0b 01 <41> 56 49 89 d6 41 55 4c 8d af 90 02 00 00 9 RSP: 0018:ffffc90002090000 EFLAGS: 00010206 RAX: ffff8881049d6800 RBX: ffff88817e589000 RCX: 0000000000000000 RDX: ffffc90002090010 RSI: ffffc9000209001c RDI: ffff88817e589000 RBP: 00000000484a101d R08: 0000000000000000 R09: 0000000000000007 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000005331 R13: 0000000000005331 R14: 0000000000000000 R15: 0000000000000000 FS: 00007fddf9609200(0000) GS:ffff889fbfd40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc9000208fff8 CR3: 0000000179043000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Kernel panic - not syncing: Fatal exception in interrupt Kernel Offset: disabled ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- Fix the problem by forbidding a disk to create link to itself. Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221115141054.1051801-11-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/holder.c | 3 +++ 1 file changed, 3 insertions(+) commit 3b3449c1e6c3fe19f62607ff4f353f8bb82d5c4e Author: Yu Kuai Date: Tue Nov 15 22:10:53 2022 +0800 block: store the holder kobject in bd_holder_disk We hold a reference to the holder kobject for each bd_holder_disk, so to make the code a bit more robust, use a reference to it instead of the block_device. As long as no one clears ->bd_holder_dir in before freeing the disk, this isn't strictly required, but it does make the code more clear and more robust. Orignally-From: Christoph Hellwig Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221115141054.1051801-10-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/holder.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 62f535e1f061b4c2cc76061b6b59af9f9335ee34 Author: Yu Kuai Date: Tue Nov 15 22:10:52 2022 +0800 block: fix use after free for bd_holder_dir Currently, the caller of bd_link_disk_holer() get 'bdev' by blkdev_get_by_dev(), which will look up 'bdev' by inode number 'dev'. Howerver, it's possible that del_gendisk() can be called currently, and 'bd_holder_dir' can be freed before bd_link_disk_holer() access it, thus use after free is triggered. t1: t2: bdev = blkdev_get_by_dev del_gendisk kobject_put(bd_holder_dir) kobject_free() bd_link_disk_holder Fix the problem by checking disk is still live and grabbing a reference to 'bd_holder_dir' first in bd_link_disk_holder(). Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221115141054.1051801-9-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/holder.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 7abc077788363ac7194aefd355306f8e974feff7 Author: Christoph Hellwig Date: Tue Nov 15 22:10:51 2022 +0800 block: remove delayed holder registration Now that dm has been fixed to track of holder registrations before add_disk, the somewhat buggy block layer code can be safely removed. Signed-off-by: Christoph Hellwig Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20221115141054.1051801-8-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/genhd.c | 4 --- block/holder.c | 72 +++++++++++++++----------------------------------- include/linux/blkdev.h | 5 ---- 3 files changed, 21 insertions(+), 60 deletions(-) commit 1a581b72169968f4154b5793828f3bc28b258b35 Author: Christoph Hellwig Date: Tue Nov 15 22:10:50 2022 +0800 dm: track per-add_disk holder relations in DM dm is a bit special in that it opens the underlying devices. Commit 89f871af1b26 ("dm: delay registering the gendisk") tried to accommodate that by allowing to add the holder to the list before add_gendisk and then just add them to sysfs once add_disk is called. But that leads to really odd lifetime problems and error handling problems as we can't know the state of the kobjects and don't unwind properly. To fix this switch to just registering all existing table_devices with the holder code right after add_disk, and remove them before calling del_gendisk. Fixes: 89f871af1b26 ("dm: delay registering the gendisk") Reported-by: Yu Kuai Signed-off-by: Christoph Hellwig Signed-off-by: Yu Kuai Reviewed-by: Mike Snitzer Link: https://lore.kernel.org/r/20221115141054.1051801-7-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe drivers/md/dm.c | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) commit d563792c8933a810d28ce0f2831f0726c2b15a31 Author: Yu Kuai Date: Tue Nov 15 22:10:49 2022 +0800 dm: make sure create and remove dm device won't race with open and close table open_table_device() and close_table_device() is protected by table_devices_lock, hence use it to protect add_disk() and del_gendisk(). Prepare to track per-add_disk holder relations in dm. Signed-off-by: Yu Kuai Reviewed-by: Mike Snitzer Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221115141054.1051801-6-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe drivers/md/dm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7b5865831c1003122f737df5e16adaa583f1a595 Author: Christoph Hellwig Date: Tue Nov 15 22:10:48 2022 +0800 dm: cleanup close_table_device Take the list unlink and free into close_table_device so that no half torn down table_devices exist. Also remove the check for a NULL bdev as that can't happen - open_table_device never adds a table_device to the list that does not have a valid block_device. Signed-off-by: Christoph Hellwig Signed-off-by: Yu Kuai Reviewed-by: Mike Snitzer Link: https://lore.kernel.org/r/20221115141054.1051801-5-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe drivers/md/dm.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit b9a785d2dc6567b2fd9fc60057a6a945a276927a Author: Christoph Hellwig Date: Tue Nov 15 22:10:47 2022 +0800 dm: cleanup open_table_device Move all the logic for allocation the table_device and linking it into the list into the open_table_device. This keeps the code tidy and ensures that the table_devices only exist in fully initialized state. Signed-off-by: Christoph Hellwig Signed-off-by: Yu Kuai Reviewed-by: Mike Snitzer Link: https://lore.kernel.org/r/20221115141054.1051801-4-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe drivers/md/dm.c | 56 +++++++++++++++++++++++++++----------------------------- 1 file changed, 27 insertions(+), 29 deletions(-) commit 992ec6a92ac315d3301353ff3beb818fcc34e4e4 Author: Christoph Hellwig Date: Tue Nov 15 22:10:46 2022 +0800 dm: remove free_table_devices free_table_devices just warns and frees all table_device structures when the target removal did not remove them. This should never happen, but if it did, just freeing the structure without deleting them from the list or cleaning up the resources would not help at all. So just WARN on a non-empty list instead. Signed-off-by: Christoph Hellwig Signed-off-by: Yu Kuai Reviewed-by: Mike Snitzer Link: https://lore.kernel.org/r/20221115141054.1051801-3-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe drivers/md/dm.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit d90db3b1c8676bc88b4309c5a571333de2263b8e Author: Christoph Hellwig Date: Tue Nov 15 22:10:45 2022 +0800 block: clear ->slave_dir when dropping the main slave_dir reference Zero out the pointer to ->slave_dir so that the holder code doesn't incorrectly treat the object as alive when add_disk failed or after del_gendisk was called. Fixes: 89f871af1b26 ("dm: delay registering the gendisk") Reported-by: Yu Kuai Signed-off-by: Christoph Hellwig Signed-off-by: Yu Kuai Reviewed-by: Mike Snitzer Link: https://lore.kernel.org/r/20221115141054.1051801-2-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/genhd.c | 2 ++ 1 file changed, 2 insertions(+) commit eec79501cce6e8965e92174760c6a9e92d78a038 Author: Riwen Lu Date: Wed Aug 10 15:01:09 2022 +0800 rtc: efi: Add wakeup support Add wakeup support for rtc-efi, so we can wakeup from S3/S4/S5 through rtcwake. Signed-off-by: Riwen Lu Link: https://lore.kernel.org/r/TYWP286MB260191455377CEBD2336557EB1659@TYWP286MB2601.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Alexandre Belloni drivers/rtc/rtc-efi.c | 2 ++ 1 file changed, 2 insertions(+) commit 60cfac17d0a1c28cd41959e95ba1e0ecc47165e7 Author: Vincent Whitchurch Date: Tue Mar 1 14:12:20 2022 +0100 rtc: pcf8563: clear RTC_FEATURE_ALARM if no irq If there is no IRQ hooked up, clear RTC_FEATURE_ALARM to make the core ensure that userspace is made aware that alarms are not supported. Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20220301131220.4011810-1-vincent.whitchurch@axis.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf8563.c | 2 ++ 1 file changed, 2 insertions(+) commit a3b4c2f9b03917d5d640bc6e3f42c24695967552 Author: Lucas Stach Date: Fri Sep 9 11:20:44 2022 +0200 drm/etnaviv: switch to PFN mappings There is no reason to use page based mappings, as the established mappings are special driver mappings anyways and should not be handled like normal pages. Be consistent with what other drivers do and use raw PFN based mappings. Signed-off-by: Lucas Stach Reviewed-by: Daniel Vetter drivers/gpu/drm/etnaviv/etnaviv_gem.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 1f5896ca6e930050e0f978a7ec7f6fc92ea15546 Author: Marco Felsch Date: Sat Sep 24 14:16:28 2022 +0200 drm/etnaviv: add HWDB entry for GC7000 r6203 The GPU is found on the NXP i.MX8MN SoC. The feature bits are taken from the NXP downstream kernel driver 6.4.3.p2. Signed-off-by: Marco Felsch Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_hwdb.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit a4ff8e7a71601321f7bf7b58ede664dc0d774274 Author: Li Ming Date: Wed Nov 16 09:56:37 2022 +0800 PCI/DOE: Fix maximum data object length miscalculation Per PCIe r6.0, sec 6.30.1, a data object Length of 0x0 indicates 2^18 DWORDs (256K DW or 1MB) being transferred. Adjust the value of data object length for this case on both sending side and receiving side. Don't bother checking whether Length is greater than SZ_1M because all values of the 18-bit Length field are valid, and it is impossible to represent anything larger than SZ_1M: 0x00000 256K DW (1M bytes) 0x00001 1 DW (4 bytes) ... 0x3ffff 256K-1 DW (1M - 4 bytes) [bhelgaas: commit log] Link: https://lore.kernel.org/r/20221116015637.3299664-1-ming4.li@intel.com Fixes: 9d24322e887b ("PCI/DOE: Add DOE mailbox support functions") Signed-off-by: Li Ming Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Lukas Wunner Cc: stable@vger.kernel.org # v6.0+ drivers/pci/doe.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit d82303df06481235fe7cbaf605075e0c2c87e99b Author: Jacob Keller Date: Mon Nov 14 13:37:01 2022 -0800 mlxsw: update adjfine to use adjust_by_scaled_ppm The mlxsw adjfine implementation in the spectrum_ptp.c file converts scaled_ppm into ppb before updating a cyclecounter multiplier using the standard "base * ppb / 1billion" calculation. This can be re-written to use adjust_by_scaled_ppm, directly using the scaled parts per million and reducing the amount of code required to express this calculation. We still calculate the parts per billion for passing into mlxsw_sp_ptp_phc_adjfreq because this function requires the input to be in parts per billion. Signed-off-by: Jacob Keller Cc: Amit Cohen Cc: Petr Machata Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Link: https://lore.kernel.org/r/20221114213701.815132-1-jacob.e.keller@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit cab75e1c8e42ebb4bb386247a928af6ab412e82b Author: Nathan Chancellor Date: Tue Nov 8 10:01:03 2022 -0700 cpufreq: ACPI: Remove unused variables 'acpi_cpufreq_online' and 'ret' Clang warns: drivers/cpufreq/acpi-cpufreq.c:970:24: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized] acpi_cpufreq_online = ret; ^~~ drivers/cpufreq/acpi-cpufreq.c:960:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 1 error generated. Both ret and acpi_cpufreq_online are now unused so they can be safely removed, clearing up the warning. Fixes: 13fdbc8b8da6 ("cpufreq: ACPI: Defer setting boost MSRs") Link: https://github.com/ClangBuiltLinux/linux/issues/1757 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Rafael J. Wysocki drivers/cpufreq/acpi-cpufreq.c | 6 ------ 1 file changed, 6 deletions(-) commit 86fdd15e10e404e70ecb2a3bff24d70356d42b36 Author: Zeng Heng Date: Tue Nov 15 10:37:12 2022 +0800 iio: fix memory leak in iio_device_register_eventset() When iio_device_register_sysfs_group() returns failed, iio_device_register_eventset() needs to free attrs array. Otherwise, kmemleak would scan & report memory leak as below: unreferenced object 0xffff88810a1cc3c0 (size 32): comm "100-i2c-vcnl302", pid 728, jiffies 4295052307 (age 156.027s) backtrace: __kmalloc+0x46/0x1b0 iio_device_register_eventset at drivers/iio/industrialio-event.c:541 __iio_device_register at drivers/iio/industrialio-core.c:1959 __devm_iio_device_register at drivers/iio/industrialio-core.c:2040 Fixes: 32f171724e5c ("iio: core: rework iio device group creation") Signed-off-by: Zeng Heng Link: https://lore.kernel.org/r/20221115023712.3726854-1-zengheng4@huawei.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/industrialio-event.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 63a3bf5e8d9e79ce456c8f73d4395a5a51d841b1 Author: Arnaldo Carvalho de Melo Date: Wed Nov 16 15:43:34 2022 -0300 libperf: Add missing 'struct perf_cpu_map' forward declaration to perf/cpumap.h The perf/cpumap.h header is getting the 'struct perf_cpu_map' forward declaration by luck, add it. Acked-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/include/perf/cpumap.h | 2 ++ 1 file changed, 2 insertions(+) commit 35fef9b471c70413f8277984920129ddf601f5e9 Author: Arnaldo Carvalho de Melo Date: Wed Nov 16 15:40:46 2022 -0300 libperf: Remove recursive perf/cpumap.h include from perf/cpumap.h It just hits the header guard, becoming a no-op, ditch it. Acked-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/include/perf/cpumap.h | 1 - 1 file changed, 1 deletion(-) commit 746bd29e348f99b44c14cb2b2a57f1d3efb66538 Author: Ian Rogers Date: Tue Nov 15 23:22:11 2022 -0800 perf build: Use tools/lib headers from install path Switch -I from tools/lib to the install path for the tools/lib libraries. Add the include_headers build targets to prepare target, as well as pmu-events.c compilation that dependes on libperf. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-15-irogers@google.com Link: http://lore.kernel.org/lkml/20221116072211.2837834-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 -- tools/perf/Makefile.perf | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) commit c4d9d95f84d7f4758db76f358b03a0d6809c929b Author: Ian Rogers Date: Wed Nov 9 10:49:13 2022 -0800 perf cpumap: Tidy libperf includes Use public API when possible, don't include internal API in header files in evsel.h. Fix any related breakages. Committer note: There was one missing case, when building for arm64: arch/arm64/util/pmu.c: In function 'pmu_events_table__find': arch/arm64/util/pmu.c:18:30: error: invalid use of undefined type 'struct perf_cpu_map' 18 | if (pmu->cpus->nr != cpu__max_cpu().cpu) | ^~ Fix it by adding one more exception, including Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-14-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/util/pmu.c | 1 + tools/perf/tests/cpumap.c | 2 +- tools/perf/util/auxtrace.h | 2 +- tools/perf/util/cpumap.c | 1 + tools/perf/util/cpumap.h | 2 +- tools/perf/util/evsel.h | 2 -- 6 files changed, 5 insertions(+), 5 deletions(-) commit 7812d80c0f89c2b610558e09647736b6632beb08 Author: David Matlack Date: Wed Oct 12 09:57:29 2022 -0700 KVM: selftests: Rename perf_test_util symbols to memstress Replace the perf_test_ prefix on symbol names with memstress_ to match the new file name. "memstress" better describes the functionality proveded by this library, which is to provide functionality for creating and running a VM that stresses VM memory by reading and writing to guest memory on all vCPUs in parallel. "memstress" also contains the same number of chracters as "perf_test", making it a drop-in replacement in symbols, e.g. function names, without impacting line lengths. Also the lack of underscore between "mem" and "stress" makes it clear "memstress" is a noun. Signed-off-by: David Matlack Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221012165729.3505266-4-dmatlack@google.com Signed-off-by: Sean Christopherson .../selftests/kvm/access_tracking_perf_test.c | 18 +++--- tools/testing/selftests/kvm/demand_paging_test.c | 18 +++--- tools/testing/selftests/kvm/dirty_log_perf_test.c | 34 +++++------ tools/testing/selftests/kvm/include/memstress.h | 30 +++++----- tools/testing/selftests/kvm/lib/memstress.c | 68 +++++++++++----------- tools/testing/selftests/kvm/lib/x86_64/memstress.c | 32 +++++----- .../kvm/memslot_modification_stress_test.c | 12 ++-- 7 files changed, 106 insertions(+), 106 deletions(-) commit a008a3351feaffdcf97a2bcf90b789626585258b Author: David Matlack Date: Wed Oct 12 09:57:28 2022 -0700 KVM: selftests: Rename pta (short for perf_test_args) to args Rename the local variables "pta" (which is short for perf_test_args) for args. "pta" is not an obvious acronym and using "args" mirrors "vcpu_args". Suggested-by: Sean Christopherson Signed-off-by: David Matlack Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221012165729.3505266-3-dmatlack@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/lib/memstress.c | 60 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 9fda6753c9dd4594e2c66c56b48b56a326ee686f Author: David Matlack Date: Wed Oct 12 09:57:27 2022 -0700 KVM: selftests: Rename perf_test_util.[ch] to memstress.[ch] Rename the perf_test_util.[ch] files to memstress.[ch]. Symbols are renamed in the following commit to reduce the amount of churn here in hopes of playiing nice with git's file rename detection. The name "memstress" was chosen to better describe the functionality proveded by this library, which is to create and run a VM that reads/writes to guest memory on all vCPUs in parallel. "memstress" also contains the same number of chracters as "perf_test", making it a drop-in replacement in symbols, e.g. function names, without impacting line lengths. Also the lack of underscore between "mem" and "stress" makes it clear "memstress" is a noun. Signed-off-by: David Matlack Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221012165729.3505266-2-dmatlack@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/Makefile | 4 ++-- tools/testing/selftests/kvm/access_tracking_perf_test.c | 2 +- tools/testing/selftests/kvm/demand_paging_test.c | 2 +- tools/testing/selftests/kvm/dirty_log_perf_test.c | 2 +- .../selftests/kvm/include/{perf_test_util.h => memstress.h} | 8 ++++---- tools/testing/selftests/kvm/lib/{perf_test_util.c => memstress.c} | 2 +- .../selftests/kvm/lib/x86_64/{perf_test_util.c => memstress.c} | 4 ++-- tools/testing/selftests/kvm/memslot_modification_stress_test.c | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) commit c967a4752ac66cc0ef8c0b1f4914151ca8758709 Author: Colton Lewis Date: Mon Nov 7 18:22:08 2022 +0000 KVM: selftests: randomize page access order Create the ability to randomize page access order with the -a argument. This includes the possibility that the same pages may be hit multiple times during an iteration or not at all. Population has random access as false to ensure all pages will be touched by population and avoid page faults in late dirty memory that would pollute the test results. Signed-off-by: Colton Lewis Reviewed-by: David Matlack Link: https://lore.kernel.org/r/20221107182208.479157-5-coltonlewis@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/dirty_log_perf_test.c | 11 +++++++++-- tools/testing/selftests/kvm/include/perf_test_util.h | 3 +++ tools/testing/selftests/kvm/lib/perf_test_util.c | 15 ++++++++++++++- 3 files changed, 26 insertions(+), 3 deletions(-) commit 6864c6442f4dfa02c7cf48199cf3ea6bb1fe74ed Author: Colton Lewis Date: Mon Nov 7 18:22:07 2022 +0000 KVM: selftests: randomize which pages are written vs read Randomize which pages are written vs read using the random number generator. Change the variable wr_fract and associated function calls to write_percent that now operates as a percentage from 0 to 100 where X means each page has an X% chance of being written. Change the -f argument to -w to reflect the new variable semantics. Keep the same default of 100% writes. Population always uses 100% writes to ensure all memory is actually populated and not just mapped to the zero page. The prevents expensive copy-on-write faults from occurring during the dirty memory iterations below, which would pollute the performance results. Each vCPU calculates its own random seed by adding its index to the seed provided. Signed-off-by: Colton Lewis Reviewed-by: David Matlack Link: https://lore.kernel.org/r/20221107182208.479157-4-coltonlewis@google.com Signed-off-by: Sean Christopherson .../selftests/kvm/access_tracking_perf_test.c | 2 +- tools/testing/selftests/kvm/dirty_log_perf_test.c | 37 +++++++++++++++------- .../testing/selftests/kvm/include/perf_test_util.h | 4 +-- tools/testing/selftests/kvm/lib/perf_test_util.c | 13 +++++--- 4 files changed, 36 insertions(+), 20 deletions(-) commit b13d48408e9f0aa80f3d9f93960aa49bd0da7af8 Author: Andre Przywara Date: Thu Nov 10 00:55:07 2022 +0000 ARM: dts: sunxi: H3/H5: Add phys property to USB HCI0 As many other Allwinner SoCs from the last years, the first USB host controller pair in the Allwinner H3 and H5 chips share a USB PHY with the MUSB OTG controller. This is probably the reason why we didn't have a "phys" property in those host controller nodes. This works fine as long as the MUSB controller driver is loaded, as this takes care of the proper PHY setup, including the muxing between MUSB and the HCI. However this requires the MUSB driver to be enabled and loaded, and also upsets U-Boot, which cannot use a HCI port without a "phys" property. Similar to what we did in commit cc72570747e4 ("arm64: dts: allwinner: A64: properly connect USB PHY to port 0"), add the "phys" property to the OHCI0 and EHCI0 DT nodes in the shared H3/H5 .dtsi file. This is not only the proper description of the hardware, but also avoids a nasty error message in U-Boot triggered by a recent patch. (The port never worked in host mode, but the error was suppressed due to a bug.) When using the MUSB port in OTG mode, this also fixes host mode switching, so people can use OTG adapters to connect a USB device to port 0. Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221110005507.19464-1-andre.przywara@arm.com Signed-off-by: Jernej Skrabec arch/arm/boot/dts/sunxi-h3-h5.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit fb1836c91317e0770950260dfa91eb9b2170cb27 Author: Hans de Goede Date: Mon Nov 14 15:44:59 2022 +0100 ACPI: video: Prefer native over vendor When available prefer native backlight control over vendor backlight control. Testing has shown that there are quite a few laptop models which rely on native backlight control (they don't have ACPI video bus backlight control) and on which acpi_osi_is_win8() returns false. Currently __acpi_video_get_backlight_type() returns vendor on these laptops, leading to an empty /sys/class/backlight. As a workaround for this acpi_video_backlight_use_native() has been temporarily changed to always return true. This re-introduces the problem of having multiple backlight devices under /sys/class/backlight for a single panel. Change __acpi_video_get_backlight_type() to prefer native over vendor when available. So that it returns native on these models. And change acpi_video_backlight_use_native() back to only return true when __acpi_video_get_backlight_type() returns native. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit a5df42521f328b45c9d89c13740e747be08ac66e Author: Hans de Goede Date: Mon Nov 14 15:44:58 2022 +0100 ACPI: video: Simplify __acpi_video_get_backlight_type() Simplify __acpi_video_get_backlight_type() removing a nested if which makes the flow harder to follow. This also results in having only 1 exit point with return acpi_backlight_native instead of 2. Note this drops the (video_caps & ACPI_VIDEO_BACKLIGHT) check from the if (acpi_osi_is_win8() && native_available) return native path. Windows 8's hardware certification requirements include that there must be ACPI video bus backlight control, so the ACPI_VIDEO_BACKLIGHT check is redundant. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit f5a6ff923d4a1d639da36228d00e95ff67d417f0 Author: Hans de Goede Date: Mon Nov 14 15:44:57 2022 +0100 ACPI: video: Add force_native quirk for Sony Vaio VPCY11S1E The Sony Vaio VPCY11S1E advertises both native and ACPI video backlight control interfaces, but only the native interface works and the default heuristics end up picking ACPI video on this model. Add a video_detect_force_native DMI quirk for this. Reported-by: Stefan Joosten Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 23735543eb228c604e59f99f2f5d13aa507e5db2 Author: Hans de Goede Date: Mon Nov 14 15:44:56 2022 +0100 ACPI: video: Add force_vendor quirk for Sony Vaio PCG-FRV35 The Sony Vaio PCG-FRV35 advertises both native and vendor backlight control interfaces. With the upcoming changes to prefer native over vendor acpi_video_get_backlight_type() will start returning native on these laptops. But the native radeon_bl0 interface does not work, where as the sony vendor interface does work. Add a quirk to force use of the vendor interface. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 84d56f326a8ef0071df8c0c3b983b9e2c3b73006 Author: Hans de Goede Date: Mon Nov 14 15:44:55 2022 +0100 ACPI: video: Change Sony Vaio VPCEH3U1E quirk to force_native According to: https://bugzilla.kernel.org/show_bug.cgi?id=202401 the Sony Vaio VPCEH3U1E quirk was added to disable the acpi_video0 backlight interface because that was not working, so that userspace will pick the actually working native nv_backlight interface instead. With the new kernel behavior of hiding native interfaces unless acpi_video_get_backlight_type() returns native, the current video_detect_force_vendor quirk will cause the working nv_backlight interface will be disabled too. Change the quirk to video_detect_force_native to get the desired result of only registering the nv_backlight interface. After this all currently remaining force_vendor quirks in video_detect_dmi_table[] are there to prefer a vendor interface over a non working ACPI video interface, add a comment to document this. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 9f7dd272ff9338f1f43c7a837d5a7ee67811d552 Author: Hans de Goede Date: Mon Nov 14 15:44:54 2022 +0100 ACPI: video: Change GIGABYTE GB-BXBT-2807 quirk to force_none The GIGABYTE GB-BXBT-2807 DMI quirk was added by commit 25417185e9b5 ("ACPI: video: Add DMI quirk for GIGABYTE GB-BXBT-2807") which says the following in its commit message: "The GIGABYTE GB-BXBT-2807 is a mini-PC which uses off the shelf components, like an Intel GPU which is meant for mobile systems. As such, it, by default, has a backlight controller exposed. Unfortunately, the backlight controller only confuses userspace, which sees the existence of a backlight device node and has the unrealistic belief that there is actually a backlight there! Add a DMI quirk to force the backlight off on this system." So in essence this quirk was using a video_detect_force_vendor quirk to disable backlight control. Now a days we have a specific "none" backlight type for this. Change the quirk to video_detect_force_none and group it together with the other force_none quirks. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 60f1fac20bee4bb145c271e983d42fce1e337661 Author: Hans de Goede Date: Mon Nov 14 15:44:53 2022 +0100 ACPI: video: Add a few bugtracker links to DMI quirks Add a couple of missing bugtracker links to DMI quirks Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f64603c9729af406167cb9beb66687b1abc4196e Author: Andre Przywara Date: Mon Nov 7 00:54:27 2022 +0000 clk: sunxi-ng: f1c100s: Add IR mod clock For some reason the mod clock for the Allwinner F1C100s CIR (infrared receiver) peripheral was not modeled in the CCU driver. Add the clock description to the list, and wire it up in the clock list. By assigning a new clock ID at the end, it extends the number of clocks. This allows to use the CIR peripheral on any F1C100s series board. Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221107005433.11079-5-andre.przywara@arm.com Signed-off-by: Jernej Skrabec drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c | 11 ++++++++++- drivers/clk/sunxi-ng/ccu-suniv-f1c100s.h | 2 +- include/dt-bindings/clock/suniv-ccu-f1c100s.h | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) commit d550f6b0a7b5c1fccaa696eb5e457cef45b0467c Author: Wei Li Date: Tue Nov 8 17:43:35 2022 +0800 clk: sunxi-ng: v3s: Correct the header guard of ccu-sun8i-v3s.h Rename the header guard of ccu-sun8i-v3s.h from _CCU_SUN8I_H3_H_ to _CCU_SUN8I_V3S_H_ what corresponding with the file name. Fixes: d0f11d14b0bc ("clk: sunxi-ng: add support for V3s CCU") Signed-off-by: Wei Li Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221108094335.3597008-1-liwei391@huawei.com Signed-off-by: Jernej Skrabec drivers/clk/sunxi-ng/ccu-sun8i-v3s.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dee020350091498fdeb919e35f37bf3f3dca1bdd Author: Andre Przywara Date: Mon Nov 7 00:54:30 2022 +0000 ARM: dts: suniv: f1c100s: add LRADC node The Allwinner F1C100s series of SoCs contain a LRADC (aka. KEYADC) compatible to the version in other SoCs. The manual doesn't mention the ratio of the input voltage that is used, but comparing actual measurements with the values in the register suggests that it is 3/4 of Vref. Add the DT node describing the base address and interrupt. As in the older SoCs, there is no explicit reset or clock gate, also there is a dedicated, non-multiplexed pin, so need for more properties. Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221107005433.11079-8-andre.przywara@arm.com Signed-off-by: Jernej Skrabec arch/arm/boot/dts/suniv-f1c100s.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit e1d7dc52c3e629540401bf88cbdd8acaa5aea9de Author: Andre Przywara Date: Mon Nov 7 00:54:29 2022 +0000 ARM: dts: suniv: f1c100s: add CIR DT node The CIR (infrared receiver) controller in the Allwinner F1C100s series of SoCs is compatible to the ones used in other Allwinner SoCs. Add the DT node describing the resources of the controller. There are multiple possible pinmuxes, but none as them seem to be an obvious choice, so refrain from adding any pincontroller subnodes for now. Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221107005433.11079-7-andre.przywara@arm.com Signed-off-by: Jernej Skrabec arch/arm/boot/dts/suniv-f1c100s.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b9595d121143ef471ac1452d82491d300bf79238 Author: Andre Przywara Date: Mon Nov 7 00:54:28 2022 +0000 dt-bindings: media: IR: Add F1C100s IR compatible string The CIR controller in the Allwinner F1C100s series of SoCs is compatible to the ones used in other Allwinner SoCs. Add the respective compatible name to the existing IR binding, and pair it with the A31 fallback compatible string. Signed-off-by: Andre Przywara Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221107005433.11079-6-andre.przywara@arm.com Signed-off-by: Jernej Skrabec Documentation/devicetree/bindings/media/allwinner,sun4i-a10-ir.yaml | 1 + 1 file changed, 1 insertion(+) commit 16245374b6b3663f4752a46c8b8a5370be7a6532 Author: Andre Przywara Date: Mon Nov 7 00:54:26 2022 +0000 ARM: dts: suniv: f1c100s: add I2C DT nodes The Allwinner F1C100s series of SoCs contain three I2C controllers compatible to the ones used in other Allwinner SoCs. Add the DT nodes describing the resources of the controllers. At least one board connects an on-board I2C chip to PD0/PD12 (I2C0), so include those pins already, to simplify referencing them later. Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221107005433.11079-4-andre.przywara@arm.com Signed-off-by: Jernej Skrabec arch/arm/boot/dts/suniv-f1c100s.dtsi | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 77eac2b9e1d86f1abef3cba4fee54f35e186c954 Author: Andre Przywara Date: Mon Nov 7 00:54:25 2022 +0000 ARM: dts: suniv: f1c100s: add PWM node The Allwinner F1C100s family of SoCs contain a PWM controller compatible to the one used in the A20 chip. Add the DT node so that any users can simply enable it in their board DT. Signed-off-by: Andre Przywara Acked-by: Thierry Reding Reviewed-by: Uwe Kleine-König Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221107005433.11079-3-andre.przywara@arm.com Signed-off-by: Jernej Skrabec arch/arm/boot/dts/suniv-f1c100s.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 30120faa1e8ee4725eb850d10ce2efdd29262a85 Author: Andre Przywara Date: Mon Nov 7 00:54:24 2022 +0000 dt-bindings: pwm: allwinner,sun4i-a10: Add F1C100s compatible The PWM controller in the Allwinner F1C100s series of SoCs is the same as in the A20 SoCs, so allow using that as the fallback name. Join the V3s compatible string in an enum on the way. Signed-off-by: Andre Przywara Acked-by: Rob Herring Acked-by: Thierry Reding Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221107005433.11079-2-andre.przywara@arm.com Signed-off-by: Jernej Skrabec Documentation/devicetree/bindings/pwm/allwinner,sun4i-a10-pwm.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 26edb30dd1c0c9be11fa676b4f330ada7b794ba6 Author: Gabriel Krisman Bertazi Date: Tue Nov 15 17:45:53 2022 -0500 sbitmap: Try each queue to wake up at least one waiter Jan reported the new algorithm as merged might be problematic if the queue being awaken becomes empty between the waitqueue_active inside sbq_wake_ptr check and the wake up. If that happens, wake_up_nr will not wake up any waiter and we loose too many wake ups. In order to guarantee progress, we need to wake up at least one waiter here, if there are any. This now requires trying to wake up from every queue. Instead of walking through all the queues with sbq_wake_ptr, this call moves the wake up inside that function. In a previous version of the patch, I found that updating wake_index several times when walking through queues had a measurable overhead. This ensures we only update it once, at the end. Fixes: 4f8126bb2308 ("sbitmap: Use single per-bitmap counting to wake up queued tags") Reported-by: Jan Kara Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221115224553.23594-4-krisman@suse.de Signed-off-by: Jens Axboe lib/sbitmap.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit ee7dc86b6d3e3b86c2c487f713eda657850de238 Author: Gabriel Krisman Bertazi Date: Tue Nov 15 17:45:52 2022 -0500 wait: Return number of exclusive waiters awaken Sbitmap code will need to know how many waiters were actually woken for its batched wakeups implementation. Return the number of woken exclusive waiters from __wake_up() to facilitate that. Suggested-by: Jan Kara Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221115224553.23594-3-krisman@suse.de Signed-off-by: Jens Axboe include/linux/wait.h | 2 +- kernel/sched/wait.c | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) commit 976570b4ecd30d3ec6e1b0910da8e5edc591f2b6 Author: Gabriel Krisman Bertazi Date: Tue Nov 15 17:45:51 2022 -0500 sbitmap: Advance the queue index before waking up a queue When a queue is awaken, the wake_index written by sbq_wake_ptr currently keeps pointing to the same queue. On the next wake up, it will thus retry the same queue, which is unfair to other queues, and can lead to starvation. This patch, moves the index update to happen before the queue is returned, such that it will now try a different queue first on the next wake up, improving fairness. Fixes: 4f8126bb2308 ("sbitmap: Use single per-bitmap counting to wake up queued tags") Reported-by: Jan Kara Reviewed-by: Jan Kara Signed-off-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20221115224553.23594-2-krisman@suse.de Signed-off-by: Jens Axboe lib/sbitmap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 470373e888f494a52f9916bf3eeea41fe819d031 Author: Christoph Hellwig Date: Wed Nov 16 14:20:35 2022 +0100 block: remove blkdev_writepages While the block device code should switch to implementing ->writepages instead of ->writepage eventually, the current implementation is entirely pointless as it does the same looping over ->writepage as the generic code if no ->writepages is present. Remove blkdev_writepages so that we can eventually unexport generic_writepages. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221116132035.2192924-1-hch@lst.de Signed-off-by: Jens Axboe block/fops.c | 7 ------- 1 file changed, 7 deletions(-) commit f11aa24bdbc66a10378d28ee962b95426e8d2a09 Author: Colton Lewis Date: Mon Nov 7 18:22:06 2022 +0000 KVM: selftests: create -r argument to specify random seed Create a -r argument to specify a random seed. If no argument is provided, the seed defaults to 1. The random seed is set with perf_test_set_random_seed() and must be set before guest_code runs to apply. Signed-off-by: Colton Lewis Reviewed-by: David Matlack Link: https://lore.kernel.org/r/20221107182208.479157-3-coltonlewis@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/dirty_log_perf_test.c | 12 ++++++++++-- tools/testing/selftests/kvm/include/perf_test_util.h | 2 ++ tools/testing/selftests/kvm/lib/perf_test_util.c | 6 ++++++ 3 files changed, 18 insertions(+), 2 deletions(-) commit b31f21a7e97eee501db86714868d84377e68e4df Author: Colton Lewis Date: Mon Nov 7 18:22:05 2022 +0000 KVM: selftests: implement random number generator for guest code Implement random number generator for guest code to randomize parts of the test, making it less predictable and a more accurate reflection of reality. The random number generator chosen is the Park-Miller Linear Congruential Generator, a fancy name for a basic and well-understood random number generator entirely sufficient for this purpose. Signed-off-by: Colton Lewis Reviewed-by: Sean Christopherson Reviewed-by: David Matlack Link: https://lore.kernel.org/r/20221107182208.479157-2-coltonlewis@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/include/test_util.h | 7 +++++++ tools/testing/selftests/kvm/lib/test_util.c | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) commit d886724ea81c6a4dc5e37d4ee09287a31ab8335e Author: Vipin Sharma Date: Thu Nov 3 12:17:19 2022 -0700 KVM: selftests: Allowing running dirty_log_perf_test on specific CPUs Add a command line option, -c, to pin vCPUs to physical CPUs (pCPUs), i.e. to force vCPUs to run on specific pCPUs. Requirement to implement this feature came in discussion on the patch "Make page tables for eager page splitting NUMA aware" https://lore.kernel.org/lkml/YuhPT2drgqL+osLl@google.com/ This feature is useful as it provides a way to analyze performance based on the vCPUs and dirty log worker locations, like on the different NUMA nodes or on the same NUMA nodes. To keep things simple, implementation is intentionally very limited, either all of the vCPUs will be pinned followed by an optional main thread or nothing will be pinned. Signed-off-by: Vipin Sharma Suggested-by: David Matlack Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221103191719.1559407-8-vipinsh@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/dirty_log_perf_test.c | 25 +++++++++- .../testing/selftests/kvm/include/kvm_util_base.h | 4 ++ .../testing/selftests/kvm/include/perf_test_util.h | 4 ++ tools/testing/selftests/kvm/lib/kvm_util.c | 54 ++++++++++++++++++++++ tools/testing/selftests/kvm/lib/perf_test_util.c | 8 +++- 5 files changed, 92 insertions(+), 3 deletions(-) commit 0001725d0f9b5d749540021befb67c117d566416 Author: Vipin Sharma Date: Thu Nov 3 12:17:18 2022 -0700 KVM: selftests: Add atoi_positive() and atoi_non_negative() for input validation Many KVM selftests take command line arguments which are supposed to be positive (>0) or non-negative (>=0). Some tests do these validation and some missed adding the check. Add atoi_positive() and atoi_non_negative() to validate inputs in selftests before proceeding to use those values. Signed-off-by: Vipin Sharma Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221103191719.1559407-7-vipinsh@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/aarch64/arch_timer.c | 25 +++++----------------- .../selftests/kvm/aarch64/debug-exceptions.c | 2 +- tools/testing/selftests/kvm/aarch64/vgic_irq.c | 2 +- .../selftests/kvm/access_tracking_perf_test.c | 2 +- tools/testing/selftests/kvm/demand_paging_test.c | 4 ++-- tools/testing/selftests/kvm/dirty_log_perf_test.c | 12 +++++------ tools/testing/selftests/kvm/include/test_util.h | 16 ++++++++++++++ tools/testing/selftests/kvm/kvm_page_table_test.c | 4 ++-- .../testing/selftests/kvm/max_guest_memory_test.c | 9 +++----- .../kvm/memslot_modification_stress_test.c | 10 ++++----- tools/testing/selftests/kvm/memslot_perf_test.c | 22 +++++-------------- .../testing/selftests/kvm/set_memory_region_test.c | 2 +- .../selftests/kvm/x86_64/nx_huge_pages_test.c | 3 +-- 13 files changed, 47 insertions(+), 66 deletions(-) commit c15bdebb32ddc73faac5e5180d6997b360e81619 Author: Vipin Sharma Date: Thu Nov 3 12:17:17 2022 -0700 KVM: selftests: Shorten the test args in memslot_modification_stress_test.c Change test args memslot_modification_delay and nr_memslot_modifications to delay and nr_iterations for simplicity. Signed-off-by: Vipin Sharma Suggested-by: Sean Christopherson Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221103191719.1559407-6-vipinsh@google.com Signed-off-by: Sean Christopherson .../selftests/kvm/memslot_modification_stress_test.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 69a62e2004b8bc3f9572f88a592b168345a6bbf9 Author: Vipin Sharma Date: Thu Nov 3 12:17:16 2022 -0700 KVM: selftests: Use SZ_* macros from sizes.h in max_guest_memory_test.c Replace size_1gb defined in max_guest_memory_test.c with the SZ_1G, SZ_2G and SZ_4G from linux/sizes.h header file. Signed-off-by: Vipin Sharma Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221103191719.1559407-5-vipinsh@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/max_guest_memory_test.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 018ea2d71a43372cb984021f03514dc6dd3d46df Author: Vipin Sharma Date: Thu Nov 3 12:17:15 2022 -0700 KVM: selftests: Add atoi_paranoid() to catch errors missed by atoi() atoi() doesn't detect errors. There is no way to know that a 0 return is correct conversion or due to an error. Introduce atoi_paranoid() to detect errors and provide correct conversion. Replace all atoi() calls with atoi_paranoid(). Signed-off-by: Vipin Sharma Suggested-by: David Matlack Suggested-by: Sean Christopherson Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221103191719.1559407-4-vipinsh@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/aarch64/arch_timer.c | 8 ++++---- .../testing/selftests/kvm/aarch64/debug-exceptions.c | 2 +- tools/testing/selftests/kvm/aarch64/vgic_irq.c | 6 +++--- .../testing/selftests/kvm/access_tracking_perf_test.c | 2 +- tools/testing/selftests/kvm/demand_paging_test.c | 2 +- tools/testing/selftests/kvm/dirty_log_perf_test.c | 8 ++++---- tools/testing/selftests/kvm/include/test_util.h | 2 ++ tools/testing/selftests/kvm/kvm_page_table_test.c | 2 +- tools/testing/selftests/kvm/lib/test_util.c | 19 +++++++++++++++++++ tools/testing/selftests/kvm/max_guest_memory_test.c | 6 +++--- .../selftests/kvm/memslot_modification_stress_test.c | 6 +++--- tools/testing/selftests/kvm/memslot_perf_test.c | 10 +++++----- tools/testing/selftests/kvm/set_memory_region_test.c | 2 +- .../testing/selftests/kvm/x86_64/nx_huge_pages_test.c | 4 ++-- 14 files changed, 50 insertions(+), 29 deletions(-) commit 0eb88a4121861ce3d5f925a183abb13ad954dbe6 Author: Vipin Sharma Date: Thu Nov 3 12:17:14 2022 -0700 KVM: selftests: Put command line options in alphabetical order in dirty_log_perf_test There are 13 command line options and they are not in any order. Put them in alphabetical order to make it easy to add new options. No functional change intended. Signed-off-by: Vipin Sharma Reviewed-by: Wei Wang Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221103191719.1559407-3-vipinsh@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/dirty_log_perf_test.c | 36 ++++++++++++----------- 1 file changed, 19 insertions(+), 17 deletions(-) commit c5c4f72ad4faab641cb852fdd890e8a64cb39f24 Author: Vipin Sharma Date: Thu Nov 3 12:17:13 2022 -0700 KVM: selftests: Add missing break between -e and -g option in dirty_log_perf_test Passing -e option (Run VCPUs while dirty logging is being disabled) in dirty_log_perf_test also unintentionally enables -g (Do not enable KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2). Add break between two switch case logic. Fixes: cfe12e64b065 ("KVM: selftests: Add an option to run vCPUs while disabling dirty logging") Signed-off-by: Vipin Sharma Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221103191719.1559407-2-vipinsh@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/dirty_log_perf_test.c | 1 + 1 file changed, 1 insertion(+) commit b186b2d9dc1c4f415994f6dac537f6a3ed304638 Author: Daniele Ceraolo Spurio Date: Thu Nov 10 16:18:32 2022 -0800 drm/i915/guc: add the GSC CS to the GuC capture list For the GSC engine we only want to capture the instance regs. Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20221111001832.4144910-1-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 07db5bd23571ee9f3da518f81b03a8eb3c44fc6c Author: Alan Previn Date: Mon Nov 7 20:56:28 2022 -0800 drm/i915/pxp: Separate PXP FW interface structures for both v42 and 43 Previously, we only used PXP FW interface version-42 structures for PXP arbitration session on ADL/TGL products and version-43 for HuC authentication on DG2. That worked fine despite not differentiating such versioning of the PXP firmware interaction structures. This was okay back then because the only commands used via version 42 was not used via version 43 and vice versa. With MTL, we'll need both these versions side by side for the same commands (PXP-session) with the older platform feature support. That said, let's create separate files to define the structures and definitions for both version-42 and 43 of PXP FW interfaces. Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221108045628.4187260-2-alan.previn.teres.alexis@intel.com .../gpu/drm/i915/pxp/intel_pxp_cmd_interface_42.h | 28 +++++++++++ .../gpu/drm/i915/pxp/intel_pxp_cmd_interface_43.h | 26 ++++++++++ .../gpu/drm/i915/pxp/intel_pxp_cmd_interface_cmn.h | 35 +++++++++++++ drivers/gpu/drm/i915/pxp/intel_pxp_huc.c | 10 ++-- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 12 ++--- drivers/gpu/drm/i915/pxp/intel_pxp_tee_interface.h | 57 ---------------------- 6 files changed, 100 insertions(+), 68 deletions(-) commit 25369175ce84813dd99d6604e710dc2491f68523 Author: Xiu Jianfeng Date: Sat Nov 12 17:27:19 2022 +0800 ima: Fix misuse of dereference of pointer in template_desc_init_fields() The input parameter @fields is type of struct ima_template_field ***, so when allocates array memory for @fields, the size of element should be sizeof(**field) instead of sizeof(*field). Actually the original code would not cause any runtime error, but it's better to make it logically right. Fixes: adf53a778a0a ("ima: new templates management mechanism") Signed-off-by: Xiu Jianfeng Reviewed-by: Roberto Sassu Signed-off-by: Mimi Zohar security/integrity/ima/ima_template.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 39419ef7af0916cc3620ecf1ed42d29659109bf3 Author: GUO Zihua Date: Fri Nov 11 18:13:17 2022 +0800 integrity: Fix memory leakage in keyring allocation error path Key restriction is allocated in integrity_init_keyring(). However, if keyring allocation failed, it is not freed, causing memory leaks. Fixes: 2b6aa412ff23 ("KEYS: Use structure to capture key restriction function and data") Signed-off-by: GUO Zihua Signed-off-by: Mimi Zohar security/integrity/digsig.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 12e4e8c7ab5978eb56f9d363461a8a40a8618bf4 Author: Pavel Begunkov Date: Wed Nov 2 15:18:24 2022 +0000 io_uring/rw: enable bio caches for IRQ rw Now we can use IOCB_ALLOC_CACHE not only for iopoll'ed reads/write but also for normal IRQ driven I/O. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/fb8bd092ed5a4a3b037e84e4777074d07aa5639a.1667384020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 42b2b2fb6ecf1cc11eb7e75782dd7a7a17e6d958 Author: Pavel Begunkov Date: Wed Nov 2 15:18:23 2022 +0000 bio: shrink max number of pcpu cached bios The downside of the bio pcpu cache is that bios of a cpu will be never freed unless there is new I/O issued from that cpu. We currently keep max 512 bios, which feels too much, half it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bc198e8efb27d8c740d80c8ce477432729075096.1667384020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe block/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b99182c501c3dedeba4c9e6c92a60df1a2fee119 Author: Pavel Begunkov Date: Wed Nov 2 15:18:22 2022 +0000 bio: add pcpu caching for non-polling bio_put This patch extends REQ_ALLOC_CACHE to IRQ completions, whenever currently it's only limited to iopoll. Instead of guarding the list with irq toggling on alloc, which is expensive, it keeps an additional irq-safe list from which bios are spliced in batches to ammortise overhead. On the put side it toggles irqs, but in many cases they're already disabled and so cheap. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c2306de96b900ab9264f4428ec37768ddcf0da36.1667384020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe block/bio.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 16 deletions(-) commit f25cf75a452150c243f74ab1f1836822137d5d2c Author: Pavel Begunkov Date: Wed Nov 2 15:18:21 2022 +0000 bio: split pcpu cache part of bio_put into a helper Extract a helper out of bio_put for recycling into percpu caches. It's a preparation patch without functional changes. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e97ab2026a89098ee1bfdd09bcb9451fced95f87.1667384020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe block/bio.c | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) commit 759aa12f19155fe4e4fb4740450b4aa4233b7d9f Author: Pavel Begunkov Date: Wed Nov 2 15:18:20 2022 +0000 bio: don't rob starving biosets of bios Biosets keep a mempool, so as long as requests complete we can always can allocate and have forward progress. Percpu bio caches break that assumptions as we may complete into the cache of one CPU and after try and fail to allocate with another CPU. We also can't grab from another CPU's cache without tricky sync. If we're allocating with a bio while the mempool is undersaturated, remove REQ_ALLOC_CACHE flag, so on put it will go straight to mempool. It might try to free into mempool more requests than required, but assuming than there is no memory starvation in the system it'll stabilise and never hit that path. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/aa150caf9c263fa92269e86d7826cc8fa65f38de.1667384020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe block/bio.c | 2 ++ 1 file changed, 2 insertions(+) commit 6e4068a11413b96687a03c39814539e202de294b Author: Pavel Begunkov Date: Wed Nov 2 15:18:19 2022 +0000 mempool: introduce mempool_is_saturated Introduce a helper mempool_is_saturated(), which tells if the mempool is under-filled or not. We need it to figure out whether it should be freed right into the mempool or could be cached with top level caches. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/636aed30be8c35d78f45e244998bc6209283cccc.1667384020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe include/linux/mempool.h | 5 +++++ 1 file changed, 5 insertions(+) commit 6b6ab406cedaf70f58961d4ea82e88e65e721d06 Author: Krzysztof Kozlowski Date: Wed Nov 9 17:37:59 2022 +0100 ASoC: codecs: wsa883x: 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/20221109163759.1158837-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/wsa883x.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 8e022387444bc5039a271fbf5a778551c4a1926b Author: Krzysztof Kozlowski Date: Wed Nov 9 17:37:58 2022 +0100 ASoC: codecs: wsa883x: Shutdown on error path If probe fails, toggle shutdown via GPIO to save power and reverse probe actions. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221109163759.1158837-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/wsa883x.c | 1 + 1 file changed, 1 insertion(+) commit 2dfb010d2aafceeab23ccd502c77784006adedd7 Author: Meng Li Date: Mon Nov 14 13:40:37 2022 +0800 cpufreq: amd-pstate: fix spdxcheck warnings for amd-pstate-ut.c spdxcheck warnings: (new ones prefixed by >>) >> drivers/cpufreq/amd-pstate-ut.c: 1:28 Invalid License ID: GPL-1.0-or-later drivers/spi/spi-gxp.c: 1:35 Invalid token: =or-later Signed-off-by: Meng Li Reported-by: kernel test robot Signed-off-by: Shuah Khan drivers/cpufreq/amd-pstate-ut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd3f518fc1140622e752ac51d0ff18bb74f1d180 Author: Ian Rogers Date: Wed Nov 9 10:49:12 2022 -0800 perf thread_map: Reduce exposure of libperf internal API Remove unnecessary include of internal threadmap.h and refcount.h in thread_map.h. Switch to using public APIs when possible or including the internal header file in the C file. Fix a transitive dependency in openat-syscall.c broken by the clean up. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 1 + tools/perf/builtin-trace.c | 4 ++-- tools/perf/tests/openat-syscall.c | 1 + tools/perf/tests/thread-map.c | 1 + tools/perf/util/bpf_counter.c | 2 +- tools/perf/util/evsel.c | 1 + tools/perf/util/python.c | 6 +++--- tools/perf/util/scripting-engines/trace-event-python.c | 2 +- tools/perf/util/thread_map.c | 1 + tools/perf/util/thread_map.h | 2 -- 10 files changed, 12 insertions(+), 9 deletions(-) commit bd560973c5d3b2a37fb13d769b34385ed320d547 Author: Ian Rogers Date: Wed Nov 9 10:49:11 2022 -0800 perf expr: Tidy hashmap dependency hashmap.h comes from libbpf but isn't installed with its headers. Always use the header file of the code in util. Change the hashmap.h dependency in expr.h to a forward declaration, add the necessary header file includes in the C files. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-12-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/expr.c | 1 + tools/perf/tests/pmu-events.c | 1 + tools/perf/util/bpf-loader.c | 4 ---- tools/perf/util/evsel.c | 4 ---- tools/perf/util/expr.c | 1 + tools/perf/util/expr.h | 7 +------ tools/perf/util/metricgroup.c | 1 + tools/perf/util/stat-shadow.c | 1 + tools/perf/util/stat.c | 4 ---- 9 files changed, 6 insertions(+), 18 deletions(-) commit 84bec6f0b31fb2ac8c5e4b0ded7727e6ec1115db Author: Ian Rogers Date: Wed Nov 9 10:49:10 2022 -0800 perf build: Install libsymbol locally when building The perf build currently has a '-Itools/lib' on the CC command line. This causes issues as the libapi, libsubcmd, libtraceevent, libbpf and libsymbol headers are all found via this path, making it impossible to override include behavior. Change the libsymbol build mirroring the libbpf, libsubcmd, libapi, libperf and libtraceevent build, so that it is installed in a directory along with its headers. A later change will modify the include behavior. Don't build kallsyms.o as part of util as this will lead to duplicate definitions. Add kallsym's directory to the MANIFEST rather than individual files, so that the Build and Makefile are added to a source tar ball. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/.gitignore | 1 + tools/perf/MANIFEST | 3 +-- tools/perf/Makefile.perf | 25 ++++++++++++++++++++++--- tools/perf/util/Build | 5 ----- 4 files changed, 24 insertions(+), 10 deletions(-) commit 160be157eaba2a37233ff2d27093e5915b6b084e Author: Ian Rogers Date: Wed Nov 9 10:49:09 2022 -0800 tool lib symbol: Add Makefile/Build Add sufficient Makefile for libsymbol to be built as a dependency and header files installed. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/symbol/Build | 1 + tools/lib/symbol/Makefile | 115 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) commit a6e8caf5db2e1db8e2ec51f87b9749bd28f6b969 Author: Ian Rogers Date: Wed Nov 9 10:49:08 2022 -0800 tools lib perf: Add missing install headers Headers necessary for the perf build. Note, internal headers are also installed as these are necessary for the build. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/perf/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8d1f68bd76a6517c132fd1dd223c85c5e1defa49 Author: Ian Rogers Date: Wed Nov 9 10:49:07 2022 -0800 tools lib api: Add missing install headers Headers necessary for the perf build. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ef019df01e207971200ffcb06559f791980668a1 Author: Ian Rogers Date: Wed Nov 9 10:49:06 2022 -0800 perf build: Install libtraceevent locally when building The perf build currently has a '-Itools/lib' on the CC command line. This causes issues as the libapi, libsubcmd, libtraceevent, libbpf headers are all found via this path, making it impossible to override include behavior. Change the libtraceevent build mirroring the libbpf, libsubcmd, libapi and libperf build, so that it is installed in a directory along with its headers. A later change will modify the include behavior. Similarly, the plugins are now installed into libtraceevent_plugins except they have no header files. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/.gitignore | 3 ++- tools/perf/Makefile.perf | 57 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 40 insertions(+), 20 deletions(-) commit 91009a3a9913f2755f8b9616a2124a51147c375c Author: Ian Rogers Date: Wed Nov 9 10:49:05 2022 -0800 perf build: Install libperf locally when building The perf build currently has a '-Itools/lib' on the CC command line. This causes issues as the libapi, libsubcmd, libtraceevent, libbpf headers are all found via this path, making it impossible to override include behavior. Change the libperf build mirroring the libbpf, libsubcmd and libapi build, so that it is installed in a directory along with its headers. A later change will modify the include behavior. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/.gitignore | 1 + tools/perf/Makefile.perf | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) commit 00314c9bca8faad495e4e4f702491ecd37444784 Author: Ian Rogers Date: Wed Nov 9 10:49:04 2022 -0800 perf build: Install libapi locally when building The perf build currently has a '-Itools/lib' on the CC command line. This causes issues as the libapi, libsubcmd, libtraceevent, libbpf headers are all found via this path, making it impossible to override include behavior. Change the libapi build mirroring the libbpf and libsubcmd build, so that it is installed in a directory along with its headers. A later change will modify the include behavior. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/.gitignore | 1 + tools/perf/Makefile.perf | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) commit 911920b06e6be3faf87450affb0dbbc6117fd0a5 Author: Ian Rogers Date: Wed Nov 9 10:49:03 2022 -0800 perf build: Install libsubcmd locally when building The perf build currently has a '-Itools/lib' on the CC command line. This causes issues as the libapi, libsubcmd, libtraceevent, libbpf headers are all found via this path, making it impossible to override include behavior. Change the libsubcmd build mirroring the libbpf build, so that it is installed in a directory along with its headers. A later change will modify the include behavior. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/.gitignore | 1 + tools/perf/Makefile.perf | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) commit 630ae80ea1dd253609cb50cff87f3248f901aca3 Author: Ian Rogers Date: Wed Nov 9 10:49:02 2022 -0800 tools lib subcmd: Add install target This allows libsubcmd to be installed as a dependency. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/subcmd/Makefile | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit a6efaa2c89bf35c3cb7f21dee221dabf20dccf59 Author: Ian Rogers Date: Wed Nov 9 10:49:01 2022 -0800 tools lib api: Add install target This allows libapi to be installed as a dependency. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cmc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Jiri Olsa Cc: Mark Rutland Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Stephane Eranian Cc: bpf@vger.kernel.org Cc: nicolas schier Link: http://lore.kernel.org/lkml/20221109184914.1357295-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/Makefile | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 330ff5a555869aa0ba3b4c206bf046232e356842 Author: Maxime Ripard Date: Wed Nov 16 10:17:11 2022 +0100 drm/tests: helpers: Add module infos The MODULE_LICENSE macro is missing from the kunit helpers file, thus leading to a build error. Let's introduce it along with MODULE_AUTHOR. Fixes: 44a3928324e9 ("drm/tests: Add Kunit Helpers") Reported-by: Stephen Rothwell Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221116091712.1309651-2-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/tests/drm_kunit_helpers.c | 3 +++ 1 file changed, 3 insertions(+) commit f7711fdde1cd15e261adfab819c0e714e563bf60 Author: Maxime Ripard Date: Wed Nov 16 10:17:10 2022 +0100 drm/tests: Include helpers header The kunit helpers code weren't including its header, leading to a warning that no previous prototype had been defined for public functions. Include the matching header to fix the warning. Fixes: 44a3928324e9 ("drm/tests: Add Kunit Helpers") Reported-by: kernel test robot Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221116091712.1309651-1-maxime@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/tests/drm_kunit_helpers.c | 2 ++ 1 file changed, 2 insertions(+) commit 84b60f2bce1f0416617c4dbc015b5da906b8e2ad Author: Radu Pirea (NXP OSS) Date: Fri Nov 11 23:13:56 2022 +0200 spi: fsl-dspi: add cs-gpios support Make the driver be able to bit-bang a GPIO for the Chip Select pin of select peripherals. The GPIO value is driven by the driver in that case, and none of the hardware Chip Select bits will be populated in the PUSHR register for the TX commands constructed for this peripheral. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20221111211356.545026-1-vladimir.oltean@nxp.com Signed-off-by: Mark Brown drivers/spi/spi-fsl-dspi.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit f32e02417614d3588a3954dab2a70320c43d1010 Author: Philipp Jungkamp Date: Wed Nov 16 12:06:47 2022 +0100 platform/x86: ideapad-laptop: support for more special keys in WMI The event data of the WMI event 0xD0, which is assumed to be the fn_lock, is used to indicate several special keys on newer Yoga 7/9 laptops. The notify_id 0xD0 is non-unique in the DSDT of the Yoga 9 14IAP7, this causes wmi_get_event_data() to report wrong values. Port the ideapad-laptop WMI code to the wmi bus infrastructure which does not suffer from the shortcomings of wmi_get_event_data(). Signed-off-by: Philipp Jungkamp Link: https://lore.kernel.org/r/20221116110647.3438-1-p.jungkamp@gmx.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/ideapad-laptop.c | 261 ++++++++++++++++++++++++++-------- 1 file changed, 202 insertions(+), 59 deletions(-) commit aba51cd0949aee50a2b93f1b32ed3668cd613649 Author: Jaroslav Kysela Date: Tue Nov 8 12:59:14 2022 +0100 selftests: alsa - add PCM test This initial code does a simple sample transfer tests. By default, all PCM devices are detected and tested with short and long buffering parameters for 4 seconds. If the sample transfer timing is not in a +-100ms boundary, the test fails. Only the interleaved buffering scheme is supported in this version. The configuration may be modified with the configuration files. A specific hardware configuration is detected and activated using the sysfs regex matching. This allows to use the DMI string (/sys/class/dmi/id/* tree) or any other system parameters exposed in sysfs for the matching for the CI automation. The configuration file may also specify the PCM device list to detect the missing PCM devices. v1..v2: - added missing alsa-local.h header file Cc: Mark Brown Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Jesse Barnes Cc: Jimmy Cheng-Yi Chiang Cc: Curtis Malainey Cc: Brian Norris Signed-off-by: Jaroslav Kysela Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20221108115914.3751090-1-perex@perex.cz Signed-off-by: Takashi Iwai tools/testing/selftests/alsa/Makefile | 4 +- tools/testing/selftests/alsa/alsa-local.h | 22 + tools/testing/selftests/alsa/conf.c | 379 +++++++++++++++ .../alsa/conf.d/Lenovo_ThinkPad_P1_Gen2.conf | 76 +++ tools/testing/selftests/alsa/pcm-test.c | 523 +++++++++++++++++++++ 5 files changed, 1003 insertions(+), 1 deletion(-) commit bf36267e3ad3df80a3a18eb0422723069a434934 Author: Eric Dumazet Date: Tue Nov 15 09:18:51 2022 +0000 tcp: annotate data-race around queue->synflood_warned Annotate the lockless read of queue->synflood_warned. Following xchg() has the needed data-race resolution. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc64f30eb9a5edb299ee0a1a05cc21e4079fd9f3 Author: Matti Vaittinen Date: Wed Nov 16 07:32:12 2022 +0200 lib/test_linear_ranges: Use LINEAR_RANGE() New initialization macro for linear ranges was added. Slightly simplify the test code by using this macro - and at the same time also verify the macro is working as intended. Use the newly added LINEAR_RANGE() initialization macro for linear range test. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/Y3R13IRrs+x5PcZ4@dc75zzyyyyyyyyyyyyydt-3.rev.dnainternet.fi Signed-off-by: Mark Brown lib/test_linear_ranges.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit b8dfb3bed5524589052dafa0e4d6c4e25ae11544 Author: Johan Hovold Date: Wed Nov 16 11:20:53 2022 +0100 regulator: dt-bindings: qcom,rpmh: clean up example indentation Remove a line break and increase indentation of the continuation line to avoid having the 'regulator-allowed-modes' example be reproduced verbatim with four-spaces indentation (instead of a tab, which is still too little) in devicetree sources. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221116102054.4673-2-johan+linaro@kernel.org Signed-off-by: Mark Brown .../devicetree/bindings/regulator/qcom,rpmh-regulator.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 1d7322f28fde3f90f2a2ed0b62fafc004b3f822a Author: Li zeming Date: Tue Nov 15 10:14:24 2022 +0800 ax25: af_ax25: Remove unnecessary (void*) conversions The valptr pointer is of (void *) type, so other pointers need not be forced to assign values to it. Signed-off-by: Li zeming Signed-off-by: David S. Miller net/ax25/af_ax25.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d95977533e14738e8193c14a7efac369288aeee Author: Syed Saba Kareem Date: Wed Nov 16 16:29:23 2022 +0530 ASoC: amd: ps: Move acp63_dev_data strcture from PCI driver Move acp63_dev_data structure from PCI driver to acp header file. Signed-off-by: Syed Saba Kareem Link: https://lore.kernel.org/r/20221116105938.762550-2-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown sound/soc/amd/ps/acp63.h | 7 +++++++ sound/soc/amd/ps/pci-ps.c | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) commit d25ec74c6c5419f834bab506f251bc760bdfb858 Author: Syed Saba Kareem Date: Wed Nov 16 16:29:22 2022 +0530 ASoC: amd: ps: update macros with ps platform naming convention Update macros using ps platform naming convention. Signed-off-by: Syed Saba Kareem Link: https://lore.kernel.org/r/20221116105938.762550-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown sound/soc/amd/ps/acp63.h | 8 ++++---- sound/soc/amd/ps/pci-ps.c | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) commit f56814af1c1cf416f8df739c3959617c9624db2f Merge: 6ad73a2b42ea c7a79f546100 Author: Mark Brown Date: Wed Nov 16 13:12:20 2022 +0000 Adds the combination of headset codec ALC5682I-VD + amp rt1019p Merge series from Ajye Huang : v1: - machine driver: - Adds the combination of headset codec ALC5682I-VD + amp rt1019p. - Remove the duplicate code in machine driver. Ajye Huang (2): ASoC: Intel: sof_rt5682: add support for ALC5682I-VD with amp rt1019p ASoC: Intel: sof rt5682: remove the duplicate codes sound/soc/intel/boards/sof_rt5682.c | 7 +------ sound/soc/intel/common/soc-acpi-intel-adl-match.c | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) -- 2.25.1 commit 80afdfa66ca9df85c483a9e89fe6cb8483cd6381 Author: Jani Nikula Date: Mon Nov 14 13:17:09 2022 +0200 drm/edid/firmware: stop using a throwaway platform device We've used a temporary platform device for firmware EDID loading since it was introduced in commit da0df92b5731 ("drm: allow loading an EDID as firmware to override broken monitor"), but there's no explanation why. Using a temporary device does not play well with CONFIG_FW_CACHE=y, which caches firmware images (e.g. on suspend) so that drivers can request firmware when the system is not ready for it, and return the images from the cache (e.g. during resume). This works automatically for regular devices, but obviously not for a temporarily created device. Stop using the throwaway platform device, and use the drm device instead. Note that this may still be problematic for cases where the display was plugged in during suspend, and the firmware wasn't loaded and therefore not cached before suspend. References: https://lore.kernel.org/r/20220727074152.43059-1-matthieu.charette@gmail.com Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2061 Reported-by: Matthieu CHARETTE Tested-by: Matthieu CHARETTE Cc: Ville Syrjälä Signed-off-by: Jani Nikula Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221114111709.434979-1-jani.nikula@intel.com drivers/gpu/drm/drm_edid_load.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 4dd7ff4a0311eee3ac946f0824442de94b34c42e Author: Namhyung Kim Date: Mon Nov 14 15:02:27 2022 -0800 perf stat: Add print_aggr_cgroup() for --for-each-cgroup and --topdown Normally, --for-each-cgroup only works with AGGR_GLOBAL. However the --topdown on some cpu (e.g. Intel Skylake) converts it to the AGGR_CORE internally. To support those machines, add print_aggr_cgroup and handle the events like in print_cgroup_events(). $ perf stat -a --for-each-cgroup system.slice,user.slice --topdown sleep 1 nmi_watchdog enabled with topdown. May give wrong results. Disable with echo 0 > /proc/sys/kernel/nmi_watchdog Performance counter stats for 'system wide': retiring bad speculation frontend bound backend bound S0-D0-C0 2 system.slice 49.0% -46.6% 31.4% S0-D0-C1 2 system.slice 55.5% 8.0% 45.5% -9.0% S0-D0-C2 2 system.slice 87.8% 22.1% 30.3% -40.3% S0-D0-C3 2 system.slice 53.3% -11.9% 45.2% 13.4% S0-D0-C0 2 user.slice 123.5% 4.0% 48.5% -75.9% S0-D0-C1 2 user.slice 19.9% 6.5% 89.9% -16.3% S0-D0-C2 2 user.slice 29.9% 7.9% 71.3% -9.1 S0-D0-C3 2 user.slice 28.0% 7.2% 43.3% 21.5% 1.004136937 seconds time elapsed Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-20-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit 67f8b7eb4e9195d037b60f1614880234aca15fee Author: Namhyung Kim Date: Mon Nov 14 15:02:26 2022 -0800 perf stat: Support --for-each-cgroup and --metric-only When we have events for each cgroup, the metric should be printed for each cgroup separately. Add print_cgroup_counter() to handle that situation properly. Also change print_metric_headers() not to print duplicate headers by checking cgroups. $ perf stat -a --for-each-cgroup system.slice,user.slice --metric-only sleep 1 Performance counter stats for 'system wide': GHz insn per cycle branch-misses of all branches system.slice 3.792 0.61 3.24% user.slice 3.661 2.32 0.37% 1.016111516 seconds time elapsed Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-19-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 58 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 11 deletions(-) commit 78670daefd33c8e0a30b121a2a271a90bca57130 Author: Namhyung Kim Date: Mon Nov 14 15:02:25 2022 -0800 perf stat: Factor out print_metric_{begin,end}() For the metric-only case, add new functions to handle the start and the end of each metric display. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-18-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 56 +++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 22 deletions(-) commit 2cf38236d94605586da0ed0f9ec432bf0eb415c3 Author: Namhyung Kim Date: Mon Nov 14 15:02:24 2022 -0800 perf stat: Factor out prefix display The prefix is needed for interval mode to print timestamp at the beginning of each line. But the it's tricky for the metric only mode since it doesn't print every evsel and combines the metrics into a single line. So it needed to pass 'first' argument to print_counter_aggrdata() to determine if the current event is being printed at first. This makes the code hard to read. Let's move the logic out of the function and do it in the outer print loop. This would enable further cleanups later. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-17-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 43 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) commit 453279d5739f12cf27b604c84c061a8a7a3937da Author: Namhyung Kim Date: Mon Nov 14 15:02:23 2022 -0800 perf stat: Move condition to print_footer() Likewise, I think it'd better to have the control inside the function, and keep the higher level function clearer. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-16-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4c86b664f4cce6940c187ecfc019f434f8dbd4bc Author: Namhyung Kim Date: Mon Nov 14 15:02:22 2022 -0800 perf stat: Rework header display There are print_header() and print_interval() to print header lines before actual counter values. Also print_metric_headers() needs to be called for the metric-only case. Let's move all these logics to a single place including num_print_iv to refresh the headers for interval mode. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-15-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 185 +++++++++++++++++++++++------------------ 1 file changed, 106 insertions(+), 79 deletions(-) commit 6108712c07422f8ececb163ace7fad2ae0e9a24c Author: Namhyung Kim Date: Mon Nov 14 15:02:21 2022 -0800 perf stat: Remove impossible condition The print would run only if metric_only is not set, but it's already in a block that says it's in metric_only case. And there's no place to change the setting. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-14-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 3 --- 1 file changed, 3 deletions(-) commit 33c4ed47990f3eaaa732d3fcc2760e6165c16c40 Author: Namhyung Kim Date: Mon Nov 14 15:02:20 2022 -0800 perf stat: Cleanup interval print alignment Instead of using magic values, define symbolic constants and use them. Also add aggr_header_std[] array to simplify aggr_mode handling. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-13-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 165 +++++++++++++++++++++++------------------ 1 file changed, 91 insertions(+), 74 deletions(-) commit 208cbcd21bf57c80ceaf90fcec16cfdfb55a0a4d Author: Namhyung Kim Date: Mon Nov 14 15:02:19 2022 -0800 perf stat: Factor out prepare_interval() This logic does not print the time directly, but it just puts the timestamp in the buffer as a prefix. To reduce the confusion, factor out the code into a separate function. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-12-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit b2d9832e00a0d93ad6127fa8ccf2b8e0cfe67397 Author: Namhyung Kim Date: Mon Nov 14 15:02:18 2022 -0800 perf stat: Split print_metric_headers() function The print_metric_headers() shows metric headers a little bit for each mode. Split it out to make the code clearer. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-11-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 52 ++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 15 deletions(-) commit 8d500292bd55c05130c96f6e84cc3e6ba3ebed99 Author: Namhyung Kim Date: Mon Nov 14 15:02:17 2022 -0800 perf stat: Align cgroup names We don't know how long cgroup name is, but at least we can align short ones like below. $ perf stat -a --for-each-cgroup system.slice,user.slice true Performance counter stats for 'system wide': 0.13 msec cpu-clock system.slice # 0.010 CPUs utilized 4 context-switches system.slice # 31.989 K/sec 1 cpu-migrations system.slice # 7.997 K/sec 0 page-faults system.slice # 0.000 /sec 450,673 cycles system.slice # 3.604 GHz (92.41%) 161,216 instructions system.slice # 0.36 insn per cycle (92.41%) 32,678 branches system.slice # 261.332 M/sec (92.41%) 2,628 branch-misses system.slice # 8.04% of all branches (92.41%) 14.29 msec cpu-clock user.slice # 1.163 CPUs utilized 35 context-switches user.slice # 2.449 K/sec 12 cpu-migrations user.slice # 839.691 /sec 57 page-faults user.slice # 3.989 K/sec 49,683,026 cycles user.slice # 3.477 GHz (99.38%) 110,790,266 instructions user.slice # 2.23 insn per cycle (99.38%) 24,552,255 branches user.slice # 1.718 G/sec (99.38%) 127,779 branch-misses user.slice # 0.52% of all branches (99.38%) 0.012289431 seconds time elapsed Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-10-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df46a3c92b510b7776fed14728a271f8836ef19b Author: Namhyung Kim Date: Mon Nov 14 15:02:16 2022 -0800 perf stat: Add before_metric argument Unfortunately, event running time, percentage and noise data are printed in different positions in normal output than CSV/JSON. I think it's better to put such details in where it actually prints. So add before_metric argument to print_noise() and print_running() and call them twice before and after the metric. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 82 +++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 40 deletions(-) commit d6aeb861b1fb26f55c1b5be4b6e900ad1e734516 Author: Namhyung Kim Date: Mon Nov 14 15:02:15 2022 -0800 perf stat: Handle bad events in abs_printout() In the printout() function, it checks if the event is bad (i.e. not counted or not supported) and print the result. But it does the same what abs_printout() is doing. So add an argument to indicate the value is ok or not and use the same function in both cases. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 68 +++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 41 deletions(-) commit c2019f844eacd06decc435bdcee9eab1e1a6f4ec Author: Namhyung Kim Date: Mon Nov 14 15:02:14 2022 -0800 perf stat: Factor out print_counter_value() function And split it for each output mode like others. I believe it makes the code simpler and more intuitive. Now abs_printout() becomes just to call sub-functions. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 81 +++++++++++++++++++++++++++--------------- 1 file changed, 53 insertions(+), 28 deletions(-) commit 33b2e2c2ad68489bc0c97660ef1e6bf7df0c9d7d Author: Namhyung Kim Date: Mon Nov 14 15:02:13 2022 -0800 perf stat: Split aggr_printout() function The aggr_printout() function is to print aggr_id and count (nr). Split it for each output mode to simplify the code. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 220 ++++++++++++++++++++++------------------- 1 file changed, 121 insertions(+), 99 deletions(-) commit 41cb875242e71bf1bf5539a724bc65a0b470bb12 Author: Namhyung Kim Date: Mon Nov 14 15:02:12 2022 -0800 perf stat: Split print_cgroup() function Likewise, split print_cgroup() for each output mode. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit def99d60df6f21b4c36d23f0071ec8a73f39f28b Author: Namhyung Kim Date: Mon Nov 14 15:02:11 2022 -0800 perf stat: Split print_noise_pct() function Likewise, split print_noise_pct() for each output mode. Although it's a tiny function, more logic will be added soon so it'd be better split it and treat it in the same way. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) commit 31bf6aea997674a030be02999560d8e6f7a6b974 Author: Namhyung Kim Date: Mon Nov 14 15:02:10 2022 -0800 perf stat: Split print_running() function To make the code more obvious and hopefully simpler, factor out the code for each output mode - stdio, CSV, JSON. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) commit f5bc4428cc6e096170d35fc79a640d90e33dd9c3 Author: Namhyung Kim Date: Mon Nov 14 15:02:09 2022 -0800 perf stat: Clear screen only if output file is a tty The --interval-clear option makes perf stat to clear the terminal at each interval. But it doesn't need to clear the screen when it saves to a file. Make it fail when it's enabled with the output options. $ perf stat -I 1 --interval-clear -o myfile true --interval-clear does not work with output Usage: perf stat [] [] -o, --output output file name --log-fd log output to fd, instead of stderr --interval-clear clear screen in between new interval Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221114230227.1255976-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ca5ebbfec31487a208d9e0b13a99dbb738a3281b Merge: 68d268d08931 c4794d22251b Author: David S. Miller Date: Wed Nov 16 12:48:44 2022 +0000 Merge branch 'net-atomic-dev-stats' Eric Dumazet says: ==================== net: add atomic dev->stats infra Long standing KCSAN issues are caused by data-race around some dev->stats changes. Most performance critical paths already use per-cpu variables, or per-queue ones. It is reasonable (and more correct) to use atomic operations for the slow paths. First patch adds the infrastructure, then three patches address the most common paths that syzbot is playing with. ==================== Signed-off-by: David S. Miller commit c4794d22251b979b12a6c8e2d3848b662a44fdb6 Author: Eric Dumazet Date: Tue Nov 15 08:53:58 2022 +0000 ipv4: tunnels: use DEV_STATS_INC() Most of code paths in tunnels are lockless (eg NETIF_F_LLTX in tx). Adopt SMP safe DEV_STATS_INC() to update dev->stats fields. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 10 +++++----- net/ipv4/ip_tunnel.c | 32 ++++++++++++++++---------------- net/ipv4/ip_vti.c | 20 ++++++++++---------- net/ipv4/ipip.c | 2 +- net/ipv4/ipmr.c | 12 ++++++------ 5 files changed, 38 insertions(+), 38 deletions(-) commit 2fad1ba354d4a82b1b635a78f25d9682d4febb5e Author: Eric Dumazet Date: Tue Nov 15 08:53:57 2022 +0000 ipv6: tunnels: use DEV_STATS_INC() Most of code paths in tunnels are lockless (eg NETIF_F_LLTX in tx). Adopt SMP safe DEV_STATS_{INC|ADD}() to update dev->stats fields. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 11 ++++------- net/ipv6/ip6_tunnel.c | 26 ++++++++++++-------------- net/ipv6/ip6_vti.c | 16 +++++++--------- net/ipv6/ip6mr.c | 10 +++++----- 4 files changed, 28 insertions(+), 35 deletions(-) commit cb34b7cf17ecf33499c9298943f85af247abc1e9 Author: Eric Dumazet Date: Tue Nov 15 08:53:56 2022 +0000 ipv6/sit: use DEV_STATS_INC() to avoid data-races syzbot/KCSAN reported that multiple cpus are updating dev->stats.tx_error concurrently. This is because sit tunnels are NETIF_F_LLTX, meaning their ndo_start_xmit() is not protected by a spinlock. While original KCSAN report was about tx path, rx path has the same issue. Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/sit.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 6c1c5097781f563b70a81683ea6fdac21637573b Author: Eric Dumazet Date: Tue Nov 15 08:53:55 2022 +0000 net: add atomic_long_t to net_device_stats fields Long standing KCSAN issues are caused by data-race around some dev->stats changes. Most performance critical paths already use per-cpu variables, or per-queue ones. It is reasonable (and more correct) to use atomic operations for the slow paths. This patch adds an union for each field of net_device_stats, so that we can convert paths that are not yet protected by a spinlock or a mutex. netdev_stats_to_stats64() no longer has an #if BITS_PER_LONG==64 Note that the memcpy() we were using on 64bit arches had no provision to avoid load-tearing, while atomic_long_read() is providing the needed protection at no cost. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/netdevice.h | 58 ++++++++++++++++++++++++++++------------------- include/net/dst.h | 5 ++-- net/core/dev.c | 14 +++--------- 3 files changed, 40 insertions(+), 37 deletions(-) commit 68d268d089314b7c9c9754388a9a301175287b1a Merge: 8c55facecd7a 4ebf802cf1c6 Author: David S. Miller Date: Wed Nov 16 12:42:01 2022 +0000 Merge branch 'net-try_cmpxchg-conversions' Eric Dumazet says: ==================== net: more try_cmpxchg() conversions Adopt try_cmpxchg() and friends in more places, as this is preferred nowadays. ==================== Signed-off-by: David S. Miller commit 4ebf802cf1c6a87fd14e7936728c99e18d7ba794 Author: Eric Dumazet Date: Tue Nov 15 09:11:01 2022 +0000 net: __sock_gen_cookie() cleanup Adopt atomic64_try_cmpxchg() and remove the loop, to make the intent more obvious. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/sock_diag.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4ffa1d1c6842a97e84cfbe56bfcf70edb23608e2 Author: Eric Dumazet Date: Tue Nov 15 09:11:00 2022 +0000 net: adopt try_cmpxchg() in napi_{enable|disable}() This makes code a bit cleaner. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/dev.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 1462160c7455cfc495693e47d0eabb371ec4f7ff Author: Eric Dumazet Date: Tue Nov 15 09:10:59 2022 +0000 net: adopt try_cmpxchg() in napi_schedule_prep() and napi_complete_done() This makes the code slightly more efficient. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/dev.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 6af645a5b2da7898b2c37e8f39f1bc572c4ab85a Author: Eric Dumazet Date: Tue Nov 15 09:10:58 2022 +0000 net: net_{enable|disable}_timestamp() optimizations Adopting atomic_try_cmpxchg() makes the code cleaner. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/dev.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 30189806fbb945c4cb753878aab0aa5af07bc921 Author: Eric Dumazet Date: Tue Nov 15 09:10:57 2022 +0000 ipv6: fib6_new_sernum() optimization Adopt atomic_try_cmpxchg() which is slightly more efficient. Signed-off-by: Eric Dumazet Cc: David Ahern Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 57fc05e8e82d015d5d58572e146ac8579a66efea Author: Eric Dumazet Date: Tue Nov 15 09:10:56 2022 +0000 net: mm_account_pinned_pages() optimization Adopt atomic_long_try_cmpxchg() in mm_account_pinned_pages() as it is slightly more efficient. Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Signed-off-by: David S. Miller net/core/skbuff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0ba2fa8cbd29278a180ac90bd66b2c0bbdeacc89 Author: Thomas Zimmermann Date: Fri Nov 11 14:30:24 2022 +0100 fbdev: Add support for the nomodeset kernel parameter Support the kernel's nomodeset parameter for all PCI-based fbdev drivers that use aperture helpers to remove other, hardware-agnostic graphics drivers. The parameter is a simple way of using the firmware-provided scanout buffer if the hardware's native driver is broken. The same effect could be achieved with per-driver options, but the importance of the graphics output for many users makes a single, unified approach worthwhile. With nomodeset specified, the fbdev driver module will not load. This unifies behavior with similar DRM drivers. In DRM helpers, modules first check the nomodeset parameter before registering the PCI driver. As fbdev has no such module helpers, we have to modify each driver individually. The name 'nomodeset' is slightly misleading, but has been chosen for historical reasons. Several drivers implemented it before it became a general option for DRM. So keeping the existing name was preferred over introducing a new one. v2: * print a warning if a driver does not init (Helge) * wrap video_firmware_drivers_only() in helper Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221111133024.9897-3-tzimmermann@suse.de drivers/staging/sm750fb/Kconfig | 1 + drivers/staging/sm750fb/sm750.c | 3 +++ drivers/video/fbdev/Kconfig | 37 ++++++++++++++++++++++++++++ drivers/video/fbdev/arkfb.c | 5 ++++ drivers/video/fbdev/asiliantfb.c | 3 +++ drivers/video/fbdev/aty/aty128fb.c | 5 ++++ drivers/video/fbdev/aty/atyfb_base.c | 5 ++++ drivers/video/fbdev/aty/radeon_base.c | 5 ++++ drivers/video/fbdev/carminefb.c | 3 +++ drivers/video/fbdev/chipsfb.c | 3 +++ drivers/video/fbdev/cirrusfb.c | 5 ++++ drivers/video/fbdev/core/fbmem.c | 15 +++++++++++ drivers/video/fbdev/cyber2000fb.c | 6 ++++- drivers/video/fbdev/geode/Kconfig | 3 +++ drivers/video/fbdev/geode/gx1fb_core.c | 5 ++++ drivers/video/fbdev/geode/gxfb_core.c | 5 ++++ drivers/video/fbdev/geode/lxfb_core.c | 5 ++++ drivers/video/fbdev/gxt4500.c | 3 +++ drivers/video/fbdev/hyperv_fb.c | 4 ++- drivers/video/fbdev/i740fb.c | 5 ++++ drivers/video/fbdev/i810/i810_main.c | 6 +++++ drivers/video/fbdev/imsttfb.c | 5 ++++ drivers/video/fbdev/intelfb/intelfbdrv.c | 3 +++ drivers/video/fbdev/kyro/fbdev.c | 5 ++++ drivers/video/fbdev/matrox/matroxfb_base.c | 3 +++ drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 3 +++ drivers/video/fbdev/neofb.c | 5 ++++ drivers/video/fbdev/nvidia/nvidia.c | 5 ++++ drivers/video/fbdev/pm2fb.c | 5 ++++ drivers/video/fbdev/pm3fb.c | 5 ++++ drivers/video/fbdev/pvr2fb.c | 5 ++++ drivers/video/fbdev/riva/fbdev.c | 5 ++++ drivers/video/fbdev/s3fb.c | 5 ++++ drivers/video/fbdev/savage/savagefb_driver.c | 3 +++ drivers/video/fbdev/sis/sis_main.c | 5 ++++ drivers/video/fbdev/skeletonfb.c | 5 ++++ drivers/video/fbdev/sm712fb.c | 3 +++ drivers/video/fbdev/sstfb.c | 3 +++ drivers/video/fbdev/sunxvr2500.c | 3 +++ drivers/video/fbdev/sunxvr500.c | 3 +++ drivers/video/fbdev/tdfxfb.c | 5 ++++ drivers/video/fbdev/tgafb.c | 5 ++++ drivers/video/fbdev/tridentfb.c | 5 ++++ drivers/video/fbdev/vermilion/vermilion.c | 5 ++++ drivers/video/fbdev/via/via-core.c | 3 +++ drivers/video/fbdev/vt8623fb.c | 5 ++++ include/linux/fb.h | 9 +++++++ 47 files changed, 246 insertions(+), 2 deletions(-) commit 9a758d8756daab5b8fda006e131c066336b16a32 Author: Thomas Zimmermann Date: Fri Nov 11 14:30:23 2022 +0100 drm: Move nomodeset kernel parameter to drivers/video Move the nomodeset kernel parameter to drivers/video to make it available to non-DRM drivers. Adapt the interface, but keep the DRM interface drm_firmware_drivers_only() to avoid churn within DRM. The function should later be inlined into callers. The parameter disables any DRM graphics driver that would replace a driver for firmware-provided scanout buffers. It is an option to easily fallback to basic graphics output if the hardware's native driver is broken. Moving it to a more prominent location wil make it available to fbdev as well. v2: * clarify the meaning of the nomodeset parameter (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221111133024.9897-2-tzimmermann@suse.de Documentation/admin-guide/kernel-parameters.txt | 15 +++++++++------ MAINTAINERS | 2 ++ drivers/gpu/drm/Kconfig | 7 +------ drivers/gpu/drm/Makefile | 1 - drivers/video/Kconfig | 4 ++++ drivers/video/Makefile | 1 + drivers/{gpu/drm/drm_nomodeset.c => video/nomodeset.c} | 12 +++++++----- include/drm/drm_drv.h | 8 +++++++- include/video/nomodeset.h | 8 ++++++++ 9 files changed, 39 insertions(+), 19 deletions(-) commit 27c3e9452d552ea86369a94f23287a9675f2d7a1 Author: Thomas Zimmermann Date: Tue Nov 15 12:58:19 2022 +0100 drm/fb-helper: Remove damage worker The fbdev damage worker is unused, so remove it. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221115115819.23088-7-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 9 --------- include/drm/drm_fb_helper.h | 2 -- 2 files changed, 11 deletions(-) commit 7f5cc4a3e5e4c5a38e5748defc952e45278f7a70 Author: Thomas Zimmermann Date: Tue Nov 15 12:58:18 2022 +0100 drm/fb-helper: Schedule deferred-I/O worker after writing to framebuffer Schedule the deferred-I/O worker instead of the damage worker after writing to the fbdev framebuffer. The deferred-I/O worker then performs the dirty-fb update. The fbdev emulation will initialize deferred I/O for all drivers that require damage updates. It is therefore a valid assumption that the deferred-I/O worker is present. It would be possible to perform the damage handling directly from within the write operation. But doing this could increase the overhead of the write or interfere with a concurrently scheduled deferred-I/O worker. Instead, scheduling the deferred-I/O worker with its regular delay of 50 ms removes load off the write operation and allows the deferred-I/O worker to handle multiple write operations that arrived during the delay time window. v3: * remove unused variable (lkp) v2: * keep drm_fb_helper_damage() (Daniel) * use fb_deferred_io_schedule_flush() (Daniel) * clarify comments (Daniel) Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221115115819.23088-6-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 9 ++++++++- drivers/video/fbdev/core/fb_defio.c | 16 ++++++++++++++++ include/linux/fb.h | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) commit 5fc586a058babc71c82a038477581b7bfe1c6e2a Author: Thomas Zimmermann Date: Tue Nov 15 12:58:17 2022 +0100 drm/fb-helper: Perform damage handling in deferred-I/O helper Call fb_dirty directly from drm_fb_helper_deferred_io() to avoid the latency of running the damage worker. The deferred-I/O helper drm_fb_helper_deferred_io() runs in a worker thread at regular intervals as part of writing to mmaped framebuffer memory. It used to schedule the fbdev damage worker to flush the framebuffer. Changing this to flushing the framebuffer directly avoids the latency introduced by the damage worker. v2: * remove fb_dirty from defio in separate patch (Daniel) Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221115115819.23088-5-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 9b7232400d4e6adb5b96918ac1fa959c15911f8f Author: Thomas Zimmermann Date: Tue Nov 15 12:58:16 2022 +0100 drm/fb-helper: Remove test for fb_dirty callback from deferred-I/O helper The helper for processing deferred I/O on pages has no dependency on the fb_dirty damge-handling callback; so remove the test. In practice, deferred I/O is only used with damage handling and the damage worker already guarantees the presence of the fb_dirty callback. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221115115819.23088-4-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 17d64f1570679400fa5d4b84ecda1a418a704304 Author: Thomas Zimmermann Date: Tue Nov 15 12:58:15 2022 +0100 drm/fb-helper: Move dirty-fb update into helper function Move the dirty-fb update from the damage-worker callback into the new helper drm_fb_helper_fb_dirty(), so that it can run outside the damage worker. This change will help to remove the damage worker entirely. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221115115819.23088-3-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit b1be5ba29374aaf45142eddef85ce6cfd54c16e8 Author: Thomas Zimmermann Date: Tue Nov 15 12:58:14 2022 +0100 drm/fb-helper: Set damage-clip area in helper Set the damage area in the new helper drm_fb_helper_add_damage_clip(). It can now be updated without scheduling the damage worker. This change will help to remove the damage worker entirely. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221115115819.23088-2-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 3827597a89f85de0e136c67bf38677f2b2fda566 Author: Kuninori Morimoto Date: Wed Nov 16 00:12:39 2022 +0000 ALSA: pcm: avoid nused-but-set-variable warning It will indicate below warning if W=1 was added and CONFIG_SND_DEBUG was not set. This patch adds __maybe_unused and avoid it. ${LINUX}/sound/core/pcm_native.c: In function 'constrain_mask_params': ${LINUX}/sound/core/pcm_native.c:291:25: error: variable 'old_mask' set but not used [-Werror=unused-but-set-variable] 291 | struct snd_mask old_mask; | ^~~~~~~~ ${LINUX}/sound/core/pcm_native.c: In function 'constrain_interval_params': ${LINUX}/sound/core/pcm_native.c:327:29: error: variable 'old_interval' set but not used [-Werror=unused-but-set-variable] 327 | struct snd_interval old_interval; | ^~~~~~~~~~~~ ${LINUX}/sound/core/pcm_native.c: In function 'constrain_params_by_rules': ${LINUX}/sound/core/pcm_native.c:368:29: error: variable 'old_interval' set but not used [-Werror=unused-but-set-variable] 368 | struct snd_interval old_interval; | ^~~~~~~~~~~~ ${LINUX}/sound/core/pcm_native.c:367:25: error: variable 'old_mask' set but not used [-Werror=unused-but-set-variable] 367 | struct snd_mask old_mask; | ^~~~~~~~ ${LINUX}/sound/core/pcm_native.c: In function 'snd_pcm_hw_params_choose': ${LINUX}/sound/core/pcm_native.c:652:29: error: variable 'old_interval' set but not used [-Werror=unused-but-set-variable] 652 | struct snd_interval old_interval; | ^~~~~~~~~~~~ ${LINUX}/sound/core/pcm_native.c:651:25: error: variable 'old_mask' set but not used [-Werror=unused-but-set-variable] 651 | struct snd_mask old_mask; | ^~~~~~~~ cc1: all warnings being treated as errors make[3]: *** [${LINUX}/scripts/Makefile.build:250: sound/core/pcm_native.o] error 1 Signed-off-by: Kuninori Morimoto Reviewed-by: Takashi Sakamoto Tested-by: Takashi Sakamoto Link: https://lore.kernel.org/r/874juzg3kd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cc26516374065a34e10c9a8bf3e940e42cd96e2a Author: Takashi Iwai Date: Mon Nov 14 15:16:58 2022 +0100 ALSA: memalloc: Allocate more contiguous pages for fallback case Currently the fallback SG allocation tries to allocate each single page, and this tends to result in the reverse order of memory addresses when large space is available at boot, as the kernel takes a free page from the top to the bottom in the zone. The end result looks as if non-contiguous (although it actually is). What's worse is that it leads to an overflow of BDL entries for HD-audio. For avoiding such a problem, this patch modifies the allocation code slightly; now it tries to allocate the larger contiguous chunks as much as possible, then reduces to the smaller chunks only if the allocation failed -- a similar strategy as the existing snd_dma_alloc_pages_fallback() function. Along with the trick, drop the unused address array from snd_dma_sg_fallback object. It was needed in the past when dma_alloc_coherent() was used, but with the standard page allocator, it became superfluous and never referred. Fixes: a8d302a0b770 ("ALSA: memalloc: Revive x86-specific WC page allocations again") Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221114141658.29620-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/memalloc.c | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) commit d69d137e56304be744537fbb4ef9b0878fbc53d6 Merge: d59b6f215aa8 1abfd71ee8f3 Author: Takashi Iwai Date: Wed Nov 16 12:54:02 2022 +0100 Merge branch 'for-linus' into for-next Back-merge of devel branch for further fixes of memalloc helpers. Signed-off-by: Takashi Iwai commit b230555f3257f197dd98641ef6ebaf778b52dd51 Author: Brian Starkey Date: Tue Sep 13 15:43:06 2022 +0100 drm/fourcc: Fix vsub/hsub for Q410 and Q401 These formats are not subsampled, but that means hsub and vsub should be 1, not 0. Fixes: 94b292b27734 ("drm: drm_fourcc: add NV15, Q410, Q401 YUV formats") Reported-by: George Kennedy Reported-by: butt3rflyh4ck Signed-off-by: Brian Starkey Reviewed-by: Liviu Dudau Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20220913144306.17279-1-brian.starkey@arm.com drivers/gpu/drm/drm_fourcc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dd801b2265c81bf0c8b0b4b8f7c1e7bfed078403 Author: Konrad Dybcio Date: Thu Nov 10 22:07:05 2022 +0100 regulator: qcom-rpmh: Fix PMR735a S3 regulator spec PMR735a has a wider range than previously defined. Fix it. Fixes: c4e5aa3dbee5 ("regulator: qcom-rpmh: Add PM7325/PMR735A regulator support") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221110210706.80301-1-konrad.dybcio@linaro.org Signed-off-by: Mark Brown drivers/regulator/qcom-rpmh-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ad73a2b42ea6d43fc5bf32033e8f6b21df3109e Author: Shuming Fan Date: Tue Nov 8 17:27:27 2022 +0800 ASoC: rt1318: Add RT1318 SDCA vendor-specific driver This is the initial amplifier driver for rt1318 SDCA version. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20221108092727.13011-1-shumingf@realtek.com Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rt1318-sdw.c | 884 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/rt1318-sdw.h | 101 +++++ 4 files changed, 993 insertions(+) commit 2e71df94695cdc930fb373575ea4edabd4e4bcc7 Author: Heiko Carstens Date: Fri Nov 11 13:20:28 2022 +0100 s390: use generic vga.h header file The generic vga.h contains a couple of defines, which do no harm on s390. Therefore use the generic version and git rid of the s390 specific empty header file. Suggested-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/vga.h | 7 ------- 1 file changed, 7 deletions(-) commit 438d43d252e00d0eaac6e36b0616fe41de5e0d35 Author: Heiko Carstens Date: Fri Nov 11 13:18:21 2022 +0100 s390: use generic shmparam.h header file Use generic shmparam.h header file since the contents are identical. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/shmparam.h | 12 ------------ 1 file changed, 12 deletions(-) commit a3a6f55cc6fed675989647ab37bf9812a367f5f1 Author: Heiko Carstens Date: Fri Nov 11 13:15:54 2022 +0100 s390: use generic bugs.h header file Use the generic bugs.h header file. Except for an excellent comment the header files are identical. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/bugs.h | 21 --------------------- 1 file changed, 21 deletions(-) commit b381d047aad80ed6d0b41fc83180061cde0fc705 Author: Heiko Carstens Date: Fri Nov 11 13:14:18 2022 +0100 s390: use generic serial.h header file There is no serial driver on s390, especially none that relies on a bogus BASE_BAUD define. Therefore use the generic header file. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/serial.h | 7 ------- 1 file changed, 7 deletions(-) commit f574f3772cdda0adacce0bff03ba59f754d7d42e Author: Danilo Krummrich Date: Wed Oct 26 17:59:34 2022 +0200 drm/arm/malidp: remove calls to drm_mode_config_cleanup() drm_mode_config_init() simply calls drmm_mode_config_init(), hence cleanup is automatically handled through registering drm_mode_config_cleanup() with drmm_add_action_or_reset(). While at it, get rid of the deprecated drm_mode_config_init() and replace it with drmm_mode_config_init() directly. Signed-off-by: Danilo Krummrich Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20221026155934.125294-6-dakr@redhat.com drivers/gpu/drm/arm/malidp_drv.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 3ad510343812ee2500ffe4ae7a891f302f543cf3 Author: Danilo Krummrich Date: Wed Oct 26 17:59:33 2022 +0200 drm/arm/malidp: plane: use drm managed resources Use drm managed resource allocation (drmm_universal_plane_alloc()) in order to get rid of the explicit destroy hook in struct drm_plane_funcs. Signed-off-by: Danilo Krummrich Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20221026155934.125294-5-dakr@redhat.com drivers/gpu/drm/arm/malidp_planes.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) commit 905ff163cf48471e991b6a29b75435727d084c86 Author: Danilo Krummrich Date: Wed Oct 26 17:59:32 2022 +0200 drm/arm/malidp: crtc: use drmm_crtc_init_with_planes() Use drmm_crtc_init_with_planes() instead of drm_crtc_init_with_planes() to get rid of the explicit destroy hook in struct drm_plane_funcs. Signed-off-by: Danilo Krummrich Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20221026155934.125294-4-dakr@redhat.com drivers/gpu/drm/arm/malidp_crtc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1b93d3cb7181e1fa8fe22452985f93b0306c9b84 Author: Danilo Krummrich Date: Wed Oct 26 17:59:31 2022 +0200 drm/arm/malidp: replace drm->dev_private with drm_to_malidp() Using drm_device->dev_private is deprecated. Since we've switched to devm_drm_dev_alloc(), struct drm_device is now embedded in struct malidp_drm, hence we can use container_of() to get the struct drm_device instance instead. Signed-off-by: Danilo Krummrich Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20221026155934.125294-3-dakr@redhat.com drivers/gpu/drm/arm/malidp_crtc.c | 2 +- drivers/gpu/drm/arm/malidp_drv.c | 29 +++++++++++++---------------- drivers/gpu/drm/arm/malidp_drv.h | 1 + drivers/gpu/drm/arm/malidp_hw.c | 10 +++++----- drivers/gpu/drm/arm/malidp_mw.c | 6 +++--- drivers/gpu/drm/arm/malidp_planes.c | 4 ++-- 6 files changed, 25 insertions(+), 27 deletions(-) commit aefae8719a9aaede5032ca7331fc3cf65fd7ac7f Author: Danilo Krummrich Date: Wed Oct 26 17:59:30 2022 +0200 drm/arm/malidp: use drmm_* to allocate driver structures Use drm managed resources to allocate driver structures and get rid of the deprecated drm_dev_alloc() call and replace it with devm_drm_dev_alloc(). This also serves as preparation to get rid of drm_device->dev_private and to fix use-after-free issues on driver unload. Signed-off-by: Danilo Krummrich Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20221026155934.125294-2-dakr@redhat.com drivers/gpu/drm/arm/malidp_drv.c | 20 +++++++------------- drivers/gpu/drm/arm/malidp_drv.h | 1 + 2 files changed, 8 insertions(+), 13 deletions(-) commit 5524b5e52e08f675116a93296fe5bee60bc43c03 Author: Matthew Auld Date: Tue Nov 15 10:46:20 2022 +0000 drm/i915/ttm: never purge busy objects In i915_gem_madvise_ioctl() we immediately purge the object is not currently used, like when the mm.pages are NULL. With shmem the pages might still be hanging around or are perhaps swapped out. Similarly with ttm we might still have the pages hanging around on the ttm resource, like with lmem or shmem, but here we need to be extra careful since async unbinds are possible as well as in-progress kernel moves. In i915_ttm_purge() we expect the pipeline-gutting to nuke the ttm resource for us, however if it's busy the memory is only moved to a ghost object, which then leads to broken behaviour when for example clearing the i915_tt->filp, since the actual ttm_tt is still alive and populated, even though it's been moved to the ghost object. When we later destroy the ghost object we hit the following, since the filp is now NULL: [ +0.006982] #PF: supervisor read access in kernel mode [ +0.005149] #PF: error_code(0x0000) - not-present page [ +0.005147] PGD 11631d067 P4D 11631d067 PUD 115972067 PMD 0 [ +0.005676] Oops: 0000 [#1] PREEMPT SMP NOPTI [ +0.012962] Workqueue: events ttm_device_delayed_workqueue [ttm] [ +0.006022] RIP: 0010:i915_ttm_tt_unpopulate+0x3a/0x70 [i915] [ +0.005879] Code: 89 fb 48 85 f6 74 11 8b 55 4c 48 8b 7d 30 45 31 c0 31 c9 e8 18 6a e5 e0 80 7d 60 00 74 20 48 8b 45 68 8b 55 08 4c 89 e7 5b 5d <48> 8b 40 20 83 e2 01 41 5c 89 d1 48 8b 70 30 e9 42 b2 ff ff 4c 89 [ +0.018782] RSP: 0000:ffffc9000bf6fd70 EFLAGS: 00010202 [ +0.005244] RAX: 0000000000000000 RBX: ffff8883e12ae380 RCX: 0000000000000000 [ +0.007150] RDX: 000000008000000e RSI: ffffffff823559b4 RDI: ffff8883e12ae3c0 [ +0.007142] RBP: ffff888103b65d48 R08: 0000000000000001 R09: 0000000000000001 [ +0.007144] R10: 0000000000000001 R11: ffff88829c2c8040 R12: ffff8883e12ae3c0 [ +0.007148] R13: 0000000000000001 R14: ffff888115184140 R15: ffff888115184248 [ +0.007154] FS: 0000000000000000(0000) GS:ffff88844db00000(0000) knlGS:0000000000000000 [ +0.008108] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0.005763] CR2: 0000000000000020 CR3: 000000013fdb4004 CR4: 00000000003706e0 [ +0.007152] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ +0.007145] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ +0.007154] Call Trace: [ +0.002459] [ +0.002126] ttm_tt_unpopulate.part.0+0x17/0x70 [ttm] [ +0.005068] ttm_bo_tt_destroy+0x1c/0x50 [ttm] [ +0.004464] ttm_bo_cleanup_memtype_use+0x25/0x40 [ttm] [ +0.005244] ttm_bo_cleanup_refs+0x90/0x2c0 [ttm] [ +0.004721] ttm_bo_delayed_delete+0x235/0x250 [ttm] [ +0.004981] ttm_device_delayed_workqueue+0x13/0x40 [ttm] [ +0.005422] process_one_work+0x248/0x560 [ +0.004028] worker_thread+0x4b/0x390 [ +0.003682] ? process_one_work+0x560/0x560 [ +0.004199] kthread+0xeb/0x120 [ +0.003163] ? kthread_complete_and_exit+0x20/0x20 [ +0.004815] ret_from_fork+0x1f/0x30 v2: - Just use ttm_bo_wait() directly (Niranjana) - Add testcase reference Testcase: igt@gem_madvise@dontneed-evict-race Fixes: 213d50927763 ("drm/i915/ttm: Introduce a TTM i915 gem object backend") Reported-by: Niranjana Vishwanathapura Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das Cc: # v5.15+ Reviewed-by: Niranjana Vishwanathapura Acked-by: Nirmoy Das Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20221115104620.120432-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6915819f715c6b77595e6814d8f8b35770caafed Author: Nirmoy Das Date: Mon Oct 24 16:45:58 2022 +0200 drm/i915: Remove unwanted ghost obj check vm_fault_ttm() should not expect ttm ghost obj so remove that check. Suggested-by: Matthew Auld Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221024144558.27747-1-nirmoy.das@intel.com drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 3 --- 1 file changed, 3 deletions(-) commit 8c55facecd7ade835287298ce325f930d888d8ec Author: Vladimir Oltean Date: Mon Nov 14 16:42:56 2022 +0200 net: linkwatch: only report IF_OPER_LOWERLAYERDOWN if iflink is actually down RFC 2863 says: The lowerLayerDown state is also a refinement on the down state. This new state indicates that this interface runs "on top of" one or more other interfaces (see ifStackTable) and that this interface is down specifically because one or more of these lower-layer interfaces are down. DSA interfaces are virtual network devices, stacked on top of the DSA master, but they have a physical MAC, with a PHY that reports a real link status. But since DSA (perhaps improperly) uses an iflink to describe the relationship to its master since commit c084080151e1 ("dsa: set ->iflink on slave interfaces to the ifindex of the parent"), default_operstate() will misinterpret this to mean that every time the carrier of a DSA interface is not ok, it is because of the master being not ok. In fact, since commit c0a8a9c27493 ("net: dsa: automatically bring user ports down when master goes down"), DSA cannot even in theory be in the lowerLayerDown state, because it just calls dev_close_many(), thereby going down, when the master goes down. We could revert the commit that creates an iflink between a DSA user port and its master, especially since now we have an alternative IFLA_DSA_MASTER which has less side effects. But there may be tooling in use which relies on the iflink, which has existed since 2009. We could also probably do something local within DSA to overwrite what rfc2863_policy() did, in a way similar to hsr_set_operstate(), but this seems like a hack. What seems appropriate is to follow the iflink, and check the carrier status of that interface as well. If that's down too, yes, keep reporting lowerLayerDown, otherwise just down. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller net/core/link_watch.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit fd258f2aba2cfb2babe85b47ce01d0167c61a4db Merge: e88225656d30 9804985bf27f Author: David S. Miller Date: Wed Nov 16 09:43:36 2022 +0000 Merge branch 'udp-pernetns-hash' Kuniyuki Iwashima says: ==================== udp: Introduce optional per-netns hash table. This series is the UDP version of the per-netns ehash series [0], which were initially in the same patch set. [1] The notable difference with TCP is the max table size is 64K and the min size is 128. This is because the possible hash range by udp_hashfn() always fits in 64K within the same netns and because we want to keep a bitmap in udp_lib_get_port() on the stack. Also, the UDP per-netns table isolates both 1-tuple and 2-tuple tables. For details, please see the last patch. patch 1 - 4: prep for per-netns hash table patch 5: add per-netns hash table [0]: https://lore.kernel.org/netdev/20220908011022.45342-1-kuniyu@amazon.com/ [1]: https://lore.kernel.org/netdev/20220826000445.46552-1-kuniyu@amazon.com/ ==================== Signed-off-by: David S. Miller commit 9804985bf27f8fbcf0d96c7435b5ad94a2a6ea20 Author: Kuniyuki Iwashima Date: Mon Nov 14 13:57:57 2022 -0800 udp: Introduce optional per-netns hash table. The maximum hash table size is 64K due to the nature of the protocol. [0] It's smaller than TCP, and fewer sockets can cause a performance drop. On an EC2 c5.24xlarge instance (192 GiB memory), after running iperf3 in different netns, creating 32Mi sockets without data transfer in the root netns causes regression for the iperf3's connection. uhash_entries sockets length Gbps 64K 1 1 5.69 1Mi 16 5.27 2Mi 32 4.90 4Mi 64 4.09 8Mi 128 2.96 16Mi 256 2.06 32Mi 512 1.12 The per-netns hash table breaks the lengthy lists into shorter ones. It is useful on a multi-tenant system with thousands of netns. With smaller hash tables, we can look up sockets faster, isolate noisy neighbours, and reduce lock contention. The max size of the per-netns table is 64K as well. This is because the possible hash range by udp_hashfn() always fits in 64K within the same netns and we cannot make full use of the whole buckets larger than 64K. /* 0 < num < 64K -> X < hash < X + 64K */ (num + net_hash_mix(net)) & mask; Also, the min size is 128. We use a bitmap to search for an available port in udp_lib_get_port(). To keep the bitmap on the stack and not fire the CONFIG_FRAME_WARN error at build time, we round up the table size to 128. The sysctl usage is the same with TCP: $ dmesg | cut -d ' ' -f 6- | grep "UDP hash" UDP hash table entries: 65536 (order: 9, 2097152 bytes, vmalloc) # sysctl net.ipv4.udp_hash_entries net.ipv4.udp_hash_entries = 65536 # can be changed by uhash_entries # sysctl net.ipv4.udp_child_hash_entries net.ipv4.udp_child_hash_entries = 0 # disabled by default # ip netns add test1 # ip netns exec test1 sysctl net.ipv4.udp_hash_entries net.ipv4.udp_hash_entries = -65536 # share the global table # sysctl -w net.ipv4.udp_child_hash_entries=100 net.ipv4.udp_child_hash_entries = 100 # ip netns add test2 # ip netns exec test2 sysctl net.ipv4.udp_hash_entries net.ipv4.udp_hash_entries = 128 # own a per-netns table with 2^n buckets We could optimise the hash table lookup/iteration further by removing the netns comparison for the per-netns one in the future. Also, we could optimise the sparse udp_hslot layout by putting it in udp_table. [0]: https://lore.kernel.org/netdev/4ACC2815.7010101@gmail.com/ Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.rst | 27 +++++++++ include/linux/udp.h | 2 + include/net/netns/ipv4.h | 2 + net/ipv4/sysctl_net_ipv4.c | 40 +++++++++++++ net/ipv4/udp.c | 101 +++++++++++++++++++++++++++++++-- 5 files changed, 166 insertions(+), 6 deletions(-) commit ba6aac1516779dd0ced22c136a2c2c4a9c70cf29 Author: Kuniyuki Iwashima Date: Mon Nov 14 13:57:56 2022 -0800 udp: Access &udp_table via net. We will soon introduce an optional per-netns hash table for UDP. This means we cannot use udp_table directly in most places. Instead, access it via net->ipv4.udp_table. The access will be valid only while initialising udp_table itself and creating/destroying each netns. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/core/filter.c | 4 ++-- net/ipv4/udp.c | 23 +++++++++++++---------- net/ipv4/udp_diag.c | 6 +++--- net/ipv4/udp_offload.c | 5 +++-- net/ipv6/udp.c | 19 +++++++++++-------- net/ipv6/udp_offload.c | 5 +++-- 6 files changed, 35 insertions(+), 27 deletions(-) commit 478aee5d6bf617c932f4e9c2981f17e86e093fc5 Author: Kuniyuki Iwashima Date: Mon Nov 14 13:57:55 2022 -0800 udp: Set NULL to udp_seq_afinfo.udp_table. We will soon introduce an optional per-netns hash table for UDP. This means we cannot use the global udp_seq_afinfo.udp_table to fetch a UDP hash table. Instead, set NULL to udp_seq_afinfo.udp_table for UDP and get a proper table from net->ipv4.udp_table. Note that we still need udp_seq_afinfo.udp_table for UDP LITE. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/ipv4/udp.c | 32 ++++++++++++++++++++++++-------- net/ipv6/udp.c | 2 +- 2 files changed, 25 insertions(+), 9 deletions(-) commit 67fb43308f4b354f13aabcc66dd5d99bfbb7e838 Author: Kuniyuki Iwashima Date: Mon Nov 14 13:57:54 2022 -0800 udp: Set NULL to sk->sk_prot->h.udp_table. We will soon introduce an optional per-netns hash table for UDP. This means we cannot use the global sk->sk_prot->h.udp_table to fetch a UDP hash table. Instead, set NULL to sk->sk_prot->h.udp_table for UDP and get a proper table from net->ipv4.udp_table. Note that we still need sk->sk_prot->h.udp_table for UDP LITE. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + net/ipv4/udp.c | 15 +++++++++++---- net/ipv6/udp.c | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) commit 919dfa0b20ae56060dce0436eb710717f8987d18 Author: Kuniyuki Iwashima Date: Mon Nov 14 13:57:53 2022 -0800 udp: Clean up some functions. This patch adds no functional change and cleans up some functions that the following patches touch around so that we make them tidy and easy to review/revert. The change is mainly to keep reverse christmas tree order. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/ipv4/udp.c | 39 +++++++++++++++++++++++---------------- net/ipv6/udp.c | 12 ++++++++---- 2 files changed, 31 insertions(+), 20 deletions(-) commit a1d0b9535cd8ce6f6c6870fcac1760cbaafc0f48 Author: Dmitry Torokhov Date: Wed Nov 9 14:42:50 2022 -0800 wifi: wl1251: switch to using gpiod API Switch the driver from legacy gpio API to the newer gpiod API. Signed-off-by: Dmitry Torokhov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221109224250.2885119-3-dmitry.torokhov@gmail.com drivers/net/wireless/ti/wl1251/spi.c | 63 ++++++++++++++++++--------------- drivers/net/wireless/ti/wl1251/wl1251.h | 1 - 2 files changed, 34 insertions(+), 30 deletions(-) commit 06463f6e98df34908c26aa8e7a31a279646b1f51 Author: Dmitry Torokhov Date: Wed Nov 9 14:42:49 2022 -0800 wifi: wl1251: drop support for platform data Remove support for configuring the device via platform data because there are no users of wl1251_platform_data left in the mainline kernel. Signed-off-by: Dmitry Torokhov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221109224250.2885119-2-dmitry.torokhov@gmail.com MAINTAINERS | 1 - drivers/net/wireless/ti/Kconfig | 8 ----- drivers/net/wireless/ti/wilink_platform_data.c | 35 -------------------- drivers/net/wireless/ti/wl1251/sdio.c | 8 +---- drivers/net/wireless/ti/wl1251/spi.c | 15 ++------- drivers/net/wireless/ti/wlcore/spi.c | 1 - include/linux/wl12xx.h | 44 -------------------------- 7 files changed, 4 insertions(+), 108 deletions(-) commit e14e4c933e0047653f835e30d7d740ebb2a530cc Author: Dmitry Torokhov Date: Wed Nov 9 14:42:48 2022 -0800 ARM: OMAP2+: pdata-quirks: stop including wl12xx.h As of commit 2398c41d6432 ("omap: pdata-quirks: remove openpandora quirks for mmc3 and wl1251") the code no longer creates an instance of wl1251_platform_data, so there is no need for including this header. Signed-off-by: Dmitry Torokhov Acked-by: Tony Lindgren Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221109224250.2885119-1-dmitry.torokhov@gmail.com arch/arm/mach-omap2/pdata-quirks.c | 1 - 1 file changed, 1 deletion(-) commit 81c0b8928437ddfe87b0024c5bd817bc331d8524 Author: Christophe JAILLET Date: Sun Nov 13 16:49:18 2022 +0100 wifi: rtw89: Fix some error handling path in rtw89_core_sta_assoc() 'ret' is not updated after a function call in rtw89_core_sta_assoc(). This prevent error handling from working. Add the missing assignment. Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") Signed-off-by: Christophe JAILLET Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/7b1d82594635e4406d3438f33d8da29eaa056c5a.1668354547.git.christophe.jaillet@wanadoo.fr drivers/net/wireless/realtek/rtw89/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61ec34dee266f1cea092986d861a2cb136571199 Author: Christophe JAILLET Date: Sun Nov 13 16:42:21 2022 +0100 wifi: rtw89: Fix some error handling path in rtw89_wow_enable() 'ret' is not updated after several function calls in rtw89_wow_enable(). This prevent error handling from working. Add the missing assignments. Fixes: 19e28c7fcc74 ("wifi: rtw89: add WoWLAN function support") Signed-off-by: Christophe JAILLET Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/32320176eeff1c635baeea25ef0e87d116859e65.1668354083.git.christophe.jaillet@wanadoo.fr drivers/net/wireless/realtek/rtw89/wow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 89e706459848a7cc80f222a1999c0bfcdf63289f Author: Gustavo A. R. Silva Date: Tue Nov 8 14:27:49 2022 -0600 wifi: airo: Avoid clashing function prototypes When built with Control Flow Integrity, function prototypes between caller and function declaration must match. These mismatches are visible at compile time with the new -Wcast-function-type-strict in Clang[1]. Fix a total of 32 warnings like these: ../drivers/net/wireless/cisco/airo.c:7570:2: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, void *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict] (iw_handler) airo_config_commit, /* SIOCSIWCOMMIT */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The airo Wireless Extension handler callbacks (iw_handler) use a union for the data argument. Actually use the union and perform explicit member selection in the function body instead of having a function prototype mismatch. There are no resulting binary differences before/after changes. These changes were made partly manually and partly with the help of Coccinelle. Link: https://github.com/KSPP/linux/issues/236 Link: https://reviews.llvm.org/D134831 [1] Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/820abf91d12809904696ddb8925ec5e1e0da3e4c.1667934775.git.gustavoars@kernel.org drivers/net/wireless/cisco/airo.c | 204 ++++++++++++++++++++------------------ 1 file changed, 108 insertions(+), 96 deletions(-) commit ff7efc66b7ea7bd2e575b3d56e24628b2f418315 Author: Gustavo A. R. Silva Date: Tue Nov 8 14:26:47 2022 -0600 wifi: zd1201: Avoid clashing function prototypes When built with Control Flow Integrity, function prototypes between caller and function declaration must match. These mismatches are visible at compile time with the new -Wcast-function-type-strict in Clang[1]. Fix a total of 30 warnings like these: ../drivers/net/wireless/zydas/zd1201.c:1560:2: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, struct iw_freq *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict] (iw_handler) zd1201_set_freq, /* SIOCSIWFREQ */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ The zd1201 Wireless Extension handler callbacks (iw_handler) use a union for the data argument. Actually use the union and perform explicit member selection in the function body instead of having a function prototype mismatch.There are no resulting binary differences before/after changes. These changes were made partly manually and partly with the help of Coccinelle. Link: https://github.com/KSPP/linux/issues/233 Link: https://reviews.llvm.org/D134831 [1] Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/5b7fbb1a22d5bfaa872263ca20297de9b431d1ec.1667934775.git.gustavoars@kernel.org drivers/net/wireless/zydas/zd1201.c | 174 ++++++++++++++++++------------------ 1 file changed, 89 insertions(+), 85 deletions(-) commit fd7ef879a9835f9374fd611f2d6118e4a8f9b919 Author: Gustavo A. R. Silva Date: Tue Nov 8 14:25:17 2022 -0600 wifi: hostap: Avoid clashing function prototypes When built with Control Flow Integrity, function prototypes between caller and function declaration must match. These mismatches are visible at compile time with the new -Wcast-function-type-strict in Clang[1]. Fix a total of 42 warnings like these: ../drivers/net/wireless/intersil/hostap/hostap_ioctl.c:3868:2: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, char *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict] (iw_handler) prism2_get_name, /* SIOCGIWNAME */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ The hostap Wireless Extension handler callbacks (iw_handler) use a union for the data argument. Actually use the union and perform explicit member selection in the function body instead of having a function prototype mismatch. There are no resulting binary differences before/after changes. These changes were made partly manually and partly with the help of Coccinelle. Link: https://github.com/KSPP/linux/issues/235 Link: https://reviews.llvm.org/D134831 [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/e480e7713f1a4909ae011068c8d793cc4a638fbd.1667934775.git.gustavoars@kernel.org .../net/wireless/intersil/hostap/hostap_ioctl.c | 244 +++++++++++---------- 1 file changed, 133 insertions(+), 111 deletions(-) commit 02ae6a7034d7b2e3d89e33d73da10a1f156789a0 Author: Gustavo A. R. Silva Date: Tue Nov 8 14:23:55 2022 -0600 wifi: cfg80211: Avoid clashing function prototypes When built with Control Flow Integrity, function prototypes between caller and function declaration must match. These mismatches are visible at compile time with the new -Wcast-function-type-strict in Clang[1]. Fix a total of 73 warnings like these: drivers/net/wireless/intersil/orinoco/wext.c:1379:27: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, struct iw_param *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict] IW_HANDLER(SIOCGIWPOWER, (iw_handler)orinoco_ioctl_getpower), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../net/wireless/wext-compat.c:1607:33: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, struct iw_point *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict] [IW_IOCTL_IDX(SIOCSIWGENIE)] = (iw_handler) cfg80211_wext_siwgenie, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/wireless/intersil/orinoco/wext.c:1390:27: error: incompatible function pointer types initializing 'const iw_handler' (aka 'int (*const)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') with an expression of type 'int (struct net_device *, struct iw_request_info *, struct iw_param *, char *)' [-Wincompatible-function-pointer-types] IW_HANDLER(SIOCGIWRETRY, cfg80211_wext_giwretry), ^~~~~~~~~~~~~~~~~~~~~~ The cfg80211 Wireless Extension handler callbacks (iw_handler) use a union for the data argument. Actually use the union and perform explicit member selection in the function body instead of having a function prototype mismatch. There are no resulting binary differences before/after changes. These changes were made partly manually and partly with the help of Coccinelle. Link: https://github.com/KSPP/linux/issues/234 Link: https://reviews.llvm.org/D134831 [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/a68822bf8dd587988131bb6a295280cb4293f05d.1667934775.git.gustavoars@kernel.org drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +- drivers/net/wireless/intersil/orinoco/wext.c | 22 ++-- include/net/cfg80211-wext.h | 20 +-- net/wireless/scan.c | 3 +- net/wireless/wext-compat.c | 180 ++++++++++++--------------- net/wireless/wext-compat.h | 8 +- net/wireless/wext-sme.c | 5 +- 7 files changed, 113 insertions(+), 127 deletions(-) commit 2c0e077db65a9410a2f0a36526918c77098a85a6 Author: Gustavo A. R. Silva Date: Tue Nov 8 14:21:24 2022 -0600 wifi: orinoco: Avoid clashing function prototypes When built with Control Flow Integrity, function prototypes between caller and function declaration must match. These mismatches are visible at compile time with the new -Wcast-function-type-strict in Clang[1]. Fix a total of 43 warnings like these: drivers/net/wireless/intersil/orinoco/wext.c:1379:27: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, struct iw_param *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict] IW_HANDLER(SIOCGIWPOWER, (iw_handler)orinoco_ioctl_getpower), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The orinoco Wireless Extension handler callbacks (iw_handler) use a union for the data argument. Actually use the union and perform explicit member selection in the function body instead of having a function prototype mismatch. No significant binary differences were seen before/after changes. These changes were made partly manually and partly with the help of Coccinelle. Link: https://github.com/KSPP/linux/issues/234 Link: https://reviews.llvm.org/D134831 [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/e564003608a1f2ad86283370ef816805c92b30f6.1667934775.git.gustavoars@kernel.org drivers/net/wireless/intersil/orinoco/wext.c | 109 +++++++++++++++------------ 1 file changed, 62 insertions(+), 47 deletions(-) commit 60d18ddb53ced444a739b05473dcdc6048421f33 Author: Bitterblue Smith Date: Thu Nov 10 16:01:18 2022 +0200 wifi: rtl8xxxu: Use u32_get_bits in *_identify_chip It simplifies the code a bit. Suggested-by: Ping-Ke Shih Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/68f94284-3728-7b75-2b7b-64fae8af6bc5@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 3 +-- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 5 ++--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 ++--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 5 ++--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 5 ++--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 1 - 6 files changed, 9 insertions(+), 15 deletions(-) commit 9b00565abf3f961b10b2fdf8f762e10ef4cf3acd Author: Bitterblue Smith Date: Thu Nov 10 15:59:29 2022 +0200 wifi: rtl8xxxu: Use strscpy instead of sprintf Fill priv->chip_name and priv->chip_vendor with strscpy instead of sprintf. This is just to prevent future bugs in case the name of a chip/vendor becomes longer than the size of chip_name/chip_vendor. Suggested-by: Ping-Ke Shih Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/5fc9cc0e-eecb-8428-aeb1-f745791c0f16@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 8 ++++---- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 4 ++-- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 12 ++++++------ 6 files changed, 15 insertions(+), 15 deletions(-) commit 486e0315c4a1f4e8ea8da0e7de92d89ee8e1ba0a Author: Bitterblue Smith Date: Thu Nov 10 15:58:16 2022 +0200 wifi: rtl8xxxu: Name some bits used in burst init Use descriptive names instead of magic numbers. Suggested-by: Ping-Ke Shih Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/e7d05bd9-e096-8361-f1b4-3c8b8599a7eb@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 10 +++++----- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) commit 56d7bd74a15a9c93c21e07de0a36a378576827cf Author: Andrzej Hajda Date: Wed Oct 19 23:59:06 2022 +0200 drm/i915/selftests: add igt_vma_move_to_active_unlocked All calls to i915_vma_move_to_active are surrounded by vma lock and/or there are multiple local helpers for it in particular tests. Let's replace it by common helper. The patch should not introduce functional changes. Signed-off-by: Andrzej Hajda Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221019215906.295296-3-andrzej.hajda@intel.com .../drm/i915/gem/selftests/i915_gem_client_blt.c | 20 ++++--------------- drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.h | 14 +++++++++++++ drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 22 +++------------------ drivers/gpu/drm/i915/gt/selftest_lrc.c | 23 +++++----------------- drivers/gpu/drm/i915/gt/selftest_mocs.c | 1 + drivers/gpu/drm/i915/selftests/igt_spinner.c | 17 ++-------------- 6 files changed, 29 insertions(+), 68 deletions(-) commit 2a76fc899a043160ed20bef83435ff464c655815 Author: Andrzej Hajda Date: Wed Oct 19 23:59:05 2022 +0200 drm/i915: call i915_request_await_object from _i915_vma_move_to_active Since almost all calls to i915_vma_move_to_active are prepended with i915_request_await_object, let's call the latter from _i915_vma_move_to_active by default and add flag allowing bypassing it. Adjust all callers accordingly. The patch should not introduce functional changes. Signed-off-by: Andrzej Hajda Acked-by: Tvrtko Ursulin Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221019215906.295296-2-andrzej.hajda@intel.com drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 17 +++++++++-------- .../drm/i915/gem/selftests/i915_gem_client_blt.c | 4 +--- .../drm/i915/gem/selftests/i915_gem_coherency.c | 4 +--- .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 16 ++++------------ drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 10 +++------- drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c | 8 ++------ drivers/gpu/drm/i915/gt/intel_renderstate.c | 4 +--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 +--- drivers/gpu/drm/i915/gt/selftest_execlists.c | 14 +++----------- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 17 ++++------------- drivers/gpu/drm/i915/gt/selftest_lrc.c | 12 +++--------- drivers/gpu/drm/i915/gt/selftest_mocs.c | 4 +--- drivers/gpu/drm/i915/gt/selftest_rps.c | 8 ++------ drivers/gpu/drm/i915/gt/selftest_workarounds.c | 22 ++++++---------------- drivers/gpu/drm/i915/gvt/scheduler.c | 5 ++--- drivers/gpu/drm/i915/i915_perf.c | 4 +--- drivers/gpu/drm/i915/i915_vma.c | 5 +++++ drivers/gpu/drm/i915/i915_vma.h | 1 + drivers/gpu/drm/i915/selftests/i915_request.c | 9 ++------- drivers/gpu/drm/i915/selftests/igt_spinner.c | 5 +---- 20 files changed, 53 insertions(+), 120 deletions(-) commit e948023d5fc8e4a5e79e5ded53c2a1d1d7041ee6 Author: Bitterblue Smith Date: Sun Nov 6 00:54:56 2022 +0200 wifi: rtl8xxxu: Rename rtl8xxxu_8188f_channel_to_group This name is an anomaly. Change it to rtl8188f_channel_to_group to follow the same pattern as the other functions. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Acked-by: Jes Sorensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/ba8e3ea2-74f5-e1db-296e-4ae5f03084dc@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14566bbfdfaf3784f43ea9ca6769463dd6bed1e2 Author: Bitterblue Smith Date: Sun Nov 6 00:54:22 2022 +0200 wifi: rtl8xxxu: Split up rtl8xxxu_identify_chip Move the reusable parts into separate functions and create one identify_chip function for each chip type. This is preparation for supporting the RTL8710BU chip, which would need too many ugly changes to this function. Another reason to do this is to get rid of the long and scary if..else if..else block in the middle of the function. Everything should still work the same as before. Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/b268b5cf-071c-6292-0d90-0573e4fb2228@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 5 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 32 ++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 60 ++++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 49 +++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 51 +++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 49 +++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 207 +++++---------------- 7 files changed, 297 insertions(+), 156 deletions(-) commit bcfcb712e41401887930361946666549e8ba7747 Author: Bitterblue Smith Date: Sun Nov 6 00:53:17 2022 +0200 wifi: rtl8xxxu: Move burst init to a function No changes to functionality, just moving code to make rtl8xxxu_init_device look nicer. Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/bef90bf8-716f-c92f-9403-12ef2bfefc15@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 89 ++++++++++++---------- 4 files changed, 52 insertions(+), 41 deletions(-) commit 40059212f99c31f26c69763e560325e59eac02c6 Author: Nishanth Menon Date: Tue Nov 15 17:10:21 2022 -0600 dt-bindings: gpio: gpio-davinci: Increase maxItems in gpio-line-names gpio-line-names really depends on ti,ngpios. However, the maximum value we have seen across the board is on K2G and da850 platforms where it can be upto 144. Link: https://lore.kernel.org/linux-arm-kernel/20221115200357.qa2rvw3clbz7unzq@symptom/T/#u Fixes: c830b87a761b ("dt-bindings: gpio: gpio-davinci: Convert to json-schema") Reported-by: Robert Nelson Signed-off-by: Nishanth Menon Acked-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski Documentation/devicetree/bindings/gpio/gpio-davinci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fd3f7be339899b1dff8b5646822ac48fba3d587 Merge: 24c94060fc9b 8d259847243d Author: Bartosz Golaszewski Date: Wed Nov 16 10:20:33 2022 +0100 Merge tag 'intel-gpio-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-next intel-gpio for v6.2-1 * Miscellaneous updates to the core (cdev, acpi) and Intel Merrifield driver The following is an automated git shortlog grouped by driver: gpiolib: - cdev: Fix typo in kernel doc for struct line - acpi: Use METHOD_NAME__AEI macro for acpi_walk_resources merrifield: - Use str_enable_disable() helper commit 24c94060fc9b4e0f19e6e018869db46db21d6bc7 Author: Brian Masney Date: Mon Nov 14 15:29:43 2022 -0500 gpiolib: ensure that fwnode is properly set Note that this is a RFC patch and not meant to be merged. I looked into a problem with linux-next-20221110 on the Qualcomm SA8540P automotive board (sc8280xp) where the UFS host controller would fail to probe due to repeated probe deferrals when trying to get reset-gpios via devm_gpiod_get_optional(). of_get_named_gpiod_flags() returns -EPROBE_DEFER, which is caused by of_gpiochip_match_node_and_xlate() returning 0 since the of_xlate function pointer is not set for the qcom,sc8280xp-tlmm pinctrl driver. The pinctrl driver doesn't define one, so of_gpiochip_add() should automatically setup of_gpio_simple_xlate() on it's behalf. This doesn't happen since the fwnode member on the struct gpiochip is set to null when of_gpiochip_add() is called. Let's work around this by ensuring that it's set if available. Note that this broke sometime within the last few weeks within linux-next and I haven't bisected this. I'm posting this in the hopes that someone may know offhand which patch(es) may have broken this. Signed-off-by: Brian Masney Tested-by: Marijn Suijten Tested-by: Konrad Dybcio Tested-by: Steev Klimaszewski #Lenovo Thinkpad X13s Tested-by: Neil Armstrong Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6962c4fe8f96f7d384d6489b6b5ab5bf3e35991 Author: Tianchen Ding Date: Fri Nov 4 10:36:01 2022 +0800 sched: Clear ttwu_pending after enqueue_task() We found a long tail latency in schbench whem m*t is close to nr_cpus. (e.g., "schbench -m 2 -t 16" on a machine with 32 cpus.) This is because when the wakee cpu is idle, rq->ttwu_pending is cleared too early, and idle_cpu() will return true until the wakee task enqueued. This will mislead the waker when selecting idle cpu, and wake multiple worker threads on the same wakee cpu. This situation is enlarged by commit f3dd3f674555 ("sched: Remove the limitation of WF_ON_CPU on wakelist if wakee cpu is idle") because it tends to use wakelist. Here is the result of "schbench -m 2 -t 16" on a VM with 32vcpu (Intel(R) Xeon(R) Platinum 8369B). Latency percentiles (usec): base base+revert_f3dd3f674555 base+this_patch 50.0000th: 9 13 9 75.0000th: 12 19 12 90.0000th: 15 22 15 95.0000th: 18 24 17 *99.0000th: 27 31 24 99.5000th: 3364 33 27 99.9000th: 12560 36 30 We also tested on unixbench and hackbench, and saw no performance change. Signed-off-by: Tianchen Ding Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mel Gorman Link: https://lkml.kernel.org/r/20221104023601.12844-1-dtcccc@linux.alibaba.com kernel/sched/core.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 2d08a893b87cf9b2f9dbb3afaff60ca4530d55a2 Author: Sean Christopherson Date: Thu Nov 10 20:17:07 2022 +0000 x86/debug: Include percpu.h in debugreg.h to get DECLARE_PER_CPU() et al Include percpu.h to pick up the definition of DECLARE_PER_CPU() and friends instead of relying on the parent to provide the #include. E.g. swapping the order of includes in arch/x86/kvm/vmx/nested.c (simulating KVM code movement being done for other purposes) results in build errors: In file included from arch/x86/kvm/vmx/nested.c:3: arch/x86/include/asm/debugreg.h:9:32: error: unknown type name ‘cpu_dr7â€=99 9 | DECLARE_PER_CPU(unsigned long, cpu_dr7); | ^~~~~~~ Signed-off-by: Sean Christopherson Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221110201707.1976032-1-seanjc@google.com arch/x86/include/asm/debugreg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e88225656d302eb369668003a622b7a7baef1f43 Merge: 7d63b21d2745 50f8f2f7fbf2 Author: David S. Miller Date: Wed Nov 16 09:07:03 2022 +0000 Merge branch 'sfc-TC-offload-counters' Edward Cree says: ==================== sfc: TC offload counters EF100 hardware supports attaching counters to action-sets in the MAE. Use these counters to implement stats for TC flower offload. The counters are delivered to the host over a special hardware RX queue which should only ever receive counter update messages, not 'real' network packets. ==================== Signed-off-by: David S. Miller commit 50f8f2f7fbf2f237a7938890f46c3edce0f51501 Author: Edward Cree Date: Mon Nov 14 13:16:01 2022 +0000 sfc: implement counters readout to TC stats On FLOW_CLS_STATS, look up the MAE counter by TC cookie, and report the change in packet and byte count since the last time FLOW_CLS_STATS read them. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/tc.c | 39 ++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/tc_counters.c | 10 +++++++++ drivers/net/ethernet/sfc/tc_counters.h | 3 +++ 3 files changed, 52 insertions(+) commit 83a187a4eb3a8d7b747e7cfd48228dbc4dbb5c92 Author: Edward Cree Date: Mon Nov 14 13:16:00 2022 +0000 sfc: validate MAE action order Currently the only actions supported are COUNT and DELIVER, which can only happen in the right order; but when more actions are added, it will be necessary to check that they are only used in the same order in which the hardware performs them (since the hardware API takes an action *set* in which the order is implicit). For instance, a VLAN pop must not follow a VLAN push. Most practical use-cases should be unaffected by these restrictions. Add a function efx_tc_flower_action_order_ok() that checks whether it is appropriate to add a specified action to the existing action-set. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/tc.c | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 2e0f1eb05692b489bb9fdd30617b52022a93b2e3 Author: Edward Cree Date: Mon Nov 14 13:15:59 2022 +0000 sfc: attach an MAE counter to TC actions that need it The only actions that expect stats (that sfc HW supports) are gact shot (drop), mirred redirect and mirred mirror. Since these are 'deliverish' actions that end an action-set, we only require at most one counter per action-set. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mae.c | 8 ++++++-- drivers/net/ethernet/sfc/tc.c | 25 +++++++++++++++++++++++++ drivers/net/ethernet/sfc/tc.h | 1 + 3 files changed, 32 insertions(+), 2 deletions(-) commit c4bad432b95a91a4f123159e5b8220bd026dc166 Author: Edward Cree Date: Mon Nov 14 13:15:58 2022 +0000 sfc: accumulate MAE counter values from update packets Add the packet and byte counts to the software running total, and store the latest jiffies every time the counter is bumped. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/tc_counters.c | 54 +++++++++++++++++++++++++++++++++- drivers/net/ethernet/sfc/tc_counters.h | 4 +++ 2 files changed, 57 insertions(+), 1 deletion(-) commit 0363aa295781a3ad160b2b562dc0460b331db06c Author: Edward Cree Date: Mon Nov 14 13:15:57 2022 +0000 sfc: add functions to allocate/free MAE counters efx_tc_flower_get_counter_index() will create an MAE counter mapped to the passed (TC filter) cookie, or increment the reference if one already exists for that cookie. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mae.c | 51 +++++++++++++++ drivers/net/ethernet/sfc/mae.h | 3 + drivers/net/ethernet/sfc/tc_counters.c | 109 +++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/tc_counters.h | 7 +++ 4 files changed, 170 insertions(+) commit 19a0c989104a08c07c97f8713d083cc635ef8d01 Author: Edward Cree Date: Mon Nov 14 13:15:56 2022 +0000 sfc: add hashtables for MAE counters and counter ID mappings Nothing populates them yet. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/tc.c | 6 ++++ drivers/net/ethernet/sfc/tc.h | 4 +++ drivers/net/ethernet/sfc/tc_counters.c | 61 ++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/tc_counters.h | 19 +++++++++++ 4 files changed, 90 insertions(+) commit 25730d8be5d8bc691ed89dca065f2b229b244ae0 Author: Edward Cree Date: Mon Nov 14 13:15:55 2022 +0000 sfc: add extra RX channel to receive MAE counter updates on ef100 Currently there is no counter-allocating machinery to connect the resulting counter update values to; that will be added in a subsequent patch. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/Makefile | 2 +- drivers/net/ethernet/sfc/mae_counter_format.h | 73 +++++++ drivers/net/ethernet/sfc/net_driver.h | 3 +- drivers/net/ethernet/sfc/tc.c | 1 + drivers/net/ethernet/sfc/tc.h | 9 +- drivers/net/ethernet/sfc/tc_counters.c | 269 ++++++++++++++++++++++++++ drivers/net/ethernet/sfc/tc_counters.h | 26 +++ 7 files changed, 373 insertions(+), 10 deletions(-) commit e5731274cdd186a362beba1bbf0cc35e1dd5f547 Author: Edward Cree Date: Mon Nov 14 13:15:54 2022 +0000 sfc: add ef100 MAE counter support functions Start and stop MAE counter streaming, and grant credits. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mae.c | 111 ++++++++++++++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/mae.h | 4 ++ drivers/net/ethernet/sfc/mcdi.h | 5 ++ drivers/net/ethernet/sfc/tc.c | 1 + drivers/net/ethernet/sfc/tc.h | 18 +++++++ 5 files changed, 139 insertions(+) commit 36df6136a7d0a32f6b7e5862aeef4702b8b087d2 Author: Edward Cree Date: Mon Nov 14 13:15:53 2022 +0000 sfc: add ability for extra channels to receive raw RX buffers The TC extra channel will need its own special RX handling, which must operate before any code that expects the RX buffer to contain a network packet; buffers on this RX queue contain MAE counter packets in a special format that does not resemble an Ethernet frame, and many fields of the RX packet prefix are not populated. The USER_MARK field, however, is populated with the generation count from the counter subsystem, which needs to be passed on to the RX handler. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_rx.c | 7 +++++++ drivers/net/ethernet/sfc/net_driver.h | 2 ++ 2 files changed, 9 insertions(+) commit 85697f97fd3cdb1766ba53ac2d129bbc34e6df98 Author: Edward Cree Date: Mon Nov 14 13:15:52 2022 +0000 sfc: add start and stop methods to channels The TC extra channel needs to do extra work in efx_{start,stop}_channels() to start/stop MAE counter streaming from the hardware. Add callbacks for it to implement. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx_channels.c | 9 ++++++++- drivers/net/ethernet/sfc/net_driver.h | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit e395153984871e33624ce5e3f72038de979f5b3e Author: Edward Cree Date: Mon Nov 14 13:15:51 2022 +0000 sfc: add ability for an RXQ to grant credits on refill EF100 hardware streams MAE counter updates to the driver over a dedicated RX queue; however, the MCPU is not able to detect when RX buffers have been posted to the ring. Thus, the driver must call MC_CMD_MAE_COUNTERS_STREAM_GIVE_CREDITS; this patch adds the infrastructure to support that to the core RXQ handling code. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_rx.c | 14 +++++++++++--- drivers/net/ethernet/sfc/net_driver.h | 8 ++++++++ drivers/net/ethernet/sfc/rx_common.c | 3 +++ 3 files changed, 22 insertions(+), 3 deletions(-) commit 5ae0c22634029da089dc7ce2602679ba9005dc51 Author: Edward Cree Date: Mon Nov 14 13:15:50 2022 +0000 sfc: fix ef100 RX prefix macro Macro PREFIX_WIDTH_MASK uses unsigned long arithmetic for a shift of up to 32 bits, which breaks on 32-bit systems. This did not previously show up as we weren't using any fields of width 32, but we now need to access ESF_GZ_RX_PREFIX_USER_MARK. Change it to unsigned long long. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef100_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5664561cbb8b2efe143df94ac17db23971e6d243 Author: Lucas De Marchi Date: Tue Nov 15 11:26:11 2022 -0800 drm/i915: Update workaround documentation There were several updates in the driver on how the workarounds are handled since its documentation was written. Update the documentation to reflect the current reality. v2: - Remove footnote that was wrongly referenced, adding back the reference in the correct paragraph. - Remove "Display workarounds" and just mention "display IP" under "Other" category since all of them are peppered around the driver. Cc: Matt Roper Signed-off-by: Lucas De Marchi Acked-by: Balasubramani Vivekanandan # v1 Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221115192611.179981-1-lucas.demarchi@intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 80 ++++++++++++++++++----------- 1 file changed, 50 insertions(+), 30 deletions(-) commit 777bcc85e1fbadfea1927e828165102cf5050b53 Author: Geert Uytterhoeven Date: Tue Nov 15 09:34:14 2022 +0100 clk: renesas: r8a779f0: Fix Ethernet Switch clocks The RSwitch2 and EtherTSN-IF clocks were accidentally mixed up. While at it, rename them to better match the (future) documentation. Fixes: a3b4137a4d4023e6 ("clk: renesas: r8a779f0: Add Ethernet Switch clocks") Tested-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/99b8b41bd2c5043c9e457862ef4bc144869eca58.1668501212.git.geert+renesas@glider.be drivers/clk/renesas/r8a779f0-cpg-mssr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66f6fd278c6780ea8c8bb7dac839132d8e76dd53 Author: David Howells Date: Mon Nov 14 11:24:09 2022 +0000 rxrpc: Fix network address validation Fix network address validation on entry to uapi functions such as connect() for AF_RXRPC. The check for address compatibility with the transport socket isn't correct and allows an AF_INET6 address to be given to an AF_INET socket, resulting in an oops now that rxrpc is calling udp_sendmsg() directly. Sample program: #define _GNU_SOURCE #include #include #include #include #include static unsigned char ctrl[256] = "\x18\x00\x00\x00\x00\x00\x00\x00\x10\x01\x00\x00\x01"; int main(void) { struct sockaddr_rxrpc srx = { .srx_family = AF_RXRPC, .transport_type = SOCK_DGRAM, .transport_len = 28, .transport.sin6.sin6_family = AF_INET6, }; struct mmsghdr vec = { .msg_hdr.msg_control = ctrl, .msg_hdr.msg_controllen = 0x18, }; int s; s = socket(AF_RXRPC, SOCK_DGRAM, AF_INET); if (s < 0) { perror("socket"); exit(1); } if (connect(s, (struct sockaddr *)&srx, sizeof(srx)) < 0) { perror("connect"); exit(1); } if (sendmmsg(s, &vec, 1, MSG_NOSIGNAL | MSG_MORE) < 0) { perror("sendmmsg"); exit(1); } return 0; } If working properly, connect() should fail with EAFNOSUPPORT. Fixes: ed472b0c8783 ("rxrpc: Call udp_sendmsg() directly") Reported-by: Eric Dumazet Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/af_rxrpc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 6423ac2eb31ec33f8526dc48f1e541b665333970 Author: David Howells Date: Fri Nov 11 16:00:21 2022 +0000 rxrpc: Fix oops from calling udpv6_sendmsg() on AF_INET socket If rxrpc sees an IPv6 address, it assumes it can call udpv6_sendmsg() on it - even if it got it on an IPv4 socket. Fix do_udp_sendmsg() to give an error in such a case. general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] ... RIP: 0010:ipv6_addr_v4mapped include/net/ipv6.h:749 [inline] RIP: 0010:udpv6_sendmsg+0xd0a/0x2c70 net/ipv6/udp.c:1361 ... Call Trace: do_udp_sendmsg net/rxrpc/output.c:27 [inline] do_udp_sendmsg net/rxrpc/output.c:21 [inline] rxrpc_send_abort_packet+0x73b/0x860 net/rxrpc/output.c:367 rxrpc_release_calls_on_socket+0x211/0x300 net/rxrpc/call_object.c:595 rxrpc_release_sock net/rxrpc/af_rxrpc.c:886 [inline] rxrpc_release+0x263/0x5a0 net/rxrpc/af_rxrpc.c:917 __sock_release+0xcd/0x280 net/socket.c:650 sock_close+0x18/0x20 net/socket.c:1365 __fput+0x27c/0xa90 fs/file_table.c:320 task_work_run+0x16b/0x270 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xb35/0x2a20 kernel/exit.c:820 do_group_exit+0xd0/0x2a0 kernel/exit.c:950 __do_sys_exit_group kernel/exit.c:961 [inline] __se_sys_exit_group kernel/exit.c:959 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:959 Fixes: ed472b0c8783 ("rxrpc: Call udp_sendmsg() directly") Reported-by: Eric Dumazet Suggested-by: Eric Dumazet Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/output.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 86bfee318b546c03d954e863fc1af43960cb06e2 Author: Krzysztof Kozlowski Date: Thu Nov 10 09:52:30 2022 +0100 dt-bindings: pinctrl: qcom,msm8976: convert to dtschema Convert Qualcomm MSM8976 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Changes during conversion: update the list of non-mux pins (like sdc1) to match Linux driver. Reviewed-by: Linus Walleij Reviewed-by: Marijn Suijten Link: https://lore.kernel.org/r/20221110085230.15108-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8976-pinctrl.txt | 183 --------------------- .../bindings/pinctrl/qcom,msm8976-pinctrl.yaml | 136 +++++++++++++++ 2 files changed, 136 insertions(+), 183 deletions(-) commit be5dd7d8359de9fb22115a63f09981cdf689db4f Author: Eray Orçunus Date: Sat Oct 29 15:03:09 2022 +0300 platform/x86: ideapad-laptop: Add new _CFG bit numbers for future use Later IdeaPads report various things in last 8 bits of _CFG, at least 5 of them represent supported on-screen-displays. Add those bit numbers to the enum, and use CFG_OSD_ as prefix of their names. Also expose the values of these bits to debugfs, since they can be useful. Signed-off-by: Eray Orçunus Acked-by: Ike Panhc Link: https://lore.kernel.org/r/20221029120311.11152-5-erayorcunus@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/ideapad-laptop.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit 5831882880e9a1749553e78f9d8369fe33116aaf Author: Eray Orçunus Date: Sat Oct 29 15:03:06 2022 +0300 platform/x86: ideapad-laptop: Revert "check for touchpad support in _CFG" Last 8 bit of _CFG started being used in later IdeaPads, thus 30th bit doesn't always show whether device supports touchpad or touchpad switch. Remove checking bit 30 of _CFG, so older IdeaPads like S10-3 can switch touchpad again via touchpad attribute. This reverts commit b3ed1b7fe378 ("platform/x86: ideapad-laptop: check for touchpad support in _CFG"). Signed-off-by: Eray Orçunus Acked-by: Ike Panhc Link: https://lore.kernel.org/r/20221029120311.11152-2-erayorcunus@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/ideapad-laptop.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit c7891884a55effcf3e54e25835ef9fac39ef48f3 Author: Armin Wolf Date: Wed Nov 2 22:23:36 2022 +0100 platform/x86: dell-ddv: Warn if ePPID has a suspicious length On some systems (like the Dell Inspiron 3505), the acpi operation region holding the ePPID string is two bytes too short, causing acpi functions like ToString() to omit the last two bytes. This does not happen on Windows, supposedly due to their implementation of ToString() ignoring buffer boundaries. Inform users if the ePPID length differs from the Dell specification so they can complain to Dell to fix their BIOS. Tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20221102212336.380257-2-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/dell/dell-wmi-ddv.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 84fa20c2a56a9d941fef68dd2c1d489a5f24daa7 Author: Armin Wolf Date: Wed Nov 2 22:23:35 2022 +0100 platform/x86: dell-ddv: Improve buffer handling When the DDV interface returns a buffer, it actually returns a acpi buffer containing an integer (buffer size) and another acpi buffer (buffer content). The size of the buffer may be smaller than the size of the buffer content, which is perfectly valid and should not be treated as an error. Also use the buffer size instead of the buffer content size when accessing the buffer to prevent accessing bogus data. Tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20221102212336.380257-1-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/dell/dell-wmi-ddv.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 93b962ddd69a11c956e40b26e494132c514608a9 Author: chen zhang Date: Thu Nov 3 09:33:13 2022 +0800 platform/x86: ISST: Fix typo in comments Fix spelling typo in comments. Reported-by: k2ci Signed-off-by: chen zhang Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20221103013313.13278-1-chenzhang@kylinos.cn Signed-off-by: Hans de Goede drivers/platform/x86/intel/speed_select_if/isst_if_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2621779604c995c4f0e4a08e4c352d524b930fdf Author: Barnabás Pőcze Date: Fri Oct 21 18:17:28 2022 +0000 platform/x86: thinkpad_acpi: use strstarts() There is a function, `strstarts()`, in linux/string.h to check if a string is prefix of another. So remove the custom version from the driver. Signed-off-by: Barnabás Pőcze Link: https://lore.kernel.org/r/20221021180007.55535-1-pobrn@protonmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 58 +++++++++++++++++------------------- 1 file changed, 27 insertions(+), 31 deletions(-) commit 6e9b8992b122cb12688bd259fc99e67d1be234eb Author: Jorge Lopez Date: Thu Oct 20 15:10:28 2022 -0500 platform/x86: Move existing HP drivers to a new hp subdir The purpose of this patch is to provide a central location where all HP related drivers are found. HP drivers will recide under drivers/platform/x86/hp directory. Introduce changes to Kconfig file to list all HP driver under "HP X86 Platform Specific Device Drivers" menu option. Additional changes include update MAINTAINERS file to indicate hp related drivers new path. Signed-off-by: Jorge Lopez Link: https://lore.kernel.org/r/20221020201033.12790-2-jorge.lopez2@hp.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede MAINTAINERS | 4 +- drivers/platform/x86/Kconfig | 43 +------------------- drivers/platform/x86/Makefile | 4 +- drivers/platform/x86/hp/Kconfig | 63 ++++++++++++++++++++++++++++++ drivers/platform/x86/hp/Makefile | 10 +++++ drivers/platform/x86/{ => hp}/hp-wmi.c | 0 drivers/platform/x86/{ => hp}/hp_accel.c | 2 +- drivers/platform/x86/{ => hp}/tc1100-wmi.c | 0 8 files changed, 78 insertions(+), 48 deletions(-) commit 26174aaee3832d681dcc0744b005021c7480a8f6 Author: Jilin Yuan Date: Wed Oct 19 20:53:55 2022 +0800 platform/x86/intel: pmc: Fix repeated word in comment Delete the redundant word 'to'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20221019125355.50674-1-yuanjilin@cdjrlc.com Signed-off-by: Hans de Goede drivers/platform/x86/intel/pmc/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc05ea63b39420fd561dcffba00753da90338ea8 Author: Liming Sun Date: Tue Oct 18 09:33:03 2022 -0400 platform/mellanox: Add BlueField-3 support in the tmfifo driver BlueField-3 uses the same control registers in tmfifo access but at different addresses. This commit replaces the offset reference with pointers, and set up these pointers in the probe functions accordingly. Signed-off-by: Liming Sun Reviewed-by: David Thompson Reviewed-by: Vadim Pasternak Link: https://lore.kernel.org/r/20221018133303.243920-1-limings@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/mellanox/mlxbf-tmfifo-regs.h | 10 ++++ drivers/platform/mellanox/mlxbf-tmfifo.c | 86 ++++++++++++++++++++------- 2 files changed, 74 insertions(+), 22 deletions(-) commit db5e2a4ca0a7a5fe54f410590292ea2e91de6798 Author: Hans de Goede Date: Mon Nov 7 13:43:22 2022 +0100 platform/x86: thinkpad_acpi: Fix max_brightness of thinklight Thinklight has only two values, on/off so it's reasonable for max_brightness to be 0 and 1 as if you write anything between 0 and 255 it will be 255 anyway so there's no point for it to be 255. This may look like it is a userspace API change, but writes with a value larget then the new max_brightness will still be accepted, these will be silently clamped to the new max_brightness by led_set_brightness_nosleep(). So no userspace API problems are expected. Reported-by: Michał Szczepaniak Link: https://lore.kernel.org/platform-driver-x86/55400326-e64f-5444-94e5-22b8214d00b6@gmail.com/ Signed-off-by: Hans de Goede drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+) commit e57d58ee1868b1ad3e8040335a2941506feb52e4 Author: Barnabás Pőcze Date: Wed Oct 5 15:00:51 2022 +0000 platform/x86: huawei-wmi: remove unnecessary member The `huawei_wmi::idev` array is not actually used by the driver, so remove it. The piece of code that - I believe - was supposed to fill the array is flawed, it did not actually set any of the values inside the array. This was most likely masked by the fact that the input devices are devm managed and that the only function that needs a reference to the input devices is `huawei_wmi_input_notify()`, however, that does not access the appropriate input device via the `huawei_wmi` object. Signed-off-by: Barnabás Pőcze Link: https://lore.kernel.org/r/20221005150032.173198-3-pobrn@protonmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/huawei-wmi.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 0b9a1dcdb6a2c841899389bf2dd7a3e0e2aa0e99 Author: Barnabás Pőcze Date: Wed Oct 5 15:00:45 2022 +0000 platform/x86: huawei-wmi: fix return value calculation Previously, `huawei_wmi_input_setup()` returned the result of logical or-ing the return values of two functions that return negative errno-style error codes and one that returns `acpi_status`. If this returned value was non-zero, then it was propagated from the platform driver's probe function. That function should return a negative errno-style error code, so the result of the logical or that `huawei_wmi_input_setup()` returned was not appropriate. Fix that by checking each function separately and returning the error code unmodified. Fixes: 1ac9abeb2e5b ("platform/x86: huawei-wmi: Move to platform driver") Signed-off-by: Barnabás Pőcze Link: https://lore.kernel.org/r/20221005150032.173198-2-pobrn@protonmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/huawei-wmi.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit d6fef93258f3b902f5166297b05d72746e16e1f7 Author: Barnabás Pőcze Date: Wed Oct 5 15:00:39 2022 +0000 platform/x86: huawei-wmi: do not hard-code sizes Use `sizeof()` and `ARRAY_SIZE()` instead of hard-coding buffer sizes and indices. Signed-off-by: Barnabás Pőcze Link: https://lore.kernel.org/r/20221005150032.173198-1-pobrn@protonmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/huawei-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a77272c16041862c5c8d450c8701139887e1bb05 Author: Armin Wolf Date: Tue Sep 27 22:45:21 2022 +0200 platform/x86: dell: Add new dell-wmi-ddv driver The dell-wmi-ddv driver adds support for reading the current temperature and ePPID of ACPI batteries on supported Dell machines. Since the WMI interface used by this driver does not do any input validation and thus cannot be used for probing, the driver depends on the ACPI battery extension machanism to discover batteries. The driver also supports a debugfs interface for retrieving buffers containing fan and thermal sensor information. Since the meaing of the content of those buffers is currently unknown, the interface is meant for reverse-engineering and will likely be replaced with an hwmon interface once the meaning has been understood. The driver was tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220927204521.601887-3-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Documentation/ABI/testing/debugfs-dell-wmi-ddv | 21 ++ .../ABI/testing/sysfs-platform-dell-wmi-ddv | 7 + MAINTAINERS | 7 + drivers/platform/x86/dell/Kconfig | 13 + drivers/platform/x86/dell/Makefile | 1 + drivers/platform/x86/dell/dell-wmi-ddv.c | 364 +++++++++++++++++++++ drivers/platform/x86/wmi.c | 1 + 7 files changed, 414 insertions(+) commit 878a82c23469d6626b27b44ade4d8f9438de51ab Author: Armin Wolf Date: Tue Sep 27 22:45:20 2022 +0200 ACPI: battery: Pass battery hook pointer to hook callbacks Right now, is impossible for battery hook callbacks to access instance-specific data, forcing most drivers to provide some sort of global state. This however is difficult for drivers which can be instantiated multiple times and/or are hotplug-capable. Pass a pointer to the battery hook to those callbacks for usage with container_of(). Signed-off-by: Armin Wolf Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20220927204521.601887-2-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/acpi/battery.c | 8 ++++---- drivers/platform/x86/asus-wmi.c | 4 ++-- drivers/platform/x86/huawei-wmi.c | 4 ++-- drivers/platform/x86/lg-laptop.c | 4 ++-- drivers/platform/x86/system76_acpi.c | 4 ++-- drivers/platform/x86/thinkpad_acpi.c | 4 ++-- drivers/platform/x86/toshiba_acpi.c | 4 ++-- include/acpi/battery.h | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) commit 19c8b5241425948daeb0f91fe7a07cf1a4b76239 Author: Muhammad Usama Anjum Date: Tue Oct 4 13:10:19 2022 +0500 platform/x86/amd/pmf: pass the struct by reference The out structure should be passed by reference instead of passing by value. This saves the extra copy of the structure. Signed-off-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20221004081019.619193-1-usama.anjum@collabora.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede drivers/platform/x86/amd/pmf/cnqf.c | 92 ++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 46 deletions(-) commit c58e28afb11f5cd3c7f8a27b3abb045d848467ac Author: Sagi Grimberg Date: Mon Nov 14 08:45:02 2022 +0200 nvmet: fix a memory leak in nvmet_auth_set_key When changing dhchap secrets we need to release the old secrets as well. kmemleak complaint: -- unreferenced object 0xffff8c7f44ed8180 (size 64): comm "check", pid 7304, jiffies 4295686133 (age 72034.246s) hex dump (first 32 bytes): 44 48 48 43 2d 31 3a 30 30 3a 4c 64 4c 4f 64 71 DHHC-1:00:LdLOdq 79 56 69 67 77 48 55 32 6d 5a 59 4c 7a 35 59 38 yVigwHU2mZYLz5Y8 backtrace: [<00000000b6fc5071>] kstrdup+0x2e/0x60 [<00000000f0f4633f>] 0xffffffffc0e07ee6 [<0000000053006c05>] 0xffffffffc0dff783 [<00000000419ae922>] configfs_write_iter+0xb1/0x120 [<000000008183c424>] vfs_write+0x2be/0x3c0 [<000000009005a2a5>] ksys_write+0x5f/0xe0 [<00000000cd495c89>] do_syscall_64+0x38/0x90 [<00000000f2a84ac5>] entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: db1312dd9548 ("nvmet: implement basic In-Band Authentication") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/auth.c | 2 ++ 1 file changed, 2 insertions(+) commit bcaf434b8f04e1ee82a8b1e1bce0de99fbff67fa Author: Joel Granados Date: Wed Nov 2 18:17:08 2022 +0100 nvme: return err on nvme_init_non_mdts_limits fail In nvme_init_non_mdts_limits function we were returning 0 when kzalloc failed; it now returns -ENOMEM. Fixes: 5befc7c26e5a ("nvme: implement non-mdts command limits") Signed-off-by: Joel Granados Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 811f4de0344d48a33a94d5c7d31a0ef0490f5701 Author: Uday Shankar Date: Mon Nov 14 17:23:59 2022 -0700 nvme: avoid fallback to sequential scan due to transient issues Currently, if nvme_scan_ns_list fails, nvme_scan_work will fall back to a sequential scan. nvme_scan_ns_list can fail for a variety of reasons, e.g. a transient transport issue, and the resulting sequential scan can be extremely expensive on controllers reporting an NN value close to the maximum allowed (> 4 billion). Avoid sequential scans wherever possible by only falling back to them in two cases: - When the NVMe version supported (VS) value reported by the device is older than NVME_VS(1, 1, 0), before which support of Identify NS List not required. - When the Identify NS List command fails with the DNR bit set in the status. This is to accommodate (non-compliant) devices which report a VS value which implies support for Identify NS List, but nevertheless do not support the command. Such devices will most likely fail the command with the DNR bit set. The third case is when the device claims support for Identify NS List but the command fails with DNR not set. In such cases, fallback to sequential scan is potentially expensive and likely unnecessary, as a retry of the list scan should succeed. So this change skips the fallback in this third case. Signed-off-by: Uday Shankar Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 91c11d5f32547a08d462934246488fe72f3d44c3 Author: Sagi Grimberg Date: Sun Nov 13 13:24:24 2022 +0200 nvme-rdma: stop auth work after tearing down queues in error recovery when starting error recovery there might be a authentication work running, and it involves I/O commands. Given the controller is tearing down there is no chance for the I/O to complete other than timing out which may unnecessarily take a full io timeout. So first tear down the queues, fail/cancel all inflight I/O (including potentially authentication) and only then stop authentication. This ensures that failover is not stalled due to blocked authentication I/O. Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f1a4f89562d3b33b6ca4fc8a4f3bd4cd35ab4ea Author: Sagi Grimberg Date: Sun Nov 13 13:24:23 2022 +0200 nvme-tcp: stop auth work after tearing down queues in error recovery when starting error recovery there might be a authentication work running, and it involves I/O commands. Given the controller is tearing down there is no chance for the I/O to complete other than timing out which may unnecessarily take a full io timeout. So first tear down the queues, fail/cancel all inflight I/O (including potentially authentication) and only then stop authentication. This ensures that failover is not stalled due to blocked authentication I/O. Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d061a1bd1fff5332ee48601947abb414007a9610 Author: Sagi Grimberg Date: Sun Nov 13 13:24:22 2022 +0200 nvme-auth: have dhchap_auth_work wait for queues auth to complete It triggered the queue authentication work elements in parallel, but the ctrl authentication work itself completes when all of them completes. Hence wait for queues auth completions. This also makes nvme_auth_stop simply a sync cancel of ctrl dhchap_auth_work. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit a2a00d2a66e480c8b225012db538dca6e389a92d Author: Sagi Grimberg Date: Sun Nov 13 13:24:21 2022 +0200 nvme-auth: remove redundant auth_work flush only ctrl deletion calls nvme_auth_free, which was stopped prior in the teardown stage, so there is no possibility that it should ever run when nvme_auth_free is called. As a result, we can remove a local chap pointer variable. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit aa36d711e945e65fa87410927800f01878a8faed Author: Sagi Grimberg Date: Sun Nov 13 13:24:20 2022 +0200 nvme-auth: convert dhchap_auth_list to an array We know exactly how many dhchap contexts we will need, there is no need to hold a list that we need to protect with a mutex. Convert to a dynamically allocated array. And dhchap_context access state is maintained by the chap itself. Make dhchap_auth_mutex protect only the ctrl host_key and ctrl_key in a fine-grained lock such that there is no long lasting acquisition of the lock and no need to take/release this lock when flushing authentication works. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 118 +++++++++++++++++++++++++---------------------- drivers/nvme/host/core.c | 4 ++ drivers/nvme/host/nvme.h | 2 +- 3 files changed, 69 insertions(+), 55 deletions(-) commit 546dea18c99928bb81392de63092da0e25d07b10 Author: Sagi Grimberg Date: Sun Nov 13 13:24:18 2022 +0200 nvme-auth: check chap ctrl_key once constructed ctrl ctrl_key member may be overwritten from a sysfs context driven by the user. Once a queue local copy was created, use that instead to minimize checks on a shared resource. Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e8a420efb637f52c586596283d6fd96f2a7ecb5c Author: Sagi Grimberg Date: Sun Nov 13 13:24:17 2022 +0200 nvme-auth: no need to reset chap contexts on re-authentication Now that the chap context is reset upon completion, this is no longer needed. Also remove nvme_auth_reset as no callers are left. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 13 ------------- drivers/nvme/host/core.c | 4 ---- drivers/nvme/host/nvme.h | 1 - 3 files changed, 18 deletions(-) commit 96df31839354c2bb9d2f0d51eb6c6f6b762fd150 Author: Sagi Grimberg Date: Sun Nov 13 13:24:16 2022 +0200 nvme-auth: remove redundant deallocations These are now redundant as the dhchap context is removed after authentication completes. Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 8d1c1904e94757b78c28fbbef9285e4101d86ee9 Author: Sagi Grimberg Date: Sun Nov 13 13:24:15 2022 +0200 nvme-auth: clear sensitive info right after authentication completes We don't want to keep authentication sensitive info in memory for unlimited amount of time. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 2 ++ 1 file changed, 2 insertions(+) commit e481fc0a377798976d5c3044c7f10c86a8372b92 Author: Sagi Grimberg Date: Tue Nov 15 17:08:06 2022 +0100 nvme-auth: guarantee dhchap buffers under memory pressure We want to guarantee that we have chap buffers when a controller reconnects under memory pressure. Add a mempool specifically for that. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 30 ++++++++++++++++++++++++++++-- drivers/nvme/host/core.c | 6 ++++++ drivers/nvme/host/nvme.h | 9 +++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) commit b7d604cae8f6edde53ac8aa9038ee154be562eb5 Author: Sagi Grimberg Date: Sun Nov 13 13:24:13 2022 +0200 nvme-auth: don't keep long lived 4k dhchap buffer dhchap structure is per-queue, it is wasteful to keep it for the entire lifetime of the queue. Allocate it dynamically and get rid of it after authentication. We don't need kzalloc because all accessors are clearing it before writing to it. Also, remove redundant chap buf_size which is always 4096, use a define instead. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) commit bfc4068e1e55e30a86f0e82e15163a60f99a894d Author: Sagi Grimberg Date: Sun Nov 13 13:24:12 2022 +0200 nvme-auth: remove redundant if statement No one passes NVME_QID_ANY to nvme_auth_negotiate. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01604350e14560d4d69323eb1ba12a257a643ea8 Author: Sagi Grimberg Date: Sun Nov 13 13:24:11 2022 +0200 nvme-auth: don't override ctrl keys before validation Replace ctrl ctrl_key/host_key only after nvme_auth_generate_key is successful. Also, this fixes a bug where the keys are leaked. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 193a8c7e5f1a8481841636cec9c185543ec5c759 Author: Sagi Grimberg Date: Sun Nov 13 13:24:10 2022 +0200 nvme-auth: don't ignore key generation failures when initializing ctrl keys nvme_auth_generate_key can fail, don't ignore it upon initialization. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 19 +++++++++++++++---- drivers/nvme/host/core.c | 6 +++++- drivers/nvme/host/nvme.h | 7 +++++-- 3 files changed, 25 insertions(+), 7 deletions(-) commit f6b182fbd5c608bd6cbaaaee35b1325443f48043 Author: Sagi Grimberg Date: Sun Nov 13 13:24:09 2022 +0200 nvme-auth: remove redundant buffer deallocations host_response, host_key, ctrl_key and sess_key are freed in nvme_auth_reset_dhchap which is called from nvme_auth_free_dhchap. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 4 ---- 1 file changed, 4 deletions(-) commit c7390f132a896ff1a3fa26ea2b0be4f9ceb9041e Author: Sagi Grimberg Date: Sun Nov 13 13:24:08 2022 +0200 nvme-auth: don't re-authenticate if the controller is not LIVE The connect sequence will re-authenticate. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 100b555bc204fc754108351676297805f5affa49 Author: Sagi Grimberg Date: Sun Nov 13 13:24:07 2022 +0200 nvme-auth: remove symbol export from nvme_auth_reset Only the nvme module calls it. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 1 - 1 file changed, 1 deletion(-) commit 0c999e69c40a87285f910c400b550fad866e99d0 Author: Sagi Grimberg Date: Sun Nov 13 13:24:06 2022 +0200 nvme-auth: rename authentication work elements Use nvme_ctrl_auth_work and nvme_queue_auth_work for better readability. Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0a7ce375f83f4ade7c2a835444093b6870fb8257 Author: Sagi Grimberg Date: Sun Nov 13 13:24:05 2022 +0200 nvme-auth: rename __nvme_auth_[reset|free] to nvme_auth[reset|free]_dhchap nvme_auth_[reset|free] operate on the controller while __nvme_auth_[reset|free] operate on a chap struct (which maps to a queue context). Rename it for clarity. Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/auth.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c7c16c5b196772aba1d99c4c0b505fe99a6fbba8 Author: Christoph Hellwig Date: Tue Nov 8 15:42:57 2022 +0100 nvme-pci: don't unbind the driver on reset failure Unbind a device driver when a reset fails is very unusual behavior. Just shut the controller down and leave it in dead state if we fail to reset it. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/pci.c | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) commit eac3ef262941f62fe01bc357911fea4847183333 Author: Christoph Hellwig Date: Sun Nov 13 12:07:04 2022 +0100 nvme-pci: split the initial probe from the rest path nvme_reset_work is a little fragile as it needs to handle both resetting a live controller and initializing one during probe. Split out the initial probe and open code it in nvme_probe and leave nvme_reset_work to just do the live controller reset. This fixes a recently introduced bug where nvme_dev_disable causes a NULL pointer dereferences in blk_mq_quiesce_tagset because the tagset pointer is not set when the reset state is entered directly from the new state. The separate probe code can skip the reset state and probe directly and fixes this. To make sure the system isn't single threaded on enabling nvme controllers, set the PROBE_PREFER_ASYNCHRONOUS flag in the device_driver structure so that the driver core probes in parallel. Fixes: 98d81f0df70c ("nvme: use blk_mq_[un]quiesce_tagset") Reported-by: Gerd Bayer Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Tested-by Gerd Bayer drivers/nvme/host/pci.c | 133 +++++++++++++++++++++++++++++------------------- 1 file changed, 80 insertions(+), 53 deletions(-) commit acb71e53bb47a08731aa77497cd3f1871cba59c3 Author: Christoph Hellwig Date: Sun Nov 13 12:05:58 2022 +0100 nvme-pci: move the HMPRE check into nvme_setup_host_mem Check that a HMB is wanted into the allocation helper instead of the caller. This makes life simpler for an upcoming second caller. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/pci.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5b1d640800de7fe02d68bf592d9d101de24c87f2 Author: Eduard Zingerman Date: Wed Nov 16 03:54:56 2022 +0200 selftests/bpf: allow unpriv bpf for selftests by default Enable unprivileged bpf for selftests kernel by default. This forces CI to run test_verifier tests in both privileged and unprivileged modes. The test_verifier.c:do_test uses sysctl kernel.unprivileged_bpf_disabled to decide whether to run or to skip test cases in unprivileged mode. The CONFIG_BPF_UNPRIV_DEFAULT_OFF controls the default value of the kernel.unprivileged_bpf_disabled. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20221116015456.2461135-1-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/config | 1 + 1 file changed, 1 insertion(+) commit df9c41e9db2d0fc9feba0423c21e4319d8acd033 Author: Tiezhu Yang Date: Tue Nov 15 21:00:07 2022 +0800 bpftool: Check argc first before "file" in do_batch() If the parameters for batch are more than 2, check argc first can return immediately, no need to use is_prefix() to check "file" with a little overhead and then check argc, it is better to check "file" only when the parameters for batch are 2. Signed-off-by: Tiezhu Yang Acked-by: Stanislav Fomichev Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/1668517207-11822-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e0eb60829a6eb249d7c6cccef0605c3004004bef Author: Donald Hunter Date: Tue Nov 15 09:59:10 2022 +0000 docs/bpf: Fix sample code in MAP_TYPE_ARRAY docs Remove mistaken & from code example in MAP_TYPE_ARRAY docs Fixes: 1cfa97b30c5a ("bpf, docs: Document BPF_MAP_TYPE_ARRAY") Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20221115095910.86407-1-donald.hunter@gmail.com Signed-off-by: Alexei Starovoitov Documentation/bpf/map_array.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d63b21d2745d86994b2d0f2371c4e7027138b39 Merge: b87584cb8d8f 53d04b981110 Author: Jakub Kicinski Date: Tue Nov 15 20:34:30 2022 -0800 Merge branch 'remove-phylink_validate-from-felix-dsa-driver' Vladimir Oltean says: ==================== Remove phylink_validate() from Felix DSA driver The Felix DSA driver still uses its own phylink_validate() procedure rather than the (relatively newly introduced) phylink_generic_validate() because the latter did not cater for the case where a PHY provides rate matching between the Ethernet cable side speed and the SERDES side speed (and does not advertise other speeds except for the SERDES speed). This changed with Sean Anderson's generic support for rate matching PHYs in phylib and phylink: https://patchwork.kernel.org/project/netdevbpf/cover/20220920221235.1487501-1-sean.anderson@seco.com/ Building upon that support, this patch set makes Linux understand that the PHYs used in combination with the Felix DSA driver (SCH-30841 riser card with AQR412 PHY, used with SERDES protocol 0x7777 - 4x2500base-x, plugged into LS1028A-QDS) do support PAUSE rate matching. This requires Aquantia PHY driver support for new PHY IDs. To activate the rate matching support in phylink, config->mac_capabilities must be populated. Coincidentally, this also opts the Felix driver into the generic phylink validation. Next, code that is no longer necessary is eliminated. This includes the Felix driver validation procedures for VSC9959 and VSC9953, the workaround in the Ocelot switch library to leave RX flow control always enabled, as well as DSA plumbing necessary for a custom phylink validation procedure to be propagated to the hardware driver level. Many thanks go to Sean Anderson for providing generic support for rate matching. ==================== Link: https://lore.kernel.org/r/20221114170730.2189282-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 53d04b9811107633f25be02a5d981a6070d09e6e Author: Vladimir Oltean Date: Mon Nov 14 19:07:30 2022 +0200 net: dsa: remove phylink_validate() method As of now, no DSA driver uses a custom link mode validation procedure anymore. So remove this DSA operation and let phylink determine what is supported based on config->mac_capabilities (if provided by the driver). Leave a comment why we left the code that we did, and that there is more work to do. Signed-off-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski include/net/dsa.h | 3 --- net/dsa/port.c | 18 ++++++++---------- 2 files changed, 8 insertions(+), 13 deletions(-) commit de8586ed4311286a7fb17c3b0166076c1a548518 Author: Vladimir Oltean Date: Mon Nov 14 19:07:29 2022 +0200 net: mscc: ocelot: drop workaround for forcing RX flow control As phylink gained generic support for PHYs with rate matching via PAUSE frames, the phylink_mac_link_up() method will be called with the maximum speed and with rx_pause=true if rate matching is in use. This means that setups with 2500base-x as the SERDES protocol between the MAC/PCS and the PHY now work with no need for the driver to do anything special. Tested with fsl-ls1028a-qds-7777.dts. Signed-off-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/ethernet/mscc/ocelot.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3e7e783291b42f95756dcf54cd8c67973e6ddefd Author: Vladimir Oltean Date: Mon Nov 14 19:07:28 2022 +0200 net: dsa: felix: use phylink_generic_validate() Drop the custom implementation of phylink_validate() in favor of the generic one, which requires config->mac_capabilities to be set. This was used up until now because of the possibility of being paired with Aquantia PHYs with support for rate matching. The phylink framework gained generic support for these, and knows to advertise all 10/100/1000 lower speed link modes when our SERDES protocol is 2500base-x (fixed speed). Signed-off-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix.c | 16 ++++------------ drivers/net/dsa/ocelot/felix.h | 3 --- drivers/net/dsa/ocelot/felix_vsc9959.c | 30 ------------------------------ drivers/net/dsa/ocelot/seville_vsc9953.c | 27 --------------------------- 4 files changed, 4 insertions(+), 72 deletions(-) commit 973fbe68df39a315bf1233ea7f50e87f8a649947 Author: Vladimir Oltean Date: Mon Nov 14 19:07:27 2022 +0200 net: phy: aquantia: add AQR112 and AQR412 PHY IDs These are Gen3 Aquantia N-BASET PHYs which support 5GBASE-T, 2.5GBASE-T, 1000BASE-T and 100BASE-TX (not 10G); also EEE, Sync-E, PTP, PoE. The 112 is a single PHY package, the 412 is a quad PHY package. The system-side SERDES interface of these PHYs selects its protocol depending on the negotiated media side link speed. That protocol can be 1000BASE-X, 2500BASE-X, 10GBASE-R, SGMII, USXGMII. The configuration of which SERDES protocol to use for which link speed is made by firmware; even though it could be overwritten over MDIO by Linux, we assume that the firmware provisioning is ok for the board on which the driver probes. For cases when the system side runs at a fixed rate, we want phylib/phylink to detect the PAUSE rate matching ability of these PHYs, so we need to use the Aquantia rather than the generic C45 driver. This needs aqr107_read_status() -> aqr107_read_rate() to set phydev->rate_matching, as well as the aqr107_get_rate_matching() method. I am a bit unsure about the naming convention in the driver. Since AQR107 is a Gen2 PHY, I assume all functions prefixed with "aqr107_" rather than "aqr_" mean Gen2+ features. So I've reused this naming convention. I've tested PHY "SGMII" statistics as well as the .link_change_notify method, which prints: Aquantia AQR412 mdio_mux-0.4:00: Link partner is Aquantia PHY, FW 4.3, fast-retrain downshift advertised, fast reframe advertised Tested SERDES protocols are usxgmii and 2500base-x (the latter with PAUSE rate matching). Tested link modes are 100/1000/2500 Base-T (with Aquantia link partner and with other link partners). No notable events observed. The placement of these PHY IDs in the driver is right before AQR113C, a Gen4 PHY. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/phy/aquantia_main.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit b87584cb8d8f8bda1db8986beb90fc6196151d90 Merge: 1ec6360ddb83 d2c806abcf0b Author: Jakub Kicinski Date: Tue Nov 15 20:33:19 2022 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next 1) Fix sparse warning in the new nft_inner expression, reported by Jakub Kicinski. 2) Incorrect vlan header check in nft_inner, from Peng Wu. 3) Two patches to pass reset boolean to expression dump operation, in preparation for allowing to reset stateful expressions in rules. This adds a new NFT_MSG_GETRULE_RESET command. From Phil Sutter. 4) Inconsistent indentation in nft_fib, from Jiapeng Chong. 5) Speed up siphash calculation in conntrack, from Florian Westphal. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: conntrack: use siphash_4u64 netfilter: rpfilter/fib: clean up some inconsistent indenting netfilter: nf_tables: Introduce NFT_MSG_GETRULE_RESET netfilter: nf_tables: Extend nft_expr_ops::dump callback parameters netfilter: nft_inner: fix return value check in nft_inner_parse_l2l3() netfilter: nft_payload: use __be16 to store gre version ==================== Link: https://lore.kernel.org/r/20221115095922.139954-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 1ec6360ddb83a753b0eb8505fc957e3d7d74f785 Author: Walter Heymans Date: Tue Nov 15 10:08:34 2022 +0100 Documentation: nfp: update documentation The NFP documentation is updated to include information about Corigine, and the new NFP3800 chips. The 'Acquiring Firmware' section is updated with new information about where to find firmware. Two new sections are added to expand the coverage of the documentation. The new sections include: - Devlink Info - Configure Device Signed-off-by: Walter Heymans Reviewed-by: Niklas Söderlund Reviewed-by: Louis Peens Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20221115090834.738645-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski .../device_drivers/ethernet/netronome/nfp.rst | 165 ++++++++++++++++++--- 1 file changed, 145 insertions(+), 20 deletions(-) commit 0f54d36e2feec8f4c680f1f39e65a78a9501a190 Merge: 7eba4505394e 2d7605a72906 Author: Jakub Kicinski Date: Tue Nov 15 20:23:18 2022 -0800 Merge branch 'mtk_eth_soc-rx-vlan-offload-improvement-dsa-hardware-untag-support' Felix Fietkau says: ==================== mtk_eth_soc rx vlan offload improvement + dsa hardware untag support This series improves rx vlan offloading on mtk_eth_soc and extends it to support hardware DSA untagging where possible. This improves performance by avoiding calls into the DSA tag driver receive function, including mangling of skb->data. This is split out of a previous series, which added other fixes and multiqueue support ==================== Link: https://lore.kernel.org/r/20221114124214.58199-1-nbd@nbd.name Signed-off-by: Jakub Kicinski commit 2d7605a729062bb554f03c5983d8cfb8c0b42e9c Author: Felix Fietkau Date: Mon Nov 14 13:42:14 2022 +0100 net: ethernet: mtk_eth_soc: enable hardware DSA untagging - pass the tag to DSA via metadata dst - disabled on 7986 for now, since it's not working yet - disabled if a MAC is enabled that does not use DSA This improves performance by bypassing the DSA tag driver and avoiding extra skb data mangling Signed-off-by: Felix Fietkau Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 66 ++++++++++++++++++++++++++--- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 8 ++++ 2 files changed, 67 insertions(+), 7 deletions(-) commit 08666cbb7dd5ab1b5143c6c8d9b359b99caadd81 Author: Felix Fietkau Date: Mon Nov 14 13:42:13 2022 +0100 net: ethernet: mtk_eth_soc: add support for configuring vlan rx offload Keep the vlan rx offload feature in sync across all netdevs belonging to the device, since the feature is global and can't be turned off per MAC Signed-off-by: Felix Fietkau Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 190487031584a1d24c92e0d82717a30169ac8929 Author: Felix Fietkau Date: Mon Nov 14 13:42:12 2022 +0100 net: ethernet: mtk_eth_soc: pass correct VLAN protocol ID to the network stack Use the id from the DMA descriptor instead of hardcoding 802.1q Signed-off-by: Felix Fietkau Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 570d0a588dfbb11f9ef80ed933d0403a0e995688 Author: Felix Fietkau Date: Mon Nov 14 13:42:11 2022 +0100 net: dsa: add support for DSA rx offloading via metadata dst If a metadata dst is present with the type METADATA_HW_PORT_MUX on a dsa cpu port netdev, assume that it carries the port number and that there is no DSA tag present in the skb data. Signed-off-by: Felix Fietkau Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski net/core/flow_dissector.c | 4 +++- net/dsa/dsa.c | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) commit 6373ef1c5ee72a6b820717e50e266b78686b700c Merge: 32637e33003f 4741c371aa08 Author: Alexei Starovoitov Date: Tue Nov 15 17:38:36 2022 -0800 Merge branch 'propagate nullness information for reg to reg comparisons' Eduard Zingerman says: ==================== This patchset adds ability to propagates nullness information for branches of register to register equality compare instructions. The following rules are used: - suppose register A maybe null - suppose register B is not null - for JNE A, B, ... - A is not null in the false branch - for JEQ A, B, ... - A is not null in the true branch E.g. for program like below: r6 = skb->sk; r7 = sk_fullsock(r6); r0 = sk_fullsock(r6); if (r0 == 0) return 0; (a) if (r0 != r7) return 0; (b) *r7->type; (c) return 0; It is safe to dereference r7 at point (c), because of (a) and (b). The utility of this change came up while working on BPF CLang backend issue [1]. Specifically, while debugging issue with selftest `test_sk_lookup.c`. This test has the following structure: int access_ctx_sk(struct bpf_sk_lookup *ctx __CTX__) { struct bpf_sock *sk1 = NULL, *sk2 = NULL; ... sk1 = bpf_map_lookup_elem(&redir_map, &KEY_SERVER_A); if (!sk1) // (a) goto out; ... if (ctx->sk != sk1) // (b) goto out; ... if (ctx->sk->family != AF_INET || // (c) ctx->sk->type != SOCK_STREAM || ctx->sk->state != BPF_TCP_LISTEN) goto out; ... } - at (a) `sk1` is checked to be not null; - at (b) `ctx->sk` is verified to be equal to `sk1`; - at (c) `ctx->sk` is accessed w/o nullness check. Currently Global Value Numbering pass considers expressions `sk1` and `ctx->sk` to be identical at point (c) and replaces `ctx->sk` with `sk1` (not expressions themselves but corresponding SSA values). Since `sk1` is known to be not null after (b) verifier allows execution of the program. However, such optimization is not guaranteed to happen. When it does not happen verifier reports an error. Changelog: v2 -> v3: - verifier tests are updated with correct error message for unprivileged mode (pointer comparisons are forbidden in unprivileged mode). v1 -> v2: - after investigation described in [2] as suggested by John, Daniel and Shung-Hsi, function `type_is_pointer` is removed, calls to this function are replaced by `__is_pointer_value(false, src_reg)`. RFC -> v1: - newly added if block in `check_cond_jmp_op` is moved down to keep `make_ptr_not_null_reg` actions together; - tests rewritten to have a single `r0 = 0; exit;` block. [1] https://reviews.llvm.org/D131633#3722231 [2] https://lore.kernel.org/bpf/bad8be826d088e0d180232628160bf932006de89.camel@gmail.com/ [RFC] https://lore.kernel.org/bpf/20220822094312.175448-1-eddyz87@gmail.com/ [v1] https://lore.kernel.org/bpf/20220826172915.1536914-1-eddyz87@gmail.com/ [v2] https://lore.kernel.org/bpf/20221106214921.117631-1-eddyz87@gmail.com/ ==================== Signed-off-by: Alexei Starovoitov commit 4741c371aa088a951bd65f995d2dfe7cd29b4b9a Author: Eduard Zingerman Date: Wed Nov 16 00:48:59 2022 +0200 selftests/bpf: check nullness propagation for reg to reg comparisons Verify that nullness information is porpagated in the branches of register to register JEQ and JNE operations. Signed-off-by: Eduard Zingerman Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221115224859.2452988-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/verifier/jeq_infer_not_null.c | 174 +++++++++++++++++++++ 1 file changed, 174 insertions(+) commit befae75856ab406a3f3fab2aa2118cf3b2dfe3e6 Author: Eduard Zingerman Date: Wed Nov 16 00:48:58 2022 +0200 bpf: propagate nullness information for reg to reg comparisons Propagate nullness information for branches of register to register equality compare instructions. The following rules are used: - suppose register A maybe null - suppose register B is not null - for JNE A, B, ... - A is not null in the false branch - for JEQ A, B, ... - A is not null in the true branch E.g. for program like below: r6 = skb->sk; r7 = sk_fullsock(r6); r0 = sk_fullsock(r6); if (r0 == 0) return 0; (a) if (r0 != r7) return 0; (b) *r7->type; (c) return 0; It is safe to dereference r7 at point (c), because of (a) and (b). Signed-off-by: Eduard Zingerman Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221115224859.2452988-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit 02aef4225258fa6d022ce9040716aeecc3afc521 Author: Eric Biggers Date: Thu Nov 10 00:29:42 2022 -0800 fscrypt: pass super_block to fscrypt_put_master_key_activeref() As this code confused Linus [1], pass the super_block as an argument to fscrypt_put_master_key_activeref(). This removes the need to have the back-pointer ->mk_sb, so remove that. [1] https://lore.kernel.org/linux-fscrypt/CAHk-=wgud4Bc_um+htgfagYpZAnOoCb3NUoW67hc9LhOKsMtJg@mail.gmail.com Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221110082942.351615-1-ebiggers@kernel.org fs/crypto/fscrypt_private.h | 13 ++++--------- fs/crypto/keyring.c | 14 ++++++-------- fs/crypto/keysetup.c | 2 +- 3 files changed, 11 insertions(+), 18 deletions(-) commit b5a17c35c7ffc643153717075f39e07f4fa526d1 Author: Krzysztof Kozlowski Date: Tue Nov 15 11:50:47 2022 +0100 arm64: dts: broadcom: trim addresses to 8 digits Hex numbers in addresses and sizes should be rather eight digits, not nine. Drop leading zeros. No functional change (same DTB). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221115105047.95281-1-krzysztof.kozlowski@linaro.org Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts | 2 +- arch/arm64/boot/dts/broadcom/northstar2/ns2-xmc.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 597d77d29c5cc50b52bbbbd48c49a0237481a9df Author: Sergey Shtylyov Date: Sat Oct 15 00:22:35 2022 +0300 regset: make user_regset_copyin_ignore() *void* user_regset_copyin_ignore() apparently cannot fail and so always returns 0. Let's make this function return *void* instead of *int*... Link: https://lkml.kernel.org/r/20221014212235.10770-14-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton include/linux/regset.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 37f653033ac2f7465177492453dcefa91dbffc3a Author: Sergey Shtylyov Date: Sat Oct 15 00:22:34 2022 +0300 sparc: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Link: https://lkml.kernel.org/r/20221014212235.10770-13-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/sparc/kernel/ptrace_32.c | 9 +++++---- arch/sparc/kernel/ptrace_64.c | 23 +++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) commit aafdac9ab37577c5f0ec64fa871334232e7cbb06 Author: Sergey Shtylyov Date: Sat Oct 15 00:22:33 2022 +0300 sh: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Link: https://lkml.kernel.org/r/20221014212235.10770-12-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/sh/kernel/ptrace_32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 18b9fe54d9a6f600ea5037d41f681637286be621 Author: Sergey Shtylyov Date: Sat Oct 15 00:22:32 2022 +0300 powerpc: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... [akpm@linux-foundation.org: fix gpr32_set_common()] Link: https://lkml.kernel.org/r/20221014212235.10770-11-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/powerpc/kernel/ptrace/ptrace-tm.c | 10 +++++----- arch/powerpc/kernel/ptrace/ptrace-view.c | 15 ++++++++------- 2 files changed, 13 insertions(+), 12 deletions(-) commit fa3ff3bfa8670b0a1b034e124cbf905d3cf74ac4 Author: Sergey Shtylyov Date: Sat Oct 15 00:22:31 2022 +0300 parisc: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Link: https://lkml.kernel.org/r/20221014212235.10770-10-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/parisc/kernel/ptrace.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 63977440b77b56eb492a3fe328c6b17232fbfcc0 Author: Sergey Shtylyov Date: Sat Oct 15 00:22:30 2022 +0300 openrisc: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Link: https://lkml.kernel.org/r/20221014212235.10770-9-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/openrisc/kernel/ptrace.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit ae27da72a6f1ba0a057d6699aff96f408a48dd65 Author: Sergey Shtylyov Date: Sat Oct 15 00:22:29 2022 +0300 nios2: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Link: https://lkml.kernel.org/r/20221014212235.10770-8-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/nios2/kernel/ptrace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 540e58d200e32141d3c280bd8c90b9932e3c7afb Author: Sergey Shtylyov Date: Sat Oct 15 00:22:28 2022 +0300 mips: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Link: https://lkml.kernel.org/r/20221014212235.10770-7-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/mips/kernel/ptrace.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d85deed4cb08e08caf1a007c317e8d7cbc912dc3 Author: Sergey Shtylyov Date: Sat Oct 15 00:22:27 2022 +0300 ia64: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Link: https://lkml.kernel.org/r/20221014212235.10770-6-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/ia64/kernel/ptrace.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 4d2cfea809fc0c11c6fd0cf18d97463f5afb411d Author: Sergey Shtylyov Date: Sat Oct 15 00:22:26 2022 +0300 hexagon: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Link: https://lkml.kernel.org/r/20221014212235.10770-5-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/hexagon/kernel/ptrace.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 687daeeeca85087e5b4f60bb26dec8006a816d80 Author: Sergey Shtylyov Date: Sat Oct 15 00:22:25 2022 +0300 arm64: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Link: https://lkml.kernel.org/r/20221014212235.10770-4-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/arm64/kernel/ptrace.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit dd127cf2221c46e8b027281bf58d65ce1a0eb17f Author: Sergey Shtylyov Date: Sat Oct 15 00:22:24 2022 +0300 arm: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Link: https://lkml.kernel.org/r/20221014212235.10770-3-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/arm/kernel/ptrace.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 461cc6e54ececa86007d44b0ff2521f75b872745 Author: Sergey Shtylyov Date: Sat Oct 15 00:22:23 2022 +0300 arc: ptrace: user_regset_copyin_ignore() always returns 0 Patch series "Make user_regset_copyin_ignore() *void*". user_regset_copyin_ignore() apparently cannot fail and so always returns 0. Let's first remove the result checks in several architectures that call this function and then make user_regset_copyin_ignore() return *void* instead of *int*... This patch (of 13): user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Link: https://lkml.kernel.org/r/20221014212235.10770-1-s.shtylyov@omp.ru Link: https://lkml.kernel.org/r/20221014212235.10770-2-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy # powerpc Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/arc/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eabb7f1ace53e127309407b2b5e74e8199e85270 Author: wuchi Date: Sat Jun 11 21:06:34 2022 +0800 lib/debugobjects: fix stat count and optimize debug_objects_mem_init 1. Var debug_objects_allocated tracks valid kmem_cache_alloc calls, so track it in debug_objects_replace_static_objects. Do similar things in object_cpu_offline. 2. In debug_objects_mem_init, there is no need to call function cpuhp_setup_state_nocalls when debug_objects_enabled = 0 (out of memory). Link: https://lkml.kernel.org/r/20220611130634.99741-1-wuchi.zero@gmail.com Fixes: 634d61f45d6f ("debugobjects: Percpu pool lookahead freeing/allocation") Fixes: c4b73aabd098 ("debugobjects: Track number of kmem_cache_alloc/kmem_cache_free done") Signed-off-by: wuchi Reviewed-by: Waiman Long Cc: Thomas Gleixner Cc: Christoph Hellwig Cc: Kees Cook Signed-off-by: Andrew Morton lib/debugobjects.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit df61e945e1e13b1fc8338f00db0a1518c48b7d2c Author: Chen Linxuan Date: Wed Nov 2 16:15:17 2022 +0800 Documentation: update the description of TracerPid in procfs.rst When the tracer of process is outside of current pid namespace, field `TracerPid` in /proc//status will be 0, too, just like this process not have been traced. This is because that function `task_pid_nr_ns` used to get the pid of tracer will return 0 in this situation. Co-authored-by: Yuan Haisheng Signed-off-by: Chen Linxuan Link: https://lore.kernel.org/r/20221102081517.19770-1-chenlinxuan@uniontech.com Signed-off-by: Jonathan Corbet Documentation/filesystems/proc.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5478cf6ae514aef42c70032a026954f9c9bad4ca Author: Yang Yingliang Date: Thu Nov 3 10:13:31 2022 +0800 Documentation: devres: add missing LED helpers Add some missing device-managed helpers of led to devres.rst. devm_led_classdev_register_ext() is introduced by commit b2b998c0f944 ("leds: class: Improve LED and LED flash class registration API"). devm_led_trigger_register() is introduced by commit 9534cc31dda2 ("leds: core: add managed version of led_trigger_register"). devm_of_led_get() is introduced by commit e389240ad992 ("leds: Add managed API to get a LED from a device driver"). Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221103021331.1007699-1-yangyingliang@huawei.com Signed-off-by: Jonathan Corbet Documentation/driver-api/driver-model/devres.rst | 3 +++ 1 file changed, 3 insertions(+) commit 3348a08a4ceba12c9b658f4bb77d7e9b2adda0ed Author: Carlos Bilbao Date: Mon Nov 7 09:08:15 2022 -0600 docs/sp_SP: Add process submitting-patches translation Translate Documentation/process/submitting-patches.rst into Spanish. Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20221107150815.296699-1-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet Documentation/translations/sp_SP/index.rst | 1 + .../translations/sp_SP/submitting-patches.rst | 894 +++++++++++++++++++++ 2 files changed, 895 insertions(+) commit bf80eef2212a1e8451df13b52533f4bc31bb4f8e Author: Rui Li Date: Sun Nov 13 15:15:54 2022 +0800 docs/zh_CN: Add userspace-api/accelerators/ocxl Chinese translation Translate the following documents into Chinese: - userspace-api/accelerators/ocxl.rst Signed-off-by: Rui Li Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/20221113071554.476980-1-me@lirui.org Signed-off-by: Jonathan Corbet .../zh_CN/userspace-api/accelerators/ocxl.rst | 168 +++++++++++++++++++++ .../translations/zh_CN/userspace-api/index.rst | 2 +- 2 files changed, 169 insertions(+), 1 deletion(-) commit cf726417ee514afb9e7ed232ff5b961c2d7232d5 Author: Albert Zhou Date: Sat Nov 5 19:06:53 2022 +1100 Documentation: eisa: Fix typo Fix a typo in the description of the kernel parameter eisa_bus.disable_dev within eisa.rst. Signed-off-by: Albert Zhou Link: https://lore.kernel.org/r/20221105080653.4741-1-albert.zhou.50@gmail.com Signed-off-by: Jonathan Corbet Documentation/driver-api/eisa.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8d7a90c08ce963c592fb49845f2ccc606a2ac21 Author: Chen Zhongjin Date: Fri Nov 11 18:36:53 2022 +0800 perf: Fix possible memleak in pmu_dev_alloc() In pmu_dev_alloc(), when dev_set_name() failed, it will goto free_dev and call put_device(pmu->dev) to release it. However pmu->dev->release is assigned after this, which makes warning and memleak. Call dev_set_name() after pmu->dev->release = pmu_dev_release to fix it. Device '(null)' does not have a release() function... WARNING: CPU: 2 PID: 441 at drivers/base/core.c:2332 device_release+0x1b9/0x240 ... Call Trace: kobject_put+0x17f/0x460 put_device+0x20/0x30 pmu_dev_alloc+0x152/0x400 perf_pmu_register+0x96b/0xee0 ... kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak) unreferenced object 0xffff888014759000 (size 2048): comm "modprobe", pid 441, jiffies 4294931444 (age 38.332s) backtrace: [<0000000005aed3b4>] kmalloc_trace+0x27/0x110 [<000000006b38f9b8>] pmu_dev_alloc+0x50/0x400 [<00000000735f17be>] perf_pmu_register+0x96b/0xee0 [<00000000e38477f1>] 0xffffffffc0ad8603 [<000000004e162216>] do_one_initcall+0xd0/0x4e0 ... Fixes: abe43400579d ("perf: Sysfs enumeration") Signed-off-by: Chen Zhongjin Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221111103653.91058-1-chenzhongjin@huawei.com kernel/events/core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c55bfbb3ebce4e0956972f02b82673950ad1a2d2 Author: Gaosheng Cui Date: Mon Nov 14 17:18:33 2022 +0800 perf: Fix IS_ERR() vs NULL check in inherit_event() The find_get_pmu_context() returns an ERR_PTR() on failure, we should use IS_ERR() to check the return value. Fixes: bd2756811766 ("perf: Rewrite core context handling") Signed-off-by: Gaosheng Cui Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221114091833.1492575-1-cuigaosheng1@huawei.com kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ce1cb7eee70335b6d4f50fadec264473e9566c3 Author: Colin Ian King Date: Fri Oct 28 13:25:45 2022 +0100 perf: Remove unused pointer task_ctx The pointer task_ctx is being assigned a value that is not read, the assignment is redundant and so is the pointer. Remove it Signed-off-by: Colin Ian King Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221028122545.528999-1-colin.i.king@gmail.com kernel/events/core.c | 2 -- 1 file changed, 2 deletions(-) commit 8e356858be2989355aafcc96af541fedf9fb486f Author: Rafael Mendonca Date: Fri Oct 28 17:30:05 2022 -0300 perf/x86: Remove unused variable 'cpu_type' Since the removal of function x86_pmu_update_cpu_context() by commit 983bd8543b5a ("perf: Rewrite core context handling"), there is no need to query the type of the hybrid CPU inside function init_hw_perf_events(). Fixes: 983bd8543b5a ("perf: Rewrite core context handling") Signed-off-by: Rafael Mendonca Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221028203006.976831-1-rafaelmendsr@gmail.com arch/x86/events/core.c | 4 ---- 1 file changed, 4 deletions(-) commit 4e291f2f585313efa5200cce655e17c94906e50a Merge: 3076e09f36a5 6b818c533dd8 Author: Dave Airlie Date: Tue Nov 15 17:29:49 2022 +1000 Merge tag 'drm-misc-next-2022-11-10-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 6.2: UAPI Changes: Cross-subsystem Changes: Core Changes: - atomic-helper: Add begin_fb_access and end_fb_access hooks - fb-helper: Rework to move fb emulation into helpers - scheduler: rework entity flush, kill and fini - ttm: Optimize pool allocations Driver Changes: - amdgpu: scheduler rework - hdlcd: Switch to DRM-managed resources - ingenic: Fix registration error path - lcdif: FIFO threshold tuning - meson: Fix return type of cvbs' mode_valid - ofdrm: multiple fixes (kconfig, types, endianness) - sun4i: A100 and D1 support - panel: - New Panel: Jadard JD9365DA-H3 Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221110083612.g63eaocoaa554soh@houat commit 60da2d11fcbc043304910e4d2ca82f9bab953e63 Author: Bernard Metzler Date: Tue Nov 15 18:07:47 2022 +0100 RDMA/siw: Set defined status for work completion with undefined status A malicious user may write undefined values into memory mapped completion queue elements status or opcode. Undefined status or opcode values will result in out-of-bounds access to an array mapping siw internal representation of opcode and status to RDMA core representation when reaping CQ elements. While siw detects those undefined values, it did not correctly set completion status to a defined value, thus defeating the whole purpose of the check. This bug leads to the following Smatch static checker warning: drivers/infiniband/sw/siw/siw_cq.c:96 siw_reap_cqe() error: buffer overflow 'map_cqe_status' 10 <= 21 Fixes: bdf1da5df9da ("RDMA/siw: Fix immediate work request flush to completion queue") Link: https://lore.kernel.org/r/20221115170747.1263298-1-bmt@zurich.ibm.com Reported-by: Dan Carpenter Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_cq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35eee9a363becb854109e35d568299bafc97c9d1 Author: Alexandre Belloni Date: Tue Nov 15 21:21:05 2022 +0100 selftests: rtc: skip when RTC is not present There is no point in failing the tests when RTC is not present. Reported-by: Linux Kernel Functional Testing Signed-off-by: Alexandre Belloni Tested-by: Daniel Diaz Signed-off-by: Shuah Khan tools/testing/selftests/rtc/rtctest.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 0788a47e7cec7ebdcb1ad8912754b8b8b06ee915 Author: Christian König Date: Wed Oct 26 12:48:24 2022 +0200 drm/amdgpu: stop resubmittting jobs in amdgpu_pci_resume The state of VRAM is unreliable due to a PCI event like AER, link reset or DPC. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 -- 1 file changed, 2 deletions(-) commit 0462681e207ccc44778a77b3297af728b1cf5b9f Author: Stefan Eichenberger Date: Sun Nov 6 12:59:15 2022 +0100 rtc: snvs: Allow a time difference on clock register read On an iMX6ULL the following message appears when a wakealarm is set: echo 0 > /sys/class/rtc/rtc1/wakealarm rtc rtc1: Timeout trying to get valid LPSRT Counter read This does not always happen but is reproducible quite often (7 out of 10 times). The problem appears because the iMX6ULL is not able to read the registers within one 32kHz clock cycle which is the base clock of the RTC. Therefore, this patch allows a difference of up to 320 cycles (10ms). 10ms was chosen to be big enough even on systems with less cpu power (e.g. iMX6ULL). According to the reference manual a difference is fine: - If the two consecutive reads are similar, the value is correct. The values have to be similar, not equal. Fixes: cd7f3a249dbe ("rtc: snvs: Add timeouts to avoid kernel lockups") Reviewed-by: Francesco Dolcini Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20221106115915.7930-1-francesco@dolcini.it Signed-off-by: Alexandre Belloni drivers/rtc/rtc-snvs.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 6868a2c46560670efc0d1f2b446cc57edcaf960d Author: Christian König Date: Wed Oct 26 12:57:44 2022 +0200 drm/amdgpu: stop resubmitting jobs for GPU reset v2 Re-submitting IBs by the kernel has many problems because pre- requisite state is not automatically re-created as well. In other words neither binary semaphores nor things like ring buffer pointers are in the state they should be when the hardware starts to work on the IBs again. Additional to that even after more than 5 years of developing this feature it is still not stable and we have massively problems getting the reference counts right. As discussed with user space developers this behavior is not helpful in the first place. For graphics and multimedia workloads it makes much more sense to either completely re-create the context or at least re-submitting the IBs from userspace. For compute use cases re-submitting is also not very helpful since userspace must rely on the accuracy of the result. Because of this we stop this practice and instead just properly note that the fence submission was canceled. The only use case we keep the re-submission for now is SRIOV and function level resets. v2: as suggested by Sshaoyun stop resubmitting jobs even for SRIOV Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 06a2d7cc3f0476be4682ef90eb09a28fa3daed37 Author: Christian König Date: Wed Oct 26 12:26:37 2022 +0200 drm/amdgpu: revert "implement tdr advanced mode" This reverts commit e6c6338f393b74ac0b303d567bb918b44ae7ad75. This feature basically re-submits one job after another to figure out which one was the one causing a hang. This is obviously incompatible with gang-submit which requires that multiple jobs run at the same time. It's also absolutely not helpful to crash the hardware multiple times if a clean recovery is desired. For testing and debugging environments we should rather disable recovery alltogether to be able to inspect the state with a hw debugger. Additional to that the sw implementation is clearly buggy and causes reference count issues for the hardware fence. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 103 ----------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/scheduler/sched_main.c | 58 +++------------- include/drm/gpu_scheduler.h | 3 - 4 files changed, 10 insertions(+), 156 deletions(-) commit 83ebb7b3036d151ee39a4a752018665648fc3bd4 Author: Rafael J. Wysocki Date: Wed Nov 9 13:15:36 2022 +0100 rtc: cmos: Disable ACPI RTC event on removal Make cmos_do_remove() drop the ACPI RTC fixed event handler so as to prevent it from operating on stale data in case the event triggers after driver removal. Fixes: 311ee9c151ad ("rtc: cmos: allow using ACPI for RTC alarm instead of HPET") Signed-off-by: Rafael J. Wysocki Reviewed-by: Zhang Rui Tested-by: Zhang Rui Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/2224609.iZASKD2KPV@kreacher Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit d13e9ad9f5146f066a5c5a1cc993d09e4fb21ead Author: Rafael J. Wysocki Date: Wed Nov 9 13:12:00 2022 +0100 rtc: cmos: Rename ACPI-related functions The names of rtc_wake_setup() and cmos_wake_setup() don't indicate that these functions are ACPI-related, which is the case, and the former doesn't really reflect the role of the function. Rename them to acpi_rtc_event_setup() and acpi_cmos_wake_setup(), respectively, to address this shortcoming. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Zhang Rui Tested-by: Zhang Rui Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/3225614.44csPzL39Z@kreacher Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit dca4d3b71c8a09a16951add656711fbd6f5bfbb0 Author: Rafael J. Wysocki Date: Wed Nov 9 13:09:32 2022 +0100 rtc: cmos: Eliminate forward declarations of some functions Reorder the ACPI-related code before cmos_do_probe() so as to eliminate excessive forward declarations of some functions. While at it, for consistency, add the inline modifier to the definitions of empty stub static funtions and remove it from the corresponding definitions of functions with non-empty bodies. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Zhang Rui Tested-by: Zhang Rui Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/13157911.uLZWGnKmhe@kreacher Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 304 ++++++++++++++++++++++++------------------------- 1 file changed, 149 insertions(+), 155 deletions(-) commit 375bbba09692fe4c5218eddee8e312dd733fa846 Author: Rafael J. Wysocki Date: Wed Nov 9 13:09:07 2022 +0100 rtc: cmos: Call rtc_wake_setup() from cmos_do_probe() To reduce code duplication, move the invocation of rtc_wake_setup() into cmos_do_probe() and simplify the callers of the latter. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Zhang Rui Tested-by: Zhang Rui Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/2143522.irdbgypaU6@kreacher Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 508ccdfb86b21da37ad091003a4d4567709d5dfb Author: Rafael J. Wysocki Date: Wed Nov 9 13:07:08 2022 +0100 rtc: cmos: Call cmos_wake_setup() from cmos_do_probe() Notice that cmos_wake_setup() is the only user of acpi_rtc_info and it can operate on the cmos_rtc variable directly, so it need not set the platform_data pointer before cmos_do_probe() is called. Instead, it can be called by cmos_do_probe() in the case when the platform_data pointer is not set to implement the default behavior (which is to use the FADT information as long as ACPI support is enabled). Modify the code accordingly. While at it, drop a comment that doesn't really match the code it is supposed to be describing. Signed-off-by: Rafael J. Wysocki Reviewed-by: Zhang Rui Tested-by: Zhang Rui Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/4803444.31r3eYUQgx@kreacher Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) commit 60da73808298ff2cfa9f165d55eb3d7aa7078601 Author: Shang XiaoJing Date: Thu Nov 10 17:08:10 2022 +0800 rtc: class: Fix potential memleak in devm_rtc_allocate_device() devm_rtc_allocate_device() will alloc a rtc_device first, and then run dev_set_name(). If dev_set_name() failed, the rtc_device will memleak. Move devm_add_action_or_reset() in front of dev_set_name() to prevent memleak. unreferenced object 0xffff888110a53000 (size 2048): comm "python3", pid 470, jiffies 4296078308 (age 58.882s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 08 30 a5 10 81 88 ff ff .........0...... 08 30 a5 10 81 88 ff ff 00 00 00 00 00 00 00 00 .0.............. backtrace: [<000000004aac0364>] kmalloc_trace+0x21/0x110 [<000000000ff02202>] devm_rtc_allocate_device+0xd4/0x400 [<000000001bdf5639>] devm_rtc_device_register+0x1a/0x80 [<00000000351bf81c>] rx4581_probe+0xdd/0x110 [rtc_rx4581] [<00000000f0eba0ae>] spi_probe+0xde/0x130 [<00000000bff89ee8>] really_probe+0x175/0x3f0 [<00000000128e8d84>] __driver_probe_device+0xe6/0x170 [<00000000ee5bf913>] device_driver_attach+0x32/0x80 [<00000000f3f28f92>] bind_store+0x10b/0x1a0 [<000000009ff812d8>] drv_attr_store+0x49/0x70 [<000000008139c323>] sysfs_kf_write+0x8d/0xb0 [<00000000b6146e01>] kernfs_fop_write_iter+0x214/0x2d0 [<00000000ecbe3895>] vfs_write+0x61a/0x7d0 [<00000000aa2196ea>] ksys_write+0xc8/0x190 [<0000000046a600f5>] do_syscall_64+0x37/0x90 [<00000000541a336f>] entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 24d23181e43d ("rtc: class: check return value when calling dev_set_name()") Signed-off-by: Shang XiaoJing Reviewed-by: Yang Yingliang Link: https://lore.kernel.org/r/20221110090810.11225-1-shangxiaojing@huawei.com Signed-off-by: Alexandre Belloni drivers/rtc/class.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4dfe05bdc1ade79b943d4979a2e2a8b5ef68fbb5 Author: Ian Abbott Date: Thu Oct 27 17:32:49 2022 +0100 rtc: ds1347: fix value written to century register In `ds1347_set_time()`, the wrong value is being written to the `DS1347_CENTURY_REG` register. It needs to be converted to BCD. Fix it. Fixes: 147dae76dbb9 ("rtc: ds1347: handle century register") Cc: # v5.5+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20221027163249.447416-1-abbotti@mev.co.uk Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1347.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e59b3c730b44f042540319d62cba73054fd928c8 Author: Christophe JAILLET Date: Sun Nov 6 09:00:51 2022 +0100 rtc: Include when appropriate The kstrto() functions have been moved from kernel.h to kstrtox.h. So, include the latter directly in the appropriate files. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/786421fd0435a32206288904a1f879436a717529.1667721637.git.christophe.jaillet@wanadoo.fr Signed-off-by: Alexandre Belloni drivers/rtc/rtc-abx80x.c | 1 + drivers/rtc/rtc-bq32k.c | 1 + drivers/rtc/rtc-ds1307.c | 1 + drivers/rtc/rtc-rv3029c2.c | 1 + drivers/rtc/rtc-rx8025.c | 1 + drivers/rtc/sysfs.c | 1 + 6 files changed, 6 insertions(+) commit 8d816c1eaa752546fa3221f5027af0a667ff0c8f Author: Rasmus Villemoes Date: Fri Nov 4 12:02:25 2022 +0100 rtc: isl12022: add support for temperature sensor The isl12022 has built-in temperature compensation effective over the range -40C to +85C. It exposes the average of the last two temperature measurements as a 10-bit value in half-Kelvins. Make this available via the hwmon framework. Reviewed-by: Guenter Roeck Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20221104110225.2219761-1-linux@rasmusvillemoes.dk Signed-off-by: Alexandre Belloni drivers/rtc/rtc-isl12022.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit f8513363b0b7155afaee09cca777fc608dc957e3 Author: ye xingchen Date: Mon Sep 5 09:01:19 2022 +0000 rtc: s35390a: Remove the unneeded result variable Return the value s35390a_set_reg() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/20220905090119.335121-1-ye.xingchen@zte.com.cn Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s35390a.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c69bffe199270ce001d5764985a8e414c7e05fee Author: Sebastian Reichel Date: Mon Oct 24 18:55:49 2022 +0200 dt-bindings: rtc: convert hym8563 bindings to json-schema Convert RTC binding for Haoyu Microelectronics HYM8563 to Device Tree Schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Heiko Stuebner Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221024165549.74574-7-sebastian.reichel@collabora.com Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/haoyu,hym8563.txt | 30 ------------ .../devicetree/bindings/rtc/haoyu,hym8563.yaml | 56 ++++++++++++++++++++++ 2 files changed, 56 insertions(+), 30 deletions(-) commit 1ff56edf137a2f034fee9b9a398ddcd8cb7a5a34 Author: Zhang Jianhua Date: Tue Sep 6 22:30:37 2022 +0800 rtc: fsl-ftm-alarm: Use module_platform_driver replace device_initcall The ftm_rtc_driver has been registered while module init, however there is not unregister step for module exit, now use the macro module_platform_driver replace device_initcall, which can register and unregister platform driver automatically. Signed-off-by: Zhang Jianhua Link: https://lore.kernel.org/r/20220906143037.1455317-1-chris.zjh@huawei.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-fsl-ftm-alarm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 97e78b64d138021c837a30bfa78201caf27c16b9 Author: Arnd Bergmann Date: Wed Oct 19 17:29:34 2022 +0200 rtc: remove davinci rtc driver The Davinci dm365 SoC support was removed, so the rtc driver has no remaining users. Signed-off-by: Arnd Bergmann Acked-by: Bartosz Golaszewski Acked-by: Marc Zyngier Acked-by: Kevin Hilman Link: https://lore.kernel.org/r/20221019152947.3857217-9-arnd@kernel.org Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 10 - drivers/rtc/Makefile | 1 - drivers/rtc/rtc-davinci.c | 512 ---------------------------------------------- 3 files changed, 523 deletions(-) commit eb633de6abcb3003a8a2c03377d39a91a8d57d20 Author: Yang Yingliang Date: Mon Sep 19 16:38:12 2022 +0800 rtc: s3c: Switch to use dev_err_probe() helper In the probe path, dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220919083812.755082-1-yangyingliang@huawei.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s3c.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 5dc8356830428656c3a00dd702fb9102fe43550f Author: Yang Yingliang Date: Tue Sep 13 22:49:05 2022 +0800 rtc: ds1302: remove unnecessary spi_set_drvdata() Remove unnecessary spi_set_drvdata() in ds1302_remove(), the driver_data will be set to NULL in device_unbind_cleanup() after calling ->remove(). After this, ds1302_remove() is an empty function, so remove it too. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220913144905.2004924-1-yangyingliang@huawei.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1302.c | 6 ------ 1 file changed, 6 deletions(-) commit f27efee663701f0e93351cf052677214fed40a42 Author: Guenter Roeck Date: Fri Oct 28 17:54:00 2022 -0700 rtc: cros-ec: Limit RTC alarm range if needed RTC chips on some older Chromebooks can only handle alarms less than 24 hours in the future. Attempts to set an alarm beyond that range fails. The most severe impact of this limitation is that suspend requests fail if alarmtimer_suspend() tries to set an alarm for more than 24 hours in the future. Try to set the real-time alarm to just below 24 hours if setting it to a larger value fails to work around the problem. While not perfect, it is better than just failing the call. A similar workaround is already implemented in the rtc-tps6586x driver. Drop error messages in cros_ec_rtc_get() and cros_ec_rtc_set() since the calling code also logs an error and to avoid spurious error messages if setting the alarm ultimately succeeds. Cc: Brian Norris Signed-off-by: Guenter Roeck Commit: Guenter Roeck Reviewed-by: Tzung-Bi Shih Reviewed-by: Brian Norris Tested-by: Brian Norris Link: https://lore.kernel.org/r/20221029005400.2712577-1-linux@roeck-us.net Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cros-ec.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit 741a2830734bc22238e5c248630311e401481ecc Author: Neil Armstrong Date: Tue Nov 8 13:02:54 2022 +0100 rtc: pm8xxx: drop unused pm8018 compatible The PM8018 compatible is always used with PM8921 fallback, so PM8018 compatible can be safely removed from device ID table Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220928-mdm9615-dt-schema-fixes-v5-2-bbb120c6766a@linaro.org Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pm8xxx.c | 1 - 1 file changed, 1 deletion(-) commit f2fa14b0b586bad3ff2c0d908b8a44b22eaebe15 Author: Neil Armstrong Date: Tue Nov 8 13:02:53 2022 +0100 dt-bindings: rtc: qcom-pm8xxx: document qcom,pm8921-rtc as fallback of qcom,pm8018-rtc The PM8018 RTC is used as compatible with PM8921 RTC on the MDM9615, document this situation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220928-mdm9615-dt-schema-fixes-v5-1-bbb120c6766a@linaro.org Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 9800f24f7bd5b99fb4fc4ce981427102e2e15a1c Author: Yushan Zhou Date: Mon Nov 7 17:25:44 2022 +0800 rtc: rzn1: Check return value in rzn1_rtc_probe The rzn1_rtc_probe() function utilizes devm_pm_runtime_enable() but wasn't checking the return value. Fix it by adding missing check. Fixes: deeb4b5393e1 ("rtc: rzn1: Add new RTC driver") Signed-off-by: Yushan Zhou Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20221107092544.3721053-1-zys.zljxml@gmail.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rzn1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8ffb7733e162d26393523bd95c5bfffa6e09baf4 Author: Uwe Kleine-König Date: Fri Oct 21 15:07:06 2022 +0200 rtc: rx8025: Convert to .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in .probe(). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221021130706.178687-10-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8025.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 84c2fb386f71d364cf00ec9f4596a2b279e3ca54 Author: Uwe Kleine-König Date: Fri Oct 21 15:07:05 2022 +0200 rtc: rv8803: Convert to .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in .probe(). The device_id array has to move up for that to work. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221021130706.178687-9-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 8d94da6678702fac20ed3e1421b8b1ad03368a8e Author: Uwe Kleine-König Date: Fri Oct 21 15:07:04 2022 +0200 rtc: rs5c372: Convert to .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in .probe(). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221021130706.178687-8-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rs5c372.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5418e595f30bf4fde83ebb0121417c0c95cff98e Author: Uwe Kleine-König Date: Fri Oct 21 15:07:03 2022 +0200 rtc: pcf2127: Convert to .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in .probe(). The device_id array has to move up for that to work. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221021130706.178687-7-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2127.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit c050dedb875c2eee920010c1dba458ce5bf8a171 Author: Uwe Kleine-König Date: Fri Oct 21 15:07:02 2022 +0200 rtc: nct3018y: Convert to .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/20221021130706.178687-6-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni drivers/rtc/rtc-nct3018y.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 67db6f0515d15e6becbd59bc5da4ca2d03d51789 Author: Uwe Kleine-König Date: Fri Oct 21 15:07:01 2022 +0200 rtc: m41t80: Convert to .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in .probe(). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221021130706.178687-5-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2611e6d743be8f1ad2216622f39e12c63352a457 Author: Uwe Kleine-König Date: Fri Oct 21 15:07:00 2022 +0200 rtc: isl1208: Convert to .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in .probe(). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221021130706.178687-4-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni drivers/rtc/rtc-isl1208.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 65d9cc3fd0e7f98964622557c0c94240e68441e7 Author: Uwe Kleine-König Date: Fri Oct 21 15:06:58 2022 +0200 rtc: abx80x: Convert to .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in .probe(). The device_id array has to move up for that to work. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221021130706.178687-2-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni drivers/rtc/rtc-abx80x.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit ee18f2715e85f4ef051851a0c4831ee7ad7d83b3 Author: Peng Fan Date: Wed Nov 2 19:14:10 2022 +0800 remoteproc: imx_rproc: Correct i.MX93 DRAM mapping According to updated reference mannual, the M33 DRAM view of 0x[C,D]0000000 maps to A55 0xC0000000, so correct it. Fixes: 9222fabf0e39 ("remoteproc: imx_rproc: Support i.MX93") Signed-off-by: Peng Fan Cc: stable Link: https://lore.kernel.org/r/20221102111410.38737-1-peng.fan@oss.nxp.com Signed-off-by: Mathieu Poirier drivers/remoteproc/imx_rproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d27252b5706e51188aed7647126e44dcf9e940c1 Author: Dan Carpenter Date: Tue Nov 15 15:56:57 2022 +0300 amdgpu/pm: prevent array underflow in vega20_odn_edit_dpm_table() In the PP_OD_EDIT_VDDC_CURVE case the "input_index" variable is capped at 2 but not checked for negative values so it results in an out of bounds read. This value comes from the user via sysfs. Fixes: d5bf26539494 ("drm/amd/powerplay: added vega20 overdrive support V3") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bd3fe587f8989cd06209927abd71ee0af13cca4a Author: Paulo Miguel Almeida Date: Sun Nov 13 20:44:05 2022 +1300 drm/amdgpu: Replace one-elements array with flex-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_I2C_VOLTAGE_OBJECT_V3, ATOM_ASIC_INTERNAL_SS_INFO_V2, ATOM_ASIC_INTERNAL_SS_INFO_V3, and refactor the rest of the code accordingly. Important to mention is that doing a build before/after this patch results in no functional 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/238 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 22 ++++++++++++++-------- drivers/gpu/drm/amd/include/atombios.h | 6 +++--- 2 files changed, 17 insertions(+), 11 deletions(-) commit 9635709a83aa6deda9e0eef164f1ffff5fe1d37a Author: Evan Quan Date: Tue Nov 8 15:52:20 2022 +0800 drm/amd/pm: fix SMU13 runpm hang due to unintentional workaround The workaround designed for some specific ASICs is wrongly applied to SMU13 ASICs. That leads to some runpm hang. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit a60254d25e4862b9ee582c8be211a892402c1182 Author: Evan Quan Date: Tue Nov 8 16:07:39 2022 +0800 drm/amd/pm: enable runpm support over BACO for SMU13.0.7 Enable SMU13.0.7 runpm support. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 30 ++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 8ae5a38c8cb38559957f7c2d1c5f2bb1be795122 Author: Evan Quan Date: Tue Nov 8 15:44:46 2022 +0800 drm/amd/pm: enable runpm support over BACO for SMU13.0.0 Enable SMU13.0.0 runpm support. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 8 ++++++ drivers/gpu/drm/amd/pm/swsmu/inc/smu_v11_0.h | 10 +------- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 11 +++----- drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 9 +++++++ .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 30 ++++++++++++++++++++-- 6 files changed, 50 insertions(+), 20 deletions(-) commit d293470e10d02ce1afb59cfe43fdf1a6cdb3d726 Author: YiPeng Chai Date: Fri Nov 4 17:50:12 2022 +0800 drm/amdgpu: Fixed the problem that ras error can't be queried after gpu recovery is completed Amdgpu_ras_set_error_query_ready is called at the start of amdgpu_device_gpu_recover to disable query ras error, but the code behind only enables query ras error in full reset path, but not in soft reset path, emergency restart path and skip the hardware reset path. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) commit 220c8cc855ce7075a29926533279a8dfefdd8788 Author: Alex Deucher Date: Fri Nov 11 12:50:38 2022 -0500 drm/amdgpu: there is no vbios fb on devices with no display hw (v2) If we enable virtual display functionality on parts with no display hardware we can end up trying to check for and reserve the vbios FB area on devices where it doesn't exist. Check if display hardware is actually present on the hardware before trying to reserve the memory. v2: move the check into common code Acked-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 41 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) commit 48fb1ecf9371b649202c85ba6d44f5204e88bfc8 Author: Eric Huang Date: Mon Nov 14 11:43:48 2022 -0500 drm/amdkfd: Fix a memory limit issue It is to resolve a regression, which fails to allocate VRAM due to no free memory in application, the reason is we add check of vram_pin_size for memory limit, and application is pinning the memory for Peerdirect, KFD should not count it in memory limit. So removing vram_pin_size will resolve it. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f42c01696ec6c22b06f5dacd31ab98174231e970 Author: Guchun Chen Date: Fri Nov 11 16:54:18 2022 +0800 drm/amdgpu: disable BACO support on more cards Otherwise, some unexpected PCIE AER errors will be observed in runtime suspend/resume cycle. Signed-off-by: Guchun Chen Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 ++++ 1 file changed, 4 insertions(+) commit b6da3c5837abe2e5a73e5097bacd9a7745dc97aa Author: YiPeng Chai Date: Tue Sep 27 11:22:36 2022 +0800 drm/amdgpu: Add umc channel index mapping table for umc_v8_10 Add umc channel index mapping table for umc_v8_10. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/umc_v8_10.c | 10 ++++++++++ drivers/gpu/drm/amd/amdgpu/umc_v8_10.h | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) commit 469694e91f37685ccf93ebc57c2b72012b5abff7 Author: Perry Yuan Date: Tue Oct 11 00:31:47 2022 +0800 drm/amdgpu: remove the DID of Vangogh from pciidlist change the vangogh family to use IP discovery path to initialize IP list, this needs to remove the DID from the PCI ID list to allow the IP discovery path to set all the IP versions correctly. Reviewed-by: Alex Deucher Signed-off-by: Perry Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 --- 1 file changed, 3 deletions(-) commit 20875141d840180106068b5168d9571debc8efde Author: Perry Yuan Date: Wed Nov 2 00:50:17 2022 +0800 drm/amd/display: change GPU match with IP version for Vangogh Use ip versions (10,3,1) to match the GPU after Vangogh switched to use IP discovery path. Reviewed-by: Alex Deucher Signed-off-by: Perry Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5e0f4c041c95ef1f8e6e8ad5be18a2b6a2311b45 Author: Perry Yuan Date: Fri Sep 30 00:18:20 2022 +0800 drm/amdgpu: add Vangogh APU flag to IP discovery path Add the missing apu flag for Vangogh when using IP discovery code path to initialize IPs Reviewed-by: Alex Deucher Signed-off-by: Perry Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) commit c17b7a58e5c3ccd108b440cbdb04ad01b6fd2857 Author: Melissa Wen Date: Thu Nov 3 17:45:00 2022 -0100 drm/amd/display: don't enable DRM CRTC degamma property for DCE DM maps DRM CRTC degamma to DPP (pre-blending) degamma block, but DCE doesn't support programmable degamma curve anywhere. Currently, a custom degamma is accepted by DM but just ignored by DCE driver and degamma correction isn't actually applied. There is no way to map custom degamma in DCE, therefore, DRM CRTC degamma property shouldn't be enabled for DCE drivers. Reviewed-by: Rodrigo Siqueira Signed-off-by: Melissa Wen Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 9a31c06ff7d45a909162076d9f446f925acce76a Author: Aric Cyr Date: Sun Nov 6 20:37:34 2022 -0500 drm/amd/display: 3.2.212 DC version 3.2.212 brings along the following fixes: - Fix DPIA AUX timeout issue - Add HUBP surface flip interrupt handler - Fix dpms_off issue when disabling bios mode - Update SubVP Visual Confirm - Program pipes for ODM when removing planes - Use min transition for all SubVP plane add/remove - Support parsing VRAM info v3.0 from VBIOS - Enable dchub request limit for NV32 - Workaround to increase phantom pipe vactive in pipesplit - Fix dcn3.1x mode validation on high bandwidth config - Check context constructed for pipe split flags after pipesplit - Align phantom pipe dst/src scaling with main for subvp - Fix calculation for cursor CAB allocation - Fix unbounded requesting for high pixel rate modes on dcn315 - Revert Disable DRR actions during state commit - Fix array index out of bound error in bios parser - Fix optc2_configure warning on dcn314 - Fix Subvp phantom pipe transition - Fix prefetch calculations for dcn32 - Use uclk pstate latency for fw assisted mclk validation dcn32 - Set max for prefetch lines on dcn32 - Rework macros for DWB register access - Adjust DP 8b10b LT exit behavior Reviewed-by: Tom Chung Acked-by: Tom Chung Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73f737416ceaee477aa7d931f8fcd4c5356a5ed1 Author: Anthony Koo Date: Sat Nov 5 21:57:07 2022 -0400 drm/amd/display: [FW Promotion] Release 0.0.143.0 - New boot options to enable USB4 DP BW Allocation mode in DPIA Reviewed-by: Aric Cyr Acked-by: Tom Chung Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 180f33d27a55496e1b130ede7db24240133b2428 Author: Ilya Bakoulin Date: Wed Nov 2 15:56:16 2022 -0400 drm/amd/display: Adjust DP 8b10b LT exit behavior [Why] Polling SINK_STATUS DPCD can cause some non-DP2.0 LTTPR hubs to hang and no longer respond to AUX. [How] As a workaround for the problem hubs, and also to more closely match DP spec 8b10b behavior, don't poll for intra-hop AUX reply indication on 8b10b-encoded links. Reviewed-by: Wenjing Liu Acked-by: Tom Chung Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 158858bf1a96adf8370ee829060e87fd10129e62 Author: Aurabindo Pillai Date: Fri May 6 11:04:15 2022 -0400 drm/amd/display: rework macros for DWB register access [Why] A hack was used to access DWB register due to difference in the register naming convention which was not compatible with existing SR/SRI* macros. The additional macro needed were added to dwb ip specific header file (dcnxx_dwb.h) instead of soc resource file (dcnxx_resource.c). Due to this pattern, BASE macro had to be redefined in dcnxx_dwb.h, which in turn needed us to undefine them in the resource file. [How] Add a separate macro for DWB access to the resource files that need it instead of defining them in DWB ip header file. This will enable us to reuse the BASE macro defined in the resource file. Reviewed-by: Roman Li Acked-by: Tom Chung Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb.h | 363 ++++++++++----------- .../gpu/drm/amd/display/dc/dcn20/dcn20_mmhubbub.h | 7 - .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 11 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_vmid.h | 6 - .../gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 - drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb.h | 15 - .../gpu/drm/amd/display/dc/dcn30/dcn30_mmhubbub.h | 7 - .../gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 5 +- .../drm/amd/display/dc/dcn301/dcn301_resource.c | 5 +- .../drm/amd/display/dc/dcn302/dcn302_resource.c | 4 +- .../drm/amd/display/dc/dcn303/dcn303_resource.c | 4 +- .../gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 5 +- .../drm/amd/display/dc/dcn314/dcn314_resource.c | 3 + .../drm/amd/display/dc/dcn315/dcn315_resource.c | 5 +- .../drm/amd/display/dc/dcn316/dcn316_resource.c | 5 +- .../gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 5 +- .../drm/amd/display/dc/dcn321/dcn321_resource.c | 5 +- 17 files changed, 207 insertions(+), 250 deletions(-) commit bcdc915863ed600a75ee1b8468f5c948e3a56ce2 Author: Dillon Varone Date: Thu Nov 3 18:40:01 2022 -0400 drm/amd/display: Set max for prefetch lines on dcn32 [WHY?] Max number of lines that can be used for prefetch due to type constraints is 63.75. [HOW?] Enforce maximum prefetch lines as 63.75. Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.h | 2 ++ .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit af54c2142e82717842340574536da042ae168d0b Author: Dillon Varone Date: Thu Nov 3 18:38:13 2022 -0400 drm/amd/display: use uclk pstate latency for fw assisted mclk validation dcn32 [WHY?] DCN32 uses fclk pstate watermarks for dummy pstate, and must always be supported. [HOW?] Validation needs to be run with fclk pstate latency set as the dummy pstate latency to get correct prefetch and bandwidth outputs. Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit c9e6aeb5885da86d417ce11e0f54416122665e19 Author: Dillon Varone Date: Thu Nov 3 18:33:38 2022 -0400 drm/amd/display: Fix prefetch calculations for dcn32 [Description] Prefetch calculation loop was not exiting until utilizing all of vstartup if it failed once. Locals need to be reset on each iteration of the loop. Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 ++ 1 file changed, 2 insertions(+) commit e267f5e69784f8adaa5bb5848cd7608974c23654 Author: Alvin Lee Date: Fri Nov 4 11:06:42 2022 -0400 drm/amd/display: Fix Subvp phantom pipe transition [Description] - When transitioning a pipe in use (non-phantom) to become a phantom pipe, we must fully disable the pipe first before doing any phantom pipe programming - Move phantom OTG enablement to after "regular" front-end programming sequence (including wait for vupdate) - If a pipe is being transitioned into a phantom pipe, fully disable it first Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 54 +++++++++++++++------- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 38 ++++++++------- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 27 +++++++++++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h | 2 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 + 6 files changed, 87 insertions(+), 36 deletions(-) commit dd9f82c0232eac411b2da36bc433a67f77feeedb Author: Roman Li Date: Thu Nov 3 17:33:07 2022 -0400 drm/amd/display: Fix optc2_configure warning on dcn314 [Why] dcn314 uses optc2_configure_crc() that wraps optc1_configure_crc() + set additional registers not applicable to dcn314. It's not critical but when used leads to warning like: WARNING: drivers/gpu/drm/amd/amdgpu/../display/dc/dc_helper.c Call Trace: generic_reg_set_ex+0x6d/0xe0 [amdgpu] optc2_configure_crc+0x60/0x80 [amdgpu] dc_stream_configure_crc+0x129/0x150 [amdgpu] amdgpu_dm_crtc_configure_crc_source+0x5d/0xe0 [amdgpu] [How] Use optc1_configure_crc() directly Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fc1ba4aa589ca267468ad23fedef37562227d32 Author: Aurabindo Pillai Date: Wed Nov 2 15:35:53 2022 -0400 drm/amd/display: fix array index out of bound error in bios parser [Why&How] Firmware headers dictate that gpio_pin array only has a size of 8. The count returned from vbios however is greater than 8. Fix this by not using array indexing but incrementing the pointer since gpio_pin definition in atomfirmware.h is hardcoded to size 8 Reviewed-by: Martin Leung Acked-by: Tom Chung Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 6f8816261db9251f2635533572f95ab8e530266c Author: Martin Leung Date: Thu Nov 3 11:35:44 2022 -0400 drm/amd/display: revert Disable DRR actions during state commit why and how: causes unstable on certain surface format/mpo transitions This reverts commit de020e5fa9ebc6fc32e82ae6ccb0282451ed937c Reviewed-by: Wesley Chalmers Acked-by: Tom Chung Signed-off-by: Martin Leung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 3 +++ 1 file changed, 3 insertions(+) commit d73aec401fd884a6abe20858cbe95892f796b8d2 Author: Alvin Lee Date: Tue Nov 1 16:10:49 2022 -0400 drm/amd/display: Don't check output BPP for phantom [Description] - If we're enabling phantom pipe for a high link rate display we could fail DML on the phantom pipe since it's set to virtual signal - Therefore don't consider Output BPP for phantom pipe Reviewed-by: Dillon Varone Acked-by: Tom Chung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 655435df0936ce2fda0d5ced7e50101179a3acfd Author: Dmytro Laktyushkin Date: Tue Nov 1 17:09:11 2022 -0400 drm/amd/display: fix unbounded requesting for high pixel rate modes on dcn315 Unbounded requesting is getting configured for odm mode calculations which is incorrect. This change checks whether mode requires odm ahead of time. Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 4 +++- drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) commit 57b014f664b46deafcd4f4d408416aae6c7e16b9 Author: George Shen Date: Tue Nov 1 23:03:03 2022 -0400 drm/amd/display: Fix calculation for cursor CAB allocation [Why] The cursor size (in memory) is currently incorrectly calculated, resulting not enough CAB being allocated for static screen cursor in MALL refresh. This results in cursor image corruption. [How] Use cursor pitch instead of cursor width when calculating cursor size. Update num cache lines calculation to use the result of the cursor size calculation instead of manually recalculating again. Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 7dcc3fcf017dc9e64492bd6348ef51d233cee6f0 Author: Dillon Varone Date: Wed Nov 2 15:28:47 2022 -0400 drm/amd/display: Align phantom pipe dst/src scaling with main for subvp [WHY?] Subvp src/dst stream rectangles are not being created with the same scaling factors as the main stream. [HOW?] Make sure subvp stream src rectangle scales its height to have the same src/dst ratio as the main stream. Reviewed-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit 31494626cec4bdac43e92ff653812650d147d691 Author: Dillon Varone Date: Mon Oct 31 19:08:23 2022 -0400 drm/amd/display: Check context constructed for pipe split flags is still valid [WHY?] After applying pipesplit flags, DML can select a different configuration upon revalidation, despite the desired one still being valid. [HOW?] Check the configuration is still has mode support, and apply it. Reviewed-by: Martin Leung Acked-by: Tom Chung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 27142312c8a44026815df721882468c63c4c96da Author: Charlene Liu Date: Wed Nov 2 12:13:43 2022 -0400 drm/amd/display: fix dcn3.1x mode validation on high bandwidth config [why] 1. correct dram_channel_width (was hard coded to 4 for 32bit) 2. use dm's is_hvm_enable status flag for hostvm_en input for dml. 3. add a function to override to all dcn3.1x. Reviewed-by: Dmytro Laktyushkin Acked-by: Tom Chung Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 4 +- .../amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c | 1 + .../gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 33 ++++++++++--- .../drm/amd/display/dc/dcn315/dcn315_resource.c | 3 +- .../drm/amd/display/dc/dcn316/dcn316_resource.c | 3 +- .../gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.h | 4 ++ .../amd/display/dc/dml/dcn31/display_mode_vba_31.c | 54 +++++++++++++++++++++- .../gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 5 +- .../display/dc/dml/dcn314/display_mode_vba_314.c | 2 - 9 files changed, 90 insertions(+), 19 deletions(-) commit 5b8f9deaf3b6badfc0da968e6e07ceabd19700b6 Author: George Shen Date: Tue Nov 1 00:16:56 2022 -0400 drm/amd/display: Workaround to increase phantom pipe vactive in pipesplit [Why] Certain high resolution displays exhibit DCC line corruption with SubVP enabled. This is likely due to insufficient DCC meta data buffered immediately after the mclk switch. [How] Add workaround to increase phantom pipe vactive height by meta_row_height number of lines, thus increasing the amount of meta data buffered immediately after mclk switch finishes. Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d97fd7a07b34d3671ae09d64f102adabdbd80ffe Author: Jun Lei Date: Wed Nov 2 15:19:37 2022 -0400 drm/amd/display: enable dchub request limit for DCN 3.2.x [why] HW recommend we enable this for better DF QoS for DCN 3.2.x [how] Add interfaces to hubbub to program register Add initialization as part of init_hw Add default settings for DCN 3.2.x Add registry override for debug/tuning Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: Jun Lei Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h | 4 +++- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.c | 18 ++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.h | 8 ++++++-- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.h | 3 ++- drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 1 + 8 files changed, 37 insertions(+), 4 deletions(-) commit 1830902eb896824ca313a50f3486645c2df21327 Author: Will Deacon Date: Tue Nov 15 18:24:03 2022 +0000 perf: arm_cspmu: Fix modular builds due to missing MODULE_LICENSE()s Building an arm64 allmodconfig target results in the following failure from modpost: | ERROR: modpost: missing MODULE_LICENSE() in drivers/perf/arm_cspmu/arm_cspmu.o | ERROR: modpost: missing MODULE_LICENSE() in drivers/perf/arm_cspmu/nvidia_cspmu.o | make[1]: *** [scripts/Makefile.modpost:126: Module.symvers] Error 1 | make: *** [Makefile:1944: modpost] Error 2 Add the missing MODULE_LICENSE() macros, following the license of the source files and symbol exports. Signed-off-by: Will Deacon drivers/perf/arm_cspmu/arm_cspmu.c | 2 ++ drivers/perf/arm_cspmu/nvidia_cspmu.c | 2 ++ 2 files changed, 4 insertions(+) commit afcd946be11c937ed400b1d4727e2b5fe04ba693 Author: Konrad Dybcio Date: Mon Nov 14 15:00:11 2022 +0100 arm64: dts: qcom: sdm845-polaris: Don't duplicate DMA assignment The DMA properties in this DT are identical to the ones already defined in sdm845.dtsi. Remove them. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114140011.43442-1-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 3 --- 1 file changed, 3 deletions(-) commit 5a077120bcf6aacf97da75a0f925bfdbe2666815 Author: Konrad Dybcio Date: Mon Nov 14 15:36:42 2022 +0100 arm64: dts: qcom: sm8350-sagami: Wire up USB regulators and fix USB3 Wire up necessary supplies to USB PHYs to enable USB3 on Sagami and remove all the limit-to-USB2 properties. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114143642.44839-2-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5440c005dadc22ee132d59816ca51eb98aa59954 Author: Konrad Dybcio Date: Mon Nov 14 15:36:41 2022 +0100 arm64: dts: qcom: sm8350-sagami: Add most RPMh regulators Configure most RPMh-controlled regulators on SoMC Sagami. The missing ones (on pm8350b and pm8008[ij]) will be configured when driver support is added. Thankfully, it looks like PDX215 and PDX214 don't have any differences when it comes to PM8350/PM8350C/PMR735a. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114143642.44839-1-konrad.dybcio@linaro.org .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi | 350 +++++++++++++++++++++ 1 file changed, 350 insertions(+) commit f98d1a3c653e7e6f540e680eb8fef046c21cb091 Author: Douglas Anderson Date: Mon Nov 14 16:28:28 2022 -0800 arm64: dts: qcom: sc7280: Make herobrine-audio-rt5682 mic dtsi's match more The 1-mic and 3-mic dtsi still had two minor cosmetic differences after commit '3d11e7e120ee ("arm64: dts: qcom: sc7280: sort out the "Status" to last property with sc7280-herobrine-audio-rt5682.dtsi")'. Let's fix them so the two files diff better. This is expected to have no effect though it will slightly change the generated dtb by removing an unnecessary 'status = "okay"' from the sound node. Signed-off-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114162807.1.I0900b97128f9bb03e5f96fcb3068c227a33f143a@changeid arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32637e33003f36e75e9147788cc0e2f21706ef99 Author: Toke Høiland-Jørgensen Date: Tue Nov 8 15:06:00 2022 +0100 bpf: Expand map key argument of bpf_redirect_map to u64 For queueing packets in XDP we want to add a new redirect map type with support for 64-bit indexes. To prepare fore this, expand the width of the 'key' argument to the bpf_redirect_map() helper. Since BPF registers are always 64-bit, this should be safe to do after the fact. Acked-by: Song Liu Reviewed-by: Stanislav Fomichev Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20221108140601.149971-3-toke@redhat.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 2 +- include/linux/filter.h | 12 ++++++------ include/uapi/linux/bpf.h | 2 +- kernel/bpf/cpumap.c | 4 ++-- kernel/bpf/devmap.c | 4 ++-- kernel/bpf/verifier.c | 2 +- net/core/filter.c | 4 ++-- net/xdp/xskmap.c | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) commit 14d898f3c1b3bf9c4375ee3255ec9e9b89a35578 Author: Toke Høiland-Jørgensen Date: Tue Nov 8 15:05:59 2022 +0100 dev: Move received_rps counter next to RPS members in softnet data Move the received_rps counter value next to the other RPS-related members in softnet_data. This closes two four-byte holes in the structure, making room for another pointer in the first two cache lines without bumping the xmit struct to its own line. Acked-by: Song Liu Reviewed-by: Stanislav Fomichev Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20221108140601.149971-2-toke@redhat.com Signed-off-by: Alexei Starovoitov include/linux/netdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37b5e8c48b9d295aca92caf0fdd3f4b85cc662bc Author: Dzmitry Sankouski Date: Sat Nov 12 23:32:59 2022 +0300 dt-bindings: arm: add xiaomi,sagit board based on msm8998 chip Add xiaomi,sagit board (Xiaomi Mi 6) binding. Signed-off-by: Dzmitry Sankouski Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221112203300.536010-2-dsankouski@gmail.com Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit 2ec3a0f0f17c20eccc3789fd844ba36755b7fe12 Author: George Shen Date: Wed Nov 2 15:06:48 2022 -0400 drm/amd/display: Support parsing VRAM info v3.0 from VBIOS [Why] For DCN3.2 and DCN3.21, VBIOS has switch to using v3.0 of the VRAM info struct. We should read and override the VRAM info in driver with values provided by VBIOS to support memory downbin cases. Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 2641c7b7808191cba25ba28b82bb73ca294924cc Author: Dmytro Laktyushkin Date: Fri Oct 7 11:01:08 2022 -0400 drm/amd/display: use low clocks for no plane configs Stream only configurations do not require DCFCLK, SOCCLK, DPPCLK or FCLK. They also always allow pstate change. Reviewed-by: Charlene Liu Acked-by: Tom Chung Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 18 ++++++++++++++---- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 14 +++++++++++++- 2 files changed, 27 insertions(+), 5 deletions(-) commit 22dbcfd6f4a9f7d4391f0aa66d3f46addea4bee9 Author: Krzysztof Kozlowski Date: Tue Nov 15 11:50:46 2022 +0100 arm64: dts: qcom: trim addresses to 8 digits Hex numbers in addresses and sizes should be rather eight digits, not nine. Drop leading zeros. No functional change (same DTB). Suggested-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115105046.95254-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8450.dtsi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit e4c1b01bc35b04e15782608165aa85b9e1724f7b Author: Alvin Lee Date: Wed Nov 2 12:38:12 2022 -0400 drm/amd/display: Use min transition for all SubVP plane add/remove [Description] - Whenever disabling a phantom pipe, we must run through the minimal transition sequence - In the case where SetVisibility = false for the main pipe, we also need to run through the min transtion when disabling the phantom pipes Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit 1cb69b43550b6c20819decba870db34175677b2a Author: Dillon Varone Date: Tue Nov 1 16:38:20 2022 -0400 drm/amd/display: Program pipes for ODM when removing planes [WHY?] Software state expects pipes to be configured for ODM, but due to the transition occurring on a plane disable, the ODM enablement code is not run. [HOW?] Update ODM when removing a plane, and dynamic ODM is active. Also acquire pipe lock when removing a plane. Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +++- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit ee47b8db538f7fc4cd550eec1220270df1897e69 Author: Liu Xi Date: Wed Nov 2 11:15:34 2022 -0400 drm/amd/display: clean up some irq service code for dcn201 [Why and how] Clean up some irq service code for dcn201. Reviewed-by: Charlene Liu Acked-by: Tom Chung Signed-off-by: Liu Xi Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c | 17 ++++++++++------- .../drm/amd/display/dc/irq/dcn201/irq_service_dcn201.h | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) commit d417ef7bd76a281e95c0965fce691923b953ab10 Author: David Galiffi Date: Fri Oct 21 22:22:46 2022 -0400 drm/amd/display: Update SubVP Visual Confirm [Why] The visual confirm bar is displayed on all displays, but is only updated on a flip. If an update causes SubVP to be disabled on all displays, but there are no updates on the other displays, it will lead to stale information displayed on the non-active displays. An example of this is playing a fullscreen video on a rotated display. [How] Add a procedure to update visual confirm color for all pipes when committing a plane. Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: David Galiffi Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 5aa663752ff6f844c6bfc97d89231e98884ae769 Author: Zhongwei Zhang Date: Fri Oct 28 13:40:31 2022 +0800 drm/amd/display: fix dpms_off issue when disabling bios mode [Why] disable_vbios_mode_if_required() will set dpms_off to false during boot when pixel clk dismatches with driver requires. This will cause extra backlight on and off if OS call 2 times setmode. [How] Set dpms_off to true to keep power_off and let OS control BL by display's powerState. Reviewed-by: Aric Cyr Acked-by: Tom Chung Signed-off-by: Zhongwei Zhang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5d313b4165ca08686d5d41ee08b0a8cab2737ca Author: Stylon Wang Date: Wed Oct 26 21:00:40 2022 +0800 drm/amd/display: Fix invalid DPIA AUX reply causing system hang [Why] Some DPIA AUX replies have incorrect data length from original request. This could lead to overwriting of destination buffer if reply length is larger, which could cause invalid access to stack since many destination buffers are declared as local variables. [How] Check for invalid length from DPIA AUX replies and trigger a retry if reply length is not the same as original request. A DRM_WARN() dmesg log is also produced. Reviewed-by: Roman Li Acked-by: Tom Chung Signed-off-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 20 ++++++++++++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 6 ------ 2 files changed, 20 insertions(+), 6 deletions(-) commit be590ba8e2db4f82c07936af02541c7fea1a16d2 Author: Candice Li Date: Sat Nov 12 16:24:20 2022 +0800 drm/amdgpu: Add psp_13_0_10_ta firmware to modinfo TA firmware loaded on psp v13_0_10, but it is missing in modinfo. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 1 + 1 file changed, 1 insertion(+) commit 4ded1ec8d1b39ad9ca9baeac20171cdf89c50d88 Author: Rodrigo Siqueira Date: Mon Oct 31 14:58:12 2022 -0400 drm/amd/display: Add HUBP surface flip interrupt handler On IGT, there is a test named amd_hotplug, and when the subtest basic is executed on DCN31, we get the following error: [drm] *ERROR* [CRTC:71:crtc-0] flip_done timed out [drm] *ERROR* flip_done timed out [drm] *ERROR* [CRTC:71:crtc-0] commit wait timed out [drm] *ERROR* flip_done timed out [drm] *ERROR* [CONNECTOR:88:DP-1] commit wait timed out [drm] *ERROR* flip_done timed out [drm] *ERROR* [PLANE:59:plane-3] commit wait timed out After enable the page flip log with the below command: echo -n 'format "[PFLIP]" +p' > /sys/kernel/debug/dynamic_debug/control It is possible to see that the flip was submitted, but DC never replied back, which generates time-out issues. This is an indication that the HUBP surface flip is missing. This commit fixes this issue by adding hubp1_set_flip_int to DCN31. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubp.c | 1 + 1 file changed, 1 insertion(+) commit 1c43a48b44a5449ed996215d1488284d5bdb2be0 Author: Stylon Wang Date: Mon Oct 24 15:36:16 2022 +0800 drm/amd/display: Fix access timeout to DPIA AUX at boot time [Why] Since introduction of patch "Query DPIA HPD status.", link detection at boot could be accessing DPIA AUX, which will not succeed until DMUB outbox messaging is enabled and results in below dmesg logs: [ 160.840227] [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout! [How] Enable DMUB outbox messaging before link detection at boot time. Reviewed-by: Wayne Lin Acked-by: Tom Chung Signed-off-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d09ef243035b75a6d403ebfeb7e87fa20d7e25c6 Author: Alex Deucher Date: Tue Jul 19 14:18:41 2022 -0400 drm/amdgpu: clarify DC checks There are several places where we don't want to check if a particular asic could support DC, but rather, if DC is enabled. Set a flag if DC is enabled and check for that rather than if a device supports DC or not. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 32 ++++++++++++----------- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 2 +- 8 files changed, 25 insertions(+), 21 deletions(-) commit a347ca9720335028686b16302bd0d2075880b3d7 Author: Alex Deucher Date: Tue Jul 19 13:15:40 2022 -0400 drm/amdgpu: move non-DC vblank handling out of irq code Move it into the DCE code for each generation. This avoids confusion with the different display paths. v2: no need for a hotplug worker for vkms Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 35 +++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 58 +---------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 4 ++ drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 13 +++++++ drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 13 +++++++ drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 14 +++++++ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 14 +++++++ 8 files changed, 95 insertions(+), 57 deletions(-) commit 25263da37693c764e198b31ab4c647934bf80e07 Author: Alex Deucher Date: Tue Jul 19 12:13:08 2022 -0400 drm/amdgpu: rework SR-IOV virtual display handling virtual display is enabled unconditionally in SR-IOV, but without specifying the virtual_display module, the number of crtcs defaults to 0. Set a single display by default for SR-IOV if the virtual_display parameter is not set. Only enable virtual display by default on SR-IOV on asics which actually have display hardware. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 +++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 18 +++++++++++++++--- drivers/gpu/drm/amd/amdgpu/vi.c | 6 ++++-- 4 files changed, 32 insertions(+), 7 deletions(-) commit 96ce96f8773da4814622fd97e5226915a2c30706 Author: Alex Deucher Date: Tue Jul 19 10:48:19 2022 -0400 drm/amdgpu: use proper DC check in amdgpu_display_supported_domains() amdgpu_device_asic_has_dc_support() just checks the asic itself. amdgpu_device_has_dc_support() is a runtime check which not only checks the asic, but also other things in the driver like whether virtual display is enabled. We want the latter here. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b132731bb936cfe0ee26790eeb51572d12dbf854 Author: Krzysztof Kozlowski Date: Tue Nov 15 13:53:10 2022 +0100 arm64: dts: msm8998: unify PCIe clock order withMSM8996 PCIe on MSM8996 and MSM8998 use the same clocks, so use one order to make the binding simpler. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115125310.184012-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8998.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0d70d5f6614e15bdc269b630b7f884889568b1bb Author: Krzysztof Kozlowski Date: Tue Nov 15 13:53:09 2022 +0100 arm64: dts: msm8998: add MSM8998 specific compatible Add new compatible for MSM8998 (compatible with MSM8996) to allow further customizing if needed and to accurately describe the hardware. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115125310.184012-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17a37fa1222cd32451d429c4386c0334a2ce563c Author: Yifan Zha Date: Fri Nov 11 13:33:53 2022 +0800 drm/amdgpu: Remove programming GCMC_VM_FB_LOCATION* on gfxhub_v3_0_3 in VF [Why] GCMC_VM related registers should be programmed by PSP on host side. L1 and RLCG will block these regisers on VF. [How] Remove programming GCMC_VM_FB_LOCATION_BASE/TOP on gfxhub_v3_0_3 under SRIOV VF. Signed-off-by: Yifan Zha Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.c | 12 ------------ 1 file changed, 12 deletions(-) commit f3416dc88ad37d94a942eebcb9168838c3846087 Author: YuBiao Wang Date: Thu Nov 10 14:53:10 2022 +0800 drm/amdgpu: Stop clearing kiq position during unload Do not clear kiq position in RLC_CP_SCHEDULER so that CP could perform IDLE-SAVE after VF fini. CPG also needs to be active in save command. v2: drop unused variable (Alex) Signed-off-by: YuBiao Wang Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 16 +++++++--------- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 4 +++- 2 files changed, 10 insertions(+), 10 deletions(-) commit f00f26711d7183f8675c5591ba8daaabe94be452 Author: Jayesh Choudhary Date: Mon Oct 31 20:55:20 2022 +0530 arm64: dts: ti: k3-j7200-mcu-wakeup: Drop dma-coherent in crypto node crypto driver itself is not dma-coherent. So drop it. Fixes: d683a73980a6 ("arm64: dts: ti: k3-j7200-mcu-wakeup: Add SA2UL node") Signed-off-by: Jayesh Choudhary Signed-off-by: Nishanth Menon Reviewed-by: Manorit Chawdhry Link: https://lore.kernel.org/r/20221031152520.355653-4-j-choudhary@ti.com arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi | 1 - 1 file changed, 1 deletion(-) commit 26c5012403f3f1fd3bf8f7d3389ee539ae5cc162 Author: Jayesh Choudhary Date: Mon Oct 31 20:55:19 2022 +0530 arm64: dts: ti: k3-j721e-main: Drop dma-coherent in crypto node crypto driver itself is not dma-coherent. So drop it. Fixes: 8ebcaaae8017 ("arm64: dts: ti: k3-j721e-main: Add crypto accelerator node") Signed-off-by: Jayesh Choudhary Signed-off-by: Nishanth Menon Reviewed-by: Manorit Chawdhry Link: https://lore.kernel.org/r/20221031152520.355653-3-j-choudhary@ti.com arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 1 - 1 file changed, 1 deletion(-) commit b86833ab3653dbb0dc453eec4eef8615e63de4e2 Author: Jayesh Choudhary Date: Mon Oct 31 20:55:18 2022 +0530 arm64: dts: ti: k3-am65-main: Drop dma-coherent in crypto node crypto driver itself is not dma-coherent. So drop it. Fixes: b366b2409c97 ("arm64: dts: ti: k3-am6: Add crypto accelarator node") Signed-off-by: Jayesh Choudhary Signed-off-by: Nishanth Menon Reviewed-by: Manorit Chawdhry Link: https://lore.kernel.org/r/20221031152520.355653-2-j-choudhary@ti.com arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 - 1 file changed, 1 deletion(-) commit aec5f36cf6763a1f246befd9db266d24ba6e8d4b Author: Konrad Dybcio Date: Tue Nov 15 16:58:05 2022 +0100 clk: qcom: Add display clock controller driver for SM6375 Add support for the display clock controller found on SM6375. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115155808.10899-2-konrad.dybcio@linaro.org drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/dispcc-sm6375.c | 610 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 620 insertions(+) commit 9285e61a5670657cb0a0f0f4e5c5a320dd18b471 Author: Konrad Dybcio Date: Tue Nov 15 16:58:04 2022 +0100 dt-bindings: clock: add QCOM SM6375 display clock Add device tree bindings for display clock controller for Qualcomm Technology Inc's SM6375 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/20221115155808.10899-1-konrad.dybcio@linaro.org .../bindings/clock/qcom,sm6375-dispcc.yaml | 54 ++++++++++++++++++++++ include/dt-bindings/clock/qcom,sm6375-dispcc.h | 42 +++++++++++++++++ 2 files changed, 96 insertions(+) commit 3308a31c507cacff94dc4c55f8402de1f9102621 Author: Tony Lindgren Date: Tue Nov 15 17:48:42 2022 +0200 arm64: dts: ti: k3-am62: Add general purpose timers for am62 There are 8 general purpose timers on am65 that can be used for things like PWM using pwm-omap-dmtimer driver. There are also additional four timers in the MCU domain that do not have interrupts routable for Linux. We configure the timers with the 25 MHz input clock by default as the 32.768 kHz clock may not be wired on the device. We leave the MCU domain timers clock mux unconfigured, and mark the MCU domain timers reserved. The MCU domain timers are likely reserved by the software for the ESM module. Compared to am65, the timers on am62 do not have a dedicated IO mux for the timers. On am62, the timers have different interrupts, clocks and power domains compared to am65, and the MCU timers are at a different IO address. Cc: Keerthy Cc: Nishanth Menon Cc: Vignesh Raghavendra Signed-off-by: Tony Lindgren Signed-off-by: Nishanth Menon Reviewed-by: Georgi Vlaev Link: https://lore.kernel.org/r/20221115154842.7755-4-tony@atomide.com arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 96 ++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi | 45 +++++++++++++++ 2 files changed, 141 insertions(+) commit cdbaf880b440287f56bc7dc58c4362b6bebb64e4 Author: Tony Lindgren Date: Tue Nov 15 17:48:41 2022 +0200 arm64: dts: ti: k3-am65: Add general purpose timers for am65 There are 12 general purpose timers on am65 that can be used for things like PWM using pwm-omap-dmtimer driver. There are also additional four timers in the MCU domain that do not have interrupts routable for Linux. We configure the timers with the 25 MHz input clock by default as the 32.768 kHz clock may not be wired on the device. We leave the MCU domain timers clock mux unconfigured, and mark the MCU domain timers reserved. The MCU domain timers are likely reserved by the software for the ESM module. Compared to am64, the timer clocks are different on am65. And the MCU timers are at a different IO address. Then j72 adds more timers compared to am65 with a total of 30 timers. And the j72 clocks are different. To avoid duplication for dtsi files, eventually we may want to consider adding timer specific shared dtsi files with the timer clocks mapped using SoC specific files in include/dt-bindings/clock. But let's get am65 timers usable first. Cc: Keerthy Cc: Nishanth Menon Cc: Vignesh Raghavendra Signed-off-by: Tony Lindgren Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221115154842.7755-3-tony@atomide.com arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 144 +++++++++++++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 45 ++++++++++ 2 files changed, 189 insertions(+) commit 7928c712e2d6666a1816d5182038436902f57380 Author: Tony Lindgren Date: Tue Nov 15 17:48:40 2022 +0200 arm64: dts: ti: k3-am65: Configure pinctrl for timer IO pads Compared to the earlier TI SoCs, am65 has an additional level of dedicated multiplexing registers for the timer IO pads. There are timer IO pads in the MCU domain, and in the MAIN domain. These pads can be muxed for the related timers. There are timer IO control registers for input and output. The registers for CTRLMMR_TIMER*_CTRL and CTRLMMR_MCU_TIMER*_CTRL are used to control the input. The registers for CTCTRLMMR_TIMERIO*_CTRL and CTRLMMR_MCU_TIMERIO*_CTRL the output. The multiplexing is documented in TRM "5.1.2.3.1.4 Timer IO Muxing Control Registers" and "5.1.3.3.1.5 Timer IO Muxing Control Registers", and the CASCADE_EN bit is documented in TRM "12.8.3.1 Timers Overview". For chaining timers, the timer IO control registers also have a CASCADE_EN input bit in the CTRLMMR_TIMER*_CTRL in the registers. The CASCADE_EN bit muxes the previous timer output, or possibly and external TIMER_IO pad source, to the input clock of the selected timer instance for odd numered timers. For the even numbered timers, the CASCADE_EN bit does not do anything. The timer cascade input routing options are shown in TRM "Figure 12-3632. Timers Overview". For handling beyond multiplexing, the driver support for timer cascading should be likely be handled via the clock framework. Cc: Keerthy Cc: Nishanth Menon Cc: Vignesh Raghavendra Signed-off-by: Tony Lindgren Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221115154842.7755-2-tony@atomide.com arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 18 ++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) commit 81685b3d022765e5bfeaf476f70cff0a552c65bf Author: Krzysztof Kozlowski Date: Tue Nov 15 11:50:44 2022 +0100 arm64: dts: ti: Trim addresses to 8 digits Hex numbers in addresses and sizes should be rather eight digits, not nine. Drop leading zeros. No functional change (same DTB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221115105044.95225-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 443a8fbc796fb9bdcd734dee6dff0cba6b460e84 Author: Tvrtko Ursulin Date: Tue Nov 15 10:17:30 2022 +0000 drm/i915: Fix vma allocator debug Add a missing colon which I accidentally removed in the recent logging changes. Signed-off-by: Tvrtko Ursulin Fixes: a10234fda466 ("drm/i915: Partial abandonment of legacy DRM logging macros") Cc: Andrzej Hajda Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20221115101730.394880-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_vma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e67ad9354a9b7621341adec4ac2c63d5269f835d Author: Albert Zhou Date: Tue Nov 15 22:38:56 2022 +1100 PCI: pciehp: Enable by default if USB4 enabled Thunderbolt/USB4 PCIe tunneling depends on native PCIe hotplug. Enable pciehp by default if USB4 is enabled. [bhelgaas: squash, update subject, commit logs, tidy whitespace] Link: https://lore.kernel.org/r/20221115113857.35800-2-albert.zhou.50@gmail.com Link: https://lore.kernel.org/r/20221115113857.35800-3-albert.zhou.50@gmail.com Signed-off-by: Albert Zhou Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg drivers/pci/hotplug/Kconfig | 3 +++ drivers/pci/pcie/Kconfig | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit 739be9b6a84b23c40b0fb534b749602fb8285e70 Author: Aidan MacDonald Date: Sat Nov 12 15:29:28 2022 +0000 gpio: sl28cpld: Replace irqchip mask_invert with unmask_base Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald Acked-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-sl28cpld.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ddf07bd874be791a63fca5ac0e3def1e15f2338f Author: Thierry Reding Date: Fri Nov 11 12:37:32 2022 +0100 gpiolib: of: Use correct fwnode for DT-probed chips The OF node store in chip->fwnode is used to explicitly override the FW node for a GPIO chip. For chips that use the default FW node (i.e. that of their parent device), this will be NULL and cause the chip not to be fully registered. Instead, use the GPIO device's FW node, which is set to either the node of the parent device or the explicit override in chip->fwnode. Fixes: 8afe82550240 ("gpiolib: of: Prepare of_gpiochip_add() / of_gpiochip_remove() for fwnode") Tested-by: Marek Szyprowski Signed-off-by: Thierry Reding Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Tested-by: Robert Marko Tested-by: Andrew Halaney Reviewed-by: Brian Masney Tested-by: Brian Masney Tested-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26a9b433cf08adf2fdb50775128b283eb5201ab2 Author: Daniel Müller Date: Mon Nov 14 21:15:01 2022 +0000 bpf/docs: Document how to run CI without patch submission This change documents the process for running the BPF CI before submitting a patch to the upstream mailing list, similar to what happens if a patch is send to bpf@vger.kernel.org: it builds kernel and selftests and runs the latter on different architecture (but it notably does not cover stylistic checks such as cover letter verification). Running BPF CI this way can help achieve better test coverage ahead of patch submission than merely running locally (say, using tools/testing/selftests/bpf/vmtest.sh), as additional architectures may be covered as well. Signed-off-by: Daniel Müller Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221114211501.2068684-1-deso@posteo.net Documentation/bpf/bpf_devel_QA.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 7eba4505394e21df44dcace6b5d741a8e2deea3a Author: Daniel Machon Date: Mon Nov 14 10:29:50 2022 +0100 net: dcb: move getapptrust to separate function This patch fixes a frame size warning, reported by kernel test robot. >> net/dcb/dcbnl.c:1230:1: warning: the frame size of 1244 bytes is >> larger than 1024 bytes [-Wframe-larger-than=] The getapptrust part of dcbnl_ieee_fill is moved to a separate function, and the selector array is now dynamically allocated, instead of stack allocated. Tested on microchip sparx5 driver. Fixes: 6182d5875c33 ("net: dcb: add new apptrust attribute") Reported-by: kernel test robot Signed-off-by: Daniel Machon Link: https://lore.kernel.org/r/20221114092950.2490451-1-daniel.machon@microchip.com Signed-off-by: Paolo Abeni net/dcb/dcbnl.c | 65 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 22 deletions(-) commit c7a79f546100300d18585506f8fd0460a874df4a Author: Ajye Huang Date: Tue Nov 8 12:27:16 2022 +0800 ASoC: Intel: sof rt5682: remove the duplicate codes Remove the redundant code to prevent user confuse. Signed-off-by: Ajye Huang Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221108042716.2930255-3-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 4 ---- 1 file changed, 4 deletions(-) commit 1a9a5ebe1175537dc817531fe74c5949c3a823c1 Author: Ajye Huang Date: Tue Nov 8 12:27:15 2022 +0800 ASoC: Intel: sof_rt5682: add support for ALC5682I-VD with amp rt1019p This patch adds the driver data for two rt1019 speaker amplifiers on SSP1 and ALC5682I-VD on SSP0 for ADL platform. Signed-off-by: Ajye Huang Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221108042716.2930255-2-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 3 +-- sound/soc/intel/common/soc-acpi-intel-adl-match.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) commit 66a796c04b639e2658b4d820dd5fbc842c8c3aae Author: lishqchn Date: Tue Nov 8 12:24:56 2022 +0800 ASoC: core: fix wrong size kzalloc for rtd's components member The actual space for struct snd_soc_component has been allocated by snd_soc_register_component, here rtd's components are pointers to components, I replace the base size from *component to component. Signed-off-by: lishqchn Link: https://lore.kernel.org/r/tencent_59850BB028662B6F2D49D7F3624AB84CCF05@qq.com Signed-off-by: Mark Brown sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a92ce570c81dc0feaeb12a429b4bc65686d17967 Author: Dan Carpenter Date: Tue Nov 15 16:17:43 2022 +0300 ipmi: fix use after free in _ipmi_destroy_user() The intf_free() function frees the "intf" pointer so we cannot dereference it again on the next line. Fixes: cbb79863fc31 ("ipmi: Don't allow device module unload when in use") Signed-off-by: Dan Carpenter Message-Id: Cc: # 5.5+ Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c27a2b527d4de34dfa8d391824e2c30038dcfaca Author: Jiri Slaby (SUSE) Date: Tue Nov 15 08:03:02 2022 +0100 drm/i915: remove circ_buf.h includes The last user of macros from that include was removed in 2018 by the commit below. Fixes: 6cc42152b02b ("drm/i915: Remove support for legacy debugfs crc interface") Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20221115070302.4064-1-jirislaby@kernel.org drivers/gpu/drm/i915/display/intel_pipe_crc.c | 1 - drivers/gpu/drm/i915/i915_irq.c | 1 - 2 files changed, 2 deletions(-) commit 84481be7167eba1957c8718c8b044a47965fdecb Author: Besar Wicaksono Date: Fri Nov 11 16:23:29 2022 -0600 perf: arm_cspmu: Add support for NVIDIA SCF and MCF attribute Add support for NVIDIA System Cache Fabric (SCF) and Memory Control Fabric (MCF) PMU attributes for CoreSight PMU implementation in NVIDIA devices. Acked-by: Suzuki K Poulose Signed-off-by: Besar Wicaksono Link: https://lore.kernel.org/r/20221111222330.48602-3-bwicaksono@nvidia.com Signed-off-by: Will Deacon Documentation/admin-guide/perf/index.rst | 1 + Documentation/admin-guide/perf/nvidia-pmu.rst | 299 +++++++++++++++++++ drivers/perf/arm_cspmu/Makefile | 3 +- drivers/perf/arm_cspmu/arm_cspmu.c | 9 + drivers/perf/arm_cspmu/nvidia_cspmu.c | 398 ++++++++++++++++++++++++++ drivers/perf/arm_cspmu/nvidia_cspmu.h | 17 ++ 6 files changed, 726 insertions(+), 1 deletion(-) commit e37dfd65731dc4f001fa7dfa7f705e6840017d5a Author: Besar Wicaksono Date: Fri Nov 11 16:23:28 2022 -0600 perf: arm_cspmu: Add support for ARM CoreSight PMU driver Add support for ARM CoreSight PMU driver framework and interfaces. The driver provides generic implementation to operate uncore PMU based on ARM CoreSight PMU architecture. The driver also provides interface to get vendor/implementation specific information, for example event attributes and formating. The specification used in this implementation can be found below: * ACPI Arm Performance Monitoring Unit table: https://developer.arm.com/documentation/den0117/latest * ARM Coresight PMU architecture: https://developer.arm.com/documentation/ihi0091/latest Reviewed-by: Suzuki K Poulose Signed-off-by: Besar Wicaksono Link: https://lore.kernel.org/r/20221111222330.48602-2-bwicaksono@nvidia.com Signed-off-by: Will Deacon drivers/perf/Kconfig | 2 + drivers/perf/Makefile | 1 + drivers/perf/arm_cspmu/Kconfig | 13 + drivers/perf/arm_cspmu/Makefile | 6 + drivers/perf/arm_cspmu/arm_cspmu.c | 1292 ++++++++++++++++++++++++++++++++++++ drivers/perf/arm_cspmu/arm_cspmu.h | 151 +++++ 6 files changed, 1465 insertions(+) commit 6f2d566b46436a50a80d6445e82879686b89588c Author: Shang XiaoJing Date: Tue Nov 15 19:55:40 2022 +0800 perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init() arm_smmu_pmu_init() won't remove the callback added by cpuhp_setup_state_multi() when platform_driver_register() failed. Remove the callback by cpuhp_remove_multi_state() in fail path. Similar to the handling of arm_ccn_init() in commit 26242b330093 ("bus: arm-ccn: Prevent hotplug callback leak") Fixes: 7d839b4b9e00 ("perf/smmuv3: Add arm64 smmuv3 pmu driver") Signed-off-by: Shang XiaoJing Reviewed-by: Punit Agrawal Link: https://lore.kernel.org/r/20221115115540.6245-3-shangxiaojing@huawei.com Signed-off-by: Will Deacon drivers/perf/arm_smmuv3_pmu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d9f564c966e63925aac4ba273a9319d7fb6f4b4e Author: Shang XiaoJing Date: Tue Nov 15 19:55:39 2022 +0800 perf/arm_dmc620: Fix hotplug callback leak in dmc620_pmu_init() dmc620_pmu_init() won't remove the callback added by cpuhp_setup_state_multi() when platform_driver_register() failed. Remove the callback by cpuhp_remove_multi_state() in fail path. Similar to the handling of arm_ccn_init() in commit 26242b330093 ("bus: arm-ccn: Prevent hotplug callback leak") Fixes: 53c218da220c ("driver/perf: Add PMU driver for the ARM DMC-620 memory controller") Signed-off-by: Shang XiaoJing Reviewed-by: Punit Agrawal Link: https://lore.kernel.org/r/20221115115540.6245-2-shangxiaojing@huawei.com Signed-off-by: Will Deacon drivers/perf/arm_dmc620_pmu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 124c49b1b5d947b7180c5d6cbb09ddf76ea45ea2 Author: Mark Rutland Date: Wed Oct 19 15:41:23 2022 +0100 arm64: armv8_deprecated: rework deprected instruction handling Support for deprecated instructions can be enabled or disabled at runtime. To handle this, the code in armv8_deprecated.c registers and unregisters undef_hooks, and makes cross CPU calls to configure HW support. This is rather complicated, and the synchronization required to make this safe ends up serializing the handling of instructions which have been trapped. This patch simplifies the deprecated instruction handling by removing the dynamic registration and unregistration, and changing the trap handling code to determine whether a handler should be invoked. This removes the need for dynamic list management, and simplifies the locking requirements, making it possible to handle trapped instructions entirely in parallel. Where changing the emulation state requires a cross-call, this is serialized by locally disabling interrupts, ensuring that the CPU is not left in an inconsistent state. To simplify sysctl management, each insn_emulation is given a separate sysctl table, permitting these to be registered separately. The core sysctl code will iterate over all of these when walking sysfs. I've tested this with userspace programs which use each of the deprecated instructions, and I've concurrently modified the support level for each of the features back-and-forth between HW and emulated to check that there are no spurious SIGILLs sent to userspace when the support level is changed. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Joey Gouly Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20221019144123.612388-10-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/traps.h | 19 ++- arch/arm64/kernel/armv8_deprecated.c | 282 +++++++++++++++++------------------ arch/arm64/kernel/traps.c | 40 +---- 3 files changed, 149 insertions(+), 192 deletions(-) commit 0c5f416219da3795dc8b33e5bb7865a6b3c4e55c Author: Mark Rutland Date: Wed Oct 19 15:41:22 2022 +0100 arm64: armv8_deprecated: move aarch32 helper earlier Subsequent patches will rework the logic in armv8_deprecated.c. In preparation for subsequent changes, this patch moves some shared logic earlier in the file. This will make subsequent diffs simpler and easier to read. At the same time, drop the `__kprobes` annotation from aarch32_check_condition(), as this is only used for traps from compat userspace, and has no risk of recursion within kprobes. As this is the last kprobes annotation in armve8_deprecated.c, we no longer need to include . Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Joey Gouly Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20221019144123.612388-9-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/armv8_deprecated.c | 39 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 20 deletions(-) commit 25eeac0cfe7c97ade1be07340e11e7143aab57a6 Author: Mark Rutland Date: Wed Oct 19 15:41:21 2022 +0100 arm64: armv8_deprecated move emulation functions Subsequent patches will rework the logic in armv8_deprecated.c. In preparation for subsequent changes, this patch moves the emulation logic earlier in the file, and moves the infrastructure later in the file. This will make subsequent diffs simpler and easier to read. This is purely a move. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Joey Gouly Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20221019144123.612388-8-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/armv8_deprecated.c | 394 +++++++++++++++++------------------ 1 file changed, 197 insertions(+), 197 deletions(-) commit b4453cc8a7ebbd45436a8cd3ffeaa069ceac146f Author: Mark Rutland Date: Wed Oct 19 15:41:20 2022 +0100 arm64: armv8_deprecated: fold ops into insn_emulation The code for emulating deprecated instructions has two related structures: struct insn_emulation_ops and struct insn_emulation, where each struct insn_emulation_ops is associated 1-1 with a struct insn_emulation. It would be simpler to combine the two into a single structure, removing the need for (unconditional) dynamic allocation at boot time, and simplifying some runtime pointer chasing. This patch merges the two structures together. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Joey Gouly Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20221019144123.612388-7-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/armv8_deprecated.c | 76 ++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 43 deletions(-) commit f5962add74b61f8ae31c6311f75ca35d7e1d2d8f Author: Mark Rutland Date: Wed Oct 19 15:41:19 2022 +0100 arm64: rework EL0 MRS emulation On CPUs without FEAT_IDST, ID register emulation is slower than it needs to be, as all threads contend for the same lock to perform the emulation. This patch reworks the emulation to avoid this unnecessary contention. On CPUs with FEAT_IDST (which is mandatory from ARMv8.4 onwards), EL0 accesses to ID registers result in a SYS trap, and emulation of these is handled with a sys64_hook. These hooks are statically allocated, and no locking is required to iterate through the hooks and perform the emulation, allowing emulation to occur in parallel with no contention. On CPUs without FEAT_IDST, EL0 accesses to ID registers result in an UNDEFINED exception, and emulation of these accesses is handled with an undef_hook. When an EL0 MRS instruction is trapped to EL1, the kernel finds the relevant handler by iterating through all of the undef_hooks, requiring undef_lock to be held during this lookup. This locking is only required to safely traverse the list of undef_hooks (as it can be concurrently modified), and the actual emulation of the MRS does not require any mutual exclusion. This locking is an unfortunate bottleneck, especially given that MRS emulation is enabled unconditionally and is never disabled. This patch reworks the non-FEAT_IDST MRS emulation logic so that it can be invoked directly from do_el0_undef(). This removes the bottleneck, allowing MRS traps to be handled entirely in parallel, and is a stepping stone to making all of the undef_hooks lock-free. I've tested this in a 64-vCPU VM on a 64-CPU ThunderX2 host, with a benchmark which spawns a number of threads which each try to read ID_AA64ISAR0_EL1 1000000 times. This is vastly more contention than will ever be seen in realistic usage, but clearly demonstrates the removal of the bottleneck: | Threads || Time (seconds) | | || Before || After | | || Real | System || Real | System | |---------++--------+---------++--------+---------| | 1 || 0.29 | 0.20 || 0.24 | 0.12 | | 2 || 0.35 | 0.51 || 0.23 | 0.27 | | 4 || 1.08 | 3.87 || 0.24 | 0.56 | | 8 || 4.31 | 33.60 || 0.24 | 1.11 | | 16 || 9.47 | 149.39 || 0.23 | 2.15 | | 32 || 19.07 | 605.27 || 0.24 | 4.38 | | 64 || 65.40 | 3609.09 || 0.33 | 11.27 | Aside from the speedup, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Joey Gouly Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20221019144123.612388-6-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 3 ++- arch/arm64/kernel/cpufeature.c | 23 +++++------------------ arch/arm64/kernel/traps.c | 3 +++ 3 files changed, 10 insertions(+), 19 deletions(-) commit dbfbd87efa79575491af0ba1a87bf567eaea6cae Author: Mark Rutland Date: Wed Oct 19 15:41:18 2022 +0100 arm64: factor insn read out of call_undef_hook() Subsequent patches will rework EL0 UNDEF handling, removing the need for struct undef_hook and call_undef_hook. In preparation for those changes, this patch factors the logic for reading user instructions out of call_undef_hook() and into a new user_insn_read() helper, matching the style of the existing aarch64_insn_read() helper used for reading kernel instructions. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Joey Gouly Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20221019144123.612388-5-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/traps.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit bff8f413c71ffc3cb679dbd9a5632b33af563f9f Author: Mark Rutland Date: Wed Oct 19 15:41:17 2022 +0100 arm64: factor out EL1 SSBS emulation hook Currently call_undef_hook() is used to handle UNDEFINED exceptions from EL0 and EL1. As support for deprecated instructions may be enabled independently, the handlers for individual instructions are organised as a linked list of struct undef_hook which can be manipulated dynamically. As this can be manipulated dynamically, the list is protected with a raw_spinlock which must be acquired when handling UNDEFINED exceptions or when manipulating the list of handlers. This locking is unfortunate as it serialises handling of UNDEFINED exceptions, and requires RCU to be enabled for lockdep, requiring the use of RCU_NONIDLE() in resume path of cpu_suspend() since commit: a2c42bbabbe260b7 ("arm64: spectre: Prevent lockdep splat on v4 mitigation enable path") The list of UNDEFINED handlers largely consist of handlers for exceptions taken from EL0, and the only handler for exceptions taken from EL1 handles `MSR SSBS, #imm` on CPUs which feature PSTATE.SSBS but lack the corresponding MSR (Immediate) instruction. Other than this we never expect to take an UNDEFINED exception from EL1 in normal operation. This patch reworks do_el0_undef() to invoke the EL1 SSBS handler directly, relegating call_undef_hook() to only handle EL0 UNDEFs. This removes redundant work to iterate the list for EL1 UNDEFs, and removes the need for locking, permitting EL1 UNDEFs to be handled in parallel without contention. The RCU_NONIDLE() call in cpu_suspend() will be removed in a subsequent patch, as there are other potential issues with the use of instrumentable code and RCU in the CPU suspend code. I've tested this by forcing the detection of SSBS on a CPU that doesn't have it, and verifying that the try_emulate_el1_ssbs() callback is invoked. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Joey Gouly Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20221019144123.612388-4-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/spectre.h | 2 ++ arch/arm64/kernel/proton-pack.c | 26 +++++++------------------- arch/arm64/kernel/traps.c | 15 ++++++++------- 3 files changed, 17 insertions(+), 26 deletions(-) commit 61d64a376ea80f9097e7ea599bcd68671b836dc6 Author: Mark Rutland Date: Wed Oct 19 15:41:16 2022 +0100 arm64: split EL0/EL1 UNDEF handlers In general, exceptions taken from EL1 need to be handled separately from exceptions taken from EL0, as the logic to handle the two cases can be significantly divergent, and exceptions taken from EL1 typically have more stringent requirements on locking and instrumentation. Subsequent patches will rework the way EL1 UNDEFs are handled in order to address longstanding soundness issues with instrumentation and RCU. In preparation for that rework, this patch splits the existing do_undefinstr() handler into separate do_el0_undef() and do_el1_undef() handlers. Prior to this patch, do_undefinstr() was marked with NOKPROBE_SYMBOL(), preventing instrumentation via kprobes. However, do_undefinstr() invokes other code which can be instrumented, and: * For UNDEFINED exceptions taken from EL0, there is no risk of recursion within kprobes. Therefore it is safe for do_el0_undef to be instrumented with kprobes, and it does not need to be marked with NOKPROBE_SYMBOL(). * For UNDEFINED exceptions taken from EL1, either: (a) The exception is has been taken when manipulating SSBS; these cases are limited and do not occur within code that can be invoked recursively via kprobes. Hence, in these cases instrumentation with kprobes is benign. (b) The exception has been taken for an unknown reason, as other than manipulating SSBS we do not expect to take UNDEFINED exceptions from EL1. Any handling of these exception is best-effort. ... and in either case, marking do_el1_undef() with NOKPROBE_SYMBOL() isn't sufficient to prevent recursion via kprobes as functions it calls (including die()) are instrumentable via kprobes. Hence, it's not worthwhile to mark do_el1_undef() with NOKPROBE_SYMBOL(). The same applies to do_el1_bti() and do_el1_fpac(), so their NOKPROBE_SYMBOL() annotations are also removed. Aside from the new instrumentability, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Joey Gouly Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20221019144123.612388-3-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/exception.h | 3 ++- arch/arm64/kernel/entry-common.c | 4 ++-- arch/arm64/kernel/traps.c | 22 ++++++++++++---------- 3 files changed, 16 insertions(+), 13 deletions(-) commit b3a0c010e900a9f89dcd99f10bd8f7538d21b0a9 Author: Mark Rutland Date: Wed Oct 19 15:41:15 2022 +0100 arm64: allow kprobes on EL0 handlers Currently do_sysinstr() and do_cp15instr() are marked with NOKPROBE_SYMBOL(). However, these are only called for exceptions taken from EL0, and there is no risk of recursion in kprobes, so this is not necessary. Remove the NOKPROBE_SYMBOL() annotation, and rename the two functions to more clearly indicate that these are solely for exceptions taken from EL0, better matching the names used by the lower level entry points in entry-common.c. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Joey Gouly Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20221019144123.612388-2-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/exception.h | 4 ++-- arch/arm64/kernel/entry-common.c | 4 ++-- arch/arm64/kernel/traps.c | 6 ++---- 3 files changed, 6 insertions(+), 8 deletions(-) commit 973ae93d80d9d262f695eb485a1902b74c4b9098 Author: Yuan Can Date: Tue Nov 15 07:02:07 2022 +0000 drivers: perf: marvell_cn10k: Fix hotplug callback leak in tad_pmu_init() tad_pmu_init() won't remove the callback added by cpuhp_setup_state_multi() when platform_driver_register() failed. Remove the callback by cpuhp_remove_multi_state() in fail path. Similar to the handling of arm_ccn_init() in commit 26242b330093 ("bus: arm-ccn: Prevent hotplug callback leak") Fixes: 036a7584bede ("drivers: perf: Add LLC-TAD perf counter support") Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20221115070207.32634-3-yuancan@huawei.com Signed-off-by: Will Deacon drivers/perf/marvell_cn10k_tad_pmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit facafab7611f7b872c6b9eeaff53461ef11f482e Author: Yuan Can Date: Tue Nov 15 07:02:06 2022 +0000 perf: arm_dsu: Fix hotplug callback leak in dsu_pmu_init() dsu_pmu_init() won't remove the callback added by cpuhp_setup_state_multi() when platform_driver_register() failed. Remove the callback by cpuhp_remove_multi_state() in fail path. Similar to the handling of arm_ccn_init() in commit 26242b330093 ("bus: arm-ccn: Prevent hotplug callback leak") Fixes: 7520fa99246d ("perf: ARM DynamIQ Shared Unit PMU support") Signed-off-by: Yuan Can Acked-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20221115070207.32634-2-yuancan@huawei.com Signed-off-by: Will Deacon drivers/perf/arm_dsu_pmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit eb2d4514a5971444f67ac8b95bcd63e7702fa6bf Author: Ian Rogers Date: Mon Nov 14 13:07:21 2022 -0800 perf pmu: Restructure print_pmu_events() to avoid memory allocations Previously print_pmu_events() would compute the values to be printed, place them in struct sevent, sort them and then print them. Modify the code so that struct sevent holds just the PMU and event, sort these and then in the main print loop calculate aliases for names, etc. This avoids memory allocations for copied values as they are computed then printed. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20221114210723.2749751-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 208 ++++++++++++++++++++++++++------------------------ 1 file changed, 110 insertions(+), 98 deletions(-) commit de3752a7d6c4435087ce7cb8537bfa987b93ec8b Author: Ian Rogers Date: Mon Nov 14 13:07:20 2022 -0800 perf list: Simplify symbol event printing The current code computes an array of symbol names then sorts and prints them. Use a strlist to create a list of names that is sorted and then print it. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20221114210723.2749751-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/print-events.c | 79 +++++++++++------------------------------- 1 file changed, 21 insertions(+), 58 deletions(-) commit 3301b3fe9bdcfcb109e44e31160e830fe558faec Author: Ian Rogers Date: Mon Nov 14 13:07:19 2022 -0800 perf list: Simplify cache event printing The current code computes an array of cache names then sorts and prints them. Use a strlist to create a list of names that is sorted. Keep the hybrid names, it is unclear how to generalize it, but drop the computation of evt_pmus that is never used. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Kang Minchul Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20221114210723.2749751-7-irogers@google.com [ Fixed up clash with cf9f67b36303de65 ("perf print-events: Remove redundant comparison with zero")] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/print-events.c | 130 +++++++++-------------------------------- 1 file changed, 27 insertions(+), 103 deletions(-) commit 0bb1fbffc631064db567ccaeb9ed6b6df6342b66 Author: Mark Rutland Date: Mon Nov 14 10:44:11 2022 +0000 arm64: mm: kfence: only handle translation faults Alexander noted that KFENCE only expects to handle faults from invalid page table entries (i.e. translation faults), but arm64's fault handling logic will call kfence_handle_page_fault() for other types of faults, including alignment faults caused by unaligned atomics. This has the unfortunate property of causing those other faults to be reported as "KFENCE: use-after-free", which is misleading and hinders debugging. Fix this by only forwarding unhandled translation faults to the KFENCE code, similar to what x86 does already. Alexander has verified that this passes all the tests in the KFENCE test suite and avoids bogus reports on misaligned atomics. Link: https://lore.kernel.org/all/20221102081620.1465154-1-zhongbaisong@huawei.com/ Fixes: 840b23986344 ("arm64, kfence: enable KFENCE for ARM64") Signed-off-by: Mark Rutland Reviewed-by: Alexander Potapenko Tested-by: Alexander Potapenko Cc: Catalin Marinas Cc: Marco Elver Cc: Will Deacon Link: https://lore.kernel.org/r/20221114104411.2853040-1-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ca0fe62413f3f536201d788672cd6cf7c4ed52dd Author: Ian Rogers Date: Mon Nov 14 13:07:18 2022 -0800 perf list: Generalize limiting to a PMU name Deprecate the --cputype option and add a --unit option where '--unit cpu_atom' behaves like '--cputype atom'. The --unit option can be used with arbitrary PMUs, for example: ``` $ perf list --unit msr pmu List of pre-defined events (to be used in -e or -M): msr/aperf/ [Kernel PMU event] msr/cpu_thermal_margin/ [Kernel PMU event] msr/mperf/ [Kernel PMU event] msr/pperf/ [Kernel PMU event] msr/smi/ [Kernel PMU event] msr/tsc/ [Kernel PMU event] ``` Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20221114210723.2749751-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-list.txt | 6 +++--- tools/perf/builtin-list.c | 18 ++++++++++++------ tools/perf/util/metricgroup.c | 3 ++- tools/perf/util/pmu.c | 4 +--- 4 files changed, 18 insertions(+), 13 deletions(-) commit d74060c03368063c64e63004319e2a39930c4297 Author: Ian Rogers Date: Mon Nov 14 13:07:17 2022 -0800 perf tracepoint: Sort events in iterator In print_tracepoint_events() use tracing_events__scandir_alphasort() and scandir alphasort so that the subsystem and events are sorted and don't need a secondary qsort. Locally this results in the following change: ... ext4:ext4_zero_range [Tracepoint event] - fib6:fib6_table_lookup [Tracepoint event] fib:fib_table_lookup [Tracepoint event] + fib6:fib6_table_lookup [Tracepoint event] filelock:break_lease_block [Tracepoint event] ... ie fib6 now is after fib and not before it. This is more consistent with how numbers are more generally sorted, such as: ... syscalls:sys_enter_renameat [Tracepoint event] syscalls:sys_enter_renameat2 [Tracepoint event] ... and so an improvement over the qsort approach. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20221114210723.2749751-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/print-events.c | 108 ++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 71 deletions(-) commit 1504b6f97bad166b484d6f27dc99746fdca5f467 Author: Ian Rogers Date: Mon Nov 14 13:07:16 2022 -0800 tools lib api fs tracing_path: Add scandir alphasort tracing_events__opendir() allows iteration over files in /tracing/events but with an arbitrary sort order. Add a scandir alternative where the results are alphabetically sorted. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20221114210723.2749751-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/fs/tracing_path.c | 16 ++++++++++++++++ tools/lib/api/fs/tracing_path.h | 1 + 2 files changed, 17 insertions(+) commit fe13d43d07393f46957c2fc09f09f097f7969a5d Author: Ian Rogers Date: Mon Nov 14 13:07:15 2022 -0800 perf pmu: Add data structure documentation Add documentation to 'struct perf_pmu' and the associated structs of 'perf_pmu_alias' and 'perf_pmu_format'. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20221114210723.2749751-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 16 +++++++ tools/perf/util/pmu.h | 122 +++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 132 insertions(+), 6 deletions(-) commit e5f4afbe395f1248e7501d470118a2a947fe87e6 Author: Ian Rogers Date: Mon Nov 14 13:07:14 2022 -0800 perf pmu: Remove mostly unused 'struct perf_pmu' 'is_hybrid' member Replace usage with perf_pmu__is_hybrid(). Suggested-by: Kan Liang Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Weilin Wang Cc: Xin Gao Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20221114210723.2749751-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 5 +---- tools/perf/util/evsel.h | 2 +- tools/perf/util/pmu.c | 3 +-- tools/perf/util/pmu.h | 1 - tools/perf/util/stat.c | 11 +++-------- 5 files changed, 6 insertions(+), 16 deletions(-) commit 39522031798dbb53b169b95d4ab25b53301d4eaf Author: Besar Wicaksono Date: Fri Nov 11 17:43:23 2022 -0600 ACPI: APMT: Fix kerneldoc and indentation Add missing kerneldoc and fix alignment on one of the arguments of apmt_add_platform_device function. Signed-off-by: Besar Wicaksono Link: https://lore.kernel.org/r/20221111234323.16182-1-bwicaksono@nvidia.com [will: Fixed up additional indentation issue] Signed-off-by: Will Deacon drivers/acpi/arm64/apmt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 41a87e789c7c2cdeb302331043f866c0138f0413 Author: Biju Das Date: Tue Nov 8 19:13:09 2022 +0000 pinctrl: renesas: rzg2l: remove unnecessary check from rzg2l_dt_node_to_map() This patch removes the unnecessary check from rzg2l_dt_node_to_map() as the ret value is already negative. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20221108191309.3908415-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pinctrl-rzg2l.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d871ea85917599ce4aa507f8b5521e17656a09dc Author: Biju Das Date: Tue Nov 8 18:32:23 2022 +0000 pinctrl: renesas: rzv2m: remove unnecessary check from rzv2m_dt_node_to_map() This patch removes the unnecessary check from rzv2m_dt_node_to_map() as the ret value is already negative. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20221108183223.3902097-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pinctrl-rzv2m.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f750255fdad33e8ac46eadf225d6764148e4642e Author: Mark Rutland Date: Mon Nov 14 13:59:28 2022 +0000 arm64: insn: always inline hint generation All users of aarch64_insn_gen_hint() (e.g. aarch64_insn_gen_nop()) pass a constant argument and generate a constant value. Some of those users are noinstr code (e.g. for alternatives patching). For noinstr code it is necessary to either inline these functions or to ensure the out-of-line versions are noinstr. Since in all cases these are generating a constant, make them __always_inline. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Joey Gouly Cc: Will Deacon Reviewed-by: Joey Gouly Link: https://lore.kernel.org/r/20221114135928.3000571-5-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/insn.h | 14 ++++++++++++-- arch/arm64/lib/insn.c | 10 ---------- 2 files changed, 12 insertions(+), 12 deletions(-) commit 4488f90c8609e5c420531d604dd19cdfee4ec0e0 Author: Mark Rutland Date: Mon Nov 14 13:59:27 2022 +0000 arm64: insn: simplify insn group identification The only code which needs to check for an entire instruction group is the aarch64_insn_is_steppable() helper function used by kprobes, which must not be instrumented, and only needs to check for the "Branch, exception generation and system instructions" class. Currently we have an out-of-line helper in insn.c which must be marked as __kprobes, which indexes a table with some bits extracted from the instruction. In aarch64_insn_is_steppable() we then need to compare the result with an expected enum value. It would be simpler to have a predicate for this, as with the other aarch64_insn_is_*() helpers, which would be always inlined to prevent inadvertent instrumentation, and would permit better code generation. This patch adds a predicate function for this instruction group using the existing __AARCH64_INSN_FUNCS() helpers, and removes the existing out-of-line helper. As the only class we currently care about is the branch+exception+sys class, I have only added helpers for this, and left the other classes unimplemented for now. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Joey Gouly Cc: Will Deacon Reviewed-by: Joey Gouly Link: https://lore.kernel.org/r/20221114135928.3000571-4-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/insn.h | 42 ++++++++++++++-------------------- arch/arm64/kernel/probes/decode-insn.c | 2 +- arch/arm64/lib/insn.c | 24 ------------------- 3 files changed, 18 insertions(+), 50 deletions(-) commit 9b948e79d5369bda7a628bf69521172200d07613 Author: Mark Rutland Date: Mon Nov 14 13:59:26 2022 +0000 arm64: insn: always inline predicates We have a number of aarch64_insn_*() predicates which are used in code which is not instrumentation safe (e.g. alternatives patching, kprobes). Some of those are marked with __kprobes, but most are not, and are implemented out-of-line in insn.c. This patch moves the predicates to insn.h and marks them with __always_inline. This is ensures that they will respect the instrumentation requirements of their caller which they will be inlined into. At the same time, I've formatted each of the functions consistently as a list, to make them easier to read and update in future. Other than preventing unwanted instrumentation, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Joey Gouly Cc: Will Deacon Reviewed-by: Joey Gouly Link: https://lore.kernel.org/r/20221114135928.3000571-3-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/insn.h | 96 +++++++++++++++++++++++++++++++++++-------- arch/arm64/lib/insn.c | 61 --------------------------- 2 files changed, 80 insertions(+), 77 deletions(-) commit 1b6bf2da7b1d2ba7560c793b22d66f134ac61416 Author: Mark Rutland Date: Mon Nov 14 13:59:25 2022 +0000 arm64: insn: remove aarch64_insn_gen_prefetch() There are no users of aarch64_insn_gen_prefetch(), and which encodes a PRFM (immediate) with a hard-coded offset of 0. Remove it for now; we can always restore it with tests if we need it in future. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Joey Gouly Cc: Will Deacon Reviewed-by: Joey Gouly Link: https://lore.kernel.org/r/20221114135928.3000571-2-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/insn.h | 4 --- arch/arm64/lib/insn.c | 70 ------------------------------------------- 2 files changed, 74 deletions(-) commit d8c1d798a2e5091128c391c6dadcc9be334af3f5 Author: Mark Rutland Date: Mon Nov 14 14:40:42 2022 +0000 arm64: make is_ttbrX_addr() noinstr-safe We use is_ttbr0_addr() in noinstr code, but as it's only marked as inline, it's theoretically possible for the compiler to place it out-of-line and instrument it, which would be problematic. Mark is_ttbr0_addr() as __always_inline such that that can safely be used from noinstr code. For consistency, do the same to is_ttbr1_addr(). Note that while is_ttbr1_addr() calls arch_kasan_reset_tag(), this is a macro (and its callees are either macros or __always_inline), so there is not a risk of transient instrumentation. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20221114144042.3001140-1-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/processor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90cf8e21016fa3864a311622f6162fde13aaaf23 Author: Jiucheng Xu Date: Wed Nov 9 09:58:18 2022 +0800 arm64: dts: meson: Add DDR PMU node Add DDR PMU device node for G12 series SoC Signed-off-by: Jiucheng Xu Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20221109015818.194927-4-jiucheng.xu@amlogic.com Signed-off-by: Neil Armstrong arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 ++++++ arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 4 ++++ arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 4 ++++ arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 4 ++++ 4 files changed, 18 insertions(+) commit b9fbe29c59065c24df9e9fb3153db36403d45e2d Merge: a7bab6f8b73f 16f3211110c8 Author: Mauro Carvalho Chehab Date: Tue Nov 15 12:11:46 2022 +0000 Merge tag 'br-v6.2d' of git://linuxtv.org/hverkuil/media_tree into media_stage Tag branch * tag 'br-v6.2d' of git://linuxtv.org/hverkuil/media_tree: (35 commits) media: saa7164: remove variable cnt atomisp: fix potential NULL pointer dereferences radio-terratec: Remove variable p media: platform: s5p-mfc: Fix spelling mistake "mmaping" -> "mmapping" media: platform: mtk-mdp3: remove unused VIDEO_MEDIATEK_VPU config media: vivid: remove redundant assignment to variable checksum media: cedrus: h264: Optimize mv col buffer allocation media: cedrus: h265: Associate mv col buffers with buffer media: mediatek: vcodec: fix h264 cavlc bitstream fail media: cedrus: hevc: Fix offset adjustments media: imx-jpeg: Fix Coverity issue in probe media: v4l2-ioctl.c: Unify YCbCr/YUV terms in format descriptions media: atomisp: Fix spelling mistake "mis-match" -> "mismatch" media: c8sectpfe: Add missed header(s) media: adv748x: afe: Select input port when initializing AFE media: vimc: Update device configuration in the documentation media: adv748x: Remove dead function declaration media: mxl5005s: Make array RegAddr static const media: atomisp: Fix spelling mistake "modee" -> "mode" media: meson/vdec: always init coef_node_start ... commit a7bab6f8b73fe15a6181673149734a2756845dae Merge: 997149b8bfe2 d668c0a73e2c Author: Mauro Carvalho Chehab Date: Tue Nov 15 11:55:54 2022 +0000 Merge tag 'br-v6.2e' of git://linuxtv.org/hverkuil/media_tree into media_stage Tag branch * tag 'br-v6.2e' of git://linuxtv.org/hverkuil/media_tree: (29 commits) media: davinci/vpbe: Fix a typo ("defualt_mode") media: sun6i-csi: Remove unnecessary print function dev_err() media: Documentation: Drop deprecated bytesused == 0 media: platform: exynos4-is: fix return value check in fimc_md_probe() media: dvb-core: remove variable n, turn for-loop to while-loop media: vivid: fix compose size exceed boundary media: rkisp1: make const arrays ae_wnd_num and hist_wnd_num static media: dvb-core: Fix UAF due to refcount races at releasing media: rkvdec: Add required padding media: aspeed: Extend debug message media: aspeed: Support aspeed mode to reduce compressed data media: Documentation: aspeed-video: Add user documentation for the aspeed-video driver media: v4l2-ctrls: Reserve controls for ASPEED media: v4l: Add definition for the Aspeed JPEG format staging: media: tegra-video: fix device_node use after free staging: media: tegra-video: fix chan->mipi value on error media: cedrus: initialize controls a bit later media: cedrus: prefer untiled capture format media: cedrus: Remove cedrus_codec enum media: cedrus: set codec ops immediately ... commit 997149b8bfe22c68e61f812aeb91d4ced3732f04 Merge: 1e284ea984d3 0f6e8d8c94a8 Author: Mauro Carvalho Chehab Date: Tue Nov 15 11:53:57 2022 +0000 Merge tag 'tag-venus-for-v6.2' of git://linuxtv.org/svarbanov/media_tree into media_stage Venus updates for v6.2 * tag 'tag-venus-for-v6.2' of git://linuxtv.org/svarbanov/media_tree: venus: pm_helpers: Fix error check in vcodec_domains_get() venus: firmware: Correct assertion of reset bit on remote processor venus: firmware: Correct non-pix start and end addresses venus: firmware: Correct reset bit MAINTAINERS: Change email for Venus driver MAINTAINERS: Add Vikash as VENUS video driver co-maintainer commit f87f6e5b4539639460ab105e597e5190c9b2500f Author: Chen Lin Date: Fri Nov 4 06:21:21 2022 +0800 iommu/arm-smmu: Warn once when the perfetcher errata patch fails to apply Default reset value of secure banked register SMMU_sACR.cache_lock is 1. If it is not been set to 0 by secure software(eg: atf), the non-secure linux cannot clear ARM_MMU500_ACTLR_CPRE bit. In this situation, the prefetcher errata is not applied successfully, warn once. Signed-off-by: Chen Lin Link: https://lore.kernel.org/r/20221103222121.3051-1-chen45464546@163.com [will: Tweaked wording of diagnostic] Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 +++ 1 file changed, 3 insertions(+) commit ede9c902220036a7e18d753d2b2352b59757aa67 Author: Peter Robinson Date: Wed Nov 2 14:32:42 2022 +0000 arm64: dts: rockchip: Add HDMI supplies on Rock960 Add the avdd-0v9-supply and avdd-1v8-supply regulators to hdmi node for Rock960 to silence the following dmesg warning. [ 6.582782] dwhdmi-rockchip ff940000.hdmi: supply avdd-0v9 not found, using dummy regulator [ 6.583094] dwhdmi-rockchip ff940000.hdmi: supply avdd-1v8 not found, using dummy regulator Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20221102143242.1126229-1-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit a431803852de00d8d3c143b19f5690254225538f Author: Andy Shevchenko Date: Mon Nov 14 20:46:26 2022 +0200 gpiolib: of: Drop redundant check in of_mm_gpiochip_remove() The callers never call the function with invalid pointer. Moreover, compiler quite likely dropped that check anyway because we use that pointer before the check. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 3 --- 1 file changed, 3 deletions(-) commit 77289b2f5aa3535a2e49b448c6afb36f5526016a Author: Andy Shevchenko Date: Mon Nov 14 20:46:25 2022 +0200 gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode GPIO library is getting rid of of_node, fwnode should be utilized instead. Prepare of_mm_gpiochip_add_data() for fwnode. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e0537b16b2557974f81db008a51f41c838dcb81 Author: Andy Yan Date: Sat Nov 5 18:00:12 2022 +0800 arm64: dts: rockchip: Add dts for rockchip rk3566 box demo board This is a rk3566 tv box evaluation demo board. Specification: - Rockchip RK3566 - DDR4 4GB - TF sd scard slot - eMMC - AP6398S for WiFi + BT - Gigabit ethernet - HDMI out - USB HOST 2.0 x 2 - USB 3.0 x 1 - USB OTG 2.0 x 1 - 12V DC Power supply Signed-off-by: Piotr Oniszczuk Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20221105100012.958252-1-andyshrk@163.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts | 503 +++++++++++++++++++++++ 2 files changed, 504 insertions(+) commit 68fc69012b527cb0be2b6b793531c32ab0dd6c29 Author: Andy Yan Date: Sat Nov 5 17:59:35 2022 +0800 dt-bindings: rockchip: Add Rockchip rk3566 box demo board Add device tree binding for Rockchip rk3566 box demo board. Signed-off-by: Andy Yan Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221105095935.958144-1-andyshrk@163.com Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 3736aa7ecc4cd9b4abce30052bad00aba4f0362f Author: Nicolas Frattaroli Date: Sat Nov 12 17:04:01 2022 +0100 arm64: dts: rockchip: Enable PCIe 2 on SOQuartz CM4IO This patch enables the PCIe2 on the CM4IO board when paired with a SOQuartz CM4 System-on-Module board. combphy2 also needs to be enabled in this case to make the PHY work for this. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20221112160404.70868-5-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts | 11 +++++++++++ arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi | 15 +++++++++++++++ 2 files changed, 26 insertions(+) commit 70b620c4ba919a87c607b8d98b08478b213877bd Author: Nicolas Frattaroli Date: Sat Nov 12 17:04:00 2022 +0100 arm64: dts: rockchip: Enable HDMI sound on SOQuartz This patch enables the i2s0 node on SOQuartz, which is responsible for hdmi audio, and adds an hdmi-sound node to enable said audio. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20221112160404.70868-4-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 36d7a605706d9648526a0574b8e7b0e02fa70c2a Author: Nicolas Frattaroli Date: Sat Nov 12 17:03:59 2022 +0100 arm64: dts: rockchip: Enable video output and HDMI on SOQuartz This patch adds and enables the necessary device tree nodes to enable video output and HDMI functionality on the SOQuartz module. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20221112160404.70868-3-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit e48824e8a03e5bc3666e9f5461f68d440d9acba0 Author: Nicolas Frattaroli Date: Sat Nov 12 17:03:58 2022 +0100 arm64: dts: rockchip: Enable GPU on SOQuartz CM4 This enables the Mali-G52 GPU on the SOQuartz CM4 module. Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20221112160404.70868-2-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit f1c506d152ff235ad621d3c25d061cb16da67214 Author: Elaine Zhang Date: Tue Oct 18 17:14:07 2022 +0200 clk: rockchip: add clock controller for the RK3588 Add full clock controller support RK3588. [rebase, integrate fixes from Wyon and Finley, add missing frequencies to PLL lookup table, update commit message, add GATE_LINK clocks which downstream handles in its own driver with one DT node per clock] Signed-off-by: Wyon Bi Signed-off-by: Finley Xiao Signed-off-by: Elaine Zhang Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221018151407.63395-10-sebastian.reichel@collabora.com [dropped module stuff after talking to Sebastian] Signed-off-by: Heiko Stuebner drivers/clk/rockchip/Kconfig | 8 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-rk3588.c | 2533 +++++++++++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.h | 49 +- drivers/clk/rockchip/rst-rk3588.c | 857 +++++++++++++ 5 files changed, 3447 insertions(+), 1 deletion(-) commit f2b41b748c19962b82709d9f23c6b2b0ce9d2f91 Author: Yang Yingliang Date: Tue Nov 15 17:15:08 2022 +0800 regulator: core: fix unbalanced of node refcount in regulator_dev_lookup() I got the the following report: OF: ERROR: memory leak, expected refcount 1 instead of 2, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /i2c/pmic@62/regulators/exten In of_get_regulator(), the node is returned from of_parse_phandle() with refcount incremented, after using it, of_node_put() need be called. Fixes: 69511a452e6d ("regulator: map consumer regulator based on device tree") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221115091508.900752-1-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/regulator/core.c | 1 + 1 file changed, 1 insertion(+) commit e7f9ff5dc90c3826231343439c35c6b7e9e57378 Author: Dmitry Torokhov Date: Fri Nov 11 14:19:08 2022 -0800 gpiolib: add support for software nodes Now that static device properties understand notion of child nodes and references, let's teach gpiolib to handle them: - GPIOs are represented as a references to software nodes representing gpiochip - references must have 2 arguments - GPIO number within the chip and GPIO flags (GPIO_ACTIVE_LOW/GPIO_ACTIVE_HIGH, etc) - a new PROPERTY_ENTRY_GPIO() macro is supplied to ensure the above - name of the software node representing gpiochip must match label of the gpiochip, as we use it to locate gpiochip structure at runtime The following illustrates use of software nodes to describe a "System" button that is currently specified via use of gpio_keys_platform_data in arch/mips/alchemy/board-mtx1.c. It follows bindings specified in Documentation/devicetree/bindings/input/gpio-keys.yaml. static const struct software_node mxt1_gpiochip2_node = { .name = "alchemy-gpio2", }; static const struct property_entry mtx1_gpio_button_props[] = { PROPERTY_ENTRY_U32("linux,code", BTN_0), PROPERTY_ENTRY_STRING("label", "System button"), PROPERTY_ENTRY_GPIO("gpios", &mxt1_gpiochip2_node, 7, GPIO_ACTIVE_LOW), { } }; Similarly, arch/arm/mach-tegra/board-paz00.c can be converted to: static const struct software_node tegra_gpiochip_node = { .name = "tegra-gpio", }; static struct property_entry wifi_rfkill_prop[] __initdata = { PROPERTY_ENTRY_STRING("name", "wifi_rfkill"), PROPERTY_ENTRY_STRING("type", "wlan"), PROPERTY_ENTRY_GPIO("reset-gpios", &tegra_gpiochip_node, 25, GPIO_ACTIVE_HIGH); PROPERTY_ENTRY_GPIO("shutdown-gpios", &tegra_gpiochip_node, 85, GPIO_ACTIVE_HIGH); { }, }; static struct platform_device wifi_rfkill_device = { .name = "rfkill_gpio", .id = -1, }; ... software_node_register(&tegra_gpiochip_node); device_create_managed_software_node(&wifi_rfkill_device.dev, wifi_rfkill_prop, NULL); Acked-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/Makefile | 1 + drivers/gpio/gpiolib-swnode.c | 123 ++++++++++++++++++++++++++++++++++++++++++ drivers/gpio/gpiolib-swnode.h | 14 +++++ drivers/gpio/gpiolib.c | 7 +++ include/linux/gpio/property.h | 11 ++++ 5 files changed, 156 insertions(+) commit 8eb1f71e7acca4f92cf9cf83030cbb8ec2524025 Author: Dmitry Torokhov Date: Fri Nov 11 14:19:07 2022 -0800 gpiolib: consolidate GPIO lookups Ensure that all paths to obtain/look up GPIOD from generic consumer-visible APIs go through the new gpiod_find_and_request() helper, so that we can easily extend it with support for new firmware mechanisms. The only exception is OF-specific [devm_]gpiod_get_from_of_node() API that is still being used by a couple of drivers and will be removed as soon as patches converting them to use generic fwnode/device APIs are accepted. Acked-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-acpi.c | 39 --------- drivers/gpio/gpiolib-acpi.h | 10 --- drivers/gpio/gpiolib.c | 204 +++++++++++++++++--------------------------- 3 files changed, 76 insertions(+), 177 deletions(-) commit b7452d670fdef8974e18754342fe6f68e20c2567 Author: Dmitry Torokhov Date: Tue Nov 15 11:20:47 2022 +0100 gpiolib: acpi: avoid leaking ACPI details into upper gpiolib layers There is no need for the generic parts of GPIOLIB to be aware of implementation details of ACPI-bases lookups. Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-acpi.c | 51 ++++++++++++++++++++++++++++++++++++++------- drivers/gpio/gpiolib-acpi.h | 46 +++------------------------------------- drivers/gpio/gpiolib.c | 8 ++----- 3 files changed, 48 insertions(+), 57 deletions(-) commit 16ba046e86e93f42117efe7ca7a7940b83c60afc Author: Dmitry Torokhov Date: Fri Nov 11 14:19:05 2022 -0800 gpiolib: acpi: teach acpi_find_gpio() to handle data-only nodes In preparation of switching all ACPI-based GPIO lookups to go through acpi_find_gpio() we need to make sure it can handle data-only ACPI nodes, same as existing acpi_node_get_gpiod(). Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-acpi.c | 76 +++++++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 26 deletions(-) commit 2b6bce80ae70b91134a5731d85076042ae90c300 Author: Dmitry Torokhov Date: Fri Nov 11 14:19:04 2022 -0800 gpiolib: acpi: change acpi_find_gpio() to accept firmware node In preparation of switching all ACPI-based GPIO lookups to go through acpi_find_gpio() let's change it to accept device node as its argument as we do not always have access to device structure. Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-acpi.c | 8 ++++++-- drivers/gpio/gpiolib-acpi.h | 4 ++-- drivers/gpio/gpiolib.c | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) commit 07445ae1c26367928311e13f2a821ae94410da7e Author: Dmitry Torokhov Date: Tue Nov 15 11:16:24 2022 +0100 gpiolib: of: change of_find_gpio() to accept device node In preparation of switching all OF-based GPIO lookups to go through of_find_gpio() let's change it to accept device node as its argument as we do not always have access to device structure. Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 7 +++---- drivers/gpio/gpiolib-of.h | 4 ++-- drivers/gpio/gpiolib.c | 5 +++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit 710ccba0cf0e12c7c29d862fd6192d8fe46c5fe7 Author: Srinivas Kandagatla Date: Tue Nov 15 06:54:30 2022 +0000 ASoC: codecs: tx-macro: add dmic support via tx macro DMIC Paths into LPASS digital codec can go via tx-macro or va-macro codec, add support to tx-macro path as va-macro path is already supported. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221115065430.4126-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/lpass-tx-macro.c | 149 +++++++++++++++++++++++++++++++++++++- 1 file changed, 148 insertions(+), 1 deletion(-) commit 65a54646420e1409760c2b9f0e1a5e5feca1364e Author: Christoph Hellwig Date: Tue Nov 8 10:56:49 2022 +0100 nvme-pci: simplify nvme_dbbuf_dma_alloc Move the OACS check and the error checking into nvme_dbbuf_dma_alloc so that an upcoming second caller doesn't have to duplicate this boilerplate code. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni drivers/nvme/host/pci.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit a6ee7f19ebfd158ffb3a6ebacf20ae43549bed05 Author: Christoph Hellwig Date: Thu Oct 27 03:28:16 2022 -0700 nvme-pci: call nvme_pci_configure_admin_queue from nvme_pci_enable nvme_pci_configure_admin_queue is called right after nvme_pci_enable, and it's work is undone by nvme_dev_disable. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Tested-by Gerd Bayer drivers/nvme/host/pci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3f30a79c2e2c7d5ad14dfc372adb248fc239c6c1 Author: Christoph Hellwig Date: Tue Nov 8 09:48:43 2022 +0100 nvme-pci: set constant paramters in nvme_pci_alloc_ctrl Move setting of low-level constant parameters from nvme_reset_work to nvme_pci_alloc_ctrl. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Tested-by Gerd Bayer drivers/nvme/host/pci.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) commit 2e87570be9d2746e7c4e7ab1cc18fd3ca7de2768 Author: Christoph Hellwig Date: Tue Nov 8 09:44:00 2022 +0100 nvme-pci: factor out a nvme_pci_alloc_dev helper Add a helper that allocates the nvme_dev structure up to the point where we can call nvme_init_ctrl. This pairs with the free_ctrl method and can thus be used to cleanup the teardown path and make it more symmetric. Note that this now calls nvme_init_ctrl a lot earlier during probing, which also means the per-controller character device shows up earlier. Due to the controller state no commnds can be send on it, but it might make sense to delay the cdev registration until nvme_init_ctrl_finish. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Tested-by Gerd Bayer drivers/nvme/host/pci.c | 81 ++++++++++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 35 deletions(-) commit 081a7d958ce4b65f9aab6e70e65b0b2e0b92297c Author: Christoph Hellwig Date: Tue Nov 8 09:41:41 2022 +0100 nvme-pci: factor the iod mempool creation into a helper Add a helper to create the iod mempool. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Tested-by Gerd Bayer drivers/nvme/host/pci.c | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) commit c11b7716d6c96e82d2b404c4520237d968357a0d Author: Christoph Hellwig Date: Tue Nov 8 09:11:13 2022 +0100 nvme-pci: move more teardown work to nvme_remove nvme_dbbuf_dma_free frees dma coherent memory, so it must not be called after ->remove has returned. Fortunately there is no way to use it after shutdown as no more I/O is possible so it can be moved. Similarly the iod_mempool can't be used for a device kept alive after shutdown, so move it next to freeing the PRP pools. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Tested-by Gerd Bayer drivers/nvme/host/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 96ef1be53663a9343dffcf106e2f1b59da4b8799 Author: Christoph Hellwig Date: Tue Nov 8 09:10:21 2022 +0100 nvme-pci: put the admin queue in nvme_dev_remove_admin Once the controller is shutdown no one can access the admin queue. Tear it down in nvme_dev_remove_admin, which matches the flow in the other drivers. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Tested-by Gerd Bayer drivers/nvme/host/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 86adbf0cdb9ec6533234696c3e243184d4d0d040 Author: Christoph Hellwig Date: Thu Oct 27 02:34:13 2022 -0700 nvme: simplify transport specific device attribute handling Allow the transport driver to override the attribute groups for the control device, so that the PCIe driver doesn't manually have to add a group after device creation and keep track of it. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Tested-by Gerd Bayer drivers/nvme/host/core.c | 8 ++++++-- drivers/nvme/host/nvme.h | 2 ++ drivers/nvme/host/pci.c | 23 ++++++++--------------- 3 files changed, 16 insertions(+), 17 deletions(-) commit 94cc781f69f49f665383dd87aef973b7896153d0 Author: Christoph Hellwig Date: Tue Nov 8 15:48:27 2022 +0100 nvme: move OPAL setup from PCIe to core Nothing about the TCG Opal support is PCIe transport specific, so move it to the core code. For this nvme_init_ctrl_finish grows a new was_suspended argument that allows the transport driver to tell the OPAL code if the controller came out of a suspend cycle. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: James Smart Tested-by Gerd Bayer drivers/nvme/host/apple.c | 2 +- drivers/nvme/host/core.c | 25 ++++++++++++++++++++++--- drivers/nvme/host/fc.c | 2 +- drivers/nvme/host/nvme.h | 5 +---- drivers/nvme/host/pci.c | 14 +------------- drivers/nvme/host/rdma.c | 2 +- drivers/nvme/host/tcp.c | 2 +- drivers/nvme/target/loop.c | 2 +- 8 files changed, 29 insertions(+), 25 deletions(-) commit 1e37a307f1481058da852accb37e0e1a3e137e9e Author: Christoph Hellwig Date: Tue Nov 8 15:46:45 2022 +0100 nvme: don't call nvme_init_ctrl_finish from nvme_passthru_end nvme_passthrough_end can race with a reset, which can lead to racing stores to the cels xarray as well as further shengians with upcoming more complicated initialization. So drop the call and just log that the controller capabilities might have changed and a reset could be required to use the new controller capabilities. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Tested-by Gerd Bayer drivers/nvme/host/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d2c806abcf0b582131e1f93589d628dac0c07bf4 Author: Florian Westphal Date: Wed Nov 2 13:46:33 2022 +0100 netfilter: conntrack: use siphash_4u64 This function is used for every packet, siphash_4u64 is noticeably faster than using local buffer + siphash: Before: 1.23% kpktgend_0 [kernel.vmlinux] [k] __siphash_unaligned 0.14% kpktgend_0 [nf_conntrack] [k] hash_conntrack_raw After: 0.79% kpktgend_0 [kernel.vmlinux] [k] siphash_4u64 0.15% kpktgend_0 [nf_conntrack] [k] hash_conntrack_raw In the pktgen test this gives about ~2.4% performance improvement. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit 971095c6fa4aebc0af923c32a28124871fe35136 Author: Jiapeng Chong Date: Fri Nov 4 11:55:04 2022 +0800 netfilter: rpfilter/fib: clean up some inconsistent indenting No functional modification involved. net/ipv4/netfilter/nft_fib_ipv4.c:141 nft_fib4_eval() warn: inconsistent indenting. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2733 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nft_fib_ipv4.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8daa8fde3fc3f069ff0b5c87079a5c1df7743113 Author: Phil Sutter Date: Fri Oct 14 23:45:59 2022 +0200 netfilter: nf_tables: Introduce NFT_MSG_GETRULE_RESET Analogous to NFT_MSG_GETOBJ_RESET, but for rules: Reset stateful expressions like counters or quotas. The latter two are the only consumers, adjust their 'dump' callbacks to respect the parameter introduced earlier. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 2 +- include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nf_tables_api.c | 49 +++++++++++++++++++++----------- net/netfilter/nft_counter.c | 2 +- net/netfilter/nft_dynset.c | 4 +-- net/netfilter/nft_inner.c | 2 +- net/netfilter/nft_quota.c | 2 +- 7 files changed, 41 insertions(+), 22 deletions(-) commit 1b96f862ecccb3e6f950eba584bebf22955cecc5 Author: Christoph Hellwig Date: Sun Oct 30 16:50:15 2022 +0100 nvme: implement the DEAC bit for the Write Zeroes command While the specification allows devices to either deallocate data or to actually write zeroes on any Write Zeroes command, many SSDs only do the sensible thing and deallocate data when the DEAC bit is specific. Set it when it is supported and the caller doesn't explicitly opt out of deallocation. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Reviewed-by: Martin K. Petersen drivers/nvme/host/core.c | 13 ++++++++++++- drivers/nvme/host/nvme.h | 1 + include/linux/nvme.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) commit e4fbcf32c860f98103ca7f1dc8c0dc69e2219ec6 Author: Kanchan Joshi Date: Tue Nov 1 10:43:07 2022 +0100 nvme: identify-namespace without CAP_SYS_ADMIN Allow all identify-namespace variants (CNS 00h, 05h and 08h) without requiring CAP_SYS_ADMIN. The information (retrieved using id-ns) is needed to form IO commands for passthrough interface. Signed-off-by: Kanchan Joshi Reviewed-by: Jens Axboe Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/ioctl.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 855b7717f44b13e0990aa5ad36bbf9aa35051516 Author: Kanchan Joshi Date: Mon Oct 31 21:53:50 2022 +0530 nvme: fine-granular CAP_SYS_ADMIN for nvme io commands Currently both io and admin commands are kept under a coarse-granular CAP_SYS_ADMIN check, disregarding file mode completely. $ ls -l /dev/ng* crw-rw-rw- 1 root root 242, 0 Sep 9 19:20 /dev/ng0n1 crw------- 1 root root 242, 1 Sep 9 19:20 /dev/ng0n2 In the example above, ng0n1 appears as if it may allow unprivileged read/write operation but it does not and behaves same as ng0n2. This patch implements a shift from CAP_SYS_ADMIN to more fine-granular control for io-commands. If CAP_SYS_ADMIN is present, nothing else is checked as before. Otherwise, following rules are in place - any admin-cmd is not allowed - vendor-specific and fabric commmand are not allowed - io-commands that can write are allowed if matching FMODE_WRITE permission is present - io-commands that read are allowed Add a helper nvme_cmd_allowed that implements above policy. Change all the callers of CAP_SYS_ADMIN to go through nvme_cmd_allowed for any decision making. Since file open mode is counted for any approval/denial, change at various places to keep file-mode information handy. Signed-off-by: Kanchan Joshi Reviewed-by: Jens Axboe Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/ioctl.c | 102 +++++++++++++++++++++++++++++++--------------- include/linux/nvme.h | 1 + 2 files changed, 70 insertions(+), 33 deletions(-) commit cf3d00840170ebf372bcacc5d5c27f5ed9c1b976 Author: Christophe JAILLET Date: Sun Oct 2 11:59:45 2022 +0200 nvme-fc: improve memory usage in nvme_fc_rcv_ls_req() sizeof( struct nvmefc_ls_rcv_op ) = 64 sizeof( union nvmefc_ls_requests ) = 1024 sizeof( union nvmefc_ls_responses ) = 128 So, in nvme_fc_rcv_ls_req(), 1216 bytes of memory are requested when kzalloc() is called. Because of the way memory allocations are performed, 2048 bytes are allocated. So about 800 bytes are wasted for each request. Switch to 3 distinct memory allocations, in order to: - save these 800 bytes - avoid zeroing this extra memory - make sure that memory is properly aligned in case of DMA access ("fc_dma_map_single(lsop->rspbuf)" just a few lines below) Signed-off-by: Christophe JAILLET Reviewed-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit fa8f9ac42350edd3ce82d0d148a60f0fa088f995 Author: Christoph Hellwig Date: Mon Nov 7 14:01:24 2022 +0100 nvmet: only allocate a single slab for bvecs There is no need to have a separate slab cache for each namespace, and having separate ones creates duplicate debugs file names as well. Fixes: d5eff33ee6f8 ("nvmet: add simple file backed ns support") Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Martin K. Petersen drivers/nvme/target/core.c | 22 ++++++++++++++-------- drivers/nvme/target/io-cmd-file.c | 16 +++------------- drivers/nvme/target/nvmet.h | 3 ++- 3 files changed, 19 insertions(+), 22 deletions(-) commit 2be2cd5287152a6284b45244b6e5c2f7e0a218bd Author: Daniel Wagner Date: Tue Oct 25 17:50:08 2022 +0200 nvmet: force reconnect when number of queue changes In order to test queue number changes we need to make sure that the host reconnects. Because only when the host disconnects from the target the number of queues are allowed to change according the spec. The initial idea was to disable and re-enable the ports and have the host wait until the KATO timer expires, triggering error recovery. Though the host would see a DNR reply when trying to reconnect. Because of the DNR bit the connection is dropped completely. There is no point in trying to reconnect with the same parameters according the spec. We can force to reconnect the host is by deleting all controllers. The host will observe any newly posted request to fail and thus starts the error recovery but this time without the DNR bit set. Signed-off-by: Daniel Wagner Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Acked-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/configfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit bbf5410bc69e131c82ad970ce7ee28b5906a6cc5 Author: Uros Bizjak Date: Thu Oct 20 17:35:40 2022 +0200 nvmet: use try_cmpxchg in nvmet_update_sq_head Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in nvmet_update_sq_head. 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 Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7d34aa3e03b6a56306296bd98b26c6a1710cd57b Author: Phil Sutter Date: Fri Oct 14 23:45:58 2022 +0200 netfilter: nf_tables: Extend nft_expr_ops::dump callback parameters Add a 'reset' flag just like with nft_object_ops::dump. This will be useful to reset "anonymous stateful objects", e.g. simple rule counters. No functional change intended. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 3 ++- include/net/netfilter/nft_fib.h | 2 +- include/net/netfilter/nft_meta.h | 4 ++-- include/net/netfilter/nft_reject.h | 3 ++- net/ipv4/netfilter/nft_dup_ipv4.c | 3 ++- net/ipv6/netfilter/nft_dup_ipv6.c | 3 ++- net/netfilter/nf_tables_api.c | 2 +- net/netfilter/nft_bitwise.c | 6 ++++-- net/netfilter/nft_byteorder.c | 3 ++- net/netfilter/nft_cmp.c | 9 ++++++--- net/netfilter/nft_compat.c | 9 ++++++--- net/netfilter/nft_connlimit.c | 3 ++- net/netfilter/nft_counter.c | 3 ++- net/netfilter/nft_ct.c | 6 ++++-- net/netfilter/nft_dup_netdev.c | 3 ++- net/netfilter/nft_dynset.c | 3 ++- net/netfilter/nft_exthdr.c | 9 ++++++--- net/netfilter/nft_fib.c | 2 +- net/netfilter/nft_flow_offload.c | 3 ++- net/netfilter/nft_fwd_netdev.c | 6 ++++-- net/netfilter/nft_hash.c | 4 ++-- net/netfilter/nft_immediate.c | 3 ++- net/netfilter/nft_inner.c | 3 ++- net/netfilter/nft_last.c | 3 ++- net/netfilter/nft_limit.c | 5 +++-- net/netfilter/nft_log.c | 3 ++- net/netfilter/nft_lookup.c | 3 ++- net/netfilter/nft_masq.c | 3 ++- net/netfilter/nft_meta.c | 5 +++-- net/netfilter/nft_nat.c | 3 ++- net/netfilter/nft_numgen.c | 6 ++++-- net/netfilter/nft_objref.c | 6 ++++-- net/netfilter/nft_osf.c | 3 ++- net/netfilter/nft_payload.c | 6 ++++-- net/netfilter/nft_queue.c | 6 ++++-- net/netfilter/nft_quota.c | 3 ++- net/netfilter/nft_range.c | 3 ++- net/netfilter/nft_redir.c | 3 ++- net/netfilter/nft_reject.c | 3 ++- net/netfilter/nft_rt.c | 2 +- net/netfilter/nft_socket.c | 2 +- net/netfilter/nft_synproxy.c | 3 ++- net/netfilter/nft_tproxy.c | 2 +- net/netfilter/nft_tunnel.c | 2 +- net/netfilter/nft_xfrm.c | 2 +- 45 files changed, 110 insertions(+), 62 deletions(-) commit 8d0c21b50655bfe136a76cf384495ba1f9c87224 Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:42 2022 +0530 powerpc: Curb objtool unannotated intra-function call warnings objtool throws the following unannotated intra-function call warnings: arch/powerpc/kernel/entry_64.o: warning: objtool: .text+0x4: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xe64: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xee4: unannotated intra-function call Fix these warnings by annotating intra-function calls, using ANNOTATE_INTRA_FUNCTION_CALL macro, to indicate that the branch targets are valid. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-5-sv@linux.ibm.com arch/powerpc/kernel/entry_64.S | 2 ++ arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 +++ 2 files changed, 5 insertions(+) commit 29a011fc79e625b2b02f25262657f7c4c59ae9f7 Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:41 2022 +0530 powerpc: Fix objtool unannotated intra-function call warnings Objtool throws unannotated intra-function call warnings in the following assembly files: arch/powerpc/kernel/vector.o: warning: objtool: .text+0x53c: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x60: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x124: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x5d4: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x5dc: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xcb8: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xd0c: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x1030: unannotated intra-function call arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x358: unannotated intra-function call arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x728: unannotated intra-function call arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x4d94: unannotated intra-function call arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x4ec4: unannotated intra-function call arch/powerpc/kvm/book3s_hv_interrupts.o: warning: objtool: .text+0x6c: unannotated intra-function call arch/powerpc/kernel/misc_64.o: warning: objtool: .text+0x64: unannotated intra-function call Objtool does not add STT_NOTYPE symbols with size 0 to the rbtree, which is why find_call_destination() function is not able to find the destination symbol for 'bl' instruction. For such symbols, objtool is throwing unannotated intra-function call warnings in assembly files. Fix these warnings by annotating those symbols with SYM_FUNC_START_LOCAL and SYM_FUNC_END macros, inorder to set symbol type to STT_FUNC and symbol size accordingly. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-4-sv@linux.ibm.com arch/powerpc/kernel/exceptions-64s.S | 4 +++- arch/powerpc/kernel/head_64.S | 7 +++++-- arch/powerpc/kernel/misc_64.S | 4 +++- arch/powerpc/kernel/vector.S | 4 +++- arch/powerpc/kvm/book3s_hv_interrupts.S | 4 +++- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 22 +++++++++++++++------- 6 files changed, 32 insertions(+), 13 deletions(-) commit 01f2cf0b990e58ae89142f57c7e02d33621311d2 Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:40 2022 +0530 powerpc: Override __ALIGN and __ALIGN_STR macros In a subsequent patch, we would want to annotate powerpc assembly functions with SYM_FUNC_START_LOCAL macro. This macro depends on __ALIGN macro. The default expansion of __ALIGN macro is: #define __ALIGN .align 4,0x90 So, override __ALIGN and __ALIGN_STR macros to use the same alignment as that of the existing _GLOBAL macro. Also, do not pad with 0x90, because repeated 0x90s are not a nop or trap on powerpc. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-3-sv@linux.ibm.com arch/powerpc/include/asm/linkage.h | 3 +++ 1 file changed, 3 insertions(+) commit 93e3f45a26310e3f3f8558be40df411e23ab742c Author: Sathvika Vasireddy Date: Mon Nov 14 23:27:39 2022 +0530 powerpc: Fix __WARN_FLAGS() for use with Objtool Commit 1e688dd2a3d675 ("powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto") updated __WARN_FLAGS() to use asm goto, and added a call to 'unreachable()' after the asm goto for optimal code generation. With CONFIG_OBJTOOL enabled, 'annotate_unreachable()' statement in 'unreachable()' tries to note down the location of the subsequent instruction in a separate elf section to aid code flow analysis. However, on powerpc, this results in gcc emitting a call to a symbol of size 0. This results in objtool complaining of "unannotated intra-function call" since the target symbol is not a valid function call destination. Objtool wants this annotation for code flow analysis, which we are not yet enabling on powerpc. As such, expand the call to 'unreachable()' in __WARN_FLAGS() without annotate_unreachable(): barrier_before_unreachable(); __builtin_unreachable(); This still results in optimal code generation for __WARN_FLAGS(), while getting rid of the objtool warning. We still need barrier_before_unreachable() to work around gcc bugs 82365 and 106751: - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365 - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106751 Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221114175754.1131267-2-sv@linux.ibm.com arch/powerpc/include/asm/bug.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0e308efe232afdec35d508f5dfae52f03d50efca Author: Maxime Ripard Date: Mon Nov 14 14:00:31 2022 +0100 drm/connector: Add pixel clock to cmdline mode We'll need to get the pixel clock to generate proper display modes for all the current named modes. Let's add it to struct drm_cmdline_mode and fill it when parsing the named mode. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-12-24b168e5bcd5@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/drm_modes.c | 9 ++++++--- include/drm/drm_connector.h | 7 +++++++ 2 files changed, 13 insertions(+), 3 deletions(-) commit 00dcc4a2d560c57543ee36b94a864256f99cac32 Author: Maxime Ripard Date: Mon Nov 14 14:00:30 2022 +0100 drm/modes: Fill drm_cmdline mode from named modes The current code to deal with named modes will only set the mode name, and then it's up to drivers to try to match that name to whatever mode or configuration they see fit. The plan is to remove that need and move the named mode handling out of drivers and into the core, and only rely on modes and properties. Let's start by properly filling drm_cmdline_mode from a named mode. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-11-24b168e5bcd5@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/drm_modes.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit a7ab155397dd959785b9fdd175b41c3e58114255 Author: Maxime Ripard Date: Mon Nov 14 14:00:29 2022 +0100 drm/modes: Switch to named mode descriptors The current named mode parsing relies only on the mode name, and doesn't allow to specify any other parameter. Let's convert that string list to an array of a custom structure that will hold the name and some additional parameters in the future. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-10-24b168e5bcd5@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/drm_modes.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit a631bf30eb914affc0a574f44576833477346ad6 Author: Maxime Ripard Date: Mon Nov 14 14:00:28 2022 +0100 drm/modes: Move named modes parsing to a separate function The current construction of the named mode parsing doesn't allow to extend it easily. Let's move it to a separate function so we can add more parameters and modes. In order for the tests to still pass, some extra checks are needed, so it's not a 1:1 move. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-9-24b168e5bcd5@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/drm_modes.c | 70 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 12 deletions(-) commit 8fc0380f6ba7e9414c96a695a8c03e2ac31d1b0f Author: Maxime Ripard Date: Mon Nov 14 14:00:27 2022 +0100 drm/client: Add some tests for drm_connector_pick_cmdline_mode() drm_connector_pick_cmdline_mode() is in charge of finding a proper drm_display_mode from the definition we got in the video= command line argument. Let's add some unit tests to make sure we're not getting any regressions there. Acked-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-8-24b168e5bcd5@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/drm_client_modeset.c | 4 + drivers/gpu/drm/tests/drm_client_modeset_test.c | 100 ++++++++++++++++++++++++ 2 files changed, 104 insertions(+) commit 44a3928324e9757f7c321535756730be948941c2 Author: Maxime Ripard Date: Mon Nov 14 14:00:21 2022 +0100 drm/tests: Add Kunit Helpers As the number of kunit tests in KMS grows further, we start to have multiple test suites that, for example, need to register a mock DRM driver to interact with the KMS function they are supposed to test. Let's add a file meant to provide those kind of helpers to avoid duplication. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-2-24b168e5bcd5@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/tests/Makefile | 1 + drivers/gpu/drm/tests/drm_kunit_helpers.c | 64 +++++++++++++++++++++++++++++++ drivers/gpu/drm/tests/drm_kunit_helpers.h | 9 +++++ 3 files changed, 74 insertions(+) commit 99e49bfd9339a7fe9cb89202ad5f392573739e4f Author: Maxime Ripard Date: Mon Nov 14 14:00:20 2022 +0100 docs/fb: Document current named modes KMS supports a number of named modes already, but it's never been documented anywhere, let's fix that. Reviewed-by: Noralf Trønnes Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-1-24b168e5bcd5@cerno.tech Signed-off-by: Maxime Ripard Documentation/fb/modedb.rst | 5 +++++ 1 file changed, 5 insertions(+) commit 0a99962c0dbfa461ac5965c99cce1149ccfa17ed Author: José Expósito Date: Thu Nov 10 14:47:52 2022 +0100 drm/vc4: hdmi: Fix pointer dereference before check Commit 6bed2ea3cb38 ("drm/vc4: hdmi: Reset link on hotplug") introduced the vc4_hdmi_reset_link() function. This function dereferences the "connector" pointer before checking whether it is NULL or not. Rework variable assignment to avoid this issue. Fixes: 6bed2ea3cb38 ("drm/vc4: hdmi: Reset link on hotplug") Signed-off-by: José Expósito Link: https://lore.kernel.org/r/20221110134752.238820-3-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d218750805a3a07d734a093355be286dc04278ba Author: José Expósito Date: Thu Nov 10 14:47:51 2022 +0100 drm/vc4: hdmi: Pass vc4_hdmi to vc4_hdmi_supports_scrambling() Simplify vc4_hdmi_supports_scrambling() by changing its first parameter from struct drm_encoder to struct vc4_hdmi. Signed-off-by: José Expósito Link: https://lore.kernel.org/r/20221110134752.238820-2-jose.exposito89@gmail.com Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b5f7c6a507718b45be0d71fcf7eaa933ee738a9e Author: Geert Uytterhoeven Date: Mon Nov 14 11:51:58 2022 +0100 clk: renesas: r8a779g0: Add Z0 clock support Add support for the Z0 (Cortex-A76 Sub-System) clock on R-Car V4H, based on the existing support for Z clocks on R-Car Gen4. Extracted from a patch in the BSP by LUU HOAI. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/75daa1fd8fa7eaef7b8945bb5906c787222c7ac4.1668423063.git.geert+renesas@glider.be drivers/clk/renesas/r8a779g0-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit 30f3bb09778de64ef9f23fb4bb5f868c4728a071 Author: Zhen Lei Date: Tue Nov 15 16:33:48 2022 +0800 kallsyms: Add self-test facility Added test cases for basic functions and performance of functions kallsyms_lookup_name(), kallsyms_on_each_symbol() and kallsyms_on_each_match_symbol(). It also calculates the compression rate of the kallsyms compression algorithm for the current symbol set. The basic functions test begins by testing a set of symbols whose address values are known. Then, traverse all symbol addresses and find the corresponding symbol name based on the address. It's impossible to determine whether these addresses are correct, but we can use the above three functions along with the addresses to test each other. Due to the traversal operation of kallsyms_on_each_symbol() is too slow, only 60 symbols can be tested in one second, so let it test on average once every 128 symbols. The other two functions validate all symbols. If the basic functions test is passed, print only performance test results. If the test fails, print error information, but do not perform subsequent performance tests. Start self-test automatically after system startup if CONFIG_KALLSYMS_SELFTEST=y. Example of output content: (prefix 'kallsyms_selftest:' is omitted start --------------------------------------------------------- | nr_symbols | compressed size | original size | ratio(%) | |---------------------------------------------------------| | 107543 | 1357912 | 2407433 | 56.40 | --------------------------------------------------------- kallsyms_lookup_name() looked up 107543 symbols The time spent on each symbol is (ns): min=630, max=35295, avg=7353 kallsyms_on_each_symbol() traverse all: 11782628 ns kallsyms_on_each_match_symbol() traverse all: 9261 ns finish Signed-off-by: Zhen Lei Signed-off-by: Luis Chamberlain include/linux/kallsyms.h | 1 + init/Kconfig | 13 ++ kernel/Makefile | 1 + kernel/kallsyms.c | 2 +- kernel/kallsyms_selftest.c | 485 +++++++++++++++++++++++++++++++++++++++++++++ kernel/kallsyms_selftest.h | 13 ++ 6 files changed, 514 insertions(+), 1 deletion(-) commit c6b1737f45ca708fee76a30afb4a7b0247455749 Author: Biju Das Date: Thu Nov 10 16:09:31 2022 +0000 arm64: dts: renesas: r9a09g011: Add L2 Cache node The Cortex-A53 processor on RZ/V2M has 512 KB L2 Cache. Add L2 Cache node to SoC dtsi. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20221110160931.101539-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 594edf2c61f2eb79234e642e3a82d7ae02e7a241 Author: Fabrizio Castro Date: Thu Nov 3 22:39:56 2022 +0000 arm64: dts: renesas: rzv2mevk2: Enable watchdog Enable the watchdog so that we can reboot the system. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/20221103223956.50575-4-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 753a4ae153788225a30b0ee9dd18da83f1d94447 Author: Fabrizio Castro Date: Thu Nov 3 22:39:55 2022 +0000 arm64: dts: renesas: r9a09g011: Add watchdog node The r9a09g011 (a.k.a. RZ/V2M) comes with two watchdog IPs, but Linux is only allowed one. Add a node for the watchdog allowed to Linux to the SoC specific dtsi. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/20221103223956.50575-3-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit ecacb3751f254572af0009b9501e2cdc83a30b6a Author: Mark Zhang Date: Mon Nov 7 10:51:36 2022 +0200 RDMA/nldev: Return "-EAGAIN" if the cm_id isn't from expected port When filling a cm_id entry, return "-EAGAIN" instead of 0 if the cm_id doesn'the have the same port as requested, otherwise an incomplete entry may be returned, which causes "rdam res show cm_id" to return an error. For example on a machine with two rdma devices with "rping -C 1 -v -s" running background, the "rdma" command fails: $ rdma -V rdma utility, iproute2-5.19.0 $ rdma res show cm_id link mlx5_0/- cm-idn 0 state LISTEN ps TCP pid 28056 comm rping src-addr 0.0.0.0:7174 error: Protocol not available While with this fix it succeeds: $ rdma res show cm_id link mlx5_0/- cm-idn 0 state LISTEN ps TCP pid 26395 comm rping src-addr 0.0.0.0:7174 link mlx5_1/- cm-idn 0 state LISTEN ps TCP pid 26395 comm rping src-addr 0.0.0.0:7174 Fixes: 00313983cda6 ("RDMA/nldev: provide detailed CM_ID information") Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/a08e898cdac5e28428eb749a99d9d981571b8ea7.1667810736.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/nldev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e15ff29b156bbbdeadae230c8ecd5ecd8ca2477 Author: Mark Zhang Date: Mon Nov 7 10:51:35 2022 +0200 RDMA/core: Make sure "ib_port" is valid when access sysfs node The "ib_port" structure must be set before adding the sysfs kobject, and reset after removing it, otherwise it may crash when accessing the sysfs node: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000050 Mem abort info: ESR = 0x96000006 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp = 00000000e85f5ba5 [0000000000000050] pgd=0000000848fd9003, pud=000000085b387003, pmd=0000000000000000 Internal error: Oops: 96000006 [#2] PREEMPT SMP Modules linked in: ib_umad(O) mlx5_ib(O) nfnetlink_cttimeout(E) nfnetlink(E) act_gact(E) cls_flower(E) sch_ingress(E) openvswitch(E) nsh(E) nf_nat_ipv6(E) nf_nat_ipv4(E) nf_conncount(E) nf_nat(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) mst_pciconf(O) ipmi_devintf(E) ipmi_msghandler(E) ipmb_dev_int(OE) mlx5_core(O) mlxfw(O) mlxdevm(O) auxiliary(O) ib_uverbs(O) ib_core(O) mlx_compat(O) psample(E) sbsa_gwdt(E) uio_pdrv_genirq(E) uio(E) mlxbf_pmc(OE) mlxbf_gige(OE) mlxbf_tmfifo(OE) gpio_mlxbf2(OE) pwr_mlxbf(OE) mlx_trio(OE) i2c_mlxbf(OE) mlx_bootctl(OE) bluefield_edac(OE) knem(O) ip_tables(E) ipv6(E) crc_ccitt(E) [last unloaded: mst_pci] Process grep (pid: 3372, stack limit = 0x0000000022055c92) CPU: 5 PID: 3372 Comm: grep Tainted: G D OE 4.19.161-mlnx.47.gadcd9e3 #1 Hardware name: https://www.mellanox.com BlueField SoC/BlueField SoC, BIOS BlueField:3.9.2-15-ga2403ab Sep 8 2022 pstate: 40000005 (nZcv daif -PAN -UAO) pc : hw_stat_port_show+0x4c/0x80 [ib_core] lr : port_attr_show+0x40/0x58 [ib_core] sp : ffff000029f43b50 x29: ffff000029f43b50 x28: 0000000019375000 x27: ffff8007b821a540 x26: ffff000029f43e30 x25: 0000000000008000 x24: ffff000000eaa958 x23: 0000000000001000 x22: ffff8007a4ce3000 x21: ffff8007baff8000 x20: ffff8007b9066ac0 x19: ffff8007bae97578 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 x8 : ffff8007a4ce4000 x7 : 0000000000000000 x6 : 000000000000003f x5 : ffff000000e6a280 x4 : ffff8007a4ce3000 x3 : 0000000000000000 x2 : aaaaaaaaaaaaaaab x1 : ffff8007b9066a10 x0 : ffff8007baff8000 Call trace: hw_stat_port_show+0x4c/0x80 [ib_core] port_attr_show+0x40/0x58 [ib_core] sysfs_kf_seq_show+0x8c/0x150 kernfs_seq_show+0x44/0x50 seq_read+0x1b4/0x45c kernfs_fop_read+0x148/0x1d8 __vfs_read+0x58/0x180 vfs_read+0x94/0x154 ksys_read+0x68/0xd8 __arm64_sys_read+0x28/0x34 el0_svc_common+0x88/0x18c el0_svc_handler+0x78/0x94 el0_svc+0x8/0xe8 Code: f2955562 aa1603e4 aa1503e0 f9405683 (f9402861) Fixes: d8a5883814b9 ("RDMA/core: Replace the ib_port_data hw_stats pointers with a ib_port pointer") Signed-off-by: Mark Zhang Reviewed-by: Michael Guralnik Link: https://lore.kernel.org/r/88867e705c42c1cd2011e45201c25eecdb9fef94.1667810736.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/sysfs.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit dac153f2802db1ad46207283cb9b2aae3d707a45 Author: Mark Zhang Date: Mon Nov 7 10:51:34 2022 +0200 RDMA/restrack: Release MR restrack when delete The MR restrack also needs to be released when delete it, otherwise it cause memory leak as the task struct won't be released. Fixes: 13ef5539def7 ("RDMA/restrack: Count references to the verbs objects") Signed-off-by: Mark Zhang Reviewed-by: Michael Guralnik Link: https://lore.kernel.org/r/703db18e8d4ef628691fb93980a709be673e62e3.1667810736.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/restrack.c | 2 -- 1 file changed, 2 deletions(-) commit 3076e09f36a58d796d7fea0c92a5011420228404 Merge: c02f20d38fb9 cec9e59cae60 Author: Dave Airlie Date: Tue Nov 15 17:20:30 2022 +1000 Merge tag 'drm-next-20221109' of git://linuxtv.org/pinchartl/media into drm-next - Renesas RZ/G2L DSI support - Renesas DU Kconfig cleanup - Xilinx DPSUB fix Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/Y2u+mhkPJQ4de3q5@pendragon.ideasonboard.com commit 39a10b6ac5d18dd714e8a64c96cb72ef121ce963 Author: Lucas De Marchi Date: Mon Nov 7 09:32:07 2022 -0800 Documentation/gpu: Fix section in the wrong scope That section should still be inside "DRM client usage stats" rather than as a sibling. Signed-off-by: Lucas De Marchi Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221107173209.2219571-2-lucas.demarchi@intel.com Documentation/gpu/drm-usage-stats.rst | 1 - 1 file changed, 1 deletion(-) commit 6728aea7216c0c06c98e2e58d753a5e8b2ae1c6f Author: Kumar Kartikeya Dwivedi Date: Tue Nov 15 00:45:28 2022 +0530 bpf: Refactor btf_struct_access Instead of having to pass multiple arguments that describe the register, pass the bpf_reg_state into the btf_struct_access callback. Currently, all call sites simply reuse the btf and btf_id of the reg they want to check the access of. The only exception to this pattern is the callsite in check_ptr_to_map_access, hence for that case create a dummy reg to simulate PTR_TO_BTF_ID access. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221114191547.1694267-8-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 17 ++++++++--------- include/linux/filter.h | 8 ++++---- kernel/bpf/btf.c | 11 +++++++---- kernel/bpf/verifier.c | 12 +++++++----- net/bpf/bpf_dummy_struct_ops.c | 14 +++++++------- net/core/filter.c | 34 ++++++++++++++-------------------- net/ipv4/bpf_tcp_ca.c | 13 ++++++------- net/netfilter/nf_conntrack_bpf.c | 17 +++++++---------- 8 files changed, 60 insertions(+), 66 deletions(-) commit 894f2a8b1673a355a1a7507a4dfa6a3c836d07c1 Author: Kumar Kartikeya Dwivedi Date: Tue Nov 15 00:45:27 2022 +0530 bpf: Rename MEM_ALLOC to MEM_RINGBUF Currently, verifier uses MEM_ALLOC type tag to specially tag memory returned from bpf_ringbuf_reserve helper. However, this is currently only used for this purpose and there is an implicit assumption that it only refers to ringbuf memory (e.g. the check for ARG_PTR_TO_ALLOC_MEM in check_func_arg_reg_off). Hence, rename MEM_ALLOC to MEM_RINGBUF to indicate this special relationship and instead open the use of MEM_ALLOC for more generic allocations made for user types. Also, since ARG_PTR_TO_ALLOC_MEM_OR_NULL is unused, simply drop it. Finally, update selftests using 'alloc_' verifier string to 'ringbuf_'. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221114191547.1694267-7-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 11 ++++------- kernel/bpf/ringbuf.c | 6 +++--- kernel/bpf/verifier.c | 14 +++++++------- tools/testing/selftests/bpf/prog_tests/dynptr.c | 2 +- tools/testing/selftests/bpf/verifier/ringbuf.c | 2 +- tools/testing/selftests/bpf/verifier/spill_fill.c | 2 +- 6 files changed, 17 insertions(+), 20 deletions(-) commit 2de2669b4e52b2ae2f118bfc310004f50b47f0f5 Author: Kumar Kartikeya Dwivedi Date: Tue Nov 15 00:45:26 2022 +0530 bpf: Rename RET_PTR_TO_ALLOC_MEM Currently, the verifier has two return types, RET_PTR_TO_ALLOC_MEM, and RET_PTR_TO_ALLOC_MEM_OR_NULL, however the former is confusingly named to imply that it carries MEM_ALLOC, while only the latter does. This causes confusion during code review leading to conclusions like that the return value of RET_PTR_TO_DYNPTR_MEM_OR_NULL (which is RET_PTR_TO_ALLOC_MEM | PTR_MAYBE_NULL) may be consumable by bpf_ringbuf_{submit,commit}. Rename it to make it clear MEM_ALLOC needs to be tacked on top of RET_PTR_TO_MEM. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221114191547.1694267-6-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 6 +++--- kernel/bpf/verifier.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit f0c5941ff5b255413d31425bb327c2aec3625673 Author: Kumar Kartikeya Dwivedi Date: Tue Nov 15 00:45:25 2022 +0530 bpf: Support bpf_list_head in map values Add the support on the map side to parse, recognize, verify, and build metadata table for a new special field of the type struct bpf_list_head. To parameterize the bpf_list_head for a certain value type and the list_node member it will accept in that value type, we use BTF declaration tags. The definition of bpf_list_head in a map value will be done as follows: struct foo { struct bpf_list_node node; int data; }; struct map_value { struct bpf_list_head head __contains(foo, node); }; Then, the bpf_list_head only allows adding to the list 'head' using the bpf_list_node 'node' for the type struct foo. The 'contains' annotation is a BTF declaration tag composed of four parts, "contains:name:node" where the name is then used to look up the type in the map BTF, with its kind hardcoded to BTF_KIND_STRUCT during the lookup. The node defines name of the member in this type that has the type struct bpf_list_node, which is actually used for linking into the linked list. For now, 'kind' part is hardcoded as struct. This allows building intrusive linked lists in BPF, using container_of to obtain pointer to entry, while being completely type safe from the perspective of the verifier. The verifier knows exactly the type of the nodes, and knows that list helpers return that type at some fixed offset where the bpf_list_node member used for this list exists. The verifier also uses this information to disallow adding types that are not accepted by a certain list. For now, no elements can be added to such lists. Support for that is coming in future patches, hence draining and freeing items is done with a TODO that will be resolved in a future patch. Note that the bpf_list_head_free function moves the list out to a local variable under the lock and releases it, doing the actual draining of the list items outside the lock. While this helps with not holding the lock for too long pessimizing other concurrent list operations, it is also necessary for deadlock prevention: unless every function called in the critical section would be notrace, a fentry/fexit program could attach and call bpf_map_update_elem again on the map, leading to the same lock being acquired if the key matches and lead to a deadlock. While this requires some special effort on part of the BPF programmer to trigger and is highly unlikely to occur in practice, it is always better if we can avoid such a condition. While notrace would prevent this, doing the draining outside the lock has advantages of its own, hence it is used to also fix the deadlock related problem. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221114191547.1694267-5-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 17 +++++ include/uapi/linux/bpf.h | 10 +++ kernel/bpf/btf.c | 145 ++++++++++++++++++++++++++++++++++++++++- kernel/bpf/helpers.c | 32 +++++++++ kernel/bpf/syscall.c | 22 ++++++- kernel/bpf/verifier.c | 7 ++ tools/include/uapi/linux/bpf.h | 10 +++ 7 files changed, 239 insertions(+), 4 deletions(-) commit e5feed0f64f73e167ef70755d3dc2db959d8fd5c Author: Kumar Kartikeya Dwivedi Date: Tue Nov 15 00:45:24 2022 +0530 bpf: Fix copy_map_value, zero_map_value The current offset needs to also skip over the already copied region in addition to the size of the next field. This case manifests where there are gaps between adjacent special fields. It was observed that for a map value with size 48, having fields at: off: 0, 16, 32 size: 4, 16, 16 The current code does: memcpy(dst + 0, src + 0, 0) memcpy(dst + 4, src + 4, 12) memcpy(dst + 20, src + 20, 12) memcpy(dst + 36, src + 36, 12) With the fix, it is done correctly as: memcpy(dst + 0, src + 0, 0) memcpy(dst + 4, src + 4, 12) memcpy(dst + 32, src + 32, 0) memcpy(dst + 48, src + 48, 0) Fixes: 4d7d7f69f4b1 ("bpf: Adapt copy_map_value for multiple offset case") Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221114191547.1694267-4-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d577252579b3efb9e934b68948a2edfa9920110 Author: Kumar Kartikeya Dwivedi Date: Tue Nov 15 00:45:23 2022 +0530 bpf: Remove BPF_MAP_OFF_ARR_MAX In f71b2f64177a ("bpf: Refactor map->off_arr handling"), map->off_arr was refactored to be btf_field_offs. The number of field offsets is equal to maximum possible fields limited by BTF_FIELDS_MAX. Hence, reuse BTF_FIELDS_MAX as spin_lock and timer no longer are to be handled specially for offset sorting, fix the comment, and remove incorrect WARN_ON as its rec->cnt can never exceed this value. The reason to keep separate constant was the it was always more 2 more than total kptrs. This is no longer the case. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221114191547.1694267-3-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 9 ++++----- kernel/bpf/btf.c | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) commit 1f6d52f1a8947436dc5b2575e2fffb831f240141 Author: Kumar Kartikeya Dwivedi Date: Tue Nov 15 00:45:22 2022 +0530 bpf: Remove local kptr references in documentation We don't want to commit to a specific name for these. Simply call them allocated objects coming from bpf_obj_new, which is completely clear in itself. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221114191547.1694267-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov Documentation/bpf/bpf_design_QA.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 45924dffb58e13b902eca47e7cd960843176f075 Author: Rahul T R Date: Mon Nov 7 12:30:09 2022 +0530 arm64: dts: ti: k3-j721e-sk: Add pinmux for RPi Header Add pinmux required to bring out i2c5 and gpios on 40 pin RPi header on sk board Signed-off-by: Sinthu Raja Signed-off-by: Rahul T R Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221107070009.11500-3-r-ravikumar@ti.com arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 20f67d1dfc6ad67fd70cd000b9d017447a50dbbd Author: Vijay Pothukuchi Date: Mon Nov 7 12:30:08 2022 +0530 arm64: dts: ti: k3-j721e-main: Add dts nodes for EHRPWMs Add dts nodes for 6 EHRPWM instances on SoC. Disable EHRPWM nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Includes a minor formatting fixup for the serdes node to line up the nodes appropriately. Signed-off-by: Vijay Pothukuchi Signed-off-by: Rahul T R Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221107070009.11500-2-r-ravikumar@ti.com arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 68 ++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) commit 69460e68eb662064ab4188d4e129ff31c1f23ed9 Author: Zhang Qilong Date: Tue Nov 8 16:03:22 2022 +0800 soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes: 984aa6dbf4ca ("OMAP3: PM: Adding smartreflex driver support.") Signed-off-by: Zhang Qilong Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221108080322.52268-3-zhangqilong3@huawei.com drivers/soc/ti/smartreflex.c | 1 + 1 file changed, 1 insertion(+) commit e961c0f19450fd4a26bd043dd2979990bf12caf6 Author: Zhang Qilong Date: Tue Nov 8 16:03:21 2022 +0800 soc: ti: knav_qmss_queue: Fix PM disable depth imbalance in knav_queue_probe The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes: 41f93af900a2 ("soc: ti: add Keystone Navigator QMSS driver") Signed-off-by: Zhang Qilong Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221108080322.52268-2-zhangqilong3@huawei.com drivers/soc/ti/knav_qmss_queue.c | 1 + 1 file changed, 1 insertion(+) commit d9282e48c6088105a98b98153a707fdbcdbf75b1 Author: Jamie Bainbridge Date: Mon Nov 14 12:00:08 2022 +1100 tcp: Add listening address to SYN flood message The SYN flood message prints the listening port number, but with many processes bound to the same port on different IPs, it's impossible to tell which socket is the problem. Add the listen IP address to the SYN flood message. For IPv6 use "[IP]:port" as per RFC-5952 and to provide ease of copy-paste to "ss" filters. For IPv4 use "IP:port" to match. Each protcol's "any" address and a host address now look like: Possible SYN flooding on port 0.0.0.0:9001. Possible SYN flooding on port 127.0.0.1:9001. Possible SYN flooding on port [::]:9001. Possible SYN flooding on port [fc00::1]:9001. Signed-off-by: Jamie Bainbridge Reviewed-by: Eric Dumazet Reviewed-by: Stephen Hemminger Link: https://lore.kernel.org/r/4fedab7ce54a389aeadbdc639f6b4f4988e9d2d7.1668386107.git.jamie.bainbridge@gmail.com Signed-off-by: Jakub Kicinski net/ipv4/tcp_input.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 0de459a3260a58169c55e2d1acf27da5ad8b635f Author: Pierre Gondois Date: Mon Nov 7 16:57:02 2022 +0100 arm64: dts: Update cache properties for hisilicon 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: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 2 ++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 2 ++ arch/arm64/boot/dts/hisilicon/hip05.dtsi | 4 ++++ arch/arm64/boot/dts/hisilicon/hip06.dtsi | 4 ++++ arch/arm64/boot/dts/hisilicon/hip07.dtsi | 16 ++++++++++++++++ 5 files changed, 28 insertions(+) commit feba6c6702507008f129037849be24dd3eb2ef2f Merge: 76ad97e150f1 5fd66a0b3bb4 Author: Jakub Kicinski Date: Mon Nov 14 18:43:24 2022 -0800 Merge branch 'genirq-msi-treewide-cleanup-of-pointless-linux-msi-h-includes' Thomas Gleixner says: ==================== genirq/msi: Treewide cleanup of pointless linux/msi.h includes While working on per device MSI domains I noticed that quite some files include linux/msi.h just because. The top level comment in the header file clearly says: Regular device drivers have no business with any of these functions.... and actually none of the drivers needs anything from msi.h. ==================== Link: https://lore.kernel.org/r/20221113201935.776707081@linutronix.de Signed-off-by: Jakub Kicinski commit 5fd66a0b3bb473287099346cd92e54bf0ea19b6d Author: Thomas Gleixner Date: Sun Nov 13 21:34:05 2022 +0100 net: nfp: Remove linux/msi.h includes Nothing in these files needs anything from linux/msi.h Signed-off-by: Thomas Gleixner Cc: oss-drivers@corigine.com Acked-by: Simon Horman Signed-off-by: Jakub Kicinski drivers/net/ethernet/netronome/nfp/nfp_main.h | 1 - drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 1 - drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 1 - 3 files changed, 3 deletions(-) commit 515e5fb6a95ed53edd76730071fc919f0ef78562 Author: Thomas Gleixner Date: Sun Nov 13 21:34:04 2022 +0100 net: dpaa2: Remove linux/msi.h includes Nothing in these file needs anything from linux/msi.h Signed-off-by: Thomas Gleixner Cc: Ioana Ciornei Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 1 - drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 1 - drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 1 - 3 files changed, 3 deletions(-) commit 76ad97e150f1079163c8503c7b8e249db994b244 Author: Yoshihiro Shimoda Date: Thu Nov 10 10:27:20 2022 +0900 net: ethernet: renesas: rswitch: Fix build error about ptp If CONFIG_PTP_1588_CLOCK_OPTIONAL=m and CONFIG_RENESAS_ETHER_SWITCH=y, the following build error happened: aarch64-linux-ld: DWARF error: could not find abbrev number 60 drivers/net/ethernet/renesas/rswitch.o: in function `rswitch_get_ts_info': rswitch.c:(.text+0x408): undefined reference to `ptp_clock_index' aarch64-linux-ld: DWARF error: could not find abbrev number 1190123 drivers/net/ethernet/renesas/rcar_gen4_ptp.o: in function `rcar_gen4_ptp_register': rcar_gen4_ptp.c:(.text+0x4dc): undefined reference to `ptp_clock_register' aarch64-linux-ld: drivers/net/ethernet/renesas/rcar_gen4_ptp.o: in function `rcar_gen4_ptp_unregister': rcar_gen4_ptp.c:(.text+0x584): undefined reference to `ptp_clock_unregister' To fix the issue, add "depends on PTP_1588_CLOCK_OPTIONAL" into the Kconfig. Reported-by: kernel test robot Suggested-by: Arnd Bergmann Fixes: 6c6fa1a00ad3 ("net: ethernet: renesas: rswitch: Add R-Car Gen4 gPTP support") Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221110012720.3552060-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/renesas/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ae6b18e631d6afb4beaec9288a3245a77b22c06a Author: Vincent Knecht Date: Mon Nov 14 16:59:23 2022 -0800 Input: msg2638 - add support for msg2138 msg2138 only supports 2 fingers presses, and needs different processing since second finger press is encoded as a delta position wrt. first one and the packet/touch_event structs are not the same as msg2638. Add support for it by implementing distinct structs and irq handler. Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20221110171952.34207-4-vincent.knecht@mailoo.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/msg2638.c | 93 +++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 14ce9e4c7d2d89e0248dd838c10efd2caf916bb0 Author: Vincent Knecht Date: Mon Nov 14 16:59:07 2022 -0800 dt-bindings: input: touchscreen: msg2638: Document msg2138 support Document msg2138 support by adding mstar,msg2138 compatible. Acked-by: Rob Herring Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20221110171952.34207-3-vincent.knecht@mailoo.org Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/touchscreen/mstar,msg2638.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d87ffe00e45d7041263759e0fa2aa641f6370560 Author: Vincent Knecht Date: Mon Nov 14 16:58:23 2022 -0800 Input: msg2638 - set max finger number and irqhandler from driver data This will allow us to add other MStar touchscreen variants' support. No functional change. Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20221110171952.34207-2-vincent.knecht@mailoo.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/msg2638.c | 40 +++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) commit 3b450831e5f1af09c6b0767b20f607943a681ffb Author: Pierre Gondois Date: Mon Nov 7 16:57:01 2022 +0100 arm64: dts: Update cache properties for freescale 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 Reviewed-by: Chester Lin Acked-by: Li Yang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 1 + arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 1 + arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 1 + arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 8 ++++++++ arch/arm64/boot/dts/freescale/imx8dxl.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mm.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mq.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8qm.dtsi | 2 ++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 1 + arch/arm64/boot/dts/freescale/s32g2.dtsi | 2 ++ arch/arm64/boot/dts/freescale/s32v234.dtsi | 2 ++ 16 files changed, 32 insertions(+) commit fd7b68b763c4dfa65e3c145c624427d5fd11202f Author: Aditya Garg Date: Fri Nov 4 11:55:35 2022 +0000 HID: apple: Swap Control and Command keys on Apple keyboards This patch allows users to swap the control and command keys. This can be useful for the Mac users who are used to using Command instead of Control in macOS for various commonly used shortcuts. Signed-off-by: Aditya Garg Signed-off-by: Jiri Kosina drivers/hid/hid-apple.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit a3fe69160c7328a284ebc711ccb689f3beec42dc Merge: bdd28ab35c16 ab8ec0792254 Author: Conor Dooley Date: Mon Nov 14 22:20:43 2022 +0000 Merge branch 'riscv-visionfive_v1' into riscv-dt-for-next The VisionFive DT somehow never actually made it upstream, and is largely shared with the BeagleV. Better late than never. Signed-off-by: Conor Dooley commit bdd28ab35c163553a2a686fdc5ea3cf247aad69b Author: Conor Dooley Date: Fri Oct 7 12:35:11 2022 +0100 riscv: dts: microchip: fix the icicle's #pwm-cells \#pwm-cells for the Icicle kit's fabric PWM was incorrectly set to 2 & blindly overridden by the (out of tree) driver anyway. The core can support inverted operation, so update the entry to correctly report its capabilities. Fixes: 72560c6559b8 ("riscv: dts: microchip: add fpga fabric section to icicle kit") Reviewed-by: Uwe Kleine-König Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs-icicle-kit-fabric.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69c7717c20cc87105b8b54ba43d12ca4e432a1a5 Author: Douglas Anderson Date: Fri Oct 21 13:07:07 2022 -0700 drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error If we fail to get a valid panel ID in drm_edid_get_panel_id() we'd like to see the EDID that was read so we have a chance of understanding what's wrong. There's already a function for that, so let's call it in the error case. NOTE: edid_block_read() has a retry loop in it, so actually we'll only print the block read back from the final attempt. This still seems better than nothing. Reviewed-by: Abhinav Kumar Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20221021130637.1.I8c2de0954a4e54e0c59a72938268e2ead91daa98@changeid drivers/gpu/drm/drm_edid.c | 2 ++ 1 file changed, 2 insertions(+) commit 7fd4da9c1584be97ffbc40e600a19cb469fd4e78 Author: Waiman Long Date: Sat Nov 12 17:19:39 2022 -0500 cgroup/cpuset: Optimize cpuset_attach() on v2 It was found that with the default hierarchy, enabling cpuset in the child cgroups can trigger a cpuset_attach() call in each of the child cgroups that have tasks with no change in effective cpus and mems. If there are many processes in those child cgroups, it will burn quite a lot of cpu cycles iterating all the tasks without doing useful work. Optimizing this case by comparing between the old and new cpusets and skip useless update if there is no change in effective cpus and mems. Also mems_allowed are less likely to be changed than cpus_allowed. So skip changing mm if there is no change in effective_mems and CS_MEMORY_MIGRATE is not set. By inserting some instrumentation code and running a simple command in a container 200 times in a cgroup v2 system, it was found that all the cpuset_attach() calls are skipped (401 times in total) as there was no change in effective cpus and mems. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo kernel/cgroup/cpuset.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 18f9a4d47527772515ad6cbdac796422566e6440 Author: Waiman Long Date: Sat Nov 12 17:19:38 2022 -0500 cgroup/cpuset: Skip spread flags update on v2 Cpuset v2 has no spread flags to set. So we can skip spread flags update if cpuset v2 is being used. Also change the name to cpuset_update_task_spread_flags() to indicate that there are multiple spread flags. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo kernel/cgroup/cpuset.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 35b7fa4ed1b104fa0bc762caa8049640e85b8cd7 Author: Breno Leitao Date: Sun Nov 13 11:44:49 2022 +0000 kselftest/cgroup: Fix gathering number of CPUs test_cpuset_prs.sh is failing with the following error: test_cpuset_prs.sh: line 29: [[: 8 57%: syntax error in expression (error token is "57%") This is happening because `lscpu | grep "^CPU(s)"` returns two lines in some systems (such as Debian unstable): # lscpu | grep "^CPU(s)" CPU(s): 8 CPU(s) scaling MHz: 55% This is a simple fix that discard the second line. Signed-off-by: Breno Leitao Reviewed-by: Kamalesh Babulal Signed-off-by: Tejun Heo tools/testing/selftests/cgroup/test_cpuset_prs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5181c35ed7ba0ceb6e42872aad1334d994b0175 Author: Yang Yingliang Date: Tue Nov 1 11:41:18 2022 +0800 HSI: omap_ssi_core: fix unbalanced pm_runtime_disable() In error label 'out1' path in ssi_probe(), the pm_runtime_enable() has not been called yet, so pm_runtime_disable() is not needed. Fixes: b209e047bc74 ("HSI: Introduce OMAP SSI driver") Signed-off-by: Yang Yingliang Signed-off-by: Sebastian Reichel drivers/hsi/controllers/omap_ssi_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 913a144164d8f09fab7e4175d693168b29d5843b Author: Nathan Chancellor Date: Wed Nov 2 09:02:33 2022 -0700 HSI: ssi_protocol: Fix return type of ssip_pn_xmit() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/hsi/clients/ssi_protocol.c:1053:20: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = ssip_pn_xmit, ^~~~~~~~~~~~ 1 error generated. ->ndo_start_xmit() in 'struct net_device_ops' expects a return type of 'netdev_tx_t', not 'int'. Adjust the return type of ssip_pn_xmit() to match the prototype's to resolve the warning and CFI failure. Additionally, use the enum 'NETDEV_TX_OK' instead of a raw '0' for the return value of ssip_pn_xmit(). Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Signed-off-by: Sebastian Reichel drivers/hsi/clients/ssi_protocol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3b39fd6cf12ceda2a2582dcb9b9ee9f4d197b857 Author: Adam Manzanares Date: Mon Aug 29 22:03:14 2022 +0000 cxl: Replace HDM decoder granularity magic numbers When reviewing the CFMWS parsing code that deals with the HDM decoders, I noticed a couple of magic numbers. This commit replaces these magic numbers with constants defined by the CXL 3.0 specification. v2: - Change references to CXL 3.0 specification (David) - CXL_DECODER_MAX_GRANULARITY_ORDER -> CXL_DECODER_MAX_ENCODED_IG (Dan) Signed-off-by: Adam Manzanares Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20220829220249.243888-1-a.manzanares@samsung.com Signed-off-by: Dan Williams drivers/cxl/cxl.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b51d76752120a267397276121619fca80f767e62 Author: Robert Richter Date: Tue Oct 18 15:23:33 2022 +0200 cxl/acpi: Improve debug messages in cxl_acpi_probe() In cxl_acpi_probe() the iterator bus_for_each_dev() walks through all CXL hosts. Since all dev_*() debug messages point to the ACPI0017 device which is the CXL root for all hosts, the device information is pointless as it is always the same device. Change this to use the host device for this instead. Also, add additional host specific information such as CXL support, UID and CHBCR. This is an example log: acpi ACPI0016:00: UID found: 4 acpi ACPI0016:00: CHBCR found: 0x28090000000 acpi ACPI0016:00: dport added to root0 acpi ACPI0016:00: host-bridge: ACPI0016:00 pci0000:7f: host supports CXL Signed-off-by: Robert Richter Link: https://lore.kernel.org/r/20221018132341.76259-6-rrichter@amd.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 5626196a5ae0937368b35c3625c428a2125b0f44 Merge: 4f8126bb2308 b611ad14006e Author: Jens Axboe Date: Mon Nov 14 12:57:50 2022 -0700 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.2/block Pull MD fixes from Song. * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid1: stop mdx_raid1 thread when raid1 array run failed md/raid5: use bdev_write_cache instead of open coding it md: fix a crash in mempool_free md/raid0, raid10: Don't set discard sectors for request queue md/bitmap: Fix bitmap chunk size overflow issues md: introduce md_ro_state md: factor out __md_set_array_info() lib/raid6: drop RAID6_USE_EMPTY_ZERO_PAGE raid5-cache: use try_cmpxchg in r5l_wake_reclaim drivers/md/md-bitmap: check the return value of md_bitmap_get_counter() commit e0c7800a5530a598778f5b8c9fca570949817a9f Merge: e826192cc26b 662233731d66 Author: Wolfram Sang Date: Mon Nov 14 20:51:06 2022 +0100 Merge branch 'i2c/client_device_id_helper-immutable' into i2c/for-mergewindow commit 662233731d66cf41e7494e532e702849c8ce18f3 Author: Angel Iglesias Date: Sun Nov 13 18:46:30 2022 +0100 i2c: core: Introduce i2c_client_get_device_id helper function Introduces new helper function to aid in .probe_new() refactors. In order to use existing i2c_get_device_id() on the probe callback, the device match table needs to be accessible in that function, which would require bigger refactors in some drivers using the deprecated .probe callback. This issue was discussed in more detail in the IIO mailing list. Link: https://lore.kernel.org/all/20221023132302.911644-11-u.kleine-koenig@pengutronix.de/ Suggested-by: Nuno Sá Suggested-by: Andy Shevchenko Suggested-by: Jonathan Cameron Signed-off-by: Angel Iglesias Reviewed-by: Andy Shevchenko Reviewed-by: Jonathan Cameron Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 14 ++++++++++++++ include/linux/i2c.h | 1 + 2 files changed, 15 insertions(+) commit de763fbb2c5bfad1ab7c4232e6a804726f0b0744 Merge: e662c7753668 b486d19a0ab0 Author: Andrii Nakryiko Date: Mon Nov 14 11:38:25 2022 -0800 Merge branch 'libbpf: Fixed various checkpatch issues' Kang Minchul says: ==================== This patch series contains various checkpatch fixes in btf.c, libbpf.c, ringbuf.c. I know these are trivial but some issues are hard to ignore and I think these checkpatch issues are accumulating. v1 -> v2: changed cover letter message. ==================== Signed-off-by: Andrii Nakryiko commit b486d19a0ab097eecf3ee679369b216d2cb6c34e Author: Kang Minchul Date: Mon Nov 14 04:06:48 2022 +0900 libbpf: checkpatch: Fixed code alignments in ringbuf.c Fixed some checkpatch issues in ringbuf.c Signed-off-by: Kang Minchul Signed-off-by: Andrii Nakryiko Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221113190648.38556-4-tegongkang@gmail.com tools/lib/bpf/ringbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3ba8e4e8c19a9b4d1866bc72d81afb10c043560 Author: Kang Minchul Date: Mon Nov 14 04:06:47 2022 +0900 libbpf: Fixed various checkpatch issues in libbpf.c Fixed following checkpatch issues: WARNING: Block comments use a trailing */ on a separate line + * other BPF program's BTF object */ WARNING: Possible repeated word: 'be' + * name. This is important to be be able to find corresponding BTF ERROR: switch and case should be at the same indent + switch (ext->kcfg.sz) { + case 1: *(__u8 *)ext_val = value; break; + case 2: *(__u16 *)ext_val = value; break; + case 4: *(__u32 *)ext_val = value; break; + case 8: *(__u64 *)ext_val = value; break; + default: ERROR: trailing statements should be on next line + case 1: *(__u8 *)ext_val = value; break; ERROR: trailing statements should be on next line + case 2: *(__u16 *)ext_val = value; break; ERROR: trailing statements should be on next line + case 4: *(__u32 *)ext_val = value; break; ERROR: trailing statements should be on next line + case 8: *(__u64 *)ext_val = value; break; ERROR: code indent should use tabs where possible + }$ WARNING: please, no spaces at the start of a line + }$ WARNING: Block comments use a trailing */ on a separate line + * for faster search */ ERROR: code indent should use tabs where possible +^I^I^I^I^I^I &ext->kcfg.is_signed);$ WARNING: braces {} are not necessary for single statement blocks + if (err) { + return err; + } ERROR: code indent should use tabs where possible +^I^I^I^I sizeof(*obj->btf_modules), obj->btf_module_cnt + 1);$ Signed-off-by: Kang Minchul Signed-off-by: Andrii Nakryiko Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221113190648.38556-3-tegongkang@gmail.com tools/lib/bpf/libbpf.c | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) commit c7694ac340b0394afba079fc3d1072f4c99bcfc9 Author: Kang Minchul Date: Mon Nov 14 04:06:46 2022 +0900 libbpf: checkpatch: Fixed code alignments in btf.c Fixed some checkpatch issues in btf.c Signed-off-by: Kang Minchul Signed-off-by: Andrii Nakryiko Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221113190648.38556-2-tegongkang@gmail.com tools/lib/bpf/btf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 002c6ca75289a4ac4f6738213dd2d258704886e4 Merge: 801543b2593b c02f20d38fb9 Author: Rodrigo Vivi Date: Mon Nov 14 14:32:34 2022 -0500 Merge drm/drm-next into drm-intel-next Catch up on 6.1-rc cycle in order to solve the intel_backlight conflict on linux-next. Signed-off-by: Rodrigo Vivi commit 7565f9617efac0c0c8e2dbd08dbe0695d56684f5 Author: Namhyung Kim Date: Fri Nov 11 19:22:44 2022 -0800 perf stat: Add missing separator in the CSV header It should have a comma after 'cpus' for socket and die aggregation mode. The output of the following command shows the issue. $ sudo perf stat -a --per-socket -x, --metric-only -I1 true Before: +--- here V time,socket,cpusGhz,insn per cycle,branch-misses of all branches, 0.000908461,S0,8,0.950,1.65,1.21, After: time,socket,cpus,GHz,insn per cycle,branch-misses of all branches, 0.000683094,S0,8,0.593,2.00,0.60, Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221112032244.1077370-12-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a80e0e156ca6d7c339e314d15db2f038755da6c3 Author: Namhyung Kim Date: Fri Nov 11 19:22:43 2022 -0800 perf stat: Fix summary output in CSV with --metric-only It should not print "summary" for each event when --metric-only is set. Before: $ sudo perf stat -a --per-socket --summary -x, --metric-only true time,socket,cpusGhz,insn per cycle,branch-misses of all branches, 0.000709079,S0,8,0.893,2.40,0.45, S0,8, summary, summary, summary, summary, summary,0.893, summary,2.40, summary, summary,0.45, After: $ sudo perf stat -a --per-socket --summary -x, --metric-only true time,socket,cpusGHz,insn per cycle,branch-misses of all branches, 0.000882297,S0,8,0.598,1.64,0.64, summary,S0,8,0.598,1.64,0.64, Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221112032244.1077370-11-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 638c335a473d5187ede3983ec5f62908a0d6357b Merge: 20e2e3177937 094226ad94f4 Author: Arnaldo Carvalho de Melo Date: Mon Nov 14 16:12:23 2022 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes that went thru perf/urgent. Signed-off-by: Arnaldo Carvalho de Melo commit 76f191108419424fef1bb713d8d160c3b49bedc4 Author: Dan Williams Date: Mon Nov 14 10:29:52 2022 -0800 tools/testing/cxl: Add bridge mocking support In preparation for cxl_acpi walking pci_root->bus->bridge, add that association to the mock pci_root instances. Note that the missing 3rd entry in mock_pci_root[] was not noticed until now given that the test version of to_cxl_host_bridge() (tools/testing/cxl/mock_acpi.c), obviated the need for that entry. However, "cxl/acpi: Improve debug messages in cxl_acpi_probe()" [1] needs pci_root->bus->bridge to be populated. Link: https://lore.kernel.org/r/20221018132341.76259-6-rrichter@amd.com [1] Cc: Robert Richter Signed-off-by: Dan Williams tools/testing/cxl/test/cxl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 58eef878fcd1f44612445b5cdde598f04b940da8 Author: Robert Richter Date: Tue Oct 18 15:23:32 2022 +0200 cxl: Unify debug messages when calling devm_cxl_add_dport() CXL dports are added in a couple of code paths using devm_cxl_add_dport(). Debug messages are individually generated, but are incomplete and inconsistent. Change this by moving its generation to devm_cxl_add_dport(). This unifies the messages and reduces code duplication. Also, generate messages on failure. Use a __devm_cxl_add_dport() wrapper to keep the readability of the error exits. Signed-off-by: Robert Richter Link: https://lore.kernel.org/r/20221018132341.76259-5-rrichter@amd.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 7 ++----- drivers/cxl/core/pci.c | 2 -- drivers/cxl/core/port.c | 48 +++++++++++++++++++++++++++++++------------- tools/testing/cxl/test/cxl.c | 9 +-------- 4 files changed, 37 insertions(+), 29 deletions(-) commit f3cd264c4ec1ab9b8918f3b083cfc13c5e7c26b7 Author: Robert Richter Date: Tue Oct 18 15:23:31 2022 +0200 cxl: Unify debug messages when calling devm_cxl_add_port() CXL ports are added in a couple of code paths using devm_cxl_add_port(). Debug messages are individually generated, but are incomplete and inconsistent. Change this by moving its generation to devm_cxl_add_port(). This unifies the messages and reduces code duplication. Also, generate messages on failure. Use a __devm_cxl_add_port() wrapper to keep the readability of the error exits. Signed-off-by: Robert Richter Link: https://lore.kernel.org/r/20221018132341.76259-4-rrichter@amd.com Signed-off-by: Dan Williams drivers/cxl/acpi.c | 2 -- drivers/cxl/core/port.c | 51 +++++++++++++++++++++++++++++++++++++------------ 2 files changed, 39 insertions(+), 14 deletions(-) commit 3bb80da51b1c1dbf31af2226f57cbc258f5e994b Author: Robert Richter Date: Tue Oct 18 15:23:30 2022 +0200 cxl/core: Check physical address before mapping it in devm_cxl_iomap_block() The physical base address of a CXL range can be invalid and is then set to CXL_RESOURCE_NONE. In general software shall prevent such situations, but it is hard to proof this may never happen. E.g. in add_port_attach_ep() there this the following: component_reg_phys = find_component_registers(uport_dev); port = devm_cxl_add_port(&parent_port->dev, uport_dev, component_reg_phys, parent_dport); find_component_registers() and subsequent functions (e.g. cxl_regmap_to_base()) may return CXL_RESOURCE_NONE. But it is written to port without any further check in cxl_port_alloc(): port->component_reg_phys = component_reg_phys; It is then later directly used in devm_cxl_setup_hdm() to map io ranges with devm_cxl_iomap_block(). Just an example... Check this condition. Also do not fail silently like an ioremap() failure, use a WARN_ON_ONCE() for it. Signed-off-by: Robert Richter Link: https://lore.kernel.org/r/20221018132341.76259-3-rrichter@amd.com Signed-off-by: Dan Williams drivers/cxl/core/regs.c | 3 +++ 1 file changed, 3 insertions(+) commit fa89248e669d589cdb895517e75cdead8d8ba5c0 Author: Robert Richter Date: Tue Oct 18 15:23:29 2022 +0200 cxl/core: Remove duplicate declaration of devm_cxl_iomap_block() The function devm_cxl_iomap_block() is only used in the core code. There are two declarations in header files of it, in drivers/cxl/core/core.h and drivers/cxl/cxl.h. Remove its unused declaration in drivers/cxl/cxl.h. Fixing build error in regs.c found by kernel test robot by including "core.h" there. Signed-off-by: Robert Richter Reported-by: kernel test robot Reviewed-by: Jonathan Cameron Reviewed-by: Davidlohr Bueso Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/20221018132341.76259-2-rrichter@amd.com Signed-off-by: Dan Williams drivers/cxl/core/regs.c | 2 ++ drivers/cxl/cxl.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2f5d8cef45c30edcf3972d345f606df563d3a48e Author: Yishai Hadas Date: Sun Nov 6 19:46:19 2022 +0200 vfio/mlx5: Fix a typo in mlx5vf_cmd_load_vhca_state() Fix a typo in mlx5vf_cmd_load_vhca_state() to use the 'load' memory layout. As in/out sizes are equal for save and load commands there wasn't any functional issue. Fixes: f1d98f346ee3 ("vfio/mlx5: Expose migration commands over mlx5 device") Signed-off-by: Yishai Hadas Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20221106174630.25909-3-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4e016f969529f2aec0545e90119e7eb3cb124c46 Author: Yishai Hadas Date: Sun Nov 6 19:46:18 2022 +0200 vfio: Add an option to get migration data size Add an option to get migration data size by introducing a new migration feature named VFIO_DEVICE_FEATURE_MIG_DATA_SIZE. Upon VFIO_DEVICE_FEATURE_GET the estimated data length that will be required to complete STOP_COPY is returned. This option may better enable user space to consider before moving to STOP_COPY whether it can meet the downtime SLA based on the returned data. The patch also includes the implementation for mlx5 and hisi for this new option to make it feature complete for the existing drivers in this area. Signed-off-by: Yishai Hadas Reviewed-by: Jason Gunthorpe Reviewed-by: Longfang Liu Link: https://lore.kernel.org/r/20221106174630.25909-2-yishaih@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 9 ++++++++ drivers/vfio/pci/mlx5/main.c | 18 +++++++++++++++ drivers/vfio/pci/vfio_pci_core.c | 3 ++- drivers/vfio/vfio_main.c | 32 ++++++++++++++++++++++++++ include/linux/vfio.h | 5 ++++ include/uapi/linux/vfio.h | 13 +++++++++++ 6 files changed, 79 insertions(+), 1 deletion(-) commit f1bd37a4735286585751dbd9db330b48525cb193 Author: Keith Busch Date: Mon Nov 14 10:35:32 2022 -0800 iomap: directly use logical block size Don't transform the logical block size to a bit shift only to shift it back to the original block size. Just use the size. Cc: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Darrick J. Wong Reviewed-by: Bart Van Assche Signed-off-by: Keith Busch Signed-off-by: Darrick J. Wong Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig fs/iomap/direct-io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 80b71080720e34eaf06642c372d4c11d046baf27 Author: Dmitry Baryshkov Date: Mon Nov 14 20:06:35 2022 +0300 iommu/arm-smmu-qcom: Add generic qcom,smmu-500 match entry Add generic qcom,smmu-500 compatibility string. Newer platforms should use this generic entry rather than declaring per-SoC entries. Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221114170635.1406534-11-dmitry.baryshkov@linaro.org Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 5 +++++ 1 file changed, 5 insertions(+) commit b4c6ee515c426f5fffc3e25772a03e44655d6e1c Author: Dmitry Baryshkov Date: Mon Nov 14 20:06:34 2022 +0300 iommu/arm-smmu-qcom: Stop using mmu500 reset for v2 MMUs The arm_mmu500_reset() writes into registers specific for MMU500. For the generic ARM SMMU v2 these registers (sACR) are defined as 'implementation defined'. Downstream Qualcomm driver for SMMUv2 doesn't touch them. Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221114170635.1406534-10-dmitry.baryshkov@linaro.org [will: Remove unused 'qcom_smmu_data' stucture] Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 38 +++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 11 deletions(-) commit a1d6cd88c8973cfb08ee85722488b1d6d5d16327 Author: Yipeng Zou Date: Fri Nov 4 10:09:31 2022 +0800 selftests/ftrace: event_triggers: wait longer for test_event_enable In some platform, the schedule event may came slowly, delay 100ms can't cover it. I was notice that on my board which running in low cpu_freq,and this selftests allways gose fail. So maybe we can check more times here to wait longer. Fixes: 43bb45da82f9 ("selftests: ftrace: Add a selftest to test event enable/disable func trigger") Signed-off-by: Yipeng Zou Acked-by: Masami Hiramatsu (Google) Acked-by: Steven Rostedt (Google) Signed-off-by: Shuah Khan .../selftests/ftrace/test.d/ftrace/func_event_triggers.tc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit b611ad14006e5be2170d9e8e611bf49dff288911 Author: Jiang Li Date: Mon Nov 7 22:16:59 2022 +0800 md/raid1: stop mdx_raid1 thread when raid1 array run failed fail run raid1 array when we assemble array with the inactive disk only, but the mdx_raid1 thread were not stop, Even if the associated resources have been released. it will caused a NULL dereference when we do poweroff. This causes the following Oops: [ 287.587787] BUG: kernel NULL pointer dereference, address: 0000000000000070 [ 287.594762] #PF: supervisor read access in kernel mode [ 287.599912] #PF: error_code(0x0000) - not-present page [ 287.605061] PGD 0 P4D 0 [ 287.607612] Oops: 0000 [#1] SMP NOPTI [ 287.611287] CPU: 3 PID: 5265 Comm: md0_raid1 Tainted: G U 5.10.146 #0 [ 287.619029] Hardware name: xxxxxxx/To be filled by O.E.M, BIOS 5.19 06/16/2022 [ 287.626775] RIP: 0010:md_check_recovery+0x57/0x500 [md_mod] [ 287.632357] Code: fe 01 00 00 48 83 bb 10 03 00 00 00 74 08 48 89 ...... [ 287.651118] RSP: 0018:ffffc90000433d78 EFLAGS: 00010202 [ 287.656347] RAX: 0000000000000000 RBX: ffff888105986800 RCX: 0000000000000000 [ 287.663491] RDX: ffffc90000433bb0 RSI: 00000000ffffefff RDI: ffff888105986800 [ 287.670634] RBP: ffffc90000433da0 R08: 0000000000000000 R09: c0000000ffffefff [ 287.677771] R10: 0000000000000001 R11: ffffc90000433ba8 R12: ffff888105986800 [ 287.684907] R13: 0000000000000000 R14: fffffffffffffe00 R15: ffff888100b6b500 [ 287.692052] FS: 0000000000000000(0000) GS:ffff888277f80000(0000) knlGS:0000000000000000 [ 287.700149] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 287.705897] CR2: 0000000000000070 CR3: 000000000320a000 CR4: 0000000000350ee0 [ 287.713033] Call Trace: [ 287.715498] raid1d+0x6c/0xbbb [raid1] [ 287.719256] ? __schedule+0x1ff/0x760 [ 287.722930] ? schedule+0x3b/0xb0 [ 287.726260] ? schedule_timeout+0x1ed/0x290 [ 287.730456] ? __switch_to+0x11f/0x400 [ 287.734219] md_thread+0xe9/0x140 [md_mod] [ 287.738328] ? md_thread+0xe9/0x140 [md_mod] [ 287.742601] ? wait_woken+0x80/0x80 [ 287.746097] ? md_register_thread+0xe0/0xe0 [md_mod] [ 287.751064] kthread+0x11a/0x140 [ 287.754300] ? kthread_park+0x90/0x90 [ 287.757974] ret_from_fork+0x1f/0x30 In fact, when raid1 array run fail, we need to do md_unregister_thread() before raid1_free(). Signed-off-by: Jiang Li Signed-off-by: Song Liu drivers/md/raid1.c | 1 + 1 file changed, 1 insertion(+) commit ad831a16b08c3f1a1f28a56d2054313d7d521da9 Author: Christoph Hellwig Date: Wed Nov 9 11:10:37 2022 +0100 md/raid5: use bdev_write_cache instead of open coding it Use the bdev_write_cache instead of two equivalent open coded checks. Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu drivers/md/raid5-cache.c | 5 +---- drivers/md/raid5-ppl.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) commit 341097ee53573e06ab9fc675d96a052385b851fa Author: Mikulas Patocka Date: Fri Nov 4 09:53:38 2022 -0400 md: fix a crash in mempool_free There's a crash in mempool_free when running the lvm test shell/lvchange-rebuild-raid.sh. The reason for the crash is this: * super_written calls atomic_dec_and_test(&mddev->pending_writes) and wake_up(&mddev->sb_wait). Then it calls rdev_dec_pending(rdev, mddev) and bio_put(bio). * so, the process that waited on sb_wait and that is woken up is racing with bio_put(bio). * if the process wins the race, it calls bioset_exit before bio_put(bio) is executed. * bio_put(bio) attempts to free a bio into a destroyed bio set - causing a crash in mempool_free. We fix this bug by moving bio_put before atomic_dec_and_test. We also move rdev_dec_pending before atomic_dec_and_test as suggested by Neil Brown. The function md_end_flush has a similar bug - we must call bio_put before we decrement the number of in-progress bios. BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 11557f0067 P4D 11557f0067 PUD 0 Oops: 0002 [#1] PREEMPT SMP CPU: 0 PID: 73 Comm: kworker/0:1 Not tainted 6.1.0-rc3 #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014 Workqueue: kdelayd flush_expired_bios [dm_delay] RIP: 0010:mempool_free+0x47/0x80 Code: 48 89 ef 5b 5d ff e0 f3 c3 48 89 f7 e8 32 45 3f 00 48 63 53 08 48 89 c6 3b 53 04 7d 2d 48 8b 43 10 8d 4a 01 48 89 df 89 4b 08 <48> 89 2c d0 e8 b0 45 3f 00 48 8d 7b 30 5b 5d 31 c9 ba 01 00 00 00 RSP: 0018:ffff88910036bda8 EFLAGS: 00010093 RAX: 0000000000000000 RBX: ffff8891037b65d8 RCX: 0000000000000001 RDX: 0000000000000000 RSI: 0000000000000202 RDI: ffff8891037b65d8 RBP: ffff8891447ba240 R08: 0000000000012908 R09: 00000000003d0900 R10: 0000000000000000 R11: 0000000000173544 R12: ffff889101a14000 R13: ffff8891562ac300 R14: ffff889102b41440 R15: ffffe8ffffa00d05 FS: 0000000000000000(0000) GS:ffff88942fa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000001102e99000 CR4: 00000000000006b0 Call Trace: clone_endio+0xf4/0x1c0 [dm_mod] clone_endio+0xf4/0x1c0 [dm_mod] __submit_bio+0x76/0x120 submit_bio_noacct_nocheck+0xb6/0x2a0 flush_expired_bios+0x28/0x2f [dm_delay] process_one_work+0x1b4/0x300 worker_thread+0x45/0x3e0 ? rescuer_thread+0x380/0x380 kthread+0xc2/0x100 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 Modules linked in: brd dm_delay dm_raid dm_mod af_packet uvesafb cfbfillrect cfbimgblt cn cfbcopyarea fb font fbdev tun autofs4 binfmt_misc configfs ipv6 virtio_rng virtio_balloon rng_core virtio_net pcspkr net_failover failover qemu_fw_cfg button mousedev raid10 raid456 libcrc32c async_raid6_recov async_memcpy async_pq raid6_pq async_xor xor async_tx raid1 raid0 md_mod sd_mod t10_pi crc64_rocksoft crc64 virtio_scsi scsi_mod evdev psmouse bsg scsi_common [last unloaded: brd] CR2: 0000000000000000 ---[ end trace 0000000000000000 ]--- Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Song Liu drivers/md/md.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8e1a2279ca2b0485cc379a153d02a9793f74a48f Author: Xiao Ni Date: Wed Nov 2 10:07:30 2022 +0800 md/raid0, raid10: Don't set discard sectors for request queue It should use disk_stack_limits to get a proper max_discard_sectors rather than setting a value by stack drivers. And there is a bug. If all member disks are rotational devices, raid0/raid10 set max_discard_sectors. So the member devices are not ssd/nvme, but raid0/raid10 export the wrong value. It reports warning messages in function __blkdev_issue_discard when mkfs.xfs like this: [ 4616.022599] ------------[ cut here ]------------ [ 4616.027779] WARNING: CPU: 4 PID: 99634 at block/blk-lib.c:50 __blkdev_issue_discard+0x16a/0x1a0 [ 4616.140663] RIP: 0010:__blkdev_issue_discard+0x16a/0x1a0 [ 4616.146601] Code: 24 4c 89 20 31 c0 e9 fe fe ff ff c1 e8 09 8d 48 ff 4c 89 f0 4c 09 e8 48 85 c1 0f 84 55 ff ff ff b8 ea ff ff ff e9 df fe ff ff <0f> 0b 48 8d 74 24 08 e8 ea d6 00 00 48 c7 c6 20 1e 89 ab 48 c7 c7 [ 4616.167567] RSP: 0018:ffffaab88cbffca8 EFLAGS: 00010246 [ 4616.173406] RAX: ffff9ba1f9e44678 RBX: 0000000000000000 RCX: ffff9ba1c9792080 [ 4616.181376] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff9ba1c9792080 [ 4616.189345] RBP: 0000000000000cc0 R08: ffffaab88cbffd10 R09: 0000000000000000 [ 4616.197317] R10: 0000000000000012 R11: 0000000000000000 R12: 0000000000000000 [ 4616.205288] R13: 0000000000400000 R14: 0000000000000cc0 R15: ffff9ba1c9792080 [ 4616.213259] FS: 00007f9a5534e980(0000) GS:ffff9ba1b7c80000(0000) knlGS:0000000000000000 [ 4616.222298] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4616.228719] CR2: 000055a390a4c518 CR3: 0000000123e40006 CR4: 00000000001706e0 [ 4616.236689] Call Trace: [ 4616.239428] blkdev_issue_discard+0x52/0xb0 [ 4616.244108] blkdev_common_ioctl+0x43c/0xa00 [ 4616.248883] blkdev_ioctl+0x116/0x280 [ 4616.252977] __x64_sys_ioctl+0x8a/0xc0 [ 4616.257163] do_syscall_64+0x5c/0x90 [ 4616.261164] ? handle_mm_fault+0xc5/0x2a0 [ 4616.265652] ? do_user_addr_fault+0x1d8/0x690 [ 4616.270527] ? do_syscall_64+0x69/0x90 [ 4616.274717] ? exc_page_fault+0x62/0x150 [ 4616.279097] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 4616.284748] RIP: 0033:0x7f9a55398c6b Signed-off-by: Xiao Ni Reported-by: Yi Zhang Reviewed-by: Ming Lei Signed-off-by: Song Liu drivers/md/raid0.c | 1 - drivers/md/raid10.c | 2 -- 2 files changed, 3 deletions(-) commit a187f13d51fa0da0005003a63d3f7eb4c1d466b4 Author: Daniele Ceraolo Spurio Date: Mon Nov 7 18:06:00 2022 -0800 drm/i915/guc: handle interrupts from media GuC The render and media GuCs share the same interrupt enable register, so we can no longer disable interrupts when we disable communication for one of the GuCs as this would impact the other GuC. Instead, we keep the interrupts always enabled in HW and use a variable in the GuC structure to determine if we want to service the received interrupts or not. v2: use MTL_ prefix for reg definition (Matt) Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Cc: John Harrison Cc: Alan Previn Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221108020600.3575467-7-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/intel_gt_irq.c | 21 +++++++++++++++++---- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 2 ++ drivers/gpu/drm/i915/gt/uc/intel_guc.c | 29 ++++++++++++++++------------- drivers/gpu/drm/i915/gt/uc/intel_guc.h | 5 ++++- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 8 ++++++-- 5 files changed, 45 insertions(+), 20 deletions(-) commit b910f716f6ef78f0c06f6e53d0a48966366b11af Author: Daniele Ceraolo Spurio Date: Mon Nov 7 18:05:59 2022 -0800 drm/i915/guc: define media GT GuC send regs The media GT shares the G-unit with the root GT, so a second set of communication registers is required for the media GuC. Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Alan Previn Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221108020600.3575467-6-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc.c | 14 ++++++++++---- drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) commit ee71434eeb9c729c7e09911e1b69fc5baf498222 Author: Aravind Iddamsetty Date: Mon Nov 7 18:05:58 2022 -0800 drm/i915/mtl: Handle wopcm per-GT and limit calculations. With MTL standalone media architecture the wopcm layout has changed, with separate partitioning in WOPCM for the root GT GuC and the media GT GuC. The size of WOPCM is 4MB with the lower 2MB reserved for the media GT and the upper 2MB for the root GT. Given that MTL has GuC deprivilege, the WOPCM registers are pre-locked by the bios. Therefore, we can skip all the math for the partitioning and just limit ourselves to sanity-checking the values. v2: fix makefile file ordering (Jani) v3: drop XELPM_SAMEDIA_WOPCM_SIZE, check huc instead of VDBOX (John) v4: further clarify commit message, remove blank line (John) Signed-off-by: Aravind Iddamsetty Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Cc: John Harrison Cc: Alan Previn Cc: Jani Nikula Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221108020600.3575467-5-daniele.ceraolospurio@intel.com Documentation/gpu/i915.rst | 2 +- drivers/gpu/drm/i915/Makefile | 5 ++-- drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 +- drivers/gpu/drm/i915/gt/intel_gt.c | 1 + drivers/gpu/drm/i915/gt/intel_gt_types.h | 2 ++ drivers/gpu/drm/i915/{ => gt}/intel_wopcm.c | 43 ++++++++++++++++++++--------- drivers/gpu/drm/i915/{ => gt}/intel_wopcm.h | 0 drivers/gpu/drm/i915/gt/uc/intel_uc.c | 4 +-- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 14 ++++++---- drivers/gpu/drm/i915/i915_driver.c | 2 -- drivers/gpu/drm/i915/i915_drv.h | 3 -- drivers/gpu/drm/i915/i915_gem.c | 5 ++-- 12 files changed, 51 insertions(+), 32 deletions(-) commit 00b4c0ef43ad17ef5e0394060361ef2bf10e7a70 Author: Stuart Summers Date: Mon Nov 7 18:05:57 2022 -0800 drm/i915/guc: Add GuC deprivilege feature to MTL MTL supports GuC deprivilege. Add the feature flag to this platform. Signed-off-by: Stuart Summers Cc: Radhakrishna Sripada Cc: John Harrison Cc: Alan Previn Reviewed-by: John Harrison Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221108020600.3575467-4-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) commit e662c7753668bbfb95e25043c6064088cc3a996d Author: Maryam Tahhan Date: Sun Nov 13 05:33:27 2022 -0500 bpf, docs: Fixup cpumap sphinx >= 3.1 warning Fixup bpf_map_update_elem() declaration to use a single line. Reported-by: Akira Yokosawa Signed-off-by: Maryam Tahhan Signed-off-by: Daniel Borkmann Tested-by: Akira Yokosawa Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221113103327.3287482-1-mtahhan@redhat.com Documentation/bpf/map_cpumap.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4172dda2b30a9a0e628e81d2a3bc9a6ef0936774 Author: Dmitry Baryshkov Date: Mon Nov 14 20:06:33 2022 +0300 iommu/arm-smmu-qcom: Merge table from arm-smmu-qcom-debug into match data There is little point in having a separate match table in arm-smmu-qcom-debug.c. Merge it into the main match data table in arm-smmu-qcom.c Note, this also enables debug support for qdu1000, sm6115, sm6375 and ACPI-based sc8180x systems, since these SoCs are expected to support tlb_sync debug. Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221114170635.1406534-9-dmitry.baryshkov@linaro.org Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c | 91 ------------------------ drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 50 ++++++++----- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h | 16 +++-- 3 files changed, 45 insertions(+), 112 deletions(-) commit 417b76adcf1d141666866eba5afdd42953f66e2f Author: Dmitry Baryshkov Date: Mon Nov 14 20:06:32 2022 +0300 iommu/arm-smmu-qcom: provide separate implementation for SDM845-smmu-500 There is only one platform, which needs special care in the reset function, the SDM845. Add special handler for sdm845 and drop the qcom_smmu500_reset() function. Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221114170635.1406534-8-dmitry.baryshkov@linaro.org Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 37 ++++++++++++++++++------------ 1 file changed, 22 insertions(+), 15 deletions(-) commit 30b912a03d91727d75ae14f277b64aca8fb915e4 Author: Dmitry Baryshkov Date: Mon Nov 14 20:06:31 2022 +0300 iommu/arm-smmu-qcom: Move the qcom,adreno-smmu check into qcom_smmu_create Move special handling of qcom,adreno-smmu into qcom_smmu_create() function. This allows us to further customize the Adreno SMMU implementation. Note, this also adds two entries to the qcom_smmu_impl_of_match table. They were used with the qcom,adreno-smmu compat and were handled by the removed clause. Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221114170635.1406534-7-dmitry.baryshkov@linaro.org Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 32 +++++++++++++++++------------- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h | 1 + 2 files changed, 19 insertions(+), 14 deletions(-) commit 4c1d0ad153f8bca09776da6031639d3b965d849a Author: Dmitry Baryshkov Date: Mon Nov 14 20:06:30 2022 +0300 iommu/arm-smmu-qcom: Move implementation data into match data In preparation to rework of the implementation and configuration details, make qcom_smmu_create() accept new qcom_smmu_match_data structure pointer. Make implementation a field in this struct. Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221114170635.1406534-6-dmitry.baryshkov@linaro.org Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 62 +++++++++++++++++++----------- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h | 4 ++ 2 files changed, 44 insertions(+), 22 deletions(-) commit 6c84bbd103d85696af9cc0f746c01f9b2847637e Author: Dmitry Baryshkov Date: Mon Nov 14 20:06:29 2022 +0300 dt-bindings: arm-smmu: Add generic qcom,smmu-500 bindings Add generic bindings for the Qualcomm variant of the ARM MMU-500. It is expected that all future platforms will use the generic qcom,smmu-500 compat string in addition to SoC-specific and the generic arm,mmu-500 ones. Older bindings are now described as deprecated. Note: I have split the sdx55 and sdx65 from the legacy bindings. They are not supported by the qcom SMMU implementation. I can suppose that they are using the generic implementation rather than the Qualcomm-speicific one. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221114170635.1406534-5-dmitry.baryshkov@linaro.org Signed-off-by: Will Deacon .../devicetree/bindings/iommu/arm,smmu.yaml | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 3a12e8c065362f0d900a4a93ee60565253d7fde7 Author: Dmitry Baryshkov Date: Mon Nov 14 20:06:28 2022 +0300 dt-bindings: arm-smmu: add special case for Google Cheza platform Cheza fw does not properly program the GPU aperture to allow the GPU to update the SMMU pagetables for context switches. The board file works around this by dropping the "qcom,adreno-smmu" compat string. Add this usecase to arm,smmu.yaml schema. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221114170635.1406534-4-dmitry.baryshkov@linaro.org Signed-off-by: Will Deacon Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 982295bfe36925919ab61aab0657528541a2aa83 Author: Dmitry Baryshkov Date: Mon Nov 14 20:06:27 2022 +0300 dt-bindings: arm-smmu: fix clocks/clock-names schema Rework clocks/clock-names properties schema to properly describe possible usage cases. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221114170635.1406534-3-dmitry.baryshkov@linaro.org Signed-off-by: Will Deacon .../devicetree/bindings/iommu/arm,smmu.yaml | 129 +++++++++++++++++++-- 1 file changed, 121 insertions(+), 8 deletions(-) commit dbf88f74358338cc444933346a0a57635fbb4c94 Author: Dmitry Baryshkov Date: Mon Nov 14 20:06:26 2022 +0300 dt-bindings: arm-smmu: Add missing Qualcomm SMMU compatibles Add missing compatibles used for Adreno SMMU on sc7280 and sm8450 platforms and for the Qualcomm v2 SMMU used on SDM630 platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221114170635.1406534-2-dmitry.baryshkov@linaro.org Signed-off-by: Will Deacon Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 1d280ce099db396e092cac1aa9bf2ea8beee6d76 Author: Sudeep Holla Date: Thu Nov 10 13:45:05 2022 +0000 arm64: Add architecture specific ACPI FFH Opregion callbacks FFH Operation Region space can be used to trigger SMC or HVC calls, using the Arm SMC Calling Convention (SMCCC). The choice of conduit (SMC or HVC) is based on what the kernel choose based on PSCI as with any other users of SMCCC within the kernel. Function identifiers only in the SMCCC SiP Service, OEM Service and FF-A specific call range are allowed in FFH Opregions. Offset can be either 0(32 bit calling convention) or 1(64 bit calling convention). The length must be set with the range applicable based on the value of the offset. Acked-by: Catalin Marinas Cc: Will Deacon Signed-off-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki arch/arm64/kernel/acpi.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) commit e81c782c16844dc758a784899c2fe5260386211b Author: Sudeep Holla Date: Thu Nov 10 13:45:04 2022 +0000 ACPI: Implement a generic FFH Opregion handler This registers the FFH OpRegion handler before ACPI tables are loaded. The platform support for the same is checked via Platform-Wide OSPM Capabilities(OSC) before registering the OpRegion handler. It relies on the special context data passed to offset and the length. However the interpretation of the values is platform/architecture specific. This generic handler just passed all the information to the platform/architecture specific callback. It also implements the default callbacks which return as not supported. Signed-off-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/acpi/Kconfig | 10 +++++++++ drivers/acpi/Makefile | 1 + drivers/acpi/acpi_ffh.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/acpi/bus.c | 6 ++++++ include/linux/acpi.h | 7 +++++++ 5 files changed, 79 insertions(+) commit 1156b4418db01b1d5a332bc399817d029acd2ec8 Author: Davidlohr Bueso Date: Fri Oct 28 11:34:04 2022 -0700 memregion: Add cpu_cache_invalidate_memregion() interface With CXL security features, and CXL dynamic provisioning, global CPU cache flushing nvdimm requirements are no longer specific to that subsystem, even beyond the scope of security_ops. CXL will need such semantics for features not necessarily limited to persistent memory. The functionality this is enabling is to be able to instantaneously secure erase potentially terabytes of memory at once and the kernel needs to be sure that none of the data from before the erase is still present in the cache. It is also used when unlocking a memory device where speculative reads and firmware accesses could have cached poison from before the device was unlocked. Lastly this facility is used when mapping new devices, or new capacity into an established physical address range. I.e. when the driver switches DeviceA mapping AddressX to DeviceB mapping AddressX then any cached data from DeviceA:AddressX needs to be invalidated. This capability is typically only used once per-boot (for unlock), or once per bare metal provisioning event (secure erase), like when handing off the system to another tenant or decommissioning a device. It may also be used for dynamic CXL region provisioning. Users must first call cpu_cache_has_invalidate_memregion() to know whether this functionality is available on the architecture. On x86 this respects the constraints of when wbinvd() is tolerable. It is already the case that wbinvd() is problematic to allow in VMs due its global performance impact and KVM, for example, has been known to just trap and ignore the call. With confidential computing guest execution of wbinvd() may even trigger an exception. Given guests should not be messing with the bare metal address map via CXL configuration changes cpu_cache_has_invalidate_memregion() returns false in VMs. While this global cache invalidation facility, is exported to modules, since NVDIMM and CXL support can be built as a module, it is not for general use. The intent is that this facility is not available outside of specific "device-memory" use cases. To make that expectation as clear as possible the API is scoped to a new "DEVMEM" module namespace that only the NVDIMM and CXL subsystems are expected to import. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: Andy Lutomirski Cc: Peter Zijlstra Tested-by: Dave Jiang Signed-off-by: Davidlohr Bueso Acked-by: Dave Hansen Co-developed-by: Dan Williams Signed-off-by: Dan Williams arch/x86/Kconfig | 1 + arch/x86/mm/pat/set_memory.c | 18 ++++++++++++++++++ drivers/acpi/nfit/intel.c | 43 ++++++++++++++++++++----------------------- include/linux/memregion.h | 38 ++++++++++++++++++++++++++++++++++++++ lib/Kconfig | 3 +++ 5 files changed, 80 insertions(+), 23 deletions(-) commit 487d828d751d90cf9ca594f45b02dd0e0d712b64 Author: Ira Weiny Date: Mon Sep 26 14:57:11 2022 -0700 cxl/doe: Request exclusive DOE access The PCIE Data Object Exchange (DOE) mailbox is a protocol run over configuration cycles. It assumes one initiator at a time. While the kernel has control of the mailbox user space writes could interfere with the kernel access. Mark DOE mailbox config space exclusive when iterated by the CXL driver. Signed-off-by: Ira Weiny Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220926215711.2893286-3-ira.weiny@intel.com Signed-off-by: Dan Williams drivers/cxl/pci.c | 5 +++++ include/uapi/linux/pci_regs.h | 1 + 2 files changed, 6 insertions(+) commit 278294798ac9118412c9624a801d3f20f2279363 Author: Ira Weiny Date: Mon Sep 26 14:57:10 2022 -0700 PCI: Allow drivers to request exclusive config regions PCI config space access from user space has traditionally been unrestricted with writes being an understood risk for device operation. Unfortunately, device breakage or odd behavior from config writes lacks indicators that can leave driver writers confused when evaluating failures. This is especially true with the new PCIe Data Object Exchange (DOE) mailbox protocol where backdoor shenanigans from user space through things such as vendor defined protocols may affect device operation without complete breakage. A prior proposal restricted read and writes completely.[1] Greg and Bjorn pointed out that proposal is flawed for a couple of reasons. First, lspci should always be allowed and should not interfere with any device operation. Second, setpci is a valuable tool that is sometimes necessary and it should not be completely restricted.[2] Finally methods exist for full lock of device access if required. Even though access should not be restricted it would be nice for driver writers to be able to flag critical parts of the config space such that interference from user space can be detected. Introduce pci_request_config_region_exclusive() to mark exclusive config regions. Such regions trigger a warning and kernel taint if accessed via user space. Create pci_warn_once() to restrict the user from spamming the log. [1] https://lore.kernel.org/all/161663543465.1867664.5674061943008380442.stgit@dwillia2-desk3.amr.corp.intel.com/ [2] https://lore.kernel.org/all/YF8NGeGv9vYcMfTV@kroah.com/ Cc: Bjorn Helgaas Cc: Greg Kroah-Hartman Reviewed-by: Jonathan Cameron Suggested-by: Dan Williams Signed-off-by: Ira Weiny Acked-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20220926215711.2893286-2-ira.weiny@intel.com Signed-off-by: Dan Williams drivers/pci/pci-sysfs.c | 7 +++++++ drivers/pci/probe.c | 6 ++++++ include/linux/ioport.h | 2 ++ include/linux/pci.h | 17 +++++++++++++++++ kernel/resource.c | 13 ++++++++----- 5 files changed, 40 insertions(+), 5 deletions(-) commit b778b4d782d48b9a8751b21deb8eb2f054a3c772 Author: Guenter Roeck Date: Thu Nov 10 07:25:00 2022 -0800 thermal/core: Protect thermal device operations against thermal device removal Thermal device operations may be called after thermal zone device removal. After thermal zone device removal, thermal zone device operations must no longer be called. To prevent such calls from happening, ensure that the thermal device is registered before executing any thermal device operations. Signed-off-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_core.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 91b3aafc2238a91051dff79a8d072a18c805ee50 Author: Guenter Roeck Date: Thu Nov 10 07:24:59 2022 -0800 thermal/core: Remove thermal_zone_set_trips() Since no callers of thermal_zone_set_trips() are left, remove the function. Document __thermal_zone_set_trips() instead. Explicitly state that the thermal zone lock must be held when calling the function, and that the pointer to the thermal zone must be valid. Signed-off-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_core.h | 1 - drivers/thermal/thermal_helpers.c | 34 +++++++++++++++------------------- 2 files changed, 15 insertions(+), 20 deletions(-) commit 05eeee2b51b44c7ba5f1b8e5c41362020513f163 Author: Guenter Roeck Date: Thu Nov 10 07:24:58 2022 -0800 thermal/core: Protect sysfs accesses to thermal operations with thermal zone mutex Protect access to thermal operations against thermal zone removal by acquiring the thermal zone device mutex. After acquiring the mutex, check if the thermal zone device is registered and abort the operation if not. With this change, we can call __thermal_zone_device_update() instead of thermal_zone_device_update() from trip_point_temp_store() and from emul_temp_store(). Similar, we can call __thermal_zone_set_trips() instead of thermal_zone_set_trips() from trip_point_hyst_store(). Signed-off-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_core.c | 4 +-- drivers/thermal/thermal_core.h | 2 ++ drivers/thermal/thermal_sysfs.c | 79 +++++++++++++++++++++++++++++++++-------- 3 files changed, 69 insertions(+), 16 deletions(-) commit ea37bec51ff442546e4a57d5cca2de9cc64a9df3 Author: Guenter Roeck Date: Thu Nov 10 07:24:57 2022 -0800 thermal/core: Protect hwmon accesses to thermal operations with thermal zone mutex In preparation to protecting access to thermal operations against thermal zone device removal, protect hwmon accesses to thermal zone operations with the thermal zone mutex. After acquiring the mutex, ensure that the thermal zone device is registered before proceeding. Signed-off-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_hwmon.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 1c439dec359caa225c7752334c7a14ef9e3344c7 Author: Guenter Roeck Date: Thu Nov 10 07:24:56 2022 -0800 thermal/core: Introduce locked version of thermal_zone_device_update In thermal_zone_device_set_mode(), the thermal zone mutex is released only to be reacquired in the subsequent call to thermal_zone_device_update(). Introduce __thermal_zone_device_update(), which is similar to thermal_zone_device_update() but has to be called with the thermal device mutex held. Call the new function from thermal_zone_device_set_mode() to avoid the extra thermal device mutex release/acquire sequence in that function. With the new function in place, re-implement thermal_zone_device_update() as wrapper around __thermal_zone_device_update() to acquire and release the thermal device mutex. Signed-off-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_core.c | 57 +++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 26 deletions(-) commit ed97d10a8b2c78d1664b01658c5f581e6791ff7d Author: Guenter Roeck Date: Thu Nov 10 07:24:55 2022 -0800 thermal/core: Move parameter validation from __thermal_zone_get_temp to thermal_zone_get_temp All callers of __thermal_zone_get_temp() already validated the thermal zone parameters. Move validation to thermal_zone_get_temp() where it is actually needed. Also add kernel documentation for __thermal_zone_get_temp(), listing the requirement that the function must be called with validated parameters and with thermal device mutex held. Signed-off-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_helpers.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 1c6b30060777352e7881383bab726046d8c3c610 Author: Guenter Roeck Date: Thu Nov 10 07:24:54 2022 -0800 thermal/core: Ensure that thermal device is registered in thermal_zone_get_temp Calls to thermal_zone_get_temp() are not protected against thermal zone device removal. As result, it is possible that the thermal zone operations callbacks are no longer valid when thermal_zone_get_temp() is called. This may result in crashes such as BUG: unable to handle page fault for address: ffffffffc04ef420 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 5d60e067 P4D 5d60e067 PUD 5d610067 PMD 110197067 PTE 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 3209 Comm: cat Tainted: G W 5.10.136-19389-g615abc6eb807 #1 02df41ac0b12f3a64f4b34245188d8875bb3bce1 Hardware name: Google Coral/Coral, BIOS Google_Coral.10068.92.0 11/27/2018 RIP: 0010:thermal_zone_get_temp+0x26/0x73 Code: 89 c3 eb d3 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 53 48 85 ff 74 50 48 89 fb 48 81 ff 00 f0 ff ff 77 44 48 8b 83 98 03 00 00 <48> 83 78 10 00 74 36 49 89 f6 4c 8d bb d8 03 00 00 4c 89 ff e8 9f RSP: 0018:ffffb3758138fd38 EFLAGS: 00010287 RAX: ffffffffc04ef410 RBX: ffff98f14d7fb000 RCX: 0000000000000000 RDX: ffff98f17cf90000 RSI: ffffb3758138fd64 RDI: ffff98f14d7fb000 RBP: ffffb3758138fd50 R08: 0000000000001000 R09: ffff98f17cf90000 R10: 0000000000000000 R11: ffffffff8dacad28 R12: 0000000000001000 R13: ffff98f1793a7d80 R14: ffff98f143231708 R15: ffff98f14d7fb018 FS: 00007ec166097800(0000) GS:ffff98f1bbd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffc04ef420 CR3: 000000010ee9a000 CR4: 00000000003506e0 Call Trace: temp_show+0x31/0x68 dev_attr_show+0x1d/0x4f sysfs_kf_seq_show+0x92/0x107 seq_read_iter+0xf5/0x3f2 vfs_read+0x205/0x379 __x64_sys_read+0x7c/0xe2 do_syscall_64+0x43/0x55 entry_SYSCALL_64_after_hwframe+0x61/0xc6 if a thermal device is removed while accesses to its device attributes are ongoing. The problem is exposed by code in iwl_op_mode_mvm_start(), which registers a thermal zone device only to unregister it shortly afterwards if an unrelated failure is encountered while accessing the hardware. Check if the thermal zone device is registered after acquiring the thermal zone device mutex to ensure this does not happen. The code was tested by triggering the failure in iwl_op_mode_mvm_start() on purpose. Without this patch, the kernel crashes reliably. The crash is no longer observed after applying this and the preceding patches. Signed-off-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_helpers.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 30b2ae07d3d60a4f9763b08a1f696b789e777337 Author: Guenter Roeck Date: Thu Nov 10 07:24:53 2022 -0800 thermal/core: Delete device under thermal device zone lock Thermal device attributes may still be opened after unregistering the thermal zone and deleting the thermal device. Currently there is no protection against accessing thermal device operations after unregistering a thermal zone. To enable adding such protection, protect the device delete operation with the thermal zone device mutex. This requires splitting the call to device_unregister() into its components, device_del() and put_device(). Only the first call can be executed under mutex protection, since put_device() may result in releasing the thermal zone device memory. Signed-off-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d35f29ed9d11ccc4f9b957871d14726f4451a4ad Author: Guenter Roeck Date: Thu Nov 10 07:24:52 2022 -0800 thermal/core: Destroy thermal zone device mutex in release function Accesses to thermal zones, and with it the thermal zone device mutex, are still possible after the thermal zone device has been unregistered. For example, thermal_zone_get_temp() can be called from temp_show() in thermal_sysfs.c if the sysfs attribute was opened before the thermal device was unregistered. Move the call to mutex_destroy from thermal_zone_device_unregister() to thermal_release() to ensure that it is only destroyed after it is guaranteed to be no longer accessed. Signed-off-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2465f95c4e73af1a6564b00ebc9acc15485edf0 Author: Jeremy Linton Date: Wed Nov 9 11:47:20 2022 -0600 ACPI: Enable FPDT on arm64 FPDT provides some boot timing records useful for analyzing parts of the UEFI boot stack. Given the existing code works on arm64, and allows reading the values without utilizing /dev/mem it seems like a good idea to turn it on. Signed-off-by: Jeremy Linton Acked-by: Sudeep Holla Link: https://lore.kernel.org/r/20221109174720.203723-1-jeremy.linton@arm.com Signed-off-by: Will Deacon Documentation/arm64/acpi_object_usage.rst | 2 +- drivers/acpi/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dfd0afbf151d85411b371e841f62b81ee5d1ca54 Author: David Michael Date: Sun Nov 13 15:52:17 2022 -0500 libbpf: Fix uninitialized warning in btf_dump_dump_type_data GCC 11.3.0 fails to compile btf_dump.c due to the following error, which seems to originate in btf_dump_struct_data where the returned value would be uninitialized if btf_vlen returns zero. btf_dump.c: In function ‘btf_dump_dump_type_data’: btf_dump.c:2363:12: error: ‘err’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 2363 | if (err < 0) | ^ Fixes: 920d16af9b42 ("libbpf: BTF dumper support for typed data") Signed-off-by: David Michael Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Acked-by: Alan Maguire Link: https://lore.kernel.org/bpf/87zgcu60hq.fsf@gmail.com tools/lib/bpf/btf_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 016241168dc550b1a99fd6a85066e9960a94f610 Author: Daniele Ceraolo Spurio Date: Mon Nov 7 18:05:56 2022 -0800 drm/i915/uc: use different ggtt pin offsets for uc loads Our current FW loading process is the same for all FWs: - Pin FW to GGTT at the start of the ggtt->uc_fw node - Load the FW - Unpin This worked because we didn't have a case where 2 FWs would be loaded on the same GGTT at the same time. On MTL, however, this can happen if both GTs are reset at the same time, so we can't pin everything in the same spot and we need to use separate offset. For simplicity, instead of calculating the exact required size, we reserve a 2MB slot for each fw. v2: fail fetch if FW is > 2MBs, improve comments (John) v3: more comment improvements (John) Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Alan Previn Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221108020600.3575467-3-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 32 +++++++++++++++++++++++++++++--- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 14 ++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) commit 9deca798362e22608a2729d50ce7db74b3698b32 Author: Daniele Ceraolo Spurio Date: Mon Nov 7 18:05:55 2022 -0800 drm/i915/uc: fetch uc firmwares for each GT The FW binaries are independently loaded on each GT. On MTL, the memory is shared so we could potentially re-use a single allocation, but on discrete multi-gt platforms we are going to need independent copies, so it is easier to do the same on MTL as well, given that the amount of duplicated memory is relatively small (~500K). Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Alan Previn Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221108020600.3575467-2-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/i915_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 472098c877313b8a66d3faa66638a0b5fa85889b Author: Daniele Ceraolo Spurio Date: Mon Nov 7 18:05:54 2022 -0800 drm/i915/huc: only load HuC on GTs that have VCS engines On MTL the primary GT doesn't have any media capabilities, so no video engines and no HuC. We must therefore skip the HuC fetch and load on that specific case. Given that other multi-GT platforms might have HuC on the primary GT, we can't just check for that and it is easier to instead check for the lack of VCS engines. Based on code from Aravind Iddamsetty v2: clarify which engine_mask is used for each GT and why (Tvrtko) Signed-off-by: Daniele Ceraolo Spurio Cc: Aravind Iddamsetty Cc: John Harrison Cc: Alan Previn Cc: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty Link: https://patchwork.freedesktop.org/patch/msgid/20221108020600.3575467-1-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_huc.c | 29 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_drv.h | 9 ++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) commit 4555211190798b6b6fa2c37667d175bf67945c78 Author: Florian-Ewald Mueller Date: Tue Oct 25 09:37:05 2022 +0200 md/bitmap: Fix bitmap chunk size overflow issues - limit bitmap chunk size internal u64 variable to values not overflowing the u32 bitmap superblock structure variable stored on persistent media - assign bitmap chunk size internal u64 variable from unsigned values to avoid possible sign extension artifacts when assigning from a s32 value The bug has been there since at least kernel 4.0. Steps to reproduce it: 1: mdadm -C /dev/mdx -l 1 --bitmap=internal --bitmap-chunk=256M -e 1.2 -n2 /dev/rnbd1 /dev/rnbd2 2 resize member device rnbd1 and rnbd2 to 8 TB 3 mdadm --grow /dev/mdx --size=max The bitmap_chunksize will overflow without patch. Cc: stable@vger.kernel.org Signed-off-by: Florian-Ewald Mueller Signed-off-by: Jack Wang Signed-off-by: Song Liu drivers/md/md-bitmap.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit f97a5528b21eb175d90dce2df9960c8d08e1be82 Author: Ye Bin Date: Tue Sep 20 10:39:38 2022 +0800 md: introduce md_ro_state Introduce md_ro_state for mddev->ro, so it is easy to understand. Signed-off-by: Ye Bin Signed-off-by: Song Liu drivers/md/md.c | 152 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 82 insertions(+), 70 deletions(-) commit 2f6d261e15e8d09a22192aa943c5ed8a792f04ef Author: Ye Bin Date: Tue Sep 20 10:39:37 2022 +0800 md: factor out __md_set_array_info() Factor out __md_set_array_info(). No functional change. Signed-off-by: Ye Bin Signed-off-by: Song Liu drivers/md/md.c | 65 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 30 deletions(-) commit 42271ca389edb0446b9e492858b4c38083b0b9f8 Author: Giulio Benetti Date: Wed Oct 19 18:04:07 2022 +0200 lib/raid6: drop RAID6_USE_EMPTY_ZERO_PAGE RAID6_USE_EMPTY_ZERO_PAGE is unused and hardcoded to 0, so let's drop it. Signed-off-by: Giulio Benetti Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu include/linux/raid/pq.h | 8 -------- lib/raid6/algos.c | 2 -- 2 files changed, 10 deletions(-) commit 9487a0f6855c1a28e4e39d41545cd19ed417c015 Author: Uros Bizjak Date: Thu Oct 20 17:51:04 2022 +0200 raid5-cache: use try_cmpxchg in r5l_wake_reclaim Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in r5l_wake_reclaim. 86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg fails. 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. Cc: Song Liu Signed-off-by: Uros Bizjak Signed-off-by: Song Liu drivers/md/raid5-cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3bd548e5b819b8c0f2c9085de775c5c7bff9052f Author: Li Zhong Date: Fri Sep 16 16:33:05 2022 -0700 drivers/md/md-bitmap: check the return value of md_bitmap_get_counter() Check the return value of md_bitmap_get_counter() in case it returns NULL pointer, which will result in a null pointer dereference. v2: update the check to include other dereference Signed-off-by: Li Zhong Signed-off-by: Song Liu drivers/md/md-bitmap.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 36963cf225f890f97fd84af0a82d323043edd0f1 Author: Konstantin Komarov Date: Tue Oct 11 20:21:03 2022 +0300 fs/ntfs3: Make if more readable This way it looks better. Signed-off-by: Konstantin Komarov fs/ntfs3/record.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ec5fc72013762500867c9cef96fed89dc7161832 Author: Konstantin Komarov Date: Tue Oct 11 20:19:36 2022 +0300 fs/ntfs3: Improve checking of bad clusters Added new function wnd_set_used_safe. Load $BadClus before $AttrDef instead of before $Bitmap. Signed-off-by: Konstantin Komarov fs/ntfs3/bitmap.c | 38 ++++++++++++++++++++++++++++++++ fs/ntfs3/ntfs_fs.h | 2 ++ fs/ntfs3/run.c | 21 ++---------------- fs/ntfs3/super.c | 64 +++++++++++++++++++++++++++++++++--------------------- 4 files changed, 81 insertions(+), 44 deletions(-) commit 60ce8dfde03558bfc290cd915c60fa243ba2ae84 Author: Konstantin Komarov Date: Tue Oct 11 20:15:28 2022 +0300 fs/ntfs3: Fix wrong if in hdr_first_de We need to check used bytes instead of total. Signed-off-by: Konstantin Komarov fs/ntfs3/ntfs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 97a6815e50619377704e6566fb2b77c1aa4e2647 Author: Konstantin Komarov Date: Tue Oct 11 20:12:02 2022 +0300 fs/ntfs3: Use ALIGN kernel macro This way code will be more readable. Signed-off-by: Konstantin Komarov fs/ntfs3/fsntfs.c | 2 +- fs/ntfs3/ntfs.h | 1 - fs/ntfs3/ntfs_fs.h | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) commit e31195a3ac71e7e50793163f933695231cb16513 Author: Konstantin Komarov Date: Tue Oct 11 20:00:36 2022 +0300 fs/ntfs3: Fix incorrect if in ntfs_set_acl_ex We need to update ctime too with mode. Fixes xfstest generic/307 Signed-off-by: Konstantin Komarov fs/ntfs3/xattr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0e8235d28f3a0e9eda9f02ff67ee566d5f42b66b Author: Konstantin Komarov Date: Mon Oct 10 13:15:33 2022 +0300 fs/ntfs3: Check fields while reading Added new functions index_hdr_check and index_buf_check. Now we check all stuff for correctness while reading from disk. Also fixed bug with stale nfs data. Reported-by: van fantasy Signed-off-by: Konstantin Komarov fs/ntfs3/index.c | 84 +++++++++++++++++++++++++++++++++++++---- fs/ntfs3/inode.c | 18 +++++---- fs/ntfs3/ntfs_fs.h | 4 +- fs/ntfs3/run.c | 7 +++- fs/ntfs3/xattr.c | 109 ++++++++++++++++++++++++++++++++++------------------- 5 files changed, 164 insertions(+), 58 deletions(-) commit 6f80ed14d76c730f7943777ba259cd32870e6433 Author: Konstantin Komarov Date: Fri Oct 7 20:23:19 2022 +0300 fs/ntfs3: Correct ntfs_check_for_free_space zlen in some cases was bigger than correct value. Signed-off-by: Konstantin Komarov fs/ntfs3/fsntfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 910013f7c7ba9fb82ce33536c58212907ca05969 Author: Konstantin Komarov Date: Fri Oct 7 20:20:14 2022 +0300 fs/ntfs3: Restore correct state after ENOSPC in attr_data_get_block Added new function ntfs_check_for_free_space. Added undo mechanism in attr_data_get_block. Fixes xfstest generic/083 Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 141 ++++++++++++++++++++++++++++++++++------------------- fs/ntfs3/fsntfs.c | 33 +++++++++++++ fs/ntfs3/ntfs_fs.h | 1 + 3 files changed, 125 insertions(+), 50 deletions(-) commit 0ad9dfcb8d3fd6ef91983ccb93fafbf9e3115796 Author: Konstantin Komarov Date: Fri Oct 7 20:16:15 2022 +0300 fs/ntfs3: Changing locking in ntfs_rename In some cases we can be in deadlock because we tried to lock the same dir. Signed-off-by: Konstantin Komarov fs/ntfs3/namei.c | 4 ++++ fs/ntfs3/ntfs_fs.h | 6 ++++++ 2 files changed, 10 insertions(+) commit ad26a9c84510af7252e582e811de970433a9758f Author: Konstantin Komarov Date: Fri Oct 7 20:08:06 2022 +0300 fs/ntfs3: Fixing wrong logic in attr_set_size and ntfs_fallocate There were 2 problems: - in some cases we lost dirty flag; - cluster allocation can be called even when it wasn't needed. Fixes xfstest generic/465 Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 25 +++++++++++-------------- fs/ntfs3/file.c | 30 ++++++++++++++++++------------ fs/ntfs3/index.c | 9 +++++++++ fs/ntfs3/inode.c | 17 +++++------------ 4 files changed, 43 insertions(+), 38 deletions(-) commit 2b108260ea2c9ec07651aea4911d7e2e6ab560f7 Author: Konstantin Komarov Date: Fri Oct 7 19:53:30 2022 +0300 fs/ntfs3: atomic_open implementation Added ntfs_atomic_open function. Relaxed locking in ntfs_create_inode. Signed-off-by: Konstantin Komarov fs/ntfs3/inode.c | 24 ++++++++++--- fs/ntfs3/namei.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+), 4 deletions(-) commit 07f4aa9dd245661414a2db0574bed9bc5736ccfd Author: Konstantin Komarov Date: Fri Oct 7 18:55:03 2022 +0300 fs/ntfs3: Fix wrong indentations Also simplifying code. Signed-off-by: Konstantin Komarov fs/ntfs3/fslog.c | 3 +-- fs/ntfs3/index.c | 8 ++++---- fs/ntfs3/inode.c | 8 +++++--- 3 files changed, 10 insertions(+), 9 deletions(-) commit c380b52f6c5702cc4bdda5e6d456d6c19a201a0b Author: Konstantin Komarov Date: Fri Oct 7 14:02:36 2022 +0300 fs/ntfs3: Change new sparse cluster processing Remove ntfs_sparse_cluster. Zero clusters in attr_allocate_clusters. Fixes xfstest generic/263 Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 176 +++++++++++++++++++++++++++++++++++++---------------- fs/ntfs3/file.c | 146 ++++++++++---------------------------------- fs/ntfs3/frecord.c | 2 +- fs/ntfs3/index.c | 4 +- fs/ntfs3/inode.c | 12 ++-- fs/ntfs3/ntfs_fs.h | 7 +-- 6 files changed, 166 insertions(+), 181 deletions(-) commit 2f56a3f8d824d34525951483e95b0ed04c5954bf Author: Konstantin Komarov Date: Fri Oct 7 13:57:28 2022 +0300 fs/ntfs3: Fixing work with sparse clusters Simplify logic in ntfs_extend_initialized_size, ntfs_sparse_cluster and ntfs_fallocate. Signed-off-by: Konstantin Komarov fs/ntfs3/file.c | 45 ++++++++++++--------------------------------- fs/ntfs3/inode.c | 7 ++++++- 2 files changed, 18 insertions(+), 34 deletions(-) commit ba1189288905dc33c16a8e56d6af9c8d1bc5ca8f Author: Konstantin Komarov Date: Thu Oct 6 20:19:38 2022 +0300 fs/ntfs3: Simplify ntfs_update_mftmirr function Make err assignment in one place. Signed-off-by: Konstantin Komarov fs/ntfs3/fsntfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3929042111de8cb283489ef4ea184103e3443536 Author: Konstantin Komarov Date: Thu Oct 6 20:04:53 2022 +0300 fs/ntfs3: Remove unused functions Removed attr_must_be_resident and ntfs_query_def. Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 27 --------------------------- fs/ntfs3/fsntfs.c | 29 ----------------------------- fs/ntfs3/ntfs_fs.h | 2 -- 3 files changed, 58 deletions(-) commit 9144b43820610bfb69c9821c39839ffe05f2e6b2 Author: Konstantin Komarov Date: Thu Oct 6 19:58:11 2022 +0300 fs/ntfs3: Fix sparse problems Fixing various problems, detected by sparse. Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 7 ++++--- fs/ntfs3/dir.c | 4 ++-- fs/ntfs3/frecord.c | 3 +-- fs/ntfs3/namei.c | 13 ++++++------- 4 files changed, 13 insertions(+), 14 deletions(-) commit 08811ba59a61e8147c869e2d056c37ab8ca5ebde Author: Konstantin Komarov Date: Thu Oct 6 19:42:24 2022 +0300 fs/ntfs3: Add ntfs_bitmap_weight_le function and refactoring Added ntfs_bitmap_weight_le function. Changed argument types of bits/bitmap functions. Signed-off-by: Konstantin Komarov fs/ntfs3/bitfunc.c | 4 +-- fs/ntfs3/bitmap.c | 100 +++++++++++++++++++++++++++++------------------------ fs/ntfs3/ntfs_fs.h | 11 +++--- 3 files changed, 63 insertions(+), 52 deletions(-) commit 095d8ce635c116bb7813d865adfbccde8094d920 Author: Thomas Kühnel Date: Tue Dec 7 11:24:55 2021 +0100 fs/ntfs3: Use _le variants of bitops functions The functions from bitops.h already have _le variants so use them to prevent invalid reads/writes of the bitmap on big endian systems. Signed-off-by: Thomas Kühnel Signed-off-by: Konstantin Komarov fs/ntfs3/bitmap.c | 10 +++++----- fs/ntfs3/fsntfs.c | 8 ++++---- fs/ntfs3/index.c | 14 +++++++------- 3 files changed, 16 insertions(+), 16 deletions(-) commit 88a8d0d2482f60596eec875ba5ba62901d8274ff Author: Thomas Kühnel Date: Tue Dec 7 11:24:54 2021 +0100 fs/ntfs3: Add functions to modify LE bitmaps __bitmap_set/__bitmap_clear only works with bitmaps in CPU order. Define a variant of these functions in ntfs3 to handle modifying bitmaps read from the filesystem. Signed-off-by: Thomas Kühnel Reviewed-by: Nicolas Schier Signed-off-by: Konstantin Komarov fs/ntfs3/bitmap.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- fs/ntfs3/fslog.c | 4 ++-- fs/ntfs3/ntfs_fs.h | 3 +++ 3 files changed, 48 insertions(+), 5 deletions(-) commit 90c1cd540cc81023c5826891f3793ea159c4562e Author: Thomas Kühnel Date: Tue Dec 7 11:24:53 2021 +0100 fs/ntfs3: Fix endian conversion in ni_fname_name ni_fname_name called ntfs_cmp_names_cpu which assumes that the first string is in CPU byte order and the second one in little endian. In this case both strings are little endian so ntfs_cmp_names is the correct function to call. Signed-off-by: Thomas Kühnel Reviewed-by: Nicolas Schier Signed-off-by: Konstantin Komarov fs/ntfs3/frecord.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ecfbd57cf9c5ca225184ae266ce44ae473792132 Author: Yin Xiujiang Date: Mon Dec 6 10:40:45 2021 +0800 fs/ntfs3: Fix slab-out-of-bounds in r_page When PAGE_SIZE is 64K, if read_log_page is called by log_read_rst for the first time, the size of *buffer would be equal to DefaultLogPageSize(4K).But for *buffer operations like memcpy, if the memory area size(n) which being assigned to buffer is larger than 4K (log->page_size(64K) or bytes(64K-page_off)), it will cause an out of boundary error. Call trace: [...] kasan_report+0x44/0x130 check_memory_region+0xf8/0x1a0 memcpy+0xc8/0x100 ntfs_read_run_nb+0x20c/0x460 read_log_page+0xd0/0x1f4 log_read_rst+0x110/0x75c log_replay+0x1e8/0x4aa0 ntfs_loadlog_and_replay+0x290/0x2d0 ntfs_fill_super+0x508/0xec0 get_tree_bdev+0x1fc/0x34c [...] Fix this by setting variable r_page to NULL in log_read_rst. Signed-off-by: Yin Xiujiang Signed-off-by: Konstantin Komarov fs/ntfs3/fslog.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) commit 6df849caeb49e8975e815a6f906528b2da795fbd Author: Colin Ian King Date: Thu Oct 20 22:02:19 2022 +0100 HID: intel-ish-hid: ishtp: remove variable rb_count The variable rb_count is being incremented but it is never referenced, it is redundant and can be removed. Signed-off-by: Colin Ian King Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp/client.c | 3 --- 1 file changed, 3 deletions(-) commit 20e2e31779377b36ada04c06d572ce0b4e234bb1 Author: Namhyung Kim Date: Mon Nov 7 13:33:14 2022 -0800 perf stat: Consolidate condition to print metrics The pm variable holds an appropriate function to print metrics for CSV anf JSON already. So we can combine the if statement to simplify the code a little bit. This also matches to the above condition for non-CSV and non-JSON case. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221107213314.3239159-10-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f1db5a1d1d4de248534567fd95efa570bc693f73 Author: Namhyung Kim Date: Mon Nov 7 13:33:13 2022 -0800 perf stat: Fix condition in print_interval() The num_print_interval and config->interval_clear should be checked together like other places like later in the function. Otherwise, the --interval-clear option could print the headers for the CSV or JSON output unnecessarily. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221107213314.3239159-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1cc7642abba7b281ecd836bfb56fc6dedac32555 Author: Namhyung Kim Date: Mon Nov 7 13:33:12 2022 -0800 perf stat: Add header for interval in JSON output It missed to print a matching header line for intervals. Before: # perf stat -a -e cycles,instructions --metric-only -j -I 500 {"unit" : "insn per cycle"} {"interval" : 0.500544283}{"metric-value" : "1.96"} ^C After: # perf stat -a -e cycles,instructions --metric-only -j -I 500 {"unit" : "sec"}{"unit" : "insn per cycle"} {"interval" : 0.500515681}{"metric-value" : "2.31"} ^C Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221107213314.3239159-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6d0a7e394eabd456f70c2f2f8e958b2343074360 Author: Namhyung Kim Date: Mon Nov 7 13:33:11 2022 -0800 perf stat: Do not indent headers for JSON Currently --metric-only with --json indents header lines. This is not needed for JSON. $ perf stat -aA --metric-only -j true {"unit" : "GHz"}{"unit" : "insn per cycle"}{"unit" : "branch-misses of all branches"} {"cpu" : "0", {"metric-value" : "0.101"}{"metric-value" : "0.86"}{"metric-value" : "1.91"} {"cpu" : "1", {"metric-value" : "0.102"}{"metric-value" : "0.87"}{"metric-value" : "2.02"} {"cpu" : "2", {"metric-value" : "0.085"}{"metric-value" : "1.02"}{"metric-value" : "1.69"} ... Note that the other lines are broken JSON, but it will be handled later. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221107213314.3239159-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdc7d6082459aa6705dd39b827214f6cfc1fa054 Author: Namhyung Kim Date: Mon Nov 7 13:33:10 2022 -0800 perf stat: Fix --metric-only --json output Currently it prints all metric headers for JSON output. But actually it skips some metrics with valid_only_metric(). So the output looks like: $ perf stat --metric-only --json true {"unit" : "CPUs utilized", "unit" : "/sec", "unit" : "/sec", "unit" : "/sec", "unit" : "GHz", "unit" : "insn per cycle", "unit" : "/sec", "unit" : "branch-misses of all branches"} {"metric-value" : "3.861"}{"metric-value" : "0.79"}{"metric-value" : "3.04"} As you can see there are 8 units in the header but only 3 metric-values are there. It should skip the unused headers as well. Also each unit should be printed as a separate object like metric values. With this patch: $ perf stat --metric-only --json true {"unit" : "GHz"}{"unit" : "insn per cycle"}{"unit" : "branch-misses of all branches"} {"metric-value" : "4.166"}{"metric-value" : "0.73"}{"metric-value" : "2.96"} Fixes: df936cadfb58ba93 ("perf stat: Add JSON output option") Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Claire Jensen Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221107213314.3239159-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) commit f4e55f88da923f39f0b76edc3da3c52d0b72d429 Author: Namhyung Kim Date: Mon Nov 7 13:33:09 2022 -0800 perf stat: Move common code in print_metric_headers() The struct perf_stat_output_ctx is set in a loop with the same values. Move the code out of the loop and keep the loop minimal. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221107213314.3239159-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 81a02c6577ecfee7056ccafbd028984d0d670c0c Author: Namhyung Kim Date: Mon Nov 7 13:33:08 2022 -0800 perf stat: Clear screen only if output file is a tty The --interval-clear option makes perf stat to clear the terminal at each interval. But it doesn't need to clear the screen when it saves to a file. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221107213314.3239159-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ea0be1f0db588afdb2d4d94dfa921b01f34a3c3 Author: Namhyung Kim Date: Mon Nov 7 13:33:07 2022 -0800 perf stat: Increase metric length to align outputs When perf stat is called with very detailed events, the output doesn't align well like below: $ sudo perf stat -a -ddd sleep 1 Performance counter stats for 'system wide': 8,020.23 msec cpu-clock # 7.997 CPUs utilized 3,970 context-switches # 494.998 /sec 169 cpu-migrations # 21.072 /sec 586 page-faults # 73.065 /sec 649,568,060 cycles # 0.081 GHz (30.42%) 304,044,345 instructions # 0.47 insn per cycle (38.40%) 60,313,022 branches # 7.520 M/sec (38.89%) 2,766,919 branch-misses # 4.59% of all branches (39.26%) 74,422,951 L1-dcache-loads # 9.279 M/sec (39.39%) 8,025,568 L1-dcache-load-misses # 10.78% of all L1-dcache accesses (39.22%) 3,314,995 LLC-loads # 413.329 K/sec (30.83%) 1,225,619 LLC-load-misses # 36.97% of all LL-cache accesses (30.45%) L1-icache-loads 20,420,493 L1-icache-load-misses # 0.00% of all L1-icache accesses (30.29%) 58,017,947 dTLB-loads # 7.234 M/sec (30.37%) 704,677 dTLB-load-misses # 1.21% of all dTLB cache accesses (30.27%) 234,225 iTLB-loads # 29.204 K/sec (30.29%) 417,166 iTLB-load-misses # 178.10% of all iTLB cache accesses (30.32%) L1-dcache-prefetches L1-dcache-prefetch-misses 1.002947355 seconds time elapsed Increase the METRIC_LEN by 3 so that it can align properly. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221107213314.3239159-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3864ff04c685755d3887f1fb229ee64806f7625 Merge: 4bfe93fd9a81 1e15c02cf8c8 Author: Arnd Bergmann Date: Thu Oct 27 18:09:46 2022 +0200 Merge tag 'ux500-dts-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/dt Some Ux500 DTS updates for v6.2: - Some cleanups from Krzysztof for the SPI nodes. - Fix up the NFC chip in Janice. - Drop a bogus power domain regulator that isn't used for the crypto blocks. (We use proper power domains now.) - Add GPS to the Kyle. * tag 'ux500-dts-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: ux500: Add GPS to the Kyle ARM: dts: DBx500 cryp and hash uses power domain ARM: dts: ux500: Fix up the Janice NFC chip ARM: dts: ste: ux500: align SPI node name with dtschema Link: https://lore.kernel.org/r/CACRpkdaXmmZWsGdTG5tqNragkoefcTeUHjR+ZwNyNaa0S7s-7Q@mail.gmail.com Signed-off-by: Arnd Bergmann commit 4bfe93fd9a81807e1e407fe9088113664e550350 Merge: 3f6f5ee17918 56fed763f6b2 Author: Arnd Bergmann Date: Thu Oct 27 18:11:02 2022 +0200 Merge tag 'asahi-soc-dt-6.2' of https://github.com/AsahiLinux/linux into arm/dt Apple SoC DT updates for 6.2. This includes new device trees for Apple M1 Pro/Max/Ultra SoCs and the devices that contain them, as well as some audio-related changes. * tag 'asahi-soc-dt-6.2' of https://github.com/AsahiLinux/linux: arm64: dts: apple: Add ADMAC resets on t8103/t600x dt-bindings: dma: apple,admac: Add reset arm64: dts: apple: t600x: Add MCA and its support arm64: dts: apple: t8103: Add MCA and its support arm64: dts: apple: t8103: Add AUDIO_P parent to the SIO_ADMA power domain arm64: dts: apple: Add J375 devicetrees arm64: dts: apple: Add J314 and J316 devicetrees arm64: dts: apple: Add initial t6000/t6001/t6002 DTs arm64: dts: apple: Fix j45x model years dt-bindings: arm: apple: Add t6001/t6002 Mac Studio compatibles dt-bindings: apple,aic2: Add CPU PMU per-cpu pseudo-interrupts dt-bindings: iommu: dart: add t6000 compatible Link: https://lore.kernel.org/r/dea10860-2870-3a9e-fa51-21e493b1573a@marcan.st Signed-off-by: Arnd Bergmann commit 3f6f5ee179183068ef92fb58ca402db4bd6e769f Author: Kory Maincent Date: Wed Nov 2 18:10:09 2022 +0100 arm: dts: spear600: Add ssp controller nodes The SPEAr600 has three Synchronous serial port to enables synchronous serial communication with slave or master peripherals (SPI). Lets add these nodes to be able to use them. Signed-off-by: Kory Maincent Acked-by: Viresh Kumar Signed-off-by: Arnd Bergmann arch/arm/boot/dts/spear600.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 0336e2ce34e7a89832b6c214f924eb7bc58940be Author: Kory Maincent Date: Wed Nov 2 18:10:06 2022 +0100 arm: dts: spear600: Fix clcd interrupt Interrupt 12 of the Interrupt controller belongs to the SMI controller, the right one for the display controller is the interrupt 13. Fixes: 8113ba917dfa ("ARM: SPEAr: DT: Update device nodes") Signed-off-by: Kory Maincent Acked-by: Viresh Kumar Signed-off-by: Arnd Bergmann arch/arm/boot/dts/spear600.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6a714415eb97cd5629e7cb80a928d55be1aef22 Author: Kory Maincent Date: Wed Nov 2 18:10:07 2022 +0100 arm: configs: spear6xx: Enable PL110 display controller Enable the PL110 DRM driver, used by the spear600. Signed-off-by: Kory Maincent Acked-by: Viresh Kumar Acked-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/configs/spear6xx_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit c39a9e731a1da62efaad94a6bd67483e6856f625 Author: Kory Maincent Date: Wed Nov 2 18:10:05 2022 +0100 arm: configs: spear6xx: Refresh defconfig Refresh the defconfig to follow the changes made over the year. I ensure important options have not gone away. I drop the gpio sysfs config as it is useless to keep it alone without CONFIG_EXPERT. Signed-off-by: Kory Maincent Acked-by: Viresh Kumar Signed-off-by: Arnd Bergmann arch/arm/configs/spear6xx_defconfig | 5 ----- 1 file changed, 5 deletions(-) commit 9e75e74b07ab17e6407b567eb4a8b3d0c93de5f1 Author: Mark Brown Date: Mon Oct 31 19:24:50 2022 +0000 arm64/signal: Document our convention for choosing magic numbers Szabolcs Nagy has pointed out that most of our signal frame magic numbers are chosen to be meaningful ASCII when dumped to aid manual parsing. This seems sensible since it might help someone parsing things out, let's document it so people implementing new signal contexts are aware of it and are more likely to follow it. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221031192450.826159-1-broonie@kernel.org [will: Fixed typo and tweaked wording] Signed-off-by: Will Deacon arch/arm64/include/uapi/asm/sigcontext.h | 4 ++++ 1 file changed, 4 insertions(+) commit 566fb6711f186803c9b078f35fc1eb9169541ef0 Merge: 6cb1253c6d9c d84ea59e2015 Author: Arnd Bergmann Date: Mon Nov 14 16:04:43 2022 +0100 Merge tag 'renesas-arm-soc-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/soc Renesas ARM SoC updates for v6.2 - Drop selecting GPIOLIB and PINCTRL, which are already automatically selected as part of the SOC_RENESAS config option in drivers/soc/renesas/Kconfig. * tag 'renesas-arm-soc-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: renesas: Drop selecting GPIOLIB and PINCTRL ARM: shmobile: Drop selecting GPIOLIB and PINCTRL soc: renesas: Kconfig: Explicitly select GPIOLIB and PINCTRL config under SOC_RENESAS Link: https://lore.kernel.org/r/cover.1667558746.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 6cb1253c6d9c22e5dc505843b5322ef64ed095fc Merge: 247f34f7b803 2f89fbc94bce Author: Arnd Bergmann Date: Mon Nov 14 16:03:49 2022 +0100 Merge tag 'ux500-soc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/soc Ux500 core changes for the v6.2 kernel cycle: - Spelling error. - A non-urgent fix to not access IOmem for feeding entropy directly, instead copy and use. - Clean out an old register file. * tag 'ux500-soc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: ux500: Drop unused register file ARM: ux500: do not directly dereference __iomem arm/mach-ux500: fix repeated words in comments Link: https://lore.kernel.org/r/CACRpkdaPDbJKUzZHsS2POVUQEjYi+6bjU6cvbg4ox=SKPXG2ng@mail.gmail.com Signed-off-by: Arnd Bergmann commit 06ebd23a33ec726b9c19ba05b4e0257811fce4bf Author: Yinbo Zhu Date: Fri Nov 11 13:42:01 2022 +0800 dt-bindings: soc: add loongson-2 chipid Add the Loongson-2 SoC chipid binding with DT schema format using json-schema. Signed-off-by: Yinbo Zhu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221111054201.18528-2-zhuyinbo@loongson.cn' Signed-off-by: Arnd Bergmann .../bindings/hwinfo/loongson,ls2k-chipid.yaml | 38 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 39 insertions(+) commit b82621ac8450d0de7570506c59f298dbf99ded64 Author: Yinbo Zhu Date: Fri Nov 11 13:42:00 2022 +0800 soc: loongson: add GUTS driver for loongson-2 platforms The global utilities block controls PCIE device enabling, alternate function selection for multiplexed signals, consistency of HDA, USB and PCIE, configuration of memory controller, rtc controller, lio controller, and clock control. This patch adds a driver to manage and access global utilities block for LoongArch architecture Loongson-2 SoCs. Initially only reading SVR and registering soc device are supported. Other guts accesses, such as reading firmware configuration by default, should eventually be added into this driver as well. Signed-off-by: Yinbo Zhu Reviewed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann MAINTAINERS | 6 ++ drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/loongson/Kconfig | 18 ++++ drivers/soc/loongson/Makefile | 6 ++ drivers/soc/loongson/loongson2_guts.c | 192 ++++++++++++++++++++++++++++++++++ 6 files changed, 224 insertions(+) commit 4c1c97fc70e44aa39cd409e952eba3ed35c429fd Merge: 9e549c7637a5 b3acbca3c80e Author: Arnd Bergmann Date: Mon Nov 14 15:55:42 2022 +0100 Merge tag 'renesas-drivers-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v6.2 - Let SOC_RENESAS select GPIOLIB and PINCTRL, so this does not have to be handled in two (soon three: arm/arm64/riscv), places. * tag 'renesas-drivers-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: Kconfig: Explicitly select GPIOLIB and PINCTRL config under SOC_RENESAS Link: https://lore.kernel.org/r/cover.1667558747.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 657eef0a5420a02c02945ed8c87f2ddcbd255772 Author: Mark Rutland Date: Mon Nov 14 12:54:24 2022 +0000 arm64: atomics: lse: remove stale dependency on JUMP_LABEL Currently CONFIG_ARM64_USE_LSE_ATOMICS depends upon CONFIG_JUMP_LABEL, as the inline atomics were indirected with a static branch. However, since commit: 21fb26bfb01ffe0d ("arm64: alternatives: add alternative_has_feature_*()") ... we use an alternative_branch (which is always available) rather than a static branch, and hence the dependency is unnecessary. Remove the stale dependency, along with the stale include. This will allow the use of LSE atomics in kernels built with CONFIG_JUMP_LABEL=n, and reduces the risk of circular header dependencies via . Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20221114125424.2998268-1-mark.rutland@arm.com Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 - arch/arm64/include/asm/lse.h | 1 - 2 files changed, 2 deletions(-) commit a75df5be8e7b0ecfb413b7c02a2599be17d2721b Author: wangkailong@jari.cn Date: Sun Nov 13 17:41:10 2022 +0800 kselftest/arm64: fix array_size.cocci warning Fix following coccicheck warning: tools/testing/selftests/arm64/mte/check_mmap_options.c:64:24-25: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_mmap_options.c:66:20-21: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_mmap_options.c:135:25-26: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_mmap_options.c:96:25-26: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_mmap_options.c:190:24-25: WARNING: Use ARRAY_SIZE Signed-off-by: KaiLong Wang Link: https://lore.kernel.org/r/777ce8ba.12e.184705d4211.Coremail.wangkailong@jari.cn Signed-off-by: Will Deacon tools/testing/selftests/arm64/mte/check_mmap_options.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 8db131b29f9f947dfe735027243594aafa454cfa Merge: 247f34f7b803 d2c064d66e91 Author: Arnd Bergmann Date: Mon Nov 14 15:38:25 2022 +0100 Merge tag 'at91-defconfig-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/defconfig AT91 defconfig for 6.2 It contains: - sama7 defconfig refresh (done with make savedefconfig) - update sama7 defconfig with OTPC support - update sama7 defconfig with thermal management support * tag 'at91-defconfig-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: configs: at91: sama7: add config for thermal management ARM: configs: at91: sama7: add config for microchip otpc ARM: configs: at91: sama7: use make savedefconfig Link: https://lore.kernel.org/r/20221110115422.180893-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit ada8f95ba04e8fe07289b7de157ae99bb96bc8cb Author: Sebastian Reichel Date: Tue Oct 18 17:14:06 2022 +0200 clk: rockchip: add lookup table support Add support for mapping reset IDs to register offsets to support gapless continous platform reset IDs. Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221018151407.63395-9-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk.h | 21 +++++++++++++++------ drivers/clk/rockchip/softrst.c | 34 +++++++++++++++++++++++++--------- 2 files changed, 40 insertions(+), 15 deletions(-) commit ff94c8660dac444081f2f650fae36a283c55b117 Author: Sebastian Reichel Date: Tue Oct 18 17:14:05 2022 +0200 clk: rockchip: simplify rockchip_clk_add_lookup rockchip_clk_add_lookup is only called from within the file, so it can be made static. The additional checks are removed with the following reasoning: 1. The data structure is initialized by rockchip_clk_init(), which is called by all rockchip platforms before the clocks are registered. Not doing so would result in an incomplete clock tree at the moment, which is a fatal error. In other parts of the kernel these kind of checks are usually omitted, so this was done here. The alternative is adding a pr_err to inform the kernel programmer adding a new platform about his incorrect code. Apart from that we are also not checking if the clock id is within the array boundings. 2. While not used so far by any rockchip platform, 0 is a valid clock identifier. To align rockchip closer to other ARM platforms we will start using it with rk3588. Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221018151407.63395-8-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk.c | 14 ++++++-------- drivers/clk/rockchip/clk.h | 2 -- 2 files changed, 6 insertions(+), 10 deletions(-) commit 6ef881e4462ad113f2627001f4bb5276abc11c5e Merge: 377eb470390b 5258d30f33bd Author: Arnd Bergmann Date: Mon Nov 14 15:34:40 2022 +0100 Merge tag 'at91-dt-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt AT91 DT for 6.2 It contains: - interrupt support for ethernet PHYs on pcb8290 board - thermal management support for SAMA7G5 by adding OTP controller (that keeps temperature sensor calibration data), proper ADC bindings and describing thermal zones - securam node from SAMA7G5 is now described with generic name (sram) - remove of status = "okay" from SAM9X60-EK regulators * tag 'at91-dt-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sam9x60ek: remove status = "okay" for regulators ARM: dts: at91: sama7g5: use generic name for securam ARM: dts: at91: sama7g5: add thermal zones node ARM: dts: at91: sama7g5: add temperature sensor ARM: dts: at91: sama7g5: add cells for temperature calibration ARM: dts: at91: sama7g5: add io-channel-cells to adc node ARM: dts: at91: sama7g5: add otpc node ARM: dts: lan966x: Add interrupt support for PHYs on pcb8290 Link: https://lore.kernel.org/r/20221110115431.180908-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit 2004b7b1803719eaaaee5fa6b089b1699a65d31d Author: Elaine Zhang Date: Tue Oct 18 17:14:04 2022 +0200 clk: rockchip: allow additional mux options for cpu-clock frequency changes In order to improve the main frequency of CPU, the clock path of CPU is simplified as follows: |--\ | \ |--\ --apll--|\ | \ | \ | |--apll_core--| \ | \ --24M---|/ |mux1 |--[gate]--|mux2|---clk_core | / | / --gpll--|\ | / |------| / | |--gpll_core--| / | |--/ --24M---|/ |--/ | | -------apll_directly--------------| When the CPU requests high frequency, we want to use MUX2 select the "apll_directly". At low frequencies use MUX1 to select “apll_core" and then MUX2 to select "apll_core_gate". However, in this way, the CPU frequency conversion needs to be in the following order: 1. MUX2 select to "apll_core_gate", MUX1 select "gpll_core" 2. Apll sets slow_mode, sets APLL parameters, locks APLL, and then APLL sets normal_mode 3. MUX1 select "apll_core", MUX2 select "apll_directly" So add pre_mux and post_mux options to cover this special requirements. Signed-off-by: Elaine Zhang [rebase] Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221018151407.63395-7-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-cpu.c | 41 +++++++++++++++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.h | 2 ++ 2 files changed, 43 insertions(+) commit 8f6594494b1cb0ad14493795b436413cfe64a0f8 Author: Elaine Zhang Date: Tue Oct 18 17:14:03 2022 +0200 clk: rockchip: add pll type for RK3588 Add RK3588 PLL support fully relying on lookup tables like the other upstream supported rockchip platforms. Signed-off-by: Elaine Zhang [rebase and modify code to avoid PLL parameter calculation] Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221018151407.63395-6-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-pll.c | 218 ++++++++++++++++++++++++++++++++++++++++- drivers/clk/rockchip/clk.h | 18 ++++ 2 files changed, 235 insertions(+), 1 deletion(-) commit cf87691f143e6cc5727767b02ec2be3725534a5d Author: Elaine Zhang Date: Tue Oct 18 17:14:02 2022 +0200 clk: rockchip: add register offset of the cores select parent The cores select parent register is special on RK3588. Signed-off-by: Elaine Zhang Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221018151407.63395-5-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-cpu.c | 28 ++++++++++++++++++++-------- drivers/clk/rockchip/clk.h | 3 +++ 2 files changed, 23 insertions(+), 8 deletions(-) commit 4f5ca304f202938a07eb0c2e20551795286d817d Author: Elaine Zhang Date: Tue Oct 18 17:14:01 2022 +0200 dt-bindings: clock: add rk3588 cru bindings Document the device tree bindings of the rockchip rk3588 SoC clock and reset unit. Signed-off-by: Elaine Zhang Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221018151407.63395-4-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner .../bindings/clock/rockchip,rk3588-cru.yaml | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 1838ce8100819603d0a44c56c28bd277936f5429 Merge: 9abf2313adc1 0a8eb7dae617 Author: Heiko Stuebner Date: Mon Nov 14 15:29:22 2022 +0100 Merge branch 'v6.2-shared/clockids' into v6.2-clk/next commit 0a8eb7dae617a9537b9a64a6b14e63415c279eb5 Author: Sebastian Reichel Date: Tue Oct 18 17:14:00 2022 +0200 dt-bindings: reset: add rk3588 reset definitions Add reset ID defines for rk3588. Compared to the downstream bindings and previous rockchip generations this uses continous gapless reset IDs starting at 0 instead of register offsets as IDs. Thus all numbers are different between upstream and downstream, but I kept the names exactly the same. Co-Developed-by: Elaine Zhang Signed-off-by: Elaine Zhang Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221018151407.63395-3-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner include/dt-bindings/reset/rockchip,rk3588-cru.h | 754 ++++++++++++++++++++++++ 1 file changed, 754 insertions(+) commit f204a60e545ccd4bc28939054389690fd194cb5e Author: Sebastian Reichel Date: Tue Oct 18 17:13:59 2022 +0200 dt-bindings: clock: add rk3588 clock definitions Add clock ID defines for rk3588. Compared to the downstream bindings written by Elaine, this uses continous gapless clock IDs starting at 0. Thus all numbers are different between downstream and upstream, but I kept exactly the same names. Co-Developed-by: Elaine Zhang Signed-off-by: Elaine Zhang Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221018151407.63395-2-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rockchip,rk3588-cru.h | 766 ++++++++++++++++++++++++ 1 file changed, 766 insertions(+) commit 8d3a9ec6ae2886305fdd03652592b3c7ffea672b Author: Richard Acayan Date: Thu Nov 10 19:36:06 2022 -0500 dt-bindings: iommu: arm-smmu: add sdm670 compatible The Snapdragon 670 needs the IOMMU for GENI I2C. Add a compatible string in the documentation to represent its support. Signed-off-by: Richard Acayan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221111003606.126795-2-mailingradian@gmail.com Signed-off-by: Will Deacon Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 + 1 file changed, 1 insertion(+) commit 377eb470390b0e8f99cb1bdd086036f4eb774f76 Merge: be15e7571fc8 001b38cea309 Author: Arnd Bergmann Date: Mon Nov 14 15:08:57 2022 +0100 Merge tag 'dt-cleanup-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt Minor improvements in ARM DTS for v6.2 1. Aspeed: fix qcom,dc-scm-v1-bmc compatible in the bindings. 2. Marvell: include bindings in maintainers entry. 3. Cleanup DTS according to bindings (panel endpoint unit address, incorrect spi-max-frequency, generic node names). 4. Few indentation fixes. * tag 'dt-cleanup-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: dt-bindings: arm: aspeed: adjust qcom,dc-scm-v1-bmc compatible after rename ARM: dts: sunxi: correct indentation ARM: dts: omap: correct indentation ARM: dts: kirkwood: correct indentation ARM: dts: armada: correct indentation ARM: dts: ti: correct indentation ARM: dts: aspeed: align SPI node name with dtschema MAINTAINERS: ARM: marvell: include bindings ARM: dts: sunplus: sp7021: drop incorrect spi-max-frequency ARM: dts: am335x: drop panel endpoint unit address Link: https://lore.kernel.org/r/20221110092111.18581-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit af89dfde2a5f8b9d2489813f0ec575d0457ad902 Author: José Expósito Date: Thu Nov 10 18:49:55 2022 +0100 HID: uclogic: Standardize test name prefix Commit 961bcdf956a4 ("drm/tests: Change "igt_" prefix to "drm_test_"") introduced a new naming convention for the KUnit tests present in the DRM subsystem: "drm_test__". This naming convention is very convenient because it allows to easily run all subsystem tests or all driver tests using kunit.py's wildcards. Follow the naming conventions used in the DRM subsystem adapted to the HID subsystem: "hid_test__". Signed-off-by: José Expósito Reviewed-by: Maíra Canal Signed-off-by: Jiri Kosina drivers/hid/hid-uclogic-params-test.c | 4 ++-- drivers/hid/hid-uclogic-rdesc-test.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9861a25fc248508c781c18b198436c0a97cb3d99 Author: Yauhen Kharuzhy Date: Sun Nov 6 00:34:22 2022 +0200 HID: hid-sensor-custom: Allow more than one hinge angle sensor Some devices has two sets of accelerometers and the sensor hub exports two hinge angle 'sensors' based on accelerometer values. To allow more than one sensor of the same type, use PLATFORM_DEVID_AUTO instead of PLATFORM_DEVID_NONE when registering platform device for it. Checked on the Lenovo Yoga Book YB1-X91L tablet. Signed-off-by: Yauhen Kharuzhy Reviewed-by: Jonathan Cameron Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/hid-sensor-custom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be15e7571fc82ae59f0731b49b7034ca3ef1ca2c Merge: 6902029ec8a7 7dd1d57c052e Author: Arnd Bergmann Date: Mon Nov 14 15:00:55 2022 +0100 Merge tag 'renesas-dt-bindings-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DT binding updates for v6.2 - Move renesas.yaml from arm to soc, and document RZ/Five support. * tag 'renesas-dt-bindings-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: soc: renesas: renesas.yaml: Document Renesas RZ/Five SoC dt-bindings: soc: renesas: Move renesas.yaml from arm to soc Link: https://lore.kernel.org/r/cover.1667558749.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 553b20b211c4153f8af6096fd52069bbdf955e23 Author: Geert Uytterhoeven Date: Mon Oct 17 19:05:30 2022 +0200 m68k: defconfig: Update defconfigs for v6.1-rc1 - Shuffle crypto configuration (cfr. commit f1f142ad43488361 ("crypto: Kconfig - add submenus")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/c11de475ba9ba580e7e20cc349919ecfc36c8407.1666026267.git.geert@linux-m68k.org arch/m68k/configs/amiga_defconfig | 42 ++++++++++++++++++------------------ arch/m68k/configs/apollo_defconfig | 42 ++++++++++++++++++------------------ arch/m68k/configs/atari_defconfig | 42 ++++++++++++++++++------------------ arch/m68k/configs/bvme6000_defconfig | 42 ++++++++++++++++++------------------ arch/m68k/configs/hp300_defconfig | 42 ++++++++++++++++++------------------ arch/m68k/configs/mac_defconfig | 42 ++++++++++++++++++------------------ arch/m68k/configs/multi_defconfig | 42 ++++++++++++++++++------------------ arch/m68k/configs/mvme147_defconfig | 42 ++++++++++++++++++------------------ arch/m68k/configs/mvme16x_defconfig | 42 ++++++++++++++++++------------------ arch/m68k/configs/q40_defconfig | 42 ++++++++++++++++++------------------ arch/m68k/configs/sun3_defconfig | 42 ++++++++++++++++++------------------ arch/m68k/configs/sun3x_defconfig | 42 ++++++++++++++++++------------------ 12 files changed, 252 insertions(+), 252 deletions(-) commit 6902029ec8a738972802501dc0fdcc6181f8a49b Merge: 247f34f7b803 b9a0be205496 Author: Arnd Bergmann Date: Mon Nov 14 14:55:43 2022 +0100 Merge tag 'renesas-arm-dt-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas ARM DT updates for v6.2 - DMA, SPI (MSIOF), external interrupt (INTC-EX), PWM (PWM and TPU), SDHI, HyperFLASH/QSPI (RPC), and serial ((H)SCIF) support for the R-Car V4H SoC, - I/O expander, eMMC, and QSPI FLASH support for the White Hawk development board, - Preparatory work to share r9a07g043.dtsi between the ARM-based RZ/G2UL (R9A07G043U) and the RISC-V-based RZ/Five (R9A07G043F) SoCs, - Miscellaneous fixes and improvements. * tag 'renesas-arm-dt-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (21 commits) arm64: dts: renesas: r9a07g043: Split out RZ/G2UL SoC specific parts arm64: dts: renesas: r9a07g043: Introduce SOC_PERIPHERAL_IRQ() macro to specify interrupt property ARM: dts: renesas: Miscellaneous whitespace fixes arm64: dts: renesas: r8a779a0: Update to R-Car Gen4 compatible values arm64: dts: renesas: r8a779g0: Add remaining HSCIF nodes arm64: dts: renesas: r8a779g0: Add SCIF nodes arm64: dts: renesas: white-hawk-cpu: Add QSPI FLASH support arm64: dts: renesas: r8a779g0: Add RPC node arm64: dts: renesas: white-hawk-cpu: Add eMMC support arm64: dts: renesas: r8a779g0: Add SDHI node arm64: dts: renesas: rzg2l: Drop WDT2 nodes arm64: dts: renesas: r8a779g0: Add TPU device node arm64: dts: renesas: r8a779g0: Add PWM device nodes arm64: dts: renesas: r8a779g0: Fix HSCIF0 "brg_int" clock arm64: dts: renesas: condor-common: Add missing bootargs arm64: dts: renesas: white-hawk-cpu: Add PCA9654 I/O Expander arm64: dts: renesas: r8a779g0: Add INTC-EX node arm64: dts: renesas: r8a779g0: Add MSIOF nodes arm64: dts: renesas: r8a779g0: Add DMA support arm64: dts: renesas: rzg2ul-smarc: Move spi1 pinmux to carrier board DTSI ... Link: https://lore.kernel.org/r/cover.1667558740.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 2fd6e1ad7e199c1ef54341a54fa4e11edc31b63c Author: Adam Skladowski Date: Sun Oct 30 11:42:55 2022 +0200 iommu/arm-smmu-qcom: Add SM6115 support Add the Qualcomm SM6115 platform to the list of compatible, this target uses MMU500 for both APSS and GPU. Signed-off-by: Adam Skladowski Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20221030094258.486428-6-iskren.chernev@gmail.com Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + 1 file changed, 1 insertion(+) commit 728b22a57232a1738d87b2148908a81615240a37 Author: Adam Skladowski Date: Sun Oct 30 11:42:54 2022 +0200 dt-bindings: arm-smmu: Add compatible for Qualcomm SM6115 Add compatible for the Qualcomm SM6115 platform to the ARM SMMU DeviceTree binding. Signed-off-by: Adam Skladowski Signed-off-by: Iskren Chernev Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221030094258.486428-5-iskren.chernev@gmail.com Signed-off-by: Will Deacon Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 + 1 file changed, 1 insertion(+) commit 7b52f53ce1914f5b3542665ff6a373ee858161c9 Author: Melody Olvera Date: Wed Oct 26 12:05:34 2022 -0700 drivers: arm-smmu-impl: Add QDU1000 and QRU1000 iommu implementation Add compatible for Qualcomm QDU1000 and QRU1000 SoCs to add iommu support for them. Signed-off-by: Melody Olvera Link: https://lore.kernel.org/r/20221026190534.4004945-3-quic_molvera@quicinc.com Signed-off-by: Will Deacon drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + 1 file changed, 1 insertion(+) commit 6313f4b5a438023c0d20960f19df16483cbbb8d7 Author: Melody Olvera Date: Wed Oct 26 12:05:33 2022 -0700 dt-bindings: arm-smmu: Add 'compatible' for QDU1000 and QRU1000 Add compatible bindings for Qualcomm QDU1000 and QRU1000 platforms. Signed-off-by: Melody Olvera Link: https://lore.kernel.org/r/20221026190534.4004945-2-quic_molvera@quicinc.com Signed-off-by: Will Deacon Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 + 1 file changed, 1 insertion(+) commit 06de519345f4af5b7ee48aaa30228fe5ac5de233 Author: Andy Shevchenko Date: Fri Nov 11 14:00:48 2022 +0200 pinctrl: Move for_each_maps() to namespace and hide iterator inside First of all, while for_each_maps() is private to pin control subsystem it's still better to have it put into a namespace. Besides that, users are not relying on iterator variable, so hide it inside for-loop. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221111120048.42968-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 6 ++---- drivers/pinctrl/core.h | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) commit 5a0047360743695ecfe4ca33300222ddd39c4612 Author: Thierry Reding Date: Fri Nov 4 15:23:44 2022 +0100 pinctrl: tegra: Separate Tegra194 instances Tegra194 has two separate instances of the pin controller, one called AON (in the always-on domain) and another called "main". Instead of treating them as a single pin controller, split them up into two separate controllers. Doing so allows the mapping between the pinmux and GPIO controllers to be trivial identity mappings and more cleanly separates the AON from the main IP blocks. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20221104142345.1562750-4-thierry.reding@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/tegra/pinctrl-tegra.c | 33 ++-- drivers/pinctrl/tegra/pinctrl-tegra.h | 2 + drivers/pinctrl/tegra/pinctrl-tegra194.c | 286 +++++++++++++++++-------------- 3 files changed, 173 insertions(+), 148 deletions(-) commit b6bcef163ae0c4329187eea8431a735a60b1d7bb Author: Bjorn Andersson Date: Thu Nov 10 19:25:09 2022 -0800 interconnect: qcom: osm-l3: Simplify osm_l3_set() The aggregation over votes for all nodes in the provider will always only find the bandwidth votes for the destination side of the path. Further more, the average kBps value will always be 0. Simplify the logic by directly looking at the destination node's peak bandwidth request. Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20221111032515.3460-5-quic_bjorande@quicinc.com Signed-off-by: Georgi Djakov drivers/interconnect/qcom/osm-l3.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 9235253ec73dfd71cc83d154693476930fc8dd77 Author: Bjorn Andersson Date: Thu Nov 10 19:25:08 2022 -0800 interconnect: qcom: osm-l3: Add per-core EPSS L3 support The EPSS instance in e.g. SM8350 and SC8280XP has per-core L3 voting enabled. In this configuration, the "shared" vote is done using the REG_L3_VOTE register instead of PERF_STATE. Rename epss_l3 to clarify that it's affecting the PERF_STATE register and add a new L3_VOTE description. Given platform lineage it's assumed that the L3_VOTE-based case will be the predominant one, so use this for a new generic qcom,epss-l3 compatible. While adding the EPSS generic, also add qcom,osm-l3. Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20221111032515.3460-4-quic_bjorande@quicinc.com Signed-off-by: Georgi Djakov drivers/interconnect/qcom/osm-l3.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit d623264f62d40ca2d2380437f8a6318a2a9e4c66 Author: Bjorn Andersson Date: Thu Nov 10 19:25:07 2022 -0800 interconnect: qcom: osm-l3: Squash common descriptors Each platform defines their own OSM L3 descriptor, but in practice there's only two: one for OSM and one for EPSS. Remove the duplicated definitions. Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20221111032515.3460-3-quic_bjorande@quicinc.com Signed-off-by: Georgi Djakov drivers/interconnect/qcom/osm-l3.c | 48 +++++++------------------------------- 1 file changed, 8 insertions(+), 40 deletions(-) commit 4529992c947401adac53111cf15958a7ea97b1ef Author: Bjorn Andersson Date: Thu Nov 10 19:25:06 2022 -0800 interconnect: qcom: osm-l3: Use platform-independent node ids The identifiers used for nodes needs to be unique in the running system, but defining them per platform results in a lot of duplicated definitions and prevents us from using generic compatibles. As these identifiers are not exposed outside the kernel, change to use driver-local numbers, picked completely at random. Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20221111032515.3460-2-quic_bjorande@quicinc.com Signed-off-by: Georgi Djakov drivers/interconnect/qcom/osm-l3.c | 87 +++++++++++++------------------------- 1 file changed, 30 insertions(+), 57 deletions(-) commit 6d0bfef7dafd46e6e29e9f69baf8d0fdb3006f2c Author: Dmitry Osipenko Date: Mon Nov 14 02:38:50 2022 +0300 drm/gem-vram: Fix deadlock in drm_gem_vram_vmap() Recently DRM framebuffer core and all drivers were moved to unlocked vmapping functions that take the reservation lock. The drm_gem_vram_vmap() was missed out by accident and now deadlocks drivers that use drm_gem_vram helpers when framebuffer is updated, like Bochs driver. Remove the locking from drm_gem_vram_v[un]map() functions to fix the deadlock. Reported-by: Dmitry Vyukov Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations") Signed-off-by: Dmitry Osipenko Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221113233850.427704-1-dmitry.osipenko@collabora.com drivers/gpu/drm/drm_gem_vram_helper.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit f424f2c18432f8a2c35ebafb23dd004148bce149 Author: Russell King (Oracle) Date: Thu Aug 11 17:03:29 2022 +0100 ARM: findbit: add unwinder information Add unwinder information so oops in the findbit functions can create a proper backtrace. Signed-off-by: Russell King (Oracle) arch/arm/lib/findbit.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 2511d032f02e6426b0bd87d225b4b322a7154d15 Author: Russell King (Oracle) Date: Wed Jul 27 00:27:38 2022 +0100 ARM: findbit: operate by words Convert the implementations to operate on words rather than bytes which makes bitmap searching faster. Signed-off-by: Russell King (Oracle) arch/arm/include/asm/assembler.h | 6 ++++ arch/arm/lib/findbit.S | 78 ++++++++++++++++++++++------------------ 2 files changed, 50 insertions(+), 34 deletions(-) commit 2953a3e187e054a4cfba4190a2037dc16b327372 Author: Russell King (Oracle) Date: Thu Aug 11 15:53:41 2022 +0100 ARM: findbit: convert to macros Since the pairs of _find_first and _find_next functions are pretty similar, use macros to generate this code. This commit does not change the generated code. Signed-off-by: Russell King (Oracle) arch/arm/lib/findbit.S | 158 +++++++++++++------------------------------------ 1 file changed, 42 insertions(+), 116 deletions(-) commit bceab1431e0789794cbcc8bb71d500a74c8213f2 Author: Russell King (Oracle) Date: Fri Jul 29 16:10:49 2022 +0100 ARM: findbit: provide more efficient ARMv7 implementation Provide a more efficient ARMv7 implementation to determine the first set bit in the supplied value. Signed-off-by: Russell King (Oracle) arch/arm/lib/findbit.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7e0093870e6c550139a27d1780f54f1e8acc4978 Author: Russell King (Oracle) Date: Fri Jul 29 16:12:25 2022 +0100 ARM: findbit: document ARMv5 bit offset calculation Document the ARMv5 bit offset calculation code. Signed-off-by: Russell King (Oracle) arch/arm/lib/findbit.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9fbed16c3f4f2bebff610ff1ebb756785dfde0be Author: Li Huafei Date: Tue Oct 18 13:59:02 2022 +0100 ARM: 9259/1: stacktrace: Convert stacktrace to generic ARCH_STACKWALK Historically architectures have had duplicated code in their stack trace implementations for filtering what gets traced. In order to avoid this duplication some generic code has been provided using a new interface arch_stack_walk(), enabled by selecting ARCH_STACKWALK in Kconfig, which factors all this out into the generic stack trace code. Convert ARM to use this common infrastructure. When initializing the stack frame of the current task, arm64 uses __builtin_frame_address(1) to initialize the frame pointer, skipping arch_stack_walk(), see the commit c607ab4f916d ("arm64: stacktrace: don't trace arch_stack_walk()"). Since __builtin_frame_address(1) does not work on ARM, unwind_frame() is used to unwind the stack one layer forward before calling walk_stackframe(). Signed-off-by: Li Huafei Reviewed-by: Linus Walleij Signed-off-by: Russell King (Oracle) arch/arm/Kconfig | 1 + arch/arm/kernel/stacktrace.c | 114 ++++++++++++------------------------------- 2 files changed, 33 insertions(+), 82 deletions(-) commit d52a826b40604387d3e24b54e12e404867902fbb Author: bayi cheng Date: Mon Nov 14 16:13:27 2022 +0800 spi: spi-mtk-nor: Optimize timeout for dma read The timeout value of the current dma read is unreasonable. For example, If the spi flash clock is 26Mhz, It will takes about 1.3ms to read a 4KB data in spi mode. But the actual measurement exceeds 50s when a dma read timeout is encountered. In order to be more accurately, It is necessary to use usecs_to_jiffies, After modification, the measured timeout value is about 130ms. Signed-off-by: bayi cheng Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221114081327.25750-1-bayi.cheng@mediatek.com Signed-off-by: Mark Brown drivers/spi/spi-mtk-nor.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b1d39f0f426463672d9ee3081a50ae0725cee752 Author: Chris Morgan Date: Fri Nov 11 14:31:30 2022 -0600 drm/panel: Add NewVision NV3051D MIPI-DSI LCD panel Support NewVision NV3051D panels as found on the Anbernic RG353P and RG353V. The underlying LCD part number for the RG353x devices is unknown, so the device name and a fallback for the driver IC is used instead. Signed-off-by: Chris Morgan [Fixed checkpatch moan about parens] Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221111203130.9615-4-macroalpha82@gmail.com drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-newvision-nv3051d.c | 504 ++++++++++++++++++++++++ 3 files changed, 514 insertions(+) commit aa0e4c9b6b5a4002b9fc65c753105504c5aa9178 Author: Chris Morgan Date: Fri Nov 11 14:31:29 2022 -0600 dt-bindings: display: panel: Add NewVision NV3051D bindings Add documentation for the NewVision NV3051D panel bindings. Note that for the two expected consumers of this panel binding the underlying LCD model is unknown. Name "anbernic,rg353p-panel" is used because the hardware itself is known as "anbernic,rg353p". Signed-off-by: Chris Morgan Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221111203130.9615-3-macroalpha82@gmail.com .../bindings/display/panel/newvision,nv3051d.yaml | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit a2f79d7f140c8e01b719d9404e4a4eaa2c849ede Author: Chris Morgan Date: Fri Nov 11 14:31:28 2022 -0600 dt-bindings: vendor-prefixes: add NewVision vendor prefix NewVision (also sometimes written as New Vision) is a company based in Shenzen that manufactures ICs for controlling LCD panels. https://www.newvisiondisplay.com/ Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221111203130.9615-2-macroalpha82@gmail.com Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit f12ed9c04804eec4f1819097a0fd0b4800adac2f Merge: 6970ef27ff7f e07c4924a77d Author: David S. Miller Date: Mon Nov 14 11:35:28 2022 +0000 Merge tag 'mlx5-updates-2022-11-12' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2022-11-12 Misc updates to mlx5 driver 1) Support enhanced CQE compression, on ConnectX6-Dx Reduce irq rate, cpu utilization and latency. 2) Connection tracking: Optimize the pre_ct table lookup for rules installed on chain 0. 3) implement ethtool get_link_ext_stats for PHY down events 4) Expose device vhca_id to debugfs 5) misc cleanups and trivial changes ==================== Signed-off-by: David S. Miller commit 3653727560d06d6bc2ef5a3eb37c378651d87f9b Author: Tvrtko Ursulin Date: Thu Nov 10 12:46:33 2022 +0000 drm/i915: Simplify internal helper function signature Since we are now storing the GT backpointer in the wa list we can drop the explicit struct intel_gt * argument to wa_list_apply. Signed-off-by: Tvrtko Ursulin Cc: Andrzej Hajda Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20221110124633.3135026-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f8fd5f4813b6d8bdd003ffe164e98bfa01b1c830 Author: Minghao Chi Date: Fri Nov 11 16:41:51 2022 +0800 ASoC: sunxi: 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. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Acked-by: Samuel Holland Link: https://lore.kernel.org/r/202211111641514826535@zte.com.cn Signed-off-by: Mark Brown sound/soc/sunxi/sun50i-dmic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ec7bf231aaa1bdbcb69d23bc50c753c80fb22429 Author: Zeng Heng Date: Mon Nov 14 16:56:29 2022 +0800 ASoC: pxa: fix null-pointer dereference in filter() kasprintf() would return NULL pointer when kmalloc() fail to allocate. Need to check the return pointer before calling strcmp(). Fixes: 7a824e214e25 ("ASoC: mmp: add audio dma support") Signed-off-by: Zeng Heng Link: https://lore.kernel.org/r/20221114085629.1910435-1-zengheng4@huawei.com Signed-off-by: Mark Brown sound/soc/pxa/mmp-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23dab2ec7419280d116dcfd14f067303f7a0313d Author: Christophe JAILLET Date: Sat Nov 12 22:12:13 2022 +0100 ASoC: codecs: Remove a useless include is not needed for these drivers. Remove the corresponding #include. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/875ca433849025edf8c23624cf29b0e2250bba50.1668287523.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown sound/soc/codecs/adau1372.c | 1 - sound/soc/codecs/adau1373.c | 1 - sound/soc/codecs/adau17x1.c | 1 - 3 files changed, 3 deletions(-) commit 6970ef27ff7fd1ce3455b2c696081503d0c0f8ac Author: Shenwei Wang Date: Fri Nov 11 09:35:05 2022 -0600 net: fec: add xdp and page pool statistics Added xdp and page pool statistics. In order to make the implementation simple and compatible, the patch uses the 32bit integer to record the XDP statistics. Signed-off-by: Shenwei Wang Reported-by: kernel test robot Signed-off-by: David S. Miller drivers/net/ethernet/freescale/Kconfig | 1 + drivers/net/ethernet/freescale/fec.h | 14 +++++ drivers/net/ethernet/freescale/fec_main.c | 85 +++++++++++++++++++++++++++++-- 3 files changed, 95 insertions(+), 5 deletions(-) commit 8f70f1ec587da0b0d52d768fd8c3defbc5e5b55c Author: Badal Nilawar Date: Fri Nov 4 00:15:59 2022 +0530 drm/i915/mtl: Add Wa_14017073508 for SAMedia This workaround is added for Media tile of MTL A step. It is to help pcode workaround which handles the hardware issue seen during package C2/C3 transitions due to RC6 entry/exit transitions on Media tile. As a part of workaround pcode expect kmd to send mailbox message "media busy" when components of Media tile are in use and "media idle" otherwise. As per workaround description gucrc need to be disabled so enabled host based RC for Media tile. v2: - Correct workaround id (Matt) - Fix review comments (Rodrigo) Cc: Rodrigo Vivi Cc: Radhakrishna Sripada Cc: Vinay Belgaumkar Cc: Chris Wilson Signed-off-by: Badal Nilawar Reviewed-by: Rodrigo Vivi Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221103184559.2306481-1-badal.nilawar@intel.com drivers/gpu/drm/i915/gt/intel_gt_pm.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_rc.c | 13 ++++++++++++- drivers/gpu/drm/i915/i915_drv.h | 4 ++++ drivers/gpu/drm/i915/i915_reg.h | 9 +++++++++ 4 files changed, 52 insertions(+), 1 deletion(-) commit 4d1bbdf57b5bd29f52998cb36cd826a97f2089f4 Merge: 2fd450cd83e3 dccc30cc4906 Author: David S. Miller Date: Mon Nov 14 11:24:17 2022 +0000 Merge branch 'sparx5-sorted-VCAP-rules' Steen Hegelund says: ==================== net: Add support for sorted VCAP rules in Sparx5 This provides support for adding Sparx5 VCAP rules in sorted order, VCAP rule counters and TC filter matching on ARP frames. It builds on top of the initial IS2 VCAP support found in these series: https://lore.kernel.org/all/20221020130904.1215072-1-steen.hegelund@microchip.com/ https://lore.kernel.org/all/20221109114116.3612477-1-steen.hegelund@microchip.com/ Functionality ============= When a new VCAP rule is added the driver will now ensure that the rule is inserted in sorted order, and when a rule is removed, the remaining rules will be moved to keep the sorted order and remove any gaps in the VCAP address space. A VCAP rule is ordered using these 3 values: - Rule size: the count of VCAP addresses used by the rule. The largest rule have highest priority - Rule User: The rules are ordered by the user enumeration - Priority: The priority provided in the flower filter. The lowest value has the highest priority. A VCAP instance may contain the counter as part of the VCAP cache area, and this counter may be one or more bits in width. This type of counter automatically increments its value when the rule is hit. Other VCAP instances have a dedicated counter area outside of the VCAP and in this case the rule must contain the counter id to be able to locate the counter value and cause the counter to be incremented. In this case there must also be a VCAP rule action that sets the counter id. The Sparx5 IS2 VCAP uses a dedicated counter area with 32bit counters. This series adds support for getting VCAP rule counters and provide these via the TC statistic interface. This only support packet counters, not byte counters. Finally the series adds support for the ARP frame dissector and configures the Sparx5 IS2 VCAP to generate the ARP keyset when ARP traffic is received. Delivery: ========= This is current plan for delivering the full VCAP feature set of Sparx5: - DebugFS support for inspecting rules - TC protocol all support - Sparx5 IS0 VCAP support - TC policer and drop action support (depends on the Sparx5 QoS support upstreamed separately) - Sparx5 ES0 VCAP support - TC flower template support - TC matchall filter support for mirroring and policing ports - TC flower filter mirror action support - Sparx5 ES2 VCAP support ==================== Signed-off-by: David S. Miller commit dccc30cc4906b5ec0569979fbef591f84e6cb37d Author: Steen Hegelund Date: Fri Nov 11 14:05:19 2022 +0100 net: microchip: sparx5: Add KUNIT test of counters and sorted rules This tests the insert, move and deleting of rules and checks that the unused VCAP addresses are initialized correctly. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../net/ethernet/microchip/vcap/vcap_api_kunit.c | 526 +++++++++++++++++++++ 1 file changed, 526 insertions(+) commit 40e7fe18abab3880e54e86521307c40ea92676d1 Author: Steen Hegelund Date: Fri Nov 11 14:05:18 2022 +0100 net: microchip: sparx5: Add support for TC flower filter statistics This provides flower filter packet statistics (bytes are not supported) via the dedicated IS2 counter feature. All rules having the same TC cookie will contribute to the packet statistics for the filter as they are considered to be part of the same TC flower filter. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_tc_flower.c | 68 ++++++++++++++++++++++ drivers/net/ethernet/microchip/vcap/vcap_api.c | 25 ++++++++ .../net/ethernet/microchip/vcap/vcap_api_client.h | 3 + 3 files changed, 96 insertions(+) commit f13230a474774f2b38dab61eb22b3e494d9f5dc7 Author: Steen Hegelund Date: Fri Nov 11 14:05:17 2022 +0100 net: microchip: sparx5: Add support for IS2 VCAP rule counters This adds API methods to set and get a rule counter. A VCAP instance may contain the counter as part of the VCAP cache area, and this counter may be one or more bits in width. This type of counter automatically increments it value when the rule is hit. Other VCAP instances have a dedicated counter area outside of the VCAP and in this case the rule must contain the counter id to be able to locate the counter value. In this case there must also be a rule action that updates the counter using the rule id when the rule is hit. The Sparx5 IS2 VCAP uses a dedicated counter area. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 47 +++++++++++++- drivers/net/ethernet/microchip/vcap/vcap_api.c | 71 ++++++++++++++++++++++ .../net/ethernet/microchip/vcap/vcap_api_client.h | 11 ++++ 3 files changed, 127 insertions(+), 2 deletions(-) commit 990e483981ea739b1064eadc426d986ab8880169 Author: Steen Hegelund Date: Fri Nov 11 14:05:16 2022 +0100 net: microchip: sparx5: Add/delete rules in sorted order This adds a sorting criteria to rule insertion and deletion. The criteria is (in the listed order): - Rule size (largest size first) - User (based on an enumerated user value) - Priority (highest priority first, aka lowest value) When a rule is deleted the other rules may need to be moved to fill the gap to use the available VCAP address space in the best possible way. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 27 +++- drivers/net/ethernet/microchip/vcap/vcap_api.c | 137 +++++++++++++++++++-- 2 files changed, 151 insertions(+), 13 deletions(-) commit 3a344f99bb55cdaa15b5eccb1a9b9b88e5ce2f48 Author: Steen Hegelund Date: Fri Nov 11 14:05:15 2022 +0100 net: microchip: sparx5: Add support for TC flower ARP dissector This add support for Sparx5 for dissecting TC ARP flower filter keys and sets up the Sparx5 IS2 VCAP to generate the ARP keyset for ARP frames. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_tc_flower.c | 76 ++++++++++++++++++++++ .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 2 +- 2 files changed, 77 insertions(+), 1 deletion(-) commit 70ea86a0dfed10e00ee2666dadeb563bab00efea Author: Steen Hegelund Date: Fri Nov 11 14:05:14 2022 +0100 net: flow_offload: add support for ARP frame matching This adds a new flow_rule_match_arp function that allows drivers to be able to dissect ARP frames. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller include/net/flow_offload.h | 6 ++++++ net/core/flow_offload.c | 7 +++++++ 2 files changed, 13 insertions(+) commit 2fd450cd83e3c978a4902aceb4aac36fa341067c Author: xu xin Date: Fri Nov 11 09:04:20 2022 +0000 ipasdv4/tcp_ipv4: remove redundant assignment The value of 'st->state' has been verified as "TCP_SEQ_STATE_LISTENING", it's unnecessary to assign TCP_SEQ_STATE_LISTENING to it, so we can remove it. Signed-off-by: xu xin Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 1 - 1 file changed, 1 deletion(-) commit 1d26a55fbeb9c24bb24fa84595c56efee8783f35 Author: Dmitry Torokhov Date: Tue Sep 6 13:43:00 2022 -0700 PCI: histb: Switch to using gpiod API This patch switches the driver away from legacy gpio/of_gpio API to gpiod API, and removes use of of_get_named_gpio_flags() which I want to make private to gpiolib. Link: https://lore.kernel.org/r/20220906204301.3736813-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov Signed-off-by: Lorenzo Pieralisi Reviewed-by: Linus Walleij drivers/pci/controller/dwc/pcie-histb.c | 39 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 20 deletions(-) commit 8a30b30b26bcf1b098ab6f4149e5a3cf53d5c4d9 Merge: e384cf35bf0c df8f66d02df7 Author: David S. Miller Date: Mon Nov 14 10:47:07 2022 +0000 Merge branch 'ibmvnic-affinity-hints' Nick Child says: ==================== ibmvnic: Introduce affinity hint support This is a patchset to do 3 things to improve ibmvnic performance: 1. Assign affinity hints to ibmvnic queue irq's 2. Update affinity hints on cpu hotplug events 3. Introduce transmit packet steering (XPS) NOTE: If irqbalance is running, you need to stop it from overriding our affinity hints. To do this you can do one of: - systemctl stop irqbalance - ban the ibmvnic module irqs - you must have the latest irqbalance v9.2, the banmod argument was broken before this - in /etc/sysconfig/irqbalance -> IRQBALANCE_ARGS="--banmod=ibmvnic" - systemctl restart irqbalance ==================== Signed-off-by: David S. Miller commit df8f66d02df7b44516635edbc8c17b1311cfa0d8 Author: Nick Child Date: Thu Nov 10 15:32:18 2022 -0600 ibmvnic: Update XPS assignments during affinity binding Transmit Packet Steering (XPS) maps cpu numbers to transmit queues. By running the same connection on the same set of cpu's, contention for the queue and cache miss rate can be minimized. When assigning a cpu mask for a tranmit queues irq number, assign the same cpu mask as the set of cpu's that XPS should use for that queue. Signed-off-by: Thomas Falcon Signed-off-by: Dany Madden Signed-off-by: Nick Child Reviewed-by: Rick Lindsley Reviewed-by: Haren Myneni Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 92125c3a602454824d70edb1b2abb382811cab4f Author: Nick Child Date: Thu Nov 10 15:32:17 2022 -0600 ibmvnic: Add hotpluggable CPU callbacks to reassign affinity hints When CPU's are added and removed, ibmvnic devices will reassign hint values. Introduce a new cpu hotplug state CPUHP_IBMVNIC_DEAD to signal to ibmvnic devices that the CPU has been removed and it is time to reset affinity hint assignments. On the other hand, when CPU's are being added, add a state instance to CPUHP_AP_ONLINE_DYN which will trigger a reassignment of affinity hints once the new CPU's are online. This implementation is based on the virtio_net driver. Signed-off-by: Thomas Falcon Signed-off-by: Dany Madden Signed-off-by: Nick Child Reviewed-by: Rick Lindsley Reviewed-by: Haren Myneni Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 89 +++++++++++++++++++++++++++++++++++++- drivers/net/ethernet/ibm/ibmvnic.h | 4 ++ include/linux/cpuhotplug.h | 1 + 3 files changed, 93 insertions(+), 1 deletion(-) commit 44fbc1b6e0e291df1d31f5080777ce66a72ef37a Author: Nick Child Date: Thu Nov 10 15:32:16 2022 -0600 ibmvnic: Assign IRQ affinity hints to device queues Assign affinity hints to ibmvnic device queue interrupts. Affinity hints are assigned and removed during sub-crq init and teardown, respectively. This update should improve latency if utilized as interrupt lines and processing are more equally distributed among CPU's. This implementation is based on the virtio_net driver. Signed-off-by: Thomas Falcon Signed-off-by: Dany Madden Signed-off-by: Nick Child Reviewed-by: Rick Lindsley Reviewed-by: Haren Myneni Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 140 +++++++++++++++++++++++++++++++++++++ drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 141 insertions(+) commit e384cf35bf0c83284eb37785d21d39bbe2568adf Author: Md Fahad Iqbal Polash Date: Thu Nov 10 14:03:53 2022 +0100 ice: virtchnl rss hena support Add support for 2 virtchnl msgs: VIRTCHNL_OP_SET_RSS_HENA VIRTCHNL_OP_GET_RSS_HENA_CAPS The first one allows VFs to clear all previously programmed RSS configuration and customize it. The second one returns the RSS HENA bits allowed by the hardware. Introduce ice_err_to_virt_err which converts kernel specific errors to virtchnl errors. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Wojciech Drewek Reviewed-by: Michal Swiatkowski Signed-off-by: David S. Miller drivers/net/ethernet/intel/ice/ice_vf_lib.c | 24 +++++ .../net/ethernet/intel/ice/ice_vf_lib_private.h | 1 + drivers/net/ethernet/intel/ice/ice_virtchnl.c | 112 +++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_virtchnl.h | 2 + 4 files changed, 139 insertions(+) commit ab00af85d2f886a8e4ace1342d9cc2b232eab6a8 Author: Chuang Wang Date: Thu Nov 10 15:31:25 2022 +0800 net: tun: rebuild error handling in tun_get_user The error handling in tun_get_user is very scattered. This patch unifies error handling, reduces duplication of code, and makes the logic clearer. Signed-off-by: Chuang Wang Signed-off-by: David S. Miller drivers/net/tun.c | 65 +++++++++++++++++++++++++------------------------------ 1 file changed, 29 insertions(+), 36 deletions(-) commit 51cd31ae20e352d8c718f787510217d3ae0f6200 Author: Krzysztof Kozlowski Date: Wed Nov 9 11:51:38 2022 +0100 dt-bindings: pinctrl: qcom,msm8960: convert to dtschema Convert Qualcomm MSM8960 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221109105140.48196-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8960-pinctrl.txt | 190 --------------------- .../bindings/pinctrl/qcom,msm8960-pinctrl.yaml | 164 ++++++++++++++++++ 2 files changed, 164 insertions(+), 190 deletions(-) commit a4c54f830da86294b8cd7137f686c6d8aa62417c Author: Krzysztof Kozlowski Date: Tue Nov 8 15:23:56 2022 +0100 dt-bindings: pinctrl: qcom,ipq8074: convert to dtschema Convert Qualcomm IPQ8074 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Bjorn Andersson Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20221108142357.67202-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,ipq8074-pinctrl.txt | 181 --------------------- .../bindings/pinctrl/qcom,ipq8074-pinctrl.yaml | 135 +++++++++++++++ 2 files changed, 135 insertions(+), 181 deletions(-) commit 41cf3a9156ba8e13e557e7908f9e22563b1f2828 Author: David Howells Date: Thu Nov 10 09:39:39 2022 +0000 rxrpc: Fix missing IPV6 #ifdef Fix rxrpc_encap_err_rcv() to make the call to ipv6_icmp_error conditional on IPV6 support being enabled. Fixes: b6c66c4324e7 ("rxrpc: Use the core ICMP/ICMP6 parsers") Reported-by: kernel test robot Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org net/rxrpc/local_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e8433659bf701b6f53a6c2168262c9b2c363c049 Author: Greg Kroah-Hartman Date: Mon Nov 14 10:03:38 2022 +0100 Revert "drivers: bus: simple-pm-bus: Use clocks" This reverts commit 882cf4c913d730a74175db039d941005b883de38 as it breaks the build in linux-next. Link: https://lore.kernel.org/r/20221114181752.08a850f0@canb.auug.org.au Reported-by: Stephen Rothwell Cc: Geert Uytterhoeven Cc: Liu Ying Cc: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/bus/simple-pm-bus.c | 48 --------------------------------------------- 1 file changed, 48 deletions(-) commit f613facc82cfd4b02b937b14872f24e27da4b909 Author: Andy Shevchenko Date: Sun Nov 13 21:10:27 2022 +0200 mfd: vexpress-sysreg: Fix resource compound literal assignments Since DEFINE_RES_*() macros were converted to provide a compound literal the user doesn't need to repeat it. Moreover, it may not be compiled. Fixes: 52c4d11f1dce ("resource: Convert DEFINE_RES_NAMED() to be compound literal") Reported-by: kernel test robot Reported-by: Stephen Rothwell Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221113191027.2327-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/mfd/vexpress-sysreg.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 77a1a1826f7d5072d78c5135877c8733468f5ceb Author: Fabio Estevam Date: Sun Nov 13 09:44:59 2022 -0300 arm64: dts: imx8mm-phg: Add initial board support Add the initial support for the i.MX8MM Cloos PHG board. This board uses a imx8mm-tqma8mqml SoM from TQ-Group. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/Makefile | 1 + arch/arm64/boot/dts/freescale/imx8mm-phg.dts | 266 +++++++++++++++++++++++++++ 2 files changed, 267 insertions(+) commit 651ae85e5c5be0185f341e82171275b0c3b68868 Author: Fabio Estevam Date: Sun Nov 13 09:44:58 2022 -0300 dt-bindings: arm: fsl: Add an entry for Cloos PHG board Add an entry for the i.MX8MM Cloos PHG board. Signed-off-by: Fabio Estevam Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 1 + 1 file changed, 1 insertion(+) commit 5a2102c5aa739a3de9ba4631e97d3ebbadf6fcad Author: Fabio Estevam Date: Sun Nov 13 09:44:57 2022 -0300 dt-bindings: vendor-prefixes: Add an entry for Cloos Carl Cloos Schweisstechnik GmbH develops, manufactures and delivers welding industrial solutions: https://www.cloos.de/de-en/ Add a vendor prefix entry for it. Signed-off-by: Fabio Estevam Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit b57220ac8d26c8ac30c530cff0d50e27ebfed904 Author: Shenwei Wang Date: Fri Nov 11 09:50:16 2022 -0600 arm64: dts: imx8qxp-ss-lsio: add gpio-ranges property add gpio-ranges property for imx8qxp soc. This gpio-range is used to record which GPIOs correspond to which pins on which pin controllers. The GPIO to PIN mapping will be referenced by the pad wakeup function in GPIO-MXC driver. Signed-off-by: Shenwei Wang Reviewed-by: Linus Walleij Reviewed-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp-ss-lsio.dtsi | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit bed3003aad6d59fa662bf333ae2c16cbd8a5da69 Author: Shenwei Wang Date: Fri Nov 11 09:50:15 2022 -0600 arm64: dts: imx8qm-ss-lsio: add gpio-ranges property add gpio-ranges property for imx8qm soc. This gpio-range is used to record which GPIOs correspond to which pins on which pin controllers. The GPIO to PIN mapping will be referenced by the pad wakeup function in GPIO-MXC driver. Signed-off-by: Shenwei Wang Reviewed-by: Linus Walleij Reviewed-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qm-ss-lsio.dtsi | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit af9493d6fd9830dc312434344c4f15dd9d6167b6 Author: Shenwei Wang Date: Fri Nov 11 09:50:14 2022 -0600 arm64: dts: imx8dxl-ss-lsio: add gpio-ranges property add gpio-ranges property for imx8dxl soc. This gpio-range is used to record which GPIOs correspond to which pins on which pin controllers. The GPIO to PIN mapping will be referenced by the pad wakeup function in GPIO-MXC driver. Signed-off-by: Shenwei Wang Reviewed-by: Linus Walleij Reviewed-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8dxl-ss-lsio.dtsi | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 65fa83a6baca5b3d21fb34b2f809a6e86d65b96f Author: Frank Li Date: Fri Nov 11 10:47:42 2022 -0500 arm64: dts: imx8dxl_evk: add lpspi0 support Enable lpspi0 at imx8dxl_evk boards dts. Signed-off-by: Frank Li Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit c4098885e790e41e9aa032669633e99a1fadffc2 Author: Frank Li Date: Fri Nov 11 10:47:41 2022 -0500 arm64: dts: imx8dxl: add lpspi support Add lpspi0 lpspi1 lpspi2 lpspi3 node at common dma subsystem. Change irq number for 8dxl. Signed-off-by: Frank Li Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi | 112 +++++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8dxl-ss-adma.dtsi | 16 +++ 2 files changed, 128 insertions(+) commit 86d1625d2eaa4551ce35ebd0a2427720a0e9ba9b Author: Frank Li Date: Fri Nov 11 10:47:40 2022 -0500 arm64: dts: imx8dxl_evk: add flexspi0 support Enable flexspi0 at imx8dxl_evk boards dts. Signed-off-by: Frank Li Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 6276d66984e902ee90a2894561cdd8e71434cd71 Author: Frank Li Date: Fri Nov 11 10:47:39 2022 -0500 arm64: dts: imx8dxl: add flexspi0 support Add flexspi0 node at common lsio subsystem. Change flexspi0 irq number for imx8dxl. Signed-off-by: Frank Li Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8-ss-lsio.dtsi | 17 ++++++++++++++++- arch/arm64/boot/dts/freescale/imx8dxl-ss-lsio.dtsi | 5 +++++ 2 files changed, 21 insertions(+), 1 deletion(-) commit 7772c29d61794bd34508e946381f450ce7b6a3a6 Author: Frank Li Date: Fri Nov 11 10:47:38 2022 -0500 arm64: dts: imx8dxl_evk: add adc0 support Enable adc0 at imx8dxl_evk boards dts. Signed-off-by: Frank Li Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 1db044b25d2ed65368af0438cb33cc4f9f355bb1 Author: Frank Li Date: Fri Nov 11 10:47:37 2022 -0500 arm64: dts: imx8dxl: add adc0 support Add adc0 and adc1 node at imx8 common dma subsystem. imx8dxl have only adc0. Change irq number for adc0. Signed-off-by: Frank Li Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi | 52 ++++++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8dxl-ss-adma.dtsi | 4 ++ 2 files changed, 56 insertions(+) commit e7c5f525159c66f82010c98a31becfff91aa2536 Author: Andreas Kemnade Date: Fri Nov 4 21:42:51 2022 +0100 ARM: dts: imx: e60k02: Add touchscreen Add the touchscreen now, since the driver is available. Signed-off-by: Andreas Kemnade Signed-off-by: Shawn Guo arch/arm/boot/dts/e60k02.dtsi | 11 ++++++++++- arch/arm/boot/dts/imx6sl-tolino-shine3.dts | 7 +++++++ arch/arm/boot/dts/imx6sll-kobo-clarahd.dts | 7 +++++++ 3 files changed, 24 insertions(+), 1 deletion(-) commit 2a43322ca7f3ae4599dc5bd3a7584660b22994a2 Author: Detlev Casanova Date: Fri Oct 28 10:18:11 2022 -0400 ARM: dts: imx6qdl-sabre: Add mmc aliases If not specified, the mmc0 and mmc1 devices will be the devices mmc@2190000 and mmc@2194000, which are in disabled state on the iMX.6 Sabrelite devices. The actual SD card reader devices are the ones at mmc@2198000 and mmc@219c000. Set aliases to use the correct mmc devices order. Signed-off-by: Detlev Casanova Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 3574cfdca28543e2e8db649297cd6659ea8e4bb8 Author: Leon Romanovsky Date: Fri Nov 11 11:55:29 2022 +0200 RDMA/mana: Remove redefinition of basic u64 type gdma_obj_handle_t is no more than redefinition of basic u64 type. Remove such obfuscation. Link: https://lore.kernel.org/r/3c1e821279e6a165d058655d2343722d6650e776.1668160486.git.leonro@nvidia.com Acked-by: Long Li Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mana/mr.c | 5 ++-- drivers/net/ethernet/microsoft/mana/gdma_main.c | 3 +-- include/net/mana/gdma.h | 31 +++++++++++-------------- 3 files changed, 17 insertions(+), 22 deletions(-) commit c02f20d38fb90eba606277874581db124ace42c4 Author: Ben Skeggs Date: Mon Nov 14 15:38:01 2022 +1000 drm/nouveau/disp: fix incorrect/broken hdmi methods These are fixes from Lyude, and were meant to have been included in the last round of drm-next patches. - Fix some nasty memory issues that broke Lyude's display: - 0 initialize both nvif args and parsed HDMI infoframe buffers - Fixed missing memset(…, 0, …) for nvif args before sending VSI infoframe - Fixed incorrect data pointer and size in nvkm_uoutp_mthd_infoframe() (was previously pointing at the start of the nvif_outp_infoframe_args struct instead of at the start of the infoframe data - Get rid of duplicated scdc assignments, since we only use it to write the scdc registers Signed-off-by: Ben Skeggs Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/dispnv50/disp.c | 28 ++++++++++-------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 5 +++-- 2 files changed, 15 insertions(+), 18 deletions(-) commit ca821c1f4ec11d6181da58118d158a015160106d Author: Brian Norris Date: Fri Nov 11 15:13:01 2022 -0800 platform/chrome: cros_ec_lpc: Force synchronous probe This reverts commit bd88b965ae8c ("platform/chrome: cros_ec_lpc: Mark PROBE_PREFER_ASYNCHRONOUS"), and then some. It has been reported that there are issues with 'cros-ec-keyb' devices that are children of this. As noted in the initial patch for its ACPI support (commit ba0f32141bc5 ("Input: cros_ec_keyb - handle x86 detachable/convertible Chromebooks")), it's possible to probe an ACPI child device before its parent is probed -- hence the need for EPROBE_DEFER. Unfortunately, poking your parent's dev_get_drvdata() isn't safe with asynchronous probe, as there's no locking, and the ordering is all wrong anyway (drvdata is set before the device is *really* ready). Because this parent/child relationship has known issues, let's go the other direction and force synchronous probe, until we resolve the issues. Possible solutions involve adding device links, so we ensure the child doesn't probe before the parent is done; or perhaps some other larger refactoring (auxiliary bus?). But that might take a little more effort and review, as there are many other potential sub-devices of cros_ec_lpc that could need patching. Note that we don't have the same problem for non-ACPI cros-ec hosts, like cros-ec-spi (commit 015e4b05c377 ("platform/chrome: cros_ec_spi: Set PROBE_PREFER_ASYNCHRONOUS")), because its sub-devices aren't created until cros_ec_register(), or they don't exist at all (e.g., FPMCU uses). Fixes: bd88b965ae8c ("platform/chrome: cros_ec_lpc: Mark PROBE_PREFER_ASYNCHRONOUS") Signed-off-by: Brian Norris Reviewed-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221111231302.3458191-1-briannorris@chromium.org drivers/platform/chrome/cros_ec_lpc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 890d637523eec9d730e3885532fa1228ba678880 Author: Nathan Chancellor Date: Wed Nov 2 08:47:12 2022 -0700 drm/mediatek: Fix return type of mtk_hdmi_bridge_mode_valid() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/gpu/drm/mediatek/mtk_hdmi.c:1407:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_bridge *, const struct drm_display_info *, const struct drm_display_mode *)' with an expression of type 'int (struct drm_bridge *, const struct drm_display_info *, const struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict] .mode_valid = mtk_hdmi_bridge_mode_valid, ^~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ->mode_valid() in 'struct drm_bridge_funcs' expects a return type of 'enum drm_mode_status', not 'int'. Adjust the return type of mtk_hdmi_bridge_mode_valid() to match the prototype's to resolve the warning and CFI failure. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Reported-by: Sami Tolvanen Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_hdmi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 144d9b2e7abffe6dff3a0ed693d6be337969b947 Author: Gil Dekel Date: Thu Nov 10 13:48:52 2022 -0500 drm/mediatek: Make eDP panel as the first connected connector [Why] Some userspaces assume that the first connected connector is the "main" display, which supposed to display, for example, the login screen. For laptops, this should be the internal connector. [How] This patch calls drm_helper_move_panel_connectors_to_head() right before crtc creation to ensure internal connectors are at the top of the connector list. Tested by ensuring the internal panels are at the top of the connector list via modetest -c. This patch does to mediatek what the following patch https://www.spinics.net/lists/stable/msg590605.html did for qualcomm. Signed-off-by: Gil Dekel Tested-by: Gil Dekel Reviewed-by: Sean Paul Reviewed-by: Chen-Yu Tsai Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_drm_drv.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6c57e74e6e03211dddba55619bfb5ddc52cef89d Author: Thomas Gleixner Date: Sun Nov 13 21:33:57 2022 +0100 ata: ahci: Remove linux/msi.h include Nothing in this file needs anything from linux/msi.h Signed-off-by: Thomas Gleixner Cc: Damien Le Moal Cc: linux-ide@vger.kernel.org Signed-off-by: Damien Le Moal drivers/ata/ahci.c | 1 - 1 file changed, 1 deletion(-) commit ff446c0f6290185cefafe3b376bb86063a3a9f6a Author: Xinlei Lee Date: Wed Nov 9 18:00:59 2022 +0800 drm/mediatek: Modify dpi power on/off sequence. Modify dpi power on/off sequence so that the first gpio operation will take effect. Fixes: 6bd4763fd532 ("drm/mediatek: set dpi pin mode to gpio low to avoid leakage current") Signed-off-by: Xinlei Lee Signed-off-by: Chun-Kuang Hu drivers/gpu/drm/mediatek/mtk_dpi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3a0c95b61385f583424f44e79c15f1bdf050776d Author: Akhil R Date: Thu Nov 10 22:47:48 2022 +0530 dmaengine: tegra: Add support for dma-channel-mask Add support for dma-channel-mask so that only the specified channels are used. This helps to reserve some channels for the firmware. This was initially achieved by limiting the channel number to 31 in the driver and adjusting the register address to skip channel0 which was reserved for a firmware. This is wrong and does not align with the hardware. Now, with this change, the driver can align more to the actual hardware which has 32 channels. But this implies that there will be a break in the ABI and the device tree need to be updated along with this change for the driver to pickup the right interrupt corresponding to the channel Reviewed-by: Jon Hunter Link: https://lore.kernel.org/all/Y2EFoG1H9YpfxRjs@orome/ Signed-off-by: Akhil R Link: https://lore.kernel.org/r/20221110171748.40304-4-akhilrajeev@nvidia.com Signed-off-by: Vinod Koul drivers/dma/tegra186-gpc-dma.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) commit d57b2a65cde743a490a848236641fe9aa5536a9b Author: Akhil R Date: Thu Nov 10 22:47:46 2022 +0530 dt-bindings: dmaengine: Add dma-channel-mask to Tegra GPCDMA Add dma-channel-mask property in Tegra GPCDMA document. The property would help to specify the channels to be used in kernel and reserve few for the firmware. This was previously achieved by limiting the channel number to 31 in the driver. This is wrong and does not align with the hardware. Correct this and set the max interrupts to 32. Signed-off-by: Akhil R Acked-by: Thierry Reding Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221110171748.40304-2-akhilrajeev@nvidia.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 444eef7d5695393f214d83180f3e4bb99621cd07 Author: Thomas Gleixner Date: Sun Nov 13 21:34:02 2022 +0100 dmaengine: idxd: Remove linux/msi.h include Nothing in this file needs anything from linux/msi.h Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Dave Jiang Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Link: https://lore.kernel.org/r/20221113202428.573536003@linutronix.de Signed-off-by: Vinod Koul drivers/dma/idxd/device.c | 1 - 1 file changed, 1 deletion(-) commit 22c354cf3fec6aa52cf2df6685b33ce5f265edf8 Author: Konrad Dybcio Date: Wed Nov 9 12:12:27 2022 +0100 dt-bindings: dmaengine: qcom: gpi: add compatible for SM6375 Document the compatible for GPI DMA controller on SM6375 SoC. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221109111236.46003-3-konrad.dybcio@linaro.org Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 + 1 file changed, 1 insertion(+) commit dc901d98b1fe6e52ab81cd3e0879379168e06daa Author: Fenghua Yu Date: Thu Nov 10 17:27:15 2022 -0800 dmaengine: idxd: Fix crc_val field for completion record The crc_val in the completion record should be 64 bits and not 32 bits. Fixes: 4ac823e9cd85 ("dmaengine: idxd: fix delta_rec and crc size field for completion record") Reported-by: Nirav N Shah Signed-off-by: Fenghua Yu Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20221111012715.2031481-1-fenghua.yu@intel.com Signed-off-by: Vinod Koul include/uapi/linux/idxd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e40df4281b86d5f7c1615dd9eda597675340a8d3 Author: Christian Brauner Date: Sat Nov 12 22:36:42 2022 +0100 orangefs: fix mode handling In 4053d2500beb ("orangefs: rework posix acl handling when creating new filesystem objects") we tried to precalculate the correct mode when creating a new inode. However, this leads to regressions when creating new filesystem objects. Even if we precalculate the mode we still need to call __orangefs_setattr() to perform additional checks and we also need to update the mode of ACL_TYPE_ACCESS acls set on the inode. The patch referenced above regressed that. Restore that part of the old behavior and remove the mode precalculation as it doesn't get us anything anymore. Fixes: 4053d2500beb ("orangefs: rework posix acl handling when creating new filesystem objects") Reported-by: Mike Marshall Signed-off-by: Christian Brauner (Microsoft) fs/orangefs/inode.c | 11 ++++++++++- fs/orangefs/orangefs-kernel.h | 1 - fs/orangefs/orangefs-utils.c | 10 ++-------- 3 files changed, 12 insertions(+), 10 deletions(-) commit 9cb37357dfce1b596041ad68a20407c8b4e76635 Author: Zhen Lei Date: Wed Nov 2 16:49:18 2022 +0800 livepatch: Use kallsyms_on_each_match_symbol() to improve performance Based on the test results of kallsyms_on_each_match_symbol() and kallsyms_on_each_symbol(), the average performance can be improved by more than 1500 times. Signed-off-by: Zhen Lei Signed-off-by: Luis Chamberlain kernel/livepatch/core.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 4dc533e0f2c04174e1ae4aa98e7cffc1c04b9998 Author: Zhen Lei Date: Wed Nov 2 16:49:17 2022 +0800 kallsyms: Add helper kallsyms_on_each_match_symbol() Function kallsyms_on_each_symbol() traverses all symbols and submits each symbol to the hook 'fn' for judgment and processing. For some cases, the hook actually only handles the matched symbol, such as livepatch. Because all symbols are currently sorted by name, all the symbols with the same name are clustered together. Function kallsyms_lookup_names() gets the start and end positions of the set corresponding to the specified name. So we can easily and quickly traverse all the matches. The test results are as follows (twice): (x86) kallsyms_on_each_match_symbol: 7454, 7984 kallsyms_on_each_symbol : 11733809, 11785803 kallsyms_on_each_match_symbol() consumes only 0.066% of kallsyms_on_each_symbol()'s time. In other words, 1523x better performance. Signed-off-by: Zhen Lei Signed-off-by: Luis Chamberlain include/linux/kallsyms.h | 8 ++++++++ kernel/kallsyms.c | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) commit 19bd8981dc2ee35fdc81ab1b0104b607c917d470 Author: Zhen Lei Date: Wed Nov 2 16:49:16 2022 +0800 kallsyms: Reduce the memory occupied by kallsyms_seqs_of_names[] kallsyms_seqs_of_names[] records the symbol index sorted by address, the maximum value in kallsyms_seqs_of_names[] is the number of symbols. And 2^24 = 16777216, which means that three bytes are enough to store the index. This can help us save (1 * kallsyms_num_syms) bytes of memory. Signed-off-by: Zhen Lei Signed-off-by: Luis Chamberlain kernel/kallsyms.c | 18 ++++++++++++++---- kernel/kallsyms_internal.h | 2 +- scripts/kallsyms.c | 5 ++++- 3 files changed, 19 insertions(+), 6 deletions(-) commit 010a0aad39fccceba4a07d30d163158a39c704f3 Author: Zhen Lei Date: Wed Nov 2 16:49:15 2022 +0800 kallsyms: Correctly sequence symbols when CONFIG_LTO_CLANG=y LLVM appends various suffixes for local functions and variables, suffixes observed: - foo.llvm.[0-9a-f]+ - foo.[0-9a-f]+ Therefore, when CONFIG_LTO_CLANG=y, kallsyms_lookup_name() needs to truncate the suffix of the symbol name before comparing the local function or variable name. Old implementation code: - if (strcmp(namebuf, name) == 0) - return kallsyms_sym_address(i); - if (cleanup_symbol_name(namebuf) && strcmp(namebuf, name) == 0) - return kallsyms_sym_address(i); The preceding process is traversed by address from low to high. That is, for those with the same name after the suffix is removed, the one with the smallest address is returned first. Therefore, when sorting in the tool, if the raw names are the same, they should be sorted by address in ascending order. ASCII[.] = 2e ASCII[0-9] = 30,39 ASCII[A-Z] = 41,5a ASCII[_] = 5f ASCII[a-z] = 61,7a According to the preceding ASCII code values, the following sorting result is strictly followed. --------------------------------- | main-key | sub-key | |---------------------------------| | | addr_lowest | | | ... | | . | ... | | | addr_highest | |---------------------------------| | ? | | //? is [_A-Za-z0-9] --------------------------------- Signed-off-by: Zhen Lei Signed-off-by: Luis Chamberlain scripts/kallsyms.c | 36 ++++++++++++++++++++++++++++++++++-- scripts/link-vmlinux.sh | 4 ++++ 2 files changed, 38 insertions(+), 2 deletions(-) commit 60443c88f3a89fd303a9e8c0e84895910675c316 Author: Zhen Lei Date: Wed Nov 2 16:49:14 2022 +0800 kallsyms: Improve the performance of kallsyms_lookup_name() Currently, to search for a symbol, we need to expand the symbols in 'kallsyms_names' one by one, and then use the expanded string for comparison. It's O(n). If we sort names in ascending order like addresses, we can also use binary search. It's O(log(n)). In order not to change the implementation of "/proc/kallsyms", the table kallsyms_names[] is still stored in a one-to-one correspondence with the address in ascending order. Add array kallsyms_seqs_of_names[], it's indexed by the sequence number of the sorted names, and the corresponding content is the sequence number of the sorted addresses. For example: Assume that the index of NameX in array kallsyms_seqs_of_names[] is 'i', the content of kallsyms_seqs_of_names[i] is 'k', then the corresponding address of NameX is kallsyms_addresses[k]. The offset in kallsyms_names[] is get_symbol_offset(k). Note that the memory usage will increase by (4 * kallsyms_num_syms) bytes, the next two patches will reduce (1 * kallsyms_num_syms) bytes and properly handle the case CONFIG_LTO_CLANG=y. Performance test results: (x86) Before: min=234, max=10364402, avg=5206926 min=267, max=11168517, avg=5207587 After: min=1016, max=90894, avg=7272 min=1014, max=93470, avg=7293 The average lookup performance of kallsyms_lookup_name() improved 715x. Signed-off-by: Zhen Lei Signed-off-by: Luis Chamberlain kernel/kallsyms.c | 86 ++++++++++++++++++++++++++++++++++++++++------ kernel/kallsyms_internal.h | 1 + scripts/kallsyms.c | 37 ++++++++++++++++++++ 3 files changed, 113 insertions(+), 11 deletions(-) commit fcdf7197cf23ef452c30f376d31d73bdf7946de8 Author: Zhen Lei Date: Wed Nov 2 16:49:13 2022 +0800 scripts/kallsyms: rename build_initial_tok_table() Except for the function build_initial_tok_table(), no token abbreviation is used elsewhere. $ cat scripts/kallsyms.c | grep tok | wc -l 33 $ cat scripts/kallsyms.c | grep token | wc -l 31 Here, it would be clearer to use the full name. Signed-off-by: Zhen Lei Reviewed-by: Petr Mladek Signed-off-by: Luis Chamberlain scripts/kallsyms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e826192cc26bd69746bbf22e6bdf72b87cb3d97b Author: Arminder Singh Date: Sat Nov 5 07:56:49 2022 -0400 i2c: /pasemi: PASemi I2C controller IRQ enablement This patch adds IRQ support to the PASemi I2C controller driver to increase the performace of I2C transactions on platforms with PASemi I2C controllers. While primarily intended for Apple silicon platforms, this patch should also help in enabling IRQ support for older PASemi hardware as well should the need arise. This version of the patch has been tested on an M1 Ultra Mac Studio, as well as an M1 MacBook Pro, and userspace launches successfully while using the IRQ path for I2C transactions. Signed-off-by: Arminder Singh Reviewed-by: Sven Peter Reviewed-by: Hector Martin Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-pasemi-core.c | 32 +++++++++++++++++++++++++++----- drivers/i2c/busses/i2c-pasemi-core.h | 5 +++++ drivers/i2c/busses/i2c-pasemi-platform.c | 6 ++++++ 3 files changed, 38 insertions(+), 5 deletions(-) commit 8502bee5584235943c4d371597c740d6779991db Author: Minghao Chi Date: Thu Nov 10 17:23:42 2022 +0800 i2c: imx: 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. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Reviewed-by: Mukesh Ojha Reviewed-by: Uwe Kleine-König Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 658015167a8432b88f5d032e9d85d8fd50e5bf2c Author: Dan Carpenter Date: Sat Oct 15 11:28:55 2022 +0300 fs/ntfs3: Delete duplicate condition in ntfs_read_mft() There were two patches which addressed the same bug and added the same condition: commit 6db620863f85 ("fs/ntfs3: Validate data run offset") commit 887bfc546097 ("fs/ntfs3: Fix slab-out-of-bounds read in run_unpack") Delete one condition. Signed-off-by: Dan Carpenter Signed-off-by: Konstantin Komarov fs/ntfs3/inode.c | 6 ------ 1 file changed, 6 deletions(-) commit d49436c34448e01eb6ab85413af87de73c99494d Author: Daniel Pinto Date: Mon Oct 10 12:46:12 2022 +0100 fs/ntfs3: Document system.ntfs_attrib_be extended attribute Add documentation for system.ntfs_attrib_be extended attribute. Signed-off-by: Daniel Pinto Signed-off-by: Konstantin Komarov Documentation/filesystems/ntfs3.rst | 5 +++++ 1 file changed, 5 insertions(+) commit 0d19f3d71394b0b03b8775c958b3354fa2259609 Author: Daniel Pinto Date: Mon Oct 10 12:44:27 2022 +0100 fs/ntfs3: Add system.ntfs_attrib_be extended attribute NTFS-3G provides the system.ntfs_attrib_be extended attribute, which has the same value as system.ntfs_attrib but represented in big-endian. Some utilities rely on the existence of this extended attribute. Improves compatibility with NTFS-3G by adding the system.ntfs_attrib_be extended attribute. Signed-off-by: Daniel Pinto Signed-off-by: Konstantin Komarov fs/ntfs3/xattr.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit dc0fcc99b1756c3c703326aa0015ed73fc4e9a73 Author: Daniel Pinto Date: Mon Oct 10 12:37:13 2022 +0100 fs/ntfs3: Rename hidedotfiles mount option to hide_dot_files The hidedotfiles mount option provides the same functionality as the NTFS-3G hide_dot_files mount option. As such, it should be named the same for compatibility with NTGS-3G. Rename the hidedotfiles to hide_dot_files for compatbility with NTFS-3G. Signed-off-by: Daniel Pinto Signed-off-by: Konstantin Komarov Documentation/filesystems/ntfs3.rst | 2 +- fs/ntfs3/frecord.c | 2 +- fs/ntfs3/inode.c | 2 +- fs/ntfs3/super.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit 60adc860ca7d7a95d5befd2d3c3e644d23706b2c Author: Daniel Pinto Date: Mon Oct 10 12:35:46 2022 +0100 fs/ntfs3: Document the hidedotfiles mount option Add documentation for the hidedotfiles mount option. Signed-off-by: Daniel Pinto Signed-off-by: Konstantin Komarov Documentation/filesystems/ntfs3.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit 19b424501d8588a3111e50fa3d7d926594e78449 Author: Daniel Pinto Date: Mon Oct 10 12:34:06 2022 +0100 fs/ntfs3: Add hidedotfiles to the list of enabled mount options Currently, the ntfs3 driver does return the hidedotfiles mount option in the list of enabled mount options. This can confuse users who may doubt they enabled the option when not seeing in the list provided by the mount command. Add hidedotfiles mount option to the list of enabled options provided by the mount command when it is enabled. Signed-off-by: Daniel Pinto Signed-off-by: Konstantin Komarov fs/ntfs3/super.c | 2 ++ 1 file changed, 2 insertions(+) commit 66223324cba4290ba45c612fe1e31a265636ad2d Author: Daniel Pinto Date: Mon Oct 10 12:32:12 2022 +0100 fs/ntfs3: Make hidedotfiles mount option work when renaming files Currently, the hidedotfiles mount option only has an effect when creating new files. Removing or adding the starting dot when moving or renaming files does not update the hidden attribute. Make hidedotfiles also set or uset the hidden attribute when a file gains or loses its starting dot by being moved or renamed. Signed-off-by: Daniel Pinto Signed-off-by: Konstantin Komarov fs/ntfs3/frecord.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4c9ba192c73f52dc1d549fcfeb109b725fea8950 Author: Daniel Pinto Date: Mon Oct 10 12:30:15 2022 +0100 fs/ntfs3: Fix hidedotfiles mount option by reversing behaviour Currently, the hidedotfiles mount option is behaving in the reverse way of what would be expected: enabling it disables setting the hidden attribute on files or directories with names starting with a dot and disabling it enables the setting. Reverse the behaviour of the hidedotfiles mount option so it matches what is expected. Signed-off-by: Daniel Pinto Signed-off-by: Konstantin Komarov fs/ntfs3/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d683c67c5f50802b9b14ea29d89d66a25327e965 Author: Daniel Pinto Date: Mon Oct 10 12:16:29 2022 +0100 fs/ntfs3: Document windows_names mount option Add documentation for windows_names mount option. Signed-off-by: Daniel Pinto Signed-off-by: Konstantin Komarov Documentation/filesystems/ntfs3.rst | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1d07a9dfa19914ad27bdb9ec9ac0baa2329b2ae3 Author: Daniel Pinto Date: Mon Oct 10 12:14:31 2022 +0100 fs/ntfs3: Add windows_names mount option When enabled, the windows_names mount option prevents the creation of files or directories with names not allowed by Windows. Use the same option name as NTFS-3G for compatibility. Signed-off-by: Daniel Pinto Signed-off-by: Konstantin Komarov fs/ntfs3/frecord.c | 7 +++- fs/ntfs3/fsntfs.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ntfs3/inode.c | 7 ++++ fs/ntfs3/ntfs_fs.h | 2 ++ fs/ntfs3/super.c | 7 ++++ 5 files changed, 126 insertions(+), 1 deletion(-) commit 75b5e47201329537c8b88531a59aab2cbcec8d61 Author: Nathan Chancellor Date: Tue Oct 4 16:23:59 2022 -0700 fs/ntfs3: Eliminate unnecessary ternary operator in ntfs_d_compare() 'a == b ? 0 : 1' is logically equivalent to 'a != b'. Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Konstantin Komarov fs/ntfs3/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 019d22eb0eb707fc099e6e8fad9b3933236a06d0 Author: Abdun Nihaal Date: Tue Oct 4 08:45:02 2022 +0530 fs/ntfs3: Validate attribute data and valid sizes The data_size and valid_size fields of non resident attributes should be less than the its alloc_size field, but this is not checked in ntfs_read_mft function. Syzbot reports a allocation order warning due to a large unchecked value of data_size getting assigned to inode->i_size which is then passed to kcalloc. Add sanity check for ensuring that the data_size and valid_size fields are not larger than alloc_size field. Link: https://syzkaller.appspot.com/bug?extid=fa4648a5446460b7b963 Reported-and-tested-by: syzbot+fa4648a5446460b7b963@syzkaller.appspotmail.com Fixes: (82cae269cfa95) fs/ntfs3: Add initialization of super block Signed-off-by: Abdun Nihaal Signed-off-by: Konstantin Komarov fs/ntfs3/inode.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 59bfd7a483da36bd202532a3d9ea1f14f3bf3aaf Author: Tetsuo Handa Date: Sun Oct 2 23:54:11 2022 +0900 fs/ntfs3: Use __GFP_NOWARN allocation at ntfs_fill_super() syzbot is reporting too large allocation at ntfs_fill_super() [1], for a crafted filesystem can contain bogus inode->i_size. Add __GFP_NOWARN in order to avoid too large allocation warning, than exhausting memory by using kvmalloc(). Link: https://syzkaller.appspot.com/bug?extid=33f3faaa0c08744f7d40 [1] Reported-by: syzot Signed-off-by: Tetsuo Handa Signed-off-by: Konstantin Komarov fs/ntfs3/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d0f659bf713662fabed973f9996b8f23c59ca51 Author: Tetsuo Handa Date: Sun Oct 2 23:39:15 2022 +0900 fs/ntfs3: Use __GFP_NOWARN allocation at wnd_init() syzbot is reporting too large allocation at wnd_init() [1], for a crafted filesystem can become wnd->nwnd close to UINT_MAX. Add __GFP_NOWARN in order to avoid too large allocation warning, than exhausting memory by using kvcalloc(). Link: https://syzkaller.appspot.com/bug?extid=fa4648a5446460b7b963 [1] Reported-by: syzot Signed-off-by: Tetsuo Handa Signed-off-by: Konstantin Komarov fs/ntfs3/bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 557d19675a470bb0a98beccec38c5dc3735c20fa Author: Abdun Nihaal Date: Sat Oct 1 12:30:24 2022 +0530 fs/ntfs3: Fix slab-out-of-bounds read in ntfs_trim_fs Syzbot reports an out of bound access in ntfs_trim_fs. The cause of this is using a loop termination condition that compares window index (iw) with wnd->nbits instead of wnd->nwnd, due to which the index used for wnd->free_bits exceeds the size of the array allocated. Fix the loop condition. Fixes: 3f3b442b5ad2 ("fs/ntfs3: Add bitmap") Link: https://syzkaller.appspot.com/bug?extid=b892240eac461e488d51 Reported-by: syzbot+b892240eac461e488d51@syzkaller.appspotmail.com Signed-off-by: Abdun Nihaal Signed-off-by: Konstantin Komarov fs/ntfs3/bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfcdbae0523bd95eb75a739ffb6221a37109881e Author: Edward Lo Date: Fri Sep 30 09:58:40 2022 +0800 fs/ntfs3: Validate index root when initialize NTFS security This enhances the sanity check for $SDH and $SII while initializing NTFS security, guarantees these index root are legit. [ 162.459513] BUG: KASAN: use-after-free in hdr_find_e.isra.0+0x10c/0x320 [ 162.460176] Read of size 2 at addr ffff8880037bca99 by task mount/243 [ 162.460851] [ 162.461252] CPU: 0 PID: 243 Comm: mount Not tainted 6.0.0-rc7 #42 [ 162.461744] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 162.462609] Call Trace: [ 162.462954] [ 162.463276] dump_stack_lvl+0x49/0x63 [ 162.463822] print_report.cold+0xf5/0x689 [ 162.464608] ? unwind_get_return_address+0x3a/0x60 [ 162.465766] ? hdr_find_e.isra.0+0x10c/0x320 [ 162.466975] kasan_report+0xa7/0x130 [ 162.467506] ? _raw_spin_lock_irq+0xc0/0xf0 [ 162.467998] ? hdr_find_e.isra.0+0x10c/0x320 [ 162.468536] __asan_load2+0x68/0x90 [ 162.468923] hdr_find_e.isra.0+0x10c/0x320 [ 162.469282] ? cmp_uints+0xe0/0xe0 [ 162.469557] ? cmp_sdh+0x90/0x90 [ 162.469864] ? ni_find_attr+0x214/0x300 [ 162.470217] ? ni_load_mi+0x80/0x80 [ 162.470479] ? entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 162.470931] ? ntfs_bread_run+0x190/0x190 [ 162.471307] ? indx_get_root+0xe4/0x190 [ 162.471556] ? indx_get_root+0x140/0x190 [ 162.471833] ? indx_init+0x1e0/0x1e0 [ 162.472069] ? fnd_clear+0x115/0x140 [ 162.472363] ? _raw_spin_lock_irqsave+0x100/0x100 [ 162.472731] indx_find+0x184/0x470 [ 162.473461] ? sysvec_apic_timer_interrupt+0x57/0xc0 [ 162.474429] ? indx_find_buffer+0x2d0/0x2d0 [ 162.474704] ? do_syscall_64+0x3b/0x90 [ 162.474962] dir_search_u+0x196/0x2f0 [ 162.475381] ? ntfs_nls_to_utf16+0x450/0x450 [ 162.475661] ? ntfs_security_init+0x3d6/0x440 [ 162.475906] ? is_sd_valid+0x180/0x180 [ 162.476191] ntfs_extend_init+0x13f/0x2c0 [ 162.476496] ? ntfs_fix_post_read+0x130/0x130 [ 162.476861] ? iput.part.0+0x286/0x320 [ 162.477325] ntfs_fill_super+0x11e0/0x1b50 [ 162.477709] ? put_ntfs+0x1d0/0x1d0 [ 162.477970] ? vsprintf+0x20/0x20 [ 162.478258] ? set_blocksize+0x95/0x150 [ 162.478538] get_tree_bdev+0x232/0x370 [ 162.478789] ? put_ntfs+0x1d0/0x1d0 [ 162.479038] ntfs_fs_get_tree+0x15/0x20 [ 162.479374] vfs_get_tree+0x4c/0x130 [ 162.479729] path_mount+0x654/0xfe0 [ 162.480124] ? putname+0x80/0xa0 [ 162.480484] ? finish_automount+0x2e0/0x2e0 [ 162.480894] ? putname+0x80/0xa0 [ 162.481467] ? kmem_cache_free+0x1c4/0x440 [ 162.482280] ? putname+0x80/0xa0 [ 162.482714] do_mount+0xd6/0xf0 [ 162.483264] ? path_mount+0xfe0/0xfe0 [ 162.484782] ? __kasan_check_write+0x14/0x20 [ 162.485593] __x64_sys_mount+0xca/0x110 [ 162.486024] do_syscall_64+0x3b/0x90 [ 162.486543] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 162.487141] RIP: 0033:0x7f9d374e948a [ 162.488324] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008 [ 162.489728] RSP: 002b:00007ffe30e73d18 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 [ 162.490971] RAX: ffffffffffffffda RBX: 0000561cdb43a060 RCX: 00007f9d374e948a [ 162.491669] RDX: 0000561cdb43a260 RSI: 0000561cdb43a2e0 RDI: 0000561cdb442af0 [ 162.492050] RBP: 0000000000000000 R08: 0000561cdb43a280 R09: 0000000000000020 [ 162.492459] R10: 00000000c0ed0000 R11: 0000000000000206 R12: 0000561cdb442af0 [ 162.493183] R13: 0000561cdb43a260 R14: 0000000000000000 R15: 00000000ffffffff [ 162.493644] [ 162.493908] [ 162.494214] The buggy address belongs to the physical page: [ 162.494761] page:000000003e38a3d5 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x37bc [ 162.496064] flags: 0xfffffc0000000(node=0|zone=1|lastcpupid=0x1fffff) [ 162.497278] raw: 000fffffc0000000 ffffea00000df1c8 ffffea00000df008 0000000000000000 [ 162.498928] raw: 0000000000000000 0000000000240000 00000000ffffffff 0000000000000000 [ 162.500542] page dumped because: kasan: bad access detected [ 162.501057] [ 162.501242] Memory state around the buggy address: [ 162.502230] ffff8880037bc980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 162.502977] ffff8880037bca00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 162.503522] >ffff8880037bca80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 162.503963] ^ [ 162.504370] ffff8880037bcb00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 162.504766] ffff8880037bcb80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff Signed-off-by: Edward Lo Signed-off-by: Konstantin Komarov fs/ntfs3/fsntfs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c57351a75d013c30e4a726aef1ad441676a99da4 Author: Gavin Shan Date: Sat Nov 12 17:43:22 2022 +0800 KVM: Push dirty information unconditionally to backup bitmap In mark_page_dirty_in_slot(), we bail out when no running vcpu exists and a running vcpu context is strictly required by architecture. It may cause backwards compatible issue. Currently, saving vgic/its tables is the only known case where no running vcpu context is expected. We may have other unknown cases where no running vcpu context exists and it's reported by the warning message and we bail out without pushing the dirty information to the backup bitmap. For this, the application is going to enable the backup bitmap for the unknown cases. However, the dirty information can't be pushed to the backup bitmap even though the backup bitmap is enabled for those unknown cases in the application, until the unknown cases are added to the allowed list of non-running vcpu context with extra code changes to the host kernel. In order to make the new application, where the backup bitmap has been enabled, to work with the unchanged host, we continue to push the dirty information to the backup bitmap instead of bailing out early. With the added check on 'memslot->dirty_bitmap' to mark_page_dirty_in_slot(), the kernel crash is avoided silently by the combined conditions: no running vcpu context, kvm_arch_allow_write_without_running_vcpu() returns 'true', and the backup bitmap (KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP) isn't enabled yet. Suggested-by: Sean Christopherson Signed-off-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221112094322.21911-1-gshan@redhat.com virt/kvm/kvm_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e07c4924a77dbf21bf1973411149784cfa5d3b27 Author: Saeed Mahameed Date: Wed Oct 26 11:26:31 2022 +0100 net/mlx5e: ethtool: get_link_ext_stats for PHY down events Implement ethtool_op get_link_ext_stats for PHY down events Signed-off-by: Saeed Mahameed Reviewed-by: Gal Pressman drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 17 +++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 2 ++ 3 files changed, 20 insertions(+) commit 05bb74c29d84dc6d26f57f5ed3970ab8aeb13551 Author: Oz Shlomo Date: Mon Oct 31 09:00:30 2022 +0000 net/mlx5e: CT, optimize pre_ct table lookup The pre_ct table realizes in hardware the act_ct cache logic, bypassing the CT table if the ct state was already set by a previous ct lookup. As such, the pre_ct table will always miss for chain 0 filters. Optimize the pre_ct table lookup for rules installed on chain 0. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 89 ++++++++++++++-------- 1 file changed, 56 insertions(+), 33 deletions(-) commit 341361533011945f0a7da85632662a5879233853 Author: Tariq Toukan Date: Wed Sep 14 10:35:04 2022 +0300 net/mlx5e: kTLS, Use a single async context object per a callback bulk A single async context object is sufficient to wait for the completions of many callbacks. Switch to using one instance per a bulk of commands. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 50 +++++++++++----------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 4d78a2ebbd2b40b4c14440b7417fc473120e15d6 Author: Tariq Toukan Date: Mon Sep 12 21:43:18 2022 +0300 net/mlx5e: kTLS, Remove unnecessary per-callback completion Waiting on a completion object for each callback before cleaning up their async contexts is not necessary, as this is already implied in the mlx5_cmd_cleanup_async_ctx() API. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 1f74399fd1edea2eefd8d340f5d1f7c5f5edec66 Author: Tariq Toukan Date: Wed Sep 14 11:02:34 2022 +0300 net/mlx5e: kTLS, Remove unused work field Work field in struct mlx5e_async_ctx is not used. Remove it. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 1 - 1 file changed, 1 deletion(-) commit 989722906166173c703c1d73a26a0167fdad4136 Author: Roi Dayan Date: Wed Sep 21 09:17:15 2022 +0300 net/mlx5e: TC, Remove redundant WARN_ON() The case where the packet is not offloaded and needs to be restored to slow path and couldn't find expected tunnel information should not dump a call trace to the user. there is a debug call. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c | 1 - 1 file changed, 1 deletion(-) commit e74ae1faeb71a0c264102a0aad66d65e5152a568 Author: Guy Truzman Date: Thu Sep 29 15:12:51 2022 +0300 net/mlx5e: Add error flow when failing update_rx Up until now, return value of update_rx was ignored. Therefore, flow continues even if it fails. Add error flow in case of update_rx fails in mlx5e_open_locked, mlx5i_open and mlx5i_pkey_open. Signed-off-by: Guy Truzman Reviewed-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 ++++++- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 7 ++++++- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 6 +++++- 3 files changed, 17 insertions(+), 3 deletions(-) commit 38438d39a9a001df8926f1b2b3087764dbbdc1aa Author: Tariq Toukan Date: Wed May 18 11:46:35 2022 +0300 net/mlx5e: Move params kernel log print to probe function Params info print was meant to be printed on load. With time, new calls to mlx5e_init_rq_type_params and mlx5e_build_rq_params were added, mistakenly printing the params once again. Move the print to were it belongs, in mlx5e_probe. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 10 ---------- drivers/net/ethernet/mellanox/mlx5/core/en/params.h | 14 ++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 + 3 files changed, 15 insertions(+), 10 deletions(-) commit 2c925db0a7d69b404d6bfe4c037935c2d367913d Author: Ofer Levi Date: Tue Feb 9 17:48:11 2021 +0200 net/mlx5e: Support enhanced CQE compression CQE compression feature improves performance by reducing PCI bandwidth bottleneck on CQEs write. Enhanced CQE compression introduced in ConnectX-6 and it aims to reduce CPU utilization of SW side packets decompression by eliminating the need to rewrite ownership bit, which is likely to cost a cache-miss, is replaced by validity byte handled solely by HW. Another advantage of the enhanced feature is that session packets are available to SW as soon as a single CQE slot is filled, instead of waiting for session to close, this improves packet latency from NIC to host. Performance: Following are tested scenarios and reults comparing basic and enahnced CQE compression. setup: IXIA 100GbE connected directly to port 0 and port 1 of ConnectX-6 Dx 100GbE dual port. Case #1 RX only, single flow goes to single queue: IRQ rate reduced by ~ 30%, CPU utilization improved by 2%. Case #2 IP forwarding from port 1 to port 0 single flow goes to single queue: Avg latency improved from 60us to 21us, frame loss improved from 0.5% to 0.0%. Case #3 IP forwarding from port 1 to port 0 Max Throughput IXIA sends 100%, 8192 UDP flows, goes to 24 queues: Enhanced is equal or slightly better than basic. Testing the basic compression feature with this patch shows there is no perfrormance degradation of the basic compression feature. Signed-off-by: Ofer Levi Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 + .../net/ethernet/mellanox/mlx5/core/en/params.c | 10 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 ++ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 150 ++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/wq.h | 17 +++ include/linux/mlx5/device.h | 6 + 6 files changed, 170 insertions(+), 23 deletions(-) commit 9458108040b3c0980a02308ddf30568b9823349c Author: Gal Pressman Date: Sun Sep 4 13:29:26 2022 +0300 net/mlx5e: Use clamp operation instead of open coding it Replace the min/max operations with a single clamp. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 60551e95a864f2ba82b98defcf85306599341918 Author: Anisse Astier Date: Mon Oct 31 17:56:04 2022 +0100 net/mlx5e: remove unused list in arfs This is never used, and probably something that was intended to be used before per-protocol hash tables were chosen instead. Signed-off-by: Anisse Astier Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 2 -- 1 file changed, 2 deletions(-) commit dd3dd7263cdeac601d0ecc5f04d87eee0a8277aa Author: Eli Cohen Date: Wed Sep 21 13:33:29 2022 +0300 net/mlx5: Expose vhca_id to debugfs hca_id is an identifier of an mlx5_core instance within the hardware. This identifier may be required for troubleshooting. Expose it to debugfs. Example: $ cat /sys/kernel/debug/mlx5/mlx5_core.sf.2/vhca_id 0x12 Signed-off-by: Eli Cohen Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 71b75f0e02ed160ccbb4fe609036abe83aa32054 Author: Moshe Shemesh Date: Mon Aug 8 20:02:59 2022 +0300 net/mlx5: Unregister traps on driver unload flow Before this patch, devlink traps are registered only on full driver probe and unregistered on driver removal. As devlink traps are not usable once driver functionality is unloaded, it should be unrgeistered also on flows that unload the driver and then registered when loaded back, e.g. devlink reload flow. Signed-off-by: Moshe Shemesh Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 11 ++--------- drivers/net/ethernet/mellanox/mlx5/core/devlink.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 ++++++++ 3 files changed, 12 insertions(+), 9 deletions(-) commit d23b928befda3524f12d8da29921ea066d72bde7 Author: Colin Ian King Date: Mon Oct 31 08:01:04 2022 +0000 net/mlx5: Fix spelling mistake "destoy" -> "destroy" There is a spelling mistake in an error message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea645f97bcec90a818dc6915d84cd0f752d9ccfd Author: Roi Dayan Date: Thu Oct 27 11:35:12 2022 +0300 net/mlx5: Bridge, Use debug instead of warn if entry doesn't exists There is no need for the warn if entry already removed. Use debug print like in the update flow. Also update the messages so user can identify if the it's from the update flow or remove flow. Signed-off-by: Roi Dayan Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3b4c7bc01727e3a465759236eeac03d0dd686da3 Author: Christian Brauner Date: Fri Nov 4 13:52:42 2022 +0100 xattr: use rbtree for simple_xattrs A while ago Vasily reported that it is possible to set a large number of xattrs on inodes of filesystems that make use of the simple xattr infrastructure. This includes all kernfs-based filesystems that support xattrs (e.g., cgroupfs and tmpfs). Both cgroupfs and tmpfs can be mounted by unprivileged users in unprivileged containers and root in an unprivileged container can set an unrestricted number of security.* xattrs and privileged users can also set unlimited trusted.* xattrs. As there are apparently users that have a fairly large number of xattrs we should scale a bit better. Other xattrs such as user.* are restricted for kernfs-based instances to a fairly limited number. Using a simple linked list protected by a spinlock used for set, get, and list operations doesn't scale well if users use a lot of xattrs even if it's not a crazy number. There's no need to bring in the big guns like rhashtables or rw semaphores for this. An rbtree with a rwlock, or limited rcu semanics and seqlock is enough. It scales within the constraints we are working in. By far the most common operation is getting an xattr. Setting xattrs should be a moderately rare operation. And listxattr() often only happens when copying xattrs between files or together with the contents to a new file. Holding a lock across listxattr() is unproblematic because it doesn't list the values of xattrs. It can only be used to list the names of all xattrs set on a file. And the number of xattr names that can be listed with listxattr() is limited to XATTR_LIST_MAX aka 65536 bytes. If a larger buffer is passed then vfs_listxattr() caps it to XATTR_LIST_MAX and if more xattr names are found it will return -E2BIG. In short, the maximum amount of memory that can be retrieved via listxattr() is limited. Of course, the API is broken as documented on xattr(7) already. In the future we might want to address this but for now this is the world we live in and have lived for a long time. But it does indeed mean that once an application goes over XATTR_LIST_MAX limit of xattrs set on an inode it isn't possible to copy the file and include its xattrs in the copy unless the caller knows all xattrs or limits the copy of the xattrs to important ones it knows by name (At least for tmpfs, and kernfs-based filesystems. Other filesystems might provide ways of achieving this.). Bonus of this port to rbtree+rwlock is that we shrink the memory consumption for users of the simple xattr infrastructure. Also add proper kernel documentation to all the functions. A big thanks to Paul for his comments. Cc: Vasily Averin Cc: "Paul E. McKenney" Acked-by: Roman Gushchin Acked-by: Paul E. McKenney Signed-off-by: Christian Brauner (Microsoft) fs/xattr.c | 317 +++++++++++++++++++++++++++++++++++++++----------- include/linux/xattr.h | 38 ++---- mm/shmem.c | 2 +- 3 files changed, 260 insertions(+), 97 deletions(-) commit 4bae6da1cbf4658a92e6f58da30bf536746d1e5d Author: Jarkko Nikula Date: Mon Nov 7 15:42:48 2022 +0200 i2c: designware: Add comment to custom register value constants DW_IC_COMP_VERSION register contains the ASCII representation of the Synopsys component version. Here 0x3131312A == "111*" means version 1.11* required for DW_IC_SDA_HOLD register availability where '*' means any letter starting from 'a'. DW_IC_COMP_TYPE is constant and is derived from two ASCII letters "DW" followed by a 16-bit unsigned number. Suggested-by: Andy Shevchenko Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 966b7d3c738ab8d82363eff9e4c62e429697893e Author: Jarkko Nikula Date: Mon Nov 7 15:42:47 2022 +0200 i2c: designware: Align defines in i2c-designware-core.h Align all defines to the same column. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.h | 230 +++++++++++++++---------------- 1 file changed, 115 insertions(+), 115 deletions(-) commit fee61247b7f67a628bb24314b1a3a20d1f1c60f0 Author: Jarkko Nikula Date: Mon Nov 7 15:42:46 2022 +0200 i2c: designware: Remove common i2c_dw_disable_int() Commit 90312351fd1e ("i2c: designware: MASTER mode as separated driver") introduced disable_int pointer but there is no real use for it. Both i2c-designware-master.c and i2c-designware-slave.c set it to the same i2c_dw_disable_int() and scope is inside the same kernel module. Since i2c_dw_disable_int() is just masking interrupts and the direct DW_IC_INTR_MASK register write looks more clear in the code use that and remove it from common code. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-common.c | 5 ----- drivers/i2c/busses/i2c-designware-core.h | 3 --- drivers/i2c/busses/i2c-designware-master.c | 9 ++++----- drivers/i2c/busses/i2c-designware-slave.c | 3 +-- 4 files changed, 5 insertions(+), 15 deletions(-) commit a92c3388b4ce34ee83f8ea398c1e00676a3dc467 Author: Jarkko Nikula Date: Mon Nov 7 15:42:45 2022 +0200 i2c: designware: Simplify master interrupt handler nesting In my opinion a few lines of spurious interrupt detection code can be moved to the actual master interrupt handling function i2c_dw_isr() without hurting readability. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-master.c | 33 +++++++++++------------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit 184c475ace922e4029f157080be559d49d70009f Author: Jarkko Nikula Date: Mon Nov 7 15:42:44 2022 +0200 i2c: designware: Move debug print in i2c_dw_isr() It is kind of needless to print interrupt status when code immediately after that finds interrupt was not originating from this device. Therefore move it after spurious interrupt detection. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdbd2f169bf1aff9f679a3e07d62244fc4341968 Author: Jarkko Nikula Date: Mon Nov 7 15:42:43 2022 +0200 i2c: designware: Do not process interrupt when device is suspended Do not return with interrupt handled if host controller is off and thus interrupt is originating from other device or is spurious. Add a check to detect when controller is runtime suspended or transitioning/reset. In latter case all raw interrupt status register bits may read one. In both cases return IRQ_NONE to indicate interrupt was not from this device. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-master.c | 2 ++ 1 file changed, 2 insertions(+) commit 4c7107c2974270ff369342f6f1bd5d3669c182f1 Author: Jarkko Nikula Date: Mon Nov 7 15:42:42 2022 +0200 i2c: designware: Simplify slave interrupt handler nesting Interrupt processing code in i2c-designware-slave.c is bit more readable if not divided into another subroutine. Also explicit IRQ_NONE and IRQ_HANDLED return values are more obvious. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-slave.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 5cd69850308f7da3c2bfc117fca5fbfa3c530ade Author: Jarkko Nikula Date: Mon Nov 7 15:42:41 2022 +0200 i2c: designware: Remove unused completion code from i2c-designware-slave Remove unused completion code from i2c-designware-slave.c. Used only in i2c-designware-master.c. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-slave.c | 4 ---- 1 file changed, 4 deletions(-) commit 40015c67533548986eaba42a3d9ba9d004bee41e Author: Jarkko Nikula Date: Mon Nov 7 15:42:40 2022 +0200 i2c: designware: Remove needless initializations from i2c_dw_reg_slave() These struct dw_i2c_dev members are not used in i2c-designware-slave.c so remove re-initialization of them from i2c_dw_reg_slave(). Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-slave.c | 6 ------ 1 file changed, 6 deletions(-) commit 4d827824b7bb29ce944172f6297db6d7a1ec37b3 Author: Jarkko Nikula Date: Mon Nov 7 15:42:39 2022 +0200 i2c: designware: Define software status flags with BIT() Define software status flags with a BIT() macro. While at it remove STATUS_IDLE and replace its use with zero initialization and status flags clearing with a mask. Suggested-by: Andy Shevchenko Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.h | 10 +++++----- drivers/i2c/busses/i2c-designware-master.c | 4 ++-- drivers/i2c/busses/i2c-designware-slave.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit dcf1bf648f94d651a3e6fb433e9ba0a3e43c1047 Author: Jarkko Nikula Date: Mon Nov 7 15:42:38 2022 +0200 i2c: designware: Empty receive FIFO in slave interrupt handler Writes from I2C bus often fail when testing the i2c-designware-slave.c with the slave-eeprom backend. The same writes work correctly when testing with a real 24c02 EEPROM chip. In the tests below an i2c-designware-slave.c instance with the slave-eeprom backend is configured to act as a simulated 24c02 at address 0x65 on an I2C host bus 6. 1. i2cset -y 6 0x65 0x00 0x55 Single byte 0x55 write into address 0x00. No data goes into simulated EEPROM. Debug prints from the i2c_dw_irq_handler_slave(): 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x714 : INTR_STAT=0x204 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4 2. i2ctransfer -y 6 w9@0x65 0x00 0xff- Write 8 bytes with decrementing value starting from 0xff at address 0x00 and forward. Only some of the data goes into arbitrary addresses. Content is something like below but varies: 00000000 f9 f8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000050 00 00 00 00 00 00 ff fe 00 00 00 00 00 00 00 00 |................| 000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fb fa |................| In this case debug prints were: 0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x714 : INTR_STAT=0x204 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x510 : INTR_STAT=0x0 Both cases show there is more data coming from the receive FIFO still after detecting the STOP condition. This can be seen from interrupt status bits DW_IC_INTR_STOP_DET (0x200) and DW_IC_INTR_RX_FULL (0x4). Perhaps due interrupt latencies the receive FIFO is not read fast enough, STOP detection happens synchronously when it occurs on the I2C bus and the DW_IC_INTR_RX_FULL keeps coming as long as there are more bytes in the receive FIFO. Fix this by reading the receive FIFO completely empty whenever DW_IC_INTR_RX_FULL occurs. Use RFNE, Receive FIFO Not Empty bit in the DW_IC_STATUS register to loop through bytes in the FIFO. While at it do not test the return code from i2c_slave_event() for the I2C_SLAVE_WRITE_RECEIVED since to my understanding this hardware cannot generate NACK to incoming bytes and debug print itself does not have much value. Reported-by: Tian Ye Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.h | 1 + drivers/i2c/busses/i2c-designware-slave.c | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) commit c42edde5de3af6285fbb38c9d503a40ef491d10d Author: Jarkko Nikula Date: Mon Nov 7 15:42:37 2022 +0200 i2c: designware: Fix slave state machine for sequential reads Some read types from I2C bus don't work correctly when testing the i2c-designware-slave.c with the slave-eeprom backend. The same reads work correctly when testing with a real 24c02 EEPROM chip. In the following tests an i2c-designware-slave.c instance with the slave-eeprom backend is configured to act as a simulated 24c02 at address 0x65 on an I2C host bus 6: 1. i2cdump -y 6 0x65 b (OK) Random read. Each byte are read using a byte address write with a current address read in a same message. 2. i2cdump -y 6 0x65 c (OK, was NOK before commit 3b5f7f10ff6e when it was repeating the 1st byte) Repeated current address read. One byte address write message followed by repeated current address read messages. 3. i2cdump -y 6 0x65 i (NOK, each 32 byte block repeats the 1st byte of block) Sequential read using SMBus Block Read. For each 32 byte block a byte address write followed by 32 sequental reads in a same message. These findings are explained because the implementation has had a mismatch between hardware interrupts and what I2C slave events should be sent after those interrupts. Despite that the case 1 happened to have always the I2C slave events sent to a right order with a right data between backend and the I2C bus. Hardware generates the DW_IC_INTR_RD_REQ interrupt when another host is attempting to read and for sequential reads after. DW_IC_INTR_RX_DONE occurs when host does not acknowledge a transmitted byte which is an indication the end of transmission. Those interrupts do not match directly with I2C_SLAVE_READ_REQUESTED and I2C_SLAVE_READ_PROCESSED events which is how the code was and is practically using them. The slave-eeprom backend increases the buffer index with the I2C_SLAVE_READ_PROCESSED event and returns the data from current index when receiving only the I2C_SLAVE_READ_REQUESTED event. That explains the repeated bytes in case 3 and also case 2 before commit 3b5f7f10ff6e ("i2c: designware: slave should do WRITE_REQUESTED before WRITE_RECEIVED"). Patch fixes the case 3 while keep cases 1 and 2 working with following changes: - First DW_IC_INTR_RD_REQ interrupt will change the state machine to read in progress state, send I2C_SLAVE_READ_REQUESTED event and transmit the first byte from backend - Subsequent DW_IC_INTR_RD_REQ interrupts will send I2C_SLAVE_READ_PROCESSED events and transmit next bytes from backend - STOP won't change the state machine. Otherwise case 2 won't work since we cannot distinguish current address read from sequentiel read - DW_IC_INTR_RX_DONE interrupt is needless since there is no mechanism to inform it to a backend. It cannot be used to change state machine at the end of read either due the same reason than above - Next host write to us will change the state machine from read to write in progress state - STATUS_WRITE_IN_PROGRESS and STATUS_READ_IN_PROGRESS are considered now to be status flags not the state of the driver. This is how we treat them in i2c-designware-master.c While at it do not test the return code from i2c_slave_event() for I2C_SLAVE_READ_REQUESTED and I2C_SLAVE_READ_PROCESSED since it returns always 0. Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.h | 1 - drivers/i2c/busses/i2c-designware-slave.c | 32 +++++++++++++++---------------- 2 files changed, 16 insertions(+), 17 deletions(-) commit b548b17a93fd18357a5a6f535c10c1e68719ad32 Author: Eric Dumazet Date: Thu Nov 10 19:02:39 2022 +0000 tcp: tcp_wfree() refactoring Use try_cmpxchg() (instead of cmpxchg()) in a more readable way. oval = smp_load_acquire(&sk->sk_tsq_flags); do { ... } while (!try_cmpxchg(&sk->sk_tsq_flags, &oval, nval)); Reduce indentation level. Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20221110190239.3531280-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/tcp_output.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit fac30731b9b8a0b7580bf73ddd25035ef0a733a5 Author: Eric Dumazet Date: Thu Nov 10 17:48:29 2022 +0000 tcp: adopt try_cmpxchg() in tcp_release_cb() try_cmpxchg() is slighly more efficient (at least on x86), and smp_load_acquire(&sk->sk_tsq_flags) could avoid a KCSAN report. Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20221110174829.3403442-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/tcp_output.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3e35f26d339718e155fa7cf5993a99924124a041 Author: Ido Schimmel Date: Thu Nov 10 10:54:22 2022 +0200 bridge: Add missing parentheses No changes in generated code. Reported-by: Petr Machata Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Link: https://lore.kernel.org/r/20221110085422.521059-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski net/bridge/br_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d77be49309dddadee7cd0e581449baef1ded5ebe Merge: 45f22f2fdc19 7a6ca44c1e61 Author: Jakub Kicinski Date: Fri Nov 11 21:23:23 2022 -0800 Merge branch 'dt-bindings-net-qcom-ipa-relax-some-restrictions' Alex Elder says: ==================== dt-bindings: net: qcom,ipa: relax some restrictions The first patch in this series simply removes an unnecessary requirement in the IPA binding. Previously, if the modem was doing GSI firmware loading, the firmware name property was required to *not* be present. There is no harm in having the firmware name be specified, so this restriction isn't needed. The second patch restates a requirement on the "memory-region" property more accurately. These binding changes have no impact on existing code or DTS files. These aren't really bug fixes, so no need to back-port. ==================== Link: https://lore.kernel.org/r/20221110195619.1276302-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 7a6ca44c1e6156ac49274ce44f67bdc4d86187cb Author: Alex Elder Date: Thu Nov 10 13:56:18 2022 -0600 dt-bindings: net: qcom,ipa: restate a requirement Either the AP or modem loads GSI firmware. If the modem-init property is present, the modem loads it. Otherwise, the AP loads it, and in that case the memory-region property must be defined. Currently this requirement is expressed as one or the other of the modem-init or the memory-region property being required. But it's harmless for the memory-region to be present if the modem is loading firmware (it'll just be ignored). Restate the requirement so that the memory-region property is required only if modem-init is not present. Signed-off-by: Alex Elder Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/qcom,ipa.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 9d26628a4ce2d0ba42d0632e345c8bfd45b26127 Author: Alex Elder Date: Thu Nov 10 13:56:17 2022 -0600 dt-bindings: net: qcom,ipa: remove an unnecessary restriction Commit d8604b209e9b3 ("dt-bindings: net: qcom,ipa: add firmware-name property") added a requirement for a "firmware-name" property that is more restrictive than necessary. If the AP loads GSI firmware, the name of the firmware file to use may optionally be provided via a "firmware-name" property. If the *modem* loads GSI firmware, "firmware-name" doesn't need to be supplied--but it's harmless to do so (it will simply be ignored). Remove the unnecessary restriction, and allow "firware-name" to be supplied even if it's not needed. Signed-off-by: Alex Elder Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/qcom,ipa.yaml | 10 ---------- 1 file changed, 10 deletions(-) commit 45f22f2fdc19b78bf8397fb9e535f8f9e90fbaf2 Author: Angelo Dureghello Date: Thu Nov 10 10:10:27 2022 +0100 net: dsa: mv88e6xxx: enable set_policy Enabling set_policy capability for mv88e6321. Signed-off-by: Angelo Dureghello Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20221110091027.998073-1-angelo.dureghello@timesys.com Signed-off-by: Jakub Kicinski drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) commit 4a432e068ce6bc59e18ab4d576e4dc5abaca42b4 Merge: f4c4ca70dedc 4373bf4b72f9 Author: Jakub Kicinski Date: Fri Nov 11 21:19:50 2022 -0800 Merge branch 'mptcp-miscellaneous-refactoring-and-small-fixes' Mat Martineau says: ==================== mptcp: Miscellaneous refactoring and small fixes Patches 1-3 do some refactoring to more consistently handle sock casts, and to remove some duplicate code. No functional changes. Patch 4 corrects a variable name in a self test, but does not change functionality since the same value gets used due to bash's scoping rules. Patch 5 rewords a comment. ==================== Link: https://lore.kernel.org/r/20221110232322.125068-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit 4373bf4b72f93af9d045450a44d294953c590e2d Author: Mat Martineau Date: Thu Nov 10 15:23:22 2022 -0800 mptcp: Fix grammar in a comment We kept getting initial patches from new contributors to remove a duplicate 'the' (since grammar checking scripts flag it), but submitters never followed up after code review. Reviewed-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/token.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 31b4e63eb24a81770b0e46a768f606a114787262 Author: Geliang Tang Date: Thu Nov 10 15:23:21 2022 -0800 selftests: mptcp: use max_time instead of time 'time' is the local variable of run_test() function, while 'max_time' is the local variable of do_transfer() function. So in do_transfer(), $max_time should be used, not $time. Please note that here $time == $max_time so the behaviour is not changed but the right variable is used. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/simult_flows.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 80638684e840684042325fa5a3fa1eb59fd123cc Author: Geliang Tang Date: Thu Nov 10 15:23:20 2022 -0800 mptcp: get sk from msk directly Use '(struct sock *)msk' to get 'sk' from 'msk' in a more direct way instead of using '&msk->sk.icsk_inet.sk'. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/pm_userspace.c | 4 ++-- net/mptcp/protocol.c | 4 ++-- net/mptcp/sockopt.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 73a0052a61f98354f39f461e03f1a7e513b84578 Author: Geliang Tang Date: Thu Nov 10 15:23:19 2022 -0800 mptcp: change 'first' as a parameter The function mptcp_subflow_process_delegated() uses the input ssk first, while __mptcp_check_push() invokes the packet scheduler first. So this patch adds a new parameter named 'first' for the function __mptcp_subflow_push_pending() to deal with these two cases separately. With this change, the code that invokes the packet scheduler in the function __mptcp_check_push() can be removed, and replaced by invoking __mptcp_subflow_push_pending() directly. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/protocol.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 00df24f19179c8e8c81fffa95c91d5c2eab8964e Author: Geliang Tang Date: Thu Nov 10 15:23:18 2022 -0800 mptcp: use msk instead of mptcp_sk Use msk instead of mptcp_sk(sk) in the functions where the variable "msk = mptcp_sk(sk)" has been defined. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski net/mptcp/protocol.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 123b30a75623f7131af0f0fa2bee330be65f1ead Author: Johan Hovold Date: Thu Nov 10 11:35:58 2022 +0100 arm64: dts: qcom: sc8280xp-x13s: enable WiFi controller Enable the Qualcomm QCNFA765 Wireless Network Adapter connected to PCIe4. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110103558.12690-10-johan+linaro@kernel.org .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 176d54acd5d9c79bb6b51dbe2550a3b0441353bf Author: Johan Hovold Date: Thu Nov 10 11:35:57 2022 +0100 arm64: dts: qcom: sc8280xp-x13s: enable modem Enable the modem connected to the PCIe3a M.2 connector. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110103558.12690-9-johan+linaro@kernel.org .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit b4bb952e6cfc13f86b4b52c3039b199dd3f16020 Author: Johan Hovold Date: Thu Nov 10 11:35:56 2022 +0100 arm64: dts: qcom: sc8280xp-x13s: enable NVMe SSD Enable the NVMe SSD connected to PCIe2. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110103558.12690-8-johan+linaro@kernel.org .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit d907fe5acbf1061f86936485d604c229e68ae312 Author: Johan Hovold Date: Thu Nov 10 11:35:55 2022 +0100 arm64: dts: qcom: sc8280xp-crd: enable WiFi controller Enable the Qualcomm QCNFA765 Wireless Network Adapter connected to PCIe4. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110103558.12690-7-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 17e2ccaf65d16848b27793853af8f42ae524219f Author: Johan Hovold Date: Thu Nov 10 11:35:54 2022 +0100 arm64: dts: qcom: sc8280xp-crd: enable SDX55 modem Enable the SDX55 modem connected to PCIe3. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110103558.12690-6-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 6a1ec5eca73c0ca8cdefd13426bf812c65a1e510 Author: Johan Hovold Date: Thu Nov 10 11:35:53 2022 +0100 arm64: dts: qcom: sc8280xp-crd: enable NVMe SSD Enable the NVMe SSD connected to PCIe2. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110103558.12690-5-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 5634c6d9771df48838384b14592a00a1e7da8fdf Author: Johan Hovold Date: Thu Nov 10 11:35:52 2022 +0100 arm64: dts: qcom: sc8280xp-crd: rename backlight and misc regulators Rename the backlight and misc regulators according to the net names. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110103558.12690-4-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c35d4d7128726e7c8160bedd9ed5b309978bdeb3 Author: Johan Hovold Date: Thu Nov 10 11:35:51 2022 +0100 arm64: dts: qcom: sa8295p-adp: enable PCIe The SA8295P-ADP has up to four PCIe interfaces implemented by three or four controllers: PCIe2A, PCIe3A/PCIe3B and PCIe4. PCIe2 is used in x4 mode, while PCIe3 can be used in either x2 or x4 mode. Enable both PCIe3A and PCI3B in x2 mode for now. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110103558.12690-3-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 171 +++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) commit 813e831570017bfbab8ccb898a46349c2df3f0f1 Author: Johan Hovold Date: Thu Nov 10 11:35:50 2022 +0100 arm64: dts: qcom: sc8280xp/sa8540p: add PCIe2-4 nodes The SC8280XP platform has seven PCIe controllers: PCIe0 USB4 PCIe1 USB4 PCIe2A 4-lane PCIe2B 2-lane PCIe3A 4-lane PCIe3B 2-lane PCIe4 1-lane while SA8540P only has five (PCIe2-4). Add devicetree nodes for the PCIe2-4 controllers and their PHYs. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110103558.12690-2-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sa8540p.dtsi | 59 ++++ arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 493 ++++++++++++++++++++++++++++++++- 2 files changed, 547 insertions(+), 5 deletions(-) commit 07c8ded6e373830aed55139b2030e755177e1611 Author: Richard Acayan Date: Thu Nov 10 19:18:19 2022 -0500 arm64: dts: qcom: add sdm670 and pixel 3a device trees The Qualcomm Snapdragon 670 has been out for a while. Add a device tree for it and the Google Pixel 3a as the first device. The Pixel 3a has the same bootloader issue as the Pixel 3 and will not work on Android 10 bootloaders or later until it gets fixed for the Pixel 3. SoC Initial Features: - power management - clocks - pinctrl - eMMC - USB 2.0 - GENI I2C - IOMMU - RPMh - interrupts Device-Specific Initial Features: - side buttons (keys) - regulators - touchscreen Signed-off-by: Richard Acayan Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111001818.124901-5-mailingradian@gmail.com arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts | 531 ++++++++++ arch/arm64/boot/dts/qcom/sdm670.dtsi | 1160 ++++++++++++++++++++++ 3 files changed, 1692 insertions(+) commit aa9f474014b1e2665194a97dc4675aa187534bb9 Author: Richard Acayan Date: Thu Nov 10 19:18:18 2022 -0500 dt-bindings: firmware: scm: add sdm670 compatible The Snapdragon 670 uses SCM as for PSCI power management. Document the appropriate compatible string for it. Signed-off-by: Richard Acayan Acked-by: Rob Herring Reviewed-by: Guru Das Srinagesh Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111001818.124901-4-mailingradian@gmail.com Documentation/devicetree/bindings/firmware/qcom,scm.yaml | 1 + 1 file changed, 1 insertion(+) commit 6c49e41c46a46a901e3203e030601033f29a4e5d Author: Richard Acayan Date: Thu Nov 10 19:18:17 2022 -0500 dt-bindings: arm: qcom: add sdm670 and pixel 3a compatible The Snapdragon 670 and Pixel 3a initial device trees are about to be added. Add the compatible strings for the board. Signed-off-by: Richard Acayan Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111001818.124901-3-mailingradian@gmail.com Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit b4dba2bd3452fbc1ba5d0a54528e694b8db630b8 Author: Richard Acayan Date: Thu Nov 10 19:18:16 2022 -0500 dt-bindings: arm: cpus: add qcom kryo 360 compatible The Snapdragon 670 uses CPUs named Kryo 360 silver and Kryo 360 gold. Add the compatible string in the documentation. Signed-off-by: Richard Acayan Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221111001818.124901-2-mailingradian@gmail.com Documentation/devicetree/bindings/arm/cpus.yaml | 1 + 1 file changed, 1 insertion(+) commit f4c4ca70dedc1bce8e7b1648e652aa9be1d3fcd7 Merge: f1a7178b44f3 eb6af4ceda2d Author: Jakub Kicinski Date: Fri Nov 11 18:33:02 2022 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Andrii Nakryiko says: ==================== bpf-next 2022-11-11 We've added 49 non-merge commits during the last 9 day(s) which contain a total of 68 files changed, 3592 insertions(+), 1371 deletions(-). The main changes are: 1) Veristat tool improvements to support custom filtering, sorting, and replay of results, from Andrii Nakryiko. 2) BPF verifier precision tracking fixes and improvements, from Andrii Nakryiko. 3) Lots of new BPF documentation for various BPF maps, from Dave Tucker, Donald Hunter, Maryam Tahhan, Bagas Sanjaya. 4) BTF dedup improvements and libbpf's hashmap interface clean ups, from Eduard Zingerman. 5) Fix veth driver panic if XDP program is attached before veth_open, from John Fastabend. 6) BPF verifier clean ups and fixes in preparation for follow up features, from Kumar Kartikeya Dwivedi. 7) Add access to hwtstamp field from BPF sockops programs, from Martin KaFai Lau. 8) Various fixes for BPF selftests and samples, from Artem Savkov, Domenico Cerasuolo, Kang Minchul, Rong Tao, Yang Jihong. 9) Fix redirection to tunneling device logic, preventing skb->len == 0, from Stanislav Fomichev. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (49 commits) selftests/bpf: fix veristat's singular file-or-prog filter selftests/bpf: Test skops->skb_hwtstamp selftests/bpf: Fix incorrect ASSERT in the tcp_hdr_options test bpf: Add hwtstamp field for the sockops prog selftests/bpf: Fix xdp_synproxy compilation failure in 32-bit arch bpf, docs: Document BPF_MAP_TYPE_ARRAY docs/bpf: Document BPF map types QUEUE and STACK docs/bpf: Document BPF ARRAY_OF_MAPS and HASH_OF_MAPS docs/bpf: Document BPF_MAP_TYPE_CPUMAP map docs/bpf: Document BPF_MAP_TYPE_LPM_TRIE map libbpf: Hashmap.h update to fix build issues using LLVM14 bpf: veth driver panics when xdp prog attached before veth_open selftests: Fix test group SKIPPED result selftests/bpf: Tests for btf_dedup_resolve_fwds libbpf: Resolve unambigous forward declarations libbpf: Hashmap interface update to allow both long and void* keys/values samples/bpf: Fix sockex3 error: Missing BPF prog type selftests/bpf: Fix u32 variable compared with less than zero Documentation: bpf: Escape underscore in BPF type name prefix selftests/bpf: Use consistent build-id type for liburandom_read.so ... ==================== Link: https://lore.kernel.org/r/20221111233733.1088228-1-andrii@kernel.org Signed-off-by: Jakub Kicinski commit f1a7178b44f3d82c21ee9d8a145ce5edbd5d3b99 Merge: 2cf7e87fc459 be3ed48683f0 Author: Jakub Kicinski Date: Fri Nov 11 18:18:09 2022 -0800 Merge branch 'net-vlan-claim-one-bit-from-sk_buff' Eric Dumazet says: ==================== net: vlan: claim one bit from sk_buff First patch claims skb->vlan_present. This means some bpf changes, eg for sparc32 that I could not test. Second patch removes one conditional test in gro_list_prepare(). ==================== Link: https://lore.kernel.org/r/20221109095759.1874969-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit be3ed48683f0d7ed808783fd7d919459b58b5b6b Author: Eric Dumazet Date: Wed Nov 9 09:57:59 2022 +0000 net: gro: no longer use skb_vlan_tag_present() We can remove a conditional test in gro_list_prepare() by comparing vlan_all fields of the two skbs. Notes: While comparing the vlan_proto is not strictly needed, because part of the following compare_ether_header() call, using 32bit word is actually faster than using 16bit values. napi_reuse_skb() makes sure to clear skb->vlan_all, as it already calls __vlan_hwaccel_clear_tag() Signed-off-by: Eric Dumazet Acked-by: Martin KaFai Lau Signed-off-by: Jakub Kicinski net/core/gro.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 354259fa73e2aac92ae5e19522adb69a92c15b49 Author: Eric Dumazet Date: Wed Nov 9 09:57:58 2022 +0000 net: remove skb->vlan_present skb->vlan_present seems redundant. We can instead derive it from this boolean expression: vlan_present = skb->vlan_proto != 0 || skb->vlan_tci != 0 Add a new union, to access both fields in a single load/store when possible. union { u32 vlan_all; struct { __be16 vlan_proto; __u16 vlan_tci; }; }; This allows following patch to remove a conditional test in GRO stack. Note: We move remcsum_offload to keep TC_AT_INGRESS_MASK and SKB_MONO_DELIVERY_TIME_MASK unchanged. Signed-off-by: Eric Dumazet Acked-by: Yonghong Song Acked-by: Martin KaFai Lau Signed-off-by: Jakub Kicinski arch/sparc/net/bpf_jit_comp_32.c | 10 +++++----- .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- include/linux/if_vlan.h | 9 +++------ include/linux/skbuff.h | 18 ++++++++++-------- lib/test_bpf.c | 1 - net/core/filter.c | 22 ++++++++++------------ 6 files changed, 29 insertions(+), 33 deletions(-) commit 01a965d750508cacdfc8aa04e567cbb0692ce649 Author: Christophe Leroy Date: Fri Nov 11 09:30:46 2022 +0100 ata: sata_dwc_460ex: Check !irq instead of irq == 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://lkml.org/lkml/2005/11/21/221 . He re-iterated the same view recently in https://lkml.org/lkml/2022/10/12/622 So test !irq instead of tesing irq == NO_IRQ. And remove the fallback definition of NO_IRQ at the top of the file. Signed-off-by: Christophe Leroy Signed-off-by: Damien Le Moal drivers/ata/sata_dwc_460ex.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit aebf1e26a84f2e38cf38aa228546adc2a2ede1fb Author: Minghao Chi Date: Fri Nov 11 16:47:12 2022 +0800 ata: pata_ep93xx: 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. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/pata_ep93xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 442cf8e22ba25a77cb9092d78733fdbac9844e50 Author: Ville Syrjälä Date: Mon Nov 7 21:25:45 2022 +0200 drm/sti: Use drm_mode_copy() struct drm_display_mode embeds a list head, so overwriting the full struct with another one will corrupt the list (if the destination mode is on a list). Use drm_mode_copy() instead which explicitly preserves the list head of the destination mode. Even if we know the destination mode is not on any list using drm_mode_copy() seems decent as it sets a good example. Bad examples of not using it might eventually get copied into code where preserving the list head actually matters. Obviously one case not covered here is when the mode itself is embedded in a larger structure and the whole structure is copied. But if we are careful when copying into modes embedded in structures I think we can be a little more reassured that bogus list heads haven't been propagated in. @is_mode_copy@ @@ drm_mode_copy(...) { ... } @depends on !is_mode_copy@ struct drm_display_mode *mode; expression E, S; @@ ( - *mode = E + drm_mode_copy(mode, &E) | - memcpy(mode, E, S) + drm_mode_copy(mode, E) ) @depends on !is_mode_copy@ struct drm_display_mode mode; expression E; @@ ( - mode = E + drm_mode_copy(&mode, &E) | - memcpy(&mode, E, S) + drm_mode_copy(&mode, E) ) @@ struct drm_display_mode *mode; @@ - &*mode + mode Cc: Alain Volmat Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221107192545.9896-8-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/sti/sti_dvo.c | 2 +- drivers/gpu/drm/sti/sti_hda.c | 2 +- drivers/gpu/drm/sti/sti_hdmi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 2bfaa28000d2830d3209161a4541cce0660e1b84 Author: Ville Syrjälä Date: Mon Nov 7 21:25:44 2022 +0200 drm/rockchip: Use drm_mode_copy() struct drm_display_mode embeds a list head, so overwriting the full struct with another one will corrupt the list (if the destination mode is on a list). Use drm_mode_copy() instead which explicitly preserves the list head of the destination mode. Even if we know the destination mode is not on any list using drm_mode_copy() seems decent as it sets a good example. Bad examples of not using it might eventually get copied into code where preserving the list head actually matters. Obviously one case not covered here is when the mode itself is embedded in a larger structure and the whole structure is copied. But if we are careful when copying into modes embedded in structures I think we can be a little more reassured that bogus list heads haven't been propagated in. @is_mode_copy@ @@ drm_mode_copy(...) { ... } @depends on !is_mode_copy@ struct drm_display_mode *mode; expression E, S; @@ ( - *mode = E + drm_mode_copy(mode, &E) | - memcpy(mode, E, S) + drm_mode_copy(mode, E) ) @depends on !is_mode_copy@ struct drm_display_mode mode; expression E; @@ ( - mode = E + drm_mode_copy(&mode, &E) | - memcpy(&mode, E, S) + drm_mode_copy(&mode, E) ) @@ struct drm_display_mode *mode; @@ - &*mode + mode Signed-off-by: Ville Syrjälä Cc: Sandy Huang Cc: "Heiko Stübner" Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20221107192545.9896-7-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +- drivers/gpu/drm/rockchip/inno_hdmi.c | 2 +- drivers/gpu/drm/rockchip/rk3066_hdmi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 20c76052c3003668147818a78453398c82d4438e Author: Ville Syrjälä Date: Mon Nov 7 21:25:43 2022 +0200 drm/mtk: Use drm_mode_init() for on-stack modes Initialize on-stack modes with drm_mode_init() to guarantee no stack garbage in the list head. Based on the following cocci script, with manual fixups: @decl@ identifier M; expression E; @@ - struct drm_display_mode M = E; + struct drm_display_mode M; @@ identifier decl.M; expression decl.E; statement S, S1; @@ struct drm_display_mode M; ... when != S + drm_mode_init(&M, &E); + S1 @@ expression decl.E; @@ - &*E + E Cc: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221107192545.9896-6-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2a1c5ca50db22b3677676dd5bad5f6092429acf Author: Ville Syrjälä Date: Mon Nov 7 21:25:42 2022 +0200 drm/msm: Use drm_mode_copy() struct drm_display_mode embeds a list head, so overwriting the full struct with another one will corrupt the list (if the destination mode is on a list). Use drm_mode_copy() instead which explicitly preserves the list head of the destination mode. Even if we know the destination mode is not on any list using drm_mode_copy() seems decent as it sets a good example. Bad examples of not using it might eventually get copied into code where preserving the list head actually matters. Obviously one case not covered here is when the mode itself is embedded in a larger structure and the whole structure is copied. But if we are careful when copying into modes embedded in structures I think we can be a little more reassured that bogus list heads haven't been propagated in. @is_mode_copy@ @@ drm_mode_copy(...) { ... } @depends on !is_mode_copy@ struct drm_display_mode *mode; expression E, S; @@ ( - *mode = E + drm_mode_copy(mode, &E) | - memcpy(mode, E, S) + drm_mode_copy(mode, E) ) @depends on !is_mode_copy@ struct drm_display_mode mode; expression E; @@ ( - mode = E + drm_mode_copy(&mode, &E) | - memcpy(&mode, E, S) + drm_mode_copy(&mode, E) ) @@ struct drm_display_mode *mode; @@ - &*mode + mode Cc: Rob Clark Cc: Sean Paul Cc: Abhinav Kumar Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221107192545.9896-5-ville.syrjala@linux.intel.com drivers/gpu/drm/msm/dp/dp_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17309a4793e9eec966544d4013c5bd0b394f4d0d Author: Ville Syrjälä Date: Mon Nov 7 21:25:41 2022 +0200 drm/msm: Use drm_mode_init() for on-stack modes Initialize on-stack modes with drm_mode_init() to guarantee no stack garbage in the list head, or that we aren't copying over another mode's list head. Based on the following cocci script, with manual fixups: @decl@ identifier M; expression E; @@ - struct drm_display_mode M = E; + struct drm_display_mode M; @@ identifier decl.M; expression decl.E; statement S, S1; @@ struct drm_display_mode M; ... when != S + drm_mode_init(&M, &E); + S1 @@ expression decl.E; @@ - &*E + E Cc: Rob Clark Cc: Sean Paul Cc: Abhinav Kumar Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221107192545.9896-4-ville.syrjala@linux.intel.com drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 98b04dd0b4577894520493d96bc4623387767445 Author: Michael S. Tsirkin Date: Wed Oct 26 02:11:21 2022 -0400 PCI: Fix pci_device_is_present() for VFs by checking PF pci_device_is_present() previously didn't work for VFs because it reads the Vendor and Device ID, which are 0xffff for VFs, which looks like they aren't present. Check the PF instead. Wei Gong reported that if virtio I/O is in progress when the driver is unbound or "0" is written to /sys/.../sriov_numvfs, the virtio I/O operation hangs, which may result in output like this: task:bash state:D stack: 0 pid: 1773 ppid: 1241 flags:0x00004002 Call Trace: schedule+0x4f/0xc0 blk_mq_freeze_queue_wait+0x69/0xa0 blk_mq_freeze_queue+0x1b/0x20 blk_cleanup_queue+0x3d/0xd0 virtblk_remove+0x3c/0xb0 [virtio_blk] virtio_dev_remove+0x4b/0x80 ... device_unregister+0x1b/0x60 unregister_virtio_device+0x18/0x30 virtio_pci_remove+0x41/0x80 pci_device_remove+0x3e/0xb0 This happened because pci_device_is_present(VF) returned "false" in virtio_pci_remove(), so it called virtio_break_device(). The broken vq meant that vring_interrupt() skipped the vq.callback() that would have completed the virtio I/O operation via virtblk_done(). [bhelgaas: commit log, simplify to always use pci_physfn(), add stable tag] Link: https://lore.kernel.org/r/20221026060912.173250-1-mst@redhat.com Reported-by: Wei Gong Tested-by: Wei Gong Signed-off-by: Michael S. Tsirkin Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org drivers/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit a01befa0a281b504587166d0d02d178791ae60b4 Author: Ville Syrjälä Date: Mon Nov 7 21:25:40 2022 +0200 drm/hisilicon: Use drm_mode_init() for on-stack modes Initialize on-stack modes with drm_mode_init() to guarantee no stack garbage in the list head. Cc: Xinliang Liu Cc: Tian Tao Cc: John Stultz Cc: Xinwei Kong Cc: Chen Feng Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221107192545.9896-3-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb6af4ceda2d885416d8382f096030d39896aafc Author: Andrii Nakryiko Date: Fri Nov 11 10:12:42 2022 -0800 selftests/bpf: fix veristat's singular file-or-prog filter Fix the bug of filtering out filename too early, before we know the program name, if using unified file-or-prog filter (i.e., -f ). Because we try to filter BPF object file early without opening and parsing it, if any_glob (file-or-prog) filter is used we have to accept any filename just to get program name, which might match any_glob. Fixes: 10b1b3f3e56a ("selftests/bpf: consolidate and improve file/prog filtering in veristat") Signed-off-by: Andrii Nakryiko Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20221111181242.2101192-1-andrii@kernel.org Signed-off-by: Martin KaFai Lau tools/testing/selftests/bpf/veristat.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0f7dc423a5dcad488e1d8f8f34d5572600a86471 Merge: e4c9cf0ce8c4 8cac7a59b252 Author: Andrii Nakryiko Date: Fri Nov 11 13:10:11 2022 -0800 Merge branch 'bpf: Add hwtstamp field for the sockops prog' Martin KaFai Lau says: ==================== From: Martin KaFai Lau The bpf-tc prog has already been able to access the skb_hwtstamps(skb)->hwtstamp. This set extends the same hwtstamp access to the sockops prog. v2: - Fixed the btf_dump selftest which depends on the last member of 'struct bpf_sock_ops'. ==================== Signed-off-by: Andrii Nakryiko commit 8cac7a59b252732d8427ebc29c3fc6c36ff653e1 Author: Martin KaFai Lau Date: Mon Nov 7 15:04:20 2022 -0800 selftests/bpf: Test skops->skb_hwtstamp This patch tests reading the skops->skb_hwtstamp field. A local test was also done such that the shinfo hwtstamp was temporary set to a non zero value in the kernel bpf_skops_parse_hdr() and the same value can be read by the skops test. An adjustment is needed to the btf_dump selftest because the changes in the 'struct bpf_sock_ops'. Signed-off-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221107230420.4192307-4-martin.lau@linux.dev tools/testing/selftests/bpf/prog_tests/btf_dump.c | 4 ++-- tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c | 2 ++ tools/testing/selftests/bpf/progs/test_misc_tcp_hdr_options.c | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) commit 52929912d7bda040b43538e8d88e8d231b76eb4e Author: Martin KaFai Lau Date: Mon Nov 7 15:04:19 2022 -0800 selftests/bpf: Fix incorrect ASSERT in the tcp_hdr_options test This patch fixes the incorrect ASSERT test in tcp_hdr_options during the CHECK to ASSERT macro cleanup. Fixes: 3082f8cd4ba3 ("selftests/bpf: Convert tcp_hdr_options test to ASSERT_* macros") Signed-off-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko Acked-by: Wang Yufen Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221107230420.4192307-3-martin.lau@linux.dev tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9bb053490f1a5a0914eb9f7b4116a0e4a95d4f8e Author: Martin KaFai Lau Date: Mon Nov 7 15:04:18 2022 -0800 bpf: Add hwtstamp field for the sockops prog The bpf-tc prog has already been able to access the skb_hwtstamps(skb)->hwtstamp. This patch extends the same hwtstamp access to the sockops prog. In sockops, the skb is also available to the bpf prog during the BPF_SOCK_OPS_PARSE_HDR_OPT_CB event. There is a use case that the hwtstamp will be useful to the sockops prog to better measure the one-way-delay when the sender has put the tx timestamp in the tcp header option. Signed-off-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221107230420.4192307-2-martin.lau@linux.dev include/uapi/linux/bpf.h | 1 + net/core/filter.c | 39 +++++++++++++++++++++++++++++++-------- tools/include/uapi/linux/bpf.h | 1 + 3 files changed, 33 insertions(+), 8 deletions(-) commit 265751a513adfec50bcb7354fc287a9bd3a62129 Author: Dmitry Osipenko Date: Thu Nov 10 23:13:49 2022 +0300 fastrpc: Assert held reservation lock for dma-buf mmapping When userspace mmaps dma-buf's fd, the dma-buf reservation lock must be held. Add locking sanity check to the dma-buf mmaping callback to ensure that the locking assumption won't regress in the future. Suggested-by: Daniel Vetter Signed-off-by: Dmitry Osipenko Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221110201349.351294-7-dmitry.osipenko@collabora.com drivers/misc/fastrpc.c | 3 +++ 1 file changed, 3 insertions(+) commit 3a6ca1810f774ceed129683d8f8c9721c03512b0 Author: Dmitry Osipenko Date: Thu Nov 10 23:13:48 2022 +0300 media: videobuf2: Assert held reservation lock for dma-buf mmapping When userspace mmaps dma-buf's fd, the dma-buf reservation lock must be held. Add locking sanity checks to the dma-buf mmaping callbacks to ensure that the locking assumptions won't regress in the future. Suggested-by: Daniel Vetter Signed-off-by: Dmitry Osipenko Acked-by: Tomasz Figa Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221110201349.351294-6-dmitry.osipenko@collabora.com drivers/media/common/videobuf2/videobuf2-dma-contig.c | 3 +++ drivers/media/common/videobuf2/videobuf2-dma-sg.c | 3 +++ drivers/media/common/videobuf2/videobuf2-vmalloc.c | 3 +++ 3 files changed, 9 insertions(+) commit 27f3733a104950169797407fea330a2e1d42f16b Author: Dmitry Osipenko Date: Thu Nov 10 23:13:47 2022 +0300 dma-buf/heaps: Assert held reservation lock for dma-buf mmapping When userspace mmaps dma-buf's fd, the dma-buf reservation lock must be held. Add locking sanity checks to the dma-buf mmaping callbacks to ensure that the locking assumptions won't regress in the future. Suggested-by: Daniel Vetter Signed-off-by: Dmitry Osipenko Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221110201349.351294-5-dmitry.osipenko@collabora.com drivers/dma-buf/heaps/cma_heap.c | 3 +++ drivers/dma-buf/heaps/system_heap.c | 3 +++ 2 files changed, 6 insertions(+) commit aa3f99896443ea26e115f08757008d14430876f9 Author: Dmitry Osipenko Date: Thu Nov 10 23:13:46 2022 +0300 udmabuf: Assert held reservation lock for dma-buf mmapping When userspace mmaps dma-buf's fd, the dma-buf reservation lock must be held. Add locking sanity check to the dma-buf mmaping callback to ensure that the locking assumption won't regress in the future. Suggested-by: Daniel Vetter Signed-off-by: Dmitry Osipenko Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221110201349.351294-4-dmitry.osipenko@collabora.com drivers/dma-buf/udmabuf.c | 3 +++ 1 file changed, 3 insertions(+) commit 39ce252918712180f5a64853920a320981dac94b Author: Dmitry Osipenko Date: Thu Nov 10 23:13:45 2022 +0300 drm: Assert held reservation lock for dma-buf mmapping When userspace mmaps dma-buf's fd, the dma-buf reservation lock must be held. Add locking sanity checks to the dma-buf mmaping callbacks of DRM drivers to ensure that the locking assumptions won't regress in future. Suggested-by: Daniel Vetter Signed-off-by: Dmitry Osipenko Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221110201349.351294-3-dmitry.osipenko@collabora.com drivers/gpu/drm/drm_prime.c | 2 ++ drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 2 ++ drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 2 ++ drivers/gpu/drm/tegra/gem.c | 2 ++ 4 files changed, 8 insertions(+) commit 8526e973647e1bf77dadf894a36aefd4fd1b8a3f Author: Dmitry Osipenko Date: Thu Nov 10 23:13:44 2022 +0300 dma-buf: Move dma_buf_mmap_internal() to dynamic locking specification All dma-buf functions has been moved to dynamic locking specification The dma_buf_mmap_internal() was missed out by accident. Take reservation lock around file mapping operation to adhere the common locking convention. Reported-by: Daniel Vetter Signed-off-by: Dmitry Osipenko Reviewed-by: Christian König Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221110201349.351294-2-dmitry.osipenko@collabora.com drivers/dma-buf/dma-buf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 87548e54b86e06190e018665bd77528f72038fbe Author: Sibi Sankar Date: Thu Nov 10 12:38:13 2022 +0530 arm64: dts: qcom: sc7280: Add Google Herobrine WIFI SKU dts fragment The Google Herobrine WIFI SKU can save 256M by not having modem/mba/rmtfs memory regions defined. Add the dts fragment and mark all the board files appropriately. Reviewed-by: Douglas Anderson Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110070813.1777-2-quic_sibis@quicinc.com arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi | 15 --------- .../boot/dts/qcom/sc7280-herobrine-evoker-lte.dts | 4 ++- .../boot/dts/qcom/sc7280-herobrine-evoker.dts | 2 +- .../boot/dts/qcom/sc7280-herobrine-evoker.dtsi | 1 + .../boot/dts/qcom/sc7280-herobrine-lte-sku.dtsi | 19 +++++++++++ .../dts/qcom/sc7280-herobrine-villager-r1-lte.dts | 4 ++- .../boot/dts/qcom/sc7280-herobrine-villager-r1.dts | 31 ++---------------- .../dts/qcom/sc7280-herobrine-villager-r1.dtsi | 37 ++++++++++++++++++++++ .../boot/dts/qcom/sc7280-herobrine-wifi-sku.dtsi | 11 +++++++ 9 files changed, 77 insertions(+), 47 deletions(-) commit 3c800bcf07a5957da01593e8f83d797b285a37e0 Author: Sibi Sankar Date: Thu Nov 10 12:38:12 2022 +0530 arm64: dts: qcom: sc7280: Mark all Qualcomm reference boards as LTE When the modem node was re-located to a separate LTE source file "sc7280-herobrine-lte-sku.dtsi", some of the previous LTE users weren't marked appropriately. Fix this by marking all Qualcomm reference devices as LTE. Suggested-by: Douglas Anderson Fixes: d42fae738f3a ("arm64: dts: qcom: Add LTE SKUs for sc7280-villager family") Signed-off-by: Sibi Sankar Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110070813.1777-1-quic_sibis@quicinc.com arch/arm64/boot/dts/qcom/sc7280-idp.dts | 1 - arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 94262a18d74b85704a025855819582b5e256c8f0 Author: Luca Weiss Date: Thu Nov 10 16:15:06 2022 +0100 arm64: dts: qcom: sm7225-fairphone-fp4: Enable SD card Fairphone 4 uses sdhc_2 for the SD card, configure the pins for it and enable it. The regulators which are exclusively used for SDHCI have their maximum voltage decreased to what downstream sets on the consumer side, like on many other platforms and allowed to set the load. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110151507.53650-1-luca.weiss@fairphone.com arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 39 +++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) commit b69e4bb48abdc5dd1fa6725dd1753f8abce3f38c Author: Krzysztof Kozlowski Date: Thu Nov 10 16:27:41 2022 +0100 arm64: dts: qcom: sm8450: drop incorrect spi-max-frequency spi-max-frequency is a property of SPI device, not the controller: qcom/sm8450-hdk.dtb: geniqup@8c0000: spi@880000: Unevaluated properties are not allowed ('spi-max-frequency' was unexpected Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110152741.542024-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 7 ------- 1 file changed, 7 deletions(-) commit e4c9cf0ce8c413c2030e8fb215551d7e0582ee7b Author: Yang Jihong Date: Fri Nov 11 11:08:36 2022 +0800 selftests/bpf: Fix xdp_synproxy compilation failure in 32-bit arch xdp_synproxy fails to be compiled in the 32-bit arch, log is as follows: xdp_synproxy.c: In function 'parse_options': xdp_synproxy.c:175:36: error: left shift count >= width of type [-Werror=shift-count-overflow] 175 | *tcpipopts = (mss6 << 32) | (ttl << 24) | (wscale << 16) | mss4; | ^~ xdp_synproxy.c: In function 'syncookie_open_bpf_maps': xdp_synproxy.c:289:28: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 289 | .map_ids = (__u64)map_ids, | ^ Fix it. Fixes: fb5cd0ce70d4 ("selftests/bpf: Add selftests for raw syncookie helpers") Signed-off-by: Yang Jihong Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221111030836.37632-1-yangjihong1@huawei.com tools/testing/selftests/bpf/xdp_synproxy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1cfa97b30c5ad1f4b9b97e67c10d28d677f258ea Author: Dave Tucker Date: Wed Nov 9 17:46:04 2022 +0000 bpf, docs: Document BPF_MAP_TYPE_ARRAY Add documentation for the BPF_MAP_TYPE_ARRAY including kernel version introduced, usage and examples. Also document BPF_MAP_TYPE_PERCPU_ARRAY which is similar. Co-developed-by: Donald Hunter Signed-off-by: Dave Tucker Signed-off-by: Donald Hunter Signed-off-by: Andrii Nakryiko Reviewed-by: Maryam Tahhan Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/bpf/20221109174604.31673-2-donald.hunter@gmail.com Documentation/bpf/map_array.rst | 250 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) commit 64488ca57ab8645fa1b69fa130ec0aa4d93cdc9e Author: Donald Hunter Date: Tue Nov 8 09:33:14 2022 +0000 docs/bpf: Document BPF map types QUEUE and STACK Add documentation for BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_STACK, including usage and examples. Signed-off-by: Donald Hunter Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221108093314.44851-1-donald.hunter@gmail.com Documentation/bpf/map_queue_stack.rst | 122 ++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) commit f720b84811b2133116e402090369d1be06de7ad4 Author: Donald Hunter Date: Tue Nov 8 10:22:15 2022 +0000 docs/bpf: Document BPF ARRAY_OF_MAPS and HASH_OF_MAPS Add documentation for the ARRAY_OF_MAPS and HASH_OF_MAPS map types, including usage and examples. Reported-by: kernel test robot Signed-off-by: Donald Hunter Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221108102215.47297-1-donald.hunter@gmail.com Documentation/bpf/map_of_maps.rst | 126 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) commit 161939abc80ba855ee1739be4a807c6b0f1b8c6c Author: Maryam Tahhan Date: Mon Nov 7 11:52:07 2022 -0500 docs/bpf: Document BPF_MAP_TYPE_CPUMAP map Add documentation for BPF_MAP_TYPE_CPUMAP including kernel version introduced, usage and examples. Co-developed-by: Lorenzo Bianconi Signed-off-by: Maryam Tahhan Signed-off-by: Lorenzo Bianconi Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221107165207.2682075-2-mtahhan@redhat.com Documentation/bpf/map_cpumap.rst | 166 +++++++++++++++++++++++++++++++++++++++ kernel/bpf/cpumap.c | 9 ++- 2 files changed, 172 insertions(+), 3 deletions(-) commit 83177c0dca3811faa051124731a692609caee7c7 Author: Donald Hunter Date: Tue Nov 1 11:45:42 2022 +0000 docs/bpf: Document BPF_MAP_TYPE_LPM_TRIE map Add documentation for BPF_MAP_TYPE_LPM_TRIE including kernel BPF helper usage, userspace usage and examples. Signed-off-by: Donald Hunter Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221101114542.24481-2-donald.hunter@gmail.com Documentation/bpf/map_lpm_trie.rst | 181 +++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) commit 5f52ceddc40cd61b1dd2ecf735624deaf05f779f Author: Randy Dunlap Date: Mon Nov 7 16:18:29 2022 -0800 ASoC: codecs: wsa883x: use correct header file Fix build errors when GPIOLIB is not set/enabled: ../sound/soc/codecs/wsa883x.c: In function 'wsa883x_probe': ../sound/soc/codecs/wsa883x.c:1394:25: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_regulator_get_optional'? [-Werror=implicit-function-declaration] wsa883x->sd_n = devm_gpiod_get_optional(&pdev->dev, "powerdown", ../sound/soc/codecs/wsa883x.c:1395:49: error: 'GPIOD_FLAGS_BIT_NONEXCLUSIVE' undeclared (first use in this function) GPIOD_FLAGS_BIT_NONEXCLUSIVE); ../sound/soc/codecs/wsa883x.c:1414:9: error: implicit declaration of function 'gpiod_direction_output'; did you mean 'gpio_direction_output'? [-Werror=implicit-function-declaration] gpiod_direction_output(wsa883x->sd_n, 1); Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Srinivas Kandagatla Cc: Banajit Goswami Cc: Mark Brown Cc: Liam Girdwood Cc: alsa-devel@alsa-project.org Cc: Jaroslav Kysela Cc: Takashi Iwai Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221108001829.5100-1-rdunlap@infradead.org Signed-off-by: Mark Brown sound/soc/codecs/wsa883x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec5dba73f7ba10797904cf18092d2e6975a22147 Author: Krzysztof Kozlowski Date: Thu Nov 10 14:35:12 2022 +0100 ASoC: codecs: wsa883x: 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. Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221110133512.478831-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/wsa883x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 817e981736d27731adb9d7ca11eb8069d1ee569d Author: Krzysztof Kozlowski Date: Thu Nov 10 14:35:11 2022 +0100 ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity Use correct polarity in example and powerdown-gpios description. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221110133512.478831-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7c7c3a79213e6737b9dda4ec144555d4b446dd22 Author: Thippeswamy Havalige Date: Fri Nov 11 11:07:09 2022 +0530 dt-bindings: PCI: xilinx-nwl: Convert to YAML schemas of Xilinx NWL PCIe Root Port Bridge Convert to YAML schemas for Xilinx NWL PCIe Root Port Bridge dt binding. Signed-off-by: Thippeswamy Havalige Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221111053709.1474323-2-thippeswamy.havalige@amd.com Signed-off-by: Rob Herring .../devicetree/bindings/pci/xilinx-nwl-pcie.txt | 73 ---------- .../devicetree/bindings/pci/xlnx,nwl-pcie.yaml | 149 +++++++++++++++++++++ 2 files changed, 149 insertions(+), 73 deletions(-) commit 560e9ce100c4bcbab0d5f9f18f01006f2abffef8 Author: Thippeswamy Havalige Date: Fri Nov 11 11:07:08 2022 +0530 dt-bindings: PCI: xilinx-pcie: Convert to YAML schemas of Xilinx AXI PCIe Root Port Bridge Convert to YAML dtschemas of Xilinx AXI PCIe Root Port Bridge dt binding. Signed-off-by: Thippeswamy Havalige Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221111053709.1474323-1-thippeswamy.havalige@amd.com Signed-off-by: Rob Herring .../devicetree/bindings/pci/xilinx-pcie.txt | 88 ---------------------- .../bindings/pci/xlnx,axi-pcie-host.yaml | 88 ++++++++++++++++++++++ 2 files changed, 88 insertions(+), 88 deletions(-) commit 42597aa372f5d2f26f209c5db36b1cd098b27147 Author: Eduard Zingerman Date: Fri Nov 11 00:32:40 2022 +0200 libbpf: Hashmap.h update to fix build issues using LLVM14 A fix for the LLVM compilation error while building bpftool. Replaces the expression: _Static_assert((p) == NULL || ...) by expression: _Static_assert((__builtin_constant_p((p)) ? (p) == NULL : 0) || ...) When "p" is not a constant the former is not considered to be a constant expression by LLVM 14. The error was introduced in the following patch-set: [1]. The error was reported here: [2]. [1] https://lore.kernel.org/bpf/20221109142611.879983-1-eddyz87@gmail.com/ [2] https://lore.kernel.org/all/202211110355.BcGcbZxP-lkp@intel.com/ Reported-by: kernel test robot Fixes: c302378bc157 ("libbpf: Hashmap interface update to allow both long and void* keys/values") Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221110223240.1350810-1-eddyz87@gmail.com tools/lib/bpf/hashmap.h | 3 ++- tools/perf/util/hashmap.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 45af1d7aae7d5520d2858f8517a1342646f015db Author: Miaoqian Lin Date: Thu Nov 10 06:58:34 2022 +0400 module: Fix NULL vs IS_ERR checking for module_get_next_page The module_get_next_page() function return error pointers on error instead of NULL. Use IS_ERR() to check the return value to fix this. Fixes: b1ae6dc41eaa ("module: add in-kernel support for decompressing") Signed-off-by: Miaoqian Lin Reviewed-by: Dmitry Torokhov kernel/module/decompress.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 96a1a2412acba8c057c041833641d9b7dbf52170 Author: Rasmus Villemoes Date: Wed Oct 26 00:13:56 2022 +0200 kernel/params.c: defer most of param_sysfs_init() to late_initcall time param_sysfs_init(), and in particular param_sysfs_builtin() is rather time-consuming; for my board, it currently takes about 30ms. That amounts to about 3% of the time budget I have from U-Boot hands over control to linux and linux must assume responsibility for keeping the external watchdog happy. We must still continue to initialize module_kset at subsys_initcall time, since otherwise any request_module() would fail in mod_sysfs_init(). However, the bulk of the work in param_sysfs_builtin(), namely populating /sys/module/*/version and/or /sys/module/*/parameters/ for builtin modules, can be deferred to late_initcall time - there's no userspace yet anyway to observe contents of /sys or the lack thereof. Signed-off-by: Rasmus Villemoes Signed-off-by: Luis Chamberlain kernel/params.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 89a6b5917650edd1542194fd5b5ada64fb94a790 Author: Chen Zhongjin Date: Sat Sep 24 15:22:16 2022 +0800 module: Remove unused macros module_addr_min/max Unused macros reported by [-Wunused-macros]. These macros are introduced to record the bound address of modules. Commit 80b8bf436990 ("module: Always have struct mod_tree_root") made "struct mod_tree_root" always present and its members addr_min and addr_max can be directly accessed. Macros module_addr_min and module_addr_min are not used anymore, so remove them. Signed-off-by: Chen Zhongjin Reviewed-by: Miroslav Benes Reviewed-by: Christophe Leroy [mcgrof: massaged the commit messsage as suggested by Miroslav] Signed-off-by: Luis Chamberlain kernel/module/main.c | 3 --- 1 file changed, 3 deletions(-) commit 3cd60866d46050d14734cbbac41b00c8d3e51d61 Author: Rasmus Villemoes Date: Thu Sep 29 14:10:39 2022 +0200 module: remove redundant module_sysfs_initialized variable The variable module_sysfs_initialized is used for checking whether module_kset has been initialized. Checking module_kset itself works just fine for that. This is a leftover from commit 7405c1e15edf ("kset: convert /sys/module to use kset_create"). Signed-off-by: Rasmus Villemoes Reviewed-by: Miroslav Benes [mcgrof: adjusted commit log as suggested by Christophe Leroy] Signed-off-by: Luis Chamberlain include/linux/module.h | 1 - kernel/module/sysfs.c | 2 +- kernel/params.c | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) commit 967eaad1fed5f6335ea97a47d45214744dc57925 Author: Yangtao Li Date: Thu Nov 10 17:15:01 2022 +0800 f2fs: fix to set flush_merge opt and show noflush_merge Some minor modifications to flush_merge and related parameters: 1.The FLUSH_MERGE opt is set by default only in non-ro mode. 2.When ro and merge are set at the same time, an error is reported. 3.Display noflush_merge mount opt. Suggested-by: Chao Yu Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 92b4cf5b48955a4bdd15fe4e2067db8ebd87f04c Author: Tetsuo Handa Date: Wed Nov 9 07:04:42 2022 +0900 f2fs: initialize locks earlier in f2fs_fill_super() syzbot is reporting lockdep warning at f2fs_handle_error() [1], for spin_lock(&sbi->error_lock) is called before spin_lock_init() is called. For safe locking in error handling, move initialization of locks (and obvious structures) in f2fs_fill_super() to immediately after memory allocation. Link: https://syzkaller.appspot.com/bug?extid=40642be9b7e0bb28e0df [1] Reported-by: syzbot Signed-off-by: Tetsuo Handa Tested-by: syzbot Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit 59237a21776f70ffb0420611c23e7158e1317037 Author: Chao Yu Date: Tue Nov 8 22:33:21 2022 +0800 f2fs: optimize iteration over sparse directories Wei Chen reports a kernel bug as blew: INFO: task syz-executor.0:29056 blocked for more than 143 seconds. Not tainted 5.15.0-rc5 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.0 state:D stack:14632 pid:29056 ppid: 6574 flags:0x00000004 Call Trace: __schedule+0x4a1/0x1720 schedule+0x36/0xe0 rwsem_down_write_slowpath+0x322/0x7a0 fscrypt_ioctl_set_policy+0x11f/0x2a0 __f2fs_ioctl+0x1a9f/0x5780 f2fs_ioctl+0x89/0x3a0 __x64_sys_ioctl+0xe8/0x140 do_syscall_64+0x34/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae Eric did some investigation on this issue, quoted from reply of Eric: "Well, the quality of this bug report has a lot to be desired (not on upstream kernel, reproducer is full of totally irrelevant stuff, not sent to the mailing list of the filesystem whose disk image is being fuzzed, etc.). But what is going on is that f2fs_empty_dir() doesn't consider the case of a directory with an extremely large i_size on a malicious disk image. Specifically, the reproducer mounts an f2fs image with a directory that has an i_size of 14814520042850357248, then calls FS_IOC_SET_ENCRYPTION_POLICY on it. That results in a call to f2fs_empty_dir() to check whether the directory is empty. f2fs_empty_dir() then iterates through all 3616826182336513 blocks the directory allegedly contains to check whether any contain anything. i_rwsem is held during this, so anything else that tries to take it will hang." In order to solve this issue, let's use f2fs_get_next_page_offset() to speed up iteration by skipping holes for all below functions: - f2fs_empty_dir - f2fs_readdir - find_in_level The way why we can speed up iteration was described in 'commit 3cf4574705b4 ("f2fs: introduce get_next_page_offset to speed up SEEK_DATA")'. Meanwhile, in f2fs_empty_dir(), let's use f2fs_find_data_page() instead f2fs_get_lock_data_page(), due to i_rwsem was held in caller of f2fs_empty_dir(), there shouldn't be any races, so it's fine to not lock dentry page during lookuping dirents in the page. Link: https://lore.kernel.org/lkml/536944df-a0ae-1dd8-148f-510b476e1347@kernel.org/T/ Reported-by: Wei Chen Cc: Eric Biggers Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 17 ++++++++++++----- fs/f2fs/dir.c | 34 ++++++++++++++++++++++++---------- fs/f2fs/f2fs.h | 5 +++-- fs/f2fs/gc.c | 4 ++-- 4 files changed, 41 insertions(+), 19 deletions(-) commit cc249e4cba9a6002c9d9e1438daf8440a160bc9e Author: Chao Yu Date: Sun Nov 6 21:25:44 2022 +0800 f2fs: fix to avoid accessing uninitialized spinlock syzbot reports a kernel bug: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 assign_lock_key+0x22a/0x240 kernel/locking/lockdep.c:981 register_lock_class+0x287/0x9b0 kernel/locking/lockdep.c:1294 __lock_acquire+0xe4/0x1f60 kernel/locking/lockdep.c:4934 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:350 [inline] f2fs_save_errors fs/f2fs/super.c:3868 [inline] f2fs_handle_error+0x29/0x230 fs/f2fs/super.c:3896 f2fs_iget+0x215/0x4bb0 fs/f2fs/inode.c:516 f2fs_fill_super+0x47d3/0x7b50 fs/f2fs/super.c:4222 mount_bdev+0x26c/0x3a0 fs/super.c:1401 legacy_get_tree+0xea/0x180 fs/fs_context.c:610 vfs_get_tree+0x88/0x270 fs/super.c:1531 do_new_mount+0x289/0xad0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd F2FS-fs (loop1): Failed to read F2FS meta data inode The root cause is if sbi->error_lock may be accessed before its initialization, fix it. Link: https://lore.kernel.org/linux-f2fs-devel/0000000000007edb6605ecbb6442@google.com/T/#u Reported-by: syzbot+40642be9b7e0bb28e0df@syzkaller.appspotmail.com Fixes: 95fa90c9e5a7 ("f2fs: support recording errors into superblock") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4d8d45df2252980f800c1b2fde941a103a18a70e Author: Daeho Jeong Date: Mon Oct 31 12:24:15 2022 -0700 f2fs: correct i_size change for atomic writes We need to make sure i_size doesn't change until atomic write commit is successful and restore it when commit is failed. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 8 ++++++++ fs/f2fs/file.c | 18 +++++++++++------- fs/f2fs/inode.c | 5 ++++- fs/f2fs/segment.c | 14 ++++++++++---- 4 files changed, 33 insertions(+), 12 deletions(-) commit 225d6795abf47c3340214ca1b4c22728e463db4f Author: Yangtao Li Date: Tue Oct 25 21:26:38 2022 +0800 f2fs: add proc entry to show discard_plist info This patch adds a new proc entry to show discard_plist information in more detail, which is very helpful to know the discard pend list count clearly. Such as: Discard pend list(Show diacrd_cmd count on each entry, .:not exist): 0 390 156 85 67 46 37 26 14 8 17 12 9 9 6 12 11 10 16 5 9 2 4 8 3 4 1 24 3 2 2 5 2 4 5 4 32 3 3 2 3 . 3 3 1 40 . 4 1 3 2 1 2 1 48 1 . 1 1 . 1 1 . 56 . 1 1 1 . 2 . 1 64 1 2 . . . . . . 72 . 1 . . . . . . 80 3 1 . . 1 1 . . 88 1 . . . 1 . . 1 ...... Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim fs/f2fs/sysfs.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit e6ecb142429183cef4835f31d4134050ae660032 Author: Jaegeuk Kim Date: Tue Nov 8 17:59:34 2022 -0800 f2fs: allow to read node block after shutdown If block address is still alive, we should give a valid node block even after shutdown. Otherwise, we can see zero data when reading out a file. Cc: stable@vger.kernel.org Fixes: 83a3bfdb5a8a ("f2fs: indicate shutdown f2fs to allow unmount successfully") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dacca1e5e75d7c1297f1334cdc10491dcdd1b2b8 Author: Tony W Wang-oc Date: Mon Nov 7 11:34:49 2022 +0800 x86/acpi/cstate: Optimize ARB_DISABLE on Centaur CPUs On all recent Centaur platforms, ARB_DISABLE is handled by PMU automatically while entering C3 type state. No need for OS to issue the ARB_DISABLE, so set bm_control to zero to indicate that. Signed-off-by: Tony W Wang-oc Signed-off-by: Dave Hansen Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/all/1667792089-4904-1-git-send-email-TonyWWang-oc%40zhaoxin.com arch/x86/kernel/acpi/cstate.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 350c9ae268ed2f1f0a4dde28e24d88fe5c5eef32 Merge: b85560f78053 1fdce1deff98 Author: Mark Brown Date: Fri Nov 11 17:33:41 2022 +0000 ASoC: Intel: add new Dell devices support Merge series from Bard Liao : Add 2 Dell SKU support. commit b85560f7805358e5860a8dac78c7591d919353b3 Merge: 1985fa962a6d 8dcc205931b0 Author: Mark Brown Date: Fri Nov 11 17:33:35 2022 +0000 ASoC: Intel: add more ACPI tables/quirks for RPL/MTL Merge series from Pierre-Louis Bossart : Add support for two RaptorLake SoundWire SKUs and one test board for MeteorLake. There will be additional RaptorLake SKUs shared when validation is complete. commit 1985fa962a6dd8fc002cbf7b2c894ebcc44b2eb2 Author: Kuninori Morimoto Date: Fri Nov 11 04:34:51 2022 +0000 ASoC: audio-graph-card2: remove Experimental announce Audio Graph Card2 has been announcing "Audio Graph Card2 is still under Experimental stage", but it is time to remove it. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k042nm6s.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card2.c | 3 --- 1 file changed, 3 deletions(-) commit e045595be3c1548e1164f3d402cef990425b6195 Author: Krzysztof Kozlowski Date: Fri Nov 11 10:13:28 2022 +0100 ASoC: qcom: q6prm: Correct module description The description was copied from APM driver. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221111091328.31549-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/q6prm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be66e67f175096f283c9d5614c4991fc9e7ed975 Author: Will Deacon Date: Thu Nov 10 19:02:59 2022 +0000 KVM: arm64: Use the pKVM hyp vCPU structure in handle___kvm_vcpu_run() As a stepping stone towards deprivileging the host's access to the guest's vCPU structures, introduce some naive flush/sync routines to copy most of the host vCPU into the hyp vCPU on vCPU run and back again on return to EL1. This allows us to run using the pKVM hyp structures when KVM is initialised in protected mode. Tested-by: Vincent Donnefort Co-developed-by: Fuad Tabba Signed-off-by: Fuad Tabba Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-27-will@kernel.org arch/arm64/kvm/hyp/include/nvhe/pkvm.h | 4 ++ arch/arm64/kvm/hyp/nvhe/hyp-main.c | 79 +++++++++++++++++++++++++++++++++- arch/arm64/kvm/hyp/nvhe/pkvm.c | 28 ++++++++++++ 3 files changed, 109 insertions(+), 2 deletions(-) commit 169cd0f8238f2598b85d2db2e15828e8f8da18e5 Author: Quentin Perret Date: Thu Nov 10 19:02:57 2022 +0000 KVM: arm64: Don't unnecessarily map host kernel sections at EL2 We no longer need to map the host's '.rodata' and '.bss' sections in the stage-1 page-table of the pKVM hypervisor at EL2, so remove those mappings and avoid creating any future dependencies at EL2 on host-controlled data structures. Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-25-will@kernel.org arch/arm64/kernel/image-vars.h | 6 ------ arch/arm64/kvm/hyp/nvhe/setup.c | 14 +++----------- 2 files changed, 3 insertions(+), 17 deletions(-) commit 27eb26bfff5d358d42911d04bbecc62e659ec32b Author: Quentin Perret Date: Thu Nov 10 19:02:56 2022 +0000 KVM: arm64: Explicitly map 'kvm_vgic_global_state' at EL2 The pkvm hypervisor at EL2 may need to read the 'kvm_vgic_global_state' variable from the host, for example when saving and restoring the state of the virtual GIC. Explicitly map 'kvm_vgic_global_state' in the stage-1 page-table of the pKVM hypervisor rather than relying on mapping all of the host '.rodata' section. Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-24-will@kernel.org arch/arm64/kvm/hyp/nvhe/setup.c | 5 +++++ 1 file changed, 5 insertions(+) commit 73f38ef2ae531b180685173e0923225551434fcb Author: Will Deacon Date: Thu Nov 10 19:02:55 2022 +0000 KVM: arm64: Maintain a copy of 'kvm_arm_vmid_bits' at EL2 Sharing 'kvm_arm_vmid_bits' between EL1 and EL2 allows the host to modify the variable arbitrarily, potentially leading to all sorts of shenanians as this is used to configure the VTTBR register for the guest stage-2. In preparation for unmapping host sections entirely from EL2, maintain a copy of 'kvm_arm_vmid_bits' in the pKVM hypervisor and initialise it from the host value while it is still trusted. Tested-by: Vincent Donnefort Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-23-will@kernel.org arch/arm64/include/asm/kvm_hyp.h | 2 ++ arch/arm64/kernel/image-vars.h | 3 --- arch/arm64/kvm/arm.c | 1 + arch/arm64/kvm/hyp/nvhe/pkvm.c | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) commit fe41a7f8c0ee3ee2f682f8c28c7e1c5ff2be8a79 Author: Quentin Perret Date: Thu Nov 10 19:02:54 2022 +0000 KVM: arm64: Unmap 'kvm_arm_hyp_percpu_base' from the host When pKVM is enabled, the hypervisor at EL2 does not trust the host at EL1 and must therefore prevent it from having unrestricted access to internal hypervisor state. The 'kvm_arm_hyp_percpu_base' array holds the offsets for hypervisor per-cpu allocations, so move this this into the nVHE code where it cannot be modified by the untrusted host at EL1. Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-22-will@kernel.org arch/arm64/include/asm/kvm_asm.h | 4 ++-- arch/arm64/kernel/image-vars.h | 3 --- arch/arm64/kvm/arm.c | 9 ++++----- arch/arm64/kvm/hyp/nvhe/hyp-smp.c | 2 ++ 4 files changed, 8 insertions(+), 10 deletions(-) commit f41dff4efb918db68923a826e966ca62c7c8e929 Author: Quentin Perret Date: Thu Nov 10 19:02:53 2022 +0000 KVM: arm64: Return guest memory from EL2 via dedicated teardown memcache Rather than relying on the host to free the previously-donated pKVM hypervisor VM pages explicitly on teardown, introduce a dedicated teardown memcache which allows the host to reclaim guest memory resources without having to keep track of all of the allocations made by the pKVM hypervisor at EL2. Tested-by: Vincent Donnefort Co-developed-by: Fuad Tabba Signed-off-by: Fuad Tabba Signed-off-by: Quentin Perret Signed-off-by: Will Deacon [maz: dropped __maybe_unused from unmap_donated_memory_noclear()] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-21-will@kernel.org arch/arm64/include/asm/kvm_host.h | 7 +----- arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 2 +- arch/arm64/kvm/hyp/nvhe/mem_protect.c | 17 +++++++++------ arch/arm64/kvm/hyp/nvhe/pkvm.c | 27 +++++++++++++++++------ arch/arm64/kvm/pkvm.c | 31 ++++++--------------------- 5 files changed, 40 insertions(+), 44 deletions(-) commit 60dfe093ec13b056856c672e1daa35134be38283 Author: Quentin Perret Date: Thu Nov 10 19:02:52 2022 +0000 KVM: arm64: Instantiate guest stage-2 page-tables at EL2 Extend the initialisation of guest data structures within the pKVM hypervisor at EL2 so that we instantiate a memory pool and a full 'struct kvm_s2_mmu' structure for each VM, with a stage-2 page-table entirely independent from the one managed by the host at EL1. The 'struct kvm_pgtable_mm_ops' used by the page-table code is populated with a set of callbacks that can manage guest pages in the hypervisor without any direct intervention from the host, allocating page-table pages from the provided pool and returning these to the host on VM teardown. To keep things simple, the stage-2 MMU for the guest is configured identically to the host stage-2 in the VTCR register and so the IPA size of the guest must match the PA size of the host. For now, the new page-table is unused as there is no way for the host to map anything into it. Yet. Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-20-will@kernel.org arch/arm64/kvm/hyp/include/nvhe/pkvm.h | 6 ++ arch/arm64/kvm/hyp/nvhe/mem_protect.c | 125 ++++++++++++++++++++++++++++++++- arch/arm64/kvm/mmu.c | 4 +- 3 files changed, 132 insertions(+), 3 deletions(-) commit 315775ff7c6de497dd07c3f6eff499fb538783eb Author: Quentin Perret Date: Thu Nov 10 19:02:51 2022 +0000 KVM: arm64: Consolidate stage-2 initialisation into a single function The initialisation of guest stage-2 page-tables is currently split across two functions: kvm_init_stage2_mmu() and kvm_arm_setup_stage2(). That is presumably for historical reasons as kvm_arm_setup_stage2() originates from the (now defunct) KVM port for 32-bit Arm. Simplify this code path by merging both functions into one, taking care to map the 'struct kvm' into the hypervisor stage-1 early on in order to simplify the failure path. Tested-by: Vincent Donnefort Co-developed-by: Fuad Tabba Signed-off-by: Fuad Tabba Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-19-will@kernel.org arch/arm64/include/asm/kvm_arm.h | 2 +- arch/arm64/include/asm/kvm_host.h | 2 -- arch/arm64/include/asm/kvm_mmu.h | 2 +- arch/arm64/kvm/arm.c | 27 +++++++++++++-------------- arch/arm64/kvm/mmu.c | 27 ++++++++++++++++++++++++++- arch/arm64/kvm/reset.c | 29 ----------------------------- 6 files changed, 41 insertions(+), 48 deletions(-) commit 717a7eebac106a5cc5d5493f8eef9cf4ae6edf19 Author: Quentin Perret Date: Thu Nov 10 19:02:50 2022 +0000 KVM: arm64: Add generic hyp_memcache helpers The host at EL1 and the pKVM hypervisor at EL2 will soon need to exchange memory pages dynamically for creating and destroying VM state. Indeed, the hypervisor will rely on the host to donate memory pages it can use to create guest stage-2 page-tables and to store VM and vCPU metadata. In order to ease this process, introduce a 'struct hyp_memcache' which is essentially a linked list of available pages, indexed by physical addresses so that it can be passed meaningfully between the different virtual address spaces configured at EL1 and EL2. Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-18-will@kernel.org arch/arm64/include/asm/kvm_host.h | 57 +++++++++++++++++++++++++++ arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 2 + arch/arm64/kvm/hyp/nvhe/mm.c | 33 ++++++++++++++++ arch/arm64/kvm/mmu.c | 26 ++++++++++++ 4 files changed, 118 insertions(+) commit 13e248aab73d2f1c27b458ef09d38b44f3e5bf2e Author: Will Deacon Date: Thu Nov 10 19:02:49 2022 +0000 KVM: arm64: Provide I-cache invalidation by virtual address at EL2 In preparation for handling cache maintenance of guest pages from within the pKVM hypervisor at EL2, introduce an EL2 copy of icache_inval_pou() which will later be plumbed into the stage-2 page-table cache maintenance callbacks, ensuring that the initial contents of pages mapped as executable into the guest stage-2 page-table is visible to the instruction fetcher. Tested-by: Vincent Donnefort Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-17-will@kernel.org arch/arm64/include/asm/kvm_hyp.h | 1 + arch/arm64/kernel/image-vars.h | 3 --- arch/arm64/kvm/arm.c | 1 + arch/arm64/kvm/hyp/nvhe/cache.S | 11 +++++++++++ arch/arm64/kvm/hyp/nvhe/pkvm.c | 3 +++ 5 files changed, 16 insertions(+), 3 deletions(-) commit 6c165223e9a6384aa1e934b90f2650e71adb972a Author: Will Deacon Date: Thu Nov 10 19:02:48 2022 +0000 KVM: arm64: Initialise hypervisor copies of host symbols unconditionally The nVHE object at EL2 maintains its own copies of some host variables so that, when pKVM is enabled, the host cannot directly modify the hypervisor state. When running in normal nVHE mode, however, these variables are still mirrored at EL2 but are not initialised. Initialise the hypervisor symbols from the host copies regardless of pKVM, ensuring that any reference to this data at EL2 with normal nVHE will return a sensibly initialised value. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Vincent Donnefort Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-16-will@kernel.org arch/arm64/kvm/arm.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit aa6948f82f0b7060fbbac21911dc7996b144ba3c Author: Quentin Perret Date: Thu Nov 10 19:02:47 2022 +0000 KVM: arm64: Add per-cpu fixmap infrastructure at EL2 Mapping pages in a guest page-table from within the pKVM hypervisor at EL2 may require cache maintenance to ensure that the initialised page contents is visible even to non-cacheable (e.g. MMU-off) accesses from the guest. In preparation for performing this maintenance at EL2, introduce a per-vCPU fixmap which allows the pKVM hypervisor to map guest pages temporarily into its stage-1 page-table for the purposes of cache maintenance and, in future, poisoning on the reclaim path. The use of a fixmap avoids the need for memory allocation or locking on the map() path. Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Co-developed-by: Will Deacon Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-15-will@kernel.org arch/arm64/include/asm/kvm_pgtable.h | 14 ++++ arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 2 + arch/arm64/kvm/hyp/include/nvhe/mm.h | 4 + arch/arm64/kvm/hyp/nvhe/mem_protect.c | 1 - arch/arm64/kvm/hyp/nvhe/mm.c | 104 ++++++++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/setup.c | 4 + arch/arm64/kvm/hyp/pgtable.c | 12 --- 7 files changed, 128 insertions(+), 13 deletions(-) commit 9d0c063a4d1d10ef8e6288899b8524413e40cfa0 Author: Fuad Tabba Date: Thu Nov 10 19:02:46 2022 +0000 KVM: arm64: Instantiate pKVM hypervisor VM and vCPU structures from EL1 With the pKVM hypervisor at EL2 now offering hypercalls to the host for creating and destroying VM and vCPU structures, plumb these in to the existing arm64 KVM backend to ensure that the hypervisor data structures are allocated and initialised on first vCPU run for a pKVM guest. In the host, 'struct kvm_protected_vm' is introduced to hold the handle of the pKVM VM instance as well as to track references to the memory donated to the hypervisor so that it can be freed back to the host allocator following VM teardown. The stage-2 page-table, hypervisor VM and vCPU structures are allocated separately so as to avoid the need for a large physically-contiguous allocation in the host at run-time. Tested-by: Vincent Donnefort Signed-off-by: Fuad Tabba Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-14-will@kernel.org arch/arm64/include/asm/kvm_host.h | 14 +++- arch/arm64/include/asm/kvm_pkvm.h | 4 ++ arch/arm64/kvm/arm.c | 14 ++++ arch/arm64/kvm/hyp/hyp-constants.c | 3 + arch/arm64/kvm/hyp/nvhe/pkvm.c | 15 ++-- arch/arm64/kvm/pkvm.c | 138 +++++++++++++++++++++++++++++++++++++ 6 files changed, 182 insertions(+), 6 deletions(-) commit a1ec5c70d3f63d8a143fb83cd7f53bd8ff2f72c8 Author: Fuad Tabba Date: Thu Nov 10 19:02:45 2022 +0000 KVM: arm64: Add infrastructure to create and track pKVM instances at EL2 Introduce a global table (and lock) to track pKVM instances at EL2, and provide hypercalls that can be used by the untrusted host to create and destroy pKVM VMs and their vCPUs. pKVM VM/vCPU state is directly accessible only by the trusted hypervisor (EL2). Each pKVM VM is directly associated with an untrusted host KVM instance, and is referenced by the host using an opaque handle. Future patches will provide hypercalls to allow the host to initialize/set/get pKVM VM/vCPU state using the opaque handle. Tested-by: Vincent Donnefort Signed-off-by: Fuad Tabba Co-developed-by: Will Deacon Signed-off-by: Will Deacon [maz: silence warning on unmap_donated_memory_noclear()] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-13-will@kernel.org arch/arm64/include/asm/kvm_asm.h | 3 + arch/arm64/include/asm/kvm_host.h | 8 + arch/arm64/include/asm/kvm_pgtable.h | 8 + arch/arm64/include/asm/kvm_pkvm.h | 8 + arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 3 + arch/arm64/kvm/hyp/include/nvhe/pkvm.h | 58 ++++ arch/arm64/kvm/hyp/nvhe/hyp-main.c | 31 +++ arch/arm64/kvm/hyp/nvhe/mem_protect.c | 14 + arch/arm64/kvm/hyp/nvhe/pkvm.c | 380 ++++++++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/setup.c | 8 + arch/arm64/kvm/hyp/pgtable.c | 9 + arch/arm64/kvm/pkvm.c | 1 + 12 files changed, 531 insertions(+) commit e5fa3ccad328bdfc6d118874b7a2bf89178f076b Merge: 9f63869a5682 cf6946d95005 Author: Mark Brown Date: Fri Nov 11 17:01:39 2022 +0000 ASoC: Set BQ parameters for some Dell models There are some Dell SKUs that need to set the parameters of the crossover filter (biquad). Each amplifier connects to one tweeter speaker and one woofer speaker. We should control HPF/LPF to output the proper frequency for the different speakers. If the codec driver got the BQ parameters from the device property, it will apply these parameters to the hardware. commit 5304002dc3754a5663d75c977bfa2d9e3c08906d Author: Will Deacon Date: Thu Nov 10 19:02:44 2022 +0000 KVM: arm64: Rename 'host_kvm' to 'host_mmu' In preparation for introducing VM and vCPU state at EL2, rename the existing 'struct host_kvm' and its singleton 'host_kvm' instance to 'host_mmu' so as to avoid confusion between the structure tracking the host stage-2 MMU state and the host instance of a 'struct kvm' for a protected guest. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Vincent Donnefort Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-12-will@kernel.org arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 6 ++-- arch/arm64/kvm/hyp/nvhe/mem_protect.c | 46 +++++++++++++-------------- 2 files changed, 26 insertions(+), 26 deletions(-) commit 1c80002e3264552d8b9c0e162e09aa4087403716 Author: Fuad Tabba Date: Thu Nov 10 19:02:43 2022 +0000 KVM: arm64: Add hyp_spinlock_t static initializer Introduce a static initializer macro for 'hyp_spinlock_t' so that it is straightforward to instantiate global locks at EL2. This will be later utilised for locking the VM table in the hypervisor. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Vincent Donnefort Signed-off-by: Fuad Tabba Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-11-will@kernel.org arch/arm64/kvm/hyp/include/nvhe/spinlock.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 4d968b12e6bbe4440f4f220c41d779e02df8af1a Author: Will Deacon Date: Thu Nov 10 19:02:42 2022 +0000 KVM: arm64: Include asm/kvm_mmu.h in nvhe/mem_protect.h nvhe/mem_protect.h refers to __load_stage2() in the definition of __load_host_stage2() but doesn't include the relevant header. Include asm/kvm_mmu.h in nvhe/mem_protect.h so that users of the latter don't have to do this themselves. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Vincent Donnefort Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-10-will@kernel.org arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 1 + 1 file changed, 1 insertion(+) commit 9926cfce8dcb880255f30ab9ac930add787e1ead Author: Quentin Perret Date: Thu Nov 10 19:02:41 2022 +0000 KVM: arm64: Add helpers to pin memory shared with the hypervisor at EL2 Add helpers allowing the hypervisor to check whether a range of pages are currently shared by the host, and 'pin' them if so by blocking host unshare operations until the memory has been unpinned. This will allow the hypervisor to take references on host-provided data-structures (e.g. 'struct kvm') with the guarantee that these pages will remain in a stable state until the hypervisor decides to release them, for example during guest teardown. Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-9-will@kernel.org arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 3 ++ arch/arm64/kvm/hyp/include/nvhe/memory.h | 7 +++- arch/arm64/kvm/hyp/nvhe/mem_protect.c | 48 +++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) commit 43c1ff8b75011bc3e3e923adf31ba815864a2494 Author: Quentin Perret Date: Thu Nov 10 19:02:40 2022 +0000 KVM: arm64: Prevent the donation of no-map pages Memory regions marked as "no-map" in the host device-tree routinely include TrustZone carev-outs and DMA pools. Although donating such pages to the hypervisor may not breach confidentiality, it could be used to corrupt its state in uncontrollable ways. To prevent this, let's block host-initiated memory transitions targeting "no-map" pages altogether in nVHE protected mode as there should be no valid reason to do this in current operation. Thankfully, the pKVM EL2 hypervisor has a full copy of the host's list of memblock regions, so we can easily check for the presence of the MEMBLOCK_NOMAP flag on a region containing pages being donated from the host. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-8-will@kernel.org arch/arm64/kvm/hyp/nvhe/mem_protect.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 1ed5c24c26f48ff61dc5d97c655769821f36a622 Author: Will Deacon Date: Thu Nov 10 19:02:39 2022 +0000 KVM: arm64: Implement do_donate() helper for donating memory Transferring ownership information of a memory region from one component to another can be achieved using a "donate" operation, which results in the previous owner losing access to the underlying pages entirely and the new owner having exclusive access to the page. Implement a do_donate() helper, along the same lines as do_{un,}share, and provide this functionality for the host-{to,from}-hyp cases as this will later be used to donate/reclaim memory pages to store VM metadata at EL2. In a similar manner to the sharing transitions, permission checks are performed by the hypervisor to ensure that the component initiating the transition really is the owner of the page and also that the completer does not currently have a page mapped at the target address. Tested-by: Vincent Donnefort Co-developed-by: Quentin Perret Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-7-will@kernel.org arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 2 + arch/arm64/kvm/hyp/nvhe/mem_protect.c | 239 ++++++++++++++++++++++++++ 2 files changed, 241 insertions(+) commit 33bc332d4061e95db55594893c4f80105b1dd813 Author: Will Deacon Date: Thu Nov 10 19:02:38 2022 +0000 KVM: arm64: Unify identifiers used to distinguish host and hypervisor The 'pkvm_component_id' enum type provides constants to refer to the host and the hypervisor, yet this information is duplicated by the 'pkvm_hyp_id' constant. Remove the definition of 'pkvm_hyp_id' and move the 'pkvm_component_id' type definition to 'mem_protect.h' so that it can be used outside of the memory protection code, for example when initialising the owner for hypervisor-owned pages. Reviewed-by: Oliver Upton Reviewed-by: Philippe Mathieu-Daudé Tested-by: Vincent Donnefort Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-6-will@kernel.org arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 6 +++++- arch/arm64/kvm/hyp/nvhe/mem_protect.c | 8 -------- arch/arm64/kvm/hyp/nvhe/setup.c | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) commit 0d16d12eb26ef85602ef8a678d94825a66772774 Author: Quentin Perret Date: Thu Nov 10 19:02:37 2022 +0000 KVM: arm64: Fix-up hyp stage-1 refcounts for all pages mapped at EL2 In order to allow unmapping arbitrary memory pages from the hypervisor stage-1 page-table, fix-up the initial refcount for pages that have been mapped before the 'vmemmap' array was up and running so that it accurately accounts for all existing hypervisor mappings. This is achieved by traversing the entire hypervisor stage-1 page-table during initialisation of EL2 and updating the corresponding 'struct hyp_page' for each valid mapping. Reviewed-by: Oliver Upton Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-5-will@kernel.org arch/arm64/kvm/hyp/nvhe/setup.c | 62 ++++++++++++++++++++++++++++------------- 1 file changed, 43 insertions(+), 19 deletions(-) commit 8e6bcc3a4502a0d8d065466efd888b6b59b85789 Author: Quentin Perret Date: Thu Nov 10 19:02:36 2022 +0000 KVM: arm64: Back the hypervisor 'struct hyp_page' array for all memory The EL2 'vmemmap' array in nVHE Protected mode is currently very sparse: only memory pages owned by the hypervisor itself have a matching 'struct hyp_page'. However, as the size of this struct has been reduced significantly since its introduction, it appears that we can now afford to back the vmemmap for all of memory. Having an easily accessible 'struct hyp_page' for every physical page in memory provides the hypervisor with a simple mechanism to store metadata (e.g. a refcount) that wouldn't otherwise fit in the very limited number of software bits available in the host stage-2 page-table entries. This will be used in subsequent patches when pinning host memory pages for use by the hypervisor at EL2. Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-4-will@kernel.org arch/arm64/include/asm/kvm_pkvm.h | 26 ++++++++++++++++++++++++++ arch/arm64/kvm/hyp/include/nvhe/mm.h | 14 +------------- arch/arm64/kvm/hyp/nvhe/mm.c | 31 +++++++++++++++++++++++++++---- arch/arm64/kvm/hyp/nvhe/page_alloc.c | 4 +--- arch/arm64/kvm/hyp/nvhe/setup.c | 7 +++---- arch/arm64/kvm/pkvm.c | 18 ++---------------- 6 files changed, 60 insertions(+), 40 deletions(-) commit 72a5bc0f153ce8ca80e9abbd1d9adec7d586915a Author: Quentin Perret Date: Thu Nov 10 19:02:35 2022 +0000 KVM: arm64: Allow attaching of non-coalescable pages to a hyp pool All the contiguous pages used to initialize a 'struct hyp_pool' are considered coalescable, which means that the hyp page allocator will actively try to merge them with their buddies on the hyp_put_page() path. However, using hyp_put_page() on a page that is not part of the inital memory range given to a hyp_pool() is currently unsupported. In order to allow dynamically extending hyp pools at run-time, add a check to __hyp_attach_page() to allow inserting 'external' pages into the free-list of order 0. This will be necessary to allow lazy donation of pages from the host to the hypervisor when allocating guest stage-2 page-table pages at EL2. Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-3-will@kernel.org arch/arm64/kvm/hyp/nvhe/page_alloc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0f4f7ae10ee4e6403659b2d9ddf05424eecde45b Author: Quentin Perret Date: Thu Nov 10 19:02:34 2022 +0000 KVM: arm64: Move hyp refcount manipulation helpers to common header file We will soon need to manipulate 'struct hyp_page' refcounts from outside page_alloc.c, so move the helpers to a common header file to allow them to be reused easily. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Oliver Upton Tested-by: Vincent Donnefort Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110190259.26861-2-will@kernel.org arch/arm64/kvm/hyp/include/nvhe/memory.h | 22 ++++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/page_alloc.c | 19 ------------------- 2 files changed, 22 insertions(+), 19 deletions(-) commit e1b3253340029b06f5f648d8390807cba4e4ec23 Author: Zhiyuan Dai Date: Sun Nov 6 20:30:40 2022 +0800 KVM: arm64: Fix typo in comment Fix typo in comment (nVHE/VHE). Signed-off-by: Zhiyuan Dai Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1667737840-702-1-git-send-email-daizhiyuan@phytium.com.cn arch/arm64/kvm/hyp/vhe/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83f8a81dece8bc4237d8d94af357fb5df0083e63 Author: Usama Arif Date: Thu Nov 3 13:12:10 2022 +0000 KVM: arm64: Fix pvtime documentation This includes table format and using reST labels for cross-referencing to vcpu.rst. Suggested-by: Bagas Sanjaya Signed-off-by: Usama Arif Reviewed-by: Steven Price Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221103131210.3603385-1-usama.arif@bytedance.com Documentation/virt/kvm/arm/pvtime.rst | 14 ++++++++------ Documentation/virt/kvm/devices/vcpu.rst | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) commit ae6b9a65af480144da323436d90e149501ea8937 Author: Sascha Hauer Date: Tue Nov 1 10:57:14 2022 +0100 PCI: imx6: Initialize PHY before deasserting core reset When the PHY is the reference clock provider then it must be initialized and powered on before the reset on the client is deasserted, otherwise the link will never come up. The order was changed in cf236e0c0d59. Restore the correct order to make the driver work again on boards where the PHY provides the reference clock. This also changes the order for boards where the Soc is the PHY reference clock divider, but this shouldn't do any harm. Link: https://lore.kernel.org/r/20221101095714.440001-1-s.hauer@pengutronix.de Fixes: cf236e0c0d59 ("PCI: imx6: Do not hide PHY driver callbacks and refine the error handling") Tested-by: Richard Zhu Signed-off-by: Sascha Hauer Signed-off-by: Lorenzo Pieralisi drivers/pci/controller/dwc/pci-imx6.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 4f8126bb2308066b877859e4b5923ffb54143630 Author: Gabriel Krisman Bertazi Date: Sat Nov 5 19:10:55 2022 -0400 sbitmap: Use single per-bitmap counting to wake up queued tags sbitmap suffers from code complexity, as demonstrated by recent fixes, and eventual lost wake ups on nested I/O completion. The later happens, from what I understand, due to the non-atomic nature of the updates to wait_cnt, which needs to be subtracted and eventually reset when equal to zero. This two step process can eventually miss an update when a nested completion happens to interrupt the CPU in between the wait_cnt updates. This is very hard to fix, as shown by the recent changes to this code. The code complexity arises mostly from the corner cases to avoid missed wakes in this scenario. In addition, the handling of wake_batch recalculation plus the synchronization with sbq_queue_wake_up is non-trivial. This patchset implements the idea originally proposed by Jan [1], which removes the need for the two-step updates of wait_cnt. This is done by tracking the number of completions and wakeups in always increasing, per-bitmap counters. Instead of having to reset the wait_cnt when it reaches zero, we simply keep counting, and attempt to wake up N threads in a single wait queue whenever there is enough space for a batch. Waking up less than batch_wake shouldn't be a problem, because we haven't changed the conditions for wake up, and the existing batch calculation guarantees at least enough remaining completions to wake up a batch for each queue at any time. Performance-wise, one should expect very similar performance to the original algorithm for the case where there is no queueing. In both the old algorithm and this implementation, the first thing is to check ws_active, which bails out if there is no queueing to be managed. In the new code, we took care to avoid accounting completions and wakeups when there is no queueing, to not pay the cost of atomic operations unnecessarily, since it doesn't skew the numbers. For more interesting cases, where there is queueing, we need to take into account the cross-communication of the atomic operations. I've been benchmarking by running parallel fio jobs against a single hctx nullb in different hardware queue depth scenarios, and verifying both IOPS and queueing. Each experiment was repeated 5 times on a 20-CPU box, with 20 parallel jobs. fio was issuing fixed-size randwrites with qd=64 against nullb, varying only the hardware queue length per test. queue size 2 4 8 16 32 64 6.1-rc2 1681.1K (1.6K) 2633.0K (12.7K) 6940.8K (16.3K) 8172.3K (617.5K) 8391.7K (367.1K) 8606.1K (351.2K) patched 1721.8K (15.1K) 3016.7K (3.8K) 7543.0K (89.4K) 8132.5K (303.4K) 8324.2K (230.6K) 8401.8K (284.7K) The following is a similar experiment, ran against a nullb with a single bitmap shared by 20 hctx spread across 2 NUMA nodes. This has 40 parallel fio jobs operating on the same device queue size 2 4 8 16 32 64 6.1-rc2 1081.0K (2.3K) 957.2K (1.5K) 1699.1K (5.7K) 6178.2K (124.6K) 12227.9K (37.7K) 13286.6K (92.9K) patched 1081.8K (2.8K) 1316.5K (5.4K) 2364.4K (1.8K) 6151.4K (20.0K) 11893.6K (17.5K) 12385.6K (18.4K) It has also survived blktests and a 12h-stress run against nullb. I also ran the code against nvme and a scsi SSD, and I didn't observe performance regression in those. If there are other tests you think I should run, please let me know and I will follow up with results. [1] https://lore.kernel.org/all/aef9de29-e9f5-259a-f8be-12d1b734e72@google.com/ Cc: Hugh Dickins Cc: Keith Busch Cc: Liu Song Suggested-by: Jan Kara Signed-off-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20221105231055.25953-1-krisman@suse.de Signed-off-by: Jens Axboe include/linux/sbitmap.h | 16 +++++-- lib/sbitmap.c | 122 +++++++++++------------------------------------- 2 files changed, 37 insertions(+), 101 deletions(-) commit 9df38728f78c544a8edab8acf2e4d3eee73dfaeb Author: Antonio Gomes Date: Fri Nov 4 19:04:23 2022 -0300 drm/nouveau: Add support to control backlight using bl_power for nva3. Summary: * Add support to turn on/off backlight when changing values in bl_power file. This is achieved by using function backlight_get_brightness() in nva3_set_intensity to get current brightness. Test plan: * Turn off: echo 1 > /sys/class/backlight/nv_backlight/bl_power * Turn on: echo 0 > /sys/class/backlight/nv_backlight/bl_power Signed-off-by: Antonio Gomes Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20221104220424.41164-1-antoniospg100@gmail.com drivers/gpu/drm/nouveau/nouveau_backlight.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b4c8adc40f4918d77ab851fbc06415fb313d6c7f Author: Dipen Patel Date: Thu Nov 3 10:45:23 2022 -0700 arm64: defconfig: Enable HTE config Enable HTE core and tegra HTE provider by default as built in module. Signed-off-by: Dipen Patel Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 733827eea6f0fafd7e280c70800fcf47a724f72a Author: Riana Tauro Date: Wed Nov 9 16:55:41 2022 +0530 drm/i915/guc/slpc: Add selftest for slpc tile-tile interaction Run a workload on tiles simultaneously by requesting for RP0 frequency. Pcode can however limit the frequency being granted due to throttling reasons. This test checks if there is any throttling but does not fail if RP0 is not granted due to throttle reasons v2: Fix build error v3: Use IS_ERR_OR_NULL to check worker Addressed cosmetic review comments (Tvrtko) v4: do not skip test on media engines if gt type is GT_MEDIA. Use correct PERF_LIMIT_REASONS register for MTL (Vinay) Signed-off-by: Riana Tauro Reviewed-by: Vinay Belgaumkar Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221109112541.275021-2-riana.tauro@intel.com drivers/gpu/drm/i915/gt/selftest_slpc.c | 70 +++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 4 deletions(-) commit 2927cf85f4877f417f884919de8e04ab9b362d32 Author: Sumit Gupta Date: Wed Nov 9 19:27:17 2022 +0530 soc/tegra: cbb: Check firewall before enabling error reporting To enable error reporting for a fabric to CCPLEX, we need to write its register for enabling error interrupt to CCPLEX during boot and later clear the error status register after error occurs. If a fabric's registers are protected and not accessible from CCPLEX, then accessing the registers will cause CBB firewall error. Add support to check whether write access from CCPLEX to the registers of a fabric is not blocked by it's firewall before enabling error reporting to CCPLEX for that fabric. Fixes: fc2f151d2314 ("soc/tegra: cbb: Add driver for Tegra234 CBB 2.0") Signed-off-by: Sumit Gupta Signed-off-by: Thierry Reding drivers/soc/tegra/cbb/tegra234-cbb.c | 83 +++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) commit 55084947d6b48977c5122fbe443743a6c50c12bf Author: Sumit Gupta Date: Wed Nov 9 19:27:16 2022 +0530 soc/tegra: cbb: Add checks for potential out of bound errors Added checks to avoid potential out of bounds errors which can happen if the 'slave map' and 'CBB errors' arrays are not correct or latest where some entries are missing. Fixes: fc2f151d2314 ("soc/tegra: cbb: Add driver for Tegra234 CBB 2.0") Signed-off-by: Sumit Gupta Signed-off-by: Thierry Reding drivers/soc/tegra/cbb/tegra234-cbb.c | 42 ++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) commit cd1d719b47767f1970d02d18661122b649c35b00 Author: Sumit Gupta Date: Wed Nov 9 19:27:15 2022 +0530 soc/tegra: cbb: Update slave maps for Tegra234 Updating the slave map for fabrics and using the same maps for DCE, RCE and SCE as they all are a replica in Tegra234. Signed-off-by: Sumit Gupta Signed-off-by: Thierry Reding drivers/soc/tegra/cbb/tegra234-cbb.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) commit 33af51a652191d7b9fe449563594b0bdbeb93c2a Author: Sumit Gupta Date: Wed Nov 9 19:27:14 2022 +0530 soc/tegra: cbb: Use correct master_id mask for CBB NOC in Tegra194 In Tegra194 SoC, master_id bit range is different between cluster NOC and CBB NOC. Currently same bit range is used which results in wrong master_id value. Due to this, illegal accesses from the CCPLEX master do not result in a crash as expected. Fix this by using the correct range for the CBB NOC. Finally, it is only necessary to extract the master_id when the erd_mask_inband_err flag is set because when this is not set, a crash is always triggered. Fixes: b71344221466 ("soc/tegra: cbb: Add CBB 1.0 driver for Tegra194") Fixes: fc2f151d2314 ("soc/tegra: cbb: Add driver for Tegra234 CBB 2.0") Signed-off-by: Sumit Gupta Signed-off-by: Thierry Reding drivers/soc/tegra/cbb/tegra194-cbb.c | 14 +++++++------- drivers/soc/tegra/cbb/tegra234-cbb.c | 13 ++++++------- 2 files changed, 13 insertions(+), 14 deletions(-) commit d030bd1a66580b7b198a085e7220c794bcdc2770 Author: Bo Liu Date: Fri Nov 11 01:43:52 2022 -0500 ext2: Fix some kernel-doc warnings The current code provokes some kernel-doc warnings: fs/ext2/dir.c:417: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Bo Liu Acked-by: Randy Dunlap Signed-off-by: Jan Kara fs/ext2/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2759ddf7535d63381f9b9b1412e4c46e13ed773a Author: Shunsuke Mie Date: Mon Aug 15 11:50:06 2022 +0900 PCI: endpoint: Fix Kconfig indent style Change to follow the Kconfig style guide. This patch fixes to use tab rather than space to indent, while help text is indented an additional two spaces. Link: https://lore.kernel.org/r/20220815025006.48167-1-mie@igel.co.jp Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP") Signed-off-by: Shunsuke Mie Signed-off-by: Lorenzo Pieralisi drivers/pci/endpoint/functions/Kconfig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit dd1f1da4ada5d8ac774c2ebe97230637820b3323 Author: Steven Price Date: Thu Nov 10 11:45:48 2022 +0000 pwm: tegra: Fix 32 bit build The value of NSEC_PER_SEC << PWM_DUTY_WIDTH doesn't fix within a 32 bit integer causing a build warning/error (and the value truncated): drivers/pwm/pwm-tegra.c: In function ‘tegra_pwm_config’: drivers/pwm/pwm-tegra.c:148:53: error: result of ‘1000000000 << 8’ requires 39 bits to represent, but ‘long int’ only has 32 bits [-Werror=shift-overflow=] 148 | required_clk_rate = DIV_ROUND_UP_ULL(NSEC_PER_SEC << PWM_DUTY_WIDTH, | ^~ Explicitly cast to a u64 to ensure the correct result. Fixes: cfcb68817fb3 ("pwm: tegra: Improve required rate calculation") Signed-off-by: Steven Price Reviewed-by: Uwe Kleine-König Reviewed-by: Jon Hunter drivers/pwm/pwm-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bebf683ba6829f544011411580bcd620b7581087 Author: Kartik Date: Wed Nov 9 19:50:22 2022 +0530 soc/tegra: fuse: Use platform info with SoC revision Tegra pre-silicon platforms do not have chip revisions. This makes the revision SoC attribute meaningless on these platforms. Instead, populate the revision SoC attribute with a combination of the platform name and the chip revision for silicon platforms, and simply with the platform name on pre-silicon platforms. Signed-off-by: Kartik Reviewed-by: Arnd Bergmann Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding drivers/soc/tegra/fuse/fuse-tegra.c | 22 ++++++++++++++++++++-- drivers/soc/tegra/fuse/tegra-apbmisc.c | 1 + include/soc/tegra/fuse.h | 15 +++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) commit 1fdce1deff9863032ff8a0fb31f5dec6913d51cc Author: Gongjun Song Date: Fri Nov 11 12:50:16 2022 +0800 ASoC: Intel: soc-acpi: add SKU 0C40 SoundWire configuration Audio hardware configuration of SKU 0C40 product is rt711 on link2, two rt1316s on link0 and link1, rt714 on link 3. Reviewed-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Signed-off-by: Gongjun Song Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111045016.46573-5-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-rpl-match.c | 66 +++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit b9b8ec10de523cf22d00dce4ba7e37ffe93082b4 Author: Gongjun Song Date: Fri Nov 11 12:50:15 2022 +0800 ASoC: Intel: sof_sdw: Add support for SKU 0C40 product SKU 0C40 product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Reviewed-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Signed-off-by: Gongjun Song Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111045016.46573-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7472d8b0bb38ce9fa5f9b65eb690eca0e957b0e3 Author: Gongjun Song Date: Fri Nov 11 12:50:14 2022 +0800 ASoC: Intel: soc-acpi: add SKU 0C10 SoundWire configuration Audio hardware configuration of SKU 0C10 product is rt714 on link0, two rt1316s on link1 and link2 Reviewed-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Signed-off-by: Gongjun Song Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111045016.46573-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-rpl-match.c | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 013b5958de8a590510ea0432774cb5980d532652 Author: Gongjun Song Date: Fri Nov 11 12:50:13 2022 +0800 ASoC: Intel: sof_sdw: Add support for SKU 0C10 product SKU 0C10 product supports SoundWire capture from local microphone and two SoundWire amplifiers(no headset codec). Reviewed-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Signed-off-by: Gongjun Song Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221111045016.46573-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 801543b2593b04eef974a73d3ea03e7efbd5ffae Author: Jani Nikula Date: Wed Nov 9 17:35:22 2022 +0200 drm/i915: stop including i915_irq.h from i915_trace.h Turns out many of the files that need i915_reg.h get it implicitly via {display/intel_de.h, gt/intel_context.h} -> i915_trace.h -> i915_irq.h -> i915_reg.h. Since i915_trace.h doesn't actually need i915_irq.h, makes sense to drop it, but that requires adding quite a few new includes all over the place. Prefer including i915_reg.h where needed instead of adding another implicit include, because eventually we'll want to split up i915_reg.h and only include the specific registers at each place. Also some places actually needed i915_irq.h too. Cc: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/6e78a2e0ac1bffaf5af3b5ccc21dff05e6518cef.1668008071.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/g4x_dp.c | 1 + drivers/gpu/drm/i915/display/g4x_hdmi.c | 1 + drivers/gpu/drm/i915/display/i9xx_plane.c | 4 +++- drivers/gpu/drm/i915/display/icl_dsi.c | 1 + drivers/gpu/drm/i915/display/intel_backlight.c | 1 + drivers/gpu/drm/i915/display/intel_cdclk.c | 1 + drivers/gpu/drm/i915/display/intel_color.c | 1 + drivers/gpu/drm/i915/display/intel_combo_phy.c | 1 + drivers/gpu/drm/i915/display/intel_crt.c | 2 ++ drivers/gpu/drm/i915/display/intel_cursor.c | 3 ++- drivers/gpu/drm/i915/display/intel_ddi.c | 1 + drivers/gpu/drm/i915/display/intel_display.c | 1 + drivers/gpu/drm/i915/display/intel_display_debugfs.c | 2 ++ drivers/gpu/drm/i915/display/intel_dp.c | 1 + drivers/gpu/drm/i915/display/intel_dp_aux.c | 1 + drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 1 + drivers/gpu/drm/i915/display/intel_dp_mst.c | 1 + drivers/gpu/drm/i915/display/intel_dpio_phy.c | 1 + drivers/gpu/drm/i915/display/intel_dpll.c | 1 + drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 1 + drivers/gpu/drm/i915/display/intel_drrs.c | 1 + drivers/gpu/drm/i915/display/intel_dsb.c | 1 + drivers/gpu/drm/i915/display/intel_dvo.c | 1 + drivers/gpu/drm/i915/display/intel_fdi.c | 1 + drivers/gpu/drm/i915/display/intel_gmbus.c | 2 ++ drivers/gpu/drm/i915/display/intel_hdmi.c | 1 + drivers/gpu/drm/i915/display/intel_lpe_audio.c | 2 ++ drivers/gpu/drm/i915/display/intel_lspcon.c | 1 + drivers/gpu/drm/i915/display/intel_lvds.c | 1 + drivers/gpu/drm/i915/display/intel_modeset_setup.c | 1 + drivers/gpu/drm/i915/display/intel_panel.c | 1 + drivers/gpu/drm/i915/display/intel_pch_display.c | 1 + drivers/gpu/drm/i915/display/intel_pch_refclk.c | 1 + drivers/gpu/drm/i915/display/intel_pipe_crc.c | 2 ++ drivers/gpu/drm/i915/display/intel_pps.c | 1 + drivers/gpu/drm/i915/display/intel_psr.c | 1 + drivers/gpu/drm/i915/display/intel_sdvo.c | 1 + drivers/gpu/drm/i915/display/intel_snps_phy.c | 1 + drivers/gpu/drm/i915/display/intel_sprite.c | 1 + drivers/gpu/drm/i915/display/intel_tv.c | 2 ++ drivers/gpu/drm/i915/display/intel_vdsc.c | 1 + drivers/gpu/drm/i915/display/intel_vga.c | 1 + drivers/gpu/drm/i915/display/intel_vrr.c | 1 + drivers/gpu/drm/i915/display/skl_scaler.c | 2 ++ drivers/gpu/drm/i915/display/skl_universal_plane.c | 2 ++ drivers/gpu/drm/i915/display/vlv_dsi.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 1 + drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 1 + drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 ++ drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 1 + drivers/gpu/drm/i915/gt/intel_gt.c | 1 + drivers/gpu/drm/i915/gt/intel_gt_pm.c | 1 + drivers/gpu/drm/i915/gt/intel_gtt.c | 1 + drivers/gpu/drm/i915/gt/intel_ring_submission.c | 2 ++ drivers/gpu/drm/i915/gt/intel_workarounds.c | 1 + drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 1 + drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 + drivers/gpu/drm/i915/gvt/mmio_context.c | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 1 + drivers/gpu/drm/i915/i915_perf.c | 1 + drivers/gpu/drm/i915/i915_trace.h | 1 - drivers/gpu/drm/i915/intel_device_info.c | 3 ++- drivers/gpu/drm/i915/intel_uncore.c | 1 + 63 files changed, 76 insertions(+), 4 deletions(-) commit c4860af88d0cb1bb006df12615c5515ae509f73b Author: Johan Hovold Date: Wed Nov 2 10:07:05 2022 +0100 PCI: qcom: Add basic interconnect support On Qualcomm platforms like SC8280XP and SA8540P, interconnect bandwidth must be requested before enabling interconnect clocks. Add basic support for managing an optional "pcie-mem" interconnect path by setting a low constraint before enabling clocks and updating it after the link is up. Note that it is not possible for a controller driver to set anything but a maximum peak bandwidth as expected average bandwidth will vary with use case and actual use (and power policy?). This very much remains an unresolved problem with the interconnect framework. Also note that no constraint is set for the SC8280XP/SA8540P "cpu-pcie" path for now as it is not clear what an appropriate constraint would be (and the system does not crash when left unspecified). Link: https://lore.kernel.org/r/20221102090705.23634-3-johan+linaro@kernel.org Fixes: 70574511f3fc ("PCI: qcom: Add support for SC8280XP") Signed-off-by: Johan Hovold Signed-off-by: Lorenzo Pieralisi Reviewed-by: Brian Masney Reviewed-by: Manivannan Sadhasivam Acked-by: Georgi Djakov drivers/pci/controller/dwc/pcie-qcom.c | 76 ++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 3a936b2a5a581e50dd5cab20a48eb0055a527f02 Author: Johan Hovold Date: Wed Nov 2 10:07:04 2022 +0100 dt-bindings: PCI: qcom: Add SC8280XP/SA8540P interconnects Add the missing SC8280XP/SA8540P "pcie-mem" and "cpu-pcie" interconnect paths to the bindings. Link: https://lore.kernel.org/r/20221102090705.23634-2-johan+linaro@kernel.org Fixes: 76d777ae045e ("dt-bindings: PCI: qcom: Add SC8280XP to binding") Fixes: 76c4207f4085 ("dt-bindings: PCI: qcom: Add SA8540P to binding") Signed-off-by: Johan Hovold Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Manivannan Sadhasivam Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit d899aa668498c07ff217b666ae9712990306e682 Author: Nirmal Patel Date: Wed Nov 9 07:26:52 2022 -0700 PCI: vmd: Disable MSI remapping after suspend MSI remapping is disabled by VMD driver for Intel's Icelake and newer systems in order to improve performance by setting VMCONFIG_MSI_REMAP. By design VMCONFIG_MSI_REMAP register is cleared by firmware during boot. The same register gets cleared when system is put in S3 power state. VMD driver needs to set this register again in order to avoid interrupt issues with devices behind VMD if MSI remapping was disabled before. Link: https://lore.kernel.org/r/20221109142652.450998-1-nirmal.patel@linux.intel.com Fixes: ee81ee84f873 ("PCI: vmd: Disable MSI-X remapping when possible") Signed-off-by: Nirmal Patel Signed-off-by: Lorenzo Pieralisi Reviewed-by: Francisco Munoz drivers/pci/controller/vmd.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2cf7e87fc4592bcbed77448ebba68c2925f2a2af Merge: 3b738db50f9e 75ab70ec5cef Author: David S. Miller Date: Fri Nov 11 10:58:39 2022 +0000 Merge branch 'ptp-adjfreq-copnvert' Jacob Keller says: ==================== ptp: convert remaining users of .adjfreq A handful of drivers remain which still use the .adjfreq interface instead of the newer .adjfine interface. The new interface is preferred as it has a more precise adjustment using scaled parts per million. A handful of the remaining drivers are implemented with a common pattern that can be refactored to use the adjust_by_scaled_ppm and diff_by_scaled_ppm helper functions. These include the ptp_phc, ptp_ixp64x, tg3, hclge, stmac, cpts and bnxt drivers. These are each refactored in a separate change. The remaining drivers, bnx2x, liquidio, cxgb4, fec, and qede implement .adjfreq in a way different from the normal pattern expected by adjust_by_scaled_ppm. Fixing these drivers to properly use .adjfine requires specific knowledge of the hardware implementation. Instead I simply refactor them to use .adjfine and convert scaled_ppm into ppb using the scaled_ppm_to_ppb function. Finally, the .adjfreq implementation interface is removed entirely. This simplifies the interface and ensures that new drivers must implement the new interface as they no longer have an alternative. This still leaves parts per billion used as part of the max_adj interface, and the core PTP stack still converts scaled_ppm to ppb to check this. I plan to investigate fixing this in the future. ==================== Signed-off-by: David S. Miller commit 75ab70ec5cefade915a999886e4863fe6a38f8b5 Author: Jacob Keller Date: Wed Nov 9 15:09:45 2022 -0800 ptp: remove the .adjfreq interface function Now that all drivers have been converted to .adjfine, we can remove the .adjfreq from the interface structure. Signed-off-by: Jacob Keller Cc: Richard Cochran Signed-off-by: David S. Miller drivers/ptp/ptp_clock.c | 5 +---- include/linux/ptp_clock_kernel.h | 7 ------- 2 files changed, 1 insertion(+), 11 deletions(-) commit e2bd9c76c89fbe25df351fc5902cbbcca6a7d372 Author: Jacob Keller Date: Wed Nov 9 15:09:44 2022 -0800 ptp: convert remaining drivers to adjfine interface Convert all remaining drivers that still use .adjfreq to the newer .adjfine implementation. These drivers are not straightforward, as they use non-standard methods of programming their hardware. They are all converted to use scaled_ppm_to_ppb to get the parts per billion value that their logic depends on. Signed-off-by: Jacob Keller Cc: Ariel Elior Cc: Sudarsana Kalluru Cc: Manish Chopra Cc: Derek Chickles Cc: Satanand Burla Cc: Felix Manlunas Cc: Raju Rangoju Cc: Joakim Zhang Cc: Edward Cree Cc: Martin Habets Cc: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 9 +++++---- drivers/net/ethernet/cavium/liquidio/lio_main.c | 11 +++++++---- drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c | 13 ++++++++----- drivers/net/ethernet/freescale/fec_ptp.c | 13 ++++++++----- drivers/net/ethernet/qlogic/qede/qede_ptp.c | 13 ++++++++----- drivers/net/ethernet/sfc/ptp.c | 7 ++++--- drivers/net/ethernet/sfc/siena/ptp.c | 7 ++++--- drivers/net/ethernet/ti/am65-cpts.c | 5 +++-- drivers/ptp/ptp_dte.c | 5 +++-- 9 files changed, 50 insertions(+), 33 deletions(-) commit a29c132f92ed5af6e7116966b7e9899d4c22783c Author: Jacob Keller Date: Wed Nov 9 15:09:43 2022 -0800 ptp: bnxt: convert .adjfreq to .adjfine When the BNXT_FW_CAP_PTP_RTC flag is not set, the bnxt driver implements .adjfreq on a cyclecounter in terms of the straightforward "base * ppb / 1 billion" calculation. When BNXT_FW_CAP_PTP_RTC is set, the driver forwards the ppb value to firmware for configuration. Convert the driver to the newer .adjfine interface, updating the cyclecounter calculation to use adjust_by_scaled_ppm to perform the calculation. Use scaled_ppm_to_ppb when forwarding the correction to firmware. Signed-off-by: Jacob Keller Cc: Michael Chan Cc: Richard Cochran Reviewed-by: Pavan Chebbi Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit a45392071ceeebe85622705a1d7500ed434785a7 Author: Jacob Keller Date: Wed Nov 9 15:09:42 2022 -0800 ptp: cpts: convert .adjfreq to .adjfine The cpts implementation of .adjfreq is implemented in terms of a straight forward "base * ppb / 1 billion" calculation. Convert this to the newer .adjfine, using the recently added adjust_by_scaled_ppm helper function. Signed-off-by: Jacob Keller Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpts.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 2d96099f50f0ee7e38789c767c93e712737520b5 Author: Jacob Keller Date: Wed Nov 9 15:09:41 2022 -0800 ptp: stmac: convert .adjfreq to .adjfine The stmac implementation of .adjfreq is implemented in terms of a straight forward "base * ppb / 1 billion" calculation. Convert this to the newer .adjfine, using the recently added adjust_by_scaled_ppm helper function. Signed-off-by: Jacob Keller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit 974557020a5917f73fb7d7218402ef744b109c41 Author: Jacob Keller Date: Wed Nov 9 15:09:40 2022 -0800 ptp: hclge: convert .adjfreq to .adjfine The hclge implementation of .adjfreq is implemented in terms of a straight forward "base * ppb / 1 billion" calculation. Convert this to the newer .adjfine, using the recently added adjust_by_scaled_ppm helper function. Signed-off-by: Jacob Keller Cc: Yisen Zhuang Cc: Salil Mehta Cc: Richard Cochran Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit e3f18e9d353aa8bd9e4db10acab21df380e212f5 Author: Jacob Keller Date: Wed Nov 9 15:09:39 2022 -0800 ptp: tg3: convert .adjfreq to .adjfine The tg3 implementation of .adjfreq is implemented in terms of a straight forward "base * ppb / 1 billion" calculation. Convert this to the newer .adjfine, using the recently added diff_by_scaled_ppm helper function to calculate the difference and direction of the adjustment. Signed-off-by: Jacob Keller Cc: Siva Reddy Kallam Cc: Prashant Sreedharan Cc: Michael Chan Cc: Richard Cochran Reviewed-by: Pavan Chebbi Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit 319d77e9d059d4e7b0aba923578faed038d9038c Author: Jacob Keller Date: Wed Nov 9 15:09:38 2022 -0800 ptp_ixp46x: convert .adjfreq to .adjfine The ptp_ixp46x implementation of .adjfreq is implemented in terms of a straight forward "base * ppb / 1 billion" calculation. Convert this to the newer .adjfine, using the recently added adjust_by_scaled_ppm helper function. Signed-off-by: Jacob Keller Cc: Paolo Abeni Cc: Richard Cochran Cc: Linus Walleij Reviewed-by: Linus Walleij Signed-off-by: David S. Miller drivers/net/ethernet/xscale/ptp_ixp46x.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 2e77eded8ec34768618f9ab724b9092e09ddcca2 Author: Jacob Keller Date: Wed Nov 9 15:09:37 2022 -0800 ptp_phc: convert .adjfreq to .adjfine The ptp_phc implementation of .adjfreq is implemented in terms of a straight forward "base * ppb / 1 billion" calculation. Convert this to the newer .adjfine, updating the driver to use the recently introduced adjust_by_scaled_ppm helper function. Signed-off-by: Jacob Keller Cc: Richard Cochran Signed-off-by: David S. Miller drivers/ptp/ptp_pch.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 3b738db50f9e5c15c161408c3f7a0c86225aecef Merge: 6c646de3f9e9 a35608ed8cfd Author: David S. Miller Date: Fri Nov 11 10:52:55 2022 +0000 Merge branch 'marvell-prestera-AC5X-support' Oleksandr Mazur says: ==================== net: marvell: prestera: pci: add support for AC5X family devices This patch series introduces a support for AC5X family devices. AC5X devices utilize arm64 CPUs, and thus require a new FW (arm64-one) to be loaded. The new FW-image for AC5X devices has been introduces in the linux-firmware repo under the following commit: 60310c2deb8c ("Merge branch 'prestera-v4.1' of https://github.com/PLVision/linux-firmware") ==================== Signed-off-by: David S. Miller commit a35608ed8cfd41583d7a9b2da1155b91511f391a Author: Oleksandr Mazur Date: Thu Nov 10 00:25:22 2022 +0200 net: marvell: prestera: pci: bump supported FW min version Bump MIN version to reflect support of new platform (AC5X family devices). Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller drivers/net/ethernet/marvell/prestera/prestera_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 075c881be29bd8647af2281c9db798f405476b55 Author: Maksym Glubokiy Date: Thu Nov 10 00:25:21 2022 +0200 net: marvell: prestera: pci: add support for AC5X family devices Add support for the following AC5x Marvell Prestera PP family devices: 98DX7312M (12x25G / 8x25G + 1x100G); 98DX3500 (24x1G + 6x25G); 98DX3501 (16x1G + 6x10G); 98DX3510 (48x1G + 6x25G); 98DX3520 (24x2.5G + 6x25G); Known issues: - FW reload doesn't work (rmmod/modprobe sequence). Co-developed-by: Vadym Kochan Signed-off-by: Vadym Kochan Signed-off-by: Maksym Glubokiy Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller .../net/ethernet/marvell/prestera/prestera_pci.c | 107 +++++++++++++++++++-- 1 file changed, 97 insertions(+), 10 deletions(-) commit c334ac6461d516c6d79dd10fd84cd69a00422966 Author: Oleksandr Mazur Date: Thu Nov 10 00:25:20 2022 +0200 net: marvell: prestera: pci: use device-id defines Use defines with proper device names instead of device-id in pci-devices listing. Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller drivers/net/ethernet/marvell/prestera/prestera_pci.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 6c646de3f9e967f5f6992ee3613e003b57ef09fc Merge: 42ba9654acad 11871aba1974 Author: David S. Miller Date: Fri Nov 11 10:49:34 2022 +0000 Merge branch 'lan966x-xdp' Horatiu Vultur says: ==================== net: lan966x: Add xdp support Add support for xdp in lan966x driver. Currently only XDP_PASS and XDP_DROP are supported. The first 2 patches are just moving things around just to simplify the code for when the xdp is added. Patch 3 actually adds the xdp. Currently the only supported actions are XDP_PASS and XDP_DROP. In the future this will be extended with XDP_TX and XDP_REDIRECT. Patch 4 changes to use page pool API, because the handling of the pages is similar with what already lan966x driver is doing. In this way is possible to remove some of the code. All these changes give a small improvement on the RX side: Before: iperf3 -c 10.96.10.1 -R [ 5] 0.00-10.01 sec 514 MBytes 430 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 509 MBytes 427 Mbits/sec receiver After: iperf3 -c 10.96.10.1 -R [ 5] 0.00-10.02 sec 540 MBytes 452 Mbits/sec 0 sender [ 5] 0.00-10.01 sec 537 MBytes 450 Mbits/sec receiver --- v2->v3: - inline lan966x_xdp_port_present - update max_len of page_pool_params not to be the page size anymore but actually be rx->max_mtu. v1->v2: - rebase on net-next, once the fixes for FDMA and MTU were accepted - drop patch 2, which changes the MTU as is not needed anymore - allow to run xdp programs on frames bigger than 4KB ==================== Signed-off-by: David S. Miller commit 11871aba19748b3387e83a2db6360aa7119e9a1a Author: Horatiu Vultur Date: Wed Nov 9 21:46:13 2022 +0100 net: lan96x: Use page_pool API Use the page_pool API for allocation, freeing and DMA handling instead of dev_alloc_pages, __free_pages and dma_map_page. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan966x/Kconfig | 1 + .../net/ethernet/microchip/lan966x/lan966x_fdma.c | 89 ++++++++++++---------- .../net/ethernet/microchip/lan966x/lan966x_main.h | 8 ++ 3 files changed, 58 insertions(+), 40 deletions(-) commit 6a2159be7604f5cdd7f574f4e0922f61e63c3f16 Author: Horatiu Vultur Date: Wed Nov 9 21:46:12 2022 +0100 net: lan966x: Add basic XDP support Introduce basic XDP support to lan966x driver. Currently the driver supports only the actions XDP_PASS, XDP_DROP and XDP_ABORTED. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan966x/Makefile | 3 +- .../net/ethernet/microchip/lan966x/lan966x_fdma.c | 11 +++- .../net/ethernet/microchip/lan966x/lan966x_main.c | 5 ++ .../net/ethernet/microchip/lan966x/lan966x_main.h | 16 +++++ .../net/ethernet/microchip/lan966x/lan966x_xdp.c | 76 ++++++++++++++++++++++ 5 files changed, 109 insertions(+), 2 deletions(-) commit 4a00b0c712e3248e28bcc3026b5b957fe7514607 Author: Horatiu Vultur Date: Wed Nov 9 21:46:11 2022 +0100 net: lan966x: Split function lan966x_fdma_rx_get_frame The function lan966x_fdma_rx_get_frame was unmapping the frame from device and check also if the frame was received on a valid port. And only after that it tried to generate the skb. Move this check in a different function, in preparation for xdp support. Such that xdp to be added here and the lan966x_fdma_rx_get_frame to be used only when giving the skb to upper layers. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller .../net/ethernet/microchip/lan966x/lan966x_fdma.c | 85 +++++++++++++++------- .../net/ethernet/microchip/lan966x/lan966x_main.h | 9 +++ 2 files changed, 69 insertions(+), 25 deletions(-) commit e83163b66a37501cc11ba1c53e018f8236e87a2c Author: Horatiu Vultur Date: Wed Nov 9 21:46:10 2022 +0100 net: lan966x: Add define IFH_LEN_BYTES The total length of IFH(inter frame header) in bytes is calculated as IFH_LEN * sizeof(u32). Because IFH_LEN describes the length in words and not in bytes. As the length of IFH in bytes is used quite often, add a define for this. This is just to simplify the things. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c | 10 +++++----- drivers/net/ethernet/microchip/lan966x/lan966x_ifh.h | 1 + drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) commit e563531ace14c6920ff78794c1d9c35a03bc47b1 Author: Jani Nikula Date: Wed Nov 9 17:35:21 2022 +0200 drm/i915: split out intel_display_reg_defs.h Split out the display register helper macros to a separate file. For now, include it from i915_reg.h, but note that there are already files that don't need i915_reg.h, such as intel_audio.c. Cc: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3af47193ff5219b6d2cfe353b752ec4bb44de4f1.1668008071.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/icl_dsi_regs.h | 2 +- drivers/gpu/drm/i915/display/intel_audio_regs.h | 2 +- .../gpu/drm/i915/display/intel_backlight_regs.h | 2 +- .../gpu/drm/i915/display/intel_display_reg_defs.h | 53 ++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_hdcp_regs.h | 2 +- drivers/gpu/drm/i915/display/intel_mg_phy_regs.h | 2 +- drivers/gpu/drm/i915/display/intel_snps_phy_regs.h | 2 +- drivers/gpu/drm/i915/display/vlv_dsi_regs.h | 2 +- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/i915_reg.h | 42 +---------------- drivers/gpu/drm/i915/i915_reg_defs.h | 2 - 11 files changed, 62 insertions(+), 50 deletions(-) commit 42ba9654acad33efe34e5125fb373889f46a3f1c Author: Yinjun Zhang Date: Wed Nov 9 15:04:42 2022 -0500 nfp: take numa node into account when setting irq affinity Set irq affinity to cpus that belong to the same numa node with NIC device first. Signed-off-by: Yinjun Zhang Reviewed-by: Louis Peens Reviewed-by: Niklas Söderlund Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 602fb860945fd6dce7989fcd3727d5fe4282f785 Author: Jim Quinlan Date: Tue Oct 11 14:42:10 2022 -0400 PCI: brcmstb: Set RCB_{MPS,64B}_MODE bits Set RCB_MPS mode bit so that data for PCIe read requests up to the size of the Maximum Payload Size (MPS) are returned in one completion, and data for PCIe read requests greater than the MPS are split at the specified Read Completion Boundary setting. Set RCB_64B so that the Read Compeletion Boundary is 64B. Link: https://lore.kernel.org/r/20221011184211.18128-6-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Acked-by: Florian Fainelli drivers/pci/controller/pcie-brcmstb.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 137b57413f569d558c1054e2a181313574eb9a87 Author: Jim Quinlan Date: Tue Oct 11 14:42:09 2022 -0400 PCI: brcmstb: Drop needless 'inline' annotations A number of inline functions are called rarely and/or are not time-critical. Take out the "inline" and let the compiler do its work. Link: https://lore.kernel.org/r/20221011184211.18128-5-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Reviewed-by: Bjorn Helgaas Acked-by: Florian Fainelli drivers/pci/controller/pcie-brcmstb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ca5dcc76314d1fa6d7307fd3b95039b08d2f2b97 Author: Jim Quinlan Date: Tue Oct 11 14:42:08 2022 -0400 PCI: brcmstb: Replace status loops with read_poll_timeout_atomic() It would be nice to replace the PCIe link-up loop as well but there are too many uses of this that do not poll (and the read_poll_timeout uses "timeout==0" to loop forever). Link: https://lore.kernel.org/r/20221011184211.18128-4-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Acked-by: Florian Fainelli drivers/pci/controller/pcie-brcmstb.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 3ae140ad827b359bc4fa7c7985691c4c1e3ca8f4 Author: Jim Quinlan Date: Tue Oct 11 14:42:07 2022 -0400 PCI: brcmstb: Wait for 100ms following PERST# deassert Be prudent and give some time for power and clocks to become stable. As described in the PCIe CEM specification sections 2.2 and 2.2.1; as well as PCIe r5.0, 6.6.1. Link: https://lore.kernel.org/r/20221011184211.18128-3-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Acked-by: Florian Fainelli drivers/pci/controller/pcie-brcmstb.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 198acab1772f22f2e91f68a2fc1331e91dad780a Author: Jim Quinlan Date: Tue Oct 11 14:42:06 2022 -0400 PCI: brcmstb: Enable Multi-MSI We always wanted to enable Multi-MSI but didn't have a test device until recently. In addition, there are some devices out there that will ask for multiple MSI but refuse to work if they are only granted one. Link: https://lore.kernel.org/r/20221011184211.18128-2-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Acked-by: Florian Fainelli drivers/pci/controller/pcie-brcmstb.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit f53e14328ec08bda94a95d50e3eb0abb72963efc Merge: 573c38533c0d c956b9b318d9 Author: David S. Miller Date: Fri Nov 11 10:39:12 2022 +0000 Merge branch 'sparx5-TC-key' Steen Hegelund says: ==================== Extend TC key support for Sparx5 IS2 VCAP This provides extended tc flower filter key support for the Sparx5 VCAP functionality. It builds on top of the initial IS2 VCAP support found in this series: https://lore.kernel.org/all/20221020130904.1215072-1-steen.hegelund@microchip.com/ Overview: ========= The added flower filter key (dissector) support is this: - 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) The IS2 VCAP supports classified VLAN information which amounts to the outer VLAN info in case of multiple tags. Functionality: ============== Before frames can match IS2 VCAP rules with e.g an IPv4 source address, the IS2 VCAPs keyset configuration must include keyset that contains a IPv4 source address and this must be configured for the lookup/port/traffic-type that you want to match on. The Sparx5 IS2 VCAP has the following traffic types: - Non-Ethernet frames - IPv4 Unicast frames - IPv4 Multicast frames - IPv6 Unicast frames - IPv6 Multicast frames - ARP frames So to cover IPv4 traffic the two IPv4 categories must be configured with a keyset that contains IPv4 address information such as the VCAP_KFS_IP4_TCP_UDP keyset. The IPv4 and IPv6 traffic types are configured with useful default keysets, in later series we will use the tc template functionality when we want to change these defaults. The flower filter must contain a goto action as its last action and the chain id must specify the chain id of the next lookup in a VCAP or a destination outside the VCAP ranges. To activate the VCAP lookups on a port you must add a TC matchall filter on the port containing a single goto action that points to the chain id of the first lookup in the IS2 VCAP. From then on frames arriving on this port will be matched against the rules in the IS2 VCAP lookups. Removing the matchall filter will deactivate the IS2 lookups, but will leave the VCAP rules in the memory of the VCAP instance, and from then in frames will no longer be matched against the rules the in IS2 VCAP. If the matchall rule is added back again the IS2 rules will be active once more. Delivery: ========= This is current plan for delivering the full VCAP feature set of Sparx5: - TC flower filter statistics and rule order by size and priority - debugfs support for inspecting rules - support for TC protocol all - Sparx5 IS0 VCAP support - add TC policer and drop action support (depends on the Sparx5 QoS support upstreamed separately) - Sparx5 ES0 VCAP support - TC flower template support - TC matchall filter support for mirroring and policing ports - TC flower filter mirror action support - Sparx5 ES2 VCAP support Version History: ================ v6 Rebased on the latest next-next master branch. No other implementation changes. v5 Add support for a TC matchall filter with a single goto action which will activate the lookups of the VCAP. Removing this filter will deactivate the VCAP lookups again. v4 Add support for TC flower filter goto action and a check of the actions: check action combinations and the goto chain id. v3 Add some more details to the explanation in the commit message about support for MAC_ETYPE keysets and "protocol all" as well as the classified VLAN information. This is done to help testing the feature. No implementation changes in this version. v2 Split one of the KUNIT tests into 3 tests to fix a kernel robot build warning. v1 Initial version ==================== Signed-off-by: David S. Miller commit c956b9b318d9036701c471dd458f9ed31defc629 Author: Steen Hegelund Date: Wed Nov 9 12:41:16 2022 +0100 net: microchip: sparx5: Adding KUNIT tests of key/action values in VCAP API This tests that the available keyfield and actionfield add methods are doing the exepected work: adding the value (and mask) to the keyfield/actionfield list item in the rule. The test also covers the functionality that matches a rule to a keyset. Signed-off-by: Steen Hegelund Reported-by: kernel test robot Signed-off-by: David S. Miller .../net/ethernet/microchip/vcap/vcap_api_kunit.c | 592 +++++++++++++++++++++ 1 file changed, 592 insertions(+) commit 67456717012cac9aa952b308f71f0dd023998463 Author: Steen Hegelund Date: Wed Nov 9 12:41:15 2022 +0100 net: microchip: sparx5: Add tc matchall filter and enable VCAP lookups Use a tc matchall rule with a goto action to the VCAP specific chain to enable the VCAP lookups. If the matchall rule is removed the VCAP lookups will be disabled again using its cookie as lookup to find the VCAP instance. To enable the Sparx5 IS2 VCAP on eth0 you would use this command: tc filter add dev eth0 ingress prio 5 handle 5 matchall \ skip_sw action goto chain 8000000 as the first lookup in IS2 has chain id 8000000 Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/sparx5/Makefile | 2 +- drivers/net/ethernet/microchip/sparx5/sparx5_tc.c | 9 +- drivers/net/ethernet/microchip/sparx5/sparx5_tc.h | 5 + .../ethernet/microchip/sparx5/sparx5_tc_matchall.c | 97 +++++++++++++++++ .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 29 ++++- drivers/net/ethernet/microchip/vcap/vcap_api.c | 120 ++++++++++++++++++++- drivers/net/ethernet/microchip/vcap/vcap_api.h | 6 ++ .../net/ethernet/microchip/vcap/vcap_api_client.h | 4 + 8 files changed, 263 insertions(+), 9 deletions(-) commit 242df4f7f2cd6d17a445d43852496ad706da344b Author: Steen Hegelund Date: Wed Nov 9 12:41:14 2022 +0100 net: microchip: sparx5: Let VCAP API validate added key- and actionfields Add support for validating keyfields and actionfields when they are added to a VCAP rule. We need to ensure that the field is not already present and that the field is in the key- or actionset, if the client has added a key- or actionset to the rule at this point. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/vcap_api.c | 103 ++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) commit abc4010d1f6ec6a112bc273c41db13a8fb272d6b Author: Steen Hegelund Date: Wed Nov 9 12:41:13 2022 +0100 net: microchip: sparx5: Match keys in configured port keysets This tries to match the keys in a rule with the keysets supported by the VCAP instance, and generate a list of keysets. This list is then validated against the list of keysets that is currently selected for the lookups (per port) in the VCAP configuration. The Sparx5 IS2 only has one actionset, so there is no actionset matching performed for now. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_tc_flower.c | 26 ++-- .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 147 ++++++++++++++++++++- drivers/net/ethernet/microchip/vcap/vcap_api.c | 137 +++++++++++++++++-- .../net/ethernet/microchip/vcap/vcap_api_client.h | 11 ++ 4 files changed, 298 insertions(+), 23 deletions(-) commit 392d0ab048273c4d121a431de8fe030421794d9e Author: Steen Hegelund Date: Wed Nov 9 12:41:12 2022 +0100 net: microchip: sparx5: Adding TC goto action and action checking Add support for a goto action and ensure that a HW offloaded TC flower filter has a valid goto action and that pass and trap actions are not both used in the same filter. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_tc_flower.c | 70 +++++++++++++++++++--- drivers/net/ethernet/microchip/vcap/vcap_api.c | 36 +++++++++++ .../net/ethernet/microchip/vcap/vcap_api_client.h | 2 + 3 files changed, 100 insertions(+), 8 deletions(-) commit 7de1dcadfaf9ada0d205fd50e3b0bde0e11e625b Author: Steen Hegelund Date: Wed Nov 9 12:41:11 2022 +0100 net: microchip: sparx5: Find VCAP lookup from chain id Add a helper function that finds the lookup index in a VCAP instance from the chain id. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/vcap_api.c | 17 +++++++++++++++++ drivers/net/ethernet/microchip/vcap/vcap_api_client.h | 2 ++ 2 files changed, 19 insertions(+) commit d6c2964db3fee8b4512eb9e430f2081364c2fb90 Author: Steen Hegelund Date: Wed Nov 9 12:41:10 2022 +0100 net: microchip: sparx5: Adding more tc flower keys for the IS2 VCAP This adds the following TC flower filter keys to Sparx5 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 well as an 128 bit keyfield interface on the VCAP API to set the IPv6 addresses. IS2 supports the classified VLAN information which amounts to the outer VLAN info in case of multiple tags. Here are some examples of the tc flower filter operations that are now supported for the IS2 VCAP: - IPv4 Addresses tc filter add dev eth12 ingress chain 8000000 prio 12 handle 12 \ protocol ip flower skip_sw dst_ip 1.0.1.1 src_ip 2.0.2.2 \ action trap action goto chain 81000000 - IPv6 Addresses tc filter add dev eth12 ingress chain 8000000 prio 13 handle 13 \ protocol ipv6 flower skip_sw dst_ip 1::1:1 src_ip 2::2:2 \ action trap action goto chain 81000000 - IPv4 fragments tc filter add dev eth12 ingress chain 8000000 prio 14 handle 14 \ protocol ip flower skip_sw dst_ip 3.0.3.3 src_ip 2.0.2.2 \ ip_flags frag/nofirstfrag action trap action goto chain 81000000 - TCP and UDP portnumbers tc filter add dev eth12 ingress chain 8000000 prio 21 handle 21 \ protocol ip flower skip_sw dst_ip 8.8.8.8 src_ip 2.0.2.2 \ ip_proto tcp dst_port 100 src_port 12000 action trap action goto chain 81000000 tc filter add dev eth12 ingress chain 8000000 prio 23 handle 23 \ protocol ipv6 flower skip_sw dst_ip 5::5:5 src_ip 2::2:2 \ ip_proto tcp dst_port 300 src_port 13000 action trap action goto chain 81000000 - Layer 3 and Layer 4 protocol info tc filter add dev eth12 ingress chain 8000000 prio 28 handle 28 \ protocol ipv4 flower skip_sw dst_ip 9.0.9.9 src_ip 2.0.2.2 \ ip_proto icmp action trap action goto chain 81000000 - VLAN tag info (outer tag) tc filter add dev eth12 ingress chain 8000000 prio 29 handle 29 \ protocol 802.1q flower skip_sw vlan_id 600 vlan_prio 6 \ vlan_ethtype ipv4 action trap action goto chain 81000000 tc filter add dev eth12 ingress chain 8000000 prio 31 handle 31 \ protocol 802.1q flower skip_sw vlan_id 600 vlan_prio 5 \ vlan_ethtype ipv6 action trap action goto chain 81000000 - TCP flags tc filter add dev eth12 ingress chain 8000000 prio 15 handle 15 \ protocol ip flower skip_sw dst_ip 4.0.4.4 src_ip 2.0.2.2 \ ip_proto tcp tcp_flags 0x2a/0x3f action trap action goto chain 81000000 - IP info (IPv4 TOS field) tc filter add dev eth12 ingress chain 8000000 prio 16 handle 16 \ protocol ip flower skip_sw ip_tos 0x35 dst_ip 5.0.5.5 \ src_ip 2.0.2.2 action trap action goto chain 81000000 Notes: - The "protocol all" selection is not supported yet. - The MAC address rule now needs to use non-ip and non "protocol all". Here is an example: tc filter add dev eth12 ingress chain 8000000 prio 10 handle 10 \ protocol 0xbeef flower skip_sw \ dst_mac 0a:0b:0c:0d:0e:0f \ src_mac 2:0:0:0:0:1 \ action trap action goto chain 81000000 - The VLAN rules use classified VLAN information, and to get the classification information into the frame metadata, the ingress port need to be added to a bridge with the VID and vlan filtering enabled, like this (using VID 600 and four ports eth12, eth13, eth14 and eth15): ip link add name br5 type bridge ip link set dev br5 up ip link set eth12 master br5 ip link set eth13 master br5 ip link set eth14 master br5 ip link set eth15 master br5 sysctl -w net.ipv6.conf.eth12.disable_ipv6=1 sysctl -w net.ipv6.conf.eth13.disable_ipv6=1 sysctl -w net.ipv6.conf.eth14.disable_ipv6=1 sysctl -w net.ipv6.conf.eth15.disable_ipv6=1 sysctl -w net.ipv6.conf.br5.disable_ipv6=1 ip link set dev br5 type bridge vlan_filtering 1 bridge vlan add dev eth12 vid 600 bridge vlan add dev eth13 vid 600 bridge vlan add dev eth14 vid 600 bridge vlan add dev eth15 vid 600 bridge vlan add dev br5 vid 600 self Signed-off-by: Steen Hegelund Tested-by: Casper Andersson Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_tc_flower.c | 384 ++++++++++++++++++++- drivers/net/ethernet/microchip/vcap/vcap_api.c | 11 + .../net/ethernet/microchip/vcap/vcap_api_client.h | 2 + 3 files changed, 396 insertions(+), 1 deletion(-) commit 30172a7241f84a7b173652698b189614672fc46f Author: Steen Hegelund Date: Wed Nov 9 12:41:09 2022 +0100 net: microchip: sparx5: Differentiate IPv4 and IPv6 traffic in keyset config This changes the port keyset configuration for Sparx5 IS2 so that - IPv4 generates a IP4_TCP_UDP keyset for IPv4 TCP/UDP frames and a IP4_OTHER keyset for other IPv4 frames (both UC and MC) - IPv6 generates a IP_7TUPLE keyset (both UC and MC) ARP and non-IP traffic continues to generate the MAC_ETYPE keyset Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 81e78b13bdf7829bed0ad1a1dfe51293a8f676f3 Author: Jani Nikula Date: Wed Nov 9 17:35:20 2022 +0200 drm/i915/reg: move pick even and pick to reg defs This is a more logical place for generic helpers. Cc: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/623327aee73a515300d99c8d65552ca92f3f0721.1668008071.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_reg.h | 15 --------------- drivers/gpu/drm/i915/i915_reg_defs.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) commit da2549576b7be2b465908709dad50810a084cce4 Author: Jani Nikula Date: Wed Nov 9 17:35:19 2022 +0200 drm/i915/reg: move masked field helpers to i915_reg_defs.h This is a more logical place for generic helpers. Cc: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/5161a0c6d98df206c6c4c1add3fc3f2f408020b1.1668008071.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_reg.h | 13 ------------- drivers/gpu/drm/i915/i915_reg_defs.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) commit 557ffd5a4726f8b6f0dd1d4b632ae02c1c063233 Author: Shashank Gupta Date: Fri Nov 4 13:21:07 2022 -0400 crypto: qat - remove ADF_STATUS_PF_RUNNING flag from probe The ADF_STATUS_PF_RUNNING bit is set after the successful initialization of the communication between VF to PF in adf_vf2pf_notify_init(). So, it is not required to be set after the execution of the function adf_dev_init(). Signed-off-by: Shashank Gupta Reviewed-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Signed-off-by: Herbert Xu drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 2 -- drivers/crypto/qat/qat_c62xvf/adf_drv.c | 2 -- drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 2 -- 3 files changed, 6 deletions(-) commit fb11cddfe24caad33667b5c9dd859562b2be6c75 Author: Yang Li Date: Fri Nov 4 15:45:27 2022 +0800 crypto: rockchip - Remove surplus dev_err() when using platform_get_irq() There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. ./drivers/crypto/rockchip/rk3288_crypto.c:351:2-9: line 351 is redundant because platform_get_irq() already prints an error Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2677 Reported-by: Abaci Robot Signed-off-by: Yang Li Acked-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 1 - 1 file changed, 1 deletion(-) commit 520af5da664a8edc4f4c1cd8e6e8488ecccdb7e5 Author: Ard Biesheuvel Date: Thu Nov 3 20:22:59 2022 +0100 crypto: lib/aesgcm - Provide minimal library implementation Implement a minimal library version of AES-GCM based on the existing library implementations of AES and multiplication in GF(2^128). Using these primitives, GCM can be implemented in a straight-forward manner. GCM has a couple of sharp edges, i.e., the amount of input data processed with the same initialization vector (IV) should be capped to protect the counter from 32-bit rollover (or carry), and the size of the authentication tag should be fixed for a given key. [0] The former concern is addressed trivially, given that the function call API uses 32-bit signed types for the input lengths. It is still up to the caller to avoid IV reuse in general, but this is not something we can police at the implementation level. As for the latter concern, let's make the authentication tag size part of the key schedule, and only permit it to be configured as part of the key expansion routine. Note that table based AES implementations are susceptible to known plaintext timing attacks on the encryption key. The AES library already attempts to mitigate this to some extent, but given that the counter mode encryption used by GCM operates exclusively on known plaintext by construction (the IV and therefore the initial counter value are known to an attacker), let's take some extra care to mitigate this, by calling the AES library with interrupts disabled. [0] https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-38d.pdf Link: https://lore.kernel.org/all/c6fb9b25-a4b6-2e4a-2dd1-63adda055a49@amd.com/ Signed-off-by: Ard Biesheuvel Tested-by: Nikunj A Dadhania Signed-off-by: Herbert Xu include/crypto/gcm.h | 22 ++ lib/crypto/Kconfig | 6 + lib/crypto/Makefile | 3 + lib/crypto/aesgcm.c | 727 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 758 insertions(+) commit b67ce439fef69a1a339cf2743c8198e8d90e6821 Author: Ard Biesheuvel Date: Thu Nov 3 20:22:58 2022 +0100 crypto: lib/gf128mul - make gf128mul_lle time invariant The gf128mul library has different variants with different memory/performance tradeoffs, where the faster ones use 4k or 64k lookup tables precomputed at runtime, which are based on one of the multiplication factors, which is commonly the key for keyed hash algorithms such as GHASH. The slowest variant is gf128_mul_lle() [and its bbe/ble counterparts], which does not use precomputed lookup tables, but it still relies on a single u16[256] lookup table which is input independent. The use of such a table may cause the execution time of gf128_mul_lle() to correlate with the value of the inputs, which is generally something that must be avoided for cryptographic algorithms. On top of that, the function uses a sequence of if () statements that conditionally invoke be128_xor() based on which bits are set in the second argument of the function, which is usually a pointer to the multiplication factor that represents the key. In order to remove the correlation between the execution time of gf128_mul_lle() and the value of its inputs, let's address the identified shortcomings: - add a time invariant version of gf128mul_x8_lle() that replaces the table lookup with the expression that is used at compile time to populate the lookup table; - make the invocations of be128_xor() unconditional, but pass a zero vector as the third argument if the associated bit in the key is cleared. The resulting code is likely to be significantly slower. However, given that this is the slowest version already, making it even slower in order to make it more secure is assumed to be justified. The bbe and ble counterparts could receive the same treatment, but the former is never used anywhere in the kernel, and the latter is only used in the driver for a asynchronous crypto h/w accelerator (Chelsio), where timing variances are unlikely to matter. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu lib/crypto/gf128mul.c | 58 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 19 deletions(-) commit 61c581a46a9668747d355436bd4b2505594539bd Author: Ard Biesheuvel Date: Thu Nov 3 20:22:57 2022 +0100 crypto: move gf128mul library into lib/crypto The gf128mul library does not depend on the crypto API at all, so it can be moved into lib/crypto. This will allow us to use it in other library code in a subsequent patch without having to depend on CONFIG_CRYPTO. While at it, change the Kconfig symbol name to align with other crypto library implementations. However, the source file name is retained, as it is reflected in the module .ko filename, and changing this might break things for users. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/Kconfig | 2 +- arch/arm64/crypto/Kconfig | 2 +- crypto/Kconfig | 9 +++------ crypto/Makefile | 1 - drivers/crypto/chelsio/Kconfig | 2 +- lib/crypto/Kconfig | 3 +++ lib/crypto/Makefile | 2 ++ {crypto => lib/crypto}/gf128mul.c | 0 8 files changed, 11 insertions(+), 10 deletions(-) commit fb5d783b3c66a0110454a54d2f3bcb7dad4309a1 Author: Michael Zaidman Date: Sat Nov 5 23:11:51 2022 +0200 HID: ft260: fix 'cast to restricted' kernel CI bot warnings Fix 'cast to restricted' sparse warnings reported by kernel test robot in https://lore.kernel.org/all/202211021607.ssjymlKi-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Michael Zaidman Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5afac727defa0b2a3dffb2abd5fb5f594b98d217 Author: Michael Zaidman Date: Sat Nov 5 23:11:50 2022 +0200 HID: ft260: missed NACK from busy device When writing into a slow device like an EEPROM chip, the controller may exit the busy state before the device releases the bus. In this case, the ft260_xfer_status returns success before the data transfer completion. The patch fixes it by returning from the ft260_xfer_status() with the "-EAGAIN" on both controller and bus busy status when appropriate. It does not apply to the i2c combined transactions when after the write IO, the controller keeps the bus busy until the read IO and then between reading IOs to ensure an atomic operation. Co-developed-by: Germain Hebert Signed-off-by: Germain Hebert Signed-off-by: Michael Zaidman Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit c2500bdffe5a95fbd0aecdd5be3d2f175ad22f92 Author: Michael Zaidman Date: Sat Nov 5 23:11:49 2022 +0200 HID: ft260: fix a NULL pointer dereference in ft260_i2c_write The zero-length passed into the ft260_i2c_write() triggered the NULL pointer dereference in the debug message on data[0] access. Since the controller does not support a write of zero length, let's not allow it. Before: $ sudo i2ctransfer -y 13 w0@0x51 Killed After: $ sudo i2ctransfer -y 13 w0@0x51 Error: Sending messages failed: Invalid argument Reported-by: Enrik Berkhan Signed-off-by: Michael Zaidman Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 3 +++ 1 file changed, 3 insertions(+) commit 4b3da6853a619a952e8caf2e8393264dd42ffa27 Author: Michael Zaidman Date: Sat Nov 5 23:11:48 2022 +0200 HID: ft260: wake up device from power saving mode The FT260 can enter a power saving mode after being idle for longer than 5 seconds. When being woken up from power saving mode by an I2C write request, a possible NACK is not correctly reported by the controller. As a workaround, the driver will issue an I2C status report two times in ft260_xfer_status() after the chip has been idle for more than 5s. Co-developed-by: Enrik Berkhan Signed-off-by: Enrik Berkhan Signed-off-by: Michael Zaidman Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 728b117e7862b1eb05c3aad3b2f087b26453d56a Author: Michael Zaidman Date: Sat Nov 5 23:11:47 2022 +0200 HID: ft260: missed NACK from big i2c read The FT260 controller does not return NACK when performing a big read (of multiple hid reports size) from a non-existing device or from the device responding with NACK when it is not ready to serve the request. However, it responds correctly with NACK to a read of up to a single hid report size. To overcome this issue, we split the muli-report read request into a read of a single HID report of 60 bytes size and a multi-report read. Big read of 256 bytes with first read of 60 bytes: $ sudo ./i2cperf -d 2 -o 2 -s 256 -r 0-0xff 1 0x50 -S [ +5.633280] ft260_i2c_write_read: off 0x0 rlen 255 wlen 2 [ +0.000006] ft260_i2c_write: rep 0xd0 addr 0x50 off 0 len 2 wlen 2 flag 0x2 d[0] 0x0 [ +0.013205] ft260_xfer_status: bus_status 0x20, clock 100 [ +0.000007] ft260_i2c_read: rep 0xc2 addr 0x50 len 255 rlen 60 flag 0x3 [ +0.010932] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.004733] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000006] ft260_i2c_read: rep 0xc2 addr 0x50 len 195 rlen 128 flag 0x0 [ +0.012572] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.005789] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.003189] ft260_raw_event: i2c resp: rep 0xd1 len 8 [ +0.004092] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000010] ft260_i2c_read: rep 0xc2 addr 0x50 len 67 rlen 67 flag 0x4 [ +0.011688] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.004700] ft260_raw_event: i2c resp: rep 0xd1 len 7 [ +0.004858] ft260_xfer_status: bus_status 0x20, clock 100 Read from non-existing device at address 8. The first 60 read responded with NACK. $ sudo ./i2cperf -d 2 -o 2 -s 256 -r 0-0xff 1 0x8 -S [Oct19 15:37] ft260_i2c_write_read: off 0x0 rlen 255 wlen 2 [ +0.000007] ft260_i2c_write: rep 0xd0 addr 0x8 off 0 len 2 wlen 2 flag 0x2 d[0] 0x0 [ +0.022820] ft260_xfer_status: bus_status 0x20, clock 100 [ +0.000007] ft260_i2c_read: rep 0xc2 addr 0x8 len 255 rlen 60 flag 0x3 [ +0.010658] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.005965] ft260_xfer_status: bus_status 0x46, clock 100 <-- NACK [ +0.000009] ft260 0003:0403:6030.0004: i2c bus error: 0x46 [ +0.007784] ft260_i2c_reset: done Co-developed-by: Enrik Berkhan Signed-off-by: Enrik Berkhan Signed-off-by: Michael Zaidman Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3b56ff4820cf9d36a770d01769d5d9a6c3b14891 Author: Michael Zaidman Date: Sat Nov 5 23:11:46 2022 +0200 HID: ft260: remove SMBus Quick command support The i2cdetect uses the SMBus Quick command by default to scan devices on the I2C bus. The FT260 implements an I2C bus controller. The SMBus is derived from I2C, but there are several differences between the specifications of the two buses in the areas of timing, protocols, operation modes, and electrical characteristics. One of the differences is that the I2C devices allow the slave not to ACK its slave address, but SMBus requires it to always ACK it as a mechanism to detect a detachable device’s presence on the bus. Since FT260 is the I2C bus controller, it does not acknowledge the SMBus Quick write command, which sends a single bit to the device at the place of the RD/WR bit. The ft260 driver attempted to mimic the SMBus Quick Write functionality by writing a single byte as the SMBus Byte Write command does. Usually, one byte in the SMBus Quick Write will be fine. However, it may cause problems with devices with a control register at offset 0, like i2c muxes, for example, when scanned with the i2cdetect utility. The i2cdetect with the "-r" option uses the SMBus Read Byte command, which is a reasonable workaround. To prevent the I2C bus from locking at write-only devices (most notably clock chips at address 0x69), use the "-r" option in conjunction with scanning range parameters. This patch removes the SMBus Quick command support. $ sudo i2cdetect -y 13 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: 50 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: 70: $ sudo i2cdetect -y -r 13 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: 50 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- Reported-by: Vince Asbridge Reported-by: Stephen Shirron Reported-by: Enrik Berkhan Signed-off-by: Michael Zaidman Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit b7121e3c04440cc2af9cabbabb24efd23741294a Author: Michael Zaidman Date: Sat Nov 5 23:11:45 2022 +0200 HID: ft260: skip unexpected HID input reports The FT260 is not supposed to generate unexpected HID reports. However, in theory, the unsolicited HID Input reports can be issued by a specially crafted malicious USB device masquerading as FT260 when the attacker has physical access to the USB port. In this case, the read_buf pointer points to the final data portion of the previous I2C Read transfer, and the memcpy invoked in the ft260_raw_event() will try copying the content of the unexpected report into the wrong location. This commit sets the Read buffer pointer to NULL on the I2C Read transaction completion and checks it in the ft260_raw_event() to detect and skip the unsolicited Input report. Reported-by: Enrik Berkhan Signed-off-by: Michael Zaidman Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit 76e76e7993f3d8da484424135a4a8acf7f3cac0b Author: Michael Zaidman Date: Sat Nov 5 23:11:44 2022 +0200 HID: ft260: do not populate /dev/hidraw device Do not populate the /dev/hidraw on ft260 interfaces when the hid-ft260 driver is loaded. $ sudo insmod hid-ft260.ko $ ls /dev/hidraw* /dev/hidraw0 $ sudo rmmod hid-ft260.ko $ ls /dev/hidraw* /dev/hidraw0 /dev/hidraw1 /dev/hidraw2 Reported-by: Enrik Berkhan Signed-off-by: Michael Zaidman Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 54410c14800ad652c77e5c6fc5c17baad6e42cb6 Author: Michael Zaidman Date: Sat Nov 5 23:11:43 2022 +0200 HID: ft260: improve i2c large reads performance The patch increases the read buffer size to 180 bytes. It reduces the number of ft260_i2c_read() calls by three, improving the big reads performance. $ sudo i2ctransfer -y -f 13 w2@0x51 0x0 0x0 r180 Before: [ +4.071878] ft260_i2c_write_read: off 0x0 rlen 180 wlen 2 [ +0.000005] ft260_i2c_write: rep 0xd0 addr 0x51 off 0 len 2 wlen 2 flag 0x2 d[0] 0x0 [ +0.001097] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000175] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000004] ft260_i2c_read: rep 0xc2 addr 0x51 len 180 rlen 60 flag 0x3 [ +0.008579] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.000208] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000001] ft260_i2c_read: rep 0xc2 addr 0x51 len 120 rlen 60 flag 0x0 [ +0.008794] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.000181] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000002] ft260_i2c_read: rep 0xc2 addr 0x51 len 60 rlen 60 flag 0x4 [ +0.008817] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.000223] ft260_xfer_status: bus_status 0x20, clock 100 After: [ +11.611642] ft260_i2c_write_read: off 0x0 rlen 180 wlen 2 [ +0.000005] ft260_i2c_write: rep 0xd0 addr 0x51 off 0 len 2 wlen 2 flag 0x2 d[0] 0x0 [ +0.008001] ft260_xfer_status: bus_status 0x20, clock 100 [ +0.000001] ft260_i2c_read: rep 0xc2 addr 0x51 len 180 rlen 180 flag 0x7 [ +0.008994] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.007987] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.007992] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.000206] ft260_xfer_status: bus_status 0x20, clock 100 Suggested-by: Enrik Berkhan Signed-off-by: Michael Zaidman Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 0acb869f40ecc328ed87e389cc08122e3aeba1a8 Author: Michael Zaidman Date: Sat Nov 5 23:11:42 2022 +0200 HID: ft260: support i2c reads greater than HID report size A random i2c read operation in EEPROM devices is implemented as a dummy write operation, followed by a current address read operation. The dummy write operation is used to load the target byte or word address (a.k.a offset) into the offset counter, from which the subsequent read operation then reads. To support longer than one HID report size random read, the ft260 driver issues multiple pairs of i2c write offset + read data transactions of HID report size so that the EEPROM device sees many i2c random read requests from different offsets. Two issues with the current implementation: - This approach suffers from extra overhead caused by writing offset requests. - Necessity to handle offset per HID report in big-endian representation as EEPROM devices expect. The current implementation does not do it and correctly handles the reads up to 60 bytes only. This patch addresses both issues by implementing more efficient approach. It issues a single i2c read request of up to the EEPROM page size and then waits for the data to arrive in multiple HID reports. For example, to read the 256 bytes from a 24LC512 chip, which has 128 bytes page size, the old method performs six ft260_i2c_write_read transactions while the new - two only. Before: $ sudo ./i2cperf -d 2 -o 2 -s 128 -r 0-0xff 13 0x51 -S Read block via i2ctransfer by chunks ------------------------------------------------------------------- data rate(bps) efficiency(%) data size(B) total IOs IO size(B) ------------------------------------------------------------------- 40803 85 256 2 128 Kernel log of a single 128 bytes read request: [ +2.376308] ft260_i2c_write_read: read_off 0x0 left_len 128 len 60 [ +0.000002] ft260_i2c_write: rep 0xd0 addr 0x51 off 0 len 2 wlen 2 flag 0x2 d[0] 0x0 [ +0.000707] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000173] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000001] ft260_i2c_read: rep 0xc2 addr 0x51 len 60 [ +0.008660] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.000156] ft260_xfer_status: bus_status 0x20, clock 100 [ +0.000001] ft260_i2c_write_read: read_off 0x3c left_len 68 len 60 [ +0.000001] ft260_i2c_write: rep 0xd0 addr 0x51 off 0 len 2 wlen 2 flag 0x2 d[0] 0x3c [ +0.001034] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000191] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000001] ft260_i2c_read: rep 0xc2 addr 0x51 len 60 [ +0.008614] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.000203] ft260_xfer_status: bus_status 0x20, clock 100 [ +0.000001] ft260_i2c_write_read: read_off 0x78 left_len 8 len 8 [ +0.000001] ft260_i2c_write: rep 0xd0 addr 0x51 off 0 len 2 wlen 2 flag 0x2 d[0] 0x78 [ +0.000987] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000192] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000001] ft260_i2c_read: rep 0xc2 addr 0x51 len 8 [ +0.002614] ft260_raw_event: i2c resp: rep 0xd1 len 8 [ +0.000200] ft260_xfer_status: bus_status 0x20, clock 100 After: $ sudo ./i2cperf -d 2 -o 2 -s 128 -r 0-0xff 13 0x51 -S Read block via i2ctransfer by chunks ------------------------------------------------------------------- data rate(bps) efficiency(%) data size(B) total IOs IO size(B) ------------------------------------------------------------------- 43990 85 256 2 128 Kernel log of a single 128 bytes read request: [ +1.464346] ft260_i2c_write_read: off 0x0 rlen 128 wlen 2 [ +0.000002] ft260_i2c_write: rep 0xd0 addr 0x51 off 0 len 2 wlen 2 flag 0x2 d[0] 0x0 [ +0.001653] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000188] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000002] ft260_i2c_read: rep 0xc2 addr 0x51 len 128 rlen 60 flag 0x3 [ +0.008609] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.000157] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000002] ft260_i2c_read: rep 0xc2 addr 0x51 len 68 rlen 60 flag 0x0 [ +0.008840] ft260_raw_event: i2c resp: rep 0xde len 60 [ +0.000203] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000002] ft260_i2c_read: rep 0xc2 addr 0x51 len 8 rlen 8 flag 0x4 [ +0.002794] ft260_raw_event: i2c resp: rep 0xd1 len 8 [ +0.000201] ft260_xfer_status: bus_status 0x20, clock 100 Signed-off-by: Michael Zaidman Tested-by: Guillaume Champagne Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 127 +++++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 61 deletions(-) commit 1edfae51d5763439b2c89c9419c377f9c0da354d Author: Michael Zaidman Date: Sat Nov 5 23:11:41 2022 +0200 HID: ft260: support i2c writes larger than HID report size To support longer than one HID report size write, the driver splits a single i2c message data payload into multiple i2c messages of HID report size. However, it does not replicate the offset bytes within the EEPROM chip in every consequent HID report because it is not and should not be aware of the EEPROM type. It breaks the i2c write message integrity and causes the EEPROM device not to acknowledge the second HID report keeping the i2c bus busy until the ft260 controller reports failure. This patch preserves the i2c write message integrity by manipulating the i2c flag bits across multiple HID reports to be seen by the EEPROM device as a single i2c write transfer. Before: $ sudo ./i2cperf -f 2 -o 2 -s 64 -r 0-0xff 13 0x51 -S Error: Sending messages failed: Input/output error [ +3.667741] ft260_i2c_write: rep 0xde addr 0x51 off 0 len 60 d[0] 0x0 [ +0.007330] ft260_hid_output_report_check_status: wait 6400 usec, len 64 [ +0.000203] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.000001] ft260_i2c_write: rep 0xd1 addr 0x51 off 60 len 6 d[0] 0x0 [ +0.002337] ft260_hid_output_report_check_status: wait 1000 usec, len 10 [ +0.000157] ft260_xfer_status: bus_status 0x2e, clock 100 [ +0.000241] ft260_i2c_reset: done [ +0.000003] ft260_i2c_write: failed to start transfer, ret -5 After: $ sudo ./i2cperf -f 2 -o 2 -s 128 -r 0-0xff 13 0x51 -S Fill block with increment via i2ctransfer by chunks ------------------------------------------------------------------- data rate(bps) efficiency(%) data size(B) total IOs IO size(B) ------------------------------------------------------------------- 71260 86 256 2 128 Signed-off-by: Michael Zaidman Tested-by: Guillaume Champagne Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) commit 6fca5e3f5574ca1bd5bade5737848c816f924c6a Author: Michael Zaidman Date: Sat Nov 5 23:11:40 2022 +0200 HID: ft260: improve i2c write performance The patch improves the I2C write performance by 20 - 30 percent by revising the sleep time in the ft260_hid_output_report_check_status() in the following ways: 1. Reduce the wait time and start to poll earlier. Sending a large amount of data at a low I2C clock rate saturates the internal FT260 buffer and causes hiccups in status readiness, as shown below in the log fragment. Aligning the status check wait time to the worst case significantly reduces the write performance. [Oct22 10:28] ft260_i2c_write: rep 0xd8 addr 0x51 off 0 len 34 d[0] 0x0 [ +0.005296] ft260_xfer_status: bus_status 0x20, clock 100 [ +0.013460] ft260_i2c_write: rep 0xd8 addr 0x51 off 0 len 34 d[0] 0x0 [ +0.003244] ft260_hid_output_report_check_status: wait 1920 usec, len 38 [ +0.000190] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.015324] ft260_i2c_write: rep 0xd8 addr 0x51 off 0 len 34 d[0] 0x0 [ +0.003491] ft260_hid_output_report_check_status: wait 1920 usec, len 38 [ +0.000202] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.016047] ft260_i2c_write: rep 0xd8 addr 0x51 off 0 len 34 d[0] 0x0 [ +0.002768] ft260_hid_output_report_check_status: wait 1920 usec, len 38 [ +0.000150] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.011389] ft260_i2c_write: rep 0xd8 addr 0x51 off 0 len 34 d[0] 0x0 [ +0.003467] ft260_hid_output_report_check_status: wait 1920 usec, len 38 [ +0.000191] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000172] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000131] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000241] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000233] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000190] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000196] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.011314] ft260_i2c_write: rep 0xd8 addr 0x51 off 0 len 34 d[0] 0x0 [ +0.003334] ft260_hid_output_report_check_status: wait 1920 usec, len 38 [ +0.000227] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000204] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000198] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000147] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.011060] ft260_i2c_write: rep 0xd8 addr 0x51 off 0 len 34 d[0] 0x0 Before: $ sudo ./i2cperf -f 2 -o 2 -s 32 -r 0-0xff 13 0x51 -S Fill block with increment via i2ctransfer by chunks ------------------------------------------------------------------- data rate(bps) efficiency(%) data size(B) total IOs IO size(B) ------------------------------------------------------------------- 40510 80 256 8 32 After: $ sudo ./i2cperf -f 2 -o 2 -s 32 -r 0-0xff 13 0x51 -S Fill block with increment via i2ctransfer by chunks ------------------------------------------------------------------- data rate(bps) efficiency(%) data size(B) total IOs IO size(B) ------------------------------------------------------------------- 52584 80 256 8 32 2. Do not sleep if the estimated I2C transfer time is below 2 ms since the first xfer status query frequently takes around 1.5 ms, and the following status queries take about 200us on average. So we usually return from the routine after the first 1 - 3 status checks. [Oct22 11:14] ft260_i2c_write: rep 0xd4 addr 0x51 off 0 len 18 d[0] 0x0 [ +0.004270] ft260_xfer_status: bus_status 0x20, clock 100 [ +0.013889] ft260_i2c_write: rep 0xd4 addr 0x51 off 0 len 18 d[0] 0x0 [ +0.000856] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000138] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.013352] ft260_i2c_write: rep 0xd4 addr 0x51 off 0 len 18 d[0] 0x0 [ +0.001501] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000177] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.014477] ft260_i2c_write: rep 0xd4 addr 0x51 off 0 len 18 d[0] 0x0 [ +0.001377] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000233] ft260_xfer_status: bus_status 0x41, clock 100 [ +0.000191] ft260_xfer_status: bus_status 0x40, clock 100 [ +0.013197] ft260_i2c_write: rep 0xd4 addr 0x51 off 0 len 18 d[0] 0x0 Before: $ sudo ./i2cperf -f 2 -o 2 -s 16 -r 0-0xff 13 0x51 -S Fill block with increment via i2ctransfer by chunks ------------------------------------------------------------------- data rate(bps) efficiency(%) data size(B) total IOs IO size(B) ------------------------------------------------------------------- 28826 73 256 16 16 After: $ sudo ./i2cperf -f 2 -o 2 -s 16 -r 0-0xff 13 0x51 -S Fill block with increment via i2ctransfer by chunks ------------------------------------------------------------------- data rate(bps) efficiency(%) data size(B) total IOs IO size(B) ------------------------------------------------------------------- 45138 73 256 16 16 Signed-off-by: Michael Zaidman Tested-by: Guillaume Champagne Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit f45d50ede6f9e6d76a218e6ed06cc352acad466f Author: Michael Zaidman Date: Sat Nov 5 23:11:39 2022 +0200 HID: ft260: ft260_xfer_status routine cleanup After clarifying with FTDI's support, it turned out that the error condition (bit 1) in byte 1 of the i2c status HID report is a status bit reflecting all error conditions. When bits 2, 3, or 4 are raised to 1, bit 1 is set to 1 also. Since the ft260_xfer_status routine tests the error condition bit and exits in the case of an error, the program flow never reaches the conditional expressions for 2, 3, and 4 bits when any of them indicates an error state. Though these expressions are never evaluated to true, they are checked several times per IO, increasing the ft260_xfer_status polling cycle duration. The patch removes the conditional expressions for 2, 3, and 4 bits in byte 1 of the i2c status HID report. Signed-off-by: Michael Zaidman Tested-by: Guillaume Champagne Signed-off-by: Jiri Kosina drivers/hid/hid-ft260.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit c64ed0cd9324f9e5f44deb6834ad9fb5bfa436bc Author: Roderick Colenbrander Date: Sat Oct 29 11:48:51 2022 -0700 HID: playstation: add DualShock4 dongle support. This patch adds support for the DualShock4 dongle in a very similar way we contributed to hid-sony before. The dongle is a USB to Bluetooth bridge and uses the same HID reports as a USB device. It reports data through the DS4's main USB input report independent on whether a Bluetooth controller is connected. For this reason there is custom dongle report parsing code to detect controller hotplug and kick of calibration work until we are ready to process actual input reports. The logic also incorporates a workaround needed for Steam in which hid-playstation and Steam using hidraw can fight. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 146 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 140 insertions(+), 6 deletions(-) commit 58feecb4172b49ad1459e57556667a59df5bdda2 Author: Roderick Colenbrander Date: Sat Oct 29 11:48:50 2022 -0700 HID: playstation: set default DualShock4 BT poll interval to 4ms. The poll interval for DualShock4 in Bluetooth mode is adjustable through the main output report. Configure it to 4ms, which is similar to USB. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 2d77474a239294786feb4fe9864c845fe92db239 Author: Roderick Colenbrander Date: Sat Oct 29 11:48:49 2022 -0700 HID: playstation: add DualShock4 bluetooth support. Add support for DualShock4 in Bluetooth mode. In Bluetooth, the device is a bit strange in that after 'calibration' it switches sending all its input data from a basic report (only containing buttons/sticks) to an extended report, which also contains touchpad, motion sensors and other data. The overall design of this code is similar to the DualSense code. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 170 +++++++++++++++++++++++++++++++++++------- 1 file changed, 144 insertions(+), 26 deletions(-) commit a23b063b84d0d54f30822f9f2fa4c6c2f4ea1756 Author: Roderick Colenbrander Date: Sat Oct 29 11:48:48 2022 -0700 HID: playstation: add option to ignore CRC in ps_get_report. This patch adds a parameter to ps_get_report to ignore CRC checks. This prepares for DualShock4, which has some HID reports, which lack CRC. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 82d93f64c3ce28e2157e399e9d4ac935188cae7d Author: Roderick Colenbrander Date: Sat Oct 29 11:48:47 2022 -0700 HID: playstation: support DualShock4 lightbar blink. Support lightbar blink through LEDs framework. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 47 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) commit 4521109a8f40621ced642d62f1e887bd6b2d1946 Author: Roderick Colenbrander Date: Sat Oct 29 11:48:46 2022 -0700 HID: playstation: support DualShock4 lightbar. Expose the lightbar LEDs in the same manner as hid-sony through individual LEDs for backwards compatibility reasons. There is a slight change in LED naming to use the input device name as opposed to the MAC address like hid-sony did. This is expected to not cause any issues and should make the naming more compliant. In addition set a default lightbar color based on player ID. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 141 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 3 deletions(-) commit 316f57fb3f0c83d15b7c682a7b0e0a63f31cbea5 Author: Roderick Colenbrander Date: Sat Oct 29 11:48:45 2022 -0700 HID: playstation: make LED brightness adjustable in ps_led_register. Make the max_brightness adjustable through ps_led_info struct. This paves the way for a next DualShock4 patch to allow larger brightness values. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 4e463ec4ba839af9758366573b32e20df1ea2e47 Author: Roderick Colenbrander Date: Sat Oct 29 11:48:44 2022 -0700 HID: playstation: Add DualShock4 rumble support. This patch implements DualShock4 rumble support in a similar manner as the DualSense implementation. It adds an output worker with granular control of different features of the main DualShock4 output report. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 148 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 147 insertions(+), 1 deletion(-) commit 12882ed83c5833880e74b1fdc92ebf64d8f97651 Author: Roderick Colenbrander Date: Sat Oct 29 11:48:43 2022 -0700 HID: playstation: add DualShock4 accelerometer and gyroscope support. Support accelerometer and gyroscope as separate input devices similar how DualSense and hid-sony do it. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 170 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 168 insertions(+), 2 deletions(-) commit 752038248808a7ff176bbdb668f19ae7d2a9816b Author: Roderick Colenbrander Date: Sat Oct 29 11:48:42 2022 -0700 HID: playstation: add DualShock4 touchpad support. Support the DualShock4 touchpad as a separate input device. The code describes the touchpad input reports through structures similar a bit to the DualSense code. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 66 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 3 deletions(-) commit 8871ed304e6938361c28b3c86f64a4190dad7dbb Author: Roderick Colenbrander Date: Sat Oct 29 11:48:41 2022 -0700 HID: playstation: add DualShock4 battery support. Provide DualShock4 battery support through powersupply framework. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 70 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 4 deletions(-) commit 9a62280a1bdc71e89ea44395bd03829ad896c447 Author: Roderick Colenbrander Date: Sat Oct 29 11:48:40 2022 -0700 HID: playstation: report DualShock4 hardware and firmware version. Report DualShock4 hardware and firmware version info through sysfs. It uses the same sysfs nodes as the DualSense did (and hid-sony). Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit f55b9b56cefb1c4a7422e2b1fcb3a84ae4cd74d1 Author: Roderick Colenbrander Date: Sat Oct 29 11:48:39 2022 -0700 HID: playstation: initial DualShock4 USB support. Add basic support for DualShock4 USB controller with buttons and sticks. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-playstation.c | 174 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 172 insertions(+), 2 deletions(-) commit 7e2004906fb52257772be0ef262fba2d5eb1653b Author: Mathieu Desnoyers Date: Fri Jul 23 12:16:00 2021 -0400 Revert "csky: Add support for restartable sequence" This reverts commit 9866d141a0977ace974400bf1f793dfc163409ce. The csky rseq support has been merged without ever notifying the rseq maintainers, and without any of the required asssembler glue in the rseq selftests, which means it is entirely untested. It is also derived from a non-upstream riscv patch which has known bugs. The assembly part of this revert should be carefully reviewed by the architecture maintainer because it touches code which has changed since the merge of the reverted patch. The rseq selftests assembly glue should be introduced at the same time as the architecture rseq support. Without the presence of any test, I recommend reverting rseq support from csky for now. Link: https://lore.kernel.org/lkml/1257037909.25426.1626705790861.JavaMail.zimbra@efficios.com/ Signed-off-by: Mathieu Desnoyers Signed-off-by: Guo Ren Cc: Al Viro Cc: Linus Torvalds Cc: linux-csky@vger.kernel.org arch/csky/Kconfig | 1 - arch/csky/kernel/entry.S | 4 ---- arch/csky/kernel/signal.c | 2 -- 3 files changed, 7 deletions(-) commit c5e7ee72862eeeee77fd71b99fa9064f830e0b00 Author: Mathieu Desnoyers Date: Fri Jul 23 12:15:59 2021 -0400 Revert "csky: Fixup CONFIG_DEBUG_RSEQ" This reverts commit f36e0aab6f1f78d770ce859df3f07a9c5763ce5f. The csky rseq support has been merged without ever notifying the rseq maintainers, and without any of the required asssembler glue in the rseq selftests, which means it is entirely untested. It is also derived from a non-upstream riscv patch which has known bugs. The assembly part of this revert should be carefully reviewed by the architecture maintainer because it touches code which has changed since the merge of the reverted patch. The rseq selftests assembly glue should be introduced at the same time as the architecture rseq support. Without the presence of any test, I recommend reverting rseq support from csky for now. Link: https://lore.kernel.org/lkml/1257037909.25426.1626705790861.JavaMail.zimbra@efficios.com/ Signed-off-by: Mathieu Desnoyers Signed-off-by: Guo Ren Cc: Al Viro Cc: Linus Torvalds Cc: linux-csky@vger.kernel.org arch/csky/kernel/entry.S | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 0266a177631d4c6b963b5b12dd986a8c5abdbf06 Author: Long Li Date: Thu Nov 3 12:16:30 2022 -0700 RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter Add a RDMA VF driver for Microsoft Azure Network Adapter (MANA). Co-developed-by: Ajay Sharma Signed-off-by: Ajay Sharma Reviewed-by: Dexuan Cui Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-13-git-send-email-longli@linuxonhyperv.com Signed-off-by: Leon Romanovsky MAINTAINERS | 9 + drivers/infiniband/Kconfig | 1 + drivers/infiniband/hw/Makefile | 1 + drivers/infiniband/hw/mana/Kconfig | 10 + drivers/infiniband/hw/mana/Makefile | 4 + drivers/infiniband/hw/mana/cq.c | 79 +++++ drivers/infiniband/hw/mana/device.c | 117 +++++++ drivers/infiniband/hw/mana/main.c | 521 ++++++++++++++++++++++++++++++++ drivers/infiniband/hw/mana/mana_ib.h | 162 ++++++++++ drivers/infiniband/hw/mana/mr.c | 198 ++++++++++++ drivers/infiniband/hw/mana/qp.c | 506 +++++++++++++++++++++++++++++++ drivers/infiniband/hw/mana/wq.c | 115 +++++++ include/net/mana/mana.h | 3 + include/uapi/rdma/ib_user_ioctl_verbs.h | 1 + include/uapi/rdma/mana-abi.h | 66 ++++ 15 files changed, 1793 insertions(+) commit 1ec5617432abc3efeec36c4e584a700f6c7e46f9 Merge: 5de087250f1d 28c66cfa4538 Author: Leon Romanovsky Date: Fri Nov 11 11:35:12 2022 +0200 Merge branch 'mana-shared-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Long Li says: ==================== Introduce Microsoft Azure Network Adapter (MANA) RDMA driver [netdev prep] The first 11 patches which modify the MANA Ethernet driver to support RDMA driver. * 'mana-shared-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: net: mana: Define data structures for protection domain and memory registration net: mana: Define data structures for allocating doorbell page from GDMA net: mana: Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES net: mana: Define max values for SGL entries net: mana: Move header files to a common location net: mana: Record port number in netdev net: mana: Export Work Queue functions for use by RDMA driver net: mana: Set the DMA device max segment size net: mana: Handle vport sharing between devices net: mana: Record the physical address for doorbell page region net: mana: Add support for auxiliary device ==================== Link: https://lore.kernel.org/all/1667502990-2559-1-git-send-email-longli@linuxonhyperv.com/ Signed-off-by: Leon Romanovsky commit 282a4b71816b6076029017a7bab3a9dcee12a920 Author: Eli Billauer Date: Sun Oct 30 11:42:09 2022 +0200 char: xillybus: Prevent use-after-free due to race condition The driver for XillyUSB devices maintains a kref reference count on each xillyusb_dev structure, which represents a physical device. This reference count reaches zero when the device has been disconnected and there are no open file descriptors that are related to the device. When this occurs, kref_put() calls cleanup_dev(), which clears up the device's data, including the structure itself. However, when xillyusb_open() is called, this reference count becomes tricky: This function needs to obtain the xillyusb_dev structure that relates to the inode's major and minor (as there can be several such). xillybus_find_inode() (which is defined in xillybus_class.c) is called for this purpose. xillybus_find_inode() holds a mutex that is global in xillybus_class.c to protect the list of devices, and releases this mutex before returning. As a result, nothing protects the xillyusb_dev's reference counter from being decremented to zero before xillyusb_open() increments it on its own behalf. Hence the structure can be freed due to a rare race condition. To solve this, a mutex is added. It is locked by xillyusb_open() before the call to xillybus_find_inode() and is released only after the kref counter has been incremented on behalf of the newly opened inode. This protects the kref reference counters of all xillyusb_dev structs from being decremented by xillyusb_disconnect() during this time segment, as the call to kref_put() in this function is done with the same lock held. There is no need to hold the lock on other calls to kref_put(), because if xillybus_find_inode() finds a struct, xillyusb_disconnect() has not made the call to remove it, and hence not made its call to kref_put(), which takes place afterwards. Hence preventing xillyusb_disconnect's call to kref_put() is enough to ensure that the reference doesn't reach zero before it's incremented by xillyusb_open(). It would have been more natural to increment the reference count in xillybus_find_inode() of course, however this function is also called by Xillybus' driver for PCIe / OF, which registers a completely different structure. Therefore, xillybus_find_inode() treats these structures as void pointers, and accordingly can't make any changes. Reported-by: Hyunwoo Kim Suggested-by: Alan Stern Signed-off-by: Eli Billauer Link: https://lore.kernel.org/r/20221030094209.65916-1-eli.billauer@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/char/xillybus/xillyusb.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit dd65a243a915ca319ed5fee9161a168c836fa2f2 Author: Shuah Khan Date: Thu Nov 10 12:47:38 2022 -0700 usb/usbip: Fix v_recv_cmd_submit() to use PIPE_BULK define Fix v_recv_cmd_submit() to use PIPE_BULK define instead of hard coded values. This also fixes the following signed integer overflow error reported by cppcheck. This is not an issue since pipe is unsigned int. However, this change improves the code to use proper define. drivers/usb/usbip/vudc_rx.c:152:26: error: Signed integer overflow for expression '3<<30'. [integerOverflow] urb_p->urb->pipe &= ~(3 << 30); In addition, add a build time check for PIPE_BULK != 3 as the code path depends on PIPE_BULK = 3. Signed-off-by: Shuah Khan Link: https://lore.kernel.org/r/20221110194738.38514-1-skhan@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vudc_rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8836402d4b208b2211fc60538ff45d6bb3b73a64 Author: Christophe Leroy Date: Thu Nov 10 18:54:35 2022 +0100 usb: Check !irq instead of irq == 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://lkml.org/lkml/2005/11/21/221 . He re-iterated the same view recently in https://lkml.org/lkml/2022/10/12/622 So test !irq instead of tesing irq == NO_IRQ. Signed-off-by: Christophe Leroy Acked-by: Alan Stern Link: https://lore.kernel.org/r/13feefdf6b240817944e6441e26a8ddc1d81ced1.1668102802.git.christophe.leroy@csgroup.eu Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-grlib.c | 2 +- drivers/usb/host/ehci-ppc-of.c | 2 +- drivers/usb/host/fhci-hcd.c | 2 +- drivers/usb/host/ohci-ppc-of.c | 2 +- drivers/usb/host/uhci-grlib.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 46ed6026ca2181c917c8334a82e3eaf40a6234dd Author: Linus Walleij Date: Fri Nov 11 10:03:17 2022 +0100 usb: fotg210-udc: Fix ages old endianness issues The code in the FOTG210 driver isn't entirely endianness-agnostic as reported by the kernel robot sparse testing. This came to the surface while moving the files around. The driver is only used on little-endian systems, so this causes no real-world regression, but it is nice to be strict and have some compile coverage also on big endian machines, so fix it up with the right LE accessors. Fixes: b84a8dee23fd ("usb: gadget: add Faraday fotg210_udc driver") Reported-by: kernel test robot Link: https://lore.kernel.org/linux-usb/202211110910.0dJ7nZCn-lkp@intel.com/ Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221111090317.94228-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/fotg210-udc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 00fb05ff87bc63a3e9000e3f7c15c86951aca76d Author: Linus Walleij Date: Wed Nov 9 21:05:54 2022 +0100 usb: fotg2: add Gemini-specific handling The Cortina Systems Gemini has bolted on a PHY inside the silicon that can be handled by six bits in a MISC register in the system controller. If we are running on Gemini, look up a syscon regmap through a phandle and enable VBUS and optionally the Mini-B connector. If the device is flagged as "wakeup-source" using the standard DT bindings, we also enable this in the global controller for respective port. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221109200554.1957185-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/Kconfig | 1 + drivers/usb/fotg210/fotg210-core.c | 80 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) commit 8c80453864efea0a0ed5ca2b399fd97f2f55a5ae Author: Frank Wunderlich Date: Sun Nov 6 09:50:31 2022 +0100 dt-bindings: arm64: dts: mediatek: add compatible for bananapi r3 Add compatible for mt7986 based BananaPi R3 SBC. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221106085034.12582-9-linux@fw-web.de Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/arm/mediatek.yaml | 1 + 1 file changed, 1 insertion(+) commit 640a298b34f28c29f839cb047e6fc00ab0451f8a Author: Frank Wunderlich Date: Sun Nov 6 09:50:29 2022 +0100 arm64: dts: mt7986: add i2c node Add i2c Node to mt7986 devicetree. Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20221106085034.12582-7-linux@fw-web.de Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ecc5287cfe5359e454ca705ef02aae0c9756eaad Author: Sam Shih Date: Sun Nov 6 09:50:27 2022 +0100 arm64: dts: mt7986: add crypto related device nodes This patch adds crypto engine support for MT7986. Signed-off-by: Vic Wu Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20221106085034.12582-5-linux@fw-web.de Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 4 ++++ 3 files changed, 23 insertions(+) commit 965f2c0491ebbb6995233c0b167fb9e0cf0853da Author: Sam Shih Date: Sun Nov 6 09:50:24 2022 +0100 arm64: dts: mt7986: harmonize device node order This arrange device tree nodes in alphabetical order. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221106085034.12582-2-linux@fw-web.de Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 94 ++++++++++++++-------------- arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 22 +++---- 2 files changed, 58 insertions(+), 58 deletions(-) commit ecc0af6a3fe6ae47a341438f299b9439a6572def Author: Tinghan Shen Date: Thu Nov 3 10:56:55 2022 +0800 arm64: dts: mt8195: Add pcie and pcie phy nodes Add pcie and pcie phy nodes for mt8195. Signed-off-by: Jianjun Wang Signed-off-by: Tinghan Shen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221103025656.8714-3-tinghan.shen@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195.dtsi | 150 +++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) commit 83f3da58682861327e571b3b5149d51a0d8bab27 Author: Nícolas F. R. A. Prado Date: Wed Nov 9 14:50:12 2022 -0500 arm64: defconfig: Enable missing configs for mt8183-jacuzzi-juniper Enable missing configs in the arm64 defconfig to get all devices probing on the mt8183-kukui-jacuzzi-juniper machine. The devices enabled are: ATH10K SDIO wireless adapter, Elan touchscreen, cr50 TPM, MediaTek SPI controller, JPEG video decoder, ANX7625 DSI/DPI to DP bridge (used for the internal display), MT8183 sound cards, SCP co-processor, MediaTek Global Command Engine (controlled by CMDQ driver), MediaTek Smart Voltage Scaling (SVS) engine, CCI frequency and voltage scaling, AUXADC thermal sensors. All symbols are enabled as modules with the exception of SPI, which is enabled as builtin since on some platforms like mt8195-cherry, the ChromeOS Embedded Controller is connected through SPI and it is responsible for the regulators powering the MMC controller used for the SD card, and thus SPI support is required for booting. By enabling the support for all of this machine's devices on the defconfig we make it effortless to test the relevant hardware both by developers as well as CI systems like KernelCI. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Krzysztof Kozlowski Tested-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221109195012.1231059-1-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/configs/defconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit d5b560c014eddce747b2fd528d3071ded215b219 Author: Sergey Shtylyov Date: Thu Nov 10 00:47:42 2022 +0300 ata: libata-sff: kill unused ata_sff_busy_sleep() Nobody seems to call ata_sff_busy_sleep(), so we can get rid of it... Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/libata-sff.c | 56 ------------------------------------------------ include/linux/libata.h | 2 -- 2 files changed, 58 deletions(-) commit 573c38533c0d7f7a8964530c2c606eb691ba28ec Merge: a07b3835b895 90050f80509c Author: David S. Miller Date: Fri Nov 11 08:09:33 2022 +0000 Merge branch 'mt7986-WED-RX' Lorenzo Bianconi says: ==================== introduce WED RX support to MT7986 SoC Similar to TX counterpart available on MT7622 and MT7986, introduce RX Wireless Ethernet Dispatch available on MT7986 SoC in order to offload traffic received by wlan nic to the wired interfaces (lan/wan). Changes since v3: - remove reset property in ethsys dts node - rely on readx_poll_timeout in wo mcu code - fix typos - move wo-ccif binding in soc folder - use reserved-memory for wo-dlm - improve wo-ccif binding Changes since v2: - rely on of_reserved_mem APIs in mcu code - add some dts fixes - rename {tx,rx}_wdma in {rx,tx}_wdma - update entry in maintainers file Changes since v1: - fix sparse warnings - rely on memory-region property in mt7622-wed.yaml - some more binding fixes ==================== Signed-off-by: David S. Miller commit 90050f80509c7e97cd957b025b62e6e49c2c6bc0 Author: Lorenzo Bianconi Date: Sat Nov 5 23:36:23 2022 +0100 MAINTAINERS: update MEDIATEK ETHERNET entry Update MEDIATEK ETHERNET driver maintainer file enty adding myself to maintainers list Acked-by: Felix Fietkau Acked-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 51ef685584e24e1112a77a47d7280d60325c5f4e Author: Lorenzo Bianconi Date: Sat Nov 5 23:36:22 2022 +0100 net: ethernet: mtk_wed: add rx mib counters Introduce WED RX MIB counters support available on MT7986a SoC. Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_wed_debugfs.c | 87 +++++++++++++++++++++++++ 1 file changed, 87 insertions(+) commit 4c5de09eb0d05fc9e73ff8f0e052622f1f3df6d8 Author: Lorenzo Bianconi Date: Sat Nov 5 23:36:21 2022 +0100 net: ethernet: mtk_wed: add configure wed wo support Enable RX Wireless Ethernet Dispatch available on MT7986 Soc. Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_wed.c | 600 +++++++++++++++++++++++++-- drivers/net/ethernet/mediatek/mtk_wed.h | 19 + drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 45 +- drivers/net/ethernet/mediatek/mtk_wed_regs.h | 128 +++++- drivers/net/ethernet/mediatek/mtk_wed_wo.h | 28 ++ include/linux/soc/mediatek/mtk_wed.h | 76 +++- 6 files changed, 842 insertions(+), 54 deletions(-) commit 084d60ce0c6cef96024d53a58b92d7ff2d8b9318 Author: Lorenzo Bianconi Date: Sat Nov 5 23:36:20 2022 +0100 net: ethernet: mtk_wed: rename tx_wdma array in rx_wdma Rename tx_wdma queue array in rx_wdma since this is rx side of wdma soc. Moreover rename mtk_wed_wdma_ring_setup routine in mtk_wed_wdma_rx_ring_setup() Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_wed.c | 16 ++++++++-------- include/linux/soc/mediatek/mtk_wed.h | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) commit 799684448e3e1f57257a6155541e53510488f67b Author: Lorenzo Bianconi Date: Sat Nov 5 23:36:19 2022 +0100 net: ethernet: mtk_wed: introduce wed wo support Introduce WO chip support to mtk wed driver. MTK WED WO is used to implement RX Wireless Ethernet Dispatch and offload traffic received by wlan nic to the wired interface. Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/Makefile | 2 +- drivers/net/ethernet/mediatek/mtk_wed.c | 7 +- drivers/net/ethernet/mediatek/mtk_wed.h | 2 + drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 3 +- drivers/net/ethernet/mediatek/mtk_wed_wo.c | 508 ++++++++++++++++++++++++++++ drivers/net/ethernet/mediatek/mtk_wed_wo.h | 104 ++++++ 6 files changed, 622 insertions(+), 4 deletions(-) commit cc514101a97e3fb48f8617c8f291db798d10d831 Author: Sujuan Chen Date: Sat Nov 5 23:36:18 2022 +0100 net: ethernet: mtk_wed: introduce wed mcu support Introduce WED mcu support used to configure WED WO chip. This is a preliminary patch in order to add RX Wireless Ethernet Dispatch available on MT7986 SoC. Tested-by: Daniel Golle Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sujuan Chen Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/Makefile | 2 +- drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 359 +++++++++++++++++++++++++++ drivers/net/ethernet/mediatek/mtk_wed_regs.h | 1 + drivers/net/ethernet/mediatek/mtk_wed_wo.h | 150 +++++++++++ include/linux/soc/mediatek/mtk_wed.h | 29 +++ 5 files changed, 540 insertions(+), 1 deletion(-) commit ceb82ac2e745aec252516a9f6bd78f5199f52f46 Author: Lorenzo Bianconi Date: Sat Nov 5 23:36:17 2022 +0100 dt-bindings: net: mediatek: add WED RX binding for MT7986 eth driver Document the binding for the RX Wireless Ethernet Dispatch core on the MT7986 ethernet driver used to offload traffic received by WLAN NIC and forwarded to LAN/WAN one. Signed-off-by: Lorenzo Bianconi Reviewed-by: Rob Herring Signed-off-by: David S. Miller .../bindings/arm/mediatek/mediatek,mt7622-wed.yaml | 52 ++++++++++++++++++++++ .../soc/mediatek/mediatek,mt7986-wo-ccif.yaml | 51 +++++++++++++++++++++ 2 files changed, 103 insertions(+) commit eed4f1ddad8c5ad7596b229caec8bd7b477b81ee Author: Lorenzo Bianconi Date: Sat Nov 5 23:36:16 2022 +0100 arm64: dts: mediatek: mt7986: add support for RX Wireless Ethernet Dispatch Similar to TX Wireless Ethernet Dispatch, introduce RX Wireless Ethernet Dispatch to offload traffic received by the wlan interface to lan/wan one. Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 946fa0dbf2d8923a587f7348adf16563d59f1b3d Author: Feng Tang Date: Fri Oct 21 11:24:05 2022 +0800 mm/slub: extend redzone check to extra allocated kmalloc space than requested kmalloc will round up the request size to a fixed size (mostly power of 2), so there could be a extra space than what is requested, whose size is the actual buffer size minus original request size. To better detect out of bound access or abuse of this space, add redzone sanity check for it. In current kernel, some kmalloc user already knows the existence of the space and utilizes it after calling 'ksize()' to know the real size of the allocated buffer. So we skip the sanity check for objects which have been called with ksize(), as treating them as legitimate users. Kees Cook is working on sanitizing all these user cases, by using kmalloc_size_roundup() to avoid ambiguous usages. And after this is done, this special handling for ksize() can be removed. In some cases, the free pointer could be saved inside the latter part of object data area, which may overlap the redzone part(for small sizes of kmalloc objects). As suggested by Hyeonggon Yoo, force the free pointer to be in meta data area when kmalloc redzone debug is enabled, to make all kmalloc objects covered by redzone check. Suggested-by: Vlastimil Babka Signed-off-by: Feng Tang Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka mm/slab.h | 4 ++++ mm/slab_common.c | 4 ++++ mm/slub.c | 50 +++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 53 insertions(+), 5 deletions(-) commit aa191ab79a3e94d51a52155ad85fea40620c1dc8 Author: Krzysztof Kozlowski Date: Mon Nov 7 19:59:30 2022 +0100 dt-bindings: pinctrl: qcom,msm8660: convert to dtschema Convert Qualcomm MSM8660 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107185931.22075-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8660-pinctrl.txt | 96 ---------------- .../bindings/pinctrl/qcom,msm8660-pinctrl.yaml | 125 +++++++++++++++++++++ 2 files changed, 125 insertions(+), 96 deletions(-) commit a07b3835b895b0ef772f88c4b7c38e9fed52b1ff Author: Cai Huoqing Date: Wed Nov 9 15:26:41 2022 +0800 MAINTAINERS: Update hinic maintainers from orphan HINIC is marked orphan for 14 months from the commit "5cfe5109a1d7", but there are lots of HINIC in use. I have a SP582 NIC (hi1822 inside which is a kind of HINIC SOC), and implement based on hinic driver, and if there are some patches for HINIC, I can test and do some code review. I'm active in linux contribution, if possible, I want to take the hinic maintainership. Add my email here to receive patches. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e59418a46c14cdffc156f46781765ba43d255d21 Author: Tim Harvey Date: Mon Nov 7 10:17:54 2022 -0800 arm64: dts: imx8m{m,n}-venice-gw7902: add gpio pins for new board revision Add gpio pins present on new board revision: * LTE modem support (imx8mm-gw7902 only) - lte_pwr# - lte_rst - lte_int * M2 power enable - m2_pwr_en * off-board 4.0V supply - vdd_4p0_en Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts | 12 ++++++++---- arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dts | 8 ++++---- 2 files changed, 12 insertions(+), 8 deletions(-) commit 72684faf703cbb12ec944df91f45949973f2d6f7 Author: Geert Uytterhoeven Date: Wed Nov 9 14:35:58 2022 +0100 ARM: imx3: Remove unneeded #include Commit 6c5f05a6cd88c77f ("ARM: imx3: Remove imx3 soc_init()") removed the last user of the pinctrl machine API. Signed-off-by: Geert Uytterhoeven Signed-off-by: Shawn Guo arch/arm/mach-imx/mm-imx3.c | 1 - 1 file changed, 1 deletion(-) commit aa4188ea0f5d3b85d3405964d924d443648b6ca0 Author: Geert Uytterhoeven Date: Wed Nov 9 14:35:16 2022 +0100 ARM: mxs: Remove unneeded #include Commit 7705b5ed8adccd92 ("ARM: mxs: remove obsolete startup code for TX28") removed the last user of the pinctrl consumer API. Signed-off-by: Geert Uytterhoeven Signed-off-by: Shawn Guo arch/arm/mach-mxs/mach-mxs.c | 1 - 1 file changed, 1 deletion(-) commit 7be88ea9fd47e28d0719a066aa950176ca728857 Author: Andrej Picej Date: Fri Nov 4 08:03:58 2022 +0100 ARM: dts: imx6ul/ull: suspend i.MX6UL watchdog in wait mode It was discovered that the watchdog triggers when the device is put into "Suspend-To-Idle"/"freeze" low-power mode. Setting WDW bit disables watchdog when the device is put into WAIT mode. Signed-off-by: Andrej Picej Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-phytec-phycore-som.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit ac803b56860f6506c55a3c9330007837e3f4edda Author: Tudor Ambarus Date: Tue Oct 25 12:03:06 2022 +0300 dmaengine: at_hdmac: Convert driver to use virt-dma Convert the driver to use the core virt-dma. The driver will be easier to maintain as it uses the list handling and the tasklet from virt-dma. With the conversion replace the election of a new transfer in the tasklet with the election of the new transfer in the interrupt handler. With this we have a shorter idle window as we remove the scheduling latency of the tasklet. I chose to do this while doing the conversion to virt-dma, because if I made a prerequisite patch with the new transfer election in the irq handler, I would have to duplicate some virt-dma code in the at_hdmac driver that would end up being removed at the virt-dma conversion anyway. So do this in a single step. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-33-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/Kconfig | 1 + drivers/dma/at_hdmac.c | 1108 ++++++++++++++++++------------------------------ 2 files changed, 403 insertions(+), 706 deletions(-) commit 993b397752f3babb698932f20c1c363c4eca4efc Author: Tudor Ambarus Date: Tue Oct 25 12:03:05 2022 +0300 dmaengine: at_hdmac: Remove unused member of at_dma_chan The pointer to at_dma engine was never used, remove it. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-32-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 2 -- 1 file changed, 2 deletions(-) commit 304184f79c7eb50b32915b29f7cacd58455048d2 Author: Tudor Ambarus Date: Tue Oct 25 12:03:04 2022 +0300 dmaengine: at_hdmac: Rename "chan_common" to "dma_chan" "chan_common" was misleading and did not suggest that's actually a struct dma_chan underneath. Rename it so that readers can follow the code easier. One may see some checks when running checkpatch. Those have nothing to do with the rename and will be addressed in a further patch. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-31-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 62 +++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 1c1114d850b6993184c117edad7c91f7f09cb9d5 Author: Tudor Ambarus Date: Tue Oct 25 12:03:03 2022 +0300 dmaengine: at_hdmac: Rename "dma_common" to "dma_device" "dma_common" name was misleading and did not suggest that's actually a struct dma_device underneath. Rename it so that readers can follow the code easier. One may see some checks and a warning when running checkpatch. Those have nothing to do with the rename and will be addressed in a further patch. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-30-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 92 +++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) commit d8840a7edcf0aa840e175af17d61476a7dbc65f7 Author: Tudor Ambarus Date: Tue Oct 25 12:03:02 2022 +0300 dmaengine: at_hdmac: Use bitfield access macros Use the bitfield access macros in order to clean and to make the driver easier to read. One will see some "line length exceeds 100 columns" checkpatch warnings. I chose to not introduce new lines for regs descriptions in order to preserve the style of the comments throughout the definitions. Style can be fixed in a further patch. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-29-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 408 ++++++++++++++++++++++++------------------------- 1 file changed, 198 insertions(+), 210 deletions(-) commit 5cecadc3e2a4fb72ab37d9420df0a9e1179b8a3e Author: Tudor Ambarus Date: Tue Oct 25 12:03:01 2022 +0300 dmaengine: at_hdmac: Keep register definitions and structures private to at_hdmac.c Do not expose register definitions, structures and helpers via a .h file because there are used only by at_hdmac.c. Since there are no other users, remove the ambiguity and move all the .h contents to the .c file. One may notice some checkpatch warnings and errors with this move. The move was done "as it was", checkpatch complaints can be fixed in a further patch. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-28-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul MAINTAINERS | 1 - drivers/dma/at_hdmac.c | 469 ++++++++++++++++++++++++++++++++++++++++++- drivers/dma/at_hdmac_regs.h | 478 -------------------------------------------- 3 files changed, 468 insertions(+), 480 deletions(-) commit e3e672b8f95be38db26c971bc4c6b43d18a9836a Author: Tudor Ambarus Date: Tue Oct 25 12:03:00 2022 +0300 dmaengine: at_hdmac: Set include entries in alphabetic order It's a good practice to set the include entries in alphabetic order. It helps humans to read the code easier. Alphabetic order should also prove that each header is self-contained, i.e. can be included without prerequisites. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-27-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c23cd8c971f0b4697f344d981f13aae4123f866d Author: Tudor Ambarus Date: Tue Oct 25 12:02:59 2022 +0300 dmaengine: at_hdmac: Use pm_ptr() Use pm_ptr() macro to fill at_dma_driver.driver.pm. In case CONFIG_PM is not enabled, the macro will return NULL. When NULL, at_dma_dev_pm_ops will end up being unused, so prepend it with the __maybe_unused attribute. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-26-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4c15a4c7f693f1f45ef534ddc428f2a9aa67bd13 Author: Tudor Ambarus Date: Tue Oct 25 12:02:58 2022 +0300 dmaengine: at_hdmac: Use devm_clk_get() Clocks that are get with this method will be automatically put on driver detach. Use devm_clk_get() and simplify the error handling. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-25-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 8bfe4a61d40df2ddb707bf7d0b278907de2dd4f6 Author: Tudor Ambarus Date: Tue Oct 25 12:02:57 2022 +0300 dmaengine: at_hdmac: Use devm_platform_ioremap_resource Use devm_platform_ioremap_resource() helper for cleanner code and easier resource management. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-24-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) commit 5f1d429b43b34b310a93651681d0cd8a39a86e3d Author: Tudor Ambarus Date: Tue Oct 25 12:02:56 2022 +0300 dmaengine: at_hdmac: Use devm_kzalloc() and struct_size() Use the resource-managed kzalloc to simplify error logic. Memory allocated with this function is automatically freed on driver detach. Use struct_size() helper to calculate the size of the atdma structure with its trailing flexible array. While here, move the mem allocation higher in the probe method, as failing to allocate memory indicates a serious system issue, and everything else does not matter anyway. All these help the code look a bit cleaner. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-23-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit b50cf4bdfb9164c55d002624217d5a5ef4ab9573 Author: Tudor Ambarus Date: Tue Oct 25 12:02:55 2022 +0300 dmaengine: at_hdmac: Introduce atc_get_llis_residue() Introduce a method to get the residue for a hardware linked list transfer. It makes the code easier to read. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-22-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 221 ++++++++++++++++++++++++------------------------- 1 file changed, 110 insertions(+), 111 deletions(-) commit 91617bf6bb41b32119f5ac007871ad1d115d4ed2 Author: Tudor Ambarus Date: Tue Oct 25 12:02:54 2022 +0300 dmaengine: at_hdmac: s/atc_get_bytes_left/atc_get_residue Use dmaengine terminology and rename the method to better indicate what it does: it gets the residue value which will be later on set with dma_set_residue(). Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-21-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit f5d79afa3a858eb6e5cf2bcd894ed53b5bd8b5ff Author: Tudor Ambarus Date: Tue Oct 25 12:02:53 2022 +0300 dmaengine: at_hdmac: Pass residue by address to avoid unnecessary implicit casts struct dma_tx_state defines residue as u32. atc_get_bytes_left() returned an int which could be either an error or the value of the residue. This could cause problems if the controller supported a u32 buffer transfer size and the u32 value was past the max int can hold. Our controller does not support u32 buffer transfer size, but even so, improve the code and pass the residue by address to avoid unnecessary implicit casts and make atc_get_bytes_left() return 0 on success or -errno on errors. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-20-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 54 ++++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 24 deletions(-) commit 0e75c28c52962b528947843e947b4bd0c74d40d2 Author: Tudor Ambarus Date: Tue Oct 25 12:02:52 2022 +0300 dmaengine: at_hdmac: Remove superfluous cast Conversions of void * are applied automatically when other pointer types are assigned to and from void *. Remove the superfluous cast. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-19-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83c196152fc9a93c3d5a7cbf3229f42f87f232d8 Author: Tudor Ambarus Date: Tue Oct 25 12:02:51 2022 +0300 dmaengine: at_hdmac: Return dma_cookie_status()'s ret code when txstate is NULL txstate is an optional parameter used to get a struct with auxilary transfer status information. When not provided the call to device_tx_status() should return the status of the dma cookie. Return the status of dma cookie when the txstate optional parameter is not provided. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-18-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 4c2e9ba05c7abac58bdb58e47eb69b156027fb7b Author: Tudor Ambarus Date: Tue Oct 25 12:02:50 2022 +0300 dmaengine: at_hdmac: Do not print messages on console while holding the lock The descriptor was already removed from the transfer list, there's no reason to keep the channel lock while printing desc info, thus do the prints without holding the lock. Signed-off-by: Tudor Ambarus Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-17-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3f134c9511d624ccbe6fa0c7c1e457c4ff89d94d Merge: 739153a6ae68 c47e6403fa09 Author: Vinod Koul Date: Fri Nov 11 12:14:26 2022 +0530 Merge branch 'fixes' into next Merge due to at_hdmac driver dependency commit 04c439b3679ab65b3b90201dd548ccfacf0f18bf Author: Marek Vasut Date: Wed Nov 2 23:25:43 2022 +0100 dt-bindings: nvmem: snvs-lpgpr: Fix i.MX8M compatible strings The compatible strings for "fsl,imx8m*-snvs-lpgpr" always contain the fallback "fsl,imx7d-snvs-lpgpr" compatible in DTs too, since the fallback compatible is what the driver matches on, this way: compatible = "fsl,imx8mm-snvs-lpgpr", "fsl,imx7d-snvs-lpgpr" The older "fsl,imx7d-snvs-lpgpr" and "fsl,imx6*-snvs-lpgpr" used only that single compatible string. Document both options in the binding document. Signed-off-by: Marek Vasut Acked-by: Alexander Stein Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo .../devicetree/bindings/nvmem/snvs-lpgpr.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit eff6b33c9ce96b37339b8aa25afa5601195aefe7 Author: Marek Vasut Date: Wed Nov 2 22:19:03 2022 +0100 arm64: dts: imx8mm: Remove watchdog always-enabled property from eDM SBC There is no such always-enabled property supported by gpio-watchdog driver or described in its bindings, remove it. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts | 1 - 1 file changed, 1 deletion(-) commit 0c068a364a13e55e4b91ad772a25b683e2f141cb Author: Marek Vasut Date: Wed Nov 2 20:31:02 2022 +0100 arm64: dts: imx8mm: imx8mn: imx8mp: imx8mq: Replace opp-xM with opp-x000000 Fix the following dtbs_check warning on all of i.MX8M variants: " opp-table: Unevaluated properties are not allowed ('opp-25M', 'opp-100M', 'opp-750M' were unexpected) " Using the following command: " $ sed -i '/opp-[0-9]\+M/ s@M {@000000 {@' arch/arm64/boot/dts/freescale/imx8m* " The Documentation/devicetree/bindings/opp/opp-v2-base.yaml expects the OPP subnode names to be full frequency listings in Hz without unit suffixes. Only the i.MX8M DTs are affected per "git grep 'opp-[0-9]\+M'", so fix them. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi | 4 ++-- arch/arm64/boot/dts/freescale/imx8mm-kontron-sl.dtsi | 4 ++-- arch/arm64/boot/dts/freescale/imx8mm-phycore-som.dtsi | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-venice-gw700x.dtsi | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-venice-gw7904.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 6 +++--- arch/arm64/boot/dts/freescale/imx8mn-beacon-som.dtsi | 6 +++--- arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dts | 6 +++--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 ++-- arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 8 ++++---- arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 6 +++--- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 6 +++--- 20 files changed, 58 insertions(+), 58 deletions(-) commit 12bd480018a1883fdaf74c7b8ee66fbfed03a092 Author: Marek Vasut Date: Wed Nov 2 20:17:56 2022 +0100 arm64: dts: imx8mm-data-modul: Rename /watchdog-gpio to plain /watchdog The DT bindings checker is confused by the -gpio node suffix, drop it to fix the following warning: " imx8mm-data-modul-edm-sbc.dtb: /: watchdog-gpio: {'pinctrl-names': ['default'], 'pinctrl-0': [[104]], 'compatible': ['linux,wdt-gpio'], 'always-enabled': True, 'gpios': [[45, 8, 0]], 'hw_algo': ['level'], 'hw_margin_ms': [[1500]], 'status': ['disabled']} is not of type 'array' " Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 237f7d5886b0f8217bef336c6e09fb0e0e277dd6 Author: Marcel Ziswiler Date: Wed Nov 2 14:12:03 2022 +0100 arm64: dts: verdin-imx8mp: dahlia: mark usb_2 permanently attached As both Dahlia and the Verdin Development Board have on-carrier permanently attached USB hubs mark Verdin USB_2 as such. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi | 1 + 1 file changed, 1 insertion(+) commit d54977acb27f118c39de566a958d4f93c8825913 Author: Marcel Ziswiler Date: Wed Nov 2 14:12:02 2022 +0100 arm64: dts: verdin-imx8mp: add gpio usb-b connector Add GPIO USB-B connector (gpio-usb-b-connector) functionality using Verdin USB_1_ID. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 683c84a63d3bd7b4a05e0b29ad138cc2f6e5b099 Author: Marcel Ziswiler Date: Wed Nov 2 14:12:01 2022 +0100 arm64: dts: verdin-imx8mp: disable usb port power control Disable port power control on Verdin USB_1/2 as we use regular fixed-regulators with Verdin USB_1/2_EN as enable GPIOs. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit b1d003f1b7596bcb9503b06a0420b2fe10c06131 Author: Marcel Ziswiler Date: Wed Nov 2 14:12:00 2022 +0100 arm64: dts: verdin-imx8mp: add usb_1 over-current detection Add Verdin USB_1 over-current detection functionality via Verdin USB_1_OC# (SODIMM 157) being active-low and removing its previous gpio_hog3 mapping. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 4306aa3b63f91a6c6265de25b96b71344bf8117e Author: Marcel Ziswiler Date: Wed Nov 2 14:11:59 2022 +0100 arm64: dts: verdin-imx8mp: remove usb_2 over-current detection disabling The disable-over-current property is only applicable for the ci-hdrc-usb2 and dwc2 drivers while the i.MX 8M Plus integrates dwc3 IP. Therefore remove this property which does not really serve any purpose here. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 1 - 1 file changed, 1 deletion(-) commit d0a52238d604fefcc034fe1ab70a0d47eafbaea8 Author: Marcel Ziswiler Date: Wed Nov 2 14:11:58 2022 +0100 arm64: dts: verdin-imx8mp: improve pinctrl for vbus-supplies As we are using two fixed regulators for Verdin USB_1_EN (SODIMM 155) and Verdin USB_2_EN (SODIMM 185), those should be muxed as GPIOs rather than OTG_PWR. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7353bdfaca60c1477c000e8fd5c62832e66d1858 Author: Alexander Stein Date: Tue Nov 1 10:21:30 2022 +0100 arm64: defconfig: Add Renesas 9-series PCIe clock generator MBa8MPxL (with TQMa8MPQL attached) needs this driver for PCIe reference clock generation. Add it do default config. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 534d4f66b31b4a7fa35eec69ee24928c2f189c5d Author: Alexander Stein Date: Tue Nov 1 10:06:42 2022 +0100 arm64: dts: mba8mpxl: Add PWM fan support This adds the support for optional PWM fan 422J/2HP. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo .../dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 630ecc93c30e6b3d8177cca2cf3b8c694544500d Author: Alexander Stein Date: Tue Nov 1 10:21:29 2022 +0100 arm64: dts: tqma8mpql: add PCIe support Add PCIe support on TQMa8MPxL module on MBa8MPxL mainboard. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo .../dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 42 +++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit a9404a89178a866c6718c8cb0682b67f33726fb5 Author: Marek Vasut Date: Mon Oct 31 21:49:55 2022 +0100 arm64: dts: imx8mp: Bind bluetooth UART on DH electronics i.MX8M Plus DHCOM The i.MX8MP DHCOM SoM does contain muRata 2AE WiFi+BT chip, bind the bluetooth to UART2 using btbcm and hci_bcm drivers. Use PLL3 to drive UART2 clock divided down to 64 MHz to obtain suitable block clock for exact 4 Mbdps, which is the maximum supported baud rate by the muRata 2AE BT UART. Signed-off-by: Marek Vasut Reviewed-by: Peng Fan Signed-off-by: Shawn Guo .../arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi | 31 +++++++++++++++++----- 1 file changed, 25 insertions(+), 6 deletions(-) commit 3cad403f586f720dfc41a051ee781ee0c0b04a4c Author: Li Jun Date: Fri Oct 28 09:58:38 2022 +0800 arm64: dts: imx8mm/n-evk: enable wakeup-source for usb phy Enable usb phy to be wakeup source to support system wakeup from usb. Signed-off-by: Li Jun Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 4 ++++ arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 4 ++++ 2 files changed, 8 insertions(+) commit 966a9b49033b472dcfb453abdc34bca7df17adce Merge: c1b05105573b 4bbf3422df78 Author: Jakub Kicinski Date: Thu Nov 10 17:43:53 2022 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net drivers/net/can/pch_can.c ae64438be192 ("can: dev: fix skb drop check") 1dd1b521be85 ("can: remove obsolete PCH CAN driver") https://lore.kernel.org/all/20221110102509.1f7d63cc@canb.auug.org.au/ Signed-off-by: Jakub Kicinski commit 8dcc205931b0ee729641ae6b37e0866b13aa081b Author: Yong Zhi Date: Thu Nov 10 16:54:32 2022 -0600 ASoC: Intel: soc-acpi: add MTL AIC SoundWire configurations Add support to the following daughter card: SDW0: MX98373 Speaker SDW2: ALC5682 Headset Share same driver data used by sof_sdw driver for mtlrvp. Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Yong Zhi Signed-off-by: Jairaj Arava Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221110225432.144184-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 59 +++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 97b5fbf44c001a1c575550e4b40c4abd9d7db175 Author: Gongjun Song Date: Thu Nov 10 16:54:31 2022 -0600 ASoC: Intel: soc-acpi: add SKU 0C40 SoundWire configuration Audio hardware configuration of SKU 0C40 product is rt711 on link2, two rt1316s on link0 and link1, rt714 on link 3. Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Gongjun Song Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221110225432.144184-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-rpl-match.c | 66 +++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 880bf4b47fc1810616e254738bb40fe108c01cb9 Author: Gongjun Song Date: Thu Nov 10 16:54:30 2022 -0600 ASoC: Intel: sof_sdw: Add support for SKU 0C40 product SKU 0C40 product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Gongjun Song Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221110225432.144184-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 55fc03445e2c4e05169db0390ceb92d7ffea1a96 Author: Gongjun Song Date: Thu Nov 10 16:54:29 2022 -0600 ASoC: Intel: soc-acpi: add SKU 0C10 SoundWire configuration Audio hardware configuration of SKU 0C10 product is rt714 on link0, two rt1316s on link1 and link2 Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Gongjun Song Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221110225432.144184-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-rpl-match.c | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit d608bc44181c1010eca165e895bbe630077b2e16 Author: Gongjun Song Date: Thu Nov 10 16:54:28 2022 -0600 ASoC: Intel: sof_sdw: Add support for SKU 0C10 product SKU 0C10 product supports SoundWire capture from local microphone and two SoundWire amplifiers(no headset codec). Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Gongjun Song Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221110225432.144184-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 9bae30de136a645e29f632313c0ebb02fc00641b Author: Umesh Nerlige Ramappa Date: Mon Nov 7 12:24:10 2022 -0800 drm/i915/perf: Fix kernel-doc warning Fix kernel-doc issue from a previous commit. Signed-off-by: Umesh Nerlige Ramappa Fixes: 2db609c01495 ("drm/i915/perf: Replace gt->perf.lock with stream->lock for file ops") Reviewed-by: Ashutosh Dixit Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221107202410.1976895-1-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_perf_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c1b05105573b2cd5845921eb0d2caa26e2144a34 Author: Jakub Kicinski Date: Wed Nov 9 10:32:54 2022 -0800 genetlink: fix single op policy dump when do is present Jonathan reports crashes when running net-next in Meta's fleet. Stats collection uses ethtool -I which does a per-op policy dump to check if stats are supported. We don't initialize the dumpit information if doit succeeds due to evaluation short-circuiting. The crash may look like this: BUG: kernel NULL pointer dereference, address: 0000000000000cc0 RIP: 0010:netlink_policy_dump_add_policy+0x174/0x2a0 ctrl_dumppolicy_start+0x19f/0x2f0 genl_start+0xe7/0x140 Or we may trigger a warning: WARNING: CPU: 1 PID: 785 at net/netlink/policy.c:87 netlink_policy_dump_get_policy_idx+0x79/0x80 RIP: 0010:netlink_policy_dump_get_policy_idx+0x79/0x80 ctrl_dumppolicy_put_op+0x214/0x360 depending on what garbage we pick up from the stack. Reported-by: Jonathan Lemon Fixes: 26588edbef60 ("genetlink: support split policies in ctrl_dumppolicy_put_op()") Reviewed-by: Jacob Keller Tested-by: Leon Romanovsky Link: https://lore.kernel.org/r/20221109183254.554051-1-kuba@kernel.org Signed-off-by: Jakub Kicinski net/netlink/genetlink.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit 9f63869a5682d5fa9bc5563577fe3270e7cbf4f2 Author: Krzysztof Kozlowski Date: Thu Nov 3 15:53:40 2022 -0400 ASoC: codecs: lpass-wsa-macro: parse clock-output-names If we have several instances of WSA macro, each one of them should register clock with unique name, so parse clock-output-names for this. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221103195341.174972-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/lpass-wsa-macro.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bcdc73e167b68cb494977cdb2b92f05ab6455fc2 Author: Krzysztof Kozlowski Date: Thu Nov 3 15:53:39 2022 -0400 ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names The purpose of clock-output-names is to customize desired clock name, not use one, same name. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221103195341.174972-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml | 3 +-- Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml | 3 +-- Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 3 +-- Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) commit a60dca73a1a8079d867b2c2e9549440346c1ba83 Author: Oleg Kanatov Date: Fri Oct 28 15:22:54 2022 +0300 jfs: makes diUnmount/diMount in jfs_mount_rw atomic jfs_mount_rw can call diUnmount and then diMount. These calls change the imap pointer. Between these two calls there may be calls of function jfs_lookup(). The jfs_lookup() function calls jfs_iget(), which, in turn calls diRead(). The latter references the imap pointer. That may cause diRead() to refer to a pointer freed in diUnmount(). This commit makes the calls to diUnmount()/diMount() atomic so that nothing will read the imap pointer until the whole remount is completed. Signed-off-by: Oleg Kanatov Signed-off-by: Dave Kleikamp fs/jfs/jfs_imap.c | 2 +- fs/jfs/jfs_mount.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 1fb22ed671950bbc0c402034d206fcb334d1fd3a Author: Ido Schimmel Date: Thu Nov 10 10:51:50 2022 +0200 devlink: Fix warning when unregistering a port When a devlink port is unregistered, its type is expected to be unset or otherwise a WARNING is generated [1]. This was supposed to be handled by cited commit by clearing the type upon 'NETDEV_PRE_UNINIT'. The assumption was that no other events can be generated for the netdev after this event, but this proved to be wrong. After the event is generated, netdev_wait_allrefs_any() will rebroadcast a 'NETDEV_UNREGISTER' until the netdev's reference count drops to 1. This causes devlink to set the port type back to Ethernet. Fix by only setting and clearing the port type upon 'NETDEV_POST_INIT' and 'NETDEV_PRE_UNINIT', respectively. For all other events, preserve the port type. [1] WARNING: CPU: 0 PID: 11 at net/core/devlink.c:9998 devl_port_unregister+0x2f6/0x390 net/core/devlink.c:9998 Modules linked in: CPU: 1 PID: 11 Comm: kworker/u4:1 Not tainted 6.1.0-rc3-next-20221107-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: netns cleanup_net RIP: 0010:devl_port_unregister+0x2f6/0x390 net/core/devlink.c:9998 [...] Call Trace: __nsim_dev_port_del+0x1bb/0x240 drivers/net/netdevsim/dev.c:1433 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1443 [inline] nsim_dev_reload_destroy+0x171/0x510 drivers/net/netdevsim/dev.c:1660 nsim_dev_reload_down+0x6b/0xd0 drivers/net/netdevsim/dev.c:968 devlink_reload+0x1c2/0x6b0 net/core/devlink.c:4501 devlink_pernet_pre_exit+0x104/0x1c0 net/core/devlink.c:12609 ops_pre_exit_list net/core/net_namespace.c:159 [inline] cleanup_net+0x451/0xb10 net/core/net_namespace.c:594 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Fixes: 02a68a47eade ("net: devlink: track netdev with devlink_port assigned") Reported-by: syzbot+85e47e1a08b3e159b159@syzkaller.appspotmail.com Reported-by: syzbot+c2ca18f0fccdd1f09c66@syzkaller.appspotmail.com Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Link: https://lore.kernel.org/r/20221110085150.520800-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski net/core/devlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d0e482c45c50117bfb568825a41f0693e5f33c0f Author: Oleg Kanatov Date: Fri Oct 28 15:16:39 2022 +0300 jfs: Fix a typo in function jfs_umount When closing the block allocation map, an incorrect pointer was NULL'ed. This commit fixes that. Signed-off-by: Oleg Kanatov Signed-off-by: Dave Kleikamp fs/jfs/jfs_umount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 277004d7a4a348de185fb4149ff29a651e994ff4 Author: Bjorn Helgaas Date: Mon Oct 31 10:39:54 2022 -0500 PCI: Remove unnecessary includes Many host controller drivers #include even though they don't need it. Remove the unnecessary #includes. Link: https://lore.kernel.org/r/20221031153954.1163623-6-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Roy Zang drivers/pci/controller/cadence/pci-j721e.c | 1 - drivers/pci/controller/dwc/pci-layerscape.c | 1 - drivers/pci/controller/dwc/pcie-armada8k.c | 1 - drivers/pci/controller/dwc/pcie-tegra194.c | 1 - drivers/pci/controller/pci-v3-semi.c | 1 - drivers/pci/controller/pci-xgene-msi.c | 1 - drivers/pci/controller/pci-xgene.c | 1 - drivers/pci/controller/pcie-altera-msi.c | 1 - drivers/pci/controller/pcie-iproc-platform.c | 1 - drivers/pci/controller/pcie-iproc.c | 1 - drivers/pci/controller/pcie-microchip-host.c | 1 - drivers/pci/controller/pcie-rockchip-host.c | 1 - drivers/pci/controller/pcie-xilinx-cpm.c | 1 - drivers/pci/controller/pcie-xilinx-nwl.c | 1 - 14 files changed, 14 deletions(-) commit 753596dcdb753afb63874c644b2fb20ef7fb3948 Author: Bjorn Helgaas Date: Mon Oct 31 10:39:53 2022 -0500 PCI: xgene-msi: Include explicitly pci-xgene-msi.c uses irq_domain_add_linear() and related interfaces, so it needs but doesn't include it directly; it relies on the fact that includes it. But pci-xgene-msi.c *doesn't* need itself. Include directly to remove this implicit dependency so a future patch can drop . Link: https://lore.kernel.org/r/20221031153954.1163623-5-helgaas@kernel.org Signed-off-by: Bjorn Helgaas drivers/pci/controller/pci-xgene-msi.c | 1 + 1 file changed, 1 insertion(+) commit 763d25e7affe13c7be923fec6192ca6325f33c73 Author: Bjorn Helgaas Date: Mon Oct 31 10:39:52 2022 -0500 PCI: mvebu: Include explicitly pci-mvebu.c uses irq_domain_add_linear() and related interfaces but relies on but doesn't include it directly; it relies on the fact that includes it. Include directly to remove this implicit dependency. Link: https://lore.kernel.org/r/20221031153954.1163623-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Thomas Petazzoni drivers/pci/controller/pci-mvebu.c | 1 + 1 file changed, 1 insertion(+) commit 606a0430b37af4a1dd3e1e3baaf073b42fbb53e3 Author: Bjorn Helgaas Date: Mon Oct 31 10:39:51 2022 -0500 PCI: microchip: Include explicitly pcie-microchip-host.c uses irq_domain_add_linear() and related interfaces, so it needs but doesn't include it directly; it relies on the fact that includes it. But pcie-microchip-host.c *doesn't* need itself. Include directly to remove this implicit dependency so a future patch can drop . Link: https://lore.kernel.org/r/20221031153954.1163623-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Conor Dooley drivers/pci/controller/pcie-microchip-host.c | 1 + 1 file changed, 1 insertion(+) commit 8c50cd059c5cd974da4285af17adf0e38905b25b Author: Bjorn Helgaas Date: Mon Oct 31 10:39:50 2022 -0500 PCI: altera-msi: Include explicitly pcie-altera-msi.c uses irq_domain_add_linear() and related interfaces, so it needs but doesn't include it directly; it relies on the fact that includes it. But pcie-altera-msi.c *doesn't* need itself. Include directly to remove this implicit dependency so a future patch can drop . Link: https://lore.kernel.org/r/20221031153954.1163623-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas drivers/pci/controller/pcie-altera-msi.c | 1 + 1 file changed, 1 insertion(+) commit cf6946d95005add8437f874e0952ec4f28fe5c02 Author: Shuming Fan Date: Wed Nov 9 17:13:17 2022 +0800 ASoC: Intel: sof_sdw_rt1316: add BQ params for the Dell models The Dell SKU 0B00/0B01/0AFE/0AFF model needs the BQ params for the tweeter/woofer. Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Link: https://lore.kernel.org/r/20221109091317.17240-1-shumingf@realtek.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 1 + sound/soc/intel/boards/sof_sdw_amp_coeff_tables.h | 138 ++++++++++++++++++++++ sound/soc/intel/boards/sof_sdw_common.h | 1 + sound/soc/intel/boards/sof_sdw_rt1316.c | 119 +++++++++++++++++++ 4 files changed, 259 insertions(+) commit 1b435e405d63155d2391c27054cf98237d11d0a4 Author: Shuming Fan Date: Wed Nov 9 17:13:06 2022 +0800 ASoC: Intel: sof_sdw_rt1308: add BQ params for the Dell models The Dell SKU 0A5D/0A5E/0990/098F model needs the BQ params for the tweeter/woofer. Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Link: https://lore.kernel.org/r/20221109091306.17221-1-shumingf@realtek.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 1 + sound/soc/intel/boards/sof_sdw_amp_coeff_tables.h | 162 ++++++++++++++++++++++ sound/soc/intel/boards/sof_sdw_common.h | 2 + sound/soc/intel/boards/sof_sdw_rt1308.c | 120 ++++++++++++++++ 4 files changed, 285 insertions(+) commit 3c46b589db83db8a445924d0273005631a056aea Author: Shuming Fan Date: Wed Nov 9 17:12:44 2022 +0800 ASoC: rt1316-sdw: get BQ params property and apply them If the machine driver level sets the BQ params into the device property, the codec driver will get the BQ params and apply them. Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Link: https://lore.kernel.org/r/20221109091244.17198-1-shumingf@realtek.com Signed-off-by: Mark Brown sound/soc/codecs/rt1316-sdw.c | 39 +++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/rt1316-sdw.h | 2 ++ 2 files changed, 41 insertions(+) commit 5efb40b335a70010999311187be4517f5f114009 Author: Shuming Fan Date: Wed Nov 9 17:12:34 2022 +0800 ASoC: rt1308-sdw: get BQ params property and apply them If the machine driver level sets the BQ params into the device property, the codec driver will get the BQ params and apply them. Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Link: https://lore.kernel.org/r/20221109091234.17180-1-shumingf@realtek.com Signed-off-by: Mark Brown sound/soc/codecs/rt1308-sdw.c | 39 +++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/rt1308-sdw.h | 2 ++ 2 files changed, 41 insertions(+) commit 2ebf61f2cfb9a11bc17db30df3e675a4cd7418d3 Author: Dong Chenchen Date: Thu Nov 10 22:33:14 2022 +0800 drm/amdgpu: Fix memory leak in amdgpu_cs_pass1 When p->gang_size equals 0, amdgpu_cs_pass1() will return directly without freeing chunk_array, which will cause a memory leak issue, this patch fixes it. Fixes: 4624459c84d7 ("drm/amdgpu: add gang submit frontend v6") Reviewed-by: Luben Tuikov Signed-off-by: Dong Chenchen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fe6d2ca6f3f806f2f03e961d80cdbf27073868c8 Author: Liu Jian Date: Wed Nov 9 17:31:22 2022 +0800 drm/amd/display: delete the duplicate .set_odm_bypass initialization in dcn314_tg_funcs Fix below sparse warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_optc.c:244:18: warning: Initializer entry defined twice drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_optc.c:257:18: also defined here Fixes: 5ade1b951dec ("drm/amd/display: Add OTG/ODM functions") Signed-off-by: Liu Jian Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 1 - 1 file changed, 1 deletion(-) commit 7989d0b731858611289fbfd7c8fb1cdeda30cbc6 Author: Paulo Miguel Almeida Date: Wed Nov 9 20:33:34 2022 +1300 drm/amdgpu: Replace one-element array with flex-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 structs _ATOM_CONNECTOR_DEVICE_TAG_RECORD, _ATOM_OBJECT_GPIO_CNTL_RECORD, _ATOM_BRACKET_LAYOUT_RECORD, _ATOM_BRACKET_LAYOUT_RECORD, _ATOM_LEAKAGE_VOLTAGE_OBJECT_V3, _ATOM_FUSION_SYSTEM_INFO_V3, _ATOM_I2C_DATA_RECORD, _ATOM_I2C_DEVICE_SETUP_INFO, _ATOM_ASIC_MVDD_INFO and refactor the rest of the code accordingly. While at it, removed a redundant casting. Important to mention is 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/238 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 5 ++--- drivers/gpu/drm/amd/include/atombios.h | 16 ++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) commit 0a204ce0e698e5b94a064de6848b8c4641860f64 Author: Ville Syrjälä Date: Mon Nov 7 21:25:39 2022 +0200 drm/amdgpu: Use drm_mode_init() for on-stack modes Initialize on-stack modes with drm_mode_init() to guarantee no stack garbage in the list head, or that we aren't copying over another mode's list head. Based on the following cocci script, with manual fixups: @decl@ identifier M; expression E; @@ - struct drm_display_mode M = E; + struct drm_display_mode M; @@ identifier decl.M; expression decl.E; statement S, S1; @@ struct drm_display_mode M; ... when != S + drm_mode_init(&M, &E); + S1 @@ expression decl.E; @@ - &*E + E Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Harry Wentland Signed-off-by: Ville Syrjälä Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ecc9b6e15af2ffc8b9c0e6f15160eb8aaea36af5 Author: Gavin Wan Date: Wed Nov 9 13:12:42 2022 -0500 drm/amdgpu: Ignore stop rlc on SRIOV environment. For SRIOV, the guest driver should not do stop rlc. The host handles programing RLC. On SRIOV, the stop rlc will be hang (RLC related registers are blocked by policy) when the RLCG interface is not enabled. Reviewed-by: Yang Wang Acked-by: Alex Deucher Signed-off-by: Gavin Wan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4864f2ee9ee2acf4a1009b58fbc62f17fa086d4e Author: Tong Liu01 Date: Thu Nov 10 17:31:36 2022 +0800 drm/amdgpu: add vram reservation based on vram_usagebyfirmware_v2_2 Move TMR region from top of FB to 2MB for FFBM, so we need to reserve TMR region firstly to make sure TMR can be allocated at 2MB Signed-off-by: Tong Liu01 Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 104 ++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 51 +++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 5 ++ drivers/gpu/drm/amd/include/atomfirmware.h | 63 ++++++++++++-- 4 files changed, 191 insertions(+), 32 deletions(-) commit 3e931368091f7d5d7902cee9d410eb6db2eea419 Author: Tao Zhou Date: Thu Nov 10 14:37:08 2022 +0800 drm/amdgpu: remove the check of init status in psp_ras_initialize The initialized status indicates RAS TA is loaded, but in some cases (such as RAS fatal error) RAS TA could be destroyed although it's not unloaded. Hence we load RAS TA unconditionally here. Signed-off-by: Tao Zhou Reviewed-by: Candice Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a1903b01b0997626a4f2a60accf92bff5d5379a6 Author: Kenneth Feng Date: Thu Nov 10 10:52:41 2022 +0800 drm/amd/pm: skip disabling all smu features on smu_v13_0_10 in suspend skip disabling all smu features on smu_v13_0_10 in suspend Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 + 1 file changed, 1 insertion(+) commit 7701d10a1eb04025b594484975ee09eee11078b1 Author: Yifan Zhang Date: Wed Oct 26 10:55:10 2022 +0800 drm/amdgpu: force read discovery file if set discovery=2 If discovery is set to 2 in module parameters explicitly, the intention is to use the discovery file in FW rather than the one in BIOS, usually because the latter is incorrect. This patch to force read discovery file if set discovery=2. Signed-off-by: Yifan Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit cb20d6508bff89d85319dbe9a74c50983afc3390 Author: Andrew Davis Date: Wed Oct 26 11:19:35 2022 -0500 drm: Move radeon and amdgpu Kconfig options into their directories Most Kconfig options to enable a driver are in the Kconfig file inside the relevant directory, move these two to the same. Signed-off-by: Andrew Davis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/Kconfig | 57 -------------------------------------- drivers/gpu/drm/amd/amdgpu/Kconfig | 29 +++++++++++++++++++ drivers/gpu/drm/radeon/Kconfig | 30 ++++++++++++++++++++ 3 files changed, 59 insertions(+), 57 deletions(-) commit 20ea34710f7b20e218a42d457da618d99e3fc9d6 Author: Takashi Iwai Date: Mon Oct 24 17:40:54 2022 +0200 drm/radeon: Add HD-audio component notifier support (v6) This patch adds the support for the notification of HD-audio hotplug via the already existing drm_audio_component framework to radeon driver. This allows us more reliable hotplug notification and ELD transfer without accessing HD-audio bus; it's more efficient, and more importantly, it works without waking up the runtime PM. The implementation is rather simplistic: radeon driver provides the get_eld ops for HD-audio, and it notifies the audio hotplug via pin_eld_notify callback upon each radeon_audio_enable() call. The pin->id is referred as the port number passed to the notifier callback, and the corresponding connector is looked through the encoder list in the get_eld callback in turn. The bind and unbind callbacks handle the device-link so that it assures the PM call order. Also, as a gratis bonus, this patch "fixes" the regression by the recent change in HD-audio to be more strict for the HDMI/DP connection, too. Since the HD-audio HDMI/DP codec requires both the connection bit and the valid ELD to be provided, it started failing on some RADEON gfx boards where the ELD update performed instably. As this change switches the communication to a direct way between the audio and the graphics drivers, now the system receives the proper ELD, and the HDMI/DP hotplug starts working again. [ v2: fix the logic in radeon_audio_component_get_eld to walk the connector list since that is where the EDID lives and we can derive the encoder from the connector because the encoder has not been assigned at this point (i.e., during monitor probe). v3: the component binding is moved outside radeon_audio_init() and _fini(), as those are called from suspend/resume, too. Drop modeset lock calls that caused Oops. Moved Kconfig change so that it can be applied on older kernels. v4: revive drm_modeset_lock*() again, add the missing device_link_remove() call at unbinding v5: squash in mutex fix v6: squash in fix for audio get_eld callback ] Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1569 Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher drivers/gpu/drm/Kconfig | 1 + drivers/gpu/drm/radeon/radeon.h | 8 +++ drivers/gpu/drm/radeon/radeon_audio.c | 117 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/radeon/radeon_device.c | 4 ++ 4 files changed, 130 insertions(+) commit 79b0872b1075abd36b3c141f510ff7ec1878c22f Merge: edaf5df22cb8 28c66cfa4538 Author: Jakub Kicinski Date: Thu Nov 10 12:07:18 2022 -0800 Merge branch 'mana-shared-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Long Li says: ==================== Introduce Microsoft Azure Network Adapter (MANA) RDMA driver [netdev prep] The first 11 patches which modify the MANA Ethernet driver to support RDMA driver. * 'mana-shared-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: net: mana: Define data structures for protection domain and memory registration net: mana: Define data structures for allocating doorbell page from GDMA net: mana: Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES net: mana: Define max values for SGL entries net: mana: Move header files to a common location net: mana: Record port number in netdev net: mana: Export Work Queue functions for use by RDMA driver net: mana: Set the DMA device max segment size net: mana: Handle vport sharing between devices net: mana: Record the physical address for doorbell page region net: mana: Add support for auxiliary device ==================== Link: https://lore.kernel.org/all/1667502990-2559-1-git-send-email-longli@linuxonhyperv.com/ Signed-off-by: Jakub Kicinski commit dc776bd3eb907f0e1dcb4e4b5307ace2a4962b20 Author: Kane Chen Date: Thu Nov 10 23:39:24 2022 +0800 ACPI: PM: Print full name path while adding power resource While debugging a boot-time issue, it's hard to know what ACPI power resource the kernel is initializing. It's very helpful to print the full name path of the power resource being added so that it is not necessary to guess which one it is, especially on a system with 2 ore more power resources where the last name path segment is the same. Before: ACPI: PM: Power Resource [RTD3] ACPI: PM: Power Resource [RTD3] ACPI: PM: Power Resource [PR00] ACPI: PM: Power Resource [PR01] After: ACPI: \_SB_.PCI0.RP01.RTD3: New power resource ACPI: \_SB_.PCI0.RP08.RTD3: New power resource ACPI: \_SB_.PCI0.I2C3.H016.PR00: New power resource ACPI: \_SB_.PCI0.SPI1.CRFP.PR01: New power resource Signed-off-by: Kane Chen [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/acpi/power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1156e3a78bcc1e4673b3e32e98e3fd09cbc7067b Author: Stefan Wahren Date: Thu Nov 10 18:31:05 2022 +0100 ARM: dts: bcm283x: Move ACT LED into separate dtsi The usage of the label property for gpio-leds has been deprecated a long time ago. In bcm2835-rpi.dtsi the ACT LED uses such a label and derive it to almost every Raspberry Pi board. Since we cannot break userspace interface this property must be kept. But we can move the ACT LED into a separate dtsi and include them from the board files. This change have two benefits: - with both new refs it's now clear the LED part is included from a dtsi - new boards do not include the deprecated stuff automatically Reported-by: Alexander Dahl Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20221110173105.6633-3-stefan.wahren@i2se.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 27 ++++++++++++----------- arch/arm/boot/dts/bcm2711-rpi-400.dts | 16 +++++++------- arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts | 27 ++++++++++++----------- arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 27 ++++++++++++----------- arch/arm/boot/dts/bcm2835-rpi-a.dts | 11 +++++---- arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 27 ++++++++++++----------- arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 11 +++++---- arch/arm/boot/dts/bcm2835-rpi-b.dts | 11 +++++---- arch/arm/boot/dts/bcm2835-rpi-cm1.dtsi | 5 +++++ arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 11 +++++---- arch/arm/boot/dts/bcm2835-rpi-zero.dts | 11 +++++---- arch/arm/boot/dts/bcm2835-rpi.dtsi | 10 --------- arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 27 ++++++++++++----------- arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts | 27 ++++++++++++----------- arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 27 ++++++++++++----------- arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 11 +++++---- arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi | 8 ------- arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts | 11 +++++---- arch/arm/boot/dts/bcm283x-rpi-led-deprecated.dtsi | 18 +++++++++++++++ 19 files changed, 164 insertions(+), 159 deletions(-) commit a9865ec3e1a0886f6ddf40dd7e212d72c35b6671 Author: Stefan Wahren Date: Thu Nov 10 18:31:04 2022 +0100 ARM: dts: bcm283x: Fix underscores in node names A lot pinctrl node names, regulators and local_intc do not follow the node name convention to avoid underscore. So fix this by using hyphen or a proper node name. Signed-off-by: Stefan Wahren Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221110173105.6633-2-stefan.wahren@i2se.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 4 +- arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi | 4 +- arch/arm/boot/dts/bcm2711.dtsi | 94 +++++++++++++++++----------------- arch/arm/boot/dts/bcm2835-common.dtsi | 18 +++---- arch/arm/boot/dts/bcm2836.dtsi | 2 +- arch/arm/boot/dts/bcm283x.dtsi | 70 ++++++++++++------------- 6 files changed, 96 insertions(+), 96 deletions(-) commit 5de087250f1d8f7b81abaf94110884994793f073 Author: Bob Pearson Date: Thu Nov 3 12:10:14 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_mmap.c Replace calls to pr_xxx() in rxe_mmap.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-17-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_mmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 813728043b79a11f7029ba196decfc7f576ae487 Author: Bob Pearson Date: Thu Nov 3 12:10:13 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_icrc.c Replace calls to pr_xxx() in rxe_icrc.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-16-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_icrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6aba5ea00550017629c56972b635f33bb6a6903 Author: Bob Pearson Date: Thu Nov 3 12:10:12 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe.c Replace calls to pr_xxx() in rxe.c with rxe_dbg_xxx(). Calls with a rxe device not yet in scope are left as is. Link: https://lore.kernel.org/r/20221103171013.20659-15-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc50597934411170ed149d3368b0b733bc5119f1 Author: Bob Pearson Date: Thu Nov 3 12:10:11 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_task.c Replace calls to pr_xxx() in rxe_task.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-14-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_task.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 25fd735a4c9e38c65904eea2769ed92f6f8586d0 Author: Bob Pearson Date: Thu Nov 3 12:10:10 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_av.c Replace calls to pr_xxx() in rxe_av.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-13-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_av.c | 43 +++++++++++++++++++++++++++++------ drivers/infiniband/sw/rxe/rxe_loc.h | 8 ++----- drivers/infiniband/sw/rxe/rxe_qp.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_verbs.c | 13 ++++++----- 4 files changed, 47 insertions(+), 21 deletions(-) commit 14e501fdb0de3b45b8ee8a2a031c3c64aaa01817 Author: Bob Pearson Date: Thu Nov 3 12:10:09 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_verbs.c Replace calls to pr_xxx() in rxe_verbs.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-12-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e6090024b3ebf8d162f82c542eba9632a9c85fc Author: Bob Pearson Date: Thu Nov 3 12:10:08 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_srq.c Replace calls to pr_xxx() in rxe_srq.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-11-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_srq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 74ddf7233c571d51bcb802bb192a9f7d77cd8830 Author: Bob Pearson Date: Thu Nov 3 12:10:07 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_resp.c Replace calls to pr_xxx() in rxe_resp.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-10-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_resp.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 0edfb15e30a53e8bd039c35a17f61e49cba9f4dd Author: Bob Pearson Date: Thu Nov 3 12:10:06 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_req.c Replace calls to pr_xxx() in rxe_req.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-9-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_req.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6af70060d2e561d6479b33fe94cc2f38582e830b Author: Bob Pearson Date: Thu Nov 3 12:10:05 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_qp.c Replace calls to pr_xxx() in rxe_qp.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-8-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_qp.c | 65 ++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 35 deletions(-) commit 34549e88e0a3088416177023abf1232fe40e721c Author: Bob Pearson Date: Thu Nov 3 12:10:04 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_net.c Replace (some) calls to pr_xxx() in rxe_net.c with rxe_dbg_xxx(). Calls with a rxe device not yet in scope are left as is. Link: https://lore.kernel.org/r/20221103171013.20659-7-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_net.c | 38 ++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit e8a87efdf87455454d0a14fd486c679769bfeee2 Author: Bob Pearson Date: Thu Nov 3 12:10:03 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_mw.c Replace calls to pr_xxx() int rxe_mw.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-6-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_mw.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 2778b72b1df0c8ef61e0b3b3ef1c8c62eb03fa75 Author: Bob Pearson Date: Thu Nov 3 12:10:02 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_mr.c Replace calls to pr_xxx() in rxe_mr.c by rxe_dbg_mr(). Link: https://lore.kernel.org/r/20221103171013.20659-5-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_mr.c | 40 +++++++++++++++-------------------- drivers/infiniband/sw/rxe/rxe_verbs.c | 3 +++ 2 files changed, 20 insertions(+), 23 deletions(-) commit 52920f537ab08237bd8a3d30ccbb06a9d57717cf Author: Bob Pearson Date: Thu Nov 3 12:10:01 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_cq.c Replace calls to pr_xxx() in rxe_cq.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-4-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_cq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 27c4c520bd3908c095401e93c71e7d3696ae8bdd Author: Bob Pearson Date: Thu Nov 3 12:10:00 2022 -0500 RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_comp.c Replace calls to pr_xxx() in rxe_comp.c with rxe_dbg_xxx(). Link: https://lore.kernel.org/r/20221103171013.20659-3-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_comp.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 4554bac48a8c464ff00136a64efe8847e4da4ea8 Author: Bob Pearson Date: Thu Nov 3 12:09:59 2022 -0500 RDMA/rxe: Add ibdev_dbg macros for rxe Add macros borrowed from siw to call dynamic debug macro ibdev_dbg. Link: https://lore.kernel.org/r/20221103171013.20659-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 82d08d61e3a87527842392484e2d54c2aeb5fbb8 Author: Xu Panda Date: Wed Nov 9 21:25:25 2022 +0800 ACPI: sysfs: use sysfs_emit() to instead of scnprintf() Replace scnprintf() with sysfs_emit() to simplify the code. Reported-by: Zeal Robot Signed-off-by: Xu Panda Signed-off-by: Yang Yang Signed-off-by: Rafael J. Wysocki drivers/acpi/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0d37784bfd7f699986ba3a64cfeb68a03cb7fd0 Author: Ryan Roberts Date: Thu Nov 3 15:05:07 2022 +0000 KVM: arm64: Fix PAR_TO_HPFAR() to work independently of PA_BITS. Kernel configs with PAGE_SIZE=64KB and PA_BITS=48 still advertise 52 bit IPA space on HW that implements LPA. This is by design (admitedly this is a very unlikely configuration in the real world). However on such a config, attempting to create a vm with the guest kernel placed above 48 bits in IPA space results in misbehaviour due to the hypervisor incorrectly interpretting a faulting IPA. Fix up PAR_TO_HPFAR() to always take 52 bits out of the PAR rather than masking to CONFIG_ARM64_PA_BITS. If the system has a smaller implemented PARange this should be safe because the bits are res0. A more robust approach would be to discover the IPA size in use by the page-table and mask based on that, to avoid relying on res0 reading back as zero. But this information is difficult to access safely from the code's location, so take the easy way out. Fixes: bc1d7de8c550 ("kvm: arm64: Add 52bit support for PAR to HPFAR conversoin") Signed-off-by: Ryan Roberts [maz: commit message fixes] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221103150507.32948-3-ryan.roberts@arm.com arch/arm64/include/asm/kvm_arm.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 579d7ebe90a332cc5b6c02db9250fd0816a64f63 Author: Ryan Roberts Date: Thu Nov 3 15:05:06 2022 +0000 KVM: arm64: Fix kvm init failure when mode!=vhe and VA_BITS=52. For nvhe and protected modes, the hyp stage 1 page-tables were previously configured to have the same number of VA bits as the kernel's idmap. However, for kernel configs with VA_BITS=52 and where the kernel is loaded in physical memory below 48 bits, the idmap VA bits is actually smaller than the kernel's normal stage 1 VA bits. This can lead to kernel addresses that can't be mapped into the hypervisor, leading to kvm initialization failure during boot: kvm [1]: IPA Size Limit: 48 bits kvm [1]: Cannot map world-switch code kvm [1]: error initializing Hyp mode: -34 Fix this by ensuring that the hyp stage 1 VA size is the maximum of what's used for the idmap and the regular kernel stage 1. At the same time, refactor the code so that the hyp VA bits is only calculated in one place. Prior to 7ba8f2b2d652, the idmap was always 52 bits for a 52 VA bits kernel and therefore the hyp stage1 was also always 52 bits. Fixes: 7ba8f2b2d652 ("arm64: mm: use a 48-bit ID map when possible on 52-bit VA builds") Signed-off-by: Ryan Roberts [maz: commit message fixes] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221103150507.32948-2-ryan.roberts@arm.com arch/arm64/kvm/arm.c | 20 +++----------------- arch/arm64/kvm/mmu.c | 28 +++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 18 deletions(-) commit ebb92d58b90753e658059f5d8590d9048395491a Author: Xiongfeng Wang Date: Tue Nov 8 09:46:23 2022 +0800 ACPI: irq: Fix some kernel-doc issues The following commit change the second parameter of acpi_set_irq_model() but forgot to update the function description. Let's fix it. commit 7327b16f5f56 ("APCI: irq: Add support for multiple GSI domains") Also add description of parameter 'gsi' for acpi_get_irq_source_fwhandle() to avoid the following build W=1 warning. drivers/acpi/irq.c:108: warning: Function parameter or member 'gsi' not described in 'acpi_get_irq_source_fwhandle' Fixes: 7327b16f5f56 ("APCI: irq: Add support for multiple GSI domains") Signed-off-by: Xiongfeng Wang Signed-off-by: Rafael J. Wysocki drivers/acpi/irq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 062c0e3670c30ba03bd6b8cb5620d1ebd40e3839 Author: Hanjun Guo Date: Fri Nov 4 16:54:38 2022 +0800 ACPI: tables: Fix the stale comments for acpi_locate_initial_tables() sdt_entry[] is long gone by commit ceb6c4683902 ("ACPICA: Remove duplicate table manager"), update the comments to avoid confusion. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki drivers/acpi/tables.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ff2b5509e1d252cd18bb1430b5461d5044701559 Author: Ricardo Koller Date: Mon Oct 17 19:58:34 2022 +0000 KVM: selftests: aarch64: Add mix of tests into page_fault_test Add some mix of tests into page_fault_test: memory regions with all the pairwise combinations of read-only, userfaultfd, and dirty-logging. For example, writing into a read-only region which has a hole handled with userfaultfd. Signed-off-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-15-ricarkol@google.com .../selftests/kvm/aarch64/page_fault_test.c | 155 +++++++++++++++++++++ 1 file changed, 155 insertions(+) commit 45acde40f538a30e759f3b3f4aa5089edf097b2f Author: Ricardo Koller Date: Mon Oct 17 19:58:33 2022 +0000 KVM: selftests: aarch64: Add readonly memslot tests into page_fault_test Add some readonly memslot tests into page_fault_test. Mark the data and/or page-table memory regions as readonly, perform some accesses, and check that the right fault is triggered when expected (e.g., a store with no write-back should lead to an mmio exit). Signed-off-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-14-ricarkol@google.com .../selftests/kvm/aarch64/page_fault_test.c | 102 ++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) commit a4edf25b3e25656c69cbc768d1c704868e4a616f Author: Ricardo Koller Date: Mon Oct 17 19:58:32 2022 +0000 KVM: selftests: aarch64: Add dirty logging tests into page_fault_test Add some dirty logging tests into page_fault_test. Mark the data and/or page-table memory regions for dirty logging, perform some accesses, and check that the dirty log bits are set or clean when expected. Signed-off-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-13-ricarkol@google.com .../selftests/kvm/aarch64/page_fault_test.c | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 3b1d915659c64dce079f4926a648f2271faea008 Author: Ricardo Koller Date: Mon Oct 17 19:58:31 2022 +0000 KVM: selftests: aarch64: Add userfaultfd tests into page_fault_test Add some userfaultfd tests into page_fault_test. Punch holes into the data and/or page-table memslots, perform some accesses, and check that the faults are taken (or not taken) when expected. Signed-off-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-12-ricarkol@google.com .../selftests/kvm/aarch64/page_fault_test.c | 187 +++++++++++++++++++++ 1 file changed, 187 insertions(+) commit 35c5810157124cb71aaa939cd2d5508192714877 Author: Ricardo Koller Date: Mon Oct 17 19:58:30 2022 +0000 KVM: selftests: aarch64: Add aarch64/page_fault_test Add a new test for stage 2 faults when using different combinations of guest accesses (e.g., write, S1PTW), backing source type (e.g., anon) and types of faults (e.g., read on hugetlbfs with a hole). The next commits will add different handling methods and more faults (e.g., uffd and dirty logging). This first commit starts by adding two sanity checks for all types of accesses: AF setting by the hw, and accessing memslots with holes. Signed-off-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-11-ricarkol@google.com tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm/aarch64/page_fault_test.c | 594 +++++++++++++++++++++ .../selftests/kvm/include/aarch64/processor.h | 8 + 4 files changed, 604 insertions(+) commit 1446e331432d7f24ed56b870ad605a4345fee43f Author: Ricardo Koller Date: Mon Oct 17 19:58:29 2022 +0000 KVM: selftests: Use the right memslot for code, page-tables, and data allocations Now that kvm_vm allows specifying different memslots for code, page tables, and data, use the appropriate memslot when making allocations in common/libraty code. Change them accordingly: - code (allocated by lib/elf) use the CODE memslot - stacks, exception tables, and other core data pages (like the TSS in x86) use the DATA memslot - page tables and the PGD use the PT memslot - test data (anything allocated with vm_vaddr_alloc()) uses the TEST_DATA memslot No functional change intended. All allocators keep using memslot #0. Cc: Sean Christopherson Cc: Andrew Jones Signed-off-by: Ricardo Koller Reviewed-by: Sean Christopherson Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-10-ricarkol@google.com .../testing/selftests/kvm/include/kvm_util_base.h | 4 ++ .../testing/selftests/kvm/lib/aarch64/processor.c | 12 +++-- tools/testing/selftests/kvm/lib/elf.c | 3 +- tools/testing/selftests/kvm/lib/kvm_util.c | 57 +++++++++++++--------- tools/testing/selftests/kvm/lib/riscv/processor.c | 8 +-- tools/testing/selftests/kvm/lib/s390x/processor.c | 8 +-- tools/testing/selftests/kvm/lib/x86_64/processor.c | 13 ++--- 7 files changed, 65 insertions(+), 40 deletions(-) commit 5485e822e31a75dfac3713d94b6b22025d4895da Author: Ricardo Koller Date: Mon Oct 17 19:58:28 2022 +0000 KVM: selftests: Fix alignment in virt_arch_pgd_alloc() and vm_vaddr_alloc() Refactor virt_arch_pgd_alloc() and vm_vaddr_alloc() in both RISC-V and aarch64 to fix the alignment of parameters in a couple of calls. This will make it easier to fix the alignment in a future commit that adds an extra parameter (that happens to be very long). No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: Ricardo Koller Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-9-ricarkol@google.com .../testing/selftests/kvm/lib/aarch64/processor.c | 27 ++++++++++++---------- tools/testing/selftests/kvm/lib/riscv/processor.c | 27 ++++++++++++---------- 2 files changed, 30 insertions(+), 24 deletions(-) commit 290c5b54012b7f05e9c51af32d557574bf69a654 Author: Ricardo Koller Date: Mon Oct 17 19:58:27 2022 +0000 KVM: selftests: Add vm->memslots[] and enum kvm_mem_region_type The vm_create() helpers are hardcoded to place most page types (code, page-tables, stacks, etc) in the same memslot #0, and always backed with anonymous 4K. There are a couple of issues with that. First, tests willing to differ a bit, like placing page-tables in a different backing source type must replicate much of what's already done by the vm_create() functions. Second, the hardcoded assumption of memslot #0 holding most things is spread everywhere; this makes it very hard to change. Fix the above issues by having selftests specify how they want memory to be laid out. Start by changing ____vm_create() to not create memslot #0; a test (to come) will specify all memslots used by the VM. Then, add the vm->memslots[] array to specify the right memslot for different memory allocators, e.g.,: lib/elf should use the vm->[MEM_REGION_CODE] memslot. This will be used as a way to specify the page-tables memslots (to be backed by huge pages for example). There is no functional change intended. The current commit lays out memory exactly as before. A future commit will change the allocators to get the region they should be using, e.g.,: like the page table allocators using the pt memslot. Cc: Sean Christopherson Cc: Andrew Jones Signed-off-by: Ricardo Koller Reviewed-by: Andrew Jones Reviewed-by: Sean Christopherson Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-8-ricarkol@google.com .../testing/selftests/kvm/include/kvm_util_base.h | 26 ++++++++++++++++++++-- tools/testing/selftests/kvm/lib/kvm_util.c | 18 ++++++++------- 2 files changed, 34 insertions(+), 10 deletions(-) commit bd3ed7e1a47eb7b3838ca09439f1eb289ec3be1f Author: Ricardo Koller Date: Mon Oct 17 19:58:26 2022 +0000 KVM: selftests: Stash backing_src_type in struct userspace_mem_region Add the backing_src_type into struct userspace_mem_region. This struct already stores a lot of info about memory regions, except the backing source type. This info will be used by a future commit in order to determine the method for punching a hole. Reviewed-by: Oliver Upton Signed-off-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-7-ricarkol@google.com tools/testing/selftests/kvm/include/kvm_util_base.h | 1 + tools/testing/selftests/kvm/lib/kvm_util.c | 1 + 2 files changed, 2 insertions(+) commit 590b949597b1e811d35df2f32021dd17d8e47f8c Author: Ricardo Koller Date: Mon Oct 17 19:58:25 2022 +0000 tools: Copy bitfield.h from the kernel sources Copy bitfield.h from include/linux/bitfield.h. A subsequent change will make use of some FIELD_{GET,PREP} macros defined in this header. The header was copied as-is, no changes needed. Cc: Jakub Kicinski Cc: Arnaldo Carvalho de Melo Reviewed-by: Oliver Upton Signed-off-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-6-ricarkol@google.com tools/include/linux/bitfield.h | 176 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) commit 41f5189ea9c08f7fc28340a7aefc93d0d2dcb769 Author: Ricardo Koller Date: Mon Oct 17 19:58:24 2022 +0000 KVM: selftests: aarch64: Construct DEFAULT_MAIR_EL1 using sysreg.h macros Define macros for memory type indexes and construct DEFAULT_MAIR_EL1 with macros from asm/sysreg.h. The index macros can then be used when constructing PTEs (instead of using raw numbers). Reviewed-by: Andrew Jones Reviewed-by: Oliver Upton Signed-off-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-5-ricarkol@google.com .../selftests/kvm/include/aarch64/processor.h | 25 ++++++++++++++++------ .../testing/selftests/kvm/lib/aarch64/processor.c | 2 +- 2 files changed, 20 insertions(+), 7 deletions(-) commit b6b03b86c0250a80b671313dbc0d7bcdbab78f41 Author: Ricardo Koller Date: Mon Oct 17 19:58:23 2022 +0000 KVM: selftests: Add missing close and munmap in __vm_mem_region_delete() Deleting a memslot (when freeing a VM) is not closing the backing fd, nor it's unmapping the alias mapping. Fix by adding the missing close and munmap. Reviewed-by: Andrew Jones Reviewed-by: Oliver Upton Reviewed-by: Ben Gardon Signed-off-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-4-ricarkol@google.com tools/testing/selftests/kvm/lib/kvm_util.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 228f324dc718f702e8777164c4e2e7426824fb13 Author: Ricardo Koller Date: Mon Oct 17 19:58:22 2022 +0000 KVM: selftests: aarch64: Add virt_get_pte_hva() library function Add a library function to get the PTE (a host virtual address) of a given GVA. This will be used in a future commit by a test to clear and check the access flag of a particular page. Reviewed-by: Oliver Upton Reviewed-by: Andrew Jones Signed-off-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-3-ricarkol@google.com tools/testing/selftests/kvm/include/aarch64/processor.h | 2 ++ tools/testing/selftests/kvm/lib/aarch64/processor.c | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) commit a93871d0ea9fd59fb5eb783619334183d7f07f51 Author: Ricardo Koller Date: Mon Oct 17 19:58:21 2022 +0000 KVM: selftests: Add a userfaultfd library Move the generic userfaultfd code out of demand_paging_test.c into a common library, userfaultfd_util. This library consists of a setup and a stop function. The setup function starts a thread for handling page faults using the handler callback function. This setup returns a uffd_desc object which is then used in the stop function (to wait and destroy the threads). Reviewed-by: Oliver Upton Reviewed-by: Ben Gardon Signed-off-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221017195834.2295901-2-ricarkol@google.com tools/testing/selftests/kvm/Makefile | 1 + tools/testing/selftests/kvm/demand_paging_test.c | 228 +++------------------ .../selftests/kvm/include/userfaultfd_util.h | 45 ++++ tools/testing/selftests/kvm/lib/userfaultfd_util.c | 186 +++++++++++++++++ 4 files changed, 262 insertions(+), 198 deletions(-) commit ebb8cc10316de3040efc4cfb40030f374cbbaa3b Author: Reiji Watanabe Date: Wed Oct 19 22:42:02 2022 -0700 KVM: arm64: selftests: Test with every breakpoint/watchpoint Currently, the debug-exceptions test always uses only {break,watch}point#0 and the highest numbered context-aware breakpoint. Modify the test to use all {break,watch}points and context-aware breakpoints supported on the system. Signed-off-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020054202.2119018-10-reijiw@google.com .../selftests/kvm/aarch64/debug-exceptions.c | 54 +++++++++++++++++----- 1 file changed, 42 insertions(+), 12 deletions(-) commit 5ced4e533b676b1a582d89aba5328e4b316957e0 Author: Reiji Watanabe Date: Wed Oct 19 22:42:01 2022 -0700 KVM: arm64: selftests: Add a test case for a linked watchpoint Currently, the debug-exceptions test doesn't have a test case for a linked watchpoint. Add a test case for the linked watchpoint to the test. The new test case uses the highest numbered context-aware breakpoint (for Context ID match), and the watchpoint#0, which is linked to the context-aware breakpoint. Signed-off-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020054202.2119018-9-reijiw@google.com .../selftests/kvm/aarch64/debug-exceptions.c | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 142365932f5f296df593dd653d79194ff5457722 Author: Reiji Watanabe Date: Wed Oct 19 22:42:00 2022 -0700 KVM: arm64: selftests: Add a test case for a linked breakpoint Currently, the debug-exceptions test doesn't have a test case for a linked breakpoint. Add a test case for the linked breakpoint to the test. The new test case uses a pair of breakpoints. One is the higiest numbered context-aware breakpoint (for Context ID match), and the other one is the breakpoint#0 (for Address Match), which is linked to the context-aware breakpoint. Signed-off-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020054202.2119018-8-reijiw@google.com .../selftests/kvm/aarch64/debug-exceptions.c | 63 +++++++++++++++++++--- 1 file changed, 57 insertions(+), 6 deletions(-) commit 5dd544e882d96d43b363c5ef64683281f2a386d9 Author: Reiji Watanabe Date: Wed Oct 19 22:41:59 2022 -0700 KVM: arm64: selftests: Change debug_version() to take ID_AA64DFR0_EL1 Change debug_version() to take the ID_AA64DFR0_EL1 value instead of vcpu as an argument, and change its callsite to read ID_AA64DFR0_EL1 (and pass it to debug_version()). Subsequent patches will reuse the register value in the callsite. No functional change intended. Signed-off-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020054202.2119018-7-reijiw@google.com tools/testing/selftests/kvm/aarch64/debug-exceptions.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 948f439c9d0080972ec937f4aefbe51229546510 Author: Reiji Watanabe Date: Wed Oct 19 22:41:58 2022 -0700 KVM: arm64: selftests: Stop unnecessary test stage tracking of debug-exceptions Currently, debug-exceptions test unnecessarily tracks some test stages using GUEST_SYNC(). The code for it needs to be updated as test cases are added or removed. Stop doing the unnecessary stage tracking, as they are not so useful and are a bit pain to maintain. Signed-off-by: Reiji Watanabe Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020054202.2119018-6-reijiw@google.com .../selftests/kvm/aarch64/debug-exceptions.c | 46 +++++----------------- 1 file changed, 9 insertions(+), 37 deletions(-) commit 152880d8edf5ad6df5b4b4915a4d9f9085ab8fef Author: Reiji Watanabe Date: Wed Oct 19 22:41:57 2022 -0700 KVM: arm64: selftests: Add helpers to enable debug exceptions Add helpers to enable breakpoint and watchpoint exceptions. No functional change intended. Signed-off-by: Reiji Watanabe Reviewed-by: Ricardo Koller Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020054202.2119018-5-reijiw@google.com .../selftests/kvm/aarch64/debug-exceptions.c | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) commit 700b8860e02cbaa7dd1181a914ff38e0fae18bf0 Author: Reiji Watanabe Date: Wed Oct 19 22:41:56 2022 -0700 KVM: arm64: selftests: Remove the hard-coded {b,w}pn#0 from debug-exceptions Remove the hard-coded {break,watch}point #0 from the guest_code() in debug-exceptions to allow {break,watch}point number to be specified. Change reset_debug_state() to zeroing all dbg{b,w}{c,v}r_el0 registers so that guest_code() can use the function to reset those registers even when non-zero {break,watch}points are specified for guest_code(). Subsequent patches will add test cases for non-zero {break,watch}points. Signed-off-by: Reiji Watanabe Reviewed-by: Ricardo Koller Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020054202.2119018-4-reijiw@google.com .../selftests/kvm/aarch64/debug-exceptions.c | 50 ++++++++++++++-------- 1 file changed, 32 insertions(+), 18 deletions(-) commit f6d02aa28ae21161d64300bac62b2dde85584004 Author: Reiji Watanabe Date: Wed Oct 19 22:41:55 2022 -0700 KVM: arm64: selftests: Add write_dbg{b,w}{c,v}r helpers in debug-exceptions Introduce helpers in the debug-exceptions test to write to dbg{b,w}{c,v}r registers. Those helpers will be useful for test cases that will be added to the test in subsequent patches. No functional change intended. Signed-off-by: Reiji Watanabe Reviewed-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020054202.2119018-3-reijiw@google.com .../selftests/kvm/aarch64/debug-exceptions.c | 72 ++++++++++++++++++++-- 1 file changed, 68 insertions(+), 4 deletions(-) commit 1a6182033f2d5c481aec1f8c1c26ebc649693d57 Author: Reiji Watanabe Date: Wed Oct 19 22:41:54 2022 -0700 KVM: arm64: selftests: Use FIELD_GET() to extract ID register fields Use FIELD_GET() macro to extract ID register fields for existing aarch64 selftests code. No functional change intended. Signed-off-by: Reiji Watanabe Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020054202.2119018-2-reijiw@google.com tools/testing/selftests/kvm/aarch64/aarch32_id_regs.c | 3 ++- tools/testing/selftests/kvm/aarch64/debug-exceptions.c | 3 ++- tools/testing/selftests/kvm/lib/aarch64/processor.c | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) commit a69170c65acdf430e24fc1b6174dcc3aa501fe2f Author: Gavin Shan Date: Thu Oct 20 15:12:09 2022 +0800 KVM: selftests: memslot_perf_test: Report optimal memory slots The memory area in each slot should be aligned to host page size. Otherwise, the test will fail. For example, the following command fails with the following messages with 64KB-page-size-host and 4KB-pae-size-guest. It's not user friendly to abort the test. Lets do something to report the optimal memory slots, instead of failing the test. # ./memslot_perf_test -v -s 1000 Number of memory slots: 999 Testing map performance with 1 runs, 5 seconds each Adding slots 1..999, each slot with 8 pages + 216 extra pages last ==== Test Assertion Failure ==== lib/kvm_util.c:824: vm_adjust_num_guest_pages(vm->mode, npages) == npages pid=19872 tid=19872 errno=0 - Success 1 0x00000000004065b3: vm_userspace_mem_region_add at kvm_util.c:822 2 0x0000000000401d6b: prepare_vm at memslot_perf_test.c:273 3 (inlined by) test_execute at memslot_perf_test.c:756 4 (inlined by) test_loop at memslot_perf_test.c:994 5 (inlined by) main at memslot_perf_test.c:1073 6 0x0000ffff7ebb4383: ?? ??:0 7 0x00000000004021ff: _start at :? Number of guest pages is not compatible with the host. Try npages=16 Report the optimal memory slots instead of failing the test when the memory area in each slot isn't aligned to host page size. With this applied, the optimal memory slots is reported. # ./memslot_perf_test -v -s 1000 Number of memory slots: 999 Testing map performance with 1 runs, 5 seconds each Memslot count too high for this test, decrease the cap (max is 514) Signed-off-by: Gavin Shan Reviewed-by: Maciej S. Szmigiero Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020071209.559062-7-gshan@redhat.com tools/testing/selftests/kvm/memslot_perf_test.c | 45 ++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-) commit 88a64e65484ef6b5cb09fe545d0dd00c950a1131 Author: Gavin Shan Date: Thu Oct 20 15:12:08 2022 +0800 KVM: selftests: memslot_perf_test: Consolidate memory The addresses and sizes passed to vm_userspace_mem_region_add() and madvise() should be aligned to host page size, which can be 64KB on aarch64. So it's wrong by passing additional fixed 4KB memory area to various tests. Fix it by passing additional fixed 64KB memory area to various tests. We also add checks to ensure that none of host/guest page size exceeds 64KB. MEM_TEST_MOVE_SIZE is fixed up to 192KB either. With this, the following command works fine on 64KB-page-size-host and 4KB-page-size-guest. # ./memslot_perf_test -v -s 512 Signed-off-by: Gavin Shan Reviewed-by: Maciej S. Szmigiero Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020071209.559062-6-gshan@redhat.com tools/testing/selftests/kvm/memslot_perf_test.c | 43 +++++++++++++++---------- 1 file changed, 26 insertions(+), 17 deletions(-) commit 8675c6f226986ddb67752be22279a0e2385b197e Author: Gavin Shan Date: Thu Oct 20 15:12:07 2022 +0800 KVM: selftests: memslot_perf_test: Support variable guest page size The test case is obviously broken on aarch64 because non-4KB guest page size is supported. The guest page size on aarch64 could be 4KB, 16KB or 64KB. This supports variable guest page size, mostly for aarch64. - The host determines the guest page size when virtual machine is created. The value is also passed to guest through the synchronization area. - The number of guest pages are unknown until the virtual machine is to be created. So all the related macros are dropped. Instead, their values are dynamically calculated based on the guest page size. - The static checks on memory sizes and pages becomes dependent on guest page size, which is unknown until the virtual machine is about to be created. So all the static checks are converted to dynamic checks, done in check_memory_sizes(). - As the address passed to madvise() should be aligned to host page, the size of page chunk is automatically selected, other than one page. - MEM_TEST_MOVE_SIZE has fixed and non-working 64KB. It will be consolidated in next patch. However, the comments about how it's calculated has been correct. - All other changes included in this patch are almost mechanical replacing '4096' with 'guest_page_size'. Signed-off-by: Gavin Shan Reviewed-by: Maciej S. Szmigiero Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020071209.559062-5-gshan@redhat.com tools/testing/selftests/kvm/memslot_perf_test.c | 210 +++++++++++++++--------- 1 file changed, 129 insertions(+), 81 deletions(-) commit 34396437b11f904fc61b272e3974f4c92868451b Author: Gavin Shan Date: Thu Oct 20 15:12:06 2022 +0800 KVM: selftests: memslot_perf_test: Probe memory slots for once prepare_vm() is called in every iteration and run. The allowed memory slots (KVM_CAP_NR_MEMSLOTS) are probed for multiple times. It's not free and unnecessary. Move the probing logic for the allowed memory slots to parse_args() for once, which is upper layer of prepare_vm(). No functional change intended. Signed-off-by: Gavin Shan Reviewed-by: Maciej S. Szmigiero Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020071209.559062-4-gshan@redhat.com tools/testing/selftests/kvm/memslot_perf_test.c | 32 +++++++++++++++---------- 1 file changed, 19 insertions(+), 13 deletions(-) commit 2aae5e6795e1407334bb849f96f11c9051b959e2 Author: Gavin Shan Date: Thu Oct 20 15:12:05 2022 +0800 KVM: selftests: memslot_perf_test: Consolidate loop conditions in prepare_vm() There are two loops in prepare_vm(), which have different conditions. 'slot' is treated as meory slot index in the first loop, but index of the host virtual address array in the second loop. It makes it a bit hard to understand the code. Change the usage of 'slot' in the second loop, to treat it as the memory slot index either. No functional change intended. Signed-off-by: Gavin Shan Reviewed-by: Maciej S. Szmigiero Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020071209.559062-3-gshan@redhat.com tools/testing/selftests/kvm/memslot_perf_test.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 3bfadb2325891d122771ce534336af531e93d7b2 Author: Gavin Shan Date: Thu Oct 20 15:12:04 2022 +0800 KVM: selftests: memslot_perf_test: Use data->nslots in prepare_vm() In prepare_vm(), 'data->nslots' is assigned with 'max_mem_slots - 1' at the beginning, meaning they are interchangeable. Use 'data->nslots' isntead of 'max_mem_slots - 1'. With this, it becomes easier to move the logic of probing number of slots into upper layer in subsequent patches. No functional change intended. Signed-off-by: Gavin Shan Reviewed-by: Maciej S. Szmigiero Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221020071209.559062-2-gshan@redhat.com tools/testing/selftests/kvm/memslot_perf_test.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 612a5337ae7a87893f90de7878b20701b2b17d7d Author: James Clark Date: Thu Oct 20 14:45:11 2022 +0100 perf vendor events: Add Arm Neoverse V2 PMU events Rename the neoverse-n2 folder to make it clear that it includes V2, and add V2 to mapfile.csv. V2 has the same events as N2, visible by running the following command in the ARM-software/data github repo [1]: diff pmu/neoverse-v2.json pmu/neoverse-n2.json | grep code Testing: $ perf test pmu 10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok [1]: https://github.com/ARM-software/data Reviewed-by: Nick Forrington Signed-off-by: James Clark Cc: Al Grant Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20221020134512.1345013-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/arm64/arm/{neoverse-n2 => neoverse-n2-v2}/branch.json | 0 .../pmu-events/arch/arm64/arm/{neoverse-n2 => neoverse-n2-v2}/bus.json | 0 .../arch/arm64/arm/{neoverse-n2 => neoverse-n2-v2}/cache.json | 0 .../arch/arm64/arm/{neoverse-n2 => neoverse-n2-v2}/exception.json | 0 .../arch/arm64/arm/{neoverse-n2 => neoverse-n2-v2}/instruction.json | 0 .../arch/arm64/arm/{neoverse-n2 => neoverse-n2-v2}/memory.json | 0 .../arch/arm64/arm/{neoverse-n2 => neoverse-n2-v2}/pipeline.json | 0 .../pmu-events/arch/arm64/arm/{neoverse-n2 => neoverse-n2-v2}/spe.json | 0 .../arch/arm64/arm/{neoverse-n2 => neoverse-n2-v2}/trace.json | 0 tools/perf/pmu-events/arch/arm64/mapfile.csv | 3 ++- 10 files changed, 2 insertions(+), 1 deletion(-) commit cf9f67b36303de65596ae7504a2a7573c08876bb Author: Kang Minchul Date: Sat Nov 5 22:59:32 2022 +0900 perf print-events: Remove redundant comparison with zero Since variable npmus is unsigned int, comparing with 0 is unnecessary. Signed-off-by: Kang Minchul 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/20221105135932.81612-1-tegongkang@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/print-events.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9d895e46842908aa49a042e699097df64ab20b7f Author: Dmitrii Dolgov <9erthalion6@gmail.com> Date: Wed Nov 9 11:39:32 2022 +0100 perf data: Add tracepoint fields when converting to JSON When converting recorded data into JSON format, perf data omits probe variables. Add them to the output in the format "field name": "field value" using tep_print_field: $ perf data convert --to-json output.json // output.json { "linux-perf-json-version": 1, "headers": { ... }, "samples": [ { "timestamp": 29182079082999, "pid": 309194, [...] "__probe_ip": "0x93ee35", "query_string_string": "select 2;", "nxids": "0" } ] } Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com> Acked-by: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Link: https://lore.kernel.org/r/20221109103932.65675-1-9erthalion6@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/data-convert-json.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 30b331d2e3bc5c7c95568477d4bf2661b6e6cb3e Author: Namhyung Kim Date: Thu Nov 3 22:14:40 2022 -0700 perf lock: Allow concurrent record and report To support live monitoring of kernel lock contention without BPF, it should support something like below: # perf lock record -a -o- sleep 1 | perf lock contention -i- contended total wait max wait avg wait type caller 2 10.27 us 6.17 us 5.13 us spinlock load_balance+0xc03 1 5.29 us 5.29 us 5.29 us rwlock:W ep_scan_ready_list+0x54 1 4.12 us 4.12 us 4.12 us spinlock smpboot_thread_fn+0x116 1 3.28 us 3.28 us 3.28 us mutex pipe_read+0x50 To do that, it needs to handle HEAD_ATTR, HEADER_EVENT_UPDATE and HEADER_TRACING_DATA which are generated only for the pipe mode. And setting event handler also should be delayed until it gets the event information. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221104051440.220989-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 68 +++++++++++++++++++++---------- tools/perf/tests/shell/lock_contention.sh | 15 ++++++- 2 files changed, 60 insertions(+), 23 deletions(-) commit 913447d06f032a9e9c84870bec0b1adb8c588f29 Author: Eric Farman Date: Fri Nov 4 15:20:07 2022 +0100 vfio: Remove vfio_free_device With the "mess" sorted out, we should be able to inline the vfio_free_device call introduced by commit cb9ff3f3b84c ("vfio: Add helpers for unifying vfio_device life cycle") and remove them from driver release callbacks. Signed-off-by: Eric Farman Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Reviewed-by: Tony Krowiak # vfio-ap part Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20221104142007.1314999-8-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/gpu/drm/i915/gvt/kvmgt.c | 1 - drivers/s390/cio/vfio_ccw_ops.c | 2 -- drivers/s390/crypto/vfio_ap_ops.c | 6 ------ drivers/vfio/fsl-mc/vfio_fsl_mc.c | 1 - drivers/vfio/pci/vfio_pci_core.c | 1 - drivers/vfio/platform/vfio_amba.c | 1 - drivers/vfio/platform/vfio_platform.c | 1 - drivers/vfio/vfio_main.c | 22 ++++------------------ include/linux/vfio.h | 1 - samples/vfio-mdev/mbochs.c | 1 - samples/vfio-mdev/mdpy.c | 1 - samples/vfio-mdev/mtty.c | 1 - 12 files changed, 4 insertions(+), 35 deletions(-) commit d1104f9327df9b26901b97cd026949f80ccab0d3 Author: Eric Farman Date: Fri Nov 4 15:20:06 2022 +0100 vfio/ccw: replace vfio_init_device with _alloc_ Now that we have a reasonable separation of structs that follow the subchannel and mdev lifecycles, there's no reason we can't call the official vfio_alloc_device routine for our private data, and behave like everyone else. Signed-off-by: Eric Farman Reviewed-by: Kevin Tian Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20221104142007.1314999-7-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 18 ------------------ drivers/s390/cio/vfio_ccw_ops.c | 28 ++++++++++++++++++---------- drivers/s390/cio/vfio_ccw_private.h | 2 -- drivers/vfio/vfio_main.c | 10 +++++----- include/linux/vfio.h | 2 -- 5 files changed, 23 insertions(+), 37 deletions(-) commit 6ac73820993c13f30d226f9521f8ffae62acdf42 Author: Arnaldo Carvalho de Melo Date: Thu Nov 10 15:30:10 2022 -0300 perf trace: Add augmenter for clock_gettime's rqtp timespec arg One more before going the BTF way: # perf trace -e /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o,*nanosleep ? pool-gsd-smart/2893 ... [continued]: clock_nanosleep()) = 0 ? gpm/1042 ... [continued]: clock_nanosleep()) = 0 1.232 pool-gsd-smart/2893 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f64d7ffec50) ... 1.232 pool-gsd-smart/2893 ... [continued]: clock_nanosleep()) = 0 327.329 gpm/1042 clock_nanosleep(rqtp: { .tv_sec: 2, .tv_nsec: 0 }, rmtp: 0x7ffddfd1cf20) ... 1002.482 pool-gsd-smart/2893 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f64d7ffec50) = 0 327.329 gpm/1042 ... [continued]: clock_nanosleep()) = 0 2003.947 pool-gsd-smart/2893 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f64d7ffec50) ... 2003.947 pool-gsd-smart/2893 ... [continued]: clock_nanosleep()) = 0 2327.858 gpm/1042 clock_nanosleep(rqtp: { .tv_sec: 2, .tv_nsec: 0 }, rmtp: 0x7ffddfd1cf20) ... ? crond/1384 ... [continued]: clock_nanosleep()) = 0 3005.382 pool-gsd-smart/2893 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7f64d7ffec50) ... 3005.382 pool-gsd-smart/2893 ... [continued]: clock_nanosleep()) = 0 3675.633 crond/1384 clock_nanosleep(rqtp: { .tv_sec: 60, .tv_nsec: 0 }, rmtp: 0x7ffcc02b66b0) ... ^C# Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 2 ++ tools/perf/examples/bpf/augmented_raw_syscalls.c | 28 ++++++++++++++++++++++++ tools/perf/trace/beauty/Build | 1 + tools/perf/trace/beauty/beauty.h | 3 +++ tools/perf/trace/beauty/timespec.c | 21 ++++++++++++++++++ 5 files changed, 55 insertions(+) commit ee9d55210c2fe40ab6600b8009de2243b2ad1a4a Author: Christoph Hellwig Date: Wed Nov 9 11:08:11 2022 +0100 blk-mq: simplify blk_mq_realloc_tag_set_tags Use set->nr_hw_queues for the current number of tags, and remove the duplicate set->nr_hw_queues update in the caller. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221109100811.2413423-2-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 5ee20298ff25e883d0668507b3216992a2e9e6cd Author: Christoph Hellwig Date: Wed Nov 9 11:08:10 2022 +0100 blk-mq: remove blk_mq_alloc_tag_set_tags There is no point in trying to share any code with the realloc case when all that is needed by the initial tagset allocation is a simple kcalloc_node. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221109100811.2413423-1-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 2a5796e63ee1ee4b6cdbbe81d74efe6b115640ff Author: Rafał Miłecki Date: Tue Nov 8 12:07:08 2022 +0100 ARM: dts: BCM5301X: Correct description of TP-Link partitions TP-Link routers have flash space partitioned according to the partitions table. It may look like fixed partitioning but those partitions can be actually reorganized. New can be added (or some removed), offsets and sizes may change. Fix DT to use binding for the TP-Link SafeLoader partitioning method. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20221108110708.13693-1-zajec5@gmail.com Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 25 +++++----------------- arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 25 +++++----------------- 2 files changed, 10 insertions(+), 40 deletions(-) commit 566656dd1a1725776bef77aba6a58a742bc1997a Author: Linus Walleij Date: Mon Nov 7 14:41:04 2022 +0100 ARM: dts: bcm47094: Add devicetree for D-Link DIR-890L This adds a device tree for the D-Link DIR-890L. This device is very similar to D-Link DIR-885L, the differences are detailed as a comment in the DTS file. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221107134104.1422169-2-linus.walleij@linaro.org Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts | 211 ++++++++++++++++++++++++++ 2 files changed, 212 insertions(+) commit 45174541c9feb1b290b2702fb0b7f1d33df469be Author: Linus Walleij Date: Mon Nov 7 14:41:03 2022 +0100 dt-bindings: ARM: add bindings for the D-Link DIR-890L The DIR-890L is a router similar to DIR-885L just a bit different. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221107134104.1422169-1-linus.walleij@linaro.org Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.yaml | 1 + 1 file changed, 1 insertion(+) commit 27ab05e1b7e5c5ec9b4f658e1b2464c0908298a6 Author: Maxime Ripard Date: Wed Oct 26 15:17:39 2022 +0200 ARM: dts: bcm2835-rpi: Use firmware clocks for display We've experienced a number of issues around the cohabitation between the "real" clock driver in Linux and the one backed by the firmware. One solution around this is to follow what the RaspberryPi foundation in its downstream clock, which is also what we've been doing on the RaspberryPi4: to use the clocks exposed by the firmware. Link: https://lore.kernel.org/linux-clk/20221021140505.kjmw5x4s6qhnrfif@houat/ Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20221026-rpi-display-fw-clk-v1-2-5c29b7a3d8b0@cerno.tech Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm2835-rpi-common.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 9d9491b6411903703a9e20d9e5c1a74861a8fbb2 Author: Maxime Ripard Date: Wed Oct 26 15:17:38 2022 +0200 ARM: dts: bcm283x: Remove bcm2835-rpi-common.dtsi from SoC DTSI According to the commit log of the commit 3ac395a5b3f3 ("ARM: dts: bcm283x: Use firmware PM driver for V3D"), the initial intent behind the bcm2835-rpi-common DTSI was to share data between the RaspberryPies based on the BCM2835, 36 and 37. However, it was included by these SoCs' main DTSI. This is creating an improper layering. On top of that, bcm2835.dtsi is being included by bcm2711.dtsi, which means that, even though the bcm2835-rpi-common DTSI wasn't actually meant to contain data for the BCM2711, it actually leaks into the BCM2711 DTSI. In order to remove both issues, let's remove the include of bcm2835-rpi-common.dtsi from bcm283{5-7}.dtsi and put them into the bcm283{6,7}-rpi.dtsi. BCM2835 has to be handled with special care due to the fact that bcm2835.dtsi is being included by bcm2711.dtsi. Thus, we chose to include bcm2835-rpi-common.dtsi directly into the board DTS. This will be more error-prone, but given that it's a fairly old SoC by now, the chance that we will get more BCM2835 boards is fairly low. BCM2711 isn't modified since the content of bcm2835-rpi-common.dtsi was only a power-domain for the v3d that was overridden anyway. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20221026-rpi-display-fw-clk-v1-1-5c29b7a3d8b0@cerno.tech Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-a.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-cm1.dtsi | 1 + arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-zero.dts | 1 + arch/arm/boot/dts/bcm2835.dtsi | 1 - arch/arm/boot/dts/bcm2836-rpi.dtsi | 1 + arch/arm/boot/dts/bcm2836.dtsi | 1 - arch/arm/boot/dts/bcm2837.dtsi | 1 - 12 files changed, 9 insertions(+), 3 deletions(-) commit 727209376f4998bc84db1d5d8af15afea846a92b Author: Guilherme G. Piccoli Date: Mon Oct 24 17:02:54 2022 -0300 x86/split_lock: Add sysctl to control the misery mode Commit b041b525dab9 ("x86/split_lock: Make life miserable for split lockers") changed the way the split lock detector works when in "warn" mode; basically, it not only shows the warn message, but also intentionally introduces a slowdown through sleeping plus serialization mechanism on such task. Based on discussions in [0], seems the warning alone wasn't enough motivation for userspace developers to fix their applications. This slowdown is enough to totally break some proprietary (aka. unfixable) userspace[1]. Happens that originally the proposal in [0] was to add a new mode which would warns + slowdown the "split locking" task, keeping the old warn mode untouched. In the end, that idea was discarded and the regular/default "warn" mode now slows down the applications. This is quite aggressive with regards proprietary/legacy programs that basically are unable to properly run in kernel with this change. While it is understandable that a malicious application could DoS by split locking, it seems unacceptable to regress old/proprietary userspace programs through a default configuration that previously worked. An example of such breakage was reported in [1]. Add a sysctl to allow controlling the "misery mode" behavior, as per Thomas suggestion on [2]. This way, users running legacy and/or proprietary software are allowed to still execute them with a decent performance while still observing the warning messages on kernel log. [0] https://lore.kernel.org/lkml/20220217012721.9694-1-tony.luck@intel.com/ [1] https://github.com/doitsujin/dxvk/issues/2938 [2] https://lore.kernel.org/lkml/87pmf4bter.ffs@tglx/ [ dhansen: minor changelog tweaks, including clarifying the actual problem ] Fixes: b041b525dab9 ("x86/split_lock: Make life miserable for split lockers") Suggested-by: Thomas Gleixner Signed-off-by: Guilherme G. Piccoli Signed-off-by: Dave Hansen Reviewed-by: Tony Luck Tested-by: Andre Almeida Link: https://lore.kernel.org/all/20221024200254.635256-1-gpiccoli%40igalia.com Documentation/admin-guide/sysctl/kernel.rst | 23 +++++++++++ arch/x86/kernel/cpu/intel.c | 63 ++++++++++++++++++++++++----- 2 files changed, 76 insertions(+), 10 deletions(-) commit f4da83f7e3f096ece936512d86ef3726e470fbfd Author: Eric Farman Date: Fri Nov 4 15:20:05 2022 +0100 vfio/ccw: remove release completion There's enough separation between the parent and private structs now, that it is fine to remove the release completion hack. Signed-off-by: Eric Farman Reviewed-by: Kevin Tian Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20221104142007.1314999-6-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_ops.c | 14 +------------- drivers/s390/cio/vfio_ccw_private.h | 3 --- 2 files changed, 1 insertion(+), 16 deletions(-) commit 3d62fe18b6a3a93c5360c2d590b9b40b6842133e Author: Eric Farman Date: Fri Nov 4 15:20:04 2022 +0100 vfio/ccw: move private to mdev lifecycle Now that the mdev parent data is split out into its own struct, it is safe to move the remaining private data to follow the mdev probe/remove lifecycle. The mdev parent data will remain where it is, and follow the subchannel and the css driver interfaces. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20221104142007.1314999-5-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 16 +--------------- drivers/s390/cio/vfio_ccw_ops.c | 26 +++++++++++++------------- drivers/s390/cio/vfio_ccw_private.h | 2 ++ 3 files changed, 16 insertions(+), 28 deletions(-) commit 06caaa27df8f1a8a6be78212c5ef5cac04500176 Author: Eric Farman Date: Fri Nov 4 15:20:03 2022 +0100 vfio/ccw: move private initialization to callback There's already a device initialization callback that is used to initialize the release completion workaround that was introduced by commit ebb72b765fb49 ("vfio/ccw: Use the new device life cycle helpers"). Move the other elements of the vfio_ccw_private struct that require distinct initialization over to that routine. With that done, the vfio_ccw_alloc_private routine only does a kzalloc, so fold it inline. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20221104142007.1314999-4-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 74 +++++-------------------------------- drivers/s390/cio/vfio_ccw_ops.c | 43 +++++++++++++++++++++ drivers/s390/cio/vfio_ccw_private.h | 7 +++- 3 files changed, 58 insertions(+), 66 deletions(-) commit 008a011d68036ebfa4dede07cb9b93dedaa958b1 Author: Eric Farman Date: Fri Nov 4 15:20:02 2022 +0100 vfio/ccw: remove private->sch These places all rely on the ability to jump from a private struct back to the subchannel struct. Rather than keeping a copy in our back pocket, let's use the relationship provided by the vfio_device embedded within the private. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20221104142007.1314999-3-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_chp.c | 5 +++-- drivers/s390/cio/vfio_ccw_drv.c | 3 +-- drivers/s390/cio/vfio_ccw_fsm.c | 27 ++++++++++++--------------- drivers/s390/cio/vfio_ccw_ops.c | 12 ++++++------ drivers/s390/cio/vfio_ccw_private.h | 7 ++++--- 5 files changed, 26 insertions(+), 28 deletions(-) commit 9e6f07cd1eaa72c41719050c5ca9d22a8c0b7c02 Author: Eric Farman Date: Fri Nov 4 15:20:01 2022 +0100 vfio/ccw: create a parent struct Move the stuff associated with the mdev parent (and thus the subchannel struct) into its own struct, and leave the rest in the existing private structure. The subchannel will point to the parent, and the parent will point to the private, for the areas where one or both are needed. Further separation of these structs will follow. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20221104142007.1314999-2-farman@linux.ibm.com Signed-off-by: Alex Williamson drivers/s390/cio/vfio_ccw_drv.c | 98 ++++++++++++++++++++++++++++++------- drivers/s390/cio/vfio_ccw_ops.c | 8 ++- drivers/s390/cio/vfio_ccw_private.h | 20 ++++++-- 3 files changed, 101 insertions(+), 25 deletions(-) commit 2f465b921bb8ff97025017e05f6c7a7a1f6a5749 Author: Jim Cromie Date: Sat Oct 22 16:56:37 2022 -0600 vmlinux.lds.h: place optional header space in BOUNDED_SECTION Extend recently added BOUNDED_SECTION(_name) macro by adding a KEEP(*(.gnu.linkonce.##_name)) before the KEEP(*(_name)). This does nothing by itself, vmlinux is the same before and after this patch. But if a developer adds a .gnu.linkonce.foo record, that record is placed in the front of the section, where it can be used as a header for the table. The intent is to create an up-link to another organizing struct, from where related tables can be referenced. And since every item in a table has a known offset from its header, that same offset can be used to fetch records from the related tables. By itself, this doesnt gain much, unless maybe the pattern of access is to scan 1 or 2 fields in each fat record, but with 2 16 bit .map* fields added, we could de-duplicate 2 related tables. The use case here is struct _ddebug, which has 3 pointers (function, file, module) with substantial repetition; respectively 53%, 90%, and the module column is fully recoverable after dynamic_debug_init() splits the table into a linked list of "module" chunks. On a DYNAMIC_DEBUG=y kernel with 5k pr_debugs, the memory savings should be ~100 KiB. Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20221022225637.1406715-3-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman include/asm-generic/vmlinux.lds.h | 2 ++ 1 file changed, 2 insertions(+) commit 9b351be25360c5cedfb98b88d6dfd89327849e52 Author: Jim Cromie Date: Sat Oct 22 16:56:36 2022 -0600 vmlinux.lds.h: add BOUNDED_SECTION* macros vmlinux.lds.h has ~45 occurrences of this general pattern: __start_foo = .; KEEP(*(foo)) __stop_foo = .; Reduce this pattern to a (group of 4) macros, and use them to reduce linecount. This was inspired by the codetag patchset. no functional change. CC: Suren Baghdasaryan CC: Kent Overstreet Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20221022225637.1406715-2-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman include/asm-generic/vmlinux.lds.h | 219 ++++++++++++++------------------------ 1 file changed, 79 insertions(+), 140 deletions(-) commit d3d76fbde1c456a6d19991baa99ea8c2d6e6696f Author: Thomas Weißschuh Date: Thu Nov 3 16:24:07 2022 +0100 kernel/ksysfs.c: export kernel cpu byteorder Certain files in procfs are formatted in byteorder-dependent formats. For example the IP addresses in /proc/net/udp. When using emulation like qemu-user, applications are not guaranteed to be using the same byteorder as the kernel. Therefore the kernel needs to provide a way for applications to discover the byteorder used in API-filesystems. Using systemcalls is not enough because these are intercepted and translated by the emulation. Also this makes it easier for non-compiled applications like shellscripts to discover the byteorder. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20221103152407.3348-1-linux@weissschuh.net Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-kernel-cpu_byteorder | 12 ++++++++++++ kernel/ksysfs.c | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+) commit 0d4a030b3db1b53498f1c1ae243677fa0dd2e7ce Author: Christophe JAILLET Date: Tue Nov 1 22:13:59 2022 +0100 greybus: svc: 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: Johan Hovold Reviewed-by: Alex Elder Link: https://lore.kernel.org/r/ebf1e6988a53a455990230a37cf759ee542ea7ec.1667336095.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/greybus/svc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 763dc90e9a4332f82ad43c866c6878742b15d4ab Author: Quan Nguyen Date: Mon Oct 31 09:44:42 2022 +0700 misc: smpro-misc: Add Ampere's Altra SMpro misc driver Add driver support for accessing various information reported by Ampere's SMpro co-processor such as Boot Progress and other miscellaneous data. Signed-off-by: Quan Nguyen Link: https://lore.kernel.org/r/20221031024442.2490881-4-quan@os.amperecomputing.com Signed-off-by: Greg Kroah-Hartman .../sysfs-bus-platform-devices-ampere-smpro | 48 +++++++ drivers/misc/Kconfig | 10 ++ drivers/misc/Makefile | 1 + drivers/misc/smpro-misc.c | 145 +++++++++++++++++++++ 4 files changed, 204 insertions(+) commit 4a4a4e9ebaa3ce903a3cdf8bb173eeaf87828cea Author: Quan Nguyen Date: Mon Oct 31 09:44:41 2022 +0700 misc: smpro-errmon: Add Ampere's SMpro error monitor driver Add Ampere's SMpro error monitor driver for monitoring and reporting RAS-related errors as reported by SMpro co-processor found on Ampere's Altra processor family. Signed-off-by: Quan Nguyen Link: https://lore.kernel.org/r/20221031024442.2490881-3-quan@os.amperecomputing.com Signed-off-by: Greg Kroah-Hartman .../sysfs-bus-platform-devices-ampere-smpro | 264 ++++++++++ drivers/misc/Kconfig | 12 + drivers/misc/Makefile | 1 + drivers/misc/smpro-errmon.c | 529 +++++++++++++++++++++ 4 files changed, 806 insertions(+) commit c08645ea215c446ceb21029fe5416e6a62cbbed7 Author: Liu Ying Date: Mon Oct 17 15:40:39 2022 +0800 dt-bindings: bus: Add Freescale i.MX8qxp pixel link MSI bus binding Freescale i.MX8qxp pixel link MSI bus is a simple memory-mapped bus. It is used to access peripherals in i.MX8qm/qxp imaging, LVDS, MIPI DSI and HDMI TX subsystems, like I2C controller, PWM controller, MIPI DSI controller and Control and Status Registers (CSR) module. Reference simple-pm-bus bindings and add Freescale i.MX8qxp pixel link MSI bus specific bindings. Reviewed-by: Rob Herring Signed-off-by: Liu Ying Link: https://lore.kernel.org/r/20221017074039.4181843-3-victor.liu@nxp.com Signed-off-by: Greg Kroah-Hartman .../bus/fsl,imx8qxp-pixel-link-msi-bus.yaml | 232 +++++++++++++++++++++ 1 file changed, 232 insertions(+) commit 882cf4c913d730a74175db039d941005b883de38 Author: Liu Ying Date: Mon Oct 17 15:40:38 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. Reviewed-by: Geert Uytterhoeven Signed-off-by: Liu Ying Link: https://lore.kernel.org/r/20221017074039.4181843-2-victor.liu@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/bus/simple-pm-bus.c | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 52c4d11f1dce60453ab2a75fd7103118cedb2b58 Author: Andy Shevchenko Date: Wed Nov 9 17:56:18 2022 +0200 resource: Convert DEFINE_RES_NAMED() to be compound literal Currently DEFINE_RES_NAMED() can only be used to fill the static data. In some cases it would be convenient to use it as right value in the assignment operation. But it can't be done as is, because compiler has no clue about the data layout. Converting it to be a compound literal allows the above mentioned usage. Signed-off-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221109155618.42276-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman include/linux/ioport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a4e628570d42fcc13a94f1acf25e3cfeaec08f6 Author: Andy Shevchenko Date: Wed Nov 9 17:56:17 2022 +0200 resource: Replace printk(KERN_WARNING) by pr_warn(), printk() by pr_info() Replace printk(KERN_WARNING) by pr_warn() and printk() by pr_info(). While at it, use %pa for the resource_size_t variables. With that, for the sake of consistency, introduce a temporary variable for the end address in iomem_map_sanity_check() like it's done in another function in the same module. Signed-off-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221109155618.42276-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman kernel/resource.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit d4ad017d634561907ecdd1e467a28612b369ee00 Author: Soha Jin Date: Sat Oct 1 00:26:04 2022 +0800 platform: use fwnode_irq_get_byname instead of of_irq_get_byname to get irq Not only platform devices described by OF have named interrupts, but devices described by ACPI also have named interrupts. The fwnode is an abstraction to different standards, and using fwnode_irq_get_byname can support more devices. Signed-off-by: Soha Jin Tested-by: Wende Tan Signed-off-by: Greg Kroah-Hartman drivers/base/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a3fc57bc49a24960fd6a907457f9360a3e65b968 Author: Rafael Mendonca Date: Fri Sep 30 19:40:59 2022 -0300 uio: uio_dmem_genirq: Use non-atomic bit operations in irq config and handling This finishes the port of the irq configuration and handling from "uio_pdrv_genirq" to "uio_dmem_genirq". It changes the atomic bit-manipulation routines to their non-atomic counterparts as we are already guarding the code by spinlock. Split out from commit 34cb27528398 ("UIO: Fix concurrency issue"). Signed-off-by: Rafael Mendonca Link: https://lore.kernel.org/r/20220930224100.816175-4-rafaelmendsr@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/uio/uio_dmem_genirq.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 118b918018175d9fcd8db667f905012e986cc2c9 Author: Rafael Mendonca Date: Fri Sep 30 19:40:58 2022 -0300 uio: uio_dmem_genirq: Fix deadlock between irq config and handling This fixes a concurrency issue addressed in commit 34cb27528398 ("UIO: Fix concurrency issue"): "In a SMP case there was a race condition issue between Uio_pdrv_genirq_irqcontrol() running on one CPU and irq handler on another CPU. Fix it by spin_locking shared resources access inside irq handler." The implementation of "uio_dmem_genirq" was based on "uio_pdrv_genirq" and it is used in a similar manner to the "uio_pdrv_genirq" driver with respect to interrupt configuration and handling. At the time "uio_dmem_genirq" was merged, both had the same implementation of the 'uio_info' handlers irqcontrol() and handler(), thus, both had the same concurrency issue mentioned by the above commit. However, the above patch was only applied to the "uio_pdrv_genirq" driver. Split out from commit 34cb27528398 ("UIO: Fix concurrency issue"). Fixes: 0a0c3b5a24bd ("Add new uio device for dynamic memory allocation") Signed-off-by: Rafael Mendonca Link: https://lore.kernel.org/r/20220930224100.816175-3-rafaelmendsr@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/uio/uio_dmem_genirq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9de255c461d1b3f0242b3ad1450c3323a3e00b34 Author: Rafael Mendonca Date: Fri Sep 30 19:40:57 2022 -0300 uio: uio_dmem_genirq: Fix missing unlock in irq configuration Commit b74351287d4b ("uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol()") started calling disable_irq() without holding the spinlock because it can sleep. However, that fix introduced another bug: if interrupt is already disabled and a new disable request comes in, then the spinlock is not unlocked: root@localhost:~# printf '\x00\x00\x00\x00' > /dev/uio0 root@localhost:~# printf '\x00\x00\x00\x00' > /dev/uio0 root@localhost:~# [ 14.851538] BUG: scheduling while atomic: bash/223/0x00000002 [ 14.851991] Modules linked in: uio_dmem_genirq uio myfpga(OE) bochs drm_vram_helper drm_ttm_helper ttm drm_kms_helper drm snd_pcm ppdev joydev psmouse snd_timer snd e1000fb_sys_fops syscopyarea parport sysfillrect soundcore sysimgblt input_leds pcspkr i2c_piix4 serio_raw floppy evbug qemu_fw_cfg mac_hid pata_acpi ip_tables x_tables autofs4 [last unloaded: parport_pc] [ 14.854206] CPU: 0 PID: 223 Comm: bash Tainted: G OE 6.0.0-rc7 #21 [ 14.854786] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 [ 14.855664] Call Trace: [ 14.855861] [ 14.856025] dump_stack_lvl+0x4d/0x67 [ 14.856325] dump_stack+0x14/0x1a [ 14.856583] __schedule_bug.cold+0x4b/0x5c [ 14.856915] __schedule+0xe81/0x13d0 [ 14.857199] ? idr_find+0x13/0x20 [ 14.857456] ? get_work_pool+0x2d/0x50 [ 14.857756] ? __flush_work+0x233/0x280 [ 14.858068] ? __schedule+0xa95/0x13d0 [ 14.858307] ? idr_find+0x13/0x20 [ 14.858519] ? get_work_pool+0x2d/0x50 [ 14.858798] schedule+0x6c/0x100 [ 14.859009] schedule_hrtimeout_range_clock+0xff/0x110 [ 14.859335] ? tty_write_room+0x1f/0x30 [ 14.859598] ? n_tty_poll+0x1ec/0x220 [ 14.859830] ? tty_ldisc_deref+0x1a/0x20 [ 14.860090] schedule_hrtimeout_range+0x17/0x20 [ 14.860373] do_select+0x596/0x840 [ 14.860627] ? __kernel_text_address+0x16/0x50 [ 14.860954] ? poll_freewait+0xb0/0xb0 [ 14.861235] ? poll_freewait+0xb0/0xb0 [ 14.861517] ? rpm_resume+0x49d/0x780 [ 14.861798] ? common_interrupt+0x59/0xa0 [ 14.862127] ? asm_common_interrupt+0x2b/0x40 [ 14.862511] ? __uart_start.isra.0+0x61/0x70 [ 14.862902] ? __check_object_size+0x61/0x280 [ 14.863255] core_sys_select+0x1c6/0x400 [ 14.863575] ? vfs_write+0x1c9/0x3d0 [ 14.863853] ? vfs_write+0x1c9/0x3d0 [ 14.864121] ? _copy_from_user+0x45/0x70 [ 14.864526] do_pselect.constprop.0+0xb3/0xf0 [ 14.864893] ? do_syscall_64+0x6d/0x90 [ 14.865228] ? do_syscall_64+0x6d/0x90 [ 14.865556] __x64_sys_pselect6+0x76/0xa0 [ 14.865906] do_syscall_64+0x60/0x90 [ 14.866214] ? syscall_exit_to_user_mode+0x2a/0x50 [ 14.866640] ? do_syscall_64+0x6d/0x90 [ 14.866972] ? do_syscall_64+0x6d/0x90 [ 14.867286] ? do_syscall_64+0x6d/0x90 [ 14.867626] entry_SYSCALL_64_after_hwframe+0x63/0xcd [...] stripped [ 14.872959] ('myfpga' is a simple 'uio_dmem_genirq' driver I wrote to test this) The implementation of "uio_dmem_genirq" was based on "uio_pdrv_genirq" and it is used in a similar manner to the "uio_pdrv_genirq" driver with respect to interrupt configuration and handling. At the time "uio_dmem_genirq" was introduced, both had the same implementation of the 'uio_info' handlers irqcontrol() and handler(). Then commit 34cb27528398 ("UIO: Fix concurrency issue"), which was only applied to "uio_pdrv_genirq", ended up making them a little different. That commit, among other things, changed disable_irq() to disable_irq_nosync() in the implementation of irqcontrol(). The motivation there was to avoid a deadlock between irqcontrol() and handler(), since it added a spinlock in the irq handler, and disable_irq() waits for the completion of the irq handler. By changing disable_irq() to disable_irq_nosync() in irqcontrol(), we also avoid the sleeping-while-atomic bug that commit b74351287d4b ("uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol()") was trying to fix. Thus, this fixes the missing unlock in irqcontrol() by importing the implementation of irqcontrol() handler from the "uio_pdrv_genirq" driver. In the end, it reverts commit b74351287d4b ("uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol()") and change disable_irq() to disable_irq_nosync(). It is worth noting that this still does not address the concurrency issue fixed by commit 34cb27528398 ("UIO: Fix concurrency issue"). It will be addressed separately in the next commits. Split out from commit 34cb27528398 ("UIO: Fix concurrency issue"). Fixes: b74351287d4b ("uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol()") Signed-off-by: Rafael Mendonca Link: https://lore.kernel.org/r/20220930224100.816175-2-rafaelmendsr@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/uio/uio_dmem_genirq.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f8dc9cd92fe218aa1d8720e1105c542dcd3e58f2 Author: Colin Ian King Date: Tue Nov 8 11:13:40 2022 +0000 ASoC: tegra: Fix spelling mistake "fliter" -> "filter" There is a spelling mistake in struct member fliter_structure. Fix it. Signed-off-by: Colin Ian King Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20221108111340.115387-1-colin.i.king@gmail.com Signed-off-by: Mark Brown sound/soc/tegra/tegra210_mbdrc.c | 4 ++-- sound/soc/tegra/tegra210_mbdrc.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 3e4f964ddd1a9ab962cb524cbea750030de6acd0 Author: Marek Vasut Date: Fri Nov 4 17:03:15 2022 +0100 ASoC: dt-bindings: fsl-sai: Sort main section properties Sort main section properties, no functional change. Signed-off-by: Marek Vasut Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221104160315.213836-3-marex@denx.de Signed-off-by: Mark Brown .../devicetree/bindings/sound/fsl,sai.yaml | 72 +++++++++++----------- 1 file changed, 36 insertions(+), 36 deletions(-) commit ef55595548e13a5d61695bdf92e03df88c45994f Author: Marek Vasut Date: Fri Nov 4 17:03:14 2022 +0100 ASoC: dt-bindings: fsl-sai: Use minItems 5 for i.MX8MN clock and similar The i.MX8MN currently uses "bus", "mclk0", "mclk1", "mclk2", "mclk3" clock, which adds up to 5 clock total. Use minItems 5 for this setup. Signed-off-by: Marek Vasut Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221104160315.213836-2-marex@denx.de Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/fsl,sai.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81b6c043e7ba41e5a585f0d33213a32308d484ca Author: Marek Vasut Date: Fri Nov 4 17:03:13 2022 +0100 ASoC: dt-bindings: fsl-sai: Fix mx6ul and mx7d compatible strings Describe existing used combinations of compatible strings on MX6UL and MX7D, which are backward compatible with MX6SX. Add the missing imx7d-sai compatible string which is used on i.MX7 . Signed-off-by: Marek Vasut Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221104160315.213836-1-marex@denx.de Signed-off-by: Mark Brown .../devicetree/bindings/sound/fsl,sai.yaml | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 19d54020883c210a0cc78e5c735900ee9e9f64b3 Author: Jack Rosenthal Date: Fri Nov 4 10:15:28 2022 -0600 firmware: google: Implement cbmem in sysfs driver The CBMEM area is a downward-growing memory region used by coreboot to dynamically allocate tagged data structures ("CBMEM entries") that remain resident during boot. This implements a driver which exports access to the CBMEM entries via sysfs under /sys/bus/coreboot/devices/cbmem-. This implementation is quite versatile. Examples of how it could be used are given below: * Tools like util/cbmem from the coreboot tree could use this driver instead of finding CBMEM in /dev/mem directly. Alternatively, firmware developers debugging an issue may find the sysfs interface more ergonomic than the cbmem tool and choose to use it directly. * The crossystem tool, which exposes verified boot variables, can use this driver to read the vboot work buffer. * Tools which read the BIOS SPI flash (e.g., flashrom) can find the flash layout in CBMEM directly, which is significantly faster than searching the flash directly. Write access is provided to all CBMEM regions via /sys/bus/coreboot/devices/cbmem-/mem, as the existing cbmem tooling updates this memory region, and envisioned use cases with crossystem can benefit from updating memory regions. Link: https://issuetracker.google.com/239604743 Cc: Stephen Boyd Cc: Tzung-Bi Shih Reviewed-by: Guenter Roeck Reviewed-by: Julius Werner Tested-by: Jack Rosenthal Signed-off-by: Jack Rosenthal Link: https://lore.kernel.org/r/20221104161528.531248-1-jrosenth@chromium.org Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-coreboot | 45 ++++++++++ drivers/firmware/google/Kconfig | 15 ++++ drivers/firmware/google/Makefile | 3 + drivers/firmware/google/cbmem.c | 129 +++++++++++++++++++++++++++ drivers/firmware/google/coreboot_table.c | 11 ++- drivers/firmware/google/coreboot_table.h | 18 ++++ 6 files changed, 220 insertions(+), 1 deletion(-) commit d88bd098f45e0dcf317f8924a38b48e8a14a3854 Author: Colin Ian King Date: Wed Sep 28 22:16:37 2022 +0100 test_firmware: Fix spelling mistake "EMTPY" -> "EMPTY" There are spelling mistakes in config show text. Fix these. Signed-off-by: Colin Ian King Reviewed-by: Russ Weight Link: https://lore.kernel.org/r/20220928211637.62529-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman lib/test_firmware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ec39862fdd8ed6fe539dd4825191725c6a3b8a72 Merge: 140ccd04c580 c05dff38d215 Author: Mark Brown Date: Thu Nov 10 17:50:21 2022 +0000 ASoC: codecs: da7219: Do not export da7219_aad_jack_det() Merge series from Cezary Rojewski : Goal of the series is to drop any usage of the internal function. First, update all users to utilize component->set_jack() and then remove the relevant EXPORT_SYMBOL_GPL. commit 140ccd04c580d8d305b01e1354b1035266e3c321 Merge: c2c60eafb2ec c84443db0fdd Author: Mark Brown Date: Thu Nov 10 17:50:14 2022 +0000 ASoC: SOF: ipc4-topology: Add widget queue support Merge series from Peter Ujfalusi : with SOF topology2 for IPC4, widgets might have mutliple queues they can be connected. The queues to use between components are descibed in the topology file. This series adds widget queue support (specify which pin to connect) for ipc4-topology with topology2. Note: currently queue 0 of a widget is used as hardwired default. commit c2c60eafb2ec48fffed13605a61e590c2ba057fe Merge: 8a7ae8c5aeea 8f5979833b45 Author: Mark Brown Date: Thu Nov 10 17:50:07 2022 +0000 ASoC: simpe-card/audio-graph fixups Merge series from Kuninori Morimoto : These are simpe-card/audio-graph fixup patches. commit 8a7ae8c5aeea79202966b3f2cb2dc370c8f89720 Merge: 6426f56b7a6e 318ff0693095 Author: Mark Brown Date: Thu Nov 10 17:50:00 2022 +0000 Adjust usage of rt5682(s) power supply properties Merge series from Nícolas F. R. A. Prado : This series sets straight the usage of power supply properties for the rt5682 and rt5682s audio codecs. These properties were already being used by sc7180-trogdor.dtsi (and derived DTs like sc7180-trogdor-kingoftown.dtsi). We start by documenting the power supplies that are already in use and then add few others that were missing to the bindings. Then we update the drivers to also support the new supplies. Finally we update the trogdor DTs so they have the newly added but required supplies and remove a superfluous one that was causing warnings. commit 6426f56b7a6e6dd3e0b54a77bfd654177538ff16 Merge: e3c591c07353 a2ba1f70b301 Author: Mark Brown Date: Thu Nov 10 17:49:54 2022 +0000 ASoC: SOF: get pipeline instance id from pipe_widget->instance_id Merge series from Bard Liao : Currently we set pipeline instance id = swidget->pipeline_id, but pipeline_id is from topology and can be any number. In fact, the number of pipelines is limited. This patch use ida to allocate pipeline instance id and will be used for pipeline instance id in the IPC message. commit e3c591c0735383f044798ee4a47d1a9194f09344 Merge: 43b429f0e226 57f934924109 Author: Mark Brown Date: Thu Nov 10 17:49:48 2022 +0000 ASoC: SOF: Intel: update D0i3 registers for MTL Merge series from Pierre-Louis Bossart : MeteorLake relies on a different register for D0i3 configuration, add a platform-specific callback to abstract the differences. commit 43b429f0e226afb9f59c0b79bcdbf404a2ab172e Merge: 36c6cdc07b51 6bd8ddf05e9a Author: Mark Brown Date: Thu Nov 10 17:49:41 2022 +0000 ASoC: mediatek: Register machine drivers to module device table Merge series from Nícolas F. R. A. Prado : Some ASoC machine drivers for MediaTek platforms were not being registered to the module device table, preventing them to be automatically loaded when built as modules. This series adds the missing registration to the drivers. commit e48031603ae644054a9251c6fc7f0e0fd4e2683a Author: Christophe Leroy Date: Thu Oct 6 07:36:50 2022 +0200 uio: uio_fsl_elbc_gpcm: Replace NO_IRQ by 0 NO_IRQ is used to check the return of irq_of_parse_and_map(). On some architecture NO_IRQ is 0, on other architectures it is -1. irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ. So use 0 instead of using NO_IRQ. Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/68ccdf51811ab26bdb452babf17ae860fa4900c2.1665034535.git.christophe.leroy@csgroup.eu Signed-off-by: Greg Kroah-Hartman drivers/uio/uio_fsl_elbc_gpcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 982a84455e94bf195f2c35f221a6b4fe239d74d2 Author: Bo Liu Date: Mon Oct 31 02:35:57 2022 -0400 misc: genwqe: card_base: Fix some kernel-doc warnings Fixes the following W=1 kernel build warning(s): drivers/misc/genwqe/card_base.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Bo Liu Link: https://lore.kernel.org/r/20221031063557.2710-1-liubo03@inspur.com Signed-off-by: Greg Kroah-Hartman drivers/misc/genwqe/card_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4634c973096a64662a24d9914c47cebc2a8b72f4 Author: Shang XiaoJing Date: Wed Nov 2 15:26:59 2022 +0800 chardev: Fix potential memory leak when cdev_add() failed Some init function of cdev(like comedi) will call kobject_set_name() before cdev_add(), but won't free the cdev.kobj.name or put the ref cnt of cdev.kobj when cdev_add() failed. As the result, cdev.kobj.name will be leaked. Free the name of kobject in cdev_add() fail path to prevent memleak. With this fix, the callers don't need to care about freeing the name of kobject if cdev_add() fails. unreferenced object 0xffff8881000fa8c0 (size 8): comm "modprobe", pid 239, jiffies 4294905173 (age 51.308s) hex dump (first 8 bytes): 63 6f 6d 65 64 69 00 ff comedi.. backtrace: [<000000005f9878f7>] __kmalloc_node_track_caller+0x4c/0x1c0 [<000000000fd70302>] kstrdup+0x3f/0x70 [<000000009428bc33>] kstrdup_const+0x46/0x60 [<00000000ed50d9de>] kvasprintf_const+0xdb/0xf0 [<00000000b2766964>] kobject_set_name_vargs+0x3c/0xe0 [<00000000f2424ef7>] kobject_set_name+0x62/0x90 [<000000005d5a125b>] 0xffffffffa0013098 [<00000000f331e663>] do_one_initcall+0x7a/0x380 [<00000000aa7bac96>] do_init_module+0x5c/0x230 [<000000005fd72335>] load_module+0x227d/0x2420 [<00000000ad550cf1>] __do_sys_finit_module+0xd5/0x140 [<00000000069a60c5>] do_syscall_64+0x3f/0x90 [<00000000c5e0d521>] entry_SYSCALL_64_after_hwframe+0x63/0xcd Suggested-by: Greg KH Signed-off-by: Shang XiaoJing Link: https://lore.kernel.org/r/20221102072659.23671-1-shangxiaojing@huawei.com Signed-off-by: Greg Kroah-Hartman fs/char_dev.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 231601cd22bd60e332dfa9ead22f871e93ad9821 Author: David Collins Date: Thu Nov 10 15:37:55 2022 +0530 spmi: pmic-arb: Add support for PMIC v7 PMIC v7 has different offset values and seqeunces, so add support for this new version of PMIC Signed-off-by: David Collins Signed-off-by: Vinod Koul Tested-by: Dmitry Baryshkov # SM8450 HDK Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110100755.4032505-3-vkoul@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi-pmic-arb.c | 242 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 221 insertions(+), 21 deletions(-) commit 2d2879e1834d02852347d9dc910fffd5d22ac337 Author: Vinod Koul Date: Thu Nov 10 15:37:54 2022 +0530 dt-bindings: spmi: Add qcom,bus-id For PMIC arbiter version 7 and beyond we need to define if we are using primary or secondary bus, so add a new property of qcom,bus-id Signed-off-by: Vinod Koul Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221110100755.4032505-2-vkoul@kernel.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 02c39bbb36bab698b29f066a28c3e342d1136e53 Author: Christophe Leroy Date: Thu Oct 6 07:27:17 2022 +0200 virt: fsl_hypervisor: Replace NO_IRQ by 0 NO_IRQ is used to check the return of irq_of_parse_and_map(). On some architecture NO_IRQ is 0, on other architectures it is -1. irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ. So use 0 instead of using NO_IRQ. Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/20dd37b96bac0a72caef28e7462b32c93487a516.1665033909.git.christophe.leroy@csgroup.eu Signed-off-by: Greg Kroah-Hartman drivers/virt/fsl_hypervisor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27c0d217340e47ec995557f61423ef415afba987 Author: Isaac J. Manjarres Date: Tue Sep 20 17:14:13 2022 -0700 driver core: Fix bus_type.match() error handling in __driver_attach() When a driver registers with a bus, it will attempt to match with every device on the bus through the __driver_attach() function. Currently, if the bus_type.match() function encounters an error that is not -EPROBE_DEFER, __driver_attach() will return a negative error code, which causes the driver registration logic to stop trying to match with the remaining devices on the bus. This behavior is not correct; a failure while matching a driver to a device does not mean that the driver won't be able to match and bind with other devices on the bus. Update the logic in __driver_attach() to reflect this. Fixes: 656b8035b0ee ("ARM: 8524/1: driver cohandle -EPROBE_DEFER from bus_type.match()") Cc: stable@vger.kernel.org Cc: Saravana Kannan Signed-off-by: Isaac J. Manjarres Link: https://lore.kernel.org/r/20220921001414.4046492-1-isaacmanjarres@google.com Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 730600223b64918324ab322ab174361bd41073c0 Author: Christophe JAILLET Date: Tue Nov 1 22:14:17 2022 +0100 driver core: 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/02ba683a5c0716638ad8ca11e8b0fdca97c4f294.1667336095.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3da72e18371c41a6f6f96b594854b178168c7757 Author: Pierre Gondois Date: Wed Oct 26 20:59:54 2022 +0200 cacheinfo: Decrement refcount in cache_setup_of_node() Refcounts to DT nodes are only incremented in the function and never decremented. Decrease the refcounts when necessary. Signed-off-by: Pierre Gondois Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20221026185954.991547-1-pierre.gondois@arm.com Signed-off-by: Greg Kroah-Hartman drivers/base/cacheinfo.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 189a87f8ef8ceed16b2a230dc0ce65117068ac30 Author: Christoph Hellwig Date: Sun Oct 30 10:22:55 2022 +0100 driver core: mark driver_allows_async_probing static driver_allows_async_probing is only used in drivers/base/dd.c, so mark it static and remove the declaration in drivers/base/base.h. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221030092255.872280-1-hch@lst.de Signed-off-by: Greg Kroah-Hartman drivers/base/base.h | 1 - drivers/base/dd.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 0f0605d550ed986279030d452c7ed10df34da449 Author: Greg Kroah-Hartman Date: Wed Nov 9 15:07:11 2022 +0100 driver core: remove devm_device_remove_group() There is no in-kernel user of this function, so it is not needed anymore and can be removed. Cc: Dmitry Torokhov Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221109140711.105222-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 22 ---------------------- include/linux/device.h | 2 -- 2 files changed, 24 deletions(-) commit 927bdd1e65bd14ae035d9c625df2f4ccd51e8a83 Author: Greg Kroah-Hartman Date: Wed Nov 9 15:07:10 2022 +0100 driver core: remove devm_device_remove_groups() There is no in-kernel user of this function, so it is not needed anymore and can be removed. Cc: Dmitry Torokhov Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221109140711.105222-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 17 ----------------- include/linux/device.h | 2 -- 2 files changed, 19 deletions(-) commit be7e8b917ead54754cc14b6c03769c8738a3f3f3 Author: Greg Kroah-Hartman Date: Wed Nov 9 15:48:43 2022 +0100 blkdev: make struct block_device_operations.devnode() take a const * The devnode() callback in struct block_device_operations 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 the one subsystem that actually uses this callback. Acked-by: Jens Axboe Link: https://lore.kernel.org/r/20221109144843.679668-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/block/pktcdvd.c | 2 +- include/linux/blkdev.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit edaf5df22cb8e7e849773ce69fcc9bc20ca92160 Author: Vincent Mailhol Date: Tue Nov 8 12:57:54 2022 +0900 ethtool: ethtool_get_drvinfo: populate drvinfo fields even if callback exits If ethtool_ops::get_drvinfo() callback isn't set, ethtool_get_drvinfo() will fill the ethtool_drvinfo::name and ethtool_drvinfo::bus_info fields. However, if the driver provides the callback function, those two fields are not touched. This means that the driver has to fill these itself. Allow the driver to leave those two fields empty and populate them in such case. This way, the driver can rely on the default values for the name and the bus_info. If the driver provides values, do nothing. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/r/20221108035754.2143-1-mailhol.vincent@wanadoo.fr Signed-off-by: Jakub Kicinski net/ethtool/ioctl.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 72f542ac4f39fb42b8a6380ac8d9b3c39019d2d6 Author: Matt Ranostay Date: Fri Oct 28 02:17:16 2022 -0700 dt-bindings: PCI: Add host mode device-id for j721s2 platform Add unique device-id of 0xb013 for j721s2 platform to oneOf field. Link: https://lore.kernel.org/r/20221028091716.21414-1-mranostay@ti.com Signed-off-by: Matt Ranostay Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 872f918469a572585003128509a842f39559aef6 Author: Wolfram Sang Date: Mon Jun 13 15:10:32 2022 +0200 arm64: dts: renesas: spider-cpu: Switch from SCIF3 to HSCIF0 Every loader before Linux utilizes HSCIF0 with a speed of 1843200 bps. Make Linux behave the same. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20220613131033.10053-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven .../boot/dts/renesas/r8a779f0-spider-cpu.dtsi | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 1776fca7fadbac2260a22e2ecb708e8a1ba9310d Author: Lad Prabhakar Date: Fri Oct 28 17:59:21 2022 +0100 riscv: configs: defconfig: Enable Renesas RZ/Five SoC Enable Renesas RZ/Five SoC config in defconfig. It allows the default upstream kernel to boot on RZ/Five SMARC EVK board. Alongside enable SERIAL_SH_SCI config so that the serial driver used by RZ/Five SoC is built-in. Signed-off-by: Lad Prabhakar Reviewed-by: Conor Dooley Reviewed-by: Guo Ren Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221028165921.94487-8-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/riscv/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 461e1857d6bf15cf5df103383e255f3425ac0038 Author: Lad Prabhakar Date: Fri Oct 28 17:59:20 2022 +0100 MAINTAINERS: Add entry for Renesas RISC-V Add RISC-V architecture as part of ARM/Renesas architecture, as they have the same maintainers, use the same development collaboration infrastructure, and share many files. Signed-off-by: Lad Prabhakar Reviewed-by: Conor Dooley Reviewed-by: Guo Ren Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221028165921.94487-7-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8405d8f0956d227c3355d9bdbabc23f79f721ce4 Author: Vidya Sagar Date: Tue Sep 13 15:42:37 2022 +0530 PCI: dwc: Use dev_info for PCIe link down event logging Some of the platforms (like Tegra194 and Tegra234) have open slots and not having an endpoint connected to the slot is not an error. So, changing the macro from dev_err to dev_info to log the event. Link: https://lore.kernel.org/r/20220913101237.4337-1-vidyas@nvidia.com Tested-by: Jon Hunter Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Jon Hunter Acked-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4adb690aa1b41c1e52af579574d1d6aa58da1187 Author: Lad Prabhakar Date: Fri Oct 28 17:59:19 2022 +0100 riscv: dts: renesas: Add minimal DTS for Renesas RZ/Five SMARC EVK Enable the minimal blocks required for booting the Renesas RZ/Five SMARC EVK with initramfs. Below are the blocks which are enabled: - CPG - CPU0 - DDR (memory regions) - PINCTRL - PLIC - SCIF0 As we are reusing the RZ/G2UL SoC base DTSI [0], RZ/G2UL SMARC SoM [1] and carrier [2] board DTSIs which enables almost all the blocks supported by the RZ/G2UL SMARC EVK and whereas on RZ/Five SoC we will be gradually enabling the blocks hence the aliases for ETH/I2C are deleted and rest of the IP blocks are marked as disabled/deleted. [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi [1] arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi [2] arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi Signed-off-by: Lad Prabhakar Reviewed-by: Conor Dooley Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221028165921.94487-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/riscv/boot/dts/Makefile | 1 + arch/riscv/boot/dts/renesas/Makefile | 2 + arch/riscv/boot/dts/renesas/r9a07g043f01-smarc.dts | 27 +++++++ arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi | 58 ++++++++++++++ arch/riscv/boot/dts/renesas/rzfive-smarc.dtsi | 91 ++++++++++++++++++++++ 5 files changed, 179 insertions(+) commit b3e77da00f1b7b670983c69d0295f4ce132bf87c Author: Lad Prabhakar Date: Fri Oct 28 17:59:18 2022 +0100 riscv: dts: renesas: Add initial devicetree for Renesas RZ/Five SoC Add initial device tree for Renesas RZ/Five RISC-V CPU Core (AX45MP Single). RZ/Five SoC is almost identical to RZ/G2UL Type-1 SoC (ARM64) hence we will be reusing r9a07g043.dtsi [0] as a base DTSI for both the SoC's. r9a07g043f.dtsi includes RZ/Five SoC specific blocks. Below are the RZ/Five SoC specific blocks added in the initial DTSI which can be used to boot via initramfs on RZ/Five SMARC EVK: - AX45MP CPU - PLIC [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi Signed-off-by: Lad Prabhakar Reviewed-by: Conor Dooley Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221028165921.94487-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 57 +++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 8292493c22c8e28b6e67a01e0f5c6db1cf231eb1 Author: Lad Prabhakar Date: Fri Oct 28 17:59:17 2022 +0100 riscv: Kconfig.socs: Add ARCH_RENESAS kconfig option Add ARCH_RENESAS config option to allow selecting the Renesas RISC-V SoCs. We currently have the newly added RZ/Five (R9A07G043) RISC-V based SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Conor Dooley Reviewed-by: Guo Ren Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221028165921.94487-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/riscv/Kconfig.socs | 5 +++++ 1 file changed, 5 insertions(+) commit 5d1ba31087627423dfb2bd87badd62361701997b Author: Feng Tang Date: Fri Oct 21 11:24:04 2022 +0800 mm: kasan: Extend kasan_metadata_size() to also cover in-object size When kasan is enabled for slab/slub, it may save kasan' free_meta data in the former part of slab object data area in slab object's free path, which works fine. There is ongoing effort to extend slub's debug function which will redzone the latter part of kmalloc object area, and when both of the debug are enabled, there is possible conflict, especially when the kmalloc object has small size, as caught by 0Day bot [1]. To solve it, slub code needs to know the in-object kasan's meta data size. Currently, there is existing kasan_metadata_size() which returns the kasan's metadata size inside slub's metadata area, so extend it to also cover the in-object meta size by adding a boolean flag 'in_object'. There is no functional change to existing code logic. [1]. https://lore.kernel.org/lkml/YuYm3dWwpZwH58Hu@xsang-OptiPlex-9020/ Reported-by: kernel test robot Suggested-by: Andrey Konovalov Signed-off-by: Feng Tang Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Vlastimil Babka include/linux/kasan.h | 5 +++-- mm/kasan/generic.c | 19 +++++++++++++------ mm/slub.c | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) commit 9ce67395f5a0cdec6ce152d26bfda13b98b25c01 Author: Feng Tang Date: Fri Oct 21 11:24:03 2022 +0800 mm/slub: only zero requested size of buffer for kzalloc when debug enabled kzalloc/kmalloc will round up the request size to a fixed size (mostly power of 2), so the allocated memory could be more than requested. Currently kzalloc family APIs will zero all the allocated memory. To detect out-of-bound usage of the extra allocated memory, only zero the requested part, so that redzone sanity check could be added to the extra space later. For kzalloc users who will call ksize() later and utilize this extra space, please be aware that the space is not zeroed any more when debug is enabled. (Thanks to Kees Cook's effort to sanitize all ksize() user cases [1], this won't be a big issue). [1]. https://lore.kernel.org/all/20220922031013.2150682-1-keescook@chromium.org/#r Signed-off-by: Feng Tang Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Andrey Konovalov Signed-off-by: Vlastimil Babka mm/slab.c | 7 ++++--- mm/slab.h | 18 ++++++++++++++++-- mm/slub.c | 10 +++++++--- 3 files changed, 27 insertions(+), 8 deletions(-) commit c9bfd858402c86b6559aa05227eb5dbae3ce862e Author: Jianjun Wang Date: Thu Nov 3 10:56:54 2022 +0800 dt-bindings: PCI: mediatek-gen3: Support mt8195 In order to support mt8195 pcie node, update the yaml to support new properties of iommu and power-domain, and update the reset-names property to allow only one 'mac' name. Link: https://lore.kernel.org/r/20221103025656.8714-2-tinghan.shen@mediatek.com Signed-off-by: Jianjun Wang Signed-off-by: TingHan Shen Signed-off-by: Lorenzo Pieralisi Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring .../devicetree/bindings/pci/mediatek-pcie-gen3.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit fba31beab3578b793060f549188fe682df7d3ed9 Author: Manivannan Sadhasivam Date: Wed Nov 9 15:10:39 2022 +0530 PCI: qcom: Fix error message for reset_control_assert() Fix the error message to mention "assert" instead of "deassert". Link: https://lore.kernel.org/r/20221109094039.25753-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Reviewed-by: Vinod Koul drivers/pci/controller/dwc/pcie-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f643dc28e2c072d7d323898530ee37433e74595 Author: Lad Prabhakar Date: Fri Oct 28 17:59:16 2022 +0100 dt-bindings: riscv: Add Andes AX45MP core to the list The Renesas RZ/Five microprocessor includes a RISC-V CPU Core (AX45MP Single) from Andes. In preparation to add support for RZ/Five SoC add the Andes AX45MP core to the list. More details about Andes AX45MP core can be found here: [0] http://www.andestech.com/en/products-solutions/andescore-processors/riscv-ax45mp/ Signed-off-by: Lad Prabhakar Acked-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Reviewed-by: Guo Ren Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221028165921.94487-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Documentation/devicetree/bindings/riscv/cpus.yaml | 1 + 1 file changed, 1 insertion(+) commit 57e1b873c2f54253f4c81bddb782e183ee6544ae Author: Lad Prabhakar Date: Fri Oct 28 17:59:15 2022 +0100 dt-bindings: riscv: Sort the CPU core list alphabetically Sort the CPU cores list alphabetically for maintenance. Signed-off-by: Lad Prabhakar Reviewed-by: Krzysztof Kozlowski Reviewed-by: Heiko Stuebner Reviewed-by: Conor Dooley Reviewed-by: Guo Ren Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221028165921.94487-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Documentation/devicetree/bindings/riscv/cpus.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1577cb5823cefdff4416f272a88143ee933d97f5 Author: Oliver Upton Date: Mon Nov 7 22:00:33 2022 +0000 KVM: arm64: Handle stage-2 faults in parallel The stage-2 map walker has been made parallel-aware, and as such can be called while only holding the read side of the MMU lock. Rip out the conditional locking in user_mem_abort() and instead grab the read lock. Continue to take the write lock from other callsites to kvm_pgtable_stage2_map(). Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107220033.1895655-1-oliver.upton@linux.dev arch/arm64/include/asm/kvm_pgtable.h | 3 ++- arch/arm64/kvm/hyp/nvhe/mem_protect.c | 2 +- arch/arm64/kvm/hyp/pgtable.c | 5 +++-- arch/arm64/kvm/mmu.c | 31 +++++++------------------------ 4 files changed, 13 insertions(+), 28 deletions(-) commit af87fc03cfdf6893011df419588d27acdfb9c197 Author: Oliver Upton Date: Mon Nov 7 22:00:06 2022 +0000 KVM: arm64: Make table->block changes parallel-aware stage2_map_walker_try_leaf() and friends now handle stage-2 PTEs generically, and perform the correct flush when a table PTE is removed. Additionally, they've been made parallel-aware, using an atomic break to take ownership of the PTE. Stop clearing the PTE in the pre-order callback and instead let stage2_map_walker_try_leaf() deal with it. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107220006.1895572-1-oliver.upton@linux.dev arch/arm64/kvm/hyp/pgtable.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 946fbfdf336b811479e024136c7cabc00157b6b9 Author: Oliver Upton Date: Mon Nov 7 21:59:34 2022 +0000 KVM: arm64: Make leaf->leaf PTE changes parallel-aware Convert stage2_map_walker_try_leaf() to use the new break-before-make helpers, thereby making the handler parallel-aware. As before, avoid the break-before-make if recreating the existing mapping. Additionally, retry execution if another vCPU thread is modifying the same PTE. Signed-off-by: Oliver Upton Reviewed-by: Ben Gardon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215934.1895478-1-oliver.upton@linux.dev arch/arm64/kvm/hyp/pgtable.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 0ab12f3574db6cb432917a667f9392a88e8f0dfc Author: Oliver Upton Date: Mon Nov 7 21:58:55 2022 +0000 KVM: arm64: Make block->table PTE changes parallel-aware In order to service stage-2 faults in parallel, stage-2 table walkers must take exclusive ownership of the PTE being worked on. An additional requirement of the architecture is that software must perform a 'break-before-make' operation when changing the block size used for mapping memory. Roll these two concepts together into helpers for performing a 'break-before-make' sequence. Use a special PTE value to indicate a PTE has been locked by a software walker. Additionally, use an atomic compare-exchange to 'break' the PTE when the stage-2 page tables are possibly shared with another software walker. Elide the DSB + TLBI if the evicted PTE was invalid (and thus not subject to break-before-make). All of the atomics do nothing for now, as the stage-2 walker isn't fully ready to perform parallel walks. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215855.1895367-1-oliver.upton@linux.dev arch/arm64/kvm/hyp/pgtable.c | 80 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 5 deletions(-) commit 331aa3a0547d1c794587e0df374d13b16645e832 Author: Oliver Upton Date: Mon Nov 7 21:56:40 2022 +0000 KVM: arm64: Split init and set for table PTE Create a helper to initialize a table and directly call smp_store_release() to install it (for now). Prepare for a subsequent change that generalizes PTE writes with a helper. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215644.1895162-11-oliver.upton@linux.dev arch/arm64/kvm/hyp/pgtable.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit ca5de2448c3b4c018fe3d6223df8b59068be1cd7 Author: Oliver Upton Date: Mon Nov 7 21:56:39 2022 +0000 KVM: arm64: Atomically update stage 2 leaf attributes in parallel walks The stage2 attr walker is already used for parallel walks. Since commit f783ef1c0e82 ("KVM: arm64: Add fast path to handle permission relaxation during dirty logging"), KVM acquires the read lock when write-unprotecting a PTE. However, the walker only uses a simple store to update the PTE. This is safe as the only possible race is with hardware updates to the access flag, which is benign. However, a subsequent change to KVM will allow more changes to the stage 2 page tables to be done in parallel. Prepare the stage 2 attribute walker by performing atomic updates to the PTE when walking in parallel. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215644.1895162-10-oliver.upton@linux.dev arch/arm64/kvm/hyp/pgtable.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit c3119ae45dfb6038ca458ab5ba7a9fba2810845b Author: Oliver Upton Date: Mon Nov 7 21:56:38 2022 +0000 KVM: arm64: Protect stage-2 traversal with RCU Use RCU to safely walk the stage-2 page tables in parallel. Acquire and release the RCU read lock when traversing the page tables. Defer the freeing of table memory to an RCU callback. Indirect the calls into RCU and provide stubs for hypervisor code, as RCU is not available in such a context. The RCU protection doesn't amount to much at the moment, as readers are already protected by the read-write lock (all walkers that free table memory take the write lock). Nonetheless, a subsequent change will futher relax the locking requirements around the stage-2 MMU, thereby depending on RCU. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215644.1895162-9-oliver.upton@linux.dev arch/arm64/include/asm/kvm_pgtable.h | 49 ++++++++++++++++++++++++++++++++++++ arch/arm64/kvm/hyp/pgtable.c | 10 +++++++- arch/arm64/kvm/mmu.c | 14 ++++++++++- 3 files changed, 71 insertions(+), 2 deletions(-) commit 5c359cca1faf6d7671537fe1c240e8668467864d Author: Oliver Upton Date: Mon Nov 7 21:56:37 2022 +0000 KVM: arm64: Tear down unlinked stage-2 subtree after break-before-make The break-before-make sequence is a bit annoying as it opens a window wherein memory is unmapped from the guest. KVM should replace the PTE as quickly as possible and avoid unnecessary work in between. Presently, the stage-2 map walker tears down a removed table before installing a block mapping when coalescing a table into a block. As the removed table is no longer visible to hardware walkers after the DSB+TLBI, it is possible to move the remaining cleanup to happen after installing the new PTE. Reshuffle the stage-2 map walker to install the new block entry in the pre-order callback. Unwire all of the teardown logic and replace it with a call to kvm_pgtable_stage2_free_removed() after fixing the PTE. The post-order visitor is now completely unnecessary, so drop it. Finally, touch up the comments to better represent the now simplified map walker. Note that the call to tear down the unlinked stage-2 is indirected as a subsequent change will use an RCU callback to trigger tear down. RCU is not available to pKVM, so there is a need to use different implementations on pKVM and non-pKVM VMs. Signed-off-by: Oliver Upton Reviewed-by: Ben Gardon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215644.1895162-8-oliver.upton@linux.dev arch/arm64/include/asm/kvm_pgtable.h | 3 ++ arch/arm64/kvm/hyp/nvhe/mem_protect.c | 6 +++ arch/arm64/kvm/hyp/pgtable.c | 85 +++++++++-------------------------- arch/arm64/kvm/mmu.c | 8 ++++ 4 files changed, 39 insertions(+), 63 deletions(-) commit 6b91b8f95cadd3441c056182daf9024475ac4a91 Author: Oliver Upton Date: Mon Nov 7 21:56:36 2022 +0000 KVM: arm64: Use an opaque type for pteps Use an opaque type for pteps and require visitors explicitly dereference the pointer before using. Protecting page table memory with RCU requires that KVM dereferences RCU-annotated pointers before using. However, RCU is not available for use in the nVHE hypervisor and the opaque type can be conditionally annotated with RCU for the stage-2 MMU. Call the type a 'pteref' to avoid a naming collision with raw pteps. No functional change intended. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215644.1895162-7-oliver.upton@linux.dev arch/arm64/include/asm/kvm_pgtable.h | 9 ++++++++- arch/arm64/kvm/hyp/pgtable.c | 27 ++++++++++++++------------- arch/arm64/kvm/mmu.c | 2 +- 3 files changed, 23 insertions(+), 15 deletions(-) commit 8e94e1252cc054bb31fd3e9a15235cd831970ec1 Author: Oliver Upton Date: Mon Nov 7 21:56:35 2022 +0000 KVM: arm64: Add a helper to tear down unlinked stage-2 subtrees A subsequent change to KVM will move the tear down of an unlinked stage-2 subtree out of the critical path of the break-before-make sequence. Introduce a new helper for tearing down unlinked stage-2 subtrees. Leverage the existing stage-2 free walkers to do so, with a deep call into __kvm_pgtable_walk() as the subtree is no longer reachable from the root. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215644.1895162-6-oliver.upton@linux.dev arch/arm64/include/asm/kvm_pgtable.h | 11 +++++++++++ arch/arm64/kvm/hyp/pgtable.c | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit fa002e8e79b3f980455ba585c1f47b26680de5b9 Author: Oliver Upton Date: Mon Nov 7 21:56:34 2022 +0000 KVM: arm64: Don't pass kvm_pgtable through kvm_pgtable_walk_data In order to tear down page tables from outside the context of kvm_pgtable (such as an RCU callback), stop passing a pointer through kvm_pgtable_walk_data. No functional change intended. Signed-off-by: Oliver Upton Reviewed-by: Ben Gardon Reviewed-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215644.1895162-5-oliver.upton@linux.dev arch/arm64/kvm/hyp/pgtable.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 2a611c7f87f26cca405da63a57f06d0e4dc14240 Author: Oliver Upton Date: Mon Nov 7 21:56:33 2022 +0000 KVM: arm64: Pass mm_ops through the visitor context As a prerequisite for getting visitors off of struct kvm_pgtable, pass mm_ops through the visitor context. No functional change intended. Signed-off-by: Oliver Upton Reviewed-by: Ben Gardon Reviewed-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215644.1895162-4-oliver.upton@linux.dev arch/arm64/include/asm/kvm_pgtable.h | 1 + arch/arm64/kvm/hyp/nvhe/setup.c | 3 +- arch/arm64/kvm/hyp/pgtable.c | 63 ++++++++++++++---------------------- 3 files changed, 26 insertions(+), 41 deletions(-) commit 83844a2317ecad935f6735abd854e4bf3f757040 Author: Oliver Upton Date: Mon Nov 7 21:56:32 2022 +0000 KVM: arm64: Stash observed pte value in visitor context Rather than reading the ptep all over the shop, read the ptep once from __kvm_pgtable_visit() and stick it in the visitor context. Reread the ptep after visiting a leaf in case the callback installed a new table underneath. No functional change intended. Signed-off-by: Oliver Upton Reviewed-by: Ben Gardon Reviewed-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215644.1895162-3-oliver.upton@linux.dev arch/arm64/include/asm/kvm_pgtable.h | 1 + arch/arm64/kvm/hyp/nvhe/mem_protect.c | 5 +- arch/arm64/kvm/hyp/nvhe/setup.c | 7 ++- arch/arm64/kvm/hyp/pgtable.c | 86 +++++++++++++++++------------------ 4 files changed, 48 insertions(+), 51 deletions(-) commit dfc7a7769ab7f2a2f629c673717ef1fa7b63aa42 Author: Oliver Upton Date: Mon Nov 7 21:56:31 2022 +0000 KVM: arm64: Combine visitor arguments into a context structure Passing new arguments by value to the visitor callbacks is extremely inflexible for stuffing new parameters used by only some of the visitors. Use a context structure instead and pass the pointer through to the visitor callback. While at it, redefine the 'flags' parameter to the visitor to contain the bit indicating the phase of the walk. Pass the entire set of flags through the context structure such that the walker can communicate additional state to the visitor callback. No functional change intended. Signed-off-by: Oliver Upton Reviewed-by: Ben Gardon Reviewed-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221107215644.1895162-2-oliver.upton@linux.dev arch/arm64/include/asm/kvm_pgtable.h | 15 +- arch/arm64/kvm/hyp/nvhe/mem_protect.c | 10 +- arch/arm64/kvm/hyp/nvhe/setup.c | 16 +- arch/arm64/kvm/hyp/pgtable.c | 269 +++++++++++++++++----------------- 4 files changed, 154 insertions(+), 156 deletions(-) commit ea3723a541c198c84e81a0e975dba6c18764393e Author: Rob Herring Date: Tue Nov 1 12:54:44 2022 -0500 scripts/dtc: Update to upstream version v1.6.1-63-g55778a03df61 It's been a while since the last sync and Lee needs commit 73590342fc85 ("libfdt: prevent integer overflow in fdt_next_tag"). This adds the following commits from upstream: 55778a03df61 libfdt: tests: add get_next_tag_invalid_prop_len 73590342fc85 libfdt: prevent integer overflow in fdt_next_tag 035fb90d5375 libfdt: add fdt_get_property_by_offset_w helper 98a07006c48d Makefile: fix infinite recursion by dropping non-existent `%.output` a036cc7b0c10 Makefile: limit make re-execution to avoid infinite spin c6e92108bcd9 libdtc: remove duplicate judgments e37c25677dc9 Don't generate erroneous fixups from reference to path 50454658f2b5 libfdt: Don't mask fdt_get_name() returned error e64a204196c9 manual.txt: Follow README.md and remove Jon f508c83fe6f0 Update README in MANIFEST.in and setup.py to README.md c2ccf8a77dd2 Add description of Signed-off-by lines 90b9d9de42ca Split out information for contributors to CONTRIBUTING.md 0ee1d479b23a Remove Jon Loeliger from maintainers list b33a73c62c1c Convert README to README.md 7ad60734b1c1 Allow static building with meson fd9b8c96c780 Allow static building with make fda71da26e7f libfdt: Handle failed get_name() on BEGIN_NODE c7c7f17a83d5 Fix test script to run also on dash shell 01f23ffe1679 Add missing relref_merge test to meson test list ed310803ea89 pylibfdt: add FdtRo.get_path() c001fc01a43e pylibfdt: fix swig build in install 26c54f840d23 tests: add test cases for label-relative path references ec7986e682cf dtc: introduce label relative path references 651410e54cb9 util: introduce xstrndup helper 4048aed12b81 setup.py: fix out of tree build ff5afb96d0c0 Handle integer overflow in check_property_phandle_args() ca7294434309 README: Explain how to add a new API function c0c2e115f82e Fix a UB when fdt_get_string return null cd5f69cbc0d4 tests: setprop_inplace: use xstrdup instead of unchecked strdup a04f69025003 pylibfdt: add Property.as_*int*_array() 83102717d7c4 pylibfdt: add Property.as_stringlist() d152126bb029 Fix Python crash on getprop deallocation 17739b7ef510 Support 'r' format for printing raw bytes with fdtget 45f3d1a095dd libfdt: overlay: make overlay_get_target() public c19a4bafa514 libfdt: fix an incorrect integer promotion 1cc41b1c969f pylibfdt: Add packaging metadata db72398cd437 README: Update pylibfdt install instructions 383e148b70a4 pylibfdt: fix with Python 3.10 23b56cb7e189 pylibfdt: Move setup.py to the top level 69a760747d8d pylibfdt: Split setup.py author name and email 0b106a77dbdc pylibfdt: Use setuptools_scm for the version c691776ddb26 pylibfdt: Use setuptools instead of distutils 5216f3f1bbb7 libfdt: Add static lib to meson build 4eda2590f481 CI: Cirrus: bump used FreeBSD from 12.1 to 13.0 Link: https://lore.kernel.org/r/20221101181427.1808703-1-robh@kernel.org/ Signed-off-by: Rob Herring scripts/dtc/checks.c | 15 +++++++++------ scripts/dtc/dtc-lexer.l | 2 +- scripts/dtc/dtc-parser.y | 13 +++++++++++++ scripts/dtc/libfdt/fdt.c | 20 +++++++++++-------- scripts/dtc/libfdt/fdt.h | 4 ++-- scripts/dtc/libfdt/fdt_addresses.c | 2 +- scripts/dtc/libfdt/fdt_overlay.c | 29 +++++++--------------------- scripts/dtc/libfdt/fdt_ro.c | 2 +- scripts/dtc/libfdt/libfdt.h | 25 ++++++++++++++++++++++++ scripts/dtc/livetree.c | 39 +++++++++++++++++++++++++++++++++++--- scripts/dtc/util.c | 15 +++++++++++++-- scripts/dtc/util.h | 4 +++- scripts/dtc/version_gen.h | 2 +- 13 files changed, 124 insertions(+), 48 deletions(-) commit 8dab99c9eab3162bfb4326c35579a3388dbf68f2 Author: Guillaume La Roque Date: Mon Nov 7 18:29:21 2022 +0100 gpio: davinci: add support of module build Added module build support for the davinci gpio driver Signed-off-by: Guillaume La Roque Signed-off-by: Nicolas Frayer Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-davinci.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 07ce611c705217507c2a036bba8695cbd82c9e36 Author: Frank Wunderlich Date: Thu Oct 27 17:10:22 2022 +0200 arm64: dts: mt7986: fix trng node name Binding requires node name to be rng not trng: trng@1020f000: $nodename:0: 'trng@1020f000' does not match '^rng@[0-9a-f]+$' Fixes: 50137c150f5f ("arm64: dts: mediatek: add basic mt7986 support") Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221027151022.5541-1-linux@fw-web.de Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc6df7d4d0633e65850d5372ae9f1234bcc6e26e Author: Gavin Shan Date: Thu Nov 10 18:49:14 2022 +0800 KVM: selftests: Automate choosing dirty ring size in dirty_log_test In the dirty ring case, we rely on vcpu exit due to full dirty ring state. On ARM64 system, there are 4096 host pages when the host page size is 64KB. In this case, the vcpu never exits due to the full dirty ring state. The similar case is 4KB page size on host and 64KB page size on guest. The vcpu corrupts same set of host pages, but the dirty page information isn't collected in the main thread. This leads to infinite loop as the following log shows. # ./dirty_log_test -M dirty-ring -c 65536 -m 5 Setting log mode to: 'dirty-ring' Test iterations: 32, interval: 10 (ms) Testing guest mode: PA-bits:40, VA-bits:48, 4K pages guest physical test memory offset: 0xffbffe0000 vcpu stops because vcpu is kicked out... Notifying vcpu to continue vcpu continues now. Iteration 1 collected 576 pages Fix the issue by automatically choosing the best dirty ring size, to ensure vcpu exit due to full dirty ring state. The option '-c' becomes a hint to the dirty ring count, instead of the value of it. Signed-off-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110104914.31280-8-gshan@redhat.com tools/testing/selftests/kvm/dirty_log_test.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit 7167190ddb863bd061c0c6b61f4cec94184b40da Author: Gavin Shan Date: Thu Nov 10 18:49:13 2022 +0800 KVM: selftests: Clear dirty ring states between two modes in dirty_log_test There are two states, which need to be cleared before next mode is executed. Otherwise, we will hit failure as the following messages indicate. - The variable 'dirty_ring_vcpu_ring_full' shared by main and vcpu thread. It's indicating if the vcpu exit due to full ring buffer. The value can be carried from previous mode (VM_MODE_P40V48_4K) to current one (VM_MODE_P40V48_64K) when VM_MODE_P40V48_16K isn't supported. - The current ring buffer index needs to be reset before next mode (VM_MODE_P40V48_64K) is executed. Otherwise, the stale value is carried from previous mode (VM_MODE_P40V48_4K). # ./dirty_log_test -M dirty-ring Setting log mode to: 'dirty-ring' Test iterations: 32, interval: 10 (ms) Testing guest mode: PA-bits:40, VA-bits:48, 4K pages guest physical test memory offset: 0xffbfffc000 : Dirtied 995328 pages Total bits checked: dirty (1012434), clear (7114123), track_next (966700) Testing guest mode: PA-bits:40, VA-bits:48, 64K pages guest physical test memory offset: 0xffbffc0000 vcpu stops because vcpu is kicked out... vcpu continues now. Notifying vcpu to continue Iteration 1 collected 0 pages vcpu stops because dirty ring is full... vcpu continues now. vcpu stops because dirty ring is full... vcpu continues now. vcpu stops because dirty ring is full... ==== Test Assertion Failure ==== dirty_log_test.c:369: cleared == count pid=10541 tid=10541 errno=22 - Invalid argument 1 0x0000000000403087: dirty_ring_collect_dirty_pages at dirty_log_test.c:369 2 0x0000000000402a0b: log_mode_collect_dirty_pages at dirty_log_test.c:492 3 (inlined by) run_test at dirty_log_test.c:795 4 (inlined by) run_test at dirty_log_test.c:705 5 0x0000000000403a37: for_each_guest_mode at guest_modes.c:100 6 0x0000000000401ccf: main at dirty_log_test.c:938 7 0x0000ffff9ecd279b: ?? ??:0 8 0x0000ffff9ecd286b: ?? ??:0 9 0x0000000000401def: _start at ??:? Reset dirty pages (0) mismatch with collected (35566) Fix the issues by clearing 'dirty_ring_vcpu_ring_full' and the ring buffer index before next new mode is to be executed. Signed-off-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110104914.31280-7-gshan@redhat.com tools/testing/selftests/kvm/dirty_log_test.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit a737f5ffb1e883e580730122be11c9eb832a7749 Author: Gavin Shan Date: Thu Nov 10 18:49:12 2022 +0800 KVM: selftests: Use host page size to map ring buffer in dirty_log_test In vcpu_map_dirty_ring(), the guest's page size is used to figure out the offset in the virtual area. It works fine when we have same page sizes on host and guest. However, it fails when the page sizes on host and guest are different on arm64, like below error messages indicates. # ./dirty_log_test -M dirty-ring -m 7 Setting log mode to: 'dirty-ring' Test iterations: 32, interval: 10 (ms) Testing guest mode: PA-bits:40, VA-bits:48, 64K pages guest physical test memory offset: 0xffbffc0000 vcpu stops because vcpu is kicked out... Notifying vcpu to continue vcpu continues now. ==== Test Assertion Failure ==== lib/kvm_util.c:1477: addr == MAP_FAILED pid=9000 tid=9000 errno=0 - Success 1 0x0000000000405f5b: vcpu_map_dirty_ring at kvm_util.c:1477 2 0x0000000000402ebb: dirty_ring_collect_dirty_pages at dirty_log_test.c:349 3 0x00000000004029b3: log_mode_collect_dirty_pages at dirty_log_test.c:478 4 (inlined by) run_test at dirty_log_test.c:778 5 (inlined by) run_test at dirty_log_test.c:691 6 0x0000000000403a57: for_each_guest_mode at guest_modes.c:105 7 0x0000000000401ccf: main at dirty_log_test.c:921 8 0x0000ffffb06ec79b: ?? ??:0 9 0x0000ffffb06ec86b: ?? ??:0 10 0x0000000000401def: _start at ??:? Dirty ring mapped private Fix the issue by using host's page size to map the ring buffer. Signed-off-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110104914.31280-6-gshan@redhat.com tools/testing/selftests/kvm/lib/kvm_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cb1096f8590bc590326087bea65db932b53c3b5 Author: Gavin Shan Date: Thu Nov 10 18:49:11 2022 +0800 KVM: arm64: Enable ring-based dirty memory tracking Enable ring-based dirty memory tracking on ARM64: - Enable CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL. - Enable CONFIG_NEED_KVM_DIRTY_RING_WITH_BITMAP. - Set KVM_DIRTY_LOG_PAGE_OFFSET for the ring buffer's physical page offset. - Add ARM64 specific kvm_arch_allow_write_without_running_vcpu() to keep the site of saving vgic/its tables out of the no-running-vcpu radar. Signed-off-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110104914.31280-5-gshan@redhat.com Documentation/virt/kvm/api.rst | 2 +- arch/arm64/include/uapi/asm/kvm.h | 1 + arch/arm64/kvm/Kconfig | 2 ++ arch/arm64/kvm/arm.c | 3 +++ arch/arm64/kvm/vgic/vgic-its.c | 20 ++++++++++++++++++++ include/kvm/arm_vgic.h | 1 + 6 files changed, 28 insertions(+), 1 deletion(-) commit 86bdf3ebcfe1ded055282536fecce13001874740 Author: Gavin Shan Date: Thu Nov 10 18:49:10 2022 +0800 KVM: Support dirty ring in conjunction with bitmap ARM64 needs to dirty memory outside of a VCPU context when VGIC/ITS is enabled. It's conflicting with that ring-based dirty page tracking always requires a running VCPU context. Introduce a new flavor of dirty ring that requires the use of both VCPU dirty rings and a dirty bitmap. The expectation is that for non-VCPU sources of dirty memory (such as the VGIC/ITS on arm64), KVM writes to the dirty bitmap. Userspace should scan the dirty bitmap before migrating the VM to the target. Use an additional capability to advertise this behavior. The newly added capability (KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP) can't be enabled before KVM_CAP_DIRTY_LOG_RING_ACQ_REL on ARM64. In this way, the newly added capability is treated as an extension of KVM_CAP_DIRTY_LOG_RING_ACQ_REL. Suggested-by: Marc Zyngier Suggested-by: Peter Xu Co-developed-by: Oliver Upton Signed-off-by: Oliver Upton Signed-off-by: Gavin Shan Acked-by: Peter Xu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110104914.31280-4-gshan@redhat.com Documentation/virt/kvm/api.rst | 34 +++++++++++--- Documentation/virt/kvm/devices/arm-vgic-its.rst | 5 +- include/linux/kvm_dirty_ring.h | 7 +++ include/linux/kvm_host.h | 1 + include/uapi/linux/kvm.h | 1 + virt/kvm/Kconfig | 6 +++ virt/kvm/dirty_ring.c | 14 ++++++ virt/kvm/kvm_main.c | 61 +++++++++++++++++++++---- 8 files changed, 112 insertions(+), 17 deletions(-) commit e8a18565e59303ac12c626a161d72bd890bd2062 Author: Gavin Shan Date: Thu Nov 10 18:49:09 2022 +0800 KVM: Move declaration of kvm_cpu_dirty_log_size() to kvm_dirty_ring.h Not all architectures like ARM64 need to override the function. Move its declaration to kvm_dirty_ring.h to avoid the following compiling warning on ARM64 when the feature is enabled. arch/arm64/kvm/../../../virt/kvm/dirty_ring.c:14:12: \ warning: no previous prototype for 'kvm_cpu_dirty_log_size' \ [-Wmissing-prototypes] \ int __weak kvm_cpu_dirty_log_size(void) Reported-by: kernel test robot Signed-off-by: Gavin Shan Reviewed-by: Peter Xu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110104914.31280-3-gshan@redhat.com arch/x86/include/asm/kvm_host.h | 2 -- include/linux/kvm_dirty_ring.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit cf87ac739e488055a6046a410caa8f4da108948f Author: Gavin Shan Date: Thu Nov 10 18:49:08 2022 +0800 KVM: x86: Introduce KVM_REQ_DIRTY_RING_SOFT_FULL The VCPU isn't expected to be runnable when the dirty ring becomes soft full, until the dirty pages are harvested and the dirty ring is reset from userspace. So there is a check in each guest's entrace to see if the dirty ring is soft full or not. The VCPU is stopped from running if its dirty ring has been soft full. The similar check will be needed when the feature is going to be supported on ARM64. As Marc Zyngier suggested, a new event will avoid pointless overhead to check the size of the dirty ring ('vcpu->kvm->dirty_ring_size') in each guest's entrance. Add KVM_REQ_DIRTY_RING_SOFT_FULL. The event is raised when the dirty ring becomes soft full in kvm_dirty_ring_push(). The event is only cleared in the check, done in the newly added helper kvm_dirty_ring_check_request(). Since the VCPU is not runnable when the dirty ring becomes soft full, the KVM_REQ_DIRTY_RING_SOFT_FULL event is always set to prevent the VCPU from running until the dirty pages are harvested and the dirty ring is reset by userspace. kvm_dirty_ring_soft_full() becomes a private function with the newly added helper kvm_dirty_ring_check_request(). The alignment for the various event definitions in kvm_host.h is changed to tab character by the way. In order to avoid using 'container_of()', the argument @ring is replaced by @vcpu in kvm_dirty_ring_push(). Link: https://lore.kernel.org/kvmarm/87lerkwtm5.wl-maz@kernel.org Suggested-by: Marc Zyngier Signed-off-by: Gavin Shan Reviewed-by: Peter Xu Reviewed-by: Sean Christopherson Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221110104914.31280-2-gshan@redhat.com arch/x86/kvm/x86.c | 15 ++++++--------- include/linux/kvm_dirty_ring.h | 12 ++++-------- include/linux/kvm_host.h | 9 +++++---- virt/kvm/dirty_ring.c | 32 ++++++++++++++++++++++++++++++-- virt/kvm/kvm_main.c | 3 +-- 5 files changed, 46 insertions(+), 25 deletions(-) commit 590925a178a3c8e9b694bce8e55bf9851c4b92f4 Merge: 30a0b95b1335 be0ddf5293a7 Author: Marc Zyngier Date: Thu Nov 10 13:11:38 2022 +0000 Merge tag 'kvmarm-fixes-6.1-3' into kvm-arm64/dirty-ring KVM/arm64 fixes for 6.1, take #3 - Fix the pKVM stage-1 walker erronously using the stage-2 accessor - Correctly convert vcpu->kvm to a hyp pointer when generating an exception in a nVHE+MTE configuration - Check that KVM_CAP_DIRTY_LOG_* are valid before enabling them - Fix SMPRI_EL1/TPIDR2_EL0 trapping on VHE - Document the boot requirements for FGT when entering the kernel at EL1 Signed-off-by: Marc Zyngier commit 91016037216b3aaa0fa1b616d388053fb4202835 Author: Konrad Dybcio Date: Thu Nov 10 13:12:25 2022 +0100 regulator: qcom_smd: Fix PMR735a S3 regulator spec PMR735a has a wider range than previously defined. Fix it. Fixes: 0cda8c43aa24 ("regulator: qcom_smd: Add PMR735a regulators") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221110121225.9216-1-konrad.dybcio@linaro.org Signed-off-by: Mark Brown drivers/regulator/qcom_smd-regulator.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit d23a6e3f764b69c122fc18537cc73548fdc95939 Author: Maíra Canal Date: Tue Nov 8 14:54:25 2022 -0300 drm/v3d: add missing mutex_destroy v3d_perfmon_open_file() instantiates a mutex for a particular file instance, but it never destroys it by calling mutex_destroy() in v3d_perfmon_close_file(). Similarly, v3d_perfmon_create_ioctl() instantiates a mutex for a particular perfmon, but it never destroys it by calling mutex_destroy() in v3d_perfmon_destroy_ioctl(). So, add the missing mutex_destroy on both cases. Signed-off-by: Maíra Canal Reviewed-by: Daniel Vetter Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20221108175425.39819-3-mcanal@igalia.com drivers/gpu/drm/v3d/v3d_perfmon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 91d502f6ebe64e500a10aee68df2c65c0bfb2113 Author: Maíra Canal Date: Tue Nov 8 14:54:24 2022 -0300 drm/v3d: switch to drmm_mutex_init mutex_init is supposed to be balanced by a call to mutex_destroy, but this is not currently happening on the v3d driver. Considering the introduction of a DRM-managed mutex_init variant, switch to the drmm_mutex_init. Signed-off-by: Maíra Canal Reviewed-by: Daniel Vetter Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20221108175425.39819-2-mcanal@igalia.com drivers/gpu/drm/v3d/v3d_gem.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit a10234fda4664f9ffe9608abe1e99b51815113f5 Author: Tvrtko Ursulin Date: Wed Nov 9 10:46:33 2022 +0000 drm/i915: Partial abandonment of legacy DRM logging macros Convert some usages of legacy DRM logging macros into versions which tell us on which device have the events occurred. v2: * Don't have struct drm_device as local. (Jani, Ville) v3: * Store gt, not i915, in workaround list. (John) Signed-off-by: Tvrtko Ursulin Acked-by: Jani Nikula Cc: Jani Nikula Cc: John Harrison Cc: Ville Syrjälä Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20221109104633.2579245-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 26 +++++++++----- .../gpu/drm/i915/gt/intel_execlists_submission.c | 13 ++++--- drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c | 4 +-- drivers/gpu/drm/i915/gt/intel_gt.c | 4 +-- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 8 +++-- drivers/gpu/drm/i915/gt/intel_rps.c | 6 ++-- drivers/gpu/drm/i915/gt/intel_workarounds.c | 42 ++++++++++++---------- drivers/gpu/drm/i915/gt/intel_workarounds_types.h | 3 ++ drivers/gpu/drm/i915/gt/selftest_workarounds.c | 4 +-- drivers/gpu/drm/i915/i915_debugfs.c | 4 +-- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_getparam.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 12 ++++--- drivers/gpu/drm/i915/i915_perf.c | 14 ++++---- drivers/gpu/drm/i915/i915_query.c | 12 ++++--- drivers/gpu/drm/i915/i915_sysfs.c | 3 +- drivers/gpu/drm/i915/i915_vma.c | 16 +++++---- drivers/gpu/drm/i915/intel_uncore.c | 21 ++++++----- 19 files changed, 117 insertions(+), 81 deletions(-) commit f8bd9f25c9815161a39886fdd96d110b536a6074 Author: Juergen Gross Date: Wed Nov 2 08:47:13 2022 +0100 x86/mtrr: Simplify mtrr_ops initialization The way mtrr_if is initialized with the correct mtrr_ops structure is quite weird. Simplify that by dropping the vendor specific init functions and the mtrr_ops[] array. Replace those with direct assignments of the related vendor specific ops array to mtrr_if. Note that a direct assignment is okay even for 64-bit builds, where the symbol isn't present, as the related code will be subject to "dead code elimination" due to how cpu_feature_enabled() is implemented. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-17-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/kernel/cpu/mtrr/amd.c | 8 +------- arch/x86/kernel/cpu/mtrr/centaur.c | 8 +------- arch/x86/kernel/cpu/mtrr/cyrix.c | 8 +------- arch/x86/kernel/cpu/mtrr/mtrr.c | 30 +++--------------------------- arch/x86/kernel/cpu/mtrr/mtrr.h | 10 ++++------ 5 files changed, 10 insertions(+), 54 deletions(-) commit 30f89e524becdbaa483b34902b079c9d4dfaa4a3 Author: Juergen Gross Date: Wed Nov 2 08:47:11 2022 +0100 x86/cacheinfo: Switch cache_ap_init() to hotplug callback Instead of explicitly calling cache_ap_init() in identify_secondary_cpu() use a CPU hotplug callback instead. By registering the callback only after having started the non-boot CPUs and initializing cache_aps_delayed_init with "true", calling set_cache_aps_delayed_init() at boot time can be dropped. It should be noted that this change results in cache_ap_init() being called a little bit later when hotplugging CPUs. By using a new hotplug slot right at the start of the low level bringup this is not problematic, as no operations requiring a specific caching mode are performed that early in CPU initialization. Suggested-by: Borislav Petkov Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-15-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/include/asm/cacheinfo.h | 1 - arch/x86/kernel/cpu/cacheinfo.c | 18 +++++++++++++++--- arch/x86/kernel/cpu/common.c | 1 - arch/x86/kernel/smpboot.c | 2 -- include/linux/cpuhotplug.h | 1 + 5 files changed, 16 insertions(+), 7 deletions(-) commit adfe7512e1d0b2e83215b0ec56337d2df9f1032d Author: Juergen Gross Date: Wed Nov 2 08:47:10 2022 +0100 x86: Decouple PAT and MTRR handling Today, PAT is usable only with MTRR being active, with some nasty tweaks to make PAT usable when running as a Xen PV guest which doesn't support MTRR. The reason for this coupling is that both PAT MSR changes and MTRR changes require a similar sequence and so full PAT support was added using the already available MTRR handling. Xen PV PAT handling can work without MTRR, as it just needs to consume the PAT MSR setting done by the hypervisor without the ability and need to change it. This in turn has resulted in a convoluted initialization sequence and wrong decisions regarding cache mode availability due to misguiding PAT availability flags. Fix all of that by allowing to use PAT without MTRR and by reworking the current PAT initialization sequence to match better with the newly introduced generic cache initialization. This removes the need of the recently added pat_force_disabled flag, so remove the remnants of the patch adding it. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-14-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/include/asm/memtype.h | 5 +- arch/x86/kernel/cpu/cacheinfo.c | 3 +- arch/x86/kernel/cpu/mtrr/mtrr.c | 12 +--- arch/x86/kernel/setup.c | 13 +--- arch/x86/mm/pat/memtype.c | 152 +++++++++++++--------------------------- 5 files changed, 57 insertions(+), 128 deletions(-) commit 0b9a6a8bedbfb38e7c6be4d119a267e6277307cc Author: Juergen Gross Date: Wed Nov 2 08:47:09 2022 +0100 x86/mtrr: Add a stop_machine() handler calling only cache_cpu_init() Instead of having a stop_machine() handler for either a specific MTRR register or all state at once, add a handler just for calling cache_cpu_init() if appropriate. Add functions for calling stop_machine() with this handler as well. Add a generic replacement for mtrr_bp_restore() and a wrapper for mtrr_bp_init(). Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-13-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/include/asm/cacheinfo.h | 5 ++- arch/x86/include/asm/mtrr.h | 8 +--- arch/x86/kernel/cpu/cacheinfo.c | 59 ++++++++++++++++++++++++++- arch/x86/kernel/cpu/common.c | 3 +- arch/x86/kernel/cpu/mtrr/mtrr.c | 88 +--------------------------------------- arch/x86/kernel/setup.c | 3 +- arch/x86/kernel/smpboot.c | 4 +- arch/x86/power/cpu.c | 3 +- 8 files changed, 74 insertions(+), 99 deletions(-) commit 955d0e0805912641230fb46c380aa625f78ecaca Author: Juergen Gross Date: Wed Nov 2 08:47:08 2022 +0100 x86/mtrr: Let cache_aps_delayed_init replace mtrr_aps_delayed_init In order to prepare decoupling MTRR and PAT replace the MTRR-specific mtrr_aps_delayed_init flag with a more generic cache_aps_delayed_init one. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-12-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/include/asm/cacheinfo.h | 2 ++ arch/x86/include/asm/mtrr.h | 2 -- arch/x86/kernel/cpu/cacheinfo.c | 12 ++++++++++++ arch/x86/kernel/cpu/mtrr/mtrr.c | 18 +++++------------- arch/x86/kernel/smpboot.c | 5 +++-- 5 files changed, 22 insertions(+), 17 deletions(-) commit 2c15679e8687d5934e1a70fe50ce409bb8a2aba1 Author: Juergen Gross Date: Wed Nov 2 08:47:07 2022 +0100 x86/mtrr: Get rid of __mtrr_enabled bool There is no need for keeping __mtrr_enabled as it can easily be replaced by testing mtrr_if to be not NULL. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-11-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/kernel/cpu/mtrr/mtrr.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 74069135f09c4600ab2985939c305ebef57ac34f Author: Juergen Gross Date: Wed Nov 2 08:47:06 2022 +0100 x86/mtrr: Simplify mtrr_bp_init() In case of the generic cache interface being used (Intel CPUs or a 64-bit system), the initialization sequence of the boot CPU is more complicated than necessary: - check if MTRR enabled, if yes, call mtrr_bp_pat_init() which will disable caching, set the PAT MSR, and reenable caching - call mtrr_cleanup(), in case that changed anything, call cache_cpu_init() doing the same caching disable/enable dance as above, but this time with setting the (modified) MTRR state (even if MTRR was disabled) AND setting the PAT MSR (again even with disabled MTRR) The sequence can be simplified a lot while removing potential inconsistencies: - check if MTRR enabled, if yes, call mtrr_cleanup() and then cache_cpu_init() This ensures to: - no longer disable/enable caching more than once - avoid to set MTRRs and/or the PAT MSR on the boot processor in case of MTRR cleanups even if MTRRs meant to be disabled With that mtrr_bp_pat_init() can be removed. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-10-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/kernel/cpu/mtrr/generic.c | 14 -------------- arch/x86/kernel/cpu/mtrr/mtrr.c | 6 +----- arch/x86/kernel/cpu/mtrr/mtrr.h | 1 - 3 files changed, 1 insertion(+), 20 deletions(-) commit 57df636cd336a1929c7ddc5fb48ed124d24cd7b2 Author: Juergen Gross Date: Wed Nov 2 08:47:05 2022 +0100 x86/mtrr: Remove set_all callback from struct mtrr_ops Instead of using an indirect call to mtrr_if->set_all just call the only possible target cache_cpu_init() directly. Remove the set_all function pointer from struct mtrr_ops. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-9-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/kernel/cpu/mtrr/generic.c | 1 - arch/x86/kernel/cpu/mtrr/mtrr.c | 10 +++++----- arch/x86/kernel/cpu/mtrr/mtrr.h | 2 -- 3 files changed, 5 insertions(+), 8 deletions(-) commit 7d71db537b01a6beadbe45a4e6e302272110c2c0 Author: Juergen Gross Date: Wed Nov 2 08:47:04 2022 +0100 x86/mtrr: Disentangle MTRR init from PAT init Add a main cache_cpu_init() init routine which initializes MTRR and/or PAT support depending on what has been detected on the system. Leave the MTRR-specific initialization in a MTRR-specific init function where the smp_changes_mask setting happens now with caches disabled. This global mask update was done with caches enabled before probably because atomic operations while running uncached might have been quite expensive. But since only systems with a broken BIOS should ever require to set any bit in smp_changes_mask, hurting those devices with a penalty of a few microseconds during boot shouldn't be a real issue. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-8-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/include/asm/cacheinfo.h | 1 + arch/x86/include/asm/mtrr.h | 2 ++ arch/x86/kernel/cpu/cacheinfo.c | 17 +++++++++++++++++ arch/x86/kernel/cpu/mtrr/generic.c | 15 ++------------- 4 files changed, 22 insertions(+), 13 deletions(-) commit 23a63e369098a8503550d1df80f4b4801af32c19 Author: Juergen Gross Date: Wed Nov 2 08:47:03 2022 +0100 x86/mtrr: Move cache control code to cacheinfo.c Prepare making PAT and MTRR support independent from each other by moving some code needed by both out of the MTRR-specific sources. [ bp: Massage commit message. ] Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-7-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/kernel/cpu/cacheinfo.c | 77 ++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/mtrr/generic.c | 74 ------------------------------------ 2 files changed, 77 insertions(+), 74 deletions(-) commit 4ad7149e46d048d3a543c96d35c1d255208dd33a Author: Juergen Gross Date: Wed Nov 2 08:47:02 2022 +0100 x86/mtrr: Split MTRR-specific handling from cache dis/enabling Split the MTRR-specific actions from cache_disable() and cache_enable() into new functions mtrr_disable() and mtrr_enable(). Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-6-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/include/asm/mtrr.h | 4 ++++ arch/x86/kernel/cpu/mtrr/generic.c | 26 +++++++++++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) commit d5f66d5d10611978c3a93cc94a811d74e0cf6cbc Author: Juergen Gross Date: Wed Nov 2 08:47:01 2022 +0100 x86/mtrr: Rename prepare_set() and post_set() Rename the currently MTRR-specific functions prepare_set() and post_set() in preparation to move them. Make them non-static and put their prototypes into cacheinfo.h, where they will end after moving them to their final position anyway. Expand the comment before the functions with an introductory line and rename two related static variables, too. [ bp: Massage commit message. ] Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-5-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/include/asm/cacheinfo.h | 3 +++ arch/x86/kernel/cpu/mtrr/generic.c | 43 +++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 22 deletions(-) commit 45fa71f19a2d73f157d6892a8d677a738a0414fd Author: Juergen Gross Date: Wed Nov 2 08:47:00 2022 +0100 x86/mtrr: Replace use_intel() with a local flag In MTRR code use_intel() is only used in one source file, and the relevant use_intel_if member of struct mtrr_ops is set only in generic_mtrr_ops. Replace use_intel() with a single flag in cacheinfo.c which can be set when assigning generic_mtrr_ops to mtrr_if. This allows to drop use_intel_if from mtrr_ops, while preparing to decouple PAT from MTRR. As another preparation for the PAT/MTRR decoupling use a bit for MTRR control and one for PAT control. For now set both bits together, this can be changed later. As the new flag will be set only if mtrr_enabled is set, the test for mtrr_enabled can be dropped at some places. [ bp: Massage commit message. ] Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221102074713.21493-4-jgross@suse.com Signed-off-by: Borislav Petkov arch/x86/include/asm/cacheinfo.h | 5 +++++ arch/x86/kernel/cpu/cacheinfo.c | 3 +++ arch/x86/kernel/cpu/mtrr/generic.c | 1 - arch/x86/kernel/cpu/mtrr/mtrr.c | 28 +++++++++++++--------------- arch/x86/kernel/cpu/mtrr/mtrr.h | 2 -- 5 files changed, 21 insertions(+), 18 deletions(-) commit 0c9ef08a4d0fd6c5e6000597b506235d71a85a61 Author: Nathan Huckleberry Date: Tue Nov 8 17:26:30 2022 -0700 net: mana: Fix return type of mana_start_xmit() The ndo_start_xmit field in net_device_ops is expected to be of type netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev). The mismatched return type breaks forward edge kCFI since the underlying function definition does not match the function hook definition. A new warning in clang will catch this at compile time: drivers/net/ethernet/microsoft/mana/mana_en.c:382:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = mana_start_xmit, ^~~~~~~~~~~~~~~ 1 error generated. The return type of mana_start_xmit should be changed from int to netdev_tx_t. Reported-by: Dan Carpenter Link: https://github.com/ClangBuiltLinux/linux/issues/1703 Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Signed-off-by: Nathan Huckleberry Reviewed-by: Dexuan Cui [nathan: Rebase on net-next and resolve conflicts Add note about new clang warning] Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20221109002629.1446680-1-nathan@kernel.org Signed-off-by: Paolo Abeni drivers/net/ethernet/microsoft/mana/mana.h | 2 +- drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b0b9b80599a30ee8862c0294b8a3b69c9c6df4f9 Author: Avraham Stern Date: Wed Nov 2 16:59:58 2022 +0200 wifi: iwlwifi: mei: wait for the mac to stop on suspend When iwlmei driver is removed, it removes all the interfaces since CSME will take over the NIC while there is no SAP connection. When the iwlmei driver is removed due to the host being suspended, this results in the interface being down after resume since the interface was removed on suspend so mac80211 will not try to bring it up on resume. Since on suspend the mac is stopped anyway by mac80211, there is no need to remove the interface in this case. Wait for the mac to stop instead. Once the mac is stopped, the driver will not access the NIC anymore so it is safe for CSME to take over. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221102165239.371102f04586.I813a964607b3e92ea275a0cf56df57227c11ae88@changeid drivers/net/wireless/intel/iwlwifi/mei/main.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit c4bb943e0ad5829ec387e30bcb4b30cb15a572b9 Author: Avraham Stern Date: Wed Nov 2 16:59:57 2022 +0200 wifi: iwlwifi: iwlmei: report disconnection as temporary Disconnections are reported to CSME as long link down. As a result, CSME will take ownership right away so the host doesn't have a chance to reconnect, although in many cases it could quickly reconnect and preserve host connectivity. Report disconnections as temporary so CSME will give the host some grace time to reconnect. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221102165239.401665457652.Ie5de9eacc5a51cf0965a08c202caf3fbc3a91ec4@changeid drivers/net/wireless/intel/iwlwifi/mei/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6564f3b8621e380114732644be4c65064361eb6f Author: Avraham Stern Date: Wed Nov 2 16:59:56 2022 +0200 wifi: iwlwifi: mei: use wait_event_timeout() return value wait_event_timeout() return value indicates whether the condition evaluated to true or not, so no need to re-take the lock and check the got_ownership flag. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221102165239.33159054626f.Ief9e2dc42f96f8044c197d32172003a5ead0f8d3@changeid drivers/net/wireless/intel/iwlwifi/mei/main.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit 733eb54f62c6f07938c83cac6ef69afc28ca7e6c Author: Avraham Stern Date: Wed Nov 2 16:59:55 2022 +0200 wifi: iwlwifi: mei: implement PLDR flow If the FW needs to do OTP re-read, the driver must notify CSME before loading the FW so CSME will not try to access the NIC during the re-read. Once the alive notification is received, CSME is notified that NIC access is allowed again. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221102165239.49eb8c6d455f.I7f0a5debb2d3d662a4151199bbec24613f324c13@changeid drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 4 + drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h | 21 +++++ drivers/net/wireless/intel/iwlwifi/mei/main.c | 100 +++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mei/sap.h | 51 ++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 7 ++ 5 files changed, 183 insertions(+) commit ef2e7a51095012673b9b72dabe343333f537c826 Author: Ilan Peer Date: Wed Nov 2 16:59:54 2022 +0200 wifi: iwlwifi: mvm: Fix getting the lowest rate When setting the rate for Tx, the code tried to get the lowest allowed rate but without considering the BSS basic rates. Fix this by considering the basic rates. In addition, declare support for configuring beacon Tx rate and when configured use the configured Tx beacon rate to set beacon tx command rate. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221102165239.be8403f0d5c0.I7d141646746b96310efd75fc77ca9aebc61aefcc@changeid drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 60 ++++++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 ++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 +- 4 files changed, 59 insertions(+), 11 deletions(-) commit 5c75a208c2449c6ea24f07610cc052f6a352246c Author: Johannes Berg Date: Wed Nov 2 16:59:53 2022 +0200 wifi: iwlwifi: mvm: support new key API In order to support MLD, the key API is also changing to have station masks instead of just the station ID etc. Change the driver to support this, and add the new code in a new file so it's more clearly separated. For now this isn't separated at the mac80211 ops level, which we wanted to do, but we're calling these functions in a place when pre-start keys are installed in iwl_mvm_start_ap_ibss(), and the function has some glue logic to mac80211. We may want to change that later. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221102165239.ed9ccd814abc.Iacc7360de68807fbac19e5b67c86504b39cc15df@changeid .../net/wireless/intel/iwlwifi/fw/api/datapath.h | 79 +++++++ drivers/net/wireless/intel/iwlwifi/mvm/Makefile | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 17 +- drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c | 226 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 12 ++ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 3 + 7 files changed, 337 insertions(+), 2 deletions(-) commit ae5ecbb0c39e4a5872b9e6f31fb0ce350edd833a Author: Rotem Saado Date: Wed Nov 2 16:59:52 2022 +0200 wifi: iwlwifi: dbg: use bit of DRAM alloc ID to store failed allocs The failed_alloc variable is used as a bitmask in the loop where we check DRAM allocations. But erroneously, we were clearing the DRAM alloc IDs we removed as an integer. Fix that by clearing them as bits instead. Signed-off-by: Rotem Saado Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221102165239.688dec28b1d9.I470b8d29c28d16f25f4192773f075940de7ed33c@changeid drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b79d2219e9352f7972035c9e07da3e1f4d2b2572 Author: Luca Coelho Date: Wed Nov 2 16:59:51 2022 +0200 wifi: iwlwifi: mvm: print an error instead of a warning on invalid rate In some rare occasions, the firmware may let some frames with invalid rates, such as CCK rates on the high band, come through. This causes the driver to issue a warning, but since this is a possible issue and it's not really a bug in the driver, convert the warning into an error. Signed-off-by: Luca Coelho Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221102165239.3d3673c70556.I13464b11d405fd6021618b0a32404cecb7e9ac51@changeid drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 06ffeebbfbd4458778d6ba41689f66ad35b26219 Author: Luca Coelho Date: Wed Nov 2 16:59:50 2022 +0200 wifi: iwlwifi: cfg: disable STBC for BL step A devices The A step of BL devices doesn't support STBC, so we need to disable it. Create new HT params and a macro to use specifically with BL A-step devices where STBC is disabled. Signed-off-by: Luca Coelho Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221102165239.806dbfa53f40.I4b14a8be30795bdcd73686bd1f9222e7ab93b505@changeid drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 0323f194c0da764b339048b45149e48851e7ea68 Author: Rotem Saado Date: Wed Nov 2 16:59:49 2022 +0200 wifi: iwlwifi: dbg: add support for DBGC4 on BZ family and above Update the for loop that iterates over all the DBGCs to include DBGC4. DBGC4 is only supported staring from the BZ family of devices, so check the family before accepting it. Signed-off-by: Rotem Saado Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221102165239.0b6050b41060.Id662c716c2e3c2c850740d1f71e2801e02aeddaf@changeid drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ec18e7d4d20dc6be85aaf02dfa3cebbb136a7c26 Author: Johannes Berg Date: Wed Nov 2 16:59:48 2022 +0200 wifi: iwlwifi: mvm: use old checksum for Bz A-step For Bz A-step hardware, the checksum offload is broken and we need to use the old way, which is still there. Do that, which requires taking the checksum capability bits out of the IWL_DEVICE_BZ macro and listing them individually. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221102165239.6bc379f1b0b1.I204223f1b1c2fe26f414aea6679ef7fce681c33a@changeid drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 16 +++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 7 +++++-- 2 files changed, 20 insertions(+), 3 deletions(-) commit d3df49dda431f7ae4132a9a0ac25a5134c04e812 Author: Johannes Berg Date: Sun Oct 30 19:17:45 2022 +0200 wifi: iwlwifi: mei: fix potential NULL-ptr deref after clone If cloning the SKB fails, don't try to use it, but rather return as if we should pass it. Coverity CID: 1503456 Fixes: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with CSME") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221030191011.0ce03ba99601.I87960b7cb0a3d16b9fd8d9144027e7e2587f5a58@changeid drivers/net/wireless/intel/iwlwifi/mei/net.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit d288067ede4b375e72daf7f9a98d937ede11a311 Author: Avraham Stern Date: Sun Oct 30 19:17:44 2022 +0200 wifi: iwlwifi: mei: avoid blocking sap messages handling due to rtnl lock The AMT_STATE sap message handler tries to take the rtnl lock. This means that in case the rtnl lock is already taken, sap messages will not be processed. When an interface is brought up, the host requests ownership from csme. However, since the rtnl lock is already held, if there is a pending amt state message, the host will not be able to read the ownership confirm message because the amt state message handler is pending. As a result, the host fails to get ownership although csme granted it. Fix it by moving the part that needs the rtnl lock into a dedicated worker, so handling sap messages can continue. Fixes: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with CSME") Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221030191011.8599f2b4e9dd.I518f79e9099bf815c5f8d90235b4ce3250f59970@changeid drivers/net/wireless/intel/iwlwifi/mei/main.c | 57 +++++++++++++++++---------- 1 file changed, 37 insertions(+), 20 deletions(-) commit bcd68b3dbe78b7b0f7b6b55162cf1eff1e7fff9e Author: Emmanuel Grumbach Date: Sun Oct 30 19:17:43 2022 +0200 wifi: iwlwifi: mei: fix tx DHCP packet for devices with new Tx API Devices with new Tx API have the IV introduced by the HW and it is not present in the skb at all. Hence we don't need to tell iwl_mvm_mei_tx_copy_to_csme to jump over 8 bytes to get to the ethernet header. Fixes: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with CSME") Signed-off-by: Emmanuel Grumbach Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221030191011.12dc42133502.Idd744ffeeb84b880eb497963ee02563cbb959a42@changeid drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 95170a46b7dddbc3ac31b20ef2e8fa9d556d783d Author: Emmanuel Grumbach Date: Sun Oct 30 19:17:42 2022 +0200 wifi: iwlwifi: mei: don't send SAP commands if AMT is disabled We should not send any SAP command to CSME if AMT is disabled. Reported-by: Toke Høiland-Jørgensen Fixes: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with CSME") Signed-off-by: Emmanuel Grumbach Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221030191011.ea222d41c781.Ifc90ddc3e35187683ff7f59371d792b61c8854c8@changeid drivers/net/wireless/intel/iwlwifi/mei/main.c | 85 ++++++++++++++------------- 1 file changed, 44 insertions(+), 41 deletions(-) commit 5aa7ce31bd84c2f4f059200f06c537c920cbb458 Author: Avraham Stern Date: Sun Oct 30 19:17:41 2022 +0200 wifi: iwlwifi: mei: make sure ownership confirmed message is sent It is possible that CSME will try to take ownership while the driver is stopping. In this case, if the CSME takes ownership message arrives after the driver started unregistering, the iwl_mei_cache->ops is already invalid, so the host will not answer with the ownership confirmed message. Similarly, if the take ownership message arrived after the mac was stopped or when iwl_mvm_up() failed, setting rfkill will not trigger sending the confirm message. As a result, CSME will not take ownership, which will result in a disconnection. Fix it by sending the ownership confirmed message immediately in such cases. Fixes: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with CSME") Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221030191011.b2a4c009e3e6.I7f931b7ee8b168e8ac88b11f23bff98b7ed3cb19@changeid drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h | 7 +++--- drivers/net/wireless/intel/iwlwifi/mei/main.c | 30 ++++++++++++++++-------- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- 5 files changed, 29 insertions(+), 16 deletions(-) commit e5d3a64e650c721f9e9b1f76e5df8c62f16b734d Author: Avraham Stern Date: Sun Oct 30 19:17:40 2022 +0200 wifi: iwlwifi: mvm: send TKIP connection status to csme Notify csme when associated with TKIP cipher. TKIP is supported by csme. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20221030191011.cea63e4a355c.If6cdfa52529a79b923191c89dad7ed871d2ad2c6@changeid drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mei/sap.h | 4 +++- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) commit e081ecf084d31809242fb0b9f35484d5fb3a161a Author: Richard Gobert Date: Tue Nov 8 13:33:28 2022 +0100 gro: avoid checking for a failed search After searching for a protocol handler in dev_gro_receive, checking for failure is redundant. Skip the failure code after finding the corresponding handler. Suggested-by: Eric Dumazet Signed-off-by: Richard Gobert Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20221108123320.GA59373@debian Signed-off-by: Paolo Abeni net/core/gro.c | 70 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 8dd7e4af585331dda004e92ed0739c3609e37177 Author: Benedikt Niedermayr Date: Wed Nov 9 11:24:54 2022 +0100 memory: omap-gpmc: fix coverity issue "Control flow issues" Assign a big positive integer instead of an negative integer to an u32 variable. Also remove the check for ">= 0" which doesn't make sense for unsigned integers. Reported-by: coverity-bot Addresses-Coverity-ID: 1527139 ("Control flow issues") Fixes: 89aed3cd5cb9 ("memory: omap-gpmc: wait pin additions") Signed-off-by: Benedikt Niedermayr Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20221109102454.174320-1-benedikt.niedermayr@siemens.com Signed-off-by: Krzysztof Kozlowski drivers/memory/omap-gpmc.c | 2 +- include/linux/platform_data/gpmc-omap.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 802e19a066c40017321a0717817785d861aedc53 Author: Andy Shevchenko Date: Wed Nov 9 17:23:56 2022 +0200 pinctrl: Put space between type and data in compound literal It's slightly better to read when compound literal data and type are separated by a space. Signed-off-by: Andy Shevchenko Reviewed-by: Basavaraj Natikar Link: https://lore.kernel.org/r/20221109152356.39868-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij include/linux/pinctrl/pinctrl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 001b38cea30961e0f4e562a1872f2409a8024ff0 Author: Krzysztof Kozlowski Date: Thu Aug 11 09:29:53 2022 +0300 dt-bindings: arm: aspeed: adjust qcom,dc-scm-v1-bmc compatible after rename The Nuvia DC-SCM BMC board compatible was renamed in commit 7f058112873e ("ARM: dts: aspeed: nuvia: rename vendor nuvia to qcom"), so adjust the bindings as well. Fixes: f77024c80147 ("dt-bindings: arm: aspeed: document board compatibles") Acked-by: Jae Hyun Yoo Acked-by: Rob Herring Acked-by: Andrew Jeffery Link: https://lore.kernel.org/r/20220811062953.5976-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 654058e67b9490a655d9a01e838168fb499f2aa3 Author: Rong Tao Date: Tue Nov 8 20:47:57 2022 +0800 tools/vm/slabinfo: indicates the cause of the EACCES error If you don't run slabinfo with a superuser, return 0 when read_slab_dir() reads get_obj_and_str("slabs", &t), because fopen() fails (sometimes EACCES), causing slabcache() to return directly, without any error during this time, we should tell the user about the EACCES problem instead of running successfully($?=0) without any error printing. For example: $ ./slabinfo Permission denied, Try using superuser <== What this submission did $ sudo ./slabinfo Name Objects Objsize Space Slabs/Part/Cpu O/S O %Fr %Ef Flg Acpi-Namespace 5950 48 286.7K 65/0/5 85 0 0 99 Acpi-Operand 13664 72 999.4K 231/0/13 56 0 0 98 ... Signed-off-by: Rong Tao Signed-off-by: Vlastimil Babka tools/vm/slabinfo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5c20311d76cbaeb7ed2ecf9c8b8322f8fc4a7ae3 Author: Leonid Ravich Date: Wed Nov 9 11:57:17 2022 +0200 IB/mad: Don't call to function that might sleep while in atomic context Tracepoints are not allowed to sleep, as such the following splat is generated due to call to ib_query_pkey() in atomic context. WARNING: CPU: 0 PID: 1888000 at kernel/trace/ring_buffer.c:2492 rb_commit+0xc1/0x220 CPU: 0 PID: 1888000 Comm: kworker/u9:0 Kdump: loaded Tainted: G OE --------- - - 4.18.0-305.3.1.el8.x86_64 #1 Hardware name: Red Hat KVM, BIOS 1.13.0-2.module_el8.3.0+555+a55c8938 04/01/2014 Workqueue: ib-comp-unb-wq ib_cq_poll_work [ib_core] RIP: 0010:rb_commit+0xc1/0x220 RSP: 0000:ffffa8ac80f9bca0 EFLAGS: 00010202 RAX: ffff8951c7c01300 RBX: ffff8951c7c14a00 RCX: 0000000000000246 RDX: ffff8951c707c000 RSI: ffff8951c707c57c RDI: ffff8951c7c14a00 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: ffff8951c7c01300 R11: 0000000000000001 R12: 0000000000000246 R13: 0000000000000000 R14: ffffffff964c70c0 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8951fbc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f20e8f39010 CR3: 000000002ca10005 CR4: 0000000000170ef0 Call Trace: ring_buffer_unlock_commit+0x1d/0xa0 trace_buffer_unlock_commit_regs+0x3b/0x1b0 trace_event_buffer_commit+0x67/0x1d0 trace_event_raw_event_ib_mad_recv_done_handler+0x11c/0x160 [ib_core] ib_mad_recv_done+0x48b/0xc10 [ib_core] ? trace_event_raw_event_cq_poll+0x6f/0xb0 [ib_core] __ib_process_cq+0x91/0x1c0 [ib_core] ib_cq_poll_work+0x26/0x80 [ib_core] process_one_work+0x1a7/0x360 ? create_worker+0x1a0/0x1a0 worker_thread+0x30/0x390 ? create_worker+0x1a0/0x1a0 kthread+0x116/0x130 ? kthread_flush_work_fn+0x10/0x10 ret_from_fork+0x35/0x40 ---[ end trace 78ba8509d3830a16 ]--- Fixes: 821bf1de45a1 ("IB/MAD: Add recv path trace point") Signed-off-by: Leonid Ravich Link: https://lore.kernel.org/r/Y2t5feomyznrVj7V@leonid-Inspiron-3421 Signed-off-by: Leon Romanovsky drivers/infiniband/core/mad.c | 5 ----- include/trace/events/ib_mad.h | 13 ++++--------- 2 files changed, 4 insertions(+), 14 deletions(-) commit c12c19877b56a1e4e12d2076b1b85f85071df4de Author: Wei Li Date: Tue Nov 8 17:45:29 2022 +0800 dt-bindings: pinctrl: Correct the header guard of mt6795-pinfunc.h Rename the header guard of mt6795-pinfunc.h from __DTS_MT8173_PINFUNC_H to __DTS_MT6795_PINFUNC_H what corresponding with the file name. Fixes: 81557a71564a ("dt-bindings: pinctrl: Add MediaTek MT6795 pinctrl bindings") Signed-off-by: Wei Li Link: https://lore.kernel.org/r/20221108094529.3597920-1-liwei391@huawei.com Signed-off-by: Linus Walleij include/dt-bindings/pinctrl/mt6795-pinfunc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52d13b1d936ecb034b0a13b613188713efcdf6c3 Author: Jesse Taube Date: Mon Nov 7 02:15:10 2022 -0500 pinctrl: freescale: Fix i.MXRT1050 pad names The pad names for the i.MXRT1050 were incorrect. Fix them. Cc: Giulio Benetti Signed-off-by: Jesse Taube Link: https://lore.kernel.org/r/20221107071511.2764628-7-Mr.Bossman075@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imxrt1050.c | 546 ++++++++++++-------------- 1 file changed, 253 insertions(+), 293 deletions(-) commit 3029752f8388eef936376805acfe4ed6d4c4cad0 Author: Jesse Taube Date: Mon Nov 7 02:15:09 2022 -0500 dt-bindings: mmc: fsl-imx-esdhc: add i.MXRT1170 compatible Add i.MXRT1170 compatible string to Documentation. Cc: Giulio Benetti Signed-off-by: Jesse Taube Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221107071511.2764628-6-Mr.Bossman075@gmail.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 26709180433d06acd0e5f21478f760547f4eb70e Author: Jesse Taube Date: Mon Nov 7 02:15:08 2022 -0500 dt-bindings: serial: fsl-lpuart: add i.MXRT1170 compatible Add i.MXRT1170 compatible string to Documentation. Cc: Giulio Benetti Signed-off-by: Jesse Taube Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221107071511.2764628-5-Mr.Bossman075@gmail.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/serial/fsl-lpuart.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 552766813d52357f8fabf8a0a3337bd09956ec78 Author: Jesse Taube Date: Mon Nov 7 02:15:07 2022 -0500 dt-bindings: timer: gpt: Add i.MXRT compatible Documentation Both the i.MXRT1170 and 1050 have the same GPT timer as "fsl,imx6dl-gpt" Add i.MXRT to the compatible list. Cc: Giulio Benetti Signed-off-by: Jesse Taube Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221107071511.2764628-4-Mr.Bossman075@gmail.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 333f36d1bdac06c8056a34aa70d432ff0e47f1d5 Author: Jesse Taube Date: Mon Nov 7 02:15:06 2022 -0500 dt-bindings: pinctrl: Fix file path for pinfunc include Reference to pinfunc.h was wrong. Fix it. Cc: Giulio Benetti Signed-off-by: Jesse Taube Link: https://lore.kernel.org/r/20221107071511.2764628-3-Mr.Bossman075@gmail.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/fsl,imxrt1050.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5da7374e8fc23add6b041aea22c1140dbbbbb38e Author: Jesse Taube Date: Mon Nov 7 02:15:05 2022 -0500 dt-bindings: arm: imx: Add i.MXRT compatible Documentation Recently the imxrt1050 was added but the cpu compatible node wasn't added. Add both i.MXRT1170 and 1050 compatibles to fsl.yaml. Cc: Giulio Benetti Signed-off-by: Jesse Taube Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221107071511.2764628-2-Mr.Bossman075@gmail.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/arm/fsl.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2c58d8dc9cd0692665f3512842d97ef2869cb027 Author: Sam Shih Date: Sun Nov 6 09:01:13 2022 +0100 pinctrl: mediatek: add pull_type attribute for mediatek MT7986 SoC Commit fb34a9ae383a ("pinctrl: mediatek: support rsel feature") add SoC specify 'pull_type' attribute for bias configuration. This patch add pull_type attribute to pinctrl-mt7986.c, and make bias_set_combo and bias_get_combo available to mediatek MT7986 SoC. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221106080114.7426-7-linux@fw-web.de Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt7986.c | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit fae82621ac33e2a4a96220c56e90d1ec6237d394 Author: Sam Shih Date: Sun Nov 6 09:01:12 2022 +0100 pinctrl: mediatek: extend pinctrl-moore to support new bias functions Commit fb34a9ae383a ("pinctrl: mediatek: support rsel feature") introduced SoC specify 'pull_type' attribute to mtk_pinconf_bias_set_combo and mtk_pinconf_bias_get_combo, and make the functions able to support almost all Mediatek SoCs that use pinctrl-mtk-common-v2.c. This patch enables pinctrl_moore to support these functions. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221106080114.7426-6-linux@fw-web.de Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-moore.c | 49 +++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 7 deletions(-) commit 3476b354c65db442580ef355885c69e60c546ef0 Author: Sam Shih Date: Sun Nov 6 09:01:11 2022 +0100 pinctrl: mediatek: fix the pinconf register offset of some pins Correct the bias-pull-up, bias-pull-down and bias-disable register offset of mt7986 pin-42 to pin-49, in the original driver, the relative offset value was erroneously decremented by 1. Fixes: 360de6728064 ("pinctrl: mediatek: add support for MT7986 SoC") Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221106080114.7426-5-linux@fw-web.de Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt7986.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e66e66f17ea8b230a2ab2571582a15ad739f2da2 Author: Sam Shih Date: Sun Nov 6 09:01:10 2022 +0100 dt-bindings: pinctrl: mt7986: add generic bias-pull* support Since the bias-pull-{up,down} attribute already defines in pinctrl driver of mediatek MT7986 SoC, this patch updates bindings to support mediatek common bias-pull* function. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221106080114.7426-4-linux@fw-web.de Signed-off-by: Linus Walleij .../bindings/pinctrl/mediatek,mt7986-pinctrl.yaml | 50 ++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) commit c115e7f51e685536ecb885854bdd4b3f225ff3e4 Author: Frank Wunderlich Date: Sun Nov 6 09:01:09 2022 +0100 dt-bindings: pinctrl: update uart/mmc bindings for MT7986 SoC Fix mmc and uart pins after uart splitting. Some pinmux pins of the mt7986 pinctrl driver is composed of multiple pinctrl groups, the original binding only allows one pinctrl group per dts node, this patch sets "maxItems" for these groups and add new examples to the binding documentation. Fixes: 65916a1ca90a ("dt-bindings: pinctrl: update bindings for MT7986 SoC") Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221106080114.7426-3-linux@fw-web.de Signed-off-by: Linus Walleij .../bindings/pinctrl/mediatek,mt7986-pinctrl.yaml | 46 +++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) commit d77a82d677fa19fc5a062dcaf9cea375cb83f226 Author: Frank Wunderlich Date: Sun Nov 6 09:01:08 2022 +0100 dt-bindings: pinctrl: update pcie/pwm/spi bindings for MT7986 SoC Allow multiple items for pcie, pwm and spi function. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221106080114.7426-2-linux@fw-web.de Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 6c98ac42120dcadd799f0660e7d15cd6b5d0073e Author: Jonathan Neuschäfer Date: Sat Nov 5 19:59:05 2022 +0100 pinctrl: nuvoton: wpcm450: Fix handling of inverted MFSEL bits SCS3SEL and KBCCSEL use inverted logic: Whereas in other fields 0 selects the GPIO function and 1 selects the special function, in these two fields, 0 selects the special function and 1 selects the GPIO function. Adjust the code to handle this quirk. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221105185911.1547847-3-j.neuschaefer@gmx.net Signed-off-by: Linus Walleij drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 4f1d423cd2bd0d8cc20dfbb8d2e4e14b1e417790 Author: Jonathan Neuschäfer Date: Sat Nov 5 19:59:04 2022 +0100 pinctrl: nuvoton: wpcm450: Refactor MFSEL setting code In preparation for the next patch, which makes the logic around setting/resetting bits in MFSEL a little more complicated, move that code to a new function Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221105185911.1547847-2-j.neuschaefer@gmx.net Signed-off-by: Linus Walleij drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 742859441d44be4b408274206244011a09618a91 Author: Yoshihiro Shimoda Date: Tue Nov 8 09:55:00 2022 +0900 phy: renesas: Add Renesas Ethernet SERDES driver for R-Car S4-8 Add Renesas Ethernet SERDES driver for R-Car S4-8 (r8a779f0). The datasheet describes initialization procedure without any information about registers' name/bits. So, this is all black magic to initialize the hardware. Especially, all channels should be initialized at once. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221108005500.3011449-3-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul drivers/phy/renesas/Kconfig | 8 + drivers/phy/renesas/Makefile | 1 + drivers/phy/renesas/r8a779f0-ether-serdes.c | 417 ++++++++++++++++++++++++++++ 3 files changed, 426 insertions(+) commit d7abac084536b6d7efcc0c1edc7d9035c34314d9 Author: Yoshihiro Shimoda Date: Tue Nov 8 09:54:59 2022 +0900 dt-bindings: phy: renesas: Document Renesas Ethernet SERDES Document Renesas Etherent SERDES for R-Car S4-8 (r8a779f0). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221108005500.3011449-2-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul .../phy/renesas,r8a779f0-ether-serdes.yaml | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 188224534f85e951abad4fd375b0344779cb06ed Author: Alistair Francis Date: Wed Oct 26 21:49:07 2022 +1000 ARM: imx_v6_v7_defconfig: Enable the cyttsp5 touchscreen The imx6/7 based devices Remarkable 2, Kobo Clara HD, Kobo Libra H2O, Tolino Shine 3, Tolino Vision 5 all contain a Cypress TT2100 touchscreen so enable the corresponding driver. Signed-off-by: Alistair Francis Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 883aebf6e1ea88145d64dcf940dbcb5181313338 Author: Manivannan Sadhasivam Date: Wed Nov 2 13:48:35 2022 +0530 phy: qcom-qmp-pcie: Fix sm8450_qmp_gen4x2_pcie_pcs_tbl[] register names sm8450_qmp_gen4x2_pcie_pcs_tbl[] contains the init sequence for PCS registers of QMP PHY v5.20. So use the v5.20 specific register names. Only major change is the rename of PCS_EQ_CONFIG{2/3} registers to PCS_EQ_CONFIG{4/5}. Fixes: 2c91bf6bf290 ("phy: qcom-qmp: Add SM8450 PCIe1 PHY support") Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20221102081835.41892-2-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++---- drivers/phy/qualcomm/phy-qcom-qmp-pcs-v5_20.h | 14 ++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 1 + 3 files changed, 19 insertions(+), 4 deletions(-) commit 9ddcd920f8edfe65c3670fbd0b49db00e1e562fe Author: Manivannan Sadhasivam Date: Wed Nov 2 13:48:34 2022 +0530 phy: qcom-qmp-pcie: Fix high latency with 4x2 PHY when ASPM is enabled The PCIe QMP 4x2 RC PHY generates high latency when ASPM is enabled. This seem to be fixed by clearing the QPHY_V5_20_PCS_PCIE_PRESET_P10_POST register of the pcs_misc register space. Fixes: 2c91bf6bf290 ("phy: qcom-qmp: Add SM8450 PCIe1 PHY support") Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20221102081835.41892-1-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 1 + drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v5_20.h | 1 + 2 files changed, 2 insertions(+) commit 764afecbbcd26bea57fcd928680d413b2c851590 Author: Ville Syrjälä Date: Wed Oct 26 14:39:06 2022 +0300 drm/i915: Create resized LUTs for ivb+ split gamma mode Currently when opeating in split gamma mode we do the "skip ever other sw LUT entry" trick in the low level LUT programming/readout functions. That is very annoying and a big hinderance to revamping the color management uapi. Let's get rid of that problem by making half sized copies of the software LUTs and plugging those into the internal {pre,post}_csc_lut attachment points (instead of the sticking the uapi provide sw LUTs there directly). With this the low level stuff will operate purely in terms the hardware LUT sizes, and all uapi nonsense is contained to the atomic check phase. The one thing we do lose is intel_color_assert_luts() since we no longer have a way to check that the uapi LUTs were correctly used when generating the internal copies. But that seems like a price worth paying. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-12-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal drivers/gpu/drm/i915/display/intel_color.c | 81 +++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 17 deletions(-) commit 2584068a9ef4a7bff3b9302dd058a4c95ce68631 Author: Christian Marangi Date: Thu Nov 3 22:21:24 2022 +0100 phy: qcom-qmp-pcie: split pcs_misc init cfg for ipq8074 pcs table Commit af6643242d3a ("phy: qcom-qmp-pcie: split pcs_misc region for ipq6018 pcie gen3") reworked the pcs regs values and removed the 0x400 offset for each pcs_misc regs. This change caused the malfunction of ipq8074 downstream since it still has the legacy pcs table where pcs_misc are not placed on a different table and instead put together assuming the offset of 0x400 for the related pcs_misc regs. Split pcs_misc init cfg from the ipq8074 pcs init table to be handled correctly to prepare for actual support for gen3 pcie for ipq8074. Fixes: af6643242d3a ("phy: qcom-qmp-pcie: split pcs_misc region for ipq6018 pcie gen3") Reported-by: Robert Marko Tested-by: Robert Marko Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20221103212125.17156-1-ansuelsmth@gmail.com Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 6c37a02b25180350ed7bd199c074a79fe6d16e51 Author: Johan Hovold Date: Sat Nov 5 15:59:39 2022 +0100 phy: qcom-qmp-pcie: add support for sc8280xp 4-lane PHYs The PCIe2 and PCIe3 controllers and PHYs on SC8280XP can be used in 4-lane mode or as separate controllers and PHYs in 2-lane mode (e.g. as PCIe2A and PCIe2B). Add support for fetching the 4-lane configuration from the TCSR and programming the lane registers of the second port when in 4-lane mode. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-17-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/Kconfig | 1 + drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 117 +++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) commit d0a846ba28ddb589fc5a5741ae566e19c1034034 Author: Johan Hovold Date: Sat Nov 5 15:59:38 2022 +0100 phy: qcom-qmp-pcie: add support for sc8280xp Add support for the single and dual-lane PHYs found on SC8280XP. Note that the SC8280XP binding does not try to describe every register subregion and instead the driver holds the corresponding offsets. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-16-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 299 +++++++++++++++++++++++- drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v5.h | 2 + 2 files changed, 291 insertions(+), 10 deletions(-) commit 9e420f1e7eddbbb6b73a78aca2c280ddd8a63096 Author: Johan Hovold Date: Sat Nov 5 15:59:37 2022 +0100 phy: qcom-qmp-pcie: add support for pipediv2 clock Some QMP PHYs have a second fixed-divider pipe clock that needs to be enabled along with the pipe clock. Add support for an optional "pipediv2" clock. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-15-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit fffdeaf853d8088c5149fc776974344b0f815dc8 Author: Johan Hovold Date: Sat Nov 5 15:59:36 2022 +0100 phy: qcom-qmp-pcie: fix initialisation reset Add the missing delay after asserting reset. This is specifically needed for the reset to have any effect on SC8280XP. The vendor driver uses a 1 ms delay, but that seems a bit excessive. Instead use a 200 us delay which appears to be more than enough and also matches the UFS reset delay added by commit 870b1279c7a0 ("scsi: ufs-qcom: Add reset control support for host controller"). Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-14-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 ++ 1 file changed, 2 insertions(+) commit 7bc609e34899dd3065fc9cbc73bb8a4902e257df Author: Johan Hovold Date: Sat Nov 5 15:59:35 2022 +0100 phy: qcom-qmp-pcie: restructure PHY creation In preparation for supporting devicetree bindings which do not use a child node, move the PHY creation to probe() proper and parse the serdes resource in what is now the legacy devicetree helper. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-13-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 36 +++++++++++++++----------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit 306382305c5cefce892784da8686c242956f5fd2 Author: Johan Hovold Date: Sat Nov 5 15:59:34 2022 +0100 dt-bindings: phy: qcom,qmp-pcie: add sc8280xp bindings Add bindings for the PCIe QMP PHYs found on SC8280XP. The PCIe2 and PCIe3 controllers and PHYs on SC8280XP can be used in 4-lane mode or as separate controllers and PHYs in 2-lane mode (e.g. as PCIe2A and PCIe2B). The configuration for a specific system can be read from a TCSR register. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-12-johan+linaro@kernel.org Signed-off-by: Vinod Koul .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 165 +++++++++++++++++++++ 1 file changed, 165 insertions(+) commit dcb93f47dd14cb0c206424b3258399b4cd205b20 Author: Johan Hovold Date: Sat Nov 5 15:59:33 2022 +0100 dt-bindings: phy: qcom,qmp-pcie: rename current bindings The current QMP PCIe PHY bindings are based on the original MSM8996 binding which provided multiple PHYs per IP block and these in turn were described by child nodes. Later QMP PCIe PHY blocks only provide a single PHY and the remnant child node does not really reflect the hardware. The original MSM8996 binding also ended up describing the individual register blocks as belonging to either the wrapper node or the PHY child nodes. This is an unnecessary level of detail which has lead to problems when later IP blocks using different register layouts have been forced to fit the original mould rather than updating the binding. The bindings are arguable also incomplete as they only the describe register blocks used by the current Linux drivers (e.g. does not include the per lane PCS registers). In preparation for adding new bindings for SC8280XP which further bindings can be based on, rename the current schema file after IPQ8074, which was the first SoC added to the bindings after MSM8996 (which has already been split out), and add a reference to the SC8280XP bindings. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-11-johan+linaro@kernel.org Signed-off-by: Vinod Koul .../phy/{qcom,qmp-pcie-phy.yaml => qcom,ipq8074-qmp-pcie-phy.yaml} | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ec7bc1b40b363c46af0b17d4cb0ea4dc21b7cf9b Author: Johan Hovold Date: Sat Nov 5 15:59:32 2022 +0100 phy: qcom-qmp-pcie: add register init helper Generalise the serdes initialisation helper so that it can be used to initialise all the PHY registers (e.g. serdes, tx, rx, pcs). Note that this defers the ungating of the PIPE clock somewhat, which is fine as it isn't needed until starting the PHY. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 37 +++++++------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) commit d8c9a1e9c223951836692eb8c3810e18ae06ffc2 Author: Johan Hovold Date: Sat Nov 5 15:59:31 2022 +0100 phy: qcom-qmp-pcie: use shorter tables identifiers The QMP drivers all use 'tbl' to refer to their register initialisation tables. For consistency use 'tbls' rather than 'tables' to refer to the new aggregate table structures. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221105145939.20318-9-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 90 ++++++++++++++++---------------- 1 file changed, 45 insertions(+), 45 deletions(-) commit f8b641146484b6be33c291fa8279ffe423e169d9 Author: Johan Hovold Date: Sat Nov 5 15:59:30 2022 +0100 phy: qcom-qmp-pcie: clean up PHY lane init Clean up the PHY lane initialisation somewhat by adding further temporary variables and programming both tx and rx for the second lane after the first lane. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-8-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 63bf101ae1912570260912087bfd7b1cf420c3dc Author: Johan Hovold Date: Sat Nov 5 15:59:29 2022 +0100 phy: qcom-qmp-pcie: rename PHY ops structure Rename the PHY operation structure so that it has a "phy_ops" suffix and move it next to the implementation. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 52b997732eb6bf64df242403c7510520d89be266 Author: Johan Hovold Date: Sat Nov 5 15:59:28 2022 +0100 phy: qcom-qmp-pcie: clean up probe initialisation Stop abusing the driver data pointer and instead pass the driver state structure directly to the initialisation helpers during probe. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 49 +++++++++++++++----------------- 1 file changed, 23 insertions(+), 26 deletions(-) commit 393ed5d515494250712dd1703418bb541765afe3 Author: Johan Hovold Date: Sat Nov 5 15:59:27 2022 +0100 phy: qcom-qmp-pcie: clean up device-tree parsing Since the QMP driver split there will be at most a single child node so drop the obsolete iteration construct. While at it, drop the verbose error logging that would have been printed also on probe deferrals. Note that there's no need to check if there are additional child nodes (the kernel is not a devicetree validator), but let's return an error if there are no child nodes at all for now. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-5-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 34 +++++++++----------------------- 1 file changed, 9 insertions(+), 25 deletions(-) commit 2fdedef3ea8e8a1a68a1da6eee1537074b308f63 Author: Johan Hovold Date: Sat Nov 5 15:59:26 2022 +0100 phy: qcom-qmp-pcie: merge driver data The PCIe QMP PHY driver only manages a single PHY so merge the old qcom_qmp and qmp_phy structures and drop the PHY array. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 218 +++++++++++++------------------ 1 file changed, 88 insertions(+), 130 deletions(-) commit cebc6ca76e400a90cb7cbc9f96f26966167f5b6f Author: Johan Hovold Date: Sat Nov 5 15:59:25 2022 +0100 phy: qcom-qmp-pcie: move device-id table Move the device-id table below probe() and next to the driver structure to keep the driver callback functions grouped together. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 90 ++++++++++++++++---------------- 1 file changed, 45 insertions(+), 45 deletions(-) commit 253b642eec936974cc709ebb6bed83786c391279 Author: Johan Hovold Date: Sat Nov 5 15:59:24 2022 +0100 phy: qcom-qmp-pcie: sort device-id table Sort the device-id table by compatible string to make it easier to find and add new entries. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221105145939.20318-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 00a34d5a99c0631bd780b14cbe3813d0b39c3886 Author: Gerald Schaefer Date: Tue Jul 19 11:08:37 2022 +0200 s390: select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP Enable HUGETLB_PAGE_OPTIMIZE_VMEMMAP for s390. With this, vmemmap pages used to back struct pages for compound tail pages of hugetlb pages are freed and remapped to compound head page frame as RO, see also Documentation/vm/vmemmap_dedup.rst. For 1M hugetlb pages, this results in freeing 3 of 4 vmemmap pages, saving 12K of memory for each 1M hugetlb page (~1.2%). /sys/kernel/debug/kernel_page_tables will show the impact: ---[ vmemmap Area Start ]--- [...] 0x0000037202d84000-0x0000037202d85000 4K PTE RW NX 0x0000037202d85000-0x0000037202d88000 12K PTE RO NX For 2G hugetlb pages, this results in freeing 8191 of 8192 vmemmap pages, saving 32764K of memory for each 2G hugetlb page (~1.6%) /sys/kernel/debug/kernel_page_tables will show the impact: ---[ vmemmap Area Start ]--- [...] 0x000003720a000000-0x000003720a001000 4K PTE RW NX 0x000003720a001000-0x000003720c000000 32764K PTE RO NX The memory savings come with some costs: - vmemmap mapping for compound hugetlb pages is not a PMD mapping any more, but split to 4K PTE mappings, and it will not be coalesced back to PMD mapping after freeing hugetlb pages from the pool. Apart from theoretical performance impact, this will also (slightly) relativize the memory savings because of additional 2K PTE pagetable allocations. - Workload using "on the fly" hugetlb allocations via "nr_overcommit_hugepages" instead of using the hugetlb pool via "nr_hugepages" will suffer from considerably increased fault handling time, see also description from commit 78f39084b41d ("mm: hugetlb_vmemmap: add hugetlb_optimize_vmemmap sysctl"). - Freeing hugetlb pages from the pool will require re-allocation of the freed struct pages, and therefore needs some memory available to the kernel. This might fail in memory constrained scenarios. - For the same reason, memory offline might fail even for ZONE_MOVABLE when hugetlb pages are present (but not for s390, since we do not support ARCH_ENABLE_HUGEPAGE_MIGRATION, and therefore cannot have hugetlb pages in ZONE_MOVABLE). - General increased complexity and overhead in kernel handling of compound (head) pages. Therefore, this feature is disabled by default, and has to be enabled explicitly either by adding "hugetlb_free_vmemmap=on" kernel parameter, or during run-time via "/proc/sys/vm/hugetlb_optimize_vmemmap" sysctl. Acked-by: Heiko Carstens Signed-off-by: Gerald Schaefer Signed-off-by: Alexander Gordeev arch/s390/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 28c66cfa45388af1126985d1114e0ed762eb2abd Author: Ajay Sharma Date: Thu Nov 3 12:16:29 2022 -0700 net: mana: Define data structures for protection domain and memory registration The MANA hardware support protection domain and memory registration for use in RDMA environment. Add those definitions and expose them for use by the RDMA driver. Signed-off-by: Ajay Sharma Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-12-git-send-email-longli@linuxonhyperv.com Reviewed-by: Dexuan Cui Acked-by: Haiyang Zhang Signed-off-by: Leon Romanovsky drivers/net/ethernet/microsoft/mana/gdma_main.c | 27 ++++-- drivers/net/ethernet/microsoft/mana/mana_en.c | 18 ++-- include/net/mana/gdma.h | 121 +++++++++++++++++++++++- 3 files changed, 143 insertions(+), 23 deletions(-) commit f72ececfc197e9b0bbb5595294908a950cf444fa Author: Long Li Date: Thu Nov 3 12:16:28 2022 -0700 net: mana: Define data structures for allocating doorbell page from GDMA The RDMA device needs to allocate doorbell pages for each user context. Define the GDMA data structures for use by the RDMA driver. Reviewed-by: Dexuan Cui Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-11-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang Signed-off-by: Leon Romanovsky include/net/mana/gdma.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit de372f2a9ca7ada2698ecac7df8f02407cd98fa0 Author: Ajay Sharma Date: Thu Nov 3 12:16:27 2022 -0700 net: mana: Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES When doing memory registration, the PF may respond with GDMA_STATUS_MORE_ENTRIES to indicate a follow request is needed. This is not an error and should be processed as expected. Signed-off-by: Ajay Sharma Reviewed-by: Dexuan Cui Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-10-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang Signed-off-by: Leon Romanovsky drivers/net/ethernet/microsoft/mana/hw_channel.c | 2 +- include/net/mana/gdma.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit aa56549792fb348892fbbae67f6f0c71bb750b65 Author: Long Li Date: Thu Nov 3 12:16:26 2022 -0700 net: mana: Define max values for SGL entries The number of maximum SGl entries should be computed from the maximum WQE size for the intended queue type and the corresponding OOB data size. This guarantees the hardware queue can successfully queue requests up to the queue depth exposed to the upper layer. Reviewed-by: Dexuan Cui Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-9-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang Signed-off-by: Leon Romanovsky drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +- include/net/mana/gdma.h | 7 +++++++ include/net/mana/mana.h | 4 +--- 3 files changed, 9 insertions(+), 4 deletions(-) commit fd325cd648f15eb9a8b32a68de3bafc72bcfe753 Author: Long Li Date: Thu Nov 3 12:16:25 2022 -0700 net: mana: Move header files to a common location In preparation to add MANA RDMA driver, move all the required header files to a common location for use by both Ethernet and RDMA drivers. Reviewed-by: Dexuan Cui Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-8-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang Signed-off-by: Leon Romanovsky MAINTAINERS | 1 + drivers/net/ethernet/microsoft/mana/gdma_main.c | 2 +- drivers/net/ethernet/microsoft/mana/hw_channel.c | 4 ++-- drivers/net/ethernet/microsoft/mana/mana_bpf.c | 2 +- drivers/net/ethernet/microsoft/mana/mana_en.c | 4 ++-- drivers/net/ethernet/microsoft/mana/mana_ethtool.c | 2 +- drivers/net/ethernet/microsoft/mana/shm_channel.c | 2 +- {drivers/net/ethernet/microsoft => include/net}/mana/gdma.h | 0 {drivers/net/ethernet/microsoft => include/net}/mana/hw_channel.h | 0 {drivers/net/ethernet/microsoft => include/net}/mana/mana.h | 0 {drivers/net/ethernet/microsoft => include/net}/mana/mana_auxiliary.h | 0 {drivers/net/ethernet/microsoft => include/net}/mana/shm_channel.h | 0 12 files changed, 9 insertions(+), 8 deletions(-) commit d44089e555ffe63a49cc6e94d0c03d933e413059 Author: Long Li Date: Thu Nov 3 12:16:24 2022 -0700 net: mana: Record port number in netdev The port number is useful for user-mode application to identify this net device based on port index. Set to the correct value in ndev. Reviewed-by: Dexuan Cui Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-7-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang Signed-off-by: Leon Romanovsky drivers/net/ethernet/microsoft/mana/mana_en.c | 1 + 1 file changed, 1 insertion(+) commit 4c0ff7a106e16ab63e0b597557255c012f179578 Author: Long Li Date: Thu Nov 3 12:16:23 2022 -0700 net: mana: Export Work Queue functions for use by RDMA driver RDMA device may need to create Ethernet device queues for use by Queue Pair type RAW. This allows a user-mode context accesses Ethernet hardware queues. Export the supporting functions for use by the RDMA driver. Reviewed-by: Dexuan Cui Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-6-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang Signed-off-by: Leon Romanovsky drivers/net/ethernet/microsoft/mana/gdma_main.c | 1 + drivers/net/ethernet/microsoft/mana/mana.h | 9 +++++++++ drivers/net/ethernet/microsoft/mana/mana_en.c | 16 +++++++++------- 3 files changed, 19 insertions(+), 7 deletions(-) commit 6fe254160bd033a1e62dbad9b734183b31144678 Author: Ajay Sharma Date: Thu Nov 3 12:16:22 2022 -0700 net: mana: Set the DMA device max segment size MANA hardware doesn't have any restrictions on the DMA segment size, set it to the max allowed value. Signed-off-by: Ajay Sharma Reviewed-by: Dexuan Cui Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-5-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang Signed-off-by: Leon Romanovsky drivers/net/ethernet/microsoft/mana/gdma_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b5c1c9855be3b5b978fde975a63df3cabc273faa Author: Long Li Date: Thu Nov 3 12:16:21 2022 -0700 net: mana: Handle vport sharing between devices For outgoing packets, the PF requires the VF to configure the vport with corresponding protection domain and doorbell ID for the kernel or user context. The vport can't be shared between different contexts. Implement the logic to exclusively take over the vport by either the Ethernet device or RDMA device. Reviewed-by: Dexuan Cui Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-4-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang Signed-off-by: Leon Romanovsky drivers/net/ethernet/microsoft/mana/mana.h | 7 ++++ drivers/net/ethernet/microsoft/mana/mana_en.c | 53 ++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) commit f3dc096246091048677c45cfc0e24ad512927b52 Author: Long Li Date: Thu Nov 3 12:16:20 2022 -0700 net: mana: Record the physical address for doorbell page region For supporting RDMA device with multiple user contexts with their individual doorbell pages, record the start address of doorbell page region for use by the RDMA driver to allocate user context doorbell IDs. Reviewed-by: Dexuan Cui Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-3-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang Signed-off-by: Leon Romanovsky drivers/net/ethernet/microsoft/mana/gdma.h | 2 ++ drivers/net/ethernet/microsoft/mana/gdma_main.c | 4 ++++ 2 files changed, 6 insertions(+) commit a69839d4327d053b18d8e1b0e7ddeee78db78f4f Author: Long Li Date: Thu Nov 3 12:16:19 2022 -0700 net: mana: Add support for auxiliary device In preparation for supporting MANA RDMA driver, add support for auxiliary device in the Ethernet driver. The RDMA device is modeled as an auxiliary device to the Ethernet device. Reviewed-by: Dexuan Cui Signed-off-by: Long Li Link: https://lore.kernel.org/r/1667502990-2559-2-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang Signed-off-by: Leon Romanovsky drivers/net/ethernet/microsoft/Kconfig | 1 + drivers/net/ethernet/microsoft/mana/gdma.h | 2 + .../net/ethernet/microsoft/mana/mana_auxiliary.h | 10 +++ drivers/net/ethernet/microsoft/mana/mana_en.c | 83 +++++++++++++++++++++- 4 files changed, 95 insertions(+), 1 deletion(-) commit c7028aa2fb03597e85ad2ac1ad0ac319ace00418 Merge: fd74b79df0d1 5e5dc33d5dac Author: Martin KaFai Lau Date: Wed Nov 9 20:57:16 2022 -0800 Merge branch 'fix panic bringing up veth with xdp progs' John Fastabend says: ==================== Not sure if folks want to take this through BPF tree or networking tree. I took a quick look and didn't see any pending fixes so seems no one has noticed the panic yet. It reproducible and easy to repro. I put bpf in the title thinking it woudl be great to run through the BPF selftests given its XDP triggering the panic. Sorry maintainers resent with CC'ing actual lists. Had a scripting issue. Also dropped henqqi has they are bouncing. Thanks! ==================== Signed-off-by: Martin KaFai Lau commit 5e5dc33d5dacb34b0165061bc5a10efd2fd3b66f Author: John Fastabend Date: Tue Nov 8 14:16:50 2022 -0800 bpf: veth driver panics when xdp prog attached before veth_open The following panic is observed when bringing up (veth_open) a veth device that has an XDP program attached. [ 61.519185] kernel BUG at net/core/dev.c:6442! [ 61.519456] invalid opcode: 0000 [#1] PREEMPT SMP PTI [ 61.519752] CPU: 0 PID: 408 Comm: ip Tainted: G W 6.1.0-rc2-185930-gd9095f92950b-dirty #26 [ 61.520288] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 [ 61.520806] RIP: 0010:napi_enable+0x3d/0x40 [ 61.521077] Code: f6 f6 80 61 08 00 00 02 74 0d 48 83 bf 88 01 00 00 00 74 03 80 cd 01 48 89 d0 f0 48 0f b1 4f 10 48 39 c2 75 c8 c3 cc cc cc cc <0f> 0b 90 48 8b 87 b0 00 00 00 48 81 c7 b0 00 00 00 45 31 c0 48 39 [ 61.522226] RSP: 0018:ffffbc9800cc36f8 EFLAGS: 00010246 [ 61.522557] RAX: 0000000000000001 RBX: 0000000000000300 RCX: 0000000000000001 [ 61.523004] RDX: 0000000000000010 RSI: ffffffff8b0de852 RDI: ffff9f03848e5000 [ 61.523452] RBP: 0000000000000000 R08: 0000000000000800 R09: 0000000000000000 [ 61.523899] R10: ffff9f0384a96800 R11: ffffffffffa48061 R12: ffff9f03849c3000 [ 61.524345] R13: 0000000000000300 R14: ffff9f03848e5000 R15: 0000001000000100 [ 61.524792] FS: 00007f58cb64d2c0(0000) GS:ffff9f03bbc00000(0000) knlGS:0000000000000000 [ 61.525301] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 61.525673] CR2: 00007f6cc629b498 CR3: 000000010498c000 CR4: 00000000000006f0 [ 61.526121] Call Trace: [ 61.526284] [ 61.526425] __veth_napi_enable_range+0xd6/0x230 [ 61.526723] veth_enable_xdp+0xd0/0x160 [ 61.526969] veth_open+0x2e/0xc0 [ 61.527180] __dev_open+0xe2/0x1b0 [ 61.527405] __dev_change_flags+0x1a1/0x210 [ 61.527673] dev_change_flags+0x1c/0x60 This happens because we are calling veth_napi_enable() on already enabled queues. The root cause is in commit 2e0de6366ac16 changed the control logic dropping this case, if (priv->_xdp_prog) { err = veth_enable_xdp(dev); if (err) return err; - } else if (veth_gro_requested(dev)) { + /* refer to the logic in veth_xdp_set() */ + if (!rtnl_dereference(peer_rq->napi)) { + err = veth_napi_enable(peer); + if (err) + return err; + } so that now veth_napi_enable is called if the peer has not yet initialiazed its peer_rq->napi. The issue is this will happen even if the NIC is not up. Then in veth_enable_xdp just above we have similar path, veth_enable_xdp napi_already_on = (dev->flags & IFF_UP) && rcu_access_pointer(rq->napi) err = veth_enable_xdp_range(dev, 0, dev->real_num_rx_queues, napi_already_on); The trouble is an xdp prog is assigned before bringing the device up each of the veth_open path will enable the peers xdp napi structs. But then when we bring the peer up it will similar try to enable again because from veth_open the IFF_UP flag is not set until after the op in __dev_open so we believe napi_alread_on = false. To fix this just drop the IFF_UP test and rely on checking if the napi struct is enabled. This also matches the peer check in veth_xdp for disabling. To reproduce run ./test_xdp_meta.sh I found adding Cilium/Tetragon tests for XDP. Fixes: 2e0de6366ac16 ("veth: Avoid drop packets when xdp_redirect performs") Signed-off-by: John Fastabend Link: https://lore.kernel.org/r/20221108221650.808950-2-john.fastabend@gmail.com Acked-by: Jakub Kicinski Signed-off-by: Martin KaFai Lau drivers/net/veth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd74b79df0d1c9506583d0b52e3d7562a38ac34a Author: Domenico Cerasuolo Date: Wed Nov 9 10:40:39 2022 -0800 selftests: Fix test group SKIPPED result When showing the result of a test group, if one of the subtests was skipped, while still having passing subtests, the group result was marked as SKIP. E.g.: 223/1 usdt/basic:SKIP 223/2 usdt/multispec:OK 223/3 usdt/urand_auto_attach:OK 223/4 usdt/urand_pid_attach:OK 223 usdt:SKIP The test result of usdt in the example above should be OK instead of SKIP, because the test group did have passing tests and it would be considered in "normal" state. With this change, only if all of the subtests were skipped, the group test is marked as SKIP. When only some of the subtests are skipped, a more detailed result is given, stating how many of the subtests were skipped. E.g: 223/1 usdt/basic:SKIP 223/2 usdt/multispec:OK 223/3 usdt/urand_auto_attach:OK 223/4 usdt/urand_pid_attach:OK 223 usdt:OK (SKIP: 1/4) Signed-off-by: Domenico Cerasuolo Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221109184039.3514033-1-cerasuolodomenico@gmail.com tools/testing/selftests/bpf/test_progs.c | 38 ++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 15157d2e008dd6ac72e0d03281acf22007324b8d Merge: e5659e4e19e4 99e18fad5ff7 Author: Andrii Nakryiko Date: Wed Nov 9 20:12:00 2022 -0800 Merge branch 'libbpf: Resolve unambigous forward declarations' Eduard Zingerman says: ==================== The patch-set is consists of the following parts: - An update for libbpf's hashmap interface from void* -> void* to a polymorphic one, allowing to use both long and void* keys and values w/o additional casts. Interface functions are hidden behind auxiliary macro that add casts as necessary. This simplifies many use cases in libbpf as hashmaps there are mostly integer to integer and required awkward looking incantations like `(void *)(long)off` previously. Also includes updates for perf as it copies map implementation from libbpf. - A change to `lib/bpf/btf.c:btf__dedup` that adds a new pass named "Resolve unambiguous forward declaration". This pass builds a hashmap `name_off -> uniquely named struct or union` and uses it to replace FWD types by structs or unions. This is necessary for corner cases when FWD is not used as a part of some struct or union definition de-duplicated by `btf_dedup_struct_types`. The goal of the patch-set is to resolve forward declarations that don't take part in type graphs comparisons if declaration name is unambiguous. Example: CU #1: struct foo; // standalone forward declaration struct foo *some_global; CU #2: struct foo { int x; }; struct foo *another_global; Currently the de-duplicated BTF for this example looks as follows: [1] STRUCT 'foo' size=4 vlen=1 ... [2] INT 'int' size=4 ... [3] PTR '(anon)' type_id=1 [4] FWD 'foo' fwd_kind=struct [5] PTR '(anon)' type_id=4 The goal of this patch-set is to simplify it as follows: [1] STRUCT 'foo' size=4 vlen=1 'x' type_id=2 bits_offset=0 [2] INT 'int' size=4 bits_offset=0 nr_bits=32 encoding=SIGNED [3] PTR '(anon)' type_id=1 For defconfig kernel with BTF enabled this removes 63 forward declarations. For allmodconfig kernel with BTF enabled this removes ~5K out of ~21K forward declarations in ko objects. This unlocks some additional de-duplication in ko objects, but impact is tiny: ~13K less BTF ids out of ~2M. Changelog: v3 -> v4 Changes suggested by Andrii: - hashmap interface rework to allow use of integer and pointer keys an values w/o casts as suggested in [1]. v2 -> v3 Changes suggested by Andrii: - perf's util/hashtable.{c,h} are synchronized with libbpf implementation, perf's source code updated accordingly; - changes to libbpf, bpf selftests and perf are combined in a single patch to simplify bisecting; - hashtable interface updated to be long -> long instead of uintptr_t -> uintptr_t; - btf_dedup_resolve_fwds updated to correctly use IS_ERR / PTR_ERR macro; - test cases for btf_dedup_resolve_fwds are updated for better clarity. v1 -> v2 - Style fixes in btf_dedup_resolve_fwd and btf_dedup_resolve_fwds as suggested by Alan. [v1] https://lore.kernel.org/bpf/20221102110905.2433622-1-eddyz87@gmail.com/ [v2] https://lore.kernel.org/bpf/20221103033430.2611623-1-eddyz87@gmail.com/ [v3] https://lore.kernel.org/bpf/20221106202910.4193104-1-eddyz87@gmail.com/ [1] https://lore.kernel.org/bpf/CAEf4BzZ8KFneEJxFAaNCCFPGqp20hSpS2aCj76uRk3-qZUH5xg@mail.gmail.com/ ==================== Signed-off-by: Andrii Nakryiko commit 99e18fad5ff79eea2ea9ec7e6d800b286552e005 Author: Eduard Zingerman Date: Wed Nov 9 16:26:11 2022 +0200 selftests/bpf: Tests for btf_dedup_resolve_fwds Tests to verify the following behavior of `btf_dedup_resolve_fwds`: - remapping for struct forward declarations; - remapping for union forward declarations; - no remapping if forward declaration kind does not match similarly named struct or union declaration; - no remapping if forward declaration name is ambiguous; - base ids are considered for fwd resolution in split btf scenario. Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Reviewed-by: Alan Maguire Link: https://lore.kernel.org/bpf/20221109142611.879983-4-eddyz87@gmail.com tools/testing/selftests/bpf/prog_tests/btf.c | 176 +++++++++++++++++++++ .../selftests/bpf/prog_tests/btf_dedup_split.c | 45 ++++-- 2 files changed, 206 insertions(+), 15 deletions(-) commit 082108fd6932772deb7e329f118687b4c03fc6a5 Author: Eduard Zingerman Date: Wed Nov 9 16:26:10 2022 +0200 libbpf: Resolve unambigous forward declarations Resolve forward declarations that don't take part in type graphs comparisons if declaration name is unambiguous. Example: CU #1: struct foo; // standalone forward declaration struct foo *some_global; CU #2: struct foo { int x; }; struct foo *another_global; The `struct foo` from CU #1 is not a part of any definition that is compared against another definition while `btf_dedup_struct_types` processes structural types. The the BTF after `btf_dedup_struct_types` the BTF looks as follows: [1] STRUCT 'foo' size=4 vlen=1 ... [2] INT 'int' size=4 ... [3] PTR '(anon)' type_id=1 [4] FWD 'foo' fwd_kind=struct [5] PTR '(anon)' type_id=4 This commit adds a new pass `btf_dedup_resolve_fwds`, that maps such forward declarations to structs or unions with identical name in case if the name is not ambiguous. The pass is positioned before `btf_dedup_ref_types` so that types [3] and [5] could be merged as a same type after [1] and [4] are merged. The final result for the example above looks as follows: [1] STRUCT 'foo' size=4 vlen=1 'x' type_id=2 bits_offset=0 [2] INT 'int' size=4 bits_offset=0 nr_bits=32 encoding=SIGNED [3] PTR '(anon)' type_id=1 For defconfig kernel with BTF enabled this removes 63 forward declarations. Examples of removed declarations: `pt_regs`, `in6_addr`. The running time of `btf__dedup` function is increased by about 3%. Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Reviewed-by: Alan Maguire Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221109142611.879983-3-eddyz87@gmail.com tools/lib/bpf/btf.c | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 139 insertions(+), 4 deletions(-) commit c302378bc157f6a73b6cae4ca67f5f6aa931dcec Author: Eduard Zingerman Date: Wed Nov 9 16:26:09 2022 +0200 libbpf: Hashmap interface update to allow both long and void* keys/values An update for libbpf's hashmap interface from void* -> void* to a polymorphic one, allowing both long and void* keys and values. This simplifies many use cases in libbpf as hashmaps there are mostly integer to integer. Perf copies hashmap implementation from libbpf and has to be updated as well. Changes to libbpf, selftests/bpf and perf are packed as a single commit to avoid compilation issues with any future bisect. Polymorphic interface is acheived by hiding hashmap interface functions behind auxiliary macros that take care of necessary type casts, for example: #define hashmap_cast_ptr(p) \ ({ \ _Static_assert((p) == NULL || sizeof(*(p)) == sizeof(long),\ #p " pointee should be a long-sized integer or a pointer"); \ (long *)(p); \ }) bool hashmap_find(const struct hashmap *map, long key, long *value); #define hashmap__find(map, key, value) \ hashmap_find((map), (long)(key), hashmap_cast_ptr(value)) - hashmap__find macro casts key and value parameters to long and long* respectively - hashmap_cast_ptr ensures that value pointer points to a memory of appropriate size. This hack was suggested by Andrii Nakryiko in [1]. This is a follow up for [2]. [1] https://lore.kernel.org/bpf/CAEf4BzZ8KFneEJxFAaNCCFPGqp20hSpS2aCj76uRk3-qZUH5xg@mail.gmail.com/ [2] https://lore.kernel.org/bpf/af1facf9-7bc8-8a3d-0db4-7b3f333589a2@meta.com/T/#m65b28f1d6d969fcd318b556db6a3ad499a42607d Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221109142611.879983-2-eddyz87@gmail.com tools/bpf/bpftool/btf.c | 25 +-- tools/bpf/bpftool/common.c | 10 +- tools/bpf/bpftool/gen.c | 19 +-- tools/bpf/bpftool/link.c | 10 +- tools/bpf/bpftool/main.h | 14 +- tools/bpf/bpftool/map.c | 10 +- tools/bpf/bpftool/pids.c | 16 +- tools/bpf/bpftool/prog.c | 10 +- tools/lib/bpf/btf.c | 41 +++-- tools/lib/bpf/btf_dump.c | 15 +- tools/lib/bpf/hashmap.c | 18 +- tools/lib/bpf/hashmap.h | 90 ++++++---- tools/lib/bpf/libbpf.c | 18 +- tools/lib/bpf/strset.c | 18 +- tools/lib/bpf/usdt.c | 28 ++- tools/perf/tests/expr.c | 28 ++- tools/perf/tests/pmu-events.c | 6 +- tools/perf/util/bpf-loader.c | 11 +- tools/perf/util/evsel.c | 2 +- tools/perf/util/expr.c | 36 ++-- tools/perf/util/hashmap.c | 18 +- tools/perf/util/hashmap.h | 90 ++++++---- tools/perf/util/metricgroup.c | 10 +- tools/perf/util/stat-shadow.c | 2 +- tools/perf/util/stat.c | 9 +- tools/testing/selftests/bpf/prog_tests/hashmap.c | 190 +++++++++++++++------ .../selftests/bpf/prog_tests/kprobe_multi_test.c | 6 +- 27 files changed, 410 insertions(+), 340 deletions(-) commit a607fe5ea21324a91f03301194bfcda1df2108a6 Author: Bjorn Andersson Date: Sat Jul 30 12:36:17 2022 -0700 arm64: dts: qcom: sc8280xp-x13s: Add LID switch Add gpio-keys for exposing the LID switch state. Signed-off-by: Bjorn Andersson Reviewed-by: Johan Hovold Tested-by: Johan Hovold Reviewed-by: Konrad Dybcio Tested-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220730193617.1688563-1-bjorn.andersson@linaro.org .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 0bc33727c491dfe07e19a11f1610f0a632e0e935 Author: Krzysztof Kozlowski Date: Wed Nov 9 11:51:40 2022 +0100 ARM: dts: qcom-msm8960-cdp: 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: Konrad Dybcio [bjorn: Fixed up expected typo in cs-pins function] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221109105140.48196-3-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-msm8960-cdp.dts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 33c21ece867e845123a5c10d4384aea58cf6a21a Author: Krzysztof Kozlowski Date: Wed Nov 9 11:51:39 2022 +0100 ARM: dts: qcom-msm8960: use define for interrupt constants Replace GIC_PPI, GIC_SPI and interrupt type numbers with appropriate defines. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221109105140.48196-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-msm8960-cdp.dts | 2 +- arch/arm/boot/dts/qcom-msm8960.dtsi | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) commit e29edc475f65ec439c468c85d3c81fac1d19ab61 Merge: 21780f89d658 85a2b4ac3444 Author: Jakub Kicinski Date: Wed Nov 9 19:28:52 2022 -0800 Merge branch 'clean-up-pcs-xpcs-accessors' Russell King says: ==================== Clean up pcs-xpcs accessors This series cleans up the pcs-xpcs code to use mdiodev accessors for read/write just like xpcs_modify_changed() does. In order to do this, we need to introduce the mdiodev clause 45 accessors. ==================== Link: https://lore.kernel.org/r/Y2pm13+SDg6N/IVx@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 85a2b4ac34449ed5610301e05dab0f7f9efe278b Author: Russell King (Oracle) Date: Tue Nov 8 14:26:01 2022 +0000 net: pcs: xpcs: use mdiodev accessors Use mdiodev accessors rather than accessing the bus and address in the mdio_device structure and using the mdiobus accessors. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/pcs/pcs-xpcs.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit f6479ea4e5990e17b9690d66474198dcdba1b2c1 Author: Russell King (Oracle) Date: Tue Nov 8 14:25:56 2022 +0000 net: mdio: add mdiodev_c45_(read|write) Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski include/linux/mdio.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 21780f89d65837e23fef825c79aa836c1cb3a8e9 Author: Andy Shevchenko Date: Tue Nov 8 16:11:08 2022 +0200 mac_pton: Don't access memory over expected length The strlen() may go too far when estimating the length of the given string. In some cases it may go over the boundary and crash the system which is the case according to the commit 13a55372b64e ("ARM: orion5x: Revert commit 4904dbda41c8."). Rectify this by switching to strnlen() for the expected maximum length of the string. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221108141108.62974-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski lib/net_utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1c3c31a6e7f6b467c160a4c58e385b2991e49139 Author: Krzysztof Kozlowski Date: Tue Nov 8 15:23:57 2022 +0100 arm64: dts: qcom: ipq8074: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221108142357.67202-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/ipq8074.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 78043031281bbb31f89b66128982f404bcde94e8 Author: Srinivasa Rao Mandadapu Date: Tue Nov 8 20:16:02 2022 +0530 arm64: dts: qcom: sc7280: Remove redundant soundwire property Remove redundant and undocumented property qcom,port-offset in soundwire controller nodes. This patch is required to avoid dtbs_check errors with qcom,soundwire.yaml Fixes: 12ef689f09ab ("arm64: dts: qcom: sc7280: Add nodes for soundwire and va tx rx digital macro codecs") Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Ratna Deepthi Kudaravalli Signed-off-by: Ratna Deepthi Kudaravalli Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1667918763-32445-4-git-send-email-quic_srivasam@quicinc.com arch/arm64/boot/dts/qcom/sc7280.dtsi | 1 - 1 file changed, 1 deletion(-) commit 837f597ebc529b2dce6451da27f24d93ebe194c8 Author: Srinivasa Rao Mandadapu Date: Tue Nov 8 20:16:01 2022 +0530 arm64: dts: qcom: sm8250: Remove redundant soundwire property Remove redundant and undocumented property qcom,port-offset in soundwire controller nodes. This patch is required to avoid dtbs_check errors with qcom,soundwire.yaml Fixes: 24f52ef0c4bf ("arm64: dts: qcom: sm8250: Add nodes for tx and rx macros with soundwire masters") Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Ratna Deepthi Kudaravalli Signed-off-by: Ratna Deepthi Kudaravalli Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1667918763-32445-3-git-send-email-quic_srivasam@quicinc.com arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 - 1 file changed, 1 deletion(-) commit bd35f4b0179692cacc8cd80aece56012b3b36c69 Author: Srinivasa Rao Mandadapu Date: Tue Nov 8 20:16:00 2022 +0530 arm64: dts: qcom: Update soundwire secondary node names Update soundwire secondary nodes of WSA speaker to match with dt-bindings pattern properties regular expression. This modification is required to avoid dtbs-check errors occurred with qcom,soundwire.yaml. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Ratna Deepthi Kudaravalli Signed-off-by: Ratna Deepthi Kudaravalli Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1667918763-32445-2-git-send-email-quic_srivasam@quicinc.com arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 4 ++-- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 4 ++-- arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 4 ++-- arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts | 4 ++-- arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) commit d4d4a7c4fd5f1b802ccf329edf11a3ade69b55e0 Author: Alex Elder Date: Tue Nov 8 14:16:25 2022 -0600 arm64: dts: qcom: sc7280-idp: don't modify &ipa twice In "sc7280-idp.dts", the IPA node is modified after being defined. However that file includes "sc7280-idp.dtsi", which also modifies the IPA node (in the same way). This only needs to be done in "sc7280-idp.dtsi". Signed-off-by: Alex Elder Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221108201625.1220919-1-elder@linaro.org arch/arm64/boot/dts/qcom/sc7280-idp.dts | 5 ----- 1 file changed, 5 deletions(-) commit 13bd85580b85768238cf726dec0ddd89c06a230a Author: Tan Tee Min Date: Tue Nov 8 18:15:27 2022 +0800 net: phy: dp83867: add TI PHY loopback The existing genphy_loopback() is not working for TI DP83867 PHY as it will disable autoneg support while another side is still enabling autoneg. This is causing the link is not established and results in timeout error in genphy_loopback() function. Thus, based on TI PHY datasheet, introduce a TI PHY loopback function by just configuring BMCR_LOOPBACK(Bit-9) in MII_BMCR register (0x0). Tested working on TI DP83867 PHY for all speeds (10/100/1000Mbps). Signed-off-by: Tan Tee Min Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20221108101527.612723-1-michael.wei.hong.sit@intel.com Signed-off-by: Jakub Kicinski drivers/net/phy/dp83867.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 470765e4e1c813564bfc00f53b78896d7f336424 Merge: 0cb9ed57d5ad 9045220581fc Author: Jakub Kicinski Date: Wed Nov 9 19:20:16 2022 -0800 Merge branch 'net-lan743x-pci11010-pci11414-devices-enhancements' Raju Lakkaraju says: ==================== net: lan743x: PCI11010 / PCI11414 devices Enhancements This patch series continues with the addition of supported features for the Ethernet function of the PCI11010 / PCI11414 devices to the LAN743x driver. ==================== Link: https://lore.kernel.org/r/20221107085650.991470-1-Raju.Lakkaraju@microchip.com Signed-off-by: Jakub Kicinski commit 9045220581fc2b39bfe9a410c7b5fcd491128f23 Author: Raju Lakkaraju Date: Mon Nov 7 14:26:50 2022 +0530 net: lan743x: Add support to SGMII register dump for PCI11010/PCI11414 chips Add support to SGMII register dump Signed-off-by: Raju Lakkaraju Reviewed-by: Horatiu Vultur Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan743x_ethtool.c | 107 ++++++++++++++++++++++- drivers/net/ethernet/microchip/lan743x_ethtool.h | 71 ++++++++++++++- drivers/net/ethernet/microchip/lan743x_main.c | 2 +- drivers/net/ethernet/microchip/lan743x_main.h | 1 + 4 files changed, 177 insertions(+), 4 deletions(-) commit 925638a2a0372f3d9d447fa714dfd0561b87a058 Author: Raju Lakkaraju Date: Mon Nov 7 14:26:49 2022 +0530 net: lan743x: Remove unused argument in lan743x_common_regs( ) Remove the unused argument (i.e. struct ethtool_regs *regs) in lan743x_common_regs( ) function arguments. Signed-off-by: Raju Lakkaraju Reviewed-by: Horatiu Vultur Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan743x_ethtool.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4a66e76fdb6d0c742ad13db45888c14a9c1ef1a9 Author: Bjorn Andersson Date: Mon Sep 26 13:38:00 2022 -0700 clk: qcom: Add SC8280XP display clock controller The Qualcomm SC8280XP platform has two display clock controller instances, add support for these. Duplication between the two implementations is reduced by reusing any constant data between the two sets of clock data. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Tested-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220926203800.16771-3-quic_bjorande@quicinc.com drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/dispcc-sc8280xp.c | 3218 ++++++++++++++++++++++++++++++++++++ 3 files changed, 3228 insertions(+) commit 73d9c10a96e52aaa2cd19806ac127a3a0e87c410 Author: Bjorn Andersson Date: Mon Sep 26 13:37:59 2022 -0700 dt-bindings: clock: Add Qualcomm SC8280XP display clock bindings The Qualcomm SC8280XP platform has two display clock controllers, add a binding for these. Signed-off-by: Bjorn Andersson Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220926203800.16771-2-quic_bjorande@quicinc.com .../bindings/clock/qcom,dispcc-sc8280xp.yaml | 97 ++++++++++++++++++++ include/dt-bindings/clock/qcom,dispcc-sc8280xp.h | 100 +++++++++++++++++++++ 2 files changed, 197 insertions(+) commit cccbe3e528bebcba9e9c33cde7fb4f4344524c93 Author: Maulik Shah Date: Tue Oct 18 17:28:37 2022 +0200 soc: qcom: rpmh-rsc: Write CONTROL_TCS with next timer wakeup The next wakeup timer value needs to be set in always on domain timer as the arch timer interrupt can not wakeup the SoC if after the deepest CPUidle states the SoC also enters deepest low power state. To wakeup the SoC in such scenarios the earliest wakeup time is set in CONTROL_TCS and the firmware takes care of setting up its own timer in always on domain with next wakeup time. The timer wakes up the RSC and sets resources back to wake state. Signed-off-by: Maulik Shah Reviewed-by: Ulf Hansson Tested-by: Dmitry Baryshkov # SM8450 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221018152837.619426-7-ulf.hansson@linaro.org drivers/soc/qcom/rpmh-internal.h | 3 ++ drivers/soc/qcom/rpmh-rsc.c | 61 ++++++++++++++++++++++++++++++++++++++++ drivers/soc/qcom/rpmh.c | 4 ++- 3 files changed, 67 insertions(+), 1 deletion(-) commit 2ffa0ca4d37a1fef0b423f32007067fbce8708a3 Author: Maulik Shah Date: Tue Oct 18 17:28:34 2022 +0200 arm64: dts: qcom: Add power-domains property for apps_rsc Add power-domains property which allows apps_rsc device to attach to cluster power domain on sm8150, sm8250, sm8350 and sm8450. Signed-off-by: Maulik Shah Reviewed-by: Ulf Hansson Tested-by: Dmitry Baryshkov # SM8450 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221018152837.619426-4-ulf.hansson@linaro.org arch/arm64/boot/dts/qcom/sm8150.dtsi | 1 + arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 + arch/arm64/boot/dts/qcom/sm8350.dtsi | 1 + arch/arm64/boot/dts/qcom/sm8450.dtsi | 1 + 4 files changed, 4 insertions(+) commit ab33c8f3a8325eb2343534968c38e35d8129be87 Author: Maulik Shah Date: Tue Oct 18 17:28:36 2022 +0200 soc: qcom: rpmh-rsc: Save base address of drv Add changes to save drv's base address for rsc. This is used to read drv's configuration such as solver mode is supported or to write into CONTROL_TCS registers. Signed-off-by: Maulik Shah Reviewed-by: Ulf Hansson Tested-by: Dmitry Baryshkov # SM8450 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221018152837.619426-6-ulf.hansson@linaro.org drivers/soc/qcom/rpmh-internal.h | 2 ++ drivers/soc/qcom/rpmh-rsc.c | 18 ++++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 1498c503e19e587dbc26c8827633960a67594359 Author: Maulik Shah Date: Tue Oct 18 17:28:35 2022 +0200 PM: domains: Store the next hrtimer wakeup in genpd The arch timer cannot wake up the Qualcomm Technologies, Inc. (QTI) SoCs from the deeper CPUidle states. To be able to wakeup from these deeper states, another always-on timer needs to be programmed through the so called CONTROL_TCS. As the RSC is part of CPU subsystem and the corresponding APSS RSC device is attached to the cluster PM domain (through genpd), it holds the responsibility to program the always-on timer, before entering any of these deeper CPUidle states. However, programming the timer requires information about the next hrtimer wakeup for the cluster PM domain, which is currently only known by genpd. Therefore, let's share this data through a new genpd helper function, dev_pm_genpd_get_next_hrtimer(). Signed-off-by: Maulik Shah Cc: "Rafael J. Wysocki" [Ulf: Reworked the code and updated the commit message] Signed-off-by: Ulf Hansson Tested-by: Dmitry Baryshkov # SM8450 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221018152837.619426-5-ulf.hansson@linaro.org drivers/base/power/domain.c | 26 ++++++++++++++++++++++++++ drivers/base/power/domain_governor.c | 3 +++ include/linux/pm_domain.h | 7 +++++++ 3 files changed, 36 insertions(+) commit 25092e6100acd7fcc72deed2583e63db683bb872 Author: Lina Iyer Date: Tue Oct 18 17:28:33 2022 +0200 soc: qcom: rpmh-rsc: Attach RSC to cluster PM domain RSC is part the CPU subsystem and powers off the CPU domains when all the CPUs and no RPMH transactions are pending from any of the drivers. The RSC needs to flush the 'sleep' and 'wake' votes that are critical for saving power when all the CPUs are in idle. Let's make RSC part of the CPU PM domains, by attaching it to the cluster power domain. Registering for PM domain notifications, RSC driver can be notified that the last CPU is powering down. When the last CPU is powering down the domain, let's flush the 'sleep' and 'wake' votes that are stored in the data buffers into the hardware and also write next wakeup in CONTROL_TCS. Signed-off-by: Lina Iyer Signed-off-by: Maulik Shah Reviewed-by: Ulf Hansson Tested-by: Dmitry Baryshkov # SM8450 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221018152837.619426-3-ulf.hansson@linaro.org drivers/soc/qcom/rpmh-internal.h | 4 ++- drivers/soc/qcom/rpmh-rsc.c | 67 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 66 insertions(+), 5 deletions(-) commit 144560b070121d7b368a3c8da60c3c84484fc218 Author: Maulik Shah Date: Tue Oct 18 17:28:32 2022 +0200 dt-bindings: soc: qcom: Update devicetree binding document for rpmh-rsc The change documents power-domains property for RSC device. This optional property points to corresponding PM domain node. Signed-off-by: Maulik Shah Acked-by: Rob Herring Reviewed-by: Ulf Hansson Tested-by: Dmitry Baryshkov # SM8450 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221018152837.619426-2-ulf.hansson@linaro.org Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 0cb9ed57d5ad2e25b45ed5c3afbac6e875ac1754 Merge: bf9b85562a9a cdbde7edf0e5 Author: Jakub Kicinski Date: Wed Nov 9 19:06:19 2022 -0800 Merge branch 'mlxsw-add-802-1x-and-mab-offload-support' Petr Machata says: ==================== mlxsw: Add 802.1X and MAB offload support This patchset adds 802.1X [1] and MAB [2] offload support in mlxsw. Patches #1-#3 add the required switchdev interfaces. Patches #4-#5 add the required packet traps for 802.1X. Patches #6-#10 are small preparations in mlxsw. Patch #11 adds locked bridge port support in mlxsw. Patches #12-#15 add mlxsw selftests. The patchset was also tested with the generic forwarding selftest ('bridge_locked_port.sh'). [1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=a21d9a670d81103db7f788de1a4a4a6e4b891a0b [2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=a35ec8e38cdd1766f29924ca391a01de20163931 ==================== Link: https://lore.kernel.org/r/cover.1667902754.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit cdbde7edf0e53b643b1323e05bc1ca99661f6bcd Author: Ido Schimmel Date: Tue Nov 8 11:47:21 2022 +0100 selftests: mlxsw: Add a test for invalid locked bridge port configurations Test that locked bridge port configurations that are not supported by mlxsw are rejected. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski .../selftests/drivers/net/mlxsw/rtnetlink.sh | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit fb398432db2f66f46714b855354c79223649e3ab Author: Ido Schimmel Date: Tue Nov 8 11:47:20 2022 +0100 selftests: mlxsw: Add a test for locked port trap Test that packets received via a locked bridge port whose {SMAC, VID} does not appear in the bridge's FDB or appears with a different port, trigger the "locked_port" packet trap. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski .../drivers/net/mlxsw/devlink_trap_l2_drops.sh | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) commit 25a26f0c2015be5e23ac467ba825085aaa01a0f0 Author: Ido Schimmel Date: Tue Nov 8 11:47:19 2022 +0100 selftests: mlxsw: Add a test for EAPOL trap Test that packets with a destination MAC of 01:80:C2:00:00:03 trigger the "eapol" packet trap. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski .../drivers/net/mlxsw/devlink_trap_control.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit da23a713d1de1f07675fd96418c0dd060c3633b6 Author: Ido Schimmel Date: Tue Nov 8 11:47:18 2022 +0100 selftests: devlink_lib: Split out helper Merely checking whether a trap counter incremented or not without logging a test result is useful on its own. Split this functionality to a helper which will be used by subsequent patches. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski tools/testing/selftests/net/forwarding/devlink_lib.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 25ed80884ce11e38d1d611c49f1d1aa3e49a1e08 Author: Ido Schimmel Date: Tue Nov 8 11:47:17 2022 +0100 mlxsw: spectrum_switchdev: Add locked bridge port support Add locked bridge port support by reacting to changes in the 'BR_PORT_LOCKED' flag. When set, enable security checks on the local port via the previously added SPFSR register. When security checks are enabled, an incoming packet will trigger an FDB lookup with the packet's source MAC and the FID it was classified to. If an FDB entry was not found or was found to be pointing to a different port, the packet will be dropped. Such packets increment the "discard_ingress_general" ethtool counter. For added visibility, user space can trap such packets to the CPU by enabling the "locked_port" trap. Example: # devlink trap set pci/0000:06:00.0 trap locked_port action trap Unlike other configurations done via bridge port flags (e.g., learning, flooding), security checks are enabled in the device on a per-port basis and not on a per-{port, VLAN} basis. As such, scenarios where user space can configure different locking settings for different VLANs configured on a port need to be vetoed. To that end, veto the following scenarios: 1. Locking is set on a bridge port that is a VLAN upper 2. Locking is set on a bridge port that has VLAN uppers 3. VLAN upper is configured on a locked bridge port Examples: # bridge link set dev swp1.10 locked on Error: mlxsw_spectrum: Locked flag cannot be set on a VLAN upper. # ip link add link swp1 name swp1.10 type vlan id 10 # bridge link set dev swp1 locked on Error: mlxsw_spectrum: Locked flag cannot be set on a bridge port that has VLAN uppers. # bridge link set dev swp1 locked on # ip link add link swp1 name swp1.10 type vlan id 10 Error: mlxsw_spectrum: VLAN uppers are not supported on a locked port. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++++ .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 23 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) commit 136b8dfbd784e8aa86e1bb9ade7fc41927a3839e Author: Ido Schimmel Date: Tue Nov 8 11:47:16 2022 +0100 mlxsw: spectrum_switchdev: Use extack in bridge port flag validation Propagate extack to mlxsw_sp_port_attr_br_pre_flags_set() in order to communicate error messages related to bridge port flag validation. Example: # bridge link set dev swp1 locked on Error: mlxsw_spectrum: Unsupported bridge port flag. More error messages will be added in subsequent patches. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 5a660e43f8b9f6e48c980dd3fed519152d5c68ca Author: Ido Schimmel Date: Tue Nov 8 11:47:15 2022 +0100 mlxsw: spectrum_switchdev: Add support for locked FDB notifications In Spectrum, learning happens in parallel to the security checks. Therefore, regardless of the result of the security checks, a learning notification will be generated by the device and polled later on by the driver. Currently, the driver reacts to learning notifications by programming corresponding FDB entries to the device. When a port is locked (i.e., has security checks enabled), this can no longer happen, as otherwise any host will blindly gain authorization. Instead, notify the learned entry as a locked entry to the bridge driver that will in turn notify it to user space, in case MAB is enabled. User space can then decide to authorize the host by clearing the "locked" flag, which will cause the entry to be programmed to the device. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b72cb660b26be4aaa89bb597a0ce83dd68da07e2 Author: Ido Schimmel Date: Tue Nov 8 11:47:14 2022 +0100 mlxsw: spectrum_switchdev: Prepare for locked FDB notifications Subsequent patches will need to report locked FDB entries to the bridge driver. Prepare for that by adding a 'locked' argument to mlxsw_sp_fdb_call_notifiers() according to which the 'locked' bit is set in the FDB notification info. For now, always pass 'false'. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit dc0d1a8b7f84ca09b53af356eb401df9e3d976a0 Author: Ido Schimmel Date: Tue Nov 8 11:47:13 2022 +0100 mlxsw: spectrum: Add an API to configure security checks Add an API to enable or disable security checks on a local port. It will be used by subsequent patches when the 'BR_PORT_LOCKED' flag is toggled. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 18 ++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit 0b31fb9ba2b54896b0fe4b1ec0102031c40bdf4f Author: Ido Schimmel Date: Tue Nov 8 11:47:12 2022 +0100 mlxsw: reg: Add Switch Port FDB Security Register Add the Switch Port FDB Security Register (SPFSR) that allows enabling and disabling security checks on a given local port. In Linux terms, it allows locking / unlocking a port. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/reg.h | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit d85be0f5fd7c9e7aaf4a1e50cd65d447377eeb49 Author: Ido Schimmel Date: Tue Nov 8 11:47:11 2022 +0100 mlxsw: spectrum_trap: Register 802.1X packet traps with devlink Register the previously added packet traps with devlink. This allows user space to tune their policers and in the case of the locked port trap, user space can set its action to "trap" in order to gain visibility into packets that were discarded by the device due to the locked port check failure. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/reg.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_trap.c | 25 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/trap.h | 2 ++ 3 files changed, 28 insertions(+) commit 2640a82bbc08393c846c7b55178079bb8ca31a8c Author: Ido Schimmel Date: Tue Nov 8 11:47:10 2022 +0100 devlink: Add packet traps for 802.1X operation Add packet traps for 802.1X operation. The "eapol" control trap is used to trap EAPOL packets and is required for the correct operation of the control plane. The "locked_port" drop trap can be enabled to gain visibility into packets that were dropped by the device due to the locked bridge port check. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski Documentation/networking/devlink/devlink-trap.rst | 13 +++++++++++++ include/net/devlink.h | 9 +++++++++ net/core/devlink.c | 3 +++ 3 files changed, 25 insertions(+) commit 9c0ca02bace4837d123e1a5a30f6f44dbdc5fb92 Author: Ido Schimmel Date: Tue Nov 8 11:47:09 2022 +0100 bridge: switchdev: Reflect MAB bridge port flag to device drivers Reflect the 'BR_PORT_MAB' flag to device drivers so that: * Drivers that support MAB could act upon the flag being toggled. * Drivers that do not support MAB will prevent MAB from being enabled. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Reviewed-by: Vladimir Oltean Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br_switchdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27fabd02abf30a9df9899f92d467591c7eabb1ba Author: Hans J. Schultz Date: Tue Nov 8 11:47:08 2022 +0100 bridge: switchdev: Allow device drivers to install locked FDB entries When the bridge is offloaded to hardware, FDB entries are learned and aged-out by the hardware. Some device drivers synchronize the hardware and software FDBs by generating switchdev events towards the bridge. When a port is locked, the hardware must not learn autonomously, as otherwise any host will blindly gain authorization. Instead, the hardware should generate events regarding hosts that are trying to gain authorization and their MAC addresses should be notified by the device driver as locked FDB entries towards the bridge driver. Allow device drivers to notify the bridge driver about such entries by extending the 'switchdev_notifier_fdb_info' structure with the 'locked' bit. The bit can only be set by device drivers and not by the bridge driver. Prevent a locked entry from being installed if MAB is not enabled on the bridge port. If an entry already exists in the bridge driver, reject the locked entry if the current entry does not have the "locked" flag set or if it points to a different port. The same semantics are implemented in the software data path. Signed-off-by: Hans J. Schultz Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Reviewed-by: Vladimir Oltean Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski include/net/switchdev.h | 1 + net/bridge/br.c | 3 ++- net/bridge/br_fdb.c | 22 ++++++++++++++++++++-- net/bridge/br_private.h | 2 +- net/bridge/br_switchdev.c | 4 ++++ 5 files changed, 28 insertions(+), 4 deletions(-) commit 9baedc3c8780256bfc68d318c31d0081cefe92a3 Author: Ido Schimmel Date: Tue Nov 8 11:47:07 2022 +0100 bridge: switchdev: Let device drivers determine FDB offload indication Currently, FDB entries that are notified to the bridge via 'SWITCHDEV_FDB_ADD_TO_BRIDGE' are always marked as offloaded. With MAB enabled, this will no longer be universally true. Device drivers will report locked FDB entries to the bridge to let it know that the corresponding hosts required authorization, but it does not mean that these entries are necessarily programmed in the underlying hardware. Solve this by determining the offload indication based of the 'offloaded' bit in the FDB notification. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Reviewed-by: Vladimir Oltean Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski net/bridge/br.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3417b7a7cd7ca42a7ad0e38e6c6f5bc49250efa Author: Jon Hunter Date: Wed Nov 2 11:13:42 2022 +0000 arm64: defconfig: Enable Tegra186 timer support Enable Tegra186 timer support which is needed for Tegra186, Tegra194 and Tegra234 devices. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 0474cc8489bda9a8cd6a10252e7e6af29c849438 Author: Petlozu Pravareshwar Date: Sun Oct 2 14:44:09 2022 +0000 soc/tegra: pmc: Process wake events during resume During system resume, translate tier2 SC7 wake sources back into IRQs and do generic_handle_irq() to invoke the interrupt handlers for edge triggered wake events such as SW-wake. Signed-off-by: Prathamesh Shete Signed-off-by: Petlozu Pravareshwar Signed-off-by: Thierry Reding drivers/soc/tegra/pmc.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 1ddb8f6d44ff482c9953a06f800453bc372cfead Author: Petlozu Pravareshwar Date: Fri Sep 30 16:14:52 2022 +0000 soc/tegra: pmc: Fix dual edge triggered wakes When a wake event is defined to be triggered on both positive and negative edge of the input wake signal, it is crucial to know the current state of the signal when going into suspend. The intended way to obtain the current state of the wake signals is to read the WAKE_AOWAKE_SW_STATUS register, which should contains the raw state of the wake signals. However, this register is edge triggered, an edge will not be generated for signals that are already asserted prior to the assertion of WAKE_LATCH_SW. To workaround this, change the polarity of the wake level from '0' to '1' while latching the signals, as this will generate an edge for signals that are set to '1'. Signed-off-by: Stefan Kristiansson Signed-off-by: Petlozu Pravareshwar Signed-off-by: Thierry Reding drivers/soc/tegra/pmc.c | 181 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 176 insertions(+), 5 deletions(-) commit c9c4ddb20c427b19c6a2a1787bf82c7b2aac25c3 Author: Petlozu Pravareshwar Date: Fri Sep 30 16:02:13 2022 +0000 soc/tegra: pmc: Add I/O pad table for Tegra234 Add I/O pad table for Tegra234 to allow configuring DPD mode and switching the pins to 1.8V or 3.3V as needed. On Tegra234, DPD registers are reorganized such that there is a DPD_REQ register and a DPD_STATUS register per pad group. Update the PMC driver accordingly. While at it, use the generated tables from tegra-pinmux-scripts to make the formatting of these tables more consistent. Signed-off-by: Petlozu Pravareshwar [treding@nvidia.com: generate tables from tegra-pinmux-scripts] Signed-off-by: Thierry Reding drivers/soc/tegra/pmc.c | 656 +++++++++++++++++++++++++++++------------------- include/soc/tegra/pmc.h | 6 +- 2 files changed, 406 insertions(+), 256 deletions(-) commit f38044e5ef58ad0346fdabd7027ea5c1e1a3b624 Author: Joao Martins Date: Tue Oct 25 20:31:14 2022 +0100 vfio/iova_bitmap: Fix PAGE_SIZE unaligned bitmaps iova_bitmap_set() doesn't consider the end of the page boundary when the first bitmap page offset isn't zero, and wrongly changes the consecutive page right after. Consequently this leads to missing dirty pages from reported by the device as seen from the VMM. The current logic iterates over a given number of base pages and clamps it to the remaining indexes to iterate in the last page. Instead of having to consider extra pages to pin (e.g. first and extra pages), just handle the first page as its own range and let the rest of the bitmap be handled as if it was base page aligned. This is done by changing iova_bitmap_mapped_remaining() to return PAGE_SIZE - pgoff (on the first bitmap page), and leads to pgoff being set to 0 on following iterations. Fixes: 58ccf0190d19 ("vfio: Add an IOVA bitmap support") Reported-by: Avihai Horon Tested-by: Avihai Horon Signed-off-by: Joao Martins Link: https://lore.kernel.org/r/20221025193114.58695-3-joao.m.martins@oracle.com Signed-off-by: Alex Williamson drivers/vfio/iova_bitmap.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ea00d4ededcd8639f9e814513426cfeccdd3aaf0 Author: Joao Martins Date: Tue Oct 25 20:31:13 2022 +0100 vfio/iova_bitmap: Explicitly include linux/slab.h kzalloc/kzfree are used so include `slab.h`. While it happens to work without it, due to commit 8b9f3ac5b01d ("fs: introduce alloc_inode_sb() to allocate filesystems specific inode") which indirectly includes via: . ./include/linux/mm.h .. ./include/linux/huge_mm.h ... ./include/linux/fs.h .... ./include/linux/slab.h Make it explicit should any of its indirect dependencies be dropped/changed for entirely different reasons as it was the cause prior to commit above recently (i.e. <= v5.18). Signed-off-by: Joao Martins Link: https://lore.kernel.org/r/20221025193114.58695-2-joao.m.martins@oracle.com Signed-off-by: Alex Williamson drivers/vfio/iova_bitmap.c | 1 + 1 file changed, 1 insertion(+) commit e67e070632a665c932d534b8b800477bb3111449 Author: Rafael Mendonca Date: Tue Oct 18 12:28:25 2022 -0300 vfio: platform: Do not pass return buffer to ACPI _RST method The ACPI _RST method has no return value, there's no need to pass a return buffer to acpi_evaluate_object(). Fixes: d30daa33ec1d ("vfio: platform: call _RST method when using ACPI") Signed-off-by: Rafael Mendonca Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20221018152825.891032-1-rafaelmendsr@gmail.com Signed-off-by: Alex Williamson drivers/vfio/platform/vfio_platform_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cd48ebc5c4f2e94830b238f035ebf04f1c3a4433 Author: Shang XiaoJing Date: Thu Sep 22 20:35:07 2022 +0800 vfio/mlx5: Switch to use module_pci_driver() macro Since pci provides the helper macro module_pci_driver(), we may replace the module_init/exit with it. Signed-off-by: Shang XiaoJing Reviewed-by: Yishai Hadas Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20220922123507.11222-1-shangxiaojing@huawei.com Signed-off-by: Alex Williamson drivers/vfio/pci/mlx5/main.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit a39a1466dae5e3ed0dd7c03334a60894e4d1f334 Author: Palmer Dabbelt Date: Thu Oct 13 14:46:36 2022 -0700 MAINTAINERS: git://github -> https://github.com for awilliam Github deprecated the git:// links about a year ago, so let's move to the https:// URLs instead. Reported-by: Conor Dooley Link: https://github.blog/2021-09-01-improving-git-protocol-security-github/ Signed-off-by: Palmer Dabbelt Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/20221013214636.30721-1-palmer@rivosinc.com Signed-off-by: Alex Williamson MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa382ffa705bea9931ec92b6f3c70e1fdb372195 Author: Sascha Hauer Date: Tue Nov 8 17:05:59 2022 -0600 PCI/sysfs: Fix double free in error path When pci_create_attr() fails, pci_remove_resource_files() is called which will iterate over the res_attr[_wc] arrays and frees every non NULL entry. To avoid a double free here set the array entry only after it's clear we successfully initialized it. Fixes: b562ec8f74e4 ("PCI: Don't leak memory if sysfs_create_bin_file() fails") Link: https://lore.kernel.org/r/20221007070735.GX986@pengutronix.de/ Signed-off-by: Sascha Hauer Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org drivers/pci/pci-sysfs.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d1a372af1c3d834c2346b2e822cd6c40abc09866 Author: Felix Kuehling Date: Fri Aug 26 18:22:35 2022 -0400 drm/amdgpu: Set MTYPE in PTE based on BO flags The same BO may need different MTYPEs and SNOOP flags in PTEs depending on its current location relative to the mapping GPU. Setting MTYPEs from clients ahead of time is not practical for coherent memory sharing. Instead determine the correct MTYPE for the desired coherence model and current BO location when updating the page tables. To maintain backwards compatibility with MTYPE-selection in AMDGPU_VA_OP_MAP, the coherence-model-based MTYPE selection is only applied if it chooses an MTYPE other than MTYPE_NC (the default). Add two AMDGPU_GEM_CREATE_... flags to indicate the coherence model. The default if no flag is specified is non-coherent (i.e. coarse-grained coherent at dispatch boundaries). Update amdgpu_amdkfd_gpuvm.c to use this new method to choose the correct MTYPE depending on the current memory location. v2: * check that bo is not NULL (e.g. PRT mappings) * Fix missing ~ bitmask in gmc_v11_0.c v3: * squash in "drm/amdgpu: Inherit coherence flags on dmabuf import" Suggested-by: Christian König Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 59 +++--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 +- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 7 +++ drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 7 +++ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 79 +++++++++++++++++++++--- include/uapi/drm/amdgpu_drm.h | 14 +++++ 6 files changed, 110 insertions(+), 60 deletions(-) commit d852871c6dd17b19ae12354be1eaf7037ac79221 Author: Hamza Mahfooz Date: Wed Nov 9 12:06:27 2022 -0500 drm/amd/display: only fill dirty rectangles when PSR is enabled Currently, we are calling fill_dc_dirty_rects() even if PSR isn't supported by the relevant link in amdgpu_dm_commit_planes(), this is undesirable especially because when drm.debug is enabled we are printing messages in fill_dc_dirty_rects() that are only useful for debugging PSR (and confusing otherwise). So, we can instead limit the filling of dirty rectangles to only when PSR is enabled. Reviewed-by: Leo Li Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fcb4f9193ee550aad05c8d0f8f6637143e567c80 Author: LongJun Tang Date: Fri Nov 4 17:29:31 2022 +0800 drm/amd/display: Have risk for memory exhaustion In dcn*_clock_source_create when dcn*_clk_src_construct fails allocated clk_src needs release. A local attack could use this to cause memory exhaustion. Signed-off-by: LongJun Tang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 1 + 8 files changed, 8 insertions(+) commit e50db38342d5d2243e9738a51c9737cbb017e456 Author: Paulo Miguel Almeida Date: Mon Nov 7 22:32:51 2022 +1300 drm/amdgpu: Replace 1-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 structs _ATOM_GPIO_PIN_ASSIGNMENT, _ATOM_DISPLAY_OBJECT_PATH, _ATOM_DISPLAY_OBJECT_PATH_TABLE, _ATOM_OBJECT_TABLE and refactor the rest of the code accordingly. Important to mention is that doing a build before/after this patch results in no functional 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/238 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 23 +++++++++++++++-------- drivers/gpu/drm/amd/include/atombios.h | 8 ++++---- 2 files changed, 19 insertions(+), 12 deletions(-) commit 10276a20be1115e1f76c189330da2992df980eee Author: Hanjun Guo Date: Fri Nov 4 17:50:02 2022 +0800 drm/radeon: Add the missed acpi_put_table() to fix memory leak When the radeon driver reads the bios information from ACPI table in radeon_acpi_vfct_bios(), it misses to call acpi_put_table() to release the ACPI memory after the init, so add acpi_put_table() properly to fix the memory leak. v2: fix text formatting (Alex) Fixes: 268ba0a99f89 ("drm/radeon: implement ACPI VFCT vbios fetch (v3)") Signed-off-by: Hanjun Guo Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_bios.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 4b31b92b143f7d209f3d494c56d4c4673e9fc53d Author: Harsh Jain Date: Wed Nov 2 15:23:08 2022 +0530 drm/amdgpu: complete gfxoff allow signal during suspend without delay change guarantees that gfxoff is allowed before moving further in s2idle sequence to add more reliablity about gfxoff in amdgpu IP's suspend flow Signed-off-by: Harsh Jain Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 3b8164f8084ff7888ed24970efa230ff5d36eda8 Author: Luben Tuikov Date: Mon Nov 7 12:38:03 2022 -0500 drm/amdgpu: Decouple RAS EEPROM addresses from chips Abstract RAS I2C EEPROM addresses from chip names, and set their macro definition names to the address they set, not the chip they attach to. Since most chips either use I2C EEPROM address 0 or 40000h for the RAS table start offset, this leaves us with only two macro definitions as opposed to five, and removes the redundancy of four. Cc: Candice Li Cc: Tao Zhou Cc: Alex Deucher Signed-off-by: Luben Tuikov Reviewed-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit da858deab88eb561f2196bc99b6dbd2320e56456 Author: Luben Tuikov Date: Mon Nov 7 12:06:44 2022 -0500 drm/amdgpu: Remove redundant I2C EEPROM address Remove redundant EEPROM_I2C_MADDR_54H address, since we already have it represented (ARCTURUS), and since we don't include the I2C device type identifier in EEPROM memory addresses, i.e. that high up in the device abstraction--we only use EEPROM memory addresses, as memory is continuously represented by EEPROM device(s) on the I2C bus. Add a comment describing what these memory addresses are, how they come about and how they're usually extracted from the device address byte. Cc: Candice Li Cc: Tao Zhou Cc: Alex Deucher Fixes: c9bdc6c3cf39df ("drm/amdgpu: Add EEPROM I2C address support for ip discovery") Signed-off-by: Luben Tuikov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 24 +++++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) commit 43fca649e668f9f8f75a9d905de8c61bcf1d0986 Author: Ma Jun Date: Sun Nov 6 11:43:06 2022 +0800 drm/amdkfd: Make kfd_fill_cache_non_crat_info() as static kfd_fill_cache_non_crat_info() is only used in kfd_topology.c, so make it as static. Signed-off-by: Ma Jun Reviewed-by: Guchun Chen Reported-by: kernel test robot Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60cfad329ab877cb62975ea78ed442c2496990ba Author: Kenneth Feng Date: Tue Nov 8 08:30:36 2022 +0800 drm/amd/pm: enable mode1 reset on smu_v13_0_10 enable mode1 reset and prioritize debug port on smu_v13_0_10 as a more reliable message processing v2 - move mode1 reset callback to smu_v13_0_0_ppt.c Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 4 ++ .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 53 +++++++++++++++++++++- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 18 ++++++++ drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h | 3 ++ 5 files changed, 77 insertions(+), 2 deletions(-) commit 4cc16d64b6cdb179a26fb389cae9dce788e88f5d Author: Ma Jun Date: Sun Nov 6 20:34:27 2022 +0800 drm/amdkfd: Fix the memory overrun Fix the memory overrun issue caused by wrong array size. Signed-off-by: Ma Jun Reviewed-by: Felix Kuehling Reported-by: coverity-bot Addresses-Coverity-ID: 1527133 ("Memory - corruptions") Fixes: c0cc999f3c32e6 ("drm/amdkfd: Fix the warning of array-index-out-of-bounds") Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 407a5bdd5513a3617aa3f8a5c738561e157f8d83 Author: Guchun Chen Date: Mon Nov 7 16:46:59 2022 +0800 drm/amdgpu: disable BACO on special BEIGE_GOBY card Still avoid intermittent failure. Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Acked-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0bc71adc8b1b65a369d4b8ef098e74ed4aab62d9 Author: Philip Yang Date: Wed Nov 2 16:55:31 2022 -0400 drm/amdgpu: Drop eviction lock when allocating PT BO Re-take the eviction lock immediately again after the allocation is completed, to fix circular locking warning with drm_buddy allocator. Move amdgpu_vm_eviction_lock/unlock/trylock to amdgpu_vm.h as they are called from multiple files. Signed-off-by: Philip Yang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 26 -------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 2 ++ 3 files changed, 28 insertions(+), 26 deletions(-) commit c70e2166967dc4ecb5e3a9b162741a9726755d9b Author: Philip Yang Date: Thu Nov 3 10:24:52 2022 -0400 drm/amdgpu: Unlock bo_list_mutex after error handling Get below kernel WARNING backtrace when pressing ctrl-C to kill kfdtest application. If amdgpu_cs_parser_bos returns error after taking bo_list_mutex, as caller amdgpu_cs_ioctl will not unlock bo_list_mutex, this generates the kernel WARNING. Add unlock bo_list_mutex after amdgpu_cs_parser_bos error handling to cleanup bo_list userptr bo. WARNING: kfdtest/2930 still has locks held! 1 lock held by kfdtest/2930: (&list->bo_list_mutex){+.+.}-{3:3}, at: amdgpu_cs_ioctl+0xce5/0x1f10 [amdgpu] stack backtrace: dump_stack_lvl+0x44/0x57 get_signal+0x79f/0xd00 arch_do_signal_or_restart+0x36/0x7b0 exit_to_user_mode_prepare+0xfd/0x1b0 syscall_exit_to_user_mode+0x19/0x40 do_syscall_64+0x40/0x80 Signed-off-by: Philip Yang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 + 1 file changed, 1 insertion(+) commit e198e55b28202f78bca74feec9d568f4e96c6aab Author: Aric Cyr Date: Sun Oct 30 19:20:05 2022 -0400 drm/amd/display: 3.2.211 DC version 3.2.211 brings along the following fixes: - Wait for VBLANK during pipe programming - Adding HDMI SCDC DEVICE_ID define - Cursor update refactor: PSR-SU support condition - Update 709 gamma to 2.222 as stated in the standerd - Consider dp cable id only when data is non zero - Waiting for 1 frame to fix the flash issue on PSR1 - Update SR watermarks for DCN314 - Allow tuning DCN314 bounding box - Zeromem mypipe heap struct before using it - Use min transition for SubVP into MPO - Disable phantom OTG after enable for plane disable - Disable DRR actions during state commit - Fix fallback issues for DP LL 1.4a tests - Fix FCLK deviation and tool compile issues - Fix reg timeout in enc314_enable_fifo - Fix gpio port mapping issue - Only update link settings after successful MST link train - Enforce minimum prefetch time for low memclk on DCN32 - Set correct EOTF and Gamut flag in VRR info - Add margin for max vblank time for SubVP + DRR - Populate DP2.0 output type for DML pipe Acked-by: Alan Liu Reviewed-by: Alan Liu Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f936f535fa70f35ce3369b1418ebae0e657cda6a Author: Asher Song Date: Thu Nov 3 18:28:40 2022 +0800 Revert "drm/amdgpu: Revert "drm/amdgpu: getting fan speed pwm for vega10 properly"" This reverts commit 4545ae2ed3f2f7c3f615a53399c9c8460ee5bca7. The origin patch "drm/amdgpu: getting fan speed pwm for vega10 properly" works fine. Test failure is caused by test case self. Signed-off-by: Asher Song Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher .../drm/amd/pm/powerplay/hwmgr/vega10_thermal.c | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) commit adf65dff5d61d3adad669a1f5c6dd009107eacd7 Author: Rajneesh Bhardwaj Date: Wed Apr 20 12:28:20 2022 -0400 drm/amdgpu: Fix the kerneldoc description amdgpu_ttm_tt_set_userptr() is also called by the KFD as part of initializing the user pages for userptr BOs and also while initializing the GPUVM for a KFD process so update the function description. Reviewed-by: Felix Kuehling Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b7ada7ee61d3eb0ebf08089edcefdc272b5f7b1e Author: George Shen Date: Thu Apr 14 21:29:38 2022 -0400 drm/amd/display: Populate DP2.0 output type for DML pipe [Why] DCN3.2 DML logic uses a new output type for DP2.0, which will enable validation to pass for higher BW timings that require DP2.0 link rates. [How] Populate the DML pipe with DP2.0 output type if the signal type of the pipe_ctx is 128b/132b. Reviewed-by: Alvin Lee Acked-by: Jasdeep Dhillon Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 2 ++ 1 file changed, 2 insertions(+) commit 964d641632fa0c8eb52d577c23c1b5b5525a9bc7 Author: Alvin Lee Date: Sun Oct 30 15:56:53 2022 -0400 drm/amd/display: Add margin for max vblank time for SubVP + DRR [Description] - Incorporate FW delays as port of max VTOTAL calculated for SubVP + DRR cases (since it is part of the microschedule). - Also add margin for the max VTOTAL possible for SubVP + DRR cases. - Due to rounding errors in FW (integer arithmetic), the microschedule calculation can get pushed to the next frame (incorrectly) in cases where we use the max VTOTAL possible to complete the MCLK switch. - When the rounding error occurs, we are only off by 1-2 lines, use 40us margin which is working consistently. Reviewed-by: Jun Lei Reviewed-by: Aric Cyr Acked-by: Alan Liu Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 12 ++++++++++-- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) commit 52b5432cd70a2d6d998cb9b48378c37d5bb31e12 Author: Mike Hsieh Date: Tue Oct 4 14:58:07 2022 +0800 drm/amd/display: Set correct EOTF and Gamut flag in VRR info [Why] FreeSync always use G2.2 EOTF and Native gamut [How] Set EOTF and Gamut flags accordingly Reviewed-by: Krunoslav Kovac Acked-by: Alan Liu Signed-off-by: Mike Hsieh Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 01c0c124b9ecaa905468c6f3b3bf3962b276008b Author: Dillon Varone Date: Thu Oct 27 16:22:26 2022 -0400 drm/amd/display: Enforce minimum prefetch time for low memclk on DCN32 [WHY?] Data return times when using lowest memclk can be <= 60us, which can cause underflow on high bandwidth displays with a workload. [HOW?] Enforce a minimum prefetch time during validation for low memclk modes. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 2 ++ .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 4 ++++ .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.h | 3 +++ .../drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 12 ++++++++++-- .../drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.h | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 2 ++ drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 1 + 10 files changed, 26 insertions(+), 2 deletions(-) commit ea192af507d99014775a757bbdb5f6e487fc6c7a Author: Michael Strauss Date: Thu Oct 20 15:57:36 2022 -0400 drm/amd/display: Only update link settings after successful MST link train [WHY] Currently driver reduces verified link caps on DPIA devices if a link is trained at a link rate below the max rate verified during link detection. This blocks high bandwidth modes after setting a low bandwidth mode. [HOW] Only update link rate after a successful link train if link is MST. Reviewed-by: Mustapha Ghaddar Acked-by: Alan Liu Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 8 ++++++++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++++ drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 7 +++++-- drivers/gpu/drm/amd/display/dc/dm_helpers.h | 5 +++++ 4 files changed, 22 insertions(+), 2 deletions(-) commit 1df6b9b07e334cee60afebcaca69297477655325 Author: Steve Su Date: Fri Oct 28 05:52:32 2022 +0800 drm/amd/display: Fix gpio port mapping issue [Why] 1. Port of gpio has different mapping. [How] 1. Add a dummy entry in mapping table. 2. Fix incorrect mask bit field access. Reviewed-by: Alvin Lee Acked-by: Alan Liu Signed-off-by: Steve Su Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/gpio/dcn32/hw_factory_dcn32.c | 14 ++++++++++++++ drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 9 ++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) commit 98f9229ff60e39d3d7babd42a13358bb5a392e4b Author: Nicholas Kazlauskas Date: Thu Oct 27 15:34:33 2022 -0400 drm/amd/display: Fix reg timeout in enc314_enable_fifo [Why] The link enablement sequence can end up resetting the encoder while the PHY symclk isn't yet on. This means that waiting for symclk on will timeout, along with the reset bit never asserting high. This causes unnecessary delay when enabling the link and produces a warning affecting multiple IGT tests. [How] Don't wait for the symclk to be on here because firmware already does. Don't wait for reset if we know the symclk isn't on. Split the reset into a helper function that checks the bit and decides whether or not a delay is sufficient. Reviewed-by: Roman Li Acked-by: Alan Liu Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../display/dc/dcn314/dcn314_dio_stream_encoder.c | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 2f8f9118129dd4603cb425404f1df1f5013b6019 Author: Chaitanya Dhere Date: Thu Oct 27 09:51:19 2022 -0400 drm/amd/display: Fix FCLK deviation and tool compile issues [Why] Recent backports from open source do not have header inclusion pattern that is consistent with inclusion style in the rest of the file. This breaks the internal tool builds as well. A recent commit erronously modified the original DML formula for calculating ActiveClockChangeLatencyHidingY. This resulted in a FCLK deviation from the golden values. [How] Change the way in which display_mode_vba.h is included so that it is consistent with the inclusion style in rest of the file which also fixes the tool build. Restore the DML formula to its original state to fix the FCLK deviation. Reviewed-by: Aurabindo Pillai Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Chaitanya Dhere Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 2 +- drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit be9f6b222c529f315a77c0a182a47c988c28f7f1 Author: Mustapha Ghaddar Date: Wed Oct 26 13:54:27 2022 -0400 drm/amd/display: Fix fallback issues for DP LL 1.4a tests [WHY] Unlike DP or USBC, the USB4 link does not get its own encoder and has to share therefore verify_caps is skipped. [HOW] Fix the fallback logic for automated tests and take that into consideration for LT and LS. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Mustapha Ghaddar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 22 +++++++++++++++++++--- drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c | 15 ++++++++++----- drivers/gpu/drm/amd/display/dc/dc_link.h | 1 + 3 files changed, 30 insertions(+), 8 deletions(-) commit de020e5fa9ebc6fc32e82ae6ccb0282451ed937c Author: Wesley Chalmers Date: Fri Oct 21 19:06:10 2022 -0400 drm/amd/display: Disable DRR actions during state commit [WHY] Committing a state while performing DRR actions can cause underflow. [HOW] Disabled features performing DRR actions during state commit. Need to follow-up on why DRR actions affect state commit. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Wesley Chalmers Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 3 --- 1 file changed, 3 deletions(-) commit dc55b106ad477c67f969f3432d9070c6846fb557 Author: Alvin Lee Date: Thu Oct 27 10:51:15 2022 -0400 drm/amd/display: Disable phantom OTG after enable for plane disable [Description] - Need to disable phantom OTG after it's enabled in order to restore it to it's original state. - If it's enabled and then an MCLK switch comes in we may not prefetch the correct data since the phantom OTG could already be in the middle of the frame. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 14 +++++++++++++- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c | 8 ++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) commit 9e7d03e8b046c84e1b2973a29cd800495a5a2f09 Author: Alvin Lee Date: Thu Oct 20 18:33:05 2022 -0400 drm/amd/display: Use min transition for SubVP into MPO [Description] - For SubVP transitioning into MPO, we want to use a minimal transition to prevent transient underflow - Transitioning a phantom pipe directly into a "real" pipe can result in underflow due to the HUBP still having it's "phantom" programming when HUBP is unblanked (have to wait for next VUPDATE of the new OTG) - Also ensure subvp pipe lock is acquired early enough for programming in dc_commit_state_no_check - When disabling phantom planes, enable phantom OTG first so the disable gets the double buffer update Reviewed-by: Aric Cyr Acked-by: Alan Liu Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 43 +++++++++++++++----------------- 1 file changed, 20 insertions(+), 23 deletions(-) commit a1b6667ef90b38e2480d96f11414fcb923c13ba2 Author: Aurabindo Pillai Date: Thu Oct 20 17:26:24 2022 -0400 drm/amd/display: Zeromem mypipe heap struct before using it [Why&How] Bug was caused when moving variable from stack to heap because it was reusable and garbage was left over, so we need to zero mem. Reviewed-by: Martin Leung Acked-by: Alan Liu Signed-off-by: Aurabindo Pillai Signed-off-by: Martin Leung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 1 + 1 file changed, 1 insertion(+) commit b17710f42d4b57fa2353b1aeff02920c9560e2e7 Author: Nicholas Kazlauskas Date: Tue Oct 25 11:31:30 2022 -0400 drm/amd/display: Allow tuning DCN314 bounding box [Why] We're missing the helpers from dcn20 that would allow overriding these with DC debug options. [How] Use dcn20_patch_bounding_box to support overriding all the relevant values. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 4df7e2c8d7783f53863725e21efefde19d85402f Author: Nicholas Kazlauskas Date: Tue Oct 25 11:26:04 2022 -0400 drm/amd/display: Update SR watermarks for DCN314 [Why & How] New values requested by hardware after fine-tuning. Update for all memory types. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 32 +++++++++++----------- .../gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 4 +-- 2 files changed, 18 insertions(+), 18 deletions(-) commit 1a2b886b1f242044840147347db1a595cd7f5f56 Author: Ryan Lin Date: Wed Oct 26 15:12:26 2022 +0800 drm/amd/display: Waiting for 1 frame to fix the flash issue on PSR1 [Why] Needs more frames waiting before the PSR_Exit sending for the specific TCON. [How] Add relock_delay_frame_cnt to control how many frames waiting are needed before the PSR_Exit sending. The default value is 0. The Driver side can set this variable for specific TCONs. Reviewed-by: Robin Chen Acked-by: Alan Liu Signed-off-by: Ryan Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 5 +++++ drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 5abb360ba74f59cc7ea5a4ab149c49d70d869239 Author: Wenjing Liu Date: Mon Oct 24 12:18:41 2022 -0400 drm/amd/display: Consider dp cable id only when data is non zero Cable ID is a DP2 feature to identify max certified link rate that a cable can carry. The cable identification method requires both cable and display hardware support. Since the specs comes late, it is anticipated that the first round of DP2 cables and displays may not be fully compatible to reliably return cable ID data. Therefore the decision of our cable id policy is that if the cable can return non zero cable id data, we will take cable's link rate capability into account. However if we get zero data, the cable link rate capability is considered inconclusive. In this case, we will not take cable's capability into account to avoid of over limiting hardware capability from users. The max overall link rate capability is still determined after actual dp pre-training. Cable id is considered as an auxiliary method of determining max link bandwidth capability. Reviewed-by: George Shen Acked-by: Alan Liu Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit a36021b1fccf1807a5557f35b0b407f1c1a65743 Author: Nawwar Ali Date: Wed Oct 19 17:57:06 2022 +0800 drm/amd/display: Update 709 gamma to 2.222 as stated in the standerd [WHY] Previously driver use gamma 2.2 for 709 color space, but the standard is to use gamma of 2.222 [HOW] Change it gamma to 2.222 Reviewed-by: Krunoslav Kovac Acked-by: Alan Liu Signed-off-by: Nawwar Ali Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7085cbf117e4fc2af96790cbc34f5a38a236943 Author: Max Tseng Date: Mon Oct 17 20:55:36 2022 +0800 drm/amd/display: Cursor update refactor: PSR-SU support condition [Why] PSR-SU requires extra conditions while cursor update. Reviewed-by: Robin Chen Acked-by: Alan Liu Signed-off-by: Max Tseng Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit ea8626425859cf99de0c7f7e5b2c485d5f19b20e Author: Leo Ma Date: Thu Sep 15 12:03:04 2022 -0400 drm/amd/display: Adding HDMI SCDC DEVICE_ID define [Why && How] We will need to differentiate vendor behavior in the future. Reviewed-by: Chris Park Acked-by: Alan Liu Signed-off-by: Leo Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 1 + 1 file changed, 1 insertion(+) commit 00efc965a7b7990e63e3506e6d240e6271bd8571 Author: Alvin Lee Date: Mon Oct 24 13:39:02 2022 -0400 drm/amd/display: Wait for VBLANK during pipe programming [Description] - Wait for vblank during front end programming for global sync to ensure all double buffer updates take. - This prevents underflow in some cases. Reviewed-by: Martin Leung Acked-by: Alan Liu Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 1 + 1 file changed, 1 insertion(+) commit f9e69496450352fa0504fd5a8fd9134b31116558 Author: Christian König Date: Wed Nov 2 14:55:13 2022 +0100 drm/amdgpu: workaround for TLB seq race It can happen that we query the sequence value before the callback had a chance to run. Workaround that by grabbing the fence lock and releasing it again. Should be replaced by hw handling soon. Signed-off-by: Christian König CC: stable@vger.kernel.org # 5.19+ Fixes: 5255e146c99a6 ("drm/amdgpu: rework TLB flushing") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2113 Acked-by: Alex Deucher Acked-by: Philip Yang Tested-by: Stefan Springer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit a0fba3e078801b9596e61a0687d398664cdc36e6 Author: Felix Kuehling Date: Tue Nov 1 15:02:48 2022 -0400 drm/amdkfd: Fix error handling in criu_checkpoint Checkpoint BOs last. That way we don't need to close dmabuf FDs if something else fails later. This avoids problematic access to user mode memory in the error handling code path. criu_checkpoint_bos has its own error handling and cleanup that does not depend on access to user memory. In the private data, keep BOs before the remaining objects. This is necessary to restore things in the correct order as restoring events depends on the events-page BO being restored first. Fixes: be072b06c739 ("drm/amdkfd: CRIU export BOs as prime dmabuf objects") Reported-by: Jann Horn CC: Rajneesh Bhardwaj Signed-off-by: Felix Kuehling Reviewed-and-tested-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 34 ++++++++++++++------------------ 1 file changed, 15 insertions(+), 19 deletions(-) commit 2d2ccc4cbf440931843e64974da9fcd129d401a8 Author: Felix Kuehling Date: Thu Nov 3 17:01:46 2022 -0400 drm/amdkfd: Fix error handling in kfd_criu_restore_events mutex_unlock before the exit label because all the error code paths that jump there didn't take that lock. This fixes unbalanced locking errors in case of restore errors. Fixes: 40e8a766a761 ("drm/amdkfd: CRIU checkpoint and restore events") Signed-off-by: Felix Kuehling Reviewed-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_events.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bcde9dad1bfa3754e004c14774d42e1f1210efe9 Author: Tim Huang Date: Thu Nov 3 11:05:19 2022 +0800 drm/amd/pm: update SMU IP v13.0.4 msg interface header Some of the unused messages that were used earlier in development have been freed up as spare messages, no intended functional changes. Signed-off-by: Mario Limonciello Signed-off-by: Tim Huang Acked-by: Alex Deucher Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher .../gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_4_ppsmc.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 8fbf94fea0b4e187ca9100936c5429f96b8a4e44 Author: Yang Yingliang Date: Tue Oct 18 10:31:49 2022 +0800 soc: sifive: ccache: fix missing of_node_put() in sifive_ccache_init() The device_node pointer returned by of_find_matching_node() with refcount incremented, when finish using it, the refcount need be decreased. Fixes: a967a289f169 ("RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCs") Signed-off-by: Yang Yingliang Reviewed-by: Conor Dooley Signed-off-by: Conor Dooley drivers/soc/sifive/sifive_ccache.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 756344e7cb1afbb87da8705c20384dddd0dea233 Author: Yang Yingliang Date: Tue Oct 18 10:31:48 2022 +0800 soc: sifive: ccache: fix missing free_irq() in error path in sifive_ccache_init() Add missing free_irq() before return error from sifive_ccache_init(). Fixes: a967a289f169 ("RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCs") Signed-off-by: Yang Yingliang Reviewed-by: Conor Dooley Signed-off-by: Conor Dooley drivers/soc/sifive/sifive_ccache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 73e770f085023da327dc9ffeb6cd96b0bb22d97e Author: Yang Yingliang Date: Tue Oct 18 10:31:47 2022 +0800 soc: sifive: ccache: fix missing iounmap() in error path in sifive_ccache_init() Add missing iounmap() before return error from sifive_ccache_init(). Fixes: a967a289f169 ("RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCs") Signed-off-by: Yang Yingliang Reviewed-by: Conor Dooley Signed-off-by: Conor Dooley drivers/soc/sifive/sifive_ccache.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit a62d196e89887c029d5aef409135f9a2a8667268 Author: Conor Dooley Date: Fri Oct 7 12:35:10 2022 +0100 dt-bindings: pwm: fix microchip corePWM's pwm-cells corePWM is capable of inverted operation but the binding requires \#pwm-cells of 2. Expand the binding to support setting the polarity. Fixes: df77f7735786 ("dt-bindings: pwm: add microchip corepwm binding") Acked-by: Rob Herring Acked-by: Uwe Kleine-König Signed-off-by: Conor Dooley Documentation/devicetree/bindings/pwm/microchip,corepwm.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bf9b85562a9a9c5065975b21a091ba2e9784caa5 Merge: 154ba79c9f16 15feb56e30ef Author: Jakub Kicinski Date: Wed Nov 9 13:46:05 2022 -0800 Merge branch 'net-devlink-move-netdev-notifier-block-to-dest-namespace-during-reload' Jiri Pirko says: ==================== net: devlink: move netdev notifier block to dest namespace during reload Patch #1 is just a dependency of patch #2, which is the actual fix. ==================== Link: https://lore.kernel.org/r/20221108132208.938676-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 15feb56e30efea95992f5c572cee753db205eb7b Author: Jiri Pirko Date: Tue Nov 8 14:22:07 2022 +0100 net: devlink: move netdev notifier block to dest namespace during reload The notifier block tracking netdev changes in devlink is registered during devlink_alloc() per-net, it is then unregistered in devlink_free(). When devlink moves from net namespace to another one, the notifier block needs to move along. Fix this by adding forgotten call to move the block. Reported-by: Ido Schimmel Fixes: 02a68a47eade ("net: devlink: track netdev with devlink_port assigned") Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3e52fba03a20234abc65a656cef063a1045d9723 Author: Jiri Pirko Date: Tue Nov 8 14:22:06 2022 +0100 net: introduce a helper to move notifier block to different namespace Currently, net_dev() netdev notifier variant follows the netdev with per-net notifier from namespace to namespace. This is implemented by move_netdevice_notifiers_dev_net() helper. For devlink it is needed to re-register per-net notifier during devlink reload. Introduce a new helper called move_netdevice_notifier_net() and share the unregister/register code with existing move_netdevice_notifiers_dev_net() helper. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 2 ++ net/core/dev.c | 22 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) commit 6d864a857606c7d59bcf955d7de6b5016c067f66 Merge: fcddf9f5e324 2f3f53d62307 Author: Jonathan Corbet Date: Wed Nov 9 14:17:54 2022 -0700 Merge branch 'docs-fixes' into docs-mw Bring all of the 6.1 documentation fixes in. commit fcddf9f5e324fe72c6bc7099687e6d3ac475c061 Author: Jonathan Neuschäfer Date: Tue Nov 1 17:06:09 2022 +0100 docs: ia64: Fix a typo ("identify mappings") The correct term here, also used in the next line, is "identity mappings". "itentify mappings" was probably just a typo. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221101160609.961950-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet Documentation/ia64/aliasing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a96be33c8f555b69b0047935576b52ef94859ff Author: Jonathan Neuschäfer Date: Tue Nov 1 17:01:18 2022 +0100 docs: admin-guide: hw_random: Make document title more generic and concise The hw_random subsystem no longer works only on specific Intel chipsets; make the title of hw_random.rst reflect this fact. While we're at it, also remove the words "Linux support for", since it's clear from context that this is a document about Linux. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221101160119.955997-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet Documentation/admin-guide/hw_random.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 38124788350edf6df4bb62619c99ebf212787505 Author: Yang Yingliang Date: Thu Nov 3 10:34:02 2022 +0800 Documentation: devres: add missing IIO helpers Add some missing device-managed helpers of iio to devres.rst. devm_iio_kfifo_buffer_setup_ext() is introduced by commit 0a21526bc1d4 ("iio: kfifo: add devm_iio_triggered_buffer_setup_ext variant"). devm_iio_triggered_buffer_setup_ext() is introduced by commit 5164c7889857 ("iio: triggered-buffer: add {devm_}iio_triggered_buffer_setup_ext variants"). devm_iio_hw_consumer_alloc() is introduced by b688c18d3006 ("IIO: hw_consumer: add devm_iio_hw_consumer_alloc"). devm_fwnode_iio_channel_get_by_name() is introduced by commit 1e64b9c5f9a0 ("iio: inkern: move to fwnode properties"). Fixes: 0a21526bc1d4 ("iio: kfifo: add devm_iio_triggered_buffer_setup_ext variant") Fixes: 5164c7889857 ("iio: triggered-buffer: add {devm_}iio_triggered_buffer_setup_ext variants") Fixes: b688c18d3006 ("IIO: hw_consumer: add devm_iio_hw_consumer_alloc") Fixes: 1e64b9c5f9a0 ("iio: inkern: move to fwnode properties") Signed-off-by: Yang Yingliang Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20221103023402.1024437-1-yangyingliang@huawei.com Signed-off-by: Jonathan Corbet Documentation/driver-api/driver-model/devres.rst | 4 ++++ 1 file changed, 4 insertions(+) commit 5cd4cd0a2eb765bf8ca8e51ee6c25b65105e4aa7 Author: Randy Dunlap Date: Thu Nov 3 17:38:35 2022 -0700 debugfs: small Documentation cleaning Fix punctuation in a parenthetical phrase. Add 2 article adjectives and change one from "an" to "a". Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20221104003835.29472-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet Documentation/filesystems/debugfs.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a3ee8b3aa91b9138fc05f13fb2675fb194c5ad32 Author: Randy Dunlap Date: Thu Nov 3 17:39:21 2022 -0700 sysfs: update Documentation Make editing corrections and updates to sysfs.rst: - spell "sysfs" consistently (vs. "Sysfs") - align field names in a struct - fix some punctuation and grammar - list more /sys top-level subdirectories - change 'fuse.txt' to 'fuse.rst' (although I don't see where the example is) Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20221104003921.31616-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet Documentation/filesystems/sysfs.rst | 41 ++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit b592f9ee1fb4467de374b4a60009d7ec55fd2d06 Author: David Heidelberg Date: Fri Nov 4 13:26:11 2022 +0100 Docs/admin-guide/mm/zswap: remove a paragraph about zswap being a new feature Nine years have passed since Linux 3.11. Signed-off-by: David Heidelberg Link: https://lore.kernel.org/r/20221104122612.14906-1-david@ixit.cz Signed-off-by: Jonathan Corbet Documentation/admin-guide/mm/zswap.rst | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 586f1ed91364e65d7a5d7dbbc9efc50175d7f042 Author: Rui Li Date: Sat Nov 5 12:17:41 2022 +0800 docs/zh_CN: Add userspace-api/futex2 Chinese translation Translate the following documents into Chinese: - userspace-api/futex2.rst Signed-off-by: Rui Li Reviewed-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/20221105041741.288094-1-me@lirui.org Signed-off-by: Jonathan Corbet .../translations/zh_CN/userspace-api/futex2.rst | 80 ++++++++++++++++++++++ .../translations/zh_CN/userspace-api/index.rst | 2 +- 2 files changed, 81 insertions(+), 1 deletion(-) commit 6f777dcef7742c46eced01bdcfa9d6692989573e Author: Alexander Potapenko Date: Mon Nov 7 15:22:55 2022 +0100 docs: kmsan: fix formatting of "Example report" Add a blank line to make the sentence before the list render as a separate paragraph, not a definition. Fixes: 93858ae70cf4 ("kmsan: add ReST documentation") Suggested-by: Bagas Sanjaya Signed-off-by: Alexander Potapenko Link: https://lore.kernel.org/r/20221107142255.4038811-1-glider@google.com Signed-off-by: Jonathan Corbet Documentation/dev-tools/kmsan.rst | 1 + 1 file changed, 1 insertion(+) commit dc8ab0298028c44e3fb309031c1314e85178887a Author: Akira Yokosawa Date: Sun Oct 30 20:52:09 2022 +0900 docs/ja_JP/howto: Update for v6.1 Reflect changes made in commits listed below: 388f9b20f98d ("Documentation/process/howto: Only send regression fixes after -rc1"). bc0ef4a7e4c3 ("Doc: Delete reference to the kernel-mentors mailing list") bcd3cf0855c5 ("Doc: Remove outdated info about bugzilla mailing lists") dad051395413 ("Doc: add a missing cross-reference") 9799445af124 ("Doc: tidy up TOCs and refs to license-rules.rst") fb0e0ffe7fc8 ("Documentation: bring process docs up to date") e7b4311ebcac ("Replace HTTP links with HTTPS ones: Documentation/process") f1eebe92c265 ("Documentation/HOWTO: adjust external link references") da514157c4f0 ("docs: make reporting-bugs.rst obsolete") cf6d6fc27936 ("docs: process/howto.rst: make sections on bug reporting match practice") Co-developed-by: Kosuke Fujimoto Signed-off-by: Kosuke Fujimoto Signed-off-by: Akira Yokosawa Cc: Tsugikazu Shibata Acked-by: Tsugikazu Shibata Link: https://lore.kernel.org/r/20221030115209.25924-1-akiyks@gmail.com Signed-off-by: Jonathan Corbet Documentation/translations/ja_JP/howto.rst | 66 ++++++++++++++---------------- 1 file changed, 31 insertions(+), 35 deletions(-) commit e17f2260380398cc81bb804f9336ba7d88d7f8d1 Author: Daniel Vetter Date: Tue Nov 8 12:57:07 2022 +0100 docs/sphinx: More depth in the rtd sidebar toc We love to nest our documenation for good structure, but that means the table of contents needs to keep up or you can't navigate them. Realized this trying to find the drm property documentation, which with some shuffling around disappeared. Why I didn't realize we can do this earlier, no idea. Since the relevant parts of the toc are only loaded if you're in the right .html file there's no harm in going all the way to unlimited. Note that this has no impact on the alabaster theme (which has a much simpler sidebar toc which doesn't show the entire hierarchy, only what's in the local rendered file) nor on the various :toctree: rendered inline in the output. Signed-off-by: Daniel Vetter Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20221108115707.1232621-1-daniel.vetter@ffwll.ch Signed-off-by: Jonathan Corbet Documentation/conf.py | 4 ++++ 1 file changed, 4 insertions(+) commit ba65731057aa1b5a25eba3d4af2b155ce4a7662e Author: Rui Li Date: Tue Nov 8 19:29:21 2022 +0800 docs/zh_CN: Add userspace-api/seccomp_filter Chinese translation Translate the following documents into Chinese: - userspace-api/seccomp_filter.rst Also adjust index order according to the original index file. Signed-off-by: Rui Li Reviewed-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/20221108112921.312071-1-me@lirui.org Signed-off-by: Jonathan Corbet .../translations/zh_CN/userspace-api/index.rst | 4 +- .../zh_CN/userspace-api/seccomp_filter.rst | 293 +++++++++++++++++++++ 2 files changed, 295 insertions(+), 2 deletions(-) commit 99771d73ff4539f2337b84917f4792abf0d8931b Author: Khazhismel Kumykov Date: Tue Nov 8 10:10:30 2022 -0800 bfq: ignore oom_bfqq in bfq_check_waker oom_bfqq is just a fallback bfqq, so shouldn't be used with waker detection. Suggested-by: Jan Kara Signed-off-by: Khazhismel Kumykov Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221108181030.1611703-2-khazhy@google.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a1795c2ccb1e4c49220d2a0d381540024d71647c Author: Khazhismel Kumykov Date: Tue Nov 8 10:10:29 2022 -0800 bfq: fix waker_bfqq inconsistency crash This fixes crashes in bfq_add_bfqq_busy due to waker_bfqq being NULL, but woken_list_node still being hashed. This would happen when bfq_init_rq() expects a brand new allocated queue to be returned from bfq_get_bfqq_handle_split() and unconditionally updates waker_bfqq without resetting woken_list_node. Since we can always return oom_bfqq when attempting to allocate, we cannot assume waker_bfqq starts as NULL. Avoid setting woken_bfqq for oom_bfqq entirely, as it's not useful. Crashes would have a stacktrace like: [160595.656560] bfq_add_bfqq_busy+0x110/0x1ec [160595.661142] bfq_add_request+0x6bc/0x980 [160595.666602] bfq_insert_request+0x8ec/0x1240 [160595.671762] bfq_insert_requests+0x58/0x9c [160595.676420] blk_mq_sched_insert_request+0x11c/0x198 [160595.682107] blk_mq_submit_bio+0x270/0x62c [160595.686759] __submit_bio_noacct_mq+0xec/0x178 [160595.691926] submit_bio+0x120/0x184 [160595.695990] ext4_mpage_readpages+0x77c/0x7c8 [160595.701026] ext4_readpage+0x60/0xb0 [160595.705158] filemap_read_page+0x54/0x114 [160595.711961] filemap_fault+0x228/0x5f4 [160595.716272] do_read_fault+0xe0/0x1f0 [160595.720487] do_fault+0x40/0x1c8 Tested by injecting random failures into bfq_get_queue, crashes go away completely. Fixes: 8ef3fc3a043c ("block, bfq: make shared queues inherit wakers") Signed-off-by: Khazhismel Kumykov Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221108181030.1611703-1-khazhy@google.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit ce668b6d68f9ddf76022b1c403b444f5a21cbc0f Author: Christoph Böhmwalder Date: Wed Nov 9 14:34:53 2022 +0100 drbd: Store op in drbd_peer_request (Sort of) cherry-picked from the out-of-tree drbd9 branch. Original commit message by Joel Colledge: This simplifies drbd_submit_peer_request by removing most of the arguments. It also makes the treatment of the op better aligned with that in struct bio. Determine fault_type dynamically using information which is already available instead of passing it in as a parameter. Note: The opf in receive_rs_deallocated was changed from REQ_OP_WRITE_ZEROES to REQ_OP_DISCARD. This was required in the out-of-tree module, and does not matter in-tree. The opf is ignored anyway in drbd_submit_peer_request, since the discard/zero-out is decided by the EE_TRIM flag. Signed-off-by: Joel Colledge Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221109133453.51652-4-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe drivers/block/drbd/drbd_int.h | 8 +++- drivers/block/drbd/drbd_receiver.c | 81 +++++++++++++++++++++----------------- drivers/block/drbd/drbd_worker.c | 4 +- 3 files changed, 53 insertions(+), 40 deletions(-) commit 21b87a7d7564751590e3a38dfb243f9a0bbedbd2 Author: Philipp Reisner Date: Wed Nov 9 14:34:52 2022 +0100 drbd: disable discard support if granularity > max The discard_granularity describes the minimum unit of a discard. If that is larger than the maximal discard size, we need to disable discards completely. Reviewed-by: Joel Colledge Signed-off-by: Philipp Reisner Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221109133453.51652-3-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe drivers/block/drbd/drbd_nl.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 258bea6388ac93f34561fd91064232d14e174bff Author: Christoph Böhmwalder Date: Wed Nov 9 14:34:51 2022 +0100 drbd: use blk_queue_max_discard_sectors helper We currently only set q->limits.max_discard_sectors, but that is not enough. Another field, max_hw_discard_sectors, was introduced in commit 0034af036554 ("block: make /sys/block//queue/discard_max_bytes writeable"). The difference is that max_discard_sectors can be changed from user space via sysfs, while max_hw_discard_sectors is the "hardware" upper limit. So use this helper, which sets both. This is also a fixup for commit 998e9cbcd615 ("drbd: cleanup decide_on_discard_support"): if discards are not supported, that does not necessarily mean we also want to disable write_zeroes. Fixes: 998e9cbcd615 ("drbd: cleanup decide_on_discard_support") Reviewed-by: Joel Colledge Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221109133453.51652-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe drivers/block/drbd/drbd_nl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 84498d1fb35de6ab71bdfdb6270a464fb4a0951b Author: Yassine Oudjana Date: Mon Nov 7 23:21:14 2022 +0300 regmap-irq: Use the new num_config_regs property in regmap_add_irq_chip_fwnode Commit faa87ce9196d ("regmap-irq: Introduce config registers for irq types") added the num_config_regs, then commit 9edd4f5aee84 ("regmap-irq: Deprecate type registers and virtual registers") suggested to replace num_type_reg with it. However, regmap_add_irq_chip_fwnode wasn't modified to use the new property. Later on, commit 255a03bb1bb3 ("ASoC: wcd9335: Convert irq chip to config regs") removed the old num_type_reg property from the WCD9335 driver's struct regmap_irq_chip, causing a null pointer dereference in regmap_irq_set_type when it tried to index d->type_buf as it was never allocated in regmap_add_irq_chip_fwnode: [ 39.199374] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 39.200006] Call trace: [ 39.200014] regmap_irq_set_type+0x84/0x1c0 [ 39.200026] __irq_set_trigger+0x60/0x1c0 [ 39.200040] __setup_irq+0x2f4/0x78c [ 39.200051] request_threaded_irq+0xe8/0x1a0 Use num_config_regs in regmap_add_irq_chip_fwnode instead of num_type_reg, and fall back to it if num_config_regs isn't defined to maintain backward compatibility. Fixes: faa87ce9196d ("regmap-irq: Introduce config registers for irq types") Signed-off-by: Yassine Oudjana Link: https://lore.kernel.org/r/20221107202114.823975-1-y.oudjana@protonmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 6d4338cb4070a762dba0cadee00b7ec206d9f868 Author: Logan Gunthorpe Date: Fri Oct 21 11:41:16 2022 -0600 ABI: sysfs-bus-pci: add documentation for p2pmem allocate Add documentation for the p2pmem/allocate binary file which allows for allocating p2pmem buffers in userspace for passing to drivers that support them. (Currently only O_DIRECT to NVMe devices.) Signed-off-by: Logan Gunthorpe Reviewed-by: John Hubbard Reviewed-by: Greg Kroah-Hartman Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221021174116.7200-10-logang@deltatee.com Signed-off-by: Jens Axboe Documentation/ABI/testing/sysfs-bus-pci | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7e9c7ef83d785236f5a8c3761dd053fae9b92fb8 Author: Logan Gunthorpe Date: Fri Oct 21 11:41:15 2022 -0600 PCI/P2PDMA: Allow userspace VMA allocations through sysfs Create a sysfs bin attribute called "allocate" under the existing "p2pmem" group. The only allowable operation on this file is the mmap() call. When mmap() is called on this attribute, the kernel allocates a chunk of memory from the genalloc and inserts the pages into the VMA. The dev_pagemap .page_free callback will indicate when these pages are no longer used and they will be put back into the genalloc. On device unbind, remove the sysfs file before the memremap_pages are cleaned up. This ensures unmap_mapping_range() is called on the files inode and no new mappings can be created. Signed-off-by: Logan Gunthorpe Acked-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221021174116.7200-9-logang@deltatee.com Signed-off-by: Jens Axboe drivers/pci/p2pdma.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) commit 7ee4ccf57484d260c37b29f9a48b65c4101403e8 Author: Logan Gunthorpe Date: Fri Oct 21 11:41:14 2022 -0600 block: set FOLL_PCI_P2PDMA in bio_map_user_iov() When a bio's queue supports PCI P2PDMA, set FOLL_PCI_P2PDMA for iov_iter_get_pages_flags(). This allows PCI P2PDMA pages to be passed from userspace and enables the NVMe passthru requests to use P2PDMA pages. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Reviewed-by: John Hubbard Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221021174116.7200-8-logang@deltatee.com Signed-off-by: Jens Axboe block/blk-map.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 5e3e3f2e15df46abcab1959f93f214f778b6ec49 Author: Logan Gunthorpe Date: Fri Oct 21 11:41:13 2022 -0600 block: set FOLL_PCI_P2PDMA in __bio_iov_iter_get_pages() When a bio's queue supports PCI P2PDMA, set FOLL_PCI_P2PDMA for iov_iter_get_pages_flags(). This allows PCI P2PDMA pages to be passed from userspace and enables the O_DIRECT path in iomap based filesystems and direct to block devices. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Reviewed-by: John Hubbard Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221021174116.7200-7-logang@deltatee.com Signed-off-by: Jens Axboe block/bio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 1567b49d1a4081ba7e1a0ff2dc39bc58c59f2a51 Author: Logan Gunthorpe Date: Fri Oct 21 11:41:12 2022 -0600 lib/scatterlist: add check when merging zone device pages Consecutive zone device pages should not be merged into the same sgl or bvec segment with other types of pages or if they belong to different pgmaps. Otherwise getting the pgmap of a given segment is not possible without scanning the entire segment. This helper returns true either if both pages are not zone device pages or both pages are zone device pages with the same pgmap. Factor out the check for page mergability into a pages_are_mergable() helper and add a check with zone_device_pages_are_mergeable(). Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221021174116.7200-6-logang@deltatee.com Signed-off-by: Jens Axboe lib/scatterlist.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 49580e690755d0e51ed7aa2c33225dd884fa738a Author: Logan Gunthorpe Date: Fri Oct 21 11:41:11 2022 -0600 block: add check when merging zone device pages Consecutive zone device pages should not be merged into the same sgl or bvec segment with other types of pages or if they belong to different pgmaps. Otherwise getting the pgmap of a given segment is not possible without scanning the entire segment. This helper returns true either if both pages are not zone device pages or both pages are zone device pages with the same pgmap. Add a helper to determine if zone device pages are mergeable and use this helper in page_is_mergeable(). Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Reviewed-by: John Hubbard Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221021174116.7200-5-logang@deltatee.com Signed-off-by: Jens Axboe block/bio.c | 2 ++ include/linux/mmzone.h | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit d82076403cef7fcd1e7617c9db48bf21ebdc1f9c Author: Logan Gunthorpe Date: Fri Oct 21 11:41:10 2022 -0600 iov_iter: introduce iov_iter_get_pages_[alloc_]flags() Add iov_iter_get_pages_flags() and iov_iter_get_pages_alloc_flags() which take a flags argument that is passed to get_user_pages_fast(). This is so that FOLL_PCI_P2PDMA can be passed when appropriate. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221021174116.7200-4-logang@deltatee.com Signed-off-by: Jens Axboe include/linux/uio.h | 6 ++++++ lib/iov_iter.c | 32 ++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) commit 4003f107fa2eabb0aab90e37a1ed7b74c6f0d132 Author: Logan Gunthorpe Date: Fri Oct 21 11:41:09 2022 -0600 mm: introduce FOLL_PCI_P2PDMA to gate getting PCI P2PDMA pages GUP Callers that expect PCI P2PDMA pages can now set FOLL_PCI_P2PDMA to allow obtaining P2PDMA pages. If GUP is called without the flag and a P2PDMA page is found, it will return an error in try_grab_page() or try_grab_folio(). The check is safe to do before taking the reference to the page in both cases seeing the page should be protected by either the appropriate ptl or mmap_lock; or the gup fast guarantees preventing TLB flushes. try_grab_folio() has one call site that WARNs on failure and cannot actually deal with the failure of this function (it seems it will get into an infinite loop). Expand the comment there to document a couple more conditions on why it will not fail. FOLL_PCI_P2PDMA cannot be set if FOLL_LONGTERM is set. This is to copy fsdax until pgmap refcounts are fixed (see the link below for more information). Link: https://lkml.kernel.org/r/Yy4Ot5MoOhsgYLTQ@ziepe.ca Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221021174116.7200-3-logang@deltatee.com Signed-off-by: Jens Axboe include/linux/mm.h | 1 + mm/gup.c | 19 ++++++++++++++++++- mm/hugetlb.c | 6 ++++-- 3 files changed, 23 insertions(+), 3 deletions(-) commit 0f0892356fa174bdd8bd655c820ee3658c4c9f01 Author: Logan Gunthorpe Date: Fri Oct 21 11:41:08 2022 -0600 mm: allow multiple error returns in try_grab_page() In order to add checks for P2PDMA memory into try_grab_page(), expand the error return from a bool to an int/error code. Update all the callsites handle change in usage. Also remove the WARN_ON_ONCE() call at the callsites seeing there already is a WARN_ON_ONCE() inside the function if it fails. Signed-off-by: Logan Gunthorpe Reviewed-by: Dan Williams Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221021174116.7200-2-logang@deltatee.com Signed-off-by: Jens Axboe include/linux/mm.h | 2 +- mm/gup.c | 26 ++++++++++++++------------ mm/huge_memory.c | 19 +++++++++++++------ mm/hugetlb.c | 17 +++++++++-------- 4 files changed, 37 insertions(+), 27 deletions(-) commit a5be5ce0e25439fae3cd42e3d775979547926812 Author: Rafał Miłecki Date: Thu Nov 3 09:25:29 2022 +0100 firmware/nvram: bcm47xx: support init from IO memory Provide NVMEM content to the NVRAM driver from a simple memory resource. This is necessary to use NVRAM in a memory- mapped flash device. Patch taken from OpenWrts development tree. This patch makes it possible to use memory-mapped NVRAM on the D-Link DWL-8610AP and the D-Link DIR-890L. Cc: Hauke Mehrtens Cc: linux-mips@vger.kernel.org Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: Thomas Bogendoerfer Signed-off-by: Rafał Miłecki [Added an export for modules potentially using the init symbol] Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221103082529.359084-1-linus.walleij@linaro.org Signed-off-by: Florian Fainelli drivers/firmware/broadcom/bcm47xx_nvram.c | 18 ++++++++++++++++++ drivers/nvmem/brcm_nvram.c | 3 +++ include/linux/bcm47xx_nvram.h | 6 ++++++ 3 files changed, 27 insertions(+) commit 154ba79c9f160e652a2c9c46435b928b3bfae11f Author: Jakub Kicinski Date: Tue Nov 8 12:41:28 2022 -0800 genetlink: correctly begin the iteration over policies The return value from genl_op_iter_init() only tells us if there are any policies but to begin the iteration (and therefore load the first entry) we need to call genl_op_iter_next(). Note that it's safe to call genl_op_iter_next() on a family with no ops, it will just return false. This may lead to various crashes, a warning in netlink_policy_dump_get_policy_idx() when policy is not found or.. no problem at all if the kmalloc'ed memory happens to be zeroed. Fixes: b502b3185cd6 ("genetlink: use iterator in the op to policy map dumping") Link: https://lore.kernel.org/r/20221108204128.330287-1-kuba@kernel.org Signed-off-by: Jakub Kicinski net/netlink/genetlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4f9fb09175e87a233787a2dee1e5dabb14deb022 Author: Rafał Miłecki Date: Thu Nov 3 12:00:15 2022 +0100 arm64: dts: broadcom: bcmbca: bcm6858: add TWD block BCM6858 contains TWD block with timers, watchdog, and reset subblocks. Describe it. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20221103110015.21761-1-zajec5@gmail.com Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 68064196cffea33f090bd2e8d81cd5e20107ecf1 Author: Rafał Miłecki Date: Thu Nov 3 11:53:16 2022 +0100 arm64: dts: broadcom: bcmbca: bcm4908: add TWD block timer BCM4908 TWD contains block with 4 timers. Add binding for it. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20221103105316.21294-1-zajec5@gmail.com Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 44a037f54b97e4215a282d39d0f7f28c588f185c Author: Adrian Hunter Date: Fri Nov 4 14:18:05 2022 +0200 perf intel-pt: Add hybrid CPU compatibility test The kernel driver assumes hybrid CPUs will have Intel PT capabilities that are compatible with the boot CPU. Add a test to check that is the case. Signed-off-by: Adrian Hunter Acked-by: Namhyung Kim Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20221104121805.5264-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/include/arch-tests.h | 1 + tools/perf/arch/x86/tests/arch-tests.c | 3 +- tools/perf/arch/x86/tests/intel-pt-test.c | 154 ++++++++++++++++++++++++++++++ 3 files changed, 157 insertions(+), 1 deletion(-) commit 828143f8da2856014df3102f63f7e4e4dc2d1c22 Author: Adrian Hunter Date: Fri Nov 4 14:18:04 2022 +0200 perf intel-pt: Redefine test_suite to allow for adding more subtests In preparation for adding more Intel PT testing, redefine the test_suite to allow for adding more subtests. Signed-off-by: Adrian Hunter Acked-by: Namhyung Kim Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20221104121805.5264-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/arch-tests.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 5d0557c75b2f2c7a868742d21a3ad94813ca97f4 Author: Adrian Hunter Date: Fri Nov 4 14:18:03 2022 +0200 perf intel-pt: Start turning intel-pt-pkt-decoder-test.c into a suite of intel-pt subtests In preparation for adding more Intel PT testing, rename intel-pt-pkt-decoder-test.c to intel-pt-test.c. Subtests will later be added to intel-pt-test.c. Signed-off-by: Adrian Hunter Acked-by: Namhyung Kim Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20221104121805.5264-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/Build | 2 +- .../arch/x86/tests/{intel-pt-pkt-decoder-test.c => intel-pt-test.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit 9f66e1dd82e3186aee95282657512ca2aef1afe0 Author: Linus Walleij Date: Wed Oct 19 21:34:49 2022 +0200 ARM: dts: bcm53016: Add devicetree for D-Link DWL-8610AP This adds a device tree for the BCM53016-based D-Link DWL-8610AP access point wireless router. The TRX-format partitions had to be named "firmware" due to an OpenWrt patch that only accepts parting such nodes if they are named "firmware". Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221019193449.3036010-2-linus.walleij@linaro.org Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm53016-dlink-dwl-8610ap.dts | 131 ++++++++++++++++++++++++ 2 files changed, 132 insertions(+) commit 96d380df94e9b1699130931850e9b7fc885b5b63 Author: Linus Walleij Date: Wed Oct 19 21:34:48 2022 +0200 dt-bindings: ARM: add bindings for the D-Link DWL-8610AP The D-Link DWL-8610AP is a pure access point with ethernet in and wireless (both 2.4GHz and 5GHz) out. Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221019193449.3036010-1-linus.walleij@linaro.org Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.yaml | 1 + 1 file changed, 1 insertion(+) commit a4ee28615c7a1e2925e1fcb4ba0fa1aeee633d78 Author: Anshuman Khandual Date: Mon Nov 7 19:47:53 2022 +0530 arm64/mm: Simplify and document pte_to_phys() for 52 bit addresses pte_to_phys() assembly definition does multiple bits field transformations to derive physical address, embedded inside a page table entry. Unlike its C counter part i.e __pte_to_phys(), pte_to_phys() is not very apparent. It simplifies these operations via a new macro PTE_ADDR_HIGH_SHIFT indicating how far the pte encoded higher address bits need to be left shifted. While here, this also updates __pte_to_phys() and __phys_to_pte_val(). Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Brown Cc: Mark Rutland Cc: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Ard Biesheuvel Suggested-by: Ard Biesheuvel Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/20221107141753.2938621-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 8 +++----- arch/arm64/include/asm/pgtable-hwdef.h | 1 + arch/arm64/include/asm/pgtable.h | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) commit 1e55b44d9ecd42dee7106ce635ffd855183f5221 Author: Usama Arif Date: Fri Nov 4 06:16:59 2022 +0000 arm64: paravirt: remove conduit check in has_pv_steal_clock arm_smccc_1_1_invoke() which is called later on in the function will return failure if there's no conduit (or pre-SMCCC 1.1), hence the check is unnecessary. Suggested-by: Steven Price Signed-off-by: Usama Arif Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20221104061659.4116508-1-usama.arif@bytedance.com Signed-off-by: Will Deacon arch/arm64/kernel/paravirt.c | 4 ---- 1 file changed, 4 deletions(-) commit 3b619e22c4601b444ed2d6a5458271f72625ac89 Author: Ard Biesheuvel Date: Thu Oct 27 17:59:08 2022 +0200 arm64: implement dynamic shadow call stack for Clang Implement dynamic shadow call stack support on Clang, by parsing the unwind tables at init time to locate all occurrences of PACIASP/AUTIASP instructions, and replacing them with the shadow call stack push and pop instructions, respectively. This is useful because the overhead of the shadow call stack is difficult to justify on hardware that implements pointer authentication (PAC), and given that the PAC instructions are executed as NOPs on hardware that doesn't, we can just replace them without breaking anything. As PACIASP/AUTIASP are guaranteed to be paired with respect to manipulations of the return address, replacing them 1:1 with shadow call stack pushes and pops is guaranteed to result in the desired behavior. Signed-off-by: Ard Biesheuvel Reviewed-by: Sami Tolvanen Tested-by: Sami Tolvanen Link: https://lore.kernel.org/r/20221027155908.1940624-4-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/Kconfig | 9 ++ arch/arm64/Makefile | 10 +- arch/arm64/include/asm/scs.h | 49 ++++++++ arch/arm64/kernel/Makefile | 2 + arch/arm64/kernel/head.S | 3 + arch/arm64/kernel/irq.c | 2 +- arch/arm64/kernel/module.c | 8 ++ arch/arm64/kernel/patch-scs.c | 257 ++++++++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/sdei.c | 2 +- arch/arm64/kernel/setup.c | 4 + 10 files changed, 342 insertions(+), 4 deletions(-) commit 9beccca0984022a844850e32f0d7dd80d4a225de Author: Ard Biesheuvel Date: Thu Oct 27 17:59:07 2022 +0200 scs: add support for dynamic shadow call stacks In order to allow arches to use code patching to conditionally emit the shadow stack pushes and pops, rather than always taking the performance hit even on CPUs that implement alternatives such as stack pointer authentication on arm64, add a Kconfig symbol that can be set by the arch to omit the SCS codegen itself, without otherwise affecting how support code for SCS and compiler options (for register reservation, for instance) are emitted. Also, add a static key and some plumbing to omit the allocation of shadow call stack for dynamic SCS configurations if SCS is disabled at runtime. Signed-off-by: Ard Biesheuvel Reviewed-by: Nick Desaulniers Reviewed-by: Kees Cook Reviewed-by: Sami Tolvanen Tested-by: Sami Tolvanen Link: https://lore.kernel.org/r/20221027155908.1940624-3-ardb@kernel.org Signed-off-by: Will Deacon Makefile | 2 ++ arch/Kconfig | 7 +++++++ include/linux/scs.h | 18 ++++++++++++++++++ kernel/scs.c | 14 ++++++++++++-- 4 files changed, 39 insertions(+), 2 deletions(-) commit 68c76ad4a9571a2b603665c85cf8229bcf04982a Author: Ard Biesheuvel Date: Thu Oct 27 17:59:06 2022 +0200 arm64: unwind: add asynchronous unwind tables to kernel and modules Enable asynchronous unwind table generation for both the core kernel as well as modules, and emit the resulting .eh_frame sections as init code so we can use the unwind directives for code patching at boot or module load time. This will be used by dynamic shadow call stack support, which will rely on code patching rather than compiler codegen to emit the shadow call stack push and pop instructions. Signed-off-by: Ard Biesheuvel Reviewed-by: Nick Desaulniers Reviewed-by: Sami Tolvanen Tested-by: Sami Tolvanen Link: https://lore.kernel.org/r/20221027155908.1940624-2-ardb@kernel.org Signed-off-by: Will Deacon arch/arm64/Kconfig | 3 +++ arch/arm64/Makefile | 5 +++++ arch/arm64/include/asm/module.lds.h | 8 ++++++++ arch/arm64/kernel/pi/Makefile | 1 + arch/arm64/kernel/vmlinux.lds.S | 13 +++++++++++++ arch/arm64/kvm/hyp/nvhe/Makefile | 1 + drivers/firmware/efi/libstub/Makefile | 1 + include/asm-generic/vmlinux.lds.h | 9 +++++++-- scripts/module.lds.S | 6 ++++++ 9 files changed, 45 insertions(+), 2 deletions(-) commit 9263c69696c8c75ef97ebf57cb4f308c4c2420ea Author: Konrad Dybcio Date: Wed Nov 9 12:08:45 2022 +0100 regulator: qcom,smd: Document PMR735a PMR735a also appears to be bundled with some SMD RPM SoCs. Document it. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221109110846.45789-1-konrad.dybcio@linaro.org Signed-off-by: Mark Brown .../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 0cda8c43aa2477b7a9f9bed0adff2f34d3afc143 Author: Konrad Dybcio Date: Wed Nov 9 12:08:46 2022 +0100 regulator: qcom_smd: Add PMR735a regulators PMR735a is already supported in the RPMH regulator driver, but there are cases where it's bundled with SMD RPM SoCs. Port it over to qcom_smd-regulator to enable usage in such cases. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221109110846.45789-2-konrad.dybcio@linaro.org Signed-off-by: Mark Brown drivers/regulator/qcom_smd-regulator.c | 24 ++++++++++++++++++++++++ include/linux/soc/qcom/smd-rpm.h | 2 ++ 2 files changed, 26 insertions(+) commit 837a55847ead27362aac80aa1cf402459a9757f7 Author: Daisuke Matsuda Date: Mon Nov 7 14:53:38 2022 +0900 RDMA/rxe: Implement packet length validation on responder The function check_length() is supposed to check the length of inbound packets on responder, but it actually has been a stub since the driver was born. Let it check the payload length and the DMA length. Signed-off-by: Daisuke Matsuda Link: https://lore.kernel.org/r/20221107055338.357184-1-matsuda-daisuke@fujitsu.com Reviewed-by: Li Zhijian Acked-by: Zhu Yanjun Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_resp.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) commit c5195b027d29bbaae0c9668704ab996773788d23 Author: Mark Brown Date: Mon Oct 17 16:25:20 2022 +0100 kselftest/arm64: Add SVE 2.1 to hwcap test Add coverage for FEAT_SVE2p1. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20221017152520.1039165-7-broonie@kernel.org Signed-off-by: Will Deacon tools/testing/selftests/arm64/abi/hwcap.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit d12aada8dfb030f7df8ec0bb0ce4bb01a2ab3944 Author: Mark Brown Date: Mon Oct 17 16:25:19 2022 +0100 arm64/hwcap: Add support for SVE 2.1 FEAT_SVE2p1 introduces a number of new SVE instructions. Since there is no new architectural state added kernel support is simply a new hwcap which lets userspace know that the feature is supported. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20221017152520.1039165-6-broonie@kernel.org Signed-off-by: Will Deacon Documentation/arm64/elf_hwcaps.rst | 3 +++ Documentation/arm64/sve.rst | 1 + arch/arm64/include/asm/hwcap.h | 1 + arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 1 + arch/arm64/kernel/cpuinfo.c | 1 + arch/arm64/tools/sysreg | 1 + 7 files changed, 9 insertions(+) commit 989d37fc3d976f6bfa3f1da484f8f22c57c21c0c Author: Mark Brown Date: Mon Oct 17 16:25:18 2022 +0100 kselftest/arm64: Add FEAT_RPRFM to the hwcap test Since the newly added instruction is in the HINT space we can't reasonably test for it actually being present. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20221017152520.1039165-5-broonie@kernel.org Signed-off-by: Will Deacon tools/testing/selftests/arm64/abi/hwcap.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 939e4649d4fd54b622d08cd57100828df7a82074 Author: Mark Brown Date: Mon Oct 17 16:25:17 2022 +0100 arm64/hwcap: Add support for FEAT_RPRFM FEAT_RPRFM adds a new range prefetch hint within the existing PRFM space for range prefetch hinting. Add a new hwcap to allow userspace to discover support for the new instruction. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20221017152520.1039165-4-broonie@kernel.org Signed-off-by: Will Deacon Documentation/arm64/elf_hwcaps.rst | 3 +++ arch/arm64/include/asm/hwcap.h | 1 + arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 2 ++ arch/arm64/kernel/cpuinfo.c | 1 + arch/arm64/tools/sysreg | 6 +++++- 6 files changed, 13 insertions(+), 1 deletion(-) commit b0ab73a5479fdf6b42babaccf22b4fa88f5a20a6 Author: Mark Brown Date: Mon Oct 17 16:25:16 2022 +0100 kselftest/arm64: Add FEAT_CSSC to the hwcap selftest Add FEAT_CSSC to the set of features checked by the hwcap selftest. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20221017152520.1039165-3-broonie@kernel.org Signed-off-by: Will Deacon tools/testing/selftests/arm64/abi/hwcap.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 95aa6860d60881e8f08956e02199f7d65c9cbf7b Author: Mark Brown Date: Mon Oct 17 16:25:15 2022 +0100 arm64/hwcap: Add support for FEAT_CSSC FEAT_CSSC adds a number of new instructions usable to optimise common short sequences of instructions, add a hwcap indicating that the feature is available and can be used by userspace. Signed-off-by: Mark Brown Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20221017152520.1039165-2-broonie@kernel.org Signed-off-by: Will Deacon Documentation/arm64/elf_hwcaps.rst | 3 +++ arch/arm64/include/asm/hwcap.h | 1 + arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 2 ++ arch/arm64/kernel/cpuinfo.c | 1 + arch/arm64/tools/sysreg | 7 ++++++- 6 files changed, 14 insertions(+), 1 deletion(-) commit d663b8a285986072428a6a145e5994bc275df994 Author: Paolo Bonzini Date: Thu Nov 3 10:44:10 2022 -0400 KVM: replace direct irq.h inclusion virt/kvm/irqchip.c is including "irq.h" from the arch-specific KVM source directory (i.e. not from arch/*/include) for the sole purpose of retrieving irqchip_in_kernel. Making the function inline in a header that is already included, such as asm/kvm_host.h, is not possible because it needs to look at struct kvm which is defined after asm/kvm_host.h is included. So add a kvm_arch_irqchip_in_kernel non-inline function; irqchip_in_kernel() is only performance critical on arm64 and x86, and the non-inline function is enough on all other architectures. irq.h can then be deleted from all architectures except x86. Signed-off-by: Paolo Bonzini arch/arm64/kvm/arm.c | 5 +++++ arch/arm64/kvm/irq.h | 16 ---------------- arch/powerpc/kvm/irq.h | 22 ---------------------- arch/powerpc/kvm/powerpc.c | 18 ++++++++++++++++-- arch/s390/kvm/irq.h | 19 ------------------- arch/s390/kvm/kvm-s390.c | 5 +++++ arch/x86/kvm/irq.c | 5 +++++ include/linux/kvm_host.h | 2 ++ virt/kvm/irqchip.c | 3 +-- 9 files changed, 34 insertions(+), 61 deletions(-) commit de0f619564f4713bd548b82d535a954ffa1ee7d8 Author: Like Xu Date: Fri Sep 23 00:13:55 2022 +0000 KVM: x86/pmu: Defer counter emulated overflow via pmc->prev_counter Defer reprogramming counters and handling overflow via KVM_REQ_PMU when incrementing counters. KVM skips emulated WRMSR in the VM-Exit fastpath, the fastpath runs with IRQs disabled, skipping instructions can increment and reprogram counters, reprogramming counters can sleep, and sleeping is disallowed while IRQs are disabled. [*] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580 [*] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 2981888, name: CPU 15/KVM [*] preempt_count: 1, expected: 0 [*] RCU nest depth: 0, expected: 0 [*] INFO: lockdep is turned off. [*] irq event stamp: 0 [*] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [*] hardirqs last disabled at (0): [] copy_process+0x146a/0x62d0 [*] softirqs last enabled at (0): [] copy_process+0x14a9/0x62d0 [*] softirqs last disabled at (0): [<0000000000000000>] 0x0 [*] Preemption disabled at: [*] [] vcpu_enter_guest+0x1001/0x3dc0 [kvm] [*] CPU: 17 PID: 2981888 Comm: CPU 15/KVM Kdump: 5.19.0-rc1-g239111db364c-dirty #2 [*] Call Trace: [*] [*] dump_stack_lvl+0x6c/0x9b [*] __might_resched.cold+0x22e/0x297 [*] __mutex_lock+0xc0/0x23b0 [*] perf_event_ctx_lock_nested+0x18f/0x340 [*] perf_event_pause+0x1a/0x110 [*] reprogram_counter+0x2af/0x1490 [kvm] [*] kvm_pmu_trigger_event+0x429/0x950 [kvm] [*] kvm_skip_emulated_instruction+0x48/0x90 [kvm] [*] handle_fastpath_set_msr_irqoff+0x349/0x3b0 [kvm] [*] vmx_vcpu_run+0x268e/0x3b80 [kvm_intel] [*] vcpu_enter_guest+0x1d22/0x3dc0 [kvm] Add a field to kvm_pmc to track the previous counter value in order to defer overflow detection to kvm_pmu_handle_event() (the counter must be paused before handling overflow, and that may increment the counter). Opportunistically shrink sizeof(struct kvm_pmc) a bit. Suggested-by: Wanpeng Li Fixes: 9cd803d496e7 ("KVM: x86: Update vPMCs when retiring instructions") Signed-off-by: Like Xu Link: https://lore.kernel.org/r/20220831085328.45489-6-likexu@tencent.com [sean: avoid re-triggering KVM_REQ_PMU on overflow, tweak changelog] Signed-off-by: Sean Christopherson Message-Id: <20220923001355.3741194-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 5 +++-- arch/x86/kvm/pmu.c | 32 ++++++++++++++++---------------- arch/x86/kvm/svm/pmu.c | 2 +- arch/x86/kvm/vmx/pmu_intel.c | 4 ++-- 4 files changed, 22 insertions(+), 21 deletions(-) commit 68fb4757e8678894530ee0b15c29a3567207b970 Author: Like Xu Date: Fri Sep 23 00:13:54 2022 +0000 KVM: x86/pmu: Defer reprogram_counter() to kvm_pmu_handle_event() Batch reprogramming PMU counters by setting KVM_REQ_PMU and thus deferring reprogramming kvm_pmu_handle_event() to avoid reprogramming a counter multiple times during a single VM-Exit. Deferring programming will also allow KVM to fix a bug where immediately reprogramming a counter can result in sleeping (taking a mutex) while interrupts are disabled in the VM-Exit fastpath. Introduce kvm_pmu_request_counter_reprogam() to make it obvious that KVM is _requesting_ a reprogram and not actually doing the reprogram. Opportunistically refine related comments to avoid misunderstandings. Signed-off-by: Like Xu Link: https://lore.kernel.org/r/20220831085328.45489-5-likexu@tencent.com Signed-off-by: Sean Christopherson Message-Id: <20220923001355.3741194-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/pmu.c | 17 ++++++++++++----- arch/x86/kvm/pmu.h | 6 +++++- arch/x86/kvm/svm/pmu.c | 2 +- arch/x86/kvm/vmx/pmu_intel.c | 6 +++--- 5 files changed, 22 insertions(+), 10 deletions(-) commit dcbb816a2842e41d3ec22605c6760837d800b20a Author: Sean Christopherson Date: Fri Sep 23 00:13:53 2022 +0000 KVM: x86/pmu: Clear "reprogram" bit if counter is disabled or disallowed When reprogramming a counter, clear the counter's "reprogram pending" bit if the counter is disabled (by the guest) or is disallowed (by the userspace filter). In both cases, there's no need to re-attempt programming on the next coincident KVM_REQ_PMU as enabling the counter by either method will trigger reprogramming. Signed-off-by: Sean Christopherson Message-Id: <20220923001355.3741194-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit f1c5651fda43e0c62a32456cdc6f254f40457409 Author: Sean Christopherson Date: Fri Sep 23 00:13:52 2022 +0000 KVM: x86/pmu: Force reprogramming of all counters on PMU filter change Force vCPUs to reprogram all counters on a PMU filter change to provide a sane ABI for userspace. Use the existing KVM_REQ_PMU to do the programming, and take advantage of the fact that the reprogram_pmi bitmap fits in a u64 to set all bits in a single atomic update. Note, setting the bitmap and making the request needs to be done _after_ the SRCU synchronization to ensure that vCPUs will reprogram using the new filter. KVM's current "lazy" approach is confusing and non-deterministic. It's confusing because, from a developer perspective, the code is buggy as it makes zero sense to let userspace modify the filter but then not actually enforce the new filter. The lazy approach is non-deterministic because KVM enforces the filter whenever a counter is reprogrammed, not just on guest WRMSRs, i.e. a guest might gain/lose access to an event at random times depending on what is going on in the host. Note, the resulting behavior is still non-determinstic while the filter is in flux. If userspace wants to guarantee deterministic behavior, all vCPUs should be paused during the filter update. Jim Mattson Fixes: 66bb8a065f5a ("KVM: x86: PMU Event Filter") Cc: Aaron Lewis Signed-off-by: Sean Christopherson Message-Id: <20220923001355.3741194-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 11 ++++++++++- arch/x86/kvm/pmu.c | 13 ++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) commit 3a05675722250a522c148f6de0cc190f407c4bb5 Author: Sean Christopherson Date: Wed Oct 19 16:56:18 2022 +0000 KVM: x86/mmu: WARN if TDP MMU SP disallows hugepage after being zapped Extend the accounting sanity check in kvm_recover_nx_huge_pages() to the TDP MMU, i.e. verify that zapping a shadow page unaccounts the disallowed NX huge page regardless of the MMU type. Recovery runs while holding mmu_lock for write and so it should be impossible to get false positives on the WARN. Suggested-by: Yan Zhao Signed-off-by: Sean Christopherson Message-Id: <20221019165618.927057-9-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 76901e56fb517db61939efdf54e9581b117d615d Author: Mingwei Zhang Date: Wed Oct 19 16:56:17 2022 +0000 KVM: x86/mmu: explicitly check nx_hugepage in disallowed_hugepage_adjust() Explicitly check if a NX huge page is disallowed when determining if a page fault needs to be forced to use a smaller sized page. KVM currently assumes that the NX huge page mitigation is the only scenario where KVM will force a shadow page instead of a huge page, and so unnecessarily keeps an existing shadow page instead of replacing it with a huge page. Any scenario that causes KVM to zap leaf SPTEs may result in having a SP that can be made huge without violating the NX huge page mitigation. E.g. prior to commit 5ba7c4c6d1c7 ("KVM: x86/MMU: Zap non-leaf SPTEs when disabling dirty logging"), KVM would keep shadow pages after disabling dirty logging due to a live migration being canceled, resulting in degraded performance due to running with 4kb pages instead of huge pages. Although the dirty logging case is "fixed", that fix is coincidental, i.e. is an implementation detail, and there are other scenarios where KVM will zap leaf SPTEs. E.g. zapping leaf SPTEs in response to a host page migration (mmu_notifier invalidation) to create a huge page would yield a similar result; KVM would see the shadow-present non-leaf SPTE and assume a huge page is disallowed. Fixes: b8e8c8303ff2 ("kvm: mmu: ITLB_MULTIHIT mitigation") Reviewed-by: Ben Gardon Reviewed-by: David Matlack Signed-off-by: Mingwei Zhang [sean: use spte_to_child_sp(), massage changelog, fold into if-statement] Signed-off-by: Sean Christopherson Reviewed-by: Yan Zhao Message-Id: <20221019165618.927057-8-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5e3edd7e8b7e8004c9bb8310fd669a9ca81de207 Author: Sean Christopherson Date: Wed Oct 19 16:56:16 2022 +0000 KVM: x86/mmu: Add helper to convert SPTE value to its shadow page Add a helper to convert a SPTE to its shadow page to deduplicate a variety of flows and hopefully avoid future bugs, e.g. if KVM attempts to get the shadow page for a SPTE without dropping high bits. Opportunistically add a comment in mmu_free_root_page() documenting why it treats the root HPA as a SPTE. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221019165618.927057-7-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 17 ++++++++++------- arch/x86/kvm/mmu/mmu_internal.h | 12 ------------ arch/x86/kvm/mmu/spte.h | 17 +++++++++++++++++ arch/x86/kvm/mmu/tdp_mmu.h | 2 ++ 4 files changed, 29 insertions(+), 19 deletions(-) commit d25ceb9264364dca0683748b301340097fdab6c7 Author: Sean Christopherson Date: Wed Oct 19 16:56:15 2022 +0000 KVM: x86/mmu: Track the number of TDP MMU pages, but not the actual pages Track the number of TDP MMU "shadow" pages instead of tracking the pages themselves. With the NX huge page list manipulation moved out of the common linking flow, elminating the list-based tracking means the happy path of adding a shadow page doesn't need to acquire a spinlock and can instead inc/dec an atomic. Keep the tracking as the WARN during TDP MMU teardown on leaked shadow pages is very, very useful for detecting KVM bugs. Tracking the number of pages will also make it trivial to expose the counter to userspace as a stat in the future, which may or may not be desirable. Note, the TDP MMU needs to use a separate counter (and stat if that ever comes to be) from the existing n_used_mmu_pages. The TDP MMU doesn't bother supporting the shrinker nor does it honor KVM_SET_NR_MMU_PAGES (because the TDP MMU consumes so few pages relative to shadow paging), and including TDP MMU pages in that counter would break both the shrinker and shadow MMUs, e.g. if a VM is using nested TDP. Cc: Yan Zhao Reviewed-by: Mingwei Zhang Reviewed-by: David Matlack Signed-off-by: Sean Christopherson Reviewed-by: Yan Zhao Message-Id: <20221019165618.927057-6-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 11 +++-------- arch/x86/kvm/mmu/tdp_mmu.c | 20 +++++++++----------- 2 files changed, 12 insertions(+), 19 deletions(-) commit 61f94478547bb4fdcd4c4f37a0aa723d610a7422 Author: Sean Christopherson Date: Wed Oct 19 16:56:14 2022 +0000 KVM: x86/mmu: Set disallowed_nx_huge_page in TDP MMU before setting SPTE Set nx_huge_page_disallowed in TDP MMU shadow pages before making the SP visible to other readers, i.e. before setting its SPTE. This will allow KVM to query the flag when determining if a shadow page can be replaced by a NX huge page without violating the rules of the mitigation. Note, the shadow/legacy MMU holds mmu_lock for write, so it's impossible for another CPU to see a shadow page without an up-to-date nx_huge_page_disallowed, i.e. only the TDP MMU needs the complicated dance. Signed-off-by: Sean Christopherson Reviewed-by: David Matlack Reviewed-by: Yan Zhao Message-Id: <20221019165618.927057-5-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 28 +++++++++++++++++++--------- arch/x86/kvm/mmu/mmu_internal.h | 5 ++--- arch/x86/kvm/mmu/tdp_mmu.c | 31 ++++++++++++++++++------------- 3 files changed, 39 insertions(+), 25 deletions(-) commit b5b0977f4aa28ef2166894b05f37d8f8028a76ce Author: Sean Christopherson Date: Wed Oct 19 16:56:13 2022 +0000 KVM: x86/mmu: Properly account NX huge page workaround for nonpaging MMUs Account and track NX huge pages for nonpaging MMUs so that a future enhancement to precisely check if a shadow page can't be replaced by a NX huge page doesn't get false positives. Without correct tracking, KVM can get stuck in a loop if an instruction is fetching and writing data on the same huge page, e.g. KVM installs a small executable page on the fetch fault, replaces it with an NX huge page on the write fault, and faults again on the fetch. Alternatively, and perhaps ideally, KVM would simply not enforce the workaround for nonpaging MMUs. The guest has no page tables to abuse and KVM is guaranteed to switch to a different MMU on CR0.PG being toggled so there's no security or performance concerns. However, getting make_spte() to play nice now and in the future is unnecessarily complex. In the current code base, make_spte() can enforce the mitigation if TDP is enabled or the MMU is indirect, but make_spte() may not always have a vCPU/MMU to work with, e.g. if KVM were to support in-line huge page promotion when disabling dirty logging. Without a vCPU/MMU, KVM could either pass in the correct information and/or derive it from the shadow page, but the former is ugly and the latter subtly non-trivial due to the possibility of direct shadow pages in indirect MMUs. Given that using shadow paging with an unpaged guest is far from top priority _and_ has been subjected to the workaround since its inception, keep it simple and just fix the accounting glitch. Signed-off-by: Sean Christopherson Reviewed-by: David Matlack Reviewed-by: Mingwei Zhang Message-Id: <20221019165618.927057-4-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 +- arch/x86/kvm/mmu/spte.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) commit 55c510e26ab6181c132327a8b90c864e6193ce27 Author: Sean Christopherson Date: Wed Oct 19 16:56:12 2022 +0000 KVM: x86/mmu: Rename NX huge pages fields/functions for consistency Rename most of the variables/functions involved in the NX huge page mitigation to provide consistency, e.g. lpage vs huge page, and NX huge vs huge NX, and also to provide clarity, e.g. to make it obvious the flag applies only to the NX huge page mitigation, not to any condition that prevents creating a huge page. Add a comment explaining what the newly named "possible_nx_huge_pages" tracks. Leave the nx_lpage_splits stat alone as the name is ABI and thus set in stone. Signed-off-by: Sean Christopherson Reviewed-by: Mingwei Zhang Message-Id: <20221019165618.927057-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 19 ++++++++--- arch/x86/kvm/mmu/mmu.c | 71 +++++++++++++++++++++-------------------- arch/x86/kvm/mmu/mmu_internal.h | 22 ++++++++----- arch/x86/kvm/mmu/paging_tmpl.h | 2 +- arch/x86/kvm/mmu/tdp_mmu.c | 8 ++--- 5 files changed, 71 insertions(+), 51 deletions(-) commit 428e921611bcad9ab95078baf9abe14688de43f0 Author: Sean Christopherson Date: Wed Oct 19 16:56:11 2022 +0000 KVM: x86/mmu: Tag disallowed NX huge pages even if they're not tracked Tag shadow pages that cannot be replaced with an NX huge page regardless of whether or not zapping the page would allow KVM to immediately create a huge page, e.g. because something else prevents creating a huge page. I.e. track pages that are disallowed from being NX huge pages regardless of whether or not the page could have been huge at the time of fault. KVM currently tracks pages that were disallowed from being huge due to the NX workaround if and only if the page could otherwise be huge. But that fails to handled the scenario where whatever restriction prevented KVM from installing a huge page goes away, e.g. if dirty logging is disabled, the host mapping level changes, etc... Failure to tag shadow pages appropriately could theoretically lead to false negatives, e.g. if a fetch fault requests a small page and thus isn't tracked, and a read/write fault later requests a huge page, KVM will not reject the huge page as it should. To avoid yet another flag, initialize the list_head and use list_empty() to determine whether or not a page is on the list of NX huge pages that should be recovered. Note, the TDP MMU accounting is still flawed as fixing the TDP MMU is more involved due to mmu_lock being held for read. This will be addressed in a future commit. Fixes: 5bcaf3e1715f ("KVM: x86/mmu: Account NX huge page disallowed iff huge page was requested") Signed-off-by: Sean Christopherson Message-Id: <20221019165618.927057-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 32 ++++++++++++++++++++++++-------- arch/x86/kvm/mmu/mmu_internal.h | 10 +++++++++- arch/x86/kvm/mmu/paging_tmpl.h | 6 +++--- arch/x86/kvm/mmu/tdp_mmu.c | 4 +++- 4 files changed, 39 insertions(+), 13 deletions(-) commit f7d64772712350fd35f1d76d16dec030a81029eb Author: Aaron Lewis Date: Wed Sep 21 15:15:25 2022 +0000 selftests: kvm/x86: Test the flags in MSR filtering and MSR exiting When using the flags in KVM_X86_SET_MSR_FILTER and KVM_CAP_X86_USER_SPACE_MSR it is expected that an attempt to write to any of the unused bits will fail. Add testing to walk over every bit in each of the flag fields in MSR filtering and MSR exiting to verify that unused bits return and error and used bits, i.e. valid bits, succeed. Signed-off-by: Aaron Lewis Message-Id: <20220921151525.904162-6-aaronlewis@google.com> Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/userspace_msr_exit_test.c | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit 8aff460f216753d86ab90ddbcab0125ab2400335 Author: Aaron Lewis Date: Wed Sep 21 15:15:24 2022 +0000 KVM: x86: Add a VALID_MASK for the flags in kvm_msr_filter_range Add the mask KVM_MSR_FILTER_RANGE_VALID_MASK for the flags in the struct kvm_msr_filter_range. This simplifies checks that validate these flags, and makes it easier to introduce new flags in the future. No functional change intended. Signed-off-by: Aaron Lewis Message-Id: <20220921151525.904162-5-aaronlewis@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/uapi/asm/kvm.h | 2 ++ arch/x86/kvm/x86.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit c1340fe3590ebbe729294c728234434ef31a7c7a Author: Aaron Lewis Date: Wed Sep 21 15:15:23 2022 +0000 KVM: x86: Add a VALID_MASK for the flag in kvm_msr_filter Add the mask KVM_MSR_FILTER_VALID_MASK for the flag in the struct kvm_msr_filter. This makes it easier to introduce new flags in the future. No functional change intended. Signed-off-by: Aaron Lewis Message-Id: <20220921151525.904162-4-aaronlewis@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/uapi/asm/kvm.h | 1 + arch/x86/kvm/x86.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit db205f7e1edc8d8f0880f0218d3a03b13fe94af3 Author: Aaron Lewis Date: Wed Sep 21 15:15:22 2022 +0000 KVM: x86: Add a VALID_MASK for the MSR exit reason flags Add the mask KVM_MSR_EXIT_REASON_VALID_MASK for the MSR exit reason flags. This simplifies checks that validate these flags, and makes it easier to introduce new flags in the future. No functional change intended. Signed-off-by: Aaron Lewis Message-Id: <20220921151525.904162-3-aaronlewis@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 4 +--- include/uapi/linux/kvm.h | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) commit be83794210e7020fef98596f4513aafbed659cd1 Author: Aaron Lewis Date: Wed Sep 21 15:15:21 2022 +0000 KVM: x86: Disallow the use of KVM_MSR_FILTER_DEFAULT_ALLOW in the kernel Protect the kernel from using the flag KVM_MSR_FILTER_DEFAULT_ALLOW. Its value is 0, and using it incorrectly could have unintended consequences. E.g. prevent someone in the kernel from writing something like this. if (filter.flags & KVM_MSR_FILTER_DEFAULT_ALLOW) and getting confused when it doesn't work. It would be more ideal to remove this flag altogether, but userspace may already be using it, so protecting the kernel is all that can reasonably be done at this point. Suggested-by: Sean Christopherson Signed-off-by: Aaron Lewis Reviewed-by: Sean Christopherson Message-Id: <20220921151525.904162-2-aaronlewis@google.com> Signed-off-by: Paolo Bonzini arch/x86/include/uapi/asm/kvm.h | 2 ++ 1 file changed, 2 insertions(+) commit 766576874b9732ad6a65595296de351c064b4c0b Author: Peter Xu Date: Tue Oct 11 15:59:47 2022 -0400 kvm: x86: Allow to respond to generic signals during slow PF Enable x86 slow page faults to be able to respond to non-fatal signals, returning -EINTR properly when it happens. Signed-off-by: Peter Xu Reviewed-by: Sean Christopherson Message-Id: <20221011195947.557281-1-peterx@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit c8b88b332bedf47a9aa008dfb69998c90623375c Author: Peter Xu Date: Tue Oct 11 15:58:08 2022 -0400 kvm: Add interruptible flag to __gfn_to_pfn_memslot() Add a new "interruptible" flag showing that the caller is willing to be interrupted by signals during the __gfn_to_pfn_memslot() request. Wire it up with a FOLL_INTERRUPTIBLE flag that we've just introduced. This prepares KVM to be able to respond to SIGUSR1 (for QEMU that's the SIGIPI) even during e.g. handling an userfaultfd page fault. No functional change intended. Signed-off-by: Peter Xu Reviewed-by: Sean Christopherson Message-Id: <20221011195809.557016-4-peterx@redhat.com> Signed-off-by: Paolo Bonzini arch/arm64/kvm/mmu.c | 2 +- arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +- arch/powerpc/kvm/book3s_64_mmu_radix.c | 2 +- arch/x86/kvm/mmu/mmu.c | 4 ++-- include/linux/kvm_host.h | 4 ++-- virt/kvm/kvm_main.c | 28 +++++++++++++++++----------- virt/kvm/kvm_mm.h | 4 ++-- virt/kvm/pfncache.c | 2 +- 8 files changed, 27 insertions(+), 21 deletions(-) commit fe5ed56c79733b7808f968567c581118ab79552e Author: Peter Xu Date: Tue Oct 11 15:58:07 2022 -0400 kvm: Add KVM_PFN_ERR_SIGPENDING Add a new pfn error to show that we've got a pending signal to handle during hva_to_pfn_slow() procedure (of -EINTR retval). Signed-off-by: Peter Xu Reviewed-by: Sean Christopherson Message-Id: <20221011195809.557016-3-peterx@redhat.com> Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 10 ++++++++++ virt/kvm/kvm_main.c | 2 ++ 2 files changed, 12 insertions(+) commit 93c5c61d9e58a9ea423439d358c198be5b674a58 Author: Peter Xu Date: Tue Oct 11 15:58:06 2022 -0400 mm/gup: Add FOLL_INTERRUPTIBLE We have had FAULT_FLAG_INTERRUPTIBLE but it was never applied to GUPs. One issue with it is that not all GUP paths are able to handle signal delivers besides SIGKILL. That's not ideal for the GUP users who are actually able to handle these cases, like KVM. KVM uses GUP extensively on faulting guest pages, during which we've got existing infrastructures to retry a page fault at a later time. Allowing the GUP to be interrupted by generic signals can make KVM related threads to be more responsive. For examples: (1) SIGUSR1: which QEMU/KVM uses to deliver an inter-process IPI, e.g. when the admin issues a vm_stop QMP command, SIGUSR1 can be generated to kick the vcpus out of kernel context immediately, (2) SIGINT: which can be used with interactive hypervisor users to stop a virtual machine with Ctrl-C without any delays/hangs, (3) SIGTRAP: which grants GDB capability even during page faults that are stuck for a long time. Normally hypervisor will be able to receive these signals properly, but not if we're stuck in a GUP for a long time for whatever reason. It happens easily with a stucked postcopy migration when e.g. a network temp failure happens, then some vcpu threads can hang death waiting for the pages. With the new FOLL_INTERRUPTIBLE, we can allow GUP users like KVM to selectively enable the ability to trap these signals. Reviewed-by: John Hubbard Reviewed-by: David Hildenbrand Signed-off-by: Peter Xu Message-Id: <20221011195809.557016-2-peterx@redhat.com> Signed-off-by: Paolo Bonzini include/linux/mm.h | 1 + mm/gup.c | 33 +++++++++++++++++++++++++++++---- mm/hugetlb.c | 5 ++++- 3 files changed, 34 insertions(+), 5 deletions(-) commit fb28875fd7da184079150295da7ee8d80a70917e Author: Maxim Levitsky Date: Tue Oct 25 15:47:41 2022 +0300 KVM: x86: smm: preserve interrupt shadow in SMRAM When #SMI is asserted, the CPU can be in interrupt shadow due to sti or mov ss. It is not mandatory in Intel/AMD prm to have the #SMI blocked during the shadow, and on top of that, since neither SVM nor VMX has true support for SMI window, waiting for one instruction would mean single stepping the guest. Instead, allow #SMI in this case, but both reset the interrupt window and stash its value in SMRAM to restore it on exit from SMM. This fixes rare failures seen mostly on windows guests on VMX, when #SMI falls on the sti instruction which mainfest in VM entry failure due to EFLAGS.IF not being set, but STI interrupt window still being set in the VMCS. Signed-off-by: Maxim Levitsky Message-Id: <20221025124741.228045-24-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/smm.c | 29 +++++++++++++++++++++++++---- arch/x86/kvm/smm.h | 8 ++++++-- 2 files changed, 31 insertions(+), 6 deletions(-) commit 95504c7c981b3260b3b238ace03f3519bd9a0b6d Author: Maxim Levitsky Date: Tue Oct 25 15:47:40 2022 +0300 KVM: x86: SVM: don't save SVM state to SMRAM when VM is not long mode capable When the guest CPUID doesn't have support for long mode, 32 bit SMRAM layout is used and it has no support for preserving EFER and/or SVM state. Note that this isn't relevant to running 32 bit guests on VM which is long mode capable - such VM can still run 32 bit guests in compatibility mode. Signed-off-by: Maxim Levitsky Message-Id: <20221025124741.228045-23-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit dd5045fed588b3e7ac0a4546138b2fe16d5d0fff Author: Maxim Levitsky Date: Tue Oct 25 15:47:39 2022 +0300 KVM: x86: SVM: use smram structs Use SMM structs in the SVM code as well, which removes the last user of put_smstate/GET_SMSTATE so remove these macros as well. Signed-off-by: Maxim Levitsky Message-Id: <20221025124741.228045-22-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/smm.h | 6 ------ arch/x86/kvm/svm/svm.c | 21 +++++++-------------- 2 files changed, 7 insertions(+), 20 deletions(-) commit e6a82199b610d843d810bc90d1f5df667906c402 Author: Maxim Levitsky Date: Tue Oct 25 15:47:38 2022 +0300 KVM: svm: drop explicit return value of kvm_vcpu_map if kvm_vcpu_map returns non zero value, error path should be triggered regardless of the exact returned error value. Suggested-by: Sean Christopherson Signed-off-by: Maxim Levitsky Message-Id: <20221025124741.228045-21-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8bcda1dee95ae88cade0ad671e0f4d371c005c4d Author: Maxim Levitsky Date: Tue Oct 25 15:47:37 2022 +0300 KVM: x86: smm: use smram struct for 64 bit smram load/restore Use kvm_smram_state_64 struct to save/restore the 64 bit SMM state (used when X86_FEATURE_LM is present in the guest CPUID, regardless of 32-bitness of the guest). Signed-off-by: Maxim Levitsky Message-Id: <20221025124741.228045-20-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/smm.c | 153 ++++++++++++++++++++++------------------------------- 1 file changed, 63 insertions(+), 90 deletions(-) commit f34bdf4c1707cdc687db87965d08bb5a51300c58 Author: Maxim Levitsky Date: Tue Oct 25 15:47:36 2022 +0300 KVM: x86: smm: use smram struct for 32 bit smram load/restore Use kvm_smram_state_32 struct to save/restore 32 bit SMM state (used when X86_FEATURE_LM is not present in the guest CPUID). Signed-off-by: Maxim Levitsky Message-Id: <20221025124741.228045-19-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/smm.c | 155 +++++++++++++++++++++-------------------------------- 1 file changed, 61 insertions(+), 94 deletions(-) commit 58c1d206d545464f9051ad080674b719d553215b Author: Maxim Levitsky Date: Tue Oct 25 15:47:35 2022 +0300 KVM: x86: smm: use smram structs in the common code Use kvm_smram union instad of raw arrays in the common smm code. Signed-off-by: Maxim Levitsky Message-Id: <20221025124741.228045-18-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 5 +++-- arch/x86/kvm/smm.c | 27 ++++++++++++++------------- arch/x86/kvm/svm/svm.c | 8 ++++++-- arch/x86/kvm/vmx/vmx.c | 4 ++-- 4 files changed, 25 insertions(+), 19 deletions(-) commit 09779c16e3eda95312ca14cd263dbb05da147b75 Author: Maxim Levitsky Date: Tue Oct 25 15:47:34 2022 +0300 KVM: x86: smm: add structs for KVM's smram layout Add structs that will be used to define and read/write the KVM's SMRAM layout, instead of reading/writing to raw offsets. Also document the differences between KVM's SMRAM layout and SMRAM layout that is used by real Intel/AMD cpus. Signed-off-by: Maxim Levitsky Message-Id: <20221025124741.228045-17-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/smm.c | 98 +++++++++++++++++++++++++++++++++++++++ arch/x86/kvm/smm.h | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 231 insertions(+) commit 89dccf82e99e95ee465e2b00428494fe64679256 Author: Maxim Levitsky Date: Tue Oct 25 15:47:33 2022 +0300 KVM: x86: smm: check for failures on smm entry In the rare case of the failure on SMM entry, the KVM should at least terminate the VM instead of going south. Suggested-by: Sean Christopherson Signed-off-by: Maxim Levitsky Message-Id: <20221025124741.228045-16-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/smm.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit a7662aa5e56ffa9adf65699eda541f94e157cc83 Author: Paolo Bonzini Date: Mon Nov 7 10:11:42 2022 -0500 KVM: x86: do not define SMM-related constants if SMM disabled The hidden processor flags HF_SMM_MASK and HF_SMM_INSIDE_NMI_MASK are not needed if CONFIG_KVM_SMM is turned off. Remove the definitions altogether and the code that uses them. Suggested-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 3 ++- arch/x86/kvm/kvm_emulate.h | 1 - arch/x86/kvm/smm.c | 2 ++ arch/x86/kvm/x86.c | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) commit 85672346a707d8e4d5657279dac6b356e1edf24a Author: Paolo Bonzini Date: Thu Oct 27 12:44:28 2022 -0400 KVM: zero output of KVM_GET_VCPU_EVENTS before filling in the struct This allows making some fields optional, as will be the case soon for SMM-related data. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit cf7316d0361c5d3289611402b5ac0c64c918b20b Author: Paolo Bonzini Date: Thu Sep 29 13:20:16 2022 -0400 KVM: x86: do not define KVM_REQ_SMI if SMM disabled This ensures that all the relevant code is compiled out, in fact the process_smi stub can be removed too. Signed-off-by: Paolo Bonzini Reviewed-by: Maxim Levitsky Message-Id: <20220929172016.319443-9-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/smm.h | 1 - arch/x86/kvm/x86.c | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) commit ba97bb07e0b28c962015aaf219005928774b886c Author: Paolo Bonzini Date: Thu Sep 29 13:20:15 2022 -0400 KVM: x86: remove SMRAM address space if SMM is not supported If CONFIG_KVM_SMM is not defined HF_SMM_MASK will always be zero, and we can spare userspace the hassle of setting up the SMRAM address space simply by reporting that only one address space is supported. Signed-off-by: Paolo Bonzini Reviewed-by: Maxim Levitsky Message-Id: <20220929172016.319443-8-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 31e83e21cf00fe5b669eb352ff3ed70e74b40fad Author: Paolo Bonzini Date: Thu Sep 29 13:20:14 2022 -0400 KVM: x86: compile out vendor-specific code if SMM is disabled Vendor-specific code that deals with SMI injection and saving/restoring SMM state is not needed if CONFIG_KVM_SMM is disabled, so remove the four callbacks smi_allowed, enter_smm, leave_smm and enable_smi_window. The users in svm/nested.c and x86.c also have to be compiled out; the amount of #ifdef'ed code is small and it's not worth moving it to smm.c. enter_smm is now used only within #ifdef CONFIG_KVM_SMM, and the stub can therefore be removed. Signed-off-by: Paolo Bonzini Reviewed-by: Maxim Levitsky Message-Id: <20220929172016.319443-7-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm-x86-ops.h | 2 ++ arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/smm.h | 1 - arch/x86/kvm/svm/nested.c | 2 ++ arch/x86/kvm/svm/svm.c | 4 ++++ arch/x86/kvm/vmx/vmx.c | 4 ++++ arch/x86/kvm/x86.c | 4 ++++ 7 files changed, 18 insertions(+), 1 deletion(-) commit 4b8e1b32013da2495244dbdee70f2456e6bc7aca Author: Paolo Bonzini Date: Thu Sep 29 13:20:13 2022 -0400 KVM: allow compiling out SMM support Some users of KVM implement the UEFI variable store through a paravirtual device that does not require the "SMM lockbox" component of edk2; allow them to compile out system management mode, which is not a full implementation especially in how it interacts with nested virtualization. Suggested-by: Sean Christopherson Signed-off-by: Paolo Bonzini Reviewed-by: Maxim Levitsky Message-Id: <20220929172016.319443-6-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/Kconfig | 11 +++++++++++ arch/x86/kvm/Makefile | 2 +- arch/x86/kvm/smm.h | 12 ++++++++++++ arch/x86/kvm/svm/svm.c | 2 ++ arch/x86/kvm/vmx/vmx.c | 2 ++ arch/x86/kvm/x86.c | 22 ++++++++++++++++++++-- tools/testing/selftests/kvm/x86_64/smm_test.c | 2 ++ 7 files changed, 50 insertions(+), 3 deletions(-) commit 1d0da94cdafe38b2c501a8d55f981204e588e259 Author: Paolo Bonzini Date: Thu Sep 29 13:20:12 2022 -0400 KVM: x86: do not go through ctxt->ops when emulating rsm Now that RSM is implemented in a single emulator callback, there is no point in going through other callbacks for the sake of modifying processor state. Just invoke KVM's own internal functions directly, and remove the callbacks that were only used by em_rsm; the only substantial difference is in the handling of the segment registers and descriptor cache, which have to be parsed into a struct kvm_segment instead of a struct desc_struct. This also fixes a bug where emulator_set_segment was shifting the limit left by 12 if the G bit is set, but the limit had not been shifted right upon entry to SMM. The emulator context is still used to restore EIP and the general purpose registers. Signed-off-by: Paolo Bonzini Reviewed-by: Maxim Levitsky Message-Id: <20220929172016.319443-5-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/kvm_emulate.h | 13 ---- arch/x86/kvm/smm.c | 182 +++++++++++++++++++++------------------------ arch/x86/kvm/x86.c | 33 -------- 3 files changed, 85 insertions(+), 143 deletions(-) commit f1554150d3c694e30e92c681c20ce9714cac3d42 Author: Paolo Bonzini Date: Fri Oct 28 06:01:26 2022 -0400 KVM: x86: move SMM exit to a new file Some users of KVM implement the UEFI variable store through a paravirtual device that does not require the "SMM lockbox" component of edk2, and would like to compile out system management mode. In preparation for that, move the SMM exit code out of emulate.c and into a new file. The code is still written as a series of invocations of the emulator callbacks, but the two exiting_smm and leave_smm callbacks are merged into one, and all the code from em_rsm is now part of the callback. This removes all knowledge of the format of the SMM save state area from the emulator. Further patches will clean up the code and invoke KVM's own functions to access control registers, descriptor caches, etc. Signed-off-by: Paolo Bonzini Reviewed-by: Maxim Levitsky Message-Id: <20220929172016.319443-4-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 356 +-------------------------------------------- arch/x86/kvm/kvm_emulate.h | 34 ++++- arch/x86/kvm/smm.c | 316 ++++++++++++++++++++++++++++++++++++++++ arch/x86/kvm/smm.h | 1 + arch/x86/kvm/x86.c | 14 -- 5 files changed, 351 insertions(+), 370 deletions(-) commit c53da4f3af6e613e82f88abc6eb988e44c5dadd7 Author: Paolo Bonzini Date: Thu Sep 29 13:20:10 2022 -0400 KVM: x86: move SMM entry to a new file Some users of KVM implement the UEFI variable store through a paravirtual device that does not require the "SMM lockbox" component of edk2, and would like to compile out system management mode. In preparation for that, move the SMM entry code out of x86.c and into a new file. Signed-off-by: Paolo Bonzini Reviewed-by: Maxim Levitsky Message-Id: <20220929172016.319443-3-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/smm.c | 235 +++++++++++++++++++++++++++++++++++++++ arch/x86/kvm/smm.h | 1 + arch/x86/kvm/x86.c | 239 +--------------------------------------- 4 files changed, 239 insertions(+), 237 deletions(-) commit b0b42197b5c6f0d9447e5b710d64c671be8deec1 Author: Paolo Bonzini Date: Thu Sep 29 13:20:09 2022 -0400 KVM: x86: start moving SMM-related functions to new files Create a new header and source with code related to system management mode emulation. Entry and exit will move there too; for now, opportunistically rename put_smstate to PUT_SMSTATE while moving it to smm.h, and adjust the SMM state saving code. Signed-off-by: Paolo Bonzini Reviewed-by: Maxim Levitsky Message-Id: <20220929172016.319443-2-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 6 -- arch/x86/kvm/Makefile | 1 + arch/x86/kvm/emulate.c | 1 + arch/x86/kvm/kvm_cache_regs.h | 5 -- arch/x86/kvm/lapic.c | 8 ++- arch/x86/kvm/lapic.h | 2 +- arch/x86/kvm/mmu/mmu.c | 1 + arch/x86/kvm/smm.c | 37 ++++++++++ arch/x86/kvm/smm.h | 25 +++++++ arch/x86/kvm/svm/nested.c | 1 + arch/x86/kvm/svm/svm.c | 5 +- arch/x86/kvm/vmx/nested.c | 1 + arch/x86/kvm/vmx/vmx.c | 1 + arch/x86/kvm/x86.c | 148 +++++++++++++++------------------------- 14 files changed, 132 insertions(+), 110 deletions(-) commit d08b48585309247d4d28051dd7a315eef5d1db26 Author: Carlos Bilbao Date: Mon Oct 24 11:44:48 2022 -0500 KVM: SVM: Name and check reserved fields with structs offset Rename reserved fields on all structs in arch/x86/include/asm/svm.h following their offset within the structs. Include compile time checks for this in the same place where other BUILD_BUG_ON for the structs are. This also solves that fields of struct sev_es_save_area are named by their order of appearance, but right now they jump from reserved_5 to reserved_7. Link: https://lkml.org/lkml/2022/10/22/376 Signed-off-by: Carlos Bilbao Message-Id: <20221024164448.203351-1-carlos.bilbao@amd.com> [Use ASSERT_STRUCT_OFFSET + fix a couple wrong offsets. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/include/asm/svm.h | 93 ++++++++++++++++++++++++++++++++-------------- arch/x86/kvm/svm/sev.c | 2 +- 2 files changed, 66 insertions(+), 29 deletions(-) commit 07a368b3f55a79d33cad113d506b279e04fd2a00 Author: Maxim Levitsky Date: Tue Oct 25 15:47:27 2022 +0300 bug: introduce ASSERT_STRUCT_OFFSET ASSERT_STRUCT_OFFSET allows to assert during the build of the kernel that a field in a struct have an expected offset. KVM used to have such macro, but there is almost nothing KVM specific in it so move it to build_bug.h, so that it can be used in other places in KVM. Signed-off-by: Maxim Levitsky Message-Id: <20221025124741.228045-10-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmcs12.h | 5 ++--- include/linux/build_bug.h | 9 +++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) commit 00009406f0dbc53b95b9062c0cc297d6893ff394 Author: Rafael Mendonca Date: Thu Oct 20 23:01:13 2022 -0300 x86/kvm: Remove unused virt to phys translation in kvm_guest_cpu_init() Presumably, this was introduced due to a conflict resolution with commit ef68017eb570 ("x86/kvm: Handle async page faults directly through do_page_fault()"), given that the last posted version [1] of the blamed commit was not based on the aforementioned commit. [1] https://lore.kernel.org/kvm/20200525144125.143875-9-vkuznets@redhat.com/ Fixes: b1d405751cd5 ("KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery") Signed-off-by: Rafael Mendonca Message-Id: <20221021020113.922027-1-rafaelmendsr@gmail.com> Signed-off-by: Paolo Bonzini arch/x86/kernel/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb5c8abea09453d8b137e6613980b8e257485868 Author: Jim Mattson Date: Tue Aug 30 15:52:09 2022 -0700 KVM: x86: Insert "AMD" in KVM_X86_FEATURE_PSFD Intel and AMD have separate CPUID bits for each SPEC_CTRL bit. In the case of every bit other than PFSD, the Intel CPUID bit has no vendor name qualifier, but the AMD CPUID bit does. For consistency, rename KVM_X86_FEATURE_PSFD to KVM_X86_FEATURE_AMD_PSFD. No functional change intended. Signed-off-by: Jim Mattson Cc: Babu Moger Message-Id: <20220830225210.2381310-1-jmattson@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3adbdf81038801ee84367845e78bb1a3b36bde39 Author: Miaohe Lin Date: Tue Sep 13 16:54:52 2022 +0800 KVM: x86/mmu: use helper macro SPTE_ENT_PER_PAGE Use helper macro SPTE_ENT_PER_PAGE to get the number of spte entries per page. Minor readability improvement. Signed-off-by: Miaohe Lin Reviewed-by: Sean Christopherson Message-Id: <20220913085452.25561-1-linmiaohe@huawei.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa3e42037ef53c2aea85faf51d6f947e16dd8fc5 Author: Miaohe Lin Date: Tue Sep 13 17:17:25 2022 +0800 KVM: x86/mmu: fix some comment typos Fix some typos in comments. Signed-off-by: Miaohe Lin Reviewed-by: Sean Christopherson Message-Id: <20220913091725.35953-1-linmiaohe@huawei.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 +- arch/x86/kvm/mmu/spte.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0f9edb8cab29667ef5ac50736bb1f9a0557e7f94 Author: Miaohe Lin Date: Tue Sep 13 17:05:37 2022 +0800 KVM: x86: remove obsolete kvm_mmu_gva_to_gpa_fetch() There's no caller. Remove it. Signed-off-by: Miaohe Lin Reviewed-by: Sean Christopherson Message-Id: <20220913090537.25195-1-linmiaohe@huawei.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 -- arch/x86/kvm/x86.c | 10 ---------- 2 files changed, 12 deletions(-) commit 686e0f0324f07ea1979462f659b24b1195996fe0 Author: Sean Christopherson Date: Thu Oct 6 00:03:14 2022 +0000 KVM: x86: Directly query supported PERF_CAPABILITIES for WRMSR checks Use kvm_caps.supported_perf_cap directly instead of bouncing through kvm_get_msr_feature() when checking the incoming value for writes to PERF_CAPABILITIES. Note, kvm_get_msr_feature() is guaranteed to succeed when getting PERF_CAPABILITIES, i.e. dropping that check is a nop. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221006000314.73240-9-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 5fe9805dc2f58bebb3bf5dd298559c4bad5f0448 Author: Sean Christopherson Date: Thu Oct 6 00:03:13 2022 +0000 KVM: x86: Handle PERF_CAPABILITIES in common x86's kvm_get_msr_feature() Handle PERF_CAPABILITIES directly in kvm_get_msr_feature() now that the supported value is available in kvm_caps. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221006000314.73240-8-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 3 --- arch/x86/kvm/vmx/vmx.c | 3 --- arch/x86/kvm/x86.c | 3 +++ 3 files changed, 3 insertions(+), 6 deletions(-) commit 6c6f82bea96fddb96898edbbee248ad362b768f4 Author: Sean Christopherson Date: Thu Oct 6 00:03:12 2022 +0000 KVM: x86: Init vcpu->arch.perf_capabilities in common x86 code Initialize vcpu->arch.perf_capabilities in x86's kvm_arch_vcpu_create() instead of deferring initialization to vendor code. For better or worse, common x86 handles reads and writes to the MSR, and so common x86 should also handle initializing the MSR. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221006000314.73240-7-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 1 - arch/x86/kvm/x86.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) commit bec46859fb9d797a21c983100b1f425bebe89747 Author: Sean Christopherson Date: Thu Oct 6 00:03:11 2022 +0000 KVM: x86: Track supported PERF_CAPABILITIES in kvm_caps Track KVM's supported PERF_CAPABILITIES in kvm_caps instead of computing the supported capabilities on the fly every time. Using kvm_caps will also allow for future cleanups as the kvm_caps values can be used directly in common x86 code. Signed-off-by: Sean Christopherson Acked-by: Like Xu Message-Id: <20221006000314.73240-6-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/svm.c | 2 ++ arch/x86/kvm/vmx/capabilities.h | 25 ------------------------- arch/x86/kvm/vmx/pmu_intel.c | 2 +- arch/x86/kvm/vmx/vmx.c | 34 ++++++++++++++++++++++++++++++---- arch/x86/kvm/x86.h | 1 + 5 files changed, 34 insertions(+), 30 deletions(-) commit 0b9ca98b722969660ad98b39f766a561ccb39f5f Author: Sean Christopherson Date: Thu Oct 6 00:03:07 2022 +0000 perf/x86/core: Zero @lbr instead of returning -1 in x86_perf_get_lbr() stub Drop the return value from x86_perf_get_lbr() and have the stub zero out the @lbr structure instead of returning -1 to indicate "no LBR support". KVM doesn't actually check the return value, and instead subtly relies on zeroing the number of LBRs in intel_pmu_init(). Formalize "nr=0 means unsupported" so that KVM doesn't need to add a pointless check on the return value to fix KVM's benign bug. Note, the stub is necessary even though KVM x86 selects PERF_EVENTS and the caller exists only when CONFIG_KVM_INTEL=y. Despite the name, KVM_INTEL doesn't strictly require CPU_SUP_INTEL, it can be built with any of INTEL || CENTAUR || ZHAOXIN CPUs. Signed-off-by: Sean Christopherson Message-Id: <20221006000314.73240-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/events/intel/lbr.c | 6 +----- arch/x86/include/asm/perf_event.h | 6 +++--- arch/x86/kvm/vmx/capabilities.h | 3 ++- 3 files changed, 6 insertions(+), 9 deletions(-) commit 5eccd0d9fabc4d2ab8d2a0c056fb1d7e2ff892fc Author: Jon Hunter Date: Fri Oct 28 13:33:56 2022 +0100 pwm: tegra: Ensure the clock rate is not less than needed When dynamically scaling the PWM clock, the function dev_pm_opp_set_rate() may set the PWM clock to a rate that is lower than what is required. The clock rate requested when calling dev_pm_opp_set_rate() is the minimum clock rate that is needed to drive the PWM to achieve the required period. Hence, if the actual clock rate is less than the requested clock rate, then the required period cannot be achieved and configuring the PWM fails. Fix this by calling clk_round_rate() to check if the clock rate that will be provided is sufficient and if not, double the required clock rate to ensure the required period can be attained. Fixes: 8c193f4714df ("pwm: tegra: Optimize period calculation") Signed-off-by: Jon Hunter Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-tegra.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f271946117dde2ca8741b8138b347b2d68e6ad56 Author: Jon Hunter Date: Fri Oct 28 13:33:55 2022 +0100 pwm: tegra: Improve required rate calculation For the case where dev_pm_opp_set_rate() is called to set the PWM clock rate, the requested rate is calculated as ... required_clk_rate = (NSEC_PER_SEC / period_ns) << PWM_DUTY_WIDTH; The above calculation may lead to rounding errors because the NSEC_PER_SEC is divided by 'period_ns' before applying the PWM_DUTY_WIDTH multiplication factor. For example, if the period is 45334ns, the above calculation yields a rate of 5646848Hz instead of 5646976Hz. Fix this by applying the multiplication factor before dividing and using the DIV_ROUND_UP macro which yields the expected result of 5646976Hz. Fixes: 1d7796bdb63a ("pwm: tegra: Support dynamic clock frequency configuration") Signed-off-by: Jon Hunter Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/pwm-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f733615e39aa2d6ddeef33b7b2c9aa6a5a2c2785 Author: John Ogness Date: Mon Nov 7 15:21:59 2022 +0106 rcu: Implement lockdep_rcu_enabled for !CONFIG_DEBUG_LOCK_ALLOC Provide an implementation for debug_lockdep_rcu_enabled() when CONFIG_DEBUG_LOCK_ALLOC is not enabled. This allows code to check if rcu lockdep debugging is available without needing an extra check if CONFIG_DEBUG_LOCK_ALLOC is enabled. Signed-off-by: John Ogness Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 5 +++++ 1 file changed, 5 insertions(+) commit 048be156491ff1aeb0fe5ff0862644d38cd39015 Author: Paul Moore Date: Tue Nov 8 13:01:19 2022 -0500 selinux: remove the sidtab context conversion indirect calls The sidtab conversion code has support for multiple context conversion routines through the use of function pointers and indirect calls. However, the reality is that all current users rely on the same conversion routine: convert_context(). This patch does away with this extra complexity and replaces the indirect calls with direct function calls; allowing us to remove a layer of obfuscation and create cleaner, more maintainable code. Reviewed-by: Ondrej Mosnacek Signed-off-by: Paul Moore security/selinux/ss/services.c | 51 +++++++++++++++++------------------------- security/selinux/ss/services.h | 14 +++++++++--- security/selinux/ss/sidtab.c | 21 +++++++++-------- security/selinux/ss/sidtab.h | 3 +-- 4 files changed, 45 insertions(+), 44 deletions(-) commit 6398acf34819da99e5110e7eae47e81ef5e4bb77 Author: Jani Nikula Date: Wed Nov 2 12:08:24 2022 +0200 drm/i915/display: move struct intel_link_m_n to intel_display_types.h struct intel_crtc_state in intel_display_types.h actually needs the struct intel_link_m_n definition, while intel_display.h only needs the forward declaration. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1ec10e4415cf84c51b7eb51092e81876da0bc902.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.h | 10 +--------- drivers/gpu/drm/i915/display/intel_display_types.h | 9 +++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) commit cec9e59cae6071e58140baf54e47c00aaa39851b Author: Nathan Huckleberry Date: Tue Nov 8 17:14:25 2022 -0700 drm: xlnx: Fix return type of zynqmp_dp_bridge_mode_valid The mode_valid field in drm_bridge_helper_funcs is expected to be of type enum drm_mode_status (* mode_valid) (struct drm_bridge *bridge, struct drm_display_mode *mode); The mismatched return type breaks forward edge kCFI since the underlying function definition does not match the function hook definition. A new warning in clang will catch this at compile time: drivers/gpu/drm/xlnx/zynqmp_dp.c:1573:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_bridge *, const struct drm_display_info *, const struct drm_display_mode *)' with an expression of type 'int (struct drm_bridge *, const struct drm_display_info *, const struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict] .mode_valid = zynqmp_dp_bridge_mode_valid, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. The return type of zynqmp_dp_bridge_mode_valid should be changed from int to enum drm_mode_status. Reported-by: Dan Carpenter Link: https://github.com/ClangBuiltLinux/linux/issues/1703 Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Signed-off-by: Nathan Huckleberry Reviewed-by: Laurent Pinchart [nathan: Rebase on drm-misc-next and fix conflicts Add note about new clang warning] Signed-off-by: Nathan Chancellor Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fa627348cfc7fb174468d88756b83c2d97890b07 Author: Greg Kroah-Hartman Date: Sat Oct 1 18:54:26 2022 +0200 driver core: class: make namespace and get_ownership take const * The callbacks in struct class namespace() and get_ownership() do not modify the struct device passed to them, so mark the pointer as constant and fix up all callbacks in the kernel to have the correct function signature. This helps make it more obvious what calls and callbacks do, and do not, modify structures passed to them. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20221001165426.2690912-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 4 ++-- drivers/infiniband/core/device.c | 4 ++-- drivers/net/ipvlan/ipvtap.c | 4 ++-- drivers/net/macvtap.c | 4 ++-- include/linux/device/class.h | 4 ++-- net/core/net-sysfs.c | 8 ++++---- net/wireless/sysfs.c | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) commit 418bb3a69e1355c8977c528f8f3896a0aaaecb80 Author: Biju Das Date: Tue Sep 20 11:55:01 2022 +0100 drm: rcar-du: rzg2l_mipi_dsi: Enhance device lanes check Enhance device lanes check by reading TXSETR register at probe(), and enforced in rzg2l_mipi_dsi_host_attach(). As per HW manual, we can read TXSETR register only after DPHY initialization. Suggested-by: Laurent Pinchart Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rzg2l_mipi_dsi.c | 122 ++++++++++++++++++++++--------- 1 file changed, 88 insertions(+), 34 deletions(-) commit 7a043f978ed1433bddb088a732e9bb91501ebd76 Author: Biju Das Date: Tue Sep 20 11:55:00 2022 +0100 drm: rcar-du: Add RZ/G2L DSI driver This driver supports the MIPI DSI encoder found in the RZ/G2L SoC. It currently supports DSI video mode only. Signed-off-by: Biju Das Acked-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/Kconfig | 8 + drivers/gpu/drm/rcar-du/Makefile | 2 + drivers/gpu/drm/rcar-du/rzg2l_mipi_dsi.c | 762 ++++++++++++++++++++++++++ drivers/gpu/drm/rcar-du/rzg2l_mipi_dsi_regs.h | 151 +++++ 4 files changed, 923 insertions(+) commit b1a90f510230afa9483e38fccbf9e4274c92aa8c Author: Biju Das Date: Tue Sep 20 11:54:59 2022 +0100 dt-bindings: display: bridge: Document RZ/G2L MIPI DSI TX bindings The RZ/G2L MIPI DSI TX is embedded in the Renesas RZ/G2L family SoC's. It can operate in DSI mode, with up to four data lanes. Signed-off-by: Biju Das Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Laurent Pinchart .../bindings/display/bridge/renesas,dsi.yaml | 182 +++++++++++++++++++++ 1 file changed, 182 insertions(+) commit 1760eb547276299ab0c6a6cd3d29469e54ade615 Author: Laurent Pinchart Date: Sun Oct 2 00:31:10 2022 +0300 drm: rcar-du: Drop leftovers dependencies from Kconfig Commit 841281fe52a7 ("drm: rcar-du: Drop LVDS device tree backward compatibility") has removed device tree overlay sources used for backward compatibility with old bindings, but forgot to remove related dependencies from Kconfig. Fix it. Fixes: 841281fe52a7 ("drm: rcar-du: Drop LVDS device tree backward compatibility") Reviewed-by: Geert Uytterhoeven Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit 9a6800d1b9da21302758fb37e58b3ab1cadfc643 Author: Randy Dunlap Date: Thu Nov 3 17:39:21 2022 -0700 sysfs: update Documentation Make editing corrections and updates to sysfs.rst: - spell "sysfs" consistently (vs. "Sysfs") - align field names in a struct - fix some punctuation and grammar - list more /sys top-level subdirectories - change 'fuse.txt' to 'fuse.rst' (although I don't see where the example is) Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20221104003921.31616-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman Documentation/filesystems/sysfs.rst | 41 ++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit 92cf87051894921ab6b14e9ad60dbae2d669bf15 Author: Randy Dunlap Date: Thu Nov 3 17:38:35 2022 -0700 debugfs: small Documentation cleaning Fix punctuation in a parenthetical phrase. Add 2 article adjectives and change one from "an" to "a". Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20221104003835.29472-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman Documentation/filesystems/debugfs.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e63e99397b2613d50a5f4f02ed07307e67a190f1 Author: Yang Yingliang Date: Wed Nov 9 14:40:36 2022 +0800 drivers: dio: fix possible memory leak in dio_init() If device_register() returns error, the 'dev' and name needs be freed. Add a release function, and then call put_device() in the error path, so the name is freed in kobject_cleanup() and to the 'dev' is freed in release function. Fixes: 2e4c77bea3d8 ("m68k: dio - Kill warn_unused_result warnings") Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221109064036.1835346-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/dio/dio.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6fcd7e702d3d91cc2c3194acffd7d67b2c10b81f Author: Kees Cook Date: Tue Oct 18 02:04:10 2022 -0700 devres: Use kmalloc_size_roundup() to match ksize() usage Round up allocations with kmalloc_size_roundup() so that devres's use of ksize() is always accurate and no special handling of the memory is needed by KASAN, UBSAN_BOUNDS, nor FORTIFY_SOURCE. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221018090406.never.856-kees@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/base/devres.c | 3 +++ 1 file changed, 3 insertions(+) commit 3ca6c3b43c72a5fd0399d9ee1c7e5af978895ff1 Merge: bd039b5ea2a9 30d95efe06e1 Author: David S. Miller Date: Wed Nov 9 14:03:49 2022 +0000 Merge tag 'rxrpc-next-20221108' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs rxrpc changes David Howells says: ==================== rxrpc: Increasing SACK size and moving away from softirq, part 1 AF_RXRPC has some issues that need addressing: (1) The SACK table has a maximum capacity of 255, but for modern networks that isn't sufficient. This is hard to increase in the upstream code because of the way the application thread is coupled to the softirq and retransmission side through a ring buffer. Adjustments to the rx protocol allows a capacity of up to 8192, and having a ring sufficiently large to accommodate that would use an excessive amount of memory as this is per-call. (2) Processing ACKs in softirq mode causes the ACKs get conflated, with only the most recent being considered. Whilst this has the upside that the retransmission algorithm only needs to deal with the most recent ACK, it causes DATA transmission for a call to be very bursty because DATA packets cannot be transmitted in softirq mode. Rather transmission must be delegated to either the application thread or a workqueue, so there tend to be sudden bursts of traffic for any particular call due to scheduling delays. (3) All crypto in a single call is done in series; however, each DATA packet is individually encrypted so encryption and decryption of large calls could be parallelised if spare CPU resources are available. This is the first of a number of sets of patches that try and address them. The overall aims of these changes include: (1) To get rid of the TxRx ring and instead pass the packets round in queues (eg. sk_buff_head). On the Tx side, each ACK packet comes with a SACK table that can be parsed as-is, so there's no particular need to maintain our own; we just have to refer to the ACK. On the Rx side, we do need to maintain a SACK table with one bit per entry - but only if packets go missing - and we don't want to have to perform a complex transformation to get the information into an ACK packet. (2) To try and move almost all processing of received packets out of the softirq handler and into a high-priority kernel I/O thread. Only the transferral of packets would be left there. I would still use the encap_rcv hook to receive packets as there's a noticeable performance drop from letting the UDP socket put the packets into its own queue and then getting them out of there. (3) To make the I/O thread also do all the transmission. The app thread would be responsible for packaging the data into packets and then buffering them for the I/O thread to transmit. This would make it easier for the app thread to run ahead of the I/O thread, and would mean the I/O thread is less likely to have to wait around for a new packet to come available for transmission. (4) To logically partition the socket/UAPI/KAPI side of things from the I/O side of things. The local endpoint, connection, peer and call objects would belong to the I/O side. The socket side would not then touch the private internals of calls and suchlike and would not change their states. It would only look at the send queue, receive queue and a way to pass a message to cause an abort. (5) To remove as much locking, synchronisation, barriering and atomic ops as possible from the I/O side. Exclusion would be achieved by limiting modification of state to the I/O thread only. Locks would still need to be used in communication with the UDP socket and the AF_RXRPC socket API. (6) To provide crypto offload kernel threads that, when there's slack in the system, can see packets that need crypting and provide parallelisation in dealing with them. (7) To remove the use of system timers. Since each timer would then send a poke to the I/O thread, which would then deal with it when it had the opportunity, there seems no point in using system timers if, instead, a list of timeouts can be sensibly consulted. An I/O thread only then needs to schedule with a timeout when it is idle. (8) To use zero-copy sendmsg to send packets. This would make use of the I/O thread being the sole transmitter on the socket to manage the dead-reckoning sequencing of the completion notifications. There is a problem with zero-copy, though: the UDP socket doesn't handle running out of option memory very gracefully. With regard to this first patchset, the changes made include: (1) Some fixes, including a fallback for proc_create_net_single_write(), setting ack.bufferSize to 0 in ACK packets and a fix for rxrpc congestion management, which shouldn't be saving the cwnd value between calls. (2) Improvements in rxrpc tracepoints, including splitting the timer tracepoint into a set-timer and a timer-expired trace. (3) Addition of a new proc file to display some stats. (4) Some code cleanups, including removing some unused bits and unnecessary header inclusions. (5) A change to the recently added UDP encap_err_rcv hook so that it has the same signature as {ip,ipv6}_icmp_error(), and then just have rxrpc point its UDP socket's hook directly at those. (6) Definition of a new struct, rxrpc_txbuf, that is used to hold transmissible packets of DATA and ACK type in a single 2KiB block rather than using an sk_buff. This allows the buffer to be on a number of queues simultaneously more easily, and also guarantees that the entire block is in a single unit for zerocopy purposes and that the data payload is aligned for in-place crypto purposes. (7) ACK txbufs are allocated at proposal and queued for later transmission rather than being stored in a single place in the rxrpc_call struct, which means only a single ACK can be pending transmission at a time. The queue is then drained at various points. This allows the ACK generation code to be simplified. (8) The Rx ring buffer is removed. When a jumbo packet is received (which comprises a number of ordinary DATA packets glued together), it used to be pointed to by the ring multiple times, with an annotation in a side ring indicating which subpacket was in that slot - but this is no longer possible. Instead, the packet is cloned once for each subpacket, barring the last, and the range of data is set in the skb private area. This makes it easier for the subpackets in a jumbo packet to be decrypted in parallel. (9) The Tx ring buffer is removed. The side annotation ring that held the SACK information is also removed. Instead, in the event of packet loss, the SACK data attached an ACK packet is parsed. (10) Allocate an skcipher request when needed in the rxkad security class rather than caching one in the rxrpc_call struct. This deals with a race between externally-driven call disconnection getting rid of the skcipher request and sendmsg/recvmsg trying to use it because they haven't seen the completion yet. This is also needed to support parallelisation as the skcipher request cannot be used by two or more threads simultaneously. (11) Call udp_sendmsg() and udpv6_sendmsg() directly rather than going through kernel_sendmsg() so that we can provide our own iterator (zerocopy explicitly doesn't work with a KVEC iterator). This also lets us avoid the overhead of the security hook. ==================== Signed-off-by: David S. Miller commit 9e6002ad9e28209dcefa342977ac683779556dbd Author: Yang Yingliang Date: Wed Nov 2 10:55:34 2022 +0800 Documentation: devres: add missing MEM helper Add missing devm_kstrdup_const() to devres.rst. It's introduce by commit 09d1ea1c7309 ("devres: provide devm_kstrdup_const()"). Fixes: 09d1ea1c7309 ("devres: provide devm_kstrdup_const()") Cc: Bartosz Golaszewski Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Jonathan Corbet Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221102025534.1450337-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) commit 8c3e8a6bdb5253b97ad532570f8b5db5f7a06407 Author: Yang Yingliang Date: Wed Oct 26 16:28:03 2022 +0800 class: fix possible memory leak in __class_register() If class_add_groups() returns error, the 'cp->subsys' need be unregister, and the 'cp' need be freed. We can not call kset_unregister() here, because the 'cls' will be freed in callback function class_release() and it's also freed in caller's error path, it will cause double free. So fix this by calling kobject_del() and kfree_const(name) to cleanup kobject. Besides, call kfree() to free the 'cp'. Fault injection test can trigger this: unreferenced object 0xffff888102fa8190 (size 8): comm "modprobe", pid 502, jiffies 4294906074 (age 49.296s) hex dump (first 8 bytes): 70 6b 74 63 64 76 64 00 pktcdvd. backtrace: [<00000000e7c7703d>] __kmalloc_track_caller+0x1ae/0x320 [<000000005e4d70bc>] kstrdup+0x3a/0x70 [<00000000c2e5e85a>] kstrdup_const+0x68/0x80 [<000000000049a8c7>] kvasprintf_const+0x10b/0x190 [<0000000029123163>] kobject_set_name_vargs+0x56/0x150 [<00000000747219c9>] kobject_set_name+0xab/0xe0 [<0000000005f1ea4e>] __class_register+0x15c/0x49a unreferenced object 0xffff888037274000 (size 1024): comm "modprobe", pid 502, jiffies 4294906074 (age 49.296s) hex dump (first 32 bytes): 00 40 27 37 80 88 ff ff 00 40 27 37 80 88 ff ff .@'7.....@'7.... 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... backtrace: [<00000000151f9600>] kmem_cache_alloc_trace+0x17c/0x2f0 [<00000000ecf3dd95>] __class_register+0x86/0x49a Fixes: ced6473e7486 ("driver core: class: add class_groups support") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221026082803.3458760-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/base/class.c | 5 +++++ 1 file changed, 5 insertions(+) commit e77f069fd6cea822efd15ea79aa61aa6422d4f67 Author: Zhang Rui Date: Tue Nov 8 16:12:20 2022 +0800 thermal: intel: intel_tcc_cooling: Add TCC cooling support for RaptorLake-S Add RaptorLake to the list of processor models supported by the Intel TCC cooling driver. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/intel_tcc_cooling.c | 1 + 1 file changed, 1 insertion(+) commit be6abd3ed65678f8c7bd212808a9841785c2d5ca Author: Zhang Rui Date: Tue Nov 8 16:12:19 2022 +0800 thermal: intel: intel_tcc_cooling: Detect TCC lock bit When MSR_IA32_TEMPERATURE_TARGET is locked, TCC Offset can not be updated even if the PROGRAMMABE Bit is set. Yield the driver on platforms with MSR_IA32_TEMPERATURE_TARGET locked. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/intel_tcc_cooling.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 6bd8ddf05e9a19fb9efebe46bf58f45b9a6af26a Author: Nícolas F. R. A. Prado Date: Mon Nov 7 11:04:37 2022 -0500 ASoC: mediatek: mt8195-mt6359: 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 Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221107160437.740353-10-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8195/mt8195-mt6359.c | 1 + 1 file changed, 1 insertion(+) commit 2d32a3e52b0537638b31b3315ea1feafc5d0bb02 Author: Nícolas F. R. A. Prado Date: Mon Nov 7 11:04:36 2022 -0500 ASoC: mediatek: mt8192-mt6359: 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 Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221107160437.740353-9-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 1 + 1 file changed, 1 insertion(+) commit 5d7c2ac0eb3e830a5c8e30515805b3a345d9b919 Author: Nícolas F. R. A. Prado Date: Mon Nov 7 11:04:35 2022 -0500 ASoC: mediatek: mt8186-rt5682: 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 Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221107160437.740353-8-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c | 1 + 1 file changed, 1 insertion(+) commit 7d6d41e5fbf5e96788c88c9e82a3898ad4cf4f3c Author: Nícolas F. R. A. Prado Date: Mon Nov 7 11:04:34 2022 -0500 ASoC: mediatek: mt8186-da7219: 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 Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221107160437.740353-7-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c | 1 + 1 file changed, 1 insertion(+) commit d8d960d047654613f11d9a542d8f96c24f0a3675 Author: Nícolas F. R. A. Prado Date: Mon Nov 7 11:04:33 2022 -0500 ASoC: mediatek: mt8183-mt6358: 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. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Tested-by: Chen-Yu Tsai Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221107160437.740353-6-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 1 + 1 file changed, 1 insertion(+) commit 33d2d51173f22eec93771f6c8097ce8227c4dbe0 Author: Nícolas F. R. A. Prado Date: Mon Nov 7 11:04:32 2022 -0500 ASoC: mediatek: mt8183-da7219: 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. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221107160437.740353-5-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 1 + 1 file changed, 1 insertion(+) commit 083e948082def40d5d801a3e281d637ee3c0f9bf Author: Nícolas F. R. A. Prado Date: Mon Nov 7 11:04:31 2022 -0500 ASoC: mediatek: mt6797-mt6351: 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 Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221107160437.740353-4-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/mediatek/mt6797/mt6797-mt6351.c | 1 + 1 file changed, 1 insertion(+) commit 59429a5ecc3337aaf6bbd878637250c1c878edc2 Author: Nícolas F. R. A. Prado Date: Mon Nov 7 11:04:30 2022 -0500 ASoC: mediatek: mt2701-wm8960: 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 Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221107160437.740353-3-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/mediatek/mt2701/mt2701-wm8960.c | 1 + 1 file changed, 1 insertion(+) commit f0f217ba7dea78872f5001135984159f4def7047 Author: Nícolas F. R. A. Prado Date: Mon Nov 7 11:04:29 2022 -0500 ASoC: mediatek: mt2701-cs42448: 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 Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20221107160437.740353-2-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/mediatek/mt2701/mt2701-cs42448.c | 1 + 1 file changed, 1 insertion(+) commit a2ba1f70b301b366666e739a1f951f57b8af2cce Author: Bard Liao Date: Tue Nov 8 08:29:10 2022 +0800 ASoC: SOF: ipc4: get pipeline instance id from pipe_widget->instance_id Currently we set pipeline instance id = swidget->pipeline_id, but pipeline_id is from topology and can be any number. In fact, the number of pipelines is limited. This patch use ida to allocate pipeline instance id and will be used for pipeline instance id in the IPC message. Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221108002910.2819709-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 12 ++++++------ sound/soc/sof/ipc4-pcm.c | 4 ++-- sound/soc/sof/ipc4-topology.c | 25 +++++++++++++++++++++---- 3 files changed, 29 insertions(+), 12 deletions(-) commit eb2eaf50395a8164f4f9e0021609ddb40ad97e87 Author: Bard Liao Date: Tue Nov 8 08:29:09 2022 +0800 ASoC: SOF: ipc4-loader: get max pipeline number Get max pipeline number from firmware configuration. Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221108002910.2819709-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-loader.c | 11 +++++++++++ sound/soc/sof/ipc4-priv.h | 2 ++ 2 files changed, 13 insertions(+) commit a29b2d029f79376fa2bdf18bd5285eeeb6bc73b3 Author: Bard Liao Date: Tue Nov 8 08:29:08 2022 +0800 ASoC: SOF: ipc4-topology: rename sof_ipc4_widget_free_comp sof_ipc4_widget_free_comp is dedicated to pipeline. Rename it to sof_ipc4_widget_free_comp_pipeline. Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221108002910.2819709-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 335140116703920ddcbd9a09ae9edfb02902f3d1 Author: Deepak R Varma Date: Tue Nov 8 23:39:56 2022 +0530 staging: rtl8192u: remove redundant macro definitions Several ieee80211_* symbol names are extended with _rsl tag using macros. This is done to avoid a conflict when a similar symbol is already in use in another part of kernel and may lead to conflicts. However, most of these base symbol names are not found to being used anywhere in the code and hence are not useful today. These symbols are not used outside of the module and hence can be safely removed. The code continues to use the original symbol names. Suggested-by: Greg Kroah-Hartman Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/17f69a042e215c484931a0327fdf7775eea5f918.1667930292.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 61 -------------------------- 1 file changed, 61 deletions(-) commit fb7d5ebea988899500e9a067d950034dbe8a0fbd Author: Deepak R Varma Date: Wed Nov 9 16:12:43 2022 +0530 staging: fieldbus: use sysfs_emit() in show functions The show() methods should only use sysfs_emit() when formatting values to be returned to the user space. Ref: Documentation/filesystems/sysfs.rst Issue identified by coccicheck. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y2uEIzebbM/Fs5Jz@qemulion Signed-off-by: Greg Kroah-Hartman drivers/staging/fieldbus/dev_core.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 8ce256540f41c84cb910a681c2cb84e8c80ab8db Author: Gustavo A. R. Silva Date: Tue Nov 8 14:34:46 2022 -0600 staging: ks7010: Avoid clashing function prototypes When built with Control Flow Integrity, function prototypes between caller and function declaration must match. These mismatches are visible at compile time with the new -Wcast-function-type-strict in Clang[1]. Fix a total of 27 warnings like these: drivers/staging/ks7010/ks_wlan_net.c:2415:2: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, struct iw_point *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict] (iw_handler)ks_wlan_get_firmware_version,/* 3 KS_WLAN_GET_FIRM_VERSION */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The ks_wlan_net Wireless Extension handler callbacks (iw_handler) use a union for the data argument. Actually use the union and perform explicit member selection in the function body instead of having a function prototype mismatch. There are no resulting binary differences before/after changes. These changes were made partly manually and partly with the help of Coccinelle. Link: https://reviews.llvm.org/D134831 [1] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/8d2ceee1248b5a76e9b6c379f578e65482c91168.1667934775.git.gustavoars@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 248 ++++++++++++++++++----------------- 1 file changed, 126 insertions(+), 122 deletions(-) commit ce8cc75c7419ad54cb99437543a54c97c7446db5 Author: Duoming Zhou Date: Tue Oct 18 16:34:24 2022 +0800 drivers: staging: r8188eu: Fix sleep-in-atomic-context bug in rtw_join_timeout_handler The rtw_join_timeout_handler() is a timer handler that runs in atomic context, but it could call msleep(). As a result, the sleep-in-atomic-context bug will happen. The process is shown below: (atomic context) rtw_join_timeout_handler _rtw_join_timeout_handler rtw_do_join rtw_select_and_join_from_scanned_queue rtw_indicate_disconnect rtw_lps_ctrl_wk_cmd lps_ctrl_wk_hdl LPS_Leave LPS_RF_ON_check msleep //sleep in atomic context Fix by removing msleep() and replacing with mdelay(). Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver") Signed-off-by: Duoming Zhou Link: https://lore.kernel.org/r/20221018083424.79741-1-duoming@zju.edu.cn Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_pwrctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdf1da5df9da680589a7f74448dd0a94dd3e1446 Author: Bernard Metzler Date: Mon Nov 7 15:50:57 2022 +0100 RDMA/siw: Fix immediate work request flush to completion queue Correctly set send queue element opcode during immediate work request flushing in post sendqueue operation, if the QP is in ERROR state. An undefined ocode value results in out-of-bounds access to an array for mapping the opcode between siw internal and RDMA core representation in work completion generation. It resulted in a KASAN BUG report of type 'global-out-of-bounds' during NFSoRDMA testing. This patch further fixes a potential case of a malicious user which may write undefined values for completion queue elements status or opcode, if the CQ is memory mapped to user land. It avoids the same out-of-bounds access to arrays for status and opcode mapping as described above. Fixes: 303ae1cdfdf7 ("rdma/siw: application interface") Fixes: b0fff7317bb4 ("rdma/siw: completion queue methods") Reported-by: Olga Kornievskaia Reviewed-by: Tom Talpey Signed-off-by: Bernard Metzler Link: https://lore.kernel.org/r/20221107145057.895747-1-bmt@zurich.ibm.com Signed-off-by: Leon Romanovsky drivers/infiniband/sw/siw/siw_cq.c | 24 +++++++++++++++++++-- drivers/infiniband/sw/siw/siw_verbs.c | 40 +++++++++++++++++++++++++++++++---- 2 files changed, 58 insertions(+), 6 deletions(-) commit 27043a7d500c4a3debb899c28bbf492492f64e58 Author: Andy Shevchenko Date: Tue Nov 8 15:38:53 2022 +0200 gpiolib: of: Integrate of_gpiochip_init_valid_mask() into gpiochip_init_valid_mask() In preparation to complete fwnode switch, integrate of_gpiochip_init_valid_mask() into gpiochip_init_valid_mask(). Signed-off-by: Andy Shevchenko Reviewed-by: Dmitry Torokhov Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 42 ------------------------------------ drivers/gpio/gpiolib-of.h | 5 ----- drivers/gpio/gpiolib.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 53 insertions(+), 48 deletions(-) commit 8afe82550240640617abfb3d6ba2c7579261e7fa Author: Andy Shevchenko Date: Tue Nov 8 15:38:52 2022 +0200 gpiolib: of: Prepare of_gpiochip_add() / of_gpiochip_remove() for fwnode GPIO library is getting rid of of_node, fwnode should be utilized instead. Prepare of_gpiochip_add() / of_gpiochip_remove() for fwnode. Signed-off-by: Andy Shevchenko Reviewed-by: Dmitry Torokhov Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit bd039b5ea2a91ea707ee8539df26456bd5be80af Author: Andy Ren Date: Mon Nov 7 09:42:42 2022 -0800 net/core: Allow live renaming when an interface is up Allow a network interface to be renamed when the interface is up. As described in the netconsole documentation [1], when netconsole is used as a built-in, it will bring up the specified interface as soon as possible. As a result, user space will not be able to rename the interface since the kernel disallows renaming of interfaces that are administratively up unless the 'IFF_LIVE_RENAME_OK' private flag was set by the kernel. The original solution [2] to this problem was to add a new parameter to the netconsole configuration parameters that allows renaming of the interface used by netconsole while it is administratively up. However, during the discussion that followed, it became apparent that we have no reason to keep the current restriction and instead we should allow user space to rename interfaces regardless of their administrative state: 1. The restriction was put in place over 20 years ago when renaming was only possible via IOCTL and before rtnetlink started notifying user space about such changes like it does today. 2. The 'IFF_LIVE_RENAME_OK' flag was added over 3 years ago in version 5.2 and no regressions were reported. 3. In-kernel listeners to 'NETDEV_CHANGENAME' do not seem to care about the administrative state of interface. Therefore, allow user space to rename running interfaces by removing the restriction and the associated 'IFF_LIVE_RENAME_OK' flag. Help in possible triage by emitting a message to the kernel log that an interface was renamed while UP. [1] https://www.kernel.org/doc/Documentation/networking/netconsole.rst [2] https://lore.kernel.org/netdev/20221102002420.2613004-1-andy.ren@getcruise.com/ Signed-off-by: Andy Ren Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller include/linux/netdevice.h | 4 +--- net/core/dev.c | 19 ++----------------- net/core/failover.c | 6 +++--- 3 files changed, 6 insertions(+), 23 deletions(-) commit defbab270d45e32b068e7e73c3567232d745c60f Author: Matt Redfearn Date: Tue Sep 27 14:52:56 2022 -0700 include/uapi/linux/swab: Fix potentially missing __always_inline Commit bc27fb68aaad ("include/uapi/linux/byteorder, swab: force inlining of some byteswap operations") added __always_inline to swab functions and commit 283d75737837 ("uapi/linux/stddef.h: Provide __always_inline to userspace headers") added a definition of __always_inline for use in exported headers when the kernel's compiler.h is not available. However, since swab.h does not include stddef.h, if the header soup does not indirectly include it, the definition of __always_inline is missing, resulting in a compilation failure, which was observed compiling the perf tool using exported headers containing this commit: In file included from /usr/include/linux/byteorder/little_endian.h:12:0, from /usr/include/asm/byteorder.h:14, from tools/include/uapi/linux/perf_event.h:20, from perf.h:8, from builtin-bench.c:18: /usr/include/linux/swab.h:160:8: error: unknown type name `__always_inline' static __always_inline __u16 __swab16p(const __u16 *p) Fix this by replacing the inclusion of linux/compiler.h with linux/stddef.h to ensure that we pick up that definition if required, without relying on it's indirect inclusion. compiler.h is then included indirectly, via stddef.h. Fixes: 283d75737837 ("uapi/linux/stddef.h: Provide __always_inline to userspace headers") Signed-off-by: Matt Redfearn Signed-off-by: Florian Fainelli Signed-off-by: Arnd Bergmann Tested-by: Nathan Chancellor Reviewed-by: Petr Vaněk Signed-off-by: Arnd Bergmann include/uapi/linux/swab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b96c7b4cbeecbcf009b70d734f5bbdd2a886949f Merge: 380f9acdf747 9b1833170632 Author: David S. Miller Date: Wed Nov 9 13:06:01 2022 +0000 Merge branch 'dsa-microchip-checking' Rakesh Sankaranarayanan says: ==================== net: dsa: microchip: ksz_pwrite status check for lan937x and irq and error checking updates for ksz series This patch series include following changes, - Add KSZ9563 inside ksz_switch_chips. As per current structure, KSZ9893 is reused inside ksz_switch_chips structure, but since there is a mismatch in number of irq's, new member added for KSZ9563 and sku detected based on Global Chip ID 4 Register. Compatible string from device tree mapped to KSZ9563 for spi and i2c mode probes. - Assign device interrupt during i2c probe operation. - Add error checking for ksz_pwrite inside lan937x_change_mtu. After v6.0, ksz_pwrite updated to have return type int instead of void, and lan937x_change_mtu still uses ksz_pwrite without status verification. - Add port_nirq as 3 for KSZ8563 switch family. - Use dev_err_probe() instead of dev_err() to have more standardized error formatting and logging. v1 -> v2: - Removed regmap validation patch from the series, planning to take up in future after checking for any better approach and studying the actual need for this change. - Resolved error reported in ksz8863_smi.c file. ==================== Signed-off-by: David S. Miller commit 9b1833170632e278971358c8c055d5960c6c7a05 Author: Rakesh Sankaranarayanan Date: Mon Nov 7 14:59:22 2022 +0530 net: dsa: microchip: add dev_err_probe in probe functions Probe functions uses normal dev_err() to check error conditions and print messages. Replace dev_err() with dev_err_probe() to have more standardized format and error logging. Signed-off-by: Rakesh Sankaranarayanan Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz8863_smi.c | 9 ++++----- drivers/net/dsa/microchip/ksz9477_i2c.c | 8 +++----- drivers/net/dsa/microchip/ksz_spi.c | 8 +++----- 3 files changed, 10 insertions(+), 15 deletions(-) commit 4630d1420f841b2b112928359c4dc148d9a7d1f8 Author: Rakesh Sankaranarayanan Date: Mon Nov 7 14:59:21 2022 +0530 net: dsa: microchip: ksz8563: Add number of port irq KSZ8563 have three port interrupts: PTP, PHY and ACL. Add port_nirq as 3 for KSZ8563 inside ksz_chip_data. Signed-off-by: Rakesh Sankaranarayanan Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.c | 1 + 1 file changed, 1 insertion(+) commit e06999c3dc62c79fa897eec1293faa3c2bd8892f Author: Rakesh Sankaranarayanan Date: Mon Nov 7 14:59:20 2022 +0530 net: dsa: microchip: add error checking for ksz_pwrite Add status validation for port register write inside lan937x_change_mtu. ksz_pwrite and ksz_pread api's are updated with return type int (Reference patch mentioned below). Update lan937x_change_mtu with status validation for ksz_pwrite16(). Link: https://patchwork.kernel.org/project/netdevbpf/patch/20220826105634.3855578-6-o.rempel@pengutronix.de/ Signed-off-by: Rakesh Sankaranarayanan Signed-off-by: David S. Miller drivers/net/dsa/microchip/lan937x_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a9c6db3bc9d872a7b808928c5df342670aac3336 Author: Rakesh Sankaranarayanan Date: Mon Nov 7 14:59:19 2022 +0530 net: dsa: microchip: add irq in i2c probe add device irq in i2c probe function. Signed-off-by: Rakesh Sankaranarayanan Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477_i2c.c | 2 ++ 1 file changed, 2 insertions(+) commit ef912fe443adfa15b88645b3bf58c92e5a364167 Author: Rakesh Sankaranarayanan Date: Mon Nov 7 14:59:18 2022 +0530 net: dsa: microchip: add ksz9563 in ksz_switch_ops and select based on compatible string Add KSZ9563 inside ksz_switch_chips structure with port_nirq as 3. KSZ9563 use KSZ9893 switch parameters but port_nirq count is 3 for KSZ9563 whereas 2 for KSZ9893. Add KSZ9563 inside ksz_switch_chips as a separate member and from device tree map compatible string into KSZ9563 inside ksz_spi.c and ksz9477_i2c.c. Global Chip ID 1 and 2 registers read value 9893, select sku based on Global Chip ID 4 Register which read 0x1c for KSZ9563. Signed-off-by: Rakesh Sankaranarayanan Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 3 ++- drivers/net/dsa/microchip/ksz9477_i2c.c | 2 +- drivers/net/dsa/microchip/ksz_common.c | 33 +++++++++++++++++++++++++++++++-- drivers/net/dsa/microchip/ksz_common.h | 3 +++ drivers/net/dsa/microchip/ksz_spi.c | 2 +- 5 files changed, 38 insertions(+), 5 deletions(-) commit 2fe8e1dcf937272c5425e69947819894fcf077a6 Author: Dmitry Torokhov Date: Fri Sep 2 17:55:27 2022 -0700 gpiolib: remove devm_fwnode_get_[index_]gpiod_from_child() Now that there are no more users of these APIs in the kernel we can remove them. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski include/linux/gpio/consumer.h | 21 --------------------- 1 file changed, 21 deletions(-) commit 17521f263fc0ee2c202d5a762679c0ff0cf24b80 Author: Dmitry Torokhov Date: Fri Sep 2 17:55:26 2022 -0700 leds: lgm-sso: switch to using devm_fwnode_gpiod_get() devm_fwnode_get_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/leds/blink/leds-lgm-sso.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a055204b063ade914e6dd6e270d3c2c0453a3cf5 Author: Dmitry Torokhov Date: Fri Sep 2 17:55:25 2022 -0700 leds: gpio: switch to using devm_fwnode_gpiod_get() devm_fwnode_get_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/leds/leds-gpio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 48280042f2c6e3ac2cfb1d8b752ab4a7e0baea24 Author: Andrew Cooper Date: Wed Aug 10 23:19:09 2022 +0100 x86/fpu/xstate: Fix XSTATE_WARN_ON() to emit relevant diagnostics "XSAVE consistency problem" has been reported under Xen, but that's the extent of my divination skills. Modify XSTATE_WARN_ON() to force the caller to provide relevant diagnostic information, and modify each caller suitably. For check_xstate_against_struct(), this removes a double WARN() where one will do perfectly fine. CC stable as this has been wonky debugging for 7 years and it is good to have there too. Signed-off-by: Andrew Cooper Signed-off-by: Borislav Petkov Cc: Link: https://lore.kernel.org/r/20220810221909.12768-1-andrew.cooper3@citrix.com arch/x86/kernel/fpu/xstate.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a3be423f0657e603b45998ef2bb9e5d27dc226c3 Author: Shaomin Deng Date: Sat Nov 5 11:26:56 2022 -0400 tty: n_gsm: Delete unneeded semicolon Delete the unneeded semicolon after curly braces. Signed-off-by: Shaomin Deng Link: https://lore.kernel.org/r/20221105152656.4638-1-dengshaomin@cdjrlc.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92f1f0c3290d994d753dde588698daf1ef91504b Author: Daniel Starke Date: Thu Nov 3 10:17:43 2022 +0100 tty: n_gsm: add parameter negotiation 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. Chapter 5.1.8.1.1 describes the parameter negotiation messages and parameters. Chapter 5.4.1 states that the default parameters are to be used if no negotiation is performed. Chapter 5.4.6.3.1 describes the encoding of the parameter negotiation message. The meaning of the parameters and allowed value ranges can be found in chapter 5.7. Add parameter negotiation support accordingly. DLCI specific parameter configuration by the user requires additional ioctls. This is subject to another patch. Signed-off-by: Daniel Starke Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221103091743.2119-3-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 335 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 327 insertions(+), 8 deletions(-) commit 2ec7a802a04c545ceea96bf67ee818d8bb0349e2 Author: Daniel Starke Date: Thu Nov 3 10:17:42 2022 +0100 tty: n_gsm: add parameters used with parameter negotiation n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010. See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516 The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to the newer 27.010 here. Chapter 5.4.6.3.1 describes the encoding of the parameter negotiation messages. Add the parameters used there to 'gsm_mux' and 'gsm_dlci' and initialize both according to the value ranges and recommended defaults defined in chapter 5.7. Replace the use of the DLC default values from the 'gsm_mux' fields with the DLC specific values from the 'gsm_dlci' fields where applicable. Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20221103091743.2119-2-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 58 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 13 deletions(-) commit 7a1212475f5e313c11300272f34ffa32462bbeef Author: Daniel Starke Date: Thu Nov 3 10:17:41 2022 +0100 tty: n_gsm: introduce macro for minimal unit size n_gsm has a minimal protocol overhead of 7 bytes. The current code already checks whether the configured MRU/MTU size is at least one byte more than this. Introduce the macro MIN_MTU to make this value more obvious. Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20221103091743.2119-1-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d85bf5105853d57ed27c6c21ac35424cc44a0fbb Author: Lukas Wunner Date: Wed Nov 9 08:04:34 2022 +0100 serial: 8250: 8250_omap: Fix calculation of RS485 delays Commit 801954d1210a ("serial: 8250: 8250_omap: Support native RS485") calculates RS485 delays from the baudrate. The baudrate is generated with either a 16x or 13x divisor. The divisor is set in the Mode Definition Register 1 (MDR1). The commit erroneously assumes that the register stores the divisor as a bitmask and uses a logical AND to differentiate between 16x and 13x divisors. However the divisor is really stored as a 3-bit mode (see lines 363ff in include/uapi/linux/serial_reg.h). The logical AND operation is performed with UART_OMAP_MDR1_16X_MODE, which is defined as 0x0 and hence yields false. So the commit always assumes a 13x divisor. Fix by using an equal comparison. This works because we never set any of the other 5 bits in the register. (They pertain to IrDA mode, which is not supported by the driver). Fixes: 801954d1210a ("serial: 8250: 8250_omap: Support native RS485") Link: https://lore.kernel.org/linux-serial/202211070440.8hWunFUN-lkp@intel.com/ Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Lukas Wunner Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/7d5b04da13d89b8708b9543a0b125f2b6062a77b.1667977259.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a3ff858915fa8ca36c7eb02c87c9181ae2fc333 Author: Yuan Can Date: Wed Nov 9 07:21:10 2022 +0000 serial: 8250_bcm7271: Fix error handling in brcmuart_init() A problem about 8250_bcm7271 create debugfs failed is triggered with the following log given: [ 324.516635] debugfs: Directory 'bcm7271-uart' with parent '/' already present! The reason is that brcmuart_init() returns platform_driver_register() directly without checking its return value, if platform_driver_register() failed, it returns without destroy the newly created debugfs, resulting the debugfs of 8250_bcm7271 can never be created later. brcmuart_init() debugfs_create_dir() # create debugfs directory platform_driver_register() driver_register() bus_add_driver() priv = kzalloc(...) # OOM happened # return without destroy debugfs directory Fix by removing debugfs when platform_driver_register() returns error. Fixes: 41a469482de2 ("serial: 8250: Add new 8250-core based Broadcom STB driver") Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20221109072110.117291-2-yuancan@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_bcm7271.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 56dc5074cbec02a6922c4bbce11de9827640bb4b Author: Ilpo Järvinen Date: Mon Nov 7 12:21:26 2022 +0200 serial: 8250_dma: Rearm DMA Rx if more data is pending When DMA Rx completes, the current behavior is to just exit the DMA completion handler without future actions. If the transfer is still on-going, UART will trigger an interrupt and that eventually rearms the DMA Rx. The extra interrupt round-trip has an inherent latency cost that increases the risk of FIFO overrun. In such situations, the latency margin tends to already be less due to FIFO not being empty. Add check into DMA Rx completion handler to detect if LSR has DR (Data Ready) still set. DR indicates there will be more characters pending and DMA Rx can be rearmed right away to handle them. Cc: Gilles BULOZ Signed-off-by: Ilpo Järvinen Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221107102126.56481-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dma.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit c6d30576bd6ce33095d39fe66a51ea821e953ac6 Author: Jonathan Neuschäfer Date: Fri Nov 4 11:37:19 2022 +0100 serial: Fix a typo ("ignorning") Fix the two instances of this typo present in the MSM and VT8500 serial drivers. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Mukesh Ojha Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221104103719.2234098-1-j.neuschaefer@gmx.net Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/msm_serial.c | 2 +- drivers/tty/serial/vt8500_serial.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2e2b4b896159f9d47d063ccf4ed0a7af9a40f1c5 Author: Ilpo Järvinen Date: Wed Oct 19 13:55:03 2022 +0300 tty: Convert tty_buffer flags to bool The struct tty_buffer has flags which is only used for storing TTYB_NORMAL. There is also a few quite confusing operations for checking the presense of TTYB_NORMAL. Simplify things by converting flags to bool. Despite the name remaining the same, the meaning of "flags" is altered slightly by this change. Previously it referred to flags of the buffer (only TTYB_NORMAL being used as a flag). After this change, flags tell whether the buffer contains/should be allocated with flags array along with character data array. It is much more suitable name that TTYB_NORMAL was for this purpose, thus the name remains. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019105504.16800-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_buffer.c | 28 ++++++++++++++-------------- include/linux/tty_buffer.h | 5 +---- include/linux/tty_flip.h | 4 ++-- 3 files changed, 17 insertions(+), 20 deletions(-) commit c51e97e7f1295d3cf42682565506047f08dfc99b Author: Ard Biesheuvel Date: Thu Oct 13 12:42:07 2022 +0200 efi: libstub: Merge zboot decompressor with the ordinary stub Even though our EFI zboot decompressor is pedantically spec compliant and idiomatic for EFI image loaders, calling LoadImage() and StartImage() for the nested image is a bit of a burden. Not only does it create workflow issues for the distros (as both the inner and outer PE/COFF images need to be signed for secure boot), it also copies the image around in memory numerous times: - first, the image is decompressed into a buffer; - the buffer is consumed by LoadImage(), which copies the sections into a newly allocated memory region to hold the executable image; - once the EFI stub is invoked by StartImage(), it will also move the image in memory in case of KASLR, mirrored memory or if the image must execute from a certain a priori defined address. There are only two EFI spec compliant ways to load code into memory and execute it: - use LoadImage() and StartImage(), - call ExitBootServices() and take ownership of the entire system, after which anything goes. Given that the EFI zboot decompressor always invokes the EFI stub, and given that both are built from the same set of objects, let's merge the two, so that we can avoid LoadImage()/StartImage but still load our image into memory without breaking the above rules. This also means we can decompress the image directly into its final location, which could be randomized or meet other platform specific constraints that LoadImage() does not know how to adhere to. It also means that, even if the encapsulated image still has the EFI stub incorporated as well, it does not need to be signed for secure boot when wrapping it in the EFI zboot decompressor. In the future, we might decide to retire the EFI stub attached to the decompressed image, but for the time being, they can happily coexist. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/file.c | 18 --- drivers/firmware/efi/libstub/zboot.c | 284 +++++++++-------------------------- include/linux/efi.h | 1 - 3 files changed, 74 insertions(+), 229 deletions(-) commit d729b554e17904e16498ab5c36122d70406f70ae Author: Ard Biesheuvel Date: Thu Oct 13 12:39:37 2022 +0200 efi/loongarch: libstub: Split off kernel image relocation for builtin stub The LoongArch build of the EFI stub is part of the core kernel image, and therefore accesses section markers directly when it needs to figure out the size of the various section. The zboot decompressor does not have access to those symbols, but doesn't really need that either. So let's move handle_kernel_image() into a separate file (or rather, move everything else into a separate file) so that the zboot build does not pull in unused code that links to symbols that it does not define. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/Makefile | 2 +- drivers/firmware/efi/libstub/loongarch-stub.c | 67 +--------------------- drivers/firmware/efi/libstub/loongarch.c | 80 +++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 67 deletions(-) commit 0efb61c89fa021dfcdb92f22bbc9a7cb3f0fe3fe Author: Ard Biesheuvel Date: Thu Oct 13 12:07:27 2022 +0200 efi/loongarch: Don't jump to kernel entry via the old image Currently, the EFI entry code for LoongArch is set up to copy the executable image to the preferred offset, but instead of branching directly into that image, it branches to the local copy of kernel_entry, and relies on the logic in that function to switch to the link time address instead. This is a bit sloppy, and not something we can support once we merge the EFI decompressor with the EFI stub. So let's clean this up a bit, by adding a helper that computes the offset of kernel_entry from the start of the image, and simply adding the result to VMLINUX_LOAD_ADDRESS. And considering that we cannot execute from anywhere else anyway, let's avoid efi_relocate_kernel() and just allocate the pages instead. Signed-off-by: Ard Biesheuvel arch/loongarch/include/asm/efi.h | 2 ++ drivers/firmware/efi/libstub/loongarch-stub.c | 33 +++++++++++++++++++-------- 2 files changed, 26 insertions(+), 9 deletions(-) commit d9ffe524a538720328b5bf98733a6c641e236bc8 Author: Ard Biesheuvel Date: Thu Oct 13 10:17:20 2022 +0200 efi/arm64: libstub: Split off kernel image relocation for builtin stub The arm64 build of the EFI stub is part of the core kernel image, and therefore accesses section markers directly when it needs to figure out the size of the various section. The zboot decompressor does not have access to those symbols, but doesn't really need that either. So let's move handle_kernel_image() into a separate file (or rather, move everything else into a separate file) so that the zboot build does not pull in unused code that links to symbols that it does not define. While at it, introduce a helper routine that the generic zboot loader will need to invoke after decompressing the image but before invoking it, to ensure that the I-side view of memory is consistent. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/Makefile | 2 +- drivers/firmware/efi/libstub/arm64-entry.S | 10 +++++ drivers/firmware/efi/libstub/arm64-stub.c | 28 -------------- drivers/firmware/efi/libstub/arm64.c | 61 ++++++++++++++++++++++++++++++ drivers/firmware/efi/libstub/efistub.h | 4 ++ 5 files changed, 76 insertions(+), 29 deletions(-) commit f1a116c055e3aee0c579d39bd777c9155e8bf5d1 Author: Ard Biesheuvel Date: Wed Oct 12 20:23:46 2022 +0200 efi/riscv: libstub: Split off kernel image relocation for builtin stub The RISC-V build of the EFI stub is part of the core kernel image, and therefore accesses section markers directly when it needs to figure out the size of the various section. The zboot decompressor does not have access to those symbols, but doesn't really need that either. So let's move handle_kernel_image() into a separate file (or rather, move everything else into a separate file) so that the zboot build does not pull in unused code that links to symbols that it does not define. Signed-off-by: Ard Biesheuvel arch/riscv/include/asm/efi.h | 2 + drivers/firmware/efi/libstub/Makefile | 2 +- drivers/firmware/efi/libstub/riscv-stub.c | 81 +++---------------------- drivers/firmware/efi/libstub/riscv.c | 98 +++++++++++++++++++++++++++++++ 4 files changed, 108 insertions(+), 75 deletions(-) commit 895bc3a135ffe9475de04b30e274f57a176cd3ef Author: Ard Biesheuvel Date: Wed Oct 12 14:57:32 2022 +0200 efi: libstub: Factor out min alignment and preferred kernel load address Factor out the expressions that describe the preferred placement of the loaded image as well as the minimum alignment so we can reuse them in the decompressor. Signed-off-by: Ard Biesheuvel arch/arm64/include/asm/efi.h | 15 +++++++++++++++ arch/loongarch/include/asm/efi.h | 7 +++++++ arch/riscv/include/asm/efi.h | 11 +++++++++++ drivers/firmware/efi/libstub/arm64-stub.c | 11 +---------- drivers/firmware/efi/libstub/loongarch-stub.c | 3 ++- drivers/firmware/efi/libstub/riscv-stub.c | 15 +++------------ 6 files changed, 39 insertions(+), 23 deletions(-) commit 1f1ba325a23df6739b6b5e52f40ec1aa228108b2 Author: Ard Biesheuvel Date: Wed Oct 12 14:28:31 2022 +0200 efi: libstub: Add image code and data size to the zimage metadata In order to be able to switch from LoadImage() [which treats the supplied PE/COFF image as file input only, and reconstructs the memory image based on the section descriptors] to a mode where we allocate the memory directly, and invoke the image in place, we need to now how much memory to allocate beyond the end of the image. So copy this information from the payload's PE/COFF header to the end of the compressed version of the payload, so that the decompressor app can access it before performing the decompression itself. We'll also need to size of the code region once we switch arm64 to jumping to the kernel proper with MMU and caches enabled, so let's capture that information as well. Note that SizeOfCode does not account for the header, so we need SizeOfHeaders as well. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/Makefile.zboot | 22 ++++++++++------------ drivers/firmware/efi/libstub/zboot-header.S | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) commit 42c8ea3dca094ab82776ca706fb7a9cbe8ac3dc9 Author: Ard Biesheuvel Date: Wed Oct 12 12:55:11 2022 +0200 efi: libstub: Factor out EFI stub entrypoint into separate file In preparation for allowing the EFI zboot decompressor to reuse most of the EFI stub machinery, factor out the actual EFI PE/COFF entrypoint into a separate file. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/Makefile | 2 +- drivers/firmware/efi/libstub/efi-stub-entry.c | 65 +++++++++++++++++++ drivers/firmware/efi/libstub/efi-stub.c | 89 ++++++++------------------- drivers/firmware/efi/libstub/efistub.h | 8 +++ 4 files changed, 100 insertions(+), 64 deletions(-) commit da8dd0c75b3f82eb366eb1745fb473ea92c8c087 Author: Ard Biesheuvel Date: Tue Oct 11 18:21:52 2022 +0200 efi: libstub: Provide local implementations of strrchr() and memchr() Clone the implementations of strrchr() and memchr() in lib/string.c so we can use them in the standalone zboot decompressor app. These routines are used by the FDT handling code. Signed-off-by: Ard Biesheuvel arch/arm64/kernel/image-vars.h | 3 -- arch/riscv/kernel/image-vars.h | 2 -- drivers/firmware/efi/libstub/Makefile | 3 +- drivers/firmware/efi/libstub/string.c | 62 +++++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 6 deletions(-) commit 732ea9db9d8a6a0444d18ed810cccb2428d8766b Author: Ard Biesheuvel Date: Tue Oct 11 17:10:39 2022 +0200 efi: libstub: Move screen_info handling to common code Currently, arm64, RISC-V and LoongArch rely on the fact that struct screen_info can be accessed directly, due to the fact that the EFI stub and the core kernel are part of the same image. This will change after a future patch, so let's ensure that the screen_info handling is able to deal with this, by adopting the arm32 approach of passing it as a configuration table. While at it, switch to ACPI reclaim memory to hold the screen_info data, which is more appropriate for this kind of allocation. Signed-off-by: Ard Biesheuvel arch/arm/include/asm/efi.h | 3 -- arch/arm/kernel/efi.c | 31 +++-------------- arch/arm64/include/asm/efi.h | 6 ---- arch/loongarch/include/asm/efi.h | 9 ----- arch/loongarch/kernel/efi.c | 24 +++++++++++-- arch/riscv/include/asm/efi.h | 6 ---- drivers/firmware/efi/efi-init.c | 21 +++++++++-- drivers/firmware/efi/efi.c | 5 +++ drivers/firmware/efi/libstub/Makefile | 3 +- drivers/firmware/efi/libstub/arm32-stub.c | 37 -------------------- drivers/firmware/efi/libstub/efi-stub.c | 9 +++++ drivers/firmware/efi/libstub/efistub.h | 3 ++ drivers/firmware/efi/libstub/screen_info.c | 56 ++++++++++++++++++++++++++++++ include/linux/efi.h | 2 +- 14 files changed, 121 insertions(+), 94 deletions(-) commit 06064800d92a1adac3717e86cc6ba5f98c0ef40e Author: Ard Biesheuvel Date: Tue Oct 11 18:24:42 2022 +0200 efi: loongarch: Drop exports of unused string routines Drop the __efistub_ prefixed exports of various routines that the EFI stub on LoongArch does not even use. Signed-off-by: Ard Biesheuvel arch/loongarch/kernel/image-vars.h | 5 ----- 1 file changed, 5 deletions(-) commit 2e6fa86f2d484ff9a0047e20a48c1400314a5bb6 Author: Ard Biesheuvel Date: Tue Oct 11 15:27:45 2022 +0200 efi: libstub: Enable efi_printk() in zboot decompressor Split the efi_printk() routine into its own source file, and provide local implementations of strlen() and strnlen() so that the standalone zboot app can efi_err and efi_info etc. Signed-off-by: Ard Biesheuvel arch/arm64/kernel/image-vars.h | 2 - arch/loongarch/kernel/image-vars.h | 2 - arch/riscv/kernel/image-vars.h | 2 - drivers/firmware/efi/libstub/Makefile | 5 +- drivers/firmware/efi/libstub/efi-stub-helper.c | 143 ----------------------- drivers/firmware/efi/libstub/printk.c | 154 +++++++++++++++++++++++++ drivers/firmware/efi/libstub/string.c | 33 +++++- drivers/firmware/efi/libstub/zboot.c | 30 ++--- 8 files changed, 198 insertions(+), 173 deletions(-) commit 52dce39cd2786673969a12d1c94e0922d9208f83 Author: Ard Biesheuvel Date: Tue Oct 11 15:15:51 2022 +0200 efi: libstub: Clone memcmp() into the stub We will no longer be able to call into the kernel image once we merge the decompressor with the EFI stub, so we need our own implementation of memcmp(). Let's add the one from lib/string.c and simplify it. Signed-off-by: Ard Biesheuvel arch/arm64/kernel/image-vars.h | 1 - arch/loongarch/kernel/image-vars.h | 1 - arch/riscv/kernel/image-vars.h | 1 - drivers/firmware/efi/libstub/intrinsics.c | 18 ++++++++++++++++++ drivers/firmware/efi/libstub/zboot.c | 11 +---------- 5 files changed, 19 insertions(+), 13 deletions(-) commit fa882a1389b2a6eaba8a0d5439dbd32537d0ecc5 Author: Ard Biesheuvel Date: Tue Oct 11 15:41:08 2022 +0200 efi: libstub: Use local strncmp() implementation unconditionally In preparation for moving the EFI stub functionality into the zboot decompressor, switch to the stub's implementation of strncmp() unconditionally. Signed-off-by: Ard Biesheuvel arch/arm64/kernel/image-vars.h | 1 - arch/riscv/kernel/image-vars.h | 1 - drivers/firmware/efi/libstub/string.c | 2 -- 3 files changed, 4 deletions(-) commit f9a3c8488762284c855942d917200d2846392e40 Author: Lukas Bulwahn Date: Fri Oct 28 13:56:19 2022 +0200 MAINTAINERS: adjust entry after arm64 efi-entry.S file movement Commit 6ed27461c9c8 ("arm64: efi: Move efi-entry.S into the libstub source directory") moves arch/arm64/kernel/efi-entry.S to drivers/firmware/efi/libstub/arm64-entry.S, but misses to adjust the MAINTAINERS file. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken file pattern. Adjust the file entry in EXTENSIBLE FIRMWARE INTERFACE (EFI) to this file movement. As the file drivers/firmware/efi/libstub/arm64-entry.S is already covered by the entry drivers/firmware/efi/, simply remove the arm64 file entry. Signed-off-by: Lukas Bulwahn Signed-off-by: Ard Biesheuvel MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 4ef806096bdbbe9e77c29c17c3ed636d00d6d6f3 Author: Ard Biesheuvel Date: Mon Oct 17 17:14:41 2022 +0200 arm64: efi: Move efi-entry.S into the libstub source directory We will be sharing efi-entry.S with the zboot decompressor build, which does not link against vmlinux directly. So move it into the libstub source directory so we can include in the libstub static library. Signed-off-by: Ard Biesheuvel Acked-by: Catalin Marinas arch/arm64/kernel/Makefile | 9 +-------- drivers/firmware/efi/libstub/Makefile | 4 ++-- .../efi-entry.S => drivers/firmware/efi/libstub/arm64-entry.S | 4 ---- 3 files changed, 3 insertions(+), 14 deletions(-) commit 7a35cb0a6ec0c4fbb3ea23526d56c59c8cdf779b Author: Ard Biesheuvel Date: Mon Oct 17 16:28:22 2022 +0200 arm64: efi: Avoid dcache_clean_poc() altogether in efi_enter_kernel() To allow efi_enter_kernel() to be shared with the EFI zboot decompressor build, drop another reference to dcache_clean_poc() and replace it with a single DC CVAC* instruction. To ensure that it covers the remainder of efi_enter_kernel() as intended, reorganize the code a bit so it fits in a 32-byte cacheline, and align it to 32 bytes. (Even though the architecture defines 16 as the minimum D-cache line size, even the chosen value of 32 is highly unlikely to ever be encountered on real hardware, and this works with any line size >= 32) * due to ARM64_WORKAROUND_CLEAN_CACHE, we actually use a DC CIVAC here Signed-off-by: Ard Biesheuvel Acked-by: Catalin Marinas arch/arm64/kernel/efi-entry.S | 57 ++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 28 deletions(-) commit aaeb3fc614d65ec5c0b838ed1afb59c3f0f04643 Author: Ard Biesheuvel Date: Mon Oct 17 16:06:39 2022 +0200 arm64: efi: Move dcache cleaning of loaded image out of efi_enter_kernel() The efi_enter_kernel() routine will be shared between the existing EFI stub and the zboot decompressor, and the version of dcache_clean_to_poc() that the core kernel exports to the stub will not be available in the latter case. So move the handling into the .c file which will remain part of the stub build that integrates directly with the kernel proper. Signed-off-by: Ard Biesheuvel Acked-by: Catalin Marinas arch/arm64/kernel/efi-entry.S | 9 --------- arch/arm64/kernel/image-vars.h | 1 - drivers/firmware/efi/libstub/arm64-stub.c | 10 +++++++++- 3 files changed, 9 insertions(+), 11 deletions(-) commit 0d60ffeec53cc378cc282d51e870275c642532c6 Author: Ard Biesheuvel Date: Wed Oct 12 09:53:40 2022 +0200 efi: libstub: Deduplicate ftrace command line argument filtering No need for the same pattern to be used four times for each architecture individually if we can just apply it once later. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/Makefile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 48b9491cfe0816c7afc4602db1536cc6b2938acd Author: Ard Biesheuvel Date: Tue Oct 11 10:25:36 2022 +0200 efi: libstub: Drop handling of EFI properties table The EFI properties table was a short lived experiment that never saw the light of day on non-x86 (if at all) so let's drop the handling of it. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/efi-stub.c | 13 ------------- 1 file changed, 13 deletions(-) commit 085e2ff9aeb03b591946fda422c25d6933f8948d Author: Ard Biesheuvel Date: Tue Oct 11 10:21:20 2022 +0200 efi: libstub: Drop randomization of runtime memory map Randomizing the UEFI runtime memory map requires the use of the SetVirtualAddressMap() EFI boot service, which we prefer to avoid. So let's drop randomization, which was already problematic in combination with hibernation, which means that distro kernels never enabled it in the first place. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/efi-stub.c | 29 ----------------------------- 1 file changed, 29 deletions(-) commit d65e6b6e884a38360fc1cadf8ff31858151da57f Author: Sascha Hauer Date: Fri Nov 4 14:10:31 2022 +0100 usb: gadget: f_ecm: Always set current gadget in ecm_bind() The gadget may change over bind/unbind cycles, so set it each time during bind, not only the first time. Without it we get a use-after-free with the following example: cd /sys/kernel/config/usb_gadget/; mkdir -p mygadget; cd mygadget mkdir -p configs/c.1/strings/0x409 echo "C1:Composite Device" > configs/c.1/strings/0x409/configuration mkdir -p functions/ecm.usb0 ln -s functions/ecm.usb0 configs/c.1/ rmmod dummy_hcd modprobe dummy_hcd KASAN will complain shortly after the 'modprobe': usb 2-1: New USB device found, idVendor=0000, idProduct=0000, bcdDevice= 6.01 usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 ================================================================== BUG: KASAN: use-after-free in gether_connect+0xb8/0x30c Read of size 4 at addr cbef170c by task swapper/3/0 CPU: 3 PID: 0 Comm: swapper/3 Not tainted 6.1.0-rc3-00014-g41ff012f50cb-dirty #322 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x58/0x70 dump_stack_lvl from print_report+0x134/0x4d4 print_report from kasan_report+0x78/0x10c kasan_report from gether_connect+0xb8/0x30c gether_connect from ecm_set_alt+0x124/0x254 ecm_set_alt from composite_setup+0xb98/0x2b18 composite_setup from configfs_composite_setup+0x80/0x98 configfs_composite_setup from dummy_timer+0x8f0/0x14a0 [dummy_hcd] ... Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20221104131031.850850-3-s.hauer@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_ecm.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 321b59870f850a10dbb211ecd2bd87b41497ea6f Author: Sascha Hauer Date: Fri Nov 4 14:10:30 2022 +0100 usb: gadget: u_ether: Do not make UDC parent of the net device The UDC is not a suitable parent of the net device as the UDC can change or vanish during the lifecycle of the ethernet gadget. This can be illustrated with the following: mkdir -p /sys/kernel/config/usb_gadget/mygadget cd /sys/kernel/config/usb_gadget/mygadget mkdir -p configs/c.1/strings/0x409 echo "C1:Composite Device" > configs/c.1/strings/0x409/configuration mkdir -p functions/ecm.usb0 ln -s functions/ecm.usb0 configs/c.1/ echo "dummy_udc.0" > UDC rmmod dummy_hcd The 'rmmod' removes the UDC from the just created gadget, leaving the still existing net device with a no longer existing parent. Accessing the ethernet device with commands like: ip --details link show usb0 will result in a KASAN splat: ================================================================== BUG: KASAN: use-after-free in if_nlmsg_size+0x3e8/0x528 Read of size 4 at addr c5c84754 by task ip/357 CPU: 3 PID: 357 Comm: ip Not tainted 6.1.0-rc3-00013-gd14953726b24-dirty #324 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x58/0x70 dump_stack_lvl from print_report+0x134/0x4d4 print_report from kasan_report+0x78/0x10c kasan_report from if_nlmsg_size+0x3e8/0x528 if_nlmsg_size from rtnl_getlink+0x2b4/0x4d0 rtnl_getlink from rtnetlink_rcv_msg+0x1f4/0x674 rtnetlink_rcv_msg from netlink_rcv_skb+0xb4/0x1f8 netlink_rcv_skb from netlink_unicast+0x294/0x478 netlink_unicast from netlink_sendmsg+0x328/0x640 netlink_sendmsg from ____sys_sendmsg+0x2a4/0x3b4 ____sys_sendmsg from ___sys_sendmsg+0xc8/0x12c ___sys_sendmsg from sys_sendmsg+0xa0/0x120 sys_sendmsg from ret_fast_syscall+0x0/0x1c Solve this by not setting the parent of the ethernet device. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20221104131031.850850-2-s.hauer@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/u_ether.c | 4 ---- 1 file changed, 4 deletions(-) commit 3f2d1f2e40666d6536b663c5050a3a23ca5d9ce8 Author: Paul Cercueil Date: Wed Oct 26 19:26:57 2022 +0100 usb: phy: jz4770: Remove driver This driver has been replaced by the Ingenic PHY driver that uses the generic PHY framework. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20221026182657.146630-8-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/Kconfig | 8 - drivers/usb/phy/Makefile | 1 - drivers/usb/phy/phy-jz4770.c | 353 ------------------------------------------- 3 files changed, 362 deletions(-) commit 9cd074798ef6bf9c361c78084abc2c30e551ecdc Author: Paul Cercueil Date: Wed Oct 26 19:26:56 2022 +0100 usb: musb: jz4740: Support the generic PHY framework Support PHYs implemented using the generic PHY framework instead of the deprecated USB-PHY framework. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20221026182657.146630-7-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/jz4740.c | 62 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 8 deletions(-) commit d9b324307777404f978660b5752fb264ee344a22 Author: Paul Cercueil Date: Wed Oct 26 19:26:55 2022 +0100 usb: musb: jz4740: Don't disable external hubs The jz4740-musb driver does not really support OTG, so it has no reason to disable external hubs, especially since it's a system-wide setting and we don't want external hubs to be disabled for other USB host controllers. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20221026182657.146630-6-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 0afddf1e49d1172a87c7a73002e62aa66b6af677 Author: Paul Cercueil Date: Wed Oct 26 19:26:54 2022 +0100 usb: musb: Support setting OTG mode using generic PHY When musb->xceiv is not provided but musb->phy is, support setting the OTG mode (host, peripheral) using the generic PHY framework. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20221026182657.146630-5-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_gadget.c | 4 ++++ drivers/usb/musb/musb_host.c | 2 ++ 2 files changed, 6 insertions(+) commit a6d45ea063f0a9272f62925c8150439af5640e74 Author: Paul Cercueil Date: Wed Oct 26 19:26:53 2022 +0100 usb: musb: Allow running without CONFIG_USB_PHY Modify the core so that musb->xceiv is never deferenced without being checked first. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20221026182657.146630-4-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 2 +- drivers/usb/musb/musb_core.h | 12 ++++++++++-- drivers/usb/musb/musb_gadget.c | 21 +++++++++++++-------- drivers/usb/musb/musb_host.c | 8 ++++++-- drivers/usb/musb/musb_virthub.c | 11 +++++------ 5 files changed, 35 insertions(+), 19 deletions(-) commit 285f28bfed89a56ed619054f21125b0bd2f0d4d6 Author: Paul Cercueil Date: Wed Oct 26 19:26:52 2022 +0100 usb: musb: Add and use inline function musb_otg_state_string The musb_otg_state_string() simply calls usb_otg_state_string(). This will make it easier to get rid of the musb->xceiv dependency later. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20221026182657.146630-3-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 43 ++++++++++++++++++----------------------- drivers/usb/musb/musb_core.h | 5 +++++ drivers/usb/musb/musb_gadget.c | 8 ++++---- drivers/usb/musb/musb_host.c | 2 +- drivers/usb/musb/musb_virthub.c | 4 ++-- 5 files changed, 31 insertions(+), 31 deletions(-) commit 21acc656a06e912341d9db66c67b58cc7ed071e7 Author: Paul Cercueil Date: Wed Oct 26 19:26:51 2022 +0100 usb: musb: Add and use inline functions musb_{get,set}_state Instead of manipulating musb->xceiv->otg->state directly, use the newly introduced musb_get_state() and musb_set_state() inline functions. Later, these inline functions will be modified to get rid of the musb->xceiv dependency, which prevents the musb code from using the generic PHY subsystem. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20221026182657.146630-2-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 62 ++++++++++++++++++++--------------------- drivers/usb/musb/musb_core.h | 11 ++++++++ drivers/usb/musb/musb_debugfs.c | 6 ++-- drivers/usb/musb/musb_gadget.c | 28 +++++++++---------- drivers/usb/musb/musb_host.c | 6 ++-- drivers/usb/musb/musb_virthub.c | 18 ++++++------ 6 files changed, 71 insertions(+), 60 deletions(-) commit 1fac1c4da8a225ffbfae294ae36e18a3a65cb87e Author: Linus Walleij Date: Sun Oct 23 16:47:08 2022 +0200 usb: fotg210: Select subdriver by mode Check which mode the hardware is in, and selecte the peripheral driver if the hardware is in explicit peripheral mode, otherwise select host mode. This should solve the immediate problem that both subdrivers can get probed. Cc: Fabian Vogt Cc: Yuan-Hsin Chen Cc: Felipe Balbi Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221023144708.3596563-3-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/fotg210-core.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit aeffd2c3b09f4f50438ec8960095129798bcb33a Author: Linus Walleij Date: Sun Oct 23 16:47:07 2022 +0200 usb: fotg210: Compile into one module It is since ages perfectly possible to compile both of these modules into the same kernel, which makes no sense since it is one piece of hardware. Compile one module named "fotg210.ko" for both HCD and UDC drivers by collecting the init calls into a fotg210-core.c file and start to centralize things handling one and the same piece of hardware. Stub out the initcalls if one or the other part of the driver was not selected. Tested by compiling one or the other or both of the drivers into the kernel and as modules. Cc: Fabian Vogt Cc: Yuan-Hsin Chen Cc: Felipe Balbi Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221023144708.3596563-2-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/fotg210/Kconfig | 4 +- drivers/usb/fotg210/Makefile | 11 +++++- drivers/usb/fotg210/fotg210-core.c | 79 ++++++++++++++++++++++++++++++++++++++ drivers/usb/fotg210/fotg210-hcd.c | 49 ++++------------------- drivers/usb/fotg210/fotg210-udc.c | 19 ++------- drivers/usb/fotg210/fotg210.h | 42 ++++++++++++++++++++ 6 files changed, 142 insertions(+), 62 deletions(-) commit 1dd33a9f1b95ab59cd60f14a7a83fed14697867b Author: Linus Walleij Date: Sun Oct 23 16:47:06 2022 +0200 usb: fotg210: Collect pieces of dual mode controller The Faraday FOTG210 is a dual-mode OTG USB controller that can act as host, peripheral or both. To be able to probe from one hardware description and to follow the pattern of other dual- mode controllers such as MUSB or MTU3 we need to collect the two, currently completely separate drivers in the same directory. After this, users need to select the main symbol USB_FOTG210 and then each respective subdriver. We pave the road to compile both drivers into the same kernel and select the one we want to use at probe() time, and possibly add OTG support in the end. This patch doesn't do much more than create the new symbol and collect the drivers in one place. We also add a comment for the section of dual-mode controllers in the Kconfig file so people can see what these selections are about. Also add myself as maintainer as there has been little response on my patches to these drivers. Cc: Fabian Vogt Cc: Yuan-Hsin Chen Cc: Felipe Balbi Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221023144708.3596563-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 6 ++++ drivers/usb/Kconfig | 4 +++ drivers/usb/Makefile | 2 ++ drivers/usb/fotg210/Kconfig | 36 ++++++++++++++++++++++ drivers/usb/fotg210/Makefile | 3 ++ drivers/usb/{host => fotg210}/fotg210-hcd.c | 2 +- .../usb/{host/fotg210.h => fotg210/fotg210-hcd.h} | 0 drivers/usb/{gadget/udc => fotg210}/fotg210-udc.c | 2 +- .../udc/fotg210.h => fotg210/fotg210-udc.h} | 0 drivers/usb/gadget/udc/Kconfig | 11 ------- drivers/usb/gadget/udc/Makefile | 1 - drivers/usb/host/Kconfig | 11 ------- drivers/usb/host/Makefile | 1 - 13 files changed, 53 insertions(+), 26 deletions(-) commit c5edb757baa99f6d30180b1a4b4f81f7e7f92217 Author: Bhupesh Sharma Date: Sat Oct 29 21:43:12 2022 +0530 tools: usb: ffs-aio-example: Fix build error with aarch64-*-gnu-gcc toolchain(s) The tools/usb/aio_simple.c file when cross-compiled with aarch64-*-gnu-gcc toolchain(s) leads to the following errors: aio_simple.c:30:10: fatal error: endian.h: No such file or directory 30 | #include | ^~~~~~~~~~ aio_simple.c:88:14: note: (near initialization for 'descriptors.fs_count') aio_simple.c:110:14: error: initializer element is not constant 110 | .hs_count = htole32(3), | ^~~~~~~ aio_simple.c:110:14: note: (near initialization for 'descriptors.hs_count') aio_simple.c:124:22: error: initializer element is not constant 124 | .wMaxPacketSize = htole16(512), | ^~~~~~~ aio_simple.c:124:22: note: (near initialization for 'descriptors.hs_descs.bulk_sink.wMaxPacketSize') Fix these compilation issues by: - Switching to _DEFAULT_SOURCE: _BSD_SOURCE is deprecated and gives a build warning. Let's use _DEFAULT_SOURCE instead. - Currently this file uses library htole16/32 function calls. Replace these with equivalent 'cpu_to_le16/32' calls. Cc: Felipe Balbi Cc: Greg Kroah-Hartman Signed-off-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20221029161312.171165-1-bhupesh.sharma@linaro.org Signed-off-by: Greg Kroah-Hartman .../ffs-aio-example/simple/device_app/aio_simple.c | 44 +++++++++++++++------- 1 file changed, 31 insertions(+), 13 deletions(-) commit dced88922c1179dfa2664690318d4cba57ebffb5 Author: Xu Yang Date: Wed Oct 26 20:11:57 2022 +0800 usb: chipidea: core: wrap ci_handle_power_lost() with CONFIG_PM_SLEEP If CONFIG_PM_SLEEP is not set, the following error will be shown up when build kernel: error: 'ci_handle_power_lost' defined but not used. This will move ci_handle_power_lost() to an area wrapped by CONFIG_PM_SLEEP. Signed-off-by: Xu Yang Fixes: 74494b33211d ("usb: chipidea: core: add controller resume support when controller is powered off") Reported-by: Conor Dooley Tested-by: Conor Dooley Link: https://lore.kernel.org/r/20221026121157.1491302-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/core.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 77ece8123fed2bef451ef31a34b8327849375d26 Author: Yang Yingliang Date: Thu Nov 3 10:06:25 2022 +0800 Documentation: devres: add missing PHY helpers Add devm_usb_get_phy_by_phandle() to devres.rst. It's introduced by commit 5d3c28b5a42d ("usb: otg: add device tree support to otg library"). Add devm_usb_get_phy_by_node() to devres.rst. It's introduced by commit e842b84c8e72 ("usb: phy: Add interface to get phy give of device_node.") Fixes: 5d3c28b5a42d ("usb: otg: add device tree support to otg library") Fixes: e842b84c8e72 ("usb: phy: Add interface to get phy give of device_node.") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221103020625.1003759-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/driver-model/devres.rst | 2 ++ 1 file changed, 2 insertions(+) commit d119cd95c62ddf6a1d76a006be273f255fd6c5a8 Author: Lukas Bulwahn Date: Mon Oct 31 09:54:26 2022 +0100 usb: musb: remove left-over after USB_TI_CPPI_DMA removal Commit 32fee1df5110 ("usb: musb: remove unused davinci support") removes the config USB_TI_CPPI_DMA, but misses some left-over references in drivers/usb/musb/musb_dma.h. Remove the left-over dependent on this removed config. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20221031085426.17175-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dma.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 83045e19feae937c425248824d1dc0fc95583842 Author: Henry Tian Date: Mon Oct 24 09:48:53 2022 +0000 usb: gadget: aspeed: fix buffer overflow In ast_vhub_epn_handle_ack() when the received data length exceeds the buffer, it does not check the case and just copies to req.buf and cause a buffer overflow, kernel oops on this case. This issue could be reproduced on a BMC with an OS that enables the lan over USB: 1. In OS, enable the usb eth dev, verify it pings the BMC OK; 2. In OS, set the usb dev mtu to 2000. (Default is 1500); 3. In OS, ping the BMC with `-s 2000` argument. The BMC kernel will get oops with below logs: skbuff: skb_over_panic: text:8058e098 len:2048 put:2048 head:84c678a0 data:84c678c2 tail:0x84c680c2 end:0x84c67f00 dev:usb0 ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:113! Internal error: Oops - BUG: 0 [#1] ARM CPU: 0 PID: 0 Comm: swapper Not tainted 5.15.69-c9fb275-dirty-d1e579a #1 Hardware name: Generic DT based system PC is at skb_panic+0x60/0x6c LR is at irq_work_queue+0x6c/0x94 Fix the issue by checking the length and set `-EOVERFLOW`. Tested: Verify the BMC kernel does not get oops in the above case, and the usb ethernet gets RX packets errors instead. Signed-off-by: Lei YU Signed-off-by: Henry Tian Reviewed-by: Neal Liu Acked-by: Benjamin Herrenschmidt Link: https://lore.kernel.org/r/20221024094853.2877441-1-yulei.sh@bytedance.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/aspeed-vhub/core.c | 2 +- drivers/usb/gadget/udc/aspeed-vhub/epn.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) commit 9c3959bb4cbf2b45c5b53bf8a19426e5ddb5c56c Author: Jonathan Neuschäfer Date: Fri Nov 4 10:58:38 2022 +0100 usb: chipidea: ci_hdrc_imx: Fix a typo ("regualator") Change "regualator" to "regulator" in this comment. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Mukesh Ojha Link: https://lore.kernel.org/r/20221104095838.2132945-1-j.neuschaefer@gmx.net Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/ci_hdrc_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c2604a9a6899bab195edbee35fc8d64ce1444aa Author: Brian Norris Date: Fri Oct 28 18:45:35 2022 -0700 usb: xhci-pci: Set PROBE_PREFER_ASYNCHRONOUS This driver often takes on the order of 10ms to start, but in some cases takes more than 100ms. It shouldn't have many cross-device dependencies to race with, nor racy access to shared state with other drivers, so this should be a relatively low risk change. This driver was pinpointed as part of a survey of top slowest initcalls (i.e., are built in, and probing synchronously) on a lab of ChromeOS systems. Signed-off-by: Brian Norris Link: https://lore.kernel.org/r/20221028184507.v2.2.I5a309231785d3a4e37118a25e84f5caa0136a343@changeid Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ee9834636f9b07fe1dcf3fffbb325318cdb267d5 Author: Brian Norris Date: Fri Oct 28 18:45:34 2022 -0700 usb: ehci-pci: Set PROBE_PREFER_ASYNCHRONOUS This driver often takes on the order of 8ms to start, but every little bit counts. It shouldn't have many cross-device dependencies to race with, nor racy access to shared state with other drivers, so this should be a relatively low risk change. This driver was pinpointed as part of a survey of top slowest initcalls (i.e., are built in, and probing synchronously) on a lab of ChromeOS systems. Signed-off-by: Brian Norris Acked-by: Alan Stern Link: https://lore.kernel.org/r/20221028184507.v2.1.I9a5353f81d1509f85f3a04f0cdc9099f6fe60811@changeid Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-pci.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4567d1a97f5290cb895a564feff0a5c770d6c332 Author: Li Jun Date: Wed Oct 26 14:12:22 2022 +0800 usb: phy: generic: Add wakeup capability In case USB phy is the wakeup source, enable its wakeup capability. Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1666764742-4201-2-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-generic.c | 4 ++++ 1 file changed, 4 insertions(+) commit 434d806f077cad81d87a757adc631894bfa01ac2 Author: Li Jun Date: Wed Oct 26 14:12:21 2022 +0800 dt-bindings: usb: usb-nop-xceiv: add wakeup-source property USB phy may be a system wakeup source, so add wakeup source property to keep its resource (e.g. power domain) active to make USB remote wakeup work. Signed-off-by: Li Jun Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1666764742-4201-1-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit fff61d4ccf3d1124bf7aa82fa996536833b8204a Author: Marek Vasut Date: Mon Nov 7 14:42:48 2022 +0100 dt-bindings: usb: usb251xb: Convert to YAML schema Convert the usb251xb hub DT bindings from text to yaml schema so it is possible to validate DTs against the schema. Adjust the example to describe two different hubs at different I2C bus addresses, to avoid I2C address collission in the example. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20221107134248.21899-1-marex@denx.de Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb251xb.txt | 89 ------- .../devicetree/bindings/usb/usb251xb.yaml | 271 +++++++++++++++++++++ 2 files changed, 271 insertions(+), 89 deletions(-) commit afb21a5155a136a2549947c151b13507a34976ae Author: Thierry Reding Date: Thu Nov 3 12:59:23 2022 +0100 dt-bindings: usb: usb-drd: Describe default dual-role mode The dual-role mode default, in the absence of the dr_mode property, is already documented to be OTG. Use the "default" property to mark it as such more explicitly. Signed-off-by: Thierry Reding Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221103115923.1467525-1-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb-drd.yaml | 1 + 1 file changed, 1 insertion(+) commit 0349fdab2ff0673cc3c3f300316522d4f2bb1af9 Author: Michael Grzeschik Date: Fri Nov 4 22:55:13 2022 +0100 usb: gadget: at91-udc: simplify at91rm9200_udc_pullup callback Just simplify the use of is_on and get rid of superfluous condition. Cc: gregkh@linuxfoundation.org Cc: nicolas.ferre@microchip.com Cc: alexandre.belloni@bootlin.com Cc: linux-usb@vger.kernel.org Cc: kernel@pengutronix.de Reviewed-by: Claudiu Beznea Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20221104215516.2874922-2-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/at91_udc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 8c94951560ef29c455043bf2dfa2275b011edc66 Author: Matthew Auld Date: Tue Nov 8 10:32:38 2022 +0000 drm/i915: use i915_sg_dma_sizes() for all backends We rely on page_sizes.sg in setup_scratch_page() reporting the correct value if the underlying sgl is not contiguous, however in get_pages_internal() we are only looking at the layout of the created pages when calculating the sg_page_sizes, and not the final sgl, which could in theory be completely different. In such a situation we might incorrectly think we have a 64K scratch page, when it is actually only 4K or similar split over multiple non-contiguous entries, which could lead to broken behaviour when touching the scratch space within the padding of a 64K GTT page-table. For most of the other backends we already just call i915_sg_dma_sizes() on the final mapping, so rather just move that into __i915_gem_object_set_pages() to avoid such issues coming back to bite us later. v2: Update missing conversion in gvt Suggested-by: Tvrtko Ursulin Signed-off-by: Matthew Auld Cc: Stuart Summers Cc: Andrzej Hajda Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221108103238.165447-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 4 +--- drivers/gpu/drm/i915/gem/i915_gem_internal.c | 5 +---- drivers/gpu/drm/i915/gem/i915_gem_object.h | 3 +-- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 7 +++---- drivers/gpu/drm/i915/gem/i915_gem_phys.c | 9 +++------ drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 3 +-- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 4 +--- drivers/gpu/drm/i915/gem/selftests/huge_gem_object.c | 2 +- drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 10 +++------- drivers/gpu/drm/i915/gvt/dmabuf.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 5 +---- drivers/gpu/drm/i915/selftests/mock_region.c | 2 +- 14 files changed, 20 insertions(+), 40 deletions(-) commit 6b818c533dd8615a803a72733eace58fd06e5a3c Author: Jagan Teki Date: Tue Nov 8 23:01:20 2022 +0530 drm: panel: Add Jadard JD9365DA-H3 DSI panel Jadard JD9365DA-H3 is WXGA MIPI DSI panel and it support TFT dot matrix LCD with 800RGBx1280 dots at maximum. Add support for it. Cc: dri-devel@lists.freedesktop.org Signed-off-by: Jagan Teki Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221108173120.618312-4-jagan@edgeble.ai MAINTAINERS | 1 + drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c | 473 +++++++++++++++++++++++ 4 files changed, 485 insertions(+) commit bb3098eead990ca3379357564ae57b8107b40d34 Author: Jagan Teki Date: Tue Nov 8 23:01:19 2022 +0530 dt-bindings: display: Document Jadard JD9365DA-H3 DSI panel Jadard JD9365DA-H3 is WXGA MIPI DSI panel and it support TFT dot matrix LCD with 800RGBx1280 dots at maximum. Document it. Cc: dri-devel@lists.freedesktop.org Signed-off-by: Jagan Teki Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221108173120.618312-3-jagan@edgeble.ai .../bindings/display/panel/jadard,jd9365da-h3.yaml | 70 ++++++++++++++++++++++ MAINTAINERS | 5 ++ 2 files changed, 75 insertions(+) commit 0b894c4667e084b25a740327e3aac6afe5ae08b2 Author: Jagan Teki Date: Tue Nov 8 23:01:18 2022 +0530 dt-bindings: vendor-prefixes: Document Jadard Jadard Technology Inc. manufactures and distributes chips from Shenzhen. Add vendor prefix for it. Signed-off-by: Jagan Teki Acked-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221108173120.618312-2-jagan@edgeble.ai Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 90f86d0c617d9461cb00f4d8e861eda28011d46e Author: Jagan Teki Date: Tue Nov 8 23:01:17 2022 +0530 dt-bindings: vendor-prefixes: Document Chongzhou Chongzhou is a professional is a manufacturer of LCD panels from Shenzhen. Add vendor prefix for it. Acked-by: Krzysztof Kozlowski Signed-off-by: Jagan Teki Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221108173120.618312-1-jagan@edgeble.ai Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 4829297c9bf4659f98e946ba810ebe86411e6a9d Author: Siarhei Volkau Date: Tue Nov 1 23:51:59 2022 +0300 docs/pinctrl: fix runtime pinmuxing example The example declares "struct pinctrl *p" but refers to "foo->p" which isn't declared in the context of the example. Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221101205159.1468069-3-lis8215@gmail.com Signed-off-by: Linus Walleij Documentation/driver-api/pin-control.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c1542be1ef070589996ea4ebf847afa5577298af Author: Siarhei Volkau Date: Tue Nov 1 23:51:58 2022 +0300 docs/pinctrl: fix pinctrl_select_state examples The function requires two arguments. Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221101205159.1468069-2-lis8215@gmail.com Signed-off-by: Linus Walleij Documentation/driver-api/pin-control.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 97775ebbe89b5a97e9465e4378f5b1c2fc7d4faa Author: Jonathan Neuschäfer Date: Mon Oct 31 23:28:33 2022 +0100 pinctrl: nuvoton: wpcm450: Convert irqchip to IRQCHIP_IMMUTABLE Commit 6c846d026d490 ("gpio: Don't fiddle with irqchips marked as immutable") added a warning for irqchips that are not marked with IRQCHIP_IMMUTABLE. Convert the pinctrl-wpcm450 driver to an immutable irqchip. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221031222833.201322-1-j.neuschaefer@gmx.net Signed-off-by: Linus Walleij drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 1e2607a004c78f3537fc3977ee49f6fcba12b058 Author: Yassine Oudjana Date: Fri Oct 28 18:34:58 2022 +0300 dt-bindings: pinctrl: mediatek,pinctrl-mt6795: Improve interrupts description Clarify the meaning of sysirq to avoid confusion. Suggested-by: AngeloGioacchino Del Regno Signed-off-by: Yassine Oudjana Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221028153505.23741-7-y.oudjana@protonmail.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/mediatek,pinctrl-mt6795.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7000166e090ca537eb32ef1aa8199c764b63cce Author: Yassine Oudjana Date: Fri Oct 28 18:34:57 2022 +0300 dt-bindings: pinctrl: mediatek,pinctrl-mt6795: Fix interrupt count The document currently states a maximum of 1 interrupt, but the DT has 2 specified causing a dtbs_check error. Replace the maximum limit with a minimum and add per-interrupt descriptions to pass the check. Fixes: 81557a71564a ("dt-bindings: pinctrl: Add MediaTek MT6795 pinctrl bindings") Suggested-by: AngeloGioacchino Del Regno Signed-off-by: Yassine Oudjana Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221028153505.23741-6-y.oudjana@protonmail.com Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/mediatek,pinctrl-mt6795.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6c873654bd413b6f2c77aa4724b42142a8353ff3 Author: Yassine Oudjana Date: Fri Oct 28 18:34:56 2022 +0300 dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Add MT6797 Combine MT6797 pin controller document into MT6779 one. reg and reg-names property constraints are set using conditionals. A conditional is also used to make interrupt-related properties required on the MT6779 pin controller only, since the MT6797 controller doesn't support interrupts (or not yet, at least). drive-strength and slew-rate properties which weren't described in the MT6779 document before are brought in from the MT6797 one. Both pin controllers share a common driver core so they should both support these properties. Signed-off-by: Yassine Oudjana Reviewed-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221028153505.23741-5-y.oudjana@protonmail.com Signed-off-by: Linus Walleij .../bindings/pinctrl/mediatek,mt6779-pinctrl.yaml | 87 +++++++--- .../bindings/pinctrl/mediatek,mt6797-pinctrl.yaml | 176 --------------------- MAINTAINERS | 2 +- 3 files changed, 67 insertions(+), 198 deletions(-) commit 7e63d92d2c36bd11bbd323d958da593d2a527dd4 Author: Yassine Oudjana Date: Fri Oct 28 18:34:55 2022 +0300 dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Make gpio-ranges optional The pin controller can function without specifying gpio-ranges so remove it from required properties. This is also done in preparation for adding other pin controllers which currently don't have the gpio-ranges property defined where they are used in DTS. This allows dtbs_check to pass on those device trees. Signed-off-by: Yassine Oudjana Reviewed-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221028153505.23741-4-y.oudjana@protonmail.com Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml | 1 - 1 file changed, 1 deletion(-) commit c5a402a329e1e614235a031dfbc0b0bc17b88dea Author: Yassine Oudjana Date: Fri Oct 28 18:34:54 2022 +0300 dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Improve description The current description mentions having to put the pin controller node under a syscon node, but this is not the case in the current MT6779 device tree. This is not actually needed, so replace the current description with something more generic that describes the use of the hardware block. Signed-off-by: Yassine Oudjana Reviewed-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221028153505.23741-3-y.oudjana@protonmail.com Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a60c0401729851bfe637c2c8af5f759ea985336f Author: Zhi-Jun You Date: Mon Nov 7 00:22:27 2022 +0800 wifi: ath10k: Use IEEE80211_SEQ_TO_SN() for seq_ctrl conversion Use IEEE80211_SEQ_TO_SN() macro to convert seq_ctrl to sn for better readability. Signed-off-by: Zhi-Jun You Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221106162227.1119-1-hujy652@gmail.com drivers/net/wireless/ath/ath10k/htt_rx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dc45398446be10c35e4272537605b75f87c5037d Author: Colin Ian King Date: Fri Nov 4 14:07:23 2022 +0000 wifi: ath9k: Remove unused variable mismatch Variable mismatch is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221104140723.226857-1-colin.i.king@gmail.com drivers/net/wireless/ath/ath9k/ar9003_mci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 901c247f9687b5aecc950a931a3b0e1930d02bfd Author: Ping-Ke Shih Date: Tue Nov 8 09:42:30 2022 +0800 wifi: rtw89: 8852b: change debug mask of message of no TX resource 8852B has smaller TX FIFO than others in WiFi chip, so it would be buffer full frequently, but it doesn't affect TX performance. However, it shows verbose debug messages with RTW89_DBG_UNEXP mask that is used to indicate abnormal behavior, so change debug mask to RTW89_DBG_TXRX for 8852B. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221108014230.11068-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/pci.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 525c06c81d75690a9b795cc62a758838c1a6b6fe Author: Ping-Ke Shih Date: Tue Nov 8 09:38:58 2022 +0800 wifi: rtw89: use u32_encode_bits() to fill MAC quota value Coverity reported shift 16 bits could cause sign extension and might get an unexpected value. Since the input values are predefined and no this kind of case, original code is safe so far. But, still changing them to use u32_encode_bits() will be more clear and prevent mistakes in the future. The original message of Coverity is: Suspicious implicit sign extension: "max_cfg->cma0_dma" with type "u16" (16 bits, unsigned) is promoted in "max_cfg->cma0_dma << 16" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned). If "max_cfg->cma0_dma << 16" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1." Reported-by: coverity-bot Addresses-Coverity-ID: 1527095 ("Integer handling issues") Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221108013858.10806-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9901c21bcaf2f01fe5078f750d624f4ddfa8f81b Author: Chen Hui Date: Tue Nov 8 15:23:02 2022 +0800 cpufreq: qcom-hw: Fix memory leak in qcom_cpufreq_hw_read_lut() If "cpu_dev" fails to get opp table in qcom_cpufreq_hw_read_lut(), the program will return, resulting in "table" resource is not released. Fixes: 51c843cf77bb ("cpufreq: qcom: Update the bandwidth levels on frequency change") Signed-off-by: Chen Hui Reviewed-by: Sibi Sankar Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 1 + 1 file changed, 1 insertion(+) commit febc50b82bc95089ef1d6f68a101c8a2b701e9ce Author: Srinivasa Rao Mandadapu Date: Tue Nov 8 20:16:03 2022 +0530 dt-bindings: soundwire: Convert text bindings to DT Schema Convert soundwire text bindings to DT Schema format. Update interrupt property items as per device tree, as it is not appropriately described in text file. Update some of the properties description with minimum and maximum range. Update secondary node info which is used to describe slave devices. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Ratna Deepthi Kudaravalli Signed-off-by: Ratna Deepthi Kudaravalli Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1667918763-32445-5-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Vinod Koul .../devicetree/bindings/soundwire/qcom,sdw.txt | 215 ---------------- .../bindings/soundwire/qcom,soundwire.yaml | 270 +++++++++++++++++++++ 2 files changed, 270 insertions(+), 215 deletions(-) commit 7dddead766c0826a998e7053e7d1c92b3422f8d6 Author: Pierre-Louis Bossart Date: Tue Nov 1 10:35:21 2022 +0800 soundwire: cadence: use dai_runtime_array instead of dma_data Simplify the code with a Cadence-specific dai_runtime_array, indexed with dai->id, instead of abusing dma_data. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221101023521.2384586-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/cadence_master.c | 30 ++++++++++++++---------------- drivers/soundwire/cadence_master.h | 5 +++++ drivers/soundwire/intel.c | 33 ++++++++++++++++----------------- 3 files changed, 35 insertions(+), 33 deletions(-) commit e0767e391079687081c5564b1390983c36b49cd1 Author: Pierre-Louis Bossart Date: Tue Nov 1 10:35:20 2022 +0800 soundwire: cadence: rename sdw_cdns_dai_dma_data as sdw_cdns_dai_runtime The existing 'struct sdw_cdns_dma_data' has really nothing to do with DMAs. The information is stored in the dai->dma_data, but this is really private data that should be stored in a different context. Beyond the academic elegance discussion, using dma_data is a problem for new Intel hardware where the dma_data structure is already used for true DMA handling performed by other parts of the code. This patch prepares a transition away from the use of dma_data, for now with a rename-only change. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221101023521.2384586-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/cadence_master.c | 30 ++++++------ drivers/soundwire/cadence_master.h | 4 +- drivers/soundwire/intel.c | 96 +++++++++++++++++++------------------- 3 files changed, 65 insertions(+), 65 deletions(-) commit 380f9acdf74729d79972b947820f00b42cc26dae Author: Yoshihiro Shimoda Date: Mon Nov 7 17:10:21 2022 +0900 net: ethernet: renesas: rswitch: Fix endless loop in error paths Coverity reported that the error path in rswitch_gwca_queue_alloc_skb() has an issue to cause endless loop. So, fix the issue by changing variables' types from u32 to int. After changed the types, rswitch_tx_free() should use rswitch_get_num_cur_queues() to calculate number of current queues. Reported-by: coverity-bot Addresses-Coverity-ID: 1527147 ("Control flow issues") Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221107081021.2955122-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/renesas/rswitch.c | 17 +++++++++-------- drivers/net/ethernet/renesas/rswitch.h | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) commit ea0ffd0c08d0fef1f6e93eb07badbeeabf6b43d6 Author: Kairui Song Date: Mon Oct 24 00:25:33 2022 +0800 swap: add a limit for readahead page-cluster value Currenty there is no upper limit for /proc/sys/vm/page-cluster, and it's a bit shift value, so it could result in overflow of the 32-bit integer. Add a reasonable upper limit for it, read-in at most 2**31 pages, which is a large enough value for readahead. Link: https://lkml.kernel.org/r/20221023162533.81561-1-ryncsn@gmail.com Signed-off-by: Kairui Song Signed-off-by: Andrew Morton include/linux/mm.h | 1 + kernel/sysctl.c | 1 + mm/swap.c | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) commit 5033091de814ab4b5623faed2755f3064e19e2d2 Author: Naoya Horiguchi Date: Mon Oct 24 15:20:12 2022 +0900 mm/hwpoison: introduce per-memory_block hwpoison counter Currently PageHWPoison flag does not behave well when experiencing memory hotremove/hotplug. Any data field in struct page is unreliable when the associated memory is offlined, and the current mechanism can't tell whether a memory block is onlined because a new memory devices is installed or because previous failed offline operations are undone. Especially if there's a hwpoisoned memory, it's unclear what the best option is. So introduce a new mechanism to make struct memory_block remember that a memory block has hwpoisoned memory inside it. And make any online event fail if the onlining memory block contains hwpoison. struct memory_block is freed and reallocated over ACPI-based hotremove/hotplug, but not over sysfs-based hotremove/hotplug. So the new counter can distinguish these cases. Link: https://lkml.kernel.org/r/20221024062012.1520887-5-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Reported-by: kernel test robot Reviewed-by: Miaohe Lin Cc: David Hildenbrand Cc: Jane Chu Cc: Mike Kravetz Cc: Muchun Song Cc: Oscar Salvador Cc: Yang Shi Signed-off-by: Andrew Morton drivers/base/memory.c | 38 ++++++++++++++++++++++++++++++++++++++ include/linux/memory.h | 3 +++ include/linux/mm.h | 20 +++++++++++++++++++- mm/internal.h | 8 -------- mm/memory-failure.c | 36 +++++++++++------------------------- mm/sparse.c | 2 -- 6 files changed, 71 insertions(+), 36 deletions(-) commit a46c9304b4bbf1b164154976cbb7e648980c7b5b Author: Naoya Horiguchi Date: Mon Oct 24 15:20:11 2022 +0900 mm/hwpoison: pass pfn to num_poisoned_pages_*() No functional change. Link: https://lkml.kernel.org/r/20221024062012.1520887-4-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Cc: David Hildenbrand Cc: Jane Chu Cc: Mike Kravetz Cc: Muchun Song Cc: Oscar Salvador Cc: Yang Shi Signed-off-by: Andrew Morton arch/parisc/kernel/pdt.c | 2 +- include/linux/mm.h | 4 ++-- mm/memory-failure.c | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) commit d027122d8363e58cd8bc2fa6a16917f7f69b85bb Author: Naoya Horiguchi Date: Mon Oct 24 15:20:10 2022 +0900 mm/hwpoison: move definitions of num_poisoned_pages_* to memory-failure.c These interfaces will be used by drivers/base/memory.c by later patch, so as a preparatory work move them to more common header file visible to the file. Link: https://lkml.kernel.org/r/20221024062012.1520887-3-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Cc: David Hildenbrand Cc: Jane Chu Cc: Mike Kravetz Cc: Muchun Song Cc: Oscar Salvador Cc: Yang Shi Signed-off-by: Andrew Morton arch/parisc/kernel/pdt.c | 3 +-- include/linux/mm.h | 5 +++++ include/linux/swapops.h | 24 ++---------------------- mm/memory-failure.c | 10 ++++++++++ 4 files changed, 18 insertions(+), 24 deletions(-) commit e591ef7d96d6ea249916f351dc26a636e565c635 Author: Naoya Horiguchi Date: Mon Oct 24 15:20:09 2022 +0900 mm,hwpoison,hugetlb,memory_hotplug: hotremove memory section with hwpoisoned hugepage Patch series "mm, hwpoison: improve handling workload related to hugetlb and memory_hotplug", v7. This patchset tries to solve the issue among memory_hotplug, hugetlb and hwpoison. In this patchset, memory hotplug handles hwpoison pages like below: - hwpoison pages should not prevent memory hotremove, - memory block with hwpoison pages should not be onlined. This patch (of 4): HWPoisoned page is not supposed to be accessed once marked, but currently such accesses can happen during memory hotremove because do_migrate_range() can be called before dissolve_free_huge_pages() is called. Clear HPageMigratable for hwpoisoned hugepages to prevent them from being migrated. This should be done in hugetlb_lock to avoid race against isolate_hugetlb(). get_hwpoison_huge_page() needs to have a flag to show it's called from unpoison to take refcount of hwpoisoned hugepages, so add it. [naoya.horiguchi@linux.dev: remove TestClearHPageMigratable and reduce to test and clear separately] Link: https://lkml.kernel.org/r/20221025053559.GA2104800@ik1-406-35019.vs.sakura.ne.jp Link: https://lkml.kernel.org/r/20221024062012.1520887-1-naoya.horiguchi@linux.dev Link: https://lkml.kernel.org/r/20221024062012.1520887-2-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Reported-by: Miaohe Lin Reviewed-by: Oscar Salvador Reviewed-by: Miaohe Lin Cc: David Hildenbrand Cc: Jane Chu Cc: Mike Kravetz Cc: Muchun Song Cc: Yang Shi Signed-off-by: Andrew Morton include/linux/hugetlb.h | 10 ++++++---- include/linux/mm.h | 6 ++++-- mm/hugetlb.c | 9 +++++---- mm/memory-failure.c | 21 +++++++++++++++++---- 4 files changed, 32 insertions(+), 14 deletions(-) commit fd4a7ac32918d3d7a2d17dc06c5520f45e36eb52 Author: Baolin Wang Date: Mon Oct 24 16:34:22 2022 +0800 mm: migrate: try again if THP split is failed due to page refcnt When creating a virtual machine, we will use memfd_create() to get a file descriptor which can be used to create share memory mappings using the mmap function, meanwhile the mmap() will set the MAP_POPULATE flag to allocate physical pages for the virtual machine. When allocating physical pages for the guest, the host can fallback to allocate some CMA pages for the guest when over half of the zone's free memory is in the CMA area. In guest os, when the application wants to do some data transaction with DMA, our QEMU will call VFIO_IOMMU_MAP_DMA ioctl to do longterm-pin and create IOMMU mappings for the DMA pages. However, when calling VFIO_IOMMU_MAP_DMA ioctl to pin the physical pages, we found it will be failed to longterm-pin sometimes. After some invetigation, we found the pages used to do DMA mapping can contain some CMA pages, and these CMA pages will cause a possible failure of the longterm-pin, due to failed to migrate the CMA pages. The reason of migration failure may be temporary reference count or memory allocation failure. So that will cause the VFIO_IOMMU_MAP_DMA ioctl returns error, which makes the application failed to start. I observed one migration failure case (which is not easy to reproduce) is that, the 'thp_migration_fail' count is 1 and the 'thp_split_page_failed' count is also 1. That means when migrating a THP which is in CMA area, but can not allocate a new THP due to memory fragmentation, so it will split the THP. However THP split is also failed, probably the reason is temporary reference count of this THP. And the temporary reference count can be caused by dropping page caches (I observed the drop caches operation in the system), but we can not drop the shmem page caches due to they are already dirty at that time. Especially for THP split failure, which is caused by temporary reference count, we can try again to mitigate the failure of migration in this case according to previous discussion [1]. [1] https://lore.kernel.org/all/470dc638-a300-f261-94b4-e27250e42f96@redhat.com/ Link: https://lkml.kernel.org/r/6784730480a1df82e8f4cba1ed088e4ac767994b.1666599848.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: "Huang, Ying" Cc: Alistair Popple Cc: David Hildenbrand Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton mm/huge_memory.c | 4 ++-- mm/migrate.c | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) commit b12fdbf15f92b6cf5fecdd8a1855afe8809e5c58 Author: Peter Xu Date: Mon Oct 24 15:33:36 2022 -0400 Revert "mm/uffd: fix warning without PTE_MARKER_UFFD_WP compiled in" With " mm/uffd: Fix vma check on userfault for wp" to fix the registration, we'll be safe to remove the macro hacks now. Link: https://lkml.kernel.org/r/20221024193336.1233616-3-peterx@redhat.com Signed-off-by: Peter Xu Signed-off-by: Andrew Morton mm/hugetlb.c | 4 ---- mm/memory.c | 2 -- mm/mprotect.c | 2 -- 3 files changed, 8 deletions(-) commit 26215b7ee923b9251f7bb12c4e5f09dc465d35f2 Author: Hawkins Jiawei Date: Fri Oct 21 07:16:08 2022 +0800 hugetlbfs: fix null-ptr-deref in hugetlbfs_parse_param() Syzkaller reports a null-ptr-deref bug as follows: ====================================================== KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] RIP: 0010:hugetlbfs_parse_param+0x1dd/0x8e0 fs/hugetlbfs/inode.c:1380 [...] Call Trace: vfs_parse_fs_param fs/fs_context.c:148 [inline] vfs_parse_fs_param+0x1f9/0x3c0 fs/fs_context.c:129 vfs_parse_fs_string+0xdb/0x170 fs/fs_context.c:191 generic_parse_monolithic+0x16f/0x1f0 fs/fs_context.c:231 do_new_mount fs/namespace.c:3036 [inline] path_mount+0x12de/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd [...] ====================================================== According to commit "vfs: parse: deal with zero length string value", kernel will set the param->string to null pointer in vfs_parse_fs_string() if fs string has zero length. Yet the problem is that, hugetlbfs_parse_param() will dereference the param->string, without checking whether it is a null pointer. To be more specific, if hugetlbfs_parse_param() parses an illegal mount parameter, such as "size=,", kernel will constructs struct fs_parameter with null pointer in vfs_parse_fs_string(), then passes this struct fs_parameter to hugetlbfs_parse_param(), which triggers the above null-ptr-deref bug. This patch solves it by adding sanity check on param->string in hugetlbfs_parse_param(). Link: https://lkml.kernel.org/r/20221020231609.4810-1-yin31149@gmail.com Reported-by: syzbot+a3e6acd85ded5c16a709@syzkaller.appspotmail.com Tested-by: syzbot+a3e6acd85ded5c16a709@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/0000000000005ad00405eb7148c6@google.com/ Signed-off-by: Hawkins Jiawei Reviewed-by: Mike Kravetz Cc: Hawkins Jiawei Cc: Muchun Song Cc: Ian Kent Signed-off-by: Andrew Morton fs/hugetlbfs/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b66d00dfebe79ebd0d5a0ec4ee4e26583432c381 Author: Kefeng Wang Date: Fri Oct 21 16:46:11 2022 +0800 mm: memory-failure: make action_result() return int Check mf_result in action_result(), only return 0 when MF_RECOVERED, or return -EBUSY, which will simplify code a bit. [wangkefeng.wang@huawei.com: v2] Link: https://lkml.kernel.org/r/20221024035138.99119-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20221021084611.53765-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Signed-off-by: Andrew Morton mm/memory-failure.c | 45 ++++++++++++++++----------------------------- 1 file changed, 16 insertions(+), 29 deletions(-) commit 183a7c5d15d3c56f49955662d3edd0092141df78 Author: Kefeng Wang Date: Fri Oct 21 16:46:10 2022 +0800 mm: memory-failure: avoid pfn_valid() twice in soft_offline_page() Simplify WARN_ON_ONCE(flags & MF_COUNT_INCREASED) under !pfn_valid(). Link: https://lkml.kernel.org/r/20221021084611.53765-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Signed-off-by: Andrew Morton mm/memory-failure.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b5f1fc98c62b6b75e9f7499e7519dc67684affd3 Author: Kefeng Wang Date: Fri Oct 21 16:46:09 2022 +0800 mm: memory-failure: make put_ref_page() more useful Pass pfn/flags to put_ref_page(), then check MF_COUNT_INCREASED and drop refcount to make the code look cleaner. Link: https://lkml.kernel.org/r/20221021084611.53765-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Signed-off-by: Andrew Morton mm/memory-failure.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit f39556bc2530c83a22bc11b73c7a46df9a340685 Author: Miguel Ojeda Date: Fri Oct 21 13:59:56 2022 +0200 compiler-gcc: document minimum version for `__no_sanitize_coverage__` The attribute was added in GCC 12.1. This will simplify future cleanups, and is closer to what we do in `compiler_attributes.h`. Link: https://godbolt.org/z/MGbT76j6G Link: https://lkml.kernel.org/r/20221021115956.9947-5-ojeda@kernel.org Signed-off-by: Miguel Ojeda Acked-by: Marco Elver Reviewed-by: Nathan Chancellor Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Arnd Bergmann Cc: Dan Li Cc: Kees Cook Cc: Kumar Kartikeya Dwivedi Cc: Nick Desaulniers Cc: Uros Bizjak Signed-off-by: Andrew Morton include/linux/compiler-gcc.h | 3 +++ 1 file changed, 3 insertions(+) commit 689540cbda7f69594ae5e13fef4c8239519d8b66 Author: Miguel Ojeda Date: Fri Oct 21 13:59:55 2022 +0200 compiler-gcc: remove attribute support check for `__no_sanitize_undefined__` The attribute was added in GCC 4.9, while the minimum GCC version supported by the kernel is GCC 5.1. Therefore, remove the check. Link: https://godbolt.org/z/GrMeo6fYr Link: https://lkml.kernel.org/r/20221021115956.9947-4-ojeda@kernel.org Signed-off-by: Miguel Ojeda Reviewed-by: Nathan Chancellor Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Arnd Bergmann Cc: Dan Li Cc: Kees Cook Cc: Kumar Kartikeya Dwivedi Cc: Marco Elver Cc: Nick Desaulniers Cc: Uros Bizjak Signed-off-by: Andrew Morton include/linux/compiler-gcc.h | 4 ---- 1 file changed, 4 deletions(-) commit 095ac0763ac507dd4e1a71ad9784f49f51498483 Author: Miguel Ojeda Date: Fri Oct 21 13:59:54 2022 +0200 compiler-gcc: remove attribute support check for `__no_sanitize_thread__` The attribute was added in GCC 5.1, which matches the minimum GCC version supported by the kernel. Therefore, remove the check. Link: https://godbolt.org/z/vbxKejxbx Link: https://lkml.kernel.org/r/20221021115956.9947-3-ojeda@kernel.org Signed-off-by: Miguel Ojeda Acked-by: Marco Elver Reviewed-by: Nathan Chancellor Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Arnd Bergmann Cc: Dan Li Cc: Kees Cook Cc: Kumar Kartikeya Dwivedi Cc: Nick Desaulniers Cc: Uros Bizjak Signed-off-by: Andrew Morton include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae37a9a2c2d0960d643d782b426ea1aa9c05727a Author: Miguel Ojeda Date: Fri Oct 21 13:59:53 2022 +0200 compiler-gcc: remove attribute support check for `__no_sanitize_address__` The attribute was added in GCC 4.8, while the minimum GCC version supported by the kernel is GCC 5.1. Therefore, remove the check. Link: https://godbolt.org/z/84v56vcn8 Link: https://lkml.kernel.org/r/20221021115956.9947-2-ojeda@kernel.org Signed-off-by: Miguel Ojeda Reviewed-by: Nathan Chancellor Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Arnd Bergmann Cc: Dan Li Cc: Kees Cook Cc: Kumar Kartikeya Dwivedi Cc: Marco Elver Cc: Nick Desaulniers Cc: Uros Bizjak Signed-off-by: Andrew Morton include/linux/compiler-gcc.h | 4 ---- 1 file changed, 4 deletions(-) commit 6e2be1f2ebcea42ed6044432f72f32434e60b34d Author: Miguel Ojeda Date: Fri Oct 21 13:59:52 2022 +0200 compiler-gcc: be consistent with underscores use for `no_sanitize` Patch series "compiler-gcc: be consistent with underscores use for `no_sanitize`". This patch (of 5): Other macros that define shorthands for attributes in e.g. `compiler_attributes.h` and elsewhere use underscores. Link: https://lkml.kernel.org/r/20221021115956.9947-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda Reviewed-by: Nathan Chancellor Cc: Marco Elver Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Arnd Bergmann Cc: Dan Li Cc: Kees Cook Cc: Kumar Kartikeya Dwivedi Cc: Nick Desaulniers Cc: Uros Bizjak Signed-off-by: Andrew Morton include/linux/compiler-gcc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4781593d5dbae50500d1c7975be03b590ae2b92a Author: Peter Xu Date: Thu Oct 20 15:38:32 2022 -0400 mm/hugetlb: unify clearing of RestoreReserve for private pages A trivial cleanup to move clearing of RestoreReserve into adding anon rmap of private hugetlb mappings. It matches with the shared mappings where we only clear the bit when adding into page cache, rather than spreading it around the code paths. Link: https://lkml.kernel.org/r/20221020193832.776173-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton mm/hugetlb.c | 14 ++++---------- mm/rmap.c | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) commit cc03817c0e8417419ede18a8e0749c5b9699b135 Author: Kefeng Wang Date: Wed Oct 19 11:49:45 2022 +0800 amdgpu: use VM_ACCESS_FLAGS Simplify VM_READ|VM_WRITE|VM_EXEC with VM_ACCESS_FLAGS. Link: https://lkml.kernel.org/r/20221019034945.93081-6-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Dave Hansen Cc: Dinh Nguyen Cc: Jarkko Sakkinen Signed-off-by: Andrew Morton drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7e679b6f9d9f7337f0fdc5011f2ecc9b16f821b Author: Kefeng Wang Date: Wed Oct 19 11:49:44 2022 +0800 mm: debug_vm_pgtable: use VM_ACCESS_FLAGS Directly use VM_ACCESS_FLAGS instead VMFLAGS. Link: https://lkml.kernel.org/r/20221019034945.93081-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Alex Deucher Cc: "Christian König" Cc: Daniel Vetter Cc: Dave Hansen Cc: David Airlie Cc: Dinh Nguyen Cc: Jarkko Sakkinen Cc: "Pan, Xinhui" Signed-off-by: Andrew Morton mm/debug_vm_pgtable.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e39ee675f42e993bbf1c04b1ad7526db820ccdce Author: Kefeng Wang Date: Wed Oct 19 11:49:43 2022 +0800 mm: mprotect: use VM_ACCESS_FLAGS Simplify VM_READ|VM_WRITE|VM_EXEC with VM_ACCESS_FLAGS. Link: https://lkml.kernel.org/r/20221019034945.93081-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Alex Deucher Cc: "Christian König" Cc: Daniel Vetter Cc: Dave Hansen Cc: David Airlie Cc: Dinh Nguyen Cc: Jarkko Sakkinen Cc: "Pan, Xinhui" Signed-off-by: Andrew Morton mm/mprotect.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4f20566f5c0f42c451f6a43be9bfa6f0b3d142df Author: Kefeng Wang Date: Wed Oct 19 11:49:42 2022 +0800 x86/sgx: use VM_ACCESS_FLAGS Simplify VM_READ|VM_WRITE|VM_EXEC with VM_ACCESS_FLAGS. Link: https://lkml.kernel.org/r/20221019034945.93081-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Jarkko Sakkinen Cc: Dave Hansen Cc: Alex Deucher Cc: "Christian König" Cc: Daniel Vetter Cc: David Airlie Cc: Dinh Nguyen Cc: "Pan, Xinhui" Signed-off-by: Andrew Morton arch/x86/kernel/cpu/sgx/encl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 93d38b72e4c1a518f46fd6dfcb5ad7c5003fa372 Author: Kefeng Wang Date: Wed Oct 19 11:49:41 2022 +0800 nios2: remove unused INIT_MMAP Patch series "mm: cleanup with VM_ACCESS_FLAGS". This patch (of 5): It seems that INIT_MMAP is gone in 2.4.10, not sure, anyways, it is useless now, kill it. Link: https://lkml.kernel.org/r/20221019034945.93081-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20221019034945.93081-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Dinh Nguyen Cc: Dave Hansen Cc: Jarkko Sakkinen Cc: Kefeng Wang Cc: Alex Deucher Cc: "Christian König" Cc: Daniel Vetter Cc: David Airlie Cc: "Pan, Xinhui" Signed-off-by: Andrew Morton arch/nios2/include/asm/processor.h | 3 --- 1 file changed, 3 deletions(-) commit c5255b421fd04ba6a405809b7216a3b6ebd5493a Author: Matthew Wilcox (Oracle) Date: Wed Oct 19 19:33:32 2022 +0100 mm: remove FGP_HEAD This is no longer used; all callers have been converted to use folios instead. Somehow this manages to save 11 bytes of text. Link: https://lkml.kernel.org/r/20221019183332.2802139-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/pagemap.h | 5 ++--- mm/folio-compat.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit 524984ff66ee4b63264dffe568c3547a20b4136c Author: Matthew Wilcox (Oracle) Date: Wed Oct 19 19:33:31 2022 +0100 mm: convert find_get_incore_page() to filemap_get_incore_folio() Return the containing folio instead of the precise page. One of the callers wants the folio and the other can do the folio->page conversion itself. Nets 442 bytes of text size reduction, 478 bytes removed and 36 bytes added. Link: https://lkml.kernel.org/r/20221019183332.2802139-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/memcontrol.c | 12 +++++++++--- mm/mincore.c | 10 +++++----- mm/swap.h | 8 +++++--- mm/swap_state.c | 15 +++++++-------- 4 files changed, 26 insertions(+), 19 deletions(-) commit dd8095b15a6034165bc48da1eb6d0acc73c1558a Author: Matthew Wilcox (Oracle) Date: Wed Oct 19 19:33:30 2022 +0100 mm/swap: convert find_get_incore_page to use folios Eliminates a use of FGP_HEAD and saves 35 bytes of text. Link: https://lkml.kernel.org/r/20221019183332.2802139-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/swap_state.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 9ee2c086271639d82ad8f6e96b91fa7991800c0a Author: Matthew Wilcox (Oracle) Date: Wed Oct 19 19:33:29 2022 +0100 mm/huge_memory: convert split_huge_pages_in_file() to use a folio Patch series "Remove FGP_HEAD flag". We have just two users left of the FGP_HEAD flag and both of them are better off; sometimes startlingly so as a result of conversion to use folios. This patch (of 4): Removes a number of calls to compound_head() and a call to pagecache_get_page(). Link: https://lkml.kernel.org/r/20221019183332.2802139-1-willy@infradead.org Link: https://lkml.kernel.org/r/20221019183332.2802139-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/huge_memory.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit e025ab842ec35225b1a8e163d1f311beb9e38ce9 Author: Kefeng Wang Date: Tue Oct 18 15:40:14 2022 +0800 mm: remove kern_addr_valid() completely Most architectures (except arm64/x86/sparc) simply return 1 for kern_addr_valid(), which is only used in read_kcore(), and it calls copy_from_kernel_nofault() which could check whether the address is a valid kernel address. So as there is no need for kern_addr_valid(), let's remove it. Link: https://lkml.kernel.org/r/20221018074014.185687-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Geert Uytterhoeven [m68k] Acked-by: Heiko Carstens [s390] Acked-by: Christoph Hellwig Acked-by: Helge Deller [parisc] Acked-by: Michael Ellerman [powerpc] Acked-by: Guo Ren [csky] Acked-by: Catalin Marinas [arm64] Cc: Alexander Gordeev Cc: Andy Lutomirski Cc: Anton Ivanov Cc: Cc: Borislav Petkov Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Chris Zankel Cc: Dave Hansen Cc: David S. Miller Cc: Dinh Nguyen Cc: Greg Ungerer Cc: H. Peter Anvin Cc: Huacai Chen Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: James Bottomley Cc: Johannes Berg Cc: Jonas Bonn Cc: Matt Turner Cc: Max Filippov Cc: Michal Simek Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Richard Henderson Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Sven Schnelle Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Xuerui Wang Cc: Yoshinori Sato Signed-off-by: Andrew Morton arch/alpha/include/asm/pgtable.h | 2 -- arch/arc/include/asm/pgtable-bits-arcv2.h | 2 -- arch/arm/include/asm/pgtable-nommu.h | 2 -- arch/arm/include/asm/pgtable.h | 4 --- arch/arm64/include/asm/pgtable.h | 2 -- arch/arm64/mm/mmu.c | 47 ------------------------------- arch/arm64/mm/pageattr.c | 3 +- arch/csky/include/asm/pgtable.h | 3 -- arch/hexagon/include/asm/page.h | 7 ----- arch/ia64/include/asm/pgtable.h | 16 ----------- arch/loongarch/include/asm/pgtable.h | 2 -- arch/m68k/include/asm/pgtable_mm.h | 2 -- arch/m68k/include/asm/pgtable_no.h | 1 - arch/microblaze/include/asm/pgtable.h | 3 -- arch/mips/include/asm/pgtable.h | 2 -- arch/nios2/include/asm/pgtable.h | 2 -- arch/openrisc/include/asm/pgtable.h | 2 -- arch/parisc/include/asm/pgtable.h | 15 ---------- arch/powerpc/include/asm/pgtable.h | 7 ----- arch/riscv/include/asm/pgtable.h | 2 -- arch/s390/include/asm/pgtable.h | 2 -- arch/sh/include/asm/pgtable.h | 2 -- arch/sparc/include/asm/pgtable_32.h | 6 ---- arch/sparc/mm/init_32.c | 3 +- arch/sparc/mm/init_64.c | 1 - arch/um/include/asm/pgtable.h | 2 -- arch/x86/include/asm/pgtable_32.h | 9 ------ arch/x86/include/asm/pgtable_64.h | 1 - arch/x86/mm/init_64.c | 41 --------------------------- arch/xtensa/include/asm/pgtable.h | 2 -- fs/proc/kcore.c | 26 ++++++----------- 31 files changed, 11 insertions(+), 210 deletions(-) commit 65f199b2b40d82e48c79af2f4b5e9fafb290b231 Author: Uladzislau Rezki (Sony) Date: Tue Oct 18 20:10:53 2022 +0200 vmalloc: add reviewers for vmalloc code Add myself and Christoph Hellwig as reviewers for vmalloc. [akpm@linux-foundation.org: coding-style cleanups] Link: https://lkml.kernel.org/r/20221018181053.434508-8-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Steven Rostedt (Google) Acked-by: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton MAINTAINERS | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 8c4196fe810a6717a8f9e528083911703f6a5a51 Author: Uladzislau Rezki (Sony) Date: Tue Oct 18 20:10:52 2022 +0200 mm: vmalloc: use trace_free_vmap_area_noflush event It is for debug purposes and is called when a vmap area gets freed. This event gives some indication about: - a start address of released area; - a current number of outstanding pages; - a maximum number of allowed outstanding pages. Link: https://lkml.kernel.org/r/20221018181053.434508-7-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Steven Rostedt (Google) Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton mm/vmalloc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6030fd5fd1f7baaac3661a5301cc7838d4e3b7f6 Author: Uladzislau Rezki (Sony) Date: Tue Oct 18 20:10:51 2022 +0200 mm: vmalloc: use trace_purge_vmap_area_lazy event This is for debug purposes and is called when all outstanding areas are removed back to the vmap space. It gives some extra information about: - a start:end range where set of vmap ares were freed; - a number of purged areas which were backed off. [urezki@gmail.com: simplify return boolean expression] Link: https://lkml.kernel.org/r/20221020125247.5053-1-urezki@gmail.com Link: https://lkml.kernel.org/r/20221018181053.434508-6-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Steven Rostedt (Google) Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton mm/vmalloc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit cf243da6ab3987b65b95357194926a31415095b8 Author: Uladzislau Rezki (Sony) Date: Tue Oct 18 20:10:50 2022 +0200 mm: vmalloc: use trace_alloc_vmap_area event This is for debug purpose and is called when an allocation attempt occurs. This event gives some information about: - start address of allocated area; - size that is requested; - alignment that is required; - vstart/vend restriction; - if an allocation fails. Link: https://lkml.kernel.org/r/20221018181053.434508-5-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Steven Rostedt (Google) Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton mm/vmalloc.c | 5 +++++ 1 file changed, 5 insertions(+) commit fabc27f7649e070c4f6c742e436a51ff68c4a280 Author: Uladzislau Rezki (Sony) Date: Tue Oct 18 20:10:49 2022 +0200 mm: vmalloc: add free_vmap_area_noflush trace event This event is used in order to validate/debug a start address of freed VA, number of currently outstanding and maximum allowed areas. Link: https://lkml.kernel.org/r/20221018181053.434508-4-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Steven Rostedt (Google) Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton include/trace/events/vmalloc.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit b3a5a7b099162e1b11db459f8128d4374f7d1c05 Author: Uladzislau Rezki (Sony) Date: Tue Oct 18 20:10:48 2022 +0200 mm: vmalloc: add purge_vmap_area_lazy trace event It is for debug purposes to track number of freed vmap areas including a range it occurs on. Link: https://lkml.kernel.org/r/20221018181053.434508-3-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Steven Rostedt (Google) Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton include/trace/events/vmalloc.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 3c0c9bc9c9596d5cd69529da822526f88673365b Author: Uladzislau Rezki (Sony) Date: Tue Oct 18 20:10:47 2022 +0200 mm: vmalloc: add alloc_vmap_area trace event Patch series "Add basic trace events for vmap/vmalloc (v2)", v2. This small series add some basic trace events for the vmap/vmalloc code. Since currently we lack any, sometimes it is hard to start debuging vmap code if an issue is reported or occured. For example https://lore.kernel.org/linux-mm/Y0p8BZIiDXLQbde%2F@pc636/T/ The final patch adds two reviewers for vmalloc code. This patch (of 7): It is for debug purposes and for validation of passed parameters. Link: https://lkml.kernel.org/r/20221018181053.434508-1-urezki@gmail.com Link: https://lkml.kernel.org/r/20221018181053.434508-2-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Steven Rostedt (Google) Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton include/trace/events/vmalloc.h | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 1eeaa4fd39b0b1b3e986f8eab6978e69b01e3c5e Author: Liu Shixin Date: Fri Sep 23 11:33:47 2022 +0800 memory: move hotplug memory notifier priority to same file for easy sorting The priority of hotplug memory callback is defined in a different file. And there are some callers using numbers directly. Collect them together into include/linux/memory.h for easy reading. This allows us to sort their priorities more intuitively without additional comments. Link: https://lkml.kernel.org/r/20220923033347.3935160-9-liushixin2@huawei.com Signed-off-by: Liu Shixin Cc: Christoph Lameter Cc: David Hildenbrand Cc: Kefeng Wang Cc: Waiman Long Cc: zefan li Signed-off-by: Andrew Morton drivers/acpi/numa/hmat.c | 2 +- fs/proc/kcore.c | 2 +- include/linux/memory-tiers.h | 1 - include/linux/memory.h | 9 +++++++-- kernel/cgroup/cpuset.c | 2 +- mm/kasan/shadow.c | 2 +- mm/ksm.c | 2 +- mm/memory-tiers.c | 2 +- mm/mm_init.c | 2 +- mm/mmap.c | 2 +- mm/page_ext.c | 2 +- 11 files changed, 16 insertions(+), 12 deletions(-) commit eafd296e0cc0cc03b4ae01c2b3b07273514d757c Author: Liu Shixin Date: Fri Sep 23 11:33:46 2022 +0800 memory: remove unused register_hotmemory_notifier() Remove unused register_hotmemory_notifier(). Link: https://lkml.kernel.org/r/20220923033347.3935160-8-liushixin2@huawei.com Signed-off-by: Liu Shixin Reviewed-by: David Hildenbrand Cc: Christoph Lameter Cc: Kefeng Wang Cc: Waiman Long Cc: zefan li Signed-off-by: Andrew Morton include/linux/memory.h | 6 ------ 1 file changed, 6 deletions(-) commit 82f8661a7982efea3e4437777e9f914781fac640 Author: Liu Shixin Date: Fri Sep 23 11:33:45 2022 +0800 ACPI: HMAT: use hotplug_memory_notifier() directly Commit 76ae847497bc52 ("Documentation: raise minimum supported version of GCC to 5.1") updated the minimum gcc version to 5.1. So the problem mentioned in f02c69680088 ("include/linux/memory.h: implement register_hotmemory_notifier()") no longer exist. So we can now switch to use hotplug_memory_notifier() directly rather than register_hotmemory_notifier(). Link: https://lkml.kernel.org/r/20220923033347.3935160-7-liushixin2@huawei.com Signed-off-by: Liu Shixin Reviewed-by: David Hildenbrand Cc: Christoph Lameter Cc: Kefeng Wang Cc: Waiman Long Cc: zefan li Signed-off-by: Andrew Morton drivers/acpi/numa/hmat.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d46722ef1c090541d56f706f3a90f3f2e84cdf0c Author: Liu Shixin Date: Fri Sep 23 11:33:44 2022 +0800 mm/mm_init.c: use hotplug_memory_notifier() directly Commit 76ae847497bc52 ("Documentation: raise minimum supported version of GCC to 5.1") updated the minimum gcc version to 5.1. So the problem mentioned in f02c69680088 ("include/linux/memory.h: implement register_hotmemory_notifier()") no longer exist. So we can now switch to use hotplug_memory_notifier() directly rather than register_hotmemory_notifier(). Link: https://lkml.kernel.org/r/20220923033347.3935160-6-liushixin2@huawei.com Signed-off-by: Liu Shixin Reviewed-by: David Hildenbrand Cc: Christoph Lameter Cc: Kefeng Wang Cc: Waiman Long Cc: zefan li Signed-off-by: Andrew Morton mm/mm_init.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit cddb8d09ff1e477de8236a061a5017b21bab3c14 Author: Liu Shixin Date: Fri Sep 23 11:33:43 2022 +0800 mm/mmap: use hotplug_memory_notifier() directly Commit 76ae847497bc52 ("Documentation: raise minimum supported version of GCC to 5.1") updated the minimum gcc version to 5.1. So the problem mentioned in f02c69680088 ("include/linux/memory.h: implement register_hotmemory_notifier()") no longer exist. So we can now switch to use hotplug_memory_notifier() directly rather than register_hotmemory_notifier(). Link: https://lkml.kernel.org/r/20220923033347.3935160-5-liushixin2@huawei.com Signed-off-by: Liu Shixin Reviewed-by: David Hildenbrand Cc: Christoph Lameter Cc: Kefeng Wang Cc: Waiman Long Cc: zefan li Signed-off-by: Andrew Morton mm/mmap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 946d5f9c9dcdbaedcd664fad08cea7910139d10f Author: Liu Shixin Date: Fri Sep 23 11:33:42 2022 +0800 mm/slub.c: use hotplug_memory_notifier() directly Commit 76ae847497bc52 ("Documentation: raise minimum supported version of GCC to 5.1") updated the minimum gcc version to 5.1. So the problem mentioned in f02c69680088 ("include/linux/memory.h: implement register_hotmemory_notifier()") no longer exist. So we can now switch to use hotplug_memory_notifier() directly rather than register_hotmemory_notifier(). Link: https://lkml.kernel.org/r/20220923033347.3935160-4-liushixin2@huawei.com Signed-off-by: Liu Shixin Reviewed-by: David Hildenbrand Cc: Christoph Lameter Cc: Kefeng Wang Cc: Waiman Long Cc: zefan li Signed-off-by: Andrew Morton mm/slub.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 5d89c224328bce791d051bf60aa92d90bae93c01 Author: Liu Shixin Date: Fri Sep 23 11:33:41 2022 +0800 fs/proc/kcore.c: use hotplug_memory_notifier() directly Commit 76ae847497bc52 ("Documentation: raise minimum supported version of GCC to 5.1") updated the minimum gcc version to 5.1. So the problem mentioned in f02c69680088 ("include/linux/memory.h: implement register_hotmemory_notifier()") no longer exist. So we can now switch to use hotplug_memory_notifier() directly rather than register_hotmemory_notifier(). Link: https://lkml.kernel.org/r/20220923033347.3935160-3-liushixin2@huawei.com Signed-off-by: Liu Shixin Reviewed-by: David Hildenbrand Cc: Christoph Lameter Cc: Kefeng Wang Cc: Waiman Long Cc: zefan li Signed-off-by: Andrew Morton fs/proc/kcore.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit f9e60beceee5c85dc9d5e71c1090cfed97ab0897 Author: Liu Shixin Date: Fri Sep 23 11:33:40 2022 +0800 cgroup/cpuset: use hotplug_memory_notifier() directly Patch series "mm: Use hotplug_memory_notifier() instead of register_hotmemory_notifier()", v4. Commit f02c69680088 ("include/linux/memory.h: implement register_hotmemory_notifier()") introduced register_hotmemory_notifier() to avoid a compile problem with gcc-4.4.4: When CONFIG_MEMORY_HOTPLUG=n, we don't want the memory-hotplug notifier handlers to be included in the .o files, for space reasons. The existing hotplug_memory_notifier() tries to handle this but testing with gcc-4.4.4 shows that it doesn't work - the hotplug functions are still present in the .o files. Since commit 76ae847497bc52 ("Documentation: raise minimum supported version of GCC to 5.1") has already updated the minimum gcc version to 5.1. The previous problem mentioned in f02c69680088 does not exist. So we can now revert to use hotplug_memory_notifier() directly rather than register_hotmemory_notifier(). In the last patch, we move all hotplug memory notifier priority to same file for easy sorting. This patch (of 8): Commit 76ae847497bc52 ("Documentation: raise minimum supported version of GCC to 5.1") updated the minimum gcc version to 5.1. So the problem mentioned in f02c69680088 ("include/linux/memory.h: implement register_hotmemory_notifier()") no longer exist. So we can now switch to use hotplug_memory_notifier() directly rather than register_hotmemory_notifier(). Link: https://lkml.kernel.org/r/20220923033347.3935160-1-liushixin2@huawei.com Link: https://lkml.kernel.org/r/20220923033347.3935160-2-liushixin2@huawei.com Signed-off-by: Liu Shixin Reviewed-by: David Hildenbrand Cc: Christoph Lameter Cc: Kefeng Wang Cc: Waiman Long Cc: zefan li Signed-off-by: Andrew Morton kernel/cgroup/cpuset.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit f3ad032c2d06be970d78384885c63917974a4af4 Author: Kefeng Wang Date: Tue Sep 27 14:38:26 2022 +0800 mm: rmap: rename page_not_mapped() to folio_not_mapped() Since commit 2f031c6f042c ("mm/rmap: Convert rmap_walk() to take a folio"), page_not_mapped() takes folio as parameter, rename it to be consistent. Link: https://lkml.kernel.org/r/20220927063826.159590-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: David Hildenbrand Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/rmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6f1405efc61b6e686bdf6e2e09b41d2d3a5c14e2 Author: David Hildenbrand Date: Tue Sep 27 13:01:20 2022 +0200 selftests/vm: anon_cow: add R/O longterm tests via gup_test Let's trigger a R/O longterm pin on three cases of R/O mapped anonymous pages: * exclusive (never shared) * shared (child still alive) * previously shared (child no longer alive) ... and make sure that the pin is reliable: whatever we write via the page tables has to be observable via the pin. Link: https://lkml.kernel.org/r/20220927110120.106906-8-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Christoph von Recklinghausen Cc: Don Dutile Cc: Jason Gunthorpe Cc: John Hubbard Cc: Mike Rapoport Cc: Nadav Amit Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton tools/testing/selftests/vm/anon_cow.c | 210 ++++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) commit c77369b437f983a862bb6741814670d4ad38478c Author: David Hildenbrand Date: Tue Sep 27 13:01:19 2022 +0200 mm/gup_test: start/stop/read functionality for PIN LONGTERM test We want an easy way to take a R/O or R/W longterm pin on a range and be able to observe the content of the pinned pages, so we can properly test how longterm puns interact with our COW logic. [david@redhat.com: silence a warning on 32-bit] Link: https://lkml.kernel.org/r/74adbb51-6e33-f636-8a9c-2ad87bd9007e@redhat.com [yang.lee@linux.alibaba.com: ./mm/gup_test.c:281:2-3: Unneeded semicolon] Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2455 Link: https://lkml.kernel.org/r/20221020024035.113619-1-yang.lee@linux.alibaba.com Link: https://lkml.kernel.org/r/20220927110120.106906-7-david@redhat.com Signed-off-by: David Hildenbrand Signed-off-by: Yang Li Cc: Andrea Arcangeli Cc: Christoph von Recklinghausen Cc: Don Dutile Cc: Jason Gunthorpe Cc: John Hubbard Cc: Mike Rapoport Cc: Nadav Amit Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/gup_test.c | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mm/gup_test.h | 12 +++++ 2 files changed, 153 insertions(+) commit e487ebbd12986facc7f77129d3ca80de84841170 Author: David Hildenbrand Date: Tue Sep 27 13:01:18 2022 +0200 selftests/vm: anon_cow: add liburing test cases io_uring provides a simple mechanism to test long-term, R/W GUP pins -- via fixed buffers -- and can be used to verify that GUP pins stay in sync with the pages in the page table even if a page would temporarily get mapped R/O or concurrent fork() could accidentially end up sharing pinned pages with the child. Note that this essentially re-introduces local_config support that was removed recently in commit 6f83d6c74ea5 ("Kselftests: remove support of libhugetlbfs from kselftests"). [david@redhat.com: s/size_t/ssize_t/ on `cur', `total'.] Link: https://lkml.kernel.org/r/445fe1ae-9e22-0d1d-4d09-272231d2f84a@redhat.com Link: https://lkml.kernel.org/r/20220927110120.106906-6-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Christoph von Recklinghausen Cc: Don Dutile Cc: Jason Gunthorpe Cc: John Hubbard Cc: Mike Rapoport Cc: Nadav Amit Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton tools/testing/selftests/vm/Makefile | 21 +++- tools/testing/selftests/vm/anon_cow.c | 190 +++++++++++++++++++++++++++++ tools/testing/selftests/vm/check_config.sh | 31 +++++ 3 files changed, 241 insertions(+), 1 deletion(-) commit 7dad331be7816103eba8c12caeb88fbd3599c0b9 Author: David Hildenbrand Date: Tue Sep 27 13:01:17 2022 +0200 selftests/vm: anon_cow: hugetlb tests Let's run all existing test cases with all hugetlb sizes we're able to detect. Note that some tests cases still fail. This will, for example, be fixed once vmsplice properly uses FOLL_PIN instead of FOLL_GET for pinning. With 2 MiB and 1 GiB hugetlb on x86_64, the expected failures are: # [RUN] vmsplice() + unmap in child ... with hugetlb (2048 kB) not ok 23 No leak from parent into child # [RUN] vmsplice() + unmap in child ... with hugetlb (1048576 kB) not ok 24 No leak from parent into child # [RUN] vmsplice() before fork(), unmap in parent after fork() ... with hugetlb (2048 kB) not ok 35 No leak from child into parent # [RUN] vmsplice() before fork(), unmap in parent after fork() ... with hugetlb (1048576 kB) not ok 36 No leak from child into parent # [RUN] vmsplice() + unmap in parent after fork() ... with hugetlb (2048 kB) not ok 47 No leak from child into parent # [RUN] vmsplice() + unmap in parent after fork() ... with hugetlb (1048576 kB) not ok 48 No leak from child into parent Link: https://lkml.kernel.org/r/20220927110120.106906-5-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Christoph von Recklinghausen Cc: Don Dutile Cc: Jason Gunthorpe Cc: John Hubbard Cc: Mike Rapoport Cc: Nadav Amit Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton tools/testing/selftests/vm/anon_cow.c | 70 ++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) commit f4b5fd6946e244cdedc3bbb9a1f24c8133b2077a Author: David Hildenbrand Date: Tue Sep 27 13:01:16 2022 +0200 selftests/vm: anon_cow: THP tests Let's add various THP variants that we'll run with our existing test cases. Link: https://lkml.kernel.org/r/20220927110120.106906-4-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Christoph von Recklinghausen Cc: Don Dutile Cc: Jason Gunthorpe Cc: John Hubbard Cc: Mike Rapoport Cc: Nadav Amit Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton tools/testing/selftests/vm/anon_cow.c | 259 +++++++++++++++++++++++++++++++++- 1 file changed, 258 insertions(+), 1 deletion(-) commit a905e82ae44b22a25ea73415a3ec1228775eb9a9 Author: David Hildenbrand Date: Tue Sep 27 13:01:15 2022 +0200 selftests/vm: factor out pagemap_is_populated() into vm_util We'll reuse it in the anon_cow test next. Link: https://lkml.kernel.org/r/20220927110120.106906-3-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Christoph von Recklinghausen Cc: Don Dutile Cc: Jason Gunthorpe Cc: John Hubbard Cc: Mike Rapoport Cc: Nadav Amit Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton tools/testing/selftests/vm/madv_populate.c | 8 -------- tools/testing/selftests/vm/vm_util.c | 8 ++++++++ tools/testing/selftests/vm/vm_util.h | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) commit 69c66add566395eaf4c08cb5975b45dec70dbe85 Author: David Hildenbrand Date: Tue Sep 27 13:01:14 2022 +0200 selftests/vm: anon_cow: test COW handling of anonymous memory Patch series "selftests/vm: test COW handling of anonymous memory". This is my current set of tests for testing COW handling of anonymous memory, especially when interacting with GUP. I developed these tests while working on PageAnonExclusive and managed to clean them up just now. On current upstream Linux, all tests pass except the hugetlb tests that rely on vmsplice -- these tests should pass as soon as vmsplice properly uses FOLL_PIN instead of FOLL_GET. I'm working on additional tests for COW handling in private mappings, focusing on long-term R/O pinning e.g., of the shared zeropage, pagecache pages and KSM pages. These tests, however, will go into a different file. So this is everything I have regarding tests for anonymous memory. This patch (of 7): Let's start adding tests for our COW handling of anonymous memory. We'll focus on basic tests that we can achieve without additional libraries or gup_test extensions. We'll add THP and hugetlb tests separately. [david@redhat.com: s/size_t/ssize_t/ on `cur', `total', `transferred';] Link: https://lkml.kernel.org/r/51302b9e-dc69-d709-3214-f23868028555@redhat.com Link: https://lkml.kernel.org/r/20220927110120.106906-1-david@redhat.com Link: https://lkml.kernel.org/r/20220927110120.106906-2-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Christoph von Recklinghausen Cc: Don Dutile Cc: Jason Gunthorpe Cc: John Hubbard Cc: Mike Rapoport Cc: Nadav Amit Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton tools/testing/selftests/vm/.gitignore | 1 + tools/testing/selftests/vm/Makefile | 4 +- tools/testing/selftests/vm/anon_cow.c | 401 ++++++++++++++++++++++++++++++ tools/testing/selftests/vm/run_vmtests.sh | 3 + tools/testing/selftests/vm/vm_util.c | 7 + tools/testing/selftests/vm/vm_util.h | 1 + 6 files changed, 416 insertions(+), 1 deletion(-) commit b2c5bd4c69ce28500ed2176d11002a4e9b30da36 Author: Andrey Konovalov Date: Tue Sep 27 19:09:11 2022 +0200 kasan: migrate workqueue_uaf test to kunit Migrate the workqueue_uaf test to the KUnit framework. Initially, this test was intended to check that Generic KASAN prints auxiliary stack traces for workqueues. Nevertheless, the test is enabled for all modes to make that KASAN reports bad accesses in the tested scenario. The presence of auxiliary stack traces for the Generic mode needs to be inspected manually. Link: https://lkml.kernel.org/r/1d81b6cc2a58985126283d1e0de8e663716dd930.1664298455.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton mm/kasan/kasan_test.c | 40 +++++++++++++++++++++++++++++++++------- mm/kasan/kasan_test_module.c | 30 ------------------------------ 2 files changed, 33 insertions(+), 37 deletions(-) commit 8516e837cab0b2c740b90603b66039aa7dcecda4 Author: Andrey Konovalov Date: Tue Sep 27 19:09:10 2022 +0200 kasan: migrate kasan_rcu_uaf test to kunit Migrate the kasan_rcu_uaf test to the KUnit framework. Changes to the implementation of the test: - Call rcu_barrier() after call_rcu() to make that the RCU callbacks get triggered before the test is over. - Cast pointer passed to rcu_dereference_protected as __rcu to get rid of the Sparse warning. - Check that KASAN prints a report via KUNIT_EXPECT_KASAN_FAIL. Initially, this test was intended to check that Generic KASAN prints auxiliary stack traces for RCU objects. Nevertheless, the test is enabled for all modes to make that KASAN reports bad accesses in RCU callbacks. The presence of auxiliary stack traces for the Generic mode needs to be inspected manually. Link: https://lkml.kernel.org/r/897ee08d6cd0ba7e8a4fbfd9d8502823a2f922e6.1664298455.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton mm/kasan/kasan_test.c | 37 +++++++++++++++++++++++++++++++++++++ mm/kasan/kasan_test_module.c | 30 ------------------------------ 2 files changed, 37 insertions(+), 30 deletions(-) commit 7ce0ea19d50e4e97a8da69f616ffa8afbb532a93 Author: Andrey Konovalov Date: Tue Sep 27 19:09:09 2022 +0200 kasan: switch kunit tests to console tracepoints Switch KUnit-compatible KASAN tests from using per-task KUnit resources to console tracepoints. This allows for two things: 1. Migrating tests that trigger a KASAN report in the context of a task other than current to KUnit framework. This is implemented in the patches that follow. 2. Parsing and matching the contents of KASAN reports. This is not yet implemented. Link: https://lkml.kernel.org/r/9345acdd11e953b207b0ed4724ff780e63afeb36.1664298455.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton lib/Kconfig.kasan | 2 +- mm/kasan/kasan.h | 8 ----- mm/kasan/kasan_test.c | 85 +++++++++++++++++++++++++++++++++++++-------------- mm/kasan/report.c | 31 ------------------- 4 files changed, 63 insertions(+), 63 deletions(-) commit a5454f95246aa1d3527ef5e128cd3a10bc8371de Author: Thomas Weißschuh Date: Wed Sep 28 12:45:35 2022 +0200 tmpfs: ensure O_LARGEFILE with generic_file_open() Without this check open() will open large files on tmpfs although O_LARGEFILE was not specified. This is inconsistent with other filesystems. Also it will later result in EOVERFLOW on stat() or EFBIG on write(). Link: https://lore.kernel.org/lkml/76bedae6-22ea-4abc-8c06-b424ceb39217@t-8ch.de/ Link: https://lkml.kernel.org/r/20220928104535.61186-1-linux@weissschuh.net Signed-off-by: Thomas Weißschuh Acked-by: Hugh Dickins Signed-off-by: Andrew Morton mm/shmem.c | 1 + 1 file changed, 1 insertion(+) commit 7848ed6284ec4791eba22026e28edb2062790a3d Author: Kamalesh Babulal Date: Fri Sep 30 19:14:33 2022 +0530 mm: memcontrol: use mem_cgroup_is_root() helper Replace the checks for memcg is root memcg, with mem_cgroup_is_root() helper. Link: https://lkml.kernel.org/r/20220930134433.338103-1-kamalesh.babulal@oracle.com Signed-off-by: Kamalesh Babulal Reviewed-by: Muchun Song Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Kamalesh Babulal Cc: Roman Gushchin Cc: Shakeel Butt Cc: Tom Hromatka Signed-off-by: Andrew Morton mm/memcontrol.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 97955f6941f0e7dea64dea22711382daf1db2f76 Author: Deming Wang Date: Thu Oct 6 23:03:45 2022 -0400 mm/mincore.c: use vma_lookup() instead of find_vma() Using vma_lookup() verifies the start address is contained in the found vma. This results in easier to read the code. Link: https://lkml.kernel.org/r/20221007030345.5029-1-wangdeming@inspur.com Signed-off-by: Deming Wang Signed-off-by: Andrew Morton mm/mincore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6fe7d712d798e9312e3dff69ec3f5f62f4d03a04 Author: Lukas Bulwahn Date: Fri Oct 7 10:50:27 2022 +0200 mm/shmem: remove unneeded assignments in shmem_get_folio_gfp() After the rework of shmem_get_folio_gfp() to use a folio, the local variable hindex is only needed to be set once before passing it to shmem_add_to_page_cache(). Remove the unneeded initialization and assignments of the variable hindex before the actual effective assignment and first use. No functional change. No change in object code. Link: https://lkml.kernel.org/r/20221007085027.6309-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Cc: Hugh Dickins Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/shmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3e0ee843427a573e3e1187a5331e4b7fb00a76f3 Author: Rolf Eike Beer Date: Fri Oct 7 13:37:41 2022 +0200 mm: fix typo in struct vm_operations_struct comments There is no eprotect(), so I assume this is about mprotect(). Link: https://lkml.kernel.org/r/2385684.8vm7BOzihM@mobilepool36.emlix.com Signed-off-by: Rolf Eike Beer Signed-off-by: Andrew Morton include/linux/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70ec04f3486103819807b061b50a99f6e1d2bf36 Author: Uros Bizjak Date: Tue Oct 18 16:51:54 2022 +0200 zram: use try_cmpxchg in update_used_max Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in update_used_max. 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, reorder code a bit to remove additional compare and conditional jump from the assembly code. Together, hese two changes save 15 bytes from the function when compiled for x86_64. No functional change intended. Link: https://lkml.kernel.org/r/20221018145154.3699-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Reviewed-by: Sergey Senozhatsky Cc: Minchan Kim Cc: Nitin Gupta Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 9fb6beea79c6e7c959adf4fb7b94cf9a6028b941 Author: Vishal Moola (Oracle) Date: Mon Oct 17 09:18:00 2022 -0700 filemap: find_get_entries() now updates start offset Initially, find_get_entries() was being passed in the start offset as a value. That left the calculation of the offset to the callers. This led to complexity in the callers trying to keep track of the index. Now find_get_entries() takes in a pointer to the start offset and updates the value to be directly after the last entry found. If no entry is found, the offset is not changed. This gets rid of multiple hacky calculations that kept track of the start offset. Link: https://lkml.kernel.org/r/20221017161800.2003-3-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Hugh Dickins Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/filemap.c | 13 +++++++++++-- mm/internal.h | 2 +- mm/shmem.c | 11 ++++------- mm/truncate.c | 19 +++++++------------ 4 files changed, 23 insertions(+), 22 deletions(-) commit 3392ca121872dd8c33015c7703d4981c78819be3 Author: Vishal Moola (Oracle) Date: Mon Oct 17 09:17:59 2022 -0700 filemap: find_lock_entries() now updates start offset Patch series "Rework find_get_entries() and find_lock_entries()", v3. Originally the callers of find_get_entries() and find_lock_entries() were keeping track of the start index themselves as they traverse the search range. This resulted in hacky code such as in shmem_undo_range(): index = folio->index + folio_nr_pages(folio) - 1; where the - 1 is only present to stay in the right spot after incrementing index later. This sort of calculation was also being done on every folio despite not even using index later within that function. These patches change find_get_entries() and find_lock_entries() to calculate the new index instead of leaving it to the callers so we can avoid all these complications. This patch (of 2): Initially, find_lock_entries() was being passed in the start offset as a value. That left the calculation of the offset to the callers. This led to complexity in the callers trying to keep track of the index. Now find_lock_entries() takes in a pointer to the start offset and updates the value to be directly after the last entry found. If no entry is found, the offset is not changed. This gets rid of multiple hacky calculations that kept track of the start offset. Link: https://lkml.kernel.org/r/20221017161800.2003-1-vishal.moola@gmail.com Link: https://lkml.kernel.org/r/20221017161800.2003-2-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Hugh Dickins Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/filemap.c | 15 ++++++++++++--- mm/internal.h | 2 +- mm/shmem.c | 8 ++------ mm/truncate.c | 11 +++-------- 4 files changed, 18 insertions(+), 18 deletions(-) commit d8e454eb44473b2270e2675fb44a9d79dee36097 Author: Ma Wupeng Date: Fri Oct 14 09:39:31 2022 +0800 mm/rmap: fix comment in anon_vma_clone() Commit 2555283eb40d ("mm/rmap: Fix anon_vma->degree ambiguity leading to double-reuse") use num_children and num_active_vmas to replace the origin degree to fix anon_vma UAF problem. Update the comment in anon_vma_clone to fit this change. Link: https://lkml.kernel.org/r/20221014013931.1565969-1-mawupeng1@huawei.com Signed-off-by: Ma Wupeng Signed-off-by: Andrew Morton mm/rmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e51da3a9b6c2f67879880259a25c51dbda01c462 Author: Sidhartha Kumar Date: Thu Sep 22 10:42:07 2022 -0500 mm/hugetlb: add folio_hstate() Helper function to retrieve hstate information from a hugetlb folio. Link: https://lkml.kernel.org/r/20220922154207.1575343-6-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reported-by: kernel test robot Reviewed-by: Mike Kravetz Cc: Arnd Bergmann Cc: Colin Cross Cc: David Howells Cc: "Eric W . Biederman" Cc: Hugh Dickins Cc: Matthew Wilcox Cc: Muchun Song Cc: Peter Xu Cc: Vlastimil Babka Cc: William Kucharski Signed-off-by: Andrew Morton include/linux/hugetlb.h | 14 ++++++++++++-- mm/migrate.c | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) commit ece62684dcfb714b7d8452056b4a33d426b16457 Author: Sidhartha Kumar Date: Thu Sep 22 10:42:06 2022 -0500 hugetlbfs: convert hugetlb_delete_from_page_cache() to use folios Remove the last caller of delete_from_page_cache() by converting the code to its folio equivalent. Link: https://lkml.kernel.org/r/20220922154207.1575343-5-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: Arnd Bergmann Cc: Colin Cross Cc: David Howells Cc: "Eric W . Biederman" Cc: Hugh Dickins Cc: Matthew Wilcox Cc: Muchun Song Cc: Peter Xu Cc: Vlastimil Babka Cc: William Kucharski Signed-off-by: Andrew Morton fs/hugetlbfs/inode.c | 12 ++++++------ include/linux/pagemap.h | 1 - mm/folio-compat.c | 5 ----- 3 files changed, 6 insertions(+), 12 deletions(-) commit 149562f7509404c382c32c3fa8a6ba356135e5cf Author: Sidhartha Kumar Date: Thu Sep 22 10:42:05 2022 -0500 mm/hugetlb: add hugetlb_folio_subpool() helpers Allow hugetlbfs_migrate_folio to check and read subpool information by passing in a folio. Link: https://lkml.kernel.org/r/20220922154207.1575343-4-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: Arnd Bergmann Cc: Colin Cross Cc: David Howells Cc: "Eric W . Biederman" Cc: Hugh Dickins Cc: kernel test robot Cc: Matthew Wilcox Cc: Muchun Song Cc: Peter Xu Cc: Vlastimil Babka Cc: William Kucharski Signed-off-by: Andrew Morton fs/hugetlbfs/inode.c | 8 ++++---- include/linux/hugetlb.h | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) commit d340625f4849ab5dbfebbc7d84709fbfcd39e52f Author: Sidhartha Kumar Date: Thu Sep 22 10:42:04 2022 -0500 mm: add private field of first tail to struct page and struct folio Allow struct folio to store hugetlb metadata that is contained in the private field of the first tail page. On 32-bit, _private_1 aligns with page[1].private. Link: https://lkml.kernel.org/r/20220922154207.1575343-3-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Acked-by: Mike Kravetz Cc: Arnd Bergmann Cc: Colin Cross Cc: David Howells Cc: "Eric W . Biederman" Cc: Hugh Dickins Cc: kernel test robot Cc: Matthew Wilcox Cc: Muchun Song Cc: Peter Xu Cc: Vlastimil Babka Cc: William Kucharski Signed-off-by: Andrew Morton include/linux/mm_types.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d03c376d9066532551dc56837c7c5490e4fcbbfe Author: Sidhartha Kumar Date: Thu Sep 22 10:42:03 2022 -0500 mm/hugetlb: add folio support to hugetlb specific flag macros Patch series "begin converting hugetlb code to folios", v4. This patch series starts the conversion of the hugetlb code to operate on struct folios rather than struct pages. This removes the ambiguitiy of whether functions are operating on head pages, tail pages of compound pages, or base pages. This series passes the linux test project hugetlb test cases. Patch 1 adds hugeltb specific page macros that can operate on folios. Patch 2 adds the private field of the first tail page to struct page. For 32-bit, _private_1 alinging with page[1].private was confirmed by using pahole. Patch 3 introduces hugetlb subpool helper functions which operate on struct folios. These patches were tested using the hugepage-mmap.c selftest along with the migratepages command. Patch 4 converts hugetlb_delete_from_page_cache() to use folios. Patch 5 adds a folio_hstate() function to get hstate information from a folio and adds a user of folio_hstate(). Bpftrace was used to track time spent in the free_huge_pages function during the ltp test cases as it is a caller of the hugetlb subpool functions. From the histogram, the performance is similar before and after the patch series. Time spent in 'free_huge_page' 6.0.0-rc2.master.20220823 @nsecs: [256, 512) 14770 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ |@@@@@@@@@@@@@@@@@@@@@@@@@ | [512, 1K) 155 | | [1K, 2K) 169 | | [2K, 4K) 50 | | [4K, 8K) 14 | | [8K, 16K) 3 | | [16K, 32K) 3 | | 6.0.0-rc2.master.20220823 + patch series @nsecs: [256, 512) 13678 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |@@@@@@@@@@@@@@@@@@@@@@@@@ | [512, 1K) 142 | | [1K, 2K) 199 | | [2K, 4K) 44 | | [4K, 8K) 13 | | [8K, 16K) 4 | | [16K, 32K) 1 | | This patch (of 5): Allow the macros which test, set, and clear hugetlb specific page flags to take a hugetlb folio as an input. The macrros are generated as folio_{test, set, clear}_hugetlb_{restore_reserve, migratable, temporary, freed, vmemmap_optimized, raw_hwp_unreliable}. Link: https://lkml.kernel.org/r/20220922154207.1575343-1-sidhartha.kumar@oracle.com Link: https://lkml.kernel.org/r/20220922154207.1575343-2-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Cc: Arnd Bergmann Cc: Colin Cross Cc: David Howells Cc: "Eric W . Biederman" Cc: Hugh Dickins Cc: kernel test robot Cc: Matthew Wilcox Cc: Peter Xu Cc: Vlastimil Babka Cc: William Kucharski Signed-off-by: Andrew Morton include/linux/hugetlb.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 0796c7b8be84415994fa37e9a022e5595d915dd7 Author: Peter Xu Date: Fri Oct 14 10:40:15 2022 -0400 selftests/vm: drop mnt point for hugetlb in run_vmtests.sh After converting all the three relevant testcases (uffd, madvise, mremap) to use memfd, no test will need the hugetlb mount point anymore. Drop the code. Link: https://lkml.kernel.org/r/20221014144015.94039-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Cc: Mike Kravetz Signed-off-by: Andrew Morton tools/testing/selftests/vm/run_vmtests.sh | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 4705700d4fef3178e93230f53c2c528569744bb6 Author: Peter Xu Date: Fri Oct 14 10:40:13 2022 -0400 selftests/vm: use memfd for hugepage-mremap test For dropping the hugetlb mountpoint in run_vmtests.sh. Cleaned it up a little bit around the changed codes. Link: https://lkml.kernel.org/r/20221014144013.94027-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: Mike Kravetz Signed-off-by: Andrew Morton tools/testing/selftests/vm/hugepage-mremap.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 62f33fa228003a419a9484eed5133447a280387c Author: Peter Xu Date: Fri Oct 14 10:39:19 2022 -0400 selftests/vm: use memfd for hugetlb-madvise test For dropping the hugetlb mountpoint in run_vmtests.sh. Since no parameter is needed, drop USAGE too. Link: https://lkml.kernel.org/r/20221014143921.93887-3-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: Mike Kravetz Signed-off-by: Andrew Morton tools/testing/selftests/vm/hugetlb-madvise.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit de2baa880de3d5eecf2e46ebdee0aaeb565f5917 Author: Peter Xu Date: Fri Oct 14 10:39:18 2022 -0400 selftests/vm: use memfd for uffd hugetlb tests Patch series "selftests/vm: Drop hugetlb mntpoint in run_vmtests.sh", v2. Clean the code up so we can use the same memfd for both hugetlb and shmem which is cleaner. This patch (of 4): We already used memfd for shmem test, move it forward with hugetlb too so that we don't need user to specify the hugetlb file path explicitly when running hugetlb shared tests. Link: https://lkml.kernel.org/r/20221014143921.93887-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20221014143921.93887-2-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Cc: Axel Rasmussen Cc: Mike Kravetz Signed-off-by: Andrew Morton tools/testing/selftests/vm/userfaultfd.c | 62 +++++++++++--------------------- 1 file changed, 21 insertions(+), 41 deletions(-) commit 0538a82c39e94d49fa6985c6a0101ca819be11ee Author: Johannes Weiner Date: Thu Oct 13 15:31:13 2022 -0400 mm: vmscan: make rotations a secondary factor in balancing anon vs file We noticed a 2% webserver throughput regression after upgrading from 5.6. This could be tracked down to a shift in the anon/file reclaim balance (confirmed with swappiness) that resulted in worse reclaim efficiency and thus more kswapd activity for the same outcome. The change that exposed the problem is aae466b0052e ("mm/swap: implement workingset detection for anonymous LRU"). By qualifying swapins based on their refault distance, it lowered the cost of anon reclaim in this workload, in turn causing (much) more anon scanning than before. Scanning the anon list is more expensive due to the higher ratio of mmapped pages that may rotate during reclaim, and so the result was an increase in %sys time. Right now, rotations aren't considered a cost when balancing scan pressure between LRUs. We can end up with very few file refaults putting all the scan pressure on hot anon pages that are rotated en masse, don't get reclaimed, and never push back on the file LRU again. We still only reclaim file cache in that case, but we burn a lot CPU rotating anon pages. It's "fair" from an LRU age POV, but doesn't reflect the real cost it imposes on the system. Consider rotations as a secondary factor in balancing the LRUs. This doesn't attempt to make a precise comparison between IO cost and CPU cost, it just says: if reloads are about comparable between the lists, or rotations are overwhelmingly different, adjust for CPU work. This fixed the regression on our webservers. It has since been deployed to the entire Meta fleet and hasn't caused any problems. Link: https://lkml.kernel.org/r/20221013193113.726425-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Cc: Rik van Riel Signed-off-by: Andrew Morton include/linux/swap.h | 5 +++-- mm/swap.c | 22 +++++++++++++++++----- mm/vmscan.c | 4 +++- mm/workingset.c | 2 +- 4 files changed, 24 insertions(+), 9 deletions(-) commit 57a196a58421a4b0c45949ae7309f21829aaa77f Author: Mike Kravetz Date: Sun Sep 18 19:13:48 2022 -0700 hugetlb: simplify hugetlb handling in follow_page_mask During discussions of this series [1], it was suggested that hugetlb handling code in follow_page_mask could be simplified. At the beginning of follow_page_mask, there currently is a call to follow_huge_addr which 'may' handle hugetlb pages. ia64 is the only architecture which provides a follow_huge_addr routine that does not return error. Instead, at each level of the page table a check is made for a hugetlb entry. If a hugetlb entry is found, a call to a routine associated with that entry is made. Currently, there are two checks for hugetlb entries at each page table level. The first check is of the form: if (p?d_huge()) page = follow_huge_p?d(); the second check is of the form: if (is_hugepd()) page = follow_huge_pd(). We can replace these checks, as well as the special handling routines such as follow_huge_p?d() and follow_huge_pd() with a single routine to handle hugetlb vmas. A new routine hugetlb_follow_page_mask is called for hugetlb vmas at the beginning of follow_page_mask. hugetlb_follow_page_mask will use the existing routine huge_pte_offset to walk page tables looking for hugetlb entries. huge_pte_offset can be overwritten by architectures, and already handles special cases such as hugepd entries. [1] https://lore.kernel.org/linux-mm/cover.1661240170.git.baolin.wang@linux.alibaba.com/ [mike.kravetz@oracle.com: remove vma (pmd sharing) per Peter] Link: https://lkml.kernel.org/r/20221028181108.119432-1-mike.kravetz@oracle.com [mike.kravetz@oracle.com: remove left over hugetlb_vma_unlock_read()] Link: https://lkml.kernel.org/r/20221030225825.40872-1-mike.kravetz@oracle.com Link: https://lkml.kernel.org/r/20220919021348.22151-1-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Reviewed-by: Baolin Wang Tested-by: Baolin Wang Cc: Aneesh Kumar K.V Cc: Christophe Leroy Cc: Michael Ellerman Cc: Muchun Song Cc: Naoya Horiguchi Signed-off-by: Andrew Morton arch/ia64/mm/hugetlbpage.c | 15 ---- arch/powerpc/mm/hugetlbpage.c | 37 --------- include/linux/hugetlb.h | 50 ++---------- mm/gup.c | 80 +++----------------- mm/hugetlb.c | 172 ++++++++++++++---------------------------- 5 files changed, 76 insertions(+), 278 deletions(-) commit a9dfc46c67b52ad43b8e335e28f4cf8002c67793 Author: Masami Hiramatsu (Google) Date: Sat Nov 5 12:01:14 2022 +0900 perf probe: Fix to get the DW_AT_decl_file and DW_AT_call_file as unsinged data DWARF version 5 standard Sec 2.14 says that Any debugging information entry representing the declaration of an object, module, subprogram or type may have DW_AT_decl_file, DW_AT_decl_line and DW_AT_decl_column attributes, each of whose value is an unsigned integer constant. So it should be an unsigned integer data. Also, even though the standard doesn't clearly say the DW_AT_call_file is signed or unsigned, the elfutils (eu-readelf) interprets it as unsigned integer data and it is natural to handle it as unsigned integer data as same as DW_AT_decl_file. This changes the DW_AT_call_file as unsigned integer data too. Fixes: 3f4460a28fb2f73d ("perf probe: Filter out redundant inline-instances") Signed-off-by: Masami Hiramatsu Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: stable@vger.kernel.org Cc: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/166761727445.480106.3738447577082071942.stgit@devnote3 Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dwarf-aux.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit a143bc517bf31c4575191efbaac216a11ec016e0 Merge: 49e8e6343df6 c4bdac754ca0 Author: Dave Airlie Date: Wed Nov 9 10:48:44 2022 +1000 Merge branch '00.06-gr-ampere' of https://gitlab.freedesktop.org/skeggsb/nouveau into drm-next This is the pull request for a whole bunch of fixes and prep-work that was done to support Ampere acceleration prior to GSP-RM being available. It uses the ACR firmware released by NVIDIA in linux-firmware, as we do on earlier GPUs. The work to support running on top of GSP-RM also heavily depends on various pieces of this series. In addition to the new HW support, general stability of the driver should be improved, especially around recovering HW from bugs that can be generated by userspace driver components. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CABDvA==s+nZD0n7CuRWLPE=Pj+02CN13r+ZQJxoHQ_EmR+o=XQ@mail.gmail.com commit c4bdac754ca0bb21bad598b47dd8c2c86eee1cc1 Author: Ben Skeggs Date: Wed Jun 1 20:48:35 2022 +1000 drm/nouveau/gr/ga102: initial support v2: - whitespace Signed-off-by: Ben Skeggs Signed-off-by: Gourav Samaiya drivers/gpu/drm/nouveau/include/nvif/class.h | 3 + drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/acr.h | 7 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 5 + drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxga102.c | 77 +++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 3 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ga102.c | 347 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 24 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 14 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gp108.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c | 75 +++++ 15 files changed, 565 insertions(+), 9 deletions(-) commit 21e938d0017d3523ef5114a8feebc32e95007983 Author: Ben Skeggs Date: Wed Jun 1 20:48:34 2022 +1000 drm/nouveau/ltc/ga102: initial support v2. fixup for ga103 early merge Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 5 ++ drivers/gpu/drm/nouveau/nvkm/subdev/ltc/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/ltc/ga102.c | 57 +++++++++++++++++++++++ 4 files changed, 65 insertions(+), 1 deletion(-) commit 4b569ded09fdadb0c14f797c8dae4e8bc4bbad9f Author: Ben Skeggs Date: Wed Jun 1 20:48:33 2022 +1000 drm/nouveau/acr/ga102: initial support v2. fixup for ga103 early merge Signed-off-by: Ben Skeggs Signed-off-by: Gourav Samaiya drivers/gpu/drm/nouveau/include/nvfw/acr.h | 85 ++++++ drivers/gpu/drm/nouveau/include/nvfw/ls.h | 51 ++++ drivers/gpu/drm/nouveau/include/nvfw/sec2.h | 40 +++ drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h | 1 + .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/sec2.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/acr.h | 17 ++ drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 15 + drivers/gpu/drm/nouveau/nvkm/engine/sec2/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sec2/base.c | 6 + drivers/gpu/drm/nouveau/nvkm/engine/sec2/ga102.c | 197 +++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/sec2/gp102.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/sec2/priv.h | 4 + drivers/gpu/drm/nouveau/nvkm/falcon/ga102.c | 26 +- drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c | 12 + drivers/gpu/drm/nouveau/nvkm/nvfw/acr.c | 41 +++ drivers/gpu/drm/nouveau/nvkm/nvfw/ls.c | 72 +++++ drivers/gpu/drm/nouveau/nvkm/subdev/acr/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga100.c | 49 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga102.c | 326 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/acr/gm200.c | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/acr/gp102.c | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c | 70 +++++ drivers/gpu/drm/nouveau/nvkm/subdev/acr/priv.h | 13 +- drivers/gpu/drm/nouveau/nvkm/subdev/acr/tu102.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c | 59 ++++ 28 files changed, 1091 insertions(+), 14 deletions(-) commit a51c69ee74d195e6d84fe9d48ca55f51d39e1b5b Author: Ben Skeggs Date: Wed Jun 1 20:48:32 2022 +1000 drm/nouveau/fb/ga102: load and boot VPR scrubber FW v2. fixup for ga103 early merge Signed-off-by: Ben Skeggs Signed-off-by: Gourav Samaiya drivers/gpu/drm/nouveau/include/nvfw/hs.h | 28 +++++ drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h | 25 ++++ .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 6 + .../gpu/drm/nouveau/include/nvkm/engine/nvdec.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 5 + drivers/gpu/drm/nouveau/nvkm/engine/nvdec/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/nvdec/base.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/nvdec/ga102.c | 61 ++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/nvdec/gm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/nvdec/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/falcon/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 77 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/falcon/fw.c | 58 +++++++++ drivers/gpu/drm/nouveau/nvkm/falcon/ga100.c | 62 ++++++++++ drivers/gpu/drm/nouveau/nvkm/falcon/ga102.c | 134 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c | 9 +- drivers/gpu/drm/nouveau/nvkm/falcon/gp102.c | 8 ++ drivers/gpu/drm/nouveau/nvkm/nvfw/hs.c | 39 ++++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ga102.c | 32 +++++ 19 files changed, 551 insertions(+), 5 deletions(-) commit 21876b0e4284169ddbc834d02f60940a3dd27471 Author: Ben Skeggs Date: Wed Jun 1 20:48:22 2022 +1000 drm/nouveau/gr/tu102: remove gv100_grctx_unkn88c Match RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxtu102.c | 1 - 1 file changed, 1 deletion(-) commit 6a2b09e7bf3fe9bcdd38b84c12e34c7b4cbb263d Author: Ben Skeggs Date: Wed Jun 1 20:48:21 2022 +1000 drm/nouveau/gr/tu102: add gv100_gr_init_4188a4 Match RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gv100.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit c4d66f7db67248b110b4183f1b155c28c752121f Author: Ben Skeggs Date: Wed Jun 1 20:48:21 2022 +1000 drm/nouveau/gr/tu102-: fix support for sw_bundle64_init We weren't sending the high bits, though they're zero currently anyway. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 8 +++++++- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxtu102.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 5 ++++- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 3 ++- 5 files changed, 17 insertions(+), 6 deletions(-) commit 1cd97b5490c860409338eda1d9c16df20621024c Author: Ben Skeggs Date: Wed Jun 1 20:48:20 2022 +1000 drm/nouveau/gr/tu102-: use sw_veid_bundle_init from firmware NVIDIA provided this on Turing, but we kept using the hardcoded version from Volta (where they didn't). Switch to the firmware version prior to Ampere. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 5 +++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgv100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxtu102.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 4 ++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 12 +++++++++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c | 24 +++++++++++++++++++++++ 8 files changed, 44 insertions(+), 6 deletions(-) commit edc6938f7bc6b954137b073c928dc71af34cc158 Author: Ben Skeggs Date: Wed Jun 1 20:48:19 2022 +1000 drm/nouveau/gr/gv100-: drop a write from init_shader_exceptions() Match RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/gv100.c | 1 - 1 file changed, 1 deletion(-) commit 75e637db601acbd2b59ca9f97474203635da5b52 Author: Ben Skeggs Date: Wed Jun 1 20:48:19 2022 +1000 drm/nouveau/gr/gv100-: move init_419bd8() after sw_ctx load Match RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) commit 81d4201e7ffc0d86e3cf3659f8341545d410b023 Author: Ben Skeggs Date: Wed Jun 1 20:48:18 2022 +1000 drm/nouveau/gr/gv100-: add NV_PGRAPH_PRI_PD_AB_DIST_CONFIG_1 to patch list Match RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgv100.c | 2 ++ 1 file changed, 2 insertions(+) commit abf8d63113078341c232446d3c2b2bd42c9ca6ef Author: Ben Skeggs Date: Wed Jun 1 20:48:17 2022 +1000 drm/nouveau/gr/gv100-: fix number of tile map registers Match RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgv100.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/engine/gr/gv100.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 3ffa6f329b610029b44ebd7bc2320a92468a0e42 Author: Ben Skeggs Date: Wed Jun 1 20:48:17 2022 +1000 drm/nouveau/gr/gv100-: port smid mapping code from nvgpu Essentially ripped verbatim from NVGPU, comments and all, and adapted to nvkm's structs and style. - maybe fixes an nvgpu bug though, a small tweak was needed to match RM v2: - remove unnecessary WARN_ON Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgv100.c | 3 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxtu102.c | 3 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 11 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 9 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gv100.c | 194 +++++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c | 7 +- 7 files changed, 219 insertions(+), 12 deletions(-) commit d94ac9dddef792be7741cbb558d3be2b796567d7 Author: Ben Skeggs Date: Wed Jun 1 20:48:16 2022 +1000 drm/nouveau/gr/gp100-: modify init_fecs_exceptions Match RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit de8be616b6ea83f468da3265aff58d25f57494b5 Author: Ben Skeggs Date: Wed Jun 1 20:48:15 2022 +1000 drm/nouveau/gr/gk20a,gm20b,gp10b: split out netlist parsing from fw loading We'll want to reuse the former for loading from proper netlist images. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 6 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 110 ++++++++++--------------- 2 files changed, 49 insertions(+), 67 deletions(-) commit e2eeec758c367963c74d56eb89a10920e418bfdf Author: Ben Skeggs Date: Wed Jun 1 20:48:14 2022 +1000 drm/nouveau/gr/gp100-: fix number of zcull tile regs Match RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c | 4 +++- drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 0c520ad45a65313c310fe96e17bda51e2c019ec4 Author: Ben Skeggs Date: Wed Jun 1 20:48:14 2022 +1000 drm/nouveau/gr/gf117-: make ppc_nr[gpc] accurate We're going to be pulling in a chunk of code from NVGPU to fixup our SMID mappings on Volta and above, which depends on ppc_nr[gpc] reflecting the actual number of PPCs present, not the maximum number. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp102.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgv100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 6 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-) commit 9aa3faced0a3dea04294afe781e07e1ef1118e30 Author: Ben Skeggs Date: Wed Jun 1 20:48:13 2022 +1000 drm/nouveau/gr/gf100-: switch to newer style interrupt handler Ampere. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 27 ++++++++++++++++++++------ drivers/gpu/drm/nouveau/nvkm/subdev/mc/gf100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gk104.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gp100.c | 4 ++-- 4 files changed, 26 insertions(+), 10 deletions(-) commit 1a34468855bdd0a8caef2fd6e8e23ecc25407bb2 Author: Ben Skeggs Date: Wed Jun 1 20:48:12 2022 +1000 drm/nouveau/gr/gf100-: move some init to init_exception2() Ampere. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 14 ++++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf108.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf119.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp107.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp10b.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gv100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c | 1 + 20 files changed, 32 insertions(+), 2 deletions(-) commit b6d93fa74adac565129e6f6df6722acf87a11d49 Author: Ben Skeggs Date: Wed Jun 1 20:48:12 2022 +1000 drm/nouveau/gr/gf100-: move some init to init_rop_exceptions() Ampere. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 24 +++++++++++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf108.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf119.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp107.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp10b.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gv100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c | 1 + 20 files changed, 37 insertions(+), 7 deletions(-) commit be99d041b6b5be6be004366de8c4fc6b9832f195 Author: Ben Skeggs Date: Wed Jun 1 20:48:11 2022 +1000 drm/nouveau/gr/gf100-: move reset during golden ctx init to fecs_reset() Ampere. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 6 +----- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 13 +++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf108.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf119.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm20b.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp107.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp10b.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gv100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c | 1 + 23 files changed, 36 insertions(+), 5 deletions(-) commit 40bbee55c114750d2995028603902d7d2ed35ebd Author: Ben Skeggs Date: Wed Jun 1 20:48:10 2022 +1000 drm/nouveau/gr/gf100-: wfi after register-bashing golden init Match RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 2 ++ 1 file changed, 2 insertions(+) commit 0d7557072414af191cefbaa7c908e1c09f5b7d7b Author: Ben Skeggs Date: Wed Jun 1 20:48:10 2022 +1000 drm/nouveau/gr/gf100-: gpfifo_ctl zero before init Match RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 ++ 1 file changed, 2 insertions(+) commit 366e01092a050579b1f28129bdb72bc7c65ba47a Author: Ben Skeggs Date: Wed Jun 1 20:48:09 2022 +1000 drm/nouveau/gr/gf100-: wait for FE_PWR_MODE_AUTO This doesn't fix any known issue, but RM started doing it at some point, so presumably it's needed for something. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 4 ++++ 1 file changed, 4 insertions(+) commit f1f4d9181484a80928aaf5dfed96897ee3257e13 Author: Ben Skeggs Date: Wed Jun 1 20:48:08 2022 +1000 drm/nouveau/gr/gf100-: call FECS HALT_PIPE method before RC reset Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c | 12 ++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 33 ++++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/priv.h | 1 + 3 files changed, 46 insertions(+) commit 6762510bc8447dc4eb4c3d99541de6b31843e649 Author: Ben Skeggs Date: Wed Jun 1 20:48:08 2022 +1000 drm/nouveau/gr/gf100-: call FECS WFI_GOLDEN_SAVE method This won't work on Ampere, and, it's questionable whether we should have been using our FW's method of storing the golden context image with NV's firmware to begin with. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 30 ++++++++++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 19 ++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 1 + 3 files changed, 39 insertions(+), 11 deletions(-) commit 6c55b5947b174cce16fcc56dc79f50df2b48e737 Author: Ben Skeggs Date: Wed Jun 1 20:48:07 2022 +1000 drm/nouveau/gr/gf100-: stop using NV_PGRAPH_FECS_CTXSW_MAILBOX_CLEAR This doesn't work on Ampere for some reason, switch to directly modifying NV_PGRAPH_FECS_CTXSW_MAILBOX instead. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 78a43c7e3b2ff5aed1809f93b4f87a418355789e Author: Ben Skeggs Date: Wed Jun 1 20:48:07 2022 +1000 drm/nouveau/gr/gf100-: make global attrib_cb actually global This was thought to be per-channel initially - it's not. The backing pages for the VMM mappings are shared for all channels. - switches to more straight-forward patch interfaces - prepares for sub-context support - this is saving a *sizeable* amount of vram v2: - whitespace Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 86 +++++++--------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 42 +++++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf104.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf108.c | 21 +++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf110.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c | 22 +++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf119.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110b.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk208.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk20a.c | 7 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c | 36 +++++---- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm20b.c | 7 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp100.c | 65 +++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp102.c | 58 ++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp104.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp107.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgv100.c | 50 +++++++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxtu102.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 72 +++++++----------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 22 +----- 23 files changed, 241 insertions(+), 269 deletions(-) commit 5eee9fdd69d6e65d2eff9826a638f8da10066e25 Author: Ben Skeggs Date: Wed Jun 1 20:48:06 2022 +1000 drm/nouveau/gr/gf100-: move misc context patching out of attrib_cb funcs Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 4 +++- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 9 ++++++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c | 9 ++++---- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxtu102.c | 22 ++++++++------------ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 25 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 2 ++ 6 files changed, 51 insertions(+), 20 deletions(-) commit 95f78acd88594101f658a4587f51ccb6a6556cc3 Author: Ben Skeggs Date: Wed Jun 1 20:48:06 2022 +1000 drm/nouveau/gr/gf100-: make global bundle_cb actually global This was thought to be per-channel initially - it's not. The backing pages for the VMM mappings are shared for all channels. - switches to more straight-forward patch interfaces - prepares for sub-context support Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 15 ++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 8 ++++---- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c | 17 ++++++----------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk20a.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c | 20 +++++++++----------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm20b.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 17 +++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 2 ++ 8 files changed, 46 insertions(+), 37 deletions(-) commit d05095b53cd41c7e1db8f680610386f73c0f7290 Author: Ben Skeggs Date: Wed Jun 1 20:48:05 2022 +1000 drm/nouveau/gr/gf100-: make global pagepool actually global This was thought to be per-channel initially - it's not. The backing pages for the VMM mappings are shared for all channels. - switches to more straight-forward patch interfaces - prepares for sub-context support Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 32 +++++++++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 15 ++++++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c | 12 +++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk20a.c | 5 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c | 13 +++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm20b.c | 5 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp100.c | 13 ++++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 22 +++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 4 +++ 9 files changed, 71 insertions(+), 50 deletions(-) commit ca081fff6ecc63c86a99918230cc9b947bebae8a Author: Ben Skeggs Date: Wed Jun 1 20:48:05 2022 +1000 drm/nouveau/gr/gf100-: generate golden context during first object alloc Needed for GV100 (and only GV100 for some reason) for WFI_GOLDEN_SAVE. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 45 +++++++---------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 28 ++++++-------- 3 files changed, 26 insertions(+), 49 deletions(-) commit 113750215058a19330858dc41fbaac8f9540d45f Author: Ben Skeggs Date: Wed Jun 1 20:48:04 2022 +1000 drm/nouveau/gr/gf100-: move some code around to make next commits nicer Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 104 ++++++++++++------------- 1 file changed, 52 insertions(+), 52 deletions(-) commit 0ceceaa9ae8294b0da91d731027b5c4b1bb4187e Author: Ben Skeggs Date: Wed Jun 1 20:48:04 2022 +1000 drm/nouveau/fifo: expose function to read engine ctxsw status Needed to support Ampere differences in gr/gf100-: Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 16 ++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) commit 4500031f86691a44ecbbebfc77872c60c5a1b8e6 Author: Ben Skeggs Date: Wed Jun 1 20:48:03 2022 +1000 drm/nouveau/ltc: split color vs depth/stencil zbc counts These differ on Ampere. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h | 15 +++++++++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 12 ++++++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 6 +++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c | 10 +++++++--- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gk104.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm200.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp100.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp102.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/priv.h | 3 ++- 13 files changed, 42 insertions(+), 27 deletions(-) commit 1ed02c3f2db00f3c29e88a3d880d64a7e1b7a047 Author: Ben Skeggs Date: Wed Jun 1 20:48:02 2022 +1000 drm/nouveau/engine: add HAL for engine-specific rc reset procedure Will be used to improve gr reset on GF100 and newer. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/engine.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/core/engine.c | 10 ++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) commit d2922879116ca753e454fecde531d509eb0af69f Author: Ben Skeggs Date: Wed Jun 1 20:47:53 2022 +1000 drm/nouveau/sec2: dump tracepc info on halt - useful to distinguish between different issues. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sec2/gp102.c | 5 +++++ drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c | 15 +++++++++++++++ 3 files changed, 21 insertions(+) commit 2541626cfb794e57ba0575a6920826f591f7ced0 Author: Ben Skeggs Date: Wed Jun 1 20:47:52 2022 +1000 drm/nouveau/acr: use common falcon HS FW code for ACR FWs Adds context binding and support for FWs with a bootloader to the code that was added to load VPR scrubber HS binaries, and ports ACR over to using all of it. - gv100 split from gp108 to handle FW exit status differences Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h | 21 ++- .../gpu/drm/nouveau/include/nvkm/core/firmware.h | 8 + .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 32 ++-- drivers/gpu/drm/nouveau/include/nvkm/subdev/acr.h | 3 +- drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 87 ++++++++- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sec2/gp102.c | 53 +----- drivers/gpu/drm/nouveau/nvkm/engine/sec2/tu102.c | 14 +- drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 79 ++++----- drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c | 2 +- drivers/gpu/drm/nouveau/nvkm/falcon/fw.c | 75 +++++++- drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c | 88 +++++++++- drivers/gpu/drm/nouveau/nvkm/falcon/gp102.c | 42 +++++ drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c | 2 +- drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 167 ------------------ drivers/gpu/drm/nouveau/nvkm/subdev/acr/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c | 73 ++++---- drivers/gpu/drm/nouveau/nvkm/subdev/acr/gm200.c | 195 +++++---------------- drivers/gpu/drm/nouveau/nvkm/subdev/acr/gm20b.c | 44 ++--- drivers/gpu/drm/nouveau/nvkm/subdev/acr/gp102.c | 27 +-- drivers/gpu/drm/nouveau/nvkm/subdev/acr/gp108.c | 55 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/acr/gp10b.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/acr/gv100.c | 67 +++++++ drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c | 177 ------------------- drivers/gpu/drm/nouveau/nvkm/subdev/acr/priv.h | 93 +++------- drivers/gpu/drm/nouveau/nvkm/subdev/acr/tu102.c | 36 +--- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/gv100.c | 14 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm200.c | 31 +++- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp102.c | 12 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h | 1 + 30 files changed, 648 insertions(+), 856 deletions(-) commit e3f324956a32d08a9361ee1e3beca383f1b01eba Author: Ben Skeggs Date: Wed Jun 1 20:47:52 2022 +1000 drm/nouveau/fb/gp102-: unlock VPR right after devinit Under memory load, instmem allocations could end up in the regions of VRAM that are inaccessible right after boot, and be corrupted after a suspend/resume cycle as a result of being restored before booting the mem unlock firmware. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 4 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 19 ++++++++++--------- 3 files changed, 16 insertions(+), 9 deletions(-) commit 5728d064190e169f1a42381bd7e5fc4d411f3188 Author: Ben Skeggs Date: Wed Jun 1 20:47:51 2022 +1000 drm/nouveau/fb: handle sysmem flush page from common code - also executes pre-DEVINIT, so early boot is able to DMA sysmem Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 5 +++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 44 ++++++++++++++++++++++-- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ga100.c | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ga102.c | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c | 25 ++++---------- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h | 4 --- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c | 4 +-- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm20b.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c | 18 ++-------- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp102.c | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp10b.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gv100.c | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c | 38 ++++---------------- drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h | 2 -- drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h | 9 +++-- 15 files changed, 80 insertions(+), 83 deletions(-) commit 0e44c21708761977dcbea9b846b51a6fb684907a Author: Ben Skeggs Date: Wed Jun 1 20:47:51 2022 +1000 drm/nouveau/flcn: new code to load+boot simple HS FWs (VPR scrubber) Adds the start of common interfaces to load and boot the HS binaries provided by NVIDIA that enable the usage of GR. ACR already handles most of this, but it's very much tied into ACR's init process, and there's other code that could benefit from reusing a lot of this stuff too (ie. VBIOS DEVINIT/PreOS, VPR scrubber). The VPR scrubber code is fairly independent, and a good first target. - adds better debug output to fw loading process, to ease bring-up/debug v2: - whitespace, 0->false Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h | 94 +++++++++ .../gpu/drm/nouveau/include/nvkm/core/firmware.h | 17 ++ .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 5 +- drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 42 ++++ drivers/gpu/drm/nouveau/nvkm/engine/nvdec/gm107.c | 11 +- drivers/gpu/drm/nouveau/nvkm/falcon/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 54 +++++ drivers/gpu/drm/nouveau/nvkm/falcon/fw.c | 229 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c | 144 +++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp102.c | 63 +----- 10 files changed, 594 insertions(+), 66 deletions(-) commit f15cde64b66161bfa74fb58f4e5697d8265b802e Author: Ben Skeggs Date: Wed Jun 1 20:47:51 2022 +1000 drm/nouveau/flcn: rework falcon reset Mostly preparation to fit in Ampere changes, but should result in reset sequences a lot closer to RM's, and perhaps help out with the issues we sometimes see reported in this area. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h | 10 ++- .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 12 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 8 --- drivers/gpu/drm/nouveau/nvkm/engine/nvdec/gm107.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/nvenc/gm107.c | 11 --- drivers/gpu/drm/nouveau/nvkm/engine/sec2/gp102.c | 16 ++--- drivers/gpu/drm/nouveau/nvkm/engine/sec2/tu102.c | 7 +- drivers/gpu/drm/nouveau/nvkm/falcon/Kbuild | 3 + drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 37 ++-------- drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c | 83 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/falcon/gp102.c | 32 +++++++++ drivers/gpu/drm/nouveau/nvkm/falcon/priv.h | 8 +++ drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 43 ----------- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/gv100.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm200.c | 17 ++--- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp102.c | 29 +++++--- 16 files changed, 185 insertions(+), 143 deletions(-) commit c7c0aac7421331baffdeb8f9c3e9702bdb1c0389 Author: Ben Skeggs Date: Wed Jun 1 20:47:50 2022 +1000 drm/nouveau/sec2: switch to newer style interrupt handler Ampere. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/sec2/base.c | 25 ++++++++++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/sec2/gp102.c | 7 +++++-- drivers/gpu/drm/nouveau/nvkm/engine/sec2/priv.h | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gp100.c | 3 ++- 4 files changed, 26 insertions(+), 13 deletions(-) commit 3b330f0875014b475ca3dc37e4397aee13f00986 Author: Ben Skeggs Date: Wed Jun 1 20:47:49 2022 +1000 drm/nouveau/sec2: unload RTOS before tearing down WPR Reset regs won't be available on Ampere while SEC2 RTOS is running, and we're apparently supposed to be doing this on earlier GPUs too. v2: - fixed some excessive indentation Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvfw/sec2.h | 5 ++ drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/sec2.h | 4 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/acr.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/sec2/base.c | 73 +++++++++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/sec2/gp102.c | 33 ++++++---- drivers/gpu/drm/nouveau/nvkm/engine/sec2/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sec2/tu102.c | 5 +- drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c | 8 +-- drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c | 9 --- 11 files changed, 91 insertions(+), 51 deletions(-) commit a9d90860c42a6a014b3a0596c76dff016fc2ce27 Author: Ben Skeggs Date: Wed Jun 1 20:47:49 2022 +1000 drm/nouveau/pmu/gm20b,gp10b: boot RTOS from PMU init Cleanup before falcon changes. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 8 +-- drivers/gpu/drm/nouveau/include/nvkm/subdev/acr.h | 1 + drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c | 80 +++++++++++++--------- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 7 -- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c | 49 +++++++++---- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gt215.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h | 1 - 9 files changed, 92 insertions(+), 60 deletions(-) commit ccdc043123d2a485e173e5e2627598151b7850b3 Author: Ben Skeggs Date: Wed Jun 1 20:47:48 2022 +1000 drm/nouveau/pmu: move init() falcon reset to non-nvfw code Cleanup before falcon changes. - fixes (attempt at?) reset of pmu while rtos is running, on gm20b v2: - remove extra whitespace Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 31 +++--------------------- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm200.c | 2 -- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c | 7 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp102.c | 7 ------ drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c | 14 ++--------- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gt215.c | 32 ++++++++++++++----------- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h | 3 +-- 8 files changed, 27 insertions(+), 70 deletions(-) commit b7f44ef7320a50dd6718df06f8750489c1b1d5ea Author: Ben Skeggs Date: Wed Jun 1 20:47:48 2022 +1000 drm/nouveau/pmu: move preinit() falcon reset to devinit Cleanup before falcon changes. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c | 8 +++++++- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 12 ------------ 2 files changed, 7 insertions(+), 13 deletions(-) commit 74f9dcb0df10567c1124b0cece2c6229a8c77cab Author: Ben Skeggs Date: Wed Jun 1 20:47:47 2022 +1000 drm/nouveau/gsp: add funcs Ampere. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/layout.h | 4 ++-- drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/gsp/base.c | 4 +++- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/gv100.c | 11 ++++++++--- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/priv.h | 6 +++++- 5 files changed, 20 insertions(+), 7 deletions(-) commit 7f4f35ea5b080e6aeb159b4be023a44a527906ec Author: Ben Skeggs Date: Wed Jun 1 20:47:39 2022 +1000 drm/nouveau/fifo/ga100-: initial support - replaces the hacked-up version that existed solely to support TTM v2. remove earlier hack preventing use of non-stall intr for fences Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 2 + drivers/gpu/drm/nouveau/nouveau_chan.c | 4 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 4 +- drivers/gpu/drm/nouveau/nv84_fence.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 19 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga100.c | 550 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga102.c | 280 +---------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 11 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 3 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 8 +- 13 files changed, 610 insertions(+), 276 deletions(-) commit 05d271c32e12c16d18b096c797eef809fd6c9215 Author: Ben Skeggs Date: Wed Jun 1 20:47:38 2022 +1000 drm/nouveau/ce/ga100-: initial support - replaces the hacked-up version that existed solely to support TTM - noop until the next commit, adding proper support for ampere host v2. fixup for ga103 early merge Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/ce.h | 2 + drivers/gpu/drm/nouveau/nouveau_bo.c | 3 + drivers/gpu/drm/nouveau/nvkm/engine/ce/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/engine/ce/ga100.c | 82 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/ce/ga102.c | 44 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/ce/priv.h | 4 ++ drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 6 ++ 8 files changed, 144 insertions(+) commit 06db7fded6dec88772a65c5a39af12ba4dc2ad38 Author: Ben Skeggs Date: Wed Jun 1 20:47:38 2022 +1000 drm/nouveau/fifo: add new channel classes Exposes a bunch of the new features that became possible as a result of the earlier commits. DRM will build on this in the future to add support for features such as SCG ("async compute") and multi-device rendering, as part of the work necessary to be able to write a half- decent vulkan driver - finally. For the moment, this just crudely ports DRM to the API changes. - channel class interfaces now the same for all HW classes - channel group class exposed (SCG) - channel runqueue selector exposed (SCG) - channel sub-device id control exposed (multi-device rendering) - channel names in logging will reflect creating process, not fd owner - explicit USERD allocation required by VOLTA_CHANNEL_GPFIFO_A and newer - drm is smarter about determining the appropriate channel class to use Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/cl006b.h | 12 -- drivers/gpu/drm/nouveau/include/nvif/cl506e.h | 13 -- drivers/gpu/drm/nouveau/include/nvif/cl506f.h | 14 -- drivers/gpu/drm/nouveau/include/nvif/cl826e.h | 13 -- drivers/gpu/drm/nouveau/include/nvif/cl826f.h | 14 -- drivers/gpu/drm/nouveau/include/nvif/cl906f.h | 13 -- drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 15 -- drivers/gpu/drm/nouveau/include/nvif/class.h | 28 +-- drivers/gpu/drm/nouveau/include/nvif/clc36f.h | 16 -- drivers/gpu/drm/nouveau/include/nvif/if0020.h | 32 +++ drivers/gpu/drm/nouveau/include/nvif/if0021.h | 16 ++ drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 7 +- drivers/gpu/drm/nouveau/nouveau_abi16.c | 1 - drivers/gpu/drm/nouveau/nouveau_chan.c | 222 +++++++++------------ drivers/gpu/drm/nouveau/nouveau_chan.h | 3 + drivers/gpu/drm/nouveau/nouveau_dma.c | 8 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 16 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 30 ++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 97 ++++----- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 13 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 66 ------ .../gpu/drm/nouveau/nvkm/engine/fifo/changf100.h | 21 -- .../gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 30 --- .../gpu/drm/nouveau/nvkm/engine/fifo/channv04.h | 23 --- .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.c | 61 ------ .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.h | 41 ---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c | 90 --------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c | 78 -------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c | 79 -------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c | 83 -------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 9 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g98.c | 9 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga102.c | 18 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 23 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 12 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 59 +----- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 28 --- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 10 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 9 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 9 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 8 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 9 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 9 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c | 77 ------- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 101 ---------- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 110 ---------- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 100 ---------- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c | 77 ------- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu102.c | 66 ------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 13 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 26 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.h | 15 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c | 7 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c | 7 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 7 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 34 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.h | 15 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 17 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 19 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/ucgrp.c | 125 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 101 ++++++++-- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c | 2 +- 63 files changed, 524 insertions(+), 1763 deletions(-) commit 7ac293328122075a2afc40a4089e7afc6cbc26eb Author: Ben Skeggs Date: Wed Jun 1 20:47:37 2022 +1000 drm/nouveau/fifo: add new engine object handling Simplifies the GPU-specific code, completing the switch to newer HALs. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 66 ---------------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 4 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 34 ----------- .../gpu/drm/nouveau/nvkm/engine/fifo/changf100.h | 1 - .../gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 1 - .../gpu/drm/nouveau/nvkm/engine/fifo/channv04.h | 2 - .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.c | 31 ---------- .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.h | 4 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c | 41 -------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c | 31 ---------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 1 - .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 1 - .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 27 +++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 18 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 18 +++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 3 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 3 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 29 ++++++++-- 22 files changed, 94 insertions(+), 228 deletions(-) commit 8ab849d6dd4c2eb8880096e53e91dfb6ca37b589 Author: Ben Skeggs Date: Wed Jun 1 20:47:37 2022 +1000 drm/nouveau/fifo: add new engine context handling Builds on the context tracking that was added earlier. - marks engine context PTEs as 'priv' where possible Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 9 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c | 35 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.h | 6 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 128 ++------------------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 9 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 109 ----------------- .../gpu/drm/nouveau/nvkm/engine/fifo/changf100.h | 4 - .../gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 13 -- .../gpu/drm/nouveau/nvkm/engine/fifo/channv04.h | 2 - .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.c | 131 --------------------- .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.h | 4 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c | 119 ------------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 75 ++++++++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g98.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 60 +++++++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 81 +++++++++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 5 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 1 - .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 100 ---------------- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 123 ------------------- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 78 ------------ .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu102.c | 4 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 43 ++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 15 --- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 46 +++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 58 ++++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 9 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 4 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 25 +++- 39 files changed, 382 insertions(+), 930 deletions(-) commit 3647c53bd7dada9053b46a5ca27eb3f7c5472416 Author: Ben Skeggs Date: Wed Jun 1 20:47:36 2022 +1000 drm/nouveau/fifo: add RAMFC info to nvkm_chan_func - adds support for specifying SUBDEVICE_ID for channel - rounds non-power-of-two GPFIFO sizes down, rather than up Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 7 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 22 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 15 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 26 +------ .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.c | 26 +------ .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.h | 3 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c | 27 +------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c | 16 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c | 16 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c | 17 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 60 ++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 34 ++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 34 ++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 1 + .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c | 18 +---- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 25 +----- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 24 +----- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 23 +----- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c | 16 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 32 ++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 90 ++++++++++++++++------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.h | 9 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c | 59 ++++++++++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c | 66 +++++++++++----- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 84 +++++++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 54 ++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 3 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 1 + 29 files changed, 488 insertions(+), 321 deletions(-) commit fbe9f4337c1381710f17df0d74dd588d3d9784b2 Author: Ben Skeggs Date: Wed Jun 1 20:47:36 2022 +1000 drm/nouveau/fifo: add USERD info to nvkm_chan_func And use it to cleanup multiple implementations of almost the same thing. - prepares for non-polled / client-provided USERD - only zeroes relevant "registers", rather than entire USERD Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 12 ++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 25 ++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 27 ++++------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 7 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 58 +++++++++++----------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 5 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 36 +++++--------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 6 --- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 1 + .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 14 ++---- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 13 ++--- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 12 ++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 11 +++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 8 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 8 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 8 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 6 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 10 +++- 23 files changed, 157 insertions(+), 115 deletions(-) commit d3e7a4392c82ec2d3c573cdc0fbcc843f3d76b12 Author: Ben Skeggs Date: Wed Jun 1 20:47:35 2022 +1000 drm/nouveau/fifo: add RAMIN info to nvkm_chan_func Currently provided by {chan,dma,gpfifo}*.c, and those are going away. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 4 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 41 ++++++++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 6 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 8 +++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 6 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 7 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 3 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 1 + 16 files changed, 64 insertions(+), 20 deletions(-) commit b084fff210bfd00de5cdef1802291272c77f581d Author: Ben Skeggs Date: Wed Jun 1 20:47:35 2022 +1000 drm/nouveau/fifo: add common runlist control - less dependence on waiting for runlist updates, on GPUs that allow it - supports runqueue selector in RAMRL entries - completes switch to common runl/cgrp/chan topology info Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.h | 7 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 88 +++++++----- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 2 - .../gpu/drm/nouveau/nvkm/engine/fifo/changf100.h | 3 - .../gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 6 - .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.c | 20 --- .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/g98.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 69 ++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 12 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 119 +++------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 24 ---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 17 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 21 ++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 15 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 27 ---- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 40 ------ .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 15 -- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu102.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 31 ++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 154 ++++++++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.h | 5 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 18 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 26 ++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 11 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 28 ++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 11 +- 35 files changed, 284 insertions(+), 505 deletions(-) commit 4d60100a23ec5b98e43277d82e5de53c359cf02c Author: Ben Skeggs Date: Wed Jun 1 20:47:34 2022 +1000 drm/nouveau/fifo: add common channel recovery That sure was fun to untangle. - handled per-runlist, rather than globally - more straight-forward process in general - various potential SW/HW races have been fixed - fixes lockdep issues that were present in >=gk104's prior implementation - volta recovery now actually stands a chance of working - volta/turing waiting for PBDMA idle before engine reset - turing using hw-provided TSG info for CTXSW_TIMEOUT Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c | 13 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.h | 11 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 286 +++++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 5 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 341 +++++------------------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 23 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 28 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 16 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 185 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 18 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 210 +++----------- 19 files changed, 559 insertions(+), 605 deletions(-) commit 0b1bb1296f288bb7164d143ca82dc958f87cbff6 Author: Ben Skeggs Date: Wed Jun 1 20:47:33 2022 +1000 drm/nouveau/fifo: kill channel on NV_PPBDMA_INTR_1_CTXNOTVALID Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 6 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.h | 1 + 3 files changed, 30 insertions(+) commit 520db0405e9daed6b96b69149673491d80849fe7 Author: Ben Skeggs Date: Wed Jun 1 20:47:33 2022 +1000 drm/nouveau/fifo: kill channel on a selection of PBDMA errors A bunch of these can be handled in such a way that the channel can continue, however, any of these are a pretty decent sign something has gone horribly wrong, and the safest option is to disable the channel. This is a bit of a hack, we will want to handle these individually and dump relevant debug info for each at some point. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit acff941535639a1d244ad9a20dbf3266d39915ed Author: Ben Skeggs Date: Wed Jun 1 20:47:33 2022 +1000 drm/nouveau/fifo: add chan/cgrp preempt() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 11 ------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 30 +++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 3 ++ .../gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 14 +++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 23 +++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 1 + .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 17 -------- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 45 +--------------------- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 12 +----- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 6 ++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 12 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 1 + 19 files changed, 102 insertions(+), 86 deletions(-) commit 67059b9fb8997f3d4515d72052c331503b00274b Author: Ben Skeggs Date: Wed Jun 1 20:47:32 2022 +1000 drm/nouveau/fifo: add chan start()/stop() - nvkm_chan_error() built on top, stops channel and sends 'killed' event - removes an odd double-bashing of channel enable regs on kepler and up - pokes doorbell on turing and up, after enabling channel Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 7 ++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 13 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 73 +++++++++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 7 ++- .../gpu/drm/nouveau/nvkm/engine/fifo/channv04.h | 2 - .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.c | 7 --- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 22 ++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 24 +++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 2 + .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 6 -- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 7 --- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 9 +-- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu102.c | 8 --- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 9 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 27 ++++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 18 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 7 ++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 25 ++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 11 +++- 27 files changed, 191 insertions(+), 108 deletions(-) commit 62742b5ef314c622ae9d848938223071ba360706 Author: Ben Skeggs Date: Wed Jun 1 20:47:31 2022 +1000 drm/nouveau/fifo: add chan bind()/unbind() - stops programming (non-existent) runl id field on bind(), from maxwell Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 3 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 15 +--------- .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.c | 6 ++-- .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 13 ++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 35 ++++++++++++++++++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 28 +++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 2 ++ .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 7 ----- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 6 ---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 19 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 4 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 6 ++++ 17 files changed, 115 insertions(+), 37 deletions(-) commit 3a6bc9c242e10c203a5b083af7823b50b5d63010 Author: Ben Skeggs Date: Wed Jun 1 20:47:31 2022 +1000 drm/nouveau/fifo: add runlist block()/allow() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 13 ++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 14 +++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 14 +++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 2 ++ .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 4 ---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 18 +++++++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 28 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 6 +++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 2 ++ 13 files changed, 95 insertions(+), 14 deletions(-) commit 4a492fd5d26298c82c555f603fe4aa38cf512464 Author: Ben Skeggs Date: Wed Jun 1 20:47:30 2022 +1000 drm/nouveau/fifo: add runlist wait() - adds g8x/turing registers, which were missing before - switches fermi to polled wait, like later hw (see: 4f2fc25c0f8bc...) Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 4 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 5 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 23 ++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 33 +++++++++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 27 ++++++++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 3 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 9 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 5 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 14 +++++++-- 15 files changed, 102 insertions(+), 32 deletions(-) commit f48dd2936138882d7755cbbc5d9984015c75980c Author: Ben Skeggs Date: Wed Jun 1 20:47:30 2022 +1000 drm/nouveau/fifo: add new engine context tracking Channel groups have somewhat more complicated requirements than what we currently support. An engine context is shared between all channels in a channel group, VEID/subctx support (later) brings per-VEID components, and we need to track an individual channel's engine context pointers. This commit adds the structures and refcounting to support the above, wrapping the prior implementation for the moment. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 3 +- drivers/gpu/drm/nouveau/nvkm/core/oproxy.c | 7 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c | 110 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.h | 23 +++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 83 ++++++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 14 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 66 +++++++++++++ 7 files changed, 296 insertions(+), 10 deletions(-) commit c358f53871605a1a8d7ed6e544a05ea00e9c80cb Author: Ben Skeggs Date: Wed Jun 1 20:47:29 2022 +1000 drm/nouveau/fifo: add new channel lookup interfaces - supports per-runlist CHIDs - channel group lock held across reference, rather than global lock v2: - remove unnecessary parenthesis Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 11 ++--- drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c | 6 +-- drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c | 11 ++--- drivers/gpu/drm/nouveau/nvkm/engine/falcon.c | 6 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 57 ---------------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 50 +++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 10 ++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 17 +++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 3 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 47 ++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 3 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 10 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c | 10 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c | 10 ++-- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c | 6 +-- drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c | 11 ++--- 28 files changed, 166 insertions(+), 132 deletions(-) commit e43c872c03a9ad56f5cbc52149b4454601aa6904 Author: Ben Skeggs Date: Wed Jun 1 20:47:29 2022 +1000 drm/nouveau/fifo: merge mmu fault handlers together After updating GF100 implementation from the GK104/TU102 ones, and using the new runlist/engine topology info, all three handlers become (almost) identical. - there's a temporary kludge to call through to the HW-specific recovery - engine fault mapping info determined at load time, not on every fault Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 110 ++++++++++++------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 137 ++++------------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 14 --- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 5 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 5 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 5 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 32 +++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 5 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 40 +++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 22 ++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 18 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 23 +++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 100 ++--------------- 14 files changed, 183 insertions(+), 335 deletions(-) commit 923f1ff5274ce3072df55e5e3bbaa7db457fc35d Author: Ben Skeggs Date: Wed Jun 1 20:47:29 2022 +1000 drm/nouveau/fifo: move PBDMA intr to runq - merges gf100/gk104- NV_PFIFO_INTR_0_PBDMA and NV_PPBDMA_INTR_0 code Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 65 ++++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 92 ++++++++---------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 3 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 6 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.h | 3 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 13 +--- 8 files changed, 84 insertions(+), 102 deletions(-) commit 87c860243149bd7f69ba76a2becfa480efa44974 Author: Ben Skeggs Date: Wed Jun 1 20:47:28 2022 +1000 drm/nouveau/fifo: move PBDMA init to runq - bumps pbdma timeout to value RM uses on newer HW - bumps fb timeout to max from boot default - one/both of these greatly improves stability on // piglit runs Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 3 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 21 +++++++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 36 ++++++++---------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 6 ---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 15 +++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 6 ---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 8 +++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 6 ---- 15 files changed, 36 insertions(+), 74 deletions(-) commit 324176e7c8b9f53b1dbf93981a00667121f61902 Author: Ben Skeggs Date: Mon Oct 3 13:20:07 2022 +1000 drm/nouveau/fifo: program NV_PFIFO_FB_TIMEOUT on init NVGPU and RM both program this value. Fixes a bunch of random hangs running parallel piglit. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 1 + 2 files changed, 2 insertions(+) commit 965c41d9116c713fe80191606096aa384761c8c3 Author: Ben Skeggs Date: Mon Oct 3 13:19:08 2022 +1000 drm/nouveau/fifo: tidy global PBDMA init Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 9 +++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 22 +++++++++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 20 +++++++++----------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 4 +++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 18 ++++++++---------- 14 files changed, 52 insertions(+), 32 deletions(-) commit d67f3b96462922713e77cddb9d6f4965606918fc Author: Ben Skeggs Date: Wed Jun 1 20:47:27 2022 +1000 drm/nouveau/fifo: tidy up non-stall intr handling - removes a layer of indirection in the intr handling - prevents non-stall ctrl racing with unknown intrs Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 7 ++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 34 ++----------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 3 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 33 ++++++++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g98.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 59 ++++++++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 27 ++-------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 3 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 7 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 7 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 3 ++ 20 files changed, 93 insertions(+), 118 deletions(-) commit 2fc71a0566f63ac3cd43d7cf2d5efbbab6293c5f Author: Ben Skeggs Date: Wed Jun 1 20:47:26 2022 +1000 drm/nouveau/fifo: use explicit intr interfaces More control, and shallower call-chain to get to the point. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 27 ++++++++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 21 ++++++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 53 ++++++++++++------------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 3 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 34 ++++++++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 8 ++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 28 +++++++------ drivers/gpu/drm/nouveau/nvkm/subdev/mc/g84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/g98.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gf100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gk104.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gt215.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv04.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv11.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv17.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv50.c | 2 +- 17 files changed, 105 insertions(+), 89 deletions(-) commit 0fc72ee9d8d665484ecae652d114f577313c4cc6 Author: Ben Skeggs Date: Wed Jun 1 20:47:26 2022 +1000 drm/nouveau/fifo: use runlist engine info to lookup engine classes Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 46 --------------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 47 ---------------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g98.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 10 ----- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 19 --------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 3 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 40 +++++++++++++++--- 22 files changed, 35 insertions(+), 146 deletions(-) commit 468fae7bb0a31094cff900e92a08f02263f793be Author: Ben Skeggs Date: Wed Jun 1 20:47:26 2022 +1000 drm/nouveau/fifo: add cgrp, have all channels be part of one Engine context tracking will move to nvkm_cgrp in later commits, so we create SW-only channel groups on HW without support for them. - switches to nvkm_chid for TSG/channel ID allocation Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 7 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c | 94 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.h | 23 +++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 68 ++++++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 5 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chid.c | 29 +++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chid.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 3 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 9 +++ 13 files changed, 231 insertions(+), 18 deletions(-) commit eb39c613481fd2fe6b2f66ec2ca21f8fdcdd4cac Author: Ben Skeggs Date: Wed Jun 1 20:47:25 2022 +1000 drm/nouveau/fifo: expose per-runlist CHID information DRM uses this to setup fence-related items. - nouveau_chan.runlist will always be "0" for the moment, not an issue as GPUs prior to ampere have system-wide channel IDs, Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/cl0080.h | 4 ++- drivers/gpu/drm/nouveau/nouveau_chan.c | 47 ++++++++++++++++++++++--- drivers/gpu/drm/nouveau/nouveau_chan.h | 2 ++ drivers/gpu/drm/nouveau/nouveau_drm.c | 1 + drivers/gpu/drm/nouveau/nouveau_drv.h | 8 +++-- drivers/gpu/drm/nouveau/nouveau_fence.c | 8 ++--- drivers/gpu/drm/nouveau/nv84_fence.c | 22 +++++++----- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 9 +++++ 8 files changed, 80 insertions(+), 21 deletions(-) commit 6de125383a5cce5f0d9235a6d3a9ae83dc5d299e Author: Ben Skeggs Date: Wed Jun 1 20:47:25 2022 +1000 drm/nouveau/fifo: expose runlist topology info on all chipsets Previously only available from Kepler onwards. - also fixes the info() queries causing fifo init()/fini() unnecessarily Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nouveau_abi16.c | 26 ++++++------ drivers/gpu/drm/nouveau/nouveau_chan.c | 7 ++-- drivers/gpu/drm/nouveau/nouveau_chan.h | 5 +-- drivers/gpu/drm/nouveau/nouveau_drm.c | 36 ++++++---------- drivers/gpu/drm/nouveau/nvkm/core/engine.c | 12 ++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 49 +++++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 52 ------------------------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 1 - 17 files changed, 81 insertions(+), 116 deletions(-) commit d94470e9d150aaf0fff26f09852da22ae951956f Author: Ben Skeggs Date: Wed Jun 1 20:47:24 2022 +1000 drm/nouveau/fifo: add common runlist/engine topology Creates an nvkm_runl for each runlist on the GPU, and an nvkm_engn for each engine that is reachable from a runlist. - basically what gk104- already does, but extended to all chips - adds per-runlist CHID allocators (Ampere) - splits g98/gt2xx out from g84 (different target engines) Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/os.h | 15 +++ drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 14 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 19 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 37 ++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g98.c | 77 ++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 35 +++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 102 +++++++++++++------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 9 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 4 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 4 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 9 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 4 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 9 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 17 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 29 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c | 4 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c | 4 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 13 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 17 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.h | 5 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 19 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 112 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.h | 55 ++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 9 ++ 26 files changed, 583 insertions(+), 43 deletions(-) commit 1c488ba96e59ce84bf1cfd321bf27252f4598bec Author: Ben Skeggs Date: Wed Jun 1 20:47:23 2022 +1000 drm/nouveau/fifo: add runq Creates an nvkm_runq for each PBDMA, these will be associated with the relevant runlist(s) later. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 16 +++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 25 +++++++++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 20 ++++------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 8 +++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 8 ++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 7 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 11 +++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.c | 45 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/runq.h | 24 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 3 +- 17 files changed, 153 insertions(+), 27 deletions(-) commit 800ac1f8d708ea2b70ac55b3029687c1b4283431 Author: Ben Skeggs Date: Wed Jun 1 20:47:23 2022 +1000 drm/nouveau/fifo: add chid allocator We need to be able to allocate TSG IDs as well as channel IDs, also, Ampere has per-runlist channel IDs. - holds per-ID private data, which will be used for/to protect lookup - holds an nvkm_event which will be used for events tied to IDs - not used yet beyond setup, and switching use of "fifo->nr - 1" for channel ID mask to "chid->mask" Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 3 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 20 +++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 4 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/chid.c | 82 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chid.h | 23 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 8 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 14 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 23 +++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c | 9 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 9 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 9 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 6 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 1 + 26 files changed, 209 insertions(+), 21 deletions(-) commit 9be9c606c4be74b5e8cbebe5b1ea96821e27b04f Author: Ben Skeggs Date: Wed Jun 1 20:47:22 2022 +1000 drm/nouveau/fifo: merge gk104_fifo_func into nvkm_host_func This makes it easier to transition everything. - a couple of function renames for collisions Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 9 +---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 11 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 49 ++++++++++++------------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 39 +------------------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 18 +++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 18 +++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 18 +++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 25 ++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 18 +++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 25 ++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 21 +++++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 46 +++++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 29 +++++++------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 4 +- 14 files changed, 219 insertions(+), 111 deletions(-) commit fd67738a28bf51a8113c0d1cc8f31d4f2f3776e0 Author: Ben Skeggs Date: Wed Jun 1 20:47:22 2022 +1000 drm/nouveau/fifo: pre-move some blocks of code around - will make subsequent patches more obvious - no code changes Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 16 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c | 66 --- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 172 ++++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 448 ++++++++++----------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 66 +++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 32 +- 6 files changed, 400 insertions(+), 400 deletions(-) commit f5e4568991f60125712b03079bc037c6feb953f1 Author: Ben Skeggs Date: Wed Jun 1 20:47:21 2022 +1000 drm/nouveau/fifo: unify handling of channel classes Adds the basic skeleton for common channel (group) interfaces. - common behaviour between =gk104 impl's - separates priv/user channel objects - passthrough to existing object for now, kludges removed later Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/class.h | 3 + drivers/gpu/drm/nouveau/include/nvkm/core/os.h | 4 + drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 43 ++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.h | 11 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 43 ++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 19 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c | 4 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c | 4 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c | 4 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c | 4 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 14 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 12 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 50 +----- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 18 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 15 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 9 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c | 4 - .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 4 - .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 3 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c | 4 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 12 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 19 ++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c | 14 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c | 14 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 14 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 14 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 34 +++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 12 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/uchan.c | 174 +++++++++++++++++++++ 36 files changed, 410 insertions(+), 191 deletions(-) commit 8c18138c7633f7f9e609be6b11e48bb33a8dfb75 Author: Ben Skeggs Date: Wed Jun 1 20:47:21 2022 +1000 drm/nouveau/fifo: add chid_nr() - reads channel count from GPU from gm200 onwards - removes gm20b/gp10b (they become identical to gm200/gp100) Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/os.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 20 +++++----- drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 11 +++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 9 ++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 9 ++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 9 ++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c | 45 --------------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp10b.c | 46 ---------------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c | 9 ++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c | 7 ++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 9 ++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 15 ++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 33 ++++++++-------- 25 files changed, 114 insertions(+), 137 deletions(-) commit 973b32443b090870903ad8346adfc911e7c0f188 Author: Ben Skeggs Date: Wed Jun 1 20:47:21 2022 +1000 drm/nouveau/imem: allow bar2 mapping of user allocations Will be used to init client-allocated USERD to default values. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/memory.h | 2 ++ .../gpu/drm/nouveau/include/nvkm/subdev/instmem.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c | 8 +++++++ drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 12 ++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 27 ++++++++++++++++++---- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/priv.h | 1 + 6 files changed, 46 insertions(+), 6 deletions(-) commit e442f1e453143c801b9fb213f514ceabb6c3b746 Author: Ben Skeggs Date: Wed Jun 1 20:47:20 2022 +1000 drm/nouveau/flcn: show falcon user in debug output Displays both owner/user of the falcon (when they differ), and takes both subdevs' debug levels into account when deciding whether to log the message. - runlist debugging will use one of the alternate macros added here Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h | 16 ++++++++-------- drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 15 +++++++++++---- drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.h | 7 +++---- 3 files changed, 22 insertions(+), 16 deletions(-) commit 8478cd5a740a092163c8ad5b6da1a1b488eb42bd Author: Ben Skeggs Date: Wed Jun 1 20:47:19 2022 +1000 drm/nouveau/nvkm: add locking to subdev/engine init paths This wasn't really needed before; the main place this could race is with channel recovery, but (through potentially fragile means) shouldn't have been possible. However, a number of upcoming patches benefit from having better control over subdev init, necessitating some improvements here. - allows subdev/engine oneinit() without init() (host/fifo patches) - merges engine use locking/tracking into subdev, and extends it to fix some issues that will arise with future usage patterns (acr patches) Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/engine.h | 6 -- drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 25 ++++- drivers/gpu/drm/nouveau/nvkm/core/engine.c | 63 ++++------- drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 117 +++++++++++++++++---- 4 files changed, 142 insertions(+), 69 deletions(-) commit 565bfaf1f26af0e9fc9aafbb7053da1187afe9f4 Author: Ben Skeggs Date: Wed Jun 1 20:46:55 2022 +1000 drm/nouveau/mc/ga100: switch to using NV_PMC_DEVICE_ENABLE - NV_PMC_ENABLE still exists, but we don't touch anything in it yet Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/subdev/mc/ga100.c | 47 ++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) commit ebb195dbb3390324100cb85c22129f6334064b5f Author: Ben Skeggs Date: Wed Jun 1 20:46:55 2022 +1000 drm/nouveau/mc: move NV_PMC_ENABLE bashing to chipset-specific code Ampere needs different handling here, most of what we touch has moved. We probably want to refactor these interfaces in general, but I'm not yet sure how they should look, this will get the job done for now. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c | 17 ++++++--------- drivers/gpu/drm/nouveau/nvkm/subdev/mc/g84.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/g98.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/ga100.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/gf100.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/gp100.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/gp10b.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/gt215.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv04.c | 29 ++++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv11.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv17.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv44.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv50.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 8 +++++++ 16 files changed, 56 insertions(+), 11 deletions(-) commit fe76fe497c30080ce8962ea62c5c13c6814e1a83 Author: Ben Skeggs Date: Wed Jun 1 20:46:55 2022 +1000 drm/nouveau/mc: implement intr handling on top of nvkm_intr - new-style handlers can now be used here too - decent clean-up Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h | 6 +- drivers/gpu/drm/nouveau/nvkm/core/intr.c | 10 +- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 10 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/Kbuild | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c | 113 ++++---------------- drivers/gpu/drm/nouveau/nvkm/subdev/mc/g84.c | 34 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/mc/g98.c | 34 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/mc/ga100.c | 28 +---- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gf100.c | 81 ++++---------- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gk104.c | 36 +++---- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gk20a.c | 8 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gp100.c | 124 +++++++++------------- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gp10b.c | 10 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gt215.c | 62 +++++++---- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv04.c | 64 +++++++---- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv11.c | 20 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv17.c | 22 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv44.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv50.c | 28 +++-- drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 42 +++----- drivers/gpu/drm/nouveau/nvkm/subdev/mc/tu102.c | 123 --------------------- 21 files changed, 285 insertions(+), 577 deletions(-) commit e5f92c8735b6ff415aafdd0af85232f2592174c3 Author: Ben Skeggs Date: Wed Jun 1 20:46:54 2022 +1000 drm/nouveau/fault/ga100: initial support TU102 implementation should be OK for Ampere now. v2. fixup for ga103 early merge Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b59d810a47423e61ae4e0ded502585e6ee9b1d76 Author: Ben Skeggs Date: Wed Jun 1 20:46:54 2022 +1000 drm/nouveau/fault/tu102: switch to explicit intr handlers - reads vectors from HW, rather than being hardcoded - removes hacks to support routing via old interfaces Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul .../gpu/drm/nouveau/include/nvkm/subdev/fault.h | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/fault/priv.h | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/fault/tu102.c | 107 +++++++++------------ drivers/gpu/drm/nouveau/nvkm/subdev/mc/tu102.c | 13 --- 4 files changed, 52 insertions(+), 72 deletions(-) commit e650738055cebe1dec82765232697052bf6c22d5 Author: Ben Skeggs Date: Wed Jun 1 20:46:54 2022 +1000 drm/nouveau/vfn/tu102-: support new-style interrupt tree - switches ampere over now, and removes its hack mc implementation Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/subdev/vfn.h | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/ga100.c | 16 +---- drivers/gpu/drm/nouveau/nvkm/subdev/vfn/base.c | 8 +++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/ga100.c | 11 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/priv.h | 5 ++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/tu102.c | 72 +++++++++++++++++++++++ 6 files changed, 99 insertions(+), 15 deletions(-) commit 58c3d3c837297051479d552753f04e4561453403 Author: Ben Skeggs Date: Wed Jun 1 20:46:53 2022 +1000 drm/nouveau/vfn: move NV_USERMODE class from host - uses proper class IDs for Turing/Ampere Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/class.h | 2 + drivers/gpu/drm/nouveau/include/nvkm/subdev/vfn.h | 3 ++ drivers/gpu/drm/nouveau/nvif/user.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 3 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga102.c | 20 +--------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 2 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/user.h | 8 ---- .../gpu/drm/nouveau/nvkm/engine/fifo/usertu102.c | 45 --------------------- drivers/gpu/drm/nouveau/nvkm/subdev/vfn/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/vfn/base.c | 4 ++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/ga100.c | 3 ++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/gv100.c | 3 ++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/priv.h | 8 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/tu102.c | 3 ++ .../{engine/fifo/usergv100.c => subdev/vfn/uvfn.c} | 46 ++++++++++++++++------ 17 files changed, 67 insertions(+), 92 deletions(-) commit f83d1c3114182a0d826c929912e5ae94b7aeebc6 Author: Ben Skeggs Date: Wed Jun 1 20:46:53 2022 +1000 drm/nouveau/vfn: add stub subdev for dev_func Initially for NV_USERMODE class, and Turing/Ampere's new interrupt tree. v2. fixup for ga103 early merge Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/layout.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/vfn.h | 18 ++++++++ drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 12 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/vfn/Kbuild | 5 +++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/base.c | 48 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/ga100.c | 33 +++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/gv100.c | 33 +++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/priv.h | 12 ++++++ drivers/gpu/drm/nouveau/nvkm/subdev/vfn/tu102.c | 33 +++++++++++++++ 11 files changed, 197 insertions(+) commit a7ab200aebc23095474e6dc8e335e60473086236 Author: Ben Skeggs Date: Wed Jun 1 20:46:53 2022 +1000 drm/nouveau/intr: add nvkm_subdev_intr() compatibility It's quite a lot of tedious and error-prone work to switch over all the subdevs at once, so allow an nvkm_intr to request new-style handlers to be created that wrap the existing interfaces. This will allow a more gradual transition. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/intr.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 2 + drivers/gpu/drm/nouveau/nvkm/core/intr.c | 61 ++++++++++++++++++++++ 4 files changed, 65 insertions(+) commit 3ebd64aa3c4fe7fa2e73f6fa5f81490721a9c4e1 Author: Ben Skeggs Date: Wed Jun 1 20:46:52 2022 +1000 drm/nouveau/intr: support multiple trees, and explicit interfaces Turing adds a second top-level interrupt tree in HW, in addition to the trees available via NV_PMC. Most of the interrupts we care about are exposed in both trees, but not all of them, and we have some rather nasty hacks to route the fault buffer interrupts. Ampere removes the NV_PMC trees entirely. Here we add some infrastructure to be able to handle all of this more cleanly, as well as providing more explicit control over handlers. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 2 + drivers/gpu/drm/nouveau/include/nvkm/core/intr.h | 60 +++++ drivers/gpu/drm/nouveau/nvkm/core/intr.c | 284 ++++++++++++++++++++- 3 files changed, 344 insertions(+), 2 deletions(-) commit 727fd72f2402afe7cc320844b0aef165f7eb544e Author: Ben Skeggs Date: Wed Jun 1 20:46:52 2022 +1000 drm/nouveau/intr: add shared interrupt plumbing between pci/tegra Unifies the handling between PCI-based and Tegra GPUs, and makes more explicit/obvious where device interrupts can be expected. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 9 ++ drivers/gpu/drm/nouveau/include/nvkm/core/intr.h | 12 +++ drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h | 1 - drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h | 2 +- drivers/gpu/drm/nouveau/nvkm/core/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/core/intr.c | 109 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 11 ++- drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 7 ++ drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 40 +------- drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c | 44 ++------- 10 files changed, 161 insertions(+), 75 deletions(-) commit eec3f6dfedc0b8c5aef7619667dee61a77a37e35 Author: Ben Skeggs Date: Wed Jun 1 20:46:51 2022 +1000 drm/nouveau/top: parse device topology right after devinit We're going to want this information available earlier than it is now. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 4 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c | 13 ++++++++----- drivers/gpu/drm/nouveau/nvkm/subdev/top/ga100.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/top/priv.h | 2 +- 6 files changed, 18 insertions(+), 10 deletions(-) commit ab4f75eb1cc261263ac51814fed14fde08b6716f Author: Ben Skeggs Date: Wed Jun 1 20:46:51 2022 +1000 drm/nouveau/nvkm: give each nvkm_event its own lockdep class The vblank and nonstall events have some annoying interactions with DRM locking, and aren't able to do certain things as a result. However, other uses of event notifications don't have such requirements, and upcoming patches take advantage of this for various improvements. Having separate classes for each nvkm_event's spinlocks allows lockdep to distinguish between them and avoid false-positives. v2: __always_inline + comment Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvkm/core/event.h | 19 +++++++++++++++++-- drivers/gpu/drm/nouveau/nvkm/core/event.c | 6 ++---- 2 files changed, 19 insertions(+), 6 deletions(-) commit 4a16dd9d18a04742292cc7bfdbb79aedfe24e2c8 Author: Ben Skeggs Date: Wed Jun 1 20:46:40 2022 +1000 drm/nouveau/kms: switch to drm fbdev helpers This removes support for accelerated fbcon rendering, and fixes a number of races/crashes/issues around suspend/resume/module unload etc. Losing HW accelerated rendering isn't ideal, but it's been significantly reduced in performance since the removal of accelerated scrolling in the kernel anyway - not to mention, can be racey (skips cpu<->gpu sync) from certain contexts. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/Kbuild | 4 - drivers/gpu/drm/nouveau/dispnv04/crtc.c | 10 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 +- drivers/gpu/drm/nouveau/nouveau_display.c | 10 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 14 +- drivers/gpu/drm/nouveau/nouveau_drv.h | 3 - drivers/gpu/drm/nouveau/nouveau_fbcon.c | 614 ------------------------------ drivers/gpu/drm/nouveau/nouveau_fbcon.h | 82 ---- drivers/gpu/drm/nouveau/nouveau_vga.c | 1 - drivers/gpu/drm/nouveau/nv04_fbcon.c | 259 ------------- drivers/gpu/drm/nouveau/nv50_fbcon.c | 299 --------------- drivers/gpu/drm/nouveau/nvc0_fbcon.c | 297 --------------- 12 files changed, 15 insertions(+), 1581 deletions(-) commit 99d0701afdaf09ab5eb42b6578f2cc9913e7d85c Author: Ben Skeggs Date: Wed Jun 1 20:46:40 2022 +1000 drm/nouveau/nvkm: rip out old notify Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/event.h | 27 --- drivers/gpu/drm/nouveau/include/nvif/ioctl.h | 51 +---- drivers/gpu/drm/nouveau/include/nvif/notify.h | 35 ---- drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 15 +- drivers/gpu/drm/nouveau/include/nvkm/core/event.h | 9 - drivers/gpu/drm/nouveau/include/nvkm/core/notify.h | 39 ---- drivers/gpu/drm/nouveau/nouveau_drv.h | 5 - drivers/gpu/drm/nouveau/nouveau_nvif.c | 4 +- drivers/gpu/drm/nouveau/nouveau_usif.c | 6 - drivers/gpu/drm/nouveau/nvif/Kbuild | 1 - drivers/gpu/drm/nouveau/nvif/notify.c | 210 --------------------- drivers/gpu/drm/nouveau/nvkm/core/Kbuild | 1 - drivers/gpu/drm/nouveau/nvkm/core/client.c | 127 +------------ drivers/gpu/drm/nouveau/nvkm/core/event.c | 33 +--- drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 88 --------- drivers/gpu/drm/nouveau/nvkm/core/notify.c | 163 ---------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fault/gp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fault/gv100.c | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/fault/tu102.c | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c | 2 +- 25 files changed, 33 insertions(+), 805 deletions(-) commit 6c9705f68465661eede90ce435eda7fd49f70d79 Author: Ben Skeggs Date: Wed Jun 1 20:46:39 2022 +1000 drm/nouveau/fifo: expose channel killed in host channel event class Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/cl906f.h | 2 -- drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 2 -- drivers/gpu/drm/nouveau/include/nvif/clc36f.h | 2 -- drivers/gpu/drm/nouveau/include/nvif/if0020.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 + drivers/gpu/drm/nouveau/nouveau_chan.c | 28 +++++++++++++++------- drivers/gpu/drm/nouveau/nouveau_chan.h | 4 ++-- drivers/gpu/drm/nouveau/nouveau_fence.c | 5 ++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 18 +------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 14 +++-------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 1 - .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 15 ------------ .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 1 - .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c | 1 - .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu102.c | 1 - 15 files changed, 30 insertions(+), 66 deletions(-) commit 8c880fd4c155d9b1b3e294169d7dc3f3a1e04bd3 Author: Ben Skeggs Date: Wed Jun 1 20:46:39 2022 +1000 drm/nouveau/fifo: expose non-stall intr in host channel event class Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/cl826e.h | 2 -- drivers/gpu/drm/nouveau/include/nvif/cl826f.h | 2 -- drivers/gpu/drm/nouveau/include/nvif/cl906f.h | 1 - drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 1 - drivers/gpu/drm/nouveau/include/nvif/class.h | 2 ++ drivers/gpu/drm/nouveau/include/nvif/clc36f.h | 1 - drivers/gpu/drm/nouveau/include/nvif/if0020.h | 12 +++++++ drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 + drivers/gpu/drm/nouveau/nouveau_fence.c | 42 +++++++++++----------- drivers/gpu/drm/nouveau/nouveau_fence.h | 4 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 23 +----------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 25 +++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 15 -------- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 3 -- 14 files changed, 64 insertions(+), 70 deletions(-) commit 801bc8584e58f718491ca25827647129d9b6ef1f Author: Ben Skeggs Date: Wed Jun 1 20:46:39 2022 +1000 drm/nouveau/disp: expose page flip event class Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/dispnv04/crtc.c | 8 +++--- drivers/gpu/drm/nouveau/dispnv04/disp.c | 15 +++++++----- drivers/gpu/drm/nouveau/dispnv04/disp.h | 7 ++++-- drivers/gpu/drm/nouveau/include/nvif/if0004.h | 5 +++- drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c | 22 +---------------- drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c | 35 ++++++++++++++------------- 7 files changed, 42 insertions(+), 51 deletions(-) commit 773eb04d14a11552b2c3953097ed09cde2ab4831 Author: Ben Skeggs Date: Wed Jun 1 20:46:38 2022 +1000 drm/nouveau/disp: expose conn event class This removes some now-unnecessary nesting of workqueues. v2: - use ?: (lyude) Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/conn.h | 10 +++ drivers/gpu/drm/nouveau/include/nvif/event.h | 19 ------ drivers/gpu/drm/nouveau/include/nvif/if0011.h | 11 ++++ drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h | 6 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h | 19 ++---- drivers/gpu/drm/nouveau/nouveau_connector.c | 67 ++++++++++--------- drivers/gpu/drm/nouveau/nouveau_connector.h | 6 +- drivers/gpu/drm/nouveau/nouveau_display.c | 16 +++-- drivers/gpu/drm/nouveau/nouveau_dp.c | 15 +++-- drivers/gpu/drm/nouveau/nouveau_encoder.h | 3 +- drivers/gpu/drm/nouveau/nvif/conn.c | 19 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 54 ---------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.c | 39 ----------- drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.h | 3 - drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 40 ------------ drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/disp/uconn.c | 75 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c | 24 +------ drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c | 25 +------- 21 files changed, 187 insertions(+), 269 deletions(-) commit ffd2664114c8fb9f12c4d4fd09c6d57cc3f4d951 Author: Ben Skeggs Date: Wed Jun 1 20:46:38 2022 +1000 drm/nouveau/disp: expose head event class Also fixes vblank interrupts being left enabled when they're not meant to be as a result of races/bugs in previous event handling code. v2: - use ?: (lyude) Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/dispnv04/crtc.c | 22 ++++++------------- drivers/gpu/drm/nouveau/dispnv50/head.c | 20 ++++++------------ drivers/gpu/drm/nouveau/include/nvif/cl0046.h | 1 - drivers/gpu/drm/nouveau/include/nvif/event.h | 11 ---------- drivers/gpu/drm/nouveau/include/nvif/head.h | 10 +++++++++ drivers/gpu/drm/nouveau/include/nvif/if0013.h | 5 +++++ drivers/gpu/drm/nouveau/nouveau_crtc.h | 4 ++-- drivers/gpu/drm/nouveau/nouveau_display.c | 4 ++-- drivers/gpu/drm/nouveau/nvif/head.c | 10 +++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 27 ------------------------ drivers/gpu/drm/nouveau/nvkm/engine/disp/uhead.c | 19 +++++++++++++++++ 11 files changed, 62 insertions(+), 71 deletions(-) commit 1d4dce284164de21cfbab05d0b763711c428df45 Author: Ben Skeggs Date: Wed Jun 1 20:46:37 2022 +1000 drm/nouveau/disp: switch vblank semaphore release to nvkm_event_ntfy Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/event.h | 2 -- drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c | 20 ++++++------------ drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c | 24 ++++++++-------------- drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.h | 4 ++-- 6 files changed, 19 insertions(+), 35 deletions(-) commit b418ff8863eec01b39f32eee0417a216f4cdb24c Author: Ben Skeggs Date: Wed Jun 1 20:46:37 2022 +1000 drm/nouveau/fault: expose replayable fault buffer event class Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/clb069.h | 5 ++- drivers/gpu/drm/nouveau/nouveau_svm.c | 50 +++++++++++++++--------- drivers/gpu/drm/nouveau/nvkm/subdev/fault/base.c | 16 -------- drivers/gpu/drm/nouveau/nvkm/subdev/fault/user.c | 30 ++++++++------ 4 files changed, 53 insertions(+), 48 deletions(-) commit 55520832d6e40c1e2099ce2c6c1e5ab9ecf57ff7 Author: Ben Skeggs Date: Wed Jun 1 20:46:37 2022 +1000 drm/nouveau/fault: switch non-replayable faults to nvkm_event_ntfy v2: fix flush_work() being called uninitialised during init Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul .../gpu/drm/nouveau/include/nvkm/subdev/fault.h | 5 +-- drivers/gpu/drm/nouveau/nvkm/subdev/fault/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fault/gp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fault/gv100.c | 41 ++++++++++++++-------- drivers/gpu/drm/nouveau/nvkm/subdev/fault/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fault/tu102.c | 17 ++++++--- 6 files changed, 44 insertions(+), 24 deletions(-) commit f43e47c090dc7fe32d5410d8740c3a004eb2676f Author: Ben Skeggs Date: Wed Jun 1 20:46:36 2022 +1000 drm/nouveau/nvkm: add a replacement for nvkm_notify This replaces the twisty, confusing, relationship between nvkm_event and nvkm_notify with something much simpler, and less racey. It also places events in the object tree hierarchy, which will allow a heap of the code tracking events across allocation/teardown/suspend to be removed. This commit just adds the new interfaces, and passes the owning subdev to the event constructor to enable debug-tracing in the new code. v2: - use ?: (lyude) Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/class.h | 2 + drivers/gpu/drm/nouveau/include/nvif/event.h | 32 +++++ drivers/gpu/drm/nouveau/include/nvif/if000e.h | 26 ++++ drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 2 + drivers/gpu/drm/nouveau/include/nvkm/core/event.h | 38 ++++- drivers/gpu/drm/nouveau/include/nvkm/core/object.h | 2 + drivers/gpu/drm/nouveau/nouveau_nvif.c | 15 +- drivers/gpu/drm/nouveau/nvif/Kbuild | 1 + drivers/gpu/drm/nouveau/nvif/event.c | 81 +++++++++++ drivers/gpu/drm/nouveau/nvkm/core/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/core/client.c | 5 +- drivers/gpu/drm/nouveau/nvkm/core/event.c | 149 ++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 27 +++- drivers/gpu/drm/nouveau/nvkm/core/oproxy.c | 13 ++ drivers/gpu/drm/nouveau/nvkm/core/uevent.c | 157 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 11 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fault/base.c | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c | 2 +- 21 files changed, 547 insertions(+), 29 deletions(-) commit 361863ceab1eaa171a304bda84636f2ff0a1d820 Author: Ben Skeggs Date: Wed Jun 1 20:46:36 2022 +1000 drm/nouveau/disp: move head scanoutpos method Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/dispnv50/disp.c | 1 - drivers/gpu/drm/nouveau/include/nvif/cl0046.h | 22 ------ drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 28 -------- drivers/gpu/drm/nouveau/include/nvif/if0013.h | 18 +++++ drivers/gpu/drm/nouveau/nouveau_display.c | 27 +++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 3 - drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c | 38 ---------- drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 2 - .../gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c | 62 ---------------- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 83 ---------------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c | 12 ---- drivers/gpu/drm/nouveau/nvkm/engine/disp/uhead.c | 42 +++++++++++ 13 files changed, 71 insertions(+), 269 deletions(-) commit a2b7eadfef5963138a5aeaba90c4f513414823c2 Author: Ben Skeggs Date: Wed Jun 1 20:46:36 2022 +1000 drm/nouveau/disp: add head class v2: remove extra whitespace Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/dispnv04/crtc.c | 5 ++ drivers/gpu/drm/nouveau/dispnv50/head.c | 5 ++ drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvif/disp.h | 1 + drivers/gpu/drm/nouveau/include/nvif/head.h | 13 +++++ drivers/gpu/drm/nouveau/include/nvif/if0010.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if0013.h | 12 +++++ drivers/gpu/drm/nouveau/nouveau_crtc.h | 3 +- drivers/gpu/drm/nouveau/nvif/Kbuild | 1 + drivers/gpu/drm/nouveau/nvif/disp.c | 5 +- drivers/gpu/drm/nouveau/nvif/head.c | 48 +++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | 3 ++ drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c | 12 +++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/uhead.c | 66 ++++++++++++++++++++++++ 16 files changed, 175 insertions(+), 3 deletions(-) commit 8c7d980da9ba3eb67a1b40fd4b33bcf49397084b Author: Ben Skeggs Date: Wed Jun 1 20:46:35 2022 +1000 drm/nouveau/disp: move DP MST payload config method Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/dispnv50/disp.c | 26 +++----------- drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 18 ---------- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 12 +++++++ drivers/gpu/drm/nouveau/include/nvif/outp.h | 2 ++ drivers/gpu/drm/nouveau/nvif/outp.c | 21 ++++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 40 ---------------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 17 +++++++++ 7 files changed, 57 insertions(+), 79 deletions(-) commit 8bb30c882334c0fdbec9b604f09d2e9120b509ab Author: Ben Skeggs Date: Wed Jun 1 20:46:35 2022 +1000 drm/nouveau/disp: add method to trigger DP link retrain This moves control of link retraining in response to HPD IRQ to the KMS driver's HPD IRQ handler. NVKM still handles checking link status for the moment, this can be moved to the KMS driver when it takes explicit control of link rate selection. v2: - skip source config on retrain (fixes some retrain failures) Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/if0012.h | 6 + drivers/gpu/drm/nouveau/include/nvif/outp.h | 1 + drivers/gpu/drm/nouveau/nouveau_display.c | 6 +- drivers/gpu/drm/nouveau/nouveau_dp.c | 11 ++ drivers/gpu/drm/nouveau/nouveau_encoder.h | 1 + drivers/gpu/drm/nouveau/nvif/outp.c | 8 ++ drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 138 +++++++++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 15 +++ 8 files changed, 124 insertions(+), 62 deletions(-) commit 016dacb60e6d4b301c5941a0dedb49d337926832 Author: Ben Skeggs Date: Wed Jun 1 20:46:34 2022 +1000 drm/nouveau/kms: pass event mask to hpd handler Will be moving the DP link status check / re-train here so it's safe from racing with modeset routing changes. MST message handling etc. will remain where it is. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nouveau_connector.c | 11 +++++------ drivers/gpu/drm/nouveau/nouveau_connector.h | 3 ++- drivers/gpu/drm/nouveau/nouveau_display.c | 20 +++++++++++++++++--- drivers/gpu/drm/nouveau/nouveau_dp.c | 12 +++++------- 4 files changed, 29 insertions(+), 17 deletions(-) commit d62f8e982cb857f451a9055d8cc446b1212a6500 Author: Ben Skeggs Date: Wed Jun 1 20:46:34 2022 +1000 drm/nouveau/kms: switch hpd_lock from mutex to spinlock There's no good reason for this to be a mutex, and once the layers of workqueues have been untangled, nouveau_connector_hpd() can be called from IRQ context and won't be able to take a mutex. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/nouveau_connector.c | 5 +++-- drivers/gpu/drm/nouveau/nouveau_display.c | 13 ++++++------- drivers/gpu/drm/nouveau/nouveau_drv.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) commit e3cac8f7749f78dacdf19c00ed5862a1db52239f Author: Marek Vasut Date: Tue Nov 1 16:26:29 2022 +0100 drm: lcdif: Set and enable FIFO Panic threshold In case the LCDIFv3 is used to drive a 4k panel via i.MX8MP HDMI bridge, the LCDIFv3 becomes susceptible to FIFO underflows, these lead to nasty flicker of the image on the panel, or image being shifted by half frame horizontally every second frame. The flicker can be easily triggered by running 3D application on top of weston compositor, like neverball or chromium. Surprisingly glmark2-es2-wayland or glmark2-es2-drm does not trigger this effect so easily. Configure the FIFO Panic threshold register and enable the FIFO Panic mode, which internally boosts the NoC interconnect priority for LCDIFv3 transactions in case of possible underflow. This mitigates the flicker effect on 4k panels as well. Fixes: 9db35bb349a0 ("drm: lcdif: Add support for i.MX8MP LCDIF variant") Signed-off-by: Marek Vasut Tested-by: Liu Ying # i.MX8mp EVK Reviewed-by: Liu Ying Link: https://patchwork.freedesktop.org/patch/msgid/20221101152629.21768-1-marex@denx.de drivers/gpu/drm/mxsfb/lcdif_kms.c | 16 ++++++++++++++++ drivers/gpu/drm/mxsfb/lcdif_regs.h | 1 + 2 files changed, 17 insertions(+) commit 8e18be7610aebea50e9327c11afcd5eeaaa06644 Author: Yang Li Date: Mon Nov 7 14:26:23 2022 +0800 lib: Fix some kernel-doc comments Make the description of @policy to @p in nla_policy_len() to clear the below warnings: lib/nlattr.c:660: warning: Function parameter or member 'p' not described in 'nla_policy_len' lib/nlattr.c:660: warning: Excess function parameter 'policy' description in 'nla_policy_len' Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2736 Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20221107062623.6709-1-yang.lee@linux.alibaba.com Signed-off-by: Jakub Kicinski lib/nlattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a62b749390630fd02525ed8abd29323319f9096e Author: Ben Skeggs Date: Wed Jun 1 20:46:34 2022 +1000 drm/nouveau/disp: add method to control DPAUX pad power This removes the need for NVKM to track DP HPD events, as the KMS driver follows them already, and has better information available. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/include/nvif/if0012.h | 9 +++ drivers/gpu/drm/nouveau/include/nvif/outp.h | 1 + drivers/gpu/drm/nouveau/nouveau_dp.c | 10 ++- drivers/gpu/drm/nouveau/nvif/outp.c | 14 ++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 90 +++++++++++------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 15 ++++ 8 files changed, 93 insertions(+), 51 deletions(-) commit 8134437213316a58d1844b87e2042ebf1fd9962c Author: Ben Skeggs Date: Wed Jun 1 20:46:33 2022 +1000 drm/nouveau/disp: move DP link config into acquire Aside from fixing MST->SST switching (KMS never turned off MST link config), this should preserve existing behaviour for the moment, but provide a path for the KMS driver to have more explicit control of the DP link, which has been requested by Lyude. More research into modeset/supervisor interactions is needed before we can have fully explicit control from the KMS driver. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/dispnv50/disp.c | 34 +++------------------- drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 7 ----- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 6 +++- drivers/gpu/drm/nouveau/include/nvif/outp.h | 3 +- drivers/gpu/drm/nouveau/nvif/outp.c | 10 +++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c | 19 +++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 2 ++ .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 15 ---------- drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 29 ++++++++++++++++-- 9 files changed, 65 insertions(+), 60 deletions(-) commit a9f5d7721923f6016578167640b8dd5cb0c5a698 Author: Ben Skeggs Date: Wed Jun 1 20:46:33 2022 +1000 drm/nouveau/disp: move HDA ELD method Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/dispnv50/disp.c | 50 ++++++++-------------- drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 7 --- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 10 +++++ drivers/gpu/drm/nouveau/include/nvif/outp.h | 1 + drivers/gpu/drm/nouveau/nvif/outp.c | 21 +++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 33 -------------- drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 30 +++++++++++++ 7 files changed, 81 insertions(+), 71 deletions(-) commit f530bc60a30bee47ff51b7fb71511fdd058b774a Author: Ben Skeggs Date: Wed Jun 1 20:46:33 2022 +1000 drm/nouveau/disp: move HDMI config into acquire + infoframe methods v2: - fix typo in sorhdmi/g84 struct initialiser (kbuild test robot) v3: - less convoluted flow control in nvkm_uoutp_mthd_acquire_tmds() (lyude) v4: - we don't support hdmi on original nv50, don't try Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/dispnv50/disp.c | 172 +++++++++------------ drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 14 -- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 24 ++- drivers/gpu/drm/nouveau/include/nvif/outp.h | 5 +- drivers/gpu/drm/nouveau/nvif/outp.c | 28 +++- drivers/gpu/drm/nouveau/nvkm/engine/disp/g84.c | 91 ++++++----- drivers/gpu/drm/nouveau/nvkm/engine/disp/ga102.c | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 93 ++++++----- drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c | 85 ++++++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 13 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 89 +++++++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c | 95 +++++++----- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 23 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp77.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/mcp89.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 3 + .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 45 ------ drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c | 5 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 74 +++++++++ 21 files changed, 503 insertions(+), 378 deletions(-) commit 6426773410fd829c15b59575afe531d66abc7201 Author: Jiapeng Chong Date: Tue Nov 8 22:09:51 2022 +0100 x86: Fix misc small issues Fix: ./arch/x86/kernel/traps.c: asm/proto.h is included more than once. ./arch/x86/kernel/alternative.c:1610:2-3: Unneeded semicolon. [ bp: Merge into a single patch. ] Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/1620902768-53822-1-git-send-email-jiapeng.chong@linux.alibaba.com Link: https://lore.kernel.org/r/20220926054628.116957-1-jiapeng.chong@linux.alibaba.com arch/x86/kernel/alternative.c | 2 +- arch/x86/kernel/traps.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2f89fbc94bce85b4253358bf6554d9d6fc36825f Author: Linus Walleij Date: Tue Nov 8 21:18:42 2022 +0100 ARM: ux500: Drop unused register file This file with all base addresses and offsets is not used anymore, everything is looked up from the device tree. Delete it. Signed-off-by: Linus Walleij arch/arm/mach-ux500/cpu-db8500.c | 1 - arch/arm/mach-ux500/db8500-regs.h | 195 -------------------------------------- arch/arm/mach-ux500/platsmp.c | 2 - arch/arm/mach-ux500/pm.c | 2 - 4 files changed, 200 deletions(-) commit 65b0e307a1a9193571db12910f382f84195a3d29 Author: Jason A. Donenfeld Date: Tue Nov 8 13:37:55 2022 +0100 ARM: ux500: do not directly dereference __iomem Sparse reports that calling add_device_randomness() on `uid` is a violation of address spaces. And indeed the next usage uses readl() properly, but that was left out when passing it toadd_device_ randomness(). So instead copy the whole thing to the stack first. Fixes: 4040d10a3d44 ("ARM: ux500: add DB serial number to entropy pool") Cc: Linus Walleij Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/202210230819.loF90KDh-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Jason A. Donenfeld Link: https://lore.kernel.org/r/20221108123755.207438-1-Jason@zx2c4.com Signed-off-by: Linus Walleij drivers/soc/ux500/ux500-soc-id.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 1a0257c352638916fdaffaac2ddedb8e049312f3 Author: Luben Tuikov Date: Thu Oct 27 02:09:57 2022 -0400 MAINTAINERS: Update GPU Scheduler email Update GPU Scheduler maintainer email. Cc: Alex Deucher Cc: Christian König Cc: Daniel Vetter Cc: Dave Airlie Cc: AMD Graphics Cc: Direct Rendering Infrastructure - Development Signed-off-by: Luben Tuikov Acked-by: Christian König Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/508985/ MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 404ec60438add1afadaffaed34bb5fe4ddcadd40 Author: Rafael J. Wysocki Date: Mon Nov 7 18:42:36 2022 +0100 ACPICA: Fix error code path in acpi_ds_call_control_method() A use-after-free in acpi_ps_parse_aml() after a failing invocaion of acpi_ds_call_control_method() is reported by KASAN [1] and code inspection reveals that next_walk_state pushed to the thread by acpi_ds_create_walk_state() is freed on errors, but it is not popped from the thread beforehand. Thus acpi_ds_get_current_walk_state() called by acpi_ps_parse_aml() subsequently returns it as the new walk state which is incorrect. To address this, make acpi_ds_call_control_method() call acpi_ds_pop_walk_state() to pop next_walk_state from the thread before returning an error. Link: https://lore.kernel.org/linux-acpi/20221019073443.248215-1-chenzhongjin@huawei.com/ # [1] Reported-by: Chen Zhongjin Signed-off-by: Rafael J. Wysocki Reviewed-by: Chen Zhongjin drivers/acpi/acpica/dsmethod.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2b6bab68917223e8ca52573de1132ab137ebc928 Author: Bob Moore Date: Thu Oct 27 09:32:53 2022 -0700 ACPICA: Update version to 20221020 ACPICA commit 28fc163aa29e208678d901d98bb9030b775521b3 Version 20221020. Link: https://github.com/acpica/acpica/commit/28fc163a Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 775af207464bd28a2086f8399c0b2a3f1f40c7ae Author: Alexander Aring Date: Thu Oct 27 16:45:27 2022 -0400 fs: dlm: use WARN_ON_ONCE() instead of WARN_ON() To not get the console spammed about WARN_ON() of invalid states in the dlm midcomms hot path handling we switch to WARN_ON_ONCE() to get it only once that there might be an issue with the midcomms state handling. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/midcomms.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 3e54c9e80e68b765d8877023d93f1eea1b9d1c54 Author: Alexander Aring Date: Thu Oct 27 16:45:26 2022 -0400 fs: dlm: fix log of lowcomms vs midcomms This patch will fix a small issue when printing out that dlm_midcomms_start() failed to start and it was printing out that the dlm subcomponent lowcomms was failed but lowcomms is behind the midcomms layer. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lockspace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c693d76abb3956433a28994924046abf1a73ef4 Author: Alexander Aring Date: Thu Oct 27 16:45:25 2022 -0400 fs: dlm: catch dlm_add_member() error This patch will catch a possible dlm_add_member() and delivers it to the dlm recovery handling. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/member.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 194a3fb488f2760eda67c3ab0ce3a095e8006d72 Author: Alexander Aring Date: Thu Oct 27 16:45:24 2022 -0400 fs: dlm: relax sending to allow receiving This patch drops additionally the sock_mutex when there is a sending message burst. Since we have acknowledge handling we free sending buffers only when we receive an ack back, but if we are stuck in send_to_sock() looping because dlm sends a lot of messages and we never leave the loop the sending buffer fill up very quickly. We can't receive during this iteration because the sock_mutex is held. This patch will unlock the sock_mutex so it should be possible to receive messages when a burst of sending messages happens. This will allow to free up memory because acks which are already received can be processed. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 3872f87b09e2f274ecf477895f9d1f9b9bdcf04b Author: Alexander Aring Date: Thu Oct 27 16:45:23 2022 -0400 fs: dlm: remove ls_remove_wait waitqueue This patch removes the ls_remove_wait waitqueue handling. The current handling tries to wait before a lookup is send out for a identically resource name which is going to be removed. Hereby the remove message should be send out before the new lookup message. The reason is that after a lookup request and response will actually use the specific remote rsb. A followed remove message would delete the rsb on the remote side but it's still being used. To reach a similar behaviour we simple send the remove message out while the rsb lookup lock is held and the rsb is removed from the toss list. Other find_rsb() calls would never have the change to get a rsb back to live while a remove message will be send out (without holding the lock). This behaviour requires a non-sleepable context which should be provided now and might be the reason why it was not implemented so in the first place. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/dlm_internal.h | 4 ---- fs/dlm/lock.c | 56 ++------------------------------------------------- fs/dlm/lockspace.c | 3 --- 3 files changed, 2 insertions(+), 61 deletions(-) commit e1711fe3fd59fa1e34e02add2e9c188441c12021 Author: Alexander Aring Date: Thu Oct 27 16:45:22 2022 -0400 fs: dlm: allow different allocation context per _create_message This patch allows to give the use control about the allocation context based on a per message basis. Currently all messages forced to be created under GFP_NOFS context. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lock.c | 31 +++++++++++++++++++------------ fs/dlm/memory.c | 4 ++-- fs/dlm/memory.h | 2 +- fs/dlm/midcomms.c | 2 +- 4 files changed, 23 insertions(+), 16 deletions(-) commit 61bed0baa4dba17dd06cdfe20481a580718d6c7c Author: Alexander Aring Date: Thu Oct 27 16:45:21 2022 -0400 fs: dlm: use a non-static queue for callbacks This patch will introducde a queue implementation for callbacks by using the Linux lists. The current callback queue handling is implemented by a static limit of 6 entries, see DLM_CALLBACKS_SIZE. The sequence number inside the callback structure was used to see if the entries inside the static entry is valid or not. We don't need any sequence numbers anymore with a dynamic datastructure with grows and shrinks during runtime to offer such functionality. We assume that every callback will be delivered to the DLM user if once queued. Therefore the callback flag DLM_CB_SKIP was dropped and the check for skipping bast was moved before worker handling and not skip while the callback worker executes. This will reduce unnecessary queues of the callback worker. All last callback saves are pointers now and don't need to copied over. There is a reference counter for callback structures which will care about to free the callback structures at the right time if they are not referenced anymore. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/ast.c | 294 +++++++++++++++++++++----------------------------- fs/dlm/ast.h | 17 ++- fs/dlm/debug_fs.c | 2 +- fs/dlm/dlm_internal.h | 15 +-- fs/dlm/lock.c | 8 +- fs/dlm/memory.c | 26 +++++ fs/dlm/memory.h | 2 + fs/dlm/user.c | 73 +++++++------ fs/dlm/user.h | 2 +- 9 files changed, 222 insertions(+), 217 deletions(-) commit 27d3994ebb5cea9c26f52064a3da8b0e606a8d11 Author: Alexander Aring Date: Thu Oct 27 16:45:20 2022 -0400 fs: dlm: move last cast bast time to function call This patch moves the debugging information of the last cast and bast time when calling the last and bast function call. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/ast.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 92e95733307e7b6dd352c12fa174089ed51e7208 Author: Alexander Aring Date: Thu Oct 27 16:45:19 2022 -0400 fs: dlm: use spin lock instead of mutex There is no need to use a mutex in those hot path sections. We change it to spin lock to serve callbacks more faster by not allowing schedule. The locked sections will not be locked for a long time. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/ast.c | 8 ++++---- fs/dlm/dlm_internal.h | 2 +- fs/dlm/lock.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit a4c0352bb1094cbe242f4458e267de845790737a Author: Alexander Aring Date: Thu Oct 27 16:45:18 2022 -0400 fs: dlm: convert ls_cb_mutex mutex to spinlock This patch converts the ls_cb_mutex mutex to a spinlock, there is no sleepable context when this lock is held. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/ast.c | 12 ++++++------ fs/dlm/dlm_internal.h | 2 +- fs/dlm/lockspace.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit d3e4dc5d68c8fef719291cc9f3dc907aac494c55 Author: Alexander Aring Date: Thu Oct 27 16:45:17 2022 -0400 fs: dlm: use list_first_entry marco Instead of using list_entry() this patch moves to using the list_first_entry() macro. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85839f27b17ddebe21d36a174050420783824ed3 Author: Alexander Aring Date: Thu Oct 27 16:45:16 2022 -0400 fs: dlm: let dlm_add_cb queue work after resume only We should allow dlm_add_cb() to call queue_work() only after the recovery queued pending for delayed lkbs. This patch will move the switch LSFL_CB_DELAY after the delayed lkb work was processed. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/ast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e01c4b7bd41522ae0299c07e2ee8c721fee02595 Author: Alexander Aring Date: Thu Oct 27 16:45:15 2022 -0400 fd: dlm: trace send/recv of dlm message and rcom This patch adds tracepoints for send and recv cases of dlm messages and dlm rcom messages. In case of send and dlm message we add the dlm rsb resource name this dlm messages belongs to. This has the advantage to follow dlm messages on a per lock basis. In case of recv message the resource name can be extracted by follow the send message sequence number. The dlm message DLM_MSG_PURGE doesn't belong to a lock request and will not set the resource name in a dlm_message trace. The same for all rcom messages. There is additional handling required for this debugging functionality which is tried to be small as possible. Also the midcomms layer gets aware of lock resource names, for now this is required to make a connection between sequence number and lock resource names. It is for debugging purpose only. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lock.c | 21 ++-- fs/dlm/midcomms.c | 45 ++++++- fs/dlm/midcomms.h | 3 +- fs/dlm/rcom.c | 4 +- include/trace/events/dlm.h | 297 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 353 insertions(+), 17 deletions(-) commit 5b787667e87a373a2f8f70e6be2b5d99c408462f Author: Alexander Aring Date: Thu Oct 27 16:45:14 2022 -0400 fs: dlm: use packet in dlm_mhandle To allow more than just dereferencing the inner header we directly point to the inner dlm packet which allows us to dereference the header, rcom or message structure. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/midcomms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 57a5724ef0b332eb6e78250157910a006b01bf6e Author: Alexander Aring Date: Thu Oct 27 16:45:13 2022 -0400 fs: dlm: remove send repeat remove handling This patch removes the send repeat remove handling. This handling is there to repeatingly DLM_MSG_REMOVE messages in cases the dlm stack thinks it was not received at the first time. In cases of message drops this functionality is necessary, but since the DLM midcomms layer guarantees there are no messages drops between cluster nodes this feature became not strict necessary anymore. Due message delays/processing it could be that two send_repeat_remove() are sent out while the other should be still on it's way. We remove the repeat remove handling because we are sure that the message cannot be dropped due communication errors. Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lock.c | 74 ----------------------------------------------------------- 1 file changed, 74 deletions(-) commit f0f4bb431bd543ed7bebbaea3ce326cfcd5388bc Author: Alexander Aring Date: Thu Oct 27 16:45:12 2022 -0400 fs: dlm: retry accept() until -EAGAIN or error returns This patch fixes a race if we get two times an socket data ready event while the listen connection worker is queued. Currently it will be served only once but we need to do it (in this case twice) until we hit -EAGAIN which tells us there is no pending accept going on. This patch wraps an do while loop until we receive a return value which is different than 0 as it was done before commit d11ccd451b65 ("fs: dlm: listen socket out of connection hash"). Cc: stable@vger.kernel.org Fixes: d11ccd451b65 ("fs: dlm: listen socket out of connection hash") Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 08ae0547e75ec3d062b6b6b9cf4830c730df68df Author: Alexander Aring Date: Thu Oct 27 16:45:11 2022 -0400 fs: dlm: fix sock release if listen fails This patch fixes a double sock_release() call when the listen() is called for the dlm lowcomms listen socket. The caller of dlm_listen_for_all should never care about releasing the socket if dlm_listen_for_all() fails, it's done now only once if listen() fails. Cc: stable@vger.kernel.org Fixes: 2dc6b1158c28 ("fs: dlm: introduce generic listen") Signed-off-by: Alexander Aring Signed-off-by: David Teigland fs/dlm/lowcomms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8abfff25b3e2c8f51049295f86dd257492ac1969 Merge: 4b21d25bf519 000f8870a47b Author: Kees Cook Date: Tue Nov 8 10:58:57 2022 -0800 Merge branch 'for-linus/hardening' into for-next/hardening commit d96d0f9617793b6cd95b9b9a8fef66f69f8f6b1b Author: Paulo Miguel Almeida Date: Wed Oct 12 09:23:14 2022 +1300 dlm: replace one-element array with fixed size array One-element arrays are deprecated. So, replace one-element array with fixed size array member in struct dlm_ls, and refactor the rest of the code, accordingly. Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/228 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 Link: https://lore.kernel.org/lkml/Y0W5jkiXUkpNl4ap@mail.google.com/ Signed-off-by: Paulo Miguel Almeida Reviewed-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: David Teigland fs/dlm/dlm_internal.h | 2 +- fs/dlm/lockspace.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ee3f54cf6ea8f7032946689de1cafc1c467f6d11 Author: Tinghan Shen Date: Thu Nov 3 10:56:56 2022 +0800 arm64: dts: mt8195: Add venc node Add venc node for mt8195 SoC. Signed-off-by: Irui Wang Signed-off-by: Tinghan Shen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221103025656.8714-4-tinghan.shen@mediatek.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8195.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 70ccc7c0667ba8a39dab274b3836b063a6b4ecf9 Author: Li Huafei Date: Tue Oct 18 13:57:02 2022 +0100 ARM: 9258/1: stacktrace: Make stack walk callback consistent with generic code As with the generic arch_stack_walk() code the ARM stack walk code takes a callback that is called per stack frame. Currently the ARM code always passes a struct stackframe to the callback and the generic code just passes the pc, however none of the users ever reference anything in the struct other than the pc value. The ARM code also uses a return type of int while the generic code uses a return type of bool though in both cases the return value is a boolean value and the sense is inverted between the two. In order to reduce code duplication when ARM is converted to use arch_stack_walk() change the signature and return sense of the ARM specific callback to match that of the generic code. Signed-off-by: Li Huafei Reviewed-by: Mark Brown Reviewed-by: Linus Waleij Signed-off-by: Russell King (Oracle) arch/arm/include/asm/stacktrace.h | 2 +- arch/arm/kernel/perf_callchain.c | 9 ++++----- arch/arm/kernel/return_address.c | 8 ++++---- arch/arm/kernel/stacktrace.c | 13 ++++++------- 4 files changed, 15 insertions(+), 17 deletions(-) commit 1d2e9b67b001f8c0d10138797b9df4779609c03c Author: Nick Desaulniers Date: Mon Oct 24 20:46:05 2022 +0100 ARM: 9265/1: pass -march= only to compiler When both -march= and -Wa,-march= are specified for assembler or assembler-with-cpp sources, GCC and Clang will prefer the -Wa,-march= value but Clang will warn that -march= is unused. warning: argument unused during compilation: '-march=armv6k' [-Wunused-command-line-argument] This is the top group of warnings we observe when using clang to assemble the kernel via `ARCH=arm make LLVM=1`. Split the arch-y make variable into two, so that -march= flags only get passed to the compiler, not the assembler. -D flags are added to KBUILD_CPPFLAGS which is used for both C and assembler-with-cpp sources. Clang is trying to warn that it doesn't support different values for -march= and -Wa,-march= (like GCC does, but the kernel doesn't need this) though the value of the preprocessor define __thumb2__ is based on -march=. Make sure to re-set __thumb2__ via -D flag for assembler sources now that we're no longer passing -march= to the assembler. Set it to a different value than the preprocessor would for -march= in case -march= gets accidentally re-added to KBUILD_AFLAGS in the future. Thanks to Ard and Nathan for this suggestion. Link: https://github.com/ClangBuiltLinux/linux/issues/1315 Link: https://github.com/ClangBuiltLinux/linux/issues/1587 Link: https://github.com/llvm/llvm-project/issues/55656 Suggested-by: Ard Biesheuvel Suggested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Russell King (Oracle) arch/arm/Makefile | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit 26b12e084bce78f339bf9069ff25e0128313d9bc Author: Nick Desaulniers Date: Mon Oct 24 20:45:17 2022 +0100 ARM: 9264/1: only use -mtp=cp15 for the compiler Avoids an error from the assembler for CONFIG_THUMB2 kernels: clang-15: error: hardware TLS register is not supported for the thumbv4t sub-architecture This flag only makes sense to pass to the compiler, not the assembler. Perhaps CFLAGS_ABI can be renamed to CPPFLAGS_ABI to reflect that they will be passed to both the compiler and assembler for sources that require pre-processing. Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Russell King (Oracle) arch/arm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2faac39866d0313f3ca59c36a9f4e077faf4f53 Author: Nick Desaulniers Date: Mon Oct 24 20:44:41 2022 +0100 ARM: 9263/1: use .arch directives instead of assembler command line flags Similar to commit a6c30873ee4a ("ARM: 8989/1: use .fpu assembler directives instead of assembler arguments"). GCC and GNU binutils support setting the "sub arch" via -march=, -Wa,-march, target function attribute, and .arch assembler directive. Clang was missing support for -Wa,-march=, but this was implemented in clang-13. The behavior of both GCC and Clang is to prefer -Wa,-march= over -march= for assembler and assembler-with-cpp sources, but Clang will warn about the -march= being unused. clang: warning: argument unused during compilation: '-march=armv6k' [-Wunused-command-line-argument] Since most assembler is non-conditionally assembled with one sub arch (modulo arch/arm/delay-loop.S which conditionally is assembled as armv4 based on CONFIG_ARCH_RPC, and arch/arm/mach-at91/pm-suspend.S which is conditionally assembled as armv7-a based on CONFIG_CPU_V7), prefer the .arch assembler directive. Add a few more instances found in compile testing as found by Arnd and Nathan. Link: https://github.com/llvm/llvm-project/commit/1d51c699b9e2ebc5bcfdbe85c74cc871426333d4 Link: https://bugs.llvm.org/show_bug.cgi?id=48894 Link: https://github.com/ClangBuiltLinux/linux/issues/1195 Link: https://github.com/ClangBuiltLinux/linux/issues/1315 Suggested-by: Arnd Bergmann Suggested-by: Nathan Chancellor Signed-off-by: Arnd Bergmann Tested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Russell King (Oracle) arch/arm/boot/compressed/Makefile | 1 - arch/arm/common/Makefile | 2 -- arch/arm/common/mcpm_head.S | 2 ++ arch/arm/common/vlock.S | 2 ++ arch/arm/kernel/Makefile | 2 -- arch/arm/kernel/hyp-stub.S | 2 ++ arch/arm/kernel/swp_emulate.c | 1 + arch/arm/lib/Makefile | 4 ---- arch/arm/lib/delay-loop.S | 4 ++++ arch/arm/mach-at91/Makefile | 3 --- arch/arm/mach-at91/pm_suspend.S | 4 ++++ arch/arm/mach-imx/Makefile | 3 --- arch/arm/mach-imx/headsmp.S | 2 ++ arch/arm/mach-imx/resume-imx6.S | 2 ++ arch/arm/mach-imx/suspend-imx6.S | 2 ++ arch/arm/mach-mvebu/Makefile | 3 --- arch/arm/mach-mvebu/coherency_ll.S | 1 + arch/arm/mach-mvebu/pmsu.c | 1 + arch/arm/mach-npcm/Makefile | 2 -- arch/arm/mach-npcm/headsmp.S | 2 ++ arch/arm/mach-tegra/Makefile | 2 -- arch/arm/mach-tegra/reset-handler.S | 2 ++ arch/arm/mach-tegra/sleep-tegra20.S | 2 ++ arch/arm/mach-tegra/sleep-tegra30.S | 2 ++ arch/arm/mach-tegra/sleep.S | 2 ++ arch/arm/mm/Makefile | 15 --------------- arch/arm/mm/abort-ev6.S | 1 + arch/arm/mm/abort-ev7.S | 1 + arch/arm/mm/cache-v6.S | 2 ++ arch/arm/mm/cache-v7.S | 2 ++ arch/arm/mm/cache-v7m.S | 2 ++ arch/arm/mm/copypage-feroceon.c | 1 + arch/arm/mm/proc-v6.S | 2 ++ arch/arm/mm/proc-v7-2level.S | 2 ++ arch/arm/mm/proc-v7.S | 2 ++ arch/arm/mm/tlb-v6.S | 2 ++ arch/arm/mm/tlb-v7.S | 2 ++ drivers/memory/Makefile | 2 -- drivers/memory/ti-emif-sram-pm.S | 1 + drivers/soc/bcm/brcmstb/pm/Makefile | 1 - drivers/soc/bcm/brcmstb/pm/s2-arm.S | 1 + 41 files changed, 54 insertions(+), 40 deletions(-) commit c4f8593955cde03d48ed33face58c09d980a32e3 Author: Frank Wunderlich Date: Tue Oct 25 15:29:52 2022 +0200 arm64: dts: mt7622: drop r_smpl property from mmc node This property is not defined in binding and driver. Fixes: 2c002a3049f7 ("arm64: dts: mt7622: add mmc related device nodes") Fixes: 0b6286dd96c0 ("arm64: dts: mt7622: add bananapi BPI-R64 board") Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221025132953.81286-6-linux@fw-web.de Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 1 - arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 1 - 2 files changed, 2 deletions(-) commit d76c99057815b07742448c1b4b6d7cfc833536a2 Author: Frank Wunderlich Date: Tue Oct 25 15:29:51 2022 +0200 arm64: dts: mt8183: drop drv-type from mmc-node This property is not defined in binding and driver. Fixes: cd894e274b74 ("arm64: dts: mt8183: Add krane-sku176 board") Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221025132953.81286-5-linux@fw-web.de Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 1 - 1 file changed, 1 deletion(-) commit b747fa226910179a1b78818f97358b788f5cb532 Author: Frank Wunderlich Date: Tue Oct 25 15:29:50 2022 +0200 arm64: dts: mediatek: mt2712e: swap last 2 clocks to match binding First 3 clocks for mt2712 need to be "source", "hclk", "source_cg" so swap last 2 of mmc0 to match the binding. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221025132953.81286-4-linux@fw-web.de Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e6c7e6216dc628ab7c627a6bcda7349715bbb67e Author: Xinlei Lee Date: Tue Nov 8 19:23:27 2022 +0100 soc: mediatek: Add all settings to mtk_mmsys_ddp_dpi_fmt_config func The difference between MT8186 and other ICs is that when modifying the output format, we need to modify the mmsys_base+0x400 register to take effect. So when setting the dpi output format, we need to call mtk_mmsys_ddp_dpi_fmt_config to set it to MT8186 synchronously. Commit a071e52f75d1 ("soc: mediatek: Add mmsys func to adapt to dpi output for MT8186") lacked some of the possible output formats and also had a wrong bitmask. Add the missing output formats and fix the bitmask. While at it, also update mtk_mmsys_ddp_dpi_fmt_config() to use generic formats, so that it is slightly easier to extend for other platforms. Fixes: a071e52f75d1 ("soc: mediatek: Add mmsys func to adapt to dpi output for MT8186") Signed-off-by: Xinlei Lee Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Reviewed-by: Nícolas F. R. A. Prado Signed-off-by: Matthias Brugger drivers/soc/mediatek/mt8186-mmsys.h | 8 +++++--- drivers/soc/mediatek/mtk-mmsys.c | 27 +++++++++++++++++++++------ include/linux/soc/mediatek/mtk-mmsys.h | 7 +++++++ 3 files changed, 33 insertions(+), 9 deletions(-) commit c14f7ccc9f5dcf9d06ddeec706f85405b2c80600 Author: Pali Rohár Date: Thu Jul 14 20:41:30 2022 +0200 PCI: Assign PCI domain IDs by ida_alloc() Replace assignment of PCI domain IDs from atomic_inc_return() to ida_alloc(). Use two IDAs, one for static domain allocations (those which are defined in device tree) and second for dynamic allocations (all other). During removal of root bus / host bridge, also release the domain ID. The released ID can be reused again, for example when dynamically loading and unloading native PCI host bridge drivers. This change also allows to mix static device tree assignment and dynamic by kernel as all static allocations are reserved in dynamic pool. [bhelgaas: set "err" if "bus->domain_nr < 0"] Link: https://lore.kernel.org/r/20220714184130.5436-1-pali@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 103 ++++++++++++++++++++++++++++++--------------------- drivers/pci/probe.c | 7 ++++ drivers/pci/remove.c | 6 +++ include/linux/pci.h | 1 + 4 files changed, 74 insertions(+), 43 deletions(-) commit db962d0d4593cf2aa36881786ac039f1ad3a5f3f Author: Yassine Oudjana Date: Fri Oct 28 18:34:53 2022 +0300 arm64: dts: mediatek: mt6779: Remove syscon compatible from pin controller Remove syscon compatible string from pin controller to follow DT bindings and pass checks. Adding the syscon compatible to the DT bindings documentation instead causes a different check error due to the syscon document specifying a maximum of 1 item in the reg property, while this has 9. This pin controller has never been, and will never be, used as a syscon, hence it is safe to drop this compatible. Signed-off-by: Yassine Oudjana Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20221028153505.23741-2-y.oudjana@protonmail.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt6779.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30d95efe06e18bd55691902bb4ec873e4b21a754 Author: David Howells Date: Fri Nov 4 23:13:40 2022 +0000 rxrpc: Allocate an skcipher each time needed rather than reusing In the rxkad security class, allocate the skcipher used to do packet encryption and decription rather than allocating one up front and reusing it for each packet. Reusing the skcipher precludes doing crypto in parallel. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 2 -- net/rxrpc/rxkad.c | 52 ++++++++++++++++++++++++++----------------------- 2 files changed, 28 insertions(+), 26 deletions(-) commit 1fc4fa2ac93dcf3542f2dc6f7ff88fb022da5116 Author: David Howells Date: Mon Oct 3 18:49:11 2022 +0100 rxrpc: Fix congestion management rxrpc has a problem in its congestion management in that it saves the congestion window size (cwnd) from one call to another, but if this is 0 at the time is saved, then the next call may not actually manage to ever transmit anything. To this end: (1) Don't save cwnd between calls, but rather reset back down to the initial cwnd and re-enter slow-start if data transmission is idle for more than an RTT. (2) Preserve ssthresh instead, as that is a handy estimate of pipe capacity. Knowing roughly when to stop slow start and enter congestion avoidance can reduce the tendency to overshoot and drop larger amounts of packets when probing. In future, cwind growth also needs to be constrained when the window isn't being filled due to being application limited. Reported-by: Simon Wilkinson cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 1 + net/rxrpc/ar-internal.h | 9 +++++---- net/rxrpc/call_accept.c | 3 ++- net/rxrpc/call_object.c | 7 ++++++- net/rxrpc/conn_client.c | 3 ++- net/rxrpc/conn_object.c | 2 +- net/rxrpc/input.c | 21 ++++++++++++++++++++- net/rxrpc/output.c | 1 + net/rxrpc/peer_object.c | 7 +------ net/rxrpc/proc.c | 4 ++-- net/rxrpc/sendmsg.c | 22 +++++++++++++++++++--- 11 files changed, 60 insertions(+), 20 deletions(-) commit 6869ddb87d475bde2da0dbd4d71270996d65cd47 Author: David Howells Date: Wed Jun 15 14:49:26 2022 +0100 rxrpc: Remove the rxtx ring The Rx/Tx ring is no longer used, so remove it. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 15 --------------- net/rxrpc/call_object.c | 24 ------------------------ 2 files changed, 39 deletions(-) commit d57a3a151660902091491ac2633134e1be92557f Author: David Howells Date: Sat May 7 10:06:13 2022 +0100 rxrpc: Save last ACK's SACK table rather than marking txbufs Improve the tracking of which packets need to be transmitted by saving the last ACK packet that we receive that has a populated soft-ACK table rather than marking packets. Then we can step through the soft-ACK table and look at the packets we've transmitted beyond that to determine which packets we might want to retransmit. We also look at the highest serial number that has been acked to try and guess which packets we've transmitted the peer is likely to have seen. If necessary, we send a ping to retrieve that number. One downside that might be a problem is that we can't then compare the previous acked/unacked state so easily in rxrpc_input_soft_acks() - which is a potential problem for the slow-start algorithm. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 7 +- net/core/skbuff.c | 1 + net/rxrpc/ar-internal.h | 12 ++-- net/rxrpc/call_event.c | 117 ++++++++++++++++++++++++------ net/rxrpc/call_object.c | 2 + net/rxrpc/input.c | 164 ++++++++++++++++++++----------------------- net/rxrpc/sendmsg.c | 1 - 7 files changed, 185 insertions(+), 119 deletions(-) commit 4e76bd406d6e9208ea558953862a47524829688c Author: David Howells Date: Fri May 6 16:13:13 2022 +0100 rxrpc: Remove call->lock call->lock is no longer necessary, so remove it. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 1 - net/rxrpc/call_event.c | 22 ++-------------------- net/rxrpc/call_object.c | 3 --- net/rxrpc/input.c | 3 --- net/rxrpc/output.c | 6 +----- 5 files changed, 3 insertions(+), 32 deletions(-) commit a4ea4c47761943d90cd5d1688b3c3c65922ff2b1 Author: David Howells Date: Thu Mar 31 23:55:08 2022 +0100 rxrpc: Don't use a ring buffer for call Tx queue Change the way the Tx queueing works to make the following ends easier to achieve: (1) The filling of packets, the encryption of packets and the transmission of packets can be handled in parallel by separate threads, rather than rxrpc_sendmsg() allocating, filling, encrypting and transmitting each packet before moving onto the next one. (2) Get rid of the fixed-size ring which sets a hard limit on the number of packets that can be retained in the ring. This allows the number of packets to increase without having to allocate a very large ring or having variable-sized rings. [Note: the downside of this is that it's then less efficient to locate a packet for retransmission as we then have to step through a list and examine each buffer in the list.] (3) Allow the filler/encrypter to run ahead of the transmission window. (4) Make it easier to do zero copy UDP from the packet buffers. (5) Make it easier to do zero copy from userspace to the packet buffers - and thence to UDP (only if for unauthenticated connections). To that end, the following changes are made: (1) Use the new rxrpc_txbuf struct instead of sk_buff for keeping packets to be transmitted in. This allows them to be placed on multiple queues simultaneously. An sk_buff isn't really necessary as it's never passed on to lower-level networking code. (2) Keep the transmissable packets in a linked list on the call struct rather than in a ring. As a consequence, the annotation buffer isn't used either; rather a flag is set on the packet to indicate ackedness. (3) Use the RXRPC_CALL_TX_LAST flag to indicate that the last packet to be transmitted has been queued. Add RXRPC_CALL_TX_ALL_ACKED to indicate that all packets up to and including the last got hard acked. (4) Wire headers are now stored in the txbuf rather than being concocted on the stack and they're stored immediately before the data, thereby allowing zerocopy of a single span. (5) Don't bother with instant-resend on transmission failure; rather, leave it for a timer or an ACK packet to trigger. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 78 +++++++++--------- net/rxrpc/af_rxrpc.c | 5 +- net/rxrpc/ar-internal.h | 31 +++---- net/rxrpc/call_event.c | 111 +++++++++---------------- net/rxrpc/call_object.c | 15 +++- net/rxrpc/input.c | 145 ++++++++++++++------------------- net/rxrpc/insecure.c | 3 +- net/rxrpc/output.c | 89 +++++++++----------- net/rxrpc/proc.c | 9 +-- net/rxrpc/rxkad.c | 102 +++++++++-------------- net/rxrpc/sendmsg.c | 188 +++++++++++++++++-------------------------- net/rxrpc/txbuf.c | 34 ++++++++ 12 files changed, 349 insertions(+), 461 deletions(-) commit 5d7edbc9231ec6b60f9c5b7e7980e9a1cd92e6bb Author: David Howells Date: Sat Aug 27 14:27:56 2022 +0100 rxrpc: Get rid of the Rx ring Get rid of the Rx ring and replace it with a pair of queues instead. One queue gets the packets that are in-sequence and are ready for processing by recvmsg(); the other queue gets the out-of-sequence packets for addition to the first queue as the holes get filled. The annotation ring is removed and replaced with a SACK table. The SACK table has the bits set that correspond exactly to the sequence number of the packet being acked. The SACK ring is copied when an ACK packet is being assembled and rotated so that the first ACK is in byte 0. Flow control handling is altered so that packets that are moved to the in-sequence queue are hard-ACK'd even before they're consumed - and then the Rx window size in the ACK packet (rsize) is shrunk down to compensate (even going to 0 if the window is full). Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 19 ++-- net/rxrpc/ar-internal.h | 29 +++--- net/rxrpc/call_object.c | 7 +- net/rxrpc/conn_object.c | 2 +- net/rxrpc/input.c | 213 ++++++++++++++++++++++++++----------------- net/rxrpc/misc.c | 5 +- net/rxrpc/output.c | 95 +++++++++++-------- net/rxrpc/proc.c | 7 +- net/rxrpc/recvmsg.c | 117 ++++++++++++------------ net/rxrpc/rxkad.c | 1 - net/rxrpc/sysctl.c | 2 +- 11 files changed, 290 insertions(+), 207 deletions(-) commit d4d02d8bb5c412d977af7ea7c7ea91977a6a64dc Author: David Howells Date: Fri Oct 7 17:44:39 2022 +0100 rxrpc: Clone received jumbo subpackets and queue separately Split up received jumbo packets into separate skbuffs by cloning the original skbuff for each subpacket and setting the offset and length of the data in that subpacket in the skbuff's private data. The subpackets are then placed on the recvmsg queue separately. The security class then gets to revise the offset and length to remove its metadata. If we fail to clone a packet, we just drop it and let the peer resend it. The original packet gets used for the final subpacket. This should make it easier to handle parallel decryption of the subpackets. It also simplifies the handling of lost or misordered packets in the queuing/buffering loop as the possibility of overlapping jumbo packets no longer needs to be considered. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 12 +- net/rxrpc/ar-internal.h | 32 +--- net/rxrpc/input.c | 401 ++++++++++++++++++++----------------------- net/rxrpc/insecure.c | 13 +- net/rxrpc/output.c | 2 +- net/rxrpc/protocol.h | 2 +- net/rxrpc/recvmsg.c | 104 ++--------- net/rxrpc/rxkad.c | 96 +++-------- 8 files changed, 245 insertions(+), 417 deletions(-) commit faf92e8d53f5f03842da25af971a3f0ef88ffba2 Author: David Howells Date: Fri Oct 7 17:22:40 2022 +0100 rxrpc: Split the rxrpc_recvmsg tracepoint Split the rxrpc_recvmsg tracepoint so that the tracepoints that are about data packet processing (and which have extra pieces of information) are separate from the tracepoint that shows the general flow of recvmsg(). Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 24 ++++++++++++++++++++++++ net/rxrpc/recvmsg.c | 37 ++++++++++++++++++------------------- 2 files changed, 42 insertions(+), 19 deletions(-) commit 530403d9ba1c3f51c721a394f642e56309072295 Author: David Howells Date: Thu Jan 30 21:48:14 2020 +0000 rxrpc: Clean up ACK handling Clean up the rxrpc_propose_ACK() function. If deferred PING ACK proposal is split out, it's only really needed for deferred DELAY ACKs. All other ACKs, bar terminal IDLE ACK are sent immediately. The deferred IDLE ACK submission can be handled by conversion of a DELAY ACK into an IDLE ACK if there's nothing to be SACK'd. Also, because there's a delay between an ACK being generated and being transmitted, it's possible that other ACKs of the same type will be generated during that interval. Apart from the ACK time and the serial number responded to, most of the ACK body, including window and SACK parameters, are not filled out till the point of transmission - so we can avoid generating a new ACK if there's one pending that will cover the SACK data we need to convey. Therefore, don't propose a new DELAY or IDLE ACK for a call if there's one already pending. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 52 ++++++++++++++++-------- net/rxrpc/ar-internal.h | 10 ++--- net/rxrpc/call_event.c | 95 ++++++++++++-------------------------------- net/rxrpc/call_object.c | 2 +- net/rxrpc/input.c | 8 ++-- net/rxrpc/misc.c | 18 --------- net/rxrpc/output.c | 7 ++++ net/rxrpc/protocol.h | 7 ---- net/rxrpc/recvmsg.c | 14 +++---- net/rxrpc/sendmsg.c | 2 +- net/rxrpc/sysctl.c | 9 ----- 11 files changed, 86 insertions(+), 138 deletions(-) commit 72f0c6fb057971864fe4d42b289b8e6ede836ef1 Author: David Howells Date: Thu Jan 30 21:48:13 2020 +0000 rxrpc: Allocate ACK records at proposal and queue for transmission Allocate rxrpc_txbuf records for ACKs and put onto a queue for the transmitter thread to dispatch. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 47 ++++++++--- net/rxrpc/ar-internal.h | 21 +++-- net/rxrpc/call_accept.c | 5 +- net/rxrpc/call_event.c | 189 ++++++++++++++++++++++++------------------- net/rxrpc/input.c | 89 +++++++++----------- net/rxrpc/local_object.c | 7 ++ net/rxrpc/output.c | 157 +++++++++++++++++------------------ net/rxrpc/recvmsg.c | 33 +++----- net/rxrpc/sendmsg.c | 4 +- net/rxrpc/txbuf.c | 1 + 10 files changed, 285 insertions(+), 268 deletions(-) commit 02a1935640f8f8539b8f2dbd6eeb539de93b2ce4 Author: David Howells Date: Tue Apr 5 21:16:32 2022 +0100 rxrpc: Define rxrpc_txbuf struct to carry data to be transmitted Define a struct, rxrpc_txbuf, to carry data to be transmitted instead of a socket buffer so that it can be placed onto multiple queues at once. This also allows the data buffer to be in the same allocation as the internal data. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 45 +++++++++++++++++++ net/rxrpc/Makefile | 1 + net/rxrpc/ar-internal.h | 53 +++++++++++++++++++++++ net/rxrpc/proc.c | 3 +- net/rxrpc/txbuf.c | 100 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 201 insertions(+), 1 deletion(-) commit a11e6ff961a01884482b2a70ced74a5c62d96801 Author: David Howells Date: Fri Oct 7 14:46:08 2022 +0100 rxrpc: Remove call->tx_phase Remove call->tx_phase as it's only ever set. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 1 - net/rxrpc/call_object.c | 1 - net/rxrpc/input.c | 5 +---- net/rxrpc/recvmsg.c | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) commit 27f699ccb89d65165175525254fec3d9d6b8d500 Author: David Howells Date: Fri Oct 7 13:52:06 2022 +0100 rxrpc: Remove the flags from the rxrpc_skb tracepoint Remove the flags from the rxrpc_skb tracepoint as we're no longer going to be using this for the transmission buffers and so marking which are transmission buffers isn't going to be necessary. Note that this also remove the rxrpc skb flag that indicates if this is a transmission buffer and so the count is not updated for the moment. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 9 +++------ net/rxrpc/ar-internal.h | 1 - net/rxrpc/sendmsg.c | 1 - net/rxrpc/skbuff.c | 20 +++++++------------- 4 files changed, 10 insertions(+), 21 deletions(-) commit 23b237f3259299b75dd2ffefc7a4af889ba308c8 Author: David Howells Date: Thu Jan 23 21:36:21 2020 +0000 rxrpc: Remove unnecessary header inclusions Remove a bunch of unnecessary header inclusions. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/input.c | 14 -------------- 1 file changed, 14 deletions(-) commit ed472b0c8783e7e3896a8fb4382f2187aae427e1 Author: David Howells Date: Tue Mar 22 11:07:20 2022 +0000 rxrpc: Call udp_sendmsg() directly Call udp_sendmsg() and udpv6_sendmsg() directly rather than calling kernel_sendmsg() as the latter assumes we want a kvec-class iterator. However, zerocopy explicitly doesn't work with such an iterator. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/ipv6/udp.c | 1 + net/rxrpc/output.c | 37 +++++++++++++++++++++++++++---------- 2 files changed, 28 insertions(+), 10 deletions(-) commit b6c66c4324e7dd66a06a6a034204ae7d4e95c28c Author: David Howells Date: Wed Oct 12 09:51:12 2022 +0100 rxrpc: Use the core ICMP/ICMP6 parsers Make rxrpc_encap_rcv_err() pass the ICMP/ICMP6 skbuff to ip_icmp_error() or ipv6_icmp_error() as appropriate to do the parsing rather than trying to do it in rxrpc. This pushes an error report onto the UDP socket's error queue and calls ->sk_error_report() from which point rxrpc can pick it up. It would be preferable to steal the packet directly from ip*_icmp_error() rather than letting it get queued, but this is probably good enough. Also note that __udp4_lib_err() calls sk_error_report() twice in some cases. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 1 - net/rxrpc/local_object.c | 13 +++ net/rxrpc/peer_event.c | 245 ++++++----------------------------------------- 3 files changed, 42 insertions(+), 217 deletions(-) commit 42fb06b391ace2aec5cdb1ebb8ff668f0a34332f Author: David Howells Date: Wed Oct 12 08:49:29 2022 +0100 net: Change the udp encap_err_rcv to allow use of {ip,ipv6}_icmp_error() Change the udp encap_err_rcv signature to match ip_icmp_error() and ipv6_icmp_error() so that those can be used from the called function and export them. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org include/linux/udp.h | 3 +- include/net/udp_tunnel.h | 4 +-- net/ipv4/ip_sockglue.c | 1 + net/ipv4/udp.c | 3 +- net/ipv6/datagram.c | 1 + net/ipv6/udp.c | 3 +- net/rxrpc/ar-internal.h | 2 +- net/rxrpc/peer_event.c | 71 ++++++++++++------------------------------------ 8 files changed, 28 insertions(+), 60 deletions(-) commit 8889a711f9b4dcf4dd1330fa493081beebd118c9 Author: David Howells Date: Wed Sep 7 19:17:29 2022 +0100 rxrpc: Fix ack.bufferSize to be 0 when generating an ack ack.bufferSize should be set to 0 when generating an ack. Fixes: 8d94aa381dab ("rxrpc: Calls shouldn't hold socket refs") Reported-by: Jeffrey Altman Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7fa52421f76309c574f2575701660bc3ea3a705 Author: David Howells Date: Thu Aug 18 11:52:36 2022 +0100 rxrpc: Record stats for why the REQUEST-ACK flag is being set Record stats for why the REQUEST-ACK flag is being set. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 1 + net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/output.c | 1 + net/rxrpc/proc.c | 14 ++++++++++++++ 4 files changed, 18 insertions(+) commit f2a676d10038e8f3913dc576397b9c9efb190afd Author: David Howells Date: Wed May 11 14:01:25 2022 +0100 rxrpc: Record statistics about ACK types Record statistics about the different types of ACKs that have been transmitted and received and the number of ACKs that have been filled out and transmitted or that have been skipped. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 6 ++++++ net/rxrpc/call_event.c | 2 ++ net/rxrpc/input.c | 1 + net/rxrpc/output.c | 7 ++++++- net/rxrpc/proc.c | 33 +++++++++++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 1 deletion(-) commit b015424695f03a9fa5862d09c267ed458e256300 Author: David Howells Date: Wed May 11 14:01:25 2022 +0100 rxrpc: Add stats procfile and DATA packet stats Add a procfile, /proc/net/rxrpc/stats, to display some statistics about what rxrpc has been doing. Writing a blank line to the stats file will clear the increment-only counters. Allocated resource counters don't get cleared. Add some counters to count various things about DATA packets, including the number created, transmitted and retransmitted and the number received, the number of ACK-requests markings and the number of jumbo packets received. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 17 +++++++++++++++++ net/rxrpc/call_event.c | 1 + net/rxrpc/input.c | 6 ++++++ net/rxrpc/net_ns.c | 2 ++ net/rxrpc/output.c | 2 ++ net/rxrpc/proc.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/sendmsg.c | 2 ++ 7 files changed, 78 insertions(+) commit 589a0c1e0ac31ccba49b214762e444dc015ee1e2 Author: David Howells Date: Thu Apr 28 08:30:47 2022 +0100 rxrpc: Track highest acked serial Keep track of the highest DATA serial number that has been acked by the peer for future purposes. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org net/rxrpc/ar-internal.h | 1 + net/rxrpc/input.c | 4 ++++ 2 files changed, 5 insertions(+) commit 334dfbfc5a7187c99761df2392dd4cc49c453bea Author: David Howells Date: Fri Apr 22 00:20:49 2022 +0100 rxrpc: Split call timer-expiration from call timer-set tracepoint Split the tracepoint for call timer-set to separate out the call timer-expiration event Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 42 +++++++++++++++++++++++++++++++++++++++++- net/rxrpc/call_object.c | 2 +- 2 files changed, 42 insertions(+), 2 deletions(-) commit 4d843be56ba6a8c0e566afd58775742d9e721505 Author: David Howells Date: Tue Apr 5 21:48:48 2022 +0100 rxrpc: Trace setting of the request-ack flag Add a tracepoint to log why the request-ack flag is set on an outgoing DATA packet, allowing debugging as to why. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org include/trace/events/rxrpc.h | 36 ++++++++++++++++++++++++++++++++++++ net/rxrpc/output.c | 32 +++++++++++++++++++++++--------- 2 files changed, 59 insertions(+), 9 deletions(-) commit c3d96f690a790074b508fe183a41e36a00cd7ddd Author: David Howells Date: Mon Oct 3 07:34:21 2022 +0100 net, proc: Provide PROC_FS=n fallback for proc_create_net_single_write() Provide a CONFIG_PROC_FS=n fallback for proc_create_net_single_write(). Also provide a fallback for proc_create_net_data_write(). Fixes: 564def71765c ("proc: Add a way to make network proc files writable") Reported-by: kernel test robot Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org include/linux/proc_fs.h | 2 ++ 1 file changed, 2 insertions(+) commit 359c6649cd9ab3907bcaf20ed67b9646c94a7742 Author: Thomas Zimmermann Date: Tue Oct 25 12:17:37 2022 +0200 drm/gem: Implement shadow-plane {begin, end}_fb_access with vmap Move the vmap code for shadow-plane helpers from prepare_fb to begin_fb_access helpers. Vunmap is now performed at the end of the current pageflip, instead of the end of the following pageflip. Reduces the duration of the mapping from while the framebuffer is being displayed to just the atomic commit. This is safe as outside of the pageflip, nothing should access the mapped buffer memory. Unmapping the framebuffer BO memory early allows to reduce address- space consumption and possibly allows for evicting the memory pages. The change is effectively a rename of prepare_fb and cleanup_fb implementations, plus updates to the shadow-plane init macro. As there's no longer a prepare_fb helper for shadow planes, atomic helpers will call drm_gem_plane_helper_prepare_fb() automatically. v2: * fix typos in commit message (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221025101737.8874-3-tzimmermann@suse.de drivers/gpu/drm/drm_gem_atomic_helper.c | 47 +++++++++++++++------------------ include/drm/drm_gem_atomic_helper.h | 20 +++++++------- 2 files changed, 31 insertions(+), 36 deletions(-) commit 94d879eaf7fb02a0d022a190278b3fd45b1efbd7 Author: Thomas Zimmermann Date: Tue Oct 25 12:17:36 2022 +0200 drm/atomic-helper: Add {begin,end}_fb_access to plane helpers Add {begin,end}_fb_access helpers to run at the beginning and end of an atomic commit. The begin_fb_access helper acquires resources that are necessary to perform the atomic commit. It it similar to prepare_fb, except that the resources are to be released at the end of the commit. Resources acquired by prepare_fb are held until after the next pageflip. The end_fb_access helper performs the corresponding resource cleanup. Atomic helpers call it with the new plane state. This is different from cleanup_fb, which releases resources of the old plane state. v2: * fix typos in commit message (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221025101737.8874-2-tzimmermann@suse.de drivers/gpu/drm/drm_atomic_helper.c | 34 +++++++++++++++++++++++--- drivers/gpu/drm/drm_gem_atomic_helper.c | 19 +++++++-------- drivers/gpu/drm/drm_simple_kms_helper.c | 26 ++++++++++++++++++++ include/drm/drm_modeset_helper_vtables.h | 41 +++++++++++++++++++++++++++++++- include/drm/drm_simple_kms_helper.h | 20 ++++++++++++++++ 5 files changed, 126 insertions(+), 14 deletions(-) commit aaeca98456431a8d9382ecf48ac4843e252c07b3 Author: Mark Brown Date: Mon Nov 7 17:07:47 2022 +0000 arm64/fpsimd: Make kernel_neon_ API _GPL Currently for reasons lost in the mists of time the kernel_neon_ APIs are EXPORT_SYMBOL() but the general policy for floating point usage is that it should be GPL only given the non-standard runtime environment that holds while it is in use and PCS impacts when code is compiled for FP usage. Given the limited existing deployment of non-GPL modules for arm64 and the fact that other architectures like x86 already make their equivalent functions GPL only this is not expected to be disruptive to existing users. Suggested-by: Christoph Hellwig Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221107170747.276910-1-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a0fa0b63131b0d8f4eff22d5b66e796ecb064dfe Author: Kang Minchul Date: Sat Nov 5 16:31:43 2022 +0900 kselftest/arm64: fix array_size.cocci warning Use ARRAY_SIZE to fix the following coccicheck warnings: tools/testing/selftests/arm64/mte/check_buffer_fill.c:341:20-21: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_buffer_fill.c:35:20-21: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_buffer_fill.c:168:20-21: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_buffer_fill.c:72:20-21: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_buffer_fill.c:369:25-26: WARNING: Use ARRAY_SIZE Signed-off-by: Kang Minchul Link: https://lore.kernel.org/r/20221105073143.78521-1-tegongkang@gmail.com Signed-off-by: Will Deacon tools/testing/selftests/arm64/mte/check_buffer_fill.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d73406ed2dcfab7d25493ff3a62dd57f0d9c2bf2 Author: Heiner Kallweit Date: Sun Aug 14 23:25:31 2022 +0200 clk: meson: pll: add pcie lock retry workaround The PCIe PLL locking may be unreliable under some circumstance, such as high or low temperature. If the PLL fails to lock, reset it a try again. This helps on the S905X4 Signed-off-by: Heiner Kallweit [commit message amend] Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/cc80cda0-4dda-2e3e-3fc8-afa97717479b@gmail.com drivers/clk/meson/clk-pll.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 19648dddb14bdb722e83ab1dc8a54525c9846600 Author: Heiner Kallweit Date: Mon Aug 29 20:52:59 2022 +0200 clk: meson: pll: adjust timeout in meson_clk_pll_wait_lock() Currently we loop over meson_parm_read() up to 24mln times. This results in a unpredictable timeout period. In my case it's over 5s on a S905X4-based system. Make the timeout period predictable and set it to 100ms. Signed-off-by: Heiner Kallweit Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/a801afc0-a8f2-a0a4-0f2b-a7201351d563@gmail.com drivers/clk/meson/clk-pll.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9b283888a6d5d0e413fd9bf097fd74c27a9b9948 Author: Mark Brown Date: Wed Nov 2 14:05:43 2022 +0000 kselftest/arm64: Print ASCII version of unknown signal frame magic values The signal magic values are supposed to be allocated as somewhat meaningful ASCII so if we encounter a bad magic value print the any alphanumeric characters we find in it as well as the hex value to aid debuggability. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221102140543.98193-1-broonie@kernel.org Signed-off-by: Will Deacon .../selftests/arm64/signal/testcases/testcases.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 2004734fb3fe088873ad4c5276cc92ee956e640d Author: Mark Brown Date: Thu Oct 27 12:03:24 2022 +0100 kselftest/arm64: Remove validation of extra_context from TODO When fixing up support for extra_context in the signal handling tests I didn't notice that there is a TODO file in the directory which lists this as a thing to be done. Since it's been done remove it from the list. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221027110324.33802-1-broonie@kernel.org Signed-off-by: Will Deacon tools/testing/selftests/arm64/signal/testcases/TODO | 1 - 1 file changed, 1 deletion(-) commit 3e02f57bcc6a34ab992c4027b6ef3f2916b20924 Author: Mark Brown Date: Mon Oct 17 15:45:53 2022 +0100 kselftest/arm64: Provide progress messages when signalling children Especially when the test is configured to run for a longer time it can be reassuring to users to see that the supervising program is running OK so provide a message every second when the output timer expires. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221017144553.773176-3-broonie@kernel.org Signed-off-by: Will Deacon tools/testing/selftests/arm64/fp/fp-stress.c | 3 +++ 1 file changed, 3 insertions(+) commit 3a38ef2b3cb6b63c105247b5ea4a9cf600e673f0 Author: Mark Brown Date: Mon Oct 17 15:45:52 2022 +0100 kselftest/arm64: Check that all children are producing output in fp-stress Currently we don't have an explicit check that when it's been a second since we have seen output produced from the test programs starting up that means all of them are running and we should start both sending signals and timing out. This is not reliable, especially on very heavily loaded systems where the test programs might take longer than a second to run. We do skip sending signals to children that have not produced output yet so we won't cause them to exit unexpectedly by sending a signal but this can create confusion when interpreting output, for example appearing to show the tests running for less time than expected or appearing to show missed signal deliveries. Avoid issues by explicitly checking that we have seen output from all the child processes before we start sending signals or counting test run time. This is especially likely on virtual platforms with large numbers of vector lengths supported since the platforms are slow and there will be a lot of tasks per CPU. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221017144553.773176-2-broonie@kernel.org Signed-off-by: Will Deacon tools/testing/selftests/arm64/fp/fp-stress.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 430d57f53eb1cdbf9ba9bbd397317912b3cd2de5 Author: Ray Chi Date: Mon Nov 7 15:27:54 2022 +0800 usb: core: stop USB enumeration if too many retries When a broken USB accessory connects to a USB host, usbcore might keep doing enumeration retries. If the host has a watchdog mechanism, the kernel panic will happen on the host. This patch provides an attribute early_stop to limit the numbers of retries for each port of a hub. If a port was marked with early_stop attribute, unsuccessful connection attempts will fail quickly. In addition, if an early_stop port has failed to initialize, it will ignore all future connection events until early_stop attribute is clear. Signed-off-by: Ray Chi Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20221107072754.3336357-1-raychi@google.com Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-usb | 11 ++++++ drivers/usb/core/hub.c | 60 +++++++++++++++++++++++++++++++++ drivers/usb/core/hub.h | 4 +++ drivers/usb/core/port.c | 27 +++++++++++++++ 4 files changed, 102 insertions(+) commit 04914233561377fc0369b984c9d19ec1b6ce2845 Author: Thinh Nguyen Date: Mon Nov 7 16:37:55 2022 -0800 usb: dwc3: gadget: Reduce TRB IOC settings When the TRB ring is full, the dwc3 driver must make sure that there's at least 1 TRB with Interrupt On Completion (IOC) set to notify of available TRBs. The current logic just sets the TRB's IOC whenever we run out of TRBs, but it doesn't consider that there may be other TRBs with IOC/LST set already. This creates more events and unnecessary delay from interrupt handling. Only forcefully set IOC when we run out of TRBs and none of the TRBs in the TRB ring has had IOC set. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/72a1fa448eb1201b152e65be7902a5d1c75b9f3a.1667867687.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/gadget.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 0ce0f9d0785a7ba5637a22b63332cf747772da2a Author: Linus Walleij Date: Mon Nov 7 00:05:06 2022 +0100 usb: phy: phy-gpio-vbus-usb: Add device tree probing Make it possible to probe the GPIO VBUS detection driver from the device tree compatible for GPIO USB B connectors. Since this driver is using the "gpio-usb-b-connector" compatible, it is important to discern it from the role switch connector driver (which does not provide a phy), so we add some Kconfig text and depend on !USB_CONN_GPIO. Cc: Rob Herring Cc: Prashant Malani Cc: Felipe Balbi Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20221106230506.1646101-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/Kconfig | 6 +++++- drivers/usb/phy/phy-gpio-vbus-usb.c | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) commit a614e753e8e7f3322b560dcf6eaf44468ec22b3a Author: Martin Kaiser Date: Mon Nov 7 21:28:24 2022 +0100 staging: r8188eu: drop removal/stop check in dump_mgntframe_and_wait_ack We can remove the checks for bDriverStopped and bSurpriseRemoved in dump_mgntframe_and_wait_ack. The code path from this function looks like dump_mgntframe_and_wait_ack rtl8188eu_mgnt_xmit rtw_dump_xframe loop over all fragments rtw_write_port is called for each fragment. bSurpriseRemoved and bDriverStopped are checked in rtw_write_port. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221107202824.61431-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 --- 1 file changed, 3 deletions(-) commit fa2a8d4284225fbc0ee3db4760d6d7339586d61d Author: Martin Kaiser Date: Mon Nov 7 21:28:23 2022 +0100 staging: r8188eu: drop another removal/stop check There's no need to check bDriverStopped and bSurpriseRemoved in issue_probereq_ex. The code path looks like issue_probereq_ex _issue_probereq dump_mgntframe or dump_mgntframe_and_wait_ack All paths from dump_mgntframe check the two variables. dump_mgntframe_and_wait_ack contains a check as well. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221107202824.61431-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 --- 1 file changed, 3 deletions(-) commit d54b6ac14d3f1ac033fe88a7f9935ba9f1f47077 Author: Martin Kaiser Date: Mon Nov 7 21:28:22 2022 +0100 staging: r8188eu: use a qos_hdr in validate_recv_data_frame Define a struct ieee80211_qos_hdr in the validate_recv_data_frame function. Use this struct to replace some numeric offsets and make the code easier to understand. Reported-by: Dan Carpenter Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221107202824.61431-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a57ef65a09a0214776675dcf931ace146724b63c Author: Deepak R Varma Date: Sun Nov 6 23:27:12 2022 +0530 staging: r8188eu: remove unnecessary casting The dhcpMessage struct member variable "cookie" is already declared to be of type __be32. There is no need to cast it again as __be32. Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/c333e22349c5c347c740b425330b35830b969fa9.1667755987.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_br_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1a84fe1f431cb3de6763aabddcf6073d5053f9d Author: Deepak R Varma Date: Sun Nov 6 23:25:37 2022 +0530 staging: r8188eu: simplify complex pointer casting Pointers to structures udphdr and dhcpMessage are derived by casting adjacent pointers with size_t. Such typecast of pointer using size_t is not preferred. The code looks complex and delicate. Simplify such casting by utilizing generic "void *" casting. Suggested-by: Joe Perches Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/1428580d09a9916899209c9278dca40ee2d297d3.1667755987.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_br_ext.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2b62e1b447c643de8bb063d64348e4d000f3c557 Author: Michael Straube Date: Sun Nov 6 14:34:43 2022 +0100 staging: r8188eu: clean up error handling in rtw_start_drv_threads() Convert the error handling in the function rtw_start_drv_threads() to the common logic used in the kernel. Another step to get rid of _FAIL and _SUCCESS which uses inverted logic. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221106133443.8872-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/osdep_intf.h | 2 +- drivers/staging/r8188eu/os_dep/os_intfs.c | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) commit c12b5b5614ac39c66d6dcf8f367620e614343b25 Author: Martin Kaiser Date: Sun Nov 6 13:49:01 2022 +0100 staging: r8188eu: remove checks in dump_mgntframe There's no need to check for bSurpriseRemoved and bDriverStopped in dump_mgmtframe. The sequence of function calls is dump_mgntframe rtl8188eu_mgnt_xmit rtw_dump_xframe loop over all fragments For each fragment, rtw_write_port is called. This function checks bSurpriseRemoved and bDriverStopped. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221106124901.720785-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 --- 1 file changed, 3 deletions(-) commit 32265aaf61c6bf399a7ed2c06d75a7d00dd5500e Author: Martin Kaiser Date: Sun Nov 6 13:49:00 2022 +0100 staging: r8188eu: merge two rtw_free_network_nolock functions Remove the _rtw_free_network_nolock function and merge it into rtw_free_network_nolock, which is its only caller. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221106124901.720785-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme.c | 23 ++++++++--------------- drivers/staging/r8188eu/include/rtw_mlme.h | 2 -- 2 files changed, 8 insertions(+), 17 deletions(-) commit b78ec61d9478d438bc9e723214cf609ac669d132 Author: Martin Kaiser Date: Sun Nov 6 13:48:59 2022 +0100 staging: r8188eu: remove get_fwstate The get_fwstate function is not used. Remove it. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221106124901.720785-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtw_mlme.h | 5 ----- 1 file changed, 5 deletions(-) commit b69373787637e9b38f73ff9f8b7b03e9d9767839 Author: Martin Kaiser Date: Sun Nov 6 13:48:58 2022 +0100 staging: r8188eu: clean up rtw_hal_init Clean up the rtw_hal_init function. Remove the status variable. Exit immediately for errors. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221106124901.720785-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/hal_intf.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit d44fa4cb2e30fc22b2763fd425f2c48be958354f Author: Martin Kaiser Date: Sun Nov 6 13:48:57 2022 +0100 staging: r8188eu: remove state checks in rtw_led_control There's no need to check for bSurpriseRemoved or bDriverStopped in the rtw_led_control function. This function schedules a delayed worker which calls SwLedOn or SwLedOff (or the function calls SwLedOff directly). SwLedOn and SwLedOff check bDriverStopped themselves or they initiate a USB control transfer via usb_write, where bSurpriseRemoved is checked. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221106124901.720785-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_led.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2dbc324eaab66098ae485114b0862653355a0a2b Author: Martin Kaiser Date: Sun Nov 6 13:48:56 2022 +0100 staging: r8188eu: reformat a function header The definition of Hal_EfuseParseIDCode88E can be a single line. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221106124901.720785-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 8554c4768a36da65ca35a397e4d9c6285b8daf5e Author: Martin Kaiser Date: Sun Nov 6 13:48:55 2022 +0100 staging: r8188eu: reorder assignments, clarify the header format Reorder some of the assignments in update_recvframe_attrib_88e. This should make it a bit easier to understand the format of the header that is added by the chip's firmware. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221106124901.720785-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 4142c442f2597c806d6fdcaf253aa38bfea4233c Author: Martin Kaiser Date: Sun Nov 6 13:48:54 2022 +0100 staging: r8188eu: remove some obsolete comments Remove obsolete comments in validate_recv_data_frame. There is no prxcmd variable (any more?). Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221106124901.720785-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 2 -- 1 file changed, 2 deletions(-) commit cc027b3e4087e27d23e5c1d778e802c35f4c987d Author: Martin Kaiser Date: Sun Nov 6 13:48:53 2022 +0100 staging: r8188eu: don't store addba request There's no need to store an incoming addba request in struct mlme_ext_info. We only need the addba request to copy some of its fields into our addba response. It's simpler to pass the incoming request's management frame to issue_action_BA as an additional parameter. issue_action_BA can then extract the required fields. If issue_action_BA prepares a request rather than a response, the caller sets the parameter for the incoming request to NULL. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221106124901.720785-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 25 +++++++++++-------------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 4 ++-- drivers/staging/r8188eu/include/wifi.h | 8 -------- 3 files changed, 13 insertions(+), 24 deletions(-) commit 30534c72bac17a6c160017229ba38fcd0cc21ac6 Author: Michael Straube Date: Sat Nov 5 10:39:16 2022 +0100 staging: r8188eu: convert three functions to bool The functions is_client_associated_to_ap() is_client_associated_to_ibss() is_IBSS_empty() return boolean values. Convert their return type to bool and replace _FAIL, which is defined as 0, with false. Another step to get rid of _SUCCESS / _FAIL. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221105093916.8255-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_wlan_util.c | 18 +++++++++--------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) commit 38aa1741c3b373fb021b2d2ab1f5f07bec03fbd3 Author: Deepak R Varma Date: Thu Nov 3 02:23:18 2022 +0530 staging: r8188eu: remove unused struct declarations Some structures are only declared but have not been used anywhere in the code. Remove such unused structs. Issue identified as part of coccicheck report driven code investigation. Suggested-by: Pavel Skripkin Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/Y2LYvhr74ng+xFbz@qemulion Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/wlan_bssdef.h | 42 --------------------------- 1 file changed, 42 deletions(-) commit f6f213ba49107be5ea2e4aad9ffea9e844c58a2a Author: Deepak R Varma Date: Sun Nov 6 15:51:58 2022 +0530 staging: emxx_udc: use min helper macro for variable comparison Simplify code by using min helper macros in place of lengthy if/else block oriented logical evaluation and value assignment. This issue is identified by coccicheck using the minmax.cocci file. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y2eKxoUWtbPY/88b@qemulion Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 11454ddeb2f68a1c03b90f0c2bba18570f1a3019 Author: Deepak R Varma Date: Sat Nov 5 16:45:52 2022 +0530 staging: rtl8723bs: replace underutilized struct by array variable For structure iqk_matrix_regs_setting, only the "Value" member variable is utilized whereas the other struct members are only declared but not utilised. Replace the struct declaration and implementation by an equivalent variable similar to the only used struct member variable. While in there, update the macro mixed case names to uppercase style. The resultant code is simpler and is easy to maintain. Suggested-by: Dan Carpenter Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y2ZF6O1KU3zZ6r3C@qemulion Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 21 ++++++++++----------- drivers/staging/rtl8723bs/hal/odm.h | 12 +++--------- 2 files changed, 13 insertions(+), 20 deletions(-) commit bb5b5e2104ca000888df89e35ff42c677df22671 Author: Larry Finger Date: Thu Nov 3 20:27:50 2022 -0500 staging: rtl8192e: Fix divide fault when calculating beacon age When the configuration parameter CONFIG_HZ is less that 100, the compiler generates an error as follows: ../drivers/staging/rtl8192e/rtllib_wx.c: In function 'rtl819x_translate_scan': ../drivers/staging/rtl8192e/rtllib_wx.c:220:57: warning: division by zero [-Wdiv-by-zero] 220 | (jiffies - network->last_scanned) / (HZ / 100)); | ^ In file included from ../include/linux/skbuff.h:45, from ../include/linux/if_ether.h:19, from ../include/linux/etherdevice.h:20, from ../drivers/staging/rtl8192e/rtllib_wx.c:18: ../drivers/staging/rtl8192e/rtllib_wx.c: In function 'rtllib_wx_get_scan': ../drivers/staging/rtl8192e/rtllib_wx.c:261:70: warning: division by zero [-Wdiv-by-zero] 261 | (jiffies - network->last_scanned) / | In fact, is HZ is not a multiple of 100, the calculation will be wrong, but it will compile correctly. The fix is to get rid of the (HZ / 100) portion. To decrease any round-off errors, the compiler is forced to perform the 100 * jiffies-difference before dividing by HZ. This patch is only compile tested. Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Signed-off-by: Larry Finger Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20221104012750.2076-1-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_wx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dcb18f5140ab7b4ea23417598c601b9468141d99 Author: Phillip Potter Date: Thu Nov 3 23:06:32 2022 +0000 staging: r8188eu: change return type of rtw_set_802_11_disassociate to void Change return type of rtw_set_802_11_disassociate to void. This function always returns 'true' no matter what, so there is no need to return a value, and no need to check for it in the two call sites within rtw_wx_set_mlme. Also, as we are no longer using ret in rtw_wx_set_mlme except as the return value, just remove it and return 0 directly. Suggested-by: Michael Straube Signed-off-by: Phillip Potter Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221103230632.6946-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_ioctl_set.c | 4 +--- drivers/staging/r8188eu/include/rtw_ioctl_set.h | 2 +- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 9 +++------ 3 files changed, 5 insertions(+), 10 deletions(-) commit 1d6290639bfce477f71392392436d2aa830bca2e Author: Colin Ian King Date: Thu Nov 3 13:06:19 2022 +0000 staging: rtl8192e: rtl819x_HTProc: make arrays const and one static Make two dead-only arrays const. Make array EWC11NHTCap static const so it is not populated on the stack, makes the code smaller too. Signed-off-by: Colin Ian King Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20221103130619.78413-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_HTProc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 84415762be0736efe7ed1b26d72a65ef9e0c6e58 Author: Deepak R Varma Date: Thu Nov 3 22:58:06 2022 +0530 staging: r8188eu: remove unused ijk_matrix_regs_set implementation Instance IQKMatrixRegSetting of struct ijk_matrix_regs_set is initialised and its member variables are assigned values, but it is not used anywhere. Remove the structure and its unused implementation. Suggested-by: Dan Carpenter Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y2P6Jj+IcPss0wFd@qemulion Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 8 -------- drivers/staging/r8188eu/include/odm.h | 7 ------- 2 files changed, 15 deletions(-) commit 6c6ff293337b62c0c646d1ede2e9962f7501f9e4 Author: Deepak R Varma Date: Thu Nov 3 15:03:29 2022 +0530 staging: rtl8723bs: Use min/max macros for variable comparison Simplify code by using min and max helper macros in place of lengthy if/else block oriented logical evaluation and value assignment. This issue is identified by coccicheck using the minmax.cocci file. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y2OK6fcIkH3S2/1f@qemulion Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 12 ++++-------- drivers/staging/rtl8723bs/hal/odm_DIG.c | 5 +---- 2 files changed, 5 insertions(+), 12 deletions(-) commit f541335e830eb1abf3e4e260fcef98c429165aac Author: Deepak R Varma Date: Thu Nov 3 04:06:59 2022 +0530 staging: rtl8192e: Use min_t/max_t macros for variable comparison Simplify code by using min_t and max_t helper macros in place of lengthy if/else block oriented logical evaluation and value assignment. This issue is identified by coccicheck using the minmax.cocci file. Use the *_t variants of min/max macros to avoid compiler warnings about data typecast. Also, use u32 as type for min_t macro to avoid any truncation of data associated with enum constant HT_AGG_SIZE_32K. Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/Y2LxC2kziM1TznhO@qemulion Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_HTProc.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 96a53586ec095dcc426df5bc6a568108dcfa8a0a Author: Tanjuate Brunostar Date: Thu Nov 3 07:34:22 2022 +0000 staging: vt6655: change 2 variable names wFB_Opt0 and wFB_Opt1 These variables are named using Hungarian notation, which is not used in the Linux kernel. Signed-off-by: Tanjuate Brunostar Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/Y2Nu/i957Ill7r+d@elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/rxtx.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 260cd59a54ef5ad62d54172e2faf19ad28615cec Author: Thomas Zimmermann Date: Mon Nov 7 13:53:29 2022 +0100 drm/fb-helper: Document struct drm_fb_helper.hint_leak_smem_start Document the new field smem_start in struct drm_fb_helper and avoid a compile-time warning. An error message is shown below and the bug report is at [1]. include/drm/drm_fb_helper.h:204: warning: Function parameter or member 'hint_leak_smem_start' not described in 'drm_fb_helper' Reported-by: Stephen Rothwell Acked-by: Daniel Vetter Signed-off-by: Thomas Zimmermann Fixes: e7c5c29a9eb1 ("drm/fb-helper: Set flag in struct drm_fb_helper for leaking physical addresses") 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 Link: https://lore.kernel.org/dri-devel/20221107143858.0253a8ff@canb.auug.org.au/T/#u # [1] Link: https://patchwork.freedesktop.org/patch/msgid/20221107125329.12842-4-tzimmermann@suse.de include/drm/drm_fb_helper.h | 7 +++++++ 1 file changed, 7 insertions(+) commit d5c7533a461bb568d5cee6842b0826879216d220 Author: Thomas Zimmermann Date: Mon Nov 7 13:53:28 2022 +0100 drm/hisilicon/hibmc: Include for readl() and writel() Include to get readl() and writel() on S390. The error message is shown below and a bug report is at [1]. drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c:75:15: error: implicit declaration of function 'readl' [-Werror=implicit-function-declaration] 75 | reg = readl(priv->mmio + HIBMC_DISPLAY_CONTROL_HISILE); | ^~~~~ drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c:80:9: error: implicit declaration of function 'writel' [-Werror=implicit-function-declaration] 80 | writel(reg, priv->mmio + HIBMC_DISPLAY_CONTROL_HISILE); | ^~~~~~ Reported-by: kernel test robot Acked-by: Daniel Vetter Signed-off-by: Thomas Zimmermann Fixes: 45b64fd9f7ae ("drm/fb-helper: Remove unnecessary include statements") 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 Link: https://lore.kernel.org/dri-devel/202211060608.qrTg8b2E-lkp@intel.com/T/#u # [1] Link: https://patchwork.freedesktop.org/patch/msgid/20221107125329.12842-3-tzimmermann@suse.de drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 2 ++ 1 file changed, 2 insertions(+) commit 478f6213aa0c5fb43662aca7b26e47eb3c3342e2 Author: Thomas Zimmermann Date: Mon Nov 7 13:53:27 2022 +0100 drm/fbdev: Include Include in fbdev emulation to get vzalloc() and vfree() on MIPS. The error messages are shown below and bug reports are at [1] and [2]. drivers/gpu/drm/drm_fbdev_generic.c: In function 'drm_fbdev_cleanup': drivers/gpu/drm/drm_fbdev_generic.c:63:17: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration] 63 | vfree(shadow); | ^~~~~ | kvfree drivers/gpu/drm/drm_fbdev_generic.c: In function 'drm_fbdev_fb_probe': drivers/gpu/drm/drm_fbdev_generic.c:219:38: error: implicit declaration of function 'vzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration] 219 | fbi->screen_buffer = vzalloc(fbi->screen_size); | ^~~~~~~ | kvzalloc drivers/gpu/drm/drm_fbdev_generic.c:219:36: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 219 | fbi->screen_buffer = vzalloc(fbi->screen_size); Reported-by: kernel test robot Acked-by: Daniel Vetter Signed-off-by: Thomas Zimmermann Fixes: 8ab59da26bc0 ("drm/fb-helper: Move generic fbdev emulation into separate source file") 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 Link: https://lore.kernel.org/dri-devel/202211060911.5U76gMtE-lkp@intel.com/T/#u # [1] Link: https://lore.kernel.org/dri-devel/202211060331.1SoD1tAR-lkp@intel.com/T/#u # [2] Link: https://patchwork.freedesktop.org/patch/msgid/20221107125329.12842-2-tzimmermann@suse.de drivers/gpu/drm/drm_fbdev_generic.c | 1 + 1 file changed, 1 insertion(+) commit 408e42ae6b1c489bfe0b367a3e2323f3d553d348 Author: Daniel Vetter Date: Mon Nov 7 20:09:28 2022 +0100 drm/fb-helper: Fix missing kerneldoc include This was lost in the code movement done in commit 8ab59da26bc0 ("drm/fb-helper: Move generic fbdev emulation into separate source file"). Fixes: 8ab59da26bc0 ("drm/fb-helper: Move generic fbdev emulation into separate source file") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221107190928.1212116-1-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms-helpers.rst | 3 +++ 1 file changed, 3 insertions(+) commit 01ab991fc0ee5019aecc4ca461311fc8aa75ece5 Author: Ard Biesheuvel Date: Mon Nov 7 18:24:00 2022 +0100 arm64: Enable data independent timing (DIT) in the kernel The ARM architecture revision v8.4 introduces a data independent timing control (DIT) which can be set at any exception level, and instructs the CPU to avoid optimizations that may result in a correlation between the execution time of certain instructions and the value of the data they operate on. The DIT bit is part of PSTATE, and is therefore context switched as usual, given that it becomes part of the saved program state (SPSR) when taking an exception. We have also defined a hwcap for DIT, and so user space can discover already whether or nor DIT is available. This means that, as far as user space is concerned, DIT is wired up and fully functional. In the kernel, however, we never bothered with DIT: we disable at it boot (i.e., INIT_PSTATE_EL1 has DIT cleared) and ignore the fact that we might run with DIT enabled if user space happened to set it. Currently, we have no idea whether or not running privileged code with DIT disabled on a CPU that implements support for it may result in a side channel that exposes privileged data to unprivileged user space processes, so let's be cautious and just enable DIT while running in the kernel if supported by all CPUs. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: Eric Biggers Cc: Jason A. Donenfeld Cc: Kees Cook Cc: Suzuki K Poulose Cc: Adam Langley Link: https://lore.kernel.org/all/YwgCrqutxmX0W72r@gmail.com/ Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20221107172400.1851434-1-ardb@kernel.org [will: Removed cpu_has_dit() as per Mark's suggestion on the list] Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 12 ++++++++---- arch/arm64/kernel/cpufeature.c | 17 +++++++++++++++++ arch/arm64/kernel/entry.S | 3 +++ arch/arm64/kernel/suspend.c | 2 ++ arch/arm64/tools/cpucaps | 1 + 5 files changed, 31 insertions(+), 4 deletions(-) commit 2874529b3513bdc90299c90f40713602da685e35 Author: Cole Robinson Date: Fri Nov 4 16:42:45 2022 -0400 virt/sev-guest: Add a MODULE_ALIAS Autoload the driver when, for example, SNP init code creates the corresponding platform device. [ bp: Rewrite commit message. ] Fixes: fce96cf04430 ("virt: Add SEV-SNP guest driver") Signed-off-by: Cole Robinson Signed-off-by: Borislav Petkov Acked-by: Tom Lendacky Link: https://lore.kernel.org/r/ff480c5e688eb0a72a4db0a29c7b1bb54c45bfd4.1667594253.git.crobinso@redhat.com drivers/virt/coco/sev-guest/sev-guest.c | 1 + 1 file changed, 1 insertion(+) commit 5c30f3e4a6e67c88c979ad30554bf4ef9b24fbd0 Author: Kees Cook Date: Sun Nov 6 19:46:35 2022 -0800 tty: Move TIOCSTI toggle variable before kerndoc The variable "tty_legacy_tiocsti" should be defined before the kerndoc for the tiocsti() function. The new variable was breaking the "htmldocs" build target: drivers/tty/tty_io.c:2271: warning: cannot understand function prototype: 'bool tty_legacy_tiocsti __read_mostly = IS_ENABLED(CONFIG_LEGACY_TIOCSTI); ' Fixes: 83efeeeb3d04 ("tty: Allow TIOCSTI to be disabled") Reported-by: Stephen Rothwell Link: https://lore.kernel.org/lkml/20221107143434.66f7be35@canb.auug.org.au Cc: Jiri Slaby Signed-off-by: Kees Cook Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20221107034631.never.637-kees@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cad1ecd4e3213d892b70afa999a81849d1f0206 Author: Luis Chamberlain Date: Mon Oct 3 09:58:49 2022 -0700 testing: use the copyleft-next-0.3.1 SPDX tag Two selftests drivers exist under the copyleft-next license. These drivers were added prior to SPDX practice taking full swing in the kernel. Now that we have an SPDX tag for copyleft-next-0.3.1 documented, embrace it and remove the boiler plate. Cc: Goldwyn Rodrigues Cc: Kuno Woudt Cc: Richard Fontana Cc: copyleft-next@lists.fedorahosted.org Cc: Ciaran Farrell Cc: Christopher De Nicolo Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Cc: Thomas Gleixner Cc: Jonathan Corbet Cc: Thorsten Leemhuis Cc: Andrew Morton Reviewed-by: Kees Cook Signed-off-by: Luis Chamberlain Reviewed-by: Tim Bird Signed-off-by: Greg Kroah-Hartman lib/test_kmod.c | 12 +----------- lib/test_sysctl.c | 12 +----------- tools/testing/selftests/kmod/kmod.sh | 13 +------------ tools/testing/selftests/sysctl/sysctl.sh | 12 +----------- 4 files changed, 4 insertions(+), 45 deletions(-) commit ad9f64cd2d4a17f0d5ecf04d38170fdc34f21c61 Author: Luis Chamberlain Date: Mon Oct 3 09:58:48 2022 -0700 LICENSES: Add the copyleft-next-0.3.1 license Add the full text of the copyleft-next-0.3.1 license to the kernel tree as well as the required tags for reference and tooling. The license text was copied directly from the copyleft-next project's git tree [0]. Discussion of using copyleft-next-0.3.1 on Linux started since June, 2016 [1]. In the end Linus' preference was to have drivers use MODULE_LICENSE("GPL") to make it clear that the GPL applies when it comes to Linux [2]. Additionally, even though copyleft-next-0.3.1 has been found to be to be GPLv2 compatible by three attorneys at SUSE and Redhat [3], to err on the side of caution we simply recommend to always use the "OR" language for this license [4]. Even though it has been a goal of the project to be GPL-v2 compatible to be certain in 2016 I asked for a clarification about what makes copyleft-next GPLv2 compatible and also asked for a summary of benefits. This prompted some small minor changes to make compatibility even further clear and as of copyleft 0.3.1 compatibility should be crystal clear [5]. The summary of why copyleft-next 0.3.1 is compatible with GPLv2 is explained as follows: Like GPLv2, copyleft-next requires distribution of derivative works ("Derived Works" in copyleft-next 0.3.x) to be under the same license. Ordinarily this would make the two licenses incompatible. However, copyleft-next 0.3.1 says: "If the Derived Work includes material licensed under the GPL, You may instead license the Derived Work under the GPL." "GPL" is defined to include GPLv2. In practice this means copyleft-next code in Linux may be licensed under the GPL2, however there are additional obvious gains for bringing contributions from Linux outbound where copyleft-next is preferred. A summary of benefits why projects outside of Linux might prefer to use copyleft-next >= 0.3.1 over GPLv2: o It is much shorter and simpler o It has an explicit patent license grant, unlike GPLv2 o Its notice preservation conditions are clearer o More free software/open source licenses are compatible with it (via section 4) o The source code requirement triggered by binary distribution is much simpler in a procedural sense o Recipients potentially have a contract claim against distributors who are noncompliant with the source code requirement o There is a built-in inbound=outbound policy for upstream contributions (cf. Apache License 2.0 section 5) o There are disincentives to engage in the controversial practice of copyleft/ proprietary dual-licensing o In 15 years copyleft expires, which can be advantageous for legacy code o There are explicit disincentives to bringing patent infringement claims accusing the licensed work of infringement (see 10b) o There is a cure period for licensees who are not compliant with the license (there is no cure opportunity in GPLv2) o copyleft-next has a 'built-in or-later' provision The first driver submission to Linux under this dual strategy was lib/test_sysctl.c through commit 9308f2f9e7f05 ("test_sysctl: add dedicated proc sysctl test driver") merged in July 2017. Shortly after that I also added test_kmod through commit d9c6a72d6fa29 ("kmod: add test driver to stress test the module loader") in the same month. These two drivers went in just a few months before the SPDX license practice kicked in. In 2018 Kuno Woudt went through the process to get SPDX identifiers for copyleft-next [6] [7]. Although there are SPDX tags for copyleft-next-0.3.0, we only document use in Linux starting from copyleft-next-0.3.1 which makes GPLv2 compatibility crystal clear. This patch will let us update the two Linux selftest drivers in subsequent patches with their respective SPDX license identifiers and let us remove repetitive license boiler plate. [0] https://github.com/copyleft-next/copyleft-next/blob/master/Releases/copyleft-next-0.3.1 [1] https://lore.kernel.org/lkml/1465929311-13509-1-git-send-email-mcgrof@kernel.org/ [2] https://lore.kernel.org/lkml/CA+55aFyhxcvD+q7tp+-yrSFDKfR0mOHgyEAe=f_94aKLsOu0Og@mail.gmail.com/ [3] https://lore.kernel.org/lkml/20170516232702.GL17314@wotan.suse.de/ [4] https://lkml.kernel.org/r/1495234558.7848.122.camel@linux.intel.com [5] https://lists.fedorahosted.org/archives/list/copyleft-next@lists.fedorahosted.org/thread/JTGV56DDADWGKU7ZKTZA4DLXTGTLNJ57/#SQMDIKBRAVDOCT4UVNOOCRGBN2UJIKHZ [6] https://spdx.org/licenses/copyleft-next-0.3.0.html [7] https://spdx.org/licenses/copyleft-next-0.3.1.html Cc: Goldwyn Rodrigues Cc: Kuno Woudt Cc: Richard Fontana Cc: copyleft-next@lists.fedorahosted.org Cc: Ciaran Farrell Cc: Christopher De Nicolo Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Cc: Thomas Gleixner Cc: Jonathan Corbet Cc: Thorsten Leemhuis Cc: Andrew Morton Reviewed-by: Kees Cook Signed-off-by: Luis Chamberlain Reviewed-by: Tim Bird Signed-off-by: Greg Kroah-Hartman LICENSES/dual/copyleft-next-0.3.1 | 236 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) commit b14ef61314b37a4a720a1f5686627d5061387480 Author: Andy Shevchenko Date: Tue Nov 8 16:09:31 2022 +0200 pinctrl: intel: Add Intel Moorefield pin controller support This driver adds pinctrl support for Intel Moorefield. The IP block which is called Family-Level Interface Shim is a separate entity in SoC. The GPIO driver, which supports this pinctrl interface, will be submitted separately. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Andy Shevchenko drivers/pinctrl/intel/Kconfig | 11 + drivers/pinctrl/intel/Makefile | 1 + drivers/pinctrl/intel/pinctrl-moorefield.c | 916 +++++++++++++++++++++++++++++ 3 files changed, 928 insertions(+) commit 59598b42eb52c734bd45d00f64a73129a4537e49 Author: Mukesh Ojha Date: Sat Oct 29 12:37:48 2022 +0530 arm64: entry: Fix typo Fix the following typo in entry-common.c intrumentable => instrumentable Signed-off-by: Mukesh Ojha Acked-by: Mark Rutland Link: https://lore.kernel.org/r/1667027268-1255-1-git-send-email-quic_mojha@quicinc.com Signed-off-by: Will Deacon arch/arm64/kernel/entry-common.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8a8112d888556b038687f3cfbb7c5a3f5fdb3116 Author: Mark Brown Date: Mon Nov 7 17:19:12 2022 +0000 arm64/booting: Add missing colon to FA64 entry The booting documentation for FEAT_SME_FA64 is missing a colon that is normally present, add it. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221107171913.294565-1-broonie@kernel.org Signed-off-by: Will Deacon Documentation/arm64/booting.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38e4b6605e5cde68ba388f3175e7b4962694674c Author: Anshuman Khandual Date: Tue Nov 8 09:14:06 2022 +0530 arm64/mm: Drop ARM64_KERNEL_USES_PMD_MAPS Currently ARM64_KERNEL_USES_PMD_MAPS is an unnecessary abstraction. Kernel mapping at PMD (aka huge page aka block) level, is only applicable with 4K base page, which makes it 2MB aligned, a necessary requirement for linear mapping and physical memory start address. This can be easily achieved by directly checking against base page size itself. This drops off the macro ARM64_KERNE_USES_PMD_MAPS which is redundant. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/20221108034406.2950071-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/kernel-pgtable.h | 11 +++-------- arch/arm64/mm/mmu.c | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) commit 4f4356e6b4f29129852061987cc036b52deed1c0 Author: Rafael J. Wysocki Date: Tue Nov 8 14:44:26 2022 +0100 ACPICA: Add utcksum.o to the acpidump Makefile Commit 51aad1a6723b ("ACPICA: Finish support for the CDAT table") did not add utcksum.o to the acpidump Makefile by mistake. Do that now. Fixes: 51aad1a6723b ("ACPICA: Finish support for the CDAT table") Signed-off-by: Rafael J. Wysocki tools/power/acpi/tools/acpidump/Makefile | 1 + 1 file changed, 1 insertion(+) commit eafbed2a4556f90792338630ab6ddf7b2e492e8d Author: Lad Prabhakar Date: Mon Nov 7 17:29:52 2022 +0000 arm64: dts: renesas: rzg2l: Drop #address-cells from pinctrl nodes This fixes the below dtbs_check warning: arch/arm64/boot/dts/renesas/r9a07g044c2-smarc.dtb: pinctrl@11030000: #address-cells: 'anyOf' conditional failed, one must be fixed: [[2]] is not of type 'object' From schema: Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml arch/arm64/boot/dts/renesas/r9a07g044l2-smarc.dtb: pinctrl@11030000: #address-cells: 'anyOf' conditional failed, one must be fixed: [[2]] is not of type 'object' From schema: Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml arch/arm64/boot/dts/renesas/r9a07g054l2-smarc.dtb: pinctrl@11030000: #address-cells: 'anyOf' conditional failed, one must be fixed: [[2]] is not of type 'object' From schema: Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml Drop #address-cells properties from pinctrl nodes as they have no addressed child nodes. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20221107172953.63218-1-prabhakar.mahadev-lad.rj@bp.renesas.com Link: https://lore.kernel.org/r/20221107172953.63218-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 1 - arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 1 - 2 files changed, 2 deletions(-) commit 2ac909916b520df09a23f152bb9016d7b892b496 Author: Fabrizio Castro Date: Mon Nov 7 16:50:27 2022 +0000 arm64: dts: renesas: r9a09g011: Fix I2C SoC specific strings The preferred form for Renesas' compatible strings is: ",-" Somehow the compatible string for the r9a09g011 I2C IP was upstreamed as renesas,i2c-r9a09g011 instead of renesas,r9a09g011-i2c, which is really confusing, especially considering the generic fallback is renesas,rzv2m-i2c. The first user of renesas,i2c-r9a09g011 in the kernel is not yet in a kernel release, it will be in v6.1, therefore it can still be fixed in v6.1. Even if we don't fix it before v6.2, I don't think there is any harm in making such a change. s/renesas,i2c-r9a09g011/renesas,r9a09g011-i2c/g for consistency. Fixes: 54ac6794df9d ("arm64: dts: renesas: r9a09g011: Add i2c nodes") Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/20221107165027.54150-3-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4662d6e8c9b0035581ffc31cab80ea5963bd9f24 Author: Pierre Gondois Date: Mon Nov 7 16:57:11 2022 +0100 arm64: dts: renesas: rzg2l: Add missing cache-level properties The DeviceTree Specification v0.3 specifies that the cache node 'cache-level' property is 'required'. Cf. s3.8 Multi-level and Shared Cache Nodes. Update the Device Trees accordingly. Signed-off-by: Pierre Gondois Link: https://lore.kernel.org/r/20221107155825.1644604-19-pierre.gondois@arm.com [geert: Update description] Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a07g043u.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 1 + 3 files changed, 3 insertions(+) commit 40a6dd7b94172d9fce1dec99e8c0345491990970 Author: Thanh Quan Date: Fri Nov 4 16:11:34 2022 +0100 arm64: dts: renesas: r8a779g0: Add CMT node Signed-off-by: Thanh Quan [wsa: merged the fixes into this one and rebased] Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221104151135.4706-3-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 70 +++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 278f5015a3deaa2ea0db6070bbc2a8edf2455643 Author: Fabrizio Castro Date: Thu Nov 3 23:06:46 2022 +0000 arm64: dts: renesas: r9a09g011: Fix unit address format error Although the HW User Manual for RZ/V2M states in the "Address Map" section that the interrupt controller is assigned addresses starting from 0x82000000, the memory locations from 0x82000000 0x0x8200FFFF are marked as reserved in the "Interrupt Controller (GIC)" section and are currently not used by the device tree, leading to the below warning: arch/arm64/boot/dts/renesas/r9a09g011.dtsi:51.38-63.5: Warning (simple_bus_reg): /soc/interrupt-controller@82000000: simple-bus unit address format error, expected "82010000" Fix the unit address accordingly. Fixes: fb1929b98f2e ("arm64: dts: renesas: Add initial DTSI for RZ/V2M SoC") Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/20221103230648.53748-2-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d13f817a8857101ff074ce5ee6b1c2db13e18870 Author: Wolfram Sang Date: Thu Nov 3 21:55:44 2022 +0100 arm64: dts: renesas: white-hawk-cpu: Sort RWDT entry correctly Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221103205546.24836-4-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-cpu.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 524789257264ca01192b519852e78b2374168513 Author: Wolfram Sang Date: Thu Nov 3 21:55:43 2022 +0100 arm64: dts: renesas: r8a779g0: Add TMU nodes Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221103205546.24836-3-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 64416ef0b0c4d73349035d1b3206eed3d2047ee0 Author: Wolfram Sang Date: Thu Nov 3 15:34:40 2022 +0100 arm64: dts: renesas: r8a779f0: Fix SCIF "brg_int" clock As serial communication requires a clean clock signal, the Serial Communication Interfaces with FIFO (SCIF) are clocked by a clock that is not affected by Spread Spectrum or Fractional Multiplication. Hence change the clock input for the SCIF Baud Rate Generator internal clock from the S0D3_PER clock to the SASYNCPERD1 clock (which has the same clock rate), cfr. R-Car S4-8 Hardware User's Manual rev. 0.81. Fixes: c62331e8222f ("arm64: dts: renesas: Add Renesas R8A779F0 SoC support") Fixes: 40753144256b ("arm64: dts: renesas: r8a779f0: Add SCIF nodes") Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221103143440.46449-5-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a5101ef18b4d0751588f61d939694bad183cc240 Author: Wolfram Sang Date: Thu Nov 3 15:34:39 2022 +0100 arm64: dts: renesas: r8a779f0: Fix HSCIF "brg_int" clock As serial communication requires a clean clock signal, the High Speed Serial Communication Interfaces with FIFO (HSCIF) are clocked by a clock that is not affected by Spread Spectrum or Fractional Multiplication. Hence change the clock input for the HSCIF Baud Rate Generator internal clock from the S0D3_PER clock to the SASYNCPERD1 clock (which has the same clock rate), cfr. R-Car S4-8 Hardware User's Manual rev. 0.81. Fixes: 01a787f78bfd ("arm64: dts: renesas: r8a779f0: Add HSCIF nodes") Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221103143440.46449-4-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 59fb813f9742b349f48250bd7793279cafe2752c Author: Pierre Gondois Date: Mon Nov 7 16:56:58 2022 +0100 arm64: dts: Update cache properties for Arm Ltd platforms 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 relevant device trees nodes accordingly. Signed-off-by: Pierre Gondois Link: https://lore.kernel.org/r/20221107155825.1644604-6-pierre.gondois@arm.com Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/corstone1000.dtsi | 1 + arch/arm64/boot/dts/arm/foundation-v8.dtsi | 1 + arch/arm64/boot/dts/arm/juno-r1.dts | 2 ++ arch/arm64/boot/dts/arm/juno-r2.dts | 2 ++ arch/arm64/boot/dts/arm/juno.dts | 2 ++ arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts | 1 + arch/arm64/boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dts | 1 + 7 files changed, 10 insertions(+) commit 523ed9442b997c39220ee364b07a8773623e3a58 Author: Wolfram Sang Date: Fri Nov 4 16:11:33 2022 +0100 clk: renesas: r8a779g0: Add CMT clocks Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221104151135.4706-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a779g0-cpg-mssr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 106f51e975608b4d55364b57071fbf60176c0d60 Author: Wolfram Sang Date: Thu Nov 3 21:55:42 2022 +0100 clk: renesas: r8a779g0: Add TMU and SASYNCRT clocks Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221103205546.24836-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a779g0-cpg-mssr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2e0d7d3eabce3babae1fd66d7650e00c848a3b45 Author: Wolfram Sang Date: Thu Nov 3 15:34:38 2022 +0100 clk: renesas: r8a779f0: Fix SCIF parent clocks As serial communication requires a clean clock signal, the Serial Communication Interfaces with FIFO (SCIF) are clocked by a clock that is not affected by Spread Spectrum or Fractional Multiplication. Hence change the parent clocks for the SCIF modules from the S0D12_PER clock to the SASYNCPERD4 clock (which has the same clock rate), cfr. R-Car S4-8 Hardware User's Manual rev. 0.81. Fixes: 24aaff6a6ce4 ("clk: renesas: cpg-mssr: Add support for R-Car S4-8") Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221103143440.46449-3-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a779f0-cpg-mssr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c258e3ab639112d8f5ae9df9a873750ae2623ce2 Author: Wolfram Sang Date: Thu Nov 3 15:34:37 2022 +0100 clk: renesas: r8a779f0: Fix HSCIF parent clocks As serial communication requires a clean clock signal, the High Speed Serial Communication Interfaces with FIFO (HSCIF) are clocked by a clock that is not affected by Spread Spectrum or Fractional Multiplication. Hence change the parent clocks for the HSCIF modules from the S0D3_PER clock to the SASYNCPERD1 clock (which has the same clock rate), cfr. R-Car S4-8 Hardware User's Manual rev. 0.81. Fixes: 080bcd8d5997 ("clk: renesas: r8a779f0: Add HSCIF clocks") Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221103143440.46449-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a779f0-cpg-mssr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1d53a48eaa1ea2e1c013edfd62e0ffb5b171e97d Author: Nícolas F. R. A. Prado Date: Thu Sep 8 12:11:51 2022 -0400 arm64: dts: mediatek: kukui: Remove i2s-share properties The i2sN-share properties were never documented in the dt-binding and thus shouldn't be used. Now that the ASoC machine drivers are setting the I2S clock sharing internally, these properties are no longer needed, so remove them. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220908161154.648557-8-nfraprado@collabora.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 5 ----- 1 file changed, 5 deletions(-) commit a8731264e5ce083eb761e5a6a8273db536743e9e Author: Mark Rutland Date: Tue Nov 8 09:37:25 2022 +0000 arm_pmu: acpi: handle allocation failure One of the failure paths in the arm_pmu ACPI code is missing an early return, permitting a NULL pointer dereference upon a memory allocation failure. Add the missing return. Fixes: fe40ffdb7656 ("arm_pmu: rework ACPI probing") Signed-off-by: Mark Rutland Reported-by: Will Deacon Link: https://lore.kernel.org/r/20221108093725.1239563-1-mark.rutland@arm.com Signed-off-by: Will Deacon drivers/perf/arm_pmu_acpi.c | 1 + 1 file changed, 1 insertion(+) commit ee1bfbcc71cfac3b570365558cf38cb70f6ca971 Merge: b2140e971309 85036aee1938 Author: Paolo Abeni Date: Tue Nov 8 12:39:04 2022 +0100 Merge branch 'bnxt_en-updates' Michael Chan says: ==================== bnxt_en: Updates This small patchset adds an improvement to the configuration of ethtool RSS tuple hash and a PTP improvement when running in a multi-host environment. ==================== Link: https://lore.kernel.org/r/1667780192-3700-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Paolo Abeni commit 85036aee1938d65da4be6ae1bc7e5e7e30b567b9 Author: Pavan Chebbi Date: Sun Nov 6 19:16:32 2022 -0500 bnxt_en: Add a non-real time mode to access NIC clock When using a PHC that is shared between multiple hosts, in order to achieve consistent timestamps across all hosts, we need to isolate the PHC from any host making frequency adjustments. This patch adds a non-real time mode for this purpose. The implementation is based on a free running NIC hardware timer which is used as the timestamper time-base. Each host implements individual adjustments to a local timecounter based on the NIC free running timer. Cc: Richard Cochran Signed-off-by: Pavan Chebbi Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 45 ++++++++++++++++++++------- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h | 7 +++-- 3 files changed, 42 insertions(+), 15 deletions(-) commit 98a4322b70e817f0663adb61b8272f7b995ed41a Author: Edwin Peer Date: Sun Nov 6 19:16:31 2022 -0500 bnxt_en: update RSS config using difference algorithm Hardware is unable to realize all legal firmware interface state values for hash_type. For example, if 4-tuple TCP_IPV4 hash is enabled, 4-tuple UDP_IPV4 hash must also be enabled. By providing the bits the user intended to change instead of the possible illegal intermediate states, the firmware is able to make better compromises when deciding which bits to ignore. With this new mechansim, we can now report the actual configured hash back to the user. Add bnxt_hwrm_update_rss_hash_cfg() to report the actual hash after user configuration. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni drivers/net/ethernet/broadcom/bnxt/bnxt.c | 35 ++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 + drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 47 +++++++++++++++++++++++ 4 files changed, 85 insertions(+), 1 deletion(-) commit 41d2dd42bfa17035c3b0429b6b0e46305607fcc7 Author: Edwin Peer Date: Sun Nov 6 19:16:30 2022 -0500 bnxt_en: refactor VNIC RSS update functions Extract common code into a new function. This will avoid duplication in the next patch, which changes the update algorithm for both the P5 and legacy code paths. No functional changes. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni drivers/net/ethernet/broadcom/bnxt/bnxt.c | 34 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 18 deletions(-) commit ce459b1da752cf1dc0b81aba999a6542ab866993 Author: Pierre Gondois Date: Mon Nov 7 16:57:05 2022 +0100 arm64: dts: Update cache properties for mediatek 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/20221107155825.1644604-13-pierre.gondois@arm.com Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8186.dtsi | 3 +++ arch/arm64/boot/dts/mediatek/mt8192.dtsi | 3 +++ arch/arm64/boot/dts/mediatek/mt8195.dtsi | 3 +++ 3 files changed, 9 insertions(+) commit b2140e971309511074933da3edd5bbfcb6d394e5 Merge: 47f3ecf4763d a21b06e73191 Author: Paolo Abeni Date: Tue Nov 8 12:21:51 2022 +0100 Merge branch 'net-add-helper-support-in-tc-act_ct-for-ovs-offloading' Xin Long says: ==================== net: add helper support in tc act_ct for ovs offloading Ilya reported an issue that FTP traffic would be broken when the OVS flow with ct(commit,alg=ftp) installed in the OVS kernel module, and it was caused by that TC didn't support the ftp helper offloaded from OVS. This patchset is to add the helper support in act_ct for OVS offloading in kernel net/sched. The 1st and 2nd patches move some common code into nf_conntrack_helper from openvswitch so that they could be used by net/sched in the 4th patch (Note there are still some other common code used in both OVS and TC, and I will extract it in other patches). The 3rd patch extracts another function in net/sched to make the 4th patch easier to write. The 4th patch adds this feature in net/sched. The user space part will be added in another patch, and with it these OVS flows (FTP over SNAT) can be used to test this feature: table=0, in_port=veth1,tcp,tcp_dst=2121,ct_state=-trk \ actions=ct(table=1, nat), normal table=0, in_port=veth2,tcp,ct_state=-trk actions=ct(table=1, nat) table=0, in_port=veth1,tcp,ct_state=-trk actions=ct(table=0, nat) table=0, in_port=veth1,tcp,ct_state=+trk+rel actions=ct(commit, nat),normal table=0, in_port=veth1,tcp,ct_state=+trk+est actions=veth2" table=1, in_port=veth1,tcp,tcp_dst=2121,ct_state=+trk+new \ actions=ct(commit, nat(src=7.7.16.1), alg=ftp),normal" table=1, in_port=veth1,tcp,tcp_dst=2121,ct_state=+trk+est actions=veth2" table=1, in_port=veth2,tcp,ct_state=+trk+est actions=veth1" ==================== Link: https://lore.kernel.org/r/cover.1667766782.git.lucien.xin@gmail.com Signed-off-by: Paolo Abeni commit a21b06e7319129994f339ed47f512bbe57b77f5b Author: Xin Long Date: Sun Nov 6 15:34:17 2022 -0500 net: sched: add helper support in act_ct This patch is to add helper support in act_ct for OVS actions=ct(alg=xxx) offloading, which is corresponding to Commit cae3a2627520 ("openvswitch: Allow attaching helpers to ct action") in OVS kernel part. The difference is when adding TC actions family and proto cannot be got from the filter/match, other than helper name in tb[TCA_CT_HELPER_NAME], we also need to send the family in tb[TCA_CT_HELPER_FAMILY] and the proto in tb[TCA_CT_HELPER_PROTO] to kernel. Acked-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Signed-off-by: Paolo Abeni include/net/tc_act/tc_ct.h | 1 + include/uapi/linux/tc_act/tc_ct.h | 3 ++ net/sched/act_ct.c | 89 +++++++++++++++++++++++++++++++++++---- 3 files changed, 85 insertions(+), 8 deletions(-) commit 1913894100ca53205f2d56091cb34b8eba1de217 Author: Xin Long Date: Sun Nov 6 15:34:16 2022 -0500 net: sched: call tcf_ct_params_free to free params in tcf_ct_init This patch is to make the err path simple by calling tcf_ct_params_free(), so that it won't cause problems when more members are added into param and need freeing on the err path. Acked-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Signed-off-by: Paolo Abeni net/sched/act_ct.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit f96cba2eb923c025014fe74a50e104b7c5234feb Author: Xin Long Date: Sun Nov 6 15:34:15 2022 -0500 net: move add ct helper function to nf_conntrack_helper for ovs and tc Move ovs_ct_add_helper from openvswitch to nf_conntrack_helper and rename as nf_ct_add_helper, so that it can be used in TC act_ct in the next patch. Acked-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Signed-off-by: Paolo Abeni include/net/netfilter/nf_conntrack_helper.h | 2 ++ net/netfilter/nf_conntrack_helper.c | 31 ++++++++++++++++++++ net/openvswitch/conntrack.c | 44 ++++------------------------- 3 files changed, 38 insertions(+), 39 deletions(-) commit ca71277f36e0781db663aedeb5fc1e26e7c144c4 Author: Xin Long Date: Sun Nov 6 15:34:14 2022 -0500 net: move the ct helper function to nf_conntrack_helper for ovs and tc Move ovs_ct_helper from openvswitch to nf_conntrack_helper and rename as nf_ct_helper so that it can be used in TC act_ct in the next patch. Note that it also adds the checks for the family and proto, as in TC act_ct, the packets with correct family and proto are not guaranteed. Acked-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Signed-off-by: Paolo Abeni include/net/netfilter/nf_conntrack_helper.h | 3 ++ net/netfilter/nf_conntrack_helper.c | 69 +++++++++++++++++++++++++++++ net/openvswitch/conntrack.c | 61 +------------------------ 3 files changed, 73 insertions(+), 60 deletions(-) commit 47f3ecf4763d3fea37d3453c9ee1f9f2169d71b3 Author: Gal Pressman Date: Sun Nov 6 14:31:27 2022 +0200 ethtool: Fail number of channels change when it conflicts with rxnfc Similar to what we do with the hash indirection table [1], when network flow classification rules are forwarding traffic to channels greater than the requested number of channels, fail the operation. Without this, traffic could be directed to channels which no longer exist (dropped) after changing number of channels. [1] commit d4ab4286276f ("ethtool: correctly ensure {GS}CHANNELS doesn't conflict with GS{RXFH}") Reviewed-by: Tariq Toukan Signed-off-by: Gal Pressman Link: https://lore.kernel.org/r/20221106123127.522985-1-gal@nvidia.com Signed-off-by: Paolo Abeni net/ethtool/channels.c | 19 +++++++++++---- net/ethtool/common.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ net/ethtool/common.h | 1 + net/ethtool/ioctl.c | 17 ++++++++----- 4 files changed, 92 insertions(+), 11 deletions(-) commit 5dca9dd7ffcb24a3db37a37a4a208070d92c8180 Author: Krzysztof Kozlowski Date: Fri Nov 4 12:11:31 2022 -0400 dt-bindings: pinctrl: qcom,qcs404: convert to dtschema Convert Qualcomm QCS404 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Changes during conversion: add sdc1_rclk pins (used in qcs404-evb.dtsi). Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221104161131.57719-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,qcs404-pinctrl.txt | 199 --------------------- .../bindings/pinctrl/qcom,qcs404-pinctrl.yaml | 176 ++++++++++++++++++ 2 files changed, 176 insertions(+), 199 deletions(-) commit b17ff9d18e018025ed9e740a3f4dcbcafe622906 Author: Krzysztof Kozlowski Date: Sun Oct 23 20:23:55 2022 -0400 dt-bindings: pinctrl: qcom,msm8916: convert to dtschema Convert Qualcomm MSM8916 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221024002356.28261-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij .../bindings/pinctrl/qcom,msm8916-pinctrl.txt | 195 --------------------- .../bindings/pinctrl/qcom,msm8916-pinctrl.yaml | 166 ++++++++++++++++++ 2 files changed, 166 insertions(+), 195 deletions(-) commit f60c9eac54af28d7b5651fe49944bfd5098550e6 Author: Shenwei Wang Date: Thu Oct 27 08:08:59 2022 -0500 gpio: mxc: enable pad wakeup on i.MX8x platforms On i.MX8QM/QXP/DXL SoCs, even a GPIO is selected as the wakeup source, the GPIO block will be powered off when system enters into suspend state. This can greatly reduce the power consumption of suspend state because the whole partition can be shutdown. This is called PAD wakeup feature on i.MX8x platform. This patch adds the noirq suspend/resume hooks and uses the pad wakeup feature as the default wakeup method for GPIO modules on i.MX8QM/QXP/DXL platforms. Signed-off-by: Shenwei Wang Reviewed-by: Peng Fan Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20221027130859.1444412-6-shenwei.wang@nxp.com Signed-off-by: Linus Walleij drivers/gpio/gpio-mxc.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) commit 7c3ccedaf7a7b0260e8ac128f14d6564da8393fd Author: Shenwei Wang Date: Thu Oct 27 08:08:58 2022 -0500 pinctrl: freescale: add pad wakeup config add the logic to configure the pad wakeup function via the pin_config_set handler. Signed-off-by: Shenwei Wang Reported-by: kernel test robot Reviewed-by: Peng Fan Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20221027130859.1444412-5-shenwei.wang@nxp.com Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-scu.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit a018750a2cceaf4427c4ee3d9ce3e83a171d5bd6 Author: Youghandhar Chintala Date: Fri Nov 4 14:24:03 2022 +0530 wifi: ath11k: Trigger sta disconnect on hardware restart Currently after the hardware restart triggered from the driver, the station interface connection remains intact, since a disconnect trigger is not sent to userspace. This can lead to a problem in targets where the wifi mac sequence is added by the firmware. After the target restart, its wifi mac sequence number gets reset to zero. Hence AP to which our device is connected will receive frames with a wifi mac sequence number jump to the past, thereby resulting in the AP dropping all these frames, until the frame arrives with a wifi mac sequence number which AP was expecting. To avoid such frame drops, its better to trigger a station disconnect upon target hardware restart which can be done with API ieee80211_reconfig_disconnect exposed to mac80211. The other targets are not affected by this change, since the hardware params flag is not set. Reported-by: kernel test robot Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Youghandhar Chintala Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221104085403.11025-1-quic_youghand@quicinc.com drivers/net/wireless/ath/ath11k/core.c | 6 ++++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + drivers/net/wireless/ath/ath11k/mac.c | 7 +++++++ 3 files changed, 14 insertions(+) commit ccb0e02787d0f80d0081c446aec3756dd8f7bfe0 Author: Matthew Auld Date: Mon Nov 7 16:54:14 2022 +0000 drm/i915/ttm: add some sanity checks for lmem_userfault_list Rather than getting some hard to debug uaf, add some warns to hopefully catch issues with userfault_count being non-zero when destroying the object. Also if we somehow add an object to lmem_userfault_list that somehow doesn't map lmem. References: https://gitlab.freedesktop.org/drm/intel/-/issues/7469 Signed-off-by: Matthew Auld Cc: Anshuman Gupta Cc: Rodrigo Vivi Cc: Andrzej Hajda Cc: Nirmoy Das Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20221107165414.56970-2-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 625b74460ec0978979f883fbee117e1b97e6e35e Author: Matthew Auld Date: Mon Nov 7 16:54:13 2022 +0000 drm/i915/ttm: fix uaf with lmem_userfault_list handling In the fault handler, make sure we check if the BO maps lmem after we schedule the migration, since the current resource might change from lmem to smem, if the pages are in the non-cpu visible portion of lmem. This then leads to adding the object to the lmem_userfault_list even though the current resource is no longer lmem. If we then destroy the object, the list might still contain a link to the now free object, since we only remove it if the object is still in lmem. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7469 Fixes: ad74457a6b5a ("drm/i915/dgfx: Release mmap on rpm suspend") Signed-off-by: Matthew Auld Cc: Anshuman Gupta Cc: Rodrigo Vivi Cc: Andrzej Hajda Cc: Nirmoy Das Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20221107165414.56970-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 735c466465eba51deaee3012d8403c10fc7c8c03 Author: Christian König Date: Mon Nov 7 20:40:11 2022 +0100 drm/ttm: optimize pool allocations a bit v2 If we got a page pool use it as much as possible. If we can't get more pages from the pool allocate as much as possible. Only if that still doesn't work reduce the order and try again. v2: minor cleanups Signed-off-by: Christian König Reviewed-by: Felix Kuehling Link: https://patchwork.freedesktop.org/patch/msgid/20221107195808.1873-1-christian.koenig@amd.com drivers/gpu/drm/ttm/ttm_pool.c | 82 +++++++++++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 24 deletions(-) commit 9a0f830f80265bd1ef816e1541ac24bee80e9a3c Author: Jakub Kicinski Date: Fri Nov 4 12:01:25 2022 -0700 ethtool: linkstate: add a statistic for PHY down events The previous attempt to augment carrier_down (see Link) was not met with much enthusiasm so let's do the simple thing of exposing what some devices already maintain. Add a common ethtool statistic for link going down. Currently users have to maintain per-driver mapping to extract the right stat from the vendor-specific ethtool -S stats. carrier_down does not fit the bill because it counts a lot of software related false positives. Add the statistic to the extended link state API to steer vendors towards implementing all of it. Implement for bnxt and all Linux-controlled PHYs. mlx5 and (possibly) enic also have a counter for this but I leave the implementation to their maintainers. Link: https://lore.kernel.org/r/20220520004500.2250674-1-kuba@kernel.org Reviewed-by: Florian Fainelli Reviewed-by: Michael Chan Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20221104190125.684910-1-kuba@kernel.org Signed-off-by: Paolo Abeni Documentation/networking/ethtool-netlink.rst | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 15 ++++++++++++++ drivers/net/phy/phy.c | 1 + include/linux/ethtool.h | 17 ++++++++++++++++ include/linux/phy.h | 3 +++ include/uapi/linux/ethtool_netlink.h | 1 + net/ethtool/linkstate.c | 24 ++++++++++++++++++++++- 7 files changed, 61 insertions(+), 1 deletion(-) commit 38e0d3fd1ee170ba95f908e1606fbb8763a98593 Author: Jani Nikula Date: Mon Nov 7 16:04:54 2022 +0200 drm/i915/pxp: use <> instead of "" for headers in include/ Headers in include/ should be included using the system header #include syntax. Fixes: 887a193b4fb1 ("drm/i915/pxp: add huc authentication and loading command") Cc: Tomas Winkler Cc: Vitaly Lubart Cc: Daniele Ceraolo Spurio Cc: Alan Previn Signed-off-by: Jani Nikula Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221107140454.2680954-1-jani.nikula@intel.com drivers/gpu/drm/i915/pxp/intel_pxp_huc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1e284ea984d3705e042b6b07469a66f1d43371e3 Merge: dbc1fdcbe274 7336c54a562b Author: Mauro Carvalho Chehab Date: Tue Nov 8 08:46:21 2022 +0000 Merge git://linuxtv.org/sailus/media_tree into media_stage * git://linuxtv.org/sailus/media_tree: (47 commits) media: i2c: ov4689: code cleanup media: ov9650: Drop platform data code path media: ov7670: Drop unused include media: ov2640: Drop legacy includes media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver media: dt-bindings: add bindings for Toshiba TC358746 phy: dphy: add support to calculate the timing based on hs_clk_rate phy: dphy: refactor get_default_config v4l: subdev: Warn if disabling streaming failed, return success dw9768: Enable low-power probe on ACPI media: i2c: imx290: Replace GAIN control with ANALOGUE_GAIN media: i2c: imx290: Add crop selection targets support media: i2c: imx290: Factor out format retrieval to separate function media: i2c: imx290: Move registers with fixed value to init array media: i2c: imx290: Create controls for fwnode properties media: i2c: imx290: Implement HBLANK and VBLANK controls media: i2c: imx290: Split control initialization to separate function media: i2c: imx290: Fix max gain value media: i2c: imx290: Add exposure time control media: i2c: imx290: Define more register macros ... commit dbc1fdcbe2745054b041488e3b097dd0c4760115 Merge: e0eee57eba92 df71c6e4d5e5 Author: Mauro Carvalho Chehab Date: Tue Nov 8 08:45:14 2022 +0000 Merge tag 'br-v6.2b' of git://linuxtv.org/hverkuil/media_tree into media_stage Tag branch * tag 'br-v6.2b' of git://linuxtv.org/hverkuil/media_tree: (24 commits) media: imx-jpeg: Lock on ioctl encoder/decoder stop cmd media: imx-jpeg: Support contiguous and non contiguous format media: imx-jpeg: Implement g_selection and s_selection mtk-jpegdec: add stop cmd interface for jpgdec media: mtk-jpegdec: refactor jpegdec func interface media: mtk-jpegdec: add output pic reorder interface media: mtk-jpegdec: add jpeg decode worker interface media: mtk-jpegdec: add jpegdec timeout func interface media: mtk-jpegdec: support jpegdec multi-hardware media: mtk-jpegdec: export jpeg decoder functions dt-bindings: mediatek: Add mediatek,mt8195-jpgdec compatible mtk-jpegenc: add stop cmd interface for jpgenc mtk-jpegenc: add output pic reorder interface mtk-jpegenc: add jpeg encode worker interface mtk-jpegenc: add jpegenc timeout func interface mtk-jpegenc: support jpegenc multi-hardware mtk-jpegenc: export jpeg encoder functions dt-bindings: mediatek: Add mediatek, mt8195-jpgenc compatible media: imx-jpeg: Disable useless interrupt to avoid kernel panic media: imx-jpeg: Don't clear stop state in handling dynamic resolution change ... commit e0eee57eba9289890abfcedddc55aafe4d229415 Author: Dafna Hirschfeld Date: Sat Oct 8 22:53:46 2022 +0100 media: vimc: Update device configuration in the documentation Current configuration in the document is outdated and doesn't work. Update it to match the configuration described in the following commit: commit 9b4a9b31b9ae ("media: vimc: Enable set resolution at the scaler src pad") Fixed commit description: Shuah Khan Signed-off-by: Dafna Hirschfeld Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/media/vimc.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 46cc031754985ee24034d55687540adb079f8630 Author: Vladimir Zapolskiy Date: Mon Jul 4 23:15:48 2022 +0100 media: camss: Split power domain management There are three cases of power domain management on supported platforms: 1) CAMSS on MSM8916, where a single VFE power domain is operated outside of the camss device driver, 2) CAMSS on MSM8996 and SDM630/SDM660, where two VFE power domains are managed separately by the camss device driver, the power domains are linked and unlinked on demand by their functions vfe_pm_domain_on() and vfe_pm_domain_off() respectively, 3) CAMSS on SDM845 and SM8250 platforms, and there are two VFE power domains and their parent power domain TITAN_TOP, the latter one shall be turned on prior to turning on any of VFE power domains. Due to a previously missing link between TITAN_TOP and VFEx power domains in the latter case, which is now fixed by [1], it was decided always to turn on all found VFE power domains and TITAN_TOP power domain, even if just one particular VFE is needed to be enabled or none of VFE power domains are required, for instance the latter case is when vfe_lite is in use. This misusage becomes more incovenient and clumsy, if next generations are to be supported, for instance CAMSS on SM8450 has three VFE power domains. The change splits the power management support for platforms with TITAN_TOP parent power domain, and, since 'power-domain-names' property is not present in camss device tree nodes, the assumption is that the first N power domains from the 'power-domains' list correspond to VFE power domains, and, if the number of power domains is greater than number of non-lite VFEs, then the last power domain from the list is the TITAN_TOP power domain. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss/camss-vfe-170.c | 20 ++++++++++++++- drivers/media/platform/qcom/camss/camss-vfe-480.c | 20 ++++++++++++++- drivers/media/platform/qcom/camss/camss.c | 30 ++++++++++++----------- 3 files changed, 54 insertions(+), 16 deletions(-) commit be11096d79d8dae4300dda2f0b5bdc39243950ca Author: Vladimir Zapolskiy Date: Mon Jul 4 23:15:47 2022 +0100 media: camss: Collect information about a number of lite VFEs VFE lite IPs are found on CAMSS with TITAN_TOP power domains, and in some aspects these types of VFEs are different, in particular there is no need to enable VFE power domains to operate over VFE lite IPs. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss/camss.c | 20 +++++++++++--------- drivers/media/platform/qcom/camss/camss.h | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) commit 3d658980e6dac2af6a024fdb6ded3d7bc44dc9ff Author: Vladimir Zapolskiy Date: Mon Jul 4 23:08:14 2022 +0100 media: camss: Do not attach an already attached power domain on MSM8916 platform The change to dynamically allocated power domains neglected a case of CAMSS on MSM8916 platform, where a single VFE power domain is neither attached, linked or managed in runtime in any way explicitly. This is a special case and it shall be kept as is, because the power domain management is done outside of the driver, and it's very different in comparison to all other platforms supported by CAMSS. Fixes: 6b1814e26989 ("media: camss: Allocate power domain resources dynamically") Signed-off-by: Vladimir Zapolskiy Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss/camss.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c8f3582345e6a69da65ab588f7c4c2d1685b0e80 Author: Vladimir Zapolskiy Date: Mon Jul 4 10:44:37 2022 +0100 media: camss: Clean up received buffers on failed start of streaming It is required to return the received buffers, if streaming can not be started. For instance media_pipeline_start() may fail with EPIPE, if a link validation between entities is not passed, and in such a case a user gets a kernel warning: WARNING: CPU: 1 PID: 520 at drivers/media/common/videobuf2/videobuf2-core.c:1592 vb2_start_streaming+0xec/0x160 Call trace: vb2_start_streaming+0xec/0x160 vb2_core_streamon+0x9c/0x1a0 vb2_ioctl_streamon+0x68/0xbc v4l_streamon+0x30/0x3c __video_do_ioctl+0x184/0x3e0 video_usercopy+0x37c/0x7b0 video_ioctl2+0x24/0x40 v4l2_ioctl+0x4c/0x70 The fix is to correct the error path in video_start_streaming() of camss. Fixes: 0ac2586c410f ("media: camss: Add files which handle the video device nodes") Signed-off-by: Vladimir Zapolskiy Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss/camss-video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 075e181fba721d7af83dd1f2b65aed64703f5a40 Author: Rafał Miłecki Date: Fri Nov 4 09:53:16 2022 +0100 dt-bindings: mtd: brcm,brcmnand: update interrupts description 1. DMA and EDU are mutually exclusive: don't allow both at the same time 2. Require interrupt-names for 2+ interrupts to avoid /guessing/ Reported-by: Florian Fainelli Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221104085316.24499-1-zajec5@gmail.com Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 80c2fe022ef5d29f3bafee90c37dbcff18cab57a Author: Rebecca Mckeever Date: Mon Nov 7 00:28:09 2022 -0600 memblock tests: remove completed TODO item Remove completed item from TODO list. Reviewed-by: David Hildenbrand Signed-off-by: Rebecca Mckeever Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/f2263abe45613b28f1583fbf04a4bffcf735bcf6.1667802195.git.remckee0@gmail.com tools/testing/memblock/TODO | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 62bdc99008b372a6c5f81e6d968f3b077a1e3667 Author: Rebecca Mckeever Date: Mon Nov 7 00:28:08 2022 -0600 memblock tests: add generic NUMA tests for memblock_alloc_exact_nid_raw Add tests for memblock_alloc_exact_nid_raw() where the simulated physical memory is set up with multiple NUMA nodes. Additionally, all but one of these tests set nid != NUMA_NO_NODE. All tests are run for both top-down and bottom-up allocation directions. The tested scenarios are: Range unrestricted: - region cannot be allocated: + there are no previously reserved regions, but requested node is too small + the requested node is fully reserved + the requested node is partially reserved and does not have enough space + none of the nodes have enough memory to allocate the region Range restricted: - region can be allocated in the specific node requested without dropping min_addr: + the range fully overlaps with the node, and there are adjacent reserved regions - region cannot be allocated: + range partially overlaps with two different nodes, where the second node is the requested node + range overlaps with multiple nodes along node boundaries, and the requested node starts after max_addr + nid is set to NUMA_NO_NODE and the total range can fit the region, but the range is split between two nodes and everything else is reserved Acked-by: David Hildenbrand Signed-off-by: Rebecca Mckeever Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/51b14da46e6591428df3aefc5acc7dca9341a541.1667802195.git.remckee0@gmail.com tools/testing/memblock/tests/alloc_exact_nid_api.c | 465 +++++++++++++++++++++ 1 file changed, 465 insertions(+) commit b6df23edb1ba65b0b46788a872ddc85dfe86ccf5 Author: Rebecca Mckeever Date: Mon Nov 7 00:28:07 2022 -0600 memblock tests: add bottom-up NUMA tests for memblock_alloc_exact_nid_raw Add tests for memblock_alloc_exact_nid_raw() where the simulated physical memory is set up with multiple NUMA nodes. Additionally, all of these tests set nid != NUMA_NO_NODE. These tests are run with a bottom-up allocation direction. The tested scenarios are: Range unrestricted: - region can be allocated in the specific node requested: + there are no previously reserved regions + the requested node is partially reserved but has enough space Range restricted: - region can be allocated in the specific node requested after dropping min_addr: + range partially overlaps with two different nodes, where the first node is the requested node + range partially overlaps with two different nodes, where the requested node ends before min_addr + range overlaps with multiple nodes along node boundaries, and the requested node ends before min_addr Acked-by: David Hildenbrand Signed-off-by: Rebecca Mckeever Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/935f0eed5e06fd44dc67d9f49b277923d7896bd3.1667802195.git.remckee0@gmail.com tools/testing/memblock/tests/alloc_exact_nid_api.c | 282 +++++++++++++++++++++ 1 file changed, 282 insertions(+) commit bfc05a4ce3650a1e5a47ccdaf8c87f814829b4a7 Author: Rebecca Mckeever Date: Mon Nov 7 00:28:06 2022 -0600 memblock tests: add top-down NUMA tests for memblock_alloc_exact_nid_raw Add tests for memblock_alloc_exact_nid_raw() where the simulated physical memory is set up with multiple NUMA nodes. Additionally, all of these tests set nid != NUMA_NO_NODE. These tests are run with a top-down allocation direction. The tested scenarios are: Range unrestricted: - region can be allocated in the specific node requested: + there are no previously reserved regions + the requested node is partially reserved but has enough space Range restricted: - region can be allocated in the specific node requested after dropping min_addr: + range partially overlaps with two different nodes, where the first node is the requested node + range partially overlaps with two different nodes, where the requested node ends before min_addr + range overlaps with multiple nodes along node boundaries, and the requested node ends before min_addr Acked-by: David Hildenbrand Signed-off-by: Rebecca Mckeever Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/2cc0883243d68ddc3faf833d2d9e86f48534c1d7.1667802195.git.remckee0@gmail.com tools/testing/memblock/tests/alloc_exact_nid_api.c | 344 +++++++++++++++++++++ tools/testing/memblock/tests/alloc_exact_nid_api.h | 16 + 2 files changed, 360 insertions(+) commit 61da03328a603d2d4a5b2e80cbe29bbf0122e6f8 Author: Rebecca Mckeever Date: Mon Nov 7 00:28:05 2022 -0600 memblock tests: introduce range tests for memblock_alloc_exact_nid_raw Add TEST_F_EXACT flag, which specifies that tests should run memblock_alloc_exact_nid_raw(). Introduce range tests for memblock_alloc_exact_nid_raw() by using the TEST_F_EXACT flag to run the range tests in alloc_nid_api.c, since memblock_alloc_exact_nid_raw() and memblock_alloc_try_nid_raw() behave the same way when nid = NUMA_NO_NODE. Rename tests and other functions in alloc_nid_api.c by removing "_try". Since the test names will be displayed in verbose output, they need to be general enough to refer to any of the memblock functions that the tests may run. Acked-by: David Hildenbrand Signed-off-by: Rebecca Mckeever Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/5a4b6d1b6130ab7375314e1c45a6d5813dfdabbd.1667802195.git.remckee0@gmail.com tools/testing/memblock/Makefile | 2 +- tools/testing/memblock/main.c | 2 + tools/testing/memblock/tests/alloc_exact_nid_api.c | 22 + tools/testing/memblock/tests/alloc_exact_nid_api.h | 9 + tools/testing/memblock/tests/alloc_nid_api.c | 546 +++++++++++---------- tools/testing/memblock/tests/alloc_nid_api.h | 1 + tools/testing/memblock/tests/common.h | 2 + 7 files changed, 320 insertions(+), 264 deletions(-) commit b8f6efccbb9dc0ff5dee7e20d69a4747298ee603 Author: Marek Vasut Date: Fri Nov 4 17:33:39 2022 +0100 wifi: rsi: Fix handling of 802.3 EAPOL frames sent via control port When using wpa_supplicant v2.10, this driver is no longer able to associate with any AP and fails in the EAPOL 4-way handshake while sending the 2/4 message to the AP. The problem is not present in wpa_supplicant v2.9 or older. The problem stems from HostAP commit 144314eaa ("wpa_supplicant: Send EAPOL frames over nl80211 where available") which changes the way EAPOL frames are sent, from them being send at L2 frames to them being sent via nl80211 control port. An EAPOL frame sent as L2 frame is passed to the WiFi driver with skb->protocol ETH_P_PAE, while EAPOL frame sent via nl80211 control port has skb->protocol set to ETH_P_802_3 . The later happens in ieee80211_tx_control_port(), where the EAPOL frame is encapsulated into 802.3 frame. The rsi_91x driver handles ETH_P_PAE EAPOL frames as high-priority frames and sends them via highest-priority transmit queue, while the ETH_P_802_3 frames are sent as regular frames. The EAPOL 4-way handshake frames must be sent as highest-priority, otherwise the 4-way handshake times out. Therefore, to fix this problem, inspect the skb control flags and if flag IEEE80211_TX_CTRL_PORT_CTRL_PROTO is set, assume this is an EAPOL frame and transmit the frame via high-priority queue just like other ETH_P_PAE frames. Fixes: 0eb42586cf87 ("rsi: data packet descriptor enhancements") Signed-off-by: Marek Vasut Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221104163339.227432-1-marex@denx.de drivers/net/wireless/rsi/rsi_91x_core.c | 4 +++- drivers/net/wireless/rsi/rsi_91x_hal.c | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit 9db485ce098fda396151253b34c5aa6a4fbf6c1b Author: Colin Ian King Date: Fri Nov 4 13:50:36 2022 +0000 wifi: iwlegacy: remove redundant variable len Variable len is being assigned and modified but it is never used. The variable is redundant and can be removed. Cleans up clang scan build warning: warning: variable 'len' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221104135036.225628-1-colin.i.king@gmail.com drivers/net/wireless/intel/iwlegacy/3945-mac.c | 6 ------ 1 file changed, 6 deletions(-) commit f7333fc2135b96dc36965a8e711a9275432256df Author: Chia-Yuan Li Date: Wed Nov 2 09:43:00 2022 +0800 wifi: rtw89: update D-MAC and C-MAC dump to diagnose SER To detect TX or RX stuck, we implement SER (system error recovery) in firmware to recover abnormal states of hardware, and report events to driver. This kind of events could happen rarely per day. SER might be true-positive or false-negative cases, and it could be failed to recover true-positive case. We dump related registers to kernel message at that moment and collect them from users, because they occur rarely, randomly and hard to make sure we reproduce the same symptom. To address problems accurately, add more registers by this patch. It also might be false-positive cases that looks like TX or RX get stuck, we need to dump registers from debugfs manually, so also add similar things to debugfs as well. Signed-off-by: Chia-Yuan Li Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221102014300.14091-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/debug.c | 426 +++++++++++++++++++++++------ drivers/net/wireless/realtek/rtw89/mac.c | 374 ++++++++++++++++++------- drivers/net/wireless/realtek/rtw89/mac.h | 1 + drivers/net/wireless/realtek/rtw89/pci.h | 12 + drivers/net/wireless/realtek/rtw89/reg.h | 229 +++++++++++++++- 5 files changed, 845 insertions(+), 197 deletions(-) commit d6197c9121dd72f35e5702aa55ee5c1583e0bfdb Author: Chia-Yuan Li Date: Wed Nov 2 09:42:59 2022 +0800 wifi: rtw89: dump dispatch status via debug port Dispatch is a component to decide packets forward to host, DMAC or HAXIDMA. It contains CDT standing for CPU dispatcher, HDT standing for host dispatcher, WDE standing for descriptor engine and PLE standing for payload engine. STF is one kind of modes, it can be used if packet send to hardware and doesn't need release report. These debug port information can help to clarify the reason if packets stuck in dispatch. Signed-off-by: Chia-Yuan Li Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221102014300.14091-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/debug.c | 575 +++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/mac.h | 45 +++ drivers/net/wireless/realtek/rtw89/reg.h | 5 + 3 files changed, 625 insertions(+) commit 417f173532cc1398e17a22bff50f93be40a8a7a8 Author: Christophe JAILLET Date: Tue Nov 1 22:13:50 2022 +0100 wifi: 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 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1ff34549af5ad6f7c80d5b9e11872b5499065fc1.1667336095.git.christophe.jaillet@wanadoo.fr drivers/net/wireless/ath/ath10k/debug.c | 5 +++-- drivers/net/wireless/ath/ath9k/ath9k.h | 1 + drivers/net/wireless/ath/ath9k/tx99.c | 2 +- drivers/net/wireless/marvell/mwifiex/debugfs.c | 2 +- drivers/net/wireless/marvell/mwifiex/main.h | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) commit c81c1fd4e907be6ac1da35ab062c8fa6dde000a3 Author: Prasanna Kerekoppa Date: Mon Oct 24 03:52:15 2022 -0500 wifi: brcmfmac: Avoiding Connection delay Channel info passed by supplicant is not given to firmware. This causes delay (about 3seconds) due to full scan. Supplicant already provides the channel info for the specific SSID. channel_hint carries this channel info for the connect call back. Patch has been verified on 43012 and 43455. Signed-off-by: Prasanna Kerekoppa Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221024085215.27616-4-ian.lin@infineon.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 52617bee3718d1315159569973d35107ea6b9a34 Author: Wataru Gohda Date: Mon Oct 24 03:52:14 2022 -0500 wifi: brcmfmac: Fix for when connect request is not success Currently brcmfmac is expecting to be set for both BRCMF_VIF_STATUS_EAP_SUCCESS and BRCMF_VIF_STATUS_EAP status bit based on dongle event and those bits are cleared to complete connect request successfully. But when connect request is finished unsuccessfully, either BRCMF_VIF_STATUS_EAP_SUCCESS / BRCMF_VIF_STATUS_EAP bits are not cleared depending on how the connect fail event happens. These status bits are carried over to following new connect request and this will lead to generate below kernel warning for some case. Worst case status mismatch happens between dongle and wpa_supplicant. WARNING: ../net/wireless/sme.c:756 __cfg80211_connect_result+0x42c/0x4a0 [cfg80211] The fix is to clear the BRCMF_VIF_STATUS_EAP_SUCCESS / BRCMF_VIF_STATUS_EAP bits during the link down process and add to call link down process when link down event received during BRCMF_VIF_STATUS_CONNECTING as well as BRCMF_VIF_STATUS_CONNECTED state. Signed-off-by: Wataru Gohda Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221024085215.27616-3-ian.lin@infineon.com .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit c7caaa6f727871ff00b49c3bb7260137a05491bf Author: Brian Henriquez Date: Mon Oct 24 03:52:13 2022 -0500 wifi: brcmfmac: correctly remove all p2p vif When deleting a P2P AGO interface we should make sure that relevant entry in bss_idx[] array is removed. We were always removing only 'vif' at P2PAPI_BSSCFG_CONNECTION before, regardless of the number of created P2P AGO interfaces. brcmfmac: correctly remove all p2p vif Signed-off-by: Brian Henriquez Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221024085215.27616-2-ian.lin@infineon.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 63dfc0c0fd48c371fa7b0ce718cf0d02f572f404 Author: Jiapeng Chong Date: Thu Jun 2 15:35:19 2022 +0800 drm/i915/gvt: Fix kernel-doc Fix the following W=1 kernel warnings: drivers/gpu/drm/i915/gvt/aperture_gm.c:308: warning: expecting prototype for inte_gvt_free_vgpu_resource(). Prototype was for intel_vgpu_free_resource() instead. drivers/gpu/drm/i915/gvt/aperture_gm.c:344: warning: expecting prototype for intel_alloc_vgpu_resource(). Prototype was for intel_vgpu_alloc_resource() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20220602073519.22363-1-jiapeng.chong@linux.alibaba.com Acked-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/aperture_gm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 400c0563bf2a9328eda5c4d67b3369100364c5c8 Author: Jiapeng Chong Date: Tue May 24 16:37:32 2022 +0800 drm/i915/gvt: Fix kernel-doc Fix the following W=1 kernel warnings: drivers/gpu/drm/i915/gvt/mmio_context.c:560: warning: expecting prototype for intel_gvt_switch_render_mmio(). Prototype was for intel_gvt_switch_mmio() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20220524083733.67148-1-jiapeng.chong@linux.alibaba.com Acked-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/mmio_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63ba856bf1e3627fd2c86cc6e7229d92dd3e887e Author: Jiapeng Chong Date: Tue May 24 16:37:33 2022 +0800 drm/i915/gvt: Fix kernel-doc Fix the following W=1 kernel warnings: drivers/gpu/drm/i915/gvt/handlers.c:3066: warning: expecting prototype for intel_t_default_mmio_write(). Prototype was for intel_vgpu_default_mmio_write() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20220524083733.67148-2-jiapeng.chong@linux.alibaba.com Acked-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28adfe402909dd8bca741c72619eae6f52364987 Author: Julia Lawall Date: Sat May 21 13:10:59 2022 +0200 drm/i915/gvt: fix typo in comment Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20220521111145.81697-49-Julia.Lawall@inria.fr Acked-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d667c94962c1c81ef587ac91dc5c01a1cfe339c7 Author: Baoquan He Date: Mon Oct 24 16:14:34 2022 +0800 mm/percpu: remove unused PERCPU_DYNAMIC_EARLY_SLOTS Since commit 40064aeca35c ("percpu: replace area map allocator with bitmap"), there's no place to use PERCPU_DYNAMIC_EARLY_SLOTS. So clean it up. Signed-off-by: Baoquan He Signed-off-by: Dennis Zhou include/linux/percpu.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 3289e0533e70aafa9fb6d128fd4452db1b8befe8 Author: Baoquan He Date: Mon Oct 24 16:14:33 2022 +0800 mm/percpu.c: remove the lcm code since block size is fixed at page size Since commit b239f7daf553 ("percpu: set PCPU_BITMAP_BLOCK_SIZE to PAGE_SIZE"), the PCPU_BITMAP_BLOCK_SIZE has been set to page size fixedly. So the lcm code in pcpu_alloc_first_chunk() doesn't make sense any more, clean it up. Signed-off-by: Baoquan He Signed-off-by: Dennis Zhou mm/percpu.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 83d261fc9e5fb03e8c32e365ca4ee53952611a2b Author: Baoquan He Date: Mon Oct 24 16:14:32 2022 +0800 mm/percpu: replace the goto with break In function pcpu_reclaim_populated(), the line of goto jumping is unnecessary since the label 'end_chunk' is near the end of the for loop, use break instead. Signed-off-by: Baoquan He Signed-off-by: Dennis Zhou mm/percpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 73046f8d31701c379f6db899cb09ba70a3285143 Author: Baoquan He Date: Tue Oct 25 11:45:16 2022 +0800 mm/percpu: add comment to state the empty populated pages accounting When allocating an area from a chunk, pcpu_block_update_hint_alloc() is called to update chunk metadata, including chunk's and global nr_empty_pop_pages. However, if the allocation is not atomic, some blocks may not be populated with pages yet, while we still subtract the number here. The number of pages will be added back with pcpu_chunk_populated() when populating pages. Adding code comment to make that more understandable. Signed-off-by: Baoquan He Signed-off-by: Dennis Zhou mm/percpu.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit e04cb6976340d5ebf2b28ad91bf6a13a285aa566 Author: Baoquan He Date: Mon Oct 24 16:14:30 2022 +0800 mm/percpu: Update the code comment when creating new chunk The lock pcpu_alloc_mutex taking code has been moved to the beginning of pcpu_allo() if it's non atomic allocation. So the code comment above above pcpu_create_chunk() callsite need be updated. Signed-off-by: Baoquan He Signed-off-by: Dennis Zhou mm/percpu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c1f6688d35d47ca11200789b000b3b20f5ecdbd9 Author: Baoquan He Date: Tue Oct 25 11:11:45 2022 +0800 mm/percpu: use list_first_entry_or_null in pcpu_reclaim_populated() To replace list_empty()/list_first_entry() pair to simplify code. Signed-off-by: Baoquan He Acked-by: Dennis Zhou Signed-off-by: Dennis Zhou mm/percpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5a7d596a05dddd09c44ae462f881491cf87ed120 Author: Baoquan He Date: Mon Oct 24 16:14:28 2022 +0800 mm/percpu: remove unused pcpu_map_extend_chunks Since commit 40064aeca35c ("percpu: replace area map allocator with bitmap"), it is unneeded. Signed-off-by: Baoquan He Signed-off-by: Dennis Zhou mm/percpu.c | 3 --- 1 file changed, 3 deletions(-) commit 49e8e6343df688d68b12c2af50791ca37520f0b7 Merge: 60ba8c5bd94e fcf00f8d29f2 Author: Dave Airlie Date: Tue Nov 8 16:32:31 2022 +1000 Merge tag 'amd-drm-next-6.2-2022-11-04' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.2-2022-11-04: amdgpu: - Add TMZ support for GC 11.0.1 - More IP version check conversions - Mode2 reset fixes for sienna cichlid - SMU 13.x fixes - RAS enablement on MP 13.x - Replace kmap with kmap_local_page() - Misc Clang warning fixes - SR-IOV fixes for GC 11.x - PCI AER fix - DCN 3.2.x commit sequence rework - SDMA 4.x doorbell fix - Expose additional new GC 11.x firmware versions - Misc code cleanups - S0i3 fixes - More DC FPU cleanup - Add more DC kerneldoc - Misc spelling and grammer fixes - DCN 3.1.x fixes - Plane modifier fix - MCA RAS enablement - Secure display locking fix - RAS TA rework - RAS EEPROM fixes - Fail suspend if eviction fails - Drop AMD specific DSC workarounds in favor of drm EDID quirks - SR-IOV suspend/resume fixes - Enable DCN support for ARM - Enable secure display on DCN 2.1 amdkfd: - Cache size fixes for GC 10.3.x - kfd_dev struct cleanup - GC11.x CWSR trap handler fix - Userptr fixes - Warning fixes radeon: - Replace kmap with kmap_local_page() UAPI: - Expose additional new GC 11.x firmware versions via the existing INFO query drm: - Add some new EDID DSC quirks Signed-off-by: Dave Airlie # Conflicts: # drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20221104205827.6008-1-alexander.deucher@amd.com commit ece3c3198182a13825a7f02844894ba6a03d58d1 Author: Krzysztof Kozlowski Date: Wed Nov 2 12:31:53 2022 -0400 dt-bindings: clock: qcom: Clean-up titles and descriptions Clean the Qualcomm SoCs clock bindings: 1. Drop redundant "bindings" in title. 2. Correct language grammar ", which supports" -> "provides". 3. Use full path to the bindings header, so tools can validate it. 4. Drop quotes where not needed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jeffrey Hugo # msm8998 Acked-by: Jeffrey Hugo # mmcc Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221102163153.55460-2-krzysztof.kozlowski@linaro.org .../devicetree/bindings/clock/qcom,a53pll.yaml | 2 +- .../devicetree/bindings/clock/qcom,a7pll.yaml | 2 +- .../bindings/clock/qcom,aoncc-sm8250.yaml | 2 +- .../bindings/clock/qcom,audiocc-sm8250.yaml | 2 +- .../bindings/clock/qcom,camcc-sm8250.yaml | 6 ++--- .../bindings/clock/qcom,dispcc-sm6125.yaml | 9 +++---- .../bindings/clock/qcom,dispcc-sm6350.yaml | 8 +++--- .../bindings/clock/qcom,dispcc-sm8x50.yaml | 14 +++++----- .../bindings/clock/qcom,gcc-apq8064.yaml | 18 ++++++------- .../bindings/clock/qcom,gcc-apq8084.yaml | 10 ++++---- .../bindings/clock/qcom,gcc-ipq8064.yaml | 18 ++++++------- .../bindings/clock/qcom,gcc-ipq8074.yaml | 9 +++---- .../bindings/clock/qcom,gcc-msm8660.yaml | 12 ++++----- .../bindings/clock/qcom,gcc-msm8909.yaml | 9 +++---- .../bindings/clock/qcom,gcc-msm8916.yaml | 16 ++++++------ .../bindings/clock/qcom,gcc-msm8976.yaml | 9 +++---- .../bindings/clock/qcom,gcc-msm8994.yaml | 9 +++---- .../bindings/clock/qcom,gcc-msm8996.yaml | 7 +++-- .../bindings/clock/qcom,gcc-msm8998.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-other.yaml | 30 +++++++++++----------- .../bindings/clock/qcom,gcc-qcm2290.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-qcs404.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-sc7180.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-sc7280.yaml | 9 +++---- .../bindings/clock/qcom,gcc-sc8180x.yaml | 9 +++---- .../bindings/clock/qcom,gcc-sc8280xp.yaml | 7 +++-- .../devicetree/bindings/clock/qcom,gcc-sdm660.yaml | 8 +++--- .../devicetree/bindings/clock/qcom,gcc-sdm845.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-sdx55.yaml | 7 +++-- .../devicetree/bindings/clock/qcom,gcc-sdx65.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-sm6115.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-sm6125.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-sm6350.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-sm8150.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-sm8250.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-sm8350.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc-sm8450.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gcc.yaml | 6 ++--- .../bindings/clock/qcom,gpucc-sdm660.yaml | 4 +-- .../bindings/clock/qcom,gpucc-sm8350.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,gpucc.yaml | 22 ++++++++-------- .../devicetree/bindings/clock/qcom,mmcc.yaml | 4 +-- .../bindings/clock/qcom,msm8998-gpucc.yaml | 8 +++--- .../devicetree/bindings/clock/qcom,q6sstopcc.yaml | 2 +- .../bindings/clock/qcom,qcm2290-dispcc.yaml | 8 +++--- .../bindings/clock/qcom,sc7180-camcc.yaml | 9 +++---- .../bindings/clock/qcom,sc7180-dispcc.yaml | 8 +++--- .../bindings/clock/qcom,sc7180-lpasscorecc.yaml | 9 +++---- .../devicetree/bindings/clock/qcom,sc7180-mss.yaml | 7 +++-- .../bindings/clock/qcom,sc7280-camcc.yaml | 6 ++--- .../bindings/clock/qcom,sc7280-dispcc.yaml | 8 +++--- .../bindings/clock/qcom,sc7280-lpasscc.yaml | 9 +++---- .../bindings/clock/qcom,sc7280-lpasscorecc.yaml | 12 ++++----- .../bindings/clock/qcom,sdm845-camcc.yaml | 8 +++--- .../bindings/clock/qcom,sdm845-dispcc.yaml | 8 +++--- .../bindings/clock/qcom,sm6115-dispcc.yaml | 7 +++-- .../devicetree/bindings/clock/qcom,sm6375-gcc.yaml | 9 +++---- .../bindings/clock/qcom,sm8450-camcc.yaml | 8 +++--- .../bindings/clock/qcom,sm8450-dispcc.yaml | 7 +++-- .../devicetree/bindings/clock/qcom,videocc.yaml | 20 +++++++-------- 60 files changed, 258 insertions(+), 289 deletions(-) commit 842b4ca1cb8cf547dc63cfe37342f0704454ac2f Author: Krzysztof Kozlowski Date: Wed Nov 2 12:31:52 2022 -0400 dt-bindings: clock: qcom,gcc-ipq8074: Use common GCC schema Reference common Qualcomm GCC schema to remove common pieces. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221102163153.55460-1-krzysztof.kozlowski@linaro.org .../bindings/clock/qcom,gcc-ipq8074.yaml | 25 ++++------------------ 1 file changed, 4 insertions(+), 21 deletions(-) commit fe7e7def2ffc2962644de7abccf2ce85b5f07509 Author: AngeloGioacchino Del Regno Date: Fri Nov 4 18:21:17 2022 +0100 dt-bindings: soc: qcom: qcom,smd-rpm: Use qcom,smd-channels on MSM8976 Like MSM8916 and some others, MSM8976 uses qcom,smd-channels and not qcom,glink-channels. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104172122.252761-5-angelogioacchino.delregno@collabora.com Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 1 + 1 file changed, 1 insertion(+) commit d6e636787d462c047a424dd442b68a249edde2a7 Author: Dmitry Baryshkov Date: Wed Nov 2 21:44:10 2022 +0300 arm64: dts: qcom: msm8996: change order of SMMU clocks on this platform Change order of SMMU clocks to match the schema. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221102184420.534094-2-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit dba79b78ecc18f7788fd08eb998388e226817fb5 Author: Serge Semin Date: Mon Nov 7 23:43:54 2022 +0300 dt-bindings: opp-v2: Fix clock-latency-ns prop in example Accidentally discovered a hidden typo in the DT-nodes defined in the opp-v2 bindings example. Instead of specifying the "clock-latency-ns" property the DT-node has been created with the "lock-latency-ns" property in it, which doesn't exist neither in opp-v2 nor in the base schemas. Let's fix the name to having the "clock-" prefix as it was originally implied and as the rest of the similar nodes has. Fixes: 94274f20f6bf ("dt-bindings: opp: Convert to DT schema") Signed-off-by: Serge Semin Signed-off-by: Viresh Kumar Documentation/devicetree/bindings/opp/opp-v2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d9a666d49bf57c6a176e5fcf1b39046ee6a728f Author: Job Noorman Date: Mon Nov 7 11:56:04 2022 +0100 arm64: dts: qcom: sdm632: fairphone-fp3: add touchscreen Add Himax hx83112b touchscreen to the FP3 DT. Signed-off-by: Job Noorman Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107105604.26541-4-job@noorman.info arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4420e60416cb9073fb0d2cb6f10d1830e2a84646 Author: Konrad Dybcio Date: Mon Nov 7 13:09:19 2022 +0100 arm64: dts: qcom: Add device tree for Sony Xperia 10 IV Add support for Sony Xperia 10 IV, a.k.a PDX225. This device is a part of the SoMC SM6375 Murray platform and currently it is the only device based on that board, so no -common DTSI is created until (if?) other Murray devices appear. This commit brings support for: * USB (only USB2 for now) * Display via simplefb To create a working boot image, you need to run: cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/sm6375-sony-xperia-\ murray-pdx225.dtb > .Image.gz-dtb mkbootimg \ --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 12 \ --os_patch_level 2022-04 \ # or newer -o boot.img-sony-xperia-pdx225 Then, you need to flash it on the device and get rid of all the vendor_boot/dtbo mess: First, you need to get rid of vendor_boot. However, the bootloader is utterly retarded and it will not let you neither flash nor erase it. There are a couple ways to handle this: you can either dd /dev/zero to it from Android (if you have root) or a custom recovery or from fastbootd (fastboot/adb reboot fastboot). You will not be able to boot Android images on your phone unless you lock the bootloader (fastboot oem lock) and restore the factory image with Xperia Companion Windows-and-macOS-only software. The best way so far is probably to use the second (_b) slot and flash mainline there. This will however require you to flash some partitions manually, as they are not populated from factory: (boot_b, dtbo_b, vendor_boot_b, vbmeta_b, vbmeta_system_b) - these we don't really care about as we nuke/replace them (dsp_b, imagefv_b, modem_b, oem_b, rdimage_b) - these you NEED to populate to get a successful boot on slot B, otherwise you will have limited / no functionality. To switch slots, simply run: fastboot --set-active=a //or =b The rest assumes you are on slot A. // You have to either pull vbmeta{"","_system"} from // /dev/block/bootdevice/by-name/ or build one as a part of AOSP fastboot --disable-verity --disable-verification flash vbmeta_b vbmeta.img fastboot --disable-verity --disable-verification flash vbmeta_system_b \ vbmeta_system.img fastboot flash boot_b boot.img-sony-xperia-pdx225 fastboot reboot fastboot // entering fastbootd fastboot flash vendor_boot_b emptything.img fastboot flash dtbo_b emptything.img fastboot reboot bootloader // entering bootloader fastboot fastboot --set-active=b fastboot reboot // mainline time! Where emptything.img is a tiny file that consists of 2 bytes (all zeroes), doing a "fastboot erase" won't cut it, the bootloader will go crazy and things will fall apart when it tries to overlay random bytes from an empty partition onto a perfectly good appended DTB. From there on you can flash new mainline builds by simply flashing boot.img that you create after each kernel rebuild. 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/20221107120920.12593-4-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/Makefile | 1 + .../dts/qcom/sm6375-sony-xperia-murray-pdx225.dts | 86 ++++++++++++++++++++++ 2 files changed, 87 insertions(+) commit 59d34ca97f91df08d56d3ac843c7a8c6935bfca8 Author: Konrad Dybcio Date: Mon Nov 7 13:09:18 2022 +0100 arm64: dts: qcom: Add initial device tree for SM6375 Add an initial device tree for the SM6375 (SD695) SoC. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107120920.12593-3-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sm6375.dtsi | 804 +++++++++++++++++++++++++++++++++++ 1 file changed, 804 insertions(+) commit 03ed3432a4e457ee08261ff0639ae99ae3dfa909 Author: Konrad Dybcio Date: Mon Nov 7 13:09:17 2022 +0100 dt-bindings: arm: qcom: Document SM6375 & Xperia 10 IV Add compatibles for Sony Xperia 10 IV (PDX225) and the SM6375 SoC it's based on. 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/20221107120920.12593-2-konrad.dybcio@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 7c1b74e079b983196512769f19812d883d4b87fa Author: Konrad Dybcio Date: Mon Nov 7 13:09:16 2022 +0100 dt-bindings: arm: cpus: Add Kryo 660 CPUs Add a compatible for Kryo 660 CPUs found in at least Qualcomm SM6375. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107120920.12593-1-konrad.dybcio@linaro.org Documentation/devicetree/bindings/arm/cpus.yaml | 1 + 1 file changed, 1 insertion(+) commit 91c596cc8d321cd00b8782a2b16772a033a0adf8 Merge: 49eb9446b0af 5e2ea7801fac Author: Jakub Kicinski Date: Mon Nov 7 20:00:13 2022 -0800 Merge branch 'net-txgbe-fix-two-bugs-in-txgbe_calc_eeprom_checksum' YueHaibing says: ==================== net: txgbe: Fix two bugs in txgbe_calc_eeprom_checksum Fix memleak and unsigned comparison bugs in txgbe_calc_eeprom_checksum ==================== Link: https://lore.kernel.org/r/20221105080722.20292-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski commit 5e2ea7801faccc011359db5ad6af5987b513f314 Author: YueHaibing Date: Sat Nov 5 16:07:22 2022 +0800 net: txgbe: Fix unsigned comparison to zero in txgbe_calc_eeprom_checksum() The error checks on checksum for a negative error return always fails because it is unsigned and can never be negative. Fixes: 049fe5365324 ("net: txgbe: Add operations to interact with firmware") Signed-off-by: YueHaibing Signed-off-by: Jakub Kicinski drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a068d33e542f5d5be2e5de3cf1122c4347d3e2af Author: YueHaibing Date: Sat Nov 5 16:07:21 2022 +0800 net: txgbe: Fix memleak in txgbe_calc_eeprom_checksum() eeprom_ptrs should be freed before returned. Fixes: 049fe5365324 ("net: txgbe: Add operations to interact with firmware") Signed-off-by: YueHaibing Signed-off-by: Jakub Kicinski drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a4633387ce9481a10068f4e6a939c5a694e3f2da Author: Krzysztof Kozlowski Date: Mon Nov 7 19:59:31 2022 +0100 ARM: dts: qcom-apq8060: 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 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107185931.22075-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 126 ++++++++++--------------- 1 file changed, 51 insertions(+), 75 deletions(-) commit 49eb9446b0af477e1e0ec7217efa5c5e57183c6c Merge: e69761483361 e9d696cb44e3 Author: Jakub Kicinski Date: Mon Nov 7 19:55:52 2022 -0800 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-11-04 (ixgbe, ixgbevf, igb) This series contains updates to ixgbe, ixgbevf, and igb drivers. Daniel Willenson adjusts descriptor buffer limits to be based on what hardware supports instead of using a generic, least common value for ixgbe. Ani removes local variable for ixgbe, instead returning conditional result directly. Yang Li removes unneeded semicolon for ixgbe. Jan adds error messaging when VLAN errors are encountered for ixgbevf. Kees Cook prevents a potential use after free condition and explicitly rounds up q_vector allocations so that allocations can be correctly compared to ksize() for igb. * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: igb: Proactively round up to kmalloc bucket size igb: Do not free q_vector unless new one was allocated ixgbevf: Add error messages on vlan error ixgbe: Remove unneeded semicolon ixgbe: Remove local variable ixgbe: change MAX_RXD/MAX_TXD based on adapter type ==================== Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20221104205414.2354973-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit e56ca6bcd2136207868516f5a304fbb82cc0cb82 Author: Christophe JAILLET Date: Tue Nov 1 22:13:52 2022 +0100 scsi: target: 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/fcddc0a53b4fc6e3c2e93592d3f61c5c63121855.1667336095.git.christophe.jaillet@wanadoo.fr Reviewed-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen drivers/target/target_core_configfs.c | 29 ++++++++++++++-------------- drivers/target/target_core_fabric_configfs.c | 3 ++- 2 files changed, 17 insertions(+), 15 deletions(-) commit 9ec68fea9e53d25177618d2ce1bc4a1b1b724938 Author: Stephen Boyd Date: Mon Nov 7 11:15:35 2022 -0800 arm64: dts: qcom: sc7180: Fully describe fingerprint node on Trogdor Update the fingerprint node on Trogdor to match the fingerprint DT binding. This will allow us to drive the reset and boot gpios from the driver when it is re-attached after flashing. We'll also be able to boot the fingerprint processor if the BIOS isn't doing it for us. Cc: Douglas Anderson Cc: Matthias Kaehlcke Cc: Alexandru M Stan Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107191535.624371-3-swboyd@chromium.org arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit aefd5370ab5e55a18c94573b9602083132e24601 Author: Stephen Boyd Date: Mon Nov 7 11:15:34 2022 -0800 arm64: dts: qcom: sc7280: Fully describe fingerprint node on Herobrine Update the fingerprint node on Herobrine to match the fingerprint DT binding. This will allow us to drive the reset and boot gpios from the driver when it is re-attached after flashing. We'll also be able to boot the fingerprint processor if the BIOS isn't doing it for us. Cc: Douglas Anderson Cc: Matthias Kaehlcke Cc: Alexandru M Stan Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107191535.624371-2-swboyd@chromium.org arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bc81131813aaf6fe764d1cc6b942a35a8c0c5c36 Author: Colin Ian King Date: Tue Nov 1 10:53:26 2022 +0000 scsi: target: core: Remove unused variable 'unit_serial_len' Variable 'unit_serial_len' is just being assigned and it's never used anywhere else. Remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221101105326.31037-1-colin.i.king@gmail.com Signed-off-by: Martin K. Petersen drivers/target/target_core_spc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 0aa46eba29553035d6af8384f19dfee2258d2a46 Author: Colin Ian King Date: Tue Nov 1 12:32:35 2022 +0000 scsi: csiostor: Remove unused variable 'n' Variable 'n' is just being incremented and it's never used anywhere else. Remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221101123235.52152-1-colin.i.king@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/csiostor/csio_wr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e137b81d30e7ef8ec27a77c3b2cbbad52845872a Author: Colin Ian King Date: Tue Nov 1 10:47:33 2022 +0000 scsi: qla2xxx: Remove unused variable 'found_devs' Variable 'found_devs' is just being incremented and it's never used anywhere else. Remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221101104733.30363-1-colin.i.king@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 4 ---- 1 file changed, 4 deletions(-) commit 4fb2169d66b837a2986f569f5d5b81f79e6e4a4c Author: Bart Van Assche Date: Mon Oct 31 15:48:18 2022 -0700 scsi: qla2xxx: Fix set-but-not-used variable warnings Fix the following two compiler warnings: drivers/scsi/qla2xxx/qla_init.c: In function ‘qla24xx_async_abort_cmd’: drivers/scsi/qla2xxx/qla_init.c:171:17: warning: variable ‘bail’ set but not used [-Wunused-but-set-variable] 171 | uint8_t bail; | ^~~~ drivers/scsi/qla2xxx/qla_init.c: In function ‘qla2x00_async_tm_cmd’: drivers/scsi/qla2xxx/qla_init.c:2023:17: warning: variable ‘bail’ set but not used [-Wunused-but-set-variable] 2023 | uint8_t bail; | ^~~~ Cc: Arun Easi Cc: Giridhar Malavali Fixes: feafb7b1714c ("[SCSI] qla2xxx: Fix vport delete issues") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221031224818.2607882-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 22 +++++++++++----------- drivers/scsi/qla2xxx/qla_init.c | 6 ++---- drivers/scsi/qla2xxx/qla_inline.h | 4 +--- drivers/scsi/qla2xxx/qla_os.c | 4 +--- 4 files changed, 15 insertions(+), 21 deletions(-) commit 2e79cf37b15b1936f8630d9c5805d2c76bde213b Author: Bart Van Assche Date: Mon Oct 31 15:47:28 2022 -0700 scsi: bfa: Rework bfad_reset_sdev_bflags() Since commit f93ed747e2c7 ("scsi: core: Release SCSI devices synchronously") it is no longer allowed to call scsi_device_put() from atomic context. Rework bfad_reset_sdev_bflags() such that scsi_device_put() is no longer called. This fixes the following smatch warning: drivers/scsi/bfa/bfad_bsg.c:2551 bfad_iocmd_lunmask_reset_lunscan_mode() warn: sleeping in atomic context bfad_iocmd_lunmask() <- disables preempt -> bfad_iocmd_lunmask_reset_lunscan_mode() -> scsi_device_put() Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Cc: Dan Carpenter Reported-by: Dan Carpenter Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221031224728.2607760-5-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfad_bsg.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2e5a6c3baccd31476ed00c3fbc413b48ddd87993 Author: Bart Van Assche Date: Mon Oct 31 15:47:27 2022 -0700 scsi: bfa: Convert bfad_reset_sdev_bflags() from a macro into a function Before modifying bfad_reset_sdev_bflags(), convert it from a macro into a function. Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221031224728.2607760-4-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfad_bsg.c | 27 +++++++++++++++++++++++++++ drivers/scsi/bfa/bfad_im.h | 26 -------------------------- 2 files changed, 27 insertions(+), 26 deletions(-) commit 379e2554e3d10e87c0c0a728ef538f3c26d82a98 Author: Bart Van Assche Date: Mon Oct 31 15:47:26 2022 -0700 scsi: alua: Move a scsi_device_put() call out of alua_rtpg_select_sdev() Move a scsi_device_put() call from alua_rtpg_select_sdev() to its callers. Fixes the following smatch complaint: drivers/scsi/device_handler/scsi_dh_alua.c:853 alua_rtpg_select_sdev() warn: sleeping in atomic context alua_rtpg_work() <- disables preempt -> alua_rtpg_select_sdev() -> scsi_device_put() Cc: Hannes Reinecke Cc: Dan Carpenter Reported-by: Dan Carpenter Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221031224728.2607760-3-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 38 +++++++++++++++++++----------- 1 file changed, 24 insertions(+), 14 deletions(-) commit 0b25e17e9018a0ea68a9f0b4787672e8c68fa8d5 Author: Bart Van Assche Date: Mon Oct 31 15:47:25 2022 -0700 scsi: alua: Move a scsi_device_put() call out of alua_check_vpd() Fix the following smatch warning: drivers/scsi/device_handler/scsi_dh_alua.c:1013 alua_rtpg_queue() warn: sleeping in atomic context alua_check_vpd() <- disables preempt -> alua_rtpg_queue() -> scsi_device_put() Cc: Hannes Reinecke Cc: Dan Carpenter Reported-by: Dan Carpenter Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221031224728.2607760-2-bvanassche@acm.org Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 3d6d7930928ace6b982258ebb81d585fe20e9f44 Author: Keoseong Park Date: Thu Nov 3 14:53:49 2022 +0900 scsi: ufs: core: Remove check_upiu_size() from ufshcd.h Commit 68078d5cc1a5 ("[SCSI] ufs: Set fDeviceInit flag to initiate device initialization") added check_upiu_size(), but no caller. Cc: Dolev Raviv Link: https://lore.kernel.org/r/20221103055349epcms2p338f2550c2dd78d00231a83b24719a3d4@epcms2p3 Signed-off-by: Keoseong Park Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen include/ufs/ufshcd.h | 6 ------ 1 file changed, 6 deletions(-) commit 3d75e766b58a7410d4e835c534e1b4664a8f62d0 Author: Nathan Chancellor Date: Wed Nov 2 09:19:06 2022 -0700 scsi: elx: libefc: Fix second parameter type in state callbacks With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/scsi/elx/libefc/efc_node.c:811:22: error: incompatible function pointer types assigning to 'void (*)(struct efc_sm_ctx *, u32, void *)' (aka 'void (*)(struct efc_sm_ctx *, unsigned int, void *)') from 'void (*)(struct efc_sm_ctx *, enum efc_sm_event, void *)' [-Werror,-Wincompatible-function-pointer-types-strict] ctx->current_state = state; ^ ~~~~~ drivers/scsi/elx/libefc/efc_node.c:878:21: error: incompatible function pointer types assigning to 'void (*)(struct efc_sm_ctx *, u32, void *)' (aka 'void (*)(struct efc_sm_ctx *, unsigned int, void *)') from 'void (*)(struct efc_sm_ctx *, enum efc_sm_event, void *)' [-Werror,-Wincompatible-function-pointer-types-strict] node->nodedb_state = state; ^ ~~~~~ drivers/scsi/elx/libefc/efc_node.c:905:6: error: incompatible function pointer types assigning to 'void (*)(struct efc_sm_ctx *, enum efc_sm_event, void *)' from 'void (*)(struct efc_sm_ctx *, u32, void *)' (aka 'void (*)(struct efc_sm_ctx *, unsigned int, void *)') [-Werror,-Wincompatible-function-pointer-types-strict] pf = node->nodedb_state; ^ ~~~~~~~~~~~~~~~~~~ drivers/scsi/elx/libefc/efc_device.c:455:22: error: incompatible function pointer types assigning to 'void (*)(struct efc_sm_ctx *, u32, void *)' (aka 'void (*)(struct efc_sm_ctx *, unsigned int, void *)') from 'void (struct efc_sm_ctx *, enum efc_sm_event, void *)' [-Werror,-Wincompatible-function-pointer-types-strict] node->nodedb_state = __efc_d_init; ^ ~~~~~~~~~~~~ drivers/scsi/elx/libefc/efc_sm.c:41:22: error: incompatible function pointer types assigning to 'void (*)(struct efc_sm_ctx *, u32, void *)' (aka 'void (*)(struct efc_sm_ctx *, unsigned int, void *)') from 'void (*)(struct efc_sm_ctx *, enum efc_sm_event, void *)' [-Werror,-Wincompatible-function-pointer-types-strict] ctx->current_state = state; ^ ~~~~~ The type of the second parameter in the prototypes of ->current_state() and ->nodedb_state() ('u32') does not match the implementations, which have a second parameter type of 'enum efc_sm_event'. Update the prototypes to have the correct second parameter type, clearing up all the warnings and CFI failures. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Reported-by: Sami Tolvanen Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20221102161906.2781508-1-nathan@kernel.org Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen drivers/scsi/elx/libefc/efclib.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b817e6ffbad7a1a0a5ca5bb7d4020823c3f4d9d0 Author: Bart Van Assche Date: Mon Oct 31 11:34:21 2022 -0700 scsi: ufs: core: Introduce ufshcd_abort_all() Move the code for aborting all SCSI commands and TMFs into a new function. This patch makes the ufshcd_err_handler() easier to read. Except for adding more logging, this patch does not change any functionality. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221031183433.2443554-1-bvanassche@acm.org Reviewed-by: Adrian Hunter Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 62 ++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 28 deletions(-) commit 81cb3eb68af5d0bee61ea45a72a0e6e3862b246f Author: Colin Ian King Date: Mon Oct 31 16:05:12 2022 +0000 scsi: BusLogic: Remove variable 'adapter_count' Variable 'adapter_count' is just being incremented and it's never used anywhere else. Remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221031160512.872153-1-colin.i.king@gmail.com Acked-by: Khalid Aziz Signed-off-by: Martin K. Petersen drivers/scsi/BusLogic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c7cbaab2d464484008b4f8ed66b6bb0ee99745c2 Author: Colin Ian King Date: Mon Oct 31 15:45:38 2022 +0000 scsi: message: fusion: Remove variable 'where' Variable 'where' is just being incremented and it's never used anywhere else. Remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221031154538.870223-1-colin.i.king@gmail.com Signed-off-by: Martin K. Petersen drivers/message/fusion/mptctl.c | 2 -- 1 file changed, 2 deletions(-) commit e47c49219c1e20760cd66cef4411b35a3a86c0a2 Author: Jilin Yuan Date: Fri Oct 28 21:37:08 2022 +0800 scsi: NCR5380: Fix repeated words in comment Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20221028133708.60030-1-yuanjilin@cdjrlc.com Acked-by: Finn Thain Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc77fb9ce40c276cedf889dca2bc6d1b1edc2763 Author: Keoseong Park Date: Fri Oct 28 16:35:53 2022 +0900 scsi: ufs: core: Refactor ufshcd_hba_enable() Use "if error return" style in ufshcd_hba_enable(). No functional change. Cc: Bart Van Assche Cc: Alim Akhtar Signed-off-by: Keoseong Park Link: https://lore.kernel.org/r/20221028073553epcms2p6dc4f8bdbebdc8f96f43fc4197b3edd0c@epcms2p6 Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit e69761483361f3df455bc493c99af0ef1744a14f Author: Tao Chen Date: Sat Nov 5 17:05:04 2022 +0800 netlink: Fix potential skb memleak in netlink_ack Fix coverity issue 'Resource leak'. We should clean the skb resource if nlmsg_put/append failed. Fixes: 738136a0e375 ("netlink: split up copies in the ack construction") Signed-off-by: Tao Chen Link: https://lore.kernel.org/r/bff442d62c87de6299817fe1897cc5a5694ba9cc.1667638204.git.chentao.kernel@linux.alibaba.com Signed-off-by: Jakub Kicinski net/netlink/af_netlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 14ef5c39891ede40e40797f7e9da845896c86670 Author: Roman Gushchin Date: Fri Nov 4 13:48:37 2022 -0700 net: macb: implement live mac addr change Implement live mac addr change for the macb ethernet driver. Signed-off-by: Roman Gushchin Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20221104204837.614459-1-roman.gushchin@linux.dev Signed-off-by: Jakub Kicinski drivers/net/ethernet/cadence/macb_main.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit e1f4ecab19338ec7079830e8700e4869f991fd45 Author: Russell King (Oracle) Date: Fri Nov 4 17:13:01 2022 +0000 net: remove explicit phylink_generic_validate() references Virtually all conventional network drivers are now converted to use phylink_generic_validate() - only DSA drivers and fman_memac remain, so lets remove the necessity for network drivers to explicitly set this member, and default to phylink_generic_validate() when unset. This is possible as .validate must currently be set. Any remaining instances that have not been addressed by this patch can be fixed up later. Signed-off-by: Russell King (Oracle) Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/E1or0FZ-001tRa-DI@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/altera/altera_tse_main.c | 1 - drivers/net/ethernet/atheros/ag71xx.c | 1 - drivers/net/ethernet/cadence/macb_main.c | 1 - drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 1 - drivers/net/ethernet/freescale/enetc/enetc_pf.c | 1 - drivers/net/ethernet/freescale/fman/fman_dtsec.c | 1 - drivers/net/ethernet/freescale/fman/fman_tgec.c | 1 - drivers/net/ethernet/marvell/mvneta.c | 1 - drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 1 - drivers/net/ethernet/marvell/prestera/prestera_main.c | 1 - drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 - drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c | 1 - drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c | 1 - drivers/net/ethernet/mscc/ocelot_net.c | 1 - drivers/net/ethernet/renesas/rswitch.c | 1 - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 - drivers/net/ethernet/ti/am65-cpsw-nuss.c | 1 - drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 - drivers/net/phy/phylink.c | 5 ++++- drivers/net/usb/asix_devices.c | 1 - include/linux/phylink.h | 5 +++++ 21 files changed, 9 insertions(+), 20 deletions(-) commit 7ea8104d9e3d5984ce9dba08fde0b849b88007ee Author: Russell King (Oracle) Date: Fri Nov 4 16:53:59 2022 +0000 net: lan966x: move unnecessary linux/sfp.h include lan966x_phylink.c doesn't make use of anything from linux/sfp.h, so remove this unnecessary include. Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1oqzx9-001r9g-HV@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c | 1 - 1 file changed, 1 deletion(-) commit f53152d1d4e6c711bb9728611bbe0b32deda36b1 Author: Marijn Suijten Date: Mon Nov 7 22:47:01 2022 +0100 arm64: dts: qcom: sm6125: Enable Command Queue Engine (CQE) for SDHCI 1 Downstream sources confirm sm6125 supports CQE, and after fixing the reg name for this range [1] this feature probes and enables correctly: [ 0.391950] sdhci_msm 4744000.mmc: mmc0: CQE init: success [1]: https://lore.kernel.org/all/20221026163646.37433-1-krzysztof.kozlowski@linaro.org/ Signed-off-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107214702.311271-1-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 3de1172624b3c4ca65730bc34333ab493510b3e1 Author: Krzysztof Kozlowski Date: Wed Oct 26 12:36:46 2022 -0400 arm64: dts: qcom: sm6125: fix SDHCI CQE reg names SM6125 comes with SDCC (SDHCI controller) v5, so the second range of registers is cqhci, not core. Fixes: cff4bbaf2a2d ("arm64: dts: qcom: Add support for SM6125") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten # Sony Xperia 10 II Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026163646.37433-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ab3acd6379242281d4a55acfd6441830f1984a0 Author: Luca Weiss Date: Mon Oct 31 18:51:18 2022 +0100 arm64: dts: qcom: pm8998: adjust coincell node name to bindings The spmi-pmic bindings say that pm8941-coincell should be called 'charger'. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221031175119.939860-3-luca@z3ntu.xyz arch/arm64/boot/dts/qcom/pm8998.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d9bf21088fddefe681a70d061b78b9b58fb764b Author: Konrad Dybcio Date: Mon Nov 7 15:55:21 2022 +0100 arm64: dts: qcom: pm6150/l/pm7325/pms405: Fix up comments Make sure all multiline C-style commends begin with just '/*' with the comment text starting on a new line. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107145522.6706-12-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/pm6150.dtsi | 4 +++- arch/arm64/boot/dts/qcom/pm6150l.dtsi | 4 +++- arch/arm64/boot/dts/qcom/pm7325.dtsi | 4 +++- arch/arm64/boot/dts/qcom/pms405.dtsi | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) commit 3e3a2be79035a9e554ee5f62faf955601f85fca9 Author: Konrad Dybcio Date: Mon Nov 7 15:55:20 2022 +0100 arm64: dts: qcom: qcs404-*: Fix up comments Switch '//' comments to C-style /* */. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107145522.6706-11-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/qcs404-evb-1000.dts | 4 +++- arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts | 4 +++- arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 4 +++- arch/arm64/boot/dts/qcom/qcs404.dtsi | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) commit 79b185d055703004aeb9252f2aa60ab03c868803 Author: Konrad Dybcio Date: Mon Nov 7 15:55:19 2022 +0100 arm64: dts: qcom: msm8994-*: Fix up comments Make sure all multiline C-style commends begin with just '/*' with the comment text starting on a new line. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107145522.6706-10-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts | 3 ++- arch/arm64/boot/dts/qcom/msm8994.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 290d43062d261cebd17ff590dc91f1d1e3fe6eed Author: Konrad Dybcio Date: Mon Nov 7 15:55:18 2022 +0100 arm64: dts: qcom: msm8992-*: Fix up comments Make sure all multiline C-style commends begin with just '/*' with the comment text starting on a new line. Also, trim off downstream regulator properties from comments to prevent them from accidentally landing into mainline one day.. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107145522.6706-9-konrad.dybcio@linaro.org .../boot/dts/qcom/msm8992-lg-bullhead-rev-10.dts | 3 +- .../boot/dts/qcom/msm8992-lg-bullhead-rev-101.dts | 3 +- arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 41 ++++++++++++---------- arch/arm64/boot/dts/qcom/msm8992.dtsi | 3 +- 4 files changed, 28 insertions(+), 22 deletions(-) commit d5d8e59f356d426ba164ea37adfa629196b4fbd0 Author: Konrad Dybcio Date: Mon Nov 7 15:55:17 2022 +0100 arm64: dts: qcom: ipq8074-*: Fix up comments Make sure all multiline C-style commends begin with just '/*' with the comment text starting on a new line. Also, fix up some whitespace within comments. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107145522.6706-8-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/ipq8074-hk01.dts | 3 ++- arch/arm64/boot/dts/qcom/ipq8074-hk10-c1.dts | 3 ++- arch/arm64/boot/dts/qcom/ipq8074-hk10-c2.dts | 3 ++- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 12 ++++++------ 4 files changed, 12 insertions(+), 9 deletions(-) commit 108162894a5db9d1eba20650d050de27e730d818 Author: Konrad Dybcio Date: Mon Nov 7 15:55:16 2022 +0100 arm64: dts: qcom: sdm845-*: Fix up comments Switch '//' comments to C-style /* */. Make sure all multiline C-style commends begin with just '/*' with the comment text starting on a new line. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107145522.6706-7-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 38 +++++++++++++--------- .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 5 +-- arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts | 2 +- 3 files changed, 27 insertions(+), 18 deletions(-) commit b47fac7ab95b2567b6b39dae8dd66926368f2713 Author: Konrad Dybcio Date: Mon Nov 7 15:55:15 2022 +0100 arm64: dts: qcom: sc8280xp-x13s: Fix up comments Switch '//' comments to C-style /* */. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107145522.6706-6-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 689469ea4ce0fc17f1ddf2f5f730cb565bb5ef9c Author: Konrad Dybcio Date: Mon Nov 7 15:55:14 2022 +0100 arm64: dts: qcom: msm8998-*: Fix up comments Switch '//' comments to C-style /* */ and fix up the contents of some. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107145522.6706-5-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 8 ++------ arch/arm64/boot/dts/qcom/msm8998-mtp.dts | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) commit 83e8692144fbda4a8f86087170d9ce26e64993d7 Author: Konrad Dybcio Date: Mon Nov 7 15:55:13 2022 +0100 arm64: dts: qcom: msm8953: Fix up comments Switch '//' comments to C-style /* */ and fix up the contents of some. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107145522.6706-4-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/msm8953.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bd95b48a591cc0fd767b3c737b8d59cea5ff428d Author: Konrad Dybcio Date: Mon Nov 7 15:55:12 2022 +0100 arm64: dts: qcom: msm/apq8x96-*: Fix up comments Switch '//' comments to C-style /* */ and fix up the contents of some. Make sure all multiline C-style commends begin with just '/*' with the comment text starting on a new line. Also, fix up a single raw '2' to PM8994_GPIO_S4 while at it. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107145522.6706-3-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8996.dtsi | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) commit 4bb376f6cc715fb9182942df08d492965d5f0127 Author: Konrad Dybcio Date: Mon Nov 7 15:55:11 2022 +0100 arm64: dts: qcom: msm/apq8x16-*: Fix up comments Switch '//' comments to C-style /* */ and fix up the contents of some. Make sure all multiline C-style commends begin with just '/*' with the comment text starting on a new line. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107145522.6706-2-konrad.dybcio@linaro.org arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 2 +- arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts | 4 +++- arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts | 6 +++--- arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts | 4 +++- arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts | 4 +++- arch/arm64/boot/dts/qcom/msm8916.dtsi | 10 +++++----- 7 files changed, 19 insertions(+), 13 deletions(-) commit a979f2e5d5b530d190b9c02393f3c69160f06aae Author: Krzysztof Kozlowski Date: Fri Nov 4 12:11:30 2022 -0400 arm64: dts: qcom: qcs404: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104161131.57719-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts | 20 ++++----- arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 52 ++++++++++------------ arch/arm64/boot/dts/qcom/qcs404.dtsi | 66 ++++++++++++++++------------ 3 files changed, 71 insertions(+), 67 deletions(-) commit 1bc6b7f26bc72c8fd5a49ff000bb76a234e75e11 Author: Robert Marko Date: Mon Nov 7 10:29:30 2022 +0100 arm64: dts: qcom: hk01: use GPIO flags for tlmm Use respective GPIO_ACTIVE_LOW/HIGH flags for tlmm GPIOs instead of harcoding the cell value. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107092930.33325-3-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074-hk01.dts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3f49bdaf6f84959bb8fc3ed5add7983907491240 Author: Robert Marko Date: Mon Nov 7 10:29:29 2022 +0100 arm64: dts: qcom: hk10: use GPIO flags for tlmm Use respective GPIO_ACTIVE_LOW/HIGH flags for tlmm GPIOs instead of harcoding the cell value. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107092930.33325-2-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074-hk10.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7284a3943909606016128b79fb18dd107bc0fe26 Author: Robert Marko Date: Mon Nov 7 10:29:28 2022 +0100 arm64: dts: qcom: hk10: use "okay" instead of "ok" Use "okay" instead of "ok" in USB nodes as "ok" is deprecated. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107092930.33325-1-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074-hk10.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d0ee86d3c0f0da1481cfab51a386fc22b00a0630 Author: Konrad Dybcio Date: Mon Nov 7 10:22:07 2022 +0100 MAINTAINERS: Update Konrad Dybcio's email address Use my new Linaro address in place of my SoMainline one. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107092207.5832-1-konrad.dybcio@linaro.org MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d0be9d88bf2b1c36146712761ab04623a855647 Author: Johan Hovold Date: Mon Nov 7 09:17:05 2022 +0100 arm64: dts: qcom: sc8280xp: fix USB MP QMP PHY nodes Update the USB MP QMP PHY nodes to match the new binding which specifically includes the missing register regions (e.g. PCS_USB). Signed-off-by: Johan Hovold Reviewed-by: Andrew Halaney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107081705.18446-1-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 62 +++++++++++++--------------------- 1 file changed, 24 insertions(+), 38 deletions(-) commit 3d11e7e120eee29ef837830bee8442195a2c4552 Author: Sheng-Liang Pan Date: Mon Nov 7 17:43:45 2022 +0800 arm64: dts: qcom: sc7280: sort out the "Status" to last property with sc7280-herobrine-audio-rt5682.dtsi To keep diffs clean, sort out "Status" to last property. Signed-off-by: Sheng-Liang Pan Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107173954.v11.5.I4c6d97e6f3cf8cdc691d2d4519883c3018dd4372@changeid .../arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5977c14285ca9ba933f4d048b0d995b046727788 Author: Sheng-Liang Pan Date: Mon Nov 7 17:43:44 2022 +0800 arm64: dts: qcom: sc7280: add sc7280-herobrine-audio-rt5682-3mic3.dtsi for evoker add specific 3mic setting as sc7280-herobrine-audio-rt5682-3mic.dtsi, so we can include sc7280-herobrine-audio-rt5682-3mic.dtsi for evoker as it uses rt5682 with 3 mics. Signed-off-by: Sheng-Liang Pan Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107173954.v11.4.I9718ac3622fa550e432209ae5c95c87b873a0f87@changeid .../qcom/sc7280-herobrine-audio-rt5682-3mic.dtsi | 195 +++++++++++++++++++++ .../boot/dts/qcom/sc7280-herobrine-evoker.dts | 1 + 2 files changed, 196 insertions(+) commit 928263d17413e406d7bbcd10e585b081f36c4114 Author: Sheng-Liang Pan Date: Mon Nov 7 17:43:43 2022 +0800 arm64: dts: qcom: sc7280: Add touchscreen and touchpad support for evoker Change touchpad and touchscreen node for evoker Touchpad: SA461D-1011 Touchscreen: GT7986U Signed-off-by: Sheng-Liang Pan Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107173954.v11.3.I3ac715e729f6f9b5a3e3001b155df4f9d14e6186@changeid arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit ef4fc701d4021eeb2a614fdffb3231560ee43c18 Author: Sheng-Liang Pan Date: Mon Nov 7 17:43:42 2022 +0800 arm64: dts: qcom: sc7280: Add LTE SKU for sc7280-evoker family evoker have wifi/lte sku, add different dts for each sku. Signed-off-by: Sheng-Liang Pan Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107173954.v11.2.If03e9e85e63ece4b1599db841c90ed785c47a4be@changeid arch/arm64/boot/dts/qcom/Makefile | 3 ++- arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker-lte.dts | 14 ++++++++++++++ arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dts | 15 +++++++++++++++ ...robrine-evoker-r0.dts => sc7280-herobrine-evoker.dtsi} | 7 ------- 4 files changed, 31 insertions(+), 8 deletions(-) commit 0c9a86fb9ebc576e66a2ce6a667684431a14d2f1 Author: Luca Weiss Date: Mon Oct 31 18:39:33 2022 +0100 arm64: dts: qcom: pm8150b: change vbus-regulator node name Use the node name as now defined in the spmi-pmic bindings. Signed-off-by: Luca Weiss Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221031173933.936147-3-luca@z3ntu.xyz arch/arm64/boot/dts/qcom/pm8150b.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3aa0b8cd957b3e7806004c2150c61c85a606821a Author: Robert Marko Date: Sun Oct 30 18:57:03 2022 +0100 arm64: dts: qcom: ipq8074: pass XO and sleep clocks to GCC Pass XO and sleep clocks to the GCC controller so it does not have to find them by matching globaly by name. If not passed directly, driver maintains backwards compatibility by then falling back to global lookup. Since we are here, set cell numbers in decimal instead of hex. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030175703.1103224-3-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 830493fc13d8868fd5be0620d16936fa75c3b9a4 Author: Dmitry Baryshkov Date: Sun Oct 30 19:16:12 2022 +0300 arm64: dts: qcom: msm8996: use dsi1_phy for the MMCC's dsi1 clocks Link dsi1_phy as a clock provider of "dsi1pll" and "dsi1pllbyte" clocks to the MMCC. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030161612.95471-2-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65bebf78744f0342187e77124c8a8294a7a0f98c Author: Dmitry Baryshkov Date: Sun Oct 30 19:16:11 2022 +0300 arm64: dts: qcom: msm8996: 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/20221030161612.95471-1-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7372b944a6ba5ac86628eaacc89ed4f103435cb9 Author: Marijn Suijten Date: Sun Oct 30 08:32:32 2022 +0100 arm64: dts: qcom: sm6350: 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: Luca Weiss Tested-by: Luca Weiss # sm7225-fairphone-fp4 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030073232.22726-11-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit e5659e4e19e49f1eac58bb07ce8bc2d78a89fe65 Author: Rong Tao Date: Sat Nov 5 14:48:00 2022 +0800 samples/bpf: Fix sockex3 error: Missing BPF prog type since commit 450b167fb9be("libbpf: clean up SEC() handling"), sec_def_matches() does not recognize "socket/xxx" as "socket", therefore, the BPF program type is not recognized. Instead of sockex3_user.c parsing section names to get the BPF program fd. We use the program array map to assign a static index to each BPF program (get inspired by selftests/bpf progs/test_prog_array_init.c). Therefore, use SEC("socket") as section name instead of SEC("socket/xxx"), so that the BPF program is parsed to SOCKET_FILTER type. The "missing BPF prog type" problem is solved. How to reproduce this error: $ cd samples/bpf $ sudo ./sockex3 libbpf: prog 'bpf_func_PARSE_IP': missing BPF prog type, check ELF section name 'socket/3' libbpf: prog 'bpf_func_PARSE_IP': failed to load: -22 libbpf: failed to load object './sockex3_kern.o' ERROR: loading BPF object file failed Signed-off-by: Rong Tao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/tencent_EBA3C18864069E42175946973C2ACBAF5408@qq.com samples/bpf/sockex3_kern.c | 95 ++++++++++++++++++++++++++-------------------- samples/bpf/sockex3_user.c | 23 +++++------ 2 files changed, 63 insertions(+), 55 deletions(-) commit e8f50c4f0c14214b6430b8b3493654a286681a2b Author: Kang Minchul Date: Sun Nov 6 03:36:56 2022 +0900 selftests/bpf: Fix u32 variable compared with less than zero Variable ret is compared with less than zero even though it was set as u32. So u32 to int conversion is needed. Signed-off-by: Kang Minchul Acked-by: Randy Dunlap Acked-by: Björn Töpel Link: https://lore.kernel.org/r/20221105183656.86077-1-tegongkang@gmail.com Signed-off-by: Martin KaFai Lau tools/testing/selftests/bpf/xskxceiver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ad789f571d93419882aad66515640f649e63bf95 Author: Rayyan Ansari Date: Sun Oct 2 15:28:53 2022 +0300 ARM: dts: qcom: msm8226: Add MMCC node Add a node for the Multimedia Clock Controller found on MSM8226. Signed-off-by: Rayyan Ansari Signed-off-by: Matti Lehtimäki Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221002122859.75525-2-matti.lehtimaki@gmail.com arch/arm/boot/dts/qcom-msm8226.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit f1714f85d40e53645139824d0d903c1e050cdf00 Author: Sheng-Liang Pan Date: Mon Nov 7 17:43:41 2022 +0800 dt-bindings: arm: qcom: Separate LTE/WIFI SKU for sc7280-evoker evoker will have WIFI/LTE SKU, separate it for each different setting. Signed-off-by: Sheng-Liang Pan Reviewed-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107173954.v11.1.Ic800ee7b604bcb0519ca404600d7be2352725686@changeid Documentation/devicetree/bindings/arm/qcom.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 2904a41c50e408c0a1e90da0045400edb6f155fe Author: Marijn Suijten Date: Sun Oct 30 08:32:31 2022 +0100 arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen Use the generic samsung,s6sy761 touchscreen driver for this device, together with a few pins and regulators to power it up correctly. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030073232.22726-10-marijn.suijten@somainline.org .../dts/qcom/sm6350-sony-xperia-lena-pdx213.dts | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 8bad51c68930eba8b26ce362c7c9bfce5d074a2f Author: Marijn Suijten Date: Sun Oct 30 08:32:30 2022 +0100 arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA Enable QUP and GPI DMA hardware to be able to add functioning I2C nodes later. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030073232.22726-9-marijn.suijten@somainline.org .../boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 85eef5cb65ab7e8905725d13c98c90442bb93dbc Author: Marijn Suijten Date: Sun Oct 30 08:32:29 2022 +0100 arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot) Without power the SDCard slot / hardware remains dormant. Like many other platforms these regulators are used exclusively by SDHCI, and have their maximum voltage decreased to what downstream sets on the consumer side. Additionally the SDHCI driver supports setting a load, for which the regulator definition is extended much the same. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030073232.22726-8-marijn.suijten@somainline.org .../boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit deaf8c88db7d327ba768ac224e53d29f56027331 Author: Marijn Suijten Date: Sun Oct 30 08:32:28 2022 +0100 arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators This regulator configuration was adopted from downstream, and is identical to the sm7225 FairPhone 4 configuration bar pm6350_l8a. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030073232.22726-7-marijn.suijten@somainline.org .../dts/qcom/sm6350-sony-xperia-lena-pdx213.dts | 218 +++++++++++++++++++++ 1 file changed, 218 insertions(+) commit 2b8bbe985659e640fda30435c187432c0f614f81 Author: Marijn Suijten Date: Sun Oct 30 08:32:27 2022 +0100 arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons Include pm6350 to inherit its GPIO and button configuration, and configure "resin" to serve as volume up, and gpio2 as volume down. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030073232.22726-6-marijn.suijten@somainline.org .../dts/qcom/sm6350-sony-xperia-lena-pdx213.dts | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit f6e2d6914c7c095660a9c7c503328eebab1e2557 Author: Marijn Suijten Date: Sun Oct 30 08:32:26 2022 +0100 arm64: dts: qcom: pm6350: Include header for KEY_POWER Make pm6350.dtsi self-contained by including input.h, needed for the KEY_POWER constant used to define the power key. Fixes: d8a3c775d7cd ("arm64: dts: qcom: Add PM6350 PMIC") Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030073232.22726-5-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/pm6350.dtsi | 1 + 1 file changed, 1 insertion(+) commit edf070fcbcec70765fe520d476fd9527b5e96477 Author: Marijn Suijten Date: Sun Oct 30 08:32:25 2022 +0100 arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off pinctrl In addition to the sdc2 pins, set the SD Card Detect pin in a sane state to be used as an interrupt when an SD Card is slotted in or removed. Signed-off-by: Marijn Suijten Acked-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030073232.22726-4-marijn.suijten@somainline.org .../boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit a5d0314b9d5166503e99336bb832b3b81b200399 Author: Marijn Suijten Date: Sun Oct 30 08:32:24 2022 +0100 arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2 Use the generic pin functions specifically for sdc2. Signed-off-by: Marijn Suijten Acked-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Luca Weiss Tested-by: Luca Weiss # sm7225-fairphone-fp4 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030073232.22726-3-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/sm6350.dtsi | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit e10d451e10418f12e72ed8564f22fdba8b10a9b0 Author: Marijn Suijten Date: Sun Oct 30 08:32:23 2022 +0100 arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2 Make sure the SDHCI hardware is properly reset before interacting with it, to protect against any possibly indeterminate state left by the bootloader. Suggested-by: Konrad Dybcio Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Luca Weiss Tested-by: Luca Weiss # sm7225-fairphone-fp4 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030073232.22726-2-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit ce1b5eb74b3ef042b1c797f04e8683e7cad34ae6 Author: Luca Weiss Date: Fri Oct 28 09:54:05 2022 +0200 arm64: dts: qcom: pm6150l: add temp sensor and thermal zone config Add temp-alarm device tree node and a default configuration for the corresponding thermal zone for this PMIC. Temperatures are based on downstream values, except for trip2 where 125°C is used instead of 145°C due to limitations without a configured ADC. Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221028075405.124809-2-luca.weiss@fairphone.com arch/arm64/boot/dts/qcom/pm6150l.dtsi | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 16c0c46f38183573de5361d278772cfed2090b1c Author: Luca Weiss Date: Fri Oct 28 09:54:04 2022 +0200 arm64: dts: qcom: pm6350: add temp sensor and thermal zone config Add temp-alarm device tree node and a default configuration for the corresponding thermal zone for this PMIC. Temperatures are based on downstream values, except for trip2 where 125°C is used instead of 145°C due to limitations without a configured ADC. Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221028075405.124809-1-luca.weiss@fairphone.com arch/arm64/boot/dts/qcom/pm6350.dtsi | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit cc677f9006c4277bd25881c6713e5ef79bddd79a Author: Melody Olvera Date: Wed Oct 26 13:04:27 2022 -0700 dt-bindings: arm: qcom: Document QDU1000/QRU1000 SoCs and boards Document the QDU1000 and QRU1000 SoC bindings and the boards that use them. Signed-off-by: Melody Olvera Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026200429.162212-3-quic_molvera@quicinc.com Documentation/devicetree/bindings/arm/qcom.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit f659cd2770767c5ceabadace1b334df9de468eae Author: Luca Weiss Date: Mon Oct 31 19:24:55 2022 +0100 ARM: dts: qcom: pm8941: fix iadc node The spmi-pmic bindings require the iadc node to be named just 'adc'. Reviewed-by: Konrad Dybcio Reviewed-by: Neil Armstrong Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221031182456.952648-2-luca@z3ntu.xyz arch/arm/boot/dts/qcom-pm8941.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5ef315a38fb36779adadbafbcce2274a3dec0d2 Author: Luca Weiss Date: Mon Oct 31 19:10:22 2022 +0100 ARM: dts: qcom: pm8941: fix vadc channel node names The spmi-vadc bindings require the '@' in the node. Additionally change the node name to adc-chan which both makes it a generic node name and also removes the underscore from it. At the same time sort the nodes by reg value. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221031181022.947412-2-luca@z3ntu.xyz arch/arm/boot/dts/qcom-pm8941.dtsi | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 31eab2bb9c1ddf8a9ab5a1e4dc59446eeed2ea9e Author: Luca Weiss Date: Mon Oct 31 19:10:21 2022 +0100 ARM: dts: qcom: pma8084: fix vadc channel node names The spmi-vadc bindings require the '@' in the node. Additionally change the node name to adc-chan which both makes it a generic node name and also removes the underscore from it. Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221031181022.947412-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-pma8084.dtsi | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 52c47b894b260c3e5102bb4b3e77772734508bcf Author: Luca Weiss Date: Mon Oct 31 18:57:16 2022 +0100 ARM: dts: qcom: pm8941: rename misc node name The spmi-pmic bindings is now using usb-detect@ for this node, so adjust the dts to match. Signed-off-by: Luca Weiss Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221031175717.942237-3-luca@z3ntu.xyz arch/arm/boot/dts/qcom-pm8941.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d7860f5750d73da2fa1a1f6c9405058a593fa32 Author: Jiasheng Jiang Date: Mon Nov 7 09:44:03 2022 +0800 soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index As idr_alloc() and of_property_read_string_index() can return negative numbers, it should be better to check the return value and deal with the exception. Therefore, it should be better to use goto statement to stop and return error. Fixes: 6adba21eb434 ("soc: qcom: Add APR bus driver") Signed-off-by: Jiasheng Jiang Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107014403.3606-1-jiasheng@iscas.ac.cn drivers/soc/qcom/apr.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit b29ea0e7e8122a11e9336fb89e96ca7ccdb314ae Author: wangjianli Date: Thu Oct 20 20:45:58 2022 +0800 arm/mach-ux500: fix repeated words in comments Delete the redundant word 'in'. Signed-off-by: wangjianli Link: https://lore.kernel.org/r/20221020124558.38060-1-wangjianli@cdjrlc.com Signed-off-by: Linus Walleij arch/arm/mach-ux500/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c0682e7a46d1190ecf43a8e92214f237cc978a9 Author: Luca Weiss Date: Mon Oct 31 18:51:17 2022 +0100 ARM: dts: qcom: pm8941: adjust coincell node name to bindings The spmi-pmic bindings say that pm8941-coincell should be called 'charger'. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221031175119.939860-2-luca@z3ntu.xyz arch/arm/boot/dts/qcom-pm8941.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f206bbb6e1d0ec59d8662222637bca9c0216464a Author: Luca Weiss Date: Mon Oct 31 18:51:16 2022 +0100 ARM: dts: qcom: pm8226: fix regulators node name Adjust the node name to match bindings and fix the validation warning. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221031175119.939860-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-pm8226.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bf7b832a564d11b0835df157e16c2ca6848426f Author: Robert Marko Date: Sun Oct 30 18:57:02 2022 +0100 dt-bindings: clocks: qcom,gcc-ipq8074: allow XO and sleep clocks Allow passing XO and sleep clocks to the IPQ8074 to avoid having to do a global matching by name. Signed-off-by: Robert Marko Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030175703.1103224-2-robimarko@gmail.com Documentation/devicetree/bindings/clock/qcom,gcc-ipq8074.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ae55ad32e27315469242de591e73d4f79b78decc Author: Robert Marko Date: Sun Oct 30 18:57:01 2022 +0100 clk: qcom: ipq8074: convert to parent data Convert the IPQ8074 GCC driver to use parent data instead of global name matching. Utilize ARRAY_SIZE for num_parents instead of hardcoding the value. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko@gmail.com drivers/clk/qcom/gcc-ipq8074.c | 1781 ++++++++++++++++++---------------------- 1 file changed, 813 insertions(+), 968 deletions(-) commit 44e985938e85503d0a69ec538e15fd33c1a4df05 Author: Bjorn Helgaas Date: Mon Nov 7 15:31:08 2022 -0600 Revert "PCI: Clear PCI_STATUS when setting up device" This reverts commit 6cd514e58f12b211d638dbf6f791fa18d854f09c. Christophe Fergeau reported that 6cd514e58f12 ("PCI: Clear PCI_STATUS when setting up device") causes boot failures when trying to start linux guests with Apple's virtualization framework (for example using https://developer.apple.com/documentation/virtualization/running_linux_in_a_virtual_machine?language=objc) 6cd514e58f12 only solved a cosmetic problem, so revert it to fix the boot failures. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2137803 Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 3 --- 1 file changed, 3 deletions(-) commit 9f0b4cc174c3c5ceb9322d01372369610f327c42 Author: Yipeng Zou Date: Fri Nov 4 11:24:30 2022 +0800 PCI/ACPI: Use METHOD_NAME__UID instead of plain string Replace the string "_UID" with the METHOD_NAME__UID macro so instances are easier to find. Link: https://lore.kernel.org/r/20221104032430.186424-1-zouyipeng@huawei.com Signed-off-by: Yipeng Zou Signed-off-by: Bjorn Helgaas drivers/pci/pci-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 611fc22c9e5e13276c819a7f7a7d19b794bbed1a Author: Danilo Krummrich Date: Wed Oct 26 17:34:31 2022 +0200 drm/arm/hdlcd: remove calls to drm_mode_config_cleanup() drm_mode_config_init() simply calls drmm_mode_config_init(), hence cleanup is automatically handled through registering drm_mode_config_cleanup() with drmm_add_action_or_reset(). While at it, get rid of the deprecated drm_mode_config_init() and replace it with drmm_mode_config_init() directly. Signed-off-by: Danilo Krummrich Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20221026153431.72033-5-dakr@redhat.com drivers/gpu/drm/arm/hdlcd_drv.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 8aa201952d59ce91ac499b05a4867145c6a80f37 Author: Danilo Krummrich Date: Wed Oct 26 17:34:30 2022 +0200 drm/arm/hdlcd: plane: use drm managed resources Use drm managed resource allocation (drmm_universal_plane_alloc()) in order to get rid of the explicit destroy hook in struct drm_plane_funcs. Signed-off-by: Danilo Krummrich Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20221026153431.72033-4-dakr@redhat.com drivers/gpu/drm/arm/hdlcd_crtc.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 5f56e596dd7562c04137eed1f220703ad7111087 Author: Danilo Krummrich Date: Wed Oct 26 17:34:29 2022 +0200 drm/arm/hdlcd: replace drm->dev_private with drm_to_hdlcd_priv() Using drm_device->dev_private is deprecated. Since we've switched to devm_drm_dev_alloc(), struct drm_device is now embedded in struct hdlcd_drm_private, hence we can use container_of() to get the struct drm_device instance instead. Signed-off-by: Danilo Krummrich Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20221026153431.72033-3-dakr@redhat.com drivers/gpu/drm/arm/hdlcd_crtc.c | 6 +++--- drivers/gpu/drm/arm/hdlcd_drv.c | 10 ++++------ drivers/gpu/drm/arm/hdlcd_drv.h | 1 + 3 files changed, 8 insertions(+), 9 deletions(-) commit 9914013fe65647b5c0afc732da1adc9bc62a0a26 Author: Danilo Krummrich Date: Wed Oct 26 17:34:28 2022 +0200 drm/arm/hdlcd: use drmm_* to allocate driver structures Use drm managed resources to allocate driver structures and get rid of the deprecated drm_dev_alloc() call and replace it with devm_drm_dev_alloc(). This also serves as preparation to get rid of drm_device->dev_private and to fix use-after-free issues on driver unload. Signed-off-by: Danilo Krummrich Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20221026153431.72033-2-dakr@redhat.com drivers/gpu/drm/arm/hdlcd_drv.c | 12 ++++-------- drivers/gpu/drm/arm/hdlcd_drv.h | 1 + 2 files changed, 5 insertions(+), 8 deletions(-) commit 80280df758c1498485988b30cf6887fde7796056 Author: Weilong Chen Date: Tue Nov 1 16:24:41 2022 +0800 gpio: hisi: Add initial device tree support Add support for HiSilicon GPIO controller in embedded platform, which boot from devicetree. Signed-off-by: Weilong Chen Acked-by: Jay Fang Reviewed-by: Yicong Yang Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-hisi.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 95e7fc84c78adeef654acb919f04d98a87e6372d Author: Weilong Chen Date: Tue Nov 1 16:24:42 2022 +0800 dt-bindings: gpio: add entry for hisilicon,ascend910-gpio Add the new compatible for HiSilicon gpio controller driver. Signed-off-by: Weilong Chen Reviewed-by: Rob Herring Reviewed-by: Yicong Yang Signed-off-by: Bartosz Golaszewski .../bindings/gpio/hisilicon,ascend910-gpio.yaml | 56 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 57 insertions(+) commit f6e53fb2d7bd70547ba53232415976cb70ad6d97 Author: Günther Noack Date: Mon Nov 7 19:16:51 2022 +0100 samples/landlock: Document best-effort approach for LANDLOCK_ACCESS_FS_REFER Add a comment to clarify how to handle best-effort backwards compatibility for LANDLOCK_ACCESS_FS_REFER. The "refer" access is special because these operations are always forbidden in ABI 1, unlike most other operations, which are permitted when using Landlock ABI levels where they are not supported yet. Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20221107181651.4555-1-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün samples/landlock/sandboxer.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 60f07c29e035b2554db951b494dd804317c230d3 Author: Christophe JAILLET Date: Mon Nov 7 11:40:05 2022 -0800 Input: 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: Dmitry Torokhov Link: https://lore.kernel.org/r/4311e9cb62687449f4175e2b062abcd77aada059.1667336095.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Torokhov drivers/input/input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6100a19c4fcfe154dd32f8a8ef4e8c0b1f607c75 Author: Randy Dunlap Date: Fri Nov 4 13:12:38 2022 -0700 Input: joystick - fix Kconfig warning for JOYSTICK_ADC Fix a Kconfig warning for JOYSTICK_ADC by also selecting IIO_BUFFER. WARNING: unmet direct dependencies detected for IIO_BUFFER_CB Depends on [n]: IIO [=y] && IIO_BUFFER [=n] Selected by [y]: - JOYSTICK_ADC [=y] && INPUT [=y] && INPUT_JOYSTICK [=y] && IIO [=y] Fixes: 2c2b364fddd5 ("Input: joystick - add ADC attached joystick driver.") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20221104201238.31628-1-rdunlap@infradead.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0f382cade7221425535092292f670466836347e5 Author: Job Noorman Date: Mon Nov 7 11:25:05 2022 -0800 Input: add driver for Himax hx83112b touchscreen devices This patch adds support for Himax hx83112b touchscreen devices. As there are no publicly available data sheets for these devices, the implementation is based on the driver of the downstream Android kernel used in the Fairphone 3. This patch is a complete rewrite, though, and the code bears no resemblence to the original implementation. The driver has been tested on the aforementioned phone. Signed-off-by: Job Noorman Reviewed-by: Jeff LaBundy Link: https://lore.kernel.org/r/20221107105604.26541-3-job@noorman.info Signed-off-by: Dmitry Torokhov MAINTAINERS | 1 + drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/himax_hx83112b.c | 365 +++++++++++++++++++++++++++++ 4 files changed, 379 insertions(+) commit cd044ff918116cff8633780d2b4b21646d4ee3dd Author: Job Noorman Date: Mon Nov 7 11:24:44 2022 -0800 dt-bindings: touchscreen: add Himax hx83112b bindings This patch adds device tree bindings for Himax 83112b touchscreen devices. Signed-off-by: Job Noorman Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221107105604.26541-2-job@noorman.info Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/himax,hx83112b.yaml | 63 ++++++++++++++++++++++ MAINTAINERS | 6 +++ 2 files changed, 69 insertions(+) commit 8b693ea26c209757a4c96cf4463cc597a3625e19 Author: Daniele Ceraolo Spurio Date: Wed Nov 2 14:43:10 2022 -0700 drm/i915/guc: don't hardcode BCS0 in guc_hang selftest On MTL there are no BCS engines on the media GT, so we can't always use BCS0 in the test. There is no actual reason to use a BCS engine over an engine of a different class, so switch to using any available engine. Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Reviewed-by: John Harrison Acked-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20221102214310.2829310-1-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/selftest_guc_hangcheck.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1c50050ca1ebe46db27b016326c6c3508a161ee9 Author: Vasily Khoruzhick Date: Sat Nov 5 16:33:19 2022 +0100 arm64: dts: allwinner: a64: enable Bluetooth on Pinebook Pinebook has an RTL8723CS WiFi + BT chip. BT is connected to UART1 and uses PL5 as device wake GPIO and PL6 as host wake GPIO. Enable it in the device tree. Signed-off-by: Vasily Khoruzhick Signed-off-by: Bastian Germann Reviewed-by: Samuel Holland Link: https://lore.kernel.org/r/20221105153319.19345-2-bage@debian.org Signed-off-by: Jernej Skrabec arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 3dd14f783901bb93c3f51de3fb1739fb290b1ae1 Author: Andre Przywara Date: Mon Oct 31 11:13:58 2022 +0000 arm64: dts: allwinner: h616: X96 Mate: Add USB nodes The X96 Mate TV box has two USB-A ports, VBUS is always on and connected to the DC input. Since USB port 0 is connected to an USB-A receptable, we configure it as a host port. Using it as a peripheral is dangerous, because VBUS is always on. Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221031111358.3387297-8-andre.przywara@arm.com Signed-off-by: Jernej Skrabec .../boot/dts/allwinner/sun50i-h616-x96-mate.dts | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit db5f028309ede13767e2ba356c1975ac37a4fd6c Author: Andre Przywara Date: Mon Oct 31 11:13:57 2022 +0000 arm64: dts: allwinner: h616: OrangePi Zero 2: Add USB nodes The OrangePi Zero 2 has one USB-A host port, VBUS is provided by a GPIO controlled regulator. The USB-C port is meant to power the board, but is also connected to the USB 0 port, which we configure as an MUSB peripheral. Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221031111358.3387297-7-andre.przywara@arm.com Signed-off-by: Jernej Skrabec .../dts/allwinner/sun50i-h616-orangepi-zero2.dts | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit f40cf244c3feb4e1a442f8029b691add2c65b3ab Author: Andre Przywara Date: Mon Oct 31 11:13:56 2022 +0000 arm64: dts: allwinner: h616: Add USB nodes Add the nodes for the MUSB and the four USB host controllers to the SoC .dtsi, along with the PHY node needed to bind all of them together. EHCI/OHCI and MUSB are compatible to previous SoCs, but the PHY requires some quirks (handled in the driver). Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221031111358.3387297-6-andre.przywara@arm.com Signed-off-by: Jernej Skrabec arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 160 +++++++++++++++++++++++++ 1 file changed, 160 insertions(+) commit 28a1a6474c5053bae01bd29946b4d5ede539176b Author: Andre Przywara Date: Mon Oct 31 11:13:52 2022 +0000 dt-bindings: usb: Add H616 compatible string The Allwinner H616 contains four fully OHCI/EHCI compatible USB host controllers, so just add their compatible strings to the list of generic OHCI/EHCI controllers. Signed-off-by: Andre Przywara Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221031111358.3387297-2-andre.przywara@arm.com Signed-off-by: Jernej Skrabec Documentation/devicetree/bindings/usb/generic-ehci.yaml | 1 + Documentation/devicetree/bindings/usb/generic-ohci.yaml | 1 + 2 files changed, 2 insertions(+) commit 194babe26bdcf6b9dec98907dc13f319baf01e43 Author: Daniele Ceraolo Spurio Date: Wed Nov 2 10:10:47 2022 -0700 drm/i915/mtl: don't expose GSC command streamer to the user There is no userspace user for this CS yet, we only need it for internal kernel ops (e.g. HuC, PXP), so don't expose it. v2: even if it's not exposed, rename the engine so it is easier to identify in the debug logs (Matt) Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221102171047.2787951-6-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/intel_engine_user.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit ef8281abb149c1ed66fe80e28faca4e350ff4c60 Author: Daniele Ceraolo Spurio Date: Wed Nov 2 10:10:46 2022 -0700 drm/i915/mtl: add GSC CS reset support The GSC CS has its own dedicated bit in the GDRST register. Bspec: 52549 Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221102171047.2787951-5-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 1 + drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + 2 files changed, 2 insertions(+) commit c07ee636901d1496caf81594f90fc68e9a9c7ba5 Author: Daniele Ceraolo Spurio Date: Wed Nov 2 10:10:45 2022 -0700 drm/i915/mtl: add GSC CS interrupt support The GSC CS re-uses the same interrupt bits that the GSC used in older platforms. This means that we can now have an engine interrupt coming out of OTHER_CLASS, so we need to handle that appropriately. v2: clean up the if statement for the engine irq (Tvrtko) Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Cc: Tvrtko Ursulin Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221102171047.2787951-4-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/intel_gt_irq.c | 75 ++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 35 deletions(-) commit c9c12ba72e740e3adb5a2287f6d0372fa45721c3 Author: Daniele Ceraolo Spurio Date: Wed Nov 2 10:10:44 2022 -0700 drm/i915/mtl: pass the GSC CS info to the GuC We need to tell the GuC that the GSC CS is there. Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221102171047.2787951-3-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 11 +++++------ drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 7 +++++-- 2 files changed, 10 insertions(+), 8 deletions(-) commit 5fd974d164b4240652259e7058e2c72a68662cb0 Author: Daniele Ceraolo Spurio Date: Wed Nov 2 10:10:43 2022 -0700 drm/i915/mtl: add initial definitions for GSC CS Starting on MTL, the GSC is no longer managed with direct MMIO access, but we instead have a dedicated command streamer for it. As a first step for adding support for this CS, add the required definitions. Note that, although it is now a CS, the GSC retains its old class:instance value (OTHER_CLASS instance 6) Bspec: 65308, 45605 Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221102171047.2787951-2-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 8 ++++++++ drivers/gpu/drm/i915/gt/intel_engine_types.h | 1 + drivers/gpu/drm/i915/gt/intel_engine_user.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 1 + 4 files changed, 11 insertions(+) commit 759dcdf24903f61bc46064e0f7dd8a68ea1a6376 Author: Melody Olvera Date: Wed Oct 26 12:05:49 2022 -0700 soc: qcom: socinfo: Add QDU1000/QRU1000 SoC IDs to the soc_id table Add SoC ID table entries for the QDU1000 and QRU1000 platforms and their variants. Signed-off-by: Melody Olvera Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026190549.4005703-6-quic_molvera@quicinc.com drivers/soc/qcom/socinfo.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3b1611f252bb8871f2e171758f8462704b7d8d52 Author: Melody Olvera Date: Wed Oct 26 12:05:48 2022 -0700 dt-bindings: arm: qcom,ids: Add SoC IDs for QDU1000/QRU1000 Add SoC IDs for Qualcomm QDU1000 and QRU1000 platforms and their variants. Signed-off-by: Melody Olvera Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026190549.4005703-5-quic_molvera@quicinc.com include/dt-bindings/arm/qcom,ids.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 94949a014fac048591dd478a4126ce8cca6f8123 Author: Melody Olvera Date: Wed Oct 26 12:05:47 2022 -0700 soc: qcom: rpmhpd: Add QDU1000/QRU1000 power domains Add the power domains exposed by RPMH in the Qualcomm QDU1000 and QRU1000 platforms. Signed-off-by: Melody Olvera Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026190549.4005703-4-quic_molvera@quicinc.com drivers/soc/qcom/rpmhpd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 8aa5cac4a2e05019fed4cb7187829add0c5aded6 Author: Melody Olvera Date: Wed Oct 26 12:05:46 2022 -0700 dt-bindings: power: rpmpd: Add QDU1000/QRU1000 to rpmpd binding Add compatible and constants for the power domains exposed by the RPMH in the Qualcomm QDU1000 and QRU1000 platforms. Signed-off-by: Melody Olvera Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026190549.4005703-3-quic_molvera@quicinc.com Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 + include/dt-bindings/power/qcom-rpmpd.h | 6 ++++++ 2 files changed, 7 insertions(+) commit 05e5c125b120c75b9313af0a6dc8c4f5a71e8e7c Author: Melody Olvera Date: Wed Oct 26 12:04:40 2022 -0700 clk: qcom: Add support for QDU1000 and QRU1000 RPMh clocks Add support for RMPh clocks for QDU1000 and QRU1000 SoCs. Signed-off-by: Melody Olvera Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026190441.4002212-5-quic_molvera@quicinc.com drivers/clk/qcom/clk-rpmh.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 70d9f589918aaadd6d5547ecb27355b7b69fc32c Author: Melody Olvera Date: Wed Oct 26 12:04:38 2022 -0700 dt-bindings: clock: Add RPMHCC for QDU1000 and QRU1000 Add compatible strings for RPMHCC for QDU1000 and QRU1000. Signed-off-by: Melody Olvera Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026190441.4002212-3-quic_molvera@quicinc.com Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 + 1 file changed, 1 insertion(+) commit 49f65e2eaaf96de1282bb82039386c2d2d04ee53 Author: Pierre Gondois Date: Mon Nov 7 16:56:56 2022 +0100 arm64: dts: Update cache properties for amlogic 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 Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221107155825.1644604-4-pierre.gondois@arm.com Signed-off-by: Neil Armstrong arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 1 + 6 files changed, 6 insertions(+) commit 57f93492410942355b5a6eacbbe977176ffe5110 Author: Rander Wang Date: Mon Nov 7 10:41:54 2022 -0600 ASoC: SOF: Intel: set d0i3 register with d0i3_offset Set the d0i3 with d0i3_offset for different platforms Reviewed-by: Ranjani Sridharan Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221107164154.21925-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit f8632adc53e25501c74f25794cddac4dbe3f1c59 Author: Rander Wang Date: Mon Nov 7 10:41:53 2022 -0600 ASoC: SOF: Intel: add d0i3_offset in chip_info MTL has different d0i3 offset compared to cavs platforms. Use d0i3_offset to unify the setting. Reviewed-by: Ranjani Sridharan Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221107164154.21925-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/apl.c | 1 + sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/icl.c | 1 + sound/soc/sof/intel/mtl.c | 1 + sound/soc/sof/intel/shim.h | 1 + sound/soc/sof/intel/tgl.c | 4 ++++ 6 files changed, 10 insertions(+) commit 09e3c1d398bec1c9684f91563e82a2f455548448 Author: Rander Wang Date: Mon Nov 7 10:41:52 2022 -0600 ASoC: SOF: Intel: add d0i3 definition for MTL MTL has a different offset of d0i3 compared to cavs platforms. Reviewed-by: Ranjani Sridharan Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221107164154.21925-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/mtl.h | 2 ++ 1 file changed, 2 insertions(+) commit bcfefc98c5781ee97f1b7a8063870830d9e42b30 Author: Douglas Anderson Date: Tue Oct 25 16:52:39 2022 -0700 arm64: dts: qcom: sc7280: Villager doesn't have NVME The sc7280-herobrine-villager derivative doesn't have NVME enabled so we shouldn't mark the PCIe nodes as "okay" since they're just for boards that have NVME. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221025164915.1.I38e2545eda2b3bd3fef6b41c98f451e32851ae70@changeid arch/arm64/boot/dts/qcom/sc7280-herobrine-villager.dtsi | 10 ---------- 1 file changed, 10 deletions(-) commit a35ef6df1e61cba41a5266303f6a493d1a71b06b Author: Stephen Boyd Date: Tue Oct 25 11:07:03 2022 -0700 arm64: dts: qcom: Remove fingerprint node from herobrine-r1 It turns out that only a few people have the fingerprint sensor hooked up on their board. Leaving this enabled is slowing down boot for everyone else because the driver slowly fails to probe while trying to communicate with a sensor that isn't there. Remove the node to speed up boot, developers with the board can manually enable it themselves. Reported-by: Douglas Anderson Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221025180703.1806234-1-swboyd@chromium.org arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts | 4 ---- 1 file changed, 4 deletions(-) commit 9d7d01da9a24a8e37fa156d93dbea893a0665f94 Author: Krzysztof Kozlowski Date: Tue Oct 18 11:54:49 2022 -0400 arm64: dts: qcom: msm8994: 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. Order the "function" and "pins" property to match other DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221018155450.39816-2-krzysztof.kozlowski@linaro.org .../boot/dts/qcom/msm8994-msft-lumia-octagon.dtsi | 8 +- .../dts/qcom/msm8994-sony-xperia-kitakami.dtsi | 6 +- arch/arm64/boot/dts/qcom/msm8994.dtsi | 130 +++++++++++---------- 3 files changed, 74 insertions(+), 70 deletions(-) commit 5d76dfb86850893f2506e15a1dc68977c3adc79f Author: Krzysztof Kozlowski Date: Tue Oct 18 11:54:48 2022 -0400 arm64: dts: qcom: msm8994: Correct SPI10 CS pin The GPIO55 is part of SPI10 pins, not its chip-select. Probably the intention was to use one of dedicated chip-select GPIOs: 47 or 67. GPIO47 is used for UART2, so choose GPIO67. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221018155450.39816-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8994.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42582b27dcb1cb60f3601ecac07d3564ce7dc378 Author: Manikanta Pubbisetty Date: Mon Oct 17 18:23:46 2022 +0530 arm64: dts: qcom: sc7280: Add nodes to support WoW on WCN6750 Add DT nodes to support WoW (Wake on Wireless) feature on WCN6750 WiFi hardware on SC7280 SoC. Signed-off-by: Manikanta Pubbisetty Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221017125346.3691-3-quic_mpubbise@quicinc.com arch/arm64/boot/dts/qcom/sc7280.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c0ca67bb1772823c336c76c36a4d1cbb9602db1f Author: Manikanta Pubbisetty Date: Mon Oct 17 18:23:45 2022 +0530 dt-bindings: qcom: smp2p: Add WPSS node names to pattern property WLAN firmware uses SMP2P protocol in order to talk to the application processor (AP) in certain cases like WoW (Wake on Wireless). WLAN firmware runs on the WPSS Q6 processor (Wireless Processor SubSystem). Therefore it is required to have sub nodes pertaining to the WPSS Q6 processor and the application processor in the SMP2P node. Add WPSS Q6 (Wireless Processor SubSystem) node names to the pattern property required for WPSS Q6 processor to communicate to the application processor and vice versa over SMP2P protocol. Signed-off-by: Manikanta Pubbisetty Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221017125346.3691-2-quic_mpubbise@quicinc.com Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f7fa366bac9aa2addb83ffa5f208291f4dbe4d8 Author: Marek Vasut Date: Fri Oct 14 00:12:41 2022 +0200 ARM: dts: qcom: Drop MMCI interrupt-names The pl18x MMCI driver does not use the interrupt-names property, the binding document has been updated to recommend this property be unused, remove it. Reviewed-by: Linus Walleij Signed-off-by: Marek Vasut Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013221242.218808-2-marex@denx.de arch/arm/boot/dts/qcom-apq8064.dtsi | 3 --- arch/arm/boot/dts/qcom-ipq8064.dtsi | 2 -- arch/arm/boot/dts/qcom-msm8660.dtsi | 5 ----- arch/arm/boot/dts/qcom-msm8960.dtsi | 2 -- 4 files changed, 12 deletions(-) commit 0d6e44e257ec53b41c2969130e0eb97b0a41b1d6 Author: Dmitry Baryshkov Date: Sat Oct 1 00:20:52 2022 +0300 ARM: dts: qcom: mdm9615: drop unit ids from PMIC nodes On MDM9615 the PMICs are connected using SSBI devices, which do not have any addressing scheme. Drop the unused unit ids from PMIC device nodes. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930212052.894834-2-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-mdm9615.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8e5104118473ffa23c013da42ae6a9df2867a07 Author: Mark Brown Date: Wed Oct 19 13:03:45 2022 +0100 arm64/asm: Remove unused enable_da macro We no longer use the enable_da macro, remove it to avoid having to think about maintaining it. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221019120346.72289-1-broonie@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 5 ----- 1 file changed, 5 deletions(-) commit bb144c285bd5585be101aaf5464ad8949ba1305d Author: Geert Uytterhoeven Date: Thu Oct 27 15:10:28 2022 +0200 mtd: rawnand: lpc32xx_slc: Switch to using pm_ptr() The switch to using the gpiod API removed the last user of lpc32xx_wp_disable() outside #ifdef CONFIG_PM, causing build failures if CONFIG_PM=n: drivers/mtd/nand/raw/lpc32xx_slc.c:318:13: error: ‘lpc32xx_wp_disable’ defined but not used [-Werror=unused-function] 318 | static void lpc32xx_wp_disable(struct lpc32xx_nand_host *host) | ^~~~~~~~~~~~~~~~~~ Fix this by switching from #ifdef CONFIG_PM to pm_ptr(), increasing compile-coverage as a side-effect. Reported-by: noreply@ellerman.id.au Fixes: 6b923db2867cb5e1 ("mtd: rawnand: lpc32xx_slc: switch to using gpiod API") Signed-off-by: Geert Uytterhoeven Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221027131028.3838303-2-geert@linux-m68k.org drivers/mtd/nand/raw/lpc32xx_slc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 991cc42a276f1d9303674a04a351942e47c29a3f Author: Geert Uytterhoeven Date: Thu Oct 27 15:10:27 2022 +0200 mtd: rawnand: lpc32xx_mlc: Switch to using pm_ptr() The switch to using the gpiod API removed the last user of lpc32xx_wp_disable() outside #ifdef CONFIG_PM, causing build failures if CONFIG_PM=n: drivers/mtd/nand/raw/lpc32xx_mlc.c:380:13: error: ‘lpc32xx_wp_disable’ defined but not used [-Werror=unused-function] 380 | static void lpc32xx_wp_disable(struct lpc32xx_nand_host *host) | ^~~~~~~~~~~~~~~~~~ Fix this by switching from #ifdef CONFIG_PM to pm_ptr(), increasing compile-coverage as a side-effect. Reported-by: noreply@ellerman.id.au Fixes: 782e32a990d9d702 ("mtd: rawnand: lpc32xx_mlc: switch to using gpiod API") Signed-off-by: Geert Uytterhoeven Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221027131028.3838303-1-geert@linux-m68k.org drivers/mtd/nand/raw/lpc32xx_mlc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit a50ae8c98e5766a4fcb78e76f13cc658b784eac1 Author: Dario Binacchi Date: Tue Oct 18 19:02:05 2022 +0200 mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase() This function is only used within this module, so it is no longer necessary to use EXPORT_SYMBOL_GPL(). Signed-off-by: Dario Binacchi Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221018170205.1733958-1-dario.binacchi@amarulasolutions.com drivers/mtd/nand/core.c | 3 +-- include/linux/mtd/nand.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit fe40ffdb7656d1f9c42dd402740765ff8b418b17 Author: Mark Rutland Date: Fri Sep 30 12:18:44 2022 +0100 arm_pmu: rework ACPI probing The current ACPI PMU probing logic tries to associate PMUs with CPUs when the CPU is first brought online, in order to handle late hotplug, though PMUs are only registered during early boot, and so for late hotplugged CPUs this can only associate the CPU with an existing PMU. We tried to be clever and the have the arm_pmu_acpi_cpu_starting() callback allocate a struct arm_pmu when no matching instance is found, in order to avoid duplication of logic. However, as above this doesn't do anything useful for late hotplugged CPUs, and this requires us to allocate memory in an atomic context, which is especially problematic for PREEMPT_RT, as reported by Valentin and Pierre. This patch reworks the probing to detect PMUs for all online CPUs in the arm_pmu_acpi_probe() function, which is more aligned with how DT probing works. The arm_pmu_acpi_cpu_starting() callback only tries to associate CPUs with an existing arm_pmu instance, avoiding the problem of allocating in atomic context. Note that as we didn't previously register PMUs for late-hotplugged CPUs, this change doesn't result in a loss of existing functionality, though we will now warn when we cannot associate a CPU with a PMU. This change allows us to pull the hotplug callback registration into the arm_pmu_acpi_probe() function, as we no longer need the callbacks to be invoked shortly after probing the boot CPUs, and can register it without invoking the calls. For the moment the arm_pmu_acpi_init() initcall remains to register the SPE PMU, though in future this should probably be moved elsewhere (e.g. the arm64 ACPI init code), since this doesn't need to be tied to the regular CPU PMU code. Signed-off-by: Mark Rutland Reported-by: Valentin Schneider Link: https://lore.kernel.org/r/20210810134127.1394269-2-valentin.schneider@arm.com/ Reported-by: Pierre Gondois Link: https://lore.kernel.org/linux-arm-kernel/20220912155105.1443303-1-pierre.gondois@arm.com/ Cc: Pierre Gondois Cc: Valentin Schneider Cc: Will Deacon Reviewed-and-tested-by: Pierre Gondois Link: https://lore.kernel.org/r/20220930111844.1522365-4-mark.rutland@arm.com Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 17 ++------ drivers/perf/arm_pmu_acpi.c | 95 +++++++++++++++++++++++--------------------- include/linux/perf/arm_pmu.h | 1 - 3 files changed, 52 insertions(+), 61 deletions(-) commit 6349a2470d07561bc25e34681985c6ff9c807dfb Author: Mark Rutland Date: Fri Sep 30 12:18:43 2022 +0100 arm_pmu: factor out PMU matching A subsequent patch will rework the ACPI probing of PMUs, and we'll need to match a CPU with a known cpuid in two separate paths. Factor out the matching logic into a helper function so that it can be reused. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Pierre Gondois Cc: Will Deacon Reviewed-and-tested-by: Pierre Gondois Link: https://lore.kernel.org/r/20220930111844.1522365-3-mark.rutland@arm.com Signed-off-by: Will Deacon drivers/perf/arm_pmu_acpi.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit ad51b5043bb39e0d715e8ad910fa5ac899ebc70b Author: Mark Rutland Date: Fri Sep 30 12:18:42 2022 +0100 arm_pmu: acpi: factor out PMU<->CPU association A subsequent patch will rework the ACPI probing of PMUs, and we'll need to associate a CPU with a PMU in two separate paths. Factor out the association logic into a helper function so that it can be reused. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Pierre Gondois Cc: Will Deacon Reviewed-and-tested-by: Pierre Gondois Link: https://lore.kernel.org/r/20220930111844.1522365-2-mark.rutland@arm.com Signed-off-by: Will Deacon drivers/perf/arm_pmu_acpi.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 077dc37db1e1da1f0e6a745328e4caa6d414e501 Author: Jilin Yuan Date: Fri Oct 28 21:40:36 2022 +0800 mtd: inftlcore: fix repeated words in comments Delete the redundant word 'it'. Signed-off-by: Jilin Yuan Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221028134036.63000-1-yuanjilin@cdjrlc.com drivers/mtd/inftlcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1aadf01e5076b9ab6bf294b9622335c651314895 Author: Gaosheng Cui Date: Mon Oct 24 14:51:09 2022 +0800 mtd: core: fix possible resource leak in init_mtd() I got the error report while inject fault in init_mtd(): sysfs: cannot create duplicate filename '/devices/virtual/bdi/mtd-0' Call Trace: dump_stack_lvl+0x67/0x83 sysfs_warn_dup+0x60/0x70 sysfs_create_dir_ns+0x109/0x120 kobject_add_internal+0xce/0x2f0 kobject_add+0x98/0x110 device_add+0x179/0xc00 device_create_groups_vargs+0xf4/0x100 device_create+0x7b/0xb0 bdi_register_va.part.13+0x58/0x2d0 bdi_register+0x9b/0xb0 init_mtd+0x62/0x171 [mtd] do_one_initcall+0x6c/0x3c0 do_init_module+0x58/0x222 load_module+0x268e/0x27d0 __do_sys_finit_module+0xd5/0x140 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd kobject_add_internal failed for mtd-0 with -EEXIST, don't try to register things with the same name in the same directory. Error registering mtd class or bdi: -17 If init_mtdchar() fails in init_mtd(), mtd_bdi will not be unregistered, as a result, we can't load the mtd module again, to fix this by calling bdi_unregister(mtd_bdi) after out_procfs label. Fixes: 445caaa20c4d ("mtd: Allocate bdi objects dynamically") Signed-off-by: Gaosheng Cui Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221024065109.2050705-1-cuigaosheng1@huawei.com drivers/mtd/mtdcore.c | 1 + 1 file changed, 1 insertion(+) commit 26422ac78e9d8767bd4aabfbae616b15edbf6a1b Author: Rafał Miłecki Date: Sat Oct 22 23:13:18 2022 +0200 mtd: core: set ROOT_DEV for partitions marked as rootfs in DT This adds support for "linux,rootfs" binding that is used to mark flash partition containing rootfs. It's useful for devices using device tree that don't have bootloader passing root info in cmdline. Signed-off-by: Rafał Miłecki Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221022211318.32009-2-zajec5@gmail.com drivers/mtd/mtdcore.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2b9a31d762f0441ab87cb76524c005adf54d6719 Author: Rafał Miłecki Date: Sat Oct 22 23:13:17 2022 +0200 dt-bindings: mtd: partitions: support marking rootfs partition Linux needs to know what to use as root device. On embedded devices with flash the only common way to specify that is cmdline & root= parameter. That solution works with U-Boot which is Linux & cmdline aware but isn't available with all market bootloaders. Also that method is fragile: 1. Requires specific probing order on multi-flash devices 2. Uses hardcoded partitions indexes A lot of devices use different partitioning methods. It may be "fixed-partitions" or some dynamic partitioning (e.g. based on parts table). For such cases allow "linux,rootfs" property to mark correct flash partition. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221022211318.32009-1-zajec5@gmail.com .../devicetree/bindings/mtd/partitions/fixed-partitions.yaml | 1 + Documentation/devicetree/bindings/mtd/partitions/partition.yaml | 4 ++++ 2 files changed, 5 insertions(+) commit 895d68a39481a75c680aa421546931fb11942fa6 Author: Zhang Xiaoxu Date: Sat Oct 22 20:13:52 2022 +0800 mtd: Fix device name leak when register device failed in add_mtd_device() There is a kmemleak when register device failed: unreferenced object 0xffff888101aab550 (size 8): comm "insmod", pid 3922, jiffies 4295277753 (age 925.408s) hex dump (first 8 bytes): 6d 74 64 30 00 88 ff ff mtd0.... backtrace: [<00000000bde26724>] __kmalloc_node_track_caller+0x4e/0x150 [<000000003c32b416>] kvasprintf+0xb0/0x130 [<000000001f7a8f15>] kobject_set_name_vargs+0x2f/0xb0 [<000000006e781163>] dev_set_name+0xab/0xe0 [<00000000e30d0c78>] add_mtd_device+0x4bb/0x700 [<00000000f3d34de7>] mtd_device_parse_register+0x2ac/0x3f0 [<00000000c0d88488>] 0xffffffffa0238457 [<00000000b40d0922>] 0xffffffffa02a008f [<0000000023d17b9d>] do_one_initcall+0x87/0x2a0 [<00000000770f6ca6>] do_init_module+0xdf/0x320 [<000000007b6768fe>] load_module+0x2f98/0x3330 [<00000000346bed5a>] __do_sys_finit_module+0x113/0x1b0 [<00000000674c2290>] do_syscall_64+0x35/0x80 [<000000004c6a8d97>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 If register device failed, should call put_device() to give up the reference. Fixes: 1f24b5a8ecbb ("[MTD] driver model updates") Signed-off-by: Zhang Xiaoxu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221022121352.2534682-1-zhangxiaoxu5@huawei.com drivers/mtd/mtdcore.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a6c5f12b0df22574f8eb02b0159bc71ac66c1a64 Author: Arnd Bergmann Date: Fri Oct 21 17:49:36 2022 +0200 mtd: remove lart flash driver The sa1100 lart platform was removed, so its flash driver is no longer useful. Signed-off-by: Arnd Bergmann Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221021155000.4108406-7-arnd@kernel.org drivers/mtd/devices/Kconfig | 8 - drivers/mtd/devices/Makefile | 1 - drivers/mtd/devices/lart.c | 682 ------------------------------------------- 3 files changed, 691 deletions(-) commit 318ff0693095defc683d00bb3fd7c482d10b03d7 Author: Nícolas F. R. A. Prado Date: Wed Nov 2 14:20:00 2022 -0400 ASoC: rt5682: Support DBVDD and LDO1-IN supplies Add support for the DBVDD and LDO1-IN supplies. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221102182002.255282-7-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/codecs/rt5682.c | 2 ++ sound/soc/codecs/rt5682.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 5aab1a56b3dd031603a50ed7fd53e3c607a42a86 Author: Nícolas F. R. A. Prado Date: Wed Nov 2 14:19:59 2022 -0400 ASoC: rt5682s: Support DBVDD and LDO1-IN supplies Add support for the DBVDD and LDO1-IN supplies. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221102182002.255282-6-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/codecs/rt5682s.c | 22 ++++++++++++++++++++++ sound/soc/codecs/rt5682s.h | 2 ++ 2 files changed, 24 insertions(+) commit 9354fa7f6ee4ef721351c29316b59eb8f724ca49 Author: Nícolas F. R. A. Prado Date: Wed Nov 2 14:19:58 2022 -0400 ASoC: dt-bindings: rt5682: Add DBVDD and LDO1-IN supplies The rt5682 codec has two additional power supply pins, DBVDD and LDO1_IN, that aren't currently described in the binding. Add them. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221102182002.255282-5-nfraprado@collabora.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt5682.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4d3c884ca7fb8ea25555c9a4b5ab1f9acad22587 Author: Nícolas F. R. A. Prado Date: Wed Nov 2 14:19:57 2022 -0400 ASoC: dt-bindings: rt5682: Add AVDD, MICVDD and VBAT supplies The rt5682 codec has three supplies - AVDD, MICVDD and VBAT - which are already used by sc7180-trogdor.dtsi. Document them in the binding. Acked-by: Krzysztof Kozlowski Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221102182002.255282-4-nfraprado@collabora.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt5682.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ed20a9bf3f16e413a41cd09db74fc7f8dcb1dcef Author: Nícolas F. R. A. Prado Date: Wed Nov 2 14:19:56 2022 -0400 ASoC: dt-bindings: realtek,rt5682s: Add DBVDD and LDO1-IN supplies The rt5682s codec has two additional power supply pins, DBVDD and LDO1_IN, that aren't currently described in the binding. Add them. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221102182002.255282-3-nfraprado@collabora.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 163460262782b183a28d07255403fa72151fa20b Author: Nícolas F. R. A. Prado Date: Wed Nov 2 14:19:55 2022 -0400 ASoC: dt-bindings: realtek,rt5682s: Add AVDD and MICVDD supplies The rt5682s codec has two supplies - AVDD and MICVDD - which are already used by sc7180-trogdor-kingoftown.dtsi. Document them in the binding. Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221102182002.255282-2-nfraprado@collabora.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6c0a15a3dc6b45156c5b9568c8308e3f0d802af0 Author: Dan Carpenter Date: Tue Oct 25 18:34:24 2022 +0300 mtd: parsers: tplink_safeloader: fix uninitialized variable bug On 64 bit systems, the highest 32 bits of the "offset" variable are not initialized. Also the existing code is not endian safe (it will fail on big endian systems). Change the type of "offset" to a u32. Fixes: aec4d5f5ffd0 ("mtd: parsers: add TP-Link SafeLoader partitions table parser") Signed-off-by: Dan Carpenter Acked-by: Rafał Miłecki Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/Y1gCALFWXYYwqV1P@kili drivers/mtd/parsers/tplink_safeloader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 00a3588084bee6f37bb2b1d343f96900cfe049bc Author: Rafał Miłecki Date: Sat Oct 15 11:29:50 2022 +0200 mtd: parsers: add TP-Link SafeLoader partitions table parser This parser deals with most TP-Link home routers. It reads info about partitions and registers them in the MTD subsystem. Example from TP-Link Archer C5 V2: spi-nor spi0.0: s25fl128s1 (16384 Kbytes) 15 tplink-safeloader partitions found on MTD device spi0.0 Creating 15 MTD partitions on "spi0.0": 0x000000000000-0x000000040000 : "fs-uboot" 0x000000040000-0x000000440000 : "os-image" 0x000000440000-0x000000e40000 : "rootfs" 0x000000e40000-0x000000e40200 : "default-mac" 0x000000e40200-0x000000e40400 : "pin" 0x000000e40400-0x000000e40600 : "product-info" 0x000000e50000-0x000000e60000 : "partition-table" 0x000000e60000-0x000000e60200 : "soft-version" 0x000000e61000-0x000000e70000 : "support-list" 0x000000e70000-0x000000e80000 : "profile" 0x000000e80000-0x000000e90000 : "default-config" 0x000000e90000-0x000000ee0000 : "user-config" 0x000000ee0000-0x000000fe0000 : "log" 0x000000fe0000-0x000000ff0000 : "radio_bk" 0x000000ff0000-0x000001000000 : "radio" Signed-off-by: Rafał Miłecki Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221015092950.27467-2-zajec5@gmail.com drivers/mtd/parsers/Kconfig | 15 ++++ drivers/mtd/parsers/Makefile | 1 + drivers/mtd/parsers/tplink_safeloader.c | 150 ++++++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+) commit 132c57b4898755ae5d5f190f77d10b788d971b95 Author: Rafał Miłecki Date: Sat Oct 15 11:29:49 2022 +0200 dt-bindings: mtd: partitions: add TP-Link SafeLoader layout Most TP-Link home routers use the same partitioning system based on a custom ASCII table. It doesn't seem to have any official name. GPL sources contain tool named simply "make_flash" and Makefile target "FlashMaker". This partitions table format was first found in devices with a custom SafeLoader bootloader so it was called SafeLoader by a community. Later it was ported to other bootloaders but it seems the name sticked. Add binding for describing flashes with SafeLoader partitions table. It allows operating systems to parse it properly and register proper flash layout. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221015092950.27467-1-zajec5@gmail.com .../partitions/tplink,safeloader-partitions.yaml | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 7cc84e0e07d063c246809ea78f51607f858766bf Author: Ray Zhang Date: Mon Oct 10 04:55:49 2022 +0000 mtd: mtdoops: panic caused mtdoops to call mtdoops_erase function immediately The panic function disables the local interrupts, preemption, and all other processors. When the invoked mtdoops needs to erase a used page, calling schedule_work() to do it will not work. Instead, just call mtdoops_erase function immediately. Tested: ~# echo c > /proc/sysrq-trigger [ 171.654759] sysrq: Trigger a crash [ 171.658325] Kernel panic - not syncing: sysrq triggered crash ...... [ 172.406423] mtdoops: not ready 34, 35 (erase immediately) [ 172.432285] mtdoops: ready 34, 35 [ 172.435633] Rebooting in 10 seconds.. Signed-off-by: Ray Zhang Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221010045549.2221965-4-sgzhang@google.com drivers/mtd/mtdoops.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 340193e079a899f5527cddccff2b5de2c98bc31b Author: Ray Zhang Date: Mon Oct 10 04:55:48 2022 +0000 mtd: mtdoops: add mtdoops_erase function and move mtdoops_inc_counter to after it Preparing for next patch with minimal code difference, add mtdoops_erase function and move mtdoops_inc_counter to after it, with no functional change. Signed-off-by: Ray Zhang Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221010045549.2221965-3-sgzhang@google.com drivers/mtd/mtdoops.c | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) commit 43cfba56d312f0a45e0b3eaa63606e05ae7fac14 Author: Ray Zhang Date: Mon Oct 10 04:55:47 2022 +0000 mtd: mtdoops: change printk() to counterpart pr_ functions To comply with latest kernel code requirement, change printk() to counterpart pr_ functions in mtdoops driver: - change printk(INFO) to pr_info() - change printk(DEBUG) to pr_debug() - change printk(WARNING) to pr_warn() - change printk(ERR) to pr_err() Note that only if dynamic debugging is enabled or DEBUG is defined, printk(KERN_DEBUG) and pr_debug() are equivalent; Otherwise pr_debug() is no-op, causing different behavior. Signed-off-by: Ray Zhang Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221010045549.2221965-2-sgzhang@google.com drivers/mtd/mtdoops.c | 52 ++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) commit 2df11f00100d7278185a9dbefa20ba3f5d32401d Author: Rafał Miłecki Date: Tue Oct 4 10:37:10 2022 +0200 mtd: core: try to find OF node for every MTD partition So far this feature was limited to the top-level "nvmem-cells" node. There are multiple parsers creating partitions and subpartitions dynamically. Extend that code to handle them too. This allows finding partition-* node for every MTD (sub)partition. Random example: partitions { compatible = "brcm,bcm947xx-cfe-partitions"; partition-firmware { compatible = "brcm,trx"; partition-loader { }; }; }; Cc: Christian Marangi Signed-off-by: Rafał Miłecki Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221004083710.27704-2-zajec5@gmail.com drivers/mtd/mtdcore.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit c5f5d0cd40e3bc2d6d397af788a7c0241b1c6b68 Author: Rafał Miłecki Date: Tue Oct 4 10:37:09 2022 +0200 mtd: core: simplify (a bit) code find partition-matching dynamic OF node 1. Don't hardcode "partition-" string twice 2. Use simpler logic & use ->name to avoid of_property_read_string() 3. Use mtd_get_of_node() helper Cc: Christian Marangi Signed-off-by: Rafał Miłecki Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221004083710.27704-1-zajec5@gmail.com drivers/mtd/mtdcore.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 994b7ac1697b4581b7726d2ac64321e3c840229b Author: Masahiro Yamada Date: Thu Oct 13 08:35:00 2022 +0900 arm64: remove special treatment for the link order of head.o In the previous discussion (see the Link tag), Ard pointed out that arm/arm64/kernel/head.o does not need any special treatment - the only piece that must appear right at the start of the binary image is the image header which is emitted into .head.text. The linker script does the right thing to do. The build system does not need to manipulate the link order of head.o. Link: https://lore.kernel.org/lkml/CAMj1kXH77Ja8bSsq2Qj8Ck9iSZKw=1F8Uy-uAWGVDm4-CG=EuA@mail.gmail.com/ Suggested-by: Ard Biesheuvel Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Link: https://lore.kernel.org/r/20221012233500.156764-1-masahiroy@kernel.org Signed-off-by: Will Deacon scripts/head-object-list.txt | 1 - 1 file changed, 1 deletion(-) commit b9024f87d63fde052daa8687d16a23ea0f894bb0 Author: Jisheng Zhang Date: Thu Oct 6 15:55:42 2022 +0800 arm64: alternative: constify alternative_has_feature_* argument Inspired by x86 commit 864b435514b2("x86/jump_label: Mark arguments as const to satisfy asm constraints"), constify alternative_has_feature_* argument to satisfy asm constraints. And Steven in [1] also pointed out that "The "i" constraint needs to be a constant." Tested with building a simple external kernel module with "O0". Before the patch, got similar gcc warnings and errors as below: In file included from : In function ‘alternative_has_feature_likely’, inlined from ‘system_capabilities_finalized’ at arch/arm64/include/asm/cpufeature.h:440:9, inlined from ‘arm64_preempt_schedule_irq’ at arch/arm64/kernel/entry-common.c:264:6: include/linux/compiler_types.h:285:33: warning: ‘asm’ operand 0 probably does not match constraints 285 | #define asm_volatile_goto(x...) asm goto(x) | ^~~ arch/arm64/include/asm/alternative-macros.h:232:9: note: in expansion of macro ‘asm_volatile_goto’ 232 | asm_volatile_goto( | ^~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:285:33: error: impossible constraint in ‘asm’ 285 | #define asm_volatile_goto(x...) asm goto(x) | ^~~ arch/arm64/include/asm/alternative-macros.h:232:9: note: in expansion of macro ‘asm_volatile_goto’ 232 | asm_volatile_goto( | ^~~~~~~~~~~~~~~~~ After the patch, the simple external test kernel module is built fine with "-O0". [1]https://lore.kernel.org/all/20210212094059.5f8d05e8@gandalf.local.home/ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20221006075542.2658-3-jszhang@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/alternative-macros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit efbc95787cbeaaad66cde36e6acd2535bf036d56 Author: Jisheng Zhang Date: Thu Oct 6 15:55:41 2022 +0800 arm64: jump_label: mark arguments as const to satisfy asm constraints Inspired by x86 commit 864b435514b2("x86/jump_label: Mark arguments as const to satisfy asm constraints"), mark arch_static_branch()'s and arch_static_branch_jump()'s arguments as const to satisfy asm constraints. And Steven in [1] also pointed out that "The "i" constraint needs to be a constant." Tested with building a simple external kernel module with "O0". [1]https://lore.kernel.org/all/20210212094059.5f8d05e8@gandalf.local.home/ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20221006075542.2658-2-jszhang@kernel.org Signed-off-by: Will Deacon arch/arm64/include/asm/jump_label.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e7eda157c4071cd1e69f4b1687b0fbe1ae5e6f46 Author: Ondrej Mosnacek Date: Thu Nov 3 16:12:05 2022 +0100 fs: don't audit the capability check in simple_xattr_list() The check being unconditional may lead to unwanted denials reported by LSMs when a process has the capability granted by DAC, but denied by an LSM. In the case of SELinux such denials are a problem, since they can't be effectively filtered out via the policy and when not silenced, they produce noise that may hide a true problem or an attack. Checking for the capability only if any trusted xattr is actually present wouldn't really address the issue, since calling listxattr(2) on such node on its own doesn't indicate an explicit attempt to see the trusted xattrs. Additionally, it could potentially leak the presence of trusted xattrs to an unprivileged user if they can check for the denials (e.g. through dmesg). Therefore, it's best (and simplest) to keep the check unconditional and instead use ns_capable_noaudit() that will silence any associated LSM denials. Fixes: 38f38657444d ("xattr: extract simple_xattr code from tmpfs") Reported-by: Martin Pitt Suggested-by: Christian Brauner (Microsoft) Signed-off-by: Ondrej Mosnacek Reviewed-by: Christian Brauner (Microsoft) Reviewed-by: Paul Moore Signed-off-by: Christian Brauner (Microsoft) fs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05da178ce0aa152f0592e10fa874054187f3621b Author: Robin Murphy Date: Wed Sep 28 20:21:26 2022 +0100 ACPI/IORT: Update SMMUv3 DeviceID support IORT E.e now allows SMMUv3 nodes to describe the DeviceID for MSIs independently of wired GSIVs, where the previous oddly-restrictive definition meant that an SMMU without PRI support had to provide a DeviceID even if it didn't support MSIs either. Support this, with the usual temporary flag definition while the real one is making its way through ACPICA. Signed-off-by: Robin Murphy Tested-by: Nicolin Chen Reviewed-by: Nicolin Chen Link: https://lore.kernel.org/r/4b3e2ead4f392d1a47a7528da119d57918e5d806.1664392886.git.robin.murphy@arm.com Signed-off-by: Will Deacon drivers/acpi/arm64/iort.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit cdb6f424e93cec2c9d19d59c56ee448d63cb0146 Author: Balsam CHIHI Date: Fri Oct 21 10:47:08 2022 +0200 pinctrl: mediatek: mt8365: use mt8365_set_clr_mode() callback On MT8365, the SET/CLR of the mode is broken and some pin modes won't be set correctly. Use the mt8365_set_clr_mode() callback to fix the issue. Co-developed-by: Fabien Parent Signed-off-by: Fabien Parent Signed-off-by: Balsam CHIHI Link: https://lore.kernel.org/r/20221021084708.1109986-3-bchihi@baylibre.com Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt8365.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit d459a2352211bf01c532def4f85eb8c2545c610a Author: Balsam CHIHI Date: Fri Oct 21 10:47:07 2022 +0200 pinctrl: mediatek: common: add mt8365_set_clr_mode() callback for broken SET/CLR modes On MT8365, the SET/CLR of the mode is broken and some pin modes won't be set correctly. Add mt8365_set_clr_mode() callback for such SoCs, so that instead of using the SET/CLR register, use the main R/W register to read/update/write the modes. Co-developed-by: Fabien Parent Signed-off-by: Fabien Parent Signed-off-by: Balsam CHIHI Link: https://lore.kernel.org/r/20221021084708.1109986-2-bchihi@baylibre.com Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 15 +++++++++++++++ drivers/pinctrl/mediatek/pinctrl-mtk-common.h | 8 +++++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit 5b2560c4c20e6d6933625b4b56f6843d6c7faf0f Author: Yang Li Date: Mon Nov 7 14:22:55 2022 +0800 block: Fix some kernel-doc comments Remove the description of @required_features in elevator_match() to clear the below warning: block/elevator.c:103: warning: Excess function parameter 'required_features' description in 'elevator_match' Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2734 Fixes: ffb86425ee2c ("block: don't check for required features in elevator_match") Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20221107062255.2685-1-yang.lee@linux.alibaba.com Signed-off-by: Jens Axboe block/elevator.c | 1 - 1 file changed, 1 deletion(-) commit 5aa4860eb50f3700e3175759f608bcfb68d0d6ae Author: Nick Desaulniers Date: Mon Oct 24 20:43:47 2022 +0100 ARM: 9262/1: remove lazy evaluation in Makefile arch-y and tune-y used lazy evaluation since they used to contain cc-option checks. They don't any longer, so just eagerly evaluate these command line flags. Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Russell King (Oracle) arch/arm/Makefile | 60 +++++++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 33 deletions(-) commit 3f712c7c78a86640d28cc94469e312e59878d6b8 Author: Ulf Hansson Date: Mon Oct 24 13:36:39 2022 +0100 ARM: 9261/1: amba: Drop redundant assignments of the system PM callbacks If the system PM callbacks haven't been assigned, the PM core falls back to invoke the corresponding the pm_generic_* helpers for the device. Let's rely on this behaviour and drop the redundant assignments. Signed-off-by: Ulf Hansson Signed-off-by: Russell King (Oracle) drivers/amba/bus.c | 6 ------ 1 file changed, 6 deletions(-) commit 527d08631b30fb99721274eab8ebabd9c54b0b25 Author: Nick Desaulniers Date: Tue Oct 18 20:50:59 2022 +0100 ARM: 9260/1: lib/xor: use r10 rather than r7 in xor_arm4regs_{2|3} kbuild test robot reports: In file included from crypto/xor.c:17: ./arch/arm/include/asm/xor.h:61:3: error: write to reserved register 'R7' GET_BLOCK_4(p1); ^ ./arch/arm/include/asm/xor.h:20:10: note: expanded from macro 'GET_BLOCK_4' __asm__("ldmia %0, {%1, %2, %3, %4}" ^ ./arch/arm/include/asm/xor.h:63:3: error: write to reserved register 'R7' PUT_BLOCK_4(p1); ^ ./arch/arm/include/asm/xor.h:42:23: note: expanded from macro 'PUT_BLOCK_4' __asm__ __volatile__("stmia %0!, {%2, %3, %4, %5}" ^ ./arch/arm/include/asm/xor.h:83:3: error: write to reserved register 'R7' GET_BLOCK_4(p1); ^ ./arch/arm/include/asm/xor.h:20:10: note: expanded from macro 'GET_BLOCK_4' __asm__("ldmia %0, {%1, %2, %3, %4}" ^ ./arch/arm/include/asm/xor.h:86:3: error: write to reserved register 'R7' PUT_BLOCK_4(p1); ^ ./arch/arm/include/asm/xor.h:42:23: note: expanded from macro 'PUT_BLOCK_4' __asm__ __volatile__("stmia %0!, {%2, %3, %4, %5}" ^ Thumb2 uses r7 rather than r11 as the frame pointer. Let's use r10 rather than r7 for these temporaries. Link: https://github.com/ClangBuiltLinux/linux/issues/1732 Link: https://lore.kernel.org/llvm/202210072120.V1O2SuKY-lkp@intel.com/ Reported-by: kernel test robot Suggested-by: Ard Biesheuvel Reviewed-by: Ard Biesheuvel Signed-off-by: Nick Desaulniers Signed-off-by: Russell King (Oracle) arch/arm/include/asm/xor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8fc0b333a7dd9b98040096296ba591a3ac3e12c0 Author: Guilherme G. Piccoli Date: Mon Oct 17 20:41:30 2022 +0100 ARM: 9257/1: Disable FIQs (but not IRQs) on CPUs shutdown paths Currently the regular CPU shutdown path for ARM disables IRQs/FIQs in the secondary CPUs - smp_send_stop() calls ipi_cpu_stop(), which is responsible for that. IRQs are architecturally masked when we take an interrupt, but FIQs are high priority than IRQs, hence they aren't masked. With that said, it makes sense to disable FIQs here, but there's no need for (re-)disabling IRQs. More than that: there is an alternative path for disabling CPUs, in the form of function crash_smp_send_stop(), which is used for kexec/panic path. This function relies on a SMP call that also triggers a busy-wait loop [at machine_crash_nonpanic_core()], but without disabling FIQs. This might lead to odd scenarios, like early interrupts in the boot of kexec'd kernel or even interrupts in secondary "disabled" CPUs while the main one still works in the panic path and assumes all secondary CPUs are (really!) off. So, let's disable FIQs in both paths and *not* disable IRQs a second time, since they are already masked in both paths by the architecture. This way, we keep both CPU quiesce paths consistent and safe. Cc: Marc Zyngier Cc: Michael Kelley Signed-off-by: Guilherme G. Piccoli Signed-off-by: Russell King (Oracle) arch/arm/kernel/machine_kexec.c | 2 ++ arch/arm/kernel/smp.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit 3220022038b9a3845eea762af85f1c5694b9f861 Author: Nick Desaulniers Date: Tue Oct 11 20:00:12 2022 +0100 ARM: 9256/1: NWFPE: avoid compiler-generated __aeabi_uldivmod clang-15's ability to elide loops completely became more aggressive when it can deduce how a variable is being updated in a loop. Counting down one variable by an increment of another can be replaced by a modulo operation. For 64b variables on 32b ARM EABI targets, this can result in the compiler generating calls to __aeabi_uldivmod, which it does for a do while loop in float64_rem(). For the kernel, we'd generally prefer that developers not open code 64b division via binary / operators and instead use the more explicit helpers from div64.h. On arm-linux-gnuabi targets, failure to do so can result in linkage failures due to undefined references to __aeabi_uldivmod(). While developers can avoid open coding divisions on 64b variables, the compiler doesn't know that the Linux kernel has a partial implementation of a compiler runtime (--rtlib) to enforce this convention. It's also undecidable for the compiler whether the code in question would be faster to execute the loop vs elide it and do the 64b division. While I actively avoid using the internal -mllvm command line flags, I think we get better code than using barrier() here, which will force reloads+spills in the loop for all toolchains. Link: https://github.com/ClangBuiltLinux/linux/issues/1666 Reported-by: Nathan Chancellor Reviewed-by: Arnd Bergmann Signed-off-by: Nick Desaulniers Tested-by: Nathan Chancellor Cc: stable@vger.kernel.org Signed-off-by: Russell King (Oracle) arch/arm/nwfpe/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) commit e513ffd881055c17ccdcc50f279360e2e1bffb40 Author: Wang Kefeng Date: Tue Oct 11 02:35:07 2022 +0100 ARM: 9255/1: efi/dump UEFI runtime page tables for ARM UEFI runtime page tables dump only for ARM64 at present, but ARM support EFI and ARM_PTDUMP_DEBUGFS now. Since ARM could potentially execute with a 1G/3G user/kernel split, choosing 1G as the upper limit for UEFI runtime end, with this, we could enable UEFI runtime page tables on ARM. Acked-by: Ard Biesheuvel Tested-by: Ard Biesheuvel Signed-off-by: Kefeng Wang Signed-off-by: Russell King (Oracle) arch/arm/include/asm/ptdump.h | 1 + arch/arm64/include/asm/ptdump.h | 1 + drivers/firmware/efi/arm-runtime.c | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) commit b40b84b120f5cb5f8c6de0b404ffb68cf72b7c90 Author: Wang Kefeng Date: Tue Oct 11 02:34:05 2022 +0100 ARM: 9254/1: mm: Provide better message when kernel fault If there is a kernel fault, see do_kernel_fault(), we only print the generic "paging request" or "NULL pointer dereference" message which don't show read, write or excute information, let's provide better fault message for them. Signed-off-by: Kefeng Wang Signed-off-by: Russell King (Oracle) arch/arm/mm/fault.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d539fee9f825b0c8eac049732c83562b28a483b5 Author: Seung-Woo Kim Date: Fri Sep 30 22:30:09 2022 +0100 ARM: 9253/1: ubsan: select ARCH_HAS_UBSAN_SANITIZE_ALL To enable UBSAN on ARM, this patch enables ARCH_HAS_UBSAN_SANITIZE_ALL from arm confiuration. Basic kernel bootup test is passed on arm with CONFIG_UBSAN_SANITIZE_ALL enabled. [florian: rebased against v6.0-rc7] Signed-off-by: Seung-Woo Kim Signed-off-by: Florian Fainelli Signed-off-by: Russell King (Oracle) arch/arm/Kconfig | 1 + arch/arm/boot/compressed/Makefile | 1 + arch/arm/vdso/Makefile | 1 + 3 files changed, 3 insertions(+) commit 4ab07fd3fbe6b6fe5f28e0e2987eb02bedc2b495 Author: Alex Sverdlin Date: Tue Sep 27 13:08:37 2022 +0100 ARM: 9252/1: module: Teach unwinder about PLTs "unwind: Index not found eef26358" warnings keep popping up on CONFIG_ARM_MODULE_PLTS-enabled systems if the PC points to a PLT veneer. Teach the unwinder how to deal with them, taking into account they don't change state of the stack or register file except loading PC. Link: https://lore.kernel.org/linux-arm-kernel/20200402153845.30985-1-kursad.oney@broadcom.com/ Tested-by: Kursad Oney Reviewed-by: Linus Walleij Signed-off-by: Alexander Sverdlin Signed-off-by: Russell King (Oracle) arch/arm/include/asm/module.h | 5 +++++ arch/arm/kernel/module-plts.c | 14 ++++++++++++++ arch/arm/kernel/unwind.c | 13 ++++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) commit 6251d38059ae22304ede4f3748af9f795bdbf4fd Author: Besar Wicaksono Date: Wed Sep 28 19:28:34 2022 -0500 ACPI: ARM Performance Monitoring Unit Table (APMT) initial support ARM Performance Monitoring Unit Table describes the properties of PMU support in ARM-based system. The APMT table contains a list of nodes, each represents a PMU in the system that conforms to ARM CoreSight PMU architecture. The properties of each node include information required to access the PMU (e.g. MMIO base address, interrupt number) and also identification. For more detailed information, please refer to the specification below: * APMT: https://developer.arm.com/documentation/den0117/latest * ARM Coresight PMU: https://developer.arm.com/documentation/ihi0091/latest The initial support adds the detection of APMT table and generic infrastructure to create platform devices for ARM CoreSight PMUs. Similar to IORT the root pointer of APMT is preserved during runtime and each PMU platform device is given a pointer to the corresponding APMT node. Signed-off-by: Besar Wicaksono Acked-by: Rafael J. Wysocki Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20220929002834.32664-1-bwicaksono@nvidia.com Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + drivers/acpi/arm64/Kconfig | 3 + drivers/acpi/arm64/Makefile | 1 + drivers/acpi/arm64/apmt.c | 177 ++++++++++++++++++++++++++++++++++++++++++++ drivers/acpi/bus.c | 2 + include/linux/acpi_apmt.h | 19 +++++ 6 files changed, 203 insertions(+) commit 36c6cdc07b517e88ccde8ebcc87bb5c59f2a0f4b Author: Kai Vehmanen Date: Mon Nov 7 09:26:21 2022 +0200 ASoC: SOF: Intel: hda-loader: use small buffer for iccmax stream The data received via iccmax stream is not used anywhere, so no need to allocate a big DMA buffer for it. This is especially important as the allocation is done even in cases where reload of the firmware is skipped and execution happens directly from the firmware stored in IMR. Signed-off-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221107072621.28904-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-loader.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 18cd1f3227768f4a76c4f7aa95c1256f07ce8647 Author: Peter Ujfalusi Date: Mon Nov 7 10:41:58 2022 +0200 ASoC: SOF: ipc4-topology: Implement tear_down_all_pipelines callback During system suspend there is a chance that the running stream undergo an xrun and instead of the expected SNDRV_PCM_TRIGGER_SUSPEND trigger we will receive SNDRV_PCM_TRIGGER_STOP. The handling of SUSPEND and STOP triggers differ that case of the later the sof_pcm_stream_free() will be called with free_widget_list = false. But we must make sure that all active widgets and streams are free before entering suspend in order to be able to resume without error. We can utilize the tear_down_all_pipelines to put the system to an expected state and to fix the suspend/resume error. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20221107084158.26629-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit bc63a806acdcfca201c68c820731d74185118789 Author: Nícolas F. R. A. Prado Date: Fri Nov 4 17:24:08 2022 -0400 ASoC: mediatek: mt8183-mt6358: 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 Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221104212409.603970-2-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 1 + 1 file changed, 1 insertion(+) commit b5e004b0e5b57d14ac7804875878cdfdb31c9288 Author: Nícolas F. R. A. Prado Date: Fri Nov 4 17:24:07 2022 -0400 ASoC: mediatek: mt8183-da7219: 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 Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221104212409.603970-1-nfraprado@collabora.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 1 + 1 file changed, 1 insertion(+) commit c05dff38d21556c532032f63330271b96265d448 Author: Amadeusz Sławiński Date: Mon Oct 31 17:02:27 2022 +0100 ASoC: codecs: da7219: Do not export internal symbols With all users utilizing component->set_jack(), there is no need to export da7219_aad_jack_det() function. While at it, remove exports from all other functions as well. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221031160227.2352630-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/codecs/da7219-aad.c | 4 ---- 1 file changed, 4 deletions(-) commit 7af1ca5bb5e3c2e472a040f8b52382ccc57bb01a Author: Cezary Rojewski Date: Mon Oct 31 17:02:26 2022 +0100 ASoC: Intel: avs: Drop da7219_aad_jack_det() usage Do not access the internal function directly, do so through component->set_jack() instead. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221031160227.2352630-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/da7219.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ba54da32ec683692ed69ffbed5b4afb414def7d2 Author: Cezary Rojewski Date: Mon Oct 31 17:02:25 2022 +0100 ASoC: amd: Drop da7219_aad_jack_det() usage Do not access the internal function directly, do so through component->set_jack() instead. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221031160227.2352630-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/amd/acp-da7219-max98357a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ebe62df7c50e63d11c7fdfbdff701583cd4f1f3a Author: Cezary Rojewski Date: Mon Oct 31 17:02:24 2022 +0100 ASoC: rockchip: Drop da7219_aad_jack_det() usage Do not access the internal function directly, do so through component->set_jack() instead. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221031160227.2352630-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 922a5e5a6389da46b51075301440d07e53c600ea Author: Cezary Rojewski Date: Mon Oct 31 17:02:23 2022 +0100 ASoC: mediatek: Drop da7219_aad_jack_det() usage Do not access the internal function directly, do so through component->set_jack() instead. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221031160227.2352630-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 3 +-- sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) commit 9a1fe79daddbdc57307bd7dd9a29ef06aa7b5f34 Author: Cezary Rojewski Date: Mon Oct 31 17:02:22 2022 +0100 ASoC: Intel: Drop da7219_aad_jack_det() usage Do not access the internal function directly, do so through component->set_jack() instead. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221031160227.2352630-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 3 +-- sound/soc/intel/boards/kbl_da7219_max98357a.c | 3 +-- sound/soc/intel/boards/kbl_da7219_max98927.c | 3 +-- sound/soc/intel/boards/sof_da7219_max98373.c | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) commit 4366b7ca88f04237ae654846167db993dbe37397 Author: Amadeusz Sławiński Date: Mon Oct 31 17:02:21 2022 +0100 ASoC: codecs: da7219: Introduce set_jack() callback Codec driver for da7219 implements jack detect functionality, but does not integrate it with the framework. Platform component drivers are accessing the functionality through internal da7219_aad_jack_det() instead. Address this by implementing set_jack() for the codec. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221031160227.2352630-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/codecs/da7219.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c84443db0fddd188838faa9d71ebd6d9aa280068 Author: Chao Song Date: Mon Nov 7 10:57:06 2022 +0200 ASoC: SOF: topology: Add helper to get/put widget queue id Add get/put queue id helper to manage queue id in route setup and route free. The queue allocation rules are: - If widget only has one sink/source pin, zero will be returned as the queue ID directly. - If widget has more than one sink/source pins, and pin binding array is defined in topology, queue ID will be allocated according to the pin binding array. - If widget has more than one sink/sink pins, and pin binding array is not defined, Linux ID allocation will be used to allocate queue ID dynamically. Signed-off-by: Chao Song Signed-off-by: Bard Liao Suggested-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221107085706.2550-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 133 +++++++++++++++++++++++++++++++++++++----- sound/soc/sof/sof-audio.h | 6 ++ sound/soc/sof/topology.c | 5 ++ 3 files changed, 131 insertions(+), 13 deletions(-) commit 3b3acedbd0f30b822e05e5e51b646a67de0031fc Author: Chao Song Date: Mon Nov 7 10:57:05 2022 +0200 ASoC: SOF: Add support to parse pin binding array from topology Add support for parsing sink/source pin binding array per widget from topology. The pin binding arrays will be used to determine the source and sink queue IDs during widget binding for widget that requires special pin binding. An example of widget that requires special pin binding is the smart amplifier widget, its feedback sink pin has to be connected to a capture DAI copier for codec feedback, while the other sink pin has to be connected to a host DAI copier. Pin ID is required during widget binding for correct route setup. Conversely, the pin ID for 'generic' pins is not defined in the topology and will be allocated by the kernel dynamically. When only one pin is supported, the pin ID shall always be zero. When more than one pin is supported, the pin ID is determined with the ID allocation mechanism in the kernel. Signed-off-by: Chao Song Signed-off-by: Bard Liao Suggested-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221107085706.2550-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown include/uapi/sound/sof/tokens.h | 7 ++ sound/soc/sof/sof-audio.h | 21 ++++++ sound/soc/sof/topology.c | 139 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 163 insertions(+), 4 deletions(-) commit 6327c7297fc86d2203ab31882152a9d0b049f7b2 Author: Chao Song Date: Mon Nov 7 10:57:04 2022 +0200 ASoC: SOF: Add support for parsing the number of sink/source pins Add support for parsing the number of sink/source pins per widget from topology. They will be used to determine the sink/source queue IDs during widget binding. Signed-off-by: Bard Liao Signed-off-by: Chao Song Suggested-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221107085706.2550-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown include/uapi/sound/sof/tokens.h | 2 ++ sound/soc/sof/sof-audio.h | 15 +++++++++++++++ sound/soc/sof/topology.c | 33 +++++++++++++++++++++++++++++---- 3 files changed, 46 insertions(+), 4 deletions(-) commit 8f5979833b45b318d0971f384de3fb17924042f0 Author: Kuninori Morimoto Date: Tue Nov 1 04:22:27 2022 +0000 ASoC: audio-graph-card2: check also dpcm node for convert-xxx DPCM connection on Card2, its DT looks like below. Current Card2 is checking (a)/(b) part only for convert-xxx settings. But it is not useful. This patch enables its settings at (A)/(B) part too. (A)/(B) settings will be overwritten (a)/(b) settings if it has. (A) (a) Card2 <--+--> FE <---> CPU | +--> BE <---> Codec (B) (b)
card2-sound { ... links = ; /* (A) (B) */ }; dpcm { /* FE */ ports@0 { /* (A) */ fe: port { fe_ep: endpoint { remote-endpoint = <&cpu_ep>; } }; }; /* BE */ ports@1 { /* (B) */ be: port { convert-rate = <44100>; /* This patch enables this */ be_ep: endpoint { remote-endpoint = <&codec_ep>; } }; }; }; cpu { /* CPU (a) */ port { cpu_ep: endpoint { remote-endpoint = <&fe_ep>; } }; }; codec { /* Codec (b) */ port { convert-rate = <48000>; /* (B) settings will be over written here */ codec_ep: endpoint { remote-endpoint = <&be_ep>; } }; }; Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871qqn8fst.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2dc025aba7fbebd6c6f3a05bc3530af31776a6fa Author: Kuninori Morimoto Date: Tue Nov 1 04:22:09 2022 +0000 ASoC: audio-graph-card2-custom-sample.dtsi: add convert-rate for DPCM (MIXer) audio-graph-card2-custom-sample.dtsi is assuming that DPCM sample is MIXer connection. FE BE **** CPU3 -- * * -- Codec3 CPU4 -- * * **** CPU3/CPU4 need to convert rate in this case. This patch adds missing "convert-rate" setting sample for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8735b38fta.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card2-custom-sample.dtsi | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 5c065eaf445d14e70cbdb1da75e12567c7ae9b91 Author: Kuninori Morimoto Date: Tue Nov 1 04:21:54 2022 +0000 ASoC: simple-card-utils: remove asoc_simple_convert_fixup() No one is using asoc_simple_convert_fixup(), we don't need to export its symbol. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874jvj8ftp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 2 -- sound/soc/generic/simple-card-utils.c | 35 +++++++++++++---------------------- 2 files changed, 13 insertions(+), 24 deletions(-) commit a9cd6c6766857212894dd736d9f2bc29f1416f6a Author: Arnaldo Carvalho de Melo Date: Fri Nov 4 16:44:52 2022 -0300 perf trace: Add BPF augmenter to perf_event_open()'s 'struct perf_event_attr' arg Using BPF for that, doing a cleverish reuse of perf_event_attr__fprintf(), that really needs to be turned into __snprintf(), etc. But since the plan is to go the BTF way probably use libbpf's btf_dump__dump_type_data(). Example: [root@quaco ~]# perf trace -e ~acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.c,perf_event_open --max-events 10 perf stat --quiet sleep 0.001 fg 0.000 perf_event_open(attr_uptr: { type: 1, size: 128, config: 0x1, sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 258859 (perf), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 3 0.067 perf_event_open(attr_uptr: { type: 1, size: 128, config: 0x3, sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 258859 (perf), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 4 0.120 perf_event_open(attr_uptr: { type: 1, size: 128, config: 0x4, sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 258859 (perf), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 5 0.172 perf_event_open(attr_uptr: { type: 1, size: 128, config: 0x2, sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 258859 (perf), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 7 0.190 perf_event_open(attr_uptr: { size: 128, sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 258859 (perf), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 8 0.199 perf_event_open(attr_uptr: { size: 128, config: 0x1, sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 258859 (perf), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 9 0.204 perf_event_open(attr_uptr: { size: 128, config: 0x4, sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 258859 (perf), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 10 0.210 perf_event_open(attr_uptr: { size: 128, config: 0x5, sample_type: IDENTIFIER, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1 }, pid: 258859 (perf), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 11 [root@quaco ~]# Suggested-by: Ian Rogers Tested-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/Y2V2Tpu+2vzJyon2@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 3 +- tools/perf/examples/bpf/augmented_raw_syscalls.c | 44 ++++++++++++++++++++++++ tools/perf/trace/beauty/perf_event_open.c | 44 ++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 1 deletion(-) commit d8425a8c3a8419dd505016951dd6393f21fb394e Author: Song Fuchang Date: Mon Nov 7 19:18:35 2022 +0530 bus: mhi: host: pci_generic: Add HP variant of T99W175 The Foxconn T99W175 modem has an HP variant, which has the following output from lspci: 01:00.0 Wireless controller [0d40]: Device 03f0:0a6c It also has some HP-specific serial numbers on the metal case. It works well with this driver, so add support for this to the pci_generic driver. Signed-off-by: Song Fuchang Reviewed-by: Manivannan Sadhasivam [mani: manually applied the patch] Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/pci_generic.c | 3 +++ 1 file changed, 3 insertions(+) commit 58635d6615f1e5a870548ae8999870fdfcdecec0 Author: Nico Boehr Date: Mon Nov 7 13:12:21 2022 +0100 s390/mm: fix virtual-physical address confusion for swiotlb swiotlb passes virtual addresses to set_memory_encrypted() and set_memory_decrypted(), but uv_remove_shared() and uv_set_shared() expect physical addresses. This currently works, because virtual and physical addresses are the same. Add virt_to_phys() to resolve the virtual-physical confusion. Reported-by: Marc Hartmayer Signed-off-by: Nico Boehr Reviewed-by: Claudio Imbrenda Reviewed-by: Christian Borntraeger Link: https://lore.kernel.org/r/20221107121221.156274-2-nrb@linux.ibm.com Message-Id: <20221107121221.156274-2-nrb@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/mem_encrypt.h | 4 ++-- arch/s390/mm/init.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit 4b71e269f5a51ee12672ca6084c319930c144a62 Author: Samuel Holland Date: Sun Nov 6 23:35:52 2022 -0600 drm/sun4i: dsi: Add the A100 variant The A100 variant of the MIPI DSI controller now gets its module clock from the TCON via the TCON TOP, so the clock rate cannot be set to a fixed value. Otherwise, it appears to be the same as the A31 variant. Reviewed-by: Jernej Skrabec Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221107053552.2330-5-samuel@sholland.org Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1fa734a8163072e8f126259de2cadfa88d5bea70 Author: Samuel Holland Date: Sun Nov 6 23:35:51 2022 -0600 drm/sun4i: dsi: Add a variant structure Replace the ad-hoc calls to of_device_is_compatible() with a structure describing the differences between variants. This is in preparation for adding more variants to the driver. Reviewed-by: Jernej Skrabec Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221107053552.2330-4-samuel@sholland.org Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 53 ++++++++++++++++++++++------------ drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 7 +++++ 2 files changed, 42 insertions(+), 18 deletions(-) commit c1c7b394d8c35b2696f0b9d5840504d69fbdfa23 Author: Samuel Holland Date: Sun Nov 6 23:35:50 2022 -0600 dt-bindings: display: sun6i-dsi: Add the A100 variant The "40nm" MIPI DSI controller found in the A100 and D1 SoCs has the same register layout as previous SoC integrations. However, its module clock now comes from the TCON, which means it no longer runs at a fixed rate, so this needs to be distinguished in the driver. The controller also now uses pins on Port D instead of dedicated pins, so it drops the separate power domain. Acked-by: Krzysztof Kozlowski Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221107053552.2330-3-samuel@sholland.org Signed-off-by: Maxime Ripard .../display/allwinner,sun6i-a31-mipi-dsi.yaml | 28 ++++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) commit f7931b034438bd761c71931ed7222ff9ab04d4af Author: Samuel Holland Date: Sun Nov 6 23:35:49 2022 -0600 dt-bindings: display: sun6i-dsi: Fix clock conditional The A64 case should have limited maxItems, instead of duplicating the minItems value from the main binding. While here, simplify the binding by making this an "else" case of the two-clock conditional block. Fixes: fe5040f2843a ("dt-bindings: sun6i-dsi: Document A64 MIPI-DSI controller") Acked-by: Krzysztof Kozlowski Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221107053552.2330-2-samuel@sholland.org Signed-off-by: Maxime Ripard .../bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit a5cfc9d65879c0d377f732531a2e80ee3a9eebbc Author: Rajat Khandelwal Date: Tue Nov 1 17:20:42 2022 +0530 thunderbolt: Add wake on connect/disconnect on USB4 ports Wake on connect/disconnect is only supported while runtime suspend for now, which is obviously necessary. It is also not inherently desired for the system to wakeup on Thunderbolt/USB4 hot plug events. However, we can still make user in control of waking up the system in the events of hot plug/unplug. This patch adds 'wakeup' attribute under 'usb4_portX/power' sysfs attribute and only enables wakes on connect/disconnect to the respective port when 'wakeup' is set to 'enabled'. The attribute is set to 'disabled' by default. Signed-off-by: Rajat Khandelwal Signed-off-by: Mika Westerberg drivers/thunderbolt/tb_regs.h | 2 ++ drivers/thunderbolt/usb4.c | 33 +++++++++++++++++++++++++-------- drivers/thunderbolt/usb4_port.c | 3 +++ 3 files changed, 30 insertions(+), 8 deletions(-) commit bf46390f39c686d62afeae9845860e63886d63b7 Merge: e2dbda0fd2ae aba22ca8ccd6 Author: David S. Miller Date: Mon Nov 7 12:30:17 2022 +0000 Merge branch 'genetlink-per-op-type-policies' Jakub Kicinski says: ==================== genetlink: support per op type policies While writing new genetlink families I was increasingly annoyed by the fact that we don't support different policies for do and dump callbacks. This makes it hard to do proper input validation for dumps which usually have a lot more narrow range of accepted attributes. There is also a minor inconvenience of not supporting different per_doit and post_doit callbacks per op. This series addresses those problems by introducing another op format. v3: - minor fixes to patch 12 after I took it for a spin with a real family - adjust commit msg in patch 8 v2: https://lore.kernel.org/all/20221102213338.194672-1-kuba@kernel.org/ - wait for net changes to propagate - restore the missing comment in patch 1 - drop extra space in patch 3 - improve commit message in patch 4 v1: https://lore.kernel.org/all/20221018230728.1039524-1-kuba@kernel.org/ ==================== Signed-off-by: David S. Miller commit aba22ca8ccd6954ffbb1a7a671f34300887b4727 Author: Jakub Kicinski Date: Fri Nov 4 12:13:43 2022 -0700 genetlink: convert control family to split ops Prove that the split ops work. Sadly we need to keep bug-wards compatibility and specify the same policy for dump as do, even tho we don't parse inputs for the dump. Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller net/netlink/genetlink.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit b8fd60c36a44351f773432e24efd8bb92f8ba0c6 Author: Jakub Kicinski Date: Fri Nov 4 12:13:42 2022 -0700 genetlink: allow families to use split ops directly Let families to hook in the new split ops. They are more flexible and should not be much larger than full ops. Each split op is 40B while full op is 48B. Devlink for example has 54 dos and 19 dumps, 2 of the dumps do not have a do -> 56 full commands = 2688B. Split ops would have taken 2920B, so 9% more space while allowing individual per/post doit and per-type policies. Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller include/net/genetlink.h | 5 ++ net/netlink/genetlink.c | 170 ++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 149 insertions(+), 26 deletions(-) commit 7acfbbe17c18554960b812a95c26d7ef9b7b28ac Author: Jakub Kicinski Date: Fri Nov 4 12:13:41 2022 -0700 genetlink: inline old iteration helpers All dumpers use the iterators now, inline the cmd by index stuff into iterator code. Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/netlink/genetlink.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) commit b502b3185cd68f24510f8a253bf31a1b34605bb6 Author: Jakub Kicinski Date: Fri Nov 4 12:13:40 2022 -0700 genetlink: use iterator in the op to policy map dumping We can't put the full iterator in the struct ctrl_dump_policy_ctx because dump context is statically sized by netlink core. Allocate it dynamically. Rename policy to dump_map to make the logic a little easier to follow. Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller net/netlink/genetlink.c | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) commit 6557461cd27843213ca19a7918bbaa8c3b7c5f5c Author: Jakub Kicinski Date: Fri Nov 4 12:13:39 2022 -0700 genetlink: add iterator for walking family ops Subsequent changes will expose split op structures to users, so walking the family ops with just an index will get harder. Add a structured iterator, convert the simple cases. Policy dumping needs more careful conversion. Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller net/netlink/genetlink.c | 117 +++++++++++++++++++++++++++++++----------------- 1 file changed, 76 insertions(+), 41 deletions(-) commit 8d84322ae6d7921c461b6a5ef39be0b48c177b8a Author: Jakub Kicinski Date: Fri Nov 4 12:13:38 2022 -0700 genetlink: inline genl_get_cmd() All callers go via genl_get_cmd_split() now, so rename it to genl_get_cmd() remove the original. Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/netlink/genetlink.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) commit 26588edbef6094c41734b4443c2d7b4c4bd0085f Author: Jakub Kicinski Date: Fri Nov 4 12:13:37 2022 -0700 genetlink: support split policies in ctrl_dumppolicy_put_op() Pass do and dump versions of the op to ctrl_dumppolicy_put_op() so that it can provide a different policy index for the two. Since we now look at policies, and those are set appropriately there's no need to look at the GENL_DONT_VALIDATE_DUMP flag. Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller net/netlink/genetlink.c | 55 +++++++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 22 deletions(-) commit 92d3d9ba9bb3ab17b5bd4fd46032ced0264872c9 Author: Jakub Kicinski Date: Fri Nov 4 12:13:36 2022 -0700 genetlink: add policies for both doit and dumpit in ctrl_dumppolicy_start() Separate adding doit and dumpit policies for CTRL_CMD_GETPOLICY. This has no effect until we actually allow do and dump to come from different sources as netlink_policy_dump_add_policy() does deduplication. Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller net/netlink/genetlink.c | 48 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) commit e1a248911d0694c8f95510fcaa920c0b8e99c26c Author: Jakub Kicinski Date: Fri Nov 4 12:13:35 2022 -0700 genetlink: check for callback type at op load time Now that genl_get_cmd_split() is informed what type of callback user is trying to access (do or dump) we can check that this callback is indeed available and return an error early. Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller net/netlink/genetlink.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 7747eb75f6185a92db2e4a2643fdf6e4b6d87153 Author: Jakub Kicinski Date: Fri Nov 4 12:13:34 2022 -0700 genetlink: load policy based on validation flags Set the policy and maxattr pointers based on validation flags. genl_family_rcv_msg_attrs_parse() will do nothing and return NULL if maxattrs is zero, so no behavior change is expected. Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller net/netlink/genetlink.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 20b0b53aca436af9fece9428ca3ab7c7b9cf4583 Author: Jakub Kicinski Date: Fri Nov 4 12:13:33 2022 -0700 genetlink: introduce split op representation We currently have two forms of operations - small ops and "full" ops (or just ops). The former does not have pointers for some of the less commonly used features (namely dump start/done and policy). The "full" ops, however, still don't contain all the necessary information. In particular the policy is per command ID, while do and dump often accept different attributes. It's also not possible to define different pre_doit and post_doit callbacks for different commands within the family. At the same time a lot of commands do not support dumping and therefore all the dump-related information is wasted space. Create a new command representation which can hold info about a do implementation or a dump implementation, but not both at the same time. Use this new representation on the command execution path (genl_family_rcv_msg) as we either run a do or a dump and don't have to create a "full" op there. Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller include/net/genetlink.h | 60 ++++++++++++++++++++++++++++++++--- net/batman-adv/netlink.c | 6 ++-- net/core/devlink.c | 4 +-- net/core/drop_monitor.c | 4 +-- net/ieee802154/nl802154.c | 6 ++-- net/netlink/genetlink.c | 79 ++++++++++++++++++++++++++++++++++++++--------- net/wireless/nl80211.c | 6 ++-- 7 files changed, 136 insertions(+), 29 deletions(-) commit 7c3eaa022261d79d273d73ac68ff02cbe2839c10 Author: Jakub Kicinski Date: Fri Nov 4 12:13:32 2022 -0700 genetlink: move the private fields in struct genl_family Move the private fields down to form a "private section". Use the kdoc "private:" label comment thing to hide them from the main kdoc comment. Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg Reviewed-by: Jacob Keller Signed-off-by: David S. Miller include/net/genetlink.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit ff14adbd8779f098576ffdb98381809ed8e40dfe Author: Jakub Kicinski Date: Fri Nov 4 12:13:31 2022 -0700 genetlink: refactor the cmd <> policy mapping dump The code at the top of ctrl_dumppolicy() dumps mappings between ops and policies. It supports dumping both the entire family and single op if dump is filtered. But both of those cases are handled inside a loop, which makes the logic harder to follow and change. Refactor to split the two cases more clearly. Signed-off-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller net/netlink/genetlink.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit e2dbda0fd2aec4ff43f5772b1b251786d257f407 Merge: 4e0243e7128c 1af3cb3702d0 Author: David S. Miller Date: Mon Nov 7 12:20:03 2022 +0000 Merge branch 'am65-cpsw-suspend-resume' Roger Quadros says: ==================== net: ethernet: ti: am65-cpsw: Add suspend/resume support This series enables PM_SLEEP(suspend/resume) support to the am65-cpsw network driver. Dual-emac and Switch mode are tested to work with suspend/resume on AM62-SK platform. It can be verified on the following branch https://github.com/rogerq/linux/commits/for-v6.2/am62-cpsw-lpm-1.0 ==================== Signed-off-by: David S. Miller commit 1af3cb3702d02167926a2bd18580cecb2d64fd94 Author: Roger Quadros Date: Fri Nov 4 15:23:10 2022 +0200 net: ethernet: ti: am65-cpsw: Fix hardware switch mode on suspend/resume On low power during system suspend the ALE table context is lost. Save the ALE contect before suspend and restore it after resume. Signed-off-by: Roger Quadros Signed-off-by: David S. Miller drivers/net/ethernet/ti/am65-cpsw-nuss.c | 7 +++++++ drivers/net/ethernet/ti/am65-cpsw-nuss.h | 2 ++ 2 files changed, 9 insertions(+) commit 643cf0e3ab5ccee37b3c53c018bd476c45c4b70e Author: Roger Quadros Date: Fri Nov 4 15:23:09 2022 +0200 net: ethernet: ti: am65-cpsw: retain PORT_VLAN_REG after suspend/resume During suspend resume the context of PORT_VLAN_REG is lost so save it during suspend and restore it during resume for host port and slave ports. Signed-off-by: Roger Quadros Signed-off-by: David S. Miller drivers/net/ethernet/ti/am65-cpsw-nuss.c | 7 +++++++ drivers/net/ethernet/ti/am65-cpsw-nuss.h | 4 ++++ 2 files changed, 11 insertions(+) commit eadb434374075d3a09bcd983d340dad8d6a5138a Author: Roger Quadros Date: Fri Nov 4 15:23:08 2022 +0200 net: ethernet: ti: cpsw_ale: Add cpsw_ale_restore() helper This can be used by device driver to restore ALE context. The data produced by cpsw_ale_dump() can be passed to cpsw_ale_restore(). This is required as on certain platforms the ALE context is lost on low power suspend/resume. Signed-off-by: Roger Quadros Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw_ale.c | 10 ++++++++++ drivers/net/ethernet/ti/cpsw_ale.h | 1 + 2 files changed, 11 insertions(+) commit fd23df72f2be317d38d9fde0a8996b8e7454fd2a Author: Roger Quadros Date: Fri Nov 4 15:23:07 2022 +0200 net: ethernet: ti: am65-cpsw: Add suspend/resume support Add PM handlers for System suspend/resume. As DMA driver doesn't yet support suspend/resume we free up the DMA channels at suspend and acquire and initialize them at resume. Move the init/free dma calls to ndo_open/close() hooks so it is symmetric and easier to invoke from suspend/resume handler. As CPTS looses contect during suspend/resume, invoke the necessary CPTS suspend/resume helpers. Signed-off-by: Roger Quadros Signed-off-by: David S. Miller drivers/net/ethernet/ti/am65-cpsw-nuss.c | 221 +++++++++++++++++++++++-------- 1 file changed, 166 insertions(+), 55 deletions(-) commit cef122d4cf5b6463d16e71ed04330f32a526a6ab Author: Roger Quadros Date: Fri Nov 4 15:23:06 2022 +0200 net: ethernet: ti: am65-cpsw/cpts: Add suspend/resume helpers CPTS looses context on suspend (e.g. on AM62). Provide suspend/resume hooks in CPTS driver. These will be invoked by CPSW driver if CPTS was instantiated by CPSW. Signed-off-by: Roger Quadros Signed-off-by: David S. Miller drivers/net/ethernet/ti/am65-cpts.c | 76 +++++++++++++++++++++++++++++++++++++ drivers/net/ethernet/ti/am65-cpts.h | 10 +++++ 2 files changed, 86 insertions(+) commit 46af287cd5d7de316f1afd7966b27fc4369c6c35 Author: Johan Hovold Date: Fri Nov 4 10:39:13 2022 +0100 bus: mhi: host: pci_generic: add support for sc8280xp-crd SDX55 variant The SC8280XP Compute Reference Design (CRD) has an on-PCB SDX55 modem which uses MBIM. The exact channel configuration is not known but the Foxconn SDX55 configuration allows the modem to be used so reuse that one for now. Signed-off-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20221104093913.23347-1-johan+linaro@kernel.org [mani: modified the subject to format "bus: mhi: host"] Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/pci_generic.c | 2 ++ 1 file changed, 2 insertions(+) commit 4e0243e7128c9b25ea2739136076a95d6adaba5e Author: Frank Date: Fri Nov 4 16:44:41 2022 +0800 net: phy: fix yt8521 duplicated argument to & or | cocci warnings: (new ones prefixed by >>) >> drivers/net/phy/motorcomm.c:1122:8-35: duplicated argument to & or | drivers/net/phy/motorcomm.c:1126:8-35: duplicated argument to & or | drivers/net/phy/motorcomm.c:1130:8-34: duplicated argument to & or | drivers/net/phy/motorcomm.c:1134:8-34: duplicated argument to & or | The second YT8521_RC1R_GE_TX_DELAY_xx should be YT8521_RC1R_FE_TX_DELAY_xx. Fixes: 70479a40954c ("net: phy: Add driver for Motorcomm yt8521 gigabit ethernet phy") Reported-by: kernel test robot Reported-by: Julia Lawall Signed-off-by: Frank Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/motorcomm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 64c426dfbbd2710e4bcac42aaced21fe10f05fde Author: Yang Yingliang Date: Fri Nov 4 14:17:36 2022 +0800 gve: Fix error return code in gve_prefill_rx_pages() If alloc_page() fails in gve_prefill_rx_pages(), it should return an error code in the error path. Fixes: 82fd151d38d9 ("gve: Reduce alloc and copy costs in the GQ rx path") Cc: Jeroen de Borst Cc: Catherine Sullivan Cc: Shailend Chand Cc: "David S. Miller" Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve_rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6c8fae0caf5dd893987a66772b12aacdf88dd848 Author: Shenwei Wang Date: Thu Nov 3 21:47:54 2022 -0500 net: fec: simplify the code logic of quirks Simplify the code logic of handling the quirk of FEC_QUIRK_HAS_RACC. If a SoC has the RACC quirk, the driver will enable the 16bit shift by default in the probe function for a better performance. This patch handles the logic in one place to make the logic simple and clean. The patch optimizes the fec_enet_xdp_get_tx_queue function according to Paolo Abeni's comments, and it also exludes the SoCs that require to do frame swap from XDP support. Signed-off-by: Shenwei Wang Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 49 +++++++++++++++++++------------ 1 file changed, 30 insertions(+), 19 deletions(-) commit bb16db8393658e0978c3f0d30ae069e878264fa3 Author: Nathan Chancellor Date: Thu Nov 3 10:01:30 2022 -0700 s390/lcs: Fix return type of lcs_start_xmit() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/s390/net/lcs.c:2090:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = lcs_start_xmit, ^~~~~~~~~~~~~~ drivers/s390/net/lcs.c:2097:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = lcs_start_xmit, ^~~~~~~~~~~~~~ ->ndo_start_xmit() in 'struct net_device_ops' expects a return type of 'netdev_tx_t', not 'int'. Adjust the return type of lcs_start_xmit() to match the prototype's to resolve the warning and potential CFI failure, should s390 select ARCH_SUPPORTS_CFI_CLANG in the future. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Reviewed-by: Alexandra Winter Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller drivers/s390/net/lcs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 88d86d18d7cf7e9137c95f9d212bb9fff8a1b4be Author: Nathan Chancellor Date: Thu Nov 3 10:01:29 2022 -0700 s390/netiucv: Fix return type of netiucv_tx() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/s390/net/netiucv.c:1854:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = netiucv_tx, ^~~~~~~~~~ ->ndo_start_xmit() in 'struct net_device_ops' expects a return type of 'netdev_tx_t', not 'int'. Adjust the return type of netiucv_tx() to match the prototype's to resolve the warning and potential CFI failure, should s390 select ARCH_SUPPORTS_CFI_CLANG in the future. Additionally, while in the area, remove a comment block that is no longer relevant. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Reviewed-by: Alexandra Winter Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller drivers/s390/net/netiucv.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit aa5bf80c3c067b82b4362cd6e8e2194623bcaca6 Author: Nathan Chancellor Date: Thu Nov 3 10:01:28 2022 -0700 s390/ctcm: Fix return type of ctc{mp,}m_tx() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/s390/net/ctcm_main.c:1064:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = ctcm_tx, ^~~~~~~ drivers/s390/net/ctcm_main.c:1072:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = ctcmpc_tx, ^~~~~~~~~ ->ndo_start_xmit() in 'struct net_device_ops' expects a return type of 'netdev_tx_t', not 'int'. Adjust the return type of ctc{mp,}m_tx() to match the prototype's to resolve the warning and potential CFI failure, should s390 select ARCH_SUPPORTS_CFI_CLANG in the future. Additionally, while in the area, remove a comment block that is no longer relevant. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Reviewed-by: Alexandra Winter Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller drivers/s390/net/ctcm_main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 1313edfdcd79ac8f7aa92162db646eb0eb7a32c2 Author: Vibhore Vardhan Date: Tue Nov 1 13:09:35 2022 -0500 arm64: dts: ti: k3-am625-sk: Add 1.4GHz OPP The 1.4 GHz OPP requires supported silicon variant (T speed grade) and also VDD_CORE to be at 0.85V. All production revisions of the AM625-SK have both so we can enable the 1.4 GHz OPP for it. Any other boards based on this design should verify that they have the right silicon variant and the right power tree before adding 1.4 GHz support in their board dts file. Signed-off-by: Vibhore Vardhan Signed-off-by: Viresh Kumar arch/arm64/boot/dts/ti/k3-am625-sk.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit ddb72884c8bf88c25edb2a722fabbb7d642922d7 Author: Dave Gerlach Date: Tue Nov 1 13:09:34 2022 -0500 cpufreq: ti: Enable ti-cpufreq for ARCH_K3 Make ti-cpufreq driver depend on ARCH_K3 and set it to `default y` so it is always enabled for platforms that it depends on. Signed-off-by: Dave Gerlach Signed-off-by: Vibhore Vardhan Signed-off-by: Viresh Kumar drivers/cpufreq/Kconfig.arm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6d4ee83b423fe663a8574d2f16b48b98cbfc9b26 Author: Dave Gerlach Date: Tue Nov 1 13:09:33 2022 -0500 arm64: dts: ti: k3-am625: Introduce operating-points table Introduce an operating-points table for the A53 cores, containing only frequency values as this platform operates on a fixed voltage for the CPUs. Also provide opp-supported-hw values to ensure appropriate OPPs are enabled based on which type of silicon is in use. The latency between pre and post frequency transition was measured in CPUFreq driver for all combinations of OPP changes. The average value was selected as overall clock-latency-ns. Signed-off-by: Dave Gerlach Signed-off-by: Vibhore Vardhan Signed-off-by: Viresh Kumar arch/arm64/boot/dts/ti/k3-am625.dtsi | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit e66e20d71d79e66b2bd03b51964a5a7eddc5e55c Author: Dave Gerlach Date: Tue Nov 1 13:09:32 2022 -0500 cpufreq: dt-platdev: Blacklist ti,am625 SoC Add ti,am625 SoC to the blacklist as the ti-cpufreq driver will handle creating the cpufreq-dt platform device after it completes so it is not created twice. Signed-off-by: Dave Gerlach Signed-off-by: Vibhore Vardhan Signed-off-by: Viresh Kumar drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+) commit aac0293a8f1cdf3ae4b2e97a66abc4f754d1c1d2 Author: Dave Gerlach Date: Tue Nov 1 13:09:31 2022 -0500 cpufreq: ti-cpufreq: Add support for AM625 Add support for TI K3 AM625 SoC to read speed and revision values from hardware and pass to OPP layer. Signed-off-by: Dave Gerlach Signed-off-by: Vibhore Vardhan Signed-off-by: Viresh Kumar drivers/cpufreq/ti-cpufreq.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 5545b7b9f294de7f95ec6a7cb1de0db52296001c Author: Haijun Liu Date: Thu Nov 3 14:48:29 2022 +0530 net: wwan: t7xx: Add NAPI support Replace the work queue based RX flow with a NAPI implementation Remove rx_thread and dpmaif_rxq_work. Enable GRO on RX path. Introduce dummy network device. its responsibility is - Binds one NAPI object for each DL HW queue and acts as the agent of all those network devices. - Use NAPI object to poll DL packets. - Helps to dispatch each packet to the network interface. Signed-off-by: Haijun Liu Co-developed-by: Sreehari Kancharla Signed-off-by: Sreehari Kancharla Signed-off-by: Chandrashekar Devegowda Acked-by: Ricardo Martinez Acked-by: M Chetan Kumar Reviewed-by: Ilpo Järvinen Signed-off-by: David S. Miller drivers/net/wwan/t7xx/t7xx_hif_dpmaif.h | 14 +- drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c | 218 +++++++++-------------------- drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.h | 1 + drivers/net/wwan/t7xx/t7xx_netdev.c | 89 +++++++++++- drivers/net/wwan/t7xx/t7xx_netdev.h | 5 + 5 files changed, 161 insertions(+), 166 deletions(-) commit c053d7b6bdcb45780036b32be6a950f71a78bf52 Author: Ilpo Järvinen Date: Thu Nov 3 14:48:28 2022 +0530 net: wwan: t7xx: Use needed_headroom instead of hard_header_len hard_header_len is used by gro_list_prepare() but on Rx, there is no header so use needed_headroom instead. Signed-off-by: Ilpo Järvinen Signed-off-by: Sreehari Kancharla Reviewed-by: Sergey Ryazanov Signed-off-by: David S. Miller drivers/net/wwan/t7xx/t7xx_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42da66ac7bcb19181385e851094ceedfe7c81984 Author: Michael Weiß Date: Mon Oct 24 21:15:52 2022 +0200 squashfs: enable idmapped mounts For squashfs all needed functionality for idmapped mounts is already implemented by the generic handlers in the VFS. Thus, it is sufficient to just enable the corresponding FS_ALLOW_IDMAP flag to support idmapped mounts. We use this for unprivileged (user namespaced) containers based on squashfs images as rootfs in GyroidOS. A simple test using the mount-idmapped tool executed as user with uid=1000 looks as follows: $ mkdir test $ echo "test" > test/test_file $ mksquashfs test/ fs.img $ sudo mkdir /mnt/test $ sudo mkdir /mnt/mapped $ sudo mount fs.img -o loop /mnt/test/ $ sudo ./mount-idmapped --map-mount b:1000:2000:1 /mnt/test/ /mnt/mapped/ $ mount | tail -n2 fs.img on /mnt/test type squashfs (ro,relatime,errors=continue) fs.img on /mnt/mapped type squashfs (ro,relatime,idmapped,errors=continue) $ ls -lan /mnt/test/ total 5 drwxr-xr-x 2 1000 1000 32 Okt 24 13:36 . drwxr-xr-x 6 0 0 4096 Okt 24 13:38 .. -rw-r--r-- 1 1000 1000 5 Okt 24 13:36 test_file $ ls -lan /mnt/mapped/ total 5 drwxr-xr-x 2 2000 2000 32 Okt 24 13:36 . drwxr-xr-x 6 0 0 4096 Okt 24 13:38 .. -rw-r--r-- 1 2000 2000 5 Okt 24 13:36 test_file Signed-off-by: Michael Weiß Reviewed-by: Christian Brauner Reviewed-by: Phillip Lougher Signed-off-by: Christian Brauner (Microsoft) fs/squashfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2acf960e3be6177f437baade6d1883ebe4c641b2 Author: Cai Huoqing Date: Thu Nov 3 16:05:11 2022 +0800 net: hinic: Add support for configuration of rx-vlan-filter by ethtool When ethtool config rx-vlan-filter, the driver will send control command to firmware, then set to hardware in this patch. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_main.c | 10 ++++++++ drivers/net/ethernet/huawei/hinic/hinic_port.c | 33 ++++++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_port.h | 12 ++++++++++ 3 files changed, 55 insertions(+) commit 13265568a8633ab0d22e9def8cd9b8b0edb3ca85 Author: Cai Huoqing Date: Thu Nov 3 16:05:10 2022 +0800 net: hinic: Add control command support for VF PMD driver in DPDK HINIC has a mailbox for PF-VF communication and the VF driver could send port control command to PF driver via mailbox. The control command only can be set to register in PF, so add support in PF driver for VF PMD driver control command when VF PMD driver work with linux PF driver. Then, no need to add handlers to nic_vf_cmd_msg_handler[], because the host driver just forwards it to the firmware. Actually the firmware works on a coprocessor MGMT_CPU(inside the NIC) which will recv and deal with these commands. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 66 ++++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_sriov.c | 18 +++++++ 2 files changed, 84 insertions(+) commit ac33d7ae8f7117df63267207f889cd535402381b Author: Cai Huoqing Date: Thu Nov 3 16:05:09 2022 +0800 net: hinic: Convert the cmd code from decimal to hex to be more readable The print cmd code is in hex, so using hex cmd code intead of decimal is easy to check the value with print info. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 104 +++++++++++------------ 1 file changed, 52 insertions(+), 52 deletions(-) commit a352a2c5d2a504f17c7096c9085177a54917012d Author: Krzysztof Kozlowski Date: Wed Nov 2 12:15:12 2022 -0400 dt-bindings: net: dsa-port: constrain number of 'reg' in ports 'reg' without any constraints allows multiple items which is not the intention in DSA port schema (as physical port is expected to have only one address). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/dsa-port.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bd881b44fdbcce1fb899601e026a4cebfe38b2df Author: Krzysztof Kozlowski Date: Wed Nov 2 12:15:11 2022 -0400 dt-bindings: net: constrain number of 'reg' in ethernet ports 'reg' without any constraints allows multiple items which is not the intention for Ethernet controller's port number. Constrain the 'reg' on AX88178 and LAN95xx USB Ethernet Controllers. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Oleksij Rempel Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/asix,ax88178.yaml | 4 +++- Documentation/devicetree/bindings/net/microchip,lan95xx.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit a3de357b087e50e2b2465346f5f67ac7aa4f6b93 Author: Andy Chiu Date: Tue Nov 1 09:11:39 2022 +0800 net: axiemac: add PM callbacks to support suspend/resume Support basic system-wide suspend and resume functions Signed-off-by: Andy Chiu Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit c8a51f03503633ec4a3f390aaadc3e8959fa44de Author: Andy Shevchenko Date: Thu Nov 3 22:28:17 2022 +0200 gpio: Add Generic regmap GPIO conversion to the TODO list It's actually preferable to use Generic regmap GPIO over other simple approaches. Add a TODO item for that. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/TODO | 7 +++++++ 1 file changed, 7 insertions(+) commit d08cb25556773c65efb21761b75f92c804ad0975 Author: David Yang Date: Fri Oct 28 10:01:01 2022 +0800 net: mv643xx_eth: support MII/GMII/RGMII modes for Kirkwood Support mode switch properly, which is not available before. If SoC has two Ethernet controllers, by setting both of them into MII mode, the first controller enters GMII mode, while the second controller is effectively disabled. This requires configuring (and maybe enabling) the second controller in the device tree, even though it cannot be used. Signed-off-by: David Yang Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mv643xx_eth.c | 49 +++++++++++++++++++++++++----- include/linux/mv643xx_eth.h | 2 ++ 2 files changed, 44 insertions(+), 7 deletions(-) commit d59b6f215aa8bf52f36f72235752177fb79cf5b3 Author: Jiapeng Chong Date: Mon Nov 7 14:35:54 2022 +0800 ALSA: cs5535audio: Remove the redundant assignment Variable 'desc_addr' set but not used. sound/pci/cs5535audio/cs5535audio_pcm.c:113:12: warning: variable 'desc_addr' set but not used. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2739 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20221107063554.17933-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Takashi Iwai sound/pci/cs5535audio/cs5535audio_pcm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0ca9c2e2844aa285c3656a29d4803839cfa8bca9 Author: Cheng Xu Date: Mon Nov 7 10:18:45 2022 +0800 RDMA/erdma: Implement atomic operations support Add atomic operations support in post_send and poll_cq implementation. Also, rename 'laddr' and 'lkey' in struct erdma_sge to 'addr' and 'key', because this structure is used for both local and remote SGEs. Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20221107021845.44598-4-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/erdma/erdma_cq.c | 2 ++ drivers/infiniband/hw/erdma/erdma_hw.h | 18 ++++++++++++--- drivers/infiniband/hw/erdma/erdma_qp.c | 40 +++++++++++++++++++++++++++++----- 3 files changed, 52 insertions(+), 8 deletions(-) commit 71c6925f280ae8cb52eafee2404ae75c176c28ba Author: Cheng Xu Date: Mon Nov 7 10:18:44 2022 +0800 RDMA/erdma: Report atomic capacity when hardware supports atomic feature Introduce "capacity flags" field at where hardware put all zeros originally in "query device" response. Using this field, hardware can report atomic feature if supports. Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20221107021845.44598-3-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/erdma/erdma.h | 1 + drivers/infiniband/hw/erdma/erdma_hw.h | 5 +++++ drivers/infiniband/hw/erdma/erdma_main.c | 1 + drivers/infiniband/hw/erdma/erdma_verbs.c | 4 ++++ 4 files changed, 11 insertions(+) commit ece43fad220ba03c529cc0f6f302d796044e8476 Author: Cheng Xu Date: Mon Nov 7 10:18:43 2022 +0800 RDMA/erdma: Extend access right field of FRMR and REG MR to support atomic To support atomic operations, IB_ACCESS_REMOTE_ATOMIC right should be passed to hardware for permission check. Since "access mode" field in FRMR SQE and RegMr command is never used by hw, we remove the "access mode" field, so that we can then have enough space to extend access fields. Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20221107021845.44598-2-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/erdma/erdma_hw.h | 6 ++---- drivers/infiniband/hw/erdma/erdma_qp.c | 3 +-- drivers/infiniband/hw/erdma/erdma_verbs.c | 3 +-- drivers/infiniband/hw/erdma/erdma_verbs.h | 12 +++++++----- 4 files changed, 11 insertions(+), 13 deletions(-) commit 4eace75e0853273755b878ffa9cce6de84df975a Author: Shiraz Saleem Date: Fri Nov 4 18:49:57 2022 -0500 RDMA/irdma: Report the correct link speed The active link speed is currently hard-coded in irdma_query_port due to which the port rate in ibstatus does reflect the active link speed. Call ib_get_eth_speed in irdma_query_port to get the active link speed. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Reported-by: Kamal Heib Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20221104234957.1135-1-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/irdma/verbs.c | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) commit cb140497fe4718f7393451b2f9309866722852a0 Author: Rob Herring Date: Fri Nov 4 11:24:29 2022 -0500 dt-bindings: cpufreq: qcom: Add missing cache related properties The examples' cache nodes are incomplete as 'cache-unified' and 'cache-level' are required cache properties. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Viresh Kumar .../devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 846d479224537185768276dd4a84c1bda2bbcd4e Author: Sean Anderson Date: Tue Oct 18 13:58:41 2022 -0400 doc: phy: Document typical order of API calls Document the typical order of API calls to used by new drivers and controllers. Many existing controllers follow this order, but some do not. This is especially true for controllers designed to work with one particular PHY driver, which may not need a call to (for example) phy_init. Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20221018175841.1906611-1-sean.anderson@seco.com Signed-off-by: Vinod Koul Documentation/driver-api/phy/phy.rst | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 2428787f16155aa03aa63d5c130e83809a7df5cf Author: Wayne Chang Date: Wed Oct 5 16:40:31 2022 +0800 phy: tegra: xusb: Remove usb3 supply Remove redundant codes for getting the vbus supply of usb3 ports because we get and control the vbus supply by the companion usb2 ports Signed-off-by: Wayne Chang Signed-off-by: Haotien Hsu Reviewed-by: Jon Hunter Link: https://lore.kernel.org/r/20221005084031.2154251-1-haotienh@nvidia.com Signed-off-by: Vinod Koul drivers/phy/tegra/xusb-tegra124.c | 1 - drivers/phy/tegra/xusb-tegra186.c | 1 - drivers/phy/tegra/xusb-tegra210.c | 1 - drivers/phy/tegra/xusb.c | 10 +--------- drivers/phy/tegra/xusb.h | 2 -- 5 files changed, 1 insertion(+), 14 deletions(-) commit 53bffe0055741440a6c91abb80bad1c62ea443e3 Author: Florian Fainelli Date: Wed Oct 26 15:44:49 2022 -0700 phy: phy-brcm-usb: Utilize platform_get_irq_byname_optional() The wake-up interrupt lines are entirely optional, avoid printing messages that interrupts were not found by switching to the _optional variant. Signed-off-by: Florian Fainelli Acked-by: Justin Chen Link: https://lore.kernel.org/r/20221026224450.2958762-1-f.fainelli@gmail.com Signed-off-by: Vinod Koul drivers/phy/broadcom/phy-brcm-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5bd78c00d753d4e80e151555565334c475a559d3 Author: Siddharth Vadapalli Date: Wed Oct 26 13:15:32 2022 +0530 phy: ti: gmii-sel: Add support for CPSW9G GMII SEL in J721e Each of the CPSW9G ports in J721e support additional modes like QSGMII. Add a new compatible for J721e to support the additional modes. In TI's J721e, each of the CPSW9G ethernet interfaces can act as a QSGMII main or QSGMII-SUB port. The QSGMII main interface is responsible for performing auto-negotiation between the MAC and the PHY while the rest of the interfaces are designated as QSGMII-SUB interfaces, indicating that they will not be taking part in the auto-negotiation process. Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20221026074532.109220-4-s-vadapalli@ti.com Signed-off-by: Vinod Koul drivers/phy/ti/phy-gmii-sel.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3b66ab69c566e79d58cc38bd7c90a6b2b0b84a7d Author: Siddharth Vadapalli Date: Wed Oct 26 13:15:31 2022 +0530 phy: ti: gmii-sel: Update methods for fetching and using qsgmii main port The number of QSGMII main ports are specific to the device. TI's J7200 for which the QSGMII main port property is fetched from the device-tree has only one QSGMII main port. However, devices like TI's J721e support up to two QSGMII main ports. Thus, the existing methods for fetching and using the QSGMII main port are not scalable. Update the existing methods for handling the QSGMII main ports and its associated requirements to make it scalable for future devices. Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20221026074532.109220-3-s-vadapalli@ti.com Signed-off-by: Vinod Koul drivers/phy/ti/phy-gmii-sel.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit 8ca2a81bff096b359736bba9b7d06cf5bc04fa88 Author: Siddharth Vadapalli Date: Wed Oct 26 13:15:30 2022 +0530 dt-bindings: phy: ti: phy-gmii-sel: Add bindings for J721e TI's J721e SoC supports additional PHY modes like QSGMII and SGMII that are not supported on earlier SoCs. Add a compatible for it. Extend ti,qsgmii-main-ports property to support selection of upto two main ports at once across the two QSGMII interfaces. Signed-off-by: Siddharth Vadapalli Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221026074532.109220-2-s-vadapalli@ti.com Signed-off-by: Vinod Koul .../devicetree/bindings/phy/ti,phy-gmii-sel.yaml | 48 +++++++++++++++++++--- 1 file changed, 42 insertions(+), 6 deletions(-) commit 0f607406525d25019dd9c498bcc0b42734fc59d5 Author: Andre Przywara Date: Mon Oct 31 11:13:55 2022 +0000 phy: sun4i-usb: Add support for the H616 USB PHY The USB PHY used in the Allwinner H616 SoC inherits some traits from its various predecessors: it has four full PHYs like the H3, needs some extra bits to be set like the H6, and puts SIDDQ on a different bit like the A100. Plus it needs this weird PHY2 quirk. Name all those properties in a new config struct and assign a new compatible name to it. Signed-off-by: Andre Przywara Reviewed-by: Samuel Holland Link: https://lore.kernel.org/r/20221031111358.3387297-5-andre.przywara@arm.com Signed-off-by: Vinod Koul drivers/phy/allwinner/phy-sun4i-usb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b45c6d80325bec2b78c716629a518b6442d8bdc6 Author: Andre Przywara Date: Mon Oct 31 11:13:54 2022 +0000 phy: sun4i-usb: Introduce port2 SIDDQ quirk At least the Allwinner H616 SoC requires a weird quirk to make most USB PHYs work: Only port2 works out of the box, but all other ports need some help from this port2 to work correctly: The CLK_BUS_PHY2 and RST_USB_PHY2 clock and reset need to be enabled, and the SIDDQ bit in the PMU PHY control register needs to be cleared. For this register to be accessible, CLK_BUS_ECHI2 needs to be ungated. Don't ask .... Instead of disguising this as some generic feature, treat it more like a quirk (what it really is): If the quirk bit is set, and we initialise a PHY other than PHY2, ungate this one special clock, and clear the SIDDQ bit. We also pick the clock and reset from PHY2 and enable them as well. Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20221031111358.3387297-4-andre.przywara@arm.com Signed-off-by: Vinod Koul drivers/phy/allwinner/phy-sun4i-usb.c | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 6964affe65066651eca21e97247d3b7cac5153dc Author: Andre Przywara Date: Mon Oct 31 11:13:53 2022 +0000 dt-bindings: phy: Add special clock for Allwinner H616 PHY The USB PHY IP in the Allwinner H616 SoC requires a quirk that involves some resources from port 2's PHY and HCI IP. In particular the PMU clock for port 2 must be surely ungated before accessing the REG_HCI_PHY_CTL register of port 2. To allow each USB port to be controlled independently of port 2, we need a handle to that particular PMU clock in the *PHY* node, as the HCI and PHY part might be handled by separate drivers. Add that clock to the requirements of the H616 PHY binding, so that a PHY driver can apply the quirk in isolation, without requiring help from port 2's HCI driver. Signed-off-by: Andre Przywara Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221031111358.3387297-3-andre.przywara@arm.com Signed-off-by: Vinod Koul .../bindings/phy/allwinner,sun8i-h3-usb-phy.yaml | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 8484199c09347bdd5d81ee8a2bc530850f900797 Author: Justin Chen Date: Wed Oct 5 14:30:18 2022 -0700 phy: usb: Fix clock imbalance for suspend/resume We should be disabling clocks when wake from USB is not needed. Since this wasn't done, we had a clock imbalance since clocks were always being enabled on resume. Fixes: ae532b2b7aa5 ("phy: usb: Add "wake on" functionality for newer Synopsis XHCI controllers") Fixes: b0c0b66c0b43 ("phy: usb: Add support for wake and USB low power mode for 7211 S2/S5") Signed-off-by: Justin Chen Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/1665005418-15807-7-git-send-email-justinpopo6@gmail.com Signed-off-by: Vinod Koul drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c | 2 -- drivers/phy/broadcom/phy-brcm-usb-init.h | 1 - drivers/phy/broadcom/phy-brcm-usb.c | 8 +++++--- 3 files changed, 5 insertions(+), 6 deletions(-) commit 700c44b508020a3ea29d297c677f8d4ab14b7e6a Author: Justin Chen Date: Wed Oct 5 14:30:17 2022 -0700 phy: usb: Use slow clock for wake enabled suspend The logic was incorrect when switching to slow clock. We want the slow clock if wake_enabled is set. Fixes: ae532b2b7aa5 ("phy: usb: Add "wake on" functionality for newer Synopsis XHCI controllers") Signed-off-by: Justin Chen Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/1665005418-15807-6-git-send-email-justinpopo6@gmail.com Signed-off-by: Vinod Koul drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 833c173ebab420997b98a0d888fc5b55ee4a8a7e Author: Justin Chen Date: Wed Oct 5 14:30:16 2022 -0700 phy: usb: Disable phy auto-suspend The BDC block requires the PLL lock in order to grab the PLL clock. The phy auto-suspend feature turns off the phy when nothing is attached leading to the PLL to not lock. This leads the BDC block to grab the AUX clock instead of the PLL clock. This is not ideal, so lets turn this feature off. Signed-off-by: Justin Chen Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/1665005418-15807-5-git-send-email-justinpopo6@gmail.com Signed-off-by: Vinod Koul drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7e81153d0f16dd7e6f571bd168bc3d8b46f9f5b7 Author: Justin Chen Date: Wed Oct 5 14:30:15 2022 -0700 phy: usb: Migrate to BIT and BITMASK macros Using BIT and BITMASK macros makes it much easier to read and make modifications. Also reordered some constants to be in numerical order. Signed-off-by: Justin Chen Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/1665005418-15807-4-git-send-email-justinpopo6@gmail.com Signed-off-by: Vinod Koul drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c | 68 +++++++++---------- drivers/phy/broadcom/phy-brcm-usb-init.c | 80 +++++++++++------------ 2 files changed, 74 insertions(+), 74 deletions(-) commit f7fc5b7090372fc4dd7798c874635ca41b8ba733 Author: Al Cooper Date: Wed Oct 5 14:30:14 2022 -0700 phy: usb: s2 WoL wakeup_count not incremented for USB->Eth devices The PHY's "wakeup_count" is not incrementing when waking from WoL. The wakeup count can be found in sysfs at: /sys/bus/platform/devices/rdb/*.usb-phy/power/wakeup_count. The problem is that the system wakup event handler was being passed the wrong "device" by the PHY driver. Fixes: f1c0db40a3ad ("phy: usb: Add "wake on" functionality") Signed-off-by: Al Cooper Signed-off-by: Justin Chen Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/1665005418-15807-3-git-send-email-justinpopo6@gmail.com Signed-off-by: Vinod Koul drivers/phy/broadcom/phy-brcm-usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 95fade4016cbd57ee050ab226c8f0483af1753c4 Author: Johan Hovold Date: Wed Oct 26 17:25:11 2022 +0200 arm64: dts: qcom: sm6350: drop bogus DP PHY clock The QMP pipe clock is used by the USB part of the PHY so drop the corresponding properties from the DP child node. Fixes: 23737b9557fe ("arm64: dts: qcom: sm6350: Add USB1 nodes") Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026152511.9661-3-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm6350.dtsi | 3 --- 1 file changed, 3 deletions(-) commit bb9f23e46ddcebe1bc68a43a0f7acfc1865a6472 Author: Johan Hovold Date: Wed Oct 26 17:25:10 2022 +0200 arm64: dts: qcom: sm8250: drop bogus DP PHY clock The QMP pipe clock is used by the USB part of the PHY so drop the corresponding properties from the DP child node. Fixes: 5aa0d1becd5b ("arm64: dts: qcom: sm8250: switch usb1 qmp phy to USB3+DP mode") Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026152511.9661-2-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 3 --- 1 file changed, 3 deletions(-) commit 31863c523ac5bd2b0fe0857c6405a7431c59d653 Author: Manivannan Sadhasivam Date: Thu Nov 3 15:28:10 2022 +0530 arm64: dts: qcom: sc8280xp-x13s: Add thermal zone support Add thermal zone support by making use of the thermistor SYS_THERM6. Based on experiments, this thermistor seems to reflect the actual surface temperature of the laptop. For the cooling device, all BIG CPU cores are throttled down to keep the temperature at a sane level. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-13-manivannan.sadhasivam@linaro.org .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 7c0151347401a55f98afa640f741f70e411ce685 Author: Manivannan Sadhasivam Date: Thu Nov 3 15:28:09 2022 +0530 arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels Add ADC_TM5 channels of PM8280_{1/2} for monitoring the temperature from external thermistors connected to AMUX pins. The temperature measurements are collected from the PMK8280's VADC channels that expose the measurements from secondary PMICs PM8280_{1/2}. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-12-manivannan.sadhasivam@linaro.org .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 9d41cd17394aca9ce3e00ab52edfa35f1848d2b3 Author: Manivannan Sadhasivam Date: Thu Nov 3 15:28:08 2022 +0530 arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel Add VADC channel of PMR735A for measuring the on-chip die temperature. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-11-manivannan.sadhasivam@linaro.org arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 3375151a71855d44edf4ff78aedac6d5272525ff Author: Manivannan Sadhasivam Date: Thu Nov 3 15:28:07 2022 +0530 arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels Add VADC channels of PM8280_{1/2} PMICs for measuring the on-chip die temperature and external thermistors connected to the AMUX pins. The measurements are collected by the primary PMIC PMK8280 from the secondary PMICs PM8280_{1/2} and exposed over the PMK8280's VADC channels. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-10-manivannan.sadhasivam@linaro.org .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 9a6b3042c5337141a2ad202c6e6a28e4e0440c29 Author: Manivannan Sadhasivam Date: Thu Nov 3 15:28:06 2022 +0530 arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels Add VADC channels for measuring the on-chip die temperature and external crystal osciallator temperature of PMK8280. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-9-manivannan.sadhasivam@linaro.org .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7858c676c8b243941d1539c6e2619c1713292025 Author: Manivannan Sadhasivam Date: Thu Nov 3 15:28:05 2022 +0530 arm64: dts: qcom: sc8280xp-x13s: Enable PMK8280 RESIN input Enable resetting the PMK8280 through RESIN block in SC8280XP X13s. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-8-manivannan.sadhasivam@linaro.org arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 5cd549c7e7cd55453e0c0d4f2c1f51d071061451 Author: Manivannan Sadhasivam Date: Thu Nov 3 15:28:04 2022 +0530 arm64: dts: qcom: sc8280xp-pmics: Add support for TM5 block in PMK8280 Thermal Monitoring block ADC5 (TM5) in PMK8280 can be used to monitor the temperature from secondary PMICs like PM8280. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-7-manivannan.sadhasivam@linaro.org arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e0f681f7294a9899dbae897f31720efc30807582 Author: Manivannan Sadhasivam Date: Thu Nov 3 15:28:03 2022 +0530 arm64: dts: qcom: sc8280xp-pmics: Add PMK8280 ADC7 block Add support for ADC7 block available in PMK8280 for reading the temperature via the AMUX pins. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-6-manivannan.sadhasivam@linaro.org arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 34bd6d227ffc99d8ce1ced20bbfceacb14651869 Author: Manivannan Sadhasivam Date: Thu Nov 3 15:28:02 2022 +0530 arm64: dts: qcom: sc8280xp-pmics: Add support for PMK8280 RESIN input The RESIN input can be used to reset the PMK8280 PMIC. Enabling the RESIN block allows the PMK8280 to detect reset input via RESIN_N pin. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-5-manivannan.sadhasivam@linaro.org arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 448a7821daa1bb12ec0978694cd0e77be3d9663b Author: Manivannan Sadhasivam Date: Thu Nov 3 15:28:01 2022 +0530 arm64: dts: qcom: sc8280xp-pmics: Add thermal zones for PM8280_{1/2} PMICs Add thermal zones for the PM8280_{1/2} PMICs by using the temperature alarm blocks as the thermal sensors. Temperature trip points are inherited from PM8350 PMIC. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-4-manivannan.sadhasivam@linaro.org arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 6c82f40ec94ed99eb5200fc0d3afe79648078d93 Author: Manivannan Sadhasivam Date: Thu Nov 3 15:28:00 2022 +0530 arm64: dts: qcom: sc8280xp-pmics: Add temp alarm for PM8280_{1/2} PMICs Add support for temperature alarm feature in the PM8280_{1/2} PMICs. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-3-manivannan.sadhasivam@linaro.org arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 22f1d06f4f283e36622036726093032a07d67c0d Author: Manivannan Sadhasivam Date: Thu Nov 3 15:27:59 2022 +0530 dt-bindings: iio: qcom: adc7-pm8350: Allow specifying SID for channels As per the new ADC7 architecture used by the Qualcomm PMICs, each PMIC has the static Slave ID (SID) assigned by default. The primary PMIC PMK8350 is responsible for collecting the temperature/voltage data from the slave PMICs and exposing them via it's registers. For getting the measurements from the slave PMICs, PMK8350 uses the channel ID encoded with the SID of the relevant PMIC. So far, the dt-binding for the slave PMIC PM8350 assumed that there will be only one PM8350 in a system. So it harcoded SID 1 with channel IDs. But this got changed in platforms such as Lenovo X13s where there are a couple of PM8350 PMICs available. So to address multiple PM8350s, change the binding to accept the SID specified by the user and use it for encoding the channel ID. It should be noted that, even though the SID is static it is not globally unique. Only the primary PMIC has the unique SID id 0. Reviewed-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103095810.64606-2-manivannan.sadhasivam@linaro.org .../bindings/thermal/qcom-spmi-adc-tm5.yaml | 6 +- include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h | 90 +++++++++++----------- 2 files changed, 46 insertions(+), 50 deletions(-) commit 965a6d823a0476f9500216f1855bb8fcc6b73551 Author: Dmitry Baryshkov Date: Fri Nov 4 16:23:16 2022 +0300 dt-bindings: qcom: add another exception to the device naming rule The 'qcom,dsi-ctrl-6g-qcm2290' compatibility string was added in the commit ee1f09678f14 ("drm/msm/dsi: Add support for qcm2290 dsi controller") in February 2022, but was not properly documented in the bindings. Adding this compatibility string to display/msm/dsi-controller-main.yaml caused a warning from qcom-soc.yaml. Fix the warning by adding an exception to the mentioned file. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104132316.1028137-1-dmitry.baryshkov@linaro.org Documentation/devicetree/bindings/arm/qcom-soc.yaml | 1 + 1 file changed, 1 insertion(+) commit 1c8cc183d07059d23d28c29a8e345464c4055127 Author: Vincent Knecht Date: Fri Nov 4 14:24:00 2022 +0100 arm64: dts: qcom: msm8916-alcatel-idol347: add LED indicator Add si-en,sn3190 LED controller to enable white LED indicator. This requires adding the additional "enable" gpio that the OEM choose to use, despite it not being mentioned in si-en,sn3190 datasheet nor supported by the driver. Signed-off-by: Vincent Knecht Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104132400.1763218-4-vincent.knecht@mailoo.org .../boot/dts/qcom/msm8916-alcatel-idol347.dts | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 64323952aa5a14471a1225f2c1121aa5447c6ded Author: Vincent Knecht Date: Fri Nov 4 14:23:59 2022 +0100 arm64: dts: qcom: msm8916-alcatel-idol347: add GPIO torch LED Add support for torch LED on GPIO 32. Signed-off-by: Vincent Knecht Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104132400.1763218-3-vincent.knecht@mailoo.org .../boot/dts/qcom/msm8916-alcatel-idol347.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit b8f298d4f69d82119ac0d22809a17c80b1f188d1 Author: Dmitry Torokhov Date: Thu Oct 27 00:46:51 2022 -0700 arm64: dts: qcom: sc7280: fix codec reset line polarity for CRD 1.0/2.0 The driver for the codec, when resetting the chip, first drives the line low, and then high. This means that the line is active low. Change the annotation in the DTS accordingly. Fixes: f8b4eb64f200 ("arm64: dts: qcom: sc7280: Add wcd9385 codec node for CRD 1.0/2.0 and IDP boards") Signed-off-by: Dmitry Torokhov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221027074652.1044235-5-dmitry.torokhov@gmail.com arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1caf66104c02d327a2467a69ab18fb24b44e9715 Author: Dmitry Torokhov Date: Thu Oct 27 00:46:50 2022 -0700 arm64: dts: qcom: sc7280: fix codec reset line polarity for CRD 3.0/3.1 The driver for the codec, when resetting the chip, first drives the line low, and then high. This means that the line is active low. Change the annotation in the DTS accordingly. Fixes: 0a3a56a93fd9 ("arm64: dts: qcom: sc7280: Add wcd9385 codec node for CRD 3.0/3.1") Signed-off-by: Dmitry Torokhov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221027074652.1044235-4-dmitry.torokhov@gmail.com arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15d9fcbb3e6e8420c7d1ae331405780c5d9c1c25 Author: Dmitry Torokhov Date: Thu Oct 27 00:46:49 2022 -0700 arm64: dts: qcom: sm8250-mtp: fix reset line polarity The driver for the codec, when resetting the chip, first drives the line low, and then high. This means that the line is active low. Change the annotation in the DTS accordingly. Fixes: 36c9d012f193 ("arm64: dts: qcom: use GPIO flags for tlmm") Fixes: 5a263cf629a8 ("arm64: dts: qcom: sm8250-mtp: Add wcd9380 audio codec node") Signed-off-by: Dmitry Torokhov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221027074652.1044235-3-dmitry.torokhov@gmail.com arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76d21ffc5d425bf7ea9888652c49d7dbda15f356 Author: Dmitry Torokhov Date: Thu Oct 27 00:46:47 2022 -0700 arm64: dts: qcom: msm8996: fix sound card reset line polarity When resetting the block, the reset line is being driven low and then high, which means that the line in DTS should be annotated as "active low". It will become important when wcd9335 driver will be converted to gpiod API that respects declared line polarities. Fixes: f3eb39a55a1f ("arm64: dts: db820c: Add sound card support") Signed-off-by: Dmitry Torokhov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221027074652.1044235-1-dmitry.torokhov@gmail.com arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a5923fe4e1df52fafa4026363a349f30c061a15 Author: Krzysztof Kozlowski Date: Wed Oct 26 16:03:57 2022 -0400 arm64: dts: qcom: sm8450-qrd: add SDHCI for microSD Based on downstream DTS, it seems that SM8450 QRD has microSD card slot. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026200357.391635-5-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 1f52331285ed9f412f85e321ae6574714725d634 Author: Krzysztof Kozlowski Date: Wed Oct 26 16:03:56 2022 -0400 arm64: dts: qcom: sm8450-hdk: add SDHCI for microSD The HDK8450 has microSD card slot. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026200357.391635-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 9d561dc4e5cc31e757f91eb7bb709d2e2a8c9ce0 Author: Krzysztof Kozlowski Date: Wed Oct 26 16:03:55 2022 -0400 arm64: dts: qcom: sm8450: disable SDHCI SDR104/SDR50 on all boards SDHCI on SM8450 HDK also has problems with SDR104/SDR50: mmc0: card never left busy state mmc0: error -110 whilst initialising SD card so I think it is safe to assume this issue affects all SM8450 boards. Move the quirk disallowing these modes to the SoC DTSI, to spare people working on other boards the misery of debugging this issue. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026200357.391635-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts | 2 -- arch/arm64/boot/dts/qcom/sm8450.dtsi | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) commit a0646262ec94faaf95b3dba8f17774d9762ee9ac Author: Krzysztof Kozlowski Date: Wed Oct 26 16:03:54 2022 -0400 arm64: dts: qcom: sm8450: move SDHCI pin configuration to DTSI The SDHCI pin configuration/mux nodes are actually common to all upstreamed boards, so define them in SoC DTSI to reduce code duplication. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221026200357.391635-2-krzysztof.kozlowski@linaro.org .../dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts | 20 -------------------- arch/arm64/boot/dts/qcom/sm8450.dtsi | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) commit 7af949211a0554bbc06163b081fc2cb516674880 Author: Johan Hovold Date: Mon Oct 24 11:15:07 2022 +0200 arm64: dts: qcom: sm8450: fix UFS PHY registers The sizes of the UFS PHY register regions are too small and does specifically not cover all registers used by the Linux driver. As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor driver. Fixes: 07fa917a335e ("arm64: dts: qcom: sm8450: add ufs nodes") Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221024091507.20342-5-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b3c7839b698cc617e97dd2e4f1eeb4adc280fe58 Author: Johan Hovold Date: Mon Oct 24 11:15:06 2022 +0200 arm64: dts: qcom: sm8350: fix UFS PHY registers The sizes of the UFS PHY register regions are too small and does specifically not cover all registers used by the Linux driver. As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor driver. Fixes: 59c7cf814783 ("arm64: dts: qcom: sm8350: Add UFS nodes") Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221024091507.20342-4-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8350.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7f8b37dd4e7bf50160529530d9789b846153df71 Author: Johan Hovold Date: Mon Oct 24 11:15:05 2022 +0200 arm64: dts: qcom: sm8250: fix UFS PHY registers The sizes of the UFS PHY register regions are too small and does specifically not cover all registers used by the Linux driver. As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor driver. Fixes: b7e2fba06622 ("arm64: dts: qcom: sm8250: Add UFS controller and PHY") Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221024091507.20342-3-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 36a31b3a8d9ba1707a23de8d8dc1ceaef4eda695 Author: Johan Hovold Date: Mon Oct 24 11:15:04 2022 +0200 arm64: dts: qcom: sm8150: fix UFS PHY registers The sizes of the UFS PHY register regions are too small and does specifically not cover all registers used by the Linux driver. As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor driver. Fixes: 3834a2e92229 ("arm64: dts: qcom: sm8150: Add ufs nodes") Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221024091507.20342-2-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8b276ca036377a5baa4fd0692b80608f0de8a260 Author: Krzysztof Kozlowski Date: Sun Oct 23 20:23:56 2022 -0400 arm64: dts: qcom: msm8916: 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: Konrad Dybcio Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221024002356.28261-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 14 +- .../boot/dts/qcom/msm8916-alcatel-idol347.dts | 14 +- arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts | 24 +- arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts | 20 +- .../boot/dts/qcom/msm8916-longcheer-l8150.dts | 16 +- .../boot/dts/qcom/msm8916-longcheer-l8910.dts | 8 +- arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 274 +++++++++++---------- .../dts/qcom/msm8916-samsung-a2015-common.dtsi | 64 ++--- .../boot/dts/qcom/msm8916-samsung-a3u-eur.dts | 6 +- .../boot/dts/qcom/msm8916-samsung-a5u-eur.dts | 2 +- .../dts/qcom/msm8916-samsung-e2015-common.dtsi | 2 +- .../boot/dts/qcom/msm8916-samsung-grandmax.dts | 2 +- arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts | 2 +- .../boot/dts/qcom/msm8916-samsung-serranove.dts | 41 +-- .../boot/dts/qcom/msm8916-wingtech-wt88047.dts | 21 +- 15 files changed, 259 insertions(+), 251 deletions(-) commit 5a134c940cd368b72d5bcf24132b8f951be9a4c1 Author: Harry Austen Date: Sun Oct 23 20:46:00 2022 +0000 arm64: dts: qcom: msm8996: add support for oneplus3(t) Add initial support for OnePlus 3 and 3T mobile phones. They are based on the MSM8996 SoC. Co-developed-by: Yassine Oudjana Signed-off-by: Yassine Oudjana Signed-off-by: Harry Austen Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221023204505.115141-5-hpausten@protonmail.com arch/arm64/boot/dts/qcom/Makefile | 2 + .../boot/dts/qcom/msm8996-oneplus-common.dtsi | 787 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8996-oneplus3.dts | 44 ++ arch/arm64/boot/dts/qcom/msm8996-oneplus3t.dts | 45 ++ 4 files changed, 878 insertions(+) commit ce5d6ba21ae6c83fc2db385f9202272ca0d403f2 Author: Harry Austen Date: Sun Oct 23 20:45:49 2022 +0000 dt-bindings: arm: qcom: add oneplus3(t) devices Add compatible strings for the OnePlus 3 and 3T phones which utilise the Qualcomm MSM8996 SoC. Signed-off-by: Harry Austen Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221023204505.115141-4-hpausten@protonmail.com Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 18c32de673bf3ade651979be48e9a14bfe612487 Author: Harry Austen Date: Sun Oct 23 20:45:38 2022 +0000 arm64: dts: qcom: msm8996: add blsp1_i2c6 node Add support for the sixth I2C interface on the MSM8996 SoC. Signed-off-by: Harry Austen Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221023204505.115141-3-hpausten@protonmail.com arch/arm64/boot/dts/qcom/msm8996.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 9b4dc87d352d0109c36efeea60cb75d14ac50ef1 Author: Krzysztof Kozlowski Date: Fri Nov 4 15:08:40 2022 -0400 ARM: dts: qcom: sdx65: add dedicated IMEM and syscon compatibles Add proper compatibles to the IMEM device node: 1. syscon as required by the bindings, even though it is not currently used, 2. dedicated compatible as required for syscon and simple-mfd nodes. Align the node name to match IMEM type of device - SRAM. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104190840.134733-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-sdx65.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bdc51f42d25af15c91ec1b1a20c595ec33b3ea8e Author: Krzysztof Kozlowski Date: Fri Nov 4 15:08:39 2022 -0400 dt-bindings: sram: qcom,imem: document SDX65 Add compatible for SDX65 IMEM. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104190840.134733-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/sram/qcom,imem.yaml | 1 + 1 file changed, 1 insertion(+) commit c9713e4ede1e5d044b64fe4d3cbb84223625637f Author: Christian Marangi Date: Tue Oct 25 01:38:17 2022 +0200 ARM: dts: qcom: ipq8064: disable mmc-ddr-1_8v for sdcc1 It was reported non working mmc with this option enabled. Both mmc for ipq8064 are supplied by a fixed 3.3v regulator so mmc can't be run at 1.8v. Disable it to restore correct functionality of this SoC feature. Tested-by: Hendrik Koerner Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221024233817.27410-1-ansuelsmth@gmail.com arch/arm/boot/dts/qcom-ipq8064.dtsi | 1 - 1 file changed, 1 deletion(-) commit 85055a1eecc17f38d92b36f6b774bb37a1cc7a53 Author: Neil Armstrong Date: Fri Oct 21 17:27:57 2022 +0200 ARM: dts: qcom-msm8660: align RPM regulators node name with bindings Node names should be generic and new DT schema expects RPM regulators node to be just "regulators". Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221005-mdm9615-pinctrl-yaml-v3-5-e5e045644971@linaro.org arch/arm/boot/dts/qcom-msm8660.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7e34943d909f1a7872603d834347b478466cb09 Author: Neil Armstrong Date: Fri Oct 21 17:27:54 2022 +0200 ARM: dts: qcom: mdm9615: wp8548-mangoh-green: fix sx150xq node names and probe-reset property Fix the sx150xq node names to pinctrl and use the right probe-reset property. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221005-mdm9615-pinctrl-yaml-v3-2-e5e045644971@linaro.org arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fadae8fe73c6b30f759189209c24746a1dae7b1a Author: Neil Armstrong Date: Fri Oct 21 17:27:53 2022 +0200 ARM: dts: qcom: mdm9615: align pinctrl subnodes with dt-schema bindings Align the MDM9615 DT to the expected subnodes namings in the dt-schema bindings. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221005-mdm9615-pinctrl-yaml-v3-1-e5e045644971@linaro.org .../boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts | 8 ++++---- arch/arm/boot/dts/qcom-mdm9615-wp8548.dtsi | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) commit 10de96ba6d4287220962cdd82826b6a14af90e2e Author: Neil Armstrong Date: Fri Oct 21 11:06:47 2022 +0200 ARM: dts: qcom: mdm9615: remove useless amba subnode The separate amba device node doesn't add anything significant to the DT. The OF parsing code already creates amba_device or platform_device depending on the compatibility lists. Acked-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928-mdm9615-dt-schema-fixes-v4-11-dac2dfaac703@linaro.org arch/arm/boot/dts/qcom-mdm9615.dtsi | 78 +++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 42 deletions(-) commit 3627dd180c67d3e589c38a10b4be29a0352a70b6 Author: Neil Armstrong Date: Fri Oct 21 11:06:46 2022 +0200 ARM: dts: qcom: mdm9615: remove invalid interrupt-names from pl18x mmc nodes This solves the 'interrupt-names' was unexpected dtbs check error. Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928-mdm9615-dt-schema-fixes-v4-10-dac2dfaac703@linaro.org arch/arm/boot/dts/qcom-mdm9615.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 75353420d0d0abe3a57cedf4a6cfa00ea05842a3 Author: Neil Armstrong Date: Fri Oct 21 11:06:40 2022 +0200 ARM: dts: qcom: mdm9615: remove invalid spi-max-frequency gsbi3_spi node The spi-max-frequency property has nothing to do in the controller's node, remove it and fix the 'spi-max-frequency' was unexpected dtbs check error. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928-mdm9615-dt-schema-fixes-v4-4-dac2dfaac703@linaro.org arch/arm/boot/dts/qcom-mdm9615.dtsi | 1 - 1 file changed, 1 deletion(-) commit e58bdf93db08c16dd06bc1967e978708b44d9c83 Author: Neil Armstrong Date: Fri Oct 21 11:06:39 2022 +0200 ARM: dts: qcom: mdm9615: add missing reg in cpu@0 node Fixes cpu@0: 'reg' is a required property from dtbs check. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928-mdm9615-dt-schema-fixes-v4-3-dac2dfaac703@linaro.org arch/arm/boot/dts/qcom-mdm9615.dtsi | 1 + 1 file changed, 1 insertion(+) commit c69af934db18ad165b1dc84f5450fa55afb34acb Author: Neil Armstrong Date: Fri Oct 21 11:06:38 2022 +0200 ARM: dts: qcom: mdm9615*: add SPDX-License-Identifier Replace the license blob by a clean SPDX-License-Identifier with GPL2+ or MIT even if X11 is specified in the original blob since the actual license text corresponds to a MIT license. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928-mdm9615-dt-schema-fixes-v4-2-dac2dfaac703@linaro.org .../boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts | 39 +--------------------- arch/arm/boot/dts/qcom-mdm9615-wp8548.dtsi | 39 +--------------------- arch/arm/boot/dts/qcom-mdm9615.dtsi | 39 +--------------------- 3 files changed, 3 insertions(+), 114 deletions(-) commit 9793083f1dd9da8dda0ef68e90934dd7d112203b Author: Ben Skeggs Date: Wed Jun 1 20:46:32 2022 +1000 drm/nouveau/disp: move LVDS protocol information into acquire Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/dispnv50/disp.c | 32 +++++++--------------- drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 8 ------ drivers/gpu/drm/nouveau/include/nvif/if0012.h | 5 ++++ drivers/gpu/drm/nouveau/include/nvif/outp.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 8 +----- drivers/gpu/drm/nouveau/nvif/outp.c | 9 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 10 ++++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 5 ++++ .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 16 ----------- drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 16 ++++++++++- 10 files changed, 50 insertions(+), 61 deletions(-) commit ea6143a86c67110a2c62deaf70d0b7b92e4f865f Author: Ben Skeggs Date: Wed Jun 1 20:46:32 2022 +1000 drm/nouveau/disp: move and extend the role of outp acquire/release methods There are various pieces of information we pass to NVKM about the next modeset, which are generally used while handling supervisor interrupts. We had to start passing in some information about audio requirements a while back to allocate an appropriate SOR in ACQUIRE, so we may as well move all this type of information here for other protocols too. Certain methods will be blocked on non-acquired outputs now, preventing NULL pointer derefs from KMS driver bugs. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul drivers/gpu/drm/nouveau/dispnv50/crc.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 98 +++++++--------------- drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 10 --- drivers/gpu/drm/nouveau/include/nvif/if0012.h | 32 +++++++ drivers/gpu/drm/nouveau/include/nvif/outp.h | 10 +++ drivers/gpu/drm/nouveau/nouveau_encoder.h | 1 - drivers/gpu/drm/nouveau/nvif/outp.c | 81 +++++++++++++++++- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 18 ---- drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 61 ++++++++++++++ 9 files changed, 213 insertions(+), 100 deletions(-) commit 118e021b4b66f758f8e8f21dc0e5e0a4c721e69e Author: Dave Chinner Date: Mon Nov 7 10:09:11 2022 +1100 xfs: write page faults in iomap are not buffered writes When we reserve a delalloc region in xfs_buffered_write_iomap_begin, we mark the iomap as IOMAP_F_NEW so that the the write context understands that it allocated the delalloc region. If we then fail that buffered write, xfs_buffered_write_iomap_end() checks for the IOMAP_F_NEW flag and if it is set, it punches out the unused delalloc region that was allocated for the write. The assumption this code makes is that all buffered write operations that can allocate space are run under an exclusive lock (i_rwsem). This is an invalid assumption: page faults in mmap()d regions call through this same function pair to map the file range being faulted and this runs only holding the inode->i_mapping->invalidate_lock in shared mode. IOWs, we can have races between page faults and write() calls that fail the nested page cache write operation that result in data loss. That is, the failing iomap_end call will punch out the data that the other racing iomap iteration brought into the page cache. This can be reproduced with generic/34[46] if we arbitrarily fail page cache copy-in operations from write() syscalls. Code analysis tells us that the iomap_page_mkwrite() function holds the already instantiated and uptodate folio locked across the iomap mapping iterations. Hence the folio cannot be removed from memory whilst we are mapping the range it covers, and as such we do not care if the mapping changes state underneath the iomap iteration loop: 1. if the folio is not already dirty, there is no writeback races possible. 2. if we allocated the mapping (delalloc or unwritten), the folio cannot already be dirty. See #1. 3. If the folio is already dirty, it must be up to date. As we hold it locked, it cannot be reclaimed from memory. Hence we always have valid data in the page cache while iterating the mapping. 4. Valid data in the page cache can exist when the underlying mapping is DELALLOC, UNWRITTEN or WRITTEN. Having the mapping change from DELALLOC->UNWRITTEN or UNWRITTEN->WRITTEN does not change the data in the page - it only affects actions if we are initialising a new page. Hence #3 applies and we don't care about these extent map transitions racing with iomap_page_mkwrite(). 5. iomap_page_mkwrite() checks for page invalidation races (truncate, hole punch, etc) after it locks the folio. We also hold the mapping->invalidation_lock here, and hence the mapping cannot change due to extent removal operations while we are iterating the folio. As such, filesystems that don't use bufferheads will never fail the iomap_folio_mkwrite_iter() operation on the current mapping, regardless of whether the iomap should be considered stale. Further, the range we are asked to iterate is limited to the range inside EOF that the folio spans. Hence, for XFS, we will only map the exact range we are asked for, and we will only do speculative preallocation with delalloc if we are mapping a hole at the EOF page. The iterator will consume the entire range of the folio that is within EOF, and anything beyond the EOF block cannot be accessed. We never need to truncate this post-EOF speculative prealloc away in the context of the iomap_page_mkwrite() iterator because if it remains unused we'll remove it when the last reference to the inode goes away. Hence we don't actually need an .iomap_end() cleanup/error handling path at all for iomap_page_mkwrite() for XFS. This means we can separate the page fault processing from the complexity of the .iomap_end() processing in the buffered write path. This also means that the buffered write path will also be able to take the mapping->invalidate_lock as necessary. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong fs/xfs/xfs_file.c | 2 +- fs/xfs/xfs_iomap.c | 9 +++++++++ fs/xfs/xfs_iomap.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) commit abef378c434e6f5abd46fd536e9972374fb74e98 Author: Arumugam Kolappan Date: Tue Nov 1 00:27:44 2022 -0700 RDMA/mlx5: Change debug log level for remote access error syndromes The mlx5 driver dumps the entire CQE buffer by default for few syndromes. Some syndromes are expected due to the application behavior [ex: MLX5_CQE_SYNDROME_REMOTE_ACCESS_ERR, MLX5_CQE_SYNDROME_REMOTE_OP_ERR and MLX5_CQE_SYNDROME_LOCAL_PROT_ERR]. Hence, for these syndromes, the patch converts the log level from KERN_WARNING to KERN_DEBUG. This enables the application to get the CQE buffer dump by changing to KERN_DEBUG level as and when needed. Suggested-by: Leon Romanovsky Signed-off-by: Arumugam Kolappan Link: https://lore.kernel.org/r/1667287664-19377-1-git-send-email-aru.kolappan@oracle.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/cq.c | 27 +++++++++++++++------------ drivers/infiniband/hw/mlx5/mlx5_ib.h | 4 ++++ 2 files changed, 19 insertions(+), 12 deletions(-) commit b1599915f09157e98f59556e1b2eafe473603347 Author: Ingo Molnar Date: Sun Nov 6 09:55:56 2022 +0100 x86/cpufeatures: Move X86_FEATURE_CALL_DEPTH from bit 18 to bit 19 of word 11, to leave space for WIP X86_FEATURE_SGX_EDECCSSA bit Reallocate a soft-cpufeatures bit allocated for call-depth tracking code, which clashes with this recent KVM/SGX patch being worked on: KVM/VMX: Allow exposing EDECCSSA user leaf function to KVM guest Instead of reallocating cpufeatures bits in evil merges, make the allocation explicit. Acked-by: Peter Zijlstra Cc: Thomas Gleixner Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f05dbd1a500661a9e3af59f0690301d031140da7 Author: Robert Foss Date: Wed Nov 2 10:01:40 2022 +0100 clk: qcom: dispcc-sm8250: Disable link_div_clk_src for sm8150 SM8150 does not have any of the link_div_clk_src clocks, so let's disable them for this SoC. Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221102090140.965450-6-robert.foss@linaro.org drivers/clk/qcom/dispcc-sm8250.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 8305ff41c7426b49090b236da659e2e9bb05fcb9 Author: Robert Foss Date: Wed Nov 2 10:01:39 2022 +0100 clk: qcom: dispcc-sm8250: Add missing EDP clocks for sm8350 SM8350 supports embedded displayport, but the clocks for this were previously not accounted for. Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221102090140.965450-5-robert.foss@linaro.org drivers/clk/qcom/dispcc-sm8250.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit c2b6ad72959771730806bbab76aa69e99444bf29 Author: Robert Foss Date: Wed Nov 2 10:01:38 2022 +0100 dt-bindings: clock: dispcc-sm8250: Add EDP_LINK_DIV_CLK_SRC index Add this previously missing index, since it is supported by the SoCs targeted by the dispcc-sm8250 driver. Signed-off-by: Robert Foss Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221102090140.965450-4-robert.foss@linaro.org include/dt-bindings/clock/qcom,dispcc-sm8250.h | 1 + 1 file changed, 1 insertion(+) commit e1a297a681bc4ab2c5cfe31eb4b59bb6f202035a Author: Robert Foss Date: Wed Nov 2 10:01:37 2022 +0100 clk: qcom: dispcc-sm8250: Add RETAIN_FF_ENABLE flag for mdss_gdsc All SoC supported by this driver supports the RETAIN_FF_ENABLE flag, so it should be enabled here. This feature enables registers to maintain their state after dis/re-enabling the GDSC. Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221102090140.965450-3-robert.foss@linaro.org drivers/clk/qcom/dispcc-sm8250.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5f84650fb0d6ebaa48a5f99183de70d32d0b115 Author: Robert Foss Date: Wed Nov 2 10:01:36 2022 +0100 clk: qcom: dispcc-sm8250: Disable EDP_GTC for sm8350 SM8350 does not have the EDP_GTC clock, so let's disable it for this SoC. Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221102090140.965450-2-robert.foss@linaro.org drivers/clk/qcom/dispcc-sm8250.c | 3 +++ 1 file changed, 3 insertions(+) commit ac1c5a03d3772b1db25e8092f771aa33f6ae2f7e Author: Manivannan Sadhasivam Date: Wed Nov 2 14:43:20 2022 +0530 clk: qcom: gcc-sm8250: Use retention mode for USB GDSCs USB controllers on SM8250 doesn't work after coming back from suspend. This can be fixed by keeping the USB GDSCs in retention mode so that hardware can keep them ON and put into rentention mode once the parent domain goes to a low power state. Fixes: 3e5770921a88 ("clk: qcom: gcc: Add global clock controller driver for SM8250") Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221102091320.66007-1-manivannan.sadhasivam@linaro.org drivers/clk/qcom/gcc-sm8250.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 33268bb9fdb64f57c08d400709bae7b9cda3120a Author: AngeloGioacchino Del Regno Date: Fri Nov 4 14:34:52 2022 +0100 soc: qcom: spm: Implement support for SAWv2.3, MSM8976 L2 PM Implement the support for SAW v2.3, used in at least MSM8976, MSM8956 and APQ variants and while at it also add the configuration for the MSM8976's little (a53) and big (a72) clusters cache power management. Signed-off-by: AngeloGioacchino Del Regno [Marijn: reorder struct definitions to follow high-to-low order] Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Dmitry Baryshkov Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104133452.131227-3-angelogioacchino.delregno@collabora.com drivers/soc/qcom/spm.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 7a21fddb355a01c5655d43e4723c6fe99f2a4146 Author: AngeloGioacchino Del Regno Date: Fri Nov 4 14:34:51 2022 +0100 dt-bindings: soc: qcom: spm: Add compatibles for MSM8976 L2 Add SPM AVS Wrapper 2 compatibles for MSM8976's L2 cache. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104133452.131227-2-angelogioacchino.delregno@collabora.com Documentation/devicetree/bindings/soc/qcom/qcom,spm.yaml | 2 ++ 1 file changed, 2 insertions(+) commit c882c899ead3545102a4d71b5fbe73b9e4bc2657 Author: Luca Weiss Date: Fri Nov 4 16:30:41 2022 +0100 soc: qcom: llcc: make irq truly optional The function platform_get_irq prints an error message into the kernel log when the irq isn't found. Since the interrupt is actually optional and not provided by some SoCs, use platform_get_irq_optional which does not print an error message. Fixes: c081f3060fab ("soc: qcom: Add support to register LLCC EDAC driver") Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104153041.412020-1-luca.weiss@fairphone.com drivers/soc/qcom/llcc-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 618c01c3b2a95ea1e8ef25a005229cb78da64481 Author: Krzysztof Kozlowski Date: Fri Nov 4 13:46:56 2022 -0400 dt-bindings: clock: qcom,audiocc-sm8250: add missing audio clock The SM8250 DTS uses three clocks as input to LPASS AudioClock Controller (althopugh Linux driver seems not needing it), so document the missing audio voting clock. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104174656.123979-3-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/clock/qcom,audiocc-sm8250.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 850c156fa64f1b23954563ab6614d76e5a6d6af6 Author: Krzysztof Kozlowski Date: Fri Nov 4 13:46:55 2022 -0400 dt-bindings: clock: qcom,aoncc-sm8250: add missing audio clock The SM8250 DTS uses three clocks as input to LPASS AON Clock Controller (althopugh Linux driver seems not needing it), so document the missing audio voting clock. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104174656.123979-2-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/clock/qcom,aoncc-sm8250.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 42f520f94e1644da423d3d2981be98beda3c4253 Author: Krzysztof Kozlowski Date: Fri Nov 4 13:46:54 2022 -0400 dt-bindings: clock: qcom,aoncc-sm8250: fix compatible The SM8250 AON Clock Controller compatible used by Linux driver and DTS is qcom,sm8250-lpass-aoncc. Fixes: 7dbe5a7a3f99 ("dt-bindings: clock: Add support for LPASS Always ON Controller") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104174656.123979-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/clock/qcom,aoncc-sm8250.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83bece0a9ef359ab4c135827ee54a222a3b62988 Author: Krzysztof Kozlowski Date: Fri Nov 4 14:21:08 2022 -0400 dt-bindings: clock: qcom,sdm845-lpasscc: convert to dtschema Convert Qualcomm SDM845 LPASS clock controller bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221104182108.126515-1-krzysztof.kozlowski@linaro.org .../devicetree/bindings/clock/qcom,lpasscc.txt | 26 ------------ .../bindings/clock/qcom,sdm845-lpasscc.yaml | 47 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 26 deletions(-) commit 1a94ba5b44c5448c7ec962a5ce66eb12a6042288 Author: Harry Austen Date: Sun Oct 23 20:45:27 2022 +0000 arm64: dts: qcom: msm8996: standardize blsp indexing Use one-based indexing throughout the file for BLSP devices to avoid confusion. Most of the node names and labels are consistent already. This patch just fixes a few pinconf node names to match the one-based indexing used in the label names. Signed-off-by: Harry Austen Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221023204505.115141-2-hpausten@protonmail.com arch/arm64/boot/dts/qcom/msm8996.dtsi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f4ec5f28af13e2b8e62ae173cb6827e137cdd8cc Author: Neil Armstrong Date: Fri Oct 21 11:06:37 2022 +0200 dt-bindings: arm: qcom: move swir,mangoh-green-wp8548 board documentation to qcom.yaml Document into the main qcom.yaml as conversion from swir.txt to dt-schema. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928-mdm9615-dt-schema-fixes-v4-1-dac2dfaac703@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ Documentation/devicetree/bindings/arm/swir.txt | 12 ------------ 2 files changed, 6 insertions(+), 12 deletions(-) commit c03fa428ac6e439afa1d437776365a632ce24262 Author: Krzysztof Kozlowski Date: Thu Oct 20 23:27:02 2022 -0400 arm64: defconfig: build-in Qualcomm SC7180 and SM8450 interconnects On Qualcomm SC7180 and SM8450 SocS, the typical debug console serial port is part of GENI Serial Engine QUP Wrapper Controller which uses interconnects. This means that without interconnect drivers, the serial might not probe. Without serial console, the root might not be mounted by initramfs: + REASON=No init found. Try passing init= bootarg. PS1=(initramfs ... (initramfs) run-init -c /dev/console -n /root /sbin/init run-init: opening console: No such file or directory This means that interconnect drivers on these Qualcomm SoCs cannot be modules and must be built-in to mount rootfs. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221021032702.1340963-1-krzysztof.kozlowski@linaro.org arch/arm64/configs/defconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 169e1553accfd31386a7d364ab57293802027ab7 Author: Krzysztof Kozlowski Date: Thu Oct 20 18:53:09 2022 -0400 arm64: dts: qcom: msm8996: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221020225309.32116-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 96 ++++-------- arch/arm64/boot/dts/qcom/apq8096-ifc6640.dts | 68 ++------- .../boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 26 ++-- .../arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 10 +- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 8 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 164 ++++++++++----------- .../boot/dts/qcom/msm8996pro-xiaomi-natrium.dts | 4 +- .../boot/dts/qcom/msm8996pro-xiaomi-scorpio.dts | 8 +- 8 files changed, 153 insertions(+), 231 deletions(-) commit 5ecbf096e0565d4761e0294aaa2e79ce44a53e6d Author: Krzysztof Kozlowski Date: Thu Oct 20 18:53:08 2022 -0400 arm64: dts: qcom: msm8996-sony-xperia-tone: drop incorrect wlan pin input Pin configuration has no "input-high" property, so drop it from node described as Wifi host wake up pin. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221020225309.32116-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 1 - 1 file changed, 1 deletion(-) commit 2f0300a6946702ff48f6584e0146bbe62c32abac Author: Krzysztof Kozlowski Date: Thu Oct 20 18:51:35 2022 -0400 arm64: dts: qcom: sc7180: 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. Merge subnodes named 'pinconf' and 'pinmux' into one entry, add function where missing (required by bindings for GPIOs) and reorganize overriding pins by boards. Split the SPI and UART configuration into separate nodes 1. SPI (MOSI, MISO, SCLK), SPI chip-select, SPI chip-select via GPIO, 2. UART per each pin: TX, RX and optional CTS/RTS. This allows each board to customize them easily without adding any new nodes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221020225135.31750-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7180-idp.dts | 236 ++++---- .../arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi | 36 +- .../boot/dts/qcom/sc7180-trogdor-homestar.dtsi | 47 +- .../boot/dts/qcom/sc7180-trogdor-kingoftown-r0.dts | 16 +- .../boot/dts/qcom/sc7180-trogdor-kingoftown.dtsi | 8 +- arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi | 16 +- .../boot/dts/qcom/sc7180-trogdor-mrbland-rev0.dtsi | 25 +- .../boot/dts/qcom/sc7180-trogdor-mrbland.dtsi | 72 +-- .../dts/qcom/sc7180-trogdor-parade-ps8640.dtsi | 32 +- .../boot/dts/qcom/sc7180-trogdor-pazquel.dtsi | 8 +- .../arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi | 14 +- .../dts/qcom/sc7180-trogdor-quackingstick.dtsi | 56 +- arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts | 8 +- .../boot/dts/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi | 16 +- .../dts/qcom/sc7180-trogdor-wormdingler-rev0.dtsi | 25 +- .../boot/dts/qcom/sc7180-trogdor-wormdingler.dtsi | 72 +-- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 629 ++++++++------------- arch/arm64/boot/dts/qcom/sc7180.dtsi | 597 ++++++++++--------- 18 files changed, 776 insertions(+), 1137 deletions(-) commit 8ddfa04de492ceac93e72063e027216bb9b07ca5 Author: Krzysztof Kozlowski Date: Thu Oct 20 18:51:34 2022 -0400 arm64: dts: qcom: sc7180: revert "arm64: dts: qcom: sc7180: Avoid glitching SPI CS at bootup on trogdor" This reverts commit e440e30e26dd6b0424002ad0ddcbbcea783efd85 because it is not a reliable way of fixing SPI CS glitch and it depends on specific Linux kernel pin controller driver behavior. This behavior of kernel driver was changed in commit b991f8c3622c ("pinctrl: core: Handling pinmux and pinconf separately") thus effectively the DTS fix stopped being effective. Proper solution for the glitching SPI chip select must be implemented in the drivers, not via ordering of entries in DTS, and is already introduced in commit d21f4b7ffc22 ("pinctrl: qcom: Avoid glitching lines when we first mux to output"). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221020225135.31750-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) commit 59e787935cfe6f562fbb9117e2df4076eaf810d8 Author: Krzysztof Kozlowski Date: Thu Oct 20 18:51:33 2022 -0400 arm64: dts: qcom: sc7180-trogdor-homestar: fully configure secondary I2S pins The Trogdor Homestar DTSI adds additional GPIO52 pin to secondary I2S pins ("sec_mi2s_active") and configures it to "mi2s_1" function. The Trogdor DTSI (which is included by Homestar) configures drive strength and bias for all "sec_mi2s_active" pins, thus the intention was to apply this configuration also to GPIO52 on Homestar. Reported-by: Doug Anderson Signed-off-by: Krzysztof Kozlowski Fixes: be0416a3f917 ("arm64: dts: qcom: Add sc7180-trogdor-homestar") Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221020225135.31750-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit f98e12a7e0dab30b48a75554510634c06eecd3e5 Author: Vincent Knecht Date: Wed Oct 19 19:10:03 2022 +0200 soc: qcom: spm: Add MSM8939 SPM register data Add SPM register information and initialization values for QCOM MSM8939 SoC. Signed-off-by: Vincent Knecht Reviewed-by: Bryan O'Donoghue Reviewed-by: Stephan Gerhold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221019171004.1080911-2-vincent.knecht@mailoo.org drivers/soc/qcom/spm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 7334ac8b7a332c0f85545ac50e1822cd76029c96 Author: Vincent Knecht Date: Wed Oct 19 19:10:02 2022 +0200 dt-bindings: soc: qcom: spm: Add MSM8939 CPU compatible Document the "qcom,msm8939-saw2-v3.0-cpu" compatible for the CPU Subsystem Power Manager (SPM) on the MSM8939 SoC. Signed-off-by: Vincent Knecht Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221019171004.1080911-1-vincent.knecht@mailoo.org Documentation/devicetree/bindings/soc/qcom/qcom,spm.yaml | 1 + 1 file changed, 1 insertion(+) commit 19e67894500a8a038cb103e7267da5e64bcc853c Author: Krzysztof Kozlowski Date: Tue Oct 18 19:03:52 2022 -0400 arm64: dts: qcom: sm8450: Add GPI DMA compatible fallback Use SM6350 as fallback for GPI DMA, to indicate devices are compatible and that drivers can bind with only one compatible. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221018230352.1238479-6-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b561e225dee5412609fd98340ca71ba0ab2e4b36 Author: Krzysztof Kozlowski Date: Tue Oct 18 19:03:51 2022 -0400 arm64: dts: qcom: sm8350: Add GPI DMA compatible fallback Use SM6350 as fallback for GPI DMA, to indicate devices are compatible and that drivers can bind with only one compatible. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221018230352.1238479-5-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8350.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e9f2053b7866ac09f2acebbe65056204ef3fe67d Author: Krzysztof Kozlowski Date: Tue Oct 18 19:03:50 2022 -0400 arm64: dts: qcom: sc7280: Add GPI DMA compatible fallback Use SM6350 as fallback for GPI DMA, to indicate devices are compatible and that drivers can bind with only one compatible. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221018230352.1238479-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 78c80faf07c06e1de7d09ded2667cae5bda9df34 Author: Krzysztof Kozlowski Date: Sun Oct 16 21:46:53 2022 -0400 ARM: dts: qcom: ipq8064-rb3011: Add SoC compatible Add qcom,ipq8064 compatible fallback for the SoC. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221017014653.12970-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb27202bc549a4469576c5b4a18ba3b6d0dd926f Author: Krzysztof Kozlowski Date: Sun Oct 16 21:46:52 2022 -0400 dt-bindings: arm: qcom: document Mikrotik RB3011 board Add compatible for existing Mikrotik RB3011 board. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221017014653.12970-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit d6e437c5895e09c0e6876a6809b604c411d37c4d Author: Krzysztof Kozlowski Date: Sun Oct 16 21:22:25 2022 -0400 ARM: dts: qcom: msm8974: 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. All nodes for GPIOs must also define the function property. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221017012225.8579-2-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 14 ++-- .../boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi | 16 ++--- arch/arm/boot/dts/qcom-msm8974.dtsi | 77 +++++++++++----------- .../arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts | 20 +++--- arch/arm/boot/dts/qcom-msm8974pro-samsung-klte.dts | 36 +++++----- .../qcom-msm8974pro-sony-xperia-shinano-castor.dts | 31 ++++----- 6 files changed, 98 insertions(+), 96 deletions(-) commit aac16a9d247e5496361bfe20d651f2c1333eb5dc Author: Jami Kettunen Date: Sun Oct 16 19:03:29 2022 +0100 arm64: dts: qcom: msm8998-oneplus-common: enable RRADC Enable the Round Robin ADC for the OnePlus 5/5T. Signed-off-by: Jami Kettunen Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016180330.1912214-6-caleb.connolly@linaro.org arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 53c54069d9ffd556b52893077324e628655cd591 Author: Caleb Connolly Date: Sun Oct 16 19:03:28 2022 +0100 arm64: dts: qcom: sdm845-xiaomi-beryllium: enable rradc Enable the PMI8998 RRADC. Signed-off-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016180330.1912214-5-caleb.connolly@linaro.org arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit e779eb99859cc26d051f6fc723d2bd2d5990a812 Author: Caleb Connolly Date: Sun Oct 16 19:03:27 2022 +0100 arm64: dts: qcom: sdm845-db845c: enable rradc Enable the Round Robin ADC for the db845c. Signed-off-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016180330.1912214-4-caleb.connolly@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 868985181a69df53321035d96aa668d90f6cd5cb Author: Caleb Connolly Date: Sun Oct 16 19:03:26 2022 +0100 arm64: dts: qcom: sdm845-oneplus: enable rradc Enable the RRADC for the OnePlus 6. Signed-off-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016180330.1912214-3-caleb.connolly@linaro.org arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 1cb78978d34e1b65bbb912d8265eb95713ae7a45 Author: Caleb Connolly Date: Sun Oct 16 19:03:25 2022 +0100 arm64: dts: qcom: pmi8998: add rradc node Add a DT node for the Round Robin ADC found in the PMI8998 PMIC. Signed-off-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016180330.1912214-2-caleb.connolly@linaro.org arch/arm64/boot/dts/qcom/pmi8998.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit aa7f445536b14f1701017040cb6458a350131a65 Author: Luca Weiss Date: Sun Oct 16 16:35:13 2022 +0200 dt-bindings: clock: Convert qcom,lcc to DT schema Convert the text bindings for the lcc to yaml format. Doing this showed that clocks and clock-names were not documented, so fix that now. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016143514.612851-1-luca@z3ntu.xyz .../devicetree/bindings/clock/qcom,lcc.txt | 22 ------ .../devicetree/bindings/clock/qcom,lcc.yaml | 86 ++++++++++++++++++++++ 2 files changed, 86 insertions(+), 22 deletions(-) commit bd40a8c773165e8175fa51d9f3fdcf00968ce8dc Author: Krzysztof Kozlowski Date: Thu Oct 13 11:54:18 2022 -0400 ARM: dts: qcom: ipq4018-jalapeno: Add SoC compatible Add qcom,ipq4018 compatible fallback for the SoC. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013155418.47577-4-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a35f1a75e7e2f73157a16ab56fcc01f09b133e50 Author: Krzysztof Kozlowski Date: Thu Oct 13 11:54:17 2022 -0400 ARM: dts: qcom: ipq4018-ap120c-ac: Add SoC compatible Add qcom,ipq4018 compatible fallback for the SoC. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013155418.47577-3-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c36509c9c7b0e9be1ec68828826a3754c5b0f28 Author: Krzysztof Kozlowski Date: Thu Oct 13 11:54:16 2022 -0400 dt-bindings: arm: qcom: Document IPQ4018 boards Add compatibles for existing boards with IPQ4018 SoC: ALFA Network AP120C-AC and 8devices Jalapeno. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013155418.47577-2-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit fd42d456bf22a894b3dafe19d7d8302e5de5fcb3 Author: Krzysztof Kozlowski Date: Thu Oct 13 11:54:15 2022 -0400 dt-bindings: vendor-prefixes: Add ALFA Network Add vendor prefix for ALFA Network Inc. https://www.alfa.com.tw/ Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013155418.47577-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit d711b22eee55ced0e32645706f20329be249e207 Author: Dzmitry Sankouski Date: Wed Oct 12 21:54:11 2022 +0300 arm64: dts: qcom: starqltechn: add initial device tree for starqltechn New device support - Samsung S9 (SM-G9600) phone What works: - simple framebuffer - storage (both main and sdcard) - ramoops Signed-off-by: Dzmitry Sankouski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221012185411.1282838-3-dsankouski@gmail.com arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sdm845-samsung-starqltechn.dts | 460 +++++++++++++++++++++ 2 files changed, 461 insertions(+) commit 20e88ca2960ee63450cc4b9383e387f18cc08fa8 Author: Dzmitry Sankouski Date: Wed Oct 12 21:54:10 2022 +0300 dt-bindings: arm: add samsung,starqltechn board based on sdm845 chip Add samsung,starqltechn board (Samsung Galaxy S9) binding. Signed-off-by: Dzmitry Sankouski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221012185411.1282838-2-dsankouski@gmail.com Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit 92039e8c080c63748f8e133e7cfad33a75daefb6 Author: Konrad Dybcio Date: Mon Oct 10 17:55:46 2022 +0200 clk: qcom: dispcc-sm6350: Add CLK_OPS_PARENT_ENABLE to pixel&byte src Add the CLK_OPS_PARENT_ENABLE flag to pixel and byte clk srcs to ensure set_rate can succeed. Signed-off-by: Konrad Dybcio Fixes: 837519775f1d ("clk: qcom: Add display clock controller driver for SM6350") Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221010155546.73884-1-konrad.dybcio@somainline.org drivers/clk/qcom/dispcc-sm6350.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4dd3949d17b66144fe7c39cf68ff4bedb4154f61 Author: Luca Weiss Date: Sun Oct 2 15:28:58 2022 +0300 ARM: dts: qcom: msm8974: Add CCI bus Add a node for the Camera Control Interface I2C bus found on MSM8974. Signed-off-by: Luca Weiss Signed-off-by: Matti Lehtimäki Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221002122859.75525-7-matti.lehtimaki@gmail.com arch/arm/boot/dts/qcom-msm8974.dtsi | 66 +++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 4ab2f41b0850768716c446461653178372bcd35c Author: Rayyan Ansari Date: Sun Oct 2 15:28:57 2022 +0300 ARM: dts: qcom: msm8226: Add CCI bus Add a node for the Camera Control Interface I2C bus found on MSM8226. Signed-off-by: Rayyan Ansari Signed-off-by: Matti Lehtimäki Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221002122859.75525-6-matti.lehtimaki@gmail.com arch/arm/boot/dts/qcom-msm8226.dtsi | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 6db4d77f5701699aa6eb4e9718d69a7a55f0aa65 Author: Martin Botka Date: Sat Oct 1 20:54:31 2022 +0200 clk: qcom: gcc-sm6125: Remove gpll7 from sdcc2_apps This removes gpll7 clock source from sdcc2_apps as it caused issues on the device during testing Signed-off-by: Martin Botka Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221001185431.493440-1-martin.botka@somainline.org drivers/clk/qcom/gcc-sm6125.c | 1 - 1 file changed, 1 deletion(-) commit 031f5436c9b7209446eb90fe512d1e379ace0e1b Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:21 2022 +0200 arm64: dts: qcom: sm8250: align LPASS pin configuration with DT schema DT schema expects LPASS pin configuration nodes to be named with '-state' suffix and their optional children with '-pins' suffix. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927153429.55365-5-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 44 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) commit 195a0a11d66d6c696cbcf398d6bc3f3a3a462f7c Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:20 2022 +0200 arm64: dts: qcom: sm8250: correct LPASS pin pull down The pull-down property is actually bias-pull-down. Fixes: 3160c1b894d9 ("arm64: dts: qcom: sm8250: add lpass lpi pin controller node") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927153429.55365-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 886a50bd031aae7b6880030a4076a146d0429492 Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:19 2022 +0200 arm64: dts: qcom: sc7280: align LPASS pin configuration with DT schema DT schema expects LPASS pin configuration nodes to be named with '-state' suffix and their optional children with '-pins' suffix. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927153429.55365-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 67cb6e988f8937105560c782bf04520c3d0db841 Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:18 2022 +0200 arm64: dts: qcom: sc7280: drop clock-cells from LPASS TLMM The LPASS pin-controller is not a clock provider: qcom/sc7280-herobrine-herobrine-r1.dtb: pinctrl@33c0000: '#clock-cells' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927153429.55365-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 -- 1 file changed, 2 deletions(-) commit da6b4c059283166c1939143574b3ade96817304e Author: Dmitry Baryshkov Date: Tue Sep 27 14:38:26 2022 +0300 ARM: dts: qcom-ipq8064: use pll4 clock for the gcc device Add a link to LCC's PLL4 clock to the GCC device node following the bindings (and driver needs). Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927113826.246241-4-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-ipq8064.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 55307e522cc7a4dddc3d231ca5cb7e68e9668f66 Author: Dmitry Baryshkov Date: Tue Sep 27 14:38:25 2022 +0300 clk: qcom: gcc-ipq806x: use parent_data for the last remaining entry Use parent_data for the last remaining entry (pll4). This clock is provided by the lcc device. Fixes: cb02866f9a74 ("clk: qcom: gcc-ipq806x: convert parent_names to parent_data") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927113826.246241-3-dmitry.baryshkov@linaro.org drivers/clk/qcom/gcc-ipq806x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e3c4471263f25620b169d4317202cbf70d7fa8c6 Author: Dmitry Baryshkov Date: Tue Sep 27 14:38:24 2022 +0300 dt-bindings: clock: qcom,gcc-ipq8064: add pll4 to used clocks On IPQ8064 (and related platforms) the GCC uses PLL4 clock provided by the LCC clock controller. Mention this in the bindings. To remain compatible with older bindings, make it optional, as the driver will fallback to getting the `pll4' clock from the system clocks list. Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927113826.246241-2-dmitry.baryshkov@linaro.org Documentation/devicetree/bindings/clock/qcom,gcc-ipq8064.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4ba146dd8897353e4e18a12c7866127f85c251e7 Author: Marijn Suijten Date: Mon Sep 26 21:01:48 2022 +0200 arm64: dts: qcom: sm6125-seine: Configure additional trinket thermistors In addition to PMIC-specific (pm6125) thermistors downstream extends this set with the rf-pa0/rf-pa1, quiet, camera-flash and UFS/eMMC thermistors in sm6125 (trinket) board and seine-specific DT files. All thermistors report sensible temperature readings in userspace. The sensors are also added to their respective Thermal Monitor node, with thermal zones to match where applicable: emmc-ufs and camera-flash are not available on the TM5 block, hence cannot be configured with a tripping point and will not have a thermal zone. Signed-off-by: Marijn Suijten Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220926190148.283805-6-marijn.suijten@somainline.org .../dts/qcom/sm6125-sony-xperia-seine-pdx201.dts | 151 +++++++++++++++++++++ 1 file changed, 151 insertions(+) commit 7401035f2ef8841d0db9724507b45841d16894b6 Author: Marijn Suijten Date: Mon Sep 26 21:01:47 2022 +0200 arm64: dts: qcom: sm6125-seine: Include PM6125 and configure PON The Sony Xperia Seine board uses the PM6125; include it and configure the PON buttons that provide the power and volume-up key. Signed-off-by: Marijn Suijten Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220926190148.283805-5-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 7c969c6e216654cab8b124383dd99a276049994d Author: Marijn Suijten Date: Mon Sep 26 21:01:46 2022 +0200 arm64: dts: qcom: Add PM6125 PMIC This PMIC is commonly used on boards with an SM6125 SoC and looks very similar in layout to the PM6150. Downstream declares more nodes to be available, but these have been omitted from this patch: the pwm/lpg block is unused on my reference device making it impossible to test/validate, and the spmi-clkdiv does not have a single device-tree binding using this driver yet, hence inclusion is better postponed until ie. audio which uses these clocks is brought up. Signed-off-by: Marijn Suijten Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220926190148.283805-4-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/pm6125.dtsi | 154 +++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) commit 02549ba5de0a09a27616496c3512db5af4ad7862 Author: Marijn Suijten Date: Mon Sep 26 21:01:45 2022 +0200 arm64: dts: qcom: pm660: Use unique ADC5_VCOIN address in node name The register address in the node name is shadowing vph_pwr@83, whereas the ADC5_VCOIN register resolves to 0x85. Fix this copy-paste discrepancy. Fixes: 4bf097540506 ("arm64: dts: qcom: pm660: Add VADC and temp alarm nodes") Signed-off-by: Marijn Suijten Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220926190148.283805-3-marijn.suijten@somainline.org arch/arm64/boot/dts/qcom/pm660.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3da503c26ec572628802b4ffbe738a5d373cd3f6 Author: Marijn Suijten Date: Mon Sep 26 21:01:44 2022 +0200 dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible Document support for the pm6125, typically paired with the sm6125 SoC. Signed-off-by: Marijn Suijten Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220926190148.283805-2-marijn.suijten@somainline.org Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 + 1 file changed, 1 insertion(+) commit 65e0d1c4668506d511af9ab0ff0a1f4c940ef8e7 Author: Luca Weiss Date: Sat Sep 24 17:29:37 2022 +0200 ARM: dts: qcom: Add support for Huawei Watch Add support for this smartwatch, based on Snapdragon 400 SoC. Currently supported functionality: * Internal storage * USB * Charger * Power button * Bluetooth * Wifi Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924152937.4076-2-luca@z3ntu.xyz arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/qcom-apq8026-huawei-sturgeon.dts | 376 +++++++++++++++++++++ 2 files changed, 377 insertions(+) commit 773c7700a71bb3f7f4fa4f689ffd4d063ddd66a7 Author: Luca Weiss Date: Sat Sep 24 17:29:36 2022 +0200 dt-bindings: arm: qcom: Document huawei,sturgeon device Document the Huawei Watch ("sturgeon") which is a smartwatch based on Snapdragon 400 SoC. Signed-off-by: Luca Weiss Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924152937.4076-1-luca@z3ntu.xyz Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit 5743efe0e73e4e1c8d042e982e31bb8145e35baf Author: Dmitry Baryshkov Date: Sat Sep 24 12:43:46 2022 +0300 ARM: dts: qcom-apq8064: change HDMI PHY node name to generic one Change HDMI PHY node names from custom 'hdmi-phy' to the generic 'phy'. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924094347.178666-2-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd12b33d3c0aa1ff81063dced32997887b924cd1 Author: Dmitry Baryshkov Date: Sat Sep 24 12:43:47 2022 +0300 arm64: dts: qcom: msm8996: change HDMI PHY node name to generic one Change HDMI PHY node name from custom 'hdmi-phy' to the generic 'phy'. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924094347.178666-3-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1e6243b37db8e589009cb333140fa23ee4d984c Author: Krzysztof Kozlowski Date: Sun Sep 18 10:54:30 2022 +0100 dt-bindings: arm: qcom: document Google Cheza Document Google Cheza board compatibles recently added. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220918095430.18068-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 3 +++ 1 file changed, 3 insertions(+) commit e19d0bf25c8119eaf401041c55af4edb5beab90c Author: Bhupesh Sharma Date: Wed Sep 21 10:26:02 2022 +0530 arm64: defconfig: Enable Qualcomm QCE crypto Now that the QCE crypto block is supported on several Qualcomm SoCs upstream, enable the same as a module in the arm64 defconfig. Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220921045602.1462007-5-bhupesh.sharma@linaro.org arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 09b327c991d21f7b432ba7b88b2368a6970c3916 Author: Krzysztof Kozlowski Date: Wed Nov 2 14:20:11 2022 -0400 dt-bindings: power: supply: bq25890: use one fallback compatible BQ2589[0256] seem compatible between each other in major aspects and remaining features are auto-detectable (by reading device revision ID register). Existing DTS already uses the compatibles with a fallback, so adjust the bindings to reflect this and fix dtbs_check warning: arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dtb: charger@6a: compatible: ['ti,bq25895', 'ti,bq25890'] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/supply/bq25890.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 70547f34deedcb039c8f92c603b70bc8d8992432 Author: Krzysztof Kozlowski Date: Wed Nov 2 14:45:01 2022 -0400 dt-bindings: power: supply: maxim,max17042: allow power-supplies MAX17042 Fuel Gauge uses power-supplies supplies: arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dtb: fuel-gauge@36: 'power-supplies' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/supply/maxim,max17042.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 8c9e038a2a36af49526cd509dbd8a1b34284cac6 Author: Krzysztof Kozlowski Date: Wed Nov 2 14:45:00 2022 -0400 dt-bindings: power: supply: bq25890: allow power-supply fields The BQ25890 schema references common power-supply.yaml, so allow all its properties to fix warnings like: arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dtb: charger@6a: 'monitored-battery', 'power-supplies', ... do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/supply/bq25890.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7d47d51663c2cbb9f07ac827f9dffa98d6cab21 Author: Krzysztof Kozlowski Date: Wed Nov 2 14:44:59 2022 -0400 dt-bindings: power: supply: define monitored-battery in common place Define the type of monitored-battery in power-supply.yaml common schema. Reference the schema where applicable to enforce the above in bindings which have monitored-battery property. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/mfd/ene-kb930.yaml | 6 +++--- Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml | 2 ++ Documentation/devicetree/bindings/power/supply/bq27xxx.yaml | 2 -- Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml | 4 ++-- Documentation/devicetree/bindings/power/supply/power-supply.yaml | 6 ++++++ Documentation/devicetree/bindings/power/supply/rohm,bd99954.yaml | 1 + Documentation/devicetree/bindings/power/supply/sc2731-charger.yaml | 1 - 7 files changed, 14 insertions(+), 8 deletions(-) commit 0eb1762f3c77a20f4a93f29239f0cb0a52d41dd6 Author: Christophe JAILLET Date: Sat Nov 5 12:16:54 2022 +0100 ipmi/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 Message-Id: <37daa028845d90ee77f1e547121a051a983fec2e.1667647002.git.christophe.jaillet@wanadoo.fr> Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_watchdog.c | 1 + 1 file changed, 1 insertion(+) commit 78a77c9f494829089d74afc60286c555efa0646a Author: Thomas Zimmermann Date: Thu Nov 3 16:14:46 2022 +0100 drm/fb-helper: Clarify use of last_close and output_poll_changed Clarify documentation in the use of struct drm_driver.last_close and struct drm_mode_config_funcs.output_poll_changed. Those callbacks should not be said for fbdev implementations on top of struct drm_client_funcs. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-24-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 45b64fd9f7ae2cce27f85f7f0a7b1fcdd08d06b4 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:45 2022 +0100 drm/fb-helper: Remove unnecessary include statements Remove include statements for where it is not required (i.e., most of them). In a few places include other header files that are required by the source code. v3: * fix amdgpu include statements * fix rockchip include statements Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-23-tzimmermann@suse.de drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 - drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + drivers/gpu/drm/arm/hdlcd_crtc.c | 1 - drivers/gpu/drm/ast/ast_drv.h | 1 - drivers/gpu/drm/bridge/tc358762.c | 2 +- drivers/gpu/drm/drm_crtc_helper.c | 1 - drivers/gpu/drm/drm_gem_framebuffer_helper.c | 1 - drivers/gpu/drm/drm_probe_helper.c | 1 - drivers/gpu/drm/etnaviv/etnaviv_drv.h | 3 ++- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 - drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 1 - drivers/gpu/drm/imx/imx-ldb.c | 2 +- drivers/gpu/drm/imx/imx-tve.c | 1 - drivers/gpu/drm/imx/parallel-display.c | 2 +- drivers/gpu/drm/kmb/kmb_plane.c | 1 - drivers/gpu/drm/mgag200/mgag200_drv.h | 1 - drivers/gpu/drm/qxl/qxl_drv.h | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 1 + drivers/gpu/drm/tidss/tidss_kms.c | 1 - drivers/gpu/drm/v3d/v3d_drv.c | 1 - drivers/gpu/drm/vboxvideo/vbox_main.c | 1 - drivers/gpu/drm/virtio/virtgpu_drv.h | 1 - drivers/gpu/drm/xen/xen_drm_front_gem.c | 1 - 31 files changed, 14 insertions(+), 24 deletions(-) commit 8ab59da26bc0ae0abfcaabc4218c74827d154256 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:44 2022 +0100 drm/fb-helper: Move generic fbdev emulation into separate source file Move the generic fbdev implementation into its own source and header file. Adapt drivers. No functional changes, but some of the internal helpers have been renamed to fit into the drm_fbdev_ naming scheme. v3: * rename drm_fbdev.{c,h} to drm_fbdev_generic.{c,h} * rebase onto vmwgfx changes * rebase onto xlnx changes * fix include statements in amdgpu Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-22-tzimmermann@suse.de drivers/gpu/drm/Makefile | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 2 +- drivers/gpu/drm/arm/hdlcd_drv.c | 2 +- drivers/gpu/drm/arm/malidp_drv.c | 2 +- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 2 +- drivers/gpu/drm/ast/ast_drv.c | 1 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +- drivers/gpu/drm/drm_fb_helper.c | 498 +----------------------- drivers/gpu/drm/drm_fbdev_generic.c | 493 +++++++++++++++++++++++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +- drivers/gpu/drm/gud/gud_drv.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 1 + drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 +- drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 2 +- drivers/gpu/drm/imx/dcss/dcss-kms.c | 2 +- drivers/gpu/drm/imx/imx-drm-core.c | 2 +- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 2 +- drivers/gpu/drm/kmb/kmb_drv.c | 2 +- drivers/gpu/drm/logicvc/logicvc_drm.c | 2 +- drivers/gpu/drm/mcde/mcde_drv.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +- drivers/gpu/drm/meson/meson_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.c | 1 + drivers/gpu/drm/mxsfb/lcdif_drv.c | 2 +- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 2 +- drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 2 +- drivers/gpu/drm/pl111/pl111_drv.c | 2 +- drivers/gpu/drm/qxl/qxl_drv.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 +- drivers/gpu/drm/solomon/ssd130x.c | 2 +- drivers/gpu/drm/sti/sti_drv.c | 2 +- drivers/gpu/drm/stm/drv.c | 2 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +- drivers/gpu/drm/tidss/tidss_drv.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- drivers/gpu/drm/tiny/arcpgu.c | 2 +- drivers/gpu/drm/tiny/bochs.c | 2 +- drivers/gpu/drm/tiny/cirrus.c | 2 +- drivers/gpu/drm/tiny/gm12u320.c | 2 +- drivers/gpu/drm/tiny/hx8357d.c | 2 +- drivers/gpu/drm/tiny/ili9163.c | 2 +- drivers/gpu/drm/tiny/ili9225.c | 2 +- drivers/gpu/drm/tiny/ili9341.c | 2 +- drivers/gpu/drm/tiny/ili9486.c | 2 +- drivers/gpu/drm/tiny/mi0283qt.c | 2 +- drivers/gpu/drm/tiny/ofdrm.c | 2 +- drivers/gpu/drm/tiny/panel-mipi-dbi.c | 2 +- drivers/gpu/drm/tiny/repaper.c | 2 +- drivers/gpu/drm/tiny/simpledrm.c | 2 +- drivers/gpu/drm/tiny/st7586.c | 2 +- drivers/gpu/drm/tiny/st7735r.c | 2 +- drivers/gpu/drm/tve200/tve200_drv.c | 2 +- drivers/gpu/drm/udl/udl_drv.c | 2 +- drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 +- drivers/gpu/drm/vc4/vc4_drv.c | 2 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 1 + drivers/gpu/drm/vkms/vkms_drv.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- drivers/gpu/drm/xlnx/zynqmp_kms.c | 2 +- include/drm/drm_fb_helper.h | 9 - include/drm/drm_fbdev_generic.h | 15 + 63 files changed, 571 insertions(+), 558 deletions(-) commit e7c5c29a9eb1c992c838ba43256fc2c55d930750 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:43 2022 +0100 drm/fb-helper: Set flag in struct drm_fb_helper for leaking physical addresses Uncouple the parameter drm_leak_fbdev_smem from the implementation by setting a flag in struct drm_fb_helper. This will help to move the generic fbdev emulation into its own source file, while keeping the parameter in drm_fb_helper.c. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-21-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 10 +++++++--- include/drm/drm_fb_helper.h | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) commit 7ce19535e9b49dd4c24c513ae857d0a8e08aca57 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:42 2022 +0100 drm/fb-helper: Always initialize generic fbdev emulation Initialize the generic fbdev emulation even if it has been disabled on the kernel command line. The hotplug and mode initialization will fail accordingly. The kernel parameter can still be changed at runtime and the emulation will initialize after hotplugging the connector. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-20-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 8 -------- 1 file changed, 8 deletions(-) commit 93e81e38e19760653e5241a8bbcaecd85207fde4 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:41 2022 +0100 drm/fb_helper: Minimize damage-helper overhead Pull the test for fb_dirty into the caller to avoid extra work if no callback has been set. In this case no damage handling is required and no damage area needs to be computed. Print a warning if the damage worker runs without getting an fb_dirty callback. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-19-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 90 +++++++++++++++++++++++++++-------------- 1 file changed, 60 insertions(+), 30 deletions(-) commit 983780918c759fdbbf0bf033e701bbff75d2af23 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:40 2022 +0100 drm/fb-helper: Perform all fbdev I/O with the same implementation Implement the fbdev's read/write helpers with the same functions. Use the generic fbdev's code as template. Convert all drivers. DRM's fb helpers must implement regular I/O functionality in struct fb_ops and possibly perform a damage update. Handle all this in the same functions and convert drivers. The functionality has been used as part of the generic fbdev code for some time. The drivers don't set struct drm_fb_helper.fb_dirty, so they will not be affected by damage handling. For I/O memory, fb helpers now provide drm_fb_helper_cfb_read() and drm_fb_helper_cfb_write(). Several drivers require these. Until now tegra used I/O read and write, although the memory buffer appears to be in system memory. So use _sys_ helpers now. v3: * fix docs (Javier) v2: * rebase onto vmwgfx changes Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-18-tzimmermann@suse.de drivers/gpu/drm/armada/armada_fbdev.c | 2 + drivers/gpu/drm/drm_fb_helper.c | 383 +++++++++++++++++------------ drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 + drivers/gpu/drm/gma500/framebuffer.c | 2 + drivers/gpu/drm/i915/display/intel_fbdev.c | 2 + drivers/gpu/drm/radeon/radeon_fb.c | 2 + drivers/gpu/drm/tegra/fb.c | 2 + include/drm/drm_fb_helper.h | 17 ++ 8 files changed, 254 insertions(+), 158 deletions(-) commit 3add5f97734d8cbb5e2035dca226f691eb2f12a2 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:39 2022 +0100 drm/fb-helper: Call fb_sync in I/O functions Call struct fb_ops.fb_sync in drm_fbdev_{read,write}() to mimic the behavior of fbdev. Fbdev implementations of fb_read and fb_write in struct fb_ops invoke fb_sync to synchronize with outstanding operations before I/O. Doing the same in DRM implementations will allow us to use them throughout DRM drivers. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-17-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f231af498c29f3acbd4436f67a8c7de8a428fb0f Author: Thomas Zimmermann Date: Thu Nov 3 16:14:38 2022 +0100 drm/fb-helper: Disconnect damage worker from update logic The fbdev helpers implement a damage worker that forwards fbdev updates to the DRM driver. The worker's update logic depends on the generic fbdev emulation. Separate the two via function pointer. The generic fbdev emulation sets struct drm_fb_helper_funcs.fb_dirty, a new callback that hides the update logic from the damage worker. It's not possible to use the generic logic with other fbdev emulation, because it contains additional code for the shadow buffering that the generic emulation employs. DRM drivers with internal fbdev emulation can set fb_dirty to their own implementation if they require damage handling; although no such drivers currently exist. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-16-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 75 +++++++++++++++++++++++++---------------- include/drm/drm_fb_helper.h | 15 +++++++++ 2 files changed, 61 insertions(+), 29 deletions(-) commit afb0ff78c13c5193be046b912bf6cbae85cdb7c7 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:37 2022 +0100 drm/fb-helper: Rename drm_fb_helper_unregister_fbi() to use _info postfix Rename drm_fb_helper_unregister_fbi() to drm_fb_helper_unregister_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-15-tzimmermann@suse.de drivers/gpu/drm/armada/armada_fbdev.c | 2 +- drivers/gpu/drm/drm_fb_helper.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/gma500/framebuffer.c | 2 +- drivers/gpu/drm/i915/display/intel_fbdev.c | 2 +- drivers/gpu/drm/msm/msm_fbdev.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- drivers/gpu/drm/radeon/radeon_fb.c | 2 +- drivers/gpu/drm/tegra/fb.c | 2 +- include/drm/drm_fb_helper.h | 4 ++-- 11 files changed, 15 insertions(+), 15 deletions(-) commit 7fd50bc39d126d172b4db1f024d7b12484aed0fb Author: Thomas Zimmermann Date: Thu Nov 3 16:14:36 2022 +0100 drm/fb-helper: Rename drm_fb_helper_alloc_fbi() to use _info postfix Rename drm_fb_helper_alloc_fbi() to drm_fb_helper_alloc_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-14-tzimmermann@suse.de drivers/gpu/drm/armada/armada_fbdev.c | 2 +- drivers/gpu/drm/drm_fb_helper.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/gma500/framebuffer.c | 2 +- drivers/gpu/drm/i915/display/intel_fbdev.c | 2 +- drivers/gpu/drm/msm/msm_fbdev.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- drivers/gpu/drm/radeon/radeon_fb.c | 2 +- drivers/gpu/drm/tegra/fb.c | 2 +- include/drm/drm_fb_helper.h | 4 ++-- 11 files changed, 15 insertions(+), 15 deletions(-) commit 9877d8f6bc374912b08dfe862cddbb78b395a5ef Author: Thomas Zimmermann Date: Thu Nov 3 16:14:35 2022 +0100 drm/fb_helper: Rename field fbdev to info in struct drm_fb_helper Rename struct drm_fb_helper.fbdev to info. The current name is misleading as it overlaps with generic fbdev naming conventions. Adapt to the usual naming in fbdev drivers by calling the field 'info'. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-13-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 40 +++++++++++++++--------------- drivers/gpu/drm/i915/display/intel_fbdev.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 23 ++++++++--------- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- drivers/gpu/drm/tegra/fb.c | 2 +- include/drm/drm_fb_helper.h | 4 +-- 6 files changed, 36 insertions(+), 37 deletions(-) commit 7e8c9ef572547f75712ac59a8ac1a394c771c332 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:34 2022 +0100 drm/fb-helper: Cleanup include statements in header file Only include what we have to. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-12-tzimmermann@suse.de include/drm/drm_fb_helper.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c91149417104306eb941ab2d57c0c1e24d39a2fa Author: Thomas Zimmermann Date: Thu Nov 3 16:14:33 2022 +0100 drm/tve200: Include Include for of_match_ptr(). Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-11-tzimmermann@suse.de drivers/gpu/drm/tve200/tve200_drv.c | 1 + 1 file changed, 1 insertion(+) commit eff0553db32af814db4896235a42c1e13dbf0c31 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:32 2022 +0100 drm/panel-ili9341: Include Include for devm_of_find_backlight(). Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-10-tzimmermann@suse.de drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 1 + 1 file changed, 1 insertion(+) commit f36787d1ec1d6abafca274ca4e9de6b21ae38911 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:31 2022 +0100 drm/rockchip: Don't set struct drm_driver.output_poll_changed Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as rockchip uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-9-tzimmermann@suse.de drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 -- 1 file changed, 2 deletions(-) commit fe5797144de093e3b9a56a237ee2460489934c1b Author: Thomas Zimmermann Date: Thu Nov 3 16:14:30 2022 +0100 drm/logicvc: Don't set struct drm_driver.output_poll_changed Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as logicvc uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-8-tzimmermann@suse.de drivers/gpu/drm/logicvc/logicvc_mode.c | 2 -- 1 file changed, 2 deletions(-) commit a8d9621b9fc67957b3de334cc1b5f47570fb90a0 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:29 2022 +0100 drm/ingenic: Don't set struct drm_driver.output_poll_changed Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as ingenic uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm_probe_helper.c. v2: * fix commit description (Christian, Sergey) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-7-tzimmermann@suse.de drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 1 - 1 file changed, 1 deletion(-) commit cbc5541f020ca178aa5cda4615ab36fba9109a9d Author: Thomas Zimmermann Date: Thu Nov 3 16:14:28 2022 +0100 drm/imx/dcss: Don't set struct drm_driver.output_poll_changed Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as DCSS uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-6-tzimmermann@suse.de drivers/gpu/drm/imx/dcss/dcss-kms.c | 1 - 1 file changed, 1 deletion(-) commit 0e3172bac3f43759719384403fe2d1e4c61f87e0 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:27 2022 +0100 drm/amdgpu: Don't set struct drm_driver.output_poll_changed Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as amdgpu uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-5-tzimmermann@suse.de drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 2 files changed, 3 deletions(-) commit 65795e273a8187060d1265dee214a6b2f84ef111 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:26 2022 +0100 drm/vboxvideo: Don't set struct drm_driver.lastclose Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as vboxvideo uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-4-tzimmermann@suse.de drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 -- 1 file changed, 2 deletions(-) commit 301b3c787a139d448b7bd63016d63959b7ecdb67 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:25 2022 +0100 drm/mcde: Don't set struct drm_driver.lastclose Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as mcde uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-3-tzimmermann@suse.de drivers/gpu/drm/mcde/mcde_drv.c | 1 - 1 file changed, 1 deletion(-) commit 2ad2f0d5afb371f8d9cba3d11472a4c5d8ab1c64 Author: Thomas Zimmermann Date: Thu Nov 3 16:14:24 2022 +0100 drm/komeda: Don't set struct drm_driver.lastclose Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as komeda uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-2-tzimmermann@suse.de drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 2 -- 1 file changed, 2 deletions(-) commit 8e4e4c2f53ffcb0ef746dc3b87ce1a57c5c94c7d Merge: a8300c46385e 60ba8c5bd94e Author: Thomas Zimmermann Date: Sat Nov 5 16:02:42 2022 +0100 Merge drm/drm-next into drm-misc-next Backmerging drm/drm-next to get the latest changes in the xlnx driver. Signed-off-by: Thomas Zimmermann commit 4fd5f70ce14da230c6a29648c3d51a48ee0b4bfd Author: Kees Cook Date: Tue Nov 1 10:25:07 2022 -0700 x86/Kconfig: Enable kernel IBT by default The kernel IBT defense strongly mitigates the common "first step" of ROP attacks, by eliminating arbitrary stack pivots (that appear either at the end of a function or in immediate values), which cannot be reached if indirect calls must be to marked function entry addresses. IBT is also required to be enabled to gain the FineIBT feature when built with Kernel Control Flow Integrity. Additionally, given that this feature is runtime enabled via CPU ID, it clearly should be built in by default; it will only be enabled if the CPU supports it. The build takes 2 seconds longer, which seems a small price to pay for gaining this coverage by default. Suggested-by: Sami Tolvanen Signed-off-by: Kees Cook Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221101172503.gonna.094-kees@kernel.org arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b32fd8a60f5d855758208c2b5b49cba8087f03c4 Author: Peter Zijlstra Date: Thu Nov 3 21:17:03 2022 +0100 x86,pm: Force out-of-line memcpy() GCC fancies inlining memcpy(), and because it cannot prove the destination is page-aligned (it is) it ends up generating atrocious code like: 19e: 48 8b 15 00 00 00 00 mov 0x0(%rip),%rdx # 1a5 1a1: R_X86_64_PC32 core_restore_code-0x4 1a5: 48 8d 78 08 lea 0x8(%rax),%rdi 1a9: 48 89 c1 mov %rax,%rcx 1ac: 48 c7 c6 00 00 00 00 mov $0x0,%rsi 1af: R_X86_64_32S core_restore_code 1b3: 48 83 e7 f8 and $0xfffffffffffffff8,%rdi 1b7: 48 29 f9 sub %rdi,%rcx 1ba: 48 89 10 mov %rdx,(%rax) 1bd: 48 8b 15 00 00 00 00 mov 0x0(%rip),%rdx # 1c4 1c0: R_X86_64_PC32 core_restore_code+0xff4 1c4: 48 29 ce sub %rcx,%rsi 1c7: 81 c1 00 10 00 00 add $0x1000,%ecx 1cd: 48 89 90 f8 0f 00 00 mov %rdx,0xff8(%rax) 1d4: c1 e9 03 shr $0x3,%ecx 1d7: f3 48 a5 rep movsq %ds:(%rsi),%es:(%rdi) Notably the alignment code generates a text reference to code_restore_code+0xff8, for which objtool raises the objection: vmlinux.o: warning: objtool: relocate_restore_code+0x3d: relocation to !ENDBR: next_arg+0x18 Applying some __assume_aligned(PAGE_SIZE) improve code-gen to: 19e: 48 89 c7 mov %rax,%rdi 1a1: 48 c7 c6 00 00 00 00 mov $0x0,%rsi 1a4: R_X86_64_32S core_restore_code 1a8: b9 00 02 00 00 mov $0x200,%ecx 1ad: f3 48 a5 rep movsq %ds:(%rsi),%es:(%rdi) And resolve the problem, however, none of this is important code and a much simpler solution still is to force a memcpy() call: 1a1: ba 00 10 00 00 mov $0x1000,%edx 1a6: 48 c7 c6 00 00 00 00 mov $0x0,%rsi 1a9: R_X86_64_32S core_restore_code 1ad: e8 00 00 00 00 call 1b2 1ae: R_X86_64_PLT32 __memcpy-0x4 Signed-off-by: Peter Zijlstra (Intel) arch/x86/power/hibernate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 023f2340f053537cce170c31c430b0886c6f07ca Author: Peter Zijlstra Date: Thu Nov 3 20:57:51 2022 +0100 objtool: Fix weak hole vs prefix symbol Boris (and the robot) reported that objtool grew a new complaint about unreachable instructions. Upon inspection it was immediately clear the __weak zombie instructions struck again. For the unweary, the linker will simply remove the symbol for overriden __weak symbols but leave the instructions in place, creating unreachable instructions -- and objtool likes to report these. Commit 4adb23686795 ("objtool: Ignore extra-symbol code") was supposed to have dealt with that, but the new commit 9f2899fe36a6 ("objtool: Add option to generate prefix symbols") subtly broke that logic by created unvisited symbols. Fixes: 9f2899fe36a6 ("objtool: Add option to generate prefix symbols") Reported-by: Borislav Petkov Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) tools/objtool/check.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 19526717f768bf2f89ca01bd2a595728ebe57540 Author: Peter Zijlstra Date: Wed Nov 2 22:31:19 2022 +0100 objtool: Optimize elf_dirty_reloc_sym() When moving a symbol in the symtab its index changes and any reloc referring that symtol-table-index will need to be rewritten too. In order to facilitate this, objtool simply marks the whole reloc section 'changed' which will cause the whole section to be re-generated. However, finding the relocs that use any given symbol is implemented rather crudely -- a fully iteration of all sections and their relocs. Given that some builds have over 20k sections (kallsyms etc..) iterating all that for *each* symbol moved takes a bit of time. Instead have each symbol keep a list of relocs that reference it. This *vastly* improves build times for certain configs. Reported-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/Y2LlRA7x+8UsE1xf@hirez.programming.kicks-ass.net tools/objtool/elf.c | 27 ++++++++++----------------- tools/objtool/include/objtool/elf.h | 2 ++ 2 files changed, 12 insertions(+), 17 deletions(-) commit 32fb07f35675c4c3311ae370471ee1ae6cc3e694 Author: Justin Chen Date: Wed Oct 5 14:30:13 2022 -0700 phy: usb: Improve port mode selection Split port modes into two different variables. Supported port modes is what the hardware supports. While port mode is how the hardware is currently configured and can be dynamically changed through the sysfs. We initialize all supported port modes on init even though the port mode may not be selected because we cannot guarantee the downstream interface from the phy will be active or not. This also fixes an issue where port modes selected via sysfs were not being saved through suspend/resume. Signed-off-by: Justin Chen Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/1665005418-15807-2-git-send-email-justinpopo6@gmail.com Signed-off-by: Vinod Koul drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c | 12 ++++++------ drivers/phy/broadcom/phy-brcm-usb-init.c | 10 +++++----- drivers/phy/broadcom/phy-brcm-usb-init.h | 10 +++++----- drivers/phy/broadcom/phy-brcm-usb.c | 14 +++++++++----- 4 files changed, 25 insertions(+), 21 deletions(-) commit c0a6c25283672facaa57cb3daad71c6586736312 Author: Johan Hovold Date: Fri Oct 28 18:04:35 2022 +0200 phy: qcom-qmp-usb: add support for updated sc8280xp binding Add support for the new SC8280XP binding. Note that the binding does not try to describe every register subregion and instead the driver holds the corresponding offsets. This includes the PCS_USB region which was initially overlooked. Note that the driver will no longer accept the old binding due to the fixed "phy_phy" reset name. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-14-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 82 +++++++++++++++++++++++++++------ 1 file changed, 67 insertions(+), 15 deletions(-) commit 183462e8c92cce5cbfabecc1719fb61c61b70833 Author: Johan Hovold Date: Fri Oct 28 18:04:34 2022 +0200 phy: qcom-qmp-usb: restructure PHY creation In preparation for supporting devicetree bindings which do not use a child node, move the PHY creation to probe() proper and parse the serdes and dp_com resources in what is now the legacy devicetree helper. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-13-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 46 ++++++++++++++++----------------- 1 file changed, 22 insertions(+), 24 deletions(-) commit e8e58e29a0c9310a917448d0c4a1857f0dbfd917 Author: Johan Hovold Date: Fri Oct 28 18:04:33 2022 +0200 dt-bindings: phy: qcom,qmp-usb: fix sc8280xp binding The current QMP USB PHY bindings are based on the original MSM8996 PCIe PHY binding which provided multiple PHYs per IP block and these in turn were described by child nodes. The QMP USB PHY block only provide a single PHY and the remnant child node does not really reflect the hardware. The original MSM8996 binding also ended up describing the individual register blocks as belonging to either the wrapper node or the PHY child nodes. This is an unnecessary level of detail which has lead to problems when later IP blocks using different register layouts have been forced to fit the original mould rather than updating the binding. The bindings are arguable also incomplete as they only the describe register blocks used by the current Linux drivers (e.g. does not include the per lane PCS registers). Note that PCS_USB region is also not described by the current bindings despite being used by the driver and this has led to people increasing the size of the PCS region in the devicetree so that it includes PCS_USB registers even though other regions like TX and RX may lie in between. Add a new binding for the QMP USB PHYs found on SC8280XP which further bindings can be based on. Note that this also fixes the SC8280XP "phy_phy" reset name. Also note that the current binding is simply removed instead of being deprecated as it was only recently merged and support for SC8280XP is still under development. And, specifically, there is no support in mainline for the multiport controller that uses these PHYs. Signed-off-by: Johan Hovold Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221028160435.26948-12-johan+linaro@kernel.org Signed-off-by: Vinod Koul .../bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml | 13 --- .../phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 105 +++++++++++++++++++++ 2 files changed, 105 insertions(+), 13 deletions(-) commit 500e9d37fb9ead52498af1b035933c62a487efe8 Author: Johan Hovold Date: Fri Oct 28 18:04:32 2022 +0200 dt-bindings: phy: qcom,qmp-usb: rename current bindings The current QMP USB PHY bindings are based on the original MSM8996 binding which provided multiple PHYs per IP block and these in turn were described by child nodes. Later QMP USB PHY blocks only provide a single PHY and the remnant child node does not really reflect the hardware. The original MSM8996 binding also ended up describing the individual register blocks as belonging to either the wrapper node or the PHY child nodes. This is an unnecessary level of detail which has lead to problems when later IP blocks using different register layouts have been forced to fit the original mould rather than updating the binding. The bindings are arguable also incomplete as they only the describe register blocks used by the current Linux drivers (e.g. does not include the per lane PCS registers). In preparation for adding new bindings for SC8280XP which further bindings can be based on, rename the current bindings after MSM8996 and add a reference to the SC8280XP bindings. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-11-johan+linaro@kernel.org Signed-off-by: Vinod Koul .../phy/{qcom,qmp-usb-phy.yaml => qcom,msm8996-qmp-usb3-phy.yaml} | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 876420fb7b98934a4f78d8976c7ff095a13c90b5 Author: Johan Hovold Date: Fri Oct 28 18:04:31 2022 +0200 phy: qcom-qmp-usb: clean up PHY init Clean up the PHY initialisation somewhat by programming both tx and rx for the second lane after the first lane. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8fe2b2b745a123640ead94743cf28c380fec9b58 Author: Johan Hovold Date: Fri Oct 28 18:04:30 2022 +0200 phy: qcom-qmp-usb: rename PHY ops structure Rename the PHY operation structure so that it has a "phy_ops" suffix and move it next to the implementation. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-9-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 413db06c05e729639e9b64cf7ab5d918b8182006 Author: Johan Hovold Date: Fri Oct 28 18:04:29 2022 +0200 phy: qcom-qmp-usb: clean up probe initialisation Stop abusing the driver data pointer and instead pass the driver state structure directly to the initialisation helpers during probe. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-8-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 46 ++++++++++++++++----------------- 1 file changed, 22 insertions(+), 24 deletions(-) commit 8ec02ba8493639c721fc63ed05c06891061ef9b5 Author: Johan Hovold Date: Fri Oct 28 18:04:28 2022 +0200 phy: qcom-qmp-usb: clean up device-tree parsing Since the QMP driver split there will be at most a single child node so drop the obsolete iteration construct. While at it, drop the verbose error logging that would have been printed also on probe deferrals. Note that there's no need to check if there are additional child nodes (the kernel is not a devicetree validator), but let's return an error if there are no child nodes at all for now. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 40 ++++++++++----------------------- 1 file changed, 12 insertions(+), 28 deletions(-) commit 2a55ec4f0a048e0aa12022b52009d8d8667ee3d3 Author: Johan Hovold Date: Fri Oct 28 18:04:27 2022 +0200 phy: qcom-qmp-usb: merge driver data The USB QMP PHY driver only manages a single PHY so merge the old qcom_qmp and qmp_phy structures and drop the PHY array. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 239 +++++++++++++------------------- 1 file changed, 96 insertions(+), 143 deletions(-) commit 9c9beef111a763513545a0ac0c60220fea64b063 Author: Johan Hovold Date: Fri Oct 28 18:04:26 2022 +0200 phy: qcom-qmp-usb: move pm ops Move the PM ops structure next to the implementation to keep the driver callbacks grouped. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-5-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 95dd63b8988cd914c8b5e805e5599cda2cad161e Author: Johan Hovold Date: Fri Oct 28 18:04:25 2022 +0200 phy: qcom-qmp-usb: move device-id table Move the device-id table below probe() and next to the driver structure to keep the driver callback functions grouped together. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 126 ++++++++++++++++---------------- 1 file changed, 63 insertions(+), 63 deletions(-) commit 9fe6b4e87c225cfd8aad1be0e73be86611c35b01 Author: Johan Hovold Date: Fri Oct 28 18:04:24 2022 +0200 phy: qcom-qmp-usb: sort device-id table Sort the device-id table by compatible string to make it easier to find and add new entries. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 4c6b3af3906d0c59497d3bfb07760f3a082b4150 Author: Johan Hovold Date: Fri Oct 28 18:04:23 2022 +0200 phy: qcom-qmp-usb: fix sc8280xp PCS_USB offset The PCS_USB register block lives at an offset of 0x1000 from the PCS region on SC8280XP so add the missing offset to avoid corrupting unrelated registers on runtime suspend. Note that the current binding is broken as it does not describe the PCS_USB region and the PCS register size does not cover PCS_USB and the regions in between. As Linux currently maps full pages, simply adding the offset to driver works until the binding has been fixed. Fixes: c0c7769cdae2 ("phy: qcom-qmp: Add SC8280XP USB3 UNI phy") Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221028160435.26948-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 1 + 1 file changed, 1 insertion(+) commit b10b9c342f7571f287fd422be5d5c0beb26ba974 Author: Paul Moore Date: Mon Oct 10 12:31:21 2022 -0400 lsm: make security_socket_getpeersec_stream() sockptr_t safe Commit 4ff09db1b79b ("bpf: net: Change sk_getsockopt() to take the sockptr_t argument") made it possible to call sk_getsockopt() with both user and kernel address space buffers through the use of the sockptr_t type. Unfortunately at the time of conversion the security_socket_getpeersec_stream() LSM hook was written to only accept userspace buffers, and in a desire to avoid having to change the LSM hook the commit author simply passed the sockptr_t's userspace buffer pointer. Since the only sk_getsockopt() callers at the time of conversion which used kernel sockptr_t buffers did not allow SO_PEERSEC, and hence the security_socket_getpeersec_stream() hook, this was acceptable but also very fragile as future changes presented the possibility of silently passing kernel space pointers to the LSM hook. There are several ways to protect against this, including careful code review of future commits, but since relying on code review to catch bugs is a recipe for disaster and the upstream eBPF maintainer is "strongly against defensive programming", this patch updates the LSM hook, and all of the implementations to support sockptr_t and safely handle both user and kernel space buffers. Acked-by: Casey Schaufler Acked-by: John Johansen Signed-off-by: Paul Moore include/linux/lsm_hook_defs.h | 2 +- include/linux/lsm_hooks.h | 4 ++-- include/linux/security.h | 11 +++++++---- net/core/sock.c | 3 ++- security/apparmor/lsm.c | 29 +++++++++++++---------------- security/security.c | 6 +++--- security/selinux/hooks.c | 13 ++++++------- security/smack/smack_lsm.c | 19 ++++++++++--------- 8 files changed, 44 insertions(+), 43 deletions(-) commit 63d9e12914840400e9f96c2ae9a51cd9702c2daf Author: Veerasenareddy Burru Date: Wed Nov 2 23:05:57 2022 -0700 octeon_ep: support Octeon device CNF95N Add support for Octeon device CNF95N. CNF95N is a Octeon Fusion family product with same PCI NIC characteristics as CN93 which is currently supported by the driver. update supported device list in Documentation. Signed-off-by: Veerasenareddy Burru Link: https://lore.kernel.org/r/20221103060600.1858-1-vburru@marvell.com Signed-off-by: Jakub Kicinski .../device_drivers/ethernet/marvell/octeon_ep.rst | 1 + drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 20 +++++++++++++++++--- drivers/net/ethernet/marvell/octeon_ep/octep_main.h | 2 ++ 3 files changed, 20 insertions(+), 3 deletions(-) commit bcc8f44acac1f5c0cc80abe5658857903a6bb68b Merge: 8e0aa1ff44ca 5d1d24da00db Author: Jakub Kicinski Date: Fri Nov 4 19:54:29 2022 -0700 Merge branch 'sfc-add-basic-flower-matches-to-offload' Edward Cree says: ==================== sfc: add basic flower matches to offload Support offloading TC flower rules with matches on L2-L4 fields. ==================== Link: https://lore.kernel.org/r/cover.1667412458.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit 5d1d24da00dba75f94f1640717b3fd2a243e4b5f Author: Edward Cree Date: Thu Nov 3 15:27:31 2022 +0000 sfc: add Layer 4 matches to ef100 TC offload Support matching on UDP/TCP source and destination ports and TCP flags, with masking if supported by the hardware. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/mae.c | 15 +++++++++++++++ drivers/net/ethernet/sfc/tc.c | 21 +++++++++++++++++++-- drivers/net/ethernet/sfc/tc.h | 3 +++ 3 files changed, 37 insertions(+), 2 deletions(-) commit 5ca7ef293866f034c9a21a567a498dadfd1d57a8 Author: Edward Cree Date: Thu Nov 3 15:27:30 2022 +0000 sfc: add Layer 3 flag matches to ef100 TC offload Support matching on ip_frag and ip_firstfrag. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/mae.c | 25 +++++++++++++++++++++++++ drivers/net/ethernet/sfc/tc.c | 10 +++++++++- drivers/net/ethernet/sfc/tc.h | 1 + 3 files changed, 35 insertions(+), 1 deletion(-) commit c178dff3f92d4416b43f3a376174357549a0d347 Author: Edward Cree Date: Thu Nov 3 15:27:29 2022 +0000 sfc: add Layer 3 matches to ef100 TC offload Support matching on IP protocol, Type of Service, Time To Live, source and destination addresses, with masking if supported by the hardware. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/mae.c | 39 ++++++++++++++++++++++++++++ drivers/net/ethernet/sfc/mcdi.h | 6 +++++ drivers/net/ethernet/sfc/tc.c | 56 ++++++++++++++++++++++++++++++++++------- drivers/net/ethernet/sfc/tc.h | 8 ++++++ 4 files changed, 100 insertions(+), 9 deletions(-) commit 6d1c604d1098d5c1d355950989945941fa3b315e Author: Edward Cree Date: Thu Nov 3 15:27:28 2022 +0000 sfc: add Layer 2 matches to ef100 TC offload Support matching on EtherType, VLANs and ethernet source/destination addresses, with masking if supported by the hardware. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/mae.c | 37 +++++++++++++++++++++++- drivers/net/ethernet/sfc/mcdi.h | 6 ++++ drivers/net/ethernet/sfc/tc.c | 62 +++++++++++++++++++++++++++++++++++++---- drivers/net/ethernet/sfc/tc.h | 4 +++ 4 files changed, 103 insertions(+), 6 deletions(-) commit f0b59ad11e29fa45beab7a14370f530f90aa764c Author: Edward Cree Date: Thu Nov 3 15:27:27 2022 +0000 sfc: check recirc_id match caps before MAE offload Offloaded TC rules always match on recirc_id in the MAE, so we should check that the MAE reported support for this match before attempting to insert the rule. These checks allow us to fail early, avoiding the PCIe round-trip to firmware for an MC_CMD_MAE_ACTION_RULE_INSERT that will only fail, and more importantly providing a more informative error message that identifies which match field is unsupported. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/mae.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 8e0aa1ff44ca30b0b9df95dfa72003522d9a088d Author: Nathan Chancellor Date: Thu Nov 3 15:00:32 2022 -0700 net: ethernet: renesas: Fix return type of rswitch_start_xmit() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/net/ethernet/renesas/rswitch.c:1533:20: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = rswitch_start_xmit, ^~~~~~~~~~~~~~~~~~ 1 error generated. ->ndo_start_xmit() in 'struct net_device_ops' expects a return type of 'netdev_tx_t', not 'int'. Adjust the return type of rswitch_start_xmit() to match the prototype's to resolve the warning and CFI failure. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Signed-off-by: Nathan Chancellor Reviewed-by: Yoshihiro Shimoda Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20221103220032.2142122-1-nathan@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/renesas/rswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 552acbf576fb7cb7ec70e978ca148dfbdae12a0e Author: Zhengchao Shao Date: Fri Nov 4 10:25:13 2022 +0800 net: remove redundant check in ip_metrics_convert() Now ip_metrics_convert() is only called by ip_fib_metrics_init(). Before ip_fib_metrics_init() invokes ip_metrics_convert(), it checks whether input parameter fc_mx is NULL. Therefore, ip_metrics_convert() doesn't need to check fc_mx. Signed-off-by: Zhengchao Shao Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20221104022513.168868-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski net/ipv4/metrics.c | 3 --- 1 file changed, 3 deletions(-) commit 25906092edb4bcf94cb669bd1ed03a0ef2f4120c Author: Bagas Sanjaya Date: Fri Nov 4 19:39:14 2022 +0700 Documentation: bpf: Escape underscore in BPF type name prefix Sphinx reported unknown target warning: Documentation/bpf/bpf_design_QA.rst:329: WARNING: Unknown target name: "bpf". The warning is caused by BPF type name prefix ("bpf_") which is written without escaping the trailing underscore. Escape the underscore to fix the warning. While at it, wrap the containing paragraph in less than 80 characters. Fixes: 9805af8d8a5b17 ("bpf: Document UAPI details for special BPF types") Signed-off-by: Bagas Sanjaya Signed-off-by: Andrii Nakryiko Acked-by: KP Singh Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20221104123913.50610-1-bagasdotme@gmail.com Documentation/bpf/bpf_design_QA.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 61fc5e66f755db24d27ba37ce1ee4873def1a074 Author: Artem Savkov Date: Fri Nov 4 10:40:16 2022 +0100 selftests/bpf: Use consistent build-id type for liburandom_read.so lld produces "fast" style build-ids by default, which is inconsistent with ld's "sha1" style. Explicitly specify build-id style to be "sha1" when linking liburandom_read.so the same way it is already done for urandom_read. Signed-off-by: Artem Savkov Signed-off-by: Andrii Nakryiko Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20221104094016.102049-1-asavkov@redhat.com tools/testing/selftests/bpf/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b3c09fdca1135167bd0682128cd51864c5aa5625 Author: Rong Tao Date: Fri Nov 4 09:27:54 2022 +0800 selftests/bpf: cgroup_helpers.c: Fix strncpy() fortify warning Copy libbpf_strlcpy() from libbpf_internal.h to bpf_util.h, and rename it to bpf_strlcpy(), then replace selftests strncpy()/libbpf_strlcpy() with bpf_strlcpy(), fix compile warning. The libbpf_internal.h header cannot be used directly here, because references to cgroup_helpers.c in samples/bpf will generate compilation errors. We also can't add libbpf_strlcpy() directly to bpf_util.h, because the definition of libbpf_strlcpy() in libbpf_internal.h is duplicated. In order not to modify the libbpf code, add a new function bpf_strlcpy() to selftests bpf_util.h. How to reproduce this compilation warning: $ make -C samples/bpf cgroup_helpers.c: In function ‘__enable_controllers’: cgroup_helpers.c:80:17: warning: ‘strncpy’ specified bound 4097 equals destination size [-Wstringop-truncation] 80 | strncpy(enable, controllers, sizeof(enable)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Rong Tao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/tencent_469D8AF32BD56816A29981BED06E96D22506@qq.com tools/testing/selftests/bpf/bpf_util.h | 19 +++++++++++++++++++ tools/testing/selftests/bpf/cgroup_helpers.c | 3 ++- tools/testing/selftests/bpf/xsk.c | 26 ++++---------------------- 3 files changed, 25 insertions(+), 23 deletions(-) commit 16a7fe3728a8b832ef0d1add66875a666b1f24fc Author: Kai Huang Date: Tue Nov 1 15:24:22 2022 +1300 KVM/VMX: Allow exposing EDECCSSA user leaf function to KVM guest The new Asynchronous Exit (AEX) notification mechanism (AEX-notify) allows one enclave to receive a notification in the ERESUME after the enclave exit due to an AEX. EDECCSSA is a new SGX user leaf function (ENCLU[EDECCSSA]) to facilitate the AEX notification handling. The new EDECCSSA is enumerated via CPUID(EAX=0x12,ECX=0x0):EAX[11]. Besides Allowing reporting the new AEX-notify attribute to KVM guests, also allow reporting the new EDECCSSA user leaf function to KVM guests so the guest can fully utilize the AEX-notify mechanism. Similar to existing X86_FEATURE_SGX1 and X86_FEATURE_SGX2, introduce a new scattered X86_FEATURE_SGX_EDECCSSA bit for the new EDECCSSA, and report it in KVM's supported CPUIDs. Note, no additional KVM enabling is required to allow the guest to use EDECCSSA. It's impossible to trap ENCLU (without completely preventing the guest from using SGX). Advertise EDECCSSA as supported purely so that userspace doesn't need to special case EDECCSSA, i.e. doesn't need to manually check host CPUID. The inability to trap ENCLU also means that KVM can't prevent the guest from using EDECCSSA, but that virtualization hole is benign as far as KVM is concerned. EDECCSSA is simply a fancy way to modify internal enclave state. More background about how do AEX-notify and EDECCSSA work: SGX maintains a Current State Save Area Frame (CSSA) for each enclave thread. When AEX happens, the enclave thread context is saved to the CSSA and the CSSA is increased by 1. For a normal ERESUME which doesn't deliver AEX notification, it restores the saved thread context from the previously saved SSA and decreases the CSSA. If AEX-notify is enabled for one enclave, the ERESUME acts differently. Instead of restoring the saved thread context and decreasing the CSSA, it acts like EENTER which doesn't decrease the CSSA but establishes a clean slate thread context using the CSSA for the enclave to handle the notification. After some handling, the enclave must discard the "new-established" SSA and switch back to the previously saved SSA (upon AEX). Otherwise, the enclave will run out of SSA space upon further AEXs and eventually fail to run. To solve this problem, the new EDECCSSA essentially decreases the CSSA. It can be used by the enclave notification handler to switch back to the previous saved SSA when needed, i.e. after it handles the notification. Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Acked-by: Sean Christopherson Acked-by: Jarkko Sakkinen Link: https://lore.kernel.org/all/20221101022422.858944-1-kai.huang%40intel.com arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/cpuid-deps.c | 1 + arch/x86/kernel/cpu/scattered.c | 1 + arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/reverse_cpuid.h | 3 +++ 5 files changed, 7 insertions(+), 1 deletion(-) commit 370839c241f7b98c66063c2892795a37ee3d2771 Author: Dave Hansen Date: Wed Jul 20 12:13:47 2022 -0700 x86/sgx: Allow enclaves to use Asynchrounous Exit Notification Short Version: Allow enclaves to use the new Asynchronous EXit (AEX) notification mechanism. This mechanism lets enclaves run a handler after an AEX event. These handlers can run mitigations for things like SGX-Step[1]. AEX Notify will be made available both on upcoming processors and on some older processors through microcode updates. Long Version: == SGX Attribute Background == The SGX architecture includes a list of SGX "attributes". These attributes ensure consistency and transparency around specific enclave features. As a simple example, the "DEBUG" attribute allows an enclave to be debugged, but also destroys virtually all of SGX security. Using attributes, enclaves can know that they are being debugged. Attributes also affect enclave attestation so an enclave can, for instance, be denied access to secrets while it is being debugged. The kernel keeps a list of known attributes and will only initialize enclaves that use a known set of attributes. This kernel policy eliminates the chance that a new SGX attribute could cause undesired effects. For example, imagine a new attribute was added called "PROVISIONKEY2" that provided similar functionality to "PROVISIIONKEY". A kernel policy that allowed indiscriminate use of unknown attributes and thus PROVISIONKEY2 would undermine the existing kernel policy which limits use of PROVISIONKEY enclaves. == AEX Notify Background == "Intel Architecture Instruction Set Extensions and Future Features - Version 45" is out[2]. There is a new chapter: Asynchronous Enclave Exit Notify and the EDECCSSA User Leaf Function. Enclaves exit can be either synchronous and consensual (EEXIT for instance) or asynchronous (on an interrupt or fault). The asynchronous ones can evidently be exploited to single step enclaves[1], on top of which other naughty things can be built. AEX Notify will be made available both on upcoming processors and on some older processors through microcode updates. == The Problem == These attacks are currently entirely opaque to the enclave since the hardware does the save/restore under the covers. The Asynchronous Enclave Exit Notify (AEX Notify) mechanism provides enclaves an ability to detect and mitigate potential exposure to these kinds of attacks. == The Solution == Define the new attribute value for AEX Notification. Ensure the attribute is cleared from the list reserved attributes. Instead of adding to the open-coded lists of individual attributes, add named lists of privileged (disallowed by default) and unprivileged (allowed by default) attributes. Add the AEX notify attribute as an unprivileged attribute, which will keep the kernel from rejecting enclaves with it set. 1. https://github.com/jovanbulck/sgx-step 2. https://cdrdv2.intel.com/v1/dl/getContent/671368?explicitVersion=true Signed-off-by: Dave Hansen Acked-by: Jarkko Sakkinen Tested-by: Haitao Huang Tested-by: Kai Huang Link: https://lore.kernel.org/all/20220720191347.1343986-1-dave.hansen%40linux.intel.com arch/x86/include/asm/sgx.h | 33 ++++++++++++++++++++++++++------- arch/x86/kernel/cpu/sgx/ioctl.c | 2 +- arch/x86/kvm/cpuid.c | 4 +--- 3 files changed, 28 insertions(+), 11 deletions(-) commit 1baa7e38002111aee62b489ac343960ae75ce2e9 Author: Rong Tao Date: Sat Oct 29 17:11:13 2022 +0800 samples/bpf: Fix tracex2 error: No such file or directory since commit c504e5c2f964("net: skb: introduce kfree_skb_reason()") kfree_skb() is replaced by kfree_skb_reason() and kfree_skb() is set to the inline function. So, we replace kprobe/kfree_skb with kprobe/kfree_skb_reason to solve the tracex2 error. $ cd samples/bpf $ sudo ./tracex2 libbpf: prog 'bpf_prog2': failed to create kprobe 'kfree_skb+0x0' perf event: No such file or directory ERROR: bpf_program__attach failed Signed-off-by: Rong Tao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/tencent_0F0DAE84C0B3C42E0B550E5E9F47A9114D09@qq.com samples/bpf/tracex2_kern.c | 4 ++-- samples/bpf/tracex2_user.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit 178b8a3668bd63b40303d9dcb17ad58cf4b44007 Author: John Harrison Date: Wed Nov 2 12:21:09 2022 -0700 drm/i915/guc: Don't deadlock busyness stats vs reset The engine busyness stats has a worker function to do things like 64bit extend the 32bit hardware counters. The GuC's reset prepare function flushes out this worker function to ensure no corruption happens during the reset. Unforunately, the worker function has an infinite wait for active resets to finish before doing its work. Thus a deadlock would occur if the worker function had actually started just as the reset starts. The function being used to lock the reset-in-progress mutex is called intel_gt_reset_trylock(). However, as noted it does not follow standard 'trylock' conventions and exit if already locked. So rename the current _trylock function to intel_gt_reset_lock_interruptible(), which is the behaviour it actually provides. In addition, add a new implementation of _trylock and call that from the busyness stats worker instead. v2: Rename existing trylock to interruptible rather than trying to preserve the existing (confusing) naming scheme (review comments from Tvrtko). Signed-off-by: John Harrison Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20221102192109.2492625-3-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +- drivers/gpu/drm/i915/gt/intel_reset.c | 18 ++++++++++++++++-- drivers/gpu/drm/i915/gt/intel_reset.h | 1 + drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 +++- 4 files changed, 21 insertions(+), 4 deletions(-) commit de51de9672a17e242ebe3727b5e6ec0f2b4c1ab4 Author: John Harrison Date: Wed Nov 2 12:21:08 2022 -0700 drm/i915/guc: Properly initialise kernel contexts If a context has already been registered prior to first submission then context init code was not being called. The noticeable effect of that was the scheduling priority was left at zero (meaning super high priority) instead of being set to normal. This would occur with kernel contexts at start of day as they are manually pinned up front rather than on first submission. So add a call to initialise those when they are pinned. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221102192109.2492625-2-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 3 +++ 1 file changed, 3 insertions(+) commit 2e20f50ff84903964bcfca10ecdab0fa08cd6a4c Author: Eduard Zingerman Date: Wed Nov 2 01:54:13 2022 +0200 selftests/bpf: Tests for enum fwd resolved as full enum64 A set of test cases to verify enum fwd resolution logic: - verify that enum fwd can be resolved as full enum64; - verify that enum64 fwd can be resolved as full enum; - verify that enum size is considered when enums are compared for equivalence. Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221101235413.1824260-2-eddyz87@gmail.com tools/testing/selftests/bpf/prog_tests/btf.c | 88 ++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 5 deletions(-) commit de048b6ee86597c6079a5ed3a1cca996089a83d3 Author: Eduard Zingerman Date: Wed Nov 2 01:54:12 2022 +0200 libbpf: Resolve enum fwd as full enum64 and vice versa Changes de-duplication logic for enums in the following way: - update btf_hash_enum to ignore size and kind fields to get ENUM and ENUM64 types in a same hash bucket; - update btf_compat_enum to consider enum fwd to be compatible with full enum64 (and vice versa); This allows BTF de-duplication in the following case: // CU #1 enum foo; struct s { enum foo *a; } *x; // CU #2 enum foo { x = 0xfffffffff // big enough to force enum64 }; struct s { enum foo *a; } *y; De-duplicated BTF prior to this commit: [1] ENUM64 'foo' encoding=UNSIGNED size=8 vlen=1 'x' val=68719476735ULL [2] INT 'long unsigned int' size=8 bits_offset=0 nr_bits=64 encoding=(none) [3] STRUCT 's' size=8 vlen=1 'a' type_id=4 bits_offset=0 [4] PTR '(anon)' type_id=1 [5] PTR '(anon)' type_id=3 [6] STRUCT 's' size=8 vlen=1 'a' type_id=8 bits_offset=0 [7] ENUM 'foo' encoding=UNSIGNED size=4 vlen=0 [8] PTR '(anon)' type_id=7 [9] PTR '(anon)' type_id=6 De-duplicated BTF after this commit: [1] ENUM64 'foo' encoding=UNSIGNED size=8 vlen=1 'x' val=68719476735ULL [2] INT 'long unsigned int' size=8 bits_offset=0 nr_bits=64 encoding=(none) [3] STRUCT 's' size=8 vlen=1 'a' type_id=4 bits_offset=0 [4] PTR '(anon)' type_id=1 [5] PTR '(anon)' type_id=3 Enum forward declarations in C do not provide information about enumeration values range. Thus the `btf_type->size` field is meaningless for forward enum declarations. In fact, GCC does not encode size in DWARF for forward enum declarations (but dwarves sets enumeration size to a default value of `sizeof(int) * 8` when size is not specified see dwarf_loader.c:die__create_new_enumeration). Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221101235413.1824260-1-eddyz87@gmail.com tools/lib/bpf/btf.c | 75 ++++++++++++++++++----------------------------------- 1 file changed, 25 insertions(+), 50 deletions(-) commit fcf00f8d29f2fc6bf00531a1447be28b99073cc3 Author: Xiaogang Chen Date: Fri Oct 28 19:13:31 2022 -0500 drm/amdkfd: Remove skiping userptr buffer mapping when mmu notifier marks it as invalid mmu notifier does not always hold mm->sem during call back. That causes a race condition between kfd userprt buffer mapping and mmu notifier which leds to gpu shadder or SDMA access userptr buffer before it has been mapped to gpu VM. Always map userptr buffer to avoid that though it may make some userprt buffers mapped two times. Suggested-by: Felix Kuehling Signed-off-by: Xiaogang Chen Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 10 ---------- 1 file changed, 10 deletions(-) commit 79b72db63392d35a4dbcd4743b95cb668691f790 Author: Ao Zhong Date: Mon Oct 31 20:37:40 2022 +0100 drm/amd/display: add DCN support for ARM64 After moving all FPU code to the DML folder, we can enable DCN support for the ARM64 platform. Remove the -mgeneral-regs-only CFLAG from the code in the DML folder that needs to use hardware FPU, and add a control mechanism for ARM Neon. Reviewed-by: Rodrigo Siqueira Signed-off-by: Ao Zhong Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 3 ++- drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/dml/Makefile | 20 ++++++++++++++++---- 3 files changed, 24 insertions(+), 5 deletions(-) commit ec4927d463cbf385be212af1ade9f5a6f1474d4f Author: Victor Zhao Date: Wed Oct 26 11:48:50 2022 +0800 drm/amdgpu: fix for suspend/resume sequence under sriov - clear kiq ring after suspend/resume under sriov to aviod kiq ring test failure - update irq after resume to fix kiq interrput loss Signed-off-by: Victor Zhao Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 ++ 5 files changed, 10 insertions(+) commit 5cefe31b2a34005c83ff45834e21a0578defcbe4 Author: Kenneth Feng Date: Thu Nov 3 11:36:27 2022 +0800 drm/amd/amdgpu: temporary workaround to skip ras error for gc_v11_0_3 temporary workaround to skip ras error for gc_v11_0_3 until IFWI release later Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c0cc999f3c32e65a7c88fb323893ddf897b24488 Author: Ma Jun Date: Wed Nov 2 15:53:26 2022 +0800 drm/amdkfd: Fix the warning of array-index-out-of-bounds For some GPUs with more CUs, the original sibling_map[32] in struct crat_subtype_cache is not enough to save the cache information when create the VCRAT table, so skip filling the struct crat_subtype_cache info instead fill struct kfd_cache_properties directly to fix this problem. Signed-off-by: Ma Jun Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 312 ++++-------------------------- drivers/gpu/drm/amd/amdkfd/kfd_crat.h | 12 ++ drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 245 +++++++++++++++++++++-- drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 5 +- 4 files changed, 282 insertions(+), 292 deletions(-) commit cfa61b8f9e9e5e14e7a79f3e9454feb8e4690f99 Author: Hawking Zhang Date: Mon Oct 25 17:23:38 2021 +0800 drm/amdgpu: switch to select_se_sh wrapper for gfx v9_0 To allow invoking ip specific callbacks Acked-by: Felix Kuehling Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 28 +++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) commit e4d0ef752081e7aa6ffb7ccac11c499c732a2e05 Author: Nathan Chancellor Date: Wed Nov 2 08:25:40 2022 -0700 drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:3008:29: error: incompatible function pointer types initializing 'int (*)(void *, uint32_t, long *, uint32_t)' (aka 'int (*)(void *, unsigned int, long *, unsigned int)') with an expression of type 'int (void *, enum PP_OD_DPM_TABLE_COMMAND, long *, uint32_t)' (aka 'int (void *, enum PP_OD_DPM_TABLE_COMMAND, long *, unsigned int)') [-Werror,-Wincompatible-function-pointer-types-strict] .odn_edit_dpm_table = smu_od_edit_dpm_table, ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. There are only two implementations of ->odn_edit_dpm_table() in 'struct amd_pm_funcs': smu_od_edit_dpm_table() and pp_odn_edit_dpm_table(). One has a second parameter type of 'enum PP_OD_DPM_TABLE_COMMAND' and the other uses 'u32'. Ultimately, smu_od_edit_dpm_table() calls ->od_edit_dpm_table() from 'struct pptable_funcs' and pp_odn_edit_dpm_table() calls ->odn_edit_dpm_table() from 'struct pp_hwmgr_func', which both have a second parameter type of 'enum PP_OD_DPM_TABLE_COMMAND'. Update the type parameter in both the prototype in 'struct amd_pm_funcs' and pp_odn_edit_dpm_table() to 'enum PP_OD_DPM_TABLE_COMMAND', which cleans up the warning. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Reported-by: Sami Tolvanen Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/kgd_pp_interface.h | 3 ++- drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit f0d0f1087333714ee683cc134a95afe331d7ddd9 Author: Nathan Chancellor Date: Wed Nov 2 08:25:39 2022 -0700 drm/amdgpu: Fix type of second parameter in trans_msg() callback With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:412:15: error: incompatible function pointer types initializing 'void (*)(struct amdgpu_device *, u32, u32, u32, u32)' (aka 'void (*)(struct amdgpu_device *, unsigned int, unsigned int, unsigned int, unsigned int)') with an expression of type 'void (struct amdgpu_device *, enum idh_request, u32, u32, u32)' (aka 'void (struct amdgpu_device *, enum idh_request, unsigned int, unsigned int, unsigned int)') [-Werror,-Wincompatible-function-pointer-types-strict] .trans_msg = xgpu_ai_mailbox_trans_msg, ^~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c:435:15: error: incompatible function pointer types initializing 'void (*)(struct amdgpu_device *, u32, u32, u32, u32)' (aka 'void (*)(struct amdgpu_device *, unsigned int, unsigned int, unsigned int, unsigned int)') with an expression of type 'void (struct amdgpu_device *, enum idh_request, u32, u32, u32)' (aka 'void (struct amdgpu_device *, enum idh_request, unsigned int, unsigned int, unsigned int)') [-Werror,-Wincompatible-function-pointer-types-strict] .trans_msg = xgpu_nv_mailbox_trans_msg, ^~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. The type of the second parameter in the prototype should be 'enum idh_request' instead of 'u32'. Update it to clear up the warnings. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Reported-by: Sami Tolvanen Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 320e2590e281d0a7865e861f50155b5b435e9813 Author: Paulo Miguel Almeida Date: Sat Oct 29 14:30:44 2022 +1300 drm/amdgpu: 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 _ATOM_FAKE_EDID_PATCH_RECORD and refactor the rest of the code accordingly. Important to mention is 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/238 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 7 +++++-- drivers/gpu/drm/amd/include/atombios.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) commit c81c5bd5cf2f428867e0bcfcccd4e4d2f8c68f51 Author: Paulo Miguel Almeida Date: Sat Oct 29 16:32:05 2022 +1300 drm/radeon: 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 _ATOM_FAKE_EDID_PATCH_RECORD 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] Reviewed-by: Kees Cook Signed-off-by: Paulo Miguel Almeida Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/atombios.h | 2 +- drivers/gpu/drm/radeon/radeon_atombios.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit e053d71f8c04fd7ef53241d2ab39f02acee6aaa0 Author: Alex Deucher Date: Wed Nov 2 11:21:35 2022 -0400 drm/amdgpu/gfx11: set gfx.funcs in early init So the callbacks are set early in case we need them. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 105195af02d4e8665e4583cf7ef4e5f69d858d7d Author: Alex Deucher Date: Wed Nov 2 11:20:49 2022 -0400 drm/amdgpu/gfx10: set gfx.funcs in early init So the callbacks are set early in case we need them. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 33034c5c2efaf56c7b89aed5a3cf1bcb3f12b853 Author: Alex Deucher Date: Wed Nov 2 11:17:23 2022 -0400 drm/amdgpu/gfx9: set gfx.funcs in early init So the callbacks are set before we use them. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8638ad7fcac50d2ba8e76625e7d86cabd5d5bd2 Author: Peng Ju Zhou Date: Fri Oct 28 18:24:45 2022 +0800 drm/amdgpu: Remove unnecessary register program in SRIOV Remove unnecessary register program in SRIOV Signed-off-by: Peng Ju Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 3 +++ 1 file changed, 3 insertions(+) commit 8a1fbb4a5ec29d9ae5f792a1d3c049c5c709851c Author: Yiqing Yao Date: Fri Oct 28 17:30:17 2022 +0800 drm/amdgpu: Disable MCBP from soc21 for SRIOV [why] Start from soc21, CP does not support MCBP, so disable it. [how] Used amgpu_mcbp flag alone instead of checking if is in SRIOV to enable/disable MCBP. Only set flag to enable on asic_type prior to soc21 in SRIOV. Signed-off-by: Yiqing Yao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) commit 0cfce2401e1553f3bf0ee3b6ef56c9dda0303815 Author: Yiqing Yao Date: Fri Oct 28 17:03:17 2022 +0800 drm/amdgpu: Clean up soc21 early init for SRIOV Use virt_init_setting instead of per ip version setting. Signed-off-by: Yiqing Yao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 9a1662f549343d3ec882c5ffcfd232c6104d3c85 Author: Graham Sider Date: Thu Sep 29 11:57:34 2022 -0400 drm/amdgpu: extend halt_if_hws_hang to MES Hang on MES timeout if halt_if_hws_hang is set to 1. Signed-off-by: Graham Sider Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 4 ++++ 3 files changed, 10 insertions(+) commit 403cea4019e206130b5a90f6d34383005d17b54a Author: Jay Cornwall Date: Thu Oct 13 21:41:13 2022 -0500 drm/amdkfd: update GFX11 CWSR trap handler With corresponding FW change fixes issue where triggering CWSR on a workgroup with waves in s_barrier wouldn't lead to a back-off and therefore cause a hang. Signed-off-by: Jay Cornwall Tested-by: Graham Sider Acked-by: Harish Kasiviswanathan Acked-by: Felix Kuehling Reviewed-by: Graham Sider Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 764 +++++++++++---------- .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx10.asm | 6 + 2 files changed, 389 insertions(+), 381 deletions(-) commit cc2e0cf0ad47db7f51283e5c9bd2212a994ad527 Author: John Harrison Date: Mon Oct 31 15:00:07 2022 -0700 drm/i915/guc: Remove excessive line feeds in state dumps Some of the GuC state dump messages were adding extra line feeds. When printing via a DRM printer to dmesg, for example, that messes up the log formatting as it loses any prefixing from the printer. Given that the extra line feeds are just in the middle of random bits of GuC state, there isn't any real need for them. So just remove them completely. Signed-off-by: John Harrison Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20221031220007.4176835-1-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gt/uc/intel_guc.c | 4 ++-- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 07d90c72efbef9767042b1b110420b9a41b6b978 Merge: f71b2f64177a 4f999b767769 Author: Alexei Starovoitov Date: Fri Nov 4 11:51:45 2022 -0700 Merge branch 'BPF verifier precision tracking improvements' Andrii Nakryiko says: ==================== This patch set fixes and improves BPF verifier's precision tracking logic for SCALAR registers. Patches #1 and #2 are bug fixes discovered while working on these changes. Patch #3 enables precision tracking for BPF programs that contain subprograms. This was disabled before and prevent any modern BPF programs that use subprograms from enjoying the benefits of SCALAR (im)precise logic. Patch #4 is few lines of code changes and many lines of explaining why those changes are correct. We establish why ignoring precise markings in current state is OK. Patch #5 build on explanation in patch #4 and pushes it to the limit by forcefully forgetting inherited precise markins. Patch #4 by itself doesn't prevent current state from having precise=true SCALARs, so patch #5 is necessary to prevent such stray precise=true registers from creeping in. Patch #6 adjusts test_align selftests to work around BPF verifier log's limitations when it comes to interactions between state output and precision backtracking output. Overall, the goal of this patch set is to make BPF verifier's state tracking a bit more efficient by trying to preserve as much generality in checkpointed states as possible. v1->v2: - adjusted patch #1 commit message to make it clear we are fixing forward step, not precision backtracking (Alexei); - moved last_idx/first_idx verbose logging up to make it clear when global func reaches the first empty state (Alexei). ==================== Signed-off-by: Alexei Starovoitov commit 4f999b767769b76378c3616c624afd6f4bb0d99f Author: Andrii Nakryiko Date: Fri Nov 4 09:36:49 2022 -0700 selftests/bpf: make test_align selftest more robust test_align selftest relies on BPF verifier log emitting register states for specific instructions in expected format. Unfortunately, BPF verifier precision backtracking log interferes with such expectations. And instruction on which precision propagation happens sometimes don't output full expected register states. This does indeed look like something to be improved in BPF verifier, but is beyond the scope of this patch set. So to make test_align a bit more robust, inject few dummy R4 = R5 instructions which capture desired state of R5 and won't have precision tracking logs on them. This fixes tests until we can improve BPF verifier output in the presence of precision tracking. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221104163649.121784-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/align.c | 38 ++++++++++++++++---------- 1 file changed, 24 insertions(+), 14 deletions(-) commit 7a830b53c17bbadcf99f778f28aaaa4e6c41df5f Author: Andrii Nakryiko Date: Fri Nov 4 09:36:48 2022 -0700 bpf: aggressively forget precise markings during state checkpointing Exploit the property of about-to-be-checkpointed state to be able to forget all precise markings up to that point even more aggressively. We now clear all potentially inherited precise markings right before checkpointing and branching off into child state. If any of children states require precise knowledge of any SCALAR register, those will be propagated backwards later on before this state is finalized, preserving correctness. There is a single selftests BPF program change, but tremendous one: 25x reduction in number of verified instructions and states in trace_virtqueue_add_sgs. Cilium results are more modest, but happen across wider range of programs. SELFTESTS RESULTS ================= $ ./veristat -C -e file,prog,insns,states ~/imprecise-early-results.csv ~/imprecise-aggressive-results.csv | grep -v '+0' File Program Total insns (A) Total insns (B) Total insns (DIFF) Total states (A) Total states (B) Total states (DIFF) ------------------- ----------------------- --------------- --------------- ------------------ ---------------- ---------------- ------------------- loop6.bpf.linked1.o trace_virtqueue_add_sgs 398057 15114 -382943 (-96.20%) 8717 336 -8381 (-96.15%) ------------------- ----------------------- --------------- --------------- ------------------ ---------------- ---------------- ------------------- CILIUM RESULTS ============== $ ./veristat -C -e file,prog,insns,states ~/imprecise-early-results-cilium.csv ~/imprecise-aggressive-results-cilium.csv | grep -v '+0' File Program Total insns (A) Total insns (B) Total insns (DIFF) Total states (A) Total states (B) Total states (DIFF) ------------- -------------------------------- --------------- --------------- ------------------ ---------------- ---------------- ------------------- bpf_host.o tail_handle_nat_fwd_ipv4 23426 23221 -205 (-0.88%) 1537 1515 -22 (-1.43%) bpf_host.o tail_handle_nat_fwd_ipv6 13009 12904 -105 (-0.81%) 719 708 -11 (-1.53%) bpf_host.o tail_nodeport_nat_ingress_ipv6 5261 5196 -65 (-1.24%) 247 243 -4 (-1.62%) bpf_host.o tail_nodeport_nat_ipv6_egress 3446 3406 -40 (-1.16%) 203 198 -5 (-2.46%) bpf_lxc.o tail_handle_nat_fwd_ipv4 23426 23221 -205 (-0.88%) 1537 1515 -22 (-1.43%) bpf_lxc.o tail_handle_nat_fwd_ipv6 13009 12904 -105 (-0.81%) 719 708 -11 (-1.53%) bpf_lxc.o tail_ipv4_ct_egress 5074 4897 -177 (-3.49%) 255 248 -7 (-2.75%) bpf_lxc.o tail_ipv4_ct_ingress 5100 4923 -177 (-3.47%) 255 248 -7 (-2.75%) bpf_lxc.o tail_ipv4_ct_ingress_policy_only 5100 4923 -177 (-3.47%) 255 248 -7 (-2.75%) bpf_lxc.o tail_ipv6_ct_egress 4558 4536 -22 (-0.48%) 188 187 -1 (-0.53%) bpf_lxc.o tail_ipv6_ct_ingress 4578 4556 -22 (-0.48%) 188 187 -1 (-0.53%) bpf_lxc.o tail_ipv6_ct_ingress_policy_only 4578 4556 -22 (-0.48%) 188 187 -1 (-0.53%) bpf_lxc.o tail_nodeport_nat_ingress_ipv6 5261 5196 -65 (-1.24%) 247 243 -4 (-1.62%) bpf_overlay.o tail_nodeport_nat_ingress_ipv6 5261 5196 -65 (-1.24%) 247 243 -4 (-1.62%) bpf_overlay.o tail_nodeport_nat_ipv6_egress 3482 3442 -40 (-1.15%) 204 201 -3 (-1.47%) bpf_xdp.o tail_nodeport_nat_egress_ipv4 17200 15619 -1581 (-9.19%) 1111 1010 -101 (-9.09%) ------------- -------------------------------- --------------- --------------- ------------------ ---------------- ---------------- ------------------- Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221104163649.121784-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit f63181b6ae79fd3b034cde641db774268c2c3acf Author: Andrii Nakryiko Date: Fri Nov 4 09:36:47 2022 -0700 bpf: stop setting precise in current state Setting reg->precise to true in current state is not necessary from correctness standpoint, but it does pessimise the whole precision (or rather "imprecision", because that's what we want to keep as much as possible) tracking. Why is somewhat subtle and my best attempt to explain this is recorded in an extensive comment for __mark_chain_precise() function. Some more careful thinking and code reading is probably required still to grok this completely, unfortunately. Whiteboarding and a bunch of extra handwaiving in person would be even more helpful, but is deemed impractical in Git commit. Next patch pushes this imprecision property even further, building on top of the insights described in this patch. End results are pretty nice, we get reduction in number of total instructions and states verified due to a better states reuse, as some of the states are now more generic and permissive due to less unnecessary precise=true requirements. SELFTESTS RESULTS ================= $ ./veristat -C -e file,prog,insns,states ~/subprog-precise-results.csv ~/imprecise-early-results.csv | grep -v '+0' File Program Total insns (A) Total insns (B) Total insns (DIFF) Total states (A) Total states (B) Total states (DIFF) --------------------------------------- ---------------------- --------------- --------------- ------------------ ---------------- ---------------- ------------------- bpf_iter_ksym.bpf.linked1.o dump_ksym 347 285 -62 (-17.87%) 20 19 -1 (-5.00%) pyperf600_bpf_loop.bpf.linked1.o on_event 3678 3736 +58 (+1.58%) 276 285 +9 (+3.26%) setget_sockopt.bpf.linked1.o skops_sockopt 4038 3947 -91 (-2.25%) 347 343 -4 (-1.15%) test_l4lb.bpf.linked1.o balancer_ingress 4559 2611 -1948 (-42.73%) 118 105 -13 (-11.02%) test_l4lb_noinline.bpf.linked1.o balancer_ingress 6279 6268 -11 (-0.18%) 237 236 -1 (-0.42%) test_misc_tcp_hdr_options.bpf.linked1.o misc_estab 1307 1303 -4 (-0.31%) 100 99 -1 (-1.00%) test_sk_lookup.bpf.linked1.o ctx_narrow_access 456 447 -9 (-1.97%) 39 38 -1 (-2.56%) test_sysctl_loop1.bpf.linked1.o sysctl_tcp_mem 1389 1384 -5 (-0.36%) 26 25 -1 (-3.85%) test_tc_dtime.bpf.linked1.o egress_fwdns_prio101 518 485 -33 (-6.37%) 51 46 -5 (-9.80%) test_tc_dtime.bpf.linked1.o egress_host 519 468 -51 (-9.83%) 50 44 -6 (-12.00%) test_tc_dtime.bpf.linked1.o ingress_fwdns_prio101 842 1000 +158 (+18.76%) 73 88 +15 (+20.55%) xdp_synproxy_kern.bpf.linked1.o syncookie_tc 405757 373173 -32584 (-8.03%) 25735 22882 -2853 (-11.09%) xdp_synproxy_kern.bpf.linked1.o syncookie_xdp 479055 371590 -107465 (-22.43%) 29145 22207 -6938 (-23.81%) --------------------------------------- ---------------------- --------------- --------------- ------------------ ---------------- ---------------- ------------------- Slight regression in test_tc_dtime.bpf.linked1.o/ingress_fwdns_prio101 is left for a follow up, there might be some more precision-related bugs in existing BPF verifier logic. CILIUM RESULTS ============== $ ./veristat -C -e file,prog,insns,states ~/subprog-precise-results-cilium.csv ~/imprecise-early-results-cilium.csv | grep -v '+0' File Program Total insns (A) Total insns (B) Total insns (DIFF) Total states (A) Total states (B) Total states (DIFF) ------------- ------------------------------ --------------- --------------- ------------------ ---------------- ---------------- ------------------- bpf_host.o cil_from_host 762 556 -206 (-27.03%) 43 37 -6 (-13.95%) bpf_host.o tail_handle_nat_fwd_ipv4 23541 23426 -115 (-0.49%) 1538 1537 -1 (-0.07%) bpf_host.o tail_nodeport_nat_egress_ipv4 33592 33566 -26 (-0.08%) 2163 2161 -2 (-0.09%) bpf_lxc.o tail_handle_nat_fwd_ipv4 23541 23426 -115 (-0.49%) 1538 1537 -1 (-0.07%) bpf_overlay.o tail_nodeport_nat_egress_ipv4 33581 33543 -38 (-0.11%) 2160 2157 -3 (-0.14%) bpf_xdp.o tail_handle_nat_fwd_ipv4 21659 20920 -739 (-3.41%) 1440 1376 -64 (-4.44%) bpf_xdp.o tail_handle_nat_fwd_ipv6 17084 17039 -45 (-0.26%) 907 905 -2 (-0.22%) bpf_xdp.o tail_lb_ipv4 73442 73430 -12 (-0.02%) 4370 4369 -1 (-0.02%) bpf_xdp.o tail_lb_ipv6 152114 151895 -219 (-0.14%) 6493 6479 -14 (-0.22%) bpf_xdp.o tail_nodeport_nat_egress_ipv4 17377 17200 -177 (-1.02%) 1125 1111 -14 (-1.24%) bpf_xdp.o tail_nodeport_nat_ingress_ipv6 6405 6397 -8 (-0.12%) 309 308 -1 (-0.32%) bpf_xdp.o tail_rev_nodeport_lb4 7126 6934 -192 (-2.69%) 414 402 -12 (-2.90%) bpf_xdp.o tail_rev_nodeport_lb6 18059 17905 -154 (-0.85%) 1105 1096 -9 (-0.81%) ------------- ------------------------------ --------------- --------------- ------------------ ---------------- ---------------- ------------------- Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221104163649.121784-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 103 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 91 insertions(+), 12 deletions(-) commit be2ef8161572ec1973124ebc50f56dafc2925e07 Author: Andrii Nakryiko Date: Fri Nov 4 09:36:46 2022 -0700 bpf: allow precision tracking for programs with subprogs Stop forcing precise=true for SCALAR registers when BPF program has any subprograms. Current restriction means that any BPF program, as soon as it uses subprograms, will end up not getting any of the precision tracking benefits in reduction of number of verified states. This patch keeps the fallback mark_all_scalars_precise() behavior if precise marking has to cross function frames. E.g., if subprogram requires R1 (first input arg) to be marked precise, ideally we'd need to backtrack to the parent function and keep marking R1 and its dependencies as precise. But right now we give up and force all the SCALARs in any of the current and parent states to be forced to precise=true. We can lift that restriction in the future. But this patch fixes two issues identified when trying to enable precision tracking for subprogs. First, prevent "escaping" from top-most state in a global subprog. While with entry-level BPF program we never end up requesting precision for R1-R5 registers, because R2-R5 are not initialized (and so not readable in correct BPF program), and R1 is PTR_TO_CTX, not SCALAR, and so is implicitly precise. With global subprogs, though, it's different, as global subprog a) can have up to 5 SCALAR input arguments, which might get marked as precise=true and b) it is validated in isolation from its main entry BPF program. b) means that we can end up exhausting parent state chain and still not mark all registers in reg_mask as precise, which would lead to verifier bug warning. To handle that, we need to consider two cases. First, if the very first state is not immediately "checkpointed" (i.e., stored in state lookup hashtable), it will get correct first_insn_idx and last_insn_idx instruction set during state checkpointing. As such, this case is already handled and __mark_chain_precision() already handles that by just doing nothing when we reach to the very first parent state. st->parent will be NULL and we'll just stop. Perhaps some extra check for reg_mask and stack_mask is due here, but this patch doesn't address that issue. More problematic second case is when global function's initial state is immediately checkpointed before we manage to process the very first instruction. This is happening because when there is a call to global subprog from the main program the very first subprog's instruction is marked as pruning point, so before we manage to process first instruction we have to check and checkpoint state. This patch adds a special handling for such "empty" state, which is identified by having st->last_insn_idx set to -1. In such case, we check that we are indeed validating global subprog, and with some sanity checking we mark input args as precise if requested. Note that we also initialize state->first_insn_idx with correct start insn_idx offset. For main program zero is correct value, but for any subprog it's quite confusing to not have first_insn_idx set. This doesn't have any functional impact, but helps with debugging and state printing. We also explicitly initialize state->last_insns_idx instead of relying on is_state_visited() to do this with env->prev_insns_idx, which will be -1 on the very first instruction. This concludes necessary changes to handle specifically global subprog's precision tracking. Second identified problem was missed handling of BPF helper functions that call into subprogs (e.g., bpf_loop and few others). From precision tracking and backtracking logic's standpoint those are effectively calls into subprogs and should be called as BPF_PSEUDO_CALL calls. This patch takes the least intrusive way and just checks against a short list of current BPF helpers that do call subprogs, encapsulated in is_callback_calling_function() function. But to prevent accidentally forgetting to add new BPF helpers to this "list", we also do a sanity check in __check_func_call, which has to be called for each such special BPF helper, to validate that BPF helper is indeed recognized as callback-calling one. This should catch any missed checks in the future. Adding some special flags to be added in function proto definitions seemed like an overkill in this case. With the above changes, it's possible to remove forceful setting of reg->precise to true in __mark_reg_unknown, which turns on precision tracking both inside subprogs and entry progs that have subprogs. No warnings or errors were detected across all the selftests, but also when validating with veristat against internal Meta BPF objects and Cilium objects. Further, in some BPF programs there are noticeable reduction in number of states and instructions validated due to more effective precision tracking, especially benefiting syncookie test. $ ./veristat -C -e file,prog,insns,states ~/baseline-results.csv ~/subprog-precise-results.csv | grep -v '+0' File Program Total insns (A) Total insns (B) Total insns (DIFF) Total states (A) Total states (B) Total states (DIFF) ---------------------------------------- -------------------------- --------------- --------------- ------------------ ---------------- ---------------- ------------------- pyperf600_bpf_loop.bpf.linked1.o on_event 3966 3678 -288 (-7.26%) 306 276 -30 (-9.80%) pyperf_global.bpf.linked1.o on_event 7563 7530 -33 (-0.44%) 520 517 -3 (-0.58%) pyperf_subprogs.bpf.linked1.o on_event 36358 36934 +576 (+1.58%) 2499 2531 +32 (+1.28%) setget_sockopt.bpf.linked1.o skops_sockopt 3965 4038 +73 (+1.84%) 343 347 +4 (+1.17%) test_cls_redirect_subprogs.bpf.linked1.o cls_redirect 64965 64901 -64 (-0.10%) 4619 4612 -7 (-0.15%) test_misc_tcp_hdr_options.bpf.linked1.o misc_estab 1491 1307 -184 (-12.34%) 110 100 -10 (-9.09%) test_pkt_access.bpf.linked1.o test_pkt_access 354 349 -5 (-1.41%) 25 24 -1 (-4.00%) test_sock_fields.bpf.linked1.o egress_read_sock_fields 435 375 -60 (-13.79%) 22 20 -2 (-9.09%) test_sysctl_loop2.bpf.linked1.o sysctl_tcp_mem 1508 1501 -7 (-0.46%) 29 28 -1 (-3.45%) test_tc_dtime.bpf.linked1.o egress_fwdns_prio100 468 435 -33 (-7.05%) 45 41 -4 (-8.89%) test_tc_dtime.bpf.linked1.o ingress_fwdns_prio100 398 408 +10 (+2.51%) 42 39 -3 (-7.14%) test_tc_dtime.bpf.linked1.o ingress_fwdns_prio101 1096 842 -254 (-23.18%) 97 73 -24 (-24.74%) test_tcp_hdr_options.bpf.linked1.o estab 2758 2408 -350 (-12.69%) 208 181 -27 (-12.98%) test_urandom_usdt.bpf.linked1.o urand_read_with_sema 466 448 -18 (-3.86%) 31 28 -3 (-9.68%) test_urandom_usdt.bpf.linked1.o urand_read_without_sema 466 448 -18 (-3.86%) 31 28 -3 (-9.68%) test_urandom_usdt.bpf.linked1.o urandlib_read_with_sema 466 448 -18 (-3.86%) 31 28 -3 (-9.68%) test_urandom_usdt.bpf.linked1.o urandlib_read_without_sema 466 448 -18 (-3.86%) 31 28 -3 (-9.68%) test_xdp_noinline.bpf.linked1.o balancer_ingress_v6 4302 4294 -8 (-0.19%) 257 256 -1 (-0.39%) xdp_synproxy_kern.bpf.linked1.o syncookie_tc 583722 405757 -177965 (-30.49%) 35846 25735 -10111 (-28.21%) xdp_synproxy_kern.bpf.linked1.o syncookie_xdp 609123 479055 -130068 (-21.35%) 35452 29145 -6307 (-17.79%) ---------------------------------------- -------------------------- --------------- --------------- ------------------ ---------------- ---------------- ------------------- Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221104163649.121784-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) commit 529409ea92d590659be487ba0839710329bd8074 Author: Andrii Nakryiko Date: Fri Nov 4 09:36:45 2022 -0700 bpf: propagate precision across all frames, not just the last one When equivalent completed state is found and it has additional precision restrictions, BPF verifier propagates precision to currently-being-verified state chain (i.e., including parent states) so that if some of the states in the chain are not yet completed, necessary precision restrictions are enforced. Unfortunately, right now this happens only for the last frame (deepest active subprogram's frame), not all the frames. This can lead to incorrect matching of states due to missing precision marker. Currently this doesn't seem possible as BPF verifier forces everything to precise when validated BPF program has any subprograms. But with the next patch lifting this restriction, this becomes problematic. In fact, without this fix, we'll start getting failure in one of the existing test_verifier test cases: #906/p precise: cross frame pruning FAIL Unexpected success to load! verification time 48 usec stack depth 0+0 processed 26 insns (limit 1000000) max_states_per_insn 3 total_states 17 peak_states 17 mark_read 8 This patch adds precision propagation across all frames. Fixes: a3ce685dd01a ("bpf: fix precision tracking") Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221104163649.121784-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 71 ++++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 32 deletions(-) commit a3b666bfa9c9edc05bca62a87abafe0936bd7f97 Author: Andrii Nakryiko Date: Fri Nov 4 09:36:44 2022 -0700 bpf: propagate precision in ALU/ALU64 operations When processing ALU/ALU64 operations (apart from BPF_MOV, which is handled correctly already; and BPF_NEG and BPF_END are special and don't have source register), if destination register is already marked precise, this causes problem with potentially missing precision tracking for the source register. E.g., when we have r1 >>= r5 and r1 is marked precise, but r5 isn't, this will lead to r5 staying as imprecise. This is due to the precision backtracking logic stopping early when it sees r1 is already marked precise. If r1 wasn't precise, we'd keep backtracking and would add r5 to the set of registers that need to be marked precise. So there is a discrepancy here which can lead to invalid and incompatible states matched due to lack of precision marking on r5. If r1 wasn't precise, precision backtracking would correctly mark both r1 and r5 as precise. This is simple to fix, though. During the forward instruction simulation pass, for arithmetic operations of `scalar = scalar` form (where is ALU or ALU64 operations), if destination register is already precise, mark source register as precise. This applies only when both involved registers are SCALARs. `ptr += scalar` and `scalar += ptr` cases are already handled correctly. This does have (negative) effect on some selftest programs and few Cilium programs. ~/baseline-tmp-results.csv are veristat results with this patch, while ~/baseline-results.csv is without it. See post scriptum for instructions on how to make Cilium programs testable with veristat. Correctness has a price. $ ./veristat -C -e file,prog,insns,states ~/baseline-results.csv ~/baseline-tmp-results.csv | grep -v '+0' File Program Total insns (A) Total insns (B) Total insns (DIFF) Total states (A) Total states (B) Total states (DIFF) ----------------------- -------------------- --------------- --------------- ------------------ ---------------- ---------------- ------------------- bpf_cubic.bpf.linked1.o bpf_cubic_cong_avoid 997 1700 +703 (+70.51%) 62 90 +28 (+45.16%) test_l4lb.bpf.linked1.o balancer_ingress 4559 5469 +910 (+19.96%) 118 126 +8 (+6.78%) ----------------------- -------------------- --------------- --------------- ------------------ ---------------- ---------------- ------------------- $ ./veristat -C -e file,prog,verdict,insns,states ~/baseline-results-cilium.csv ~/baseline-tmp-results-cilium.csv | grep -v '+0' File Program Total insns (A) Total insns (B) Total insns (DIFF) Total states (A) Total states (B) Total states (DIFF) ------------- ------------------------------ --------------- --------------- ------------------ ---------------- ---------------- ------------------- bpf_host.o tail_nodeport_nat_ingress_ipv6 4448 5261 +813 (+18.28%) 234 247 +13 (+5.56%) bpf_host.o tail_nodeport_nat_ipv6_egress 3396 3446 +50 (+1.47%) 201 203 +2 (+1.00%) bpf_lxc.o tail_nodeport_nat_ingress_ipv6 4448 5261 +813 (+18.28%) 234 247 +13 (+5.56%) bpf_overlay.o tail_nodeport_nat_ingress_ipv6 4448 5261 +813 (+18.28%) 234 247 +13 (+5.56%) bpf_xdp.o tail_lb_ipv4 71736 73442 +1706 (+2.38%) 4295 4370 +75 (+1.75%) ------------- ------------------------------ --------------- --------------- ------------------ ---------------- ---------------- ------------------- P.S. To make Cilium ([0]) programs libbpf-compatible and thus veristat-loadable, apply changes from topmost commit in [1], which does minimal changes to Cilium source code, mostly around SEC() annotations and BPF map definitions. [0] https://github.com/cilium/cilium/ [1] https://github.com/anakryiko/cilium/commits/libbpf-friendliness Fixes: b5dc0163d8fd ("bpf: precise scalar_value tracking") Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221104163649.121784-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 5 +++++ 1 file changed, 5 insertions(+) commit 57d894e77237230946fe77f976a5fe8f14154824 Merge: 9abf2313adc1 02693e11611e Author: Stephen Boyd Date: Fri Nov 4 11:39:19 2022 -0700 Merge tag 'renesas-clk-for-v6.2-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: - Round SD clock rate to improve parent clock selection - Add Ethernet Switch and internal SASYNCPER clocks on R-Car S4-8 - Add DMA (SYS-DMAC), SPI (MSIOF), external interrupt (INTC-EX) serial (SCIF), PWM (PWM and TPU), SDHI, and HyperFLASH/QSPI (RPC-IF) clocks on R-Car V4H - Add Multi-Function Timer Pulse Unit (MTU3a) clock and reset on RZ/G2L - Fix endless loop on RZ/N1 - Miscellaneous fixes and improvements * tag 'renesas-clk-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: (22 commits) clk: renesas: r9a06g032: Repair grave increment error clk: renesas: rzg2l: Don't assume all CPG_MOD clocks support PM clk: renesas: rzg2l: Fix typo in struct rzg2l_cpg_priv kerneldoc clk: renesas: r8a779a0: Fix SD0H clock name clk: renesas: r8a779g0: Add RPC-IF clock clk: renesas: r8a779g0: Add SDHI clocks clk: renesas: r8a779f0: Add SASYNCPER internal clock clk: renesas: r8a779f0: Fix SD0H clock name clk: renesas: r9a07g043: Drop WDT2 clock and reset entry clk: renesas: r9a07g044: Drop WDT2 clock and reset entry clk: renesas: r8a779g0: Add TPU clock clk: renesas: r8a779g0: Add PWM clock clk: renesas: r8a779g0: Add SCIF clocks clk: renesas: r8a779g0: Fix HSCIF parent clocks clk: renesas: r8a779g0: Add SASYNCPER clocks clk: renesas: r9a07g044: Add MTU3a clock and reset entry clk: renesas: r8a779g0: Add INTC-EX clock clk: renesas: r8a779g0: Add MSIOF clocks clk: renesas: r8a779g0: Add SYS-DMAC clocks clk: renesas: r8a779f0: Add Ethernet Switch clocks ... commit e9d696cb44e31184ba3b4b95a4e87442f5198607 Author: Kees Cook Date: Tue Oct 18 02:25:25 2022 -0700 igb: Proactively round up to kmalloc bucket size In preparation for removing the "silently change allocation size" users of ksize(), explicitly round up all q_vector allocations so that allocations can be correctly compared to ksize(). Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Tested-by: Gurucharan (A Contingent worker at Intel) Reviewed-by: Michael J. Ruhl Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0668716506ca66f90d395f36ccdaebc3e0e84801 Author: Kees Cook Date: Tue Oct 18 02:25:24 2022 -0700 igb: Do not free q_vector unless new one was allocated Avoid potential use-after-free condition under memory pressure. If the kzalloc() fails, q_vector will be freed but left in the original adapter->q_vector[v_idx] array position. Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Michael J. Ruhl Reviewed-by: Jacob Keller Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igb/igb_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit eac0b6804b74dd77dd33ee4a0639b717481ebf54 Author: Jan Sokolowski Date: Thu Oct 6 14:44:08 2022 +0200 ixgbevf: Add error messages on vlan error ixgbevf did not provide an error in dmesg if VLAN addition failed. Add two descriptive failure messages in the kernel log. Signed-off-by: Jan Sokolowski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit f49fafa504d521f8f33bffef23bd4c4a801eec8f Author: Yang Li Date: Wed Nov 2 13:31:39 2022 +0800 ixgbe: Remove unneeded semicolon ./drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c:1305:2-3: Unneeded semicolon Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2688 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a6f9e3e03aec34fa0eb3c3efca6da777c57187a Author: Anirudh Venkataramanan Date: Wed Sep 28 15:42:10 2022 -0700 ixgbe: Remove local variable Remove local variable "match" and directly return evaluated conditional instead. Suggested-by: Alexander Duyck Signed-off-by: Anirudh Venkataramanan Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 864f88884c42c838e2ca6473b9003e0f34d7fd15 Author: Daniel Willenson Date: Mon Oct 17 11:52:59 2022 -0400 ixgbe: change MAX_RXD/MAX_TXD based on adapter type Set the length limit for the receive descriptor buffer and transmit descriptor buffer based on the controller type. The values used are called out in the controller datasheets as a 'Note:' in the RDLEN and TDLEN register descriptions. This allows the user to use ethtool to allocate larger descriptor buffers in the case where data is received or transmitted too quickly for the driver to keep up. Signed-off-by: Daniel Willenson Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbe/ixgbe.h | 10 ++++-- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 44 +++++++++++++++++++++--- 2 files changed, 48 insertions(+), 6 deletions(-) commit d668c0a73e2c1a39ee7046d4e0f49b9f805f804f Author: Jonathan Neuschäfer Date: Fri Nov 4 11:13:49 2022 +0100 media: davinci/vpbe: Fix a typo ("defualt_mode") Let's spell the variable name correctly. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Hans Verkuil include/media/davinci/vpbe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 841af6202c58d4778a676b38a83a37f463ea4750 Author: Yang Li Date: Thu Sep 29 13:40:03 2022 +0800 media: sun6i-csi: Remove unnecessary print function dev_err() The print function dev_err() is redundant because platform_get_irq() already prints an error. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2314 Reported-by: Abaci Robot Signed-off-by: Yang Li Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 1 - 1 file changed, 1 deletion(-) commit d3fe5e6b3abfae9b08d80f9a635f1101491131f7 Author: Laurent Pinchart Date: Mon Oct 10 00:35:09 2022 +0300 media: Documentation: Drop deprecated bytesused == 0 The V4L2 API historically allowed buffers to be queued with bytesused set to 0 on output devices, in which case the driver would use the buffer length. This behaviour is deprecated, and videobuf2 prints a warning message in the kernel log. Drop it from the documentation. Signed-off-by: Laurent Pinchart Reviewed-by: Hans Verkuil Reviewed-by: Sakari Ailus Signed-off-by: Hans Verkuil Documentation/userspace-api/media/v4l/buffer.rst | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit e38e42c078da4af962d322b97e726dcb2f184e3f Author: Yang Yingliang Date: Mon Oct 24 21:46:50 2022 +0800 media: platform: exynos4-is: fix return value check in fimc_md_probe() devm_pinctrl_get() may return ERR_PTR(-EPROBE_DEFER), add a minus sign to fix it. Fixes: 4163851f7b99 ("[media] s5p-fimc: Use pinctrl API for camera ports configuration") Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil drivers/media/platform/samsung/exynos4-is/media-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bf961085b3918773ae6b06680bb3d49bbf2c9f3 Author: Colin Ian King Date: Mon Oct 24 15:29:54 2022 +0100 media: dvb-core: remove variable n, turn for-loop to while-loop Variable n is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. This allows the for-loop to be replaced with a while-loop. Signed-off-by: Colin Ian King Reviewed-by: Tommaso Merciai Signed-off-by: Hans Verkuil drivers/media/dvb-core/dvb_demux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 94a7ad9283464b75b12516c5512541d467cefcf8 Author: Liu Shixin Date: Thu Oct 27 20:38:55 2022 +0800 media: vivid: fix compose size exceed boundary syzkaller found a bug: BUG: unable to handle page fault for address: ffffc9000a3b1000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 100000067 P4D 100000067 PUD 10015f067 PMD 1121ca067 PTE 0 Oops: 0002 [#1] PREEMPT SMP CPU: 0 PID: 23489 Comm: vivid-000-vid-c Not tainted 6.1.0-rc1+ #512 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:memcpy_erms+0x6/0x10 [...] Call Trace: ? tpg_fill_plane_buffer+0x856/0x15b0 vivid_fillbuff+0x8ac/0x1110 vivid_thread_vid_cap_tick+0x361/0xc90 vivid_thread_vid_cap+0x21a/0x3a0 kthread+0x143/0x180 ret_from_fork+0x1f/0x30 This is because we forget to check boundary after adjust compose->height int V4L2_SEL_TGT_CROP case. Add v4l2_rect_map_inside() to fix this problem for this case. Fixes: ef834f7836ec ("[media] vivid: add the video capture and output parts") Signed-off-by: Liu Shixin Signed-off-by: Hans Verkuil drivers/media/test-drivers/vivid/vivid-vid-cap.c | 1 + 1 file changed, 1 insertion(+) commit a3fb9657df6f1ec4a45b1ff5b1e11e5674d4b11e Author: Colin Ian King Date: Wed Nov 2 15:51:17 2022 +0000 media: rkisp1: make const arrays ae_wnd_num and hist_wnd_num 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 drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd3d91ab1c6ab0628fe642dd570b56302c30a792 Author: Takashi Iwai Date: Mon Oct 31 11:02:45 2022 +0100 media: dvb-core: Fix UAF due to refcount races at releasing The dvb-core tries to sync the releases of opened files at dvb_dmxdev_release() with two refcounts: dvbdev->users and dvr_dvbdev->users. A problem is present in those two syncs: when yet another dvb_demux_open() is called during those sync waits, dvb_demux_open() continues to process even if the device is being closed. This includes the increment of the former refcount, resulting in the leftover refcount after the sync of the latter refcount at dvb_dmxdev_release(). It ends up with use-after-free, since the function believes that all usages were gone and releases the resources. This patch addresses the problem by adding the check of dmxdev->exit flag at dvb_demux_open(), just like dvb_dvr_open() already does. With the exit flag check, the second call of dvb_demux_open() fails, hence the further corruption can be avoided. Also for avoiding the races of the dmxdev->exit flag reference, this patch serializes the dmxdev->exit set up and the sync waits with the dmxdev->mutex lock at dvb_dmxdev_release(). Without the mutex lock, dvb_demux_open() (or dvb_dvr_open()) may run concurrently with dvb_dmxdev_release(), which allows to skip the exit flag check and continue the open process that is being closed. CVE-2022-41218 is assigned to those bugs above. Reported-by: Hyunwoo Kim Cc: Link: https://lore.kernel.org/20220908132754.30532-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil drivers/media/dvb-core/dmxdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 00c47aa85bb26450edc6059c3d245de062e60b5d Author: Andrzej Pietrasiewicz Date: Thu Oct 27 10:02:17 2022 +0200 media: rkvdec: Add required padding The addresses of two elements of the segmap[][] member are passed to the hardware which expects 128-bit aligned addresses. However, without this patch offsetof(struct rkvdec_vp9_priv_tbl, segmap[0]) is an odd number (2421) but the hardware just ignores the 5 least significant bits of the address. As a result, the hardware writes the segmentation map to incorrect locations. Inserting 11 bytes of padding corrects this situation by making the said addresses divisible by 16 (i.e. aligned on a 128-bit boundary). Signed-off-by: Andrzej Pietrasiewicz Fixes: f25709c4ff15 ("media: rkvdec: Add the VP9 backend") Reviewed-by: Nicolas Dufresne Signed-off-by: Hans Verkuil drivers/staging/media/rkvdec/rkvdec-vp9.c | 3 +++ 1 file changed, 3 insertions(+) commit 5b16db4fbba452aacfbb0bfd9a2c81cd0cd52b30 Author: Jammy Huang Date: Fri Oct 28 10:35:54 2022 +0800 media: aspeed: Extend debug message updated as below: Capture: Mode : Direct fetch VGA bpp mode : 32 Signal : lock Width : 1920 Height : 1080 FRC : 0 Compression: Format : JPEG Subsampling : 444 Quality : 4 Performance: Frame# : 4 Frame Duration(ms) : Now : 22 Min : 21 Max : 22 FPS : 45 Signed-off-by: Jammy Huang Signed-off-by: Hans Verkuil drivers/media/platform/aspeed/aspeed-video.c | 38 +++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit d4b9fd006fae58d2fdc68a1d1000e0498d8fbe33 Author: Jammy Huang Date: Fri Oct 28 10:35:53 2022 +0800 media: aspeed: Support aspeed mode to reduce compressed data aspeed supports differential jpeg format which only compress the parts which are changed. In this way, it reduces both the amount of data to be transferred by network and those to be decoded on the client side. 2 new ctrls are added: * Aspeed HQ Mode: to control aspeed's high quality(2-pass) compression mode This only works with yuv444 subsampling. * Aspeed HQ Quality: to control the quality of aspeed's HQ mode only useful if Aspeed HQ mode is enabled Aspeed JPEG Format requires an additional buffer, called bcd, to store the information about which macro block in the new frame is different from the previous one. To have bcd correctly working, we need to swap the buffers for src0/1 to make src1 refer to previous frame and src0 to the coming new frame. Signed-off-by: Jammy Huang Reported-by: kernel test robot Signed-off-by: Hans Verkuil [hverkuil: fix logging dma_addr_t, use %pad for that] drivers/media/platform/aspeed/aspeed-video.c | 278 ++++++++++++++++++++++----- include/uapi/linux/aspeed-video.h | 14 ++ 2 files changed, 241 insertions(+), 51 deletions(-) commit dae86bb6488895738c390bce286ce14156c08d6b Author: Jammy Huang Date: Fri Oct 28 10:35:52 2022 +0800 media: Documentation: aspeed-video: Add user documentation for the aspeed-video driver Add user documentation for the aspeed-video driver. Signed-off-by: Jammy Huang Signed-off-by: Hans Verkuil .../userspace-api/media/drivers/aspeed-video.rst | 65 ++++++++++++++++++++++ .../userspace-api/media/drivers/index.rst | 1 + 2 files changed, 66 insertions(+) commit 867d3b275c385e80eaf7c46ab08674ae0af47bf3 Author: Jammy Huang Date: Fri Oct 28 10:35:51 2022 +0800 media: v4l2-ctrls: Reserve controls for ASPEED Reserve controls for ASPEED video family. Aspeed video engine contains a few features which improve video quality, reduce amount of compressed data, and etc. Hence, 16 controls are reserved for these aspeed proprietary features. Signed-off-by: Jammy Huang Signed-off-by: Hans Verkuil include/uapi/linux/v4l2-controls.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 7a4b3770d635d05f1d8a4a17ae4acab5b3d2bad1 Author: Jammy Huang Date: Fri Oct 28 10:35:50 2022 +0800 media: v4l: Add definition for the Aspeed JPEG format This introduces support for the Aspeed JPEG format, where the new frame can refer to previous frame to reduce the amount of compressed data. The concept is similar to I/P frame of video compression. It will compare the new frame with previous one to decide which macroblock's data is changed, and only the changed macroblocks will be compressed. This Aspeed JPEG format is used by the video engine on Aspeed platforms, which is generally adapted for remote KVM. Signed-off-by: Jammy Huang Signed-off-by: Hans Verkuil .../userspace-api/media/v4l/pixfmt-reserved.rst | 17 +++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 3 files changed, 19 insertions(+) commit c4d344163c3a7f90712525f931a6c016bbb35e18 Author: Luca Ceresoli Date: Wed Nov 2 12:01:02 2022 +0100 staging: media: tegra-video: fix device_node use after free At probe time this code path is followed: * tegra_csi_init * tegra_csi_channels_alloc * for_each_child_of_node(node, channel) -- iterates over channels * automatically gets 'channel' * tegra_csi_channel_alloc() * saves into chan->of_node a pointer to the channel OF node * automatically gets and puts 'channel' * now the node saved in chan->of_node has refcount 0, can disappear * tegra_csi_channels_init * iterates over channels * tegra_csi_channel_init -- uses chan->of_node After that, chan->of_node keeps storing the node until the device is removed. of_node_get() the node and of_node_put() it during teardown to avoid any risk. Fixes: 1ebaeb09830f ("media: tegra-video: Add support for external sensor capture") Cc: stable@vger.kernel.org Cc: Sowjanya Komatineni Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil drivers/staging/media/tegra-video/csi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 10b5ce6743c839fa75336042c64e2479caec9430 Author: Luca Ceresoli Date: Wed Nov 2 12:01:01 2022 +0100 staging: media: tegra-video: fix chan->mipi value on error chan->mipi takes the return value of tegra_mipi_request() which can be a valid pointer or an error. However chan->mipi is checked in several places, including error-cleanup code in tegra_csi_channels_cleanup(), as 'if (chan->mipi)', which suggests the initial intent was that chan->mipi should be either NULL or a valid pointer, never an error. As a consequence, cleanup code in case of tegra_mipi_request() errors would dereference an invalid pointer. Fix by ensuring chan->mipi always contains either NULL or a void pointer. Also add that to the documentation. Fixes: 523c857e34ce ("media: tegra-video: Add CSI MIPI pads calibration") Cc: stable@vger.kernel.org Reported-by: Dan Carpenter Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil drivers/staging/media/tegra-video/csi.c | 1 + drivers/staging/media/tegra-video/csi.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 3a04d98608a0cee98b16e6640cff6237f9a7d03d Author: Jernej Skrabec Date: Wed Nov 2 19:08:08 2022 +0100 media: cedrus: initialize controls a bit later While it doesn't matter if controls are initialized before or after queues and formats from open handler standpoint, initializing them last helps keeping s_ctrl handler simpler, since everything has already valid values. This is just preparation for follow up changes. No functional change is intended. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e240c003a0e85282706b3e47408a74dbfade5e5a Author: Jernej Skrabec Date: Wed Nov 2 19:08:07 2022 +0100 media: cedrus: prefer untiled capture format While all generations of display engine on Allwinner SoCs support untiled format, only first generation supports tiled format. Let's move untiled format up, so it can be picked before tiled one. If Cedrus variant doesn't support untiled format, tiled will still be picked as default format. Acked-by: Paul Kocialkowski Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus_video.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4fc81c58d3a6467911ed0033af3e0fbe2ee48061 Author: Jernej Skrabec Date: Wed Nov 2 19:08:06 2022 +0100 media: cedrus: Remove cedrus_codec enum Last user of cedrus_codec enum is cedrus_engine_enable() but this argument is completely redundant. Same information can be obtained via source pixel format. Let's remove this argument and enum. No functional changes intended. Acked-by: Paul Kocialkowski Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus.h | 8 -------- drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 2 +- drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 2 +- drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 12 ++++++------ drivers/staging/media/sunxi/cedrus/cedrus_hw.h | 2 +- drivers/staging/media/sunxi/cedrus/cedrus_mpeg2.c | 2 +- drivers/staging/media/sunxi/cedrus/cedrus_vp8.c | 2 +- 7 files changed, 11 insertions(+), 19 deletions(-) commit 4e161728cffa8d6d46239006461986ad2a09a43e Author: Jernej Skrabec Date: Wed Nov 2 19:08:05 2022 +0100 media: cedrus: set codec ops immediately We'll need codec ops soon after output format is set in following commits. Let's move current codec setup to set output format callback. While at it, let's remove one level of indirection by changing current_codec to point to codec ops structure directly. Acked-by: Paul Kocialkowski Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus.c | 5 --- drivers/staging/media/sunxi/cedrus/cedrus.h | 3 +- drivers/staging/media/sunxi/cedrus/cedrus_dec.c | 4 +-- drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 6 ++-- drivers/staging/media/sunxi/cedrus/cedrus_video.c | 44 ++++++++++------------- 5 files changed, 25 insertions(+), 37 deletions(-) commit 05d13e270e89f317b4606e08563479dc7638a700 Author: Jernej Skrabec Date: Wed Nov 2 19:08:04 2022 +0100 media: cedrus: Filter controls based on capability Because not all Cedrus variants supports all codecs, controls should be registered only if codec related to individual control is supported by Cedrus. Replace codec enum, which is not used at all, with capabilities flags and register control only if capabilities are met. We have to be careful though, controls have to be tightly packed in ctx->ctrls array. Otherwise functions cedrus_find_control_data() and cedrus_get_num_of_controls() won't work properly. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus.c | 50 ++++++++++++++++------------- drivers/staging/media/sunxi/cedrus/cedrus.h | 2 +- 2 files changed, 28 insertions(+), 24 deletions(-) commit e7efb377ea50adf4a3583dd048453cca5f803775 Author: Jernej Skrabec Date: Wed Nov 2 19:08:03 2022 +0100 media: cedrus: Add helper for checking capabilities There is several different Cedrus cores with varying capabilities, so some operations like listing formats depends on checks if feature is supported or not. Currently check for capabilities is only in format handling functions, but it will be used also elsewhere later. Let's convert this check to helper and while at it, also simplify it. There is no need to check if capability mask is zero, condition will still work properly. No functional changes intended. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus.h | 6 ++++++ drivers/staging/media/sunxi/cedrus/cedrus_video.c | 24 ++++++++--------------- 2 files changed, 14 insertions(+), 16 deletions(-) commit bc603309688b77c848c00b9fa19a4fe0b9c677b6 Author: Jernej Skrabec Date: Wed Nov 2 19:08:02 2022 +0100 media: cedrus: use helper to set default formats Now that set output format helper is available, let's use that for setting default values. Advantage of this is that values will be always valid. Current code produced invalid default values for V3s SoC, which doesn't support MPEG2 decoding. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit b13ffeafc367d2286610636a41fc44f47daf245e Author: Jernej Skrabec Date: Wed Nov 2 19:08:01 2022 +0100 media: cedrus: Add format reset helpers By re-arranging try format handlers and set out format handler, we can easily implement reset out/cap format helpers. There is only one subtle, but important functional change. Capture pixel format will be reset each time output format is set. This is actually expected behaviour per stateless decoder API. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus_video.c | 100 ++++++++++++++-------- drivers/staging/media/sunxi/cedrus/cedrus_video.h | 2 + 2 files changed, 66 insertions(+), 36 deletions(-) commit d2dd4c67995d0789bdc773d03864393abaa52fc5 Author: Jernej Skrabec Date: Wed Nov 2 19:08:00 2022 +0100 media: cedrus: remove superfluous call cedrus_try_fmt_vid_out() is called two times inside cedrus_s_fmt_vid_out(), but nothing changes between calls which would influence output format. Remove first call, which was added later. Acked-by: Paul Kocialkowski Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus_video.c | 4 ---- 1 file changed, 4 deletions(-) commit 82b7d4b5d393d6654148e885efca0a3df63806f6 Author: Moudy Ho Date: Thu Oct 20 15:18:00 2022 +0800 media: platform: mtk-mdp3: fix error handling in mdp_probe() Adjust label "err_return" order to avoid double freeing, and add two labels for easy traceability. Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver") Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 74a596e7fca6d240d61def5f448e55c256c12fed Author: Moudy Ho Date: Thu Oct 20 15:17:59 2022 +0800 media: platform: mtk-mdp3: fix error handling about components clock_on Add goto statement in mdp_comp_clock_on() to avoid error code not being propagated or returning positive values. This change also performs a well-timed clock_off when an error occurs, and reduces unnecessary error logging in mdp_cmdq_send(). Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver") Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil .../media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 4 +--- .../media/platform/mediatek/mdp3/mtk-mdp3-comp.c | 24 ++++++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) commit 64e0a0804b1a7a77ee364f44ffa6a8e0e7b157d2 Author: Moudy Ho Date: Thu Oct 20 15:17:58 2022 +0800 media: platform: mtk-mdp3: fix error handling in mdp_cmdq_send() Increase and refine the goto label in mdp_cmdq_send() to avoid double free and facilitate traceability. Also, remove redundant work queue event in blocking function mdp_cmdq_send(). Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver") Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil .../media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 47 ++++++++++++---------- 1 file changed, 26 insertions(+), 21 deletions(-) commit fe4c63c1a4fa1be40102b9280e30dd0504de801b Author: Moudy Ho Date: Fri Oct 7 17:22:30 2022 +0800 media: platform: mtk-mdp3: extend shared memory structure to 4-byte aligned The communication between MDP3 kernel driver and SCP is pass through a shared memory, and the data structure is defined in the "mtk-img-ipi.h". However, there is a 4-byte read limit in further SCP hardware, so the data structure should be in 4-byte aligned. Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil drivers/media/platform/mediatek/mdp3/mtk-img-ipi.h | 76 +++++++++++----------- 1 file changed, 38 insertions(+), 38 deletions(-) commit 503fa23614dc95f96af883a8e2e873d5c6cd53d8 Author: Maciej W. Rozycki Date: Sat Sep 17 13:03:09 2022 +0100 PCI: Access Link 2 registers only for devices with Links PCIe r2.0, sec 7.8 added Link Capabilities/Status/Control 2 registers to the PCIe Capability with Capability Version 2. Previously we assumed these registers were implemented for all PCIe Capabilities of version 2 or greater, but in fact they are only implemented for devices with Links. Update pcie_capability_reg_implemented() to check whether the device has a Link. [bhelgaas: commit log, squash export] Link: https://lore.kernel.org/r/alpine.DEB.2.21.2209100057070.2275@angie.orcam.me.uk Link: https://lore.kernel.org/r/alpine.DEB.2.21.2209100057300.2275@angie.orcam.me.uk Signed-off-by: Maciej W. Rozycki Signed-off-by: Bjorn Helgaas drivers/pci/access.c | 8 +++++++- drivers/pci/pci.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) commit b8b80348c57b360019071e17380298619c5d8066 Author: Dmitry Torokhov Date: Sat Oct 29 21:40:47 2022 -0700 gpiolib: of: add polarity quirk for Freescale PCIe controller Bindings for Freescale PCIe controller use a separate property called "reset-gpio-active-high" to control polarity of its reset line, add it to the list of quirks in gpiolib so that gpiod API can be used in the driver. Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 34cb9352b62366038fd2d5b9d9f393f35d0be1e0 Author: Dmitry Torokhov Date: Sat Oct 29 21:40:46 2022 -0700 gpiolib: of: factor out quirk setting polarity via separate property Several legacy bindings use a separate property to specify polarity of GPIOs instead of specifying it directly in the GPIO property. Factor out this code to make it easier to add more such cases. Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 98 +++++++++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 45 deletions(-) commit d59fdbc7164a6b2a0ed45c13387deac8efeed5a2 Author: Andy Shevchenko Date: Thu Nov 3 22:30:05 2022 +0200 gpiolib: of: Make use of device_match_of_node() Make use of device_match_of_node() instead of open coding its functionality. Signed-off-by: Andy Shevchenko Reviewed-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9ce4db0ec2b6301f4264ba8627863e2632c922b Author: José Expósito Date: Sat Oct 29 18:12:40 2022 +0200 HID: uclogic: Add support for XP-PEN Deco LW The XP-PEN Deco LW is a UGEE v2 device with a frame with 8 buttons. Its pen has 2 buttons, supports tilt and pressure. It can be connected by USB cable or using a USB Bluetooth dongle to use it in wireless mode. When it is connected using the dongle, the device battery is used to power it. Its vendor, product and version are identical to the Deco L. The only difference reported by its firmware is the product name. In order to add support for battery reporting, add a new HID descriptor and a quirk to detect the wireless version of the tablet. Link: https://github.com/DIGImend/digimend-kernel-drivers/issues/635 Tested-by: Mia Kanashi Tested-by: Andreas Grosse Tested-by: Mia Kanashi Signed-off-by: José Expósito Signed-off-by: Jiri Kosina drivers/hid/hid-uclogic-params.c | 73 ++++++++++++++++++++++++++++++++++++++++ drivers/hid/hid-uclogic-rdesc.c | 34 +++++++++++++++++++ drivers/hid/hid-uclogic-rdesc.h | 7 ++++ 3 files changed, 114 insertions(+) commit 037c1aaeb96fe5f778026f4c1ef28b26cf600bfa Author: José Expósito Date: Sat Oct 29 18:12:39 2022 +0200 HID: input: do not query XP-PEN Deco LW battery The XP-PEN Deco LW drawing tablet can be connected by USB cable or using a USB Bluetooth dongle. When it is connected using the dongle, there might be a small delay until the tablet is paired with the dongle. Fetching the device battery during this delay results in random battery percentage values. Add a quirk to avoid actively querying the battery percentage and wait for the device to report it on its own. Reported-by: Mia Kanashi Tested-by: Mia Kanashi Signed-off-by: José Expósito Signed-off-by: Jiri Kosina drivers/hid/hid-input.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 739153a6ae6891ff42ed9dbbd8e72dd99e6c8ba5 Author: Yang Yingliang Date: Wed Nov 2 10:27:01 2022 +0800 Documentation: devres: add missing devm_acpi_dma_controller_free() helper Add missing devm_acpi_dma_controller_free() to devres.rst, it's introduced by commit 1b2e98bc1e35 ("dma: acpi-dma: introduce ACPI DMA helpers"). Fixes: 1b2e98bc1e35 ("dma: acpi-dma: introduce ACPI DMA helpers") Cc: Andy Shevchenko Cc: Mika Westerberg Cc: Rafael J. Wysocki Cc: Vinod Koul Cc: Jonathan Corbet Signed-off-by: Yang Yingliang Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221102022701.1407289-1-yangyingliang@huawei.com Signed-off-by: Vinod Koul Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) commit 17a36713babe882928b869b427729c85deeb1267 Author: Adam Skladowski Date: Sun Oct 30 11:42:53 2022 +0200 dt-bindings: dmaengine: qcom: gpi: add compatible for SM6115 Document the compatible for GPI DMA controller on SM6115 SoC. Signed-off-by: Adam Skladowski Signed-off-by: Iskren Chernev Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221030094258.486428-4-iskren.chernev@gmail.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 + 1 file changed, 1 insertion(+) commit b018899e620b8ee4529f43bd02e9e8e43043e33e Author: Arnaldo Carvalho de Melo Date: Fri Nov 4 11:45:36 2022 -0300 perf bpf: Rename perf_include_dir to libbpf_include_dir As this is where we expect to find bpf/bpf_helpers.h, etc. This needs more work to make it follow LIBBPF_DYNAMIC=1 usage, i.e. when not using the system libbpf it should use the headers in the in-kernel sources libbpf in tools/lib/bpf. We need to do that anyway to avoid this mixup system libbpf and in-kernel files, so we'll get this sorted out that way. And this also may become moot as we move to using BPF skels for this feature. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 12 ++++++------ tools/perf/util/Build | 2 +- tools/perf/util/llvm-utils.c | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) commit 9a8ddb35a9d5d3ad76784a012459b256a9d7de7e Author: Xiaochen Shen Date: Sat Oct 22 15:49:49 2022 +0800 dmaengine: idxd: Make read buffer sysfs attributes invisible for Intel IAA In current code, the following sysfs attributes are exposed to user to show or update the values: max_read_buffers (max_tokens) read_buffer_limit (token_limit) group/read_buffers_allowed (group/tokens_allowed) group/read_buffers_reserved (group/tokens_reserved) group/use_read_buffer_limit (group/use_token_limit) >From Intel IAA spec [1], Intel IAA does not support Read Buffer allocation control. So these sysfs attributes should not be supported on IAA device. Fix this issue by making these sysfs attributes invisible through is_visible() filter when the device is IAA. Add description in the ABI documentation to mention that these attributes are not visible when the device does not support Read Buffer allocation control. [1]: https://cdrdv2.intel.com/v1/dl/getContent/721858 Fixes: fde212e44f45 ("dmaengine: idxd: deprecate token sysfs attributes for read buffers") Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver") Signed-off-by: Xiaochen Shen Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20221022074949.11719-1-xiaochen.shen@intel.com Signed-off-by: Vinod Koul Documentation/ABI/stable/sysfs-driver-dma-idxd | 10 +++++++ drivers/dma/idxd/sysfs.c | 36 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit 3e98b9bd8469d0b78975be9b36e423b30b0badbe Author: Stephen Kitt Date: Fri Oct 28 13:53:36 2022 +0200 dmaengine: sh: Remove unused shdma-arm.h shdma-arm.h was introduced with commit 1e69653d40f1 ("DMA: shdma: add r8a73a4 DMAC data to the device ID table"), and its sole user was removed with commit a19788612f51 ("dmaengine: sh: Remove R-Mobile APE6 support"). The latter mentions r8a73a4.dtsi but shdma support was removed from that with commit cfda82037780 ("ARM: dts: r8a73a4: Remove non-functional DMA support"), so it seems this is safe to remove. Signed-off-by: Stephen Kitt Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221028115336.1052782-1-steve@sk2.org Signed-off-by: Vinod Koul drivers/dma/sh/shdma-arm.h | 48 ---------------------------------------------- 1 file changed, 48 deletions(-) commit 3cd65616f607cd3769647e2e0490e4048c0f289e Author: Arnaldo Carvalho de Melo Date: Fri Nov 4 11:15:51 2022 -0300 perf examples bpf: Remove augmented_syscalls.c, the raw_syscalls one should be used instead The attempt at using BPF to copy syscall pointer arguments to show them like strace does started with sys_{enter,exit}_SYSCALL_NAME tracepoints, in tools/perf/examples/bpf/augmented_syscalls.c, but then achieving this result using raw_syscalls:{enter,exit} and BPF tail calls was deemed more flexible. The 'perf trace' codebase was adapted to using it while trying to continue supporting the old style per-syscall tracepoints, which at some point became too unwieldly and now isn't working properly. So lets scale back and concentrate on the augmented_raw_syscalls.c model on the way to using BPF skeletons. For the same reason remove the etcsnoop.c example, that used the old style per-tp syscalls just for the 'open' and 'openat' syscalls, looking at the pathnames starting with "/etc/", we should be able to do this later using filters, after we move to BPF skels. The augmented_raw_syscalls.c one continues to work, now with libbpf 1.0, after Ian work on using the libbpf map style: # perf trace -e ~acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.c,open* --max-events 4 0.000 ping/194815 openat(dfd: CWD, filename: "/etc/hosts", flags: RDONLY|CLOEXEC) = 5 20.225 systemd-oomd/972 openat(dfd: CWD, filename: "/proc/meminfo", flags: RDONLY|CLOEXEC) = 12 20.285 abrt-dump-jour/1371 openat(dfd: CWD, filename: "/var/log/journal/d6a97235307247e09f13f326fb607e3c/system.journal", flags: RDONLY|CLOEXEC|NONBLOCK) = 21 20.301 abrt-dump-jour/1370 openat(dfd: CWD, filename: "/var/log/journal/d6a97235307247e09f13f326fb607e3c/system.journal", flags: RDONLY|CLOEXEC|NONBLOCK) = 21 # This is using this: # cat ~/.perfconfig [trace] show_zeros = yes show_duration = no no_inherit = yes args_alignment = 40 Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo tools/perf/examples/bpf/augmented_syscalls.c | 169 --------------------------- tools/perf/examples/bpf/etcsnoop.c | 76 ------------ 2 files changed, 245 deletions(-) commit cfddf0d4a5571bcc94760c27729a60daefda38bb Author: Ian Rogers Date: Wed Nov 2 21:54:37 2022 -0700 perf bpf: Remove now unused BPF headers Example code has migrated to use standard BPF header files, remove unnecessary perf equivalents. Update install step to not try to copy these. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221103045437.163510-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 5 --- tools/perf/include/bpf/bpf.h | 70 ----------------------------------- tools/perf/include/bpf/linux/socket.h | 24 ------------ tools/perf/include/bpf/pid_filter.h | 21 ----------- tools/perf/include/bpf/stdio.h | 16 -------- tools/perf/include/bpf/unistd.h | 10 ----- 6 files changed, 146 deletions(-) commit 71811e8c77e974a0ab978c86a2b32b3f2c82f455 Author: Ian Rogers Date: Wed Nov 2 21:54:36 2022 -0700 perf trace: 5sec fix libbpf 1.0+ compatibility Avoid use of tools/perf/include/bpf/bpf.h and use the more regular BPF headers. Committer testing: # perf trace -e ~acme/git/perf/tools/perf/examples/bpf/5sec.c sleep 5 0.000 perf_bpf_probe:hrtimer_nanosleep(__probe_ip: -1474734416, rqtp: 5000000000) # perf trace -e ~acme/git/perf/tools/perf/examples/bpf/5sec.c/max-stack=7/ sleep 5 0.000 perf_bpf_probe:hrtimer_nanosleep(__probe_ip: -1474734416, rqtp: 5000000000) hrtimer_nanosleep ([kernel.kallsyms]) common_nsleep ([kernel.kallsyms]) __x64_sys_clock_nanosleep ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe ([kernel.kallsyms]) __GI___clock_nanosleep (/usr/lib64/libc.so.6) [0] ([unknown]) # Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221103045437.163510-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/examples/bpf/5sec.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit baddab891a21e5870723d182020fec445b0874b3 Author: Ian Rogers Date: Wed Nov 2 21:54:35 2022 -0700 perf trace: empty fix libbpf 1.0+ compatibility Avoid use of tools/perf/include/bpf/bpf.h and use the more regular BPF headers. Add raw_syscalls:sys_enter to avoid the evlist being empty. Committer testing: # time perf trace -e ~acme/git/perf/tools/perf/examples/bpf/empty.c sleep 5 real 0m5.697s user 0m0.217s sys 0m0.453s # I.e. it sets up everything successfully (use -v to see the details) and filters out all syscalls, then exits when the workload (sleep 5) finishes. Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221103045437.163510-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/examples/bpf/empty.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit bac4ccce72f750ff015994d85fbe622df90d60f3 Author: Dmitry Baryshkov Date: Thu Nov 3 02:13:02 2022 +0300 dt-bindings: display/msm/dsi-controller-main: allow defining opp-table Allow defining DSI OPP table inside the DSI controller node. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml | 3 +++ 1 file changed, 3 insertions(+) commit cc84b66be223d36a3d10d59d68ba647e72db3099 Author: Marijn Suijten Date: Wed Oct 26 20:28:24 2022 +0200 drm/msm/dsi: Prevent signed BPG offsets from bleeding into adjacent bits The bpg_offset array contains negative BPG offsets which fill the full 8 bits of a char thanks to two's complement: this however results in those bits bleeding into the next field when the value is packed into DSC PPS by the drm_dsc_helper function, which only expects range_bpg_offset to contain 6-bit wide values. As a consequence random slices appear corrupted on-screen (tested on a Sony Tama Akatsuki device with sdm845). Use AND operators to limit these two's complement values to 6 bits, similar to the AMD and i915 drivers. Fixes: b9080324d6ca ("drm/msm/dsi: add support for dsc data") Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Signed-off-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/508941/ Link: https://lore.kernel.org/r/20221026182824.876933-11-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/dsi_host.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0b55f6bc46be7a6f90ebae4666b7463b666958ee Author: Marijn Suijten Date: Wed Oct 26 20:28:23 2022 +0200 drm/msm/dpu1: Account for DSC's bits_per_pixel having 4 fractional bits According to the comment this DPU register contains the bits per pixel as a 6.4 fractional value, conveniently matching the contents of bits_per_pixel in struct drm_dsc_config which also uses 4 fractional bits. However, the downstream source this implementation was copy-pasted from has its bpp field stored _without_ fractional part. This makes the entire convoluted math obsolete as it is impossible to pull those 4 fractional bits out of thin air, by somehow trying to reuse the lowest 2 bits of a non-fractional bpp (lsb = bpp % 4??). The rest of the code merely attempts to keep the integer part a multiple of 4, which is rendered useless thanks to data |= dsc->bits_per_pixel << 12; already filling up those bits anyway (but not on downstream). Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Marijn Suijten Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Reviewed-by: Vinod Koul Patchwork: https://patchwork.freedesktop.org/patch/508946/ Link: https://lore.kernel.org/r/20221026182824.876933-10-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit d053fbc449c47517b1f6516dbce2f917f2a9f51d Author: Marijn Suijten Date: Wed Oct 26 20:28:22 2022 +0200 drm/msm/dsi: Disallow 8 BPC DSC configuration for alternative BPC values According to the `/* bpc 8 */` comment below only values for a bits_per_component of 8 are currently hardcoded in place. This is further confirmed by downstream sources [1] containing different constants for other BPC values (and different initial_offset too, with an extra dependency on bits_per_pixel). Prevent future mishaps by explicitly disallowing any other bits_per_component value until the right parameters are put in place and tested. [1]: https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers/-/blob/DISPLAY.LA.2.0.r1-08000-WAIPIO.0/msm/sde_dsc_helper.c#L110-139 Fixes: b9080324d6ca ("drm/msm/dsi: add support for dsc data") Reviewed-by: Dmitry Baryshkov Signed-off-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/508942/ Link: https://lore.kernel.org/r/20221026182824.876933-9-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/dsi_host.c | 5 +++++ 1 file changed, 5 insertions(+) commit d2c277c61986942e99680cb67ce26423d0f42f11 Author: Marijn Suijten Date: Wed Oct 26 20:28:21 2022 +0200 drm/msm/dsi: Account for DSC's bits_per_pixel having 4 fractional bits drm_dsc_config's bits_per_pixel field holds a fractional value with 4 bits, which all panel drivers should adhere to for drm_dsc_pps_payload_pack() to generate a valid payload. All code in the DSI driver here seems to assume that this field doesn't contain any fractional bits, hence resulting in the wrong values being computed. Since none of the calculations leave any room for fractional bits or seem to indicate any possible area of support, disallow such values altogether. calculate_rc_params() in intel_vdsc.c performs an identical bitshift to get at this integer value. Fixes: b9080324d6ca ("drm/msm/dsi: add support for dsc data") Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Signed-off-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/508938/ Link: https://lore.kernel.org/r/20221026182824.876933-8-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/dsi_host.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit c3a1aabce2d4087255de90100c3dad492e7d925c Author: Marijn Suijten Date: Wed Oct 26 20:28:20 2022 +0200 drm/msm/dsi: Migrate to drm_dsc_compute_rc_parameters() As per the FIXME this code is entirely duplicate with what is already provided inside drm_dsc_compute_rc_parameters(), supposedly because that function was yielding "incorrect" results while in reality the panel driver(s?) used for testing were providing incorrect parameters. For example, this code from downstream assumed dsc->bits_per_pixel to contain an integer value, whereas the upstream drm_dsc_config struct stores it with 4 fractional bits. drm_dsc_compute_rc_parameters() already accounts for this feat while the panel driver used for testing [1] wasn't, hence making drm_dsc_compute_rc_parameters() seem like it was returning an incorrect result. Other users of dsc->bits_per_pixel inside dsi_populate_dsc_params() also treat it in the same erroneous way, and will be addressed in a separate patch. In the end, using drm_dsc_compute_rc_parameters() spares both a lot of duplicate code and erratic behaviour. [1]: https://git.linaro.org/people/vinod.koul/kernel.git/commit/?h=topic/pixel3_5.18-rc1&id=1d7d98ad564f1ec69e7525e07418918d90f247a1 Fixes: b9080324d6ca ("drm/msm/dsi: add support for dsc data") Reviewed-by: Abhinav Kumar Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508939/ Link: https://lore.kernel.org/r/20221026182824.876933-7-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/dsi_host.c | 64 ++++---------------------------------- 1 file changed, 6 insertions(+), 58 deletions(-) commit 0ca870ca304d3449b2ccdc3f0bad9843ff1519f0 Author: Marijn Suijten Date: Wed Oct 26 20:28:19 2022 +0200 drm/msm/dsi: Appropriately set dsc->mux_word_size based on bpc This field is currently unread but will come into effect when duplicated code below is migrated to call drm_dsc_compute_rc_parameters(), which uses the bpc-dependent value of the local variable mux_words_size in much the same way. The hardcoded constant seems to be a remnant from the `/* bpc 8 */` comment right above, indicating that this group of field assignments is applicable to bpc = 8 exclusively and should probably bail out on different bpc values, until constants for other bpc values are added (or the current ones are confirmed to be correct across multiple bpc's). Fixes: b9080324d6ca ("drm/msm/dsi: add support for dsc data") Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Signed-off-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/508943/ Link: https://lore.kernel.org/r/20221026182824.876933-6-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e443459e2e6b8e0d3187dd0d09ef7fcea87531d2 Author: Marijn Suijten Date: Wed Oct 26 20:28:18 2022 +0200 drm/msm/dsi: Reuse earlier computed dsc->slice_chunk_size dsi_populate_dsc_params() is called prior to dsi_update_dsc_timing() and already computes a value for slice_chunk_size, whose value doesn't need to be recomputed and re-set here. Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Signed-off-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/508934/ Link: https://lore.kernel.org/r/20221026182824.876933-5-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/dsi_host.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 1e8196103bd02a396b45c8f6188541634a47fce2 Author: Marijn Suijten Date: Wed Oct 26 20:28:17 2022 +0200 drm/msm/dsi: Use DIV_ROUND_UP instead of conditional increment on modulo This exact same math is used to compute bytes_in_slice above in dsi_update_dsc_timing(), also used to fill slice_chunk_size. Fixes: b9080324d6ca ("drm/msm/dsi: add support for dsc data") Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Signed-off-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/508935/ Link: https://lore.kernel.org/r/20221026182824.876933-4-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/dsi_host.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 170ffca836dd9f1a0219c4f67554d408fa2b5912 Author: Marijn Suijten Date: Wed Oct 26 20:28:16 2022 +0200 drm/msm/dsi: Remove repeated calculation of slice_per_intf slice_per_intf is already computed for intf_width, which holds the same value as hdisplay. Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Reviewed-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Reviewed-by: Vinod Koul Reviewed-by: Dmitry Baryshkov Signed-off-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/508933/ Link: https://lore.kernel.org/r/20221026182824.876933-3-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/dsi_host.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 01a907980e0be3310f18c7d4955968f3b28e7147 Author: Marijn Suijten Date: Wed Oct 26 20:28:15 2022 +0200 drm/msm/dsi: Remove useless math in DSC calculations Multiplying a value by 2 and adding 1 to it always results in a value that is uneven, and that 1 gets truncated immediately when performing integer division by 2 again. There is no "rounding" possible here. After that target_bpp_x16 is used to store a multiplication of bits_per_pixel by 16 which is only ever read to immediately be divided by 16 again, and is elided in much the same way. Fixes: b9080324d6ca ("drm/msm/dsi: add support for dsc data") Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Signed-off-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/508932/ Link: https://lore.kernel.org/r/20221026182824.876933-2-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/dsi_host.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 572e9fd6d14a4568ee731c84e54ceaa243c82408 Author: Loic Poulain Date: Sat Sep 24 15:19:00 2022 +0300 drm/msm/dsi: Add phy configuration for QCM2290 The QCM2290 SoC a the 14nm (V2.0) single DSI phy. The platform is not fully compatible with the standard 14nm PHY, so it requires a separate compatible and config entry. Signed-off-by: Loic Poulain [DB: rebased and updated commit msg] Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/504578/ Link: https://lore.kernel.org/r/20220924121900.222711-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 2 ++ drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 1 + drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) commit 2387771f45042ca05eeeeca2e802a65910c499cf Author: Loic Poulain Date: Sat Sep 24 15:18:59 2022 +0300 dt-bindings: display/msm: Add QCM2290 DSI phy QCM2290 platform uses the 14nm DSI PHY driver. Signed-off-by: Loic Poulain Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/504579/ Link: https://lore.kernel.org/r/20220924121900.222711-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml | 1 + 1 file changed, 1 insertion(+) commit e512ed607fdac79b25448d4f2a4a8e8b6d546a02 Author: Johan Hovold Date: Tue Sep 13 10:53:20 2022 +0200 drm/msm/dsi: drop modeset sanity checks Drop the overly defensive modeset sanity checks of function parameters which have already been checked or used by the callers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/502678/ Link: https://lore.kernel.org/r/20220913085320.8577-11-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dsi/dsi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d3c1a8663d0ddb74eaa51121ccbb8340739a12a8 Author: Marijn Suijten Date: Wed Oct 26 20:28:23 2022 +0200 drm/msm/dpu1: Account for DSC's bits_per_pixel having 4 fractional bits According to the comment this DPU register contains the bits per pixel as a 6.4 fractional value, conveniently matching the contents of bits_per_pixel in struct drm_dsc_config which also uses 4 fractional bits. However, the downstream source this implementation was copy-pasted from has its bpp field stored _without_ fractional part. This makes the entire convoluted math obsolete as it is impossible to pull those 4 fractional bits out of thin air, by somehow trying to reuse the lowest 2 bits of a non-fractional bpp (lsb = bpp % 4??). The rest of the code merely attempts to keep the integer part a multiple of 4, which is rendered useless thanks to data |= dsc->bits_per_pixel << 12; already filling up those bits anyway (but not on downstream). Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Marijn Suijten Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Reviewed-by: Vinod Koul Patchwork: https://patchwork.freedesktop.org/patch/508946/ Link: https://lore.kernel.org/r/20221026182824.876933-10-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit f94eff09f3f36902a2996f075719b289cb91d758 Author: Johan Hovold Date: Tue Sep 13 10:53:19 2022 +0200 drm/msm/dp: drop modeset sanity checks Drop the overly defensive modeset sanity checks of function parameters which have already been checked or used by the callers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/502674/ Link: https://lore.kernel.org/r/20220913085320.8577-10-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dp/dp_display.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 514607e3c0f0e381aa4f6fe866b70b1fa9bfae74 Author: Ian Rogers Date: Wed Nov 2 21:54:34 2022 -0700 perf trace: hello fix libbpf 1.0+ compatibility Don't use deprecated and now broken map style. Avoid use of tools/perf/include/bpf/bpf.h and use the more regular BPF headers. Switch to raw_syscalls:sys_enter to avoid the evlist being empty and fixing generating output. Committer testing: # perf trace -e ~acme/git/perf/tools/perf/examples/bpf/hello.c --call-graph=dwarf --max-events 5 0.000 perf/206852 __bpf_stdout__(Hello, world) syscall_trace_enter.constprop.0 ([kernel.kallsyms]) syscall_trace_enter.constprop.0 ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe ([kernel.kallsyms]) __GI___sched_setaffinity_new (/usr/lib64/libc.so.6) 8.561 pipewire/2290 __bpf_stdout__(Hello, world) syscall_trace_enter.constprop.0 ([kernel.kallsyms]) syscall_trace_enter.constprop.0 ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe ([kernel.kallsyms]) __libc_read (/usr/lib64/libc.so.6) 8.571 pipewire/2290 __bpf_stdout__(Hello, world) syscall_trace_enter.constprop.0 ([kernel.kallsyms]) syscall_trace_enter.constprop.0 ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe ([kernel.kallsyms]) __GI___ioctl (/usr/lib64/libc.so.6) 8.586 pipewire/2290 __bpf_stdout__(Hello, world) syscall_trace_enter.constprop.0 ([kernel.kallsyms]) syscall_trace_enter.constprop.0 ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe ([kernel.kallsyms]) __GI___write (/usr/lib64/libc.so.6) 8.592 pipewire/2290 __bpf_stdout__(Hello, world) syscall_trace_enter.constprop.0 ([kernel.kallsyms]) syscall_trace_enter.constprop.0 ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe ([kernel.kallsyms]) __timerfd_settime (/usr/lib64/libc.so.6) # Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221103045437.163510-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/examples/bpf/hello.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 14e4b9f4289aed2c8d4858cd750748041b6c434f Author: Ian Rogers Date: Wed Nov 2 21:54:31 2022 -0700 perf trace: Raw augmented syscalls fix libbpf 1.0+ compatibility Don't use deprecated and now broken map style. Avoid use of tools/perf/include/bpf/bpf.h and use the more regular BPF headers. Committer notes: Add /usr/include to the include path so that bpf/bpf_helpers.h can be found, remove sys/socket.h, adding the sockaddr_storage definition, also remove stdbool.h, both were preventing building the augmented_raw_syscalls.c file with clang, revisit later. Testing it: Asking for syscalls that have string arguments: # perf trace -e ~acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.c,string --max-events 10 0.000 thermald/1144 openat(dfd: CWD, filename: "/sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:2/energy_uj", flags: RDONLY) = 13 0.158 thermald/1144 openat(dfd: CWD, filename: "/sys/class/powercap/intel-rapl/intel-rapl:0/energy_uj", flags: RDONLY) = 13 0.215 thermald/1144 openat(dfd: CWD, filename: "/sys/class/thermal/thermal_zone3/temp", flags: RDONLY) = 13 16.448 cgroupify/36478 openat(dfd: 4, filename: ".", flags: RDONLY|CLOEXEC|DIRECTORY|NONBLOCK) = 5 16.468 cgroupify/36478 newfstatat(dfd: 5, filename: "", statbuf: 0x7fffca5b4130, flag: 4096) = 0 16.473 systemd-oomd/972 openat(dfd: CWD, filename: "/proc/meminfo", flags: RDONLY|CLOEXEC) = 12 16.499 systemd-oomd/972 newfstatat(dfd: 12, filename: "", statbuf: 0x7ffd2bc73cc0, flag: 4096) = 0 16.516 abrt-dump-jour/1370 openat(dfd: CWD, filename: "/var/log/journal/d6a97235307247e09f13f326fb607e3c/system.journal", flags: RDONLY|CLOEXEC|NONBLOCK) = 21 16.538 abrt-dump-jour/1370 newfstatat(dfd: 21, filename: "", statbuf: 0x7ffc651b8980, flag: 4096) = 0 16.540 abrt-dump-jour/1371 openat(dfd: CWD, filename: "/var/log/journal/d6a97235307247e09f13f326fb607e3c/system.journal", flags: RDONLY|CLOEXEC|NONBLOCK) = 21 # Networking syscalls: # perf trace -e ~acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.c,sendto*,connect* --max-events 10 0.000 isc-net-0005/1206 connect(fd: 512, uservaddr: { .family: INET, port: 53, addr: 23.211.132.65 }, addrlen: 16) = 0 0.070 isc-net-0002/1203 connect(fd: 515, uservaddr: { .family: INET6, port: 53, addr: 2600:1401:2::43 }, addrlen: 28) = -1 ENETUNREACH (Network is unreachable) 0.031 isc-net-0006/1207 connect(fd: 513, uservaddr: { .family: INET6, port: 53, addr: 2600:1401:2::43 }, addrlen: 28) = -1 ENETUNREACH (Network is unreachable) 0.079 isc-net-0006/1207 sendto(fd: 3, buff: 0x7f73a40611b0, len: 106, flags: NOSIGNAL, addr: { .family: UNSPEC }, addr_len: NULL) = 106 0.180 isc-net-0006/1207 connect(fd: 519, uservaddr: { .family: INET6, port: 53, addr: 2600:1401:1::43 }, addrlen: 28) = -1 ENETUNREACH (Network is unreachable) 0.211 isc-net-0006/1207 sendto(fd: 3, buff: 0x7f73a4061230, len: 106, flags: NOSIGNAL, addr: { .family: UNSPEC }, addr_len: NULL) = 106 0.298 isc-net-0006/1207 connect(fd: 515, uservaddr: { .family: INET, port: 53, addr: 96.7.49.67 }, addrlen: 16) = 0 0.109 isc-net-0004/1205 connect(fd: 518, uservaddr: { .family: INET6, port: 53, addr: 2600:1401:2::43 }, addrlen: 28) = -1 ENETUNREACH (Network is unreachable) 0.164 isc-net-0002/1203 sendto(fd: 3, buff: 0x7f73ac064300, len: 107, flags: NOSIGNAL, addr: { .family: UNSPEC }, addr_len: NULL) = 107 0.247 isc-net-0002/1203 connect(fd: 522, uservaddr: { .family: INET6, port: 53, addr: 2600:1401:1::43 }, addrlen: 28) = -1 ENETUNREACH (Network is unreachable) # Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221103045437.163510-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 3 +- tools/perf/examples/bpf/augmented_raw_syscalls.c | 103 +++++++++++++++++++---- tools/perf/util/llvm-utils.c | 2 +- 3 files changed, 89 insertions(+), 19 deletions(-) commit 73f11324738a4c23159cf22b08225b6642232982 Author: Radhey Shyam Pandey Date: Tue Oct 25 13:12:17 2022 +0530 dmaengine: xilinx_dma : add xilinx_dma_device_config() return documentation document xilinx_dma_device_config() return value. Fixes below kernel-doc warning. xilinx_dma.c:1665: warning: No description found for return value of 'xilinx_dma_device_config' Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1666683737-7668-3-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 2 ++ 1 file changed, 2 insertions(+) commit a92b744f28e86e05514e6bbd889131f6693b6eed Author: Radhey Shyam Pandey Date: Tue Oct 25 13:12:16 2022 +0530 dmaengine: xilinx_dma: fix xilinx_dma_child_probe() return documentation Modify xilinx_dma_child_probe() return documentation to be inline with implementation i.e. can also return failure value on error. Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1666683737-7668-2-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cccc46ae362398e43c6b8be38fdb7e39def9e21b 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. Signed-off-by: Arnd Bergmann Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221021203329.4143397-14-arnd@kernel.org Signed-off-by: Vinod Koul drivers/dma/Kconfig | 12 - drivers/dma/Makefile | 1 - drivers/dma/s3c24xx-dma.c | 1428 ----------------------------- include/linux/platform_data/dma-s3c24xx.h | 48 - 4 files changed, 1489 deletions(-) commit 80629af0f3e438b94532cf88f3fb53c711f95138 Author: Lukas Bulwahn Date: Thu Oct 20 10:21:03 2022 +0200 MAINTAINERS: remove section INTEL IOP-ADMA DMA DRIVER Commit cd0ab43ec91a ("dmaengine: remove iop-adma driver") removes the driver's source code, but misses to remove the MAINTAINERS section. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken file pattern. Remove the INTEL IOP-ADMA DMA DRIVER section pointing to the removed driver. Signed-off-by: Lukas Bulwahn Acked-by: Dan Williams Link: https://lore.kernel.org/r/20221020082103.29218-1-lukas.bulwahn@gmail.com Signed-off-by: Vinod Koul MAINTAINERS | 5 ----- 1 file changed, 5 deletions(-) commit 6f7de35b50860c345babf8ed0aa0d75f9315eee4 Author: Matthew Auld Date: Fri Oct 28 14:06:35 2022 +0100 drm/i915/userptr: restore probe_range behaviour The conversion looks harmless, however the addr value is updated inside the loop with the previous vm_end, which then incorrectly leads to for_each_vma_range() iterating over stuff outside the range we care about. Fix this by storing the end value separately. Also fix the case where the range doesn't intersect with any vma, or if the vma itself doesn't extend the entire range, which must mean we have hole at the end. Both should result in an error, as per the previous behaviour. v2: Fix the cases where the range is empty, or if there's a hole at the end of the range Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7247 Testcase: igt@gem_userptr_blits@probe Fixes: f683b9d61319 ("i915: use the VMA iterator") Reported-by: kernel test robot Signed-off-by: Matthew Auld Cc: Tvrtko Ursulin Cc: Matthew Wilcox (Oracle) Cc: Liam R. Howlett Cc: Vlastimil Babka Cc: Yu Zhao Reviewed-by: Liam R. Howlett Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20221028130635.465839-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a8300c46385e357079248302722d2f6b48adcba1 Author: Thomas Zimmermann Date: Thu Nov 3 11:16:27 2022 +0100 drm/ofdrm: Cast error pointers to void __iomem * Cast error pointers when returning them as void __iomem *. Fixes a number of Sparse warnings, such as the ones shown below. ../drivers/gpu/drm/tiny/ofdrm.c:439:31: warning: incorrect type in return expression (different address spaces) ../drivers/gpu/drm/tiny/ofdrm.c:439:31: expected void [noderef] __iomem * ../drivers/gpu/drm/tiny/ofdrm.c:439:31: got void * ../drivers/gpu/drm/tiny/ofdrm.c:442:31: warning: incorrect type in return expression (different address spaces) ../drivers/gpu/drm/tiny/ofdrm.c:442:31: expected void [noderef] __iomem * ../drivers/gpu/drm/tiny/ofdrm.c:442:31: got void * See [1] for the bug report. v3: * use IOMEM_ERR_PTR() (Javier) Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/dri-devel/202210200016.yiQzPIy0-lkp@intel.com/ # [1] Link: https://patchwork.freedesktop.org/patch/msgid/20221103101627.32502-3-tzimmermann@suse.de drivers/gpu/drm/tiny/ofdrm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e67e865b90b511bf78357ff36fdef99627d829c9 Author: Thomas Zimmermann Date: Thu Nov 3 11:16:26 2022 +0100 drm/ofdrm: Convert PCI IDs to CPU endianness for comparing Properties of 32-bit integers are returned from the OF device tree as type __be32. Convert PCI vendor and device IDs from __be32 to host endianness before comparing them to constants. All relevant machines are old, big-endian Macintosh systems; hence the bug never happened in practice. Fixes sparse warnings shown below. drivers/gpu/drm/tiny/ofdrm.c:237:17: warning: restricted __be32 degrades to integer drivers/gpu/drm/tiny/ofdrm.c:238:18: warning: restricted __be32 degrades to integer drivers/gpu/drm/tiny/ofdrm.c:238:54: warning: restricted __be32 degrades to integer See [1] for the bug report. v2: * convert endianness (Alex) Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/dri-devel/202210192208.D888I6X7-lkp@intel.com/ # [1] Link: https://patchwork.freedesktop.org/patch/msgid/20221103101627.32502-2-tzimmermann@suse.de drivers/gpu/drm/tiny/ofdrm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 6c6871cdaef96361f6b79a3e45d451a6475df4d6 Author: Geert Uytterhoeven Date: Fri Nov 4 11:01:27 2022 +0100 spi: Merge spi_controller.{slave,target}_abort() Mixing SPI slave/target handlers and SPI slave/target controllers using legacy and modern naming does not work well: there are now two different callbacks for aborting a slave/target operation, of which only one is populated, while spi_{slave,target}_abort() check and use only one, which may be the unpopulated one. Fix this by merging the slave/target abort callbacks into a single callback using a union, like is already done for the slave/target flags. Fixes: b8d3b056a78dcc94 ("spi: introduce new helpers with using modern naming") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/809c82d54b85dd87ef7ee69fc93016085be85cec.1667555967.git.geert+renesas@glider.be Signed-off-by: Mark Brown include/linux/spi/spi.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 43736546404368c3e4c6fb4326d843965fcc991e Author: Dmitry Baryshkov Date: Fri Aug 26 12:39:27 2022 +0300 drm/msm/hdmi: move msm_hdmi_get_phy() to msm_hdmi_dev_probe() To continue the idea of failing the probe() rather than failing the bind(), move the call to msm_hdmi_get_phy() function to msm_hdmi_dev_probe(), so that the driver fails the probe if PHY is not yet available rather than succeeding the probe and then failing the bind() with -EPROBE_DEFER. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/499652/ Link: https://lore.kernel.org/r/20220826093927.851597-6-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) commit 248adb815bc138e9d7d73a73c608b87b080d3740 Author: Dmitry Baryshkov Date: Fri Aug 26 12:39:26 2022 +0300 drm/msm/hdmi: don't take extra reference on PHY device The of_find_device_by_node() already increments the device's usage count, so there is no need to increment it again using get_device(). Drop this extra get_device(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/499648/ Link: https://lore.kernel.org/r/20220826093927.851597-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69a88d8633ecc577cb6915a4050ec1e7a4099814 Author: Dmitry Baryshkov Date: Fri Aug 26 12:39:25 2022 +0300 drm/msm/hdmi: move resource allocation to probe function Rather than having all resource allocation happen in the _bind function (resulting in possible EPROBE_DEFER returns and component bind/unbind cycles) allocate and check all resources in _probe function. While we are at it, use platform_get_irq() to get the IRQ rather than going through the irq_of_parse_and_map(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/499649/ Link: https://lore.kernel.org/r/20220826093927.851597-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 304 ++++++++++++++++++---------------------- 1 file changed, 138 insertions(+), 166 deletions(-) commit 4b19211435950a78af032c26ad64a5268e6012be Author: syed saba kareem Date: Fri Nov 4 17:39:07 2022 +0530 ASoC: amd: fix ACP version typo mistake Pink Sardine is based on ACP6.3 architecture. This patch fixes the typo mistake acp6.2 -> acp6.3 Signed-off-by: syed saba kareem Link: https://lore.kernel.org/r/20221104121001.207992-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown ...chip_offset_byte.h => acp63_chip_offset_byte.h} | 2 +- sound/soc/amd/Kconfig | 4 +- sound/soc/amd/ps/{acp62.h => acp63.h} | 10 +- sound/soc/amd/ps/pci-ps.c | 132 +++++++-------- sound/soc/amd/ps/ps-mach.c | 30 ++-- sound/soc/amd/ps/ps-pdm-dma.c | 188 ++++++++++----------- 6 files changed, 183 insertions(+), 183 deletions(-) commit ab8ec07922541d675db7105fd8174bc18f8bec64 Author: Cristian Ciocaltea Date: Tue Oct 18 00:05:42 2022 +0300 riscv: dts: starfive: Add StarFive VisionFive V1 device tree Add initial device tree for the StarFive VisionFive V1 SBC, which is similar with the already supported BeagleV Starlight Beta board, both being based on the StarFive JH7100 SoC. Link: https://github.com/starfive-tech/VisionFive Signed-off-by: Cristian Ciocaltea Reviewed-by: Conor Dooley Reviewed-by: Matthias Brugger Signed-off-by: Conor Dooley arch/riscv/boot/dts/starfive/Makefile | 2 +- .../dts/starfive/jh7100-starfive-visionfive-v1.dts | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) commit 5076da2a89ba7529e30f5112b5a3e3baeb7c1396 Author: Cristian Ciocaltea Date: Tue Oct 18 00:05:41 2022 +0300 riscv: dts: starfive: Add common DT for JH7100 based boards In preparation for adding initial device tree support for the StarFive VisionFive board, which is similar with BeagleV Starlight, move most of the content from jh7100-beaglev-starlight.dts to a new file, to be shared between the two boards. Signed-off-by: Cristian Ciocaltea Reviewed-by: Conor Dooley Reviewed-by: Matthias Brugger Signed-off-by: Conor Dooley .../boot/dts/starfive/jh7100-beaglev-starlight.dts | 153 +------------------- arch/riscv/boot/dts/starfive/jh7100-common.dtsi | 161 +++++++++++++++++++++ 2 files changed, 162 insertions(+), 152 deletions(-) commit bd51ad582163b6532ea23a353eebd180472b2a5a Author: Cristian Ciocaltea Date: Tue Oct 18 00:05:40 2022 +0300 dt-bindings: riscv: starfive: Add StarFive VisionFive V1 board Document the compatibles for StarFive VisionFive V1 SBC. The board is based on the StarFive JH7100 SoC. Link: https://github.com/starfive-tech/VisionFive Signed-off-by: Cristian Ciocaltea Reviewed-by: Conor Dooley Reviewed-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger Signed-off-by: Conor Dooley Documentation/devicetree/bindings/riscv/starfive.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 47078311b8efebdefd5b3b2f87e2b02b14f49c66 Author: Yuan Can Date: Fri Nov 4 06:45:12 2022 +0000 drm/ingenic: Fix missing platform_driver_unregister() call in ingenic_drm_init() A problem about modprobe ingenic-drm failed is triggered with the following log given: [ 303.561088] Error: Driver 'ingenic-ipu' is already registered, aborting... modprobe: ERROR: could not insert 'ingenic_drm': Device or resource busy The reason is that ingenic_drm_init() returns platform_driver_register() directly without checking its return value, if platform_driver_register() failed, it returns without unregistering ingenic_ipu_driver_ptr, resulting the ingenic-drm can never be installed later. A simple call graph is shown as below: ingenic_drm_init() platform_driver_register() # ingenic_ipu_driver_ptr are registered platform_driver_register() driver_register() bus_add_driver() priv = kzalloc(...) # OOM happened # return without unregister ingenic_ipu_driver_ptr Fixing this problem by checking the return value of platform_driver_register() and do platform_unregister_drivers() if error happened. Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU") Signed-off-by: Yuan Can Cc: stable@vger.kernel.org Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20221104064512.8569-1-yuancan@huawei.com drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit bd954a7e4aa0739630884fc572d2d0e4dcd16e25 Author: Bitterblue Smith Date: Tue Nov 1 22:35:36 2022 +0200 wifi: rtl8xxxu: Use dev_* instead of pr_info Replace two instances of bare pr_info with dev_info and dev_warn. Also make their messages a little more informative. Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/c9f3ebb2-769b-7d80-cac2-5a9d1bcc010a@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e952deaa95bae89663a75d855a7e61a40f534fb0 Author: Bitterblue Smith Date: Tue Nov 1 22:34:37 2022 +0200 wifi: rtl8xxxu: Set IEEE80211_HW_SUPPORT_FAST_XMIT According to commit 60d7900dcb98 ("wlcore: enable IEEE80211_HW_SUPPORT_FAST_XMIT"), we can use this because all the chips have hardware rate control. This is one of the things mac80211 requires before it will handle MSDU aggregation for us. Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/9b59e735-6b89-a557-fafc-2da87fdd5b48@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 1 + 1 file changed, 1 insertion(+) commit 7b0ac469e331d9f9fd77f4ebb7a6322f5562db67 Author: Bitterblue Smith Date: Tue Nov 1 22:33:49 2022 +0200 wifi: rtl8xxxu: Recognise all possible chip cuts The chip cut, also known as the chip version, is a letter from A (0) to P (15). Recognise them all instead of printing "unknown" when it's greater than E. Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1559c705-0b0b-8dcb-7596-fbb85844d3d9@gmail.com .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 26 +++++----------------- 1 file changed, 5 insertions(+), 21 deletions(-) commit 2ad2a813b803593832fa10b2c3d6d6065aec17ad Author: Bitterblue Smith Date: Tue Nov 1 22:33:09 2022 +0200 wifi: rtl8xxxu: Fix the CCK RSSI calculation The CCK RSSI calculation is incorrect for the RTL8723BU, RTL8192EU, and RTL8188FU. Add new functions for these chips with code copied from their vendor drivers. Use the old code only for the RTL8723AU and RTL8192CU. I didn't notice any difference in the reported signal strength with my RTL8188FU, but I didn't look very hard either. Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/926c838f-4997-698b-4da9-44582e2af99a@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 3 ++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 32 ++++++++++++++++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 23 +++++++++++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 23 +++++++++++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 29 +++++++++++++++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 38 ++++++++++++++-------- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 3 ++ 8 files changed, 138 insertions(+), 14 deletions(-) commit 57b328bc79967a2392af6ac724d3fd36322cd7f2 Author: Bitterblue Smith Date: Tue Nov 1 22:31:33 2022 +0200 wifi: rtl8xxxu: Add central frequency offset tracking According to Realtek programmers, "to adjust oscillator to align central frequency of connected AP. Then, it can yield better performance." From commit fb8517f4fade ("rtw88: 8822c: add CFO tracking"). The RTL8192CU and a version of RTL8723AU apparently don't have the ability to adjust the oscillator, so this doesn't apply to them. This also doesn't apply to the wifi + bluetooth combo chips (RTL8723AU and RTL8723BU) because the CFO tracking should only be done when bluetooth is disabled, and determining that looked complicated. That leaves only the RTL8192EU and RTL8188FU chips. I tested this with the latter. Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/80aba428-0aff-f4b2-dea5-35d1425982b6@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 21 +++- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 39 ++++-- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 4 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 38 +++++- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 4 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 137 +++++++++++++++++++-- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 1 + 7 files changed, 212 insertions(+), 32 deletions(-) commit 683b9728f28895660c66da250cd31654b8fcbc6e Author: Jisoo Jang Date: Wed Nov 2 03:36:42 2022 +0900 wifi: brcmfmac: Fix potential NULL pointer dereference in 'brcmf_c_preinit_dcmds()' This patch fixes a NULL pointer dereference bug in brcmfmac that occurs when ptr which is NULL pointer passed as an argument of strlcpy() in brcmf_c_preinit_dcmds(). This happens when the driver passes a firmware version string that does not contain a space " ", making strrchr() return a null pointer. This patch adds a null pointer check. Found by a modified version of syzkaller. KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 PID: 1983 Comm: kworker/0:2 Not tainted 5.14.0+ #79 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 RIP: 0010:strlen+0x1a/0x90 Code: 23 ff ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 90 48 b8 00 00 00 00 00 fc ff df 48 89 fa 55 48 89 fd 48 c1 ea 03 53 48 83 ec 08 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 04 84 c0 75 48 80 7d 00 00 RSP: 0018:ffffc90002bfedd8 EFLAGS: 00010296 RAX: dffffc0000000000 RBX: 1ffff9200057fdc1 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000001 RBP: 0000000000000001 R08: 0000000000000039 R09: ffffed1023549801 R10: ffff88811aa4c007 R11: ffffed1023549800 R12: ffff88800bc68d6c R13: ffffc90002bfef08 R14: ffff88800bc6bc7c R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff88811aa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020546180 CR3: 0000000117ff1000 CR4: 0000000000750ef0 PKRU: 55555554 Call Trace: brcmf_c_preinit_dcmds+0x9f2/0xc40 ? brcmf_c_set_joinpref_default+0x100/0x100 ? rcu_read_lock_sched_held+0xa1/0xd0 ? rcu_read_lock_bh_held+0xb0/0xb0 ? lock_acquire+0x19d/0x4e0 ? find_held_lock+0x2d/0x110 ? brcmf_usb_deq+0x1a7/0x260 ? brcmf_usb_rx_fill_all+0x5a/0xf0 brcmf_attach+0x246/0xd40 ? wiphy_new_nm+0x1703/0x1dd0 ? kmemdup+0x43/0x50 brcmf_usb_probe+0x12de/0x1690 ? brcmf_usbdev_qinit.constprop.0+0x470/0x470 usb_probe_interface+0x2aa/0x760 ? usb_probe_device+0x250/0x250 really_probe+0x205/0xb70 ? driver_allows_async_probing+0x130/0x130 __driver_probe_device+0x311/0x4b0 ? driver_allows_async_probing+0x130/0x130 driver_probe_device+0x4e/0x150 __device_attach_driver+0x1cc/0x2a0 bus_for_each_drv+0x156/0x1d0 ? bus_rescan_devices+0x30/0x30 ? lockdep_hardirqs_on_prepare+0x273/0x3e0 ? trace_hardirqs_on+0x46/0x160 __device_attach+0x23f/0x3a0 ? device_bind_driver+0xd0/0xd0 ? kobject_uevent_env+0x287/0x14b0 bus_probe_device+0x1da/0x290 device_add+0xb7b/0x1eb0 ? wait_for_completion+0x290/0x290 ? __fw_devlink_link_to_suppliers+0x5a0/0x5a0 usb_set_configuration+0xf59/0x16f0 usb_generic_driver_probe+0x82/0xa0 usb_probe_device+0xbb/0x250 ? usb_suspend+0x590/0x590 really_probe+0x205/0xb70 ? driver_allows_async_probing+0x130/0x130 __driver_probe_device+0x311/0x4b0 ? usb_generic_driver_match+0x75/0x90 ? driver_allows_async_probing+0x130/0x130 driver_probe_device+0x4e/0x150 __device_attach_driver+0x1cc/0x2a0 bus_for_each_drv+0x156/0x1d0 ? bus_rescan_devices+0x30/0x30 ? _raw_spin_unlock_irqrestore+0x47/0x50 __device_attach+0x23f/0x3a0 ? device_bind_driver+0xd0/0xd0 ? kobject_uevent_env+0x287/0x14b0 bus_probe_device+0x1da/0x290 device_add+0xb7b/0x1eb0 ? __fw_devlink_link_to_suppliers+0x5a0/0x5a0 ? kfree+0x14a/0x6b0 ? __usb_get_extra_descriptor+0x116/0x160 usb_new_device.cold+0x49c/0x1029 ? hub_disconnect+0x450/0x450 ? rwlock_bug.part.0+0x90/0x90 ? _raw_spin_unlock_irq+0x24/0x30 ? lockdep_hardirqs_on_prepare+0x273/0x3e0 hub_event+0x248b/0x31c9 ? usb_port_suspend.cold+0x139/0x139 ? check_irq_usage+0x861/0xf20 ? drain_workqueue+0x280/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 Modulesdd linked in: ---[ end trace c112c68924ddd800 ]--- RIP: 0010:strlen+0x1a/0x90 Code: 23 ff ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 90 48 b8 00 00 00 00 00 fc ff df 48 89 fa 55 48 89 fd 48 c1 ea 03 53 48 83 ec 08 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 04 84 c0 75 48 80 7d 00 00 RSP: 0018:ffffc90002bfedd8 EFLAGS: 00010296 RAX: dffffc0000000000 RBX: 1ffff9200057fdc1 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000001 RBP: 0000000000000001 R08: 0000000000000039 R09: ffffed1023549801 R10: ffff88811aa4c007 R11: ffffed1023549800 R12: ffff88800bc68d6c R13: ffffc90002bfef08 R14: ffff88800bc6bc7c R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff88811aa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020546180 CR3: 0000000117ff1000 CR4: 0000000000750ef0 PKRU: 55555554 Kernel panic - not syncing: Fatal exception Kernel Offset: disabled 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/20221101183642.166450-1-jisoo.jang@yonsei.ac.kr drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 22ebc2640cc7b4ecf139737506629fb012e65fd5 Author: Jonathan Neuschäfer Date: Tue Nov 1 18:02:51 2022 +0100 wifi: brcmfmac: Fix a typo "unknow" It should be "unknown". Signed-off-by: Jonathan Neuschäfer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221101170252.1032085-1-j.neuschaefer@gmx.net drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdeee85409526cf5a4ca6528bd4d148833a940a3 Author: Colin Ian King Date: Mon Oct 31 15:56:37 2022 +0000 wifi: rtlwifi: rtl8192ee: remove static variable stop_report_cnt Variable stop_report_cnt is being set or incremented but is never being used for anything meaningful. The variable and code relating to it's use is redundant and can be removed. Signed-off-by: Colin Ian King Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221031155637.871164-1-colin.i.king@gmail.com drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 8 -------- 1 file changed, 8 deletions(-) commit 74a473007ce54b1f42267cf13e008abfb1849ad0 Author: Linus Walleij Date: Fri Oct 28 11:30:00 2022 +0200 bcma: Fail probe if GPIO subdriver fails We currently register the BCMA core even if the GPIO portions fail. There is no reason for this: the GPIO should register just fine, if it fails the BCMA driver should fail. We already gracefully handle the case where the GPIO driver is not compiled in. Signed-off-by: Linus Walleij Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221028093000.239020-1-linus.walleij@linaro.org drivers/bcma/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2b6c0e152868c9c5939a5c5094d5b2be61cf48e6 Author: Linus Walleij Date: Fri Oct 28 11:23:32 2022 +0200 bcma: Use the proper gpio include The is including the legacy header to obtain struct gpio_chip. Instead, include where this struct is defined. It turns out that the brcm80211 brcmsmac depends on this to bring in the symbol gpio_is_valid(). The driver looks up the BCMA parent GPIO driver and checks that this succeeds, but then it goes on to use the deprecated GPIO call gpio_is_valid() to check the consistency of the .base member of the BCMA GPIO struct. The whole check can be dropped because the bcma_gpio is initialized in the declarations: struct gpio_chip *bcma_gpio = &cc_drv->gpio; And this can never be NULL. Cc: Jonas Gorski Acked-by: Arend van Spriel Signed-off-by: Linus Walleij Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221028092332.238728-1-linus.walleij@linaro.org drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c | 3 --- include/linux/bcma/bcma_driver_chipcommon.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) commit 81d17f6f3331f03c8eafdacea68ab773426c1e3c Author: Minsuk Kang Date: Mon Oct 24 16:13:29 2022 +0900 wifi: brcmfmac: Fix potential shift-out-of-bounds in brcmf_fw_alloc_request() This patch fixes a shift-out-of-bounds in brcmfmac that occurs in BIT(chiprev) when a 'chiprev' provided by the device is too large. It should also not be equal to or greater than BITS_PER_TYPE(u32) as we do bitwise AND with a u32 variable and BIT(chiprev). The patch adds a check that makes the function return NULL if that is the case. Note that the NULL case is later handled by the bus-specific caller, brcmf_usb_probe_cb() or brcmf_usb_reset_resume(), for example. Found by a modified version of syzkaller. UBSAN: shift-out-of-bounds in drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c shift exponent 151055786 is too large for 64-bit type 'long unsigned int' CPU: 0 PID: 1885 Comm: kworker/0:2 Tainted: G O 5.14.0+ #132 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+0x57/0x7d ubsan_epilogue+0x5/0x40 __ubsan_handle_shift_out_of_bounds.cold+0x53/0xdb ? lock_chain_count+0x20/0x20 brcmf_fw_alloc_request.cold+0x19/0x3ea ? brcmf_fw_get_firmwares+0x250/0x250 ? brcmf_usb_ioctl_resp_wait+0x1a7/0x1f0 brcmf_usb_get_fwname+0x114/0x1a0 ? brcmf_usb_reset_resume+0x120/0x120 ? number+0x6c4/0x9a0 brcmf_c_process_clm_blob+0x168/0x590 ? put_dec+0x90/0x90 ? enable_ptr_key_workfn+0x20/0x20 ? brcmf_common_pd_remove+0x50/0x50 ? rcu_read_lock_sched_held+0xa1/0xd0 brcmf_c_preinit_dcmds+0x673/0xc40 ? brcmf_c_set_joinpref_default+0x100/0x100 ? rcu_read_lock_sched_held+0xa1/0xd0 ? rcu_read_lock_bh_held+0xb0/0xb0 ? lock_acquire+0x19d/0x4e0 ? find_held_lock+0x2d/0x110 ? brcmf_usb_deq+0x1cc/0x260 ? mark_held_locks+0x9f/0xe0 ? lockdep_hardirqs_on_prepare+0x273/0x3e0 ? _raw_spin_unlock_irqrestore+0x47/0x50 ? trace_hardirqs_on+0x1c/0x120 ? brcmf_usb_deq+0x1a7/0x260 ? brcmf_usb_rx_fill_all+0x5a/0xf0 brcmf_attach+0x246/0xd40 ? wiphy_new_nm+0x1476/0x1d50 ? kmemdup+0x30/0x40 brcmf_usb_probe+0x12de/0x1690 ? brcmf_usbdev_qinit.constprop.0+0x470/0x470 usb_probe_interface+0x25f/0x710 really_probe+0x1be/0xa90 __driver_probe_device+0x2ab/0x460 ? usb_match_id.part.0+0x88/0xc0 driver_probe_device+0x49/0x120 __device_attach_driver+0x18a/0x250 ? driver_allows_async_probing+0x120/0x120 bus_for_each_drv+0x123/0x1a0 ? bus_rescan_devices+0x20/0x20 ? lockdep_hardirqs_on_prepare+0x273/0x3e0 ? trace_hardirqs_on+0x1c/0x120 __device_attach+0x207/0x330 ? device_bind_driver+0xb0/0xb0 ? kobject_uevent_env+0x230/0x12c0 bus_probe_device+0x1a2/0x260 device_add+0xa61/0x1ce0 ? __mutex_unlock_slowpath+0xe7/0x660 ? __fw_devlink_link_to_suppliers+0x550/0x550 usb_set_configuration+0x984/0x1770 ? kernfs_create_link+0x175/0x230 usb_generic_driver_probe+0x69/0x90 usb_probe_device+0x9c/0x220 really_probe+0x1be/0xa90 __driver_probe_device+0x2ab/0x460 driver_probe_device+0x49/0x120 __device_attach_driver+0x18a/0x250 ? driver_allows_async_probing+0x120/0x120 bus_for_each_drv+0x123/0x1a0 ? bus_rescan_devices+0x20/0x20 ? lockdep_hardirqs_on_prepare+0x273/0x3e0 ? trace_hardirqs_on+0x1c/0x120 __device_attach+0x207/0x330 ? device_bind_driver+0xb0/0xb0 ? kobject_uevent_env+0x230/0x12c0 bus_probe_device+0x1a2/0x260 device_add+0xa61/0x1ce0 ? __fw_devlink_link_to_suppliers+0x550/0x550 usb_new_device.cold+0x463/0xf66 ? hub_disconnect+0x400/0x400 ? _raw_spin_unlock_irq+0x24/0x30 hub_event+0x10d5/0x3330 ? hub_port_debounce+0x280/0x280 ? __lock_acquire+0x1671/0x5790 ? wq_calc_node_cpumask+0x170/0x2a0 ? 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+0x873/0x13e0 ? lock_release+0x640/0x640 ? pwq_dec_nr_in_flight+0x320/0x320 ? rwlock_bug.part.0+0x90/0x90 worker_thread+0x8b/0xd10 ? __kthread_parkme+0xd9/0x1d0 ? process_one_work+0x13e0/0x13e0 kthread+0x379/0x450 ? _raw_spin_unlock_irq+0x24/0x30 ? set_kthread_struct+0x100/0x100 ret_from_fork+0x1f/0x30 Reported-by: Dokyung Song Reported-by: Jisoo Jang Reported-by: Minsuk Kang Signed-off-by: Minsuk Kang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221024071329.504277-1-linuxlovemin@yonsei.ac.kr drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 5 +++++ 1 file changed, 5 insertions(+) commit 95ec6bce2a0bb7ec9c76fe5c2a9db3b9e62c950d Merge: d28c0e73efbe 9b7a00653651 Author: David S. Miller Date: Fri Nov 4 10:16:53 2022 +0000 Merge branch 'net-ipa-more-endpoints' Alex Elder says: ==================== net: ipa: support more endpoints This series adds support for more than 32 IPA endpoints. To do this, five registers whose bits represent endpoint state are replicated as needed to represent endpoints beyond 32. For existing platforms, the number of endpoints is never greater than 32, so there is just one of each register. IPA v5.0+ supports more than that though; these changes prepare the code for that. Beyond that, the IPA fields that represent endpoints in a 32-bit bitmask are updated to support an arbitrary number of these endpoint registers. (There is one exception, explained in patch 7.) The first two patches are some sort of unrelated cleanups, making use of a helper function introduced recently. The third and fourth use parameterized functions to determine the register offset for registers that represent endpoints. The last five convert fields representing endpoints to allow more than 32 endpoints to be represented. Since v1, I have implemented Jakub's suggestions: - Don't print a message on (bitmap) memory allocation failure - Do not do "mass null checks" when allocating bitmaps - Rework some code to ensure error path is sane ==================== Signed-off-by: David S. Miller commit 9b7a00653651d8e6ac05c6d4baa39bcf21090328 Author: Alex Elder Date: Wed Nov 2 17:11:39 2022 -0500 net: ipa: use a bitmap for enabled endpoints Replace the 32-bit unsigned used to track enabled endpoints with a Linux bitmap, to allow an arbitrary number of endpoints to be represented. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa.h | 4 ++-- drivers/net/ipa/ipa_endpoint.c | 32 ++++++++++++++++++++------------ 2 files changed, 22 insertions(+), 14 deletions(-) commit ae5108e9b7fa255e67323b70e37264a5ec7f1a62 Author: Alex Elder Date: Wed Nov 2 17:11:38 2022 -0500 net: ipa: use a bitmap for set-up endpoints Replace the 32-bit unsigned used to track endpoints that have completed setup with a Linux bitmap, to allow an arbitrary number of endpoints to be represented. Rework the error handling in ipa_endpoint_init() so the defined endpoint bitmap is freed if an error occurs early. Once endpoints have been initialized, ipa_endpoint_exit() is used to recover if the set of filtered endpoints is invalid. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa.h | 4 ++-- drivers/net/ipa/ipa_endpoint.c | 38 +++++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 19 deletions(-) commit 0f97fbd478587a4ac2d53a88e5a9aefd6632a251 Author: Alex Elder Date: Wed Nov 2 17:11:37 2022 -0500 net: ipa: support more filtering endpoints Prior to IPA v5.0, there could be no more than 32 endpoints. A filter table begins with a bitmap indicating which endpoints have a filter defined. That bitmap is currently assumed to fit in a 32-bit value. Starting with IPA v5.0, more than 32 endpoints are supported, so it's conceivable that a TX endpoint has an ID that exceeds 32. Increase the size of the field representing endpoints that support filtering to 64 bits. Rename the bitmap field "filtered". Unlike other similar fields, we do not use an (arbitrarily long) Linux bitmap for this purpose. The reason is that if a filter table ever *did* need to support more than 64 TX endpoints, its format would change in ways we can't anticipate. Have ipa_endpoint_init() return a negative errno rather than a mask that indicates which endpoints support filtering, and have that function assign the "filtered" field directly. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa.h | 4 ++-- drivers/net/ipa/ipa_endpoint.c | 22 +++++++++++++--------- drivers/net/ipa/ipa_endpoint.h | 2 +- drivers/net/ipa/ipa_main.c | 7 ++----- drivers/net/ipa/ipa_table.c | 23 +++++++++++------------ drivers/net/ipa/ipa_table.h | 6 +++--- 6 files changed, 32 insertions(+), 32 deletions(-) commit 88de7672404de72e273c4f1f4228120b8d7f01f1 Author: Alex Elder Date: Wed Nov 2 17:11:36 2022 -0500 net: ipa: use a bitmap for available endpoints Similar to the previous patch, replace the 32-bit unsigned used to track endpoints supported by hardware with a Linux bitmap, to allow an arbitrary number of endpoints to be represented. Move ipa_endpoint_deconfig() above ipa_endpoint_config() and use it in the error path of the latter function. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa.h | 8 ++++--- drivers/net/ipa/ipa_endpoint.c | 49 +++++++++++++++++++++++++++-------------- drivers/net/ipa/ipa_interrupt.c | 8 ++++--- 3 files changed, 43 insertions(+), 22 deletions(-) commit 9a9f512974d5e3e721e106f30429c16dfeb23326 Author: Alex Elder Date: Wed Nov 2 17:11:35 2022 -0500 net: ipa: use a bitmap for defined endpoints IPA v5.0 supports more than 32 endpoints, so we will be unable to represent endpoints defined in the configuration data with a 32-bit value. To prepare for that, convert the field in the IPA structure representing defined endpoints to be a Linux bitmap. Convert loops based on that field into for_each_set_bit() calls over the new bitmap. Note that the loop in ipa_endpoint_config() still assumes there are 32 or fewer endpoints (when comparing against the available endpoint bit mask); that assumption goes away in the next patch. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa.h | 6 +++--- drivers/net/ipa/ipa_endpoint.c | 44 ++++++++++++++++-------------------------- 2 files changed, 20 insertions(+), 30 deletions(-) commit f298ba785e2d4f18bc2d01ee1ce719efe14242f0 Author: Alex Elder Date: Wed Nov 2 17:11:34 2022 -0500 net: ipa: add a parameter to suspend registers The SUSPEND_INFO, SUSPEND_EN, SUSPEND_CLR registers represent endpoint IDs in a bit mask. When more than 32 endpoints are supported, these registers will be replicated as needed to represent the number of supported endpoints. Update the definitions of these registers to have a stride of 4 bytes, and update the code that operates them to select the proper offset and bit. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa_interrupt.c | 30 +++++++++++++++++++----------- drivers/net/ipa/reg/ipa_reg-v3.1.c | 9 ++++++--- drivers/net/ipa/reg/ipa_reg-v3.5.1.c | 9 ++++++--- drivers/net/ipa/reg/ipa_reg-v4.11.c | 9 ++++++--- drivers/net/ipa/reg/ipa_reg-v4.2.c | 9 ++++++--- drivers/net/ipa/reg/ipa_reg-v4.5.c | 9 ++++++--- drivers/net/ipa/reg/ipa_reg-v4.9.c | 9 ++++++--- 7 files changed, 55 insertions(+), 29 deletions(-) commit 1d8f16dbdf3693cae7567806cb1fb714fd1bcc70 Author: Alex Elder Date: Wed Nov 2 17:11:33 2022 -0500 net: ipa: add a parameter to aggregation registers Starting with IPA v5.0, a single IPA instance can have more than 32 endpoints defined. To handle this, each register that holds a bitmap of IPA endpoints is replicated as needed to represent the available endpoints. To prepare for this, registers that represent endpoint IDs in a bit mask will be defined to have a parameter, with a stride value of 4 bytes. The first 32 endpoints are represented in the first 32-bit register, then the next (up to) 32 endpoints at an offset 4 bytes higher. When accessing such a register, the endpoint ID divided by 32 determines the offset, and the endpoint ID modulo 32 defines the endpoint's bit position within the register. The first two registers we'll update for this are STATE_AGGR_ACTIVE and AGGR_FORCE_CLOSE. Until more than 32 endpoints are supported, this change has no practical effect. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa_endpoint.c | 14 ++++++++++---- drivers/net/ipa/reg/ipa_reg-v3.1.c | 4 ++-- drivers/net/ipa/reg/ipa_reg-v3.5.1.c | 4 ++-- drivers/net/ipa/reg/ipa_reg-v4.11.c | 4 ++-- drivers/net/ipa/reg/ipa_reg-v4.2.c | 4 ++-- drivers/net/ipa/reg/ipa_reg-v4.5.c | 4 ++-- drivers/net/ipa/reg/ipa_reg-v4.9.c | 4 ++-- 7 files changed, 22 insertions(+), 16 deletions(-) commit 6337b147828b4e3e893bde16dca8d4b6654d11c1 Author: Alex Elder Date: Wed Nov 2 17:11:32 2022 -0500 net: ipa: use ipa_table_mem() in ipa_table_reset_add() Similar to the previous commit, pass flags rather than a memory region ID to ipa_table_reset_add(), and there use ipa_table_mem() to look up the memory region affected based on those flags. Currently all eight of these table memory regions are assumed to exist, because they all have canaries within them. Stop assuming that will always be the case, and in ipa_table_reset_add() allow these memory regions to be non-existent. Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa_table.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 5cb76899fb47791c12eb9fce4aef8a858c41783d Author: Alex Elder Date: Wed Nov 2 17:11:31 2022 -0500 net: ipa: reduce arguments to ipa_table_init_add() Recently ipa_table_mem() was added as a way to look up one of 8 possible memory regions by indicating whether it was a filter or route table, hashed or not, and IPv6 or not. We can simplify the interface to ipa_table_init_add() by passing two flags to it instead of the opcode and both hashed and non-hashed memory region IDs. The "filter" and "ipv6" flags are sufficient to determine the opcode to use, and with ipa_table_mem() can look up the correct memory region as well. It's possible to not have hashed tables, but we already verify the number of entries in a filter or routing table is nonzero. Stop assuming a hashed table entry exists in ipa_table_init_add(). Signed-off-by: Alex Elder Signed-off-by: David S. Miller drivers/net/ipa/ipa_table.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit d28c0e73efbee95edf789f07c494592f89862606 Author: Colin Ian King Date: Tue Nov 1 10:41:04 2022 +0000 rds: remove redundant variable total_payload_len Variable total_payload_len is being used to accumulate payload lengths however it is never read or used afterwards. It is redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/rds/send.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 329cfa42e5280decfc9247598b9996e13b28c380 Author: Ralph Siemsen Date: Thu Oct 27 15:35:44 2022 -0400 crypto: doc - use correct function name The hashing API does not have a function called .finish() Signed-off-by: Ralph Siemsen Signed-off-by: Herbert Xu Documentation/crypto/devel-algos.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae1b83c7d572101b3b5cfbf40415c4cc5d469bde Author: Tianjia Zhang Date: Thu Oct 27 14:55:05 2022 +0800 crypto: arm64/sm4 - add CE implementation for GCM mode This patch is a CE-optimized assembly implementation for GCM mode. Benchmark on T-Head Yitian-710 2.75 GHz, the data comes from the 224 and 224 modes of tcrypt, and compared the performance before and after this patch (the driver used before this patch is gcm_base(ctr-sm4-ce,ghash-generic)). The abscissas are blocks of different lengths. The data is tabulated and the unit is Mb/s: Before (gcm_base(ctr-sm4-ce,ghash-generic)): gcm(sm4) | 16 64 256 512 1024 1420 4096 8192 -------------+--------------------------------------------------------------------- GCM enc | 25.24 64.65 104.66 116.69 123.81 125.12 129.67 130.62 GCM dec | 25.40 64.80 104.74 116.70 123.81 125.21 129.68 130.59 GCM mb enc | 24.95 64.06 104.20 116.38 123.55 124.97 129.63 130.61 GCM mb dec | 24.92 64.00 104.13 116.34 123.55 124.98 129.56 130.48 After: gcm-sm4-ce | 16 64 256 512 1024 1420 4096 8192 -------------+--------------------------------------------------------------------- GCM enc | 108.62 397.18 971.60 1283.92 1522.77 1513.39 1777.00 1806.96 GCM dec | 116.36 398.14 1004.27 1319.11 1624.21 1635.43 1932.54 1974.20 GCM mb enc | 107.13 391.79 962.05 1274.94 1514.76 1508.57 1769.07 1801.58 GCM mb dec | 113.40 389.36 988.51 1307.68 1619.10 1631.55 1931.70 1970.86 Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 16 + arch/arm64/crypto/Makefile | 3 + arch/arm64/crypto/sm4-ce-gcm-core.S | 741 ++++++++++++++++++++++++++++++++++++ arch/arm64/crypto/sm4-ce-gcm-glue.c | 286 ++++++++++++++ 4 files changed, 1046 insertions(+) commit 67fa3a7fdf80c80ee737840dfdd225260e5c1044 Author: Tianjia Zhang Date: Thu Oct 27 14:55:04 2022 +0800 crypto: arm64/sm4 - add CE implementation for CCM mode This patch is a CE-optimized assembly implementation for CCM mode. Benchmark on T-Head Yitian-710 2.75 GHz, the data comes from the 223 and 225 modes of tcrypt, and compared the performance before and after this patch (the driver used before this patch is ccm_base(ctr-sm4-ce,cbcmac-sm4-ce)). The abscissas are blocks of different lengths. The data is tabulated and the unit is Mb/s: Before (rfc4309(ccm_base(ctr-sm4-ce,cbcmac-sm4-ce))): ccm(sm4) | 16 64 256 512 1024 1420 4096 8192 -------------+--------------------------------------------------------------- CCM enc | 35.07 125.40 336.47 468.17 581.97 619.18 712.56 736.01 CCM dec | 34.87 124.40 335.08 466.75 581.04 618.81 712.25 735.89 CCM mb enc | 34.71 123.96 333.92 465.39 579.91 617.49 711.45 734.92 CCM mb dec | 34.42 122.80 331.02 462.81 578.28 616.42 709.88 734.19 After (rfc4309(ccm-sm4-ce)): ccm-sm4-ce | 16 64 256 512 1024 1420 4096 8192 -------------+--------------------------------------------------------------- CCM enc | 77.12 249.82 569.94 725.17 839.27 867.71 952.87 969.89 CCM dec | 75.90 247.26 566.29 722.12 836.90 865.95 951.74 968.57 CCM mb enc | 75.98 245.25 562.91 718.99 834.76 864.70 950.17 967.90 CCM mb dec | 75.06 243.78 560.58 717.13 833.68 862.70 949.35 967.11 Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 16 ++ arch/arm64/crypto/Makefile | 3 + arch/arm64/crypto/sm4-ce-ccm-core.S | 328 ++++++++++++++++++++++++++++++++++++ arch/arm64/crypto/sm4-ce-ccm-glue.c | 303 +++++++++++++++++++++++++++++++++ 4 files changed, 650 insertions(+) commit 6b5360a5e0ad357b73776d092437715ba4a77865 Author: Tianjia Zhang Date: Thu Oct 27 14:55:03 2022 +0800 crypto: arm64/sm4 - add CE implementation for cmac/xcbc/cbcmac This patch is a CE-optimized assembly implementation for cmac/xcbc/cbcmac. Benchmark on T-Head Yitian-710 2.75 GHz, the data comes from the 300 mode of tcrypt, and compared the performance before and after this patch (the driver used before this patch is XXXmac(sm4-ce)). The abscissas are blocks of different lengths. The data is tabulated and the unit is Mb/s: Before: update-size | 16 64 256 1024 2048 4096 8192 ---------------+-------------------------------------------------------- cmac(sm4-ce) | 293.33 403.69 503.76 527.78 531.10 535.46 535.81 xcbc(sm4-ce) | 292.83 402.50 504.02 529.08 529.87 536.55 538.24 cbcmac(sm4-ce) | 318.42 415.79 497.12 515.05 523.15 521.19 523.01 After: update-size | 16 64 256 1024 2048 4096 8192 ---------------+-------------------------------------------------------- cmac-sm4-ce | 371.99 675.28 903.56 971.65 980.57 990.40 991.04 xcbc-sm4-ce | 372.11 674.55 903.47 971.61 980.96 990.42 991.10 cbcmac-sm4-ce | 371.63 675.33 903.23 972.07 981.42 990.93 991.45 Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/sm4-ce-core.S | 70 +++++++++++ arch/arm64/crypto/sm4-ce-glue.c | 267 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 336 insertions(+), 1 deletion(-) commit 01f633113b19534ab4f4e9cf72d8e72fb3568901 Author: Tianjia Zhang Date: Thu Oct 27 14:55:02 2022 +0800 crypto: arm64/sm4 - add CE implementation for XTS mode This patch is a CE-optimized assembly implementation for XTS mode. Benchmark on T-Head Yitian-710 2.75 GHz, the data comes from the 218 mode of tcrypt, and compared the performance before and after this patch (the driver used before this patch is xts(ecb-sm4-ce)). The abscissas are blocks of different lengths. The data is tabulated and the unit is Mb/s: Before: xts(ecb-sm4-ce) | 16 64 128 256 1024 1420 4096 ----------------+-------------------------------------------------------------- XTS enc | 117.17 430.56 732.92 1134.98 2007.03 2136.23 2347.20 XTS dec | 116.89 429.02 733.40 1132.96 2006.13 2130.50 2347.92 After: xts-sm4-ce | 16 64 128 256 1024 1420 4096 ----------------+-------------------------------------------------------------- XTS enc | 224.68 798.91 1248.08 1714.60 2413.73 2467.84 2612.62 XTS dec | 229.85 791.34 1237.79 1720.00 2413.30 2473.84 2611.95 Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 4 +- arch/arm64/crypto/sm4-ce-core.S | 343 ++++++++++++++++++++++++++++++++++++++++ arch/arm64/crypto/sm4-ce-glue.c | 159 ++++++++++++++++++- 3 files changed, 504 insertions(+), 2 deletions(-) commit b1863fd0742f8da21f6f994e14e820db5831bd74 Author: Tianjia Zhang Date: Thu Oct 27 14:55:01 2022 +0800 crypto: arm64/sm4 - add CE implementation for CTS-CBC mode This patch is a CE-optimized assembly implementation for CTS-CBC mode. Benchmark on T-Head Yitian-710 2.75 GHz, the data comes from the 218 mode of tcrypt, and compared the performance before and after this patch (the driver used before this patch is cts(cbc-sm4-ce)). The abscissas are blocks of different lengths. The data is tabulated and the unit is Mb/s: Before: cts(cbc-sm4-ce) | 16 64 128 256 1024 1420 4096 ----------------+-------------------------------------------------------------- CTS-CBC enc | 286.09 297.17 457.97 627.75 868.58 900.80 957.69 CTS-CBC dec | 286.67 285.63 538.35 947.08 2241.03 2577.32 3391.14 After: cts-cbc-sm4-ce | 16 64 128 256 1024 1420 4096 ----------------+-------------------------------------------------------------- CTS-CBC enc | 288.19 428.80 593.57 741.04 911.73 931.80 950.00 CTS-CBC dec | 292.22 468.99 838.23 1380.76 2741.17 3036.42 3409.62 Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/sm4-ce-core.S | 102 ++++++++++++++++++++++++++++++++++++++++ arch/arm64/crypto/sm4-ce-glue.c | 94 ++++++++++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+) commit 45089dbe5952e9afbe2a3b3054105f2a694930f1 Author: Tianjia Zhang Date: Thu Oct 27 14:55:00 2022 +0800 crypto: arm64/sm4 - export reusable CE acceleration functions In the accelerated implementation of the SM4 algorithm using the Crypto Extension instructions, there are some functions that can be reused in the upcoming accelerated implementation of the GCM/CCM mode, and the CBC/CFB encryption is reused in the optimized implementation of SVESM4. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/sm4-ce-glue.c | 5 +++++ arch/arm64/crypto/sm4-ce.h | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) commit cb9ba02b07d18172c6a6dcc69410c56482903230 Author: Tianjia Zhang Date: Thu Oct 27 14:54:59 2022 +0800 crypto: arm64/sm4 - simplify sm4_ce_expand_key() of CE implementation Use a 128-bit swap mask and tbl instruction to simplify the implementation for generating SM4 rkey_dec. Also fixed the issue of not being wrapped by kernel_neon_begin/end() when using the sm4_ce_expand_key() function. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/sm4-ce-core.S | 46 ++++++++++++++++++++--------------------- arch/arm64/crypto/sm4-ce-glue.c | 2 ++ 2 files changed, 24 insertions(+), 24 deletions(-) commit ce41fefd2443c25166458f24621b53a28fff989f Author: Tianjia Zhang Date: Thu Oct 27 14:54:58 2022 +0800 crypto: arm64/sm4 - refactor and simplify CE implementation This patch does not add new features, but only refactors and simplifies the implementation of the Crypto Extension acceleration of the SM4 algorithm: Extract the macro optimized by SM4 Crypto Extension for reuse in the subsequent optimization of CCM/GCM modes. Encryption in CBC and CFB modes processes four blocks at a time instead of one, allowing the ld1 instruction to load 64 bytes of data at a time, which will reduces unnecessary memory accesses. CBC/CFB/CTR makes full use of free registers to reduce redundant memory accesses, and rearranges some instructions to improve out-of-order execution capabilities. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/sm4-ce-asm.h | 209 +++++++++++++ arch/arm64/crypto/sm4-ce-core.S | 646 ++++++++++++++++++---------------------- arch/arm64/crypto/sm4-ce-glue.c | 64 ++-- 3 files changed, 519 insertions(+), 400 deletions(-) commit 3c3836378dd578a0d510420c0f67818e8dc49f0e Author: Tianjia Zhang Date: Thu Oct 27 14:54:57 2022 +0800 crypto: tcrypt - add SM4 cts-cbc/xts/xcbc test Added CTS-CBC/XTS/XCBC tests for SM4 algorithms, as well as corresponding speed tests, this is to test performance-optimized implementations of these modes. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu crypto/tcrypt.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit c24ee936c79d7c381750f6c23bbef1257850279f Author: Tianjia Zhang Date: Thu Oct 27 14:54:56 2022 +0800 crypto: testmgr - add SM4 cts-cbc/xts/xcbc test vectors This patch newly adds the test vectors of CTS-CBC/XTS/XCBC modes of the SM4 algorithm, and also added some test vectors for SM4 GCM/CCM. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu crypto/testmgr.c | 19 ++ crypto/testmgr.h | 977 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 996 insertions(+) commit 62508017a264133a62987fe40f70c68af9a36572 Author: Tianjia Zhang Date: Thu Oct 27 14:54:55 2022 +0800 crypto: arm64/sm4 - refactor and simplify NEON implementation This patch does not add new features. The main work is to refactor and simplify the implementation of SM4 NEON, which is reflected in the following aspects: The accelerated implementation supports the arbitrary number of blocks, not just multiples of 8, which simplifies the implementation and brings some optimization acceleration for data that is not aligned by 8 blocks. When loading the input data, use the ld4 instruction to replace the original ld1 instruction as much as possible, which will save the cost of matrix transposition of the input data. Use 8-block parallelism whenever possible to speed up matrix transpose and rotation operations, instead of up to 4-block parallelism. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/sm4-neon-core.S | 630 +++++++++++++++++++++++++------------- arch/arm64/crypto/sm4-neon-glue.c | 172 +++-------- 2 files changed, 456 insertions(+), 346 deletions(-) commit a41b2129461f6c88e087ca9a6e2fde34cb6deb48 Author: Tianjia Zhang Date: Thu Oct 27 14:54:54 2022 +0800 crypto: arm64/sm3 - add NEON assembly implementation This patch adds the NEON acceleration implementation of the SM3 hash algorithm. The main algorithm is based on SM3 NEON accelerated work of the libgcrypt project. Benchmark on T-Head Yitian-710 2.75 GHz, the data comes from the 326 mode of tcrypt, and compares the performance data of sm3-generic and sm3-ce. The abscissas are blocks of different lengths. The data is tabulated and the unit is Mb/s: update-size | 16 64 256 1024 2048 4096 8192 ---------------+-------------------------------------------------------- sm3-generic | 185.24 221.28 301.26 307.43 300.83 308.82 308.91 sm3-neon | 171.81 220.20 322.94 339.28 334.09 343.61 343.87 sm3-ce | 227.48 333.48 502.62 527.87 520.45 534.91 535.40 Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/Kconfig | 11 + arch/arm64/crypto/Makefile | 3 + arch/arm64/crypto/sm3-neon-core.S | 600 ++++++++++++++++++++++++++++++++++++++ arch/arm64/crypto/sm3-neon-glue.c | 103 +++++++ 4 files changed, 717 insertions(+) commit e1fa51aa2b04830495c1fc9d3d5dee4a4419b70d Author: Tianjia Zhang Date: Thu Oct 27 14:54:53 2022 +0800 crypto: arm64/sm3 - raise the priority of the CE implementation Raise the priority of the sm3-ce algorithm from 200 to 400, this is to make room for the implementation of sm3-neon. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu arch/arm64/crypto/sm3-ce-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3513828cb8f6db714ee48b1559e6253a57ecf1f6 Author: Anirudh Venkataramanan Date: Wed Oct 26 12:16:16 2022 -0700 crypto: tcrypt - Drop leading newlines from prints The top level print banners have a leading newline. It's not entirely clear why this exists, but it makes it harder to parse tcrypt test output using a script. Drop said newlines. tcrypt output before this patch: [...] testing speed of rfc4106(gcm(aes)) (rfc4106-gcm-aesni) encryption [...] test 0 (160 bit key, 16 byte blocks): 1 operation in 2320 cycles (16 bytes) tcrypt output with this patch: [...] testing speed of rfc4106(gcm(aes)) (rfc4106-gcm-aesni) encryption [...] test 0 (160 bit key, 16 byte blocks): 1 operation in 2320 cycles (16 bytes) Signed-off-by: Anirudh Venkataramanan Signed-off-by: Herbert Xu crypto/tcrypt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a2ef563000aff04352a4aded7b2d2bf19a1674bf Author: Anirudh Venkataramanan Date: Wed Oct 26 12:16:15 2022 -0700 crypto: tcrypt - Drop module name from print string The pr_fmt() define includes KBUILD_MODNAME, and so there's no need for pr_err() to also print it. Drop module name from the print string. Signed-off-by: Anirudh Venkataramanan Signed-off-by: Herbert Xu crypto/tcrypt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 837a99f59043c3505d69761575172da1d09220b5 Author: Anirudh Venkataramanan Date: Wed Oct 26 12:16:14 2022 -0700 crypto: tcrypt - Use pr_info/pr_err Currently, there's mixed use of printk() and pr_info()/pr_err(). The latter prints the module name (because pr_fmt() is defined so) but the former does not. As a result there's inconsistency in the printed output. For example: modprobe mode=211: [...] test 0 (160 bit key, 16 byte blocks): 1 operation in 2320 cycles (16 bytes) [...] test 1 (160 bit key, 64 byte blocks): 1 operation in 2336 cycles (64 bytes) modprobe mode=215: [...] tcrypt: test 0 (160 bit key, 16 byte blocks): 1 operation in 2173 cycles (16 bytes) [...] tcrypt: test 1 (160 bit key, 64 byte blocks): 1 operation in 2241 cycles (64 bytes) Replace all instances of printk() with pr_info()/pr_err() so that the module name is printed consistently. Signed-off-by: Anirudh Venkataramanan Signed-off-by: Herbert Xu crypto/tcrypt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit fdaeb224e2bf747942653e4f70226fcfe60fbf73 Author: Anirudh Venkataramanan Date: Wed Oct 26 12:16:13 2022 -0700 crypto: tcrypt - Use pr_cont to print test results For some test cases, a line break gets inserted between the test banner and the results. For example, with mode=211 this is the output: [...] testing speed of rfc4106(gcm(aes)) (rfc4106-gcm-aesni) encryption [...] test 0 (160 bit key, 16 byte blocks): [...] 1 operation in 2373 cycles (16 bytes) --snip-- [...] testing speed of gcm(aes) (generic-gcm-aesni) encryption [...] test 0 (128 bit key, 16 byte blocks): [...] 1 operation in 2338 cycles (16 bytes) Similar behavior is seen in the following cases as well: modprobe tcrypt mode=212 modprobe tcrypt mode=213 modprobe tcrypt mode=221 modprobe tcrypt mode=300 sec=1 modprobe tcrypt mode=400 sec=1 This doesn't happen with mode=215: [...] tcrypt: testing speed of multibuffer rfc4106(gcm(aes)) (rfc4106-gcm-aesni) encryption [...] tcrypt: test 0 (160 bit key, 16 byte blocks): 1 operation in 2215 cycles (16 bytes) --snip-- [...] tcrypt: testing speed of multibuffer gcm(aes) (generic-gcm-aesni) encryption [...] tcrypt: test 0 (128 bit key, 16 byte blocks): 1 operation in 2191 cycles (16 bytes) This print inconsistency is because printk() is used instead of pr_cont() in a few places. Change these to be pr_cont(). checkpatch warns that pr_cont() shouldn't be used. This can be ignored in this context as tcrypt already uses pr_cont(). Signed-off-by: Anirudh Venkataramanan Signed-off-by: Herbert Xu crypto/tcrypt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d93618da6b6d453c6a9684a3460ffd51b9b4ef2e Merge: 6f85403ef4d0 60ba8c5bd94e Author: Joonas Lahtinen Date: Fri Nov 4 11:11:30 2022 +0200 Merge drm/drm-next into drm-intel-gt-next Needed to bring in v6.1-rc1 which contains commit f683b9d61319 ("i915: use the VMA iterator") which is needed for series https://patchwork.freedesktop.org/series/110083/ . Signed-off-by: Joonas Lahtinen commit 05086f3db530b3b73920b0c8c50f5d5bc8494375 Author: Joshua Jun Date: Sun Oct 23 00:24:08 2022 +0200 HID: wiimote: Add support for the DJ Hero turntable This adds support for the turntable extension for Wiimote devices. jstest-gtk and html5 gamepad tester show everything correctly but when trying to map the controller in software like rpcs3 or dolphin it currently doesn't map correctly Co-authored-by: Bogdan Petru Signed-off-by: Bogdan Petru Signed-off-by: Joshua Jun Signed-off-by: Jiri Kosina drivers/hid/hid-wiimote-core.c | 7 ++ drivers/hid/hid-wiimote-modules.c | 225 ++++++++++++++++++++++++++++++++++++++ drivers/hid/hid-wiimote.h | 1 + 3 files changed, 233 insertions(+) commit 60ba8c5bd94e17ab4b024f5cecf8b48e2cf36412 Merge: 441f0ec0ae1e 8f956e9a2c9b Author: Dave Airlie Date: Fri Nov 4 17:20:12 2022 +1000 Merge tag 'drm-intel-gt-next-2022-11-03' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Driver Changes: - Fix for #7306: [Arc A380] white flickering when using arc as a secondary gpu (Matt A) - Add Wa_18017747507 for DG2 (Wayne) - Avoid spurious WARN on DG1 due to incorrect cache_dirty flag (Niranjana, Matt A) - Corrections to CS timestamp support for Gen5 and earlier (Ville) - Fix a build error used with clang compiler on hwmon (GG) - Improvements to LMEM handling with RPM (Anshuman, Matt A) - Cleanups in dmabuf code (Mike) - Selftest improvements (Matt A) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/Y2N11wu175p6qeEN@jlahtine-mobl.ger.corp.intel.com commit f71b2f64177a199d5b1d2047e155d45fd98f564a Author: Kumar Kartikeya Dwivedi Date: Fri Nov 4 00:39:57 2022 +0530 bpf: Refactor map->off_arr handling Refactor map->off_arr handling into generic functions that can work on their own without hardcoding map specific code. The btf_fields_offs structure is now returned from btf_parse_field_offs, which can be reused later for types in program BTF. All functions like copy_map_value, zero_map_value call generic underlying functions so that they can also be reused later for copying to values allocated in programs which encode specific fields. Later, some helper functions will also require access to this btf_field_offs structure to be able to skip over special fields at runtime. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221103191013.1236066-9-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 41 +++++++++++++++++------------ include/linux/btf.h | 1 + kernel/bpf/btf.c | 55 +++++++++++++++++++++++++++++++++++++++ kernel/bpf/syscall.c | 73 +++++++--------------------------------------------- 4 files changed, 89 insertions(+), 81 deletions(-) commit 2eedf62e66c28f6991425b580af68b3d89fa8021 Author: James Calligeros Date: Thu Nov 3 14:40:44 2022 +0530 OPP: decouple dt properties in opp_parse_supplies() The opp-microwatt property was added with the intention of providing platforms a way to specify a precise value for the power consumption of a device at a given OPP to enable better energy-aware scheduling decisions by informing the kernel of the total static and dynamic power of a device at a given OPP, removing the reliance on the EM subsystem's often flawed estimations. This property is parsed by opp_parse_supplies(), which creates a hard dependency on the opp-microvolt property. Some platforms, such as Apple Silicon, do not describe their device's voltage regulators in the DT as they cannot be controlled by the kernel and/or rely on opaque firmware algorithms to control their voltage and current characteristics at runtime. We can, however, experimentally determine the power consumption of a given device at a given OPP, taking advantage of opp-microwatt to provide EAS on such devices as was initially intended. Allow platforms to specify and consume any subset of opp-microvolt, opp-microamp, or opp-microwatt without a hard dependency on opp-microvolt to enable this functionality on such platforms. Tested-by: James Calligeros Signed-off-by: James Calligeros Co-developed-by: Viresh Kumar Signed-off-by: Viresh Kumar drivers/opp/of.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit e5acb1991b5884d86f113d7841024234c465c501 Author: Viresh Kumar Date: Wed Nov 2 16:47:08 2022 +0530 OPP: Simplify opp_parse_supplies() by restructuring it opp_parse_supplies() has grown into too big of a routine (~190 lines) and it is not straight-forward to understand it anymore. Break it into smaller routines and reduce code redundancy a bit by using the same code to parse properties. This shouldn't result in any logical changes. Tested-by: James Calligeros Signed-off-by: Viresh Kumar drivers/opp/of.c | 216 +++++++++++++++++++++---------------------------------- 1 file changed, 81 insertions(+), 135 deletions(-) commit 71b09429e82e5cd402bedc763c25b5962fdc9d71 Author: Viresh Kumar Date: Wed Nov 2 16:57:05 2022 +0530 OPP: Parse named opp-microwatt property too We missed parsing the named opp-microwatt- property, fix that. Tested-by: James Calligeros Signed-off-by: Viresh Kumar drivers/opp/of.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 1b91dba2474ed61c34e453a48c4968833ebd68c6 Author: Viresh Kumar Date: Wed Nov 2 16:19:33 2022 +0530 dt-bindings: opp: Fix named microwatt property The named microwatt- property should look exactly like microvolt and microamp properties. There were some differences, fix them. Tested-by: James Calligeros Signed-off-by: Viresh Kumar Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d0c46b59ac82cb2c81c91188cb100401c1862d53 Author: Viresh Kumar Date: Wed Nov 2 16:19:33 2022 +0530 dt-bindings: opp: Fix usage of current in microwatt property The bindings mentions "current" instead of "power". Fix it. Tested-by: James Calligeros Signed-off-by: Viresh Kumar Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db559117828d2448fe81ada051c60bcf39f822e9 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 4 00:39:56 2022 +0530 bpf: Consolidate spin_lock, timer management into btf_record Now that kptr_off_tab has been refactored into btf_record, and can hold more than one specific field type, accomodate bpf_spin_lock and bpf_timer as well. While they don't require any more metadata than offset, having all special fields in one place allows us to share the same code for allocated user defined types and handle both map values and these allocated objects in a similar fashion. As an optimization, we still keep spin_lock_off and timer_off offsets in the btf_record structure, just to avoid having to find the btf_field struct each time their offset is needed. This is mostly needed to manipulate such objects in a map value at runtime. It's ok to hardcode just one offset as more than one field is disallowed. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221103191013.1236066-8-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 53 ++++--- include/linux/btf.h | 3 +- kernel/bpf/arraymap.c | 19 +-- kernel/bpf/bpf_local_storage.c | 2 +- kernel/bpf/btf.c | 323 ++++++++++++++++++++++------------------- kernel/bpf/hashtab.c | 24 +-- kernel/bpf/helpers.c | 6 +- kernel/bpf/local_storage.c | 2 +- kernel/bpf/map_in_map.c | 5 +- kernel/bpf/syscall.c | 135 ++++++++--------- kernel/bpf/verifier.c | 82 +++-------- net/core/bpf_sk_storage.c | 4 +- 12 files changed, 314 insertions(+), 344 deletions(-) commit af085f55329ca72c8c6f78a11f352ef7a7a4d1d7 Merge: aa3496accc41 d5ce4b892341 Author: Alexei Starovoitov Date: Thu Nov 3 21:54:14 2022 -0700 Merge branch 'veristat: replay, filtering, sorting' Andrii Nakryiko says: ==================== This patch set adds a bunch of new featurs and improvements that were sorely missing during recent active use of veristat to develop BPF verifier precision changes. Individual patches provide justification, explanation and often examples showing how new capabilities can be used. ==================== Signed-off-by: Alexei Starovoitov commit d5ce4b89234156d66ac8a59bddbc341667aadf86 Author: Andrii Nakryiko Date: Wed Nov 2 22:53:04 2022 -0700 selftests/bpf: support stat filtering in comparison mode in veristat Finally add support for filtering stats values, similar to non-comparison mode filtering. For comparison mode 4 variants of stats are important for filtering, as they allow to filter either A or B side, but even more importantly they allow to filter based on value difference, and for verdict stat value difference is MATCH/MISMATCH classification. So with these changes it's finally possible to easily check if there were any mismatches between failure/success outcomes on two separate data sets. Like in an example below: $ ./veristat -e file,prog,verdict,insns -C ~/baseline-results.csv ~/shortest-results.csv -f verdict_diff=mismatch File Program Verdict (A) Verdict (B) Verdict (DIFF) Insns (A) Insns (B) Insns (DIFF) ------------------------------------- --------------------- ----------- ----------- -------------- --------- --------- ------------------- dynptr_success.bpf.linked1.o test_data_slice success failure MISMATCH 85 0 -85 (-100.00%) dynptr_success.bpf.linked1.o test_read_write success failure MISMATCH 1992 0 -1992 (-100.00%) dynptr_success.bpf.linked1.o test_ringbuf success failure MISMATCH 74 0 -74 (-100.00%) kprobe_multi.bpf.linked1.o test_kprobe failure success MISMATCH 0 246 +246 (+100.00%) kprobe_multi.bpf.linked1.o test_kprobe_manual failure success MISMATCH 0 246 +246 (+100.00%) kprobe_multi.bpf.linked1.o test_kretprobe failure success MISMATCH 0 248 +248 (+100.00%) kprobe_multi.bpf.linked1.o test_kretprobe_manual failure success MISMATCH 0 248 +248 (+100.00%) kprobe_multi.bpf.linked1.o trigger failure success MISMATCH 0 2 +2 (+100.00%) netcnt_prog.bpf.linked1.o bpf_nextcnt failure success MISMATCH 0 56 +56 (+100.00%) pyperf600_nounroll.bpf.linked1.o on_event success failure MISMATCH 568128 1000001 +431873 (+76.02%) ringbuf_bench.bpf.linked1.o bench_ringbuf success failure MISMATCH 8 0 -8 (-100.00%) strobemeta.bpf.linked1.o on_event success failure MISMATCH 557149 1000001 +442852 (+79.49%) strobemeta_nounroll1.bpf.linked1.o on_event success failure MISMATCH 57240 1000001 +942761 (+1647.03%) strobemeta_nounroll2.bpf.linked1.o on_event success failure MISMATCH 501725 1000001 +498276 (+99.31%) strobemeta_subprogs.bpf.linked1.o on_event success failure MISMATCH 65420 1000001 +934581 (+1428.59%) test_map_in_map_invalid.bpf.linked1.o xdp_noop0 success failure MISMATCH 2 0 -2 (-100.00%) test_mmap.bpf.linked1.o test_mmap success failure MISMATCH 46 0 -46 (-100.00%) test_verif_scale3.bpf.linked1.o balancer_ingress success failure MISMATCH 845499 1000001 +154502 (+18.27%) ------------------------------------- --------------------- ----------- ----------- -------------- --------- --------- ------------------- Note that by filtering on verdict_diff=mismatch, it's now extremely easy and fast to see any changes in verdict. Example above showcases both failure -> success transitions (which are generally surprising) and success -> failure transitions (which are expected if bugs are present). Given veristat allows to query relative percent difference values, internal logic for comparison mode is based on floating point numbers, so requires a bit of epsilon precision logic, deviating from typical integer simple handling rules. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221103055304.2904589-11-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 70 +++++++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 5 deletions(-) commit fa9bb590c2895b14c9da46ba1860d06efba55657 Author: Andrii Nakryiko Date: Wed Nov 2 22:53:03 2022 -0700 selftests/bpf: support stats ordering in comparison mode in veristat Introduce the concept of "stat variant", by which it's possible to specify whether to use the value from A (baseline) side, B (comparison or control) side, the absolute difference value or relative (percentage) difference value. To support specifying this, veristat recognizes `_a`, `_b`, `_diff`, `_pct` suffixes, which can be appended to stat name(s). In non-comparison mode variants are ignored (there is only `_a` variant effectively), if no variant suffix is provided, `_b` is assumed, as control group is of primary interest in comparison mode. These stat variants can be flexibly combined with asc/desc orders. Here's an example of ordering results first by verdict match/mismatch (or n/a if one of the sides is missing; n/a is always considered to be the lowest value), and within each match/mismatch/n/a group further sort by number of instructions in B side. In this case we don't have MISMATCH cases, but N/A are split from MATCH, demonstrating this custom ordering. $ ./veristat -e file,prog,verdict,insns -s verdict_diff,insns_b_ -C ~/base.csv ~/comp.csv File Program Verdict (A) Verdict (B) Verdict (DIFF) Insns (A) Insns (B) Insns (DIFF) ------------------ ------------------------------ ----------- ----------- -------------- --------- --------- -------------- bpf_xdp.o tail_lb_ipv6 N/A success N/A N/A 151895 N/A bpf_xdp.o tail_nodeport_nat_egress_ipv4 N/A success N/A N/A 15619 N/A bpf_xdp.o tail_nodeport_ipv6_dsr N/A success N/A N/A 1206 N/A bpf_xdp.o tail_nodeport_ipv4_dsr N/A success N/A N/A 1162 N/A bpf_alignchecker.o tail_icmp6_send_echo_reply N/A failure N/A N/A 74 N/A bpf_alignchecker.o __send_drop_notify success N/A N/A 53 N/A N/A bpf_host.o __send_drop_notify success N/A N/A 53 N/A N/A bpf_host.o cil_from_host success N/A N/A 762 N/A N/A bpf_xdp.o tail_lb_ipv4 success success MATCH 71736 73430 +1694 (+2.36%) bpf_xdp.o tail_handle_nat_fwd_ipv4 success success MATCH 21547 20920 -627 (-2.91%) bpf_xdp.o tail_rev_nodeport_lb6 success success MATCH 17954 17905 -49 (-0.27%) bpf_xdp.o tail_handle_nat_fwd_ipv6 success success MATCH 16974 17039 +65 (+0.38%) bpf_xdp.o tail_nodeport_nat_ingress_ipv4 success success MATCH 7658 7713 +55 (+0.72%) bpf_xdp.o tail_rev_nodeport_lb4 success success MATCH 7126 6934 -192 (-2.69%) bpf_xdp.o tail_nodeport_nat_ingress_ipv6 success success MATCH 6405 6397 -8 (-0.12%) bpf_xdp.o tail_nodeport_nat_ipv6_egress failure failure MATCH 752 752 +0 (+0.00%) bpf_xdp.o cil_xdp_entry success success MATCH 423 423 +0 (+0.00%) bpf_xdp.o __send_drop_notify success success MATCH 151 151 +0 (+0.00%) bpf_alignchecker.o tail_icmp6_handle_ns failure failure MATCH 33 33 +0 (+0.00%) ------------------ ------------------------------ ----------- ----------- -------------- --------- --------- -------------- Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221103055304.2904589-10-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 192 +++++++++++++++++++++++++++++++-- 1 file changed, 182 insertions(+), 10 deletions(-) commit a5710848d824168b5f7f02aa3689e648c46b2e46 Author: Andrii Nakryiko Date: Wed Nov 2 22:53:02 2022 -0700 selftests/bpf: handle missing records in comparison mode better in veristat When comparing two datasets, if either side is missing corresponding record with the same file and prog name, currently veristat emits misleading zeros/failures, and even tried to calculate a difference, even though there is no data to compare against. This patch improves internal logic of handling such situations. Now we'll emit "N/A" in places where data is missing and comparison is non-sensical. As an example, in an artificially truncated and mismatched Cilium results, the output looks like below: $ ./veristat -e file,prog,verdict,insns -C ~/base.csv ~/comp.csv File Program Verdict (A) Verdict (B) Verdict (DIFF) Insns (A) Insns (B) Insns (DIFF) ------------------ ------------------------------ ----------- ----------- -------------- --------- --------- -------------- bpf_alignchecker.o __send_drop_notify success N/A N/A 53 N/A N/A bpf_alignchecker.o tail_icmp6_handle_ns failure failure MATCH 33 33 +0 (+0.00%) bpf_alignchecker.o tail_icmp6_send_echo_reply N/A failure N/A N/A 74 N/A bpf_host.o __send_drop_notify success N/A N/A 53 N/A N/A bpf_host.o cil_from_host success N/A N/A 762 N/A N/A bpf_xdp.o __send_drop_notify success success MATCH 151 151 +0 (+0.00%) bpf_xdp.o cil_xdp_entry success success MATCH 423 423 +0 (+0.00%) bpf_xdp.o tail_handle_nat_fwd_ipv4 success success MATCH 21547 20920 -627 (-2.91%) bpf_xdp.o tail_handle_nat_fwd_ipv6 success success MATCH 16974 17039 +65 (+0.38%) bpf_xdp.o tail_lb_ipv4 success success MATCH 71736 73430 +1694 (+2.36%) bpf_xdp.o tail_lb_ipv6 N/A success N/A N/A 151895 N/A bpf_xdp.o tail_nodeport_ipv4_dsr N/A success N/A N/A 1162 N/A bpf_xdp.o tail_nodeport_ipv6_dsr N/A success N/A N/A 1206 N/A bpf_xdp.o tail_nodeport_nat_egress_ipv4 N/A success N/A N/A 15619 N/A bpf_xdp.o tail_nodeport_nat_ingress_ipv4 success success MATCH 7658 7713 +55 (+0.72%) bpf_xdp.o tail_nodeport_nat_ingress_ipv6 success success MATCH 6405 6397 -8 (-0.12%) bpf_xdp.o tail_nodeport_nat_ipv6_egress failure failure MATCH 752 752 +0 (+0.00%) bpf_xdp.o tail_rev_nodeport_lb4 success success MATCH 7126 6934 -192 (-2.69%) bpf_xdp.o tail_rev_nodeport_lb6 success success MATCH 17954 17905 -49 (-0.27%) ------------------ ------------------------------ ----------- ----------- -------------- --------- --------- -------------- Internally veristat now separates joining two datasets and remembering the join, and actually emitting a comparison view. This will come handy when we add support for filtering and custom ordering in comparison mode. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221103055304.2904589-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 147 ++++++++++++++++++++++++--------- 1 file changed, 110 insertions(+), 37 deletions(-) commit 77534401d69c2a35d2a53e599fafb5f0f604e45d Author: Andrii Nakryiko Date: Wed Nov 2 22:53:01 2022 -0700 selftests/bpf: make veristat emit all stats in CSV mode by default Make veristat distinguish between table and CSV output formats and use different default set of stats (columns) that are emitted. While for human-readable table output it doesn't make sense to output all known stats, it is very useful for CSV mode to record all possible data, so that it can later be queried and filtered in replay or comparison mode. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221103055304.2904589-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 1bb4ec815015609c9458d5ffeb5c8cc95b7d44d6 Author: Andrii Nakryiko Date: Wed Nov 2 22:53:00 2022 -0700 selftests/bpf: support simple filtering of stats in veristat Define simple expressions to filter not just by file and program name, but also by resulting values of collected stats. Support usual equality and inequality operators. Verdict, which is a boolean-like field can be also filtered either as 0/1, failure/success (with f/s, fail/succ, and failure/success aliases) symbols, or as false/true (f/t). Aliases are case insensitive. Currently this filtering is honored only in verification and replay modes. Comparison mode support will be added in next patch. Here's an example of verifying a bunch of BPF object files and emitting only results for successfully validated programs that have more than 100 total instructions processed by BPF verifier, sorted by number of instructions in ascending order: $ sudo ./veristat *.bpf.o -s insns^ -f 'insns>100' There can be many filters (both allow and deny flavors), all of them are combined. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221103055304.2904589-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 158 ++++++++++++++++++++++++++++++++- 1 file changed, 157 insertions(+), 1 deletion(-) commit d68c07e2dd91c3e8bc451ecb218b77da2635cdd4 Author: Andrii Nakryiko Date: Wed Nov 2 22:52:59 2022 -0700 selftests/bpf: allow to define asc/desc ordering for sort specs in veristat Allow to specify '^' at the end of stat name to designate that it should be sorted in ascending order. Similarly, allow any of 'v', 'V', '.', '!', or '_' suffix "symbols" to designate descending order. It's such a zoo for descending order because there is no single intuitive symbol that could be used (using 'v' looks pretty weird in practice), so few symbols that are "downwards leaning or pointing" were chosen. Either way, it shouldn't cause any troubles in practice. This new feature allows to customize sortering order to match user's needs. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221103055304.2904589-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 63 ++++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 15 deletions(-) commit b9670b904a59808ef4222179a255978384bcc119 Author: Andrii Nakryiko Date: Wed Nov 2 22:52:58 2022 -0700 selftests/bpf: ensure we always have non-ambiguous sorting in veristat Always fall back to unique file/prog comparison if user's custom order specs are ambiguous. This ensures stable output no matter what. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221103055304.2904589-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 10b1b3f3e56a6a3586356bf8cc77d7753ba8fcc9 Author: Andrii Nakryiko Date: Wed Nov 2 22:52:57 2022 -0700 selftests/bpf: consolidate and improve file/prog filtering in veristat Slightly change rules of specifying file/prog glob filters. In practice it's quite often inconvenient to do `*/` if that program glob is unique enough and won't accidentally match any file names. This patch changes the rules so that `-f ` will apply specified glob to both file and program names. User still has all the control by doing '*/' or '' and ' Link: https://lore.kernel.org/r/20221103055304.2904589-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 127 +++++++++++++++++---------------- 1 file changed, 65 insertions(+), 62 deletions(-) commit 62d2c08bb91cc3fc26319c571000cacac0312426 Author: Andrii Nakryiko Date: Wed Nov 2 22:52:56 2022 -0700 selftests/bpf: shorten "Total insns/states" column names in veristat In comparison mode the "Total " part is pretty useless, but takes a considerable amount of horizontal space. Drop the "Total " parts. Also make sure that table headers for numerical columns are aligned in the same fashion as integer values in those columns. This looks better and is now more obvious with shorter "Insns" and "States" column headers. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221103055304.2904589-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 9b5e3536c898b23143748b8cc01c64f868ec7078 Author: Andrii Nakryiko Date: Wed Nov 2 22:52:55 2022 -0700 selftests/bpf: add veristat replay mode Replay mode allow to parse previously stored CSV file with verification results and present it in desired output (presumable human-readable table, but CSV to CSV convertion is supported as well). While doing that, it's possible to use veristat's sorting rules, specify subset of columns, and filter by file and program name. In subsequent patches veristat's filtering capabilities will just grow making replay mode even more useful in practice for post-processing results. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221103055304.2904589-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 126 +++++++++++++++++++++++---------- 1 file changed, 88 insertions(+), 38 deletions(-) commit aa3496accc412b3d975e4ee5d06076d73394d8b5 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 4 00:39:55 2022 +0530 bpf: Refactor kptr_off_tab into btf_record To prepare the BPF verifier to handle special fields in both map values and program allocated types coming from program BTF, we need to refactor the kptr_off_tab handling code into something more generic and reusable across both cases to avoid code duplication. Later patches also require passing this data to helpers at runtime, so that they can work on user defined types, initialize them, destruct them, etc. The main observation is that both map values and such allocated types point to a type in program BTF, hence they can be handled similarly. We can prepare a field metadata table for both cases and store them in struct bpf_map or struct btf depending on the use case. Hence, refactor the code into generic btf_record and btf_field member structs. The btf_record represents the fields of a specific btf_type in user BTF. The cnt indicates the number of special fields we successfully recognized, and field_mask is a bitmask of fields that were found, to enable quick determination of availability of a certain field. Subsequently, refactor the rest of the code to work with these generic types, remove assumptions about kptr and kptr_off_tab, rename variables to more meaningful names, etc. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221103191013.1236066-7-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 125 +++++++++++++++-------- include/linux/btf.h | 3 +- kernel/bpf/arraymap.c | 13 ++- kernel/bpf/btf.c | 67 ++++++------ kernel/bpf/hashtab.c | 14 ++- kernel/bpf/map_in_map.c | 14 ++- kernel/bpf/syscall.c | 263 +++++++++++++++++++++++++++--------------------- kernel/bpf/verifier.c | 96 +++++++++--------- 8 files changed, 332 insertions(+), 263 deletions(-) commit b3809277addbba68724ee0cd6d048a3ca33c5e4d Merge: 20224838e42b 69b957440a63 Author: Jakub Kicinski Date: Thu Nov 3 21:13:54 2022 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-11-02 (i40e, iavf) This series contains updates to i40e and iavf drivers. Joe Damato adds tracepoint information to i40e_napi_poll to expose helpful debug information for users who'd like to get a better understanding of how their NIC is performing as they adjust various parameters and tuning knobs. Note: this does not touch any XDP related code paths. This tracepoint will only work when not using XDP. Care has been taken to avoid changing control flow in i40e_napi_poll with this change. Alicja adds error messaging for unsupported duplex settings for i40e. Ye Xingchen replaces use of __FUNCTION__ with __func__ for iavf. Bartosz changes tense of device removal message to be more clear on the action for iavf. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: iavf: Change information about device removal in dmesg iavf: Replace __FUNCTION__ with __func__ i40e: Add appropriate error message logged for incorrect duplex setting i40e: Add i40e_napi_poll tracepoint i40e: Record number of RXes cleaned during NAPI i40e: Record number TXes cleaned during NAPI i40e: Store the irq number in i40e_q_vector ==================== Link: https://lore.kernel.org/r/20221102211011.2944983-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 20224838e42b12db189dcedfd4ff387f9aaa6ed4 Merge: c5733e5b15d9 790835fcc0cb Author: Jakub Kicinski Date: Thu Nov 3 21:12:56 2022 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-11-02 (e1000e, e1000, igc) This series contains updates to e1000e, e1000, and igc drivers. For e1000e, Sasha adds a new board type to help distinguish platforms and adds device id support for upcoming platforms. He also adds trace points for CSME flows to aid in debugging. Ani removes unnecessary kmap_atomic call for e1000 and e1000e. Muhammad sets speed based transmit offsets for launchtime functionality to reduce latency for igc. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: igc: Correct the launchtime offset e1000: Remove unnecessary use of kmap_atomic() e1000e: Remove unnecessary use of kmap_atomic() e1000e: Add e1000e trace module e1000e: Add support for the next LOM generation e1000e: Separate MTP board type from ADP ==================== Link: https://lore.kernel.org/r/20221102203957.2944396-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit c5733e5b15d91ab679646ec3149e192996a27d5d Author: Nathan Chancellor Date: Wed Nov 2 09:06:10 2022 -0700 hamradio: baycom_epp: Fix return type of baycom_send_packet() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/net/hamradio/baycom_epp.c:1119:25: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = baycom_send_packet, ^~~~~~~~~~~~~~~~~~ 1 error generated. ->ndo_start_xmit() in 'struct net_device_ops' expects a return type of 'netdev_tx_t', not 'int'. Adjust the return type of baycom_send_packet() to match the prototype's to resolve the warning and CFI failure. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20221102160610.1186145-1-nathan@kernel.org Signed-off-by: Jakub Kicinski drivers/net/hamradio/baycom_epp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63fe6ff674a96cfcfc0fa8df1051a27aa31c70b4 Author: Nathan Chancellor Date: Wed Nov 2 09:09:33 2022 -0700 net: ethernet: ti: Fix return type of netcp_ndo_start_xmit() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/net/ethernet/ti/netcp_core.c:1944:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = netcp_ndo_start_xmit, ^~~~~~~~~~~~~~~~~~~~ 1 error generated. ->ndo_start_xmit() in 'struct net_device_ops' expects a return type of 'netdev_tx_t', not 'int'. Adjust the return type of netcp_ndo_start_xmit() to match the prototype's to resolve the warning and CFI failure. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20221102160933.1601260-1-nathan@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/netcp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2cce3a6e8ebe0e694e3380f8e60cd20bf21df82 Author: Christophe JAILLET Date: Wed Nov 2 07:36:23 2022 +0100 net: usb: 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/d4432a67b6f769cac0a9ec910ac725298b64e102.1667336095.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/usb/cdc_ncm.c | 3 ++- drivers/net/usb/qmi_wwan.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 7712b3e966eaf691571115dd45dbf2a777081e4f Merge: 0884aaf37afa dca56c3038c3 Author: Jakub Kicinski Date: Thu Nov 3 20:48:44 2022 -0700 Merge branch 'net-fix-netdev-to-devlink_port-linkage-and-expose-to-user' Jiri Pirko says: ==================== net: fix netdev to devlink_port linkage and expose to user Currently, the info about linkage from netdev to the related devlink_port instance is done using ndo_get_devlink_port(). This is not sufficient, as it is up to the driver to implement it and some of them don't do that. Also it leads to a lot of unnecessary boilerplate code in all the drivers. Instead of that, introduce a possibility for driver to expose this relationship by new SET_NETDEV_DEVLINK_PORT macro which stores it into dev->devlink_port. It is ensured by the driver init/fini flows that the devlink_port pointer does not change during the netdev lifetime. Devlink port is always registered before netdev register and unregistered after netdev unregister. Benefit from this linkage setup and remove explicit calls from driver to devlink_port_type_eth_set() and clear(). Many of the driver didn't use it correctly anyway. Let the devlink.c to track associated netdev events and adjust type and type pointer accordingly. Also use this events to to keep track on ifname change and remove RTNL lock taking from devlink_nl_port_fill(). Finally, remove the ndo_get_devlink_port() ndo which is no longer used and expose devlink_port handle as a new netdev netlink attribute to the user. That way, during the ifname->devlink_port lookup, userspace app does not have to dump whole devlink port list and instead it can just do a simple RTM_GETLINK query. ==================== Link: https://lore.kernel.org/r/20221102160211.662752-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit dca56c3038c34a3e5acfe0aadb1f2bc9d724ae79 Author: Jiri Pirko Date: Wed Nov 2 17:02:11 2022 +0100 net: expose devlink port over rtnetlink Expose devlink port handle related to netdev over rtnetlink. Introduce a new nested IFLA attribute to carry the info. Call into devlink code to fill-up the nest with existing devlink attributes that are used over devlink netlink. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/net/devlink.h | 14 ++++++++++++++ include/uapi/linux/if_link.h | 2 ++ net/core/devlink.c | 18 ++++++++++++++++++ net/core/rtnetlink.c | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+) commit 77df1db80da384c565106321f5934967690da7dd Author: Jiri Pirko Date: Wed Nov 2 17:02:10 2022 +0100 net: remove unused ndo_get_devlink_port Remove ndo_get_devlink_port which is no longer used alongside with the implementations in drivers. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 -------- drivers/net/ethernet/fungible/funeth/funeth_main.c | 8 -------- drivers/net/ethernet/intel/ice/ice_main.c | 15 --------------- drivers/net/ethernet/intel/ice/ice_repr.c | 9 --------- drivers/net/ethernet/marvell/prestera/prestera_devlink.c | 7 ------- drivers/net/ethernet/marvell/prestera/prestera_devlink.h | 2 -- drivers/net/ethernet/marvell/prestera/prestera_main.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/en/devlink.c | 10 ---------- drivers/net/ethernet/mellanox/mlx5/core/en/devlink.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 10 ---------- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 11 ----------- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 11 ----------- drivers/net/ethernet/mscc/ocelot_net.c | 10 ---------- drivers/net/ethernet/netronome/nfp/nfp_app.h | 2 -- drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 11 ----------- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 -- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 1 - drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 -------- drivers/net/netdevsim/netdev.c | 9 --------- include/linux/netdevice.h | 5 ----- net/dsa/slave.c | 8 -------- 22 files changed, 150 deletions(-) commit 8eba37f7e9bc82fac08f31d318e36f341494442d Author: Jiri Pirko Date: Wed Nov 2 17:02:09 2022 +0100 net: devlink: use devlink_port pointer instead of ndo_get_devlink_port Use newly introduced devlink_port pointer instead of getting it calling to ndo_get_devlink_port op. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 12 ++---------- net/core/net-sysfs.c | 4 ++-- net/ethtool/ioctl.c | 11 ++--------- 3 files changed, 6 insertions(+), 21 deletions(-) commit e705a621c071b43e4ea971abb70d7677dc640c27 Author: Jiri Pirko Date: Wed Nov 2 17:02:08 2022 +0100 net: devlink: add not cleared type warning to port unregister By the time port unregister is called. There should be no type set. Make sure that the driver cleared it before and warn in case it didn't. This enforces symmetricity with type set and port register. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 1 + 1 file changed, 1 insertion(+) commit 31265c1e29eb28f17df50d04ee421b5b6369fefd Author: Jiri Pirko Date: Wed Nov 2 17:02:07 2022 +0100 net: devlink: store copy netdevice ifindex and ifname to allow port_fill() without RTNL held To avoid a need to take RTNL mutex in port_fill() function, benefit from the introduce infrastructure that tracks netdevice notifier events. Store the ifindex and ifname upon register and change name events. Remove the rtnl_held bool propagated down to port_fill() function as it is no longer needed. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/net/devlink.h | 2 ++ net/core/devlink.c | 68 ++++++++++++++++++++------------------------------- 2 files changed, 29 insertions(+), 41 deletions(-) commit d0f5172629339f4a9cbbe5f9ae51cea48b4af333 Author: Jiri Pirko Date: Wed Nov 2 17:02:06 2022 +0100 net: devlink: remove net namespace check from devlink_nl_port_fill() It is ensured by the netdevice notifier event processing, that only netdev pointers from the same net namespaces are filled. Remove the net namespace check from devlink_nl_port_fill() as it is no longer needed. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c80965784dbf2fd624be654c1e73c24beada7441 Author: Jiri Pirko Date: Wed Nov 2 17:02:05 2022 +0100 net: devlink: remove netdev arg from devlink_port_type_eth_set() Since devlink_port_type_eth_set() should no longer be called by any driver with netdev pointer as it should rather use SET_NETDEV_DEVLINK_PORT, remove the netdev arg. Add a warn to type_clear() Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx4/main.c | 2 +- include/net/devlink.h | 3 +-- net/core/devlink.c | 23 ++++++++++++++--------- 3 files changed, 16 insertions(+), 12 deletions(-) commit ac73d4bf2cdaf2cb8a43df8ee4a5c066d2c5d7b4 Author: Jiri Pirko Date: Wed Nov 2 17:02:04 2022 +0100 net: make drivers to use SET_NETDEV_DEVLINK_PORT to set devlink_port Benefit from the previously implemented tracking of netdev events in devlink code and instead of calling devlink_port_type_eth_set() and devlink_port_type_clear() to set devlink port type and link to related netdev, use SET_NETDEV_DEVLINK_PORT() macro to assign devlink_port pointer to netdevice which is about to be registered. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +--- .../ethernet/freescale/dpaa2/dpaa2-eth-devlink.c | 11 +------ drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 1 + drivers/net/ethernet/fungible/funeth/funeth_main.c | 5 +--- drivers/net/ethernet/intel/ice/ice_devlink.c | 14 ++------- drivers/net/ethernet/intel/ice/ice_main.c | 3 +- drivers/net/ethernet/intel/ice/ice_repr.c | 3 +- .../ethernet/marvell/prestera/prestera_devlink.c | 10 ------- .../ethernet/marvell/prestera/prestera_devlink.h | 3 -- .../net/ethernet/marvell/prestera/prestera_main.c | 4 +-- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 9 ++---- .../net/ethernet/mellanox/mlx5/core/en/devlink.c | 7 ----- .../net/ethernet/mellanox/mlx5/core/en/devlink.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 34 +++++----------------- drivers/net/ethernet/mellanox/mlxsw/core.c | 20 +++---------- drivers/net/ethernet/mellanox/mlxsw/core.h | 7 ++--- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 6 ++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 ++-- drivers/net/ethernet/mscc/ocelot_net.c | 1 + drivers/net/ethernet/mscc/ocelot_vsc7514.c | 9 ------ drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 12 ++------ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 11 ++----- drivers/net/ethernet/netronome/nfp/nfp_port.h | 2 -- .../net/ethernet/pensando/ionic/ionic_devlink.c | 2 +- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 6 ++-- drivers/net/netdevsim/dev.c | 2 -- drivers/net/netdevsim/netdev.c | 1 + net/dsa/dsa2.c | 9 ------ net/dsa/slave.c | 1 + 30 files changed, 41 insertions(+), 167 deletions(-) commit 02a68a47eadedf95748facfca6ced31fb0181d52 Author: Jiri Pirko Date: Wed Nov 2 17:02:03 2022 +0100 net: devlink: track netdev with devlink_port assigned Currently, ethernet drivers are using devlink_port_type_eth_set() and devlink_port_type_clear() to set devlink port type and link to related netdev. Instead of calling them directly, let the driver use SET_NETDEV_DEVLINK_PORT macro to assign devlink_port pointer and let devlink to track it. Note the devlink port pointer is static during the time netdevice is registered. In devlink code, use per-namespace netdev notifier to track the netdevices with devlink_port assigned and change the internal devlink_port type and related type pointer accordingly. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 19 ++++++++++++ net/core/dev.c | 14 +++++---- net/core/devlink.c | 75 ++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 99 insertions(+), 9 deletions(-) commit d41c9dbd12745cfc1cb2946cd99016d83c2c5364 Author: Jiri Pirko Date: Wed Nov 2 17:02:02 2022 +0100 net: devlink: take RTNL in port_fill() function only if it is not held Follow-up patch is going to introduce a netdevice notifier event processing which is called with RTNL mutex held. Processing of this will eventually lead to call to port_notity() and port_fill() which currently takes RTNL mutex internally. So as a temporary solution, propagate a bool indicating if the mutex is already held. This will go away in one of the follow-up patches. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) commit 45791e0d00c445936bb19535fe847083b1edd26d Author: Jiri Pirko Date: Wed Nov 2 17:02:01 2022 +0100 net: devlink: move port_type_netdev_checks() call to __devlink_port_type_set() As __devlink_port_type_set() is going to be called directly from netdevice notifier event handle in one of the follow-up patches, move the port_type_netdev_checks() call there. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 63 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 30 deletions(-) commit 8573a04404ddacb2d966eef09bf38b2ad6dbe86f Author: Jiri Pirko Date: Wed Nov 2 17:02:00 2022 +0100 net: devlink: move port_type_warn_schedule() call to __devlink_port_type_set() As __devlink_port_type_set() is going to be called directly from netdevice notifier event handle in one of the follow-up patches, move the port_type_warn_schedule() call there. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski net/core/devlink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3830c5719af66fac9849cf5fb04b03d4e4bb46ff Author: Jiri Pirko Date: Wed Nov 2 17:01:59 2022 +0100 net: devlink: convert devlink port type-specific pointers to union Instead of storing type_dev as a void pointer, convert it to union and use it to store either struct net_device or struct ib_device pointer. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski include/net/devlink.h | 13 ++++++++++--- net/core/devlink.c | 17 +++++++++++++---- 2 files changed, 23 insertions(+), 7 deletions(-) commit 0884aaf37afaac69dd31cb501b67635569483bb3 Merge: fbeb229a6622 4a331d346996 Author: Jakub Kicinski Date: Thu Nov 3 20:46:36 2022 -0700 Merge branch 'bridge-add-mac-authentication-bypass-mab-support' Ido Schimmel says: ==================== bridge: Add MAC Authentication Bypass (MAB) support Patch #1 adds MAB support in the bridge driver. See the commit message for motivation, design choices and implementation details. Patch #2 adds corresponding test cases. Follow-up patchsets will add offload support in mlxsw and mv88e6xxx. ==================== Link: https://lore.kernel.org/r/20221101193922.2125323-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit 4a331d3469963b5db37d462963397a8fe52aace0 Author: Hans J. Schultz Date: Tue Nov 1 21:39:22 2022 +0200 selftests: forwarding: Add MAC Authentication Bypass (MAB) test cases Add four test cases to verify MAB functionality: * Verify that a locked FDB entry can be generated by the bridge, preventing a host from communicating via the bridge. Test that user space can clear the "locked" flag by replacing the entry, thereby authenticating the host and allowing it to communicate via the bridge. * Test that an entry cannot roam to a locked port, but that it can roam to an unlocked port. * Test that MAB can only be enabled on a port that is both locked and has learning enabled. * Test that locked FDB entries are flushed from a port when MAB is disabled. Signed-off-by: Hans J. Schultz Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski .../selftests/net/forwarding/bridge_locked_port.sh | 155 ++++++++++++++++++++- tools/testing/selftests/net/forwarding/lib.sh | 8 ++ 2 files changed, 162 insertions(+), 1 deletion(-) commit a35ec8e38cdd1766f29924ca391a01de20163931 Author: Hans J. Schultz Date: Tue Nov 1 21:39:21 2022 +0200 bridge: Add MAC Authentication Bypass (MAB) support Hosts that support 802.1X authentication are able to authenticate themselves by exchanging EAPOL frames with an authenticator (Ethernet bridge, in this case) and an authentication server. Access to the network is only granted by the authenticator to successfully authenticated hosts. The above is implemented in the bridge using the "locked" bridge port option. When enabled, link-local frames (e.g., EAPOL) can be locally received by the bridge, but all other frames are dropped unless the host is authenticated. That is, unless the user space control plane installed an FDB entry according to which the source address of the frame is located behind the locked ingress port. The entry can be dynamic, in which case learning needs to be enabled so that the entry will be refreshed by incoming traffic. There are deployments in which not all the devices connected to the authenticator (the bridge) support 802.1X. Such devices can include printers and cameras. One option to support such deployments is to unlock the bridge ports connecting these devices, but a slightly more secure option is to use MAB. When MAB is enabled, the MAC address of the connected device is used as the user name and password for the authentication. For MAB to work, the user space control plane needs to be notified about MAC addresses that are trying to gain access so that they will be compared against an allow list. This can be implemented via the regular learning process with the sole difference that learned FDB entries are installed with a new "locked" flag indicating that the entry cannot be used to authenticate the device. The flag cannot be set by user space, but user space can clear the flag by replacing the entry, thereby authenticating the device. Locked FDB entries implement the following semantics with regards to roaming, aging and forwarding: 1. Roaming: Locked FDB entries can roam to unlocked (authorized) ports, in which case the "locked" flag is cleared. FDB entries cannot roam to locked ports regardless of MAB being enabled or not. Therefore, locked FDB entries are only created if an FDB entry with the given {MAC, VID} does not already exist. This behavior prevents unauthenticated devices from disrupting traffic destined to already authenticated devices. 2. Aging: Locked FDB entries age and refresh by incoming traffic like regular entries. 3. Forwarding: Locked FDB entries forward traffic like regular entries. If user space detects an unauthorized MAC behind a locked port and wishes to prevent traffic with this MAC DA from reaching the host, it can do so using tc or a different mechanism. Enable the above behavior using a new bridge port option called "mab". It can only be enabled on a bridge port that is both locked and has learning enabled. Locked FDB entries are flushed from the port once MAB is disabled. A new option is added because there are pure 802.1X deployments that are not interested in notifications about locked FDB entries. Signed-off-by: Hans J. Schultz Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski include/linux/if_bridge.h | 1 + include/uapi/linux/if_link.h | 1 + include/uapi/linux/neighbour.h | 8 +++++++- net/bridge/br_fdb.c | 24 ++++++++++++++++++++++++ net/bridge/br_input.c | 21 +++++++++++++++++++-- net/bridge/br_netlink.c | 21 ++++++++++++++++++++- net/bridge/br_private.h | 3 ++- net/core/rtnetlink.c | 5 +++++ 8 files changed, 79 insertions(+), 5 deletions(-) commit fdb02688f22b397c811328bf826b5b110d5cdc41 Author: Andrew Davis Date: Fri Oct 28 09:24:17 2022 -0500 arm64: dts: ti: k3-am65: Enable McASP nodes at the board level McASP nodes defined in the top-level AM65x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the McASP nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Jan Kiszka Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221028142417.10642-12-afd@ti.com arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 12 ------------ arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 12 ------------ 3 files changed, 3 insertions(+), 24 deletions(-) commit 3f9089ea008c195b6cf449735c5a3a5fcac1a382 Author: Andrew Davis Date: Fri Oct 28 09:24:16 2022 -0500 arm64: dts: ti: k3-am65: Enable Mailbox nodes at the board level Mailbox nodes defined in the top-level AM65x SoC dtsi files are incomplete and may not be functional unless they are extended with a chosen interrupt and connection to a remote processor. As the remote processors depend on memory nodes which are only known at the board integration level, these nodes should only be enabled when provided with the above information. Disable the Mailbox nodes in the dtsi files and only enable the ones that are actually used on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Jan Kiszka Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221028142417.10642-11-afd@ti.com arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 42 ++-------------------- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 12 +++++++ arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 42 ++-------------------- 3 files changed, 16 insertions(+), 80 deletions(-) commit 7ff8432c272e3556461b7c9daad8156ae446e812 Author: Andrew Davis Date: Fri Oct 28 09:24:15 2022 -0500 arm64: dts: ti: k3-am65: Enable PCIe nodes at the board level PCIe nodes defined in the top-level AM65x SoC dtsi files are incomplete and will not be functional unless they are extended with a SerDes PHY. And usually only one of the two modes can be used at a time as they share a SerDes link. As the PHY and mode is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the PCIe nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Jan Kiszka Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221028142417.10642-10-afd@ti.com arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 13 +------------ arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 4 ++++ arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 16 ---------------- 3 files changed, 5 insertions(+), 28 deletions(-) commit b08bf4a5c0ed0a6b8472ca78ccf416d73d2609aa Author: Andrew Davis Date: Fri Oct 28 09:24:14 2022 -0500 arm64: dts: ti: k3-am65: Enable MCAN nodes at the board level MCAN nodes defined in the top-level AM65x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the MCAN nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Jan Kiszka Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221028142417.10642-9-afd@ti.com arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 8 -------- arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 2 ++ arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 8 -------- 3 files changed, 2 insertions(+), 16 deletions(-) commit c75c5c0bba500b1e454dc2591acdd6596fe64ce2 Author: Andrew Davis Date: Fri Oct 28 09:24:13 2022 -0500 arm64: dts: ti: k3-am65: Enable MDIO nodes at the board level MDIO nodes defined in the top-level AM65x SoC dtsi files are incomplete and will not be functional unless they are extended with a pinmux. As the attached PHY is only known about at the board integration level, these nodes should only be enabled when provided with this information. Disable the MDIO nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Jan Kiszka Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221028142417.10642-8-afd@ti.com arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 12 ------------ arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 13 +------------ 4 files changed, 5 insertions(+), 24 deletions(-) commit 0edd6d7ed646a53b41d09f7aa1d8c01d23bd7b73 Author: Andrew Davis Date: Fri Oct 28 09:24:12 2022 -0500 arm64: dts: ti: k3-am65: MDIO pinmux should belong to the MDIO node Although usually integrated as a child of an Ethernet controller, MDIO IP has an independent pinout. This pinout should be controlled by the MDIO node (so if it was to be disabled for instance, the pinmux state would reflect that). Move the MDIO pins pinmux to the MIDO nodes. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Jan Kiszka Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221028142417.10642-7-afd@ti.com arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c1d1189eafb27fa5c0cb0b92a4e81c155709068b Author: Andrew Davis Date: Fri Oct 28 09:24:11 2022 -0500 arm64: dts: ti: k3-am65: Enable ECAP nodes at the board level ECAP nodes defined in the top-level AM65x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. (These and the EPWM nodes could be used to trigger internal actions but they are not used like that currently) As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the ECAP nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Jan Kiszka Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221028142417.10642-6-afd@ti.com arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 1 + 3 files changed, 3 insertions(+) commit 5780cf09409551c67112127b90786e553c8f9a25 Author: Andrew Davis Date: Fri Oct 28 09:24:10 2022 -0500 arm64: dts: ti: k3-am65: Enable EPWM nodes at the board level EPWM nodes defined in the top-level AM65x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the EPWM nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Jan Kiszka Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221028142417.10642-5-afd@ti.com arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 1c49cbb19b1f2c61168741f987e65b50dd2f97de Author: Andrew Davis Date: Fri Oct 28 09:24:09 2022 -0500 arm64: dts: ti: k3-am65: Enable SPI nodes at the board level SPI nodes defined in the top-level AM65x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the SPI nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Jan Kiszka Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221028142417.10642-4-afd@ti.com arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 5 +++++ arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 1 + 4 files changed, 10 insertions(+) commit c0a5ba87af56f073145dd026280454aec4a44db0 Author: Andrew Davis Date: Fri Oct 28 09:24:08 2022 -0500 arm64: dts: ti: k3-am65: Enable I2C nodes at the board level I2C nodes defined in the top-level AM65x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the I2C nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Jan Kiszka Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221028142417.10642-3-afd@ti.com arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 6 ++++++ arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 4 ++++ arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 9 +++++++++ 5 files changed, 21 insertions(+) commit 65e8781ac90e74242ebb1a98bf415809e8387aaf Author: Andrew Davis Date: Fri Oct 28 09:24:07 2022 -0500 arm64: dts: ti: k3-am65: Enable UART nodes at the board level UART nodes defined in the top-level AM65x SoC dtsi files are incomplete and may not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the UART nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Tested-by: Jan Kiszka Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221028142417.10642-2-afd@ti.com arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 6 ++---- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 11 ++++++----- arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-common.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 6 ++++++ arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-common.dtsi | 4 ---- 7 files changed, 19 insertions(+), 13 deletions(-) commit 26507b033e84be6f821dc1693d667b5c809a7679 Author: Christophe JAILLET Date: Thu Nov 3 07:41:30 2022 +0100 firmware: ti_sci: Use devm_bitmap_zalloc when applicable 'xfer_alloc_table' is a bitmap. So use 'devm_bitmap_zalloc()' to simplify code and improve the semantic of the code. While at it, remove a redundant 'bitmap_zero()' call. Signed-off-by: Christophe JAILLET Signed-off-by: Nishanth Menon Reviewed-by: Nishanth Menon Link: https://lore.kernel.org/r/43ab1a7dd073d0d037d5d4bbbd5f8335de605826.1667457664.git.christophe.jaillet@wanadoo.fr drivers/firmware/ti_sci.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 9f7e3ed268520f4d539c03d4d48a604a9658ba37 Author: Rahul T R Date: Thu Nov 3 23:38:45 2022 +0530 arm64: defconfig: Enable TI_TFP410 DVI bridge Enable TI_TFP410 DPI to DVI bridge. This is required to enable HDMI output on j721e-sk platform. Signed-off-by: Rahul T R Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221103180845.17076-1-r-ravikumar@ti.com arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 441f0ec0ae1ef7350fa546e03c12cc93082e11c6 Merge: f80c71f7a868 ce28ab1380e8 Author: Dave Airlie Date: Fri Nov 4 12:32:11 2022 +1000 Merge tag 'drm-misc-next-2022-11-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 6.2: UAPI Changes: Cross-subsystem Changes: - dma-buf: locking improvements - firmware: New API in the RaspberryPi firmware driver used by vc4 Core Changes: - client: Null pointer dereference fix in drm_client_buffer_delete() - mm/buddy: Add back random seed log - ttm: Convert ttm_resource to use size_t for its size, fix for an undefined behaviour Driver Changes: - bridge: - adv7511: use dev_err_probe - it6505: Fix return value check of pm_runtime_get_sync - panel: - sitronix: Fixes and clean-ups - lcdif: Increase DMA burst size - rockchip: runtime_pm improvements - vc4: Fix for a regression preventing the use of 4k @ 60Hz, and further HDMI rate constraints check. - vmwgfx: Cursor improvements Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221103083437.ksrh3hcdvxaof62l@houat commit a28ace782e687424d7aa2c29a4516f54d5561a14 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 4 00:39:54 2022 +0530 bpf: Drop reg_type_may_be_refcounted_or_null It is not scalable to maintain a list of types that can have non-zero ref_obj_id. It is never set for scalars anyway, so just remove the conditional on register types and print it whenever it is non-zero. Acked-by: Dave Marchevsky Signed-off-by: Kumar Kartikeya Dwivedi Acked-by: David Vernet Link: https://lore.kernel.org/r/20221103191013.1236066-6-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit f5e477a861e4a20d8a1c5f7a245f3a3c3c376b03 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 4 00:39:53 2022 +0530 bpf: Fix slot type check in check_stack_write_var_off For the case where allow_ptr_leaks is false, code is checking whether slot type is STACK_INVALID and STACK_SPILL and rejecting other cases. This is a consequence of incorrectly checking for register type instead of the slot type (NOT_INIT and SCALAR_VALUE respectively). Fix the check. Fixes: 01f810ace9ed ("bpf: Allow variable-offset stack access") Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221103191013.1236066-5-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 261f4664caffdeb9dff4e83ee3c0334b1c3a552f Author: Kumar Kartikeya Dwivedi Date: Fri Nov 4 00:39:52 2022 +0530 bpf: Clobber stack slot when writing over spilled PTR_TO_BTF_ID When support was added for spilled PTR_TO_BTF_ID to be accessed by helper memory access, the stack slot was not overwritten to STACK_MISC (and that too is only safe when env->allow_ptr_leaks is true). This means that helpers who take ARG_PTR_TO_MEM and write to it may essentially overwrite the value while the verifier continues to track the slot for spilled register. This can cause issues when PTR_TO_BTF_ID is spilled to stack, and then overwritten by helper write access, which can then be passed to BPF helpers or kfuncs. Handle this by falling back to the case introduced in a later commit, which will also handle PTR_TO_BTF_ID along with other pointer types, i.e. cd17d38f8b28 ("bpf: Permits pointers on stack for helper calls"). Finally, include a comment on why REG_LIVE_WRITTEN is not being set when clobber is set to true. In short, the reason is that while when clobber is unset, we know that we won't be writing, when it is true, we *may* write to any of the stack slots in that range. It may be a partial or complete write, to just one or many stack slots. We cannot be sure, hence to be conservative, we leave things as is and never set REG_LIVE_WRITTEN for any stack slot. However, clobber still needs to reset them to STACK_MISC assuming writes happened. However read marks still need to be propagated upwards from liveness point of view, as parent stack slot's contents may still continue to matter to child states. Cc: Yonghong Song Fixes: 1d68f22b3d53 ("bpf: Handle spilled PTR_TO_BTF_ID properly when checking stack_boundary") Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20221103191013.1236066-4-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 23da464dd6b8935b66f4ee306ad8947fd32ccd75 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 4 00:39:51 2022 +0530 bpf: Allow specifying volatile type modifier for kptrs This is useful in particular to mark the pointer as volatile, so that compiler treats each load and store to the field as a volatile access. The alternative is having to define and use READ_ONCE and WRITE_ONCE in the BPF program. Signed-off-by: Kumar Kartikeya Dwivedi Acked-by: David Vernet Link: https://lore.kernel.org/r/20221103191013.1236066-3-memxor@gmail.com Signed-off-by: Alexei Starovoitov include/linux/btf.h | 5 +++++ kernel/bpf/btf.c | 3 +++ 2 files changed, 8 insertions(+) commit 9805af8d8a5b17f9ea0a16f636f3440b970049f3 Author: Kumar Kartikeya Dwivedi Date: Fri Nov 4 00:39:50 2022 +0530 bpf: Document UAPI details for special BPF types The kernel recognizes some special BPF types in map values or local kptrs. Document that only bpf_spin_lock and bpf_timer will preserve backwards compatibility, and kptr will preserve backwards compatibility for the operations on the pointer, not the types supported for such kptrs. For local kptrs, document that there are no stability guarantees at all. Finally, document that 'bpf_' namespace is reserved for adding future special fields, hence BPF programs must not declare types with such names in their programs and still expect backwards compatibility. Signed-off-by: Kumar Kartikeya Dwivedi Acked-by: David Vernet Link: https://lore.kernel.org/r/20221103191013.1236066-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov Documentation/bpf/bpf_design_QA.rst | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 39721d62bbc16ebc9bb2bdc2c163658f33da3b0b Author: Corey Minyard Date: Thu Nov 3 15:03:11 2022 -0500 ipmi:ssif: Increase the message retry time The spec states that the minimum message retry time is 60ms, but it was set to 20ms. Correct it. Reported by: Tony Camuso Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_ssif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07ec7b502800ba9f7b8b15cb01dd6556bb41aaca Author: Stanislav Fomichev Date: Thu Oct 27 15:55:37 2022 -0700 bpf: make sure skb->len != 0 when redirecting to a tunneling device syzkaller managed to trigger another case where skb->len == 0 when we enter __dev_queue_xmit: WARNING: CPU: 0 PID: 2470 at include/linux/skbuff.h:2576 skb_assert_len include/linux/skbuff.h:2576 [inline] WARNING: CPU: 0 PID: 2470 at include/linux/skbuff.h:2576 __dev_queue_xmit+0x2069/0x35e0 net/core/dev.c:4295 Call Trace: dev_queue_xmit+0x17/0x20 net/core/dev.c:4406 __bpf_tx_skb net/core/filter.c:2115 [inline] __bpf_redirect_no_mac net/core/filter.c:2140 [inline] __bpf_redirect+0x5fb/0xda0 net/core/filter.c:2163 ____bpf_clone_redirect net/core/filter.c:2447 [inline] bpf_clone_redirect+0x247/0x390 net/core/filter.c:2419 bpf_prog_48159a89cb4a9a16+0x59/0x5e bpf_dispatcher_nop_func include/linux/bpf.h:897 [inline] __bpf_prog_run include/linux/filter.h:596 [inline] bpf_prog_run include/linux/filter.h:603 [inline] bpf_test_run+0x46c/0x890 net/bpf/test_run.c:402 bpf_prog_test_run_skb+0xbdc/0x14c0 net/bpf/test_run.c:1170 bpf_prog_test_run+0x345/0x3c0 kernel/bpf/syscall.c:3648 __sys_bpf+0x43a/0x6c0 kernel/bpf/syscall.c:5005 __do_sys_bpf kernel/bpf/syscall.c:5091 [inline] __se_sys_bpf kernel/bpf/syscall.c:5089 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5089 do_syscall_64+0x54/0x70 arch/x86/entry/common.c:48 entry_SYSCALL_64_after_hwframe+0x61/0xc6 The reproducer doesn't really reproduce outside of syzkaller environment, so I'm taking a guess here. It looks like we do generate correct ETH_HLEN-sized packet, but we redirect the packet to the tunneling device. Before we do so, we __skb_pull l2 header and arrive again at skb->len == 0. Doesn't seem like we can do anything better than having an explicit check after __skb_pull? Cc: Eric Dumazet Reported-by: syzbot+f635e86ec3fa0a37e019@syzkaller.appspotmail.com Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20221027225537.353077-1-sdf@google.com Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov net/core/filter.c | 4 ++++ 1 file changed, 4 insertions(+) commit 153a197077d33861744be5a2d4bd17cec2c2dca3 Author: Andre Przywara Date: Tue Nov 1 14:16:57 2022 +0000 dt-bindings: input: sun4i-lradc-keys: Add F1C100s compatible The Allwinner F1C100s series of SoCs contain a LRADC (aka. KEYADC) compatible to the version in other SoCs. The manual doesn't mention the ratio of the input voltage that is used, but comparing actual measurements with the values in the register suggests that it is 3/4 of Vref. Add an F1C100s compatible string to the list, and pair it with the A83T fallback. Since the A64 is the same, combined both using an enum. Signed-off-by: Andre Przywara Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221101141658.3631342-9-andre.przywara@arm.com Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 01c84b03d80aab9f04c4e3e1f9085f4202ff7c29 Author: Siarhei Volkau Date: Thu Nov 3 13:40:02 2022 -0700 Input: matrix_keypad - force switch rows to input mode Some Pin/GPIO controllers can't get current GPIO status when interrupt mode is set. Specifically Ingenic's JZ4755 always returns status at the moment of interrupt. The patch tries to fix that by forcibly setting pin mode to GPIO input prior to reading actual row status. enable_row_irqs seems to set interrupt mode back as it should be. Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221102165747.1528988-1-lis8215@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/matrix_keypad.c | 3 +++ 1 file changed, 3 insertions(+) commit fbeb229a6622523c092a13c02bd0e15f69240dde Merge: d9095f92950b 9521c9d6a53d Author: Jakub Kicinski Date: Thu Nov 3 11:38:42 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit d82316d3cf1fcecd461b80ddb97d9ea6d7cba60d Author: Jonathan Neuschäfer Date: Thu Nov 3 20:00:52 2022 +0100 spi: hisi-sfc-v3xx: Fix a typo ("duall") Simple typo, simple fix. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221103190052.915755-1-j.neuschaefer@gmx.net Signed-off-by: Mark Brown drivers/spi/spi-hisi-sfc-v3xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9256dac0c67ac2a47221f9409f2016ff5d1ddd78 Author: Giulio Benetti Date: Tue Oct 18 23:57:53 2022 +0200 ACPI: scan: substitute empty_zero_page with helper ZERO_PAGE(0) Not all zero page implementations use empty_zero_page global pointer so let's substitute empty_zero_page occurence with helper ZERO_PAGE(0). Signed-off-by: Giulio Benetti Signed-off-by: Rafael J. Wysocki drivers/acpi/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4612c7f1387df2f9f20a28b2a271e6cb154eb2b9 Author: Christophe JAILLET Date: Tue Nov 1 22:13:57 2022 +0100 ACPI: sysfs: 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: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b423f240a66ad928c4cb5ec6055dfc90ce8d894e Author: Mia Kanashi Date: Sun Oct 30 01:20:08 2022 +0300 ACPI: EC: Add quirk for the HP Pavilion Gaming 15-cx0041ur Added GPE quirk entry for the HP Pavilion Gaming 15-cx0041ur. There is a quirk entry for the 15-cx0xxx laptops, but this one has different DMI_PRODUCT_NAME. Notably backlight keys and other ACPI events now function correctly. Signed-off-by: Mia Kanashi Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ebb486bed2c36c3c4053ee9d55ef66d11030694a Author: Shawn Guo Date: Wed Nov 2 22:21:04 2022 +0800 PM: domains: Power off[on] domain in hibernate .freeze[thaw]_noirq hook On platforms which use SHUTDOWN as hibernation mode, the genpd noirq hooks will be called like below. genpd_freeze_noirq() genpd_restore_noirq() ↓ ↑ Create snapshot image Restore target kernel ↓ ↑ genpd_thaw_noirq() genpd_freeze_noirq() ↓ ↑ Write snapshot image Read snapshot image ↓ ↑ power_down() Kernel boot As of today suspend hooks genpd_suspend[resume]_noirq() manages domain on/off state, but hibernate hooks genpd_freeze[thaw]_noirq() doesn't. This results in a different behavior of domain power state between suspend and hibernate freeze, i.e. domain is powered off for the former while on for the later. It causes a problem on platforms like i.MX where the domain needs to be powered on/off by calling clock and regulator interface. When the platform restores from hibernation, the domain is off in hardware and genpd_restore_noirq() tries to power it on, but will never succeed because software state of domain (clock and regulator) is left on from the last hibernate freeze, so kernel thinks that clock and regulator are enabled while they are actually not turned on in hardware. The consequence would be that devices in the power domain will access registers without clock or power, and cause hardware lockup. Power off[on] domain in hibernate .freeze[thaw]_noirq hook for reasons: - Align the behavior between suspend and hibernate freeze. - Have power state of domains stay in sync between hardware and software for hibernate freeze, and thus fix the lockup issue seen on i.MX platform. Signed-off-by: Shawn Guo Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) commit d9cc34fe0aae7e9df236be046a853fc63e889026 Author: Shawn Guo Date: Wed Nov 2 22:21:03 2022 +0800 PM: domains: Consolidate genpd_restore_noirq() and genpd_resume_noirq() Most of the logic between genpd_restore_noirq() and genpd_resume_noirq() are identical. The suspended_count decrement for restore should be the right thing to do anyway, considering there is an increment in genpd_finish_suspend() for hibernation. So consolidate these two functions into genpd_finish_resume(). Signed-off-by: Shawn Guo Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) commit 615db6d96c725406ae39e2822e1fbde81ecf1efd Author: Shawn Guo Date: Wed Nov 2 22:21:02 2022 +0800 PM: domains: Pass generic PM noirq hooks to genpd_finish_suspend() While argument `poweroff` works fine for genpd_finish_suspend() to handle distinction between suspend and poweroff, it won't scale if we want to use it for freeze as well. Pass generic PM noirq hooks as arguments instead, so that the function can possibly cover freeze case too. Signed-off-by: Shawn Guo Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 5616ce7b780af6103d7724f119514a6eb7b05f66 Author: Shawn Guo Date: Wed Nov 2 22:21:01 2022 +0800 PM: domains: Drop genpd status manipulation for hibernate restore The genpd status manipulation for hibernate restore has really never worked as intended. For example, if the genpd->status was GENPD_STATE_ON, the parent domain's `sd_count` must have been increased, so it needs to be adjusted too. So drop this status manipulation. Suggested-by: Ulf Hansson Signed-off-by: Shawn Guo Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 13 ------------- 1 file changed, 13 deletions(-) commit 7ac70300f386a5f7d00f66ccc46ed30576b68ef4 Author: Christophe JAILLET Date: Tue Nov 1 22:14:02 2022 +0100 powercap: 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 Signed-off-by: Rafael J. Wysocki drivers/powercap/powercap_sys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4125d10d5f7c157f587b041128066b105f4881a5 Author: Huacai Chen Date: Wed Nov 2 14:48:38 2022 +0800 ACPI: tables: Print CORE_PIC information when MADT is parsed When MADT is parsed, print CORE_PIC information as below: ACPI: CORE PIC (processor_id[0x00] core_id[0x00] enabled) ACPI: CORE PIC (processor_id[0x01] core_id[0x01] enabled) ... ACPI: CORE PIC (processor_id[0xff] core_id[0xff] enabled) This debug information will be very helpful to bring up early systems to see if processor_id and core_id are matched or not as spec defined. Signed-off-by: Huacai Chen Signed-off-by: Rafael J. Wysocki drivers/acpi/tables.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7420ae3bb977b46eab082f4964641f3ddc98ebaf Author: Srinivas Pandruvada Date: Thu Oct 27 15:00:56 2022 -0700 x86/intel_epb: Set Alder Lake N and Raptor Lake P normal EPB Intel processors support additional software hint called EPB ("Energy Performance Bias") to guide the hardware heuristic of power management features to favor increasing dynamic performance or conserve energy consumption. Since this EPB hint is processor specific, the same value of hint can result in different behavior across generations of processors. commit 4ecc933b7d1f ("x86: intel_epb: Allow model specific normal EPB value")' introduced capability to update the default power up EPB based on the CPU model and updated the default EPB to 7 for Alder Lake mobile CPUs. The same change is required for other Alder Lake-N and Raptor Lake-P mobile CPUs as the current default of 6 results in higher uncore power consumption. This increase in power is related to memory clock frequency setting based on the EPB value. Depending on the EPB the minimum memory frequency is set by the firmware. At EPB = 7, the minimum memory frequency is 1/4th compared to EPB = 6. This results in significant power saving for idle and semi-idle workload on a Chrome platform. For example Change in power and performance from EPB change from 6 to 7 on Alder Lake-N: Workload Performance diff (%) power diff ---------------------------------------------------- VP9 FHD30 0 (FPS) -218 mw Google meet 0 (FPS) -385 mw This 200+ mw power saving is very significant for mobile platform for battery life and thermal reasons. But as the workload demands more memory bandwidth, the memory frequency will be increased very fast. There is no power savings for such busy workloads. For example: Workload Performance diff (%) from EPB 6 to 7 ------------------------------------------------------- Speedometer 2.0 -0.8 WebGL Aquarium 10K Fish -0.5 Unity 3D 2018 0.2 WebXPRT3 -0.5 There are run to run variations for performance scores for such busy workloads. So the difference is not significant. Add a new define ENERGY_PERF_BIAS_NORMAL_POWERSAVE for EPB 7 and use it for Alder Lake-N and Raptor Lake-P mobile CPUs. This modification is done originally by Jeremy Compostella . Signed-off-by: Srinivas Pandruvada Signed-off-by: Dave Hansen Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/all/20221027220056.1534264-1-srinivas.pandruvada%40linux.intel.com arch/x86/include/asm/msr-index.h | 1 + arch/x86/kernel/cpu/intel_epb.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit f6fc0bf2be79f7a6a63c2ecf3d509d17d0d25291 Author: Huacai Chen Date: Wed Nov 2 14:47:50 2022 +0800 Revert "LoongArch: Provisionally add ACPICA data structures" This reverts commit af6a1cfa6859dab4a843 ("LoongArch: Provisionally add ACPICA data structures") to fix build error for linux-next on LoongArch, since acpica is merged to linux-pm.git now. Signed-off-by: Huacai Chen Signed-off-by: Rafael J. Wysocki arch/loongarch/include/asm/acpi.h | 142 -------------------------------------- 1 file changed, 142 deletions(-) commit 21cdb6c18f85fe538ca8740bc79f11fbe08d0197 Author: Srinivas Pandruvada Date: Thu Oct 27 10:19:47 2022 -0700 cpufreq: intel_pstate: Allow EPP 0x80 setting by the firmware With the "commit 3d13058ed2a6 ("cpufreq: intel_pstate: Use firmware default EPP")" the firmware can set an EPP, which driver will not overwrite. But the driver has a valid range check for: 0x40 > firmware epp < 0x80. Hence firmware can't specify EPP of 0x80. If the firmware didn't specify in the valid range, the driver has a hard coded EPP of 102. But some Chrome hardware vendors don't want this overwrite and wants to boot with chipset default EPP of 0x80 as this improves battery life. In this case they want to have capability to specify EPP of 0x80 via the firmware. This require the valid range to include 0x80 also. But here the valid range can't be simply extended to include 0x80 as this is the chipset default EPP. Even without any firmware specifying EPP, the chipset will always boot with EPP of 0x80. To make sure that firmware specified EPP of 0x80 and not by the chipset default, it will require additional check to make sure HWP was enabled by the firmware before boot. Only way the firmware can update EPP, is to enable HWP and update EPP via MSR_HWP_REQUEST. This driver already checks, if the HWP is enabled by the firmware. Use the same flag and extend valid range to include 0x80. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 13fdbc8b8da6a2325cad3359c9a70504b0ff2f93 Author: Stuart Hayes Date: Wed Nov 2 14:59:57 2022 -0500 cpufreq: ACPI: Defer setting boost MSRs When acpi-cpufreq is loaded, boost is enabled on every CPU (by setting an MSR) before the driver is registered with cpufreq. This can be very time consuming, because it is done with a CPU hotplug startup callback, and cpuhp_setup_state() schedules the callback (cpufreq_boost_online()) to run on each CPU one at a time, waiting for each to run before calling the next. If cpufreq_register_driver() fails--if, for example, there are no ACPI P-states present--this is wasted time. Since cpufreq already sets up a CPU hotplug startup callback if and when acpi-cpufreq is registered, set the boost MSRs in acpi_cpufreq_cpu_init(), which is called by the cpufreq cpuhp callback. This allows acpi-cpufreq to exit quickly if it is loaded but not needed. On one system with 192 CPUs, this patch speeds up boot by about 30 seconds. Signed-off-by: Stuart Hayes Signed-off-by: Rafael J. Wysocki drivers/cpufreq/acpi-cpufreq.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) commit 2842e06f19b94145238c76f0beb7b3b93943467c Author: Colin Ian King Date: Thu Nov 3 14:36:54 2022 +0000 cpufreq: SPEAr: Make read-only array sys_clk_src static Don't populate the read-only array sys_clk_src on the stack but instead make it static and add in a missing const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/cpufreq/spear-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59fdc42793252852e1ca95d1355e9ed0fc2a0612 Author: Colin Ian King Date: Thu Nov 3 15:04:31 2022 +0000 cpufreq: longhaul: Make array speeds static const Don't populate the read-only array speeds on the stack but instead make it static. Also makes the object code a little smaller. Replace hard-coded loop array bounds with ARRAY_SIZE. Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/cpufreq/longhaul.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit abdea5fca78101ffe8dc01958013b6e2719b7cb5 Author: Andy Shevchenko Date: Sat Oct 8 22:52:44 2022 +0300 cpufreq: ACPI: Use str_enabled_disabled() helper Use str_enabled_disabled() helper instead of open coding the same. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/cpufreq/acpi-cpufreq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6e5d7300cbe7c3541bc31f16db3e9266e6027b4b Author: xiongxin Date: Tue Nov 1 10:28:39 2022 +0800 PM: hibernate: Fix mistake in kerneldoc comment The actual maximum image size formula in hibernate_preallocate_memory() is as follows: max_size = (count - (size + PAGES_FOR_IO)) / 2 - 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE); but the one in the kerneldoc comment of the function is different and incorrect. Fixes: ddeb64870810 ("PM / Hibernate: Add sysfs knob to control size of memory for drivers") Signed-off-by: xiongxin [ rjw: Subject and changelog rewrite ] Signed-off-by: Rafael J. Wysocki kernel/power/snapshot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 882ecff709b50b36128e07a6b0035f476c769f50 Author: Ville Syrjälä Date: Mon Oct 31 23:40:36 2022 +0200 drm/i915: Use intel_crtc_needs_modeset() more Prefer our own intel_crtc_needs_modeset() wrapper to drm_atomic_crtc_needs_modeset() whenever we are dealing with the intel_ types instead of drm_ types. Makes things a bit neater in general. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221031214037.1636-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_cdclk.c | 2 +- drivers/gpu/drm/i915/display/intel_color.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_fbc.c | 2 +- drivers/gpu/drm/i915/display/skl_watermark.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 11 +++++------ 6 files changed, 10 insertions(+), 11 deletions(-) commit a0e7636bf3746b645aadd94998f01063406d7688 Merge: b43d0c0a42b2 e14657c0f002 Author: Mark Brown Date: Thu Nov 3 16:23:39 2022 +0000 Modify documentation and machine driver for mt8186_rt1019_rt5682s sound card Merge series from Ajye Huang : Support selecting between front and rear microphones on some of the MediaTek platforms. commit 9034f9c4e284138d5e5646b89285d7a89b840f5e Author: Ville Syrjälä Date: Wed Oct 26 14:39:05 2022 +0300 drm/i915: Share {csc,gamma}_enable calculation for ilk/snb vs. ivb+ ilk/snb vs. ivb+ hardware is mostly identical except for the addition of the split gamma mode on ivb. Thus we can share the csc_enable and gamma_enable calculation for both variants. Pull that stuff into a few helpers. Note that this also fills in the missing ctm/degamma stuff into ilk_color_check() pretty much, so for good measure let's also add a few extra checks relating to that, although we still don't expose ctm/degamma to userspace. But now it'll be trivial to do so if we wish. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-11-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal drivers/gpu/drm/i915/display/intel_color.c | 49 +++++++++++++++++++----------- 1 file changed, 32 insertions(+), 17 deletions(-) commit 4c0119dd0a7728456a2394c1bc0aa612e1f2c3cb Author: Ville Syrjälä Date: Wed Oct 26 14:39:04 2022 +0300 drm/i915: Reject YCbCr output with degamma+gamma on pre-icl Since the pipe CSC sits between the degamma and gamma LUTs there is no way to make us it for RGB->YCbCr conversion when both LUTs are also active. Simply reject such combos. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-10-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal drivers/gpu/drm/i915/display/intel_color.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 6d5e733f3ac1ad68a6230f44069b14bea2a9bdb3 Author: Ville Syrjälä Date: Wed Oct 26 14:39:03 2022 +0300 drm/i915: Reuse ilk_gamma_mode() on ivb+ Apart from the split gamma mode ivb+ LUTs work just like ilk+ LUTs. So let's handle the special case, and then just fall back to ilk_gamma_mode() to avoid having to duplicate the same logic. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-9-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal drivers/gpu/drm/i915/display/intel_color.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit ad105b715e0092b0c4c8534d07d70692adca8516 Author: Ville Syrjälä Date: Wed Oct 26 14:39:02 2022 +0300 drm/i915: Pass limited_range explicitly to ilk_csc_convert_ctm() Since pre-icl vs. icl+ handle the limited range output stuff a bit differently it's probably less confusing if we just pass that information explicitly into ilk_csc_convert_ctm(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-8-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal drivers/gpu/drm/i915/display/intel_color.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 28c9fa7770ea9c818b5a9fdf64e242fd9e4fdc2e Author: Ville Syrjälä Date: Wed Oct 26 14:39:01 2022 +0300 drm/i915: Deconfuse the ilk+ 12.4 LUT entry functions s/icl_lut_multi_seg_pack/ilk_lut_12p4_pack/ since that's what it is and group the corresponding "unpack" functions next to it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-7-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal drivers/gpu/drm/i915/display/intel_color.c | 38 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 8f079f08833d36d8b756a08f613bccba10e23784 Author: Ville Syrjälä Date: Wed Oct 26 14:39:00 2022 +0300 drm/i915: Split ivb_load_lut_ext_max() into two parts Split the EXT2_MAX register programming into its own function. More in line with the whole "cobble together stuff from small pieces" approach used in this code. The EXT(2)_MAX registers are also not really part of the multi-segment section of the LUT, so hoist the calls to a higher level, just like we do in other gamma modes as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-6-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal drivers/gpu/drm/i915/display/intel_color.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 3078d0c3eb4d7f860fea9cca93b0ae77bda97122 Merge: be847537e3cd 5c51d4afcf3f Author: Mark Brown Date: Thu Nov 3 16:11:17 2022 +0000 regulator: Add DT support for regulator-output connectors Merge series from Zev Weiss : This series adds support for userspace-controlled regulator-supplied power outputs [2]. This is an important feature for some kinds of BMC (baseboard management controller) systems where the BMC provides an operator with manual control of a set of DC power outputs. As in a broadly similar patchset that was recently almost merged [0], this takes the approach of providing support by extending the existing userspace-consumer regulator driver. A couple questions about the userspace-consumer driver came up along the way, however. First, how (if at all) is it currently being used? It appears the last in-tree use of it was removed a bit over two years ago in commit 9d3239147d6d ("ARM: pxa: remove Compulab pxa2xx boards"). Aside from just adding DT support I've made a couple small tweaks to the driver in patch 3 that I hope are compatible with any current usage, but without any extant examples to look at it's kind of hard to say. Second, how critical is its support for controlling multiple regulators? (i.e. its use of regulator_bulk_data and friends instead of a single struct regulator.) As far as I can see every in-tree use of it that's ever existed has used num_supplies = 1. If it's not important to retain, patch 1 of this series could be supplanted by one that instead simplifies the driver slightly by removing that functionality. The DT binding added in patch 2 is essentially identical to one I posted in a previous patchset that had an R-B from Rob [1], but has had some minor rewording and been moved from the extcon subsystem to the regulator subsystem. commit fdaa243adf43d1d305d58f70cbc19e54c966c8e8 Author: Ville Syrjälä Date: Wed Oct 26 14:38:59 2022 +0300 drm/i915: s/icl_load_gcmax/ivb_load_lut_max/ Unify icl_load_gcmax() with the rest of the function naming scheme by calling it ivb_load_lut_max() instead. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-5-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal drivers/gpu/drm/i915/display/intel_color.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c9d4911cab39a7d91c5115c1f8c0414a69d27974 Author: Ville Syrjälä Date: Wed Oct 26 14:38:58 2022 +0300 drm/i915: s/dev_priv/i915/ in intel_color.c Switch intel_color.c over to the modern 'i915' variable naming scehme. The only exceptions are the i9xx LUT access functions which still need the magic 'dev_priv' for the register macros. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-4-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal drivers/gpu/drm/i915/display/intel_color.c | 278 ++++++++++++++--------------- 1 file changed, 139 insertions(+), 139 deletions(-) commit 05ca98523481aa687c5a8dce8939fec539632153 Author: Ville Syrjälä Date: Wed Oct 26 14:38:57 2022 +0300 drm/i915: Use _MMIO_PIPE() for SKL_BOTTOM_COLOR No need to use _MMIO_PIPE2() for SKL_BOTTOM_COLOR since all pipe registers are evenly spread on skl+. Switch to _MMIO_PIPE() and thus avoid the hidden dev_priv. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-3-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal drivers/gpu/drm/i915/i915_reg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a4df7ac78513131abcaeafd9dc12467e2463f573 Author: Ville Syrjälä Date: Wed Oct 26 14:38:56 2022 +0300 drm/i915: Use sizeof(variable) instead sizeof(type) Use sizeof(variable) instead of sizeof(type) in the hopes of less chance of screwing things up. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-2-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal drivers/gpu/drm/i915/display/intel_color.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7eb99841f340b80be0d0973b0deb592d75fb8928 Author: Michael Riesch Date: Wed Nov 2 07:35:53 2022 +0100 iommu/rockchip: fix permission bits in page table entries v2 As pointed out in the corresponding downstream fix [0], the permission bits of the page table entries are compatible between v1 and v2 of the IOMMU. This is in contrast to the current mainline code that incorrectly assumes that the read and write permission bits are switched. Fix the permission bits by reusing the v1 bit defines. [0] https://github.com/rockchip-linux/kernel/commit/e3bc123a2260145e34b57454da3db0edd117eb8e Fixes: c55356c534aa ("iommu: rockchip: Add support for iommu v2") Signed-off-by: Michael Riesch Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221102063553.2464161-1-michael.riesch@wolfvision.net Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 69e61edebea030f177de7a23b8d5d9b8c4a90bda Merge: 757636ed2607 04cee82e04d2 Author: Joerg Roedel Date: Thu Nov 3 15:51:48 2022 +0100 Merge tag 'for-joerg' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd into core iommu: Define EINVAL as device/domain incompatibility This series is to replace the previous EMEDIUMTYPE patch in a VFIO series: https://lore.kernel.org/kvm/Yxnt9uQTmbqul5lf@8bytes.org/ The purpose is to regulate all existing ->attach_dev callback functions to use EINVAL exclusively for an incompatibility error between a device and a domain. This allows VFIO and IOMMUFD to detect such a soft error, and then try a different domain with the same device. Among all the patches, the first two are preparatory changes. And then one patch to update kdocs and another three patches for the enforcement effort. Link: https://lore.kernel.org/r/cover.1666042872.git.nicolinc@nvidia.com commit 757636ed2607a3269cd2764e3e4a0480384c6c26 Author: Lu Baolu Date: Mon Oct 31 08:59:17 2022 +0800 iommu: Rename iommu-sva-lib.{c,h} Rename iommu-sva-lib.c[h] to iommu-sva.c[h] as it contains all code for SVA implementation in iommu core. Signed-off-by: Lu Baolu Reviewed-by: Jean-Philippe Brucker Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Zhangfei Gao Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-14-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/Makefile | 2 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 2 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- drivers/iommu/intel/iommu.c | 2 +- drivers/iommu/intel/svm.c | 2 +- drivers/iommu/io-pgfault.c | 2 +- drivers/iommu/{iommu-sva-lib.c => iommu-sva.c} | 2 +- drivers/iommu/{iommu-sva-lib.h => iommu-sva.h} | 6 +++--- drivers/iommu/iommu.c | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) commit 4bb4211e48fbfb392bb07168b75b1a92832b62f5 Author: Lu Baolu Date: Mon Oct 31 08:59:16 2022 +0800 iommu: Per-domain I/O page fault handling Tweak the I/O page fault handling framework to route the page faults to the domain and call the page fault handler retrieved from the domain. This makes the I/O page fault handling framework possible to serve more usage scenarios as long as they have an IOMMU domain and install a page fault handler in it. Some unused functions are also removed to avoid dead code. The iommu_get_domain_for_dev_pasid() which retrieves attached domain for a {device, PASID} pair is used. It will be used by the page fault handling framework which knows {device, PASID} reported from the iommu driver. We have a guarantee that the SVA domain doesn't go away during IOPF handling, because unbind() won't free the domain until all the pending page requests have been flushed from the pipeline. The drivers either call iopf_queue_flush_dev() explicitly, or in stall case, the device driver is required to flush all DMAs including stalled transactions before calling unbind(). This also renames iopf_handle_group() to iopf_handler() to avoid confusing. Signed-off-by: Lu Baolu Reviewed-by: Jean-Philippe Brucker Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Zhangfei Gao Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-13-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/io-pgfault.c | 68 ++++++---------------------------------------- 1 file changed, 9 insertions(+), 59 deletions(-) commit 8cc93159f91960b4812ea48887e9e7501babc95a Author: Lu Baolu Date: Mon Oct 31 08:59:15 2022 +0800 iommu: Prepare IOMMU domain for IOPF This adds some mechanisms around the iommu_domain so that the I/O page fault handling framework could route a page fault to the domain and call the fault handler from it. Add pointers to the page fault handler and its private data in struct iommu_domain. The fault handler will be called with the private data as a parameter once a page fault is routed to the domain. Any kernel component which owns an iommu domain could install handler and its private parameter so that the page fault could be further routed and handled. This also prepares the SVA implementation to be the first consumer of the per-domain page fault handling model. The I/O page fault handler for SVA is copied to the SVA file with mmget_not_zero() added before mmap_read_lock(). Suggested-by: Jean-Philippe Brucker Signed-off-by: Lu Baolu Reviewed-by: Jean-Philippe Brucker Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Zhangfei Gao Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-12-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/io-pgfault.c | 7 ++++++ drivers/iommu/iommu-sva-lib.c | 58 +++++++++++++++++++++++++++++++++++++++++++ drivers/iommu/iommu-sva-lib.h | 8 ++++++ drivers/iommu/iommu.c | 4 +++ include/linux/iommu.h | 3 +++ 5 files changed, 80 insertions(+) commit 1c263576f4735e063e234fa5f43fd3046d36b5b3 Author: Lu Baolu Date: Mon Oct 31 08:59:14 2022 +0800 iommu: Remove SVA related callbacks from iommu ops These ops'es have been deprecated. There's no need for them anymore. Remove them to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Jean-Philippe Brucker Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Yi Liu Tested-by: Zhangfei Gao Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-11-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 40 -------------------- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 3 -- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 16 -------- drivers/iommu/intel/iommu.c | 3 -- drivers/iommu/intel/iommu.h | 3 -- drivers/iommu/intel/svm.c | 49 ------------------------- include/linux/iommu.h | 7 ---- 7 files changed, 121 deletions(-) commit be51b1d6bbff48c7d1943a8ff1e5a55777807f6e Author: Lu Baolu Date: Mon Oct 31 08:59:13 2022 +0800 iommu/sva: Refactoring iommu_sva_bind/unbind_device() The existing iommu SVA interfaces are implemented by calling the SVA specific iommu ops provided by the IOMMU drivers. There's no need for any SVA specific ops in iommu_ops vector anymore as we can achieve this through the generic attach/detach_dev_pasid domain ops. This refactors the IOMMU SVA interfaces implementation by using the iommu_attach/detach_device_pasid interfaces and align them with the concept of the SVA iommu domain. Put the new SVA code in the SVA related file in order to make it self-contained. Signed-off-by: Lu Baolu Reviewed-by: Jean-Philippe Brucker Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Zhangfei Gao Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-10-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/iommu-sva-lib.c | 111 ++++++++++++++++++++++++++++++++++++++++++ drivers/iommu/iommu.c | 91 ---------------------------------- include/linux/iommu.h | 43 ++++++++-------- 3 files changed, 134 insertions(+), 111 deletions(-) commit 386fa64fd52baadb849ed60c78b024fd1618278e Author: Lu Baolu Date: Mon Oct 31 08:59:12 2022 +0800 arm-smmu-v3/sva: Add SVA domain support Add support for SVA domain allocation and provide an SVA-specific iommu_domain_ops. This implementation is based on the existing SVA code. Possible cleanup and refactoring are left for incremental changes later. Signed-off-by: Lu Baolu Reviewed-by: Jean-Philippe Brucker Reviewed-by: Jason Gunthorpe Tested-by: Zhangfei Gao Link: https://lore.kernel.org/r/20221031005917.45690-9-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 61 +++++++++++++++++++++++++ drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 15 ++++++ drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 14 ++++++ 3 files changed, 90 insertions(+) commit eaca8889a1ef50783bcaad143668b735d136fe46 Author: Lu Baolu Date: Mon Oct 31 08:59:11 2022 +0800 iommu/vt-d: Add SVA domain support Add support for SVA domain allocation and provide an SVA-specific iommu_domain_ops. This implementation is based on the existing SVA code. Possible cleanup and refactoring are left for incremental changes later. The VT-d driver will also need to support setting a DMA domain to a PASID of device. Current SVA implementation uses different data structures to track the domain and device PASID relationship. That's the reason why we need to check the domain type in remove_dev_pasid callback. Eventually we'll consolidate the data structures and remove the need of domain type check. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Yi Liu Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-8-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 25 ++++++++++++++++++++++++ drivers/iommu/intel/iommu.h | 10 ++++++++++ drivers/iommu/intel/svm.c | 47 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) commit 136467962e49931dbc6240aea8197fab7e407ba4 Author: Lu Baolu Date: Mon Oct 31 08:59:10 2022 +0800 iommu: Add IOMMU SVA domain support The SVA iommu_domain represents a hardware pagetable that the IOMMU hardware could use for SVA translation. This adds some infrastructures to support SVA domain in the iommu core. It includes: - Extend the iommu_domain to support a new IOMMU_DOMAIN_SVA domain type. The IOMMU drivers that support allocation of the SVA domain should provide its own SVA domain specific iommu_domain_ops. - Add a helper to allocate an SVA domain. The iommu_domain_free() is still used to free an SVA domain. The report_iommu_fault() should be replaced by the new iommu_report_device_fault(). Leave the existing fault handler with the existing users and the newly added SVA members excludes it. Suggested-by: Jean-Philippe Brucker Suggested-by: Jason Gunthorpe Signed-off-by: Lu Baolu Reviewed-by: Jean-Philippe Brucker Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Yi Liu Tested-by: Zhangfei Gao Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-7-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 20 ++++++++++++++++++++ include/linux/iommu.h | 25 +++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) commit 16603704559c7a68718059c4f75287886c01b20f Author: Lu Baolu Date: Mon Oct 31 08:59:09 2022 +0800 iommu: Add attach/detach_dev_pasid iommu interfaces Attaching an IOMMU domain to a PASID of a device is a generic operation for modern IOMMU drivers which support PASID-granular DMA address translation. Currently visible usage scenarios include (but not limited): - SVA (Shared Virtual Address) - kernel DMA with PASID - hardware-assist mediated device This adds the set_dev_pasid domain ops for setting the domain onto a PASID of a device and remove_dev_pasid iommu ops for removing any setup on a PASID of device. This also adds interfaces for device drivers to attach/detach/retrieve a domain for a PASID of a device. If multiple devices share a single group, it's fine as long the fabric always routes every TLP marked with a PASID to the host bridge and only the host bridge. For example, ACS achieves this universally and has been checked when pci_enable_pasid() is called. As we can't reliably tell the source apart in a group, all the devices in a group have to be considered as the same source, and mapped to the same PASID table. The DMA ownership is about the whole device (more precisely, iommu group), including the RID and PASIDs. When the ownership is converted, the pasid array must be empty. This also adds necessary checks in the DMA ownership interfaces. Signed-off-by: Lu Baolu Reviewed-by: Jean-Philippe Brucker Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Reviewed-by: Jason Gunthorpe Tested-by: Zhangfei Gao Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 141 ++++++++++++++++++++++++++++++++++++++++++++++++-- include/linux/iommu.h | 32 ++++++++++++ 2 files changed, 169 insertions(+), 4 deletions(-) commit 201007ef707a8bb5592cd07dd46fc9222c48e0b9 Author: Lu Baolu Date: Mon Oct 31 08:59:08 2022 +0800 PCI: Enable PASID only when ACS RR & UF enabled on upstream path The Requester ID/Process Address Space ID (PASID) combination identifies an address space distinct from the PCI bus address space, e.g., an address space defined by an IOMMU. But the PCIe fabric routes Memory Requests based on the TLP address, ignoring any PASID (PCIe r6.0, sec 2.2.10.4), so a TLP with PASID that SHOULD go upstream to the IOMMU may instead be routed as a P2P Request if its address falls in a bridge window. To ensure that all Memory Requests with PASID are routed upstream, only enable PASID if ACS P2P Request Redirect and Upstream Forwarding are enabled for the path leading to the device. Suggested-by: Jason Gunthorpe Suggested-by: Kevin Tian Signed-off-by: Lu Baolu Acked-by: Bjorn Helgaas Reviewed-by: Jason Gunthorpe Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/pci/ats.c | 3 +++ 1 file changed, 3 insertions(+) commit 942fd5435dccb273f90176b046ae6bbba60cfbd8 Author: Lu Baolu Date: Mon Oct 31 08:59:07 2022 +0800 iommu: Remove SVM_FLAG_SUPERVISOR_MODE support The current kernel DMA with PASID support is based on the SVA with a flag SVM_FLAG_SUPERVISOR_MODE. The IOMMU driver binds the kernel memory address space to a PASID of the device. The device driver programs the device with kernel virtual address (KVA) for DMA access. There have been security and functional issues with this approach: - The lack of IOTLB synchronization upon kernel page table updates. (vmalloc, module/BPF loading, CONFIG_DEBUG_PAGEALLOC etc.) - Other than slight more protection, using kernel virtual address (KVA) has little advantage over physical address. There are also no use cases yet where DMA engines need kernel virtual addresses for in-kernel DMA. This removes SVM_FLAG_SUPERVISOR_MODE support from the IOMMU interface. The device drivers are suggested to handle kernel DMA with PASID through the kernel DMA APIs. The drvdata parameter in iommu_sva_bind_device() and all callbacks is not needed anymore. Cleanup them as well. Link: https://lore.kernel.org/linux-iommu/20210511194726.GP1002214@nvidia.com/ Signed-off-by: Jacob Pan Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Jean-Philippe Brucker Reviewed-by: Kevin Tian Reviewed-by: Fenghua Yu Tested-by: Zhangfei Gao Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/dma/idxd/cdev.c | 3 +- drivers/dma/idxd/init.c | 25 +---------- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 3 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 5 +-- drivers/iommu/intel/iommu.h | 3 +- drivers/iommu/intel/svm.c | 55 ++++++------------------- drivers/iommu/iommu.c | 5 +-- drivers/misc/uacce/uacce.c | 2 +- include/linux/intel-svm.h | 13 ------ include/linux/iommu.h | 8 ++-- 10 files changed, 25 insertions(+), 97 deletions(-) commit 22d2c7afb3697a68c7fc05c935ef662dee06dc60 Author: Lu Baolu Date: Mon Oct 31 08:59:06 2022 +0800 iommu: Add max_pasids field in struct dev_iommu Use this field to save the number of PASIDs that a device is able to consume. It is a generic attribute of a device and lifting it into the per-device dev_iommu struct could help to avoid the boilerplate code in various IOMMU drivers. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Yi Liu Tested-by: Zhangfei Gao Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 20 ++++++++++++++++++++ include/linux/iommu.h | 2 ++ 2 files changed, 22 insertions(+) commit 1adf3cc20d693569ebee90fd91fa34b0570fcd6f Author: Lu Baolu Date: Mon Oct 31 08:59:05 2022 +0800 iommu: Add max_pasids field in struct iommu_device Use this field to keep the number of supported PASIDs that an IOMMU hardware is able to support. This is a generic attribute of an IOMMU and lifting it into the per-IOMMU device structure makes it possible to allocate a PASID for device without calls into the IOMMU drivers. Any iommu driver that supports PASID related features should set this field before enabling them on the devices. In the Intel IOMMU driver, intel_iommu_sm is moved to CONFIG_INTEL_IOMMU enclave so that the pasid_supported() helper could be used in dmar.c without compilation errors. Signed-off-by: Lu Baolu Reviewed-by: Jean-Philippe Brucker Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Yi Liu Tested-by: Zhangfei Gao Tested-by: Tony Zhu Link: https://lore.kernel.org/r/20221031005917.45690-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 1 + drivers/iommu/intel/dmar.c | 7 +++++++ drivers/iommu/intel/iommu.h | 4 ++-- include/linux/iommu.h | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) commit a8bc8cc193c69e41df5e757d1a592346526e136d Author: Christophe JAILLET Date: Tue Nov 1 22:13:56 2022 +0100 usb: gadget: 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/09bc980d8432a4b5f7d88388ec0df5b085583139.1667336095.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/configfs.c | 3 ++- drivers/usb/gadget/function/f_mass_storage.c | 3 ++- drivers/usb/gadget/function/storage_common.c | 9 +++++---- drivers/usb/gadget/function/u_serial.c | 3 ++- drivers/usb/gadget/legacy/serial.c | 3 ++- 5 files changed, 13 insertions(+), 8 deletions(-) commit 372488c6936f4e7734e4ff5613c504affb49ff68 Author: Christophe JAILLET Date: Tue Nov 1 22:13:55 2022 +0100 usb: core: 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/f01ef2ddaf12a6412127611617786adc1234e0b4.1667336095.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/usb/core/port.c | 3 ++- drivers/usb/core/sysfs.c | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit 7a09c1269702db8eccb6f718da2b00173e1e0034 Author: Alan Stern Date: Wed Nov 2 14:13:19 2022 -0400 USB: core: Change configuration warnings to notices It has been pointed out that the kernel log messages warning about problems in USB configuration and related descriptors are vexing for users. The warning log level has a fairly high priority, but the user can do nothing to fix the underlying errors in the device's firmware. To reduce the amount of useless information produced by tools that filter high-priority log messages, we can change these warnings to notices, i.e., change dev_warn() to dev_notice(). The same holds for a few messages that currently use dev_err(): Unless they indicate a failure that might make a device unusable (such as inability to transfer a config descriptor), change them to dev_notice() also. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216630 Suggested-by: Artem S. Tashkinov Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/Y2KzPx0h6z1jXCuN@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 82 +++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 41 deletions(-) commit e563cc0c787c85a4d9def0a77078dc5d3f445e3d Author: Jernej Skrabec Date: Tue Oct 25 18:54:15 2022 +0200 iommu/sun50i: Implement .iotlb_sync_map Allocated iova ranges need to be invalidated immediately or otherwise they might or might not work when used by master or CPU. This was discovered when running video decoder conformity test with Cedrus. Some videos were now and then decoded incorrectly and generated page faults. According to vendor driver, it's enough to invalidate just start and end TLB and PTW cache lines. Documentation says that neighbouring lines must be invalidated too. Finally, when page fault occurs, that iova must be invalidated the same way, according to documentation. Fixes: 4100b8c229b3 ("iommu: Add Allwinner H6 IOMMU driver") Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221025165415.307591-6-jernej.skrabec@gmail.com Signed-off-by: Joerg Roedel drivers/iommu/sun50i-iommu.c | 73 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 67a8a67f9eceb72e4c73d1d09ed9ab04f4b8e12d Author: Jernej Skrabec Date: Tue Oct 25 18:54:14 2022 +0200 iommu/sun50i: Fix flush size Function sun50i_table_flush() takes number of entries as an argument, not number of bytes. Fix that mistake in sun50i_dte_get_page_table(). Fixes: 4100b8c229b3 ("iommu: Add Allwinner H6 IOMMU driver") Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221025165415.307591-5-jernej.skrabec@gmail.com Signed-off-by: Joerg Roedel drivers/iommu/sun50i-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eac0104dc69be50bed86926d6f32e82b44f8c921 Author: Jernej Skrabec Date: Tue Oct 25 18:54:13 2022 +0200 iommu/sun50i: Fix R/W permission check Because driver has enum type permissions and iommu subsystem has bitmap type, we have to be careful how check for combined read and write permissions is done. In such case, we have to mask both permissions and check that both are set at the same time. Current code just masks both flags but doesn't check that both are set. In short, it always sets R/W permission, regardles if requested permissions were RO, WO or RW. Fix that. Fixes: 4100b8c229b3 ("iommu: Add Allwinner H6 IOMMU driver") Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221025165415.307591-4-jernej.skrabec@gmail.com Signed-off-by: Joerg Roedel drivers/iommu/sun50i-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cef20703e2b2276aaa402ec5a65ec9a09963b83e Author: Jernej Skrabec Date: Tue Oct 25 18:54:12 2022 +0200 iommu/sun50i: Consider all fault sources for reset We have to reset masters for all faults - permissions, L1 fault or L2 fault. Currently it's done only for permissions. If other type of fault happens, master is in locked up state. Fix that by really considering all fault sources. Fixes: 4100b8c229b3 ("iommu: Add Allwinner H6 IOMMU driver") Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221025165415.307591-3-jernej.skrabec@gmail.com Signed-off-by: Joerg Roedel drivers/iommu/sun50i-iommu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9ad0c1252e84dbc664f0462707182245ed603237 Author: Jernej Skrabec Date: Tue Oct 25 18:54:11 2022 +0200 iommu/sun50i: Fix reset release Reset signal is asserted by writing 0 to the corresponding locations of masters we want to reset. So in order to deassert all reset signals, we should write 1's to all locations. Current code writes 1's to locations of masters which were just reset which is good. However, at the same time it also writes 0's to other locations and thus asserts reset signals of remaining masters. Fix code by writing all 1's when we want to deassert all reset signals. This bug was discovered when working with Cedrus (video decoder). When it faulted, display went blank due to reset signal assertion. Fixes: 4100b8c229b3 ("iommu: Add Allwinner H6 IOMMU driver") Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221025165415.307591-2-jernej.skrabec@gmail.com Signed-off-by: Joerg Roedel drivers/iommu/sun50i-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 92ea0720ba9cf7f09589a711245c2da145125958 Author: Ian Rogers Date: Mon Oct 24 11:19:13 2022 -0700 perf trace: Use sig_atomic_t to avoid undefined behaviour in a signal handler Use sig_atomic_t for variables written/accessed in signal handlers. This is undefined behavior as per: https://wiki.sei.cmu.edu/confluence/display/c/SIG31-C.+Do+not+access+shared+objects+in+signal+handlers Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221024181913.630986-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f3cc4f874efa8d5b10ebd9dc8702cd25b9e536a3 Author: Niklas Schnelle Date: Tue Oct 25 13:56:57 2022 +0200 iommu/s390: Implement map_pages()/unmap_pages() instead of map()/unmap() While s390-iommu currently implements the map_page()/unmap_page() operations which only map/unmap a single page at a time the internal s390_iommu_update_trans() API already supports mapping/unmapping a range of pages at once. Take advantage of this by implementing the map_pages()/unmap_pages() operations instead thus allowing users of the IOMMU drivers to map multiple pages in a single call followed by a single I/O TLB flush if needed. Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/r/20221025115657.1666860-7-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel drivers/iommu/s390-iommu.c | 48 ++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) commit b4d8ae0e907b096583491101ddfc5143b7c08918 Author: Niklas Schnelle Date: Tue Oct 25 13:56:56 2022 +0200 iommu/s390: Fix incorrect pgsize_bitmap The .pgsize_bitmap property of struct iommu_ops is not a page mask but rather has a bit set for each size of pages the IOMMU supports. As the comment correctly pointed out at this moment the code only support 4K pages so simply use SZ_4K here. Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/r/20221025115657.1666860-6-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel drivers/iommu/s390-iommu.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit a4d996c2c4b55a42b21d0f7026b2bd6f7396f666 Author: Niklas Schnelle Date: Tue Oct 25 13:56:55 2022 +0200 iommu/s390: Fix incorrect aperture check The domain->geometry.aperture_end specifies the last valid address treat it as such when checking if a DMA address is valid. Reviewed-by: Pierre Morel Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/r/20221025115657.1666860-5-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel drivers/iommu/s390-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbf7827bc5dcfa4301aaea6f57eba9a94dbee7b1 Author: Niklas Schnelle Date: Tue Oct 25 13:56:54 2022 +0200 iommu/s390: Fix potential s390_domain aperture shrinking The s390 IOMMU driver currently sets the IOMMU domain's aperture to match the device specific DMA address range of the device that is first attached. This is not ideal. For one if the domain has no device attached in the meantime the aperture could be shrunk allowing translations outside the aperture to exist in the translation tables. Also this is a bit of a misuse of the aperture which really should describe what addresses can be translated and not some device specific limitations. Instead of misusing the aperture like this we can instead create reserved ranges for the ranges inaccessible to the attached devices allowing devices with overlapping ranges to still share an IOMMU domain. This also significantly simplifies s390_iommu_attach_device() allowing us to move the aperture check to the beginning of the function and removing the need to hold the device list's lock to check the aperture. As we then use the same aperture for all domains and it only depends on the table properties we can already check zdev->start_dma/end_dma at probe time and turn the check on attach into a WARN_ON(). Suggested-by: Jason Gunthorpe Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/r/20221025115657.1666860-4-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel drivers/iommu/s390-iommu.c | 63 +++++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 20 deletions(-) commit 1a3a7d64bbce3179401f4e691522ff992aa1b8a1 Author: Niklas Schnelle Date: Tue Oct 25 13:56:53 2022 +0200 iommu/s390: Get rid of s390_domain_device The struct s390_domain_device serves the sole purpose as list entry for the devices list of a struct s390_domain. As it contains no additional information besides a list_head and a pointer to the struct zpci_dev we can simplify things and just thread the device list through struct zpci_dev directly. This removes the need to allocate during domain attach and gets rid of one level of indirection during mapping operations. Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/r/20221025115657.1666860-3-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel arch/s390/include/asm/pci.h | 1 + drivers/iommu/s390-iommu.c | 37 +++++++------------------------------ 2 files changed, 8 insertions(+), 30 deletions(-) commit bf8d2dd2ed0825a58f31cc510245a1eb46f8a87e Author: Niklas Schnelle Date: Tue Oct 25 13:56:52 2022 +0200 iommu/s390: Fix duplicate domain attachments Since commit fa7e9ecc5e1c ("iommu/s390: Tolerate repeat attach_dev calls") we can end up with duplicates in the list of devices attached to a domain. This is inefficient and confusing since only one domain can actually be in control of the IOMMU translations for a device. Fix this by detaching the device from the previous domain, if any, on attach. Add a WARN_ON() in case we still have attached devices on freeing the domain. While here remove the re-attach on failure dance as it was determined to be unlikely to help and may confuse debug and recovery. Fixes: fa7e9ecc5e1c ("iommu/s390: Tolerate repeat attach_dev calls") Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/r/20221025115657.1666860-2-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel drivers/iommu/s390-iommu.c | 106 +++++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 61 deletions(-) commit 2a48b15972a3b2a2622e6e537e1d53f457670395 Author: Colin Ian King Date: Mon Oct 24 14:43:01 2022 +0100 iommu/amd: Remove variable cnt ind iommu_poll_ga_log() Variable cnt is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Reviewed-by: Vasant Hegde Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20221024134301.2158939-1-colin.i.king@gmail.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d9095f92950bd16745b9ec24ebebc12d14b3a3e8 Merge: 71fa6887eeca c58ff3ed432d Author: Paolo Abeni Date: Thu Nov 3 15:26:14 2022 +0100 Merge branch 'add-new-pcp-and-apptrust-attributes-to-dcbnl' Daniel Machon says: ==================== Add new PCP and APPTRUST attributes to dcbnl This patch series adds new extension attributes to dcbnl, to support PCP prioritization (and thereby hw offloadable pcp-based queue classification) and per-selector trust and trust order. Additionally, the microchip sparx5 driver has been dcb-enabled to make use of the new attributes to offload PCP, DSCP and Default prio to the switch, and implement trust order of selectors. For pre-RFC discussion see: https://lore.kernel.org/netdev/Yv9VO1DYAxNduw6A@DEN-LT-70577/ For RFC series see: https://lore.kernel.org/netdev/20220915095757.2861822-1-daniel.machon@microchip.com/ In summary: there currently exist no convenient way to offload per-port PCP-based queue classification to hardware. The DCB subsystem offers different ways to prioritize through its APP table, but lacks an option for PCP. Similarly, there is no way to indicate the notion of trust for APP table selectors. This patch series addresses both topics. PCP based queue classification: - 8021Q standardizes the Priority Code Point table (see 6.9.3 of IEEE Std 802.1Q-2018). This patch series makes it possible, to offload the PCP classification to said table. The new PCP selector is not a standard part of the APP managed object, therefore it is encapsulated in a new non-std extension attribute. Selector trust: - ASIC's often has the notion of trust DSCP and trust PCP. The new attribute makes it possible to specify a trust order of app selectors, which drivers can then react on. DCB-enable sparx5 driver: - Now supports offloading of DSCP, PCP and default priority. Only one mapping of protocol:priority is allowed. Consecutive mappings of the same protocol to some new priority, will overwrite the previous. This is to keep a consistent view of the app table and the hardware. - Now supports dscp and pcp trust, by use of the introduced dcbnl_set/getapptrust ops. Sparx5 supports trust orders: [], [dscp], [pcp] and [dscp, pcp]. For now, only DSCP and PCP selectors are supported by the driver, everything else is bounced. Patch #1 introduces a new PCP selector to the APP object, which makes it possible to encode PCP and DEI in the app triplet and offload it to the PCP table of the ASIC. Patch #2 Introduces the new extension attributes DCB_ATTR_DCB_APP_TRUST_TABLE and DCB_ATTR_DCB_APP_TRUST. Trusted selectors are passed in the nested DCB_ATTR_DCB_APP_TRUST_TABLE attribute, and assembled into an array of selectors: u8 selectors[256]; where lower indexes has higher precedence. In the array, selectors are stored consecutively, starting from index zero. With a maximum number of 256 unique selectors, the list has the same maximum size. Patch #3 Sets up the dcbnl ops hook, and adds support for offloading pcp app entries, to the PCP table of the switch. Patch #4 Makes use of the dcbnl_set/getapptrust ops, to set a per-port trust order. Patch #5 Adds support for offloading dscp app entries to the DSCP table of the switch. Patch #6 Adds support for offloading default prio app entries to the switch. ==================== Link: https://lore.kernel.org/r/20221101094834.2726202-1-daniel.machon@microchip.com Signed-off-by: Paolo Abeni commit ad7632ff0ebfacab5936e70a4187c2f0fa789627 Author: Jani Nikula Date: Wed Nov 2 12:08:19 2022 +0200 drm/i915/irq: make gen2_irq_init()/gen2_irq_reset() static The gen2 irq functions aren't used outside of i915_irq.h. Make them static, and remove the useless macro wrappers. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/b28f45ef4ef69ab7a6f96ffa3fa3118994667332.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_irq.c | 10 +++++----- drivers/gpu/drm/i915/i915_irq.h | 9 --------- 2 files changed, 5 insertions(+), 14 deletions(-) commit 831209ec305ee9984a5036695cf73a9eb3f755bd Author: Jani Nikula Date: Wed Nov 2 12:08:18 2022 +0200 drm/i915/display: reduce includes in g4x_dp.h includes Only include what's needed. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/e68c71ad1c1c1de7f5bc659edeb208818cddde72.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/g4x_dp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22b2c7691cace5928fffef878a0d2d7435abbf51 Author: Jani Nikula Date: Wed Nov 2 12:08:17 2022 +0200 drm/i915/display: reduce includes in intel_hdmi.h Only include what's needed. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/5949a57979dae615731b6ff54d5d150b91e34d27.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_hdmi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 356d725d62fe9d60157fcfd482ccc3fc70ee1c6c Author: Jani Nikula Date: Wed Nov 2 12:08:16 2022 +0200 drm/i915/display: reduce the includes in intel_dvo_dev.h Only include what's needed. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/8523aa88daaf2dbf0ce138980142dbcd6d1ae0bc.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_dvo_dev.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 50ae1a1c5edee3c6dfa3b7db7379ac0c4466051b Author: Jani Nikula Date: Wed Nov 2 12:08:15 2022 +0200 drm/i915: reduce includes in intel_display_power.h Only include what's needed. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/a7f41cf6d13ee78c0b3a7c5927680bb94edfc5fb.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display_power.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 99417adb60e0d2fada04f57074358fba98e13c4a Author: Jani Nikula Date: Wed Nov 2 12:08:14 2022 +0200 drm/i915/dpio: move dpio_channel and dpio_phy enums to intel_dpio_phy.h Reduce the size of intel_display.h by moving out the dpio_channel and dpio_phy enums. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/7c3ee7a6482540a0267f7b2974d22cab8188707a.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.h | 11 ----------- drivers/gpu/drm/i915/display/intel_display_power_well.h | 2 +- drivers/gpu/drm/i915/display/intel_dpio_phy.h | 13 +++++++++++-- drivers/gpu/drm/i915/gvt/display.c | 2 ++ drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i915/gvt/mmio.c | 1 + drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 1 + drivers/gpu/drm/i915/vlv_sideband.c | 2 ++ 8 files changed, 19 insertions(+), 14 deletions(-) commit 2461bdb35e8ac4c7943d8277c118d5bba719d99c Author: Jani Nikula Date: Wed Nov 2 12:08:13 2022 +0200 drm/i915/dpio: un-inline the vlv phy/channel mapping functions Simplify the heavy intel_display_types.h header. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/943dd3e9812138b1cf3ddcfde896cfec006f3847.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.c | 1 + drivers/gpu/drm/i915/display/intel_display_types.h | 45 ---------------------- drivers/gpu/drm/i915/display/intel_dpio_phy.c | 42 ++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_dpio_phy.h | 6 +++ drivers/gpu/drm/i915/display/intel_dpll.c | 1 + drivers/gpu/drm/i915/display/intel_pps.c | 1 + 6 files changed, 51 insertions(+), 45 deletions(-) commit d29c410f77fd3f7dc632f5f153f455e6163d5449 Author: Jani Nikula Date: Wed Nov 2 12:08:12 2022 +0200 drm/i915: un-inline icl_hdr_plane_mask() to simplify includes This lets us drop the heavy intel_display.h include from intel_sprite.h. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/16e13b6f207f52f8810a06f71a08e637f6397dc8.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_sprite.h | 9 +-------- drivers/gpu/drm/i915/display/skl_universal_plane.c | 5 +++++ drivers/gpu/drm/i915/display/skl_universal_plane.h | 1 + 3 files changed, 7 insertions(+), 8 deletions(-) commit 19cfeb414ea3d7d1beba0dadc466618e5671805e Author: Jani Nikula Date: Wed Nov 2 12:08:11 2022 +0200 drm/i915: reduce includes in intel_fifo_underrun.h Only include what's needed. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/29b57e168e8af842baad2626959cea258402a2c1.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_fifo_underrun.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 10b60b56a05b495a5ba0ced173ba995e8a373f39 Author: Jani Nikula Date: Wed Nov 2 12:08:10 2022 +0200 drm/i915: reduce includes in intel_connector.h Only include what's needed. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/3aa1e27284e0ac308938978ae7da9ea9fbacad9e.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_connector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 507d7c17cab274016dd43c8661d4586ba7504972 Author: Jani Nikula Date: Wed Nov 2 12:08:09 2022 +0200 drm/i915/gmbus: move GPIO enum to gmbus The GPIO enum is only used in intel_gmbus.c, hide it there. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/3c386ce08d7d53a45c14c2e7519e4cc78a8161be.1667383630.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display.h | 18 ------------------ drivers/gpu/drm/i915/display/intel_gmbus.c | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 19 deletions(-) commit c58ff3ed432d0337272c0c5d06a715b3ec6a3d76 Author: Daniel Machon Date: Tue Nov 1 10:48:34 2022 +0100 net: microchip: sparx5: add support for offloading default prio Add support for offloading default prio {ETHERTYPE, 0, prio}. Signed-off-by: Daniel Machon Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c | 12 +++++++++++ .../net/ethernet/microchip/sparx5/sparx5_port.c | 23 ++++++++++++++++++++++ .../net/ethernet/microchip/sparx5/sparx5_port.h | 5 +++++ 3 files changed, 40 insertions(+) commit 8dcf69a64118f0ae9506ce6c584bc5648ad84aa1 Author: Daniel Machon Date: Tue Nov 1 10:48:33 2022 +0100 net: microchip: sparx5: add support for offloading dscp table Add support for offloading dscp app entries. Dscp values are global for all ports on the sparx5 switch. Therefore, we replicate each dscp app entry per-port. Signed-off-by: Daniel Machon Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c | 66 +++++++++++++++++++++- .../net/ethernet/microchip/sparx5/sparx5_port.c | 39 +++++++++++++ .../net/ethernet/microchip/sparx5/sparx5_port.h | 14 +++++ 3 files changed, 116 insertions(+), 3 deletions(-) commit 23f8382cd95db36dc32ca81ce72d0936caa34f80 Author: Daniel Machon Date: Tue Nov 1 10:48:32 2022 +0100 net: microchip: sparx5: add support for apptrust Make use of set/getapptrust() to implement per-selector trust and trust order. Signed-off-by: Daniel Machon Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c | 122 +++++++++++++++++++++ .../net/ethernet/microchip/sparx5/sparx5_port.c | 4 +- .../net/ethernet/microchip/sparx5/sparx5_port.h | 2 + 3 files changed, 126 insertions(+), 2 deletions(-) commit 92ef3d011e17238483a336bdb714309f597e05d2 Author: Daniel Machon Date: Tue Nov 1 10:48:31 2022 +0100 net: microchip: sparx5: add support for offloading pcp table Add new registers and functions to support offload of pcp app entries. Signed-off-by: Daniel Machon Signed-off-by: Paolo Abeni drivers/net/ethernet/microchip/sparx5/Kconfig | 11 ++ drivers/net/ethernet/microchip/sparx5/Makefile | 2 + drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c | 116 +++++++++++++++++++ .../net/ethernet/microchip/sparx5/sparx5_main.h | 11 ++ .../ethernet/microchip/sparx5/sparx5_main_regs.h | 127 ++++++++++++++++++++- .../net/ethernet/microchip/sparx5/sparx5_port.c | 37 ++++++ .../net/ethernet/microchip/sparx5/sparx5_port.h | 21 ++++ drivers/net/ethernet/microchip/sparx5/sparx5_qos.c | 4 + 8 files changed, 327 insertions(+), 2 deletions(-) commit 6182d5875c330a5a611687caa05f47752455720c Author: Daniel Machon Date: Tue Nov 1 10:48:30 2022 +0100 net: dcb: add new apptrust attribute Add new apptrust extension attributes to the 8021Qaz APP managed object. Two new attributes, DCB_ATTR_DCB_APP_TRUST_TABLE and DCB_ATTR_DCB_APP_TRUST, has been added. Trusted selectors are passed in the nested attribute DCB_ATTR_DCB_APP_TRUST, in order of precedence. The new attributes are meant to allow drivers, whose hw supports the notion of trust, to be able to set whether a particular app selector is trusted - and in which order. Signed-off-by: Daniel Machon Reviewed-by: Petr Machata Signed-off-by: Paolo Abeni include/net/dcbnl.h | 4 +++ include/uapi/linux/dcbnl.h | 2 ++ net/dcb/dcbnl.c | 76 ++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 80 insertions(+), 2 deletions(-) commit ec32c0c42d0a7208571c4c77f140bffaa4e5e304 Author: Daniel Machon Date: Tue Nov 1 10:48:29 2022 +0100 net: dcb: add new pcp selector to app object Add new PCP selector for the 8021Qaz APP managed object. As the PCP selector is not part of the 8021Qaz standard, a new non-std extension attribute DCB_ATTR_DCB_APP has been introduced. Also two helper functions to translate between selector and app attribute type has been added. The new selector has been given a value of 255, to minimize the risk of future overlap of std- and non-std attributes. The new DCB_ATTR_DCB_APP is sent alongside the ieee std attribute in the app table. This means that the dcb_app struct can now both contain std- and non-std app attributes. Currently there is no overlap between the selector values of the two attributes. The purpose of adding the PCP selector, is to be able to offload PCP-based queue classification to the 8021Q Priority Code Point table, see 6.9.3 of IEEE Std 802.1Q-2018. PCP and DEI is encoded in the protocol field as 8*dei+pcp, so that a mapping of PCP 2 and DEI 1 to priority 3 is encoded as {255, 10, 3}. Signed-off-by: Daniel Machon Reviewed-by: Petr Machata Signed-off-by: Paolo Abeni include/uapi/linux/dcbnl.h | 6 +++++ net/dcb/dcbnl.c | 58 ++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 60 insertions(+), 4 deletions(-) commit 8330b9ebf9ef10156b01d40176b9fff1ce2a374c Author: Christophe Leroy Date: Thu Oct 6 07:24:03 2022 +0200 iommu/fsl_pamu: Replace NO_IRQ by 0 NO_IRQ is used to check the return of irq_of_parse_and_map(). On some architecture NO_IRQ is 0, on other architectures it is -1. irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ. So use 0 instead of using NO_IRQ. Signed-off-by: Christophe Leroy Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/2a2570a8d12c80a7d36837b6c586daa708ca09d7.1665033732.git.christophe.leroy@csgroup.eu Signed-off-by: Joerg Roedel drivers/iommu/fsl_pamu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c51d4afcf3fd36159713556402e16cfab794ae9 Author: Zev Weiss Date: Mon Oct 31 16:37:04 2022 -0700 regulator: userspace-consumer: Handle regulator-output DT nodes In addition to adding some fairly simple OF support code, we make some slight adjustments to the userspace-consumer driver to properly support use with regulator-output hardware: - We now do an exclusive get of the supply regulators so as to prevent regulator_init_complete_work from automatically disabling them. - Instead of assuming that the supply is initially disabled, we now query its state to determine the initial value of drvdata->enabled. Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20221031233704.22575-4-zev@bewilderbeest.net Signed-off-by: Mark Brown drivers/regulator/userspace-consumer.c | 60 ++++++++++++++++++++++++---- include/linux/regulator/userspace-consumer.h | 1 + 2 files changed, 54 insertions(+), 7 deletions(-) commit 14b8ad4c2580231fc45c2313ef822a15bb12f63f Author: Zev Weiss Date: Mon Oct 31 16:37:03 2022 -0700 regulator: Add regulator-output binding This describes a power output supplied by a regulator, such as a power outlet on a power distribution unit (PDU). Signed-off-by: Zev Weiss Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221031233704.22575-3-zev@bewilderbeest.net Signed-off-by: Mark Brown .../bindings/regulator/regulator-output.yaml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit fd1845069711cdf1b1aaaa0f22311b7736396331 Author: Zev Weiss Date: Mon Oct 31 16:37:02 2022 -0700 regulator: devres: Add devm_regulator_bulk_get_exclusive() We had an exclusive variant of the devm_regulator_get() API, but no corresponding variant for the bulk API; let's add one now. We add a generalized version of the existing regulator_bulk_get() function that additionally takes a get_type parameter and redefine regulator_bulk_get() in terms of it, then do similarly with devm_regulator_bulk_get(), and finally add the new devm_regulator_bulk_get_exclusive(). Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20221031233704.22575-2-zev@bewilderbeest.net Signed-off-by: Mark Brown drivers/regulator/core.c | 42 +++++++++++++----------- drivers/regulator/devres.c | 66 +++++++++++++++++++++++++++----------- drivers/regulator/internal.h | 2 ++ include/linux/regulator/consumer.h | 2 ++ 4 files changed, 76 insertions(+), 36 deletions(-) commit b43d0c0a42b2c44da824b3de0364d73be722a8c7 Author: Colin Ian King Date: Thu Nov 3 12:06:24 2022 +0000 ASoC: Intel: cirrus-common: Make const array uid_strings static Don't populate the read-only const array uid_strings on the stack but instead make it static. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221103120624.72583-1-colin.i.king@gmail.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_cirrus_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7d97cb564a2ac5517ee7cc933de729e533d659a Author: Maarten Zanders Date: Fri Oct 28 21:13:01 2022 +0200 ASoC: simple-mux: add read function During initialisation DAPM tries to read the state of the MUX being connected, resulting in this error log: input-mux: ASoC: error at soc_component_read_no_lock on input-mux: -5 Provide a read function which allows DAPM to read the state of the MUX. Signed-off-by: Maarten Zanders Link: https://lore.kernel.org/r/20221028191303.166115-1-maarten.zanders@mind.be Signed-off-by: Mark Brown sound/soc/codecs/simple-mux.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit a984d8332d90afd2989e10b095ffdb2875d4bac8 Author: Dmitry Torokhov Date: Wed Nov 2 16:20:04 2022 -0700 ASoC: tlv320aic3x: 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. The driver still tries to support shared reset lines, by first trying to allocate the reset GPIO normally, and then non-exclusively, although the utility of such support is questionable, toggling reset line from one driver/instance will result in all chips being reset, potentially at an inopportune moment. Note that this change depends on commit fbbbcd177a27 ("gpiolib: of: add quirk for locating reset lines with legacy bindings") to translate request for "reset" GPIO to the legacy name "gpio-reset" in case when proper name is not used. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20221102232004.1721864-3-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic3x.c | 108 +++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 69 deletions(-) commit 426c7bf45f207ac7a962e012dd482f7aaa3a3d5f Author: Dmitry Torokhov Date: Wed Nov 2 16:20:03 2022 -0700 ASoC: tlv320aic3x: remove support for platform data Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20221102232004.1721864-2-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown include/sound/tlv320aic3x.h | 65 ------------------------------------------ sound/soc/codecs/tlv320aic3x.c | 12 ++++---- sound/soc/codecs/tlv320aic3x.h | 43 ++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 72 deletions(-) commit faf3b5cb59f84e4056bd84f115a958bc99c61e65 Author: Dmitry Torokhov Date: Wed Nov 2 16:20:02 2022 -0700 ARM: omap2: n8x0: stop instantiating codec platform data As of 0426370b58b2 ("ARM: dts: omap2420-n810: Correct the audio codec (tlv320aic33) node") the DTS properly specifies reset GPIO, and the device name in auxdata lookup table does not even match the one in device tree anymore, so stop instantiating it. Signed-off-by: Dmitry Torokhov Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20221102232004.1721864-1-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown arch/arm/mach-omap2/board-n8x0.c | 5 ----- arch/arm/mach-omap2/common-board-devices.h | 2 -- arch/arm/mach-omap2/pdata-quirks.c | 1 - 3 files changed, 8 deletions(-) commit e14657c0f0022e02c8f25fa9c56afae3d3db9e77 Author: Ajye Huang Date: Wed Nov 2 20:59:36 2022 +0800 ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs case Having two DMICs, a front DMIC and a Rear DMIC, but only host audio input AUX port0 is used for these two Dmics. A "dmic-gpios" property is used for a mixer control to switch the dmic signal source between the Front and Rear Dmic. Refer to this one as an example, commit 3cfbf07c6d27 ("ASoC: qcom: sc7180: Modify machine driver for 2mic") Signed-off-by: Ajye Huang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221102125936.2176748-3-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown .../mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c | 102 ++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) commit f8639c385f7e8325b73c83a6ec0865f8c036e1ad Author: Ajye Huang Date: Wed Nov 2 20:59:35 2022 +0800 ASoC: mediatek: dt-bindings: modify machine bindings for two MICs case Add a property "dmic-gpios" for switching between two MICs. Signed-off-by: Ajye Huang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221102125936.2176748-2-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown .../bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit f46e3f5ffc0fff6224a27117126008b2f4d94eba Author: Jouni Högander Date: Wed Nov 2 19:45:44 2022 +0200 drm/i915/psr: Remove inappropriate DSC slice alignment warning Selective update area is now aligned with DSC slice height when DSC is enabled. Remove inappropriate warning about missing DSC alignment. Cc: José Roberto de Souza Cc: Mika Kahola Fixes: 47d4ae2192cb ("drm/i915/mtl: Extend PSR support") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7212 Signed-off-by: Jouni Högander Signed-off-by: Anshuman Gupta Reviewed-by: Mika Kahola Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20221102174544.2288205-3-jouni.hogander@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 3 --- 1 file changed, 3 deletions(-) commit b9a2b0944cf77aadbeb82b05c3d1faa472d83778 Author: Jouni Högander Date: Wed Nov 2 19:45:43 2022 +0200 drm/i915/psr: Ensure panel granularity aligns with DSC slice height Do not enable psr2 if panel ganularity is not aligned with DSC slice height when DSC is enabled Cc: José Roberto de Souza Cc: Mika Kahola Signed-off-by: Jouni Högander Reviewed-by: José Roberto de Souza Reviewed-by: Manasi Navare Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20221102174544.2288205-2-jouni.hogander@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 5 +++++ 1 file changed, 5 insertions(+) commit 691768968f2a13eba8d52e8475dca7feb288d4f2 Author: Ian Rogers Date: Mon Oct 24 11:19:12 2022 -0700 perf top: Use sig_atomic_t to avoid undefined behaviour in a signal handler Use sig_atomic_t for variables written/accessed in signal handlers. This is undefined behavior as per: https://wiki.sei.cmu.edu/confluence/display/c/SIG31-C.+Do+not+access+shared+objects+in+signal+handlers Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221024181913.630986-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01513fdc18f395dbcc924bc5e9962b12f86f947a Author: Ian Rogers Date: Mon Oct 24 11:19:11 2022 -0700 perf stat: Use sig_atomic_t to avoid undefined behaviour in a signal handler Use sig_atomic_t for variables written/accessed in signal handlers. This is undefined behavior as per: https://wiki.sei.cmu.edu/confluence/display/c/SIG31-C.+Do+not+access+shared+objects+in+signal+handlers Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221024181913.630986-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 057929f9d083e80c9b30c324add69d2054ca6d82 Author: Ian Rogers Date: Mon Oct 24 11:19:10 2022 -0700 perf session: Change type to avoid undefined behaviour in a signal handler The 'session_done' variable is written to inside the signal handler of 'perf report' and 'perf script'. Switch its type to avoid undefined behavior. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221024181913.630986-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 853596fb71f7c2f7ff0de7b13f09d6598d4d56cd Author: Ian Rogers Date: Mon Oct 24 11:19:09 2022 -0700 perf ftrace: Use sig_atomic_t to avoid UB Use sig_atomic_t for a variable written to in a signal handler and read elsewhere. This is undefined behavior as per: https://wiki.sei.cmu.edu/confluence/display/c/SIG31-C.+Do+not+access+shared+objects+in+signal+handlers Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221024181913.630986-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-ftrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7f3374299f9762ba7946138bf0d5cfbd50da111b Author: Ian Rogers Date: Mon Oct 24 11:19:08 2022 -0700 perf daemon: Use sig_atomic_t to avoid UB Use sig_atomic_t for a variable written to in a signal handler and read elsewhere. This is undefined behavior as per: https://wiki.sei.cmu.edu/confluence/display/c/SIG31-C.+Do+not+access+shared+objects+in+signal+handlers Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221024181913.630986-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ed28c2b56b78442989ef1afee2b968e9d51a65c Author: Ian Rogers Date: Mon Oct 24 11:19:07 2022 -0700 perf record: Use sig_atomic_t for signal handlers This removes undefined behavior as described in: https://wiki.sei.cmu.edu/confluence/display/c/SIG31-C.+Do+not+access+shared+objects+in+signal+handlers Suggested-by: Leo Yan Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221024181913.630986-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f3c9bd4e16a503cb14891963428d388a4f70ffb8 Author: Ian Rogers Date: Mon Oct 24 11:19:06 2022 -0700 perf build: Update to C standard to gnu11 C11 has become the standard for mainstream kernel development [1], allowing it in the perf build enables libraries like stdatomic.h to be assumed to be present. This came up in the context of [2]. [1] https://lore.kernel.org/lkml/CAHk-=whWbENRz-vLY6vpESDLj6kGUTKO3khGtVfipHqwewh2HQ@mail.gmail.com/ [2] https://lore.kernel.org/lkml/20221024011024.462518-1-irogers@google.com/ Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20221024181913.630986-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc9a5d2ccd5c823cc05cafe75fcf19b682d8152c Author: Masami Hiramatsu (Google) Date: Tue Nov 1 22:48:49 2022 +0900 perf probe: Fix to get declared file name from clang DWARF5 Fix to get the declared file name even if it uses file index 0 in DWARF5, using custom die_get_decl_file() function. Actually, the DWARF5 standard says file index 0 of the DW_AT_decl_file is invalid(1), but there is a discussion and maybe this will be updated [2]. Anyway, clang generates such DWARF5 file for the linux kernel. Thus it must be handled. Without this, 'perf probe' returns an error: $ ./perf probe -k $BIN_PATH/vmlinux -s $SRC_PATH -L vfs_read:10 Debuginfo analysis failed. Error: Failed to show lines. With this, it can handle the case correctly: $ ./perf probe -k $BIN_PATH/vmlinux -s $SRC_PATH -L vfs_read:10 11 ret = rw_verify_area(READ, file, pos, count); 12 if (ret) return ret; [1] DWARF5 specification 2.14 says "The value 0 indicates that no source file has been specified.") [2] http://wiki.dwarfstd.org/index.php?title=DWARF5_Line_Table_File_Numbers) Signed-off-by: Masami Hiramatsu Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/166731052936.2100653.13380621874859467731.stgit@devnote3 Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dwarf-aux.c | 47 ++++++++++++++++++++++++++++-------------- tools/perf/util/dwarf-aux.h | 3 +++ tools/perf/util/probe-finder.c | 14 ++++++------- 3 files changed, 42 insertions(+), 22 deletions(-) commit f828929ab7f0dc3353e4a617f94f297fa8f3dec3 Author: Masami Hiramatsu (Google) Date: Tue Nov 1 22:48:39 2022 +0900 perf probe: Use dwarf_attr_integrate as generic DWARF attr accessor Use dwarf_attr_integrate() instead of dwarf_attr() for generic attribute acccessor functions, so that it can find the specified attribute from abstact origin DIE etc. Signed-off-by: Masami Hiramatsu Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/166731051988.2100653.13595339994343449770.stgit@devnote3 Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dwarf-aux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98e4c68ddcaf3721df9bef809775a8e3562cb6f9 Author: Masami Hiramatsu (Google) Date: Tue Nov 1 22:48:30 2022 +0900 perf probe: Fix to avoid crashing if DW_AT_decl_file is NULL Since clang generates DWARF5 which sets DW_AT_decl_file as 0, dwarf_decl_file() thinks that is invalid and returns NULL. In that case 'perf probe' SIGSEGVs because it doesn't expect a NULL decl_file. This adds a dwarf_decl_file() return value check to avoid such SEGV with clang generated DWARF5 info. Without this, 'perf probe' crashes: $ perf probe -k $BIN_PATH/vmlinux -s $SRC_PATH -L vfs_read:10 Segmentation fault $ With this, it just warns about it: $ perf probe -k $BIN_PATH/vmlinux -s $SRC_PATH -L vfs_read:10 Debuginfo analysis failed. Error: Failed to show lines. $ Signed-off-by: Masami Hiramatsu Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/166731051077.2100653.15626653369345128302.stgit@devnote3 Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dwarf-aux.c | 7 ++++++- tools/perf/util/probe-finder.c | 29 +++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 9 deletions(-) commit a82f30b04c6aaefe62cbbfd297e1bb23435b6b3a Author: Christian König Date: Thu Sep 29 15:01:57 2022 +0200 drm/scheduler: rename dependency callback into prepare_job This now matches much better what this is doing. Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-14-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 ++-- drivers/gpu/drm/scheduler/sched_entity.c | 4 ++-- include/drm/gpu_scheduler.h | 13 ++++++------- 3 files changed, 10 insertions(+), 11 deletions(-) commit 2fdb8a8f07c2f1353770a324fd19b8114e4329ac Author: Christian König Date: Thu Sep 29 14:50:56 2022 +0200 drm/scheduler: rework entity flush, kill and fini This was buggy because when we had to wait for entities which were killed as well we would just deadlock. Instead move all the dependency handling into the callbacks so that will all happen asynchronously. Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-13-christian.koenig@amd.com drivers/gpu/drm/scheduler/sched_entity.c | 196 ++++++++++++++----------------- 1 file changed, 91 insertions(+), 105 deletions(-) commit 2cf9886e281678ae9ee57e24a656749071d543bb Author: Christian König Date: Thu Sep 29 14:08:13 2022 +0200 drm/scheduler: remove drm_sched_dependency_optimized Not used any more. Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-12-christian.koenig@amd.com drivers/gpu/drm/scheduler/sched_main.c | 26 -------------------------- include/drm/gpu_scheduler.h | 2 -- 2 files changed, 28 deletions(-) commit 1728baa7e4e60054bf13dd9b1212d133cbd53b3f Author: Christian König Date: Thu Sep 29 14:04:01 2022 +0200 drm/amdgpu: use scheduler dependencies for CS Entirely remove the sync obj in the job. Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-11-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 21 ++++++++++----------- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 9 +-------- drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 1 - 4 files changed, 13 insertions(+), 20 deletions(-) commit 46e0270c71d33e9764dd5c69bfbca7b581cec1c7 Author: Christian König Date: Thu Sep 29 13:57:34 2022 +0200 drm/amdgpu: use scheduler dependencies for UVD msgs Instead of putting that into the job sync object. Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-10-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit aab9cf7b6954136f4339136a1a7fc0602a2c4d8b Author: Christian König Date: Thu Sep 29 13:34:34 2022 +0200 drm/amdgpu: use scheduler dependencies for VM updates Instead of putting that into the job sync object. Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-9-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 56 +++++++++++++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 10 ++++-- 3 files changed, 52 insertions(+), 16 deletions(-) commit 1b2d5eda5ad785d0dd13484141b78d2ac366c169 Author: Christian König Date: Thu Sep 29 13:05:56 2022 +0200 drm/amdgpu: move explicit sync check into the CS This moves the memory allocation out of the critical code path. Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-8-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 13 ++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 12 +++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 2 +- 4 files changed, 17 insertions(+), 12 deletions(-) commit f7d66fb2ea43a3016e78a700a2ca6c77a74579f9 Author: Christian König Date: Wed Sep 28 20:31:38 2022 +0200 drm/amdgpu: cleanup scheduler job initialization v2 Init the DRM scheduler base class while allocating the job. This makes the whole handling much more cleaner. v2: fix coding style Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-7-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 8 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 44 +++++++++++---------- drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 14 ++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 7 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 56 ++++++++++---------------- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 9 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 13 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 22 ++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 61 +++++++++++++++-------------- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 12 ++---- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 12 +++--- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 17 +++----- 14 files changed, 135 insertions(+), 150 deletions(-) commit 940ca22b7ea9db6857ba7c6adb961b84d8cc28ff Author: Christian König Date: Wed Sep 28 14:00:57 2022 +0200 drm/amdgpu: drop amdgpu_sync from amdgpu_vmid_grab v2 Instead return the fence directly. Avoids memory allocation to store the fence. v2: cleanup coding style as well Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-6-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 42 +++++++++++++++++---------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 12 ++++------ 3 files changed, 28 insertions(+), 28 deletions(-) commit c5093cddf56baceb1545028e8a5971d94cf59d25 Author: Christian König Date: Wed Sep 28 13:21:05 2022 +0200 drm/amdgpu: drop the fence argument from amdgpu_vmid_grab This is always the job anyway. Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-5-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 20 ++++++++------------ drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 +--- 3 files changed, 10 insertions(+), 17 deletions(-) commit 4f91790b42ffba72d80434d901548979ab41dc7c Author: Christian König Date: Wed Sep 28 10:54:41 2022 +0200 drm/amdgpu: use drm_sched_job_add_resv_dependencies for moves Use the new common scheduler functions to figure out what to wait for. Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-4-christian.koenig@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 4d5230b50dd42afa2dfa6b13c44b0d90ecb78510 Author: Christian König Date: Wed Sep 28 10:17:40 2022 +0200 drm/scheduler: add drm_sched_job_add_resv_dependencies Add a new function to update job dependencies from a resv obj. Signed-off-by: Christian König Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-3-christian.koenig@amd.com drivers/gpu/drm/scheduler/sched_main.c | 49 +++++++++++++++++++++++----------- include/drm/gpu_scheduler.h | 5 ++++ 2 files changed, 39 insertions(+), 15 deletions(-) commit 3886bc3523db24814c98c57d74fe66d7a21bf40b Author: Andy Shevchenko Date: Wed Nov 2 17:29:15 2022 +0200 pinctrl: merrifield: Use temporary variable for struct device Use temporary variable for struct device to make code neater. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-merrifield.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 12b44105c0ca7c250d4f00c42482c5eaab2e8bd5 Author: Andy Shevchenko Date: Wed Nov 2 17:29:14 2022 +0200 pinctrl: intel: Use temporary variable for struct device Use temporary variable for struct device to make code neater. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-intel.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 8c1d6a050a0f16e0a9d32eaf53b965c77279c6f8 Author: Roberto Sassu Date: Wed Nov 2 17:30:06 2022 +0100 ima: Fix memory leak in __ima_inode_hash() Commit f3cc6b25dcc5 ("ima: always measure and audit files in policy") lets measurement or audit happen even if the file digest cannot be calculated. As a result, iint->ima_hash could have been allocated despite ima_collect_measurement() returning an error. Since ima_hash belongs to a temporary inode metadata structure, declared at the beginning of __ima_inode_hash(), just add a kfree() call if ima_collect_measurement() returns an error different from -ENOMEM (in that case, ima_hash should not have been allocated). Cc: stable@vger.kernel.org Fixes: 280fe8367b0d ("ima: Always return a file measurement in ima_file_hash()") Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar security/integrity/ima/ima_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 71fa6887eeca7b631528f9c7a39815498de8028c Author: Saurabh Sengar Date: Mon Oct 31 23:06:01 2022 -0700 net: mana: Assign interrupts to CPUs based on NUMA nodes In large VMs with multiple NUMA nodes, network performance is usually best if network interrupts are all assigned to the same virtual NUMA node. This patch assigns online CPU according to a numa aware policy, local cpus are returned first, followed by non-local ones, then it wraps around. Signed-off-by: Saurabh Sengar Reviewed-by: Haiyang Zhang Link: https://lore.kernel.org/r/1667282761-11547-1-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Paolo Abeni drivers/net/ethernet/microsoft/mana/gdma.h | 1 + drivers/net/ethernet/microsoft/mana/gdma_main.c | 30 ++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) commit 6f85403ef4d0034fff11c77ed170aa2130329544 Author: Chris Wilson Date: Wed Nov 2 16:57:09 2022 +0100 drm/i915/selftests: Reduce oversaturation of request smoketesting The goal in launching the request smoketest is to have sufficient tasks running across the system such that we are likely to detect concurrency issues. We aim to have 2 tasks using the same engine, gt, device (each level of locking around submission and signaling) running at the same time. While tasks may not be running all the time as they synchronise with the gpu, they will be running most of the time, in which case having many more tasks than cores available is wasteful (and dramatically increases the workload causing excess runtime). Aim to limit the number of tasks such that there is at least 2 running per engine, spreading surplus cores around the engines (rather than running a task per core per engine.) Signed-off-by: Chris Wilson Reviewed-by: Nirmoy Das Tested-by: Nirmoy Das Signed-off-by: Nirmoy Das Reviewed-by: Tvrtko Ursulin Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221102155709.31717-1-nirmoy.das@intel.com drivers/gpu/drm/i915/selftests/i915_request.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6d6b39f180b83dfe1e938382b68dd1e6cb51363c Author: Shenwei Wang Date: Mon Oct 31 13:53:50 2022 -0500 net: fec: add initial XDP support This patch adds the initial XDP support to Freescale driver. It supports XDP_PASS, XDP_DROP and XDP_REDIRECT actions. Upcoming patches will add support for XDP_TX and Zero Copy features. As the patch is rather large, the part of codes to collect the statistics is separated and will prepare a dedicated patch for that part. I just tested with the application of xdpsock. -- Native here means running command of "xdpsock -i eth0" -- SKB-Mode means running command of "xdpsock -S -i eth0" The following are the testing result relating to XDP mode: root@imx8qxpc0mek:~/bpf# ./xdpsock -i eth0 sock0@eth0:0 rxdrop xdp-drv pps pkts 1.00 rx 371347 2717794 tx 0 0 root@imx8qxpc0mek:~/bpf# ./xdpsock -S -i eth0 sock0@eth0:0 rxdrop xdp-skb pps pkts 1.00 rx 202229 404528 tx 0 0 root@imx8qxpc0mek:~/bpf# ./xdp2 eth0 proto 0: 496708 pkt/s proto 0: 505469 pkt/s proto 0: 505283 pkt/s proto 0: 505443 pkt/s proto 0: 505465 pkt/s root@imx8qxpc0mek:~/bpf# ./xdp2 -S eth0 proto 0: 0 pkt/s proto 17: 118778 pkt/s proto 17: 118989 pkt/s proto 0: 1 pkt/s proto 17: 118987 pkt/s proto 0: 0 pkt/s proto 17: 118943 pkt/s proto 17: 118976 pkt/s proto 0: 1 pkt/s proto 17: 119006 pkt/s proto 0: 0 pkt/s proto 17: 119071 pkt/s proto 17: 119092 pkt/s Signed-off-by: Shenwei Wang Reported-by: kernel test robot Link: https://lore.kernel.org/r/20221031185350.2045675-1-shenwei.wang@nxp.com Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/fec.h | 4 +- drivers/net/ethernet/freescale/fec_main.c | 224 +++++++++++++++++++++++++++++- 2 files changed, 226 insertions(+), 2 deletions(-) commit d942f231afc037490538cea67bb0c667e6d12214 Author: Guo Ren Date: Thu Nov 3 04:04:51 2022 -0400 selftests/vDSO: Add riscv getcpu & gettimeofday test Enable vDSO getcpu & gettimeofday test for riscv. But only riscv64 supports __vdso_gettimeofday and riscv32 is under development. VERSION { LINUX_4.15 { global: __vdso_rt_sigreturn; __vdso_gettimeofday; __vdso_clock_gettime; __vdso_clock_getres; __vdso_getcpu; __vdso_flush_icache; local: *; }; } Co-developed-by: haocheng.zy Signed-off-by: haocheng.zy Suggested-by: Mao Han Reviewed-by: Shuah Khan Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Elliott Hughes Signed-off-by: Shuah Khan tools/testing/selftests/vDSO/vdso_test_getcpu.c | 4 ++++ tools/testing/selftests/vDSO/vdso_test_gettimeofday.c | 3 +++ 2 files changed, 7 insertions(+) commit 5345b86c2aafab6c686ce46715f42ddc937cb0b4 Author: Thomas Zimmermann Date: Tue Nov 1 11:40:49 2022 +0100 drm/ofdrm: Depend on CONFIG_MMU Add a dependency on CONFIG_MMU to ofdrm. The driver uses GEM SHMEM helpers, which require MMU support. A reported error message [1] is shown below. arm-linux-gnueabi-ld: drivers/gpu/drm/drm_gem_shmem_helper.o: in function `drm_gem_shmem_fault': >> drivers/gpu/drm/drm_gem_shmem_helper.c:562: undefined reference to `vmf_insert_pfn' Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Sam Ravnborg Cc: Maxime Ripard Cc: "Noralf Trønnes" Cc: Danilo Krummrich Cc: Michal Suchanek Cc: Daniel Vetter Link: https://lore.kernel.org/dri-devel/202210192029.ZFeJvqjv-lkp@intel.com/ # [1] Link: https://patchwork.freedesktop.org/patch/msgid/20221101104049.15601-1-tzimmermann@suse.de drivers/gpu/drm/tiny/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 639325e4269750fbd3ccc2c4beb7e5cc40e2c4fd Author: Vinod Govindapillai Date: Tue Oct 11 12:30:48 2022 +0300 drm/i915: update DSC feature flag handling during device init DSC feature information is no longer part of the DFSM register in some display generations. Bspec:50075 Signed-off-by: Vinod Govindapillai Reviewed-by: Stanislav Lisovskiy Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20221011093048.447177-1-vinod.govindapillai@intel.com drivers/gpu/drm/i915/intel_device_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c4e4d35203301906afb53c6d1e1302d4c793c05 Author: Nathan Chancellor Date: Wed Nov 2 08:52:42 2022 -0700 drm/meson: Fix return type of meson_encoder_cvbs_mode_valid() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/gpu/drm/meson/meson_encoder_cvbs.c:211:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_bridge *, const struct drm_display_info *, const struct drm_display_mode *)' with an expression of type 'int (struct drm_bridge *, const struct drm_display_info *, const struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict] .mode_valid = meson_encoder_cvbs_mode_valid, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ->mode_valid() in 'struct drm_bridge_funcs' expects a return type of 'enum drm_mode_status', not 'int'. Adjust the return type of meson_encoder_cvbs_mode_valid() to match the prototype's to resolve the warning and CFI failure. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Reported-by: Sami Tolvanen Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221102155242.1927166-1-nathan@kernel.org drivers/gpu/drm/meson/meson_encoder_cvbs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 598d2982b11144e44a5beb5cb6fd899873b394e3 Author: Ilya Maximets Date: Mon Oct 31 18:39:53 2022 +0100 net: tun: bump the link speed from 10Mbps to 10Gbps The 10Mbps link speed was set in 2004 when the ethtool interface was initially added to the tun driver. It might have been a good assumption 18 years ago, but CPUs and network stack came a long way since then. Other virtual ports typically report much higher speeds. For example, veth reports 10Gbps since its introduction in 2007. Some userspace applications rely on the current link speed in certain situations. For example, Open vSwitch is using link speed as an upper bound for QoS configuration if user didn't specify the maximum rate. Advertised 10Mbps doesn't match reality in a modern world, so users have to always manually override the value with something more sensible to avoid configuration issues, e.g. limiting the traffic too much. This also creates additional confusion among users. Bump the advertised speed to at least match the veth. Alternative might be to explicitly report UNKNOWN and let the user decide on a right value for them. And it is indeed "the right way" of fixing the problem. However, that may cause issues with bonding or with some userspace applications that may rely on speed value to be reported (even though they should not). Just changing the speed value should be a safer option. Users can still override the speed with ethtool, if necessary. RFC discussion is linked below. Link: https://lore.kernel.org/lkml/20221021114921.3705550-1-i.maximets@ovn.org/ Link: https://mail.openvswitch.org/pipermail/ovs-discuss/2022-July/051958.html Signed-off-by: Ilya Maximets Reviewed-by: Nicolas Dichtel Link: https://lore.kernel.org/r/20221031173953.614577-1-i.maximets@ovn.org Signed-off-by: Paolo Abeni drivers/net/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f956e9a2c9bdb22ac50c8b7656e2ea29c2e656c Author: Gwan-gyeong Mun Date: Sat Oct 29 07:42:30 2022 +0300 drm/i915/hwmon: Fix a build error used with clang compiler Use REG_FIELD_PREP() and a constant value for hwm_field_scale_and_write() If the first argument of FIELD_PREP() is not a compile-time constant value or unsigned long long type, this routine of the __BF_FIELD_CHECK() macro used internally by the FIELD_PREP() macro always returns false. BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) > \ __bf_cast_unsigned(_reg, ~0ull), \ _pfx "type of reg too small for mask"); \ And it returns a build error by the option among the clang compilation options. [-Werror,-Wtautological-constant-out-of-range-compare] Reported build error while using clang compiler: drivers/gpu/drm/i915/i915_hwmon.c:115:16: error: result of comparison of constant 18446744073709551615 with expression of type 'typeof (_Generic((field_msk), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, short: (unsigned short)0, unsigned int: (unsigned int)0, int: (unsigned int)0, unsigned long: (unsigned long)0, long: (unsigned long)0, unsigned long long: (unsigned long long)0, long long: (unsigned long long)0, default: (field_msk)))' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] bits_to_set = FIELD_PREP(field_msk, nval); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP' __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/bitfield.h:71:53: note: expanded from macro '__BF_FIELD_CHECK' BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) > \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ./include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG' ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ ./include/linux/compiler_types.h:357:22: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/compiler_types.h:345:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/compiler_types.h:337:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ v2: Use REG_FIELD_PREP() macro instead of FIELD_PREP() (Jani) Fixes: 99f55efb7911 ("drm/i915/hwmon: Power PL1 limit and TDP setting") Cc: Ashutosh Dixit Cc: Anshuman Gupta Cc: Andi Shyti Cc: Jani Nikula Signed-off-by: Gwan-gyeong Mun Reviewed-by: Ashutosh Dixit Acked-by: Jani Nikula [Joonas: Wrapped commit message error line length to be more reasonable] Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20221029044230.32128-1-gwan-gyeong.mun@intel.com drivers/gpu/drm/i915/i915_hwmon.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 5b52aebef8954cadff29918bb61d7fdc7be07837 Author: Christian Brauner Date: Thu Nov 3 08:18:46 2022 +0100 ovl: call posix_acl_release() after error checking The current placement of posix_acl_release() in ovl_set_or_remove_acl() means it can be called on an error pointer instead of actual acls. Fix this by moving the posix_acl_release() call after the error handling. Fixes: 0e641857322f ("ovl: implement set acl method") # mainline only Reported-by: syzbot+3f6ef1c4586bb6fd1f61@syzkaller.appspotmail.com Signed-off-by: Christian Brauner (Microsoft) fs/overlayfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5bad300e46c5bd0c5cf0a89c74116fbbf608a8c Author: Matt Ranostay Date: Mon Oct 24 08:16:48 2022 -0700 arm64: dts: ti: Rename clock-names adc_tsc_fck to fck Avoid the following warnings from dt-schema by just renaming the clock-names string from adc_tsc_fck to fck so it matches the values in ti,am3359-tscadc.yaml tscadc@40200000: clock-names:0: 'fck' was expected Signed-off-by: Matt Ranostay Signed-off-by: Nishanth Menon Tested-by: Judith Mendez Reviewed-by: Dhruva Gole Link: https://lore.kernel.org/r/20221024151648.394623-1-mranostay@ti.com arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit c07f216a8b72bac0c6e921793ad656a3b77f3545 Author: Peter Ujfalusi Date: Sat Oct 29 10:53:56 2022 +0300 soc: ti: k3-ringacc: Allow the driver to be built as module The ring accelerator driver can be built as module since all depending functions are exported. Signed-off-by: Peter Ujfalusi Signed-off-by: Nishanth Menon Tested-by: Nicolas Frayer Reviewed-by: Nicolas Frayer Link: https://lore.kernel.org/r/20221029075356.7296-1-peter.ujfalusi@gmail.com drivers/soc/ti/Kconfig | 2 +- drivers/soc/ti/k3-ringacc.c | 28 ++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) commit 93c1592889fca46d09d833455628bab05516cdbf Author: Jeff Johnson Date: Wed Sep 14 17:23:03 2022 -0700 wifi: ath11k: Make QMI message rules const Commit ff6d365898d4 ("soc: qcom: qmi: use const for struct qmi_elem_info") allows QMI message encoding/decoding rules to be const, so do that for ath11k. Compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220915002303.12206-1-quic_jjohnson@quicinc.com drivers/net/wireless/ath/ath11k/qmi.c | 72 +++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) commit 11e1fcf2b494da810d551553c46f739e36501adc Author: Jeff Johnson Date: Wed Sep 14 17:26:12 2022 -0700 wifi: ath10k: Make QMI message rules const Commit ff6d365898d4 ("soc: qcom: qmi: use const for struct qmi_elem_info") allows QMI message encoding/decoding rules to be const, so do that for ath10k. Compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220915002612.13394-1-quic_jjohnson@quicinc.com drivers/net/wireless/ath/ath10k/qmi.c | 2 +- drivers/net/wireless/ath/ath10k/qmi_wlfw_v01.c | 126 ++++++++++++------------- drivers/net/wireless/ath/ath10k/qmi_wlfw_v01.h | 102 ++++++++++---------- 3 files changed, 115 insertions(+), 115 deletions(-) commit d3a4706339da26633316357efe7ab9a92ff29b2a Merge: 3319dbb3e755 386b4174827c Author: Jakub Kicinski Date: Wed Nov 2 20:45:26 2022 -0700 Merge branch 'rocker-two-small-changes' Ido Schimmel says: ==================== rocker: Two small changes Patch #1 avoids allocating and scheduling a work item when it is not doing any work. Patch #2 aligns rocker with other switchdev drivers to explicitly mark FDB entries as offloaded. Needed for upcoming MAB offload [1]. [1] https://lore.kernel.org/netdev/20221025100024.1287157-1-idosch@nvidia.com/ ==================== Link: https://lore.kernel.org/r/20221101123936.1900453-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit 386b4174827ce0c7ecc789a6c8bf98e994dc2dee Author: Ido Schimmel Date: Tue Nov 1 14:39:36 2022 +0200 rocker: Explicitly mark learned FDB entries as offloaded Currently, FDB entries that are notified to the bridge driver via 'SWITCHDEV_FDB_ADD_TO_BRIDGE' are always marked as offloaded by the bridge. With MAB enabled, this will no longer be universally true. Device drivers will report locked FDB entries to the bridge to let it know that the corresponding hosts required authorization, but it does not mean that these entries are necessarily programmed in the underlying hardware. We would like to solve it by having the bridge driver determine the offload indication based of the 'offloaded' bit in the FDB notification [1]. Prepare for that change by having rocker explicitly mark learned FDB entries as offloaded. This is consistent with all the other switchdev drivers. [1] https://lore.kernel.org/netdev/20221025100024.1287157-4-idosch@nvidia.com/ Signed-off-by: Ido Schimmel Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/ethernet/rocker/rocker_ofdpa.c | 1 + 1 file changed, 1 insertion(+) commit 42e51de97cb449aa7d2aa1638cb5fcd2695b8f98 Author: Ido Schimmel Date: Tue Nov 1 14:39:35 2022 +0200 rocker: Avoid unnecessary scheduling of work item The work item function ofdpa_port_fdb_learn_work() does not do anything when 'OFDPA_OP_FLAG_LEARNED' is not set in the work item's flags. Therefore, do not allocate and do not schedule the work item when the flag is not set. Suggested-by: Vladimir Oltean Signed-off-by: Ido Schimmel Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski drivers/net/ethernet/rocker/rocker_ofdpa.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3319dbb3e755398f254c3daa04b9030197137efe Author: Jiri Slaby (SUSE) Date: Mon Oct 31 12:44:40 2022 +0100 sfc (gcc13): synchronize ef100_enqueue_skb()'s return type ef100_enqueue_skb() generates a valid warning with gcc-13: drivers/net/ethernet/sfc/ef100_tx.c:370:5: error: conflicting types for 'ef100_enqueue_skb' due to enum/integer mismatch; have 'int(struct efx_tx_queue *, struct sk_buff *)' drivers/net/ethernet/sfc/ef100_tx.h:25:13: note: previous declaration of 'ef100_enqueue_skb' with type 'netdev_tx_t(struct efx_tx_queue *, struct sk_buff *)' I.e. the type of the ef100_enqueue_skb()'s return value in the declaration is int, while the definition spells enum netdev_tx_t. Synchronize them to the latter. Cc: Martin Liska Cc: Edward Cree Cc: Martin Habets Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221031114440.10461-1-jirislaby@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/ef100_tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 777fa87c7682228e155cf0892ba61cb2ab1fe3ae Author: Jiri Slaby (SUSE) Date: Mon Oct 31 12:44:09 2022 +0100 bonding (gcc13): synchronize bond_{a,t}lb_xmit() types Both bond_alb_xmit() and bond_tlb_xmit() produce a valid warning with gcc-13: drivers/net/bonding/bond_alb.c:1409:13: error: conflicting types for 'bond_tlb_xmit' due to enum/integer mismatch; have 'netdev_tx_t(struct sk_buff *, struct net_device *)' ... include/net/bond_alb.h:160:5: note: previous declaration of 'bond_tlb_xmit' with type 'int(struct sk_buff *, struct net_device *)' drivers/net/bonding/bond_alb.c:1523:13: error: conflicting types for 'bond_alb_xmit' due to enum/integer mismatch; have 'netdev_tx_t(struct sk_buff *, struct net_device *)' ... include/net/bond_alb.h:159:5: note: previous declaration of 'bond_alb_xmit' with type 'int(struct sk_buff *, struct net_device *)' I.e. the return type of the declaration is int, while the definitions spell netdev_tx_t. Synchronize both of them to the latter. Cc: Martin Liska Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221031114409.10417-1-jirislaby@kernel.org Signed-off-by: Jakub Kicinski include/net/bond_alb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d84118229bf7f7290438c85caa8e49de52d50c1 Author: Jiri Slaby (SUSE) Date: Mon Oct 31 12:43:54 2022 +0100 qed (gcc13): use u16 for fid to be big enough gcc 13 correctly reports overflow in qed_grc_dump_addr_range(): In file included from drivers/net/ethernet/qlogic/qed/qed.h:23, from drivers/net/ethernet/qlogic/qed/qed_debug.c:10: drivers/net/ethernet/qlogic/qed/qed_debug.c: In function 'qed_grc_dump_addr_range': include/linux/qed/qed_if.h:1217:9: error: overflow in conversion from 'int' to 'u8' {aka 'unsigned char'} changes value from '(int)vf_id << 8 | 128' to '128' [-Werror=overflow] We do: u8 fid; ... fid = vf_id << 8 | 128; Since fid is 16bit (and the stored value above too), fid should be u16, not u8. Fix that. Cc: Martin Liska Cc: Ariel Elior Cc: Manish Chopra Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221031114354.10398-1-jirislaby@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/qlogic/qed/qed_debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 471ef777ec79baadc5cd9773d08f95f49cf5e2b1 Author: Rafał Miłecki Date: Mon Oct 31 11:48:56 2022 +0100 net: broadcom: bcm4908_enet: report queued and transmitted bytes This allows BQL to operate avoiding buffer bloat and reducing latency. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20221031104856.32388-1-zajec5@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bcm4908_enet.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2cee6401c4eaa562abc1d437d5d03e80bbee79c1 Author: Suman Ghosh Date: Mon Oct 31 14:38:56 2022 +0530 octeontx2-af: Allow mkex profile without DMAC and add L2M/L2B header extraction support 1. It is possible to have custom mkex profiles which do not extract DMAC at all into the key. Hence allow mkex profiles which do not have DMAC to be loaded into MCAM hardware. This patch also adds debugging prints needed to identify profiles with wrong configuration. 2. If a mkex profile set "l2l3mb" field for Rx interface, then Rx multicast and broadcast entry should be configured. Signed-off-by: Suman Ghosh Link: https://lore.kernel.org/r/20221031090856.1404303-1-sumang@marvell.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeontx2/af/npc.h | 1 + .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 6 ++ .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 81 +++++++++++++++++----- 3 files changed, 70 insertions(+), 18 deletions(-) commit 15730dc45dc7432713c7af9ee5abad76872f6405 Author: Ilpo Järvinen Date: Wed Oct 19 13:55:04 2022 +0300 tty: Cleanup tty buffer align mask Don't use decimal for mask. Don't use literal for aligning. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019105504.16800-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa31528a214701e3afb3997f1c2c2b7290e1d05c Author: Geert Uytterhoeven Date: Fri Oct 21 16:02:16 2022 +0200 dt-bindings: serial: renesas,scif: Document r8a779g0 support Document support for the Serial Communication Interface with FIFO (SCIF) in the Renesas R-Car V4H (R8A779G0) SoC. Reviewed-by: Wolfram Sang Acked-by: Krzysztof Kozlowski Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/8a2d04651f04a97d652395b4d933af5c3c8d5b5b.1666360789.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/renesas,scif.yaml | 1 + 1 file changed, 1 insertion(+) commit cc72a1eea5e3f712ab4d59615bf1d4479cee16fc Author: ruanjinjie Date: Wed Oct 19 14:44:12 2022 +0800 tty: hvc: make hvc_rtas_dev static The symbol is not used outside of the file, so mark it static. Fixes the following warning: drivers/tty/hvc/hvc_rtas.c:29:19: warning: symbol 'hvc_rtas_dev' was not declared. Should it be static? Reviewed-by: Jiri Slaby Signed-off-by: ruanjinjie Link: https://lore.kernel.org/r/20221019064412.3759874-1-ruanjinjie@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/tty/hvc/hvc_rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cfc64f3f0e1c1136b1a8247e53dc24c54f0bf93 Author: Andy Shevchenko Date: Mon Oct 17 20:16:33 2022 +0300 serial: 8250_core: Use str_enabled_disabled() helper Use str_enabled_disabled() helper instead of open coding the same. Reviewed-by: Ilpo Järvinen Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221017171633.65275-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 79d0224f6bf296d04cd843cfc49921b19c97bb09 Author: Marek Vasut Date: Thu Sep 29 16:44:00 2022 +0200 tty: serial: imx: Handle RS485 DE signal active high The default polarity of RS485 DE signal is active high. This driver does not handle such case properly. Currently, when a pin is multiplexed as a UART CTS_B on boot, this pin is pulled HIGH by the i.MX UART CTS circuit, which activates DE signal on the RS485 transceiver and thus behave as if the RS485 was transmitting data, so the system blocks the RS485 bus when it starts and until user application takes over. This behavior is not OK. The problem consists of two separate parts. First, the i.MX UART IP requires UCR1 UARTEN and UCR2 RXEN to be set for UCR2 CTSC and CTS bits to have any effect. The UCR2 CTSC bit permits the driver to set CTS (RTS_B or RS485 DE signal) to either level sychronous to the internal UART IP clock. Compared to other options, like GPIO CTS control, this has the benefit of being synchronous to the UART IP clock and thus without glitches or bus delays. The reason for the CTS design is likely because when the Receiver is disabled, the UART IP can never indicate that it is ready to receive data by assering CTS signal, so the CTS is always pulled HIGH by default. When the port is closed by user space, imx_uart_stop_rx() clears UCR2 RXEN bit, and imx_uart_shutdown() clears UCR1 UARTEN bit. This disables UART Receiver and UART itself, and forces CTS signal HIGH, which leads to the RS485 bus being blocked because RS485 DE is incorrectly active. The proposed solution for this problem is to keep the Receiver running even after the port is closed, but in loopback mode. This disconnects the RX FIFO input from the RXD external signal, and since UCR2 TXEN is cleared, the UART Transmitter is disabled, so nothing can feed data in the RX FIFO. Because the Receiver is still enabled, the UCR2 CTSC and CTS bits still have effect and the CTS (RS485 DE) control is retained. Note that in case of RS485 DE signal active low, there is no problem and no special handling is necessary. The CTS signal defaults to HIGH, thus the RS485 is by default set to Receive and the bus is not blocked. Note that while there is the possibility to control CTS using GPIO with either CTS polarity, this has the downside of not being synchronous to the UART IP clock and thus glitchy and susceptible to slow DE switching. Second, on boot, before the UART driver probe callback is called, the driver core triggers pinctrl_init_done() and configures the IOMUXC to default state. At this point, UCR1 UARTEN and UCR2 RXEN are both still cleared, but UART CTS_B (RS485 DE) is configured as CTS function, thus the RTS signal is pulled HIGH by the UART IP CTS circuit. One part of the solution here is to enable UCR1 UARTEN and UCR2 RXEN and UTS loopback in this driver probe callback, thus unblocking the CTSC and CTS control early on. But this is still too late, since the pin control is already configured and CTS has been pulled HIGH for a short period of time. When Linux kernel boots and this driver is bound, the pin control is set to special "init" state if the state is available, and driver can switch the "default" state afterward when ready. This state can be used to set the CTS line as a GPIO in DT temporarily, and a GPIO hog can force such GPIO to LOW, thus keeping the RS485 DE line LOW early on boot. Once the driver takes over and UCR1 UARTEN and UCR2 RXEN and UTS loopback are all enabled, the driver can switch to "default" pin control state and control the CTS line as function instead. DT binding example is below: " &gpio6 { rts-init-hog { gpio-hog; gpios = <5 0>; output-low; line-name = "rs485-de"; }; }; &uart5 { /* DHCOM UART2 */ pinctrl-0 = <&pinctrl_uart5>; pinctrl-1 = <&pinctrl_uart5_init>; pinctrl-names = "default", "init"; ... }; pinctrl_uart5_init: uart5-init-grp { fsl,pins = < ... MX6QDL_PAD_CSI0_DAT19__GPIO6_IO05 0x30b1 >; }; pinctrl_uart5: uart5-grp { fsl,pins = < ... MX6QDL_PAD_CSI0_DAT19__UART5_CTS_B 0x30b1 >; }; " Tested-by: Christoph Niedermaier Reviewed-by: Fabio Estevam Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20220929144400.13571-1-marex@denx.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 64 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 6 deletions(-) commit e9c29d80278c0f5c6198ac741b10a534672042ca Author: Siarhei Volkau Date: Mon Oct 31 21:40:40 2022 +0300 serial: 8250/ingenic: Add support for the JZ4750/JZ4755 JZ4750/55/60 (but not JZ4760b) have an optional /2 divider between the EXT oscillator and some peripherals including UART, which will be enabled if using a 24 MHz oscillator, and disabled when using a 12 MHz oscillator. This behavior relies on hardware differences: most boards (if not all) with those SoCs have 12 or 24 MHz oscillators but many peripherals want 12Mhz to operate properly (AIC and USB-PHY at least). The 16MHz threshold looks arbitrary but used in vendor's bootloader code for enable the divider. The patch doesn't affect JZ4760's behavior as it is subject for another patchset with re-classification of all supported ingenic UARTs. Link: https://github.com/carlos-wong/uboot_jz4755/blob/master/cpu/mips/jz_serial.c#L158 Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221031184041.1338129-3-lis8215@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_ingenic.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) commit 0c3c184c5218d9209fcb8ee151074bc629bd4024 Author: Siarhei Volkau Date: Mon Oct 31 21:40:39 2022 +0300 dt-bindings: serial: ingenic: Add support for the JZ4750/55 SoCs These SoCs UART block are the same as JZ4725b' one, the difference is outside of the block - it is in the clock generation unit (CGU). The difference requires to make a quirk for early console init. Acked-by: Krzysztof Kozlowski Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221031184041.1338129-2-lis8215@gmail.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/ingenic,uart.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 7b1c56e08a45693ce6f708a4ee499e44c4fb9ca5 Author: Ilpo Järvinen Date: Wed Oct 19 12:33:43 2022 +0300 Documentation: Make formatting consistent for rs485 docs Tweak styling of names that come directly from the code. Suggested-by: Bagas Sanjaya Reviewed-by: Bagas Sanjaya Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019093343.9546-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/serial-rs485.rst | 37 ++++++++++++------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 891e999394f56b52ed81b9ebcb7fe0bf050a3157 Author: Ilpo Järvinen Date: Wed Oct 19 12:33:42 2022 +0300 Documentation: rs485: Fix struct referencing Use "struct serial_rs485" to get the references properly recognized. Reviewed-by: Andy Shevchenko Reviewed-by: Bagas Sanjaya Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019093343.9546-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/serial-rs485.rst | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 0f4648a1a6d36487e4134a4fd75d8cdae0cd6bf4 Author: Ilpo Järvinen Date: Wed Oct 19 12:33:41 2022 +0300 Documentation: rs485: Mention uart_get_rs485_mode() Add to rs485 documentation that serial core prepares the struct serial_rs485 when uart_get_rs485_mode() is called. Remove the wrong claim that the driver must fill it by itself. Reviewed-by: Andy Shevchenko Reviewed-by: Bagas Sanjaya Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019093343.9546-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/serial-rs485.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 851453abc8e9cfe92bbf8fdf07ee024ec372f09d Author: Ilpo Järvinen Date: Wed Oct 19 12:33:40 2022 +0300 Documentation: rs485: Link reference properly Link DT bindings reference properly. Reviewed-by: Andy Shevchenko Reviewed-by: Bagas Sanjaya Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019093343.9546-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/serial-rs485.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6dd07781b4cdd38103c81ddcc88fa4e8a31ebf71 Author: Ilpo Järvinen Date: Wed Oct 19 12:33:39 2022 +0300 serial: Convert serial_rs485 to kernel doc Convert struct serial_rs485 comments to kernel doc format and include it into documentation. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Bagas Sanjaya Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019093343.9546-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/serial-rs485.rst | 13 +++--- include/uapi/linux/serial.h | 55 ++++++++++++++++-------- 2 files changed, 43 insertions(+), 25 deletions(-) commit 109a951a9f1fd8a34ebd1896cbbd5d5cede880a7 Author: Kartik Date: Tue Oct 18 20:28:06 2022 +0530 serial: tegra: Read DMA status before terminating Read the DMA status before terminating the DMA, as doing so deletes the DMA desc. Also, to get the correct transfer status information, pause the DMA using dmaengine_pause() before reading the DMA status. Fixes: e9ea096dd225 ("serial: tegra: add serial driver") Reviewed-by: Jon Hunter Reviewed-by: Ilpo Järvinen Acked-by: Thierry Reding Signed-off-by: Akhil R Signed-off-by: Kartik Link: https://lore.kernel.org/r/1666105086-17326-1-git-send-email-kkartik@nvidia.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial-tegra.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c2087b37d10404220d06f4503ef165ab7835b246 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:51 2022 +0300 serial: zs: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-45-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/zs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit edc62b17ed9f6db3de3521793e4689e15aad4625 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:50 2022 +0300 serial: xuartps: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-44-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 41e804c4dec667e64c9204e13862cf634df794a4 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:49 2022 +0300 serial: ucc_uart: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-43-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/ucc_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 852322ff4f2be566b0165a1f9c2adfcc0a86f8b6 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:48 2022 +0300 serial: uartlite: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-42-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/uartlite.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b421cbb2f33c7692aa209ce2781647919a1265b6 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:47 2022 +0300 serial: timbuart: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-41-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/timbuart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 81eb6227afea551fbfcb7958bdfcd70b6e5419f4 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:46 2022 +0300 serial: sunzilog: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-40-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sunzilog.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7f20ab70940e121c9af3f4ca013f38c762ef19e6 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:45 2022 +0300 serial: sunsu: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-39-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sunsu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5aaae464d6de0913a962d4f9412986a528b0acf7 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:44 2022 +0300 serial: sunsab: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-38-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sunsab.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 54ffabbe2203817d1d70ceb97407a4382633d2e5 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:43 2022 +0300 serial: sunplus-uart: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-37-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sunplus-uart.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c5fd4b7d7e58e20b05b5d24eddab70567ec7a724 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:42 2022 +0300 serial: sunhv: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-36-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sunhv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 29d8c07b49578cc58f48fdea361c1f419515076c Author: Ilpo Järvinen Date: Wed Oct 19 12:11:41 2022 +0300 serial: stm32: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-35-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b92df54ccf7355256e4eebe2f36dc2b83808e9ce Author: Ilpo Järvinen Date: Wed Oct 19 12:11:40 2022 +0300 serial: sprd: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Reviewed-by: Baolin Wang Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-34-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sprd_serial.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e234ef0ef1dec33384968c695f0c2c751b0621ed Author: Ilpo Järvinen Date: Wed Oct 19 12:11:39 2022 +0300 serial: sh-sci: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-33-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b7e2647671a2e7eb8d5dd1cb73464d7d760f6139 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:38 2022 +0300 serial: tegra: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Reviewed-by: Thierry Reding Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-32-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial-tegra.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3ea03c021dcceac88bbb38f7b67bc08d23c80c84 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:37 2022 +0300 serial: sccnxp: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-31-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sccnxp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 10b459d2c3da954286e1fcc3ce33ec42d0ea5126 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:36 2022 +0300 serial: sb1250-duart: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-30-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sb1250-duart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ec04d75fe4386c7e5eafb72367e962f56694d490 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:35 2022 +0300 serial: samsung_tty: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Reviewed-by: Sam Protsenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-29-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung_tty.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 3d4d838423a56a3c18174d194508e728ce9fe6af Author: Ilpo Järvinen Date: Wed Oct 19 12:11:34 2022 +0300 serial: rda: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-28-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/rda-uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b31b07a7d21a10f5068b92563c8037a8c2b15f1d Author: Ilpo Järvinen Date: Wed Oct 19 12:11:33 2022 +0300 serial: pmac_zilog: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-27-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pmac_zilog.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 98fdebeebbad98393d691aaa092e3c7889e5cbbd Author: Ilpo Järvinen Date: Wed Oct 19 12:11:32 2022 +0300 serial: pic32: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-26-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pic32_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 269599fa886f63dc425857f4672e1d0c8df2a5f3 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:31 2022 +0300 serial: mvebu-uart: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Reviewed-by: Pali Rohár Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-25-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5c664457a9373394eab65f1459ad55c36e147c94 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:30 2022 +0300 serial: milbeaut_usio: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-24-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/milbeaut_usio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 681ef4219bee73139c713226d90bd068d0bd9b89 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:29 2022 +0300 serial: meson: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Acked-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-23-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/meson_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d41727dbdfcbb25bf6e30ddcbe330bb9e7b9fcbd Author: Ilpo Järvinen Date: Wed Oct 19 12:11:28 2022 +0300 serial: max310x: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-22-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 502b13cc5aa2c9b2b2a802a7d473734439dc09b2 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:27 2022 +0300 serial: max3100: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-21-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max3100.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 53c3d62f46872fd7bb177a9181291e58edcc3cf4 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:26 2022 +0300 serial: liteuart: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Acked-by: Gabriel Somlo Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-20-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/liteuart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit daf63432f4626e4cf97dac0cf12c7969617ff1a2 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:25 2022 +0300 serial: ip22zilog: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-19-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/ip22zilog.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 26e8f1d9a88144b35b35ce3b9df2d437d8cb2ed8 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:24 2022 +0300 serial: imx: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Reviewed-by: Uwe Kleine-König Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-18-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit cacf7f689b9b783d1efaf4b545d8038ee6edc73e Author: Ilpo Järvinen Date: Wed Oct 19 12:11:23 2022 +0300 serial: fsl_lpuart: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-17-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7840a92a3e7d7f78bdc16b75c62101bc240bfa93 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:22 2022 +0300 serial: linflexuart: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-16-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_linflexuart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cb867f542e2a895e9f2bdcd846f1241b51e3cc2d Author: Ilpo Järvinen Date: Wed Oct 19 12:11:21 2022 +0300 serial: digicolor: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Acked-by: Baruch Siach Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-15-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/digicolor-usart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f8097f0caaf2188e8e4e552116cbd8d5f7746f8a Author: Ilpo Järvinen Date: Wed Oct 19 12:11:20 2022 +0300 serial: cpm_uart: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-14-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/cpm_uart/cpm_uart_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4146765cae90bac4643e2225a49670da3749311f Author: Ilpo Järvinen Date: Wed Oct 19 12:11:19 2022 +0300 serial: clps711x: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-13-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/clps711x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit add147a4591e20732c3f51ed63414d9e89757e5f Author: Ilpo Järvinen Date: Wed Oct 19 12:11:18 2022 +0300 serial: atmel: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Reviewed-by: Claudiu Beznea Acked-By: Richard GENOUD Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-12-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 8a8dee2cdbb3d147430684d408127e5c9e910fc0 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:17 2022 +0300 serial: arc: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-11-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/arc_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d29d947c14d1704d567db3025a293c4ee54cd90c Author: Ilpo Järvinen Date: Wed Oct 19 12:11:16 2022 +0300 serial: ar933x: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-10-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/ar933x_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 71a67573d0ede98f9c5f6466da6f6a7d7663498b Author: Ilpo Järvinen Date: Wed Oct 19 12:11:15 2022 +0300 serial: pl011: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-9-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 051ef7c8d81ff25b843afb661776e0a77a4f9374 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:14 2022 +0300 serial: 8250: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-8-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fc59f80b087447a198274e8b3adf2b8ddcecb561 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:13 2022 +0300 serial: 8250_bcm7271: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_bcm7271.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a2a74303b3085109b27160a49e61d4d067acfae7 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:12 2022 +0300 serial: sc16is7xx: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sc16is7xx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a5c9611ddc51b846dd699c3ce2a6bcbfa544ef20 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:11 2022 +0300 serial: pch_uart: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pch_uart.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 1fcff75f3932bdc5ef923bbe8e973d1f3ed59096 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:10 2022 +0300 serial: msm: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/msm_serial.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 20b01af85291b8e25133ab22399f2de6bbad861e Author: Ilpo Järvinen Date: Wed Oct 19 12:11:09 2022 +0300 serial: men_z135_uart: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/men_z135_uart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f4000a06f40f6008c9cd8092c30ed3ffb62a1587 Author: Ilpo Järvinen Date: Wed Oct 19 12:11:08 2022 +0300 serial: dz: Use uart_xmit_advance() Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221019091151.6692-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/dz.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 801954d1210a89b767176e1e34cf5976f41ca6d3 Author: Lukas Wunner Date: Sun Oct 16 10:02:00 2022 +0200 serial: 8250: 8250_omap: Support native RS485 Recent TI Sitara SoCs such as AM64/AM65 have gained the ability to automatically assert RTS when data is transmitted, obviating the need to emulate this functionality in software. The feature is controlled through new DIR_EN and DIR_POL bits in the Mode Definition Register 3. For details see page 8783 and 8890 of the AM65 TRM: https://www.ti.com/lit/ug/spruid7e/spruid7e.pdf Cc: Ilpo Järvinen Cc: Su Bao Cheng Cc: Vignesh Raghavendra Cc: Jan Kiszka Cc: Bin Liu Tested-by: Zeng Chao Reviewed-by: Ilpo Järvinen Signed-off-by: Lukas Wunner Link: https://lore.kernel.org/r/e9f25f5c9200a35d3162973c2b45d6b892cc9bf2.1665906869.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_omap.c | 85 +++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 3 deletions(-) commit 35781d8356a2eecaa6074ceeb80ee22e252fcdae Author: Aniket Randive Date: Fri Oct 7 11:53:00 2022 +0530 tty: serial: qcom-geni-serial: Add support for Hibernation feature Added changes to support the hibernation feature for serial UART. Added support for freeze, restore and thaw callbacks to put the device into hibernation. Signed-off-by: Aniket Randive Link: https://lore.kernel.org/r/1665123780-20557-1-git-send-email-quic_arandive@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/qcom_geni_serial.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit d11cc8c3c4b65e00e01f20a920c5fa412415204a Author: Jiri Slaby (SUSE) Date: Tue Oct 4 12:49:27 2022 +0200 tty: serial: use uart_port_tx_limited() uart_port_tx_limited() is a new helper to send characters to the device. Use it in these drivers. mux.c also needs to define tx_done(). But I'm not sure if the driver really wants to wait for all the characters to dismiss from the HW fifo at this code point. Hence I marked this as FIXME. Cc: Russell King Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: "Pali Rohár" Cc: Kevin Cernekee Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Cc: Patrice Chotard Cc: linux-riscv@lists.infradead.org Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221004104927.14361-4-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/21285.c | 32 ++++-------------------- drivers/tty/serial/altera_jtaguart.c | 36 ++++++--------------------- drivers/tty/serial/amba-pl010.c | 32 ++++-------------------- drivers/tty/serial/apbuart.c | 34 ++++--------------------- drivers/tty/serial/bcm63xx_uart.c | 47 +++++++---------------------------- drivers/tty/serial/mux.c | 45 ++++++++++----------------------- drivers/tty/serial/mvebu-uart.c | 38 ++++------------------------ drivers/tty/serial/omap-serial.c | 32 ++++-------------------- drivers/tty/serial/pxa.c | 33 ++++--------------------- drivers/tty/serial/rp2.c | 31 +++++------------------ drivers/tty/serial/serial_txx9.c | 32 ++++-------------------- drivers/tty/serial/sifive.c | 31 ++++------------------- drivers/tty/serial/sprd_serial.c | 33 ++++--------------------- drivers/tty/serial/st-asc.c | 48 ++++-------------------------------- 14 files changed, 85 insertions(+), 419 deletions(-) commit 2d141e683e9ac7041c0350bb7b5e31f5f02ddbe3 Author: Jiri Slaby (SUSE) Date: Tue Oct 4 12:49:26 2022 +0200 tty: serial: use uart_port_tx() helper uart_port_tx() is a new helper to send characters to the device. Use it in these drivers. Cc: Tobias Klauser Cc: Richard Genoud Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Cc: Vladimir Zapolskiy Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: "Andreas Färber" Cc: Manivannan Sadhasivam Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221004104927.14361-3-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_uart.c | 29 +++++----------------------- drivers/tty/serial/atmel_serial.c | 28 ++++++--------------------- drivers/tty/serial/fsl_lpuart.c | 30 +++++------------------------ drivers/tty/serial/lantiq.c | 36 ++++------------------------------- drivers/tty/serial/lpc32xx_hs.c | 33 ++++---------------------------- drivers/tty/serial/mcf.c | 34 ++++++++------------------------- drivers/tty/serial/mpc52xx_uart.c | 39 ++++---------------------------------- drivers/tty/serial/mps2-uart.c | 26 ++++--------------------- drivers/tty/serial/mxs-auart.c | 32 ++++++++----------------------- drivers/tty/serial/owl-uart.c | 32 ++++--------------------------- drivers/tty/serial/sa1100.c | 34 ++++----------------------------- drivers/tty/serial/vt8500_serial.c | 30 ++++------------------------- 12 files changed, 60 insertions(+), 323 deletions(-) commit 8275b48b278096edc1e3ea5aa9cf946a10022f79 Author: Jiri Slaby (SUSE) Date: Tue Oct 4 12:49:25 2022 +0200 tty: serial: introduce transmit helpers Many serial drivers do the same thing: * send x_char if set * keep sending from the xmit circular buffer until either - the loop reaches the end of the xmit buffer - TX is stopped - HW fifo is full * check for pending characters and: - wake up tty writers to fill for more data into xmit buffer - stop TX if there is nothing in the xmit buffer The only differences are: * how to write the character to the HW fifo * the check of the end condition: - is the HW fifo full? - is limit of the written characters reached? So unify the above into two helpers: * uart_port_tx_limited() -- it performs the above taking the written characters limit into account, and * uart_port_tx() -- the same as above, except it only checks the HW readiness, not the characters limit. The HW specific operations (as stated as "differences" above) are passed as arguments to the macros. They are: * tx_ready -- returns true if HW can accept more data. * put_char -- write a character to the device. * tx_done -- when the write loop is done, perform arbitrary action before potential invocation of ops->stop_tx() happens. Note that the above are macros. This means the code is generated in place and the above 3 arguments are "inlined". I.e. no added penalty by generating call instructions for every single character. Nor any indirect calls. (As in some previous versions of this patchset.) Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20221004104927.14361-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/serial/driver.rst | 3 ++ include/linux/serial_core.h | 80 ++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) commit 83efeeeb3d04b22aaed1df99bc70a48fe9d22c4d Author: Kees Cook Date: Sat Oct 22 11:29:49 2022 -0700 tty: Allow TIOCSTI to be disabled TIOCSTI continues its long history of being used in privilege escalation attacks[1]. Prior attempts to provide a mechanism to disable this have devolved into discussions around creating full-blown LSMs to provide arbitrary ioctl filtering, which is hugely over-engineered -- only TIOCSTI is being used this way. 3 years ago OpenBSD entirely removed TIOCSTI[2], Android has had it filtered for longer[3], and the tools that had historically used TIOCSTI either do not need it, are not commonly built with it, or have had its use removed. Provide a simple CONFIG and global sysctl to disable this for the system builders who have wanted this functionality for literally decades now, much like the ldisc_autoload CONFIG and sysctl. [1] https://lore.kernel.org/linux-hardening/Y0m9l52AKmw6Yxi1@hostpad [2] https://undeadly.org/cgi?action=article;sid=20170701132619 [3] https://lore.kernel.org/lkml/CAFJ0LnFGRuEEn1tCLhoki8ZyWrKfktbF+rwwN7WzyC_kBFoQVA@mail.gmail.com/ Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Simon Brand Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221022182949.2684794-2-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/tty/Kconfig | 19 +++++++++++++++++++ drivers/tty/tty_io.c | 11 +++++++++++ 2 files changed, 30 insertions(+) commit 5fd8c2d3de3dd3cc6d36a0c7a08e44cd5bf173e6 Author: Kees Cook Date: Sat Oct 22 11:29:48 2022 -0700 tty: Move sysctl setup into "core" tty logic In preparation for adding another sysctl to the tty subsystem, move the tty setup code into the "core" tty code, which contains tty_init() itself. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221022182949.2684794-1-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/tty/tty.h | 2 +- drivers/tty/tty_io.c | 34 ++++++++++++++++++++++++++++++++-- drivers/tty/tty_ldisc.c | 38 +------------------------------------- 3 files changed, 34 insertions(+), 40 deletions(-) commit 822ff993d33dc4bad2bbc05faf4b48790ec8195a Author: Dmitry Baryshkov Date: Wed Nov 2 20:54:49 2022 +0300 drm/msm: remove duplicated code from a6xx_create_address_space The function a6xx_create_address_space() is mostly a copy of adreno_iommu_create_address_space() with added quirk setting. Rework these two functions to be a thin wrappers around a common helper. Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/509614/ Link: https://lore.kernel.org/r/20221102175449.452283-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 28 +--------------------------- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 12 ++++++++++-- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 7 ++++++- 6 files changed, 20 insertions(+), 33 deletions(-) commit 3236130b5d2a2d868b8273d7e2fff4bbde4be813 Author: Dmitry Baryshkov Date: Wed Nov 2 20:54:48 2022 +0300 drm/msm: move domain allocation into msm_iommu_new() After the msm_iommu instance is created, the IOMMU domain is completely handled inside the msm_iommu code. Move the iommu_domain_alloc() call into the msm_iommu_new() to simplify callers code. Reported-by: kernel test robot Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/509615/ Link: https://lore.kernel.org/r/20221102175449.452283-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 12 +++++------- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 23 +++++++++++------------ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 25 +++++++++---------------- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 -- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 19 ++++++++++--------- drivers/gpu/drm/msm/msm_drv.c | 18 ++++++++---------- drivers/gpu/drm/msm/msm_iommu.c | 20 +++++++++++++++++--- drivers/gpu/drm/msm/msm_mmu.h | 3 ++- 8 files changed, 62 insertions(+), 60 deletions(-) commit f6cb1430bb32c1daec49fc9067a0bc2f03d02ed4 Author: Dmitry Baryshkov Date: Fri Aug 26 12:39:24 2022 +0300 drm/msm/hdmi: drop constant resource names from platform config All MSM HDMI devices use "core_physical" and "qfprom_physical" names for register areas. Drop them from the platform config. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/499646/ Link: https://lore.kernel.org/r/20220826093927.851597-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 9 +++------ drivers/gpu/drm/msm/hdmi/hdmi.h | 3 --- 2 files changed, 3 insertions(+), 9 deletions(-) commit b964444b2b64ce182495731d830499d1c588ccf6 Author: Dmitry Baryshkov Date: Fri Aug 26 12:39:23 2022 +0300 drm/msm/hdmi: use devres helper for runtime PM management Use devm_pm_runtime_enable() to enable runtime PM. This way its effect will be reverted on device unbind/destruction. Fixes: 6ed9ed484d04 ("drm/msm/hdmi: Set up runtime PM for HDMI") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/499647/ Link: https://lore.kernel.org/r/20220826093927.851597-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7423dbdbc9ecef7fff5239d144cad4b9887f4de Author: GUO Zihua Date: Wed Sep 21 20:58:04 2022 +0800 ima: Handle -ESTALE returned by ima_filter_rule_match() IMA relies on the blocking LSM policy notifier callback to update the LSM based IMA policy rules. When SELinux update its policies, IMA would be notified and starts updating all its lsm rules one-by-one. During this time, -ESTALE would be returned by ima_filter_rule_match() if it is called with a LSM rule that has not yet been updated. In ima_match_rules(), -ESTALE is not handled, and the LSM rule is considered a match, causing extra files to be measured by IMA. Fix it by re-initializing a temporary rule if -ESTALE is returned by ima_filter_rule_match(). The origin rule in the rule list would be updated by the LSM policy notifier callback. Fixes: b16942455193 ("ima: use the lsm policy update notifier") Signed-off-by: GUO Zihua Reviewed-by: Roberto Sassu Signed-off-by: Mimi Zohar security/integrity/ima/ima_policy.c | 41 +++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 9 deletions(-) commit d57378d3aa4d864d9e590482602068af1b20c0c5 Author: GUO Zihua Date: Wed Sep 21 20:58:03 2022 +0800 ima: Simplify ima_lsm_copy_rule Currently ima_lsm_copy_rule() set the arg_p field of the source rule to NULL, so that the source rule could be freed afterward. It does not make sense for this behavior to be inside a "copy" function. So move it outside and let the caller handle this field. ima_lsm_copy_rule() now produce a shallow copy of the original entry including args_p field. Meaning only the lsm.rule and the rule itself should be freed for the original rule. Thus, instead of calling ima_lsm_free_rule() which frees lsm.rule as well as args_p field, free the lsm.rule directly. Signed-off-by: GUO Zihua Reviewed-by: Roberto Sassu Signed-off-by: Mimi Zohar security/integrity/ima/ima_policy.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 11220db412edae8dba58853238f53258268bdb88 Author: Huaxin Lu Date: Thu Nov 3 00:09:49 2022 +0800 ima: Fix a potential NULL pointer access in ima_restore_measurement_list In restore_template_fmt, when kstrdup fails, a non-NULL value will still be returned, which causes a NULL pointer access in template_desc_init_fields. Fixes: c7d09367702e ("ima: support restoring multiple template formats") Cc: stable@kernel.org Co-developed-by: Jiaming Li Signed-off-by: Jiaming Li Signed-off-by: Huaxin Lu Reviewed-by: Stefan Berger Signed-off-by: Mimi Zohar security/integrity/ima/ima_template.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0aeec60c76ca2631696b4228f3fc99fe3a80013d Author: Niranjana Vishwanathapura Date: Tue Nov 1 22:14:16 2022 -0700 drm/i915: Do not set cache_dirty for DGFX Currently on DG1, which does not have LLC, we hit the below warning while rebinding an userptr invalidated object. WARNING: CPU: 4 PID: 13008 at drivers/gpu/drm/i915/gem/i915_gem_pages.c:34 __i915_gem_object_set_pages+0x296/0x2d0 [i915] ... RIP: 0010:__i915_gem_object_set_pages+0x296/0x2d0 [i915] ... Call Trace: i915_gem_userptr_get_pages+0x175/0x1a0 [i915] ____i915_gem_object_get_pages+0x32/0xb0 [i915] i915_gem_object_userptr_submit_init+0x286/0x470 [i915] eb_lookup_vmas+0x2ff/0xcf0 [i915] ? __intel_wakeref_get_first+0x55/0xb0 [i915] i915_gem_do_execbuffer+0x785/0x21d0 [i915] i915_gem_execbuffer2_ioctl+0xe7/0x3d0 [i915] We shouldn't be setting the obj->cache_dirty for DGFX, fix it. Fixes: d70af57944a1 ("drm/i915/shmem: ensure flush during swap-in on non-LLC") Suggested-by: Matthew Auld Reported-by: Niranjana Vishwanathapura Signed-off-by: Niranjana Vishwanathapura Acked-by: Nirmoy Das Reviewed-by: Matthew Auld Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221102051416.27327-1-niranjana.vishwanathapura@intel.com drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e549c7637a5a5c1900a55e8c407cec84c426998 Merge: 84582f9ed090 a11a5debdf4b Author: Arnd Bergmann Date: Wed Nov 2 22:04:17 2022 +0100 Merge tag 'memory-controller-drv-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v6.2 1. STM32 FMC2: a. Correct in bindings the name of property for address setup duration. The DTS and driver were already using proper name, so it is only alignment of bindings with real usage. b. Split off STM32 memory controller bus peripheral properties into generic ones (re-usable by multiple memory controllers) and STM32 bus peripheral. This way, the FMC2 controller properties in Micrel KSZ8851MLL ethernet controller node can be properly validated. 2. Tegra MC: simplify with DEFINE_SHOW_ATTRIBUTE. 3. Renesas RPC IF: add suppor tfor R-Car Gen4. 4. LPDDR bindings: refactor and extend with description of DDR channels. Add also bindings for LPDDR4 and LPDDR5. The rationale for (4) above - LPDDR bindings changes, wrote by Julius Werner: "We (Chromium OS) have been trying to find a way to pass LPDDR memory chip information that is available to the firmware through the FDT (mostly for userspace informational purposes, for now). We have been using and expanding the existing "jedec,lpddr2" and "jedec,lpddr3" bindings for this (e.g. [1]). The goal is to be able to identify the memory layout of the system (how the parts look like, how they're tied together, how much capacity there is in total) as accurately as possible from software-probed values. ... The problem with this is that each individual LPDDR chip has its own set of mode registers (per rank) that only describe the density of that particular chip (rank). The host memory controller may have multiple channels (each of which is basically an entirely separate set of physical LPDDR pins on the board), a single channel may be connected to multiple LPDDR chips (e.g. if the memory controller has an outgoing 32-bit channel, that channel could be tied to two 16-bit LPDDR chips by tying the low 16 bits to one and the high 16 bits to the other), and then each of those chips may offer multiple independent ranks (which rank is being accessed at a given time is controlled by a separate chip select pin). So if we just have one "io-width" and one "density" field in the FDT, there's no way to figure out how much memory there's actually connected in total, because that only describes a single LPDDR chip. Worse, there may be chips where different ranks have different densities (e.g. a 6GB dual-rank chip with one 4GB and one 2GB rank), and different channels could theoretically be connected to chips of completely different manufacturers." Link: https://lore.kernel.org/r/CAODwPW9E8wWwxbYKyf4_-JFb4F-JSmLR3qOF_iudjX0f9ndF0A@mail.gmail.com * tag 'memory-controller-drv-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: dt-bindings: memory-controller: st,stm32: Split off MC properties dt-bindings: memory: Add jedec,lpddrX-channel binding dt-bindings: memory: Add jedec,lpddr4 and jedec,lpddr5 bindings dt-bindings: memory: Add numeric LPDDR compatible string variant dt-bindings: memory: Factor out common properties of LPDDR bindings memory: renesas-rpc-if: Add support for R-Car Gen4 memory: renesas-rpc-if: Clear HS bit during hardware initialization dt-bindings: memory: renesas,rpc-if: Document R-Car V4H support memory: tegra186-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code memory: tegra210-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code memory: tegra30-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code memory: tegra20-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code dt-bindings: memory-controller: st,stm32: Fix st,fmc2_ebi-cs-write-address-setup-ns Link: https://lore.kernel.org/r/20221026171354.51877-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit e77f7ba726cc0c9b1c62b295d2aac42c3a18ebd1 Author: Weilong Chen Date: Tue Nov 1 16:07:28 2022 +0800 dt-bindings: i2c: add entry for hisilicon,ascend910-i2c Add the new compatible for HiSilicon i2c. Signed-off-by: Weilong Chen Reviewed-by: Rob Herring Reviewed-by: Yicong Yang Signed-off-by: Wolfram Sang .../bindings/i2c/hisilicon,ascend910-i2c.yaml | 73 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 74 insertions(+) commit 52951ea193ad3b77c433497425a1049520fd6f22 Author: Weilong Chen Date: Tue Nov 1 16:07:27 2022 +0800 i2c: hisi: Add initial device tree support The HiSilicon I2C controller can be used on embedded platform, which boot from devicetree. Signed-off-by: Weilong Chen Acked-by: Yicong Yang Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 2 +- drivers/i2c/busses/i2c-hisi.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit a072f249b1b3a457196c83df622e3aa376b1f8df Author: Andre Przywara Date: Tue Nov 1 14:16:52 2022 +0000 dt-bindings: i2c: mv64xxx: Add F1C100s compatible string The I2C controller IP used in the Allwinner F1C100s series of SoCs is compatible with the ones used in the other Allwinner SoCs. Add an F1C100s specific compatible string to the list of existing names. Signed-off-by: Andre Przywara Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml | 1 + 1 file changed, 1 insertion(+) commit 4b21d25bf519c9487935a664886956bb18f04f6d Author: Kees Cook Date: Mon Oct 24 23:11:25 2022 +0300 overflow: Introduce overflows_type() and castable_to_type() Implement a robust overflows_type() macro to test if a variable or constant value would overflow another variable or type. This can be used as a constant expression for static_assert() (which requires a constant expression[1][2]) when used on constant values. This must be constructed manually, since __builtin_add_overflow() does not produce a constant expression[3]. Additionally adds castable_to_type(), similar to __same_type(), but for checking if a constant value would overflow if cast to a given type. Add unit tests for overflows_type(), __same_type(), and castable_to_type() to the existing KUnit "overflow" test: [16:03:33] ================== overflow (21 subtests) ================== ... [16:03:33] [PASSED] overflows_type_test [16:03:33] [PASSED] same_type_test [16:03:33] [PASSED] castable_to_type_test [16:03:33] ==================== [PASSED] overflow ===================== [16:03:33] ============================================================ [16:03:33] Testing complete. Ran 21 tests: passed: 21 [16:03:33] Elapsed time: 24.022s total, 0.002s configuring, 22.598s building, 0.767s running [1] https://en.cppreference.com/w/c/language/_Static_assert [2] C11 standard (ISO/IEC 9899:2011): 6.7.10 Static assertions [3] https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html 6.56 Built-in Functions to Perform Arithmetic with Overflow Checking Built-in Function: bool __builtin_add_overflow (type1 a, type2 b, Cc: Luc Van Oostenryck Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Tom Rix Cc: Daniel Latypov Cc: Vitor Massaru Iha Cc: "Gustavo A. R. Silva" Cc: Jani Nikula Cc: Mauro Carvalho Chehab Cc: linux-hardening@vger.kernel.org Cc: llvm@lists.linux.dev Co-developed-by: Gwan-gyeong Mun Signed-off-by: Gwan-gyeong Mun Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221024201125.1416422-1-gwan-gyeong.mun@intel.com drivers/gpu/drm/i915/i915_user_extensions.c | 2 +- drivers/gpu/drm/i915/i915_utils.h | 4 - include/linux/compiler.h | 1 + include/linux/overflow.h | 47 ++++ lib/Makefile | 1 + lib/overflow_kunit.c | 381 ++++++++++++++++++++++++++++ 6 files changed, 431 insertions(+), 5 deletions(-) commit 790835fcc0cb9992349ae3c9010dbc7321aaa24d Author: Muhammad Husaini Zulkifli Date: Wed Sep 21 10:49:40 2022 +0800 igc: Correct the launchtime offset The launchtime offset should be corrected according to sections 7.5.2.6 Transmit Scheduling Latency of the Intel Ethernet I225/I226 Software User Manual. Software can compensate the latency between the transmission scheduling and the time that packet is transmitted to the network by setting this GTxOffset register. Without setting this register, there may be a significant delay between the packet scheduling and the network point. This patch helps to reduce the latency for each of the link speed. Before: 10Mbps : 11000 - 13800 nanosecond 100Mbps : 1300 - 1700 nanosecond 1000Mbps : 190 - 600 nanosecond 2500Mbps : 1400 - 1700 nanosecond After: 10Mbps : less than 750 nanosecond 100Mbps : less than 192 nanosecond 1000Mbps : less than 128 nanosecond 2500Mbps : less than 128 nanosecond Test Setup: Talker : Use l2_tai.c to generate the launchtime into packet payload. Listener: Use timedump.c to compute the delta between packet arrival and LaunchTime packet payload. Signed-off-by: Vinicius Costa Gomes Signed-off-by: Muhammad Husaini Zulkifli Acked-by: Sasha Neftin Acked-by: Paul Menzel Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_defines.h | 9 +++++++++ drivers/net/ethernet/intel/igc/igc_main.c | 7 +++++++ drivers/net/ethernet/intel/igc/igc_regs.h | 1 + drivers/net/ethernet/intel/igc/igc_tsn.c | 30 ++++++++++++++++++++++++++++ drivers/net/ethernet/intel/igc/igc_tsn.h | 1 + 5 files changed, 48 insertions(+) commit 3e7b52e0eb9ef7e67c26072cb1c7a49a5cc356f5 Author: Anirudh Venkataramanan Date: Mon Sep 19 11:09:48 2022 -0700 e1000: Remove unnecessary use of kmap_atomic() buffer_info->rxbuf.page accessed in e1000_clean_jumbo_rx_irq() is allocated using GFP_ATOMIC. Pages allocated with GFP_ATOMIC can't come from highmem and so there's no need to kmap() them. Just use page_address(). I don't have access to a 32-bit system so did some limited testing on qemu (qemu-system-i386 -m 4096 -smp 4 -device e1000e) with a 32-bit Debian 11.04 image. Cc: Ira Weiny Cc: Fabio M. De Francesco Cc: Jesse Brandeburg Cc: Tony Nguyen Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Anirudh Venkataramanan Reviewed-by: Ira Weiny Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/e1000/e1000_main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit ab400b0dd4ec186e483abc667358b4135ab94f1a Author: Anirudh Venkataramanan Date: Fri Sep 30 15:33:24 2022 -0700 e1000e: Remove unnecessary use of kmap_atomic() alloc_rx_buf() allocates ps_page->page and buffer_info->page using either GFP_ATOMIC or GFP_KERNEL. Memory allocated with GFP_KERNEL/GFP_ATOMIC can't come from highmem and so there's no need to kmap() them. Just use page_address(). I don't have access to a 32-bit system so did some limited testing on qemu (qemu-system-i386 -m 4096 -smp 4 -device e1000e) with a 32-bit Debian 11.04 image. Cc: Ira Weiny Cc: Fabio M. De Francesco Cc: Jesse Brandeburg Cc: Tony Nguyen Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Anirudh Venkataramanan Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/e1000e/netdev.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 7bab8828e1ec33e579a664c4262053e16e9cc936 Author: Sasha Neftin Date: Wed Sep 21 10:59:37 2022 +0300 e1000e: Add e1000e trace module Add tracepoints to the driver via a new file e1000e_trace.h and some new trace calls added in interesting places in the driver. Add some tracing for s0ix flows to help in a debug of shared resources with the CSME firmware. The idea here is that tracepoints have such low performance cost when disabled that we can leave these in the upstream driver. Performance not affected, and this can be very useful for debugging and adding new trace events to paths in the future. Usage: echo "e1000e_trace:*" > /sys/kernel/debug/tracing/set_event echo 1 > /sys/kernel/debug/tracing/events/e1000e_trace/enable Signed-off-by: Sasha Neftin Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/e1000e/Makefile | 3 ++ drivers/net/ethernet/intel/e1000e/e1000e_trace.h | 42 ++++++++++++++++++++++++ drivers/net/ethernet/intel/e1000e/netdev.c | 4 +++ 3 files changed, 49 insertions(+) commit 0c9183ce61bc5e546fc06d1f3237120778a81192 Author: Sasha Neftin Date: Thu Sep 29 11:08:59 2022 +0300 e1000e: Add support for the next LOM generation Add devices IDs for the next LOM generations that will be available on the next Intel Client platforms. This patch provides the initial support for these devices. Signed-off-by: Sasha Neftin Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/e1000e/ethtool.c | 2 ++ drivers/net/ethernet/intel/e1000e/hw.h | 9 +++++++++ drivers/net/ethernet/intel/e1000e/ich8lan.c | 7 +++++++ drivers/net/ethernet/intel/e1000e/netdev.c | 10 ++++++++++ drivers/net/ethernet/intel/e1000e/ptp.c | 1 + 5 files changed, 29 insertions(+) commit db2d737d63c5b501eb103d5e5c96499cc792c420 Author: Sasha Neftin Date: Tue Jul 26 17:36:25 2022 +0300 e1000e: Separate MTP board type from ADP We have the same LAN controller on different PCH's. Separate MTP board type from an ADP which will allow for specific fixes to be applied for MTP platforms. Signed-off-by: Sasha Neftin Tested-by: Naama Meir Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/e1000e/e1000.h | 4 +++- drivers/net/ethernet/intel/e1000e/ich8lan.c | 20 ++++++++++++++++++++ drivers/net/ethernet/intel/e1000e/netdev.c | 17 +++++++++-------- 3 files changed, 32 insertions(+), 9 deletions(-) commit 1a5b5372e3b0a4cc65a0cbb724b1b0859f4ac63c Author: Robert Foss Date: Fri Oct 28 14:08:05 2022 +0200 drm/msm/dpu: Refactor sc7280_pp location The sc7280_pp declaration is not located by the other _pp declarations, but rather hidden around the _merge_3d declarations. Let's fix this to avoid confusion. Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/509153/ Link: https://lore.kernel.org/r/20221028120812.339100-3-robert.foss@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit dd1c2322694522f674c874f5fa02ac5ae39135dd Author: Jiri Slaby (SUSE) Date: Mon Oct 31 12:43:41 2022 +0100 wifi: ath11k: synchronize ath11k_mac_he_gi_to_nl80211_he_gi()'s return type ath11k_mac_he_gi_to_nl80211_he_gi() generates a valid warning with gcc-13: drivers/net/wireless/ath/ath11k/mac.c:321:20: error: conflicting types for 'ath11k_mac_he_gi_to_nl80211_he_gi' due to enum/integer mismatch; have 'enum nl80211_he_gi(u8)' drivers/net/wireless/ath/ath11k/mac.h:166:5: note: previous declaration of 'ath11k_mac_he_gi_to_nl80211_he_gi' with type 'u32(u8)' I.e. the type of the return value ath11k_mac_he_gi_to_nl80211_he_gi() in the declaration is u32, while the definition spells enum nl80211_he_gi. Synchronize them to the latter. Cc: Martin Liska Cc: Kalle Valo Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221031114341.10377-1-jirislaby@kernel.org drivers/net/wireless/ath/ath11k/mac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c6c49f2c0993ab3ea4bb71a12c800afd0c59e30 Author: Colin Ian King Date: Wed Nov 2 15:29:04 2022 +0000 spi: nxp-fspi: make const array ls1028a_soc_attr static Don't populate the const array ls1028a_soc_attr on the stack, instead make it static. Also makes the object code smaller. Signed-off-by: Colin Ian King Acked-by: Han Xu Link: https://lore.kernel.org/r/20221102152904.143423-1-colin.i.king@gmail.com Signed-off-by: Mark Brown drivers/spi/spi-nxp-fspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69b957440a6379b4ae4bc6eef07bbf5efdeb4233 Author: Bartosz Staszewski Date: Mon Oct 24 10:49:55 2022 +0200 iavf: Change information about device removal in dmesg Changed information about device removal in dmesg. In function iavf_remove changed printed message from "Remove" to "Removing" after hot vf plug/unplug. Reason for this change is that, that "Removing" word is better because it is clearer for the user that the device is already being removed rather than implying that the user should remove this device. Signed-off-by: Bartosz Staszewski Signed-off-by: Kamil Maziarz Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 619058eca5099a29d717202b3a0adcfc87b77445 Author: ye xingchen Date: Tue Oct 18 01:52:04 2022 +0000 iavf: Replace __FUNCTION__ with __func__ __FUNCTION__ exists only for backwards compatibility reasons with old gcc versions. Replace it with __func__. Signed-off-by: ye xingchen Reviewed-by: Jesse Brandeburg Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30872d834bdbf20e12e3277394f85f1f4d7a9b3f Author: Alicja Kowalska Date: Thu Sep 8 10:07:10 2022 +0200 i40e: Add appropriate error message logged for incorrect duplex setting Nothing logged in dmesg for attempting to set incorrect duplex. Add appropriate error message logged for incorrect duplex setting. Signed-off-by: Alicja Kowalska Signed-off-by: Kamil Maziarz Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6d4d584a7ea8fc8d2be77545cb503118c193738a Author: Joe Damato Date: Fri Oct 7 14:38:43 2022 -0700 i40e: Add i40e_napi_poll tracepoint Add a tracepoint for i40e_napi_poll that allows users to get detailed information about the amount of work done. This information can help users better tune the correct NAPI parameters (like weight and budget), as well as debug NIC settings like rx-usecs and tx-usecs, etc. When perf is attached, this tracepoint only fires when not in XDP mode. An example of the output from this tracepoint: $ sudo perf trace -e i40e:i40e_napi_poll -a --call-graph=fp --libtraceevent_print [..snip..] 388.258 :0/0 i40e:i40e_napi_poll(i40e_napi_poll on dev eth2 q i40e-eth2-TxRx-9 irq 346 irq_mask 00000000,00000000,00000000,00000000,00000000,00800000 curr_cpu 23 budget 64 bpr 64 rx_cleaned 28 tx_cleaned 0 rx_clean_complete 1 tx_clean_complete 1) i40e_napi_poll ([i40e]) i40e_napi_poll ([i40e]) __napi_poll ([kernel.kallsyms]) net_rx_action ([kernel.kallsyms]) __do_softirq ([kernel.kallsyms]) common_interrupt ([kernel.kallsyms]) asm_common_interrupt ([kernel.kallsyms]) intel_idle_irq ([kernel.kallsyms]) cpuidle_enter_state ([kernel.kallsyms]) cpuidle_enter ([kernel.kallsyms]) do_idle ([kernel.kallsyms]) cpu_startup_entry ([kernel.kallsyms]) [0x243fd8] ([kernel.kallsyms]) secondary_startup_64_no_verify ([kernel.kallsyms]) Signed-off-by: Joe Damato Acked-by: Jesse Brandeburg Acked-by: Sridhar Samudrala Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_trace.h | 49 ++++++++++++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_txrx.c | 4 +++ 2 files changed, 53 insertions(+) commit 717b5bc43c1fe7a19f8305123cf2c87ee562aba5 Author: Joe Damato Date: Fri Oct 7 14:38:42 2022 -0700 i40e: Record number of RXes cleaned during NAPI Adjust i40e_clean_rx_irq to accept an out parameter which records the number of RX packets cleaned. No XDP related code is modified and care has been taken to avoid changing control flow. Signed-off-by: Joe Damato Acked-by: Jesse Brandeburg Acked-by: Sridhar Samudrala Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_txrx.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit be847537e3cd951411892072639b1f98d7b96028 Merge: 692fab082052 e6999e7cca7e Author: Mark Brown Date: Wed Nov 2 16:25:02 2022 +0000 Add support for Richtek RT6190 36V 4-wwtich regulator Merge series from cy_huang : The RT6190 is a 4-switch Buck-Boost controller designed for USB power delivery (USB PD). It operates with wide input voltage range from 4.5V to 36V, and the output voltage can be programmable between 3V and 36V. It implements peak current mode control mechanism to deliver up to 100W power with the programmable constant voltage and constant current output. It also has built-in charge pumps for driving external low-cost N-MOSFETs to control the power path. commit 8c1a595cc63ed55efcfec207ce0e35b2ca11401e Author: Joe Damato Date: Fri Oct 7 14:38:41 2022 -0700 i40e: Record number TXes cleaned during NAPI Update i40e_clean_tx_irq to take an out parameter (tx_cleaned) which stores the number TXs cleaned. No XDP related TX code is touched. Care has been taken to avoid changing the control flow of i40e_clean_tx_irq and i40e_napi_poll. Signed-off-by: Joe Damato Acked-by: Jesse Brandeburg Acked-by: Sridhar Samudrala Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e_txrx.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4e78a58ad34e8d7c7fbd26205056d3baaf0b5e98 Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:25 2022 +0300 dt-bindings: display/msm: add support for the display on SM8250 Add DPU and MDSS schemas to describe MDSS and DPU blocks on the Qualcomm SM8250 platform. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508397/ Link: https://lore.kernel.org/r/20221024164225.3236654-13-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov .../bindings/display/msm/mdss-common.yaml | 4 +- .../bindings/display/msm/qcom,sm8250-dpu.yaml | 92 ++++++ .../bindings/display/msm/qcom,sm8250-mdss.yaml | 330 +++++++++++++++++++++ 3 files changed, 424 insertions(+), 2 deletions(-) commit 4b32e46638c2969c1e2b50b02dd2a23bf7033052 Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:24 2022 +0300 dt-bindings: display/msm: add missing device nodes to mdss-* schemas Add missing device nodes (DSI, PHYs, DP/eDP) to the existing MDSS schemas. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508391/ Link: https://lore.kernel.org/r/20221024164225.3236654-12-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov .../bindings/display/msm/qcom,msm8998-mdss.yaml | 153 +++++++++++ .../bindings/display/msm/qcom,qcm2290-mdss.yaml | 81 ++++++ .../bindings/display/msm/qcom,sc7180-mdss.yaml | 179 +++++++++++++ .../bindings/display/msm/qcom,sc7280-mdss.yaml | 292 +++++++++++++++++++++ .../bindings/display/msm/qcom,sdm845-mdss.yaml | 153 +++++++++++ 5 files changed, 858 insertions(+) commit 06097b13ef97a5e55dd4131a8a05c5af1aad2ad3 Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:23 2022 +0300 dt-bindings: display/msm: split dpu-qcm2290 into DPU and MDSS parts In order to make the schema more readable, split dpu-qcm2290 into the DPU and MDSS parts, each one describing just a single device binding. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508383/ Link: https://lore.kernel.org/r/20221024164225.3236654-11-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov .../bindings/display/msm/dpu-qcm2290.yaml | 148 --------------------- .../bindings/display/msm/qcom,qcm2290-dpu.yaml | 84 ++++++++++++ .../bindings/display/msm/qcom,qcm2290-mdss.yaml | 117 ++++++++++++++++ 3 files changed, 201 insertions(+), 148 deletions(-) commit 9410872ff04062924d15569b22ceb4e341c1b049 Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:22 2022 +0300 dt-bindings: display/msm: split dpu-msm8998 into DPU and MDSS parts In order to make the schema more readable, split dpu-msm8998 into the DPU and MDSS parts, each one describing just a single device binding. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508388/ Link: https://lore.kernel.org/r/20221024164225.3236654-10-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov .../bindings/display/msm/qcom,msm8998-dpu.yaml | 95 ++++++++++++++++++++++ .../{dpu-msm8998.yaml => qcom,msm8998-mdss.yaml} | 47 ++--------- 2 files changed, 101 insertions(+), 41 deletions(-) commit 2abfd6a2873f1f7ad9e309fa2735fe096adc9d67 Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:21 2022 +0300 dt-bindings: display/msm: split dpu-sdm845 into DPU and MDSS parts In order to make the schema more readable, split dpu-sdm845 into the DPU and MDSS parts, each one describing just a single device binding. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508382/ Link: https://lore.kernel.org/r/20221024164225.3236654-9-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov .../bindings/display/msm/dpu-sdm845.yaml | 148 --------------------- .../bindings/display/msm/qcom,sdm845-dpu.yaml | 90 +++++++++++++ .../bindings/display/msm/qcom,sdm845-mdss.yaml | 117 ++++++++++++++++ 3 files changed, 207 insertions(+), 148 deletions(-) commit 2c44a9936636b8fb33aff9ea6ee9da5b372f8dfb Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:20 2022 +0300 dt-bindings: display/msm: split dpu-sc7280 into DPU and MDSS parts In order to make the schema more readable, split dpu-sc7280 into the DPU and MDSS parts, each one describing just a single device binding. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508387/ Link: https://lore.kernel.org/r/20221024164225.3236654-8-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov .../bindings/display/msm/dpu-sc7280.yaml | 162 --------------------- .../bindings/display/msm/qcom,sc7280-dpu.yaml | 98 +++++++++++++ .../bindings/display/msm/qcom,sc7280-mdss.yaml | 130 +++++++++++++++++ 3 files changed, 228 insertions(+), 162 deletions(-) commit aba04b0db9154125b5b328e9435378c7ed332969 Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:19 2022 +0300 dt-bindings: display/msm: split dpu-sc7180 into DPU and MDSS parts In order to make the schema more readable, split dpu-sc7180 into the DPU and MDSS parts, each one describing just a single device binding. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508386/ Link: https://lore.kernel.org/r/20221024164225.3236654-7-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov .../bindings/display/msm/dpu-sc7180.yaml | 158 --------------------- .../bindings/display/msm/qcom,sc7180-dpu.yaml | 95 +++++++++++++ .../bindings/display/msm/qcom,sc7180-mdss.yaml | 125 ++++++++++++++++ 3 files changed, 220 insertions(+), 158 deletions(-) commit 5a5c7b35f00f734b38f320ab95b0e571c1874e09 Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:18 2022 +0300 dt-bindings: display/msm: move common MDSS properties to mdss-common.yaml Move properties common to all MDSS DT nodes to the mdss-common.yaml. This extends qcom,msm8998-mdss schema to allow interconnect nodes, which will be added later, once msm8998 gains interconnect support. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508385/ Link: https://lore.kernel.org/r/20221024164225.3236654-6-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov .../bindings/display/msm/dpu-msm8998.yaml | 41 ++--------- .../bindings/display/msm/dpu-qcm2290.yaml | 51 ++----------- .../bindings/display/msm/dpu-sc7180.yaml | 50 ++----------- .../bindings/display/msm/dpu-sc7280.yaml | 50 ++----------- .../bindings/display/msm/dpu-sdm845.yaml | 54 ++------------ .../bindings/display/msm/mdss-common.yaml | 83 ++++++++++++++++++++++ 6 files changed, 111 insertions(+), 218 deletions(-) commit c3d7f3e7bbab635d1846844b747bf7e01d1c339a Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:17 2022 +0300 dt-bindings: display/msm: move common DPU properties to dpu-common.yaml Move properties common to all DPU DT nodes to the dpu-common.yaml. Note, this removes description of individual DPU port@ nodes. However such definitions add no additional value. The reg values do not correspond to hardware INTF indices. The driver discovers and binds these ports not paying any care for the order of these items. Thus just leave the reference to graph.yaml#/properties/ports and the description. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508384/ Link: https://lore.kernel.org/r/20221024164225.3236654-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov .../bindings/display/msm/dpu-common.yaml | 52 ++++++++++++++++++++++ .../bindings/display/msm/dpu-msm8998.yaml | 44 +----------------- .../bindings/display/msm/dpu-qcm2290.yaml | 39 +--------------- .../bindings/display/msm/dpu-sc7180.yaml | 43 +----------------- .../bindings/display/msm/dpu-sc7280.yaml | 43 +----------------- .../bindings/display/msm/dpu-sdm845.yaml | 44 +----------------- 6 files changed, 62 insertions(+), 203 deletions(-) commit 4116c9ad3a9d0ec4c6aa558b58472c51afff9c24 Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:16 2022 +0300 dt-bindings: display/msm: add interconnects property to qcom, mdss-smd845 Add interconnects required for the SDM845 MDSS device tree node. This change was made in the commit c8c61c09e38b ("arm64: dts: qcom: sdm845: Add interconnects property for display"), but was not reflected in the schema. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508380/ Link: https://lore.kernel.org/r/20221024164225.3236654-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Documentation/devicetree/bindings/display/msm/dpu-sdm845.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1db11fc37fdd903b7f4765b83ba5c9961be7ab56 Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:15 2022 +0300 dt-bindings: display/msm: add gcc-bus clock to dpu-smd845 Add gcc-bus clock required for the SDM845 DPU device tree node. This change was made in the commit 111c52854102 ("arm64: dts: qcom: sdm845: move bus clock to mdp node for sdm845 target"), but was not reflected in the schema. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508379/ Link: https://lore.kernel.org/r/20221024164225.3236654-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Documentation/devicetree/bindings/display/msm/dpu-sdm845.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f7d46c5efee26349b49c13f9ebbfbd6aad8d1e71 Author: Dmitry Baryshkov Date: Mon Oct 24 19:42:14 2022 +0300 dt-bindings: display/msm: split qcom, mdss bindings Split Mobile Display SubSystem (MDSS) root node bindings to the separate yaml file. Changes to the existing (txt) schema: - Added optional "vbif_nrt_phys" region used by msm8996 - Made "bus" and "vsync" clocks optional (they are not used by some platforms) - Added optional resets property referencing MDSS reset - Defined child nodes pointing to corresponding reference schema. - Dropped the "lut" clock. It was added to the schema by mistake (it is a part of mdp4 schema, not the mdss). Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/508378/ Link: https://lore.kernel.org/r/20221024164225.3236654-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov .../devicetree/bindings/display/msm/mdp5.txt | 30 +--- .../devicetree/bindings/display/msm/qcom,mdss.yaml | 196 +++++++++++++++++++++ 2 files changed, 197 insertions(+), 29 deletions(-) commit 90d2c87f325ff3422995175bd92812b28d8eb2a9 Author: Rob Clark Date: Fri Sep 23 10:33:07 2022 -0700 drm/msm: Add MSM_INFO_GET_FLAGS In some cases crosvm needs a way to query the cache flags to communicate them to the guest kernel for guest userspace mapping. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/504453/ Link: https://lore.kernel.org/r/20220923173307.2429872-1-robdclark@gmail.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/msm_drv.c | 10 ++++++++++ include/uapi/drm/msm_drm.h | 1 + 2 files changed, 11 insertions(+) commit fa0cf3e4763efe30eca6ae8171a4e7536dbaca57 Author: Liu Shixin Date: Thu Sep 22 22:21:47 2022 +0800 drm/msm/dpu: use DEFINE_SHOW_ATTRIBUTE to simplify dpu_regset32 Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/504252/ Link: https://lore.kernel.org/r/20220922142147.3246649-1-liushixin2@huawei.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 6b85a4f39ff7177b2428d4deab1151a31754e391 Author: Joe Damato Date: Fri Oct 7 14:38:40 2022 -0700 i40e: Store the irq number in i40e_q_vector Make it easy to figure out the IRQ number for a particular i40e_q_vector by storing the assigned IRQ in the structure itself. Signed-off-by: Joe Damato Acked-by: Jesse Brandeburg Acked-by: Sridhar Samudrala Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + 2 files changed, 2 insertions(+) commit c6122688f2652d7f8a44000ce21e84e82bae2b5e Author: Dmitry Baryshkov Date: Mon Oct 24 18:26:42 2022 +0300 drm/msm/mdp5: stop overriding drvdata The rest of the code expects that master's device drvdata is the struct msm_drm_private instance. Do not override the mdp5's drvdata. Fixes: 6874f48bb8b0 ("drm/msm: make mdp5/dpu devices master components") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/508334/ Link: https://lore.kernel.org/r/20221024152642.3213488-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit af309c0c0654f4580c44d1f6db1809e9a78d079e Author: Kuogee Hsieh Date: Mon Sep 12 09:23:50 2022 -0700 drm/msm/dp: retry 3 times if set sink to D0 poweer state failed Bring sink out of D3 (power down) mode into D0 (normal operation) mode by setting DP_SET_POWER_D0 bit to DP_SET_POWER dpcd register. This patch will retry 3 times if written to DP_SET_POWER register failed. Changes in v5: -- split into two patches Signed-off-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/502536/ Link: https://lore.kernel.org/r/1662999830-13916-4-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dp/dp_link.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit f07c9946cc1a2fc437d10610d43bd558624d9d6a Author: Jessica Zhang Date: Thu Sep 1 13:34:22 2022 -0700 drm/msm/dpu: Add support for P010 format Add support for P010 color format. This adds support for both linear and compressed formats. Signed-off-by: Jessica Zhang Reviewed-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/500822/ Link: https://lore.kernel.org/r/20220901203422.217-3-quic_jesszhan@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 17 ++++++++++++++++- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) commit d54c518a496f8cd6db857ec65c6c8bc68f87f16d Author: Kuogee Hsieh Date: Mon Sep 12 09:23:49 2022 -0700 drm/msm/dp: replace variable err with len at dp_aux_link_power_up() drm_dp_dpcd_readb() will return 1 to indicate one byte had been read successfully. This patch replace variable "err" with "len" have more correct meaning. changes in v5: -- split into 3 patches Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/502533/ Link: https://lore.kernel.org/r/1662999830-13916-3-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/dp/dp_link.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit da7716a249b699978fb555c13dde941002980759 Author: Jessica Zhang Date: Thu Sep 1 13:34:21 2022 -0700 drm/msm/dpu: Add support for XR30 format Add support for XR30 color format. This supports both linear and compressed formats. Signed-off-by: Jessica Zhang Reviewed-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/500820/ Link: https://lore.kernel.org/r/20220901203422.217-2-quic_jesszhan@quicinc.com Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 7 +++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 1 + 3 files changed, 10 insertions(+) commit 92bab9142456c37d14a0de212b272cdd94846c6d Author: Dmitry Baryshkov Date: Wed Jun 15 16:59:31 2022 +0300 drm/msm: less magic numbers in msm_mdss_enable Replace magic register writes in msm_mdss_enable() with version that contains less magic and more variable names that can be traced back to the dpu_hw_catalog or the downstream dtsi files. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/489578/ Link: https://lore.kernel.org/r/20220615135935.87381-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/msm/msm_mdss.c | 80 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 72 insertions(+), 8 deletions(-) commit ed3725e15a154ebebf44e0c34806c57525483f92 Author: Rahul Bhattacharjee Date: Fri Oct 21 14:31:26 2022 +0530 wifi: ath11k: Fix qmi_msg_handler data structure initialization qmi_msg_handler is required to be null terminated by QMI module. There might be a case where a handler for a msg id is not present in the handlers array which can lead to infinite loop while searching the handler and therefore out of bound access in qmi_invoke_handler(). Hence update the initialization in qmi_msg_handler data structure. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 Signed-off-by: Rahul Bhattacharjee Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221021090126.28626-1-quic_rbhattac@quicinc.com drivers/net/wireless/ath/ath11k/qmi.c | 3 +++ 1 file changed, 3 insertions(+) commit 4f6620cd6bbd1e10018969ab52bdd8e083d91884 Author: Colin Ian King Date: Mon Oct 24 16:39:54 2022 +0100 wifi: ath9k: remove variable sent Variable sent is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221024153954.2168503-1-colin.i.king@gmail.com drivers/net/wireless/ath/ath9k/xmit.c | 2 -- 1 file changed, 2 deletions(-) commit 254ed7cf4dd79a18bbc496ab53f6c82d45431c78 Author: Borislav Petkov Date: Wed Oct 19 19:25:27 2022 +0200 x86/microcode: Drop struct ucode_cpu_info.valid It is not needed anymore. Signed-off-by: Borislav Petkov Reviewed-by: Ashok Raj Link: https://lore.kernel.org/r/20221028142638.28498-6-bp@alien8.de arch/x86/include/asm/microcode.h | 1 - arch/x86/kernel/cpu/intel.c | 1 - arch/x86/kernel/cpu/microcode/core.c | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) commit 2e6ff4052d89ff9eeaddece14ba88c40bf8b2721 Author: Borislav Petkov Date: Wed Oct 19 19:20:47 2022 +0200 x86/microcode: Do some minor fixups Improve debugging printks and fixup formatting. Signed-off-by: Borislav Petkov Reviewed-by: Ashok Raj Link: https://lore.kernel.org/r/20221028142638.28498-5-bp@alien8.de arch/x86/kernel/cpu/microcode/core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit a61ac80ae52ea349416472cd52005f9988537208 Author: Borislav Petkov Date: Wed Oct 19 19:16:20 2022 +0200 x86/microcode: Kill refresh_fw request_microcode_fw() can always request firmware now so drop this superfluous argument. Signed-off-by: Borislav Petkov Reviewed-by: Ashok Raj Link: https://lore.kernel.org/r/20221028142638.28498-4-bp@alien8.de arch/x86/include/asm/microcode.h | 3 +-- arch/x86/kernel/cpu/microcode/amd.c | 5 ++--- arch/x86/kernel/cpu/microcode/core.c | 2 +- arch/x86/kernel/cpu/microcode/intel.c | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) commit 2071c0aeda228107bf1b9e870b6187c90fbeef1d Author: Borislav Petkov Date: Wed Oct 19 19:07:30 2022 +0200 x86/microcode: Simplify init path even more Get rid of all the IPI-sending functions and their wrappers and use those which are supposed to be called on each CPU. Thus: - microcode_init_cpu() gets called on each CPU on init, applying any new microcode that the driver might've found on the filesystem. - mc_cpu_starting() simply tries to apply cached microcode as this is the cpuhp starting callback which gets called on CPU resume too. Even if the driver init function is a late initcall, there is no filesystem by then (not even a hdd driver has been loaded yet) so a new firmware load attempt cannot simply be done. It is pointless anyway - for that there's late loading if one really needs it. Signed-off-by: Borislav Petkov Reviewed-by: Ashok Raj Link: https://lore.kernel.org/r/20221028142638.28498-3-bp@alien8.de arch/x86/kernel/cpu/microcode/core.c | 120 +++++------------------------------ 1 file changed, 16 insertions(+), 104 deletions(-) commit b6f86689d5b740f2cc3ac3a1032c7374b24381cc Author: Borislav Petkov Date: Wed Oct 19 18:13:06 2022 +0200 x86/microcode: Rip out the subsys interface gunk This is a left-over from the old days when CPU hotplug wasn't as robust as it is now. Currently, microcode gets loaded early on the CPU init path and there's no need to attempt to load it again, which that subsys interface callback is doing. The only other thing that the subsys interface init path was doing is adding the /sys/devices/system/cpu/cpu*/microcode/ hierarchy. So add a function which gets called on each CPU after all the necessary driver setup has happened. Use schedule_on_each_cpu() which can block because the sysfs creating code does kmem_cache_zalloc() which can block too and the initial version of this where it did that setup in an IPI handler of on_each_cpu() can cause a deadlock of the sort: lock(fs_reclaim); lock(fs_reclaim); as the IPI handler runs in IRQ context. Signed-off-by: Borislav Petkov Reviewed-by: Ashok Raj Link: https://lore.kernel.org/r/20221028142638.28498-2-bp@alien8.de arch/x86/kernel/cpu/microcode/core.c | 78 +++++++++--------------------------- 1 file changed, 20 insertions(+), 58 deletions(-) commit b54a0d4094f5c94eda1cafad44323306afe8f807 Merge: ef2dd61af736 3a07dcf8f57b Author: Jakub Kicinski Date: Wed Nov 2 08:18:26 2022 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== bpf-next 2022-11-02 We've added 70 non-merge commits during the last 14 day(s) which contain a total of 96 files changed, 3203 insertions(+), 640 deletions(-). The main changes are: 1) Make cgroup local storage available to non-cgroup attached BPF programs such as tc BPF ones, from Yonghong Song. 2) Avoid unnecessary deadlock detection and failures wrt BPF task storage helpers, from Martin KaFai Lau. 3) Add LLVM disassembler as default library for dumping JITed code in bpftool, from Quentin Monnet. 4) Various kprobe_multi_link fixes related to kernel modules, from Jiri Olsa. 5) Optimize x86-64 JIT with emitting BMI2-based shift instructions, from Jie Meng. 6) Improve BPF verifier's memory type compatibility for map key/value arguments, from Dave Marchevsky. 7) Only create mmap-able data section maps in libbpf when data is exposed via skeletons, from Andrii Nakryiko. 8) Add an autoattach option for bpftool to load all object assets, from Wang Yufen. 9) Various memory handling fixes for libbpf and BPF selftests, from Xu Kuohai. 10) Initial support for BPF selftest's vmtest.sh on arm64, from Manu Bretelle. 11) Improve libbpf's BTF handling to dedup identical structs, from Alan Maguire. 12) Add BPF CI and denylist documentation for BPF selftests, from Daniel Müller. 13) Check BPF cpumap max_entries before doing allocation work, from Florian Lehner. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (70 commits) samples/bpf: Fix typo in README bpf: Remove the obsolte u64_stats_fetch_*_irq() users. bpf: check max_entries before allocating memory bpf: Fix a typo in comment for DFS algorithm bpftool: Fix spelling mistake "disasembler" -> "disassembler" selftests/bpf: Fix bpftool synctypes checking failure selftests/bpf: Panic on hard/soft lockup docs/bpf: Add documentation for new cgroup local storage selftests/bpf: Add test cgrp_local_storage to DENYLIST.s390x selftests/bpf: Add selftests for new cgroup local storage selftests/bpf: Fix test test_libbpf_str/bpf_map_type_str bpftool: Support new cgroup local storage libbpf: Support new cgroup local storage bpf: Implement cgroup storage available to non-cgroup-attached bpf progs bpf: Refactor some inode/task/sk storage functions for reuse bpf: Make struct cgroup btf id global selftests/bpf: Tracing prog can still do lookup under busy lock selftests/bpf: Ensure no task storage failure for bpf_lsm.s prog due to deadlock detection bpf: Add new bpf_task_storage_delete proto with no deadlock detection bpf: bpf_task_storage_delete_recur does lookup first before the deadlock check ... ==================== Link: https://lore.kernel.org/r/20221102062120.5724-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit e6999e7cca7eecd64c27dc72c51d11cb33079a0c Author: ChiYuan Huang Date: Mon Oct 31 10:28:54 2022 +0800 regulator: rt6190: Add support for Richtek RT6190 regulator Add support for Richtek RT6190 4-Switch BuckBoost controller. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1667183334-16511-3-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown drivers/regulator/Kconfig | 11 + drivers/regulator/Makefile | 1 + drivers/regulator/rt6190-regulator.c | 495 +++++++++++++++++++++++++++++++++++ 3 files changed, 507 insertions(+) commit 8facce4349d46fbc2ac4f6da3786130ddd104440 Author: ChiYuan Huang Date: Mon Oct 31 10:28:53 2022 +0800 regulator: Add bindings for Richtek RT6190 regulator Add devicetree binding for Richtek RT6190 4-Switch buckboost controller. Signed-off-by: ChiYuan Huang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1667183334-16511-2-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown .../bindings/regulator/richtek,rt6190.yaml | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit 9a5c1586e8098a19cbf3e7f5d6fa1d1d3c1efa13 Merge: 7f7a942c0a33 e0e86f25fd46 Author: Dmitry Baryshkov Date: Wed Nov 2 17:37:08 2022 +0300 Merge remote-tracking branch 'msm/msm-fixes' into HEAD commit 4046728253751adb41b05e85ebd686210efde1ad Author: Jinlong Chen Date: Wed Nov 2 10:52:30 2022 +0800 blk-mq: use if-else instead of goto in blk_mq_alloc_cached_request() if-else is more readable than goto here. Signed-off-by: Jinlong Chen Link: https://lore.kernel.org/r/d3306fa4e92dc9cc614edc8f1802686096bafef2.1667356813.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/blk-mq.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 7edfd68165b8dab8cde231728ff092a625469eb7 Author: Jinlong Chen Date: Wed Nov 2 10:52:29 2022 +0800 blk-mq: improve error handling in blk_mq_alloc_rq_map() Use goto-style error handling like we do elsewhere in the kernel. Signed-off-by: Jinlong Chen Link: https://lore.kernel.org/r/bbbc2d9b17b137798c7fb92042141ca4cbbc58cc.1667356813.git.nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/blk-mq.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 98d81f0df70ce6fc48517d938026e3c684b9051a Author: Chao Leng Date: Tue Nov 1 16:00:50 2022 +0100 nvme: use blk_mq_[un]quiesce_tagset All controller namespaces share the same tagset, so we can use this interface which does the optimal operation for parallel quiesce based on the tagset type(e.g. blocking tagsets and non-blocking tagsets). nvme connect_q should not be quiesced when quiesce tagset, so set the QUEUE_FLAG_SKIP_TAGSET_QUIESCE to skip it when init connect_q. Currently we use NVME_NS_STOPPED to ensure pairing quiescing and unquiescing. If use blk_mq_[un]quiesce_tagset, NVME_NS_STOPPED will be invalided, so introduce NVME_CTRL_STOPPED to replace NVME_NS_STOPPED. In addition, we never really quiesce a single namespace. It is a better choice to move the flag from ns to ctrl. Signed-off-by: Chao Leng [hch: rebased on top of prep patches] Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Chao Leng Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-15-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 34 ++++++++-------------------------- drivers/nvme/host/nvme.h | 2 +- 2 files changed, 9 insertions(+), 27 deletions(-) commit 414dd48e882c5a39e7bd01b096ee6497eb3314b0 Author: Chao Leng Date: Tue Nov 1 16:00:49 2022 +0100 blk-mq: add tagset quiesce interface Drivers that have shared tagsets may need to quiesce potentially a lot of request queues that all share a single tagset (e.g. nvme). Add an interface to quiesce all the queues on a given tagset. This interface is useful because it can speedup the quiesce by doing it in parallel. Because some queues should not need to be quiesced (e.g. the nvme connect_q) when quiescing the tagset, introduce a QUEUE_FLAG_SKIP_TAGSET_QUIESCE flag to allow this new interface to ski quiescing a particular queue. Signed-off-by: Chao Leng [hch: simplify for the per-tag_set srcu_struct] Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Ming Lei Reviewed-by: Chao Leng Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-14-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq.c | 27 +++++++++++++++++++++++++++ include/linux/blk-mq.h | 2 ++ include/linux/blkdev.h | 3 +++ 3 files changed, 32 insertions(+) commit 483239c75ba768e0e2c0e0c503e5fc13c3d5773a Author: Christoph Hellwig Date: Tue Nov 1 16:00:48 2022 +0100 blk-mq: pass a tagset to blk_mq_wait_quiesce_done Nothing in blk_mq_wait_quiesce_done needs the request_queue now, so just pass the tagset, and move the non-mq check into the only caller that needs it. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chao Leng Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-13-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq.c | 16 +++++++++------- drivers/nvme/host/core.c | 4 ++-- drivers/scsi/scsi_lib.c | 2 +- include/linux/blk-mq.h | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) commit 80bd4a7aab4c9ce59bf5e35fdf52aa23d8a3c9f5 Author: Christoph Hellwig Date: Tue Nov 1 16:00:47 2022 +0100 blk-mq: move the srcu_struct used for quiescing to the tagset All I/O submissions have fairly similar latencies, and a tagset-wide quiesce is a fairly common operation. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Ming Lei Reviewed-by: Chao Leng Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-12-hch@lst.de [axboe: fix whitespace] Signed-off-by: Jens Axboe block/blk-core.c | 27 +++++---------------------- block/blk-mq.c | 33 +++++++++++++++++++++++++-------- block/blk-mq.h | 14 +++++++------- block/blk-sysfs.c | 9 ++------- block/blk.h | 9 +-------- block/genhd.c | 2 +- include/linux/blk-mq.h | 4 ++++ include/linux/blkdev.h | 9 --------- 8 files changed, 45 insertions(+), 62 deletions(-) commit 8537380bb9882c201db60a1eb201aac6e74083e8 Author: Christoph Hellwig Date: Tue Nov 1 16:00:46 2022 +0100 blk-mq: skip non-mq queues in blk_mq_quiesce_queue For submit_bio based queues there is no (S)RCU critical section during I/O submission and thus nothing to wait for in blk_mq_wait_quiesce_done, so skip doing any synchronization. No non-mq driver should be calling this, but for now we have core callers that unconditionally call into it. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-11-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2b4c2355c5e155cdf341d9ce2c2355b4b26c32c9 Author: Christoph Hellwig Date: Tue Nov 1 16:00:45 2022 +0100 nvme-apple: don't unquiesce the I/O queues in apple_nvme_reset_work apple_nvme_reset_work schedules apple_nvme_remove, to be called, which will call apple_nvme_disable and unquiesce the I/O queues. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-10-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/apple.c | 1 - 1 file changed, 1 deletion(-) commit bad3e021ae2bb5ac9d650c9a04788efe753367f3 Author: Christoph Hellwig Date: Tue Nov 1 16:00:44 2022 +0100 nvme-pci: don't unquiesce the I/O queues in nvme_remove_dead_ctrl nvme_remove_dead_ctrl schedules nvme_remove to be called, which will call nvme_dev_disable and unquiesce the I/O queues. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-9-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 1 - 1 file changed, 1 deletion(-) commit cd50f9b24726e9e195a0682c8d8d952396d57aef Author: Christoph Hellwig Date: Tue Nov 1 16:00:43 2022 +0100 nvme: split nvme_kill_queues nvme_kill_queues does two things: 1) mark the gendisk of all namespaces dead 2) unquiesce all I/O queues These used to be be intertwined due to block layer issues, but aren't any more. So move the unquiscing of the I/O queues into the callers, and rename the rest of the function to the now more descriptive nvme_mark_namespaces_dead. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-8-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/apple.c | 3 ++- drivers/nvme/host/core.c | 36 ++++++++---------------------------- drivers/nvme/host/nvme.h | 3 +-- drivers/nvme/host/pci.c | 6 ++++-- 4 files changed, 15 insertions(+), 33 deletions(-) commit 6bcd5089ee1302e9ad7072ca0866f0c5a1158359 Author: Christoph Hellwig Date: Tue Nov 1 16:00:42 2022 +0100 nvme: don't unquiesce the admin queue in nvme_kill_queues None of the callers of nvme_kill_queues needs it to unquiesce the admin queues, as all of them already do it themselves: 1) nvme_reset_work explicit call nvme_start_admin_queue toward the beginning of the function. The extra call to nvme_start_admin_queue in nvme_reset_work this won't do anything as NVME_CTRL_ADMIN_Q_STOPPED will already be cleared. 2) nvme_remove calls nvme_dev_disable with shutdown flag set to true at the very beginning of the function if the PCIe device was not present, which is the precondition for the call to nvme_kill_queues. nvme_dev_disable already calls nvme_start_admin_queue toward the end of the function when the shutdown flag is set to true, so the admin queue is already enabled at this point. 3) nvme_remove_dead_ctrl schedules a workqueue to unbind the driver, which will end up in nvme_remove, which calls nvme_dev_disable with the shutdown flag. This case will call nvme_start_admin_queue a bit later than before. 4) apple_nvme_remove uses the same sequence as nvme_remove_dead_ctrl above. 5) nvme_remove_namespaces only calls nvme_kill_queues when the controller is in the DEAD state. That can only happen in the PCIe driver, and only from nvme_remove. See item 2) above for the conditions there. So it is safe to just remove the call to nvme_start_admin_queue in nvme_kill_queues without replacement. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-7-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 4 ---- 1 file changed, 4 deletions(-) commit fde776afdd8467a09395a7aebdb2499f86315945 Author: Christoph Hellwig Date: Tue Nov 1 16:00:41 2022 +0100 nvme: remove the NVME_NS_DEAD check in nvme_validate_ns At the point where namespaces are marked dead, the controller is in a non-live state and we won't get pass the identify commands. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-6-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 4 ---- 1 file changed, 4 deletions(-) commit 4f17344e9daeb6e9f89976d811a5373710ed1f04 Author: Christoph Hellwig Date: Tue Nov 1 16:00:40 2022 +0100 nvme: remove the NVME_NS_DEAD check in nvme_remove_invalid_namespaces The NVME_NS_DEAD check only made sense when we revalidated namespaces in nvme_passthrough_end for commands that affected the namespace inventory. These days NVME_NS_DEAD is only set during reset or when tearing down namespaces, and we always remove all namespaces right after that. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-5-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23a908647efade186576c9628dd7bb560f6e759b Author: Christoph Hellwig Date: Tue Nov 1 16:00:39 2022 +0100 nvme: don't remove namespaces in nvme_passthru_end The call to nvme_remove_invalid_namespaces made sense when nvme_passthru_end revalidated all namespaces and had to remove those that didn't exist any more. Since we don't revalidate from nvme_passthru_end now, this call is entirely spurious. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-4-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 1 - 1 file changed, 1 deletion(-) commit 0ffc7e98bfaa45380b800deeb9b65ce0371c652d Author: Christoph Hellwig Date: Tue Nov 1 16:00:38 2022 +0100 nvme-pci: refactor the tagset handling in nvme_reset_work The code to create, update or delete a tagset and namespaces in nvme_reset_work is a bit convoluted. Refactor it with a two high-level conditionals for first probe vs reset and I/O queues vs no I/O queues to make the code flow more clear. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-3-hch@lst.de [axboe: fix whitespace issue] Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) commit 71b26083d59cd4ab22489829ffe7d4ead93f5546 Author: Christoph Hellwig Date: Tue Nov 1 16:00:37 2022 +0100 block: set the disk capacity to 0 in blk_mark_disk_dead nvme and xen-blkfront are already doing this to stop buffered writes from creating dirty pages that can't be written out later. Move it to the common code. This also removes the comment about the ordering from nvme, as bd_mutex not only is gone entirely, but also hasn't been used for locking updates to the disk size long before that, and thus the ordering requirement documented there doesn't apply any more. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Ming Lei Reviewed-by: Chao Leng Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-2-hch@lst.de Signed-off-by: Jens Axboe block/genhd.c | 5 +++++ drivers/block/xen-blkfront.c | 1 - drivers/nvme/host/core.c | 7 +------ 3 files changed, 6 insertions(+), 7 deletions(-) commit 1f1e46b83b7db08c8db31816c857e27da84d4ca3 Author: Benedikt Niedermayr Date: Wed Nov 2 14:30:47 2022 +0100 dt-bindings: memory-controllers: ti,gpmc: add wait-pin polarity The GPMC controller has the ability to configure the polarity for the wait pin. The current properties do not allow this configuration. This binding directly configures the WAITPINPOLARITY bit in the GPMC_CONFIG register by setting the "ti,wait-pin-polarity" dt-property. Signed-off-by: Benedikt Niedermayr Reviewed-by: Rob Herring Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20221102133047.1654449-3-benedikt.niedermayr@siemens.com Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/memory-controllers/ti,gpmc-child.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 89aed3cd5cb951113b766cddd9c2df43cfbdafd5 Author: Benedikt Niedermayr Date: Wed Nov 2 14:30:46 2022 +0100 memory: omap-gpmc: wait pin additions This patch introduces support for setting the wait-pin polarity as well as using the same wait-pin for different CS regions. The waitpin polarity can be configured via the WAITPINPOLARITY bits in the GPMC_CONFIG register. This is currently not supported by the driver. This patch adds support for setting the required register bits with the "ti,wait-pin-polarity" dt-property. The wait-pin can also be shared between different CS regions for special usecases. Therefore GPMC must keep track of wait-pin allocations, so it knows that either GPMC itself or another driver has the ownership. Signed-off-by: Benedikt Niedermayr Link: https://lore.kernel.org/r/20221102133047.1654449-2-benedikt.niedermayr@siemens.com Reviewed-by: Roger Quadros Signed-off-by: Krzysztof Kozlowski drivers/memory/omap-gpmc.c | 122 ++++++++++++++++++++++++++++---- include/linux/platform_data/gpmc-omap.h | 8 +++ 2 files changed, 117 insertions(+), 13 deletions(-) commit 3821e96a01d658e770074331b56cec88c169a418 Author: Lukas Bulwahn Date: Mon Oct 31 12:02:23 2022 +0100 MAINTAINERS: arm,pl353-smc: correct dt-binding path Commit de67fa80c669 ("dt-bindings: memory-controllers: arm,pl353-smc: Extend to support 'arm,pl354' SMC") renames the arm,pl353-smc.yaml memory-controller dt-binding, but misses to adjust its reference in MAINTAINERS. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20221031110223.30203-1-lukas.bulwahn@gmail.com Signed-off-by: Krzysztof Kozlowski MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 084bc074c231e716cbcb9e8f9db05b17fd3563cf Author: Kerem Karabay Date: Sat Sep 24 12:53:06 2022 +0300 HID: apple: enable APPLE_ISO_TILDE_QUIRK for the keyboards of Macs with the T2 chip The iso_layout parameter must be manually set to get the driver to swap KEY_102ND and KEY_GRAVE. This patch eliminates the need to do that. This is safe to do, as Macs with keyboards that do not need the quirk will keep working the same way as the value of hid->country will be different than HID_COUNTRY_INTERNATIONAL_ISO. This was tested by one person with a Mac with the WELLSPRINGT2_J152F keyboard with a layout that does not require the quirk to be set. Signed-off-by: Kerem Karabay Signed-off-by: Jiri Kosina drivers/hid/hid-apple.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5476fcf7f7b901db1cea92acb1abdd12609e30e1 Author: Kerem Karabay Date: Sat Sep 24 12:53:05 2022 +0300 HID: apple: fix key translations where multiple quirks attempt to translate the same key The hid-apple driver does not support chaining translations or dependencies on other translations. This creates two problems: 1 - In Non-English keyboards of Macs, KEY_102ND and KEY_GRAVE are swapped and the APPLE_ISO_TILDE_QUIRK is used to work around this problem. The quirk is not set for the Macs where these bugs happen yet (see the 2nd patch for that), but this can be forced by setting the iso_layout parameter. Unfortunately, this only partially works. KEY_102ND gets translated to KEY_GRAVE, but KEY_GRAVE does not get translated to KEY_102ND, so both of them end up functioning as KEY_GRAVE. This is because the driver translates the keys as if Fn was pressed and the original is sent if it is not pressed, without any further translations happening on the key[#463]. KEY_GRAVE is present at macbookpro_no_esc_fn_keys[#195], so this is what happens: - KEY_GRAVE -> KEY_ESC (as if Fn is pressed) - KEY_GRAVE is returned (Fn isn't pressed, so translation is discarded) - KEY_GRAVE -> KEY_102ND (this part is not reached!) ... 2 - In case the touchbar does not work, the driver supports sending Escape when Fn+KEY_GRAVE is pressed. As mentioned previously, KEY_102ND is actually KEY_GRAVE and needs to be translated before this happens. Normally, these are the steps that should happen: - KEY_102ND -> KEY_GRAVE - KEY_GRAVE -> KEY_ESC (Fn is pressed) - KEY_ESC is returned Though this is what happens instead, as dependencies on other translations are not supported: - KEY_102ND -> KEY_ESC (Fn is pressed) - KEY_ESC is returned This patch fixes both bugs by ordering the translations correctly and by making the translations continue and not return immediately after translating a key so that chained translations work and translations can depend on other ones. This patch also simplifies the implementation of the swap_fn_leftctrl option a little bit, as it makes it simply use a normal translation instead adding extra code to translate a key to KEY_FN[#381]. This change wasn't put in another patch as the code that translates the Fn key needs to be changed because of the changes in the patch, and those changes would be discarded with the next patch anyway (the part that originally translates KEY_FN to KEY_LEFTCTRL needs to be made an else-if branch of the part that transltes KEY_LEFTCTRL to KEY_FN). Note: Line numbers (#XYZ) are for drivers/hid/hid-apple.c at commit 20afcc462579 ("HID: apple: Add "GANSS" to the non-Apple list"). Note: These bugs are only present on Macs with a keyboard with no dedicated escape key and a non-English layout. Signed-off-by: Kerem Karabay Signed-off-by: Jiri Kosina drivers/hid/hid-apple.c | 102 +++++++++++++++++++++--------------------------- 1 file changed, 44 insertions(+), 58 deletions(-) commit ef2dd61af7366e5a42e828fff04932e32eb0eacc Merge: d312bad43744 6c6fa1a00ad3 Author: David S. Miller Date: Wed Nov 2 12:38:53 2022 +0000 Merge branch 'renesas-eswitch' Yoshihiro Shimoda says: ==================== net: ethernet: renesas: Add support for "Ethernet Switch" This patch series is based on next-20221027. Add initial support for Renesas "Ethernet Switch" device of R-Car S4-8. The hardware has features about forwarding for an ethernet switch device. But, for now, it acts as ethernet controllers so that any forwarding offload features are not supported. So, any switchdev header files and DSA framework are not used. Notes that this driver requires some special settings on marvell10g, Especially host mactype and host speed. And, I need further investigation to modify the marvell10g driver for upstream. But, the special settings are applied, this rswitch driver can work correcfly without any changes of this rswitch driver. So, I believe the rswitch driver can go for upstream. Changes from v6: https://lore.kernel.org/all/20221028065458.2417293-1-yoshihiro.shimoda.uh@renesas.com/ - Add Reviewed-by tag in the patch [1/3]. - Fix ordering of initialization because NFS root can start mounting the filesystem before register_netdev() even returns Changes from v5: https://lore.kernel.org/all/20221027134034.2343230-1-yoshihiro.shimoda.uh@renesas.com/ - Add maxItems for the ethernet-port/port/reg property. Changes from v4: https://lore.kernel.org/all/20221019083518.933070-1-yoshihiro.shimoda.uh@renesas.com/ - Rebased on next-20221027. - Drop some unneeded properties on the dt-bindings doc. - Change the subject and commit descriptions on the patch [2/3]. - Use phylink instead of phylib. - Modify struct rswitch_*_desc to remove similar functions ([gs]et_dptr). ==================== Signed-off-by: David S. Miller commit 6c6fa1a00ad3df994c96af9468cc83f225df9df4 Author: Yoshihiro Shimoda Date: Mon Oct 31 21:32:42 2022 +0900 net: ethernet: renesas: rswitch: Add R-Car Gen4 gPTP support Add R-Car Gen4 gPTP support into the rswitch driver. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller drivers/net/ethernet/renesas/Makefile | 2 +- drivers/net/ethernet/renesas/rcar_gen4_ptp.c | 181 +++++++++++++++++++++++++++ drivers/net/ethernet/renesas/rcar_gen4_ptp.h | 72 +++++++++++ drivers/net/ethernet/renesas/rswitch.c | 144 ++++++++++++++++++++- drivers/net/ethernet/renesas/rswitch.h | 1 + 5 files changed, 398 insertions(+), 2 deletions(-) commit 3590918b5d07aa5e4702f753c375adb4868d3abd Author: Yoshihiro Shimoda Date: Mon Oct 31 21:32:41 2022 +0900 net: ethernet: renesas: Add support for "Ethernet Switch" Add initial support for Renesas "Ethernet Switch" device of R-Car S4-8. The hardware has features about forwarding for an ethernet switch device. But, for now, it acts as ethernet controllers so that any forwarding offload features are not supported. So, any switchdev header files and DSA framework are not used. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/renesas/Kconfig | 11 + drivers/net/ethernet/renesas/Makefile | 4 + drivers/net/ethernet/renesas/rswitch.c | 1699 ++++++++++++++++++++++++++++++++ drivers/net/ethernet/renesas/rswitch.h | 972 ++++++++++++++++++ 4 files changed, 2686 insertions(+) commit f9edd82774c0c8dde1ce26637a9e29f9bba92fef Author: Yoshihiro Shimoda Date: Mon Oct 31 21:32:40 2022 +0900 dt-bindings: net: renesas: Document Renesas Ethernet Switch Document Renesas Etherent Switch for R-Car S4-8 (r8a779f0). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller .../net/renesas,r8a779f0-ether-switch.yaml | 262 +++++++++++++++++++++ 1 file changed, 262 insertions(+) commit d312bad437442edb736795625c1f92f99a3d6132 Merge: 2e0de6366ac1 02338c484ab6 Author: David S. Miller Date: Wed Nov 2 12:31:24 2022 +0000 Merge branch 'txgbe' Mengyuan Lou says: ==================== net: WangXun txgbe/ngbe ethernet driver This patch series adds support for WangXun NICS, to initialize interface from software to firmware. ==================== Signed-off-by: David S. Miller commit 02338c484ab6250b81f0266ffb40d53c3efe0f47 Author: Mengyuan Lou Date: Mon Oct 31 15:07:57 2022 +0800 net: ngbe: Initialize sw info and register netdev Initialize ngbe mac/phy type. Check whether the firmware is initialized. Initialize ngbe hw and register netdev. Signed-off-by: Mengyuan Lou Signed-off-by: David S. Miller drivers/net/ethernet/wangxun/Kconfig | 1 + drivers/net/ethernet/wangxun/libwx/wx_hw.c | 40 ++- drivers/net/ethernet/wangxun/libwx/wx_hw.h | 3 + drivers/net/ethernet/wangxun/libwx/wx_type.h | 6 + drivers/net/ethernet/wangxun/ngbe/Makefile | 2 +- drivers/net/ethernet/wangxun/ngbe/ngbe.h | 55 ++++ drivers/net/ethernet/wangxun/ngbe/ngbe_hw.c | 87 ++++++ drivers/net/ethernet/wangxun/ngbe/ngbe_hw.h | 12 + drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 368 ++++++++++++++++++++++++++ drivers/net/ethernet/wangxun/ngbe/ngbe_type.h | 99 ++++++- 10 files changed, 665 insertions(+), 8 deletions(-) commit 049fe5365324c879f26842d44291a5042bbd6cbc Author: Jiawen Wu Date: Mon Oct 31 15:07:56 2022 +0800 net: txgbe: Add operations to interact with firmware Add firmware interaction to get EEPROM information. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller drivers/net/ethernet/wangxun/txgbe/txgbe.h | 1 + drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c | 219 +++++++++++++++++++++++- drivers/net/ethernet/wangxun/txgbe/txgbe_hw.h | 2 + drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 85 ++++++++- drivers/net/ethernet/wangxun/txgbe/txgbe_type.h | 14 ++ 5 files changed, 316 insertions(+), 5 deletions(-) commit 1efa9bfe58c595149ef1d5a7c23ad406d713b158 Author: Jiawen Wu Date: Mon Oct 31 15:07:55 2022 +0800 net: libwx: Implement interaction with firmware Add mailbox commands to interact with firmware. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller drivers/net/ethernet/wangxun/libwx/wx_hw.c | 427 +++++++++++++++++++++++++++ drivers/net/ethernet/wangxun/libwx/wx_hw.h | 7 + drivers/net/ethernet/wangxun/libwx/wx_type.h | 109 +++++++ 3 files changed, 543 insertions(+) commit ce28ab1380e823e0afdff06a59a04375ef9d9a29 Author: Arthur Grillo Date: Fri Oct 28 19:17:54 2022 -0300 drm/tests: Add back seed value information As reported by Michał, the drm_mm and drm_buddy unit tests lost the printk with seed value after they were refactored into KUnit. Add kunit_info with seed value information to assure reproducibility. Reported-by: Michał Winiarski Signed-off-by: Arthur Grillo Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221028221755.340487-1-arthurgrillo@riseup.net drivers/gpu/drm/tests/drm_buddy_test.c | 6 ++++-- drivers/gpu/drm/tests/drm_mm_test.c | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) commit 2e0de6366ac16ab4d0abb2aaddbc8a1eba216d11 Author: Heng Qi Date: Mon Oct 31 14:19:22 2022 +0800 veth: Avoid drop packets when xdp_redirect performs In the current processing logic, when xdp_redirect occurs, it transmits the xdp frame based on napi. If napi of the peer veth is not ready, the veth will drop the packets. This doesn't meet our expectations. In this context, we enable napi of the peer veth automatically when the veth loads the xdp. Then if the veth unloads the xdp, we need to correctly judge whether to disable napi of the peer veth, because the peer veth may have loaded xdp, or even the user has enabled GRO. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Signed-off-by: David S. Miller drivers/net/veth.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 76 insertions(+), 12 deletions(-) commit 692fab0820520f5a400446ab3016a237dca32109 Author: Yang Yingliang Date: Wed Nov 2 10:07:16 2022 +0800 regulator: docs: add missing helper Add missing devm_regulator_bulk_get_const() to devres.rst, it's introduced by commit 1de452a0edda ("regulator: core: Allow drivers to define their init data as const"). Fixes: 1de452a0edda ("regulator: core: Allow drivers to define their init data as const") Cc: Liam Girdwood Cc: Mark Brown Cc: Douglas Anderson Cc: Jonathan Corbet Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221102020716.1397449-1-yangyingliang@huawei.com Signed-off-by: Mark Brown Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) commit 7e8cdc97148c6ba66671e88ad9f7d434f4df3438 Author: Dmitry Vyukov Date: Sun Oct 30 16:03:37 2022 +0100 nfc: Add KCOV annotations Add remote KCOV annotations for NFC processing that is done in background threads. This enables efficient coverage-guided fuzzing of the NFC subsystem. The intention is to add annotations to background threads that process skb's that were allocated in syscall context (thus have a KCOV handle associated with the current fuzz test). This includes nci_recv_frame() that is called by the virtual nci driver in the syscall context. Signed-off-by: Dmitry Vyukov Cc: Bongsu Jeon Cc: Krzysztof Kozlowski Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller net/nfc/nci/core.c | 8 +++++++- net/nfc/nci/hci.c | 4 +++- net/nfc/rawsock.c | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) commit 82fd151d38d9fda714c5bb2e9e79ecd6bdc72da6 Author: Shailend Chand Date: Sat Oct 29 09:53:22 2022 -0700 gve: Reduce alloc and copy costs in the GQ rx path Previously, even if just one of the many fragments of a 9k packet required a copy, we'd copy the whole packet into a freshly-allocated 9k-sized linear SKB, and this led to performance issues. By having a pool of pages to copy into, each fragment can be independently handled, leading to a reduced incidence of allocation and copy. Signed-off-by: Shailend Chand Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve.h | 26 +- drivers/net/ethernet/google/gve/gve_ethtool.c | 2 + drivers/net/ethernet/google/gve/gve_rx.c | 542 +++++++++++++++----------- drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 +- drivers/net/ethernet/google/gve/gve_utils.c | 30 +- drivers/net/ethernet/google/gve/gve_utils.h | 2 +- 6 files changed, 338 insertions(+), 266 deletions(-) commit d08b0f8f46e45a274fc8c9a5bc92cb9da70d9887 Author: Shane Parslow Date: Sat Oct 29 02:03:56 2022 -0700 net: wwan: iosm: add rpc interface for xmm modems Add a new iosm wwan port that connects to the modem rpc interface. This interface provides a configuration channel, and in the case of the 7360, is the only way to configure the modem (as it does not support mbim). The new interface is compatible with existing software, such as open_xdatachannel.py from the xmm7360-pci project [1]. [1] https://github.com/xmm7360/xmm7360-pci Signed-off-by: Shane Parslow Reviewed-by: Loic Poulain Signed-off-by: David S. Miller drivers/net/wwan/iosm/iosm_ipc_chnl_cfg.c | 2 +- drivers/net/wwan/wwan_core.c | 4 ++++ include/linux/wwan.h | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) commit 3349e4a48acb0923fa98d2beac82a833a76116cb Author: M Chetan Kumar Date: Fri Oct 28 21:05:34 2022 +0530 net: wwan: t7xx: Add port for modem logging The Modem Logging (MDL) port provides an interface to collect modem logs for debugging purposes. MDL is supported by the relay interface, and the mtk_t7xx port infrastructure. MDL allows user-space apps to control logging via mbim command and to collect logs via the relay interface, while port infrastructure facilitates communication between the driver and the modem. Signed-off-by: Moises Veleta Signed-off-by: M Chetan Kumar Signed-off-by: Devegowda Chandrashekar Acked-by: Ricardo Martinez Reviewed-by: Sergey Ryazanov Signed-off-by: David S. Miller drivers/net/wwan/Kconfig | 1 + drivers/net/wwan/t7xx/Makefile | 3 + drivers/net/wwan/t7xx/t7xx_hif_cldma.c | 2 + drivers/net/wwan/t7xx/t7xx_pci.h | 3 + drivers/net/wwan/t7xx/t7xx_port.h | 3 + drivers/net/wwan/t7xx/t7xx_port_proxy.c | 12 ++++ drivers/net/wwan/t7xx/t7xx_port_proxy.h | 4 ++ drivers/net/wwan/t7xx/t7xx_port_trace.c | 116 ++++++++++++++++++++++++++++++++ 8 files changed, 144 insertions(+) commit fece7a8c65d1476b901b969a07b2979e1b459e66 Author: M Chetan Kumar Date: Fri Oct 28 21:04:50 2022 +0530 net: wwan: t7xx: use union to group port type specific data Use union inside t7xx_port to group port type specific data members. Signed-off-by: M Chetan Kumar Reviewed-by: Sergey Ryazanov Signed-off-by: David S. Miller drivers/net/wwan/t7xx/t7xx_port.h | 6 +++++- drivers/net/wwan/t7xx/t7xx_port_wwan.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) commit 0d183c27ed30a3b21a8fbd6db4d1d7779faf1503 Author: Yang Yingliang Date: Fri Oct 21 20:38:49 2022 +0800 ASoC: SOF: Intel: hda-codec: fix possible memory leak in hda_codec_device_init() If snd_hdac_device_register() fails, 'codec' and name allocated in dev_set_name() called in snd_hdac_device_init() are leaked. Fix this by calling put_device(), so they can be freed in snd_hda_codec_dev_release() and kobject_cleanup(). Fixes: 829c67319806 ("ASoC: SOF: Intel: Introduce HDA codec init and exit routines") Fixes: dfe66a18780d ("ALSA: hdac_ext: add extended HDA bus") Suggested-by: Cezary Rojewski Signed-off-by: Yang Yingliang Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221021123849.456857-2-yangyingliang@huawei.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 0aa60ddc219e7bac967605ecbe46f2f6cd24ee9c Author: Yang Yingliang Date: Fri Oct 21 20:38:48 2022 +0800 ASoC: Intel: Skylake: fix possible memory leak in skl_codec_device_init() If snd_hdac_device_register() fails, 'codec' and name allocated in dev_set_name() called in snd_hdac_device_init() are leaked. Fix this by calling put_device(), so they can be freed in snd_hda_codec_dev_release() and kobject_cleanup(). Fixes: e4746d94d00c ("ASoC: Intel: Skylake: Introduce HDA codec init and exit routines") Fixes: dfe66a18780d ("ALSA: hdac_ext: add extended HDA bus") Suggested-by: Cezary Rojewski Signed-off-by: Yang Yingliang Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221021123849.456857-1-yangyingliang@huawei.com Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit c9eb6e546a23b89d65c87c9192bce372d5abd017 Author: Andy Shevchenko Date: Wed Oct 5 18:29:47 2022 +0300 soc: fsl: qe: Switch to use fwnode instead of of_node The OF node in the GPIO library is deprecated and soon will be removed. GPIO library now accepts fwnode as a firmware node, so switch the driver to use it. Signed-off-by: Andy Shevchenko drivers/soc/fsl/qe/gpio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a521075d0ab389ec5e1b52a2af01ad41b3cf9792 Author: Andy Shevchenko Date: Wed Oct 5 18:29:46 2022 +0300 device property: Introduce fwnode_device_is_compatible() helper The fwnode_device_is_compatible() helper searches for the given string in the "compatible" string array property and, if found, returns true. Signed-off-by: Andy Shevchenko Reviewed-by: Sakari Ailus include/linux/property.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 444bbba708e804c13ad757068d1cb31ed6460754 Author: Dmitry Osipenko Date: Sun Oct 30 18:44:12 2022 +0300 drm/client: Prevent NULL dereference in drm_client_buffer_delete() The drm_gem_vunmap() will crash with a NULL dereference if the passed object pointer is NULL. It wasn't a problem before we added the locking support to drm_gem_vunmap function because the mapping argument was always NULL together with the object. Make drm_client_buffer_delete() to check whether GEM is NULL before trying to unmap the GEM, it will happen on framebuffer creation error. Reported-by: Dan Carpenter Reviewed-by: Christian König Link: https://lore.kernel.org/dri-devel/Y1kFEGxT8MVlf32V@kili/ Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations") Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221030154412.8320-3-dmitry.osipenko@collabora.com drivers/gpu/drm/drm_client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d3292daee319581d0a502fcd8ef3c3c285a1750a Author: Dmitry Osipenko Date: Sun Oct 30 18:44:11 2022 +0300 dma-buf: Make locking consistent in dma_buf_detach() The dma_buf_detach() locks attach->dmabuf->resv and then unlocks dmabuf->resv, which could be a two different locks from a static code checker perspective. In particular this triggers Smatch to report the "double unlock" error. Make the locking pointers consistent. Reported-by: Dan Carpenter Reviewed-by: Christian König Link: https://lore.kernel.org/dri-devel/Y1fLfsccW3AS%2Fo+%2F@kili/ Fixes: 809d9c72c2f8 ("dma-buf: Move dma_buf_attach() to dynamic locking specification") Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221030154412.8320-2-dmitry.osipenko@collabora.com drivers/dma-buf/dma-buf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 387659939c00156f8d6bab0fbc55b4eaf2b6bc5b Author: Gaosheng Cui Date: Mon Oct 31 19:33:50 2022 +0800 drm/ttm: fix undefined behavior in bit shift for TTM_TT_FLAG_PRIV_POPULATED Shifting signed 32-bit value by 31 bits is undefined, so changing significant bit to unsigned. The UBSAN warning calltrace like below: UBSAN: shift-out-of-bounds in ./include/drm/ttm/ttm_tt.h:122:26 left shift of 1 by 31 places cannot be represented in type 'int' Call Trace: dump_stack_lvl+0x7d/0xa5 dump_stack+0x15/0x1b ubsan_epilogue+0xe/0x4e __ubsan_handle_shift_out_of_bounds+0x1e7/0x20c ttm_bo_move_memcpy+0x3b4/0x460 [ttm] bo_driver_move+0x32/0x40 [drm_vram_helper] ttm_bo_handle_move_mem+0x118/0x200 [ttm] ttm_bo_validate+0xfa/0x220 [ttm] drm_gem_vram_pin_locked+0x70/0x1b0 [drm_vram_helper] drm_gem_vram_pin+0x48/0xb0 [drm_vram_helper] drm_gem_vram_plane_helper_prepare_fb+0x53/0xe0 [drm_vram_helper] drm_gem_vram_simple_display_pipe_prepare_fb+0x26/0x30 [drm_vram_helper] drm_simple_kms_plane_prepare_fb+0x4d/0xe0 [drm_kms_helper] drm_atomic_helper_prepare_planes+0xda/0x210 [drm_kms_helper] drm_atomic_helper_commit+0xc3/0x1e0 [drm_kms_helper] drm_atomic_commit+0x9c/0x160 [drm] drm_client_modeset_commit_atomic+0x33a/0x380 [drm] drm_client_modeset_commit_locked+0x77/0x220 [drm] drm_client_modeset_commit+0x31/0x60 [drm] __drm_fb_helper_restore_fbdev_mode_unlocked+0xa7/0x170 [drm_kms_helper] drm_fb_helper_set_par+0x51/0x90 [drm_kms_helper] fbcon_init+0x316/0x790 visual_init+0x113/0x1d0 do_bind_con_driver+0x2a3/0x5c0 do_take_over_console+0xa9/0x270 do_fbcon_takeover+0xa1/0x170 do_fb_registered+0x2a8/0x340 fbcon_fb_registered+0x47/0xe0 register_framebuffer+0x294/0x4a0 __drm_fb_helper_initial_config_and_unlock+0x43c/0x880 [drm_kms_helper] drm_fb_helper_initial_config+0x52/0x80 [drm_kms_helper] drm_fbdev_client_hotplug+0x156/0x1b0 [drm_kms_helper] drm_fbdev_generic_setup+0xfc/0x290 [drm_kms_helper] bochs_pci_probe+0x6ca/0x772 [bochs] local_pci_probe+0x4d/0xb0 pci_device_probe+0x119/0x320 really_probe+0x181/0x550 __driver_probe_device+0xc6/0x220 driver_probe_device+0x32/0x100 __driver_attach+0x195/0x200 bus_for_each_dev+0xbb/0x120 driver_attach+0x27/0x30 bus_add_driver+0x22e/0x2f0 driver_register+0xa9/0x190 __pci_register_driver+0x90/0xa0 bochs_pci_driver_init+0x52/0x1000 [bochs] do_one_initcall+0x76/0x430 do_init_module+0x61/0x28a load_module+0x1f82/0x2e50 __do_sys_finit_module+0xf8/0x190 __x64_sys_finit_module+0x23/0x30 do_syscall_64+0x58/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 3312be8f6fc8 ("drm/ttm: move populated state into page flags") Signed-off-by: Gaosheng Cui Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221031113350.4180975-1-cuigaosheng1@huawei.com Signed-off-by: Christian König include/drm/ttm/ttm_tt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d632bf6ff1f6f733e1de9c5331fd643f4ecbe483 Author: Lukas Bulwahn Date: Mon Oct 31 10:48:35 2022 +0100 x86/boot: Repair kernel-doc for boot_kstrtoul() Adjust the kernel-doc comment to have the proper function name: boot_kstrtoul(). [ bp: Massage commit message. ] Signed-off-by: Lukas Bulwahn Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221031094835.15923-1-lukas.bulwahn@gmail.com arch/x86/boot/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f7961706c63be4e55b720edb7748233761cfbf9 Author: Manivannan Sadhasivam Date: Wed Nov 2 14:30:38 2022 +0530 cpufreq: qcom-hw: Move soc_data to struct qcom_cpufreq soc_data is a static info of the driver and thus no need to cache it inside the qcom_cpufreq_data struct which is allocated per frequency domain. So, move it inside qcom_cpufreq struct. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 7cfa8553fe8c10c7e28eb651a6e58a7ba2d5e429 Author: Manivannan Sadhasivam Date: Wed Nov 2 14:30:37 2022 +0530 cpufreq: qcom-hw: Use cached dev pointer in probe() There are multiple instances of dev pointer used in the probe() function. Instead of referencing pdev->dev all the time, let's use a cached dev pointer to simplify the code. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 054a3ef683a176a509cc9b37f762029aae942495 Author: Manivannan Sadhasivam Date: Wed Nov 2 14:30:36 2022 +0530 cpufreq: qcom-hw: Allocate qcom_cpufreq_data during probe qcom_cpufreq_data is allocated based on the number of frequency domains defined in DT which is static and won't change during runtime. There is no real reason to allocate it during the CPU init() callback and deallocate it during exit(). Hence, move the allocation to probe() and use the allocated memory during init(). This also allows us to use devm_platform_get_and_ioremap_resource() helper for acquiring the freq-domain resources from DT. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 86 +++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 49 deletions(-) commit a37068715956111af1d49105d9e41b4cc8f69ea0 Author: Phillip Potter Date: Wed Nov 2 00:36:13 2022 +0000 staging: r8188eu: convert rtw_setdatarate_cmd to correct error semantics Convert rtw_setdatarate_cmd function to use proper error return codes rather than _SUCCESS and _FAIL, and a simpler 'return 0;' style. For now, wrap rtw_enqueue_cmd call and return -EPERM if it fails, as converting this function makes more sense later on due to its large number of callers. Also change rtw_wx_set_rate function to pass through the proper error code rather than just 0 or -1. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20221102003613.971-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_cmd.c | 18 +++++++----------- drivers/staging/r8188eu/include/rtw_cmd.h | 2 +- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 7 ++----- 3 files changed, 10 insertions(+), 17 deletions(-) commit d911a624cfb40e356b98f135d52914b30214fd7f Author: Deepak R Varma Date: Tue Nov 1 19:20:40 2022 +0530 staging: wlan-ng: Remove unused structure definitions Remove structure definitions that are never used in the code. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/74a79ea400ec26624e445692f3353424fb6fc29e.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211mgmt.h | 232 ----------------------------------- 1 file changed, 232 deletions(-) commit 49af5dd7209ea2242a3c55e0b180f7ff7913fa3b Author: Deepak R Varma Date: Tue Nov 1 19:20:13 2022 +0530 staging: wlan-ng: Remove unused function declarations Several functions are declared but are not implemented or used in any part of the code. Remove such unimplemented function declarations. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/09e2af8d702e33c15ed9f655b0a1190b4e8bec86.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211mgmt.h | 22 ---------------------- 1 file changed, 22 deletions(-) commit 5d2366684f9331dc91449b7b866f172d7641ecf3 Author: Deepak R Varma Date: Tue Nov 1 19:19:54 2022 +0530 staging: wlan-ng: Remove unused struct p80211macarray definition struct p80211macarray is defined but is never used. Remove the unused struct declaration. Issue identified as part of coccicheck based code analysis. Suggested-by: Dan Carpenter Suggested-by: Pavel Skripkin Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/b42eff9b8f73542bc9015948e5e4684416982e1b.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211types.h | 6 ------ 1 file changed, 6 deletions(-) commit a2c896ab66f2c65cf6eeba140b97200a47d0450e Author: Deepak R Varma Date: Tue Nov 1 19:19:30 2022 +0530 staging: wlan-ng: Remove unused struct wlan_ie_ibss_parms references Pointer reference to struct wlan_ie_ibss_parms is added as a member variable to 2 structures; However, these references are never used. Remove such unused struct references. The cleanup also renders the struct useless; so remove it as well. Issue identified as part of coccicheck based code analysis. Suggested-by: Dan Carpenter Suggested-by: Pavel Skripkin Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/e53084cdd3ca3ffea6a32393f6f28c7b7650d1a4.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211mgmt.h | 9 --------- 1 file changed, 9 deletions(-) commit a5f994fc062971aa801eda9e8af214e785e32aff Author: Deepak R Varma Date: Tue Nov 1 19:19:05 2022 +0530 staging: wlan-ng: Remove unused struct wlan_ie_tim references Pointer reference to struct wlan_ie_tim is added as a member variable of a structure; However, this references is never used. Remove such unused struct reference. The cleanup also renders the struct useless; so remove it as well. Issue identified as part of coccicheck based code analysis. Suggested-by: Dan Carpenter Suggested-by: Pavel Skripkin Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/36834007587a2e0ef7a782f5919f3a4c756b7840.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211mgmt.h | 12 ------------ 1 file changed, 12 deletions(-) commit 2a899064b60ad1ede8a3990bd512e859b15896d5 Author: Deepak R Varma Date: Tue Nov 1 19:18:35 2022 +0530 staging: wlan-ng: Remove unused struct wlan_ie_supp_rates references Pointer reference to struct wlan_ie_supp_rates is added as a member variable to 7 different structures. However, these references are never used. Remove such unused struct references. The cleanup also renders the struct useless; so remove it as well. Issue identified as part of coccicheck based code analysis. Suggested-by: Dan Carpenter Suggested-by: Pavel Skripkin Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/370feb1f300896af66fa1c443d3ad19dc8934be3.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211mgmt.h | 14 -------------- 1 file changed, 14 deletions(-) commit 72cdc5aec2913bef5dd62eb75cadad8bff27fd8e Author: Deepak R Varma Date: Tue Nov 1 19:18:10 2022 +0530 staging: wlan-ng: Remove unused struct wlan_ie_ssid references Pointer reference to struct wlan_ie_ssid is added as a member variable to 5 different structures. However, these references are never used. Remove such unused struct references. The cleanup also renders the struct useless; so remove it as well. Issue identified as part of coccicheck based code analysis. Suggested-by: Dan Carpenter Suggested-by: Pavel Skripkin Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/6e39ef59d01d65a1e179f6aecfbb0d68b81fa257.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211mgmt.h | 12 ------------ 1 file changed, 12 deletions(-) commit 29626f3c07d09b79d6510d1915c106e51ba85022 Author: Michael Straube Date: Tue Nov 1 20:14:58 2022 +0100 staging: r8188eu: convert rtw_free_stainfo() to void The function rtw_free_stainfo() returns always _SUCCESS and none of its callers uses the return value. We can safely make the function void. Yet another tiny step towards getting rid of _FAIL / _SUCCESS. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20221101191458.8619-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_sta_mgt.c | 8 ++------ drivers/staging/r8188eu/include/sta_info.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) commit 1a6d64701922b2ff05b240dc0d69f3feda5e2690 Author: Michael Straube Date: Tue Nov 1 20:14:57 2022 +0100 staging: r8188eu: remove extern from function prototypes Declaring function prototypes extern is redundant and triggers checkpatch warnings. Remove all extern from function prototypes. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20221101191458.8619-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/osdep_service.h | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 4 ++-- drivers/staging/r8188eu/include/sta_info.h | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) commit 8b550eb637b483866f8d4662fffc9518ad9e7eca Author: Deepak R Varma Date: Mon Oct 31 23:25:39 2022 +0530 staging: rtl8192u: remove unnecessary function implementation This driver is a single standalone driver and does not have any loading dependencies on another associated drivers. The build results in one single .ko object. The current implementation of the function ieee80211_tkip_null simply returns back to the caller without any useful instruction executions. It does not lead to auto-loading of any other associated modules as the initial design implementation appears to be. Hence the call to ieee80211_tkip_null() and its implementation is unnecessary and should be removed. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/6f5a4313fc21365bf733c25385aef79554ffb253.1667237959.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 3 --- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 6 ------ drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 3 --- 3 files changed, 12 deletions(-) commit dba2628c8ec5c2821103090a6ba946eab9da0c1f Author: Gabhyun Kim Date: Tue Nov 1 15:26:36 2022 +0900 staging: rtl8192e: Remove line breaks to match coding style Remove redundant line break in function definition to correct coding style. Signed-off-by: Gabhyun Kim Link: https://lore.kernel.org/r/20221101062636.GA3257@ubuntu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_softmac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3cbb8d0d6d42958c146624a102d1a0e59a820b65 Author: Geert Uytterhoeven Date: Tue Nov 1 09:01:11 2022 +0100 staging: octeon: cvmx_ptr_to_phys() should return physaddr_t On 32-bit without physical address extensions (e.g. sh-allmodconfig): drivers/staging/octeon/ethernet-mem.c: In function ‘cvm_oct_free_hw_memory’: ./arch/sh/include/asm/io.h:239:32: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 239 | #define phys_to_virt(address) ((void *)(address)) | ^ drivers/staging/octeon/ethernet-mem.c:123:18: note: in expansion of macro ‘phys_to_virt’ 123 | fpa = (char *)phys_to_virt(cvmx_ptr_to_phys(fpa)); | ^~~~~~~~~~~~ Fix this by making cvmx_ptr_to_phys() return physaddr_t instead of uint64_t. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221101080111.750748-1-geert@linux-m68k.org Signed-off-by: Greg Kroah-Hartman arch/mips/include/asm/octeon/cvmx.h | 4 ++-- drivers/staging/octeon/octeon-stubs.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 3b45e2e139c1e71b17a97ae887ba1caadd8e8ad2 Author: Tanjuate Brunostar Date: Tue Nov 1 09:55:33 2022 +0000 staging: vt6655: change variable name wTimeStampOff Remove the use of Hungarian notation, which is not used in the Linux kernel. Signed-off-by: Tanjuate Brunostar Link: https://lore.kernel.org/r/Y2DtFRdhCiyNF2kF@elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a653e32aaddb11cc4f159558c4cf7dfa2c5a0222 Author: Martin Kaiser Date: Mon Oct 31 21:51:41 2022 +0100 staging: r8188eu: use ether_addr_equal in OnAction Use ether_addr_equal to compare two mac addresses in OnAction. Both struct ieee80211_mgmt and struct eeprom_priv's mac_addr component are 2-byte aligned. Suggested-by: Joe Perches Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221031205140.124682-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3032eb4690d5d5bac28d0e92cc501962a42ca4be Author: Michael Straube Date: Mon Oct 31 16:37:43 2022 +0100 staging: r8188eu: replace ternary operator with min, max, abs macros Replace some ternary operators with the min(), max() or abs() macros to improve readability. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20221031153743.8801-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_xmit.c | 3 +-- drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 2 +- drivers/staging/r8188eu/hal/odm_RTL8188E.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) commit aa69ca7d6d6cd2ed2209b4b6c102f2fec3e97012 Author: Martin Kaiser Date: Mon Oct 31 21:54:12 2022 +0100 staging: r8188eu: use ieee80211_get_SA Use ieee80211_get_SA in update_recvframe_phyinfo_88e instead of the driver-specific get_sa function. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221031205412.124871-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97cc476fc6fbfabb989d508df09208c4a598e149 Author: Martin Kaiser Date: Mon Oct 31 21:54:11 2022 +0100 staging: r8188eu: use hdr->frame_control instead of fc We can remove the fc variable in update_recvframe_phyinfo_88e and use hdr->frame_control instead. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221031205412.124871-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e5c3ddd394a409021377b5454a5bd1efa1ba8447 Author: Martin Kaiser Date: Mon Oct 31 21:54:10 2022 +0100 staging: r8188eu: use ether_addr_equal for address comparison We can use ether_addr_equal instead of memcmp in update_recvframe_phyinfo_88e for comparing the incoming frame's destination address with our local address. Both struct ieee80211_hdr and struct eeprom_priv's mac_addr component are 2-byte aligned. Suggested-by: Joe Perches Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221031205412.124871-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 72da688b457d738b943016dabc603efb1be5f4e1 Author: Christophe Leroy Date: Thu Oct 6 07:20:52 2022 +0200 tty: evh_bytechan: Replace NO_IRQ by 0 NO_IRQ is used to check the return of irq_of_parse_and_map(). On some architecture NO_IRQ is 0, on other architectures it is -1. irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ. So use 0 instead of using NO_IRQ. Reviewed-by: Jiri Slaby Acked-by: Laurentiu Tudor Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/23f608ca57e7e19bc7060d3e563de383e0b2b337.1665033575.git.christophe.leroy@csgroup.eu Signed-off-by: Greg Kroah-Hartman drivers/tty/ehv_bytechan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f58a16043a2154661aafe8287cea24e6ae51a9d9 Author: Conor Dooley Date: Wed Oct 5 18:13:46 2022 +0100 serial: sifive: select by default if SOC_CANAAN With the aim of dropping direct selects of drivers from Kconfig.socs, default the SiFive serial drivers to enabled if SOC_CANAAN. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20221005171348.167476-4-conor@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d780a47c2de9a761bb3d754a24e76495b3f0d55f Author: Conor Dooley Date: Wed Oct 5 18:13:45 2022 +0100 serial: sifive: select by default if SOC_SIFIVE With the aim of dropping direct selects of drivers from Kconfig.socs, default the SiFive serial drivers to the value of SOC_SIFIVE. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20221005171348.167476-3-conor@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 1086af67b9ab5229a8166909df01f289bc9a17bd Author: Ville Syrjälä Date: Mon Oct 31 15:57:03 2022 +0200 drm/i915/selftests: Run the perf MI_BB tests on gen4/5 Now that we know the ring timestamp frequency on gen4/5 we can run the perf tests that depend on sampling the timestamp. On g4x/ilk we must read the udw of the 64bit timestamp register. Details in {g4x,gen5)_read_clock_frequency(). When executing the read via the CS i965 doesn't seem to need the double read trick that CPU mmio reads need. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221031135703.14670-7-ville.syrjala@linux.intel.com Reviewed-by: Lionel Landwerlin drivers/gpu/drm/i915/gt/selftest_engine_cs.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 38530a37de499bbb6244018d8d515995fbd89441 Author: Ville Syrjälä Date: Mon Oct 31 15:57:02 2022 +0200 drm/i915/selftests: Test RING_TIMESTAMP on gen4/5 Now that we actually know the cs timestamp frequency on gen4/5 let's run the corresponding test. On g4x/ilk we must read the udw of the 64bit timestamp register. Details in {g4x,gen5)_read_clock_frequency(). The one extra caveat is that on i965 (or at least CL, don't recall if I ever tested on BW) we must read the register twice to get an up to date value. For some unknown reason the first read tends to return a stale value. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221031135703.14670-6-ville.syrjala@linux.intel.com Reviewed-by: Lionel Landwerlin drivers/gpu/drm/i915/gt/selftest_gt_pm.c | 36 +++++++++++++------------------- 1 file changed, 15 insertions(+), 21 deletions(-) commit cf8a82de21c0d2a4e74c159f8479eb1a742ec519 Author: Ville Syrjälä Date: Mon Oct 31 15:57:01 2022 +0200 drm/i915/selftests: Run MI_BB perf selftests on SNB SNB does have the RING_TIMESTAMP register on the RCS engine. Run the MI_BB perf tests on it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221031135703.14670-5-ville.syrjala@linux.intel.com Reviewed-by: Lionel Landwerlin drivers/gpu/drm/i915/gt/selftest_engine_cs.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit dbea79a50221899e2c3b4be9967f535e89fd6d00 Author: Ville Syrjälä Date: Mon Oct 31 15:57:00 2022 +0200 drm/i915: Fix cs timestamp frequency for cl/bw Despite what the spec says the TIMESTAMP register seems to tick once every hrawclk (confirmed on i965gm and g35). v2: Rebase Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221031135703.14670-4-ville.syrjala@linux.intel.com Reviewed-by: Lionel Landwerlin drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 78e418d0ea7f74bca0c2312281a28de831ae8edf Author: Ville Syrjälä Date: Mon Oct 31 15:56:59 2022 +0200 drm/i915: Stop claiming cs timestamp frquency on gen2/3 Gen2/3 have no TIMESTAMP registers to sample so no point in thinking we have any frequency for it either. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221031135703.14670-3-ville.syrjala@linux.intel.com Reviewed-by: Lionel Landwerlin drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ad1ea98019e209eff32e4e22012a4b3276cfdf93 Author: Ville Syrjälä Date: Mon Oct 31 15:56:58 2022 +0200 drm/i915: Fix cs timestamp frequency for ctg/elk/ilk On ilk the UDW of TIMESTAMP increments every 1000 ns, LDW is mbz. In order to represent that we'd need 52 bits, but we only have 32 bits. Even worse most things want to only deal with 32 bits of timestamp. So let's just set up the timestamp frequency as if we only had the UDW. On ctg/elk 63:20 of TIMESTAMP increments every 1/4 ns, 19:0 are mbz. To make life simpler let's ignore the LDW and set up timestamp frequency based on the UDW only (increments every 1024 ns). v2: Rebase Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221031135703.14670-2-ville.syrjala@linux.intel.com Reviewed-by: Lionel Landwerlin drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c | 28 ++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 68069b0d458bb06541641a294c15e06c5704ec2b Author: Manivannan Sadhasivam Date: Tue Oct 25 13:02:50 2022 +0530 cpufreq: qcom-hw: Remove un-necessary cpumask_empty() check CPUFreq core will always set the "policy->cpus" bitmask with the bitfield of the CPU that goes first per domain/policy. So there is no way the "policy->cpus" bitmask will be empty during qcom_cpufreq_hw_cpu_init(). Signed-off-by: Manivannan Sadhasivam Signed-off-by: Viresh Kumar drivers/cpufreq/qcom-cpufreq-hw.c | 5 ----- 1 file changed, 5 deletions(-) commit d182dc6de93225cd853de4db68a1a77501bedb6e Author: Hector Martin Date: Mon Oct 24 13:39:23 2022 +0900 cpufreq: Generalize of_perf_domain_get_sharing_cpumask phandle format of_perf_domain_get_sharing_cpumask currently assumes a 1-argument phandle format, and directly returns the argument. Generalize this to return the full of_phandle_args, so it can be used by drivers which use other phandle styles (e.g. separate nodes). This also requires changing the CPU sharing match to compare the full args structure. Also, make sure to of_node_put(args.np) (the original code was leaking a reference). Signed-off-by: Hector Martin Signed-off-by: Viresh Kumar drivers/cpufreq/mediatek-cpufreq-hw.c | 14 +++++++++----- include/linux/cpufreq.h | 28 ++++++++++++++++------------ 2 files changed, 25 insertions(+), 17 deletions(-) commit 015e4b05c377dc5e066e88737bff9990d5ac358d Author: Brian Norris Date: Tue Nov 1 15:22:10 2022 -0700 platform/chrome: cros_ec_spi: Set PROBE_PREFER_ASYNCHRONOUS This driver often takes on the order of 10ms to start, but in some cases as much as 600ms [1]. It shouldn't have many cross-device dependencies to race with, nor racy access to shared state with other drivers, so this should be a relatively low risk change. This driver was pinpointed as part of a survey of top slowest initcalls (i.e., are built in, and probing synchronously) on a lab of ChromeOS systems. [1] 600ms was especially surprising to me, so I checked a little deeper. This driver is used to interface with Embedded Controllers besides just the traditional laptop power-state controller -- it also interfaces with some fingerprint readers, which may start up in parallel with the kernel, or which may not even be present on some SKUs, despite having a node for it. Thus, our time is wasted just timing out talking to it. At least we can do that without blocking everyone else. Signed-off-by: Brian Norris Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221101152132.v2.5.Ia458a69e1d592bfa4f04cde7018bbc7486f91a23@changeid drivers/platform/chrome/cros_ec_spi.c | 1 + 1 file changed, 1 insertion(+) commit 873ab3e886b52ba3d6ade3c5f3e6a0cff0c8cb12 Author: Brian Norris Date: Tue Nov 1 15:22:09 2022 -0700 platform/chrome: cros_ec_lightbar: Set PROBE_PREFER_ASYNCHRONOUS This driver takes on the order of 15ms to start on some systems. Even on systems where there is no lightbar support, it can take a few milliseconds just to probe the EC for support. It shouldn't have many cross-device dependencies to race with, nor racy access to shared state with other drivers, so this should be a relatively low risk change. This driver was pinpointed as part of a survey of top slowest initcalls (i.e., are built in, and probing synchronously) on a lab of ChromeOS systems. Signed-off-by: Brian Norris Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221101152132.v2.4.I565598102e0bfb03bdf8c090d3bfdf954d026bc5@changeid drivers/platform/chrome/cros_ec_lightbar.c | 1 + 1 file changed, 1 insertion(+) commit 692a68ad7f3c568359b9f18d966628856fd34ff3 Author: Brian Norris Date: Tue Nov 1 15:22:08 2022 -0700 platform/chrome: cros_ec_debugfs: Set PROBE_PREFER_ASYNCHRONOUS This driver takes on the order of 40ms to start on some systems. It shouldn't have many cross-device dependencies to race with, nor racy access to shared state with other drivers, so this should be a relatively low risk change. This driver was pinpointed as part of a survey of top slowest initcalls (i.e., are built in, and probing synchronously) on a lab of ChromeOS systems. Signed-off-by: Brian Norris Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221101152132.v2.3.Ic9a4f378f73319da323cd55940012fa6b1de24f4@changeid drivers/platform/chrome/cros_ec_debugfs.c | 1 + 1 file changed, 1 insertion(+) commit bd88b965ae8c5e46661812b620dad67bee892f78 Author: Brian Norris Date: Tue Nov 1 15:22:07 2022 -0700 platform/chrome: cros_ec_lpc: Mark PROBE_PREFER_ASYNCHRONOUS This takes on the order of 60ms to probe on some systems, so let it probe asynchronously. It shouldn't have any dependencies that aren't handled cleanly. Signed-off-by: Brian Norris Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221101152132.v2.2.Ib1036816e77aba71ebc16b71f7615c55d054689c@changeid drivers/platform/chrome/cros_ec_lpc.c | 1 + 1 file changed, 1 insertion(+) commit fdf84f9ae30b40e3707359bcd467173b9d43454c Author: Brian Norris Date: Tue Nov 1 15:22:06 2022 -0700 platform/chrome: cros_ec_lpc: Move mec_init to device probe Disregarding the weird global state hiding in this cros_ec_lpc_mec_*() stuff, it belongs in device probe. We shouldn't assume we can access hardware resources when the device isn't attached to the driver. Signed-off-by: Brian Norris Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221101152132.v2.1.I0728421299079b104710c202d5d7095b2674fd8c@changeid drivers/platform/chrome/cros_ec_lpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4295c60bbe9e63e35d330546eeaa1d2b62dae303 Author: John Johansen Date: Tue Nov 1 05:40:40 2022 -0700 apparmor: Fix uninitialized symbol 'array_size' in policy_unpack_test.c Make sure array_size is initialized in the kunit test to get rid of compiler warnings. This will also make sure the following tests fail consistently if the first test fails. Reported-by: kernel test robot Signed-off-by: John Johansen security/apparmor/policy_unpack_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58f23a6795a6c165b8c04041bacb999119f9dbc9 Author: Christophe JAILLET Date: Tue Nov 1 22:14:01 2022 +0100 platform/chrome: 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 Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/8d66b4688c05a44b592a4d20e2660e9067163276.1667336095.git.christophe.jaillet@wanadoo.fr drivers/platform/chrome/cros_ec_lightbar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b0e01253a764faab9ecf56c0759e6b06470eb9ff Author: Eric Dumazet Date: Tue Nov 1 03:52:34 2022 +0000 tcp: refine tcp_prune_ofo_queue() logic After commits 36a6503fedda ("tcp: refine tcp_prune_ofo_queue() to not drop all packets") and 72cd43ba64fc1 ("tcp: free batches of packets in tcp_prune_ofo_queue()") tcp_prune_ofo_queue() drops a fraction of ooo queue, to make room for incoming packet. However it makes no sense to drop packets that are before the incoming packet, in sequence space. In order to recover from packet losses faster, it makes more sense to only drop ooo packets which are after the incoming packet. Tested: packetdrill test: 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 setsockopt(3, SOL_SOCKET, SO_RCVBUF, [3800], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0 +0 < S 0:0(0) win 32792 +0 > S. 0:0(0) ack 1 +.1 < . 1:1(0) ack 1 win 1024 +0 accept(3, ..., ...) = 4 +.01 < . 200:300(100) ack 1 win 1024 +0 > . 1:1(0) ack 1 +.01 < . 400:500(100) ack 1 win 1024 +0 > . 1:1(0) ack 1 +.01 < . 600:700(100) ack 1 win 1024 +0 > . 1:1(0) ack 1 +.01 < . 800:900(100) ack 1 win 1024 +0 > . 1:1(0) ack 1 +.01 < . 1000:1100(100) ack 1 win 1024 +0 > . 1:1(0) ack 1 +.01 < . 1200:1300(100) ack 1 win 1024 +0 > . 1:1(0) ack 1 // this packet is dropped because we have no room left. +.01 < . 1400:1500(100) ack 1 win 1024 +.01 < . 1:200(199) ack 1 win 1024 // Make sure kernel did not drop 200:300 sequence +0 > . 1:1(0) ack 300 // Make room, since our RCVBUF is very small +0 read(4, ..., 299) = 299 +.01 < . 300:400(100) ack 1 win 1024 +0 > . 1:1(0) ack 500 +.01 < . 500:600(100) ack 1 win 1024 +0 > . 1:1(0) ack 700 +0 read(4, ..., 400) = 400 +.01 < . 700:800(100) ack 1 win 1024 +0 > . 1:1(0) ack 900 +.01 < . 900:1000(100) ack 1 win 1024 +0 > . 1:1(0) ack 1100 +.01 < . 1100:1200(100) ack 1 win 1024 // This checks that 1200:1300 has not been removed from ooo queue +0 > . 1:1(0) ack 1300 Suggested-by: Jakub Kicinski Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20221101035234.3910189-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/tcp_input.c | 51 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 20 deletions(-) commit f6c64dc32ab91b4c37fa2a255d2270f4ff0b95ba Author: Xiu Jianfeng Date: Sat Oct 29 09:25:05 2022 +0800 apparmor: Add __init annotation to aa_{setup/teardown}_dfa_engine() The aa_setup_dfa_engine() and aa_teardown_dfa_engine() is only called in apparmor_init(), so let us add __init annotation to them. Fixes: 11c236b89d7c ("apparmor: add a default null dfa") Signed-off-by: Xiu Jianfeng Signed-off-by: John Johansen security/apparmor/match.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 44827016be44c6b2634a92ebbdb3d95610ff5268 Author: Dr. David Alan Gilbert Date: Sat Oct 29 02:46:04 2022 +0100 net: core: inet[46]_pton strlen len types inet[46]_pton check the input length against a sane length limit (INET[6]_ADDRSTRLEN), but the strlen value gets truncated due to being stored in an int, so there's a theoretical potential for a >4G string to pass the limit test. Use size_t since that's what strlen actually returns. I've had a hunt for callers that could hit this, but I've not managed to find anything that doesn't get checked with some other limit first; but it's possible that I've missed something in the depth of the storage target paths. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20221029014604.114024-1-linux@treblig.org Signed-off-by: Jakub Kicinski net/core/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa625117d6f67e33fab280358855fdd332bb20ab Author: Yu Kuai Date: Wed Nov 2 10:25:42 2022 +0800 block, bfq: don't declare 'bfqd' as type 'void *' in bfq_group Prevent unnecessary format conversion for bfqg->bfqd in multiple places. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Acked-by: Paolo Valente Link: https://lore.kernel.org/r/20221102022542.3621219-6-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-cgroup.c | 2 +- block/bfq-iosched.h | 2 +- block/bfq-wf2q.c | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) commit 918fdea3884ca8de93bd0e8ad02545eb8e3695d6 Author: Yu Kuai Date: Wed Nov 2 10:25:41 2022 +0800 block, bfq: remove dead code for updating 'rq_in_driver' Such code are not even compiled since they are inside marco "#if 0". Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Acked-by: Paolo Valente Link: https://lore.kernel.org/r/20221102022542.3621219-5-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 16 ---------------- 1 file changed, 16 deletions(-) commit f6fd119b1ae2c4f794dffc87421cf4ce2414401e Author: Yu Kuai Date: Wed Nov 2 10:25:40 2022 +0800 block, bfq: cleanup bfq_activate_requeue_entity() Just make the code a litter cleaner by removing the unnecessary variable 'sd'. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Acked-by: Paolo Valente Link: https://lore.kernel.org/r/20221102022542.3621219-4-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-wf2q.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit e5c63eb4b59f9fb9b28e29d605a4dabbeff7772e Author: Yu Kuai Date: Wed Nov 2 10:25:39 2022 +0800 block, bfq: factor out code to update 'active_entities' Current code is a bit ugly and hard to read. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Acked-by: Paolo Valente Link: https://lore.kernel.org/r/20221102022542.3621219-3-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-wf2q.c | 61 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 29 deletions(-) commit 060d9217d356a28e1bcfd2df0c8bf59aa24a12ce Author: Yu Kuai Date: Wed Nov 2 10:25:38 2022 +0800 block, bfq: remove set but not used variable in __bfq_entity_update_weight_prio After the patch "block, bfq: cleanup bfq_weights_tree add/remove apis"), the local variable 'bfqd' is not used anymore, thus remove it. Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20221102022542.3621219-2-yukuai1@huaweicloud.com Fixes: afdba1461262 ("block, bfq: cleanup bfq_weights_tree add/remove apis") Signed-off-by: Jens Axboe block/bfq-wf2q.c | 15 --------------- 1 file changed, 15 deletions(-) commit 3b21b794b5797d35f4fad930b53b1cd881c12dd3 Author: wangkailong@jari.cn Date: Sat Oct 29 22:49:30 2022 +0800 f2fs: replace ternary operator with max() Fix the following coccicheck warning: ./fs/f2fs/segment.c:877:24-25: WARNING opportunity for max() Signed-off-by: KaiLong Wang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5a0db6a9e2eafe50e3ebc73a8285ae561e7d850 Author: Yangtao Li Date: Tue Oct 25 14:50:25 2022 +0800 f2fs: replace gc_urgent_high_remaining with gc_remaining_trials The user can set the trial count limit for GC urgent and idle mode with replaced gc_remaining_trials.. If GC thread gets to the limit, the mode will turn back to GC normal mode finally. It was applied only to GC_URGENT, while this patch expands it for GC_IDLE. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 8 ++++---- fs/f2fs/f2fs.h | 5 +++-- fs/f2fs/gc.c | 12 ++++++------ fs/f2fs/super.c | 2 +- fs/f2fs/sysfs.c | 12 ++++++------ 5 files changed, 20 insertions(+), 19 deletions(-) commit eebd36a408bb6fc5d7adbb4b8c6db993d0a850f8 Author: Jaegeuk Kim Date: Fri Oct 28 10:07:13 2022 -0700 f2fs: add missing bracket in doc Let's add missing <>. Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23ddc81b087c8bd9a73272afa076e204dc2e5410 Author: Jaegeuk Kim Date: Fri Oct 28 09:49:53 2022 -0700 f2fs: use sysfs_emit instead of sprintf Let's use sysfs_emit. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/sysfs.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit a3951cd199a5d26138532d4e55af41262237632e Author: Yangtao Li Date: Tue Oct 25 11:32:16 2022 +0800 f2fs: introduce gc_mode sysfs node Revert "f2fs: make gc_urgent and gc_segment_mode sysfs node readable". Add a gc_mode sysfs node to show the current gc_mode as a string. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++++++ fs/f2fs/f2fs.h | 1 + fs/f2fs/sysfs.c | 15 +++++++++------ 3 files changed, 16 insertions(+), 6 deletions(-) commit 7b02b2201893a71b881026cf574902019ab00db5 Author: Chao Yu Date: Fri Oct 28 17:30:26 2022 +0800 f2fs: fix to destroy sbi->post_read_wq in error path of f2fs_fill_super() In error path of f2fs_fill_super(), this patch fixes to call f2fs_destroy_post_read_wq() once if we fail in f2fs_start_ckpt_thread(). Fixes: 261eeb9c1585 ("f2fs: introduce checkpoint_merge mount option") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 146dbcbf17a6d07169e75224d949cc2670de2e20 Author: Yangtao Li Date: Thu Oct 27 18:24:46 2022 +0800 f2fs: fix return val in f2fs_start_ckpt_thread() Return PTR_ERR(cprc->f2fs_issue_ckpt) instead of -ENOMEM; Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 4 +++- fs/f2fs/gc.c | 15 +++++++-------- fs/f2fs/segment.c | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) commit 195623f2d8e9361eaddec071ad298998ec0590ba Author: Mukesh Ojha Date: Thu Oct 27 14:42:41 2022 +0530 f2fs: fix the msg data type Data type of msg in f2fs_write_checkpoint trace should be const char * instead of char *. Signed-off-by: Mukesh Ojha Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim include/trace/events/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0db18eec0d9a7ee525209e31e3ac2f673545b12f Author: Mukesh Ojha Date: Thu Oct 27 14:42:40 2022 +0530 f2fs: fix the assign logic of iocb commit 18ae8d12991b ("f2fs: show more DIO information in tracepoint") introduces iocb field in 'f2fs_direct_IO_enter' trace event And it only assigns the pointer and later it accesses its field in trace print log. Unable to handle kernel paging request at virtual address ffffffc04cef3d30 Mem abort info: ESR = 0x96000007 EC = 0x25: DABT (current EL), IL = 32 bits pc : trace_raw_output_f2fs_direct_IO_enter+0x54/0xa4 lr : trace_raw_output_f2fs_direct_IO_enter+0x2c/0xa4 sp : ffffffc0443cbbd0 x29: ffffffc0443cbbf0 x28: ffffff8935b120d0 x27: ffffff8935b12108 x26: ffffff8935b120f0 x25: ffffff8935b12100 x24: ffffff8935b110c0 x23: ffffff8935b10000 x22: ffffff88859a936c x21: ffffff88859a936c x20: ffffff8935b110c0 x19: ffffff8935b10000 x18: ffffffc03b195060 x17: ffffff8935b11e76 x16: 00000000000000cc x15: ffffffef855c4f2c x14: 0000000000000001 x13: 000000000000004e x12: ffff0000ffffff00 x11: ffffffef86c350d0 x10: 00000000000010c0 x9 : 000000000fe0002c x8 : ffffffc04cef3d28 x7 : 7f7f7f7f7f7f7f7f x6 : 0000000002000000 x5 : ffffff8935b11e9a x4 : 0000000000006250 x3 : ffff0a00ffffff04 x2 : 0000000000000002 x1 : ffffffef86a0a31f x0 : ffffff8935b10000 Call trace: trace_raw_output_f2fs_direct_IO_enter+0x54/0xa4 print_trace_fmt+0x9c/0x138 print_trace_line+0x154/0x254 tracing_read_pipe+0x21c/0x380 vfs_read+0x108/0x3ac ksys_read+0x7c/0xec __arm64_sys_read+0x20/0x30 invoke_syscall+0x60/0x150 el0_svc_common.llvm.1237943816091755067+0xb8/0xf8 do_el0_svc+0x28/0xa0 Fix it by copying the required variables for printing and while at it fix the similar issue at some other places in the same file. Fixes: bd984c03097b ("f2fs: show more DIO information in tracepoint") Signed-off-by: Mukesh Ojha Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim include/trace/events/f2fs.h | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit a5029a57a2f3f2e2711f4ac2d876c3c83d1758fe Author: Keoseong Park Date: Thu Oct 27 20:01:05 2022 +0900 f2fs: Fix typo in comments Change "truncateion" to "truncation". Signed-off-by: Keoseong Park Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c46867e9b9b8e0cdd6a5212c2b5ae616583a3bfd Author: Yangtao Li Date: Tue Oct 25 16:32:26 2022 +0800 f2fs: introduce max_ordered_discard sysfs node The current max_ordered_discard is a fixed value, change it to be configurable through the sys node. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++++++ fs/f2fs/f2fs.h | 3 +++ fs/f2fs/segment.c | 3 ++- fs/f2fs/sysfs.c | 11 +++++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) commit a995627e6dd81d4485d40ce64880017a080d71e6 Author: Jaegeuk Kim Date: Mon Oct 24 16:00:35 2022 -0700 f2fs: allow to set compression for inlined file The below commit disallows to set compression on empty created file which has a inline_data. Let's fix it. Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6047de5482c33d5f912cdc907336fde9ebc5714e Author: Yangtao Li Date: Tue Oct 25 01:54:01 2022 +0800 f2fs: add barrier mount option This patch adds a mount option, barrier, in f2fs. The barrier option is the opposite of nobarrier. If this option is set, cache_flush commands are allowed to be issued. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.rst | 2 ++ fs/f2fs/super.c | 7 +++++++ 2 files changed, 9 insertions(+) commit b5f1a218ae5e4339130d6e733f0e63d623e09a2c Author: Dongdong Zhang Date: Tue Oct 25 17:40:36 2022 +0800 f2fs: fix normal discard process In the DPOLICY_BG mode, there is a conflict between the two conditions "i + 1 < dpolicy->granularity" and "i < DEFAULT_DISCARD_GRANULARITY". If i = 15, the first condition is false, it will enter the second condition and dispatch all small granularity discards in function __issue_discard_cmd_orderly. The restrictive effect of the first condition to small discards will be invalidated. These two conditions should align. Fixes: 20ee4382322c ("f2fs: issue small discard by LBA order") Signed-off-by: Dongdong Zhang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44b9d01f2ee32884a7de270394b0fb7f75f87dba Author: Yangtao Li Date: Tue Oct 25 16:05:26 2022 +0800 f2fs: cleanup in f2fs_create_flush_cmd_control() Just cleanup for readable, no functional changes. Suggested-by: Chao Yu Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6359a1aaca527311b7145ec6eb16890a5ddf5214 Author: Yangtao Li Date: Tue Oct 25 14:50:24 2022 +0800 f2fs: fix gc mode when gc_urgent_high_remaining is 1 Under the current logic, when gc_urgent_high_remaining is set to 1, the mode will be switched to normal at the beginning, instead of running in gc_urgent mode. Let's switch the gc mode back to normal when the gc ends. Fixes: 265576181b4a ("f2fs: remove gc_urgent_high_limited for cleanup") Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 3688cbe39b7a9ef3feb73234fb351de33fd1da52 Author: Yangtao Li Date: Tue Oct 25 11:08:31 2022 +0800 f2fs: remove batched_trim_sections node commit 377224c47118("f2fs: don't split checkpoint in fstrim") obsolete batch mode and related sysfs entry. Since this testing sysfs node has been deprecated for a long time, let's remove it. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 3 --- fs/f2fs/sysfs.c | 5 ----- 2 files changed, 8 deletions(-) commit 18792e64c86dd7e34ba28e4f61faba472b7bf5fc Author: Chao Yu Date: Thu Oct 6 23:09:28 2022 +0800 f2fs: support fault injection for f2fs_is_valid_blkaddr() This patch supports to inject fault into f2fs_is_valid_blkaddr() to simulate accessing inconsistent data/meta block addressses from caller. Usage: a) echo 262144 > /sys/fs/f2fs//inject_type or b) mount -o fault_type=262144 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.rst | 1 + fs/f2fs/checkpoint.c | 5 +++++ fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 1 + 4 files changed, 8 insertions(+) commit 91586ce0d39a05f88795aa8814fb99b1387236b3 Author: Chao Yu Date: Fri Oct 21 10:34:22 2022 +0800 f2fs: fix to invalidate dcc->f2fs_issue_discard in error path Syzbot reports a NULL pointer dereference issue as below: __refcount_add include/linux/refcount.h:193 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] get_task_struct include/linux/sched/task.h:110 [inline] kthread_stop+0x34/0x1c0 kernel/kthread.c:703 f2fs_stop_discard_thread+0x3c/0x5c fs/f2fs/segment.c:1638 kill_f2fs_super+0x5c/0x194 fs/f2fs/super.c:4522 deactivate_locked_super+0x70/0xe8 fs/super.c:332 deactivate_super+0xd0/0xd4 fs/super.c:363 cleanup_mnt+0x1f8/0x234 fs/namespace.c:1186 __cleanup_mnt+0x20/0x30 fs/namespace.c:1193 task_work_run+0xc4/0x14c kernel/task_work.c:177 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x26c/0xbe0 kernel/exit.c:795 do_group_exit+0x60/0xe8 kernel/exit.c:925 __do_sys_exit_group kernel/exit.c:936 [inline] __se_sys_exit_group kernel/exit.c:934 [inline] __wake_up_parent+0x0/0x40 kernel/exit.c:934 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall arch/arm64/kernel/syscall.c:52 [inline] el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:636 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 The root cause of this issue is in error path of f2fs_start_discard_thread(), it missed to invalidate dcc->f2fs_issue_discard, later kthread_stop() may access invalid pointer. Fixes: 4d67490498ac ("f2fs: Don't create discard thread when device doesn't support realtime discard") Reported-by: syzbot+035a381ea1afb63f098d@syzkaller.appspotmail.com Reported-by: syzbot+729c925c2d9fc495ddee@syzkaller.appspotmail.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b1a74834844abb2b8b5fe9f828c7f6a1f8fd1b54 Author: Pali Rohár Date: Tue Jul 19 10:08:07 2022 +0200 Documentation: arm: marvell: Add Orion codenames and archive homepage Orion codenames are extracted from menuconfig ARCH_ORION5X and old Orion homepage with 88F5182/88F5281 was found in web archive. Signed-off-by: Pali Rohár Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220719080807.16729-1-pali@kernel.org Signed-off-by: Jonathan Corbet Documentation/arm/marvell.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 23b8d08e7ea44dce8f6f9ae57a86ad0acb5fd738 Author: Carlos Bilbao Date: Mon Oct 24 09:55:21 2022 -0500 Documentation: Add HOWTO Spanish translation into rst based build system Add Spanish translation of HOWTO document into rst based documentation build system. Reviewed-by: Bagas Sanjaya Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20221024145521.69465-3-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet Documentation/translations/sp_SP/howto.rst | 617 +++++++++++++++++++++++++++++ Documentation/translations/sp_SP/index.rst | 8 + 2 files changed, 625 insertions(+) commit 444064185df7c4b0f7bb41e25b1bb197a1e4a918 Author: Carlos Bilbao Date: Mon Oct 24 09:55:20 2022 -0500 Documentation: Start translations to Spanish Start the process of translating kernel documentation to Spanish. Create directory sp_SP/ instead of es_ES/ (diverging from format of prior translated directories) since this directory should accept any dialects of Spanish. Include an index and a disclaimer, following the approach of prior translations. Add Carlos Bilbao as MAINTAINER of this effort. Reviewed-by: Miguel Ojeda Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20221024145521.69465-2-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet Documentation/translations/index.rst | 1 + Documentation/translations/sp_SP/disclaimer-sp.rst | 6 ++ Documentation/translations/sp_SP/index.rst | 72 ++++++++++++++++++++++ MAINTAINERS | 5 ++ 4 files changed, 84 insertions(+) commit bce5a1e8a34006a5e80213ede5e5c465d53f1dce Author: Nick Desaulniers Date: Tue Oct 18 10:21:55 2022 -0700 x86/mem: Move memmove to out of line assembler When building ARCH=i386 with CONFIG_LTO_CLANG_FULL=y, it's possible (depending on additional configs which I have not been able to isolate) to observe a failure during register allocation: error: inline assembly requires more registers than available when memmove is inlined into tcp_v4_fill_cb() or tcp_v6_fill_cb(). memmove is quite large and probably shouldn't be inlined due to size alone. A noinline function attribute would be the simplest fix, but there's a few things that stand out with the current definition: In addition to having complex constraints that can't always be resolved, the clobber list seems to be missing %bx. By using numbered operands rather than symbolic operands, the constraints are quite obnoxious to refactor. Having a large function be 99% inline asm is a code smell that this function should simply be written in stand-alone out-of-line assembler. Moving this to out of line assembler guarantees that the compiler cannot inline calls to memmove. This has been done previously for 64b: commit 9599ec0471de ("x86-64, mem: Convert memmove() to assembly file and fix return value bug") That gives the opportunity for other cleanups like fixing the inconsistent use of tabs vs spaces and instruction suffixes, and the label 3 appearing twice. Symbolic operands, local labels, and additional comments would provide this code with a fresh coat of paint. Finally, add a test that tickles the `rep movsl` implementation to test it for correctness, since it has implicit operands. Suggested-by: Ingo Molnar Suggested-by: David Laight Signed-off-by: Nick Desaulniers Signed-off-by: Dave Hansen Reviewed-by: Kees Cook Tested-by: Kees Cook Tested-by: Nathan Chancellor Link: https://lore.kernel.org/all/20221018172155.287409-1-ndesaulniers%40google.com arch/x86/lib/Makefile | 1 + arch/x86/lib/memcpy_32.c | 187 ------------------------------------------- arch/x86/lib/memmove_32.S | 200 ++++++++++++++++++++++++++++++++++++++++++++++ lib/memcpy_kunit.c | 22 +++++ 4 files changed, 223 insertions(+), 187 deletions(-) commit 0ba5df84d06363b6112d8c5e538582e557b41ad2 Author: Rick Edgecombe Date: Fri Oct 21 15:18:03 2022 -0700 x86: Improve formatting of user_regset arrays Back in 2018, Ingo Molnar suggested[0] to improve the formatting of the struct user_regset arrays. They have multiple member initializations per line and some lines exceed 100 chars. Reformat them like he suggested. [0] https://lore.kernel.org/lkml/20180711102035.GB8574@gmail.com/ Signed-off-by: Rick Edgecombe Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20221021221803.10910-3-rick.p.edgecombe%40intel.com arch/x86/kernel/ptrace.c | 107 ++++++++++++++++++++++++++++------------------- 1 file changed, 65 insertions(+), 42 deletions(-) commit d28abd23b9270f67a9ad098d9338db6a8109fd59 Author: Rick Edgecombe Date: Fri Oct 21 15:18:02 2022 -0700 x86: Separate out x86_regset for 32 and 64 bit In fill_thread_core_info() the ptrace accessible registers are collected for a core file to be written out as notes. The note array is allocated from a size calculated by iterating the user regset view, and counting the regsets that have a non-zero core_note_type. However, this only allows for there to be non-zero core_note_type at the end of the regset view. If there are any in the middle, fill_thread_core_info() will overflow the note allocation, as it iterates over the size of the view and the allocation would be smaller than that. To apparently avoid this problem, x86_32_regsets and x86_64_regsets need to be constructed in a special way. They both draw their indices from a shared enum x86_regset, but 32 bit and 64 bit don't all support the same regsets and can be compiled in at the same time in the case of IA32_EMULATION. So this enum has to be laid out in a special way such that there are no gaps for both x86_32_regsets and x86_64_regsets. This involves ordering them just right by creating aliases for enum’s that are only in one view or the other, or creating multiple versions like REGSET32_IOPERM/REGSET64_IOPERM. So the collection of the registers tries to minimize the size of the allocation, but it doesn’t quite work. Then the x86 ptrace side works around it by constructing the enum just right to avoid a problem. In the end there is no functional problem, but it is somewhat strange and fragile. It could also be improved like this [1], by better utilizing the smaller array, but this still wastes space in the regset array’s if they are not carefully crafted to avoid gaps. Instead, just fully separate out the enums and give them separate 32 and 64 enum names. Add some bitsize-free defines for REGSET_GENERAL and REGSET_FP since they are the only two referred to in bitsize generic code. While introducing a bunch of new 32/64 enums, change the pattern of the name from REGSET_FOO32 to REGSET32_FOO to better indicate that the 32 is in reference to the CPU mode and not the register size, as suggested by Eric Biederman. This should have no functional change and is only changing how constants are generated and referred to. [1] https://lore.kernel.org/lkml/20180717162502.32274-1-yu-cheng.yu@intel.com/ Signed-off-by: Rick Edgecombe Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20221021221803.10910-2-rick.p.edgecombe%40intel.com arch/x86/kernel/ptrace.c | 67 +++++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 24 deletions(-) commit c62102165dd79284d42383d2f7ed17301bd8e629 Author: Marek Vasut Date: Sat Oct 15 01:11:06 2022 +0200 drm/panel/panel-sitronix-st7701: Remove panel on DSI attach failure In case mipi_dsi_attach() fails, call drm_panel_remove() to avoid memory leak. Fixes: 849b2e3ff969 ("drm/panel: Add Sitronix ST7701 panel driver") Signed-off-by: Marek Vasut Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221014231106.468063-1-marex@denx.de drivers/gpu/drm/panel/panel-sitronix-st7701.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 49ee766b364edf7aca412d7418eb4cfe7ab1b1db Author: Marek Vasut Date: Sat Oct 15 01:10:42 2022 +0200 drm/panel/panel-sitronix-st7701: Clean up CMDnBKx selection There are two command register files, CMD1 and CMD2, where only the CMD2 contains additional register sub-files BK0..3 . Pull the register file selection call into separate function instead of duplicating it all over the driver. The CMD2BK2 file is undocumented in datasheet, and is used for BIST. No functional change. Signed-off-by: Marek Vasut Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221014231042.468033-1-marex@denx.de drivers/gpu/drm/panel/panel-sitronix-st7701.c | 58 ++++++++++++--------------- 1 file changed, 25 insertions(+), 33 deletions(-) commit bd5d1cc8ffd7ab83a409a203c1892b6216258d88 Author: Jonathan Corbet Date: Mon Oct 31 10:48:19 2022 -0600 docs: Don't wire font sizes for HTML output The alabaster theme likes to provide explicit sizes for fonts, which overrides the users's own browser settings and is guaranteed to displease folks. Set the font size to "inherit" so that the users browser settings control the font size they get. We can use the font_size configuration option for the main body font (changing the size I'd already put there), but the sidebar size can only be set via custom CSS. Reported-by: Bagas Sanjaya Signed-off-by: Jonathan Corbet Documentation/conf.py | 3 ++- Documentation/sphinx-static/custom.css | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit ea9c6215ac6ba8db51d0af6cce71b6aa959364c2 Author: Wayne Boyer Date: Mon Oct 31 06:15:09 2022 -0700 drm/i915/dg2: Introduce Wa_18017747507 WA 18017747507 applies to all DG2 skus. BSpec: 56035, 46121, 68173 Signed-off-by: Wayne Boyer Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221031131509.3411195-1-wayne.boyer@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 3 +++ drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++ 2 files changed, 6 insertions(+) commit 2ad34b823373c210c91e0b66c0ab5b4baffa3f0b Author: Yanteng Si Date: Fri Oct 28 20:24:43 2022 +0800 docs/zh_CN: Add rust arch-support Chinese translation Translate .../rust/arch-support.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Gary Guo Reviewed-by: Alex Shi Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/1f5b1d1e4f84bf105ab5bed146652937a74e9b69.1666959529.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/rust/arch-support.rst | 23 ++++++++++++++++++++++ Documentation/translations/zh_CN/rust/index.rst | 5 +---- 2 files changed, 24 insertions(+), 4 deletions(-) commit 9b522a8582f8e00f37d6ec4eabf5edaac2cf6e9c Author: Yanteng Si Date: Fri Oct 28 20:24:28 2022 +0800 docs/zh_CN: Add rust coding-guidelines Chinese translation Translate .../rust/coding-guidelines.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Gary Guo Reviewed-by: Alex Shi Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/ec8cb81c59a399dd9eced437cb196f4481c562e7.1666959529.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/rust/coding-guidelines.rst | 192 +++++++++++++++++++++ Documentation/translations/zh_CN/rust/index.rst | 2 +- 2 files changed, 193 insertions(+), 1 deletion(-) commit 55bd06ff4a372438e4f9b1a55d1c727cf1d9c126 Author: Yanteng Si Date: Fri Oct 28 20:23:11 2022 +0800 docs/zh_CN: Add rust general-information Chinese translation Translate .../rust/general-information.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Gary Guo Reviewed-by: Alex Shi Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/b623a39e3598e9dcd8ead4efa512694716403c48.1666959529.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet .../zh_CN/rust/general-information.rst | 75 ++++++++++++++++++++++ Documentation/translations/zh_CN/rust/index.rst | 2 +- 2 files changed, 76 insertions(+), 1 deletion(-) commit 73b6340222fd06d68d5e5bd9da90b267ec3e3cd8 Author: Yanteng Si Date: Fri Oct 28 20:23:10 2022 +0800 docs/zh_CN: Add rust quick-start Chinese translation Translate .../rust/quick-start.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/00e9069e9259f4ba05f7c4c4ab64edcbe73d1eaf.1666959529.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/rust/index.rst | 2 +- .../translations/zh_CN/rust/quick-start.rst | 211 +++++++++++++++++++++ 2 files changed, 212 insertions(+), 1 deletion(-) commit 4ac239542d6a03ecb48ff95e9a5dcb2f4ab4c529 Author: Yanteng Si Date: Fri Oct 28 20:23:09 2022 +0800 docs/zh_CN: Add rust index Chinese translation Translate .../rust/index.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Gary Guo Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/74e20d998bc2825d770c8b4d954e42b0d613ec09.1666959529.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/index.rst | 1 + Documentation/translations/zh_CN/rust/index.rst | 31 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit 57cadf5b77b5ff21ffba4b82bc1f24be62d361ad Author: Jouni Högander Date: Tue Nov 1 13:53:42 2022 +0200 drm/i915/mtl: Fix PSR2_MAN_TRK_CTL bit getter functions for MTL MTL shares PSR2_MAN_TRK_CTL bits with ADL. Currently some bit getter functions are incorrect for MTL. This patch fixes those. Bspec: 49274 Cc: José Roberto de Souza Cc: Mika Kahola Cc: Radhakrishna Sripada Fixes: 47d4ae2192cb ("drm/i915/mtl: Extend PSR support") Signed-off-by: Jouni Högander Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20221101115342.1136720-1-jouni.hogander@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 03cdb5ac0be865d23081251916df6868d53ebb2c Author: Jonathan Neuschäfer Date: Mon Oct 31 23:07:51 2022 +0100 clk: samsung: Fix reference to CLK_OF_DECLARE in comment It was misspelled as OF_CLK_DECLARE. Fix it. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221031220751.158341-1-j.neuschaefer@gmx.net Signed-off-by: Stephen Boyd drivers/clk/samsung/clk-exynos5-subcmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff0d3ae04f7307ff2447ad79f38806f240fe783d Author: Siarhei Volkau Date: Mon Oct 31 21:39:29 2022 +0300 clk: Add Ingenic JZ4755 CGU driver Add support for the clocks provided by the CGU in the Ingenic JZ4755 SoC. Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221031183930.1338009-2-lis8215@gmail.com Signed-off-by: Stephen Boyd drivers/clk/ingenic/Kconfig | 10 ++ drivers/clk/ingenic/Makefile | 1 + drivers/clk/ingenic/jz4755-cgu.c | 346 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 357 insertions(+) commit b8d3b056a78dcc941fd1a117697ab2b956c2953f Author: Yang Yingliang Date: Tue Oct 11 17:22:04 2022 +0800 spi: introduce new helpers with using modern naming For using modern names host/target to instead of all the legacy names, I think it takes 3 steps: - step1: introduce new helpers with modern naming. - step2: switch to use these new helpers in all drivers. - step3: remove all legacy helpers and update all legacy names. This patch is for step1, it introduces new helpers with host/target naming for drivers using. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221011092204.950288-1-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi.c | 11 +++++++++++ include/linux/spi/spi.h | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 2 deletions(-) commit bf585ccee22faf469d82727cf375868105b362f7 Author: Jonathan Neuschäfer Date: Tue Nov 1 18:32:51 2022 +0100 spi: Update reference to struct spi_controller struct spi_master has been renamed to struct spi_controller. Update the reference in spi.rst to make it clickable again. Fixes: 8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"") Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221101173252.1069294-1-j.neuschaefer@gmx.net Signed-off-by: Mark Brown Documentation/driver-api/spi.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0be56a116220f9e5731a6609e66a11accfe8d8e2 Author: Aditya Garg Date: Thu Oct 27 10:01:43 2022 +0000 efi: Add iMac Pro 2017 to uefi skip cert quirk The iMac Pro 2017 is also a T2 Mac. Thus add it to the list of uefi skip cert. Cc: stable@vger.kernel.org Fixes: 155ca952c7ca ("efi: Do not import certificates from UEFI Secure Boot for T2 Macs") Link: https://lore.kernel.org/linux-integrity/9D46D92F-1381-4F10-989C-1A12CD2FFDD8@live.com/ Signed-off-by: Aditya Garg Signed-off-by: Mimi Zohar security/integrity/platform_certs/load_uefi.c | 1 + 1 file changed, 1 insertion(+) commit 04cee82e04d2aff3d177ef0021ecdff228daf7b8 Author: Nicolin Chen Date: Mon Oct 17 16:02:36 2022 -0700 iommu: Propagate return value in ->attach_dev callback functions The mtk_iommu and virtio drivers have places in the ->attach_dev callback functions that return hardcode errnos instead of the returned values, but callers of these ->attach_dv callback functions may care. Propagate them directly without the extra conversions. Link: https://lore.kernel.org/r/ca8c5a447b87002334f83325f28823008b4ce420.1666042873.git.nicolinc@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Jean-Philippe Brucker Reviewed-by: Jason Gunthorpe Reviewed-by: Yong Wu Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe drivers/iommu/mtk_iommu.c | 2 +- drivers/iommu/virtio-iommu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f4a14773579302e5f0c4bf80b03f0db7ce67f2ce Author: Nicolin Chen Date: Mon Oct 17 16:02:21 2022 -0700 iommu: Use EINVAL for incompatible device/domain in ->attach_dev Following the new rules in include/linux/iommu.h kdocs, update all drivers ->attach_dev callback functions to return EINVAL in the failure paths that are related to domain incompatibility. Also, drop adjacent error prints to prevent a kernel log spam. Link: https://lore.kernel.org/r/f52a07f7320da94afe575c9631340d0019a203a7.1666042873.git.nicolinc@nvidia.com Reviewed-by: Jean-Philippe Brucker Reviewed-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 11 +---------- drivers/iommu/arm/arm-smmu/arm-smmu.c | 3 --- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 7 +------ drivers/iommu/intel/iommu.c | 10 +++------- drivers/iommu/ipmmu-vmsa.c | 2 -- drivers/iommu/omap-iommu.c | 2 +- drivers/iommu/sprd-iommu.c | 4 +--- drivers/iommu/tegra-gart.c | 2 +- drivers/iommu/virtio-iommu.c | 3 +-- 9 files changed, 9 insertions(+), 35 deletions(-) commit bd7ebb7719356d750b1b4d671535922bae43fb3b Author: Nicolin Chen Date: Mon Oct 17 16:02:13 2022 -0700 iommu: Regulate EINVAL in ->attach_dev callback functions Following the new rules in include/linux/iommu.h kdocs, EINVAL now can be used to indicate that domain and device are incompatible by a caller that treats it as a soft failure and tries attaching to another domain. On the other hand, there are ->attach_dev callback functions returning it for obvious device-specific errors. They will result in some inefficiency in the caller handling routine. Update these places to corresponding errnos following the new rules. Link: https://lore.kernel.org/r/5924c03bea637f05feb2a20d624bae086b555ec5.1666042872.git.nicolinc@nvidia.com Reviewed-by: Jean-Philippe Brucker Reviewed-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe drivers/iommu/fsl_pamu.c | 2 +- drivers/iommu/fsl_pamu_domain.c | 4 ++-- drivers/iommu/intel/pasid.c | 6 ++++-- drivers/iommu/mtk_iommu.c | 2 +- drivers/iommu/omap-iommu.c | 4 ++-- drivers/iommu/virtio-iommu.c | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) commit 00208852d351ca6e4a8b9ff0c5376fa3a8ed8eaa Author: Nicolin Chen Date: Mon Oct 17 16:01:22 2022 -0700 iommu: Add return value rules to attach_dev op and APIs Cases like VFIO wish to attach a device to an existing domain that was not allocated specifically from the device. This raises a condition where the IOMMU driver can fail the domain attach because the domain and device are incompatible with each other. This is a soft failure that can be resolved by using a different domain. Provide a dedicated errno EINVAL from the IOMMU driver during attach that the reason why the attach failed is because of domain incompatibility. VFIO can use this to know that the attach is a soft failure and it should continue searching. Otherwise, the attach will be a hard failure and VFIO will return the code to userspace. Update kdocs to add rules of return value to the attach_dev op and APIs. Link: https://lore.kernel.org/r/bd56d93c18621104a0fa1b0de31e9b760b81b769.1666042872.git.nicolinc@nvidia.com Suggested-by: Jason Gunthorpe Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe drivers/iommu/iommu.c | 24 ++++++++++++++++++++++++ include/linux/iommu.h | 12 ++++++++++++ 2 files changed, 36 insertions(+) commit 79218fd0b38bb05e8dcb80a49342836274046432 Author: Nicolin Chen Date: Mon Oct 17 16:00:45 2022 -0700 iommu/amd: Drop unnecessary checks in amd_iommu_attach_device() The same checks are done in amd_iommu_probe_device(). If any of them fails there, then the device won't get a group, so there's no way for it to even reach amd_iommu_attach_device anymore. Link: https://lore.kernel.org/r/c054654a81f2b675c73108fe4bf10e45335a721a.1666042872.git.nicolinc@nvidia.com Suggested-by: Robin Murphy Cc: Joerg Roedel Cc: Suravee Suthikulpanit Reviewed-by: Vasant Hegde Reviewed-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe drivers/iommu/amd/iommu.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit c1cdee9b685a174fca849e1451c201a846a69318 Author: Marek Vasut Date: Thu Oct 13 00:11:59 2022 +0200 drm/panel/panel-sitronix-st7701: Fix RTNI calculation The RTNI field is multiplied by 16 and incremented by 512 before being used as the minimum number of pixel clock per horizontal line, hence it is necessary to subtract those 512 bytes from htotal and then divide the result by 16 before writing the value into the RTNI field. Fix the calculation. Fixes: de2b4917843c ("drm/panel/panel-sitronix-st7701: Infer horizontal pixel count from TFT mode") Signed-off-by: Marek Vasut Reviewed-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221012221159.88397-1-marex@denx.de drivers/gpu/drm/panel/panel-sitronix-st7701.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2215cb3be5c28a1fd43036550c00c2371aeeba95 Author: Marco Felsch Date: Tue Nov 1 17:46:15 2022 +0100 drm: lcdif: change burst size to 256B If a axi bus master with a higher priority do a lot of memory access FIFO underruns can be inspected. Increase the burst size to 256B to avoid such underruns and to improve the memory access efficiency. Fixes: 9db35bb349a0 ("drm: lcdif: Add support for i.MX8MP LCDIF variant") Signed-off-by: Marco Felsch Reviewed-by: Marek Vasut Signed-off-by: Marek Vasut Link: https://patchwork.freedesktop.org/patch/msgid/20221101164615.778299-1-m.felsch@pengutronix.de drivers/gpu/drm/mxsfb/lcdif_kms.c | 14 ++++++++++++-- drivers/gpu/drm/mxsfb/lcdif_regs.h | 4 ++++ 2 files changed, 16 insertions(+), 2 deletions(-) commit 6dd142d9013ca82155d0c069434c60a0d5755ec0 Author: Kees Cook Date: Tue Sep 20 14:13:05 2022 -0700 coredump: Proactively round up to kmalloc bucket size Instead of discovering the kmalloc bucket size _after_ allocation, round up proactively so the allocation is explicitly made for the full size, allowing the compiler to correctly reason about the resulting size of the buffer through the existing __alloc_size() hint. Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Kees Cook fs/coredump.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 905889bc6c842d18f369bf2834cf7219f32709ae Author: Kees Cook Date: Fri Sep 23 13:28:13 2022 -0700 btrfs: send: Proactively round up to kmalloc bucket size Instead of discovering the kmalloc bucket size _after_ allocation, round up proactively so the allocation is explicitly made for the full size, allowing the compiler to correctly reason about the resulting size of the buffer through the existing __alloc_size() hint. Cc: Chris Mason Cc: Josef Bacik Cc: linux-btrfs@vger.kernel.org Acked-by: David Sterba Link: https://lore.kernel.org/lkml/20220922133014.GI32411@suse.cz Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220923202822.2667581-8-keescook@chromium.org fs/btrfs/send.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit cd536db050993f7c220a6cfb01de5356032b6f8e Author: Kees Cook Date: Tue Oct 18 02:10:11 2022 -0700 dma-buf: Proactively round up to kmalloc bucket size Instead of discovering the kmalloc bucket size _after_ allocation, round up proactively so the allocation is explicitly made for the full size, allowing the compiler to correctly reason about the resulting size of the buffer through the existing __alloc_size() hint. Cc: Sumit Semwal Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Reviewed-by: Christian König Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221018090858.never.941-kees@kernel.org drivers/dma-buf/dma-resv.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit e1789d7c752ed001cf1a4bbbd624f70a7dd3c6db Author: Xin Li Date: Tue Oct 25 00:30:23 2022 -0700 kbuild: upgrade the orphan section warning to an error if CONFIG_WERROR is set Andrew Cooper suggested upgrading the orphan section warning to a hard link error. However Nathan Chancellor said outright turning the warning into an error with no escape hatch might be too aggressive, as we have had these warnings triggered by new compiler generated sections, and suggested turning orphan sections into an error only if CONFIG_WERROR is set. Kees Cook echoed and emphasized that the mandate from Linus is that we should avoid breaking builds. It wrecks bisection, it causes problems across compiler versions, etc. Thus upgrade the orphan section warning to a hard link error only if CONFIG_WERROR is set. Suggested-by: Andrew Cooper Suggested-by: Nathan Chancellor Signed-off-by: Xin Li Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221025073023.16137-2-xin3.li@intel.com Makefile | 2 +- arch/arm/boot/compressed/Makefile | 2 +- arch/arm64/kernel/vdso/Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 2 +- init/Kconfig | 15 ++++++++++++--- 6 files changed, 17 insertions(+), 8 deletions(-) commit 5a17f040fa332e71a45ca9ff02d6979d9176a423 Author: Kees Cook Date: Wed Oct 26 16:31:11 2022 -0700 cred: Do not default to init_cred in prepare_kernel_cred() A common exploit pattern for ROP attacks is to abuse prepare_kernel_cred() in order to construct escalated privileges[1]. Instead of providing a short-hand argument (NULL) to the "daemon" argument to indicate using init_cred as the base cred, require that "daemon" is always set to an actual task. Replace all existing callers that were passing NULL with &init_task. Future attacks will need to have sufficiently powerful read/write primitives to have found an appropriately privileged task and written it to the ROP stack as an argument to succeed, which is similarly difficult to the prior effort needed to escalate privileges before struct cred existed: locate the current cred and overwrite the uid member. This has the added benefit of meaning that prepare_kernel_cred() can no longer exceed the privileges of the init task, which may have changed from the original init_cred (e.g. dropping capabilities from the bounding set). [1] https://google.com/search?q=commit_creds(prepare_kernel_cred(0)) Cc: "Eric W. Biederman" Cc: David Howells Cc: "Rafael J. Wysocki" Cc: Steve French Cc: Ronnie Sahlberg Cc: Shyam Prasad N Cc: Tom Talpey Cc: Namjae Jeon Cc: Trond Myklebust Cc: Anna Schumaker Cc: Chuck Lever Cc: Jeff Layton Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: "Michal Koutný" Cc: Peter Zijlstra Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Cc: linux-nfs@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Luis Chamberlain Reviewed-by: Sergey Senozhatsky Acked-by: Russ Weight Acked-by: Greg Kroah-Hartman Acked-by: Paulo Alcantara (SUSE) Link: https://lore.kernel.org/r/20221026232943.never.775-kees@kernel.org drivers/base/firmware_loader/main.c | 2 +- fs/cifs/cifs_spnego.c | 2 +- fs/cifs/cifsacl.c | 2 +- fs/ksmbd/smb_common.c | 2 +- fs/nfs/flexfilelayout/flexfilelayout.c | 4 ++-- fs/nfs/nfs4idmap.c | 2 +- fs/nfsd/nfs4callback.c | 2 +- kernel/cred.c | 15 +++++++-------- net/dns_resolver/dns_key.c | 2 +- 9 files changed, 16 insertions(+), 17 deletions(-) commit e9a40e1585d792751d3a122392695e5a53032809 Author: Kees Cook Date: Tue Oct 25 16:05:18 2022 -0700 fortify: Do not cast to "unsigned char" Do not cast to "unsigned char", as this needlessly creates type problems when attempting builds without -Wno-pointer-sign[1]. The intent of the cast is to drop possible "const" types. [1] https://lore.kernel.org/lkml/CAHk-=wgz3Uba8w7kdXhsqR1qvfemYL+OFQdefJnkeqXG8qZ_pA@mail.gmail.com/ Suggested-by: Linus Torvalds Fixes: 3009f891bb9f ("fortify: Allow strlen() and strnlen() to pass compile-time known lengths") Cc: linux-hardening@vger.kernel.org Signed-off-by: Kees Cook include/linux/fortify-string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb3d88ab354b3b07e805aba9d67cbb43d23dc70e Author: Kees Cook Date: Sun Oct 2 19:45:23 2022 -0700 siphash: Convert selftest to KUnit Convert the siphash self-test to KUnit so it will be included in "all KUnit tests" coverage, and can be run individually still: $ ./tools/testing/kunit/kunit.py run siphash ... [02:58:45] Starting KUnit Kernel (1/1)... [02:58:45] ============================================================ [02:58:45] =================== siphash (1 subtest) ==================== [02:58:45] [PASSED] siphash_test [02:58:45] ===================== [PASSED] siphash ===================== [02:58:45] ============================================================ [02:58:45] Testing complete. Ran 1 tests: passed: 1 [02:58:45] Elapsed time: 21.421s total, 4.306s configuring, 16.947s building, 0.148s running Cc: Vlastimil Babka Cc: "Steven Rostedt (Google)" Cc: Yury Norov Cc: Sander Vanheule Acked-by: "Jason A. Donenfeld" Link: https://lore.kernel.org/lkml/CAHmME9r+9MPH6zk3Vn=buEMSbQiWMFryqqzerKarmjYk+tHLJA@mail.gmail.com Tested-by: David Gow Signed-off-by: Kees Cook MAINTAINERS | 2 +- lib/Kconfig.debug | 20 ++-- lib/Makefile | 2 +- lib/{test_siphash.c => siphash_kunit.c} | 165 ++++++++++++++------------------ 4 files changed, 83 insertions(+), 106 deletions(-) commit 62e1cbfc5d795381a0f237ae7ee229a92d51cf9e Author: Kees Cook Date: Sun Oct 2 09:17:03 2022 -0700 fortify: Short-circuit known-safe calls to strscpy() Replacing compile-time safe calls of strcpy()-related functions with strscpy() was always calling the full strscpy() logic when a builtin would be better. For example: char buf[16]; strcpy(buf, "yes"); would reduce to __builtin_memcpy(buf, "yes", 4), but not if it was: strscpy(buf, yes, sizeof(buf)); Fix this by checking if all sizes are known at compile-time. Cc: linux-hardening@vger.kernel.org Tested-by: Nathan Chancellor Signed-off-by: Kees Cook include/linux/fortify-string.h | 10 ++++++++++ lib/strscpy_kunit.c | 13 +++++++++++++ 2 files changed, 23 insertions(+) commit 41eefc46a3a4682976afb5f8c4b9734ed6bfd406 Author: Kees Cook Date: Sun Oct 2 09:51:46 2022 -0700 string: Convert strscpy() self-test to KUnit Convert the strscpy() self-test to a KUnit test. Cc: David Gow Cc: Tobin C. Harding Tested-by: Nathan Chancellor Link: https://lore.kernel.org/lkml/Y072ZMk/hNkfwqMv@dev-arch.thelio-3990X Signed-off-by: Kees Cook MAINTAINERS | 1 + lib/Kconfig.debug | 8 +-- lib/Makefile | 2 +- lib/strscpy_kunit.c | 129 ++++++++++++++++++++++++++++++++++++++++++++ lib/test_strscpy.c | 150 ---------------------------------------------------- 5 files changed, 136 insertions(+), 154 deletions(-) commit 9e4a617757273a86b560c1ece40c48e4940a3c79 Author: Kees Cook Date: Thu Sep 29 02:24:53 2022 -0700 string: Add __realloc_size hint to kmemdup() Add __realloc_size() hint to kmemdup() so the compiler can reason about the length of the returned buffer. (These must not use __alloc_size, since those include __malloc which says the contents aren't defined[1]). [1] https://lore.kernel.org/linux-hardening/d199c2af-06af-8a50-a6a1-00eefa0b67b4@prevas.dk/ Cc: Rasmus Villemoes Cc: Guenter Roeck Cc: Andy Shevchenko Cc: Paolo Abeni Cc: Geert Uytterhoeven Signed-off-by: Kees Cook include/linux/fortify-string.h | 3 ++- include/linux/string.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 545094d993f4639482018becda5f2a47d126f0ab Author: Jiri Slaby (SUSE) Date: Mon Oct 31 12:42:47 2022 +0100 drm/amd/display (gcc13): fix enum mismatch rn_vbios_smu_set_dcn_low_power_state() produces a valid warning with gcc-13: drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c:237:6: error: conflicting types for 'rn_vbios_smu_set_dcn_low_power_state' due to enum/integer mismatch; have 'void(struct clk_mgr_internal *, enum dcn_pwr_state)' drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.h:36:6: note: previous declaration of 'rn_vbios_smu_set_dcn_low_power_state' with type 'void(struct clk_mgr_internal *, int)' I.e. the type of the 2nd parameter of rn_vbios_smu_set_dcn_low_power_state() in the declaration is int, while the definition spells enum dcn_pwr_state. Synchronize them to the latter (and add a forward enum declaration). Cc: Martin Liska Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Harry Wentland Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ba6029726854e43e77fec05af5299a671e8483a0 Author: Aric Cyr Date: Sun Oct 23 13:41:03 2022 -0400 drm/amd/display: 3.2.210 DC version 3.2.210 brings along the following: - Investigate tool reported FCLK P-state deviations - Fix null pointer issues found in emulation - Add DSC delay factor workaround - Round up DST_after_scaler to nearest int - Use forced DSC bpp in DML - Fix DCN32 DSC delay calculation - Add a debug option HBR2CP2520 over TPS4 - Stop waiting for vblank during pipe programming - Modify checks to enable TPS3 pattern when required - Remove rate check from pixel rate divider update - Check validation passed after applying pipe split changes - Update DML formula - Don't enable ODM + MPO - Include virtual signal to set k1 and k2 values - Reinit DPG when exiting dynamic ODM Acked-by: Alex Hung Signed-off-by: Aric Cyr Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ee8b902b891723237e3aace0c2ec640327f31d2 Author: Nevenko Stupar Date: Fri May 6 16:32:38 2022 -0400 drm/amd/display: Investigate tool reported FCLK P-state deviations [Why] Fix for some of the tool reported modes for FCLK P-state deviations and UCLK P-state deviations that are coming from DSC terms and/or Scaling terms causing MinActiveFCLKChangeLatencySupported and MaxActiveDRAMClockChangeLatencySupported incorrectly calculated in DML for these configurations. Reviewed-by: Chaitanya Dhere Acked-by: Jasdeep Dhillon Acked-by: Alex Hung Signed-off-by: Nevenko Stupar Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6818f755f737758211d196cf7015628a88622d85 Author: Charlene Liu Date: Fri Oct 21 15:39:09 2022 -0400 drm/amd/display: Fix null pointer issues found in emulation [why] fix null point issues found in emulation Reviewed-by: Chris Park Acked-by: Alex Hung Signed-off-by: Charlene Liu Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f30508e918b4011f44f617f13f8251e72f1a5661 Author: George Shen Date: Fri Oct 14 17:46:03 2022 -0400 drm/amd/display: Add DSC delay factor workaround [Why] Certain 4K high refresh rate modes requiring DSC are exhibiting top of screen underflow corruption. Increasing the DSC delay by a factor of 6 percent stops the underflow for most use cases. [How] Multiply DSC delay requirement in DML by a factor. Add debug option to make this DSC delay factor configurable. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: George Shen Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 4 +++- drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 5 +++-- drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 5 +++-- drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.h | 3 ++- drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 5 ++++- drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 3 +++ 7 files changed, 19 insertions(+), 7 deletions(-) commit fa7e2b031faf84a607c2b81c15328314b286bc6a Author: George Shen Date: Fri Oct 14 17:40:08 2022 -0400 drm/amd/display: Round up DST_after_scaler to nearest int [Why] The DST_after_scaler value that DML spreadsheet outputs is generally the driver value round up to the nearest int. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: George Shen Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_rq_dlg_calc_32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e70a70d0c03f5594cd09a1a2732c7e136f9c8edd Author: George Shen Date: Fri Oct 14 17:36:32 2022 -0400 drm/amd/display: Use forced DSC bpp in DML [Why] DSC config is calculated separately from DML calculations. DML should use these separately calculated DSC params. The issue is that the calculated bpp is not properly propagated into DML. [How] Correctly used forced_bpp value in DML. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: George Shen Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 +- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 86975c34b6e2ce85b5b03f3b0a83333c97890ad7 Author: George Shen Date: Fri Oct 7 12:43:26 2022 -0400 drm/amd/display: Fix DCN32 DSC delay calculation [Why] DCN32 DSC delay calculation had an unintentional integer division, resulting in a mismatch against the DML spreadsheet. [How] Cast numerator to double before performing the division. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: George Shen Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf472dbdd7204e1aaaf587df067e8e986616788b Author: Anthony Koo Date: Sat Oct 22 22:18:19 2022 -0400 drm/amd/display: [FW Promotion] Release 0.0.141.0 - Add flag as a status read back that indicates back to back flips detected during psr. Reviewed-by: Aric Cyr Acked-by: Alex Hung Signed-off-by: Anthony Koo Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 6 ++++++ 1 file changed, 6 insertions(+) commit da339aa4573de3526890627490ee5f61c1de9c31 Author: Leo Chen Date: Fri Oct 21 18:24:02 2022 -0400 drm/amd/display: Add a debug option HBR2CP2520 over TPS4 [Why & How] There are cases when we may need to override the hardcoded TPS4 test pattern. Added parameters and config option to be able to allow this. Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Leo Chen Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 ++ 6 files changed, 11 insertions(+) commit 935e35d8dbde76a02d00290cf4d9eb420514eaf3 Author: Martin Leung Date: Fri Oct 21 15:28:52 2022 -0400 drm/amd/display: Stop waiting for vblank during pipe programming [why and how] This line was originally removed for a compliance issue, but then reverted as it caused a fringe underflow case. However, the addition of this line caused a underflow regression when subVP is on, and it needs to be removed again. We plan to fix subvp underflow and then re-add in this line. After that, we will investigate what to do next for the compliance issue. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: Martin Leung Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 1 - 1 file changed, 1 deletion(-) commit 361edc61a05cdbc99c6b53264d42af1533e9c20c Author: Iswara Nagulendran Date: Fri Oct 21 12:27:12 2022 -0400 drm/amd/display: Modify checks to enable TPS3 pattern when required [HOW&WHY] Checking if both DSC and FEC supported from sink and source before going with TPS3 pattern during link training. Reviewed-by: Anthony Koo Acked-by: Alex Hung Signed-off-by: Iswara Nagulendran Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 14e1f089d5ee0519af0c646efbc3196d3e1674ba Author: Taimur Hassan Date: Fri Oct 21 10:54:42 2022 -0400 drm/amd/display: Remove rate check from pixel rate divider update [Why] This check is not needed, and can cause CRC mismatch. [How] Remove check and early exit from divider update. Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Taimur Hassan Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c40f8b132e6014e3034926cc492f113d9d5ca85b Author: Dillon Varone Date: Wed Oct 19 18:42:49 2022 -0400 drm/amd/display: Check validation passed after applying pipe split changes [WHY?] Validation can fail for configurations that were previously supported, by only changing parameters such as the DET allocations, which is currently unexpected. [HOW?] Add a check that validation passes after applying pipe split related changes. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: Dillon Varone Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6139ab41f26848c92fd20fd678e1b7e5fb17959c Author: Charlene Liu Date: Thu Oct 20 16:21:13 2022 -0400 drm/amd/display: Update DML formula [why] This is to update SW DML implementation. Reviewed-by: Dmytro Laktyushkin Reviewed-by: Ariel Bernstein Acked-by: Alex Hung Signed-off-by: Charlene Liu Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c | 3 ++- drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 667be3ef1bb93a599fd425acb914dfbbf433dda0 Author: Alvin Lee Date: Thu Oct 20 16:07:07 2022 -0400 drm/amd/display: Don't enable ODM + MPO [Description] Driver doesn't support ODM + MPO Reviewed-by: Dillon Varone Acked-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 4 ---- 1 file changed, 4 deletions(-) commit 368307cef69ccd9bf5511f25e58e3a103be169fb Author: Eric Bernstein Date: Tue Oct 11 14:28:47 2022 -0400 drm/amd/display: Include virtual signal to set k1 and k2 values Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Eric Bernstein Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fbf451e7639f4ce41e2e3e802e5c521c1827b48 Author: Dillon Varone Date: Mon Oct 17 18:51:15 2022 -0400 drm/amd/display: Reinit DPG when exiting dynamic ODM [WHY] DPG must be returned to initialized state when pipe is disabled. [HOW] Reinit DPG on unused pipes when exiting dynamic ODM. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: Dillon Varone Tested-by: Mark Broadworth Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 26f2fe8608374e3dda39d01a6acd42d1f67b8ee1 Author: Hamza Mahfooz Date: Mon Oct 31 10:47:36 2022 -0400 drm/amd/display: drop vblank_lock from struct amdgpu_display_manager As of commit 09a5df6c444c ("drm/amd/display: Fix multi-display support for idle opt workqueue"), vblank_lock is no longer being used. So, don't init it in amdgpu_dm_init() and remove it from struct amdgpu_display_manager. Reviewed-by: Harry Wentland Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 7 ------- 2 files changed, 8 deletions(-) commit ee22f63b1085fd5cf1649e8915b1e2617cd33ca0 Author: Ma Jun Date: Wed Oct 26 17:29:18 2022 +0800 drm/amdkfd: Remove unused variable kfd_topology_device->cache_count is not used by other fucntions, so remove it. Signed-off-by: Ma Jun Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 1 - drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 1 - 2 files changed, 2 deletions(-) commit 2c763f37d0a08d39c1a0b1318fa82896c31a6c9d Author: Yifan Zha Date: Tue Oct 25 15:47:19 2022 +0800 drm/amdgpu: Skip program gfxhub_v3_0_3 system aperture registers under SRIOV [Why] gfxhub_v3_0_3 system aperture registers are removed from RLCG register access range. [How] Skip access gfxhub_v3_0_3 system aperture registers under SRIOV VF. These registers will be programmed on host side. Signed-off-by: Yifan Zha Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.c | 3 +++ 1 file changed, 3 insertions(+) commit e1a29b28e70457549149d3b2c82e4333d68ac49d Author: Yifan Zha Date: Tue Oct 25 14:46:11 2022 +0800 drm/amdgpu: Skip access SDMA0_F32_CNTL in sdma_v6_0_enable under SRIOV [Why] SDMA0_F32_CNTL is a PF_only regitser which will be blocked by L1. RLCG will not program the register as well. [How] Skip to program SDMA0_F32_CNTL under SRIOV VF. Signed-off-by: Yifan Zha Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 47a7470bb2ca2d2ccbd945082e5ebf0279a33fe5 Author: Yifan Zha Date: Tue Oct 25 16:55:05 2022 +0800 drm/amdgpu: Skip access GRBM_CNTL under SRIOV on gfx_v11 [Why] GRBM_CNTL is a PF_only register on gfx_v11. RLCG interface will return "out of range" under SRIOV VF. [How] Skip access GRBM_CNTL under gfx_v11 SRIOV VF. Signed-off-by: Yifan Zha Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2103c42198d38d6c02f8b9720c2a19cf3b4adddd Author: Gavin Wan Date: Wed Oct 26 13:45:25 2022 -0400 drm/amdgpu: Disable GPU reset on SRIOV before remove pci. The recent change brought a bug on SRIOV envrionment. It caused unloading amdgpu failed on Guest VM. The reason is that the VF FLR was requested while unloading amdgpu driver, but the VF FLR of SRIOV sequence is wrong while removing PCI device. For SRIOV, the guest driver should not trigger the whole XGMI hive to do the reset. Host driver control how the device been reset. Fixes: f5c7e7797060 ("drm/amdgpu: Adjust removal control flow for smu v13_0_2") Acked-by: Alex Deucher Reviewed-by: Shaoyun Liu Signed-off-by: Gavin Wan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9d1b073d018bcb1701a00cc3d4b8c6998cc34a4e Author: Candice Li Date: Fri Jul 22 20:39:12 2022 +0800 drm/amdgpu: Enable GFX RAS feature for gfx v11_0_3 v1: Support gfx ras feature enablement for gfx v11_0_3. v2: Update function name and error message. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit dc572f418a14b18270676c4a7d23a3c8a5544abc Author: Kemeng Shi Date: Tue Oct 18 19:12:40 2022 +0800 block: Replace struct rq_depth with unsigned int in struct iolatency_grp We only need a max queue depth for every iolatency to limit the inflight io number. Replace struct rq_depth with unsigned int to simplfy "struct iolatency_grp" and save memory. Signed-off-by: Kemeng Shi Reviewed-by: Josef Bacik Link: https://lore.kernel.org/r/20221018111240.22612-4-shikemeng@huawei.com Signed-off-by: Jens Axboe block/blk-iolatency.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 6891f968985f0569eaf56430518895b3c2885da1 Author: Kemeng Shi Date: Tue Oct 18 19:12:39 2022 +0800 block: Correct comment for scale_cookie_change Default queue depth of iolatency_grp is unlimited, so we scale down quickly(once by half) in scale_cookie_change. Remove the "subtract 1/16th" part which is not the truth and add the actual way we scale down. Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20221018111240.22612-3-shikemeng@huawei.com Signed-off-by: Jens Axboe block/blk-iolatency.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit db5896e9cf93f119c0b181c5e6b473d8bf0302e5 Author: Kemeng Shi Date: Tue Oct 18 19:12:38 2022 +0800 block: Remove redundant parent blkcg_gp check in check_scale_change Function blkcg_iolatency_throttle will make sure blkg->parent is not NULL before calls check_scale_change. And function check_scale_change is only called in blkcg_iolatency_throttle. Signed-off-by: Kemeng Shi Reviewed-by: Josef Bacik Link: https://lore.kernel.org/r/20221018111240.22612-2-shikemeng@huawei.com Signed-off-by: Jens Axboe block/blk-iolatency.c | 3 --- 1 file changed, 3 deletions(-) commit 64b36075eb0e50af6f59047b5f698a9f2bb2b4fd Author: Christoph Hellwig Date: Sun Oct 30 11:07:14 2022 +0100 block: split elevator_switch Split an elevator_disable helper from elevator_switch for the case where we want to switch to no scheduler at all. This includes removing the pointless elevator_switch_mq helper and removing the switch to no schedule logic from blk_mq_init_sched. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221030100714.876891-8-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq-sched.c | 7 ----- block/blk-mq.c | 2 +- block/blk.h | 1 + block/elevator.c | 77 ++++++++++++++++++++++++++-------------------------- 4 files changed, 40 insertions(+), 47 deletions(-) commit ffb86425ee2cadbe573c483b789aab2dd57aeb7b Author: Christoph Hellwig Date: Sun Oct 30 11:07:13 2022 +0100 block: don't check for required features in elevator_match Checking for the required features in the callers simplifies the code quite a bit, so do that. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221030100714.876891-7-hch@lst.de [axboe: adjust for dropping patch 1, use __elevator_find()] Signed-off-by: Jens Axboe block/elevator.c | 51 ++++++++++++++++----------------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) commit 03e9491fff252a7435e109333ec51ca2d619b759 Author: Andy Shevchenko Date: Thu Oct 27 21:41:45 2022 +0300 pinctrl: qcom: lpass-lpi: Add missed bitfield.h Previously the cleanup change dropped the bitfield.h from the pinctrl-lpass-lpi.h, since it's not used there, but forgot to re-instantiate it in the C-file, where users are located. Fix this by adding missed bitfield.h to the C-file. Fixes: aa9430f8a6de ("pinctrl: qcom: Add missing header(s)") Reported-by: kernel test robot Reported-by: Nathan Chancellor Signed-off-by: Andy Shevchenko drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 1 + 1 file changed, 1 insertion(+) commit 5b0c03e24a061f9c9e8b28fa157b80990c559a37 Author: Alistair Francis Date: Mon Oct 31 16:36:53 2022 -0700 Input: Add driver for Cypress Generation 5 touchscreen This is the basic driver for the Cypress TrueTouch Gen5 touchscreen controllers. This driver supports only the I2C bus but it uses regmap so SPI support could be added later. The touchscreen can retrieve some defined zone that are handled as buttons (according to the hardware). That is why it handles button and multitouch events. Reviewed-by: Maxime Ripard Signed-off-by: Mylène Josserand Signed-off-by: Alistair Francis Tested-by: Andreas Kemnade # Kobo Clara HD Tested-by: Peter Geis Link: https://lore.kernel.org/r/20221026114908.191472-2-alistair@alistair23.me Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 16 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/cyttsp5.c | 901 ++++++++++++++++++++++++++++++++++++ 3 files changed, 918 insertions(+) commit cdb51323360c9d3cc33831a2eb3ea75b967985af Author: Alistair Francis Date: Wed Oct 26 21:49:06 2022 +1000 dt-bindings: input: Add Cypress TT21000 touchscreen controller Add the Cypress TrueTouch Generation 5 touchscreen device tree bindings documentation. It can use I2C or SPI bus. This touchscreen can handle some defined zone that are designed and sent as button. To be able to customize the keycode sent, the "linux,code" property in a "button" sub-node can be used. Signed-off-by: Alistair Francis Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221026114908.191472-3-alistair@alistair23.me Signed-off-by: Dmitry Torokhov .../input/touchscreen/cypress,tt21000.yaml | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) commit e9ec88a2a612bf568eb52ef8fdf333a0a26e1785 Merge: e5afc8677c0d 77a7a6e9a94d Author: Mark Brown Date: Tue Nov 1 14:33:10 2022 +0000 Add support for MICFIL on i.MX93 platform Merge series from Chancel Liu : This patchset supports MICFIL on i.MX93 platform. commit 3a07dcf8f57b9a90b1c07df3e9091fd04baa3036 Author: Kang Minchul Date: Mon Oct 31 03:02:54 2022 +0900 samples/bpf: Fix typo in README Fix 'cofiguration' typo in BPF samples README. Signed-off-by: Kang Minchul Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221030180254.34138-1-tegongkang@gmail.com samples/bpf/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2eef17a209ab4d77923222045d462d379d6ef692 Author: Christoph Hellwig Date: Sun Oct 30 11:07:12 2022 +0100 block: simplify the check for the current elevator in elv_iosched_show Just compare the pointers instead of using the string based elevator_match. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221030100714.876891-6-hch@lst.de Signed-off-by: Jens Axboe block/elevator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16095af2fa2c3089ff1162e677d6596772f6f478 Author: Christoph Hellwig Date: Sun Oct 30 11:07:11 2022 +0100 block: cleanup the variable naming in elv_iosched_store Use eq for the elevator_queue as done elsewhere. This frees e to be used for the loop iterator instead of the odd __ prefix. In addition rename elv to cur to make it more clear it is the currently selected elevator. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221030100714.876891-5-hch@lst.de Signed-off-by: Jens Axboe block/elevator.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit aae2a643f508d768b65e59da447f3b11688db3cf Author: Christoph Hellwig Date: Sun Oct 30 11:07:10 2022 +0100 block: exit elv_iosched_show early when I/O schedulers are not supported If the tag_set has BLK_MQ_F_NO_SCHED flag set we will never show any scheduler, so exit early. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221030100714.876891-4-hch@lst.de Signed-off-by: Jens Axboe block/elevator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 81eaca442ea962c43bdb1e9cbb9eddb41b97491d Author: Christoph Hellwig Date: Sun Oct 30 11:07:09 2022 +0100 block: cleanup elevator_get Do the request_module and repeated lookup in the only caller that cares, pick a saner name that explains where are actually doing a lookup and use a sane calling conventions that passes the queue first. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221030100714.876891-3-hch@lst.de Signed-off-by: Jens Axboe block/elevator.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit d755f89220a2b49bc90b7b520bb6edeb4adb5f01 Author: Jouni Högander Date: Mon Oct 24 08:46:49 2022 +0300 drm/i915/psr: Send update also on invalidate Currently we are observing mouse cursor stuttering when using xrandr --scaling=1.2x1.2. X scaling/transformation seems to be doing fronbuffer rendering. When moving mouse cursor X seems to perform several invalidates and only one DirtyFB. I.e. it seems to be assuming updates are sent to panel while drawing is done. Earlier we were disabling PSR in frontbuffer invalidate call back (when drawing in X started). PSR was re-enabled in frontbuffer flush callback (dirtyfb ioctl). This was working fine with X scaling/transformation. Now we are just enabling continuous full frame (cff) in PSR invalidate callback. Enabling cff doesn't trigger any updates. It just configures PSR to send full frame when updates are sent. I.e. there are no updates on screen before PSR flush callback is made. X seems to be doing several updates in frontbuffer before doing dirtyfb ioctl. Fix this by sending single update on every invalidate callback. Cc: José Roberto de Souza Cc: Ville Syrjälä Cc: Mika Kahola Fixes: 805f04d42a6b ("drm/i915/display/psr: Use continuos full frame to handle frontbuffer invalidations") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6679 Signed-off-by: Jouni Högander Reported-by: Brian J. Tarricone Tested-by: Brian J. Tarricone Reviewed-by: Mika Kahola Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20221024054649.31299-1-jouni.hogander@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit eb5bca73655cb6aa3bb608253e1e47283240c933 Author: Yu Kuai Date: Fri Sep 16 15:19:42 2022 +0800 block, bfq: cleanup __bfq_weights_tree_remove() It's the same with bfq_weights_tree_remove() now. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Acked-by: Paolo Valente Link: https://lore.kernel.org/r/20220916071942.214222-7-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 11 +---------- block/bfq-iosched.h | 1 - block/bfq-wf2q.c | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) commit afdba14612622ec75896e5646950b3562a9aadd3 Author: Yu Kuai Date: Fri Sep 16 15:19:41 2022 +0800 block, bfq: cleanup bfq_weights_tree add/remove apis The 'bfq_data' and 'rb_root_cached' can both be accessed through 'bfq_queue', thus only pass 'bfq_queue' as parameter. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Acked-by: Paolo Valente Link: https://lore.kernel.org/r/20220916071942.214222-6-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 19 +++++++++---------- block/bfq-iosched.h | 10 +++------- block/bfq-wf2q.c | 18 ++++++------------ 3 files changed, 18 insertions(+), 29 deletions(-) commit eed3ecc991c90a4a0ce32ea2b35378dc351f012b Author: Yu Kuai Date: Fri Sep 16 15:19:40 2022 +0800 block, bfq: do not idle if only one group is activated Now that root group is counted into 'num_groups_with_pending_reqs', 'num_groups_with_pending_reqs > 0' is always true in bfq_asymmetric_scenario(). Thus change the condition to '> 1'. On the other hand, this change can enable concurrent sync io if only one group is activated. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Acked-by: Paolo Valente Link: https://lore.kernel.org/r/20220916071942.214222-5-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71f8ca77cb8764d46f656b725999e8b8b1aec215 Author: Yu Kuai Date: Fri Sep 16 15:19:39 2022 +0800 block, bfq: refactor the counting of 'num_groups_with_pending_reqs' Currently, bfq can't handle sync io concurrently as long as they are not issued from root group. This is because 'bfqd->num_groups_with_pending_reqs > 0' is always true in bfq_asymmetric_scenario(). The way that bfqg is counted into 'num_groups_with_pending_reqs': Before this patch: 1) root group will never be counted. 2) Count if bfqg or it's child bfqgs have pending requests. 3) Don't count if bfqg and it's child bfqgs complete all the requests. After this patch: 1) root group is counted. 2) Count if bfqg have pending requests. 3) Don't count if bfqg complete all the requests. With this change, the occasion that only one group is activated can be detected, and next patch will support concurrent sync io in the occasion. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Acked-by: Paolo Valente Link: https://lore.kernel.org/r/20220916071942.214222-4-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 42 ------------------------------------------ block/bfq-iosched.h | 18 +++++++++--------- block/bfq-wf2q.c | 23 ++++++++--------------- 3 files changed, 17 insertions(+), 66 deletions(-) commit 60a6e10c537a7459dd53882186bd16fff257fb03 Author: Yu Kuai Date: Fri Sep 16 15:19:38 2022 +0800 block, bfq: record how many queues have pending requests Prepare to refactor the counting of 'num_groups_with_pending_reqs'. Add a counter in bfq_group, update it while tracking if bfqq have pending requests and when bfq_bfqq_move() is called. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Acked-by: Paolo Valente Link: https://lore.kernel.org/r/20220916071942.214222-3-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-cgroup.c | 10 ++++++++++ block/bfq-iosched.h | 1 + block/bfq-wf2q.c | 12 ++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) commit 3d89bd12d352e20f4f7c8f11a0f1a712b95a5295 Author: Yu Kuai Date: Fri Sep 16 15:19:37 2022 +0800 block, bfq: support to track if bfqq has pending requests If entity belongs to bfqq, then entity->in_groups_with_pending_reqs is not used currently. This patch use it to track if bfqq has pending requests through callers of weights_tree insertion and removal. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Acked-by: Paolo Valente Link: https://lore.kernel.org/r/20220916071942.214222-2-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 1 + block/bfq-iosched.h | 2 ++ block/bfq-wf2q.c | 24 ++++++++++++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) commit 0c3e806ec0f9771fa1f34c60499097d9260a8bb7 Author: Peter Zijlstra Date: Thu Oct 27 11:28:16 2022 +0200 x86/cfi: Add boot time hash randomization In order to avoid known hashes (from knowing the boot image), randomize the CFI hashes with a per-boot random seed. Suggested-by: Kees Cook Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20221027092842.765195516@infradead.org arch/x86/kernel/alternative.c | 120 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 108 insertions(+), 12 deletions(-) commit 082c4c815252ea333b0f3a51e336df60c2314fe2 Author: Peter Zijlstra Date: Thu Oct 27 11:28:15 2022 +0200 x86/cfi: Boot time selection of CFI scheme Add the "cfi=" boot parameter to allow people to select a CFI scheme at boot time. Mostly useful for development / debugging. Requested-by: Kees Cook Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20221027092842.699804264@infradead.org arch/x86/kernel/alternative.c | 99 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 81 insertions(+), 18 deletions(-) commit 931ab63664f02b17d2213ef36b83e1e50190a0aa Author: Peter Zijlstra Date: Thu Oct 27 11:28:14 2022 +0200 x86/ibt: Implement FineIBT Implement an alternative CFI scheme that merges both the fine-grained nature of kCFI but also takes full advantage of the coarse grained hardware CFI as provided by IBT. To contrast: kCFI is a pure software CFI scheme and relies on being able to read text -- specifically the instruction *before* the target symbol, and does the hash validation *before* doing the call (otherwise control flow is compromised already). FineIBT is a software and hardware hybrid scheme; by ensuring every branch target starts with a hash validation it is possible to place the hash validation after the branch. This has several advantages: o the (hash) load is avoided; no memop; no RX requirement. o IBT WAIT-FOR-ENDBR state is a speculation stop; by placing the hash validation in the immediate instruction after the branch target there is a minimal speculation window and the whole is a viable defence against SpectreBHB. o Kees feels obliged to mention it is slightly more vulnerable when the attacker can write code. Obviously this patch relies on kCFI, but additionally it also relies on the padding from the call-depth-tracking patches. It uses this padding to place the hash-validation while the call-sites are re-written to modify the indirect target to be 16 bytes in front of the original target, thus hitting this new preamble. Notably, there is no hardware that needs call-depth-tracking (Skylake) and supports IBT (Tigerlake and onwards). Suggested-by: Joao Moreira (Intel) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20221027092842.634714496@infradead.org arch/um/kernel/um_arch.c | 5 + arch/x86/Kconfig | 14 +- arch/x86/Makefile | 2 +- arch/x86/include/asm/alternative.h | 2 + arch/x86/include/asm/linkage.h | 6 +- arch/x86/kernel/alternative.c | 253 +++++++++++++++++++++++++++++++++++-- arch/x86/kernel/cpu/common.c | 1 + arch/x86/kernel/module.c | 20 ++- arch/x86/kernel/vmlinux.lds.S | 9 ++ include/linux/bpf.h | 2 +- scripts/Makefile.lib | 1 + 11 files changed, 294 insertions(+), 21 deletions(-) commit 9a479f766be1dd777e12e3e57b6ee4c3028a40a5 Author: Peter Zijlstra Date: Thu Oct 27 11:28:13 2022 +0200 objtool: Add --cfi to generate the .cfi_sites section Add the location of all __cfi_##name symbols (as generated by kCFI) to a section such that we might re-write things at kernel boot. Notably; boot time re-hashing and FineIBT are the intended use of this. Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221027092842.568039454@infradead.org tools/objtool/builtin-check.c | 1 + tools/objtool/check.c | 69 +++++++++++++++++++++++++++++++++ tools/objtool/include/objtool/builtin.h | 1 + 3 files changed, 71 insertions(+) commit b341b20d648bb7e9a3307c33163e7399f0913e66 Author: Peter Zijlstra Date: Fri Oct 28 21:08:19 2022 +0200 x86: Add prefix symbols for function padding When code is compiled with: -fpatchable-function-entry=${PADDING_BYTES},${PADDING_BYTES} functions will have PADDING_BYTES of NOP in front of them. Unwinders and other things that symbolize code locations will typically attribute these bytes to the preceding function. Given that these bytes nominally belong to the following symbol this mis-attribution is confusing. Inspired by the fact that CFI_CLANG emits __cfi_##name symbols to claim these bytes, use objtool to emit __pfx_##name symbols to do the same when CFI_CLANG is not used. This then shows the callthunk for symbol 'name' as: __pfx_##name+0x6/0x10 Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yujie Liu Link: https://lkml.kernel.org/r/20221028194453.592512209@infradead.org arch/x86/Kconfig | 4 ++++ scripts/Makefile.lib | 1 + 2 files changed, 5 insertions(+) commit 9f2899fe36a623885d8576604cb582328ad32b3c Author: Peter Zijlstra Date: Fri Oct 28 15:50:42 2022 +0200 objtool: Add option to generate prefix symbols When code is compiled with: -fpatchable-function-entry=${PADDING_BYTES},${PADDING_BYTES} functions will have PADDING_BYTES of NOP in front of them. Unwinders and other things that symbolize code locations will typically attribute these bytes to the preceding function. Given that these bytes nominally belong to the following symbol this mis-attribution is confusing. Inspired by the fact that CFI_CLANG emits __cfi_##name symbols to claim these bytes, allow objtool to emit __pfx_##name symbols to do the same. Therefore add the objtool --prefix=N argument, to conditionally place a __pfx_##name symbol at N bytes ahead of symbol 'name' when: all these preceding bytes are NOP and name-N is an instruction boundary. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yujie Liu Link: https://lkml.kernel.org/r/20221028194453.526899822@infradead.org tools/objtool/builtin-check.c | 1 + tools/objtool/check.c | 33 ++++++++++++++++++++++++++++++++- tools/objtool/elf.c | 31 +++++++++++++++++++++++++++++++ tools/objtool/include/objtool/builtin.h | 1 + tools/objtool/include/objtool/elf.h | 2 ++ 5 files changed, 67 insertions(+), 1 deletion(-) commit 13f60e80e15dd0657c90bcca372ba045630ed9de Author: Peter Zijlstra Date: Fri Oct 28 20:29:51 2022 +0200 objtool: Avoid O(bloody terrible) behaviour -- an ode to libelf Due to how gelf_update_sym*() requires an Elf_Data pointer, and how libelf keeps Elf_Data in a linked list per section, elf_update_symbol() ends up having to iterate this list on each update to find the correct Elf_Data for the index'ed symbol. By allocating one Elf_Data per new symbol, the list grows per new symbol, giving an effective O(n^2) insertion time. This is obviously bloody terrible. Therefore over-allocate the Elf_Data when an extention is needed. Except it turns out libelf disregards Elf_Scn::sh_size in favour of the sum of Elf_Data::d_size. IOW it will happily write out all the unused space and fill it with: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND entries (aka zeros). Which obviously violates the STB_LOCAL placement rule, and is a general pain in the backside for not being the desired behaviour. Manually fix-up the Elf_Data size to avoid this problem before calling elf_update(). This significantly improves performance when adding a significant number of symbols. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yujie Liu Link: https://lkml.kernel.org/r/20221028194453.461658986@infradead.org tools/objtool/elf.c | 89 ++++++++++++++++++++++++++++++++++--- tools/objtool/include/objtool/elf.h | 2 +- 2 files changed, 84 insertions(+), 7 deletions(-) commit 4c91be8e926c6b3734d59b9348e305431484d42b Author: Peter Zijlstra Date: Fri Oct 28 15:49:26 2022 +0200 objtool: Slice up elf_create_section_symbol() In order to facilitate creation of more symbol types, slice up elf_create_section_symbol() to extract a generic helper that deals with adding ELF symbols. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yujie Liu Link: https://lkml.kernel.org/r/20221028194453.396634875@infradead.org tools/objtool/elf.c | 56 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 21 deletions(-) commit 5ebddd7c4951c50142bcb239d4c6a82eff15759e Author: Peter Zijlstra Date: Fri Oct 28 15:26:51 2022 +0200 kallsyms: Revert "Take callthunks into account" This is a full revert of commit: f1389181622a ("kallsyms: Take callthunks into account") The commit assumes a number of things that are not quite right. Notably it assumes every symbol has PADDING_BYTES in front of it that are not claimed by another symbol. This is not true; even when compiled with: -fpatchable-function-entry=${PADDING_BYTES},${PADDING_BYTES} Notably things like .cold subfunctions do not need to adhere to this change in ABI. It it also not true when build with CFI_CLANG, which claims these PADDING_BYTES in the __cfi_##name symbol. Once the prefix bytes are not consistent and or otherwise claimed the approach this patch takes goes out the window and kallsym resolution will report invalid symbol names. Therefore revert this to make room for another approach. Reported-by: Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yujie Liu Link: https://lore.kernel.org/r/202210241614.2ae4c1f5-yujie.liu@intel.com Link: https://lkml.kernel.org/r/20221028194453.330970755@infradead.org kernel/kallsyms.c | 45 +++++---------------------------------------- 1 file changed, 5 insertions(+), 40 deletions(-) commit b1f37ef655cf372f96015bf54abdb76a91aff27e Author: Peter Zijlstra Date: Mon Oct 31 11:10:56 2022 +0100 x86: Unconfuse CONFIG_ and X86_FEATURE_ namespaces Lukas reported someone fat fingered the CONFIG_ symbol; fix er up. Fixes: 5d8213864ade ("x86/retbleed: Add SKL return thunk") Reported-by: Lukas Bulwahn Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/Y1+fL4qQEIGZEEKB@hirez.programming.kicks-ass.net arch/x86/include/asm/nospec-branch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ca8217dc450f7a50f90d2ad97787e38088af8e4 Author: Jonathan Neuschäfer Date: Sat Oct 8 14:59:24 2022 +0200 i2c: npcm7xx: Annotate register field definitions with longer names To make the code easier to understand, add longer names to the definitions of register fields. These longer names are based on source code published by DELL/AESS for WPCM450, but should apply just as well to NPCM7xx and NPCM8xx. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Tali Perry Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-npcm7xx.c | 56 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit a826b6e9e467ed378a2c50c4a03cb863ab681198 Author: Jonathan Neuschäfer Date: Sat Oct 8 14:59:23 2022 +0200 i2c: npcm7xx: Group bank 0/1 registers together for readability The unlabelled registers NPCM_I2CCTL4 to NPCM_I2CSCLHT overlap with the bank 1 registers below, and they are accessed after selecting bank 0, so they clearly belong to bank 0. Move them together with the other bank 0 registers, and move the unrelated definition of npcm_i2caddr down to keep the banked registers in one piece. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Tali Perry Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-npcm7xx.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit e0b7afc0eba88e8270860a573fe4ea28fe2d467c Author: Frank Wunderlich Date: Sun Oct 9 12:16:31 2022 +0200 i2c: mediatek: add mt7986 support Add i2c support for MT7986 SoC. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mt65xx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit bb2617f0f2abbd8c622b2401e5e4984a4eef895b Author: Frank Wunderlich Date: Sun Oct 9 12:16:30 2022 +0200 dt-bindings: i2c: update bindings for mt7986 soc Add i2c compatible for MT7986 SOC. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml | 1 + 1 file changed, 1 insertion(+) commit fd070e8ceb908cdf69cb2369f65831b6f11bdf6c Author: Andy Shevchenko Date: Wed Aug 24 20:05:42 2022 +0300 test_printf: Refactor fwnode_pointer() to make it more readable Converting fwnode_pointer() to use better swnode API allows to make code more readable. While at it, rename full_name to full_name_third to show exact relation in the hierarchy. Signed-off-by: Andy Shevchenko Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20220824170542.18263-1-andriy.shevchenko@linux.intel.com lib/test_printf.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 969864efae78eb51b0baa1d14b2dfe08151b5874 Author: Raju Rangoju Date: Tue Oct 25 23:41:24 2022 +0530 i2c: amd-mp2: use msix/msi if the hardware supports Use msix or msi interrupts if the hardware supports it. Else, fallback to legacy interrupts. Co-developed-by: Basavaraj Natikar Signed-off-by: Basavaraj Natikar Signed-off-by: Raju Rangoju Acked-by: Shyam Sundar S K Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-amd-mp2-pci.c | 30 +++++++++++++++++++++--------- drivers/i2c/busses/i2c-amd-mp2.h | 1 + 2 files changed, 22 insertions(+), 9 deletions(-) commit e9e6fa49dbab6d84c676666f3fe7d360497fd65b Author: Xiu Jianfeng Date: Fri Oct 28 20:33:20 2022 +0800 apparmor: Fix memleak in alloc_ns() After changes in commit a1bd627b46d1 ("apparmor: share profile name on replacement"), the hname member of struct aa_policy is not valid slab object, but a subset of that, it can not be freed by kfree_sensitive(), use aa_policy_destroy() to fix it. Fixes: a1bd627b46d1 ("apparmor: share profile name on replacement") Signed-off-by: Xiu Jianfeng Signed-off-by: John Johansen security/apparmor/policy_ns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8d6e1dd609696128e646a8c747b0f3fb1e02545 Author: Jonathan Neuschäfer Date: Mon Oct 31 23:25:59 2022 +0100 spi: nuvoton,npcm-fiu: Change spi-nor@0 name to flash@0 The node name for flash memories has been standardized to "flash@...". Fix the example in nuvoton,npcm-fiu.txt accordingly. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20221031222559.199509-1-j.neuschaefer@gmx.net Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77a7a6e9a94df0ac7ba46677b5ce4a743a931fce Author: Chancel Liu Date: Fri Oct 28 16:27:50 2022 +0800 ASoC: fsl_micfil: Add support when using eDMA On i.MX93 platform MICFIL uses eDMA. The maxburst should be set to the number of channels in eDMA multiple FIFO mode. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20221028082750.991822-4-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_micfil.c | 4 ++++ 1 file changed, 4 insertions(+) commit a10a52541f644a1fdf8876d474f31a54c4142ccc Author: Chancel Liu Date: Fri Oct 28 16:27:49 2022 +0800 ASoC: fsl_micfil: Add support for i.MX93 platform Add compatible string and specific soc data to support MICFIL on i.MX93 platform. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20221028082750.991822-3-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_micfil.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit fb3425689699daebecf27a37d729ae43ef66ebab Author: Chancel Liu Date: Fri Oct 28 16:27:48 2022 +0800 ASoC: dt-bindings: fsl,micfil: Add compatible string for i.MX93 platform Add compatible string "fsl,imx93-micfil" for i.MX93 platform Signed-off-by: Chancel Liu Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221028082750.991822-2-chancel.liu@nxp.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/fsl,micfil.yaml | 1 + 1 file changed, 1 insertion(+) commit e5afc8677c0d9be4bea5ef5ab01719e190450943 Author: Peter Bergin Date: Mon Oct 31 21:37:23 2022 +0100 ASoC: cs42xx8-i2c.c: add module device table for of When trying to connect the device with the driver through device-tree it is not working. The of_device_id is defined in cs42xx8.c but is not correctly included in cs42xx8-i2c.c. Move of_device_id table to cs42xx8-i2c.c. Get cs42xx8_driver_data in cs42xx8_i2c_probe() and pass as argument to cs42xx8_probe(). Move error check if no driver data found to cs42xx8_i2c_probe(). Signed-off-by: Peter Bergin Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20221031203723.168177-1-peter@berginkonsult.se Signed-off-by: Mark Brown sound/soc/codecs/cs42xx8-i2c.c | 28 +++++++++++++++++++++++++--- sound/soc/codecs/cs42xx8.c | 22 +++------------------- sound/soc/codecs/cs42xx8.h | 3 +-- 3 files changed, 29 insertions(+), 24 deletions(-) commit 84582f9ed090e6a6ce9841d0309c99427c12022a Author: Linus Walleij Date: Thu Oct 27 10:11:08 2022 +0200 soc: fsl: qe: Avoid using gpio_to_desc() The qe gpio driver is a custom API combined GPIO and pin control driver that exist outside of the pin control subsystem for historical reasons. We want to get rid of the old GPIO numberspace, so instead of calling gpio_to_desc() we get the gpio descriptor for the requested line from the device tree directly without passing through the GPIO numberspace, and then we get the gpiochip from the descriptor. Using the reference counting inside the gpio descriptor we can drop the reference counting code in this driver. A second gpiod_get() will not succeed. To obtain the local hardware offset of the GPIO line, the driver need to include the header from the gpiolib internals. This isn't pretty but it is the lesser evil compared to keeping the code as a roadblock to gpiolib refactoring. A proper solution would be to rewrite the driver as a real pin control driver with a built-in gpio_chip. Signed-off-by: Linus Walleij Cc: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Link: https://lore.kernel.org/r/20221027081108.174662-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann drivers/soc/fsl/qe/gpio.c | 66 +++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 36 deletions(-) commit 550a998f37b4f9c243501f735aa283c79189ba9b Author: Geert Uytterhoeven Date: Fri Oct 28 10:30:26 2022 +0200 m68k: mac: Reword comment using double "in" People keep on sending (incorrect) patches to remove the second occurrence of the word "in". Reword the comment to stop the inflood. Suggested-by: Michael Schmitz Signed-off-by: Geert Uytterhoeven Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/0229879ee3e2d8828707d291cddbb89ac18a10c2.1666945731.git.geert@linux-m68k.org arch/m68k/mac/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f64e86200974a7331cae2af306005f69474755d6 Author: Jason A. Donenfeld Date: Wed Oct 26 15:00:51 2022 +0200 m68k: mac: Remove unused rbv_set_video_bpp() In examining rbv_set_video_bpp()'s improper usage of a non-explictly signed char type, it turns out that the function is actually unused. So remove it. Signed-off-by: Jason A. Donenfeld Link: https://lore.kernel.org/r/20221026130051.1577286-1-Jason@zx2c4.com Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/mac_via.h | 8 -------- 1 file changed, 8 deletions(-) commit 7394c2dd62dec8bdbe347d195c2dc1b332cc9ec5 Author: Peng Wu Date: Tue Nov 1 01:37:28 2022 +0000 netfilter: nft_inner: fix return value check in nft_inner_parse_l2l3() In nft_inner_parse_l2l3(), the return value of skb_header_pointer() is 'veth' instead of 'eth' when case 'htons(ETH_P_8021Q)' and fix it. Fixes: 3a07327d10a0 ("netfilter: nft_inner: support for inner tunnel header matching") Signed-off-by: Peng Wu Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_inner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66394126bf2045d25b70c9327a6372186bba7d66 Author: Pablo Neira Ayuso Date: Fri Oct 28 10:05:57 2022 +0200 netfilter: nft_payload: use __be16 to store gre version GRE_VERSION and GRE_VERSION0 are expressed in network byte order, use __be16. Uncovered by sparse: net/netfilter/nft_payload.c:112:25: warning: incorrect type in assignment (different base types) net/netfilter/nft_payload.c:112:25: expected unsigned int [usertype] version net/netfilter/nft_payload.c:112:25: got restricted __be16 net/netfilter/nft_payload.c:114:22: warning: restricted __be16 degrades to integer Fixes: c247897d7c19 ("netfilter: nft_payload: access GRE payload via inner offset") Reported-by: Jakub Kicinski Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_payload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 57d545b5a3d6ce3a8fb6b093f02bfcbb908973f3 Author: Michael Walle Date: Thu Oct 27 19:12:21 2022 +0200 wifi: wilc1000: sdio: fix module autoloading There are no SDIO module aliases included in the driver, therefore, module autoloading isn't working. Add the proper MODULE_DEVICE_TABLE(). Cc: stable@vger.kernel.org Signed-off-by: Michael Walle Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221027171221.491937-1-michael@walle.cc drivers/net/wireless/microchip/wilc1000/sdio.c | 1 + 1 file changed, 1 insertion(+) commit 8d58aa484920c4f9be4834a7aeb446cdced21a37 Author: Alexey Kardashevskiy Date: Mon Oct 31 19:13:27 2022 +1100 swiotlb: reduce the swiotlb buffer size on allocation failure At the moment the AMD encrypted platform reserves 6% of RAM for SWIOTLB or 1GB, whichever is less. However it is possible that there is no block big enough in the low memory which make SWIOTLB allocation fail and the kernel continues without DMA. In such case a VM hangs on DMA. This moves alloc+remap to a helper and calls it from a loop where the size is halved on each iteration. This updates default_nslabs on successful allocation which looks like an oversight as not doing so should have broken callers of swiotlb_size_or_default(). Signed-off-by: Alexey Kardashevskiy Reviewed-by: Pankaj Gupta Signed-off-by: Christoph Hellwig kernel/dma/swiotlb.c | 63 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 24 deletions(-) commit 8b860466b137d77cb95907cacb1c9443712e6f6b Author: Kees Cook Date: Mon Oct 17 19:37:59 2022 -0700 wifi: atmel: Fix atmel_private_handler array size Fix the atmel_private_handler to correctly sized (1 element) again. (I should have checked the data segment for differences.) This had no behavioral impact (no private callbacks), but it made a very large zero-filled array. Cc: Simon Kelley Cc: Kalle Valo Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Fixes: 8af9d4068e86 ("wifi: atmel: Avoid clashing function prototypes") Signed-off-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221018023732.never.700-kees@kernel.org drivers/net/wireless/atmel/atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2c064d66e91de391c0b1208c9ac8a54ec3b065f Author: Claudiu Beznea Date: Wed Oct 26 15:41:12 2022 +0300 ARM: configs: at91: sama7: add config for thermal management Add config flags for thermal management. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221026124114.985876-10-claudiu.beznea@microchip.com arch/arm/configs/sama7_defconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 20191d396a748d31f0b6036742b93f7d1a56bb97 Author: Claudiu Beznea Date: Wed Oct 26 15:41:11 2022 +0300 ARM: configs: at91: sama7: add config for microchip otpc Add config flag for Microchip OTPC. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221026124114.985876-9-claudiu.beznea@microchip.com arch/arm/configs/sama7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 6e3b80643c80fe6262896b45ba84c4472c6db32f Author: Claudiu Beznea Date: Wed Oct 26 15:41:10 2022 +0300 ARM: configs: at91: sama7: use make savedefconfig Use make savedefconfig on sama7_defconfig. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221026124114.985876-8-claudiu.beznea@microchip.com arch/arm/configs/sama7_defconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5258d30f33bdbb495f6de7601db5d60e13223a5b Author: Claudiu Beznea Date: Wed Oct 26 15:41:14 2022 +0300 ARM: dts: at91: sam9x60ek: remove status = "okay" for regulators Remove status = "okay" for sam9x60ek regulator as okay is the default status. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221026124114.985876-12-claudiu.beznea@microchip.com arch/arm/boot/dts/at91-sam9x60ek.dts | 4 ---- 1 file changed, 4 deletions(-) commit bc30e7d5f1afdd53e055bcbbb3eaba802f88c3c1 Author: Claudiu Beznea Date: Wed Oct 26 15:41:13 2022 +0300 ARM: dts: at91: sama7g5: use generic name for securam Use generic sram name for securam. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221026124114.985876-11-claudiu.beznea@microchip.com arch/arm/boot/dts/sama7g5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12045a7a0768c65ab4cebc2f0c8afd207fc4bc47 Author: Claudiu Beznea Date: Wed Oct 26 15:41:09 2022 +0300 ARM: dts: at91: sama7g5: add thermal zones node Add thermal zones node with its associated trips and cooling-maps. It uses CPUFreq as cooling device for temperatures in the interval [90, 100) degrees Celsius and describe the temperature of 100 degrees Celsius as critical temperature. System will be is shutting down when reaching critical temperature. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221026124114.985876-7-claudiu.beznea@microchip.com arch/arm/boot/dts/sama7g5.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 65d8815281d03b304af60b0ff2289eac5d1e0370 Author: Claudiu Beznea Date: Wed Oct 26 15:41:08 2022 +0300 ARM: dts: at91: sama7g5: add temperature sensor Add temperature sensor node. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221026124114.985876-6-claudiu.beznea@microchip.com arch/arm/boot/dts/sama7g5.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit f90b33a57410668302d7a5d8785a9cb1cb9c567b Author: Claudiu Beznea Date: Wed Oct 26 15:41:07 2022 +0300 ARM: dts: at91: sama7g5: add cells for temperature calibration Add NVMEM cell to ADC for temperature calibration data. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221026124114.985876-5-claudiu.beznea@microchip.com arch/arm/boot/dts/sama7g5.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 52d9b4fee7fa9f9164c304badde9733d8f6cb707 Author: Claudiu Beznea Date: Wed Oct 26 15:41:06 2022 +0300 ARM: dts: at91: sama7g5: add io-channel-cells to adc node Add io-channel-cell to ADC node. It is necessary for DT users of ADC. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221026124114.985876-4-claudiu.beznea@microchip.com arch/arm/boot/dts/sama7g5.dtsi | 1 + 1 file changed, 1 insertion(+) commit c01657dbcde8bf1c2cfdba61cc9ca0427ede145e Author: Claudiu Beznea Date: Wed Oct 26 15:41:05 2022 +0300 ARM: dts: at91: sama7g5: add otpc node Add OTPC node along with temperature calibration cell. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221026124114.985876-3-claudiu.beznea@microchip.com arch/arm/boot/dts/sama7g5.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2622e785f7579e8c92d0fcf55e9d6b3955e4f1a6 Author: Miquel Raynal Date: Wed Oct 26 11:35:02 2022 +0200 mac802154: Allow the creation of coordinator interfaces As a first strep in introducing proper PAN management and association, we need to be able to create coordinator interfaces which might act as coordinator or PAN coordinator. Hence, let's add the minimum support to allow the creation of these interfaces. Even though the necessary logic to handle several interfaces on the same device is added to make this future move easier, in practice only several interfaces of type MONITOR are allowed at the same time. The other combinations are not allowed (interface creation is possible but only one can be opened at a time) because, with a single PHY featuring a single set of address filters, we cannot afford handling two distinct interfaces (with different address filters or filtering requirements): * Having 2 NODEs, 2 COORDs or 1 NODE + 1 COORD -> cannot work because the address filters would be different * Having 1 MONITOR + either 1 NODE or 1 COORD -> cannot work because the filtering levels are incompatible Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221026093502.602734-4-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/iface.c | 14 ++++++++------ net/mac802154/main.c | 2 +- net/mac802154/rx.c | 11 +++++++---- 3 files changed, 16 insertions(+), 11 deletions(-) commit eb30a7a5c88f65d06c35c2268af0075c0d6d803e Author: Miquel Raynal Date: Wed Oct 26 11:35:01 2022 +0200 mac802154: Clarify an expression While going through the whole interface opening logic in my head I was consistently bothered by the condition checking whether there was only one interface of type NODE/COORD opened at the same time. What actually bothered me was the fact that in one case we would use the wpan_dev pointer directly while in the other case we would use the sdata pointer, making it harder to differentiate both. In practice the condition should be straightforward to read. IMHO dropping the wpan_dev indirection allows to clarify the check. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221026093502.602734-3-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/iface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4d1c7d87030be2a0043620b240cdb88199396366 Author: Miquel Raynal Date: Wed Oct 26 11:35:00 2022 +0200 mac802154: Move an skb free within the rx path It may appear clearer to free the skb at the end of the path rather than in the middle, within a helper. Move kfree_skb() from the end of __ieee802154_rx_handle_packet() to right after it in the calling function ieee802154_rx(). Doing so implies reworking a little bit the exit path. Suggested-by: Alexander Aring Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221026093502.602734-2-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/rx.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 7bb09fb8f5772c92313834e60eb350f2d8888921 Author: Jiapeng Chong Date: Mon Oct 17 15:17:46 2022 +0800 wifi: ipw2200: Remove the unused function ipw_alive() The function ipw_alive() is defined in the ipw2200.c file, but not called elsewhere, so delete this unused function. drivers/net/wireless/intel/ipw2x00/ipw2200.c:3007:19: warning: unused function 'ipw_alive'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2410 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221017071746.118685-1-jiapeng.chong@linux.alibaba.com drivers/net/wireless/intel/ipw2x00/ipw2200.c | 14 -------------- 1 file changed, 14 deletions(-) commit 8fa681703175ba0ea283dd564a64edaef3472ee6 Author: Colin Ian King Date: Thu Oct 20 08:26:46 2022 +0100 wifi: rtw89: 8852b: Fix spelling mistake KIP_RESOTRE -> KIP_RESTORE Ther is a spelling mistake in a rtw89_debug message. Fix it. Signed-off-by: Colin Ian King Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221020072646.1513307-1-colin.i.king@gmail.com drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2b68e95b5bc97d81d150a46447167bf21bd555f Author: Chin-Yen Lee Date: Thu Oct 27 13:27:07 2022 +0800 wifi: rtw89: add WoWLAN pattern match support Pattern match is an option of WoWLAN to allow the device to be woken up from suspend mode when receiving packets matched user-designed patterns. The patterns are written into hardware via WoWLAN firmware in suspend flow if users have set up them. If packets matched designed pattern are received, WoWLAN firmware will send an interrupt and then wake up the device. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221027052707.14605-8-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 18 ++ drivers/net/wireless/realtek/rtw89/fw.c | 52 ++++++ drivers/net/wireless/realtek/rtw89/fw.h | 67 ++++++++ drivers/net/wireless/realtek/rtw89/rtw8852a.c | 3 + drivers/net/wireless/realtek/rtw89/rtw8852c.c | 3 + drivers/net/wireless/realtek/rtw89/util.h | 11 ++ drivers/net/wireless/realtek/rtw89/wow.c | 228 +++++++++++++++++++++++++- 7 files changed, 381 insertions(+), 1 deletion(-) commit 19e28c7fcc7408be8479f91d47146245c8be293e Author: Chin-Yen Lee Date: Thu Oct 27 13:27:06 2022 +0800 wifi: rtw89: add WoWLAN function support WoWLAN is a feature which allows devices to be woken up from suspend state through WLAN events. When user enables WoWLAN feature and then let the device enter suspend state, WoWLAN firmware will be loaded by the driver and periodically monitors WiFi packets. Power consumption of WiFi chip will be reduced in this state. We now implement WoWLAN function in rtw8852ae and rtw8852ce chip. Currently supported WLAN events include receiving magic packet, rekey packet and deauth packet, and disconnecting from AP. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221027052707.14605-7-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/Makefile | 2 + drivers/net/wireless/realtek/rtw89/core.c | 8 + drivers/net/wireless/realtek/rtw89/core.h | 77 +++- drivers/net/wireless/realtek/rtw89/debug.h | 1 + drivers/net/wireless/realtek/rtw89/mac.c | 18 +- drivers/net/wireless/realtek/rtw89/mac.h | 14 + drivers/net/wireless/realtek/rtw89/mac80211.c | 55 +++ drivers/net/wireless/realtek/rtw89/pci.c | 23 +- drivers/net/wireless/realtek/rtw89/ps.c | 2 +- drivers/net/wireless/realtek/rtw89/ps.h | 1 + drivers/net/wireless/realtek/rtw89/reg.h | 8 + drivers/net/wireless/realtek/rtw89/rtw8852a.c | 9 + drivers/net/wireless/realtek/rtw89/rtw8852c.c | 9 + drivers/net/wireless/realtek/rtw89/wow.c | 633 ++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/wow.h | 21 + 15 files changed, 874 insertions(+), 7 deletions(-) commit ee88d748f1ace450cc0e8ca6a93cb11e7e8d6ad9 Author: Chin-Yen Lee Date: Thu Oct 27 13:27:05 2022 +0800 wifi: rtw89: add related H2C for WoWLAN mode In this patch we define some H2C, which will be called during suspend flow, to enable WoWLAN function provided by WoWLAN firmware. These H2C includes keep alive used to send null packet to AP periodically to avoid being disconnected by AP, disconnect detection used to configure how we check if AP is offline, wake up control used to decide which WiFi events could trigger resume flow, and global control used to enable WoWLAN function. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221027052707.14605-6-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 30 ++++ drivers/net/wireless/realtek/rtw89/fw.c | 229 ++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/fw.h | 160 +++++++++++++++++++++ 3 files changed, 419 insertions(+) commit 41d567699283b86ce7443a5bf07114f1bde8e203 Author: Chih-Kang Chang Date: Thu Oct 27 13:27:04 2022 +0800 wifi: rtw89: add drop tx packet function When entering WoWLAN mode, we need to drop all transmit packets, including those in mac buffer, to avoid memory leakage, so implement the drop_tx function. Signed-off-by: Chih-Kang Chang Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221027052707.14605-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 3 ++ drivers/net/wireless/realtek/rtw89/fw.c | 9 ++++ drivers/net/wireless/realtek/rtw89/fw.h | 20 +++++++ drivers/net/wireless/realtek/rtw89/mac.c | 75 +++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/mac.h | 13 +++++ drivers/net/wireless/realtek/rtw89/reg.h | 13 +++++ drivers/net/wireless/realtek/rtw89/rtw8852a.c | 2 + drivers/net/wireless/realtek/rtw89/rtw8852c.c | 2 + 8 files changed, 137 insertions(+) commit 7a68ec3da79ea702fdeeb94c31f743fd37446a32 Author: Chih-Kang Chang Date: Thu Oct 27 13:27:03 2022 +0800 wifi: rtw89: add function to adjust and restore PLE quota PLE RX quota, which is the setting of RX buffer, is needed to be adjusted dynamically for WoWLAN mode, and restored when back to normal mode. The action is not needed for rtw8852c chip. Signed-off-by: Chih-Kang Chang Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221027052707.14605-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/mac.c | 32 +++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/mac.h | 2 ++ drivers/net/wireless/realtek/rtw89/rtw8852a.c | 4 ++++ 4 files changed, 39 insertions(+) commit 5f05bdb0a770b5d03d3453c0b0743bb3dcd1a2ba Author: Chih-Kang Chang Date: Thu Oct 27 13:27:02 2022 +0800 wifi: rtw89: move enable_cpu/disable_cpu into fw_download For WoWLAN mode, we need to download WoWLAN firmware by calling fw_download(). Another, to disable/enable WiFi CPU is needed before calling fw_download. Since Firmware runs on WiFi CPU, it is intuitive to combine enable_cpu/disable_cpu functions into fw_download. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221027052707.14605-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/fw.c | 5 +++++ drivers/net/wireless/realtek/rtw89/mac.c | 10 ++-------- drivers/net/wireless/realtek/rtw89/mac.h | 2 ++ 3 files changed, 9 insertions(+), 8 deletions(-) commit d9112042d9942648825d3ebe837dd33dbd7c6ddb Author: Chih-Kang Chang Date: Thu Oct 27 13:27:01 2022 +0800 wifi: rtw89: collect and send RF parameters to firmware for WoWLAN For WoWLAN mode, we only collect and send RF parameters to Firmware without writing RF registers. So we add one function to practice it. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221027052707.14605-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 2 +- drivers/net/wireless/realtek/rtw89/phy.c | 31 +++++++++++++++++++++++++++++-- drivers/net/wireless/realtek/rtw89/phy.h | 2 +- 3 files changed, 31 insertions(+), 4 deletions(-) commit 46245bc42aff5e67b0498fa365a4baeaaaaeda86 Author: Zong-Zhe Yang Date: Fri Oct 21 17:18:28 2022 +0800 wifi: rtw89: check if sta's mac_id is valid under AP/TDLS Add boundary check of mac_id when adding sta under AP/TDLS. And, return -ENOSPC if the acquired mac_id is invalid. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221021091828.40157-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 25f49617b5c9c9afa829030f14606be6351d4771 Author: Eric Huang Date: Fri Oct 21 17:16:01 2022 +0800 wifi: rtw89: add BW info for both TX and RX in phy_info In order to debug performance issue intuitively, add bandwidth information into debugfs entry phy_info. After applying this patch, it looks like: TX rate [0]: HE 2SS MCS-11 GI:0.8 BW:80 (hw_rate=0x19b) ==> agg_wait=1 (3500) RX rate [0]: HE 2SS MCS-9 GI:0.8 BW:80 (hw_rate=0x199) Signed-off-by: Eric Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221021091601.39884-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/debug.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit e69ae29e00cec66609bd555398aa4f59f2a9ae84 Author: Ping-Ke Shih Date: Thu Oct 20 13:27:02 2022 +0800 wifi: rtw89: 8852c: make table of RU mask constant This table must be constant, so change it as expectation. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221020052702.33988-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a29dba478b6f4e8d3fbfe0b2f097cad1e0b93cf6 Author: Zong-Zhe Yang Date: Thu Oct 20 13:27:01 2022 +0800 wifi: rtw89: declare support bands with const They are just default declarations and we won't modify them directly. Instead, we actually do moification on their memdup now. So, they should be declared with const. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221020052702.33988-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4feda7f317cb7e4b6fcdaffb0d1ad363ee28fdea Author: Ping-Ke Shih Date: Thu Oct 20 13:25:49 2022 +0800 wifi: rtw89: fw: adapt to new firmware format of dynamic header Since firmware size is limited, we create variant firmwares for variant application areas. To help driver to know firmware's capabilities, firmware dynamic header is introduced to have more information, such as firmware features and firmware compile flags. Since this driver rtw89 only uses single one specific firmware at runtime, this patch is just to ignore this dynamic header, not actually use the content. This patch can be backward compatible, and no this kind of firmware is added to linux-firmware yet, so I can prepare this in advance. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221020052549.33783-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/fw.c | 22 +++++++++++++++++++--- drivers/net/wireless/realtek/rtw89/fw.h | 12 ++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) commit 67c0b2b5291656cbcb15371f835f5152fae2f7a2 Author: Meng Li Date: Mon Oct 31 16:49:24 2022 +0800 Documentation: amd-pstate: Add tbench and gitsource test introduction Introduce tbench and gitsource test cases design and implementation. Monitor cpus changes about performance and power consumption etc. Signed-off-by: Meng Li Signed-off-by: Shuah Khan Documentation/admin-guide/pm/amd-pstate.rst | 194 +++++++++++++++++++++++++--- 1 file changed, 174 insertions(+), 20 deletions(-) commit 013190c4cc295ab11bc556fb893871a312011f7a Author: Meng Li Date: Mon Oct 31 16:49:23 2022 +0800 selftests: amd-pstate: Trigger gitsource benchmark and test cpus Add gitsource.sh trigger the gitsource testing and monitor the cpu desire performance, frequency, load, power consumption and throughput etc. 1) Download and tar gitsource codes. 2) Run gitsource benchmark on specific governors, ondemand or schedutil. 3) Run tbench benchmark comparative test on acpi-cpufreq kernel driver. 4) Get desire performance, frequency, load by perf. 5) Get power consumption and throughput by amd_pstate_trace.py. 6) Get run time by /usr/bin/time. 7) Analyse test results and save it in file selftest.gitsource.csv. 8) Plot png images about time, energy and performance per watt for each test. Fixed whitespace error during commit: Signed-off-by: Shuah Khan Signed-off-by: Meng Li Acked-by: Huang Rui Signed-off-by: Shuah Khan tools/testing/selftests/amd-pstate/Makefile | 2 +- tools/testing/selftests/amd-pstate/gitsource.sh | 354 ++++++++++++++++++++++++ tools/testing/selftests/amd-pstate/run.sh | 32 ++- 3 files changed, 381 insertions(+), 7 deletions(-) commit ba2d788aa873da9c65ff067ca94665853eab95f0 Author: Meng Li Date: Mon Oct 31 16:49:22 2022 +0800 selftests: amd-pstate: Trigger tbench benchmark and test cpus Add tbench.sh trigger the tbench testing and monitor the cpu desire performance, frequency, load, power consumption and throughput etc. Signed-off-by: Meng Li Acked-by: Huang Rui Signed-off-by: Shuah Khan tools/testing/selftests/amd-pstate/Makefile | 10 +- tools/testing/selftests/amd-pstate/run.sh | 245 ++++++++++++++++++- tools/testing/selftests/amd-pstate/tbench.sh | 339 +++++++++++++++++++++++++++ 3 files changed, 583 insertions(+), 11 deletions(-) commit e5df326817e97799fda8add1c0f486f3539d238c Author: Meng Li Date: Mon Oct 31 16:49:21 2022 +0800 selftests: amd-pstate: Split basic.sh into run.sh and basic.sh. Split basic.sh into run.sh and basic.sh. The modification makes basic.sh more pure, just for test basic kernel functions. The file of run.sh mainly contains functions such as test entry, parameter check, prerequisite and log clearing etc. Then you can specify test case in kselftest/amd-pstate, for example: sudo ./run.sh -c basic. The detail please run the below script. ./run.sh --help Signed-off-by: Meng Li Acked-by: Huang Rui Signed-off-by: Shuah Khan tools/testing/selftests/amd-pstate/Makefile | 3 +- tools/testing/selftests/amd-pstate/basic.sh | 64 +++++-------- tools/testing/selftests/amd-pstate/run.sh | 142 ++++++++++++++++++++++++++++ 3 files changed, 167 insertions(+), 42 deletions(-) commit a2fa60ee7cb83d3054a896208da77f06359186a6 Author: Meng Li Date: Mon Oct 31 16:49:20 2022 +0800 selftests: amd-pstate: Rename amd-pstate-ut.sh to basic.sh. Rename amd-pstate-ut.sh to basic.sh. The purpose of this modification is to facilitate the subsequent addition of gitsource, tbench and other tests. Signed-off-by: Meng Li Signed-off-by: Shuah Khan tools/testing/selftests/amd-pstate/Makefile | 2 +- tools/testing/selftests/amd-pstate/{amd-pstate-ut.sh => basic.sh} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit 02693e11611e082e3c4d8653e8af028e43d31164 Author: Marek Vasut Date: Fri Oct 28 13:38:34 2022 +0200 clk: renesas: r9a06g032: Repair grave increment error If condition (clkspec.np != pd->dev.of_node) is true, then the driver ends up in an endless loop, forever, locking up the machine. Fixes: aad03a66f902 ("clk: renesas: r9a06g032: Add clock domain support") Reviewed-by: Ralph Siemsen Signed-off-by: Marek Vasut Reviewed-by: Gareth Williams Link: https://lore.kernel.org/r/20221028113834.7496-1-marex@denx.de Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a06g032-clocks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f80c71f7a868958f0547240c9e5e82b19623783f Merge: 2b1966c65b6d a6ebd538364b Author: Dave Airlie Date: Tue Nov 1 17:48:12 2022 +1000 Merge tag 'drm-intel-next-2022-10-28' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Hotplug code clean-up and organization (Jani, Gustavo) - More VBT specific code clean-up, doc, organization, and improvements (Ville) - More MTL enabling work (Matt, RK, Anusha, Jose) - FBC related clean-ups and improvements (Ville) - Removing unused sw_fence_await_reservation (Niranjana) - Big chunch of display house clean-up (Ville) - Many Watermark fixes and clean-ups (Ville) - Fix device info for devices without display (Jani) - Fix TC port PLLs after readout (Ville) - DPLL ID clean-ups (Ville) - Prep work for finishing (de)gamma readout (Ville) - PSR fixes and improvements (Jouni, Jose) - Reject excessive dotclocks early (Ville) - DRRS related improvements (Ville) - Simplify uncore register updates (Andrzej) - Fix simulated GPU reset wrt. encoder HW readout (Imre) - Add a ADL-P workaround (Jose) - Fix clear mask in GEN7_MISCCPCTL update (Andrzej) - Temporarily disable runtime_pm for discrete (Anshuman) - Improve fbdev debugs (Nirmoy) - Fix DP FRL link training status (Ankit) - Other small display fixes (Ankit, Suraj) - Allow panel fixed modes to have differing sync polarities (Ville) - Clean up crtc state flag checks (Ville) - Fix race conditions during DKL PHY accesses (Imre) - Prep-work for cdclock squash and crawl modes (Anusha) - ELD precompute and readout (Ville) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y1wd6ZJ8LdJpCfZL@intel.com commit 6f1a298b2e24c703bfcc643e41bc7c0604fe4830 Merge: b98deb2f9803 3bdfb04f13eb Author: Jakub Kicinski Date: Mon Oct 31 20:14:30 2022 -0700 Merge branch 'inet-add-drop-monitor-support' Eric Dumazet says: ==================== inet: add drop monitor support I recently tried to analyse flakes in ip_defrag selftest. This failed miserably. IPv4 and IPv6 reassembly units are causing false kfree_skb() notifications. It is time to deal with this issue. First two patches are changing core networking to better deal with eventual skb frag_list chains, in respect of kfree_skb/consume_skb status. Last three patches are adding three new drop reasons, and make sure skbs that have been reassembled into a large datagram are no longer viewed as dropped ones. After this, understanding why ip_defrag selftest is flaky is possible using standard drop monitoring tools. ==================== Link: https://lore.kernel.org/r/20221029154520.2747444-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 3bdfb04f13ebdd4ae50fc5dc595663874781e48c Author: Eric Dumazet Date: Sat Oct 29 15:45:20 2022 +0000 net: dropreason: add SKB_DROP_REASON_FRAG_TOO_FAR IPv4 reassembly unit can decide to drop frags based on /proc/sys/net/ipv4/ipfrag_max_dist sysctl. Add a specific drop reason to track this specific and weird case. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski include/net/dropreason.h | 6 ++++++ net/ipv4/ip_fragment.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 77adfd3a1d44c4730fd2af99b497e04ddc2b5837 Author: Eric Dumazet Date: Sat Oct 29 15:45:19 2022 +0000 net: dropreason: add SKB_DROP_REASON_FRAG_REASM_TIMEOUT Used to track skbs freed after a timeout happened in a reassmbly unit. Passing a @reason argument to inet_frag_rbtree_purge() allows to use correct consumed status for frags that have been successfully re-assembled. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski include/net/dropreason.h | 3 +++ include/net/inet_frag.h | 6 +++++- include/net/ipv6_frag.h | 3 ++- net/ipv4/inet_fragment.c | 14 ++++++++++---- net/ipv4/ip_fragment.c | 6 ++++-- 5 files changed, 24 insertions(+), 8 deletions(-) commit 4ecbb1c27c363686d11a241cd682a454a8454c2b Author: Eric Dumazet Date: Sat Oct 29 15:45:18 2022 +0000 net: dropreason: add SKB_DROP_REASON_DUP_FRAG This is used to track when a duplicate segment received by various reassembly units is dropped. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski include/net/dropreason.h | 3 +++ net/ipv4/ip_fragment.c | 13 +++++++++---- net/ipv6/netfilter/nf_conntrack_reasm.c | 2 +- net/ipv6/reassembly.c | 13 +++++++++---- 4 files changed, 22 insertions(+), 9 deletions(-) commit 511a3eda2f8d4719114ee3f2c781c37233bd171f Author: Eric Dumazet Date: Sat Oct 29 15:45:17 2022 +0000 net: dropreason: propagate drop_reason to skb_release_data() When an skb with a frag list is consumed, we currently pretend all skbs in the frag list were dropped. In order to fix this, add a @reason argument to skb_release_data() and skb_release_all(). Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski net/core/skbuff.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 0e84afe8ebfbb9eade3f4f6de4720887bf908e26 Author: Eric Dumazet Date: Sat Oct 29 15:45:16 2022 +0000 net: dropreason: add SKB_CONSUMED reason This will allow to simply use in the future: kfree_skb_reason(skb, reason); Instead of repeating sequences like: if (dropped) kfree_skb_reason(skb, reason); else consume_skb(skb); For instance, following patch in the series is adding @reason to skb_release_data() and skb_release_all(), so that we can propagate a meaningful @reason whenever consume_skb()/kfree_skb() have to take care of a potential frag_list. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski include/net/dropreason.h | 2 ++ net/core/skbuff.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit b98deb2f9803849fd0db714ea9f27aa18f3d9103 Author: Florian Fainelli Date: Fri Oct 28 15:21:40 2022 -0700 net: systemport: Add support for RDMA overflow statistic counter RDMA overflows can happen if the Ethernet controller does not have enough bandwidth allocated at the memory controller level, report RDMA overflows and deal with saturation, similar to the RBUF overflow counter. Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20221028222141.3208429-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bcmsysport.c | 11 +++++++++++ drivers/net/ethernet/broadcom/bcmsysport.h | 11 +++++++++++ 2 files changed, 22 insertions(+) commit 37c8489012dd9e830f2138ef6f2f52dc60ff944c Author: Sergei Antonov Date: Fri Oct 28 21:32:20 2022 +0300 net: ftmac100: allow increasing MTU to make most use of single-segment buffers If the FTMAC100 is used as a DSA master, then it is expected that frames which are MTU sized on the wire facing the external switch port (1500 octets in L2 payload, plus L2 header) also get a DSA tag when seen by the host port. This extra tag increases the length of the packet as the host port sees it, and the FTMAC100 is not prepared to handle frames whose length exceeds 1518 octets (including FCS) at all. Only a minimal rework is needed to support this configuration. Since MTU-sized DSA-tagged frames still fit within a single buffer (RX_BUF_SIZE), we just need to optimize the resource management rather than implement multi buffer RX. In ndo_change_mtu(), we toggle the FTMAC100_MACCR_RX_FTL bit to tell the hardware to drop (or not) frames with an L2 payload length larger than 1500. We need to replicate the MACCR configuration in ftmac100_start_hw() as well, since there is a hardware reset there which clears previous settings. The advantage of dynamically changing FTMAC100_MACCR_RX_FTL is that when dev->mtu is at the default value of 1500, large frames are automatically dropped in hardware and we do not spend CPU cycles dropping them. Suggested-by: Vladimir Oltean Signed-off-by: Sergei Antonov Link: https://lore.kernel.org/r/20221028183220.155948-3-saproj@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/faraday/ftmac100.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit 30f837b7b92394599ddc366ff4cf8b77d070d4f4 Author: Vladimir Oltean Date: Fri Oct 28 21:32:19 2022 +0300 net: ftmac100: report the correct maximum MTU of 1500 The driver uses the MAX_PKT_SIZE (1518) for both MTU reporting and for TX. However, the 2 places do not measure the same thing. On TX, skb->len measures the entire L2 packet length (without FCS, which software does not possess). So the comparison against 1518 there is correct. What is not correct is the reporting of dev->max_mtu as 1518. Since MTU measures L2 *payload* length (excluding L2 overhead) and not total L2 packet length, it means that the correct max_mtu supported by this device is the standard 1500. Anything higher than that will be dropped on RX currently. To fix this, subtract VLAN_ETH_HLEN from MAX_PKT_SIZE when reporting the max_mtu, since that is the difference between L2 payload length and total L2 length as seen by software. Signed-off-by: Vladimir Oltean Signed-off-by: Sergei Antonov Link: https://lore.kernel.org/r/20221028183220.155948-2-saproj@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/faraday/ftmac100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 55f6f3dbcf4ccc4ed154a7f89ec5315d967bd2c6 Author: Vladimir Oltean Date: Fri Oct 28 21:32:18 2022 +0300 net: ftmac100: prepare data path for receiving single segment packets > 1514 Eliminate one check in the data path and move it elsewhere, to where our real limitation is. We'll want to start processing "too long" frames in the driver (currently there is a hardware MAC setting which drops theses). Signed-off-by: Vladimir Oltean Signed-off-by: Sergei Antonov Link: https://lore.kernel.org/r/20221028183220.155948-1-saproj@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/faraday/ftmac100.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 91e87045a5ef6f7003e9a2cb7dfa435b9b002dbe Author: Steffen Bätz Date: Fri Oct 28 13:31:58 2022 -0300 net: dsa: mv88e6xxx: Add RGMII delay to 88E6320 Currently, the .port_set_rgmii_delay hook is missing for the 88E6320 family, which causes failure to retrieve an IP address via DHCP. Add mv88e6320_port_set_rgmii_delay() that allows applying the RGMII delay for ports 2, 5, and 6, which are the only ports that can be used in RGMII mode. Tested on a custom i.MX8MN board connected to an 88E6320 switch. This change also applies safely to the 88E6321 variant. The only difference between 88E6320 versus 88E6321 is the temperature grade and pinout. They share exactly the same MDIO register map for ports 2, 5, and 6, which are the only ports that can be used in RGMII mode. Signed-off-by: Steffen Bätz [fabio: Improved commit log and extended it to mv88e6321_ops] Signed-off-by: Fabio Estevam Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20221028163158.198108-1-festevam@gmail.com Signed-off-by: Jakub Kicinski drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ drivers/net/dsa/mv88e6xxx/port.c | 9 +++++++++ drivers/net/dsa/mv88e6xxx/port.h | 2 ++ 3 files changed, 13 insertions(+) commit 9888feb9c68b799e758a654aae0a032871e493c2 Author: Tzung-Bi Shih Date: Mon Oct 31 13:06:57 2022 +0800 platform/chrome: cros_ec_lpc_mec: remove cros_ec_lpc_mec_destroy() It's pointless (and invalid) to destroy a statically allocated mutex in cros_ec_lpc_mec_destroy(). Let's remove it. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Reviewed-by: Brian Norris Link: https://lore.kernel.org/r/20221031050657.3899359-1-tzungbi@kernel.org drivers/platform/chrome/cros_ec_lpc.c | 3 --- drivers/platform/chrome/cros_ec_lpc_mec.c | 6 ------ drivers/platform/chrome/cros_ec_lpc_mec.h | 7 ------- drivers/platform/chrome/wilco_ec/core.c | 5 ----- 4 files changed, 21 deletions(-) commit eff1744e62148a7e8ef3d985e2c0c40aa5caf564 Merge: 37fe9b981667 f3a63cce1b4f Author: Jakub Kicinski Date: Mon Oct 31 18:10:25 2022 -0700 Merge branch 'rtnetlink-honour-nlm_f_echo-flag-in-rtnl_-new-del-link' Hangbin Liu says: ==================== rtnetlink: Honour NLM_F_ECHO flag in rtnl_{new, del}link Netlink messages are used for communicating between user and kernel space. When user space configures the kernel with netlink messages, it can set the NLM_F_ECHO flag to request the kernel to send the applied configuration back to the caller. This allows user space to retrieve configuration information that are filled by the kernel (either because these parameters can only be set by the kernel or because user space let the kernel choose a default value). The kernel has support this feature in some places like RTM_{NEW, DEL}ADDR, RTM_{NEW, DEL}ROUTE. This patch set handles NLM_F_ECHO flag and send link info back after rtnl_{new, del}link. ==================== Link: https://lore.kernel.org/r/20221028084224.3509611-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit f3a63cce1b4fbde7738395c5a2dea83f05de3407 Author: Hangbin Liu Date: Fri Oct 28 04:42:24 2022 -0400 rtnetlink: Honour NLM_F_ECHO flag in rtnl_delete_link This patch use the new helper unregister_netdevice_many_notify() for rtnl_delete_link(), so that the kernel could reply unicast when userspace set NLM_F_ECHO flag to request the new created interface info. At the same time, the parameters of rtnl_delete_link() need to be updated since we need nlmsghdr and portid info. Suggested-by: Guillaume Nault Signed-off-by: Hangbin Liu Reviewed-by: Guillaume Nault Signed-off-by: Jakub Kicinski include/net/rtnetlink.h | 2 +- net/core/rtnetlink.c | 7 ++++--- net/openvswitch/vport-geneve.c | 2 +- net/openvswitch/vport-gre.c | 2 +- net/openvswitch/vport-netdev.c | 2 +- net/openvswitch/vport-vxlan.c | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) commit d88e136cab37d6a5aa3691a2f636d37bd6520cc2 Author: Hangbin Liu Date: Fri Oct 28 04:42:23 2022 -0400 rtnetlink: Honour NLM_F_ECHO flag in rtnl_newlink_create This patch pass the netlink header message in rtnl_newlink_create() to the new updated rtnl_configure_link(), so that the kernel could reply unicast when userspace set NLM_F_ECHO flag to request the new created interface info. Suggested-by: Guillaume Nault Signed-off-by: Hangbin Liu Reviewed-by: Guillaume Nault Signed-off-by: Jakub Kicinski net/core/rtnetlink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 77f4aa9a2a1766a0b9343fd812b71f18d05178da Author: Hangbin Liu Date: Fri Oct 28 04:42:22 2022 -0400 net: add new helper unregister_netdevice_many_notify Add new helper unregister_netdevice_many_notify(), pass netlink message header and portid, which could be used to notify userspace when flag NLM_F_ECHO is set. Make the unregister_netdevice_many() as a wrapper of new function unregister_netdevice_many_notify(). Suggested-by: Guillaume Nault Signed-off-by: Hangbin Liu Reviewed-by: Guillaume Nault Signed-off-by: Jakub Kicinski net/core/dev.c | 27 +++++++++++++++++---------- net/core/dev.h | 3 +++ 2 files changed, 20 insertions(+), 10 deletions(-) commit 1d997f1013079c05b642c739901e3584a3ae558d Author: Hangbin Liu Date: Fri Oct 28 04:42:21 2022 -0400 rtnetlink: pass netlink message header and portid to rtnl_configure_link() This patch pass netlink message header and portid to rtnl_configure_link() All the functions in this call chain need to add the parameters so we can use them in the last call rtnl_notify(), and notify the userspace about the new link info if NLM_F_ECHO flag is set. - rtnl_configure_link() - __dev_notify_flags() - rtmsg_ifinfo() - rtmsg_ifinfo_event() - rtmsg_ifinfo_build_skb() - rtmsg_ifinfo_send() - rtnl_notify() Also move __dev_notify_flags() declaration to net/core/dev.h, as Jakub suggested. Signed-off-by: Hangbin Liu Reviewed-by: Guillaume Nault Signed-off-by: Jakub Kicinski drivers/net/can/vxcan.c | 2 +- drivers/net/geneve.c | 2 +- drivers/net/veth.c | 2 +- drivers/net/vxlan/vxlan_core.c | 4 ++-- drivers/net/wwan/wwan_core.c | 2 +- include/linux/netdevice.h | 2 -- include/linux/rtnetlink.h | 9 +++++---- include/net/netlink.h | 11 +++++++++++ include/net/rtnetlink.h | 3 ++- net/core/dev.c | 25 +++++++++++++------------ net/core/dev.h | 4 ++++ net/core/rtnetlink.c | 35 +++++++++++++++++++---------------- net/ipv4/ip_gre.c | 2 +- 13 files changed, 61 insertions(+), 42 deletions(-) commit 37fe9b981667b37925e5f0d62aa59176c3633437 Author: Sean Anderson Date: Thu Oct 27 15:00:05 2022 -0400 net: dpaa2: Add some debug prints on deferred probe When this device is deferred, there is often no way to determine what the cause was. Add some debug prints to make it easier to figure out what is blocking the probe. Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20221027190005.400839-1-sean.anderson@seco.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 33 +++++++++++++++++------- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 5 +++- 2 files changed, 27 insertions(+), 11 deletions(-) commit eae063f64714c2ab92eda900031c5e34a5597201 Author: Matti Vaittinen Date: Mon Oct 31 11:25:00 2022 +0200 power: supply: mt6360: Use LINEAR_RANGE_IDX() Do minor clean-up by using the newly inroduced LINEAR_RANGE_IDX() initialization macro. Signed-off-by: Matti Vaittinen Signed-off-by: Sebastian Reichel drivers/power/supply/mt6360_charger.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 9a265e04b99dd2e9c2fac26875e120c777f14f43 Author: Matti Vaittinen Date: Mon Oct 31 09:36:21 2022 +0200 power: supply: bd99954: Use LINEAR_RANGE() Do minor clean-up by using newly inroduced LINEAR_RANGE() initialization macro. Signed-off-by: Matti Vaittinen Signed-off-by: Sebastian Reichel drivers/power/supply/bd99954-charger.c | 84 ++++++---------------------------- 1 file changed, 13 insertions(+), 71 deletions(-) commit 97c4090badca743451c3798f1c1846e9f3f252de Author: Thomas Gleixner Date: Wed Oct 26 14:31:10 2022 +0200 bpf: Remove the obsolte u64_stats_fetch_*_irq() users. Now that the 32bit UP oddity is gone and 32bit uses always a sequence count, there is no need for the fetch_irq() variants anymore. Convert to the regular interface. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Daniel Borkmann Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/bpf/20221026123110.331690-1-bigeasy@linutronix.de kernel/bpf/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98c148cd5c73a4cf1d78319e309a79eef50b4220 Author: Lukas Bulwahn Date: Mon Oct 31 16:18:08 2022 +0100 power: supply: core: repair kernel-doc for power_supply_vbat2ri() The function power_supply_vbat2ri() does not have a parameter called table, despite it being mentioned in the kernel-doc comment. The table is actually obtained from the info parameter, the battery information container. Hence, ./scripts/kernel-doc -none drivers/power/supply/power_supply_core.c warns about this excess function parameter. Adjust the kernel-doc comment for power_supply_vbat2ri() for make W=1 happiness. Fixes: e9e7d165b4b0 ("power: supply: Support VBAT-to-Ri lookup tables") Signed-off-by: Lukas Bulwahn Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_core.c | 1 - 1 file changed, 1 deletion(-) commit f8fbf0dc702bf15b8b0ea1731a353bdb7faee8fd Author: Pierre-Louis Bossart Date: Mon Oct 31 15:53:40 2022 -0400 ASoC: SOF: fix compilation issue with readb/writeb helpers Replace them with read8/write8 to avoid compilation issue on ARM. In hindsight this is more consistent with the read64/write64 helpers already used in SOF. Reported-by: Nathan Chancellor Link: https://lore.kernel.org/alsa-devel/Y1rTFrohLqaiZAy%2F@dev-arch.thelio-3990X/ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221031195340.249868-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 6 +++--- sound/soc/sof/intel/hda-stream.c | 2 +- sound/soc/sof/intel/hda.c | 2 +- sound/soc/sof/ops.h | 18 +++++++++--------- sound/soc/sof/sof-priv.h | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) commit 7b72c823ddf8aaaec4e9fb28e6fbe4d511e7dad1 Author: Reinette Chatre Date: Mon Oct 31 10:29:58 2022 -0700 x86/sgx: Reduce delay and interference of enclave release commit 8795359e35bc ("x86/sgx: Silence softlockup detection when releasing large enclaves") introduced a cond_resched() during enclave release where the EREMOVE instruction is applied to every 4k enclave page. Giving other tasks an opportunity to run while tearing down a large enclave placates the soft lockup detector but Iqbal found that the fix causes a 25% performance degradation of a workload run using Gramine. Gramine maintains a 1:1 mapping between processes and SGX enclaves. That means if a workload in an enclave creates a subprocess then Gramine creates a duplicate enclave for that subprocess to run in. The consequence is that the release of the enclave used to run the subprocess can impact the performance of the workload that is run in the original enclave, especially in large enclaves when SGX2 is not in use. The workload run by Iqbal behaves as follows: Create enclave (enclave "A") /* Initialize workload in enclave "A" */ Create enclave (enclave "B") /* Run subprocess in enclave "B" and send result to enclave "A" */ Release enclave (enclave "B") /* Run workload in enclave "A" */ Release enclave (enclave "A") The performance impact of releasing enclave "B" in the above scenario is amplified when there is a lot of SGX memory and the enclave size matches the SGX memory. When there is 128GB SGX memory and an enclave size of 128GB, from the time enclave "B" starts the 128GB SGX memory is oversubscribed with a combined demand for 256GB from the two enclaves. Before commit 8795359e35bc ("x86/sgx: Silence softlockup detection when releasing large enclaves") enclave release was done in a tight loop without giving other tasks a chance to run. Even though the system experienced soft lockups the workload (run in enclave "A") obtained good performance numbers because when the workload started running there was no interference. Commit 8795359e35bc ("x86/sgx: Silence softlockup detection when releasing large enclaves") gave other tasks opportunity to run while an enclave is released. The impact of this in this scenario is that while enclave "B" is released and needing to access each page that belongs to it in order to run the SGX EREMOVE instruction on it, enclave "A" is attempting to run the workload needing to access the enclave pages that belong to it. This causes a lot of swapping due to the demand for the oversubscribed SGX memory. Longer latencies are experienced by the workload in enclave "A" while enclave "B" is released. Improve the performance of enclave release while still avoiding the soft lockup detector with two enhancements: - Only call cond_resched() after XA_CHECK_SCHED iterations. - Use the xarray advanced API to keep the xarray locked for XA_CHECK_SCHED iterations instead of locking and unlocking at every iteration. This batching solution is copied from sgx_encl_may_map() that also iterates through all enclave pages using this technique. With this enhancement the workload experiences a 5% performance degradation when compared to a kernel without commit 8795359e35bc ("x86/sgx: Silence softlockup detection when releasing large enclaves"), an improvement to the reported 25% degradation, while still placating the soft lockup detector. Scenarios with poor performance are still possible even with these enhancements. For example, short workloads creating sub processes while running in large enclaves. Further performance improvements are pursued in user space through avoiding to create duplicate enclaves for certain sub processes, and using SGX2 that will do lazy allocation of pages as needed so enclaves created for sub processes start quickly and release quickly. Fixes: 8795359e35bc ("x86/sgx: Silence softlockup detection when releasing large enclaves") Reported-by: Md Iqbal Hossain Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Tested-by: Md Iqbal Hossain Link: https://lore.kernel.org/all/00efa80dd9e35dc85753e1c5edb0344ac07bb1f0.1667236485.git.reinette.chatre%40intel.com arch/x86/kernel/cpu/sgx/encl.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit d6105a8b7c160a73ae04054c8921eba80a294146 Author: Conor Dooley Date: Tue Oct 25 20:56:44 2022 +0100 riscv: dts: microchip: fix memory node unit address for icicle Evidently I forgot to update the unit address for the 38-bit cached memory node when I changed the address in the reg property.. Update it to match. Fixes: 6c1193301791 ("riscv: dts: microchip: update memory configuration for v2022.10") Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00ed1eabcc3b785aecf6f6cbb41d7b436bb54d28 Author: Jason A. Donenfeld Date: Sat Oct 29 02:26:13 2022 +0200 x86/espfix: Use get_random_long() rather than archrandom A call is made to arch_get_random_longs() and rdtsc(), rather than just using get_random_long(), because this was written during a time when very early boot would give abysmal entropy. These days, a call to get_random_long() at early boot will incorporate RDRAND, RDTSC, and more, without having to do anything bespoke. In fact, the situation is now such that on the majority of x86 systems, the pool actually is initialized at this point, even though it doesn't need to be for get_random_long() to still return something better than what this function currently does. So simplify this to just call get_random_long() instead. Signed-off-by: Jason A. Donenfeld Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221029002613.143153-1-Jason@zx2c4.com arch/x86/kernel/espfix_64.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit b3d2170916491cbb849d08e5e816ec161947657d Merge: 4d484efc5457 fc8390546154 Author: Mark Brown Date: Mon Oct 31 18:48:38 2022 +0000 ASoC: jz4740-i2s: Remove .set_sysclk() & friends Merge series from Aidan MacDonald : A quick series to get rid of .set_sysclk() from jz4740-i2s. It wasn't used in practice so this shouldn't be troublesome for anyone, and fortunately there aren't any backward compatibility concerns. The actual rationale for removing it, as opposed to fixing the issues of the current DT bindings and implementation, is provided in the dt-bindings patch. commit 4d484efc5457e01d8fd8bbfdf1215c7bdf9ca53b Merge: 06ba770a799f f5623593060f Author: Mark Brown Date: Mon Oct 31 18:48:31 2022 +0000 ASoC: SOF: client-probes: Add support for IPC4 Merge series from Peter Ujfalusi : The probes (the ability of probing the audio data from firmware processing points or to receive stream of debug/trace information) is supported by IPC4 as well, but due to the differences between the two IPC version the low level setup and information we need for probing is different. This series will extend the existing probes support for IPC3 with IPC4 'backend' commit 50865c14f34edbd03f8113147fac069b39f4e390 Author: Tony Luck Date: Tue Oct 18 09:59:00 2022 -0700 RAS: Fix return value from show_trace() Documentation/filesystems/seq_file.rst describes the possible return values from a "show()" function used by single_open(). show_trace() returns the value of "trace_count". This could be interpreted as "SEQ_SKIP", or just confuse the calling function. Change to just return "0" to avoid confusing anyone reading this code and possibly using as a template. Reading "daemon_active" was never an intended use case. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221018165900.109029-1-tony.luck@intel.com drivers/ras/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79a7f41f7f5ac69fd22eaf1fb3e230bea95f3399 Author: Tejun Heo Date: Mon Oct 31 07:12:13 2022 -1000 cgroup: cgroup refcnt functions should be exported when CONFIG_DEBUG_CGROUP_REF 6ab428604f72 ("cgroup: Implement DEBUG_CGROUP_REF") added a config option which forces cgroup refcnt functions to be not inlined so that they can be kprobed for debugging. However, it forgot export them when the config is enabled breaking modules which make use of css reference counting. Fix it by adding CGROUP_REF_EXPORT() macro to cgroup_refcnt.h which is defined to EXPORT_SYMBOL_GPL when CONFIG_DEBUG_CGROUP_REF is set. Signed-off-by: Tejun Heo Fixes: 6ab428604f72 ("cgroup: Implement DEBUG_CGROUP_REF") include/linux/cgroup.h | 1 + include/linux/cgroup_refcnt.h | 6 ++++++ kernel/cgroup/cgroup.c | 1 + 3 files changed, 8 insertions(+) commit 5a6f52d20ce3cd6d30103a27f18edff337da191b Author: Christian Brauner Date: Fri Oct 28 09:56:20 2022 +0200 acl: conver higher-level helpers to rely on mnt_idmap Convert an initial portion to rely on struct mnt_idmap by converting the high level xattr helpers. Reviewed-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) fs/internal.h | 12 ++++++------ fs/posix_acl.c | 16 +++++++++------- fs/xattr.c | 39 ++++++++++++++++++++------------------- io_uring/xattr.c | 8 +++----- 4 files changed, 38 insertions(+), 37 deletions(-) commit 256c8aed2b420a7c57ed6469fbb0f8310f5aeec9 Author: Christian Brauner Date: Wed Oct 26 12:51:27 2022 +0200 fs: introduce dedicated idmap type for mounts Last cycle we've already made the interaction with idmapped mounts more robust and type safe by introducing the vfs{g,u}id_t type. This cycle we concluded the conversion and removed the legacy helpers. 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 filesystem and mount namespaces and what different roles they have to play. Especially for filesystem developers without much experience in this area this is an easy source for bugs. Instead of passing the plain namespace we introduce a dedicated type struct mnt_idmap and replace the pointer with a pointer to a struct mnt_idmap. There are no semantic or size changes for the mount struct caused by this. We then start converting all places aware of idmapped mounts to rely on struct mnt_idmap. Once the conversion is done all helpers down to the really low-level make_vfs{g,u}id() and from_vfs{g,u}id() will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two, removing and thus eliminating the possibility of any bugs. Fwiw, I fixed some issues in that area a while ago in ntfs3 and ksmbd in the past. Afterwards, only low-level code can ultimately use the associated namespace for any permission checks. Even most of the vfs can be ultimately completely oblivious about this and filesystems will never interact with it directly in any form in the future. A struct mnt_idmap currently encompasses a simple refcount and a pointer to the relevant namespace the mount is idmapped to. If a mount isn't idmapped then it will point to a static nop_mnt_idmap. If it is an idmapped mount it will point to a new struct mnt_idmap. As usual there are no allocations or anything happening for non-idmapped mounts. Everthing is carefully written to be a nop for non-idmapped mounts as has always been the case. If an idmapped mount or mount tree is created a new struct mnt_idmap is allocated and a reference taken on the relevant namespace. For each mount in a mount tree that gets idmapped or a mount that inherits the idmap when it is cloned the reference count on the associated struct mnt_idmap is bumped. Just a reminder that we only allow a mount to change it's idmapping a single time and only if it hasn't already been attached to the filesystems and has no active writers. The actual changes are fairly straightforward. This will have huge benefits for maintenance and security in the long run even if it causes some churn. I'm aware that there's some cost for all of you. And I'll commit to doing this work and make this as painless as I can. Note that this also makes it possible to extend struct mount_idmap in the future. For example, it would be possible to place the namespace pointer in an anonymous union together with an idmapping struct. This would allow us to expose an api to userspace that would let it specify idmappings directly instead of having to go through the detour of setting up namespaces at all. This just adds the infrastructure and doesn't do any conversions. Reviewed-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) fs/namespace.c | 176 ++++++++++++++++++++++++++++++++++-------- include/linux/fs.h | 10 ++- include/linux/mnt_idmapping.h | 8 +- include/linux/mount.h | 9 ++- 4 files changed, 158 insertions(+), 45 deletions(-) commit a51cbd0d86d3fa9ecc6ddf186dd1cb66a4fefa87 Author: Tony Luck Date: Thu Sep 22 12:51:35 2022 -0700 x86/mce: Use severity table to handle uncorrected errors in kernel mce_severity_intel() has a special case to promote UC and AR errors in kernel context to PANIC severity. The "AR" case is already handled with separate entries in the severity table for all instruction fetch errors, and those data fetch errors that are not in a recoverable area of the kernel (i.e. have an extable fixup entry). Add an entry to the severity table for UC errors in kernel context that reports severity = PANIC. Delete the special case code from mce_severity_intel(). Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220922195136.54575-2-tony.luck@intel.com arch/x86/kernel/cpu/mce/severity.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit da7ffb9660c96eec4167f177eb1cb6e78dd7fc0e Author: Zack Rusin Date: Tue Oct 25 23:19:36 2022 -0400 drm/vmwgfx: Cleanup the cursor snooping code Cursor snooping depended on implicit size and format which made debugging quite difficult. Make the code easier to following by making everything explicit and instead of using magic numbers predefine all the parameters the code depends on. Also fixes incorrectly computed pitches for non-aligned cursor snoops. Fix which has no practical effect because non-aligned cursor snoops are not used by the X11 driver and Wayland cursors will go through mob cursors, instead of surface dma's. Signed-off-by: Zack Rusin Reviewed-by: Michael Banack Reviewed-by: Martin Krastev Link: https://patchwork.freedesktop.org/patch/msgid/20221026031936.1004280-2-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 4 ++++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 29 +++++++++++++++++------------ drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 14 +++++++++----- 3 files changed, 30 insertions(+), 17 deletions(-) commit 4cf949c7fafe21e085a4ee386bb2dade9067316e Author: Zack Rusin Date: Tue Oct 25 23:19:35 2022 -0400 drm/vmwgfx: Validate the box size for the snooped cursor Invalid userspace dma surface copies could potentially overflow the memcpy from the surface to the snooped image leading to crashes. To fix it the dimensions of the copybox have to be validated against the expected size of the snooped cursor. Signed-off-by: Zack Rusin Fixes: 2ac863719e51 ("vmwgfx: Snoop DMA transfers with non-covering sizes") Cc: # v3.2+ Reviewed-by: Michael Banack Reviewed-by: Martin Krastev Link: https://patchwork.freedesktop.org/patch/msgid/20221026031936.1004280-1-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6b0584c19d87a56fe1e83a0e3237c937945e827a Author: Rafał Miłecki Date: Tue Oct 18 17:42:02 2022 +0200 dt-bindings: nvmem: u-boot,env: add Broadcom's variant binding Broadcom uses U-Boot for a lot of their bcmbca familiy chipsets. U-Boot stores its configuration in an environment data block. Such blocks are usually stored on flash as a separated partition at hardcoded address. Broadcom however decided to: 1. Store env data block inside U-Boot partition 2. Avoid sticking to hardcoded offsets 3. Use custom header with "uEnv" magic and env data length Example (length 0x4000): $ hexdump -n 32 -C -s 0x40000 /dev/mtdblock0 00040000 76 6e 45 75 00 40 00 00 34 89 7a 82 49 4d 41 47 |vnEu.@..4.z.IMAG| 00040010 45 3d 4e 41 4e 44 3a 31 4d 2c 31 30 32 34 4d 00 |E=NAND:1M,1024M.| (0x40000 offset is unit specific and can change) Starting with the commit 118f3fbe517f4 ("dt-bindings: mtd: partitions: support label/name only partition") DT can describe partitions matching them by a name (without specifying actual address). With that feature and this binding change it's possible to: 1. Specify DT node for Broadcom's U-Boot env data subpartition 2. Add nodes for specific environment data variables 3. Reference them as NVMEM cells This binding is unlikely to help Broadcom's U-Boot. U-Boot SPL needs to find environment data early (before it accesses DTB) and it does that by looking for an "uEnv" magic. Dirty way. This binding can however be used by operating systems. It allows describing cleanly U-Boot, its env data and variables. It tells operating system about Broadcom-specific env data so it can parse it. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20221018154202.4634-2-zajec5@gmail.com Signed-off-by: Rob Herring .../devicetree/bindings/nvmem/u-boot,env.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 4862a4d753e46abc41cb5d355776c1e6bc864898 Author: Rafał Miłecki Date: Tue Oct 18 17:42:01 2022 +0200 dt-bindings: mtd: partitions: u-boot: allow dynamic subpartitions U-Boot partition may contain subpartitions. For example Broadcom includes environment data block in the middle of its U-Boot partition. This allows describing Broadcom's U-Boot env data and will allow referencing its NVMEM cell in the future. Ref: 118f3fbe517f4 ("dt-bindings: mtd: partitions: support label/name only partition") Ref: dd638202dfb65 ("dt-bindings: mtd: partitions: add additional example for qcom,smem-part") Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20221018154202.4634-1-zajec5@gmail.com Signed-off-by: Rob Herring Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit e3e2d74678e9ac2af4158ad715dce7f445122f75 Author: Jonathan Corbet Date: Mon Oct 31 08:21:39 2022 -0600 Revert "docs/zh_CN: core-api: Add timekeeping Chinese translation" This reverts commit d24c911bd031a299de39863f67ae7290d450d56e. This translation added a bunch of duplicate function definitions, leading to a lot of warnings like: /Documentation/core-api/timekeeping.rst:16: WARNING: Duplicate C declaration, also defined at translations/zh_CN/core-api/timekeeping:26. Declaration is '.. c:function:: ktime_t ktime_get( void )'. We need to come up with a proper way to translate documents with :c:function declarations in them. Signed-off-by: Jonathan Corbet .../translations/zh_CN/core-api/index.rst | 5 + .../translations/zh_CN/core-api/timekeeping.rst | 177 --------------------- 2 files changed, 5 insertions(+), 177 deletions(-) commit 3096ae43cc815835cbaa846ae54e18cb92307730 Author: Michael J. Ruhl Date: Fri Oct 28 16:50:29 2022 +0100 drm/i915/dmabuf: Use scatterlist for_each_sg API Update open coded for loop to use the standard scatterlist for_each_sg API. Cc: Tvrtko Ursulin Signed-off-by: Michael J. Ruhl Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221028155029.494736-4-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 81aa3f8e26e0fd8bffcaaaaf7e7a79ccc0a46111 Author: Michael J. Ruhl Date: Fri Oct 28 16:50:28 2022 +0100 drm/i915/dmabuf: dmabuf cleanup Some minor cleanup of some variables for consistency. Normalize struct sg_table to sgt. Normalize struct dma_buf_attachment to attach. checkpatch issues sizeof(), !NULL updates. Cc: Tvrtko Ursulin Signed-off-by: Michael J. Ruhl Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221028155029.494736-3-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 47 ++++++++++++++++-------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit 6427ab570c30cdfbbf00d2ae334d2ec47ce80c73 Author: Matthew Auld Date: Fri Oct 28 16:50:27 2022 +0100 drm/i915/selftests: exercise GPU access from the importer Using PAGE_SIZE here potentially hides issues so bump that to something larger. This should also make it possible for iommu to coalesce entries for us. With that in place verify we can write from the GPU using the importers sg_table, followed by checking that our writes match when read from the CPU side. v2: Switch over to igt_gpu_fill_dw(), which looks to be more widely supported than the migrate stuff (at least OOTB). References: https://gitlab.freedesktop.org/drm/intel/-/issues/7306 Signed-off-by: Matthew Auld Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Ville Syrjälä Cc: Michael J. Ruhl Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/msgid/20221028155029.494736-2-matthew.auld@intel.com .../gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 79 +++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) commit 28d52f99bbca7227008cf580c9194c9b3516968e Author: Matthew Auld Date: Fri Oct 28 16:50:26 2022 +0100 drm/i915/dmabuf: fix sg_table handling in map_dma_buf We need to iterate over the original entries here for the sg_table, pulling out the struct page for each one, to be remapped. However currently this incorrectly iterates over the final dma mapped entries, which is likely just one gigantic sg entry if the iommu is enabled, leading to us only mapping the first struct page (and any physically contiguous pages following it), even if there is potentially lots more data to follow. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7306 Fixes: 1286ff739773 ("i915: add dmabuf/prime buffer sharing support.") Signed-off-by: Matthew Auld Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Ville Syrjälä Cc: Michael J. Ruhl Cc: # v3.5+ Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/msgid/20221028155029.494736-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 940da138b03ecb5bca68ef51dc1141f115100eed Merge: c940fa276b5a 30a0b95b1335 Author: Arnaldo Carvalho de Melo Date: Mon Oct 31 11:10:33 2022 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes and sync with other tools/ libraries. Signed-off-by: Arnaldo Carvalho de Melo commit 06ba770a799fab51e42c34fd62b742d60084d8b1 Author: Chen Zhongjin Date: Mon Oct 31 21:40:31 2022 +0800 ASoC: soc-utils: Remove __exit for snd_soc_util_exit() snd_soc_util_exit() is called in __init snd_soc_init() for cleanup. Remove the __exit annotation for it to fix the build warning: WARNING: modpost: sound/soc/snd-soc-core.o: section mismatch in reference: init_module (section: .init.text) -> snd_soc_util_exit (section: .exit.text) Fixes: 6ec27c53886c ("ASoC: core: Fix use-after-free in snd_soc_exit()") Signed-off-by: Chen Zhongjin Link: https://lore.kernel.org/r/20221031134031.256511-1-chenzhongjin@huawei.com Signed-off-by: Mark Brown sound/soc/soc-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c940fa276b5a4210255e0cb9766f06e38443303a Author: Namhyung Kim Date: Fri Oct 28 11:01:28 2022 -0700 perf lock contention: Increase default stack skip to 4 In most configurations, it works well with skipping 4 entries by default. If some systems still have 3 BPF internal stack frames, the next frame should be in a lock function which will be skipped later when it tries to find a caller. So increasing to 4 won't affect such systems too. With --stack-skip=0, I can see something like this: 24 49.84 us 7.41 us 2.08 us mutex bpf_prog_e1b85959d520446c_contention_begin+0x12e 0xffffffffc045040e bpf_prog_e1b85959d520446c_contention_begin+0x12e 0xffffffffc045040e bpf_prog_e1b85959d520446c_contention_begin+0x12e 0xffffffff82ea2071 bpf_trace_run2+0x51 0xffffffff82de775b __bpf_trace_contention_begin+0xb 0xffffffff82c02045 __mutex_lock+0x245 0xffffffff82c019e3 __mutex_lock_slowpath+0x13 0xffffffff82c019c0 mutex_lock+0x20 0xffffffff830a083c kernfs_iop_permission+0x2c 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/20221028180128.3311491-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/lock-contention.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e9c5f3cf912c3e068b6c24d77f6f07ac242395b Author: Namhyung Kim Date: Fri Oct 28 11:01:27 2022 -0700 perf lock contention: Avoid variable length arrays The msan also warns about the use of VLA for stack_trace variable. We can dynamically allocate instead. While at it, simplify the error handle a bit (and fix bugs). Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221028180128.3311491-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_lock_contention.c | 41 ++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 13 deletions(-) commit 0a277b6226703812ba90543d5bb49476e03f816e Author: Namhyung Kim Date: Fri Oct 28 11:01:26 2022 -0700 perf lock contention: Check --max-stack option The --max-stack option is used to allocate the BPF stack map and stack trace array in the userspace. Check the value properly before using. Practically it cannot be greater than the sysctl_perf_event_max_stack. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221028180128.3311491-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit 005ef2b41b119caf65ac611109ce7ae68d857b46 Author: Namhyung Kim Date: Fri Oct 28 11:01:25 2022 -0700 perf lock contention: Fix memory sanitizer issue The msan reported a use-of-uninitialized-value warning for the struct lock_contention_data in lock_contention_read(). While it'd be filled by bpf_map_lookup_elem(), let's just initialize it to silence the warning. ==12524==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x562b0f16b1cd in lock_contention_read util/bpf_lock_contention.c:139:7 #1 0x562b0ef65ec6 in __cmd_contention builtin-lock.c:1737:3 #2 0x562b0ef65ec6 in cmd_lock builtin-lock.c:1992:8 #3 0x562b0ee7f50b in run_builtin perf.c:322:11 #4 0x562b0ee7efc1 in handle_internal_command perf.c:376:8 #5 0x562b0ee7e1e9 in run_argv perf.c:420:2 #6 0x562b0ee7e1e9 in main perf.c:550:3 #7 0x7f065f10e632 in __libc_start_main (/usr/lib64/libc.so.6+0x61632) #8 0x562b0edf2fa9 in _start (perf+0xfa9) SUMMARY: MemorySanitizer: use-of-uninitialized-value (perf+0xe15160) in lock_contention_read Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221028180128.3311491-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_lock_contention.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 146edff3d7ed135269dae8abef3219083c45b21e Author: Ian Rogers Date: Wed Oct 12 18:12:05 2022 -0700 perf test: Parse events workaround for dash/minus Skip an event configuration for event names with a dash/minus in them. Events with a dash/minus in their name cause parsing issues as legacy encoding of events would use a dash/minus as a separator. The parser separates events with dashes into prefixes and suffixes and then recombines them. Unfortunately if an event has part of its name that matches a legacy token then the recombining fails. This is seen for branch-brs where branch is a legacy token. branch-brs was introduced to sysfs in: https://lore.kernel.org/all/20220322221517.2510440-5-eranian@google.com/ The failure is shown below as well as the workaround to use a config where the dash/minus isn't treated specially: ``` $ perf stat -e branch-brs true event syntax error: 'branch-brs' \___ parser error $ perf stat -e cpu/branch-brs/ true Performance counter stats for 'true': 46,179 cpu/branch-brs/ ``` Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20221013011205.3151391-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/parse-events.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 2e5a738abc69601a4ea4a3544ec29cab9189eaae Author: Arnaldo Carvalho de Melo Date: Thu Oct 27 17:44:07 2022 -0300 perf evlist: Add missing util/event.h header Needed to get the event_attr_init() and perf_event_paranoid() prototypes that were being obtained indirectly, by sheer luck. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 1 + 1 file changed, 1 insertion(+) commit 606f70ab7f5ace535514a5fa6f9ad62ae6e515eb Author: Arnaldo Carvalho de Melo Date: Thu Oct 27 17:42:52 2022 -0300 perf mmap: Remove several unneeded includes from util/mmap.h Those headers are not needed in util/mmap.h, remove them. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/mmap.h | 5 ----- 1 file changed, 5 deletions(-) commit fd8d5a3b076c033f5589186ac49d76e74b39f97f Author: Arnaldo Carvalho de Melo Date: Thu Oct 27 17:02:57 2022 -0300 perf tests: Add missing event.h include It uses things like perf_event__name() but were not including event.h, where its prototype lives, fix it. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/mmap-basic.c | 1 + tools/perf/tests/perf-record.c | 1 + 2 files changed, 2 insertions(+) commit cde5671268faf6419026ebd5e0f1783b3a84cf39 Author: Arnaldo Carvalho de Melo Date: Thu Oct 27 16:54:46 2022 -0300 perf thread: Move thread__resolve() from event.h Its a thread method, so move it to thread.h, this way some places that were using event.h just to get this prototype may stop doing so and speed up building and disentanble the header dependency graph. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.h | 5 ----- tools/perf/util/thread.h | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) commit d1e633e4cdc0d06cec82d4772c025f13c3b25a6c Author: Arnaldo Carvalho de Melo Date: Thu Oct 27 16:54:46 2022 -0300 perf symbol: Move addr_location__put() from event.h Its a addr_location method, so move it to symbol.h, where 'struct addr_location' is, this way some places that were using event.h just to get this prototype may stop doing so and speed up building and disentanble the header dependency graph. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.h | 3 --- tools/perf/util/symbol.h | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) commit 7e5c6f2c1aa2daa0d8aca657377450529f381fe6 Author: Arnaldo Carvalho de Melo Date: Thu Oct 27 16:54:46 2022 -0300 perf machine: Move machine__resolve() from event.h Its a machine method, so move it to machine.h, this way some places that were using event.h just to get this prototype may stop doing so and speed up building and disentanble the header dependency graph. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.h | 3 --- tools/perf/util/machine.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit 628d69995e66343266475e6afc76192f5878b605 Author: Arnaldo Carvalho de Melo Date: Thu Oct 27 16:49:58 2022 -0300 perf kwork: Remove includes not needed in kwork.h Leave just some forward declarations for pointers, move the includes to where they are really needed. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kwork.c | 6 ++++++ tools/perf/util/bpf_kwork.c | 3 +++ tools/perf/util/kwork.h | 12 ++++++------ 3 files changed, 15 insertions(+), 6 deletions(-) commit 9823147da6c893d9295949e5ed982a8630deb6db Author: Arnaldo Carvalho de Melo Date: Wed Oct 26 17:24:27 2022 -0300 perf tools: Move 'struct perf_sample' to a separate header file to disentangle headers Some places were including event.h just to get 'struct perf_sample', move it to a separate place so that we speed up a bit the build. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/unwind-libdw.c | 2 +- tools/perf/arch/arm64/util/machine.c | 1 + tools/perf/arch/arm64/util/unwind-libdw.c | 2 +- tools/perf/arch/powerpc/util/event.c | 1 + tools/perf/arch/powerpc/util/unwind-libdw.c | 2 +- tools/perf/arch/s390/util/unwind-libdw.c | 1 + tools/perf/arch/x86/tests/sample-parsing.c | 1 + tools/perf/arch/x86/util/event.c | 1 + tools/perf/arch/x86/util/unwind-libdw.c | 2 +- tools/perf/bench/inject-buildid.c | 2 +- tools/perf/builtin-mem.c | 1 + tools/perf/tests/dlfilter-test.c | 1 + tools/perf/tests/mmap-basic.c | 1 + tools/perf/tests/openat-syscall-tp-fields.c | 1 + tools/perf/tests/parse-no-sample-id-all.c | 1 + tools/perf/tests/perf-record.c | 1 + tools/perf/tests/perf-time-to-tsc.c | 1 + tools/perf/tests/sw-clock.c | 1 + tools/perf/tests/switch-tracking.c | 1 + tools/perf/util/amd-sample-raw.c | 1 + tools/perf/util/auxtrace.c | 1 + tools/perf/util/branch.h | 2 +- tools/perf/util/data-convert-bt.c | 1 + tools/perf/util/event.h | 111 +------------------ tools/perf/util/evlist.c | 1 + .../util/intel-pt-decoder/intel-pt-insn-decoder.c | 1 + tools/perf/util/perf_regs.c | 2 +- tools/perf/util/s390-cpumsf.c | 1 + tools/perf/util/s390-sample-raw.c | 1 + tools/perf/util/sample.h | 117 +++++++++++++++++++++ tools/perf/util/trace-event-scripting.c | 2 +- 31 files changed, 147 insertions(+), 118 deletions(-) commit 08043330167f1e21abe60ff7e124ed87d4fd029d Author: Arnaldo Carvalho de Melo Date: Wed Oct 26 17:02:23 2022 -0300 perf branch: Remove some needless headers, add a needed one map_symbol.h is needed because we have structs that contains 'struct addr_map_symbol', so add it, remove the others. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/branch.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8d0d129e94d4518fd17c13b4991ff10b7f4cd85a Author: Arnaldo Carvalho de Melo Date: Wed Oct 26 13:52:17 2022 -0300 perf bpf: No need to include headers just use forward declarations In the bpf-prologue.h header we are just using pointers, so no need to include headers for that, just provide forward declarations for those types. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf-prologue.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 56c1ee92246a5099a626b955dd7f6636cdce6f93 Author: Jinlong Chen Date: Sun Oct 30 16:32:12 2022 +0800 blk-mq: remove redundant call to blk_freeze_queue_start in blk_mq_destroy_queue The calling relationship in blk_mq_destroy_queue() is as follows: blk_mq_destroy_queue() ... -> blk_queue_start_drain() -> blk_freeze_queue_start() <- called ... -> blk_freeze_queue() -> blk_freeze_queue_start() <- called again -> blk_mq_freeze_queue_wait() ... So there is a redundant call to blk_freeze_queue_start(). Replace blk_freeze_queue() with blk_mq_freeze_queue_wait() to avoid the redundant call. Signed-off-by: Jinlong Chen Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221030083212.1251255-1-nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 219cf43c552a49a7710b7b341bf616682a2643f0 Author: Jinlong Chen Date: Sun Oct 30 17:47:30 2022 +0800 blk-mq: move queue_is_mq out of blk_mq_cancel_work_sync The only caller that needs queue_is_mq check is del_gendisk, so move the check into it. Signed-off-by: Jinlong Chen Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221030094730.1275463-1-nickyc975@zju.edu.cn Signed-off-by: Jens Axboe block/blk-mq.c | 12 +++++------- block/genhd.c | 4 +++- 2 files changed, 8 insertions(+), 8 deletions(-) commit adff215830fcf3ef74f2f0d4dd5a47a6927d450b Author: Dawei Li Date: Sun Oct 30 13:20:08 2022 +0800 block: simplify blksize_bits() implementation Convert current looping-based implementation into bit operation, which can bring improvement for: 1) bitops is more efficient for its arch-level optimization. 2) Given that blksize_bits() is inline, _if_ @size is compile-time constant, it's possible that order_base_2() _may_ make output compile-time evaluated, depending on code context and compiler behavior. Signed-off-by: Dawei Li Reviewed-by: Bart Van Assche Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/TYCP286MB23238842958D7C083D6B67CECA349@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Jens Axboe include/linux/blkdev.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 82c229476b8f6afd7e09bc4dc77d89dc19ff7688 Author: David Jeffery Date: Wed Oct 26 13:19:57 2022 +0800 blk-mq: avoid double ->queue_rq() because of early timeout David Jeffery found one double ->queue_rq() issue, so far it can be triggered in VM use case because of long vmexit latency or preempt latency of vCPU pthread or long page fault in vCPU pthread, then block IO req could be timed out before queuing the request to hardware but after calling blk_mq_start_request() during ->queue_rq(), then timeout handler may handle it by requeue, then double ->queue_rq() is caused, and kernel panic. So far, it is driver's responsibility to cover the race between timeout and completion, so it seems supposed to be solved in driver in theory, given driver has enough knowledge. But it is really one common problem, lots of driver could have similar issue, and could be hard to fix all affected drivers, even it isn't easy for driver to handle the race. So David suggests this patch by draining in-progress ->queue_rq() for solving this issue. Cc: Stefan Hajnoczi Cc: Keith Busch Cc: virtualization@lists.linux-foundation.org Cc: Bart Van Assche Signed-off-by: David Jeffery Signed-off-by: Ming Lei Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20221026051957.358818-1-ming.lei@redhat.com Signed-off-by: Jens Axboe block/blk-mq.c | 56 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 12 deletions(-) commit 347ad8f295c66f3193d57cc5b69b6138f2e24231 Author: Yang Yingliang Date: Sat Oct 29 15:17:20 2022 +0800 spi: mxic: Use devm_platform_ioremap_resource_byname() Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221029071720.3041094-1-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-mxic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1793d36672eb8d86fb319cd28e056a154945506f Author: Yang Yingliang Date: Sat Oct 29 15:15:29 2022 +0800 spi: npcm-fiu: Use devm_platform_ioremap_resource_byname() Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221029071529.3019626-1-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-npcm-fiu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f5623593060fc2f4d84781edcc5d15e44acfcbf6 Author: Jyri Sarha Date: Mon Oct 31 12:51:41 2022 +0200 ASoC: SOF: IPC4: probes: Implement IPC4 ops for probes client device Implement IPC operations for IPC4 messaging and add doxygen documentation for the functions. Signed-off-by: Jyri Sarha Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221031105141.19037-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/Makefile | 8 +- sound/soc/sof/sof-client-probes-ipc4.c | 281 +++++++++++++++++++++++++++++++++ sound/soc/sof/sof-client-probes.c | 32 ++-- sound/soc/sof/sof-client-probes.h | 13 ++ 4 files changed, 318 insertions(+), 16 deletions(-) commit 7f0a3dff1f23eadbc36a64600ad2c17912163b66 Author: Jyri Sarha Date: Mon Oct 31 12:51:40 2022 +0200 ASoC: SOF: client: Add sof_client_ipc4_find_module() function Add sof_client_ipc4_find_module() for calling sof_ipc4_find_module_by_uuid() in sof client code. Signed-off-by: Jyri Sarha Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221031105141.19037-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-client.c | 15 +++++++++++++++ sound/soc/sof/sof-client.h | 4 ++++ 2 files changed, 19 insertions(+) commit d8bc54a5f2cb8b3bc2d727badc351b0ad24eb702 Author: Jyri Sarha Date: Mon Oct 31 12:51:39 2022 +0200 ASoC: SOF: client: Add sof_client_ipc_set_get_data() No need to duplicate set_get_data msg handling in clients. Signed-off-by: Jyri Sarha Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221031105141.19037-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc.c | 8 ++++++++ sound/soc/sof/sof-client.c | 19 +++++++++++++++++++ sound/soc/sof/sof-client.h | 2 ++ sound/soc/sof/sof-priv.h | 2 ++ 4 files changed, 31 insertions(+) commit ccf06b148fc22e3a964308df1d158c87710a35bd Author: Jyri Sarha Date: Mon Oct 31 12:51:38 2022 +0200 ASoC: SOF: probes: Separate IPC3 operations to a separate file Declare an IPC ops struct for probes client device and move IPC3 functions behind it. Signed-off-by: Jyri Sarha Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221031105141.19037-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/Makefile | 2 +- sound/soc/sof/sof-client-probes-ipc3.c | 236 ++++++++++++++++++++++++++++++++ sound/soc/sof/sof-client-probes.c | 239 ++------------------------------- sound/soc/sof/sof-client-probes.h | 21 +++ 4 files changed, 272 insertions(+), 226 deletions(-) commit b7b080cf3c33976eb2b51f73948dd9a6109a1107 Author: Jyri Sarha Date: Mon Oct 31 12:51:37 2022 +0200 ASoC: SOF: probes: Replace [0] union members with DECLARE_FLEX_ARRAY() Replace probes related [0] arrays, all found within unions, with DECLARE_FLEX_ARRAY() declarations. Signed-off-by: Jyri Sarha Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221031105141.19037-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/sof-client-probes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fc839054615427aa15de7677082b23b3033faf07 Author: Aidan MacDonald Date: Fri Oct 28 11:34:16 2022 +0100 ASoC: ingenic: Remove unnecessary clocks from schema The AIC needs only the first two clocks: "aic" is a gate that's used for gating the I2S controller when it's suspended, and "i2s" is the system clock, from which the bit and frame clocks are derived. Both clocks are therefore reasonably part of the AIC and should be passed to the OS. But the "ext" and "pll half" clocks are a little more questionable. It appears these bindings were introduced when the schema was first converted to YAML, but weren't present in the original .txt binding. They are intended to be the possible parent clocks of "i2s". The JZ4770 actually has three parents for its "i2s" clock, named "ext", "pll0", and "pll1" in the Linux driver. The JZ4780 has two parents but it doesn't have a "pll half" clock, instead it has an "i2s_pll" clock which behaves much differently to the actual "pll half" clock found on the JZ4740 & JZ4760. And there are other Ingenic SoCs that share the JZ4780's clock layout, eg, the X1000. Therefore, the bindings aren't really adequate for the JZ4770 and a bit misleading for the JZ4780. Either we should fix the bindings, or remove them entirely. This patch opts to remove the bindings. There is a good case to be made that "ext" and "pll half" don't belong here because they aren't directly used by the AIC. They are only used to set the parent of the "i2s" clock; they have no other effect on the AIC. A good way to think of it is in terms of how the AIC constrains clocks. The AIC can only generate the bit & frame clocks from the system clock in certain ratios. Setting the sample rate effectively constrains the frame clock, which, because of the clock dividers controlled by the AIC, translates to constraints on the "i2s" clock. Nothing in the AIC imposes a direct constraint on the parents of the "i2s" clock, and the AIC does not need to enable or disable the parents directly, so in principle the AIC doesn't need to be aware of the parent clocks at all. The choice of parent clock is still important, but the AIC doesn't have enough information to apply such constraints itself. The sound card does have that information because it knows how the AIC is connected to other components. We need to use other DT mechanisms to communicate those constraints at the sound card level, instead of passing the clocks through to the AIC, and inventing ad-hoc ways to plumb the constraints around behind the scenes. Signed-off-by: Aidan MacDonald Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/20221028103418.17578-2-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/ingenic,aic.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 1c0036e03edd5d97fc0af94dd3ab7e8c58b8191d Author: Aidan MacDonald Date: Fri Oct 28 11:34:18 2022 +0100 ASoC: jz4740-i2s: Remove .set_sysclk() .set_sysclk() is effectively unused here. No machine drivers use jz4740-i2s; and JZ4740_I2S_CLKSRC_EXT is the only selectable clock source with simple-card, but that is also the default source and has a fixed frequency, so configuring it would be redundant. simple-card ignores -ENOTSUPP error codes when setting the sysclock, so any device trees that do set the sysclock for some reason should still work. It's still possible to configure the clock parent manually in the device tree and control frequency using other simple-card options, so at the end of the day there's no real loss in functionality. Signed-off-by: Aidan MacDonald Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20221028103418.17578-4-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 32 -------------------------------- sound/soc/jz4740/jz4740-i2s.h | 10 ---------- 2 files changed, 42 deletions(-) commit 1cacd6894d5f4084f1581435e92d8a18d6721b25 Author: Anshuman Gupta Date: Thu Oct 27 14:52:42 2022 +0530 drm/i915/dgfx: Grab wakeref at i915_ttm_unmap_virtual We had already grabbed the rpm wakeref at obj destruction path, but it also required to grab the wakeref when object moves. When i915_gem_object_release_mmap_offset() gets called by i915_ttm_move_notify(), it will release the mmap offset without grabbing the wakeref. We want to avoid that therefore, grab the wakeref at i915_ttm_unmap_virtual() accordingly. While doing that also changed the lmem_userfault_lock from mutex to spinlock, as spinlock widely used for list. Also changed if (obj->userfault_count) to GEM_BUG_ON(!obj->userfault_count). v2: - Removed lmem_userfault_{list,lock} from intel_gt. [Matt Auld] Fixes: ad74457a6b5a ("drm/i915/dgfx: Release mmap on rpm suspend") Suggested-by: Matthew Auld Signed-off-by: Anshuman Gupta Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221027092242.1476080-3-anshuman.gupta@intel.com drivers/gpu/drm/i915/gem/i915_gem_mman.c | 19 ++++++---------- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 38 ++++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.h | 2 +- 4 files changed, 35 insertions(+), 26 deletions(-) commit e66c8dcf997ed54b62f754351e7129e1cc4e3cf9 Author: Anshuman Gupta Date: Thu Oct 27 14:52:41 2022 +0530 drm/i915: Encapsulate lmem rpm stuff in intel_runtime_pm Runtime pm is not really per GT, therefore it make sense to move lmem_userfault_list, lmem_userfault_lock and userfault_wakeref from intel_gt to intel_runtime_pm structure, which is embedded to i915. No functional change. v2: - Fixes the code comment nit. [Matt Auld] Signed-off-by: Anshuman Gupta Reviewed-by: Matthew Auld Acked-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221027092242.1476080-2-anshuman.gupta@intel.com drivers/gpu/drm/i915/gem/i915_gem_mman.c | 6 +++--- drivers/gpu/drm/i915/gem/i915_gem_pm.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 8 ++++---- drivers/gpu/drm/i915/gt/intel_gt.c | 3 --- drivers/gpu/drm/i915/gt/intel_gt_types.h | 17 ----------------- drivers/gpu/drm/i915/i915_gem.c | 4 +--- drivers/gpu/drm/i915/intel_runtime_pm.c | 5 +++++ drivers/gpu/drm/i915/intel_runtime_pm.h | 22 ++++++++++++++++++++++ 8 files changed, 36 insertions(+), 31 deletions(-) commit 0cf9deb3005f552a3d125436fc8ccedd31a925a9 Author: Colin Ian King Date: Fri Oct 28 13:36:24 2022 +0100 net: mvneta: Remove unused variable i Variable i is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5565dbd01ec13799c49b7e25192ea7587b1f428c Merge: 70479a40954c 337ffae0e4d6 Author: David S. Miller Date: Mon Oct 31 11:14:16 2022 +0000 Merge branch 'ptp-adjfine' Jacob Keller says: ==================== ptp: convert drivers to .adjfine Many drivers implementing PTP have not yet migrated to the new .adjfine frequency adjustment implementation. A handful of these drivers use hardware with a simple increment value which is adjusted by multiplying by the adjustment factor and then dividing by 1 billion. This calculation is very easy to convert to .adjfine, by simply updating the divisor. Introduce new helper functions, diff_by_scaled_ppm and adjust_by_scaled_ppm which perform the most common calculations used by drivers for this purpose. The adjust_by_scaled_ppm takes the base increment and scaled PPM value, and calculates the new increment to use. A few drivers need the difference and direction rather than a raw increment value. The diff_by_scaled_ppm calculates the difference and returns true if it should be a subtraction, false otherwise. This most closely aligns with existing driver implementations. I previously submitted v1 of this series at [1], and got some feedback only on a handful of drivers. In the interest of merging the changes which have received feedback, I've dropped the following drivers out of this send: * ptp_phc * ptp_ipx46x * tg3 * hclge * stmac * cpts I plan to submit those drivers changes again at a later date. As before, there are some drivers which are not trivial to convert to the new helper functions. While they may be able to work, their implementation is different and I lack the hardware or datasheets to determine what the correct implementation would be. * drivers/net/ethernet/broadcom/bnx2x * drivers/net/ethernet/broadcom/bnxt * drivers/net/ethernet/cavium/liquidio * drivers/net/ethernet/chelsio/cxgb4 * drivers/net/ethernet/freescale * drivers/net/ethernet/qlogic/qed * drivers/net/ethernet/qlogic/qede * drivers/net/ethernet/sfc * drivers/net/ethernet/sfc/siena * drivers/net/ethernet/ti/am65-cpts.c * drivers/ptp/ptp_dte.c My end goal is to drop the .adjfreq implementation entirely, and to that end I plan on modifying these drivers in the future to directly use scaled_ppm_to_ppb as the simplest method to convert them. Changes since v2: * Rebased to allow landing in 6.2 * Added Richard's Acked-by Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Wei Liu Cc: Dexuan Cui Cc: Tom Lendacky Cc: Shyam Sundar S K Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Siva Reddy Kallam Cc: Prashant Sreedharan Cc: Michael Chan Cc: Yisen Zhuang Cc: Salil Mehta Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: Tariq Toukan Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: Bryan Whitehead Cc: Sergey Shtylyov Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: Maxime Coquelin Cc: Richard Cochran Cc: Vivek Thampi Cc: VMware PV-Drivers Reviewers Cc: Jie Wang Cc: Jacob Keller Cc: Guangbin Huang Cc: Eran Ben Elisha Cc: Aya Levin Cc: Cai Huoqing Cc: Biju Das Cc: Lad Prabhakar Cc: Phil Edworthy Cc: Jiasheng Jiang Cc: "Gustavo A. R. Silva" Cc: Linus Walleij Cc: Wan Jiabing Cc: Lv Ruyi Cc: Arnd Bergmann ==================== Signed-off-by: David S. Miller commit 337ffae0e4d6217c92c8622d3ed26e9c8d3d5f28 Author: Jacob Keller Date: Fri Oct 28 04:04:20 2022 -0700 ptp: xgbe: convert to .adjfine and adjust_by_scaled_ppm The xgbe implementation of .adjfreq is implemented in terms of a straight forward "base * ppb / 1 billion" calculation. Convert this driver to .adjfine and use adjust_by_scaled_ppm to calculate the new addend value. Signed-off-by: Jacob Keller Acked-by: Richard Cochran Acked-by: Tom Lendacky Cc: Shyam Sundar S K Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-ptp.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 673dd2c78817f62a9e8c79fdcb0920815b4c95c8 Author: Jacob Keller Date: Fri Oct 28 04:04:19 2022 -0700 ptp: ravb: convert to .adjfine and adjust_by_scaled_ppm The ravb implementation of .adjfreq is implemented in terms of a straight forward "base * ppb / 1 billion" calculation. Convert this driver to .adjfine and use the adjust_by_scaled_ppm helper function to calculate the new addend. Signed-off-by: Jacob Keller Acked-by: Richard Cochran Cc: Sergey Shtylyov Cc: Biju Das Cc: Phil Edworthy Cc: Lad Prabhakar Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_ptp.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 8bc900cbffa7725e8bbba21a99f6261e6bd61ef4 Author: Jacob Keller Date: Fri Oct 28 04:04:18 2022 -0700 ptp: lan743x: use diff_by_scaled_ppm in .adjfine implementation Update the lan743x driver to use the recently added diff_by_scaled_ppm helper function. This reduces the amount of code required in lan743x_ptp.c driver file. Signed-off-by: Jacob Keller Acked-by: Richard Cochran Cc: Bryan Whitehead Cc: UNGLinuxDriver@microchip.com Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan743x_ptp.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit c56dff6a9a315703c7f94eb0b9f682248b96ff0b Author: Jacob Keller Date: Fri Oct 28 04:04:17 2022 -0700 ptp: lan743x: remove .adjfreq implementation The lan743x driver implements both .adjfreq and .adjfine, but the core PTP subsystem prefers .adjfine if implemented. There is no reason to carry a .adjfreq implementation, so we can remove it. Signed-off-by: Jacob Keller Acked-by: Richard Cochran Cc: Bryan Whitehead Cc: UNGLinuxDriver@microchip.com Signed-off-by: David S. Miller drivers/net/ethernet/microchip/lan743x_ptp.c | 35 ---------------------------- 1 file changed, 35 deletions(-) commit d8aad3f3694f1170fb4ea8030e3d8a27324e81d2 Author: Jacob Keller Date: Fri Oct 28 04:04:16 2022 -0700 ptp: mlx5: convert to .adjfine and adjust_by_scaled_ppm The mlx5 implementation of .adjfreq is implemented in terms of a straight forward "base * ppb / 1 billion" calculation. Convert this to the .adjfine interface and use adjust_by_scaled_ppm for the calculation of the new mult value. Note that the mlx5_ptp_adjfreq_real_time function expects input in terms of ppb, so use the scaled_ppm_to_ppb to convert before passing to this function. Signed-off-by: Jacob Keller Tested-by: Shirly Ohnona Acked-by: Richard Cochran Cc: Gal Pressman Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: Aya Levin Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlx5/core/lib/clock.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 6ed795965ede203d762f59b791e3490eb6f74b13 Author: Jacob Keller Date: Fri Oct 28 04:04:15 2022 -0700 ptp: mlx4: convert to .adjfine and adjust_by_scaled_ppm The mlx4 implementation of .adjfreq is implemented in terms of a straight forward "base * ppb / 1 billion" calculation. Convert this driver to .adjfine and use adjust_by_scaled_ppm to perform the calculation. Signed-off-by: Jacob Keller Acked-by: Richard Cochran Cc: Tariq Toukan Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_clock.c | 29 ++++++++++----------------- 1 file changed, 11 insertions(+), 18 deletions(-) commit 73aa29a2b119619bbc1db87e8a8103f4b7e5a5db Author: Jacob Keller Date: Fri Oct 28 04:04:14 2022 -0700 drivers: convert unsupported .adjfreq to .adjfine A few PTP drivers implement a .adjfreq handler which indicates the operation is not supported. Convert all of these to .adjfine. Signed-off-by: Jacob Keller Acked-by: Richard Cochran Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Wei Liu Cc: Dexuan Cui Cc: Vivek Thampi Signed-off-by: David S. Miller drivers/hv/hv_util.c | 4 ++-- drivers/ptp/ptp_kvm_common.c | 4 ++-- drivers/ptp/ptp_vmw.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 1060707e380994e7c9b754b6eb74f25459b4a5b3 Author: Jacob Keller Date: Fri Oct 28 04:04:13 2022 -0700 ptp: introduce helpers to adjust by scaled parts per million Many drivers implement the .adjfreq or .adjfine PTP op function with the same basic logic: 1. Determine a base frequency value 2. Multiply this by the abs() of the requested adjustment, then divide by the appropriate divisor (1 billion, or 65,536 billion). 3. Add or subtract this difference from the base frequency to calculate a new adjustment. A few drivers need the difference and direction rather than the combined new increment value. I recently converted the Intel drivers to .adjfine and the scaled parts per million (65.536 parts per billion) logic. To avoid overflow with minimal loss of precision, mul_u64_u64_div_u64 was used. The basic logic used by all of these drivers is very similar, and leads to a lot of duplicate code to perform the same task. Rather than keep this duplicate code, introduce diff_by_scaled_ppm and adjust_by_scaled_ppm. These helper functions calculate the difference or adjustment necessary based on the scaled parts per million input. The diff_by_scaled_ppm function returns true if the difference should be subtracted, and false otherwise. Update the Intel drivers to use the new helper functions. Other vendor drivers will be converted to .adjfine and this helper function in the following changes. Signed-off-by: Jacob Keller Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/intel/e1000e/ptp.c | 16 ++-------- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 17 ++-------- drivers/net/ethernet/intel/ice/ice_ptp.c | 18 ++--------- drivers/net/ethernet/intel/igb/igb_ptp.c | 18 ++--------- drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 24 +++------------ include/linux/ptp_clock_kernel.h | 46 ++++++++++++++++++++++++++++ 6 files changed, 60 insertions(+), 79 deletions(-) commit b9a61b97798ca6d0c856a217e61e2177bd8f6eae Author: Jacob Keller Date: Fri Oct 28 04:04:12 2022 -0700 ptp: add missing documentation for parameters The ptp_find_pin_unlocked function and the ptp_system_timestamp structure didn't document their parameters and fields. Fix this. Signed-off-by: Jacob Keller Acked-by: Richard Cochran Signed-off-by: David S. Miller include/linux/ptp_clock_kernel.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 70479a40954cf353e87a486997a3477108c75aa9 Author: Frank Date: Fri Oct 28 17:26:21 2022 +0800 net: phy: Add driver for Motorcomm yt8521 gigabit ethernet phy Add a driver for the motorcomm yt8521 gigabit ethernet phy. We have verified the driver on StarFive VisionFive development board, which is developed by Shanghai StarFive Technology Co., Ltd.. On the board, yt8521 gigabit ethernet phy works in utp mode, RGMII interface, supports 1000M/100M/10M speeds, and wol(magic package). Signed-off-by: Frank Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller MAINTAINERS | 1 + drivers/net/phy/Kconfig | 2 +- drivers/net/phy/motorcomm.c | 1635 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 1635 insertions(+), 3 deletions(-) commit e8572f038a527a4f865b0992057963252f14ba40 Author: Yang Yingliang Date: Fri Oct 28 16:11:06 2022 +0800 net: microchip: sparx5: kunit test: change test_callbacks and test_vctrl to static test_callbacks and test_vctrl are only used in vcap_api_kunit.c now, change them to static. Fixes: 67d637516fa9 ("net: microchip: sparx5: Adding KUNIT test for the VCAP API") Signed-off-by: Yang Yingliang Reviewed-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c2a535e089b2ab82cf50c876bd10c8ed33252c9 Author: Jakub Kicinski Date: Thu Oct 27 20:52:59 2022 -0700 net: geneve: fix array of flexible structures warnings New compilers don't like flexible array of flexible structs: include/net/geneve.h:62:34: warning: array of flexible structures Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller include/net/geneve.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c728e079d83f581a1f8b7755f6e26087b15c4fb Author: Tamas Zsoldos Date: Tue Jul 5 16:59:35 2022 +0200 coresight: etm4x: add CPU hotplug support for probing etm4x devices cannot be successfully probed when their CPU is offline. For example, when booting with maxcpus=n, ETM probing will fail on CPUs >n, and the probing won't be reattempted once the CPUs come online. This will leave those CPUs unable to make use of ETM. This change adds a mechanism to delay the probing if the corresponding CPU is offline, and to try it again when the CPU comes online. Signed-off-by: Tamas Zsoldos Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20220705145935.24679-1-tamas.zsoldos@arm.com drivers/hwtracing/coresight/coresight-etm4x-core.c | 153 +++++++++++++++------ 1 file changed, 113 insertions(+), 40 deletions(-) commit 25836ce1df827cb4830291cb2325067efb46753a Author: Yazen Ghannam Date: Tue Oct 18 10:36:30 2022 -0500 EDAC/mc_sysfs: Increase legacy channel support to 12 Newer AMD systems, such as Genoa, can support up to 12 channels per EDAC "mc" device. These are detected by the device's EDAC module, and the current EDAC interface is properly enumerated. However, the legacy EDAC sysfs interface provides device attributes only for channels 0 to 7. Therefore, channels 8 to 11 will not be visible in the legacy interface. This was overlooked in the initial support for AMD Genoa. Add additional device attributes so that up to 12 channels are visible in the legacy EDAC sysfs interface. Fixes: e2be5955a886 ("EDAC/amd64: Add support for AMD Family 19h Models 10h-1Fh and A0h-AFh") Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: Link: https://lore.kernel.org/r/20221018153630.14664-1-yazen.ghannam@amd.com drivers/edac/edac_mc_sysfs.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 7e5f430eb20108bfb0f255e27304de2e28505a8e Author: Borislav Petkov Date: Sun Sep 18 20:48:43 2022 +0200 MAINTAINERS: Make Mauro EDAC reviewer Mauro hasn't really been maintaining EDAC for a long while now. Make him a reviewer instead. Signed-off-by: Borislav Petkov Acked-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20220926180343.23346-1-bp@alien8.de MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9053e1c5a6fca221946f95d1fe6e47f69fb303a Author: Chen Lifu Date: Tue Aug 23 10:19:58 2022 +0800 x86/i8259: Make default_legacy_pic static The symbol is not used outside of the file, so mark it static. Signed-off-by: Chen Lifu Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220823021958.3052493-1-chenlifu@huawei.com arch/x86/kernel/i8259.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47aeed9d2ccde99c990ba3163b8d8308ad00df1b Author: Yang Yingliang Date: Fri Oct 28 15:34:57 2022 +0800 net: hns: hnae: remove unnecessary __module_get() and module_put() hnae_ae_register() is called from hns_dsaf_probe(), the refcount of module hnae has already be got in resolve_symbol() while calling the function, so the __module_get()/module_put() can be removed. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hnae.c | 3 --- 1 file changed, 3 deletions(-) commit 738136a0e3757a8534df3ad97d6ff6d7f429f6c1 Author: Jakub Kicinski Date: Thu Oct 27 14:25:53 2022 -0700 netlink: split up copies in the ack construction Clean up the use of unsafe_memcpy() by adding a flexible array at the end of netlink message header and splitting up the header and data copies. Reviewed-by: Kees Cook Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller include/net/netlink.h | 21 +++++++++++++++++++++ include/uapi/linux/netlink.h | 2 ++ net/netlink/af_netlink.c | 29 ++++++++++++++++++++--------- 3 files changed, 43 insertions(+), 9 deletions(-) commit eca485d22165695587bed02d8b9d0f7f44246c4a Author: Denis Kirjanov Date: Thu Oct 27 21:45:02 2022 +0300 drivers: net: convert to boolean for the mac_managed_pm flag Signed-off-by: Dennis Kirjanov Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 2 +- drivers/net/ethernet/realtek/r8169_main.c | 2 +- drivers/net/usb/asix_devices.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 8fc4deaa8bd2a8bef3f7fc15dced8da2f3e97286 Author: Sebastian Reichel Date: Thu Oct 27 18:31:19 2022 +0200 dt-bindings: net: snps,dwmac: Document queue config subnodes The queue configuration is referenced by snps,mtl-rx-config and snps,mtl-tx-config. Some in-tree DTs and the example put the referenced config nodes directly beneath the root node, but most in-tree DTs put it as child node of the dwmac node. This adds proper description for this setup, which has the advantage of validating the queue configuration node content. The example is also updated to use the sub-node style, incl. the axi bus configuration node, which got the same treatment as the queues config in 5361660af6d3 ("dt-bindings: net: snps,dwmac: Document stmmac-axi-config subnode"). Signed-off-by: Sebastian Reichel Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller .../devicetree/bindings/net/snps,dwmac.yaml | 345 ++++++++++++++++----- 1 file changed, 264 insertions(+), 81 deletions(-) commit f19dd011d8de6f0c1d20abea5158aa4f5d9cea44 Author: Daniel Latypov Date: Fri Oct 28 14:02:56 2022 -0700 kunit: tool: print summary of failed tests if a few failed out of a lot E.g. all the hw_breakpoint tests are failing right now. So if I run `kunit.py run --altests --arch=x86_64`, then I see > Testing complete. Ran 408 tests: passed: 392, failed: 9, skipped: 7 Seeing which 9 tests failed out of the hundreds is annoying. If my terminal doesn't have scrollback support, I have to resort to looking at `.kunit/test.log` for the `not ok` lines. Teach kunit.py to print a summarized list of failures if the # of tests reachs an arbitrary threshold (>=100 tests). To try and keep the output from being too long/noisy, this new logic a) just reports "parent_test failed" if every child test failed b) won't print anything if there are >10 failures (also arbitrary). With this patch, we get an extra line of output showing: > Testing complete. Ran 408 tests: passed: 392, failed: 9, skipped: 7 > Failures: hw_breakpoint This also works with parameterized tests, e.g. if I add a fake failure > Failures: kcsan.test_atomic_builtins_missing_barrier.threads=6 Note: we didn't have enough tests for this to be a problem before. But with commit 980ac3ad0512 ("kunit: tool: rename all_test_uml.config, use it for --alltests"), --alltests works and thus running >100 tests will probably become more common. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit_parser.py | 47 ++++++++++++++++++++++++++++++++++ tools/testing/kunit/kunit_tool_test.py | 22 ++++++++++++++++ 2 files changed, 69 insertions(+) commit 3ffdcf7e3b7dff04b055771c03c9646aa383cc1e Author: Daniel Latypov Date: Fri Oct 28 14:02:55 2022 -0700 kunit: tool: make unit test not print parsed testdata to stdout Currently, if you run $ ./tools/testing/kunit/kunit_tool_test.py you'll see a lot of output from the parser as we feed it testdata. This makes the output hard to read and fairly confusing, esp. since our testdata includes example failures, which get printed out in red. Silence that output so real failures are easier to see. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit_tool_test.py | 6 ++++++ 1 file changed, 6 insertions(+) commit 2c5240a018afd6f46fe648ee2396983f5ce1e087 Author: Sebastian Reichel Date: Mon Oct 24 18:55:48 2022 +0200 arm64: dts: meson: remove clock-frequency from rtc 'clock-frequency' is not part of the DT binding and not supported by the Linux driver. Signed-off-by: Sebastian Reichel Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20221024165549.74574-6-sebastian.reichel@collabora.com Signed-off-by: Neil Armstrong arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts | 1 - 3 files changed, 3 deletions(-) commit 62a56c540797681a5b50a4c06bf638f79b6013bc Author: Shaoqin Huang Date: Tue Oct 11 14:21:22 2022 +0800 memblock test: Update TODO list Remove the completed items from TODO list. Signed-off-by: Shaoqin Huang Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/20221011062128.49359-4-shaoqin.huang@intel.com tools/testing/memblock/TODO | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 5b27dd7968b9c916da4af48d0310f94152744f8e Author: Shaoqin Huang Date: Tue Oct 11 14:21:21 2022 +0800 memblock test: Add test to memblock_reserve() 129th region Reserve 129th region in the memblock, and this will trigger the memblock_double_array() function, this needs valid memory regions. So using dummy_physical_memory_init() to allocate a valid memory region. At the same time, reserve 128 faked memory region, and make sure these reserved region not intersect with the valid memory region. So memblock_double_array() will choose the valid memory region, and it will success. Also need to restore the reserved.regions after memblock_double_array(), to make sure the subsequent tests can run as normal. Signed-off-by: Shaoqin Huang Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/20221011062128.49359-3-shaoqin.huang@intel.com tools/testing/memblock/tests/basic_api.c | 91 ++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit 085bdaa6eb1476ec054164bdc4001bc3916ff5cb Author: Shaoqin Huang Date: Tue Oct 11 14:21:20 2022 +0800 memblock test: Add test to memblock_add() 129th region Add 129th region into the memblock, and this will trigger the memblock_double_array() function, this needs valid memory regions. So using dummy_physical_memory_init() to allocate a large enough memory region, and split it into a large enough memory which can be choosed by memblock_double_array(), and the left memory will be split into small memory region, and add them into the memblock. It make sure the memblock_double_array() will always choose the valid memory region that is allocated by the dummy_physical_memory_init(). So memblock_double_array() must success. Another thing should be done is to restore the memory.regions after memblock_double_array(), due to now the memory.regions is pointing to a memory region allocated by dummy_physical_memory_init(). And it will affect the subsequent tests if we don't restore the memory region. So simply record the origin region, and restore it after the test. Signed-off-by: Shaoqin Huang Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/20221011062128.49359-2-shaoqin.huang@intel.com tools/testing/memblock/tests/basic_api.c | 93 ++++++++++++++++++++++++++++++++ tools/testing/memblock/tests/common.c | 7 ++- tools/testing/memblock/tests/common.h | 6 ++- 3 files changed, 103 insertions(+), 3 deletions(-) commit ae85931f8f483ed58f7c90c99c75afd8482e0399 Author: Martin Kaiser Date: Sun Oct 30 18:33:26 2022 +0100 staging: r8188eu: check destination address in OnAction All subfunctions of OnAction check if the destination address matches the local interface's address. It's simpler to move this check to OnAction. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-14-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 9001c5029dded946e7862e5785278f7c1d9dfe55 Author: Martin Kaiser Date: Sun Oct 30 18:33:25 2022 +0100 staging: r8188eu: rtw_action_public_decache's token is a u8 Both callers of rtw_action_public_decache pass a u8 value for the token parameter. We can change token from s32 to u8 and remove the code for token < 0. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 8161a8335821bb6944eef2de8b750544d59c49c2 Author: Martin Kaiser Date: Sun Oct 30 18:33:24 2022 +0100 staging: r8188eu: remove return value from on_action_public_default The only caller of on_action_public_default does not check the return value. We can make it a void function. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit a399a3b05209dc759b20c6d6e4aa331f2e60bc8a Author: Martin Kaiser Date: Sun Oct 30 18:33:23 2022 +0100 staging: r8188eu: remove return value from on_action_public_vendor The only caller of on_action_public_vendor does not check the return value. We can make it a void function. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit a05159da5a4e49fd4b34cb00fb33badeb4dc9ec3 Author: Martin Kaiser Date: Sun Oct 30 18:33:22 2022 +0100 staging: r8188eu: clean up on_action_public Use the struct mgmt to read the action_code. This is much simpler than parsing the message ourselves. Add a comment about reading the action code. All members of the action enum start with an action_code byte. It does not matter which member we use. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit fc47cb05cf19017c3eb87da9b82e20f57b595ad3 Author: Martin Kaiser Date: Sun Oct 30 18:33:21 2022 +0100 staging: r8188eu: replace GetAddr1Ptr call in OnAction_p2p Define a struct ieee80211_mgmt in OnAction_p2p and use it to check the destination address. This replaces a call to the driver-specific GetAddr1Ptr function. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e246bf42ef82ac25d8a7ad45ddd07fbf161f7e7f Author: Martin Kaiser Date: Sun Oct 30 18:33:20 2022 +0100 staging: r8188eu: replace switch-case with if OnAction_p2p has a switch-case statement where only a single case is handled. Use if instead, this makes the code shorter and easier to read. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit b31b29788f103c2720898af2d499d8b53c1eb980 Author: Martin Kaiser Date: Sun Oct 30 18:33:19 2022 +0100 staging: r8188eu: remove category check in OnAction_p2p The caller of OnAction_p2p has already checked the action category. We can remove the check in OnAction_p2p. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit aa415931f9682fd4ac71ac34ffa5c157cef2b680 Author: Martin Kaiser Date: Sun Oct 30 18:33:18 2022 +0100 staging: r8188eu: make OnAction_p2p static void OnAction_p2p is called only by OnAction, its return value is not checked. We can make it a static void function. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 9 ++++----- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 3 --- 2 files changed, 4 insertions(+), 8 deletions(-) commit b22b8618ab3cf011a5536e30e3fb99b32c911ecb Author: Martin Kaiser Date: Sun Oct 30 18:33:17 2022 +0100 staging: r8188eu: make OnAction_back static void OnAction_back is called only by OnAction, its return value is not checked. We can make it a static void function. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 13 +++++-------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 5 insertions(+), 10 deletions(-) commit 721d7f496a0602d061bd127bd88de7e70181f521 Author: Martin Kaiser Date: Sun Oct 30 18:33:16 2022 +0100 staging: r8188eu: make on_action_public static void The on_action_public function is called only by OnAction. This function also lives in rtw_mlme_ext.c and does not check the return value from on_action_public. We can make on_action_public a static void function. The ret variable is no longer needed if we don't return a value. It can be removed. Reported-by: kernel test robot Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 12 ++++-------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 4 insertions(+), 10 deletions(-) commit 5998e3192274da5fd9521b1019cc62b5ea2283b7 Author: Martin Kaiser Date: Sun Oct 30 18:33:15 2022 +0100 staging: r8188eu: remove duplicate category check The caller of on_action_public has already checked the action category. We can remove the check in on_action_public. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 5c4fb46e9116bd7cf87bd76b417a865626e13c30 Author: Martin Kaiser Date: Sun Oct 30 18:33:14 2022 +0100 staging: r8188eu: replace a GetAddr1Ptr call Define a struct ieee80211_mgmt and use it to read the destination address. This replaces one call to the driver-specific GetAddr1Ptr function, which should eventually be removed. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221030173326.1588647-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 336ccc31cda111c830332d4b56def49c9c1d48e6 Author: Nam Cao Date: Tue Oct 25 11:12:26 2022 +0200 staging: rtl8712: fix potential memory leak In r8712_init_drv_sw(), whenever any function call returns error, it is returned immediately without properly cleaning up the other successfully executed functions. This can cause memory leak. Instead of return immediately, free all the allocated buffers first. Tested-by: Philipp Hortmann Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/0a3414b12031f6cdcba81a8725e91eb9567ff34f.1666688642.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 242443430dd8ef932a56cf483080a46f2948dd65 Author: Nam Cao Date: Tue Oct 25 11:12:25 2022 +0200 staging: rtl8712: check for return value of _r8712_init_xmit_priv() The return value of _r8712_init_xmit_priv() is never checked and the driver always continue execution as if all is well. This will cause problems if, for example, buffers cannot be allocated and the driver continue and use those buffers. Check for return value of _r8712_init_xmit_priv() and return error (if any) during probing. Tested-by: Philipp Hortmann Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/b550803561acf26af71f2377215c28b94435a644.1666688642.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 63b5e50571ce4d87cd6c1c4d99de74c9d86fd0d8 Author: Nam Cao Date: Tue Oct 25 11:12:24 2022 +0200 staging: rtl8712: check for alloc fail in _r8712_init_recv_priv() The function _r8712_init_recv_priv() and also r8712_init_recv_priv() just returns silently if they fail to allocate memory. Change their return type to int and add necessary checks and handling if they return -ENOMEM Tested-by: Philipp Hortmann Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/506ac35a667e511db568b06b86834fd0ceeba453.1666688642.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 4 +++- drivers/staging/rtl8712/recv_osdep.h | 8 ++++---- drivers/staging/rtl8712/rtl8712_recv.c | 7 ++++--- drivers/staging/rtl8712/rtl871x_recv.c | 13 +++++++++---- 4 files changed, 20 insertions(+), 12 deletions(-) commit c5a7eecdcdb6c9d3a907ee66db2b5cffc8bdb4e1 Author: Nam Cao Date: Tue Oct 25 11:12:23 2022 +0200 Revert "staging: r8712u: Tracking kmemleak false positives." This reverts commit 5d3da4a20a271e3cf5496a50cbb8118aa019374f. This commit annotated false positive for kmemleak. The reasoning is that the buffers are freed when the driver is unloaded. However, there is actually potential memory leak when probe fails. Tested-by: Philipp Hortmann Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/26ce206b2c40c7db48c146aa6105789db9dfcc1a.1666688642.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_recv.c | 3 --- 1 file changed, 3 deletions(-) commit dbc97f832aa798c16453eeb4eb5fe74b5c998223 Author: Martin Kaiser Date: Sat Oct 29 19:10:11 2022 +0200 staging: r8188eu: remove get_da Replace the last get_da call with ieee80211_get_DA and remove the get_da function. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221029171011.1572091-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 3 ++- drivers/staging/r8188eu/include/wifi.h | 22 ---------------------- 2 files changed, 2 insertions(+), 23 deletions(-) commit 1a048cde49046f37f91d340d25d7622f8f87a994 Author: Martin Kaiser Date: Sat Oct 29 19:10:10 2022 +0200 staging: r8188eu: replace get_da with ieee80211_get_DA Replace a call to the driver-specific get_da function with ieee80211_get_DA from ieee80211.h. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20221029171011.1572091-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1838742b1d4e6d89d9448fba2f3340b0aaaede73 Author: Aaron Lawrence Date: Wed Oct 26 19:43:51 2022 +0700 staging: rtl8192e: rtllib_crypt_tkip: rewritten comparison to NULL Rewritten a comparison to NULL with a negation operator in accordance with the Linux kernel coding-style regulations. The fix was directly recommended by the checkpatch script. Tested-by: Philipp Hortmann Signed-off-by: Aaron Lawrence Link: https://lore.kernel.org/r/ca33296630627020694f4b653580f689a8a3d1c7.1666787061.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f610736f7f40efbcac07a1c100ef703c74d30c1 Author: Aaron Lawrence Date: Wed Oct 26 19:42:55 2022 +0700 staging: rtl8192e: rtllib_crypt_tkip: split multiple assignments Split a multiple assignments statement to individual assignments on different lines in accordance with the Linux kernel coding-style regulations. Also repositioned comments on it and the statement before for increased legibility. The multiple assignments issue was found by the checkpatch script, with the comments legibility issue were through direct observation. Tested-by: Philipp Hortmann Signed-off-by: Aaron Lawrence Link: https://lore.kernel.org/r/a9ab257d0042afd3b3231eefe4f58c0c3ac7649f.1666787061.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8d1dcc729ada8e604442190e2887ff85d37ea6ca Author: Aaron Lawrence Date: Wed Oct 26 19:41:56 2022 +0700 staging: rtl8192e: rtllib_crypt_tkip: fixes on unbalanced braces Added braces around needed arms of statements which needs them in accordance with the Linux kernel coding-style regulations. The issues were found with the help of the checkpatch script. Tested-by: Philipp Hortmann Signed-off-by: Aaron Lawrence Link: https://lore.kernel.org/r/641d8360c5f86b54efc96d7f8ef70be1371db480.1666787061.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit dcbdcfca138ae185d7013e25ff02d9defd392884 Author: Aaron Lawrence Date: Wed Oct 26 19:41:08 2022 +0700 staging: rtl8192e: rtllib_crypt_tkip: fixed alignment matching open parentheses Aligned multiple lines to be at the same indentation of open parentheses before it in accordance with the Linux kernel coding-style regulations. The issues were found by running the checkpatch script on the file. Tested-by: Philipp Hortmann Signed-off-by: Aaron Lawrence Link: https://lore.kernel.org/r/4253b94d6b7d94713afb02fa63d0a98686e77cc1.1666787061.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6360fc223387179bb943d8865b853d0bb273dcf4 Author: Aaron Lawrence Date: Wed Oct 26 19:40:15 2022 +0700 staging: rtl8192e: rtllib_crypt_tkip: blank line before close brace removal Removed multiple blank lines that are not necessary before a closing brace. The issues were found with the checkpatch script and were dealt with in accordance with the Linux kernel coding-style guidelines. Tested-by: Philipp Hortmann Signed-off-by: Aaron Lawrence Link: https://lore.kernel.org/r/1ba11754f1b1e39b1525a837b8493ba8434d5e3b.1666787061.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 2 -- 1 file changed, 2 deletions(-) commit 130d7c481008703b4b103c9322e5fdfac130cc55 Author: Aaron Lawrence Date: Wed Oct 26 19:39:28 2022 +0700 staging: rtl8192e: rtllib_crypt_tkip: multiple blank lines removal Removed multiple unnecessary blank lines in accordance with the Linux kernel coding-style regulations. The issues were reported by the checkpatch script. Tested-by: Philipp Hortmann Signed-off-by: Aaron Lawrence Link: https://lore.kernel.org/r/f2103758c23f37b61fcbe14f8ed0da8d6b31f5c6.1666787061.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 24 ------------------------ 1 file changed, 24 deletions(-) commit 607732b42ce6aad76bbca3de8ea853c03e374958 Author: Yogesh Hegde Date: Sun Oct 30 19:02:04 2022 +0530 staging: rtl8192e: Rename variables rateIndex and rateBitmap to avoid CamelCase Rename variables * rateIndex to rate_index * rateBitmap to rate_bitmap to avoid CamelCase which is not accepted by checkpatch.pl . Signed-off-by: Yogesh Hegde Link: https://lore.kernel.org/r/20221030133204.GA416592@zephyrus Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f369953d9cd99a3977859a4bbad58897bc3da153 Author: Aaron Lawrence Date: Thu Oct 27 20:56:27 2022 +0700 staging: rtl8192e: rtllib_module: remove unnecessary parentheses This patch is intended to remove unnecessary parentheses in the rtllib_module.c file following the Linux kernel coding-style regulations. The modification is recommended by the checkpatch script. Signed-off-by: Aaron Lawrence Link: https://lore.kernel.org/r/20221027135627.vzc3woeuhrivozqz@plymouth Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95571b8db71e586c8071670fde0c6db5e4ced353 Author: Kang Minchul Date: Wed Oct 26 02:06:21 2022 +0900 staging: r8188eu: make rtw_sta_flush to void Make function rtw_sta_flush to void in order to prevent cocci warning as follows: Unneeded variable: "ret". Return "0" on line 1031 Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Kang Minchul Link: https://lore.kernel.org/r/20221025170621.271903-5-tegongkang@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_ap.c | 7 ++----- drivers/staging/r8188eu/include/rtw_ap.h | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) commit 0a7bf6a948b2a772ebed3915b6c47189d63dc246 Author: Kang Minchul Date: Wed Oct 26 02:06:20 2022 +0900 staging: r8188eu: remove unnecessary variable in rtl8188eu_xmit Return 0 directly instead of storing it in a variable. This can prevent cocci warning as follows: Unneeded variable: "pull". Return "0" on line 298 Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Kang Minchul Link: https://lore.kernel.org/r/20221025170621.271903-4-tegongkang@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f67469fe658a484f8c000bfcf66a191417bd6e30 Author: Kang Minchul Date: Wed Oct 26 02:06:19 2022 +0900 staging: r8188eu: remove unnecessary vaiable in rtw_recv Return _SUCCESS directly instead of storing it in a variable. This can prevent cocci warning as follows: Unneeded variable: "ret". Return "_SUCCESS" on line 1516 Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Kang Minchul Link: https://lore.kernel.org/r/20221025170621.271903-3-tegongkang@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_recv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cbcab58a7cbf51e0e1e8e5dec0bd44be48e966db Author: Kang Minchul Date: Wed Oct 26 02:06:18 2022 +0900 staging: r8188eu: remove unnecessary variable in ioctl_linux Returning value 0 directly instead of storing it in variable ret. This commit can prevent cocci warning as follows: Unneeded variable: "ret". Return "0" on line 3030 Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Kang Minchul Link: https://lore.kernel.org/r/20221025170621.271903-2-tegongkang@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/os_dep/ioctl_linux.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 737143dc87dfd3cb600a46092387c9caa814ce88 Author: Michael Straube Date: Sun Oct 30 09:10:20 2022 +0100 staging: r8188eu: use min() instead of ternary operator Replace a ternary operator usage with the min() macro to improve readability. Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20221030081020.8533-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fe5dc3dcc2920669217e3696ec15fec6630a92f Author: Emily Peri Date: Fri Oct 28 11:39:19 2022 -0700 staging: rtl8723bs: replace ternary statement with min_t macro Ternary statements that pick the min of two values can be replaced by the macro min_t(). This improves readability, since its quicker to understand min_t(type, x, y) than x < y ? x : y. Issue found by coccicheck. Signed-off-by: Emily Peri Link: https://lore.kernel.org/r/Y1wh1zYMAbbKSrGB@marshmallow Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8527e94216902cab5b483e2450db93c11109ff97 Merge: 8127cac0f393 30a0b95b1335 Author: Greg Kroah-Hartman Date: Mon Oct 31 05:47:21 2022 +0100 Merge 6.1-rc3 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit e068bc0b01cfcc0169645effc22b9f0dea0e97ed Author: Stephen Boyd Date: Tue Oct 25 17:36:41 2022 -0700 dt-bindings: cros-ec: Add ChromeOS fingerprint binding Add a binding to describe the fingerprint processor found on Chromebooks with a fingerprint sensor. Previously we've been describing this with the google,cros-ec-spi binding but it lacks gpio and regulator control used during firmware flashing. Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Cc: Cc: Guenter Roeck Cc: Douglas Anderson Cc: Craig Hesling Cc: Tom Hughes Cc: Alexandru M Stan Cc: Tzung-Bi Shih Cc: Matthias Kaehlcke Cc: Benson Leung Cc: Lee Jones Signed-off-by: Stephen Boyd Reviewed-by: Rob Herring Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221026003641.2688765-3-swboyd@chromium.org .../devicetree/bindings/mfd/google,cros-ec.yaml | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 7a2f36828c7b4bf61aa4159c6d0a3c58264b6b06 Author: Stephen Boyd Date: Tue Oct 25 17:36:40 2022 -0700 dt-bindings: cros-ec: Reorganize and enforce property availability Various properties in the cros-ec binding only apply to different compatible strings. For example, the interrupts and reg property are required for all cros-ec devices except for the rpmsg version. Add some conditions to update the availability of properties so that they can't be used with compatibles that don't support them. This reveals that many of the examples in bindings that use cros-ec were missing the interrupts property. Add the property to make those bindings whole again. Reviewed-by: Rob Herring Cc: Krzysztof Kozlowski Cc: Cc: Cc: Guenter Roeck Reviewed-by: Douglas Anderson Cc: Craig Hesling Cc: Tom Hughes Cc: Alexandru M Stan Cc: Tzung-Bi Shih Cc: Matthias Kaehlcke Cc: Benson Leung Cc: Lee Jones Signed-off-by: Stephen Boyd Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221026003641.2688765-2-swboyd@chromium.org .../bindings/chrome/google,cros-ec-typec.yaml | 1 + .../chrome/google,cros-kbd-led-backlight.yaml | 1 + .../bindings/extcon/extcon-usbc-cros-ec.yaml | 1 + .../bindings/i2c/google,cros-ec-i2c-tunnel.yaml | 1 + .../devicetree/bindings/mfd/google,cros-ec.yaml | 36 ++++++++++++++-------- .../bindings/pwm/google,cros-ec-pwm.yaml | 1 + .../regulator/google,cros-ec-regulator.yaml | 1 + .../bindings/sound/google,cros-ec-codec.yaml | 1 + 8 files changed, 30 insertions(+), 13 deletions(-) commit 9076cbaa77578c9a9c4f8883e068e5e4cf47c479 Author: Alistair Francis Date: Sat Oct 29 20:06:46 2022 +1000 ARM: dts: imx7d-remarkable2: Enable silergy,sy7636a Enable the silergy,sy7636a and silergy,sy7636a-regulator on the reMarkable2. Signed-off-by: Alistair Francis Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-remarkable2.dts | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit c2741cbe7f8aba56a79a150536863eb1f62f9af6 Author: Marek Vasut Date: Thu Sep 29 16:54:16 2022 +0200 dt-bindings: media: st,stmipid02: Convert the text bindings to YAML Convert the text STMIPID02 DT bindings to YAML DT format to permit validation of DTs using this I2C CSI-2 to CPI bridge. Reviewed-by: Benjamin Mugnier Signed-off-by: Marek Vasut Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220929145416.16336-1-marex@denx.de Signed-off-by: Rob Herring .../bindings/media/i2c/st,st-mipid02.txt | 82 ---------- .../bindings/media/i2c/st,st-mipid02.yaml | 176 +++++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 177 insertions(+), 83 deletions(-) commit f3fb589aeb88c5bf7a7a804d36a8fa219b72e290 Author: Juhee Kang Date: Fri Oct 28 01:04:24 2022 +0900 net: remove unused netdev_unregistering() Currently, use dev->reg_state == NETREG_UNREGISTERING to check the status which is NETREG_UNREGISTERING, rather than using netdev_unregistering. Also, A helper function which is netdev_unregistering on nedevice.h is no longer used. Thus, netdev_unregistering removes from netdevice.h. Signed-off-by: Juhee Kang Signed-off-by: David S. Miller include/linux/netdevice.h | 5 ----- 1 file changed, 5 deletions(-) commit 8ea13ce0800e3e3bf95da2424f87b649a6efecfa Author: Furkan Kardame Date: Wed Oct 26 20:21:53 2022 +0300 arm64: dts: rockchip: enable pcie2 on rk3566-roc-pc This patch adds nodes needed for pcie2 to work on rk3566-roc-pc Signed-off-by: Furkan Kardame Link: https://lore.kernel.org/r/20221026172152.64513-1-f.kardame@manjaro.org Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-roc-pc.dts | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit ec3fd1adfda96f42e70dd5f0f69451d642d3598b Author: Chris Morgan Date: Tue Aug 16 16:04:40 2022 -0500 arm64: dts: rockchip: Update joystick to polled for OG2 Update the Odroid Go Advance to use "poll-interval" from the adc-joystick driver. Signed-off-by: Chris Morgan Signed-off-by: Maya Matuszczyk Link: https://lore.kernel.org/r/20220816210440.14260-4-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts | 1 + 1 file changed, 1 insertion(+) commit 60bd5ee7c8a855a7917fe41771b0e297912a7626 Author: Chris Morgan Date: Fri Oct 28 13:40:45 2022 -0500 arm64: dts: rockchip: add poll-interval to RGxx3 devices Add adc-joystick polling for all Anbernic RGxx3 based devices. They are all functionally identical in how they work. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20221028184045.13113-5-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi | 1 + 1 file changed, 1 insertion(+) commit 22a91b7614132ce0651d0ddd6e0bcee119370840 Author: Chris Morgan Date: Fri Oct 28 13:40:44 2022 -0500 arm64: dts: rockchip: add rk817 chg to RG353P and RG503 Add support for the internal battery and charger for the Anbernic RG353P and RG503. Battery values are taken from the BSP Kernel device tree. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20221028184045.13113-4-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner .../boot/dts/rockchip/rk3566-anbernic-rg353p.dts | 28 ++++++++++++++++++++++ .../boot/dts/rockchip/rk3566-anbernic-rg503.dts | 28 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit 1e141cf127262150d053ed3f80d0d3c42de11c43 Author: Chris Morgan Date: Fri Oct 28 13:40:43 2022 -0500 arm64: dts: rockchip: add Anbernic RG353V and RG353VS Anbernic RG353V and RG353VS are both RK3566 based handheld gaming devices from Anbernic. They are functionally very similar to the RG353P with the following distinct differences: - The battery size of the RG353V and RG353VS is 3200mAh instead of 3500mAh. - The audio uses the PMIC's internal amplifier for a mono speaker instead of an external amplifier with stereo speakers. - The GPIOs for the R1 and R2 buttons are switched. As for the differences between the RG353V and RG353VS, they are as follows: - The RG353VS has no touchscreen on i2c2. - The RG353VS has no eMMC. - The RG353VS has 1GB of RAM instead of 2GB. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20221028184045.13113-3-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 2 + .../boot/dts/rockchip/rk3566-anbernic-rg353p.dts | 83 ++++++++------- .../boot/dts/rockchip/rk3566-anbernic-rg353v.dts | 114 +++++++++++++++++++++ .../boot/dts/rockchip/rk3566-anbernic-rg353vs.dts | 87 ++++++++++++++++ .../boot/dts/rockchip/rk3566-anbernic-rg353x.dtsi | 60 +++++++++++ .../boot/dts/rockchip/rk3566-anbernic-rg503.dts | 51 +++++++++ .../boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi | 46 --------- 7 files changed, 358 insertions(+), 85 deletions(-) commit e1cc1e712d85c10ad47a083186c222210dab5b23 Author: Chris Morgan Date: Fri Oct 28 13:40:42 2022 -0500 dt-bindings: arm: rockchip: Add Anbernic RG353V and RG353VS Add entry for the Anbernic RG353V and RG353VS handheld devices. Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221028184045.13113-2-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8cf890aabd45664b8f27a5581c8d2a51a8ce2e17 Author: Shengyu Qu Date: Sun Oct 30 01:09:08 2022 +0800 arm64: dts: rockchip: Add nodes for SDIO/UART Wi-Fi/Bluetooth modules to Radxa Rock 3A This patch adds related bus/pinctrl/power nodes to enable support for Radxa's Wi-Fi Bluetooth combo module. Tested with RADXA A6 module, which uses AP6275S (BCM43752A2) Signed-off-by: Shengyu Qu Link: https://lore.kernel.org/r/OS3P286MB25972313C916A68698B1CD8698359@OS3P286MB2597.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 69 +++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 3a6dcf61d542fb1f4fbd546a9df91938440ece3a Author: Shengyu Qu Date: Sun Oct 30 01:09:06 2022 +0800 arm64: dts: rockchip: Add I2S2 node for RADXA Rock 3A This patch adds I2S2 node for Radxa Rock 3A's M.2 E key slot for Bluetooth PCM input. I2S2 is not used now, but could be configured for Bluetooth HFP over PCM in future patches. Signed-off-by: Shengyu Qu Link: https://lore.kernel.org/r/OS3P286MB259791E603F96942F51332D098359@OS3P286MB2597.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 755f37010f3eac0bdfa41bdf2308e8380a93f10c Author: Shengyu Qu Date: Sun Oct 30 01:09:04 2022 +0800 arm64: dts: rockchip: RK356x: Add I2S2 device node This patch adds I2S2 device tree node for RK3566/RK3568. Signed-off-by: Shengyu Qu Link: https://lore.kernel.org/r/OS3P286MB259771C12F2B15A4DDF435FE98359@OS3P286MB2597.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk356x.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit d4eade428d22f2ac5f32b12ec183fdff84dc07a6 Author: Heiko Stuebner Date: Sun Oct 30 20:34:42 2022 +0100 arm64: dts: rockchip: fix spdif@fe460000 ordering on rk356x Move the node to its correct position, based on its mmio-address. Link: https://lore.kernel.org/all/20221030193708.1671069-1-heiko@sntech.de Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk356x.dtsi | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 52b33d87b9197c51e8ffdc61873739d90dd0a16f Author: Chengming Zhou Date: Mon Sep 26 16:19:31 2022 +0800 sched/psi: Use task->psi_flags to clear in CPU migration The commit d583d360a620 ("psi: Fix psi state corruption when schedule() races with cgroup move") fixed a race problem by making cgroup_move_task() use task->psi_flags instead of looking at the scheduler state. We can extend task->psi_flags usage to CPU migration, which should be a minor optimization for performance and code simplicity. Signed-off-by: Chengming Zhou Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Link: https://lore.kernel.org/r/20220926081931.45420-1-zhouchengming@bytedance.com include/linux/sched.h | 3 --- kernel/sched/core.c | 2 +- kernel/sched/stats.h | 22 ++++------------------ 3 files changed, 5 insertions(+), 22 deletions(-) commit 710ffe671e014d5ccbcff225130a178b088ef090 Author: Suren Baghdasaryan Date: Fri Oct 28 12:45:41 2022 -0700 sched/psi: Stop relying on timer_pending() for poll_work rescheduling Psi polling mechanism is trying to minimize the number of wakeups to run psi_poll_work and is currently relying on timer_pending() to detect when this work is already scheduled. This provides a window of opportunity for psi_group_change to schedule an immediate psi_poll_work after poll_timer_fn got called but before psi_poll_work could reschedule itself. Below is the depiction of this entire window: poll_timer_fn wake_up_interruptible(&group->poll_wait); psi_poll_worker wait_event_interruptible(group->poll_wait, ...) psi_poll_work psi_schedule_poll_work if (timer_pending(&group->poll_timer)) return; ... mod_timer(&group->poll_timer, jiffies + delay); Prior to 461daba06bdc we used to rely on poll_scheduled atomic which was reset and set back inside psi_poll_work and therefore this race window was much smaller. The larger window causes increased number of wakeups and our partners report visible power regression of ~10mA after applying 461daba06bdc. Bring back the poll_scheduled atomic and make this race window even narrower by resetting poll_scheduled only when we reach polling expiration time. This does not completely eliminate the possibility of extra wakeups caused by a race with psi_group_change however it will limit it to the worst case scenario of one extra wakeup per every tracking window (0.5s in the worst case). This patch also ensures correct ordering between clearing poll_scheduled flag and obtaining changed_states using memory barrier. Correct ordering between updating changed_states and setting poll_scheduled is ensured by atomic_xchg operation. By tracing the number of immediate rescheduling attempts performed by psi_group_change and the number of these attempts being blocked due to psi monitor being already active, we can assess the effects of this change: Before the patch: Run#1 Run#2 Run#3 Immediate reschedules attempted: 684365 1385156 1261240 Immediate reschedules blocked: 682846 1381654 1258682 Immediate reschedules (delta): 1519 3502 2558 Immediate reschedules (% of attempted): 0.22% 0.25% 0.20% After the patch: Run#1 Run#2 Run#3 Immediate reschedules attempted: 882244 770298 426218 Immediate reschedules blocked: 881996 769796 426074 Immediate reschedules (delta): 248 502 144 Immediate reschedules (% of attempted): 0.03% 0.07% 0.03% The number of non-blocked immediate reschedules dropped from 0.22-0.25% to 0.03-0.07%. The drop is attributed to the decrease in the race window size and the fact that we allow this race only when psi monitors reach polling window expiration time. Fixes: 461daba06bdc ("psi: eliminate kthread_worker from psi trigger scheduling mechanism") Reported-by: Kathleen Chang Reported-by: Wenju Xu Reported-by: Jonathan Chen Signed-off-by: Suren Baghdasaryan Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Chengming Zhou Acked-by: Johannes Weiner Tested-by: SH Chen Link: https://lore.kernel.org/r/20221028194541.813985-1-surenb@google.com include/linux/psi_types.h | 1 + kernel/sched/psi.c | 62 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 53 insertions(+), 10 deletions(-) commit 2fcd7bbae90a6d844da8660a9d27079281dfbba2 Author: Chengming Zhou Date: Fri Oct 14 19:05:51 2022 +0800 sched/psi: Fix avgs_work re-arm in psi_avgs_work() Pavan reported a problem that PSI avgs_work idle shutoff is not working at all. Because PSI_NONIDLE condition would be observed in psi_avgs_work()->collect_percpu_times()->get_recent_times() even if only the kworker running avgs_work on the CPU. Although commit 1b69ac6b40eb ("psi: fix aggregation idle shut-off") avoided the ping-pong wake problem when the worker sleep, psi_avgs_work() still will always re-arm the avgs_work, so shutoff is not working. This patch changes to use PSI_STATE_RESCHEDULE to flag whether to re-arm avgs_work in get_recent_times(). For the current CPU, we re-arm avgs_work only when (NR_RUNNING > 1 || NR_IOWAIT > 0 || NR_MEMSTALL > 0), for other CPUs we can just check PSI_NONIDLE delta. The new flag is only used in psi_avgs_work(), so we check in get_recent_times() that current_work() is avgs_work. One potential problem is that the brief period of non-idle time incurred between the aggregation run and the kworker's dequeue will be stranded in the per-cpu buckets until avgs_work run next time. The buckets can hold 4s worth of time, and future activity will wake the avgs_work with a 2s delay, giving us 2s worth of data we can leave behind when shut off the avgs_work. If the kworker run other works after avgs_work shut off and doesn't have any scheduler activities for 2s, this maybe a problem. Reported-by: Pavan Kondeti Signed-off-by: Chengming Zhou Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Acked-by: Suren Baghdasaryan Tested-by: Chengming Zhou Link: https://lore.kernel.org/r/20221014110551.22695-1-zhouchengming@bytedance.com include/linux/psi_types.h | 3 +++ kernel/sched/psi.c | 30 +++++++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) commit e38f89af6a13e895805febd3a329a13ab7e66fa4 Author: Hao Lee Date: Mon Sep 19 07:23:56 2022 +0000 sched/psi: Fix possible missing or delayed pending event When a pending event exists and growth is less than the threshold, the current logic is to skip this trigger without generating event. However, from e6df4ead85d9 ("psi: fix possible trigger missing in the window"), our purpose is to generate event as long as pending event exists and the rate meets the limit, no matter what growth is. This patch handles this case properly. Fixes: e6df4ead85d9 ("psi: fix possible trigger missing in the window") Signed-off-by: Hao Lee Signed-off-by: Peter Zijlstra (Intel) Acked-by: Suren Baghdasaryan Link: https://lore.kernel.org/r/20220919072356.GA29069@haolee.io kernel/sched/psi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 66603243f5283f7f28c795f09e7c2167233df0bd Author: Chris Morgan Date: Fri Oct 28 14:02:04 2022 -0700 Input: add driver for Hynitron cstxxx touchscreens Add support for the Hynitron cst3xx controller found on devices such as the Anbernic RG353P and RG353V (the Hynitron CST340). This driver was built from sources provided by Hynitron to Anbernic (possibly via Rockchip as an intermediary) and marked as GPLv2 in the code. This driver was written strictly for the cst3xx series, but in most places was left somewhat generic so support could be easily added to other devices in the future. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20221028202636.14341-4-macroalpha82@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/hynitron_cstxxx.c | 498 ++++++++++++++++++++++++++++ 3 files changed, 511 insertions(+) commit 86a7d13c9afaa6a223a0ef3234a75e4135e1f0bf Author: Chris Morgan Date: Fri Oct 28 14:01:42 2022 -0700 dt-bindings: input: touchscreen: Add Hynitron cstxxx Add documentation for the Hynitron cstxxx touchscreen bindings. Hynitron makes a series of touchscreen controllers, however for now this is expected to only be compatible with the cst3xx series, specifically the CST340, CST348, and CST356. Signed-off-by: Chris Morgan Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221028202636.14341-3-macroalpha82@gmail.com Signed-off-by: Dmitry Torokhov .../input/touchscreen/hynitron,cstxxx.yaml | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 537187c897d20a2e97765d7fc3a52f5f0cb5bfd5 Author: Chris Morgan Date: Fri Oct 28 14:01:07 2022 -0700 dt-bindings: vendor-prefixes: add Hynitron vendor prefix Hynitron is a company based in Shanghai that makes controller ICs for touchscreens. http://www.hynitron.com/ Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221028202636.14341-2-macroalpha82@gmail.com Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 8eae11e8ce9beb6c91e216c274f4b3bdf85a0924 Author: Neil Armstrong Date: Thu Oct 27 17:52:21 2022 -0700 dt-bindings: input: qcom,pm8921-pwrkey: convert to dt-schema Convert input/qcom,pm8xxx-pwrkey.txt to YAML, and take in account that the PM8921 pwrkey compatible is used as fallback for the PM8018 pwrkey. Reviewed-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220928-mdm9615-dt-schema-fixes-v4-6-dac2dfaac703@linaro.org Signed-off-by: Dmitry Torokhov .../bindings/input/qcom,pm8921-pwrkey.yaml | 75 ++++++++++++++++++++++ .../bindings/input/qcom,pm8xxx-pwrkey.txt | 46 ------------- 2 files changed, 75 insertions(+), 46 deletions(-) commit fa6a3bf7ff3734ff13764d1b9e36c48f93eb3677 Author: Al Viro Date: Sat Sep 18 18:42:20 2021 -0400 alpha: ret_from_fork can go straight to ret_to_user We only hit ret_from_fork when the child is meant to return to userland (since 2012 or so). Signed-off-by: Al Viro arch/alpha/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e778eaecedcb0422dd81af23cf83546b4932fc19 Author: Al Viro Date: Sat Sep 18 18:38:15 2021 -0400 alpha: syscall exit cleanup $ret_success consists of two insn + branch to ret_from_syscall. The thing is, those insns are identical to the ones immediately preceding ret_from_syscall... Signed-off-by: Al Viro arch/alpha/kernel/entry.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 19a09e426893a3cb08b97147b8dc22bdfcab3bba Author: Al Viro Date: Sat Sep 18 18:27:12 2021 -0400 alpha: fix handling of a3 on straced syscalls For successful syscall that happens to return a negative, we want a3 set to 0, no matter whether it's straced or not. As it is, for straced case we leave the value it used to have on syscall entry. Easily fixed, fortunately... Signed-off-by: Al Viro arch/alpha/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7b2431a6d22f7a91c567708e071dfcd6d66db14 Author: Al Viro Date: Sat Sep 18 18:18:48 2021 -0400 alpha: fix syscall entry in !AUDUT_SYSCALL case We only want to take the slow path if SYSCALL_TRACE or SYSCALL_AUDIT is set; on !AUDIT_SYSCALL configs the current tree hits it whenever _any_ thread flag (including NEED_RESCHED, NOTIFY_SIGNAL, etc.) happens to be set. Fixes: a9302e843944 "alpha: Enable system-call auditing support" Signed-off-by: Al Viro arch/alpha/kernel/entry.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 71ac548bfd318930e3040d96c25f361b5d558296 Author: Al Viro Date: Sat Sep 18 18:12:37 2021 -0400 alpha: _TIF_ALLWORK_MASK is unused ... and never had been used, actually Signed-off-by: Al Viro arch/alpha/include/asm/thread_info.h | 4 ---- 1 file changed, 4 deletions(-) commit e2c7554cc6d85f95e3c6635f270ec839ab9fe05e Author: Al Viro Date: Sat Sep 18 18:08:56 2021 -0400 alpha: fix TIF_NOTIFY_SIGNAL handling it needs to be added to _TIF_WORK_MASK, or we might not reach do_work_pending() in the first place... Fixes: 5a9a8897c253a "alpha: add support for TIF_NOTIFY_SIGNAL" Signed-off-by: Al Viro arch/alpha/include/asm/thread_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4dba27f1a14592ac4cf71c3bc1cc1fd05dea8015 Author: Zhang Qilong Date: Thu Sep 22 21:21:07 2022 +0800 drm/rockchip: lvds: fix PM usage counter unbalance in poweron pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. We fix it by replacing it with the newest pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 34cc0aa25456 ("drm/rockchip: Add support for Rockchip Soc LVDS") Fixes: cca1705c3d89 ("drm/rockchip: lvds: Add PX30 support") Signed-off-by: Zhang Qilong Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220922132107.105419-3-zhangqilong3@huawei.com drivers/gpu/drm/rockchip/rockchip_lvds.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit e3558747ebe15306e6d0b75bd6d211436be4a7d5 Author: Yuan Can Date: Wed Jun 15 06:26:44 2022 +0000 drm/rockchip: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() Replace pm_runtime_get_sync() with pm_runtime_resume_and_get() to avoid device usage counter leak. Signed-off-by: Yuan Can Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220615062644.96837-1-yuancan@huawei.com drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++-- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 3daf391fee830f2343cc6b1ba131b1b5115dea1f Author: Jiapeng Chong Date: Mon Oct 17 16:43:30 2022 +0800 drm/rockchip: dsi: Remove the unused function dsi_update_bits() The function dsi_update_bits() is defined in the dw-mipi-dsi-rockchip.c file, but not called elsewhere, so delete this unused function. drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:367:20: warning: unused function 'dsi_update_bits'. https://bugzilla.openanolis.cn/show_bug.cgi?id=2414 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20221017084330.94117-1-jiapeng.chong@linux.alibaba.com drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 6 ------ 1 file changed, 6 deletions(-) commit de4a4c8f64021b02aaa8ab21a82fe1f11a17b975 Author: Sascha Hauer Date: Mon Sep 26 10:16:43 2022 +0200 drm/rockchip: vop2: Register Esmart0-win0 as primary plane Esmart0-win0 could serve as primary plane, so mark it as such. On RK3568 this window will never be used as primary plane, because the three windows at the beginning of the rk3568_vop_win_data[] array will be used. On RK3566 however, two of the windows at the beginning of the rk3568_vop_win_data[] array cannot not be used due to hardware limitations, so without this patch we end up with CRTCs without primary planes when multiple VPs are active. Signed-off-by: Sascha Hauer Tested-by: Chris Morgan Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220926081643.304759-1-s.hauer@pengutronix.de drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4016379301a33e8bd0c2ef5c02f5d7f6a4afece4 Author: Johan Jonker Date: Wed Oct 19 23:35:03 2022 +0200 drm: rockchip: remove rockchip_drm_framebuffer_init() function The function rockchip_drm_framebuffer_init() was in use in the rockchip_drm_fbdev.c file, but that is now replaced by a generic fbdev setup. Reduce the image size by removing the rockchip_drm_framebuffer_init() and sub function rockchip_fb_alloc() and cleanup the rockchip_drm_fb.h header file. Signed-off-by: Johan Jonker Reviewed-by: John Keeping Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/ebe91504-c5df-99e4-635f-832218584051@gmail.com drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 43 ------------------------------ drivers/gpu/drm/rockchip/rockchip_drm_fb.h | 6 ----- 2 files changed, 49 deletions(-) commit 468e90a872726ecf11b0d116c3d69f799f98e90d Author: Alistair Francis Date: Sat Oct 29 20:06:45 2022 +1000 ARM: imx_v6_v7_defconfig: Enable silergy,sy7636a Enable the silergy,sy7636a and silergy,sy7636a-regulator for the reMarkable2. Signed-off-by: Alistair Francis Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 98572487e5c615ac9edfb105aca9b3f3bd1b4b7c Author: Li Jun Date: Mon Oct 24 10:18:36 2022 +0800 soc: imx: gpcv2: add GENPD_FLAG_ACTIVE_WAKEUP flag for usb of imx8mm/n To keep the power domain on if usb remote wakeup is enabled, add the GENPD_FLAG_ACTIVE_WAKEUP for otg1/2 of imx8mm/n. Signed-off-by: Li Jun Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo drivers/soc/imx/gpcv2.c | 3 +++ 1 file changed, 3 insertions(+) commit 8c701fa6e38c43dba75282e4d919298a5cfc5b05 Author: Corentin Labbe Date: Tue Sep 27 07:55:06 2022 +0000 arm64: dts: rockchip: rk3399: add crypto node The rk3399 has a crypto IP handled by the rk3288 crypto driver so adds a node for it. Tested-by Diederik de Haas Signed-off-by: Corentin Labbe Link: https://lore.kernel.org/r/20220927075511.3147847-29-clabbe@baylibre.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit d1152bc533c941f7e267bf53d344cee510ea2808 Author: Corentin Labbe Date: Tue Sep 27 07:55:05 2022 +0000 arm64: dts: rockchip: add rk3328 crypto node rk3328 has a crypto IP handled by the rk3288 crypto driver so adds a node for it. Signed-off-by: Corentin Labbe Link: https://lore.kernel.org/r/20220927075511.3147847-28-clabbe@baylibre.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 48d74376fb681b15cdb9db598aad2dff596a0d9e Author: Peng Fan Date: Thu Oct 20 18:31:58 2022 +0800 arm64: dts: imx8mp: update ecspi compatible and clk i.MX8MP ECSPI is derived from i.MX6UL, so update compatible Add assigned-clocks settings Signed-off-by: Clark Wang Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mp.dtsi | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 8c8648e3c94e430b5644c3c6a97b71568aec81ad Author: Peng Fan Date: Thu Oct 20 18:31:57 2022 +0800 dt-bindings: spi: fsl-imx-cspi: update i.MX8MP binding i.MX8MP ECSPI is derived from i.MX6UL, so update the binding. Signed-off-by: Peng Fan Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/spi/fsl-imx-cspi.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 04a299ea161f5988e5c56cc7f7e323d326f0ec68 Merge: 7f767e6817f5 b136468a0024 Author: Heiko Stuebner Date: Sat Oct 29 10:07:56 2022 +0200 Merge branch 'v6.2-shared/clockids' into v6.2-armsoc/dts64 commit 3f932b4df94f84a0f5932f29c45732cbe523196c Author: Peng Fan Date: Thu Oct 20 18:17:02 2022 +0800 arm64: dts: imx93: add tpm nodes Add tpm[2,4-6] node Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx93.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 80e566893e81a6005c8463458a349c7ff65bce97 Author: Peng Fan Date: Thu Oct 20 18:17:01 2022 +0800 arm64: dts: imx93: add extra lpspi node Add more lpspi nodes which exist in i.MX93 Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx93.dtsi | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 435bfa00f4d523a67abb445833386e0a177b4a28 Author: Haibo Chen Date: Thu Oct 20 18:17:00 2022 +0800 arm64: dts: imx93: add gpio alises gpio driver need these gpio alises to config the gpio base. Reviewed-by: Jun Li Signed-off-by: Haibo Chen Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx93.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit d8f011d79b802e9f6241cc9ec242f52cfca5b0d2 Author: Peng Fan Date: Thu Oct 20 18:16:59 2022 +0800 arm64: dts: imx93: add MU clock for mailbox Add MU clock for mailbox usage Reviewed-by: Jacky Bai Reviewed-by: Ye Li Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx93.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit bce9f6f75db0a6c353f2008acadd69b423513527 Author: Peng Fan Date: Thu Oct 20 18:16:58 2022 +0800 arm64: dts: imx93: add nxp,no-divider for sysctr There is no internal '/3' divider in i.MX93 sysctr, so need this property. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx93.dtsi | 1 + 1 file changed, 1 insertion(+) commit a9501019f2de706eb43b59d66dcde70a23440cd3 Merge: 637639cbfebb f3ca72b03271 Author: Kalle Valo Date: Sat Oct 29 08:25:50 2022 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v6.2. Major changes: ath11k * support configuring channel dwell time during scan commit 02a97e02c64fb3245b84835cbbed1c3a3222e2f1 Merge: eb288cbde814 edaea001442a Author: Jakub Kicinski Date: Fri Oct 28 22:07:47 2022 -0700 Merge tag 'mlx5-updates-2022-10-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2022-10-24 SW steering updates from Yevgeny Kliteynik: 1) 1st Four patches: small fixes / optimizations for SW steering: - Patch 1: Don't abort destroy flow if failed to destroy table - continue and free everything else. - Patches 2 and 3 deal with fast teardown: + Skip sync during fast teardown, as PCI device is not there any more. + Check device state when polling CQ - otherwise SW steering keeps polling the CQ forever, because nobody is there to flush it. - Patch 4: Removing unneeded function argument. 2) Deal with the hiccups that we get during rules insertion/deletion, which sometimes reach 1/4 of a second. While insertion/deletion rate improvement was not the focus here, it still is a by-product of removing these hiccups. Another by-product is the reduced standard deviation in measuring the duration of rules insertion/deletion bursts. In the testing we add K rules (warm-up phase), and then continuously do insertion/deletion bursts of N rules. During the test execution, the driver measures hiccups (amount and duration) and total time for insertion/deletion of a batch of rules. Here are some numbers, before and after these patches: +--------------------------------------------+-----------------+----------------+ | | Create rules | Delete rules | | +--------+--------+--------+-------+ | | Before | After | Before | After | +--------------------------------------------+--------+--------+--------+-------+ | Max hiccup [msec] | 253 | 42 | 254 | 68 | +--------------------------------------------+--------+--------+--------+-------+ | Avg duration of 10K rules add/remove [msec]| 140.07 | 124.32 | 106.99 | 99.51 | +--------------------------------------------+--------+--------+--------+-------+ | Num of hiccups per 100K rules add/remove | 7.77 | 7.97 | 12.60 | 11.57 | +--------------------------------------------+--------+--------+--------+-------+ | Avg hiccup duration [msec] | 36.92 | 33.25 | 36.15 | 33.74 | +--------------------------------------------+--------+--------+--------+-------+ - Patch 5: Allocate a short array on stack instead of dynamically- it is destroyed at the end of the function. - Patch 6: Rather than cleaning the corresponding chunk's section of ste_arrays on chunk deletion, initialize these areas upon chunk creation. Chunk destruction tend to come in large batches (during pool syncing), so instead of doing huge memory initialization during pool sync, we amortize this by doing small initsializations on chunk creation. - Patch 7: In order to simplifies error flow and allows cleaner addition of new pools, handle creation/destruction of all the domain's memory pools and other memory-related fields in a separate init/uninit functions. - Patch 8: During rehash, write each table row immediately instead of waiting for the whole table to be ready and writing it all - saves allocations of ste_send_info structures and improves performance. - Patch 9: Instead of allocating/freeing send info objects dynamically, manage them in pool. The number of send info objects doesn't depend on number of rules, so after pre-populating the pool with an initial batch of send info objects, the pool is not expected to grow. This way we save alloc/free during writing STEs to ICM, which by itself can sometimes take up to 40msec. - Patch 10: Allocate icm_chunks from their own slab allocator, which lowered the alloc/free "hiccups" frequency. - Patch 11: Similar to patch 9, allocate htbl from its own slab allocator. - Patch 12: Lower sync threshold for ICM hot memory - set the threshold for sync to 1/4 of the pool instead of 1/2 of the pool. Although we will have more syncs, each sync will be shorter and will help with insertion rate stability. Also, notice that the overall number of hiccups wasn't increased due to all the other patches. - Patch 13: Keep track of hot ICM chunks in an array instead of list. After steering sync, we traverse the hot list and finally free all the chunks. It appears that traversing a long list takes unusually long time due to cache misses on many entries, which causes a big "hiccup" during rule insertion. This patch replaces the list with pre-allocated array that stores only the bookkeeping information that is needed to later free the chunks in its buddy allocator. - Patch 14: Remove the unneeded buddy used_list - we don't need to have the list of used chunks, we only need the total amount of used memory. * tag 'mlx5-updates-2022-10-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: DR, Remove the buddy used_list net/mlx5: DR, Keep track of hot ICM chunks in an array instead of list net/mlx5: DR, Lower sync threshold for ICM hot memory net/mlx5: DR, Allocate htbl from its own slab allocator net/mlx5: DR, Allocate icm_chunks from their own slab allocator net/mlx5: DR, Manage STE send info objects in pool net/mlx5: DR, In rehash write the line in the entry immediately net/mlx5: DR, Handle domain memory resources init/uninit separately net/mlx5: DR, Initialize chunk's ste_arrays at chunk creation net/mlx5: DR, For short chains of STEs, avoid allocating ste_arr dynamically net/mlx5: DR, Remove unneeded argument from dr_icm_chunk_destroy net/mlx5: DR, Check device state when polling CQ net/mlx5: DR, Fix the SMFS sync_steering for fast teardown net/mlx5: DR, In destroy flow, free resources even if FW command failed ==================== Link: https://lore.kernel.org/r/20221027145643.6618-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit eb288cbde8145d948d0ce67ab8665523462a82e3 Merge: 58ba426388d9 b7aaff0b010e Author: Jakub Kicinski Date: Fri Oct 28 22:07:04 2022 -0700 Merge branch 'net-ipa-start-adding-ipa-v5-0-functionality' Alex Elder says: ==================== net: ipa: start adding IPA v5.0 functionality The biggest change for IPA v5.0 is that it supports more than 32 endpoints. However there are two other unrelated changes: - The STATS_TETHERING memory region is not required - Filter tables no longer support a "global" filter Beyond this, refactoring some code makes supporting more than 32 endpoints (in an upcoming series) easier. So this series includes a few other changes (not in this order): - The maximum endpoint ID in use is determined during config - Loops over all endpoints only involve those in use - Endpoints IDs and their directions are checked for validity differently to simplify comparison against the maximum ==================== Link: https://lore.kernel.org/r/20221027122632.488694-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit b7aaff0b010ede619bdea22118d4a2f9aa966867 Author: Alex Elder Date: Thu Oct 27 07:26:32 2022 -0500 net: ipa: record and use the number of defined endpoint IDs Define a new field in the IPA structure that records the maximum number of entries that will be used in the IPA endpoint array. Use that value rather than IPA_ENDPOINT_MAX to determine the end condition for two loops that iterate over all endpoints. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa.h | 2 ++ drivers/net/ipa/ipa_endpoint.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) commit 5274c7158b2b6661f43883617ce638200312412b Author: Alex Elder Date: Thu Oct 27 07:26:31 2022 -0500 net: ipa: determine the maximum endpoint ID Each endpoint ID has an entry in the IPA endpoint array. But the size of that array is defined at compile time. Instead, rename ipa_endpoint_data_valid() to be ipa_endpoint_max() and have it return the maximum endpoint ID defined in configuration data. That function will still validate configuration data. Zero is returned on error; it's a valid endpoint ID, but we need more than one, so it can't be the maximum. The next patch makes use of the returned maximum value. Finally, rename the "initialized" mask of endpoints defined by configuration data to be "defined". Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa.h | 6 ++-- drivers/net/ipa/ipa_endpoint.c | 67 +++++++++++++++++++++++------------------- 2 files changed, 39 insertions(+), 34 deletions(-) commit e359ba89a4aae690fb51d19fc68f23f38435ae39 Author: Alex Elder Date: Thu Oct 27 07:26:30 2022 -0500 net: ipa: refactor endpoint loops Change two functions that iterate over all endpoints to use while loops, using "endpoint_id" as the index variables in both spots. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_endpoint.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2b87d721999a7591af7a63c1908084b1d59ba4e5 Author: Alex Elder Date: Thu Oct 27 07:26:29 2022 -0500 net: ipa: more completely check endpoint validity Ensure all defined TX endpoints are in the range [0, CONS_PIPES) and defined RX endpoints are within [PROD_LOWEST, PROD_LOWEST+PROD_PIPES). Modify the way local variables are used to make the checks easier to understand. Check for each endpoint being in valid range in the loop, and drop the logical-AND check of initialized against unavailable IDs. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_endpoint.c | 65 +++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 29 deletions(-) commit bd5524930ba7c9ed914952da48a77f803f0b5011 Author: Alex Elder Date: Thu Oct 27 07:26:28 2022 -0500 net: ipa: no more global filtering starting with IPA v5.0 IPA v5.0 eliminates the global filter table entry. As a result, there is no need to shift the filtered endpoint bitmap when it is written to IPA local memory. Update comments to explain this. Also delete a redundant block of comments above the function. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_table.c | 59 +++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 24 deletions(-) commit 5ba5faa2e271bbb8c6e4c48c814f5277c8c014c6 Author: Alex Elder Date: Thu Oct 27 07:26:27 2022 -0500 net: ipa: change an IPA v5.0 memory requirement Don't require IPA v5.0 to have a STATS_TETHERING memory region. Downstream defines its size to 0, so it apparently is unused. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_mem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5783c68a25199c47291e5dfa430264417072ebd8 Author: Alex Elder Date: Thu Oct 27 07:26:26 2022 -0500 net: ipa: define IPA v5.0 In preparation for adding support for IPA v5.0, define it as an understood version. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski drivers/net/ipa/ipa_version.h | 3 +++ 1 file changed, 3 insertions(+) commit 58ba426388d9fe56aa638f555b01d6e63cada88c Author: Willem de Bruijn Date: Thu Oct 27 17:10:14 2022 -0400 net/packet: add PACKET_FANOUT_FLAG_IGNORE_OUTGOING Extend packet socket option PACKET_IGNORE_OUTGOING to fanout groups. The socket option sets ptype.ignore_outgoing, which makes dev_queue_xmit_nit skip the socket. When the socket joins a fanout group, the option is not reflected in the struct ptype of the group. dev_queue_xmit_nit only tests the fanout ptype, so the flag is ignored once a socket joins a fanout group. Inheriting the option from a socket would change established behavior. Different sockets in the group can set different flags, and can also change them at runtime. Testing in packet_rcv_fanout defeats the purpose of the original patch, which is to avoid skb_clone in dev_queue_xmit_nit (esp. for MSG_ZEROCOPY packets). Instead, introduce a new fanout group flag with the same behavior. Tested with https://github.com/wdebruij/kerneltools/blob/master/tests/test_psock_fanout_ignore_outgoing.c Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20221027211014.3581513-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski include/uapi/linux/if_packet.h | 1 + net/packet/af_packet.c | 1 + 2 files changed, 2 insertions(+) commit 637639cbfebb747406b9a57befc0b347057a3a24 Author: Lukasz Czapnik Date: Thu Oct 27 03:42:39 2022 -0700 ice: Add additional CSR registers to ETHTOOL_GREGS In the event of a Tx hang it can be useful to read a variety of hardware registers to capture some state about why the transmit queue got stuck. Extend the ETHTOOL_GREGS dump provided by the ice driver with several CSR registers that provide such relevant information regarding the hardware Tx state. This enables capturing relevant data to enable debugging such a Tx hang. Signed-off-by: Lukasz Czapnik Signed-off-by: Mateusz Palczewski Tested-by: Gurucharan (A Contingent worker at Intel) Link: https://lore.kernel.org/r/20221027104239.1691549-1-jacob.e.keller@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_ethtool.c | 169 +++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) commit 006436316f4c77771a93bd672fea33c6c040c5d2 Merge: e38559206612 d83845d224a0 Author: Jakub Kicinski Date: Fri Oct 28 21:56:22 2022 -0700 Merge branch 'clean-up-sfp-register-definitions' Russell King says: ==================== Clean up SFP register definitions This two-part patch series cleans up the SFP register definitions by 1. converting them from hex to decimal, as all the definitions in the documents use decimal, this makes it easier to cross-reference. 2. moving the bit definitions for each register along side their register address definition ==================== Link: https://lore.kernel.org/r/Y1qFvaDlLVM1fHdG@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit d83845d224a059165902ecd0e1203015c5713a78 Author: Russell King (Oracle) Date: Thu Oct 27 14:21:21 2022 +0100 net: sfp: move field definitions along side register index Just as we do for the A2h enum, arrange the A0h enum to have the field definitions next to their corresponding register index. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski include/linux/sfp.h | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 17dd361119e5bc4cfb85aed660674a846b613817 Author: Russell King (Oracle) Date: Thu Oct 27 14:21:16 2022 +0100 net: sfp: convert register indexes from hex to decimal The register indexes in the standards are in decimal rather than hex, so lets specify them in decimal in the header file so we can easily cross-reference without converting between hex and decimal. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski include/linux/sfp.h | 180 ++++++++++++++++++++++++++-------------------------- 1 file changed, 90 insertions(+), 90 deletions(-) commit e3855920661277fd56ba160d3ff28178c4e4407a Merge: 23f232592d35 81b0f12a2a8a Author: Jakub Kicinski Date: Fri Oct 28 21:48:39 2022 -0700 Merge branch 'net-mtk_eth_soc-improve-pcs-implementation' Russell King says: ==================== net: mtk_eth_soc: improve PCS implementation As a result of invesigations from Frank Wunderlich, we know a lot more about the Mediatek "SGMII" PCS block, and can implement the PCS support correctly. This series achieves that, and Frank has tested the final result and reports that it works for him. The series could do with further testing by others, but I suspect that is unlikely to happen until it is merged based on past performances with this driver. Briefly, the patches in order: 1. Add a new helper to get the link timer duration in nanoseconds 2. Add definitions for the newly discovered registers and updates to bit definitions, including bitmasks for the BMCR, BMSR and two advertisement registers. 3. Remove unnecessary/unused error handling (functions always returning zero.) 4. Adding the missing pcs_get_state() implementation. 5. Converting the code to use regmap_update_bits() rather than open-coding read-modify-write sequences. 6. Adding out-of-band speed and duplex forcing for all non-inband modes not just the 802.3z link modes the code currently does. 7. Moving the release of the PHY power down to the main pcs_config() function. 8. Moving the interface speed selection to the main pcs_config() function. 9. Adding advertisement programming. 10. Adding correct link timer programming using the new helper in the first patch. 11. Adding support for 802.3z negotiation. There is one remaining issue - when configuring the PCS for in-band, for some reason the AN restart bit is always set. This should not be necessary, but requires further investigation with the hardware to find out whether it is really necessary. I suspect this was a work around for a previous poor implementation. ==================== Link: https://lore.kernel.org/r/Y1qDMw+DJLAJHT40@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 81b0f12a2a8a1699a7d49c3995e5f71e4ec018e6 Author: Russell King (Oracle) Date: Thu Oct 27 14:11:28 2022 +0100 net: mtk_eth_soc: add support for in-band 802.3z negotiation As a result of help from Frank Wunderlich to investigate and test, we now know how to program this PCS for in-band 802.3z negotiation. Add support for this by moving the contents of the two functions into the common mtk_pcs_config() function and adding the register settings for 802.3z negotiation. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_sgmii.c | 77 +++++++++++++++++-------------- 1 file changed, 42 insertions(+), 35 deletions(-) commit 3027d89f87707e7f3e5b683e0d37a32afb5bde96 Author: Russell King (Oracle) Date: Thu Oct 27 14:11:23 2022 +0100 net: mtk_eth_soc: move and correct link timer programming Program the link timer appropriately for the interface mode being used, using the newly introduced phylink helper that provides the nanosecond link timer interval. The intervals are 1.6ms for SGMII based protocols and 10ms for 802.3z based protocols. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_sgmii.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit c125c66ea71b9377ae2478c4f1b87b180cc5c6ef Author: Russell King (Oracle) Date: Thu Oct 27 14:11:18 2022 +0100 net: mtk_eth_soc: add advertisement programming Program the advertisement into the mtk PCS block. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_sgmii.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit f752c0df13dfeb721c11d3debb79f08cf437344f Author: Russell King (Oracle) Date: Thu Oct 27 14:11:13 2022 +0100 net: mtk_eth_soc: move interface speed selection Move the selection of the underlying interface speed to the pcs_config function, so we always program the interface speed. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_sgmii.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 6f38fffe2179dd29612aea2c67c46ed6682b4e46 Author: Russell King (Oracle) Date: Thu Oct 27 14:11:08 2022 +0100 net: mtk_eth_soc: move PHY power up The PHY power up is common to both configuration paths, so move it into the parent function. We need to do this for all serdes modes. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_sgmii.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 12198c3a410fe69843e335c1bbf6d4c2a4d48e4e Author: Russell King (Oracle) Date: Thu Oct 27 14:11:03 2022 +0100 net: mtk_eth_soc: add out of band forcing of speed and duplex in pcs_link_up Add support for forcing the link speed and duplex setting in the pcs_link_up() method for out of band modes, which will be useful when we finish converting the pcs_config() method. Until then, we still have to force duplex for 802.3z modes to work correctly. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_sgmii.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 0d2351dc2768061689abd4de1529fa206bbd574e Author: Russell King (Oracle) Date: Thu Oct 27 14:10:58 2022 +0100 net: mtk_eth_soc: convert mtk_sgmii to use regmap_update_bits() mtk_sgmii does a lot of read-modify-write operations, for which there is a specific regmap function. Use this function instead of open-coding the operations. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_sgmii.c | 61 +++++++++++++------------------ 1 file changed, 26 insertions(+), 35 deletions(-) commit c000dca098002da193b98099df051c9ead0cacb4 Author: Russell King (Oracle) Date: Thu Oct 27 14:10:52 2022 +0100 net: mtk_eth_soc: add pcs_get_state() implementation Add a pcs_get_state() implementation which uses the advertisements to compute the resulting link modes, and BMSR contents to determine negotiation and link status. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_sgmii.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 5cf7797526ee81bea0f627bccaa3d887f48f53e0 Author: Russell King (Oracle) Date: Thu Oct 27 14:10:47 2022 +0100 net: mtk_eth_soc: eliminate unnecessary error handling The functions called by the pcs_config() method always return zero, so there is no point trying to handle an error from these functions. Make these functions void, eliminate the "err" variable and simply return zero from the pcs_config() function itself. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_sgmii.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit b6a709cb51f7bdc55c01cec886098a9753ce8c28 Author: Russell King (Oracle) Date: Thu Oct 27 14:10:42 2022 +0100 net: mtk_eth_soc: add definitions for PCS As a result of help from Frank Wunderlich to investigate and test, we know a bit more about the PCS on the Mediatek platforms. Update the definitions from this investigation. This PCS appears similar, but not identical to the Lynx PCS. Although not included in this patch, but for future reference, the PHY ID registers at offset 4 read as 0x4d544950 'MTIP'. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/mtk_eth_soc.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 9c5a170677c3c8facc83e931a57f4c99c0511ae0 Author: Russell King (Oracle) Date: Thu Oct 27 14:10:37 2022 +0100 net: phylink: add phylink_get_link_timer_ns() helper Add a helper to convert the PHY interface mode to the required link timer setting as stated by the appropriate standard. Inappropriate interface modes return an error. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski include/linux/phylink.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 9912c251fd57912cda1b933fa661f3373f90466e Author: Andreas Kemnade Date: Wed Oct 19 08:51:59 2022 +0200 ARM: dts: imx6sl-tolino-shine2hd: Add backlight boost Vendor system has a separate checkbox for increasing brightness of the backlight combined with a big warning that power consumption will greatly increase. With that checkbox enabled there is a greater range in which backlight brightness can be adjusted Add a switch to achieve the same, since the backlight is actually LED, this seems to be the most appopiate place to add it. Nothing fits perfectly. Signed-off-by: Andreas Kemnade Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 6a8daebd173c934f985ab792c878d629f5b6d2e2 Author: Andreas Kemnade Date: Wed Oct 19 08:51:58 2022 +0200 ARM: dts: imx6sl-tolino-shine2hd: Add backlight Add backlight for Tolino Shine2 HD. It uses the PWM of the embedded controller. Signed-off-by: Andreas Kemnade Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 1d96c542b29129abbee819f355a1facbee07626e Author: Manivannan Sadhasivam Date: Fri Oct 28 23:09:32 2022 +0530 MAINTAINERS: Remove Hemant from MHI bus Hemant moved out of Qualcomm and expressed his wish to not continue doing any reviews for MHI patches. So let's remove him from MAINTAINERS file. Reviewed-by: Jeffrey Hugo Signed-off-by: Manivannan Sadhasivam MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 23f232592d35bdf8dc92c4bc92ea0a2df1d3ce9c Merge: 196dd92a00ff d120d1a63b2c Author: Jakub Kicinski Date: Fri Oct 28 20:13:57 2022 -0700 Merge branch 'net-remove-the-obsolte-u64_stats_fetch_-_irq' Sebastian Andrzej Siewior says: ==================== net: Remove the obsolte u64_stats_fetch_*_irq() This is the removal of u64_stats_fetch_*_irq() users in networking. The prerequisites are part of v6.1-rc1. The spi and bpf bits are not part of the series and have been routed directly. ==================== Link: https://lore.kernel.org/r/20221026132215.696950-1-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit d120d1a63b2c484d6175873d8ee736a633f74b70 Author: Thomas Gleixner Date: Wed Oct 26 15:22:15 2022 +0200 net: Remove the obsolte u64_stats_fetch_*_irq() users (net). Now that the 32bit UP oddity is gone and 32bit uses always a sequence count, there is no need for the fetch_irq() variants anymore. Convert to the regular interface. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Acked-by: Peter Zijlstra (Intel) Signed-off-by: Jakub Kicinski net/8021q/vlan_dev.c | 4 ++-- net/bridge/br_multicast.c | 4 ++-- net/bridge/br_vlan.c | 4 ++-- net/core/dev.c | 4 ++-- net/core/devlink.c | 4 ++-- net/core/drop_monitor.c | 8 ++++---- net/core/gen_stats.c | 16 ++++++++-------- net/dsa/slave.c | 4 ++-- net/ipv4/af_inet.c | 4 ++-- net/ipv6/seg6_local.c | 4 ++-- net/mac80211/sta_info.c | 8 ++++---- net/mpls/af_mpls.c | 4 ++-- net/netfilter/ipvs/ip_vs_ctl.c | 4 ++-- net/netfilter/nf_tables_api.c | 4 ++-- net/openvswitch/datapath.c | 4 ++-- net/openvswitch/flow_table.c | 9 ++++----- 16 files changed, 44 insertions(+), 45 deletions(-) commit 068c38ad88ccb09e5e966d4db5cedab0e02b3b95 Author: Thomas Gleixner Date: Wed Oct 26 15:22:14 2022 +0200 net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers). Now that the 32bit UP oddity is gone and 32bit uses always a sequence count, there is no need for the fetch_irq() variants anymore. Convert to the regular interface. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Acked-by: Peter Zijlstra (Intel) Signed-off-by: Jakub Kicinski drivers/net/ethernet/alacritech/slic.h | 12 ++++---- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 4 +-- drivers/net/ethernet/amazon/ena/ena_netdev.c | 12 ++++---- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 8 +++--- drivers/net/ethernet/asix/ax88796c_main.c | 4 +-- drivers/net/ethernet/broadcom/b44.c | 8 +++--- drivers/net/ethernet/broadcom/bcmsysport.c | 12 ++++---- drivers/net/ethernet/cortina/gemini.c | 24 ++++++++-------- drivers/net/ethernet/emulex/benet/be_ethtool.c | 12 ++++---- drivers/net/ethernet/emulex/benet/be_main.c | 16 +++++------ drivers/net/ethernet/fungible/funeth/funeth_txrx.h | 4 +-- drivers/net/ethernet/google/gve/gve_ethtool.c | 16 +++++------ drivers/net/ethernet/google/gve/gve_main.c | 12 ++++---- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 +-- drivers/net/ethernet/huawei/hinic/hinic_rx.c | 4 +-- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 4 +-- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 8 +++--- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 8 +++--- drivers/net/ethernet/intel/i40e/i40e_main.c | 20 +++++++------- drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 8 +++--- drivers/net/ethernet/intel/ice/ice_main.c | 4 +-- drivers/net/ethernet/intel/igb/igb_ethtool.c | 12 ++++---- drivers/net/ethernet/intel/igb/igb_main.c | 8 +++--- drivers/net/ethernet/intel/igc/igc_ethtool.c | 12 ++++---- drivers/net/ethernet/intel/igc/igc_main.c | 8 +++--- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 8 +++--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 +++--- drivers/net/ethernet/intel/ixgbevf/ethtool.c | 12 ++++---- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 8 +++--- drivers/net/ethernet/marvell/mvneta.c | 8 +++--- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 8 +++--- drivers/net/ethernet/marvell/sky2.c | 8 +++--- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 8 +++--- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 +-- drivers/net/ethernet/microsoft/mana/mana_en.c | 8 +++--- drivers/net/ethernet/microsoft/mana/mana_ethtool.c | 8 +++--- .../net/ethernet/netronome/nfp/nfp_net_common.c | 8 +++--- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 8 +++--- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 4 +-- drivers/net/ethernet/nvidia/forcedeth.c | 8 +++--- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 4 +-- drivers/net/ethernet/realtek/8139too.c | 8 +++--- drivers/net/ethernet/socionext/sni_ave.c | 8 +++--- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +-- drivers/net/ethernet/ti/netcp_core.c | 8 +++--- drivers/net/ethernet/via/via-rhine.c | 8 +++--- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 8 +++--- drivers/net/hyperv/netvsc_drv.c | 32 +++++++++++----------- drivers/net/ifb.c | 12 ++++---- drivers/net/ipvlan/ipvlan_main.c | 4 +-- drivers/net/loopback.c | 4 +-- drivers/net/macsec.c | 12 ++++---- drivers/net/macvlan.c | 4 +-- drivers/net/mhi_net.c | 8 +++--- drivers/net/netdevsim/netdev.c | 4 +-- drivers/net/team/team.c | 4 +-- drivers/net/team/team_mode_loadbalance.c | 4 +-- drivers/net/veth.c | 12 ++++---- drivers/net/virtio_net.c | 16 +++++------ drivers/net/vrf.c | 4 +-- drivers/net/vxlan/vxlan_vnifilter.c | 4 +-- drivers/net/wwan/mhi_wwan_mbim.c | 8 +++--- drivers/net/xen-netfront.c | 8 +++--- 63 files changed, 274 insertions(+), 274 deletions(-) commit 4cce83203aecea5e15e2534be51b746ed41a9a46 Author: Shenwei Wang Date: Tue Oct 11 14:47:15 2022 -0500 arm64: dts: freescale: imx8dxl-evk: enable mii_select node The mii_select node is used to determine the fec1's interface type. Using "enable-active-high" property to configure the interface type as "RMII". Deleting the property as "RGMII". Signed-off-by: Shenwei Wang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b202ac0c1308013b6d7c4ae43a350d0c8531c2c7 Author: Shenwei Wang Date: Tue Oct 11 14:47:14 2022 -0500 arm64: dts: freescale: imx8dxl: add scu_gpio node add scu_gpio node in system-controller. Signed-off-by: Shenwei Wang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8dxl.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 196dd92a00ff0e8186d89b2d3d0f848ecc701cd9 Merge: f8f797f35a9a 80e5acb6dd72 Author: Jakub Kicinski Date: Fri Oct 28 18:31:39 2022 -0700 Kalle Valo says: ==================== pull-request: wireless-next-2022-10-28 First set of patches v6.2. mac80211 refactoring continues for Wi-Fi 7. All mac80211 driver are now converted to use internal TX queues, this might cause some regressions so we wanted to do this early in the cycle. Note: wireless tree was merged[1] to wireless-next to avoid some conflicts with mac80211 patches between the trees. Unfortunately there are still two smaller conflicts in net/mac80211/util.c which Stephen also reported[2]. In the first conflict initialise scratch_len to "params->scratch_len ?: 3 * params->len" (note number 3, not 2!) and in the second conflict take the version which uses elems->scratch_pos. [1] https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git/commit/?id=dfd2d876b3fda1790bc0239ba4c6967e25d16e91 [2] https://lore.kernel.org/all/20221020032340.5cf101c0@canb.auug.org.au/ mac80211 - preparation for Wi-Fi 7 Multi-Link Operation (MLO) continues - add API to show the link STAs in debugfs - all mac80211 drivers are now using mac80211 internal TX queues (iTXQs) rtw89 - support 8852BE rtl8xxxu - support RTL8188FU brmfmac - support two station interfaces concurrently bcma - support SPROM rev 11 ==================== Link: https://lore.kernel.org/r/20221028132943.304ECC433B5@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 822b29e3b2c37fc74cc38e928bb7b87faa2528a5 Author: Guido Günther Date: Sun Oct 9 14:26:55 2022 +0200 arm64: dts: librem5-devkit: Use function and color rather than label Use predefined colors and function rather than making up a random label. Signed-off-by: Guido Günther Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 29ecef8eceecec09f01e58740235009de436ea53 Author: Guido Günther Date: Sun Oct 9 14:26:54 2022 +0200 arm64: dts: librem5-devkit: Make LED use PWM We can use PWM instead of just GPIO allowing us to control brightness. Signed-off-by: Guido Günther Signed-off-by: Shawn Guo .../arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit ca5a60d3bedb31daa0e07c0ff96422b784df7730 Author: Philippe Schenker Date: Wed Oct 5 15:39:29 2022 +0200 ARM: dts: colibri-imx7: fix confusing naming fix the naming of node-name vs label-name to the correct one, that is the label was always correct. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb30720aba26d0857c4d52350300b5daf917934c Author: Philippe Schenker Date: Wed Oct 5 15:39:28 2022 +0200 ARM: dts: colibri-imx6ull: add -hog to gpio hogs Since it seems to be a naming-convention to add -hog for gpio hogs do this. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ull-colibri-iris-v2.dts | 8 ++++---- arch/arm/boot/dts/imx6ull-colibri-iris.dtsi | 4 ++-- arch/arm/boot/dts/imx6ull-colibri-wifi-iris-v2.dts | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) commit e0dc942a2e8e49056e028409761b91b4a900a42c Author: Philippe Schenker Date: Wed Oct 5 15:39:27 2022 +0200 ARM: dts: colibri-imx6ull: enable default peripherals For NAND modules Toradex does not provide any device-tree overlays. But we always had a default display output enabled on NAND modules as well as touchscreens that are placed on displays which can easily be plugged into those carrier boards. Do reenable these displays and touchscreen output on all device-trees that are used on NAND modules. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ull-colibri-aster.dts | 40 ++++++++++++++++++++++ arch/arm/boot/dts/imx6ull-colibri-eval-v3.dts | 24 +++++++++++++ arch/arm/boot/dts/imx6ull-colibri-iris-v2.dts | 40 ++++++++++++++++++++++ arch/arm/boot/dts/imx6ull-colibri-iris.dts | 22 +++++++++++- arch/arm/boot/dts/imx6ull-colibri-wifi-aster.dts | 40 ++++++++++++++++++++++ arch/arm/boot/dts/imx6ull-colibri-wifi-eval-v3.dts | 24 +++++++++++++ arch/arm/boot/dts/imx6ull-colibri-wifi-iris-v2.dts | 24 +++++++++++++ arch/arm/boot/dts/imx6ull-colibri-wifi-iris.dts | 20 +++++++++++ 8 files changed, 233 insertions(+), 1 deletion(-) commit 53e25f93125127c3fcb231b4374538ba1eb899b4 Author: Philippe Schenker Date: Wed Oct 5 15:39:26 2022 +0200 ARM: dts: colibri-imx6ull: keep peripherals disabled Toradex does provide device-tree overlays to enable certain evaluation hardware. Keep the buses disabled by default to be enabled again with overlays. For customers including this device-tree this has also the advantage that the hardware we want by default running does not automatically enable signals on their end. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ull-colibri.dtsi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 876e9047a91839ee5be0ba099036d19883e52ca2 Author: Matt Roper Date: Fri Oct 28 15:40:22 2022 -0700 drm/i915/mtl: Add missing steering table terminators The termination entries were missing for a couple of the recently-added MTL steering tables. Fixes: f32898c94a10 ("drm/i915/xelpg: Add multicast steering") Fixes: a7ec65fc7e83 ("drm/i915/xelpmp: Add multicast steering for media GT") Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221028224022.964997-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 2 ++ 1 file changed, 2 insertions(+) commit be79afc740b5a1b2048cd67580cdb9d76d7e6cc2 Author: Liu Shixin Date: Wed Oct 12 20:00:38 2022 +0800 riscv: Enable HAVE_ARCH_HUGE_VMALLOC for 64BIT After we support HAVE_ARCH_HUGE_VMAP, we can now enable HAVE_ARCH_HUGE_VMALLOC too. This feature has been used in kvmalloc and alloc_large_system_hash for now. This feature can be disabled by kernel parameters "nohugevmalloc". Signed-off-by: Liu Shixin Reviewed-by: Björn Töpel Tested-by: Björn Töpel Link: https://lore.kernel.org/r/20221012120038.1034354-3-liushixin2@huawei.com [Palmer: minor formatting] Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 310f541a027b1d5dc68f44f176cde618e6ee9691 Author: Liu Shixin Date: Wed Oct 12 20:00:37 2022 +0800 riscv: Enable HAVE_ARCH_HUGE_VMAP for 64BIT This sets the HAVE_ARCH_HUGE_VMAP option, and defines the required page table functions. With this feature, ioremap area will be mapped with huge page granularity according to its actual size. This feature can be disabled by kernel parameter "nohugeiomap". Signed-off-by: Liu Shixin Reviewed-by: Björn Töpel Tested-by: Björn Töpel Link: https://lore.kernel.org/r/20221012120038.1034354-2-liushixin2@huawei.com [Palmer: minor formatting] Signed-off-by: Palmer Dabbelt .../features/vm/huge-vmap/arch-support.txt | 2 +- arch/riscv/Kconfig | 1 + arch/riscv/include/asm/vmalloc.h | 18 +++++ arch/riscv/mm/Makefile | 1 + arch/riscv/mm/pgtable.c | 83 ++++++++++++++++++++++ 5 files changed, 104 insertions(+), 1 deletion(-) commit 14a3d159abf8f6013d40723856283705253e7e9a Author: Marek Vasut Date: Fri Oct 14 19:24:27 2022 +0200 power: supply: bq25890: Add Vsys regulator The chip is capable of reporting Vsys voltage supplied to the system. Add regulator which represents the Vsys supply. This can be used e.g. as a supply for system PMIC input. Reviewed-by: Hans de Goede Signed-off-by: Marek Vasut Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 85052e90007bd9e11123bd691a8131089178a4f8 Author: Marek Vasut Date: Fri Oct 14 19:24:26 2022 +0200 power: supply: bq25890: Add get_voltage support to Vbus regulator The chip is capable of reporting Vbus voltage, add .get_voltage implementation to Vbus regulator to report current Vbus voltage. This requires for the Vbus regulator to be registered always instead of the current state where the regulator is registered only in case USB PHY is not found. Do not provide Vbus regulator enable/disable ops in case USB PHY is present, as they would race with USB PHY notifier which is also used to toggle OTG boost mode. Signed-off-by: Marek Vasut Reviewed-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 5f5c10ecaf3fdeba9b2b0af5301977420c2c4df0 Author: Marek Vasut Date: Fri Oct 14 19:24:25 2022 +0200 power: supply: bq25890: Factor out regulator registration code Pull the regulator registration code into separate function, so it can be extended to register more regulators later. Currently this is only moving ifdeffery into one place and other preparatory changes. The dev_err_probe() output string is changed to explicitly list vbus regulator failure, so that once more regulators are registered, it would be clear which one failed. Reviewed-by: Hans de Goede Signed-off-by: Marek Vasut Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 51 +++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 16 deletions(-) commit b63e60ebb3fb071a96667307b1e129ccac76ce6b Author: Marek Vasut Date: Fri Oct 14 19:24:24 2022 +0200 power: supply: bq25890: Add support for setting user charge current and voltage limit Let user set battery charge current and voltage limit via sysfs. This is useful in case the user space needs to reduce charge current to keep the system within thermal limits. The maximum charge current and voltage are still limited to "ti,charge-current" and "ti,battery-regulation-voltage" values to avoid damaging the hardware in case too high values are set by user space. Reviewed-by: Hans de Goede Signed-off-by: Marek Vasut Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 7c85237519738ca4808b4fa79c2d448770f8d33f Author: Marek Vasut Date: Fri Oct 14 19:24:23 2022 +0200 power: supply: bq25890: Clean up POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE Clean up misuse of POWER_SUPPLY_PROP_VOLTAGE, POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX and POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE and document what exactly each value means. The POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE content is newly read back from hardware, while POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX is reported as the maximum value set in DT. The POWER_SUPPLY_PROP_VOLTAGE is newly used to report immediate value of battery voltage V_BAT, which is what this property was intended to report and which has been thus far misused to report the charger chip output voltage V_SYS. The V_SYS is no longer reported as there is currently no suitable property to report V_SYS. V_SYS reporting will be reinstated in subsequent patch. Signed-off-by: Marek Vasut Reviewed-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 72 +++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 27 deletions(-) commit 8327a8abd4d7c842d81108b8361c199d0631d173 Author: Marek Vasut Date: Fri Oct 14 19:24:22 2022 +0200 power: supply: bq25890: Clean up POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT Clean up misuse of POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT and POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX and document what exactly each value means. The POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT content is newly read back from hardware, while POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX is reported as the maximum value set in DT. Reviewed-by: Hans de Goede Signed-off-by: Marek Vasut Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 57 ++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 16 deletions(-) commit ef1ca2102e9c546a507ed43994f5dd022f7a80d3 Author: Marek Vasut Date: Fri Oct 14 19:24:21 2022 +0200 power: supply: bq25890: Document POWER_SUPPLY_PROP_CURRENT_NOW Document that POWER_SUPPLY_PROP_CURRENT_NOW really does refer to ADC-sampled immediate battery charge current I_BAT , since the meaning is not clear with all the currents which might be measured by charger chips. Reviewed-by: Hans de Goede Signed-off-by: Marek Vasut Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 96fce387d58fa8eae6e8d9b1ecdfbc18292d7a68 Author: Kees Cook Date: Wed Sep 28 14:17:05 2022 -0700 kunit/memcpy: Add dynamic size and window tests The "side effects" memmove() test accidentally found[1] a corner case in the recent refactoring of the i386 assembly memmove(), but missed another corner case. Instead of hoping to get lucky next time, implement much more complete tests of memcpy() and memmove() -- especially the moving window overlap for memmove() -- which catches all the issues encountered and should catch anything new. [1] https://lore.kernel.org/lkml/CAKwvOdkaKTa2aiA90VzFrChNQM6O_ro+b7VWs=op70jx-DKaXA@mail.gmail.com Cc: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Kees Cook MAINTAINERS | 1 + lib/memcpy_kunit.c | 205 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 206 insertions(+) commit 03699f271de1f4df6369cd379506539cd7d590d3 Author: Kees Cook Date: Fri Sep 2 14:33:44 2022 -0700 string: Rewrite and add more kern-doc for the str*() functions While there were varying degrees of kern-doc for various str*()-family functions, many needed updating and clarification, or to just be entirely written. Update (and relocate) existing kern-doc and add missing functions, sadly shaking my head at how many times I have written "Do not use this function". Include the results in the core kernel API doc. Cc: Bagas Sanjaya Cc: Andy Shevchenko Cc: Rasmus Villemoes Cc: Andrew Morton Cc: linux-hardening@vger.kernel.org Tested-by: Akira Yokosawa Link: https://lore.kernel.org/lkml/9b0cf584-01b3-3013-b800-1ef59fe82476@gmail.com Signed-off-by: Kees Cook Documentation/core-api/kernel-api.rst | 3 + include/linux/fortify-string.h | 133 +++++++++++++++++++++++++++++++--- lib/string.c | 82 --------------------- scripts/kernel-doc | 6 +- 4 files changed, 131 insertions(+), 93 deletions(-) commit e39e739ab57399f46167d453bbdb8ef8d57c6488 Author: Florian Lehner Date: Fri Oct 28 20:34:05 2022 +0200 bpf: check max_entries before allocating memory For maps of type BPF_MAP_TYPE_CPUMAP memory is allocated first before checking the max_entries argument. If then max_entries is greater than NR_CPUS additional work needs to be done to free allocated memory before an error is returned. This changes moves the check on max_entries before the allocation happens. Signed-off-by: Florian Lehner Link: https://lore.kernel.org/r/20221028183405.59554-1-dev@der-flo.net Signed-off-by: Martin KaFai Lau kernel/bpf/cpumap.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 4a95be7ed7669311350d041ca6cd37bf96f92d8c Author: Willy Tarreau Date: Wed Oct 26 07:45:08 2022 +0200 selftests/nolibc: Always rebuild the sysroot when running a test Paul and I got trapped a few times by not seeing the effects of applying a patch to the nolibc source code until a "make clean" was issued in the nolibc directory. It's particularly annoying when trying to confirm that a proposed patch really solves a problem (or that reverting it reintroduces the problem). The reason for the sysroot not being rebuilt was that it can be quite slow. But in fact it's only slow after a "make clean" issued at the kernel's topdir, because it's the main "make headers" that can take a tens of seconds; as long as "usr/include" still contains headers, the "headers_install" phase is only a quick "rsync", and rebuilding the whole nolibc sysroot takes a bit less than one second, which is perfectly acceptable for a test, even more once the time lost caused by misleading results is factored in. This patch marks the sysroot target as phony and starts by clearing the previous sysroot for the current architecture before reinstalling it. Thanks to this, applying a patch to nolibc makes the effect immediately visible to "make nolibc-test": $ time make -j -C tools/testing/selftests/nolibc nolibc-test make: Entering directory '/k/tools/testing/selftests/nolibc' MKDIR sysroot/x86/include make[1]: Entering directory '/k/tools/include/nolibc' make[2]: Entering directory '/k' make[2]: Leaving directory '/k' make[2]: Entering directory '/k' INSTALL /k/tools/testing/selftests/nolibc/sysroot/sysroot/include make[2]: Leaving directory '/k' make[1]: Leaving directory '/k/tools/include/nolibc' CC nolibc-test make: Leaving directory '/k/tools/testing/selftests/nolibc' real 0m0.869s user 0m0.716s sys 0m0.149s Cc: "Paul E. McKenney" Link: https://lore.kernel.org/all/20221021155645.GK5600@paulmck-ThinkPad-P17-Gen-1/ Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/testing/selftests/nolibc/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit c80b5a0a22b673d5a02e64626a8dfc2f738be7d9 Author: Willy Tarreau Date: Fri Oct 21 08:03:40 2022 +0200 selftests/nolibc: Add 7 tests for memcmp() This adds 7 combinations of input values for memcmp() using signed and unsigned bytes, which will trigger on the original code before Rasmus' fix. This is mostly aimed at helping backporters verify their work, and showing how tests for corner cases can be added to the selftests suite. Before the fix it reports: 12 memcmp_20_20 = 0 [OK] 13 memcmp_20_60 = -64 [OK] 14 memcmp_60_20 = 64 [OK] 15 memcmp_20_e0 = 64 [FAIL] 16 memcmp_e0_20 = -64 [FAIL] 17 memcmp_80_e0 = -96 [OK] 18 memcmp_e0_80 = 96 [OK] And after: 12 memcmp_20_20 = 0 [OK] 13 memcmp_20_60 = -64 [OK] 14 memcmp_60_20 = 64 [OK] 15 memcmp_20_e0 = -192 [OK] 16 memcmp_e0_20 = 192 [OK] 17 memcmp_80_e0 = -96 [OK] 18 memcmp_e0_80 = 96 [OK] Cc: Rasmus Villemoes Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney tools/testing/selftests/nolibc/nolibc-test.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f110f2af3a9b848c3b287137d9535074742bb8c3 Author: Iskren Chernev Date: Mon Sep 19 21:06:18 2022 +0300 arm64: dts: qcom: sm4250: Add support for oneplus-billie2 Add initial support for OnePlus Nord N100, based on SM4250. Currently working: - boots - usb - built-in flash storage (UFS) - SD card reader Signed-off-by: Iskren Chernev Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220919180618.1840194-9-iskren.chernev@gmail.com arch/arm64/boot/dts/qcom/Makefile | 1 + .../arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts | 241 +++++++++++++++++++++ 2 files changed, 242 insertions(+) commit 70f18c6313622380f7b9452f31a93aec3e525f64 Author: Iskren Chernev Date: Mon Sep 19 21:06:17 2022 +0300 arm64: dts: qcom: sm4250: Add soc dtsi The SM4250 is a downclocked version of the SM6115. Signed-off-by: Iskren Chernev Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220919180618.1840194-8-iskren.chernev@gmail.com arch/arm64/boot/dts/qcom/sm4250.dtsi | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 97e563bf5ba187378e07145c08ae12508cba7361 Author: Iskren Chernev Date: Mon Sep 19 21:06:16 2022 +0300 arm64: dts: qcom: sm6115: Add basic soc dtsi Add support for Qualcomm SM6115 SoC. This includes: - GCC - Pinctrl - RPM (CC+PD) - USB - MMC - UFS Signed-off-by: Iskren Chernev Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220919180618.1840194-7-iskren.chernev@gmail.com arch/arm64/boot/dts/qcom/sm6115.dtsi | 854 +++++++++++++++++++++++++++++++++++ 1 file changed, 854 insertions(+) commit f1f9a6a0b9d0dd54ce7c58dc4067273efb540480 Author: Iskren Chernev Date: Mon Sep 19 21:06:13 2022 +0300 dt-bindings: arm: qcom: Add compatible for oneplus,billie2 phone oneplus,billie2 (OnePlus Nord N100) is based on QualComm Snapdragon SM4250 SoC. Add support for the same in dt-bindings. Signed-off-by: Iskren Chernev Reviewed-by: Krzysztof Kozlowski Reviewed-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220919180618.1840194-4-iskren.chernev@gmail.com Documentation/devicetree/bindings/arm/qcom.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 3558927fc2b2fd0af309648f4071035e08719866 Author: Cleo John Date: Mon Oct 10 20:28:48 2022 +0200 riscv: fix styling in ucontext header Change the two comments in ucontext.h by getting them up to the coding style proposed by torvalds. Signed-off-by: Cleo John Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20221010182848.GA28029@watet-ms7b87 Signed-off-by: Palmer Dabbelt arch/riscv/include/uapi/asm/ucontext.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c4cd760d369604976a6ce97210b909a255985bda Author: Johan Hovold Date: Mon Oct 24 14:58:43 2022 +0200 arm64: dts: qcom: sc8280xp: add TCSR node Add the TCSR node which is needed for PCIe configuration. Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221024125843.25261-1-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 5ffe618764a36c2d259674b854abd574790ea56b Author: Nikita Travkin Date: Thu Oct 20 11:56:08 2022 +0000 arm64: dts: qcom: msm8916-samsung-a2015: Add vibrator Both a2015 devices use motor drivers controlled with PWM signal. A5 additionally has a fixed regulator that powers the driver and is controlled by enable signal. A3 routes that enable signal to the motor driver itself. To simplify the description, add the motor to the common dtsi and assume a regulator is used for both. Signed-off-by: Nikita Travkin [Rename the nodes to be reusable in msm8916-sansung-e2015] Signed-off-by: Lin, Meng-Bo Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221020115255.2026-1-linmengbo0689@protonmail.com .../dts/qcom/msm8916-samsung-a2015-common.dtsi | 52 ++++++++++++++++++++++ .../boot/dts/qcom/msm8916-samsung-a3u-eur.dts | 8 ++++ .../boot/dts/qcom/msm8916-samsung-a5u-eur.dts | 8 ++++ .../dts/qcom/msm8916-samsung-e2015-common.dtsi | 26 +++-------- 4 files changed, 73 insertions(+), 21 deletions(-) commit 6ab428604f724cf217a47b7d3f3353aab815b40e Author: Tejun Heo Date: Fri Oct 28 10:45:44 2022 -1000 cgroup: Implement DEBUG_CGROUP_REF It's really difficult to debug when cgroup or css refs leak. Let's add a debug option to force the refcnt function to not be inlined so that they can be kprobed for debugging. Signed-off-by: Tejun Heo include/linux/cgroup.h | 97 ++++++------------------------------------- include/linux/cgroup_refcnt.h | 90 +++++++++++++++++++++++++++++++++++++++ kernel/cgroup/cgroup.c | 5 +++ lib/Kconfig.debug | 10 +++++ 4 files changed, 117 insertions(+), 85 deletions(-) commit 1b52861f0e04da43013f88dd56464b5719a974e3 Author: Jinyu Tang Date: Sun Oct 9 21:45:03 2022 +0800 riscv: support update_mmu_tlb() Add macro definition to support update_mmu_tlb() for riscv, this function is from commit:7df676974359 ("mm/memory.c:Update local TLB if PTE entry exists"). update_mmu_tlb() is used when a thread notice that other cpu thread has handled the fault and changed the PTE. For MIPS, it's worth to do that,this cpu thread will trap in tlb fault again otherwise. For RISCV, it's also better to flush local tlb than do nothing in update_mmu_tlb(). There are two kinds of page fault that have update_mmu_tlb() inside: 1.page fault which PTE is NOT none, only protection check error, like write protection fault. If updata_mmu_tlb() is empty, after finsh page fault this time and re-execute, cpu will find address but protection checked error in tlb again. So this will cause another page fault. PTE in memory is good now,so update_mmu_cache() in handle_pte_fault() will be executed. If updata_mmu_tlb() is not empty flush local tlb, cpu won't find this address in tlb next time, and get entry in physical memory, so it won't cause another page fault. 2.page fault which PTE is none or swapped. For this case, this cpu thread won't cause another page fault,cpu will have tlb miss when re-execute, and get entry in memory directly. But "set pte in phycial memory and flush local tlb" is pratice in Linux, it's better to flush local tlb if it find entry in phycial memory has changed. Maybe it's same for other ARCH which can't detect PTE changed and update it in local tlb automatically. Signed-off-by: Jinyu Tang Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20221009134503.18783-1-tjytimi@163.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/pgtable.h | 3 +++ 1 file changed, 3 insertions(+) commit cf4484a0e61e60f7c12b7b7f73cf60898f355561 Merge: ad850421cabd 6648a6dcfe40 Author: Mark Brown Date: Fri Oct 28 20:23:31 2022 +0100 ASoC: qdsp6: audioreach: add multi-port, SAL and MFC support Merge series from Srinivas Kandagatla : This patchset adds support to multi-port connections between AudioReach Modules which is required for sophisticated graphs like ECNS or Speaker Protection. Also as part of ECNS testing new module support for SAL and MFC are added. Tested on SM8450 with ECNS. commit c59b6bc4673b80c8b26e1102f80b9fbd5f7b8023 Author: Dmitry Torokhov Date: Mon Oct 24 21:57:19 2022 -0700 Input: stmpe-keypad - add missing of.h include The driver is using of_property_read_u32() and therefore needs to include of.h header. Reported-by: Stephen Rothwell Signed-off-by: Dmitry Torokhov drivers/input/keyboard/stmpe-keypad.c | 1 + 1 file changed, 1 insertion(+) commit 80194a13240b39842d46bf639c7d765ad0cb5648 Author: Dmitry Torokhov Date: Fri Oct 28 09:48:00 2022 -0700 ARM: s3c64xx: include header defining input event codes The board file for Wolfson Cragganmore 6410 uses various KEY_* defines, but does not include the relevant header directly and instead relies on other headers to include it indirectly. With the upcoming cleanup of matrix_keypad.h this indirection is now broken and we should include the relevant header directly. Reported-by: kernel test robot Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/Y1wHwEm15/K87tdq@google.com Signed-off-by: Dmitry Torokhov arch/arm/mach-s3c/mach-crag6410.c | 1 + 1 file changed, 1 insertion(+) commit ad850421cabdc558ebbf68aa62f0d6781e70a879 Merge: 3bcca3787bfc 4bd1adb85a09 Author: Mark Brown Date: Fri Oct 28 19:52:20 2022 +0100 ASoC: SOF: Intel: HDA: refactor codec and multi-link suport Merge series from Pierre-Louis Bossart : Existing HDaudio controllers expose an HDAudio DMA which is used to interface with HDaudio codecs. All other interfaces supported by Intel (SoundWire, SSP, DMIC) rely for data transfers on another GP-DMA managed by the DSP firmware - the HDaudio DMA is only used for memory-to-DSP transfers. New HDaudio extensions will enable the use of this HDaudio DMA for all of SoundWire, SSP, DMIC. These extensions will be backwards-compatible for HDaudio and iDISP codecs, but will require new programming sequences and DAI callbacks for SoundWire, SSP and DMIC. Before we add support for 'extended audio links' and the programming sequences for the DMA, we need to refactor the code. All HDaudio codec support needs to be well identified in a separate file, and likewise all the 'multi-link' handling needs to be better split. This patchset removes a number of 'old' Kconfig dependencies and options, adds helpers with a fallback to remove IS_ENABLED checks in the code and tries to simplify programming sequences when possible. One indirect benefit from this refactoring is that developers can switch with a kernel parameter from HDaudio support to a variant of 'nocodec' support. This proves extremely useful to test on existing Intel RVPs and Up boards, where the same build can be used to check 3 interfaces (HDaudio, SSP, DMIC) by just removing modules, setting the kernel parameter and reloading modules. commit bdd5ca06303238316875f997c339feea07e5e9f6 Author: Rui Li Date: Wed Oct 26 15:07:32 2022 +0800 docs/zh_CN: Add userspace-api/sysfs-platform_profile Chinese translation Translate the following documents into Chinese: - userspace-api/sysfs-platform_profile.rst Signed-off-by: Rui Li Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/20221026070732.72818-1-me@lirui.org Signed-off-by: Jonathan Corbet .../translations/zh_CN/userspace-api/index.rst | 2 +- .../zh_CN/userspace-api/sysfs-platform_profile.rst | 40 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) commit 72b0ec3543f15ff672ebada5d3f81e3065d17e47 Author: Rui Li Date: Sat Oct 22 20:05:57 2022 +0800 docs/zh_CN: Add userspace-api/no_new_privs Chinese translation Translate the following documents into Chinese: - userspace-api/no_new_privs.rst Signed-off-by: Rui Li Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/20221022120557.381115-1-me@lirui.org Signed-off-by: Jonathan Corbet .../translations/zh_CN/userspace-api/index.rst | 2 +- .../zh_CN/userspace-api/no_new_privs.rst | 57 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) commit bb8e1614e576eb22658a5d9e6673120a53d37647 Author: Rui Li Date: Fri Oct 21 13:56:23 2022 +0800 docs/zh_CN: Add staging/xz Chinese translation Translate the following files into Chinese: - Documentation/staging/xz.rst Reviewed-by: Yanteng Si Signed-off-by: Rui Li Link: https://lore.kernel.org/r/281c6e063212aa337cccf549b816eec62e87c090.1666328379.git.me@lirui.org Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/staging/index.rst | 6 +- Documentation/translations/zh_CN/staging/xz.rst | 100 +++++++++++++++++++++ 2 files changed, 105 insertions(+), 1 deletion(-) commit 7cb2a45d124a6ae712d96abaf5b5f8cdf2244e10 Author: Rui Li Date: Fri Oct 21 13:56:22 2022 +0800 docs/zh_CN: Add staging/index Chinese translation Translate the following files into Chinese: - Documentation/staging/index.rst Add it into the menu of zh_CN/index. Also fix one translation in the zh_CN/index file. Reviewed-by: Yanteng Si Signed-off-by: Rui Li Link: https://lore.kernel.org/r/896caff38814b7c383324966c3936e8a0bfb1d2e.1666328379.git.me@lirui.org Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/index.rst | 8 ++++---- Documentation/translations/zh_CN/staging/index.rst | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) commit 4cbf848f07d85170bb78040e50762673ab799693 Author: Binbin Zhou Date: Fri Oct 21 09:58:09 2022 +0800 docs/zh_CN: core-api: Add errseq Chinese translation Translate core-api/errseq.rst into Chinese. Last English version used: commit 14ebc28e07e6 ("errseq: Add to documentation tree"). Signed-off-by: Binbin Zhou Reviewed-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/bd81bd620eb6c64effd2d0d52831f39911fc1659.1666171735.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/core-api/errseq.rst | 145 +++++++++++++++++++++ .../translations/zh_CN/core-api/index.rst | 5 - 2 files changed, 145 insertions(+), 5 deletions(-) commit d24c911bd031a299de39863f67ae7290d450d56e Author: Binbin Zhou Date: Fri Oct 21 09:58:08 2022 +0800 docs/zh_CN: core-api: Add timekeeping Chinese translation Translate core-api/timekeeping.rst into Chinese. Last English version used: commit 3dc6ffae2da2 ("timekeeping: Introduce fast accessor to clock tai"). Signed-off-by: Binbin Zhou Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/8d15ff60aaadd53065b3bc2da7d53a520cf01c53.1666171735.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/core-api/index.rst | 2 +- .../translations/zh_CN/core-api/timekeeping.rst | 177 +++++++++++++++++++++ 2 files changed, 178 insertions(+), 1 deletion(-) commit 797e75617b98e4c50d98372787427716cb532761 Author: Binbin Zhou Date: Fri Oct 21 09:58:07 2022 +0800 docs/zh_CN: core-api: Add this_cpu_ops Chinese translation Translate core-api/this_cpu_ops.rst into Chinese. Last English version used: commit c9b54d6f362c ("docs: move other kAPI documents to core-api"). Signed-off-by: Binbin Zhou Reviewed-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/f9a8cb188bc35811d7f074f9d5f607f5a48c6503.1666171735.git.zhoubinbin@loongson.cn Signed-off-by: Jonathan Corbet .../translations/zh_CN/core-api/index.rst | 2 +- .../translations/zh_CN/core-api/this_cpu_ops.rst | 285 +++++++++++++++++++++ 2 files changed, 286 insertions(+), 1 deletion(-) commit e07dfdf372cb2246f4d239c3cc85f9327ad6c7da Author: Rui Li Date: Wed Oct 19 21:30:22 2022 +0800 docs/zh_CN: Add userspace-api/ebpf Chinese translation Translate the following documents into Chinese: - userspace-api/ebpf/index.rst - userspace-api/ebpf/syscall.rst Signed-off-by: Rui Li Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/cdd100d92752f76827fa7abfcd9903b857d71044.1666185911.git.me@lirui.org Signed-off-by: Jonathan Corbet .../zh_CN/userspace-api/ebpf/index.rst | 22 ++++++++++++++++ .../zh_CN/userspace-api/ebpf/syscall.rst | 29 ++++++++++++++++++++++ .../translations/zh_CN/userspace-api/index.rst | 6 ++++- 3 files changed, 56 insertions(+), 1 deletion(-) commit 970072d3bf0097f700b975f3717ac9d2fabaefe2 Author: Rui Li Date: Wed Oct 19 21:30:21 2022 +0800 docs/zh_CN: Add userspace-api/index Chinese translation Translate userspace-api/index.rst into Chinese, add it into zh_CN/index.rst. Signed-off-by: Rui Li Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/76b86e687034d5347e1e49c4acfc28e9c45abe47.1666185911.git.me@lirui.org Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/index.rst | 2 +- .../translations/zh_CN/userspace-api/index.rst | 46 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) commit 54d9135cf223f221546bd51b0f5e4a73e99891f4 Author: Ricardo Neri Date: Tue Oct 18 04:22:40 2022 -0700 thermal: intel: hfi: Improve the type of hfi_features::nr_table_pages A Coverity static code scan raised a potential overflow_before_widen warning when hfi_features::nr_table_pages is used as an argument to memcpy in intel_hfi_process_event(). Even though the overflow can never happen (the maximum number of pages of the HFI table is 0x10 and 0x10 << PAGE_SHIFT = 0x10000), using size_t as the data type of hfi_features::nr_table_pages makes Coverity happy and matches the data type of the argument 'size' of memcpy(). Signed-off-by: Ricardo Neri Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/intel_hfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 692373d186205dfb1b56f35f22702412d94d9420 Author: Yunsheng Lin Date: Fri Oct 28 15:50:53 2022 +0800 RDMA/rxe: cleanup some error handling in rxe_verbs.c Instead of 'goto and return', just return directly to simplify the error handling, and avoid some unnecessary return value check. Link: https://lore.kernel.org/r/20221028075053.3990467-1-xuhaoyue1@hisilicon.com Signed-off-by: Yunsheng Lin Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_verbs.c | 80 ++++++++++------------------------- 1 file changed, 23 insertions(+), 57 deletions(-) commit b071850ef62e36b2fc2ec81863f07be857151409 Author: Xiao Yang Date: Thu Oct 27 07:31:33 2022 +0000 RDMA/rxe: Remove the duplicate assignment of mr->map_shift mr->map_shift is set to ilog2(RXE_BUF_PER_MAP) in both rxe_mr_init() and rxe_mr_alloc() so remove the duplicate one in rxe_mr_init(). Link: https://lore.kernel.org/r/1666855893-145-1-git-send-email-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Reviewed-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_mr.c | 1 - 1 file changed, 1 deletion(-) commit cb51aeec147334d25fa8336d3334ea92e2134052 Author: Ulf Hansson Date: Fri Oct 21 17:10:13 2022 +0200 cpuidle: dt: Clarify a comment and simplify code in dt_init_idle_driver() The drv->state_count is assigned the total number of available states, so let's make that clear. Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/cpuidle/dt_idle_states.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit ee3c2c8ad6ba6785f14a60e4081d7c82e88162a2 Author: Ulf Hansson Date: Fri Oct 21 17:10:12 2022 +0200 cpuidle: dt: Return the correct numbers of parsed idle states While we correctly skips to initialize an idle state from a disabled idle state node in DT, the returned value from dt_init_idle_driver() don't get adjusted accordingly. Instead the number of found idle state nodes are returned, while the callers are expecting the number of successfully initialized idle states from DT. This leads to cpuidle drivers unnecessarily continues to initialize their idle state specific data. Moreover, in the case when all idle states have been disabled in DT, we would end up registering a cpuidle driver, rather than relying on the default arch specific idle call. Fixes: 9f14da345599 ("drivers: cpuidle: implement DT based idle states infrastructure") Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/cpuidle/dt_idle_states.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 668057b07db069daac3ca4e4978f8373db9cb71c Author: Ulf Hansson Date: Thu Oct 20 13:55:13 2022 +0200 cpuidle: psci: Extend information in log about OSI/PC mode It's useful to understand whether we are using OS-initiated (OSI) mode or Platform Coordinated (PC) mode, when initializing the CPU PM domains. Therefore, let's extend the print in the log after a successful probe with this information. Signed-off-by: Ulf Hansson Acked-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-psci-domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e49a1e1ee078aee21006192076a8d93335e0daa9 Author: Dan Carpenter Date: Fri Oct 28 18:02:34 2022 +0300 thermal/core: fix error code in __thermal_cooling_device_register() Return an error pointer if ->get_max_state() fails. The current code returns NULL which will cause an oops in the callers. Fixes: c408b3d1d9bb ("thermal: Validate new state in cur_state_store()") Signed-off-by: Dan Carpenter Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 875ab4a8d9a7e559c4aaad28f5886d39923301b7 Author: Li Zhijian Date: Tue Sep 27 13:53:27 2022 +0800 RDMA/rxe: Make sure requested access is a subset of {mr,mw}->access We should reject the requests with access flags that is not registered by MR/MW. For example, lookup_mr() should return NULL when requested access is 0x03 and mr->access is 0x01. Link: https://lore.kernel.org/r/20220927055337.22630-2-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_mr.c | 2 +- drivers/infiniband/sw/rxe/rxe_mw.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit 2d5253a096c6057bbf7caa5520856dcdf7eca8bb Author: Fabio Porcedda Date: Fri Sep 16 16:43:29 2022 +0200 bus: mhi: host: pci_generic: Add a secondary AT port to Telit FN990 Add a secondary AT port using one of OEM reserved channel. Signed-off-by: Fabio Porcedda Reviewed-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20220916144329.243368-3-fabio.porcedda@gmail.com Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/pci_generic.c | 2 ++ 1 file changed, 2 insertions(+) commit 869a99907faea6d1835b0bd0d0422ae3519c6ea9 Author: Qiang Yu Date: Sun Oct 16 11:05:32 2022 +0800 bus: mhi: host: Fix race between channel preparation and M0 event There is a race condition where mhi_prepare_channel() updates the read and write pointers as the base address and in parallel, if an M0 transition occurs, the tasklet goes ahead and rings doorbells for all channels with a delta in TRE rings assuming they are already enabled. This causes a null pointer access. Fix it by adding a channel enabled check before ringing channel doorbells. Cc: stable@vger.kernel.org # 5.19 Fixes: a6e2e3522f29 "bus: mhi: core: Add support for PM state transitions" Signed-off-by: Qiang Yu Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1665889532-13634-1-git-send-email-quic_qianyu@quicinc.com [mani: CCed stable list] Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 46db0ba12be6cfd043df1d09b5831cb84ce2307f Author: Qiang Yu Date: Mon Oct 10 12:32:04 2022 +0800 bus: mhi: host: Use mhi_soc_reset() API in place of register write Currently, a direct register write is used when ramdump collection in panic path occurs. Replace that with new mhi_soc_reset() API such that a controller defined reset() function is exercised if one is present and the regular SOC reset is done if it is not. Signed-off-by: Qiang Yu Reviewed-by: Loic Poulain Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1665376324-34258-1-git-send-email-quic_qianyu@quicinc.com Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/boot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 04068da8473549c0f88538f6820a7f94bcce3686 Author: Colin Ian King Date: Mon Oct 24 14:32:58 2022 +0100 ACPI: processor: throttling: remove variable count Variable count is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_throttling.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2437513a814b3e93bd02879740a8a06e52e2cf7d Author: Li Zhong Date: Fri Sep 2 00:37:30 2022 -0700 ACPI: processor: idle: Check acpi_fetch_acpi_dev() return value The return value of acpi_fetch_acpi_dev() could be NULL, which would cause a NULL pointer dereference to occur in acpi_device_hid(). Signed-off-by: Li Zhong [ rjw: Subject and changelog edits, added empty line after if () ] Signed-off-by: Rafael J. Wysocki drivers/acpi/processor_idle.c | 3 +++ 1 file changed, 3 insertions(+) commit dd3fa54b2eeed20df7ecffdb3333026ba96668e1 Author: Ard Biesheuvel Date: Mon Oct 24 17:43:41 2022 +0200 apei/ghes: Use xchg_release() for updating new cache slot instead of cmpxchg() Some documentation first, about how this machinery works: It seems, the intent of the GHES error records cache is to collect already reported errors - see the ghes_estatus_cached() checks. There's even a sentence trying to say what this does: /* * GHES error status reporting throttle, to report more kinds of * errors, instead of just most frequently occurred errors. */ New elements are added to the cache this way: if (!ghes_estatus_cached(estatus)) { if (ghes_print_estatus(NULL, ghes->generic, estatus)) ghes_estatus_cache_add(ghes->generic, estatus); The intent being, once this new error record is reported, it gets cached so that it doesn't get reported for a while due to too many, same-type error records getting reported in burst-like scenarios. I.e., new, unreported error types can have a higher chance of getting reported. Now, the loop in ghes_estatus_cache_add() is trying to pick out the oldest element in there. Meaning, something which got reported already but a long while ago, i.e., a LRU-type scheme. And the cmpxchg() is there presumably to make sure when that selected element slot_cache is removed, it really *is* that element that gets removed and not one which replaced it in the meantime. Now, ghes_estatus_cache_add() selects a slot, and either succeeds in replacing its contents with a pointer to a newly cached item, or it just gives up and frees the new item again, without attempting to select another slot even if one might be available. Since only inserting new items is being done here, the race can only cause a failure if the selected slot was updated with another new item concurrently, which means that it is arbitrary which of those two items gets dropped. And "dropped" here means, the item doesn't get added to the cache so the next time it is seen, it'll get reported again and an insertion attempt will be done again. Eventually, it'll get inserted and all those times when the insertion fails, the item will get reported although the cache is supposed to prevent that and "ratelimit" those repeated error records. Not a big deal in any case. This means the cmpxchg() and the special case are not necessary. Therefore, just drop the existing item unconditionally. Move the xchg_release() and call_rcu() out of rcu_read_lock/unlock section since there is no actually dereferencing the pointer at all. [ bp: - Flesh out and summarize what was discussed on the thread now that that cache contraption is understood; - Touch up code style. ] Co-developed-by: Jia He Signed-off-by: Jia He Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221010023559.69655-7-justin.he@arm.com Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/ghes.c | 60 ++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 27 deletions(-) commit 63a18baef2653f59a7c5b990283628bd54d062fd Author: Bob Pearson Date: Fri Oct 21 15:01:07 2022 -0500 RDMA/rxe: Rename task->state_lock to task->lock Rename task-state_lock to task->lock Link: https://lore.kernel.org/r/20221021200118.2163-7-rpearsonhpe@gmail.com Signed-off-by: Ian Ziemba Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_task.c | 18 +++++++++--------- drivers/infiniband/sw/rxe/rxe_task.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) commit dcef28528cce82a82134abd393aa0f38f2edf77e Author: Bob Pearson Date: Fri Oct 21 15:01:06 2022 -0500 RDMA/rxe: Make rxe_do_task static The subroutine rxe_do_task() is only called in rxe_task.c. This patch makes it static and renames it do_task(). Link: https://lore.kernel.org/r/20221021200118.2163-6-rpearsonhpe@gmail.com Signed-off-by: Ian Ziemba Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_task.c | 6 +++--- drivers/infiniband/sw/rxe/rxe_task.h | 8 -------- 2 files changed, 3 insertions(+), 11 deletions(-) commit dccb23f6c312e4480fe32ccbc2afac1a5cac7e5e Author: Bob Pearson Date: Fri Oct 21 15:01:05 2022 -0500 RDMA/rxe: Split rxe_run_task() into two subroutines Split rxe_run_task(task, sched) into rxe_run_task(task) and rxe_sched_task(task). Link: https://lore.kernel.org/r/20221021200118.2163-5-rpearsonhpe@gmail.com Signed-off-by: Ian Ziemba Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_comp.c | 19 +++++++++++-------- drivers/infiniband/sw/rxe/rxe_net.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_qp.c | 10 +++++----- drivers/infiniband/sw/rxe/rxe_req.c | 10 +++++----- drivers/infiniband/sw/rxe/rxe_resp.c | 5 ++++- drivers/infiniband/sw/rxe/rxe_task.c | 15 ++++++++++----- drivers/infiniband/sw/rxe/rxe_task.h | 7 +++---- drivers/infiniband/sw/rxe/rxe_verbs.c | 8 ++++---- 8 files changed, 44 insertions(+), 34 deletions(-) commit de669ae8af49ceed0eed44f5b3d51dc62affc5e4 Author: Bob Pearson Date: Fri Oct 21 15:01:04 2022 -0500 RDMA/rxe: Removed unused name from rxe_task struct The name field in struct rxe_task is never used. This patch removes it. Link: https://lore.kernel.org/r/20221021200118.2163-4-rpearsonhpe@gmail.com Signed-off-by: Ian Ziemba Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_qp.c | 9 +++------ drivers/infiniband/sw/rxe/rxe_task.c | 4 +--- drivers/infiniband/sw/rxe/rxe_task.h | 4 +--- 3 files changed, 5 insertions(+), 12 deletions(-) commit 98a54f170617746b5d09b18b23b295efc7a42a5e Author: Bob Pearson Date: Fri Oct 21 15:01:03 2022 -0500 RDMA/rxe: Remove init of task locks from rxe_qp.c The calls to spin_lock_init() for the tasklet spinlocks in rxe_qp_init_misc() are redundant since they are intiialized in rxe_init_task(). This patch removes them. Link: https://lore.kernel.org/r/20221021200118.2163-3-rpearsonhpe@gmail.com Signed-off-by: Ian Ziemba Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_qp.c | 4 ---- 1 file changed, 4 deletions(-) commit 05e88ebb9ecfe9631ccc6483a79b0eabf554da60 Author: Bob Pearson Date: Fri Oct 21 15:01:02 2022 -0500 RDMA/rxe: Remove redundant header files Remove unneeded include files. Link: https://lore.kernel.org/r/20221021200118.2163-2-rpearsonhpe@gmail.com Signed-off-by: Ian Ziemba Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_task.c | 4 ---- 1 file changed, 4 deletions(-) commit 3bcca3787bfc4859414d43bc0ffb754b9075eca6 Merge: 5e01ff7d496d 758ba92f3a2f Author: Mark Brown Date: Fri Oct 28 17:40:22 2022 +0100 ASoC: Intel: avs: PCM power management Merge series from Cezary Rojewski : Goal of the series is implementation of suspend/resume operations for a PCM stream along with all the collaterals connected to the subject. Start with splitting avs_dai_fe_hw_free() as ideally we would like to reuse as much of existing code as possible but snd_pcm_lib_free_pages() is not desired part of the function when speaking of suspend operation. The actual implementation of suspend/resume() for component drivers follows. For most scenarios, the PM flow is similar to standard streaming one, except for the part where the position register are being saved and the lack of PCM pages freeing. To reduce code duplication, all avs_dai_suspend_XXX() and avs_dai_resume_XXX() functions reuse their non-PM equivalents. Order of operations is affected by the fact that path binding/unbinding happens only in FE part of the stream. Above essentially unlocks SX+streaming scenarios i.e.: power transitions with an ongoing stream. As some streams are allowed to run in low power state, support is provided for S0iX state. The handlers check ACPI capabilities and the number of active low-power paths before deciding between SX and S0iX flows. The last portion of the patchset is addition of power/clock gating overrides. There is no single set of registers that ensures AudioDSP firmware loads 100% of time on every single configuration. By having them exposed, user can have the loading procedure behavior adjusted for their configuration without having to recompile the kernel. commit 36006ccb6bc7d8c7937277f985efddf658d7a1f9 Author: Uwe Kleine-König Date: Thu Oct 13 08:44:58 2022 +0200 ACPI: APEI: Drop unsetting driver data on remove Since commit 0998d0631001 ("device-core: Ensure drvdata = NULL when no driver is bound") the driver core cares for cleaning driver data, so don't do it in the driver, too. Signed-off-by: Uwe Kleine-König Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/ghes.c | 2 -- 1 file changed, 2 deletions(-) commit 6648a6dcfe40ae8c5e7cb5c1d7b9e59f010e285d Author: Srinivas Kandagatla Date: Thu Oct 27 11:27:10 2022 +0100 ASoC: qdsp6: audioreach: add support to enable module command Add support to enable Module command which is required for logging module to be able to debug. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221027102710.21407-10-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/audioreach.c | 40 ++++++++++++++++++++++++++++++++++++++- sound/soc/qcom/qdsp6/audioreach.h | 5 +++++ 2 files changed, 44 insertions(+), 1 deletion(-) commit cf0de67d954db21002fd7521364f2ac89aabae35 Author: Srinivas Kandagatla Date: Thu Oct 27 11:27:09 2022 +0100 ASoC: qdsp6: audioreach: add support for MFC Module Add support to enable and configure Media Format Converter (MFC) Module. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221027102710.21407-9-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/audioreach.c | 53 ++++++++++++++++++++++++++++++++++++++- sound/soc/qcom/qdsp6/audioreach.h | 1 + 2 files changed, 53 insertions(+), 1 deletion(-) commit a934afdbb022d5a7b1d20251875ecefcaf48536a Author: Srinivas Kandagatla Date: Thu Oct 27 11:27:08 2022 +0100 ASoC: qdsp6: audioreach: add support to enable SAL Module Add support to Simple Accumulator-Limiter module. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221027102710.21407-8-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/audioreach.c | 77 +++++++++++++++++++++++++++++++++++++++ sound/soc/qcom/qdsp6/audioreach.h | 11 ++++++ 2 files changed, 88 insertions(+) commit 03365d6a58c47b3a3f2f964d0777493e293d7da4 Author: Srinivas Kandagatla Date: Thu Oct 27 11:27:07 2022 +0100 ASoC: qdsp6: audioreach: add support for more port connections AudioReach Modules can connect to other modules using source and destination port, and each module in theory can support up to 255 port connections. But in practice this limit is at max 8 ports at a time. So add support for allowing multiple port connections. This support is needed for more detailed graphs like ECNS, speaker protection and so. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221027102710.21407-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown include/uapi/sound/snd_ar_tokens.h | 27 ++++++++++ sound/soc/qcom/qdsp6/audioreach.c | 44 ++++++++-------- sound/soc/qcom/qdsp6/audioreach.h | 9 ++-- sound/soc/qcom/qdsp6/topology.c | 103 ++++++++++++++++++++++++++++++++----- 4 files changed, 144 insertions(+), 39 deletions(-) commit 4efb98e9635b9919f2cb72cddae97b7231cf96ef Author: Srinivas Kandagatla Date: Thu Oct 27 11:27:06 2022 +0100 ASoC: qdsp6: audioreach: simplify module_list sz calculation Simplify module_list size calculation by doing inside modules loop. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221027102710.21407-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/audioreach.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e4977b91cff8b00cdeb310735ef34fa4dee9485c Author: Srinivas Kandagatla Date: Thu Oct 27 11:27:05 2022 +0100 ASoC: qdsp6: audioreach: Simplify handing FE and BE graph connections Current AudioReach design of connecting FE and BE graph is very complicated and not reliable. Instead used the virtual damp widgets private data to help identify the modules that needs connection at runtime. Also maintain a inter-graph connection info in the graph info, which can be used to both determine if the graphs are connected and at graph build time. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221027102710.21407-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/audioreach.c | 88 +++++++++----------------------- sound/soc/qcom/qdsp6/audioreach.h | 20 +++----- sound/soc/qcom/qdsp6/q6apm.c | 83 +----------------------------- sound/soc/qcom/qdsp6/q6apm.h | 5 -- sound/soc/qcom/qdsp6/topology.c | 105 ++++++++++++++++++++++++++++++++++---- 5 files changed, 127 insertions(+), 174 deletions(-) commit 1c87d3817b74b895933e9940b9de09b17c674b9b Author: Srinivas Kandagatla Date: Thu Oct 27 11:27:04 2022 +0100 ASoC: qdsp6: audioreach: update dapm kcontrol private data Update kcontrol private date to include more information like graph id and module instance id which its connected to. Also maintain this virtual dapm mixer widget in a list so that we could lookup while FE and BE connection are added. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221027102710.21407-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/q6apm.c | 1 + sound/soc/qcom/qdsp6/q6apm.h | 1 + sound/soc/qcom/qdsp6/topology.c | 19 ++++++++++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) commit 5b488e80078f09bbc197d766babf014dd52c30bf Author: Srinivas Kandagatla Date: Thu Oct 27 11:27:03 2022 +0100 ASoC: qdsp6: audioreach: remove unused connection_list Remove unused connection_list parameter. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221027102710.21407-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/audioreach.h | 1 - 1 file changed, 1 deletion(-) commit af7ed7eb70e8964514c706f8498623a2a3696657 Author: Srinivas Kandagatla Date: Thu Oct 27 11:27:02 2022 +0100 ASoC: qdsp6: audioreach: topology use idr_alloc_u32 SubGraph and Module Instance ids take 32 bits, so use idr_alloc_u32 instead of idr_alloc to able to accommodate valid ranges. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221027102710.21407-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/topology.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5e01ff7d496d92bf435e6531b808f7883320c650 Merge: 107d170dc46e 870b89d118a2 Author: Mark Brown Date: Fri Oct 28 16:50:34 2022 +0100 Add support for SAI on i.MX93 platform Merge series from Chancel Liu : This patchset supports SAI on i.MX93 platform. commit f350c68e3cd5ce605e44c7830029cd936a223f66 Author: Alison Schofield Date: Thu Oct 27 19:56:50 2022 +0200 ACPICA: Add CXL 3.0 structures (CXIMS & RDPAS) to the CEDT table ACPICA commit 2d8dc0383d3c908389053afbdc329bbd52f009ce The CXL 3.0 Specification [1] adds two new structures to the CXL Early Discovery Table (CEDT). The CEDT may include zero or more entries of these types: CXIMS: CXL XOR Interleave Math Structure Enables the host to find a targets position in an Interleave Target List when XOR Math is used. RDPAS: RCEC Downstream Post Association Structure Enables the host to locate the Downstream Port(s) that report errors to a given Root Complex Event Collector (RCEC). Link: https://www.computeexpresslink.org/spec-landing # [1] Link: https://github.com/acpica/acpica/commit/2d8dc038 Signed-off-by: Alison Schofield Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/actbl1.h | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 51aad1a6723b3ed564d243031c4f284298b4329c Author: Bob Moore Date: Thu Oct 27 19:58:36 2022 +0200 ACPICA: Finish support for the CDAT table ACPICA commit 8ac4e5116f59d6f9ba2fbeb9ce22ab58237a278f Finish support for the CDAT table, in both the data table compiler and the disassembler. Link: https://github.com/acpica/acpica/commit/8ac4e511 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/Makefile | 1 + drivers/acpi/acpica/acglobal.h | 1 + drivers/acpi/acpica/actables.h | 5 - drivers/acpi/acpica/acutils.h | 13 +++ drivers/acpi/acpica/tbdata.c | 2 +- drivers/acpi/acpica/tbfadt.c | 2 +- drivers/acpi/acpica/tbprint.c | 77 +------------- drivers/acpi/acpica/tbutils.c | 2 +- drivers/acpi/acpica/tbxfroot.c | 4 +- drivers/acpi/acpica/utcksum.c | 170 +++++++++++++++++++++++++++++++ include/acpi/actbl1.h | 116 ++++++++++++++++++++- include/acpi/actbl2.h | 2 +- tools/power/acpi/tools/acpidump/apdump.c | 4 +- 13 files changed, 311 insertions(+), 88 deletions(-) commit 183f0a09d32cf4f007f52718becf1b963549cb54 Author: Bob Moore Date: Thu Oct 27 19:55:26 2022 +0200 ACPICA: Improve warning message for "invalid ACPI name" ACPICA commit 91bef8bea9cd69c33447ba1bfe2c4273994500fd Added an underscore instead of an (illegal) * Link: https://github.com/acpica/acpica/commit/91bef8be Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utstring.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3f062a516a6327d64c45af10fec04cb1475912f3 Author: Robin Murphy Date: Thu Oct 27 19:57:42 2022 +0200 ACPICA: IORT: Update for revision E.e ACPICA commit 54b54732c5fc9e0384bcfd531f3c10d3a7b628b5 The latest IORT update makes one small addition to SMMUv3 nodes to describe MSI support independently of wired GSIV support. Link: https://github.com/acpica/acpica/commit/54b54732 Signed-off-by: Robin Murphy Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/actbl2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ee64b827a9af7905cb8b84d882320ecc91640192 Author: Sudeep Holla Date: Thu Oct 27 19:54:32 2022 +0200 ACPICA: Add support for FFH Opregion special context data ACPICA commit fad527b6e76babc7527c41325bfbef6bd1a1132b FFH(Fixed Function Hardware) Opregion is approved to be added in ACPI 6.5 via code first approach [1]. It requires special context data similar to GPIO and Generic Serial Bus as it needs to know platform specific offset and length. Add support for the special context data needed by FFH Opregion. FFH op_region enables advanced use of FFH on some architectures. For example, it could be used to easily proxy AML code to architecture-specific behavior (to ensure it is OS initiated) Actual behavior of FFH is ofcourse architecture specific and depends on the FFH bindings. The offset and length could have arch specific meaning or usage. Link: https://bugzilla.tianocore.org/show_bug.cgi?id=3598 # [1] Link: https://github.com/acpica/acpica/commit/fad527b6 Signed-off-by: Sudeep Holla Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/evregion.c | 9 +++++++++ drivers/acpi/acpica/exfield.c | 8 ++++++-- drivers/acpi/acpica/exserial.c | 6 ++++++ include/acpi/acconfig.h | 2 ++ include/acpi/actypes.h | 7 +++++++ 5 files changed, 30 insertions(+), 2 deletions(-) commit e92e4a451c0c08b7580b505c935070d982ad029a Author: Bob Moore Date: Thu Oct 27 19:52:50 2022 +0200 ACPICA: Add a couple of new UUIDs to the known UUID list ACPICA commit 2176a750230d5e81b4bedf24ef296da0cd0d7bb3 Link: https://github.com/acpica/acpica/commit/2176a750 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/acuuid.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 407144ebd445a784262217b6729c7b20987574d1 Author: Kuppuswamy Sathyanarayanan Date: Thu Oct 27 19:51:51 2022 +0200 ACPICA: iASL: Add CCEL table to both compiler/disassembler ACPICA commit 10e4763f155eac0c60295a7e364b0316fc52c4f1 Link: https://github.com/acpica/acpica/commit/10e4763f Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/actbl2.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 8ff2906513f5ad2f6665b94d1763a26e30bfa47b Author: Vit Kabele Date: Thu Oct 27 19:50:59 2022 +0200 ACPICA: Do not touch VGA memory when EBDA < 1ki_b ACPICA commit a36eda9631e84f271319c41288889dd5b1329369 The ACPICA code assumes that EBDA region must be at least 1ki_b in size. Because this is not guaranteed, it might happen that while scanning the memory for RSDP pointer, the kernel touches memory above 640ki_b. This is unwanted as the VGA memory range may not be decoded or even present when running under virtualization. Link: https://github.com/acpica/acpica/commit/a36eda96 Signed-off-by: Vit Kabele Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/tbxfroot.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 4fe54f509304ea6cc80a40620cac860c57edf7f3 Author: Vit Kabele Date: Thu Oct 27 19:50:06 2022 +0200 ACPICA: Check that EBDA pointer is in valid memory ACPICA commit cc9e7763ceb2e2649fe3422130416d84a3c6854a If the memory at 0x40e is uninitialized, the retrieved physical_memory address of EBDA may be beyond the low memory (i.e. above 640K). If so, the kernel may unintentionally access the VGA memory, that might not be decoded or even present in case of virtualization. Link: https://github.com/acpica/acpica/commit/cc9e7763 Signed-off-by: Vit Kabele Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/tbxfroot.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5c62d5aab8752e5ee7bfbe75ed6060db1c787f98 Author: Huacai Chen Date: Thu Oct 27 19:48:53 2022 +0200 ACPICA: Events: Support fixed PCIe wake event ACPICA commit 32d875705c8ee8f99fd8b78dbed48633486a7640 Some chipsets (such as Loongson's LS7A) support fixed pcie wake event which is defined in the PM1 block(related description can be found in 4.8.4.1.1 PM1 Status Registers, 4.8.4.2.1 PM1 Control Registers and 5.2.9 Fixed ACPI Description Table (FADT)), so we add code to handle it. Link: https://uefi.org/specifications/ACPI/6.4/ Link: https://github.com/acpica/acpica/commit/32d87570 Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/evevent.c | 11 +++++++++++ drivers/acpi/acpica/hwsleep.c | 14 ++++++++++++++ drivers/acpi/acpica/utglobal.c | 4 ++++ include/acpi/actypes.h | 3 ++- 4 files changed, 31 insertions(+), 1 deletion(-) commit 60f2096b59bcd6827aa53d771505f939317b254c Author: Huacai Chen Date: Thu Oct 27 19:47:30 2022 +0200 ACPICA: MADT: Add loong_arch-specific APICs support ACPICA commit 1dc530059a3e6202e941e6a9478cf30f092bfb47 loong_arch-specific interrupt controllers (similar to APIC) are added in the next revision of ACPI Specification (current revision is 6.4), which including CORE_PIC (CPUINTC), LIO_PIC (LIOINTC), EIO_PIC (EIOINTC), HT_PIC (HTVECINTC), BIO_PIC (PCHINTC), LPC_PIC (PCHLPC) and MSI_PIC (PCHMSI). This patch add their definition. ACPI changes of loong_arch-specific interrupt controllers have already been approved in the ECRs, and will be public in the next revision of ACPI Specification. Link: https://github.com/acpica/acpica/commit/1dc53005 Link: https://mantis.uefi.org/mantis/view.php?id=2203 Link: https://mantis.uefi.org/mantis/view.php?id=2313 Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/actbl2.h | 139 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 137 insertions(+), 2 deletions(-) commit 5620fe641620a790117be5b671c0a48d6dcd3fda Author: Rafael J. Wysocki Date: Thu Oct 27 20:02:13 2022 +0200 ACPICA: Make acpi_ex_load_op() match upstream The acpi_ex_load_op() code has slightly diverged from the upstream implementation, so correct that to make the behavior consistent with the upstream and avoid patch backporting issues going forward. Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/exconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17c13c724b143c835fe3a9109daab524dff3d06f Author: Maarten Zanders Date: Fri Oct 28 12:56:43 2022 +0200 leds: lp5523: fix out-of-bounds bug in lp5523_selftest() When not all LED channels of the led chip are configured, the sysfs selftest functionality gives erroneous results and tries to test all channels of the chip. There is a potential for LED overcurrent conditions since the test current will be set to values from out-of-bound regions. It is wrong to use pdata->led_config[i].led_current to skip absent channels as led_config[] only contains the configured LED channels. Instead of iterating over all the physical channels of the device, loop over the available LED configurations and use led->chan_nr to access the correct i2c registers. Keep the zero-check for the LED current as existing users might depend on this to disable a channel. Reported-by: Arne Staessen Signed-off-by: Maarten Zanders Signed-off-by: Pavel Machek drivers/leds/leds-lp5523.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 2a865248399a13bb2b2bcc50297069a7521de258 Author: Ahmad Fatoum Date: Wed Oct 26 14:52:46 2022 +0200 drm: bridge: adv7511: use dev_err_probe in probe function adv7511 probe may need to be attempted multiple times before no -EPROBE_DEFER is returned. Currently, every such probe results in an error message: [ 4.534229] adv7511 1-003d: failed to find dsi host [ 4.580288] adv7511 1-003d: failed to find dsi host This is misleading, as there is no error and probe deferral is normal behavior. Fix this by using dev_err_probe that will suppress -EPROBE_DEFER errors. While at it, we touch all dev_err in the probe path. This makes the code more concise and included the error code everywhere to aid user in debugging. Reviewed-by: Laurent Pinchart Signed-off-by: Ahmad Fatoum Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221026125246.3188260-1-a.fatoum@pengutronix.de drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 ++---- drivers/gpu/drm/bridge/adv7511/adv7533.c | 20 ++++++++------------ 2 files changed, 10 insertions(+), 16 deletions(-) commit 03b33d4ac41e4d0bb3e4654f21e06caba4ccb400 Author: wangjianli Date: Sat Oct 22 13:45:44 2022 +0800 power/supply: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: wangjianli Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f5b93f4077b37d576b6cdbcb636f443aa09eb03 Author: Krzysztof Kozlowski Date: Fri Sep 23 22:36:03 2022 +0200 dt-bindings: power: reset: restart-handler: add common schema Add common schema for restart and shutdown handlers, so they all use same meaning of "priority" field. The Linux drivers already have this property and some systems want to customize it per-board in DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power/reset/gpio-restart.yaml | 13 +++------- .../bindings/power/reset/restart-handler.yaml | 30 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 10 deletions(-) commit 2e5632aef677cc2e22cbc76704526b51e29b3a7b Author: Colin Ian King Date: Wed Oct 5 17:13:48 2022 +0100 power: supply: lp8788: make const array name static Don't populate the read-only array name on the stack but instead make it static. Since the data and the pointers don't change also add in a missing const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel drivers/power/supply/lp8788-charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16257cf6658d5bde2a055caf48f143c255abade7 Author: Christian Brauner Date: Fri Oct 28 15:41:31 2022 +0200 evm: remove dead code in evm_inode_set_acl() When evm_status is INTEGRITY_PASS then this function returns early and so later codepaths that check for evm_status != INTEGRITY_PASS can be removed as they are dead code. Fixes: e61b135f7bfe ("integrity: implement get and set acl hook") Reported-by: Dan Carpenter Signed-off-by: Christian Brauner (Microsoft) security/integrity/evm/evm_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f3ca72b0327101a074a871539e61775d43908ca4 Author: Nagarajan Maran Date: Fri Oct 14 21:20:54 2022 +0530 wifi: ath11k: fix monitor vdev creation with firmware recovery During firmware recovery, the monitor interface is not getting created in the driver and firmware since the respective flags are not updated properly. So after firmware recovery is successful, when monitor interface is brought down manually, firmware assertion is observed, since we are trying to bring down the interface which is not yet created in the firmware. Fix this by updating the monitor flags properly per phy#, during firmware recovery. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Nagarajan Maran Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221014155054.11471-1-quic_nmaran@quicinc.com drivers/net/wireless/ath/ath11k/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit b13b2c3e0e4d0854228b5217fa34e145f3ace8ac Author: Georgi Vlaev Date: Fri Oct 21 21:57:04 2022 +0300 firmware: ti_sci: Fix polled mode during system suspend Commit b9e8a7d950ff ("firmware: ti_sci: Switch transport to polled mode during system suspend") uses read_poll_timeout_atomic() macro in ti_sci_do_xfer() to wait for completion when the system is suspending. The break condition of the macro is set to "true" which will cause it break immediately when evaluated, likely before the TISCI xfer is completed, and always return 0. We want to poll here until "done_state == true". 1) Change the break condition of read_poll_timeout_atomic() to the bool variable "done_state". 2) The read_poll_timeout_atomic() returns 0 if the break condition is met or -ETIMEDOUT if not. Since our break condition has changed to "done_state", we also don't have to check for "!done_state" when evaluating the return value. Fixes: b9e8a7d950ff ("firmware: ti_sci: Switch transport to polled mode during system suspend") Signed-off-by: Georgi Vlaev Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221021185704.181316-1-g-vlaev@ti.com drivers/firmware/ti_sci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4dc3883203736dcd979672ac8d9f086dbd4d2140 Author: Christophe JAILLET Date: Fri Jul 8 21:23:56 2022 +0200 firmware: ti_sci: Use the non-atomic bitmap API when applicable Usages of the 'res_map' bitmap is protected with a spinlock, so non-atomic functions can be used to set/clear bits. Signed-off-by: Christophe JAILLET Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/fb7edc555b6fa7c74707f13e422196693a834bc8.1657308216.git.christophe.jaillet@wanadoo.fr drivers/firmware/ti_sci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2f9b0402755c1320420825ea8cda27a5f18e0ac4 Author: Christophe JAILLET Date: Fri Jul 8 21:23:46 2022 +0200 firmware: ti_sci: 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 Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/3ee11e9e83f7c1552d237f5c28f554319fcbbf1f.1657308216.git.christophe.jaillet@wanadoo.fr drivers/firmware/ti_sci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit adf85adc2a7199b41e7a4da083bd17274a3d6969 Author: Chen Jiahao Date: Wed Oct 19 23:32:12 2022 +0800 drivers: soc: ti: knav_qmss_queue: Mark knav_acc_firmwares as static There is a sparse warning shown below: drivers/soc/ti/knav_qmss_queue.c:70:12: warning: symbol 'knav_acc_firmwares' was not declared. Should it be static? Since 'knav_acc_firmwares' is only called within knav_qmss_queue.c, mark it as static to fix the warning. Fixes: 96ee19becc3b ("soc: ti: add firmware file name as part of the driver") Signed-off-by: Chen Jiahao Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221019153212.72350-1-chenjiahao16@huawei.com drivers/soc/ti/knav_qmss_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0aef5131380628e2a9bfcbbcfed5d6477c8f9651 Author: Andrew Davis Date: Thu Oct 20 11:03:05 2022 -0500 arm64: dts: ti: k3-j721s2: Enable I2C nodes at the board level I2C nodes defined in the top-level J721s2 SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the I2C nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-13-afd@ti.com .../boot/dts/ti/k3-j721s2-common-proc-board.dts | 24 ---------------------- arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 6 ++++++ arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 1 + 4 files changed, 10 insertions(+), 24 deletions(-) commit 06639b8ae0e9be0cf0195209e6b69f4e254687b0 Author: Andrew Davis Date: Thu Oct 20 11:03:04 2022 -0500 arm64: dts: ti: k3-j721s2: Enable MCAN nodes at the board level MCAN nodes defined in the top-level J721s2 SoC dtsi files are incomplete and may not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the MCAN nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-12-afd@ti.com .../boot/dts/ti/k3-j721s2-common-proc-board.dts | 70 +--------------------- arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 18 ++++++ arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 2 + arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 1 + 4 files changed, 23 insertions(+), 68 deletions(-) commit 3fb0402f65959edc9a14842dc36828d2c7109ae2 Author: Andrew Davis Date: Thu Oct 20 11:03:03 2022 -0500 arm64: dts: ti: k3-j721s2: Enable Mailbox nodes at the board level Mailbox nodes defined in the top-level J721s2 SoC dtsi files are incomplete and may not be functional unless they are extended with a chosen interrupt and connection to a remote processor. As the remote processors depend on memory nodes which are only known at the board integration level, these nodes should only be enabled when provided with the above information. Disable the Mailbox nodes in the dtsi files and only enable the ones that are actually used on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-11-afd@ti.com arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 24 +++++++ arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 96 ---------------------------- 2 files changed, 24 insertions(+), 96 deletions(-) commit 74f0f58d3122c3e2cc313dd6311b9742dbfd54e0 Author: Andrew Davis Date: Thu Oct 20 11:03:02 2022 -0500 arm64: dts: ti: k3-j7200: Enable Mailbox nodes at the board level Mailbox nodes defined in the top-level J7200 SoC dtsi files are incomplete and may not be functional unless they are extended with a chosen interrupt and connection to a remote processor. As the remote processors depend on memory nodes which are only known at the board integration level, these nodes should only be enabled when provided with the above information. Disable the Mailbox nodes in the dtsi files and only enable the ones that are actually used on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-10-afd@ti.com arch/arm64/boot/dts/ti/k3-j7200-main.dtsi | 12 +++++++++ arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi | 42 ++--------------------------- 2 files changed, 14 insertions(+), 40 deletions(-) commit 7e48b665100ee84bdaa163dece6d40351077f664 Author: Andrew Davis Date: Thu Oct 20 11:03:01 2022 -0500 arm64: dts: ti: k3-j721e: Enable Mailbox nodes at the board level Mailbox nodes defined in the top-level J721e SoC dtsi files are incomplete and may not be functional unless they are extended with a chosen interrupt and connection to a remote processor. As the remote processors depend on memory nodes which are only known at the board integration level, these nodes should only be enabled when provided with the above information. Disable the Mailbox nodes in the dtsi files and only enable the ones that are actually used on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-9-afd@ti.com arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 12 +++++++++++ arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 33 +++++------------------------ arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi | 33 +++++------------------------ 3 files changed, 22 insertions(+), 56 deletions(-) commit 0e63f35a9c6acf1d74bd693c492f8955bb16c89a Author: Andrew Davis Date: Thu Oct 20 11:03:00 2022 -0500 arm64: dts: ti: k3-j721s2: Enable UART nodes at the board level UART nodes defined in the top-level J721s2 SoC dtsi files are incomplete and may not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the UART nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-8-afd@ti.com .../boot/dts/ti/k3-j721s2-common-proc-board.dts | 38 +++------------------- arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 10 ++++++ arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 2 ++ 3 files changed, 16 insertions(+), 34 deletions(-) commit a9ed915cd55c883fed72e50b45988fa4305496a7 Author: Andrew Davis Date: Thu Oct 20 11:02:59 2022 -0500 arm64: dts: ti: k3-j7200: Enable I2C nodes at the board level I2C nodes defined in the top-level J7200 SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the I2C nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-7-afd@ti.com arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts | 2 ++ arch/arm64/boot/dts/ti/k3-j7200-main.dtsi | 7 +++++++ arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi | 3 +++ 3 files changed, 12 insertions(+) commit dae322f8a7ef11a06bfb61bada4ebbcac219783e Author: Andrew Davis Date: Thu Oct 20 11:02:58 2022 -0500 arm64: dts: ti: k3-j7200: Enable UART nodes at the board level UART nodes defined in the top-level J7200 SoC dtsi files are incomplete and may not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the UART nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-6-afd@ti.com .../boot/dts/ti/k3-j7200-common-proc-board.dts | 46 ++++++---------------- arch/arm64/boot/dts/ti/k3-j7200-main.dtsi | 10 +++++ arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi | 2 + 3 files changed, 23 insertions(+), 35 deletions(-) commit 39e7758b94e31071a87489364c723afe92849ae7 Author: Andrew Davis Date: Thu Oct 20 11:02:57 2022 -0500 arm64: dts: ti: k3-j721e: Enable MCAN nodes at the board level MCAN nodes defined in the top-level J721e SoC dtsi files are incomplete and may not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the MCAN nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-5-afd@ti.com .../boot/dts/ti/k3-j721e-common-proc-board.dts | 52 ++-------------------- arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 14 ++++++ arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 2 + 3 files changed, 20 insertions(+), 48 deletions(-) commit 256596ad158c80c8e4104a6310a411ec8829f9eb Author: Andrew Davis Date: Thu Oct 20 11:02:56 2022 -0500 arm64: dts: ti: k3-j721e: Enable MCASP nodes at the board level MCASP nodes defined in the top-level J721e SoC dtsi files are incomplete and may not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the MCASP nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-4-afd@ti.com .../boot/dts/ti/k3-j721e-common-proc-board.dts | 45 +--------------- arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 12 +++++ arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 60 ---------------------- 3 files changed, 13 insertions(+), 104 deletions(-) commit 282c4ad3b8c1da99095e0edbbe617cdf4dcb138b Author: Andrew Davis Date: Thu Oct 20 11:02:55 2022 -0500 arm64: dts: ti: k3-j721e: Enable I2C nodes at the board level I2C nodes defined in the top-level J721e SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the I2C nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-3-afd@ti.com .../boot/dts/ti/k3-j721e-common-proc-board.dts | 4 ++++ arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 7 +++++++ arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 23 +++------------------- 4 files changed, 17 insertions(+), 20 deletions(-) commit fe17e20fde14c6cbaf1cae97aef370b6f4c73518 Author: Andrew Davis Date: Thu Oct 20 11:02:54 2022 -0500 arm64: dts: ti: k3-j721e: Enable UART nodes at the board level UART nodes defined in the top-level J721e SoC dtsi files are incomplete and may not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the UART nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221020160305.18711-2-afd@ti.com .../boot/dts/ti/k3-j721e-common-proc-board.dts | 40 +++++++++------------ arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 10 ++++++ arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 2 ++ arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 42 +++++----------------- 4 files changed, 37 insertions(+), 57 deletions(-) commit b0ca32e895680ba94c0ef24a5faa738e536e31cc Author: Andrew Davis Date: Tue Oct 18 16:15:33 2022 -0500 arm64: dts: ti: k3-am62: Enable OSPI nodes at the board level OSPI nodes defined in the top-level AM62x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the OSPI nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221018211533.21335-11-afd@ti.com arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am625-sk.dts | 1 + 2 files changed, 2 insertions(+) commit b2b10301ca685ac23f09d2e663eb4b990b871935 Author: Andrew Davis Date: Tue Oct 18 16:15:32 2022 -0500 arm64: dts: ti: k3-am62: Enable SDHCI nodes at the board level SDHCI nodes defined in the top-level AM62x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the SDHCI nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221018211533.21335-10-afd@ti.com arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-am625-sk.dts | 2 ++ 2 files changed, 5 insertions(+) commit 2f6d7e18e73d3bd3752ca16d0b3c6b2926809452 Author: Andrew Davis Date: Tue Oct 18 16:15:31 2022 -0500 arm64: dts: ti: k3-am62: Enable MCAN nodes at the board level MCAN nodes defined in the top-level AM62x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the MCAN nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221018211533.21335-9-afd@ti.com arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am625-sk.dts | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) commit 1f737012ce7bd92aecf7d6b1e17742dc7cae7bee Author: Andrew Davis Date: Tue Oct 18 16:15:30 2022 -0500 arm64: dts: ti: k3-am62: Enable MDIO nodes at the board level MDIO nodes defined in the top-level AM62x SoC dtsi files are incomplete and will not be functional unless they are extended with a pinmux. As the attached PHY is only known about at the board integration level, these nodes should only be enabled when provided with this information. Disable the MDIO nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221018211533.21335-8-afd@ti.com arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am625-sk.dts | 1 + 2 files changed, 2 insertions(+) commit 8709e0442c79c03f7067d6e7464d669504f76527 Author: Andrew Davis Date: Tue Oct 18 16:15:29 2022 -0500 arm64: dts: ti: k3-am62: MDIO pinmux should belong to the MDIO node Although usually integrated as a child of an Ethernet controller, MDIO IP has an independent pinout. This pinout should be controlled by the MDIO node (so if it was to be disabled for instance, the pinmux state would reflect that). Move the MDIO pins pinmux to the MIDO nodes. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221018211533.21335-7-afd@ti.com arch/arm64/boot/dts/ti/k3-am625-sk.dts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ffd61c16fe8facf56b6fb06e29ba5bd150f01bd9 Author: Andrew Davis Date: Tue Oct 18 16:15:28 2022 -0500 arm64: dts: ti: k3-am62: Enable ECAP nodes at the board level ECAP nodes defined in the top-level AM62x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. (These and the EPWM nodes could be used to trigger internal actions but they are not used like that currently) As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the ECAP nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221018211533.21335-6-afd@ti.com arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-am625-sk.dts | 12 ------------ 2 files changed, 3 insertions(+), 12 deletions(-) commit 6e5474826606a783dd969467f93b0c6a56c39780 Author: Andrew Davis Date: Tue Oct 18 16:15:27 2022 -0500 arm64: dts: ti: k3-am62: Enable EPWM nodes at the board level EPWM nodes defined in the top-level AM62x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the EPWM nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221018211533.21335-5-afd@ti.com arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-am625-sk.dts | 12 ------------ 2 files changed, 3 insertions(+), 12 deletions(-) commit 361e8b7144405b78bd37cc3e9b2d23fc2e2ed6d5 Author: Andrew Davis Date: Tue Oct 18 16:15:26 2022 -0500 arm64: dts: ti: k3-am62: Enable SPI nodes at the board level SPI nodes defined in the top-level AM62x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the SPI nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221018211533.21335-4-afd@ti.com arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi | 2 ++ 2 files changed, 5 insertions(+) commit a1541a08bbf9d02f842801261d0dd4505bcd29e0 Author: Andrew Davis Date: Tue Oct 18 16:15:25 2022 -0500 arm64: dts: ti: k3-am62: Enable I2C nodes at the board level I2C nodes defined in the top-level AM62x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the I2C nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221018211533.21335-3-afd@ti.com arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 4 ++++ arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am625-sk.dts | 18 ++---------------- 4 files changed, 8 insertions(+), 16 deletions(-) commit b5877d9b409cfd5667813e667cbc27192a0fb9ea Author: Andrew Davis Date: Tue Oct 18 16:15:24 2022 -0500 arm64: dts: ti: k3-am62: Enable UART nodes at the board level UART nodes defined in the top-level AM62x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the UART nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20221018211533.21335-2-afd@ti.com arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 7 +++++++ arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 1 + arch/arm64/boot/dts/ti/k3-am625-sk.dts | 25 +------------------------ 4 files changed, 10 insertions(+), 24 deletions(-) commit 4eb7aa3befa33c05a03d11fd3b4bb8b74d3c68c0 Author: Andrew Davis Date: Mon Oct 17 14:25:32 2022 -0500 arm64: dts: ti: k3-am64: Enable GPMC and ELM nodes at the board level The GPMC node defined in the top-level AM64x SoC dtsi files are incomplete and will not be functional unless it is extended with pinmux information. As the pinmux is only known at the board integration level, this node should only be enabled when provided with this information. Disable the GPMC node in the dtsi file. Since the ELM is made to work with the GPMC, disable it too. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20221017192532.23825-11-afd@ti.com arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 2 ++ arch/arm64/boot/dts/ti/k3-am642-evm.dts | 8 -------- arch/arm64/boot/dts/ti/k3-am642-sk.dts | 8 -------- 3 files changed, 2 insertions(+), 16 deletions(-) commit 4a57988707d7c7502842de07d6c8649da5a844fc Author: Andrew Davis Date: Mon Oct 17 14:25:31 2022 -0500 arm64: dts: ti: k3-am64: Enable MCAN nodes at the board level MCAN nodes defined in the top-level AM64x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the MCAN nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20221017192532.23825-10-afd@ti.com arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 2 ++ arch/arm64/boot/dts/ti/k3-am642-evm.dts | 2 ++ arch/arm64/boot/dts/ti/k3-am642-sk.dts | 8 -------- 3 files changed, 4 insertions(+), 8 deletions(-) commit f572888b3c10bf12436423e854f6ee6e3872c570 Author: Andrew Davis Date: Mon Oct 17 14:25:30 2022 -0500 arm64: dts: ti: k3-am64: Enable MDIO nodes at the board level MDIO nodes defined in the top-level AM64x SoC dtsi files are incomplete and will not be functional unless they are extended with a pinmux. As the attached PHY is only known about at the board integration level, these nodes should only be enabled when provided with this information. Disable the MDIO nodes (in both CPSW and ICSSG) in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20221017192532.23825-9-afd@ti.com arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-am642-evm.dts | 9 +-------- arch/arm64/boot/dts/ti/k3-am642-sk.dts | 9 +-------- 3 files changed, 5 insertions(+), 16 deletions(-) commit aa62d661247f180d0fc534e880cb6bc7fb50b4a1 Author: Andrew Davis Date: Mon Oct 17 14:25:29 2022 -0500 arm64: dts: ti: k3-am64: MDIO pinmux should belong to the MDIO node Although usually integrated as a child of an Ethernet controller, MDIO IP has an independent pinout. This pinout should be controlled by the MDIO node (so if it was to be disabled for instance, the pinmux state would reflect that). Move the MDIO pins pinmux to the MIDO nodes. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20221017192532.23825-8-afd@ti.com arch/arm64/boot/dts/ti/k3-am642-evm.dts | 6 ++++-- arch/arm64/boot/dts/ti/k3-am642-sk.dts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 3e21ec289c76dbc88dc306802122214b6b053a99 Author: Andrew Davis Date: Mon Oct 17 14:25:28 2022 -0500 arm64: dts: ti: k3-am64: Enable PCIe nodes at the board level PCIe nodes defined in the top-level AM64x SoC dtsi files are incomplete and will not be functional unless they are extended with a SerDes PHY. And usually only one of the two modes can be used at a time as they share a SerDes link. As the PHY and mode is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the PCIe nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20221017192532.23825-7-afd@ti.com arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 2 ++ arch/arm64/boot/dts/ti/k3-am642-evm.dts | 2 +- arch/arm64/boot/dts/ti/k3-am642-sk.dts | 8 -------- 3 files changed, 3 insertions(+), 9 deletions(-) commit dcac8eaaa90fe2c84761cf55a3e989ca5774d2f5 Author: Andrew Davis Date: Mon Oct 17 14:25:27 2022 -0500 arm64: dts: ti: k3-am64: Enable ECAP nodes at the board level ECAP nodes defined in the top-level AM64x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. (These and the EPWM nodes could be used to trigger internal actions but they are not used like that currently) As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the ECAP nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20221017192532.23825-6-afd@ti.com arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 3 +++ arch/arm64/boot/dts/ti/k3-am642-evm.dts | 9 +-------- arch/arm64/boot/dts/ti/k3-am642-sk.dts | 9 +-------- 3 files changed, 5 insertions(+), 16 deletions(-) commit ebc0ed718da346d651b356cb71dddfb747c934fa Author: Andrew Davis Date: Mon Oct 17 14:25:26 2022 -0500 arm64: dts: ti: k3-am64: Enable EPWM nodes at the board level EPWM nodes defined in the top-level AM64x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the EPWM nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20221017192532.23825-5-afd@ti.com arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 9 +++++++ arch/arm64/boot/dts/ti/k3-am642-evm.dts | 36 -------------------------- arch/arm64/boot/dts/ti/k3-am642-sk.dts | 44 -------------------------------- 3 files changed, 9 insertions(+), 80 deletions(-) commit 79d4aa623f6c9d47aa29b6b4a3fa46c09f74bfae Author: Andrew Davis Date: Mon Oct 17 14:25:25 2022 -0500 arm64: dts: ti: k3-am64: Enable SPI nodes at the board level SPI nodes defined in the top-level AM64x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the SPI nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20221017192532.23825-4-afd@ti.com arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 5 +++++ arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 2 ++ arch/arm64/boot/dts/ti/k3-am642-evm.dts | 9 +-------- arch/arm64/boot/dts/ti/k3-am642-sk.dts | 8 -------- 4 files changed, 8 insertions(+), 16 deletions(-) commit b80f75d8f68cad4efa250e4a3152932f59c756cc Author: Andrew Davis Date: Mon Oct 17 14:25:24 2022 -0500 arm64: dts: ti: k3-am64: Enable I2C nodes at the board level I2C nodes defined in the top-level AM64x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the I2C nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20221017192532.23825-3-afd@ti.com arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 4 ++++ arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 2 ++ arch/arm64/boot/dts/ti/k3-am642-evm.dts | 9 +-------- arch/arm64/boot/dts/ti/k3-am642-sk.dts | 13 +------------ 4 files changed, 8 insertions(+), 20 deletions(-) commit dacf4705cee54eef4406a886a0a50a6f445969f8 Author: Andrew Davis Date: Mon Oct 17 14:25:23 2022 -0500 arm64: dts: ti: k3-am64: Enable UART nodes at the board level UART nodes defined in the top-level AM64x SoC dtsi files are incomplete and will not be functional unless they are extended with pinmux information. As the pinmux is only known at the board integration level, these nodes should only be enabled when provided with this information. Disable the UART nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20221017192532.23825-2-afd@ti.com arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 7 +++++++ arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 2 ++ arch/arm64/boot/dts/ti/k3-am642-evm.dts | 29 +---------------------------- arch/arm64/boot/dts/ti/k3-am642-sk.dts | 29 +---------------------------- 4 files changed, 11 insertions(+), 56 deletions(-) commit 25dcaf94448f41f1634e8e44f28f37b1aff4bc2c Merge: 0e089bb8b31f 04948e757148 Author: Vinod Koul Date: Fri Oct 28 18:39:28 2022 +0530 Merge branch 'fixes' into next Merge the fixes to next as both carry qmp-phy patches commit 0e089bb8b31f7651d364723122af7ba7be7b98a9 Author: Johan Hovold Date: Mon Oct 24 11:00:41 2022 +0200 phy: qcom-qmp-ufs: add support for updated sc8280xp binding Add support for the new SC8280XP binding. Note that the binding does not try to describe every register subregion and instead the driver holds the corresponding offsets. Also note that the driver will continue to accept the old binding, at least for the time being. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221024090041.19574-11-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 90 +++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 10 deletions(-) commit c64d39b403d8dc751ea6a56f97962f93f811fed4 Author: Johan Hovold Date: Mon Oct 24 11:00:40 2022 +0200 phy: qcom-qmp-ufs: restructure PHY creation In preparation for supporting devicetree bindings which do not use a child node, move the PHY creation to probe() proper and parse the serdes resource in what is now the legacy devicetree helper. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221024090041.19574-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 34 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 18 deletions(-) commit 7741f31ae44568f9c32046aaf4c6c41a51359f6d Author: Johan Hovold Date: Mon Oct 24 11:00:39 2022 +0200 dt-bindings: phy: qcom,qmp-ufs: fix sc8280xp binding The current QMP UFS PHY bindings are based on the original MSM8996 PCIe PHY binding which provided multiple PHYs per IP block and these in turn were described by child nodes. The QMP UFS PHY block only provide a single PHY and the remnant child node does not really reflect the hardware. The original MSM8996 binding also ended up describing the individual register blocks as belonging to either the wrapper node or the PHY child nodes. This is an unnecessary level of detail which has lead to problems when later IP blocks using different register layouts have been forced to fit the original mould rather than updating the binding. The bindings are arguable also incomplete as they only the describe register blocks used by the current Linux drivers. Add a new binding for the UFS QMP PHYs found on SC8280XP which further bindings can be based on. Note that the current binding is simply removed instead of being deprecated as it was only recently merged and support for SC8280XP is still under development. Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221024090041.19574-9-johan+linaro@kernel.org Signed-off-by: Vinod Koul .../bindings/phy/qcom,msm8996-qmp-ufs-phy.yaml | 10 ++- .../bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 83 ++++++++++++++++++++++ 2 files changed, 87 insertions(+), 6 deletions(-) commit 54293c08f2c01efff4a8c1c61290e5f8e34df2df Author: Johan Hovold Date: Mon Oct 24 11:00:38 2022 +0200 dt-bindings: phy: qcom,qmp-ufs: rename current bindings The current QMP UFS PHY bindings are based on the original MSM8996 PCIe PHY binding which provided multiple PHYs per IP block and these in turn were described by child nodes. The QMP UFS PHY block only provide a single PHY and the remnant child node does not really reflect the hardware. The original MSM8996 binding also ended up describing the individual register blocks as belonging to either the wrapper node or the PHY child nodes. This is an unnecessary level of detail which has lead to problems when later IP blocks using different register layouts have been forced to fit the original mould rather than updating the binding. The bindings are arguable also incomplete as they only the describe register blocks used by the current Linux drivers. In preparation for adding new bindings for SC8280XP which further bindings can be based on, rename the current bindings after MSM8996 and add a reference to the SC8280XP bindings. Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221024090041.19574-8-johan+linaro@kernel.org Signed-off-by: Vinod Koul .../phy/{qcom,qmp-ufs-phy.yaml => qcom,msm8996-qmp-ufs-phy.yaml} | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e0a0c761d2203955585b2c93126d6a712726c368 Author: Johan Hovold Date: Mon Oct 24 11:00:37 2022 +0200 phy: qcom-qmp-ufs: clean up PHY init Clean up the PHY initialisation somewhat programming both tx and rx for the second lane after the first lane. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221024090041.19574-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b98e44e608bcb4a2c235b50cc48144e7043595b5 Author: Johan Hovold Date: Mon Oct 24 11:00:36 2022 +0200 phy: qcom-qmp-ufs: rename PHY ops structure Rename the PHY operation structure so that it has a "phy_ops" suffix and move it next to the implementation. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221024090041.19574-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 018dfc99aef2f487f95e07fcbd600e02d290ba18 Author: Johan Hovold Date: Mon Oct 24 11:00:35 2022 +0200 phy: qcom-qmp-ufs: clean up probe initialisation Stop abusing the driver data pointer and instead pass the driver state structure directly to the initialisation helpers during probe. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221024090041.19574-5-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 37 +++++++++++++++------------------ 1 file changed, 17 insertions(+), 20 deletions(-) commit cb2c3d2ee46fe56144b74a22504e023aa59835aa Author: Johan Hovold Date: Mon Oct 24 11:00:34 2022 +0200 phy: qcom-qmp-ufs: clean up device-tree parsing Since the QMP driver split there will be at most a single child node so drop the obsolete iteration construct. While at it, drop the verbose error logging that would have been printed also on probe deferrals. Note that there's no need to check if there are additional child nodes (the kernel is not a devicetree validator), but let's return an error if there are no child nodes at all for now. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221024090041.19574-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit a36032db30deb2235bc18a8f1088c9a801bf66b0 Author: Johan Hovold Date: Mon Oct 24 11:00:33 2022 +0200 phy: qcom-qmp-ufs: merge driver data The UFS QMP PHY driver only manages a single PHY so merge the old qcom_qmp and qmp_phy structures and drop the PHY array. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221024090041.19574-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 171 ++++++++++++-------------------- 1 file changed, 63 insertions(+), 108 deletions(-) commit d907774ed5aab5a33ef4106ea3830e673196313b Author: Johan Hovold Date: Mon Oct 24 11:00:32 2022 +0200 phy: qcom-qmp-ufs: move device-id table Move the device-id table below probe() and next to the driver structure to keep the driver callback functions grouped together. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221024090041.19574-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 78 ++++++++++++++++----------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit de67fa80c66992b13dd018ec18e8c91156522c18 Author: Rob Herring Date: Fri Oct 21 15:39:28 2022 -0500 dt-bindings: memory-controllers: arm,pl353-smc: Extend to support 'arm,pl354' SMC Add support for the Arm PL354 static memory controller to the existing Arm PL353 binding. Both are different configurations of the same IP with support for different types of memory interfaces. The 'arm,pl354' binding has already been in use upstream for a long time in Arm development boards. The existing users have only the controller without any child devices, so drop the required address properties (ranges, #address-cells, #size-cells). The schema for 'ranges' is too constrained as the order is not important and the PL354 has 8 chipselects (And the PL353 actually has up to 8 too). The clocks aren't really correct in either case. There's 1 bus clock and then a clock for each of the 2 memory interfaces. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20221021203928.286169-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski .../{arm,pl353-smc.yaml => arm,pl35x-smc.yaml} | 80 ++++++++++++++-------- 1 file changed, 53 insertions(+), 27 deletions(-) commit 7dd1d57c052e88f98b9e9145461b13bca019d108 Author: Lad Prabhakar Date: Tue Sep 20 19:48:58 2022 +0100 dt-bindings: soc: renesas: renesas.yaml: Document Renesas RZ/Five SoC Document Renesas RZ/Five (R9A07G043) SoC. More info about RZ/Five SoC: https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-mpus/rzfive-risc-v-general-purpose-microprocessors-risc-v-cpu-core-andes-ax45mp-single-10-ghz-2ch-gigabit-ethernet Signed-off-by: Lad Prabhakar Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220920184904.90495-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Documentation/devicetree/bindings/soc/renesas/renesas.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c27ce08b806d606cd5cd0e8252d1ed2b729b5b55 Author: Lad Prabhakar Date: Tue Sep 20 19:48:55 2022 +0100 dt-bindings: soc: renesas: Move renesas.yaml from arm to soc renesas.yaml lists out all the Renesas SoC's and the platforms/EVK's which is either ARM32/ARM64. It would rather make sense if we move renesas.yaml to the soc/renesas folder instead. This is in preparation for adding a new SoC (RZ/Five) from Renesas which is based on RISC-V. While at it drop the old entry for renesas.yaml from MAINTAINERS file and there is no need to update the new file path of renesas.yaml as we already have an entry for Documentation/devicetree/bindings/soc/renesas/ folder. Signed-off-by: Lad Prabhakar Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220920184904.90495-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Documentation/devicetree/bindings/{arm => soc/renesas}/renesas.yaml | 2 +- MAINTAINERS | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 922adfd59efd337059f8445a8d8968552b06ed4e Author: Dmitry Baryshkov Date: Thu Sep 29 22:00:17 2022 +0300 phy: qcom-qmp-usb: correct registers layout for IPQ8074 USB3 PHY According to the kernel 4.4 sources from NHSS.QSDK.9.0.2 and according to hardware docs, the PHY registers layout used for IPQ8074 USB3 PHY is incorrect. This platform uses offset 0x174 for the PCS_STATUS register, 0xd8 for PCS_AUTONOMOUS_MODE_CTRL, etc. Correct the PHY registers layout. Fixes: 94a407cc17a4 ("phy: qcom-qmp: create copies of QMP PHY driver") Fixes: 507156f5a99f ("phy: qcom-qmp: Add USB QMP PHY support for IPQ8074") Signed-off-by: Dmitry Baryshkov Reviewed-by: Kathiravan T Link: https://lore.kernel.org/r/20220929190017.529207-1-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3702cff6d9385565b1ea2670a5623f9695412019 Author: Lad Prabhakar Date: Wed Oct 26 02:42:26 2022 +0100 clk: renesas: rzg2l: Don't assume all CPG_MOD clocks support PM There are cases where not all CPG_MOD clocks should be assumed to support PM. For example on the CRU block there is a particular sequence that needs to be followed to initialize the CSI-2 D-PHY in which individual clocks need to be turned ON/OFF, due to which Runtime PM support wasn't used by the CRU CSI-2 driver. This patch adds support to allow indicating if PM is not supported by the CPG_MOD clocks. Two new members no_pm_mod_clks and num_no_pm_mod_clks are added to struct rzg2l_cpg_info so that MOD clocks which do not support PM can be passed by no_pm_mod_clks[] array and when the driver uses Runtime PM support the clk ID is matched against the no_pm_mod_clks[] array to see if the clk is needed to be included as part of Runtime PM. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20221026014227.162121-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/rzg2l-cpg.c | 39 ++++++++++++++++++++++++--------------- drivers/clk/renesas/rzg2l-cpg.h | 4 ++++ 2 files changed, 28 insertions(+), 15 deletions(-) commit d84ea59e20158ca7a1b6c1dfc3c0e2e652eb4b00 Author: Lad Prabhakar Date: Thu Oct 27 12:24:59 2022 +0100 arm64: renesas: Drop selecting GPIOLIB and PINCTRL Do not automatically select the GPIOLIB and PINCTRL config options as they are already automatically selected as part of the SOC_RENESAS config option in drivers/soc/renesas/Kconfig. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20221027112459.77413-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/Kconfig.platforms | 2 -- 1 file changed, 2 deletions(-) commit d32b93ed0cacf8c256ac197f5da78c326f29b329 Author: Lad Prabhakar Date: Thu Oct 27 12:23:00 2022 +0100 ARM: shmobile: Drop selecting GPIOLIB and PINCTRL Do not automatically select the GPIOLIB and PINCTRL config options as they are already automatically selected as part of the SOC_RENESAS config option in drivers/soc/renesas/Kconfig. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20221027112300.77184-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm/mach-shmobile/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit 47b009db545ae90f0b50149029a6b8137685f524 Author: Johan Hovold Date: Wed Oct 12 10:50:02 2022 +0200 phy: qcom-qmp-usb: drop start and pwrdn-ctrl abstraction Drop the start and pwrdn-ctrl abstractions which are no longer needed since the QMP driver split. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-20-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 61 +++------------------------------ 1 file changed, 5 insertions(+), 56 deletions(-) commit cb4a982fa94a106c3e5d7d9f596375ae442a71ba Author: Johan Hovold Date: Wed Oct 12 10:50:01 2022 +0200 phy: qcom-qmp-ufs: drop start and pwrdn-ctrl abstraction Drop the start and pwrdn-ctrl abstractions which are no longer needed since the QMP driver split. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-19-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 35 +++++++-------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) commit 3d3db6f024e70255899a32323e20561c8c6f5850 Author: Johan Hovold Date: Wed Oct 12 10:50:00 2022 +0200 phy: qcom-qmp-pcie-msm8996: drop start and pwrdn-ctrl abstraction Drop the start and pwrdn-ctrl abstractions which are no longer needed since the QMP driver split. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-18-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 73ad6a9dd51799afd104edc2bf2016a347a717fe Author: Johan Hovold Date: Wed Oct 12 10:49:59 2022 +0200 phy: qcom-qmp-pcie: add config sanity checks The driver expects every configuration to set the pwrdn_ctrl and phy_status masks. Add some probe WARN_ON_ONCE() to probe to catch any new driver support that fails to provide them. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-17-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 3 +++ 1 file changed, 3 insertions(+) commit 5806b87dea8fc1b65a542ef93cbe5f6114157a74 Author: Johan Hovold Date: Wed Oct 12 10:49:58 2022 +0200 phy: qcom-qmp-pcie: drop start-ctrl abstraction All PCIe PHYs need to start and stop the SerDes and PCS so drop the start-ctrl abstraction which is no longer needed since the QMP driver split. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-16-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit d4b81490fe44429203ae6e55df8a556e5b77c88e Author: Johan Hovold Date: Wed Oct 12 10:49:57 2022 +0200 phy: qcom-qmp-combo: drop start and pwrdn-ctrl abstraction All USB PHYs need to start and stop the SerDes and PCS so drop the start-ctrl abstraction which is no longer needed since the QMP driver split. Similarly, drop the pwrdn-ctrl abstraction which also is not needed since the split. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-15-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit 7612890b9df8f3f4f9b4fd39d988a5afd97aa3e7 Author: Johan Hovold Date: Wed Oct 12 10:49:56 2022 +0200 phy: qcom-qmp-usb: increase status polling period It typically takes between one and two milliseconds for the PHY to become ready after starting it. Increase the tight 3--10 us polling period to the more reasonable 51--200 us. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012085002.24099-14-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5ef85adece529a6cd1e7563081c41038923a9ed Author: Johan Hovold Date: Wed Oct 12 10:49:55 2022 +0200 phy: qcom-qmp-usb: clean up status polling Clean up the PHY status polling by dropping the configuration mask which is no longer needed since the QMP driver split. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-13-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) commit 7516edbfaf708e5b987f1b9f23aa7336dd4a812d Author: Johan Hovold Date: Wed Oct 12 10:49:54 2022 +0200 phy: qcom-qmp-ufs: increase ready polling period It typically takes between one and two milliseconds for the PHY to become ready after starting it. Increase the tight 3--10 us polling period to the more reasonable 51--200 us. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012085002.24099-12-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f561b687cf47e289b7e068881ad87530c1f1435 Author: Johan Hovold Date: Wed Oct 12 10:49:53 2022 +0200 phy: qcom-qmp-ufs: clean up ready polling Clean up the PHY ready polling by dropping the mask variables which are no longer needed since the QMP driver split. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-11-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c8f5c188156b87c115f27d44004428ede2e262f8 Author: Johan Hovold Date: Wed Oct 12 10:49:52 2022 +0200 phy: qcom-qmp-ufs: drop unused phy-status config Drop the unused phy-status configuration mask which has never been used for UFS PHYs. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 9 --------- 1 file changed, 9 deletions(-) commit 0c1154d69511a030b8ebb2b873095a7fa851e189 Author: Johan Hovold Date: Wed Oct 12 10:49:51 2022 +0200 phy: qcom-qmp-combo: increase status polling period It typically takes between one and two milliseconds for the PHY to become ready after starting it. Increase the tight 3--10 us polling period to the more reasonable 51--200 us. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012085002.24099-9-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7075f4905e79e340b0e5f0f097c8ce896be8bb3 Author: Johan Hovold Date: Wed Oct 12 10:49:50 2022 +0200 phy: qcom-qmp-combo: clean up status polling Clean up the PHY status polling by dropping the configuration mask which is no longer needed since the QMP driver split. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-8-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 3894f6d03c4e96665232fbe2e04589f1228cbb0c Author: Johan Hovold Date: Wed Oct 12 10:49:49 2022 +0200 phy: qcom-qmp-pcie-msm8996: increase status polling period It typically takes between one and two milliseconds for the PHY to become ready after starting it. Increase the tight 3--10 us polling period to the more reasonable 51--200 us. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012085002.24099-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1a3ae97c2490b2217810a17ab4f47552e9f6f70f Author: Johan Hovold Date: Wed Oct 12 10:49:48 2022 +0200 phy: qcom-qmp-pcie-msm8996: clean up ready and status polling Clean up the PHY ready and status polling by dropping the configuration masks which are no longer needed since the QMP driver split. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 5cbeb75a36aa28353e51f5e6926e19449a4f3389 Author: Johan Hovold Date: Wed Oct 12 10:49:47 2022 +0200 phy: qcom-qmp-pcie: increase status polling period It typically takes between one and two milliseconds for the PHY to become ready after starting it. Increase the tight 3--10 us polling period to the more reasonable 51--200 us. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012085002.24099-5-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2577ba8c39dafe4320e1eb206b732e08bf871c83 Author: Johan Hovold Date: Wed Oct 12 10:49:46 2022 +0200 phy: qcom-qmp-pcie: clean up status polling Clean up the status polling by dropping the ready bit mask which is no longer needed since the QMP driver split. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 30518b19895789aa9101474af2ee0f62cd882d5e Author: Johan Hovold Date: Wed Oct 12 10:49:45 2022 +0200 phy: qcom-qmp-pcie: fix ipq6018 initialisation The phy_status mask was never set for IPQ6018 which meant that the driver would not wait for the PHY to be initialised during power-on and would never detect PHY initialisation timeouts. Fixes: 520264db3bf9 ("phy: qcom-qmp: add QMP V2 PCIe PHY support for ipq60xx") Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 1 + 1 file changed, 1 insertion(+) commit 94b7288eadf6e2c09e6280c65a9d07cca01bf434 Author: Johan Hovold Date: Wed Oct 12 10:49:44 2022 +0200 phy: qcom-qmp-pcie: fix ipq8074-gen3 initialisation The phy_status mask was never set for IPQ8074 (gen3) which meant that the driver would not wait for the PHY to be initialised during power-on and would never detect PHY initialisation timeouts. Fixes: 334fad185415 ("phy: qcom-qmp-pcie: add IPQ8074 PCIe Gen3 QMP PHY support") Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 1 + 1 file changed, 1 insertion(+) commit 4a9eac5ae2200f1b208dd33738777f89f93dc0fe Author: Johan Hovold Date: Wed Oct 12 10:49:43 2022 +0200 phy: qcom-qmp-pcie: fix sc8180x initialisation The phy_status mask was never set for SC8180X which meant that the driver would not wait for the PHY to be initialised during power-on and would never detect PHY initialisation timeouts. Fixes: f839f14e24f2 ("phy: qcom-qmp: Add sc8180x PCIe support") Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012085002.24099-1-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 1 + 1 file changed, 1 insertion(+) commit b9a0be2054964026aa58966ce9724b672f210835 Author: Lad Prabhakar Date: Tue Oct 25 23:06:29 2022 +0100 arm64: dts: renesas: r9a07g043: Split out RZ/G2UL SoC specific parts Move RZ/G2UL SoC specific parts to r9a07g043u.dtsi so that r9a07g043.dtsi can be shared with RZ/Five (RISC-V SoC). Below are the changes due to which SoC specific parts are moved to r9a07g043u.dtsi: - RZ/G2UL has Cortex-A55 (ARM64) whereas RZ/Five has AX45MP (RISC-V), - RZ/G2UL has GICv3 as interrupt controller whereas RZ/Five has PLIC, - RZ/G2UL has interrupts for SYSC block whereas interrupts are missing for SYSC block on RZ/Five, - RZ/G2UL has armv8-timer whereas RZ/Five has riscv-timer, - RZ/G2UL has PSCI whereas RZ/Five have OpenSBI. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20221025220629.79321-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 54 +------------------------- arch/arm64/boot/dts/renesas/r9a07g043u.dtsi | 60 +++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 53 deletions(-) commit 49669da644cf000eb79dbede55bd04acf3f2f0a0 Author: Lad Prabhakar Date: Tue Oct 25 23:06:28 2022 +0100 arm64: dts: renesas: r9a07g043: Introduce SOC_PERIPHERAL_IRQ() macro to specify interrupt property Introduce SOC_PERIPHERAL_IRQ() macro to specify interrupt property so that we can share the common parts of the SoC DTSI with the RZ/Five (RISC-V) SoC and the RZ/G2UL (ARM64) SoC. This patch adds a new file r9a07g043u.dtsi to separate out RZ/G2UL (ARM64) SoC specific parts. No functional changes (same DTB). Signed-off-by: Lad Prabhakar Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20221025220629.79321-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 301 ++++++++++----------- arch/arm64/boot/dts/renesas/r9a07g043u.dtsi | 12 + arch/arm64/boot/dts/renesas/r9a07g043u11-smarc.dts | 2 +- 3 files changed, 163 insertions(+), 152 deletions(-) commit 5b093eb67e36182f3bad4375c79278b7236d3bd7 Author: Geert Uytterhoeven Date: Mon Oct 24 12:06:28 2022 +0200 ARM: dts: renesas: Miscellaneous whitespace fixes Remove superfluous spaces near properties and equal signs. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1666adade07e16b77af1f03c55799b2ad1378e60.1666605877.git.geert+renesas@glider.be arch/arm/boot/dts/r8a7742.dtsi | 2 +- arch/arm/boot/dts/r8a7790.dtsi | 2 +- arch/arm/boot/dts/r8a7791.dtsi | 2 +- arch/arm/boot/dts/r8a7793.dtsi | 2 +- arch/arm/boot/dts/r9a06g032.dtsi | 10 +++++----- 5 files changed, 9 insertions(+), 9 deletions(-) commit a1ca409cc050166a9e8ed183c1d4192f511cf6a2 Author: Geert Uytterhoeven Date: Mon Oct 24 12:03:52 2022 +0200 arm64: dts: renesas: r8a779a0: Update to R-Car Gen4 compatible values Despite the name, R-Car V3U is the first member of the R-Car Gen4 family. Hence update the compatible properties in various device nodes to include family-specific compatible values for R-Car Gen4 instead of R-Car Gen3: - EtherAVB, - MSIOF. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/387168aef20d399d4f4318f4ecab9c3b016fd6f2.1666605756.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 0983529d7513e5417a5010f70582e1040c404551 Author: Vidya Sagar Date: Fri Oct 14 00:08:41 2022 +0530 phy: tegra: p2u: Set ENABLE_L2_EXIT_RATE_CHANGE in calibration Set ENABLE_L2_EXIT_RATE_CHANGE register bit to request UPHY PLL rate change to Gen1 during initialization. This helps in the below surprise link down cases, - Surprise link down happens at Gen3/Gen4 link speed. - Surprise link down happens and external REFCLK is cut off, which causes UPHY PLL rate to deviate to an invalid rate. Signed-off-by: Vidya Sagar Link: https://lore.kernel.org/r/20221013183854.21087-9-vidyas@nvidia.com Signed-off-by: Vinod Koul drivers/phy/tegra/phy-tegra194-p2u.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 38cd167d1fc6b5bf038229b1fa02bb1f551a564f Author: Johan Hovold Date: Wed Oct 12 10:12:41 2022 +0200 phy: qcom-qmp-usb: drop power-down delay config The power-down delay was included in the first version of the QMP driver as an optional delay after powering on the PHY (using POWER_DOWN_CONTROL) and just before starting it. Later changes modified this sequence by powering on before initialising the PHY, but the optional delay stayed where it was (i.e. before starting the PHY). The vendor driver does not use a delay before starting the PHY and this is likely not needed on any platform unless there is a corresponding delay in the vendor kernel init sequence tables (i.e. in devicetree). Let's keep the delay for now, but drop the redundant delay period configuration while increasing the unnecessarily low timer slack somewhat. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012081241.18273-15-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 35 +-------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) commit 898ab85d6b1e8f6271d180c47ef8a024dea9e357 Author: Johan Hovold Date: Wed Oct 12 10:12:40 2022 +0200 phy: qcom-qmp-usb: drop sc8280xp power-down delay The SC8280XP PHY does not need a delay before starting the PHY (which is what the has_pwrdn_delay config option really controls) so drop the unnecessary delay. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012081241.18273-14-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 4 ---- 1 file changed, 4 deletions(-) commit acfee73b635bca04e8a942a162bae0c0cd84b796 Author: Johan Hovold Date: Wed Oct 12 10:12:39 2022 +0200 phy: qcom-qmp-combo: drop power-down delay config The power-down delay was included in the first version of the QMP driver as an optional delay after powering on the PHY (using POWER_DOWN_CONTROL) and just before starting it. Later changes modified this sequence by powering on before initialising the PHY, but the optional delay stayed where it was (i.e. before starting the PHY). The vendor driver does not use a delay before starting the PHY and this is likely not needed on any platform unless there is a corresponding delay in the vendor kernel init sequence tables (i.e. in devicetree). Let's keep the delay for now, but drop the redundant delay period configuration while increasing the unnecessarily low timer slack somewhat. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012081241.18273-13-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit d71eb7083e5eea8ddddab52e9b57a9783603a95f Author: Johan Hovold Date: Wed Oct 12 10:12:38 2022 +0200 phy: qcom-qmp-combo: drop sc8280xp power-down delay The SC8280XP combo PHY does not need a delay before starting the USB PHY (which is what the has_pwrdn_delay config option really controls) so drop the unnecessary delay. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012081241.18273-12-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 4 ---- 1 file changed, 4 deletions(-) commit abc0841666b9ab6568229e6b9816505c987d8a59 Author: Johan Hovold Date: Wed Oct 12 10:12:37 2022 +0200 phy: qcom-qmp-pcie-msm8996: drop power-down delay config The power-down delay was included in the first version of the QMP driver for MSM8996 as an optional delay after powering on the PHY (using POWER_DOWN_CONTROL) and just before starting it. Later changes modified this sequence by powering on before initialising the PHY, but the optional delay stayed where it was (i.e. before starting the PHY). The vendor driver does not use a delay before starting the PHY and this is likely not needed on any platform unless there is a corresponding delay in the vendor kernel init sequence tables (i.e. in devicetree). Let's keep the delay for now, but drop the redundant configuration options while increasing the unnecessarily low timer slack somewhat. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012081241.18273-11-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 51bd33069f80705aba5f4725287bc5688ca6d92a Author: Johan Hovold Date: Wed Oct 12 10:12:36 2022 +0200 phy: qcom-qmp-pcie: replace power-down delay The power-down delay was included in the first version of the QMP driver as an optional delay after powering on the PHY (using POWER_DOWN_CONTROL) and just before starting it. Later changes modified this sequence by powering on before initialising the PHY, but the optional delay stayed where it was (i.e. before starting the PHY). The vendor driver does not use a delay before starting the PHY and this is likely not needed on any platform unless there is a corresponding delay in the vendor kernel init sequence tables (i.e. in devicetree). But as the vendor kernel do have a 1 ms delay *after* starting the PHY and before starting to poll the status it is possible that later contributors have simply not noticed that the mainline power-down delay is not equivalent. As the current delay before even starting the PHY is pretty much pointless and likely a mistake, move the delay after starting the PHY which avoids a few iterations of polling and speeds up startup by 1 ms (the poll loop otherwise takes about 1.8 ms). Note that MSM8998 has never used a power-down delay so add a flag to skip the delay in case starting the PHY is faster on MSM8998. This can be removed after someone takes a measurement. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012081241.18273-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 33 ++++++-------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) commit e71906144b432135b483e228d65be59fbb44c310 Author: Johan Hovold Date: Wed Oct 12 10:12:35 2022 +0200 phy: qcom-qmp-pcie: drop power-down delay config The power-down delay was included in the first version of the QMP driver as an optional delay after powering on the PHY (using POWER_DOWN_CONTROL) and just before starting it. Later changes modified this sequence by powering on before initialising the PHY, but the optional delay stayed where it was (i.e. before starting the PHY). The vendor driver does not use a delay before starting the PHY and this is likely not needed on any platform unless there is a corresponding delay in the vendor kernel init sequence tables (i.e. in devicetree). Let's keep the delay for now, but drop the redundant delay period configuration while increasing the unnecessarily low timer slack somewhat. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012081241.18273-9-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) commit 9d452c3ac257d36740580e5ce2b899bfca99fd62 Author: Johan Hovold Date: Wed Oct 12 10:12:34 2022 +0200 phy: qcom-qmp-usb: drop unused in-layout configuration The QMP USB PHY driver does not use the "in-layout" configuration macro to configure registers that are typically accessed using "regs_layout" arrays (e.g. QPHY_START_CTRL) so drop this unused feature. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221012081241.18273-8-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 42 ++++++++------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) commit 91496846a9e863f7caa2db4a828844746b6f6b32 Author: Johan Hovold Date: Wed Oct 12 10:12:33 2022 +0200 phy: qcom-qmp-ufs: drop unused in-layout configuration The QMP UFS PHY driver does not use the "in-layout" configuration macro to configure registers that are typically accessed using "regs_layout" arrays (e.g. QPHY_START_CTRL) so drop this unused feature. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012081241.18273-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 42 ++++++++------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) commit d3ef88635e318a7cc7e2fc26a58b4e8b56c9fb9b Author: Johan Hovold Date: Wed Oct 12 10:12:32 2022 +0200 phy: qcom-qmp-pcie-msm8996: drop unused in-layout configuration The MSM8996 QMP PCIe PHY driver no longer uses the "in-layout" configuration macro to configure registers that are typically accessed using "regs_layout" arrays (e.g. QPHY_START_CTRL) so drop this unused feature. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012081241.18273-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 34 +++++------------------- 1 file changed, 6 insertions(+), 28 deletions(-) commit f2175762b4ed90048b739b32a739a2df790d4e13 Author: Johan Hovold Date: Wed Oct 12 10:12:31 2022 +0200 phy: qcom-qmp-pcie: drop redundant ipq8074 power on The PCS initialisation table for IPQ8074 includes updates of the reset and start-control registers which is already handled explicitly by the driver during power on. Drop the redundant register write from the IPQ8074 configuration table and along with it the now unused "in-layout" configuration macro and code. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012081241.18273-5-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 42 +++++++------------------------- 1 file changed, 9 insertions(+), 33 deletions(-) commit ccf6f83b1b0bbdcde1ec7c0a35dde014f7101507 Author: Johan Hovold Date: Wed Oct 12 10:12:30 2022 +0200 phy: qcom-qmp-combo: drop unused in-layout configuration The QMP combo PHY driver does not use the "in-layout" configuration macro to configure registers that are typically accessed using "regs_layout" arrays (e.g. QPHY_START_CTRL) so drop this unused feature. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012081241.18273-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 54 ++++++++----------------------- 1 file changed, 14 insertions(+), 40 deletions(-) commit 17302d3630030db09947241451f3d984bc0d3144 Author: Johan Hovold Date: Wed Oct 12 10:12:29 2022 +0200 phy: qcom-qmp: drop superfluous comments Drop some unnecessary or incorrect comments. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012081241.18273-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 4 ---- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 3 --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 3 --- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 3 --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 5 ----- 5 files changed, 18 deletions(-) commit 28d74fc36a3e667b51a437fbf6c45264a0c8f2db Author: Johan Hovold Date: Wed Oct 12 10:12:28 2022 +0200 phy: qcom-qmp: drop regulator error message Regulator core already logs an error message in case requesting a regulator fails so drop the mostly redundant error message from probe. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221012081241.18273-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 3 +-- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 3 +-- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 3 +-- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 3 +-- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) commit 4bd1adb85a09c249ddb4610e8412bf0f4484a371 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:40 2022 -0400 ASoC: SOF: introduce new DEBUG_NOCODEC mode The existing NOCODEC mode enforces a build-time mutual exclusion with the HDaudio link support, mostly to avoid any dependency on the snd_hdac library and references to HDAudio codec/i915 stuff. This is very useful to track dependencies and test a minimal configuration, but very painful for developers and CI: a recompilation and reinstall of the kernel modules is required. This patch suggests an alternate middle ground where the selection of the machine driver and all codec-related actions are bypassed at run-time, contingent on a kernel module parameter being set. For example setting BIT(10) with 'options snd_sof sof_debug=0x401' is enough to switch from an HDaudio card to a nocodec one. This new DEBUG_NOCODEC mode is not suitable for distributions and end-users. It's not even recommended on all platforms, i.e. the NOCODEC mode is known not to work on specific devices where the BIOS did not configure support for I2S/DMIC interfaces. The usual development devices such as Chromebooks, Up boards and Intel RVP are the only recommended platforms where this mode can be supported. Note that the dynamic switch between HDaudio and nocodec may not always possible depending on hardware layout, pin-mux options, and BIOS settings. The audio subsustems on Intel platforms has to support 4 types of interfaces and pin-mux can be complicated. Reviewers might ask: why didn't we do this earlier? The main reason is that all the codec-related configurations were not cleanly separated out in the sof/intel directory. With all the cleanups done recently, adding this opt-in behavior is relatively straightforward. Tested on UpExtreme (WHL) and UpExtreme i11 (TGL). Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-22-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/Kconfig | 18 +++++++++++-- sound/soc/sof/intel/Kconfig | 2 +- sound/soc/sof/intel/hda-codec.c | 59 +++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/sof-audio.c | 5 ++++ sound/soc/sof/sof-priv.h | 3 +++ 5 files changed, 84 insertions(+), 3 deletions(-) commit e8b7479d06d565432f87d684d2876d0b0d1f0210 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:39 2022 -0400 ASoC: SOF: Intel: hda-codec: use GPL-2.0-only license All the HDAudio codec handling is completely specific to Linux and completely dependency on GPL2.0 code, specifically the snd_hdac_ library. There was no intention to have a dual-license for this code, this was an oversight that needs to be corrected. Update the SPDX and EXPORT_SYMBOL information, no functionality change otherwise. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit a4203256e46932e74984c6554d0c502c8994e0b8 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:38 2022 -0400 ASoC: SOF: Intel: hda: clarify Kconfig dependencies Since we've moved to the same flows for HDaudio and iDISP codecs, we need to be more consistent about dependencies. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 10 +++++----- sound/soc/sof/intel/hda.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit 02785b892c2203c08d49811cc67be2775c4e1f32 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:37 2022 -0400 ASoC: SOF: Intel: add hda_bus_ml_free helper Add helper matching allocation done in hda_bus_ml_get_capabilities(). No functionality change, just clearer code partitioning. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-mlink.c | 14 ++++++++++++++ sound/soc/sof/intel/hda.c | 5 ++--- sound/soc/sof/intel/hda.h | 2 ++ 3 files changed, 18 insertions(+), 3 deletions(-) commit f402a974aa0ae2b9abcccf49d5ac7c093e86a073 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:36 2022 -0400 ASoC: SOF: Intel: hda-mlink: add helpers to suspend/resume links No functionality change, just move the code in hda-mlink. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 36 ++++++++++-------------------------- sound/soc/sof/intel/hda-mlink.c | 21 +++++++++++++++++++++ sound/soc/sof/intel/hda.h | 4 ++++ 3 files changed, 35 insertions(+), 26 deletions(-) commit afae09429956b9481d0788385c90238d8d2d038f Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:35 2022 -0400 ASoC: SOF: Intel: clarify bus_init and bus_exit sequences The dependencies are on SND_SOC_SOF_HDA_AUDIO_CODEC and the bus_exit sequence should be well identified. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-bus.c | 23 +++++++++++++++-------- sound/soc/sof/intel/hda.c | 7 +++---- sound/soc/sof/intel/hda.h | 3 ++- 3 files changed, 20 insertions(+), 13 deletions(-) commit 3400afcf6800af0be25bf076862dce9a8eac776e Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:34 2022 -0400 ASoC: SOF: Intel: hda-codec: add helpers to suspend and resume cmd_io No functionality change, code move to have better split between HDaudio codec management and core parts. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 21 +++++++++++++++++++++ sound/soc/sof/intel/hda-dsp.c | 10 ++++------ sound/soc/sof/intel/hda.h | 4 ++++ 3 files changed, 29 insertions(+), 6 deletions(-) commit d191009f77d8ef53d3b75959a4d7db9fcc0ed1d1 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:33 2022 -0400 ASoC: SOF: Intel: hda-dsp: clarify dependencies on SND_SOC_SOF_HDA IS_ENABLED is not always in the right places, the codec parts depend on SND_SOC_SOF_HDAUDIO_CODEC Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5079aa924fadb9fd811d1a465f034681fe1d074c Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:32 2022 -0400 ASoC: SOF: Intel: hda-ctrl: use helper to clear RIRB status Change to use helper and avoid conditional compilation. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-ctrl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 87f4230047fc1960377875ff1f1b8f60f736f698 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:31 2022 -0400 ASoC: SOF: Intel: hda-codec: add hda_codec_check_rirb_status() helper move existing functionality to new helper. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 23 +++++++++++++++++++++++ sound/soc/sof/intel/hda-stream.c | 19 +------------------ sound/soc/sof/intel/hda.h | 2 ++ 3 files changed, 26 insertions(+), 18 deletions(-) commit 8da5bceb8c4a8d5c06807b32cea94b278e925d22 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:30 2022 -0400 ASoC: SOF: Intel: hda-stream: always allocate CORB/RIRB buffer There is no real reason to filter out this allocation at build time. Let's allocate it always, so that we can have a more dynamic way of disabling HDaudio codec support without having to recompile. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit bf2d764b84abfd880eee50d6982dade9224d1734 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:29 2022 -0400 ASoC: SOF: Intel: hda-codec: add stop_cmd_io helper One more helper to split controller and codec Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 9 +++++++++ sound/soc/sof/intel/hda-ctrl.c | 6 ++---- sound/soc/sof/intel/hda.h | 2 ++ 3 files changed, 13 insertions(+), 4 deletions(-) commit d4bfba1e754678c51602898ea71570cf6b7cd284 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:28 2022 -0400 ASoC: SOF: Intel: hda-codec: add hda_codec_device_remove() helper Continue split between controller and codec. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 9 +++++++++ sound/soc/sof/intel/hda.c | 5 +---- sound/soc/sof/intel/hda.h | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) commit 3246a6c9f09eb244c1f9111a288ab010df2be6de Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:27 2022 -0400 ASoC: SOF: Intel: hda-ctrl: add codec wakeup helper Add new helper in hda-codec.c for a clean split between controller and codec. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 8 ++++++++ sound/soc/sof/intel/hda-ctrl.c | 10 ++++------ sound/soc/sof/intel/hda.h | 2 ++ 3 files changed, 14 insertions(+), 6 deletions(-) commit ad09e4465844547c5046e66025b5a468345a96a5 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:26 2022 -0400 ASoC: SOF: Intel: move all RIRB/CMD_IO helpers to hda-codec.c We need to split basic stream functionality from RIRB/CORB, which are completely codec-related. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 43 +++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/intel/hda-ctrl.c | 33 +++---------------------------- sound/soc/sof/intel/hda.h | 6 ++++++ 3 files changed, 52 insertions(+), 30 deletions(-) commit 1a7d06ae5dfbaa3dcd801826933531602754338f Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:25 2022 -0400 ASoC: SOF: Intel: hda: add multi-link helper for LOSVID Add new helper to deal with LOSVID. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-ctrl.c | 9 +-------- sound/soc/sof/intel/hda-mlink.c | 9 +++++++++ sound/soc/sof/intel/hda.h | 2 ++ 3 files changed, 12 insertions(+), 8 deletions(-) commit 52f1610370e3a283adc7bf2b39311be7865f671c Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:24 2022 -0400 ASoC: SOF: Intel: start moving multi-link handling in dedicated file The multi-link handling needs to be handled with dedicated helpers before cleanups and extensions. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/Makefile | 2 +- sound/soc/sof/intel/hda-mlink.c | 45 +++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.c | 15 +++----------- sound/soc/sof/intel/hda.h | 12 +++++++++++ 4 files changed, 61 insertions(+), 13 deletions(-) commit 580803a70332f6858245498aaf32f59011d8715b Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:23 2022 -0400 ASoC: SOF: Intel: move codec state change to hda-codec.c The codec_mask and codec-related handling should depend on SOF_HDA_AUDIO_CODEC, not SOF_HDA. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 13 +++++++++++++ sound/soc/sof/intel/hda.c | 16 +--------------- sound/soc/sof/intel/hda.h | 2 ++ 3 files changed, 16 insertions(+), 15 deletions(-) commit dc1d964a44dd9eb236f4e98b7b1eaa776093ca8b Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:22 2022 -0400 ASoC: SOF: Intel: hda-codec: simplify SND_SOC_SOF_HDA_AUDIO_CODEC handling Now that we have removed the dependency on SND_SOC_HDAC_HDMI, we can simplify the code and make the code conditional on a single #ifdef. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 37 ++++++++++++------------------------- sound/soc/sof/intel/hda.h | 10 ++++++++-- 2 files changed, 20 insertions(+), 27 deletions(-) commit 2c6c809cc00b71b3195d76a69d603cc761716ab7 Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:21 2022 -0400 ASoC: SOF: Intel: remove all dependencies on SND_SOC_HDAC_HDMI remove all dependencies on SND_SOC_HDAC_HDMI and clean-up ifdefs. The machine driver still supports this configuration used by the Skylake driver. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 3 +-- sound/soc/sof/intel/hda.h | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) commit 834c69d3b849625d5c5bb81a3425fc8deef5f16d Author: Pierre-Louis Bossart Date: Thu Oct 27 15:35:20 2022 -0400 ASoC: SOF: Intel: remove option to disable the common_hdmi handling We've been using the same option for quite some time now, it's time to remove the kernel parameter to disable the common HDaudio codec handling. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221027193540.259520-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 12 +++--------- sound/soc/sof/intel/hda.c | 10 ++-------- sound/soc/sof/intel/hda.h | 6 ++---- 3 files changed, 7 insertions(+), 21 deletions(-) commit 758ba92f3a2f86493a9147abd31a5bdc0befc273 Author: Cezary Rojewski Date: Thu Oct 27 14:47:02 2022 +0200 ASoC: Intel: avs: Enact power gating policy Update all firmware loading functions to also account for the power gating policy. As module loading routine is missing the chicken bits manipulation entirely, add the entire set there. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221027124702.1761002-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/loader.c | 10 ++++++++++ sound/soc/intel/avs/pcm.c | 2 ++ 2 files changed, 12 insertions(+) commit 2a87f17775c1cbcfb99225312e8cc7a06aa109b9 Author: Cezary Rojewski Date: Thu Oct 27 14:47:01 2022 +0200 ASoC: Intel: avs: Power and clock gating policy overriding Provide pgctl/cgctl_mask module parameters for overriding power and clock gating policies respectively. These help deal with rare firmware loading failures on some configurations. There're no golden masks that cover all known problems so leave the defaults as is. While at it, update avs_hda_l1sen_enable()'s definition so it aligns with its power/clock friends. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221027124702.1761002-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/core.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit d56829e9c1cb90044c07337fe90a9828fdb165c0 Author: Piotr Maziarz Date: Thu Oct 27 14:47:00 2022 +0200 ASoC: Intel: avs: Standby power-state support Introduce avs_suspend_standby() and avs_resume_standby() to support S0IX streaming. The AudioDSP is not shutdown during such scenario and the PCI device is armed for possible wake operation through an audio event. As capability for a stream to be active during low power S0 is based off of ->ignore_suspend, adjust the field's value according to platform capabilities if needed. Signed-off-by: Piotr Maziarz Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221027124702.1761002-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/avs.h | 7 ++++ sound/soc/intel/avs/core.c | 75 ++++++++++++++++++++++++++++++++++++++---- sound/soc/intel/avs/topology.c | 10 ++++++ 3 files changed, 85 insertions(+), 7 deletions(-) commit 730cb320ec2973fb2aea72ea27f7edc6a847a664 Author: Cezary Rojewski Date: Thu Oct 27 14:46:59 2022 +0200 ASoC: Intel: avs: Count low power streams Streaming in S0iX differs from SX scenarios. Store the number of so-called low-power streams to be able to differentiate between the two. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221027124702.1761002-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/avs.h | 1 + sound/soc/intel/avs/pcm.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) commit eb0699c4cd6e32d5e2bfc9356ab9e19a6164c94e Author: Cezary Rojewski Date: Thu Oct 27 14:46:58 2022 +0200 ASoC: Intel: avs: Restart instead of resuming HDA capture streams Resuming of capture streams for HD-Audio is unsupported so remove the relevant flag from the hardware params when assigning them during avs_component_hda_open(). Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221027124702.1761002-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/pcm.c | 50 ++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 22 deletions(-) commit 8e097f9a5529f0e6af30e1fac0d4e2a97c241392 Author: Amadeusz Sławiński Date: Thu Oct 27 14:46:57 2022 +0200 ASoC: Intel: avs: Handle SUSPEND and RESUME triggers With power management operations added, service SUSPEND and RESUME trigger commands for running streams. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221027124702.1761002-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/pcm.c | 75 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 60 insertions(+), 15 deletions(-) commit efffb014478e76c35b1a9e279d7010f70ff517e2 Author: Cezary Rojewski Date: Thu Oct 27 14:46:56 2022 +0200 ALSA: hda: Introduce snd_hdac_stream_wait_drsm() Allow for waiting for DRSM bit for specified stream to be cleared from HDAudio library level. Drivers may utilize this optional step during the stream resume procedure. Suggested-by: Pierre-Louis Bossart Signed-off-by: Cezary Rojewski Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20221027124702.1761002-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown include/sound/hdaudio.h | 1 + sound/hda/hdac_stream.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) commit 2b9a50ea845ebe95473f5b85dfcc9b806c252fac Author: Cezary Rojewski Date: Thu Oct 27 14:46:55 2022 +0200 ASoC: Intel: avs: Introduce PCM power management routines Implement suspend/resume() operations for component drivers. For most scenarios, the PM flow is similar to standard streaming one, except for the part where the position register are being saved and the lack of PCM pages freeing. To reduce code duplication, all avs_dai_suspend_XXX() and avs_dai_resume_XXX() functions reuse their non-PM equivalents. Given that path binding/unbinding happens only in FE part of the stream, the order of suspend() goes: 1. hw_free() all FE DAIs, paths are unbound here 2. hw_free() all BE DAIs Consequently, for resume() its: 1. hw_params() all BE DAIs 2. hw_params() all FE DAIs, paths are bound here 3. prepare() all BE DAIs 4. prepare() all FE DAIs As component->suspend/resume() do not provide substream pointer, store it ourselves so that the PM flow has all the necessary information to proceed. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221027124702.1761002-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown include/sound/hdaudio_ext.h | 5 ++ sound/soc/intel/avs/pcm.c | 214 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 215 insertions(+), 4 deletions(-) commit 0abfc84ba22aca05a5268128f719386648351020 Author: Cezary Rojewski Date: Thu Oct 27 14:46:54 2022 +0200 ASoC: Intel: avs: Split pcm pages freeing operation from hw_free() Prepare for introduction of PCM power management support. As freeing pages during the suspend operation is not desired, separate snd_pcm_lib_free_pages() from existing avs_dai_fe_hw_free() so that majority of the code found within it can be reused for standard and PM flows both. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221027124702.1761002-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/pcm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 107d170dc46e14cfa575d1b995107ef2f2e51dfe Author: Shengjiu Wang Date: Fri Oct 28 15:03:47 2022 +0800 ASoC: fsl_xcvr: Add Counter registers These counter registers are part of register list, add them to complete the register map - DMAC counter control registers - Data path Timestamp counter register - Data path bit counter register - Data path bit count timestamp register - Data path bit read timestamp register Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1666940627-7611-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_xcvr.c | 40 ++++++++++++++++++++++++++++++++++++++++ sound/soc/fsl/fsl_xcvr.h | 21 +++++++++++++++++++++ 2 files changed, 61 insertions(+) commit a6ebd538364b1e9e6048faaafbc0188172ed50c3 Author: Ville Syrjälä Date: Wed Oct 26 13:11:34 2022 +0300 drm/i915/sdvo: Fix debug print Correctly indicate which outputs we support in the debug print. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026101134.20865-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_sdvo.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 79708d142e65c59656aa231aa98e00334ced89a5 Author: Ville Syrjälä Date: Wed Oct 26 13:11:33 2022 +0300 drm/i915/sdvo: Reduce copy-pasta in output setup Avoid having to call the output init function for each output type separately. We can just call the right one based on the "class" of the output. Technically we could just walk the bits of the bitmask but that could change the order in which we initialize the outputs. To avoid any behavioural changes keep to the same explicit probe order as before. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026101134.20865-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_sdvo.c | 66 +++++++++++++++---------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit 739f8dbccf530277e3781a6a352018e972208522 Author: Ville Syrjälä Date: Wed Oct 26 13:11:32 2022 +0300 drm/i915/sdvo: Get rid of the output type<->device index stuff Get rid of this silly output type<->device index back and forth and just pass the output type directly to the corresponding output init function. This was already being done for TV outputs anyway. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026101134.20865-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_sdvo.c | 47 +++++++++++++------------------ 1 file changed, 19 insertions(+), 28 deletions(-) commit 5e52622efb916f3185045283a0203e9b00f8175b Author: Ville Syrjälä Date: Wed Oct 26 13:11:31 2022 +0300 drm/i915/sdvo: Don't add DDC modes for LVDS Stop enumerating the DDC modes for SDVO LVDS outputs (outside the initial fixed mode setup). intel_panel_mode_valid() will just reject most of them anyway, and any left over are entirely pointless as they'll match the fixed mode hdisp+vdisp+vrefresh so no user visible effect from using them instead of the fixed mode. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026101134.20865-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_sdvo.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit aa7d827b0c9781d7dc73dc1f793734716b75395b Author: Ville Syrjälä Date: Wed Oct 26 13:11:30 2022 +0300 drm/i915/sdvo: Simplify output setup debugs Get rid of this funny byte based dumping of invalid output flags and just dump it as a single hex numbers. Also do that early since all the rest is going to get skipped anyway of the thing is zero. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026101134.20865-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_sdvo.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit a3cd4f447281c56377de2ee109327400eb00668d Author: Ville Syrjälä Date: Wed Oct 26 13:11:29 2022 +0300 drm/i915/sdvo: Grab mode_config.mutex during LVDS init to avoid WARNs drm_mode_probed_add() is unhappy about being called w/o mode_config.mutex. Grab it during LVDS fixed mode setup to silence the WARNs. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7301 Fixes: aa2b88074a56 ("drm/i915/sdvo: Fix multi function encoder stuff") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026101134.20865-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_sdvo.c | 4 ++++ 1 file changed, 4 insertions(+) commit 64b7b557dc8a96d9cfed6aedbf81de2df80c025d Author: Ville Syrjälä Date: Wed Oct 26 13:11:28 2022 +0300 drm/i915/sdvo: Setup DDC fully before output init Call intel_sdvo_select_ddc_bus() before initializing any of the outputs. And before that is functional (assuming no VBT) we have to set up the controlled_outputs thing. Otherwise DDC won't be functional during the output init but LVDS really needs it for the fixed mode setup. Note that the whole multi output support still looks very bogus, and more work will be needed to make it correct. But for now this should at least fix the LVDS EDID fixed mode setup. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7301 Fixes: aa2b88074a56 ("drm/i915/sdvo: Fix multi function encoder stuff") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026101134.20865-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_sdvo.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit cc1e66394daaa7e9f005e2487a84e34a39f9308b Author: Ville Syrjälä Date: Wed Oct 26 13:11:27 2022 +0300 drm/i915/sdvo: Filter out invalid outputs more sensibly We try to filter out the corresponding xxx1 output if the xxx0 output is not present. But the way that is being done is pretty awkward. Make it less so. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026101134.20865-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_sdvo.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit cf43cd33b67a291fadcd16b1ad2f435bd2e60749 Author: Srinivas Kandagatla Date: Wed Oct 26 12:02:10 2022 +0100 soundwire: qcom: add support for v1.7 Soundwire Controller This patch add support for v1.7 SoundWire Controller which has support for Multi-EE (Execution Environment), resulting in a new register and extending field in BUS_CTRL register. With these updates v1.7.0 is fully supported. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221026110210.6575-7-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul drivers/soundwire/qcom.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit df73f66c7dd4474a05e07f911427043bc32cff31 Author: Srinivas Kandagatla Date: Wed Oct 26 12:02:09 2022 +0100 dt-bindings: soundwire: qcom: add v1.7.0 support Signed-off-by: Srinivas Kandagatla Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221026110210.6575-6-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul Documentation/devicetree/bindings/soundwire/qcom,sdw.txt | 1 + 1 file changed, 1 insertion(+) commit 1cdbfd4c9dc95d9b1e6bcbeba71cfdc70732b50e Author: Srinivas Kandagatla Date: Wed Oct 26 12:02:08 2022 +0100 soundwire: qcom: make reset optional for v1.6 controller On Some Qualcomm SOCs like sc8280xp which uses v1.6 soundwire controller reset is not mandatory, so make this an optional one. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221026110210.6575-5-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul drivers/soundwire/qcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b39301ee1f268c89bd2a8eae257b7d2f50308598 Author: Srinivas Kandagatla Date: Wed Oct 26 12:02:07 2022 +0100 soundwire: qcom: remove unused SWRM_SPECIAL_CMD_ID Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20221026110210.6575-4-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul drivers/soundwire/qcom.c | 1 - 1 file changed, 1 deletion(-) commit fc04142894d1d970e21c6ab3ab663aa51c5a8b7b Author: Maxime Ripard Date: Thu Oct 27 14:52:47 2022 +0200 drm/vc4: Make sure we don't end up with a core clock too high Following the clock rate range improvements to the clock framework, trying to set a disjoint range on a clock will now result in an error. Thus, we can't set a minimum rate higher than the maximum reported by the firmware, or clk_set_min_rate() will fail. Thus we need to clamp the rate we are about to ask for to the maximum rate possible on that clock. Reviewed-by: Dave Stevenson Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v5-7-fe9e7ac8b111@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_kms.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit f09e172da85854d71284638d8ca25f0b3a980cb6 Author: Dom Cobley Date: Thu Oct 27 14:52:46 2022 +0200 drm/vc4: hdmi: Add more checks for 4k resolutions At least the 4096x2160@60Hz mode requires some overclocking that isn't available by default, even if hdmi_enable_4kp60 is enabled. Let's add some logic to detect whether we can satisfy the core clock requirements for that mode, and prevent it from being used otherwise. Signed-off-by: Dom Cobley Reviewed-by: Dave Stevenson Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v5-6-fe9e7ac8b111@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_drv.h | 6 ++++++ drivers/gpu/drm/vc4/vc4_hdmi.c | 11 +++++++++-- drivers/gpu/drm/vc4/vc4_hvs.c | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) commit 2a001ca00ad55fd9e0fc96d84f57b894a4c34388 Author: Maxime Ripard Date: Thu Oct 27 14:52:45 2022 +0200 drm/vc4: hdmi: Rework hdmi_enable_4kp60 detection code In order to support higher HDMI frequencies, users have to set the hdmi_enable_4kp60 parameter in their config.txt file. This will have the side-effect of raising the maximum of the core clock, tied to the HVS, and managed by the HVS driver. However, we are querying this in the HDMI driver by poking into the HVS structure to get our struct clk handle. Let's make this part of the HVS bind implementation to have all the core clock related setup in the same place. Reviewed-by: Dave Stevenson Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v5-5-fe9e7ac8b111@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_drv.h | 10 ++++++++++ drivers/gpu/drm/vc4/vc4_hdmi.c | 15 ++++----------- drivers/gpu/drm/vc4/vc4_hdmi.h | 8 -------- drivers/gpu/drm/vc4/vc4_hvs.c | 23 +++++++++++++++++++++++ 4 files changed, 37 insertions(+), 19 deletions(-) commit dd51d3a33c10925b20d4b9b665a6f4a65f24ca67 Author: Maxime Ripard Date: Thu Oct 27 14:52:44 2022 +0200 drm/vc4: hdmi: Fix hdmi_enable_4kp60 detection In order to support higher HDMI frequencies, users have to set the hdmi_enable_4kp60 parameter in their config.txt file. We were detecting this so far by calling clk_round_rate() on the core clock with the frequency we're supposed to run at when one of those modes is enabled. Whether or not the parameter was enabled could then be inferred by the returned rate since the maximum clock rate reported by the firmware was one of the side effect of setting that parameter. However, the recent clock rework we did changed what clk_round_rate() was returning to always return the minimum allowed, and thus this test wasn't reliable anymore. Let's use the new clk_get_max_rate() function to reliably determine the maximum rate allowed on that clock and fix the 4k@60Hz output. Fixes: e9d6cea2af1c ("clk: bcm: rpi: Run some clocks at the minimum rate allowed") Reviewed-by: Dave Stevenson Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v5-4-fe9e7ac8b111@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 40c31955e4e9ff268d21c0a8009e35f4cfaa167c Author: Maxime Ripard Date: Thu Oct 27 14:52:43 2022 +0200 firmware: raspberrypi: Provide a helper to query a clock max rate The firmware allows to query for its clocks the operating range of a given clock. We'll need this for some drivers (KMS, in particular) to infer the state of some configuration options, so let's create a function to do so. Acked-by: Stephen Boyd Reviewed-by: Florian Fainelli Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v5-3-fe9e7ac8b111@cerno.tech Signed-off-by: Maxime Ripard drivers/firmware/raspberrypi.c | 20 ++++++++++++++++++++ include/soc/bcm2835/raspberrypi-firmware.h | 26 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit d0cde9b3b0cae06f5998f6d3936e90a80d05b2ec Author: Maxime Ripard Date: Thu Oct 27 14:52:42 2022 +0200 firmware: raspberrypi: Move the clock IDs to the firmware header We'll need the clock IDs in more drivers than just the clock driver from now on, so let's move them in the firmware header. Reviewed-by: Florian Fainelli Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v5-2-fe9e7ac8b111@cerno.tech Signed-off-by: Maxime Ripard drivers/clk/bcm/clk-raspberrypi.c | 19 ------------------- include/soc/bcm2835/raspberrypi-firmware.h | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) commit bc63897bc33b81897c7f8f5965c8f9326457d082 Author: Maxime Ripard Date: Thu Oct 27 14:52:41 2022 +0200 firmware: raspberrypi: Introduce rpi_firmware_find_node() A significant number of RaspberryPi drivers using the firmware don't have a phandle to it, so end up scanning the device tree to find a node with the firmware compatible. That code is duplicated everywhere, so let's introduce a helper instead. Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v5-1-fe9e7ac8b111@cerno.tech Signed-off-by: Maxime Ripard drivers/firmware/raspberrypi.c | 18 ++++++++++++------ include/soc/bcm2835/raspberrypi-firmware.h | 7 +++++++ 2 files changed, 19 insertions(+), 6 deletions(-) commit f7adeea9ebdbf73454f083c21de57579e982f2a1 Merge: 20eb0cf9a3c1 cb2144d66b0b Author: Christian Brauner Date: Fri Oct 28 12:50:50 2022 +0200 Merge branch 'fs.acl.rework' into for-next commit cb2144d66b0b24fd1b880fc72678ba21ca414dab Author: Christian Brauner Date: Fri Oct 28 12:45:10 2022 +0200 cifs: check whether acl is valid early Dan reported that acl is dereferenced before being checked and this is a valid problem. Fix it be erroring out early instead of doing it later after we've already relied on acl to be a valid pointer. Fixes: dc1af4c4b472 ("cifs: implement set acl method") Reported-by: Dan Carpenter Signed-off-by: Christian Brauner (Microsoft) fs/cifs/cifsacl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 610b17b05c5c682fbb8fefedae1aacaab412eac3 Author: Bo Liu Date: Tue Oct 25 21:06:34 2022 -0400 audit: Fix some kernel-doc warnings The current code provokes some kernel-doc warnings: security/lsm_audit.c:198: warning: Function parameter or member 'ab' not described in 'dump_common_audit_data' Signed-off-by: Bo Liu [PM: description line wrap] Signed-off-by: Paul Moore security/lsm_audit.c | 1 + 1 file changed, 1 insertion(+) commit f8f797f35a9ababcf763b7a3984aff41fdd3f064 Author: Dmitry Torokhov Date: Thu Oct 27 00:34:02 2022 -0700 nfc: s3fwrn5: use devm_clk_get_optional_enabled() helper Because we enable the clock immediately after acquiring it in probe, we can combine the 2 operations and use devm_clk_get_optional_enabled() helper. Signed-off-by: Dmitry Torokhov Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller drivers/nfc/s3fwrn5/i2c.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 92c7076e4adad286c7fff53c57c33e6dadb190fd Merge: 957ed5e7129f d21d2c7f586c Author: David S. Miller Date: Fri Oct 28 11:25:53 2022 +0100 Merge branch 'txgbe' Jiawen Wu says: ==================== net: WangXun txgbe ethernet driver This patch series adds support for WangXun 10 gigabit NIC, to initialize hardware, set mac address, and register netdev. Change log: v6: address comments: Jakub Kicinski: check with scripts/kernel-doc v5: address comments: Jakub Kicinski: clean build with W=1 C=1 v4: address comments: Andrew Lunn: https://lore.kernel.org/all/YzXROBtztWopeeaA@lunn.ch/ v3: address comments: Andrew Lunn: remove hw function ops, reorder functions, use BIT(n) for register bit offset, move the same code of txgbe and ngbe to libwx v2: address comments: Andrew Lunn: https://lore.kernel.org/netdev/YvRhld5rD%2FxgITEg@lunn.ch/ ==================== Signed-off-by: David S. Miller commit d21d2c7f586cec0a735031a8a60276a990684e4c Author: Jiawen Wu Date: Thu Oct 27 14:11:16 2022 +0800 net: txgbe: Set MAC address and register netdev Add MAC address related operations, and register netdev. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller drivers/net/ethernet/wangxun/libwx/wx_hw.c | 231 +++++++++++++++++++- drivers/net/ethernet/wangxun/libwx/wx_hw.h | 6 + drivers/net/ethernet/wangxun/libwx/wx_type.h | 37 ++++ drivers/net/ethernet/wangxun/txgbe/txgbe.h | 13 ++ drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c | 13 ++ drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 270 +++++++++++++++++++++++- drivers/net/ethernet/wangxun/txgbe/txgbe_type.h | 3 + 7 files changed, 566 insertions(+), 7 deletions(-) commit b08012568ebb2098015dac3fcde78a20c09d838e Author: Jiawen Wu Date: Thu Oct 27 14:11:15 2022 +0800 net: txgbe: Reset hardware Reset and initialize the hardware by configuring the MAC layer. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller drivers/net/ethernet/wangxun/libwx/wx_hw.c | 160 ++++++++++++++++++++++++ drivers/net/ethernet/wangxun/libwx/wx_hw.h | 2 + drivers/net/ethernet/wangxun/libwx/wx_type.h | 146 +++++++++++++++++++++ drivers/net/ethernet/wangxun/txgbe/Makefile | 3 +- drivers/net/ethernet/wangxun/txgbe/txgbe.h | 5 +- drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c | 86 +++++++++++++ drivers/net/ethernet/wangxun/txgbe/txgbe_hw.h | 9 ++ drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 21 ++++ drivers/net/ethernet/wangxun/txgbe/txgbe_type.h | 11 +- 9 files changed, 434 insertions(+), 9 deletions(-) commit a34b3e6ed8fbf668f995abdfd410784c695b6d03 Author: Jiawen Wu Date: Thu Oct 27 14:11:14 2022 +0800 net: txgbe: Store PCI info Get PCI config space info, set LAN id and check flash status. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller drivers/net/ethernet/wangxun/Kconfig | 6 ++ drivers/net/ethernet/wangxun/Makefile | 1 + drivers/net/ethernet/wangxun/libwx/Makefile | 7 ++ drivers/net/ethernet/wangxun/libwx/wx_hw.c | 88 +++++++++++++++++++++ drivers/net/ethernet/wangxun/libwx/wx_hw.h | 10 +++ drivers/net/ethernet/wangxun/libwx/wx_type.h | 54 +++++++++++++ drivers/net/ethernet/wangxun/txgbe/txgbe.h | 4 + drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 101 +++++++++++++++++++++++- drivers/net/ethernet/wangxun/txgbe/txgbe_type.h | 19 ++--- 9 files changed, 280 insertions(+), 10 deletions(-) commit 957ed5e7129f2ce85dd76e4cdce749388295467d Merge: 7f86cf50cfa6 71fc704768f6 Author: David S. Miller Date: Fri Oct 28 10:47:42 2022 +0100 Merge branch 'tcp-plb' Mubashir Adnan Qureshi says: ==================== net: Add PLB functionality to TCP This patch series adds PLB (Protective Load Balancing) to TCP and hooks it up to DCTCP. PLB is disabled by default and can be enabled using relevant sysctls and support from underlying CC. PLB (Protective Load Balancing) is a host based mechanism for load balancing across switch links. It leverages congestion signals(e.g. ECN) from transport layer to randomly change the path of the connection experiencing congestion. PLB changes the path of the connection by changing the outgoing IPv6 flow label for IPv6 connections (implemented in Linux by calling sk_rethink_txhash()). Because of this implementation mechanism, PLB can currently only work for IPv6 traffic. For more information, see the SIGCOMM 2022 paper: https://doi.org/10.1145/3544216.3544226 ==================== Signed-off-by: David S. Miller commit 71fc704768f601ed3fa36310822a5e03f310f781 Author: Mubashir Adnan Qureshi Date: Wed Oct 26 13:51:15 2022 +0000 tcp: add rcv_wnd and plb_rehash to TCP_INFO rcv_wnd can be useful to diagnose TCP performance where receiver window becomes the bottleneck. rehash reports the PLB and timeout triggered rehash attempts by the TCP connection. Signed-off-by: Mubashir Adnan Qureshi Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller include/uapi/linux/tcp.h | 5 +++++ net/ipv4/tcp.c | 2 ++ 2 files changed, 7 insertions(+) commit 29c1c44646aec5d5134f2365259a84becc1ee7d3 Author: Mubashir Adnan Qureshi Date: Wed Oct 26 13:51:14 2022 +0000 tcp: add u32 counter in tcp_sock and an SNMP counter for PLB A u32 counter is added to tcp_sock for counting the number of PLB triggered rehashes for a TCP connection. An SNMP counter is also added to count overall PLB triggered rehash events for a host. These counters are hooked up to PLB implementation for DCTCP. TCP_NLA_REHASH is added to SCM_TIMESTAMPING_OPT_STATS that reports the rehash attempts triggered due to PLB or timeouts. This gives a historical view of sustained congestion or timeouts experienced by the TCP connection. Signed-off-by: Mubashir Adnan Qureshi Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/tcp.h | 1 + include/uapi/linux/snmp.h | 1 + include/uapi/linux/tcp.h | 1 + net/ipv4/proc.c | 1 + net/ipv4/tcp.c | 3 +++ net/ipv4/tcp_plb.c | 2 ++ 6 files changed, 9 insertions(+) commit c30f8e0b048087ffbf20e51a4be160f7ec279ff6 Author: Mubashir Adnan Qureshi Date: Wed Oct 26 13:51:13 2022 +0000 tcp: add support for PLB in DCTCP PLB support is added to TCP DCTCP code. As DCTCP uses ECN as the congestion signal, PLB also uses ECN to make decisions whether to change the path or not upon sustained congestion. Signed-off-by: Mubashir Adnan Qureshi Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_dctcp.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 1a91bb7c3ebf95e908ec33220defbcda1ecc072f Author: Mubashir Adnan Qureshi Date: Wed Oct 26 13:51:12 2022 +0000 tcp: add PLB functionality for TCP Congestion control algorithms track PLB state and cause the connection to trigger a path change when either of the 2 conditions is satisfied: - No packets are in flight and (# consecutive congested rounds >= sysctl_tcp_plb_idle_rehash_rounds) - (# consecutive congested rounds >= sysctl_tcp_plb_rehash_rounds) A round (RTT) is marked as congested when congestion signal (ECN ce_ratio) over an RTT is greater than sysctl_tcp_plb_cong_thresh. In the event of RTO, PLB (via tcp_write_timeout()) triggers a path change and disables congestion-triggered path changes for random time between (sysctl_tcp_plb_suspend_rto_sec, 2*sysctl_tcp_plb_suspend_rto_sec) to avoid hopping onto the "connectivity blackhole". RTO-triggered path changes can still happen during this cool-off period. Signed-off-by: Mubashir Adnan Qureshi Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 28 ++++++++++++++ net/ipv4/Makefile | 2 +- net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/tcp_plb.c | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 137 insertions(+), 2 deletions(-) commit bd456f283b66704920fae8e655ebc769cb743420 Author: Mubashir Adnan Qureshi Date: Wed Oct 26 13:51:11 2022 +0000 tcp: add sysctls for TCP PLB parameters PLB (Protective Load Balancing) is a host based mechanism for load balancing across switch links. It leverages congestion signals(e.g. ECN) from transport layer to randomly change the path of the connection experiencing congestion. PLB changes the path of the connection by changing the outgoing IPv6 flow label for IPv6 connections (implemented in Linux by calling sk_rethink_txhash()). Because of this implementation mechanism, PLB can currently only work for IPv6 traffic. For more information, see the SIGCOMM 2022 paper: https://doi.org/10.1145/3544216.3544226 This commit adds new sysctl knobs and sets their default values for TCP PLB. Signed-off-by: Mubashir Adnan Qureshi Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.rst | 75 ++++++++++++++++++++++++++++++++++ include/net/netns/ipv4.h | 5 +++ net/ipv4/sysctl_net_ipv4.c | 43 +++++++++++++++++++ net/ipv4/tcp_ipv4.c | 8 ++++ 4 files changed, 131 insertions(+) commit 870b89d118a29bd845ea706a74e313f9b83f5a45 Author: Chancel Liu Date: Thu Oct 27 14:03:11 2022 +0800 ASoC: fsl_sai: Specify the maxburst to 8 on i.MX93 platform There is a limit to eDMA AXI on i.MX93. Only TCD that has NBYTES in a multiple of 8bytes can enable scatter-gather. NBYTES is calculated by bus width times maxburst. On i.MX93 platform the value of maxburst is specified to 8. It makes sure that NBYTES is a multiple of 8bytes. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Reviewed-by: Daniel Baluta Link: https://lore.kernel.org/r/20221027060311.2549711-4-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 11 +++++++---- sound/soc/fsl/fsl_sai.h | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) commit 67d5c6c19923ad26def8a001e86fc0f42264a8b5 Author: Chancel Liu Date: Thu Oct 27 14:03:10 2022 +0800 ASoC: fsl_sai: Add support for i.MX93 platform Add compatible string and specific soc data to support SAI on i.MX93 platform. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Reviewed-by: Daniel Baluta Link: https://lore.kernel.org/r/20221027060311.2549711-3-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit aa8289fda86ede0e164a260316647c8bf0400d41 Author: Chancel Liu Date: Thu Oct 27 14:03:09 2022 +0800 ASoC: dt-bindings: fsl,sai: Add compatible string for i.MX93 platform Add compatible string "fsl,imx93-sai" for i.MX93 platform Signed-off-by: Chancel Liu Acked-by: Krzysztof Kozlowski Reviewed-by: Daniel Baluta Link: https://lore.kernel.org/r/20221027060311.2549711-2-chancel.liu@nxp.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/fsl,sai.yaml | 1 + 1 file changed, 1 insertion(+) commit 7f86cf50cfa62d8028ba1fa9383c9645b3665e64 Merge: 12dee519d466 fd8825cd8c6f Author: David S. Miller Date: Fri Oct 28 10:35:51 2022 +0100 Merge branch 'mxl-gpy-MDI-X' Raju Lakkaraju says: ==================== net: phy: mxl-gpy: Add MDI-X This patch series add the MDI-X feature to GPY211 PHYs and Also Change return type to gpy_update_interface() function ==================== Signed-off-by: David S. Miller commit fd8825cd8c6fc833be90a00ed1be41f9e0c05db8 Author: Raju Lakkaraju Date: Wed Oct 26 11:29:18 2022 +0530 net: phy: mxl-gpy: Add PHY Auto/MDI/MDI-X set driver for GPY211 chips Add support for MDI-X status and configuration for GPY211 chips Signed-off-by: Raju Lakkaraju Signed-off-by: David S. Miller drivers/net/phy/mxl-gpy.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) commit 7a495dde27ebca4f161c116d6a0f685138843d5d Author: Raju Lakkaraju Date: Wed Oct 26 11:29:17 2022 +0530 net: phy: mxl-gpy: Change gpy_update_interface() function return type gpy_update_interface() is called from gpy_read_status() which does return error codes. gpy_read_status() would benefit from returning -EINVAL, etc. Signed-off-by: Raju Lakkaraju Signed-off-by: David S. Miller drivers/net/phy/mxl-gpy.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 7336c54a562b479866d2de2abc61487a4e07b0b9 Author: Mikhail Rudenko Date: Wed Oct 26 15:45:51 2022 +0300 media: i2c: ov4689: code cleanup Fix minor nits from the last review round: extra {}, temporary variables for ARRAYS_SIZE(), redundant check in ov4689_check_hwcfg. No functional change intended. Signed-off-by: Mikhail Rudenko Signed-off-by: Sakari Ailus drivers/media/i2c/ov4689.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 20eb0cf9a3c1bdde2f3e81365e844dec312da4fe Merge: e4236f97688a a351b1f44418 Author: Christian Brauner Date: Fri Oct 28 10:29:15 2022 +0200 Merge branch 'fs.acl.rework' into for-next commit 94fea664ae4eea69e90abb4bd01997b9c54cd013 Author: Naveen N. Rao Date: Fri Oct 28 12:46:10 2022 +0530 selftests/ftrace: Convert tracer tests to use 'requires' to specify program dependency Now that we have a good way to specify dependency of tests on programs, convert some of the tracer tests to use this method for specifying dependency on 'chrt'. Reviewed-by: Steven Rostedt (Google) Signed-off-by: Naveen N. Rao Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/test.d/tracer/wakeup.tc | 7 +------ tools/testing/selftests/ftrace/test.d/tracer/wakeup_rt.tc | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) commit 4aa4d4def2993ea1a0481e080de11b26bc1ac6c7 Author: Naveen N. Rao Date: Fri Oct 28 12:46:09 2022 +0530 selftests/ftrace: Add check for ping command for trigger tests All these tests depend on the ping command and will fail if it is not found. Allow tests to specify dependencies on programs through the 'requires' field. Add dependency on 'ping' for some of the trigger tests. Link: https://lore.kernel.org/all/20221017104312.16af5467@gandalf.local.home/ Reported-by: Akanksha J N Acked-by: Masami Hiramatsu (Google) Suggested-by: Steven Rostedt (Google) Reviewed-by: Steven Rostedt (Google) Signed-off-by: Naveen N. Rao Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/test.d/functions | 8 +++++++- .../test.d/trigger/inter-event/trigger-field-variable-support.tc | 2 +- .../trigger/inter-event/trigger-inter-event-combined-hist.tc | 2 +- .../test.d/trigger/inter-event/trigger-onchange-action-hist.tc | 2 +- .../test.d/trigger/inter-event/trigger-onmatch-action-hist.tc | 2 +- .../trigger/inter-event/trigger-onmatch-onmax-action-hist.tc | 2 +- .../test.d/trigger/inter-event/trigger-onmax-action-hist.tc | 2 +- .../test.d/trigger/inter-event/trigger-snapshot-action-hist.tc | 2 +- .../trigger/inter-event/trigger-synthetic-event-dynstring.tc | 2 +- .../test.d/trigger/inter-event/trigger-trace-action-hist.tc | 2 +- 10 files changed, 16 insertions(+), 10 deletions(-) commit a351b1f444187312bb42479cb26e82f26fc481d2 Author: Christian Brauner Date: Fri Oct 28 10:00:26 2022 +0200 acl: make vfs_posix_acl_to_xattr() static After reworking posix acls this helper isn't used anywhere outside the core posix acl paths. Make it static. Signed-off-by: Christian Brauner (Microsoft) fs/posix_acl.c | 7 ++++--- include/linux/posix_acl_xattr.h | 10 ---------- 2 files changed, 4 insertions(+), 13 deletions(-) commit d6e9aa6e1ea872d1bbdf08ac78245cf8efeda19c Author: wangjianli Date: Sat Oct 22 13:38:02 2022 +0800 crypto: octeontx - fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: wangjianli Signed-off-by: Herbert Xu drivers/crypto/marvell/octeontx/otx_cpt_hw_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f82f4ae8946d665f1e38da8e2b39b929d2435b1 Author: Kai Ye Date: Sat Oct 22 01:17:46 2022 +0000 crypto: hisilicon/qm - delete redundancy check Because the permission on the VF debugfs file is "0444". So the VF function checking is redundant in qos writing api. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 3 --- 1 file changed, 3 deletions(-) commit 22d7a6c39cabab811f42cb2daed2343c87b0aca5 Author: Kai Ye Date: Sat Oct 22 01:17:45 2022 +0000 crypto: hisilicon/qm - add pci bdf number check The pci bdf number check is added for qos written by using the pci api. Directly get the devfn by pci_dev, so delete some redundant code. And use the kstrtoul instead of sscanf to simplify code. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) commit 3efe90af4c0c46c58dba1b306de142827153d9c0 Author: Kai Ye Date: Sat Oct 22 01:17:44 2022 +0000 crypto: hisilicon/qm - increase the memory of local variables Increase the buffer to prevent stack overflow by fuzz test. The maximum length of the qos configuration buffer is 256 bytes. Currently, the value of the 'val buffer' is only 32 bytes. The sscanf does not check the dest memory length. So the 'val buffer' may stack overflow. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7984ceb134bf31aa9a597f10ed52d831d5aede14 Author: Frederick Lawler Date: Mon Oct 17 14:25:00 2022 -0500 crypto: af_alg - Support symmetric encryption via keyring keys We want to leverage keyring to store sensitive keys, and then use those keys for symmetric encryption via the crypto API. Among the key types we wish to support are: user, logon, encrypted, and trusted. User key types are already able to have their data copied to user space, but logon does not support this. Further, trusted and encrypted keys will return their encrypted data back to user space on read, which does not make them ideal for symmetric encryption. To support symmetric encryption for these key types, add a new ALG_SET_KEY_BY_KEY_SERIAL setsockopt() option to the crypto API. This allows users to pass a key_serial_t to the crypto API to perform symmetric encryption. The behavior is the same as ALG_SET_KEY, but the crypto key data is copied in kernel space from a keyring key, which allows for the support of logon, encrypted, and trusted key types. Keyring keys must have the KEY_(POS|USR|GRP|OTH)_SEARCH permission set to leverage this feature. This follows the asymmetric_key type where key lookup calls eventually lead to keyring_search_rcu() without the KEYRING_SEARCH_NO_CHECK_PERM flag set. Signed-off-by: Frederick Lawler Signed-off-by: Herbert Xu Documentation/crypto/userspace-if.rst | 15 +++- crypto/af_alg.c | 135 +++++++++++++++++++++++++++++++++- include/uapi/linux/if_alg.h | 1 + 3 files changed, 147 insertions(+), 4 deletions(-) commit 9dcd71c863a6f6476378d076d3e9189c854d49fd Author: Corentin Labbe Date: Tue Sep 27 07:55:11 2022 +0000 crypto: rockchip - Add support for RK3399 The RK3399 has 2 rk3288 compatible crypto device named crypto0 and crypto1. The only difference is lack of RSA in crypto1. We need to add driver support for 2 parallel instance as only one need to register crypto algorithms. Then the driver will round robin each request on each device. For avoiding complexity (device bringup after a TFM is created), PM is modified to be handled per request. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 92 +++++++++++++++++++----- drivers/crypto/rockchip/rk3288_crypto.h | 25 +++++-- drivers/crypto/rockchip/rk3288_crypto_ahash.c | 37 +++++----- drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 37 +++++----- 4 files changed, 123 insertions(+), 68 deletions(-) commit c5a1e104c35e5134b6048f1e03960a6ac9c42935 Author: Corentin Labbe Date: Tue Sep 27 07:55:10 2022 +0000 crypto: rockchip - permit to have more than one reset The RK3399 has 3 resets, so the driver to handle multiple resets. This is done by using devm_reset_control_array_get_exclusive(). Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d31b14c9e4178a129a1aa5e491e4da1489c07de Author: Corentin Labbe Date: Tue Sep 27 07:55:09 2022 +0000 crypto: rockchip - rk_ahash_reg_init use crypto_info from parameter rk_ahash_reg_init() use crypto_info from TFM context, since we will remove it, let's take if from parameters. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto_ahash.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit e220e6719438f7a99fe0a73e6e126481380202fa Author: Corentin Labbe Date: Tue Sep 27 07:55:08 2022 +0000 crypto: rockchip - Check for clocks numbers and their frequencies Add the number of clocks needed for each compatible. Rockchip's datasheet give maximum frequencies for some clocks, so add checks for verifying they are within limits. Let's start with rk3288 for clock frequency check, other will came later. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 75 ++++++++++++++++++++++++++++----- drivers/crypto/rockchip/rk3288_crypto.h | 16 ++++++- 2 files changed, 79 insertions(+), 12 deletions(-) commit 2d3c756adcd7a7ee15b6a55cf01b363e3f134e79 Author: Corentin Labbe Date: Tue Sep 27 07:55:07 2022 +0000 crypto: rockchip - store crypto_info in request context The crypto_info to use must be stored in the request context. This will help when 2 crypto_info will be available on rk3399. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.h | 2 ++ drivers/crypto/rockchip/rk3288_crypto_ahash.c | 14 ++++++-------- drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 6 ++++-- 3 files changed, 12 insertions(+), 10 deletions(-) commit d1b5749687618d969c0be6428174a18a7e94ebd2 Author: Corentin Labbe Date: Tue Sep 27 07:55:03 2022 +0000 dt-bindings: crypto: rockchip: add new compatible Since driver support new compatible, we need to update the driver bindings. Signed-off-by: Corentin Labbe Reviewed-by: Rob Herring Signed-off-by: Herbert Xu .../bindings/crypto/rockchip,rk3288-crypto.yaml | 79 +++++++++++++++++++--- 1 file changed, 71 insertions(+), 8 deletions(-) commit 81aaf680e85207d6521b250b2a80ba7c91cc9cbe Author: Corentin Labbe Date: Tue Sep 27 07:55:02 2022 +0000 dt-bindings: crypto: convert rockchip-crypto to YAML Convert rockchip-crypto to YAML. Reviewed-by: John Keeping Reviewed-by: Krzysztof Kozlowski Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu .../bindings/crypto/rockchip,rk3288-crypto.yaml | 64 ++++++++++++++++++++++ .../devicetree/bindings/crypto/rockchip-crypto.txt | 28 ---------- 2 files changed, 64 insertions(+), 28 deletions(-) commit ea389be9857721252367fd2cf81bc8068e060693 Author: Corentin Labbe Date: Tue Sep 27 07:55:01 2022 +0000 crypto: rockchip - use the rk_crypto_info given as parameter Instead of using the crypto_info from TFM ctx, use the one given as parameter. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c018c7a9dd198ce965ca4d10c7b083849bc533be Author: Corentin Labbe Date: Tue Sep 27 07:55:00 2022 +0000 crypto: rockchip - use a rk_crypto_info variable instead of lot of indirection Instead of using lot of ctx->dev->xx indirections, use an intermediate variable for rk_crypto_info. This will help later, when 2 different rk_crypto_info would be used. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto_ahash.c | 23 ++++++++------- drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 37 ++++++++++++------------ 2 files changed, 32 insertions(+), 28 deletions(-) commit 2e3b149578c30275db9c3501c1d9dec36d16622a Author: Corentin Labbe Date: Tue Sep 27 07:54:59 2022 +0000 crypto: rockchip - rework rk_handle_req function This patch rework the rk_handle_req(), simply removing the rk_crypto_info parameter. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 68 ++++++------------------ 1 file changed, 17 insertions(+), 51 deletions(-) commit a7fa0644dd0b91fab97398de7ea4672a6526261f Author: Corentin Labbe Date: Tue Sep 27 07:54:58 2022 +0000 crypto: rockchip - rename ablk functions to cipher Some functions have still ablk in their name even if there are not handling ablk_cipher anymore. So let's rename them. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 32 ++++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) commit e65e90101329de0fe304e2df057f68c5f0fa4748 Author: Corentin Labbe Date: Tue Sep 27 07:54:57 2022 +0000 crypto: rockchip - add support for rk3328 The rk3328 could be used as-is by the rockchip driver. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 1 + 1 file changed, 1 insertion(+) commit 456698746b40008eb0924eb7e9ec908330948b2d Author: Corentin Labbe Date: Tue Sep 27 07:54:56 2022 +0000 crypto: rockchip - fix style issue This patch fixes some warning reported by checkpatch Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto_ahash.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 37bc22159c456ad43fb852fc6ed60f4081df25df Author: Corentin Labbe Date: Tue Sep 27 07:54:55 2022 +0000 crypto: rockchip - use read_poll_timeout Use read_poll_timeout instead of open coding it. In the same time, fix indentation of related comment. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto_ahash.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e803188400d32d28ecfbef0878c289e3c7026723 Author: Corentin Labbe Date: Tue Sep 27 07:54:54 2022 +0000 crypto: rockchip - add myself as maintainer Nobody is set as maintainer of rockchip crypto, I propose to do it as I have already reworked lot of this code. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 3a6fd464f48ad35d8cf15d81fd92094132dc862a Author: Corentin Labbe Date: Tue Sep 27 07:54:53 2022 +0000 crypto: rockchip - use clk_bulk to simplify clock management rk3328 does not have the same clock names than rk3288, instead of using a complex clock management, let's use clk_bulk to simplify their handling. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 66 +++++---------------------------- drivers/crypto/rockchip/rk3288_crypto.h | 6 +-- 2 files changed, 11 insertions(+), 61 deletions(-) commit 6f61192549d0214f8d9d1e1d3152e450658ed1e9 Author: Corentin Labbe Date: Tue Sep 27 07:54:52 2022 +0000 crypto: rockchip - handle reset also in PM reset could be handled by PM functions. We keep the initial reset pulse to be sure the hw is a know device state after probe. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit a216be3964c15661579005012b1f0d7d20a1f265 Author: Corentin Labbe Date: Tue Sep 27 07:54:51 2022 +0000 crypto: rockchip - introduce PM Add runtime PM support for rockchip crypto. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 51 +++++++++++++++++++++++- drivers/crypto/rockchip/rk3288_crypto.h | 1 + drivers/crypto/rockchip/rk3288_crypto_ahash.c | 10 +++++ drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 9 +++++ 4 files changed, 69 insertions(+), 2 deletions(-) commit 48d904d428b68080abd9161148ca2ab1331124a4 Author: Corentin Labbe Date: Tue Sep 27 07:54:50 2022 +0000 crypto: rockchip - add debugfs This patch enable to access usage stats for each algorithm. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 10 +++++ drivers/crypto/rockchip/rk3288_crypto.c | 47 ++++++++++++++++++++++++ drivers/crypto/rockchip/rk3288_crypto.h | 11 ++++++ drivers/crypto/rockchip/rk3288_crypto_ahash.c | 8 ++++ drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 15 ++++++++ 5 files changed, 91 insertions(+) commit 6d55c4a206d29006c733b5083ba5da8391abbdbd Author: Corentin Labbe Date: Tue Sep 27 07:54:49 2022 +0000 crypto: rockchip - rewrite type Instead of using a custom type for classify algorithms, let's just use already defined ones. And let's made a bit more verbose about what is registered. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 26 ++++++++++++++++-------- drivers/crypto/rockchip/rk3288_crypto.h | 7 +------ drivers/crypto/rockchip/rk3288_crypto_ahash.c | 6 +++--- drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 12 +++++------ 4 files changed, 28 insertions(+), 23 deletions(-) commit 57d67c6e8219b2a034c16d6149e30fb40fd39935 Author: Corentin Labbe Date: Tue Sep 27 07:54:48 2022 +0000 crypto: rockchip - rework by using crypto_engine Instead of doing manual queue management, let's use the crypto/engine for that. In the same time, rework the requests handling to be easier to understand (and fix all bugs related to them). Fixes: ce0183cb6464b ("crypto: rockchip - switch to skcipher API") Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 1 + drivers/crypto/rockchip/rk3288_crypto.c | 152 +------------- drivers/crypto/rockchip/rk3288_crypto.h | 39 +--- drivers/crypto/rockchip/rk3288_crypto_ahash.c | 144 +++++++------ drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 250 +++++++++++------------ 5 files changed, 221 insertions(+), 365 deletions(-) commit bb3c7b73363c9a149b12b74c44ae94b73a8fddf8 Author: Corentin Labbe Date: Tue Sep 27 07:54:47 2022 +0000 crypto: rockchip - remove non-aligned handling Now driver have fallback for un-aligned cases, remove all code handling those cases. Fixes: ce0183cb6464b ("crypto: rockchip - switch to skcipher API") Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 69 ++++++------------------ drivers/crypto/rockchip/rk3288_crypto.h | 4 -- drivers/crypto/rockchip/rk3288_crypto_ahash.c | 22 +++----- drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 39 ++++---------- 4 files changed, 31 insertions(+), 103 deletions(-) commit d6b23ccef82816050c2fd458c9dabfa0e0af09b9 Author: Corentin Labbe Date: Tue Sep 27 07:54:46 2022 +0000 crypto: rockchip - better handle cipher key The key should not be set in hardware too much in advance, this will fail it 2 TFM with different keys generate alternative requests. The key should be stored and used just before doing cipher operations. Fixes: ce0183cb6464b ("crypto: rockchip - switch to skcipher API") Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.h | 1 + drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) commit 816600485cb597b3ff7d6806a95a78512839f775 Author: Corentin Labbe Date: Tue Sep 27 07:54:45 2022 +0000 crypto: rockchip - add fallback for ahash Adds a fallback for all case hardware cannot handle. Fixes: ce0183cb6464b ("crypto: rockchip - switch to skcipher API") Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto_ahash.c | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 68ef8af09a1a912a5ed2cfaa4cca7606f52cef90 Author: Corentin Labbe Date: Tue Sep 27 07:54:44 2022 +0000 crypto: rockchip - add fallback for cipher The hardware does not handle 0 size length request, let's add a fallback. Furthermore fallback will be used for all unaligned case the hardware cannot handle. Fixes: ce0183cb6464b ("crypto: rockchip - switch to skcipher API") Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 4 + drivers/crypto/rockchip/rk3288_crypto.h | 2 + drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 97 ++++++++++++++++++++---- 3 files changed, 90 insertions(+), 13 deletions(-) commit 87e356c4966444866186f68f05832fdcc0f351a3 Author: Corentin Labbe Date: Tue Sep 27 07:54:43 2022 +0000 crypto: rockchip - do not store mode globally Storing the mode globally does not work if 2 requests are handled in the same time. We should store it in a request context. Fixes: ce0183cb6464b ("crypto: rockchip - switch to skcipher API") Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.h | 5 +- drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 58 +++++++++++++++--------- 2 files changed, 41 insertions(+), 22 deletions(-) commit 6d11c9387865723fd779be00ae37a4588e60133d Author: Corentin Labbe Date: Tue Sep 27 07:54:42 2022 +0000 crypto: rockchip - fix privete/private typo This fix a simple typo on private word. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c50ef1411c8cbad0c7db100c477126076b6e3348 Author: Corentin Labbe Date: Tue Sep 27 07:54:41 2022 +0000 crypto: rockchip - do not do custom power management The clock enable/disable at tfm init/exit is fragile, if 2 tfm are init in the same time and one is removed just after, it will leave the hardware uncloked even if a user remains. Instead simply enable clocks at probe time. We will do PM later. Fixes: ce0183cb6464b ("crypto: rockchip - switch to skcipher API") Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 4 ++-- drivers/crypto/rockchip/rk3288_crypto.h | 2 -- drivers/crypto/rockchip/rk3288_crypto_ahash.c | 3 +-- drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 5 +++-- 4 files changed, 6 insertions(+), 8 deletions(-) commit 8ccd9c8cd1d1618f5e073c86ffcfe15f292eefe6 Author: Corentin Labbe Date: Tue Sep 27 07:54:40 2022 +0000 crypto: rockchip - do not use uninitialized variable crypto_info->dev is not yet set, so use pdev->dev instead. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 299c481fa5c121f892420d97f1123a853b7f1079 Author: Corentin Labbe Date: Tue Sep 27 07:54:39 2022 +0000 crypto: rockchip - use dev_err for error message about interrupt Interrupt is mandatory so the message should be printed as error. Reviewed-by: John Keeping Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/rockchip/rk3288_crypto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 12dee519d466025fdedced911d0fe81cb7ba29e7 Merge: 148b811c7797 91619eb60aec Author: Jakub Kicinski Date: Thu Oct 27 20:41:04 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next 1) Move struct nft_payload_set definition to .c file where it is only used. 2) Shrink transport and inner header offset fields in the nft_pktinfo structure to 16-bits, from Florian Westphal. 3) Get rid of nft_objref Kbuild toggle, make it built-in into nf_tables. This expression is used to instantiate conntrack helpers in nftables. After removing the conntrack helper auto-assignment toggle it this feature became more important so move it to the nf_tables core module. Also from Florian. 4) Extend the existing function to calculate payload inner header offset to deal with the GRE and IPIP transport protocols. 6) Add inner expression support for nf_tables. This new expression provides a packet parser for tunneled packets which uses a userspace description of the expected inner headers. The inner expression invokes the payload expression (via direct call) to match on the inner header protocol fields using the inner link, network and transport header offsets. An example of the bytecode generated from userspace to match on IP source encapsulated in a VxLAN packet: # nft --debug=netlink add rule netdev x y udp dport 4789 vxlan ip saddr 1.2.3.4 netdev x y [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x0000b512 ] [ inner type vxlan hdrsize 8 flags f [ meta load protocol => reg 1 ] ] [ cmp eq reg 1 0x00000008 ] [ inner type vxlan hdrsize 8 flags f [ payload load 4b @ network header + 12 => reg 1 ] ] [ cmp eq reg 1 0x04030201 ] 7) Store inner link, network and transport header offsets in percpu area to parse inner packet header once only. Matching on a different tunnel type invalidates existing offsets in the percpu area and it invokes the inner tunnel parser again. 8) Add support for inner meta matching. This support for NFTA_META_PROTOCOL, which specifies the inner ethertype, and NFT_META_L4PROTO, which specifies the inner transport protocol. 9) Extend nft_inner to parse GENEVE optional fields to calculate the link layer offset. 10) Update inner expression so tunnel offset points to GRE header to normalize tunnel header handling. This also allows to perform different interpretations of the GRE header from userspace. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: nft_inner: set tunnel offset to GRE header offset netfilter: nft_inner: add geneve support netfilter: nft_meta: add inner match support netfilter: nft_inner: add percpu inner context netfilter: nft_inner: support for inner tunnel header matching netfilter: nft_payload: access ipip payload for inner offset netfilter: nft_payload: access GRE payload via inner offset netfilter: nft_objref: make it builtin netfilter: nf_tables: reduce nft_pktinfo by 8 bytes netfilter: nft_payload: move struct nft_payload_set definition where it belongs ==================== Link: https://lore.kernel.org/r/20221026132227.3287-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 148b811c7797c3facb3da509a63c80f30a039f4a Author: Yang Li Date: Wed Oct 26 13:18:24 2022 +0800 net: dpaa2-eth: Simplify bool conversion ./drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk.c:453:42-47: WARNING: conversion to bool not needed here Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2577 Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20221026051824.38730-1-yang.lee@linux.alibaba.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e8e4aa5daf750092f2fae03e5ffc289a5c630f5 Merge: 31f1aa4f740f e55f0f5befc2 Author: Jakub Kicinski Date: Thu Oct 27 20:34:18 2022 -0700 Merge branch 'ionic-vf-attr-replay-and-other-updates' Shannon Nelson says: ==================== ionic: VF attr replay and other updates For better VF management when a FW update restart or a FW crash recover is detected, the PF now will replay any user specified VF attributes to be sure the FW hasn't lost them in the restart. Newer FW offers more packet processing offloads, so we now support them in the driver. A small refactor of the Rx buffer fill cleans a bit of code and will help future work on buffer caching. ==================== Link: https://lore.kernel.org/r/20221026143744.11598-1-snelson@pensando.io Signed-off-by: Jakub Kicinski commit e55f0f5befc26e2ba6bb8c1f945ea8e37ee0e334 Author: Neel Patel Date: Wed Oct 26 07:37:44 2022 -0700 ionic: refactor use of ionic_rx_fill() The same pre-work code is used before each call to ionic_rx_fill(), so bring it in and make it a part of the routine. Signed-off-by: Neel Patel Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit cad478c7c3321b03f6f1d07772afad468e698fc2 Author: Neel Patel Date: Wed Oct 26 07:37:43 2022 -0700 ionic: enable tunnel offloads Support stateless offloads for GRE, VXLAN, GENEVE, IPXIP4 and IPXIP6 when the FW supports them. Signed-off-by: Neel Patel Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_lif.c | 8 +++++++- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) commit f43a96d91df1a097d7d7edd5baff960f4067b2a7 Author: Shannon Nelson Date: Wed Oct 26 07:37:42 2022 -0700 ionic: new ionic device identity level and VF start control A new ionic dev_cmd is added to the interface in ionic_if.h, with a new capabilities field in the ionic device identity to signal its availability in the FW. The identity level code is incremented to '2' to show support for this new capabilities bitfield. If the driver has indicated with the new identity level that it has the VF_CTRL command, newer FW will wait for the start command before starting the VFs after a FW update or crash recovery. This patch updates the driver to make use of the new VF start control in fw_up path to be sure that the PF has set the user attributes on the VF before the FW allows the VFs to restart. Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_dev.c | 14 ++++++++ drivers/net/ethernet/pensando/ionic/ionic_dev.h | 3 ++ drivers/net/ethernet/pensando/ionic/ionic_if.h | 45 +++++++++++++++++++++++- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 ++ drivers/net/ethernet/pensando/ionic/ionic_main.c | 2 +- 5 files changed, 64 insertions(+), 2 deletions(-) commit 23e884a253a77ed565e0c410fae660ea8e7081c8 Author: Shannon Nelson Date: Wed Oct 26 07:37:41 2022 -0700 ionic: only save the user set VF attributes Report the current FW values for the VF attributes, but don't save the FW values locally, only save the vf attributes that are given to us from the user. This allows us to replay user data, and doesn't end up confusing things like "who set the mac address". Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_lif.c | 33 +++++++++++++------------ 1 file changed, 17 insertions(+), 16 deletions(-) commit db28adf9afeb1c3a627546d9b9c8cf45c27267b4 Author: Shannon Nelson Date: Wed Oct 26 07:37:40 2022 -0700 ionic: replay VF attributes after fw crash recovery The VF attributes that the user has set into the FW through the PF can be lost over a FW crash recovery. Much like we already replay the PF mac/vlan filters, we now add a replay in the recovery path to be sure the FW has the up-to-date VF configurations. Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski drivers/net/ethernet/pensando/ionic/ionic_lif.c | 70 +++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 28fc4e9077ce59ab28c89c20dc6be5154473218f Author: Zhang Qilong Date: Tue Oct 18 10:45:32 2022 +0800 f2fs: Fix the race condition of resize flag between resizefs Because the set/clear SBI_IS_RESIZEFS flag not between any locks, In the following case: thread1 thread2 ->ioctl(resizefs) ->set RESIZEFS flag ->ioctl(resizefs) ... ->set RESIZEFS flag ->clear RESIZEFS flag ->resizefs stream # No RESIZEFS flag in the stream Also before freeze_super, the resizefs not started, we should not set the SBI_IS_RESIZEFS flag. So move the set/clear SBI_IS_RESIZEFS flag between the cp_mutex and gc_lock. Fixes: b4b10061ef98 ("f2fs: refactor resize_fs to avoid meta updates in progress") Signed-off-by: Zhang Xiaoxu Signed-off-by: Zhang Qilong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2b1966c65b6d5afd9e86fcd63ca64b69c1e2e633 Merge: 7f7a942c0a33 e1e7bc481d49 Author: Dave Airlie Date: Fri Oct 28 13:16:26 2022 +1000 Merge tag 'drm-misc-next-2022-10-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 6.2: UAPI Changes: Cross-subsystem Changes: Core Changes: - connector: Send hotplug event on cleanup - edid: logging/debug improvements - plane_helper: Improve tests Driver Changes: - bridge: - it6505: Synchronization improvements - panel: - panel-edp: Add INX N116BGE-EA2 C2 and C4 support. - nouveau: Fix page-fault handling - vmwgfx: fb and cursor refactoring, convert to generic hashtable Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221027073407.c2tlaczvzjrnzazi@houat commit 7e8edf55cf729367afdb5e9a8b182f1d47897800 Author: Andrew Davis Date: Wed Oct 26 09:50:33 2022 -0500 ARM: keystone: Replace platform SMP with PSCI The KS2 boot monitor supports PSCI commands. These are already defined in DT for KS2. We can drop this platform override and remove related code without changing SMP. Do this here. Signed-off-by: Andrew Davis Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20221026145033.17905-1-afd@ti.com arch/arm/mach-keystone/Makefile | 4 +--- arch/arm/mach-keystone/keystone.c | 2 -- arch/arm/mach-keystone/keystone.h | 5 ----- arch/arm/mach-keystone/platsmp.c | 41 --------------------------------------- arch/arm/mach-keystone/smc.S | 26 ------------------------- 5 files changed, 1 insertion(+), 77 deletions(-) commit e79d0a43e9f8897dcc68b1c7fc408196ce7cb676 Author: Marek Vasut Date: Sun Oct 23 18:46:07 2022 +0200 clk: stm32mp1: Staticize ethrx_src Make ethrx_src array static, this is local to clk-stm32mp1.c Fixes: e9ed1ef18a37a ("clk: stm32mp1: Add parent_data to ETHRX clock") Reported-by: kernel test robot Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20221023164607.556118-1-marex@denx.de Acked-by: Gabriel Fernandez Signed-off-by: Stephen Boyd drivers/clk/clk-stm32mp1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31f1aa4f740fc591450777f4ff94d6e062b6f632 Merge: 12d6c1d3a2ad 23758867219c Author: Jakub Kicinski Date: Thu Oct 27 15:37:56 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c 2871edb32f46 ("can: kvaser_usb: Fix possible completions during init_completion") abb8670938b2 ("can: kvaser_usb_leaf: Ignore stale bus-off after start") 8d21f5927ae6 ("can: kvaser_usb_leaf: Fix improved state not being reported") Signed-off-by: Jakub Kicinski commit 25e70c6162f207828dd405b432d8f2a98dbf7082 Author: Hoi Pok Wu Date: Tue Oct 25 23:20:45 2022 +0800 fs: jfs: fix shift-out-of-bounds in dbDiscardAG This should be applied to most URSAN bugs found recently by syzbot, by guarding the dbMount. As syzbot feeding rubbish into the bmap descriptor. Signed-off-by: Hoi Pok Wu Signed-off-by: Dave Kleikamp fs/jfs/jfs_dmap.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2348e6bf44213c5f447ff698e43c089185241ed7 Author: Jisheng Zhang Date: Tue Oct 18 22:12:00 2022 +0800 riscv: remove special treatment for the link order of head.o arch/riscv/kernel/head.o does not need any special treatment - the only requirement is the ".head.text" section must be placed before the normal ".text" section. The linker script does the right thing to do. The build system does not need to manipulate the link order of head.o. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20221018141200.1040-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt scripts/head-object-list.txt | 1 - 1 file changed, 1 deletion(-) commit ebe060369f8d6e4588b115f252bebf5ba4d64350 Author: Dr. David Alan Gilbert Date: Sat Oct 22 21:39:14 2022 +0100 jfs: Fix fortify moan in symlink JFS has in jfs_incore.h: /* _inline may overflow into _inline_ea when needed */ /* _inline_ea may overlay the last part of * file._xtroot if maxentry = XTROOTINITSLOT */ union { struct { /* 128: inline symlink */ unchar _inline[128]; /* 128: inline extended attr */ unchar _inline_ea[128]; }; unchar _inline_all[256]; and currently the symlink code copies into _inline; if this is larger than 128 bytes it triggers a fortify warning of the form: memcpy: detected field-spanning write (size 132) of single field "ip->i_link" at fs/jfs/namei.c:950 (size 18446744073709551615) when it's actually OK. Copy it into _inline_all instead. Reported-by: syzbot+5fc38b2ddbbca7f5c680@syzkaller.appspotmail.com Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Kees Cook Signed-off-by: Dave Kleikamp fs/jfs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 687daae7941c7a7ae52b51cad6dc77b672caf787 Author: Alexander Stein Date: Fri Oct 21 08:47:57 2022 +0200 dt-bindings: clock: ti,cdce925: Convert to DT schema Convert the TI CDCE925 clock binding to DT schema format. Including a small fix: Add the missing 'ti' prefix in the example compatible. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20221021064757.379558-1-alexander.stein@ew.tq-group.com Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/ti,cdce925.txt | 53 ----------- .../devicetree/bindings/clock/ti,cdce925.yaml | 103 +++++++++++++++++++++ 2 files changed, 103 insertions(+), 53 deletions(-) commit 4cb21b9edebb6f4051540dca1806f479b0adb947 Author: Siarhei Volkau Date: Thu Oct 27 22:20:22 2022 +0300 dt-bindings: clock: Add Ingenic JZ4755 CGU header This will be used from the devicetree bindings to specify the clocks that should be obtained from the jz4755-cgu driver. Acked-by: Krzysztof Kozlowski Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221027192024.484320-3-lis8215@gmail.com Signed-off-by: Stephen Boyd include/dt-bindings/clock/ingenic,jz4755-cgu.h | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 49afb0041ac1518322a05a4e4d8896bcf41fbbeb Author: Siarhei Volkau Date: Thu Oct 27 22:20:21 2022 +0300 dt-bindings: ingenic: Add support for the JZ4755 CGU Add documentation for the clock generation unit (CGU) of the JZ4755 SoC. Acked-by: Krzysztof Kozlowski Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221027192024.484320-2-lis8215@gmail.com Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/ingenic,cgu.yaml | 2 ++ 1 file changed, 2 insertions(+) commit e8c68abb21573a110efc5ee4967dc95b47ea4950 Merge: d233ab3c5c5e 65e9fb081877 Author: Palmer Dabbelt Date: Wed Oct 26 20:19:46 2022 -0700 riscv_pmu_sbi: add support for PMU variant on T-Head C9xx cores The PMU on T-Head C9xx cores is quite similar to the SSCOFPMF extension but not completely identical, so this series adds a T-Head PMU errata that handlen the differences. * 'riscv-pmu' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/palmer/linux: drivers/perf: riscv_pmu_sbi: add support for PMU variant on T-Head C9xx cores RISC-V: Cache SBI vendor values commit 65e9fb081877a18c432c6ff344937b7277c044b5 Author: Heiko Stuebner Date: Wed Oct 12 01:18:41 2022 +0200 drivers/perf: riscv_pmu_sbi: add support for PMU variant on T-Head C9xx cores With the T-HEAD C9XX cores being designed before or during the ratification to the SSCOFPMF extension, it implements functionality very similar but not equal to it. It implements overflow handling and also some privilege-mode filtering. While SSCOFPMF supports this for all modes, the C9XX only implements the filtering for M-mode and S-mode but not user-mode. So add some adaptions to allow the C9XX to still handle its PMU through the regular SBI PMU interface instead of defining new interfaces or drivers. To work properly, this requires a matching change in SBI, though the actual interface between kernel and SBI does not change. The main differences are a the overflow CSR and irq number. As the reading of the overflow-csr is in the hot-path during irq handling, use an errata and alternatives to not introduce new conditionals there. Reviewed-by: Andrew Jones Reviewed-by: Conor Dooley Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/all/20221011231841.2951264-2-heiko@sntech.de/ Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig.erratas | 13 +++++++++++++ arch/riscv/errata/thead/errata.c | 19 +++++++++++++++++++ arch/riscv/include/asm/errata_list.h | 16 +++++++++++++++- drivers/perf/riscv_pmu_sbi.c | 34 ++++++++++++++++++++++++---------- 4 files changed, 71 insertions(+), 11 deletions(-) commit 5e9c68ea777594a2d63fa44c0509782e90821707 Author: Heiko Stuebner Date: Wed Oct 12 01:18:40 2022 +0200 RISC-V: Cache SBI vendor values sbi_get_mvendorid(), sbi_get_marchid() and sbi_get_mimpid() might get called multiple times, though the values of these CSRs should not change during the runtime of a specific machine. Though the values can be different depending on which hart of the system they get called. So hook into the newly introduced cpuinfo struct to allow retrieving these cached values via new functions. Also use arch_initcall for the cpuinfo setup instead, as that now clearly is "architecture specific initialization" and also makes these information available slightly earlier. [caching vendor ids] Suggested-by: Atish Patra [using cpuinfo struct as cache] Suggested-by: Anup Patel Link: https://lore.kernel.org/all/20221011231841.2951264-2-heiko@sntech.de/ Signed-off-by: Heiko Stuebner Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/sbi.h | 5 +++++ arch/riscv/kernel/cpu.c | 30 +++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) commit b6d207999c350b19a787e48757f98198d0bf3e5b Author: Xu Kuohai Date: Wed Oct 26 23:44:58 2022 -0400 bpf: Fix a typo in comment for DFS algorithm There is a typo in comment for DFS algorithm in bpf/verifier.c. The top element should not be popped until all its neighbors have been checked. Fix it. Fixes: 475fb78fbf48 ("bpf: verifier (add branch/goto checks)") Signed-off-by: Xu Kuohai Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221027034458.2925218-1-xukuohai@huaweicloud.com kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cff624146450bd25a1acea0439b7654167e0f722 Author: Arnaldo Carvalho de Melo Date: Wed Oct 26 13:50:17 2022 -0300 perf bpf: No need to include compiler.h when HAVE_LIBBPF_SUPPORT is true Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_map.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a527c2c1e2d43e9f145f5d0c5d6ac0bdf5220e22 Author: James Clark Date: Tue Oct 18 10:41:36 2022 +0100 perf tools: Make quiet mode consistent between tools Use the global quiet variable everywhere so that all tools hide warnings in quiet mode and update the documentation to reflect this. 'perf probe' claimed that errors are not printed in quiet mode but I don't see this so remove it from the docs. Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221018094137.783081-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-annotate.txt | 2 +- tools/perf/Documentation/perf-diff.txt | 2 +- tools/perf/Documentation/perf-lock.txt | 2 +- tools/perf/Documentation/perf-probe.txt | 2 +- tools/perf/Documentation/perf-record.txt | 2 +- tools/perf/Documentation/perf-report.txt | 2 +- tools/perf/Documentation/perf-stat.txt | 4 ++-- tools/perf/bench/numa.c | 9 +++++---- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-diff.c | 2 +- tools/perf/builtin-lock.c | 2 +- tools/perf/builtin-probe.c | 7 +++---- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-report.c | 2 +- tools/perf/builtin-stat.c | 8 ++++---- tools/perf/util/stat.h | 1 - 16 files changed, 25 insertions(+), 26 deletions(-) commit 65319890c32db29fb56b41f84265a2c7029943f4 Author: James Clark Date: Tue Oct 18 10:41:35 2022 +0100 perf tools: Fix "kernel lock contention analysis" test by not printing warnings in quiet mode Especially when CONFIG_LOCKDEP and other debug configs are enabled, Perf can print the following warning when running the "kernel lock contention analysis" test: Warning: Processed 1378918 events and lost 4 chunks! Check IO/CPU overload! Warning: Processed 4593325 samples and lost 70.00%! The test already supplies -q to run in quiet mode, so extend quiet mode to perf_stdio__warning() and also ui__warning() for consistency. This fixes the following failure due to the extra lines counted: perf test "lock cont" -vvv 82: kernel lock contention analysis test : --- start --- test child forked, pid 3125 Testing perf lock record and perf lock contention [Fail] Recorded result count is not 1: 9 test child finished with -1 ---- end ---- kernel lock contention analysis test: FAILED! Fixes: ec685de25b6718f8 ("perf test: Add kernel lock contention test") Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221018094137.783081-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/util.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8b380e6afd124d18cd51a43d2505e4eb05e2ba09 Author: Namhyung Kim Date: Thu Oct 20 10:26:43 2022 -0700 perf test: Do not set TEST_SKIP for record subtests It now has 4 sub tests and at least one of them should run. But once the TEST_SKIP (= 2) return value is set, it won't be overwritten unless there's a failure. I think we should return success when one or more tests are skipped but the remaining subtests are passed. So update the test code not to set the err variable when it skips the test. Reviewed-by: Adrian Hunter Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221020172643.3458767-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record.sh | 12 ------------ 1 file changed, 12 deletions(-) commit 7f4ed3f0b1fc951bcb91a78bf68ac45aac13ec0b Author: Namhyung Kim Date: Thu Oct 20 10:26:42 2022 -0700 perf test: Test record with --threads option The --threads option changed the 'perf record' behavior significantly, so it'd be nice if we test it separately. Add --threads options with different argument in each test supported and check the result. Also update the cleanup routine because threads recording produces data in a directory. Reviewed-by: Adrian Hunter Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221020172643.3458767-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record.sh | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit c8c935677487ba6f7dd18d48e39ab30bbb4cb5d9 Author: Namhyung Kim Date: Thu Oct 20 10:26:41 2022 -0700 perf test: Add target workload test in 'perf record' tests Add a subtest which profiles the given workload on the command line. As it's a minimal requirement, the test should run ok so it doesn't skip the test even if it failed to run the 'perf record' command. Reviewed-by: Adrian Hunter Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221020172643.3458767-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 2cadf2c7b99a980455500c34571a540300c49c72 Author: Namhyung Kim Date: Thu Oct 20 10:26:40 2022 -0700 perf test: Add system-wide mode in 'perf record' tests Add system wide recording test with the same pattern. It'd skip the test when it fails to run 'perf record'. For system-wide mode, it needs to avoid build-id collection and synthesis because the test only cares about the test program and kernel would generate the necessary events as the process starts. Reviewed-by: Adrian Hunter Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221020172643.3458767-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 6b7e02ab1262141cfebd05b68410fa297f557961 Author: Namhyung Kim Date: Thu Oct 20 10:26:39 2022 -0700 perf test: Wait for a new thread when testing --per-thread record Just running the target program is not enough to test multi-thread target because it'd be racy perf vs target startup. I used the initial delay but it cannot guarantee for perf to see the thread. Instead, use wait_for_threads helper from shell/lib/waiting.sh to make sure it starts the sibling thread first. Then perf record can use -p option to profile the target process. Reviewed-by: Adrian Hunter Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221020172643.3458767-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 4321ad4ee98b7325d6133e1d5b7fa25bcbdeb57e Author: Namhyung Kim Date: Thu Oct 20 10:26:38 2022 -0700 perf test: Use a test program in 'perf record' tests If the system has cc it could build a test program with two threads and then use it for more detailed testing. Also it accepts an option to run a thread forever to ensure multi-thread runs. If cc is not found, it falls back to use the default value 'true'. Reviewed-by: Adrian Hunter Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221020172643.3458767-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record.sh | 64 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 4 deletions(-) commit 9e455f4f29e3aeab29b6c1f7d086ddc43fc1a502 Author: Namhyung Kim Date: Thu Oct 20 10:26:37 2022 -0700 perf test: Fix shellcheck issues in the record test Basically there are 3 issues: 1. quote shell expansion 2. do not use egrep 3. use upper case letters for signal names Reviewed-by: Adrian Hunter Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221020172643.3458767-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 439dbef2a94e825241160e1bbd050d01e5728608 Author: Namhyung Kim Date: Thu Oct 20 10:26:36 2022 -0700 perf test: Do not use instructions:u explicitly I think it's to support non-root user tests. But perf record can handle the case and fall back to a software event (cpu-clock). Practically this would affect when it's run on a VM, but it seems no reason to prevent running the test in the guest. Reviewed-by: Adrian Hunter Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221020172643.3458767-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ad7ad6b5ddf63b436a5344fb686887f2d8b7cf3d Author: Adrian Hunter Date: Thu Oct 20 18:25:09 2022 +0300 perf scripts python: intel-pt-events.py: Add ability interleave output Intel PT timestamps are not provided for every branch, let alone every instruction, so there can be many samples with the same timestamp. With per-cpu contexts, decoding is done for each CPU in turn, which can make it difficult to see what is happening on different CPUs at the same time. Currently the interleaving from perf script --itrace=i0ns is quite coarse grained. There are often long stretches executing on one CPU and nothing on another. Some people are interested in seeing what happened on multiple CPUs before a crash to debug races etc. To improve perf script interleaving for parallel execution, the intel-pt-events.py script has been enhanced to enable interleaving the output with the same timestamp from different CPUs. It is understood that interleaving is not perfect or causal. Add parameter --interleave [] to interleave sample output for the same timestamp so that no more than n samples for a CPU are displayed in a row. 'n' defaults to 4. Note this only affects the order of output, and only when the timestamp is the same. Example: $ perf script intel-pt-events.py --insn-trace --interleave 3 ... bash 2267/2267 [004] 9323.692625625 563caa3c86f0 jz 0x563caa3c89c7 run_pending_traps+0x30 (/usr/bin/bash) IPC: 1.52 (38/25) bash 2267/2267 [004] 9323.692625625 563caa3c89c7 movq 0x118(%rsp), %rax run_pending_traps+0x307 (/usr/bin/bash) bash 2267/2267 [004] 9323.692625625 563caa3c89cf subq %fs:0x28, %rax run_pending_traps+0x30f (/usr/bin/bash) bash 2270/2270 [007] 9323.692625625 55dc58cabf02 jz 0x55dc58cabf48 unquoted_glob_pattern_p+0x102 (/usr/bin/bash) IPC: 1.56 (25/16) bash 2270/2270 [007] 9323.692625625 55dc58cabf04 cmp $0x5d, %al unquoted_glob_pattern_p+0x104 (/usr/bin/bash) bash 2270/2270 [007] 9323.692625625 55dc58cabf06 jnz 0x55dc58cabf10 unquoted_glob_pattern_p+0x106 (/usr/bin/bash) bash 2264/2264 [001] 9323.692625625 7fd556a4376c jbe 0x7fd556a43ac8 round_and_return+0x3fc (/usr/lib/x86_64-linux-gnu/libc.so.6) IPC: 4.30 (43/10) bash 2264/2264 [001] 9323.692625625 7fd556a43772 and $0x8, %edx round_and_return+0x402 (/usr/lib/x86_64-linux-gnu/libc.so.6) bash 2264/2264 [001] 9323.692625625 7fd556a43775 jnz 0x7fd556a43ac8 round_and_return+0x405 (/usr/lib/x86_64-linux-gnu/libc.so.6) bash 2267/2267 [004] 9323.692625625 563caa3c89d8 jnz 0x563caa3c8b11 run_pending_traps+0x318 (/usr/bin/bash) bash 2267/2267 [004] 9323.692625625 563caa3c89de add $0x128, %rsp run_pending_traps+0x31e (/usr/bin/bash) bash 2267/2267 [004] 9323.692625625 563caa3c89e5 popq %rbx run_pending_traps+0x325 (/usr/bin/bash) ... Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20221020152509.5298-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-intel-pt.txt | 12 ++++- tools/perf/scripts/python/intel-pt-events.py | 65 +++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 3 deletions(-) commit b15cf900d11d4db2c2dac544a27f3e1217bdd0d4 Author: Arnaldo Carvalho de Melo Date: Tue Oct 25 17:34:44 2022 -0300 perf event: Drop perf_regs.h include, not needed anymore Since commit c897899752478d4c ("perf tools: Prevent out-of-bounds access to registers") the util/event.h header doesn't use anything from util/perf_regs.h, so drop it to untangle the header dependency tree a bit, speeding up compilation. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.h | 2 -- 1 file changed, 2 deletions(-) commit 06bf28cbc63287c69fe834b527127a56b65de2d7 Author: Arnaldo Carvalho de Melo Date: Tue Oct 25 17:33:04 2022 -0300 perf scripting python: Add missing util/perf_regs.h include to get perf_reg_name() prototype It was getting it via event.h, that doesn't need that include anymore and will drop it. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/trace-event-python.c | 1 + 1 file changed, 1 insertion(+) commit 6bc13cab5798bd9b049694983ae5702666d24e83 Author: Arnaldo Carvalho de Melo Date: Tue Oct 25 17:32:19 2022 -0300 perf arch x86: Add missing stdlib.h to get free() prototype It was getting indirectly, out of luck, add it. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/event.c | 1 + tools/perf/arch/x86/util/tsc.c | 1 + 2 files changed, 2 insertions(+) commit 743ef218c2fbe63502615a2044977041ee068322 Author: Arnaldo Carvalho de Melo Date: Tue Oct 25 17:25:18 2022 -0300 perf unwind arm64: Remove needless event.h & thread.h includes To reduce compile time and header dependency chains just add forward declarations for pointer types and include linux/types.h for u64. Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/arm64-frame-pointer-unwind-support.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0cef66a98420f1210be697ed47bd7417ed428847 Author: Yang Jihong Date: Sat Oct 22 17:27:35 2022 +0800 perf config: Add missing newline on pr_warning() call in home_perfconfig() Add missing newline on pr_warning() call in home_perfconfig(). Before: # perf record File /home/yangjihong/.perfconfig not owned by current user or root, ignoring it.Couldn't synthesize bpf events. After: # perf record File /home/yangjihong/.perfconfig not owned by current user or root, ignoring it. Couldn't synthesize bpf events. Signed-off-by: Yang Jihong Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221022092735.114967-4-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a87edbec35725ced484f6b8275f1246ed7194329 Author: Yang Jihong Date: Sat Oct 22 17:27:34 2022 +0800 perf daemon: Complete list of supported subcommand in help message perf daemon supports start, signal, stop and ping subcommands, complete it Before: # perf daemon -h Usage: perf daemon start [] or: perf daemon [] -v, --verbose be more verbose -x, --field-separator[=] print counts with custom separator --base base directory --config config file path After: # perf daemon -h Usage: perf daemon {start|signal|stop|ping} [] or: perf daemon [] -v, --verbose be more verbose -x, --field-separator[=] print counts with custom separator --base base directory --config config file path Signed-off-by: Yang Jihong Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20221022092735.114967-3-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b76a3188b85724f345ea5d03ff206cc9bbe6d72 Author: Namhyung Kim Date: Mon Oct 17 19:02:27 2022 -0700 perf stat: Remove unused perf_counts.aggr field The aggr field in the struct perf_counts is to keep the aggregated value in the AGGR_GLOBAL for the old code. But it's not used anymore. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-21-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/counts.c | 1 - tools/perf/util/counts.h | 1 - tools/perf/util/stat.c | 39 ++++++--------------------------------- 3 files changed, 6 insertions(+), 35 deletions(-) commit cec94d69636a023302d484ec036158b792001d3c Author: Namhyung Kim Date: Mon Oct 17 19:02:26 2022 -0700 perf stat: Display percore events properly The recent change in the perf stat broke the percore event display. Note that the aggr counts are already processed so that the every sibling thread in the same core will get the per-core counter values. Check percore evsels and skip the sibling threads in the display. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-20-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 16 ---------------- tools/perf/util/stat-display.c | 27 +++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 18 deletions(-) commit 91f85f98da7ab8c32105f42dd03884c01ec4498f Author: Namhyung Kim Date: Mon Oct 17 19:02:25 2022 -0700 perf stat: Display event stats using aggr counts Now aggr counts are ready for use. Convert the display routines to use the aggr counts and update the shadow stat with them. It doesn't need to aggregate counts or collect aliases anymore during the display. Get rid of now unused struct perf_aggr_thread_value. Note that there's a difference in the display order among the aggr mode. For per-core/die/socket/node aggregation, it shows relevant events in the same unit together, whereas global/thread/no aggregation it shows the same events for different units together. So it still uses separate codes to display them due to the ordering. One more thing to note is that it breaks per-core event display for now. The next patch will fix it to have identical output as of now. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-19-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 421 +++++------------------------------------ tools/perf/util/stat.c | 5 - tools/perf/util/stat.h | 9 - 3 files changed, 49 insertions(+), 386 deletions(-) commit 88f1d3512c947ad8e396e50acfce5ee55133df0a Author: Namhyung Kim Date: Mon Oct 17 19:02:24 2022 -0700 perf stat: Add perf_stat_process_shadow_stats() This function updates the shadow stats using the aggregated counts uniformly since it uses the aggr_counts for the every aggr mode. It'd have duplicate shadow stats for each items for now since the display routines will update them once again. But that'd be fine as it shows the average values and it'd be gone eventually. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-18-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 1 + tools/perf/util/stat.c | 50 ++++++++++++++++++++++++----------------------- tools/perf/util/stat.h | 1 + 3 files changed, 28 insertions(+), 24 deletions(-) commit 1d6d2bea5b97359ff09a8d793674aab3e5f79023 Author: Namhyung Kim Date: Mon Oct 17 19:02:23 2022 -0700 perf stat: Add perf_stat_process_percore() The perf_stat_process_percore() is to aggregate counts for an event per-core even if the aggr_mode is AGGR_NONE. This is enabled when user requested it on the command line. To handle that, it keeps the per-cpu counts at first. And then it aggregates the counts that have the same core id in the aggr->counts and updates the values for each cpu back. Later, per-core events will skip one of the CPUs unless percore-show-thread option is given. In that case, it can simply print all cpu stats with the updated (per-core) values. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-17-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 1 + tools/perf/util/stat.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/stat.h | 3 ++ 3 files changed, 75 insertions(+) commit 942c5593393d9418bf521e77fa1eab47599efc4d Author: Namhyung Kim Date: Mon Oct 17 19:02:22 2022 -0700 perf stat: Add perf_stat_merge_counters() The perf_stat_merge_counters() is to aggregate the same events in different PMUs like in case of uncore or hybrid. The same logic is in the stat-display routines but I think it should be handled when it processes the event counters. As it works on the aggr_counters, it doesn't change the output yet. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-16-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 2 + tools/perf/util/stat.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/stat.h | 2 + 3 files changed, 100 insertions(+) commit 8962cbec5a0672b3966e9c48ac22e207d56e13ca Author: Namhyung Kim Date: Mon Oct 17 19:02:21 2022 -0700 perf stat: Split process_counters() to share it with process_stat_round_event() It'd do more processing with aggregation. Let's split the function so that it can be shared with by process_stat_round_event() too. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-15-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 8f97963e09761c239522649921d7b1c57ff2debb Author: Namhyung Kim Date: Mon Oct 17 19:02:20 2022 -0700 perf stat: Reset aggr counts for each interval The evsel->stats->aggr->count should be reset for interval processing since we want to use the values directly for display. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-14-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 3 +++ tools/perf/util/stat.c | 20 +++++++++++++++++--- tools/perf/util/stat.h | 1 + 3 files changed, 21 insertions(+), 3 deletions(-) commit ae7e6492ee54e18cc3d6ed4bb5ca857726a7e9c3 Author: Namhyung Kim Date: Mon Oct 17 19:02:19 2022 -0700 perf stat: Allocate aggr counts for recorded data In the process_stat_config_event() it sets the aggr_mode that means the earlier evlist__alloc_stats() cannot allocate the aggr counts due to the missing aggr_mode. Do it after setting the aggr_map using evlist__alloc_aggr_stats(). Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-13-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 20 +++++++++++++++----- tools/perf/util/stat.c | 39 +++++++++++++++++++++++++++++++-------- tools/perf/util/stat.h | 2 ++ 3 files changed, 48 insertions(+), 13 deletions(-) commit 050059e1b1affc080ede9fe691768e2383eb6367 Author: Namhyung Kim Date: Mon Oct 17 19:02:18 2022 -0700 perf stat: Aggregate per-thread stats using evsel->stats->aggr Per-thread aggregation doesn't use the CPU numbers but the logic should be the same. Initialize cpu_aggr_map separately for AGGR_THREAD and use thread map idx to aggregate counter values. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-12-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 31 +++++++++++++++++++++++++++++++ tools/perf/util/stat.c | 24 ++++++++++++++++++++++-- 2 files changed, 53 insertions(+), 2 deletions(-) commit 049aba09e2156dd2ff1a61bf1b8738b0fc864c9d Author: Namhyung Kim Date: Mon Oct 17 19:02:17 2022 -0700 perf stat: Factor out evsel__count_has_error() It's possible to have 0 enabled/running time for some per-task or per-cgroup events since it's not scheduled on any CPU. Treating the whole event as failed would not work in this case. Thinking again, the code only existed when any CPU-level aggregation is enabled (like per-socket, per-core, ...). To make it clearer, factor out the condition check into the new evsel__count_has_error() function and add some comments. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-11-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit f976bc6b6bfc9b14eeaf9a8859191c8f85c253dc Author: Namhyung Kim Date: Mon Oct 17 19:02:16 2022 -0700 perf stat: Aggregate events using evsel->stats->aggr Add a logic to aggregate counter values to the new evsel->stats->aggr. This is not used yet so shadow stats are not updated. But later patch will convert the existing code to use it. With that, we don't need to handle AGGR_GLOBAL specially anymore. It can use the same logic with counts, prev_counts and aggr_counts. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-10-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 3 -- tools/perf/util/evsel.c | 9 +---- .../util/scripting-engines/trace-event-python.c | 6 --- tools/perf/util/stat.c | 46 ++++++++++++++++++---- 4 files changed, 41 insertions(+), 23 deletions(-) commit 1f297a6eb2bd90663518cbb6e9e2a3b2add34b73 Author: Namhyung Kim Date: Mon Oct 17 19:02:15 2022 -0700 perf stat: Allocate evsel->stats->aggr properly The perf_stat_config.aggr_map should have a correct size of the aggregation map. Use it to allocate aggr_counts. Also AGGR_NONE with per-core events can be tricky because it doesn't aggreate basically but it needs to do so for per-core events only. So only per-core evsels will have stats->aggr data. Note that other caller of evlist__alloc_stat() might not have stat_config or aggr_map. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 4 ++-- tools/perf/builtin-stat.c | 6 +++--- tools/perf/tests/parse-metric.c | 2 +- tools/perf/tests/pmu-events.c | 2 +- tools/perf/util/stat.c | 9 +++++++-- tools/perf/util/stat.h | 3 ++- 6 files changed, 16 insertions(+), 10 deletions(-) commit ca68b374d0409bea5cacd4c5a8e0fbb407922d38 Author: Namhyung Kim Date: Mon Oct 17 19:02:14 2022 -0700 perf stat: Add struct perf_stat_aggr to perf_stat_evsel The perf_stat_aggr struct is to keep aggregated counter values and the states according to the aggregation mode. The number of entries is depends on the mode and this is a preparation for the later use. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat.c | 34 +++++++++++++++++++++++++++------- tools/perf/util/stat.h | 19 +++++++++++++++++++ 2 files changed, 46 insertions(+), 7 deletions(-) commit 505ac48ba759cd88d9fd40ec5354cda28e17377b Author: Namhyung Kim Date: Mon Oct 17 19:02:13 2022 -0700 perf stat: Add 'needs_sort' argument to cpu_aggr_map__new() In case of no aggregation, it needs to keep the original (cpu) ordering in the aggr_map so that it can be in sync with the cpu map. This will make the code easier to handle AGGR_NONE similar to others. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 7 +++++-- tools/perf/util/cpumap.c | 6 ++++-- tools/perf/util/cpumap.h | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) commit 8938cfa7480282fb3c75548958b239444affcc50 Author: Namhyung Kim Date: Mon Oct 17 19:02:12 2022 -0700 perf stat: Add cpu aggr id for no aggregation mode Likewise, add an aggr_id for cpu for none aggregation mode. This is not used actually yet but later code will use to unify the aggregation code. No functional change intended. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 48 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) commit 375369abcdb774abadbc1c82d2e6c24f0f1f49a1 Author: Namhyung Kim Date: Mon Oct 17 19:02:11 2022 -0700 perf stat: Add aggr id for global mode To make the code simpler, I'd like to use the same aggregation code for the global mode. We can simply add an id function to return cpu 0 and use print_aggr(). No functional change intended. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 36 ++++++++++++++++++++++++++++++++++-- tools/perf/util/cpumap.c | 10 ++++++++++ tools/perf/util/cpumap.h | 6 +++++- 3 files changed, 49 insertions(+), 3 deletions(-) commit 93d5e700156e03e66eb1bf2158ba3b8a8b354c71 Author: Namhyung Kim Date: Mon Oct 17 19:02:10 2022 -0700 perf stat: Use evsel__is_hybrid() more In the stat-display code, it needs to check if the current evsel is hybrid but it uses perf_pmu__has_hybrid() which can return true for non-hybrid event too. I think it's better to use evsel__is_hybrid(). Also remove a NULL check for the 'config' parameter in the hybrid_merge() since it's called after config->no_merge check. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit b86ac6796b6c1dea83b744812d36922c21f43323 Author: Namhyung Kim Date: Mon Oct 17 19:02:09 2022 -0700 perf tools: Use pmu info in evsel__is_hybrid() If evsel has pmu, it can use pmu->is_hybrid directly. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 3 +++ 1 file changed, 3 insertions(+) commit f7400262ea2192fc79b6f5a68242b3495b016981 Author: Namhyung Kim Date: Mon Oct 17 19:02:08 2022 -0700 perf tools: Save evsel->pmu in parse_events() Now evsel has a pmu pointer, let's save the info and use it like in evsel__find_pmu(). The missing feature check needs to be changed as the pmu pointer can be set from the beginning. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andi Kleen Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Michael Petlan Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20221018020227.85905-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 20 ++++++++++---------- tools/perf/util/parse-events.c | 1 + tools/perf/util/pmu.c | 4 ++++ 3 files changed, 15 insertions(+), 10 deletions(-) commit c4f769d4093d114f3c374ba06d6eef1fb763b56c Author: Nikita Shubin Date: Mon Aug 15 16:22:40 2022 +0300 perf vendor events riscv: add Sifive U74 JSON file This patch add the Sifive U74 JSON file. Link: https://sifive.cdn.prismic.io/sifive/ad5577a0-9a00-45c9-a5d0-424a3d586060_u74_core_complex_manual_21G3.pdf Derived-from-code-by: João Mário Domingos Signed-off-by: Nikita Shubin Tested-by: Kautuk Consul Acked-by: Palmer Dabbelt Cc: Albert Ou Cc: Alexander Shishkin Cc: Anup Patel Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: linux-riscv@lists.infradead.org Cc: linux@yadro.com Link: https://lore.kernel.org/r/20220815132251.25702-4-nikita.shubin@maquefel.me Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/riscv/mapfile.csv | 17 ++++ .../pmu-events/arch/riscv/sifive/u74/firmware.json | 68 ++++++++++++++++ .../arch/riscv/sifive/u74/instructions.json | 92 ++++++++++++++++++++++ .../pmu-events/arch/riscv/sifive/u74/memory.json | 32 ++++++++ .../arch/riscv/sifive/u74/microarch.json | 57 ++++++++++++++ 5 files changed, 266 insertions(+) commit 8f0dcb4e7364af3e5b156e6a3fdac0860733eb86 Author: Nikita Shubin Date: Mon Aug 15 16:22:39 2022 +0300 perf arch events: riscv sbi firmware std event files Firmware events are defined by "RISC-V Supervisor Binary Interface Specification", which means they should be always available as long as firmware supports >= 0.3.0 SBI. Expose them to arch std events, so they can be reused by particular PMU bindings. Signed-off-by: Nikita Shubin Tested-by: Kautuk Consul Acked-by: Palmer Dabbelt Cc: Albert Ou Cc: Alexander Shishkin Cc: Anup Patel Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: linux-riscv@lists.infradead.org Cc: linux@yadro.com Link: https://lore.kernel.org/r/20220815132251.25702-3-nikita.shubin@maquefel.me Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/riscv/riscv-sbi-firmware.json | 134 +++++++++++++++++++++ 1 file changed, 134 insertions(+) commit 25c2e5911705c69d7b01c35ea0b32cbe6ada67cd Author: Nikita Shubin Date: Mon Aug 15 16:22:38 2022 +0300 perf tools riscv: Add support for get_cpuid_str function The get_cpuid_str function returns the string that contains values of MVENDORID, MARCHID and MIMPID in hex format separated by coma. The values themselves are taken from first cpu entry in "/proc/cpuid" that contains "mvendorid", "marchid" and "mimpid". Signed-off-by: Nikita Shubin Tested-by: Kautuk Consul Acked-by: Palmer Dabbelt Cc: Albert Ou Cc: Alexander Shishkin Cc: Anup Patel Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: linux-riscv@lists.infradead.org Cc: linux@yadro.com Link: https://lore.kernel.org/r/20220815132251.25702-2-nikita.shubin@maquefel.me Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/riscv/util/Build | 1 + tools/perf/arch/riscv/util/header.c | 104 ++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) commit 07b444f57f12177e5df639f55dc1d747f4a635c8 Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:21:02 2022 +0000 drm/i915/perf: Enable OA for DG2 OA was disabled for DG2 as support was missing. Enable it back now. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-17-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_perf.c | 6 ------ 1 file changed, 6 deletions(-) commit 0fa9349dda030fa847b36f880a5eea25c3202b66 Author: Lionel Landwerlin Date: Wed Oct 26 22:21:01 2022 +0000 drm/i915/perf: complete programming whitelisting for XEHPSDV We have an additional register to select which slices contribute to OAG/OAG counter increments. Signed-off-by: Lionel Landwerlin Signed-off-by: Matt Roper Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-16-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/i915_perf.c | 13 +++++++++++++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 4 files changed, 17 insertions(+) commit 01e7427467857861d1aaa7cd05598dfcb631c5b5 Author: Vinay Belgaumkar Date: Wed Oct 26 22:21:00 2022 +0000 drm/i915/guc: Support OA when Wa_16011777198 is enabled On DG2, a w/a resets RCS/CCS before it goes into RC6. This breaks OA since OA does not expect engine resets during its use. Fix it by disabling RC6. v2: (Ashutosh) - Bring back slpc_unset_param helper - Update commit msg - Use with_intel_runtime_pm helper for set/unset v3: (Ashutosh) - Just use intel_uc_uses_guc_rc Signed-off-by: Vinay Belgaumkar Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-15-umesh.nerlige.ramappa@intel.com .../gpu/drm/i915/gt/uc/abi/guc_actions_slpc_abi.h | 9 +++ drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 66 ++++++++++++++++++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h | 2 + drivers/gpu/drm/i915/i915_perf.c | 27 +++++++++ 4 files changed, 104 insertions(+) commit fa569804341803032d260de3570bc6bc1698b790 Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:59 2022 +0000 drm/i915/perf: Save/restore EU flex counters across reset If a drm client is killed, then hw contexts used by the client are reset immediately. This reset clears the EU flex counter configuration. If an OA use case is running in parallel, it would start seeing zeroed eu counter values following the reset even if the drm client is restarted. Save/restore the EU flex counter config so that the EU counters can be monitored continuously across resets. v2: - Save/restore eu flex config only for gen12, as for pre-gen12, these are saved and restored in the context image. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-14-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit bc7ed4d30815bc434c1e49dc6784164b352d167c Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:58 2022 +0000 drm/i915/perf: Apply Wa_18013179988 OA reports in the OA buffer contain an OA timestamp field that helps user calculate delta between 2 OA reports. The calculation relies on the CS timestamp frequency to convert the timestamp value to nanoseconds. The CS timestamp frequency is a function of the CTC_SHIFT value in RPM_CONFIG0. In DG2, OA unit assumes that the CTC_SHIFT is 3, instead of using the actual value from RPM_CONFIG0. At the user level, this results in an error in calculating delta between 2 OA reports since the OA timestamp is not shifted in the same manner as CS timestamp. Also the periodicity of the reports is different from what the user configured because of mismatch in the CS and OA frequencies. The issue also affects MI_REPORT_PERF_COUNT command. To resolve this, return actual OA timestamp frequency to the user in i915_getparam_ioctl, so that user can calculate the right OA exponent as well as interpret the reports correctly. MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18893 v2: - Use REG_FIELD_GET (Ashutosh) - Update commit msg Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-13-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_getparam.c | 3 +++ drivers/gpu/drm/i915/i915_perf.c | 30 ++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/i915_perf.h | 2 ++ include/uapi/drm/i915_drm.h | 6 ++++++ 4 files changed, 39 insertions(+), 2 deletions(-) commit ed6b25aa6fbf8855446efc7125e6b5d912b36ed3 Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:57 2022 +0000 drm/i915/perf: Add Wa_1508761755:dg2 Disable Clock gating in EU when gathering the events so that EU events are not lost. v2: Fix checkpatch issues v3: User MCR helpers to write to MC reg v4: Indent correctly (checkpatch) Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-12-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/i915_perf.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit 90981da6da8ce333c49d2748f925fc4ef566785f Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:56 2022 +0000 drm/i915/perf: Store a pointer to oa_format in oa_buffer DG2 introduces OA reports with 64 bit report header fields. Perf OA would need more information about the OA format in order to process such reports. Store all OA format info in oa_buffer instead of just the size and format-id. v2: Drop format_size variable (Ashutosh) Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-11-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_perf.c | 30 ++++++++++++------------------ drivers/gpu/drm/i915/i915_perf_types.h | 3 +-- 2 files changed, 13 insertions(+), 20 deletions(-) commit cc85345dc804f9fbe39ca2727e63058595b01e0f Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:55 2022 +0000 drm/i915/perf: Use gt-specific ggtt for OA and noa-wait buffers User passes uabi engine class and instance to the perf OA interface. Use gt corresponding to the engine to pin the buffers to the right ggtt. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-10-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_perf.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 2db609c014958202e067678758c2a5291a28bae5 Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:54 2022 +0000 drm/i915/perf: Replace gt->perf.lock with stream->lock for file ops With multi-gt, user can access multiple OA buffers concurrently. Use stream->lock instead of gt->perf.lock to serialize file operations. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-9-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_perf.c | 31 ++++++++++++++----------------- drivers/gpu/drm/i915/i915_perf_types.h | 5 +++++ 2 files changed, 19 insertions(+), 17 deletions(-) commit 9677a9f3b1ad3537bc945e7c7e54778632ee2d0f Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:53 2022 +0000 drm/i915/perf: Move gt-specific data from i915->perf to gt->perf Make perf part of gt as the OAG buffer is specific to a gt. The refactor eventually simplifies programming the right OA buffer and the right HW registers when supporting multiple gts. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-8-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/gt/intel_gt_types.h | 3 ++ drivers/gpu/drm/i915/gt/intel_sseu.c | 4 +- drivers/gpu/drm/i915/i915_perf.c | 75 ++++++++++++++++++------------ drivers/gpu/drm/i915/i915_perf_types.h | 39 ++++++++-------- drivers/gpu/drm/i915/selftests/i915_perf.c | 16 +++++-- 5 files changed, 80 insertions(+), 57 deletions(-) commit a5a6d92f77ffde188ce3aa4ccec21fac5b00c6e8 Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:52 2022 +0000 drm/i915/perf: Simply use stream->ctx Earlier code used exclusive_stream to check for user passed context. Simplify this by accessing stream->ctx. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-7-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cceb084905285dcf56912336c9f4f4e7ac334d9f Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:51 2022 +0000 drm/i915/perf: Enable bytes per clock reporting in OA XEHPSDV and DG2 provide a way to configure bytes per clock vs commands per clock reporting. Enable bytes per clock setting on enabling OA. Bspec: 51762 Bspec: 52201 v2: - Fix commit msg (Ashutosh) - Fix checkpatch issues v3: - s/commands/bytes/ in code comment and commmit msg Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-6-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/i915_perf.c | 20 ++++++++++++++++++++ drivers/gpu/drm/i915/i915_perf_oa_regs.h | 4 ++++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 5 files changed, 29 insertions(+) commit a5c3a3cbf0292b1772436e7da0fdda7d818b177d Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:50 2022 +0000 drm/i915/perf: Determine gen12 oa ctx offset at runtime Some SKUs of same gen12 platform may have different oactxctrl offsets. For gen12, determine oactxctrl offsets at runtime. v2: (Lionel) - Move MI definitions to intel_gpu_commands.h - Ensure __find_reg_in_lri does read past context image size v3: (Ashutosh) - Drop unnecessary use of double underscores - fix find_reg_in_lri - Return error if oa context offset is U32_MAX - Error out if oa_ctx_ctrl_offset does not find offset v4: (Ashutosh) - Warn on odd MI LRI_LEN - Remove unnecessary check for valid_oactxctrl_offset - Drop valid_oactxctrl_offset macro v5: Drop unrelated comment Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-5-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 4 + drivers/gpu/drm/i915/i915_perf.c | 146 ++++++++++++++++++++++----- drivers/gpu/drm/i915/i915_perf_oa_regs.h | 2 +- 3 files changed, 127 insertions(+), 25 deletions(-) commit 2d9da585216bd151779c45bb7dc736ea4e9e0249 Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:49 2022 +0000 drm/i915/perf: Fix noa wait predication for DG2 Predication for batch buffer commands changed in XEHPSDV. MI_BATCH_BUFFER_START predicates based on MI_SET_PREDICATE_RESULT register. The MI_SET_PREDICATE_RESULT register can only be modified with MI_SET_PREDICATE command. When configured, the MI_SET_PREDICATE command sets MI_SET_PREDICATE_RESULT based on bit 0 of MI_PREDICATE_RESULT_2. Use this to configure predication in noa_wait. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-4-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/gt/intel_engine_regs.h | 1 + drivers/gpu/drm/i915/i915_perf.c | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) commit 81d5f7d91492aa3a362937926cdc094a7dc1e4b7 Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:48 2022 +0000 drm/i915/perf: Add 32-bit OAG and OAR formats for DG2 Add new OA formats for DG2. MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18893 v2: - Update commit title (Ashutosh) - Coding style fixes (Lionel) - 64 bit OA formats need UMD changes in GPUvis, drop for now and send in a separate series with UMD changes v3: - Update commit message to drop 64 bit related description Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin #1 Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-3-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/i915_perf.c | 7 +++++++ include/uapi/drm/i915_drm.h | 4 ++++ 2 files changed, 11 insertions(+) commit 682aa4373f156512245d391b15dde798d4594a13 Author: Umesh Nerlige Ramappa Date: Wed Oct 26 22:20:47 2022 +0000 drm/i915/perf: Fix OA filtering logic for GuC mode With GuC mode of submission, GuC is in control of defining the context id field that is part of the OA reports. To filter reports, UMD and KMD must know what sw context id was chosen by GuC. There is not interface between KMD and GuC to determine this, so read the upper-dword of EXECLIST_STATUS to filter/squash OA reports for the specific context. v2: Explain guc id stealing w.r.t OA use case Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-2-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/gt/intel_lrc.h | 2 + drivers/gpu/drm/i915/i915_perf.c | 144 +++++++++++++++++++++++++++++++----- 2 files changed, 127 insertions(+), 19 deletions(-) commit 0645b7a64b908ef5cdbf9f117f53d283983fe285 Author: Jiapeng Chong Date: Wed Oct 26 15:01:10 2022 +0800 drm/amd/display: Modify mismatched function name No functional modification involved. drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:615: warning: expecting prototype for setup_subvp_dmub_command(). Prototype was for populate_subvp_cmd_pipe_info() instead. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2587 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5156133094dd6b57325fa107aca8be5be679452e Author: Jiapeng Chong Date: Wed Oct 26 15:01:09 2022 +0800 drm/amd/display: make wake_up_aux_channel static This symbol is not used outside of dc_link_dp.c, so marks it static. drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:5230:16: warning: no previous prototype for function 'wake_up_aux_channel'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2581 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d69a3b762dc4c9fe257b89c2a9ae809770a81d38 Author: Mukul Joshi Date: Mon May 9 10:44:10 2022 -0400 drm/amdkfd: Cleanup kfd_dev struct Cleanup kfd_dev struct by removing ddev and pdev as both drm_device and pci_dev can be fetched from amdgpu_device. Signed-off-by: Mukul Joshi Tested-by: Amber Lin Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 3 +-- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 12 ++++++------ drivers/gpu/drm/amd/amdkfd/kfd_device.c | 16 ++++++---------- drivers/gpu/drm/amd/amdkfd/kfd_iommu.c | 29 +++++++++++++++-------------- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 +--- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 12 ++++++------ drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 25 ++++++++++++------------- 9 files changed, 49 insertions(+), 56 deletions(-) commit 087b8542c0b0d26066547bd2a2b08c58fd63df25 Author: Graham Sider Date: Wed Oct 26 15:08:24 2022 -0400 drm/amdgpu: disable GFXOFF during compute for GFX11 Temporary workaround to fix issues observed in some compute applications when GFXOFF is enabled on GFX11. Signed-off-by: Graham Sider Acked-by: Alex Deucher Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7863c1552632223967f561654422cd2016c2520c Author: Mario Limonciello Date: Wed Oct 26 14:03:55 2022 -0500 drm/amd: Fail the suspend if resources can't be evicted If a system does not have swap and memory is under 100% usage, amdgpu will fail to evict resources. Currently the suspend carries on proceeding to reset the GPU: ``` [drm] evicting device resources failed [drm:amdgpu_device_ip_suspend_phase2 [amdgpu]] *ERROR* suspend of IP block failed -12 [drm] free PSP TMR buffer [TTM] Failed allocating page table [drm] evicting device resources failed amdgpu 0000:03:00.0: amdgpu: MODE1 reset amdgpu 0000:03:00.0: amdgpu: GPU mode1 reset amdgpu 0000:03:00.0: amdgpu: GPU smu mode1 reset ``` At this point if the suspend actually succeeded I think that amdgpu would have recovered because the GPU would have power cut off and restored. However the kernel fails to continue the suspend from the memory pressure and amdgpu fails to run the "resume" from the aborted suspend. ``` ACPI: PM: Preparing to enter system sleep state S3 SLUB: Unable to allocate memory on node -1, gfp=0xdc0(GFP_KERNEL|__GFP_ZERO) cache: Acpi-State, object size: 80, buffer size: 80, default order: 0, min order: 0 node 0: slabs: 22, objs: 1122, free: 0 ACPI Error: AE_NO_MEMORY, Could not update object reference count (20210730/utdelete-651) [drm:psp_hw_start [amdgpu]] *ERROR* PSP load kdb failed! [drm:psp_resume [amdgpu]] *ERROR* PSP resume failed [drm:amdgpu_device_fw_loading [amdgpu]] *ERROR* resume of IP block failed -62 amdgpu 0000:03:00.0: amdgpu: amdgpu_device_ip_resume failed (-62). PM: dpm_run_callback(): pci_pm_resume+0x0/0x100 returns -62 amdgpu 0000:03:00.0: PM: failed to resume async: error -62 ``` To avoid this series of unfortunate events, fail amdgpu's suspend when the memory eviction fails. This will let the system gracefully recover and the user can try suspend again when the memory pressure is relieved. Reported-by: post@davidak.de Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2223 Signed-off-by: Mario Limonciello Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 6803dfd3a69ccb318772463a86e40929fd4fbac7 Author: Hamza Mahfooz Date: Tue Oct 25 15:04:36 2022 -0400 Revert "drm/amd/display: Limit max DSC target bpp for specific monitors" This reverts commit 55eea8ef98641f6e1e1c202bd3a49a57c1dd4059. This quirk is now handled in the DRM core, so we can drop all of the internal code that was added to handle it. Reviewed-by: Harry Wentland Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 35 ---------------------- 1 file changed, 35 deletions(-) commit 6e5abe94c6eb9b281398e39819217e8fdd1c336f Author: Hamza Mahfooz Date: Mon Oct 24 14:53:24 2022 -0400 drm/amd/display: use max_dsc_bpp in amdgpu_dm Since, the quirk is handled in the DRM core now, we can use that value instead of the internal value. Reviewed-by: Harry Wentland Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++---- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 11 +++++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) commit aa193f7eff8ff753577351140b8af13b76cdc7c2 Author: Hamza Mahfooz Date: Fri Oct 21 16:37:34 2022 -0400 drm/edid: add a quirk for two LG monitors to get them to work on 10bpc The LG 27GP950 and LG 27GN950 have visible display corruption when trying to use 10bpc modes. So, to fix this, cap their maximum DSC target bitrate to 15bpp. Suggested-by: Roman Li Reviewed-by: Harry Wentland Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher drivers/gpu/drm/drm_edid.c | 12 ++++++++++++ include/drm/drm_connector.h | 6 ++++++ 2 files changed, 18 insertions(+) commit c9bdc6c3cf39df6db9c611d05fc512b1276b1cc8 Author: Candice Li Date: Tue Oct 11 15:08:38 2022 +0800 drm/amdgpu: Add EEPROM I2C address support for ip discovery 1. Update EEPROM_I2C_MADDR_SMU_13_0_0 to EEPROM_I2C_MADDR_54H 2. Add EEPROM I2C address support for smu v13_0_0 and v13_0_10. Signed-off-by: Candice Li Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit bc22f8ec464af9e14263c3ed6a1c2be86618c804 Author: Candice Li Date: Mon Oct 10 16:26:37 2022 +0800 drm/amdgpu: Update ras eeprom support for smu v13_0_0 and v13_0_10 Enable RAS EEPROM support for smu v13_0_0 and v13_0_10. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 896b7addf2dc24908ad87f8ebeff83b2a83b8e04 Author: Candice Li Date: Tue Oct 25 18:32:15 2022 +0800 drm/amdgpu: Optimize TA load/unload/invoke debugfs interfaces 1. Add a function pointer structure ta_funcs to psp context 2. Make the interfaces generic to all TAs 3. Leverage exisitng TA context and remove unused functions 4. Fix return code bugs v2: Add comments for ta funcs macros and correct typo Reviewed-by: Hawking Zhang Signed-off-by: Candice Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 38 +---- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | 217 ++++++++++++++++++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.h | 5 + 4 files changed, 168 insertions(+), 104 deletions(-) commit bf7d777289d106963fd2080d298e6b88b7263b66 Author: Candice Li Date: Tue Oct 25 18:07:44 2022 +0800 drm/amdgpu: Optimize RAS TA initialization and TA unload funcs 1. Save TA unload psp response status 2. Add RAS TA loading status check for initializaiton 3. Drop RAS context teardown to allow RAS TA to be reloaded Reviewed-by: Hawking Zhang Signed-off-by: Candice Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 9682069a03c1ff031a67d80e7a58cf2b11d7f758 Author: Yang Li Date: Wed Oct 26 10:00:54 2022 +0800 drm/amdkfd: Fix NULL pointer dereference in svm_migrate_to_ram() ./drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:985:58-62: ERROR: p is NULL but dereferenced. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2549 Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d232afb1f3417ae8194ccf19ad3a8360e70e104e Author: gehao Date: Wed Oct 26 17:54:05 2022 +0800 drm/amd/display: prevent memory leak In dce6(0,1,4)_create_resource_pool and dce80_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Rodrigo Siqueira Signed-off-by: gehao Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce60/dce60_resource.c | 3 +++ drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 ++ 2 files changed, 5 insertions(+) commit 58ddbecb14c792b7fe0d92ae5e25c9179d62ff25 Author: Ao Zhong Date: Tue Oct 25 23:17:49 2022 +0200 drm/amd/display: move remaining FPU code to dml folder pipes[pipe_cnt].pipe.src.dcc_fraction_of_zs_req_luma = 0; pipes[pipe_cnt].pipe.src.dcc_fraction_of_zs_req_chroma = 0; these two operations in dcn32/dcn32_resource.c still need to use FPU, This will cause compilation to fail on ARM64 platforms because -mgeneral-regs-only is enabled by default to disable the hardware FPU. Therefore, imitate the dcn31_zero_pipe_dcc_fraction function in dml/dcn31/dcn31_fpu.c, declare the dcn32_zero_pipe_dcc_fraction function in dcn32_fpu.c, and move above two operations into this function. Reviewed-by: Rodrigo Siqueira Signed-off-by: Ao Zhong Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 5 +++-- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 8 ++++++++ drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) commit 64a9f19a5addffe585e872945c0544fed24f83a8 Author: Ao Zhong Date: Wed Oct 26 13:02:19 2022 +0200 drm/amd/display: move remaining FPU code to dml folder In the process of enabling DCN support for arm64, I found that the dcn10_resource_construct_fp function in dcn10/dcn10_resource.c still needs to use FPU. This will cause compilation to fail on ARM64 platforms because -mgeneral-regs-only is enabled by default to disable the hardware FPU. So move dcn10_resource_construct_fp from dcn10 folder to dml/dcn10 folder to enable hardware FPU for that function. Reviewed-by: Rodrigo Siqueira Acked-by: Christian König Signed-off-by: Ao Zhong Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 44 +--------------------- .../gpu/drm/amd/display/dc/dml/dcn10/dcn10_fpu.c | 36 ++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dcn10/dcn10_fpu.h | 2 + 3 files changed, 40 insertions(+), 42 deletions(-) commit 6040517e4a29d3828160c571681eec9ffe10043f Author: Graham Sider Date: Tue Oct 25 14:47:05 2022 -0400 drm/amdgpu: remove deprecated MES version vars MES scheduler and kiq versions are stored in mes.sched_version and mes.kiq_version, respectively, which are read from a register after their queues are initialized. Remove mes.ucode_fw_version and mes.data_fw_version which tried to read this versioning info from the firmware headers (which don't contain this information). Signed-off-by: Graham Sider Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 2 -- drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 4 ---- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 4 ---- 3 files changed, 10 deletions(-) commit 1d522b51e3ab3d65628a5e92c3176df10eab67d4 Author: Graham Sider Date: Tue Oct 25 14:42:13 2022 -0400 drm/amdgpu: correct MES debugfs versions Use mes.sched_version, mes.kiq_version for debugfs as mes.ucode_fw_version does not contain correct versioning information. Signed-off-by: Graham Sider Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7117007edad2299f2f093cdcfa813beb646d913e Author: Alan Liu Date: Mon Oct 24 14:15:30 2022 +0800 drm/amdgpu: Move the mutex_lock to protect the return status of securedisplay command buffer [Why] Before we call psp_securedisplay_invoke(), we call psp_prep_securedisplay_cmd_buf() to prepare and initialize the command buffer. However, we didn't use the mutex_lock to protect the status of command buffer. So when multiple threads are using the command buffer, after thread A return from psp_securedisplay_invoke() and the command buffer status is set to SUCCESS, another thread B may call psp_prep_securedisplay_cmd_buf() and initialize the status to FAILURE again, and cause Thread A to get a failure return status. [How] Move the mutex_lock out of psp_securedisplay_invoke() to its caller to cover psp_prep_securedisplay_cmd_buf() and the code checking the return status of command buffer. Signed-off-by: Alan Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 4 ++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 4 ++++ 3 files changed, 13 insertions(+), 4 deletions(-) commit 1ed0e176902483e67cd02530d387a7551b0e99a4 Author: Tao Zhou Date: Tue Oct 18 10:31:09 2022 +0800 drm/amdgpu: remove ras_error_status parameter for UMC poison handler Make the code simpler. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 13 +++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 4 +--- 4 files changed, 8 insertions(+), 16 deletions(-) commit ae45a18b80d9d0d29f0ecfc52fb4e7831671b299 Author: Tao Zhou Date: Mon Oct 17 18:31:20 2022 +0800 drm/amdgpu: add RAS poison handling for MCA For MCA poison, if unmap queue fails, only gpu reset should be triggered without page retirement handling, MCA notifier will do it. v2: handle MCA poison consumption in umc_poison_handler directly. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit 24b822928b5139b85ee9a818a65e343b7e3bb4fe Author: Tao Zhou Date: Mon Oct 17 18:26:17 2022 +0800 drm/amdgpu: use page retirement API in MCA notifier Make the code more readable. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 36 +++------------------------------ 1 file changed, 3 insertions(+), 33 deletions(-) commit cbe4d43ea5e903ae3e8555cc39047b0ed027738a Author: Tao Zhou Date: Mon Oct 17 18:22:13 2022 +0800 drm/amdgpu: add RAS page retirement functions for MCA Define page retirement functions for MCA platform. v2: remove page retirement handling from MCA poison handler, let MCA notifier do page retirement. v3: remove specific poison handler for MCA to simplify code. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 53 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 2 ++ 2 files changed, 55 insertions(+) commit 2513574853f388008b81a900d56c2f75e7f35be2 Author: Paulo Miguel Almeida Date: Tue Oct 25 21:20:19 2022 +1300 drm/amdkfd: remove unused struct cdit_header struct cdit_header was never used across any of the amd drivers nor this is exposed to UAPI so it can be removed. This patch removes struct cdit_header and refactor code accordingly Signed-off-by: Paulo Miguel Almeida Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_crat.h | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) commit 3f1a02ebeeebe3b8937391646cead0752144f1cb Author: Paulo Miguel Almeida Date: Tue Oct 25 22:12:00 2022 +1300 drm/amdkfd: remove unused kfd_pm4_headers_diq header file kfd_pm4_headers_diq.h header is a leftover from the old H/W debugger module support added on commit fbeb661bfa895dc ("drm/amdkfd: Add skeleton H/W debugger module support"). That implementation was removed after a while and the last file that included that header was removed on commit 5bdd3eb253544b1 ("drm/amdkfd: Remove unused old debugger implementation"). This patch removes the unused header file kfd_pm4_headers_diq.h Signed-off-by: Paulo Miguel Almeida Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_diq.h | 291 ----------------------- 1 file changed, 291 deletions(-) commit 8fe873d48c6224fc968b701e4dc11d1c85eea635 Author: Aidan MacDonald Date: Wed Oct 26 20:43:45 2022 +0100 clk: ingenic: Minor cosmetic fixups for X1000 Remove redundant -1 entries from the parents array and fix a couple indentation / whitespace issues. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221026194345.243007-7-aidanmacdonald.0x0@gmail.com Reviewed-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/x1000-cgu.c | 49 ++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 25 deletions(-) commit 662e8ed7b9500a8f6b74ada79b7672cff7ebffbd Author: Aidan MacDonald Date: Wed Oct 26 20:43:44 2022 +0100 clk: ingenic: Add X1000 audio clocks The X1000's CGU supplies the I2S system clock to the AIC module and ultimately the audio codec, represented by the "i2s" clock. It is a simple mux which can either pass through EXCLK or a PLL multiplied by a fractional divider (the "i2s_pll" clock). The AIC contains a separate 1/N divider controlled by the I2S driver, which generates the bit clock from the system clock. The frame clock is always fixed to 1/64th of the bit clock. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221026194345.243007-6-aidanmacdonald.0x0@gmail.com Reviewed-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/x1000-cgu.c | 70 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 5e5b1005f9902a55f551a7bb336ca08d39fe1300 Author: Aidan MacDonald Date: Wed Oct 26 20:43:43 2022 +0100 dt-bindings: ingenic,x1000-cgu: Add audio clocks Add bindings for audio-related clocks on the Ingenic X1000 SoC. Acked-by: Krzysztof Kozlowski Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221026194345.243007-5-aidanmacdonald.0x0@gmail.com Signed-off-by: Stephen Boyd include/dt-bindings/clock/ingenic,x1000-cgu.h | 4 ++++ 1 file changed, 4 insertions(+) commit c799a77720dd350fd742a99d80139514a0b4df4d Author: Aidan MacDonald Date: Wed Oct 26 20:43:42 2022 +0100 clk: ingenic: Add .set_rate_hook() for PLL clocks The set rate hook is called immediately after updating the clock register but before the spinlock is released. This allows another register to be updated alongside the main one, which is needed to handle the I2S divider on some SoCs. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221026194345.243007-4-aidanmacdonald.0x0@gmail.com Reviewed-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/cgu.c | 3 +++ drivers/clk/ingenic/cgu.h | 4 ++++ 2 files changed, 7 insertions(+) commit d84bf9d6308e2606b60bb5b4577f8b9ac295cf0b Author: Aidan MacDonald Date: Wed Oct 26 20:43:41 2022 +0100 clk: ingenic: Make PLL clock enable_bit and stable_bit optional When the enable bit is undefined, the clock is assumed to be always on and enable/disable is a no-op. When the stable bit is undefined, the PLL stable check is a no-op. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221026194345.243007-3-aidanmacdonald.0x0@gmail.com Reviewed-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/cgu.c | 14 +++++++++++++- drivers/clk/ingenic/cgu.h | 10 ++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) commit 83b975b5aa9522b6d72b2a8c0f3c209726ceb6b3 Author: Aidan MacDonald Date: Wed Oct 26 20:43:40 2022 +0100 clk: ingenic: Make PLL clock "od" field optional Add support for defining PLL clocks with od_bits = 0, meaning that OD is fixed to 1 and there is no OD field in the register. In this case od_max must also be 0, which is enforced with BUG_ON(). Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221026194345.243007-2-aidanmacdonald.0x0@gmail.com Reviewed-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/cgu.c | 25 +++++++++++++++++-------- drivers/clk/ingenic/cgu.h | 3 ++- 2 files changed, 19 insertions(+), 9 deletions(-) commit 5468c36d628524effbb89a9503eb1a2318804759 Author: Fangzhi Zuo Date: Thu Oct 20 16:06:26 2022 -0400 drm/amd/display: Filter Invalid 420 Modes for HDMI TMDS [Why] Invalidate unsupported 420 modes on HDMI TMDS. HDMI TMDS does not support ODM. Any modes that are horizontally wider than 4096, cannot be supported via TMDS. So they must be filtered out and should not pass validation. [How] Create fake plane for the new stream, and validate global state by going through dml validation routine. Tested-by: Mark Broadworth Acked-by: Rodrigo Siqueira Signed-off-by: Fangzhi Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 67 +++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit e366f36958f60c431a7430c8c421c9db0ec6738d Author: Rodrigo Siqueira Date: Tue Oct 18 16:27:59 2022 -0400 drm/amd/display: Rework comments on dc file The file dc.c has multiple comments that do not follow the kernel-doc or are made in a distracting way. This commit alleviates part of this issue by reorganizing some comments inside the dc file. Signed-off-by: Rodrigo Siqueira Reviewed-by: Hamza Mahfooz Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 161 ++++++++++++------------------- drivers/gpu/drm/amd/display/dc/dc.h | 32 ++---- 2 files changed, 70 insertions(+), 123 deletions(-) commit 9552b19edcf640103e4b6ad2ab0b46ae8d92b6be Author: Aric Cyr Date: Thu Oct 20 11:47:02 2022 -0400 drm/amd/display: 3.2.209 DC version 3.2.209 brings along the following: * Improve color manipulation * Add corrections to DML and some flag configuration * Updates for DCN32x * Expand kernel-doc Tested-by: Mark Broadworth Acked-by: Rodrigo Siqueira Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 887e8cec55f20c39e14e04eb5f8a013ba75312ce Author: Yifan Zhang Date: Mon Oct 24 12:47:47 2022 +0800 drm/amdgpu: set fb_modifiers_not_supported in vkms This patch to fix the gdm3 start failure with virual display: /usr/libexec/gdm-x-session[1711]: (II) AMDGPU(0): Setting screen physical size to 270 x 203 /usr/libexec/gdm-x-session[1711]: (EE) AMDGPU(0): Failed to make import prime FD as pixmap: 22 /usr/libexec/gdm-x-session[1711]: (EE) AMDGPU(0): failed to set mode: Invalid argument /usr/libexec/gdm-x-session[1711]: (WW) AMDGPU(0): Failed to set mode on CRTC 0 /usr/libexec/gdm-x-session[1711]: (EE) AMDGPU(0): Failed to enable any CRTC gnome-shell[1840]: Running GNOME Shell (using mutter 42.2) as a X11 window and compositing manager /usr/libexec/gdm-x-session[1711]: (EE) AMDGPU(0): failed to set mode: Invalid argument vkms doesn't have modifiers support, set fb_modifiers_not_supported to bring the gdm back. Signed-off-by: Yifan Zhang Acked-by: Guchun Chen Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 ++ 1 file changed, 2 insertions(+) commit 6a0114e0e31cdf391b96ab347618baa9201c12ad Author: Rodrigo Siqueira Date: Thu Oct 20 11:47:01 2022 -0400 drm/amd/display: Add kernel doc for commit sequence Add basic kernel-doc that describes some of the struct and functions that are part of the DC commit sequence.. Tested-by: Mark Broadworth Reviewed-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 63 +++++++++++++++++++---- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 11 ++++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 16 +++++- 3 files changed, 79 insertions(+), 11 deletions(-) commit fa0fc4fb09b4306ce77093987ee7b84ead697182 Author: Rodrigo Siqueira Date: Thu Oct 20 11:47:00 2022 -0400 drm/amd/display: Add kernel doc to some of the dc fields Add kernel-doc to some important elements from DC struct that might help to understand DC sequence. Tested-by: Mark Broadworth Reviewed-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 5 ++- drivers/gpu/drm/amd/display/dc/dc_link.h | 8 +++++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 38 +++++++++++++++++------ 3 files changed, 40 insertions(+), 11 deletions(-) commit a6126e14cfb200ecb915c66bccbfc077c704c1fa Author: Rodrigo Siqueira Date: Thu Oct 20 11:46:59 2022 -0400 drm/amd/display: Add basic ODM description Add kernel-doc to some of the ODM-related functions. Tested-by: Mark Broadworth Reviewed-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 3 +++ drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h | 5 +++++ 3 files changed, 24 insertions(+) commit 61708a47e84bc458fae9fbc8a9070fb62a9bcf6d Author: Rodrigo Siqueira Date: Thu Oct 20 11:46:58 2022 -0400 drm/amd/display: Add DEC/CRB basic doc Add a kernel-doc to the DE-Tile function hook. Tested-by: Mark Broadworth Reviewed-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.c | 4 ++++ drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 15 +++++++++++++++ 2 files changed, 19 insertions(+) commit 1682bd1a6b5fb094e914d9b73b711821fd84dcbd Author: Rodrigo Siqueira Date: Thu Oct 20 11:46:57 2022 -0400 drm/amd/display: Expand kernel doc for DC This commit adds extra documentation for elements related to FAMs. Tested-by: Mark Broadworth Reviewed-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 19 +++++++++++++--- drivers/gpu/drm/amd/display/dc/dc_stream.h | 11 ++++++++++ drivers/gpu/drm/amd/display/dc/dml/dc_features.h | 7 ++++++ .../drm/amd/display/dc/dml/display_mode_enums.h | 25 ++++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 9 ++++++++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 7 ++++++ drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 7 ++++++ 7 files changed, 82 insertions(+), 3 deletions(-) commit b1a98cf89a695d36c414653634ea7ba91b6e701f Author: Ma Hanghong Date: Thu Oct 20 11:46:56 2022 -0400 drm/amd/display: Wrong colorimetry workaround [Why] For FreeSync HDR, native color space flag in AMD VSIF(BT.709) should be used when intepreting content and color space flag in VSC or AVI infoFrame should be ignored. However, it turned out some userspace application still use color flag in VSC or AVI infoFrame which is incorrect. [How] Transfer function is used when building the VSC and AVI infoFrame. Set colorimetry to BT.709 when all the following match: 1. Pixel format is YCbCr; 2. In FreeSync 2 HDR, color is COLOR_SPACE_2020_YCBCR; 3. Transfer function is TRANSFER_FUNC_GAMMA_22; Tested-by: Mark Broadworth Reviewed-by: Krunoslav Kovac Acked-by: Rodrigo Siqueira Signed-off-by: Ma Hanghong Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++++- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 6 ++++++ drivers/gpu/drm/amd/display/modules/inc/mod_info_packet.h | 3 ++- drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c | 6 +++++- 4 files changed, 17 insertions(+), 3 deletions(-) commit 1e8fd864afdc7a52df375e888a03b8472fc24f5d Author: zhikzhai Date: Thu Oct 20 11:46:55 2022 -0400 drm/amd/display: skip commit minimal transition state [WHY] Now dynamic ODM will now be disabled when MPO is required safe transitions to avoid underflow, but we are triggering the way of minimal transition too often. Commit state of dc with no check will do pipeline setup which may re-initialize the component with no need such as audio. [HOW] Just do the minimal transition when all of pipes are in use, otherwise return true to skip. Tested-by: Mark Broadworth Reviewed-by: Dillon Varone Acked-by: Rodrigo Siqueira Signed-off-by: zhikzhai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit fadbafc1b7b7a36d479a8e34adc85e8f7c614a3e Author: Daniel Palmer Date: Sat Oct 22 15:34:04 2022 +0200 clk: mstar: msc313 cpupll clk driver Add a driver for the CPU pll/ARM pll/MIPS pll that is present in MStar SoCs. Currently there is no documentation for this block so it's possible this driver isn't entirely correct. Only tested on the version of this IP in the MStar/SigmaStar ARMv7 SoCs. Signed-off-by: Daniel Palmer Co-developed-by: Willy Tarreau Signed-off-by: Willy Tarreau Signed-off-by: Romain Perier Link: https://lore.kernel.org/r/20221022133404.3832-2-romain.perier@gmail.com Signed-off-by: Stephen Boyd drivers/clk/mstar/Kconfig | 7 ++ drivers/clk/mstar/Makefile | 1 + drivers/clk/mstar/clk-msc313-cpupll.c | 220 ++++++++++++++++++++++++++++++++++ 3 files changed, 228 insertions(+) commit 203ccaf586446b578909de1b763278033fb74b51 Author: Haiyi Zhou Date: Thu Oct 20 11:46:54 2022 -0400 drm/amd/display: wait for vblank during pipe programming [WHY] Skipping vblank during global sync update request can result in underflow on certain displays. [HOW] Roll back to the previous behavior where DC waits for vblank during pipe programming. Fixes: 5d3e14421410 ("drm/amd/display: do not wait for vblank during pipe programming") Tested-by: Mark Broadworth Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira Signed-off-by: Haiyi Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6bf20b9ba7863ecfa14f5b4171f719256b787b34 Author: Aric Cyr Date: Thu Oct 20 11:46:53 2022 -0400 drm/amd/display: Fix SDR visual confirm Apply SDR visual confirm to RGB10 and FP16 formats as well when needed. Tested-by: Mark Broadworth Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit c3575dd201895aa5cbb50712e3879a650cde9eb4 Author: Max Tseng Date: Thu Oct 20 11:46:52 2022 -0400 drm/amd/display: cursor update command incomplete Missing send cursor_rect width & Height into DMUB. PSR-SU would use these information. But missing these assignment in last refactor commit Tested-by: Mark Broadworth Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Max Tseng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6894534b56059f68a96a3fcf357e15671de0d24e Author: Alvin Lee Date: Thu Oct 20 11:46:51 2022 -0400 drm/amd/display: Enable timing sync on DCN32 Missed enabling timing sync on DCN32 because DCN32 has a different DML param. Tested-by: Mark Broadworth Reviewed-by: Martin Leung Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 1 + 1 file changed, 1 insertion(+) commit 35fe1915eebde4546cea5fd4e86e76f47d7b5dae Author: Bhawanpreet Lakha Date: Thu Oct 20 11:46:50 2022 -0400 drm/amd/display: Fix HDCP 1.X 1A-04 failing [Why] On some linux based OS, the hotplug->HDCP start takes longer than 4seconds (by ~100ms) This is due to the HDCP delay (3 sec) so we only have 1 second to hotplug->stream enablement, which is not enough for certain OS configs. [How] Change the Delay to 0 seconds. From testing it seems like 0 Seconds can pass 1.x and 2.x compliances Tested-by: Mark Broadworth Reviewed-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3442f4e0e55555d14b099c17382453fdfd2508d5 Author: Alvin Lee Date: Thu Oct 20 11:46:49 2022 -0400 drm/amd/display: Remove optimization for VRR updates Optimization caused unexpected regression, so remove for now. Tested-by: Mark Broadworth Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 --- 1 file changed, 3 deletions(-) commit 33151fb787692edf8275120435c8cc41bfe0cf63 Author: Dillon Varone Date: Thu Oct 20 11:46:48 2022 -0400 drm/amd/display: Set memclk levels to be at least 1 for dcn32 [Why] Cannot report 0 memclk levels even when SMU does not provide any. [How] When memclk levels reported by SMU is 0, set levels to 1. Tested-by: Mark Broadworth Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 3 +++ 1 file changed, 3 insertions(+) commit 4fd8575dc59c2e725c38f55f8167be9df1040ef9 Author: Dillon Varone Date: Thu Oct 20 11:46:47 2022 -0400 drm/amd/display: Update latencies on DCN321 Update DF related latencies based on new measurements. Tested-by: Mark Broadworth Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5384d0e2b0e6afc717a523420a4b30e96dc9a99b Author: Aric Cyr Date: Thu Oct 20 11:46:46 2022 -0400 drm/amd/display: 3.2.208 DC version 3.2.208 brings along the following: * Add more kernel doc * Enable secure display on DCN21 * Limit dcn32 to 1950Mhz display clock * PSR code refactor * Rework audio stream sequence * Generic bug fixes Tested-by: Mark Broadworth Acked-by: Rodrigo Siqueira Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fb695d9e67d86c28f888b22d246c4333afa8a71 Author: Anthony Koo Date: Thu Oct 20 11:46:45 2022 -0400 drm/amd/display: Document part of the DMUB cmd Add a simple documentation in the dmub_cmd. Tested-by: Mark Broadworth Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Anthony Koo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit f7f697403f2067ddbeff3344a4c2d20ff44ace79 Author: Jun Lei Date: Thu Oct 20 11:46:44 2022 -0400 drm/amd/display: Limit dcn32 to 1950Mhz display clock [why] Hardware team recommends we limit dispclock to 1950Mhz for all DCN3.2.x [how] Limit to 1950 when initializing clocks. Tested-by: Mark Broadworth Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Jun Lei Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 62fa035b5605a993fa3b4526af8b6ed145e3ce1b Author: Alan Liu Date: Thu Oct 20 11:46:43 2022 -0400 drm/amd/display: Drop struct crc_region and reuse struct rect [Why] reuse struct rect rather than adding a new struct. [How] - Userspace keeps inputting x_start, y_start, x_end, y_end - We translate data to x, y, width, height in code flow to store - translate back to x_start, y_start, x_end, y_end before programming HW Tested-by: Mark Broadworth Reviewed-by: Wayne Lin Acked-by: Rodrigo Siqueira Signed-off-by: Alan Liu Signed-off-by: Alex Deucher .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 20 +++++++++++--------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 7 +++++-- .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 16 ++++++++-------- drivers/gpu/drm/amd/display/dc/core/dc.c | 20 ++++++++++---------- drivers/gpu/drm/amd/display/dc/dc_stream.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 7 ------- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 14 ++++++++++---- drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h | 2 +- 8 files changed, 46 insertions(+), 42 deletions(-) commit c0459bddd1955df35c9331757671e64e3ea0a77a Author: Alan Liu Date: Thu Oct 20 11:46:42 2022 -0400 drm/amd/display: Implement secure display on DCN21 [Why] Porting secure display feature from DCN10 to DCN21. Support single display for now and will extend to multiple displays. [How] - use workqueue to offload works for dmub or dmcu firmware - after receiving ROI update from userspace, set skip_frame_cnt to 1 - refactor amdgpu_dm_crtc_handle_crc_window_irq() - disable PSR before activating secure_display on a crtc - check if secure_display is activated before enabling psr - only work for single display for now. Tested-by: Mark Broadworth Reviewed-by: Wayne Lin Acked-by: Rodrigo Siqueira Signed-off-by: Alan Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 151 ++++++++++----------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 17 ++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 3 + .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 55 +++++--- .../amd/display/amdgpu_dm/amdgpu_dm_irq_params.h | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 115 ++++++++-------- drivers/gpu/drm/amd/display/dc/dc_stream.h | 8 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 14 ++ drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h | 14 -- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 26 ++++ 11 files changed, 223 insertions(+), 189 deletions(-) commit d1bc26cb5cd51fd1e7984423b665bf8abfd69256 Author: Fangzhi Zuo Date: Thu Oct 20 11:46:41 2022 -0400 drm/amd/display: Ignore Cable ID Feature Ignore cable ID for DP2 receivers that does not support the feature. Tested-by: Mark Broadworth Reviewed-by: Roman Li Acked-by: Rodrigo Siqueira Signed-off-by: Fangzhi Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+) commit e37203511c1f2622398eafb7c94a00915bf8e1a1 Author: Leo Chen Date: Thu Oct 20 11:46:40 2022 -0400 drm/amd/display: Update DSC capabilitie for DCN314 dcn314 has 4 DSC - conflicted hardware document updated and confirmed. Tested-by: Mark Broadworth Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Leo Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 571f97f7d51fa81e6cc0e00f0f6314792ce533a3 Author: Ravi Bangoria Date: Mon Oct 10 12:17:50 2022 +0200 perf: Optimize perf_tp_event() Use the event group trees to iterate only perf_tracepoint events. Signed-off-by: Ravi Bangoria kernel/events/core.c | 134 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 79 insertions(+), 55 deletions(-) commit bd27568117664b8b3e259721393df420ed51f57b Author: Peter Zijlstra Date: Sat Oct 8 11:54:24 2022 +0530 perf: Rewrite core context handling There have been various issues and limitations with the way perf uses (task) contexts to track events. Most notable is the single hardware PMU task context, which has resulted in a number of yucky things (both proposed and merged). Notably: - HW breakpoint PMU - ARM big.little PMU / Intel ADL PMU - Intel Branch Monitoring PMU - AMD IBS PMU - S390 cpum_cf PMU - PowerPC trace_imc PMU *Current design:* Currently we have a per task and per cpu perf_event_contexts: task_struct::perf_events_ctxp[] <-> perf_event_context <-> perf_cpu_context ^ | ^ | ^ `---------------------------------' | `--> pmu ---' v ^ perf_event ------' Each task has an array of pointers to a perf_event_context. Each perf_event_context has a direct relation to a PMU and a group of events for that PMU. The task related perf_event_context's have a pointer back to that task. Each PMU has a per-cpu pointer to a per-cpu perf_cpu_context, which includes a perf_event_context, which again has a direct relation to that PMU, and a group of events for that PMU. The perf_cpu_context also tracks which task context is currently associated with that CPU and includes a few other things like the hrtimer for rotation etc. Each perf_event is then associated with its PMU and one perf_event_context. *Proposed design:* New design proposed by this patch reduce to a single task context and a single CPU context but adds some intermediate data-structures: task_struct::perf_event_ctxp -> perf_event_context <- perf_cpu_context ^ | ^ ^ `---------------------------' | | | | perf_cpu_pmu_context <--. | `----. ^ | | | | | | v v | | ,--> perf_event_pmu_context | | | | | | | v v | perf_event ---> pmu ----------------' With the new design, perf_event_context will hold all events for all pmus in the (respective pinned/flexible) rbtrees. This can be achieved by adding pmu to rbtree key: {cpu, pmu, cgroup, group_index} Each perf_event_context carries a list of perf_event_pmu_context which is used to hold per-pmu-per-context state. For example, it keeps track of currently active events for that pmu, a pmu specific task_ctx_data, a flag to tell whether rotation is required or not etc. Additionally, perf_cpu_pmu_context is used to hold per-pmu-per-cpu state like hrtimer details to drive the event rotation, a pointer to perf_event_pmu_context of currently running task and some other ancillary information. Each perf_event is associated to it's pmu, perf_event_context and perf_event_pmu_context. Further optimizations to current implementation are possible. For example, ctx_resched() can be optimized to reschedule only single pmu events. Much thanks to Ravi for picking this up and pushing it towards completion. Signed-off-by: Peter Zijlstra (Intel) Co-developed-by: Ravi Bangoria Signed-off-by: Ravi Bangoria Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221008062424.313-1-ravi.bangoria@amd.com arch/arm64/kernel/perf_event.c | 18 +- arch/powerpc/perf/core-book3s.c | 8 +- arch/s390/kernel/perf_pai_crypto.c | 2 +- arch/s390/kernel/perf_pai_ext.c | 2 +- arch/x86/events/amd/brs.c | 2 +- arch/x86/events/amd/lbr.c | 6 +- arch/x86/events/core.c | 44 +- arch/x86/events/intel/core.c | 23 +- arch/x86/events/intel/ds.c | 4 +- arch/x86/events/intel/lbr.c | 30 +- arch/x86/events/perf_event.h | 30 +- drivers/perf/arm_pmu.c | 16 +- include/linux/perf/arm_pmu.h | 2 +- include/linux/perf_event.h | 125 ++- include/linux/sched.h | 2 +- kernel/events/core.c | 1958 ++++++++++++++++++------------------ 16 files changed, 1178 insertions(+), 1094 deletions(-) commit 8388eb067cd6db7ea514235d84798dd73872208a Author: Ville Syrjälä Date: Wed Oct 26 20:01:50 2022 +0300 drm/i915/sdvo: Extract intel_sdvo_has_audio() Pull the SDVO audio state computation into a helper. This is almost identical to intel_hdmi_has_audio(), except the sink capabilities are stored under intel_sdvo rather than intel_hdmi. Might be nice to get rid of this duplication eventually... Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-16-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_sdvo.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit c3c5dc1d9224fb3e0c6a104527567090fbbae13c Author: Ville Syrjälä Date: Wed Oct 26 20:01:49 2022 +0300 drm/i915/audio: Do the vblank waits The spec tells us to do a bunch of vblank waits in the audio enable/disable sequences. Make it so. The FIXMEs are nonsense since we do the audio disable very early and enable very late, so vblank interrupts are in fact enabled when we do this. TODO not sure we actually want these since we don't even rely on the hw ELD buffer, and these might be there just to give the audio side a bit of time to respond to the unsol events. OTOH they might be really needed for some other reason. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Acked-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-15-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 31 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit cbbda2ffbb6533fba01b9c40b12c8532a115da46 Author: Ville Syrjälä Date: Wed Oct 26 20:01:48 2022 +0300 drm/i915/audio: Split "ELD valid" vs. audio PD on hsw+ On the older platforms the audio presence detect bit is in the port register, so it gets written outside audio codec hooks and is this separate from the ELD valid toggling. Split the operations into two steps on hsw+ to be more consistent with both the other platforms and the spec. Also according to the spec we might need some vblank waits between the two which definitely needs them done separately. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-14-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 7c8d74e8131217e928fb92904cac5362e348744f Author: Ville Syrjälä Date: Wed Oct 26 20:01:47 2022 +0300 drm/i915/audio: Use intel_de_rmw() for most audio registers The audio code does a lot of RMW accesses. Utilize intel_de_rmw() to make that a bit less tedious. There are still some hand rolled RMW left, but those have a lot of code in between the read and write to calculate the new value, so would need some refactoring first. v2: Add parens around the ?: to satisfy the robot Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-13-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 138 ++++++++++++----------------- 1 file changed, 57 insertions(+), 81 deletions(-) commit 50a4a926e65021b9f1b15e48d9439b3726ba3546 Author: Ville Syrjälä Date: Wed Oct 26 20:01:46 2022 +0300 drm/i915/audio: Use u32* for ELD Make the eld pointer u32* so we don't have to do super ugly casting in the code itself. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-12-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 0234cda2ceb9b90da55e3bc43dfda451b152acb1 Author: Ville Syrjälä Date: Wed Oct 26 20:01:45 2022 +0300 drm/i915/audio: Make sure we write the whole ELD buffer Currently we only write as many dwords into the hardware ELD buffers as drm_eld_size() tells us. That could mean the remainder of the hardware buffer is left with whatever stale garbage it had before, which doesn't seem entirely great. Let's zero out the remainder of the buffer in case the provided ELD doesn't fill it fully. We can also sanity check out idea of the hardware ELD buffer's size by making sure the address wrapped back to zero once we wrote the entire buffer. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-11-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 34 ++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) commit 1c0ab71acc83091f55f9c9091f9959d5be565dff Author: Ville Syrjälä Date: Wed Oct 26 20:01:44 2022 +0300 drm/i915/audio: Read ELD buffer size from hardware We currently read the ELD buffer size from hardware on g4x, but on ilk+ we just hardcode it to 84 bytes. Let's unify this and just do the hardware readout on all platforms, in case the size changes in the future or something. TODO: should perhaps do the readout during driver init and stash the results somewhere so that we could check that the connector's ELD actually fits and not even try to enable audio in that case... v2: Document the size is in dwords (Jani) Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-10-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 52 ++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 7 deletions(-) commit 6e22c35ddaa19dcaa57bf9bfb4ca747ee7ce98a6 Author: Ville Syrjälä Date: Wed Oct 26 20:01:43 2022 +0300 drm/i915/audio: Nuke intel_eld_uptodate() No idea why we do this ELD comparions on g4x before loading the new ELD. Seems entirely pointless so just get rid of it. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-9-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 33 ------------------------------ 1 file changed, 33 deletions(-) commit 9f4a51256f439265f28d729a8866692337d58505 Author: Ville Syrjälä Date: Wed Oct 26 20:01:42 2022 +0300 drm/i915/audio: Protect singleton register with a lock On the "ilk" platforms AUD_CNTL_ST2 is a singleton. Protect it with the audio mutex in case we ever want to do parallel RMW access to it. Currently that should not happen since we only do audio enable/disable from full modesets, and those are fully serialized. But we probably want to think about toggling audio on/off from fastsets too. The hsw codepaths already have the same locking. g4x should not need it since it can only do audio to a single port at a time, which means it's actually broken in more ways than this atm. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-8-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 985a74d8ecc675e7e0535de1ad5812076d040569 Author: Ville Syrjälä Date: Wed Oct 26 20:01:41 2022 +0300 drm/i915/audio: Unify register bit naming Rename a few g4x bits to match the ibx+ bits. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-7-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 10 +++++----- drivers/gpu/drm/i915/display/intel_audio_regs.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit 011aa42ef6ae7809249eaacca78081d357ffc95a Author: Ville Syrjälä Date: Wed Oct 26 20:01:40 2022 +0300 drm/i915/audio: Use REG_BIT() & co. Switch the audio registers to REG_BIT() & co. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 15 ++--- drivers/gpu/drm/i915/display/intel_audio_regs.h | 81 ++++++++++++------------- 2 files changed, 45 insertions(+), 51 deletions(-) commit 669d7fd64099b400759a9b0ca54d92da8330d1a1 Author: Ville Syrjälä Date: Wed Oct 26 20:01:39 2022 +0300 drm/i915/audio: Extract struct ilk_audio_regs The "ilk" audio codec codepaths have some duplicated code to figure out the correct registers to use on each platform. Extrat that into a single place. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 85 +++++++++++++++--------------- 1 file changed, 43 insertions(+), 42 deletions(-) commit b87a9a128bf00e496376c038f51c638b12782833 Author: Ville Syrjälä Date: Wed Oct 26 20:01:38 2022 +0300 drm/i915/audio: Remove CL/BLC audio stuff We don't use the audio code on crestline (CL) since it doesn't support native HDMI output, and SDVO has it's own way of doing audio. And Bearlake-C (BLC) doesn't even exist in the real world, so no point it trying to deal with it. Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 23 +++++------------------ drivers/gpu/drm/i915/display/intel_audio_regs.h | 8 +------- 2 files changed, 6 insertions(+), 25 deletions(-) commit 0ff6b8eafd1800b245b2601688d8e202649167cf Author: Ville Syrjälä Date: Wed Oct 26 20:01:37 2022 +0300 drm/i915/audio: Nuke leftover ROUNDING_FACTOR Remove some leftovers I missed in commit 2dd43144e824 ("drm/i915: Streamline the artihmetic") Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 2 -- 1 file changed, 2 deletions(-) commit 46e61ee4e01e4a8a7e4e13a249d46c4cbc99ed88 Author: Ville Syrjälä Date: Wed Oct 26 20:01:36 2022 +0300 drm/i915/audio: s/dev_priv/i915/ Rename the 'dev_priv' variables to 'i915' in the audio code to match modern style conventions. v2: Drop some needless braces in intel_audio_hooks_init() Cc: Chaitanya Kumar Borah Cc: Kai Vehmanen Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_audio.c | 391 ++++++++++++------------ drivers/gpu/drm/i915/display/intel_audio_regs.h | 2 +- 2 files changed, 196 insertions(+), 197 deletions(-) commit a8a4f0467d706fc22d286dfa973946e5944b793c Author: Nathan Chancellor Date: Tue Oct 25 21:50:15 2022 +0200 drm/i915: Fix CFI violations in gt_sysfs When booting with CONFIG_CFI_CLANG, there are numerous violations when accessing the files under /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt/gt0: $ cd /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt/gt0 $ grep . * id:0 punit_req_freq_mhz:350 rc6_enable:1 rc6_residency_ms:214934 rps_act_freq_mhz:1300 rps_boost_freq_mhz:1300 rps_cur_freq_mhz:350 rps_max_freq_mhz:1300 rps_min_freq_mhz:350 rps_RP0_freq_mhz:1300 rps_RP1_freq_mhz:350 rps_RPn_freq_mhz:350 throttle_reason_pl1:0 throttle_reason_pl2:0 throttle_reason_pl4:0 throttle_reason_prochot:0 throttle_reason_ratl:0 throttle_reason_status:0 throttle_reason_thermal:0 throttle_reason_vr_tdc:0 throttle_reason_vr_thermalert:0 $ sudo dmesg &| grep "CFI failure at" [ 214.595903] CFI failure at kobj_attr_show+0x19/0x30 (target: id_show+0x0/0x70 [i915]; expected type: 0xc527b809) [ 214.596064] CFI failure at kobj_attr_show+0x19/0x30 (target: punit_req_freq_mhz_show+0x0/0x40 [i915]; expected type: 0xc527b809) [ 214.596407] CFI failure at kobj_attr_show+0x19/0x30 (target: rc6_enable_show+0x0/0x40 [i915]; expected type: 0xc527b809) [ 214.596528] CFI failure at kobj_attr_show+0x19/0x30 (target: rc6_residency_ms_show+0x0/0x270 [i915]; expected type: 0xc527b809) [ 214.596682] CFI failure at kobj_attr_show+0x19/0x30 (target: act_freq_mhz_show+0x0/0xe0 [i915]; expected type: 0xc527b809) [ 214.596792] CFI failure at kobj_attr_show+0x19/0x30 (target: boost_freq_mhz_show+0x0/0xe0 [i915]; expected type: 0xc527b809) [ 214.596893] CFI failure at kobj_attr_show+0x19/0x30 (target: cur_freq_mhz_show+0x0/0xe0 [i915]; expected type: 0xc527b809) [ 214.596996] CFI failure at kobj_attr_show+0x19/0x30 (target: max_freq_mhz_show+0x0/0xe0 [i915]; expected type: 0xc527b809) [ 214.597099] CFI failure at kobj_attr_show+0x19/0x30 (target: min_freq_mhz_show+0x0/0xe0 [i915]; expected type: 0xc527b809) [ 214.597198] CFI failure at kobj_attr_show+0x19/0x30 (target: RP0_freq_mhz_show+0x0/0xe0 [i915]; expected type: 0xc527b809) [ 214.597301] CFI failure at kobj_attr_show+0x19/0x30 (target: RP1_freq_mhz_show+0x0/0xe0 [i915]; expected type: 0xc527b809) [ 214.597405] CFI failure at kobj_attr_show+0x19/0x30 (target: RPn_freq_mhz_show+0x0/0xe0 [i915]; expected type: 0xc527b809) [ 214.597538] CFI failure at kobj_attr_show+0x19/0x30 (target: throttle_reason_bool_show+0x0/0x50 [i915]; expected type: 0xc527b809) [ 214.597701] CFI failure at kobj_attr_show+0x19/0x30 (target: throttle_reason_bool_show+0x0/0x50 [i915]; expected type: 0xc527b809) [ 214.597836] CFI failure at kobj_attr_show+0x19/0x30 (target: throttle_reason_bool_show+0x0/0x50 [i915]; expected type: 0xc527b809) [ 214.597952] CFI failure at kobj_attr_show+0x19/0x30 (target: throttle_reason_bool_show+0x0/0x50 [i915]; expected type: 0xc527b809) [ 214.598071] CFI failure at kobj_attr_show+0x19/0x30 (target: throttle_reason_bool_show+0x0/0x50 [i915]; expected type: 0xc527b809) [ 214.598177] CFI failure at kobj_attr_show+0x19/0x30 (target: throttle_reason_bool_show+0x0/0x50 [i915]; expected type: 0xc527b809) [ 214.598307] CFI failure at kobj_attr_show+0x19/0x30 (target: throttle_reason_bool_show+0x0/0x50 [i915]; expected type: 0xc527b809) [ 214.598439] CFI failure at kobj_attr_show+0x19/0x30 (target: throttle_reason_bool_show+0x0/0x50 [i915]; expected type: 0xc527b809) [ 214.598542] CFI failure at kobj_attr_show+0x19/0x30 (target: throttle_reason_bool_show+0x0/0x50 [i915]; expected type: 0xc527b809) With kCFI, indirect calls are validated against their expected type versus actual type and failures occur when the two types do not match. The ultimate issue is that these sysfs functions are expecting to be called via dev_attr_show() but they may also be called via kobj_attr_show(), as certain files are created under two different kobjects that have two different sysfs_ops in intel_gt_sysfs_register(), hence the warnings above. When accessing the gt_ files under /sys/devices/pci0000:00/0000:00:02.0/drm/card0, which are using the same sysfs functions, there are no violations, meaning the functions are being called with the proper type. To make everything work properly, adjust certain functions to match the type of the ->show() and ->store() members in 'struct kobj_attribute'. Add a macro to generate functions for that can be called via both dev_attr_{show,store}() or kobj_attr_{show,store}() so that they can be called through both kobject locations without violating kCFI and adjust the attribute groups to account for this. Link: https://github.com/ClangBuiltLinux/linux/issues/1716 Reviewed-by: Andi Shyti Reviewed-by: Andrzej Hajda Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221013205909.1282545-1-nathan@kernel.org drivers/gpu/drm/i915/gt/intel_gt_sysfs.c | 15 +- drivers/gpu/drm/i915/gt/intel_gt_sysfs.h | 2 +- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 461 +++++++++++++--------------- 3 files changed, 220 insertions(+), 258 deletions(-) commit bc1b705b0eee4c645ad8b3bbff3c8a66e9688362 Author: Yazen Ghannam Date: Tue Jun 21 15:59:43 2022 +0000 x86/MCE/AMD: Clear DFR errors found in THR handler AMD's MCA Thresholding feature counts errors of all severity levels, not just correctable errors. If a deferred error causes the threshold limit to be reached (it was the error that caused the overflow), then both a deferred error interrupt and a thresholding interrupt will be triggered. The order of the interrupts is not guaranteed. If the threshold interrupt handler is executed first, then it will clear MCA_STATUS for the error. It will not check or clear MCA_DESTAT which also holds a copy of the deferred error. When the deferred error interrupt handler runs it will not find an error in MCA_STATUS, but it will find the error in MCA_DESTAT. This will cause two errors to be logged. Check for deferred errors when handling a threshold interrupt. If a bank contains a deferred error, then clear the bank's MCA_DESTAT register. Define a new helper function to do the deferred error check and clearing of MCA_DESTAT. [ bp: Simplify, convert comment to passive voice. ] Fixes: 37d43acfd79f ("x86/mce/AMD: Redo error logging from APIC LVT interrupt handlers") Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220621155943.33623-1-yazen.ghannam@amd.com arch/x86/kernel/cpu/mce/amd.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit edaea001442a792e4b14c7523072b9687700585e Author: Yevgeny Kliteynik Date: Thu Jun 30 18:17:29 2022 +0300 net/mlx5: DR, Remove the buddy used_list No need to have the used_list - we don't need to keep track of the used chunks, we only need to know the amount of used memory. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/steering/dr_buddy.c | 1 - .../mellanox/mlx5/core/steering/dr_icm_pool.c | 50 ++++++---------------- .../mellanox/mlx5/core/steering/dr_types.h | 1 - .../ethernet/mellanox/mlx5/core/steering/mlx5dr.h | 3 +- 4 files changed, 13 insertions(+), 42 deletions(-) commit 4519fc45beebcb05a052ea631d22c85e3ab5665d Author: Yevgeny Kliteynik Date: Thu May 26 01:52:43 2022 +0300 net/mlx5: DR, Keep track of hot ICM chunks in an array instead of list When ICM chunk is freed, it might still be accessed by HW until we do sync with HW. This sync is expensive operation, so we don't do it often. Instead, when the chunk is freed, it is moved to the buddy's "hot memory" list. Once sync is done, we traverse the hot list and finally free all the chunks. It appears that traversing a long list takes unusually long time due to cache misses on many entries, which causes a big "hiccup" during rule insertion. This patch deals with this issue the following way: - Move hot chunks list from buddy to pool, so that the pool will keep track of all its hot memory. - Replace the list with pre-allocated array on the memory pool struct, and store only the information that is needed to later free this chunk in its buddy allocator. This cost additional memory for the array that is dynamically allocated, but it allows not to save long list of hot chunks, so at peak times it actually saves memory due to the fact that each array entry is much smaller than the chunk struct. This way an overhead of traversing the long list is virtually removed: the loop of freeing hot chunks takes ~27 msec instead of ~70 msec, where most of it are the actual freeing activities. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/steering/dr_buddy.c | 1 - .../mellanox/mlx5/core/steering/dr_icm_pool.c | 85 ++++++++++++++++++---- .../mellanox/mlx5/core/steering/dr_types.h | 1 + .../ethernet/mellanox/mlx5/core/steering/mlx5dr.h | 6 -- 4 files changed, 71 insertions(+), 22 deletions(-) commit 133ea373a04399a9443b976a3c82c17afa81591d Author: Yevgeny Kliteynik Date: Thu May 26 10:27:12 2022 +0300 net/mlx5: DR, Lower sync threshold for ICM hot memory Instead of hiding the math in the code, define a value that sets the fraction of allowed hot memory of ICM pool. Set the threshold for sync of ICM hot chunks to 1/4 of the pool instead of 1/2 of the pool. Although we will have more syncs, each sync will be shorter and will help with insertion rate stability. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fb628b71fb2a93e5346cbd8c80d254683c08e490 Author: Yevgeny Kliteynik Date: Thu May 26 02:32:49 2022 +0300 net/mlx5: DR, Allocate htbl from its own slab allocator SW steering allocates/frees lots of htbl structs. Create a separate kmem_cache and allocate htbls from this allocator. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/steering/dr_domain.c | 14 +++++++++++++- .../net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c | 10 ++++++++++ drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c | 12 +++++++++--- .../net/ethernet/mellanox/mlx5/core/steering/dr_types.h | 4 ++++ 4 files changed, 36 insertions(+), 4 deletions(-) commit fd785e5213f012ec086fd93319b9e154caae6ddc Author: Yevgeny Kliteynik Date: Thu May 26 01:44:18 2022 +0300 net/mlx5: DR, Allocate icm_chunks from their own slab allocator SW steering allocates/frees lots of icm_chunk structs. To make this more efficiently, create a separate kmem_cache and allocate these chunks from this allocator. By doing this we observe that the alloc/free "hiccups" frequency has become much lower, which allows for a more steady rule insersion rate. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/steering/dr_domain.c | 15 ++++++++++++++- .../ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c | 11 +++++++++-- .../net/ethernet/mellanox/mlx5/core/steering/dr_types.h | 1 + 3 files changed, 24 insertions(+), 3 deletions(-) commit 17b56073a0668a153f0e1051dc1bf60960f74810 Author: Yevgeny Kliteynik Date: Tue Mar 29 15:21:02 2022 +0300 net/mlx5: DR, Manage STE send info objects in pool Instead of allocating/freeing send info objects dynamically, manage them in pool. The number of send info objects doesn't depend on rules, so after pre-populating the pool with an initial batch of send info objects, the pool is not expected to grow. This way we save alloc/free during writing STEs to ICM, which can sometimes take up to 40msec. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/steering/dr_domain.c | 9 ++ .../ethernet/mellanox/mlx5/core/steering/dr_rule.c | 43 ++++--- .../ethernet/mellanox/mlx5/core/steering/dr_send.c | 131 +++++++++++++++++++++ .../mellanox/mlx5/core/steering/dr_types.h | 9 ++ 4 files changed, 173 insertions(+), 19 deletions(-) commit 1bea2dc7f4ff30bd785e1949d237cd2ce1e87c4f Author: Yevgeny Kliteynik Date: Wed Jun 29 13:19:36 2022 +0300 net/mlx5: DR, In rehash write the line in the entry immediately Don't wait for the whole table to be ready - write each row immediately. This way we save allocations of the ste_send_info structure and improve performance. Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 183a6706a07ea95cdd57a7703acec5f39fe3edde Author: Yevgeny Kliteynik Date: Tue Jun 28 14:32:37 2022 +0300 net/mlx5: DR, Handle domain memory resources init/uninit separately Handle creation/destruction of all the domain's memory pools and other memory-related fields in a separate init/uninit functions. This simplifies error flow and allows cleaner addition of new pools. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/steering/dr_domain.c | 55 +++++++++++++++------- 1 file changed, 37 insertions(+), 18 deletions(-) commit 06ab4a4089d483ec29ddfc9d0503f3468b25f384 Author: Yevgeny Kliteynik Date: Thu May 26 01:31:27 2022 +0300 net/mlx5: DR, Initialize chunk's ste_arrays at chunk creation Rather than cleaning the corresponding chunk's section of ste_arrays on chunk deletion, initialize these areas upon chunk creation. Chunk destruction tend to come in large batches (during pool syncing). To reduce the "hiccup" in such cases, moving ste_arrays init from chunk destruction to initialization. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/steering/dr_icm_pool.c | 25 ++++------------------ 1 file changed, 4 insertions(+), 21 deletions(-) commit b9b81e1e93820eb47aeaf0fe7cdda535adf8e7a4 Author: Yevgeny Kliteynik Date: Tue Mar 29 15:23:55 2022 +0300 net/mlx5: DR, For short chains of STEs, avoid allocating ste_arr dynamically While creating rule, ste_arr is an array that is allocated at the start of the function and freed at the end. This memory allocation can sometimes lead to "hiccups" of up to 10ms. However, the common use case is short chains of STEs. For such cases, we can use a local buffer on stack instead. Changes in v2: Use small local array for short rules, allocate dynamically for long rules Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/steering/dr_rule.c | 40 +++++++++++++++------- 1 file changed, 27 insertions(+), 13 deletions(-) commit d277b55f0fa805dbcabef8b4c3295a2cd6506581 Author: Yevgeny Kliteynik Date: Thu May 26 10:15:57 2022 +0300 net/mlx5: DR, Remove unneeded argument from dr_icm_chunk_destroy Remove an argument that can be extracted in the function. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 5fd08f653991faf3dcbdfe35f38e1b9274bdd341 Author: Yevgeny Kliteynik Date: Mon Jul 25 01:11:19 2022 +0300 net/mlx5: DR, Check device state when polling CQ Calling fast teardown as part of the normal unloading caused a problem with SW steering - SW steering still needs to clear its tables, write to ICM and poll for completions. When teardown has been done, SW steering keeps polling the CQ forever, because nobody flushes it. This patch fixes the issue by checking the device state in cases where no CQE was returned. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit c4193a1281ac6c209e1586b8ff07297b5a9cd8ad Author: Yevgeny Kliteynik Date: Mon Jul 25 00:59:44 2022 +0300 net/mlx5: DR, Fix the SMFS sync_steering for fast teardown If sync happens when the device is in fast teardown, just bail and don't do anything, because the PCI device is not there any more. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 14335d54e721bdfa098d2972e5a0cc742c30c1ad Author: Yevgeny Kliteynik Date: Mon Jul 25 00:30:50 2022 +0300 net/mlx5: DR, In destroy flow, free resources even if FW command failed Otherwise resources will never be freed and refcount will not be decreased. Signed-off-by: Chris Mi Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6acd25cc98ce0c9ee4fefdaf44fc8bca534b26e5 Author: Kunihiko Hayashi Date: Thu Aug 25 18:01:01 2022 +0900 PCI: pci-epf-test: Register notifier if only core_init_notifier is enabled The pci_epf_test_notifier function should be installed also if only core_init_notifier is enabled. Fix the current logic. Link: https://lore.kernel.org/r/20220825090101.20474-1-hayashi.kunihiko@socionext.com Fixes: 5e50ee27d4a5 ("PCI: pci-epf-test: Add support to defer core initialization") Signed-off-by: Kunihiko Hayashi Signed-off-by: Lorenzo Pieralisi Acked-by: Om Prakash Singh Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12d6c1d3a2ad0c199ec57c201cdc71e8e157a232 Author: Kees Cook Date: Tue Oct 25 15:39:35 2022 -0700 skbuff: Proactively round up to kmalloc bucket size Instead of discovering the kmalloc bucket size _after_ allocation, round up proactively so the allocation is explicitly made for the full size, allowing the compiler to correctly reason about the resulting size of the buffer through the existing __alloc_size() hint. This will allow for kernels built with CONFIG_UBSAN_BOUNDS or the coming dynamic bounds checking under CONFIG_FORTIFY_SOURCE to gain back the __alloc_size() hints that were temporarily reverted in commit 93dd04ab0b2b ("slab: remove __alloc_size attribute from __kmalloc_track_caller") Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Nick Desaulniers Cc: David Rientjes Acked-by: Vlastimil Babka Link: https://patchwork.kernel.org/project/netdevbpf/patch/20221021234713.you.031-kees@kernel.org/ Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221025223811.up.360-kees@kernel.org Signed-off-by: Paolo Abeni net/core/skbuff.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 16e3f40779659ff525364e5d9df369953fa7192b Author: Dmitry Torokhov Date: Sun Sep 4 23:30:53 2022 -0700 PCI: tegra: Switch to using devm_fwnode_gpiod_get [devm_]gpiod_get_from_of_node in drivers usage should be limited so that gpiolib can be cleaned up; let's switch to the generic device property API. It may even help with handling secondary fwnodes when gpiolib is taught to handle gpios described by swnodes. Link: https://lore.kernel.org/r/20220903-gpiod_get_from_of_node-remove-v1-1-b29adfb27a6c@gmail.com Signed-off-by: Dmitry Torokhov [lpieralisi@kernel.org: commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Linus Walleij drivers/pci/controller/pci-tegra.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7711cbb4862aa00909a248f011ba3fa578bd1cf3 Author: Yoshihiro Shimoda Date: Thu Jun 23 09:38:17 2022 +0900 PCI: endpoint: Fix WARN() when an endpoint driver is removed Since there is no release callback defined for the PCI EPC device, the below warning is thrown by driver core when a PCI endpoint driver is removed: Device 'e65d0000.pcie-ep' does not have a release() function, it is broken and must be fixed. See Documentation/core-api/kobject.rst. WARNING: CPU: 0 PID: 139 at drivers/base/core.c:2232 device_release+0x78/0x8c Hence, add the release callback and also move the kfree(epc) from pci_epc_destroy() so that the epc memory is freed when all references are dropped. Link: https://lore.kernel.org/r/20220623003817.298173-1-yoshihiro.shimoda.uh@renesas.com Tested-by: Vidya Sagar Signed-off-by: Yoshihiro Shimoda Signed-off-by: Lorenzo Pieralisi Reviewed-by: Manivannan Sadhasivam drivers/pci/endpoint/pci-epc-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 442ae919e6ca77354551a7b8717746b44272e274 Author: Vidya Sagar Date: Mon Sep 19 20:03:40 2022 +0530 PCI: designware-ep: Disable PTM capabilities for EP mode Dual mode DesignWare PCIe IP has PTM capability enabled (if supported) even in the EP mode. The PCIe compliance for the EP mode expects PTM capabilities (ROOT_CAPABLE, RES_CAPABLE, CLK_GRAN) be disabled. Hence disable PTM for the EP mode. Link: https://lore.kernel.org/r/20220919143340.4527-3-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Jingoo Han drivers/pci/controller/dwc/pcie-designware-ep.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit e32e1e26c4098d8a866ce09fd26d8004da4ddf9e Author: Vidya Sagar Date: Mon Sep 19 20:03:39 2022 +0530 PCI: Add PCI_PTM_CAP_RES macro Add macro defining Responder capable bit in Precision Time Measurement capability register. Link: https://lore.kernel.org/r/20220919143340.4527-2-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Reviewed-by: Jingoo Han include/uapi/linux/pci_regs.h | 1 + 1 file changed, 1 insertion(+) commit c6fbb759d68898aad40e57d09ed18df6094a1874 Author: Rafael Mendonca Date: Mon Oct 17 22:54:25 2022 -0300 virt/sev-guest: Remove unnecessary free in init_crypto() If the memory allocation for the auth tag fails, then there is no need to free it. Fixes: fce96cf04430 ("virt: Add SEV-SNP guest driver") Signed-off-by: Rafael Mendonca Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221018015425.887891-1-rafaelmendsr@gmail.com drivers/virt/coco/sev-guest/sev-guest.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4508d32ccced24c972bc4592104513e1ff8439b5 Author: Leon Romanovsky Date: Tue Oct 25 10:37:13 2022 +0300 RDMA/core: Fix order of nldev_exit call Create symmetrical exit flow by calling to nldev_exit() after call to rdma_nl_unregister(RDMA_NL_LS). Fixes: 6c80b41abe22 ("RDMA/netlink: Add nldev initialization flows") Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/64e676774a53a406f4cde265d5a4cfd6b8e97df9.1666683334.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27cdfbdb9f37192377b993689ed3235a3f80ac8b Author: Linus Walleij Date: Mon Oct 24 13:12:23 2022 +0200 media: ov9650: Drop platform data code path Nothing in the kernel uses the platform data code path. Drop it, and drop the use of the old legacy API in the process. Cc: Kieran Bingham Cc: Andrzej Hajda Cc: Akinobu Mita Signed-off-by: Linus Walleij Signed-off-by: Sakari Ailus drivers/media/i2c/ov9650.c | 49 ++-------------------------------------------- include/media/i2c/ov9650.h | 24 ----------------------- 2 files changed, 2 insertions(+), 71 deletions(-) commit bee1bc81d3abf5af7bc0e4a39e52f0c4f91d5d36 Author: Linus Walleij Date: Mon Oct 24 13:12:22 2022 +0200 media: ov7670: Drop unused include The driver includes the legacy header but does not use any symbols from it. Drop the include. Cc: Jonathan Corbet Cc: Akinobu Mita Signed-off-by: Linus Walleij Signed-off-by: Sakari Ailus drivers/media/i2c/ov7670.c | 1 - 1 file changed, 1 deletion(-) commit 88b18dba5c9ec84e17c22cdd26e2dbfd75817de2 Author: Linus Walleij Date: Mon Oct 24 13:12:21 2022 +0200 media: ov2640: Drop legacy includes The driver was including legacy headers despite using just . Drop the surplus includes. Cc: Akinobu Mita Signed-off-by: Linus Walleij Signed-off-by: Sakari Ailus drivers/media/i2c/ov2640.c | 2 -- 1 file changed, 2 deletions(-) commit 80a21da360516fa602f3a50eb9792f9dfbfb5fdb Author: Marco Felsch Date: Fri Sep 30 14:48:12 2022 +0200 media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver Adding support for the TC358746 parallel <-> MIPI CSI bridge. This chip supports two operating modes: 1st) parallel-in -> mipi-csi out 2nd) mipi-csi in -> parallel out This patch only adds the support for the 1st mode. Signed-off-by: Marco Felsch Reviewed-by: Laurent Pinchart [Sakari Ailus: remove() now returns void] Signed-off-by: Sakari Ailus drivers/media/i2c/Kconfig | 17 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/tc358746.c | 1694 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1712 insertions(+) commit 3e4a21a29dd924995f1135cd50e8b7e0d023729c Author: Pin-yen Lin Date: Thu Oct 27 11:21:49 2022 +0800 drm/bridge: it6505: Fix return value check for pm_runtime_get_sync `pm_runtime_get_sync` may return 1 on success. Fix the `if` statement here to make the code less confusing, even though additional calls to `it6505_poweron` doesn't break anything when it's already powered. This was reported by Dan Carpenter in https://lore.kernel.org/all/Y1fMCs6VnxbDcB41@kili/ Fixes: 10517777d302 ("drm/bridge: it6505: Adapt runtime power management framework") Signed-off-by: Pin-yen Lin Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221027032149.2739912-1-treapking@chromium.org drivers/gpu/drm/bridge/ite-it6505.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99c8eb46773e5cfc5d868b35b77b1e2e19f8bec8 Merge: d5e2d038dbec f787d8483015 Author: Paolo Abeni Date: Thu Oct 27 13:38:15 2022 +0200 Merge branch 'net-ipa-don-t-use-fixed-table-sizes' Alex Elder says: ==================== net: ipa: don't use fixed table sizes Currently, routing and filter tables are assumed to have a fixed size for all platforms. In fact, these tables can support many more entries than what has been assumed; the only limitation is the size of the IPA-resident memory regions that contain them. This series rearranges things so that the size of the table is determined from the memory region size defined in configuration data, rather than assuming it is fixed. This will required for IPA versions 5.0+, where the number of entries in a routing table is larger. ==================== Link: https://lore.kernel.org/r/20221025195143.255934-1-elder@linaro.org Signed-off-by: Paolo Abeni commit f787d84830152be76b76470ac865d2033285c2d9 Author: Alex Elder Date: Tue Oct 25 14:51:43 2022 -0500 net: ipa: determine filter table size from memory region Currently we assume that any filter table contains a fixed number of entries. Like routing tables, the number of entries in a filter table is limited only by the size of the IPA-local memory region used to hold the table. Stop assuming that a filter table has exactly 14 entries. Instead, determine the number of entries in a routing table by dividing its memory region size by the size of an entry. (Note that the first "entry" in a filter table contains an endpoint bitmap.) Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni drivers/net/ipa/ipa.h | 2 ++ drivers/net/ipa/ipa_cmd.c | 8 ++------ drivers/net/ipa/ipa_table.c | 20 +++++++++++--------- drivers/net/ipa/ipa_table.h | 3 --- 4 files changed, 15 insertions(+), 18 deletions(-) commit 8defab8bdfb1d0dc4e4e3c687cfde33b596896f7 Author: Alex Elder Date: Tue Oct 25 14:51:42 2022 -0500 net: ipa: don't assume 8 modem routing table entries Currently all platforms are assumed allot 8 routing table entries for use by the modem. Instead, add a new configuration data entry that defines the number of modem routing table entries, and record that in the IPA structure. Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni drivers/net/ipa/data/ipa_data-v3.1.c | 19 ++++++++++--------- drivers/net/ipa/data/ipa_data-v3.5.1.c | 27 ++++++++++++++------------- drivers/net/ipa/data/ipa_data-v4.11.c | 17 +++++++++-------- drivers/net/ipa/data/ipa_data-v4.2.c | 17 +++++++++-------- drivers/net/ipa/data/ipa_data-v4.5.c | 17 +++++++++-------- drivers/net/ipa/data/ipa_data-v4.9.c | 17 +++++++++-------- drivers/net/ipa/ipa.h | 2 ++ drivers/net/ipa/ipa_data.h | 2 ++ drivers/net/ipa/ipa_main.c | 6 ++++++ drivers/net/ipa/ipa_mem.c | 4 ++-- drivers/net/ipa/ipa_qmi.c | 9 +++++---- drivers/net/ipa/ipa_table.c | 21 +++++++++------------ drivers/net/ipa/ipa_table.h | 7 ++----- 13 files changed, 88 insertions(+), 77 deletions(-) commit 0439e6743c5c77520e91bf52a0d16da586214753 Author: Alex Elder Date: Tue Oct 25 14:51:41 2022 -0500 net: ipa: determine route table size from memory region Currently we assume that any routing table contains a fixed number of entries. The number of entries in a routing table can actually vary, depending only on the size of the IPA-local memory region used to hold the table. Stop assuming that a routing table has exactly 15 entries. Instead, determine the number of entries in a routing table by dividing its memory region size by the size of an entry. The number of entries is computed early, when ipa_table_mem_valid() is called by ipa_table_init(). Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni drivers/net/ipa/ipa_cmd.c | 17 ++++++++--------- drivers/net/ipa/ipa_table.c | 14 +++++--------- drivers/net/ipa/ipa_table.h | 3 --- 3 files changed, 13 insertions(+), 21 deletions(-) commit fc094058ce01984aa4cb8b580812b16f5429c7e7 Author: Alex Elder Date: Tue Oct 25 14:51:40 2022 -0500 net: ipa: record the route table size in the IPA structure The non-hashed routing tables for IPv4 and IPv6 will be the same size. And if supported, the hashed routing tables will be the same size as the non-hashed tables. Record the size (number of entries) of all routing tables in the IPA structure. For now, initialize this field using IPA_ROUTE_TABLE_MAX, and just do so when the first route table is validated. Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni drivers/net/ipa/ipa.h | 2 ++ drivers/net/ipa/ipa_table.c | 22 +++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) commit a92fb9442f9aadb8a1e9ae499220595bec82ad7d Author: Marco Felsch Date: Fri Sep 30 14:48:11 2022 +0200 media: dt-bindings: add bindings for Toshiba TC358746 Add the bindings for the Toshiba TC358746 Parallel <-> MIPI-CSI bridge driver. Signed-off-by: Marco Felsch Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus .../bindings/media/i2c/toshiba,tc358746.yaml | 178 +++++++++++++++++++++ 1 file changed, 178 insertions(+) commit 22168675bae75e158c459ef2dee3b6ebd52a80ed Author: Marco Felsch Date: Fri Sep 30 14:48:10 2022 +0200 phy: dphy: add support to calculate the timing based on hs_clk_rate For MIPI-CSI sender use-case it is common to specify the allowed link-frequencies which should be used for the MIPI link and is half the hs-clock rate. This commit adds a helper to calculate the D-PHY timing based on the hs-clock rate so we don't need to calculate the timings within the driver. Signed-off-by: Marco Felsch Acked-by: Vinod Koul Signed-off-by: Sakari Ailus drivers/phy/phy-core-mipi-dphy.c | 22 ++++++++++++++++++---- include/linux/phy/phy-mipi-dphy.h | 3 +++ 2 files changed, 21 insertions(+), 4 deletions(-) commit 7afa5db0eaae8f6c110690311167d5e5cd728efb Author: Marco Felsch Date: Fri Sep 30 14:48:09 2022 +0200 phy: dphy: refactor get_default_config Factor out the calculation into phy_mipi_dphy_calc_config(). This is needed for the follow up patch which adds the support to calculate the timings based on a given hs clock. No functional changes are done. Signed-off-by: Marco Felsch Acked-by: Vinod Koul Signed-off-by: Sakari Ailus drivers/phy/phy-core-mipi-dphy.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 379c258677ccf0dab1032d531829f6d8440713fa Author: Sakari Ailus Date: Mon Oct 17 10:04:32 2022 +0300 v4l: subdev: Warn if disabling streaming failed, return success Complain in the newly added s_stream video op wrapper if disabling streaming failed. Also return zero in this case as there's nothing the caller can do to return the error. This way drivers also won't need to bother with printing error messages. Signed-off-by: Sakari Ailus Reviewed-by: Lad Prabhakar drivers/media/v4l2-core/v4l2-subdev.c | 15 +++++++++++++++ include/media/v4l2-subdev.h | 6 ++++-- 2 files changed, 19 insertions(+), 2 deletions(-) commit 5f9a089b6de34655318afe8e544d9a9cc0fc1d29 Author: Sakari Ailus Date: Mon Oct 17 10:23:28 2022 +0300 dw9768: Enable low-power probe on ACPI Add support for low-power probe to the driver. Also fix runtime PM API usage in the driver. Much of the hassle comes from different factors affecting device power states during probe for ACPI and DT. Signed-off-by: Sakari Ailus Fixes: 859891228e56 ("media: i2c: dw9768: Add DW9768 VCM driver") drivers/media/i2c/dw9768.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit 3dd10515a1d9de734e2ec57f837b9f1e510c5363 Author: Laurent Pinchart Date: Sun Oct 16 09:15:23 2022 +0300 media: i2c: imx290: Replace GAIN control with ANALOGUE_GAIN The IMX290 gain register controls the analogue gain. Replace the V4L2_CID_GAIN control with V4L2_CID_ANALOGUE_GAIN. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b4ab57b07c5b9cac29f766ffc7453aef7a0ef2da Author: Laurent Pinchart Date: Sun Oct 16 09:15:22 2022 +0300 media: i2c: imx290: Add crop selection targets support Implement read-only access to crop selection rectangles to expose the analogue crop rectangle. The public (leaked) IMX290 documentation is not very clear on how cropping is implemented and configured exactly, so the margins may not be entirely accurate. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit b25537efeea981b9a3c99c4666e8d240833993f6 Author: Laurent Pinchart Date: Sun Oct 16 09:15:21 2022 +0300 media: i2c: imx290: Factor out format retrieval to separate function The driver duplicates the same pattern to access the try or active format in multiple locations. Factor it out to a separate function. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 0b274ef2208dc8fbc09f43cdee99f06e644a9bc5 Author: Laurent Pinchart Date: Sun Oct 16 09:15:20 2022 +0300 media: i2c: imx290: Move registers with fixed value to init array Registers 0x3012, 0x3013 and 0x3480 are not documented and are set in the per-mode register arrays with values indentical for all modes. Move them to the common array. Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 4c9c93cf8657a66fc8008c12238939df6514f052 Author: Laurent Pinchart Date: Sun Oct 16 09:15:19 2022 +0300 media: i2c: imx290: Create controls for fwnode properties Create the V4L2_CID_ORIENTATION and V4L2_CID_ROTATION controls to expose the corresponding fwnode properties. Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 0c3b56c905e391345d3fdafc53d5ca1d39219b9f Author: Laurent Pinchart Date: Sun Oct 16 09:15:18 2022 +0300 media: i2c: imx290: Implement HBLANK and VBLANK controls Add support for the V4L2_CID_HBLANK and V4L2_CID_VBLANK controls to the imx290 driver. Make the controls read-only to start with, to report the values to userspace for timing calculation. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 72c87b7ad5602c037fe27b3ad3894f9c70997056 Author: Laurent Pinchart Date: Sun Oct 16 09:15:17 2022 +0300 media: i2c: imx290: Split control initialization to separate function The imx290_probe() function is too large. Split control initialzation to a dedicated function to increase code readability. Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 109 +++++++++++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 48 deletions(-) commit 6d7a87f2d3a68349d7d828720345239800949fb7 Author: Laurent Pinchart Date: Sun Oct 16 09:15:16 2022 +0300 media: i2c: imx290: Fix max gain value The gain is expressed in multiple of 0.3dB, as a value between 0.0dB and 72.0dB. Gains between 0.0dB and 30.0dB (included) apply analog gain only, higher gains from 30.3dB to 72dB apply additional digital gain. The maximum gain value is erroneously set to 72. Increase it to 100 to cover the whole analog gain range. Support for digital gain can be added separately if needed. The IMX327 and IMX462 are largely compatible with the IMX290, but have an analog gain range of 0.0dB to 29.4dB and 42dB of digital gain. When support for those sensors gets added to the driver, the gain control should be adjusted accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 827c7e69cb2d70bf89b6b735203430a7dffe617a Author: Laurent Pinchart Date: Sun Oct 16 09:15:15 2022 +0300 media: i2c: imx290: Add exposure time control Support configuring the exposure time, which is expressed as the complement of the exposure time (frame period minus integration time). The frame period is currently fixed. Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Reviewed-by: Dave Stevenson Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 79d99ae8a77e2f20d580195ba1f23ada97a002aa Author: Laurent Pinchart Date: Mon Oct 17 11:35:45 2022 +0300 media: i2c: imx290: Define more register macros Define macros for all registers programmed by the driver for which documentation is available to increase readability. This starts making use of 16-bit registers in the register arrays, so the value field has to be increased to 32 bits. Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 219 +++++++++++++++++++++++++-------------------- 1 file changed, 124 insertions(+), 95 deletions(-) commit e611f3dac54cae6f9a2efa61fb3dc632c399dd2c Author: Laurent Pinchart Date: Sun Oct 16 09:15:13 2022 +0300 media: i2c: imx290: Simplify error handling when writing registers Error handling for register writes requires checking the error status of every single write. This makes the code complex, or incorrect when the checks are omitted. Simplify this by passing a pointer to an error code to the imx290_write_reg() function, which allows writing multiple registers in a row and only checking for errors at the end. While at it, rename imx290_write_reg() to imx290_write() as there's nothing else than registers to write, and rename imx290_read_reg() accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 86 +++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 54 deletions(-) commit 454a86f33dd0682d6f3b65cd1305643e95257d28 Author: Laurent Pinchart Date: Sun Oct 16 09:15:12 2022 +0300 media: i2c: imx290: Correct register sizes Define registers with the appropriate size, using the variable-size register access mechanism that has just been introduced. This simplifies the code. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) commit e70abe881463379ef9ab63c09300a5f3651cf9ee Author: Laurent Pinchart Date: Sun Oct 16 09:15:11 2022 +0300 media: i2c: imx290: Support variable-sized registers The IMX290 has registers of different sizes. To simplify the code, handle this in the read/write functions instead of in the callers by encoding the register size in the symbolic name macros. All registers are defined as 8-bit for now, a subsequent change will move to larger registers where applicable. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 354 +++++++++++++++++++++++---------------------- 1 file changed, 181 insertions(+), 173 deletions(-) commit 72825bc6f7f5e75c89e678728c785c5925f4ea7d Author: Laurent Pinchart Date: Sun Oct 16 09:15:10 2022 +0300 media: i2c: imx290: Specify HMAX values in decimal The HMAX value specifies the total line length in pixels. It's thus more readable in decimal than hexadecimal. Fix it. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 72e4bf6dd1368943c5fdbc339a62e5020cf2514b Author: Laurent Pinchart Date: Sun Oct 16 09:15:09 2022 +0300 media: i2c: imx290: Drop regmap cache Only two registers are ever read, and once only. There's no need to cache values. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 1 - 1 file changed, 1 deletion(-) commit b817888a0c50962d4b51b9107e824f9aac6a9f3c Author: Laurent Pinchart Date: Sun Oct 16 09:15:08 2022 +0300 media: i2c: imx290: Drop imx290_write_buffered_reg() The imx290_write_buffered_reg() function wraps a register write with register hold, to enable changing multiple registers synchronously. It is used for the gain only, which is an 8-bit register, defeating its purpose. The feature is useful, but should be implemented differently. Drop the function for now, to prepare for a rework of register access. Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) commit 2548df538cdd39b52976545a94529c9b81671a41 Author: Laurent Pinchart Date: Sun Oct 16 09:15:07 2022 +0300 media: i2c: imx290: Replace macro with explicit ARRAY_SIZE() Use ARRAY_SIZE(imx290->supplies) for code that needs the size of the array, instead of relying on the IMX290_NUM_SUPPLIES. The result is less error-prone as it ties the size to the array. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit fbe0a89dc7e32a38904da0c149150b52ccf44279 Author: Laurent Pinchart Date: Sun Oct 16 09:15:06 2022 +0300 media: i2c: imx290: Print error code when I2C transfer fails Knowing why I2C transfers fail is useful for debugging. Extend the error message to print the error code. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 08878cbc0cbf69dfc084436449d6e6fb1640796b Author: Laurent Pinchart Date: Sun Oct 16 09:15:05 2022 +0300 media: i2c: imx290: Use device lock for the control handler The link frequency and pixel rate controls are set without holding the control handler lock, resulting in kernel warnings. As the value of those controls depend on the format, the simplest fix is to use the device lock for the control handler. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus drivers/media/i2c/imx290.c | 1 + 1 file changed, 1 insertion(+) commit a96dfea1df25bf22f4b02080a85ac87f7a3977d0 Author: Laurent Pinchart Date: Sun Oct 16 09:15:04 2022 +0300 media: dt-bindings: Convert imx290.txt to YAML Convert the Sony IMX290 DT binding from text to YAML. Add Manivannan as a maintainer given that he is listed in MAINTAINERS for the file, as volunteering myself. The name of the input clock, "xclk", is wrong as the hardware manual names it INCK. As the device has a single clock, the name could be omitted, but that would require a corresponding change to the driver and is thus a candidate for further patches. Signed-off-by: Laurent Pinchart Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus .../devicetree/bindings/media/i2c/imx290.txt | 57 --------- .../devicetree/bindings/media/i2c/sony,imx290.yaml | 129 +++++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 130 insertions(+), 58 deletions(-) commit 153e4ad44d605cbff3530013b393c01462c54cef Author: Benjamin Mugnier Date: Tue Oct 11 14:30:30 2022 +0200 media: i2c: Add driver for ST VGXY61 camera sensor The VGXY61 has a quad lanes CSI-2 output port running at 800mbps per lane, and supports RAW8, RAW10, RAW12, RAW14 and RAW16 formats. The driver handles both sensor types: - VG5661 and VG6661: 1.6 Mpx (1464 x 1104) 75fps. - VG5761 and VG6761: 2.3 Mpx (1944 x 1204) 60 fps. The driver supports: - HDR linearize mode, HDR substraction mode, and no HDR - GPIOs LEDs strobing - Digital binning and analog subsampling - Horizontal and vertical flip - Manual exposure - Analog and digital gains - Test patterns Signed-off-by: Benjamin Mugnier [Sakari Ailus: remove() now returns void] Signed-off-by: Sakari Ailus drivers/media/i2c/Kconfig | 10 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/st-vgxy61.c | 1962 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1973 insertions(+) commit d5e2d038dbece821f1af57acbeded3aa9a1832c1 Author: Jakub Kicinski Date: Tue Oct 25 11:42:54 2022 -0700 eth: fealnx: delete the driver for Myson MTD-800 The git history for this driver seems to be completely automated / tree wide changes. I can't find any boards or systems which would use this chip. Google search shows pictures of towel warmers and no networking products. Signed-off-by: Jakub Kicinski Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20221025184254.1717982-1-kuba@kernel.org Signed-off-by: Paolo Abeni arch/mips/configs/mtx1_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - drivers/net/ethernet/Kconfig | 10 - drivers/net/ethernet/Makefile | 1 - drivers/net/ethernet/fealnx.c | 1953 --------------------------------- 5 files changed, 1966 deletions(-) commit e753df8fbca592d36f539ed950fcdf412166c549 Author: Michal Jaron Date: Tue Oct 25 09:12:52 2022 -0700 ice: Add support Flex RXD Add new VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC flag, opcode VIRTCHNL_OP_GET_SUPPORTED_RXDIDS and add member rxdid in struct virtchnl_rxq_info to support AVF Flex RXD extension. Add support to allow VF to query flexible descriptor RXDIDs supported by DDP package and configure Rx queues with selected RXDID for IAVF. Add code to allow VIRTCHNL_OP_GET_SUPPORTED_RXDIDS message to be processed. Add necessary macros for registers. Signed-off-by: Leyi Rong Signed-off-by: Xu Ting Signed-off-by: Michal Jaron Signed-off-by: Mateusz Palczewski Tested-by: Maxime Coquelin Tested-by: Konrad Jankowski Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20221025161252.1952939-1-jacob.e.keller@intel.com Signed-off-by: Paolo Abeni drivers/net/ethernet/intel/ice/ice.h | 2 + drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 3 + drivers/net/ethernet/intel/ice/ice_virtchnl.c | 86 ++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_virtchnl.h | 2 + .../ethernet/intel/ice/ice_virtchnl_allowlist.c | 6 ++ include/linux/avf/virtchnl.h | 14 +++- 6 files changed, 111 insertions(+), 2 deletions(-) commit 3a1cc23a75abcd9cea585eb84846507363d58397 Author: Rafał Miłecki Date: Tue Oct 25 15:22:45 2022 +0200 net: broadcom: bcm4908_enet: use build_skb() RX code can be more efficient with the build_skb(). Allocating actual SKB around eth packet buffer - right before passing it up - results in a better cache usage. Without RPS (echo 0 > rps_cpus) BCM4908 NAT masq performance "jumps" between two speeds: ~900 Mbps and 940 Mbps (it's a 4 CPUs SoC). This change bumps the lower speed from 905 Mb/s to 918 Mb/s (tested using single stream iperf 2.0.5 traffic). There are more optimizations to consider. One obvious to try is GRO however as BCM4908 doesn't do hw csum is may actually lower performance. Sometimes. Some early testing: ┌─────────────────────────────────┬─────────────────────┬────────────────────┐ │ │ netif_receive_skb() │ napi_gro_receive() │ ├─────────────────────────────────┼─────────────────────┼────────────────────┤ │ netdev_alloc_skb() │ 905 Mb/s │ 892 Mb/s │ │ napi_alloc_frag() + build_skb() │ 918 Mb/s │ 917 Mb/s │ └─────────────────────────────────┴─────────────────────┴────────────────────┘ Another ideas: 1. napi_build_skb() 2. skb_copy_from_linear_data() for small packets Those need proper testing first though. That can be done later. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20221025132245.22871-1-zajec5@gmail.com Signed-off-by: Paolo Abeni drivers/net/ethernet/broadcom/bcm4908_enet.c | 53 +++++++++++++++++++--------- 1 file changed, 36 insertions(+), 17 deletions(-) commit c926b4c3fa1fdce5e128bc954cad94ca16acce41 Author: Fabio Estevam Date: Tue Oct 25 09:01:09 2022 -0300 net: dp83822: Print the SOR1 strap status During the bring-up of the Ethernet PHY, it is very useful to see the bootstrap status information, as it can help identifying hardware bootstrap mistakes. Allow printing the SOR1 register, which contains the strap status to ease the bring-up. Signed-off-by: Fabio Estevam Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20221025120109.779337-1-festevam@gmail.com Signed-off-by: Paolo Abeni drivers/net/phy/dp83822.c | 2 ++ 1 file changed, 2 insertions(+) commit 28581b9c2c94cc912354eadc98c1146fdc7092e6 Author: Tariq Toukan Date: Tue Oct 25 13:53:00 2022 +0300 bond: Disable TLS features indication Bond agnostically interacts with TLS device-offload requests via the .ndo_sk_get_lower_dev operation. Return value is true iff bond guarantees fixed mapping between the TLS connection and a lower netdev. Due to this nature, the bond TLS device offload features are not explicitly controllable in the bond layer. As of today, these are read-only values based on the evaluation of bond_sk_check(). However, this indication might be incorrect and misleading, when the feature bits are "fixed" by some dependency features. For example, NETIF_F_HW_TLS_TX/RX are forcefully cleared in case the corresponding checksum offload is disabled. But in fact the bond ability to still offload TLS connections to the lower device is not hurt. This means that these bits can not be trusted, and hence better become unused. This patch revives some old discussion [1] and proposes a much simpler solution: Clear the bond's TLS features bits. Everyone should stop reading them. [1] https://lore.kernel.org/netdev/20210526095747.22446-1-tariqt@nvidia.com/ Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20221025105300.4718-1-tariqt@nvidia.com Signed-off-by: Paolo Abeni drivers/net/bonding/bond_main.c | 13 +------------ drivers/net/bonding/bond_options.c | 18 ------------------ include/net/bonding.h | 4 ---- 3 files changed, 1 insertion(+), 34 deletions(-) commit 67f99e34473f8b799c34bb0b0db404a5e32dbca9 Author: Karolina Drobnik Date: Tue Oct 25 11:19:03 2022 +0200 i915/i915_gem_context: Remove debug message in i915_gem_context_create_ioctl We know that as long as GEM context create ioctl succeeds, a context was created. There is no need to write about it, especially when such a message heavily pollutes dmesg and makes debugging actual errors harder. Since commit baa89ba3f1fe ("drm/i915/gem: initial conversion to new logging macros using coccinelle"), the logging for creating a new user context was moved under the driver debug output (for lack of a means for per-user logs, and a lack of user-focused drm.debug parameter). This only reveals how obnoxious having that spam be part of the driver debug logs, so remove it. [ from Chris Wilson ] Suggested-by: Chris Wilson Signed-off-by: Karolina Drobnik Cc: Andi Shyti Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221025091903.986819-1-karolina.drobnik@intel.com drivers/gpu/drm/i915/gem/i915_gem_context.c | 1 - 1 file changed, 1 deletion(-) commit e3c92eb4a84fb0f00442e6b5cabf4f11b0eaaf41 Author: Somalapuram Amaranath Date: Thu Oct 27 14:42:37 2022 +0530 drm/ttm: rework on ttm_resource to use size_t type Change ttm_resource structure from num_pages to size_t size in bytes. v1 -> v2: change PFN_UP(dst_mem->size) to ttm->num_pages v1 -> v2: change bo->resource->size to bo->base.size at some places v1 -> v2: remove the local variable v1 -> v2: cleanup cmp_size_smaller_first() v2 -> v3: adding missing PFN_UP in ttm_bo_vm_fault_reserved Signed-off-by: Somalapuram Amaranath Link: https://patchwork.freedesktop.org/patch/msgid/20221027091237.983582-1-Amaranath.Somalapuram@amd.com Reviewed-by: Christian König Signed-off-by: Christian König drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 8 ++++---- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +- drivers/gpu/drm/i915/i915_scatterlist.c | 4 ++-- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 12 ++++++------ drivers/gpu/drm/i915/intel_region_ttm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo0039.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo5039.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bo74c1.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bo85b5.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo9039.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo90b5.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_boa0b5.c | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.c | 5 ++--- drivers/gpu/drm/nouveau/nouveau_mem.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- drivers/gpu/drm/radeon/radeon_cs.c | 7 +++++-- drivers/gpu/drm/radeon/radeon_object.c | 4 ++-- drivers/gpu/drm/radeon/radeon_trace.h | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++-- drivers/gpu/drm/ttm/ttm_bo.c | 3 --- drivers/gpu/drm/ttm/ttm_bo_util.c | 6 +++--- drivers/gpu/drm/ttm/ttm_bo_vm.c | 4 ++-- drivers/gpu/drm/ttm/ttm_range_manager.c | 2 +- drivers/gpu/drm/ttm/ttm_resource.c | 14 ++++++-------- drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c | 6 +++--- include/drm/ttm/ttm_resource.h | 4 ++-- 37 files changed, 78 insertions(+), 80 deletions(-) commit 330543d04f2c9c5924736d81f67b50b925bd0864 Author: Junxiao Chang Date: Tue Oct 25 16:17:47 2022 +0800 net: stmmac: remove duplicate dma queue channel macros It doesn't need extra macros for queue 0 & 4. Same macro could be used for all 8 queues. Related queue/channel functions could be combined together. Original macro which has two same parameters is unsafe macro and might have potential side effects. Each MTL RxQ DMA channel mask is 4 bits, so using (0xf << chan) instead of GENMASK(x + 3, x) to avoid unsafe macro. Signed-off-by: Junxiao Chang Link: https://lore.kernel.org/r/20221025081747.1884926-1-junxiao.chang@intel.com Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 4 +--- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 21 ++++++--------------- 2 files changed, 7 insertions(+), 18 deletions(-) commit 78a07fe777c42800bd1adaec12abe5dcee43919e Author: Robert Beckett Date: Thu Oct 20 13:03:08 2022 +0200 drm/i915: stop abusing swiotlb_max_segment swiotlb_max_segment used to return either the maximum size that swiotlb could bounce, or for Xen PV PAGE_SIZE even if swiotlb could bounce buffer larger mappings. This made i915 on Xen PV work as it bypasses the coherency aspect of the DMA API and can't cope with bounce buffering and this avoided bounce buffering for the Xen/PV case. So instead of adding this hack back, check for Xen/PV directly in i915 for the Xen case and otherwise use the proper DMA API helper to query the maximum mapping size. Replace swiotlb_max_segment() calls with dma_max_mapping_size(). In i915_gem_object_get_pages_internal() no longer consider max_segment only if CONFIG_SWIOTLB is enabled. There can be other (iommu related) causes of specific max segment sizes. Fixes: a2daa27c0c61 ("swiotlb: simplify swiotlb_max_segment") Reported-by: Marek Marczykowski-Górecki Signed-off-by: Robert Beckett Signed-off-by: Christoph Hellwig [hch: added the Xen hack, rewrote the changelog] Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221020110308.1582518-1-hch@lst.de drivers/gpu/drm/i915/gem/i915_gem_internal.c | 19 ++++------------ drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 4 ++-- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 2 +- drivers/gpu/drm/i915/i915_scatterlist.h | 34 +++++++++++++++++----------- 5 files changed, 29 insertions(+), 32 deletions(-) commit 851a723e45d1c4c8f6f7b0d2cfbc5f53690bb4e9 Author: Waiman Long Date: Thu Sep 22 14:00:41 2022 -0400 sched: Always clear user_cpus_ptr in do_set_cpus_allowed() The do_set_cpus_allowed() function is used by either kthread_bind() or select_fallback_rq(). In both cases the user affinity (if any) should be destroyed too. Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220922180041.1768141-6-longman@redhat.com kernel/sched/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit da019032819a1f09943d3af676892ec8c627668e Author: Waiman Long Date: Thu Sep 22 14:00:39 2022 -0400 sched: Enforce user requested affinity It was found that the user requested affinity via sched_setaffinity() can be easily overwritten by other kernel subsystems without an easy way to reset it back to what the user requested. For example, any change to the current cpuset hierarchy may reset the cpumask of the tasks in the affected cpusets to the default cpuset value even if those tasks have pre-existing user requested affinity. That is especially easy to trigger under a cgroup v2 environment where writing "+cpuset" to the root cgroup's cgroup.subtree_control file will reset the cpus affinity of all the processes in the system. That is problematic in a nohz_full environment where the tasks running in the nohz_full CPUs usually have their cpus affinity explicitly set and will behave incorrectly if cpus affinity changes. Fix this problem by looking at user_cpus_ptr in __set_cpus_allowed_ptr() and use it to restrcit the given cpumask unless there is no overlap. In that case, it will fallback to the given one. The SCA_USER flag is reused to indicate intent to set user_cpus_ptr and so user_cpus_ptr masking should be skipped. In addition, masking should also be skipped if any of the SCA_MIGRATE_* flag is set. All callers of set_cpus_allowed_ptr() will be affected by this change. A scratch cpumask is added to percpu runqueues structure for doing additional masking when user_cpus_ptr is set. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220922180041.1768141-4-longman@redhat.com kernel/sched/core.c | 10 ++++++++++ kernel/sched/sched.h | 3 +++ 2 files changed, 13 insertions(+) commit 8f9ea86fdf99b81458cc21fc1c591fcd4a0fa1f4 Author: Waiman Long Date: Thu Sep 22 14:00:38 2022 -0400 sched: Always preserve the user requested cpumask Unconditionally preserve the user requested cpumask on sched_setaffinity() calls. This allows using it outside of the fairly narrow restrict_cpus_allowed_ptr() use-case and fix some cpuset issues that currently suffer destruction of cpumasks. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220922180041.1768141-3-longman@redhat.com kernel/sched/core.c | 119 +++++++++++++++++++++++++++------------------------ kernel/sched/sched.h | 8 ++++ 2 files changed, 72 insertions(+), 55 deletions(-) commit 713a2e21a5137e96d2594f53d19784ffde3ddbd0 Author: Waiman Long Date: Thu Sep 22 14:00:40 2022 -0400 sched: Introduce affinity_context In order to prepare for passing through additional data through the affinity call-chains, convert the mask and flags argument into a structure. Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220922180041.1768141-5-longman@redhat.com kernel/sched/core.c | 114 +++++++++++++++++++++++++++++++----------------- kernel/sched/deadline.c | 7 ++- kernel/sched/sched.h | 11 +++-- 3 files changed, 85 insertions(+), 47 deletions(-) commit 5584e8ac2c68280e5ac31d231c23cdb7dfa225db Author: Waiman Long Date: Thu Sep 22 14:00:37 2022 -0400 sched: Add __releases annotations to affine_move_task() affine_move_task() assumes task_rq_lock() has been called and it does an implicit task_rq_unlock() before returning. Add the appropriate __releases annotations to make this clear. A typo error in comment is also fixed. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20220922180041.1768141-2-longman@redhat.com kernel/sched/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ad841e569f5c88e3332b32a000f251f33ff32187 Author: Pierre Gondois Date: Thu Oct 6 10:10:52 2022 +0200 sched/fair: Check if prev_cpu has highest spare cap in feec() When evaluating the CPU candidates in the perf domain (pd) containing the previously used CPU (prev_cpu), find_energy_efficient_cpu() evaluates the energy of the pd: - without the task (base_energy) - with the task placed on prev_cpu (if the task fits) - with the task placed on the CPU with the highest spare capacity, prev_cpu being excluded from this set If prev_cpu is already the CPU with the highest spare capacity, max_spare_cap_cpu will be the CPU with the second highest spare capacity. On an Arm64 Juno-r2, with a workload of 10 tasks at a 10% duty cycle, when prev_cpu and max_spare_cap_cpu are both valid candidates, prev_spare_cap > max_spare_cap at ~82%. Thus the energy of the pd when placing the task on max_spare_cap_cpu is computed with no possible positive outcome 82% most of the time. Do not consider max_spare_cap_cpu as a valid candidate if prev_spare_cap > max_spare_cap. Signed-off-by: Pierre Gondois Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20221006081052.3862167-2-pierre.gondois@arm.com kernel/sched/fair.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit aa69c36f31aadc1669bfa8a3de6a47b5e6c98ee8 Author: Qais Yousef Date: Thu Aug 4 15:36:09 2022 +0100 sched/fair: Consider capacity inversion in util_fits_cpu() We do consider thermal pressure in util_fits_cpu() for uclamp_min only. With the exception of the biggest cores which by definition are the max performance point of the system and all tasks by definition should fit. Even under thermal pressure, the capacity of the biggest CPU is the highest in the system and should still fit every task. Except when it reaches capacity inversion point, then this is no longer true. We can handle this by using the inverted capacity as capacity_orig in util_fits_cpu(). Which not only addresses the problem above, but also ensure uclamp_max now considers the inverted capacity. Force fitting a task when a CPU is in this adverse state will contribute to making the thermal throttling last longer. Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220804143609.515789-10-qais.yousef@arm.com kernel/sched/fair.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 44c7b80bffc3a657a36857098d5d9c49d94e652b Author: Qais Yousef Date: Thu Aug 4 15:36:08 2022 +0100 sched/fair: Detect capacity inversion Check each performance domain to see if thermal pressure is causing its capacity to be lower than another performance domain. We assume that each performance domain has CPUs with the same capacities, which is similar to an assumption made in energy_model.c We also assume that thermal pressure impacts all CPUs in a performance domain equally. If there're multiple performance domains with the same capacity_orig, we will trigger a capacity inversion if the domain is under thermal pressure. The new cpu_in_capacity_inversion() should help users to know when information about capacity_orig are not reliable and can opt in to use the inverted capacity as the 'actual' capacity_orig. Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220804143609.515789-9-qais.yousef@arm.com kernel/sched/fair.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++--- kernel/sched/sched.h | 19 ++++++++++++++++ 2 files changed, 79 insertions(+), 3 deletions(-) commit d81304bc6193554014d4372a01debdf65e1e9a4d Author: Qais Yousef Date: Thu Aug 4 15:36:07 2022 +0100 sched/uclamp: Cater for uclamp in find_energy_efficient_cpu()'s early exit condition If the utilization of the woken up task is 0, we skip the energy calculation because it has no impact. But if the task is boosted (uclamp_min != 0) will have an impact on task placement and frequency selection. Only skip if the util is truly 0 after applying uclamp values. Change uclamp_task_cpu() signature to avoid unnecessary additional calls to uclamp_eff_get(). feec() is the only user now. Fixes: 732cd75b8c920 ("sched/fair: Select an energy-efficient CPU on task wake-up") Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220804143609.515789-8-qais.yousef@arm.com kernel/sched/fair.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit c56ab1b3506ba0e7a872509964b100912bde165d Author: Qais Yousef Date: Thu Aug 4 15:36:06 2022 +0100 sched/uclamp: Make cpu_overutilized() use util_fits_cpu() So that it is now uclamp aware. This fixes a major problem of busy tasks capped with UCLAMP_MAX keeping the system in overutilized state which disables EAS and leads to wasting energy in the long run. Without this patch running a busy background activity like JIT compilation on Pixel 6 causes the system to be in overutilized state 74.5% of the time. With this patch this goes down to 9.79%. It also fixes another problem when long running tasks that have their UCLAMP_MIN changed while running such that they need to upmigrate to honour the new UCLAMP_MIN value. The upmigration doesn't get triggered because overutilized state never gets set in this state, hence misfit migration never happens at tick in this case until the task wakes up again. Fixes: af24bde8df202 ("sched/uclamp: Add uclamp support to energy_compute()") Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220804143609.515789-7-qais.yousef@arm.com kernel/sched/fair.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a2e7f03ed28fce26c78b985f87913b6ce3accf9d Author: Qais Yousef Date: Thu Aug 4 15:36:05 2022 +0100 sched/uclamp: Make asym_fits_capacity() use util_fits_cpu() Use the new util_fits_cpu() to ensure migration margin and capacity pressure are taken into account correctly when uclamp is being used otherwise we will fail to consider CPUs as fitting in scenarios where they should. s/asym_fits_capacity/asym_fits_cpu/ to better reflect what it does now. Fixes: b4c9c9f15649 ("sched/fair: Prefer prev cpu in asymmetric wakeup path") Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220804143609.515789-6-qais.yousef@arm.com kernel/sched/fair.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit b759caa1d9f667b94727b2ad12589cbc4ce13a82 Author: Qais Yousef Date: Thu Aug 4 15:36:04 2022 +0100 sched/uclamp: Make select_idle_capacity() use util_fits_cpu() Use the new util_fits_cpu() to ensure migration margin and capacity pressure are taken into account correctly when uclamp is being used otherwise we will fail to consider CPUs as fitting in scenarios where they should. Fixes: b4c9c9f15649 ("sched/fair: Prefer prev cpu in asymmetric wakeup path") Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220804143609.515789-5-qais.yousef@arm.com kernel/sched/fair.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 244226035a1f9b2b6c326e55ae5188fab4f428cb Author: Qais Yousef Date: Thu Aug 4 15:36:03 2022 +0100 sched/uclamp: Fix fits_capacity() check in feec() As reported by Yun Hsiang [1], if a task has its uclamp_min >= 0.8 * 1024, it'll always pick the previous CPU because fits_capacity() will always return false in this case. The new util_fits_cpu() logic should handle this correctly for us beside more corner cases where similar failures could occur, like when using UCLAMP_MAX. We open code uclamp_rq_util_with() except for the clamp() part, util_fits_cpu() needs the 'raw' values to be passed to it. Also introduce uclamp_rq_{set, get}() shorthand accessors to get uclamp value for the rq. Makes the code more readable and ensures the right rules (use READ_ONCE/WRITE_ONCE) are respected transparently. [1] https://lists.linaro.org/pipermail/eas-dev/2020-July/001488.html Fixes: 1d42509e475c ("sched/fair: Make EAS wakeup placement consider uclamp restrictions") Reported-by: Yun Hsiang Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220804143609.515789-4-qais.yousef@arm.com kernel/sched/core.c | 10 +++++----- kernel/sched/fair.c | 26 ++++++++++++++++++++++++-- kernel/sched/sched.h | 42 +++++++++++++++++++++++++++++++++++++++--- 3 files changed, 68 insertions(+), 10 deletions(-) commit b48e16a69792b5dc4a09d6807369d11b2970cc36 Author: Qais Yousef Date: Thu Aug 4 15:36:02 2022 +0100 sched/uclamp: Make task_fits_capacity() use util_fits_cpu() So that the new uclamp rules in regard to migration margin and capacity pressure are taken into account correctly. Fixes: a7008c07a568 ("sched/fair: Make task_fits_capacity() consider uclamp restrictions") Co-developed-by: Vincent Guittot Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220804143609.515789-3-qais.yousef@arm.com kernel/sched/fair.c | 26 ++++++++++++++++---------- kernel/sched/sched.h | 9 +++++++++ 2 files changed, 25 insertions(+), 10 deletions(-) commit 48d5e9daa8b767e75ed9421665b037a49ce4bc04 Author: Qais Yousef Date: Thu Aug 4 15:36:01 2022 +0100 sched/uclamp: Fix relationship between uclamp and migration margin fits_capacity() verifies that a util is within 20% margin of the capacity of a CPU, which is an attempt to speed up upmigration. But when uclamp is used, this 20% margin is problematic because for example if a task is boosted to 1024, then it will not fit on any CPU according to fits_capacity() logic. Or if a task is boosted to capacity_orig_of(medium_cpu). The task will end up on big instead on the desired medium CPU. Similar corner cases exist for uclamp and usage of capacity_of(). Slightest irq pressure on biggest CPU for example will make a 1024 boosted task look like it can't fit. What we really want is for uclamp comparisons to ignore the migration margin and capacity pressure, yet retain them for when checking the _actual_ util signal. For example, task p: p->util_avg = 300 p->uclamp[UCLAMP_MIN] = 1024 Will fit a big CPU. But p->util_avg = 900 p->uclamp[UCLAMP_MIN] = 1024 will not, this should trigger overutilized state because the big CPU is now *actually* being saturated. Similar reasoning applies to capping tasks with UCLAMP_MAX. For example: p->util_avg = 1024 p->uclamp[UCLAMP_MAX] = capacity_orig_of(medium_cpu) Should fit the task on medium cpus without triggering overutilized state. Inlined comments expand more on desired behavior in more scenarios. Introduce new util_fits_cpu() function which encapsulates the new logic. The new function is not used anywhere yet, but will be used to update various users of fits_capacity() in later patches. Fixes: af24bde8df202 ("sched/uclamp: Add uclamp support to energy_compute()") Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220804143609.515789-2-qais.yousef@arm.com kernel/sched/fair.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) commit ecc7d67af402dda4b4d353dfa9837339319c9d4d Author: Colin Ian King Date: Thu Oct 27 09:20:17 2022 +0100 selftests/watchdog: Fix spelling mistake "Temeprature" -> "Temperature" There is a spelling mistake in a print statement. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Shuah Khan tools/testing/selftests/watchdog/watchdog-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f8b51f7d5c8bd3a89e7ea87aed2cdaa52ca5ba4 Author: YoungJun.park Date: Mon Oct 24 18:59:46 2022 -0700 kunit: remove unused structure definition remove unused string_stream_alloc_context structure definition. Signed-off-by: YoungJun.park Reviewed-by: David Gow Signed-off-by: Shuah Khan lib/kunit/string-stream.c | 5 ----- 1 file changed, 5 deletions(-) commit a52a5451f43bb76743c51dd46788008837243f29 Author: Maíra Canal Date: Tue Oct 25 20:10:43 2022 -0300 kunit: Use KUNIT_EXPECT_MEMEQ macro Use KUNIT_EXPECT_MEMEQ to compare memory blocks in replacement of the KUNIT_EXPECT_EQ macro. Therefor, the statement KUNIT_EXPECT_EQ(test, memcmp(foo, bar, size), 0); is replaced by: KUNIT_EXPECT_MEMEQ(test, foo, bar, size); Signed-off-by: Maíra Canal Acked-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan drivers/gpu/drm/tests/drm_format_helper_test.c | 12 ++++++------ net/core/dev_addr_lists_test.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) commit 3b30fb62ec23b42be33d94ebf825d27daf508e8e Author: Maíra Canal Date: Tue Oct 25 20:10:42 2022 -0300 kunit: Add KUnit memory block assertions to the example_all_expect_macros_test Augment the example_all_expect_macros_test with the KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ macros by creating a test with memory block assertions. Signed-off-by: Maíra Canal Reviewed-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan lib/kunit/kunit-example-test.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b8a926bea8b1e790b0afe21359c086e3ee08aee5 Author: Maíra Canal Date: Tue Oct 25 20:10:41 2022 -0300 kunit: Introduce KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ macros Currently, in order to compare memory blocks in KUnit, the KUNIT_EXPECT_EQ or KUNIT_EXPECT_FALSE macros are used in conjunction with the memcmp function, such as: KUNIT_EXPECT_EQ(test, memcmp(foo, bar, size), 0); Although this usage produces correct results for the test cases, when the expectation fails, the error message is not very helpful, indicating only the return of the memcmp function. Therefore, create a new set of macros KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ that compare memory blocks until a specified size. In case of expectation failure, those macros print the hex dump of the memory blocks, making it easier to debug test failures for memory blocks. That said, the expectation KUNIT_EXPECT_EQ(test, memcmp(foo, bar, size), 0); would translate to the expectation KUNIT_EXPECT_MEMEQ(test, foo, bar, size); Signed-off-by: Maíra Canal Reviewed-by: Daniel Latypov Reviewed-by: Muhammad Usama Anjum Reviewed-by: David Gow Signed-off-by: Shuah Khan include/kunit/assert.h | 33 +++++++++++++++++++ include/kunit/test.h | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++ lib/kunit/assert.c | 56 ++++++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+) commit d0c006402e7941558e5283ae434e2847c7999378 Author: Uros Bizjak Date: Wed Oct 19 16:08:50 2022 +0200 jump_label: Use atomic_try_cmpxchg() in static_key_slow_inc_cpuslocked() Use atomic_try_cmpxchg() instead of atomic_cmpxchg (*ptr, old, new) == old in static_key_slow_inc_cpuslocked(). 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, atomic_try_cmpxchg() implicitly assigns old *ptr value to "old" when cmpxchg fails, enabling further code simplifications. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221019140850.3395-1-ubizjak@gmail.com kernel/jump_label.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f13ecba04babc7b614d8ad896e987549c807e2de Author: Sadiya Kazi Date: Tue Oct 18 04:03:33 2022 +0000 Documentation: Kunit: Update architecture.rst for minor fixes Updated the architecture.rst page with the following changes: -Add missing article _the_ across the document. -Reword content across for style and standard. -Update all occurrences of Command Line to Command-line across the document. -Correct grammatical issues, for example, added _it_wherever missing. -Update all occurrences of “via" to either use “through” or “using”. -Update the text preceding the external links and pushed the full link to a new line for better readability. -Reword content under the config command to make it more clear and concise. Signed-off-by: Sadiya Kazi Reviewed-by: David Gow Signed-off-by: Shuah Khan Documentation/dev-tools/kunit/architecture.rst | 115 +++++++++++++------------ 1 file changed, 58 insertions(+), 57 deletions(-) commit 7b1dd2cf06e1da9a0982937e82736daa6cd400ee Author: Mark Rutland Date: Wed Oct 5 18:51:49 2022 +0100 kunit: log numbers in decimal and hex When KUNIT_EXPECT_EQ() or KUNIT_ASSERT_EQ() log a failure, they log the two values being compared, with numerical values logged in decimal. In some cases, decimal output is painful to consume, and hexadecimal output would be more helpful. For example, this is the case for tests I'm currently developing for the arm64 insn encoding/decoding code, where comparing two 32-bit instruction opcodes results in output such as: | # test_insn_add_shifted_reg: EXPECTATION FAILED at arch/arm64/lib/test_insn.c:2791 | Expected obj_insn == gen_insn, but | obj_insn == 2332164128 | gen_insn == 1258422304 To make this easier to consume, this patch logs the values in both decimal and hexadecimal: | # test_insn_add_shifted_reg: EXPECTATION FAILED at arch/arm64/lib/test_insn.c:2791 | Expected obj_insn == gen_insn, but | obj_insn == 2332164128 (0x8b020020) | gen_insn == 1258422304 (0x4b020020) As can be seen from the example, having hexadecimal makes it significantly easier for a human to spot which specific bits are incorrect. Signed-off-by: Mark Rutland Cc: Brendan Higgins Cc: David Gow Cc: linux-kselftest@vger.kernel.org Cc: kunit-dev@googlegroups.com Acked-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan lib/kunit/assert.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b0feda9ce756aa62dbfc29372f819734ffa195f9 Author: Matthew Auld Date: Mon Oct 24 11:19:46 2022 +0100 Revert "drm/i915/uapi: expose GTT alignment" The process for merging uAPI is to have UMD side ready and reviewed and merged before merging. Revert for now until that is ready. This reverts commit d54576a074a29d4901d0a693cd84e1a89057f694. Reported-by: Joonas Lahtinen Signed-off-by: Matthew Auld Cc: Lionel Landwerlin Cc: Michal Mrozek Cc: Thomas Hellström Cc: Stuart Summers Cc: Jordan Justen Cc: Yang A Shi Cc: Nirmoy Das Cc: Niranjana Vishwanathapura Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20221024101946.28974-1-matthew.auld@intel.com drivers/gpu/drm/i915/i915_query.c | 1 - include/uapi/drm/i915_drm.h | 29 ++--------------------------- 2 files changed, 2 insertions(+), 28 deletions(-) commit 66110361281b2f7da0c8bd51eaf1f152f4236035 Author: Vidya Sagar Date: Mon Sep 26 16:49:23 2022 +0530 PCI: dwc: Fix n_fts[] array overrun commit aeaa0bfe89654 ("PCI: dwc: Move N_FTS setup to common setup") incorrectly uses pci->link_gen in deriving the index to the n_fts[] array also introducing the issue of accessing beyond the boundaries of array for greater than Gen-2 speeds. This change fixes that issue. Link: https://lore.kernel.org/r/20220926111923.22487-1-vidyas@nvidia.com Fixes: aeaa0bfe8965 ("PCI: dwc: Move N_FTS setup to common setup") Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Jingoo Han drivers/pci/controller/dwc/pcie-designware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 598418e6035622c0dc735764f0f1b7293c0c7d48 Author: Matt Ranostay Date: Tue Oct 25 01:19:09 2022 -0700 dt-bindings: PCI: ti,j721e-pci-*: Add missing interrupt properties Both interrupts, and interrupt names weren't defined in both EP and host yaml. Also define the only possible interrupt-name as link_state, and maxItems of interrupts to one. This patch resolves the following warning: arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dtb: pcie-ep@2910000: Unevaluated properties are not allowed ('interrupt-names', 'interrupts' were unexpected) From schema Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml Link: https://lore.kernel.org/r/20221025081909.404107-3-mranostay@ti.com Signed-off-by: Matt Ranostay Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml | 7 +++++++ Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml | 7 +++++++ 2 files changed, 14 insertions(+) commit ba4ff1cb6cac8acca928ea41588cf84b18ffdedb Author: Matt Ranostay Date: Tue Oct 25 01:19:08 2022 -0700 dt-bindings: PCI: ti,j721e-pci-host: add interrupt controller definition Add missing 'interrupt-controller' property and related subnodes to resolve the following warning: arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dtb: pcie@2910000: Unevaluated properties are not allowed ('interrupt-controller' was unexpected) From schema: Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml Link: https://lore.kernel.org/r/20221025081909.404107-2-mranostay@ti.com Signed-off-by: Matt Ranostay Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring .../devicetree/bindings/pci/ti,j721e-pci-host.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit fbb19fe17eaef7b6ba2e68dbf0600a97060f2909 Author: Shubhrajyoti Datta Date: Wed Oct 26 20:45:43 2022 +0530 gpio: pca9570: add slg7xl45106 support Dialog semiconductors SLG7XL45106 is an 8-bit I2C GPO expander. The output port is controlled by a data byte with register address. Add a compatible string for the same. Also update the driver to write and read from it. Reviewed-by: Linus Walleij Signed-off-by: Shubhrajyoti Datta Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-pca9570.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit b8a34582c7f7f22f82852f9d3cc192e050f892fd Author: Shubhrajyoti Datta Date: Wed Oct 26 20:45:42 2022 +0530 gpio: pca9570: add a platform data structure Add struct pca9570_platform_data for adding the platform data structure. Also modify the existing structs for pca9570 and pca9571 Signed-off-by: Shubhrajyoti Datta Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-pca9570.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit f7ec74c14f24d78f054efd4ddbda0b4a174cf39f Author: Shubhrajyoti Datta Date: Wed Oct 26 20:45:41 2022 +0530 dt-bindings: gpio: pca9570: Add compatible for slg7xl45106 This patch adds compatible string for the SLG7XL45106, I2C GPO expander. Acked-by: Krzysztof Kozlowski Signed-off-by: Shubhrajyoti Datta Signed-off-by: Bartosz Golaszewski Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml | 1 + 1 file changed, 1 insertion(+) commit 7f7a942c0a338c4a2a7b359bdb2b68e9896122ec Merge: 0a20a3ea4259 ddcb8fa6514f Author: Dave Airlie Date: Thu Oct 27 14:44:02 2022 +1000 Merge tag 'drm-next-20221025' of git://linuxtv.org/pinchartl/media into drm-next Xilinx ZynqMP DisplayPort bridge support Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/Y1cdU4HJoy0Pr2sQ@pendragon.ideasonboard.com commit 95d9a3dab109f2806980d55634972120824a5a5a Author: Victor Nogueira Date: Mon Oct 24 11:16:03 2022 +0000 selftests: tc-testing: Add matchJSON to tdc This allows the use of a matchJSON field in tests to match against JSON output from the command under test, if that command outputs JSON. You specify what you want to match against as a JSON array or object in the test's matchJSON field. You can leave out any fields you don't want to match against that are present in the output and they will be skipped. An example matchJSON value would look like this: "matchJSON": [ { "Value": { "neighIP": { "family": 4, "addr": "AQIDBA==", "width": 32 }, "nsflags": 142, "ncflags": 0, "LLADDR": "ESIzRFVm" } } ] The real output from the command under test might have some extra fields that we don't care about for matching, and since we didn't include them in our matchJSON value, those fields will not be attempted to be matched. If everything we included above has the same values as the real command output, the test will pass. The matchJSON field's type must be the same as the command output's type, otherwise the test will fail. So if the command outputs an array, then the value of matchJSON must also be an array. If matchJSON is an array, it must not contain more elements than the command output's array, otherwise the test will fail. Signed-off-by: Jeremy Carter Signed-off-by: Victor Nogueira Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20221024111603.2185410-1-victor@mojatatu.com Signed-off-by: Jakub Kicinski tools/testing/selftests/tc-testing/tdc.py | 125 ++++++++++++++++++++++++++++-- 1 file changed, 118 insertions(+), 7 deletions(-) commit 3a6573b7a21864aafd43b347918a39e84dabfd89 Author: Kunihiko Hayashi Date: Mon Oct 24 16:23:14 2022 +0900 net: ethernet: ave: Remove duplicate phy_resume() calls ave_open() in ave_resume() executes __phy_resume() via phy_start(), so no need to call phy_resume() explicitly. Remove it. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20221024072314.24969-1-hayashi.kunihiko@socionext.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/socionext/sni_ave.c | 6 ------ 1 file changed, 6 deletions(-) commit b65ef50e0647cb6d7317ee5122f461286bb7f8d5 Author: Colin Ian King Date: Mon Oct 24 14:50:46 2022 +0100 net/rds: remove variable total_copied Variable total_copied is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221024135046.2159523-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski net/rds/message.c | 2 -- 1 file changed, 2 deletions(-) commit e6629dcb00adeebcfeaee45b1c987a84eb3ce1ba Author: John Garry Date: Wed Oct 26 19:33:28 2022 +0800 scsi: MAINTAINERS: Make Xiang Chen HiSilicon SAS controller driver maintainer I am soon leaving Huawei, so will no longer maintain this driver. However I will stay active in upstream Linux storage domain. Xiang Chen has worked on the driver for as long as I have and has good knowledge of the driver, so should do a good job. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1666784008-125519-1-git-send-email-john.garry@huawei.com Signed-off-by: Martin K. Petersen MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4481bdc677c1aa9b0138ee9234c8c2d14142b42e Author: John Garry Date: Wed Oct 26 18:56:04 2022 +0800 scsi: pm8001: Drop !task check in pm8001_abort_task() In commit 0b639decf651 ("scsi: pm8001: Modify task abort handling for SATA task"), code was introduced to dereference "task" pointer in pm8001_abort_task(). However there was a pre-existing later check for "!task", which spooked the kernel test robot. Function pm8001_abort_task() should never be passed NULL for "task" pointer, so remove that check. Also remove the "unlikely" hint, as this is not fastpath code. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: John Garry Link: https://lore.kernel.org/r/1666781764-123090-1-git-send-email-john.garry@huawei.com Reviewed-by: Damien Le Moal Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d266e792b0fb4c25448dc240a808667e0932ef2 Author: Bean Huo Date: Wed Oct 26 00:24:30 2022 +0200 scsi: ufs: core: Use is_visible to control UFS unit descriptor sysfs nodes UFS Boot and Device W-LUs do not have unit descriptors and RPMB does not support WB. Use is_visible() to control which nodes are visible and which are not. Signed-off-by: Bean Huo Link: https://lore.kernel.org/r/20221025222430.277768-4-beanhuo@iokpp.de Reviewed-by: Bart Van Assche Reviewed-by: Arthur Simchaev Signed-off-by: Martin K. Petersen drivers/ufs/core/ufs-sysfs.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit dca899bc02231214e25cffd3014cc77018dae942 Author: Bean Huo Date: Wed Oct 26 00:24:29 2022 +0200 scsi: ufs: core: Clean up ufshcd_slave_alloc() Combine ufshcd_get_lu_power_on_wp_status() and ufshcd_set_queue_depth() into one single ufshcd_lu_init(), so that we only need to read the LUN descriptor once. Signed-off-by: Bean Huo Link: https://lore.kernel.org/r/20221025222430.277768-3-beanhuo@iokpp.de Reviewed-by: Arthur Simchaev Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 150 ++++++++++++++++------------------------------ 1 file changed, 53 insertions(+), 97 deletions(-) commit b43678ea5bbd92388339ecae47ed44955474f53b Author: Bean Huo Date: Wed Oct 26 00:24:28 2022 +0200 scsi: ufs: core: Revert "WB is only available on LUN #0 to #7" Ccommit d3d9c4570285 ("scsi: ufs: Fix memory corruption by ufshcd_read_desc_param()") has properly fixed stack overflow issue. As a result, commit a2fca52ee640 ("scsi: ufs: WB is only available on LUN #0 to #7") is no longer required. Revert it. Cc: Jaegeuk Kim Signed-off-by: Bean Huo Link: https://lore.kernel.org/r/20221025222430.277768-2-beanhuo@iokpp.de Reviewed-by: Arthur Simchaev Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/core/ufs-sysfs.c | 3 +-- drivers/ufs/core/ufshcd-priv.h | 6 +----- drivers/ufs/core/ufshcd.c | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) commit 25ad6f63e77eeafc3a9f17c92aadd66c56599fdc Author: Colin Ian King Date: Mon Oct 24 15:11:01 2022 +0100 scsi: pcmcia: nsp_cs: Remove unused variable i Variable i is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221024141101.2161167-1-colin.i.king@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/pcmcia/nsp_cs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a301d487d7bde62de43671a1642f8f5a2e2cceef Author: Peter Wang Date: Mon Oct 24 20:06:02 2022 +0800 scsi: ufs: core: Print events for WLUN suspend and resume failures WLUN suspend and resume events are currently not handled by ufshcd_print_evt_hist(). Add the missing events. Signed-off-by: Peter Wang Link: https://lore.kernel.org/r/20221024120602.30019-1-peter.wang@mediatek.com Reviewed-by: Stanley Chu Reviewed-by: Asutosh Das Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 3 +++ 1 file changed, 3 insertions(+) commit e0b3ef17f45eb8a6860189306cf0ce5f509a043b Author: Jakub Kicinski Date: Tue Oct 25 11:51:26 2022 -0700 phylink: require valid state argument to phylink_validate_mask_caps() state is deferenced earlier in the function, the NULL check is pointless. Since we don't have any crash reports presumably it's safe to assume state is not NULL. Fixes: f392a1846489 ("net: phylink: provide phylink_validate_mask_caps() helper") Reviewed-by: Sean Anderson Link: https://lore.kernel.org/r/20221025185126.1720553-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d1e96cc4fbe031c19d6fd9d8d2e63c03452fa290 Author: Eric Dumazet Date: Tue Oct 25 18:05:46 2022 +0000 mptcp: fix tracking issue in mptcp_subflow_create_socket() My recent patch missed that mptcp_subflow_create_socket() was creating a 'kernel' socket, then converted it to 'user' socket. Fixes: 0cafd77dcd03 ("net: add a refcount tracker for kernel sockets") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Matthieu Baerts Reviewed-by: Kuniyuki Iwashima Reviewed-by: Mat Martineau Link: https://lore.kernel.org/r/20221025180546.652251-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/mptcp/subflow.c | 2 ++ 1 file changed, 2 insertions(+) commit 415d82b4401150c32687e1b7cc68de621ad24663 Author: Dmitry Bogdanov Date: Tue Sep 6 13:34:21 2022 +0300 scsi: target: core: Dynamically set DPO and FUA in usage_bits libiscsi tests check the support of DPO & FUA bits in usage bits of RSOC response. This patch adds support for dynamic usage bits for each opcode. Set support of DPO & FUA bits in usage_bits of RSOC response depending on support DPOFUA in the backstore device. Reviewed-by: Roman Bolshakov Reviewed-by: Konstantin Shelekhin Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20220906103421.22348-7-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_spc.c | 34 ++++++++++++++++++++++++++++++++-- include/target/target_core_base.h | 2 ++ 2 files changed, 34 insertions(+), 2 deletions(-) commit b8908e5e1d1de66e6905fbec7cdfbbf8ac3ecf9a Author: Dmitry Bogdanov Date: Tue Sep 6 13:34:20 2022 +0300 scsi: target: core: Check emulate_3pc for RECEIVE COPY RECEIVE COPY RESULTS is an opcode from 3rd party copy command set and shall be rejected if emulate_3pc attribute is off like EXTENDED COPY. Reviewed-by: Roman Bolshakov Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20220906103421.22348-6-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_xcopy.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bd217b8c3a1f705f2d92d30974412fbd5f43271a Author: Dmitry Bogdanov Date: Tue Sep 6 13:34:19 2022 +0300 scsi: target: core: Add emulate_rsoc attribute Allow support for RSOC to be turned off via the emulate_rsoc attibute. This is just for testing purposes. Reviewed-by: Roman Bolshakov Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20220906103421.22348-5-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_configfs.c | 20 ++++++++++++++++++++ drivers/target/target_core_device.c | 1 + drivers/target/target_core_spc.c | 12 ++++++++++++ include/target/target_core_base.h | 3 +++ 4 files changed, 36 insertions(+) commit 553b08d9b3a78aa602f818c0c94705774f018df0 Author: Dmitry Bogdanov Date: Tue Sep 6 13:34:18 2022 +0300 scsi: target: core: Dynamic opcode support in RSOC Report supported opcodes depending on a dynamic device configuration. Reviewed-by: Roman Bolshakov Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20220906103421.22348-4-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_spc.c | 120 ++++++++++++++++++++++++++++++++++++-- include/target/target_core_base.h | 1 + 2 files changed, 116 insertions(+), 5 deletions(-) commit 0016e820716ff863a76e960cb91bd72373ac2e74 Author: Dmitry Bogdanov Date: Tue Sep 6 13:34:17 2022 +0300 scsi: target: core: Add list of opcodes for RSOC Fill the strucures for supported opcodes and usage bits that are reported in REPORT SUPPORTED OPERATION CODES command response. Reviewed-by: Roman Bolshakov Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20220906103421.22348-3-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_spc.c | 568 +++++++++++++++++++++++++++++++++++++++ include/scsi/scsi_proto.h | 3 + 2 files changed, 571 insertions(+) commit b9b8782f8966a7f219ec2e2db3ffe5eeb23943ab Author: Dmitry Bogdanov Date: Tue Sep 6 13:34:16 2022 +0300 scsi: target: core: Add support for RSOC command Add support for REPORT SUPPORTED OPERATION CODES command according to SPC4. Reviewed-by: Roman Bolshakov Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20220906103421.22348-2-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_spc.c | 200 ++++++++++++++++++++++++++++++++++++++ include/scsi/scsi_proto.h | 7 ++ include/target/target_core_base.h | 12 +++ 3 files changed, 219 insertions(+) commit 96f341a4751d1939a303c5c526b2ca79ebda075f Author: Colin Ian King Date: Wed Oct 26 09:16:45 2022 +0100 bpftool: Fix spelling mistake "disasembler" -> "disassembler" There is a spelling mistake in an error message. Fix it. Signed-off-by: Colin Ian King Acked-by: Quentin Monnet Link: https://lore.kernel.org/r/20221026081645.3186878-1-colin.i.king@gmail.com Signed-off-by: Martin KaFai Lau tools/bpf/bpftool/jit_disasm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c206394b78c745a69cbb30e935d0a26f82a37199 Merge: 34e0b9452030 982e2b7329fe Author: Jakub Kicinski Date: Wed Oct 26 18:14:32 2022 -0700 Merge tag 'ieee802154-for-net-next-2022-10-26' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Re-pull from Stefan to fix the warnings. Stefan Schmidt says: ==================== pull-request v2: ieee802154-next 2022-10-26 * tag 'ieee802154-for-net-next-2022-10-26' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next: net: mac802154: Fixup function parameter name in docs ==================== Link: https://lore.kernel.org/r/20221026075638.578840-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit de58fd3d80f884f7f322a06bfe08465e49b47c5d Author: Colin Ian King Date: Mon Oct 24 15:17:59 2022 +0100 ata: sata_dwc_460ex: remove variable num_processed Variable num_processed is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Signed-off-by: Damien Le Moal drivers/ata/sata_dwc_460ex.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7256d1f4618b40792d1e9b9b6cb1406a13cad2dd Author: Rahul Tanwar Date: Tue Oct 25 19:03:57 2022 +0800 clk: mxl: syscon_node_to_regmap() returns error pointers Commit 036177310bac ("clk: mxl: Switch from direct readl/writel based IO to regmap based IO") introduced code resulting in below warning issued by the smatch static checker. drivers/clk/x86/clk-lgm.c:441 lgm_cgu_probe() warn: passing zero to 'PTR_ERR' Fix the warning by replacing incorrect IS_ERR_OR_NULL() with IS_ERR(). Fixes: 036177310bac ("clk: mxl: Switch from direct readl/writel based IO to regmap based IO") Reported-by: Dan Carpenter Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/49e339d4739e4ae4c92b00c1b2918af0755d4122.1666695221.git.rtanwar@maxlinear.com Signed-off-by: Stephen Boyd drivers/clk/x86/clk-lgm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7ac9d84b82c74c50eb11ed5eba7496291aebf6a Author: Alan Previn Date: Thu Oct 6 15:51:21 2022 -0700 drm/i915/guc: Remove intel_context:number_committed_requests counter With the introduction of the delayed disable-sched behavior, we use the GuC's xarray of valid guc-id's as a way to identify if new requests had been added to a context when the said context is being checked for closure. Additionally that prior change also closes the race for when a new incoming request fails to cancel the pending delayed disable-sched worker. With these two complementary checks, we see no more use for intel_context:guc_state:number_committed_requests. Signed-off-by: Alan Previn Reviewed-by: John Harrison Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221006225121.826257-3-alan.previn.teres.alexis@intel.com drivers/gpu/drm/i915/gt/intel_context_types.h | 2 -- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 23 ----------------------- 2 files changed, 25 deletions(-) commit 833210943099f5cfd9bd054ce9c5ec2e971bcc89 Author: Matthew Brost Date: Thu Oct 6 15:51:20 2022 -0700 drm/i915/guc: Delay disabling guc_id scheduling for better hysteresis Add a delay, configurable via debugfs (default 34ms), to disable scheduling of a context after the pin count goes to zero. Disable scheduling is a costly operation as it requires synchronizing with the GuC. So the idea is that a delay allows the user to resubmit something before doing this operation. This delay is only done if the context isn't closed and less than a given threshold (default is 3/4) of the guc_ids are in use. Alan Previn: Matt Brost first introduced this patch back in Oct 2021. However no real world workload with measured performance impact was available to prove the intended results. Today, this series is being republished in response to a real world workload that benefited greatly from it along with measured performance improvement. Workload description: 36 containers were created on a DG2 device where each container was performing a combination of 720p 3d game rendering and 30fps video encoding. The workload density was configured in a way that guaranteed each container to ALWAYS be able to render and encode no less than 30fps with a predefined maximum render + encode latency time. That means the totality of all 36 containers and their workloads were not saturating the engines to their max (in order to maintain just enough headrooom to meet the min fps and max latencies of incoming container submissions). Problem statement: It was observed that the CPU core processing the i915 soft IRQ work was experiencing severe load. Using tracelogs and an instrumentation patch to count specific i915 IRQ events, it was confirmed that the majority of the CPU cycles were caused by the gen11_other_irq_handler() -> guc_irq_handler() code path. The vast majority of the cycles was determined to be processing a specific G2H IRQ: i.e. INTEL_GUC_ACTION_SCHED_CONTEXT_MODE_DONE. These IRQs are sent by GuC in response to i915 KMD sending H2G requests: INTEL_GUC_ACTION_SCHED_CONTEXT_MODE_SET. Those H2G requests are sent whenever a context goes idle so that we can unpin the context from GuC. The high CPU utilization % symptom was limiting density scaling. Root Cause Analysis: Because the incoming execution buffers were spread across 36 different containers (each with multiple contexts) but the system in totality was NOT saturated to the max, it was assumed that each context was constantly idling between submissions. This was causing a thrashing of unpinning contexts from GuC at one moment, followed quickly by repinning them due to incoming workload the very next moment. These event-pairs were being triggered across multiple contexts per container, across all containers at the rate of > 30 times per sec per context. Metrics: When running this workload without this patch, we measured an average of ~69K INTEL_GUC_ACTION_SCHED_CONTEXT_MODE_DONE events every 10 seconds or ~10 million times over ~25+ mins. With this patch, the count reduced to ~480 every 10 seconds or about ~28K over ~10 mins. The improvement observed is ~99% for the average counts per 10 seconds. Design awareness: Selftest impact. As temporary WA disable this feature for the selftests. Selftests are very timing sensitive and any change in timing can cause failure. A follow up patch will fixup the selftests to understand this delay. Design awareness: Race between guc_request_alloc and guc_context_close. If a context close is issued while there is a request submission in flight and a delayed schedule disable is pending, guc_context_close and guc_request_alloc will race to cancel the delayed disable. To close the race, make sure that guc_request_alloc waits for guc_context_close to finish running before checking any state. Design awareness: GT Reset event. If a gt reset is triggered, as preparation steps, add an additional step to ensure all contexts that have a pending delay-disable-schedule task be flushed of it. Move them directly into the closed state after cancelling the worker. This is okay because the existing flow flushes all yet-to-arrive G2H's dropping them anyway. Signed-off-by: Matthew Brost Signed-off-by: Alan Previn Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: John Harrison Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221006225121.826257-2-alan.previn.teres.alexis@intel.com drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/gt/intel_context.h | 8 + drivers/gpu/drm/i915/gt/intel_context_types.h | 7 + drivers/gpu/drm/i915/gt/uc/intel_guc.h | 16 ++ drivers/gpu/drm/i915/gt/uc/intel_guc_debugfs.c | 61 +++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 205 +++++++++++++++++++--- drivers/gpu/drm/i915/i915_selftest.h | 2 + 7 files changed, 274 insertions(+), 27 deletions(-) commit befb231d5de2773f6c6f6cf918234e2e709110a5 Author: Alan Previn Date: Tue Oct 25 23:05:06 2022 -0700 drm/i915/guc: Fix GuC error capture sizing estimation and reporting During GuC error capture initialization, we estimate the amount of size we need for the error-capture-region of the shared GuC-log-buffer. This calculation was incorrect so fix that. With the fixed calculation we can reduce the allocation of error-capture region from 4MB to 1MB (see note2 below for reasoning). Additionally, switch from drm_notice to drm_debug for the 3X spare size check since that would be impossible to hit without redesigning gpu_coredump framework to hold multiple captures. NOTE1: Even for 1x the min size estimation case, actually running out of space is a corner case because it can only occur if all engine instances get reset all at once and i915 isn't able extract the capture data fast enough within G2H handler worker. NOTE2: With the corrected calculation, a DG2 part required ~77K and a PVC required ~115K (1X min-est-size that is calculated as one-shot all-engine- reset scenario). Fixes: d7c15d76a554 ("drm/i915/guc: Check sizing of guc_capture output") Cc: Alan Previn Cc: Matthew Brost Cc: Lucas De Marchi Cc: John Harrison Cc: Umesh Nerlige Ramappa Cc: Balasubramani Vivekanandan Cc: Matt Roper Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Chris Wilson Signed-off-by: Alan Previn Reviewed-by: John Harrison Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221026060506.1007830-2-alan.previn.teres.alexis@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 29 ++++++++++++++++---------- drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 6 +++--- 2 files changed, 21 insertions(+), 14 deletions(-) commit 37d52e446e8210a5ac56404434bd83e0e1eff6ba Author: Vinay Belgaumkar Date: Mon Oct 24 15:54:53 2022 -0700 drm/i915/slpc: Use platform limits for min/max frequency GuC will set the min/max frequencies to theoretical max on ATS-M. This will break kernel ABI, so limit min/max frequency to RP0(platform max) instead. Also modify the SLPC selftest to update the min frequency when we have a server part so that we can iterate between platform min and max. v2: Check softlimits instead of platform limits (Riana) v3: More review comments (Ashutosh) v4: No need to use saved_min_freq and other comments (Ashutosh) Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/7030 Acked-by: Nirmoy Das Reviewed-by: Riana Tauro Signed-off-by: Vinay Belgaumkar Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221024225453.4856-1-vinay.belgaumkar@intel.com drivers/gpu/drm/i915/gt/selftest_slpc.c | 20 ++++++------ drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 37 +++++++++++++++++++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h | 2 ++ drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h | 3 ++ 4 files changed, 53 insertions(+), 9 deletions(-) commit fcfe55f214f5d1ae18332a055e83ddd840eef2f2 Author: Anusha Srivatsa Date: Tue Oct 25 15:30:42 2022 -0700 drm/i915/display: Move squash_ctl register programming to its own function No functional change. Introduce dg2_cdclk_squash_program and move squash_ctl register programming bits to this. v2: s/dg2_cdclk_squash_programming/dg2_cdclk_squash_program (Jani) Cc: Jani Nikula Cc: Balasubramani Vivekanandan Cc: Ville Syrjälä Signed-off-by: Anusha Srivatsa Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221025223042.138810-4-anusha.srivatsa@intel.com drivers/gpu/drm/i915/display/intel_cdclk.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 6688b6b100cc573b83f6e00cf329b69cc7c46272 Author: Anusha Srivatsa Date: Tue Oct 25 15:30:41 2022 -0700 drm/i915/display: Move chunks of code out of bxt_set_cdclk() No functional change. Moving segments out to simplify bxt_set_cdlck() v2: s/bxt_cdclk_pll/bxt_cdclk_pll_update (Jani) Cc: Jani Nikula Cc: Balasubramani Vivekanandan Cc: Ville Syrjälä Signed-off-by: Anusha Srivatsa Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221025223042.138810-3-anusha.srivatsa@intel.com drivers/gpu/drm/i915/display/intel_cdclk.c | 39 ++++++++++++++++++------------ 1 file changed, 24 insertions(+), 15 deletions(-) commit 1d32f5d6e416768fdfc0d6f9b8659f57c0f779f3 Author: Anusha Srivatsa Date: Tue Oct 25 15:30:40 2022 -0700 drm/i915/display: Introduce HAS_CDCLK_SQUASH macro Driver had discrepancy in how cdclk squash and crawl support were checked. Like crawl, add squash as a 1 bit feature flag to the display section of DG2. Cc: Balasubramani Vivekanandan Cc: Ville Syrjälä Signed-off-by: Anusha Srivatsa Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221025223042.138810-2-anusha.srivatsa@intel.com drivers/gpu/drm/i915/display/intel_cdclk.c | 15 +++++---------- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_device_info.h | 1 + 4 files changed, 8 insertions(+), 10 deletions(-) commit c74b644f26e9c0600573521aefd486d9c9dfc566 Author: Anusha Srivatsa Date: Tue Oct 25 15:30:39 2022 -0700 drm/i915/display: Change terminology for cdclk actions No functional changes. Changing terminology in some print statements. s/has_cdclk_squasher/has_cdclk_squash, s/crawler/crawl and s/squasher/squash. Cc: Balasubramani Vivekanandan Cc: Ville Syrjälä Signed-off-by: Anusha Srivatsa Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221025223042.138810-1-anusha.srivatsa@intel.com drivers/gpu/drm/i915/display/intel_cdclk.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8907a276fec2fafaba432cdf7b6ec655a9f163f7 Author: Samuel Holland Date: Thu Sep 15 23:27:51 2022 -0500 ARM: dts: axp22x/axp809: Add GPIO controller nodes These PMICs all contain a GPIO controller. Now that the binding for this variant is documented, wire up the controller in the device tree. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220916042751.47906-3-samuel@sholland.org Signed-off-by: Jernej Skrabec arch/arm/boot/dts/axp22x.dtsi | 6 ++++++ arch/arm/boot/dts/axp809.dtsi | 7 +++++++ 2 files changed, 13 insertions(+) commit 26737f55d66bb2e2a23dd0fd561fa853cf8e5ee4 Author: Samuel Holland Date: Thu Sep 15 23:27:50 2022 -0500 ARM: dts: axp803/axp81x: Drop GPIO LDO pinctrl nodes The "ldo-io0" and "ldo-io1" regulators are enabled/disabled by toggling the pinmux between two functions. This happens in the regulator driver. Setting the pinmux to "ldo" in the DT is inappropriate because it would enable the regulator before the driver has a chance to set the correct initial voltage. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220916042751.47906-2-samuel@sholland.org Signed-off-by: Jernej Skrabec arch/arm/boot/dts/axp81x.dtsi | 14 -------------- arch/arm64/boot/dts/allwinner/axp803.dtsi | 10 ---------- 2 files changed, 24 deletions(-) commit f864a29afc32d3c0c2d7a34d71b49a8f92306aaa Author: Vinay Belgaumkar Date: Mon Oct 24 10:11:08 2022 -0700 drm/i915/slpc: Optmize waitboost for SLPC Waitboost (when SLPC is enabled) results in a H2G message. This can result in thousands of messages during a stress test and fill up an already full CTB. There is no need to request for boost if min softlimit is equal or greater than it. v2: Add the tracing back, and check requested freq in the worker thread (Tvrtko) v3: Check requested freq in dec_waiters as well v4: Only check min_softlimit against boost_freq. Limit this optimization for server parts for now. v5: min_softlimit can be greater than boost (Ashutosh) Reviewed-by: Ashutosh Dixit Signed-off-by: Vinay Belgaumkar Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221024171108.14373-1-vinay.belgaumkar@intel.com drivers/gpu/drm/i915/gt/intel_rps.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ce992ff38e1ed495be202c22d065b42c942e0475 Merge: 167506846980 0d527a99229b Author: Mark Brown Date: Wed Oct 26 19:53:21 2022 +0100 ASoC: Intel: Fix typo in comments Merge series from Amadeusz Sławiński : There is a typo which keeps propagating through existing Intel machine boards fix it with hope that fix stops it from appearing in new boards. commit 167506846980f28aae2551999bd2e824e7453a32 Merge: 94e19f49010c 3d824ceb8a9c Author: Mark Brown Date: Wed Oct 26 19:53:14 2022 +0100 ASoC: SOF: Intel: HDaudio cleanups Merge series from Pierre-Louis Bossart : This is the part1 of my HDaudio cleanups, before the addition of to-be-announced HDaudio extensions. The patchset includes more consistent use of read/write/update helpers, removal of useless waits, structure members and programming sequences, removal of confusing sharing of private_data between FE and BE. Additional patches are coming to split the controller, codec and multi-link management functionality in well-identified files. Pierre-Louis Bossart (16): ASoC: SOF: ops: fallback to mmio in helpers ASoC: SOF: Intel: use mmio fallback for all platforms ASoC: SOF: ops: add readb/writeb helpers ASoC: SOF: ops: add snd_sof_dsp_updateb() helper ASoC: SOF: Intel: hda-dsp: use SOF helpers for consistency ASoC: SOF: Intel: hda-dai: start removing the use of runtime->private_data in BE ASoC: SOF: Intel: hda-dai: use component_get_drvdata to find hdac_bus ASoC: SOF: Intel: hda-dai: remove useless members in hda_pipe_params ASoC: SOF: Intel: hda-ctrl: remove useless sleep ASoC: SOF: Intel: hda: always do a full reset ASoC: SOF: Intel: hda: remove useless check on GCTL ASoC: SOF: Intel: hda-stream: use SOF helpers for consistency ASoC: SOF: Intel: hda-stream: rename CL_SD_CTL registers as SD_CTL ASoC: SOF: Intel: hda: use SOF helper for consistency ASoC: SOF: Intel: hda-stream: use snd_sof_dsp_updateb() helper ASoC: SOF: Intel: hda-stream: use readb/writeb for stream registers sound/soc/sof/intel/bdw.c | 6 +--- sound/soc/sof/intel/byt.c | 12 ++----- sound/soc/sof/intel/hda-common-ops.c | 6 +--- sound/soc/sof/intel/hda-ctrl.c | 41 ++++++++-------------- sound/soc/sof/intel/hda-dai.c | 31 +++++++---------- sound/soc/sof/intel/hda-dsp.c | 12 ++++--- sound/soc/sof/intel/hda-loader-skl.c | 30 ++++++++-------- sound/soc/sof/intel/hda-loader.c | 4 +-- sound/soc/sof/intel/hda-stream.c | 47 ++++++++++++------------- sound/soc/sof/intel/hda.c | 5 ++- sound/soc/sof/intel/hda.h | 25 +++++++------- sound/soc/sof/intel/pci-tng.c | 6 +--- sound/soc/sof/ops.h | 51 ++++++++++++++++++++-------- sound/soc/sof/sof-priv.h | 4 +++ 14 files changed, 136 insertions(+), 144 deletions(-) -- 2.34.1 commit 94e19f49010cdabc7c3c427c6ba05e1fcc60ff32 Merge: 07b16192f3f0 4e02fd620747 Author: Mark Brown Date: Wed Oct 26 19:29:28 2022 +0100 ASoC: cleanups and improvements for jz4740-i2s Merge series from Aidan MacDonald : This series is a preparatory cleanup of the jz4740-i2s driver before adding support for a new SoC. The two improvements are lifting unnecessary restrictions on sample rates and formats -- the existing ones appear to be derived from the limitations of the JZ4740's internal codec and don't reflect the actual capabilities of the I2S controller. I'm unable to test the series on any JZ47xx SoCs, but I have tested on an X1000 (which is the SoC I'll be adding in a followup series). commit e62f31e1739d33a1a377cc77b0e89aff21f23c4c Author: Gustavo Sousa Date: Wed Oct 19 13:13:34 2022 -0300 drm/i915/xelp: Add Wa_1806527549 Workaround to be applied to platforms using XE_LP graphics. BSpec: 52890 Signed-off-by: Gustavo Sousa Reviewed-by: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221019161334.119885-1-gustavo.sousa@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 ++++++ 2 files changed, 7 insertions(+) commit d96d4276eaeb09b07e0949d432622691ea5c96f5 Author: Yonghong Song Date: Wed Oct 26 09:30:14 2022 -0700 selftests/bpf: Fix bpftool synctypes checking failure kernel-patches/bpf failed with error: Running bpftool checks... Comparing /data/users/ast/net-next/tools/include/uapi/linux/bpf.h (bpf_map_type) and /data/users/ast/net-next/tools/bpf/bpftool/map.c (do_help() TYPE): {'cgroup_storage_deprecated', 'cgroup_storage'} Comparing /data/users/ast/net-next/tools/include/uapi/linux/bpf.h (bpf_map_type) and /data/users/ast/net-next/tools/bpf/bpftool/Documentation/bpftool-map.rst (TYPE): {'cgroup_storage_deprecated', 'cgroup_storage'} The selftests/bpf/test_bpftool_synctypes.py runs checking in the above. The failure is introduced by Commit c4bcfb38a95e("bpf: Implement cgroup storage available to non-cgroup-attached bpf progs"). The commit introduced BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED which has the same enum value as BPF_MAP_TYPE_CGROUP_STORAGE. In test_bpftool_synctypes.py, one test is to compare uapi bpf.h map types and bpftool supported maps. The tool picks 'cgroup_storage_deprecated' from bpf.h while bpftool supported map is displayed as 'cgroup_storage'. The test failure can be fixed by explicitly replacing 'cgroup_storage_deprecated' with 'cgroup_storage' in uapi bpf.h map types. Signed-off-by: Yonghong Song Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20221026163014.470732-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/test_bpftool_synctypes.py | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2970b5ee2e7d642da306827fd8257fa18ea9c09f Author: Krzysztof Kozlowski Date: Sun Oct 2 11:19:59 2022 +0200 ARM: dts: sunxi: correct indentation Do not use spaces for indentation. Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221002091959.68815-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8ae9c7a69fa14e95d032e64d8d758e3f85bee132 Author: Krzysztof Kozlowski Date: Sun Oct 2 11:20:02 2022 +0200 ARM: dts: omap: correct indentation Do not use spaces for indentation. Link: https://lore.kernel.org/r/20221002092002.68880-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi | 6 +-- arch/arm/boot/dts/omap-gpmc-smsc9221.dtsi | 6 +-- arch/arm/boot/dts/omap3-cm-t3517.dts | 12 +++--- arch/arm/boot/dts/omap3-gta04.dtsi | 6 +-- arch/arm/boot/dts/omap3-ldp.dts | 2 +- arch/arm/boot/dts/omap3-n900.dts | 38 +++++++++--------- arch/arm/boot/dts/omap3-zoom3.dts | 44 ++++++++++----------- arch/arm/boot/dts/omap4-cpu-thermal.dtsi | 24 ++++++------ arch/arm/boot/dts/omap5-cm-t54.dts | 64 +++++++++++++++---------------- 9 files changed, 101 insertions(+), 101 deletions(-) commit eab1e9105a93922d62bd5d158fc11d4b59ab0fce Author: Krzysztof Kozlowski Date: Sun Oct 2 11:20:05 2022 +0200 ARM: dts: kirkwood: correct indentation Do not use spaces for indentation. Link: https://lore.kernel.org/r/20221002092007.68955-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/kirkwood-b3.dts | 2 +- arch/arm/boot/dts/kirkwood-db-88f6281.dts | 2 +- arch/arm/boot/dts/kirkwood-db-88f6282.dts | 2 +- arch/arm/boot/dts/kirkwood-dir665.dts | 14 ++--- arch/arm/boot/dts/kirkwood-ds112.dts | 2 +- arch/arm/boot/dts/kirkwood-ds411.dts | 2 +- arch/arm/boot/dts/kirkwood-iconnect.dts | 2 +- arch/arm/boot/dts/kirkwood-km_common.dtsi | 2 +- arch/arm/boot/dts/kirkwood-l-50.dts | 24 ++++----- arch/arm/boot/dts/kirkwood-laplug.dts | 2 +- arch/arm/boot/dts/kirkwood-linkstation.dtsi | 2 +- arch/arm/boot/dts/kirkwood-mplcec4.dts | 16 +++--- arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 2 +- arch/arm/boot/dts/kirkwood-nas2big.dts | 2 +- arch/arm/boot/dts/kirkwood-net2big.dts | 10 ++-- arch/arm/boot/dts/kirkwood-net5big.dts | 10 ++-- .../boot/dts/kirkwood-netgear_readynas_nv+_v2.dts | 12 ++--- arch/arm/boot/dts/kirkwood-nsa310.dts | 2 +- arch/arm/boot/dts/kirkwood-nsa320.dts | 2 +- arch/arm/boot/dts/kirkwood-nsa325.dts | 2 +- arch/arm/boot/dts/kirkwood-nsa3x0-common.dtsi | 2 +- arch/arm/boot/dts/kirkwood-rd88f6192.dts | 60 +++++++++++----------- arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts | 2 +- arch/arm/boot/dts/kirkwood-rd88f6281.dtsi | 4 +- arch/arm/boot/dts/kirkwood-rs212.dts | 2 +- arch/arm/boot/dts/kirkwood-synology.dtsi | 2 +- arch/arm/boot/dts/kirkwood-t5325.dts | 2 +- arch/arm/boot/dts/kirkwood-ts219.dtsi | 4 +- arch/arm/boot/dts/kirkwood.dtsi | 34 ++++++------ 29 files changed, 113 insertions(+), 113 deletions(-) commit a7569f7d21e7a8b4196600672e25039fb58bf322 Author: Krzysztof Kozlowski Date: Sun Oct 2 11:20:08 2022 +0200 ARM: dts: armada: correct indentation Do not use spaces for indentation. Link: https://lore.kernel.org/r/20221002092008.69003-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/armada-370-netgear-rn102.dts | 10 +++++----- arch/arm/boot/dts/armada-370-netgear-rn104.dts | 10 +++++----- arch/arm/boot/dts/armada-370-rd.dts | 16 ++++++++-------- arch/arm/boot/dts/armada-370-synology-ds213j.dts | 6 +++--- arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 10 +++++----- 5 files changed, 26 insertions(+), 26 deletions(-) commit cfc35a16f42e15cf5d9f070205c4be6a873caaa2 Author: Krzysztof Kozlowski Date: Sun Oct 2 11:20:10 2022 +0200 ARM: dts: ti: correct indentation Do not use spaces for indentation. Link: https://lore.kernel.org/r/20221002092010.69030-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi | 10 +++++----- arch/arm/boot/dts/am335x-moxa-uc-8100-common.dtsi | 10 +++++----- arch/arm/boot/dts/am335x-pepper.dts | 4 ++-- arch/arm/boot/dts/am3517-evm.dts | 16 ++++++++-------- 4 files changed, 20 insertions(+), 20 deletions(-) commit 7ec006642590033e2b07eeccf57134751acea03e Author: Krzysztof Kozlowski Date: Thu Sep 8 10:07:03 2022 +0200 dt-bindings: pinctrl: qcom,pmic-mpp: make compatible fallbacks specific Instead of allowing compatibles followed by any fallback (for SPMI or SSBI PMICs), make the list specific. Link: https://lore.kernel.org/r/20220908080703.28643-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 45 +++++++++++----------- 1 file changed, 23 insertions(+), 22 deletions(-) commit 0d6d7c61ffeedc782b651a080ad6543ad45314b6 Author: Nathan Chancellor Date: Tue Oct 4 07:41:45 2022 -0700 fs/ntfs3: Don't use uni1 uninitialized in ntfs_d_compare() Clang warns: fs/ntfs3/namei.c:445:7: error: variable 'uni1' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (toupper(c1) != toupper(c2)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/ctype.h:64:20: note: expanded from macro 'toupper' #define toupper(c) __toupper(c) ^ fs/ntfs3/namei.c:487:12: note: uninitialized use occurs here __putname(uni1); ^~~~ ./include/linux/fs.h:2789:65: note: expanded from macro '__putname' #define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) ^~~~ fs/ntfs3/namei.c:445:3: note: remove the 'if' if its condition is always false if (toupper(c1) != toupper(c2)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ntfs3/namei.c:434:7: error: variable 'uni1' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!lm--) { ^~~~~ fs/ntfs3/namei.c:487:12: note: uninitialized use occurs here __putname(uni1); ^~~~ ./include/linux/fs.h:2789:65: note: expanded from macro '__putname' #define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) ^~~~ fs/ntfs3/namei.c:434:3: note: remove the 'if' if its condition is always false if (!lm--) { ^~~~~~~~~~~~ fs/ntfs3/namei.c:430:22: note: initialize the variable 'uni1' to silence this warning struct cpu_str *uni1, *uni2; ^ = NULL 2 errors generated. There is no point in calling __putname() in these particular error paths, as there has been no corresponding __getname() call yet. Just return directly in these blocks to clear up the warning. Fixes: a3a956c78efa ("fs/ntfs3: Add option "nocase"") Link: https://github.com/ClangBuiltLinux/linux/issues/1729 Signed-off-by: Nathan Chancellor Signed-off-by: Konstantin Komarov fs/ntfs3/namei.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 5984de0b41bf8f261e41b45c4fe64a32236e0c42 Author: Bjorn Helgaas Date: Tue Oct 25 14:35:02 2022 -0500 PCI/PM: Remove unused 'state' parameter to pci_legacy_suspend_late() 1a1daf097e21 ("PCI/PM: Remove unused pci_driver.suspend_late() hook") removed the legacy .suspend_late() hook, which was the only user of the "state" parameter to pci_legacy_suspend_late(), but it neglected to remove the parameter. Remove the unused "state" parameter to pci_legacy_suspend_late(). Link: https://lore.kernel.org/r/20221025193502.669091-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki drivers/pci/pci-driver.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 73fcd4520edb430684246448d096f8f17f107c97 Author: Bjorn Helgaas Date: Tue Oct 25 15:38:52 2022 -0500 agp/via: Update to DEFINE_SIMPLE_DEV_PM_OPS() As of 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones"), SIMPLE_DEV_PM_OPS() is deprecated in favor of DEFINE_SIMPLE_DEV_PM_OPS(), which has the advantage that the PM callbacks don't need to be wrapped with #ifdef CONFIG_PM or tagged with __maybe_unused. Convert to DEFINE_SIMPLE_DEV_PM_OPS(). No functional change intended. Link: https://lore.kernel.org/r/20221025203852.681822-9-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Dave Airlie drivers/char/agp/via-agp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 746e926b9fe327ace4be187144913abd7cfc2f4a Author: Bjorn Helgaas Date: Tue Oct 25 15:38:51 2022 -0500 agp/sis: Update to DEFINE_SIMPLE_DEV_PM_OPS() As of 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones"), SIMPLE_DEV_PM_OPS() is deprecated in favor of DEFINE_SIMPLE_DEV_PM_OPS(), which has the advantage that the PM callbacks don't need to be wrapped with #ifdef CONFIG_PM or tagged with __maybe_unused. Convert to DEFINE_SIMPLE_DEV_PM_OPS(). No functional change intended. Link: https://lore.kernel.org/r/20221025203852.681822-8-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Dave Airlie drivers/char/agp/sis-agp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 8c1f82c710f18c5f51c3b43402cd8175d6655369 Author: Bjorn Helgaas Date: Tue Oct 25 15:38:50 2022 -0500 agp/amd64: Update to DEFINE_SIMPLE_DEV_PM_OPS() As of 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones"), SIMPLE_DEV_PM_OPS() is deprecated in favor of DEFINE_SIMPLE_DEV_PM_OPS(), which has the advantage that the PM callbacks don't need to be wrapped with #ifdef CONFIG_PM or tagged with __maybe_unused. Convert to DEFINE_SIMPLE_DEV_PM_OPS(). No functional change intended. Link: https://lore.kernel.org/r/20221025203852.681822-7-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Dave Airlie drivers/char/agp/amd64-agp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 11a8d8774e68e07385a5b10d9546598f57ace7da Author: Bjorn Helgaas Date: Tue Oct 25 15:38:49 2022 -0500 agp/nvidia: Convert to generic power management Convert agpgart-nvidia from legacy PCI power management to the generic power management framework. Previously agpgart-nvidia used legacy PCI power management, and agp_nvidia_suspend() and agp_nvidia_resume() were responsible for both device-specific things and generic PCI things: agp_nvidia_suspend pci_save_state <-- generic PCI pci_set_power_state(PCI_D3hot) <-- generic PCI agp_nvidia_resume pci_set_power_state(PCI_D0) <-- generic PCI pci_restore_state <-- generic PCI nvidia_configure <-- device-specific Convert to generic power management where the PCI bus PM methods do the generic PCI things, and the driver needs only the device-specific part, i.e., suspend_devices_and_enter dpm_suspend_start(PMSG_SUSPEND) pci_pm_suspend # PCI bus .suspend() method agp_nvidia_suspend <-- not needed at all; removed suspend_enter dpm_suspend_noirq(PMSG_SUSPEND) pci_pm_suspend_noirq # PCI bus .suspend_noirq() method pci_save_state <-- generic PCI pci_prepare_to_sleep <-- generic PCI pci_set_power_state ... dpm_resume_end(PMSG_RESUME) pci_pm_resume # PCI bus .resume() method pci_restore_standard_config pci_set_power_state(PCI_D0) <-- generic PCI pci_restore_state <-- generic PCI agp_nvidia_resume # driver->pm->resume nvidia_configure <-- device-specific Based on 0aeddbd0cb07 ("via-agp: convert to generic power management") by Vaibhav Gupta . Link: https://lore.kernel.org/r/20221025203852.681822-6-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Dave Airlie drivers/char/agp/nvidia-agp.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit 6a1274ea0e5dfb2eca85b0175820d7b5183c9cae Author: Bjorn Helgaas Date: Tue Oct 25 15:38:48 2022 -0500 agp/ati: Convert to generic power management Convert agpgart-ati from legacy PCI power management to the generic power management framework. Previously agpgart-ati used legacy PCI power management, and agp_ati_suspend() and agp_ati_resume() were responsible for both device-specific things and generic PCI things like saving and restoring config space and managing power state: agp_ati_suspend pci_save_state <-- generic PCI pci_set_power_state(PCI_D3hot) <-- generic PCI agp_ati_resume pci_set_power_state(PCI_D0) <-- generic PCI pci_restore_state <-- generic PCI ati_configure <-- device-specific With generic power management, the PCI bus PM methods do the generic PCI things, and the driver needs only the device-specific part, i.e., suspend_devices_and_enter dpm_suspend_start(PMSG_SUSPEND) pci_pm_suspend # PCI bus .suspend() method agp_ati_suspend <-- not needed at all; removed suspend_enter dpm_suspend_noirq(PMSG_SUSPEND) pci_pm_suspend_noirq # PCI bus .suspend_noirq() method pci_save_state <-- generic PCI pci_prepare_to_sleep <-- generic PCI pci_set_power_state ... dpm_resume_end(PMSG_RESUME) pci_pm_resume # PCI bus .resume() method pci_restore_standard_config pci_set_power_state(PCI_D0) <-- generic PCI pci_restore_state <-- generic PCI agp_ati_resume # driver->pm->resume ati_configure <-- device-specific Based on 0aeddbd0cb07 ("via-agp: convert to generic power management") by Vaibhav Gupta . Link: https://lore.kernel.org/r/20221025203852.681822-5-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Dave Airlie drivers/char/agp/ati-agp.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit c78679d1fe43f9165b11c5ccd3f79c7108b066fe Author: Bjorn Helgaas Date: Tue Oct 25 15:38:47 2022 -0500 agp/amd-k7: Convert to generic power management Convert agpgart-amdk7 from legacy PCI power management to the generic power management framework. Previously agpgart-amdk7 used legacy PCI power management, and agp_amdk7_suspend() and agp_amdk7_resume() were responsible for both device-specific things and generic PCI things like saving and restoring config space and managing power state: agp_amdk7_suspend pci_save_state <-- generic PCI pci_set_power_state <-- generic PCI agp_amdk7_resume pci_set_power_state(PCI_D0) <-- generic PCI pci_restore_state <-- generic PCI amd_irongate_driver.configure <-- device-specific Convert to generic power management where the PCI bus PM methods do the generic PCI things, and the driver needs only the device-specific part, i.e., suspend_devices_and_enter dpm_suspend_start(PMSG_SUSPEND) pci_pm_suspend # PCI bus .suspend() method agp_amdk7_suspend <-- not needed at all; removed suspend_enter dpm_suspend_noirq(PMSG_SUSPEND) pci_pm_suspend_noirq # PCI bus .suspend_noirq() method pci_save_state <-- generic PCI pci_prepare_to_sleep <-- generic PCI pci_set_power_state ... dpm_resume_end(PMSG_RESUME) pci_pm_resume # PCI bus .resume() method pci_restore_standard_config pci_set_power_state(PCI_D0) <-- generic PCI pci_restore_state <-- generic PCI agp_amdk7_resume # driver->pm->resume amd_irongate_driver.configure <-- device-specific Based on 0aeddbd0cb07 ("via-agp: convert to generic power management") by Vaibhav Gupta . Link: https://lore.kernel.org/r/20221025203852.681822-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Dave Airlie drivers/char/agp/amd-k7-agp.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit 7f142022e6bfd2dd5ed998f7165e396bf5966513 Author: Bjorn Helgaas Date: Tue Oct 25 15:38:46 2022 -0500 agp/intel: Convert to generic power management Convert agpgart-intel from legacy PCI power management to the generic power management framework. Previously agpgart-intel used legacy PCI power management, and agp_intel_resume() was responsible for both device-specific things and generic PCI things like saving and restoring config space and managing power state. In this case, agp_intel_suspend() was empty, and agp_intel_resume() already did only device-specific things, so simply convert it to take a struct device * instead of a struct pci_dev *. Based on 0aeddbd0cb07 ("via-agp: convert to generic power management") by Vaibhav Gupta . Link: https://lore.kernel.org/r/20221025203852.681822-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Dave Airlie drivers/char/agp/intel-agp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 94e9f9a23fe4b093cd5a8b292165fad840242b79 Author: Bjorn Helgaas Date: Tue Oct 25 15:38:45 2022 -0500 agp/efficeon: Convert to generic power management Convert agpgart-efficeon from legacy PCI power management to the generic power management framework. Previously agpgart-efficeon used legacy PCI power management, which means agp_efficeon_suspend() and agp_efficeon_resume() were responsible for both device-specific things and generic PCI things like saving and restoring config space and managing power state. In this case, agp_efficeon_suspend() was empty, and agp_efficeon_resume() already did only device-specific things, so simply convert it to take a struct device * instead of a struct pci_dev *. Based on 0aeddbd0cb07 ("via-agp: convert to generic power management") by Vaibhav Gupta . Link: https://lore.kernel.org/r/20221025203852.681822-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Dave Airlie drivers/char/agp/efficeon-agp.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 75aa7915d103ac2cf8c1cf16392673a81f8afc35 Author: Manivannan Sadhasivam Date: Fri Aug 12 11:36:02 2022 +0530 MAINTAINERS: Make Manivannan Sadhasivam the maintainer of qcom_edac The current maintainers have left Qualcomm and their email addresses were bouncing. Since I couldn't get hold of them now, I'm volunteering myself to maintain this driver. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Borislav Petkov Acked-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/20220812060602.7672-4-manivannan.sadhasivam@linaro.org MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 34e0b94520301561390f566d56048b374c28c57e Merge: 9c8dddab2a3c 4161634bce95 Author: David S. Miller Date: Wed Oct 26 15:24:36 2022 +0100 Merge tag 'ieee802154-for-net-next-2022-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== == One of the biggest cycles for ieee802154 in a long time. We are landing the first pieces of a big enhancements in managing PAN's. We might have another pull request ready for this cycle later on, but I want to get this one out first. Miquel Raynal added support for sending frames synchronously as a dependency to handle MLME commands. Also introducing more filtering levels to match with the needs of a device when scanning or operating as a pan coordinator. To support development and testing the hwsim driver for ieee802154 was also enhanced for the new filtering levels and to update the PIB attributes. Alexander Aring fixed quite a few bugs spotted during reviewing changes. He also added support for TRAC in the atusb driver to have better failure handling if the firmware provides the needed information. Jilin Yuan fixed a comment with a repeated word in it. ================== Signed-off-by: David S. Miller commit 26c9134a370ace32cda7a3f9efaf4ca85e57ca8d Merge: ae5a16c8da92 fa9665ef77f5 Author: Rob Herring Date: Wed Oct 26 09:11:54 2022 -0500 Merge branch 'dt/dtbo-rename' into dt/next commit fa9665ef77f5d8e861e2ed7563ebdbddddc6f82b Author: Andrew Davis Date: Mon Oct 24 12:34:34 2022 -0500 staging: pi433: overlay: Rename overlay source file 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. Rename the pi433-overlay.dts file to pi433-overlay.dtso and update the information file pi433.txt for the same. Signed-off-by: Andrew Davis Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221024173434.32518-8-afd@ti.com Signed-off-by: Rob Herring .../devicetree/{pi433-overlay.dts => pi433-overlay.dtso} | 0 drivers/staging/pi433/Documentation/devicetree/pi433.txt | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) commit e87cacadebaf3c03584fbfb540303301cd2c2cbc Author: Frank Rowand Date: Mon Oct 24 12:34:30 2022 -0500 of: overlay: rename overlay source files from .dts to .dtso In drivers/of/unittest-data/: - Rename .dts overlay source files to use .dtso suffix. Modify driver/of/unitest.c to use .dtbo.o based symbols instead of .dtb.o Signed-off-by: Frank Rowand Signed-off-by: Andrew Davis Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Tested-by: Frank Rowand Link: https://lore.kernel.org/r/20221024173434.32518-4-afd@ti.com Signed-off-by: Rob Herring drivers/of/unittest-data/Makefile | 66 +++++++++++----------- .../of/unittest-data/{overlay.dts => overlay.dtso} | 0 .../{overlay_0.dts => overlay_0.dtso} | 0 .../{overlay_1.dts => overlay_1.dtso} | 0 .../{overlay_10.dts => overlay_10.dtso} | 0 .../{overlay_11.dts => overlay_11.dtso} | 0 .../{overlay_12.dts => overlay_12.dtso} | 0 .../{overlay_13.dts => overlay_13.dtso} | 0 .../{overlay_15.dts => overlay_15.dtso} | 0 .../{overlay_16.dts => overlay_16.dtso} | 0 .../{overlay_17.dts => overlay_17.dtso} | 0 .../{overlay_18.dts => overlay_18.dtso} | 0 .../{overlay_19.dts => overlay_19.dtso} | 0 .../{overlay_2.dts => overlay_2.dtso} | 0 .../{overlay_20.dts => overlay_20.dtso} | 0 .../{overlay_3.dts => overlay_3.dtso} | 0 .../{overlay_4.dts => overlay_4.dtso} | 0 .../{overlay_5.dts => overlay_5.dtso} | 0 .../{overlay_6.dts => overlay_6.dtso} | 0 .../{overlay_7.dts => overlay_7.dtso} | 0 .../{overlay_8.dts => overlay_8.dtso} | 0 .../{overlay_9.dts => overlay_9.dtso} | 0 ..._dup_node.dts => overlay_bad_add_dup_node.dtso} | 0 ..._dup_prop.dts => overlay_bad_add_dup_prop.dtso} | 0 ...ay_bad_phandle.dts => overlay_bad_phandle.dtso} | 0 ...rlay_bad_symbol.dts => overlay_bad_symbol.dtso} | 0 .../{overlay_base.dts => overlay_base.dtso} | 0 .../{overlay_gpio_01.dts => overlay_gpio_01.dtso} | 0 ...{overlay_gpio_02a.dts => overlay_gpio_02a.dtso} | 0 ...{overlay_gpio_02b.dts => overlay_gpio_02b.dtso} | 0 .../{overlay_gpio_03.dts => overlay_gpio_03.dtso} | 0 ...{overlay_gpio_04a.dts => overlay_gpio_04a.dtso} | 0 ...{overlay_gpio_04b.dts => overlay_gpio_04b.dtso} | 0 .../{testcases.dts => testcases.dtso} | 0 drivers/of/unittest.c | 48 ++++++++-------- 35 files changed, 57 insertions(+), 57 deletions(-) commit 941214a512d8c80d47e720c17ec17e8539175e93 Author: Andrew Davis Date: Mon Oct 24 12:34:29 2022 -0500 kbuild: Allow DTB overlays to built into .dtbo.S files DTB files can be built into the kernel by converting them to assembly files then assembling them into object files. We extend this here for DTB overlays with the .dtso extensions. We change the start and end delimiting tag prefix to make it clear that this data came from overlay files. [Based on patch by Frank Rowand ] Signed-off-by: Andrew Davis Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Tested-by: Frank Rowand Link: https://lore.kernel.org/r/20221024173434.32518-3-afd@ti.com Signed-off-by: Rob Herring scripts/Makefile.lib | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 363547d2191cbc32ca954ba75d72908712398ff2 Author: Andrew Davis Date: Mon Oct 24 12:34:28 2022 -0500 kbuild: Allow DTB overlays to built from .dtso named source files Currently DTB Overlays (.dtbo) are build from source files with the same extension (.dts) as the base DTs (.dtb). This may become confusing and even lead to wrong results. For example, a composite DTB (created from a base DTB and a set of overlays) might have the same name as one of the overlays that create it. Different files should be generated from differently named sources. .dtb <-> .dts .dtbo <-> .dtso We do not remove the ability to compile DTBO files from .dts files here, only add a new rule allowing the .dtso file name. The current .dts named overlays can be renamed with time. After all have been renamed we can remove the other rule. Signed-off-by: Andrew Davis Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Tested-by: Frank Rowand Link: https://lore.kernel.org/r/20221024173434.32518-2-afd@ti.com Signed-off-by: Rob Herring scripts/Makefile.lib | 3 +++ 1 file changed, 3 insertions(+) commit 98e63c1140a458d6795018ff30e1b259c0e1131c Author: Andy Shevchenko Date: Mon Oct 17 20:15:06 2022 +0300 pinctrl: intel: Use str_enable_disable() helper Use str_enable_disable() helper instead of open coding the same. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 93cc2559d3fdcd28b1a7972ab519a6cd8ba20f9d Author: Thomas Gleixner Date: Wed Oct 26 14:29:51 2022 +0200 spi: Remove the obsolte u64_stats_fetch_*_irq() users. Now that the 32bit UP oddity is gone and 32bit uses always a sequence count, there is no need for the fetch_irq() variants anymore. Convert to the regular interface. Cc: Mark Brown Cc: linux-spi@vger.kernel.org Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221026122951.331638-1-bigeasy@linutronix.de Signed-off-by: Mark Brown drivers/spi/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 07b16192f3f01d002d8ff37dcd4372980330ea93 Author: Nícolas F. R. A. Prado Date: Mon Oct 24 18:00:14 2022 -0400 ASoC: dt-bindings: rt5682: Set sound-dai-cells to 1 Commit 0adccaf1eac9 ("ASoC: dt-bindings: rt5682: Add #sound-dai-cells") defined the sound-dai-cells property as 0. However, rt5682 has two DAIs, AIF1 and AIF2, and therefore should have sound-dai-cells set to 1. Fix it. Fixes: 0adccaf1eac9 ("ASoC: dt-bindings: rt5682: Add #sound-dai-cells") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Chen-Yu Tsai Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221024220015.1759428-4-nfraprado@collabora.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt5682.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c44873993d97f1da264ae9a7adb336d6af8ff9b Author: Nícolas F. R. A. Prado Date: Mon Oct 24 18:00:12 2022 -0400 ASoC: dt-bindings: realtek,rt5682s: Add #sound-dai-cells The rt5682s codec is a DAI provider with two interfaces - AIF1 and AIF2 - and therefore should have a #sound-dai-cells property that is equal to 1. Add it. Acked-by: Krzysztof Kozlowski Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221024220015.1759428-2-nfraprado@collabora.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 5cab0d6c2bd1272287068943471102dc6a0c4bcc Author: Peter Ujfalusi Date: Tue Oct 25 16:27:06 2022 +0300 ASoC: SOF: ipc4-loader: Return ssize_t from sof_ipc4_fw_parse_ext_man() sof_ipc4_fw_parse_ext_man() can return negative error numbers which is not correct for the used size_t type. Change the return value to ssize_t and use the same type where the function is called. Reported-by: Dan Carpenter Fixes: 73c091a2fe96 ("ASoC: SOF: ipc4-loader: Support for loading external libraries") Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221025132706.30356-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-loader.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 514bc59bfcd02a7f241dad91b5534faffb7effd6 Author: Yong Zhi Date: Mon Oct 24 11:43:50 2022 -0500 ASoC: SOF: Intel: MTL: fix comment error Fix small cut-and-paste error in comment. Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221024164350.234830-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/mtl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 555e6f573a0a08b66b9543a0e098c5d6adf8e8af Author: Nícolas F. R. A. Prado Date: Mon Oct 24 19:06:57 2022 -0400 ASoC: dt-bindings: mt8192-mt6359: Set maxItems, not type, for sound-dai sound-dai is a standard property whose type is already set to phandle-array by sound-dai.yaml, so there's no need to set it (and wrongly so for headset-codec) in this binding. What should be set however is the maximum number of items, which for headset-codec should be 1. Signed-off-by: Nícolas F. R. A. Prado Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221024230658.1772907-1-nfraprado@collabora.com Signed-off-by: Mark Brown .../devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0d527a99229b65c781acd747c111e41626e9f041 Author: Amadeusz Sławiński Date: Mon Oct 24 21:08:41 2022 +0200 ASoC: Intel: avs: boards: Fix typo in comments It keeps propagating through machine boards, fix it once and for all. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20221024190841.31572-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/max98373.c | 2 +- sound/soc/intel/avs/boards/max98927.c | 2 +- sound/soc/intel/avs/boards/ssm4567.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 4088355afac9d36bc0c27c34d34b74091e5a7c7e Author: Amadeusz Sławiński Date: Mon Oct 24 21:08:40 2022 +0200 ASoC: Intel: boards: Fix typo in comments It keeps propagating through machine boards, fix it once and for all. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221024190841.31572-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/bdw-rt5650.c | 2 +- sound/soc/intel/boards/bdw-rt5677.c | 2 +- sound/soc/intel/boards/bxt_rt298.c | 2 +- sound/soc/intel/boards/bytcht_cx2072x.c | 2 +- sound/soc/intel/boards/bytcht_es8316.c | 2 +- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/bytcr_wm5102.c | 2 +- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 2 +- sound/soc/intel/boards/cht_bsw_nau8824.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- sound/soc/intel/boards/skl_nau88l25_max98357a.c | 2 +- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) commit 4e02fd6207474ef2d882b8620f4c3db9a02d4ddd Author: Aidan MacDonald Date: Sun Oct 23 15:33:28 2022 +0100 ASoC: jz4740-i2s: Refactor DAI probe/remove ops as component ops Move most of the DAI probe/remove logic into component ops. This makes things more consistent because the AIC clock is now managed solely from the component side. And it makes it easier to add codec switching support later on. Reviewed-by: Paul Cercueil Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221023143328.160866-10-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 54 ++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 24 deletions(-) commit 165afe6b66aafaafc95484ac2f0f09f78d62386b Author: Aidan MacDonald Date: Sun Oct 23 15:33:27 2022 +0100 ASoC: jz4740-i2s: Move component functions near the component driver Move the component suspend/resume functions near the definition of the component driver to emphasize that they're unrelated to the DAI functions. Acked-by: Paul Cercueil Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221023143328.160866-9-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 72 +++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 36 deletions(-) commit 84a914349ba2634e8db6b0815f100697d878d033 Author: Aidan MacDonald Date: Sun Oct 23 15:33:26 2022 +0100 ASoC: jz4740-i2s: Support continuous sample rate The I2S controller on JZ47xx SoCs doesn't impose restrictions on sample rate and the driver doesn't make any assumptions about it, so the DAI should advertise a continuous sample rate range. Acked-by: Paul Cercueil Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221023143328.160866-8-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7abd01cfc5428581b21099eb629d88e76a47b67a Author: Aidan MacDonald Date: Sun Oct 23 15:33:25 2022 +0100 ASoC: jz4740-i2s: Support S20_LE and S24_LE sample formats The audio controller on JZ47xx SoCs can transfer 20- and 24-bit samples in the FIFO, so allow those formats to be used with the I2S driver. Although the FIFO doesn't care about the in-memory sample format, we only support 4-byte format variants because the DMA controller on these SoCs cannot transfer in 3-byte multiples. Reviewed-by: Paul Cercueil Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221023143328.160866-7-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit dacc06b812f46e0d4cfdda98134a8b5d64375341 Author: Aidan MacDonald Date: Sun Oct 23 15:33:24 2022 +0100 ASoC: jz4740-i2s: Align macro values and sort includes Some purely cosmetic changes: line up all the macro values to make things easier to read and sort the includes alphabetically. Acked-by: Paul Cercueil Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221023143328.160866-6-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 66 +++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 34 deletions(-) commit b355ebebb17c438b90c3d339f38a79559f7259df Author: Aidan MacDonald Date: Sun Oct 23 15:33:23 2022 +0100 ASoC: jz4740-i2s: Use FIELD_PREP() macros in hw_params callback Get rid of a couple of macros and improve readability by using FIELD_PREP() and GENMASK() for the sample size setting. Acked-by: Paul Cercueil Reviewed-by: Paul Cercueil Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221023143328.160866-5-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 0fddb4bce669fd255f6ffade6905da5c8ed3e254 Author: Aidan MacDonald Date: Sun Oct 23 15:33:22 2022 +0100 ASoC: jz4740-i2s: Simplify using regmap fields The differences between register fields on different SoC versions can be abstracted away using the regmap field API. This is easier to understand and extend than comparisons based on the version ID. Since the version IDs are unused after this change, remove them at the same time, and remove unused macros. Reviewed-by: Paul Cercueil Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221023143328.160866-4-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 135 ++++++++++++++++++++++++------------------ 1 file changed, 77 insertions(+), 58 deletions(-) commit cf375e693252f4e8ecb6256af631ff381381a3dd Author: Aidan MacDonald Date: Sun Oct 23 15:33:21 2022 +0100 ASoC: jz4740-i2s: Convert to regmap API Using regmap for accessing the AIC registers makes the driver a little easier to read, and later refactors can take advantage of regmap APIs to further simplify the driver. Reviewed-by: Paul Cercueil Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221023143328.160866-3-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/Kconfig | 1 + sound/soc/jz4740/jz4740-i2s.c | 106 +++++++++++++++--------------------------- 2 files changed, 39 insertions(+), 68 deletions(-) commit 8b3a9ad86239f80ed569e23c3954a311f66481d6 Author: Aidan MacDonald Date: Sun Oct 23 15:33:20 2022 +0100 ASoC: jz4740-i2s: Handle independent FIFO flush bits On the JZ4740, there is a single bit that flushes (empties) both the transmit and receive FIFO. Later SoCs have independent flush bits for each FIFO. Independent FIFOs can be flushed before the snd_soc_dai_active() check because it won't disturb other active streams. This ensures that the FIFO we're about to use is always flushed before starting up. With shared FIFOs we can't do that because if another substream is active, flushing its FIFO would cause underrun errors. This also fixes a bug: since we were only setting the JZ4740's flush bit, which corresponds to the TX FIFO flush bit on other SoCs, other SoCs were not having their RX FIFO flushed at all. Fixes: 967beb2e8777 ("ASoC: jz4740: Add jz4780 support") Reviewed-by: Paul Cercueil Cc: stable@vger.kernel.org Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20221023143328.160866-2-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown sound/soc/jz4740/jz4740-i2s.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) commit 3d824ceb8a9cd3d9947767d2ae0231f483a5bf8d Author: Pierre-Louis Bossart Date: Mon Oct 24 11:53:10 2022 -0500 ASoC: SOF: Intel: hda-stream: use readb/writeb for stream registers readb/writeb are used directly without any wrappers or references to the BAR, as usually done for other registers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221024165310.246183-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 847fd278610dda8568e1633b80abd56e08de5690 Author: Pierre-Louis Bossart Date: Mon Oct 24 11:53:09 2022 -0500 ASoC: SOF: Intel: hda-stream: use snd_sof_dsp_updateb() helper No functionality change, only code consistency. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221024165310.246183-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 4 ++-- sound/soc/sof/intel/hda.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit e1e71c60eed6cb057d8ded6bb543f48c32b1e029 Author: Pierre-Louis Bossart Date: Mon Oct 24 11:53:08 2022 -0500 ASoC: SOF: Intel: hda: use SOF helper for consistency No functionality change, just more consistency in the code. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221024165310.246183-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 38bf07805955bc16ba436c9d822df43e6b4a8fa6 Author: Pierre-Louis Bossart Date: Mon Oct 24 11:53:07 2022 -0500 ASoC: SOF: Intel: hda-stream: rename CL_SD_CTL registers as SD_CTL The use of the CL prefix is misleading. HDaudio streams are used for code loading since ApolloLake, but they are also used for regular audio transfers. No functionality change, pure rename. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221024165310.246183-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-ctrl.c | 6 +++--- sound/soc/sof/intel/hda-loader-skl.c | 30 +++++++++++++++--------------- sound/soc/sof/intel/hda-loader.c | 4 ++-- sound/soc/sof/intel/hda-stream.c | 34 +++++++++++++++++----------------- sound/soc/sof/intel/hda.h | 22 +++++++++++----------- 5 files changed, 48 insertions(+), 48 deletions(-) commit d66149dc0fc2b72f5f2d5050d529f5a7f212700d Author: Pierre-Louis Bossart Date: Mon Oct 24 11:53:06 2022 -0500 ASoC: SOF: Intel: hda-stream: use SOF helpers for consistency Not sure why we mixed sof and hdac helpers, this makes the code way less readable. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221024165310.246183-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit be4156a25dfa34c0cb2ab9e02b8a085ff986e9ec Author: Pierre-Louis Bossart Date: Mon Oct 24 11:53:05 2022 -0500 ASoC: SOF: Intel: hda: remove useless check on GCTL Now that we always do a full reset, there's no point in checking if the controller is always out-of-reset. This is always true by construction. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221024165310.246183-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-ctrl.c | 7 ------- 1 file changed, 7 deletions(-) commit b48b77d836cac43a5bce4f4a1f5e9f8f6e9b1da4 Author: Pierre-Louis Bossart Date: Mon Oct 24 11:53:04 2022 -0500 ASoC: SOF: Intel: hda: always do a full reset There's no point in checking for a full-reset condition that is always-true in the callers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221024165310.246183-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-ctrl.c | 26 ++++++++++++-------------- sound/soc/sof/intel/hda-dsp.c | 2 +- sound/soc/sof/intel/hda.c | 2 +- sound/soc/sof/intel/hda.h | 2 +- 4 files changed, 15 insertions(+), 17 deletions(-) commit a09d82ce0a86772a6bbfe118414708957ed1a5b1 Author: Pierre-Louis Bossart Date: Mon Oct 24 11:53:03 2022 -0500 ASoC: SOF: Intel: hda-ctrl: remove useless sleep The hda_dsp_ctrl_link_reset() already performs a usleep and a check that GCTL has been modified, there's no point in waiting more. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221024165310.246183-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-ctrl.c | 4 ---- 1 file changed, 4 deletions(-) commit 8d44a4fceeb073ee325b6ad91f7a617b9290f8ce Author: Pierre-Louis Bossart Date: Mon Oct 24 11:53:02 2022 -0500 ASoC: SOF: Intel: hda-dai: remove useless members in hda_pipe_params Some settings were never or are no longer used, remove useless definitions and assignments. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221024165310.246183-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 5 ----- 1 file changed, 5 deletions(-) commit 4842f79f8fdd9a5aae3d5db98ab3e3a36a387cfd Author: Pierre-Louis Bossart Date: Mon Oct 24 11:53:01 2022 -0500 ASoC: SOF: Intel: hda-dai: use component_get_drvdata to find hdac_bus Remove the last usage of substream->runtime->private_data in the HDAudio BE hw_params. The SOF core saves the 'sdev' global context as component drvdata, and we already save the bus information in sdev. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221024165310.246183-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 0351a9b8f8447935e67b98829c1ad287de426f7e Author: Pierre-Louis Bossart Date: Mon Oct 24 11:53:00 2022 -0500 ASoC: SOF: Intel: hda-dai: start removing the use of runtime->private_data in BE The SOF HDAudio code stores the Host DMA hdac_stream structure in the FE substream->runtime->private_data. The BE dailink also uses the substream->runtime->private_data to allocate the link DMA stream tag. This really works by accident: the DPCM core copies the FE runtime information in the BE, which has the side-effect of sharing the FE-specific private_data with the BE. To avoid more uses of the private_data with potential issues such as accessing stale information or use-after-free cases, this patch removes most of the usages of this private_data at the BE level. We can directly use the existing dma_data to access the relevant information. However the hw_params still uses the information, mainly to go back to the 'bus' structure required for the link dma stream tag allocation. This is safe in that the 'bus' is not stream or PCM specific. The next patch will completely remove this last use of private_data by using the component_drvdata - which is how SOF passes a global context around. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221024165310.246183-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 33ac4ca758b80421640cb5edb08b531f5be3da20 Author: Pierre-Louis Bossart Date: Mon Oct 24 11:52:59 2022 -0500 ASoC: SOF: Intel: hda-dsp: use SOF helpers for consistency No functionality change. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221024165310.246183-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c28a36b012f1fed177e787d242c592017d284538 Author: Pierre-Louis Bossart Date: Mon Oct 24 11:52:58 2022 -0500 ASoC: SOF: ops: add snd_sof_dsp_updateb() helper Add missing helper in SOF toolbox. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221024165310.246183-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ops.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 74fe0c4dcb41678543915cb97928c366ac1aaceb Author: Pierre-Louis Bossart Date: Mon Oct 24 11:52:57 2022 -0500 ASoC: SOF: ops: add readb/writeb helpers These will be used to add more consistency in the SOF core and drivers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221024165310.246183-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ops.h | 18 ++++++++++++++++++ sound/soc/sof/sof-priv.h | 4 ++++ 2 files changed, 22 insertions(+) commit 42b00e9da59f2220bb2a052b72ff1463c8c4ca2c Author: Pierre-Louis Bossart Date: Mon Oct 24 11:52:56 2022 -0500 ASoC: SOF: Intel: use mmio fallback for all platforms No need to expose an indirection when we can use the fallback. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221024165310.246183-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/bdw.c | 6 +----- sound/soc/sof/intel/byt.c | 12 ++---------- sound/soc/sof/intel/hda-common-ops.c | 6 +----- sound/soc/sof/intel/pci-tng.c | 6 +----- 4 files changed, 5 insertions(+), 25 deletions(-) commit 01278cb6fa82083000a9e0b56c8b004caf5b6a73 Author: Pierre-Louis Bossart Date: Mon Oct 24 11:52:55 2022 -0500 ASoC: SOF: ops: fallback to mmio in helpers Returning an error when a read/write is not implemented makes no sense, especially on read where no return value makes sense. Change the logic to directly fallback to mmio. If a platform truly wants other read/writes that are not plain vanilla mmio, it needs to implement its own routines. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221024165310.246183-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ops.h | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit b4e83d369015e3045418ca86984c3cd8dcf5a365 Author: Andy Shevchenko Date: Mon Oct 17 20:06:00 2022 +0300 gpio: exar: Allow IO port access It's possible that PCI device can provide an IO port resource for the device. regmap MMIO currently uses MMIO by default. With an additional flag we enable support for IO port accesses. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Acked-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-exar.c | 1 + 1 file changed, 1 insertion(+) commit 1454a928b637bd169d99fc91a46b3b36cea76f9f Author: Sascha Hauer Date: Fri Oct 7 13:46:46 2022 +0200 gpio: Add gpio latch driver This driver implements a GPIO multiplexer based on latches connected to other GPIOs. A set of data GPIOs is connected to the data input of multiple latches. The clock input of each latch is driven by another set of GPIOs. With two 8-bit latches 10 GPIOs can be multiplexed into 16 GPIOs. GPOs might be a better term as in fact the multiplexed pins are output only. Signed-off-by: Sascha Hauer Reviewed-by: Serge Semin Reviewed-by: Linus Walleij [Bartosz: fixed the strange of_device_id formatting] Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 6 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-latch.c | 219 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 226 insertions(+) commit 2a903ca922d007a0b40ca425ce55b5f0a0e01956 Author: Sascha Hauer Date: Fri Oct 7 13:46:47 2022 +0200 dt-bindings: gpio: Add gpio-latch binding document This adds a binding for a GPIO multiplexer driver based on latches connected to other GPIOs. Signed-off-by: Sascha Hauer Reviewed-by: Rob Herring Reviewed-by: Serge Semin Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski .../devicetree/bindings/gpio/gpio-latch.yaml | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit b8ed55335ed86ab0a2b904ec1ee7bd121587dbe8 Author: Imre Deak Date: Tue Oct 25 14:44:57 2022 +0300 drm/i915/tgl+: Sanitize DKL PHY register definitions Not all Dekel PHY registers have a lane instance, so having to specify this when using them is awkward. It makes more sense to define each PHY register with its full internal PHY offset where bits 15:12 is the lane for lane-instanced PHY registers and just a register bank index for other PHY registers. This way lane-instanced registers can be referred to with the (tc_port, lane) parameters, while other registers just with a tc_port parameter. An additional benefit of this change is to prevent passing a Dekel register to a generic MMIO access function or vice versa. v2: - Fix parameter reuse in the DKL_REG_MMIO definition. v3: - Rebase on latest patchset version. Cc: Jani Nikula Acked-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20221025114457.2191004-3-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 20 +-- .../drm/i915/display/intel_display_power_well.c | 2 +- drivers/gpu/drm/i915/display/intel_dkl_phy.c | 32 ++-- drivers/gpu/drm/i915/display/intel_dkl_phy.h | 10 +- drivers/gpu/drm/i915/display/intel_dkl_phy_regs.h | 199 +++++++++++---------- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 48 ++--- 6 files changed, 159 insertions(+), 152 deletions(-) commit d69813c7640fdfd03360a300d24b08149bdc4c97 Author: Imre Deak Date: Tue Oct 25 14:44:56 2022 +0300 drm/i915/tgl+: Move DKL PHY register definitions to intel_dkl_phy_regs.h Move the TypeC DKL PHY register definitions to intel_dkl_phy_regs.h. No functional changes. v2: - Move the definitions to a new intel_dkl_phy_regs.h file. (Jani). v3: - Rebase on latest patchset version. Cc: Jani Nikula Acked-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20221025114457.2191004-2-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 1 + .../drm/i915/display/intel_display_power_well.c | 1 + drivers/gpu/drm/i915/display/intel_dkl_phy.c | 1 + drivers/gpu/drm/i915/display/intel_dkl_phy_regs.h | 193 +++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 1 + drivers/gpu/drm/i915/display/intel_tc.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 179 ------------------- 7 files changed, 198 insertions(+), 179 deletions(-) commit 589ebefd7a892f3f8b550066524643f1ea66f858 Author: Imre Deak Date: Tue Oct 25 13:26:42 2022 +0300 drm/i915: Rename intel_tc_phy_regs.h to intel_mg_phy_regs.h An upcoming patch moves the DKL PHY register definitions to intel_dkl_phy_regs.h, so for consistency rename intel_tc_phy_regs.h containing only MG PHY register definitions to intel_mg_phy_regs.h. Suggested-by: Jani Nikula Cc: Jani Nikula Acked-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20221025102644.2123988-3-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 2 +- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 2 +- .../drm/i915/display/{intel_tc_phy_regs.h => intel_mg_phy_regs.h} | 6 +++--- drivers/gpu/drm/i915/display/intel_tc.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 89cb0ba4ceee6bed1059904859c5723b3f39da68 Author: Imre Deak Date: Tue Oct 25 14:44:55 2022 +0300 drm/i915/tgl+: Add locking around DKL PHY register accesses Accessing the TypeC DKL PHY registers during modeset-commit, -verification, DP link-retraining and AUX power well toggling is racy due to these code paths being concurrent and the PHY register bank selection register (HIP_INDEX_REG) being shared between PHY instances (aka TC ports) and the bank selection being not atomic wrt. the actual PHY register access. Add the required locking around each PHY register bank selection-> register access sequence. Kudos to Ville for noticing the race conditions. v2: - Add the DKL PHY register accessors to intel_dkl_phy.[ch]. (Jani) - Make the DKL_REG_TC_PORT macro independent of PHY internals. - Move initing the DKL PHY lock to a more logical place. v3: - Fix parameter reuse in the DKL_REG_TC_PORT definition. - Document the usage of phy_lock. v4: - Fix adding TC_PORT_1 offset in the DKL_REG_TC_PORT definition. Cc: Ville Syrjälä Cc: Jani Nikula Cc: # v5.5+ Acked-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20221025114457.2191004-1-imre.deak@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_ddi.c | 68 ++++++------- drivers/gpu/drm/i915/display/intel_display_core.h | 8 ++ .../drm/i915/display/intel_display_power_well.c | 7 +- drivers/gpu/drm/i915/display/intel_dkl_phy.c | 109 +++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_dkl_phy.h | 24 +++++ drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 59 +++++------ drivers/gpu/drm/i915/i915_driver.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 3 + 9 files changed, 204 insertions(+), 76 deletions(-) commit 58354c7d35d35dd119ada18ff84a6686ccc8743f Author: Thomas Richter Date: Thu Oct 20 11:55:52 2022 +0200 s390/pai: rename structure member users to active_events Rename structure member users to active_events to make it consistent with PMU pai_ext. Also use the same prefix syntax for increment and decrement operators in both PMUs. Signed-off-by: Thomas Richter Acked-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik arch/s390/kernel/perf_pai_crypto.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d3db4ac3c761def3d3a8e5ea6d05d1636c44c2ba Author: Thomas Richter Date: Thu Oct 20 11:38:05 2022 +0200 s390/pai: rework pai_crypto mapped buffer reference count Rework the mapped buffer reference count in PMU pai_crypto to match the same technique as in PMU pai_ext. This simplifies the logic. Do not count the individual number of counter and sampling processes. Remember the type of access and the total number of references to the buffer. Signed-off-by: Thomas Richter Acked-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik arch/s390/kernel/perf_pai_crypto.c | 42 ++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit 4c78796301700bb9de82fce34c33adb1699b0ed9 Author: Thomas Richter Date: Thu Oct 20 10:52:24 2022 +0200 s390/pai: move enum definition to header file Move enum definition to header file. This is done in preparation for a follow on patch where this enum will be used in another source file. Also change the enum name from paiext_mode to paievt_mode to indicate this enum is now used for several events. Make naming consistent and rename PAI_MODE_COUNTER to PAI_MODE_COUNTING. Signed-off-by: Thomas Richter Acked-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik arch/s390/include/asm/pai.h | 6 ++++++ arch/s390/kernel/perf_pai_ext.c | 12 +++--------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 55af33fdec50a9a88f0dc0f8b898db7399e32645 Author: Thomas Richter Date: Tue Sep 20 16:33:23 2022 +0200 s390/con3215: Fix white space errors Adjust white space according to coding guidelines. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik drivers/s390/char/con3215.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 1f3307cf3aac88763077fac90404f2c57bc5181a Author: Thomas Richter Date: Tue Sep 20 14:26:16 2022 +0200 s390/con3215: Drop console data printout when buffer full Using z/VM the 3270 terminal emulator also emulates an IBM 3215 console which outputs line by line. When the screen is full, the console enters the MORE... state and waits for the operator to confirm the data on the screen by pressing a clear key. If this does not happen in the default time frame (currently 50 seconds) the console enters the HOLDING state. It then waits another time frame (currently 10 seconds) before the output continues on the next screen. When the operator presses the clear key during these wait times, the output continues immediately. This may lead to a very long boot time when the console has to print many messages, also the system may hang because of the console's limited buffer space and the system waits for the console output to drain and finally to finish. This problem can only occur when a terminal emulator is actually connected to the 3215 console driver. If not z/VM simply drops console output. Remedy this rare situation and add a kernel boot command line parameter con3215_drop. It can be set to 0 (do not drop) or 1 (do drop) which is the default. This instructs the kernel drop console data when the console buffer is full. This speeds up the boot time considerable and also does not hang the system anymore. Add a sysfs attribute file for console IBM 3215 named con_drop. This allows for changing the behavior after the boot, for example when during interactive debugging a panic/crash is expected. Here is a test of the new behavior using the following test program: #/bin/bash declare -i cnt=4 mode=$(cat /sys/bus/ccw/drivers/3215/con_drop) [ $mode = yes ] && cnt=25 echo "cons_drop $(cat /sys/bus/ccw/drivers/3215/con_drop)" echo "vmcp term more 5 2" vmcp term more 5 2 echo "Run $cnt iterations of "'echo t > /proc/sysrq-trigger' for i in $(seq $cnt) do echo "$i. command 'echo t > /proc/sysrq-trigger' at $(date +%F,%T)" echo t > /proc/sysrq-trigger sleep 1 done echo "droptest done" > /dev/kmsg # Output with sysfs attribute con_drop set to 1: # ./droptest.sh cons_drop yes vmcp term more 5 2 Run 25 iterations of echo t > /proc/sysrq-trigger 1. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:09 2. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:10 3. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:11 4. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:12 5. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:13 6. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:14 7. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:15 8. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:16 9. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:17 10. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:18 11. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:19 12. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:20 13. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:21 14. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:22 15. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:23 16. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:24 17. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:25 18. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:26 19. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:27 20. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:28 21. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:29 22. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:30 23. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:31 24. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:32 25. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:15:33 # There are no hangs anymore. Output with sysfs attribute con_drop set to 0 and identical setting for z/VM console 'term more 5 2'. Sometimes hitting the clear key at the x3270 console to progress output. # ./droptest.sh cons_drop no vmcp term more 5 2 Run 4 iterations of echo t > /proc/sysrq-trigger 1. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:20:58 2. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:24:32 3. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:28:04 4. command 'echo t > /proc/sysrq-trigger' at 2022-09-02,10:31:37 # Details: Enable function raw3215_write() to handle tab expansion and newlines and feed it with input not larger than the console buffer of 65536 bytes. Function raw3125_putchar() just forwards its character for output to raw3215_write(). This moves tab to blank conversion to one function raw3215_write() which also does call raw3215_make_room() to wait for enough free buffer space. Function handle_write() loops over all its input and segments input into chunks of console buffer size (should the input be larger). Rework tab expansion handling logic to avoid code duplication. Signed-off-by: Thomas Richter Acked-by: Peter Oberparleiter Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik Documentation/admin-guide/kernel-parameters.txt | 11 ++ drivers/s390/char/con3215.c | 216 +++++++++++++++++------- 2 files changed, 166 insertions(+), 61 deletions(-) commit 655ae931548f09ab6d583474097893a482eb4d61 Author: Thomas Richter Date: Tue Aug 30 15:03:07 2022 +0200 s390/con3215: Simplify console write operation The functions con3215_write() and tty3215_write() have nearly identical function bodies and a slightly different function prototype. Create function handle_write() to handle the common function body and maintain the function prototypes. Signed-off-by: Thomas Richter Reviewed-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik drivers/s390/char/con3215.c | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) commit 9c8dddab2a3c30a8c1d410c906afbcacb46f8a3f Merge: d0217284cea7 68399ff574e4 Author: David S. Miller Date: Wed Oct 26 13:46:38 2022 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== this is a pull request of 29 patches for net-next/master. The first patch is by Daniel S. Trevitz and adds documentation for switchable termination resistors. Zhang Changzhong's patch fixes a debug output in the j13939 stack. Oliver Hartkopp finally removes the pch_can driver, which is superseded by the generic c_can driver. Gustavo A. R. Silva replaces a zero-length array with DECLARE_FLEX_ARRAY() in the ucan driver. Kees Cook's patch removes a no longer needed silencing of "-Warray-bounds" warnings for the kvaser_usb driver. The next 2 patches target the m_can driver. The first is by me cleans up the LEC error handling, the second is by Vivek Yadav and extends the LEC error handling to the data phase of CAN-FD frames. The next 9 patches all target the gs_usb driver. The first 5 patches are by me and improve the Kconfig prompt and help text, set netdev->dev_id to distinguish multi CAN channel devices, allow loopback and listen only at the same time, and clean up the gs_can_open() function a bit. The remaining 4 patches are by Jeroen Hofstee and add support for 2 new features: Bus Error Reporting and Get State. Jimmy Assarsson and Anssi Hannula contribute 10 patches for the kvaser_usb driver. They first add Listen Only and Bus Error Reporting support, handle CMD_ERROR_EVENT errors, improve CAN state handling, restart events, and configuration of the bit timing parameters. Another patch by me which fixes the indention in the m_can driver. A patch by Dongliang Mu cleans up the ucan_disconnect() function in the ucan driver. The last patch by Biju Das is for the rcan_canfd driver and cleans up the reset handling. ==================== Signed-off-by: David S. Miller commit 77b533411595668659ce5aaade4ca36c7aa2c488 Author: Nico Boehr Date: Tue Oct 25 10:20:39 2022 +0200 KVM: s390: VSIE: sort out virtual/physical address in pin_guest_page pin_guest_page() used page_to_virt() to calculate the hpa of the pinned page. This currently works, because virtual and physical addresses are the same. Use page_to_phys() instead to resolve the virtual-real address confusion. One caller of pin_guest_page() actually expected the hpa to be a hva, so add the missing phys_to_virt() conversion here. Signed-off-by: Nico Boehr Reviewed-by: Claudio Imbrenda Acked-by: David Hildenbrand Reviewed-by: Christian Borntraeger Link: https://lore.kernel.org/r/20221025082039.117372-2-nrb@linux.ibm.com Message-Id: <20221025082039.117372-2-nrb@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/kvm/vsie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4435b79a366495a5cb43b792d9e7d69d489428cd Author: Nico Boehr Date: Thu Oct 20 16:31:59 2022 +0200 KVM: s390: pv: sort out physical vs virtual pointers usage Fix virtual vs physical address confusion (which currently are the same). Signed-off-by: Nico Boehr Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20221020143159.294605-6-nrb@linux.ibm.com Message-Id: <20221020143159.294605-6-nrb@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/kvm/pv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit b99f4512197acc10f63b5fb462c088c2f62b5120 Author: Nico Boehr Date: Thu Oct 20 16:31:58 2022 +0200 KVM: s390: sida: sort out physical vs virtual pointers usage All callers of the sida_origin() macro actually expected a virtual address, so rename it to sida_addr() and hand out a virtual address. At some places, the macro wasn't used, potentially creating problems if the sida size ever becomes nonzero (not currently the case), so let's start using it everywhere now while at it. Signed-off-by: Nico Boehr Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20221020143159.294605-5-nrb@linux.ibm.com Message-Id: <20221020143159.294605-5-nrb@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/kvm_host.h | 3 +-- arch/s390/kvm/intercept.c | 7 +++---- arch/s390/kvm/kvm-s390.c | 9 +++++---- arch/s390/kvm/priv.c | 3 +-- arch/s390/kvm/pv.c | 8 +++++--- 5 files changed, 15 insertions(+), 15 deletions(-) commit fe0ef00304639cae82df7c9ad6a15286bd5f876e Author: Nico Boehr Date: Thu Oct 20 16:31:57 2022 +0200 KVM: s390: sort out physical vs virtual pointers usage Fix virtual vs physical address confusion (which currently are the same). Signed-off-by: Nico Boehr Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20221020143159.294605-4-nrb@linux.ibm.com Message-Id: <20221020143159.294605-4-nrb@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/kvm_host.h | 1 + arch/s390/kvm/intercept.c | 2 +- arch/s390/kvm/kvm-s390.c | 44 +++++++++++++++++++++++----------------- arch/s390/kvm/kvm-s390.h | 5 +++-- 4 files changed, 30 insertions(+), 22 deletions(-) commit 6b33e68ab30949f9657e2acc59766977ae63e1cc Author: Nico Boehr Date: Thu Oct 20 16:31:56 2022 +0200 s390/entry: sort out physical vs virtual pointers usage in sie64a Fix virtual vs physical address confusion (which currently are the same). sie_block is accessed in entry.S and passed it to hardware, which is why both its physical and virtual address are needed. To avoid every caller having to do the virtual-physical conversion, add a new function sie64a() which converts the virtual address to physical. Signed-off-by: Nico Boehr Reviewed-by: Alexander Gordeev Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20221020143159.294605-3-nrb@linux.ibm.com Message-Id: <20221020143159.294605-3-nrb@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/include/asm/kvm_host.h | 8 +++++++- arch/s390/include/asm/stacktrace.h | 1 + arch/s390/kernel/asm-offsets.c | 1 + arch/s390/kernel/entry.S | 26 +++++++++++++++----------- 4 files changed, 24 insertions(+), 12 deletions(-) commit 079f0c21ef6d79f80b19b64f5e0218d5a328c4cd Author: Nico Boehr Date: Thu Oct 20 16:31:55 2022 +0200 s390/mm: gmap: sort out physical vs virtual pointers usage Fix virtual vs physical address confusion (which currently are the same). Signed-off-by: Nico Boehr Reviewed-by: Pierre Morel Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20221020143159.294605-2-nrb@linux.ibm.com Message-Id: <20221020143159.294605-2-nrb@linux.ibm.com> Signed-off-by: Janosch Frank arch/s390/mm/gmap.c | 147 +++++++++++++++++++++++++++------------------------- 1 file changed, 76 insertions(+), 71 deletions(-) commit 1177ca3a0b53bdfb1438e33a5546527de728ec10 Author: Andy Shevchenko Date: Wed Oct 19 01:00:55 2022 +0300 pinctrl: tigerlake: Deduplicate COMMUNITY macro code Define a common COMMUNITY macro and supply a variant to it. This removes some verbosity in macros. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-tigerlake.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 2d145b8bd3eb72ed577550355430930ec1057d15 Author: Andy Shevchenko Date: Wed Oct 19 01:00:55 2022 +0300 pinctrl: sunrisepoint: Deduplicate COMMUNITY macro code Define a common COMMUNITY macro and supply a variant to it. This removes some verbosity in macros. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit ac51b59dff2c8f92292347126cd6d24201e73b89 Author: Andy Shevchenko Date: Wed Oct 19 01:00:55 2022 +0300 pinctrl: icelake: Deduplicate COMMUNITY macro code Define a common COMMUNITY macro and supply a variant to it. This removes some verbosity in macros. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-icelake.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b62241545ba12735438342874aa2aa67c68bfd22 Author: Andy Shevchenko Date: Wed Oct 19 01:00:55 2022 +0300 pinctrl: cannonlake: Deduplicate COMMUNITY macro code Define a common COMMUNITY macro and supply a variant to it. This removes some verbosity in macros. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-cannonlake.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit de1fabef28e09dedfc1fb6b75a23f5851ce78658 Author: Andy Shevchenko Date: Wed Oct 19 01:00:55 2022 +0300 pinctrl: alderlake: Deduplicate COMMUNITY macro code Define a common COMMUNITY macro and supply a variant to it. This removes some verbosity in macros. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-alderlake.c | 40 +++++++++++++------------------ 1 file changed, 16 insertions(+), 24 deletions(-) commit c82009584edb36dade0598dce840bed725cfcd56 Author: Lad Prabhakar Date: Wed Oct 26 02:21:23 2022 +0100 clk: renesas: rzg2l: Fix typo in struct rzg2l_cpg_priv kerneldoc Fix typo pll5_mux_dsi_div_params -> mux_dsi_div_params Fixes the below warning (make W=1): drivers/clk/renesas/rzg2l-cpg.c:115: warning: Function parameter or member 'mux_dsi_div_params' not described in 'rzg2l_cpg_priv' Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20221026012123.159790-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/rzg2l-cpg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db7076d5a7f0ca7dcf08f5095c74f86d4d0085ff Author: Wolfram Sang Date: Wed Oct 12 20:48:30 2022 +0200 clk: renesas: r8a779a0: Fix SD0H clock name Correct the misspelled textual name of the SD0H clock. Fixes: 470e3f0d0b15 ("clk: renesas: rcar-gen4: Introduce R-Car Gen4 CPG driver") Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20221012184830.3199-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a779a0-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed823991c6ecfb04f6511337fd2086257d08fac8 Author: Geert Uytterhoeven Date: Wed Oct 12 16:03:44 2022 +0200 clk: renesas: r8a779g0: Add RPC-IF clock Add the module clock used by the SPI Multi I/O Bus Controller (RPC-IF) on the Renesas R-Car V4H (R8A779G0) SoC. While at it, fix table alignment in the definition of the related RPCSRC internal clock. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/f0609c82e742865be753b67a0a6080f193f405ad.1665583328.git.geert+renesas@glider.be drivers/clk/renesas/r8a779g0-cpg-mssr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4ee04993aa83e5b260705a544007f7f6cfff0472 Author: Geert Uytterhoeven Date: Wed Oct 12 09:05:05 2022 +0200 clk: renesas: r8a779g0: Add SDHI clocks Add the SD0H core clock and the SDHI module clock, which are used by the SD Card/MMC Interface on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/e9b05d102160cc3f7395ac53a533e81c07307d5e.1665558175.git.geert+renesas@glider.be drivers/clk/renesas/r8a779g0-cpg-mssr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0a5a00f042c474f3b865615a0662fc11db84b15f Author: Geert Uytterhoeven Date: Wed Oct 12 09:02:34 2022 +0200 clk: renesas: r8a779f0: Add SASYNCPER internal clock Add the SASYNCPER internal clock, which is the clock source of the various SASYNCPERD[124] clocks, to match the clock tree diagram in the documentation. Signed-off-by: Geert Uytterhoeven Reported-by: Wolfram Sang Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/18e6765bfc3bf7c3ee5ce93a370d377c1d17728e.1665558014.git.geert+renesas@glider.be drivers/clk/renesas/r8a779f0-cpg-mssr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 99c05a2b710f16ea592ccb63ef5fe5f1f6b15db9 Author: Geert Uytterhoeven Date: Wed Oct 12 09:02:33 2022 +0200 clk: renesas: r8a779f0: Fix SD0H clock name Correct the misspelled textual name of the SD0H clock. Fixes: 9b5dd1ff705c6854 ("clk: renesas: r8a779f0: Add SDH0 clock") Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/1f682d338f133608f138ae87323707436ad8c748.1665558014.git.geert+renesas@glider.be drivers/clk/renesas/r8a779f0-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7265521e950ae4c0f475752ba6789688fbabfa44 Author: Lad Prabhakar Date: Mon Oct 10 00:12:53 2022 +0100 clk: renesas: r9a07g043: Drop WDT2 clock and reset entry WDT CH2 is specifically to check the operation of Cortex-M33 CPU and if used from CA55 CPU would result in an unexpected behaviour. Hence drop WDT2 clock and reset entries. Signed-off-by: Lad Prabhakar Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20221009231253.15592-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a07g043-cpg.c | 5 ----- 1 file changed, 5 deletions(-) commit 772563aef2b46da86120d4c0d6865149e957b02d Author: Lad Prabhakar Date: Mon Oct 10 00:10:13 2022 +0100 clk: renesas: r9a07g044: Drop WDT2 clock and reset entry WDT CH2 is specifically to check the operation of Cortex-M33 CPU and if used from CA55 CPU would result in an unexpected behaviour. Hence drop WDT2 clock and reset entries. Signed-off-by: Lad Prabhakar Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20221009231013.14791-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a07g044-cpg.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 39658cee8f4404b6cd7db81520cccdbe665ccb03 Author: Geert Uytterhoeven Date: Fri Oct 7 15:10:04 2022 +0200 clk: renesas: r8a779g0: Add TPU clock Add the module clock used by the 16-Bit Timer Pulse Unit (TPU) on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/f2c1e2c5411b7bd6af726e6baf6e1efc354a7cdf.1665147497.git.geert+renesas@glider.be drivers/clk/renesas/r8a779g0-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit b00bf771ab4ae68ffbb111c2004e98a726c126c4 Author: Geert Uytterhoeven Date: Fri Oct 7 15:10:03 2022 +0200 clk: renesas: r8a779g0: Add PWM clock Add the module clock used by the PWM timers on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/a33d0e51c2fe8a0e6c89f3fd92db7c4bf5c33074.1665147497.git.geert+renesas@glider.be drivers/clk/renesas/r8a779g0-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit ceb22d9312b3dcb3568da7ab0d62aea8b8bf0a15 Author: Geert Uytterhoeven Date: Fri Oct 7 15:10:02 2022 +0200 clk: renesas: r8a779g0: Add SCIF clocks Add the module clocks used by the Serial Communication Interfaces with FIFO (SCIF) on the Renesas R-Car V4H (R8A779G0) SoC. Based on a larger patch in the BSP by Kazuya Mizuguchi. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/a6ab466cfdac377106494c00b811a60151cb1825.1665147497.git.geert+renesas@glider.be drivers/clk/renesas/r8a779g0-cpg-mssr.c | 4 ++++ 1 file changed, 4 insertions(+) commit f5684bde0375f4feb2a9ed1c146df29437652e70 Merge: 576d6b40dcce a9003f74f5a2 Author: Geert Uytterhoeven Date: Wed Oct 26 12:37:51 2022 +0200 Merge tag 'renesas-clk-fixes-for-v6.1-tag1' clk: renesas: Fixes for v6.1 - Correct the parent clocks for the High Speed Serial Communication Interfaces with FIFO (HSCIF) modules on the R-Car V4H SoC. Note that HSCIF0 is used for the serial console on the White-Hawk development board. commit e1e7bc481d49c3e3ada11029ce0d9b85a0a539d7 Author: Jani Nikula Date: Mon Oct 24 15:33:44 2022 +0300 drm/edid: convert to device specific logging Convert to drm_kms_dbg/drm_err where possible, and reference the connector using [CONNECTOR:%d:%s]. Pass connectors around a bit more to enable this. Where this is not possible, unify the rest of the debugs to DRM_DEBUG_KMS. Rewrite tile debug logging to one line while at it. v2: - Use [CONNECTOR:%d:%s] throughout (Ville) - Tile debug logging revamp - Pass connector around a bit more Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/e48346bfe09a632d5a5faa55e3c161b196cf21e8.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 137 +++++++++++++++++++++++++-------------------- 1 file changed, 77 insertions(+), 60 deletions(-) commit 68399ff574e4faf42b8d85da9339ca3ee2892cc7 Author: Biju Das Date: Tue Oct 25 16:56:57 2022 +0100 can: rcar_canfd: Use devm_reset_control_get_optional_exclusive Replace devm_reset_control_get_exclusive->devm_reset_control_ get_optional_exclusive so that we can avoid unnecessary SoC specific check in probe(). Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/20221025155657.1426948-4-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde drivers/net/can/rcar/rcar_canfd.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit aa9832e4501264a43db671bba09fe4d8bc39fcff Author: Dongliang Mu Date: Mon Oct 24 19:00:30 2022 +0800 can: ucan: ucan_disconnect(): change unregister_netdev() to unregister_candev() From API pairing, change unregister_netdev() to unregister_candev() since the registration function is register_candev(). Actually, they are the same. Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/all/20221024110033.727542-1-dzm91@hust.edu.cn [mkl: adjust subject + commit message] Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/ucan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4aeb91880999775b04ead5609823dca47b4e30a2 Author: Marc Kleine-Budde Date: Wed Oct 12 10:46:10 2022 +0200 can: m_can: use consistent indention The driver uses indent-with-tab for defines. Replace spaces after IR_ERR_BUS_31X with tab for consistent indention. Link: https://lore.kernel.org/all/20221024185544.68240-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13441ed666a2d60e0169280a340a6f74eca1d103 Merge: a6375fd791cd 39d3df6b0ea8 Author: Marc Kleine-Budde Date: Wed Oct 26 10:20:27 2022 +0200 Merge patch series "can: kvaser_usb: Fixes and improvements" Jimmy Assarsson says: Split v4 series, since it got rejected [1]. This part only contains non-critical fixes and improvements. Note: This series depend on changes in [2]. Changes in v5: - Split v4 series, since it got rejected [1]. This part only contains non-critical fixes and improvements. Changes in v4: https://lore.kernel.org/all/20220903182344.139-1-extja@kvaser.com - Add Tested-by: Anssi Hannula to [PATCH v4 04/15] can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device - Update commit message in [PATCH v4 04/15] can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device Changes in v3: https://lore.kernel.org/all/20220901122729.271-1-extja@kvaser.com - Rebase on top of commit 1d5eeda23f36 ("can: kvaser_usb: advertise timestamping capabilities and add ioctl support") - Add Tested-by: Anssi Hannula - Add stable@vger.kernel.org to CC. - Add my S-o-b to all patches - Fix regression introduced in [PATCH v2 04/15] can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device found by Anssi Hannula https://lore.kernel.org/all/b25bc059-d776-146d-0b3c-41aecf4bd9f8@bitwise.fi v2: https://lore.kernel.org/all/20220708115709.232815-1-extja@kvaser.com v1: https://lore.kernel.org/all/20220516134748.3724796-1-anssi.hannula@bitwise.fi [1] https://lore.kernel.org/all/20220920122246.00dbe946@kernel.org [2] https://lore.kernel.org/all/20221010150829.199676-1-extja@kvaser.com Link: https://lore.kernel.org/all/20221010185237.319219-1-extja@kvaser.com [mkl: move "1/1 can: kvaser_usb: Fix possible completions during init_completion" to linux-can tree] [mkl: improve change log, update links] Signed-off-by: Marc Kleine-Budde commit 39d3df6b0ea80f9b515c632ca07b39b1c156edee Author: Jimmy Assarsson Date: Mon Oct 10 20:52:37 2022 +0200 can: kvaser_usb: Compare requested bittiming parameters with actual parameters in do_set_{,data}_bittiming The device will respond with a CMD_ERROR_EVENT command, with error_code KVASER_USB_{LEAF,HYDRA}_ERROR_EVENT_PARAM, if the CMD_SET_BUSPARAMS_REQ contains invalid bittiming parameters. However, this command does not contain any channel reference. To check if the CMD_SET_BUSPARAMS_REQ was successful, redback and compare the requested bittiming parameters with the device reported parameters. Fixes: 080f40a6fa28 ("can: kvaser_usb: Add support for Kvaser CAN/USB devices") Fixes: aec5fb2268b7 ("can: kvaser_usb: Add support for Kvaser USB hydra family") Tested-by: Anssi Hannula Co-developed-by: Anssi Hannula Signed-off-by: Anssi Hannula Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/all/20221010185237.319219-12-extja@kvaser.com Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb.h | 15 ++- drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 96 +++++++++++++- drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 150 +++++++++++++++++++--- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 64 +++++++-- 4 files changed, 284 insertions(+), 41 deletions(-) commit 00e5786177649c1e3110f9454fdd34e336597265 Author: Jimmy Assarsson Date: Mon Oct 10 20:52:36 2022 +0200 can: kvaser_usb: Add struct kvaser_usb_busparams Add struct kvaser_usb_busparams containing the busparameters used in CMD_{SET,GET}_BUSPARAMS* commands. Tested-by: Anssi Hannula Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/all/20221010185237.319219-11-extja@kvaser.com Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb.h | 8 ++++++ drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 32 +++++++++-------------- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 18 +++++-------- 3 files changed, 27 insertions(+), 31 deletions(-) commit 90904d326269a38fe5dd895fb2db7c03199654c4 Author: Anssi Hannula Date: Mon Oct 10 20:52:35 2022 +0200 can: kvaser_usb_leaf: Fix bogus restart events When auto-restart is enabled, the kvaser_usb_leaf driver considers transition from any state >= CAN_STATE_BUS_OFF as a bus-off recovery event (restart). However, these events may occur at interface startup time before kvaser_usb_open() has set the state to CAN_STATE_ERROR_ACTIVE, causing restarts counter to increase and CAN_ERR_RESTARTED to be sent despite no actual restart having occurred. Fix that by making the auto-restart condition checks more strict so that they only trigger when the interface was actually in the BUS_OFF state. Fixes: 080f40a6fa28 ("can: kvaser_usb: Add support for Kvaser CAN/USB devices") Tested-by: Jimmy Assarsson Signed-off-by: Anssi Hannula Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/all/20221010185237.319219-10-extja@kvaser.com Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit abb8670938b23a3be0772153125895c7e6742840 Author: Anssi Hannula Date: Mon Oct 10 20:52:34 2022 +0200 can: kvaser_usb_leaf: Ignore stale bus-off after start With 0bfd:0124 Kvaser Mini PCI Express 2xHS FW 4.18.778 it was observed that if the device was bus-off when stopped, at next start (either via interface down/up or manual bus-off restart) the initial CMD_CHIP_STATE_EVENT received just after CMD_START_CHIP_REPLY will have the M16C_STATE_BUS_OFF bit still set, causing the interface to immediately go bus-off again. The bit seems to internally clear quickly afterwards but we do not get another CMD_CHIP_STATE_EVENT. Fix the issue by ignoring any initial bus-off state until we see at least one bus-on state. Also, poll the state periodically until that occurs. It is possible we lose one actual immediately occurring bus-off event here in which case the HW will auto-recover and we see the recovery event. We will then catch the next bus-off event, if any. This issue did not reproduce with 0bfd:0017 Kvaser Memorator Professional HS/HS FW 2.0.50. Fixes: 71873a9b38d1 ("can: kvaser_usb: Add support for more Kvaser Leaf v2 devices") Tested-by: Jimmy Assarsson Signed-off-by: Anssi Hannula Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/all/20221010185237.319219-9-extja@kvaser.com Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 31 +++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit a11249acf802341294557895d8e5f6aef080253f Author: Anssi Hannula Date: Mon Oct 10 20:52:33 2022 +0200 can: kvaser_usb_leaf: Fix wrong CAN state after stopping 0bfd:0124 Kvaser Mini PCI Express 2xHS FW 4.18.778 sends a CMD_CHIP_STATE_EVENT indicating bus-off after stopping the device, causing a stopped device to appear as CAN_STATE_BUS_OFF instead of CAN_STATE_STOPPED. Fix that by not handling error events on stopped devices. Fixes: 080f40a6fa28 ("can: kvaser_usb: Add support for Kvaser CAN/USB devices") Tested-by: Jimmy Assarsson Signed-off-by: Anssi Hannula Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/all/20221010185237.319219-8-extja@kvaser.com Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8d21f5927ae604881f98587fabf6753f88730968 Author: Anssi Hannula Date: Mon Oct 10 20:52:32 2022 +0200 can: kvaser_usb_leaf: Fix improved state not being reported The tested 0bfd:0017 Kvaser Memorator Professional HS/HS FW 2.0.50 and 0bfd:0124 Kvaser Mini PCI Express 2xHS FW 4.18.778 do not seem to send any unsolicited events when error counters decrease or when the device transitions from ERROR_PASSIVE to ERROR_ACTIVE (or WARNING). This causes the interface to e.g. indefinitely stay in the ERROR_PASSIVE state. Fix that by asking for chip state (inc. counters) event every 0.5 secs when error counters are non-zero. Since there are non-error-counter devices, also always poll in ERROR_PASSIVE even if the counters show zero. Fixes: 080f40a6fa28 ("can: kvaser_usb: Add support for Kvaser CAN/USB devices") Tested-by: Jimmy Assarsson Signed-off-by: Anssi Hannula Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/all/20221010185237.319219-7-extja@kvaser.com Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb.h | 7 +++ drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 19 ++++++-- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 58 ++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 3 deletions(-) commit df1b7af2761b935f63b4a53e789d41ed859edf61 Author: Anssi Hannula Date: Mon Oct 10 20:52:31 2022 +0200 can: kvaser_usb_leaf: Set Warning state even without bus errors kvaser_usb_leaf_rx_error_update_can_state() sets error state according to error counters when the hardware does not indicate a specific state directly. However, this is currently gated behind a check for M16C_STATE_BUS_ERROR which does not always seem to be set when error counters are increasing, and may not be set when error counters are decreasing. This causes the CAN_STATE_ERROR_WARNING state to not be set in some cases even when appropriate. Change the code to set error state from counters even without M16C_STATE_BUS_ERROR. The Error-Passive case seems superfluous as it is already set via M16C_STATE_BUS_PASSIVE flag above, but it is kept for now. Tested with 0bfd:0124 Kvaser Mini PCI Express 2xHS FW 4.18.778. Fixes: 080f40a6fa28 ("can: kvaser_usb: Add support for Kvaser CAN/USB devices") Tested-by: Jimmy Assarsson Signed-off-by: Anssi Hannula Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/all/20221010185237.319219-6-extja@kvaser.com Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit b24cb2d169e0c9dce664a959e1f2aa9781285dc9 Author: Jimmy Assarsson Date: Mon Oct 10 20:52:30 2022 +0200 can: kvaser_usb: kvaser_usb_leaf: Handle CMD_ERROR_EVENT The device will send an error event command, to indicate certain errors. This indicates a misbehaving driver, and should never occur. Fixes: 080f40a6fa28 ("can: kvaser_usb: Add support for Kvaser CAN/USB devices") Tested-by: Anssi Hannula Co-developed-by: Anssi Hannula Signed-off-by: Anssi Hannula Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/all/20221010185237.319219-5-extja@kvaser.com Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 99 ++++++++++++++++++++++++ 1 file changed, 99 insertions(+) commit 7ea56128dbf904a3359bcf9289cccdfa3c85c7e8 Author: Jimmy Assarsson Date: Mon Oct 10 20:52:29 2022 +0200 can: kvaser_usb: kvaser_usb_leaf: Rename {leaf,usbcan}_cmd_error_event to {leaf,usbcan}_cmd_can_error_event Prepare for handling CMD_ERROR_EVENT. Rename struct {leaf,usbcan}_cmd_error_event to {leaf,usbcan}_cmd_can_error_event. Fixes: 080f40a6fa28 ("can: kvaser_usb: Add support for Kvaser CAN/USB devices") Reported-by: Anssi Hannula Tested-by: Anssi Hannula Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/all/20221010185237.319219-4-extja@kvaser.com Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 38 ++++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) commit 35364f5b41a4917fe94a3f393d149b63ec583297 Author: Jimmy Assarsson Date: Mon Oct 10 20:52:28 2022 +0200 can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device Use the CMD_GET_CAPABILITIES_REQ command to query the device for certain capabilities. We are only interested in LISTENONLY mode and wither the device reports CAN error counters. Fixes: 080f40a6fa28 ("can: kvaser_usb: Add support for Kvaser CAN/USB devices") Reported-by: Anssi Hannula Tested-by: Anssi Hannula Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/all/20221010185237.319219-3-extja@kvaser.com Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 144 ++++++++++++++++++++++- 1 file changed, 143 insertions(+), 1 deletion(-) commit e4236f97688afc21151bfc050acfce9ac3b56f6b Merge: 03fd1402bd7d eb7718cdb73c Author: Christian Brauner Date: Wed Oct 26 10:10:09 2022 +0200 Merge branch 'fs.vfsuid.conversion' into for-next commit eb7718cdb73c6b0c93002f8f73f4dd4701f8d2bb Author: Christian Brauner Date: Wed Jun 29 12:53:54 2022 +0200 fs: remove unused idmapping helpers Now that all places can deal with the new type safe helpers remove all of the old helpers. Reviewed-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) include/linux/fs.h | 34 ---------------------- include/linux/mnt_idmapping.h | 68 ------------------------------------------- 2 files changed, 102 deletions(-) commit c12db92d62bf8cd4532ab4e572be0926d3a375be Author: Christian Brauner Date: Fri Sep 9 11:07:47 2022 +0200 ovl: port to vfs{g,u}id_t and associated helpers A while ago we introduced a dedicated vfs{g,u}id_t type in commit 1e5267cd0895 ("mnt_idmapping: add vfs{g,u}id_t"). We already switched over a good part of the VFS. Ultimately we will remove all legacy idmapped mount helpers that operate only on k{g,u}id_t in favor of the new type safe helpers that operate on vfs{g,u}id_t. Cc: Amir Goldstein Cc: Christoph Hellwig Reviewed-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) fs/overlayfs/util.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit a03a972b26da2d30d1f3b3a72963191cd2938835 Author: Christian Brauner Date: Fri Sep 9 11:40:21 2022 +0200 fuse: port to vfs{g,u}id_t and associated helpers A while ago we introduced a dedicated vfs{g,u}id_t type in commit 1e5267cd0895 ("mnt_idmapping: add vfs{g,u}id_t"). We already switched over a good part of the VFS. Ultimately we will remove all legacy idmapped mount helpers that operate only on k{g,u}id_t in favor of the new type safe helpers that operate on vfs{g,u}id_t. Cc: Christoph Hellwig Reviewed-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) fs/fuse/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e27a7ae3d8699f1988331368ad658510a248c09 Author: Christian Brauner Date: Wed Jun 29 16:28:04 2022 +0200 ima: use type safe idmapping helpers We already ported most parts and filesystems over for v6.0 to the new vfs{g,u}id_t type and associated helpers for v6.0. Convert the remaining places so we can remove all the old helpers. This is a non-functional change. Reviewed-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) security/integrity/ima/ima_policy.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 5e26a01e56fd03647d14b4461eeb69abde88a4e3 Author: Christian Brauner Date: Sun Jun 26 18:06:01 2022 +0200 apparmor: use type safe idmapping helpers We already ported most parts and filesystems over for v6.0 to the new vfs{g,u}id_t type and associated helpers for v6.0. Convert the remaining places so we can remove all the old helpers. This is a non-functional change. Reviewed-by: Seth Forshee (DigitalOcean) Acked-by: John Johansen Signed-off-by: Christian Brauner (Microsoft) security/apparmor/domain.c | 8 ++++---- security/apparmor/file.c | 4 +++- security/apparmor/lsm.c | 25 +++++++++++++++++-------- 3 files changed, 24 insertions(+), 13 deletions(-) commit b7c9b6751242fec703c1b7d1bcfea1d80fe00c8d Author: Christian Brauner Date: Thu Oct 20 14:50:10 2022 +0200 caps: use type safe idmapping helpers We already ported most parts and filesystems over for v6.0 to the new vfs{g,u}id_t type and associated helpers for v6.0. Convert the remaining places so we can remove all the old helpers. This is a non-functional change. Reviewed-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) kernel/capability.c | 4 ++-- security/commoncap.c | 51 ++++++++++++++++++++++++++------------------------- 2 files changed, 28 insertions(+), 27 deletions(-) commit a2bd096fb2d7f50fb4db246b33e7bfcf5e2eda3a Author: Christian Brauner Date: Wed Jun 22 22:12:16 2022 +0200 fs: use type safe idmapping helpers We already ported most parts and filesystems over for v6.0 to the new vfs{g,u}id_t type and associated helpers for v6.0. Convert the remaining places so we can remove all the old helpers. This is a non-functional change. Reviewed-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) fs/coredump.c | 4 ++-- fs/exec.c | 16 ++++++++-------- fs/inode.c | 8 ++++---- fs/namei.c | 40 ++++++++++++++++++++-------------------- fs/remap_range.c | 2 +- fs/stat.c | 7 +++++-- 6 files changed, 40 insertions(+), 37 deletions(-) commit 9c4f28ddfb9c2e674fca24f68f12c1ffbfbffe41 Author: Christian Brauner Date: Sun Jun 26 20:45:07 2022 +0200 mnt_idmapping: add missing helpers Add missing helpers needed to convert all remaining places to the type safe idmapped mount helpers. After the conversion we will remove all the old helpers. Reviewed-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) include/linux/mnt_idmapping.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 76f3768132eab2c26c9d67022b452358adc28b2c Merge: dbbd909eeb26 e5530adc17a7 Author: Linus Walleij Date: Wed Oct 26 09:58:29 2022 +0200 Merge tag 'intel-pinctrl-v6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v6.1-2 * Add missing and remove unused headers in the pin control and GPIO drivers * Revise the pin control and GPIO headers commit 982e2b7329fe5c5387453524f40eec706d2c60bf Author: Stefan Schmidt Date: Wed Oct 26 09:40:34 2022 +0200 net: mac802154: Fixup function parameter name in docs The function parameter name was wrong in kdocs. net/mac802154/util.c:27: warning: Function parameter or member 'hw' not described in 'ieee802154_wake_queue' net/mac802154/util.c:27: warning: Excess function parameter 'local' description in 'ieee802154_wake_queue' net/mac802154/util.c:53: warning: Function parameter or member 'hw' not described in 'ieee802154_stop_queue' net/mac802154/util.c:53: warning: Excess function parameter 'local' description in 'ieee802154_stop_queue' Fixing name and description. Signed-off-by: Stefan Schmidt net/mac802154/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66d17ecde7cae2b0e526473217c4178a4059181e Author: Jani Nikula Date: Mon Oct 24 15:33:43 2022 +0300 drm/edid: add [CONNECTOR:%d:%s] to debug logging Reference the connector using [CONNECTOR:%d:%s] in existing device based debug logging. Signed-off-by: Jani Nikula Reviewed-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/5884410682bcbc032de4d3af8562c0b271edaa7f.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) commit 2ab6590cd96ff2d3005e9011577b08b0aed8388a Author: Jani Nikula Date: Mon Oct 24 15:33:42 2022 +0300 drm/edid/firmware: convert to drm device specific logging Conform to device specific logging. v2: Include [CONNECTOR:%d:%s] (Ville) Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/14f3a1e55729c9157aae93fc45320d05cc4cc7bc.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid_load.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 5f2d0ed49036a0218685e7d9d03539bdbdc66f78 Author: Jani Nikula Date: Mon Oct 24 15:33:41 2022 +0300 drm/edid: move edid load declarations to internal header The EDID loader is internal to drm, not for drivers. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/d58a59fede286caa8766e0813f4be492a7200287.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_crtc_internal.h | 11 +++++++++++ drivers/gpu/drm/drm_edid_load.c | 5 +++-- include/drm/drm_edid.h | 7 ------- 3 files changed, 14 insertions(+), 9 deletions(-) commit 794aca0ec214bb23ff4fcb28c053ac6fdfa3ce07 Author: Jani Nikula Date: Mon Oct 24 15:33:40 2022 +0300 drm/edid: use struct drm_edid for override/firmware EDID There's a lot going on here, but the main thing is switching the firmware EDID loader to use struct drm_edid. Unfortunately, it's difficult to reasonably split to smaller pieces. Convert the EDID loader to struct drm_edid. There's a functional change in validation; it no longer tries to fix errors or filter invalid blocks. It's stricter in this sense. Hopefully this will not be an issue. As a by-product, this change also allows HF-EEODB extended EDIDs to be passed via override/firmware EDID. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/e64267c28eca483e83c802bc06ddd149bdcdfc66.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 32 ++++++++------- drivers/gpu/drm/drm_edid_load.c | 86 ++++++++--------------------------------- include/drm/drm_edid.h | 4 +- 3 files changed, 36 insertions(+), 86 deletions(-) commit a05992d5ea779da174246186d88bfeaf2d2754f2 Author: Jani Nikula Date: Mon Oct 24 15:33:39 2022 +0300 drm/edid/firmware: rename drm_load_edid_firmware() to drm_edid_load_firmware() Follow the usual naming convention by file name. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/d6714ae737d789764bd2bdb6e7c9a5f56c99eef3.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 10 +++++----- drivers/gpu/drm/drm_edid_load.c | 2 +- include/drm/drm_edid.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit 8319d26a292ed1f76b793da5e9b48d4820c7a5e6 Author: Jani Nikula Date: Mon Oct 24 15:33:38 2022 +0300 drm/edid/firmware: drop redundant connector_name variable/parameter Stop passing around something that's readily available in connector->name. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/befa53a33f2ea83094027a0e88d155779ad096e1.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid_load.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 90b575f52c6ab35979968e2e4d9cbd9f1eb3901c Author: Jani Nikula Date: Mon Oct 24 15:33:37 2022 +0300 drm/edid: detach debugfs EDID override from EDID property update Having the EDID override debugfs directly update the EDID property is problematic. The update is partial only. The driver has no way of knowing it's been updated. Mode list is not updated. It's an inconsistent state. Detach debugfs EDID override from the property update completely. Only set and reset a separate override EDID copy from debugfs, and have it take effect only at detect (via EDID read). The copy is at connector->edid_override, protected by connector->edid_override_mutex. This also brings override EDID closer to firmware EDID in behaviour. Add validation of the override EDID which we completely lacked. Note that IGT already forces a detect whenever tests update the override EDID. v2: Add locking (Ville) Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/4c875f8e06c4499f498fcf876e1233cbb155ec8a.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_connector.c | 1 + drivers/gpu/drm/drm_edid.c | 73 ++++++++++++++++++++--------------------- include/drm/drm_connector.h | 16 ++++++--- 3 files changed, 49 insertions(+), 41 deletions(-) commit 6c9b3db70aad556152cba7291e93ae9e4bb1a6b0 Author: Jani Nikula Date: Mon Oct 24 15:33:36 2022 +0300 drm/edid: add function for checking drm_edid validity We've lacked a function for immutable validity check on drm_edid. Add one. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/f96188f64e9f7f3deff348d08296609353b12316.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 30 ++++++++++++++++++++++++++++++ include/drm/drm_edid.h | 1 + 2 files changed, 31 insertions(+) commit b16c9e6c7d91c91e97a30f69b408388726e0376d Author: Jani Nikula Date: Mon Oct 24 15:33:35 2022 +0300 drm/edid: split drm_edid block count helper Split the drm_edid block count helper to a base version that reports the block count indicated by EDID contents, and another on top that limits the block count based on size allocated for the EDID. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/a7d63878c7fb3dd6f3b987f5257897113797b94f.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 019b93874834e7810499b65f4bfc990d16363581 Author: Jani Nikula Date: Mon Oct 24 15:33:34 2022 +0300 drm/edid: rename drm_add_override_edid_modes() to drm_edid_override_connector_update() Follow the naming of both EDID override functions as well as drm_edid_connector_update(). This also matches better what the function does; a combination of EDID property update and add modes. Indeed it should later be converted to call drm_edid_connector_update(). Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/ba12957e0488654e8db010a3ff1534079caec972.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 6 +++--- drivers/gpu/drm/drm_probe_helper.c | 2 +- include/drm/drm_edid.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 91ec9ab4a6e3fff7b33f145c6b08f1e3c27d1c46 Author: Jani Nikula Date: Mon Oct 24 15:33:33 2022 +0300 drm/edid: abstract debugfs override EDID show better Add a function to dump the override EDID in debugfs. This hides the override EDID management better in drm_edid.c. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/74defa7b595f51e6c1f2eacd9c799d567d29f053.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_crtc_internal.h | 4 +++- drivers/gpu/drm/drm_debugfs.c | 8 +------- drivers/gpu/drm/drm_edid.c | 11 +++++++++++ 3 files changed, 15 insertions(+), 8 deletions(-) commit 2c9332de05612a766dfd956f79430c02702cad0c Author: Jani Nikula Date: Mon Oct 24 15:33:32 2022 +0300 drm/edid: debug log EDID override set/reset It's useful debugging information to know if and when an override EDID was set or reset. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/ae352f542b4d69398c0965e33fb2e6e34156cbfb.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2db98059ff67e205be8a820f4e99c15f765e3c5a Author: Jani Nikula Date: Mon Oct 24 15:33:31 2022 +0300 drm/amd/display: stop using connector->override_edid The connector->override_edid flag is strictly for EDID override debugfs management, and drivers have no business using it. Cc: Alex Deucher Cc: Christian König Cc: Xinhui Pan Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Jani Nikula Reviewed-by: Harry Wentland Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/c901869ff8a4e3aebc4abec99c7dd7b4c224f6e6.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 --- 1 file changed, 3 deletions(-) commit 0281af2ade1fda50409afc62ebe9dd71194c6ed8 Author: Jani Nikula Date: Mon Oct 24 15:33:30 2022 +0300 drm/i915/hdmi: stop using connector->override_edid The connector->override_edid flag is strictly for EDID override debugfs management, and drivers have no business using it. The check for override_edid was added in commit 301906290553 ("drm/i915: Ignore TMDS clock limit for DP++ when EDID override is set") to facilitate mode list cross-checking against modes in override EDID when the connector in question isn't even connected. The dual mode detect fallback would do VBT based limiting in this case. Instead of override EDID, check for connector forcing in the fallback. v2: Simply use !connector->force (Ville) Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/c8b45867cf37134ab40be23e22825ca45adc6041.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_hdmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6e0fff462eccaeed9f499c3d5e661aed688ef4e4 Author: Jani Nikula Date: Mon Oct 24 15:33:29 2022 +0300 drm/i915/hdmi: do dual mode detect only if connected For normal connector detect, there's really no point in trying dual mode detect if the connector is disconnected. We can simplify the detect sequence by skipping it. Since intel_hdmi_dp_dual_mode_detect() is only called when EDID is present, we can drop the has_edid parameter. The functional effect is speeding up disconnected connector detection ever so slightly, and, combined with firmware EDID, also stop logging about assuming dual mode adaptor. It's a bit subtle, but this will also skip dual mode detect if the connector is force connected and a) there's no EDID of any kind, normal or override/firmware or b) there's EDID but it does not indicate digital. These are corner cases no matter what, and arguably forcing should not be limited by dual mode detect. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/f8f2a4a147e1c87ba93269a607f71fc29c4b59f6.1666614699.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_hdmi.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 5ed88f81511ce695692f0510ab3ca17eee68eff6 Author: Daniel Müller Date: Tue Oct 25 23:15:46 2022 +0000 selftests/bpf: Panic on hard/soft lockup When running tests, we should probably accept any help we can get when it comes to detecting issues early or making them more debuggable. We have seen a few cases where a test_progs_noalu32 run, for example, encountered a soft lockup and stopped making progress. It was only interrupted once we hit the overall test timeout [0]. We can not and do not want to necessarily rely on test timeouts, because those rely on infrastructure provided by the environment we run in (and which is not present in tools/testing/selftests/bpf/vmtest.sh, for example). To that end, let's enable panics on soft as well as hard lockups to fail fast should we encounter one. That's happening in the configuration indented to be used for selftests (including when using vmtest.sh or when running in BPF CI). [0] https://github.com/kernel-patches/bpf/runs/7844499997 Signed-off-by: Daniel Müller Link: https://lore.kernel.org/r/20221025231546.811766-1-deso@posteo.net Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/config | 2 ++ tools/testing/selftests/bpf/config.x86_64 | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) commit d233ab3c5c5ed4b3d2201bddb71dab5a2946c31b Author: Heinrich Schuchardt Date: Sun Sep 25 02:47:57 2022 +0200 riscv/vdso: typo therefor The adverbs 'therefor' and 'therefore' have different meaning. As the meaning here is 'consequently' the spelling should be 'therefore'. Signed-off-by: Heinrich Schuchardt Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20220925004757.9089-1-heinrich.schuchardt@canonical.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/vdso.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a48b4bf994296a380f9c79620ad4ee7bad4511e1 Merge: fdf457871e7c d43198017ea3 Author: Alexei Starovoitov Date: Tue Oct 25 23:19:20 2022 -0700 Merge branch 'bpf: Implement cgroup local storage available to non-cgroup-attached bpf progs' Yonghong Song says: ==================== There already exists a local storage implementation for cgroup-attached bpf programs. See map type BPF_MAP_TYPE_CGROUP_STORAGE and helper bpf_get_local_storage(). But there are use cases such that non-cgroup attached bpf progs wants to access cgroup local storage data. For example, tc egress prog has access to sk and cgroup. It is possible to use sk local storage to emulate cgroup local storage by storing data in socket. But this is a waste as it could be lots of sockets belonging to a particular cgroup. Alternatively, a separate map can be created with cgroup id as the key. But this will introduce additional overhead to manipulate the new map. A cgroup local storage, similar to existing sk/inode/task storage, should help for this use case. This patch implemented new cgroup local storage available to non-cgroup-attached bpf programs. In the patch series, Patches 1 and 2 are preparation patches. Patch 3 implemented new cgroup local storage kernel support. Patches 4 and 5 implemented libbpf and bpftool support. Patches 6-8 fixed one existing test and added four new tests to validate kernel/libbpf implementations. Patch 9 added documentation for new BPF_MAP_TYPE_CGRP_STORAGE map type and comparison of the old and new cgroup local storage maps. Changelogs: v5 -> v6: . fix selftest test_libbpf_str/bpf_map_type_str due to marking BPF_MAP_TYPE_CGROUP_STORAGE as deprecated. . add cgrp_local_storage test in s390x denylist since the test has some fentry/fexit programs. v4 -> v5: . additional refactoring in patch 2 . fix the call site for bpf_cgrp_storage_free() in kernel/cgroup/cgroup.c. . add a test for progs attaching to cgroups . add a negative test (the helper key is a task instead of expected cgroup) . some spelling fixes v3 -> v4: . fix a config guarding problem in kernel/cgroup/cgroup.c when cgrp_storage is deleted (CONFIG_CGROUP_BPF => CONFIG_BPF_SYSCALL). . rename selftest from cgroup_local_storage.c to cgrp_local_storage.c so the name can better align with map name. . fix a few misspellings. v2 -> v3: . fix a config caused kernel test complaint. . better description/comments in uapi bpf.h and bpf_cgrp_storage.c. . factor code for better resue for map_alloc/map_free. . improved explanation in map documentation. v1 -> v2: . change map name from BPF_MAP_TYPE_CGROUP_LOCAL_STORAGE to BPF_MAP_TYPE_CGRP_STORAGE. . removed support of sleepable programs. . changed the place of freeing cgrp local storage from put_css_set_locked() to css_free_rwork_fn(). . added map documentation. ==================== Signed-off-by: Alexei Starovoitov commit d43198017ea39e5040a578d0dd622c7b0e939019 Author: Yonghong Song Date: Tue Oct 25 21:29:22 2022 -0700 docs/bpf: Add documentation for new cgroup local storage Add some descriptions and examples for BPF_MAP_TYPE_CGRP_STORAGE. Also illustate the major difference between BPF_MAP_TYPE_CGRP_STORAGE and BPF_MAP_TYPE_CGROUP_STORAGE and recommend to use BPF_MAP_TYPE_CGRP_STORAGE instead of BPF_MAP_TYPE_CGROUP_STORAGE in the end. Acked-by: David Vernet Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221026042922.676383-1-yhs@fb.com Signed-off-by: Alexei Starovoitov Documentation/bpf/map_cgrp_storage.rst | 109 +++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) commit 0a1b69d1c736130dfe41d9c999d1be17b2794cda Author: Yonghong Song Date: Tue Oct 25 21:29:17 2022 -0700 selftests/bpf: Add test cgrp_local_storage to DENYLIST.s390x Test cgrp_local_storage have some programs utilizing trampoline. Arch s390x does not support trampoline so add the test to the corresponding DENYLIST file. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221026042917.675685-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/DENYLIST.s390x | 1 + 1 file changed, 1 insertion(+) commit 12bb6ca4e2fa14ecb007228160d1e5f8c5b92d01 Author: Yonghong Song Date: Tue Oct 25 21:29:11 2022 -0700 selftests/bpf: Add selftests for new cgroup local storage Add four tests for new cgroup local storage, (1) testing bpf program helpers and user space map APIs, (2) testing recursive fentry triggering won't deadlock, (3) testing progs attached to cgroups, and (4) a negative test if the bpf_cgrp_storage_get() helper key is not a cgroup btf id. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221026042911.675546-1-yhs@fb.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/prog_tests/cgrp_local_storage.c | 171 +++++++++++++++++++++ .../selftests/bpf/progs/cgrp_ls_attach_cgroup.c | 101 ++++++++++++ .../testing/selftests/bpf/progs/cgrp_ls_negative.c | 26 ++++ .../selftests/bpf/progs/cgrp_ls_recursion.c | 70 +++++++++ tools/testing/selftests/bpf/progs/cgrp_ls_tp_btf.c | 88 +++++++++++ 5 files changed, 456 insertions(+) commit fd4ca6c1facfdc370d5f0b798106d07433e33aec Author: Yonghong Song Date: Tue Oct 25 21:29:06 2022 -0700 selftests/bpf: Fix test test_libbpf_str/bpf_map_type_str Previous bpf patch made a change to uapi bpf.h like @@ -922,7 +922,14 @@ enum bpf_map_type { BPF_MAP_TYPE_SOCKHASH, - BPF_MAP_TYPE_CGROUP_STORAGE, + BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED, + BPF_MAP_TYPE_CGROUP_STORAGE = BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED, BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, where BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED and BPF_MAP_TYPE_CGROUP_STORAGE have the same enum value. This will cause selftest test_libbpf_str/bpf_map_type_str failing. This patch fixed the issue by avoid the check for BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED in the test. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221026042906.674830-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/libbpf_str.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f7f0f1657d9552e8667bc4758cbf41909bcdf7e2 Author: Yonghong Song Date: Tue Oct 25 21:29:01 2022 -0700 bpftool: Support new cgroup local storage Add support for new cgroup local storage Acked-by: Quentin Monnet Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221026042901.674177-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/Documentation/bpftool-map.rst | 2 +- tools/bpf/bpftool/map.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4fe64af23c12ae9f2c1f0ca0d556d9cb8f088dfb Author: Yonghong Song Date: Tue Oct 25 21:28:56 2022 -0700 libbpf: Support new cgroup local storage Add support for new cgroup local storage. Acked-by: David Vernet Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221026042856.673989-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 1 + tools/lib/bpf/libbpf_probes.c | 1 + 2 files changed, 2 insertions(+) commit c4bcfb38a95edb1021a53f2d0356a78120ecfbe4 Author: Yonghong Song Date: Tue Oct 25 21:28:50 2022 -0700 bpf: Implement cgroup storage available to non-cgroup-attached bpf progs Similar to sk/inode/task storage, implement similar cgroup local storage. There already exists a local storage implementation for cgroup-attached bpf programs. See map type BPF_MAP_TYPE_CGROUP_STORAGE and helper bpf_get_local_storage(). But there are use cases such that non-cgroup attached bpf progs wants to access cgroup local storage data. For example, tc egress prog has access to sk and cgroup. It is possible to use sk local storage to emulate cgroup local storage by storing data in socket. But this is a waste as it could be lots of sockets belonging to a particular cgroup. Alternatively, a separate map can be created with cgroup id as the key. But this will introduce additional overhead to manipulate the new map. A cgroup local storage, similar to existing sk/inode/task storage, should help for this use case. The life-cycle of storage is managed with the life-cycle of the cgroup struct. i.e. the storage is destroyed along with the owning cgroup with a call to bpf_cgrp_storage_free() when cgroup itself is deleted. The userspace map operations can be done by using a cgroup fd as a key passed to the lookup, update and delete operations. Typically, the following code is used to get the current cgroup: struct task_struct *task = bpf_get_current_task_btf(); ... task->cgroups->dfl_cgrp ... and in structure task_struct definition: struct task_struct { .... struct css_set __rcu *cgroups; .... } With sleepable program, accessing task->cgroups is not protected by rcu_read_lock. So the current implementation only supports non-sleepable program and supporting sleepable program will be the next step together with adding rcu_read_lock protection for rcu tagged structures. Since map name BPF_MAP_TYPE_CGROUP_STORAGE has been used for old cgroup local storage support, the new map name BPF_MAP_TYPE_CGRP_STORAGE is used for cgroup storage available to non-cgroup-attached bpf programs. The old cgroup storage supports bpf_get_local_storage() helper to get the cgroup data. The new cgroup storage helper bpf_cgrp_storage_get() can provide similar functionality. While old cgroup storage pre-allocates storage memory, the new mechanism can also pre-allocate with a user space bpf_map_update_elem() call to avoid potential run-time memory allocation failure. Therefore, the new cgroup storage can provide all functionality w.r.t. the old one. So in uapi bpf.h, the old BPF_MAP_TYPE_CGROUP_STORAGE is alias to BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED to indicate the old cgroup storage can be deprecated since the new one can provide the same functionality. Acked-by: David Vernet Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221026042850.673791-1-yhs@fb.com Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 7 ++ include/linux/bpf_types.h | 1 + include/linux/cgroup-defs.h | 4 + include/uapi/linux/bpf.h | 50 ++++++++- kernel/bpf/Makefile | 2 +- kernel/bpf/bpf_cgrp_storage.c | 247 +++++++++++++++++++++++++++++++++++++++++ kernel/bpf/helpers.c | 6 + kernel/bpf/syscall.c | 3 +- kernel/bpf/verifier.c | 13 ++- kernel/cgroup/cgroup.c | 1 + kernel/trace/bpf_trace.c | 4 + scripts/bpf_doc.py | 2 + tools/include/uapi/linux/bpf.h | 50 ++++++++- 13 files changed, 385 insertions(+), 5 deletions(-) commit c83597fa5dc6b322e9bdf929e5f4136a3f4aa4db Author: Yonghong Song Date: Tue Oct 25 21:28:45 2022 -0700 bpf: Refactor some inode/task/sk storage functions for reuse Refactor codes so that inode/task/sk storage implementation can maximally share the same code. I also added some comments in new function bpf_local_storage_unlink_nolock() to make codes easy to understand. There is no functionality change. Acked-by: David Vernet Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221026042845.672944-1-yhs@fb.com Signed-off-by: Alexei Starovoitov include/linux/bpf_local_storage.h | 17 ++-- kernel/bpf/bpf_inode_storage.c | 38 +------- kernel/bpf/bpf_local_storage.c | 190 ++++++++++++++++++++++++-------------- kernel/bpf/bpf_task_storage.c | 38 +------- net/core/bpf_sk_storage.c | 35 +------ 5 files changed, 137 insertions(+), 181 deletions(-) commit 5e67b8ef125bb6e83bf0f0442ad7ffc09e7956f9 Author: Yonghong Song Date: Tue Oct 25 21:28:40 2022 -0700 bpf: Make struct cgroup btf id global Make struct cgroup btf id global so later patch can reuse the same btf id. Acked-by: David Vernet Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20221026042840.672602-1-yhs@fb.com Signed-off-by: Alexei Starovoitov include/linux/btf_ids.h | 1 + kernel/bpf/cgroup_iter.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit fdf457871e7c070416403efd1533ba49adc20a87 Merge: f3c51fe02c55 387b532138ee Author: Alexei Starovoitov Date: Tue Oct 25 23:11:47 2022 -0700 Merge branch 'bpf: Avoid unnecessary deadlock detection and failure in task storage' Martin KaFai Lau says: ==================== From: Martin KaFai Lau The commit bc235cdb423a ("bpf: Prevent deadlock from recursive bpf_task_storage_[get|delete]") added deadlock detection to avoid a tracing program from recurring on the bpf_task_storage_{get,delete}() helpers. These helpers acquire a spin lock and it will lead to deadlock. It is unnecessary for the bpf_lsm and bpf_iter programs which do not recur. The situation is the same as the existing bpf_pid_task_storage_{lookup,delete}_elem() which are used in the syscall and they also do not have deadlock detection. This set is to add new bpf_task_storage_{get,delete}() helper proto without the deadlock detection. The set also removes the prog->active check from the bpf_lsm and bpf_iter program. Please see the individual patch for details. ==================== Signed-off-by: Alexei Starovoitov commit 387b532138eed5b12e1afa68cafb6a389507310f Author: Martin KaFai Lau Date: Tue Oct 25 11:45:24 2022 -0700 selftests/bpf: Tracing prog can still do lookup under busy lock This patch modifies the task_ls_recursion test to check that the first bpf_task_storage_get(&map_a, ...) in BPF_PROG(on_update) can still do the lockless lookup even it cannot acquire the percpu busy lock. If the lookup succeeds, it will increment the value by 1 and the value in the task storage map_a will become 200+1=201. After that, BPF_PROG(on_update) tries to delete from map_a and should get -EBUSY because it cannot acquire the percpu busy lock after finding the data. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20221025184524.3526117-10-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov .../selftests/bpf/prog_tests/task_local_storage.c | 48 +++++++++++++++++++++- .../selftests/bpf/progs/task_ls_recursion.c | 43 +++++++++++++++++-- 2 files changed, 86 insertions(+), 5 deletions(-) commit 0334b4d8822a22b3593aec7361c50e9ebc31ee88 Author: Martin KaFai Lau Date: Tue Oct 25 11:45:23 2022 -0700 selftests/bpf: Ensure no task storage failure for bpf_lsm.s prog due to deadlock detection This patch adds a test to check for deadlock failure in bpf_task_storage_{get,delete} when called by a sleepable bpf_lsm prog. It also checks if the prog_info.recursion_misses is non zero. The test starts with 32 threads and they are affinitized to one cpu. In my qemu setup, with CONFIG_PREEMPT=y, I can reproduce it within one second if it is run without the previous patches of this set. Here is the test error message before adding the no deadlock detection version of the bpf_task_storage_{get,delete}: test_nodeadlock:FAIL:bpf_task_storage_get busy unexpected bpf_task_storage_get busy: actual 2 != expected 0 test_nodeadlock:FAIL:bpf_task_storage_delete busy unexpected bpf_task_storage_delete busy: actual 2 != expected 0 Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20221025184524.3526117-9-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov .../selftests/bpf/prog_tests/task_local_storage.c | 98 ++++++++++++++++++++++ .../selftests/bpf/progs/task_storage_nodeadlock.c | 47 +++++++++++ 2 files changed, 145 insertions(+) commit 8a7dac37f27a3dfbd814bf29a73d6417db2c81d9 Author: Martin KaFai Lau Date: Tue Oct 25 11:45:22 2022 -0700 bpf: Add new bpf_task_storage_delete proto with no deadlock detection The bpf_lsm and bpf_iter do not recur that will cause a deadlock. The situation is similar to the bpf_pid_task_storage_delete_elem() which is called from the syscall map_delete_elem. It does not need deadlock detection. Otherwise, it will cause unnecessary failure when calling the bpf_task_storage_delete() helper. This patch adds bpf_task_storage_delete proto that does not do deadlock detection. It will be used by bpf_lsm and bpf_iter program. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20221025184524.3526117-8-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 1 + kernel/bpf/bpf_task_storage.c | 28 ++++++++++++++++++++++++++++ kernel/trace/bpf_trace.c | 4 +++- 3 files changed, 32 insertions(+), 1 deletion(-) commit fda64ae0bb3e37b5a4292625c6931cb156224d0f Author: Martin KaFai Lau Date: Tue Oct 25 11:45:21 2022 -0700 bpf: bpf_task_storage_delete_recur does lookup first before the deadlock check Similar to the earlier change in bpf_task_storage_get_recur. This patch changes bpf_task_storage_delete_recur such that it does the lookup first. It only returns -EBUSY if it needs to take the spinlock to do the deletion when potential deadlock is detected. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20221025184524.3526117-7-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov kernel/bpf/bpf_task_storage.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 4279adb094a17132423f1271c3d11b593fc2327e Author: Martin KaFai Lau Date: Tue Oct 25 11:45:20 2022 -0700 bpf: Add new bpf_task_storage_get proto with no deadlock detection The bpf_lsm and bpf_iter do not recur that will cause a deadlock. The situation is similar to the bpf_pid_task_storage_lookup_elem() which is called from the syscall map_lookup_elem. It does not need deadlock detection. Otherwise, it will cause unnecessary failure when calling the bpf_task_storage_get() helper. This patch adds bpf_task_storage_get proto that does not do deadlock detection. It will be used by bpf_lsm and bpf_iter programs. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20221025184524.3526117-6-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 1 + kernel/bpf/bpf_task_storage.c | 28 ++++++++++++++++++++++++++++ kernel/trace/bpf_trace.c | 5 ++++- 3 files changed, 33 insertions(+), 1 deletion(-) commit e8b02296a6b8d07de752d6157d863a642117bcd3 Author: Martin KaFai Lau Date: Tue Oct 25 11:45:19 2022 -0700 bpf: Avoid taking spinlock in bpf_task_storage_get if potential deadlock is detected bpf_task_storage_get() does a lookup and optionally inserts new data if BPF_LOCAL_STORAGE_GET_F_CREATE is present. During lookup, it will cache the lookup result and caching requires to acquire a spinlock. When potential deadlock is detected (by the bpf_task_storage_busy pcpu-counter added in commit bc235cdb423a ("bpf: Prevent deadlock from recursive bpf_task_storage_[get|delete]")), the current behavior is returning NULL immediately to avoid deadlock. It is too pessimistic. This patch will go ahead to do a lookup (which is a lockless operation) but it will avoid caching it in order to avoid acquiring the spinlock. When lookup fails to find the data and BPF_LOCAL_STORAGE_GET_F_CREATE is set, an insertion is needed and this requires acquiring a spinlock. This patch will still return NULL when a potential deadlock is detected. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20221025184524.3526117-5-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov kernel/bpf/bpf_local_storage.c | 1 + kernel/bpf/bpf_task_storage.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) commit 6d65500c34d897329ed1be0fd3c4014ec52cd473 Author: Martin KaFai Lau Date: Tue Oct 25 11:45:18 2022 -0700 bpf: Refactor the core bpf_task_storage_get logic into a new function This patch creates a new function __bpf_task_storage_get() and moves the core logic of the existing bpf_task_storage_get() into this new function. This new function will be shared by another new helper proto in the latter patch. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20221025184524.3526117-4-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov kernel/bpf/bpf_task_storage.c | 44 +++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) commit 0593dd34e53489557569d5e6d27371b49aa9b41f Author: Martin KaFai Lau Date: Tue Oct 25 11:45:17 2022 -0700 bpf: Append _recur naming to the bpf_task_storage helper proto This patch adds the "_recur" naming to the bpf_task_storage_{get,delete} proto. In a latter patch, they will only be used by the tracing programs that requires a deadlock detection because a tracing prog may use bpf_task_storage_{get,delete} recursively and cause a deadlock. Another following patch will add a different helper proto for the non tracing programs because they do not need the deadlock prevention. This patch does this rename to prepare for this future proto additions. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20221025184524.3526117-3-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 4 ++-- kernel/bpf/bpf_task_storage.c | 12 ++++++------ kernel/trace/bpf_trace.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) commit 271de525e1d7f564e88a9d212c50998b49a54476 Author: Martin KaFai Lau Date: Tue Oct 25 11:45:16 2022 -0700 bpf: Remove prog->active check for bpf_lsm and bpf_iter The commit 64696c40d03c ("bpf: Add __bpf_prog_{enter,exit}_struct_ops for struct_ops trampoline") removed prog->active check for struct_ops prog. The bpf_lsm and bpf_iter is also using trampoline. Like struct_ops, the bpf_lsm and bpf_iter have fixed hooks for the prog to attach. The kernel does not call the same hook in a recursive way. This patch also removes the prog->active check for bpf_lsm and bpf_iter. A later patch has a test to reproduce the recursion issue for a sleepable bpf_lsm program. This patch appends the '_recur' naming to the existing enter and exit functions that track the prog->active counter. New __bpf_prog_{enter,exit}[_sleepable] function are added to skip the prog->active tracking. The '_struct_ops' version is also removed. It also moves the decision on picking the enter and exit function to the new bpf_trampoline_{enter,exit}(). It returns the '_recur' ones for all tracing progs to use. For bpf_lsm, bpf_iter, struct_ops (no prog->active tracking after 64696c40d03c), and bpf_lsm_cgroup (no prog->active tracking after 69fd337a975c7), it will return the functions that don't track the prog->active. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20221025184524.3526117-2-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov arch/arm64/net/bpf_jit_comp.c | 9 ++--- arch/x86/net/bpf_jit_comp.c | 19 ++-------- include/linux/bpf.h | 24 ++++++------- include/linux/bpf_verifier.h | 15 +++++++- kernel/bpf/syscall.c | 5 +-- kernel/bpf/trampoline.c | 80 ++++++++++++++++++++++++++++++++++++------- 6 files changed, 98 insertions(+), 54 deletions(-) commit ec7b4511185bba95fc702c33a388582c8842d454 Author: Shuah Khan Date: Fri Oct 21 15:51:16 2022 -0600 selftests/watchdog: add test for WDIOC_GETTEMP Add test for WDIOC_GETTEMP and this ioctl might not be supported by some devices and if it is this test will print the following message: Inappropriate ioctl for device Signed-off-by: Shuah Khan tools/testing/selftests/watchdog/watchdog-test.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 8856f710ed00d974ce20e9894ba2a5e02fe90542 Author: Shuah Khan Date: Fri Oct 21 10:52:48 2022 -0600 selftests/watchdog: print watchdog_info option strings Change show watchdog_info output to print option strings instead of hex values to make it user friendly and human readable. Signed-off-by: Shuah Khan tools/testing/selftests/watchdog/watchdog-test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ac7e8d3e4a7c90fad10357514f77f550f8bb91f7 Author: Shuah Khan Date: Thu Oct 20 20:08:54 2022 -0600 selftests/watchdog: add support for WDIOC_GETSTATUS Add support for calling WDIOC_GETSTATUS and printing supported features and status. Signed-off-by: Shuah Khan tools/testing/selftests/watchdog/watchdog-test.c | 44 ++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) commit 66d1dce0ecb2a15ec2e1ec2d9c25bf13d9004d57 Author: Shuah Khan Date: Thu Oct 20 15:18:28 2022 -0600 selftests/watchdog: change to print reset reason info. The test prints reset reason when WDIOC_GETBOOTSTATUS returns a 0 flag value and all other cases simply say watchdog. Parse the flag values returned by WDIOC_GETBOOTSTATUS and print corresponding reset reason for each WDIOF_* boot status. Signed-off-by: Shuah Khan tools/testing/selftests/watchdog/watchdog-test.c | 58 ++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) commit d0217284cea7d470e4140e98b806cb3cdf8257d6 Author: Colin Ian King Date: Mon Oct 24 15:35:01 2022 +0100 net: dl2k: remove variable tx_use Variable tx_use is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221024143501.2163720-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/dlink/dl2k.c | 2 -- 1 file changed, 2 deletions(-) commit bb214ac47e0a6d58940cb89d3b036ba042387418 Author: Colin Ian King Date: Mon Oct 24 13:59:51 2022 +0100 bna: remove variable num_entries Variable num_entries is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221024125951.2155434-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/brocade/bna/bfa_msgq.c | 2 -- 1 file changed, 2 deletions(-) commit 022f19cf361bdbc72b51e684573c847c4f37478d Author: caihuoqing Date: Mon Oct 24 18:33:35 2022 +0800 net: hinic: Set max_mtu/min_mtu directly to simplify the code. Set max_mtu/min_mtu directly to avoid making the validity judgment when set mtu, because the judgment is made in net/core: dev_validate_mtu, so to simplify the code. Signed-off-by: caihuoqing Link: https://lore.kernel.org/r/20221024103349.4494-1-cai.huoqing@linux.dev Signed-off-by: Jakub Kicinski drivers/net/ethernet/huawei/hinic/hinic_dev.h | 4 ++++ drivers/net/ethernet/huawei/hinic/hinic_main.c | 3 ++- drivers/net/ethernet/huawei/hinic/hinic_port.c | 17 +---------------- 3 files changed, 7 insertions(+), 17 deletions(-) commit 3437d67a8d92a87aaba9107ceff6b4cc33b7cb94 Author: Gaosheng Cui Date: Tue Oct 25 20:57:44 2022 +0800 lsm: remove obsoleted comments for security hooks Remove the following obsoleted comments for security hooks: 1. sb_copy_data, the hook function has been removed since commit 5b4002391153 ("LSM: turn sb_eat_lsm_opts() into a method"). 2. sb_parse_opts_str, the hook function has been removed since commit 757cbe597fe8 ("LSM: new method: ->sb_add_mnt_opt()"). They are obsoleted comments, so remove them. Signed-off-by: Gaosheng Cui Reviewed-by: Casey Schaufler [PM: subj line tweaks] Signed-off-by: Paul Moore include/linux/lsm_hooks.h | 13 ------------- 1 file changed, 13 deletions(-) commit f3c51fe02c55bd944662714e5b91b96dc271ad9f Author: Alan Maguire Date: Mon Oct 24 15:38:29 2022 +0100 libbpf: Btf dedup identical struct test needs check for nested structs/arrays When examining module BTF, it is common to see core kernel structures such as sk_buff, net_device duplicated in the module. After adding debug messaging to BTF it turned out that much of the problem was down to the identical struct test failing during deduplication; sometimes the compiler adds identical structs. However it turns out sometimes that type ids of identical struct members can also differ, even when the containing structs are still identical. To take an example, for struct sk_buff, debug messaging revealed that the identical struct matching was failing for the anon struct "headers"; specifically for the first field: __u8 __pkt_type_offset[0]; /* 128 0 */ Looking at the code in BTF deduplication, we have code that guards against the possibility of identical struct definitions, down to type ids, and identical array definitions. However in this case we have a struct which is being defined twice but does not have identical type ids since each duplicate struct has separate type ids for the above array member. A similar problem (though not observed) could occur for struct-in-struct. The solution is to make the "identical struct" test check members not just for matching ids, but to also check if they in turn are identical structs or arrays. The results of doing this are quite dramatic (for some modules at least); I see the number of type ids drop from around 10000 to just over 1000 in one module for example. For testing use latest pahole or apply [1], otherwise dedups can fail for the reasons described there. Also fix return type of btf_dedup_identical_arrays() as suggested by Andrii to match boolean return type used elsewhere. Fixes: efdd3eb8015e ("libbpf: Accommodate DWARF/compiler bug with duplicated structs") Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1666622309-22289-1-git-send-email-alan.maguire@oracle.com [1] https://lore.kernel.org/bpf/1666364523-9648-1-git-send-email-alan.maguire tools/lib/bpf/btf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a264228c8bfa1908bdd756bfb27227b51ddf4cbb Merge: b5f0de6df6dc b64e6a8794d9 Author: Jakub Kicinski Date: Tue Oct 25 16:09:09 2022 -0700 Merge branch 'net-lan743x-pci11010-pci11414-devices-enhancements' Raju Lakkaraju says: ==================== net: lan743x: PCI11010 / PCI11414 devices Enhancements This patch series continues with the addition of supported features for the Ethernet function of the PCI11010 / PCI11414 devices to the LAN743x driver. ==================== Link: https://lore.kernel.org/r/20221024082516.661199-1-Raju.Lakkaraju@microchip.com Signed-off-by: Jakub Kicinski commit b64e6a8794d9d56f9713b6ceb9e3fdfc9c5f99af Author: Raju Lakkaraju Date: Mon Oct 24 13:55:16 2022 +0530 net: phy: micrel: Add PHY Auto/MDI/MDI-X set driver for KSZ9131 Add support for MDI-X status and configuration for KSZ9131 chips Signed-off-by: Raju Lakkaraju Reviewed-by: Horatiu Vultur Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/phy/micrel.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit cdc045402594f0ba635f1f1a7c810e6ff93485be Author: Raju Lakkaraju Date: Mon Oct 24 13:55:15 2022 +0530 net: lan743x: Add support for get_pauseparam and set_pauseparam Add pause get and set functions Signed-off-by: Raju Lakkaraju Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan743x_ethtool.c | 46 ++++++++++++++++++++++++ drivers/net/ethernet/microchip/lan743x_main.c | 4 +-- drivers/net/ethernet/microchip/lan743x_main.h | 2 ++ 3 files changed, 50 insertions(+), 2 deletions(-) commit 0a20a3ea4259ae761597aacd8a088d7e1304e804 Author: Zack Rusin Date: Thu Oct 20 21:07:03 2022 -0400 drm/nouveau: Remove unused variable Trivial removal of an unused variable. Not sure how it snuck by me and build bots in the 7c99616e3fe7. Fixes: 7c99616e3fe7 ("drm: Remove drm_mode_config::fb_base") Reported-by: Stephen Rothwell Cc: Laurent Pinchart Cc: Thomas Zimmermann Cc: Christian König Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Reviewed-by: Lyude Paul Signed-off-by: Zack Rusin Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20221021010703.536318-1-zack@kde.org Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nouveau_display.c | 1 - 1 file changed, 1 deletion(-) commit 0701c285087d79b44546e04dd13b9056443571a3 Author: Ville Syrjälä Date: Mon Oct 24 19:15:14 2022 +0300 drm/i915: Stop loading linear degamma LUT on glk needlessly Make glk_load_luts() a bit lighter for the common case where neither the degamma LUT nor pipe CSC are enabled by not loading the linear degamma LUT. Making .load_luts() as lightweight as possible is a good idea since it may need to execute from a vblank worker under tight deadlines. My earlier reasoning for always loading the linear degamma LUT was to avoid an extra LUT load when just enabling/disabling the pipe CSC, but that is nonsense since we load the LUTs on every flagged color management change/modeset anyway (either of which is needed for a pipe CSC toggle). We can also get rid of the glk_can_preload_luts() special case since the presence of the degamma LUT will now always match csc_enable. v2: Fix typos (Uma) Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221024161514.5340-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_color.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) commit 48205f42ae9bad5783e3cee780ce1a670f5b0f83 Author: Ville Syrjälä Date: Mon Oct 24 19:15:13 2022 +0300 drm/i915: Get rid of glk_load_degamma_lut_linear() Since we now have a place (pre_csc_lut) to stuff a purely internal LUT we can replace glk_load_degamma_lut_linear() with such a thing and just rely on the normal glk_load_degamma_lut() to load it as well. drm_mode_config_cleanup() will clean this up for us. v2: Pass on the error pointer Drop a hint about this into the state dump Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221024161514.5340-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_color.c | 110 +++++++++++++-------- drivers/gpu/drm/i915/display/intel_color.h | 1 + .../gpu/drm/i915/display/intel_crtc_state_dump.c | 4 +- drivers/gpu/drm/i915/display/intel_display.c | 4 + drivers/gpu/drm/i915/display/intel_display_core.h | 5 + 5 files changed, 82 insertions(+), 42 deletions(-) commit b1d9092240b74dbc925a51b93a193ca23055169f Author: Ville Syrjälä Date: Mon Oct 24 19:15:12 2022 +0300 drm/i915: Assert {pre,post}_csc_lut were assigned sensibly Since we now have the extra step from hw.(de)gamma_lut into {pre,post}_csc_lut let's make sure we didn't forget to assign them appropriately. Ie. basically making sure intel_color_check() was called when necessary (and that it did its job suitable well). Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221024161514.5340-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_color.c | 20 ++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_color.h | 1 + drivers/gpu/drm/i915/display/intel_display.c | 2 ++ 3 files changed, 23 insertions(+) commit 18f1b5ae7ecab0a3009e49ac7d183c59bb11c284 Author: Ville Syrjälä Date: Mon Oct 24 19:15:11 2022 +0300 drm/i915: Introduce crtc_state->{pre,post}_csc_lut Add an extra remapping step between the logical state of the LUTs (hw.(de)gamma_lut) as specified via uapi/bigjoiner copy vs. the actual state of the LUTs programmed into the hardware. With this we should be finally able finish the (de)gamma readout/state checker support for the remaining platforms (ilk-skl) where the same hardware LUT can be positioned either before or after the pipe CSC unit. Where we position it depends on factors such as presence of the logical degamma LUT, RGB vs. YCbCr output, full vs. limited RGB quantization range. Without the extra remapping step the state readout doesn't really know whether the LUT read from the hardware is the degamma or gamma LUT, and so we is unable to accurately store it into our crtc state. With the remapping step we know exactly where to put it given the order of the LUT vs. CSC in the hardware state. Only the initial hw->uapi state readout done during driver load/resume still has the problem of not really knowing what to do with the LUT(s). But we can just assume 1:1 mapping there and let subsequent commits fix things up. Another benefit is that we now have a place for purely internal LUTs, without complicating the bigjoiner uapi->hw copy logic. This should prove useful for streamlining glk degamma LUT handling. Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221024161514.5340-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_atomic.c | 8 ++ drivers/gpu/drm/i915/display/intel_color.c | 141 +++++++++++++-------- .../gpu/drm/i915/display/intel_crtc_state_dump.c | 10 +- drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_display_types.h | 4 + drivers/gpu/drm/i915/display/intel_modeset_setup.c | 6 + 6 files changed, 114 insertions(+), 57 deletions(-) commit 5ca1493e252a8b9cdb573b45bea200735dfbddb9 Author: Ville Syrjälä Date: Mon Oct 24 19:15:10 2022 +0300 drm/i915: Make ilk_load_luts() deal with degamma Make ilk_load_luts() ready for a degamma lut. Currently we never have one, but soon we may get one from readout, and I think we may want to change the state computation such that we may end up with one even when userspace has simply supplied a gamma lut. At least the code now follows the path laid out by the ivb/bdw counterpars. Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221024161514.5340-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_color.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ef20c5139c3157b5c6eda46f496952bddffe9ad6 Author: Rolf Eike Beer Date: Wed Oct 19 09:52:16 2022 +0200 binfmt_elf: simplify error handling in load_elf_phdrs() The err variable was the same like retval, but capped to <= 0. This is the same as retval as elf_read() never returns positive values. Signed-off-by: Rolf Eike Beer Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/4137126.7Qn9TF0dmF@mobilepool36.emlix.com fs/binfmt_elf.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit cfc46ca4fdcaef6f0215f56d89162400aee402e3 Author: Rolf Eike Beer Date: Wed Oct 19 09:43:01 2022 +0200 binfmt_elf: fix documented return value for load_elf_phdrs() This function has never returned anything but a plain NULL. Fixes: 6a8d38945cf4 ("binfmt_elf: Hoist ELF program header loading to a function") Signed-off-by: Rolf Eike Beer Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/2359389.EDbqzprbEW@mobilepool36.emlix.com fs/binfmt_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfb4a2b95875a47a01234f2de113ec089d524e71 Author: Rolf Eike Beer Date: Wed Oct 19 09:32:35 2022 +0200 exec: simplify initial stack size expansion I had a hard time trying to understand completely why it is using vm_end in one side of the expression and vm_start in the other one, and using something in the "if" clause that is not an exact copy of what is used below. The whole point is that the stack_size variable that was used in the "if" clause is the difference between vm_start and vm_end, which is not far away but makes this thing harder to read than it must be. Signed-off-by: Rolf Eike Beer Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/2017429.gqNitNVd0C@mobilepool36.emlix.com fs/exec.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 8f6e3f9e5a0f58e458a348b7e36af11d0e9702af Author: Kees Cook Date: Tue Oct 18 00:14:20 2022 -0700 binfmt: Fix whitespace issues Fix the annoying whitespace issues that have been following these files around for years. Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Christian Brauner (Microsoft) Link: https://lore.kernel.org/r/20221018071350.never.230-kees@kernel.org fs/binfmt_elf.c | 14 +++++++------- fs/binfmt_elf_fdpic.c | 2 +- fs/exec.c | 2 +- include/uapi/linux/elf.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) commit 275498a98b1fe77deebddfc4f8986c0cf2c3ced7 Author: Kees Cook Date: Tue Oct 18 00:17:24 2022 -0700 exec: Add comments on check_unsafe_exec() fs counting Add some comments about what the fs counting is doing in check_unsafe_exec() and how it relates to the call graph. Specifically, we can't force an unshare of the fs because of at least Chrome: https://lore.kernel.org/lkml/86CE201B-5632-4BB7-BCF6-7CB2C2895409@chromium.org/ Cc: Eric Biederman Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Christian Brauner (Microsoft) Link: https://lore.kernel.org/r/20221018071537.never.662-kees@kernel.org fs/exec.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 23a7aea5faf6500051c52dfaba46845c41b3abd4 Author: Rolf Eike Beer Date: Tue Oct 4 12:25:40 2022 +0200 ELF uapi: add spaces before '{' When searching for a struct definition I often enough end up simply doing git grep 'struct foobar {' Sadly some of the ELF structs did not follow the usual coding style so they were invisible. Signed-off-by: Rolf Eike Beer Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/11563980.Ss37MnutNL@mobilepool36.emlix.com include/uapi/linux/elf.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit af4fddffbe95855ef3b413158fa8e6e95899f2b2 Author: Andrei Vagin Date: Thu Oct 13 10:31:54 2022 -0700 selftests/timens: add a test for vfork+exit * check that a child process is in parent's time namespace after vfork. * check that a child process is in the target namespace after exec. Output on success: 1..4 ok 1 parent before vfork ok 2 child after exec ok 3 wait for child ok 4 parent after vfork # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Andrei Vagin Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221013173154.291597-1-avagin@google.com tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 2 +- tools/testing/selftests/timens/vfork_exec.c | 139 ++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+), 1 deletion(-) commit 2b5f9dad32ed19e8db3b0f10a84aa824a219803b Author: Andrei Vagin Date: Tue Sep 20 17:31:19 2022 -0700 fs/exec: switch timens when a task gets a new mm Changing a time namespace requires remapping a vvar page, so we don't want to allow doing that if any other tasks can use the same mm. Currently, we install a time namespace when a task is created with a new vm. exec() is another case when a task gets a new mm and so it can switch a time namespace safely, but it isn't handled now. One more issue of the current interface is that clone() with CLONE_VM isn't allowed if the current task has unshared a time namespace (timens_for_children doesn't match the current timens). Both these issues make some inconvenience for users. For example, Alexey and Florian reported that posix_spawn() uses vfork+exec and this pattern doesn't work with time namespaces due to the both described issues. LXC needed to workaround the exec() issue by calling setns. In the commit 133e2d3e81de5 ("fs/exec: allow to unshare a time namespace on vfork+exec"), we tried to fix these issues with minimal impact on UAPI. But it adds extra complexity and some undesirable side effects. Eric suggested fixing the issues properly because here are all the reasons to suppose that there are no users that depend on the old behavior. Cc: Alexey Izbyshev Cc: Christian Brauner Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: "Eric W. Biederman" Cc: Florian Weimer Cc: Kees Cook Suggested-by: "Eric W. Biederman" Origin-author: "Eric W. Biederman" Signed-off-by: Andrei Vagin Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20220921003120.209637-1-avagin@google.com fs/exec.c | 5 +++++ include/linux/nsproxy.h | 1 + kernel/fork.c | 9 --------- kernel/nsproxy.c | 23 +++++++++++++++++++++-- 4 files changed, 27 insertions(+), 11 deletions(-) commit 95465318849f7525f4dce1b720e4627f48963327 Author: Bart Van Assche Date: Tue Oct 25 12:17:55 2022 -0700 block: Micro-optimize get_max_segment_size() This patch removes a conditional jump from get_max_segment_size(). The x86-64 assembler code for this function without this patch is as follows: 206 return min_not_zero(mask - offset + 1, 0x0000000000000118 <+72>: not %rax 0x000000000000011b <+75>: and 0x8(%r10),%rax 0x000000000000011f <+79>: add $0x1,%rax 0x0000000000000123 <+83>: je 0x138 0x0000000000000125 <+85>: cmp %rdx,%rax 0x0000000000000128 <+88>: mov %rdx,%r12 0x000000000000012b <+91>: cmovbe %rax,%r12 0x000000000000012f <+95>: test %rdx,%rdx 0x0000000000000132 <+98>: mov %eax,%edx 0x0000000000000134 <+100>: cmovne %r12d,%edx With this patch applied: 206 return min(mask - offset, (unsigned long)lim->max_segment_size - 1) + 1; 0x000000000000003f <+63>: mov 0x28(%rdi),%ebp 0x0000000000000042 <+66>: not %rax 0x0000000000000045 <+69>: and 0x8(%rdi),%rax 0x0000000000000049 <+73>: sub $0x1,%rbp 0x000000000000004d <+77>: cmp %rbp,%rax 0x0000000000000050 <+80>: cmova %rbp,%rax 0x0000000000000054 <+84>: add $0x1,%eax Reviewed-by: Ming Lei Cc: Christoph Hellwig Cc: Keith Busch Cc: Steven Rostedt Cc: Guenter Roeck Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221025191755.1711437-4-bvanassche@acm.org Reviewed-by: Keith Busch Signed-off-by: Jens Axboe block/blk-merge.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit aa261f20589d894eb08b9a2b11c9672c548387cd Author: Bart Van Assche Date: Tue Oct 25 12:17:54 2022 -0700 block: Constify most queue limits pointers Document which functions do not modify the queue limits. Reviewed-by: Ming Lei Cc: Christoph Hellwig Cc: Keith Busch Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221025191755.1711437-3-bvanassche@acm.org Reviewed-by: Keith Busch Signed-off-by: Jens Axboe block/blk-map.c | 2 +- block/blk-merge.c | 29 ++++++++++++++++------------- block/blk-settings.c | 6 +++--- block/blk.h | 11 ++++++----- 4 files changed, 26 insertions(+), 22 deletions(-) commit b179c98f76978a0fae072c2b2dad8e143218afd8 Author: Bart Van Assche Date: Tue Oct 25 12:17:53 2022 -0700 block: Remove request.write_hint Commit c75e707fe1aa ("block: remove the per-bio/request write hint") removed all code that uses the struct request write_hint member. Hence also remove 'write_hint' itself. Reviewed-by: Ming Lei Cc: Christoph Hellwig Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221025191755.1711437-2-bvanassche@acm.org Reviewed-by: Keith Busch Signed-off-by: Jens Axboe include/linux/blk-mq.h | 1 - 1 file changed, 1 deletion(-) commit ae25e00ba84073450c07d8ffd2d74f914a027230 Author: Dan Carpenter Date: Tue Oct 25 18:32:49 2022 +0300 x86/retpoline: Fix crash printing warning The first argument of WARN() is a condition, so this will use "addr" as the format string and possibly crash. Fixes: 3b6c1747da48 ("x86/retpoline: Add SKL retthunk retpolines") Signed-off-by: Dan Carpenter Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/Y1gBoUZrRK5N%2FlCB@kili/ arch/x86/kernel/alternative.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5f0de6df6dce8d641ef58ef7012f3304dffb9a1 Author: Kees Cook Date: Tue Oct 18 02:56:03 2022 -0700 net: dev: Convert sa_data to flexible array in struct sockaddr One of the worst offenders of "fake flexible arrays" is struct sockaddr, as it is the classic example of why GCC and Clang have been traditionally forced to treat all trailing arrays as fake flexible arrays: in the distant misty past, sa_data became too small, and code started just treating it as a flexible array, even though it was fixed-size. The special case by the compiler is specifically that sizeof(sa->sa_data) and FORTIFY_SOURCE (which uses __builtin_object_size(sa->sa_data, 1)) do not agree (14 and -1 respectively), which makes FORTIFY_SOURCE treat it as a flexible array. However, the coming -fstrict-flex-arrays compiler flag will remove these special cases so that FORTIFY_SOURCE can gain coverage over all the trailing arrays in the kernel that are _not_ supposed to be treated as a flexible array. To deal with this change, convert sa_data to a true flexible array. To keep the structure size the same, move sa_data into a union with a newly introduced sa_data_min with the original size. The result is that FORTIFY_SOURCE can continue to have no idea how large sa_data may actually be, but anything using sizeof(sa->sa_data) must switch to sizeof(sa->sa_data_min). Cc: Jens Axboe Cc: Pavel Begunkov Cc: David Ahern Cc: Dylan Yudaken Cc: Yajun Deng Cc: Petr Machata Cc: Hangbin Liu Cc: Leon Romanovsky Cc: syzbot Cc: Willem de Bruijn Cc: Pablo Neira Ayuso Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221018095503.never.671-kees@kernel.org Signed-off-by: Jakub Kicinski include/linux/socket.h | 5 ++++- net/core/dev.c | 2 +- net/core/dev_ioctl.c | 2 +- net/packet/af_packet.c | 10 +++++----- 4 files changed, 11 insertions(+), 8 deletions(-) commit a55b70f1273a54b33482db8b2568da435fefd6c2 Author: Christoph Hellwig Date: Tue Oct 25 08:59:16 2022 -0700 block: remove bio_start_io_acct_time bio_start_io_acct_time is not actually used anywhere, so remove it. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221025155916.270303-1-hch@lst.de Signed-off-by: Jens Axboe block/blk-core.c | 12 ------------ include/linux/blkdev.h | 1 - 2 files changed, 13 deletions(-) commit 14dc00a0e2dbea4b685ab9723ff511fcfd223c18 Author: Jaegeuk Kim Date: Mon Oct 17 17:52:05 2022 -0700 f2fs: let's avoid to get cp_rwsem twice by f2fs_evict_inode by d_invalidate f2fs_unlink -> f2fs_lock_op -> d_invalidate -> shrink_dentry_list -> iput_final -> f2fs_evict_inode -> f2fs_lock_op Reviewed-by: Chao Yu Tested-by: Yangtao Li Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c3db3c2fd9992c08f49aa93752d3c103c3a4f6aa Author: Pavel Machek Date: Mon Oct 24 19:30:12 2022 +0200 f2fs: should put a page when checking the summary info The commit introduces another bug. Cc: stable@vger.kernel.org Fixes: c6ad7fd16657e ("f2fs: fix to do sanity check on summary info") Signed-off-by: Pavel Machek Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 1 + 1 file changed, 1 insertion(+) commit 8cd75652300f957066b86e4ede5525c756fe7a42 Author: Michael Straube Date: Tue Oct 25 17:27:22 2022 +0200 staging: r8188eu: remove unused macros from wifi.h There are some unused macros in wifi.h. Remove them. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20221025152722.14926-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/wifi.h | 27 --------------------------- 1 file changed, 27 deletions(-) commit 5f803b22bd2befdb43dfbee69d90932edd3cc1d0 Author: Aaron Lawrence Date: Tue Oct 25 17:44:02 2022 +0700 staging: rtl8192e: rtllib_crypt_wep: multiple blank lines removal Removal of multiple unnecessary blank lines in accordance with the Linux kernel coding-style regulations. Said issues ware detected on this file by the checkpatch script. Signed-off-by: Aaron Lawrence Link: https://lore.kernel.org/r/20221025104402.xvbfobi7sdnwlqs2@plymouth Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_crypt_wep.c | 8 -------- 1 file changed, 8 deletions(-) commit 6e006508f6e20a0f09dd9e64bc23c0592d92cc2d Author: Emily Peri Date: Mon Oct 24 14:47:25 2022 -0700 staging: rtl8723bs: Fix indentation in conditional statements Remove/add tabs in block statements in rtl8723bs/core to fix checkpatch warnings for suspect code indent for conditionals. Signed-off-by: Emily Peri Link: https://lore.kernel.org/r/Y1cH7br3mMcT4Dm5@marshmallow Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme.c | 30 +++++++++++++-------------- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +- drivers/staging/rtl8723bs/core/rtw_recv.c | 6 +++--- drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 +- 4 files changed, 19 insertions(+), 21 deletions(-) commit 438b4ade12582c358a6e6ab762408923f1af2d44 Author: Aaron Lawrence Date: Mon Oct 24 19:30:28 2022 +0700 Staging: rtl8192e: rtllib_tx: removed unnecessary blank line before a close brace Removed a blank line before a closing brace as it is not necessary as per the Linux coding-style regulations. The issue was flagged by the checkpatch script. Signed-off-by: Aaron Lawrence Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/234a3e8d21080ae2a1f75127a5c1a0ed131db924.1666612946.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_tx.c | 1 - 1 file changed, 1 deletion(-) commit 73fb5660fc300ecd9a611e1997c68bc81c8098db Author: Aaron Lawrence Date: Mon Oct 24 19:29:14 2022 +0700 Staging: rtl8192e: rtllib_tx: fixed lines ending with an open parenthesis Fixed several lines that end with an open parenthesis to not end with it anymore, as per the Linux kernel coding-style regulations. The issues were flagged by the checkpatch script. Signed-off-by: Aaron Lawrence Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/a8e67d281b4e9ab1254e0b58294f566994ac7d9d.1666612946.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_tx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5b773c5504205398ce7ebcf42c5092a7759b556a Author: Aaron Lawrence Date: Mon Oct 24 19:27:59 2022 +0700 Staging: rtl8192e: rtllib_tx: added spaces around operators Added multiple spaces around operators which needs it as per the Linux kernel coding-style regulations. The issues were flagged by the checkpatch script. Signed-off-by: Aaron Lawrence Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/b8bf422436ff4b2d9b530c61ebf814582ab8836a.1666612946.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_tx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2de698578ff331f98021d53e626e46acc4a91b46 Author: Aaron Lawrence Date: Mon Oct 24 19:26:59 2022 +0700 Staging: rtl8192e: rtllib_tx: fixed alignment matching open parenthesis Aligned multiple statements to match the open parenthesis on the line before it as per the Linux kernel coding-style regulations. The issues were flagged by the checkpatch script. Signed-off-by: Aaron Lawrence Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/b9a984cf481018a8ef61e4a579cb307eaf1bdc56.1666612946.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_tx.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit db213ea614e0b65d4be9c1cb78d14465a2c5b146 Author: Aaron Lawrence Date: Mon Oct 24 19:26:07 2022 +0700 Staging: rtl8192e: rtllib_tx: fixed multiple blank lines Multiple blank lines are condensed into a single blank line as per the Linux kernel coding-style regulations. The issues were flagged by the checkpatch script. Signed-off-by: Aaron Lawrence Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/a3e044ff9e5b198af15ebc8b91fd048743881340.1666612946.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_tx.c | 5 ----- 1 file changed, 5 deletions(-) commit 5229004f800219e849969eaa8197dff3b55f4b02 Author: Martin Kaiser Date: Sun Oct 23 19:08:08 2022 +0200 staging: r8188eu: bCardDisableWOHSM is write-only bCardDisableWOHSM in struct adapter is only written but never read. It can be removed. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221023170808.46233-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/drv_types.h | 1 - drivers/staging/r8188eu/os_dep/os_intfs.c | 4 ---- 2 files changed, 5 deletions(-) commit e329c18341b72c8386a1a25f8176ec541e66bf2b Author: Martin Kaiser Date: Sun Oct 23 19:08:07 2022 +0200 staging: r8188eu: remove wait_ack param from _issue_probereq_p2p The only caller of _issue_probereq_p2p sets wait_ack = false. Remove the wait_ack parameter and the code that would run only if wait_ack == true. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221023170808.46233-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 9e9e26190ee651ba868281ae16eab5dc1bcecf0e Author: Martin Kaiser Date: Sun Oct 23 19:08:06 2022 +0200 staging: r8188eu: NetworkTypeInUse is not in use NetworkTypeInUse from struct wlan_bssid_ex is not used. Remove NetworkTypeInUse itself, the code to set it and the enum for its possible values. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221023170808.46233-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme.c | 16 ---------------- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 --- drivers/staging/r8188eu/include/wlan_bssdef.h | 9 --------- 3 files changed, 28 deletions(-) commit 2ce164e9b363ee845287b7e693a1f9e7429ecc08 Author: Martin Kaiser Date: Sun Oct 23 19:08:05 2022 +0200 staging: r8188eu: don't set pcmd_obj components to 0 pcmd_obj was allocated with kzalloc, its memory is filled with 0s. There's no need to set rsp and rspsz to NULL or 0 again. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221023170808.46233-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 --- 1 file changed, 3 deletions(-) commit ec6d91016437fe8e5fdcb8cc60c14887e588998f Author: Martin Kaiser Date: Sun Oct 23 19:08:04 2022 +0200 staging: r8188eu: use standard multicast addr check Use is_multicast_ether_addr to check for a multicast address instead of reimplementing this check in the driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221023170808.46233-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_sta_mgt.c | 2 +- drivers/staging/r8188eu/include/wifi.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) commit 8d5c6a1df1204280354bfb59316fd056e978a864 Author: Martin Kaiser Date: Mon Oct 24 10:14:17 2022 +0200 staging: r8188eu: go2asoc is not needed Remove the go2asoc variable in OnAuthClient and call start_clnt_assoc directly. This makes the code a tiny bit shorter. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-18-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit d667d36d689eb3b0cd1bd0d09b36cbad9625f10b Author: Martin Kaiser Date: Mon Oct 24 10:14:16 2022 +0200 staging: r8188eu: remove an else branch If we go into this else branch, go2asoc is 0. We can continue to the end of the function. The final if condition will be false. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-17-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 -- 1 file changed, 2 deletions(-) commit cb2cff04d040eb02555c3c51a045fa31f4cc0e79 Author: Martin Kaiser Date: Mon Oct 24 10:14:15 2022 +0200 staging: r8188eu: remove unnecessary return Remove a return statement at the end of a function. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-16-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3cf90ead512362a1b2b4b9a0d48ec47ca26744c2 Author: Martin Kaiser Date: Mon Oct 24 10:14:14 2022 +0200 staging: r8188eu: remove unnecessary else branch Remove an else branch in OnAuthClient that is not needed. If we go into the else branch, go2asoc is 0. We can simply continue and the last if condition will be false. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-15-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 --- 1 file changed, 3 deletions(-) commit 2d64ae536ef0c78924fdd99e0bb3018d7b6b3178 Author: Martin Kaiser Date: Mon Oct 24 10:14:13 2022 +0200 staging: r8188eu: remove unnecessary label Remove a label on OnAuthClient that just calls return. We can return directly instead of jumping to this label. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-14-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 05aa6bf9c2546379f8ba57e2ffe8f88082d50a52 Author: Martin Kaiser Date: Mon Oct 24 10:14:12 2022 +0200 staging: r8188eu: change mlme handlers to void The mlme handlers that are called from mgt_dispatcher return an error code. mgt_dispatcher doesn't check this error code, we can remove it and change the handler functions to void. For now, make only the minimum changes to the handlers for removing the error codes. If handlers can be simplified, that'll be done it separate patches. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 93 +++++++++++--------------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +- 2 files changed, 41 insertions(+), 54 deletions(-) commit 19adbd9a2f26a64be96702f488ebed77b5334f79 Author: Martin Kaiser Date: Mon Oct 24 10:14:11 2022 +0200 staging: r8188eu: make OnAuth static OnAuth is used only in rtw_mlme_ext.c. Make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) commit 37552ad1fa2ed3924364e54f99f31ee56d902bcb Author: Martin Kaiser Date: Mon Oct 24 10:14:10 2022 +0200 staging: r8188eu: make OnAction static OnAction is used only in rtw_mlme_ext.c. Make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 51877bf3ab4ccd0279fedbf97736791234ed0cfe Author: Martin Kaiser Date: Mon Oct 24 10:14:09 2022 +0200 staging: r8188eu: make OnDeAuth static OnDeAuth is used only in rtw_mlme_ext.c. Make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit de20e195c221c808f7d9e2babe6f4cd9e7c92818 Author: Martin Kaiser Date: Mon Oct 24 10:14:08 2022 +0200 staging: r8188eu: make OnAuthClient static OnAuthClient is used only in rtw_mlme_ext.c. Make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 8ef3cd4f527c76832fefa2bb9960b5afb5f0a1d0 Author: Martin Kaiser Date: Mon Oct 24 10:14:07 2022 +0200 staging: r8188eu: make OnDisassoc static OnDisassoc is used only in rtw_mlme_ext.c. Make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 1aad70df18457dfbd4244dbe620f6f12429e32d5 Author: Martin Kaiser Date: Mon Oct 24 10:14:06 2022 +0200 staging: r8188eu: make OnBeacon static OnBeacon is used only in rtw_mlme_ext.c. Make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit bd0bd67c6bd8e2e5f1a3741f3d323e58ea3fc7ff Author: Martin Kaiser Date: Mon Oct 24 10:14:05 2022 +0200 staging: r8188eu: make OnProbeRsp static OnProbeRsp is used only in rtw_mlme_ext.c. Make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 94941c42c24813da86128f47bec0949184798b62 Author: Martin Kaiser Date: Mon Oct 24 10:14:04 2022 +0200 staging: r8188eu: make OnProbeReq static OnProbeReq is used only in rtw_mlme_ext.c. Make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 411c3890cb0d385bcd8ddef90abac82a32274153 Author: Martin Kaiser Date: Mon Oct 24 10:14:03 2022 +0200 staging: r8188eu: make OnAssocRsp static OnAssocRsp is used only in rtw_mlme_ext.c. Make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit b8d4f50557d52fff6356e8a83d50283232eedb98 Author: Martin Kaiser Date: Mon Oct 24 10:14:02 2022 +0200 staging: r8188eu: make OnAssocReq static OnAssocReq is used only in rtw_mlme_ext.c. Make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit a12960f970d3d47d1aefd4293738b878a6e7d024 Author: Martin Kaiser Date: Mon Oct 24 10:14:01 2022 +0200 staging: r8188eu: restructure mlme subfunction handling Move some code around in rtw_mlme_ext.c to make it simpler. mlme_sta_tbl is used only by mgt_dispatcher. Move the table inside the function. Move mgt_dispatcher behind the handler functions. We can then make the handler functions static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221024081417.66441-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 116 ++++++++++++++-------------- 1 file changed, 57 insertions(+), 59 deletions(-) commit 31af1aa09fb9b31694a4bad7e49204c75fb6f7dc Merge: 152e60e3fa2f b2440443a64f Author: Alexei Starovoitov Date: Tue Oct 25 10:14:51 2022 -0700 Merge branch 'bpf: Fixes for kprobe multi on kernel modules' Jiri Olsa says: ==================== hi, Martynas reported kprobe _multi link does not resolve symbols from kernel modules, which attach by address works. In addition while fixing that I realized we do not take module reference if the module has kprobe_multi link on top of it and can be removed. There's mo crash related to this, it will silently disappear from ftrace tables, while kprobe_multi link stays up with no data. This patchset has fixes for both issues. v3 changes: - reorder fields in struct bpf_kprobe_multi_link [Andrii] - added ack [Andrii] v2 changes: - added acks (Song) - added comment to kallsyms_callback (Song) - change module_callback realloc logic (Andrii) - get rid of macros in tests (Andrii) thanks, jirka ==================== Signed-off-by: Alexei Starovoitov commit b2440443a64f1b687df364089e6dcb23da4f9598 Author: Jiri Olsa Date: Tue Oct 25 15:41:48 2022 +0200 selftests/bpf: Add kprobe_multi kmod attach api tests Adding kprobe_multi kmod attach api tests that attach bpf_testmod functions via bpf_program__attach_kprobe_multi_opts. Running it as serial test, because we don't want other tests to reload bpf_testmod while it's running. Acked-by: Song Liu Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20221025134148.3300700-9-jolsa@kernel.org Signed-off-by: Alexei Starovoitov .../bpf/prog_tests/kprobe_multi_testmod_test.c | 89 ++++++++++++++++++++++ tools/testing/selftests/bpf/progs/kprobe_multi.c | 50 ++++++++++++ 2 files changed, 139 insertions(+) commit e697d8dcebd2f557fa5e5ed57aaf0a9992ce9df8 Author: Jiri Olsa Date: Tue Oct 25 15:41:47 2022 +0200 selftests/bpf: Add kprobe_multi check to module attach test Adding test that makes sure the kernel module won't be removed if there's kprobe multi link defined on top of it. Acked-by: Song Liu Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20221025134148.3300700-8-jolsa@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/module_attach.c | 7 +++++++ tools/testing/selftests/bpf/progs/test_module_attach.c | 6 ++++++ 2 files changed, 13 insertions(+) commit fee356ede980b6c2c8db612e18b25738356d6744 Author: Jiri Olsa Date: Tue Oct 25 15:41:46 2022 +0200 selftests/bpf: Add bpf_testmod_fentry_* functions Adding 3 bpf_testmod_fentry_* functions to have a way to test kprobe multi link on kernel module. They follow bpf_fentry_test* functions prototypes/code. Adding equivalent functions to all bpf_fentry_test* does not seems necessary at the moment, could be added later. Acked-by: Song Liu Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20221025134148.3300700-7-jolsa@kernel.org Signed-off-by: Alexei Starovoitov .../selftests/bpf/bpf_testmod/bpf_testmod.c | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 10705b2b7a8e4eb46ab5bf1b9ee354cb9a929428 Author: Jiri Olsa Date: Tue Oct 25 15:41:45 2022 +0200 selftests/bpf: Add load_kallsyms_refresh function Adding load_kallsyms_refresh function to re-read symbols from /proc/kallsyms file. This will be needed to get proper functions addresses from bpf_testmod.ko module, which is loaded/unloaded several times during the tests run, so symbols might be already old when we need to use them. Acked-by: Song Liu Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20221025134148.3300700-6-jolsa@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/trace_helpers.c | 20 +++++++++++++------- tools/testing/selftests/bpf/trace_helpers.h | 2 ++ 2 files changed, 15 insertions(+), 7 deletions(-) commit e22061b2d3095c12f90336479f24bf5eeb70e1bd Author: Jiri Olsa Date: Tue Oct 25 15:41:44 2022 +0200 bpf: Take module reference on kprobe_multi link Currently we allow to create kprobe multi link on function from kernel module, but we don't take the module reference to ensure it's not unloaded while we are tracing it. The multi kprobe link is based on fprobe/ftrace layer which takes different approach and releases ftrace hooks when module is unloaded even if there's tracer registered on top of it. Adding code that gathers all the related modules for the link and takes their references before it's attached. All kernel module references are released after link is unregistered. Note that we do it the same way already for trampoline probes (but for single address). Acked-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20221025134148.3300700-5-jolsa@kernel.org Signed-off-by: Alexei Starovoitov kernel/trace/bpf_trace.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 1a1b0716d36d21f8448bd7d3f1c0ade7230bb294 Author: Jiri Olsa Date: Tue Oct 25 15:41:43 2022 +0200 bpf: Rename __bpf_kprobe_multi_cookie_cmp to bpf_kprobe_multi_addrs_cmp Renaming __bpf_kprobe_multi_cookie_cmp to bpf_kprobe_multi_addrs_cmp, because it's more suitable to current and upcoming code. Acked-by: Song Liu Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20221025134148.3300700-4-jolsa@kernel.org Signed-off-by: Alexei Starovoitov kernel/trace/bpf_trace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3640bf8584f4ab0f5eed6285f09213954acd8b62 Author: Jiri Olsa Date: Tue Oct 25 15:41:42 2022 +0200 ftrace: Add support to resolve module symbols in ftrace_lookup_symbols Currently ftrace_lookup_symbols iterates only over core symbols, adding module_kallsyms_on_each_symbol call to check on modules symbols as well. Also removing 'args.found == args.cnt' condition, because it's already checked in kallsyms_callback function. Also removing 'err < 0' check, because both *kallsyms_on_each_symbol functions do not return error. Reported-by: Martynas Pumputis Acked-by: Song Liu Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20221025134148.3300700-3-jolsa@kernel.org Signed-off-by: Alexei Starovoitov kernel/trace/ftrace.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 73feb8d5fa3b755bb51077c0aabfb6aa556fd498 Author: Jiri Olsa Date: Tue Oct 25 15:41:41 2022 +0200 kallsyms: Make module_kallsyms_on_each_symbol generally available Making module_kallsyms_on_each_symbol generally available, so it can be used outside CONFIG_LIVEPATCH option in following changes. Rather than adding another ifdef option let's make the function generally available (when CONFIG_KALLSYMS and CONFIG_MODULES options are defined). Cc: Christoph Hellwig Acked-by: Song Liu Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20221025134148.3300700-2-jolsa@kernel.org Signed-off-by: Alexei Starovoitov include/linux/module.h | 9 +++++++++ kernel/module/kallsyms.c | 2 -- 2 files changed, 9 insertions(+), 2 deletions(-) commit 152e60e3fa2fa383357b4bac6306e91f6b25e32c Merge: 8f4bc15b9ad7 08b8191ba7f9 Author: Alexei Starovoitov Date: Tue Oct 25 10:11:57 2022 -0700 Merge branch 'bpftool: Add LLVM as default library for disassembling JIT-ed programs' Quentin Monnet says: ==================== To disassemble instructions for JIT-ed programs, bpftool has relied on the libbfd library. This has been problematic in the past: libbfd's interface is not meant to be stable and has changed several times, hence the detection of the two related features from the Makefile (disassembler-four-args and disassembler-init-styled). When it comes to shipping bpftool, this has also caused issues with several distribution maintainers unwilling to support the feature (for example, Debian's page for binutils-dev, libbfd's package, says: "Note that building Debian packages which depend on the shared libbfd is Not Allowed."). This patchset adds support for LLVM as the primary library for disassembling instructions for JIT-ed programs. We keep libbfd as a fallback. One reason for this is that currently it works well, we have all we need in terms of features detection in the Makefile, so it provides a fallback for disassembling JIT-ed programs if libbfd is installed but LLVM is not. The other reason is that libbfd supports nfp instruction for Netronome's SmartNICs and can be used to disassemble offloaded programs, something that LLVM cannot do (Niklas confirmed that the feature is still in use). However, if libbfd's interface breaks again in the future, we might reconsider keeping support for it. v4: - Rebase to address a conflict with commit 2c76238eaddd ("bpftool: Add "bootstrap" feature to version output"). v3: - Extend commit description (patch 6) with notes on llvm-dev and LLVM's disassembler stability. v2: - Pass callback when creating the LLVM disassembler, so that the branch targets are printed as addresses (instead of byte offsets). - Add last commit to "support" other arch with LLVM, although we don't know any supported triple yet. - Use $(LLVM_CONFIG) instead of llvm-config in Makefile. - Pass components to llvm-config --libs to limit the number of libraries to pass on the command line, in Makefile. - Rebase split of FEATURE_TESTS and FEATURE_DISPLAY in Makefile. ==================== Signed-off-by: Alexei Starovoitov commit 08b8191ba7f99cd1444001e9f4800ff27607d054 Author: Quentin Monnet Date: Tue Oct 25 16:03:29 2022 +0100 bpftool: Add llvm feature to "bpftool version" Similarly to "libbfd", add a "llvm" feature to the output of command "bpftool version" to indicate that LLVM is used for disassembling JIT-ed programs. This feature is mutually exclusive (from Makefile definitions) with "libbfd". Signed-off-by: Quentin Monnet Tested-by: Niklas Söderlund Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221025150329.97371-9-quentin@isovalent.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/Documentation/common_options.rst | 8 ++++---- tools/bpf/bpftool/main.c | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) commit ce4f660862359f2172ff4e3df30e641df5475cf6 Author: Quentin Monnet Date: Tue Oct 25 16:03:28 2022 +0100 bpftool: Support setting alternative arch for JIT disasm with LLVM For offloaded BPF programs, instead of failing to create the LLVM disassembler without even looking for a triple at all, do run the function that attempts to retrieve a valid architecture name for the device. It will still fail for the LLVM disassembler, because currently we have no valid triple to return (NFP disassembly is not supported by LLVM). But failing in that function is more logical than to assume in jit_disasm.c that passing an "arch" name is simply not supported. Suggested-by: Song Liu Signed-off-by: Quentin Monnet Link: https://lore.kernel.org/r/20221025150329.97371-8-quentin@isovalent.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/common.c | 10 ++++++---- tools/bpf/bpftool/jit_disasm.c | 15 +++++++-------- tools/bpf/bpftool/main.h | 3 +-- tools/bpf/bpftool/prog.c | 6 ++---- 4 files changed, 16 insertions(+), 18 deletions(-) commit eb9d1acf634baf6401dfb4f67dc895290713a357 Author: Quentin Monnet Date: Tue Oct 25 16:03:27 2022 +0100 bpftool: Add LLVM as default library for disassembling JIT-ed programs To disassemble instructions for JIT-ed programs, bpftool has relied on the libbfd library. This has been problematic in the past: libbfd's interface is not meant to be stable and has changed several times. For building bpftool, we have to detect how the libbfd version on the system behaves, which is why we have to handle features disassembler-four-args and disassembler-init-styled in the Makefile. When it comes to shipping bpftool, this has also caused issues with several distribution maintainers unwilling to support the feature (see for example Debian's page for binutils-dev, which ships libbfd: "Note that building Debian packages which depend on the shared libbfd is Not Allowed." [0]). For these reasons, we add support for LLVM as an alternative to libbfd for disassembling instructions of JIT-ed programs. Thanks to the preparation work in the previous commits, it's easy to add the library by passing the relevant compilation options in the Makefile, and by adding the functions for setting up the LLVM disassembler in file jit_disasm.c. The LLVM disassembler requires the LLVM development package (usually llvm-dev or llvm-devel). The expectation is that the interface for this disassembler will be more stable. There is a note in LLVM's Developer Policy [1] stating that the stability for the C API is "best effort" and not guaranteed, but at least there is some effort to keep compatibility when possible (which hasn't really been the case for libbfd so far). Furthermore, the Debian page for the related LLVM package does not caution against linking to the lib, as binutils-dev page does. Naturally, the display of disassembled instructions comes with a few minor differences. Here is a sample output with libbfd (already supported before this patch): # bpftool prog dump jited id 56 bpf_prog_6deef7357e7b4530: 0: nopl 0x0(%rax,%rax,1) 5: xchg %ax,%ax 7: push %rbp 8: mov %rsp,%rbp b: push %rbx c: push %r13 e: push %r14 10: mov %rdi,%rbx 13: movzwq 0xb4(%rbx),%r13 1b: xor %r14d,%r14d 1e: or $0x2,%r14d 22: mov $0x1,%eax 27: cmp $0x2,%r14 2b: jne 0x000000000000002f 2d: xor %eax,%eax 2f: pop %r14 31: pop %r13 33: pop %rbx 34: leave 35: ret LLVM supports several variants that we could set when initialising the disassembler, for example with: LLVMSetDisasmOptions(*ctx, LLVMDisassembler_Option_AsmPrinterVariant); but the default printer is used for now. Here is the output with LLVM: # bpftool prog dump jited id 56 bpf_prog_6deef7357e7b4530: 0: nopl (%rax,%rax) 5: nop 7: pushq %rbp 8: movq %rsp, %rbp b: pushq %rbx c: pushq %r13 e: pushq %r14 10: movq %rdi, %rbx 13: movzwq 180(%rbx), %r13 1b: xorl %r14d, %r14d 1e: orl $2, %r14d 22: movl $1, %eax 27: cmpq $2, %r14 2b: jne 0x2f 2d: xorl %eax, %eax 2f: popq %r14 31: popq %r13 33: popq %rbx 34: leave 35: retq The LLVM disassembler comes as the default choice, with libbfd as a fall-back. Of course, we could replace libbfd entirely and avoid supporting two different libraries. One reason for keeping libbfd is that, right now, it works well, we have all we need in terms of features detection in the Makefile, so it provides a fallback for disassembling JIT-ed programs if libbfd is installed but LLVM is not. The other motivation is that libbfd supports nfp instruction for Netronome's SmartNICs and can be used to disassemble offloaded programs, something that LLVM cannot do. If libbfd's interface breaks again in the future, we might reconsider keeping support for it. [0] https://packages.debian.org/buster/binutils-dev [1] https://llvm.org/docs/DeveloperPolicy.html#c-api-changes Signed-off-by: Quentin Monnet Tested-by: Niklas Söderlund Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221025150329.97371-7-quentin@isovalent.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/Makefile | 48 +++++++++++------- tools/bpf/bpftool/jit_disasm.c | 112 +++++++++++++++++++++++++++++++++++++++-- tools/bpf/bpftool/main.h | 4 +- 3 files changed, 141 insertions(+), 23 deletions(-) commit e1947c750ffe5effa371d7b7bc72043f100f6a93 Author: Quentin Monnet Date: Tue Oct 25 16:03:26 2022 +0100 bpftool: Refactor disassembler for JIT-ed programs Refactor disasm_print_insn() to extract the code specific to libbfd and move it to dedicated functions. There is no functional change. This is in preparation for supporting an alternative library for disassembling the instructions. Signed-off-by: Quentin Monnet Tested-by: Niklas Söderlund Acked-by: Song Liu Link: https://lore.kernel.org/r/20221025150329.97371-6-quentin@isovalent.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/jit_disasm.c | 133 +++++++++++++++++++++++++++-------------- 1 file changed, 88 insertions(+), 45 deletions(-) commit 2ea4d86a5093defcb2fc49799184ede178e64d36 Author: Quentin Monnet Date: Tue Oct 25 16:03:25 2022 +0100 bpftool: Group libbfd defs in Makefile, only pass them if we use libbfd Bpftool uses libbfd for disassembling JIT-ed programs. But the feature is optional, and the tool can be compiled without libbfd support. The Makefile sets the relevant variables accordingly. It also sets variables related to libbfd's interface, given that it has changed over time. Group all those libbfd-related definitions so that it's easier to understand what we are testing for, and only use variables related to libbfd's interface if we need libbfd in the first place. In addition to make the Makefile clearer, grouping the definitions related to disassembling JIT-ed programs will help support alternatives to libbfd. Signed-off-by: Quentin Monnet Tested-by: Niklas Söderlund Acked-by: Song Liu Link: https://lore.kernel.org/r/20221025150329.97371-5-quentin@isovalent.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/Makefile | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 108326d6fa6c04e1473886fd662981792fc708a2 Author: Quentin Monnet Date: Tue Oct 25 16:03:24 2022 +0100 bpftool: Split FEATURE_TESTS/FEATURE_DISPLAY definitions in Makefile Make FEATURE_TESTS and FEATURE_DISPLAY easier to read and less likely to be subject to conflicts on updates by having one feature per line. Suggested-by: Andres Freund Signed-off-by: Quentin Monnet Tested-by: Niklas Söderlund Acked-by: Song Liu Link: https://lore.kernel.org/r/20221025150329.97371-4-quentin@isovalent.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/Makefile | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 55b4de58d0e2aca810ed2b198a0173640300acf8 Author: Quentin Monnet Date: Tue Oct 25 16:03:23 2022 +0100 bpftool: Remove asserts from JIT disassembler The JIT disassembler in bpftool is the only components (with the JSON writer) using asserts to check the return values of functions. But it does not do so in a consistent way, and diasm_print_insn() returns no value, although sometimes the operation failed. Remove the asserts, and instead check the return values, print messages on errors, and propagate the error to the caller from prog.c. Remove the inclusion of assert.h from jit_disasm.c, and also from map.c where it is unused. Signed-off-by: Quentin Monnet Tested-by: Niklas Söderlund Acked-by: Song Liu Link: https://lore.kernel.org/r/20221025150329.97371-3-quentin@isovalent.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/jit_disasm.c | 51 +++++++++++++++++++++++++++++------------- tools/bpf/bpftool/main.h | 25 +++++++++++---------- tools/bpf/bpftool/map.c | 1 - tools/bpf/bpftool/prog.c | 15 ++++++++----- 4 files changed, 57 insertions(+), 35 deletions(-) commit b3d84af7cdfc079ef86d94f7cf125821559925fa Author: Quentin Monnet Date: Tue Oct 25 16:03:22 2022 +0100 bpftool: Define _GNU_SOURCE only once _GNU_SOURCE is defined in several source files for bpftool, but only one of them takes the precaution of checking whether the value is already defined. Add #ifndef for other occurrences too. This is in preparation for the support of disassembling JIT-ed programs with LLVM, with $(llvm-config --cflags) passing -D_GNU_SOURCE as a compilation argument. Signed-off-by: Quentin Monnet Tested-by: Niklas Söderlund Acked-by: Song Liu Link: https://lore.kernel.org/r/20221025150329.97371-2-quentin@isovalent.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/common.c | 2 ++ tools/bpf/bpftool/iter.c | 2 ++ tools/bpf/bpftool/jit_disasm.c | 2 ++ tools/bpf/bpftool/net.c | 2 ++ tools/bpf/bpftool/perf.c | 2 ++ tools/bpf/bpftool/prog.c | 2 ++ tools/bpf/bpftool/xlated_dumper.c | 2 ++ 7 files changed, 14 insertions(+) commit a365105c685cad63e3c185c294373a7b81d3ea63 Author: Viresh Kumar Date: Mon Oct 17 15:33:02 2022 +0530 thermal: sysfs: Reuse cdev->max_state Now that the cooling device structure stores the max_state value, reuse it and drop max_states from struct cooling_dev_stats. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/thermal/thermal_sysfs.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit c408b3d1d9bbc7de5fb0304fea424ef2539da616 Author: Viresh Kumar Date: Mon Oct 17 15:33:01 2022 +0530 thermal: Validate new state in cur_state_store() In cur_state_store(), the new state of the cooling device is received from user-space and is not validated by the thermal core but the same is left for the individual drivers to take care of. Apart from duplicating the code it leaves possibility for introducing bugs where a driver may not do it right. Lets make the thermal core check the new state itself and store the max value in the cooling device structure. Link: https://lore.kernel.org/all/Y0ltRJRjO7AkawvE@kili/ Reported-by: Dan Carpenter Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/thermal/gov_fair_share.c | 6 +----- drivers/thermal/thermal_core.c | 15 +++++++-------- drivers/thermal/thermal_sysfs.c | 11 +++++------ include/linux/thermal.h | 1 + 4 files changed, 14 insertions(+), 19 deletions(-) commit 1662cea4623f75d8251adf07370bbaa958f0355d Author: Yang Yingliang Date: Tue Oct 25 15:15:49 2022 +0800 kset: fix memory leak when kset_register() returns error Inject fault while loading module, kset_register() may fail. If it fails, the kset.kobj.name allocated by kobject_set_name() which must be called before a call to kset_register() may be leaked, since refcount of kobj was set in kset_init(). To mitigate this, we free the name in kset_register() when an error is encountered, i.e. when kset_register() returns an error. A kset may be embedded in a larger structure which may be dynamically allocated in callers, it needs to be freed in ktype.release() or error path in callers, in this case, we can not call kset_put() in kset_register(), or it will cause double free, so just call kfree_const() to free the name and set it to NULL to avoid accessing bad pointer in callers. With this fix, the callers don't need care about freeing the name and may call kset_put() if kset_register() fails. Suggested-by: Luben Tuikov Signed-off-by: Yang Yingliang Reviewed-by: Link: https://lore.kernel.org/r/20221025071549.1280528-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman lib/kobject.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b55eef5226b71edf5422de246bc189da1fdc9000 Author: Cristian Marussi Date: Thu Oct 13 18:46:12 2022 +0100 powercap: arm_scmi: Add SCMI Powercap based driver Add a powercap driver that, using the ARM SCMI Protocol to query the SCMI platform firmware for the list of existing Powercap domains, registers all of such discovered domains under the new 'arm-scmi' powercap control type. A new simple powercap zone and constraint is registered for all the SCMI powercap zones that are found. Reviewed-by: Lukasz Luba Signed-off-by: Cristian Marussi Acked-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki MAINTAINERS | 1 + drivers/powercap/Kconfig | 13 + drivers/powercap/Makefile | 1 + drivers/powercap/arm_scmi_powercap.c | 509 +++++++++++++++++++++++++++++++++++ 4 files changed, 524 insertions(+) commit 8d259847243d1e21a866e828c4ce90d759f3d17b Author: Andy Shevchenko Date: Thu Oct 20 18:39:14 2022 +0300 gpiolib: cdev: Fix typo in kernel doc for struct line When eflags has been renamed to the edflags, the kernel doc change were missed. Update kernel doc accordingly. Fixes: b1a92e94560d ("gpiolib: cdev: consolidate edge detector configuration flags") Signed-off-by: Andy Shevchenko Reviewed-by: Kent Gibson drivers/gpio/gpiolib-cdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eac001bf4a5b7d857ec228cd18b4e3644a5ceeb9 Author: Xiang Yang Date: Thu Oct 20 09:44:26 2022 +0800 gpiolib: acpi: Use METHOD_NAME__AEI macro for acpi_walk_resources Using the METHOD_NAME__AEI macro instead of using "_AEI" directly. Signed-off-by: Xiang Yang Signed-off-by: Andy Shevchenko drivers/gpio/gpiolib-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71bb70f87d636c875212d75ecdde048588914e19 Author: Zack Rusin Date: Sat Oct 22 00:02:36 2022 -0400 drm/vmwgfx: Fix a sparse warning in kernel docs Fixes a warning about extra docs about a function argument that has been removed a while back: drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:3888: warning: Excess function parameter 'sync_file' description in 'vmw_execbuf_copy_fence_user' Fixes: a0f90c881570 ("drm/vmwgfx: Fix stale file descriptors on failed usercopy") Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Maaz Mombasawala Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-18-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 1 - 1 file changed, 1 deletion(-) commit 148e5f5529ac19c8a1aeabe6e11c92a39e44cc6a Author: Zack Rusin Date: Sat Oct 22 00:02:35 2022 -0400 drm/vmwgfx: Optimize initial sizes of cotables It's important to get the initial size of cotables right because otherwise every app needs to start with a synchronous cotable resize. This has an measurable impact on system wide performance but is not relevant for long running single full screen apps for which the cotable resizes will happen early in the lifecycle and will continue running just fine. To eliminate the initial cotable resizes match the initial sizes to what the userspace expects. The actual result of the patch is simply setting the initial size of two of the cotables to a size that will align them to two pages instead of one. For a piglit run, before: name | total | per frame | per sec vmw_cotable_resize | 1405 | 0.12 | 1.58 vmw_execbuf_ioctl | 290805 | 25.43 | 326.05 After: name | total | per frame | per sec vmw_cotable_resize | 4 | 0.00 | 0.00 vmw_execbuf_ioctl | 281673 | 25.10 | 274.68 Signed-off-by: Zack Rusin Reviewed-by: Michael Banack Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-17-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 4bb50606cba221028f3b03e6a90f555d5d658cfc Author: Zack Rusin Date: Sat Oct 22 00:02:34 2022 -0400 drm/vmwgfx: Add a mksstat counter for cotable resizes There's been a lot of cotable resizes on startup which we can track by adding a mks stat to measure both the invocation count and time spent doing cotable resizes. This is only used if kernel is configured with CONFIG_DRM_VMWGFX_MKSSTATS The stats are collected on the host size inside the vmware-stats.log file. Signed-off-by: Zack Rusin Reviewed-by: Michael Banack Reviewed-by: Martin Krastev Reviewed-by: Maaz Mombasawala Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-16-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 13 +++++++++++-- drivers/gpu/drm/vmwgfx/vmwgfx_mksstat.h | 2 ++ drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 16 +++++++++------- 3 files changed, 22 insertions(+), 9 deletions(-) commit 2e10cdc6e85de5998b0b140deff01765ceb92f64 Author: Zack Rusin Date: Sat Oct 22 00:02:33 2022 -0400 drm/vmwgfx: Remove explicit and broken vblank handling The explicit vblank handling was never finished. The driver never had the full implementation of vblank and what was there is emulated by DRM when the driver doesn't pretend to be implementing it itself. Let DRM handle the vblank emulation and stop pretending the driver is doing anything special with vblank. In the future it would make sense to implement helpers for full vblank handling because vkms and amdgpu_vkms already have that code. Exporting it to common helpers and having all three drivers share it would make sense (that would be largely just to allow more of igt to run). Signed-off-by: Zack Rusin Reviewed-by: Maaz Mombasawala Reviewed-by: Martin Krastev Reviewed-by: Michael Banack Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-15-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 3 --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 34 ---------------------------------- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 8 -------- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 31 +------------------------------ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 26 -------------------------- 5 files changed, 1 insertion(+), 101 deletions(-) commit df42523c12f8d58a41f547f471b46deffd18c203 Author: Zack Rusin Date: Sat Oct 22 00:02:32 2022 -0400 drm/vmwgfx: Port the framebuffer code to drm fb helpers Instead of using vmwgfx specific framebuffer implementation use the drm fb helpers. There's no change in functionality, the only difference is a reduction in the amount of code inside the vmwgfx module. drm fb helpers do not deal correctly with changes in crtc preferred mode at runtime, but the old fb code wasn't dealing with it either. Same situation applies to high-res fb consoles - the old code was limited to 1176x885 because it was checking for legacy/deprecated memory limites, the drm fb helpers are limited to the initial resolution set on fb due to first problem (drm fb helpers being unable to handle hotplug crtc preferred mode changes). This also removes the kernel config for disabling fb support which hasn't been used or supported in a very long time. Signed-off-by: Zack Rusin Reviewed-by: Maaz Mombasawala Reviewed-by: Martin Krastev Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-14-zack@kde.org drivers/gpu/drm/vmwgfx/Kconfig | 7 - drivers/gpu/drm/vmwgfx/Makefile | 2 - drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 58 +-- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 35 +- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 831 ------------------------------------ drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 79 +--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 7 - 7 files changed, 28 insertions(+), 991 deletions(-) commit 1c8d537bbcc9708d667d81ddc2caf43ec753cf05 Author: Zack Rusin Date: Sat Oct 22 00:02:31 2022 -0400 drm/vmwgfx: Do not allow invalid bpp's for dumb buffers Dumb buffers allow a very limited set of formats. Basically everything apart from 1, 2 and 4 is expected to return an error. Make vmwgfx follow those guidelines. This fixes igt's dumb_buffer invalid_bpp test on vmwgfx. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Maaz Mombasawala Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-13-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 9da30cdd6a318595199319708c143ae318f804ef Author: Maaz Mombasawala Date: Sat Oct 22 00:02:30 2022 -0400 drm/vmwgfx: Remove vmwgfx_hashtab The vmwgfx driver has migrated from using the hashtable in vmwgfx_hashtab to the linux/hashtable implementation. Remove the vmwgfx_hashtab from the driver. Signed-off-by: Maaz Mombasawala Reviewed-by: Martin Krastev Reviewed-by: Zack Rusin Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-12-zack@kde.org Documentation/gpu/todo.rst | 11 -- drivers/gpu/drm/vmwgfx/Makefile | 2 +- drivers/gpu/drm/vmwgfx/ttm_object.c | 8 +- drivers/gpu/drm/vmwgfx/ttm_object.h | 2 - drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 +- drivers/gpu/drm/vmwgfx/vmwgfx_hashtab.c | 199 ----------------------------- drivers/gpu/drm/vmwgfx/vmwgfx_hashtab.h | 83 ------------ 8 files changed, 12 insertions(+), 303 deletions(-) commit 76a9e07f270cf5fb556ac237dbf11f5dacd61fef Author: Maaz Mombasawala Date: Sat Oct 22 00:02:29 2022 -0400 drm/vmwgfx: Refactor ttm reference object hashtable to use linux/hashtable. This is part of an effort to move from the vmwgfx_open_hash hashtable to linux/hashtable implementation. Refactor the ref_hash hashtable, used for fast lookup of reference objects associated with a ttm file. This also exposed a problem related to inconsistently using 32-bit and 64-bit keys with this hashtable. The hash function used changes depending on the size of the type, and results are not consistent across numbers, for example, hash_32(329) = 329, but hash_long(329) = 328. This would cause the lookup to fail for objects already in the hashtable, since keys of different sizes were being passed during adding and lookup. This was not an issue before because vmwgfx_open_hash always used hash_long. Fix this by always using 64-bit keys for this hashtable, which means that hash_long is always used. Signed-off-by: Maaz Mombasawala Reviewed-by: Zack Rusin Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-11-zack@kde.org drivers/gpu/drm/vmwgfx/ttm_object.c | 91 ++++++++++++++++++++----------------- drivers/gpu/drm/vmwgfx/ttm_object.h | 12 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 3 files changed, 56 insertions(+), 49 deletions(-) commit bb6780aa5a1d99e86757c0c96bfae65a46cf839e Author: Michael Banack Date: Sat Oct 22 00:02:28 2022 -0400 drm/vmwgfx: Diff cursors when using cmds Extend the cursor diffing support to support the command-path. Signed-off-by: Michael Banack Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-10-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 120 ++++++++++++++++++------------------ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 + 2 files changed, 62 insertions(+), 60 deletions(-) commit 92f59ac41c88cddd79591993d0066a19c932f8e7 Author: Michael Banack Date: Sat Oct 22 00:02:27 2022 -0400 drm/vmwgfx: Support cursor surfaces with mob cursor Add support for cursor surfaces when using mob cursors. Signed-off-by: Michael Banack Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-9-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 78 +++++++++++++++++++++++-------------- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 1 + 2 files changed, 50 insertions(+), 29 deletions(-) commit 40f9e40b20491e54ea1006faecd31b6b72caf052 Author: Michael Banack Date: Sat Oct 22 00:02:26 2022 -0400 drm/vmwgfx: Start diffing new mob cursors against old ones Avoid making the SVGA device do extra work if the new cursor image matches the old one. Signed-off-by: Michael Banack Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-8-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 95 +++++++++++++++++++++++++++++-------- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 12 +++-- 2 files changed, 81 insertions(+), 26 deletions(-) commit 53bc3f6fb6b3d401230bb2f8d3b6fe877c137b87 Author: Michael Banack Date: Sat Oct 22 00:02:25 2022 -0400 drm/vmwgfx: Clean up cursor mobs Clean up the cursor mob path by moving ownership of the mobs into the plane_state, and just leaving a cache of unused mobs in the plane itself. Signed-off-by: Michael Banack Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-7-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 441 +++++++++++++++++++++--------------- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 19 +- 2 files changed, 267 insertions(+), 193 deletions(-) commit 9e931f2e09701e25744f3d186a4ba13b5342b136 Author: Maaz Mombasawala Date: Sat Oct 22 00:02:24 2022 -0400 drm/vmwgfx: Refactor resource validation hashtable to use linux/hashtable implementation. Vmwgfx's hashtab implementation needs to be replaced with linux/hashtable to reduce maintenence burden. As part of this effort, refactor the res_ht hashtable used for resource validation during execbuf execution to use linux/hashtable implementation. This also refactors vmw_validation_context to use vmw_sw_context as the container for the hashtable, whereas before it used a vmwgfx_open_hash directly. This makes vmw_validation_context less generic, but there is no functional change since res_ht is the only instance where validation context used a hashtable in vmwgfx driver. Signed-off-by: Maaz Mombasawala Reviewed-by: Thomas Hellström Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-6-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 24 ++++++++++--- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 +-- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 14 ++------ drivers/gpu/drm/vmwgfx/vmwgfx_validation.c | 55 +++++++++++++++--------------- drivers/gpu/drm/vmwgfx/vmwgfx_validation.h | 26 ++++---------- 5 files changed, 58 insertions(+), 66 deletions(-) commit 931e09d8d5b4aa19bdae0234f2727049f1cd13d9 Author: Maaz Mombasawala Date: Sat Oct 22 00:02:23 2022 -0400 drm/vmwgfx: Remove ttm object hashtable The object_hash hashtable for ttm objects is not being used. Remove it and perform refactoring in ttm_object init function. Signed-off-by: Maaz Mombasawala Reviewed-by: Zack Rusin Reviewed-by: Martin Krastev Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-5-zack@kde.org drivers/gpu/drm/vmwgfx/ttm_object.c | 24 ++++++------------------ drivers/gpu/drm/vmwgfx/ttm_object.h | 6 ++---- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 3 files changed, 9 insertions(+), 23 deletions(-) commit 43531dc661b7fb6be249c023bf25847b38215545 Author: Maaz Mombasawala Date: Sat Oct 22 00:02:22 2022 -0400 drm/vmwgfx: Refactor resource manager's hashtable to use linux/hashtable implementation. Vmwgfx's hashtab implementation needs to be replaced with linux/hashtable to reduce maintenance burden. Refactor cmdbuf resource manager to use linux/hashtable.h implementation as part of this effort. Signed-off-by: Maaz Mombasawala Reviewed-by: Zack Rusin Reviewed-by: Martin Krastev Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-4-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 62 +++++++++++++----------------- 1 file changed, 26 insertions(+), 36 deletions(-) commit 3280706369f636cc6fc959a9842df5707c7fd85f Author: Martin Krastev Date: Sat Oct 22 00:02:21 2022 -0400 drm/vmwgfx: Fix frame-size warning in vmw_mksstat_add_ioctl Function vmw_mksstat_add_ioctl allocates three big arrays on stack. That triggers frame-size [-Wframe-larger-than=] warning. Refactor that function to use kmalloc_array instead. v2: Initialize page to null to avoid possible uninitialized use of it, spotted by the kernel test robot Signed-off-by: Martin Krastev Reviewed-by: Zack Rusin Reviewed-by: Maaz Mombasawala Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-3-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 43 +++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 14 deletions(-) commit 7f4c33778686cc2d34cb4ef65b4265eea874c159 Author: Zack Rusin Date: Sat Oct 22 00:02:20 2022 -0400 drm/vmwgfx: Write the driver id registers Driver id registers are a new mechanism in the svga device to hint to the device which driver is running. This should not change device behavior in any way, but might be convenient to work-around specific bugs in guest drivers. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Maaz Mombasawala Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-2-zack@kde.org drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 43 +++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 9 deletions(-) commit 44a201df71739a3c5ef3c40e58ebaccfd052d430 Author: Anand Moon Date: Fri Oct 21 05:09:03 2022 +0000 arm64: dts: meson: Enable active coling using gpio-fan on Odroid N2/N2+ Odroid N2/N2+ support active cooling via gpio-fan controller. Add fan controls and tip point for cpu and ddr thermal sensor on this boards. Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20221021050906.1158-1-linux.amoon@gmail.com Signed-off-by: Neil Armstrong .../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit ce759829b8fffac891780611b54a6be26a2d5a5f Author: Amjad Ouled-Ameur Date: Fri Oct 21 15:31:28 2022 +0200 arm64: dts: meson-gxbb: add SPI pinctrl nodes for CLK Add SPICC Controller pin nodes for CLK line when idle for Amlogic GXBB SoCs. Signed-off-by: Amjad Ouled-Ameur Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221004-up-aml-fix-spi-v4-4-0342d8e10c49@baylibre.com Signed-off-by: Neil Armstrong arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 2ba370bb98b53b7565493083699d82da5ef2cec8 Author: Amjad Ouled-Ameur Date: Fri Oct 21 15:31:27 2022 +0200 arm64: dts: meson-gxl: add SPI pinctrl nodes for CLK Add SPICC Controller pin nodes for CLK line when idle for Amlogic GXL SoCs. Signed-off-by: Neil Armstrong Signed-off-by: Amjad Ouled-Ameur Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221004-up-aml-fix-spi-v4-3-0342d8e10c49@baylibre.com Signed-off-by: Neil Armstrong arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 941f7298c70c7668416e7845fa76eb72c07d966b Author: Christoph Hellwig Date: Tue Oct 18 15:57:20 2022 +0200 nvme-apple: remove an extra queue reference Now that blk_mq_destroy_queue does not release the queue reference, there is no need for a second admin queue reference to be held by the apple_nvme structure. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Sven Peter Reviewed-by: Chaitanya Kulkarni Reviewed-by: Keith Busch Link: https://lore.kernel.org/r/20221018135720.670094-5-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/apple.c | 9 --------- 1 file changed, 9 deletions(-) commit 7dcebef90d35de13a326f765dd787538880566f9 Author: Christoph Hellwig Date: Tue Oct 18 15:57:19 2022 +0200 nvme-pci: remove an extra queue reference Now that blk_mq_destroy_queue does not release the queue reference, there is no need for a second admin queue reference to be held by the nvme_dev. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Keith Busch Link: https://lore.kernel.org/r/20221018135720.670094-4-hch@lst.de Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 6 ------ 1 file changed, 6 deletions(-) commit dc917c361422388f0d39d3f0dc2bc5a188c01156 Author: Christoph Hellwig Date: Tue Oct 18 15:57:18 2022 +0200 scsi: remove an extra queue reference Now that blk_mq_destroy_queue does not release the queue reference, there is no need for a second queue reference to be held by the scsi_device. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Keith Busch Link: https://lore.kernel.org/r/20221018135720.670094-3-hch@lst.de Signed-off-by: Jens Axboe drivers/scsi/scsi_scan.c | 1 - drivers/scsi/scsi_sysfs.c | 1 - 2 files changed, 2 deletions(-) commit 2b3f056f72e56fa07df69b4705e0b46a6c08e77c Author: Christoph Hellwig Date: Tue Oct 18 15:57:17 2022 +0200 blk-mq: move the call to blk_put_queue out of blk_mq_destroy_queue The fact that blk_mq_destroy_queue also drops a queue reference leads to various places having to grab an extra reference. Move the call to blk_put_queue into the callers to allow removing the extra references. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Keith Busch Link: https://lore.kernel.org/r/20221018135720.670094-2-hch@lst.de [axboe: fix fabrics_q vs admin_q conflict in nvme core.c] Signed-off-by: Jens Axboe block/blk-mq.c | 4 +--- block/bsg-lib.c | 2 ++ drivers/nvme/host/apple.c | 1 + drivers/nvme/host/core.c | 10 ++++++++-- drivers/nvme/host/pci.c | 1 + drivers/scsi/scsi_sysfs.c | 1 + drivers/ufs/core/ufshcd.c | 2 ++ 7 files changed, 16 insertions(+), 5 deletions(-) commit 91619eb60aeccd3181d9b88975add706a9b763c1 Author: Pablo Neira Ayuso Date: Mon Oct 17 13:03:35 2022 +0200 netfilter: nft_inner: set tunnel offset to GRE header offset Set inner tunnel offset to the GRE header, this is redundant to existing transport header offset, but this normalizes the handling of the tunnel header regardless its location in the layering. GRE version 0 is overloaded with RFCs, the type decorator in the inner expression might also be useful to interpret matching fields from the netlink delinearize path in userspace. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_inner.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0db14b95660b63dceeb7e89f2e3ffa97d331fce0 Author: Pablo Neira Ayuso Date: Mon Oct 17 13:03:34 2022 +0200 netfilter: nft_inner: add geneve support Geneve tunnel header may contain options, parse geneve header and update offset to point to the link layer header according to the opt_len field. Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 1 + net/netfilter/nft_inner.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) commit a150d122b6bdb84df532057aa3b2faf8c6485792 Author: Pablo Neira Ayuso Date: Mon Oct 17 13:03:33 2022 +0200 netfilter: nft_meta: add inner match support Add support for inner meta matching on: - NFT_META_PROTOCOL: to match on the ethertype, this can be used regardless tunnel protocol provides no link layer header, in that case nft_inner sets on the ethertype based on the IP header version field. - NFT_META_L4PROTO: to match on the layer 4 protocol. These meta expression are usually autogenerated as dependencies by userspace nftables. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nft_meta.h | 6 ++++ net/netfilter/nft_inner.c | 8 ++++++ net/netfilter/nft_meta.c | 62 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) commit 0e795b37ba044893107f887b037594645a6fc584 Author: Pablo Neira Ayuso Date: Mon Oct 17 13:03:32 2022 +0200 netfilter: nft_inner: add percpu inner context Add NFT_PKTINFO_INNER_FULL flag to annotate that inner offsets are available. Store nft_inner_tun_ctx object in percpu area to cache existing inner offsets for this skbuff. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 1 + include/net/netfilter/nf_tables_core.h | 1 + net/netfilter/nft_inner.c | 26 ++++++++++++++++++++++---- 3 files changed, 24 insertions(+), 4 deletions(-) commit 3a07327d10a09379315c844c63f27941f5081e0a Author: Pablo Neira Ayuso Date: Tue Oct 25 13:48:15 2022 +0200 netfilter: nft_inner: support for inner tunnel header matching This new expression allows you to match on the inner headers that are encapsulated by any of the existing tunneling protocols. This expression parses the inner packet to set the link, network and transport offsets, so the existing expressions (with a few updates) can be reused to match on the inner headers. The inner expression supports for different tunnel combinations such as: - ethernet frame over IPv4/IPv6 packet, eg. VxLAN. - IPv4/IPv6 packet over IPv4/IPv6 packet, eg. IPIP. - IPv4/IPv6 packet over IPv4/IPv6 + transport header, eg. GRE. - transport header (ESP or SCTP) over transport header (usually UDP) The following fields are used to describe the tunnel protocol: - flags, which describe how to parse the inner headers: NFT_PAYLOAD_CTX_INNER_TUN, the tunnel provides its own header. NFT_PAYLOAD_CTX_INNER_ETHER, the ethernet frame is available as inner header. NFT_PAYLOAD_CTX_INNER_NH, the network header is available as inner header. NFT_PAYLOAD_CTX_INNER_TH, the transport header is available as inner header. For example, VxLAN sets on all of these flags. While GRE only sets on NFT_PAYLOAD_CTX_INNER_NH and NFT_PAYLOAD_CTX_INNER_TH. Then, ESP over UDP only sets on NFT_PAYLOAD_CTX_INNER_TH. The tunnel description is composed of the following attributes: - header size: in case the tunnel comes with its own header, eg. VxLAN. - type: this provides a hint to userspace on how to delinearize the rule. This is useful for VxLAN and Geneve since they run over UDP, since transport does not provide a hint. This is also useful in case hardware offload is ever supported. The type is not currently interpreted by the kernel. - expression: currently only payload supported. Follow up patch adds also inner meta support which is required by autogenerated dependencies. The exthdr expression should be supported too at some point. There is a new inner_ops operation that needs to be set on to allow to use an existing expression from the inner expression. This patch adds a new NFT_PAYLOAD_TUN_HEADER base which allows to match on the tunnel header fields, eg. vxlan vni. The payload expression is embedded into nft_inner private area and this private data area is passed to the payload inner eval function via direct call. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 5 + include/net/netfilter/nf_tables_core.h | 24 +++ include/uapi/linux/netfilter/nf_tables.h | 26 +++ net/netfilter/Makefile | 2 +- net/netfilter/nf_tables_api.c | 37 ++++ net/netfilter/nf_tables_core.c | 1 + net/netfilter/nft_inner.c | 336 +++++++++++++++++++++++++++++++ net/netfilter/nft_payload.c | 89 +++++++- 8 files changed, 518 insertions(+), 2 deletions(-) commit 3927ce8850cacc1790cd4c5d02ca42e24df9fa6b Author: Pablo Neira Ayuso Date: Mon Oct 17 13:03:30 2022 +0200 netfilter: nft_payload: access ipip payload for inner offset ipip is an special case, transport and inner header offset are set to the same offset to use the upcoming inner expression for matching on inner tunnel headers. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_payload.c | 3 +++ 1 file changed, 3 insertions(+) commit c247897d7c194e6fb4a7c8314af2226bec017a59 Author: Pablo Neira Ayuso Date: Mon Oct 17 13:03:29 2022 +0200 netfilter: nft_payload: access GRE payload via inner offset Parse GRE v0 packets to properly set up inner offset, this allow for matching on inner headers. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_payload.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit d037abc2414b4539401e0e6aa278bedc4628ad69 Author: Florian Westphal Date: Fri Oct 21 16:17:53 2022 +0200 netfilter: nft_objref: make it builtin nft_objref is needed to reference named objects, it makes no sense to disable it. Before: text data bss dec filename 4014 424 0 4438 nft_objref.o 4174 1128 0 5302 nft_objref.ko 359351 15276 864 375491 nf_tables.ko After: text data bss dec filename 3815 408 0 4223 nft_objref.o 363161 15692 864 379717 nf_tables.ko Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables_core.h | 1 + net/netfilter/Kconfig | 6 ------ net/netfilter/Makefile | 4 ++-- net/netfilter/nf_tables_core.c | 1 + net/netfilter/nft_objref.c | 22 +--------------------- 5 files changed, 5 insertions(+), 29 deletions(-) commit cad3fe56d03e25d9d929b85aa05f208766f4c80d Author: Bo Liu Date: Tue Oct 25 02:04:36 2022 -0400 ipmi: Fix some kernel-doc warnings The current code provokes some kernel-doc warnings: drivers/char/ipmi/ipmi_msghandler.c:618: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Bo Liu Message-Id: <20221025060436.4372-1-liubo03@inspur.com> Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7a1caa67ce62765fe174cae08e537d542bb44f8 Author: Florian Westphal Date: Sat Oct 15 00:20:50 2022 +0200 netfilter: nf_tables: reduce nft_pktinfo by 8 bytes structure is reduced from 32 to 24 bytes. While at it, also check that iphdrlen is sane, this is guaranteed for NFPROTO_IPV4 but not for ingress or bridge, so add checks for this. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 4 ++-- include/net/netfilter/nf_tables_ipv4.h | 4 ++++ include/net/netfilter/nf_tables_ipv6.h | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) commit ac1f8c049319847b1b4c6b387fdb2e3f7fb84ffc Author: Pablo Neira Ayuso Date: Wed Sep 28 23:55:06 2022 +0200 netfilter: nft_payload: move struct nft_payload_set definition where it belongs Not required to expose this header in nf_tables_core.h, move it to where it is used, ie. nft_payload. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables_core.h | 10 ---------- net/netfilter/nft_payload.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) commit 2378be892b6ff53659a81b703c9c3fe4ead5a6d7 Author: Benjamin Mugnier Date: Tue Oct 11 14:30:29 2022 +0200 media: Documentation: Add ST VGXY61 driver documentation Document V4L2_CID_HDR_MODE possible values for this sensor. Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus .../userspace-api/media/drivers/st-vgxy61.rst | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 38d07a960f9bba5ba362036187f5a4eda385146c Author: Benjamin Mugnier Date: Tue Oct 11 14:30:28 2022 +0200 media: dt-bindings: Add ST VGXY61 camera sensor binding Add device tree binding for the ST VGXY61 camera sensor, and update MAINTAINERS file. Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus .../bindings/media/i2c/st,st-vgxy61.yaml | 113 +++++++++++++++++++++ MAINTAINERS | 10 ++ 2 files changed, 123 insertions(+) commit 7673f3058bd2511474491d4f82c2ece09176412c Author: Benjamin Mugnier Date: Tue Oct 11 14:16:02 2022 +0200 media: v4l: ctrls: Add a control for HDR mode Add V4L2_CID_HDR_MODE as a menu item control to set the HDR mode of the sensor, and its documentation. Menu items are not standardized as they differ for each sensors. Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst | 8 ++++++++ drivers/media/v4l2-core/v4l2-ctrls-defs.c | 2 ++ include/uapi/linux/v4l2-controls.h | 2 ++ 3 files changed, 12 insertions(+) commit 48f750e25ab72c36f2b043370175adf602d4a45e Author: Benjamin Mugnier Date: Tue Oct 11 14:16:01 2022 +0200 media: v4l: Add 1X16 16-bit greyscale media bus code definition This extends the greyscale media bus family originally from MEDIA_BUS_FMT_Y8_1X8 up to MEDIA_BUS_FMT_Y14_1X14 by adding MEDIA_BUS_FMT_Y16_1X16, and behaves the same way with 16 bits. Add its documentation in subdev-formats.rst Signed-off-by: Benjamin Mugnier Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus .../userspace-api/media/v4l/subdev-formats.rst | 37 ++++++++++++++++++++++ include/uapi/linux/media-bus-format.h | 3 +- 2 files changed, 39 insertions(+), 1 deletion(-) commit 32a437db49aae789eb4c53450b7deedc43e397ae Author: Mikhail Rudenko Date: Sat Oct 22 19:20:07 2022 +0300 media: i2c: add support for OV4689 Add a V4L2 sub-device driver for OmniVision OV4689 image sensor. This is a 4 Mpx image sensor using the I2C bus for control and the CSI-2 bus for data. This driver supports following features: - manual exposure and analog gain control support - test pattern support - media controller support - runtime PM support - support following resolutions: + 2688x1520 at 30 fps The driver provides all mandatory V4L2 controls for compatibility with libcamera. The sensor supports 1/2/4-lane CSI-2 modes, but the driver implements 4 lane mode only at this moment. Signed-off-by: Mikhail Rudenko Signed-off-by: Sakari Ailus MAINTAINERS | 1 + drivers/media/i2c/Kconfig | 13 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov4689.c | 1026 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1041 insertions(+) commit 6cbd33e75ec829a2c95ba1f4403c804cf1d85c06 Author: Mikhail Rudenko Date: Sat Oct 22 19:20:06 2022 +0300 media: dt-bindings: i2c: document OV4689 Add device-tree binding documentation for OV4689 image sensor driver, and the relevant MAINTAINERS entries. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mikhail Rudenko Signed-off-by: Sakari Ailus .../devicetree/bindings/media/i2c/ovti,ov4689.yaml | 134 +++++++++++++++++++++ MAINTAINERS | 7 ++ 2 files changed, 141 insertions(+) commit 38fc5136ac16fe395577996d860ee55abb963922 Author: Shawn Tu Date: Tue Oct 25 10:27:38 2022 +0800 media: i2c: Add ov08x40 image sensor driver Add a V4L2 sub-device driver for Omnivision ov08X40 image sensor. This is a camera sensor using the I2C bus for control and the CSI-2 bus for data. This driver supports following features: - manual exposure and analog/digital gain control support - vblank/hblank control support - test pattern support - media controller support - runtime PM support - support following resolutions: + 3856x2464 at 30FPS + 1928x1208 at 30FPS Signed-off-by: Jason Chen Signed-off-by: Shawn Tu Signed-off-by: Sakari Ailus MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 13 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov08x40.c | 3327 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 3348 insertions(+) commit f98a5c2e1c4396488c27274ba82afc11725a4bcc Author: Marek Szyprowski Date: Fri Sep 23 11:42:01 2022 +0200 media: exynos4-is: don't rely on the v4l2_async_subdev internals Commit 1f391df44607 ("media: v4l2-async: Use endpoints in __v4l2_async_nf_add_fwnode_remote()") changed the data that is stored in the v4l2_async_subdev internals from the fwnode pointer to the parent device to the fwnode pointer to the matched endpoint. This broke the sensor matching code, which relied on the particular fwnode data in the v4l2_async_subdev internals. Fix this by simply matching the v4l2_async_subdev pointer, which is already available there. Reported-by: Daniel Scally Fixes: fa91f1056f17 ("[media] exynos4-is: Add support for asynchronous subdevices registration") Signed-off-by: Marek Szyprowski Reviewed-by: Daniel Scally Signed-off-by: Sakari Ailus drivers/media/platform/samsung/exynos4-is/media-dev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c95770e4fc172696dcb1450893cda7d6324d96fc Author: Rafael Mendonca Date: Tue Sep 20 11:27:48 2022 -0300 media: i2c: ov5648: Free V4L2 fwnode data on unbind The V4L2 fwnode data structure doesn't get freed on unbind, which leads to a memleak. Fixes: e43ccb0a045f ("media: i2c: Add support for the OV5648 image sensor") Signed-off-by: Rafael Mendonca Reviewed-by: Tommaso Merciai Reviewed-by: Paul Kocialkowski Signed-off-by: Sakari Ailus drivers/media/i2c/ov5648.c | 1 + 1 file changed, 1 insertion(+) commit 08304923d31781f52281290b8248f4b9a8afe29c Author: Hidenori Kobayashi Date: Wed Sep 21 18:24:17 2022 +0900 media: ov8856: Add runtime PM callbacks There were no runtime PM callbacks registered, leaving regulators being enabled while the device is suspended on DT systems. Adjust and register existing power controlling functions to turn them off/on. Signed-off-by: Hidenori Kobayashi Reviewed-by: Tomasz Figa Signed-off-by: Sakari Ailus drivers/media/i2c/ov8856.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit d6dd508080a3cdc0ab34ebf66c3734f2dff907ad Author: Kees Cook Date: Fri Oct 21 19:10:47 2022 -0700 bnx2: Use kmalloc_size_roundup() to match ksize() usage Round up allocations with kmalloc_size_roundup() so that build_skb()'s use of ksize() is always accurate and no special handling of the memory is needed by KASAN, UBSAN_BOUNDS, nor FORTIFY_SOURCE. Cc: Rasesh Mody Cc: GR-Linux-NIC-Dev@marvell.com Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221022021004.gonna.489-kees@kernel.org Signed-off-by: Paolo Abeni drivers/net/ethernet/broadcom/bnx2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 977d97f18b5b8efb7a94da84724113f15ae6cc2d Author: Luben Tuikov Date: Mon Oct 24 17:26:34 2022 -0400 drm/scheduler: Set the FIFO scheduling policy as the default The currently default Round-Robin GPU scheduling can result in starvation of entities which have a large number of jobs, over entities which have a very small number of jobs (single digit). This can be illustrated in the following diagram, where jobs are alphabetized to show their chronological order of arrival, where job A is the oldest, B is the second oldest, and so on, to J, the most recent job to arrive. ---> entities j | H-F-----A--E--I-- o | --G-----B-----J-- b | --------C-------- s\/ --------D-------- WLOG, assuming all jobs are "ready", then a R-R scheduling will execute them in the following order (a slice off of the top of the entities' list), H, F, A, E, I, G, B, J, C, D. However, to mitigate job starvation, we'd rather execute C and D before E, and so on, given, of course, that they're all ready to be executed. So, if all jobs are ready at this instant, the order of execution for this and the next 9 instances of picking the next job to execute, should really be, A, B, C, D, E, F, G, H, I, J, which is their chronological order. The only reason for this order to be broken, is if an older job is not yet ready, but a younger job is ready, at an instant of picking a new job to execute. For instance if job C wasn't ready at time 2, but job D was ready, then we'd pick job D, like this: 0 +1 +2 ... A, B, D, ... And from then on, C would be preferred before all other jobs, if it is ready at the time when a new job for execution is picked. So, if C became ready two steps later, the execution order would look like this: ......0 +1 +2 ... A, B, D, E, C, F, G, H, I, J This is what the FIFO GPU scheduling algorithm achieves. It uses a Red-Black tree to keep jobs sorted in chronological order, where picking the oldest job is O(1) (we use the "cached" structure), and balancing the tree is O(log n). IOW, it picks the *oldest ready* job to execute now. The implementation is already in the kernel, and this commit only changes the default GPU scheduling algorithm to use. This was tested and achieves about 1% faster performance over the Round Robin algorithm. Cc: Christian König Cc: Alex Deucher Cc: Direct Rendering Infrastructure - Development Signed-off-by: Luben Tuikov Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221024212634.27230-1-luben.tuikov@amd.com Signed-off-by: Christian König drivers/gpu/drm/scheduler/sched_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6459838af0c08ea2b38fad6e153576549ca3b92f Merge: 818a26048a29 caea64675d8b Author: Paolo Abeni Date: Tue Oct 25 12:32:59 2022 +0200 Merge branch 'mptcp-socket-option-updates' Mat Martineau says: ==================== mptcp: Socket option updates Patches 1 and 3 refactor a recent socket option helper function for more generic use, and make use of it in a couple of places. Patch 2 adds TCP_FASTOPEN_NO_COOKIE functionality to MPTCP sockets, similar to TCP_FASTOPEN_CONNECT support recently added in v6.1 ==================== Link: https://lore.kernel.org/r/20221022004505.160988-1-mathew.j.martineau@linux.intel.com Signed-off-by: Paolo Abeni commit caea64675d8b91deb59140a92f190124399ccd37 Author: Matthieu Baerts Date: Fri Oct 21 17:45:05 2022 -0700 mptcp: sockopt: use new helper for TCP_DEFER_ACCEPT mptcp_setsockopt_sol_tcp_defer() was doing the same thing as mptcp_setsockopt_first_sf_only() except for the returned code in case of error. Ignoring the error is needed to mimic how TCP_DEFER_ACCEPT is handled when used with "plain" TCP sockets. The specific function for TCP_DEFER_ACCEPT can be replaced by the new mptcp_setsockopt_first_sf_only() helper and errors can be ignored to stay compatible with TCP. A bit of cleanup. Suggested-by: Mat Martineau Reviewed-by: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: Paolo Abeni net/mptcp/sockopt.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit e64d4deb4de006faf7613c6603f5bf1bd1844ab3 Author: Matthieu Baerts Date: Fri Oct 21 17:45:04 2022 -0700 mptcp: add TCP_FASTOPEN_NO_COOKIE support The goal of this socket option is to configure MPTCP + TFO without cookie per socket. It was already possible to enable TFO without a cookie per netns by setting net.ipv4.tcp_fastopen sysctl knob to the right value. Per route was also supported by setting 'fastopen_no_cookie' option. This patch adds a per socket support like it is possible to do with TCP thanks to TCP_FASTOPEN_NO_COOKIE socket option. The only thing to do here is to relay the request to the first subflow like it is already done for TCP_FASTOPEN_CONNECT. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: Paolo Abeni net/mptcp/sockopt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d3d429047cc66ff49780c93e4fccd9527723d385 Author: Matthieu Baerts Date: Fri Oct 21 17:45:03 2022 -0700 mptcp: sockopt: make 'tcp_fastopen_connect' generic There are other socket options that need to act only on the first subflow, e.g. all TCP_FASTOPEN* socket options. This is similar to the getsockopt version. In the next commit, this new mptcp_setsockopt_first_sf_only() helper is used by other another option. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: Paolo Abeni net/mptcp/sockopt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 818a26048a292e290a6b76e3fe2174344824b3b7 Merge: 71920a773e52 6df96146b202 Author: Paolo Abeni Date: Tue Oct 25 11:35:19 2022 +0200 Merge branch 'soreuseport-fix-broken-so_incoming_cpu' Kuniyuki Iwashima says: ==================== soreuseport: Fix broken SO_INCOMING_CPU. setsockopt(SO_INCOMING_CPU) for UDP/TCP is broken since 4.5/4.6 due to these commits: * e32ea7e74727 ("soreuseport: fast reuseport UDP socket selection") * c125e80b8868 ("soreuseport: fast reuseport TCP socket selection") These commits introduced the O(1) socket selection algorithm and removed O(n) iteration over the list, but it ignores the score calculated by compute_score(). As a result, it caused two misbehaviours: * Unconnected sockets receive packets sent to connected sockets * SO_INCOMING_CPU does not work The former is fixed by commit acdcecc61285 ("udp: correct reuseport selection with connected sockets"). This series fixes the latter and adds some tests for SO_INCOMING_CPU. ==================== Link: https://lore.kernel.org/r/20221021204435.4259-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit 6df96146b2025e122447354daf66edbfa88e8a1e Author: Kuniyuki Iwashima Date: Fri Oct 21 13:44:35 2022 -0700 selftest: Add test for SO_INCOMING_CPU. Some highly optimised applications use SO_INCOMING_CPU to make them efficient, but they didn't test if it's working correctly by getsockopt() to avoid slowing down. As a result, no one noticed it had been broken for years, so it's a good time to add a test to catch future regression. The test does 1) Create $(nproc) TCP listeners associated with each CPU. 2) Create 32 child sockets for each listener by calling sched_setaffinity() for each CPU. 3) Check if accept()ed sockets' sk_incoming_cpu matches listener's one. If we see -EAGAIN, SO_INCOMING_CPU is broken. However, we might not see any error even if broken; the kernel could miraculously distribute all SYN to correct listeners. Not to let that happen, we must increase the number of clients and CPUs to some extent, so the test requires $(nproc) >= 2 and creates 64 sockets at least. Test: $ nproc 96 $ ./so_incoming_cpu Before the previous patch: # Starting 12 tests from 5 test cases. # RUN so_incoming_cpu.before_reuseport.test1 ... # so_incoming_cpu.c:191:test1:Expected cpu (5) == i (0) # test1: Test terminated by assertion # FAIL so_incoming_cpu.before_reuseport.test1 not ok 1 so_incoming_cpu.before_reuseport.test1 ... # FAILED: 0 / 12 tests passed. # Totals: pass:0 fail:12 xfail:0 xpass:0 skip:0 error:0 After: # Starting 12 tests from 5 test cases. # RUN so_incoming_cpu.before_reuseport.test1 ... # so_incoming_cpu.c:199:test1:SO_INCOMING_CPU is very likely to be working correctly with 3072 sockets. # OK so_incoming_cpu.before_reuseport.test1 ok 1 so_incoming_cpu.before_reuseport.test1 ... # PASSED: 12 / 12 tests passed. # Totals: pass:12 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni tools/testing/selftests/net/.gitignore | 1 + tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/so_incoming_cpu.c | 242 ++++++++++++++++++++++++++ 3 files changed, 244 insertions(+) commit b261eda84ec136240a9ca753389853a3a1bccca2 Author: Kuniyuki Iwashima Date: Fri Oct 21 13:44:34 2022 -0700 soreuseport: Fix socket selection for SO_INCOMING_CPU. Kazuho Oku reported that setsockopt(SO_INCOMING_CPU) does not work with setsockopt(SO_REUSEPORT) since v4.6. With the combination of SO_REUSEPORT and SO_INCOMING_CPU, we could build a highly efficient server application. setsockopt(SO_INCOMING_CPU) associates a CPU with a TCP listener or UDP socket, and then incoming packets processed on the CPU will likely be distributed to the socket. Technically, a socket could even receive packets handled on another CPU if no sockets in the reuseport group have the same CPU receiving the flow. The logic exists in compute_score() so that a socket will get a higher score if it has the same CPU with the flow. However, the score gets ignored after the blamed two commits, which introduced a faster socket selection algorithm for SO_REUSEPORT. This patch introduces a counter of sockets with SO_INCOMING_CPU in a reuseport group to check if we should iterate all sockets to find a proper one. We increment the counter when * calling listen() if the socket has SO_INCOMING_CPU and SO_REUSEPORT * enabling SO_INCOMING_CPU if the socket is in a reuseport group Also, we decrement it when * detaching a socket out of the group to apply SO_INCOMING_CPU to migrated TCP requests * disabling SO_INCOMING_CPU if the socket is in a reuseport group When the counter reaches 0, we can get back to the O(1) selection algorithm. The overall changes are negligible for the non-SO_INCOMING_CPU case, and the only notable thing is that we have to update sk_incomnig_cpu under reuseport_lock. Otherwise, the race prevents transitioning to the O(n) algorithm and results in the wrong socket selection. cpu1 (setsockopt) cpu2 (listen) +-----------------+ +-------------+ lock_sock(sk1) lock_sock(sk2) reuseport_update_incoming_cpu(sk1, val) . | /* set CPU as 0 */ |- WRITE_ONCE(sk1->incoming_cpu, val) | | spin_lock_bh(&reuseport_lock) | reuseport_grow(sk2, reuse) | . | |- more_socks_size = reuse->max_socks * 2U; | |- if (more_socks_size > U16_MAX && | | reuse->num_closed_socks) | | . | | |- RCU_INIT_POINTER(sk1->sk_reuseport_cb, NULL); | | `- __reuseport_detach_closed_sock(sk1, reuse) | | . | | `- reuseport_put_incoming_cpu(sk1, reuse) | | . | | | /* Read shutdown()ed sk1's sk_incoming_cpu | | | * without lock_sock(). | | | */ | | `- if (sk1->sk_incoming_cpu >= 0) | | . | | | /* decrement not-yet-incremented | | | * count, which is never incremented. | | | */ | | `- __reuseport_put_incoming_cpu(reuse); | | | `- spin_lock_bh(&reuseport_lock) | |- spin_lock_bh(&reuseport_lock) | |- reuse = rcu_dereference_protected(sk1->sk_reuseport_cb, ...) |- if (!reuse) | . | | /* Cannot increment reuse->incoming_cpu. */ | `- goto out; | `- spin_unlock_bh(&reuseport_lock) Fixes: e32ea7e74727 ("soreuseport: fast reuseport UDP socket selection") Fixes: c125e80b8868 ("soreuseport: fast reuseport TCP socket selection") Reported-by: Kazuho Oku Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni include/net/sock_reuseport.h | 2 + net/core/sock.c | 2 +- net/core/sock_reuseport.c | 94 +++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 92 insertions(+), 6 deletions(-) commit ab7720a2b1175b21cace83757a9fd70408156bae Author: Jan Kara Date: Tue Oct 25 11:30:28 2022 +0200 maintainers: Add ISOFS entry We miss ISOFS entry in MAINTAINERS file. Add it and write me as the maintainer there since ISOFS is pretty low effort these days. Less random patches for Andrew to merge ;-). Signed-off-by: Jan Kara MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 71920a773e522b6a34bba957a3aacc99cefa3836 Merge: 34802d0662d1 73da9cac517c Author: Paolo Abeni Date: Tue Oct 25 11:15:21 2022 +0200 Merge branch 'net-ipa-validation-cleanup' Alex Elder says: ==================== net: ipa: validation cleanup This series gathers a set of IPA driver cleanups, mostly involving code that ensures certain things are known to be correct *early* (either at build or initializatin time), so they can be assumed good during normal operation. The first removes three constant symbols, by making a (reasonable) assumption that a routing table consists of entries for the modem followed by entries for the AP, with no unused entries between them. The second removes two checks that are redundant (they verify the sizes of two memory regions are in range, which will have been done earlier for all regions). The third adds some new checks to routing and filter tables that can be done at "init time" (without requiring any access to IPA hardware). The fourth moves a check that routing and filter table addresses can be encoded within certain IPA immediate commands, so it's performed earlier; the checks can be done without touching IPA hardware. The fifth moves some other command-related checks earlier, for the same reason. The sixth removes the definition ipa_table_valid(), because what it does has become redundant. Finally, the last patch moves two more validation calls so they're done very early in the probe process. This will be required by some upcoming patches, which will record the size of the routing and filter tables at this time so they're available for subsequent initialization. ==================== Link: https://lore.kernel.org/r/20221021191340.4187935-1-elder@linaro.org Signed-off-by: Paolo Abeni commit 73da9cac517ce4dc3a00b87f800846dcc2469ddf Author: Alex Elder Date: Fri Oct 21 14:13:40 2022 -0500 net: ipa: check table memory regions earlier Verify that the sizes of the routing and filter table memory regions are valid as part of memory initialization, rather than waiting for table initialization. The main reason to do this is that upcoming patches use these memory region sizes to determine the number of entries in these tables, and we'll want to know these sizes are good sooner. Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni drivers/net/ipa/ipa_mem.c | 6 ++++++ drivers/net/ipa/ipa_table.c | 7 +------ drivers/net/ipa/ipa_table.h | 7 +++++++ 3 files changed, 14 insertions(+), 6 deletions(-) commit 39ad815244ac3746c0194ae3eb45cb1f51d3489a Author: Alex Elder Date: Fri Oct 21 14:13:39 2022 -0500 net: ipa: kill ipa_table_valid() What ipa_table_valid() (and ipa_table_valid_one(), which it calls) does is ensure that the memory regions that hold routing and filter tables have reasonable size. Specifically, it checks that the size of a region is sufficient (or rather, exactly the right size) to hold the maximum number of entries supported by the driver. (There is an additional check that's erroneous, but in practice it is never reached.) Recently ipa_table_mem_valid() was added, which is called by ipa_table_init(). That function verifies that all table memory regions are of sufficient size, and requires hashed tables to have zero size if hashing is not supported. It only ensures the filter table is large enough to hold the number of endpoints that support filtering, but that is adequate. Therefore everything that ipa_table_valid() does is redundant, so get rid of it. Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni drivers/net/ipa/ipa_mem.c | 4 ---- drivers/net/ipa/ipa_table.c | 50 --------------------------------------------- drivers/net/ipa/ipa_table.h | 8 -------- 3 files changed, 62 deletions(-) commit 7fd10a2aca6a2ff3316fac7fb2a72f6e1b303a57 Author: Alex Elder Date: Fri Oct 21 14:13:38 2022 -0500 net: ipa: introduce ipa_cmd_init() Currently, ipa_cmd_data_valid() is called by ipa_mem_config(). Nothing it does requires access to hardware though, so it can be done during the init phase of IPA driver startup. Create a new function ipa_cmd_init(), whose purpose is to do early initialization related to IPA immediate commands. It will call the build-time validation function, then will make the two calls made previously by ipa_cmd_data_valid(). This make ipa_cmd_data_valid() unnecessary, so get rid of it. Rename ipa_cmd_header_valid() to be ipa_cmd_header_init_local_valid(), so its name is clearer about which IPA immediate command it is associated with. Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni drivers/net/ipa/ipa_cmd.c | 31 +++++++++++++++---------------- drivers/net/ipa/ipa_cmd.h | 10 ++++++++++ drivers/net/ipa/ipa_mem.c | 4 ---- 3 files changed, 25 insertions(+), 20 deletions(-) commit 5444b0ea9915132b8a202c2c664630cb99daa969 Author: Alex Elder Date: Fri Oct 21 14:13:37 2022 -0500 net: ipa: verify table sizes fit in commands early We currently verify the table size and offset fit in the immediate command fields that must encode them in ipa_table_valid_one(). We can now make this check earlier, in ipa_table_mem_valid(). The non-hashed IPv4 filter and route tables will always exist, and their sizes will match the IPv6 tables, as well as the hashed tables (if supported). So it's sufficient to verify the offset and size of the IPv4 non-hashed tables fit into these fields. Rename the function ipa_cmd_table_init_valid(), to reinforce that it is the TABLE_INIT immediate command fields we're checking. Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni drivers/net/ipa/ipa_cmd.c | 3 ++- drivers/net/ipa/ipa_cmd.h | 6 +++--- drivers/net/ipa/ipa_table.c | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) commit cf13919654d5fe54974c7bba49c220833c26bce4 Author: Alex Elder Date: Fri Oct 21 14:13:36 2022 -0500 net: ipa: validate IPA table memory earlier Add checks in ipa_table_init() to ensure the memory regions defined for IPA filter and routing tables are valid. For routing tables, the checks ensure: - The non-hashed IPv4 and IPv6 routing tables are defined - The non-hashed IPv4 and IPv6 routing tables are the same size - The number entries in the non-hashed IPv4 routing table is enough to hold the number entries available to the modem, plus at least one usable by the AP. For filter tables, the checks ensure: - The non-hashed IPv4 and IPv6 filter tables are defined - The non-hashed IPv4 and IPv6 filter tables are the same size - The number entries in the non-hashed IPv4 filter table is enough to hold the endpoint bitmap, plus an entry for each defined endpoint that supports filtering. In addition, for both routing and filter tables: - If hashing isn't supported (IPA v4.2), hashed tables are zero size - If hashing *is* supported, all hashed tables are the same size as their non-hashed counterparts. When validating the size of routing tables, require the AP to have at least one entry (in addition to those used by the modem). Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni drivers/net/ipa/ipa_table.c | 98 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 94 insertions(+), 4 deletions(-) commit 2554322b31994d9a6c3ff6eaaaac7d78bac05d82 Author: Alex Elder Date: Fri Oct 21 14:13:35 2022 -0500 net: ipa: remove two memory region checks There's no need to ensure table memory regions fit within the IPA-local memory range. And there's no need to ensure the modem header memory region is in range either. These are verified for all memory regions in ipa_mem_size_valid(), once we have settled on the size of IPA memory. Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni drivers/net/ipa/ipa_cmd.c | 19 ------------------- 1 file changed, 19 deletions(-) commit fb4014ac76b837621a09c2254fa2d67bfbf58e67 Author: Alex Elder Date: Fri Oct 21 14:13:34 2022 -0500 net: ipa: kill two constant symbols The entries in each IPA routing table are divided between the modem and the AP. The modem always gets some number of entries located at the base of the table; the AP gets all those that follow. There's no reason to think the modem will use anything different from the first entries in a routing table, so: - Get rid of IPA_ROUTE_MODEM_MIN (just assume it's 0) - Get rid of IPA_ROUTE_AP_MIN (just assume it's IPA_ROUTE_MODEM_COUNT) And finally: - Open-code IPA_ROUTE_AP_COUNT and remove its definition Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni drivers/net/ipa/ipa_table.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit cc2bbbfd9a5064cb8fc2996962d90b782f906223 Author: Leon Romanovsky Date: Mon Oct 24 20:19:31 2022 +0300 xfrm: Remove not-used total variable Total variable is not used in xfrm_byidx_resize() and can be safely removed. Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2ae18cc2269fc2d05d36bf44a8daa4404fa11dde Author: Heikki Krogerus Date: Mon Oct 24 10:48:46 2022 +0300 thunderbolt: ACPI: Use the helper fwnode_find_reference() Replacing the direct fwnode_property_get_reference_args() call will this wrapper function. No functional changes intended. Signed-off-by: Heikki Krogerus Signed-off-by: Mika Westerberg drivers/thunderbolt/acpi.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 34802d0662d1dc28e5086657f88490a183b009e7 Merge: 6143eca3578f d5ae8ecf3832 Author: Paolo Abeni Date: Tue Oct 25 10:32:42 2022 +0200 Merge branch 'extend-action-skbedit-to-rx-queue-mapping' Amritha Nambiar says: ==================== Extend action skbedit to RX queue mapping Based on the discussion on https://lore.kernel.org/netdev/166260012413.81018.8010396115034847972.stgit@anambiarhost.jf.intel.com/ , the following series extends skbedit tc action to RX queue mapping. Currently, skbedit action in tc allows overriding of transmit queue. Extending this ability of skedit action supports the selection of receive queue for incoming packets. On the receive side, this action is supported only in hardware, so the skip_sw flag is enforced. Enabled ice driver to offload this type of filter into the hardware for accepting packets to the device's receive queue. ==================== Link: https://lore.kernel.org/r/166633888716.52141.3425659377117969638.stgit@anambiarhost.jf.intel.com Signed-off-by: Paolo Abeni commit d5ae8ecf38322f2072bbd46ffd0d0adf309c11f2 Author: Amritha Nambiar Date: Fri Oct 21 00:58:50 2022 -0700 Documentation: networking: TC queue based filtering Add tc-queue-filters.rst with notes on TC filters for selecting a set of queues and/or a queue. Signed-off-by: Amritha Nambiar Signed-off-by: Paolo Abeni Documentation/networking/index.rst | 1 + Documentation/networking/tc-queue-filters.rst | 37 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 143b86f346c709d6fed661aee36cea70ef874815 Author: Amritha Nambiar Date: Fri Oct 21 00:58:45 2022 -0700 ice: Enable RX queue selection using skbedit action This patch uses TC skbedit queue_mapping action to support forwarding packets to a device queue. Such filters with action forward to queue will be the highest priority switch filter in HW. Example: $ tc filter add dev ens4f0 protocol ip ingress flower\ dst_ip 192.168.1.12 ip_proto tcp dst_port 5001\ action skbedit queue_mapping 5 skip_sw The above command adds an ingress filter, incoming packets qualifying the match will be accepted into queue 5. The queue number is in decimal format. Refactored ice_add_tc_flower_adv_fltr() to consolidate code with action FWD_TO_VSI and FWD_TO QUEUE. Reviewed-by: Sridhar Samudrala Reviewed-by: Vinicius Costa Gomes Signed-off-by: Amritha Nambiar Signed-off-by: Paolo Abeni drivers/net/ethernet/intel/ice/ice.h | 15 ++ drivers/net/ethernet/intel/ice/ice_main.c | 2 +- drivers/net/ethernet/intel/ice/ice_tc_lib.c | 351 ++++++++++++++++++++-------- drivers/net/ethernet/intel/ice/ice_tc_lib.h | 40 +++- 4 files changed, 299 insertions(+), 109 deletions(-) commit 4a6a676f8c16ec17d2f8d69ce3b5d680277ed0d2 Author: Amritha Nambiar Date: Fri Oct 21 00:58:39 2022 -0700 act_skbedit: skbedit queue mapping for receive queue Add support for skbedit queue mapping action on receive side. This is supported only in hardware, so the skip_sw flag is enforced. This enables offloading filters for receive queue selection in the hardware using the skbedit action. Traffic arrives on the Rx queue requested in the skbedit action parameter. A new tc action flag TCA_ACT_FLAGS_AT_INGRESS is introduced to identify the traffic direction the action queue_mapping is requested on during filter addition. This is used to disallow offloading the skbedit queue mapping action on transmit side. Example: $tc filter add dev $IFACE ingress protocol ip flower dst_ip $DST_IP\ action skbedit queue_mapping $rxq_id skip_sw Reviewed-by: Sridhar Samudrala Signed-off-by: Amritha Nambiar Signed-off-by: Paolo Abeni include/net/act_api.h | 1 + include/net/flow_offload.h | 2 ++ include/net/tc_act/tc_skbedit.h | 29 +++++++++++++++++++++++++++++ net/sched/act_skbedit.c | 14 ++++++++++++-- net/sched/cls_api.c | 7 +++++++ 5 files changed, 51 insertions(+), 2 deletions(-) commit 7376e561fd2e017e9a53f975209777234b8b434e Author: Sakari Ailus Date: Mon Oct 24 14:16:27 2022 +0300 linux/container_of.h: Warn about loss of constness container_of() casts the original type to another which leads to the loss of the const qualifier if it is not specified in the caller-provided type. This easily leads to container_of() returning a non-const pointer to a const struct which the C compiler does not warn about. Acked-by: Andy Shevchenko Signed-off-by: Sakari Ailus Link: https://lore.kernel.org/r/20221024111627.75183-1-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman include/linux/container_of.h | 1 + 1 file changed, 1 insertion(+) commit 848dba781f1951636c966c9f3a6a41a5b2f8b572 Author: Greg Kroah-Hartman Date: Mon Oct 24 14:39:33 2022 +0200 container_of: remove container_of_safe() It came in from a staging driver that has been long removed from the tree, and there are no in-kernel users of the macro, and it's very dubious if anyone should ever use this thing, so just remove it entirely. Reviewed-by: Sakari Ailus Acked-by: Rafael J. Wysocki Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221024123933.3331116-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman include/linux/container_of.h | 16 ---------------- 1 file changed, 16 deletions(-) commit f7fe25a6f00522791cce38bac552d295339d0c79 Author: Antony Antony Date: Fri Oct 21 15:42:01 2022 +0200 xfrm: update x->lastused for every packet x->lastused was only updated for outgoing mobile IPv6 packet. With this fix update it for every, in and out, packet. This is useful to check if the a SA is still in use, or when was the last time an SA was used. lastused time of in SA can used to check IPsec path is functional. Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert net/xfrm/xfrm_input.c | 1 + net/xfrm/xfrm_output.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) commit f5e32344d472f1021b9d382333f01b356bc8b8b8 Author: Jia He Date: Tue Oct 18 08:22:14 2022 +0000 EDAC/igen6: Return the correct error type when not the MC owner Return -EBUSY instead of -ENODEV just like the other EDAC drivers do. [ bp: Rewrite text. ] Signed-off-by: Jia He Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221018082214.569504-8-justin.he@arm.com drivers/edac/igen6_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7f758fa9b7fda8b91f2e429b2be93ae0b88ac33 Author: William Breathitt Gray Date: Sun Sep 18 12:50:45 2022 -0400 gpio: pci-idio-16: Utilize the idio-16 GPIO library The ACCES PCI-IDIO-16 device is part of the ACCES IDIO-16 family, so the idio-16 GPIO library module is selected and utilized to consolidate code. Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-pci-idio-16.c | 119 +++++----------------------------------- 2 files changed, 14 insertions(+), 106 deletions(-) commit c4ec384cf726379e600764c7f2f7ad487280890a Author: William Breathitt Gray Date: Tue Oct 25 09:57:57 2022 +0200 gpio: 104-idio-16: Utilize the idio-16 GPIO library The ACCES 104-IDIO-16 device is part of the ACCES IDIO-16 family, so the idio-16 GPIO library module is selected and utilized to consolidate code. Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-104-idio-16.c | 88 ++++++++--------------------------------- 2 files changed, 17 insertions(+), 72 deletions(-) commit b9b1fc1ae1191243d3956888c65a280a9b2c847f Author: William Breathitt Gray Date: Sun Sep 18 12:50:43 2022 -0400 gpio: idio-16: Introduce the ACCES IDIO-16 GPIO library module Exposes consumer library functions to facilitate communication with devices within the ACCES IDIO-16 family such as the 104-IDIO-16 and the PCI-IDIO-16. A CONFIG_GPIO_IDIO_16 Kconfig option is introduced by this patch. Modules wanting access to these idio-16 library functions should select this Kconfig option and import the GPIO_IDIO_16 symbol namespace. Cc: Andy Shevchenko Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski MAINTAINERS | 7 +++ drivers/gpio/Kconfig | 9 +++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-idio-16.c | 146 ++++++++++++++++++++++++++++++++++++++++++++ drivers/gpio/gpio-idio-16.h | 71 +++++++++++++++++++++ 5 files changed, 234 insertions(+) commit 6de0cb80e601df16f481a614daa0e84adbf0b552 Author: Jeremy Kerr Date: Mon Oct 24 16:08:28 2022 +0800 gpio: ftgpio010: use device name for gpiochip name & label Currently, we use just the fixed string "FTGPIO010" as the gpiochip name for ftgpio010 drivers. Because it's fixed, this means we cannot distinguish multiple ftgpio010 devices present on a single system. This change uses the dev_name() instead, which should be unique between multiple instances. Signed-off-by: Jeremy Kerr Acked-by: Linus Walleij Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-ftgpio010.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fdc2d490ea1369d17afd7e6eb66fecc5b7209bc Author: Simon Ser Date: Mon Oct 17 15:32:01 2022 +0000 drm/connector: send hotplug uevent on connector cleanup A typical DP-MST unplug removes a KMS connector. However care must be taken to properly synchronize with user-space. The expected sequence of events is the following: 1. The kernel notices that the DP-MST port is gone. 2. The kernel marks the connector as disconnected, then sends a uevent to make user-space re-scan the connector list. 3. User-space notices the connector goes from connected to disconnected, disables it. 4. Kernel handles the IOCTL disabling the connector. On success, the very last reference to the struct drm_connector is dropped and drm_connector_cleanup() is called. 5. The connector is removed from the list, and a uevent is sent to tell user-space that the connector disappeared. The very last step was missing. As a result, user-space thought the connector still existed and could try to disable it again. Since the kernel no longer knows about the connector, that would end up with EINVAL and confused user-space. Fix this by sending a hotplug uevent from drm_connector_cleanup(). Signed-off-by: Simon Ser Cc: stable@vger.kernel.org Cc: Daniel Vetter Cc: Lyude Paul Cc: Jonas Ådahl Tested-by: Jonas Ådahl Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20221017153150.60675-2-contact@emersion.fr drivers/gpu/drm/drm_connector.c | 3 +++ 1 file changed, 3 insertions(+) commit 754c2a528fb974d0a6b310b51e2b3e64a1cf4ab0 Author: Simon Ser Date: Mon Oct 17 15:31:57 2022 +0000 Revert "drm: hide unregistered connectors from GETCONNECTOR IOCTL" This reverts commit 981f09295687f856d5345e19c7084aca481c1395. It turns out this causes logically active but disconnected DP MST connectors to disappear from the KMS resources list, and Mutter then assumes the connector is already disabled. Later on Mutter tries to re-use the same CRTC but fails since on the kernel side it's still tied to the disconnected DP MST connector. Signed-off-by: Simon Ser Tested-by: Jonas Ådahl Reviewed-by: Lyude Paul Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221017153150.60675-1-contact@emersion.fr drivers/gpu/drm/drm_mode_config.c | 3 --- 1 file changed, 3 deletions(-) commit 0f6e8d8c94a82e85e1b9b62a7671990740dc6f70 Author: Tang Bin Date: Tue Sep 13 14:37:00 2022 +0800 venus: pm_helpers: Fix error check in vcodec_domains_get() In the function vcodec_domains_get(), dev_pm_domain_attach_by_name() may return NULL in some cases, so IS_ERR() doesn't meet the requirements. Thus fix it. Fixes: 7482a983dea3 ("media: venus: redesign clocks and pm domains control") Signed-off-by: Tang Bin drivers/media/platform/qcom/venus/pm_helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9fce241660f37d9e95e93c0ae6fba8cfefa5797b Author: Ricardo Ribalda Date: Wed Sep 21 13:38:00 2022 +0200 media: i2c: ad5820: Fix error path Error path seems to be swaped. Fix the order and provide some meaningful names. Fixes: bee3d5115611 ("[media] ad5820: Add driver for auto-focus coil") Signed-off-by: Ricardo Ribalda Signed-off-by: Sakari Ailus drivers/media/i2c/ad5820.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9084e2c8617a63c478b48810ff7a8985de55f308 Author: Lad Prabhakar Date: Mon Sep 19 15:33:50 2022 +0100 media: i2c: ov5645: Drop fetching the clk reference by name The OV5645 sensor has a single clock source, so just drop fetching the clk reference by name. This is in preparation to drop the "clock-names" property from the DT binding. Suggested-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus drivers/media/i2c/ov5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80113026d415e27483669db7a88b548d1ec3d3d1 Author: Rafael Mendonca Date: Sun Sep 18 23:12:51 2022 -0300 media: i2c: hi846: Fix memory leak in hi846_parse_dt() If any of the checks related to the supported link frequencies fail, then the V4L2 fwnode resources don't get released before returning, which leads to a memleak. Fix this by properly freeing the V4L2 fwnode data in a designated label. Fixes: e8c0882685f9 ("media: i2c: add driver for the SK Hynix Hi-846 8M pixel camera") Signed-off-by: Rafael Mendonca Reviewed-by: Tommaso Merciai Reviewed-by: Martin Kepplinger Signed-off-by: Sakari Ailus drivers/media/i2c/hi846.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit c2079f3e220e2f0b551715ee748a0cc936a4a7f6 Author: Sakari Ailus Date: Mon Sep 19 13:07:30 2022 +0300 media: v4l: subdev: Document s_power() callback is deprecated Runtime PM has been around for a decade or more, there's hardly a need to use the V4L2 specific s_power() callback in drivers anymore. Document this in s_power() callback documentation as well. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart include/media/v4l2-subdev.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a8278ad796edc1ea0409abcb4e9c6453da87cef8 Author: Laurent Pinchart Date: Fri Sep 9 00:40:09 2022 +0300 media: Fix documentation typos in media-entity.h Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus include/media/media-entity.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dc608edf7d45ba0c2ad14c06eccd66474fec7847 Author: Maximilian Luz Date: Thu Sep 8 00:44:09 2022 +0200 ipu3-imgu: Fix NULL pointer dereference in imgu_subdev_set_selection() Calling v4l2_subdev_get_try_crop() and v4l2_subdev_get_try_compose() with a subdev state of NULL leads to a NULL pointer dereference. This can currently happen in imgu_subdev_set_selection() when the state passed in is NULL, as this method first gets pointers to both the "try" and "active" states and only then decides which to use. The same issue has been addressed for imgu_subdev_get_selection() with commit 30d03a0de650 ("ipu3-imgu: Fix NULL pointer dereference in active selection access"). However the issue still persists in imgu_subdev_set_selection(). Therefore, apply a similar fix as done in the aforementioned commit to imgu_subdev_set_selection(). To keep things a bit cleaner, introduce helper functions for "crop" and "compose" access and use them in both imgu_subdev_set_selection() and imgu_subdev_get_selection(). Fixes: 0d346d2a6f54 ("media: v4l2-subdev: add subdev-wide state struct") Cc: stable@vger.kernel.org # for v5.14 and later Signed-off-by: Maximilian Luz Signed-off-by: Sakari Ailus drivers/staging/media/ipu3/ipu3-v4l2.c | 57 ++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 23 deletions(-) commit 1eee6bb9b64bb3a914433bb7ec739d2e67cba5bd Author: Stanimir Varbanov Date: Wed Oct 5 11:37:30 2022 +0300 venus: firmware: Correct assertion of reset bit on remote processor Currently we use read/write_relaxed in combination with mb() to assert reset. This looks wrong because mb() after write_relaxed() will not order correctly load-update-store sequence. Correct this by use readl/writel which include memory barriers. Signed-off-by: Stanimir Varbanov drivers/media/platform/qcom/venus/firmware.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit a837e5161cfffbb3242cc0eb574f8bf65fd32640 Author: Stanimir Varbanov Date: Wed Oct 5 11:37:29 2022 +0300 venus: firmware: Correct non-pix start and end addresses The default values for those registers are zero. Signed-off-by: Stanimir Varbanov drivers/media/platform/qcom/venus/firmware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd32d0851c1d9879a4c792a31319b45e94ed3801 Author: Stanimir Varbanov Date: Wed Oct 5 11:37:28 2022 +0300 venus: firmware: Correct reset bit The reset bit for A9SS reset register is BIT(4) and for XTSS_SW_RESET it is BIT(0). Use the defines for those reset bits. Signed-off-by: Stanimir Varbanov drivers/media/platform/qcom/venus/firmware.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 15886e59cb3c04fd7705967e2905335f68446c17 Author: Stanimir Varbanov Date: Tue Oct 25 10:06:07 2022 +0300 MAINTAINERS: Change email for Venus driver My email at linaro.org will not be active soon, so change with my private email. Signed-off-by: Stanimir Varbanov Acked-by: Hans Verkuil MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee357294a85b1b0ae4dbd87ec68551c452812a1f Author: Vikash Garodia Date: Tue Sep 13 17:39:00 2022 +0530 MAINTAINERS: Add Vikash as VENUS video driver co-maintainer For the past several amendments in video driver, I have been working with Stanimir in multiple design discussions or handling a given issue. With this, adding myself as a co-maintainer. Signed-off-by: Vikash Garodia Acked-by: Stanimir Varbanov Acked-by: Hans Verkuil MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 3265949f7cd36a724a35020202c618094be1cf28 Author: Xiu Jianfeng Date: Fri Oct 21 17:36:02 2022 +0800 apparmor: Fix memleak issue in unpack_profile() Before aa_alloc_profile(), it has allocated string for @*ns_name if @tmpns is not NULL, so directly return -ENOMEM if aa_alloc_profile() failed will cause a memleak issue, and even if aa_alloc_profile() succeed, in the @fail_profile tag of aa_unpack(), it need to free @ns_name as well, this patch fixes them. Fixes: 736ec752d95e ("AppArmor: policy routines for loading and unpacking policy") Fixes: 04dc715e24d0 ("apparmor: audit policy ns specified in policy load") Signed-off-by: Xiu Jianfeng Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 7dd426e33e2f9275ac03a306efdc89aa86515a52 Author: Gaosheng Cui Date: Tue Oct 25 11:59:30 2022 +0800 apparmor: fix a memleak in free_ruleset() When the aa_profile is released, we will call free_ruleset to release aa_ruleset, but we don't free the memory of aa_ruleset, so there will be memleak, fix it. unreferenced object 0xffff8881475df800 (size 1024): comm "apparmor_parser", pid 883, jiffies 4294899650 (age 9114.088s) hex dump (first 32 bytes): 00 f8 5d 47 81 88 ff ff 00 f8 5d 47 81 88 ff ff ..]G......]G.... 00 00 00 00 00 00 00 00 00 dc 65 47 81 88 ff ff ..........eG.... backtrace: [<00000000370e658e>] __kmem_cache_alloc_node+0x182/0x700 [<00000000f2f5a6d2>] kmalloc_trace+0x2c/0x130 [<00000000c5c905b3>] aa_alloc_profile+0x1bc/0x5c0 [<00000000bc4fa72b>] unpack_profile+0x319/0x30c0 [<00000000eab791e9>] aa_unpack+0x307/0x1450 [<000000002c3a6ee1>] aa_replace_profiles+0x1b8/0x3790 [<00000000d0c3fd54>] policy_update+0x35a/0x890 [<00000000d04fed90>] profile_replace+0x1d1/0x260 [<00000000cba0c0a7>] vfs_write+0x283/0xd10 [<000000006bae64a5>] ksys_write+0x134/0x260 [<00000000b2fd8f31>] __x64_sys_write+0x78/0xb0 [<00000000f3c8a015>] do_syscall_64+0x5c/0x90 [<00000000a242b1db>] entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 217af7e2f4de ("apparmor: refactor profile rules and attachments") Signed-off-by: Gaosheng Cui Signed-off-by: John Johansen security/apparmor/policy.c | 1 + 1 file changed, 1 insertion(+) commit d44c692350d9a376abab46aa0d70587951971068 Author: Yang Li Date: Fri Oct 14 16:42:55 2022 +0800 apparmor: Fix spelling of function name in comment block 'resouce' -> 'resource' Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2396 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: John Johansen security/apparmor/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37923d4321b1e38170086da2c117f78f2b0f49c6 Author: Xiu Jianfeng Date: Fri Oct 21 08:46:04 2022 +0800 apparmor: Use pointer to struct aa_label for lbs_cred According to the implementations of cred_label() and set_cred_label(), we should use pointer to struct aa_label for lbs_cred instead of struct aa_task_ctx, this patch fixes it. Fixes: bbd3662a8348 ("Infrastructure management of the cred security blob") Signed-off-by: Xiu Jianfeng Signed-off-by: John Johansen security/apparmor/lsm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2217387c3ec09117b3b6eaa5ec8a0d7d347d4ba Author: Jiapeng Chong Date: Sat Oct 8 14:34:11 2022 +0800 AppArmor: Fix kernel-doc security/apparmor/ipc.c:53: warning: expecting prototype for audit_cb(). Prototype was for audit_signal_cb() instead. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2337 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: John Johansen security/apparmor/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 391f121150a5191c932e02775b6e29e59a3f5a94 Author: Jiapeng Chong Date: Sat Oct 8 14:34:10 2022 +0800 LSM: Fix kernel-doc security/apparmor/lsm.c:753: warning: expecting prototype for apparmor_bprm_committed_cred(). Prototype was for apparmor_bprm_committed_creds() instead. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2338 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: John Johansen security/apparmor/lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64a27ba984342d6c5cf5facc278de5c5df1fd3ff Author: Jiapeng Chong Date: Sat Oct 8 14:34:09 2022 +0800 AppArmor: Fix kernel-doc security/apparmor/audit.c:93: warning: expecting prototype for audit_base(). Prototype was for audit_pre() instead. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2339 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: John Johansen security/apparmor/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 665b1856dc2399828d8ee07a18d4fd79868e729a Author: John Johansen Date: Mon Oct 3 06:06:26 2022 -0700 apparmor: Fix loading of child before parent Unfortunately it is possible for some userspace's to load children profiles before the parent profile. This can even happen when the child and the parent are in different load sets. Fix this by creating a null place holder profile that grants no permissions and can be replaced by the parent once it is loaded. Signed-off-by: John Johansen security/apparmor/policy.c | 87 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 9 deletions(-) commit ee31d5038c06b56ea515f4fe490274628c0f80e1 Author: Ivan Bornyakov Date: Tue Oct 25 08:39:47 2022 +0300 dt-bindings: fpga: document Lattice sysCONFIG FPGA manager Add Device Tree Binding doc for configuring Lattice ECP5 FPGA over Slave SPI sysCONFIG interface. Signed-off-by: Ivan Bornyakov Reviewed-by: Krzysztof Kozlowski Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20221025053947.2737-3-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun .../bindings/fpga/lattice,sysconfig.yaml | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 463dd43bc976d1dfaba5cd46b2a10addf8d3b4de Author: Ivan Bornyakov Date: Tue Oct 25 08:39:46 2022 +0300 fpga: lattice-sysconfig-spi: add Lattice sysCONFIG FPGA manager Add support to the FPGA manager for programming Lattice ECP5 FPGA over slave SPI sysCONFIG interface. sysCONFIG interface core functionality is separate from both ECP5 and SPI specifics, so support for other FPGAs with different port types can be added in the future. Signed-off-by: Ivan Bornyakov Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20221025053947.2737-2-i.bornyakov@metrotek.ru [yilun.xu@intel.com: remove redundant blank line after kmemdup] Signed-off-by: Xu Yilun drivers/fpga/Kconfig | 11 + drivers/fpga/Makefile | 2 + drivers/fpga/lattice-sysconfig-spi.c | 152 ++++++++++++++ drivers/fpga/lattice-sysconfig.c | 397 +++++++++++++++++++++++++++++++++++ drivers/fpga/lattice-sysconfig.h | 39 ++++ 5 files changed, 601 insertions(+) commit 7872d4236f74ad6df4d2c9189b66f95157e24a9b Author: Yang Yingliang Date: Mon Sep 26 22:17:29 2022 +0800 fpga: zynq: 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 Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20220926141729.2292311-1-yangyingliang@huawei.com Signed-off-by: Xu Yilun drivers/fpga/zynq-fpga.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 686d348476ee8006087cfcbef591e28f4f91bd8b Author: Li Zhijian Date: Mon Oct 24 03:31:54 2022 +0000 RDMA/rxe: Remove unnecessary mr testing Before the testing, we already passed it to rxe_mr_copy() where mr could be dereferenced. so this checking is not needed. The only way that mr is NULL is when it reaches below line 780 with 'qp->resp.mr = NULL', which is not possible in Bob's explanation[1]. 778 if (res->state == rdatm_res_state_new) { 779 if (!res->replay) { 780 mr = qp->resp.mr; 781 qp->resp.mr = NULL; 782 } else { [1] https://lore.kernel.org/lkml/30ff25c4-ce66-eac4-eaa2-64c0db203a19@gmail.com/ Link: https://lore.kernel.org/r/1666582315-2-1-git-send-email-lizhijian@fujitsu.com CC: Bob Pearson Signed-off-by: Li Zhijian Reviewed-by: Bob Pearson Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_resp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5ac814e02ece516761d2e244cef93843df911ae0 Author: Daisuke Matsuda Date: Thu Oct 13 10:47:24 2022 +0900 RDMA/rxe: Handle remote errors in the midst of a Read reply sequence Requesting nodes do not handle a reported error correctly if it is generated in the middle of multi-packet Read responses, and the node tries to resend the request endlessly. Let completer terminate the connection in that case. Link: https://lore.kernel.org/r/20221013014724.3786212-2-matsuda-daisuke@fujitsu.com Signed-off-by: Daisuke Matsuda Reviewed-by: Li Zhijian Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_comp.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5ebc548f4f54fe971d741d80cd108f1a45c9e88d Author: Daisuke Matsuda Date: Thu Oct 13 10:47:23 2022 +0900 RDMA/rxe: Make responder handle RDMA Read failures Currently, responder can reply packets with invalid payloads if it fails to copy messages to the packets. Add an error handling in read_reply() to inform a requesting node of the failure. Link: https://lore.kernel.org/r/20221013014724.3786212-1-matsuda-daisuke@fujitsu.com Suggested-by: Li Zhijian Signed-off-by: Daisuke Matsuda Reviewed-by: Li Zhijian Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_resp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 58f89ce58bb4f5cf5963b20a19aaa2431b0412d8 Author: John Johansen Date: Mon Oct 3 02:48:24 2022 -0700 apparmor: refactor code that alloc null profiles Bother unconfined and learning profiles use the null profile as their base. Refactor so they are share a common base routine. This doesn't save much atm but will be important when the feature set of the parent is inherited. Signed-off-by: John Johansen security/apparmor/domain.c | 12 +++++----- security/apparmor/include/policy.h | 6 +++-- security/apparmor/policy.c | 47 ++++++++++++++++++++++++++------------ security/apparmor/policy_ns.c | 6 +---- 4 files changed, 43 insertions(+), 28 deletions(-) commit 1f2bc06a8dbff73957f433b22c6fd35fccfb47a4 Author: Gaosheng Cui Date: Mon Sep 26 19:48:38 2022 +0800 apparmor: fix obsoleted comments for aa_getprocattr() and audit_resource() Update the comments for aa_getprocattr() and audit_resource(), the args of them have beed changed since commit 76a1d263aba3 ("apparmor: switch getprocattr to using label_print fns()"). Signed-off-by: Gaosheng Cui Signed-off-by: John Johansen security/apparmor/procattr.c | 11 +++++------ security/apparmor/resource.c | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-) commit 2f7a29debae2efef94b981377fa3622986cd57f5 Author: Gaosheng Cui Date: Mon Sep 26 10:28:39 2022 +0800 apparmor: remove useless static inline functions Remove the following useless static inline functions: 1. label_is_visible() is a static function in security/apparmor/label.c, and it's not used, aa_ns_visible() can do the same things as it, so it's redundant. 2. is_deleted() is a static function in security/apparmor/file.c, and it's not used since commit aebd873e8d3e ("apparmor: refactor path name lookup and permission checks around labels"), so it's redundant. They are redundant, so remove them. Signed-off-by: Gaosheng Cui Signed-off-by: John Johansen security/apparmor/file.c | 13 ------------- security/apparmor/label.c | 6 ------ 2 files changed, 19 deletions(-) commit 6143eca3578f486e4d58fe6fb5e96a5699c86fbc Merge: 1b3d6ecd4157 bd1432f68ddc Author: Jakub Kicinski Date: Mon Oct 24 21:06:29 2022 -0700 Merge branch 'net-sfp-improve-high-power-module-implementation' Russell King says: ==================== net: sfp: improve high power module implementation This series aims to improve the power level switching between standard level 1 and the higher power levels. The first patch updates the DT binding documentation to include the minimum and default of 1W, which is the base level that every SFP cage must support. Hence, it makes sense to document this in the binding. The second patch enforces a minimum of 1W when parsing the firmware description, and optimises the code for that case; there's no need to check for SFF8472 compliance since we will not need to touch the A2h registers. Patch 3 validates that the module supports SFF-8472 rev 10.2 before checking for power level 2 - rev 10.2 is where support for power levels was introduced, so if the module doesn't support this revision, it doesn't support power levels. Setting the power level 2 declaration bit is likely to be spurious. Patch 4 does the same for power level 3, except this was introduced in SFF-8472 rev 11.9. The revision code was never updated, so we use the rev 11.4 to signify this. Patch 5 cleans up the code - rather than using BIT(0), we now use a properly named value for the power level select bit. Patch 6 introduces a read-modify-write helper. Patch 7 gets rid of the DM7052 hack (which sets a power level declaration bit but is not compatible with SFF-8472 rev 10.2, and the module does not implement the A2h I2C address.) Series tested with my DM7052. v2: update sff.sfp.yaml with Rob's feedback ==================== Andrew's review tags from v1. Link: https://lore.kernel.org/r/Y0%2F7dAB8OU3jrbz6@shell.armlinux.org.uk Link: https://lore.kernel.org/r/Y1K17UtfFopACIi2@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit bd1432f68ddc28bf3ed6e86b16ed29c0b406f91f Author: Russell King (Oracle) Date: Fri Oct 21 16:10:09 2022 +0100 net: sfp: get rid of DM7052 hack when enabling high power Since we no longer mis-detect high-power mode with the DM7052 module, we no longer need the hack in sfp_module_enable_high_power(), and can now switch this to use sfp_modify_u8(). Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/phy/sfp.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit a3c536fc75803b298fd6ba75af33eecf43d31785 Author: Russell King (Oracle) Date: Fri Oct 21 16:10:04 2022 +0100 net: sfp: add sfp_modify_u8() helper Add a helper to modify bits in a single byte in memory space, and use it when updating the soft tx-disable flag in the module. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/phy/sfp.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit 398900498485fa9465386454681763d81efaad25 Author: Russell King (Oracle) Date: Fri Oct 21 16:09:59 2022 +0100 net: sfp: provide a definition for the power level select bit Provide a named definition for the power level select bit in the extended status register, rather than using BIT(0) in the code. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/phy/sfp.c | 6 +++--- include/linux/sfp.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) commit f8810ca7582933e436e6c987808bbcc14f5543df Author: Russell King (Oracle) Date: Fri Oct 21 16:09:54 2022 +0100 net: sfp: ignore power level 3 prior to SFF-8472 Rev 11.4 Power level 3 was included in SFF-8472 revision 11.9, but this does not have a compliance code. Use revision 11.4 as the minimum compliance level instead. This should avoid any spurious indication of 2W modules. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/phy/sfp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 18cc659e95ab1661254bde815fc9345246d98906 Author: Russell King (Oracle) Date: Fri Oct 21 16:09:49 2022 +0100 net: sfp: ignore power level 2 prior to SFF-8472 Rev 10.2 Power level 2 was introduced by SFF-8472 revision 10.2. Ignore the power declaration bit for modules that are not compliant with at least this revision. This should remove any spurious indication of 1.5W modules. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/phy/sfp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 02eaf5a79100468425fae2d0baf144b6068fc4cc Author: Russell King (Oracle) Date: Fri Oct 21 16:09:43 2022 +0100 net: sfp: check firmware provided max power Check that the firmware provided maximum power is at least 1W, which is the minimum power level for any SFP module. Now that we enforce the minimum of 1W, we can exit early from sfp_module_parse_power() if the module power is 1W or less. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/phy/sfp.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit a272bcb9e5ef0cce6bbfe52e52c9fc69bb90e1ca Author: Russell King (Oracle) Date: Fri Oct 21 16:09:38 2022 +0100 dt-bindings: net: sff,sfp: update binding Add a minimum and default for the maximum-power-milliwatt option; module power levels were originally up to 1W, so this is the default and the minimum power level we can have for a functional SFP cage. Signed-off-by: Russell King (Oracle) Reviewed-by: Rob Herring Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/sff,sfp.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1b3d6ecd4157ed824842db6387454e85a79ca00e Merge: 96917bb3a377 45034224623a Author: Jakub Kicinski Date: Mon Oct 24 19:24:19 2022 -0700 Merge branch 'bnxt_en-driver-updates' Michael Chan says: ==================== bnxt_en: Driver updates This patchset adds .get_module_eeprom_by_page() support and adds an NVRAM resize step to allow larger firmware images to be flashed to older firmware. ==================== Link: https://lore.kernel.org/r/1666334243-23866-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 45034224623a5634e4ccc57b497ac825c260170f Author: Vikas Gupta Date: Fri Oct 21 02:37:23 2022 -0400 bnxt_en: check and resize NVRAM UPDATE entry before flashing Resize of the UPDATE entry is required if the image to be flashed is larger than the available space. Add this step, otherwise flashing larger firmware images by ethtool or devlink may fail. Reviewed-by: Andy Gospodarek Signed-off-by: Vikas Gupta Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 7ef3d3901b99d9715840c9860082bec124beed83 Author: Vikas Gupta Date: Fri Oct 21 02:37:22 2022 -0400 bnxt_en: add .get_module_eeprom_by_page() support Add support for .get_module_eeprom_by_page() callback which implements generic solution for module`s eeprom access. v3: Add bnxt_get_module_status() to get a more specific extack error string. Return -EINVAL from bnxt_get_module_eeprom_by_page() when we don't want to fallback to old method. v2: Simplification suggested by Ido Schimmel Link: https://lore.kernel.org/netdev/YzVJ%2FvKJugoz15yV@shredder/ Signed-off-by: Vikas Gupta Signed-off-by: Michael Chan Reviewed-by: Ido Schimmel Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 77 ++++++++++++++++++++--- 2 files changed, 71 insertions(+), 7 deletions(-) commit 84a911db83055e2d4c9d0171f116a47711014374 Author: Michael Chan Date: Fri Oct 21 02:37:21 2022 -0400 bnxt_en: Update firmware interface to 1.10.2.118 The main changes are PTM timestamp support, CMIS EEPROM support, and asymmetric CoS queues support. Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 234 +++++++++++++++++++------- 1 file changed, 169 insertions(+), 65 deletions(-) commit bb0e9c600ce23a308b31e73d10b56e70a5721088 Author: Tudor Ambarus Date: Thu Jul 28 06:01:59 2022 +0300 mtd: spi-nor: core: Add an error message when failing to exit the 4-byte address mode Add an error message when failing to exit the 4-byte address mode. Do not stop the execution and go through the spi_nor_soft_reset() method if used, in the hope that the flash will default to 3-byte address mode after the reset. Suggested-by: Pratyush Yadav Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20220728030159.68680-1-tudor.ambarus@microchip.com drivers/mtd/spi-nor/core.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 2fe99a867050bc3506a4595acc01375a48a1b87e Author: Tudor Ambarus Date: Thu Jul 28 07:14:51 2022 +0300 mtd: spi-nor: micron-st.c: Replace hardcoded values for addr_nbytes/addr_mode_nbytes We track in the core the internal address mode of the flash. Stop using hardcoded values for the number of bytes of address and use nor->addr_nbytes and nor->params->addr_mode_nbytes instead. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20220728041451.85559-3-tudor.ambarus@microchip.com drivers/mtd/spi-nor/micron-st.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 05ebc1ccb8affcbaaa9f8b8fe56839cbfc9b9144 Author: Tudor Ambarus Date: Thu Jul 28 07:14:50 2022 +0300 mtd: spi-nor: spansion: Replace hardcoded values for addr_nbytes/addr_mode_nbytes We track in the core the internal address mode of the flash. Stop using hardcoded values for the number of bytes of address and use nor->addr_nbytes and nor->params->addr_mode_nbytes instead. Signed-off-by: Tudor Ambarus Tested-by: Takahiro Kuwano Link: https://lore.kernel.org/r/20220728041451.85559-2-tudor.ambarus@microchip.com drivers/mtd/spi-nor/spansion.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit aff1fa414a85f63f4ef5af75a9d1dc7e8f840e86 Author: Takahiro Kuwano Date: Wed Aug 31 13:59:06 2022 +0900 mtd: spi-nor: spansion: Add s28hl512t, s28hl01gt, and s28hs01gt info Add flash info table entries for s28hl512gt, s28hl01gt, and s28hs01gt. These devices have the same functionality as s28hs512t. Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/6350ac204c58b94b30d70c529bf194d953085ac6.1661915569.git.Takahiro.Kuwano@infineon.com drivers/mtd/spi-nor/spansion.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 06051322704bf38cbd721e14bdbd6e43c8e6d7e1 Author: Takahiro Kuwano Date: Wed Aug 31 13:59:05 2022 +0900 mtd: spi-nor: spansion: Rename s28hs512t prefix Change prefix to support all other devices in SEMPER S28 family. Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/8cf6bc9bffd50e486867c0817de1fa56c5d308ec.1661915569.git.Takahiro.Kuwano@infineon.com drivers/mtd/spi-nor/spansion.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit db391efe765cc6cfc0ffc8d8ef146dc8e6816a7e Author: Takahiro Kuwano Date: Wed Aug 31 13:59:04 2022 +0900 mtd: spi-nor: spansion: Remove NO_SFDP_FLAGS from s28hs512t info Read, Page Program, and Sector Erase settings are done in SFDP so we can remove NO_SFDP_FLAGS from s28hs512t info. Since the default_init() is no longer called after removing NO_SFDP_FLAGS, the initialization in the default_init() is moved to late_init(). Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/12e468992f5d0cbd474abff3203100cc8163d4e5.1661915569.git.Takahiro.Kuwano@infineon.com drivers/mtd/spi-nor/spansion.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit d189614f24799ce150eaf3ecca8483c0a3697e9b Author: Takahiro Kuwano Date: Wed Aug 31 13:59:03 2022 +0900 mtd: spi-nor: sfdp: Update params->hwcaps.mask at xSPI profile 1.0 table parse Existece of xSPI profile 1.0 table implies that the flash supports read and program in 8D-8D-8D mode. Update the params->hwcaps.mask in spi_nor_parase_profile1(). Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/1b449bae6978f11f7636f2b5acb6435723963f59.1661915569.git.Takahiro.Kuwano@infineon.com drivers/mtd/spi-nor/sfdp.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8f1ee9ef71d0c0b185d2afc800e68d6addf29fe5 Author: Sai Krishna Potthuri Date: Thu Sep 8 12:14:28 2022 +0530 mtd: spi-nor: Add support for flash reset Add support for spi-nor flash reset via GPIO controller by reading the reset-gpio property. If there is a valid GPIO specifier then reset will be performed by asserting and deasserting the GPIO using gpiod APIs otherwise it will not perform any operation. Signed-off-by: Sai Krishna Potthuri Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20220908064428.2962-3-sai.krishna.potthuri@amd.com drivers/mtd/spi-nor/core.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 7f2937efe18630832c8eae7a74e8c19fc1e7936e Author: Sai Krishna Potthuri Date: Thu Sep 8 12:14:27 2022 +0530 dt-bindings: mtd: spi-nor: Add reset-gpios property SPI-NOR flashes have RESET pin which can be toggled using GPIO controller, for those platforms reset-gpios property can be used to reset the flash device. Signed-off-by: Sai Krishna Potthuri Signed-off-by: Tudor Ambarus Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220908064428.2962-2-sai.krishna.potthuri@amd.com Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit b837d3db9a37bb07c845f4e69c34640a5d05ae22 Merge: 247f34f7b803 7c99616e3fe7 Author: Dave Airlie Date: Tue Oct 25 11:42:01 2022 +1000 Merge tag 'drm-misc-next-2022-10-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 6.2: UAPI Changes: - Documentation for page-flip flags Cross-subsystem Changes: - dma-buf: Add unlocked variant of vmapping and attachment-mapping functions Core Changes: - atomic-helpers: CRTC primary plane test fixes - connector: TV API consistency improvements, cmdline parsing improvements - crtc-helpers: Introduce drm_crtc_helper_atomic_check() helper - edid: Fixes for HFVSDB parsing, - fourcc: Addition of the Vivante tiled modifier - makefile: Sort and reorganize the objects files - mode_config: Remove fb_base from drm_mode_config_funcs - sched: Add a module parameter to change the scheduling policy, refcounting fix for fences - tests: Sort the Kunit tests in the Makefile, improvements to the DP-MST tests - ttm: Remove unnecessary drm_mm_clean() call Driver Changes: - New driver: ofdrm - Move all drivers to a common dma-buf locking convention - bridge: - adv7533: Remove dynamic lane switching - it6505: Runtime PM support - ps8640: Handle AUX defer messages - tc358775: Drop soft-reset over I2C - ast: Atomic Gamma LUT Support, Convert to SHMEM, various improvements - lcdif: Support for YUV planes - mgag200: Fix PLL Setup on some revisions - udl: Modesetting improvements, hot-unplug support - vc4: Fix support for PAL-M Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221020072405.g3o4hxuk75gmeumw@houat commit 5f8a3f65fc55272e5915d0edea9c691743a02e15 Author: Alan Previn Date: Wed Oct 19 00:29:30 2022 -0700 drm/i915/guc: Add compute reglist for guc err capture We missed this at initial upstream because at that time none of the GuC enabled platforms had a compute engine. Add this now. Signed-off-by: Alan Previn Reviewed-by: John Harrison Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221019072930.17755-3-alan.previn.teres.alexis@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 4 ++++ 1 file changed, 4 insertions(+) commit a894077890ad118de88c97c03f67a611ca60882a Author: Alan Previn Date: Wed Oct 19 00:29:29 2022 -0700 drm/i915/guc: Add error-capture init warnings when needed If GuC is being used and we initialized GuC-error-capture, we need to be warning if we don't provide an error-capture register list in the firmware ADS, for valid GT engines. A warning makes sense as this would impact debugability without realizing why a reglist wasn't retrieved and reported by GuC. However, depending on the platform, we might have certain engines that have a register list for engine instance error state but not for engine class. Thus, add a check only to warn if the register list was non existent vs an empty list (use the empty lists to skip the warning). NOTE: if a future platform were to introduce new registers in place of what was an empty list on existing / legacy hardware engines no warning is provided as the empty list is meant to be used intentionally. As an example, if a future hardware were to add blitter engine-class-registers (new) on top of the legacy blitter engine-instance-register (HEAD, TAIL, etc.), no warning is generated. Signed-off-by: Alan Previn Reviewed-by: John Harrison Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221019072930.17755-2-alan.previn.teres.alexis@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 78 +++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 9 deletions(-) commit 96917bb3a377e1ed103fd5c420a95e5fb25ca104 Merge: 86d6f77a3cce 337a0a0b63f1 Author: Jakub Kicinski Date: Mon Oct 24 13:44:11 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net include/linux/net.h a5ef058dc4d9 ("net: introduce and use custom sockopt socket flag") e993ffe3da4b ("net: flag sockets supporting msghdr originated zerocopy") Signed-off-by: Jakub Kicinski commit 461a65d7d1a4f56b97c9115eda3e8619516f40fb Author: Bjorn Helgaas Date: Wed Oct 19 15:41:27 2022 -0500 PCI/portdrv: Unexport pcie_port_service_register(), pcie_port_service_unregister() pcie_port_service_register() and pcie_port_service_unregister() are used only by the pciehp, aer, dpc, and pme PCIe port service drivers, none of which can be modules. Unexport pcie_port_service_register() and pcie_port_service_unregister(). No functional change intended. Link: https://lore.kernel.org/r/20221019204127.44463-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Keith Busch drivers/pci/pcie/portdrv.c | 2 -- 1 file changed, 2 deletions(-) commit 29f193feeea3e3af1c4650870f08ca896b83e1db Author: Bjorn Helgaas Date: Wed Oct 19 15:41:26 2022 -0500 PCI/portdrv: Move private things to portdrv.c Previously several things used by portdrv_core.c and portdrv_pci.c were shared by defining them in portdrv.h. Now that portdrv_core.c and portdrv_pci.c have been squashed, move things that can be private into portdrv.c. No functional change intended. Link: https://lore.kernel.org/r/20221019204127.44463-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Keith Busch drivers/pci/pcie/portdrv.c | 9 +++++++++ drivers/pci/pcie/portdrv.h | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) commit a1ccd3d911382f68753033c6adcf69663c2a9fc5 Author: Bjorn Helgaas Date: Wed Oct 19 15:41:25 2022 -0500 PCI/portdrv: Squash into portdrv.c Squash portdrv_core.c and portdrv_pci.c into portdrv.c to make it easier to find things. The whole thing is less than 1000 lines, and it's a pain to bounce back and forth between two files. Several portdrv_core.c functions were non-static because they were referenced from portdrv_pci.c. Make them static since they're now all in portdrv.c. No functional change intended. Link: https://lore.kernel.org/r/20221019204127.44463-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Keith Busch drivers/pci/pcie/Makefile | 2 +- drivers/pci/pcie/{portdrv_core.c => portdrv.c} | 252 ++++++++++++++++++++++++- drivers/pci/pcie/portdrv.h | 10 - drivers/pci/pcie/portdrv_pci.c | 252 ------------------------- 4 files changed, 244 insertions(+), 272 deletions(-) commit d7a8680ec9fb217987a9569aba1abeed886805f0 Author: John Harrison Date: Thu Oct 6 14:38:13 2022 -0700 drm/i915: Improve long running compute w/a for GuC submission A workaround was added to the driver to allow compute workloads to run 'forever' by disabling pre-emption on the RCS engine for Gen12. It is not totally unbound as the heartbeat will kick in eventually and cause a reset of the hung engine. However, this does not work well in GuC submission mode. In GuC mode, the pre-emption timeout is how GuC detects hung contexts and triggers a per engine reset. Thus, disabling the timeout means also losing all per engine reset ability. A full GT reset will still occur when the heartbeat finally expires, but that is a much more destructive and undesirable mechanism. The purpose of the workaround is actually to give compute tasks longer to reach a pre-emption point after a pre-emption request has been issued. This is necessary because Gen12 does not support mid-thread pre-emption and compute tasks can have long running threads. So, rather than disabling the timeout completely, just set it to a 'long' value. v2: Review feedback from Tvrtko - must hard code the 'long' value instead of determining it algorithmically. So make it an extra CONFIG definition. Also, remove the execlist centric comment from the existing pre-emption timeout CONFIG option given that it applies to more than just execlists. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Acked-by: Michal Mrozek Acked-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221006213813.1563435-5-John.C.Harrison@Intel.com drivers/gpu/drm/i915/Kconfig.profile | 26 ++++++++++++++++++++++---- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 9 +++++++-- 2 files changed, 29 insertions(+), 6 deletions(-) commit 47daf84a8bfbc0ff7342b75fa2175591b64ef8d7 Author: John Harrison Date: Thu Oct 6 14:38:12 2022 -0700 drm/i915: Make the heartbeat play nice with long pre-emption timeouts Compute workloads are inherently not pre-emptible for long periods on current hardware. As a workaround for this, the pre-emption timeout for compute capable engines was disabled. This is undesirable with GuC submission as it prevents per engine reset of hung contexts. Hence the next patch will re-enable the timeout but bumped up by an order of magnitude. However, the heartbeat might not respect that. Depending upon current activity, a pre-emption to the heartbeat pulse might not even be attempted until the last heartbeat period. Which means that only one period is granted for the pre-emption to occur. With the aforesaid bump, the pre-emption timeout could be significantly larger than this heartbeat period. So adjust the heartbeat code to take the pre-emption timeout into account. When it reaches the final (high priority) period, it now ensures the delay before hitting reset is bigger than the pre-emption timeout. v2: Fix for selftests which adjust the heartbeat period manually. v3: Add FIXME comment about selftests. Add extra FIXME comment and drm_notices when setting heartbeat to a non-default value (review feedback from Tvrtko) Signed-off-by: John Harrison Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221006213813.1563435-4-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 2aa14b1ab2c41a4fe41efae80d58bb77da91f19f Author: Nick Terrell Date: Mon Oct 17 13:32:37 2022 -0700 zstd: import usptream v1.5.2 Updates the kernel's zstd library to v1.5.2, the latest zstd release. The upstream tag it is updated to is `v1.5.2-kernel`, which contains several cherry-picked commits on top of the v1.5.2 release which are required for the kernel update. I will create this tag once the PR is ready to merge, until then reference the temporary upstream branch `v1.5.2-kernel-cherrypicks`. I plan to submit this patch as part of the v6.2 merge window. I've done basic build testing & testing on x86-64, i386, and aarch64. I'm merging these patches into my `zstd-next` branch, which is pulled into `linux-next` for further testing. I've benchmarked BtrFS with zstd compression on a x86-64 machine, and saw these results. Decompression speed is a small win across the board. The lower compression levels 1-4 see both compression speed and compression ratio wins. The higher compression levels see a small compression speed loss and about neutral ratio. I expect the lower compression levels to be used much more heavily than the high compression levels, so this should be a net win. Level CTime DTime Ratio 1 -2.95% -1.1% -0.7% 3 -3.5% -1.2% -0.5% 5 +3.7% -1.0% +0.0% 7 +3.2% -0.9% +0.0% 9 -4.3% -0.8% +0.1% Signed-off-by: Nick Terrell include/linux/zstd_lib.h | 475 +++--- lib/zstd/common/bitstream.h | 9 + lib/zstd/common/compiler.h | 67 +- lib/zstd/common/entropy_common.c | 7 +- lib/zstd/common/error_private.h | 81 +- lib/zstd/common/fse.h | 3 +- lib/zstd/common/fse_decompress.c | 2 +- lib/zstd/common/huf.h | 46 +- lib/zstd/common/mem.h | 2 + lib/zstd/common/portability_macros.h | 93 ++ lib/zstd/common/zstd_internal.h | 175 +-- lib/zstd/compress/clevels.h | 132 ++ lib/zstd/compress/fse_compress.c | 83 +- lib/zstd/compress/huf_compress.c | 644 ++++++-- lib/zstd/compress/zstd_compress.c | 1998 ++++++++++++++++++------ lib/zstd/compress/zstd_compress_internal.h | 375 ++++- lib/zstd/compress/zstd_compress_literals.c | 9 +- lib/zstd/compress/zstd_compress_literals.h | 4 +- lib/zstd/compress/zstd_compress_sequences.c | 31 +- lib/zstd/compress/zstd_compress_superblock.c | 295 +--- lib/zstd/compress/zstd_cwksp.h | 225 ++- lib/zstd/compress/zstd_double_fast.c | 413 +++-- lib/zstd/compress/zstd_fast.c | 441 ++++-- lib/zstd/compress/zstd_lazy.c | 1352 ++++++++++++---- lib/zstd/compress/zstd_lazy.h | 38 + lib/zstd/compress/zstd_ldm.c | 76 +- lib/zstd/compress/zstd_ldm.h | 1 + lib/zstd/compress/zstd_ldm_geartab.h | 5 +- lib/zstd/compress/zstd_opt.c | 402 +++-- lib/zstd/decompress/huf_decompress.c | 912 ++++++++--- lib/zstd/decompress/zstd_decompress.c | 78 +- lib/zstd/decompress/zstd_decompress_block.c | 1022 +++++++++--- lib/zstd/decompress/zstd_decompress_block.h | 10 +- lib/zstd/decompress/zstd_decompress_internal.h | 38 +- lib/zstd/decompress_sources.h | 6 + lib/zstd/zstd_compress_module.c | 6 +- 36 files changed, 6951 insertions(+), 2605 deletions(-) commit 4782c725c1538aa9ef894ae4a3938db40be7f02c Author: Nick Terrell Date: Fri Oct 14 14:47:04 2022 -0700 zstd: Move zstd-common module exports to zstd_common_module.c The zstd codebase is imported from the upstream zstd repo, and is over-written on every update. Upstream keeps the kernel specific code separate from the main library. So the module definition is moved into the zstd_common_module.c file. This matches the pattern followed by the zstd-compress and zstd-decompress files. I've done build and boot testing on x86-64, i386, and aarch64. I've verified that zstd built both as modules and built-in build and boot. Signed-off-by: Nick Terrell lib/zstd/Makefile | 1 + lib/zstd/common/entropy_common.c | 4 ---- lib/zstd/common/zstd_common.c | 10 ---------- lib/zstd/zstd_common_module.c | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 14 deletions(-) commit c3bd49cd9a1043b963331e7fd874b380bed3f2bd Author: John Harrison Date: Thu Oct 6 14:38:11 2022 -0700 drm/i915: Fix compute pre-emption w/a to apply to compute engines An earlier patch added support for compute engines. However, it missed enabling the anti-pre-emption w/a for the new engine class. So move the 'compute capable' flag earlier and use it for the pre-emption w/a test. Fixes: c674c5b9342e ("drm/i915/xehp: CCS should use RCS setup functions") Cc: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Cc: Aravind Iddamsetty Cc: Matt Roper Cc: Tvrtko Ursulin Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Lucas De Marchi Cc: John Harrison Cc: Jason Ekstrand Cc: "Michał Winiarski" Cc: Matthew Brost Cc: Chris Wilson Cc: Tejas Upadhyay Cc: Umesh Nerlige Ramappa Cc: "Thomas Hellström" Cc: Stuart Summers Cc: Matthew Auld Cc: Jani Nikula Cc: Ramalingam C Cc: Akeem G Abodunrin Signed-off-by: John Harrison Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221006213813.1563435-3-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 568944af44e7538ed5d1389dabf56e938afdaf4f Author: John Harrison Date: Thu Oct 6 14:38:10 2022 -0700 drm/i915/guc: Limit scheduling properties to avoid overflow GuC converts the pre-emption timeout and timeslice quantum values into clock ticks internally. That significantly reduces the point of 32bit overflow. On current platforms, worst case scenario is approximately 110 seconds. Rather than allowing the user to set higher values and then get confused by early timeouts, add limits when setting these values. v2: Add helper functions for clamping (review feedback from Tvrtko). v3: Add a bunch of BUG_ON range checks in addition to the checks already in the clamping functions (Tvrtko) Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Acked-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221006213813.1563435-2-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gt/intel_engine.h | 6 ++ drivers/gpu/drm/i915/gt/intel_engine_cs.c | 69 +++++++++++++++++++++++ drivers/gpu/drm/i915/gt/sysfs_engines.c | 25 ++++---- drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 21 +++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 8 +++ 5 files changed, 119 insertions(+), 10 deletions(-) commit 19d7df98472851e1d2d11e00c177988d0f49683d Author: Xin Gao Date: Mon Oct 17 15:18:59 2022 -0700 lib: zstd: Fix comment typo The double `when' is duplicated in line 999, remove one. Signed-off-by: Xin Gao Signed-off-by: Nick Terrell lib/zstd/decompress/zstd_decompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7486f5c6e7b197400678f1bb603ac9e4027fb830 Author: Jilin Yuan Date: Fri Sep 2 09:32:12 2022 +0800 lib: zstd: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: Jilin Yuan Signed-off-by: Nick Terrell lib/zstd/compress/zstd_compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 894c792e3e24c2c15d8aac15aa89ec144468e1b0 Author: Palmer Dabbelt Date: Thu Oct 13 14:46:36 2022 -0700 MAINTAINERS: git://github -> https://github.com for terrelln Github deprecated the git:// links about a year ago, so let's move to the https:// URLs instead. Reported-by: Conor Dooley Link: https://github.blog/2021-09-01-improving-git-protocol-security-github/ Signed-off-by: Palmer Dabbelt Signed-off-by: Nick Terrell MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ead3243df4483304555454e38afe6e52afed33cd Merge: 14e77332e746 247f34f7b803 Author: Nick Terrell Date: Mon Oct 24 12:09:07 2022 -0700 Merge branch 'main' into zstd-next commit 27b2ae654370e1a8e446b0e48c4e406abed12ca1 Author: Dmitry Osipenko Date: Fri Oct 21 00:33:35 2022 +0300 drm/client: Switch drm_client_buffer_delete() to unlocked drm_gem_vunmap The drm_client_buffer_delete() wasn't switched to unlocked GEM vunmapping by accident when rest of drm_client code transitioned to the unlocked variants of the vmapping functions. Make drm_client_buffer_delete() use the unlocked variant. This fixes lockdep warning splat about missing reservation lock when framebuffer is released. Reported-by: kernel test robot Link: https://lore.kernel.org/dri-devel/890f70db-68b0-8456-ca3c-c5496ef90517@collabora.com/T/ Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations") Signed-off-by: Dmitry Osipenko Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221020213335.309092-1-dmitry.osipenko@collabora.com drivers/gpu/drm/drm_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93e28cf81406519622383ae51d6fd183b744ac46 Author: Joaquín Ignacio Aramendía Date: Mon Oct 24 08:33:59 2022 -0300 drm/amd/display: Revert logic for plane modifiers This file was split in commit 5d945cbcd4b16a29d6470a80dfb19738f9a4319f ("drm/amd/display: Create a file dedicated to planes") and the logic in dm_plane_format_mod_supported() function got changed by a switch logic. That change broke drm_plane modifiers setting on series 5000 APUs (tested on OXP mini AMD 5800U and HP Dev One 5850U PRO) leading to Gamescope not working as reported on GitHub[1] To reproduce the issue, enter a TTY and run: $ gamescope -- vkcube With said commit applied it will abort. This one restores the old logic, fixing the issue that affects Gamescope. [1](https://github.com/Plagman/gamescope/issues/624) Cc: # 6.0.x Signed-off-by: Joaquín Ignacio Aramendía Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 50 +++------------------- 1 file changed, 7 insertions(+), 43 deletions(-) commit 31bc2485e88537009fad9246bf48319fc9172230 Author: wangjianli Date: Sat Oct 22 14:04:17 2022 +0800 drm/radeon: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: wangjianli Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12024b17617af9b953cf8801a6a3d3c769ebd06f Author: wangjianli Date: Sat Oct 22 14:01:55 2022 +0800 amd/amdgpu: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: wangjianli Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b473bd5fc333ab02479444dd4a51be5f5e324d97 Author: Lewis Huang Date: Thu Oct 20 11:46:39 2022 -0400 drm/amd/display: refine wake up aux in retrieve link caps [Why] Read set_power_state dpcd after HPD cause USB4 CTS 4.2.1.1 [How] Read LTTPR caps first. If aux channel not ready, wake up aux channel. If wake up aux channel return pass, retrieve lttpr caps again. If wake up aux channel return false, register a detection retry timer. Tested-by: Mark Broadworth Reviewed-by: Wenjing Liu Acked-by: Rodrigo Siqueira Signed-off-by: Lewis Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 148 ++++++----------------- drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 +- 2 files changed, 41 insertions(+), 109 deletions(-) commit f1943a51f0f9ce732e344fffb576b54f3e230a4d Author: Rodrigo Siqueira Date: Thu Oct 20 11:46:38 2022 -0400 drm/amd/display: Add events log to trace OPTC lock and unlock As an attempt to offer more DCN debug tools for cases where the OPTC can hang, this commit introduces a trace event responsible for showing OPTC status when it requests lock and unlock. Tested-by: Mark Broadworth Reviewed-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h | 64 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc_trace.h | 2 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 5 ++ drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 9 +++ 4 files changed, 80 insertions(+) commit 6be153dc8c88409e63309bcec300b03cd7bce9a7 Author: Rodrigo Siqueira Date: Thu Oct 20 11:46:37 2022 -0400 drm/amd/display: Convert documentation to a kernel-doc The dc_dmub_srv file has a lot of documentation associated with SubVP that could be converted to a kernel-doc. This commit just changes the comment style to a kernel-doc. Tested-by: Mark Broadworth Reviewed-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 124 +++++++++++---------------- 1 file changed, 48 insertions(+), 76 deletions(-) commit bd829d5707730072fecc3267016a675a4789905b Author: Ian Chen Date: Thu Oct 20 11:46:36 2022 -0400 drm/amd/display: Refactor eDP PSR codes We split out PSR config from "global" to "per-panel" config settings. Tested-by: Mark Broadworth Reviewed-by: Robin Chen Acked-by: Rodrigo Siqueira Signed-off-by: Ian Chen Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 - drivers/gpu/drm/amd/display/dc/dc_link.h | 14 +++++++++++--- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 5 ++++- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 15 +++++++++++++-- drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 14 +++++++++++++- drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c | 13 ++++++++++++- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 2 +- 11 files changed, 70 insertions(+), 10 deletions(-) commit 174fc82410a8c75d3937320658fca5a240ca8176 Author: Dmytro Laktyushkin Date: Thu Oct 20 11:46:35 2022 -0400 drm/amd/display: correctly populate dcn315 clock table Fix incorrect pstate read order as well as min and max state logic. Tested-by: Mark Broadworth Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 71 +++++++--------------- 1 file changed, 23 insertions(+), 48 deletions(-) commit 0094f042f2f88f6e0fea01f0753773a95cc975bd Author: Wenjing Liu Date: Thu Oct 20 11:46:34 2022 -0400 drm/amd/display: remove audio mute control in hpo dp VPG doesn't have the ability to mute audio output by sending all 0s in audio SDP. The existing implemention is disabling audio SDP instead. This is same as what dp_audio_enable does. Since it is no longer referenced by any callers, we decided to remove this interface for simplicity. Tested-by: Mark Broadworth Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn31/dcn31_apg.c | 11 ----------- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_apg.h | 4 ---- .../drm/amd/display/dc/dcn31/dcn31_hpo_dp_stream_encoder.c | 9 --------- drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 3 --- 4 files changed, 27 deletions(-) commit c859181cfeacf87336fc385c5665444f0e59eafe Author: Wenjing Liu Date: Thu Oct 20 11:46:33 2022 -0400 drm/amd/display: move stream encoder audio setup to link_hwss Unify stream encoder audio setup interface. Tested-by: Mark Broadworth Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 22 +++++----------------- drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 3 +++ .../gpu/drm/amd/display/dc/link/link_hwss_dio.c | 17 +++++++++++++++++ .../gpu/drm/amd/display/dc/link/link_hwss_dio.h | 2 ++ .../gpu/drm/amd/display/dc/link/link_hwss_dpia.c | 1 + .../gpu/drm/amd/display/dc/link/link_hwss_hpo_dp.c | 10 ++++++++++ 6 files changed, 38 insertions(+), 17 deletions(-) commit 14e2739c3695734bb4f5a0deca6fff4e10e5ef5d Author: Wenjing Liu Date: Thu Oct 20 11:46:32 2022 -0400 drm/amd/display: refactor enable/disable audio stream hw sequence [why] 1. As recommended by hardware team, don't enable APG when stream is not enabled. 2. Move audio stream encoder programming into link_hwss. [how] 1. Merge dp_audio_enable into enable audio stream hw sequence. 2. Move stream encoder programming into link hwss level to unify stream encoder programming interface. Tested-by: Mark Broadworth Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +-- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 14 +----- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 50 ++++------------------ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 8 ---- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_apg.c | 2 - drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 2 + .../gpu/drm/amd/display/dc/link/link_hwss_dio.c | 35 +++++++++++++++ .../gpu/drm/amd/display/dc/link/link_hwss_dio.h | 2 + .../gpu/drm/amd/display/dc/link/link_hwss_dpia.c | 2 + .../gpu/drm/amd/display/dc/link/link_hwss_hpo_dp.c | 15 +++++++ 10 files changed, 68 insertions(+), 68 deletions(-) commit bbfbf09d193ac831c40db50ef4b31d11548a9eef Author: Rodrigo Siqueira Date: Thu Oct 20 11:46:31 2022 -0400 drm/amd/display: Remove FPU guards from the DML folder As part of the programming expectation for using DML functions, DC requires that any DML function invoked outside DML uses: DC_FP_START(); ... dml function ... DC_FP_END(); Additionally, all the DML functions that can be invoked outside the DML folder call the function dc_assert_fp_enabled(), which is responsible for triggering a warning in the case that the DML function was not guarded by the DC_FP_START/END. For this reason, call DC_FP_START/END inside DML is wrong, and this commit removes all of those references. Tested-by: Mark Broadworth Reviewed-by: Nevenko Stupar Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 2 -- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 17 +---------------- 2 files changed, 1 insertion(+), 18 deletions(-) commit b66fca42c4e5739fa7ce17edd1c4d451b0d3c78d Author: Fangzhi Zuo Date: Thu Oct 20 11:46:30 2022 -0400 drm/amd/display: Add UHBR135 and UHBR20 into debugfs Add support to manually force link rate to UHBR135 (0x546) and UHBR20 (0x7d0). Tested-by: Mark Broadworth Reviewed-by: Roman Li Acked-by: Rodrigo Siqueira Signed-off-by: Fangzhi Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 ++ 1 file changed, 2 insertions(+) commit f543d28687480fad06b708bc6e0b0b6ec953b078 Author: Prike Liang Date: Fri Oct 21 10:04:40 2022 +0800 drm/amdgpu: disallow gfxoff until GC IP blocks complete s2idle resume In the S2idle suspend/resume phase the gfxoff is keeping functional so some IP blocks will be likely to reinitialize at gfxoff entry and that will result in failing to program GC registers.Therefore, let disallow gfxoff until AMDGPU IPs reinitialized completely. Signed-off-by: Prike Liang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 693073a04de491c82cd0e1d6bf979192375373c1 Author: YuBiao Wang Date: Wed Oct 19 11:36:32 2022 +0800 drm/amdgpu: skip mes self test for gc 11.0.3 in recover Temporary disable mes self teset for gc 11.0.3 during gpu_recovery. Signed-off-by: YuBiao Wang Acked-by: Luben Tuikov Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd72e2cb2f9dd2734e8013b3e185a21f0d605d3e Author: Prike Liang Date: Fri Oct 21 16:38:48 2022 -0400 drm/amdkfd: introduce dummy cache info for property asic This dummy cache info will enable kfd base function support. Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 53 ++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit d62eaddbc9ae27e1d98389b74778b29d4c1388d4 Author: Jesse Zhang Date: Tue Oct 11 05:23:10 2022 +0000 drm/amdkfd: correct the cache info for gfx1036 correct the cache information for gfx1036 Acked-by: Alex Deucher Reviewed-by: Yifan Zhang Signed-off-by: Yifan Zhang Signed-off-by: Jesse Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 53 ++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit a9232b068e3698b8aa4a29fb7292bfdeb0c8f4ff Author: Prike Liang Date: Thu Oct 20 14:44:26 2022 +0800 drm/amdkfd: update gfx1037 Lx cache setting Update the gfx1037 L1/L2 cache setting. Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 53 ++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit b72362962a66693cd095389cbe41dd005bfcfb44 Author: David Francis Date: Fri Sep 16 11:15:01 2022 -0400 drm/amd: Add IMU fw version to fw version queries IMU is a new firmware for GFX11. There are four means by which firmware version can be queried from the driver: device attributes, vf2pf, debugfs, and the AMDGPU_INFO_FW_VERSION option in the amdgpu info ioctl. Add IMU as an option for those four methods. V2: Added debugfs Reviewed-by: Likun Gao Reviewed-by: Alex Deucher Signed-off-by: David Francis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h | 1 + include/uapi/drm/amdgpu_drm.h | 2 ++ 5 files changed, 20 insertions(+), 1 deletion(-) commit 3a3e841d050d9d919317ad2b65d80fc9c8c799dc Author: Deming Wang Date: Thu Oct 6 22:26:51 2022 -0400 drm/amdkfd: use vma_lookup() instead of find_vma() Using vma_lookup() verifies the start address is contained in the found vma. This results in easier to read the code. Signed-off-by: Deming Wang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 8 ++++---- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 17 ++++++++--------- 2 files changed, 12 insertions(+), 13 deletions(-) commit 178919f8ff2d4cd1ad32680eb767e6761e9d00ea Author: ruanjinjie Date: Wed Oct 19 14:23:47 2022 +0800 drm/amd/display: make dcn32_mpc_funcs static The symbol is not used outside of the file, so mark it static. Fixes the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_mpc.c:985:24: warning: symbol 'dcn32_mpc_funcs' was not declared. Should it be static? Reviewed-by: Harry Wentland Signed-off-by: ruanjinjie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72c9abd5399d9f5c20a5b93737e67edba3189079 Author: ruanjinjie Date: Wed Oct 19 14:31:15 2022 +0800 drm/amd/display: make dcn32_mmhubbub_funcs static The symbol is not used outside of the file, so mark it static. Fixes the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_mmhubbub.c:214:28: warning: symbol 'dcn32_mmhubbub_funcs' was not declared. Should it be static? Reviewed-by: Harry Wentland Signed-off-by: ruanjinjie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mmhubbub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9feece0d96124096e7268007bd2d3905a29d92ac Author: ruanjinjie Date: Wed Oct 19 15:45:02 2022 +0800 drm/amd/display: Make some symbols static These symbols qp_table_422_10bpc_min, qp_table_444_8bpc_max, qp_table_420_12bpc_max, qp_table_444_10bpc_min, qp_table_420_8bpc_max, qp_table_444_8bpc_min, qp_table_444_12bpc_min, qp_table_420_12bpc_min, qp_table_422_12bpc_min, qp_table_422_12bpc_max, qp_table_444_12bpc_max, qp_table_420_8bpc_min, qp_table_422_8bpc_min, qp_table_422_10bpc_max, qp_table_420_10bpc_max, qp_table_420_10bpc_min, qp_table_444_10bpc_max, qp_table_422_8bpc_max are not used outside of the file, so mark them static. ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:28:18: warning: symbol 'qp_table_422_10bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:61:18: warning: symbol 'qp_table_444_8bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:102:18: warning: symbol 'qp_table_420_12bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:135:18: warning: symbol 'qp_table_444_10bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:188:18: warning: symbol 'qp_table_420_8bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:209:18: warning: symbol 'qp_table_444_8bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:250:18: warning: symbol 'qp_table_444_12bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:315:18: warning: symbol 'qp_table_420_12bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:348:18: warning: symbol 'qp_table_422_12bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:389:18: warning: symbol 'qp_table_422_12bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:430:18: warning: symbol 'qp_table_444_12bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:495:18: warning: symbol 'qp_table_420_8bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:516:18: warning: symbol 'qp_table_422_8bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:541:18: warning: symbol 'qp_table_422_10bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:574:16: warning: symbol 'qp_table_420_10bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:601:18: warning: symbol 'qp_table_420_10bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:628:18: warning: symbol 'qp_table_444_10bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:681:18: warning: symbol 'qp_table_422_8bpc_max' was not declared. Should it be static? Signed-off-by: ruanjinjie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dsc/qp_tables.h | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 6c16afdcec20b01879ad17440f42c9944786dc7d Author: Alex Deucher Date: Wed Oct 19 16:57:42 2022 -0400 drm/amdgpu: fix sdma doorbell init ordering on APUs Commit 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") uncovered a bug in amdgpu that required a reordering of the driver init sequence to avoid accessing a special register on the GPU before it was properly set up leading to an PCI AER error. This reordering uncovered a different hw programming ordering dependency in some APUs where the SDMA doorbells need to be programmed before the GFX doorbells. To fix this, move the SDMA doorbell programming back into the soc15 common code, but use the actual doorbell range values directly rather than the values stored in the ring structure since those will not be initialized at this point. This is a partial revert, but with the doorbell assignment fixed so the proper doorbell index is set before it's used. Fixes: e3163bc8ffdfdb ("drm/amdgpu: move nbio sdma_doorbell_range() into sdma code for vega") Acked-by: Christian König Signed-off-by: Alex Deucher Cc: skhan@linuxfoundation.org drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 5 ----- drivers/gpu/drm/amd/amdgpu/soc15.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) commit 27fcf77830d0e8af53cd562909ff37aa3ec345dd Author: Alvin Lee Date: Thu Oct 6 17:26:49 2022 -0400 drm/amd/display: Don't return false if no stream pipe_ctx[i] exists even if the pipe is not in use. If the pipe is not in use it will always have a null stream, so don't return false in this case. Tested-by: Daniel Wheeler Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 345b16961afe0deae8633ce10dbff46c7e64e35f Author: Rodrigo Siqueira Date: Thu Oct 6 17:26:48 2022 -0400 drm/amd/display: Remove wrong pipe control lock When using a device based on DCN32/321, we have an issue where a second 4k@60Hz display does not light up, and the system becomes unresponsive for a few minutes. In the debug process, it was possible to see a hang in the function dcn20_post_unlock_program_front_end in this part: for (j = 0; j < TIMEOUT_FOR_PIPE_ENABLE_MS*1000 && hubp->funcs->hubp_is_flip_pending(hubp); j++) mdelay(1); } The hubp_is_flip_pending always returns positive for waiting pending flips which is a symptom of pipe hang. Additionally, the dmesg log shows this message after a few minutes: BUG: soft lockup - CPU#4 stuck for 26s! ... [ +0.000003] dcn20_post_unlock_program_front_end+0x112/0x340 [amdgpu] [ +0.000171] dc_commit_state_no_check+0x63d/0xbf0 [amdgpu] [ +0.000155] ? dc_validate_global_state+0x358/0x3d0 [amdgpu] [ +0.000154] dc_commit_state+0xe2/0xf0 [amdgpu] This confirmed the hypothesis that we had a pipe hanging somewhere. Next, after checking the ftrace entries, we have the below weird sequence: [..] 2) | dcn10_lock_all_pipes [amdgpu]() { 2) 0.120 us | optc1_is_tg_enabled [amdgpu](); 2) | dcn20_pipe_control_lock [amdgpu]() { 2) | dc_dmub_srv_clear_inbox0_ack [amdgpu]() { 2) 0.121 us | amdgpu_dm_dmub_reg_write [amdgpu](); 2) 0.551 us | } 2) | dc_dmub_srv_send_inbox0_cmd [amdgpu]() { 2) 0.110 us | amdgpu_dm_dmub_reg_write [amdgpu](); 2) 0.511 us | } 2) | dc_dmub_srv_wait_for_inbox0_ack [amdgpu]() { 2) 0.110 us | amdgpu_dm_dmub_reg_read [amdgpu](); 2) 0.110 us | amdgpu_dm_dmub_reg_read [amdgpu](); 2) 0.110 us | amdgpu_dm_dmub_reg_read [amdgpu](); 2) 0.110 us | amdgpu_dm_dmub_reg_read [amdgpu](); 2) 0.110 us | amdgpu_dm_dmub_reg_read [amdgpu](); 2) 0.110 us | amdgpu_dm_dmub_reg_read [amdgpu](); 2) 0.110 us | amdgpu_dm_dmub_reg_read [amdgpu](); [..] We are not expected to read from dmub register so many times and for so long. From the trace log, it was possible to identify that the function dcn20_pipe_control_lock was triggering the dmub operation when it was unnecessary and causing the hang issue. This commit drops the unnecessary dmub code and, consequently, fixes the second display not lighting up the issue. Tested-by: Daniel Wheeler Acked-by: Qingqing Zhuo Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit fa16dec20440156fda208c3d289dfa15af3953dc Author: Kenneth Feng Date: Thu Oct 20 15:25:25 2022 +0800 drm/amd/pm: allow gfxoff on gc_11_0_3 allow gfxoff on gc_11_0_3 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 1 + 2 files changed, 2 insertions(+) commit dddde627807c22d6f15f4417eb395b13a1ca88f9 Author: Rodrigo Siqueira Date: Tue Oct 18 08:28:25 2022 -0400 drm/amd/display: Use update plane and stream routine for DCN32x Sub-viewport (Subvp) feature is used for changing MCLK without causing any display artifact, requiring special treatment from the plane and stream perspective since DC needs to read data from the cache when using subvp. However, the function dc_commit_updates_for_stream does not provide all the support needed by this feature which will make this function legacy at some point. For this reason, this commit enables dc_update_planes_and_stream for ASICs that support this feature but preserves the old behavior for other ASICs. However, dc_update_planes_and_stream should replace dc_commit_updates_for_stream for all ASICs since it does most of the tasks executed by dc_commit_updates_for_stream with other extra operations, but we need to run tests before making this change. Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7fffb03b4045c862f904a88b852dc509c4e46406 Author: Rodrigo Siqueira Date: Tue Oct 18 08:28:24 2022 -0400 drm/amd/display: Avoid ABM when ODM combine is enabled for eDP ODM to combine on the eDP panel with ABM causes the color difference to the panel since the ABM module only sets one pipe. Hence, this commit blocks ABM in case of ODM combined on eDP. Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit eef019eabc3cd0fddcffefbf67806a4d8cca29bb Author: Rodrigo Siqueira Date: Tue Oct 18 08:28:23 2022 -0400 drm/amd/display: Update OTG instance in the commit stream OTG instance is not updated in dc_commit_state_no_check for newly committed streams because mode_change is not set. Notice that OTG update is part of the software state, and after hardware programming, it must be updated; for this reason, this commit updates the OTG offset right after hardware programming. Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 170390e587a69b2a24abac39eb3ae6ec28a4d7f2 Author: Rodrigo Siqueira Date: Tue Oct 18 08:28:22 2022 -0400 drm/amd/display: Handle seamless boot stream A seamless boot stream has hardware resources assigned to it, and adding a new stream means rebuilding the current assignment. It is desirable to avoid this situation since it may cause light-up issues on the VGA monitor on USB-C. This commit swaps the seamless boot stream to pipe 0 (if necessary) to ensure that the pipe context matches. Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit a5e39ae27c3a305c6aafc0e423b0cb2c677facde Author: Rodrigo Siqueira Date: Tue Oct 18 08:28:21 2022 -0400 drm/amd/display: Add function for validate and update new stream DC stream can be seen as a representation of the DCN backend or the data struct that represents the center of the display pipeline. The front end (i.e., planes) is connected to the DC stream, and in its turn, streams are connected to the DC link. Due to this dynamic, DC must handle the following scenarios: 1. A stream is removed; 2. A new stream is created; 3. An unchanged stream had some updates on its planes. These combinations require that the new stream data struct become updated and has a valid global state. For handling multiple corner cases associated with stream operations, this commit introduces a function dedicated to manipulating stream changes and invokes the state validation function after that. Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 16 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 219 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dc.h | 6 + 3 files changed, 227 insertions(+), 14 deletions(-) commit 987b96eb860036ab79051fb271f7fbdc01c9daf5 Author: Rodrigo Siqueira Date: Tue Oct 18 08:28:20 2022 -0400 drm/amd/display: Handle virtual hardware detect If virtual hardware is detected, there is no reason to run the full dc_commit_streams process, and DC can return true immediately. Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ 1 file changed, 3 insertions(+) commit f6ae69f49fcf697b6ffa93d58eb3746897f61cf8 Author: Rodrigo Siqueira Date: Tue Oct 18 08:28:19 2022 -0400 drm/amd/display: Include surface of unaffected streams The commit stream function does not include surfaces of unaffected streams, which may lead to some blank screens during mode change in some edge cases. This commit adds surfaces of unaffected streams followed by kernel-doc for documenting some of the fields that participate in this change. v2: squash in kerneldoc warning fix (Alex) Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 12 +++++++++++- drivers/gpu/drm/amd/display/dc/dc.h | 15 +++++++++++++-- drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 ++++ 3 files changed, 28 insertions(+), 3 deletions(-) commit 0e986cea0347902b2c72b09c8fe9c0f30d7decb4 Author: Rodrigo Siqueira Date: Tue Oct 18 08:28:18 2022 -0400 drm/amd/display: Copy DC context in the commit streams DC adds an instance of DML (which contains VBA) to each context, and multiple threads might write back to the global VBA resulting in data overwriting. To keep the consistency with other parts of the DC code, this commit changes dc_commit_streams to copy the current DC state, and as a result, it also changes the function signature to expect streams instead of a context. Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 41 +++++++++++++++++++++++++------- drivers/gpu/drm/amd/display/dc/dc.h | 4 +++- 2 files changed, 36 insertions(+), 9 deletions(-) commit 7b36f4d18e3e4941d12fe027ad6ad6123c257027 Author: Rodrigo Siqueira Date: Tue Oct 18 08:28:17 2022 -0400 drm/amd/display: Enable new commit sequence only for DCN32x Change commit sequence will impact all ASICs. It is prudent to run this update in small steps to keep issues under control and avoid any potential regression. With this idea in mind, this commit is preparation work for the complete transition to the new commit sequence. To maintain this change manageable across multiple ASICs, this commit adds a new function named dc_commit_streams which is a copy of the dc_commit_state with some minor changes. Finally, inside the dc_commit_state, we check if we are using DCN32x or above and enable the new sequence only for those devices. Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 46 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 13 +++------ 2 files changed, 50 insertions(+), 9 deletions(-) commit 10fdb0a11c555e0d6f7698d2874581d06e99ee71 Author: Rodrigo Siqueira Date: Tue Oct 18 08:28:16 2022 -0400 drm/amd/display: Rework context change check Context change is all about streams; for this reason, this commit renames context_changed to streams_changed. Additionally, to make this function more flexible, this commit changes the function signature to receive the stream array and the stream count as a parameter. Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 03ce7b387e8b0f4a1dc97a878545bdf7c7f23251 Author: Rodrigo Siqueira Date: Tue Oct 18 08:28:15 2022 -0400 drm/amd/display: Check if link state is valid The link state is set to false if there is no link and local sink. Even though the stream state may not change, it is desirable to commit the new stream when HPD goes low to high. Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ 1 file changed, 2 insertions(+) commit 7b5a4d7b9e2952a15c8d2b2391dfacd7ce841a1a Author: Rafael Mendonca Date: Mon Oct 17 22:27:50 2022 -0300 drm/amdkfd: Fix memory leak in kfd_mem_dmamap_userptr() If the number of pages from the userptr BO differs from the SG BO then the allocated memory for the SG table doesn't get freed before returning -EINVAL, which may lead to a memory leak in some error paths. Fix this by checking the number of pages before allocating memory for the SG table. Fixes: 264fb4d332f5 ("drm/amdgpu: Add multi-GPU DMA mapping helpers") Signed-off-by: Rafael Mendonca Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 20293269d81779a0d0c0865f5877b240c3335c97 Author: Lijo Lazar Date: Fri Sep 30 10:43:08 2022 +0530 drm/amdgpu: Remove ATC L2 access for MMHUB 2.1.x MMHUB 2.1.x versions don't have ATCL2. Remove accesses to ATCL2 registers. Since they are non-existing registers, read access will cause a 'Completer Abort' and gets reported when AER is enabled with the below patch. Tagging with the patch so that this is backported along with it. v2: squash in uninitialized warning fix (Nathan Chancellor) Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") Signed-off-by: Lijo Lazar Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit c61aa7407d0d1ebf66d59fd54971964e22a6f2da Author: Andrzej Hajda Date: Wed Oct 19 16:38:18 2022 +0200 drm/i915/gt: use intel_uncore_rmw when appropriate This patch replaces all occurences of the form intel_uncore_write(reg, intel_uncore_read(reg) OP val) with intel_uncore_rmw. Signed-off-by: Andrzej Hajda Reviewed-by: Ville Syrjälä Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221019143818.244339-2-andrzej.hajda@intel.com drivers/gpu/drm/i915/gt/intel_rps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5490c50438c6a8af849f3894a1b7d655349a7b7b Author: Andrzej Hajda Date: Wed Oct 19 16:38:17 2022 +0200 drm/i915: use intel_uncore_rmw when appropriate This patch replaces all occurences of the form intel_uncore_write(reg, intel_uncore_read(reg) OP val) with intel_uncore_rmw. Signed-off-by: Andrzej Hajda Reviewed-by: Ville Syrjälä Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221019143818.244339-1-andrzej.hajda@intel.com drivers/gpu/drm/i915/intel_pm.c | 187 ++++++++++++++-------------------------- 1 file changed, 66 insertions(+), 121 deletions(-) commit 16f3211110c86e724a97c00bffc7352ab89fc94c Author: Colin Ian King Date: Mon Oct 24 16:13:54 2022 +0100 media: saa7164: remove variable cnt Variable cnt is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil drivers/media/pci/saa7164/saa7164-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 301fd0dd1827d3885f61620baf5033093b88d4cc Author: Hans Verkuil Date: Mon Oct 24 15:28:45 2022 +0200 atomisp: fix potential NULL pointer dereferences The asd pointer is used in lockdep_assert_held() before the check if asd is NULL. This fixes two smatch warnings: drivers/staging/media/atomisp/pci/atomisp_cmd.c:3697 atomisp_handle_parameter_and_buffer() warn: variable dereferenced before check 'asd' (see line 3695) drivers/staging/media/atomisp/pci/atomisp_cmd.c:3779 atomisp_set_parameters() warn: variable dereferenced before check 'asd' (see line 3777) Signed-off-by: Hans Verkuil drivers/staging/media/atomisp/pci/atomisp_cmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3a865bab06ffa4151886ba9ee9bfe77d157c7498 Author: Colin Ian King Date: Fri Oct 21 18:43:52 2022 +0100 radio-terratec: Remove variable p The variable p being decremented but it is never referenced, it is redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil drivers/media/radio/radio-terratec.c | 3 --- 1 file changed, 3 deletions(-) commit fd5bd6d258d7366a90e0c6daa46393e6eaed9250 Author: Colin Ian King Date: Fri Oct 21 09:43:07 2022 +0100 media: platform: s5p-mfc: Fix spelling mistake "mmaping" -> "mmapping" There are a couple of spelling mistakes in mfc_debug messages. Fix them. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9195a860ef0a384d2ca2065cc61a0cc80d620de5 Author: Moudy Ho Date: Thu Oct 20 16:19:47 2022 +0800 media: platform: mtk-mdp3: remove unused VIDEO_MEDIATEK_VPU config Since REMOTEPROC completely replaces the VIDEO_MEDIATEK_VPU in MDP3, unused config should be removed to avoid compilation warnings reported on i386 or x86_64. Warning messages: WARNING: unmet direct dependencies detected for VIDEO_MEDIATEK_VPU Depends on [n]: MEDIA_SUPPORT [=y] && MEDIA_PLATFORM_SUPPORT [=y] && MEDIA_PLATFORM_DRIVERS [=y] && V4L_MEM2MEM_DRIVERS [=n] && VIDEO_DEV [=y] && (ARCH_MEDIATEK || COMPILE_TEST [=y]) Selected by [y]: - VIDEO_MEDIATEK_MDP3 [=y] && MEDIA_SUPPORT [=y] && MEDIA_PLATFORM_SUPPORT [=y] && MEDIA_PLATFORM_DRIVERS [=y] && (MTK_IOMMU [=n] || COMPILE_TEST [=y]) && VIDEO_DEV [=y] && (ARCH_MEDIATEK || COMPILE_TEST [=y]) && HAS_DMA [=y] && REMOTEPROC [=y] Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver") Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil drivers/media/platform/mediatek/mdp3/Kconfig | 1 - 1 file changed, 1 deletion(-) commit fdc67bd4f888c409f4fae28a3cd6b144f729c34f Author: Colin Ian King Date: Wed Oct 19 22:52:12 2022 +0100 media: vivid: remove redundant assignment to variable checksum Variable checksum is assigned a value that is never read, it is assigned a new value in a following for-loop. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/media/test-drivers/vivid/vivid-vbi-gen.c:197:2: warning: Value stored to 'checksum' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil drivers/media/test-drivers/vivid/vivid-vbi-gen.c | 1 - 1 file changed, 1 deletion(-) commit fec94f8c9954c31364e96af783c497d782730334 Author: Jernej Skrabec Date: Wed Oct 19 19:45:51 2022 +0200 media: cedrus: h264: Optimize mv col buffer allocation Currently allocation for mv col buffer pool is very wasteful. It allocates memory for worst case which is a lot more than it's needed for typical use. Fix that by replacing pool with individual allocations when such buffer is really needed. At that time all needed information for determining optimal mv col buffer size is also known. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus.h | 7 +- drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 118 +++++++++++------------ 2 files changed, 61 insertions(+), 64 deletions(-) commit 0ee952c2f484ee0059f7ce4951aaa3cb0eda96dd Author: Jernej Skrabec Date: Wed Oct 19 19:45:50 2022 +0200 media: cedrus: h265: Associate mv col buffers with buffer Currently mv col aux buffers are allocated as a pool. This is not optimal because pool size equals number of buffers before stream is started. Buffers can easily be allocated afterwards. In such cases, invalid pointer is assigned to the decoding frame and Cedrus might overwrite memory location which is allocated to different task. Solve this issue with allocating mv col buffer once capture buffer is actually used. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus.h | 9 ++-- drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 63 +++++++++++++----------- 2 files changed, 38 insertions(+), 34 deletions(-) commit d555409dd1b7cc9e7e5b9e2924c0ef4bf23f6c9b Author: Yunfei Dong Date: Tue Oct 18 19:41:22 2022 +0800 media: mediatek: vcodec: fix h264 cavlc bitstream fail Some cavlc bistream will decode fail when the frame size is less than 20 bytes. Need to add pending data at the end of the bitstream. For the minimum size of mapped memory is 256 bytes(16x16), adding four bytes data won't lead to access unknown virtual memory. Fixes: 59fba9eed5a7 ("media: mediatek: vcodec: support stateless H.264 decoding for mt8192") Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil .../mediatek/vcodec/vdec/vdec_h264_req_multi_if.c | 32 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) commit e9120e76a6f7e19a8d26c03f2964937e4ce69784 Author: Jernej Skrabec Date: Mon Oct 17 21:44:13 2022 +0200 media: cedrus: hevc: Fix offset adjustments As it turns out, current padding size check works fine in theory but it doesn't in practice. Most probable reason are caching issues. Let's rework reading data from bitstream using Cedrus engine instead of CPU. That way we avoid all cache issues and make sure that we're reading same data as Cedrus. Fixes: e7060d9a78c2 ("media: uapi: Change data_bit_offset definition") Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 25 ++++++++++++++++++------ drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 2 ++ 2 files changed, 21 insertions(+), 6 deletions(-) commit c558f69c402c8847500f663c544d49e822b56a17 Author: Mirela Rabulea Date: Sun Oct 16 16:52:00 2022 +0300 media: imx-jpeg: Fix Coverity issue in probe Possible dereference null return after of_match_node, so check for NULL of_id. Signed-off-by: Mirela Rabulea Signed-off-by: Hans Verkuil drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 2 ++ 1 file changed, 2 insertions(+) commit 6a394d563dffb60c150d87dc6678994ef8028c53 Author: Jernej Skrabec Date: Sat Oct 15 11:11:05 2022 +0200 media: v4l2-ioctl.c: Unify YCbCr/YUV terms in format descriptions Format descriptions use YCbCr and YUV terms interchangeably. Let's unify them so they all use YUV. While YCbCr is actually correct term here, YUV is shorter and thus it also fixes too long description of P010 tiled format. Fixes: 3c8e19d3d3f9 ("media: Add P010 tiled format") Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil drivers/media/v4l2-core/v4l2-ioctl.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 07eb565932e21604ad531fe0c37f6e2af4dc0e7c Author: Colin Ian King Date: Thu Oct 13 23:32:27 2022 +0100 media: atomisp: Fix spelling mistake "mis-match" -> "mismatch" There are a few spelling mistakes in dev_err messages. Fix them. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil drivers/staging/media/atomisp/pci/atomisp_cmd.c | 4 ++-- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 8f32a6fb444322ee688f8014b5e17daa4af09cd5 Author: Andy Shevchenko Date: Mon Oct 10 23:14:19 2022 +0300 media: c8sectpfe: Add missed header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Signed-off-by: Hans Verkuil drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 23ddb85dafefdace1ad79d1a30b0a4e7c4b5cd8d Author: Niklas Söderlund Date: Sun Oct 9 16:41:46 2022 +0200 media: adv748x: afe: Select input port when initializing AFE When moving the input selection to adv748x_reset() it was missed that during probe the device is reset _before_ the initialization and parsing of DT by the AFE subdevice. This can lead to the wrong input port (in case it's not port 0) being selected until the device is reset for the first time. Fix this by restoring the call to adv748x_afe_s_input() in the AFE initialization while also keeping it in the adv748x_reset(). Fixes: c30ed81afe89 ("media: adv748x: afe: Select input port when device is reset") Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil drivers/media/i2c/adv748x/adv748x-afe.c | 4 ++++ 1 file changed, 4 insertions(+) commit ffc20762d2cbd5ba83a2a66e6a15416bcc63f89c Author: Dafna Hirschfeld Date: Sun Oct 9 00:53:46 2022 +0300 media: vimc: Update device configuration in the documentation Since commit 9b4a9b31b9ae ("media: vimc: Enable set resolution at the scaler src pad") the configuration in the documentation does not work. Replace it with the configuration described in that commit. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Documentation/admin-guide/media/vimc.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit db3ada539fcc98b30bac0d11a864a294febdf85d Author: Niklas Söderlund Date: Sat Oct 8 16:12:05 2022 +0200 media: adv748x: Remove dead function declaration There is no implementation of adv748x_register_subdevs(), remove the declaration in the header file. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil drivers/media/i2c/adv748x/adv748x.h | 3 --- 1 file changed, 3 deletions(-) commit e20f3906885232115acc5cc681915085d4dfcc8f Author: Colin Ian King Date: Wed Oct 5 17:06:03 2022 +0100 media: mxl5005s: Make array RegAddr static const Don't populate the read-only array RegAddr on the stack but instead make it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil drivers/media/tuners/mxl5005s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3257a7673b564554b5b70e286bb8b61c6c04a446 Author: Colin Ian King Date: Tue Oct 4 17:13:36 2022 +0100 media: atomisp: Fix spelling mistake "modee" -> "mode" There is a spelling mistake in a literal string. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil .../staging/media/atomisp/pci/css_2401_system/host/pixelgen_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e1a33759a57b5c075187b6f12f0f57c964ed1c4 Author: Hans Verkuil Date: Fri Sep 30 16:14:47 2022 +0200 media: meson/vdec: always init coef_node_start It's hard for code analyzers to see that coef_node_start is always initialized (and actually hard for humans as well!). So change the last 'else if' to an 'else' so it is clear that coef_node_startis always set. This fixes a compile warning: drivers/staging/media/meson/vdec/codec_vp9.c:1689:41: warning: 'coef_node_start' may be used uninitialized [-Wmaybe-uninitialized] 1689 | coef_node_start = coef_node_start + 1; | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ drivers/staging/media/meson/vdec/codec_vp9.c:1551:19: note: 'coef_node_start' was declared here 1551 | int node, coef_node_start, coef_count_node_start; | ^~~~~~~~~~~~~~~ Signed-off-by: Hans Verkuil drivers/staging/media/meson/vdec/codec_vp9.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3984ea32e83bcad06b4b034ddd4b0a934c1b2f91 Author: Ming Qian Date: Fri Sep 30 14:40:47 2022 +0800 media: amphion: reset instance if it's aborted before codec header parsed there is hardware limitation that if it's aborted before the first codec header parsed, the codec may be stalled unless we do reset codec. and drop the source change event if it's triggered after reset. Fixes: 6de8d628df6e ("media: amphion: add v4l2 m2m vpu decoder stateful driver") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil drivers/media/platform/amphion/vdec.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 395ed025750ed9b7cab1c01eba814cbe28ac528f Author: Hans Verkuil Date: Thu Sep 29 11:15:20 2022 +0200 vivid: add INTEGER and INTEGER64 test control arrays Add INTEGER and INTEGER64 control arrays to test support for such controls. Signed-off-by: Hans Verkuil drivers/media/test-drivers/vivid/vivid-ctrls.c | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit e77eb66342c73946f7ed9ea68a6329f13b4343eb Author: Hans Verkuil Date: Thu Sep 29 11:11:22 2022 +0200 videodev2.h: add p_s32 and p_s64 pointers Added p_s32 and p_s64 pointers to the union in struct v4l2_ext_control to simplify INTEGER and INTEGER64 control array support. Internally the control framework handles such arrays just fine, but userspace is missing corresponding pointers to access array elements of these types. The internal union v4l2_ctrl_ptr which the control framework uses already has these types, they just were never added to the public API. Signed-off-by: Hans Verkuil include/uapi/linux/videodev2.h | 2 ++ 1 file changed, 2 insertions(+) commit f30ce3d3760b22ee33c8d9c2e223764ad30bdc5f Author: Jiasheng Jiang Date: Tue Sep 27 09:28:13 2022 +0800 media: coda: jpeg: Add check for kmalloc As kmalloc can return NULL pointer, it should be better to check the return value and return error, same as coda_jpeg_decode_header. Fixes: 96f6f62c4656 ("media: coda: jpeg: add CODA960 JPEG encoder support") Signed-off-by: Jiasheng Jiang Signed-off-by: Hans Verkuil drivers/media/platform/chips-media/coda-jpeg.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit b6bcdf763db1f5ea602bf876cfe91debfb3c7773 Author: Laurent Pinchart Date: Mon Sep 26 19:31:51 2022 +0300 media: v4l2-ctrls: Fix off-by-one error in integer menu control check The V4L2 API defines the maximum value for an integer menu control as the number of elements minus one. The v4l2_ctrl_new_std_menu() validates this constraint with an off-by-one error. Fix it. Fixes: d1e9b7c12b74 ("[media] V4L: Add support for integer menu controls with standard menu items") Signed-off-by: Laurent Pinchart Reviewed-by: Sakari Ailus Signed-off-by: Hans Verkuil drivers/media/v4l2-core/v4l2-ctrls-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9047d90e9130e1544e0ef130aeda2913767c7d7c Author: Irui Wang Date: Mon Sep 26 17:35:01 2022 +0800 media: mediatek: vcodec: Skip unsupported h264 encoder profile The encoder driver supports h264 baseline, main, high encoder profile. Set mask for V4L2_CID_MPEG_VIDEO_H264_PROFILE to skip the unsupported profile. get supported h264_profile by command: v4l2-ctl -d /dev/videoX -L h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4 0: Baseline 2: Main 4: High Signed-off-by: Irui Wang Tested-by: Allen-KH Cheng Reviewed-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 062fa935e44872e2ba8374fcee3aca616a30d0e0 Author: Shang XiaoJing Date: Fri Sep 23 18:07:08 2022 +0800 media: stm32: dcmi: Remove redundant dev_err call devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message. Signed-off-by: Shang XiaoJing Acked-by: Hugues Fruchet Signed-off-by: Hans Verkuil drivers/media/platform/st/stm32/stm32-dcmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1733197b71aae2f725357720e662be572d220fb3 Author: Liu Shixin Date: Thu Sep 22 22:30:38 2022 +0800 media: aspeed: use DEFINE_SHOW_ATTRIBUTE to simplify code Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Hans Verkuil drivers/media/platform/aspeed/aspeed-video.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 54be4c5b56b2c11b68f584d2516c1e37a64e1fd8 Author: Gaosheng Cui Date: Sun Sep 11 17:15:19 2022 +0800 media: zoran: remove unused declarations in zoran_device.h jpg_bufsize and v4l_bufsize have been removed since commit 202ddbc9a33b ("media: staging: media: zoran: clean unused code"), so remove them. Signed-off-by: Gaosheng Cui Signed-off-by: Hans Verkuil drivers/media/pci/zoran/zoran_device.h | 2 -- 1 file changed, 2 deletions(-) commit cecae4614cae62e26d0efcfddfef521c525ad18e Author: Gaosheng Cui Date: Sun Sep 11 17:15:18 2022 +0800 bttv: remove unused tea5757_set_freq declaration tea5757_set_freq has been removed since commit 1b500373157c ("[media] bttv: Convert to generic TEA575x interface"). So tea5757_set_freq is a unused declaration, remove it. Signed-off-by: Gaosheng Cui Signed-off-by: Hans Verkuil drivers/media/pci/bt8xx/bttv.h | 1 - 1 file changed, 1 deletion(-) commit 060d290e374083b58a8c32a2ee545c3835460720 Author: Gaosheng Cui Date: Sun Sep 11 17:15:17 2022 +0800 cx25821: remove unused cx25821_video_wakeup() declaration cx25821_video_wakeup() has been removed since commit b671ae6bdc1a ("[media] cx25821: convert to vb2"). So cx25821_video_wakeup is a unused declaration, remove it. Signed-off-by: Gaosheng Cui Signed-off-by: Hans Verkuil drivers/media/pci/cx25821/cx25821-video.h | 3 --- 1 file changed, 3 deletions(-) commit b08b10af2e512438a9b54bfc884b2288564b7068 Author: Gaosheng Cui Date: Sun Sep 11 17:15:16 2022 +0800 saa7164: remove unused saa7164_call_i2c_clients declaration saa7164_call_i2c_clients has been removed in media/video since commit 5a6fa3fe9a46 ("[media] saa7164: Remove unused saa7164_call_i2c_clients()"). Then media/video has beed renamed media/pci since commit b285192a43f0 ("[media] rename most media/video pci drivers to media/pci"). So saa7164_call_i2c_clients is a unused declaration, remove it. Signed-off-by: Gaosheng Cui Signed-off-by: Hans Verkuil drivers/media/pci/saa7164/saa7164.h | 2 -- 1 file changed, 2 deletions(-) commit b43cacef9f0f3ae697d25c9a53cad520f8efeb00 Author: Gaosheng Cui Date: Sun Sep 11 17:15:15 2022 +0800 media: saa7134: remove unused declarations in saa7134.h saa7134_mixer_fops and saa7134_dsp_fops have been removed in media/video since commit 166fb6b4721f ("V4L/DVB (6623): remove saa7134-oss"). Then media/video has been renamed to media/pci since commit b285192a43f0 ("[media] rename most media/video pci drivers to media/pci"). saa7134_vbi_template has been removed since commit a9622391acbc ("V4L/DVB (6792): Fix VBI support"). so saa7134_mixer_fops, saa7134_dsp_fops and saa7134_vbi_template are unused declarations, remove them. Signed-off-by: Gaosheng Cui Signed-off-by: Hans Verkuil drivers/media/pci/saa7134/saa7134.h | 4 ---- 1 file changed, 4 deletions(-) commit 141b5d5ee5323851476b6067cfc28d59fca7b998 Author: Gaosheng Cui Date: Sun Sep 11 17:15:14 2022 +0800 media: cxd2820r: remove unused cxd2820r_debug declaration cxd2820r_debug has been removed since commit 75aeafc9d0e2 ("[media] cxd2820r: switch to Kernel dev_* logging"), so remove it. Signed-off-by: Gaosheng Cui Signed-off-by: Hans Verkuil drivers/media/dvb-frontends/cxd2820r_priv.h | 2 -- 1 file changed, 2 deletions(-) commit 25e7c35d3a68fce5036faec9b3e12c4769499755 Author: Gaosheng Cui Date: Sun Sep 11 17:15:12 2022 +0800 media: dvb-frontends: remove unused drx_dap_fasi_funct_g declaration drx_dap_fasi_funct_g has been removed since commit 80bff4b07595 ("[media] drx-j: get rid of struct drx_dap_fasi_funct_g"), so remove it. Signed-off-by: Gaosheng Cui Signed-off-by: Hans Verkuil drivers/media/dvb-frontends/drx39xyj/drx_dap_fasi.h | 2 -- 1 file changed, 2 deletions(-) commit 7412090cd631cf29b28de90eebf45ca8f3d0e80a Author: Teoh Ji Sheng Date: Wed Sep 21 02:45:19 2022 +0000 ARM: dts: socfpga: arria10: Increase NAND boot partition size Content in NAND boot partition have exceeded 32MB defined in device tree node. Increase boot partition size to 37MB to support larger kernel Image and FPGA bitstream. Signed-off-by: Teoh Ji Sheng Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10_socdk_nand.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6eed169c7fefd9cdbbccb5ba7a98470cc0c09c63 Author: Peng Fan Date: Fri Oct 21 12:15:26 2022 +0800 remoteproc: imx_rproc: Enable attach recovery for i.MX8QM/QXP i.MX8QM/QXP M4 could recover without help from Linux, so to support it: - enable feature RPROC_FEAT_ATTACH_ON_RECOVERY - set recovery_disabled as false Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20221021041526.3696483-8-peng.fan@oss.nxp.com Signed-off-by: Mathieu Poirier drivers/remoteproc/imx_rproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 99b142cf7191b08adcd23f700ea0a3d7dffdd0c1 Author: Peng Fan Date: Fri Oct 21 12:15:25 2022 +0800 remoteproc: imx_rproc: Request mbox channel later It is possible that when remote processor crash, the communication channel will be broken with garbage value in mailbox, such as when Linux is issuing a message through mailbox, remote processor crashes, we need free & rebuild the mailbox channels to make sure no garbage value in mailbox channels. So move the request/free to start/stop for managing remote procesosr in Linux, move to attach/detach for remote processor is out of control of Linux. Previous, we just request mbox when attach for CM4 boot early before Linux, but if mbox defer probe, remoteproc core will do resource cleanup and corrupt resource table for later probe. So move request mbox ealier and still keep mbox request when attach for self recovery case, but keep a check when request/free mbox. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20221021041526.3696483-7-peng.fan@oss.nxp.com Signed-off-by: Mathieu Poirier drivers/remoteproc/imx_rproc.c | 48 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) commit fcd382b23dcf16732964aca491660da676c3c44f Author: Peng Fan Date: Fri Oct 21 12:15:24 2022 +0800 remoteproc: imx_rproc: Support i.MX8QM Most logic are same as i.MX8QXP, but i.MX8QM has two general purpose M4 cores, the two cores runs independently and they have different resource id, different start address from SCFW view. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20221021041526.3696483-6-peng.fan@oss.nxp.com Signed-off-by: Mathieu Poirier drivers/remoteproc/imx_rproc.c | 47 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) commit c94ea666dc81e8164de1ee4b3b564af0e7cd942b Author: Peng Fan Date: Fri Oct 21 12:15:23 2022 +0800 remoteproc: imx_rproc: Support kicking Mcore from Linux for i.MX8QXP When M4 is in the same hardware partition with Cortex-A, it could be start/stop by Linux. Added power domain to make sure M4 could run, it requires several power domains to work. Make clock always optional for i.MX8QXP, because SCFW handles it when power up M4 core. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20221021041526.3696483-5-peng.fan@oss.nxp.com Signed-off-by: Mathieu Poirier drivers/remoteproc/imx_rproc.c | 96 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 3 deletions(-) commit 5e50aef2632e74db58d61c8e86bd767dc28a7970 Author: Peng Fan Date: Fri Oct 21 12:15:22 2022 +0800 remoteproc: imx_rproc: Support attaching to i.MX8QXP M4 When M4 is kicked by SCFW, M4 runs in its own hardware partition, Linux could only do IPC with M4, it could not start, stop, update image. We disable recovery reboot when M4 is managed by SCFW, because remoteproc core still not support M4 auto-recovery without loading image. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20221021041526.3696483-4-peng.fan@oss.nxp.com Signed-off-by: Mathieu Poirier drivers/remoteproc/imx_rproc.c | 108 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 1 deletion(-) commit 505066645f3f14c15abd0875654fbc7b0610ca2e Author: Peng Fan Date: Fri Oct 21 12:15:21 2022 +0800 dt-bindings: remoteproc: imx_rproc: Support i.MX8QM Add i.MX8QM compatible. Reviewed-by: Rob Herring Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20221021041526.3696483-3-peng.fan@oss.nxp.com Signed-off-by: Mathieu Poirier Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 1 + 1 file changed, 1 insertion(+) commit 190362e03bed3f7bde7635f14c955fc9ed96eb78 Author: Peng Fan Date: Fri Oct 21 12:15:20 2022 +0800 dt-bindings: remoteproc: imx_rproc: Support i.MX8QXP Add i.MX8QXP compatible Add a new property fsl,resource-id for SoC which supports SCFW. This property is used to check whether remote process is under control of Linux or not. Add fsl,entry-address to specify the entry address which used by SCFW to kick M4. To i.MX8QM/QXP, when M4 is in the same hardware partition with Cortex-A cores, need power up M4 through SCFW, then M4 could start. So introduce power-domains property. Reviewed-by: Rob Herring Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20221021041526.3696483-2-peng.fan@oss.nxp.com Signed-off-by: Mathieu Poirier .../devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 47e6ab07018edebf94ce873cf50a05ec76ff2dde Author: Shengjiu Wang Date: Fri Sep 30 15:50:16 2022 +0800 remoteproc: imx_dsp_rproc: Add mutex protection for workqueue The workqueue may execute late even after remoteproc is stopped or stopping, some resources (rpmsg device and endpoint) have been released in rproc_stop_subdevices(), then rproc_vq_interrupt() accessing these resources will cause kennel dump. Call trace: virtqueue_add_split+0x1ac/0x560 virtqueue_add_inbuf+0x4c/0x60 rpmsg_recv_done+0x15c/0x294 vring_interrupt+0x6c/0xa4 rproc_vq_interrupt+0x30/0x50 imx_dsp_rproc_vq_work+0x24/0x40 [imx_dsp_rproc] process_one_work+0x1d0/0x354 worker_thread+0x13c/0x470 kthread+0x154/0x160 ret_from_fork+0x10/0x20 Add mutex protection in imx_dsp_rproc_vq_work(), if the state is not running, then just skip calling rproc_vq_interrupt(). Also the flush workqueue operation can't be added in rproc stop for the same reason. The call sequence is rproc_shutdown -> rproc_stop ->rproc_stop_subdevices ->rproc->ops->stop() ->imx_dsp_rproc_stop ->flush_work -> rproc_vq_interrupt The resource needed by rproc_vq_interrupt has been released in rproc_stop_subdevices, so flush_work is not safe to be called in imx_dsp_rproc_stop. Fixes: ec0e5549f358 ("remoteproc: imx_dsp_rproc: Add remoteproc driver for DSP on i.MX") Signed-off-by: Shengjiu Wang Reviewed-by: Peng Fan Cc: stable Link: https://lore.kernel.org/r/1664524216-19949-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mathieu Poirier drivers/remoteproc/imx_dsp_rproc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit a16b72612bb98a3ef6546bf52569643ddba0104f Author: Horatiu Vultur Date: Thu Sep 15 08:41:12 2022 +0200 ARM: dts: lan966x: Add interrupt support for PHYs on pcb8290 Add interrupt support for the PHYs found on pcb8290. They are all sharing the same interrupt line towards lan966x. Signed-off-by: Horatiu Vultur Acked-by: Nicolas Ferre Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220915064112.1935051-1-horatiu.vultur@microchip.com arch/arm/boot/dts/lan966x-pcb8290.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 65fcf3872f83d63fb7268e05d4b02640df14126e Author: Shengjiu Wang Date: Tue Oct 18 21:44:04 2022 +0800 remoteproc: core: Auto select rproc-virtio device id With multiple remoteproc device, there will below error: sysfs: cannot create duplicate filename '/bus/platform/devices/rproc-virtio.0' The rvdev_data.index is duplicate, that cause issue, so need to use the PLATFORM_DEVID_AUTO instead. After fixing device name it becomes something like: /bus/platform/devices/rproc-virtio.2.auto Fixes: 1d7b61c06dc3 ("remoteproc: virtio: Create platform device for the remoteproc_virtio") Signed-off-by: Shengjiu Wang Reviewed-by: Arnaud Pouliquen Reviewed-by: Mukesh Ojha Tested-by: Peng Fan Link: https://lore.kernel.org/r/1666100644-27010-1-git-send-email-shengjiu.wang@nxp.com [Fixed typographical error in comment block] Signed-off-by: Mathieu Poirier drivers/remoteproc/remoteproc_core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit c791730f2554a9ebb8f18df9368dc27d4ebc38c2 Author: Shigeru Yoshida Date: Sun Oct 23 18:57:41 2022 +0900 udf: Avoid double brelse() in udf_rename() syzbot reported a warning like below [1]: VFS: brelse: Trying to free free buffer WARNING: CPU: 2 PID: 7301 at fs/buffer.c:1145 __brelse+0x67/0xa0 ... Call Trace: invalidate_bh_lru+0x99/0x150 smp_call_function_many_cond+0xe2a/0x10c0 ? generic_remap_file_range_prep+0x50/0x50 ? __brelse+0xa0/0xa0 ? __mutex_lock+0x21c/0x12d0 ? smp_call_on_cpu+0x250/0x250 ? rcu_read_lock_sched_held+0xb/0x60 ? lock_release+0x587/0x810 ? __brelse+0xa0/0xa0 ? generic_remap_file_range_prep+0x50/0x50 on_each_cpu_cond_mask+0x3c/0x80 blkdev_flush_mapping+0x13a/0x2f0 blkdev_put_whole+0xd3/0xf0 blkdev_put+0x222/0x760 deactivate_locked_super+0x96/0x160 deactivate_super+0xda/0x100 cleanup_mnt+0x222/0x3d0 task_work_run+0x149/0x240 ? task_work_cancel+0x30/0x30 do_exit+0xb29/0x2a40 ? reacquire_held_locks+0x4a0/0x4a0 ? do_raw_spin_lock+0x12a/0x2b0 ? mm_update_next_owner+0x7c0/0x7c0 ? rwlock_bug.part.0+0x90/0x90 ? zap_other_threads+0x234/0x2d0 do_group_exit+0xd0/0x2a0 __x64_sys_exit_group+0x3a/0x50 do_syscall_64+0x34/0xb0 entry_SYSCALL_64_after_hwframe+0x63/0xcd The cause of the issue is that brelse() is called on both ofibh.sbh and ofibh.ebh by udf_find_entry() when it returns NULL. However, brelse() is called by udf_rename(), too. So, b_count on buffer_head becomes unbalanced. This patch fixes the issue by not calling brelse() by udf_rename() when udf_find_entry() returns NULL. Link: https://syzkaller.appspot.com/bug?id=8297f45698159c6bca8a1f87dc983667c1a1c851 [1] Reported-by: syzbot+7902cd7684bc35306224@syzkaller.appspotmail.com Signed-off-by: Shigeru Yoshida Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221023095741.271430-1-syoshida@redhat.com fs/udf/namei.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0d2aa70b8f58c382059fe847fdaa65f05361fc1c Author: Ard Biesheuvel Date: Tue Oct 18 08:22:13 2022 +0000 apei/ghes: Use xchg_release() for updating new cache slot instead of cmpxchg() Some documentation first, about how this machinery works: It seems, the intent of the GHES error records cache is to collect already reported errors - see the ghes_estatus_cached() checks. There's even a sentence trying to say what this does: /* * GHES error status reporting throttle, to report more kinds of * errors, instead of just most frequently occurred errors. */ New elements are added to the cache this way: if (!ghes_estatus_cached(estatus)) { if (ghes_print_estatus(NULL, ghes->generic, estatus)) ghes_estatus_cache_add(ghes->generic, estatus); The intent being, once this new error record is reported, it gets cached so that it doesn't get reported for a while due to too many, same-type error records getting reported in burst-like scenarios. I.e., new, unreported error types can have a higher chance of getting reported. Now, the loop in ghes_estatus_cache_add() is trying to pick out the oldest element in there. Meaning, something which got reported already but a long while ago, i.e., a LRU-type scheme. And the cmpxchg() is there presumably to make sure when that selected element slot_cache is removed, it really *is* that element that gets removed and not one which replaced it in the meantime. Now, ghes_estatus_cache_add() selects a slot, and either succeeds in replacing its contents with a pointer to a newly cached item, or it just gives up and frees the new item again, without attempting to select another slot even if one might be available. Since only inserting new items is being done here, the race can only cause a failure if the selected slot was updated with another new item concurrently, which means that it is arbitrary which of those two items gets dropped. And "dropped" here means, the item doesn't get added to the cache so the next time it is seen, it'll get reported again and an insertion attempt will be done again. Eventually, it'll get inserted and all those times when the insertion fails, the item will get reported although the cache is supposed to prevent that and "ratelimit" those repeated error records. Not a big deal in any case. This means the cmpxchg() and the special case are not necessary. Therefore, just drop the existing item unconditionally. Move the xchg_release() and call_rcu() out of rcu_read_lock/unlock section since there is no actually dereferencing the pointer at all. [ bp: - Flesh out and summarize what was discussed on the thread now that that cache contraption is understood; - Touch up code style. ] Co-developed-by: Jia He Signed-off-by: Jia He Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221010023559.69655-7-justin.he@arm.com drivers/acpi/apei/ghes.c | 60 ++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 27 deletions(-) commit cc5b2ad5393ec237c8697bb3989a34c0c3beb2f6 Author: Kartik Date: Fri Oct 7 15:21:07 2022 +0530 soc/tegra: fuse: Add nvmem keepout list On Tegra186 and later, various FUSE offsets are restricted and cannot be accessed from CCPLEX. Currently nvmem binary interface allows reading such offsets from userspace, which results in RAS errors. Add nvmem keepout lists to avoid any reads to restricted offsets. Signed-off-by: Kartik Signed-off-by: Thierry Reding drivers/soc/tegra/fuse/fuse-tegra.c | 2 ++ drivers/soc/tegra/fuse/fuse-tegra30.c | 38 +++++++++++++++++++++++++++++++++++ drivers/soc/tegra/fuse/fuse.h | 2 ++ 3 files changed, 42 insertions(+) commit bea06d776d8b2caeddc45f4810ac1d8dab09b006 Author: Kartik Date: Fri Oct 7 15:21:06 2022 +0530 soc/tegra: fuse: Use SoC specific nvmem cells Tegra FUSE block size, availability and offsets can vary from one SoC generation to another. Signed-off-by: Kartik Signed-off-by: Thierry Reding drivers/soc/tegra/fuse/fuse-tegra.c | 110 +--------------- drivers/soc/tegra/fuse/fuse-tegra30.c | 240 +++++++++++++++++++++++++++++++++- drivers/soc/tegra/fuse/fuse.h | 2 + 3 files changed, 241 insertions(+), 111 deletions(-) commit 7235cdd9cc5230d763facfbd013441e435be25b3 Author: Sameer Pujar Date: Fri Sep 30 19:26:34 2022 +0530 arm64: defconfig: Enable SND_ALOOP Enable generic PCM loopback driver. On NVIDIA Jetson platforms, customers use this to loop data between container based applications and host OS. Signed-off-by: Sameer Pujar Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 13e4cd4a4073e071b66f6d4f715e171788cb2646 Author: Sameer Pujar Date: Fri Sep 30 19:26:33 2022 +0530 arm64: defconfig: Enable couple of audio codecs Enable RT5640 and TAS2552 audio codec drivers. NVIDIA Jetson platforms have 40-pin GPIO expanders where custom audio cards can be connected. Support for above codecs is typically required. Also NVIDIA Jetson AGX Orin platform has RT5640 as onboard codec. To support these enable driver build for these codecs. Signed-off-by: Sameer Pujar Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 28dbe8231066850ca5eaae55abf5a967f470eccd Author: Petlozu Pravareshwar Date: Sun Oct 2 17:54:25 2022 +0000 soc/tegra: pmc: Select IRQ_DOMAIN_HIERARCHY Tegra PMC driver depends on IRQ domain hierarchy support, hence select the IRQ_DOMAIN_HIERARCHY config for SOC_TEGRA_PMC. Signed-off-by: Petlozu Pravareshwar Signed-off-by: Thierry Reding drivers/soc/tegra/Kconfig | 1 + 1 file changed, 1 insertion(+) commit bc29d5bd2ba977716e57572030290d6547ff3f6d Author: Vlastimil Babka Date: Fri Aug 26 11:09:11 2022 +0200 mm/slub: perform free consistency checks before call_rcu For SLAB_TYPESAFE_BY_RCU caches we use call_rcu to perform empty slab freeing. The rcu callback rcu_free_slab() calls __free_slab() that currently includes checking the slab consistency for caches with SLAB_CONSISTENCY_CHECKS flags. This check needs the slab->objects field to be intact. Because in the next patch we want to allow rcu_head in struct slab to become larger in debug configurations and thus potentially overwrite more fields through a union than slab_list, we want to limit the fields used in rcu_free_slab(). Thus move the consistency checks to free_slab() before call_rcu(). This can be done safely even for SLAB_TYPESAFE_BY_RCU caches where accesses to the objects can still occur after freeing them. As a result, only the slab->slab_cache field has to be physically separate from rcu_head for the freeing callback to work. We also save some cycles in the rcu callback for caches with consistency checks enabled. Signed-off-by: Vlastimil Babka Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> mm/slub.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 0dafb7e671f0e769c854609548037754a68dcbc6 Author: Li zeming Date: Wed Oct 12 18:42:35 2022 +0800 fs: udf: Optimize udf_free_in_core_inode and udf_find_fileset function These two functions perform the following optimizations. 1. Delete the type cast of foo pointer. Void * does not need to convert the type. 2. Delete the initialization assignment of bh variable, which is assigned first. Signed-off-by: Li zeming Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221012104235.3331-1-zeming@nfschina.com fs/udf/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 03fd1402bd7d93bd4598fc961632ef2737a500fd Merge: b4dd412d4a62 0a26bde2c9db Author: Christian Brauner Date: Mon Oct 24 16:43:21 2022 +0200 Merge branch 'fs.acl.rework' into for-next commit 6dbd4341b9da2063d86cdf4ed8d051e2617506b0 Author: Quan Nguyen Date: Mon Oct 24 14:59:56 2022 +0700 ipmi: ssif_bmc: Use EPOLLIN instead of POLLIN This fixes the following sparse warning: sparse warnings: (new ones prefixed by >>) >> drivers/char/ipmi/ssif_bmc.c:254:22: sparse: sparse: invalid assignment: |= >> drivers/char/ipmi/ssif_bmc.c:254:22: sparse: left side has type restricted __poll_t >> drivers/char/ipmi/ssif_bmc.c:254:22: sparse: right side has type int Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver") Reported-by: kernel test robot Link: https://lore.kernel.org/all/202210181103.ontD9tRT-lkp@intel.com/ Signed-off-by: Quan Nguyen Message-Id: <20221024075956.3312552-1-quan@os.amperecomputing.com> Signed-off-by: Corey Minyard drivers/char/ipmi/ssif_bmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55201afd6e8ad6b5e349bff32331806e17c5d57e Merge: 6d0cebbdf299 0e1f0b1ca79f Author: Mark Brown Date: Mon Oct 24 15:12:28 2022 +0100 spi: pxa2xx: Pass the SSP type via device property Merge series from Andy Shevchenko : Currently the SPI PXA2xx devices on Intel platforms can be instantiated via the following paths: 1) as ACPI LPSS device on Haswell, Bay Trail and Cherry Trail; 2) as ACPI LPSS device on the Sky Lake and newer; 3) as PCI LPSS device on Haswell, Bay Trail and Cherry Trail; 4) as PCI LPSS device on the Sky Lake and newer; 5) as PCI device via ID table. Each of these cases provides some platform related data differently, i.e.: 1) via drivers/acpi/acpi_lpss.c and drivers/spi/spi-pxa2xx.c 2) via drivers/mfd/intel-lpss-acpi.c 3) via drivers/spi/spi-pxa2xx-pci.c 4) via drivers/mfd/intel-lpss-pci.c and drivers/spi/spi-pxa2xx.c 5) via drivers/spi/spi-pxa2xx-pci.c This approach has two downsides: a) there is no data propagated in the case #2 because we can't have two or more drivers to match the same ACPI ID and hence some cases are still not supported (Sky Lake and newer ACPI enabled LPSS); b) the data is duplicated over two drivers in the cases #1 & #4 and, besides to be a bloatware, it is error prone (e.g. Lakefield has a wrong data right now due to missed PCI entry in the spi-pxa2xx.c). This series fixes the downsides, and enables previously unsupported cases. commit e5530adc17a79f2a93e8b35e0ce673fc33f5f663 Author: Andy Shevchenko Date: Fri Oct 7 12:53:44 2022 +0300 pinctrl: Clean up headers There is a few things done: - include only the headers we are direct user of - when pointer is in use, provide a forward declaration - add missing headers - group generic headers and subsystem headers - sort each group alphabetically While at it, fix some awkward indentations. Signed-off-by: Andy Shevchenko drivers/pinctrl/core.c | 19 ++++++++++--------- drivers/pinctrl/core.h | 12 +++++++++++- drivers/pinctrl/devicetree.h | 6 ++++++ drivers/pinctrl/pinconf.h | 10 ++++++++++ drivers/pinctrl/pinctrl-utils.h | 5 +++++ drivers/pinctrl/pinmux.c | 17 ++++++++++------- drivers/pinctrl/pinmux.h | 11 +++++++++++ include/linux/pinctrl/consumer.h | 31 ++++++++++++++----------------- include/linux/pinctrl/devinfo.h | 6 ++++-- include/linux/pinctrl/machine.h | 8 +++++--- include/linux/pinctrl/pinconf-generic.h | 23 +++++++++++++---------- include/linux/pinctrl/pinctrl.h | 18 +++++++++--------- include/linux/pinctrl/pinmux.h | 5 ++--- 13 files changed, 110 insertions(+), 61 deletions(-) commit de23ccb1edc84f0f59f09b157b082110fb40789c Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: intel: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-intel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cc994a0a76a87108ec3fac10bb906ff9d934c3c9 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: merrifield: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-merrifield.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c4168db7c8172711c1dcdcc952da2980e1533cca Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: lynxpoint: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-lynxpoint.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 414fb9f290e09e72c5e3e100d3a2c0a8f8aa8ae1 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: cherryview: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg drivers/pinctrl/intel/pinctrl-cherryview.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e9d10adcd469806b6d85ee0b1c9081c79c893098 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: zynqmp: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/pinctrl-zynqmp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 24b4d76a5a2d7cf0b8b1f059da6b2accd339b7e7 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: uniphier: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2188191f7febe3fcc15e17f428f39c79c118f8f4 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: ti-iodelay: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit eebeeb53c580f0aeddebfc20c93ce70b7b8a5300 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: tegra: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/tegra/pinctrl-tegra-xusb.c | 7 +++++-- drivers/pinctrl/tegra/pinctrl-tegra.c | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) commit 1fe030494ebd02858d89cb13af258b3608f77af1 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: sunxi: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/sunxi/pinctrl-sunxi.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 8f27fb48a26bff360675320fbc227ba39f559a58 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: stmfx: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Signed-off-by: Andy Shevchenko drivers/pinctrl/pinctrl-stmfx.c | 2 ++ 1 file changed, 2 insertions(+) commit 7338faa4ed0b5ec511ede43a6d4fdae52ed5851a Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: stm32: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/stm32/pinctrl-stm32.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 042b93c9b6662b9336f1642eccd56796ff7ac56a Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: starfive: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Signed-off-by: Andy Shevchenko Acked-by: Emil Renner Berthing drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 3 +++ 1 file changed, 3 insertions(+) commit 1635b1d8126e2d7c4030b3c5ef37e00344b88ff6 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: st: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Reviewed-by: Patrice Chotard drivers/pinctrl/pinctrl-st.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 82a045ab274df4d5039f17f6ec547c5fcda6d07a Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: sprd: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Reviewed-by: Baolin Wang drivers/pinctrl/sprd/pinctrl-sprd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f993216dd2448c9c627416fd873663baf7be2288 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: spear: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar drivers/pinctrl/spear/pinctrl-spear.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 486e0d876db2f21c204cb31a076e602b25dde6c3 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: single: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/pinctrl-single.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2420cd5f7e01674e664e07eaa826107cbdff3da9 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: samsung: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Reviewed-by: Krzysztof Kozlowski drivers/pinctrl/samsung/pinctrl-samsung.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2fb98ab403720f2ddd731cdebdf706c5be3b3c24 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: renesas: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven drivers/pinctrl/renesas/pinctrl-rzg2l.c | 7 +++++-- drivers/pinctrl/renesas/pinctrl-rzn1.c | 8 ++++++-- drivers/pinctrl/renesas/pinctrl-rzv2m.c | 4 +++- drivers/pinctrl/renesas/pinctrl.c | 8 +++++--- 4 files changed, 19 insertions(+), 8 deletions(-) commit aa9430f8a6de9b56247b9d0316801d87c20b6779 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: qcom: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 4 ++++ drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 9 +++++++-- drivers/pinctrl/qcom/pinctrl-msm.c | 25 ++++++++++++++----------- drivers/pinctrl/qcom/pinctrl-msm.h | 5 +++++ drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 8 +++++--- drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 8 +++++--- drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 18 ++++++++++-------- drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 18 ++++++++++-------- 8 files changed, 60 insertions(+), 35 deletions(-) commit 8be7f6c8d1aaf5cf5138121e7081b33155da0256 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: ocelot: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Acked-by: Horatiu Vultur drivers/pinctrl/pinctrl-ocelot.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6272cc50bfb70ccffd385364a301d4730d2fe64f Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: npcm7xx: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b1a3bd1c67c77d2daf0ed6d8cae8b0c9f5e86128 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: mvebu: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/mvebu/pinctrl-mvebu.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 54da3e1be32d4cab06e19afad36ef315782d2bdc Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: microchip-sgpio: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Signed-off-by: Andy Shevchenko drivers/pinctrl/pinctrl-microchip-sgpio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9abef9f2edde2fca79fd0cffb0771727defce6b3 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: mediatek: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Signed-off-by: Andy Shevchenko Reviewed-by: AngeloGioacchino Del Regno drivers/pinctrl/mediatek/pinctrl-moore.c | 3 +++ drivers/pinctrl/mediatek/pinctrl-paris.c | 5 +++++ 2 files changed, 8 insertions(+) commit c2ecb0273c2026844c8921375c42ddbac8bec16a Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: lpc18xx: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/pinctrl-lpc18xx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b2fd05c7f746f58bc98516c7668f80e6f96477b5 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: lochnagar: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Acked-by: Charles Keepax drivers/pinctrl/cirrus/pinctrl-lochnagar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d854028a1f642fc89ffb54bea838e424657ed89a Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: lantiq: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/pinctrl-falcon.c | 9 +++++---- drivers/pinctrl/pinctrl-lantiq.c | 5 +++-- drivers/pinctrl/pinctrl-lantiq.h | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) commit 93c9dc90f991ce3660f5ed0daf40d3c54b3e0dd4 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: k210: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Reviewed-by: Damien Le Moal drivers/pinctrl/pinctrl-k210.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 9b69b7d721f0aa3245c2a48650a3045ba59f9b66 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: ingenic: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Paul Cercueil drivers/pinctrl/pinctrl-ingenic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6e8bc379033348ac296ba81fb60cb61ae60c85aa Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: imx: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx.c | 8 +++++--- drivers/pinctrl/freescale/pinctrl-imx1-core.c | 4 +++- drivers/pinctrl/freescale/pinctrl-mxs.c | 7 +++++-- 3 files changed, 13 insertions(+), 6 deletions(-) commit b7348441f7e28359f3d0cef033caf800a032a041 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: gemini: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/pinctrl-gemini.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 9c0c752591923769b60f899e2f3d8d20e277213b Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: cy8c95x0: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Signed-off-by: Andy Shevchenko drivers/pinctrl/pinctrl-cy8c95x0.c | 1 + 1 file changed, 1 insertion(+) commit 2b4e275b92b82850c65b6252bfe4740f1c7f4173 Author: Colin Ian King Date: Mon Oct 24 14:08:03 2022 +0100 ALSA: asihpi: remove variable loops Variable loops is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221024130803.2156295-1-colin.i.king@gmail.com Signed-off-by: Takashi Iwai sound/pci/asihpi/asihpi.c | 2 -- 1 file changed, 2 deletions(-) commit 72457b3abb0c070f73b4a5311d7223cc23d6c6d7 Author: Colin Ian King Date: Mon Oct 24 14:04:15 2022 +0100 ALSA: rawmidi: remove variable dest_frames Variable dest_frames is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221024130415.2155860-1-colin.i.king@gmail.com Signed-off-by: Takashi Iwai sound/core/rawmidi.c | 2 -- 1 file changed, 2 deletions(-) commit 6a4628997cfcc1eb1e34943f011d85bae36eadbc Author: Paulo Miguel Almeida Date: Mon Oct 24 13:57:42 2022 +1300 HID: hyperv: remove unused struct synthhid_msg struct synthhid_msg was meant to be a generic representation of the possible protocol messages sent through VMBus. In practice, only the header is read and depending on the message type, a cast to the actual type is done. Also, SYNTHHID_MAX_INPUT_REPORT_SIZE constant isn't used which I suspect is a leftover from the refactoring made while this driver was at the staging folder. This patch removes struct synthhid_msg and refactor the code accordingly. Signed-off-by: Paulo Miguel Almeida Reviewed-by: Michael Kelley Signed-off-by: Jiri Kosina drivers/hid/hid-hyperv.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 228722c519644f8fee2ef75fe8e9d53cd40a3c6c Author: Thierry Reding Date: Thu Sep 22 15:41:25 2022 +0200 firmware: tegra: bpmp: Do not support big-endian The CPU and BPMP inter-processor communication code is only partially endian-aware, so it doesn't work properly when run on a big-endian CPU anyway. Running Tegra SoCs in big-endian mode has also never been supported, especially not on those with 64-bit ARM processors. If big-endian support ever becomes necessary this can be added back but will need additional fixes for completeness. Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp-debugfs.c | 42 ++++++++++++++++------------------- drivers/firmware/tegra/bpmp.c | 2 +- 2 files changed, 20 insertions(+), 24 deletions(-) commit 4c1e0a97351a5e88e7e503b40cdbe0f220039a5e Author: Thierry Reding Date: Thu Sep 22 15:41:24 2022 +0200 firmware: tegra: bpmp: Use iosys-map helpers The shared memory used for inter-processor communication between the CPU and the BPMP can reside either in system memory or in I/O memory. Use the iosys-map helpers to abstract these differences away. Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp-tegra186.c | 36 ++++--- drivers/firmware/tegra/bpmp-tegra210.c | 7 +- drivers/firmware/tegra/bpmp.c | 31 +++--- drivers/firmware/tegra/ivc.c | 150 ++++++++++++++++++----------- drivers/thermal/tegra/tegra-bpmp-thermal.c | 15 +-- include/soc/tegra/bpmp.h | 17 +++- include/soc/tegra/ivc.h | 11 ++- 7 files changed, 159 insertions(+), 108 deletions(-) commit 236d3907aa7c03168dbc4d0e8faa77d10bbb969f Author: Thierry Reding Date: Thu Sep 22 15:41:23 2022 +0200 firmware: tegra: bpmp: Prefer u32 over uint32_t The canonical type for 32-bit unsigned integers in the kernel is u32, so use that instead of uint32_t. Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp-debugfs.c | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) commit 4f494028c7ff4e77173f8f618bcf28dd77803758 Author: Dmitry Torokhov Date: Mon Oct 24 05:32:07 2022 -0700 iio: adc: twl4030-madc: add missing of.h include The driver is using of_device_id/of_match_ptr() and therefore needs to include of.h header. We used to get this definition indirectly via inclusion of matrix_keypad.h from twl.h, but we are cleaning up matrix_keypad.h from unnecessary includes. Reviewed-by: Andy Shevchenko Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20220927154611.3330871-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov drivers/iio/adc/twl4030-madc.c | 1 + 1 file changed, 1 insertion(+) commit 2cfcc1085d3b7b7c893be41034853d4c63a41092 Author: Ban Tao Date: Sun Oct 23 00:44:45 2022 -0700 ASoC: sun50i-dmic: avoid unused variable warning for sun50i_dmic_of_match In configurations with CONFIG_OF=n, we get a harmless build warning: sound/soc/sunxi/sun50i-dmic.c:268:34: warning: unused variable 'sun50i_dmic_of_match' [-Wunused-const-variable] Signed-off-by: Ban Tao Reported-by: kernel test robot Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/1666511085-2748-1-git-send-email-fengzheng923@gmail.com Signed-off-by: Mark Brown sound/soc/sunxi/sun50i-dmic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e2b014eeb257173c72014ebd02ab0d60643f0f8 Author: Mikko Perttunen Date: Tue Sep 20 11:11:57 2022 +0300 dt-bindings: Add headers for NVDEC on Tegra234 Add clock, memory controller, powergate and reset dt-binding headers necessary for NVDEC. Signed-off-by: Mikko Perttunen Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding include/dt-bindings/clock/tegra234-clock.h | 4 ++++ include/dt-bindings/memory/tegra234-mc.h | 3 +++ include/dt-bindings/power/tegra234-powergate.h | 1 + include/dt-bindings/reset/tegra234-reset.h | 1 + 4 files changed, 9 insertions(+) commit 0e1f0b1ca79fdcc03c3e6b4277a994ca894c9fcc Author: Andy Shevchenko Date: Fri Oct 21 22:00:18 2022 +0300 spi: pxa2xx: Move OF and ACPI ID tables closer to their user There is no code that uses ID tables directly, except the struct device_driver at the end of the file. Hence, move tables closer to its user. It's always possible to access them via pointer to a platform device. Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20221021190018.63646-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 07c337927e0618faf22ea98475c7162e6b7d2b35 Author: Andy Shevchenko Date: Fri Oct 21 22:00:17 2022 +0300 spi: pxa2xx: Remove no more needed PCI ID table Since the PCI enumerated devices provide a property with SSP type, there is no more necessity to bear the copy of the ID table here. Remove it for good. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221021190018.63646-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 117 +---------------------------------------------- 1 file changed, 2 insertions(+), 115 deletions(-) commit 1a1864cd879a1497fd46f6ea2f31ddcde8385585 Author: Andy Shevchenko Date: Fri Oct 21 22:00:16 2022 +0300 spi: pxa2xx: Respect Intel SSP type given by a property Allow to set the Intel SSP type by reading the property. Only apply this to the known MFD enumerated LPSS devices. The check is done by the looking for the specifically named IO memory resource provided by upper layer. This won't be an issue in the future because we strictly prioritize the order in which we are looking for the SSP type in the code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221021190018.63646-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 88a947215c29aa49307c8cd0638ba54e4cf07391 Author: Andy Shevchenko Date: Fri Oct 21 22:00:15 2022 +0300 spi: pxa2xx: Validate the correctness of the SSP type Currently we blindly apply the SSP type value from any source of the information. Increase robustness by validating the value before use. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221021190018.63646-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 6 ++++-- include/linux/pxa2xx_ssp.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit 51de52c9db8225a2a170c9e5ae35ea8cf307dbac Author: Colin Ian King Date: Mon Oct 24 04:59:12 2022 -0700 Input: tps6507x-ts - remove variable loops The variable loops is being incremented but is never referenced, it is redundant and can be removed. Signed-off-by: Colin Ian King Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20221020181642.24417-1-colin.i.king@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tps6507x-ts.c | 2 -- 1 file changed, 2 deletions(-) commit 86d6f77a3cce1189ab7c31e52e4d47ca58e7a601 Merge: 4727bab4e9bb c1fd463d571a Author: David S. Miller Date: Mon Oct 24 13:10:40 2022 +0100 Merge branch 'ptp-ocxp-Oroli-ART-CARD' Vadim Fedorenko says: ==================== ptp: ocp: add support for Orolia ART-CARD Orolia company created alternative open source TimeCard. The hardware of the card provides similar to OCP's card functions, that's why the support is added to current driver. The first patch in the series changes the way to store information about serial ports and is more like preparation. The patches 2 to 4 introduces actual hardware support. The last patch removes fallback from devlink flashing interface to protect against flashing wrong image. This became actual now as we have 2 different boards supported and wrong image can ruin hardware easily. v2: Address comments from Jonathan Lemon v3: Fix issue reported by kernel test robot v4: Fix clang build issue v5: Fix warnings and per-patch build errors v6: Fix more style issues ==================== Signed-off-by: David S. Miller commit c1fd463d571a155bf43e04fd23d02aef364c5b0b Author: Vadim Fedorenko Date: Fri Oct 21 02:24:33 2022 +0300 ptp: ocp: remove flash image header check fallback Previously there was a fallback mode to flash firmware image without proper header. But now we have different supported vendors and flashing wrong image could destroy the hardware. Remove fallback mode and force header check. Both vendors have published firmware images with headers. Acked-by: Jonathan Lemon Signed-off-by: Vadim Fedorenko Signed-off-by: David S. Miller drivers/ptp/ptp_ocp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ee6439aaad3245851bbbcbf6c7534c9a29407ab2 Author: Vadim Fedorenko Date: Fri Oct 21 02:24:32 2022 +0300 ptp: ocp: expose config and temperature for ART card Orolia card has disciplining configuration and temperature table stored in EEPROM. This patch exposes them as binary attributes to have read and write access. Acked-by: Jonathan Lemon Co-developed-by: Charles Parent Signed-off-by: Jonathan Lemon Signed-off-by: Vadim Fedorenko Signed-off-by: David S. Miller drivers/ptp/ptp_ocp.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) commit 9c44a7ac17fb980f8e297588e75a6158c69a1a8e Author: Vadim Fedorenko Date: Fri Oct 21 02:24:31 2022 +0300 ptp: ocp: add serial port of mRO50 MAC on ART card ART card provides interface to access to serial port of miniature atomic clock found on the card. Add support for this device and configure it during init phase. Acked-by: Jonathan Lemon Co-developed-by: Charles Parent Signed-off-by: Jonathan Lemon Signed-off-by: Vadim Fedorenko Signed-off-by: David S. Miller drivers/ptp/ptp_ocp.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 69dbe1079cd015d0c96ec488289981ab5663b640 Author: Vadim Fedorenko Date: Fri Oct 21 02:24:30 2022 +0300 ptp: ocp: add Orolia timecard support This brings in the Orolia timecard support from the GitHub repository. The card uses different drivers to provide access to i2c EEPROM and firmware SPI flash. And it also has a bit different EEPROM map, but other parts of the code are the same and could be reused. Co-developed-by: Charles Parent Acked-by: Jonathan Lemon Signed-off-by: Jonathan Lemon Signed-off-by: Vadim Fedorenko Signed-off-by: David S. Miller drivers/ptp/ptp_ocp.c | 290 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 290 insertions(+) commit 895ac5a51fe280e9898e212da7803ec9babf137f Author: Vadim Fedorenko Date: Fri Oct 21 02:24:29 2022 +0300 ptp: ocp: upgrade serial line information Introduce structure to hold serial port line number and the baud rate it supports. Acked-by: Jonathan Lemon Signed-off-by: Jonathan Lemon Signed-off-by: Vadim Fedorenko Signed-off-by: David S. Miller drivers/ptp/ptp_ocp.c | 110 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 43 deletions(-) commit 8d4c313c03f104c69e25ab03058d8955be9dc387 Author: Jeff LaBundy Date: Sat Oct 22 19:57:25 2022 -0500 Input: iqs7222 - add support for IQS7222A v1.13+ IQS7222A revisions 1.13 and later widen the gesture multiplier from x4 ms to x16 ms. Add a means to scale the gesture timings specified in the device tree based on the revision of the device. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/Y1SRdbK1Dp2q7O8o@nixie71 Signed-off-by: Dmitry Torokhov drivers/input/misc/iqs7222.c | 111 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) commit 97384a65c5e304ccab0477751546f5519d9371c3 Author: Jeff LaBundy Date: Sat Oct 22 19:57:13 2022 -0500 dt-bindings: input: iqs7222: Add support for IQS7222A v1.13+ IQS7222A revisions 1.13 and later widen the gesture multiplier from x4 ms to x16 ms; update the binding accordingly. As part of this change, refresh the corresponding properties in the example as well. Fixes: 44dc42d254bf ("dt-bindings: input: Add bindings for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/Y1SRaVGwj30z/g6r@nixie71 Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/azoteq,iqs7222.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2f6fd232978906f6fb054529210b9faec384bd45 Author: Jeff LaBundy Date: Sat Oct 22 19:57:00 2022 -0500 Input: iqs7222 - protect against undefined slider size Select variants of silicon do not define a default slider size, in which case the size must be specified in the device tree. If it is not, the axis's maximum value is reported as 65535 due to unsigned integer overflow. To solve this problem, move the existing zero-check outside of the conditional block that checks whether the property is present. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/Y1SRXEi7XMlncDWk@nixie71 Signed-off-by: Dmitry Torokhov drivers/input/misc/iqs7222.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 99d03b54ef8506771c15deb714396665592f6adf Author: Jeff LaBundy Date: Sat Oct 22 19:56:51 2022 -0500 dt-bindings: input: iqs7222: Correct minimum slider size The minimum slider size enforced by the driver is 1 or 16 for the IQS7222C or IQS7222A, respectively. Fixes: 44dc42d254bf ("dt-bindings: input: Add bindings for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Acked-by: Rob Herring Link: https://lore.kernel.org/r/Y1SRU37t74wRvZv3@nixie71 Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 404f3b48e65f058d94429e4a1ec16a1f82ff3b2f Author: Jeff LaBundy Date: Sat Oct 22 19:56:38 2022 -0500 Input: iqs7222 - report malformed properties Nonzero return values of several calls to fwnode_property_read_u32() are silently ignored, leaving no way to know the properties were not applied in the event of an error. Solve this problem by evaluating fwnode_property_read_u32()'s return value, and reporting an error for any nonzero return value not equal to -EINVAL which indicates the property was absent altogether. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/Y1SRRrpQXvkETjfm@nixie71 Signed-off-by: Dmitry Torokhov drivers/input/misc/iqs7222.c | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) commit ccad486525c49df2fe2e7090990522547dfd2785 Author: Jeff LaBundy Date: Sat Oct 22 19:56:24 2022 -0500 dt-bindings: input: iqs7222: Reduce 'linux,code' to optional Following a recent refactor of the driver to properly drop unused device nodes, the 'linux,code' property is now optional. This can be useful for applications that define GPIO-mapped events that do not correspond to any keycode. Fixes: 44dc42d254bf ("dt-bindings: input: Add bindings for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/Y1SROIrrC1LwX0Sd@nixie71 Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml | 6 ------ 1 file changed, 6 deletions(-) commit bbd16b0d839978e8c8bec2b9a162373f64fc2fbb Author: Jeff LaBundy Date: Sat Oct 22 19:56:04 2022 -0500 Input: iqs7222 - 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(). Solve this problem by moving the node handling from iqs7222_parse_props() to the new iqs7222_parse_reg_grp(), leaving the former to do nothing but parse properties. The latter then manages the reference count in a single location and consistent fashion. This change drastically simplifies iqs7222_parse_all(), which can then call iqs7222_parse_reg_grp() on every register group without having to treat each register group differently. For nested event nodes, common parsing code has been factored out to the new iqs7222_parse_event() so as to allow the event node to be dropped from as few locations as possible. As part of this refactor, the 'linux,code' property has been made optional. This enables applications that define an event with the sole purpose of enabling a GPIO. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/Y1SRJIQ3WPwNpC0K@nixie71 Signed-off-by: Dmitry Torokhov drivers/input/misc/iqs7222.c | 340 +++++++++++++++++++------------------------ 1 file changed, 146 insertions(+), 194 deletions(-) commit 4727bab4e9bbeafeff6acdfcb077a7a548cbde30 Author: Yunsheng Lin Date: Fri Oct 21 10:58:22 2022 +0800 net: skb: move skb_pp_recycle() to skbuff.c skb_pp_recycle() is only used by skb_free_head() in skbuff.c, so move it to skbuff.c. Signed-off-by: Yunsheng Lin Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller include/linux/skbuff.h | 7 ------- net/core/skbuff.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) commit 1ffb0cd82477775000cff02d2577a17308af6bbb Author: Dmitry Torokhov Date: Mon Sep 19 21:26:08 2022 -0700 Input: egalax_ts - do not hardcode interrupt trigger Stop hard-coding interrupt trigger, instead rely on the platform code to do the right thing, according to DT or ACPI data. Link: https://lore.kernel.org/r/20220920042608.1865560-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/egalax_ts.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d19e719da9b22ded00c536a69ee15d6a6f166092 Author: Dmitry Torokhov Date: Mon Sep 19 21:26:07 2022 -0700 Input: egalax_ts - switch to using gpiod API This updates the driver to gpiod API, and removes yet another use of of_get_named_gpio(). Link: https://lore.kernel.org/r/20220920042608.1865560-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/egalax_ts.c | 42 ++++++++++++++--------------------- 1 file changed, 17 insertions(+), 25 deletions(-) commit 413a009ffff119784382a83e40ddef9c74d4df0c Author: Dmitry Torokhov Date: Mon Sep 19 21:26:06 2022 -0700 dt-binding: input: egalax-ts: fix GPIO and IRQ in example The driver is using level triggered interrupt (low) which is backed by an active low GPIO that can be used to wake the controller by driving it low. Let's annotate it properly in the example. Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220920042608.1865560-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/touchscreen/egalax-ts.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 127b7218bfdd60205cfe2fa3f06d95e85a2650ed Author: Nick Child Date: Thu Oct 20 16:40:52 2022 -0500 ibmveth: Always stop tx queues during close netif_stop_all_queues must be called before calling H_FREE_LOGICAL_LAN. As a result, we can remove the pool_config field from the ibmveth adapter structure. Some device configuration changes call ibmveth_close in order to free the current resources held by the device. These functions then make their changes and call ibmveth_open to reallocate and reserve resources for the device. Prior to this commit, the flag pool_config was used to tell ibmveth_close that it should not halt the transmit queue. pool_config was introduced in commit 860f242eb534 ("[PATCH] ibmveth change buffer pools dynamically") to avoid interrupting the tx flow when making rx config changes. Since then, other commits adopted this approach, even if making tx config changes. The issue with this approach was that the hypervisor freed all of the devices control structures after the hcall H_FREE_LOGICAL_LAN was performed but the transmit queues were never stopped. So the higher layers in the network stack would continue transmission but any H_SEND_LOGICAL_LAN hcall would fail with H_PARAMETER until the hypervisor's structures for the device were allocated with the H_REGISTER_LOGICAL_LAN hcall in ibmveth_open. This resulted in no real networking harm but did cause several of these error messages to be logged: "h_send_logical_lan failed with rc=-4" So, instead of trying to keep the transmit queues alive during network configuration changes, just stop the queues, make necessary changes then restart the queues. Signed-off-by: Nick Child Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmveth.c | 18 +----------------- drivers/net/ethernet/ibm/ibmveth.h | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) commit a306d0696aa96f85a9d1a1fbed2bcbf19b474961 Author: Dmitry Torokhov Date: Mon Sep 19 21:26:05 2022 -0700 ARM: dts: imx6qdl-sabre*: fix Egalax touchscreen properties This patch fixes interrupt trigger (should be level low as that is what the driver is always using), the GPIO that is the interrupt source that is also used to wake up chip by driving the line low. The proper polarity is be needed for converting the driver to gpiod API. Acked-by: Shawn Guo Link: https://lore.kernel.org/r/20220920042608.1865560-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 4 ++-- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 71d236399160ad9beaae7267b93d2d487e8f19a0 Author: yangx.jy@fujitsu.com Date: Fri Oct 21 13:45:17 2022 +0000 RDMA/rxe: Remove the member 'type' of struct rxe_mr The member 'type' is included in both struct rxe_mr and struct ib_mr so remove the duplicate one of struct rxe_mr. Signed-off-by: Xiao Yang Link: https://lore.kernel.org/r/20221021134513.17730-1-yangx.jy@fujitsu.com Reviewed-by: Bob Pearson Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_mr.c | 16 ++++++++-------- drivers/infiniband/sw/rxe/rxe_verbs.h | 1 - 2 files changed, 8 insertions(+), 9 deletions(-) commit 65bf03427cee48258a227431577dc56bf70461f3 Author: wangjianli Date: Sat Oct 22 13:52:57 2022 +0800 RDMA/qedr: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: wangjianli Link: https://lore.kernel.org/r/20221022055257.42905-1-wangjianli@cdjrlc.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/qedr/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4bb733234b0ffd939030bb592b691ac19519455 Author: wangjianli Date: Sat Oct 22 14:00:30 2022 +0800 RDMA/core: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: wangjianli Link: https://lore.kernel.org/r/20221022060030.50900-1-wangjianli@cdjrlc.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 233baf9a1bc46f18ad3bec688f52ea5f818a8a25 Author: xu xin Date: Thu Oct 20 06:54:41 2022 +0000 net: remove useless parameter of __sock_cmsg_send The parameter 'msg' has never been used by __sock_cmsg_send, so we can remove it safely. Reported-by: Zeal Robot Signed-off-by: xu xin Reviewed-by: Zhang Yunkai Acked-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/net/sock.h | 2 +- net/core/sock.c | 4 ++-- net/ipv4/ip_sockglue.c | 2 +- net/ipv6/datagram.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 350749b909bfbc27736334e79910d36ca58dad50 Author: Wei Fang Date: Thu Oct 20 12:35:56 2022 +0800 net: fec: Add support for periodic output signal of PPS This patch adds the support for configuring periodic output signal of PPS. So the PPS can be output at a specified time and period. For developers or testers, they can use the command "echo > /sys/class/ptp/ptp0/period" to specify time and period to output PPS signal. Notice that, the channel can only be set to 0. In addtion, the start time must larger than the current PTP clock time. So users can use the command "phc_ctl /dev/ptp0 -- get" to get the current PTP clock time before. Signed-off-by: Wei Fang Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec.h | 2 + drivers/net/ethernet/freescale/fec_ptp.c | 164 ++++++++++++++++++++++++++++++- 2 files changed, 164 insertions(+), 2 deletions(-) commit 6d0cebbdf29922eaba4648a7a06d0d4ffd00439f Author: Yang Yingliang Date: Wed Oct 19 17:26:35 2022 +0800 spi: aspeed: Use devm_platform_{get_and_}ioremap_resource() Use the devm_platform_{get_and_}ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221019092635.1176622-1-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-aspeed-smc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8da313ad1bd020859e2ee8a3e8e97e52425e539c Author: Rob Herring Date: Fri Oct 21 12:57:21 2022 -0500 ASoC: dt-bindings: Convert dmic-codec to DT schema Convert the dmic-codec binding to DT schema format. The '#sound-dai-cells' and 'sound-name-prefix' properties were not documented, but are in use, so add them. Reviewed-by: Arnaud Pouliquen Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20221021175721.4005601-1-robh@kernel.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/dmic-codec.yaml | 55 ++++++++++++++++++++++ Documentation/devicetree/bindings/sound/dmic.txt | 22 --------- 2 files changed, 55 insertions(+), 22 deletions(-) commit 2d5206c4629dfe74a51bb9c54758095139f5d01d Author: wangjianli Date: Sat Oct 22 13:59:05 2022 +0800 RDMA/qib: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: wangjianli Link: https://lore.kernel.org/r/20221022055905.49176-1-wangjianli@cdjrlc.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/qib/qib_user_sdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5dc1b37d75e7136588480712e7173169b3d4164f Author: Colin Ian King Date: Fri Oct 21 18:35:04 2022 +0100 RDMA/qib: Remove not-used variable freeze_cnt The variable freeze_cnt being incremented but it is never referenced, it is redundant and can be removed. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221021173504.27546-1-colin.i.king@gmail.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/qib/qib_iba6120.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit d0b9f28f0da2808b339bb290b539518e69e48ac9 Author: Colin Ian King Date: Fri Oct 21 18:26:11 2022 +0100 RDMA/qib: Remove not-used variable n The variable n being incremented but it is never referenced, it is redundant and can be removed. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221021172611.26763-1-colin.i.king@gmail.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/qib/qib_tx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b539ce9f1a31c442098c3f351cb4d03ba27c2720 Author: Jiri Kosina Date: Fri Oct 21 21:18:12 2022 +0200 mm/slab: Annotate kmem_cache_node->list_lock as raw The list_lock can be taken in hardirq context when do_drain() is being called via IPI on all cores, and therefore lockdep complains about it, because it can't be preempted on PREEMPT_RT. That's not a real issue, as SLAB can't be built on PREEMPT_RT anyway, but we still want to get rid of the warning on non-PREEMPT_RT builds. Annotate it therefore as a raw lock in order to get rid of he lockdep warning below. ============================= [ BUG: Invalid wait context ] 6.1.0-rc1-00134-ge35184f32151 #4 Not tainted ----------------------------- swapper/3/0 is trying to lock: ffff8bc88086dc18 (&parent->list_lock){..-.}-{3:3}, at: do_drain+0x57/0xb0 other info that might help us debug this: context-{2:2} no locks held by swapper/3/0. stack backtrace: CPU: 3 PID: 0 Comm: swapper/3 Not tainted 6.1.0-rc1-00134-ge35184f32151 #4 Hardware name: LENOVO 20K5S22R00/20K5S22R00, BIOS R0IET38W (1.16 ) 05/31/2017 Call Trace: dump_stack_lvl+0x6b/0x9d __lock_acquire+0x1519/0x1730 ? build_sched_domains+0x4bd/0x1590 ? __lock_acquire+0xad2/0x1730 lock_acquire+0x294/0x340 ? do_drain+0x57/0xb0 ? sched_clock_tick+0x41/0x60 _raw_spin_lock+0x2c/0x40 ? do_drain+0x57/0xb0 do_drain+0x57/0xb0 __flush_smp_call_function_queue+0x138/0x220 __sysvec_call_function+0x4f/0x210 sysvec_call_function+0x4b/0x90 asm_sysvec_call_function+0x16/0x20 RIP: 0010:mwait_idle+0x5e/0x80 Code: 31 d2 65 48 8b 04 25 80 ed 01 00 48 89 d1 0f 01 c8 48 8b 00 a8 08 75 14 66 90 0f 00 2d 0b 78 46 00 31 c0 48 89 c1 fb 0f 01 c9 06 fb 0f 1f 44 00 00 65 48 8b 04 25 80 ed 01 00 f0 80 60 02 df RSP: 0000:ffffa90940217ee0 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff9bb9f93a RBP: 0000000000000003 R08: 0000000000000001 R09: 0000000000000001 R10: ffffa90940217ea8 R11: 0000000000000000 R12: ffffffffffffffff R13: 0000000000000000 R14: ffff8bc88127c500 R15: 0000000000000000 ? default_idle_call+0x1a/0xa0 default_idle_call+0x4b/0xa0 do_idle+0x1f1/0x2c0 ? _raw_spin_unlock_irqrestore+0x56/0x70 cpu_startup_entry+0x19/0x20 start_secondary+0x122/0x150 secondary_startup_64_no_verify+0xce/0xdb Signed-off-by: Jiri Kosina Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka mm/slab.c | 90 +++++++++++++++++++++++++++++++-------------------------------- mm/slab.h | 4 +-- 2 files changed, 47 insertions(+), 47 deletions(-) commit a8e53869995b90609a798f9830d44086ab6025c4 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Fri Oct 14 20:43:22 2022 +0900 mm/slub: remove dead code for debug caches on deactivate_slab() After commit c7323a5ad0786 ("mm/slub: restrict sysfs validation to debug caches and make it safe"), SLUB never installs percpu slab for debug caches and thus never deactivates percpu slab for them. Since only debug caches use the full list, SLUB no longer deactivates to full list. Remove dead code in deactivate_slab(). Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka mm/slub.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 7c82b3b308f9ca24852e3b0ee963b9eae128b78a Author: Alexander Atanasov Date: Tue Sep 20 15:11:11 2022 +0300 mm: Make failslab writable again In (060807f841ac mm, slub: make remaining slub_debug related attributes read-only) failslab was made read-only. I think it became a collateral victim to the two other options for which the reasons are perfectly valid. Here is why: - sanity_checks and trace are slab internal debug options, failslab is used for fault injection. - for fault injections, which by presumption are random, it does not matter if it is not set atomically. And you need to set atleast one more option to trigger fault injection. - in a testing scenario you may need to change it at runtime example: module loading - you test all allocations limited by the space option. Then you move to test only your module's own slabs. - when set by command line flags it effectively disables all cache merges. Cc: Vlastimil Babka Cc: Andrew Morton Cc: Kees Cook Cc: Roman Gushchin Cc: Christoph Lameter Cc: Jann Horn Cc: Vijayanand Jitta Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Link: http://lkml.kernel.org/r/20200610163135.17364-5-vbabka@suse.cz Signed-off-by: Alexander Atanasov Signed-off-by: Vlastimil Babka Documentation/mm/slub.rst | 2 ++ mm/slub.c | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit 1a5ad30b89b4e9fa64f75b941a324396738b7616 Author: Rasmus Villemoes Date: Fri Sep 30 12:27:12 2022 +0200 mm: slub: make slab_sysfs_init() a late_initcall Currently, slab_sysfs_init() is an __initcall aka device_initcall. It is rather time-consuming; on my board it takes around 11ms. That's about 1% of the time budget I have from U-Boot letting go and until linux must assume responsibility of keeping the external watchdog happy. There's no particular reason this would need to run at device_initcall time, so instead make it a late_initcall to allow vital functionality to get started a bit sooner. This actually ends up winning more than just those 11ms, because the slab caches that get created during other device_initcalls (and before my watchdog device gets probed) now don't end up doing the somewhat expensive sysfs_slab_add() themselves. Some example lines (with initcall_debug set) before/after: initcall ext4_init_fs+0x0/0x1ac returned 0 after 1386 usecs initcall journal_init+0x0/0x138 returned 0 after 517 usecs initcall init_fat_fs+0x0/0x68 returned 0 after 294 usecs initcall ext4_init_fs+0x0/0x1ac returned 0 after 240 usecs initcall journal_init+0x0/0x138 returned 0 after 32 usecs initcall init_fat_fs+0x0/0x68 returned 0 after 18 usecs Altogether, this means I now get to petting the watchdog around 17ms sooner. [Of course, the time the other initcalls save is instead spent in slab_sysfs_init(), which goes from 11ms to 16ms, so there's no overall change in boot time.] Signed-off-by: Rasmus Villemoes Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: David Rientjes Signed-off-by: Vlastimil Babka mm/slub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 979857ea2deae05454d257f119bedfe84a2c74d9 Author: Rasmus Villemoes Date: Fri Sep 30 10:47:42 2022 +0200 mm: slub: remove dead and buggy code from sysfs_slab_add() The function sysfs_slab_add() has two callers: One is slab_sysfs_init(), which first initializes slab_kset, and only when that succeeds sets slab_state to FULL, and then proceeds to call sysfs_slab_add() for all previously created slabs. The other is __kmem_cache_create(), but only after a if (slab_state <= UP) return 0; check. So in other words, sysfs_slab_add() is never called without slab_kset (aka the return value of cache_kset()) being non-NULL. And this is just as well, because if we ever did take this path and called kobject_init(&s->kobj), and then later when called again from slab_sysfs_init() would end up calling kobject_init_and_add(), we would hit if (kobj->state_initialized) { /* do not error out as sometimes we can recover */ pr_err("kobject (%p): tried to init an initialized object, something is seriously wrong.\n", dump_stack(); } in kobject.c. Signed-off-by: Rasmus Villemoes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: David Rientjes Signed-off-by: Vlastimil Babka mm/slub.c | 5 ----- 1 file changed, 5 deletions(-) commit 65f9d85880480b01982d0a97b7a0d5cda25ca489 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: cirrus: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/cirrus/pinctrl-madera-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0cafd77dcd032d1687efaba5598cf07bce85997f Author: Eric Dumazet Date: Thu Oct 20 23:20:18 2022 +0000 net: add a refcount tracker for kernel sockets Commit ffa84b5ffb37 ("net: add netns refcount tracker to struct sock") added a tracker to sockets, but did not track kernel sockets. We still have syzbot reports hinting about netns being destroyed while some kernel TCP sockets had not been dismantled. This patch tracks kernel sockets, and adds a ref_tracker_dir_print() call to net_free() right before the netns is freed. Normally, each layer is responsible for properly releasing its kernel sockets before last call to net_free(). This debugging facility is enabled with CONFIG_NET_NS_REFCNT_TRACKER=y Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Tested-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/net/net_namespace.h | 30 ++++++++++++++++++++++-------- net/core/net_namespace.c | 5 +++++ net/core/sock.c | 14 ++++++++++++++ net/netlink/af_netlink.c | 11 +++++++++++ net/rds/tcp.c | 3 +++ 5 files changed, 55 insertions(+), 8 deletions(-) commit 4f532403b1e5b379e4027448da715567a2b3ff57 Author: Fabrice Gasnier Date: Fri Oct 14 16:15:08 2022 +0200 ARM: dts: stm32: enable USB OTG in dual role mode on stm32mp135f-dk The USB OTG controller provides the USB data available on stm32mp135f-dk, on the Type-C connector. Data role is determined by "usb-role-switch". A STM32G0 provides the USB Type-C and Power Delivery connectivity. It controls dual role power and dual role data through UCSI protocol over I2C. It's wired on I2C1, with an interrupt pin on PI2 GPIO. Its firmware maybe updated over I2C, so use the optional firmware-name to enable firmware update. Signed-off-by: Amelie Delaunay Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp135f-dk.dts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 44978e1359168ad0604235f0b36d7df7721ad85f Author: Fabrice Gasnier Date: Fri Oct 14 16:15:07 2022 +0200 ARM: dts: stm32: add pins for stm32g0 typec controller on stm32mp13 Add gpio pin configuration to be used with stm32g0 typec controller. Define the PI2 to enable internal pull-up on stm32mp13, used as interrupt pin on stm32mp135f-dk board. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp13-pinctrl.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit c4e7254cf6dce9db7a635f8e79c8399f60e37ff7 Author: Amelie Delaunay Date: Fri Oct 14 16:15:06 2022 +0200 ARM: dts: stm32: enable USB Host EHCI on stm32mp135f-dk USBH Host EHCI controller manages the USB High-Speed hub controller IC offering Type-A CN5 & CN6 connectors available on stm32mp135f-dk. USB Host OHCI controller doesn't need to be enabled as Full-Speed and Low-Speed traffic will be managed by the hub. This USB2514B onboard hub is supplied by a 3v3 PMIC regulator. Signed-off-by: Amelie Delaunay Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp135f-dk.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 16f4ff60519a225860c62932357896be45edd07a Author: Amelie Delaunay Date: Fri Oct 14 16:15:05 2022 +0200 ARM: dts: stm32: enable USB HS phys on stm32mp135f-dk USBPHYC manages the two USB High-Speed phys. port0 is used by USBH and port1 is used by USBOTG. Enable and tune both PHYs on stm32mp135f-dk. Signed-off-by: Amelie Delaunay Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp135f-dk.dts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 810644cc7cceba03ca4f762ae12c51879743a9f2 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: bm1880: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/pinctrl/pinctrl-bm1880.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit eebefdd0b7796c4be5c87fa2ab51aca2568835b1 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: bcm: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 13 ++++++++----- drivers/pinctrl/bcm/pinctrl-cygnus-mux.c | 9 ++++++--- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 12 +++++++----- drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 8 +++++--- drivers/pinctrl/bcm/pinctrl-nsp-mux.c | 8 +++++--- 5 files changed, 31 insertions(+), 19 deletions(-) commit 9ebf215fbae109f617d90ac1754feaeedaed2011 Author: Fabrice Gasnier Date: Fri Oct 14 16:15:04 2022 +0200 ARM: dts: stm32: add fixed regulators to support usb on stm32mp135f-dk Add VDD_USB and 3V3_SW regulators on stm32mp135f-dk. Temporary add them as fixed regulators, waiting for full SCMI regulators support. This is a precursor patch to enable USB support on STM32MP13: - VDD_USB supplies the STM32MP13 USB internals - 3V3_SW supplies various peripherals, including the onboard HUB. Note: USB support requires these regulators to be enabled before entering the kernel. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp135f-dk.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit b29e0dece45174f8c791853cbf40a24212148b47 Merge: ea5ed0f00b07 8a3854c7b8e4 Author: David S. Miller Date: Mon Oct 24 10:52:50 2022 +0100 Merge branch 'udp-false-sharing' Paolo Abeni says: ==================== udp: avoid false sharing on receive Under high UDP load, the BH processing and the user-space receiver can run on different cores. The UDP implementation does a lot of effort to avoid false sharing in the receive path, but recent changes to the struct sock layout moved the sk_forward_alloc and the sk_rcvbuf fields on the same cacheline: /* --- cacheline 4 boundary (256 bytes) --- */ struct sk_buff * tail; } sk_backlog; int sk_forward_alloc; unsigned int sk_reserved_mem; unsigned int sk_ll_usec; unsigned int sk_napi_id; int sk_rcvbuf; sk_forward_alloc is updated by the BH, while sk_rcvbuf is accessed by udp_recvmsg(), causing false sharing. A possible solution would be to re-order the struct sock fields to avoid the false sharing. Such change is subject to being invalidated by future changes and could have negative side effects on other workload. Instead this series uses a different approach, touching only the UDP socket layout. The first patch generalizes the custom setsockopt infrastructure, to allow UDP tracking the buffer size, and the second patch addresses the issue, copying the relevant buffer information into an already hot cacheline. Overall the above gives a 10% peek throughput increase under UDP flood. v1 -> v2: - introduce and use a common helper to initialize the UDP v4/v6 sockets (Kuniyuki) ==================== Signed-off-by: David S. Miller commit 8a3854c7b8e4532063b14bed34115079b7d0cb36 Author: Paolo Abeni Date: Thu Oct 20 19:48:52 2022 +0200 udp: track the forward memory release threshold in an hot cacheline When the receiver process and the BH runs on different cores, udp_rmem_release() experience a cache miss while accessing sk_rcvbuf, as the latter shares the same cacheline with sk_forward_alloc, written by the BH. With this patch, UDP tracks the rcvbuf value and its update via custom SOL_SOCKET socket options, and copies the forward memory threshold value used by udp_rmem_release() in a different cacheline, already accessed by the above function and uncontended. Since the UDP socket init operation grown a bit, factor out the common code between v4 and v6 in a shared helper. Overall the above give a 10% peek throughput increase under UDP flood. Signed-off-by: Paolo Abeni Reviewed-by: Eric Dumazet Acked-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/linux/udp.h | 3 +++ include/net/udp.h | 9 +++++++++ net/ipv4/udp.c | 18 +++++++++++++++--- net/ipv6/udp.c | 4 ++-- 4 files changed, 29 insertions(+), 5 deletions(-) commit a5ef058dc4d9a3e60d1808a0700e18e0e37e408e Author: Paolo Abeni Date: Thu Oct 20 19:48:51 2022 +0200 net: introduce and use custom sockopt socket flag We will soon introduce custom setsockopt for UDP sockets, too. Instead of doing even more complex arbitrary checks inside sock_use_custom_sol_socket(), add a new socket flag and set it for the relevant socket types (currently only MPTCP). Reviewed-by: Matthieu Baerts Signed-off-by: Paolo Abeni Reviewed-by: Eric Dumazet Acked-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/linux/net.h | 1 + net/mptcp/protocol.c | 4 ++++ net/socket.c | 8 +------- 3 files changed, 6 insertions(+), 7 deletions(-) commit 2a46bb66c47ff3ef8e4cfd3936cbabca58a546f6 Author: Amelie Delaunay Date: Fri Oct 14 16:15:03 2022 +0200 ARM: dts: stm32: add USB OTG HS support on stm32mp131 This patch adds USB OTG HS support on stm32mp131. Signed-off-by: Amelie Delaunay Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp131.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 4a47f0f3e936496fcf7961ee99a412b06a97ff33 Author: Amelie Delaunay Date: Fri Oct 14 16:15:02 2022 +0200 ARM: dts: stm32: add UBSH EHCI and OHCI support on stm32mp131 This patch adds USB Host EHCI and OHCI support on stm32mp131. Signed-off-by: Amelie Delaunay Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp131.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f54271ff0c694876ed34081f562579b5c25aad88 Author: Amelie Delaunay Date: Fri Oct 14 16:15:01 2022 +0200 ARM: dts: stm32: add USBPHYC and dual USB HS PHY support on stm32mp131 This patch adds support for USBPHYC and its two USB HS PHY on stm32mp131. Signed-off-by: Amelie Delaunay Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp131.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit acdce5cde8fe2a7200d1bf31f73edf08c78c8e26 Author: Fabrice Gasnier Date: Fri Oct 14 16:15:00 2022 +0200 ARM: dts: stm32: add PWR fixed regulators on stm32mp131 Add 1v1, 1v8 and 3v3 PWR regulators on stm32mp131. Temporary add them as fixed regulators, waiting for full SCMI regulators support. This is a precursor patch to enable USB support on STM32MP13. Note: USB support requires these regulators to be enabled before entering kernel. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp131.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit ea5ed0f00b07d5aba09189729d54751c98494f25 Merge: c1aa0a9078e6 41305d3781d7 Author: David S. Miller Date: Mon Oct 24 10:43:39 2022 +0100 Merge branch 'net-800Gbps-support' Petr Machata says: ==================== net: Add support for 800Gbps speed Amit Cohen writes: The next Nvidia Spectrum ASIC will support 800Gbps speed. The IEEE 802 LAN/MAN Standards Committee already published standards for 800Gbps, see the last update [1] and the list of approved changes [2]. As first phase, add support for 800Gbps over 8 lanes (100Gbps/lane). In the future 800Gbps over 4 lanes can be supported also. Extend ethtool to support the relevant PMDs and extend mlxsw and bonding drivers to support 800Gbps. ==================== Signed-off-by: David S. Miller commit 41305d3781d705d6ea2c9cac632e6a4063e0f1ea Author: Amit Cohen Date: Thu Oct 20 17:20:05 2022 +0200 bonding: 3ad: Add support for 800G speed Add support for 800Gbps speed to allow using 3ad mode with 800G devices. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Acked-by: Jay Vosburgh Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit cceef209ddd7b4c0059cc41bdab103b804043d1f Author: Amit Cohen Date: Thu Oct 20 17:20:04 2022 +0200 mlxsw: Add support for 800Gbps link modes Add support for 800Gbps speed, link modes of 100Gbps per lane. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_ethtool.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) commit 404c76783f322120266a4ef659abe418dc74f5c6 Author: Amit Cohen Date: Thu Oct 20 17:20:03 2022 +0200 ethtool: Add support for 800Gbps link modes Add support for 800Gbps speed, link modes of 100Gbps per lane. As mentioned in slide 21 in IEEE documentation [1], all adopted 802.3df copper and optical PMDs baselines using 100G/lane will be supported. Add the relevant PMDs which are mentioned in slide 5 in IEEE documentation [1] and were approved on 10-2022 [2]: BP - KR8 Cu Cable - CR8 MMF 50m - VR8 MMF 100m - SR8 SMF 500m - DR8 SMF 2km - DR8-2 [1]: https://www.ieee802.org/3/df/public/22_10/22_1004/shrikhande_3df_01a_221004.pdf [2]: https://ieee802.org/3/df/KeyMotions_3df_221005.pdf Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Signed-off-by: David S. Miller drivers/net/phy/phy-core.c | 11 ++++++++++- include/uapi/linux/ethtool.h | 8 ++++++++ net/ethtool/common.c | 14 ++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) commit c1aa0a9078e6dd502af0b886d992f128bdefd44b Merge: abc210952af7 67d637516fa9 Author: David S. Miller Date: Mon Oct 24 10:37:43 2022 +0100 Merge branch 'sparx5-IS2-VCAP' Steen Hegelund says: ==================== Add support for Sparx5 IS2 VCAP This provides initial support for the Sparx5 VCAP functionality via the 'tc' traffic control userspace tool and its flower filter. Overview: ========= The supported flower filter keys and actions are: - source and destination MAC address keys - trap action - pass action The supported Sparx5 VCAPs are: IS2 (see below for more info) The VCAP (Versatile Content-Aware Processor) feature is essentially a TCAM with rules consisting of: - Programmable key fields - Programmable action fields - A counter (which may be only one bit wide) Besides this each VCAP has: - A number of independent lookups - A keyset configuration typically per port per lookup VCAPs are used in many of the TSN features such as PSFP, PTP, FRER as well as the general shaping, policing and access control, so it is an important building block for these advanced features. Functionality: ============== When a frame is passed to a VCAP the VCAP will generate a set of keys (keyset) based on the traffic type. If there is a rule created with this keyset in the VCAP and the values of the keys matches the values in the keyset of the frame, the rule is said to match and the actions in the rule will be executed and the rule counter will be incremented. No more rules will be examined in this VCAP lookup. If there is no match in the current lookup the frame will be matched against the next lookup (some VCAPs do the processing of the lookups in parallel). The Sparx5 SoC has 6 different VCAP types: - IS0: Ingress Stage 0 (AKA CLM) mostly handles classification - IS2: Ingress Stage 2 mostly handles access control - IP6PFX: IPv6 prefix: Provides tables for IPV6 address management - LPM: Longest Path Match for IP guarding and routing - ES0: Egress Stage 0 is mostly used for CPU copying and multicast handling - ES2: Egress Stage 2 is known as the rewriter and mostly updates tags Design: ======= The VCAP implementation provides switchcore independent handling of rules and supports: - Creating and deleting rules - Updating and getting rules The platform specific API implementation as well as the platform specific model of the VCAP instances are attached to the VCAP API and a client can then access rules via the API in a platform independent way, with the limitations that each VCAP has in terms of is supported keys and actions. The VCAP model is generated from information delivered by the designers of the VCAP hardware. Here is an illustration of this: +------------------+ +------------------+ | TC flower filter | | PTP client | | for Sparx5 | | for Sparx5 | +-------------\----+ +---------/--------+ \ / \ / \ / \ / \ / +----v--------v----+ | VCAP API | +---------|--------+ | | | | +---------v--------+ | VCAP control | | instance | +----/--------|----+ / | / | / | / | +--------------v---+ +----v-------------+ | Sparx5 VCAP | | Sparx5 VCAP API | | model | | Implementation | +------------------+ +---------|--------+ | | | | +---------v--------+ | Sparx5 VCAP HW | +------------------+ Delivery: ========= For now only the IS2 is supported but later the IS0, ES0 and ES2 will be added. There are currently no plans to support the IP6PFX and the LPM VCAPs. The IS2 VCAP has 4 lookups and they are accessible with a TC chain id: - chain 8000000: IS2 Lookup 0 - chain 8100000: IS2 Lookup 1 - chain 8200000: IS2 Lookup 2 - chain 8300000: IS2 Lookup 3 These lookups are executed in parallel by the IS2 VCAP but the actions are executed in series (the datasheet explains what happens if actions overlap). The functionality of TC flower as well as TC matchall filters will be expanded in later submissions as well as the number of VCAPs supported. This is current plan: - add support for more TC flower filter keys and extend the Sparx5 port keyset configuration - support for TC protocol all - debugfs support for inspecting rules - TC flower filter statistics - Sparx5 IS0 VCAP support and more TC keys and actions to support this - add TC policer and drop action support (depends on the Sparx5 QoS support upstreamed separately) - Sparx5 ES0 VCAP support and more TC actions to support this - TC flower template support - TC matchall filter support for mirroring and policing ports - TC flower filter mirror action support - Sparx5 ES2 VCAP support The LAN966x switchcore will also be updated to use the VCAP API as well as future Microchip switches. The LAN966x has 3 VCAPS (IS1, IS2 and ES0) and a slightly different keyset and actionset portfolio than Sparx5. Version History: ================ v3 Moved the sparx5_tc_flower_set_exterr function to the VCAP API and renamed it. Moved the sparx5_netbytes_copy function to the VCAP_API and renamed it (thanks Horatiu Vultur). Fixed indentation in the vcap_write_rule function. Added a comment mentioning the typegroup table terminator in the vcap_iter_skip_tg function. v2 Made the KUNIT test model a superset of the real model to fix a kernel robot build error. v1 Initial version ==================== Signed-off-by: David S. Miller commit 67d637516fa91c718dd60acd9358a9fb0e19b7b5 Author: Steen Hegelund Date: Thu Oct 20 15:09:04 2022 +0200 net: microchip: sparx5: Adding KUNIT test for the VCAP API This provides a KUNIT test suite for the VCAP APIs encoding functionality. The test can be run by adding these settings in a .kunitconfig file CONFIG_KUNIT=y CONFIG_NET=y CONFIG_VCAP_KUNIT_TEST=y Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/Kconfig | 13 + .../ethernet/microchip/vcap/vcap_ag_api_kunit.h | 643 ++++++++++++++ drivers/net/ethernet/microchip/vcap/vcap_api.c | 4 + drivers/net/ethernet/microchip/vcap/vcap_api.h | 3 + .../net/ethernet/microchip/vcap/vcap_api_kunit.c | 933 +++++++++++++++++++++ 5 files changed, 1596 insertions(+) commit 5d7e5b0401d7b7825c2a8572a403c341dc68f573 Author: Steen Hegelund Date: Thu Oct 20 15:09:03 2022 +0200 net: microchip: sparx5: Adding KUNIT test VCAP model This provides a test VCAP model for use in a KUNIT test. The model provides 3 different VCAP types for better test coverage. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/Makefile | 1 + .../net/ethernet/microchip/vcap/vcap_model_kunit.c | 5570 ++++++++++++++++++++ .../net/ethernet/microchip/vcap/vcap_model_kunit.h | 10 + 3 files changed, 5581 insertions(+) commit 683e05c03275d79e603d7e0211d7aed410b0e65b Author: Steen Hegelund Date: Thu Oct 20 15:09:02 2022 +0200 net: microchip: sparx5: Writing rules to the IS2 VCAP This adds rule encoding functionality to the VCAP API. A rule consists of keys and actions in separate cache sections. The maximum size of the keyset or actionset determines the size of the rule. The VCAP hardware need to be able to distinguish different rule sizes from each other, and for that purpose some extra typegroup bits are added to the rule when it is encoded. The API provides a bit stream iterator that allows highlevel encoding functionality to add key and action value bits independent of typegroup bits. This is handled by letting the concrete VCAP model provide the typegroup table for the different rule sizes. After the key and action values have been added to the encoding bit streams the typegroup bits are set to their correct values just before the rule is written to the VCAP hardware. The key and action offsets provided in the VCAP model are the offset before adding the typegroup bits. Signed-off-by: Steen Hegelund Tested-by: Casper Andersson Reviewed-by: Casper Andersson Signed-off-by: David S. Miller drivers/net/ethernet/microchip/vcap/vcap_api.c | 426 ++++++++++++++++++++++++- 1 file changed, 425 insertions(+), 1 deletion(-) commit 8e10490b006477c42874d43a2ab4d4c6d51ccb63 Author: Steen Hegelund Date: Thu Oct 20 15:09:01 2022 +0200 net: microchip: sparx5: Adding basic rule management in VCAP API This provides most of the rule handling needed to add a new rule to a VCAP. To add a rule a client must follow these steps: 1) Allocate a new rule (provide an id or get one automatically assigned) 2) Add keys to the rule 3) Add actions to the rule 4) Optionally set a keyset on the rule 5) Optionally set an actionset on the rule 6) Validate the rule (this will add keyset and actionset if not specified in the previous steps) 7) Add the rule (if the validation was successful) 8) Free the rule instance (a copy has been added to the VCAP) The validation step will fail if there are no keysets with the requested keys, or there are no actionsets with the requested actions. The validation will also fail if the keyset is not configured for the port for the requested protocol). Signed-off-by: Steen Hegelund Tested-by: Casper Andersson Reviewed-by: Casper Andersson Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 1 + drivers/net/ethernet/microchip/vcap/vcap_api.c | 320 ++++++++++++++++++++- .../net/ethernet/microchip/vcap/vcap_api_client.h | 3 + 3 files changed, 316 insertions(+), 8 deletions(-) commit 46be056ee0fc516b7591d549dd5fbb1e93df9c7e Author: Steen Hegelund Date: Thu Oct 20 15:09:00 2022 +0200 net: microchip: sparx5: Adding port keyset config and callback interface This provides a default port keyset configuration for the Sparx5 IS2 VCAP where all ports and all lookups in IS2 use the same keyset (MAC_ETYPE) for all types of traffic. This means that no matter what frame type is received on any front port it will generate the MAC_ETYPE keyset in the IS VCAP and any rule in the IS2 VCAP that uses this keyset will be matched against the keys in the MAC_ETYPE keyset. The callback interface used by the VCAP API is populated with Sparx5 specific handler functions that takes care of the actual reading and writing to data to the Sparx5 IS2 VCAP instance. A few functions are also added to the VCAP API to support addition of rule fields such as the ingress port mask and the lookup bit. The IS2 VCAP in Sparx5 is really divided in two instances with lookup 0 and 1 in the first instance and lookup 2 and 3 in the second instance. The lookup bit selects lookup 0 or 3 in the respective instance when it is set. Signed-off-by: Steen Hegelund Tested-by: Casper Andersson Reviewed-by: Casper Andersson Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 345 +++++++++++++++++++++ drivers/net/ethernet/microchip/vcap/vcap_api.c | 81 +++++ .../net/ethernet/microchip/vcap/vcap_api_client.h | 5 + 3 files changed, 431 insertions(+) commit c9da1ac1c21222ad04e78347a02b3ced393d1fb8 Author: Steen Hegelund Date: Thu Oct 20 15:08:59 2022 +0200 net: microchip: sparx5: Adding initial tc flower support for VCAP API This adds initial TC flower filter support to Sparx5 for the IS2 VCAP. The support consists of the source and destination MAC addresses, and the trap and pass actions. This is how you can create a rule that test the functionality: tc qdisc add dev eth0 clsact tc filter add dev eth0 ingress chain 8000000 prio 10 handle 10 \ protocol all flower skip_sw \ dst_mac 0a:0b:0c:0d:0e:0f \ src_mac 2:0:0:0:0:1 \ action trap The IS2 chains in Sparx5 are assigned like this: - chain 8000000: IS2 Lookup 0 - chain 8100000: IS2 Lookup 1 - chain 8200000: IS2 Lookup 2 - chain 8300000: IS2 Lookup 3 Signed-off-by: Steen Hegelund Tested-by: Casper Andersson Reviewed-by: Casper Andersson Signed-off-by: David S. Miller drivers/net/ethernet/microchip/Makefile | 1 + drivers/net/ethernet/microchip/sparx5/Makefile | 2 +- drivers/net/ethernet/microchip/sparx5/sparx5_tc.c | 46 +++ drivers/net/ethernet/microchip/sparx5/sparx5_tc.h | 14 + .../ethernet/microchip/sparx5/sparx5_tc_flower.c | 217 ++++++++++++ .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 142 +++++++- .../ethernet/microchip/sparx5/sparx5_vcap_impl.h | 20 ++ drivers/net/ethernet/microchip/vcap/Makefile | 8 + drivers/net/ethernet/microchip/vcap/vcap_api.c | 371 +++++++++++++++++++++ .../net/ethernet/microchip/vcap/vcap_api_client.h | 194 +++++++++++ 10 files changed, 1011 insertions(+), 4 deletions(-) commit 45c00ad0030ce94111a208c116d922c83645fc30 Author: Steen Hegelund Date: Thu Oct 20 15:08:58 2022 +0200 net: microchip: sparx5: Adding IS2 VCAP register interface This adds the register interface needed to access the Sparx5 Ingress Stage 2 VCAP (IS2). The Sparx5 Chip Register Model can be browsed at this location: https://github.com/microchip-ung/sparx-5_reginfo Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller .../ethernet/microchip/sparx5/sparx5_main_regs.h | 460 ++++++++++++++++++++- 1 file changed, 458 insertions(+), 2 deletions(-) commit e8145e0685beee49dcb36cb4e1d9b00bf0d57bea Author: Steen Hegelund Date: Thu Oct 20 15:08:57 2022 +0200 net: microchip: sparx5: Adding IS2 VCAP model to VCAP API This provides the Sparx5 Ingress Stage 2 (IS2) model and adds it to the VCAP control instance that will be provided to the VCAP API. The Sparx5 IS2 C code model is generated from the Sparx5 RTL design model. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller drivers/net/ethernet/microchip/sparx5/Makefile | 2 +- .../ethernet/microchip/sparx5/sparx5_vcap_ag_api.c | 1351 ++++++++++++++++++++ .../ethernet/microchip/sparx5/sparx5_vcap_ag_api.h | 18 + .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 4 + 4 files changed, 1374 insertions(+), 1 deletion(-) commit 8beef08f4618c9bfab9374fc72930fc6ed70fdc1 Author: Steen Hegelund Date: Thu Oct 20 15:08:56 2022 +0200 net: microchip: sparx5: Adding initial VCAP API support This provides the initial VCAP API framework and Sparx5 specific VCAP implementation. When the Sparx5 Switchdev driver is initialized it will also initialize its VCAP module, and this hooks up the concrete Sparx5 VCAP model to the VCAP API, so that the VCAP API knows what VCAP instances are available. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller MAINTAINERS | 1 + drivers/net/ethernet/microchip/Kconfig | 1 + drivers/net/ethernet/microchip/sparx5/Kconfig | 1 + drivers/net/ethernet/microchip/sparx5/Makefile | 8 +- .../net/ethernet/microchip/sparx5/sparx5_main.c | 9 + .../net/ethernet/microchip/sparx5/sparx5_main.h | 6 + .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 41 +++ drivers/net/ethernet/microchip/vcap/Kconfig | 39 +++ drivers/net/ethernet/microchip/vcap/vcap_ag_api.h | 326 +++++++++++++++++++++ drivers/net/ethernet/microchip/vcap/vcap_api.h | 269 +++++++++++++++++ 10 files changed, 699 insertions(+), 2 deletions(-) commit abc210952af71f4eb88bf8074c9982c17779c00f Author: Yanguo Li Date: Thu Oct 20 09:28:34 2022 +0100 nfp: flower: tunnel neigh support bond offload Support hardware offload when tunnel neigh out port is bond. These feature work with the nfp firmware. If the firmware supports the NFP_FL_FEATS_TUNNEL_NEIGH_LAG feature, nfp driver write the bond information to the firmware neighbor table or do nothing for bond. when neighbor MAC changes, nfp driver need to update the neighbor information too. Signed-off-by: Yanguo Li Reviewed-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/flower/lag_conf.c | 52 ++++++++++++++++----- drivers/net/ethernet/netronome/nfp/flower/main.c | 9 ++++ drivers/net/ethernet/netronome/nfp/flower/main.h | 21 ++++++++- .../ethernet/netronome/nfp/flower/tunnel_conf.c | 53 ++++++++++++++++++---- 4 files changed, 114 insertions(+), 21 deletions(-) commit 20ce95528f73ded5b80c202b40be86fe0d2af4eb Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: axp209: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Acked-by: Chen-Yu Tsai drivers/pinctrl/pinctrl-axp209.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 9ace1002c854a3df07dde113c614c7c1ebe5e18f Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: at91: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Claudiu Beznea drivers/pinctrl/pinctrl-at91-pio4.c | 10 +++++++--- drivers/pinctrl/pinctrl-at91.c | 16 +++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) commit 52240f91f71725782ed79391efb861db5ff68174 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: aspeed: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.c | 1 + 1 file changed, 1 insertion(+) commit fb0ca836f9b8c61e6a01b58f4979d3c421dd1eb6 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: apple-gpio: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Signed-off-by: Andy Shevchenko drivers/pinctrl/pinctrl-apple-gpio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 4c0c5bbc89cda1c57ce0fb36d917693396b8b065 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 pinctrl: actions: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij drivers/pinctrl/actions/pinctrl-owl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c9d348ea460e65a44e6ccd3a5b5b9d01ce612c87 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 media: c8sectpfe: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 08a149c40bdbb9cd08fd0d39c6976d713a187300 Author: Andy Shevchenko Date: Fri Oct 7 12:53:44 2022 +0300 gpiolib: Clean up headers There is a few things done: - include only the headers we are direct user of - when pointer is in use, provide a forward declaration - add missing headers - group generic headers and subsystem headers - sort each group alphabetically While at it, fix some awkward indentations. Signed-off-by: Andy Shevchenko drivers/gpio/gpiolib-acpi.h | 12 ++++++++++++ drivers/gpio/gpiolib-of.h | 11 ++++++++++- drivers/gpio/gpiolib-sysfs.h | 2 ++ include/linux/gpio.h | 2 +- include/linux/gpio/driver.h | 2 +- include/linux/gpio/machine.h | 1 - 6 files changed, 26 insertions(+), 4 deletions(-) commit 52ee7c02f67808afa533c523fa3e4b66c54ea758 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 gpiolib: cdev: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Rewiewed-by: Kent Gibson drivers/gpio/gpiolib-cdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 27bb5fef574db193eb063d61b80614182f345b48 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 gpio: tegra186: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij drivers/gpio/gpio-tegra186.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 275d13562a5918dc71c6e9642f454255741aaecb Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 gpio: wm8350: Remove unused header(s) Some of the headers are unused in the driver, remove them. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/gpio/gpio-wm8350.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 36805be775ae30e8c7c390f825e7a2528c260d29 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 gpio: reg: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Signed-off-by: Andy Shevchenko include/linux/gpio/gpio-reg.h | 4 ++++ 1 file changed, 4 insertions(+) commit 5b937a837c0d4c649fcbd9def10570b5d337898c Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 gpio: pl061: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/gpio/gpio-pl061.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit c20a395f9bf939ef0587ce5fa14316ac26252e9b Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 gpio: pca953x: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/gpio/gpio-pca953x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5cedd3c25fcb2799dc35ddcd85166c2962501c43 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 gpio: mockup: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Signed-off-by: Andy Shevchenko drivers/gpio/gpio-mockup.c | 1 + 1 file changed, 1 insertion(+) commit d5d577e3d50713ad11d98dbdaa48bb494346c26d Author: Marek Vasut Date: Fri Oct 21 12:00:57 2022 +0200 ARM: dts: stm32: Fix AV96 WLAN regulator gpio property The WLAN regulator uses 'gpios' property instead of 'gpio' to specify regulator enable GPIO. While the former is also currently handled by the Linux kernel regulator-fixed driver, the later is the correct one per DT bindings. Update the DT to use the later. Fixes: 7dd5cbba42c93 ("ARM: dts: stm32: Enable WiFi on AV96") Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e46a180c060f5a025aee783ef10bcb95b767f6f8 Author: Olivier Moysan Date: Wed Oct 12 16:22:05 2022 +0200 ARM: dts: stm32: add adc support on stm32mp135f-dk Configure ADC support on stm32mp135f-dk. ADC can be used for USB Type-C CC1 & CC2 pins wired to in6 & in12. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp135f-dk.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit ab2806ddad9d94e449f962a15035846c80f89738 Author: Olivier Moysan Date: Wed Oct 12 16:22:04 2022 +0200 ARM: dts: stm32: add dummy vdd_adc regulator on stm32mp135f-dk Add a dummy fixed regulator vdd-adc for STM32 ADC, on STM32MP135F-DK board, while SCMI regulators are not available. This patch will have to be removed when SCMI regulator support is added to STM32MP13. This patch intends to allow ADC enabling on STM32MP13. With this patch the ADC can probe but it cannot return valid conversion data, as it's regulator is not actually enabled. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp135f-dk.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 022932ab55fd0181aa3cf52f8c757b74acf01131 Author: Olivier Moysan Date: Wed Oct 12 16:22:03 2022 +0200 ARM: dts: stm32: add adc pins muxing on stm32mp135f-dk Define pins muxing that can be used for ADC on stm32mp135f-dk board (USB Type-C CC1 & CC2 pins). Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp13-pinctrl.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit ccdab19738a6dccbb8addf05f7d0d121d97abcfa Author: Olivier Moysan Date: Wed Oct 12 16:22:02 2022 +0200 ARM: dts: stm32: add adc support to stm32mp13 Add ADC1 and ADC2 support to STM32MP13 SoC family. The STM32MP131 provides only ADC2, while other STM32MP13 SoCs provide both ADC1 and ADC2. Internal channels support limitations: - VREFINT internal channel requires calibration data from OTP memory. The nvmem properties used to access OTP are not defined for time being, as OTP support is not yet enabled. - VBAT internal channel is not defined by default in SoC DT, and has be defined in board DT when needed, instead. This avoids unwanted current consumption on battery, when ADC conversions are performed on any other channels. Signed-off-by: Olivier Moysan Reviewed-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp131.dtsi | 43 +++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/stm32mp133.dtsi | 31 ++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) commit 04d63e62efa4d33b340570d10a59f9c20e58c81a Merge: 225480f040b6 b45a337f061e Author: David S. Miller Date: Mon Oct 24 09:40:39 2022 +0100 Merge branch 'inet6_destroy_sock-calls-remove' Kuniyuki Iwashima says: ==================== inet6: Remove inet6_destroy_sock() calls. This is a follow-up series for commit d38afeec26ed ("tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct()."). This series cleans up unnecessary inet6_destory_sock() calls in sk->sk_prot->destroy() and call it from sk->sk_destruct() to make sure we do not leak memory related to IPv6 specific-resources. Changes: v2: * patch 1 * Fix build failure for CONFIG_MPTCP_IPV6=y v1: https://lore.kernel.org/netdev/20221018190956.1308-1-kuniyu@amazon.com/ ==================== Signed-off-by: David S. Miller commit b45a337f061e131bd01b6df2d89f1228d4350a85 Author: Kuniyuki Iwashima Date: Wed Oct 19 15:36:03 2022 -0700 inet6: Clean up failure path in do_ipv6_setsockopt(). We can reuse the unlock label above and need not repeat the same code. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/ipv6/ipv6_sockglue.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1f8c4eeb945553baf868bbec7a8c59810df97a07 Author: Kuniyuki Iwashima Date: Wed Oct 19 15:36:02 2022 -0700 inet6: Remove inet6_destroy_sock(). The last user of inet6_destroy_sock() is its wrapper inet6_cleanup_sock(). Let's rename inet6_destroy_sock() to inet6_cleanup_sock(). Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller include/net/transp_v6.h | 2 -- net/ipv6/af_inet6.c | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) commit 6431b0f6ff1633ae598667e4cdd93830074a03e8 Author: Kuniyuki Iwashima Date: Wed Oct 19 15:36:01 2022 -0700 sctp: Call inet6_destroy_sock() via sk->sk_destruct(). After commit d38afeec26ed ("tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct()."), we call inet6_destroy_sock() in sk->sk_destruct() by setting inet6_sock_destruct() to it to make sure we do not leak inet6-specific resources. SCTP sets its own sk->sk_destruct() in the sctp_init_sock(), and SCTPv6 socket reuses it as the init function. To call inet6_sock_destruct() from SCTPv6 sk->sk_destruct(), we set sctp_v6_destruct_sock() in a new init function. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/sctp/socket.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 1651951ebea54970e0bda60c638fc2eee7a6218f Author: Kuniyuki Iwashima Date: Wed Oct 19 15:36:00 2022 -0700 dccp: Call inet6_destroy_sock() via sk->sk_destruct(). After commit d38afeec26ed ("tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct()."), we call inet6_destroy_sock() in sk->sk_destruct() by setting inet6_sock_destruct() to it to make sure we do not leak inet6-specific resources. DCCP sets its own sk->sk_destruct() in the dccp_init_sock(), and DCCPv6 socket shares it by calling the same init function via dccp_v6_init_sock(). To call inet6_sock_destruct() from DCCPv6 sk->sk_destruct(), we export it and set dccp_v6_sk_destruct() in the init function. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/dccp/dccp.h | 1 + net/dccp/ipv6.c | 15 ++++++++------- net/dccp/proto.c | 8 +++++++- net/ipv6/af_inet6.c | 1 + 4 files changed, 17 insertions(+), 8 deletions(-) commit b5fc29233d28be7a3322848ebe73ac327559cdb9 Author: Kuniyuki Iwashima Date: Wed Oct 19 15:35:59 2022 -0700 inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy(). After commit d38afeec26ed ("tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct()."), we call inet6_destroy_sock() in sk->sk_destruct() by setting inet6_sock_destruct() to it to make sure we do not leak inet6-specific resources. Now we can remove unnecessary inet6_destroy_sock() calls in sk->sk_prot->destroy(). DCCP and SCTP have their own sk->sk_destruct() function, so we change them separately in the following patches. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Matthieu Baerts Signed-off-by: David S. Miller net/ipv6/ping.c | 6 ------ net/ipv6/raw.c | 2 -- net/ipv6/tcp_ipv6.c | 8 +------- net/ipv6/udp.c | 2 -- net/l2tp/l2tp_ip6.c | 2 -- net/mptcp/protocol.c | 7 ------- 6 files changed, 1 insertion(+), 26 deletions(-) commit 14778e3a8648e4f909bb284e12adde8b5cd0198a Author: Marek Vasut Date: Fri Oct 14 00:12:42 2022 +0200 ARM: dts: stm32: Drop MMCI interrupt-names The pl18x MMCI driver does not use the interrupt-names property, the binding document has been updated to recommend this property be unused, remove it. Reviewed-by: Linus Walleij Reviewed-by: Yann Gautier Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743.dtsi | 2 -- arch/arm/boot/dts/stm32mp131.dtsi | 2 -- arch/arm/boot/dts/stm32mp151.dtsi | 3 --- 3 files changed, 7 deletions(-) commit 2d4daa549c17b6ba4845a751c7a78d3b2419d78f Author: Babu Moger Date: Tue Sep 27 15:16:36 2022 -0500 x86/resctrl: Remove arch_has_empty_bitmaps The field arch_has_empty_bitmaps is not required anymore. The field min_cbm_bits is enough to validate the CBM (capacity bit mask) if the architecture can support the zero CBM or not. Suggested-by: Reinette Chatre Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Reviewed-by: Fenghua Yu Link: https://lore.kernel.org/r/166430979654.372014.615622285687642644.stgit@bmoger-ubuntu arch/x86/kernel/cpu/resctrl/core.c | 2 -- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 3 +-- include/linux/resctrl.h | 6 +++--- 3 files changed, 4 insertions(+), 7 deletions(-) commit 43e55d778a6b4e28a126fac28af0889fe2a54c3b Author: Amelie Delaunay Date: Fri Sep 30 17:02:32 2022 +0200 ARM: dts: stm32: update vbus-supply of usbphyc_port0 on stm32mp157c-ev1 phy-stm32-usbphyc bindings uses a connector node with vbus-supply property. Signed-off-by: Amelie Delaunay Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c-ev1.dts | 5 +++++ 1 file changed, 5 insertions(+) commit ad9591b01d24a72f2770949709eece100fab88f7 Author: Fabrice Gasnier Date: Fri Sep 30 16:56:43 2022 +0200 ARM: dts: stm32: add support for USB2514B onboard hub on stm32mp157c-ev1 Add support for USB2514B onboard hub on stm32mp157c EV1 board. The HUB is supplied by a 3v3 PMIC regulator. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c-ev1.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 225480f040b68ae313dcc5e012cc2d34e5816c4d Merge: 3bd5549bd479 3817b2ac71de Author: David S. Miller Date: Mon Oct 24 09:22:12 2022 +0100 Merge branch 'dpaa2-eth-AF_XDP-zc' Ioana Ciornei says: ==================== net: dpaa2-eth: AF_XDP zero-copy support This patch set adds support for AF_XDP zero-copy in the dpaa2-eth driver. The support is available on the LX2160A SoC and its variants and only on interfaces (DPNIs) with a maximum of 8 queues (HW limitations are the root cause). We are first implementing the .get_channels() callback since this a dependency for further work. Patches 2-3 are working on making the necessary changes for multiple buffer pools on a single interface. By default, without an AF_XDP socket attached, only a single buffer pool will be used and shared between all the queues. The changes in the functions are made in this patch, but the actual allocation and setup of a new BP is done in patch#10. Patches 4-5 are improving the information exposed in debugfs. We are exposing a new file to show which buffer pool is used by what channels and how many buffers it currently has. The 6th patch updates the dpni_set_pools() firmware API so that we are capable of setting up a different buffer per queue in later patches. In the 7th patch the generic dev_open/close APIs are used instead of the dpaa2-eth internal ones. Patches 8-9 are rearranging the existing code in dpaa2-eth.c in order to create new functions which will be used in the XSK implementation in dpaa2-xsk.c Finally, the last 3 patches are adding the actual support for both the Rx and Tx path of AF_XDP zero-copy and some associated tracepoints. Details on the implementation can be found in the actual patch. Changes in v2: - 3/12: Export dpaa2_eth_allocate_dpbp/dpaa2_eth_free_dpbp in this patch to avoid a build warning. The functions will be used in next patches. - 6/12: Use __le16 instead of u16 for the dpbp_id field. - 12/12: Use xdp_buff->data_hard_start when tracing the BP seeding. Changes in v3: - 3/12: fix leaking of bp on error path ==================== Acked-by: Björn Töpel Signed-off-by: David S. Miller commit 3817b2ac71de2dd634a0d37bd548bb06c878d361 Author: Robert-Ionut Alexa Date: Tue Oct 18 17:19:01 2022 +0300 net: dpaa2-eth: add trace points on XSK events Define the dpaa2_tx_xsk_fd and dpaa2_rx_xsk_fd trace events for the XSK zero-copy Rx and Tx path. Also, define the dpaa2_eth_buf as an event class so that both dpaa2_eth_buf_seed and dpaa2_xsk_buf_seed traces can derive from the same class. Signed-off-by: Robert-Ionut Alexa Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller .../net/ethernet/freescale/dpaa2/dpaa2-eth-trace.h | 142 +++++++++++++-------- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 6 + drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk.c | 4 + 3 files changed, 101 insertions(+), 51 deletions(-) commit 4a7f6c5ac9e558b07a6cf9407ad28250b60980ab Author: Robert-Ionut Alexa Date: Tue Oct 18 17:19:00 2022 +0300 net: dpaa2-eth: AF_XDP TX zero copy support Add support in dpaa2-eth for packet processing on the Tx path using AF_XDP zero copy mode. The newly added dpaa2_xsk_tx() function will handle enqueuing AF_XDP Tx packets into the appropriate queue and update any necessary statistics. On a more detailed note, the dpaa2_xsk_tx_build_fd() function handles creating a Scatter-Gather frame descriptor with only one data buffer. This is needed because otherwise we would need to impose a headroom in the Tx buffer to store our software annotation structures. This tactic is already used on the normal data path of the dpaa2-eth driver, thus we are reusing the dpaa2_eth_sgt_get/dpaa2_eth_sgt_recycle functions in order to allocate and recycle the Scatter-Gather table buffers. In case we have reached the maximum number of Tx XSK packets to be sent in a NAPI cycle, we'll exit the dpaa2_eth_poll() and hope to be rescheduled again. On the XSK Tx confirmation path, we are just unmapping the SGT buffer and recycle it for further use. Signed-off-by: Robert-Ionut Alexa Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 48 +++++++-- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 22 +++- drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk.c | 123 +++++++++++++++++++++++ 3 files changed, 183 insertions(+), 10 deletions(-) commit 48276c08cf5d2039aad5ef92ae7057ae0946d51e Author: Robert-Ionut Alexa Date: Tue Oct 18 17:18:59 2022 +0300 net: dpaa2-eth: AF_XDP RX zero copy support This patch adds the support for receiving packets via the AF_XDP zero-copy mechanism in the dpaa2-eth driver. The support is available only on the LX2160A SoC and variants because we are relying on the HW capability to associate a buffer pool to a specific queue (QDBIN), only available on newer WRIOP versions. On the control path, the dpaa2_xsk_enable_pool() function is responsible to allocate a buffer pool (BP), setup this new BP to be used only on the requested queue and change the consume function to point to the XSK ZC one. We are forced to call dev_close() in order to change the queue to buffer pool association (dpaa2_xsk_set_bp_per_qdbin) . This also works in our favor since at dev_close() the buffer pools will be drained and at the later dev_open() call they will be again seeded, this time with buffers allocated from the XSK pool if needed. On the data path, a new software annotation type is defined to be used only for the XSK scenarios. This will enable us to pass keep necessary information about a packet buffer between the moment in which it was seeded and when it's received by the driver. In the XSK case, we are keeping the associated xdp_buff. Depending on the action returned by the BPF program, we will do the following: - XDP_PASS: copy the contents of the packet into a brand new skb, recycle the initial buffer. - XDP_TX: just enqueue the same frame descriptor back into the Tx path, the buffer will get automatically released into the initial BP. - XDP_REDIRECT: call xdp_do_redirect() and exit. Signed-off-by: Robert-Ionut Alexa Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller MAINTAINERS | 1 + drivers/net/ethernet/freescale/dpaa2/Makefile | 2 +- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 131 ++++++--- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 36 ++- drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk.c | 327 +++++++++++++++++++++++ 5 files changed, 452 insertions(+), 45 deletions(-) commit ee2a3bdef94bf823483ca237552aad7bd374baa0 Author: Robert-Ionut Alexa Date: Tue Oct 18 17:18:58 2022 +0300 net: dpaa2-eth: create and export the dpaa2_eth_receive_skb() function Carve out code from the dpaa2_eth_rx() function in order to create and export the dpaa2_eth_receive_skb() function. Do this in order to reuse this code also from the XSK path which will be introduced in a later patch. Signed-off-by: Robert-Ionut Alexa Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 84 +++++++++++++----------- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 12 ++++ 2 files changed, 59 insertions(+), 37 deletions(-) commit 129902a351bf7593c2a1e81a26900a7648845b5e Author: Robert-Ionut Alexa Date: Tue Oct 18 17:18:57 2022 +0300 net: dpaa2-eth: create and export the dpaa2_eth_alloc_skb function The dpaa2_eth_alloc_skb() function is added by moving code from the dpaa2_eth_copybreak() previously defined function. What the new API does is to allocate a new skb, copy the frame data from the passed FD to the new skb and then return the skb. Export this new function since we'll need the this functionality also from the XSK code path. Signed-off-by: Robert-Ionut Alexa Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 25 ++++++++++++++++-------- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 5 +++++ 2 files changed, 22 insertions(+), 8 deletions(-) commit e3caeb2ddbf2b6e876b28a5ecd3357267002682f Author: Ioana Ciornei Date: Tue Oct 18 17:18:56 2022 +0300 net: dpaa2-eth: use dev_close/open instead of the internal functions Instead of calling the internal functions which implement .ndo_stop and .ndo_open, we can simply call dev_close and dev_open, so that we keep the code cleaner. Also, in the next patches we'll use the same APIs from other files without needing to export the internal functions. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 801c76dd067cb7e92934f49e21d95ecc54f82689 Author: Robert-Ionut Alexa Date: Tue Oct 18 17:18:55 2022 +0300 net: dpaa2-eth: update the dpni_set_pools() API to support per QDBIN pools Update the dpni_set_pool() firmware API so that in the next patches we can configure per Rx queue (per QDBIN) buffer pools. This is a hard requirement of the AF_XDP, thus we need the newer API version. Signed-off-by: Robert-Ionut Alexa Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h | 19 +++++++++++++------ drivers/net/ethernet/freescale/dpaa2/dpni.c | 6 +++++- drivers/net/ethernet/freescale/dpaa2/dpni.h | 9 +++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) commit b1dd9bf6ead81bfb910de1df3be74e9d176cae47 Author: Ioana Ciornei Date: Tue Oct 18 17:18:54 2022 +0300 net: dpaa2-eth: export buffer pool info into a new debugfs file Export the allocated buffer pools, the number of buffers that they have currently and which channels are using which BP. The output looks like below: Buffer pool info for eth2: IDX BPID Buf count CH#0 CH#1 CH#2 CH#3 BP#0 1 5124 x x x x Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller .../ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 96b44697e53a46856aafe6cc4a9f3708a88cc2b5 Author: Ioana Ciornei Date: Tue Oct 18 17:18:53 2022 +0300 net: dpaa2-eth: export the CH# in the 'ch_stats' debug file Just give out an index for each channel that we export into the debug file in the form of CH#. This is purely to help corelate each channel information from one debugfs file to another one. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 095174dafc74c392673ad73de750833804016da7 Author: Robert-Ionut Alexa Date: Tue Oct 18 17:18:52 2022 +0300 net: dpaa2-eth: add support for multiple buffer pools per DPNI This patch allows the configuration of multiple buffer pools associated with a single DPNI object, each distinct DPBP object not necessarily shared among all queues. The user can interogate both the number of buffer pools and the buffer count in each buffer pool by using the .get_ethtool_stats() callback. Signed-off-by: Robert-Ionut Alexa Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 189 ++++++++++++++------- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 26 ++- .../net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 15 +- 3 files changed, 163 insertions(+), 67 deletions(-) commit 3313206827678f6f036eca601a51f6c4524b559a Author: Ioana Ciornei Date: Tue Oct 18 17:18:51 2022 +0300 net: dpaa2-eth: rearrange variable in dpaa2_eth_get_ethtool_stats Rearrange the variables in the dpaa2_eth_get_ethtool_stats() function so that we adhere to the reverse Christmas tree rule. Also, in the next patch we are adding more variables and I didn't know where to place them with the current ordering. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 14e493ddc341169f640a5b73120a278411129d4e Author: Robert-Ionut Alexa Date: Tue Oct 18 17:18:50 2022 +0300 net: dpaa2-eth: add support to query the number of queues through ethtool The .get_channels() ethtool_ops callback is implemented and exports the number of queues: Rx, Tx, Tx conf and Rx err. The last two ones, Tx confirmation and Rx err, are counted as 'others'. The .set_channels() callback is not implemented since the DPAA2 software/firmware architecture does not allow the dynamic reconfiguration of the number of queues. Signed-off-by: Robert-Ionut Alexa Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller .../net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit dbbd909eeb26037fc38a4d29d6d94f7c39631a5e Author: Yang Yingliang Date: Thu Oct 20 15:56:50 2022 +0800 pinctrl: qcom: sdm670: change sdm670_reserved_gpios to static sdm670_reserved_gpios is only used in pinctrl-sdm670.c now, change it to static. Fixes: 61164d220f52 ("pinctrl: qcom: add sdm670 pinctrl") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221020075650.1031228-1-yangyingliang@huawei.com Acked-by: Richard Acayan [Fix up subject] Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-sdm670.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab28896f1a831581b0b59ef1f7e6fa64066c2546 Author: Pin-yen Lin Date: Thu Oct 13 19:04:10 2022 +0800 drm/bridge: it6505: Improve synchronization between extcon subsystem Originally, the it6505 relies on a short sleep in the IRQ handler and a long sleep to make sure it6505->lane_swap and it6505->lane_count is configured in it6505_extcon_work and it6505_detect, respectively. Use completion and additional DPCD read to remove the unnecessary waits, and use a different lock for it6505_extcon_work and the threaded IRQ handler because they no longer need to run exclusively. The wait time of the completion is usually less than 10ms in local experiments, but leave it larger here just in case. Signed-off-by: Pin-yen Lin Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221013110411.1674359-4-treapking@chromium.org drivers/gpu/drm/bridge/ite-it6505.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 5827b1e1c20514fe36b2bb92fab28df088cc2499 Author: Pin-yen Lin Date: Thu Oct 13 19:04:09 2022 +0800 drm/bridge: it6505: Setup links in it6505_irq_hpd Move the DPCD read and link setup steps to HPD IRQ handler to remove an unnecessary dependency between .detect callback and the HPD IRQ handler before registering it6505 as a DRM bridge. This is safe because there is always a .detect call after each HPD IRQ handler triggered by the drm_helper_hpd_irq_event call. Signed-off-by: Pin-yen Lin Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221013110411.1674359-3-treapking@chromium.org drivers/gpu/drm/bridge/ite-it6505.c | 80 ++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 45 deletions(-) commit e577d4b13064c337b83fe7edecb3f34e87144821 Author: Pin-yen Lin Date: Thu Oct 13 19:04:08 2022 +0800 drm/bridge: it6505: Initialize AUX channel in it6505_i2c_probe During device boot, the HPD interrupt could be triggered before the DRM subsystem registers it6505 as a DRM bridge. In such cases, the driver tries to access AUX channel and causes NULL pointer dereference. Initializing the AUX channel earlier to prevent such error. Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver") Signed-off-by: Pin-yen Lin Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221013110411.1674359-2-treapking@chromium.org drivers/gpu/drm/bridge/ite-it6505.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7cac5ffc084b6ccdf8f6c7838072ff3256675177 Merge: 417c326091b0 1b6b54ef7c4a Author: Linus Walleij Date: Mon Oct 24 09:48:37 2022 +0200 Merge tag 'qcom-pinctrl-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into devel Qualcomm pinctrl Devicetree bindings changes for v6.2 Big set of refactoring and improving Qualcomm pin controller bindings: 1. Convert several bindings from TXT to DT schema format: MDM9615, MSM8974, MSM8994, MSM8996, MSM8998, SC7180, SDM630, SDM845, SM8150. 2. Refactor existing DT schema bindings to be consistent and similar to each other, remove unneeded pieces (provided by common bindings) and unify the style. 2. Fix matching of the existing DT schema bindings, so they properly validate the DTS. When looking for pin configuration (children nodes), be specific and expect "state" or "pins" suffixes (depending on the nesting. This allows the schema later to properly parse also GPIO hogs, although it is not yet implemented. The changes require aligning the DTS to new layout, but it does not break any compatibility. commit 39d9dfc6fbe1860e2ee7f72edd2582a071c90b20 Author: Geert Uytterhoeven Date: Fri Oct 21 16:13:05 2022 +0200 arm64: dts: renesas: r8a779g0: Add remaining HSCIF nodes Add device nodes for the remaining High Speed Serial Communication Interfaces with FIFO (HSCIF) on the Renesas R-Car V4H (R8A779G0) SoC, including DMA support. Reformat the existing HSCIF0 node for consistency. Based on patches in the BSP by Takeshi Kihara and Vinh Nguyen. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/64c15b2d13439b2072cde0b588a251cb54f7dc01.1666361314.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 56 +++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) commit a4c31c56d2d356414148f3714bbe5634594f375a Author: Geert Uytterhoeven Date: Fri Oct 21 16:13:04 2022 +0200 arm64: dts: renesas: r8a779g0: Add SCIF nodes Add device nodes for the Serial Communication Interfaces with FIFO (SCIF) on the Renesas R-Car V4H (R8A779G0) SoC, including DMA support. Based on patches in the BSP by Takeshi Kihara and Vinh Nguyen. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/3f0ad7ce0fedfca2783001a6eb3eca96aea72115.1666361314.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 68 +++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 4161634bce9537ed173b3c8fd0bf9f0218bcf41c Author: Miquel Raynal Date: Wed Oct 19 15:44:23 2022 +0200 mac802154: Ensure proper scan-level filtering We now have a fine grained filtering information so let's ensure proper filtering in scan mode, which means that only beacons are processed. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221019134423.877169-4-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/rx.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 19177eedcf4412a90ec1ebaffac3514d0a3b4ff2 Author: Miquel Raynal Date: Wed Oct 19 15:44:22 2022 +0200 ieee802154: hwsim: Save the current filtering level and use it Save the requested filtering level in the ->set_promiscuous() helper. The logic is: either we want to enable promiscuous mode and we want to disable filters entirely, or we want to use the highest filtering level by default. This is of course an assumption that only works today, but if in the future intermediate levels (such as scan filtering level) are implemented in the core, this logic will need to be updated. This would imply replacing ->set_promiscuous() by something more fine grained anyway, so we are probably safe with this assumption. Once saved in the PIB structure, we can use this value instead of trying to access the PHY structure to know what hardware filtering level has been advertised. Suggested-by: Alexander Aring Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221019134423.877169-3-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt drivers/net/ieee802154/mac802154_hwsim.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 9a60850e8cd9160beba79aa6d529332eb18c9bc7 Author: Miquel Raynal Date: Wed Oct 19 15:44:21 2022 +0200 ieee802154: hwsim: Introduce a helper to update all the PIB attributes Perform the update of the PIB structure only in a single place. This way we can have much simpler functions when updating the page, channel or address filters. This helper will become even more useful when we will update the ->set_promiscuous() callback to actually save the filtering level in the PIB structure. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221019134423.877169-2-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt drivers/net/ieee802154/mac802154_hwsim.c | 56 +++++++++++++++++--------------- 1 file changed, 30 insertions(+), 26 deletions(-) commit 2556e1a83574f6248b70534c5d50e3ef9eaa4eb5 Author: wangjianli Date: Sat Oct 22 14:07:01 2022 +0800 gpu/drm: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: wangjianli Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221022060701.58280-1-wangjianli@cdjrlc.com drivers/gpu/drm/drm_rect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e160d9c660f15aa3fbea160dd02c3946d356509 Author: wangjianli Date: Sat Oct 22 14:05:51 2022 +0800 gpu/drm: fix repeated words in comments Delete the redundant word 'the'. Signed-off-by: wangjianli Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221022060551.56918-1-wangjianli@cdjrlc.com drivers/gpu/drm/drm_mipi_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7af4d67cf0ffd882007a16c68378ab742e9cba8 Author: Colin Ian King Date: Fri Oct 21 09:40:35 2022 +0100 drm/vc4: Fix spelling mistake "mmaping" -> "mmapping" There are a couple of spelling mistakes in DRM_DEBUG messages. Fix them. Signed-off-by: Colin Ian King Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221021084035.65367-1-colin.i.king@gmail.com drivers/gpu/drm/vc4/vc4_bo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56fed763f6b2dc2578ea8c3e7d317722d8581cba Author: Martin Povišer Date: Sun Sep 18 11:58:43 2022 +0200 arm64: dts: apple: Add ADMAC resets on t8103/t600x There's a shared reset for the ADMAC and MCA peripherals. The MCA node already describes it, and being a shared reset it is important we describe it on the ADMAC node too. Signed-off-by: Martin Povišer Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t600x-die0.dtsi | 1 + arch/arm64/boot/dts/apple/t8103.dtsi | 1 + 2 files changed, 2 insertions(+) commit d52ca60191f2889faa5b4b140f5523116785d2a6 Author: Martin Povišer Date: Sun Sep 18 11:58:42 2022 +0200 dt-bindings: dma: apple,admac: Add reset On the SoCs there is usually a shared audio reset line, so add a property for that. Signed-off-by: Martin Povišer Acked-by: Krzysztof Kozlowski Signed-off-by: Hector Martin Documentation/devicetree/bindings/dma/apple,admac.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 51979fbb7fb8204c3df65f887b0d8c2b0a410c24 Author: Janne Grunau Date: Fri Sep 16 16:25:50 2022 +0200 arm64: dts: apple: t600x: Add MCA and its support Add the MCA I2S transceiver and its supporting ADMAC and NCO nodes. Signed-off-by: Janne Grunau Acked-by: Marc Zyngier Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t600x-common.dtsi | 9 ++++ arch/arm64/boot/dts/apple/t600x-die0.dtsi | 62 ++++++++++++++++++++++++++ arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi | 4 ++ arch/arm64/boot/dts/apple/t600x-j375.dtsi | 4 ++ 4 files changed, 79 insertions(+) commit 8a3df85ad87d2e76b47e9882252594e2efb8bf9b Author: Martin Povišer Date: Fri Sep 16 16:25:49 2022 +0200 arm64: dts: apple: t8103: Add MCA and its support Add the MCA I2S transceiver node and its supporting NCO, ADMAC nodes. Signed-off-by: Martin Povišer Signed-off-by: Janne Grunau Acked-by: Marc Zyngier Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 4 ++ arch/arm64/boot/dts/apple/t8103.dtsi | 73 +++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) commit 50e320adf4ae34340a36938f02fde8b276015322 Author: Martin Povišer Date: Fri Sep 16 16:25:48 2022 +0200 arm64: dts: apple: t8103: Add AUDIO_P parent to the SIO_ADMA power domain The SIO_ADMA is a power domain of the Audio DMA Controller. In addition to it, the AUDIO_P domain must be on for the controller's MMIO registers to be accessible. On t600x and t8112, AUDIO_P is a parent of SIO_ADMA. On t8103, it isn't so, at least as far as Apple's firmware goes. To make our life easier, add the parent-child relationship on t8103 also. Signed-off-by: Martin Povišer Signed-off-by: Janne Grunau Acked-by: Marc Zyngier Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t8103-pmgr.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aaa1d42a4ce3333de6736e3dfae9f4f7c85c5ff9 Author: Janne Grunau Date: Fri Sep 16 16:25:47 2022 +0200 arm64: dts: apple: Add J375 devicetrees These are the Mac Studio devices with M1 Max (t6001) and M1 Ultra (t6002). Signed-off-by: Janne Grunau Acked-by: Marc Zyngier Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/Makefile | 2 + arch/arm64/boot/dts/apple/t6001-j375c.dts | 18 +++++ arch/arm64/boot/dts/apple/t6002-j375d.dts | 50 +++++++++++++ arch/arm64/boot/dts/apple/t600x-j375.dtsi | 113 ++++++++++++++++++++++++++++++ 4 files changed, 183 insertions(+) commit cad7a077d6f061d95e6dab0dccae406ec57cb24a Author: Hector Martin Date: Fri Sep 16 16:25:46 2022 +0200 arm64: dts: apple: Add J314 and J316 devicetrees These are the 14-inch and 16-inch 2021 MacBooks, in both M1 Pro and M1 Max variants (t6000 and t6001). Signed-off-by: Janne Grunau Acked-by: Marc Zyngier Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/Makefile | 4 + arch/arm64/boot/dts/apple/t6000-j314s.dts | 18 ++++ arch/arm64/boot/dts/apple/t6000-j316s.dts | 18 ++++ arch/arm64/boot/dts/apple/t6001-j314c.dts | 18 ++++ arch/arm64/boot/dts/apple/t6001-j316c.dts | 18 ++++ arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi | 110 +++++++++++++++++++++++++ 6 files changed, 186 insertions(+) commit 7b0b0191a2c769819b4155a597ecef5c58e646c6 Author: Hector Martin Date: Fri Sep 16 16:25:45 2022 +0200 arm64: dts: apple: Add initial t6000/t6001/t6002 DTs These SoCs are found in Apple devices with M1 Pro (t6000), M1 Max (t6001) and M1 Ultra (t6002). t6000 is a cut-down version of t6001, so the former just includes the latter and disables the missing bits (This is currently just one PMGR node and all of its domains. t6002 is two connected t6001 dies. The implementation seems to use t6001 with blocks disabled (mostly on the second die). MMIO addresses on the second die have a constant offset. The interrupt controller is multi-die aware. This setup can be represented in the device tree with two top level "soc" nodes. The MMIO offset is applied via "ranges" and devices are included with preproceesor macros to make the node labels unique and to specify the die number for the interrupt definition. Device nodes are distributed over dtsi files based on whether they are present on both dies or just on the first die. The only execption is the NVMe controller which resides on the second die. Its nodes are in a separate file. Co-developed-by: Janne Grunau Signed-off-by: Janne Grunau Acked-by: Marc Zyngier Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/multi-die-cpp.h | 22 + arch/arm64/boot/dts/apple/t6000.dtsi | 18 + arch/arm64/boot/dts/apple/t6001.dtsi | 63 + arch/arm64/boot/dts/apple/t6002.dtsi | 175 +++ arch/arm64/boot/dts/apple/t600x-common.dtsi | 128 ++ arch/arm64/boot/dts/apple/t600x-die0.dtsi | 298 ++++ arch/arm64/boot/dts/apple/t600x-dieX.dtsi | 103 ++ arch/arm64/boot/dts/apple/t600x-gpio-pins.dtsi | 45 + arch/arm64/boot/dts/apple/t600x-nvme.dtsi | 42 + arch/arm64/boot/dts/apple/t600x-pmgr.dtsi | 2012 ++++++++++++++++++++++++ 10 files changed, 2906 insertions(+) commit 6053bb2ce45755916ed5774a9898db31bed8529a Author: Hector Martin Date: Fri Sep 16 16:25:44 2022 +0200 arm64: dts: apple: Fix j45x model years The Apple silicon iMac models were released in April 2021. Signed-off-by: Janne Grunau Acked-by: Marc Zyngier Signed-off-by: Hector Martin arch/arm64/boot/dts/apple/t8103-j456.dts | 2 +- arch/arm64/boot/dts/apple/t8103-j457.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a450fc9a43799f8224b24a992bb9aa9fbf66d881 Author: Janne Grunau Date: Fri Sep 16 16:25:43 2022 +0200 dt-bindings: arm: apple: Add t6001/t6002 Mac Studio compatibles This adds the following apple,t6001 platform: - apple,j375c - Mac Studio (M1 Max, 2022) And the initial apple,t6002 platform: - apple,j375d - Mac Studio (M1 Ultra, 2022) Signed-off-by: Janne Grunau Acked-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Acked-by: Marc Zyngier Signed-off-by: Hector Martin Documentation/devicetree/bindings/arm/apple.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 9d86cffecdfc5069ae0899ece57131c179dc0b0a Author: Janne Grunau Date: Fri Sep 16 16:25:42 2022 +0200 dt-bindings: apple,aic2: Add CPU PMU per-cpu pseudo-interrupts Advertise the two pseudo-interrupts that tied to the two PMU flavours present in the Apple M1 Pro/Max/Ultra SoC. We choose the expose two different pseudo-interrupts to the OS as the e-core PMU is obviously different from the p-core one, effectively presenting two different devices. Imported from "apple,aic". Signed-off-by: Janne Grunau Acked-by: Krzysztof Kozlowski Acked-by: Marc Zyngier Reviewed-by: Rob Herring Signed-off-by: Hector Martin .../bindings/interrupt-controller/apple,aic2.yaml | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 8cc8bdceb669eaadedde5fcd9ff2ec47f9c9067a Author: Sven Peter Date: Fri Sep 16 11:41:48 2022 +0200 dt-bindings: iommu: dart: add t6000 compatible The M1 Max/Pro SoCs come with a new DART variant that is incompatible with the previous one. Add a new compatible for those. Signed-off-by: Sven Peter Acked-by: Rob Herring Signed-off-by: Janne Grunau Signed-off-by: Hector Martin Documentation/devicetree/bindings/iommu/apple,dart.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7b76547835242c211127ba35dab9c0f91194d98e Author: Krzysztof Kozlowski Date: Sun Oct 2 11:20:04 2022 +0200 ARM: dts: ls1021: correct indentation Do not use spaces for indentation. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo arch/arm/boot/dts/ls1021a-moxa-uc-8410a.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8065fc937f0f147f0a6efdf14f3cbcb821ea18db Author: Frank Li Date: Fri Sep 30 13:34:25 2022 -0500 arm64: dts: imx8dxl: add usb1 and usb2 support There are two chipidea usb controller in 8dxl. Add usb node at common connect subsystem. Enable two usb at imx8dxl_evk boards dts. Signed-off-by: Frank Li Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi | 39 ++++++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 34 +++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8dxl-ss-conn.dtsi | 10 ++++++ 3 files changed, 83 insertions(+) commit d9b98063c3cd475cd259c6a69166215e068f4952 Author: Frank Li Date: Fri Sep 30 13:34:24 2022 -0500 firmware: imx: scu-pd: add missed USB_1_PHY pd USB_1_PHY is not defined in pd driver on 8DXL. Signed-off-by: Frank Li Signed-off-by: Shawn Guo drivers/firmware/imx/scu-pd.c | 1 + 1 file changed, 1 insertion(+) commit 3c713925fd4c389c7c9a02431152fb332a4d0eed Author: Dmitry Torokhov Date: Fri Sep 30 11:23:03 2022 -0700 ARM: dts: vf610-zii-dev-rev-c: fix polarity of at86rf233 reset line at86rf230 driver starts with having reset line high, and then drives it low and then high again, and even calls it "rstn" internally, therefore it needs to be annotated as "active low" in the DTS. This will make difference when at86rf230 driver will be converted to gpiod API that respects declared line polarity. Signed-off-by: Dmitry Torokhov Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49f8992cc1812e456c1a41578fef3e05b468a1fc Author: Marcel Ziswiler Date: Wed Sep 28 09:33:35 2022 +0200 ARM: dts: imx7-colibri: remove spurious debounce property Remove spurious debounce property from linux,extcon-usb-gpio. Note that debouncing is hard-coded to 20 ms (USB_GPIO_DEBOUNCE_MS define). Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 1 - 1 file changed, 1 deletion(-) commit 63d217e9da25ba7b0d2954719a5e59793b8ad3e6 Author: Marcel Ziswiler Date: Wed Sep 28 09:33:34 2022 +0200 ARM: dts: colibri-imx6: specify usbh_pen gpio being active-low Specify USBH_PEN GPIO being active-low rather than active-high. Note that this should not have any functional impact as for fixed regulators the regular GPIO polarity is ignored and a true active-high enable GPIO would need an additional enable-active-high property which is/was not the case here. However, this may be rather confusing which this patch fixes. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-colibri.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3904b814e66f986dda5517de7c0a03f81e4aa145 Author: Marcel Ziswiler Date: Wed Sep 28 09:33:33 2022 +0200 ARM: dts: colibri-imx6: move vbus-supply to module level device tree Move USB VBUS supply from single carrier board to module level device tree. This pin is as per Colibri module family standard. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-colibri-aster.dts | 1 - arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts | 1 - arch/arm/boot/dts/imx6dl-colibri-iris.dts | 1 - arch/arm/boot/dts/imx6qdl-colibri.dtsi | 9 +++++++-- 4 files changed, 7 insertions(+), 5 deletions(-) commit fecd4624dee10f5cf0519e97d95e2980e4838dff Author: Philippe Schenker Date: Wed Sep 28 09:33:32 2022 +0200 ARM: dts: colibri-imx6: usb dual-role switching Introduce USBC_DET GPIO based USB dual-role aka device/host switching. While at it re-work pinmux comment adding SODIMM number to the USBC_DET entry. Signed-off-by: Philippe Schenker Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-colibri.dtsi | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 41f501d51792384d5ff76c55547f6b81278b27ca Author: Marcel Ziswiler Date: Wed Sep 28 09:33:36 2022 +0200 ARM: imx_v6_v7_defconfig: Enable USB GPIO extcon support Enable USB GPIO extcon support aka CONFIG_EXTCON_USB_GPIO as e.g. used on Colibri iMX6 and Colibri iMX7 for USB device/host role switching. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 375347575fb369255471e1142bd62621b85d1876 Author: Marek Vasut Date: Sat Sep 24 19:46:38 2022 +0200 arm64: dts: imx8mm: Drop QCA clk out setup on Data Modul i.MX8M Mini eDM SBC The PHY clock output is not connected to anything, drop the clock output configuration. This way, the PHY does not generate output clock. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts | 2 -- 1 file changed, 2 deletions(-) commit 9509593f327ac27e8cb912cfb4696feb718842d2 Author: Marek Vasut Date: Sat Sep 24 19:46:03 2022 +0200 arm64: dts: imx8mm: Model PMIC to SNVS RTC clock path on Data Modul i.MX8M Mini eDM SBC The PMIC is the 32 kHz clock source for the RTC_XTALI input of the SoC on this system. The RTC_XTALI input is used to supply 32 kHz clock to the SVNS RTC per "i.MX 8M Mini Applications Processor Reference Manual, Rev. 3, 11/2020" page 759 "The 32KHz XTAL module uses a different IP and it is used as the clock source for the RTC, located in the SNVS." The PMIC has its own dedicated 32 kHz XTAL on input. Model the connection in DT. Signed-off-by: Marek Vasut Reviewed-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 21683c0d39ca81a4fc3fbb62b9c43f6ffb482372 Author: Andreas Kemnade Date: Sat Sep 24 00:11:12 2022 +0200 ARM: dts: imx: Add devicetree for Kobo Aura 2 This adds a devicetree for the Kobo Aura 2 Ebook reader. It is based on boards marked with "37NB-E60QL0+4B1". It is equipped with an i.MX6SL SoC. Expected to work: - Buttons - Wifi (with external module) - LED - uSD - USB - RTC - Fuel Gauge - Backlight (if the required regulator is probed before the backlight, specifying a supply is not supported by backlightdriver) Signed-off-by: Andreas Kemnade Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6sl-kobo-aura2.dts | 555 ++++++++++++++++++++++++++++++++ 2 files changed, 556 insertions(+) commit 2eee1c48e52066e2c8cb01e1637e44bfd376c994 Author: Andreas Kemnade Date: Sat Sep 24 00:11:11 2022 +0200 dt-bindings: arm: fsl: add compatible string for Kobo Aura 2 This adds a compatible string for the Kobo Aura 2 eBook reader. Signed-off-by: Andreas Kemnade Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 1 + 1 file changed, 1 insertion(+) commit f98c2dfedb735b28727a15de6769c68691e58617 Author: Peng Fan Date: Fri Sep 23 15:49:43 2022 +0800 arm64: dts: imx8m: align anatop with bindings The CCM ANALOG module is used for generate PLLs, align the node with DT bindings Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 5 +++-- arch/arm64/boot/dts/freescale/imx8mn.dtsi | 6 +++--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 6 +++--- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 5 +++-- 4 files changed, 12 insertions(+), 10 deletions(-) commit 1a3e93814cdd0552db4e4d724e1824aab997b1ff Author: Peng Fan Date: Fri Sep 23 15:49:42 2022 +0800 dt-bindings: clock: add i.MX8M Anatop i.MX8M Family features an anatop module the produces PLL to clock control module(CCM) root clock. Add the missing yaml file. Signed-off-by: Peng Fan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo .../bindings/clock/fsl,imx8m-anatop.yaml | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 8ed40ee35d94df2fdb56bbbc07e17dffd2383625 Author: Jinlong Chen Date: Thu Oct 20 08:48:19 2022 +0200 block: fix up elevator_type refcounting The current reference management logic of io scheduler modules contains refcnt problems. For example, blk_mq_init_sched may fail before or after the calling of e->ops.init_sched. If it fails before the calling, it does nothing to the reference to the io scheduler module. But if it fails after the calling, it releases the reference by calling kobject_put(&eq->kobj). As the callers of blk_mq_init_sched can't know exactly where the failure happens, they can't handle the reference to the io scheduler module properly: releasing the reference on failure results in double-release if blk_mq_init_sched has released it, and not releasing the reference results in ghost reference if blk_mq_init_sched did not release it either. The same problem also exists in io schedulers' init_sched implementations. We can address the problem by adding releasing statements to the error handling procedures of blk_mq_init_sched and init_sched implementations. But that is counterintuitive and requires modifications to existing io schedulers. Instead, We make elevator_alloc get the io scheduler module references that will be released by elevator_release. And then, we match each elevator_get with an elevator_put. Therefore, each reference to an io scheduler module explicitly has its own getter and releaser, and we no longer need to worry about the refcnt problems. The bugs and the patch can be validated with tools here: https://github.com/nickyc975/linux_elv_refcnt_bug.git [hch: split out a few bits into separate patches, use a non-try module_get in elevator_alloc] Signed-off-by: Jinlong Chen Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221020064819.1469928-5-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq-sched.c | 1 + block/blk-mq.c | 2 ++ block/elevator.c | 10 +++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) commit b54c2ad9b77de846e42104ecf94eb8329d2f03a3 Author: Jinlong Chen Date: Thu Oct 20 08:48:18 2022 +0200 block: check for an unchanged elevator earlier in __elevator_change No need to find the actual elevator_type struct for this comparism, the name is all that is needed. Signed-off-by: Jinlong Chen [hch: split from a larger patch] Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221020064819.1469928-4-hch@lst.de Signed-off-by: Jens Axboe block/elevator.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 58367c8a5f845498fd341e5687bab513925e4ac0 Author: Christoph Hellwig Date: Thu Oct 20 08:48:17 2022 +0200 block: sanitize the elevator name before passing it to __elevator_change The stripped name should also be used for the none check. To do so strip it in the caller and pass in the sanitized name. Drop the pointless __ prefix in the function name while we're at it. Based on a patch from Jinlong Chen . Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221020064819.1469928-3-hch@lst.de Signed-off-by: Jens Axboe block/elevator.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit dd6f7f17bf5831ac94d2b8ffe3d67dac201a9b97 Author: Christoph Hellwig Date: Thu Oct 20 08:48:16 2022 +0200 block: add proper helpers for elevator_type module refcount management Make sure we have helpers for all relevant module refcount operations on the elevator_type in elevator.h, and use them. Move the call to the get helper in blk_mq_elv_switch_none a bit so that it is obvious with a less verbose comment. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221020064819.1469928-2-hch@lst.de Signed-off-by: Jens Axboe block/blk-mq.c | 11 ++--------- block/elevator.c | 9 ++------- block/elevator.h | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 16 deletions(-) commit 671fae5e51297fc76b3758ca2edd514858734a6a Author: Yu Kuai Date: Wed Oct 19 20:15:18 2022 +0800 blk-wbt: don't enable throttling if default elevator is bfq Commit b5dc5d4d1f4f ("block,bfq: Disable writeback throttling") tries to disable wbt for bfq, it's done by calling wbt_disable_default() in bfq_init_queue(). However, wbt is still enabled if default elevator is bfq: device_add_disk elevator_init_mq bfq_init_queue wbt_disable_default -> done nothing blk_register_queue wbt_enable_default -> wbt is enabled Fix the problem by adding a new flag ELEVATOR_FLAG_DISBALE_WBT, bfq will set the flag in bfq_init_queue, and following wbt_enable_default() won't enable wbt while the flag is set. Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221019121518.3865235-7-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/bfq-iosched.c | 2 ++ block/blk-wbt.c | 11 ++++++++--- block/elevator.h | 3 ++- 3 files changed, 12 insertions(+), 4 deletions(-) commit 181d06637451b5348d746039478e71fa53dfbff6 Author: Yu Kuai Date: Wed Oct 19 20:15:17 2022 +0800 elevator: add new field flags in struct elevator_queue There are only one flag to indicate that elevator is registered currently, prepare to add a flag to disable wbt if default elevator is bfq. Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221019121518.3865235-6-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/elevator.c | 6 ++---- block/elevator.h | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) commit 3642ef4d95699193c4a461862382e643ae3720f0 Author: Yu Kuai Date: Wed Oct 19 20:15:16 2022 +0800 blk-wbt: don't show valid wbt_lat_usec in sysfs while wbt is disabled Currently, if wbt is initialized and then disabled by wbt_disable_default(), sysfs will still show valid wbt_lat_usec, which will confuse users that wbt is still enabled. This patch shows wbt_lat_usec as zero if it's disabled. Signed-off-by: Yu Kuai Reported-and-tested-by: Holger Hoffstätte Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221019121518.3865235-5-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/blk-sysfs.c | 3 +++ block/blk-wbt.c | 8 ++++++++ block/blk-wbt.h | 5 +++++ 3 files changed, 16 insertions(+) commit a9a236d238a5e8ab2e74ca62c2c7ba5dd435af77 Author: Yu Kuai Date: Wed Oct 19 20:15:15 2022 +0800 blk-wbt: make enable_state more accurate Currently, if user disable wbt through sysfs, 'enable_state' will be 'WBT_STATE_ON_MANUAL', which will be confusing. Add a new state 'WBT_STATE_OFF_MANUAL' to cover that case. Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221019121518.3865235-4-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/blk-wbt.c | 7 ++++++- block/blk-wbt.h | 12 +++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) commit b11d31ae01e6b0762b28e645ad6718a12faa8d14 Author: Yu Kuai Date: Wed Oct 19 20:15:14 2022 +0800 blk-wbt: remove unnecessary check in wbt_enable_default() If CONFIG_BLK_WBT_MQ is disabled, wbt_init() won't do anything. Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20221019121518.3865235-3-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/blk-wbt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d9f4cf125585ebf0718abcf5ce9ca898877c6d2 Author: Yu Kuai Date: Wed Oct 19 20:15:13 2022 +0800 elevator: remove redundant code in elv_unregister_queue() "elevator_queue *e" is already declared and initialized in the beginning of elv_unregister_queue(). Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20221019121518.3865235-2-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/elevator.c | 2 -- 1 file changed, 2 deletions(-) commit 074501bce3c5b4200a94b9937d189b3e3e2dbc98 Author: Yu Kuai Date: Wed Oct 12 17:40:35 2022 +0800 blk-iocost: read 'ioc->params' inside 'ioc->lock' in ioc_timer_fn() 'ioc->params' is updated in ioc_refresh_params(), which is proteced by 'ioc->lock', however, ioc_timer_fn() read params outside the lock. Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221012094035.390056-5-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/blk-iocost.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2b2da2f6dc80e1299586f7e046a071809d5dee7f Author: Yu Kuai Date: Wed Oct 12 17:40:34 2022 +0800 blk-iocost: prevent configuration update concurrent with io throttling This won't cause any severe problem currently, however, this doesn't seems appropriate: 1) 'ioc->params' is read from multiple places without holding 'ioc->lock', unexpected value might be read if writing it concurrently. 2) If configuration is changed while io is throttling, the functionality might be affected. For example, if module params is updated and cost becomes smaller, waiting for timer that is caculated under old configuration is not appropriate. Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221012094035.390056-4-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/blk-iocost.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 2c0647988433c3d7120542a3c42e12c152dd7afc Author: Yu Kuai Date: Wed Oct 12 17:40:33 2022 +0800 blk-iocost: don't release 'ioc->lock' while updating params ioc_qos_write() and ioc_cost_model_write() are the same: 1) hold lock to read 'ioc->params' to local variable; 2) update params to local variable without lock; 3) hold lock to write local variable to 'ioc->params'; In theroy, if user updates params concurrenty, the params might be lost: t1: update params a t2: update params b spin_lock_irq(&ioc->lock); memcpy(qos, ioc->params.qos, sizeof(qos)) spin_unlock_irq(&ioc->lock); qos[a] = xxx; spin_lock_irq(&ioc->lock); memcpy(qos, ioc->params.qos, sizeof(qos)) spin_unlock_irq(&ioc->lock); qos[b] = xxx; spin_lock_irq(&ioc->lock); memcpy(ioc->params.qos, qos, sizeof(qos)); ioc_refresh_params(ioc, true); spin_unlock_irq(&ioc->lock); spin_lock_irq(&ioc->lock); // updates of a will be lost memcpy(ioc->params.qos, qos, sizeof(qos)); ioc_refresh_params(ioc, true); spin_unlock_irq(&ioc->lock); Althrough this is not common case, the problem can by fixed easily by holding the lock through the read, update, write process. Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221012094035.390056-3-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/blk-iocost.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 8796acbc9a0eceeddd99eaef833bdda1241d39b9 Author: Yu Kuai Date: Wed Oct 12 17:40:32 2022 +0800 blk-iocost: disable writeback throttling Commit b5dc5d4d1f4f ("block,bfq: Disable writeback throttling") disable wbt for bfq, because different write-throttling heuristics should not work together. For the same reason, wbt and iocost should not work together as well, unless admin really want to do that, dispite that performance is affected. Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221012094035.390056-2-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe block/blk-iocost.c | 2 ++ 1 file changed, 2 insertions(+) commit 3aca47127a646165965ff52803e2b269eed91afc Author: Jeff Layton Date: Thu Sep 22 13:25:25 2022 -0400 fs: drop useless condition from inode_needs_update_time Signed-off-by: Jeff Layton Signed-off-by: Al Viro fs/inode.c | 3 --- 1 file changed, 3 deletions(-) commit fcf1492d6697fb22a4328260b0c76be12ed3badd Author: Al Viro Date: Sun Sep 4 17:15:38 2022 -0400 elf_core_copy_task_regs(): task_pt_regs is defined everywhere Had been since 2011 for all live architectures, ever since 2013 for all architectures, period. Signed-off-by: Al Viro include/linux/elfcore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b0e21d64253f56fa5b177e08383934680957697 Author: Al Viro Date: Mon Jun 8 13:44:16 2020 -0400 [elf][regset] simplify thread list handling in fill_note_info() fill_note_info() iterates through the list of threads collected in mm->core_state->dumper, allocating a struct elf_thread_core_info instance for each and linking those into a list. We need the entry corresponding to current to be first in the resulting list, so the logics for list insertion is if it's for current or list is empty insert in the head else insert after the first element However, in mm->core_state->dumper the entry for current is guaranteed to be the first one. Which means that both parts of condition will be true on the first iteration and neither will be true on all subsequent ones. Taking the first iteration out of the loop simplifies things nicely... Signed-off-by: Al Viro fs/binfmt_elf.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 922ef161b21e605bf803f65dc928fabefb735702 Author: Al Viro Date: Mon Sep 5 00:39:23 2022 -0400 [elf][regset] clean fill_note_info() a bit *info is already initialized... Signed-off-by: Al Viro fs/binfmt_elf.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 87562ed953bfda3ecdbbf2aba1d98920e4212588 Author: Al Viro Date: Sat Jun 13 00:11:00 2020 -0400 kill extern of vsyscall32_sysctl it's been dead for years. Signed-off-by: Al Viro arch/x86/include/asm/elf.h | 1 - 1 file changed, 1 deletion(-) commit 9a938eba8d284fba0daff62142dece74ae3c16de Author: Al Viro Date: Mon Jun 8 12:25:39 2020 -0400 kill coredump_params->regs it's always task_pt_regs(current) Signed-off-by: Al Viro fs/binfmt_elf.c | 4 ++-- fs/coredump.c | 1 - include/linux/coredump.h | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) commit 6a542d1d5f6c814fd3643b43e85b21757c1e363b Author: Al Viro Date: Mon Jun 8 12:21:07 2020 -0400 kill signal_pt_regs() Once upon at it was used on hot paths, but that had not been true since 2013. IOW, there's no point for arch-optimized equivalent of task_pt_regs(current) - remaining two users are not worth bothering with. Signed-off-by: Al Viro arch/alpha/include/asm/ptrace.h | 1 - fs/coredump.c | 2 +- include/linux/ptrace.h | 9 --------- kernel/signal.c | 2 +- 4 files changed, 2 insertions(+), 12 deletions(-) commit 4a1fc310e739d63d2d28952e358b33adde0d87e4 Author: Aaron Lawrence Date: Sun Oct 23 16:45:37 2022 +0700 Staging: rtl8192e: rtl819x_HTProc: fixed unnecessary parentheses Fixed multiple unnecessary parentheses as per the Linux kernel coding-style regulations. The issues were flagged by the checkpatch script. Signed-off-by: Aaron Lawrence Link: https://lore.kernel.org/r/d2168b90726dda2f02279a3483b53b8d9b34cb30.1666502177.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 354989f7dc1e54abcb3c0e7b47444e03cb060504 Author: Aaron Lawrence Date: Sun Oct 23 16:44:13 2022 +0700 Staging: rtl8192e: rtl819x_HTProc: fixed alignment matching open parenthesis Aligned multiple statements to match open parenthesis as per Linux kernel coding-style regulations. The issues were flagged by the checkpatch script. Signed-off-by: Aaron Lawrence Link: https://lore.kernel.org/r/98c9e764a4447ab550e5615c48f6a98bf6656b0d.1666502177.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_HTProc.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit a6f100aa64831f64496e26d55c6337cc7ceb8bfc Author: Aaron Lawrence Date: Sun Oct 23 16:41:51 2022 +0700 Staging: rtl8192e: rtl819x_HTProc: fixed missing blank space Added a missing blank space as per the Linux kernel coding-style regulations. The issue was flagged by the checkpatch script as a warning. Signed-off-by: Aaron Lawrence Link: https://lore.kernel.org/r/e6635103e3cf2426220767955b99d2e2b62a7329.1666502177.git.t4rmin@zohomail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_HTProc.c | 1 + 1 file changed, 1 insertion(+) commit bf0563502ecdbb97efb65790b37dd50afbe2d9b2 Author: Deepak R Varma Date: Sat Oct 22 01:03:42 2022 +0530 staging: wlan-ng: remove commented debug printk messages printk messages are added for program flow tracing and are left commented. These commented log messages should be removed as they are no more useful for program execution. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y1L0FiKvrM9jjZG9@debian-BULLSEYE-live-builder-AMD64 Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211netdev.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit 0cca034d02346ee0220a2968ad24984cd6307e72 Author: Marcel Ziswiler Date: Thu Sep 22 18:29:25 2022 +0200 arm64: defconfig: enable i.mx 8m plus specific interconnect support Build CONFIG_INTERCONNECT_IMX8MP as a kernel module without which one may get the following after boot: [ 15.728019] platform 32f10100.usb: deferred probe pending [ 15.733471] platform 32f10108.usb: deferred probe pending [ 15.738895] platform 381f0040.usb-phy: deferred probe pending [ 15.744668] platform 382f0040.usb-phy: deferred probe pending [ 15.750437] platform 33800000.pcie: deferred probe pending [ 15.755944] platform 32ec0000.blk-ctrl: deferred probe pending [ 15.761807] platform 38330000.blk-ctrl: deferred probe pending [ 15.767673] platform 32f10000.blk-ctrl: deferred probe pending And things like PCIe and/or USB stop working. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit cc9c607c192d893385aca43b8d955acca99f4c8f Author: Marcel Ziswiler Date: Thu Sep 22 18:29:24 2022 +0200 arm64: defconfig: enable snvs lpgpr support Enable SNVS LPGPR support. This may e.g. be used on the i.MX 8M Mini and Plus to store a form of boot counter. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 8fb7256af86fcdebcefcff39b3043aa1619229a7 Author: Marcel Ziswiler Date: Thu Sep 22 18:29:22 2022 +0200 arm64: dts: verdin-imx8mm: improve pcie node Slight improvement of pcie node to be more in-line with what we add on the Verdin iMX8M Plus. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 909c3951afa69f4b820ad0b7f975900f8c3d6122 Author: Marcel Ziswiler Date: Thu Sep 22 18:29:21 2022 +0200 arm64: dts: verdin-imx8mm: verdin-imx8mp: rename sn65dsi83 to sn65dsi84 Rename sn65dsi83 to sn65dsi84 as that is the exact chip used on the Verdin DSI to LVDS Adapter. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit c579c24d4a14dd600146010347e4ba62d80a6667 Author: Marcel Ziswiler Date: Thu Sep 22 18:29:20 2022 +0200 arm64: dts: colibri-imx8x: improve include notation Improve include notation. Usually only dtsi files from the same location are included with an absolute path in quotes. Others should use a relative path enclosed in angle brackets. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94bbd9d3f52a3c79e41a75f2f7706034c95b5ae8 Author: Marcel Ziswiler Date: Thu Sep 22 18:29:19 2022 +0200 arm64: dts: verdin-imx8mm: verdin-imx8mp: improve include notation Improve include notation. Usually only dtsi files from the same location are included with an absolute path in quotes. Others should use a relative path enclosed in angle brackets. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 4 ++-- arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit c47d7b73c75a181cbfd4d680ea49bebbcde6507a Author: Sascha Hauer Date: Thu Sep 22 10:13:47 2022 +0200 arm64: dts: freescale: Add InnoComm i.MX8MM based WB15 SoM and EVK Add the InnoComm i.MX8MM based WB15 SoM and its EVK. The WB15 is a half credit card sized board featuring: - i.MX8MM CPU - LPDDR4, 1GiB - eMMC, 8GiB - 1Gb Ethernet RGMII interface - WiFi 802.11 a/b/g/n/ac, Bluetooth 4.2 Signed-off-by: Sascha Hauer Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/Makefile | 1 + .../dts/freescale/imx8mm-innocomm-wb15-evk.dts | 146 +++++++ .../boot/dts/freescale/imx8mm-innocomm-wb15.dtsi | 480 +++++++++++++++++++++ 3 files changed, 627 insertions(+) commit 248a180c371a732e66dcb0b6e8c08bbd81e32c50 Author: Sascha Hauer Date: Thu Sep 22 10:13:46 2022 +0200 dt-bindings: arm: fsl: Add InnoComm WB15 EVK Add board compatibles for the InnoComm WB15 EVK board. Signed-off-by: Sascha Hauer Reviewed-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 1 + 1 file changed, 1 insertion(+) commit 95b9fc4031f37bb7424ed254b7b9cb3ddde9f027 Author: Sascha Hauer Date: Thu Sep 22 10:13:45 2022 +0200 dt-bindings: vendor-prefixes: Add prefix for InnoComm This adds a vendor prefix for InnoComm Mobile Technology Corp., see https://www.innocomm.com/. Signed-off-by: Sascha Hauer Reviewed-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 19d0fc9e973406b32573ff683eda1b70b6d72c26 Author: Tim Harvey Date: Wed Sep 21 09:46:20 2022 -0700 arm64: dts: imx8m*-venice: add I2C GPIO bus recovery support Add I2C GPIO bus recovery support by adding scl-gpios and sda-gpios for the various I2C busses on Gateworks Venice boards. Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo .../boot/dts/freescale/imx8mm-venice-gw700x.dtsi | 24 ++++++++++- .../boot/dts/freescale/imx8mm-venice-gw7901.dts | 48 ++++++++++++++++++++-- .../boot/dts/freescale/imx8mm-venice-gw7902.dts | 48 ++++++++++++++++++++-- .../boot/dts/freescale/imx8mm-venice-gw7903.dts | 36 ++++++++++++++-- .../boot/dts/freescale/imx8mm-venice-gw7904.dts | 48 ++++++++++++++++++++-- .../boot/dts/freescale/imx8mn-venice-gw7902.dts | 48 ++++++++++++++++++++-- .../boot/dts/freescale/imx8mp-venice-gw74xx.dts | 48 ++++++++++++++++++++-- 7 files changed, 275 insertions(+), 25 deletions(-) commit 8127cac0f393abaddf5747bcc7e7ccf6668117fe Author: Li Jun Date: Thu Oct 13 23:14:42 2022 +0800 usb: chipidea: usbmisc: add power lost check for imx7ulp imx7ulp can shutdown domain power supply if none of peripheral in this domain is registered as wakeup source, this patch add related power lost check API. Signed-off-by: Li Jun Link: https://lore.kernel.org/r/20221013151442.3262951-9-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/usbmisc_imx.c | 1 + 1 file changed, 1 insertion(+) commit 604ceaa9e9fc223c2cc8d6cf0fc02022a3d14a68 Author: Li Jun Date: Thu Oct 13 23:14:41 2022 +0800 usb: chipidea: usbmisc: add power lost check for imx7d imx7d can shutdown domain power supply if none of peripheral in this domain is registered as wakeup source, this patch add related codes to check if power is lost. Signed-off-by: Li Jun Link: https://lore.kernel.org/r/20221013151442.3262951-8-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/usbmisc_imx.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 04ff4d31af40e268c6cde78814be465a6412212d Author: Li Jun Date: Thu Oct 13 23:14:40 2022 +0800 usb: chipidea: usbmisc: add power lost check for imx6sx imx6sx mega off can shutdown domain power supply if none of peripheral in this domain is registered as wakeup source, this patch add related codes to check if power is lost. Signed-off-by: Li Jun Link: https://lore.kernel.org/r/20221013151442.3262951-7-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/usbmisc_imx.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit b332d6d5c804085ac26d2e7e1a953b59b49644f3 Author: Li Jun Date: Thu Oct 13 23:14:39 2022 +0800 usb: chipidea: usbmisc: group usbmisc operations for PM As there maybe more APIs of usbmisc for suspend and resume, group them into imx_usbmisc_suspend/resume. Besides, introduced .power_lost_check API, so that proper resume operations can be performed in power lost case. Signed-off-by: Li Jun Link: https://lore.kernel.org/r/20221013151442.3262951-6-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/ci_hdrc_imx.c | 49 +++++---------- drivers/usb/chipidea/ci_hdrc_imx.h | 4 +- drivers/usb/chipidea/usbmisc_imx.c | 119 +++++++++++++++++++++++++++---------- 3 files changed, 106 insertions(+), 66 deletions(-) commit 235ffc17d0146d806f6ad8c094c24ff4878f2edb Author: Xu Yang Date: Thu Oct 13 23:14:38 2022 +0800 usb: chipidea: udc: add suspend/resume support for device controller The controller's power may be powered off during system suspend. This will add suspend/resume support when the controller suffers power lost. Signed-off-by: Xu Yang Acked-by: Peter Chen Link: https://lore.kernel.org/r/20221013151442.3262951-5-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/udc.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 2f64d6a6cdfbd992e8a8c481ebf79bfa9a71325b Author: Xu Yang Date: Thu Oct 13 23:14:37 2022 +0800 usb: chipidea: host: add suspend/resume support for host controller The controller's power may be powered off during system suspend. This will add suspend/resume support when the controller suffers power lost. Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20221013151442.3262951-4-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/host.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 450857c6058f092167f17bad97a2cc9c2a39b9a0 Author: Xu Yang Date: Thu Oct 13 23:14:36 2022 +0800 usb: chipidea: core: handle suspend/resume for each role There may be a need to handle suspend/resume per role. This patch will add this support. Signed-off-by: Xu Yang Acked-by: Peter Chen Link: https://lore.kernel.org/r/20221013151442.3262951-3-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/ci.h | 4 ++++ drivers/usb/chipidea/core.c | 8 ++++++++ 2 files changed, 12 insertions(+) commit 74494b33211d067427db25824cd8b53fa0eab1ef Author: Xu Yang Date: Thu Oct 13 23:14:35 2022 +0800 usb: chipidea: core: add controller resume support when controller is powered off For some SoCs, the controler's power will be off during the system suspend, and it needs some recovery operation to let the system back to workable. We add this support in this patch. Signed-off-by: Xu Yang Acked-by: Peter Chen Link: https://lore.kernel.org/r/20221013151442.3262951-2-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/core.c | 80 ++++++++++++++++++++++++++++++++++----------- drivers/usb/chipidea/otg.c | 2 +- drivers/usb/chipidea/otg.h | 1 + 3 files changed, 63 insertions(+), 20 deletions(-) commit caa7b74493f9c903fb6cd4bdec295bcae0507cc6 Author: Peng Fan Date: Fri Oct 14 17:55:50 2022 +0800 dt-bindings: phy: imx8mq-usb: add power-domains property Add optional power-domains property for usb phy. Signed-off-by: Peng Fan Acked-by: Alexander Stein Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221014095550.2125018-1-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml | 3 +++ 1 file changed, 3 insertions(+) commit e1b5d2bed67c60c30d01a89df32152d74cfc8e63 Author: Xu Yang Date: Sun Oct 9 23:53:36 2022 +0800 usb: chipidea: core: handle usb role switch in a common way Currently, ci_usb_role_switch_set() may be called before system resume stage when suspended. Worse yet, ci_hdrc device may stay at RPM_ACTIVE state which will cause pm_runtime_get_sync() fail to resume the device. In this case, role-switch may unable to complete transition process due to not exit from lpm state or due to lack some means after system resume. Same as ci_cable_notifier(), usb_role_switch could handle its events based on ci_hdrc_cable mechanism. Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20221009155336.766960-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/core.c | 55 +++++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 35 deletions(-) commit 32c6fefb291bf84c5a4dbc7d52b56a1605ed9aae Author: Sascha Hauer Date: Wed Oct 12 15:27:54 2022 +0200 usb: phy: generic: make vcc regulator optional phy-generic uses the existance of the property "vcc-supply" to see if a regulator is optional or not. Use devm_regulator_get_optional() instead which exists for this purpose. Using devm_regulator_get_optional() avoids "supply vcc not found, using dummy regulator" messages. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20221012132754.292151-1-s.hauer@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-generic.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit f5798ced419627ee53f4019e4a9a652bc73cafc4 Author: Viorel Suman Date: Wed Sep 21 17:36:03 2022 +0300 dt-bindings: firmware: imx: sync with SCFW kit v1.13.0 Sync defines with the latest available SCFW kit version 1.13.0, may be found at the address below: https://www.nxp.com/webapp/Download?colCode=L5.15.32_2.0.0_SCFWKIT-1.13.0&appType=license Signed-off-by: Viorel Suman Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo include/dt-bindings/firmware/imx/rsrc.h | 302 ++++++++++++++++++++++---------- 1 file changed, 206 insertions(+), 96 deletions(-) commit 3fff54653ac2d6fd11fcbb3a303abb2e050c799b Author: Alexander Stein Date: Wed Sep 21 09:08:33 2022 +0200 arm64: dts: tqma8mq-mba8mx: Add vcc supply to i2c eeproms Fixes the warnings: at24 0-0053: supply vcc not found, using dummy regulator at24 0-0057: supply vcc not found, using dummy regulator at24 1-0057: supply vcc not found, using dummy regulator Signed-off-by: Alexander Stein Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq-tqma8mq.dtsi | 2 ++ arch/arm64/boot/dts/freescale/mba8mx.dtsi | 1 + 2 files changed, 3 insertions(+) commit 1a1da28544fd869824d2ffe1b7b2b03689d69dc1 Author: Benjamin Gaignard Date: Mon Sep 19 14:13:02 2022 +0200 soc: imx: imx8m-blk-ctrl: Defer probe if 'bus' genpd is not yet ready Depending of the boot sequence 'bus' genpd could be probed after imx8m-blk-ctrl which led driver probe to fail. Change the returned error to allow to defer the probe in this case. Signed-off-by: Benjamin Gaignard Reviewed-by: Peng Fan Signed-off-by: Shawn Guo drivers/soc/imx/imx8m-blk-ctrl.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit ca69b6c78d5d6cd9a4417d279eda1d2cd2fb3829 Author: Alexander Stein Date: Thu Sep 15 08:28:55 2022 +0200 arm64: dts: tqma8mpql: add support for 2nd USB (host) interface The on-board USB hub has a single reset line which needs to be enabled. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo .../dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit b9589c417fedab6b963cf084ef305665166f5326 Author: Colin Ian King Date: Wed Oct 19 23:57:09 2022 +0100 thunderbolt: Remove redundant assignment to variable len The variable len is assigned a value that is never read. It is re-assigned a new value in the following do-while loop and never referenced after the loop. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/thunderbolt/xdomain.c:344:2: warning: Value stored to 'len' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Signed-off-by: Mika Westerberg drivers/thunderbolt/xdomain.c | 1 - 1 file changed, 1 deletion(-) commit 87fa05b6db47403fa4fbe3a8ce8fa619f7c8667e Author: Andy Shevchenko Date: Sat Oct 8 22:45:01 2022 +0300 thunderbolt: Use str_enabled_disabled() helper Use str_enabled_disabled() helper instead of open coding the same. Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg drivers/thunderbolt/switch.c | 5 +++-- drivers/thunderbolt/xdomain.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) commit 0d814000ad3589bf4f69c9cb25a3b77bbd55ffec Author: Emil Renner Berthing Date: Thu Oct 20 10:38:54 2022 +0200 riscv: dts: microchip: icicle: Add GPIO controlled LEDs Add the 4 GPIO controlled LEDs to the Microchip PolarFire-SoC Icicle Kit device tree. The schematic doesn't specify any special function for the LEDs, so they're added here without any default triggers and named led1, led2, led3 and led4 just like in the schematic. Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 59789f3418dd3c0a187490d49e900a59a5c8d732 Author: Andy Shevchenko Date: Tue Oct 4 12:21:29 2022 +0300 device property: Constify parameter in device_dma_supported() and device_get_dma_attr() Constify parameter in device_dma_supported() and device_get_dma_attr() since they don't alter anything related to it. Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20221004092129.19412-6-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/base/property.c | 4 ++-- include/linux/property.h | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) commit 7952cd2b8213f20a1752634c25dfd215da537722 Author: Andy Shevchenko Date: Tue Oct 4 12:21:28 2022 +0300 device property: Constify device child node APIs The device parameter is not altered in the device child node APIs, constify them. Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20221004092129.19412-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/base/property.c | 6 +++--- include/linux/property.h | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) commit a1bfed6094ac6868c43aaa43d021bf562cd93d07 Author: Andy Shevchenko Date: Tue Oct 4 12:21:27 2022 +0300 device property: Constify parameter in fwnode_graph_is_endpoint() Constify parameter in fwnode_graph_is_endpoint() since it doesn't alter anything related to it. Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20221004092129.19412-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman include/linux/property.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23ead33bc6ed62abc9adc5fe27b9911e2ef5d209 Author: Andy Shevchenko Date: Tue Oct 4 12:21:26 2022 +0300 device property: Constify fwnode connection match APIs The fwnode and device parameters are not altered in the fwnode connection match APIs, constify them. Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20221004092129.19412-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/base/property.c | 8 ++++---- drivers/usb/roles/class.c | 2 +- drivers/usb/typec/mux.c | 8 ++++---- drivers/usb/typec/retimer.c | 2 +- include/linux/property.h | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) commit b295d484b97081feba72b071ffcb72fb4638ccfd Author: Andy Shevchenko Date: Tue Oct 4 12:21:25 2022 +0300 device property: Allow const parameter to dev_fwnode() It's not fully correct to take a const parameter pointer to a struct and return a non-const pointer to a member of that struct. Instead, introduce a const version of the dev_fwnode() API which takes and returns const pointers and use it where it's applicable. With this, convert dev_fwnode() to be a macro wrapper on top of const and non-const APIs that chooses one based on the type. Suggested-by: Sakari Ailus Fixes: aade55c86033 ("device property: Add const qualifier to device_get_match_data() parameter") Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20221004092129.19412-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/base/property.c | 11 +++++++++-- include/linux/property.h | 7 ++++++- 2 files changed, 15 insertions(+), 3 deletions(-) commit 55f223b8b408cbfd85fb1c5b74ab85ccab319a69 Author: Uwe Kleine-König Date: Mon Oct 17 21:59:14 2022 +0200 usb: dwc2: platform: Improve error reporting for problems during .remove() Returning an error value in a platform driver's remove callback results in a generic error message being emitted by the driver core, but otherwise it doesn't make a difference. The device goes away anyhow. For each case where ret is non-zero the driver already emits an error message, so suppress the generic error message by returning zero unconditionally. (Side note: The return value handling was unreliable anyhow as the value returned by dwc2_exit_hibernation() was overwritten anyhow if hsotg->in_ppd was non-zero.) Signed-off-by: Uwe Kleine-König Acked-by: Minas Harutyunyan Link: https://lore.kernel.org/r/20221017195914.1426297-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32fee1df51109a117eb5063e950c372278688098 Author: Arnd Bergmann Date: Wed Oct 19 17:29:31 2022 +0200 usb: musb: remove unused davinci support The musb-davinci driver was only used on dm644x, which got removed in linux-6.0. The only remaining davinci machines are da8xx devicetree based and do not use this hardware. Signed-off-by: Arnd Bergmann Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20221019152947.3857217-6-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/Kconfig | 12 - drivers/usb/musb/Makefile | 2 - drivers/usb/musb/cppi_dma.c | 1547 ------------------------------------------- drivers/usb/musb/davinci.c | 606 ----------------- drivers/usb/musb/davinci.h | 103 --- 5 files changed, 2270 deletions(-) commit a84436a987e7f4ee8eeb62a8a5abcfc60b356d16 Author: Heikki Krogerus Date: Wed Oct 19 17:55:52 2022 +0300 usb: typec: retimer: Use device type for matching Device name is not reliable so using the type instead in retimer_fwnode_match(). This will also introduce is_typec_retimer() helper, and remove the static keyword from the retimer device type. That will make it accessible also in the main typec class. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221019145552.32493-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/retimer.c | 16 ++-------------- drivers/usb/typec/retimer.h | 4 ++++ 2 files changed, 6 insertions(+), 14 deletions(-) commit d182bf156c4cb8b08ce4a75e82b3357b14a4382d Author: Michael Grzeschik Date: Tue Oct 11 09:53:48 2022 +0200 usb: gadget: uvc: default the ctrl request interface offsets For the userspace it is needed to distinguish between requests for the control or streaming interface. The userspace would have to parse the configfs to know which interface index it has to compare the ctrl requests against. Since the interface numbers are not fixed, e.g. for composite gadgets, the interface offset depends on the setup. The kernel has this information when handing over the ctrl request to the userspace. This patch removes the offset from the interface numbers and expose the default interface defines in the uapi g_uvc.h. Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20221011075348.1786897-1-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_uvc.c | 15 ++++++++++++--- include/uapi/linux/usb/g_uvc.h | 3 +++ 2 files changed, 15 insertions(+), 3 deletions(-) commit 9b6447e04bc2a4d06f2ef74a583848c573a25dbc Author: Jose Ignacio Tornos Martinez Date: Mon Oct 3 11:10:16 2022 +0200 USB: usbip: missing lock in stub down Missing lock in sysfs operation when we want to close the connection in order to check the status and send the down event in a safe way. Signed-off-by: Jose Ignacio Tornos Martinez Reviewed-by: Shuah Khan Link: https://lore.kernel.org/r/20221003091016.641900-1-jtornosm@redhat.com Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_dev.c | 2 ++ 1 file changed, 2 insertions(+) commit 61dd457c0188c0deef68c2b919c0a2defe5db388 Author: Linus Walleij Date: Wed Oct 5 12:55:55 2022 +0200 dt-bindings: usb: dwc2: Add some missing Lantiq variants These IP block variants appear in various vendor trees and are distinct variants which needs to be handled. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221005105555.2665485-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/dwc2.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 4e74b483a3ce87e173634ba238a84b7fe404061b Author: Colin Ian King Date: Fri Oct 7 21:32:10 2022 +0100 USB: host: Kconfig: Fix spelling mistake "firwmare" -> "firmware" There is a spelling mistake in a Kconfig description. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221007203210.2756505-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90732f1769165dcf0778d723ad188f6441a930f5 Author: Dongliang Mu Date: Sun Oct 9 15:23:05 2022 +0800 usb: cdns3: adjust the partial logic of cdnsp_pci_remove In cdnsp_pci_remove, if pci_is_enabled returns true, it will call cdns_remove; else it will call kfree. Then both control flow goes to pci_dev_put. Adjust this logic by modifying it to an if else. Signed-off-by: Dongliang Mu Acked-by: Pawel Laszczak Link: https://lore.kernel.org/r/20221009072305.1593707-1-dzm91@hust.edu.cn Signed-off-by: Greg Kroah-Hartman drivers/usb/cdns3/cdnsp-pci.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 27ef01e381c777521084724248c5736cd1cdda63 Author: Xuezhi Zhang Date: Fri Oct 14 19:06:06 2022 +0800 usbip: convert sysfs snprintf 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: Xuezhi Zhang Reviewed-by: Shuah Khan Link: https://lore.kernel.org/r/20221014110606.599352-1-zhangxuezhi3@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13cc02f115d010d078851fac7f347890e62c097d Author: Jules Irenge Date: Sat Oct 1 15:56:33 2022 +0100 usbip: vudc: Convert snprintf() to sysfs_emit() Coccinnelle reports a warning Warning: Use scnprintf or sprintf Following the advice on kernel documentation https://www.kernel.org/doc/html/latest/filesystems/sysfs.html For show(device *...) functions we should only use sysfs_emit() or sysfs_emit_at() especially when formatting the value to be returned to user space. Convert snprintf() to sysfs_emit() Signed-off-by: Jules Irenge Reviewed-by: Shuah Khan Link: https://lore.kernel.org/r/YzhVIaNGdM33pcts@octinomon Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vudc_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 375ac0b2c1f11d8274999e91546d69e3140c6c6a Author: Colin Ian King Date: Thu Oct 20 14:06:49 2022 +0100 usb: ftdi-elan: remove variable err_count Variable err_count is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221020130649.1546112-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ftdi-elan.c | 2 -- 1 file changed, 2 deletions(-) commit 5f52a8ba7e91215c3d046d298fb328d1b9f7897d Author: Rob Herring Date: Fri Oct 21 15:54:28 2022 -0500 dt-bindings: leds: Add 'cpuX' to 'linux,default-trigger' Add 'cpu' and 'cpuN' to possible values for 'linux,default-trigger'. There's 45 cases of them in upstream dts files. Signed-off-by: Rob Herring Signed-off-by: Pavel Machek Documentation/devicetree/bindings/leds/common.yaml | 1 + 1 file changed, 1 insertion(+) commit 3031993b3474794ecb71b6f969a3e60e4bda9d8a Author: Dmitry Baryshkov Date: Fri Oct 21 22:19:40 2022 +0300 led: qcom-lpg: Fix sleeping in atomic lpg_brighness_set() function can sleep, while led's brightness_set() callback must be non-blocking. Change LPG driver to use brightness_set_blocking() instead. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/0 preempt_count: 101, expected: 0 INFO: lockdep is turned off. CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.1.0-rc1-00014-gbe99b089c6fc-dirty #85 Hardware name: Qualcomm Technologies, Inc. DB820c (DT) Call trace: dump_backtrace.part.0+0xe4/0xf0 show_stack+0x18/0x40 dump_stack_lvl+0x88/0xb4 dump_stack+0x18/0x34 __might_resched+0x170/0x254 __might_sleep+0x48/0x9c __mutex_lock+0x4c/0x400 mutex_lock_nested+0x2c/0x40 lpg_brightness_single_set+0x40/0x90 led_set_brightness_nosleep+0x34/0x60 led_heartbeat_function+0x80/0x170 call_timer_fn+0xb8/0x340 __run_timers.part.0+0x20c/0x254 run_timer_softirq+0x3c/0x7c _stext+0x14c/0x578 ____do_softirq+0x10/0x20 call_on_irq_stack+0x2c/0x5c do_softirq_own_stack+0x1c/0x30 __irq_exit_rcu+0x164/0x170 irq_exit_rcu+0x10/0x40 el1_interrupt+0x38/0x50 el1h_64_irq_handler+0x18/0x2c el1h_64_irq+0x64/0x68 cpuidle_enter_state+0xc8/0x380 cpuidle_enter+0x38/0x50 do_idle+0x244/0x2d0 cpu_startup_entry+0x24/0x30 rest_init+0x128/0x1a0 arch_post_acpi_subsys_init+0x0/0x18 start_kernel+0x6f4/0x734 __primary_switched+0xbc/0xc4 Fixes: 24e2d05d1b68 ("leds: Add driver for Qualcomm LPG") Signed-off-by: Dmitry Baryshkov Signed-off-by: Pavel Machek drivers/leds/rgb/leds-qcom-lpg.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 57d91e039070faa938622d28093ba1d031e29b3b Author: Paul Cercueil Date: Thu Oct 20 12:44:42 2022 +0100 leds: max8997: Don't error if there is no pdata The driver works just fine if no platform data is supplied. Signed-off-by: Paul Cercueil Reviewed-by: Andy Shevchenko Signed-off-by: Pavel Machek drivers/leds/leds-max8997.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit f5e674e92e9526430e01ef996bef5b50723f59bc Author: Ville Syrjälä Date: Fri Oct 21 19:24:42 2022 +0300 drm/i915: Introduce intel_crtc_needs_color_update() Add a common helper to answer the question "do we need to update color management stuff?". Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221021162442.27283-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/hsw_ips.c | 6 ++---- drivers/gpu/drm/i915/display/intel_crtc.c | 3 +-- drivers/gpu/drm/i915/display/intel_display.c | 18 +++++------------- drivers/gpu/drm/i915/display/intel_display_types.h | 8 ++++++++ 4 files changed, 16 insertions(+), 19 deletions(-) commit 7de5b6b54630c670af6822bebe70ff7b4281dc23 Author: Ville Syrjälä Date: Fri Oct 21 19:24:41 2022 +0300 drm/i915: Don't flag both full modeset and fastset at the same time Be consistent in whether we flag a full modeset or a fastset for the pipe. intel_modeset_all_pipes() would seem to be the only codepath not getting this right. The other case is when we flag the fastset initially, currently we just clear the mode_changed flag and set the update_pipe flag. But we could still have connectors_changed==true or active_changed==true forcing a full modeset anyway. So check for that after clearing the mode_changed flag. And let's add a WARN to make sure we did get it right. v2: Deal with {connectors,active}_changed Reviewed-by: Jani Nikula #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221021162442.27283-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_display.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 925ac8bc33bfe05e0bf3df3a0ff5183b00654aa0 Author: Ville Syrjälä Date: Fri Oct 21 19:24:40 2022 +0300 drm/i915: Remove some local 'mode_changed' bools These 'mode_changed' booleans aren't very helpful. Just replace them with direct intel_crtc_needs_modeset() calls which is more descriptive. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221021162442.27283-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_display.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 52a90349f2edb6bd7e56462a8c3416e15b8ded60 Author: Ville Syrjälä Date: Fri Oct 21 19:24:39 2022 +0300 drm/i915: Introduce intel_crtc_needs_fastset() Replace the somewhat obscure crtc_state.update_pipe checks with a more descriptive thing. Also nicely matches the intel_crtc_needs_modeset() counterpart for full modesets. v2: Handle one more case in the fbc code Reviewed-by: Jani Nikula #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221021162442.27283-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/hsw_ips.c | 6 ++--- drivers/gpu/drm/i915/display/intel_crtc.c | 2 +- drivers/gpu/drm/i915/display/intel_cursor.c | 6 +++-- drivers/gpu/drm/i915/display/intel_display.c | 28 ++++++++++++---------- drivers/gpu/drm/i915/display/intel_display_types.h | 6 +++++ drivers/gpu/drm/i915/display/intel_fbc.c | 3 ++- .../gpu/drm/i915/display/intel_modeset_verify.c | 3 ++- 7 files changed, 33 insertions(+), 21 deletions(-) commit 4c35e5d1190058be31236876ae1f12681ddba137 Author: Ville Syrjälä Date: Thu Oct 20 15:07:06 2022 +0300 drm/i915: Activate DRRS after state readout On BDW+ we have just the one set of DP M/N registers. The values we write into said registers depends on whether we want DRRS to be in high or low gear. This causes issues for the state checker which currently has to assume either set of M/N (high or low refresh rate) values may appear there. That sort of works for M/N itself, but all other values derived from the M/N (dotclock, pixel rate) are not handled correctly, leading to potential for state checker mismatches. Let's avoid all those problems by simply keeping DRRS in high gear until the state checker has done its hardware state readout. Note that hitting this issue presumable became very hard after commit 1b333c679a0f ("drm/i915: Do DRRS disable/enable during pre/post_plane_update()") since the state check would have to laze about for one full second (delay used by intel_drrs_schedule_work()) to see the low refresh rate. But it is still theoretically possible. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221020120706.25728-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 43 +++++----------------------- 1 file changed, 7 insertions(+), 36 deletions(-) commit 19cbe487f55fd04bc0b83bc34b6175f9dc6ab4e4 Author: Emily Peri Date: Fri Oct 21 12:54:57 2022 -0700 staging: rtl8723bs: use tab instead of spaces for indent Replace spaces with tab for indent and correct alignment for closing brace in rtw_ioctl_set. Issue found by checkpatch. Signed-off-by: Emily Peri Link: https://lore.kernel.org/r/0516cac046c617b55718fddb2aac3a50d543d84c.1666380274.git.eperi1024@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83df6f3f2690533bf094c18bef39a016311b7a46 Author: Emily Peri Date: Fri Oct 21 12:54:56 2022 -0700 staging: rtl8723bs: add newline after variable declaration Fix checkpatch style warning by adding newline after variable declaration in rtw_ioctl_set Signed-off-by: Emily Peri Link: https://lore.kernel.org/r/76e1bfd210d79e6d3f7cc09233621c8b741b2370.1666380274.git.eperi1024@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 1 + 1 file changed, 1 insertion(+) commit 302baa63e7553e7bf57df2f98d82855461d81bbe Author: Emily Peri Date: Fri Oct 21 12:54:55 2022 -0700 staging: rtl8723bs: remove tab in variable definition Remove unnecessary tab in variable definition in rtw_ioctl_set. Issue found by checkpatch. Signed-off-by: Emily Peri Link: https://lore.kernel.org/r/ee1bcccb23b3d24eb87d0b08bfa817b4af692dc5.1666380274.git.eperi1024@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd194611444caf7f30e9198b7e2b89522b257462 Merge: dbf53a29b28b 471f0aa7fa64 Author: Ingo Molnar Date: Sat Oct 22 09:55:06 2022 +0200 Merge branch 'x86/urgent' into x86/core, to resolve conflict There's a conflict between the call-depth tracking commits in x86/core: ee3e2469b346 ("x86/ftrace: Make it call depth tracking aware") 36b64f101219 ("x86/ftrace: Rebalance RSB") eac828eaef29 ("x86/ftrace: Remove ftrace_epilogue()") And these fixes in x86/urgent: 883bbbffa5a4 ("ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph()") b5f1fc318440 ("x86/ftrace: Remove ftrace_epilogue()") It's non-trivial overlapping modifications - resolve them. Conflicts: arch/x86/kernel/ftrace_64.S Signed-off-by: Ingo Molnar commit 325d0d2c9d1187143eb0a3d5a6f16308a986bdb4 Author: Deepak R Varma Date: Fri Oct 21 03:02:35 2022 +0530 staging: r8188eu: Remove unused macros Simple variants of macros PlatformEFIOWrite and PlatformEFIORead are defined but never used. As they do not appear to be designed for anything significant, we can remove them to avoid unexpected usage. Suggested-by: Julia Lawall Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/efaf637a14b6f7fdd0178e2aecf8abf17e6922f6.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtw_io.h | 14 -------------- 1 file changed, 14 deletions(-) commit c61c8480e3a59d469d4ff7d6ed9c88d43ba1722e Author: Deepak R Varma Date: Fri Oct 21 03:02:12 2022 +0530 staging: r8188eu: Correct missing or extra space in the statements Properly spacing out code statements/instructions improves code readability. Add missing or remove extra space as necessary according to the Linux Kernel coding-style guidelines. Following errors reported by checkpatch script for inconsistent code spacing: ERROR: space prohibited before that close parenthesis ')' ERROR: space prohibited before that ',' (ctx:WxW) CHECK: spaces preferred around that '&' (ctx:VxV) Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/4559d1a406b9f32379ec01cfadacea13a11803ac.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtl8188e_spec.h | 12 ++++++------ drivers/staging/r8188eu/include/rtw_mlme.h | 18 +++++++++--------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) commit d119c18fa41dd455c6237e0b3dbb266de6a3c065 Author: Deepak R Varma Date: Fri Oct 21 03:01:37 2022 +0530 staging: r8188eu: Put '{" on the symbol declaration line Open braces '{" should be placed on the line of symbol declaration as per the coding-style guidelines. Improves readability and matches with style used in rest of the code. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/375f742936493b562bd4dfba90eb75bd8ab84f8a.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtw_cmd.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 285e8d027ecccb4623331c62896d225371502262 Author: Deepak R Varma Date: Fri Oct 21 03:01:05 2022 +0530 staging: r8188eu: replace leading spaces by tabs Spaces are prohibited as per the Linux coding style guidelines. Replace those by tabs wherever possible to improve code alignment. Error reported by checkpatch script. Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/c32b702c61ea3367d60f0a4c2443093d6ce45a69.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtw_cmd.h | 10 +++++----- drivers/staging/r8188eu/include/rtw_mlme.h | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 2bf279885c596c7680426cacd0fe137db0e00a85 Author: Deepak R Varma Date: Fri Oct 21 03:00:35 2022 +0530 staging: r8188eu: Associate pointer symbol with parameter name The pointer symbol '*' should be associated with the function parameter name and not its type. This improves code readability and adheres to the coding-style guidelines. Address following checkpatch reported error: ERROR: "foo * bar" should be "foo *bar" While in there, update parameter name at one place to match other function declarations. Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/d946b69bfdfb44baae3a130e412ed2e217a710a7.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 +- drivers/staging/r8188eu/include/rtw_cmd.h | 16 ++++++++-------- drivers/staging/r8188eu/include/rtw_ioctl_set.h | 4 ++-- drivers/staging/r8188eu/include/rtw_mlme.h | 2 +- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) commit 4b66ec6961f170cf782fb66520c36f2e950c7601 Author: Deepak R Varma Date: Fri Oct 21 03:00:13 2022 +0530 staging: r8188eu: Add space between function & macro parameters Space required between function and macro parameters to improve code readability. This Linux kernel coding style guideline resolves following error reported by checkpatch script: ERROR: space required after that ',' (ctx:VxV) Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/ce200b3a986628f943dfb0c4e412276793e59bbc.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/osdep_service.h | 4 ++-- drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 +- drivers/staging/r8188eu/include/rtw_cmd.h | 18 ++++++++-------- drivers/staging/r8188eu/include/rtw_io.h | 28 ++++++++++++------------- 4 files changed, 26 insertions(+), 26 deletions(-) commit 0f2635b3ff1057d50bfe4a011c5706117e97e114 Author: Deepak R Varma Date: Fri Oct 21 02:59:37 2022 +0530 staging: r8188eu: correct misspelled words in comments Fix spelling mistakes in code comments across the driver. Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/00be5f2a97b0c899279bd8f9cd27634186b77b9d.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_ioctl_set.c | 2 +- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 36 ++++++++++++------------ drivers/staging/r8188eu/core/rtw_recv.c | 8 +++--- drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 2 +- drivers/staging/r8188eu/hal/odm_RTL8188E.c | 2 +- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 +- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 16 +++++------ drivers/staging/r8188eu/include/Hal8188EPhyReg.h | 4 +-- drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 +- drivers/staging/r8188eu/include/rtl8188e_spec.h | 6 ++-- drivers/staging/r8188eu/include/rtw_cmd.h | 4 +-- drivers/staging/r8188eu/include/rtw_recv.h | 4 +-- drivers/staging/r8188eu/include/rtw_xmit.h | 2 +- drivers/staging/r8188eu/include/wifi.h | 12 ++++---- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 6 ++-- 15 files changed, 54 insertions(+), 54 deletions(-) commit 227041c5d88aace2a1c95d6741438015ac1d9560 Author: Deepak R Varma Date: Fri Oct 21 02:58:39 2022 +0530 staging: r8188eu: use htons macro instead of __constant_htons Macro "htons" is more efficient and clearer. It should be used for constants instead of the __constant_htons macro. Resolves following checkpatch script complaint: WARNING: __constant_htons should be htons Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/b46adfbdce0362ed0dbe0fc957ef2f47a93c24bb.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_br_ext.c | 6 +++--- drivers/staging/r8188eu/core/rtw_xmit.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 3c480b32431272e0a4a78ee1f20bba96deaddd72 Author: Deepak R Varma Date: Fri Oct 21 02:57:47 2022 +0530 staging: r8188eu: remove {} for single statement blocks As per the Linux kernel coding-style guidelines, there is no need to use {} for single statement blocks. Issue flagged by checkpatch script. Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/a50460e1507621b29a7901cc4ff9501b172417db.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_br_ext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9d76dae6c86e7945b51054cd477c5b8f0bcb3a87 Author: Deepak R Varma Date: Fri Oct 21 02:57:16 2022 +0530 staging: r8188eu: reformat long computation lines Reformat long running computation instructions to improve code readability. Address checkpatch script complaints like: CHECK: line length of 171 exceeds 100 columns Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/e07506ef1dc4ac1d3f8b076a8182628bd0e5cec0.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_br_ext.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6cc7b783f8295677a19e88c12e47021c06c3b6ef Author: Deepak R Varma Date: Fri Oct 21 02:56:47 2022 +0530 staging: r8188eu: use Linux kernel variable naming convention Follow the Linux Kernel coding style variable naming convention instead of using camelCase style. Issue reported by checkpatch script for these variables: tagLen, tagType, networkAddr, ipAddr, macAddr Signed-off-by: Deepak R Varma Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/a107c527e9032c22a62e93ff12d5fae625e70212.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_br_ext.c | 112 +++++++++++++++--------------- 1 file changed, 56 insertions(+), 56 deletions(-) commit ea679d8e032b0affc65c9d56b7bad3ef144366e1 Author: Deepak R Varma Date: Thu Oct 20 22:50:00 2022 +0530 staging: most: dim2: correct misleading struct type name Correct the misleading struct type name dim_ch_state_t to dim_ch_state since this not a typedef but a normal structure declaration. Suggested-by: Julia Lawall Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y1GDQO+06fD24Pf/@debian-BULLSEYE-live-builder-AMD64 Signed-off-by: Greg Kroah-Hartman drivers/staging/most/dim2/dim2.c | 4 ++-- drivers/staging/most/dim2/hal.c | 4 ++-- drivers/staging/most/dim2/hal.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) commit 1f3e0b41919208be71f869a753609d6c11e12e85 Author: Peter Robinson Date: Sun Oct 16 12:07:43 2022 +0100 staging: wlan-ng: Provide a TODO file for this driver Provide a TODO file that lists the tasks that should be carried out in order to move this driver off drivers/staging. It's missing from original addition of this driver. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20221016110743.1448067-4-pbrobinson@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/TODO | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ce51c0c7fae3390f070e6b515e3a57f6bfdfd18e Author: Peter Robinson Date: Sun Oct 16 12:07:42 2022 +0100 staging: ks7010: Update the TODO file for this driver Add move to mac80211 from wext to the todo for this driver. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20221016110743.1448067-3-pbrobinson@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/TODO | 3 +++ 1 file changed, 3 insertions(+) commit f124c1751844c4592110a292403f342c50a89344 Author: Peter Robinson Date: Sun Oct 16 12:07:41 2022 +0100 staging: rtl8192e: Update the TODO file for this driver The driver directory where it was proposed to move to has changed, while add it add some more pieces this driver to update. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20221016110743.1448067-2-pbrobinson@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/TODO | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 02119c5d84e327483595687821f9c38c88d2d929 Author: Peter Robinson Date: Sun Oct 16 12:07:40 2022 +0100 staging: rtl8192u: Provide a TODO file for this driver Provide a TODO file that lists the tasks that should be carried out in order to move this driver off drivers/staging. It's missing from original addition of this driver. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20221016110743.1448067-1-pbrobinson@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/TODO | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit acd50e52a7f2e75b3109523d2f114fa46a4362c0 Author: Colin Ian King Date: Fri Oct 21 19:09:50 2022 +0100 staging: rtl8712: Remove variable xcnt The variable xcnt being incremented but it is never referenced, it is redundant and can be removed. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221021180950.29139-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_xmit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3d24903a6dd27ab817b4c6c24bee245ff06f7c8e Author: Greg Kroah-Hartman Date: Fri Oct 21 09:23:10 2022 +0200 kobject: make get_ktype() take a const pointer get_ktype() does not modify the structure passed to it, so mark the parameter as being const to allow other const structures to be passed to it in the future. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20221021072310.3931690-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman include/linux/kobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33a0a1e3b3d17445832177981dc7a1c6a5b009f8 Author: Greg Kroah-Hartman Date: Sat Oct 1 18:53:15 2022 +0200 kobject: modify kobject_get_path() to take a const * kobject_get_path() does not modify the kobject passed to it, so make the pointer constant. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20221001165315.2690141-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman include/linux/kobject.h | 2 +- lib/kobject.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit ce0ba954805e0783ceb7304d4fb357a02038e231 Author: Colin Ian King Date: Fri Oct 7 21:16:48 2022 +0100 csky: Kconfig: Fix spelling mistake "Meory" -> "Memory" There is a spelling mistake in a Kconfig option description. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Guo Ren arch/csky/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b203c67ebe752c8f2a2babf5e58d244c82680922 Author: Tong Tiangen Date: Sat Oct 22 01:43:40 2022 +0000 csky: add arch support current_stack_pointer To follow the existing per-arch conventions, using "current_stack_pointer" to set sp. This will let it be used in non-arch places(like HARDENED_USERCOPY). Refer to the implementation of riscv commit fdecfea09328 ("riscv: Rename "sp_in_global" to "current_stack_pointer""). Link: https://lore.kernel.org/lkml/20220224060411.1855683-1-keescook@chromium.org/ Signed-off-by: Tong Tiangen Signed-off-by: Guo Ren arch/csky/Kconfig | 1 + arch/csky/include/asm/processor.h | 2 ++ arch/csky/kernel/stacktrace.c | 6 ++---- 3 files changed, 5 insertions(+), 4 deletions(-) commit 7029e2151a7c6a5c60b35996d026528e7d51aae3 Author: Bart Van Assche Date: Tue Oct 18 13:29:58 2022 -0700 scsi: ufs: Fix a deadlock between PM and the SCSI error handler The following deadlock has been observed on multiple test setups: * ufshcd_wl_suspend() is waiting for blk_execute_rq(START STOP UNIT) to complete while ufshcd_wl_suspend() holds host_sem. * The SCSI error handler is activated, changes the host state to SHOST_RECOVERY, ufshcd_eh_host_reset_handler() and ufshcd_err_handler() are called and the latter function tries to obtain host_sem. This is a deadlock because blk_execute_rq() can't execute SCSI commands while the host is in the SHOST_RECOVERY state and because the error handler cannot make progress because host_sem is held by another thread. Fix this deadlock as follows: * Fail attempts to suspend the system while the SCSI error handler is in progress by setting the SCMD_FAIL_IF_RECOVERING flag for START STOP UNIT commands. * If the system is suspending and a START STOP UNIT command times out, handle the SCSI command timeout from inside the context of the SCSI timeout handler instead of activating the SCSI error handler. The runtime power management code is not affected by this deadlock since hba->host_sem is not touched by the runtime power management functions in the UFS driver. Reviewed-by: Adrian Hunter Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221018202958.1902564-11-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 6a354a7e740ee779d8595bb3c555d415433f2b19 Author: Bart Van Assche Date: Tue Oct 18 13:29:57 2022 -0700 scsi: ufs: Introduce the function ufshcd_execute_start_stop() Open-code scsi_execute() because a later patch will modify scmd->flags and because scsi_execute() does not support setting scmd->flags. No functionality is changed. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221018202958.1902564-10-bvanassche@acm.org Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) commit 1a547cbc6fdd07992f915a614a3f7ba3fccef8fb Author: Bart Van Assche Date: Tue Oct 18 13:29:56 2022 -0700 scsi: ufs: Track system suspend / resume activity Add a new boolean variable that tracks whether the system is suspending, suspended or resuming. This information will be used in a later commit to fix a deadlock between the SCSI error handler and the suspend code. Reviewed-by: Adrian Hunter Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221018202958.1902564-9-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 2 ++ include/ufs/ufshcd.h | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 579a4e9dbd53978cad8df88dc612837cdd210ce0 Author: Bart Van Assche Date: Tue Oct 18 13:29:55 2022 -0700 scsi: ufs: Try harder to change the power mode Instead of only retrying the START STOP UNIT command if a unit attention is reported, repeat it if any SCSI error is reported by the device or if the command timed out. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221018202958.1902564-8-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit dcd5b7637c6d442d957f73780a03047413ed3a10 Author: Bart Van Assche Date: Tue Oct 18 13:29:54 2022 -0700 scsi: ufs: Reduce the START STOP UNIT timeout Reduce the START STOP UNIT command timeout to one second since on Android devices a kernel panic is triggered if an attempt to suspend the system takes more than 20 seconds. One second should be enough for the START STOP UNIT command since this command completes in less than a millisecond for the UFS devices I have access to. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221018202958.1902564-7-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 836d322d73cb08486ecc50787695175a135e62ba Author: Bart Van Assche Date: Tue Oct 18 13:29:53 2022 -0700 scsi: ufs: Use 'else' in ufshcd_set_dev_pwr_mode() Convert if (ret) { ... } if (!ret) { ... } into if (ret) { ... } else { ... }. Reviewed-by: Bean Huo Reviewed-by: Adrian Hunter Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221018202958.1902564-6-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1626c7bba1c42499d6753bd919803158e5792f08 Author: Bart Van Assche Date: Tue Oct 18 13:29:52 2022 -0700 scsi: ufs: Remove an outdated comment Although the host lock had to be held by ufshcd_clk_scaling_start_busy() callers when that function was introduced, that is no longer the case today. Hence remove the comment that claims that callers of this function must hold the host lock. Reviewed-by: Bean Huo Reviewed-by: Adrian Hunter Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221018202958.1902564-5-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 1 - 1 file changed, 1 deletion(-) commit 310bcaef6d7ed1626bba95dd9b5c5acd189c0e35 Author: Bart Van Assche Date: Tue Oct 18 13:29:51 2022 -0700 scsi: core: Support failing requests while recovering The current behavior for SCSI commands submitted while error recovery is ongoing is to retry command submission after error recovery has finished. See also the scsi_host_in_recovery() check in scsi_host_queue_ready(). Add support for failing SCSI commands while host recovery is in progress. This functionality will be used to fix a deadlock in the UFS driver. Cc: Christoph Hellwig Cc: Ming Lei Cc: John Garry Cc: Mike Christie Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221018202958.1902564-4-bvanassche@acm.org Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 8 +++++--- include/scsi/scsi_cmnd.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) commit dee7121e8c0a3ce41af2b02d516f54eaec32abcd Author: Bart Van Assche Date: Tue Oct 18 13:29:50 2022 -0700 scsi: core: Change the return type of .eh_timed_out() Commit 6600593cbd93 ("block: rename BLK_EH_NOT_HANDLED to BLK_EH_DONE") made it impossible for .eh_timed_out() implementations to call scsi_done() without causing a crash. Restore support for SCSI timeout handlers to call scsi_done() as follows: * Change all .eh_timed_out() handlers as follows: - Change the return type into enum scsi_timeout_action. - Change BLK_EH_RESET_TIMER into SCSI_EH_RESET_TIMER. - Change BLK_EH_DONE into SCSI_EH_NOT_HANDLED. * In scsi_timeout(), convert the SCSI_EH_* values into BLK_EH_* values. Reviewed-by: Lee Duncan Cc: Christoph Hellwig Cc: Ming Lei Cc: John Garry Cc: Mike Christie Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221018202958.1902564-3-bvanassche@acm.org Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen Documentation/scsi/scsi_eh.rst | 7 +++++-- drivers/message/fusion/mptsas.c | 8 ++++---- drivers/scsi/libiscsi.c | 26 ++++++++++++------------ drivers/scsi/megaraid/megaraid_sas_base.c | 7 +++---- drivers/scsi/mvumi.c | 4 ++-- drivers/scsi/qla4xxx/ql4_os.c | 8 ++++---- drivers/scsi/scsi_error.c | 33 ++++++++++++++++++------------- drivers/scsi/scsi_transport_fc.c | 7 +++---- drivers/scsi/scsi_transport_srp.c | 8 ++++---- drivers/scsi/storvsc_drv.c | 4 ++-- drivers/scsi/virtio_scsi.c | 4 ++-- include/scsi/libiscsi.h | 2 +- include/scsi/scsi_host.h | 14 ++++++++++++- include/scsi/scsi_transport_fc.h | 2 +- include/scsi/scsi_transport_srp.h | 2 +- 15 files changed, 77 insertions(+), 59 deletions(-) commit 978b7922d3dca672b41bb4b8ce6c06ab77112741 Author: Bart Van Assche Date: Tue Oct 18 13:29:49 2022 -0700 scsi: core: Fix a race between scsi_done() and scsi_timeout() If there is a race between scsi_done() and scsi_timeout() and if scsi_timeout() loses the race, scsi_timeout() should not reset the request timer. Hence change the return value for this case from BLK_EH_RESET_TIMER into BLK_EH_DONE. Although the block layer holds a reference on a request (req->ref) while calling a timeout handler, restarting the timer (blk_add_timer()) while a request is being completed is racy. Reviewed-by: Mike Christie Cc: Keith Busch Cc: Christoph Hellwig Cc: Ming Lei Cc: John Garry Cc: Hannes Reinecke Reported-by: Adrian Hunter Fixes: 15f73f5b3e59 ("blk-mq: move failure injection out of blk_mq_complete_request") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221018202958.1902564-2-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 24b3e45ca9c53185baec34488efcb75bbe162f7a Author: Justin Tee Date: Mon Oct 17 09:43:23 2022 -0700 scsi: lpfc: Update lpfc version to 14.2.0.8 Update lpfc version to 14.2.0.8 Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20221017164323.14536-5-justintee8345@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 479b0917e4477f49df2e3be454aac3cfa5dec171 Author: Justin Tee Date: Mon Oct 17 09:43:22 2022 -0700 scsi: lpfc: Create a sysfs entry called lpfc_xcvr_data for transceiver info The DUMP_MEMORY mailbox command is implemented for page A0 and A2 to retrieve transceiver information from firmware. The mailbox command output is then formatted to print raw data values for userspace to parse via sysfs. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20221017164323.14536-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 118 ++++++++++++++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_crtn.h | 3 + drivers/scsi/lpfc/lpfc_els.c | 128 ++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_hw4.h | 5 +- 4 files changed, 252 insertions(+), 2 deletions(-) commit eaf660e4282ba11239704b2b89ae94feae2010e0 Author: Justin Tee Date: Mon Oct 17 09:43:21 2022 -0700 scsi: lpfc: Log when congestion management limits are in effect When bandwidth reduces from or recovers back to 100% due to congestion management, log the event. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20221017164323.14536-3-justintee8345@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c44e50f4a0ec00c2298f31f91bc2c3e9bbd81c7e Author: Justin Tee Date: Mon Oct 17 09:43:20 2022 -0700 scsi: lpfc: Fix hard lockup when reading the rx_monitor from debugfs During I/O and simultaneous cat of /sys/kernel/debug/lpfc/fnX/rx_monitor, a hard lockup similar to the call trace below may occur. The spin_lock_bh in lpfc_rx_monitor_report is not protecting from timer interrupts as expected, so change the strength of the spin lock to _irq. Kernel panic - not syncing: Hard LOCKUP CPU: 3 PID: 110402 Comm: cat Kdump: loaded exception RIP: native_queued_spin_lock_slowpath+91 [IRQ stack] native_queued_spin_lock_slowpath at ffffffffb814e30b _raw_spin_lock at ffffffffb89a667a lpfc_rx_monitor_record at ffffffffc0a73a36 [lpfc] lpfc_cmf_timer at ffffffffc0abbc67 [lpfc] __hrtimer_run_queues at ffffffffb8184250 hrtimer_interrupt at ffffffffb8184ab0 smp_apic_timer_interrupt at ffffffffb8a026ba apic_timer_interrupt at ffffffffb8a01c4f [End of IRQ stack] apic_timer_interrupt at ffffffffb8a01c4f lpfc_rx_monitor_report at ffffffffc0a73c80 [lpfc] lpfc_rx_monitor_read at ffffffffc0addde1 [lpfc] full_proxy_read at ffffffffb83e7fc3 vfs_read at ffffffffb833fe71 ksys_read at ffffffffb83402af do_syscall_64 at ffffffffb800430b entry_SYSCALL_64_after_hwframe at ffffffffb8a000ad Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20221017164323.14536-2-justintee8345@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4fc66e7b16adf054e8dc7a5cd189085b8f545091 Author: Justin Tee Date: Mon Oct 17 09:43:19 2022 -0700 scsi: lpfc: Set sli4_param's cmf option to zero when CMF is turned off Add missed clearing of phba->sli4_hba.pc_sli4_params.cmf when CMF is turned off. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20221017164323.14536-1-justintee8345@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 1 + 1 file changed, 1 insertion(+) commit e6f8a22ff4a14aeada44c8f78dfb7503f2ca318f Author: Jiapeng Chong Date: Sun Oct 9 14:02:49 2022 +0800 scsi: qedf: Remove set but unused variable 'page' The variable page is not used in the function, so delete it. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2348 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20221009060249.40178-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 3 --- 1 file changed, 3 deletions(-) commit 5f62639dc2b668d8fa3bd3d4a92cf6e51b7574c6 Author: Igor Pylypiv Date: Fri Oct 7 16:07:51 2022 -0700 scsi: pm80xx: Remove unused reset_in_progress flag logic The reset_in_progress flag was never set. Signed-off-by: Igor Pylypiv Link: https://lore.kernel.org/r/20221007230751.309363-1-ipylypiv@google.com Reviewed-by: Andrew Konecki Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_sas.h | 1 - drivers/scsi/pm8001/pm80xx_hwi.c | 4 ---- 2 files changed, 5 deletions(-) commit 2acf97f199f9eba8321390325519e9b6bff60108 Author: John Garry Date: Tue Oct 18 19:16:03 2022 +0800 scsi: mvsas: Use sas_task_find_rq() for tagging The request associated with a SCSI command coming from the block layer has a unique tag, so use that when possible for getting a slot. Unfortunately we don't support reserved commands in the SCSI midlayer yet. As such, SMP tasks - as an example - will not have a request associated, so in the interim continue to manage those tags for that type of sas_task internally. We reserve an arbitrary 4 tags for these internal tags. Indeed, we already decrement MVS_RSVD_SLOTS by 2 for the shost can_queue when flag MVF_FLAG_SOC is set. This change was made in commit 20b09c2992fe ("[SCSI] mvsas: add support for 94xx; layout change; bug fixes"), but what those 2 slots are used for is not obvious. Also make the tag management functions static, where possible. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1666091763-11023-8-git-send-email-john.garry@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/mvsas/mv_defs.h | 1 + drivers/scsi/mvsas/mv_init.c | 9 +++++---- drivers/scsi/mvsas/mv_sas.c | 35 ++++++++++++++++++++++------------- drivers/scsi/mvsas/mv_sas.h | 7 +------ 4 files changed, 29 insertions(+), 23 deletions(-) commit ffc9f9bf3f14876d019f67ef17d41138802529a8 Author: John Garry Date: Tue Oct 18 19:16:02 2022 +0800 scsi: mvsas: Delete mvs_tag_init() All mvs_tag_init() does is zero the tag bitmap, but this is already done with the kzalloc() call to alloc the tags, so delete this unneeded function. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1666091763-11023-7-git-send-email-john.garry@huawei.com Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/mvsas/mv_init.c | 2 -- drivers/scsi/mvsas/mv_sas.c | 7 ------- drivers/scsi/mvsas/mv_sas.h | 1 - 3 files changed, 10 deletions(-) commit 6472cfb418a0ba783a469deeb6586fb2f133c268 Author: John Garry Date: Tue Oct 18 19:16:01 2022 +0800 scsi: pm8001: Use sas_task_find_rq() for tagging The request associated with a SCSI command coming from the block layer has a unique tag, so use that when possible for getting a CCB. Unfortunately we don't support reserved commands in the SCSI midlayer yet, so in the interim continue to manage those tags internally (along with tags for private commands). Signed-off-by: John Garry Link: https://lore.kernel.org/r/1666091763-11023-6-git-send-email-john.garry@huawei.com Reviewed-by: Jack Wang Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_init.c | 12 ++++-------- drivers/scsi/pm8001/pm8001_sas.c | 13 +++++++++---- drivers/scsi/pm8001/pm8001_sas.h | 11 ++++++++--- drivers/scsi/pm8001/pm80xx_hwi.c | 19 +++---------------- 4 files changed, 24 insertions(+), 31 deletions(-) commit 1baa70d36403aa572453eee9fdd4f637455ecaaf Author: Igor Pylypiv Date: Tue Oct 18 19:16:00 2022 +0800 scsi: pm8001: Remove pm8001_tag_init() In commit 5a141315ed7c ("scsi: pm80xx: Increase the number of outstanding I/O supported to 1024") the pm8001_ha->tags allocation was moved into pm8001_init_ccb_tag(). This changed the execution order of allocation. pm8001_tag_init() used to be called after the pm8001_ha->tags allocation and now it is called before the allocation. Before: pm8001_pci_probe() `--> pm8001_pci_alloc() `--> pm8001_alloc() `--> pm8001_ha->tags = kzalloc(...) `--> pm8001_tag_init(pm8001_ha); // OK: tags are allocated After: pm8001_pci_probe() `--> pm8001_pci_alloc() | `--> pm8001_alloc() | `--> pm8001_tag_init(pm8001_ha); // NOK: tags are not allocated | `--> pm8001_init_ccb_tag() `--> pm8001_ha->tags = kzalloc(...) // today it is bitmap_zalloc() Since pm8001_ha->tags_num is zero when pm8001_tag_init() is called it does nothing. Tags memory is allocated with bitmap_zalloc() so there is no need to manually clear each bit with pm8001_tag_free(). Reviewed-by: Changyuan Lyu Signed-off-by: Igor Pylypiv Signed-off-by: John Garry Link: https://lore.kernel.org/r/1666091763-11023-5-git-send-email-john.garry@huawei.com Reviewed-by: Damien Le Moal Reviewed-by: Jack Wang Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_init.c | 2 -- drivers/scsi/pm8001/pm8001_sas.c | 7 ------- drivers/scsi/pm8001/pm8001_sas.h | 1 - 3 files changed, 10 deletions(-) commit f7d190a94e35a2784af8871e275b86e68ff8034a Author: John Garry Date: Tue Oct 18 19:15:59 2022 +0800 scsi: hisi_sas: Put reserved tags in lower region of tagset To be consistent with blk-mq, put the reserved tags in the lower region of the tagset. Eventually we hope to get rid of all this reserved tag management. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1666091763-11023-4-git-send-email-john.garry@huawei.com Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 295fd2330a91f295522ad2b7fe2109833ae32e33 Author: John Garry Date: Tue Oct 18 19:15:58 2022 +0800 scsi: hisi_sas: Use sas_task_find_rq() Use sas_task_find_rq() to lookup the request per task for its driver tag. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1666091763-11023-3-git-send-email-john.garry@huawei.com Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) commit a9ee3f840646e2ec419c734e592ffe997195435e Author: John Garry Date: Tue Oct 18 19:15:57 2022 +0800 scsi: libsas: Add sas_task_find_rq() blk-mq already provides a unique tag per request. Some libsas LLDDs - like hisi_sas - already use this tag as the unique per-I/O HW tag. Add a common function to provide the request associated with a sas_task for all libsas LLDDs. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1666091763-11023-2-git-send-email-john.garry@huawei.com Reviewed-by: Jack Wang Reviewed-by: Jason Yan Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen include/scsi/libsas.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 621a323c3a7e23b364deaddf769e731f2da6ff03 Author: Jiapeng Chong Date: Tue Oct 18 16:12:35 2022 +0800 scsi: target: Remove the unused function transport_lba_64_ext() The function transport_lba_64_ext() is defined in the target_core_sbc.c file, but not called elsewhere, so remove this unused function. drivers/target/target_core_sbc.c:276:34: warning: unused function 'transport_lba_64_ext'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2427 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20221018081235.124662-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Martin K. Petersen drivers/target/target_core_sbc.c | 8 -------- 1 file changed, 8 deletions(-) commit 8f4bc15b9ad73434643aadb19506e1547bedf7eb Author: Dave Marchevsky Date: Thu Oct 20 09:07:21 2022 -0700 selftests/bpf: Add write to hashmap to array_map iter test Modify iter prog in existing bpf_iter_bpf_array_map.c, which currently dumps arraymap key/val, to also do a write of (val, key) into a newly-added hashmap. Confirm that the write succeeds as expected by modifying the userspace runner program. Before a change added in an earlier commit - considering PTR_TO_BUF reg a valid input to helpers which expect MAP_{KEY,VAL} - the verifier would've rejected this prog change due to type mismatch. Since using current iter's key/val to access a separate map is a reasonable usecase, let's add support for it. Note that the test prog cannot directly write (val, key) into hashmap via bpf_map_update_elem when both come from iter context because key is marked MEM_RDONLY. This is due to bpf_map_update_elem - and other basic map helpers - taking ARG_PTR_TO_MAP_{KEY,VALUE} w/o MEM_RDONLY type flag. bpf_map_{lookup,update,delete}_elem don't modify their input key/val so it should be possible to tag their args READONLY, but due to the ubiquitous use of these helpers and verifier checks for type == MAP_VALUE, such a change is nontrivial and seems better to address in a followup series. Also fixup some 'goto's in test runner's map checking loop. Signed-off-by: Dave Marchevsky Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221020160721.4030492-4-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 20 ++++++++++++++------ .../selftests/bpf/progs/bpf_iter_bpf_array_map.c | 21 ++++++++++++++++++++- 2 files changed, 34 insertions(+), 7 deletions(-) commit 51ee71d38d8ce5a30496251200ab2f12b71e1fb6 Author: Dave Marchevsky Date: Thu Oct 20 09:07:20 2022 -0700 selftests/bpf: Add test verifying bpf_ringbuf_reserve retval use in map ops Add a test_ringbuf_map_key test prog, borrowing heavily from extant test_ringbuf.c. The program tries to use the result of bpf_ringbuf_reserve as map_key, which was not possible before previouis commits in this series. The test runner added to prog_tests/ringbuf.c verifies that the program loads and does basic sanity checks to confirm that it runs as expected. Also, refactor test_ringbuf such that runners for existing test_ringbuf and newly-added test_ringbuf_map_key are subtests of 'ringbuf' top-level test. Signed-off-by: Dave Marchevsky Acked-by: Yonghong Song Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221020160721.4030492-3-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/Makefile | 8 ++- tools/testing/selftests/bpf/prog_tests/ringbuf.c | 66 +++++++++++++++++++- .../selftests/bpf/progs/test_ringbuf_map_key.c | 70 ++++++++++++++++++++++ 3 files changed, 140 insertions(+), 4 deletions(-) commit d1673304097c1f5b04e062cf62fb40200ef1546b Author: Dave Marchevsky Date: Thu Oct 20 09:07:19 2022 -0700 bpf: Consider all mem_types compatible for map_{key,value} args After the previous patch, which added PTR_TO_MEM | MEM_ALLOC type map_key_value_types, the only difference between map_key_value_types and mem_types sets is PTR_TO_BUF and PTR_TO_MEM, which are in the latter set but not the former. Helpers which expect ARG_PTR_TO_MAP_KEY or ARG_PTR_TO_MAP_VALUE already effectively expect a valid blob of arbitrary memory that isn't necessarily explicitly associated with a map. When validating a PTR_TO_MAP_{KEY,VALUE} arg, the verifier expects meta->map_ptr to have already been set, either by an earlier ARG_CONST_MAP_PTR arg, or custom logic like that in process_timer_func or process_kptr_func. So let's get rid of map_key_value_types and just use mem_types for those args. This has the effect of adding PTR_TO_BUF and PTR_TO_MEM to the set of compatible types for ARG_PTR_TO_MAP_KEY and ARG_PTR_TO_MAP_VALUE. PTR_TO_BUF is used by various bpf_iter implementations to represent a chunk of valid r/w memory in ctx args for iter prog. PTR_TO_MEM is used by networking, tracing, and ringbuf helpers to represent a chunk of valid memory. The PTR_TO_MEM | MEM_ALLOC type added in previous commit is specific to ringbuf helpers. Presence or absence of MEM_ALLOC doesn't change the validity of using PTR_TO_MEM as a map_{key,val} input. Signed-off-by: Dave Marchevsky Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221020160721.4030492-2-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 9ef40974a82a474321a4c2dd75d395943930c638 Author: Dave Marchevsky Date: Thu Oct 20 09:07:18 2022 -0700 bpf: Allow ringbuf memory to be used as map key This patch adds support for the following pattern: struct some_data *data = bpf_ringbuf_reserve(&ringbuf, sizeof(struct some_data, 0)); if (!data) return; bpf_map_lookup_elem(&another_map, &data->some_field); bpf_ringbuf_submit(data); Currently the verifier does not consider bpf_ringbuf_reserve's PTR_TO_MEM | MEM_ALLOC ret type a valid key input to bpf_map_lookup_elem. Since PTR_TO_MEM is by definition a valid region of memory, it is safe to use it as a key for lookups. Signed-off-by: Dave Marchevsky Acked-by: Yonghong Song Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221020160721.4030492-1-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 1 + 1 file changed, 1 insertion(+) commit 2f97bcd0aa433cbff954e52345d7182f706e020e Merge: 2c76238eaddd 94d52a191807 Author: Andrii Nakryiko Date: Fri Oct 21 16:27:26 2022 -0700 Merge branch 'Add support for aarch64 to selftests/bpf/vmtest.sh' Manu Bretelle says: ==================== This patchset adds initial support for running BPF's vmtest on aarch64 architecture. It includes a `config.aarch64` heavily based on `config.s390x` Makes vmtest.sh handle aarch64 and set QEMU variables to values that works on that arch. Finally, it provides a DENYLIST.aarch64 that takes care of currently broken tests on aarch64 so the vmtest run passes. This was tested by running: LLVM_STRIP=llvm-strip-16 CLANG=clang-16 \ tools/testing/selftests/bpf/vmtest.sh -- \ ./test_progs -d \ \"$(cat tools/testing/selftests/bpf/DENYLIST{,.aarch64} \ | cut -d'#' -f1 \ | sed -e 's/^[[:space:]]*//' \ -e 's/[[:space:]]*$//' \ | tr -s '\n' ','\ )\" on an aarch64 host. ==================== Signed-off-by: Andrii Nakryiko commit 94d52a19180726ee8ddc70bea75d6605e1dd6029 Author: Manu Bretelle Date: Fri Oct 21 14:07:01 2022 -0700 selftests/bpf: Initial DENYLIST for aarch64 Those tests are currently failing on aarch64, ignore them until they are individually addressed. Using this deny list, vmtest.sh ran successfully using LLVM_STRIP=llvm-strip-16 CLANG=clang-16 \ tools/testing/selftests/bpf/vmtest.sh -- \ ./test_progs -d \ \"$(cat tools/testing/selftests/bpf/DENYLIST{,.aarch64} \ | cut -d'#' -f1 \ | sed -e 's/^[[:space:]]*//' \ -e 's/[[:space:]]*$//' \ | tr -s '\n' ','\ )\" Signed-off-by: Manu Bretelle Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221021210701.728135-5-chantr4@gmail.com tools/testing/selftests/bpf/DENYLIST.aarch64 | 81 ++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 20776b72ae2a43311f82f48f7b78f484cc89e463 Author: Manu Bretelle Date: Fri Oct 21 14:07:00 2022 -0700 selftests/bpf: Update vmtests.sh to support aarch64 Add handling of aarch64 when setting QEMU options and provide the right path to aarch64 kernel image. Signed-off-by: Manu Bretelle Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221021210701.728135-4-chantr4@gmail.com tools/testing/selftests/bpf/vmtest.sh | 6 ++++++ 1 file changed, 6 insertions(+) commit ec99451f0a488e50aaf0ce467db8771411edc407 Author: Manu Bretelle Date: Fri Oct 21 14:06:59 2022 -0700 selftests/bpf: Add config.aarch64 config.aarch64, similarly to config.{s390x,x86_64} is a config enabling building a kernel on aarch64 to be used in bpf's selftests/kernel-patches CI. Signed-off-by: Manu Bretelle Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221021210701.728135-3-chantr4@gmail.com tools/testing/selftests/bpf/config.aarch64 | 181 +++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) commit 7a42af4b94f109f19b563fa7930715a3f298bf1b Author: Manu Bretelle Date: Fri Oct 21 14:06:58 2022 -0700 selftests/bpf: Remove entries from config.s390x already present in config `config.s390x` had entries already present in `config`. When generating the config used by vmtest, we concatenate the `config` file with the `config.{arch}` one, making those entries duplicated. This patch removes that duplication. Before: $ comm -1 -2 <(sort tools/testing/selftests/bpf/config.s390x) <(sort tools/testing/selftests/bpf/config) CONFIG_MODULE_SIG=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y $ Ater: $ comm -1 -2 <(sort tools/testing/selftests/bpf/config.s390x) <(sort tools/testing/selftests/bpf/config) $ Signed-off-by: Manu Bretelle Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221021210701.728135-2-chantr4@gmail.com tools/testing/selftests/bpf/config.s390x | 3 --- 1 file changed, 3 deletions(-) commit 14e77332e74603efab8347c89d3cda447c3b97c9 Merge: 88a309465b3f 1d61754caa8c Author: Nick Terrell Date: Fri Oct 21 16:00:35 2022 -0700 Merge branch 'main' into zstd-next commit 2c76238eaddd7c519f6b5a7ed80f7da6f4e11373 Author: Quentin Monnet Date: Thu Oct 20 11:03:32 2022 +0100 bpftool: Add "bootstrap" feature to version output Along with the version number, "bpftool version" displays a list of features that were selected at compilation time for bpftool. It would be useful to indicate in that list whether a binary is a bootstrap version of bpftool. Given that an increasing number of components rely on bootstrap versions for generating skeletons, this could help understand what a binary is capable of if it has been copied outside of the usual "bootstrap" directory. To detect a bootstrap version, we simply rely on the absence of implementation for the do_prog() function. To do this, we must move the (unchanged) list of commands before do_version(), which in turn requires renaming this "cmds" array to avoid shadowing it with the "cmds" argument in cmd_select(). Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221020100332.69563-1-quentin@isovalent.com tools/bpf/bpftool/main.c | 81 +++++++++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 32 deletions(-) commit 7e5eb725cf0a0a8f85e6b96e062bbd0d5d90c94e Author: Quentin Monnet Date: Thu Oct 20 11:03:00 2022 +0100 bpftool: Set binary name to "bpftool" in help and version output Commands "bpftool help" or "bpftool version" use argv[0] to display the name of the binary. While it is a convenient way to retrieve the string, it does not always produce the most readable output. For example, because of the way bpftool is currently packaged on Ubuntu (using a wrapper script), the command displays the absolute path for the binary: $ bpftool version | head -n 1 /usr/lib/linux-tools/5.15.0-50-generic/bpftool v5.15.60 More generally, there is no apparent reason for keeping the whole path and exact binary name in this output. If the user wants to understand what binary is being called, there are other ways to do so. This commit replaces argv[0] with "bpftool", to simply reflect what the tool is called. This is aligned on what "ip" or "tc" do, for example. As an additional benefit, this seems to help with integration with Meson for packaging [0]. [0] https://github.com/NixOS/nixpkgs/pull/195934 Suggested-by: Vladimír Čunát Signed-off-by: Quentin Monnet Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221020100300.69328-1-quentin@isovalent.com tools/bpf/bpftool/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9740535b857650bd6211a67ac0c0d574cba1dce Author: Xu Kuohai Date: Tue Oct 18 10:55:38 2022 -0400 libbpf: Avoid allocating reg_name with sscanf in parse_usdt_arg() The reg_name in parse_usdt_arg() is used to hold register name, which is short enough to be held in a 16-byte array, so we could define reg_name as char reg_name[16] to avoid dynamically allocating reg_name with sscanf. Suggested-by: Andrii Nakryiko Signed-off-by: Xu Kuohai Signed-off-by: Andrii Nakryiko Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221018145538.2046842-1-xukuohai@huaweicloud.com tools/lib/bpf/usdt.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 16d2a3f2ad1d2b95bf9122c910c63b0efe74179d Author: Yang Li Date: Mon Oct 17 08:07:23 2022 +0800 nouveau/dmem: Remove duplicated include in nouveau_dmem.c ./drivers/gpu/drm/nouveau/nouveau_dmem.c: nvif/if000c.h is included more than once. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2404 Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20221017000723.113744-1-yang.lee@linux.alibaba.com drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 - 1 file changed, 1 deletion(-) commit ae5a16c8da92f511fe633d0872043cd317966092 Author: Alexandre Torgue Date: Fri Oct 21 10:44:47 2022 +0200 scripts: dtc: only show unique unit address warning for enabled nodes In some cases an hardware peripheral can be used for two exclusive usages. For example, on STM32MP15 we have the same peripheral for I2S and SPI. We have dedicated driver for each usage and so a dedicated device node in devicetree. To avoid to get useless warnings running "make W=1 dtbs", this patch adds the "-Wunique_unit_address_if_enabled" flag for a make with W=1. In this case we will detect a duplicate address only if both devices are enabled in the devicetree, which is a real error case. Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20221021084447.5550-1-alexandre.torgue@foss.st.com [robh: Refactor options and keep 'unique_unit_address' for W=2] Signed-off-by: Rob Herring scripts/Makefile.lib | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 33ce453cad470ffd92ba79534dc67946b64d13b2 Author: Geert Uytterhoeven Date: Fri Oct 21 16:06:02 2022 +0200 dt-bindings: iommu: renesas,ipmmu-vmsa: R-Car V3U is R-Car Gen4 Despite the name, R-Car V3U is the first member of the R-Car Gen4 family. Hence move its compatible value to the R-Car Gen4 section. Signed-off-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Acked-by: Joerg Roedel Reviewed-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/c1fb71448a8400986fd30d51a1bb2704376c0306.1666361055.git.geert+renesas@glider.be Signed-off-by: Rob Herring Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e0cb61a8b8c84ad79bc3e1d8341cd2438d9cefe1 Author: Rob Herring Date: Tue Oct 11 08:58:50 2022 -0500 dt-bindings: ata: Add 'ata-generic' binding The 'ata-generic' binding has been around since 2008, but never documented. Cc: Alexander Shiyan Acked-by: Damien Le Moal Link: https://lore.kernel.org/r/20221011135849.2785834-1-robh@kernel.org Signed-off-by: Rob Herring .../devicetree/bindings/ata/ata-generic.yaml | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit eb814cf1adea0ce24413c26c22e9f1a556a45d34 Author: Delyan Kratunov Date: Fri Oct 21 19:36:38 2022 +0000 selftests/bpf: fix task_local_storage/exit_creds rcu usage BPF CI has revealed flakiness in the task_local_storage/exit_creds test. The failure point in CI [1] is that null_ptr_count is equal to 0, which indicates that the program hasn't run yet. This points to the kern_sync_rcu (sys_membarrier -> synchronize_rcu underneath) not waiting sufficiently. Indeed, synchronize_rcu only waits for read-side sections that started before the call. If the program execution starts *during* the synchronize_rcu invocation (due to, say, preemption), the test won't wait long enough. As a speculative fix, make the synchornize_rcu calls in a loop until an explicit run counter has gone up. [1]: https://github.com/kernel-patches/bpf/actions/runs/3268263235/jobs/5374940791 Signed-off-by: Delyan Kratunov Link: https://lore.kernel.org/r/156d4ef82275a074e8da8f4cffbd01b0c1466493.camel@meta.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/prog_tests/task_local_storage.c | 18 +++++++++++++++--- .../bpf/progs/task_local_storage_exit_creds.c | 3 +++ 2 files changed, 18 insertions(+), 3 deletions(-) commit ad50295ba8ca1f3a8d24bfa72414d8402c1992ca Author: Zack Rusin Date: Thu Oct 20 21:07:03 2022 -0400 drm/nouveau: Remove unused variable Trivial removal of an unused variable. Not sure how it snuck by me and build bots in the 7c99616e3fe7. Fixes: 7c99616e3fe7 ("drm: Remove drm_mode_config::fb_base") Reported-by: Stephen Rothwell Cc: Laurent Pinchart Cc: Thomas Zimmermann Cc: Christian König Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Reviewed-by: Lyude Paul Signed-off-by: Zack Rusin Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20221021010703.536318-1-zack@kde.org drivers/gpu/drm/nouveau/nouveau_display.c | 1 - 1 file changed, 1 deletion(-) commit 315bada690e0c4a5c268a1dd3601aefd3355773f Author: Jia He Date: Mon Oct 10 02:35:57 2022 +0000 EDAC: Check for GHES preference in the chipset-specific EDAC drivers Call ghes_get_devices() to check whether ghes_edac should be used on the platform where it is preferred over the corresponding chipset-specific EDAC driver. Unlike the existing edac_get_owner() check, the ghes_get_devices() check works independent to the module_init ordering. [ bp: Massage. ] Suggested-by: Toshi Kani Signed-off-by: Jia He Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221010023559.69655-6-justin.he@arm.com drivers/edac/amd64_edac.c | 3 +++ drivers/edac/armada_xp_edac.c | 3 +++ drivers/edac/edac_module.h | 1 + drivers/edac/i10nm_base.c | 3 +++ drivers/edac/igen6_edac.c | 3 +++ drivers/edac/layerscape_edac.c | 3 +++ drivers/edac/pnd2_edac.c | 3 +++ drivers/edac/sb_edac.c | 3 +++ drivers/edac/skx_base.c | 3 +++ drivers/edac/thunderx_edac.c | 3 +++ drivers/edac/xgene_edac.c | 3 +++ 11 files changed, 31 insertions(+) commit 1beca7f1471e14802f7f6730ac9ac0a3de7c8f8b Author: Alistair Popple Date: Wed Oct 19 23:29:34 2022 +1100 nouveau: Fix migrate_to_ram() for faulting page Commit 16ce101db85d ("mm/memory.c: fix race when faulting a device private page") changed the migrate_to_ram() callback to take a reference on the device page to ensure it can't be freed while handling the fault. Unfortunately the corresponding update to Nouveau to accommodate this change was inadvertently dropped from that patch causing GPU to CPU migration to fail so add it here. Signed-off-by: Alistair Popple Fixes: 16ce101db85d ("mm/memory.c: fix race when faulting a device private page") Cc: John Hubbard Cc: Ralph Campbell Cc: Lyude Paul Cc: Ben Skeggs Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20221019122934.866205-1-apopple@nvidia.com drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 + 1 file changed, 1 insertion(+) commit 802e7f1dfed7cc7fb309995e0c4138f08977fdfc Author: Jia He Date: Mon Oct 10 02:35:56 2022 +0000 EDAC/ghes: Make ghes_edac a proper module Commit dc4e8c07e9e2 ("ACPI: APEI: explicit init of HEST and GHES in apci_init()") introduced a bug leading to ghes_edac_register() to be invoked before edac_init(). Because at that time the bus "edac" hadn't been even registered, this created sysfs nodes as /devices/mc0 instead of /sys/devices/system/edac/mc/mc0 on an Ampere eMag server. Fix this by turning ghes_edac into a proper module. The list of GHES devices returned is not protected from being modified concurrently but it is pretty static as it gets created only during GHES init and latter is not a module so... [ bp: Massage. ] Fixes: dc4e8c07e9e2 ("ACPI: APEI: explicit init of HEST and GHES in apci_init()") Co-developed-by: Borislav Petkov Signed-off-by: Borislav Petkov Signed-off-by: Jia He Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221010023559.69655-5-justin.he@arm.com drivers/acpi/apei/ghes.c | 4 ---- drivers/edac/Kconfig | 4 ++-- drivers/edac/ghes_edac.c | 40 ++++++++++++++++++++++++++++++++++++++-- include/acpi/ghes.h | 22 ++-------------------- 4 files changed, 42 insertions(+), 28 deletions(-) commit bb3c846ad26e1c8551f68078278cbd437a20fb64 Author: Yiqing Yao Date: Tue Oct 18 15:17:59 2022 +0800 drm/amdgpu: Adjust MES polling timeout for sriov [why] MES response time in sriov may be longer than default value due to reset or init in other VF. A timeout value specific to sriov is needed. [how] When in sriov, adjust the timeout value to calculated worst case scenario. Signed-off-by: Yiqing Yao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 7e5632cdf68b2d2d53ab9d39daf6a545c2ac2045 Author: Kenneth Feng Date: Wed Oct 19 11:24:05 2022 +0800 drm/amd/pm: update driver-if header for smu_v13_0_10 update driver-if header for smu_v13_0_10 and merge with smu_v13_0_0 Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 111 +++++++++++++++------ drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 6 +- 3 files changed, 84 insertions(+), 35 deletions(-) commit 8a7a5b5f23377a1eb79b8cc47ba79d805767da47 Author: Chengming Gui Date: Tue Oct 18 17:31:38 2022 +0800 drm/amdgpu: fix pstate setting issue [WHY] 0, original pstate X 1, ctx_A_create -> ctx_A->stable_pstate = X 2, ctx_A_set_pstate (Y) -> current pstate is Y (PEAK or STANDARD) 3, ctx_B_create -> ctx_B->stable_pstate = Y 4, ctx_A_destroy -> restore pstate to X 5, ctx_B_destroy -> restore pstate to Y Above sequence will cause final pstate is wrong (Y), should be original X. [HOW] When ctx_B create, if ctx_A touched pstate setting (not auto, stable_pstate_ctx != NULL), set ctx_B->stable_pstate the same value as ctx_A saved, if stable_pstate_ctx == NULL, fetch current pstate to fill ctx_B->stable_pstate. Signed-off-by: Chengming Gui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b700672e22500a41d8e43e54dda879811e418b6e Merge: d41a7d878790 73c091a2fe96 Author: Mark Brown Date: Fri Oct 21 20:04:19 2022 +0100 ASoC: SOF: Intel/IPC4: Support for external firmware libraries Merge series from Peter Ujfalusi : In IPC4 all DSP loadable executable is a 'library' containing modules. The main or basefw is also a library which contains multiple modules. IPC4 allows to use loadable libraries to extend the functionality of the booted basefw. This series adds support for loading external libraries in case they are needed by the loaded topology file. The libraries must be placed to a specific firmware directory (fw_lib_prefix), which is: intel/avs-lib|sof-ipc4-lib/ followed by the platform name and in case of community key use a 'community' directory. For example for upx-i11 (community key): intel/avs-lib/tgl/community is the default path. The name of the library should be the UUID of the module it contains since the library loading is going to look for the file as .bin In case there is a need to bundle multiple modules into single library, symlinks can be used to point to the file: module_boundle.bin .bin -> module_boundle.bin .bin -> module_boundle.bin .bin -> module_boundle.bin But note that in this case all modules will be loaded to the DSP since only the whole library can be loaded, not individual modules. commit e29a4915db1480f96e0bc2e928699d086a71f43c Author: Frederic Weisbecker Date: Thu Oct 13 19:22:44 2022 +0200 srcu: Debug NMI safety even on archs that don't require it Currently the NMI safety debugging is only performed on architectures that don't support NMI-safe this_cpu_inc(). Reorder the code so that other architectures like x86 also detect bad uses. [ paulmck: Apply kernel test robot, Stephen Rothwell, and Zqiang feedback. ] Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney include/linux/srcu.h | 36 ++++++++++++++++++++++++------------ include/linux/srcutree.h | 4 ---- kernel/rcu/srcutree.c | 25 ++++++++++--------------- 3 files changed, 34 insertions(+), 31 deletions(-) commit 9057a3f7ac360e068ceb261938e9ae2b1a7e654c Author: Jia He Date: Mon Oct 10 02:35:55 2022 +0000 EDAC/ghes: Prepare to make ghes_edac a proper module To make ghes_edac a proper module, prepare to decouple its dependencies from GHES. Move the ghes_edac.force_load parameter to ghes.c in order to properly control whether ghes_edac should be force-loaded: In ghes_edac_register() it is too late to set the module flag. Introduce a helper ghes_get_devices(), which returns the list of GHES devices which got probed when the platform-check passes on the system. The previous force_load check is not needed in ghes_edac_unregister() since it will be checked in the module's init function of ghes_edac later. [ bp: Massage. ] Suggested-by: Toshi Kani Suggested-by: Borislav Petkov Signed-off-by: Jia He Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221010023559.69655-4-justin.he@arm.com drivers/acpi/apei/ghes.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/edac/ghes_edac.c | 35 ++------------------------------- include/acpi/ghes.h | 6 ++++++ 3 files changed, 58 insertions(+), 33 deletions(-) commit ae3c0706160b60ac5e7d36aac428ae6e572dc932 Author: Frederic Weisbecker Date: Thu Oct 13 19:22:43 2022 +0200 srcu: Explain the reason behind the read side critical section on GP start Tell about the need to protect against concurrent updaters who may overflow the GP counter behind the current update. Reported-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney kernel/rcu/srcutree.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6b77bb9b99c66c6596c58e7a25169bc2ea6b82dd Author: Frederic Weisbecker Date: Thu Oct 13 19:22:42 2022 +0200 srcu: Warn when NMI-unsafe API is used in NMI Using the NMI-unsafe reader API from within an NMI handler is very likely to be buggy for three reasons: 1) NMIs aren't strictly re-entrant (a pending nested NMI will execute at the end of the current one) so it should be fine to use a non-atomic increment here. However, breakpoints can still interrupt NMIs and if a breakpoint callback has a reader on that same ssp, a racy increment can happen. 2) If the only reader site for a given srcu_struct structure is in an NMI handler, then RCU should be used instead of SRCU. 3) Because of the previous reason (2), an srcu_struct structure having an SRCU read side critical section in an NMI handler is likely to have another one from a task context. For all these reasons, warn if an NMI-unsafe reader API is used from an NMI handler. Signed-off-by: Frederic Weisbecker Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney kernel/rcu/srcutree.c | 2 ++ 1 file changed, 2 insertions(+) commit 85bf37855ce287fe045a539441c0a3cd9c8b16fc Author: Paul E. McKenney Date: Wed Sep 28 11:25:20 2022 -0700 arch/s390: Add ARCH_HAS_NMI_SAFE_THIS_CPU_OPS Kconfig option The s390 architecture uses either a cmpxchg loop (old systems) or the laa add-to-memory instruction (new systems) to implement this_cpu_add(), both of which are NMI safe. This means that the old and more-efficient srcu_read_lock() may be used in NMI context, without the need for srcu_read_lock_nmisafe(). Therefore, add the new Kconfig option ARCH_HAS_NMI_SAFE_THIS_CPU_OPS to arch/s390/Kconfig, which will cause NEED_SRCU_NMI_SAFE to be deselected, thus preserving the current srcu_read_lock() behavior. [ paulmck: Apply Christian Borntraeger feedback. ] Link: https://lore.kernel.org/all/20220910221947.171557773@linutronix.de/ Suggested-by: Neeraj Upadhyay Suggested-by: Frederic Weisbecker Suggested-by: Boqun Feng Signed-off-by: Paul E. McKenney Acked-by: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: Thomas Gleixner Cc: John Ogness Cc: Petr Mladek Cc: arch/s390/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3f48f3d91c56e61b3965e43d2bdaca0c2f3ece3b Author: Paul E. McKenney Date: Wed Sep 28 11:21:54 2022 -0700 arch/loongarch: Add ARCH_HAS_NMI_SAFE_THIS_CPU_OPS Kconfig option The loongarch architecture uses the atomic read-modify-write amadd instruction to implement this_cpu_add(), which is NMI safe. This means that the old and more-efficient srcu_read_lock() may be used in NMI context, without the need for srcu_read_lock_nmisafe(). Therefore, add the new Kconfig option ARCH_HAS_NMI_SAFE_THIS_CPU_OPS to arch/loongarch/Kconfig, which will cause NEED_SRCU_NMI_SAFE to be deselected, thus preserving the current srcu_read_lock() behavior. Link: https://lore.kernel.org/all/20220910221947.171557773@linutronix.de/ Suggested-by: Neeraj Upadhyay Suggested-by: Frederic Weisbecker Suggested-by: Boqun Feng Signed-off-by: Paul E. McKenney Cc: Huacai Chen Cc: WANG Xuerui Cc: Thomas Gleixner Cc: John Ogness Cc: Petr Mladek Cc: arch/loongarch/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ceb1c8c9b8aa9199da46a0f29d2d5f08d9b44c15 Author: Zqiang Date: Thu Oct 13 12:41:48 2022 +0800 rcu: Fix __this_cpu_read() lockdep warning in rcu_force_quiescent_state() Running rcutorture with non-zero fqs_duration module parameter in a kernel built with CONFIG_PREEMPTION=y results in the following splat: BUG: using __this_cpu_read() in preemptible [00000000] code: rcu_torture_fqs/398 caller is __this_cpu_preempt_check+0x13/0x20 CPU: 3 PID: 398 Comm: rcu_torture_fqs Not tainted 6.0.0-rc1-yoctodev-standard+ Call Trace: dump_stack_lvl+0x5b/0x86 dump_stack+0x10/0x16 check_preemption_disabled+0xe5/0xf0 __this_cpu_preempt_check+0x13/0x20 rcu_force_quiescent_state.part.0+0x1c/0x170 rcu_force_quiescent_state+0x1e/0x30 rcu_torture_fqs+0xca/0x160 ? rcu_torture_boost+0x430/0x430 kthread+0x192/0x1d0 ? kthread_complete_and_exit+0x30/0x30 ret_from_fork+0x22/0x30 The problem is that rcu_force_quiescent_state() uses __this_cpu_read() in preemptible code instead of the proper raw_cpu_read(). This commit therefore changes __this_cpu_read() to raw_cpu_read(). Signed-off-by: Zqiang Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df83fff75870accd16f1dc26a05c31b3bd5e192f Author: Paul E. McKenney Date: Thu Sep 29 11:58:10 2022 -0700 rcu-tasks: Make grace-period-age message human-readable This commit adds a few words to the informative message that appears every ten seconds in RCU Tasks and RCU Tasks Trace grace periods. This message currently reads as follows: rcu_tasks_wait_gp: rcu_tasks grace period 1046 is 10088 jiffies old. After this change, it provides additional context, instead reading as follows: rcu_tasks_wait_gp: rcu_tasks grace period number 1046 (since boot) is 10088 jiffies old. Reported-by: Alexei Starovoitov Signed-off-by: Paul E. McKenney kernel/rcu/tasks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdbdb868454a3e83996cf1500c6f7ba73c07a03c Author: Yipeng Zou Date: Mon Sep 26 09:58:27 2022 +0800 rcu: Remove rcu_is_idle_cpu() The commit 3fcd6a230fa7 ("x86/cpu: Avoid cpuinfo-induced IPIing of idle CPUs") introduced rcu_is_idle_cpu() in order to identify the current CPU idle state. But commit f3eca381bd49 ("x86/aperfmperf: Replace arch_freq_get_on_cpu()") switched to using MAX_SAMPLE_AGE, so rcu_is_idle_cpu() is no longer used. This commit therefore removes it. Fixes: f3eca381bd49 ("x86/aperfmperf: Replace arch_freq_get_on_cpu()") Signed-off-by: Yipeng Zou Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney include/linux/rcutiny.h | 2 -- include/linux/rcutree.h | 2 -- kernel/rcu/tree.c | 6 ------ 3 files changed, 10 deletions(-) commit e9f8a790bf682bb4a2f79d0d905b34d55bceb71d Author: Paul E. McKenney Date: Mon Sep 26 08:57:56 2022 -0700 slab: Explain why SLAB_TYPESAFE_BY_RCU reference before locking It is not obvious to the casual user why it is absolutely necessary to acquire a reference to a SLAB_TYPESAFE_BY_RCU structure before acquiring a lock in that structure. Therefore, add a comment explaining this point. [ paulmck: Apply Vlastimil Babka feedback. ] Signed-off-by: Paul E. McKenney Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: Roman Gushchin Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Acked-by: Vlastimil Babka include/linux/slab.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4194dabe8ca2e6b61d12181dccf4fd1e60302e42 Merge: b872e8b1c8db f4567b28fdd4 Author: Mark Brown Date: Fri Oct 21 17:14:07 2022 +0100 spi: amlogic: meson-spicc: Use pinctrl to drive CLK line when idle Merge series from Amjad Ouled-Ameur : Between SPI transactions, all SPI pins are in HiZ state. When using the SS signal from the SPICC controller it's not an issue because when the transaction resumes all pins come back to the right state at the same time as SS. The problem is when we use CS as a GPIO. In fact, between the GPIO CS state change and SPI pins state change from idle, you can have a missing or spurious clock transition. Set a bias on the clock depending on the clock polarity requested before CS goes active, by passing a special "idle-low" and "idle-high" pinctrl state and setting the right state at a start of a message. commit 12f96823a9d7724f819424f6232d9e46a56e80d1 Merge: 98af3746026c b81a67740075 Author: Alexei Starovoitov Date: Fri Oct 21 08:59:01 2022 -0700 Merge branch 'bpftool: Add autoattach for bpf prog load|loadall' Wang Yufen says: ==================== This patchset add "autoattach" optional for "bpftool prog load(_all)" to support one-step load-attach-pin_link. v8 -> v9: fix link leak, and change pathname_concat(specify not just buffer pointer, but also it's size) v7 -> v8: for the programs not supporting autoattach, fall back to reguler pinning instead of skipping v6 -> v7: add info msg print and update doc for the skip program v5 -> v6: skip the programs not supporting auto-attach, and change optional name from "auto_attach" to "autoattach" v4 -> v5: some formatting nits of doc v3 -> v4: rename functions, update doc, bash and do_help() v2 -> v3: switch to extend prog load command instead of extend perf v2: https://patchwork.kernel.org/project/netdevbpf/patch/20220824033837.458197-1-weiyongjun1@huawei.com/ v1: https://patchwork.kernel.org/project/netdevbpf/patch/20220816151725.153343-1-weiyongjun1@huawei.com/ ==================== Signed-off-by: Alexei Starovoitov commit b81a677400755cf24c971d1342c4c53d81744d82 Author: Wang Yufen Date: Fri Oct 14 16:31:15 2022 +0800 bpftool: Update the bash completion(add autoattach to prog load) Add autoattach optional to prog load|loadall for supporting one-step load-attach-pin_link. Signed-off-by: Wang Yufen Link: https://lore.kernel.org/r/1665736275-28143-4-git-send-email-wangyufen@huawei.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/bash-completion/bpftool | 1 + 1 file changed, 1 insertion(+) commit ff0e9a579ec9f12cb4fec9bd94b15e3d613a1a77 Author: Wang Yufen Date: Fri Oct 14 16:31:14 2022 +0800 bpftool: Update doc (add autoattach to prog load) Add autoattach optional to prog load|loadall for supporting one-step load-attach-pin_link. Signed-off-by: Wang Yufen Link: https://lore.kernel.org/r/1665736275-28143-3-git-send-email-wangyufen@huawei.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/Documentation/bpftool-prog.rst | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 19526e701ea096d13ebf881d32511e567dc41557 Author: Wang Yufen Date: Fri Oct 14 16:31:13 2022 +0800 bpftool: Add autoattach for bpf prog load|loadall Add autoattach optional to support one-step load-attach-pin_link. For example, $ bpftool prog loadall test.o /sys/fs/bpf/test autoattach $ bpftool link 26: tracing name test1 tag f0da7d0058c00236 gpl loaded_at 2022-09-09T21:39:49+0800 uid 0 xlated 88B jited 55B memlock 4096B map_ids 3 btf_id 55 28: kprobe name test3 tag 002ef1bef0723833 gpl loaded_at 2022-09-09T21:39:49+0800 uid 0 xlated 88B jited 56B memlock 4096B map_ids 3 btf_id 55 57: tracepoint name oncpu tag 7aa55dfbdcb78941 gpl loaded_at 2022-09-09T21:41:32+0800 uid 0 xlated 456B jited 265B memlock 4096B map_ids 17,13,14,15 btf_id 82 $ bpftool link 1: tracing prog 26 prog_type tracing attach_type trace_fentry 3: perf_event prog 28 10: perf_event prog 57 The autoattach optional can support tracepoints, k(ret)probes, u(ret)probes. Signed-off-by: Wei Yongjun Signed-off-by: Wang Yufen Link: https://lore.kernel.org/r/1665736275-28143-2-git-send-email-wangyufen@huawei.com Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/prog.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 2 deletions(-) commit b872e8b1c8db9e657f976ab12b54004f4937cfcf Merge: 0a7693a0da64 6c3c438c085b Author: Mark Brown Date: Fri Oct 21 16:30:40 2022 +0100 spi: pxa2xx: Minor cleanups Merge series from Andy Shevchenko : This series has a couple of cleanups for the pxa2xx driver. commit f4567b28fdd4bede7cab0810200d567a1f03ec5e Author: Amjad Ouled-Ameur Date: Fri Oct 21 15:31:26 2022 +0200 spi: meson-spicc: Use pinctrl to drive CLK line when idle Between SPI transactions, all SPI pins are in HiZ state. When using the SS signal from the SPICC controller it's not an issue because when the transaction resumes all pins come back to the right state at the same time as SS. The problem is when we use CS as a GPIO. In fact, between the GPIO CS state change and SPI pins state change from idle, you can have a missing or spurious clock transition. Set a bias on the clock depending on the clock polarity requested before CS goes active, by passing a special "idle-low" and "idle-high" pinctrl state and setting the right state at a start of a message Reported-by: Da Xue Signed-off-by: Neil Armstrong Signed-off-by: Amjad Ouled-Ameur Link: https://lore.kernel.org/r/20221004-up-aml-fix-spi-v4-2-0342d8e10c49@baylibre.com Signed-off-by: Mark Brown drivers/spi/spi-meson-spicc.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit 031837826886e254fefff7d8b849dc63b6a7e2b9 Author: Amjad Ouled-Ameur Date: Fri Oct 21 15:31:25 2022 +0200 spi: dt-bindings: amlogic, meson-gx-spicc: Add pinctrl names for SPI signal states SPI pins of the SPICC Controller in Meson-GX needs to be controlled by pin biais when idle. Therefore define three pinctrl names: - default: SPI pins are controlled by spi function. - idle-high: SCLK pin is pulled-up, but MOSI/MISO are still controlled by spi function. - idle-low: SCLK pin is pulled-down, but MOSI/MISO are still controlled by spi function. Reported-by: Da Xue Signed-off-by: Neil Armstrong Signed-off-by: Amjad Ouled-Ameur Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221004-up-aml-fix-spi-v4-1-0342d8e10c49@baylibre.com Signed-off-by: Mark Brown .../bindings/spi/amlogic,meson-gx-spicc.yaml | 75 ++++++++++++++-------- 1 file changed, 47 insertions(+), 28 deletions(-) commit 3facae0649648da1da6b1c36babc9b92998face0 Author: Sean Hong Date: Fri Oct 21 11:10:24 2022 +0800 drm/panel-edp: Add INX N116BGE-EA2 (HW: C4) Add support for the INX - N116BGE-EA2 (HW: C4) panel. Signed-off-by: Sean Hong Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20221021031024.2899082-1-sean.hong@quanta.corp-partner.google.com drivers/gpu/drm/panel/panel-edp.c | 1 + 1 file changed, 1 insertion(+) commit 4ab5953f0af77fd27895ca2e5cba7078a0f63583 Author: Sean Hong Date: Fri Oct 21 10:58:01 2022 +0800 drm/panel-edp: Add INX N116BGE-EA2 (HW: C2) Add support for the INX - N116BGE-EA2 (HW: C2) panel. Signed-off-by: Sean Hong Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20221021025801.2898500-1-sean.hong@quanta.corp-partner.google.com drivers/gpu/drm/panel/panel-edp.c | 1 + 1 file changed, 1 insertion(+) commit 0a7693a0da649e7ab7d07a5373fbda21231e67b2 Author: Marc Kleine-Budde Date: Fri Oct 21 15:10:51 2022 +0200 spi: spi-imx: remove unused struct spi_imx_devtype_data::disable_dma callback In commit 7a908832ace7 ("spi: imx: add fallback feature") the last user of the struct spi_imx_devtype_data::disable_dma callback was removed. However the disable_dma member of struct spi_imx_devtype_data and the callback itself was not removed. Remove struct spi_imx_devtype_data::disable_dma and mx51_disable_dma() as they are unused. Cc: Robin Gong Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20221021131051.1777984-1-mkl@pengutronix.de Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 8 -------- 1 file changed, 8 deletions(-) commit fb0f4051ee8e0ae89697e417f1a547e715acc824 Author: Colin Ian King Date: Thu Oct 20 22:07:31 2022 +0100 leds: lp55xx: remove variable j The variable j being incremented but it is never referenced, it is redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Pavel Machek drivers/leds/leds-lp55xx-common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 38bcb51f81af17a6d40fc135e565fc1fb8aa8e9d Author: Jiapeng Chong Date: Mon Oct 17 16:10:53 2022 +0800 leds-pca955x: Remove the unused function pca95xx_num_led_regs() The function pca95xx_num_led_regs() is defined in the leds-pca955x.c file, but not called elsewhere, so delete this unused function. drivers/leds/leds-pca955x.c:149:19: warning: unused function 'pca95xx_num_led_regs'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2411 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Pavel Machek drivers/leds/leds-pca955x.c | 6 ------ 1 file changed, 6 deletions(-) commit 80e5acb6dd72b25a6e6527443b9e9c1c3a7bcef6 Author: Colin Ian King Date: Thu Oct 20 14:57:09 2022 +0100 wifi: rtl8xxxu: Fix reads of uninitialized variables hw_ctrl_s1, sw_ctrl_s1 Variables hw_ctrl_s1 and sw_ctrl_s1 are not being initialized and potentially can contain any garbage value. Currently there is an if statement that sets one or the other of these variables, followed by an if statement that checks if any of these variables have been set to a non-zero value. In the case where they may contain uninitialized non-zero values, the latter if statement may be taken as true when it was not expected to. Fix this by ensuring hw_ctrl_s1 and sw_ctrl_s1 are initialized. Cleans up clang warning: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c:432:7: warning: variable 'hw_ctrl_s1' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (hw_ctrl) { ^~~~~~~ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c:440:7: note: uninitialized use occurs here if (hw_ctrl_s1 || sw_ctrl_s1) { ^~~~~~~~~~ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c:432:3: note: remove the 'if' if its condition is always true if (hw_ctrl) { ^~~~~~~~~~~~~ Fixes: c888183b21f3 ("wifi: rtl8xxxu: Support new chip RTL8188FU") Signed-off-by: Colin Ian King Reviewed-by: Nathan Chancellor Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221020135709.1549086-1-colin.i.king@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c3c438c085b2cd79b3291b67f8f7ece62371947 Author: Andy Shevchenko Date: Thu Oct 20 22:45:00 2022 +0300 spi: pxa2xx: Switch from PM ifdeffery to pm_ptr() Cleaning up the driver to use pm_ptr() macro instead of ifdeffery that makes it simpler and allows the compiler to remove those functions if built without CONFIG_PM and CONFIG_PM_SLEEP support. Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20221020194500.10225-6-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 8fc8250a1586008cceaadd6f4df9db23643d4b3e Author: Andy Shevchenko Date: Thu Oct 20 22:44:59 2022 +0300 spi: pxa2xx: Consistently use dev variable in pxa2xx_spi_init_pdata() We have a temporary variable to keep a pointer to a struct device in the pxa2xx_spi_init_pdata(). Use it consistently there. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221020194500.10225-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3bd5549bd479d4451cf20be077fa7646f9ffc56f Author: Alexandru Tachici Date: Wed Oct 19 20:13:14 2022 +0300 dt-bindings: net: adin1110: Document reset Document GPIO for HW reset. Signed-off-by: Alexandru Tachici Acked-by: Krzysztof Kozlowski Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/adi,adin1110.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 36934cac7aaffaf11cb8fad1e828dd61708d9b89 Author: Alexandru Tachici Date: Wed Oct 19 20:13:13 2022 +0300 net: ethernet: adi: adin1110: add reset GPIO Add an optional GPIO to be used for a hardware reset of the IC. Signed-off-by: Alexandru Tachici Signed-off-by: David S. Miller drivers/net/ethernet/adi/adin1110.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit aea672d054a21782ed8450c75febb6ba3c208ca4 Author: Andy Shevchenko Date: Thu Oct 20 22:54:21 2022 +0300 spi: Introduce spi_get_device_match_data() helper The proposed spi_get_device_match_data() helper is for retrieving a driver data associated with the ID in an ID table. First, it tries to get driver data of the device enumerated by firmware interface (usually Device Tree or ACPI). If none is found it falls back to the SPI ID table matching. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221020195421.10482-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi.c | 12 ++++++++++++ include/linux/spi/spi.h | 3 +++ 2 files changed, 15 insertions(+) commit 73c091a2fe96fac2b893ba166fa7cd11eff45947 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:38 2022 +0300 ASoC: SOF: ipc4-loader: Support for loading external libraries In case the requested module is not available among the loaded libraries, try to load it as external library. The kernel will try to load the file from /.bin If the file found, then the ext manifest of it is parsed, placed it under XArray and the pointer to the module is returned to the caller. Releasing the firmware will be done on ipc cleanup time. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-20-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-loader.c | 155 ++++++++++++++++++++++++++++++++++++++++++-- sound/soc/sof/ipc4-priv.h | 2 + sound/soc/sof/ipc4.c | 2 +- 3 files changed, 153 insertions(+), 6 deletions(-) commit ba42b8bac3fd10b90eefbe42d8d0839d71bf7638 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:37 2022 +0300 ASoC: SOF: loader: Remove the query_fw_configuration ops The query_fw_configuration callback is redundant and the only user of it was converted to use the generic post_fw_boot ops. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-19-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/loader.c | 10 ++-------- sound/soc/sof/sof-priv.h | 4 ---- 2 files changed, 2 insertions(+), 12 deletions(-) commit e68513106eec04eba9da30d761ba0d22a4cf9e93 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:36 2022 +0300 ASoC: SOF: ipc4: Stop using the query_fw_configuration fw_loader ops Execute the configuration query from the generic post_fw_boot callback and do not set the query_fw_configuration ops to allow it's removal. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-18-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-loader.c | 3 +-- sound/soc/sof/ipc4-priv.h | 1 + sound/soc/sof/ipc4.c | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) commit cbb984b68b8d03aa423a3a0bf2946175b9e25345 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:35 2022 +0300 ASoC: SOF: loader: Add support for IPC dependent post firmware boot ops Add support for executing IPC dependent tasks after a successful firmware boot. The new post_fw_boot ops can make the fw_loader query_fw_configuration callback redundant as IPC code can handle the first boot internally. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-17-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/loader.c | 6 ++++++ sound/soc/sof/sof-priv.h | 3 +++ 2 files changed, 9 insertions(+) commit 3ab2c21e65188cac151de1fbe6adf841f2ecb082 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:34 2022 +0300 ASoC: SOF: Intel: Add ipc4 library loading implementation On Intel HDA platforms the library loading is done via DMA and an IPC message is also need to be sent to initiate the downloading of the new library. Co-developed-by: Ranjani Sridharan Signed-off-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-16-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown include/sound/sof/ipc4/header.h | 4 +++ sound/soc/sof/intel/apl.c | 3 ++ sound/soc/sof/intel/cnl.c | 3 ++ sound/soc/sof/intel/hda-loader.c | 66 ++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.h | 3 ++ sound/soc/sof/intel/icl.c | 3 ++ sound/soc/sof/intel/mtl.c | 3 ++ sound/soc/sof/intel/tgl.c | 3 ++ 8 files changed, 88 insertions(+) commit 5d5d915bcde228cd78f5d42062fb65babe651363 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:33 2022 +0300 ASoC: SOF: Intel: hda: Add flag to indicate that the firmware is IMR booted Dynamic loading of external libraries should not be done if the firmware was booted from IMR since in that case the libraries will be restored along with the basefw. The booted_from_imr flag is introduced and set to true if the IMR boot was successful and to false if cold booting is executed. The reason for the new flag is that guessing from existing flags, used to decide if we should try booting from IMR or not is not going to be robust as the IMR boot itself can fail and in that case a full, cold boot is executed. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-15-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-loader.c | 6 +++++- sound/soc/sof/intel/hda.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit a5ab431e18d48e618166e8507a3555568d570cd8 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:32 2022 +0300 ASoC: SOF: ipc4: Define platform dependent library loading callback Platforms where external libraries can be supported should set the load_library callback to implement this functionality. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-14-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-priv.h | 5 +++++ 1 file changed, 5 insertions(+) commit cd6f2a2e6346ea0955c9bed0c60add8c13b3d5f7 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:31 2022 +0300 ASoC: SOF: Intel: Set the default firmware library path for IPC4 The default path for the external firmware libraries are: intel/avs-lib/ or intel/sof-ipc4-lib/ Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-13-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/pci-apl.c | 6 ++++++ sound/soc/sof/intel/pci-cnl.c | 9 +++++++++ sound/soc/sof/intel/pci-icl.c | 6 ++++++ sound/soc/sof/intel/pci-mtl.c | 3 +++ sound/soc/sof/intel/pci-tgl.c | 21 +++++++++++++++++++++ 5 files changed, 45 insertions(+) commit 25bbc0c59ee15cfc37acaaa831de447f2c2fbcb9 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:30 2022 +0300 ASoC: SOF: Add path definition for external firmware libraries IPC4 based firmware supports dynamically loaded external libraries. The libraries will be not stored alongside of the firmware or tplg files. For intel platforms the default path will be: intel/avs-lib|sof-ipc4-lib// if a community key is used on the given machine then the libraries will be under 'community' directory, like it is done for the firmware itself. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-12-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown include/sound/sof.h | 6 +++++- sound/soc/sof/intel/pci-tgl.c | 3 +++ sound/soc/sof/sof-pci-dev.c | 26 ++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) commit c73f8b470855d3123ab4b443aa9c255412dc1a13 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:29 2022 +0300 ASoC: SOF: IPC4: Add helper for looking up module by UUID Add a simple helper to walk the loaded libraries and their modules to make the ipc4-topology not aware of the underlying infrastructure and simplify the code. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-11-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-loader.c | 21 +++++++++++++++++++++ sound/soc/sof/ipc4-priv.h | 3 +++ sound/soc/sof/ipc4-topology.c | 17 +++-------------- 3 files changed, 27 insertions(+), 14 deletions(-) commit 5a932cfce4401491c942ddcb7fd3ca669e507b4d Author: Peter Ujfalusi Date: Thu Oct 20 15:12:28 2022 +0300 ASoC: SOF: ipc4: Convert the firmware handling (loader) to library convention With IPC4 each DSP loadable binary is a library, which contains ext_manifest section and loadable modules. The basefw is no exception, it is always library 0 and it can contain several modules, depending on the firmware build. The current code assumes only one binary, which is the basefw and has no concept of libraries. This patch introduces the library+modules abstraction and represents the basefw as library for the IPC4 loader codebase. The basefw loading and handling is not changing, it is still done by the generic code, but it's information is cloned under the library representation. The libraries are managed via XArray to offload the list and ID management. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-loader.c | 45 ++++++++++++++++++++++++++++-------- sound/soc/sof/ipc4-priv.h | 53 ++++++++++++++++++++++++++++--------------- sound/soc/sof/ipc4-topology.c | 20 ++++++++-------- sound/soc/sof/ipc4.c | 32 ++++++++++++++++++++++++++ 4 files changed, 113 insertions(+), 37 deletions(-) commit b0a12fa905fad870bd941df2726953edafb489f3 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:27 2022 +0300 ASoC: SOF: ipc4-loader: Save the maximum number of libraries supported The firmware supports external libraries (containing modules) to be loaded runtime. The firmware configuration contains the maximum number of libraries supported, including the base firmware (which is library 0). Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-loader.c | 7 +++++++ sound/soc/sof/ipc4-priv.h | 3 +++ 2 files changed, 10 insertions(+) commit aa23b375363f6aba208761ff9985231cc69d00b8 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:26 2022 +0300 ASoC: SOF: ipc: ops: Add support for optional init and exit callbacks Add support for IPC specific initialization (init) and cleanup (exit) callback. These callbacks can be used by IPC implementation to do basic initialization and cleanup. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc.c | 6 ++++++ sound/soc/sof/sof-priv.h | 6 ++++++ 2 files changed, 12 insertions(+) commit e3775fda57d49984eaa2cfd86665a152806bfd81 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:25 2022 +0300 ASoC: SOF: Drop the firmware and fw_offset from snd_sof_pdata The SOF stack now uses the sdev->basefw to work with the SOF firmware, the information from plat_data can be dropped. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown include/sound/sof.h | 4 ---- sound/soc/sof/loader.c | 9 --------- 2 files changed, 13 deletions(-) commit 4fd0f664bdcdd63ce95542227f65459447426aa4 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:24 2022 +0300 ASoC: SOF: Intel: hda-loader-skl: Use the basefw firmware container directly Switch to access to the firmware struct via sdev->basefw container to unblock the removal of the firmware information from plat_data. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-loader-skl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 410a321c9721bb3e839f64ffe60b45492d0f1f65 Author: Peter Ujfalusi Date: Thu Oct 20 15:12:23 2022 +0300 ASoC: SOF: Intel: hda-loader: Use the basefw firmware container directly Switch to access to the firmware struct via sdev->basefw container to unblock the removal of the firmware information from plat_data. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-loader.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit b9bed09aa97f90a40695eb472b1baba81242e3ed Author: Peter Ujfalusi Date: Thu Oct 20 15:12:22 2022 +0300 ASoC: SOF: amd: Use the basefw firmware container directly Switch to access to the firmware struct via sdev->basefw container to unblock the removal of the firmware information from plat_data. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/amd/acp-loader.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4f373ccf226e37a20fdc15a3df8034517a6045fd Author: Peter Ujfalusi Date: Thu Oct 20 15:12:21 2022 +0300 ASoC: SOF: Introduce container struct for SOF firmware Move the firmware related information under a new struct (sof_firmware) and add it to the high level snd_sof_dev struct. Convert the generic code to use this new container when working with the basefw and for compatibility reasons set the old plat_data members used by the platforms. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3-loader.c | 26 ++++++++++++-------------- sound/soc/sof/ipc4-loader.c | 6 ++---- sound/soc/sof/loader.c | 18 +++++++++++++----- sound/soc/sof/sof-priv.h | 14 ++++++++++++++ 4 files changed, 41 insertions(+), 23 deletions(-) commit 9b9db0d69bc16072a1d549ed4f343fd55ddfc48c Author: Ranjani Sridharan Date: Thu Oct 20 15:12:20 2022 +0300 ASoC: SOF: loader: Set complete state before post_fw_run op Set the FW state to complete right after boot is complete. This enables sending IPC's in the post_fw_run op. This will be needed to support reloading 3rd party module libraries after firmware boot. Signed-off-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/loader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3d74c9eca1a2bda03e45f18d13154ac3e0dfba85 Author: Matt Ranostay Date: Thu Oct 20 23:30:00 2022 +0800 HID: mcp2221: correct undefined references when CONFIG_GPIOLIB isn't defined Singular #ifdef IS_REACHABLE(CONFIG_GPIOLIB) weren't covering all the gpiolib functions that were being referenced. Update the code regions that are commented out when CONFIG_GPIOLIB isn't enabled to avoid errors. Fixes: 960f9df7c620 ("HID: mcp2221: add ADC/DAC support via iio subsystem") Signed-off-by: Matt Ranostay Signed-off-by: Jiri Kosina drivers/hid/hid-mcp2221.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e91fc483552df10291f9efac5dd9241ca129f2a4 Author: Matt Ranostay Date: Thu Oct 20 23:29:59 2022 +0800 HID: mcp2221: fix 'cast to restricted __le16' sparse warnings Use (__force __le16) cast for adc_values le16_to_cpu conversion to correct following sparse warnings: drivers/hid/hid-mcp2221.c:950:32: sparse: sparse: cast to restricted __le16 Reported-by: kernel test robot Fixes: 960f9df7c620 ("HID: mcp2221: add ADC/DAC support via iio subsystem") Signed-off-by: Matt Ranostay Signed-off-by: Jiri Kosina drivers/hid/hid-mcp2221.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0facc045a144053ba2067894444d14e8fffeaa3 Author: Jeff Johnson Date: Tue Oct 18 14:17:18 2022 -0700 net: ipa: Make QMI message rules const Commit ff6d365898d4 ("soc: qcom: qmi: use const for struct qmi_elem_info") allows QMI message encoding/decoding rules to be const, so do that for IPA. Signed-off-by: Jeff Johnson Reviewed-by: Alex Elder Reviewed-by: Sibi Sankar Signed-off-by: David S. Miller drivers/net/ipa/ipa_qmi_msg.c | 20 ++++++++++---------- drivers/net/ipa/ipa_qmi_msg.h | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) commit d41a7d878790594d7992e7a983037f5907c8754c Merge: 625d2753723b 6258234129b0 Author: Mark Brown Date: Fri Oct 21 12:22:32 2022 +0100 ASoC: Merge HDA/ext cleanup Merge branch 'topic/hda-ext-cleanup' of https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-6.2 for further AVS work. commit e64f57e8cd5abe167cdf453869d6274608480519 Author: Tomas Marek Date: Wed Oct 12 18:09:24 2022 +0200 hwrng: stm32 - fix read of the last word The stm32_rng_read() function samples TRNG by 4 bytes until at least 5 bytes are free in the input buffer. The last four bytes are never read. For example, 60 bytes are returned in case the input buffer size is 64 bytes. Read until at least 4 bytes are free in the input buffer. Fill the buffer entirely in case the buffer size is divisible by 4. Cc: Oleg Karfich Signed-off-by: Tomas Marek Signed-off-by: Herbert Xu drivers/char/hw_random/stm32-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e11a4fc84dcc9746936c46d9a88489a365fea45 Author: Tomas Marek Date: Wed Oct 12 18:09:23 2022 +0200 hwrng: stm32 - fix number of returned bytes on read The stm32_rng_read() function uses `retval` variable as a counter of generated random bytes. However, the same variable is used to store a result of the polling function in case the driver is waiting until the TRNG is ready. The TRNG generates random numbers by 16B. One loop read 4B. So, the function calls the polling every 16B, i.e. every 4th loop. The `retval` counter is reset on poll call and only number of bytes read after the last poll call is returned to the caller. The remaining sampled random bytes (for example 48 out of 64 in case 64 bytes are read) are not used. Use different variable to store the polling function result and do not overwrite `retval` counter. Cc: Oleg Karfich Signed-off-by: Tomas Marek Signed-off-by: Herbert Xu drivers/char/hw_random/stm32-rng.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 854e25a6d653b76007c142b7edbaba81a8789a7f Author: jianchunfu Date: Sun Oct 9 17:52:54 2022 +0800 crypto: talitos - Use the defined variable to clean code Use the defined variable "dev" to make the code cleaner. Signed-off-by: jianchunfu Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f1da27b7c4191f78ed81d3dabf64c769f896296c Author: Mingming.Su Date: Sat Oct 8 18:45:53 2022 +0200 hwrng: mtk - add mt7986 support 1. Add trng compatible name for MT7986 2. Fix mtk_rng_wait_ready() function Signed-off-by: Mingming.Su Signed-off-by: Frank Wunderlich Signed-off-by: Herbert Xu drivers/char/hw_random/mtk-rng.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 76a4e874593543a2dff91d249c95bac728df2774 Author: Corentin Labbe Date: Thu Oct 6 04:34:19 2022 +0000 crypto: n2 - add missing hash statesize Add missing statesize to hash templates. This is mandatory otherwise no algorithms can be registered as the core requires statesize to be set. CC: stable@kernel.org # 4.3+ Reported-by: Rolf Eike Beer Tested-by: Rolf Eike Beer Fixes: 0a625fd2abaa ("crypto: n2 - Add Niagara2 crypto driver") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/n2_core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 65c92cbb3f2365627a10cf97560d51e88fb4e588 Author: Robert Elliott Date: Fri Sep 30 16:40:14 2022 -0500 crypto: tcrypt - fix return value for multiple subtests When a test mode invokes multiple tests (e.g., mode 0 invokes modes 1 through 199, and mode 3 tests three block cipher modes with des), don't keep accumulating the return values with ret += tcrypt_test(), which results in a bogus value if more than one report a nonzero value (e.g., two reporting -2 (-ENOENT) end up reporting -4 (-EINTR)). Instead, keep track of the minimum return value reported by any subtest. Fixes: 4e033a6bc70f ("crypto: tcrypt - Do not exit on success in fips mode") Signed-off-by: Robert Elliott Signed-off-by: Herbert Xu crypto/tcrypt.c | 256 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 128 insertions(+), 128 deletions(-) commit 46beeade05c6a7673873ba0a7b6396cd3a3b3473 Author: Herbert Xu Date: Fri Sep 30 14:09:34 2022 +0800 crypto: ixp4xx - Fix sparse warnings This fixes a number of trivial sparse warnings in ixp4xx. Signed-off-by: Herbert Xu Acked-by: Corentin Labbe Tested-by: Corentin Labbe Acked-by: Linus Walleij Signed-off-by: Herbert Xu drivers/crypto/ixp4xx_crypto.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f07b3e87fe62984db66fd4179ae7e960e4fc43e8 Author: Tomer Maimon Date: Thu Sep 29 16:31:11 2022 +0300 hwrng: npcm - Add NPCM8XX support Adding RNG NPCM8XX support to NPCM RNG driver. RNG NPCM8XX uses a different clock prescaler. As part of adding NPCM8XX support: - Add NPCM8XX specific compatible string. - Add data to handle architecture specific clock prescaler. Signed-off-by: Tomer Maimon Signed-off-by: Herbert Xu drivers/char/hw_random/npcm-rng.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 518a198f41d6539dc025f0e4fe2785f9031fa1eb Author: Tomer Maimon Date: Thu Sep 29 16:31:10 2022 +0300 dt-bindings: rng: nuvoton,npcm-rng: Add npcm845 compatible string Add a compatible string for Nuvoton BMC NPCM845 RNG. Signed-off-by: Tomer Maimon Acked-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/nuvoton,npcm-rng.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit be7f5ef9ff4bbe99e4fcdf63057a993be178af46 Author: Colin Ian King Date: Wed Sep 28 23:24:43 2022 +0100 crypto: stm32 - Fix spelling mistake "wite" -> "write" There are a couple of spelling mistakes in dev_err messages. Fix them. Signed-off-by: Colin Ian King Acked-by: nicolas.toromanoff@foss.st.com Signed-off-by: Herbert Xu drivers/crypto/stm32/stm32-cryp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 10da230a4df1dfe32a58eb09246f5ffe82346f27 Author: Mario Limonciello Date: Wed Sep 28 13:45:05 2022 -0500 crypto: ccp - Add support for TEE for PCI ID 0x14CA SoCs containing 0x14CA are present both in datacenter parts that support SEV as well as client parts that support TEE. Cc: stable@vger.kernel.org # 5.15+ Tested-by: Rijo-john Thomas Signed-off-by: Mario Limonciello Acked-by: Tom Lendacky Signed-off-by: Herbert Xu drivers/crypto/ccp/sp-pci.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 094528b6a5a755b1195a01e10b13597d67d1a0e6 Author: Natalia Petrova Date: Wed Sep 28 13:25:05 2022 +0300 crypto: nitrox - avoid double free on error path in nitrox_sriov_init() If alloc_workqueue() fails in nitrox_mbox_init() it deallocates ndev->iov.vfdev and returns error code, but then nitrox_sriov_init() calls nitrox_sriov_cleanup() where ndev->iov.vfdev is deallocated again. Fix this by nulling ndev->iov.vfdev after the first deallocation. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 9e5de3e06e54 ("crypto: cavium/nitrox - Add mailbox...") Signed-off-by: Natalia Petrova Signed-off-by: Alexey Khoroshilov Signed-off-by: Herbert Xu drivers/crypto/cavium/nitrox/nitrox_mbx.c | 1 + 1 file changed, 1 insertion(+) commit 375de984a3cb691a0bbaf9756e8595e0b54e27e0 Author: Yuan Can Date: Tue Sep 27 13:39:55 2022 +0000 crypto: ccp - Remove unused struct ccp_crypto_cpu After commit bc3854476f36("crypto: ccp - Use a single queue for proper ordering of tfm requests"), no one use struct ccp_crypto_cpu, so remove it. Signed-off-by: Yuan Can Acked-by: John Allen Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-main.c | 7 ------- 1 file changed, 7 deletions(-) commit 839b8ae2fc10f205317bcc32c9de18456756e1f5 Author: Corentin Labbe Date: Tue Sep 27 08:55:55 2022 +0000 crypto: sun8i-ss - use dma_addr instead u32 The DMA address need to be stored in a dma_addr_t Fixes: 359e893e8af4 ("crypto: sun8i-ss - rework handling of IV") Reported-by: Dan Carpenter Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36dd88b1c09c78f993cb11dcc5f4211d78a10e5f Author: Peter Harliman Liem Date: Tue Sep 27 11:10:10 2022 +0800 crypto: inside-secure - Add MaxLinear platform This is to add MaxLinear platform into compatible id. Firmware endianness option is added since MaxLinear firmware is in little endian format. Signed-off-by: Peter Harliman Liem Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 11 +++++++++++ drivers/crypto/inside-secure/safexcel.h | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 594ed3d245d3e2d0760f30724e02ecf1604b2c01 Author: Peter Harliman Liem Date: Tue Sep 27 11:10:09 2022 +0800 crypto: inside-secure - Add fw_little_endian option This is to add fw_little_endian option, which can be used for platform which firmware is using little-endian (instead of big-endian). Signed-off-by: Peter Harliman Liem Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 14 ++++++++++---- drivers/crypto/inside-secure/safexcel.h | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) commit 22044d9b04b593831d8e16ba7aafabf4e75964f5 Author: Peter Harliman Liem Date: Tue Sep 27 11:10:08 2022 +0800 crypto: inside-secure - Expand soc data structure Currently platform data is assigned directly to version string(instead of struct). To make it more scalable, we move it to use data struct instead. This allows customization for individual platforms other than version string. Signed-off-by: Peter Harliman Liem Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 44 ++++++++++++++++++++++----------- drivers/crypto/inside-secure/safexcel.h | 6 ++++- 2 files changed, 35 insertions(+), 15 deletions(-) commit 224f3a050e495a7c3c1bcee2c613d0996bc661dc Author: Gustavo A. R. Silva Date: Mon Sep 26 16:45:45 2022 -0500 crypto: talitos - 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/216 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Herbert Xu drivers/crypto/talitos.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 237f9eceb2f3c888c1a26a4209243607d3cc0c7c Author: ruanjinjie Date: Mon Sep 26 17:27:11 2022 +0800 crypto: ccp - Add __init/__exit annotations to module init/exit funcs Add missing __init/__exit annotations to module init/exit funcs Signed-off-by: ruanjinjie Acked-by: John Allen Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f30fe6314698d107edbb9db50bc3c3443a30ec80 Author: Tianjia Zhang Date: Mon Sep 26 17:14:40 2022 +0800 crypto: scatterwalk - remove duplicate function declarations scatterwalk_map() is an inline function already defined in the header file, it is necessary to delete the re-declaration at the same location, which was left out in the header file by an earlier modification. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu include/crypto/scatterwalk.h | 1 - 1 file changed, 1 deletion(-) commit ad981647dbe1ea91071b9783dd62d74e22c6d955 Author: Tianjia Zhang Date: Mon Sep 26 17:14:21 2022 +0800 crypto: ccm - use local variables instead of indirect references The variable odata has been introduced into the function scope as a variable and should be used directly. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu crypto/ccm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee1537fe3dd89860d0336563891f6cac707d0cb5 Author: Weili Qian Date: Sat Sep 24 19:04:31 2022 +0800 crypto: hisilicon/qm - re-enable communicate interrupt before notifying PF After the device is reset, the VF needs to re-enable communication interrupt before the VF sends restart complete message to the PF. If the interrupt is re-enabled after the VF notifies the PF, the PF may fail to send messages to the VF after receiving VF's restart complete message. Fixes: 760fe22cf5e9 ("crypto: hisilicon/qm - update reset flow") Signed-off-by: Weili Qian Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94adb03fd58bbe355e3d7a9d0f701889313e4a51 Author: Weili Qian Date: Sat Sep 24 18:34:45 2022 +0800 crypto: hisilicon/sec - enabling clock gating of the address prefetch module Change the value of clock gating register to 0x7fff to enable clock gating of the address prefetch module. When the device is idle, the clock is turned off to save power. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu drivers/crypto/hisilicon/sec2/sec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f57e292897cac13b6ddee078aea21173b234ecb7 Author: Weili Qian Date: Sat Sep 24 18:14:42 2022 +0800 crypto: hisilicon/qm - fix incorrect parameters usage In qm_get_xqc_depth(), parameters low_bits and high_bits save the values of the corresponding bits. However, the values saved by the two parameters are opposite. As a result, the values returned to the callers are incorrect. Fixes: 129a9f340172 ("crypto: hisilicon/qm - get qp num and depth from hardware registers") Signed-off-by: Weili Qian Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7001141d34e550854425afa76e960513cf150a62 Author: Yicong Yang Date: Sat Sep 24 17:34:24 2022 +0800 crypto: hisilicon/qm - drop unnecessary IS_ENABLE(CONFIG_NUMA) check dev_to_node() can handle the case when CONFIG_NUMA is not set, so the check of CONFIG_NUMA is redundant and can be removed. Signed-off-by: Yicong Yang Signed-off-by: Weili Qian Signed-off-by: Herbert Xu drivers/crypto/hisilicon/qm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 45e6319bd5f2154d8b8c9f1eaa4ac030ba0d330c Author: Zhiqi Song Date: Sat Sep 24 15:38:31 2022 +0800 crypto: hisilicon/hpre - fix resource leak in remove process In hpre_remove(), when the disable operation of qm sriov failed, the following logic should continue to be executed to release the remaining resources that have been allocated, instead of returning directly, otherwise there will be resource leakage. Signed-off-by: Zhiqi Song Signed-off-by: Herbert Xu drivers/crypto/hisilicon/hpre/hpre_main.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 2bd0db4b3f0bd529f75b32538fc5a3775e3591c0 Author: Ville Syrjälä Date: Thu Oct 20 12:39:38 2022 +0300 drm/i915: Allow panel fixed modes to have differing sync polarities Apparently some panels declare multiple modes with random sync polarities. Seems a bit weird, but looks like Windows/GOP doesn't care, so let follow suit and accept alternate fixed modes regardless of their sync polarities. v2: Don't pollute the DRM_ namespace with a define (Jani) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6968 Acked-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221020093938.27200-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_panel.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c8ce0dd75515b0b05095b6d272d100b542b510aa Author: Marek Vasut Date: Mon Sep 26 23:29:58 2022 +0200 ARM: dts: stm32: Add DHCOR based Testbench board Add DT for DHCOR Testbench board, which is a testbench for testing of DHCOR SoM during manufacturing. This is effectively a trimmed down version of AV96 board with CSI-2 bridge, HDMI bridge, WiFi, Audio and LEDs removed and used as GPIOs instead. Furthermore, the PMIC Buck3 is always configured from PMIC NVM to cater for both 1V8 and 3V3 SoM variant. Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/stm32mp151a-dhcor-testbench.dts | 17 ++ arch/arm/boot/dts/stm32mp15xx-dhcor-testbench.dtsi | 171 +++++++++++++++++++++ 3 files changed, 189 insertions(+) commit 212972124422948f82b1994ce5c7032d13475827 Author: Marek Vasut Date: Mon Sep 26 23:29:57 2022 +0200 dt-bindings: arm: stm32: Add compatible string for DH electronics DHCOR Testbench board Add DT compatible string for DHCOR Testbench board, which is a testbench for testing of DHCOR SoM during manufacturing. This is effectively a trimmed down version of AV96 board with CSI-2 bridge, HDMI bridge, WiFi, Audio and LEDs removed and used as GPIOs instead. Signed-off-by: Marek Vasut Acked-by: Rob Herring Signed-off-by: Alexandre Torgue Documentation/devicetree/bindings/arm/stm32/stm32.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 0a5ebb1f33679b83599af86135631d07c59201cd Author: Marek Vasut Date: Tue Sep 27 02:20:23 2022 +0200 ARM: dts: stm32: Replace SAI format with dai-format DT property The dai-format and format are handled equally by sound-core.c , the later is however the only documented property in audio-graph-port.yaml . Switch to the later. Signed-off-by: Marek Vasut Reviewed-by: Olivier Moysan Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi | 4 ++-- arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 2 +- arch/arm/boot/dts/stm32mp15xx-dkx.dtsi | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 5447215589a4bb989388c193e52e9e8abcdc4bde Author: Marek Vasut Date: Tue Sep 27 01:34:57 2022 +0200 ARM: dts: stm32: Drop linux,default-trigger = "none" from AV96 The default-trigger setting set to none has no impact and triggers DT dtbs_check warning, remove it: " arch/arm/boot/dts/stm32mp157a-dhcor-avenger96.dtb: led: led4:linux,default-trigger: 'oneOf' conditional failed, one must be fixed: " Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 1 - 1 file changed, 1 deletion(-) commit a306d8962a24f4e8385853793fd58f9792c7aa61 Author: Marek Vasut Date: Tue Sep 27 00:44:37 2022 +0200 ARM: dts: stm32: Rename mdio0 to mdio Replace "mdio0" node with "mdio" to match mdio.yaml DT schema. Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi | 2 +- arch/arm/boot/dts/stm32mp157c-ev1.dts | 2 +- arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts | 2 +- arch/arm/boot/dts/stm32mp157c-odyssey.dts | 2 +- arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 2 +- arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 2 +- arch/arm/boot/dts/stm32mp15xx-dhcor-drc-compact.dtsi | 2 +- arch/arm/boot/dts/stm32mp15xx-dkx.dtsi | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 3b835f1b8acef53c8882b25f40f48d7f5982c938 Author: Marek Vasut Date: Fri Sep 23 04:37:45 2022 +0200 ARM: dts: stm32: Drop stm32mp15xc.dtsi from Avenger96 The Avenger96 is populated with STM32MP157A DHCOR SoM, drop the stm32mp15xc.dtsi which should only be included in DTs of devices which are populated with STM32MP15xC/F SoC as the stm32mp15xc.dtsi enables CRYP block not present in the STM32MP15xA/D SoC . Fixes: 7e76f82acd9e1 ("ARM: dts: stm32: Split Avenger96 into DHCOR SoM and Avenger96 board") Signed-off-by: Marek Vasut Reviewed-by: Patrice Chotard Reviewed-by: Manivannan Sadhasivam Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157a-dhcor-avenger96.dts | 1 - 1 file changed, 1 deletion(-) commit 417c326091b06eadb93511e638e8c36230dae2e6 Author: Andy Shevchenko Date: Tue Oct 18 18:12:23 2022 +0300 pinctrl: cy8c95x0: Don't use cy8c95x0_set_mode() twice Instead, call it once in cy8c95x0_pinmux_mode() and if selector is 0, shortcut the flow by returning 0 immediately. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221018151223.80846-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-cy8c95x0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5988a0acad32823743b1a078b60392047aae4118 Author: Suraj Kandpal Date: Thu Oct 20 16:16:35 2022 +0530 drm/i915: Remove one use macro Remove one use macro for_each_connector_on_encoder which is only being used at intel_encoder_find_connector. Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy Reviewed-by: Jani Nikula Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20221020104635.874860-2-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/intel_display.h | 4 ---- drivers/gpu/drm/i915/display/intel_modeset_setup.c | 16 ++++++++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) commit 070f822d077faa4aaa86393c72340dafb3a55887 Author: Doug Berger Date: Wed Oct 19 14:51:23 2022 -0700 net: bcmgenet: add RX_CLS_LOC_ANY support If a matching flow spec exists its current location is as good as ANY. If not add the new flow spec at the first available location. Signed-off-by: Doug Berger Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20221019215123.316997-1-opendmb@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/genet/bcmgenet.c | 31 ++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 377eb9aab084bf298eed9b55ba173dad36fdf7f2 Author: Alexey Kodanev Date: Wed Oct 19 21:07:35 2022 +0300 sctp: remove unnecessary NULL checks in sctp_enqueue_event() After commit 178ca044aa60 ("sctp: Make sctp_enqueue_event tak an skb list."), skb_list cannot be NULL. Detected using the static analysis tool - Svace. Signed-off-by: Alexey Kodanev Reviewed-by: Xin Long Link: https://lore.kernel.org/r/20221019180735.161388-3-aleksei.kodanev@bell-sw.com Signed-off-by: Jakub Kicinski net/sctp/stream_interleave.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit b66aeddbe30c26e56e33c65a74d073dc319beed5 Author: Alexey Kodanev Date: Wed Oct 19 21:07:34 2022 +0300 sctp: remove unnecessary NULL check in sctp_ulpq_tail_event() After commit 013b96ec6461 ("sctp: Pass sk_buff_head explicitly to sctp_ulpq_tail_event().") there is one more unneeded check of skb_list for NULL. Detected using the static analysis tool - Svace. Signed-off-by: Alexey Kodanev Reviewed-by: Xin Long Link: https://lore.kernel.org/r/20221019180735.161388-2-aleksei.kodanev@bell-sw.com Signed-off-by: Jakub Kicinski net/sctp/ulpqueue.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6fdfdef7fdb57e6b9f768c9ca0718dcb5e727a85 Author: Alexey Kodanev Date: Wed Oct 19 21:07:33 2022 +0300 sctp: remove unnecessary NULL check in sctp_association_init() '&asoc->ulpq' passed to sctp_ulpq_init() as the first argument, then sctp_qlpq_init() initializes it and eventually returns the address of the struct member back. Therefore, in this case, the return pointer cannot be NULL. Moreover, it seems sctp_ulpq_init() has always been used only in sctp_association_init(), so there's really no need to return ulpq anymore. Detected using the static analysis tool - Svace. Signed-off-by: Alexey Kodanev Reviewed-by: Xin Long Link: https://lore.kernel.org/r/20221019180735.161388-1-aleksei.kodanev@bell-sw.com Signed-off-by: Jakub Kicinski include/net/sctp/ulpqueue.h | 3 +-- net/sctp/associola.c | 4 +--- net/sctp/ulpqueue.c | 5 +---- 3 files changed, 3 insertions(+), 9 deletions(-) commit a47e8a46a7f02ab6e5b225bcaec4fd2c0bec5e6f Author: Matt Roper Date: Wed Oct 19 15:24:37 2022 -0700 drm/i915/xelpg: Fix write to MTL_MCR_SELECTOR A misplaced closing parenthesis caused the groupid/instanceid values to be considered part of the ternary operator's condition instead of being OR'd into the resulting value. Fixes: f32898c94a10 ("drm/i915/xelpg: Add multicast steering") Reported-by: kernel test robot Signed-off-by: Matt Roper Reviewed-by: Arun R Murthy Link: https://patchwork.freedesktop.org/patch/msgid/20221019222437.3035182-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98af3746026c3eccb51b43181c41e001fe73f7af Author: Wang Yufen Date: Thu Oct 20 11:05:34 2022 +0800 selftests/bpf: fix missing BPF object files After commit afef88e65554 ("selftests/bpf: Store BPF object files with .bpf.o extension"), we should use *.bpf.o instead of *.o. In addition, use the BPF_FILE variable to save the BPF object file name, which can be better identified and modified. Fixes: afef88e65554 ("selftests/bpf: Store BPF object files with .bpf.o extension") Signed-off-by: Wang Yufen Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/1666235134-562-1-git-send-email-wangyufen@huawei.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/test_bpftool_metadata.sh | 7 +++++-- tools/testing/selftests/bpf/test_flow_dissector.sh | 6 ++++-- tools/testing/selftests/bpf/test_lwt_ip_encap.sh | 17 +++++++++-------- tools/testing/selftests/bpf/test_lwt_seg6local.sh | 9 +++++---- tools/testing/selftests/bpf/test_tc_edt.sh | 3 ++- tools/testing/selftests/bpf/test_tc_tunnel.sh | 5 +++-- tools/testing/selftests/bpf/test_tunnel.sh | 5 +++-- tools/testing/selftests/bpf/test_xdp_meta.sh | 9 +++++---- tools/testing/selftests/bpf/test_xdp_vlan.sh | 8 ++++---- 9 files changed, 40 insertions(+), 29 deletions(-) commit fb73a20ebe15b16dee68e226ec82f8e55c4d64f9 Author: Donald Hunter Date: Wed Oct 12 16:27:15 2022 +0100 bpf, docs: Reformat BPF maps page to be more readable Add a more complete introduction, with links to man pages. Move toctree of map types above usage notes. Format usage notes to improve readability. Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20221012152715.25073-1-donald.hunter@gmail.com Signed-off-by: Alexei Starovoitov Documentation/bpf/maps.rst | 101 +++++++++++++++++++++++++++++---------------- 1 file changed, 65 insertions(+), 36 deletions(-) commit 94adb5e29e0e583283183dbaa852ee9d7d0c4c26 Merge: 36875a063b5e 6d36c728bc2e Author: Jakub Kicinski Date: Thu Oct 20 17:49:10 2022 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit 43c10618700b5880097c0e13a36c94766998e8eb Author: Arnd Bergmann Date: Wed Oct 19 17:29:37 2022 +0200 ata: remove palmchip pata_bk3710 driver This device was used only on the davinci dm644x platform that is now gone, and no references to the device remain in the kernel. Signed-off-by: Arnd Bergmann Acked-by: Marc Zyngier Acked-by: Bartosz Golaszewski Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/Kconfig | 10 -- drivers/ata/Makefile | 1 - drivers/ata/pata_bk3710.c | 380 ---------------------------------------------- 3 files changed, 391 deletions(-) commit ddcb8fa6514f2baf0fdb45e7ba12fbf3abb112c7 Author: Laurent Pinchart Date: Fri Aug 6 14:19:32 2021 +0300 arm64: dts: zynqmp: zcu106a: Describe DisplayPort connector Add a device tree node to describe the DisplayPort connector, and connect it to the DPSUB output. Signed-off-by: Laurent Pinchart Acked-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 1f367ee9554af5d67c86f206e1d6889cc99f6f45 Author: Laurent Pinchart Date: Fri Aug 6 14:02:23 2021 +0300 arm64: dts: zynqmp: Add ports for the DisplayPort subsystem The DPSUB DT bindings now specify ports to model the connections with the programmable logic and the DisplayPort output. Add them to the device tree. Signed-off-by: Laurent Pinchart Acked-by: Michal Simek arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 90c313d353051c0eb5f6bbcb4b0f4cc0242f030c Author: Niklas Cassel Date: Tue Oct 18 21:10:54 2022 +0200 ata: remove unused helper ata_id_flush_ext_enabled() Not only is this function unused, but even worse, the bit it is checking is actually used for signaling if the feature is supported, not enabled. Therefore, remove the unused helper function ata_id_flush_ext_enabled(). ata_id_has_flush_ext() is left unmodified, since this extra supported bit (Bit 13 of word 86) is simply a copy of the bit that ata_id_has_flush_ext() already checks (Bit 13 of word 83), see ACS-5 r10: 7.13.6.41 Words 85..87, 120: Commands and feature sets supported or enabled Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal include/linux/ata.h | 13 ------------- 1 file changed, 13 deletions(-) commit 73eb5507fa5f86cd1b4e1a75348ff2e0d620c662 Author: Niklas Cassel Date: Tue Oct 18 21:10:53 2022 +0200 ata: remove unused helper ata_id_flush_enabled() Not only is this function unused, but even worse, the bit it is checking is actually used for signaling if the feature is supported, not enabled. Therefore, remove the unused helper function ata_id_flush_enabled(). ata_id_has_flush() is left unmodified, since this extra supported bit (Bit 12 of word 86) is simply a copy of the bit that ata_id_has_flush() already checks (Bit 12 of word 83), see ACS-5 r10: 7.13.6.41 Words 85..87, 120: Commands and feature sets supported or enabled Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal include/linux/ata.h | 9 --------- 1 file changed, 9 deletions(-) commit 67776a9ee69512b144250f1b9fbce4db76c0f3f8 Author: Niklas Cassel Date: Tue Oct 18 21:10:52 2022 +0200 ata: remove unused helper ata_id_lba48_enabled() Not only is this function unused, but even worse, the bit it is checking is actually used for signaling if the feature is supported, not enabled. Therefore, remove the unused helper function ata_id_lba48_enabled(). ata_id_has_lba48() is left unmodified, since this extra supported bit (Bit 10 of word 86) is simply a copy of the bit that ata_id_has_lba48() already checks (Bit 10 of word 83), see ACS-5 r10: 7.13.6.41 Words 85..87, 120: Commands and feature sets supported or enabled Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal include/linux/ata.h | 9 --------- 1 file changed, 9 deletions(-) commit f7dd16486572691e9333d4ed461a48ab73859bb3 Author: Paul E. McKenney Date: Sun Sep 4 10:49:56 2022 -0700 torture: Make torture.sh create a properly formatted log file Currently, if the torture.sh allmodconfig step fails, this is counted as an error (as it should be), but there is also an extraneous complaint about a missing log file. This commit therefore adds that log file, which is hoped to reduce confused reactions to the error report. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/torture.sh | 32 ++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) commit cb0982e205e2368b5a5d148a6929fda735422727 Author: Paul E. McKenney Date: Tue Aug 30 11:52:13 2022 -0700 rcutorture: Avoid torture.sh compressing identical files Currently, torture.sh will compress the vmlinux files for KASAN and KCSAN runs. But it will compress all of the files, including those copied verbatim by the kvm-again.sh script. Compression takes around ten minutes, so this is not a good thing. This commit therefore compresses only one of a given set of identical vmlinux files, and then hard-links it to the directories produced by kvm-again.sh. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/torture.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 6cc9203b8e325d0ef21a7dc345d04fdb50b52a8a Author: Paul E. McKenney Date: Wed Sep 28 11:17:05 2022 -0700 arch/arm64: Add ARCH_HAS_NMI_SAFE_THIS_CPU_OPS Kconfig option The arm64 architecture uses either an LL/SC loop (old systems) or an LSE stadd instruction (new systems) to implement this_cpu_add(), both of which are NMI safe. This means that the old and more-efficient srcu_read_lock() may be used in NMI context, without the need for srcu_read_lock_nmisafe(). Therefore, add the new Kconfig option ARCH_HAS_NMI_SAFE_THIS_CPU_OPS to arch/arm64/Kconfig, which will cause NEED_SRCU_NMI_SAFE to be deselected, thus preserving the current srcu_read_lock() behavior. Link: https://lore.kernel.org/all/20220910221947.171557773@linutronix.de/ Suggested-by: Neeraj Upadhyay Suggested-by: Frederic Weisbecker Suggested-by: Boqun Feng Signed-off-by: Paul E. McKenney Cc: Catalin Marinas Cc: Will Deacon Cc: Thomas Gleixner Cc: John Ogness Cc: Petr Mladek Cc: arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 49f88c70edccf4c967697597e0b99072dc4007c2 Author: Paul E. McKenney Date: Wed Sep 28 11:11:18 2022 -0700 arch/x86: Add ARCH_HAS_NMI_SAFE_THIS_CPU_OPS Kconfig option The x86 architecture uses an add-to-memory instruction to implement this_cpu_add(), which is NMI safe. This means that the old and more-efficient srcu_read_lock() may be used in NMI context, without the need for srcu_read_lock_nmisafe(). Therefore, add the new Kconfig option ARCH_HAS_NMI_SAFE_THIS_CPU_OPS to arch/x86/Kconfig, which will cause NEED_SRCU_NMI_SAFE to be deselected, thus preserving the current srcu_read_lock() behavior. Link: https://lore.kernel.org/all/20220910221947.171557773@linutronix.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: John Ogness Cc: Petr Mladek Cc: arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 36f65f1d1553e35cd9e6b281271f40d639a128c3 Author: Paul E. McKenney Date: Tue Sep 20 14:54:41 2022 -0700 srcu: Check for consistent global per-srcu_struct NMI safety This commit adds runtime checks to verify that a given srcu_struct uses consistent NMI-safe (or not) read-side primitives globally, but based on the per-CPU data. These global checks are made by the grace-period code that must scan the srcu_data structures anyway, and are done only in kernels built with CONFIG_PROVE_RCU=y. Link: https://lore.kernel.org/all/20220910221947.171557773@linutronix.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: John Ogness Cc: Petr Mladek kernel/rcu/srcutree.c | 5 +++++ 1 file changed, 5 insertions(+) commit 27120e7d2c4d5c438b76f9c6330037a52ad0722e Author: Paul E. McKenney Date: Mon Sep 19 14:03:07 2022 -0700 srcu: Check for consistent per-CPU per-srcu_struct NMI safety This commit adds runtime checks to verify that a given srcu_struct uses consistent NMI-safe (or not) read-side primitives on a per-CPU basis. Link: https://lore.kernel.org/all/20220910221947.171557773@linutronix.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: John Ogness Cc: Petr Mladek include/linux/srcu.h | 12 ++++++------ include/linux/srcutree.h | 5 +++++ kernel/rcu/srcutree.c | 38 ++++++++++++++++++++++++++++++++------ 3 files changed, 43 insertions(+), 12 deletions(-) commit 2e83b879fb91dafe995967b46a1d38a5b0889242 Author: Paul E. McKenney Date: Thu Sep 15 14:29:07 2022 -0700 srcu: Create an srcu_read_lock_nmisafe() and srcu_read_unlock_nmisafe() On strict load-store architectures, the use of this_cpu_inc() by srcu_read_lock() and srcu_read_unlock() is not NMI-safe in TREE SRCU. To see this suppose that an NMI arrives in the middle of srcu_read_lock(), just after it has read ->srcu_lock_count, but before it has written the incremented value back to memory. If that NMI handler also does srcu_read_lock() and srcu_read_lock() on that same srcu_struct structure, then upon return from that NMI handler, the interrupted srcu_read_lock() will overwrite the NMI handler's update to ->srcu_lock_count, but leave unchanged the NMI handler's update by srcu_read_unlock() to ->srcu_unlock_count. This can result in a too-short SRCU grace period, which can in turn result in arbitrary memory corruption. If the NMI handler instead interrupts the srcu_read_unlock(), this can result in eternal SRCU grace periods, which is not much better. This commit therefore creates a pair of new srcu_read_lock_nmisafe() and srcu_read_unlock_nmisafe() functions, which allow SRCU readers in both NMI handlers and in process and IRQ context. It is bad practice to mix the existing and the new _nmisafe() primitives on the same srcu_struct structure. Use one set or the other, not both. Just to underline that "bad practice" point, using srcu_read_lock() at process level and srcu_read_lock_nmisafe() in your NMI handler will not, repeat NOT, work. If you do not immediately understand why this is the case, please review the earlier paragraphs in this commit log. [ paulmck: Apply kernel test robot feedback. ] [ paulmck: Apply feedback from Randy Dunlap. ] [ paulmck: Apply feedback from John Ogness. ] [ paulmck: Apply feedback from Frederic Weisbecker. ] Link: https://lore.kernel.org/all/20220910221947.171557773@linutronix.de/ Signed-off-by: Paul E. McKenney Acked-by: Randy Dunlap # build-tested Reviewed-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: John Ogness Cc: Petr Mladek arch/Kconfig | 3 +++ include/linux/srcu.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ kernel/rcu/Kconfig | 3 +++ kernel/rcu/rcutorture.c | 11 +++++++++-- kernel/rcu/srcutree.c | 43 +++++++++++++++++++++++++++++++++++++---- 5 files changed, 105 insertions(+), 6 deletions(-) commit 6407cf533217e09dfd895e64984c3f1ee3802373 Author: Tvrtko Ursulin Date: Thu Oct 20 14:08:41 2022 +0100 drm/i915/selftests: Stop using kthread_stop() Since a7c01fa93aeb ("signal: break out of wait loops on kthread_stop()") kthread_stop() started asserting a pending signal which wreaks havoc with a few of our selftests. Mainly because they are not fully expecting to handle signals, but also cutting the intended test runtimes short due signal_pending() now returning true (via __igt_timeout), which therefore breaks both the patterns of: kthread_run() ..sleep for igt_timeout_ms to allow test to exercise stuff.. kthread_stop() And check for errors recorded in the thread. And also: Main thread | Test thread ---------------+------------------------------ kthread_run() | kthread_stop() | do stuff until __igt_timeout | -- exits early due signal -- Where this kthread_stop() was assume would have a "join" semantics, which it would have had if not the new signal assertion issue. To recap, threads are now likely to catch a previously impossible ERESTARTSYS or EINTR, marking the test as failed, or have a pointlessly short run time. To work around this start using kthread_work(er) API which provides an explicit way of waiting for threads to exit. And for cases where parent controls the test duration we add explicit signaling which threads will now use instead of relying on kthread_should_stop(). Signed-off-by: Tvrtko Ursulin Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221020130841.3845791-1-tvrtko.ursulin@linux.intel.com .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 118 +++++----- drivers/gpu/drm/i915/gt/selftest_execlists.c | 48 ++-- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 51 +++-- drivers/gpu/drm/i915/selftests/i915_request.c | 252 +++++++++++++-------- 4 files changed, 281 insertions(+), 188 deletions(-) commit 03eababbf383e6340ef900c91315c97bd9cdd0b7 Author: Ville Syrjälä Date: Wed Oct 5 18:41:59 2022 +0300 drm/i915: s/HAS_BAR2_SMEM_STOLEN/HAS_LMEMBAR_SMEM_STOLEN/ The fact that LMEMBAR is BAR2 should be of no real interest to anyone. So use the name of the BAR rather than its index. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221005154159.18750-3-ville.syrjala@linux.intel.com Acked-by: Matthew Auld drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 14 +++++++------- drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) commit 2c3cdf5a8e06723b6ec76f04534fe1a33dd1a6d8 Author: Paul E. McKenney Date: Tue Oct 18 08:33:59 2022 -0700 doc: Update RCU's lockdep.rst This commit adds a couple of new functions to the documentation. Signed-off-by: Paul E. McKenney Documentation/RCU/lockdep.rst | 4 ++++ 1 file changed, 4 insertions(+) commit 06e6d1d6fdc0a7ae48e24f586632ee950249a935 Author: Paul E. McKenney Date: Sun Sep 11 02:57:47 2022 -0700 doc: Update listRCU.rst This commit updates listRCU.txt to reflect RCU additions and changes over the past few years. [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Paul E. McKenney Documentation/RCU/listRCU.rst | 174 +++++++++++++++++++++++++----------------- 1 file changed, 103 insertions(+), 71 deletions(-) commit 0492a34c832473190ff9bf65fd080b7fcb9a0af2 Author: Ville Syrjälä Date: Wed Oct 5 22:56:46 2022 +0300 drm/i915: Name our BARs based on the spec We use all kinds of weird names for our base address registers. Take the names from the spec and stick to them to avoid confusing everyone. The only exceptions are IOBAR and LMEMBAR since naming them IOBAR_BAR and LMEMBAR_BAR looks too funny, and yet I think that adding the _BAR to GTTMMADR & co. (which don't have one in the spec name) does make it more clear what they are. And IOBAR vs. GTTMMADR_BAR also looks a bit too inconsistent for my taste. v2: Fix gvt build v3: Add GEN2_IO_BAR for completeness Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221005195646.17201-1-ville.syrjala@linux.intel.com Acked-by: Matthew Auld drivers/gpu/drm/i915/display/intel_lpe_audio.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_ggtt.c | 12 ++++++------ drivers/gpu/drm/i915/gvt/cfg_space.c | 4 ++-- drivers/gpu/drm/i915/intel_pci_config.h | 24 +++++++++++++++++------- 4 files changed, 27 insertions(+), 17 deletions(-) commit 404971602898ab3517b077be08f34eda4af0a482 Author: Colin Ian King Date: Thu Oct 20 14:16:09 2022 +0100 staging: octeon: remove redundant variable total_freed The variable total_freed is accumulating skb_to_free however it is not being used after this. The use of total_freed is redundant and hence the variable can be removed. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221020131609.1546667-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-tx.c | 2 -- 1 file changed, 2 deletions(-) commit 31760f04cae2019b6eb4617af4409d8eaf0ac7ac Author: Danijel Korent Date: Sat Oct 15 18:50:23 2022 +0200 staging: rtl8192e: Added spaces around operators in rtl_cam.c/rtl_eeprom.c Fixed "spaces preferred around operator" type of problems reported by checkpatch Signed-off-by: Danijel Korent Link: https://lore.kernel.org/r/20221015165023.487200-1-danijel.korent@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 23 +++++++++++------------ drivers/staging/rtl8192e/rtl8192e/rtl_eeprom.c | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) commit e1445e7b003b2b2eace1145f58670200ddadd100 Author: Martin Kaiser Date: Sat Oct 15 17:11:15 2022 +0200 staging: r8188eu: summarize tx/rx and scan blinking Summarize the code for tx/rx blinking and for scan blinking in blink_work. The only difference is the delay for scheduling the next worker. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_led.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 126647d113dc6adf06cc4997ef8026f1972c34f7 Author: Martin Kaiser Date: Sat Oct 15 17:11:14 2022 +0200 staging: r8188eu: set two more state variables Set two more state variables in the blink worker when scan blinking and tx/rx blinking are finished. bLedBlinkInProgress is true during tx/rx blinking, bLedScanBlinkInProgress is true during scan blinking. If we doing neither of the two, we may safely set both variables to false. This change makes the scan and tx/rx cases almost identical, we are now ready to summarize the two cases. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_led.c | 2 ++ 1 file changed, 2 insertions(+) commit 1188cfa646ba2a7c295fe0cfac24529aec28ff2f Author: Martin Kaiser Date: Sat Oct 15 17:11:13 2022 +0200 staging: r8188eu: remove padapter from struct led_priv The only struct led_priv that's used in the r8188eu driver in embedded in the driver's global struct adapter. We can use container_of to access the "outer" structure, there's no need to store a pointer to it. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_led.c | 3 +-- drivers/staging/r8188eu/include/rtw_led.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) commit 5ecf2bb6b1f9659e79e99465c327bb97234bfdaf Author: Martin Kaiser Date: Sat Oct 15 17:11:12 2022 +0200 staging: r8188eu: don't include rtw_led.h from rtw_cmd.h The rtw_cmd.h does not need any definitions from the led layer, there's no reason to include rtw_led.h. When I tried to remove this component struct led_priv { struct adapter *padapter; ... I saw compiler errors because of this chain of include files: drv_types.h -> rtw_cmd.h -> rtw_led.h rtw_led.h uses struct adapter before it sees the definiton near the end of drv_types.h. (It seems that a simple struct adapter * prevents this problem.) The best option for fixing this issue is to not include rtw_led.h in rtw_cmd.h. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtw_cmd.h | 1 - 1 file changed, 1 deletion(-) commit 4fc4de550eb0fb47514ee0f37f9a0abd4d4bf2c9 Author: Martin Kaiser Date: Sat Oct 15 17:11:11 2022 +0200 staging: r8188eu: remove two unused defines The C2H_MEM_SZ and FREE_CMDOBJ_SZ defines are not used by the r8188eu driver. Remove them. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/rtw_cmd.h | 4 ---- 1 file changed, 4 deletions(-) commit 728a14bf8f1e095f6edddcf15f70c9307ec1f0ca Author: Martin Kaiser Date: Sat Oct 15 17:11:10 2022 +0200 staging: r8188eu: SwLedOff needs no padapter parameter Remove the padapter parameter from the SwLedOff function. padapter can be derived from the pLed parameter. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_led.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit c16a98833a9979c15febdc60a3ab5d00c72c1b5e Author: Martin Kaiser Date: Sat Oct 15 17:11:09 2022 +0200 staging: r8188eu: SwLedOn needs no padapter parameter Remove the padapter parameter from the SwLedOn function. padapter can be derived from the pLed parameter. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_led.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ef032c4fa43655715a39378d23cf3cc943cfdafa Author: Martin Kaiser Date: Sat Oct 15 17:11:08 2022 +0200 staging: r8188eu: fix status updates in SwLedOff Update bLedOn only if we could update the REG_LEDCFG2 register. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_led.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e5931b7ba5a9ccfea6e36f9f07eac89091782e9b Author: Martin Kaiser Date: Sat Oct 15 17:11:07 2022 +0200 staging: r8188eu: handle rtw_write8 errors in SwLedOn Check the status returned by rtw_write8. Update bLedOn only if we could update the REG_LEDCFG2 register. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_led.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 12c6223fc1804fd9295dc50d358294539b4a4184 Author: Martin Kaiser Date: Sat Oct 15 17:11:06 2022 +0200 staging: r8188eu: fix led register settings Using an InterTech DMG-02 dongle, the led remains on when the system goes into standby mode. After wakeup, it's no longer possible to control the led. It turned out that the register settings to enable or disable the led were not correct. They worked for some dongles like the Edimax V2 but not for others like the InterTech DMG-02. This patch fixes the register settings. Bit 3 in the led_cfg2 register controls the led status, bit 5 must always be set to be able to control the led, bit 6 has no influence on the led. Setting the mac_pinmux_cfg register is not necessary. These settings were tested with Edimax V2 and InterTech DMG-02. Cc: stable@vger.kernel.org Fixes: 8cd574e6af54 ("staging: r8188eu: introduce new hal dir for RTL8188eu driver") Suggested-by: Michael Straube Signed-off-by: Martin Kaiser Tested-by: Michael Straube # InterTech DMG-02, Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_led.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) commit 98703e4264afe64cbf2c5a4b6589d6e2a3068833 Author: Anjandev Momi Date: Fri Oct 14 01:18:40 2022 -0700 Staging: rtl8192e: add blank line after function declaration This patch removes the following check generated by checkpatch.pl ./drivers/staging/rtl8192e/rtl819x_BAProc.c:65: CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Anjandev Momi Link: https://lore.kernel.org/r/20221014081839.23902-5-anjan@momi.ca Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_BAProc.c | 1 + 1 file changed, 1 insertion(+) commit 2f618d1167b59dc7270be86f89819cf3417c192f Author: Anjandev Momi Date: Fri Oct 14 01:18:39 2022 -0700 Staging: rtl8192e: make alignment match open parenthesis This patch removes the following checks generated by checkpatch.pl: ./drivers/staging/rtl8192e/rtl819x_BAProc.c:261: CHECK: Alignment should match open parenthesis ./drivers/staging/rtl8192e/rtl819x_BAProc.c:284: CHECK: Alignment should match open parenthesis ./drivers/staging/rtl8192e/rtl819x_BAProc.c:421: CHECK: Alignment should match open parenthesis ./drivers/staging/rtl8192e/rtl819x_BAProc.c:441: CHECK: Alignment should match open parenthesis Signed-off-by: Anjandev Momi Link: https://lore.kernel.org/r/20221014081839.23902-4-anjan@momi.ca Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_BAProc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a079a4b2c9bc40b00cad01a1babf209acab1eea2 Author: Anjandev Momi Date: Fri Oct 14 01:18:38 2022 -0700 Staging: rtl8192e: remove multiple blank lines This patch removes the following checks generated by checkpatch.pl: ./drivers/staging/rtl8192e/rtl819x_BAProc.c:164: CHECK: Please don't use multiple blank lines ./drivers/staging/rtl8192e/rtl819x_BAProc.c:383: CHECK: Please don't use multiple blank lines Signed-off-by: Anjandev Momi Link: https://lore.kernel.org/r/20221014081839.23902-3-anjan@momi.ca Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_BAProc.c | 2 -- 1 file changed, 2 deletions(-) commit 92b81816d5f867c2b1017970786e0f50882a33f7 Author: Anjandev Momi Date: Fri Oct 14 01:18:37 2022 -0700 Staging: rtl8192e: remove unnecessary parentheses This patch removes the following CHECK generated by checkpatch.pl: ./drivers/staging/rtl8192e/rtl819x_BAProc.c:116: CHECK: Unnecessary parentheses around pBA->ba_start_seq_ctrl ./drivers/staging/rtl8192e/rtl819x_BAProc.c:261: CHECK: Unnecessary parentheses around '&pTS' ./drivers/staging/rtl8192e/rtl819x_BAProc.c:346: CHECK: Unnecessary parentheses around '&pTS' Signed-off-by: Anjandev Momi Link: https://lore.kernel.org/r/20221014081839.23902-2-anjan@momi.ca Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_BAProc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e2c532aadd86fd51ebde566e6af74b1eb1be89e0 Author: Martin Kaiser Date: Sat Oct 15 17:24:40 2022 +0200 staging: r8188eu: ignore_received_deauth is a boolean The ignore_received_deauth is in fact a boolean variable. Change its type to bool and use true, false for its values. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Acked-by: Pavel Skripkin Link: https://lore.kernel.org/r/20221015152440.232281-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 000848a511fc77b26864f2d95c8efa853e6bf82f Author: Martin Kaiser Date: Sat Oct 15 17:24:39 2022 +0200 staging: r8188eu: summarize two flags checks Summarize the two statements to check if either WIFI_FW_AUTH_STATE or WIFI_FW_ASSOC_STATE is set. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Acked-by: Pavel Skripkin Link: https://lore.kernel.org/r/20221015152440.232281-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6325d858c48d2fefe1c93da36f74b506d7abf71d Author: Martin Kaiser Date: Sat Oct 15 17:24:38 2022 +0200 staging: r8188eu: remove unnecessary return Remove the return statement at the end of the if branch. We can continue to the final return after the if-else. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Acked-by: Pavel Skripkin Link: https://lore.kernel.org/r/20221015152440.232281-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 -- 1 file changed, 2 deletions(-) commit ece8119070de777c7a1685211c8056a2ce6d3df8 Author: Martin Kaiser Date: Sat Oct 15 17:24:37 2022 +0200 staging: r8188eu: exit for deauth from unknown station If we receive a deauth message from an unknown station, we can drop this message and exit immediately. Reorder the code to make this clearer, don't wrap everything in an if statement. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Acked-by: Pavel Skripkin Link: https://lore.kernel.org/r/20221015152440.232281-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 094fbfbac3570345dbcb946dd2785bad03b680cf Author: Martin Kaiser Date: Sat Oct 15 17:24:36 2022 +0200 staging: r8188eu: get bssid from mgmt struct For management frames, Addr3 is the BSSID. Read it from the mgmt structure instead of calling GetAddr3Ptr. The pframe variable is now unused and can be removed. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Acked-by: Pavel Skripkin Link: https://lore.kernel.org/r/20221015152440.232281-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 15697b04e42e399f1c74d484f130859df756b1ae Author: Martin Kaiser Date: Sat Oct 15 17:24:35 2022 +0200 staging: r8188eu: use sa instead of Addr2 For management frames, Addr2 is the Source Address (SA). Use sa from the mgmt structure and remove the GetAddr2Ptr call. GetAddr2Ptr is a driver-specific function that we should eventually remove. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Acked-by: Pavel Skripkin Link: https://lore.kernel.org/r/20221015152440.232281-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ea03e32f51475f10ebf430fece7c3f8b8fa476b Author: Martin Kaiser Date: Sat Oct 15 17:24:34 2022 +0200 staging: r8188eu: clarify the bBusyTraffic assignment bBusyTraffic is set only if we're not in WIFI_AP_STATE, i.e. in the else branch. If we were not in WIFI_AP_STATE, we'd go into the if branch and return _SUCCESS before making it to the bBusyTraffic assignment. Move the assignment into the else branch to make this clearer. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Acked-by: Pavel Skripkin Link: https://lore.kernel.org/r/20221015152440.232281-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f54ded554f04cc0e7f5edcc571d9c09581f67312 Author: Martin Kaiser Date: Sat Oct 15 17:24:33 2022 +0200 staging: r8188eu: get reason code from mgmt struct Read the deauth reson code from the newly added mgmt structure instead of calculating the offset ourselves. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Acked-by: Pavel Skripkin Link: https://lore.kernel.org/r/20221015152440.232281-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5997186452ae29b535fd6cb65b4f5534b52ea25 Author: Martin Kaiser Date: Sat Oct 15 17:24:32 2022 +0200 staging: r8188eu: replace one GetAddr3Ptr call Define a struct ieee80211_mgmt for the message that we process in OnDeAuth. Use this struct to read the bssid. This patch removes one GetAddr3Ptr call, getting us a tiny step closer to removing GetAddr3Ptr. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Acked-by: Pavel Skripkin Link: https://lore.kernel.org/r/20221015152440.232281-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 06b764cf60877bdd6604c173963501e16236ccdf Author: Rigel Di Scala Date: Wed Oct 12 21:16:12 2022 +0000 Staging: rtl8192e: fix a brace style issue Fixed a coding style issue affecting a conditional if statement. Signed-off-by: Rigel Di Scala Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20221012211612.75871-1-zedr@zedr.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_BAProc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 04a5673391a5c56831f09b11a7735035e4a1ea62 Author: Rui Li Date: Wed Oct 12 22:36:33 2022 +0800 staging: rtl8192e: remove unnecessary braces for single statement blocks This commit cleans up checkpatch warning as follows: braces {} are not necessary for single statement blocks Signed-off-by: Rui Li Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/166558541522.9.15423282339326993462.68459319@lirui.org Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 3 +-- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 9 +++------ drivers/staging/rtl8192e/rtllib_softmac_wx.c | 3 +-- 3 files changed, 5 insertions(+), 10 deletions(-) commit ee9b7263a7d0d77198cec510e4a3e759dd85c65c Author: Yann Gautier Date: Wed Sep 21 18:03:34 2022 +0200 ARM: dts: stm32: add sdmmc cd-gpios for STM32MP135F-DK On STM32MP135F-DK, the SD card detect GPIO is GPIOH4. Signed-off-by: Yann Gautier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp135f-dk.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9adc341cdcf63a4343fdb8c45aa46cafcd8dffae Author: Dragan Cvetic Date: Mon Oct 10 20:04:57 2022 +0100 staging: rtl8192e: Rename Op, Length and Value Rename variable Op to op, Length to length and Value to value to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Dragan Cvetic Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20221010190457.13199-4-dragan.m.cvetic@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 6 +++--- drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 2122a86d426381069f279d9e6a71323cfc0da39f Author: Dragan Cvetic Date: Mon Oct 10 20:04:55 2022 +0100 staging: rtl8192e: Rename CurSTAConnectState and PreSTAConnectState Rename variable CurSTAConnectState to cur_sta_connect_state, PreSTAConnectState to pre_sta_connect_state to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Dragan Cvetic Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20221010190457.13199-2-dragan.m.cvetic@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 22 +++++++++++----------- drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) commit 6c2fb5dfb640ebc8b40a98b6c4337e9fb9f87ee3 Author: Dragan Cvetic Date: Mon Oct 10 20:02:51 2022 +0100 staging: rtl8192e: Remove single statement braces Remove braces around single line statement, to resolve checkpatch.pl warnings "braces {} are not necessary for single statement blocks" Signed-off-by: Dragan Cvetic Link: https://lore.kernel.org/r/20221010190252.12402-1-dragan.m.cvetic@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit b860ce04ac409386e4261931525ac3b3ac1758e1 Author: Colin Ian King Date: Fri Oct 7 21:29:41 2022 +0100 staging: sm750fb: Kconfig: Fix spelling mistake "accelearion" -> "acceleration" There is a spelling mistake in a Kconfig description. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221007202941.2756304-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9e57cc302f33fcbcd12fe9cca6213d520e0537c Author: Emily Peri Date: Wed Oct 19 19:10:53 2022 -0700 staging: rtl8723bs: remove unnecessary parenthesis Remove extra parenthesis in conditional statement in rtw_ioctl_set. Issue found by checkpatch. Signed-off-by: Emily Peri Link: https://lore.kernel.org/r/a08a440eabddd8e78d045ca9898a415d81f6f6d7.1666230736.git.eperi1024@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1850f1598d4a991289628487648e17f2631e37df Author: Emily Peri Date: Wed Oct 19 19:10:52 2022 -0700 staging: rtl8723bs: align block comment stars Align '*' on each line of block comment in rtw_ioctl_set. Issue found by checkpatch. Signed-off-by: Emily Peri Link: https://lore.kernel.org/r/3d9738edd0992b72bf8fc8a05706a490772b5317.1666230736.git.eperi1024@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit dcf478ab1566ceb6c7796b3830bd340e50bb3f73 Author: Emily Peri Date: Wed Oct 19 12:31:10 2022 -0700 staging: rtl8723bs: Removed extra tabs in conditional statements checkpatch found extra tabs in two conditional statements in rtw_ieee80211.c. Should be one tab instead of two. Signed-off-by: Emily Peri Link: https://lore.kernel.org/r/Y1BQfiwOXzAZpCCa@marshmallow Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0fd4d8b7e87e472d54fdb4912703c1c09d12ac70 Author: Colin Ian King Date: Tue Oct 4 16:35:39 2022 +0100 staging: rtl8723bs: Remove redundant initialization of variable efuseValue The variable efuseValue is being initialized with a value that is never read. The variable is being re-assigned later on. The initialization is redundant and can be removed. Cleans up warning: drivers/staging/rtl8723bs/core/rtw_efuse.c:285:6: warning: variable 'efuseValue' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221004153539.150867-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_efuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c21899dcab317de9007e65dbf218400782ee064c Author: Colin Ian King Date: Tue Oct 4 16:09:44 2022 +0100 staging: rtl8192u: Fix spelling mistake athros -> Atheros and fix grammer There is a spellig mistake, correct it and fix capital letter on the proper noun. Also fix the grammar. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221004150944.148157-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c55f29446d175049700bdfb41a8d30fa67640d15 Author: Michael Straube Date: Sun Oct 2 16:35:44 2022 +0200 staging: r8188eu: convert rtw_free_drv_sw() to void The function rtw_free_drv_sw() always returns _SUCCESS. None of its callers use the return value. Convert the return type of that function from u8 to void. This is part of getting rid of _FAIL / _SUCCESS. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221002143544.7974-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/osdep_intf.h | 2 +- drivers/staging/r8188eu/os_dep/os_intfs.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit a609750c8bf0e29060862f2f232f775129c31593 Author: Michael Straube Date: Sun Oct 2 16:35:43 2022 +0200 staging: r8188eu: convert rtw_reset_drv_sw() to void The function rtw_reset_drv_sw() always returns _SUCCESS. None of its callers use the return value. Convert the return type of that function from u8 to void. This is part of getting rid of _FAIL / _SUCCESS. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221002143544.7974-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/osdep_intf.h | 2 +- drivers/staging/r8188eu/os_dep/os_intfs.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit fd692ab4c511a4dd5685e9e34e4ee69ddc362675 Author: Michael Straube Date: Sun Oct 2 09:48:27 2022 +0200 staging: r8188eu: convert _rtw_init_sta_priv() to common error logic Convert the function _rtw_init_sta_priv() to common kernel error logic. Return 0 on success and negative value on failure. This is part of getting rid of returning _SUCCESS and _FAIL which uses inverted error logic and is used all over the driver. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221002074827.8566-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_sta_mgt.c | 6 +++--- drivers/staging/r8188eu/include/sta_info.h | 2 +- drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 40b3f62227d46d21eab71832e331e3aa740b1b34 Author: Michael Straube Date: Sun Oct 2 09:48:26 2022 +0200 staging: r8188eu: convert rtw_init_mlme_priv() to common error logic Convert the function rtw_init_mlme_priv() to common kernel error logic. Return 0 on success and negative value on failure. This is part of getting rid of returning _SUCCESS and _FAIL which uses inverted error logic and is used all over the driver. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221002074827.8566-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_mlme.c | 12 ++++-------- drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) commit d4fda24757678311ff0a219bd150a3c3aeb6a2f8 Author: Michael Straube Date: Sun Oct 2 09:48:25 2022 +0200 staging: r8188eu: convert rtw_init_cmd_priv() to common error logic Convert the function rtw_init_cmd_priv() to common kernel error logic. Return 0 on success and negative value on failure. This is part of getting rid of returning _SUCCESS and _FAIL which uses inverted error logic and is used all over the driver. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221002074827.8566-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_cmd.c | 8 ++++---- drivers/staging/r8188eu/include/rtw_cmd.h | 2 +- drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit ef2a2422ab86d99e0bfd940c38c60b77c9ad9954 Author: Michael Straube Date: Sun Oct 2 09:48:24 2022 +0200 staging: r8188eu: convert rtw_init_evt_priv() to common error logic Convert the function rtw_init_evt_priv() to common kernel error logic. Return 0 on success and negative value on failure. This is part of getting rid of returning _SUCCESS and _FAIL which uses inverted error logic and is used all over the driver. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221002074827.8566-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_cmd.c | 8 +++----- drivers/staging/r8188eu/include/rtw_cmd.h | 2 +- drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) commit 11247c998b00298e9b621f3121380494146c40ff Author: Michael Straube Date: Sun Oct 2 09:48:23 2022 +0200 staging: r8188eu: merge odm_types.h into other headers The macros SET_TX_DESC_ANTSEL_{A,B,C}_88E are used in odm_RTL8188E.c. Move them from odm_types.h to odm_RTL8188E.h. ODM_CE is used in places where also ODM_ITRF_USB is used in the code. Move the ODM_CE define to the header that defines ODM_ITRF_USB. While at it remove an extra space between '#' and 'define ODM_ITRF_USB'. The haeder odm_types.h is now empty and we can remove it. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221002074827.8566-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/include/odm.h | 3 ++- drivers/staging/r8188eu/include/odm_RTL8188E.h | 7 +++++++ drivers/staging/r8188eu/include/odm_types.h | 16 ---------------- drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 - 4 files changed, 9 insertions(+), 18 deletions(-) commit 753def95543cf1a01f5487c0ae8cce3ee5180d77 Author: Philipp Hortmann Date: Sat Oct 1 11:41:38 2022 +0200 staging: rtl8192e: Remove unused variable bDriverIsGoingToUnload bDriverIsGoingToUnload is never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/48a84cbe359f159cc9c296b261256a405ee3884e.1664616227.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 --- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - 2 files changed, 4 deletions(-) commit 93057f8354462708e9721ad6ff6a2294a5ae8a98 Author: Philipp Hortmann Date: Sat Oct 1 11:41:31 2022 +0200 staging: rtl8192e: Remove unused variable ScanDelay ScanDelay is never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/13d0b993d077490c65768f2b11a631a447f8e86f.1664616227.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 -- 3 files changed, 4 deletions(-) commit eda244c081e60a576eecaf635205c4fa5dc9032f Author: Philipp Hortmann Date: Sat Oct 1 11:41:24 2022 +0200 staging: rtl8192e: Remove unused variable bForcedSilentReset bForcedSilentReset is never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/10504e628eae110d73cd43050e7cc5801ce7f17b.1664616227.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ---- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - 2 files changed, 5 deletions(-) commit ec437736505f4ba1152730d8c0ec3d0167bb358b Author: Philipp Hortmann Date: Sat Oct 1 11:41:18 2022 +0200 staging: rtl8192e: Remove unchanged variable bDisableNormalResetCheck bDisableNormalResetCheck is just once initialized with false. All evaluations will result in !false. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/026313f17cf708bf8fa0661f83b2c2b515e55b12.1664616227.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 ++---- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) commit 20401e6c6a59f56d9235756168f620e7bffbae26 Author: Philipp Hortmann Date: Sat Oct 1 11:41:10 2022 +0200 staging: rtl8192e: Remove unchanged variable RegRfOff RegRfOff is just once initialized with false and then set to false again. All evaluations will result in false. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/fa306d364b43fee7b81f5289309e93bb6fccdba5.1664616227.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 7 +------ drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 -- 4 files changed, 1 insertion(+), 10 deletions(-) commit 11dc999d77e4c76deb353d9923e783cdc16c3a7d Author: Philipp Hortmann Date: Sat Oct 1 11:41:04 2022 +0200 staging: rtl8192e: Remove unused variable isRFOff isRFOff is just once initialized and changed but never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/53242638126775f6698fdcfc49ac552a4e08578b.1664616227.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 1 - 3 files changed, 3 deletions(-) commit 697541a0e53d16a12b00ffa4c9d204b275e68053 Author: Philipp Hortmann Date: Sat Oct 1 11:40:56 2022 +0200 staging: rtl8192e: Remove unused variable bInPowerSaveMode bInPowerSaveMode is just once initialized and changed but never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/be3ebecd88b85ba1d87b9b3fbe02f2e78e6a669e.1664616227.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 2 -- 3 files changed, 4 deletions(-) commit 3700c365b6b204eb6d76dac7312fc3bb21faa350 Author: Philipp Hortmann Date: Sat Oct 1 11:40:49 2022 +0200 staging: rtl8192e: Remove unused variable bIPSModeBackup bIPSModeBackup is just once initialized and never used. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/657035f84d266fd5c6f96e9b530a96c2ab4ff900.1664616227.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtllib.h | 1 - 2 files changed, 2 deletions(-) commit e77996261369bb5b202d3739270fcc5bc50c5c91 Author: Philipp Hortmann Date: Sat Oct 1 11:40:36 2022 +0200 staging: rtl8192e: Remove unchanged variable bInactivePs bInactivePs is just once initialized and never changed. The evaluation will always have the same result. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/9f46eebf8220a06a1889eaf2d6bac74dd08cfd1f.1664616227.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 18 +++++----- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 49 ++++++++++++---------------- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 48 +++++++++++++-------------- drivers/staging/rtl8192e/rtllib.h | 2 -- 5 files changed, 51 insertions(+), 67 deletions(-) commit 85eba7ac39f7e86a2b473aae9d664f9ef47cad2c Author: Philipp Hortmann Date: Sat Oct 1 11:40:29 2022 +0200 staging: rtl8192e: Remove unchanged variable bFwCtrlLPS bFwCtrlLPS is just once initialized and never changed. The evaluation will always have the same result. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/d5b5cfd26648180d082f38085a807c932e87703c.1664616227.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 15 ++++----------- drivers/staging/rtl8192e/rtllib.h | 3 --- 3 files changed, 4 insertions(+), 15 deletions(-) commit febdb8eea98b1c506cf8624531a334e507c4a771 Author: Martin Kaiser Date: Sat Oct 1 19:06:18 2022 +0200 staging: r8188eu: remove bLedLinkBlinkInProgress Remove the bLedLinkBlinkInProgress component from struct led_priv. Its only use is to block requests for "link blinking" when this blinking pattern is already active. The "link blinking" pattern is a continuous blinking pattern (as opposed to other patterns where we blink N times), it's no problem to restart this pattern when it's already running. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221001170618.444444-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman drivers/staging/r8188eu/core/rtw_led.c | 14 -------------- drivers/staging/r8188eu/include/rtw_led.h | 1 - 2 files changed, 15 deletions(-) commit fd22186003a98daaab1ea08aaa177c041fdaa649 Author: Deepak R Varma Date: Mon Oct 17 12:02:30 2022 +0530 staging: iio: frequency: ad9834: merge unnecessary split lines Improve code readability by merging unnecessary split lines that are well within the code-style guidelines post merge. Signed-off-by: Deepak R Varma Acked-by: Julia Lawall Link: https://lore.kernel.org/r/Y0z2/qFe3kW96MTs@debian-BULLSEYE-live-builder-AMD64 Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/frequency/ad9834.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0c04b83d95e02c9def6e2db49fc2cab618faf949 Author: Tanjuate Brunostar Date: Tue Oct 18 12:01:54 2022 +0000 staging: rts5208: split long line of code Fix checkpatch warning by splitting up a long line of code, improving code readability Signed-off-by: Tanjuate Brunostar Acked-by: Julia Lawall Link: https://lore.kernel.org/r/Y06Vsr7JVvpPem5T@elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit de3ee3f63400a23954e7c1ad1cb8c20f29ab6fe3 Author: Mickaël Salaün Date: Fri Sep 9 12:39:01 2022 +0200 selftests: Use optional USERCFLAGS and USERLDFLAGS This change enables to extend CFLAGS and LDFLAGS from command line, e.g. to extend compiler checks: make USERCFLAGS=-Werror USERLDFLAGS=-static USERCFLAGS and USERLDFLAGS are documented in Documentation/kbuild/makefiles.rst and Documentation/kbuild/kbuild.rst This should be backported (down to 5.10) to improve previous kernel versions testing as well. Cc: Shuah Khan Cc: stable@vger.kernel.org Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20220909103901.1503436-1-mic@digikod.net Signed-off-by: Shuah Khan tools/testing/selftests/lib.mk | 5 +++++ 1 file changed, 5 insertions(+) commit 5bfcff516c89c57be6cd90af1d64529a51228ac1 Author: Ville Syrjälä Date: Wed Oct 5 18:41:57 2022 +0300 drm/i915: Extract intel_mmio_bar() We have the same code to determine the MMIO BAR in two places. Collect it to a single place. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221005154159.18750-1-ville.syrjala@linux.intel.com Reviewed-by: Matthew Auld drivers/gpu/drm/i915/gt/intel_gt.c | 2 +- drivers/gpu/drm/i915/i915_pci.c | 4 +--- drivers/gpu/drm/i915/intel_pci_config.h | 8 ++++++++ 3 files changed, 10 insertions(+), 4 deletions(-) commit c9adc3bd1180d2911d2b1b886dbec916805be998 Author: Rob Herring Date: Fri Oct 14 15:51:04 2022 -0500 dt-bindings: Remove "status" from schema examples, again There's no reason to have "status" properties in examples. "okay" is the default, and "disabled" turns off some schema checks ('required' specifically). A meta-schema check for this is pending, so hopefully the last time to fix these. Fix the indentation in intel,phy-thunderbay-emmc while we're here. Acked-by: Nicolas Ferre Acked-by: Thierry Reding Acked-by: Jonathan Cameron #for-iio Reviewed-by: Krzysztof Kozlowski Acked-By: Vinod Koul Link: https://lore.kernel.org/r/20221014205104.2822159-1-robh@kernel.org Signed-off-by: Rob Herring .../bindings/arm/tegra/nvidia,tegra-ccplex-cluster.yaml | 1 - .../bindings/display/tegra/nvidia,tegra124-dpaux.yaml | 1 - .../bindings/display/tegra/nvidia,tegra186-display.yaml | 2 -- .../devicetree/bindings/iio/addac/adi,ad74413r.yaml | 1 - Documentation/devicetree/bindings/net/cdns,macb.yaml | 1 - Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml | 1 - .../bindings/phy/intel,phy-thunderbay-emmc.yaml | 15 +++++++-------- 7 files changed, 7 insertions(+), 15 deletions(-) commit daf405c8b9b93388295dec07391798039d0f5c26 Author: Jiri Kosina Date: Thu Oct 20 13:42:38 2022 +0200 HID: mcp2221: fix usage of tmp variable in mcp2221_raw_event() In mcp2221_raw_event(), 'tmp' is used only conditionally. Move the declaration into the conditional block in order to prevent unused variable warning. Reported-by: kernel test robot Fixes: 960f9df7c620 ("HID: mcp2221: add ADC/DAC support via iio subsystem") Signed-off-by: Jiri Kosina drivers/hid/hid-mcp2221.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit dbf53a29b28b277fa952a000245b558536c6bdd7 Author: Borislav Petkov Date: Wed Oct 19 18:59:45 2022 +0200 x86/paravirt: Fix a !PARAVIRT build warning Fix ./include/trace/events/xen.h:28:31: warning: ‘enum paravirt_lazy_mode’ \ declared inside parameter list will not be visible outside of this definition or declaration which turns into a build error: ./include/trace/events/xen.h:28:50: error: parameter 1 (‘mode’) has incomplete type 28 | TP_PROTO(enum paravirt_lazy_mode mode), \ due to enum paravirt_lazy_mode being visible only under CONFIG_PARAVIRT. Just pull it up where it is unconditionally visible. Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/Y1AtAXM8YjtBm2cj@zn.tnic arch/x86/include/asm/paravirt_types.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 04ba8747e1329fa9e274b4634d792f811a3b0677 Author: Juergen Gross Date: Tue Oct 4 10:10:09 2022 +0200 x86/mtrr: Remove unused cyrix_set_all() function The Cyrix CPU specific MTRR function cyrix_set_all() will never be called as the mtrr_ops->set_all() callback will only be called in the use_intel() case, which would require the use_intel_if member of struct mtrr_ops to be set, which isn't the case for Cyrix. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221004081023.32402-3-jgross@suse.com arch/x86/kernel/cpu/mtrr/cyrix.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) commit a293e8ec82790aea77168a7e56e846a4411a7271 Merge: 4881bda5ea05 6258234129b0 Author: Takashi Iwai Date: Thu Oct 20 15:36:31 2022 +0200 Merge branch 'topic/hda-ext-cleanup' into for-next Signed-off-by: Takashi Iwai commit 1e3d21a5b3a4e7af3ed5fa3772c221cb8c284df5 Author: Ankit Nautiyal Date: Tue Oct 11 12:04:41 2022 +0530 drm/i915/dp: Remove whitespace at the end of function. Remove extraline left after intel_dp_configure_protocol_converter. Signed-off-by: Ankit Nautiyal Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221011063447.904649-3-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 1 - 1 file changed, 1 deletion(-) commit 47e1a59e60c688c5f95b67277202f05b7e84c189 Author: Ankit Nautiyal Date: Tue Oct 11 12:04:40 2022 +0530 drm/i915/dp: Reset frl trained flag before restarting FRL training For cases where DP has HDMI2.1 sink and FRL Link issues are detected, reset the flag to state FRL trained status before restarting FRL training. Fixes: 9488a030ac91 ("drm/i915: Add support for enabling link status and recovery") Cc: Swati Sharma Cc: Ankit Nautiyal Cc: Uma Shankar (v2) Cc: Jani Nikula Signed-off-by: Ankit Nautiyal Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221011063447.904649-2-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 2 ++ 1 file changed, 2 insertions(+) commit 6258234129b013c534fa10abaf08751b2401b22b Author: Pierre-Louis Bossart Date: Wed Oct 19 11:21:15 2022 -0500 ALSA/ASoC: hda: move SPIB/DRMS functionality from ext layer The SPIB and DRMS capabilities are orthogonal to the DSP enablement and can be used whether the stream is coupled or not. The existing code partitioning makes limited sense, the capabilities are parsed at the sound/hda level but helpers are located in sound/hda/ext. This patch moves all the SPIB/DRMS functionality to the sound/hda layer. This reduces the complexity of the sound/hda/ext layer which is now limited to handling the multi-link extensions and stream coupling/decoupling helpers. Note that this is an iso-functionality code move and rename, the HDaudio legacy driver would need additional changes to make use of these capabilities. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20221019162115.185917-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai include/sound/hdaudio.h | 26 ++++++ include/sound/hdaudio_ext.h | 34 -------- sound/hda/ext/hdac_ext_stream.c | 139 --------------------------------- sound/hda/hdac_stream.c | 136 ++++++++++++++++++++++++++++++++ sound/soc/intel/avs/loader.c | 16 ++-- sound/soc/intel/skylake/skl-messages.c | 6 +- sound/soc/intel/skylake/skl-pcm.c | 17 ++-- sound/soc/sof/intel/hda-pcm.c | 3 +- sound/soc/sof/intel/hda-stream.c | 16 ++-- 9 files changed, 190 insertions(+), 203 deletions(-) commit f90025100fb50552a8281becd8f26aab065d4c31 Author: Pierre-Louis Bossart Date: Wed Oct 19 11:21:14 2022 -0500 ALSA: hda: hdac_ext_controller: remove useless loop commit 0b00a5615dc40 ("ALSA: hdac_ext: add hdac extended controller") introduced a for() loop on the number of HDaudio codecs that seems completely useless. a) the body of the loop does not make use of the loop index, and b) the LSDIID register is related to the SDI line, so there can only be one codec per multi-link descriptor. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20221019162115.185917-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai sound/hda/ext/hdac_ext_controller.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 26646c199b8cd0be66200fba3fd176c043c25761 Author: Pierre-Louis Bossart Date: Wed Oct 19 11:21:13 2022 -0500 ALSA: hda: ext: reduce ambiguity between 'multi-link' and 'link' DMA My esteemed colleagues keep using the same words for different things. The multi-link structure needs to be handled whether the DSP is enabled or not. The host and link DMAs are only relevant when the DSP is enabled. Things get convoluted when there's an ambiguity between the LOSIDV settings in the multi-link register space and the selection of the stream_tag for the link DMA. Clarify with a rename that the static functions used are related to the host and link DMAs only. No functionality change, pure rename. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221019162115.185917-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai sound/hda/ext/hdac_ext_stream.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7fa403f2a0f4a9f0fd0e0e0f472dab60f632f06e Author: Pierre-Louis Bossart Date: Wed Oct 19 11:21:12 2022 -0500 ALSA/ASoC: hda: ext: add 'bus' prefix for multi-link stream setting All the helpers dealing with multi-link configurations are located in the hdac_ext_controller.c, except the two set/clear routines that modify the LOSIDV registers. For consistency, move the two helpers and add the 'bus' prefix. One could argue that the 'ml' prefix might be more relevant but that would be a larger code change. No functionality change, just move and rename. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221019162115.185917-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai include/sound/hdaudio_ext.h | 8 ++++---- sound/hda/ext/hdac_ext_controller.c | 24 ++++++++++++++++++++++++ sound/hda/ext/hdac_ext_stream.c | 24 ------------------------ sound/soc/intel/avs/pcm.c | 4 ++-- sound/soc/intel/skylake/skl-pcm.c | 6 +++--- sound/soc/sof/intel/hda-dai.c | 6 +++--- 6 files changed, 36 insertions(+), 36 deletions(-) commit 00b6cd957d665aad5e86f019961089842c7a6ae4 Author: Pierre-Louis Bossart Date: Wed Oct 19 11:21:11 2022 -0500 ALSA/ASoC: hda: ext: remove 'link' prefix for stream-related operations We should only use 'link' in the context of multi-link configurations. Streams are configured from a different register space and are not dependent on link except for LOSIDV settings. Not functionality change, just pure rename. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221019162115.185917-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai include/sound/hdaudio_ext.h | 8 ++++---- sound/hda/ext/hdac_ext_stream.c | 28 ++++++++++++++-------------- sound/soc/intel/avs/pcm.c | 8 ++++---- sound/soc/intel/skylake/skl-pcm.c | 8 ++++---- sound/soc/sof/intel/hda-dai.c | 16 ++++++++-------- 5 files changed, 34 insertions(+), 34 deletions(-) commit 7f05ca9a7467f05b8703b37bdc1ddddd0e9f8876 Author: Pierre-Louis Bossart Date: Wed Oct 19 11:21:10 2022 -0500 ALSA/ASoC: hda: ext: add 'ext' prefix to snd_hdac_link_free_all No functionality change, just prefix addition to clearly identify that the helper only applies to the 'ext' part for Intel platforms. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221019162115.185917-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai include/sound/hdaudio_ext.h | 2 +- sound/hda/ext/hdac_ext_controller.c | 6 +++--- sound/soc/intel/avs/core.c | 2 +- sound/soc/intel/skylake/skl.c | 2 +- sound/soc/sof/intel/hda.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit b0cd60f3e9f53209bb4f443ae8b4e92057517efc Author: Pierre-Louis Bossart Date: Wed Oct 19 11:21:09 2022 -0500 ALSA/ASoC: hda: clarify bus_get_link() and bus_link_get() helpers We have two helpers with confusing names and different purposes. Rename bus_get_link() and bus_get_link_at() as bus_get_hlink_by_name() and bus_get_hlink_by_addr() respectively. No functionality change Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221019162115.185917-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai include/sound/hdaudio_ext.h | 6 +++--- sound/hda/ext/hdac_ext_controller.c | 24 ++++++++++++------------ sound/soc/codecs/hda.c | 4 ++-- sound/soc/codecs/hdac_hda.c | 6 +++--- sound/soc/codecs/hdac_hdmi.c | 8 ++++---- sound/soc/intel/avs/pcm.c | 4 ++-- sound/soc/intel/skylake/skl-pcm.c | 4 ++-- sound/soc/sof/intel/hda-dai.c | 4 ++-- 8 files changed, 30 insertions(+), 30 deletions(-) commit 7f1e16ae4864a0140adee41d94b923bcd6b8198f Author: Pierre-Louis Bossart Date: Wed Oct 19 11:21:08 2022 -0500 ASoC: SOF: Intel: hda-dai: use hlink variable/parameter Follow the convention and use hlink for consistency. No functionality change. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221019162115.185917-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai sound/soc/sof/intel/hda-dai.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit eebaa6b0c2844f854519ce86241605111277ea17 Author: Pierre-Louis Bossart Date: Wed Oct 19 11:21:07 2022 -0500 ALSA: hda: ext: hda_ext_controller: use hlink variable/parameter Follow the convention and use hlink for consistency. No functionality change. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221019162115.185917-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai include/sound/hdaudio_ext.h | 16 ++++++------- sound/hda/ext/hdac_ext_controller.c | 48 ++++++++++++++++++------------------- 2 files changed, 32 insertions(+), 32 deletions(-) commit 056b6ccc9d74136a106922f72b26eeef23af2ce8 Author: Pierre-Louis Bossart Date: Wed Oct 19 11:21:06 2022 -0500 ALSA: hda: ext: hdac_ext_controller: use helpers in loop No need to copy/paste code, use helper instead. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221019162115.185917-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai sound/hda/ext/hdac_ext_controller.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 99d18d42c942854a073191714a311dc2420ec7d3 Author: Dmitry Torokhov Date: Mon Oct 17 22:41:11 2022 -0700 gpiolib: of: add a quirk for reset line polarity for Himax LCDs Existing DTS that use legacy (non-standard) property name for the reset line "gpios-reset" also specify incorrect polarity (0 which maps to "active high"). Add a quirk to force polarity to "active low" so that once driver is converted to gpiod API that pays attention to line polarity it will work properly. Reviewed-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit b02c85c9458cdd15e2c43413d7d2541a468cde57 Author: Dmitry Torokhov Date: Mon Oct 17 22:41:10 2022 -0700 gpiolib: of: add quirk for phy reset polarity for Freescale Ethernet Bindings for Freescale Fast Ethernet Controller use a separate property "phy-reset-active-high" to specify polarity of its phy gpio line. To allow converting the driver to gpiod API we need to add this quirk to gpiolib. Reviewed-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit e3186e36925fc18384492491ebcf3da749780a30 Author: Dmitry Torokhov Date: Mon Oct 17 22:41:09 2022 -0700 gpiolib: of: factor out code overriding gpio line polarity There are several instances where we use a separate property to override polarity specified in gpio property. Factor it out into a separate function. Reviewed-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 48 +++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) commit 92b57842f43014e6ca81ddf6d5d59e9ddf762e12 Author: Ian Kent Date: Tue Oct 18 10:32:49 2022 +0800 kernfs: dont take i_lock on revalidate In kernfs_dop_revalidate() when the passed in dentry is negative the dentry directory is checked to see if it has changed and if so the negative dentry is discarded so it can refreshed. During this check the dentry inode i_lock is taken to mitigate against a possible concurrent rename. But if it's racing with a rename, becuase the dentry is negative, it can't be the source it must be the target and it must be going to do a d_move() otherwise the rename will return an error. In this case the parent dentry of the target will not change, it will be the same over the d_move(), only the source dentry parent may change so the inode i_lock isn't needed. Cc: Tejun Heo Signed-off-by: Ian Kent Link: https://lore.kernel.org/r/166606036967.13363.9336408133975631967.stgit@donald.themaw.net Signed-off-by: Greg Kroah-Hartman fs/kernfs/dir.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit aa1d058d48f292aa138e33ad12b7b4d18b5407cd Author: Ian Kent Date: Tue Oct 18 10:32:42 2022 +0800 kernfs: dont take i_lock on inode attr read The kernfs write lock is held when the kernfs node inode attributes are updated. Therefore, when either kernfs_iop_getattr() or kernfs_iop_permission() are called the kernfs node inode attributes won't change. Consequently concurrent kernfs_refresh_inode() calls always copy the same values from the kernfs node. So there's no need to take the inode i_lock to get consistent values for generic_fillattr() and generic_permission(), the kernfs read lock is sufficient. Cc: Tejun Heo Signed-off-by: Ian Kent Link: https://lore.kernel.org/r/166606036215.13363.1288735296954908554.stgit@donald.themaw.net Signed-off-by: Greg Kroah-Hartman fs/kernfs/inode.c | 4 ---- 1 file changed, 4 deletions(-) commit eaf1a29665cda1c767cac0d523828892bd77a842 Author: Dmitry Torokhov Date: Mon Oct 17 22:41:08 2022 -0700 gpiolib: of: add a quirk for legacy names in MOXA ART RTC The driver is using non-standard "gpio-rtc-data", "gpio-rtc-sclk", and "gpio-rtc-reset" names for properties describing its gpios. In preparation to converting to the standard naming ("rtc-*-gpios") and switching the driver to gpiod API add a quirk to gpiolib to keep compatibility with existing DTSes. Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 5 +++++ 1 file changed, 5 insertions(+) commit 944004eb56dc977ad5f882ca4338f45396052317 Author: Dmitry Torokhov Date: Mon Oct 17 22:41:07 2022 -0700 gpiolib: of: add a quirk for reset line for Cirrus CS42L56 codec The controller is using non-standard "cirrus,gpio-nreset" name for its reset gpio property, whereas gpiod API expects "-gpios". Add a quirk so that gpiod API will still work on unmodified DTSes. Reviewed-by: Daniel Thompson Reviewed-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 3 +++ 1 file changed, 3 insertions(+) commit 9c2cc7171e08eef52110d272fdf2225d6dcd81b6 Author: Dmitry Torokhov Date: Mon Oct 17 22:41:06 2022 -0700 gpiolib: of: add a quirk for reset line for Marvell NFC controller The controller is using non-standard "reset-n-io" name for its reset gpio property, whereas gpiod API expects "-gpios". Add a quirk so that gpiod API will still work on unmodified DTSes. Reviewed-by: Daniel Thompson Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fbbbcd177a27508a47c5136b31de5cf4c8d0ab1c Author: Dmitry Torokhov Date: Mon Oct 17 22:41:05 2022 -0700 gpiolib: of: add quirk for locating reset lines with legacy bindings Some legacy mappings used "gpio[s]-reset" instead of "reset-gpios", add a quirk so that gpiod API will still work on unmodified DTSes. Reviewed-by: Daniel Thompson Reviewed-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 307c593ba5f915e308fd23a2daae7e9a5209b604 Author: Dmitry Torokhov Date: Mon Oct 17 22:41:04 2022 -0700 gpiolib: of: tighten selection of gpio renaming quirks Tighten selection of legacy gpio renaming quirks so that they only considered on more relevant configurations. Suggested-by: Daniel Thompson Reviewed-by: Daniel Thompson Reviewed-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit b311c5cba779a87e85525d351965bbd2c18111de Author: Dmitry Torokhov Date: Mon Oct 17 22:41:03 2022 -0700 gpiolib: of: consolidate simple renames into a single quirk This consolidates all quirks doing simple renames (either allowing suffix-less names or trivial renames, when index changes are not required) into a single quirk. Reviewed-by: Daniel Thompson Reviewed-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 183 ++++++++++++++++++---------------------------- 1 file changed, 71 insertions(+), 112 deletions(-) commit 326c3753a6358ffab607749ea0aa95d1d0ad79b0 Author: Dmitry Torokhov Date: Mon Oct 17 22:41:02 2022 -0700 gpiolib: of: add a quirk for legacy names in Mediatek mt2701-cs42448 The driver is using non-standard "i2s1-in-sel-gpio1" and "i2s1-in-sel-gpio2" names to describe its gpios. In preparation to converting to the standard naming (i2s1-in-sel-gpios) and switching the driver to gpiod API add a quirk to gpiolib to keep compatibility with existing DTSes. Reviewed-by: Daniel Thompson Reviewed-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 8e40612f6146da1333e9bb5cfd9af7511c063d93 Author: Jia He Date: Mon Oct 10 02:35:54 2022 +0000 EDAC/ghes: Add a notifier for reporting memory errors In order to make it a proper module and disentangle it from facilities, add a notifier for reporting memory errors. Use an atomic notifier because calls sites like ghes_proc_in_irq() run in interrupt context. [ bp: Massage commit message. ] Suggested-by: Borislav Petkov Signed-off-by: Jia He Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221010023559.69655-3-justin.he@arm.com drivers/acpi/apei/ghes.c | 16 +++++++++++++++- drivers/edac/ghes_edac.c | 19 +++++++++++++++++-- include/acpi/ghes.h | 10 +++------- 3 files changed, 35 insertions(+), 10 deletions(-) commit 5012524eb051fccbb9f8729f0de1df7b7783333b Author: Jia He Date: Mon Oct 10 02:35:53 2022 +0000 efi/cper: Export several helpers for ghes_edac to use Before ghes_edac can be turned back into a proper module again, export several helpers which are going to be used by it. Signed-off-by: Jia He Signed-off-by: Borislav Petkov Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20221010023559.69655-2-justin.he@arm.com drivers/firmware/efi/cper.c | 3 +++ 1 file changed, 3 insertions(+) commit e9f696f88b8de4cfea8e284be91fa3ea2a631731 Author: Michał Winiarski Date: Thu Oct 20 10:21:35 2022 +0200 drm/plane_helper: Split into parameterized test cases The test was constructed as a single function (test case) which checks multiple conditions, calling the function that is tested multiple times with different arguments. This usually means that it can be easily converted into multiple test cases. Split igt_check_plane_state into two parameterized test cases, drm_check_plane_state and drm_check_invalid_plane_state. Passing output: ============================================================ ============== drm_plane_helper (2 subtests) =============== ================== drm_check_plane_state =================== [PASSED] clipping_simple [PASSED] clipping_rotate_reflect [PASSED] positioning_simple [PASSED] upscaling [PASSED] downscaling [PASSED] rounding1 [PASSED] rounding2 [PASSED] rounding3 [PASSED] rounding4 ============== [PASSED] drm_check_plane_state ============== ============== drm_check_invalid_plane_state =============== [PASSED] positioning_invalid [PASSED] upscaling_invalid [PASSED] downscaling_invalid ========== [PASSED] drm_check_invalid_plane_state ========== ================ [PASSED] drm_plane_helper ================= ============================================================ Testing complete. Ran 12 tests: passed: 12 v2: Add missing EXPECT/ASSERT (Maíra) v3: Use single EXPECT insted of condition + KUNIT_FAILURE (Maíra) v4: Rebase after "drm_test" rename Signed-off-by: Michał Winiarski Reviewed-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221020082135.779872-2-michal.winiarski@intel.com drivers/gpu/drm/tests/drm_plane_helper_test.c | 467 +++++++++++++++----------- 1 file changed, 269 insertions(+), 198 deletions(-) commit d74c1b461f3d02fe1c3816dec7642caba2581c35 Author: Michał Winiarski Date: Thu Oct 20 10:21:34 2022 +0200 drm/plane_helper: Print actual/expected values on failure Currently the values are printed with debug log level. Adjust the log level and link the output with the test by using kunit_err. Example output: foo: dst: 20x20+10+10, expected: 10x10+0+0 foo: EXPECTATION FAILED at drivers/gpu/drm/tests/drm_plane_helper_test.c:85 Signed-off-by: Michał Winiarski Reviewed-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221020082135.779872-1-michal.winiarski@intel.com drivers/gpu/drm/tests/drm_plane_helper_test.c | 78 +++++++++++++++------------ 1 file changed, 44 insertions(+), 34 deletions(-) commit 5033ac5c580cb22245a0c2b9e53d508e8fdd50d8 Author: Greg Kroah-Hartman Date: Sat Oct 1 18:51:28 2022 +0200 USB: make devnode() callback in usb_class_driver take a const * With the changes to the driver core to make more pointers const, the USB subsystem also needs to be modified to take a const * for the devnode callback so that the driver core's constant pointer will also be properly propagated. Cc: Benjamin Tissoires Cc: Juergen Stuber Reviewed-by: Johan Hovold Acked-by: Pete Zaitcev Reviewed-by: Jiri Kosina Link: https://lore.kernel.org/r/20221001165128.2688526-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman drivers/hid/usbhid/hiddev.c | 2 +- drivers/usb/class/usblp.c | 2 +- drivers/usb/misc/iowarrior.c | 2 +- drivers/usb/misc/legousbtower.c | 2 +- include/linux/usb.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 593efa4091f5f05c224f8b7fd204d18dbff97e31 Author: Greg Kroah-Hartman Date: Sun Oct 16 12:41:55 2022 +0200 USB: allow some usb functions to take a const pointer. The functions to_usb_interface(), to_usb_device, and interface_to_usbdev() sometimes would like to take a const * and return a const * back. As we are doing pointer math, a call to container_of() loses the const-ness of a pointer, so use a _Generic() macro to pick the proper inline function to call instead. Link: https://lore.kernel.org/r/20221016104155.1260201-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman include/linux/usb.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) commit 7ebe49b76a001b10b007193b1771f33e6cbc4f3f Author: Greg Kroah-Hartman Date: Sun Oct 16 12:41:26 2022 +0200 driver core: allow kobj_to_dev() to take a const pointer If a const * to a kobject is passed to kobj_to_dev(), we want to return back a const * to a device as the driver core shouldn't be modifying a constant structure. But when dealing with container_of() the pointer const attribute is cast away, so we need to manually handle this by determining the type of the pointer passed in to know the type of the pointer to pass out. Luckily _Generic can do this type of magic, and as the kernel now supports C11 it is availble to us to handle this type of build-time type detection. Cc: "Rafael J. Wysocki" Reviewed-by: Sakari Ailus Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221016104126.1259809-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman include/linux/device.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit a6375fd791cd38b005ade9da0fb85367bdfaf731 Merge: acff76fa45b4 0c9f92a4b795 Author: Marc Kleine-Budde Date: Thu Oct 20 12:01:03 2022 +0200 Merge patch series "can: gs_usb: new features: GS_CAN_FEATURE_GET_STATE, GS_CAN_FEATURE_BERR_REPORTING" Marc Kleine-Budde says: this series targets the gs_us driver. First there are some cleanup patches by me, followed by now 4 patches by Jeroen Hofstee's. These patches are based on the venus-5.19.4-gsusb branch of his Linux repository and add 2 new features (GS_CAN_FEATURE_GET_STATE, GS_CAN_FEATURE_BERR_REPORTING) to the driver. Changes since v2: https://lore.kernel.org/all/20221019213035.1607752-1-mkl@pengutronix.de - 7/7: add missing endianness conversion Changes since v1: https://lore.kernel.org/all/20221006162452.200322-1-mkl@pengutronix.de - added Jeroen's S-o-b to patches 4...7 - split former "[PATCH 4/6] can: gs_usb: add ability to enable / disable berr rerporting" into 2 patches, fix subject, update patch description Changes since venus-5.19.4-gsusb: https://github.com/jhofstee/linux/tree/venus-5.19.4-gsusb - fixed 2nd parameter of usb_control_msg_recv() - rebased to current net-next/main - renumbered the FEATURE, MODE and BREQ bits, as termination support landed mainline first - split GS_CAN_FEATURE_GET_STATE patch into documentation and implementation part - added Not-Signed-off-by: tag, as these patches are not Signed-off yet Link: https://lore.kernel.org/all/20221019221016.1659260-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 0c9f92a4b795a68c005ebe215f31b2ad7838b9ea Author: Jeroen Hofstee Date: Sun Aug 28 12:25:02 2022 +0200 can: gs_usb: add support for reading error counters Add support for reading the device state and CAN error counters, using the GS_USB_BREQ_GET_STATE control message, if supported by the device, indicated by the GS_CAN_FEATURE_GET_STATE feature flag. Signed-off-by: Jeroen Hofstee Link: https://lore.kernel.org/all/20221019221016.1659260-8-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 40e1997d4551e6053fc2f61959628da474775dc5 Author: Jeroen Hofstee Date: Sun Aug 28 12:25:02 2022 +0200 can: gs_usb: document GS_CAN_FEATURE_GET_STATE Document the new feature ("GS_CAN_FEATURE_GET_STATE") that indicates that the state of the CAN controller can be queried with the new GS_USB_BREQ_GET_STATE control message. Signed-off-by: Jeroen Hofstee Link: https://lore.kernel.org/all/20221019221016.1659260-7-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2f3cdad1c616891ab25ce10c1ac146403605b960 Author: Jeroen Hofstee Date: Sun Aug 28 10:59:10 2022 +0200 can: gs_usb: add ability to enable / disable berr reporting The open source firmware candleLight report bus errors unconditionally. This adds support to enable / disable bus error reporting with the standard netlink property. Signed-off-by: Jeroen Hofstee Link: https://lore.kernel.org/all/20221019221016.1659260-6-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1f1835264d81da03fcd05646542a622678b379d6 Author: Jeroen Hofstee Date: Sun Aug 28 10:59:10 2022 +0200 can: gs_usb: document GS_CAN_FEATURE_BERR_REPORTING Document the new feature ("GS_CAN_FEATURE_BERR_REPORTING") that indicates that the bus error reporting in the CAN controller can switched on and off with the GS_CAN_MODE_BERR_REPORTING mode bit in the GS_USB_BREQ_MODE control message. Signed-off-by: Jeroen Hofstee Link: https://lore.kernel.org/all/20221019221016.1659260-5-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ac3f25824e4f9be1b36cc8f20572fa32b3079f94 Author: Marc Kleine-Budde Date: Thu Sep 29 10:02:06 2022 +0200 can: gs_usb: gs_can_open(): merge setting of timestamp flags and init Merge the bodies of 2 consecutive "if (dev->feature & GS_CAN_FEATURE_HW_TIMESTAMP)" statements. Link: https://lore.kernel.org/all/20221019221016.1659260-4-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f6adf410f70b6875ba6412e8909c742c3853201d Author: Marc Kleine-Budde Date: Thu Sep 29 10:01:22 2022 +0200 can: gs_usb: gs_can_open(): sort checks for ctrlmode Sort the checks for dev->can.ctrlmode by values of CAN_CTRLMODE_*, so that it's clear where to add new checks. While there, remove the comment that the Atmel UC3C hardware doesn't support One Shot Mode. The One Shot mode is only available and to be activated by the user, if the device specifies the feature bit GS_CAN_FEATURE_ONE_SHOT. Link: https://lore.kernel.org/all/20221019221016.1659260-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit deb8534e8ef3905b5a977486d11d4d36b4f94347 Author: Marc Kleine-Budde Date: Thu Sep 29 09:58:30 2022 +0200 can: gs_usb: gs_can_open(): allow loopback and listen only at the same time There's no reason why loopback and listen only should not be allowed at the same time. Replace the "else if" by "if" to reflect this in the code. Link: https://lore.kernel.org/all/20221019221016.1659260-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit acff76fa45b487a9dd7573a6f4d34daca6f0c045 Author: Marc Kleine-Budde Date: Fri Sep 30 15:59:41 2022 +0200 can: gs_usb: gs_make_candev(): set netdev->dev_id The gs_usb driver supports USB devices with more than 1 CAN channel. Set the "netdev->dev_id" to distinguish between channels in user space. Link: https://lore.kernel.org/all/20221007075418.213403-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 1 + 1 file changed, 1 insertion(+) commit b1419cbebf5d7a1e236b6886750697eadefcb1d7 Author: Marc Kleine-Budde Date: Sun Sep 18 21:06:53 2022 +0200 can: gs_usb: mention candleLight as supported device To make it easier for new users to find the correct driver for candleLight compatible CAN-USB devices mention candleLight in the driver's Kconfig input prompt. Link: https://lore.kernel.org/all/20221019205037.1600936-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/Kconfig | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit f5071d9e729dd3e563097949ba828ffa38629947 Author: Vivek Yadav Date: Tue Oct 18 10:03:33 2022 +0530 can: m_can: m_can_handle_bus_errors(): add support for handling DLEC error on CAN-FD frames When a frame in CAN FD format has reached the data phase, the next CAN event (error or valid frame) will be shown in DLEC. Utilize the dedicated flag (Data Phase Last Error Code: DLEC flag) to determine the type of last error that occurred in the data phase of a CAN-FD frame and handle the bus errors. Signed-off-by: Vivek Yadav Link: https://lore.kernel.org/all/20221018081934.1336690-1-mkl@pengutronix.de Reviewed-by: Chandrasekar Ramakrishnan Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 6a8836e3c24a9f854d502b41584cf3f9765e950c Author: Marc Kleine-Budde Date: Wed Oct 12 09:38:42 2022 +0200 can: m_can: is_lec_err(): clean up LEC error handling The PSR register contains among other the error for the CAN arbitration phase (LEC bits) and CAN data phase (DLEC bits). Prepare is_lec_err() to be called with the (D)LEC value only instead of the whole PSR register. While there rename LEC_UNUSED to LEC_NO_CHANGE to match the latest M_CAN reference manual. Link: https://lore.kernel.org/all/20221019211611.1605764-1-mkl@pengutronix.de Reviewed-by: Chandrasekar Ramakrishnan Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 15 ++++++++------- drivers/net/can/m_can/m_can.h | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) commit 36875a063b5e3618b42f7bace850473bb88a7c24 Author: Kees Cook Date: Tue Oct 18 02:28:27 2022 -0700 net: ipa: Proactively round up to kmalloc bucket size Instead of discovering the kmalloc bucket size _after_ allocation, round up proactively so the allocation is explicitly made for the full size, allowing the compiler to correctly reason about the resulting size of the buffer through the existing __alloc_size() hint. Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Reviewed-by: Alex Elder Link: https://lore.kernel.org/lkml/4d75a9fd-1b94-7208-9de8-5a0102223e68@ieee.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221018092724.give.735-kees@kernel.org Signed-off-by: Paolo Abeni drivers/net/ipa/gsi_trans.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0a26bde2c9db9817e2b4c0f890236f78d4d8ed7c Author: Christian Brauner Date: Thu Sep 22 17:17:27 2022 +0200 acl: remove a slew of now unused helpers Now that the posix acl api is active we can remove all the hacky helpers we had to keep around for all these years and also remove the set and get posix acl xattr handler methods as they aren't needed anymore. Signed-off-by: Christian Brauner (Microsoft) fs/posix_acl.c | 363 +++------------------------------------- fs/xattr.c | 5 +- include/linux/posix_acl_xattr.h | 20 --- 3 files changed, 23 insertions(+), 365 deletions(-) commit 39a6497a9bbb760c3c26a1bef7a0ab0b9fdefd9f Author: Christian Brauner Date: Thu Sep 22 17:17:26 2022 +0200 9p: use stub posix acl handlers Now that 9p supports the get and set acl inode operations and the vfs has been switched to the new posi api, 9p can simply rely on the stub posix acl handlers. The custom xattr handlers and associated unused helpers can be removed. Signed-off-by: Christian Brauner (Microsoft) fs/9p/acl.c | 121 ---------------------------------------------------------- fs/9p/xattr.c | 7 ++-- fs/9p/xattr.h | 2 - 3 files changed, 4 insertions(+), 126 deletions(-) commit c39c07fce78439dfb0665b294753716297389179 Author: Christian Brauner Date: Thu Sep 22 17:17:25 2022 +0200 cifs: use stub posix acl handlers Now that cifs supports the get and set acl inode operations and the vfs has been switched to the new posi api, cifs can simply rely on the stub posix acl handlers. The custom xattr handlers and associated unused helpers can be removed. Signed-off-by: Christian Brauner (Microsoft) fs/cifs/cifsproto.h | 8 -- fs/cifs/cifssmb.c | 298 ---------------------------------------------------- fs/cifs/xattr.c | 68 +----------- 3 files changed, 4 insertions(+), 370 deletions(-) commit 200afb77cde7e51364d4a8b3e176f4797a3b5ec7 Author: Christian Brauner Date: Thu Sep 22 17:17:24 2022 +0200 ovl: use stub posix acl handlers Now that ovl supports the get and set acl inode operations and the vfs has been switched to the new posi api, ovl can simply rely on the stub posix acl handlers. The custom xattr handlers and associated unused helpers can be removed. Signed-off-by: Christian Brauner (Microsoft) fs/overlayfs/super.c | 101 ++------------------------------------------------- 1 file changed, 4 insertions(+), 97 deletions(-) commit 04af28faae6760514f0302aa9db561e60ee53a20 Author: Christian Brauner Date: Thu Sep 22 17:17:23 2022 +0200 ecryptfs: use stub posix acl handlers Now that ecryptfs supports the get and set acl inode operations and the vfs has been switched to the new posi api, ecryptfs can simply rely on the stub posix acl handlers. Signed-off-by: Christian Brauner (Microsoft) fs/ecryptfs/inode.c | 4 ++++ 1 file changed, 4 insertions(+) commit e10796b87e1d1bad593c89c5e8cc2e0992bd1335 Author: Christian Brauner Date: Thu Sep 22 17:17:15 2022 +0200 evm: remove evm_xattr_acl_change() The security and integrity infrastructure has dedicated hooks now so evm_xattr_acl_change() is dead code. Before this commit the callchain was: evm_protect_xattr() -> evm_xattr_change() -> evm_xattr_acl_change() where evm_protect_xattr() was hit from evm_inode_setxattr() and evm_inode_removexattr(). But now we have evm_inode_set_acl() and evm_inode_remove_acl() and have switched over the vfs to rely on the posix acl api so the code isn't hit anymore. Suggested-by: Paul Moore Signed-off-by: Christian Brauner (Microsoft) security/integrity/evm/evm_main.c | 64 --------------------------------------- 1 file changed, 64 deletions(-) commit 318e66856ddec05384f32d60b5598128289f4e7b Author: Christian Brauner Date: Thu Sep 22 17:17:22 2022 +0200 xattr: use posix acl api In previous patches we built a new posix api solely around get and set inode operations. Now that we have all the pieces in place we can switch the system calls and the vfs over to only rely on this api when interacting with posix acls. This finally removes all type unsafety and type conversion issues explained in detail in [1] that we aim to get rid of. With the new posix acl api we immediately translate into an appropriate kernel internal struct posix_acl format both when getting and setting posix acls. This is a stark contrast to before were we hacked unsafe raw values into the uapi struct that was stored in a void pointer relying and having filesystems and security modules hack around in the uapi struct as well. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/internal.h | 20 ++++++++++++++++++++ fs/posix_acl.c | 37 +++++++++++++++++++++++++++++++++++++ fs/xattr.c | 31 ++++++++++++++++++++----------- include/linux/posix_acl_xattr.h | 10 ++++++++-- 4 files changed, 85 insertions(+), 13 deletions(-) commit 31acceb97500dd6e9105526301d76488cd6ca21c Author: Christian Brauner Date: Thu Sep 22 17:17:21 2022 +0200 ovl: use posix acl api Now that posix acls have a proper api us it to copy them. All filesystems that can serve as lower or upper layers for overlayfs have gained support for the new posix acl api in previous patches. So switch all internal overlayfs codepaths for copying posix acls to the new posix acl api. Acked-by: Miklos Szeredi Signed-off-by: Christian Brauner (Microsoft) fs/overlayfs/copy_up.c | 38 ++++++++++++++++++++++++++++++++++++++ fs/overlayfs/dir.c | 20 ++------------------ fs/overlayfs/inode.c | 4 ++-- fs/overlayfs/overlayfs.h | 8 ++++++++ fs/overlayfs/super.c | 6 ++---- fs/xattr.c | 6 ------ include/linux/xattr.h | 6 ++++++ 7 files changed, 58 insertions(+), 30 deletions(-) commit 0e641857322f4d0a99aec3f49b21b732f3bb5ef9 Author: Christian Brauner Date: Thu Sep 22 17:17:20 2022 +0200 ovl: implement set acl method The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. In order to build a type safe posix api around get and set acl we need all filesystem to implement get and set acl. Now that we have added get and set acl inode operations that allow easy access to the dentry we give overlayfs it's own get and set acl inode operations. The set acl inode operation is duplicates most of the ovl posix acl xattr handler. The main difference being that the set acl inode operation relies on the new posix acl api. Once the vfs has been switched over the custom posix acl xattr handler will be removed completely. Note, until the vfs has been switched to the new posix acl api this patch is a non-functional change. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Acked-by: Miklos Szeredi Signed-off-by: Christian Brauner (Microsoft) fs/overlayfs/dir.c | 1 + fs/overlayfs/inode.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/overlayfs/overlayfs.h | 17 +++++++++ 3 files changed, 112 insertions(+) commit 6c0a8bfb84af8f3d1960e6905eace59d6488d270 Author: Christian Brauner Date: Thu Sep 22 17:17:19 2022 +0200 ovl: implement get acl method The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. In order to build a type safe posix api around get and set acl we need all filesystem to implement get and set acl. Now that we have added get and set acl inode operations that allow easy access to the dentry we give overlayfs it's own get and set acl inode operations. Since overlayfs is a stacking filesystem it will use the newly added posix acl api when retrieving posix acls from the relevant layer. Since overlayfs can also be mounted on top of idmapped layers. If idmapped layers are used overlayfs must take the layer's idmapping into account after it retrieved the posix acls from the relevant layer. Note, until the vfs has been switched to the new posix acl api this patch is a non-functional change. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/overlayfs/dir.c | 3 +- fs/overlayfs/inode.c | 109 +++++++++++++++++++++++++++++++++-------------- fs/overlayfs/overlayfs.h | 17 +++++++- 3 files changed, 95 insertions(+), 34 deletions(-) commit 86c261b9eb4ce0a4ae189c0317cd8eddb8302d5a Author: Christian Brauner Date: Thu Sep 22 17:17:18 2022 +0200 ecryptfs: implement set acl method The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. In order to build a type safe posix api around get and set acl we need all filesystem to implement get and set acl. So far ecryptfs didn't implement get and set acl inode operations because it wanted easy access to the dentry. Now that we extended the set acl inode operation to take a dentry argument and added a new get acl inode operation that takes a dentry argument we can let ecryptfs implement get and set acl inode operations. Note, until the vfs has been switched to the new posix acl api this patch is a non-functional change. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/ecryptfs/inode.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit af84016f1cfe78b23c8efbf6ba5c3c660d52a9ee Author: Christian Brauner Date: Thu Sep 22 17:17:17 2022 +0200 ecryptfs: implement get acl method The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. In order to build a type safe posix api around get and set acl we need all filesystem to implement get and set acl. So far ecryptfs didn't implement get and set acl inode operations because it wanted easy access to the dentry. Now that we extended the set acl inode operation to take a dentry argument and added a new get acl inode operation that takes a dentry argument we can let ecryptfs implement get and set acl inode operations. Note, until the vfs has been switched to the new posix acl api this patch is a non-functional change. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/ecryptfs/inode.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b82784a2f52a7a2a5491d36f0c257cf64d87abb5 Author: Christian Brauner Date: Thu Sep 22 17:17:16 2022 +0200 ksmbd: use vfs_remove_acl() The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. Now that we've switched all filesystems that can serve as the lower filesystem for ksmbd we can switch ksmbd over to rely on the posix acl api. Note that this is orthogonal to switching the vfs itself over. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/ksmbd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aeb7f00542af48ac63e448de46d672cfd79a7069 Author: Christian Brauner Date: Thu Sep 22 17:17:14 2022 +0200 acl: add vfs_remove_acl() In previous patches we implemented get and set inode operations for all non-stacking filesystems that support posix acls but didn't yet implement get and/or set acl inode operations. This specifically affected cifs and 9p. Now we can build a posix acl api based solely on get and set inode operations. We add a new vfs_remove_acl() api that can be used to set posix acls. This finally removes all type unsafety and type conversion issues explained in detail in [1] that we aim to get rid of. After we finished building the vfs api we can switch stacking filesystems to rely on the new posix api and then finally switch the xattr system calls themselves to rely on the posix acl api. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/posix_acl.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/evm.h | 13 ++++++++++ include/linux/posix_acl.h | 8 ++++++ 3 files changed, 86 insertions(+) commit 4f353ba4a9f42ad283dc6afdd84dae0b1d294842 Author: Christian Brauner Date: Thu Sep 22 17:17:13 2022 +0200 acl: add vfs_get_acl() In previous patches we implemented get and set inode operations for all non-stacking filesystems that support posix acls but didn't yet implement get and/or set acl inode operations. This specifically affected cifs and 9p. Now we can build a posix acl api based solely on get and set inode operations. We add a new vfs_get_acl() api that can be used to get posix acls. This finally removes all type unsafety and type conversion issues explained in detail in [1] that we aim to get rid of. After we finished building the vfs api we can switch stacking filesystems to rely on the new posix api and then finally switch the xattr system calls themselves to rely on the posix acl api. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/posix_acl.c | 129 +++++++++++++++++++++++++++++++++++++--- include/linux/posix_acl.h | 9 +++ include/linux/posix_acl_xattr.h | 10 ++++ 3 files changed, 141 insertions(+), 7 deletions(-) commit e4cc9163032fed6ff27dd03325ddc54f88863a24 Author: Christian Brauner Date: Thu Sep 22 17:17:06 2022 +0200 acl: add vfs_set_acl() In previous patches we implemented get and set inode operations for all non-stacking filesystems that support posix acls but didn't yet implement get and/or set acl inode operations. This specifically affected cifs and 9p. Now we can build a posix acl api based solely on get and set inode operations. We add a new vfs_set_acl() api that can be used to set posix acls. This finally removes all type unsafety and type conversion issues explained in detail in [1] that we aim to get rid of. After we finished building the vfs api we can switch stacking filesystems to rely on the new posix api and then finally switch the xattr system calls themselves to rely on the posix acl api. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/posix_acl.c | 107 ++++++++++++++++++++++++++++++++++++++++ include/linux/posix_acl.h | 10 ++++ include/linux/posix_acl_xattr.h | 10 ++++ 3 files changed, 127 insertions(+) commit 56851bc9b9f072dd738f25ed29c0d5abe9f2908b Author: Christian Brauner Date: Thu Sep 29 10:47:36 2022 +0200 internal: add may_write_xattr() Split out the generic checks whether an inode allows writing xattrs. Since security.* and system.* xattrs don't have any restrictions and we're going to split out posix acls into a dedicated api we will use this helper to check whether we can write posix acls. Signed-off-by: Christian Brauner (Microsoft) fs/internal.h | 1 + fs/xattr.c | 43 ++++++++++++++++++++++++++++++------------- 2 files changed, 31 insertions(+), 13 deletions(-) commit a56df5d5b7ca6d79c3cdef32401380e60c0928b1 Author: Christian Brauner Date: Wed Sep 28 13:34:00 2022 +0200 evm: add post set acl hook The security_inode_post_setxattr() hook is used by security modules to update their own security.* xattrs. Consequently none of the security modules operate on posix acls. So we don't need an additional security hook when post setting posix acls. However, the integrity subsystem wants to be informed about posix acl changes in order to reset the EVM status flag. -> evm_inode_post_setxattr() -> evm_update_evmxattr() -> evm_calc_hmac() -> evm_calc_hmac_or_hash() and evm_cacl_hmac_or_hash() walks the global list of protected xattr names evm_config_xattrnames. This global list can be modified via /sys/security/integrity/evm/evm_xattrs. The write to "evm_xattrs" is restricted to security.* xattrs and the default xattrs in evm_config_xattrnames only contains security.* xattrs as well. So the actual value for posix acls is currently completely irrelevant for evm during evm_inode_post_setxattr() and frankly it should stay that way in the future to not cause the vfs any more headaches. But if the actual posix acl values matter then evm shouldn't operate on the binary void blob and try to hack around in the uapi struct anyway. Instead it should then in the future add a dedicated hook which takes a struct posix_acl argument passing the posix acls in the proper vfs format. For now it is sufficient to make evm_inode_post_set_acl() a wrapper around evm_inode_post_setxattr() not passing any actual values down. This will cause the hashes to be updated as before. Reviewed-by: Paul Moore Signed-off-by: Christian Brauner (Microsoft) include/linux/evm.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit e61b135f7bfe47f547fb566328a97ca8baa3548c Author: Christian Brauner Date: Thu Sep 22 17:17:10 2022 +0200 integrity: implement get and set acl hook The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. So far posix acls were passed as a void blob to the security and integrity modules. Some of them like evm then proceed to interpret the void pointer and convert it into the kernel internal struct posix acl representation to perform their integrity checking magic. This is obviously pretty problematic as that requires knowledge that only the vfs is guaranteed to have and has lead to various bugs. Add a proper security hook for setting posix acls and pass down the posix acls in their appropriate vfs format instead of hacking it through a void pointer stored in the uapi format. I spent considerate time in the security module and integrity infrastructure and audited all codepaths. EVM is the only part that really has restrictions based on the actual posix acl values passed through it (e.g., i_mode). Before this dedicated hook EVM used to translate from the uapi posix acl format sent to it in the form of a void pointer into the vfs format. This is not a good thing. Instead of hacking around in the uapi struct give EVM the posix acls in the appropriate vfs format and perform sane permissions checks that mirror what it used to to in the generic xattr hook. IMA doesn't have any restrictions on posix acls. When posix acls are changed it just wants to update its appraisal status to trigger an EVM revalidation. The removal of posix acls is equivalent to passing NULL to the posix set acl hooks. This is the same as before through the generic xattr api. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Acked-by: Paul Moore (LSM) Signed-off-by: Christian Brauner (Microsoft) include/linux/evm.h | 23 ++++++++++ include/linux/ima.h | 24 ++++++++++ security/integrity/evm/evm_main.c | 83 ++++++++++++++++++++++++++++++++++- security/integrity/ima/ima_appraise.c | 9 ++++ security/security.c | 21 ++++++++- 5 files changed, 157 insertions(+), 3 deletions(-) commit 44faac01cd0afbf6d3f1e41918fb85daecfcb8a6 Author: Christian Brauner Date: Thu Sep 22 17:17:09 2022 +0200 smack: implement get, set and remove acl hook The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. So far posix acls were passed as a void blob to the security and integrity modules. Some of them like evm then proceed to interpret the void pointer and convert it into the kernel internal struct posix acl representation to perform their integrity checking magic. This is obviously pretty problematic as that requires knowledge that only the vfs is guaranteed to have and has lead to various bugs. Add a proper security hook for setting posix acls and pass down the posix acls in their appropriate vfs format instead of hacking it through a void pointer stored in the uapi format. I spent considerate time in the security module infrastructure and audited all codepaths. Smack has no restrictions based on the posix acl values passed through it. The capability hook doesn't need to be called either because it only has restrictions on security.* xattrs. So these all becomes very simple hooks for smack. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Reviewed-by: Casey Schaufler Reviewed-by: Paul Moore Signed-off-by: Christian Brauner (Microsoft) security/smack/smack_lsm.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 1bdeb21862299c79fc80e7f44eb1b611c4c9c0b2 Author: Christian Brauner Date: Thu Sep 22 17:17:08 2022 +0200 selinux: implement get, set and remove acl hook The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. So far posix acls were passed as a void blob to the security and integrity modules. Some of them like evm then proceed to interpret the void pointer and convert it into the kernel internal struct posix acl representation to perform their integrity checking magic. This is obviously pretty problematic as that requires knowledge that only the vfs is guaranteed to have and has lead to various bugs. Add a proper security hook for setting posix acls and pass down the posix acls in their appropriate vfs format instead of hacking it through a void pointer stored in the uapi format. I spent considerate time in the security module infrastructure and audited all codepaths. SELinux has no restrictions based on the posix acl values passed through it. The capability hook doesn't need to be called either because it only has restrictions on security.* xattrs. So these are all fairly simply hooks for SELinux. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Acked-by: Paul Moore Signed-off-by: Christian Brauner (Microsoft) security/selinux/hooks.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 72b3897e78107c54e3e5a98bdb316dafcd818f97 Author: Christian Brauner Date: Thu Sep 22 17:17:07 2022 +0200 security: add get, remove and set acl hook The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. So far posix acls were passed as a void blob to the security and integrity modules. Some of them like evm then proceed to interpret the void pointer and convert it into the kernel internal struct posix acl representation to perform their integrity checking magic. This is obviously pretty problematic as that requires knowledge that only the vfs is guaranteed to have and has lead to various bugs. Add a proper security hook for setting posix acls and pass down the posix acls in their appropriate vfs format instead of hacking it through a void pointer stored in the uapi format. In the next patches we implement the hooks for the few security modules that do actually have restrictions on posix acls. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Acked-by: Paul Moore Signed-off-by: Christian Brauner (Microsoft) include/linux/lsm_hook_defs.h | 6 ++++++ include/linux/lsm_hooks.h | 12 ++++++++++++ include/linux/security.h | 29 +++++++++++++++++++++++++++++ security/security.c | 25 +++++++++++++++++++++++++ 4 files changed, 72 insertions(+) commit 079da629383ea960dfa0615e18d51d8bd121bd0c Author: Christian Brauner Date: Thu Sep 22 17:17:05 2022 +0200 9p: implement set acl method The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. In order to build a type safe posix api around get and set acl we need all filesystem to implement get and set acl. So far 9p implemented a ->get_inode_acl() operation that didn't require access to the dentry in order to allow (limited) permission checking via posix acls in the vfs. Now that we have get and set acl inode operations that take a dentry argument we can give 9p get and set acl inode operations. This is mostly a light refactoring of the codepaths currently used in 9p posix acl xattr handler. After we have fully implemented the posix acl api and switched the vfs over to it, the 9p specific posix acl xattr handler and associated code will be removed. Note, until the vfs has been switched to the new posix acl api this patch is a non-functional change. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/9p/acl.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/9p/acl.h | 3 ++ fs/9p/vfs_inode_dotl.c | 2 ++ 3 files changed, 99 insertions(+) commit 6cd4d4e8b6e1495eb0cafa3a59d1fde137a98d22 Author: Christian Brauner Date: Thu Sep 22 17:17:04 2022 +0200 9p: implement get acl method The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. In order to build a type safe posix api around get and set acl we need all filesystem to implement get and set acl. So far 9p implemented a ->get_inode_acl() operation that didn't require access to the dentry in order to allow (limited) permission checking via posix acls in the vfs. Now that we have get and set acl inode operations that take a dentry argument we can give 9p get and set acl inode operations. This is mostly a refactoring of the codepaths currently used in 9p posix acl xattr handler. After we have fully implemented the posix acl api and switched the vfs over to it, the 9p specific posix acl xattr handler and associated code will be removed. Note, until the vfs has been switched to the new posix acl api this patch is a non-functional change. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/9p/acl.c | 80 +++++++++++++++++++++++++++++++---------- fs/9p/acl.h | 5 ++- fs/9p/vfs_inode_dotl.c | 6 ++-- include/linux/posix_acl_xattr.h | 11 ++++++ 4 files changed, 80 insertions(+), 22 deletions(-) commit dc1af4c4b4721abfa07b351063825acc7e69cc66 Author: Christian Brauner Date: Thu Sep 22 17:17:03 2022 +0200 cifs: implement set acl method The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. In order to build a type safe posix api around get and set acl we need all filesystem to implement get and set acl. So far cifs wasn't able to implement get and set acl inode operations because it needs access to the dentry. Now that we extended the set acl inode operation to take a dentry argument and added a new get acl inode operation that takes a dentry argument we can let cifs implement get and set acl inode operations. This is mostly a copy and paste of the codepaths currently used in cifs' posix acl xattr handler. After we have fully implemented the posix acl api and switched the vfs over to it, the cifs specific posix acl xattr handler and associated code will be removed and the code duplication will go away. Note, until the vfs has been switched to the new posix acl api this patch is a non-functional change. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/cifs/cifsacl.c | 72 +++++++++++++++++++++++ fs/cifs/cifsfs.c | 2 + fs/cifs/cifsproto.h | 6 ++ fs/cifs/cifssmb.c | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 240 insertions(+) commit bd9684b042dcbb400ecb4d169b74c9adc84aa088 Author: Christian Brauner Date: Thu Sep 22 17:17:02 2022 +0200 cifs: implement get acl method The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. In order to build a type safe posix api around get and set acl we need all filesystem to implement get and set acl. So far cifs wasn't able to implement get and set acl inode operations because it needs access to the dentry. Now that we extended the set acl inode operation to take a dentry argument and added a new get acl inode operation that takes a dentry argument we can let cifs implement get and set acl inode operations. This is mostly a copy and paste of the codepaths currently used in cifs' posix acl xattr handler. After we have fully implemented the posix acl api and switched the vfs over to it, the cifs specific posix acl xattr handler and associated code will be removed and the code duplication will go away. Note, until the vfs has been switched to the new posix acl api this patch is a non-functional change. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) fs/cifs/cifsacl.c | 67 ++++++++++++++++++ fs/cifs/cifsfs.c | 2 + fs/cifs/cifsproto.h | 6 ++ fs/cifs/cifssmb.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 271 insertions(+) commit 7420332a6ff407ba2d3d25f5e8430bf426131d1d Author: Christian Brauner Date: Thu Sep 22 17:17:01 2022 +0200 fs: add new get acl method The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. Since some filesystem rely on the dentry being available to them when setting posix acls (e.g., 9p and cifs) they cannot rely on the old get acl inode operation to retrieve posix acl and need to implement their own custom handlers because of that. In a previous patch we renamed the old get acl inode operation to ->get_inode_acl(). We decided to rename it and implement a new one since ->get_inode_acl() is called generic_permission() and inode_permission() both of which can be called during an filesystem's ->permission() handler. So simply passing a dentry argument to ->get_acl() would have amounted to also having to pass a dentry argument to ->permission(). We avoided that change. This adds a new ->get_acl() inode operations which takes a dentry argument which filesystems such as 9p, cifs, and overlayfs can implement to get posix acls. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Signed-off-by: Christian Brauner (Microsoft) Documentation/filesystems/locking.rst | 2 ++ Documentation/filesystems/vfs.rst | 1 + include/linux/fs.h | 2 ++ 3 files changed, 5 insertions(+) commit cac2f8b8d8b50ef32b3e34f6dcbbf08937e4f616 Author: Christian Brauner Date: Thu Sep 22 17:17:00 2022 +0200 fs: rename current get acl method The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. The current inode operation for getting posix acls takes an inode argument but various filesystems (e.g., 9p, cifs, overlayfs) need access to the dentry. In contrast to the ->set_acl() inode operation we cannot simply extend ->get_acl() to take a dentry argument. The ->get_acl() inode operation is called from: acl_permission_check() -> check_acl() -> get_acl() which is part of generic_permission() which in turn is part of inode_permission(). Both generic_permission() and inode_permission() are called in the ->permission() handler of various filesystems (e.g., overlayfs). So simply passing a dentry argument to ->get_acl() would amount to also having to pass a dentry argument to ->permission(). We should avoid this unnecessary change. So instead of extending the existing inode operation rename it from ->get_acl() to ->get_inode_acl() and add a ->get_acl() method later that passes a dentry argument and which filesystems that need access to the dentry can implement instead of ->get_inode_acl(). Filesystems like cifs which allow setting and getting posix acls but not using them for permission checking during lookup can simply not implement ->get_inode_acl(). This is intended to be a non-functional change. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Suggested-by/Inspired-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) Documentation/filesystems/locking.rst | 10 ++++---- Documentation/filesystems/porting.rst | 4 ++-- Documentation/filesystems/vfs.rst | 2 +- fs/9p/vfs_inode_dotl.c | 4 ++-- fs/bad_inode.c | 2 +- fs/btrfs/inode.c | 6 ++--- fs/ceph/dir.c | 2 +- fs/ceph/inode.c | 2 +- fs/erofs/inode.c | 6 ++--- fs/erofs/namei.c | 2 +- fs/ext2/file.c | 2 +- fs/ext2/namei.c | 4 ++-- fs/ext4/file.c | 2 +- fs/ext4/ialloc.c | 2 +- fs/ext4/namei.c | 4 ++-- fs/f2fs/file.c | 2 +- fs/f2fs/namei.c | 4 ++-- fs/fuse/dir.c | 4 ++-- fs/gfs2/inode.c | 4 ++-- fs/jffs2/dir.c | 2 +- fs/jffs2/file.c | 2 +- fs/jfs/file.c | 2 +- fs/jfs/namei.c | 2 +- fs/ksmbd/smb2pdu.c | 4 ++-- fs/ksmbd/smbacl.c | 2 +- fs/ksmbd/vfs.c | 4 ++-- fs/namei.c | 4 ++-- fs/nfs/nfs3acl.c | 6 ++--- fs/nfs/nfs3proc.c | 4 ++-- fs/nfsd/nfs2acl.c | 4 ++-- fs/nfsd/nfs3acl.c | 4 ++-- fs/nfsd/nfs4acl.c | 4 ++-- fs/ntfs3/file.c | 2 +- fs/ntfs3/namei.c | 4 ++-- fs/ocfs2/file.c | 4 ++-- fs/ocfs2/namei.c | 2 +- fs/orangefs/inode.c | 2 +- fs/orangefs/namei.c | 2 +- fs/overlayfs/dir.c | 2 +- fs/overlayfs/inode.c | 6 ++--- fs/posix_acl.c | 43 ++++++++++++++++++----------------- fs/reiserfs/file.c | 2 +- fs/reiserfs/namei.c | 4 ++-- fs/reiserfs/xattr_acl.c | 2 +- fs/xfs/xfs_iops.c | 6 ++--- include/linux/fs.h | 6 ++--- include/linux/posix_acl.h | 2 +- 47 files changed, 101 insertions(+), 100 deletions(-) commit 7c99616e3fe7f35fe25bf6f5797267da29b4751e Author: Zack Rusin Date: Tue Oct 18 22:43:50 2022 -0400 drm: Remove drm_mode_config::fb_base The fb_base in struct drm_mode_config has been unused for a long time. Some drivers set it and some don't leading to a very confusing state where the variable can't be relied upon, because there's no indication as to which driver sets it and which doesn't. The only usage of fb_base is internal to two drivers so instead of trying to force it into all the drivers to get it into a coherent state completely remove it. Signed-off-by: Zack Rusin Reviewed-by: Laurent Pinchart Reviewed-by: Thomas Zimmermann Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221019024401.394617-1-zack@kde.org drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 -- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 -- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 -- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 - drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 -- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- drivers/gpu/drm/ast/ast_mode.c | 2 -- drivers/gpu/drm/gma500/framebuffer.c | 6 +++--- drivers/gpu/drm/gma500/psb_drv.h | 1 + drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 16 +++------------- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 3 --- drivers/gpu/drm/mgag200/mgag200_mode.c | 1 - drivers/gpu/drm/msm/msm_fbdev.c | 2 -- drivers/gpu/drm/nouveau/nouveau_display.c | 1 - drivers/gpu/drm/nouveau/nv04_fbcon.c | 6 ++++-- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 -- drivers/gpu/drm/qxl/qxl_display.c | 2 -- drivers/gpu/drm/radeon/radeon_display.c | 2 -- drivers/gpu/drm/radeon/radeon_fb.c | 2 +- drivers/gpu/drm/tegra/fb.c | 1 - drivers/gpu/drm/tiny/bochs.c | 1 - include/drm/drm_mode_config.h | 2 -- 22 files changed, 12 insertions(+), 49 deletions(-) commit aab0dd5cf11f8d9edd766e2b65f65a4cf1166c7c Author: Bryan O'Donoghue Date: Tue Jun 28 13:04:35 2022 +0100 arm64: dts: qcom: msm8916: Fix lpass compat string to match yaml The documented yaml compat string for the apq8016 is "qcom,apq8016-lpass-cpu" not "qcom,lpass-cpu-apq8016". Looking at the other lpass compat strings the general form is "qcom,socnum-lpass-cpu". We need to fix both the driver and dts to match. Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220628120435.3044939-3-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab3f7828c9793a5dfa99a54dc19ae3491c38bfa3 Author: Kees Cook Date: Tue Oct 18 02:06:33 2022 -0700 openvswitch: Use kmalloc_size_roundup() to match ksize() usage Round up allocations with kmalloc_size_roundup() so that openvswitch's use of ksize() is always accurate and no special handling of the memory is needed by KASAN, UBSAN_BOUNDS, nor FORTIFY_SOURCE. Cc: Pravin B Shelar Cc: dev@openvswitch.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221018090628.never.537-kees@kernel.org Signed-off-by: Jakub Kicinski net/openvswitch/flow_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04a8f9d7c09d04ba39e84611adfe6f48e30353c3 Merge: 7d8d535546a0 8662de232149 Author: Alexei Starovoitov Date: Wed Oct 19 16:53:51 2022 -0700 Merge branch 'bpf,x64: Use BMI2 for shifts' Jie Meng says: ==================== With baseline x64 instruction set, shift count can only be an immediate or in %cl. The implicit dependency on %cl makes it necessary to shuffle registers around and/or add push/pop operations. BMI2 provides shift instructions that can use any general register as the shift count, saving us instructions and a few bytes in most cases. Suboptimal codegen when %ecx is source and/or destination is also addressed and unnecessary instructions are removed. test_progs: Summary: 267/1340 PASSED, 25 SKIPPED, 0 FAILED test_progs-no_alu32: Summary: 267/1333 PASSED, 26 SKIPPED, 0 FAILED test_verifier: Summary: 1367 PASSED, 636 SKIPPED, 0 FAILED (same result with or without BMI2) test_maps: OK, 0 SKIPPED lib/test_bpf: test_bpf: Summary: 1026 PASSED, 0 FAILED, [1014/1014 JIT'ed] test_bpf: test_tail_calls: Summary: 10 PASSED, 0 FAILED, [10/10 JIT'ed] test_bpf: test_skb_segment: Summary: 2 PASSED, 0 FAILED --- v4 -> v5: - More comments regarding instruction encoding v3 -> v4: - Fixed a regression when BMI2 isn't available ==================== Signed-off-by: Alexei Starovoitov commit 8662de2321496499a21841486660817f72ac9456 Author: Jie Meng Date: Fri Oct 7 13:23:49 2022 -0700 bpf: add selftests for lsh, rsh, arsh with reg operand Current tests cover only shifts with an immediate as the source operand/shift counts; add a new test case to cover register operand. Signed-off-by: Jie Meng Link: https://lore.kernel.org/r/20221007202348.1118830-4-jmeng@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/verifier/jit.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 77d8f5d47bfbb5f0a8630102838ffb22cd70d6f5 Author: Jie Meng Date: Fri Oct 7 13:23:48 2022 -0700 bpf,x64: use shrx/sarx/shlx when available BMI2 provides 3 shift instructions (shrx, sarx and shlx) that use VEX encoding but target general purpose registers [1]. They allow the shift count in any general purpose register and have the same performance as non BMI2 shift instructions [2]. Instead of shr/sar/shl that implicitly use %cl (lowest 8 bit of %rcx), emit their more flexible alternatives provided in BMI2 when advantageous; keep using the non BMI2 instructions when shift count is already in BPF_REG_4/%rcx as non BMI2 instructions are shorter. To summarize, when BMI2 is available: ------------------------------------------------- | arbitrary dst ================================================= src == ecx | shl dst, cl ------------------------------------------------- src != ecx | shlx dst, dst, src ------------------------------------------------- And no additional register shuffling is needed. A concrete example between non BMI2 and BMI2 codegen. To shift %rsi by %rdi: Without BMI2: ef3: push %rcx 51 ef4: mov %rdi,%rcx 48 89 f9 ef7: shl %cl,%rsi 48 d3 e6 efa: pop %rcx 59 With BMI2: f0b: shlx %rdi,%rsi,%rsi c4 e2 c1 f7 f6 [1] https://en.wikipedia.org/wiki/X86_Bit_manipulation_instruction_set [2] https://www.agner.org/optimize/instruction_tables.pdf Signed-off-by: Jie Meng Link: https://lore.kernel.org/r/20221007202348.1118830-3-jmeng@fb.com Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 81 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 81b35e7cad790eecf9f359662804bb26055ac7e8 Author: Jie Meng Date: Fri Oct 7 13:23:47 2022 -0700 bpf,x64: avoid unnecessary instructions when shift dest is ecx x64 JIT produces redundant instructions when a shift operation's destination register is BPF_REG_4/ecx and this patch removes them. Specifically, when dest reg is BPF_REG_4 but the src isn't, we needn't push and pop ecx around shift only to get it overwritten by r11 immediately afterwards. In the rare case when both dest and src registers are BPF_REG_4, a single shift instruction is sufficient and we don't need the two MOV instructions around the shift. To summarize using shift left as an example, without patch: ------------------------------------------------- | dst == ecx | dst != ecx ================================================= src == ecx | mov r11, ecx | shl dst, cl | shl r11, ecx | | mov ecx, r11 | ------------------------------------------------- src != ecx | mov r11, ecx | push ecx | push ecx | mov ecx, src | mov ecx, src | shl dst, cl | shl r11, cl | pop ecx | pop ecx | | mov ecx, r11 | ------------------------------------------------- With patch: ------------------------------------------------- | dst == ecx | dst != ecx ================================================= src == ecx | shl ecx, cl | shl dst, cl ------------------------------------------------- src != ecx | mov r11, ecx | push ecx | mov ecx, src | mov ecx, src | shl r11, cl | shl dst, cl | mov ecx, r11 | pop ecx ------------------------------------------------- Signed-off-by: Jie Meng Link: https://lore.kernel.org/r/20221007202348.1118830-2-jmeng@fb.com Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 7d8d535546a0ac03d7949881ef23bd2c903d19be Merge: 81bfcc3fcd2f 2f968e9f4a95 Author: Alexei Starovoitov Date: Wed Oct 19 16:40:45 2022 -0700 Merge branch 'libbpf: support non-mmap()'able data sections' Andrii Nakryiko says: ==================== Make libbpf more conservative in using BPF_F_MMAPABLE flag with internal BPF array maps that are backing global data sections. See patch #2 for full description and justification. Changes in this dataset support having bpf_spinlock, kptr, rb_tree nodes and other "special" variables as global variables. Combining this with libbpf's existing support for multiple custom .data.* sections allows BPF programs to utilize multiple spinlock/rbtree_node/kptr variables in a pretty natural way by just putting all such variables into separate data sections (and thus ARRAY maps). v1->v2: - address Stanislav's feedback, adds acks. ==================== Acked-by: Kumar Kartikeya Dwivedi Signed-off-by: Alexei Starovoitov commit 2f968e9f4a953037f798802006ecd298c014b5b4 Author: Andrii Nakryiko Date: Tue Oct 18 17:28:16 2022 -0700 libbpf: add non-mmapable data section selftest Add non-mmapable data section to test_skeleton selftest and make sure it really isn't mmapable by trying to mmap() it anyways. Also make sure that libbpf doesn't report BPF_F_MMAPABLE flag to users. Additional, some more manual testing was performed that this feature works as intended. Looking at created map through bpftool shows that flags passed to kernel are indeed zero: $ bpftool map show ... 1782: array name .data.non_mmapa flags 0x0 key 4B value 16B max_entries 1 memlock 4096B btf_id 1169 pids test_progs(8311) ... Checking BTF uploaded to kernel for this map shows that zero_key and zero_value are indeed marked as static, even though zero_key is actually original global (but STV_HIDDEN) variable: $ bpftool btf dump id 1169 ... [51] VAR 'zero_key' type_id=2, linkage=static [52] VAR 'zero_value' type_id=7, linkage=static ... [62] DATASEC '.data.non_mmapable' size=16 vlen=2 type_id=51 offset=0 size=4 (VAR 'zero_key') type_id=52 offset=4 size=12 (VAR 'zero_value') ... And original BTF does have zero_key marked as linkage=global: $ bpftool btf dump file test_skeleton.bpf.linked3.o ... [51] VAR 'zero_key' type_id=2, linkage=global [52] VAR 'zero_value' type_id=7, linkage=static ... [62] DATASEC '.data.non_mmapable' size=16 vlen=2 type_id=51 offset=0 size=4 (VAR 'zero_key') type_id=52 offset=4 size=12 (VAR 'zero_value') Bpftool didn't require any changes at all because it checks whether internal map is mmapable already, but just to double-check generated skeleton, we see that .data.non_mmapable neither sets mmaped pointer nor has a corresponding field in the skeleton: $ grep non_mmapable test_skeleton.skel.h struct bpf_map *data_non_mmapable; s->maps[7].name = ".data.non_mmapable"; s->maps[7].map = &obj->maps.data_non_mmapable; But .data.read_mostly has all of those things: $ grep read_mostly test_skeleton.skel.h struct bpf_map *data_read_mostly; struct test_skeleton__data_read_mostly { int read_mostly_var; } *data_read_mostly; s->maps[6].name = ".data.read_mostly"; s->maps[6].map = &obj->maps.data_read_mostly; s->maps[6].mmaped = (void **)&obj->data_read_mostly; _Static_assert(sizeof(s->data_read_mostly->read_mostly_var) == 4, "unexpected size of 'read_mostly_var'"); Acked-by: Stanislav Fomichev Acked-by: Dave Marchevsky Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221019002816.359650-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/skeleton.c | 11 ++++++++++- tools/testing/selftests/bpf/progs/test_skeleton.c | 17 +++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) commit 4fcac46c7e107a93030d19c6ea7b90540fc80b1b Author: Andrii Nakryiko Date: Tue Oct 18 17:28:15 2022 -0700 libbpf: only add BPF_F_MMAPABLE flag for data maps with global vars Teach libbpf to not add BPF_F_MMAPABLE flag unnecessarily for ARRAY maps that are backing data sections, if such data sections don't expose any variables to user-space. Exposed variables are those that have STB_GLOBAL or STB_WEAK ELF binding and correspond to BTF VAR's BTF_VAR_GLOBAL_ALLOCATED linkage. The overall idea is that if some data section doesn't have any variable that is exposed through BPF skeleton, then there is no reason to make such BPF array mmapable. Making BPF array mmapable is not a free no-op action, because BPF verifier doesn't allow users to put special objects (such as BPF spin locks, RB tree nodes, linked list nodes, kptrs, etc; anything that has a sensitive internal state that should not be modified arbitrarily from user space) into mmapable arrays, as there is no way to prevent user space from corrupting such sensitive state through direct memory access through memory-mapped region. By making sure that libbpf doesn't add BPF_F_MMAPABLE flag to BPF array maps corresponding to data sections that only have static variables (which are not supposed to be visible to user space according to libbpf and BPF skeleton rules), users now can have spinlocks, kptrs, etc in either default .bss/.data sections or custom .data.* sections (assuming there are no global variables in such sections). The only possible hiccup with this approach is the need to use global variables during BPF static linking, even if it's not intended to be shared with user space through BPF skeleton. To allow such scenarios, extend libbpf's STV_HIDDEN ELF visibility attribute handling to variables. Libbpf is already treating global hidden BPF subprograms as static subprograms and adjusts BTF accordingly to make BPF verifier verify such subprograms as static subprograms with preserving entire BPF verifier state between subprog calls. This patch teaches libbpf to treat global hidden variables as static ones and adjust BTF information accordingly as well. This allows to share variables between multiple object files during static linking, but still keep them internal to BPF program and not get them exposed through BPF skeleton. Note, that if the user has some advanced scenario where they absolutely need BPF_F_MMAPABLE flag on .data/.bss/.rodata BPF array map despite only having static variables, they still can achieve this by forcing it through explicit bpf_map__set_map_flags() API. Acked-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Acked-by: Dave Marchevsky Link: https://lore.kernel.org/r/20221019002816.359650-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 97 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 19 deletions(-) commit f33f742d567449bad965bf60c0d65f861c1d7101 Author: Andrii Nakryiko Date: Tue Oct 18 17:28:14 2022 -0700 libbpf: clean up and refactor BTF fixup step Refactor libbpf's BTF fixup step during BPF object open phase. The only functional change is that we now ignore BTF_VAR_GLOBAL_EXTERN variables during fix up, not just BTF_VAR_STATIC ones, which shouldn't cause any change in behavior as there shouldn't be any extern variable in data sections for valid BPF object anyways. Otherwise it's just collapsing two functions that have no reason to be separate, and switching find_elf_var_offset() helper to return entire symbol pointer, not just its offset. This will be used by next patch to get ELF symbol visibility. While refactoring, also "normalize" debug messages inside btf_fixup_datasec() to follow general libbpf style and print out data section name consistently, where it's available. Acked-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221019002816.359650-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 96 ++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 54 deletions(-) commit aadc0cd52fa045b05a2e0a70254e02ae2a3fe1da Author: Stephen Kitt Date: Fri Sep 30 12:29:37 2022 +0200 docs: sysctl/fs: re-order, prettify This brings the text markup in line with sysctl/abi and sysctl/kernel: * the entries are ordered alphabetically * the table of contents is automatically generated * markup is used as appropriate for constants etc. The content isn't fully up-to-date but the obsolete entries are gone, so remove the kernel version mention. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20220930102937.135841-6-steve@sk2.org Signed-off-by: Jonathan Corbet Documentation/admin-guide/sysctl/fs.rst | 188 +++++++++++++--------------- Documentation/admin-guide/sysctl/kernel.rst | 2 + 2 files changed, 92 insertions(+), 98 deletions(-) commit 4ce463179a5c9efddf186ace343ac97175b11417 Author: Stephen Kitt Date: Fri Sep 30 12:29:36 2022 +0200 docs: sysctl/fs: remove references to super-max/-nr These were removed in 2.4.7.8. Remove references to super-max and super-nr in the sysctl documentation. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20220930102937.135841-5-steve@sk2.org Signed-off-by: Jonathan Corbet Documentation/admin-guide/sysctl/fs.rst | 10 ---------- 1 file changed, 10 deletions(-) commit c46ff5c5b8a8142a3fe7a5504969a62a07cdaab3 Author: Stephen Kitt Date: Fri Sep 30 12:29:35 2022 +0200 docs: sysctl/fs: merge the aio sections There are two sections documenting aio-nr and aio-max-nr, merge them. I kept the second explanation of aio-nr, which seems clearer to me, along with the effects of the values from the first section. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20220930102937.135841-4-steve@sk2.org Signed-off-by: Jonathan Corbet Documentation/admin-guide/sysctl/fs.rst | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 81885a45b375611735d82016e4c1059b2a51150b Author: Stephen Kitt Date: Fri Sep 30 12:29:34 2022 +0200 docs: sysctl/fs: remove references to dquot-max/-nr dquot-max was removed in 2.4.10.5; dquot-nr was replaced with dqstats in 2.5.18 which is now /proc/sys/fs/quota. Remove references to dquot-max and dquot-nr in the sysctl documentation. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20220930102937.135841-3-steve@sk2.org Signed-off-by: Jonathan Corbet Documentation/admin-guide/sysctl/fs.rst | 16 ---------------- 1 file changed, 16 deletions(-) commit a75c6589fee79edcf15747459ebfaee503df9a8b Author: Stephen Kitt Date: Fri Sep 30 12:29:33 2022 +0200 docs: sysctl/fs: remove references to inode-max inode-max was removed in 2.3.20pre1, remove references to it in the sysctl documentation. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20220930102937.135841-2-steve@sk2.org Signed-off-by: Jonathan Corbet Documentation/admin-guide/sysctl/fs.rst | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 5c624a1d77d3eb2e314b59282b1213fa760d192c Merge: a526a3cc9c8d b799f052a987 Author: Jakub Kicinski Date: Wed Oct 19 13:00:09 2022 -0700 Merge branch 'netlink-formatted-extacks' Edward Cree says: ==================== netlink: formatted extacks Currently, netlink extacks can only carry fixed string messages, which is limiting when reporting failures in complex systems. This series adds the ability to return printf-formatted messages, and uses it in the sfc driver's TC offload code. Formatted extack messages are limited in length to a fixed buffer size, currently 80 characters. If the message exceeds this, the full message will be logged (ratelimited) to the console and a truncated version returned over netlink. There is no change to the netlink uAPI; only internal kernel changes are needed. ==================== Link: https://lore.kernel.org/r/cover.1666102698.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit b799f052a987c3fdd315cbac665b9202dd96382b Author: Edward Cree Date: Tue Oct 18 15:37:29 2022 +0100 sfc: remove 'log-tc-errors' ethtool private flag It no longer does anything now that we're using formatted extacks instead. So we can remove the driver's whole get/set priv_flags implementation. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/ef100_ethtool.c | 2 -- drivers/net/ethernet/sfc/ethtool_common.c | 37 ------------------------------- drivers/net/ethernet/sfc/ethtool_common.h | 2 -- drivers/net/ethernet/sfc/net_driver.h | 2 -- 4 files changed, 43 deletions(-) commit ad1c80d5f777b86d071e90791d008bde393bd63f Author: Edward Cree Date: Tue Oct 18 15:37:28 2022 +0100 sfc: use formatted extacks instead of efx_tc_err() Since we can now get a formatted message back to the user with NL_SET_ERR_MSG_FMT_MOD(), there's no need for our special logging. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski drivers/net/ethernet/sfc/mae.c | 5 ++--- drivers/net/ethernet/sfc/tc.c | 47 +++++++++++++++++++----------------------- drivers/net/ethernet/sfc/tc.h | 18 ---------------- 3 files changed, 23 insertions(+), 47 deletions(-) commit 51c352bdbcd23d7ce46b06c1e64c82754dc44044 Author: Edward Cree Date: Tue Oct 18 15:37:27 2022 +0100 netlink: add support for formatted extack messages Include an 80-byte buffer in struct netlink_ext_ack that can be used for scnprintf()ed messages. This does mean that the resulting string can't be enumerated, translated etc. in the way NL_SET_ERR_MSG() was designed to allow. Signed-off-by: Edward Cree Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski include/linux/netlink.h | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 26117d92d001659b10f37ff0a338db2c8523c234 Author: Kees Cook Date: Thu Oct 6 12:20:35 2022 -0700 can: kvaser_usb: Remove -Warray-bounds exception GCC-12 emits false positive -Warray-bounds warnings with CONFIG_UBSAN_SHIFT (-fsanitize=shift). This is fixed in GCC 13[1], and there is top-level Makefile logic to remove -Warray-bounds for known-bad GCC versions staring with commit f0be87c42cbd ("gcc-12: disable '-Warray-bounds' universally for now"). Remove the local work-around. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105679 Signed-off-by: Kees Cook Link: https://lore.kernel.org/all/20221006192035.1742912-1-keescook@chromium.org Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb/Makefile | 5 ----- 1 file changed, 5 deletions(-) commit b2df8a1bc303e01b034d11d8265354df052cd938 Author: Gustavo A. R. Silva Date: Mon Sep 26 16:43:56 2022 -0500 can: ucan: 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 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/214 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Link: https://lore.kernel.org/all/YzIdHDdz30BH4SAv@work Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/ucan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1dd1b521be85417ec409062319520ca26c1c589e Author: Oliver Hartkopp Date: Sat Sep 24 19:44:24 2022 +0200 can: remove obsolete PCH CAN driver The PCH CAN driver is a driver for a Bosch C_CAN controller IP core which is attached to the system via PCI. This code has been introduced in 2011 by Oki Semiconductors developers to support the Intel Atom E6xx series I/O Hub (aka EG20T IOH PCH CAN). Since 2012 the driver only has been maintained by the kernel community. As there is a well maintained and continously tested C_CAN/D_CAN driver which also supports the PCI configuration from the PCH CAN EG20T setup this driver became obsolete. Cc: Jacob Kroon Cc: Marc Kleine-Budde Cc: Dario Binacchi Cc: Wolfgang Grandegger Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/all/20220924174424.86541-1-socketcan@hartkopp.net Acked-by: Jacob Kroon Signed-off-by: Marc Kleine-Budde drivers/net/can/Kconfig | 8 - drivers/net/can/Makefile | 1 - drivers/net/can/c_can/Kconfig | 3 +- drivers/net/can/pch_can.c | 1249 ----------------------------------------- 4 files changed, 2 insertions(+), 1259 deletions(-) commit de1deb156970bade8b877124c4142edac1696ee6 Author: Zhang Changzhong Date: Fri Sep 30 14:52:08 2022 +0800 can: j1939: j1939_session_tx_eoma(): fix debug info Use "%s" instead of "%p" to print function name in debug info. Signed-off-by: Zhang Changzhong Acked-by: Oleksij Rempel Link: https://lore.kernel.org/all/1664520728-4644-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Marc Kleine-Budde net/can/j1939/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85700ac19aa19c5ff7267dc406c9bccb7a60b0e3 Author: Daniel S. Trevitz Date: Fri Oct 7 07:53:02 2022 -0400 can: add termination resistor documentation Add documentation for how to use and setup the switchable termination resistor support for CAN controllers. Signed-off-by: Daniel Trevitz Link: https://lore.kernel.org/all/3441354.44csPzL39Z@daniel6430 Signed-off-by: Marc Kleine-Budde Documentation/networking/can.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 81bfcc3fcd2f99578eebc2f64248253b57fc5c76 Author: Daniel Müller Date: Tue Oct 18 16:40:15 2022 +0000 bpf/docs: Summarize CI system and deny lists This change adds a brief summary of the BPF continuous integration (CI) to the BPF selftest documentation. The summary focuses not so much on actual workings of the CI, as it is maintained outside of the repository, but aims to document the few bits of it that are sourced from this repository and that developers may want to adjust as part of patch submissions: the BPF kernel configuration and the deny list file(s). Changelog: - v1->v2: - use s390x instead of s390 for consistency Signed-off-by: Daniel Müller Acked-by: David Vernet Link: https://lore.kernel.org/r/20221018164015.1970862-1-deso@posteo.net Signed-off-by: Martin KaFai Lau tools/testing/selftests/bpf/README.rst | 42 +++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit 01c97c7303580682751b5aaae043b639bdcbacb3 Author: Juergen Gross Date: Tue Oct 4 10:10:08 2022 +0200 x86/mtrr: Add comment for set_mtrr_state() serialization Add a comment about set_mtrr_state() needing serialization. [ bp: Touchups. ] Suggested-by: Borislav Petkov Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220820092533.29420-2-jgross@suse.com arch/x86/kernel/cpu/mtrr/generic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2c4d72d66b548f1404ff43c01b7b81f4c4c6fafd Author: Daniel Müller Date: Tue Oct 18 16:32:31 2022 +0000 samples/bpf: Fix typos in README This change fixes some typos found in the BPF samples README file. Signed-off-by: Daniel Müller Acked-by: David Vernet Link: https://lore.kernel.org/r/20221018163231.1926462-1-deso@posteo.net Signed-off-by: Martin KaFai Lau samples/bpf/README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01dea9548f6c88dc23dc5916eecd3555b82c8fec Author: Shaomin Deng Date: Mon Oct 17 10:23:03 2022 -0400 samples/bpf: Fix double word in comments Remove the repeated word "by" in comments. Signed-off-by: Shaomin Deng Link: https://lore.kernel.org/r/20221017142303.8299-1-dengshaomin@cdjrlc.com Signed-off-by: Martin KaFai Lau samples/bpf/hbm_edt_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a698edf954cb3f8b6e8dacdb77615355170420c Author: Gerhard Engleder Date: Sat Oct 15 23:30:50 2022 +0200 samples/bpf: Fix MAC address swapping in xdp2_kern xdp2_kern rewrites and forwards packets out on the same interface. Forwarding still works but rewrite got broken when xdp multibuffer support has been added. With xdp multibuffer a local copy of the packet has been introduced. The MAC address is now swapped in the local copy, but the local copy in not written back. Fix MAC address swapping be adding write back of modified packet. Fixes: 772251742262 ("samples/bpf: fixup some tools to be able to support xdp multibuffer") Signed-off-by: Gerhard Engleder Reviewed-by: Andy Gospodarek Link: https://lore.kernel.org/r/20221015213050.65222-1-gerhard@engleder-embedded.com Signed-off-by: Martin KaFai Lau samples/bpf/xdp2_kern.c | 4 ++++ 1 file changed, 4 insertions(+) commit 05ee658c654bacda03f7fecef367e62aaf8e1cfe Author: Gerhard Engleder Date: Thu Oct 13 22:09:22 2022 +0200 samples/bpf: Fix map iteration in xdp1_user BPF map iteration in xdp1_user results in endless loop without any output, because the return value of bpf_map_get_next_key() is checked against the wrong value. Other call locations of bpf_map_get_next_key() check for equal 0 for continuing the iteration. xdp1_user checks against unequal -1. This is wrong for a function which can return arbitrary negative errno values, because a return value of e.g. -2 results in an endless loop. With this fix xdp1_user is printing statistics again: proto 0: 1 pkt/s proto 0: 1 pkt/s proto 17: 107383 pkt/s proto 17: 881655 pkt/s proto 17: 882083 pkt/s proto 17: 881758 pkt/s Fixes: bd054102a8c7 ("libbpf: enforce strict libbpf 1.0 behaviors") Signed-off-by: Gerhard Engleder Acked-by: Song Liu Link: https://lore.kernel.org/r/20221013200922.17167-1-gerhard@engleder-embedded.com Signed-off-by: Martin KaFai Lau samples/bpf/xdp1_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f74d21829bdcf2f27256f6a8adb1492766f748c7 Merge: a977c3a93fa9 29f4d95b97bc Author: Mark Brown Date: Wed Oct 19 18:12:21 2022 +0100 spi: spi-zyqnmp-gqspi: Add tap delay and Versal platform support Merge series from Amit Kumar Mahapatra : A bunch of improvements to the driver: - Fix kernel-doc warnings in GQSPI driver. - Avoid setting CPOL, CPHA & baud rate multiple times. - Add Versal platform support in GQSPI driver. - Add tap delay support in GQSPI driver. commit 5adedd42245af0860ebda8fe0949f24f5204c1b1 Author: Nikolaus Voss Date: Wed Oct 19 18:38:20 2022 +0200 KEYS: encrypted: fix key instantiation with user-provided data Commit cd3bc044af48 ("KEYS: encrypted: Instantiate key with user-provided decrypted data") added key instantiation with user provided decrypted data. The user data is hex-ascii-encoded but was just memcpy'ed to the binary buffer. Fix this to use hex2bin instead. Old keys created from user provided decrypted data saved with "keyctl pipe" are still valid, however if the key is recreated from decrypted data the old key must be converted to the correct format. This can be done with a small shell script, e.g.: BROKENKEY=abcdefABCDEF1234567890aaaaaaaaaa NEWKEY=$(echo -ne $BROKENKEY | xxd -p -c32) keyctl add user masterkey "$(cat masterkey.bin)" @u keyctl add encrypted testkey "new user:masterkey 32 $NEWKEY" @u However, NEWKEY is still broken: If for BROKENKEY 32 bytes were specified, a brute force attacker knowing the key properties would only need to try at most 2^(16*8) keys, as if the key was only 16 bytes long. The security issue is a result of the combination of limiting the input range to hex-ascii and using memcpy() instead of hex2bin(). It could have been fixed either by allowing binary input or using hex2bin() (and doubling the ascii input key length). This patch implements the latter. The corresponding test for the Linux Test Project ltp has also been fixed (see link below). Fixes: cd3bc044af48 ("KEYS: encrypted: Instantiate key with user-provided decrypted data") Cc: stable@kernel.org Link: https://lore.kernel.org/ltp/20221006081709.92303897@mail.steuer-voss.de/ Reviewed-by: Mimi Zohar Signed-off-by: Nikolaus Voss Signed-off-by: Mimi Zohar Documentation/security/keys/trusted-encrypted.rst | 3 ++- security/keys/encrypted-keys/encrypted.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit cd0ab43ec91a6114ea309e9e72382fdb184e7b9a Author: Arnd Bergmann Date: Wed Oct 19 17:03:32 2022 +0200 dmaengine: remove iop-adma driver The iop32x platform was removed, so this driver is no longer needed. Cc: Dan Williams Signed-off-by: Arnd Bergmann Acked-by: Dan Williams Link: https://lore.kernel.org/r/20221019150410.3851944-10-arnd@kernel.org Signed-off-by: Vinod Koul drivers/dma/Kconfig | 8 - drivers/dma/Makefile | 1 - drivers/dma/iop-adma.c | 1554 ------------------------------------------------ drivers/dma/iop-adma.h | 914 ---------------------------- 4 files changed, 2477 deletions(-) commit 568aa6dd641f63166bb60d769e256789b3ac42d4 Author: Martin Povišer Date: Wed Oct 19 15:23:24 2022 +0200 dmaengine: apple-admac: Allocate cache SRAM to channels There's a previously unknown part of the controller interface: We have to assign SRAM carveouts to channels to store their in-flight samples in. So, obtain the size of the SRAM from a read-only register and divide it into 2K blocks for allocation to channels. The FIFO depths we configure will always fit into 2K. (This fixes audio artifacts during simultaneous playback/capture on multiple channels -- which looking back is fully accounted for by having had the caches in the DMA controller overlap in memory.) Fixes: b127315d9a78 ("dmaengine: apple-admac: Add Apple ADMAC driver") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20221019132324.8585-2-povik+lin@cutebit.org Signed-off-by: Vinod Koul drivers/dma/apple-admac.c | 102 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) commit 625d2753723bd4395082e569f3528f8e30d335ae Merge: 9e693e81745f 25106550f136 Author: Mark Brown Date: Wed Oct 19 17:38:59 2022 +0100 ASoC: soc-dapm.c random cleanups Merge series from Kuninori Morimoto : These are v2 of random cleanup for soc-dpam.c/h. Basically, these are just cleanup, nothing changed. commit 6863aaa88516292b885fdce5dd91925a00c3a3de Author: Conor Dooley Date: Tue Sep 20 10:31:55 2022 +0100 riscv: dts: microchip: add the mpfs' fabric clock control The "fabric clocks" in current PolarFire SoC device trees are not really fixed clocks. Their frequency is set by the bitstream, so having them located in -fabric.dtsi is not a problem - they're just as "fixed" as the IP blocks etc used in the FPGA fabric. However, their configuration can be read at runtime (and to an extent they can be controlled, although the intended usage is static configurations set by the bitstream) through the system controller bus. In the v2022.09 icicle kit reference design a single CCC (north-west corner) is enabled, using a 50 MHz off-chip oscillator as its reference. Updating to the v2022.09 icicle kit reference design is required, as prior to this release, the CCC was not fixed & could change for any given run of the synthesis tool. Signed-off-by: Conor Dooley .../boot/dts/microchip/mpfs-icicle-kit-fabric.dtsi | 31 +++++++++++---------- arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts | 4 +++ arch/riscv/boot/dts/microchip/mpfs.dtsi | 32 ++++++++++++++++++++++ 3 files changed, 52 insertions(+), 15 deletions(-) commit 38b91847c314f49c80e30062549d4709a3754ea6 Author: Guilherme G. Piccoli Date: Thu Oct 13 18:06:46 2022 -0300 pstore: Alert on backend write error The pstore dump function doesn't alert at all on errors - despite pstore is usually a last resource and if it fails users won't be able to read the kernel log, this is not the case for server users with serial access, for example. So, let's at least attempt to inform such advanced users on the first backend writing error detected during the kmsg dump - this is also very useful for pstore debugging purposes. Signed-off-by: Guilherme G. Piccoli Acked-by: Ard Biesheuvel Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221013210648.137452-2-gpiccoli@igalia.com fs/pstore/platform.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7d7eca411fa0c662693613805107494a9dc7477f Author: Kees Cook Date: Tue Oct 11 13:01:12 2022 -0700 MAINTAINERS: Update pstore maintainers Update pstore to better reflect reality of active contributors: - Remove Anton and Colin (thank you for your help through the years!) - Move Tony to Reviewer - Add Guilherme as Reviewer - Add mailing list - Upgrade to Supported Signed-off-by: Kees Cook Acked-by: Guilherme G. Piccoli Acked-by: Colin Cross Link: https://lore.kernel.org/r/20221011200112.731334-6-keescook@chromium.org MAINTAINERS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 06b4e09aab6c1ae6b3991a729d2fcb31e358e7f3 Author: Kees Cook Date: Tue Oct 11 13:01:11 2022 -0700 pstore/ram: Set freed addresses to NULL For good measure, set all the freed addresses to NULL when managing przs. Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Signed-off-by: Kees Cook Reviewed-and-tested-by: Guilherme G. Piccoli Link: https://lore.kernel.org/r/20221011200112.731334-5-keescook@chromium.org fs/pstore/ram.c | 13 ++++++++----- fs/pstore/ram_core.c | 11 +++++++++-- fs/pstore/ram_internal.h | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) commit 91123b37e8a99cc489d5bdcfebd1c25f29382504 Author: Xiaochen Shen Date: Sat Oct 1 04:15:28 2022 +0800 dmaengine: idxd: Make max batch size attributes in sysfs invisible for Intel IAA In current code, dev.max_batch_size and wq.max_batch_size attributes in sysfs are exposed to user to show or update the values. >From Intel IAA spec [1], Intel IAA does not support batch processing. So these sysfs attributes should not be supported on IAA device. Fix this issue by making the attributes of max_batch_size invisible in sysfs through is_visible() filter when the device is IAA. Add description in the ABI documentation to mention that the attributes are not visible when the device does not support batch. [1]: https://cdrdv2.intel.com/v1/dl/getContent/721858 Fixes: e7184b159dd3 ("dmaengine: idxd: add support for configurable max wq batch size") Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver") Signed-off-by: Xiaochen Shen Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Link: https://lore.kernel.org/r/20220930201528.18621-3-xiaochen.shen@intel.com Signed-off-by: Vinod Koul Documentation/ABI/stable/sysfs-driver-dma-idxd | 2 ++ drivers/dma/idxd/sysfs.c | 32 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit 1b6b54ef7c4a1f482a2a6d33a769e89877beba4e Author: Krzysztof Kozlowski Date: Tue Oct 18 20:13:51 2022 -0400 dt-bindings: pinctrl: qcom,sc7180: convert to dtschema Convert Qualcomm SC7180 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Rob Herring Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20221019001351.1630089-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sc7180-pinctrl.txt | 187 --------------------- .../bindings/pinctrl/qcom,sc7180-pinctrl.yaml | 158 +++++++++++++++++ 2 files changed, 158 insertions(+), 187 deletions(-) commit a977c3a93fa9ed75fcd77b770c7e557d7b4f7bab Author: Yang Yingliang Date: Wed Oct 19 17:33:18 2022 +0800 spi: img-spfi: Use devm_platform_get_and_ioremap_resource() Use the devm_platform_get_and_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221019093318.1183190-1-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-img-spfi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6f3ff1689448448a955af4e0bd7a210ca7aafed9 Author: Krzysztof Kozlowski Date: Sun Oct 16 21:22:24 2022 -0400 dt-bindings: pinctrl: qcom,msm8974: convert to dtschema Convert Qualcomm MSM8974 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221017012225.8579-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8974-pinctrl.txt | 121 -------------- .../bindings/pinctrl/qcom,msm8974-pinctrl.yaml | 179 +++++++++++++++++++++ 2 files changed, 179 insertions(+), 121 deletions(-) commit c3da325b8fbe809af1ceb14d531f55b5b518a685 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:36:25 2022 -0400 dt-bindings: pinctrl: qcom: drop minItems equal to maxItems If minItems are missing, they are implicitly equal to maxItems. Dropping redundant minItems simplifies a bit the binding. Acked-by: Rob Herring Reviewed-by: Iskren Chernev Link: https://lore.kernel.org/r/20221016173625.53769-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml | 1 - Documentation/devicetree/bindings/pinctrl/qcom,sm6115-tlmm.yaml | 1 - 2 files changed, 2 deletions(-) commit 73b8365a75f1810ba7dda73c6721ebdf12851bbc Author: Krzysztof Kozlowski Date: Tue Oct 18 11:54:50 2022 -0400 dt-bindings: pinctrl: qcom,msm8994: convert to dtschema Convert Qualcomm MSM8994 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221018155450.39816-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8994-pinctrl.txt | 186 --------------------- .../bindings/pinctrl/qcom,msm8994-pinctrl.yaml | 162 ++++++++++++++++++ 2 files changed, 162 insertions(+), 186 deletions(-) commit 93341a821c2acd305fb70e6f9cda15e465d3c6aa Author: Krzysztof Kozlowski Date: Tue Oct 18 11:57:21 2022 -0400 dt-bindings: pinctrl: qcom,msm8996: convert to dtschema Convert Qualcomm MSM8996 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221018155721.47140-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8996-pinctrl.txt | 208 --------------------- .../bindings/pinctrl/qcom,msm8996-pinctrl.yaml | 182 ++++++++++++++++++ 2 files changed, 182 insertions(+), 208 deletions(-) commit 4065e0c1f81292eb8d954fe84ea1ad2bba703856 Author: Krzysztof Kozlowski Date: Mon Oct 17 19:46:53 2022 -0400 dt-bindings: pinctrl: qcom,msm8998: convert to dtschema Convert Qualcomm MSM8998 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221017234653.55506-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8998-pinctrl.txt | 202 --------------------- .../bindings/pinctrl/qcom,msm8998-pinctrl.yaml | 171 +++++++++++++++++ 2 files changed, 171 insertions(+), 202 deletions(-) commit 49b02b604fa6c4f27fd8c31261aa21ff957a8a5f Author: Krzysztof Kozlowski Date: Tue Oct 18 12:01:28 2022 -0400 dt-bindings: pinctrl: qcom,sm8150: convert to dtschema Convert Qualcomm SM8150 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221018160128.51851-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sm8150-pinctrl.txt | 190 --------------------- .../bindings/pinctrl/qcom,sm8150-pinctrl.yaml | 173 +++++++++++++++++++ 2 files changed, 173 insertions(+), 190 deletions(-) commit 9e693e81745f03845788ef409f03a39e92f8dd48 Author: Venkata Prasad Potturu Date: Wed Sep 21 14:37:44 2022 +0530 ASoC: amd: acp: Add setbias level for rt5682s codec in machine driver Add set_bais_level function for rt5682s codec to enable bclk and lrclk before codec widgets power on and disable bclk and lrclk after widgets power down, to avoid pop noise Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20220921090750.3833256-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp/acp-mach-common.c | 62 +++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 6 deletions(-) commit 3109bfda27561fece1cbf8cd367cf655d02c21dd Merge: 4306fc8f8317 010c050fe9ea Author: Mark Brown Date: Wed Oct 19 15:13:17 2022 +0100 ASoC: SOF: Intel: Harden the IPC4 low level sequencing Merge series from Peter Ujfalusi : Hi, The IPC4 use of doorbell registers leaves some corner cases not well defined and the 'correct sequences' are subjective in a sense. The DSP doorbell registers are used as separate and independent channels and the sequences for host -> DSP -> host (reply) can be racy. For example: The ACKing of a received message can happen before the firmware sends the reply or it can as well happen after the reply has been sent and received by the host. Both can be considered 'correct sequences' but they need different handling. This series will allow the kernel to service any interpretation of the sequencing on the firmware side. commit c4168c44d53160eb6ae273f58f133c3ce633bdad Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 gpio: da9052: Remove unused header(s) Some of the headers are unused in the driver, remove them. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/gpio/gpio-da9052.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit c59ce98347c9e746be4bfcd9c8c48da1acb5cecc Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 gpio: arizona: Remove unused header(s) Some of the headers are unused in the driver, remove them. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/gpio/gpio-arizona.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9ceb338ab1769fd04c7d347f086c3b5ee01128e1 Author: Andy Shevchenko Date: Fri Oct 7 16:44:44 2022 +0300 gpio: aspeed: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko drivers/gpio/gpio-aspeed.c | 5 +++-- include/linux/gpio/aspeed.h | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 56167161239472c35e902d40a13d1c6b2ff5e7c7 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Add support for live video input Add partial live video support, with a single video input that bypasses blending. Skip registration of the DRM device in that case, but register the DRM bridge instead. The DRM device will be created by the driver for the display controller in the PL. Full live video mode with concurrent usage of the video and gfx inputs, and blending in the DPSUB video pipeline, is currently unsupported. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 55 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 32 ++++++++++++++++----- 2 files changed, 80 insertions(+), 7 deletions(-) commit 51ae3bd4f0577d250c2b95f58fa93e7937136498 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Support operation without DMA engine To prepare for usage of the DPSUB as a DisplayPort bridge without creating a DRM device, make initialization and usage of the DMA engine optional. The flag that controls this feature is currently hardcoded to operating with the DMA engine, this will be made dynamic based on the device tree configuration in a subsequent change. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 26 ++++++++++++++++++++------ drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 3 +++ drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 3 +++ 3 files changed, 26 insertions(+), 6 deletions(-) commit 3662bbfca5d2b83c5d549f237a8d87f69aefa46c Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Allow configuration of layer mode Add a mode parameter to the zynqmp_disp_layer_enable() to set the layer mode, to prepare for live mode support. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 30 +++++++++--------------------- drivers/gpu/drm/xlnx/zynqmp_disp.h | 13 ++++++++++++- drivers/gpu/drm/xlnx/zynqmp_kms.c | 2 +- 3 files changed, 22 insertions(+), 23 deletions(-) commit 52c2cf1471b35eda9a29c8dfdee5c687909e126a Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Parse DT to find connected ports To prepare for live video input support, parse the device tree to find the connected ports. Warn about unsupported configurations, and error out when invalid. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 54 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 13 +++++++++ 2 files changed, 67 insertions(+) commit 4ce6ecd499749177b361d164849bd34924b7b3b7 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Rename zynqmp_dpsub_handle_vblank with DRM prefix The better convey its purpose, rename the zynqmp_dpsub_handle_vblank() function that belongs to the DRM layer to zynqmp_dpsub_drm_handle_vblank(). Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- drivers/gpu/drm/xlnx/zynqmp_kms.c | 4 ++-- drivers/gpu/drm/xlnx/zynqmp_kms.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit d189835fffed7fed4aec15a41eaa27190ad4e04d Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Decouple DRM device from zynqmp_dpsub To complete the decoupling of the DRM device from the zynqmp_dpsub, group all DRM-related structures in a zynqmp_dpsub_drm structure and allocate it separately from the zynqmp_dpsub. The DRM managed allocation of the drm_device now doesn't cover the zynqmp_dpsub anymore, so we need to register a cleanup action to release the zynqmp_dpsub when the drm_device is released. The will allow usage of the DisplayPort encoder as a standalone bridge, without registering a DRM device in this driver. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 41 +++++++++++++---------- drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 18 +++------- drivers/gpu/drm/xlnx/zynqmp_kms.c | 66 ++++++++++++++++++++++++++----------- drivers/gpu/drm/xlnx/zynqmp_kms.h | 24 +++++++++++++- 4 files changed, 99 insertions(+), 50 deletions(-) commit 074ef0ce9f8300697e6dc1f423124cc2e73d1eb5 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Move all DRM init and cleanup to zynqmp_kms.c Continue the isolation of DRM/KMS code by moving all DRM init and cleanup from zynqmp_dpsub.c to zynqmp_kms.c. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 117 +--------------------------------- drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 5 -- drivers/gpu/drm/xlnx/zynqmp_kms.c | 123 +++++++++++++++++++++++++++++++++++- drivers/gpu/drm/xlnx/zynqmp_kms.h | 5 +- 4 files changed, 127 insertions(+), 123 deletions(-) commit 6ca91bb43a63ad036a05491ad662aa18feb0e4ce Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Manage DP and DISP allocations manually The zynqmp_disp and zynqmp_dp structures are allocated with drmm_kzalloc(). While this simplifies management of memory, it requires a DRM device, which will not be available at probe time when the DP bridge will be used standalone, with a DRM device in the PL. To prepare for this, switch to manual allocation for zynqmp_disp and zynqmp_dp. The cleanup still uses the DRM managed infrastructure, but one level up, at the top level. This will be addressed separately. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 34 ++++++++++++++++++++++------------ drivers/gpu/drm/xlnx/zynqmp_disp.h | 3 +-- drivers/gpu/drm/xlnx/zynqmp_dp.c | 30 ++++++++++++++++++------------ drivers/gpu/drm/xlnx/zynqmp_dp.h | 3 +-- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 17 +++++++++++++++-- 5 files changed, 57 insertions(+), 30 deletions(-) commit 5889ee59031b75a5048870f0644419719a1d108d Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Move DP bridge init to zynqmp_dp_probe() There's no need to delay bridge initialization, move it to zynqmp_dp_probe() and drop the zynqmp_dp_drm_init() function. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 30 ++++++++++++------------------ drivers/gpu/drm/xlnx/zynqmp_dp.h | 1 - drivers/gpu/drm/xlnx/zynqmp_kms.c | 6 +----- 3 files changed, 13 insertions(+), 24 deletions(-) commit 2dfd045c84359e3fefe9967f5a3579f8d8587ead Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Register AUX bus at bridge attach time To prepare for operating as a standalone DP bridge with the DRM device implemented in the PL, move registration of the AUX bus to bridge attach time, as that's the earliest point when a DRM device is available. The DRM device pointer stored in zynqmp_dp isn't used anymore, drop it. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 41 +++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit ee1229b35d20d00ed13009d81401032de06ac58e Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Move planes handling to zynqmp_kms.c Decouple the planes handling from the display controller programming by moving the corresponding code from zynqmp_disp.c to zynqmp_kms.c. This prepares for using the DPSUB with a live video input, without creating DRM planes in the DPSUB driver. While at it, fix a typo in a comment. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 169 +++--------------------------------- drivers/gpu/drm/xlnx/zynqmp_disp.h | 19 ++-- drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 2 + drivers/gpu/drm/xlnx/zynqmp_kms.c | 145 +++++++++++++++++++++++++++++-- 4 files changed, 167 insertions(+), 168 deletions(-) commit 83a956d3c316ca63cc4cc931afce474f9e0199a1 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Move CRTC handling to zynqmp_kms.c Decouple the CRTC handling from the display controller programming by moving the corresponding code from zynqmp_disp.c to zynqmp_kms.c. This prepares for using the DPSUB with a live video input, without creating a DRM CRTC in the DPSUB driver. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 251 +++---------------------------------- drivers/gpu/drm/xlnx/zynqmp_disp.h | 21 +++- drivers/gpu/drm/xlnx/zynqmp_dp.c | 3 +- drivers/gpu/drm/xlnx/zynqmp_kms.c | 190 +++++++++++++++++++++++++++- drivers/gpu/drm/xlnx/zynqmp_kms.h | 2 + 5 files changed, 232 insertions(+), 235 deletions(-) commit 76c8eeb72dbbe31770c645e4039846f6f4019475 Author: Laurent Pinchart Date: Thu Sep 29 00:25:56 2022 +0300 drm: xlnx: zynqmp_dpsub: Move DRM/KMS initialization to separate file Start preparation for using the DPSUB as a standalone DisplayPort encoder without a display controller by moving the DRM/KMS initialization to a new zynqmp_kms.c file. No functional change intended. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/Makefile | 2 +- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 43 ++--------------------- drivers/gpu/drm/xlnx/zynqmp_kms.c | 70 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/xlnx/zynqmp_kms.h | 19 ++++++++++ 4 files changed, 93 insertions(+), 41 deletions(-) commit 88beb8ccc03223dd2849f8c37cb8afd2e49a0239 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Move planes to zynqmp_dpsub structure Decouple the zynqmp_disp, which handles the hardware configuration, from the DRM planes by moving the planes to the zynqmp_dpsub structure. The planes handling code will be moved to a separate file in a subsequent step. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 32 +++++++++++++------------------- drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 5 +++++ 2 files changed, 18 insertions(+), 19 deletions(-) commit 68dcffea19dd3cb4528886b315f84b376f0c8f5d Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Move CRTC to zynqmp_dpsub structure Decouple the zynqmp_disp, which handles the hardware configuration, from the DRM CRTC by moving the CRTC to the zynqmp_dpsub structure. The CRTC handling code will be moved to a separate file in a subsequent step. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 20 +++++++++----------- drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 3 +++ 2 files changed, 12 insertions(+), 11 deletions(-) commit c979296ef60cdd37b4354c9507a624ae3c5e4bd6 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Move audio clk from zynqmp_disp to zynqmp_dpsub The audio clock is an external resource from the DPSUB point of view, not a resource internal to the display controller. Move it to the zynqmp_dpsub structure, to allow accessing it from outside the disp code. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 54 ++----------------------------------- drivers/gpu/drm/xlnx/zynqmp_disp.h | 2 -- drivers/gpu/drm/xlnx/zynqmp_dp.c | 8 +++--- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 54 +++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 7 +++++ 5 files changed, 65 insertions(+), 60 deletions(-) commit 1682ade6630823dd186723b44991d9933503dfc3 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Move pclk from zynqmp_disp to zynqmp_dpsub The video clock is an external resource from the DPSUB point of view, not a resource internal to the display controller. Move it to the zynqmp_dpsub structure, to allow accessing it from outside the disp code. While at it, rename the fields from pclk and pclk_from_ps to vid_clk and vid_clk_from_ps, to better reflect their purpose and match the documentation. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 36 +++++++----------------------------- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 17 +++++++++++++++++ drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 4 ++++ 3 files changed, 28 insertions(+), 29 deletions(-) commit 96e0e3e3a210ab9c4894da2250bb583dd61ab3a2 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Don't use drmm_kcalloc() for temporary data The array of formats passed to drm_universal_plane_init() doesn't need to outlive the function call, as it's copied internally. Use kcalloc() instead of drmm_kcalloc() to allocate it, and free it right after usage. While at it, move the allocation and initialization of the formats array to a separate function, to prepare for splitting the DRM plane handling to a separate file. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 45 ++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 11 deletions(-) commit 531306f54e84b9502f18db66f81729df7bc5fbe3 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Remplace hardcoded values with ARRAY_SIZE() Use the ARRAY_SIZE() macro to iterate over arrays, instead of hardcoding their size. This makes the code less error-prone should the array size change. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 98c4ecec55d3bd2a8a79eba0adee0285724ea50f Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Pass format info to zynqmp_disp_layer_set_format() The zynqmp_disp_layer_set_format() function only needs format information, not a full plane state. Get the necessary info from the plane state in the caller and pass it to zynqmp_disp_layer_set_format(). This prepares for calling the function from non-DRM code. This doesn't introduce any functional change. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 457d7180d628a303cd3c579e95f24746d915591e Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Use local variable in zynqmp_disp_layer_update() Reuse the local info variable instead of going through the layer pointer in zynqmp_disp_layer_update(). This doesn't introduce any functional change. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36d1b456c5fe33c054e2d5ff0033d05e36fbf8a6 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Configure blender in zynqmp_disp_enable() To prepare for control of the blender outside of the CRTC code, move the setup of the blender to the zynqmp_disp_enable() function. This doesn't introduce any functional change. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a7727b3771084eadc0e5b832756e1a493949a5fd Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Don't pass CRTC to zynqmp_disp_setup_clock() To prepare for usage of the clock setup function outside of the CRTC code, replace the DRM-specific structures passed as parameters with a pointer to the zynqmp_disp and the requested clock rate. This doesn't introduce any functional change. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit c91d2d383537302105c139dfb9f34d12855bb369 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Drop unused zynqmp_disp_format.bus_fmt field The bus_fmt field of the zynqmp_disp_format structure is unused. Drop it. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 2 -- 1 file changed, 2 deletions(-) commit c7bfa73cdfeb66f3c9170e05cab3aa160c93a95b Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Drop unused zynqmp_disp.event field The event field of the zynqmp_disp structure is unused. Drop it. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_disp.c | 3 --- 1 file changed, 3 deletions(-) commit eb2d64bfcc174919a921295a5327b99a3b8f4166 Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Report HPD through the bridge Now that the driver uses the connector bridge helper, HPD can be reported directly for the connector through the drm_bridge_hpd_notify() function. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit cbb11ef9871956244c38ab8520dc9abe87ccdb3b Author: Laurent Pinchart Date: Fri Aug 6 14:29:52 2021 +0300 drm: xlnx: zynqmp_dpsub: Use DRM connector bridge helper Replace the manual connector implementation and registration in the DP encoder with the DRM connector bridge helper. This removes boilerplate code and simplifies the driver. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 90 +------------------------------------ drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 20 ++++++++- 2 files changed, 20 insertions(+), 90 deletions(-) commit bd68b9b3cb2e0d48a6adb773fa11393f869a7f9a Author: Laurent Pinchart Date: Wed Aug 4 19:21:41 2021 +0300 drm: xlnx: zynqmp_dpsub: Attach to the next bridge The next component in the display chain, after the DP encoder, is most likely a DP connector. The display connector driver registers a bridge for it. That bridge doesn't need to be controlled, but is needed in order to use the DRM connector bridge helper. Retrieve it at init time, and attach to it in the DP bridge attach handler. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit e8e357337dc91f6c2c28a06f783f0219b77ba07a Author: Laurent Pinchart Date: Wed Aug 4 19:21:41 2021 +0300 drm: xlnx: zynqmp_dpsub: Move encoder to DPSUB core As part of the transitition of the DP encoder to a DRM bridge, turn the DRM encoder into a dummy encoder and move it out of the DP code, to the DPSUB core. DP encoder operations are handled by the DP bridge, which is now attached to the encoder. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 79 ++----------------------------------- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 16 +++++++- drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 8 ++++ 3 files changed, 25 insertions(+), 78 deletions(-) commit 2374b6ea30384f23a78555c3b962bce358a8869e Author: Laurent Pinchart Date: Wed Aug 4 19:21:41 2021 +0300 drm: xlnx: zynqmp_dpsub: Move connector registration to bridge attach Connector creation requires the DRM encoder, and it thus typically performed in the bridge attach operation. Move it there, to prepare for registration of the DRM bridge. For now the zynqmp_dp_bridge_attach() is called manually at initialization time. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit 5827398b0e765324bdd89df96b3e948847dc7663 Author: Laurent Pinchart Date: Wed Aug 4 19:21:41 2021 +0300 drm: xlnx: zynqmp_dpsub: Don't access connector in zynqmp_dp_set_format() To prepare for the removal of the connector from the DP encoder, pass the display info pointer to the zynqmp_dp_set_format() function instead of accessing the connector internally. The display info is NULL when the function is called at initialization time, as we have no display info at that point. This doesn't change the existing behaviour, given that the zynqmp_dp_set_format() was already handling this as a special case (the display info isn't initialized at init time and is all zeroes). Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 47e801bd0749f0691a137255e2db35f5348f4f4f Author: Laurent Pinchart Date: Wed Aug 4 19:21:41 2021 +0300 drm: xlnx: zynqmp_dpsub: Create DRM bridge to model DP encoder The DP encoder is currently modelled as a DRM encoder and DRM connector. This doesn't support system configurations where the DP encoder is driven by the FPGA programmable logic, using the live video input to the DP subsystem. To enable such use cases, we need to model the encoder as a DRM bridge. As a first step, create a DRM bridge in the DP encoder driver. Move and delegate the implementation of the DRM encoder and connector operations to the bridge to prepare for the transition. The bridge will be registered with the DRM core as a separate change. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 333 ++++++++++++++++++++++++++------------- 1 file changed, 225 insertions(+), 108 deletions(-) commit d693bd3b5b640fadc1d2d310b9bc7256cfdc557c Author: Laurent Pinchart Date: Wed Aug 4 19:21:41 2021 +0300 drm: xlnx: zynqmp_dpsub: Constify mode argument to function The zynqmp_dp_encoder_mode_set_transfer_unit() function takes a mode pointer argument that it doesn't need to modify. Make it const. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ccce29ea4bb73fec9effcca5bafa1c9fe48e2870 Author: Laurent Pinchart Date: Wed Aug 4 19:21:41 2021 +0300 drm: xlnx: zynqmp_dpsub: Switch to atomic encoder enable/disable To prepare for the transition to the DRM bridge API, switch the encoder operations to the atomic versions of .enable() and .disable(). This doesn't cause any functional change by itself. Signed-off-by: Laurent Pinchart drivers/gpu/drm/xlnx/zynqmp_dp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 833cad8c373f31805d5bf44929f1822ddf7a6b48 Author: Laurent Pinchart Date: Fri Aug 6 13:59:45 2021 +0300 dt-bindings: display: xlnx: zynqmp-dpsub: Add OF graph ports The DPSUB doesn't live in isolation, but is connected to the programmable logic for live inputs and outputs, and also has a DisplayPort output. Model all those using OF graph. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring .../bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit c3b63380f52a5cc945c092259c3545fb4915719d Author: Uwe Kleine-König Date: Fri Oct 14 18:12:50 2022 +0200 dmaengine: idma64: Make idma64_remove() return void The function idma64_remove() returns zero unconditionally. Make it return void. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221014161250.468687-1-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul drivers/dma/idma64.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 042427ea0e415ea25468605f1b562f4ecec43541 Author: Siarhei Volkau Date: Wed Oct 19 09:39:34 2022 +0300 dmaengine: JZ4780: Add support for the JZ4755. The JZ4755 has 4 DMA channels per DMA unit, two idential DMA units. The JZ4755 has the similar DMA engine to JZ4725b and it has the same bug as JZ4725b, see commit a40c94be2336. At least the JZ_SOC_DATA_BREAK_LINKS flag make it work much better, although not ideal. Reviewed-by: Paul Cercueil Tested-by: Siarhei Volkau Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221019063934.3278444-3-lis8215@gmail.com Signed-off-by: Vinod Koul drivers/dma/dma-jz4780.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 97c4cf380ff2d5a58ff13b9ac415ad998f623510 Author: Siarhei Volkau Date: Wed Oct 19 09:39:33 2022 +0300 dt-bindings: ingenic: Add support for the JZ4755 dmaengine Update documentation prior to adding driver changes. Acked-by: Krzysztof Kozlowski Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221019063934.3278444-2-lis8215@gmail.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/ingenic,dma.yaml | 1 + 1 file changed, 1 insertion(+) commit 29f4d95b97bcabc0cd83c34495224b24490f0fe0 Author: Amit Kumar Mahapatra Date: Tue Oct 11 11:50:40 2022 +0530 spi: spi-zynqmp-gqspi: Add tap delay support for GQSPI controller on Versal platform Add tap delay support for GQSPI controller on Versal platform. Signed-off-by: Naga Sureshkumar Relli Signed-off-by: Michal Simek Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20221011062040.12116-8-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown drivers/spi/spi-zynqmp-gqspi.c | 86 ++++++++++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 19 deletions(-) commit 824590249b3cdf57d090d4c912f1497b8e61458f Author: Amit Kumar Mahapatra Date: Tue Oct 11 11:50:39 2022 +0530 spi: dt-bindings: zynqmp-qspi: Add support for Xilinx Versal QSPI Add new compatible to support QSPI controller on Xilinx Versal SoCs. Signed-off-by: Amit Kumar Mahapatra Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221011062040.12116-7-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fae7b3c3ecd76a911a1f0e45d2258a420559cbf6 Author: Naga Sureshkumar Relli Date: Tue Oct 11 11:50:38 2022 +0530 spi: spi-zynqmp-gqspi: Add tap delay support for ZynqMP GQSPI Controller GQSPI controller uses the internal clock for loopback mode. The loopback mode is used with the high-speed Quad SPI timing mode, where the memory interface clock needs to be greater than 40 MHz. Based on the tap delay value programmed, the internal clock is delayed and used for capturing the data. Based upon the frequency of operation set the recommended tap delay values in GQSPI driver. Signed-off-by: Naga Sureshkumar Relli Signed-off-by: Michal Simek Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20221011062040.12116-6-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown drivers/spi/spi-zynqmp-gqspi.c | 50 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) commit 1e400cb9cff2157f89ca95aba4589f95253425ba Author: Rajan Vaja Date: Tue Oct 11 11:50:37 2022 +0530 firmware: xilinx: Add qspi firmware interface Add support for QSPI ioctl functions and enums. Signed-off-by: Rajan Vaja Signed-off-by: Michal Simek Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20221011062040.12116-5-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown drivers/firmware/xilinx/zynqmp.c | 7 +++++++ include/linux/firmware/xlnx-zynqmp.h | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) commit 21764a49d32e041e9d118a7b38c14e3e02fae129 Author: Amit Kumar Mahapatra Date: Tue Oct 11 11:50:36 2022 +0530 spi: spi-zynqmp-gqspi: Avoid setting baud rate multiple times for same SPI frequency During every transfer the GQSPI driver configures the baud rate value. But when there is no change in the SPI clock frequency the driver should avoid rewriting the same baud rate value to the configuration register. Update GQSPI driver to rewrite the baud rate value if there is any change in SPI clock frequency. Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20221011062040.12116-4-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown drivers/spi/spi-zynqmp-gqspi.c | 49 ++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 14 deletions(-) commit 22742b8bbdd9fee1ae30be49c7e7e3becba96fc1 Author: Amit Kumar Mahapatra Date: Tue Oct 11 11:50:35 2022 +0530 spi: spi-zynqmp-gqspi: Set CPOL and CPHA during hardware init During every transfer GQSPI driver writes the CPOL & CPHA values to the configuration register. But the CPOL & CPHA values do not change in between multiple transfers, so moved the CPOL & CPHA initialization to hardware init so that the values are written only once. Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20221011062040.12116-3-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown drivers/spi/spi-zynqmp-gqspi.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit b3b953084b1bd0e74785bc5017444dd56952fb39 Author: Amit Kumar Mahapatra Date: Tue Oct 11 11:50:34 2022 +0530 spi: spi-zynqmp-gqspi: Fix kernel-doc warnings Document zynqmp_qspi ctrl and op_lock member description. It also adds return documentation for 'zynqmp_qspi_setuprxdma' and zynqmp_qspi_read_op. Fixes below kernel-doc warnings- spi-zynqmp-gqspi.c:178: warning: Function parameter or member 'ctlr' not described in 'zynqmp_qspi' spi-zynqmp-gqspi.c:178: warning: Function parameter or member 'op_lock' not described in 'zynqmp_qspi' spi-zynqmp-gqspi.c:737: warning: No description found for return value of 'zynqmp_qspi_setuprxdma' spi-zynqmp-gqspi.c:822: warning: No description found for return value of 'zynqmp_qspi_read_op' Signed-off-by: Michal Simek Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20221011062040.12116-2-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown drivers/spi/spi-zynqmp-gqspi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d15aae73a9f6c321167b9120f263df7dbc08d2ba Author: Kevin Hilman Date: Thu Sep 29 16:48:20 2022 -0700 dmaengine: ti: convert PSIL to be buildable as module Combine all the SoC specific files into a single lib that can be built-in or built as a module. Acked-by: Peter Ujfalusi Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20220929234820.940048-4-khilman@baylibre.com Signed-off-by: Vinod Koul drivers/dma/ti/Kconfig | 3 ++- drivers/dma/ti/Makefile | 15 ++++++++------- drivers/dma/ti/k3-psil.c | 2 ++ 3 files changed, 12 insertions(+), 8 deletions(-) commit 56b0a668cb35c5f04ef98ffc22b297f116fe7108 Author: Kevin Hilman Date: Thu Sep 29 16:48:19 2022 -0700 dmaengine: ti: convert k3-udma to module Currently k3-udma driver is built as separate platform drivers with a shared probe and identical code path, just differnet platform data. To enable to build as module, convert the separate platform driver into a single module_platform_driver with the data selection done via compatible string and of_match. The separate of_match tables are also combined into a single table to avoid the multiple calls to of_match_node() Since all modern TI platforms using this are DT enabled, the removal of separate platform_drivers should have no functional change. Acked-by: Peter Ujfalusi Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20220929234820.940048-3-khilman@baylibre.com Signed-off-by: Vinod Koul drivers/dma/ti/Kconfig | 4 ++-- drivers/dma/ti/k3-udma-glue.c | 5 ++++- drivers/dma/ti/k3-udma.c | 40 +++++----------------------------------- 3 files changed, 11 insertions(+), 38 deletions(-) commit beb6f6493853d862490f0d5b99910caa358dd3d4 Author: Kevin Hilman Date: Thu Sep 29 16:48:18 2022 -0700 of/irq: export of_msi_get_domain Export of_mis_get_domain to enable it for users from outside. Signed-off-by: Matthias Brugger Acked-by: Rob Herring Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200122104723.16955-1-peter.ujfalusi@ti.com Signed-off-by: Kevin Hilman Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20220929234820.940048-2-khilman@baylibre.com Signed-off-by: Vinod Koul drivers/of/irq.c | 1 + 1 file changed, 1 insertion(+) commit 4967a7803c341361a8bf67ace206bca8b390dc22 Author: Colin Ian King Date: Tue Oct 4 17:09:13 2022 +0100 dmaengine: ioat: Fix spelling mistake "idel" -> "idle" There is a spelling mistake in the module description. Fix it. Signed-off-by: Colin Ian King Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20221004160913.154739-1-colin.i.king@gmail.com Signed-off-by: Vinod Koul drivers/dma/ioat/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a526a3cc9c8d426713f8bebc18ebbe39a8495d82 Author: Alexandru Tachici Date: Mon Oct 17 19:37:03 2022 +0300 net: ethernet: adi: adin1110: Fix SPI transfers No need to use more than one SPI transfer for reads. Use only one from now as ADIN1110/2111 does not tolerate CS changes during reads. The BCM2711/2708 SPI controllers worked fine, but the NXP IMX8MM could not keep CS lowered during SPI bursts. This change aims to make the ADIN1110/2111 driver compatible with both SPI controllers, without any loss of bandwidth/other capabilities. Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support") Signed-off-by: Alexandru Tachici Signed-off-by: David S. Miller drivers/net/ethernet/adi/adin1110.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit ac3208fbac43a41e2aec94ca382dff43c7ee7323 Merge: 5cacb2c7c9a4 d1942cd47dbd Author: David S. Miller Date: Wed Oct 19 14:01:08 2022 +0100 Merge branch 'net-bridge-mc-cleanups' Ido Schimmel says: ==================== bridge: A few multicast cleanups Clean up a few issues spotted while working on the bridge multicast code and running its selftests. ==================== Signed-off-by: David S. Miller commit d1942cd47dbdfb5a6187f660418a4e1be38d1312 Author: Ido Schimmel Date: Tue Oct 18 09:40:01 2022 +0300 bridge: mcast: Simplify MDB entry creation Before creating a new MDB entry, br_multicast_new_group() will call br_mdb_ip_get() to see if one exists and return it if so. Therefore, simply call br_multicast_new_group() and omit the call to br_mdb_ip_get(). Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_mdb.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 262985fad1bd819d1323c6dbd72a8d9ed1c6090c Author: Ido Schimmel Date: Tue Oct 18 09:40:00 2022 +0300 bridge: mcast: Use spin_lock() instead of spin_lock_bh() IGMPv3 / MLDv2 Membership Reports are only processed from the data path with softIRQ disabled, so there is no need to call spin_lock_bh(). Use spin_lock() instead. This is consistent with how other IGMP / MLD packets are processed. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_multicast.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b526b2ea1454d03b294cd10aa35695d5232b1106 Author: Ido Schimmel Date: Tue Oct 18 09:39:59 2022 +0300 selftests: bridge_igmp: Remove unnecessary address deletion The test group address is added and removed in v2reportleave_test(). There is no need to delete it again during cleanup as it results in the following error message: # bash -x ./bridge_igmp.sh [...] + cleanup + pre_cleanup [...] + ip address del dev swp4 239.10.10.10/32 RTNETLINK answers: Cannot assign requested address + h2_destroy Solve by removing the unnecessary address deletion. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/bridge_igmp.sh | 3 --- 1 file changed, 3 deletions(-) commit 6fb1faa1b92b19e3b1fad70a800c87bee934d67b Author: Ido Schimmel Date: Tue Oct 18 09:39:58 2022 +0300 selftests: bridge_vlan_mcast: Delete qdiscs during cleanup The qdiscs are added during setup, but not deleted during cleanup, resulting in the following error messages: # ./bridge_vlan_mcast.sh [...] # ./bridge_vlan_mcast.sh Error: Exclusivity flag on, cannot modify. Error: Exclusivity flag on, cannot modify. Solve by deleting the qdiscs during cleanup. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh | 3 +++ 1 file changed, 3 insertions(+) commit 88bc8ac63db045e74b2ea7015c51384c05b09ae5 Author: Krzysztof Kozlowski Date: Tue Oct 18 19:03:49 2022 -0400 dmaengine: qcom: gpi: Document preferred SM6350 binding Devices with ee offset of 0x10000 should rather bind with SM6350 compatible, so the list will not unnecessarily grow for compatible devices. Signed-off-by: Krzysztof Kozlowski Acked-by: Richard Acayan Link: https://lore.kernel.org/r/20221018230352.1238479-3-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul drivers/dma/qcom/gpi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit dfad1e14b27734b204ea821977d43b16d1d1919f Author: Krzysztof Kozlowski Date: Tue Oct 18 19:03:48 2022 -0400 dt-bindings: dma: qcom: gpi: Use sm6350 fallback Several devices like SM6350, SM8150 and SC7280 are actually compatible, so use one compatible fallback for all of them. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221018230352.1238479-2-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8527721ee6bd596a211fa2a1bbaf939e994cb89c Author: Richard Acayan Date: Mon Oct 17 20:57:39 2022 -0400 dmaengine: qcom: deprecate redundant of_device_id entries The drivers are transitioning from matching against lists of specific compatible strings to matching against smaller lists of more generic compatible strings. Add a message that the compatible strings with an ee_offset of 0 are deprecated except for the SDM845 compatible string. Signed-off-by: Richard Acayan Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221018005740.23952-4-mailingradian@gmail.com Signed-off-by: Vinod Koul drivers/dma/qcom/gpi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 67fd570d734d35ef6b5e8ee5a3195a2aa843c2d8 Author: Richard Acayan Date: Mon Oct 17 20:57:38 2022 -0400 dt-bindings: dma: qcom: gpi: add compatible for sdm670 The Snapdragon 670 uses GPI DMA for its GENI interface. Add a compatible string for it in the documentation. Signed-off-by: Richard Acayan Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221018005740.23952-3-mailingradian@gmail.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 + 1 file changed, 1 insertion(+) commit 3c6bd6fa83bb6c7a891891a8a32aea2820aadb06 Author: Richard Acayan Date: Mon Oct 17 20:57:37 2022 -0400 dt-bindings: dma: qcom: gpi: add fallback compatible The drivers are transitioning from matching against lists of specific compatible strings to matching against smaller lists of more generic compatible strings. Use the SDM845 compatible string as a fallback in the schema to support this change. Signed-off-by: Richard Acayan Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221018005740.23952-2-mailingradian@gmail.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit f74495761df10c25a98256d16ea7465191b6e2cd Author: Pierre-Louis Bossart Date: Tue Oct 18 09:25:00 2022 +0800 soundwire: dmi-quirks: add quirk variant for LAPBC710 NUC15 Some NUC15 LAPBC710 devices don't expose the same DMI information as the Intel reference, add additional entry in the match table. BugLink: https://github.com/thesofproject/linux/issues/3885 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221018012500.1592994-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/dmi-quirks.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 20c68127e8e9d7899001c47465d0b79581f5fdc1 Author: Nirmoy Das Date: Fri Oct 14 17:46:55 2022 +0200 drm/i915: Print return value on error Print returned error code for better debuggability. References: https://gitlab.freedesktop.org/drm/intel/-/issues/7211 Signed-off-by: Nirmoy Das Reviewed-by: Andrzej Hajda Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221014154655.14075-1-nirmoy.das@intel.com drivers/gpu/drm/i915/display/intel_fbdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6667d78a1123d237d66e34923754ebca97d06d39 Author: Nirmoy Das Date: Fri Oct 14 15:14:27 2022 +0200 drm/i915: Refactor ttm ghost obj detection Currently i915_ttm_to_gem() returns NULL for ttm ghost object which makes it unclear when we should add a NULL check for a caller of i915_ttm_to_gem() as ttm ghost objects are expected behaviour for certain cases. Create a separate function to detect ttm ghost object and use that in places where we expect a ghost obj from ttm. Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221014131427.21102-1-nirmoy.das@intel.com drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 21 ++++++++++----------- drivers/gpu/drm/i915/gem/i915_gem_ttm.h | 18 +++++++++++++----- drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 2 +- 3 files changed, 24 insertions(+), 17 deletions(-) commit 5cacb2c7c9a4035238cbd7cbd3cf751f825d9f90 Merge: 88a2b3cbb7b9 4e748b1bd7c0 Author: David S. Miller Date: Wed Oct 19 13:25:09 2022 +0100 Merge branch 'dpaa-phylink' Sean Anderson says: ==================== net: dpaa: Convert to phylink This series converts the DPAA driver to phylink. I have tried to maintain backwards compatibility with existing device trees whereever possible. However, one area where I was unable to achieve this was with QSGMII. Please refer to patch 2 for details. All mac drivers have now been converted. I would greatly appreciate if anyone has T-series or P-series boards they can test/debug this series on. I only have an LS1046ARDB. Everything but QSGMII should work without breakage; QSGMII needs patches 7 and 8. For this reason, the last 4 patches in this series should be applied together (and should not go through separate trees). Changes in v7: - provide phylink_validate_mask_caps() helper - Fix oops if memac_pcs_create returned -EPROBE_DEFER - Fix using pcs-names instead of pcs-handle-names - Fix not checking for -ENODATA when looking for sgmii pcs - Fix 81-character line - Simplify memac_validate with phylink_validate_mask_caps Changes in v6: - Remove unnecessary $ref from renesas,rzn1-a5psw - Remove unnecessary type from pcs-handle-names - Add maxItems to pcs-handle - Fix 81-character line - Fix uninitialized variable in dtsec_mac_config Changes in v5: - Add Lynx PCS binding Changes in v4: - Use pcs-handle-names instead of pcs-names, as discussed - Don't fail if phy support was not compiled in - Split off rate adaptation series - Split off DPAA "preparation" series - Split off Lynx 10G support - t208x: Mark MAC1 and MAC2 as 10G - Add XFI PCS for t208x MAC1/MAC2 Changes in v3: - Expand pcs-handle to an array - Add vendor prefix 'fsl,' to rgmii and mii properties. - Set maxItems for pcs-names - Remove phy-* properties from example because dt-schema complains and I can't be bothered to figure out how to make it work. - Add pcs-handle as a preferred version of pcsphy-handle - Deprecate pcsphy-handle - Remove mii/rmii properties - Put the PCS mdiodev only after we are done with it (since the PCS does not perform a get itself). - Remove _return label from memac_initialization in favor of returning directly - Fix grabbing the default PCS not checking for -ENODATA from of_property_match_string - Set DTSEC_ECNTRL_R100M in dtsec_link_up instead of dtsec_mac_config - Remove rmii/mii properties - Replace 1000Base... with 1000BASE... to match IEEE capitalization - Add compatibles for QSGMII PCSs - Split arm and powerpcs dts updates Changes in v2: - Better document how we select which PCS to use in the default case - Move PCS_LYNX dependency to fman Kconfig - Remove unused variable slow_10g_if - Restrict valid link modes based on the phy interface. This is easier to set up, and mostly captures what I intended to do the first time. We now have a custom validate which restricts half-duplex for some SoCs for RGMII, but generally just uses the default phylink validate. - Configure the SerDes in enable/disable - Properly implement all ethtool ops and ioctls. These were mostly stubbed out just enough to compile last time. - Convert 10GEC and dTSEC as well - Fix capitalization of mEMAC in commit messages - Add nodes for QSGMII PCSs - Add nodes for QSGMII PCSs ==================== Signed-off-by: David S. Miller commit 4e748b1bd7c06c9f744b873939aef8982d81dcaf Author: Sean Anderson Date: Mon Oct 17 16:22:41 2022 -0400 arm64: dts: layerscape: Add nodes for QSGMII PCSs Now that we actually read registers from QSGMII PCSs, it's important that we have the correct address (instead of hoping that we're the MAC with all the QSGMII PCSs on its bus). This adds nodes for the QSGMII PCSs. The exact mapping of QSGMII to MACs depends on the SoC. Since the first QSGMII PCSs share an address with the SGMII and XFI PCSs, we only add new nodes for PCSs 2-4. This avoids address conflicts on the bus. Signed-off-by: Sean Anderson Signed-off-by: David S. Miller arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi | 24 +++++++++++++++++++++ arch/arm64/boot/dts/freescale/fsl-ls1046-post.dtsi | 25 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit 4e31b808fad1f7c505f916e844000aa9dcbd2ccf Author: Sean Anderson Date: Mon Oct 17 16:22:40 2022 -0400 powerpc: dts: qoriq: Add nodes for QSGMII PCSs Now that we actually read registers from QSGMII PCSs, it's important that we have the correct address (instead of hoping that we're the MAC with all the QSGMII PCSs on its bus). This adds nodes for the QSGMII PCSs. They have the same addresses on all SoCs (e.g. if QSGMIIA is present it's used for MACs 1 through 4). Since the first QSGMII PCSs share an address with the SGMII and XFI PCSs, we only add new nodes for PCSs 2-4. This avoids address conflicts on the bus. Signed-off-by: Sean Anderson Signed-off-by: David S. Miller arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi | 3 ++- arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-2.dtsi | 3 ++- arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-3.dtsi | 3 ++- arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi | 3 ++- arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi | 3 ++- arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi | 3 ++- arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi | 10 +++++++++- arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi | 3 ++- arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi | 10 +++++++++- 20 files changed, 131 insertions(+), 20 deletions(-) commit 36926a7d70c2d462fca1ed85bfee000d17fd8662 Author: Sean Anderson Date: Mon Oct 17 16:22:39 2022 -0400 powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G On the T208X SoCs, MAC1 and MAC2 support XGMII. Add some new MAC dtsi fragments, and mark the QMAN ports as 10G. Fixes: da414bb923d9 ("powerpc/mpc85xx: Add FSL QorIQ DPAA FMan support to the SoC device tree(s)") Signed-off-by: Sean Anderson Signed-off-by: David S. Miller arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-2.dtsi | 44 ++++++++++++++++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-3.dtsi | 44 ++++++++++++++++++++++ arch/powerpc/boot/dts/fsl/t2081si-post.dtsi | 4 +- 3 files changed, 90 insertions(+), 2 deletions(-) commit 5d93cfcf7360eac9903774fe94f626c9ead2049d Author: Sean Anderson Date: Mon Oct 17 16:22:38 2022 -0400 net: dpaa: Convert to phylink This converts DPAA to phylink. All macs are converted. This should work with no device tree modifications (including those made in this series), except for QSGMII (as noted previously). The mEMAC configuration is one of the tricker areas. I have tried to capture all the restrictions across the various models. Most of the time, we assume that if the serdes supports a mode or the phy-interface-mode specifies it, then we support it. The only place we can't do this is (RG)MII, since there's no serdes. In that case, we rely on a (new) devicetree property. There are also several cases where half-duplex is broken. Unfortunately, only a single compatible is used for the MAC, so we have to use the board compatible instead. The 10GEC conversion is very straightforward, since it only supports XAUI. There is generally nothing to configure. The dTSEC conversion is broadly similar to mEMAC, but is simpler because we don't support configuring the SerDes (though this can be easily added) and we don't have multiple PCSs. From what I can tell, there's nothing different in the driver or documentation between SGMII and 1000BASE-X except for the advertising. Similarly, I couldn't find anything about 2500BASE-X. In both cases, I treat them like SGMII. These modes aren't used by any in-tree boards. Similarly, despite being mentioned in the driver, I couldn't find any documented SoCs which supported QSGMII. I have left it unimplemented for now. Signed-off-by: Sean Anderson Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/Kconfig | 4 +- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 89 +--- drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 90 +--- drivers/net/ethernet/freescale/fman/Kconfig | 1 - drivers/net/ethernet/freescale/fman/fman_dtsec.c | 458 ++++++++--------- drivers/net/ethernet/freescale/fman/fman_mac.h | 10 - drivers/net/ethernet/freescale/fman/fman_memac.c | 547 +++++++++++---------- drivers/net/ethernet/freescale/fman/fman_tgec.c | 131 +++-- drivers/net/ethernet/freescale/fman/mac.c | 168 +------ drivers/net/ethernet/freescale/fman/mac.h | 23 +- 10 files changed, 612 insertions(+), 909 deletions(-) commit a7c2a32e7f22cf5648c52e05a21725a9d0675649 Author: Sean Anderson Date: Mon Oct 17 16:22:37 2022 -0400 net: fman: memac: Use lynx pcs driver Although not stated in the datasheet, as far as I can tell PCS for mEMACs is a "Lynx." By reusing the existing driver, we can remove the PCS management code from the memac driver. This requires calling some PCS functions manually which phylink would usually do for us, but we will let it do that soon. One problem is that we don't actually have a PCS for QSGMII. We pretend that each mEMAC's MDIO bus has four QSGMII PCSs, but this is not the case. Only the "base" mEMAC's MDIO bus has the four QSGMII PCSs. This is not an issue yet, because we never get the PCS state. However, it will be once the conversion to phylink is complete, since the links will appear to never come up. To get around this, we allow specifying multiple PCSs in pcsphy. This breaks backwards compatibility with old device trees, but only for QSGMII. IMO this is the only reasonable way to figure out what the actual QSGMII PCS is. Additionally, we now also support a separate XFI PCS. This can allow the SerDes driver to set different addresses for the SGMII and XFI PCSs so they can be accessed at the same time. Signed-off-by: Sean Anderson Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/Kconfig | 3 + drivers/net/ethernet/freescale/fman/fman_memac.c | 258 +++++++++-------------- 2 files changed, 105 insertions(+), 156 deletions(-) commit 0fc83bd79589b3e354535a4761a4b2a483f2f14c Author: Sean Anderson Date: Mon Oct 17 16:22:36 2022 -0400 net: fman: memac: Add serdes support This adds support for using a serdes which has to be configured. This is primarly in preparation for phylink conversion, which will then change the serdes mode dynamically. Signed-off-by: Sean Anderson Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_memac.c | 49 +++++++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) commit f392a1846489720fc2e063d1210633b6cf4ec5a4 Author: Russell King (Oracle) Date: Mon Oct 17 16:22:35 2022 -0400 net: phylink: provide phylink_validate_mask_caps() helper Provide a helper that restricts the link modes according to the phylink capabilities. Signed-off-by: Russell King (Oracle) [rebased on net-next/master and added documentation] Signed-off-by: Sean Anderson Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 41 +++++++++++++++++++++++++++++------------ include/linux/phylink.h | 3 +++ 2 files changed, 32 insertions(+), 12 deletions(-) commit 045d05018a2da6cb0944a40f3811fbecce6401c1 Author: Sean Anderson Date: Mon Oct 17 16:22:34 2022 -0400 dt-bindings: net: fman: Add additional interface properties At the moment, mEMACs are configured almost completely based on the phy-connection-type. That is, if the phy interface is RGMII, it assumed that RGMII is supported. For some interfaces, it is assumed that the RCW/bootloader has set up the SerDes properly. This is generally OK, but restricts runtime reconfiguration. The actual link state is never reported. To address these shortcomings, the driver will need additional information. First, it needs to know how to access the PCS/PMAs (in order to configure them and get the link status). The SGMII PCS/PMA is the only currently-described PCS/PMA. Add the XFI and QSGMII PCS/PMAs as well. The XFI (and 10GBASE-KR) PCS/PMA is a c45 "phy" which sits on the same MDIO bus as SGMII PCS/PMA. By default they will have conflicting addresses, but they are also not enabled at the same time by default. Therefore, we can let the XFI PCS/PMA be the default when phy-connection-type is xgmii. This will allow for backwards-compatibility. QSGMII, however, cannot work with the current binding. This is because the QSGMII PCS/PMAs are only present on one MAC's MDIO bus. At the moment this is worked around by having every MAC write to the PCS/PMA addresses (without checking if they are present). This only works if each MAC has the same configuration, and only if we don't need to know the status. Because the QSGMII PCS/PMA will typically be located on a different MDIO bus than the MAC's SGMII PCS/PMA, there is no fallback for the QSGMII PCS/PMA. Signed-off-by: Sean Anderson Reviewed-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/net/fsl,fman-dtsec.yaml | 53 ++++++++++++++++------ Documentation/devicetree/bindings/net/fsl-fman.txt | 5 +- 2 files changed, 43 insertions(+), 15 deletions(-) commit 00af103d06b35e0acb2213a8479fe7ef5dad1115 Author: Sean Anderson Date: Mon Oct 17 16:22:33 2022 -0400 dt-bindings: net: Add Lynx PCS binding This binding is fairly bare-bones for now, since the Lynx driver doesn't parse any properties (or match based on the compatible). We just need it in order to prevent the PCS nodes from having phy devices attached to them. This is not really a problem, but it is a bit inefficient. This binding is really for three separate PCSs (SGMII, QSGMII, and XFI). However, the driver treats all of them the same. This works because the SGMII and XFI devices typically use the same address, and the SerDes driver (or RCW) muxes between them. The QSGMII PCSs have the same register layout as the SGMII PCSs. To do things properly, we'd probably do something like ethernet-pcs@0 { #pcs-cells = <1>; compatible = "fsl,lynx-pcs"; reg = <0>, <1>, <2>, <3>; }; but that would add complexity, and we can describe the hardware just fine using separate PCSs for now. Signed-off-by: Sean Anderson Reviewed-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/net/pcs/fsl,lynx-pcs.yaml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 76025ee53b7dc8dd9633231829b996d181bbcef2 Author: Sean Anderson Date: Mon Oct 17 16:22:32 2022 -0400 dt-bindings: net: Expand pcs-handle to an array This allows multiple phandles to be specified for pcs-handle, such as when multiple PCSs are present for a single MAC. To differentiate between them, also add a pcs-handle-names property. Signed-off-by: Sean Anderson Reviewed-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml | 2 +- .../devicetree/bindings/net/ethernet-controller.yaml | 11 ++++++++++- Documentation/devicetree/bindings/net/fsl,qoriq-mc-dpmac.yaml | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) commit 3be6acda8241352c57d47b4d7d9968cadcb954ea Author: Giulio Benetti Date: Tue Oct 18 23:57:54 2022 +0200 spi: fsl-cpm: substitute empty_zero_page with helper ZERO_PAGE(0) Not all zero page implementations use empty_zero_page global pointer so let's substitute empty_zero_page occurence with helper ZERO_PAGE(0). Signed-off-by: Giulio Benetti Link: https://lore.kernel.org/r/20221018215755.33566-2-giulio.benetti@benettiengineering.com Signed-off-by: Mark Brown drivers/spi/spi-fsl-cpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25106550f1366bec8a9adefeada5e8ff5205c828 Author: Kuninori Morimoto Date: Wed Oct 19 00:37:26 2022 +0000 ASoC: soc-dpcm.h: remove snd_soc_dpcm::hw_param Current soc-pcm.c is coping fe hw_param to dpcm->hw_param (A), fixup it (B), and copy it to be (C). int dpcm_be_dai_hw_params(...) { ... for_each_dpcm_be(fe, stream, dpcm) { ... /* copy params for each dpcm */ (A) memcpy(&dpcm->hw_params, &fe->dpcm[stream].hw_params, ...) ; /* perform any hw_params fixups */ (B) ret = snd_soc_link_be_hw_params_fixup(be, &dpcm->hw_params); ... /* copy the fixed-up hw params for BE dai */ (C) memcpy(&be->dpcm[stream].hw_params, &dpcm->hw_params, ...); ... } ... } But here, (1) it is coping hw_params without caring stream (Playback/Capture), (2) we can get same value from be. We don't need to have dpcm->hw_params. This patch removes it. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/87v8ogsl6h.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown include/sound/soc-dpcm.h | 2 -- sound/soc/sh/rcar/core.c | 3 ++- sound/soc/soc-pcm.c | 12 +++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) commit c670a224d1367f5bb3cc40c6b6b1ba0591b26df9 Author: Kuninori Morimoto Date: Wed Oct 19 00:37:20 2022 +0000 ASoC: soc-dapm.h: fixup comment for snd_soc_dapm_widget_for_each_path() The comment of snd_soc_dapm_widget_for_each_path() (= X) has "_sink_" (= s), but this is typo. With "_sink_" is already exist at (A). This patch fixup it. /** (s) * snd_soc_dapm_widget_for_each_sink_path - ... * **** */ (X) #define snd_soc_dapm_widget_for_each_path(w, dir, p) /** (s) * snd_soc_dapm_widget_for_each_sink_path_safe - ... * **** */ (X) #define snd_soc_dapm_widget_for_each_path_safe(w, dir, p, next_p) (A) #define snd_soc_dapm_widget_for_each_sink_path(w, p) **** Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/87wn8wsl6n.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown include/sound/soc-dapm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f3779b161938182fa3c67f8daebfe82ef65bf1ab Author: Kuninori Morimoto Date: Wed Oct 19 00:37:13 2022 +0000 ASoC: soc-dapm.h: cleanup white space soc-dapm.h defines many things, but it is using randam white space and tag. This patch do nothing, but cleanup its white space. This patch cleanup also 100 char in 1 line. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/87y1tcsl6u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown include/sound/soc-dapm.h | 173 +++++++++++++++++++---------------------------- 1 file changed, 71 insertions(+), 102 deletions(-) commit 1f5ac87e83e0786197d4aba9c5071ff2dd8b6ad3 Author: Kuninori Morimoto Date: Wed Oct 19 00:37:07 2022 +0000 ASoC: soc-dapm.c: numerical order for dapm_up_seq dapm_up_seq is arranged in numerical order, but _dai_link is out of order. This patch tidyup it. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/87zgdssl70.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a7c2e962e42d19bf08ffe0ed56b40ba23717e2b Author: Kuninori Morimoto Date: Wed Oct 19 00:37:00 2022 +0000 ASoC: soc-dapm.c: cleanup snd_soc_dapm_new_dai() snd_soc_dapm_new_dai() setups local variable "template" at (X) and (Y), which is used at (Z). But these are difficult to read. static struct snd_soc_dapm_widget * snd_soc_dapm_new_dai() { ... ^ template.reg = ... | template.id = ... (X) template.name = ... | template.event = ... | template.event_flags = ... v template.kcontrol_news = ... if (rtd->dai_link->num_params > 1) { ... ^ template.num_kcontrols = ... (Y) template.kcontrol_news = ... v ... } ... (Z) w = snd_soc_dapm_new_control_unlocked(..., &template); } And this function has error message, but not for all cases. This patch (1) setups "template" in one place, and indicate error message for all cases. This patch cleanup the code, but nothing changed for meaning. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/871qr4tzro.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 9941ba4baed0a4388028e2ce3ff769d50324068a Author: Kuninori Morimoto Date: Wed Oct 19 00:36:51 2022 +0000 ASoC: soc-dapm.c: merge dapm_power_one_widget() and dapm_widget_set_power() dapm_widget_set_power() (= X) is called only from dapm_power_one_widget() (= Y), and total purpose of these functions are calling dapm_seq_insert() (= a) accordingly for each widget. (X) static void dapm_widget_set_power(...) { ... if (power) (a) dapm_seq_insert(w, up_list, true); else (a) dapm_seq_insert(w, down_list, false); } (Y) static void dapm_power_one_widget(...) { .. switch (w->id) { case snd_soc_dapm_pre: (a) dapm_seq_insert(w, down_list, false); break; case snd_soc_dapm_post: (a) dapm_seq_insert(w, up_list, true); break; default: power = dapm_widget_power_check(w); (X) dapm_widget_set_power(w, power, up_list, down_list); break; } } It should be more simple, but the code is unnecessarily complicated, and difficult to read/understand. This patch merge these into one. Link: https://lore.kernel.org/all/87tu42owdd.wl-kuninori.morimoto.gx@renesas.com/ Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/8735bktzrx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) commit 2e3fafbb14300212d056d1ad2163bb38453be069 Author: Kuninori Morimoto Date: Wed Oct 19 00:36:30 2022 +0000 ASoC: soc-dapm.c: cleanup dapm_widget_set_power() This patch cleanup dapm_widget_set_power() comment, parenthesis, and 100 chars. It has no meaning, nothing will be changed. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/874jw0tzsh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit c196b412314fef9516af9bc1141e631af15e308f Author: Kuninori Morimoto Date: Wed Oct 19 00:36:21 2022 +0000 ASoC: soc-dapm.c: ignore parameter NULL at snd_soc_dapm_free_widget() Currently snd_soc_dapm_free_widget() is assuming input parameter is non NULL. Thus, caller need to care about it. This patch care it at snd_soc_dapm_free_widget(). Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/875yggtzsq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/codecs/hda.c | 6 ++---- sound/soc/intel/avs/pcm.c | 6 ++---- sound/soc/soc-dapm.c | 3 +++ 3 files changed, 7 insertions(+), 8 deletions(-) commit 943402b54eac4b2045f49471016eb170239e2af2 Author: Kuninori Morimoto Date: Wed Oct 19 00:36:14 2022 +0000 ASoC: soc-dapm.c: remove no meaning variable from snd_soc_dapm_add_path() snd_soc_dapm_add_path() is using local variable "widgets[]", but it is same as path->node[]. This is no meaning and duplicate operation. This patch removes "widgets[]". path->node[SND_SOC_DAPM_DIR_IN] = wsource; path->node[SND_SOC_DAPM_DIR_OUT] = wsink; widgets[SND_SOC_DAPM_DIR_IN] = wsource; widgets[SND_SOC_DAPM_DIR_OUT] = wsink; Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/877d0wtzsx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f19a2ec7a303c22e22437fb93ff4f6d4337c096e Author: Kuninori Morimoto Date: Wed Oct 19 00:36:06 2022 +0000 ASoC: soc-dapm.c: tidyup error handling on snd_soc_dapm_add_route() Current error handling on snd_soc_dapm_add_route() has some wastes. It indicates *own* error message *only* for sink or source, and return error directly at (A). OTOH, it has similar error message at (B) which indicates *both* sink/source. And more, (A) is using dev_err(), (B) is using dev_warn(). (B) is caring prefix, but (A) is not. (X) int snd_soc_dapm_add_route(...) { ... if (wsource == NULL) { (A) dev_err(...); return -ENODEV; } if (wsink == NULL) { (A) dev_err(...); return -ENODEV; } ... ret = snd_soc_dapm_add_path(...); if (ret) (B) goto err; return 0; err: (B) dev_warn(...); return ret; } Above snd_soc_dapm_add_route() (= X) is called from snd_soc_dapm_add_routes() (= Y). (X) will indicate error message by itself, but (Y) will indicate own error message at (C). (C) is duplicated. (Y) int snd_soc_dapm_add_routes(...) { ... for (...) { (X) int r = snd_soc_dapm_add_route(...); if (r < 0) { (C) dev_err(...); ret = r; } ... } ... } This patch (1) merges these error message (= A,B) into one, (2) use dev_err(), (3) remove duplicate error message (= C) from snd_soc_dapm_add_routes(). By this patch, it will indicate error message like this. - error message with prefix - not found widget will have "(*)" mark - it indicates [control] if exists. ex) [if no sink with control] ASoC: Failed to add route SOURCE -> [CTRL] -> SINK(*) [if no source without control] ASoC: Failed to add route SOURCE(*) -> SINK Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/878rlctzt5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) commit 86b94c396bb25459affbf1160ee1efaa61e38be2 Author: Kuninori Morimoto Date: Wed Oct 19 00:35:57 2022 +0000 ASoC: soc-dapm.c: replace snd_soc_dapm_wcache to snd_soc_dapm_widget Current ASoC has snd_soc_dapm_wcache, but its member is only snd_soc_dapm_widget. struct snd_soc_dapm_wcache { struct snd_soc_dapm_widget *widget; }; It is no meaning for now, and makes code unreadable. This patch replace snd_soc_dapm_wcache to snd_soc_dapm_widget directly. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/87a65stztf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown include/sound/soc-dapm.h | 9 ++------- sound/soc/soc-dapm.c | 29 +++++++++-------------------- 2 files changed, 11 insertions(+), 27 deletions(-) commit 4306fc8f8317f8e21d625733b1ad2d9f5265b441 Author: Shaomin Deng Date: Mon Oct 17 10:18:12 2022 -0400 ASoC: meson: axg-pdm: Fix double word in comments Delete the doubled word "for" in comments. Signed-off-by: Shaomin Deng Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20221017141812.6867-1-dengshaomin@cdjrlc.com Signed-off-by: Mark Brown sound/soc/meson/axg-pdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af7b5657e3b535c871a32a2e5c872a0985eaadb7 Merge: fd65e099235f 0135ae74b4f1 Author: Mark Brown Date: Wed Oct 19 12:03:40 2022 +0100 ASoC: soc-dapm.c random cleanups Merge series from Kuninori Morimoto : These are random cleanup for soc-dpam.c/h. Basically, these are just cleanup, nothing changed. commit fd65e099235f99415178484b328cc230ad021d18 Merge: 67860d2a8e0d 9f68d6e64f51 Author: Mark Brown Date: Wed Oct 19 12:03:33 2022 +0100 ASoC: Intel/SOF: simplify S3 resume flows Merge series from Pierre-Louis Bossart : All Intel drivers for cAVS platforms contain a sequence for S3 resume which doesn't seem justified nor necessary. Forensic Git investigation in internal repositories did not provide any rationale for the implementation, and tests show no impact when those sequences are removed. This sequence was identified as problematic during a large HDaudio cleanup where all programming sequences were revisited before extensions are added. commit 138060ba92b3b0d77c8e6818d0f33398b23ea42e Author: Christian Brauner Date: Fri Sep 23 10:29:39 2022 +0200 fs: pass dentry to set acl method The current way of setting and getting posix acls through the generic xattr interface is error prone and type unsafe. The vfs needs to interpret and fixup posix acls before storing or reporting it to userspace. Various hacks exist to make this work. The code is hard to understand and difficult to maintain in it's current form. Instead of making this work by hacking posix acls through xattr handlers we are building a dedicated posix acl api around the get and set inode operations. This removes a lot of hackiness and makes the codepaths easier to maintain. A lot of background can be found in [1]. Since some filesystem rely on the dentry being available to them when setting posix acls (e.g., 9p and cifs) they cannot rely on set acl inode operation. But since ->set_acl() is required in order to use the generic posix acl xattr handlers filesystems that do not implement this inode operation cannot use the handler and need to implement their own dedicated posix acl handlers. Update the ->set_acl() inode method to take a dentry argument. This allows all filesystems to rely on ->set_acl(). As far as I can tell all codepaths can be switched to rely on the dentry instead of just the inode. Note that the original motivation for passing the dentry separate from the inode instead of just the dentry in the xattr handlers was because of security modules that call security_d_instantiate(). This hook is called during d_instantiate_new(), d_add(), __d_instantiate_anon(), and d_splice_alias() to initialize the inode's security context and possibly to set security.* xattrs. Since this only affects security.* xattrs this is completely irrelevant for posix acls. Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1] Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) Documentation/filesystems/vfs.rst | 2 +- fs/bad_inode.c | 2 +- fs/btrfs/acl.c | 3 ++- fs/btrfs/ctree.h | 2 +- fs/btrfs/inode.c | 2 +- fs/ceph/acl.c | 3 ++- fs/ceph/inode.c | 2 +- fs/ceph/super.h | 2 +- fs/ext2/acl.c | 3 ++- fs/ext2/acl.h | 2 +- fs/ext2/inode.c | 2 +- fs/ext4/acl.c | 3 ++- fs/ext4/acl.h | 2 +- fs/ext4/inode.c | 2 +- fs/f2fs/acl.c | 4 +++- fs/f2fs/acl.h | 2 +- fs/f2fs/file.c | 2 +- fs/fuse/acl.c | 3 ++- fs/fuse/fuse_i.h | 2 +- fs/gfs2/acl.c | 3 ++- fs/gfs2/acl.h | 2 +- fs/gfs2/inode.c | 2 +- fs/jffs2/acl.c | 3 ++- fs/jffs2/acl.h | 2 +- fs/jffs2/fs.c | 2 +- fs/jfs/acl.c | 3 ++- fs/jfs/file.c | 2 +- fs/jfs/jfs_acl.h | 2 +- fs/ksmbd/smb2pdu.c | 4 ++-- fs/ksmbd/smbacl.c | 4 ++-- fs/ksmbd/vfs.c | 15 ++++++++------- fs/ksmbd/vfs.h | 4 ++-- fs/nfs/nfs3_fs.h | 2 +- fs/nfs/nfs3acl.c | 3 ++- fs/nfsd/nfs2acl.c | 4 ++-- fs/nfsd/nfs3acl.c | 4 ++-- fs/nfsd/vfs.c | 4 ++-- fs/ntfs3/file.c | 2 +- fs/ntfs3/ntfs_fs.h | 4 ++-- fs/ntfs3/xattr.c | 9 +++++---- fs/ocfs2/acl.c | 3 ++- fs/ocfs2/acl.h | 2 +- fs/orangefs/acl.c | 5 +++-- fs/orangefs/inode.c | 7 ++++--- fs/orangefs/orangefs-kernel.h | 4 ++-- fs/posix_acl.c | 22 +++++++++++++--------- fs/reiserfs/acl.h | 6 +++--- fs/reiserfs/inode.c | 2 +- fs/reiserfs/xattr_acl.c | 9 ++++++--- fs/xfs/xfs_acl.c | 3 ++- fs/xfs/xfs_acl.h | 2 +- fs/xfs/xfs_iops.c | 10 ++++++---- include/linux/fs.h | 2 +- include/linux/posix_acl.h | 12 ++++++------ mm/shmem.c | 2 +- 55 files changed, 121 insertions(+), 95 deletions(-) commit 88a2b3cbb7b9c2d073697b3f0328326cb28312b4 Merge: e2ac2a00dae1 844e44988fa8 Author: David S. Miller Date: Wed Oct 19 09:49:38 2022 +0100 Merge branch 'net-marvell-yaml' Michał Grzelak says: ==================== net: further improvements to marvell,pp2.yaml This patchset addresses problems with reg ranges and additional $refs. It also limits phy-mode and aligns examples. Best regards, Michał --- Changelog: v4->v5 - drop '+' from all patternProperties - restrict range of patternProperties to [0-2] in top level - drop the $ref in patternProperties:'^...':properties:reg - add patternProperties:'^...':properties:reg:maximum:2 - drop $ref in patternProperties:'^...':properties:phys - add patternProperties:'^...':properties:phys:maxItems:1 - limit phy-mode to the subset found in dts files - reflect the order of subnodes' properties in subnodes' required: - restrict range of pattern to [0-2] in marvell,armada-7k-pp22 case - restrict range of pattern to [0-1] in marvell,armada-375-pp2 case - align to 4 spaces all examples: - add specified maximum to allOf:if:then-else:properties:reg v3->v4 - change commit message of first patch - move allOf:$ref to patternProperties:'^...':$ref - deprecate port-id in favour of reg - move reg to front of properties list in patternProperties - reflect the order of properties in required list in patternProperties - add unevaluatedProperties: false to patternProperties - change unevaluated- to additionalProperties at top level - add property phys: to ports subnode - extend example binding with additional information about phys and sfp - hook phys property to phy-consumer.yaml schema v2->v3 - move 'reg:description' to 'allOf:if:then' - change '#size-cells: true' and '#address-cells: true' to '#size-cells: const: 0' and '#address-cells: const: 1' - replace all occurences of pattern "^eth\{hex_num}*" with "^(ethernet-)?port@[0-9]+$" - add description in 'patternProperties:^...' - add 'patternProperties:^...:interrupt-names:minItems: 1' - add 'patternProperties:^...:reg:description' - update 'patternProperties:^...:port-id:description' - add 'patternProperties:^...:required: - reg' - update '*:description:' to uppercase - add 'allOf:then:required:marvell,system-controller' - skip quotation marks from 'allOf:$ref' - add 'else' schema to match 'allOf:if:then' - restrict 'clocks' in 'allOf:if:then' - restrict 'clock-names' in 'allOf:if:then' - add #address-cells=<1>; #size-cells=<0>; in 'examples:' - change every "ethX" to "ethernet-port@X" in 'examples:' - add "reg" and comment in all ports in 'examples:' - change /ethernet/eth0/phy-mode in examples://Armada-375 to "rgmii-id" - replace each cpm_ with cp0_ in 'examples:' - replace each _syscon0 with _clk0 in 'examples:' - remove each eth0X label in 'examples:' - update armada-375.dtsi and armada-cp11x.dtsi to match marvell,pp2.yaml v1->v2 - move 'properties' to the front of the file - remove blank line after 'properties' - move 'compatible' to the front of 'properties' - move 'clocks', 'clock-names' and 'reg' definitions to 'properties' - substitute all occurences of 'marvell,armada-7k-pp2' with 'marvell,armada-7k-pp22' - add properties:#size-cells and properties:#address-cells - specify list in 'interrupt-names' - remove blank lines after 'patternProperties' - remove '^interrupt' and '^#.*-cells$' patterns - remove blank line after 'allOf' - remove first 'if-then-else' block from 'allOf' - negate the condition in allOf:if schema - delete 'interrupt-controller' from section 'examples' - delete '#interrupt-cells' from section 'examples' ==================== Signed-off-by: David S. Miller commit 844e44988fa8f747f1a730b1e1586a9f3ca23c0e Author: Marcin Wojtas Date: Fri Oct 14 23:32:54 2022 +0200 ARM: dts: armada-375: Update network description to match schema Update the PP2 ethernet ports subnodes' names to match schema enforced by the marvell,pp2.yaml contents. Add new required properties ('reg') which contains information about the port ID, keeping 'port-id' ones for backward compatibility. Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller arch/arm/boot/dts/armada-375.dtsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 2994bf7705b4dca2b0e4634d79d3474868562216 Author: Marcin Wojtas Date: Fri Oct 14 23:32:53 2022 +0200 arm64: dts: marvell: Update network description to match schema Update the PP2 ethernet ports subnodes' names to match schema enforced by the marvell,pp2.yaml contents. Add new required properties ('reg') which contains information about the port ID, keeping 'port-id' ones for backward compatibility. Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit c4d175c323e3751badf77766c79cb130b4a3eb5f Author: Michał Grzelak Date: Fri Oct 14 23:32:52 2022 +0200 dt-bindings: net: marvell,pp2: convert to json-schema Convert the marvell,pp2 bindings from text to proper schema. Move 'marvell,system-controller' and 'dma-coherent' properties from port up to the controller node, to match what is actually done in DT. Rename all subnodes to match "^(ethernet-)?port@[0-2]$" and deprecate port-id in favour of 'reg'. Signed-off-by: Michał Grzelak Reviewed-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/net/marvell,pp2.yaml | 305 +++++++++++++++++++++ .../devicetree/bindings/net/marvell-pp2.txt | 141 ---------- MAINTAINERS | 2 +- 3 files changed, 306 insertions(+), 142 deletions(-) commit 4053d2500beb0ca1e0757665af9e31da249a7a52 Author: Christian Brauner Date: Fri Sep 23 10:19:34 2022 +0200 orangefs: rework posix acl handling when creating new filesystem objects When creating new filesytem objects orangefs used to create posix acls after it had created and inserted a new inode. This made it necessary to all posix_acl_chmod() on the newly created inode in case the mode of the inode would be changed by the posix acls. Instead of doing it this way calculate the correct mode directly before actually creating the inode. So we first create posix acls, then pass the mode that posix acls mandate into the orangefs getattr helper and calculate the correct mode. This is needed so we can simply change posix_acl_chmod() to take a dentry instead of an inode argument in the next patch. Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) fs/orangefs/acl.c | 44 ++----------------------------------------- fs/orangefs/inode.c | 44 +++++++++++++++++++++++++++++++++++-------- fs/orangefs/orangefs-kernel.h | 6 ++++-- fs/orangefs/orangefs-utils.c | 10 ++++++++-- 4 files changed, 50 insertions(+), 54 deletions(-) commit a545b48c2d907d6096e7bcf65d9b0681cc850e69 Author: Brian Gerst Date: Mon Jun 6 16:38:02 2022 -0400 x86/signal/64: Move 64-bit signal code to its own file [ bp: Fixup merge conflict caused by changes coming from the kbuild tree. ] Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Acked-by: "Eric W. Biederman" Link: https://lore.kernel.org/r/20220606203802.158958-9-brgerst@gmail.com Signed-off-by: Borislav Petkov arch/x86/kernel/Makefile | 4 +- arch/x86/kernel/signal.c | 376 ------------------------------------------- arch/x86/kernel/signal_64.c | 383 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 385 insertions(+), 378 deletions(-) commit 24e6dc35ccd825de7c71751610ff8f3295347e5b Author: Brian Gerst Date: Mon Jun 6 16:38:01 2022 -0400 x86/signal/32: Merge native and compat 32-bit signal code There are significant differences between signal handling on 32-bit vs. 64-bit, like different structure layouts and legacy syscalls. Instead of duplicating that code for native and compat, merge both versions into one file. Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Acked-by: "Eric W. Biederman" Link: https://lore.kernel.org/r/20220606203802.158958-8-brgerst@gmail.com Signed-off-by: Borislav Petkov arch/x86/ia32/Makefile | 2 - arch/x86/include/asm/segment.h | 1 + arch/x86/kernel/Makefile | 4 +- arch/x86/kernel/signal.c | 219 +-------------------- .../x86/{ia32/ia32_signal.c => kernel/signal_32.c} | 59 +++++- include/linux/syscalls.h | 2 + 6 files changed, 60 insertions(+), 227 deletions(-) commit c461ae39373a1ae21952dbb6e2668a693d9f761d Author: Brian Gerst Date: Mon Jun 6 16:38:00 2022 -0400 x86/signal: Add ABI prefixes to frame setup functions Add ABI prefixes to the frame setup functions that didn't already have them. To avoid compiler warnings and prepare for moving these functions to separate files, make them non-static. Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Acked-by: "Eric W. Biederman" Link: https://lore.kernel.org/r/20220606203802.158958-7-brgerst@gmail.com Signed-off-by: Borislav Petkov arch/x86/include/asm/fpu/signal.h | 5 ----- arch/x86/include/asm/sighandling.h | 5 +++++ arch/x86/kernel/signal.c | 18 +++++++----------- 3 files changed, 12 insertions(+), 16 deletions(-) commit 9c36e592b3f899c90b9d0d46ae29fcc065051b96 Author: Brian Gerst Date: Mon Jun 6 16:37:59 2022 -0400 x86/signal: Merge get_sigframe() Adapt the native get_sigframe() function so that the compat signal code can use it. Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Acked-by: "Eric W. Biederman" Link: https://lore.kernel.org/r/20220606203802.158958-6-brgerst@gmail.com Signed-off-by: Borislav Petkov arch/x86/ia32/ia32_signal.c | 34 ---------------- arch/x86/include/asm/sighandling.h | 4 ++ arch/x86/kernel/signal.c | 80 ++++++++++++++++++-------------------- 3 files changed, 42 insertions(+), 76 deletions(-) commit 695c39bc5b8686a6b27254e60fb830f4989f322d Author: Brian Gerst Date: Mon Jun 6 16:37:58 2022 -0400 x86: Remove __USER32_DS Replace all users with the equivalent __USER_DS, which will make merging native and compat code simpler. Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Acked-by: "Eric W. Biederman" Link: https://lore.kernel.org/r/20220606203802.158958-5-brgerst@gmail.com Signed-off-by: Borislav Petkov arch/x86/entry/entry_64_compat.S | 4 ++-- arch/x86/ia32/ia32_signal.c | 14 +++++++------- arch/x86/include/asm/elf.h | 4 ---- arch/x86/include/asm/segment.h | 1 - arch/x86/xen/xen-asm.S | 8 ++++---- 5 files changed, 13 insertions(+), 18 deletions(-) commit 653714220f88717f239d811222c2dd0e64b181ba Author: Brian Gerst Date: Mon Jun 6 16:37:57 2022 -0400 signal/compat: Remove compat_sigset_t override x86 no longer uses compat_sigset_t when CONFIG_COMPAT isn't enabled, so remove the override define. Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Acked-by: "Eric W. Biederman" Link: https://lore.kernel.org/r/20220606203802.158958-4-brgerst@gmail.com Signed-off-by: Borislav Petkov include/linux/compat.h | 2 -- 1 file changed, 2 deletions(-) commit f544822ea587ce08932640d5ba3978261148cbc7 Author: Brian Gerst Date: Mon Jun 6 16:37:56 2022 -0400 x86/signal: Remove sigset_t parameter from frame setup functions Push down the call to sigmask_to_save() into the frame setup functions. Thus, remove the use of compat_sigset_t outside of the compat code. Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Acked-by: "Eric W. Biederman" Link: https://lore.kernel.org/r/20220606203802.158958-3-brgerst@gmail.com Signed-off-by: Borislav Petkov arch/x86/ia32/ia32_signal.c | 8 ++++---- arch/x86/include/asm/fpu/signal.h | 6 ++---- arch/x86/include/asm/signal.h | 5 ----- arch/x86/kernel/signal.c | 28 ++++++++++++---------------- 4 files changed, 18 insertions(+), 29 deletions(-) commit 8bb2d28e2b92ef220e82369ff31a22f39831cf2f Author: Brian Gerst Date: Mon Jun 6 16:37:55 2022 -0400 x86/signal: Remove sig parameter from frame setup functions Passing the signal number as a separate parameter is unnecessary, since it is always ksig->sig. Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Acked-by: "Eric W. Biederman" Link: https://lore.kernel.org/r/20220606203802.158958-2-brgerst@gmail.com Signed-off-by: Borislav Petkov arch/x86/ia32/ia32_signal.c | 12 ++++++------ arch/x86/include/asm/fpu/signal.h | 4 ++-- arch/x86/kernel/signal.c | 23 +++++++++++------------ 3 files changed, 19 insertions(+), 20 deletions(-) commit c1842f34fceef47d6285e558004f8e2d6ed91b91 Author: Max Gurtovoy Date: Sun Oct 16 12:38:33 2022 +0300 IB/iser: open code iser_disconnected_handler There is a single caller to iser_disconnected_handler. Open code its logic and remove it. Signed-off-by: Max Gurtovoy Link: https://lore.kernel.org/r/20221016093833.12537-4-mgurtovoy@nvidia.com Reviewed-by: Sergey Gorenko Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/iser/iser_verbs.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit a75243ae08d23272235cb26117464843538936b4 Author: Max Gurtovoy Date: Sun Oct 16 12:38:32 2022 +0300 IB/iser: add safety checks for state_mutex lock In some cases, we need to make sure that state_mutex is taken. Use lockdep_assert_held to warn us in case it doesn't while it should. Signed-off-by: Max Gurtovoy Link: https://lore.kernel.org/r/20221016093833.12537-3-mgurtovoy@nvidia.com Reviewed-by: Sergey Gorenko Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/iser/iser_verbs.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit acc7d94ab431fb6f34e41588f2784410c2d9008e Author: Sergey Gorenko Date: Sun Oct 16 12:38:31 2022 +0300 IB/iser: open code iser_conn_state_comp_exch There is a single caller to iser_conn_state_comp_exch. Open code its logic and remove it. Acked-by: Max Gurtovoy Signed-off-by: Sergey Gorenko Link: https://lore.kernel.org/r/20221016093833.12537-2-mgurtovoy@nvidia.com Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky drivers/infiniband/ulp/iser/iser_verbs.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) commit e91001bae0d1725d9a49b5bfb5f46f6d1ca6bf1d Author: Colin Ian King Date: Mon Oct 17 23:08:09 2022 +0100 esp6: remove redundant variable err Variable err is being assigned a value that is not read, the assignment is redundant and so is the variable. Remove it. Cleans up clang scan warning: net/ipv6/esp6_offload.c:64:7: warning: Although the value stored to 'err' is used in the enclosing expression, the value is never actually read from 'err' [deadcode.DeadStores] Signed-off-by: Colin Ian King Signed-off-by: Steffen Klassert net/ipv6/esp6_offload.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7ac7bfe746d8faddbd79abed526ee67f46d8867c Author: Jiangshan Yi Date: Sun Oct 9 16:10:47 2022 +0800 RDMA/opa_vnic: fix spelling typo in comment Fix spelling typo in comment. Reported-by: k2ci Signed-off-by: Jiangshan Yi Link: https://lore.kernel.org/r/20221009081047.2643471-1-13667453960@163.com Signed-off-by: Leon Romanovsky include/rdma/opa_vnic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53c2d5b14a82f6e7f0f8089083972df20e66a354 Author: Li Zhijian Date: Sat Oct 1 10:00:45 2022 +0800 RDMA/core: return -EOPNOSUPP for ODP unsupported device ib_reg_mr(3) which is used to register a MR with specific access flags for specific HCA will set errno when something go wrong. So, here we should return the specific -EOPNOTSUPP when the being requested ODP access flag is unsupported by the HCA(such as RXE). Signed-off-by: Li Zhijian Link: https://lore.kernel.org/r/20221001020045.8324-1-lizhijian@fujitsu.com Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky include/rdma/ib_verbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ede2a34363a5dddd5e6b37b8e52c5041d1e78209 Author: Günther Noack Date: Tue Oct 18 20:22:16 2022 +0200 landlock: Document Landlock's file truncation support Use the LANDLOCK_ACCESS_FS_TRUNCATE flag in the tutorial. Adapt the backwards compatibility example and discussion to remove the truncation flag where needed. Point out potential surprising behaviour related to truncate. Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20221018182216.301684-12-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün Documentation/userspace-api/landlock.rst | 67 ++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 7 deletions(-) commit faeb9197669c23d983f6485d278b20f0194432f4 Author: Günther Noack Date: Tue Oct 18 20:22:15 2022 +0200 samples/landlock: Extend sample tool to support LANDLOCK_ACCESS_FS_TRUNCATE Update the sandboxer sample to restrict truncate actions. This is automatically enabled by default if the running kernel supports LANDLOCK_ACCESS_FS_TRUNCATE, except for the paths listed in the LL_FS_RW environment variable. Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20221018182216.301684-11-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün samples/landlock/sandboxer.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 0d8c658be264eb2106349c50377ef8a81edc0106 Author: Günther Noack Date: Tue Oct 18 20:22:14 2022 +0200 selftests/landlock: Test ftruncate on FDs created by memfd_create(2) All file descriptors that are truncatable need to have the Landlock access rights set correctly on the file's Landlock security blob. This is also the case for files that are opened by other means than open(2). Test coverage for security/landlock is 94.7% of 838 lines according to gcc/gcov-11. Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20221018182216.301684-10-gnoack3000@gmail.com [mic: Add test coverage in commit message] Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/fs_test.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit a1a202a581817312a02b4d0daa6ca16f701f1e8a Author: Günther Noack Date: Tue Oct 18 20:22:13 2022 +0200 selftests/landlock: Test FD passing from restricted to unrestricted processes A file descriptor created in a restricted process carries Landlock restrictions with it which will apply even if the same opened file is used from an unrestricted process. This change extracts suitable FD-passing helpers from base_test.c and moves them to common.h. We use the fixture variants from the ftruncate fixture to exercise the same scenarios as in the open_and_ftruncate test, but doing the Landlock restriction and open() in a different process than the ftruncate() call. Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20221018182216.301684-9-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/base_test.c | 36 ++------------- tools/testing/selftests/landlock/common.h | 67 ++++++++++++++++++++++++++++ tools/testing/selftests/landlock/fs_test.c | 62 +++++++++++++++++++++++++ 3 files changed, 132 insertions(+), 33 deletions(-) commit 97b30f9e35709e9d2885efc5c1cd0bf54331ea3d Author: Günther Noack Date: Tue Oct 18 20:22:12 2022 +0200 selftests/landlock: Locally define __maybe_unused The checkpatch tool started to flag __attribute__(__unused__), which we previously used. The header where this is normally defined is not currently compatible with selftests. This is the same approach as used in selftests/net/psock_lib.h. Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20221018182216.301684-8-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/common.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 41729af28fb4b2c6581edcdfba19dd7fa81bf43c Author: Günther Noack Date: Tue Oct 18 20:22:11 2022 +0200 selftests/landlock: Test open() and ftruncate() in multiple scenarios This test uses multiple fixture variants to exercise a broader set of scnenarios. Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20221018182216.301684-7-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/fs_test.c | 96 ++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit 225351abe34407421a5ee34896ccca92a0544b5e Author: Günther Noack Date: Tue Oct 18 20:22:10 2022 +0200 selftests/landlock: Test file truncation support These tests exercise the following truncation operations: * truncate() (truncate by path) * ftruncate() (truncate by file descriptor) * open with the O_TRUNC flag * special case: creat(), which is open with O_CREAT|O_WRONLY|O_TRUNC. in the following scenarios: * Files with read, write and truncate rights. * Files with read and truncate rights. * Files with the truncate right. * Files without the truncate right. In particular, the following scenarios are enforced with the test: * open() with O_TRUNC requires the truncate right, if it truncates a file. open() already checks security_path_truncate() in this case, and it required no additional check in the Landlock LSM's file_open hook. * creat() requires the truncate right when called with an existing filename. * creat() does *not* require the truncate right when it's creating a new file. * ftruncate() requires that the file was opened by a thread that had the truncate right for the file at the time of open(). (The rights are carried along with the opened file.) Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20221018182216.301684-6-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/fs_test.c | 287 +++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) commit b9f5ce27c8f8be409d6afca9797a2da01e5cebbb Author: Günther Noack Date: Tue Oct 18 20:22:09 2022 +0200 landlock: Support file truncation Introduce the LANDLOCK_ACCESS_FS_TRUNCATE flag for file truncation. This flag hooks into the path_truncate, file_truncate and file_alloc_security LSM hooks and covers file truncation using truncate(2), ftruncate(2), open(2) with O_TRUNC, as well as creat(). This change also increments the Landlock ABI version, updates corresponding selftests, and updates code documentation to document the flag. In security/security.c, allocate security blobs at pointer-aligned offsets. This fixes the problem where one LSM's security blob can shift another LSM's security blob to an unaligned address (reported by Nathan Chancellor). The following operations are restricted: open(2): requires the LANDLOCK_ACCESS_FS_TRUNCATE right if a file gets implicitly truncated as part of the open() (e.g. using O_TRUNC). Notable special cases: * open(..., O_RDONLY|O_TRUNC) can truncate files as well in Linux * open() with O_TRUNC does *not* need the TRUNCATE right when it creates a new file. truncate(2) (on a path): requires the LANDLOCK_ACCESS_FS_TRUNCATE right. ftruncate(2) (on a file): requires that the file had the TRUNCATE right when it was previously opened. File descriptors acquired by other means than open(2) (e.g. memfd_create(2)) continue to support truncation with ftruncate(2). Cc: Nathan Chancellor Signed-off-by: Günther Noack Acked-by: Paul Moore (LSM) Link: https://lore.kernel.org/r/20221018182216.301684-5-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün include/uapi/linux/landlock.h | 21 ++++-- security/landlock/fs.c | 104 +++++++++++++++++++++++++-- security/landlock/fs.h | 24 +++++++ security/landlock/limits.h | 2 +- security/landlock/setup.c | 1 + security/landlock/syscalls.c | 2 +- security/security.c | 11 +-- tools/testing/selftests/landlock/base_test.c | 2 +- tools/testing/selftests/landlock/fs_test.c | 7 +- 9 files changed, 153 insertions(+), 21 deletions(-) commit 52a13488d1783ae014a3abe15f78810162425e94 Author: Günther Noack Date: Tue Oct 18 20:22:08 2022 +0200 landlock: Document init_layer_masks() helper Add kernel-doc to the init_layer_masks() function. Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20221018182216.301684-4-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün security/landlock/fs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 106794c46b13a2820d3954d7a2892fa1978b4162 Author: Günther Noack Date: Tue Oct 18 20:22:07 2022 +0200 landlock: Refactor check_access_path_dual() into is_access_to_paths_allowed() Rename check_access_path_dual() to is_access_to_paths_allowed(). Make it return true iff the access is allowed. Calculate the EXDEV/EACCES error code in the one place where it's needed. Suggested-by: Mickaël Salaün Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20221018182216.301684-3-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün security/landlock/fs.c | 89 +++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 45 deletions(-) commit 3350607dc5637be2563f484dcfe2fed456f3d4ff Author: Günther Noack Date: Tue Oct 18 20:22:06 2022 +0200 security: Create file_truncate hook from path_truncate hook Like path_truncate, the file_truncate hook also restricts file truncation, but is called in the cases where truncation is attempted on an already-opened file. This is required in a subsequent commit to handle ftruncate() operations differently to truncate() operations. Acked-by: Tetsuo Handa Acked-by: John Johansen Acked-by: Paul Moore Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20221018182216.301684-2-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün fs/namei.c | 2 +- fs/open.c | 2 +- include/linux/lsm_hook_defs.h | 1 + include/linux/lsm_hooks.h | 10 +++++++++- include/linux/security.h | 6 ++++++ security/apparmor/lsm.c | 6 ++++++ security/security.c | 5 +++++ security/tomoyo/tomoyo.c | 13 +++++++++++++ 8 files changed, 42 insertions(+), 3 deletions(-) commit 26312973bfbc1db24b157797776ee2b5b48f5c50 Author: Deming Wang Date: Thu Oct 6 12:14:56 2022 -0400 IB/uverbs: fix the typo of optional Fix the typo of optional in the function of UVERBS_HANDLER. Signed-off-by: Deming Wang Link: https://lore.kernel.org/r/20221006161456.2998-1-wangdeming@inspur.com Signed-off-by: Leon Romanovsky drivers/infiniband/core/uverbs_std_types_qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55549d6a3052990e65727bfec158e1b0e7cec4e4 Author: Linus Walleij Date: Wed Oct 12 21:23:48 2022 +0200 bcma: gpio: Convert to immutable gpio irqchip This switches the BCMA gpio irqchip to be immutable. The GPIO subsystem plays tricks on the irqchip structures, and we're fixing it one driver at a time. See merge commit 4bde53ab3370 ("Merge branch irq/gpio-immutable into irq/irqchip-next") for all the details. Tested on the D-Link DWL-6810AP. Cc: Marc Zyngier Cc: Bartosz Golaszewski Cc: Rafał Miłecki Signed-off-by: Linus Walleij Acked-by: Marc Zyngier Reviewed-by: Bartosz Golaszewski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221012192348.2234478-1-linus.walleij@linaro.org drivers/bcma/driver_gpio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 80bc5ae9733c2ae71a13db819f9368191cc19d6f Author: Linus Walleij Date: Tue Oct 11 14:29:41 2022 +0200 bcma: support SPROM rev 11 Rev 11 works fine for me to set the MAC address of gmac0 and gmac1 in the D-Link DWL-8610AP. Cc: Rafał Miłecki Signed-off-by: Linus Walleij Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221011122941.2053705-1-linus.walleij@linaro.org drivers/bcma/sprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5db4ef38e21dd9b6b95ae96cea5032b00e04f24 Author: Ping-Ke Shih Date: Fri Oct 14 14:02:37 2022 +0800 wifi: rtw89: 8852b: add 8852be to Makefile and Kconfig Now, basic materials for 8852be are ready, so add 8852be to Kconfig and Makefile. Current version can support STA, AP and monitor modes. We still fine tune some features, such as BT coexistence, performance, and power consumption. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221014060237.29050-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/Kconfig | 14 ++++++++++++++ drivers/net/wireless/realtek/rtw89/Makefile | 9 +++++++++ 2 files changed, 23 insertions(+) commit 3b66519b023b9de3239576b938bbdf43f95bc862 Author: Ping-Ke Shih Date: Fri Oct 14 14:02:36 2022 +0800 wifi: rtw89: phy: add dummy C2H handler to avoid warning message The C2H class 2 function 3 is to report retry count of low rate, but driver doesn't implement yet, so add a dummy case to avoid message: rtw89_8852be 0000:03:00.0: c2h class 2 not support Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221014060237.29050-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/phy.c | 4 ++++ drivers/net/wireless/realtek/rtw89/phy.h | 9 +++++++++ 2 files changed, 13 insertions(+) commit ef8acbcac6816e4caf20934932b4881d775c6f37 Author: Ping-Ke Shih Date: Fri Oct 14 14:02:35 2022 +0800 wifi: rtw89: 8852b: add chip_ops related to RF calibration Since RF calibrations are added, add chip_ops to call them. These chip_ops include initial, full calibration, configuration when switching band and scanning, and track work in period of 2 seconds. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221014060237.29050-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b.c | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 5b8471ace5b1247b2eb6a824341e11a8e871080f Author: Ping-Ke Shih Date: Fri Oct 14 14:02:34 2022 +0800 wifi: rtw89: 8852b: rfk: add DPK DPK is short for digital pre-distortion calibration. It can adjusts digital waveform according to PA linear characteristics dynamically to enhance TX EVM. Do this calibration when we are going to run on AP channel. To prevent power offset out of boundary, it monitors thermal and set proper boundary to register. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221014060237.29050-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/reg.h | 17 + drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c | 1148 +++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.h | 3 + 4 files changed, 1169 insertions(+) commit 7f18a70d7b4d2a0e54ce542c222aeffc464ed9f3 Author: Ping-Ke Shih Date: Wed Oct 12 16:32:34 2022 +0800 wifi: rtw89: 8852b: rfk: add TSSI TSSI is transmitter signal strength indication, which is a close-loop hardware circuit to feedback actual transmitting power as a reference for next transmission. When we setup channel to connect an AP, it does full calibration. When switching bands or channels, it needs to reset hardware status to prevent use wrong feedback of previous transmission. To do TX power compensation reflecting current temperature, it loads tables of compensation values into registers according to channel and band group. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221012083234.20224-6-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 15 + drivers/net/wireless/realtek/rtw89/reg.h | 43 + drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c | 1174 +++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.h | 4 + 4 files changed, 1236 insertions(+) commit f2abe804e8230ff20a834e204bde529935df5467 Author: Ping-Ke Shih Date: Wed Oct 12 16:32:33 2022 +0800 wifi: rtw89: 8852b: rfk: add IQK IQ signal calibration is a very important calibration to yield good RF performance. We do this calibration only if we are going to run on AP channel. During scanning phase, without this calibration RF performance is still acceptable because it transmits with low data rate at this phase. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221012083234.20224-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/reg.h | 19 + drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c | 1046 +++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.h | 1 + 3 files changed, 1066 insertions(+) commit 212671074ab2f3e33fd5e95392c7356410ad7f8d Author: Ping-Ke Shih Date: Wed Oct 12 16:32:32 2022 +0800 wifi: rtw89: 8852b: rfk: add RX DCK RX DCK is receiver DC calibration. With this calibration, we have proper DC offset to reflect correct received signal strength indicator. Do this calibration when bringing up interface and going to run on AP channel. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221012083234.20224-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c | 75 +++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.h | 1 + 2 files changed, 76 insertions(+) commit 10298b53bff642e586e5b82616914c9fa3d9a906 Author: Ping-Ke Shih Date: Wed Oct 12 16:32:31 2022 +0800 wifi: rtw89: 8852b: rfk: add RCK RCK is synchronize RC calibration. Driver triggers this calibration and sets the result to register. This calibration is needed once when interface is going to up. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221012083234.20224-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c | 43 +++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.h | 1 + 2 files changed, 44 insertions(+) commit 16be5e3be0e5794b5e7227c63b440f3fdb9c22ce Author: Ping-Ke Shih Date: Wed Oct 12 16:32:30 2022 +0800 wifi: rtw89: 8852b: rfk: add DACK DACK (digital-to-analog converters calibration) is used to calibrate DAC to output good quality signals. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221012083234.20224-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/reg.h | 21 ++ drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c | 432 ++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.h | 1 + 3 files changed, 454 insertions(+) commit acd4324e5f1f11351630234297f95076f0ac9a2f Author: Youghandhar Chintala Date: Thu Oct 13 09:34:59 2022 +0300 wifi: ath10k: Delay the unmapping of the buffer On WCN3990, we are seeing a rare scenario where copy engine hardware is sending a copy complete interrupt to the host driver while still processing the buffer that the driver has sent, this is leading into an SMMU fault triggering kernel panic. This is happening on copy engine channel 3 (CE3) where the driver normally enqueues WMI commands to the firmware. Upon receiving a copy complete interrupt, host driver will immediately unmap and frees the buffer presuming that hardware has processed the buffer. In the issue case, upon receiving copy complete interrupt, host driver will unmap and free the buffer but since hardware is still accessing the buffer (which in this case got unmapped in parallel), SMMU hardware will trigger an SMMU fault resulting in a kernel panic. In order to avoid this, as a work around, add a delay before unmapping the copy engine source DMA buffer. This is conditionally done for WCN3990 and only for the CE3 channel where issue is seen. Below is the crash signature: wifi smmu error: kernel: [ 10.120965] arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0x7fdfd8ac0, fsynr=0x500003,cbfrsynra=0xc1, cb=6 arm-smmu 15000000.iommu: Unhandled context fault:fsr=0x402, iova=0x7fe06fdc0, fsynr=0x710003, cbfrsynra=0xc1, cb=6 qcom-q6v5-mss 4080000.remoteproc: fatal error received: err_qdi.c:1040:EF:wlan_process:0x1:WLAN RT:0x2091: cmnos_thread.c:3998:Asserted in copy_engine.c:AXI_ERROR_DETECTED:2149 remoteproc remoteproc0: crash detected in 4080000.remoteproc: type fatal error <3> remoteproc remoteproc0: handling crash #1 in 4080000.remoteproc pc : __arm_lpae_unmap+0x500/0x514 lr : __arm_lpae_unmap+0x4bc/0x514 sp : ffffffc011ffb530 x29: ffffffc011ffb590 x28: 0000000000000000 x27: 0000000000000000 x26: 0000000000000004 x25: 0000000000000003 x24: ffffffc011ffb890 x23: ffffffa762ef9be0 x22: ffffffa77244ef00 x21: 0000000000000009 x20: 00000007fff7c000 x19: 0000000000000003 x18: 0000000000000000 x17: 0000000000000004 x16: ffffffd7a357d9f0 x15: 0000000000000000 x14: 00fd5d4fa7ffffff x13: 000000000000000e x12: 0000000000000000 x11: 00000000ffffffff x10: 00000000fffffe00 x9 : 000000000000017c x8 : 000000000000000c x7 : 0000000000000000 x6 : ffffffa762ef9000 x5 : 0000000000000003 x4 : 0000000000000004 x3 : 0000000000001000 x2 : 00000007fff7c000 x1 : ffffffc011ffb890 x0 : 0000000000000000 Call trace: __arm_lpae_unmap+0x500/0x514 __arm_lpae_unmap+0x4bc/0x514 __arm_lpae_unmap+0x4bc/0x514 arm_lpae_unmap_pages+0x78/0xa4 arm_smmu_unmap_pages+0x78/0x104 __iommu_unmap+0xc8/0x1e4 iommu_unmap_fast+0x38/0x48 __iommu_dma_unmap+0x84/0x104 iommu_dma_free+0x34/0x50 dma_free_attrs+0xa4/0xd0 ath10k_htt_rx_free+0xc4/0xf4 [ath10k_core] ath10k_core_stop+0x64/0x7c [ath10k_core] ath10k_halt+0x11c/0x180 [ath10k_core] ath10k_stop+0x54/0x94 [ath10k_core] drv_stop+0x48/0x1c8 [mac80211] ieee80211_do_open+0x638/0x77c [mac80211] ieee80211_open+0x48/0x5c [mac80211] __dev_open+0xb4/0x174 __dev_change_flags+0xc4/0x1dc dev_change_flags+0x3c/0x7c devinet_ioctl+0x2b4/0x580 inet_ioctl+0xb0/0x1b4 sock_do_ioctl+0x4c/0x16c compat_ifreq_ioctl+0x1cc/0x35c compat_sock_ioctl+0x110/0x2ac __arm64_compat_sys_ioctl+0xf4/0x3e0 el0_svc_common+0xb4/0x17c el0_svc_compat_handler+0x2c/0x58 el0_svc_compat+0x8/0x2c Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1 Tested-by: Douglas Anderson Signed-off-by: Youghandhar Chintala Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221012142733.32420-1-quic_youghand@quicinc.com drivers/net/wireless/ath/ath10k/core.c | 16 ++++++++++++++++ drivers/net/wireless/ath/ath10k/htc.c | 9 +++++++++ drivers/net/wireless/ath/ath10k/hw.h | 2 ++ 3 files changed, 27 insertions(+) commit 5122e53ee784b9a2a2f40d34222751b6b4ab076c Author: Niklas Cassel Date: Fri Oct 7 15:23:40 2022 +0200 ata: libata-core: do not retry reading the log on timeout ata_read_log_page() first tries to read the log using READ LOG DMA EXT. If that fails it will instead try to read the log using READ LOG EXT. ata_exec_internal_sg() is synchronous, so it will wait for the command to finish. If we actually got an error back from the device, it is correct to retry. However, if the command timed out, ata_exec_internal_sg() will freeze the port. There is no point in retrying if the port is frozen, as ata_exec_internal_sg() will return AC_ERR_SYSTEM on a frozen port, without ever sending the command down to the drive. Therefore, avoid retrying if the first command froze the port, as that will result in a misleading AC_ERR_SYSTEM error print, instead of printing the error that actually caused the port to be frozen (AC_ERR_TIMEOUT). Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal drivers/ata/libata-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7834589e81bcf5fe4e7ab60430670c9245183de0 Author: Niklas Cassel Date: Fri Oct 7 15:23:39 2022 +0200 scsi: libsas: make use of ata_port_is_frozen() helper Clean up the code by making use of the newly introduced ata_port_is_frozen() helper function. Signed-off-by: Niklas Cassel Reviewed-by: John Garry Acked-by: Martin K. Petersen Signed-off-by: Damien Le Moal drivers/scsi/libsas/sas_ata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2ac2a00dae10997b71870ecf26ca69f4d726537 Author: Govindarajulu Varadarajan Date: Mon Oct 17 17:58:04 2022 -0700 enic: define constants for legacy interrupts offset Use macro instead of function calls. These values are constant and will not change. Signed-off-by: Govindarajulu Varadarajan Link: https://lore.kernel.org/r/20221018005804.188643-1-govind.varadar@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/cisco/enic/enic.h | 23 ++++++----------------- drivers/net/ethernet/cisco/enic/enic_main.c | 11 +++++------ 2 files changed, 11 insertions(+), 23 deletions(-) commit f3d27ae079fa0da298f6786b0b2cc4d2a59b3539 Author: Shenwei Wang Date: Mon Oct 17 11:12:36 2022 -0500 net: fec: remove the unused functions Removed those unused functions since we simplified the driver by using the page pool to manage RX buffers. Signed-off-by: Shenwei Wang Link: https://lore.kernel.org/r/20221017161236.1563975-1-shenwei.wang@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/fec_main.c | 57 ------------------------------- 1 file changed, 57 deletions(-) commit a2fd08448f2b7591fc7ec8dec2e5e025a43f0cee Author: Arnd Bergmann Date: Mon Oct 17 14:18:26 2022 +0200 net: remove smc911x driver This driver was used on Arm and SH machines until 2009, when the last platforms moved to the smsc911x driver for the same hardware. Time to retire this version. Link: https://lore.kernel.org/netdev/1232010482-3744-1-git-send-email-steve.glendinning@smsc.com/ Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20221017121900.3520108-1-arnd@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/smsc/Kconfig | 14 - drivers/net/ethernet/smsc/Makefile | 1 - drivers/net/ethernet/smsc/smc911x.c | 2198 ----------------------------------- drivers/net/ethernet/smsc/smc911x.h | 901 -------------- include/linux/smc911x.h | 14 - 5 files changed, 3128 deletions(-) commit 3566a79c9e3629af538c28f80141cb86d4ae8a96 Merge: f00909e2e6fe 6c4e777fbba6 Author: Jakub Kicinski Date: Tue Oct 18 18:56:41 2022 -0700 Merge tag 'for-netdev' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2022-10-18 We've added 33 non-merge commits during the last 14 day(s) which contain a total of 31 files changed, 874 insertions(+), 538 deletions(-). The main changes are: 1) Add RCU grace period chaining to BPF to wait for the completion of access from both sleepable and non-sleepable BPF programs, from Hou Tao & Paul E. McKenney. 2) Improve helper UAPI by explicitly defining BPF_FUNC_xxx integer values. In the wild we have seen OS vendors doing buggy backports where helper call numbers mismatched. This is an attempt to make backports more foolproof, from Andrii Nakryiko. 3) Add libbpf *_opts API-variants for bpf_*_get_fd_by_id() functions, from Roberto Sassu. 4) Fix libbpf's BTF dumper for structs with padding-only fields, from Eduard Zingerman. 5) Fix various libbpf bugs which have been found from fuzzing with malformed BPF object files, from Shung-Hsi Yu. 6) Clean up an unneeded check on existence of SSE2 in BPF x86-64 JIT, from Jie Meng. 7) Fix various ASAN bugs in both libbpf and selftests when running the BPF selftest suite on arm64, from Xu Kuohai. 8) Fix missing bpf_iter_vma_offset__destroy() call in BPF iter selftest and use in-skeleton link pointer to remove an explicit bpf_link__destroy(), from Jiri Olsa. 9) Fix BPF CI breakage by pointing to iptables-legacy instead of relying on symlinked iptables which got upgraded to iptables-nft, from Martin KaFai Lau. 10) Minor BPF selftest improvements all over the place, from various others. * tag 'for-netdev' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (33 commits) bpf/docs: Update README for most recent vmtest.sh bpf: Use rcu_trace_implies_rcu_gp() for program array freeing bpf: Use rcu_trace_implies_rcu_gp() in local storage map bpf: Use rcu_trace_implies_rcu_gp() in bpf memory allocator rcu-tasks: Provide rcu_trace_implies_rcu_gp() selftests/bpf: Use sys_pidfd_open() helper when possible libbpf: Fix null-pointer dereference in find_prog_by_sec_insn() libbpf: Deal with section with no data gracefully libbpf: Use elf_getshdrnum() instead of e_shnum selftest/bpf: Fix error usage of ASSERT_OK in xdp_adjust_tail.c selftests/bpf: Fix error failure of case test_xdp_adjust_tail_grow selftest/bpf: Fix memory leak in kprobe_multi_test selftests/bpf: Fix memory leak caused by not destroying skeleton libbpf: Fix memory leak in parse_usdt_arg() libbpf: Fix use-after-free in btf_dump_name_dups selftests/bpf: S/iptables/iptables-legacy/ in the bpf_nf and xdp_synproxy test selftests/bpf: Alphabetize DENYLISTs selftests/bpf: Add tests for _opts variants of bpf_*_get_fd_by_id() libbpf: Introduce bpf_link_get_fd_by_id_opts() libbpf: Introduce bpf_btf_get_fd_by_id_opts() ... ==================== Link: https://lore.kernel.org/r/20221018210631.11211-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit d8cb88f1541fdc3602dbc87ede78ec704c11546f Author: Dan Callaghan Date: Wed Oct 19 10:52:37 2022 +1100 platform/chrome: cros_hps_i2c: make remove callback return void Commit ed5c2f5fd10d ("i2c: Make remove callback return void") changed the return type of the 'remove' callback to void, but this driver was originally written before that change landed. Update the remove callback to match. Fixes: 5f9952548d91 ("platform/chrome: add a driver for HPS") Reported-by: kernel test robot Signed-off-by: Dan Callaghan Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221018235237.2274969-1-dcallagh@chromium.org drivers/platform/chrome/cros_hps_i2c.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 554d4389166f26765cc24f0723aee2642fcc3c26 Merge: 9abf2313adc1 02d33e86468c Author: Jonathan Corbet Date: Tue Oct 18 16:29:50 2022 -0600 Merge branch 'alabaster-rb' into docs-mw For a long time we have rejoiced that our HTML output from Sphinx is far better than what we got from the old DocBook toolchain. But it still leaves a lot to be desired; the following is an attempt to improve the situation somewhat. Sphinx has a theming mechanism for HTML rendering. Since the kernel's adoption of Sphinx, we have been using the "Read The Docs" theme — a choice made in a bit of a hurry to have *something* while figuring out the rest. RTD is OK, but it is not hugely attractive, requires the installation of an extra package, and does not observe all of the Sphinx configuration parameters. Among other things, that makes it hard to put reasonable contents into the left column in the HTML output. The Alabaster theme is the default for Sphinx installations, and is bundled with Sphinx itself. It has (IMO) nicer output and gives us the control that we need. So: switch to Alabaster. Additional patches adjust the documentation and remove the RTD references from scripts/sphinx-pre-install. The penultimate patch changes the way that kerneldoc declarations are rendered to (IMO) improve readability. That requires some changes to kernel-doc to output a new container block and some CSS tweaks to improve things overall. It should be noted that I have a long history of inflicting ugly web designs on the net; this work is a start, but I think we could do far better yet. It would be great if somebody who actually enjoys working with CSS and such would help to improve what we have. commit 02d33e86468c604f0e2fe9a63c312dcd1a021b13 Author: Jonathan Corbet Date: Tue Oct 11 11:25:25 2022 -0600 docs: decruft Documentation/conf.py Remove the ancient support for the Sphinx "classic" theme; everybody will have alabaster, so that fallback is no longer needed. While in the neighborhood: get rid of lots of useless comment lines. They describe the state of Sphinx options when we first created that file and are just clutter now. Suggested-by: Mauro Carvalho Chehab Acked-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 181 +------------------------------------------------- 1 file changed, 2 insertions(+), 179 deletions(-) commit eaf710ceb5ae284778a87c0d0f2348c19e3e4751 Author: Jonathan Corbet Date: Fri Sep 30 11:52:09 2022 -0600 docs: improve the HTML formatting of kerneldoc comments Make a few changes to cause functions documented by kerneldoc to stand out better in the rendered documentation. Specifically, change kernel-doc to put the description section into a ".. container::" section, then add a bit of CSS to indent that section relative to the function prototype (or struct or enum definition). Tweak a few other CSS parameters while in the neighborhood to improve the formatting. Acked-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/sphinx-static/custom.css | 16 +++++++++- scripts/kernel-doc | 54 +++++++++++++++++++++------------- 2 files changed, 48 insertions(+), 22 deletions(-) commit ee5a86f451f7cc8a904fcbc4f3dece023d36d6e5 Author: SeongJae Park Date: Mon Oct 10 19:58:09 2022 -0700 docs/memory-barriers.txt/kokr: Fix confusing name of 'data dependency barrier' Translate this commit to Korean: 203185f6b1e3 ("Fix confusing name of 'data dependency barrier'") Signed-off-by: SeongJae Park Reviewed-by: Yunjae Lee Signed-off-by: Paul E. McKenney .../translations/ko_KR/memory-barriers.txt | 127 +++++++++++---------- 1 file changed, 69 insertions(+), 58 deletions(-) commit f4928c3fae3b5d907546d921a6e31d8d1f786225 Author: SeongJae Park Date: Mon Oct 10 19:58:08 2022 -0700 docs/memory-barriers.txt/kokr: Add memory barrier dma_mb() Translate this commit to Korean: ed59dfd9509d ("asm-generic: Add memory barrier dma_mb()") Signed-off-by: SeongJae Park Reviewed-by: Yunjae Lee Signed-off-by: Paul E. McKenney Documentation/translations/ko_KR/memory-barriers.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 9fef8eb2548b75cf352403e66a789b00048bc9d6 Author: SeongJae Park Date: Mon Oct 10 19:58:07 2022 -0700 docs/memory-barriers.txt/kokr: introduce io_stop_wc() and add implementation for ARM64 Translate this commit to Korean: d5624bb29f49 ("asm-generic: introduce io_stop_wc() and add implementation for ARM64") Signed-off-by: SeongJae Park Reviewed-by: Yunjae Lee Signed-off-by: Paul E. McKenney Documentation/translations/ko_KR/memory-barriers.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1ab8f2486b8fc8927dff63c0d9a653fe454fafb6 Author: SeongJae Park Date: Sat Oct 8 10:49:25 2022 -0700 docs/memory-barriers.txt: Add a missed closing parenthesis The description of io_stop_wc(), which was added by commit d5624bb29f49 ("asm-generic: introduce io_stop_wc() and add implementation for ARM64"), has an unclosed parenthesis. This commit closes it. Fixes: d5624bb29f49 ("asm-generic: introduce io_stop_wc() and add implementation for ARM64") Signed-off-by: SeongJae Park Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc13b47692efdc829842757798011fa2e13eb9ff Author: Paul Heidekrüger Date: Sat Sep 3 16:57:17 2022 +0000 tools/memory-model: Weaken ctrl dependency definition in explanation.txt The current informal control dependency definition in explanation.txt is too broad and, as discussed, needs to be updated. Consider the following example: > if(READ_ONCE(x)) > return 42; > > WRITE_ONCE(y, 42); > > return 21; The read event determines whether the write event will be executed "at all" - as per the current definition - but the formal LKMM does not recognize this as a control dependency. Introduce a new definition which includes the requirement for the second memory access event to syntactically lie within the arm of a non-loop conditional. Link: https://lore.kernel.org/all/20220615114330.2573952-1-paul.heidekrueger@in.tum.de/ Cc: Marco Elver Cc: Charalampos Mainas Cc: Pramod Bhatotia Cc: Soham Chakraborty Cc: Martin Fink Co-developed-by: Alan Stern Signed-off-by: Alan Stern Signed-off-by: Paul Heidekrüger Signed-off-by: Paul E. McKenney tools/memory-model/Documentation/explanation.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 144b9152791ffcd038c3b63063999b25780060d8 Author: Ryosuke Yasuoka Date: Tue Oct 18 19:22:54 2022 +0900 kcsan: Fix trivial typo in Kconfig help comments Fix trivial typo in Kconfig help comments in KCSAN_SKIP_WATCH and KCSAN_SKIP_WATCH_RANDOMIZE Signed-off-by: Ryosuke Yasuoka Reviewed-by: Marco Elver Signed-off-by: Paul E. McKenney lib/Kconfig.kcsan | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 63646fcba5bb4b59a19031c21913f94e46a3d0d4 Author: Marco Elver Date: Mon Sep 12 11:45:41 2022 +0200 objtool, kcsan: Add volatile read/write instrumentation to whitelist Adds KCSAN's volatile instrumentation to objtool's uaccess whitelist. Recent kernel change have shown that this was missing from the uaccess whitelist (since the first upstreamed version of KCSAN): mm/gup.o: warning: objtool: fault_in_readable+0x101: call to __tsan_volatile_write1() with UACCESS enabled Fixes: 75d75b7a4d54 ("kcsan: Support distinguishing volatile accesses") Signed-off-by: Marco Elver Reviewed-by: Dmitry Vyukov Signed-off-by: Paul E. McKenney tools/objtool/check.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7c201739beef1a586d806463f1465429cdce34c5 Author: Marco Elver Date: Mon Sep 12 11:45:40 2022 +0200 kcsan: Instrument memcpy/memset/memmove with newer Clang With Clang version 16+, -fsanitize=thread will turn memcpy/memset/memmove calls in instrumented functions into __tsan_memcpy/__tsan_memset/__tsan_memmove calls respectively. Add these functions to the core KCSAN runtime, so that we (a) catch data races with mem* functions, and (b) won't run into linker errors with such newer compilers. Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney kernel/kcsan/core.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit dfabd42099df9e8ead8cf2bc4d918a1fa70ec96d Author: Paul E. McKenney Date: Mon Aug 29 16:30:14 2022 -0700 rcutorture: Avoid redundant builds for rcuscale and refscale in torture.sh This commit causes torture.sh to use the new --bootargs and --datestamp parameters to kvm-again.sh in order to avoid redundant kernel builds during rcuscale and refscale testing. This trims the better part of an hour off of torture.sh runs that use --do-kasan. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/torture.sh | 87 +++++++++++++++++++++-- 1 file changed, 83 insertions(+), 4 deletions(-) commit fb53a8da050a95e6491f36b0fe35c69ac532181f Author: Paul E. McKenney Date: Mon Aug 29 16:26:26 2022 -0700 rcutorture: Add --datestamp parameter to kvm-again.sh This commit adds a --datestamp parameter to kvm-again.sh, which, in contrast to the existing --rundir argument, specifies only the last segments of the pathname. This addition enables torture.sh to use kvm-again.sh in order to avoid redundant kernel builds. Signed-off-by: Paul E. McKenney .../testing/selftests/rcutorture/bin/kvm-again.sh | 37 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) commit 8e3b180e08318331a376ab39e1aa3c9b5e2f950a Author: Paul E. McKenney Date: Mon Aug 29 16:23:11 2022 -0700 rcutorture: Make kvm-recheck.sh export TORTURE_SUITE As it should, the kvm-recheck.sh script sets the TORTURE_SUITE bash variable based on the type of rcutorture test being run. However, it does not export it. Which is OK, at least until you try running kvm-again.sh on either a rcuscale or a refscale test, at which point you get false-positive "no success message, N successful version messages" errors. This commit therefore causes the kvm-recheck.sh script to export TORTURE_SUITE, suppressing these false positives. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/kvm-recheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f14c20cf3c1053702efe55c4ea62da2e05fdced7 Author: Paul E. McKenney Date: Mon Aug 29 16:21:19 2022 -0700 rcutorture: Make kvm-test-1-run-qemu.sh check for alternative output The kvm-again.sh script, when running locally, can place the QEMU output into kvm-test-1-run-qemu.sh.out instead of kvm-test-1-run.sh.out. This commit therefore makes kvm-test-1-run-qemu.sh check both locations. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c211ae9ce424793a24cac346ee73613965a40646 Author: Paul E. McKenney Date: Sat Aug 27 07:16:27 2022 -0700 torture: Use mktemp instead of guessing at unique names This commit drags the rcutorture scripting kicking and screaming into the twenty-first century by making use of the BSD-derived mktemp command to create temporary files and directories. In happy contrast to many of its ill-behaved predecessors, mktemp seems to actually work reasonably reliably! Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/config2csv.sh | 3 +-- tools/testing/selftests/rcutorture/bin/config_override.sh | 3 +-- tools/testing/selftests/rcutorture/bin/configcheck.sh | 3 +-- tools/testing/selftests/rcutorture/bin/configinit.sh | 3 +-- tools/testing/selftests/rcutorture/bin/kvm-again.sh | 3 +-- tools/testing/selftests/rcutorture/bin/kvm-assign-cpus.sh | 3 +-- tools/testing/selftests/rcutorture/bin/kvm-build.sh | 3 +-- tools/testing/selftests/rcutorture/bin/kvm-end-run-stats.sh | 3 +-- tools/testing/selftests/rcutorture/bin/kvm-remote.sh | 13 ++++++------- .../selftests/rcutorture/bin/kvm-test-1-run-batch.sh | 3 +-- .../testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh | 3 +-- tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 3 +-- tools/testing/selftests/rcutorture/bin/kvm.sh | 3 +-- tools/testing/selftests/rcutorture/bin/parse-build.sh | 3 +-- tools/testing/selftests/rcutorture/bin/torture.sh | 3 +-- 15 files changed, 20 insertions(+), 35 deletions(-) commit 50527f7cd051b7d701bb5797b958d8fd4486cdcd Author: Paul E. McKenney Date: Fri Aug 26 14:47:48 2022 -0700 rcutorture: Add --bootargs parameter to kvm-again.sh The kvm-again.sh script can be used to repeat short boot-time tests, but the kernel boot arguments cannot be changed. This means that every change in kernel boot arguments currently necessitates a kernel build, which greatly increases the duration of kernel-boot testing. This commit therefore adds a --bootargs parameter to kvm-again.sh, which allows a given kernel to be repeatedly booted, but overriding old and adding new kernel boot parameters. This allows an old kernel to be booted with new kernel boot parameters, avoiding the overhead of rebuilding the kernel under test. Signed-off-by: Paul E. McKenney .../testing/selftests/rcutorture/bin/kvm-again.sh | 9 ++- .../selftests/rcutorture/bin/kvm-transform.sh | 68 ++++++++++++++++++---- 2 files changed, 65 insertions(+), 12 deletions(-) commit 1324d95b1c22d1c50d0c710dd5a8e2104d097cfc Author: Paul E. McKenney Date: Thu Aug 25 15:47:09 2022 -0700 rcutorture: Verify NUM_ACTIVE_RCU_POLL_OLDSTATE This commit adds code to the RTWS_POLL_GET case of rcu_torture_writer() to verify that the value of NUM_ACTIVE_RCU_POLL_OLDSTATE is sufficiently large Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 1d5ebc351f0100394eb99613e91e9e138fd33d78 Author: Paul E. McKenney Date: Thu Aug 25 13:37:59 2022 -0700 rcutorture: Verify NUM_ACTIVE_RCU_POLL_FULL_OLDSTATE This commit adds code to the RTWS_POLL_GET_FULL case of rcu_torture_writer() to verify that the value of NUM_ACTIVE_RCU_POLL_FULL_OLDSTATE is sufficiently large. [ paulmck: Fix whitespace issue located by checkpatch.pl. ] Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit b8f7aca3f0e0e6223094ba2662bac90353674b04 Author: Frederic Weisbecker Date: Sun Oct 16 16:22:53 2022 +0000 rcu: Fix missing nocb gp wake on rcu_barrier() In preparation for RCU lazy changes, wake up the RCU nocb gp thread if needed after an entrain. This change prevents the RCU barrier callback from waiting in the queue for several seconds before the lazy callbacks in front of it are serviced. Reported-by: Joel Fernandes (Google) Signed-off-by: Frederic Weisbecker Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 11 +++++++++++ kernel/rcu/tree.h | 1 + kernel/rcu/tree_nocb.h | 5 +++++ 3 files changed, 17 insertions(+) commit b50606f35f4b73c8e4c6b9c64fe7ba72ea919134 Author: Joel Fernandes (Google) Date: Sat Sep 17 16:41:59 2022 +0000 rcu: Fix late wakeup when flush of bypass cblist happens When the bypass cblist gets too big or its timeout has occurred, it is flushed into the main cblist. However, the bypass timer is still running and the behavior is that it would eventually expire and wake the GP thread. Since we are going to use the bypass cblist for lazy CBs, do the wakeup soon as the flush for "too big or too long" bypass list happens. Otherwise, long delays can happen for callbacks which get promoted from lazy to non-lazy. This is a good thing to do anyway (regardless of future lazy patches), since it makes the behavior consistent with behavior of other code paths where flushing into the ->cblist makes the GP kthread into a non-sleeping state quickly. [ Frederic Weisbecker: Changes to avoid unnecessary GP-thread wakeups plus comment changes. ] Reviewed-by: Frederic Weisbecker Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney kernel/rcu/tree_nocb.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit f1ffec1ea30fdd4c101c78af2be376d8c1cf46b7 Author: Zhen Lei Date: Tue Sep 13 11:00:36 2022 +0800 rcu: Simplify rcu_init_nohz() cpumask handling In kernels built with either CONFIG_RCU_NOCB_CPU_DEFAULT_ALL=y or CONFIG_NO_HZ_FULL=y, additional CPUs must be added to rcu_nocb_mask. Except that kernels booted without the rcu_nocbs= will not have allocated rcu_nocb_mask. And the current rcu_init_nohz() function uses its need_rcu_nocb_mask and offload_all local variables to track the rcu_nocb and nohz_full state. But there is a much simpler approach, namely creating a cpumask pointer to track the default and then using cpumask_available() to check the rcu_nocb_mask state. This commit takes this approach, thereby simplifying and shortening the rcu_init_nohz() function. Signed-off-by: Zhen Lei Reviewed-by: Joel Fernandes (Google) Acked-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney kernel/rcu/tree_nocb.h | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) commit aba9645bd10bd9f793732b06495b1312ee44865e Author: Joel Fernandes (Google) Date: Sat Sep 17 16:41:58 2022 +0000 rcu: Use READ_ONCE() for lockless read of rnp->qsmask The rnp->qsmask is locklessly accessed from rcutree_dying_cpu(). This may help avoid load tearing due to concurrent access, KCSAN issues, and preserve sanity of people reading the mask in tracing. Reviewed-by: Frederic Weisbecker Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5ad0d2e8832c770b3ff2887ae37b47f42a3ab82 Author: Zeng Heng Date: Thu Sep 15 16:38:24 2022 +0800 rcu: Remove unused 'cpu' in rcu_virt_note_context_switch() This commit removes the unused function argument 'cpu'. This does not change functionality, but might save a cycle or two. Signed-off-by: Zeng Heng Acked-by: Mukesh Ojha Signed-off-by: Paul E. McKenney include/linux/kvm_host.h | 2 +- include/linux/rcutiny.h | 2 +- include/linux/rcutree.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 6343402ac35dd534291a6c82924a4f09cf6cd1e5 Author: Pingfan Liu Date: Tue Sep 6 11:36:42 2022 -0700 rcu: Synchronize ->qsmaskinitnext in rcu_boost_kthread_setaffinity() Once either rcutree_online_cpu() or rcutree_dead_cpu() is invoked concurrently, the following rcu_boost_kthread_setaffinity() race can occur: CPU 1 CPU2 mask = rcu_rnp_online_cpus(rnp); ... mask = rcu_rnp_online_cpus(rnp); ... set_cpus_allowed_ptr(t, cm); set_cpus_allowed_ptr(t, cm); This results in CPU2's update being overwritten by that of CPU1, and thus the possibility of ->boost_kthread_task continuing to run on a to-be-offlined CPU. This commit therefore eliminates this race by relying on the pre-existing acquisition of ->boost_kthread_mutex to serialize the full process of changing the affinity of ->boost_kthread_task. Signed-off-by: Pingfan Liu Cc: David Woodhouse Cc: Frederic Weisbecker Cc: Neeraj Upadhyay Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes Cc: "Jason A. Donenfeld" Signed-off-by: Paul E. McKenney kernel/rcu/tree_plugin.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d6fd907a95a73251bd8494e1ba5350342e05e74a Author: Zqiang Date: Tue Aug 30 16:31:51 2022 +0800 rcu: Remove duplicate RCU exp QS report from rcu_report_dead() The rcu_report_dead() function invokes rcu_report_exp_rdp() in order to force an immediate expedited quiescent state on the outgoing CPU, and then it invokes rcu_preempt_deferred_qs() to provide any required deferred quiescent state of either sort. Because the call to rcu_preempt_deferred_qs() provides the expedited RCU quiescent state if requested, the call to rcu_report_exp_rdp() is potentially redundant. One possible issue is a concurrent start of a new expedited RCU grace period, but this situation is already handled correctly by __sync_rcu_exp_select_node_cpus(). This function will detect that the CPU is going offline via the error return from its call to smp_call_function_single(). In that case, it will retry, and eventually stop retrying due to rcu_report_exp_rdp() clearing the ->qsmaskinitnext bit corresponding to the target CPU. As a result, __sync_rcu_exp_select_node_cpus() will report the necessary quiescent state after dealing with any remaining CPU. This change assumes that control does not enter rcu_report_dead() within an RCU read-side critical section, but then again, the surviving call to rcu_preempt_deferred_qs() has always made this assumption. This commit therefore removes the call to rcu_report_exp_rdp(), thus relying on rcu_preempt_deferred_qs() to handle both normal and expedited quiescent states. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-) commit 3e7768b7ad5bcb9adedecb3aed9a94983edfb064 Author: Paul E. McKenney Date: Fri Sep 9 04:46:26 2022 -0700 doc: Update checklist.txt This commit updates checklist.txt to reflect RCU additions and changes over the past few years. Signed-off-by: Paul E. McKenney Documentation/RCU/checklist.rst | 244 +++++++++++++++++++++++----------------- 1 file changed, 143 insertions(+), 101 deletions(-) commit ef2555cf68c395cbdb8ec051dbdd6a68208f3a81 Author: Paul E. McKenney Date: Thu Sep 8 05:48:01 2022 -0700 doc: Remove arrayRCU.rst Although RCU can in theory be used to protect array indexes in a manner similar to the way it protects pointers, doing so is extremely risky because of the huge number of optimizations that modern compilers can apply to integral types. For but one example, if your code can be configured such that your array contains only a single element, then indexing that array with any integer other than zero invokes undefined behavior, which in turn means that the compiler is within its rights to assume (without checking!) that any integer used as an index to that array has the value zero. Therefore, the compiler can index the array with the constant zero, which breaks any dependencies that might have otherwise existed between the time the actual value was loaded and the time that the array was indexed. This commit therefore removes the arrayRCU.rst file that describes how to go about carrying dependencies through array indexes. Signed-off-by: Paul E. McKenney Documentation/RCU/arrayRCU.rst | 165 ----------------------------------------- Documentation/RCU/index.rst | 1 - 2 files changed, 166 deletions(-) commit 2d3093fd5ea0e79cc6ca0e80ca56280ea7b4d0bf Author: Matt Roper Date: Fri Oct 14 16:30:04 2022 -0700 drm/i915/pvc: Update forcewake domain for CCS register ranges The bspec was just updated with a correction to the forcewake domain required when accessing registers in the CCS engine ranges (0x1a000 - 0x1ffff and 0x26000 - 0x27fff) on PVC; these ranges require a wake on the RENDER domain, not the GT domain. Bspec: 67609 Signed-off-by: Matt Roper Reviewed-by: Harish Chegondi Link: https://patchwork.freedesktop.org/patch/msgid/20221014233004.1053678-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/intel_uncore.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 6c4e777fbba6e7dd6a0757c0e7bba66cdbe611cd Author: Daniel Müller Date: Mon Oct 17 23:24:58 2022 +0000 bpf/docs: Update README for most recent vmtest.sh Since commit 40b09653b197 ("selftests/bpf: Adjust vmtest.sh to use local kernel configuration") the vmtest.sh script no longer downloads a kernel configuration but uses the local, in-repository one. This change updates the README, which still mentions the old behavior. Signed-off-by: Daniel Müller Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221017232458.1272762-1-deso@posteo.net tools/testing/selftests/bpf/README.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 8f8033d5663b18e6efb33feb61f2287a04605ab5 Author: Rafael Mendonca Date: Mon Oct 17 21:53:57 2022 -0300 drm/amdgpu/powerplay/psm: Fix memory leak in power state init Commit 902bc65de0b3 ("drm/amdgpu/powerplay/psm: return an error in power state init") made the power state init function return early in case of failure to get an entry from the powerplay table, but it missed to clean up the allocated memory for the current power state before returning. Fixes: 902bc65de0b3 ("drm/amdgpu/powerplay/psm: return an error in power state init") Reviewed-by: Evan Quan Signed-off-by: Rafael Mendonca Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 2 ++ 1 file changed, 2 insertions(+) commit df768a9770271b0d9faab25f42dfc7bdec87b21c Author: Arunpravin Paneer Selvam Date: Tue Oct 18 07:08:38 2022 -0700 drm/amdgpu: Fix for BO move issue A user reported a bug on CAPE VERDE system where uvd_v3_1 IP component failed to initialize as there is an issue with BO move code from one memory to other. In function amdgpu_mem_visible() called by amdgpu_bo_move(), when there are no blocks to compare or if we have a single block then break the loop. Fixes: 312b4dc11d4f ("drm/amdgpu: Fix VRAM BO swap issue") Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +++ 1 file changed, 3 insertions(+) commit c4dfad81e444ba27ea9944c9af061a789ab91201 Author: YuBiao Wang Date: Thu Oct 13 11:31:55 2022 +0800 drm/amdgpu: dequeue mes scheduler during fini [Why] If mes is not dequeued during fini, mes will be in an uncleaned state during reload, then mes couldn't receive some commands which leads to reload failure. [How] Perform MES dequeue via MMIO after all the unmap jobs are done by mes and before kiq fini. v2: Move the dequeue operation inside kiq_hw_fini. Signed-off-by: YuBiao Wang Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 42 +++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) commit c520ba3fad335c76f4fad2ab49485eb9edf3de54 Author: Kenneth Feng Date: Fri Oct 14 15:19:51 2022 +0800 drm/amd/pm: enable thermal alert on smu_v13_0_10 enable thermal alert on smu_v13_0_10 Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 7e2c58320ed59c9326e82cf9c00090f6a912fb64 Author: Yifan Zha Date: Wed Sep 7 14:13:02 2022 +0800 drm/amdgpu: Program GC registers through RLCG interface in gfx_v11/gmc_v11 [Why] L1 blocks most of GC registers accessing by MMIO. [How] Use RLCG interface to program GC registers under SRIOV VF in full access time. Signed-off-by: Yifan Zha Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 18 +++++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) commit 5d0f5953b60f5f7a278085b55ddc73e2932f4c33 Author: Paul E. McKenney Date: Thu Sep 15 12:09:30 2022 -0700 srcu: Convert ->srcu_lock_count and ->srcu_unlock_count to atomic NMI-safe variants of srcu_read_lock() and srcu_read_unlock() are needed by printk(), which on many architectures entails read-modify-write atomic operations. This commit prepares Tree SRCU for this change by making both ->srcu_lock_count and ->srcu_unlock_count by atomic_long_t. [ paulmck: Apply feedback from John Ogness. ] Link: https://lore.kernel.org/all/20220910221947.171557773@linutronix.de/ Signed-off-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: John Ogness Cc: Petr Mladek include/linux/srcutree.h | 4 ++-- kernel/rcu/srcutree.c | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) commit 666ea0ad932fbdc82644457f1a78f4584801f698 Author: Uwe Kleine-König Date: Mon Oct 17 22:01:43 2022 +0200 spi: bcm-qspi: Make bcm_qspi_remove() return void The function bcm_qspi_remove() returns zero unconditionally. Make it return void. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20221017200143.1426528-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown drivers/spi/spi-bcm-qspi.c | 5 ++--- drivers/spi/spi-bcm-qspi.h | 2 +- drivers/spi/spi-brcmstb-qspi.c | 4 +++- drivers/spi/spi-iproc-qspi.c | 4 +++- 4 files changed, 9 insertions(+), 6 deletions(-) commit e3b7fca31185813297bb995d7b21a6305bb62c84 Author: Andy Shevchenko Date: Mon Oct 17 20:12:38 2022 +0300 spi: pxa2xx: Simplify with 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. No functional changes. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221017171243.57078-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 67860d2a8e0db7783f680f6f1c1600ed34ed3a97 Author: Colin Ian King Date: Tue Oct 18 16:29:28 2022 +0100 ASoC: twl4030: make read-only array ramp_base static const Don't populate the read-only array ramp_base on the stack but instead make it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221018152928.942186-1-colin.i.king@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/twl4030.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bdde278a77d3220ba7991e6ff5e992716981ae30 Author: Venkata Prasad Potturu Date: Tue Oct 18 17:57:06 2022 +0530 ASoC: amd: acp: Add TDM slots setting support for ACP I2S controller Modify set tdm slot function to set ACP I2S controller slots in tdm mode based on number of slots. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20221018122711.2559452-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown sound/soc/amd/acp/acp-i2s.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 73e4981f12325d9d128af68faedc3e36b6ff7c37 Author: Peter Ujfalusi Date: Tue Oct 18 16:38:43 2022 +0300 ASoC: SOF: ipc3: Log the tx message before sending it It makes more sense to log the message before it is sent to the DSP. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20221018133843.16958-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 010c050fe9ea263e3fc17493822117610a23f662 Author: Peter Ujfalusi Date: Tue Oct 18 15:40:08 2022 +0300 ASoC: SOF: Intel: ipc4: Ack a received reply or notification separately By acking a received message we tell the DSP that we have processed the message (reply or notification) and we are open to receive a new one. The original implementation did this in a common code after the received message got handled as reply or notification. With right timing this opens up a small window when we have processed the reply and let the other thread proceed to send a new message to the DSP, which is allowed as the DSP is free to receive message. But when the message is received and processed by the DSP and it wants to send a reply it will still see that the previous message has not been acked, so it fails to send a reply. Later the first reply got acked by the kernel, but it is too late and the in-flight message got a timeout due to firmware not responding (which it tried, but could not). Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221018124008.6846-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 7 ++++--- sound/soc/sof/intel/hda-ipc.c | 7 ++++--- sound/soc/sof/intel/mtl.c | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) commit 483e4cdfb502e6bea6b0a226a3ff7c22e60153de Author: Peter Ujfalusi Date: Tue Oct 18 15:40:07 2022 +0300 ASoC: SOF: Intel: ipc4: Wait for channel to be free before sending a message Before attempting to send a message to the DSP we need to check if the downstream BUSY flag has been cleared by the firmware to avoid lost IPC messages by the firmware. This is required by a firmware which only acks the received message after it has sent a reply to the host. With a bad luck, the host would send a message before the firmware gets to the clearing the flag and thus losing a message. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221018124008.6846-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 17 +++++++++++++++++ sound/soc/sof/intel/hda-ipc.c | 17 +++++++++++++++++ sound/soc/sof/intel/hda.c | 11 +++++++++++ sound/soc/sof/intel/hda.h | 9 +++++++++ sound/soc/sof/intel/mtl.c | 17 +++++++++++++++++ 5 files changed, 71 insertions(+) commit c8ed7ce242db83ca2c4e9eab557a88adbae5ef6a Author: Peter Ujfalusi Date: Tue Oct 18 15:40:06 2022 +0300 ASoC: SOF: Intel: ipc4: Read the interrupt reason registers at the same time Read both registers as the first step in the interrupt handler to make sure that we are handling the event which triggered the interrupt. The delayed reading of the target request register might reflect incorrect information about the reason why the interrupt was risen. Note also that the IPC3 interrupt handler is implemented in this way also. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221018124008.6846-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 2 +- sound/soc/sof/intel/hda-ipc.c | 3 ++- sound/soc/sof/intel/mtl.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) commit 2d91d5715f5f3b24456ede20dbbe967a1d2a0a3e Author: Peter Ujfalusi Date: Tue Oct 18 15:40:05 2022 +0300 ASoC: SOF: ipc4: Log the tx message before sending it It makes more sense to log the message before it is sent to the DSP. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221018124008.6846-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0135ae74b4f16fd08c9bad3b965234961d377fa7 Author: Kuninori Morimoto Date: Mon Oct 17 23:36:56 2022 +0000 ASoC: soc-dapm.c: cleanup dapm_widget_set_power() This patch cleanup dapm_widget_set_power() comment, parenthesis, and 100 chars. It has no meaning, nothing will be changed. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v8oiowdk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 1c9096f32ad23f5867e752f238fd25e4fec55ecd Author: Kuninori Morimoto Date: Mon Oct 17 23:36:49 2022 +0000 ASoC: soc-dapm.c: ignore parameter NULL at snd_soc_dapm_free_widget() Currently snd_soc_dapm_free_widget() is assuming input parameter is non NULL. Thus, caller need to care about it. This patch care it at snd_soc_dapm_free_widget(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wn8yowdr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/codecs/hda.c | 6 ++---- sound/soc/intel/avs/pcm.c | 6 ++---- sound/soc/soc-dapm.c | 3 +++ 3 files changed, 7 insertions(+), 8 deletions(-) commit c1329a0f3bde6a655b9e6ce54b1ce47f46fa49f2 Author: Kuninori Morimoto Date: Mon Oct 17 23:36:42 2022 +0000 ASoC: soc-dapm.c: remove no meaning variable from snd_soc_dapm_add_path() snd_soc_dapm_add_path() is using local variable "widgets[]", but it is same as path->node[]. This is no meaning and duplicate operation. This patch removes "widgets[]". path->node[SND_SOC_DAPM_DIR_IN] = wsource; path->node[SND_SOC_DAPM_DIR_OUT] = wsink; widgets[SND_SOC_DAPM_DIR_IN] = wsource; widgets[SND_SOC_DAPM_DIR_OUT] = wsink; Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y1teowdx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit b913e9f4b313469dac7ae3083356baee3db4454f Author: Kuninori Morimoto Date: Mon Oct 17 23:36:35 2022 +0000 ASoC: soc-dapm.c: tidyup error handling on snd_soc_dapm_add_route() Current error handling on snd_soc_dapm_add_route() has some wastes. It indicates *own* error message *only* for sink or source, and return error directly at (A). OTOH, it has similar error message at (B) which indicates *both* sink/source. And more, (A) is using dev_err(), (B) is using dev_warn(). (B) is caring prefix, but (A) is not. (X) int snd_soc_dapm_add_route(...) { ... if (wsource == NULL) { (A) dev_err(...); return -ENODEV; } if (wsink == NULL) { (A) dev_err(...); return -ENODEV; } ... ret = snd_soc_dapm_add_path(...); if (ret) (B) goto err; return 0; err: (B) dev_warn(...); return ret; } Above snd_soc_dapm_add_route() (= X) is called from snd_soc_dapm_add_routes() (= Y). (X) will indicate error message by itself, but (Y) will indicate own error message at (C). (C) is duplicated. (Y) int snd_soc_dapm_add_routes(...) { ... for (...) { (X) int r = snd_soc_dapm_add_route(...); if (r < 0) { (C) dev_err(...); ret = r; } ... } ... } This patch (1) merges these error message (= A,B) into one, (2) use dev_err(), (3) remove duplicate error message (= C) from snd_soc_dapm_add_routes(). By this patch, it will indicate error message like this. - error message with prefix - not found widget will have "(*)" mark - it indicates [control] if exists. ex) [if no sink with control] ASoC: Failed to add route SOURCE -> [CTRL] -> SINK(*) [if no source without control] ASoC: Failed to add route SOURCE(*) -> SINK Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zgduowe5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) commit 03e13efbb2113412ae7879258a82bdae86fc72e2 Author: Kuninori Morimoto Date: Mon Oct 17 23:36:27 2022 +0000 ASoC: soc-dapm.c: replace snd_soc_dapm_wcache to snd_soc_dapm_widget Current ASoC has snd_soc_dapm_wcache, but its member is only snd_soc_dapm_widget. struct snd_soc_dapm_wcache { struct snd_soc_dapm_widget *widget; }; It is no meaning for now, and makes code unreadable. This patch replace snd_soc_dapm_wcache to snd_soc_dapm_widget directly. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871qr6qayt.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown include/sound/soc-dapm.h | 9 ++------- sound/soc/soc-dapm.c | 29 +++++++++-------------------- 2 files changed, 11 insertions(+), 27 deletions(-) commit 9f68d6e64f51bf62f8d2f7d82a425470e9aa3b24 Author: Pierre-Louis Bossart Date: Mon Oct 17 15:49:46 2022 -0500 ASoC: SOF: Intel: hda-dsp: simplify S3 resume flows The flow contains surprising parts that seem to have been inspired by the Skylake driver. During a resume from S3, the state of the links prior to suspend should not matter. One would have to assume that the links are powered down anyways prior to suspend, and there is also no specific code that turns links on unconditionally on resume. Likewise, the snd_hdac_init_chip() routine will start the cmd_io handling, and it's not clear why we should care about the state of the DMA prior to suspend. This patch removes these two sequences to simplify the flow. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221017204946.207986-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 14 -------------- 1 file changed, 14 deletions(-) commit 8e1ae6f62c7e8f904949e9c60a4a38715c8c0aff Author: Pierre-Louis Bossart Date: Mon Oct 17 15:49:45 2022 -0500 ASoC: Intel: avs: simplify S3 resume flows The same code was directly copied from the skylake driver where it was already questionable. Remove and simplify the flow. Tested-by: Cezary Rojewski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221017204946.207986-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/core.c | 11 ----------- 1 file changed, 11 deletions(-) commit fac33cb5c12c58e031a5e2f8e3e8c7de8604a764 Author: Pierre-Louis Bossart Date: Mon Oct 17 15:49:44 2022 -0500 ASoC: Intel: Skylake: simplify S3 resume flows Commit cce6c149eba3a ("ASoC: Intel: Skylake: add link management") added a perfectly logical/symmetrical link handling for 'suspend_active' aka S0ix However that commit also added a less obvious part, where during S3 resume the code will "turn off the links which are off before suspend" as well as stop the cmd_io which is not started. This sequence looks completely unnecessary and possibly wrong, remove it. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221017204946.207986-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 9 --------- 1 file changed, 9 deletions(-) commit 79d878f7ad8e8c68327107d76c25fb4d539c3c99 Merge: 62c69e89e81b 4835f9ee980c Author: Alexei Starovoitov Date: Tue Oct 18 10:27:02 2022 -0700 Merge branch 'Remove unnecessary RCU grace period chaining' Hou Tao says: ==================== Now bpf uses RCU grace period chaining to wait for the completion of access from both sleepable and non-sleepable bpf program: calling call_rcu_tasks_trace() firstly to wait for a RCU-tasks-trace grace period, then in its callback calls call_rcu() or kfree_rcu() to wait for a normal RCU grace period. According to the implementation of RCU Tasks Trace, it inovkes ->postscan_func() to wait for one RCU-tasks-trace grace period and rcu_tasks_trace_postscan() inovkes synchronize_rcu() to wait for one normal RCU grace period in turn, so one RCU-tasks-trace grace period will imply one normal RCU grace period. To codify the implication, introduces rcu_trace_implies_rcu_gp() in patch #1. And using it in patch Other two uses of call_rcu_tasks_trace() are unchanged: for __bpf_prog_put_rcu() there is no gp chain and for __bpf_tramp_image_put_rcu_tasks() it chains RCU tasks trace GP and RCU tasks GP. An alternative way to remove these unnecessary RCU grace period chainings is using the RCU polling API to check whether or not a normal RCU grace period has passed (e.g. get_state_synchronize_rcu()). But it needs an unsigned long space for each free element or each call, and it is not affordable for local storage element, so as for now always rcu_trace_implies_rcu_gp(). Comments are always welcome. Change Log: v2: * codify the implication of RCU Tasks Trace grace period instead of assuming for it v1: https://lore.kernel.org/bpf/20221011071128.3470622-1-houtao@huaweicloud.com Hou Tao (3): bpf: Use rcu_trace_implies_rcu_gp() in bpf memory allocator bpf: Use rcu_trace_implies_rcu_gp() in local storage map bpf: Use rcu_trace_implies_rcu_gp() for program array freeing ==================== Reviewed-by: Paul E. McKenney Signed-off-by: Alexei Starovoitov commit 4835f9ee980c1867584018e69cbf1f62d7844cb3 Author: Hou Tao Date: Fri Oct 14 19:39:46 2022 +0800 bpf: Use rcu_trace_implies_rcu_gp() for program array freeing To support both sleepable and normal uprobe bpf program, the freeing of trace program array chains a RCU-tasks-trace grace period and a normal RCU grace period one after the other. With the introduction of rcu_trace_implies_rcu_gp(), __bpf_prog_array_free_sleepable_cb() can check whether or not a normal RCU grace period has also passed after a RCU-tasks-trace grace period has passed. If it is true, it is safe to invoke kfree() directly. Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20221014113946.965131-5-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d39d1445d37747032e2b26732fed6fe25161cd36 Author: Hou Tao Date: Fri Oct 14 19:39:45 2022 +0800 bpf: Use rcu_trace_implies_rcu_gp() in local storage map Local storage map is accessible for both sleepable and non-sleepable bpf program, and its memory is freed by using both call_rcu_tasks_trace() and kfree_rcu() to wait for both RCU-tasks-trace grace period and RCU grace period to pass. With the introduction of rcu_trace_implies_rcu_gp(), both bpf_selem_free_rcu() and bpf_local_storage_free_rcu() can check whether or not a normal RCU grace period has also passed after a RCU-tasks-trace grace period has passed. If it is true, it is safe to call kfree() directly. Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20221014113946.965131-4-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/bpf_local_storage.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 59be91e5e70a1aa91dfee8088b071f6d05c8a1a3 Author: Hou Tao Date: Fri Oct 14 19:39:44 2022 +0800 bpf: Use rcu_trace_implies_rcu_gp() in bpf memory allocator The memory free logic in bpf memory allocator chains a RCU Tasks Trace grace period and a normal RCU grace period one after the other, so it can ensure that both sleepable and non-sleepable programs have finished. With the introduction of rcu_trace_implies_rcu_gp(), __free_rcu_tasks_trace() can check whether or not a normal RCU grace period has also passed after a RCU Tasks Trace grace period has passed. If it is true, freeing these elements directly, else freeing through call_rcu(). Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20221014113946.965131-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/memalloc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit e6c86c513f440bec5f1046539c7e3c6c653842da Author: Paul E. McKenney Date: Fri Oct 14 19:39:43 2022 +0800 rcu-tasks: Provide rcu_trace_implies_rcu_gp() As an accident of implementation, an RCU Tasks Trace grace period also acts as an RCU grace period. However, this could change at any time. This commit therefore creates an rcu_trace_implies_rcu_gp() that currently returns true to codify this accident. Code relying on this accident must call this function to verify that this accident is still happening. Reported-by: Hou Tao Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Martin KaFai Lau Link: https://lore.kernel.org/r/20221014113946.965131-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov include/linux/rcupdate.h | 12 ++++++++++++ kernel/rcu/tasks.h | 2 ++ 2 files changed, 14 insertions(+) commit a11a5debdf4b5b5c24e88a378b53b42cc4fe1bb9 Author: Marek Vasut Date: Wed Sep 28 20:19:44 2022 +0200 dt-bindings: memory-controller: st,stm32: Split off MC properties Split st,stm32-fmc2-ebi.yaml specific properties into st,stm32-fmc2-ebi-props.yaml, split memory-controller bus peripheral properties into mc-peripheral-props.yaml, reference the st,stm32-fmc2-ebi-props.yaml in mc-peripheral-props.yaml and reference the mc-peripheral-props.yaml in micrel,ks8851.yaml. This way, the FMC2 controller properties in Micrel KSZ8851MLL ethernet controller node can be properly validated. Fixes the following warning: arch/arm/boot/dts/stm32mp153c-dhcor-drc-compact.dtb: ethernet@1,0: Unevaluated properties are not allowed ('bank-width', 'st,fmc2-ebi-cs-mux-enable', ... 'st,fmc2-ebi-cs-write-data-hold-ns' were unexpected) Reviewed-by: Rob Herring Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20220928181944.194808-1-marex@denx.de [krzk: trim warning message] Signed-off-by: Krzysztof Kozlowski .../memory-controllers/mc-peripheral-props.yaml | 38 ++++++ .../st,stm32-fmc2-ebi-props.yaml | 144 +++++++++++++++++++++ .../memory-controllers/st,stm32-fmc2-ebi.yaml | 138 +------------------- .../devicetree/bindings/net/micrel,ks8851.yaml | 1 + 4 files changed, 184 insertions(+), 137 deletions(-) commit 4985a54552e7342a4a0073245ed1f4829961fb8e Author: Julius Werner Date: Fri Sep 30 15:06:06 2022 -0700 dt-bindings: memory: Add jedec,lpddrX-channel binding This patch adds a new device tree binding for an LPDDR channel to serve as a top-level organizing node for LPDDR part nodes nested below it. An LPDDR channel needs to have an "io-width" property to describe its width (this is important because this width does not always match the io-width of the part number, indicating that multiple parts are wired in parallel on the same channel), as well as one or more nested "rank@X" nodes. Those represent information about the individual ranks of each LPDDR part connected on that channel and should match the existing "jedec,lpddrX" bindings for individual LPDDR parts. New platforms should be using this node -- the existing practice of providing a raw, toplevel "jedec,lpddrX" node without indication of how many identical parts are in the system should be considered deprecated. Signed-off-by: Julius Werner Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220930220606.303395-4-jwerner@chromium.org Signed-off-by: Krzysztof Kozlowski .../ddr/jedec,lpddr-channel.yaml | 146 +++++++++++++++++++++ .../memory-controllers/ddr/jedec,lpddr-props.yaml | 10 +- 2 files changed, 155 insertions(+), 1 deletion(-) commit a500528fb3235bc8021d2b0854d4e8803cea6f2a Author: Julius Werner Date: Fri Sep 30 15:06:05 2022 -0700 dt-bindings: memory: Add jedec,lpddr4 and jedec,lpddr5 bindings This patch adds bindings for LPDDR4 and LPDDR5 memory analogous to the existing bindings for LPDDR2 and LPDDR3. For now, the new types are only needed for topology description, so other properties like timing parameters are omitted. They can be added later if needed. Signed-off-by: Julius Werner Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220930220606.303395-3-jwerner@chromium.org Signed-off-by: Krzysztof Kozlowski .../memory-controllers/ddr/jedec,lpddr-props.yaml | 4 ++ .../memory-controllers/ddr/jedec,lpddr4.yaml | 35 ++++++++++++++++ .../memory-controllers/ddr/jedec,lpddr5.yaml | 46 ++++++++++++++++++++++ 3 files changed, 85 insertions(+) commit 686fe63b22800cff6a7f6981fb5ef62ce56b964b Author: Julius Werner Date: Fri Sep 30 15:06:04 2022 -0700 dt-bindings: memory: Add numeric LPDDR compatible string variant This patch allows a new kind of compatible string for LPDDR parts in the device tree bindings, in addition to the existing hardcoded , strings. The new format contains manufacturer and part (revision) information in numerical form, such as lpddr3-ff,0201 for an LPDDR3 part with manufacturer ID ff and revision ID 0201. This helps cases where LPDDR parts are probed at runtime by boot firmware and cannot be matched to hardcoded part numbers, such as the firmware on the qcom/sc7280-herobrine boards does (which supports 4 different memory configurations at the moment, and more are expected to be added later at a point where the boot firmware can no longer be updated to specifically accommodate them). Signed-off-by: Julius Werner Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220930220606.303395-2-jwerner@chromium.org Signed-off-by: Krzysztof Kozlowski .../bindings/memory-controllers/ddr/jedec,lpddr-props.yaml | 10 ++++++++++ .../bindings/memory-controllers/ddr/jedec,lpddr2.yaml | 8 +++++--- .../bindings/memory-controllers/ddr/jedec,lpddr3.yaml | 12 ++++++++---- 3 files changed, 23 insertions(+), 7 deletions(-) commit b7178cd53ff954b031bf96aed322ab185e0e7f58 Author: Julius Werner Date: Fri Sep 30 15:06:03 2022 -0700 dt-bindings: memory: Factor out common properties of LPDDR bindings The bindings for different LPDDR versions mostly use the same kinds of properties, so in order to reduce duplication when we're adding support for more versions, this patch creates a new lpddr-props subschema that can be referenced by the others to define these common parts. (This will consider a few smaller I/O width and density numbers "legal" for LPDDR3 that are usually not used there, but this should be harmless.) Signed-off-by: Julius Werner Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220930220606.303395-1-jwerner@chromium.org Signed-off-by: Krzysztof Kozlowski .../memory-controllers/ddr/jedec,lpddr-props.yaml | 52 ++++++++++++++++++++++ .../memory-controllers/ddr/jedec,lpddr2.yaml | 40 ++--------------- .../memory-controllers/ddr/jedec,lpddr3.yaml | 32 ++----------- 3 files changed, 60 insertions(+), 64 deletions(-) commit 1de3866f6d7a53dbee0ebe7d71eac738fb90972f Author: Geert Uytterhoeven Date: Wed Oct 12 16:01:52 2022 +0200 memory: renesas-rpc-if: Add support for R-Car Gen4 The SPI Multi I/O Bus Controller (RPC-IF) on R-Car Gen4 SoCs is very similar to the RPC-IF on R-Car Gen3 SoCs. It does support four instead of three bits of strobe timing adjustment (STRTIM), and thus requires a new mask and new settings. Inspired by a patch in the BSP by Cong Dang. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/4d0824bf5ed0fb95c51cd36f9a3f0f562b1a6bf8.1665583089.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski drivers/memory/renesas-rpc-if.c | 19 ++++++++++++------- include/memory/renesas-rpc-if.h | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) commit 5192481f908e576be42bd39ec12979b79e11f7e0 Author: Cong Dang Date: Wed Oct 12 16:01:51 2022 +0200 memory: renesas-rpc-if: Clear HS bit during hardware initialization According to the datasheet, HS bit should be specified to 1 when using DMA transfer. As DMA transfer is not supported, it should be cleared to 0. Previously, the driver relied on the HS bit being cleared by prior firmware but this is not always the case. Fix this by ensuring the bit is cleared during hardware initialization. Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver") Signed-off-by: Cong Dang Signed-off-by: Hai Pham Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/08d9fb10b3051decebf871267a6e2e7cb2d4faf9.1665583089.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski drivers/memory/renesas-rpc-if.c | 3 +++ 1 file changed, 3 insertions(+) commit 09f537065c064826a6a892fa0fdfd6521e5bf82a Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:12 2022 -0400 dt-bindings: pinctrl: qcom: adjust description Drop "binding" from description, because the field should describe the hardware. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-34-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml | 5 ++--- Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml | 5 ++--- Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml | 5 ++--- Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml | 5 ++--- Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml | 5 ++--- 5 files changed, 10 insertions(+), 15 deletions(-) commit fc371f6075cfa4f62496ce03afb8c8dbaac40235 Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:11 2022 -0400 dt-bindings: pinctrl: qcom,sm8450-lpass-lpi: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently and drop redundant quotes. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-33-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sm8450-lpass-lpi-pinctrl.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 2740420374119100b0304e41b1b509528fea27df Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:10 2022 -0400 dt-bindings: pinctrl: qcom,sm8250-lpass-lpi: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), drop redundant minItems, use double quotes consistently and drop redundant quotes. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-32-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sm8250-lpass-lpi-pinctrl.yaml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit e1c3624793397bb97b8bedc67de2a438767337db Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:09 2022 -0400 dt-bindings: pinctrl: qcom,sc8280xp-lpass-lpi: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently and drop redundant quotes. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-31-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sc8280xp-lpass-lpi-pinctrl.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit aad11c7938e49282ae34cbf39692abd207800fce Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:08 2022 -0400 dt-bindings: pinctrl: qcom,sc7280-lpass-lpi: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently and drop redundant quotes. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-30-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 7ddfbb41820907b6d1d3b52ee506353c4f2d208f Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:07 2022 -0400 dt-bindings: pinctrl: qcom,sm8450-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently, drop redundant quotes and rename file to match compatible (to match coding convention). Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-29-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../{qcom,sm8450-pinctrl.yaml => qcom,sm8450-tlmm.yaml} | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 16dc56ebb069c5e8c31a0aee7a8a1a36d21eeee8 Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:06 2022 -0400 dt-bindings: pinctrl: qcom,sm8350-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently, drop redundant quotes and rename file to match compatible (to match coding convention). Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-28-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../{qcom,sm8350-pinctrl.yaml => qcom,sm8350-tlmm.yaml} | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 4a0c5fb38e6f0dc1197c6258143fe5e5401d33ca Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:05 2022 -0400 dt-bindings: pinctrl: qcom,sm8250: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), drop redundant minItems, use double quotes consistently and drop redundant quotes. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-27-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sm8250-pinctrl.yaml | 36 ++++++++++------------ 1 file changed, 17 insertions(+), 19 deletions(-) commit fb45ee0a77474b289be8e32750dfa48f1d563a2f Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:04 2022 -0400 dt-bindings: pinctrl: qcom,sm6375-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently and drop redundant quotes. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-26-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sm6375-tlmm.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit cf0a3d3106087689b0722490f152c1a92cbbecb1 Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:03 2022 -0400 dt-bindings: pinctrl: qcom,sm6350-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently, drop redundant quotes and rename file to match compatible (to match coding convention). Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-25-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../{qcom,sm6350-pinctrl.yaml => qcom,sm6350-tlmm.yaml} | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit f8c76af267faf6ba890055f49ae686403f80ba25 Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:02 2022 -0400 dt-bindings: pinctrl: qcom,sm6125-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), drop redundant minItems, use double quotes consistently, drop redundant quotes and rename file to match compatible (to match coding convention). Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-24-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski ...com,sm6125-pinctrl.yaml => qcom,sm6125-tlmm.yaml} | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit a095c7e0f0abc052399064ffa5b84d9ac09d68b9 Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:01 2022 -0400 dt-bindings: pinctrl: qcom,sm6115-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently, drop redundant quotes and rename file to match compatible (to match coding convention). Acked-by: Rob Herring Reviewed-by: Iskren Chernev Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-23-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../{qcom,sm6115-pinctrl.yaml => qcom,sm6115-tlmm.yaml} | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 7703f13a83f8c45d571baa8907baf42d84d0643d Author: Krzysztof Kozlowski Date: Mon Oct 17 19:00:00 2022 -0400 dt-bindings: pinctrl: qcom,sc8280xp-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently, drop redundant quotes and rename file to match compatible (to match coding convention). Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-22-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../{qcom,sc8280xp-pinctrl.yaml => qcom,sc8280xp-tlmm.yaml} | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit e1a31f9897abea87011338a07d66b3bc7af9bf7a Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:59 2022 -0400 dt-bindings: pinctrl: qcom,sc8180x-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently, drop redundant quotes and rename file to match compatible (to match coding convention). Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-21-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski ...qcom,sc8180x-pinctrl.yaml => qcom,sc8180x-tlmm.yaml} | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 222ca103b87737eebf9b1a124b3391a8d3747ba8 Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:58 2022 -0400 dt-bindings: pinctrl: qcom,sdx65-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently, drop redundant quotes and rename file to match compatible (to match coding convention). Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-20-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../{qcom,sdx65-pinctrl.yaml => qcom,sdx65-tlmm.yaml} | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit a869153b2440dc0cce7dc59ffbfe755624221e1a Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:57 2022 -0400 dt-bindings: pinctrl: qcom,qcm2290-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently, drop redundant quotes and rename file to match compatible (to match coding convention). Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-19-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../{qcom,qcm2290-pinctrl.yaml => qcom,qcm2290-tlmm.yaml} | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 7612c2f17f9ea97f737042aea470eb34677003c4 Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:56 2022 -0400 dt-bindings: pinctrl: qcom,msm8909-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently and drop redundant quotes. Acked-by: Rob Herring Acked-by: Stephan Gerhold Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-18-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 73966aa6adc11dac733088b9ff40935cecaed857 Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:55 2022 -0400 dt-bindings: pinctrl: qcom,mdm9607-tlmm: minor style cleanups Drop "binding" from description (and align it with other Qualcomm pinctrl bindings), use double quotes consistently, drop redundant quotes and rename file to match compatible (to match coding convention). Acked-by: Stephan Gerhold Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-17-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski ...qcom,mdm9607-pinctrl.yaml => qcom,mdm9607-tlmm.yaml} | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit ca1941f8ed433f4418c811b0d33dcd1b71e7fbdf Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:54 2022 -0400 dt-bindings: pinctrl: qcom,sm8450: drop checks used in common TLMM The common Qualcomm TLMM pin controller schema already brings requirement of function for GPIO pins. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-16-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sm8450-pinctrl.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit e10be82893354ec5e35ee40d2cf7a68c8f423023 Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:53 2022 -0400 dt-bindings: pinctrl: qcom,sm8350: drop checks used in common TLMM The common Qualcomm TLMM pin controller schema already brings requirement of function for GPIO pins. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-15-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sm8350-pinctrl.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit c915a9ef30068bee41411cf7fdfb98df213ec18f Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:52 2022 -0400 dt-bindings: pinctrl: qcom,sm8350: drop ref to pinctrl.yaml The binding references common Qualcomm TLMM pin controller schema, which references pinctrl.yaml. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-14-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,sm8350-pinctrl.yaml | 1 - 1 file changed, 1 deletion(-) commit b8d64ea6520cf835940958004f1c7e30af733b29 Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:51 2022 -0400 dt-bindings: pinctrl: qcom,sm8250: use common TLMM schema Reference common Qualcomm TLMM pin controller schema, to bring common properties, other pinctrl schemas and additional checks, like function required only for GPIOs. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-13-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sm8250-pinctrl.yaml | 34 ++++------------------ 1 file changed, 6 insertions(+), 28 deletions(-) commit b71b285a0fe760f550bc81f070acaecef0556277 Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:50 2022 -0400 dt-bindings: pinctrl: qcom,sm6375-tlmm: drop checks used in common TLMM The common Qualcomm TLMM pin controller schema already brings requirement of function for GPIO pins. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-12-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sm6375-tlmm.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 8870dce580cbc6d813de139d3f13ea332a71f30f Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:49 2022 -0400 dt-bindings: pinctrl: qcom,sm6375-tlmm: drop ref to pinctrl.yaml The binding references common Qualcomm TLMM pin controller schema, which references pinctrl.yaml. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-11-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,sm6375-tlmm.yaml | 1 - 1 file changed, 1 deletion(-) commit 4d947acc060cf8b11a174b11e38dfaa51d00d9cd Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:48 2022 -0400 dt-bindings: pinctrl: qcom,sm6350: drop checks used in common TLMM The common Qualcomm TLMM pin controller schema already brings requirement of function for GPIO pins. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-10-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sm6350-pinctrl.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 661a3fb1f02edd0a1e36e85fc6546810623eb22b Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:47 2022 -0400 dt-bindings: pinctrl: qcom,sm6350: drop ref to pinctrl.yaml The binding references common Qualcomm TLMM pin controller schema, which references pinctrl.yaml. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-9-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,sm6350-pinctrl.yaml | 1 - 1 file changed, 1 deletion(-) commit 58d4fe9ca487bad0f3d2695f3052e9b0f4fe4dd0 Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:46 2022 -0400 dt-bindings: pinctrl: qcom,sm6125: drop ref to pinctrl.yaml The binding references common Qualcomm TLMM pin controller schema, which references pinctrl.yaml. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-8-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,sm6125-pinctrl.yaml | 1 - 1 file changed, 1 deletion(-) commit 423e46e66010849e9c817960b24493948885d623 Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:45 2022 -0400 dt-bindings: pinctrl: qcom,sm6125: drop checks used in common TLMM The common Qualcomm TLMM pin controller schema already brings requirement of function for GPIO pins. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-7-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sm6125-pinctrl.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 3c84d8c243b84dc49bba365cd5d2d7f63c8cf38c Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:44 2022 -0400 dt-bindings: pinctrl: qcom,sm6115: use common TLMM schema Reference common Qualcomm TLMM pin controller schema, to bring common properties, other pinctrl schemas and additional checks, like function required only for GPIOs. Reviewed-by: Iskren Chernev Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sm6115-pinctrl.yaml | 55 +++------------------- 1 file changed, 7 insertions(+), 48 deletions(-) commit 4412a0e5ed7aaa81d2c25010f06b4ebb84b95f69 Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:43 2022 -0400 dt-bindings: pinctrl: qcom,sc8280xp: drop checks used in common TLMM The common Qualcomm TLMM pin controller schema already brings requirement of function for GPIO pins. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sc8280xp-pinctrl.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 776b76e048cc2a4d21bb209d0c3e4eb63efbaac9 Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:42 2022 -0400 dt-bindings: pinctrl: qcom,sc8180x: drop checks used in common TLMM The common Qualcomm TLMM pin controller schema already brings requirement of function for GPIO pins. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sc8180x-pinctrl.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 251446a3b032a95512facd97e5f0d5588757f0de Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:41 2022 -0400 dt-bindings: pinctrl: qcom,sc8180x: drop ref to pinctrl.yaml The binding references common Qualcomm TLMM pin controller schema, which references pinctrl.yaml. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,sc8180x-pinctrl.yaml | 1 - 1 file changed, 1 deletion(-) commit e04f0761325a1d9abbf5b91ae7fd5decac489d5f Author: Krzysztof Kozlowski Date: Mon Oct 17 18:59:40 2022 -0400 dt-bindings: pinctrl: qcom,mdm9607: drop ref to pinctrl.yaml The binding references common Qualcomm TLMM pin controller schema, which references pinctrl.yaml. Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221017230012.47878-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-pinctrl.yaml | 1 - 1 file changed, 1 deletion(-) commit 6ec92173475be614cd20f997f9d24135b7ba01e4 Author: Krzysztof Kozlowski Date: Sat Sep 24 10:13:12 2022 +0200 dt-bindings: pinctrl: qcom,ipq6018: replace maintainer Emails to codeaurora.org bounce ("Recipient address rejected: undeliverable address: No such user here."). Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220924081312.15068-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4997c1cb7d4c3900aab6fe5dad521f59369f93d Author: Krzysztof Kozlowski Date: Sun Oct 16 13:22:12 2022 -0400 dt-bindings: pinctrl: qcom,sc7280: use common TLMM pin schema The common Qualcomm TLMM pin controller schema for pin mux and config already brings requirement of function for gpio pins and the definition of drive-strength. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221016172212.49105-18-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sc7280-pinctrl.yaml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit a92ffc90739fdbb2925bccdcc61f3aa8b62c15b2 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:22:11 2022 -0400 dt-bindings: pinctrl: qcom,sc7280: add bias-bus-hold and input-enable The SC7280 pinctrl driver supports bias-bus-hold and input-enable, and DTS already use it (sc7280-idp). Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016172212.49105-17-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 06311aa3ad1fd745d6248fc665f4c28880fedff1 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:22:10 2022 -0400 dt-bindings: pinctrl: qcom,sc7280: correct number of GPIOs SC7280 has 175 GPIOs (gpio0-174), so correct size of gpio-line-names and narrow the pattern for matching pin names. Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016172212.49105-16-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 23e14d262451e050c146eb94d5aff4b72538ed79 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:22:09 2022 -0400 dt-bindings: pinctrl: qcom,sm8250: add input-enable The SM8250 pinctrl driver supports input-enable and DTS already use it (sm8250-sony-xperia-edo-pdx203). Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016172212.49105-15-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml | 1 + 1 file changed, 1 insertion(+) commit a327e870af48c7f0bde57263c6a0ec65b0192217 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:22:08 2022 -0400 dt-bindings: pinctrl: qcom,sm8250: fix matching pin config The TLMM pin controller follows generic pin-controller bindings, so should have subnodes with '-state' and '-pins'. Otherwise the subnodes (level one and two) are not properly matched. This method also unifies the bindings with other Qualcomm TLMM and LPASS pinctrl bindings. The change causes indentation decrement, so the diff-hunk looks big, but there are no functional changes in the subnode "properties" section. The only difference there is removal of blank lines between common GPIO pinconf properties. Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016172212.49105-14-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sm8250-pinctrl.yaml | 117 +++++++++++---------- 1 file changed, 62 insertions(+), 55 deletions(-) commit fd69e8befa1cbf29435b0666320d5f8848e8b333 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:22:07 2022 -0400 dt-bindings: pinctrl: qcom,sm8250: use common TLMM pin schema The common Qualcomm TLMM pin controller schema for pin mux and config already brings requirement of function for gpio pins and the definition of drive-strength. Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016172212.49105-13-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sm8250-pinctrl.yaml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit a094b8d8790df774354c36c60017151c3a112e43 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:22:06 2022 -0400 dt-bindings: pinctrl: qcom,sm8250: add gpio-reserved-ranges and gpio-line-names Document common GPIO properties (gpio-reserved-ranges and gpio-line-names), already used on qrb5165-rb5 board. Acked-by: Rob Herring Reviewed-by: Konrad Dybcio Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016172212.49105-12-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit dee8744524096514109a9680a9c45a4259dae2a4 Author: Colin Ian King Date: Tue Oct 18 16:23:10 2022 +0100 jfs: remove redundant assignments to ipaimap and ipaimap2 The pointers ipaimap and ipaimap2 are re-assigned with values a second time with the same values when they were initialized. The re-assignments are redundant and can be removed. Cleans up two clang scan build warnings: fs/jfs/jfs_umount.c:42:16: warning: Value stored to 'ipaimap' during its initialization is never read [deadcode.DeadStores] fs/jfs/jfs_umount.c:43:16: warning: Value stored to 'ipaimap2' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Signed-off-by: Dave Kleikamp fs/jfs/jfs_umount.c | 2 -- 1 file changed, 2 deletions(-) commit fad9489abf932ff01ca2b9a9bf41a11311bdc8d5 Author: Hai Pham Date: Wed Oct 12 15:51:46 2022 +0200 dt-bindings: memory: renesas,rpc-if: Document R-Car V4H support Document support for the SPI Multi I/O Bus Controller (RPC-IF) in the R-Car V4H SoC. Signed-off-by: Hai Pham Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/c268cb4497cbe79773bb6568f36c37adc6fb5bbe.1665582645.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/memory-controllers/renesas,rpc-if.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 6a1cb5b7f7f15816e5ec4454adc43633ff299614 Author: Rob Herring Date: Tue Oct 11 11:29:18 2022 -0500 dt-bindings: clock: Convert pwm-clock to DT schema Convert the pwm-clock binding to DT schema format. A straight-forward conversion. Reviewed-by: Stephen Boyd Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221011162919.3025038-1-robh@kernel.org Signed-off-by: Rob Herring .../devicetree/bindings/clock/pwm-clock.txt | 26 ------------- .../devicetree/bindings/clock/pwm-clock.yaml | 45 ++++++++++++++++++++++ 2 files changed, 45 insertions(+), 26 deletions(-) commit 63deeba64f4cc59d6fc7ae4094ffd208561992e8 Author: Rob Herring Date: Wed Oct 5 16:26:31 2022 -0500 dt-bindings: misc: Convert IDT 89HPESx to DT schema Convert the IDT 89HPESx device binding to DT schema format. "onsemi,24c64" was not a documented compatible string, so update the example to "atmel,24c64". It's not clear what's in use here as no upstream dts files have the eeprom child node. Acked-by: Serge Semin Link: https://lore.kernel.org/r/20221005212631.122145-1-robh@kernel.org Signed-off-by: Rob Herring .../devicetree/bindings/misc/idt,89hpesx.yaml | 72 ++++++++++++++++++++++ .../devicetree/bindings/misc/idt_89hpesx.txt | 44 ------------- 2 files changed, 72 insertions(+), 44 deletions(-) commit 3eecdba4c01c8fcc3de69278a1da6e596280c582 Author: Matt Ranostay Date: Thu Oct 13 12:45:59 2022 -0700 dt-bindings: ufs: cdns,ufshc: add missing dma-coherent field Add missing dma-coherent property to schema which avoids the following warnings ufs-wrapper@4e80000: ufs@4e84000: Unevaluated properties are not allowed ('dma-coherent' was unexpected) Signed-off-by: Matt Ranostay Link: https://lore.kernel.org/r/20221013194559.128643-1-mranostay@ti.com Signed-off-by: Rob Herring Documentation/devicetree/bindings/ufs/cdns,ufshc.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 5b4248bfee04ba577e0d8ca8ddd30f1cb03ce5e5 Author: Krzysztof Kozlowski Date: Tue Oct 4 14:09:07 2022 +0200 dt-bindings: display: panel: use spi-peripheral-props.yaml For devices connectable by SPI bus (e.g. already using "spi-max-frequency" property), reference the "spi-peripheral-props.yaml" schema to allow using all SPI device properties, even these which device bindings author did not tried yet. Change "additionalProperties" to "unevaluatedProperties", so the actual other properties from "spi-peripheral-props.yaml" can be used. This has additional impact of allowing also other properties from panel-common.yaml to be used. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221004120907.72767-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/display/panel/ilitek,ili9163.yaml | 3 ++- Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml | 1 + Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml | 3 ++- .../devicetree/bindings/display/panel/samsung,lms380kf01.yaml | 5 ++--- .../devicetree/bindings/display/panel/samsung,lms397kf04.yaml | 3 ++- Documentation/devicetree/bindings/display/panel/samsung,s6d27a1.yaml | 4 ++-- Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml | 1 + 7 files changed, 12 insertions(+), 8 deletions(-) commit ce3a0a29fb9f36d1cd221fffa64a3c405308868f Author: Andy Shevchenko Date: Sat Oct 8 22:33:53 2022 +0300 gpio: merrifield: Use str_enable_disable() helper Use str_enable_disable() helper instead of open coding the same. Signed-off-by: Andy Shevchenko drivers/gpio/gpio-merrifield.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit baf34f3bbe6de7ac1efb4e31342403e9cca8888d Author: Stephen Kitt Date: Wed Oct 12 18:33:00 2022 +0200 HID: i2c: use simple i2c probe All these drivers have an i2c probe function which doesn't use the "struct i2c_device_id *id" parameter, so they can trivially be converted to the "probe_new" style of probe with a single argument. This is part of an ongoing transition to single-argument i2c probe functions. Old-style probe functions involve a call to i2c_match_id: in drivers/i2c/i2c-core-base.c, /* * When there are no more users of probe(), * rename probe_new to probe. */ if (driver->probe_new) status = driver->probe_new(client); else if (driver->probe) status = driver->probe(client, i2c_match_id(driver->id_table, client)); else status = -EINVAL; Drivers which don't need the second parameter can be declared using probe_new instead, avoiding the call to i2c_match_id. Drivers which do can still be converted to probe_new-style, calling i2c_match_id themselves (as is done currently for of_match_id). This change was done using the following Coccinelle script, and fixed up for whitespace changes: @ rule1 @ identifier fn; identifier client, id; @@ - static int fn(struct i2c_client *client, const struct i2c_device_id *id) + static int fn(struct i2c_client *client) { ...when != id } @ rule2 depends on rule1 @ identifier rule1.fn; identifier driver; @@ struct i2c_driver driver = { - .probe + .probe_new = ( fn | - &fn + fn ) , }; Signed-off-by: Stephen Kitt Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid-of-elan.c | 5 ++--- drivers/hid/i2c-hid/i2c-hid-of-goodix.c | 5 ++--- drivers/hid/i2c-hid/i2c-hid-of.c | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) commit b389286d0234e1edbaf62ed8bc0892a568c33662 Author: Jocelyn Falempe Date: Thu Oct 13 15:28:10 2022 +0200 drm/mgag200: Fix PLL setup for G200_SE_A rev >=4 For G200_SE_A, PLL M setting is wrong, which leads to blank screen, or "signal out of range" on VGA display. previous code had "m |= 0x80" which was changed to m |= ((pixpllcn & BIT(8)) >> 1); Tested on G200_SE_A rev 42 This line of code was moved to another file with commit 877507bb954e ("drm/mgag200: Provide per-device callbacks for PIXPLLC") but can be easily backported before this commit. v2: * put BIT(7) First to respect MSB-to-LSB (Thomas) * Add a comment to explain that this bit must be set (Thomas) Fixes: 2dd040946ecf ("drm/mgag200: Store values (not bits) in struct mgag200_pll_values") Cc: stable@vger.kernel.org Signed-off-by: Jocelyn Falempe Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221013132810.521945-1-jfalempe@redhat.com drivers/gpu/drm/mgag200/mgag200_g200se.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 53910ef7ba04fbf1ea74037fa997d3aa1ae3e0bd Author: Zhen Lei Date: Fri Sep 30 09:54:46 2022 +0800 livepatch: Move the result-invariant calculation out of the loop The calculation results of the variables 'func_addr' and 'func_size' are not affected by the for loop and do not change due to the changes of entries[i]. The performance can be improved by moving it outside the loop. No functional change. Signed-off-by: Zhen Lei Reviewed-by: Petr Mladek Signed-off-by: Jiri Kosina kernel/livepatch/transition.c | 54 +++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 1ea66d71b17608b49ddb907f6155bc47c6e33506 Author: Gaosheng Cui Date: Fri Sep 9 14:50:55 2022 +0800 jfs: remove unused declarations for jfs extRealloc(), xtRelocate(), xtDelete() and extFill() have been removed since commit e471e5942c00 ("fs/jfs: Remove dead code"), so remove them. Signed-off-by: Gaosheng Cui Signed-off-by: Dave Kleikamp fs/jfs/jfs_extent.h | 2 -- fs/jfs/jfs_xtree.h | 4 ---- 2 files changed, 6 deletions(-) commit b0a35efa0ebc50032ab81d60ed5a12de4324c5e2 Author: Jiangshan Yi Date: Fri Sep 2 16:53:38 2022 +0800 fs/jfs/jfs_xattr.h: Fix spelling typo in comment Fix spelling typo in comment. Reported-by: k2ci Signed-off-by: Jiangshan Yi Signed-off-by: Dave Kleikamp fs/jfs/jfs_xattr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ef3405e82d25f2752fabe3c5443c3e703739172 Author: Palmer Dabbelt Date: Thu Oct 13 14:46:38 2022 -0700 MAINTAINERS: git://github -> https://github.com for kleikamp Github deprecated the git:// links about a year ago, so let's move to the https:// URLs instead. Reported-by: Conor Dooley Link: https://github.blog/2021-09-01-improving-git-protocol-security-github/ Signed-off-by: Palmer Dabbelt Also changed status from Maintained to Odd Fixes Signed-off-by: Dave Kleikamp MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73c6da327ff17a07a9260b0ff1f36e13665ac63d Author: Jiangshan Yi Date: Thu Jul 14 10:56:56 2022 +0800 fs/jfs: replace ternary operator with min_t() Fix the following coccicheck warning: fs/jfs/super.c:748: WARNING opportunity for min(). fs/jfs/super.c:788: WARNING opportunity for min(). min_t() macro is defined in include/linux/minmax.h. It avoids multiple evaluations of the arguments when non-constant and performs strict type-checking. Signed-off-by: Jiangshan Yi Signed-off-by: Dave Kleikamp fs/jfs/super.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 898f706695682b9954f280d95e49fa86ffa55d08 Author: Dongliang Mu Date: Tue Oct 18 08:48:07 2022 -0500 fs: jfs: fix shift-out-of-bounds in dbAllocAG Syzbot found a crash : UBSAN: shift-out-of-bounds in dbAllocAG. The underlying bug is the missing check of bmp->db_agl2size. The field can be greater than 64 and trigger the shift-out-of-bounds. Fix this bug by adding a check of bmp->db_agl2size in dbMount since this field is used in many following functions. The upper bound for this field is L2MAXL2SIZE - L2MAXAG, thanks for the help of Dave Kleikamp. Note that, for maintenance, I reorganized error handling code of dbMount. Reported-by: syzbot+15342c1aa6a00fb7a438@syzkaller.appspotmail.com Signed-off-by: Dongliang Mu Signed-off-by: Dave Kleikamp fs/jfs/jfs_dmap.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 50c7e281f44726249b5ab7f148c02bbba751fea1 Author: Krzysztof Kozlowski Date: Tue Aug 30 21:03:44 2022 +0300 ARM: dts: aspeed: align SPI node name with dtschema The node names should be generic and DT schema expects certain pattern. Link: https://lore.kernel.org/r/20220830180344.15657-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/aspeed-bmc-facebook-cloudripper.dts | 2 +- arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts | 2 +- arch/arm/boot/dts/aspeed-bmc-facebook-fuji.dts | 2 +- arch/arm/boot/dts/aspeed-bmc-facebook-wedge400.dts | 2 +- arch/arm/boot/dts/ast2600-facebook-netbmc-common.dtsi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit b65c1735c73019549255e3a59ec80e9b9201c6e5 Author: Krzysztof Kozlowski Date: Tue Aug 9 08:57:29 2022 +0300 MAINTAINERS: ARM: marvell: include bindings Include top-level Marvell bindings in Marvell maintainer entries. Acked-by: Gregory CLEMENT Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220809055729.19242-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit 21f6546e8bf68a847601e2710378e2224bf49704 Author: Padmanabhan Rajanbabu Date: Thu Oct 13 16:10:22 2022 +0530 arm64: dts: fsd: fix drive strength values as per FSD HW UM Drive strength values used for HSI2C, SPI and UART are not reflecting the default values recommended by FSD HW UM. Fixes: 684dac402f21 ("arm64: dts: fsd: Add initial pinctrl support") Signed-off-by: Padmanabhan Rajanbabu Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20221013104024.50179-3-p.rajanbabu@samsung.com Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 574d6c59daefb51729b0640465f007f6c9600358 Author: Padmanabhan Rajanbabu Date: Thu Oct 13 16:10:21 2022 +0530 arm64: dts: fsd: fix drive strength macros as per FSD HW UM Drive strength macros defined for FSD platform is not reflecting actual names and values as per HW UM. FSD SoC pinctrl has following four levels of drive-strength and their corresponding values: Level-1 <-> 0 Level-2 <-> 1 Level-4 <-> 2 Level-6 <-> 3 The commit 684dac402f21 ("arm64: dts: fsd: Add initial pinctrl support") used drive strength macros defined for Exynos4 SoC family. For some IPs the macros values of Exynos4 matched and worked well, but Exynos4 SoC family drive-strength (names and values) is not exactly matching with FSD SoC. Fix the drive strength macros to reflect actual names and values given in FSD HW UM. Fixes: 684dac402f21 ("arm64: dts: fsd: Add initial pinctrl support") Signed-off-by: Padmanabhan Rajanbabu Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20221013104024.50179-2-p.rajanbabu@samsung.com Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 8 ++++---- arch/arm64/boot/dts/tesla/fsd-pinctrl.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) commit 66eb93e71a7a6695b7c5eb682e3ca1c980cf9d58 Author: Anshuman Gupta Date: Fri Oct 14 17:02:58 2022 +0530 drm/i915/dgfx: Keep PCI autosuspend control 'on' by default on all dGPU DGFX platforms has lmem and cpu can access the lmem objects via mmap and i915 internal i915_gem_object_pin_map() for i915 own usages. Both of these methods has pre-requisite requirement to keep GFX PCI endpoint in D0 for a supported iomem transaction over PCI link. (Refer PCIe specs 5.3.1.4.1) Both DG1/DG2 have a known hardware bug that violates the PCIe specs and support the iomem read write transaction over PCIe bus despite endpoint is D3 state. Due to above H/W bug, we had never observed any issue with i915 runtime PM versus lmem access. But this issue becomes visible when PCIe gfx endpoint's upstream bridge enters to D3, at this point any lmem read/write access will be returned as unsupported request. But again this issue is not observed on every platform because it has been observed on few host machines DG1/DG2 endpoint's upstream bridge does not bind with pcieport driver. which really disables the PCIe power savings and leaves the bridge at D0 state. We need a unique interface to read/write from lmem with runtime PM wakeref protection something similar to intel_uncore_{read, write}, keep autosuspend control to 'on' on all discrete platforms, until we have a unique interface to read/write from lmem. This just change the default autosuspend setting of i915 on dGPU, user can still change it to 'auto'. v2: - Modified the commit message and subject with more information. - Changed the Fixes tag to LMEM support commit. [Joonas] - Changed !HAS_LMEM() Cond to !IS_DGFX(). [Rodrigo] Fixes: b908be543e44 ("drm/i915: support creating LMEM objects") Suggested-by: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221014113258.1284226-1-anshuman.gupta@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 66283a8f49c0cd9fd093d7e1c093825a0511baeb Author: ye xingchen Date: Tue Oct 11 02:48:31 2022 +0000 vsprintf: replace in_irq() with in_hardirq() Replace the obsolete and ambiguos macro in_irq() with new macro in_hardirq(). Signed-off-by: ye xingchen Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221011024831.322799-1-ye.xingchen@zte.com.cn lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a140a6a2d5ec0329ad05cd3532a91ad0ce58dceb Merge: 28743e25fa1c 9abf2313adc1 Author: Maxime Ripard Date: Tue Oct 18 15:00:03 2022 +0200 Merge drm/drm-next into drm-misc-next Let's kick-off this release cycle. Signed-off-by: Maxime Ripard commit 960f9df7c620ecb6030aff1d9a6c3d67598b8290 Author: Matt Ranostay Date: Fri Sep 30 17:52:08 2022 -0700 HID: mcp2221: add ADC/DAC support via iio subsystem Add support for 3x 10-bit ADC and 1x DAC channels registered via the iio subsystem. To prevent breakage and unexpected dependencies this support only is only built if CONFIG_IIO is enabled, and is only weakly referenced by 'imply IIO' within the respective Kconfig. Additionally the iio device only gets registered if at least one channel is enabled in the power-on configuration read from SRAM. Signed-off-by: Matt Ranostay Reviewed-by: Jonathan Cameron Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 1 + drivers/hid/hid-mcp2221.c | 258 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 258 insertions(+), 1 deletion(-) commit ea418b35103a98329cb019927cc3668c3759b9eb Author: Matt Ranostay Date: Fri Sep 30 17:52:07 2022 -0700 HID: mcp2221: change 'select GPIOLIB' to imply To avoid recursive dependencies on GPIOLIB when 'imply IIO' is requested with other drivers we should switch GPIOLIB to an imply. This isn't the most ideal solution but avoids modifiying the Kconfig for other drivers, and only requires a singular IS_REACHABLE(CONFIG_GPIOLIB) check. Signed-off-by: Matt Ranostay Reviewed-by: Jonathan Cameron Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 2 +- drivers/hid/hid-mcp2221.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit deb3b88bbb7a197152aee1eb0157283a6914d504 Author: Matt Ranostay Date: Fri Sep 30 17:52:06 2022 -0700 HID: mcp2221: switch i2c registration to devm functions Switch from i2c_add_adapter() to resource managed devm_i2c_add_adapter() for matching rest of driver initialization, and more concise code. Signed-off-by: Matt Ranostay Reviewed-by: Jonathan Cameron Signed-off-by: Jiri Kosina drivers/hid/hid-mcp2221.c | 50 +++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 25 deletions(-) commit 542f25a94471570e2594be5b422b9ca572cf88a1 Author: Paulo Miguel Almeida Date: Mon Oct 17 20:51:22 2022 +1300 HID: hyperv: 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 structs synthhid_msg, synthhid_input_report, pipe_prt_msg and refactor the rest of the code accordingly. 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/210 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida Reviewed-by: Benjamin Tissoires Reviewed-by: Michael Kelley Signed-off-by: Jiri Kosina drivers/hid/hid-hyperv.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit a474dce8aa95752eed03436515e80425f630a9da Merge: 46234fbefe78 74a6a948c8fc Author: Mark Brown Date: Tue Oct 18 13:01:34 2022 +0100 ASoC: add devicetree support for WM8961 codec Merge series from Doug Brown : This series adds devicetree support for the Wolfson WM8961 codec. The first patch adds a schema, the second patch hooks it up in the code, and the third patch allows it to be selected in Kconfig. commit 46234fbefe788a83edd752e1c53f83f9c083b4f3 Merge: a2ddd19fe76b 62d0cee4e6f5 Author: Mark Brown Date: Tue Oct 18 13:01:27 2022 +0100 ASoC: Intel: avs: Fixes and new boards support Merge series from Cezary Rojewski : Two fixes are leading the way - one addresses the incorrect DMA mask assignment (typo) at driver probe. The other, fixes a potential buffer overflow when copying data received from firmware to kernel buffer. However unlikely, the fix should still be there. Then a range of patches providing the support for: - AML with rt286 (machine board) - KBL-R for rt298 (codec) - KBL-R with rt298 (machine board) - APL/KBL with da7219 (machine board) - Addition of all the missing SKL-based PCI ids to core.c Of the remaining changes, only one stands out - special case is provided for "unsupported" IPCs. The driver supports a range of platforms, however, on some generations given IPC may not be supported. Such call shall not be treated as "invalid" - those are two different scenarios. Everything else in the patchset is mostly a readability improvement: spelling fixes and log messages issues, code simplification. commit a2ddd19fe76b54fdf942fb1872c2b09afdb47731 Merge: c39e299a3415 4b48440ea390 Author: Mark Brown Date: Tue Oct 18 12:14:52 2022 +0100 Create a new sound card to access MICFIL based on rpmsg channel Merge series from Chancel Liu : At a previous time, we have successfully created a virtual sound card based on rpmsg. The sound card works under this mechanism Cortex-A core tells the Cortex-M core the format, rate, channel, .etc configuration of the PCM parameters and Cortex-M controls real hardware devices such as SAI and DMA. From the view of Linux side, the sound card is bound to a rpmsg channel through which it can access SAI. Here these patches are introduced to create a new virtual sound card to access MICFIL based on a new created rpmsg channel. It's easy to create a new rpmsg channel for MICFIL through rpmsg name service announcment. Also the other ASoC components bound to this rpmsg MICFIL sound card will be registered with these patches. If other sound cards using different hardware devices needs to be created over rpmsg in the future, these patches can be referred. commit c39e299a341510eaa4fec5f9cbcceeb5b876a41d Merge: 67ad4edf2b59 4b192aa09b3c Author: Mark Brown Date: Tue Oct 18 12:14:45 2022 +0100 ASoC: codecs: jz4725b: Various improvements and fixes Merge series from Siarhei Volkau : The patchset fixes: - Line In path stays powered off during capturing or bypass to mixer. - incorrectly represented dB values in alsamixer, et al. - incorrect represented Capture input selector in alsamixer in Playback tab. - wrong control selected as Capture Master The patchset improves: - Exposes output stage (post mixer) gain control and makes it new Master playback gain, DAC gain was the previous master. However, no Master mute now. - Exposes all mixer inputs (both Mics, LineIn and DAC) with their gain controls. - Exposes microphones widgets: single/differential input, boost. Known issues: - Bypass path enablement isn't applied immediately, for make things going bit clock needs to be triggered for a bit, e.g. by aplay dummy.wav It might be a hardware bug, since the bit clock isn't declared as required for codec operation. Tested on: - Ritmix RZX-27 (jz4725b). - Ritmix RZX-50 (jz4755). commit 67ad4edf2b59dbea75a85afe114516d06a6c8413 Merge: 974ada314fa2 98059ddfd1ad Author: Mark Brown Date: Tue Oct 18 12:14:39 2022 +0100 ASoC: Use DIV_ROUND_UP() instead of open-coding it Merge series from Shang XiaoJing : Use DIV_ROUND_UP() instead of open-coding it, which intents and makes it more clear what is going on for the casual reviewer. commit 974ada314fa265359c5fcfc630b7cb7818e7e19c Merge: 9f879fb1a7b6 999ce9967a2f Author: Mark Brown Date: Tue Oct 18 12:14:33 2022 +0100 ASoC: Intel: avs: Add support for max98927 codec Merge series from Amadeusz Sławiński : This series adds machine board for max98927 codec present on some Chromebook devices. commit f00909e2e6fe4ac6b2420e3863a0c533fe4f15e0 Author: Jiapeng Chong Date: Mon Oct 17 17:35:40 2022 +0800 net: ip6_gre: Remove the unused function ip6gre_tnl_addr_conflict() The function ip6gre_tnl_addr_conflict() is defined in the ip6_gre.c file, but not called elsewhere, so delete this unused function. net/ipv6/ip6_gre.c:887:20: warning: unused function 'ip6gre_tnl_addr_conflict'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2419 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20221017093540.26806-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Paolo Abeni net/ipv6/ip6_gre.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 7c3fc99819fd812b00f1881537599e66b989e392 Author: Valentin Korenblit Date: Tue Oct 18 11:30:00 2022 +0200 mtd: rawnand: cadence: support 64-bit slave dma interface 32-bit accesses on 64-bit sdma trigger sdma_err in intr_status register. Check dma capabilities before reading/writing from/to sdma interface. Link: https://lore.kernel.org/all/b7e5ebb4-0de8-4958-9bc4-fe06ec4c3635@www.fastmail.com/t/ Signed-off-by: Valentin Korenblit Reviewed-by: Arnd Bergmann Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221018093000.12072-1-vkorenblit@sequans.com drivers/mtd/nand/raw/cadence-nand-controller.c | 70 +++++++++++++++++++++----- 1 file changed, 58 insertions(+), 12 deletions(-) commit fb4ce97d9c5daafe100a83670c697b92c9d1bb45 Author: Alexandre Torgue Date: Mon Jun 20 14:30:18 2022 +0200 ARM: dts: stm32: add fake interrupt propoerty for ASync notif - TEMP/TO REMOVE Current internal optee version enables ASYNc notif and in suche case interrupt is mandatory in optee node. Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp131.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 6154c7a583483d7b69f53bea868efdc369edd563 Author: Mikhail Kshevetskiy Date: Mon Oct 10 13:51:10 2022 +0300 mtd: spinand: winbond: add Winbond W25N02KV flash support Add support of Winbond W25N02KV flash Signed-off-by: Mikhail Kshevetskiy Reviewed-by: Frieder Schrempf Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221010105110.446674-2-mikhail.kshevetskiy@iopsys.eu drivers/mtd/nand/spi/winbond.c | 75 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit dbf70fc204d2fbb0d8ad8f42038a60846502efda Author: Mikhail Kshevetskiy Date: Mon Oct 10 13:51:09 2022 +0300 mtd: spinand: winbond: fix flash identification Winbond uses 3 bytes to identify flash: vendor_id, dev_id_0, dev_id_1, but current driver uses only first 2 bytes of it for devices identification. As result Winbond W25N02KV flash (id_bytes: EF, AA, 22) is identified as W25N01GV (id_bytes: EF, AA, 21). Fix this by adding missed identification bytes. Signed-off-by: Mikhail Kshevetskiy Reviewed-by: Frieder Schrempf Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221010105110.446674-1-mikhail.kshevetskiy@iopsys.eu drivers/mtd/nand/spi/winbond.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3fea699cb2d6c8c47289b16500590630f507d8fd Author: Christophe Leroy Date: Thu Oct 6 07:29:12 2022 +0200 mtd: rawnand: mpc5121: Replace NO_IRQ by 0 NO_IRQ is used to check the return of irq_of_parse_and_map(). On some architecture NO_IRQ is 0, on other architectures it is -1. irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ. So use 0 instead of using NO_IRQ. Signed-off-by: Christophe Leroy Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/4e3ca3e0077ea124ea210c312e6e620f0f9e8bca.1665034065.git.christophe.leroy@csgroup.eu drivers/mtd/nand/raw/mpc5121_nfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b923db2867cb5e18ac4a1d5d5b4eecf0b619538 Author: Dmitry Torokhov Date: Wed Sep 28 16:00:19 2022 -0700 mtd: rawnand: lpc32xx_slc: switch to using gpiod API This switches the driver from legacy gpio API to a newer gpiod API. Signed-off-by: Dmitry Torokhov Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220928230019.2140896-2-dmitry.torokhov@gmail.com drivers/mtd/nand/raw/lpc32xx_slc.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 782e32a990d9d7029a8400f09a4d02b1ba78cb77 Author: Dmitry Torokhov Date: Wed Sep 28 16:00:18 2022 -0700 mtd: rawnand: lpc32xx_mlc: switch to using gpiod API This switches the driver from legacy gpio API to a newer gpiod API. Signed-off-by: Dmitry Torokhov Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220928230019.2140896-1-dmitry.torokhov@gmail.com drivers/mtd/nand/raw/lpc32xx_mlc.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit d4353decd4fdec71b9f9d1ba8fa85b7e595e8924 Author: Lukas Bulwahn Date: Thu Sep 29 14:34:31 2022 +0200 MAINTAINERS: rectify entry for MESON NAND controller bindings Commit fbc00b5e746f ("dt-bindings: nand: meson: convert txt to yaml") converts amlogic,meson-nand.txt to yaml, but misses to adjust its reference in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file reference in MESON NAND CONTROLLER DRIVER FOR AMLOGIC SOCS. Signed-off-by: Lukas Bulwahn Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220929123431.23180-1-lukas.bulwahn@gmail.com MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78e2d5410a440bc232c2f5eedb6ab0403e9675b6 Author: Zhang Qilong Date: Thu Sep 22 23:06:54 2022 +0800 mtd: rawnand: gpmi: using pm_runtime_resume_and_get instead of pm_runtime_get_sync Using the newest pm_runtime_resume_and_get is more appropriate for simplifing code here. Signed-off-by: Zhang Qilong Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220922150654.117568-1-zhangqilong3@huawei.com drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 47c3697e25d5167a60d6a3253f2da47452ba0a97 Author: Johan Jonker Date: Sat Sep 10 00:01:10 2022 +0200 dt-bindings: mtd: rockchip: add rockchip,rk3128-nfc Add rockchip,rk3128-nfc compatible string. Signed-off-by: Johan Jonker Acked-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/f09665c1-9938-38c1-9a31-f196a3ef9cf0@gmail.com Documentation/devicetree/bindings/mtd/rockchip,nand-controller.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b4dd412d4a6231de100ae8ce2a9e1ed649f9e748 Merge: 9abf2313adc1 23a8ce16419a Author: Christian Brauner Date: Tue Oct 18 10:13:47 2022 +0200 Merge branch 'fs.ovl.setgid' into for-next * fs.ovl.setgid: ovl: remove privs in ovl_fallocate() ovl: remove privs in ovl_copyfile() attr: use consistent sgid stripping checks attr: add setattr_should_drop_sgid() fs: move should_remove_suid() attr: add in_group_or_capable() commit 23a8ce16419a3066829ad4a8b7032a75817af65b Author: Amir Goldstein Date: Mon Oct 17 17:06:39 2022 +0200 ovl: remove privs in ovl_fallocate() Underlying fs doesn't remove privs because fallocate is called with privileged mounter credentials. This fixes some failure in fstests generic/683..687. Fixes: aab8848cee5e ("ovl: add ovl_fallocate()") Acked-by: Miklos Szeredi Signed-off-by: Amir Goldstein Signed-off-by: Christian Brauner (Microsoft) fs/overlayfs/file.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit b306e90ffabdaa7e3b3350dbcd19b7663e71ab17 Author: Amir Goldstein Date: Mon Oct 17 17:06:38 2022 +0200 ovl: remove privs in ovl_copyfile() Underlying fs doesn't remove privs because copy_range/remap_range are called with privileged mounter credentials. This fixes some failures in fstest generic/673. Fixes: 8ede205541ff ("ovl: add reflink/copyfile/dedup support") Acked-by: Miklos Szeredi Signed-off-by: Amir Goldstein Signed-off-by: Christian Brauner (Microsoft) fs/overlayfs/file.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit ed5a7047d2011cb6b2bf84ceb6680124cc6a7d95 Author: Christian Brauner Date: Mon Oct 17 17:06:37 2022 +0200 attr: use consistent sgid stripping checks Currently setgid stripping in file_remove_privs()'s should_remove_suid() helper is inconsistent with other parts of the vfs. Specifically, it only raises ATTR_KILL_SGID if the inode is S_ISGID and S_IXGRP but not if the inode isn't in the caller's groups and the caller isn't privileged over the inode although we require this already in setattr_prepare() and setattr_copy() and so all filesystem implement this requirement implicitly because they have to use setattr_{prepare,copy}() anyway. But the inconsistency shows up in setgid stripping bugs for overlayfs in xfstests (e.g., generic/673, generic/683, generic/685, generic/686, generic/687). For example, we test whether suid and setgid stripping works correctly when performing various write-like operations as an unprivileged user (fallocate, reflink, write, etc.): echo "Test 1 - qa_user, non-exec file $verb" setup_testfile chmod a+rws $junk_file commit_and_check "$qa_user" "$verb" 64k 64k The test basically creates a file with 6666 permissions. While the file has the S_ISUID and S_ISGID bits set it does not have the S_IXGRP set. On a regular filesystem like xfs what will happen is: sys_fallocate() -> vfs_fallocate() -> xfs_file_fallocate() -> file_modified() -> __file_remove_privs() -> dentry_needs_remove_privs() -> should_remove_suid() -> __remove_privs() newattrs.ia_valid = ATTR_FORCE | kill; -> notify_change() -> setattr_copy() In should_remove_suid() we can see that ATTR_KILL_SUID is raised unconditionally because the file in the test has S_ISUID set. But we also see that ATTR_KILL_SGID won't be set because while the file is S_ISGID it is not S_IXGRP (see above) which is a condition for ATTR_KILL_SGID being raised. So by the time we call notify_change() we have attr->ia_valid set to ATTR_KILL_SUID | ATTR_FORCE. Now notify_change() sees that ATTR_KILL_SUID is set and does: ia_valid = attr->ia_valid |= ATTR_MODE attr->ia_mode = (inode->i_mode & ~S_ISUID); which means that when we call setattr_copy() later we will definitely update inode->i_mode. Note that attr->ia_mode still contains S_ISGID. Now we call into the filesystem's ->setattr() inode operation which will end up calling setattr_copy(). Since ATTR_MODE is set we will hit: if (ia_valid & ATTR_MODE) { umode_t mode = attr->ia_mode; vfsgid_t vfsgid = i_gid_into_vfsgid(mnt_userns, inode); if (!vfsgid_in_group_p(vfsgid) && !capable_wrt_inode_uidgid(mnt_userns, inode, CAP_FSETID)) mode &= ~S_ISGID; inode->i_mode = mode; } and since the caller in the test is neither capable nor in the group of the inode the S_ISGID bit is stripped. But assume the file isn't suid then ATTR_KILL_SUID won't be raised which has the consequence that neither the setgid nor the suid bits are stripped even though it should be stripped because the inode isn't in the caller's groups and the caller isn't privileged over the inode. If overlayfs is in the mix things become a bit more complicated and the bug shows up more clearly. When e.g., ovl_setattr() is hit from ovl_fallocate()'s call to file_remove_privs() then ATTR_KILL_SUID and ATTR_KILL_SGID might be raised but because the check in notify_change() is questioning the ATTR_KILL_SGID flag again by requiring S_IXGRP for it to be stripped the S_ISGID bit isn't removed even though it should be stripped: sys_fallocate() -> vfs_fallocate() -> ovl_fallocate() -> file_remove_privs() -> dentry_needs_remove_privs() -> should_remove_suid() -> __remove_privs() newattrs.ia_valid = ATTR_FORCE | kill; -> notify_change() -> ovl_setattr() // TAKE ON MOUNTER'S CREDS -> ovl_do_notify_change() -> notify_change() // GIVE UP MOUNTER'S CREDS // TAKE ON MOUNTER'S CREDS -> vfs_fallocate() -> xfs_file_fallocate() -> file_modified() -> __file_remove_privs() -> dentry_needs_remove_privs() -> should_remove_suid() -> __remove_privs() newattrs.ia_valid = attr_force | kill; -> notify_change() The fix for all of this is to make file_remove_privs()'s should_remove_suid() helper to perform the same checks as we already require in setattr_prepare() and setattr_copy() and have notify_change() not pointlessly requiring S_IXGRP again. It doesn't make any sense in the first place because the caller must calculate the flags via should_remove_suid() anyway which would raise ATTR_KILL_SGID. While we're at it we move should_remove_suid() from inode.c to attr.c where it belongs with the rest of the iattr helpers. Especially since it returns ATTR_KILL_S{G,U}ID flags. We also rename it to setattr_should_drop_suidgid() to better reflect that it indicates both setuid and setgid bit removal and also that it returns attr flags. Running xfstests with this doesn't report any regressions. We should really try and use consistent checks. Reviewed-by: Amir Goldstein Signed-off-by: Christian Brauner (Microsoft) Documentation/trace/ftrace.rst | 2 +- fs/attr.c | 33 +++++++++++++++++++-------------- fs/fuse/file.c | 2 +- fs/inode.c | 7 ++++--- fs/internal.h | 2 +- fs/ocfs2/file.c | 4 ++-- fs/open.c | 8 ++++---- include/linux/fs.h | 2 +- 8 files changed, 33 insertions(+), 27 deletions(-) commit 72ae017c5451860443a16fb2a8c243bff3e396b8 Author: Christian Brauner Date: Mon Oct 17 17:06:36 2022 +0200 attr: add setattr_should_drop_sgid() The current setgid stripping logic during write and ownership change operations is inconsistent and strewn over multiple places. In order to consolidate it and make more consistent we'll add a new helper setattr_should_drop_sgid(). The function retains the old behavior where we remove the S_ISGID bit unconditionally when S_IXGRP is set but also when it isn't set and the caller is neither in the group of the inode nor privileged over the inode. We will use this helper both in write operation permission removal such as file_remove_privs() as well as in ownership change operations. Reviewed-by: Amir Goldstein Signed-off-by: Christian Brauner (Microsoft) fs/attr.c | 28 ++++++++++++++++++++++++++++ fs/internal.h | 6 ++++++ 2 files changed, 34 insertions(+) commit e243e3f94c804ecca9a8241b5babe28f35258ef4 Author: Christian Brauner Date: Mon Oct 17 17:06:35 2022 +0200 fs: move should_remove_suid() Move the helper from inode.c to attr.c. This keeps the the core of the set{g,u}id stripping logic in one place when we add follow-up changes. It is the better place anyway, since should_remove_suid() returns ATTR_KILL_S{G,U}ID flags. Reviewed-by: Amir Goldstein Signed-off-by: Christian Brauner (Microsoft) fs/attr.c | 29 +++++++++++++++++++++++++++++ fs/inode.c | 29 ----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) commit 11c2a8700cdcabf9b639b7204a1e38e2a0b6798e Author: Christian Brauner Date: Mon Oct 17 17:06:34 2022 +0200 attr: add in_group_or_capable() In setattr_{copy,prepare}() we need to perform the same permission checks to determine whether we need to drop the setgid bit or not. Instead of open-coding it twice add a simple helper the encapsulates the logic. We will reuse this helpers to make dropping the setgid bit during write operations more consistent in a follow up patch. Reviewed-by: Amir Goldstein Signed-off-by: Christian Brauner (Microsoft) fs/attr.c | 10 +++++----- fs/inode.c | 28 ++++++++++++++++++++++++---- fs/internal.h | 2 ++ 3 files changed, 31 insertions(+), 9 deletions(-) commit 7f767e6817f5523c4d2442cd35bf9d7ca3548f56 Author: FUKAUMI Naoki Date: Tue Oct 18 07:22:42 2022 +0000 arm64: dts: rockchip: enable tsadc for ROCK 4C+ add and enable Temperature Sensor ADC for Radxa ROCK 4C+ Signed-off-by: FUKAUMI Naoki Link: https://lore.kernel.org/r/20221018072242.2348995-1-naoki@radxa.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 4cb7c6f1ef9642cd2c8580b495fde47ffbaddef7 Author: Niklas Cassel Date: Fri Oct 7 15:23:38 2022 +0200 ata: make use of ata_port_is_frozen() helper Clean up the code by making use of the newly introduced ata_port_is_frozen() helper function. Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal drivers/ata/libahci.c | 6 +++--- drivers/ata/libata-acpi.c | 4 ++-- drivers/ata/libata-core.c | 4 ++-- drivers/ata/libata-eh.c | 21 ++++++++++----------- drivers/ata/libata-sata.c | 2 +- drivers/ata/libata-scsi.c | 2 +- drivers/ata/sata_nv.c | 2 +- drivers/ata/sata_promise.c | 2 +- drivers/ata/sata_sx4.c | 2 +- 9 files changed, 22 insertions(+), 23 deletions(-) commit fddb1a6424787d8089a9032bd5d21c428670f854 Author: Niklas Cassel Date: Fri Oct 7 15:23:37 2022 +0200 ata: add ata_port_is_frozen() helper At the request of the libata maintainer, introduce a ata_port_is_frozen() helper function. Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal include/linux/libata.h | 5 +++++ 1 file changed, 5 insertions(+) commit 5f9952548d91263eaf70a2ca71f8897c2a638cf1 Author: Dan Callaghan Date: Tue Oct 18 15:06:23 2022 +1100 platform/chrome: add a driver for HPS This patch introduces a driver for the ChromeOS human presence sensor (aka. HPS). The driver supports a sensor connected to the I2C bus and identified as "GOOG0020" in the ACPI tables. When loaded, the driver exports the sensor to userspace through a character device. This device only supports power management, i.e., communication with the sensor must be done through regular I2C transmissions from userspace. Power management is implemented by enabling the respective power GPIO while at least one userspace process holds an open fd on the character device. By default, the device is powered down if there are no active clients. Note that the driver makes no effort to preserve the state of the sensor between power down and power up events. Userspace is responsible for reinitializing any needed state once power has been restored. The device firmware, I2C protocol and other documentation is available at https://chromium.googlesource.com/chromiumos/platform/hps-firmware. Co-developed-by: Sami Kyöstilä Signed-off-by: Sami Kyöstilä Signed-off-by: Dan Callaghan Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221018040623.2173441-1-dcallagh@chromium.org MAINTAINERS | 6 ++ drivers/platform/chrome/Kconfig | 10 ++ drivers/platform/chrome/Makefile | 1 + drivers/platform/chrome/cros_hps_i2c.c | 162 +++++++++++++++++++++++++++++++++ 4 files changed, 179 insertions(+) commit 868a8824838f1f0d781e838fa36dbb2de6bc7fdd Author: Jason Yan Date: Wed Sep 28 15:01:30 2022 +0800 scsi: libsas: Use sas_phy_match_port_addr() instead of open coding it The SAS address comparison of asd_sas_port and expander phy is open coded. Replace it with sas_phy_match_port_addr(). Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20220928070130.3657183-9-yanaijie@huawei.com Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_expander.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bfa22905f3865469479f028770a352126ad0d2e8 Author: Jason Yan Date: Wed Sep 28 15:01:29 2022 +0800 scsi: libsas: Use sas_phy_addr_match() instead of open coding it The SAS address comparison of expander phys is open coded. Replace it with sas_phy_addr_match(). Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20220928070130.3657183-8-yanaijie@huawei.com Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_expander.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ad74d1dadbe9fc5ff7f80796f7cac0f126a5ea74 Author: Jason Yan Date: Wed Sep 28 15:01:28 2022 +0800 scsi: libsas: Use sas_phy_match_dev_addr() instead of open coding it The SAS address comparison of domain device and expander phy is open coded. Replace it with sas_phy_match_dev_addr(). Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20220928070130.3657183-7-yanaijie@huawei.com Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_expander.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit f0ed7bd5d9137b8e736e44ce353620ec19ee6242 Author: Jason Yan Date: Wed Sep 28 15:01:27 2022 +0800 scsi: hisi_sas: Use sas_find_attathed_phy_id() instead of open coding it The attached phy finding is open coded. Replace it with sas_find_attached_phy_id(). To keep things consistent, the return value of hisi_sas_dev_found() is also changed to -ENODEV after calling sas_find_attathed_phy_id() failed. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20220928070130.3657183-6-yanaijie@huawei.com Reviewed-by: Jack Wang Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Acked-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 178c39d94ac2cf9524ff797d90dcdf96b110fb27 Author: Jason Yan Date: Wed Sep 28 15:01:26 2022 +0800 scsi: mvsas: Use sas_find_attached_phy_id() instead of open coding it The attached phy finding is open coded. Replace it with sas_find_attached_phy_id(). To keep things consistent, the return value of mvs_dev_found_notify() is also changed to -ENODEV after calling sas_find_attathed_phy_id() failed. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20220928070130.3657183-5-yanaijie@huawei.com Reviewed-by: Jack Wang Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/mvsas/mv_sas.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit ec64858657a8c393e2ae956d37c23bf94aee8200 Author: Jason Yan Date: Wed Sep 28 15:01:25 2022 +0800 scsi: pm8001: Use sas_find_attached_phy_id() instead of open coding it The attached phy id finding is open coded. Replace it with sas_find_attached_phy_id(). To keep things consistent, the return value of pm8001_dev_found_notify() is also changed to -ENODEV after calling sas_find_attathed_phy_id() failed. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20220928070130.3657183-4-yanaijie@huawei.com Reviewed-by: Jack Wang Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_sas.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 2d08f329a4f2eace6b041d60132f441fc8e0b616 Author: Jason Yan Date: Wed Sep 28 15:01:24 2022 +0800 scsi: libsas: Introduce sas_find_attached_phy_id() helper LLDDs are all implementing their own attached phy ID finding code. Factor it out to libsas. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20220928070130.3657183-3-yanaijie@huawei.com Reviewed-by: Jack Wang Reviewed-by: Damien Le Moal Reviewed-by: John Garry Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_expander.c | 16 ++++++++++++++++ include/scsi/libsas.h | 2 ++ 2 files changed, 18 insertions(+) commit 773792e4e704ca1c47e3d9bc6ed5be2a00a22ad5 Author: Jason Yan Date: Wed Sep 28 15:01:23 2022 +0800 scsi: libsas: Introduce SAS address comparison helpers SAS address comparison is widely used in libsas. However they are all opencoded and to avoid the line spill over 80 columns, are mostly split into multi-lines. Introduce some helpers to prepare for some refactoring. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20220928070130.3657183-2-yanaijie@huawei.com Reviewed-by: Damien Le Moal Reviewed-by: John Garry Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_internal.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit f93ed747e2c7e6bfbf309291879b33b0d0231a7d Author: Bart Van Assche Date: Fri Oct 14 17:24:18 2022 -0700 scsi: core: Release SCSI devices synchronously All upstream scsi_device_put() calls happen from thread context. Hence simplify scsi_device_put() by always calling the release function synchronously. This commit prepares for constifying the SCSI host template by removing an assignment that clears the module pointer in the SCSI host template. scsi_device_dev_release_usercontext() was introduced in 2006 via commit 65110b216895 ("[SCSI] fix wrong context bugs in SCSI"). Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: John Garry Cc: Mike Christie Cc: Krzysztof Kozlowski Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221015002418.30955-9-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 2 ++ drivers/scsi/scsi_sysfs.c | 22 ++-------------------- include/scsi/scsi_device.h | 1 - 3 files changed, 4 insertions(+), 21 deletions(-) commit 195fae206ef20a29b09f281b6db8ea30fafaa908 Author: Bart Van Assche Date: Fri Oct 14 17:24:17 2022 -0700 scsi: core: Remove the put_device() call from scsi_device_get() scsi_device_get() may be called from atomic context, e.g. by shost_for_each_device(). A later commit will allow put_device() to sleep for SCSI devices. Hence remove the put_device() call from scsi_device_get(). According to Rusty Russell's "Module Refcount and Stuff mini-FAQ", calling module_put() from atomic context is allowed since considerable time. See also https://lkml.org/lkml/2002/11/18/330. Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Mike Christie Cc: Krzysztof Kozlowski Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221015002418.30955-8-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6d1aa3b0589bdd17a46ed74fbd2c2d0fc59038ff Author: Bart Van Assche Date: Fri Oct 14 17:24:16 2022 -0700 scsi: ufs: Simplify ufshcd_set_dev_pwr_mode() Simplify the code for incrementing the SCSI device reference count in ufshcd_set_dev_pwr_mode(). This commit removes one scsi_device_put() call that happens from atomic context. Reviewed-by: Adrian Hunter Cc: Avri Altman Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221015002418.30955-7-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit d460f624059266c2e7f0280bdd3ae806d4b75211 Author: Bart Van Assche Date: Fri Oct 14 17:24:15 2022 -0700 scsi: core: Rework scsi_single_lun_run() Use __starget_for_each_device() instead of open-coding starget_for_each_device(). Run the queues asynchronously instead of synchronously. This commit removes code that calls scsi_device_put() from atomic context. Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: John Garry Cc: Mike Christie Cc: Krzysztof Kozlowski Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221015002418.30955-6-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit 036abd6140078b4125f60e731f28e15de708f87d Author: Bart Van Assche Date: Fri Oct 14 17:24:14 2022 -0700 scsi: core: Introduce a new list for SCSI proc directory entries Instead of using scsi_host_template members to track the SCSI proc directory entries, track these entries in a list. This changes the time needed for looking up the proc dir pointer from O(1) into O(n). This is considered acceptable since the number of SCSI host adapter types per host is usually small (less than ten). This change has been tested by attaching two USB storage devices to a qemu host: $ grep -aH . /proc/scsi/usb-storage/* /proc/scsi/usb-storage/7: Host scsi7: usb-storage /proc/scsi/usb-storage/7: Vendor: QEMU /proc/scsi/usb-storage/7: Product: QEMU USB HARDDRIVE /proc/scsi/usb-storage/7:Serial Number: 1-0000:00:02.1:00.0-6 /proc/scsi/usb-storage/7: Protocol: Transparent SCSI /proc/scsi/usb-storage/7: Transport: Bulk /proc/scsi/usb-storage/7: Quirks: SANE_SENSE /proc/scsi/usb-storage/8: Host scsi8: usb-storage /proc/scsi/usb-storage/8: Vendor: QEMU /proc/scsi/usb-storage/8: Product: QEMU USB HARDDRIVE /proc/scsi/usb-storage/8:Serial Number: 1-0000:00:02.1:00.0-7 /proc/scsi/usb-storage/8: Protocol: Transparent SCSI /proc/scsi/usb-storage/8: Transport: Bulk /proc/scsi/usb-storage/8: Quirks: SANE_SENSE This commit prepares for constifying most SCSI host templates. Reviewed-by: John Garry Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Mike Christie Cc: Krzysztof Kozlowski Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221015002418.30955-5-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/scsi_priv.h | 4 +- drivers/scsi/scsi_proc.c | 121 +++++++++++++++++++++++++++++++++++++++-------- include/scsi/scsi_host.h | 12 ----- 3 files changed, 102 insertions(+), 35 deletions(-) commit ecca3f9b16366e601a6748bf31e9fe227812248f Author: Bart Van Assche Date: Fri Oct 14 17:24:13 2022 -0700 scsi: core: Fail host creation if creating the proc directory fails Users expect that the contents of /proc/scsi is in sync with the contents of /sys/class/scsi_host. Hence fail host creation if creating the proc directory fails. Suggested-by: John Garry Reviewed-by: John Garry Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Mike Christie Cc: Krzysztof Kozlowski Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221015002418.30955-4-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 3 ++- drivers/scsi/scsi_priv.h | 4 ++-- drivers/scsi/scsi_proc.c | 13 +++++++++---- 3 files changed, 13 insertions(+), 7 deletions(-) commit 77916da7e4a0975bd2b93e5214295e3318886cdb Author: Bart Van Assche Date: Fri Oct 14 17:24:12 2022 -0700 scsi: esas2r: Introduce scsi_template_proc_dir() Prepare for removing the 'proc_dir' and 'present' members from the SCSI host template. This commit does not change any functionality. Reviewed-by: John Garry Cc: Bradley Grove Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Mike Christie Cc: Krzysztof Kozlowski Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221015002418.30955-3-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/esas2r/esas2r_main.c | 17 +++++++++++------ drivers/scsi/scsi_proc.c | 11 +++++++++++ include/scsi/scsi_host.h | 6 ++++++ 3 files changed, 28 insertions(+), 6 deletions(-) commit b6da92356cd6106dd9e7e8e168e3b7df4fe37d5d Author: Bart Van Assche Date: Fri Oct 14 17:24:11 2022 -0700 scsi: esas2r: Initialize two host template members implicitly Prepare for removing the 'proc_dir' and 'present' members from the SCSI host template by implicitly initializing 'present' and 'emulated' in 'driver_template'. Reviewed-by: John Garry Cc: Bradley Grove Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Mike Christie Cc: Krzysztof Kozlowski Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20221015002418.30955-2-bvanassche@acm.org Signed-off-by: Martin K. Petersen drivers/scsi/esas2r/esas2r_main.c | 2 -- 1 file changed, 2 deletions(-) commit cf6c35d1bc89e0942c379f841e1d9095fc66d642 Author: Vladimir Lypak Date: Sun Oct 16 18:15:53 2022 +0200 arm64: dts: qcom: msm8953: add MDSS Add the MDSS, MDP and DSI nodes that are found on msm8953 SoC. Signed-off-by: Vladimir Lypak Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016161554.673006-4-luca@z3ntu.xyz arch/arm64/boot/dts/qcom/msm8953.dtsi | 208 ++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) commit c0b9575a36069f52f09fbe9b8f7a9db940cb952c Author: Vladimir Lypak Date: Sun Oct 16 18:15:52 2022 +0200 arm64: dts: qcom: msm8953: add APPS IOMMU Add the nodes describing the iommu and its context banks that are found on msm8953 SoCs. Signed-off-by: Vladimir Lypak Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016161554.673006-3-luca@z3ntu.xyz arch/arm64/boot/dts/qcom/msm8953.dtsi | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 4772c03002c3eb2fc6dd0f908af0d8371a622499 Author: Caleb Connolly Date: Sun Oct 16 18:29:43 2022 +0100 arm64: dts: qcom: sdm845-*: fix uart6 aliases Some devices have been using hsuart0 as an alias for the bluetooth UART, rename this to serial1 Signed-off-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016172944.1892206-4-kc@postmarketos.org arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 9833e23b6905d0ab342deb16a6c2312759ab5a0d Author: Dylan Van Assche Date: Sun Oct 16 18:29:42 2022 +0100 arm64: dts: qcom: sdm845-shift-axolotl: fix Bluetooth Add serial1 alias, firmware name and use 4 pin UART pinmux. Signed-off-by: Dylan Van Assche Signed-off-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016172944.1892206-3-kc@postmarketos.org arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 691dfbf54214c9c42444f357fc3a8103a10ad738 Author: Caleb Connolly Date: Sun Oct 16 18:29:41 2022 +0100 arm64: dts: qcom: sdm845: commonize bluetooth UART pinmux The 4-pin configuration for UART6 is used for all or almost all SDM845 devices with built in Bluetooth. Move the pinmux configuration to sdm845.dtsi in preparation to be removed from individual devices in future patches. Suggested-by: Dmitry Baryshkov Signed-off-by: Caleb Connolly Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016172944.1892206-2-kc@postmarketos.org arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 37 ++-------------------- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 25 ++------------- .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 28 ++-------------- .../dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 27 ++-------------- arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 27 ++-------------- arch/arm64/boot/dts/qcom/sdm845.dtsi | 22 +++++++++++++ 6 files changed, 32 insertions(+), 134 deletions(-) commit 0cde1210f7b9f6f17f3af450bde598c0ad9d54cc Author: Luca Weiss Date: Sun Oct 16 11:00:31 2022 +0200 arm64: dts: qcom: sc7280: Fix cpufreq-epss compatible The bindings require a SoC-specific compatible to be used next to qcom,cpufreq-epss. Add it to make dtbs_check happy. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016090035.565350-2-luca@z3ntu.xyz arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed9ba9e9b7437416ed97b36fe06ecb6001f0b067 Author: Krzysztof Kozlowski Date: Thu Oct 13 17:06:11 2022 -0400 arm64: dts: qcom: msm8998: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013210612.95994-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi | 7 +- arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 16 ++--- arch/arm64/boot/dts/qcom/msm8998-mtp.dts | 4 +- .../boot/dts/qcom/msm8998-oneplus-cheeseburger.dts | 10 ++- .../boot/dts/qcom/msm8998-oneplus-common.dtsi | 14 ++-- .../boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 30 ++++----- arch/arm64/boot/dts/qcom/msm8998.dtsi | 76 +++++++++++----------- 7 files changed, 78 insertions(+), 79 deletions(-) commit 46546f28825cf3a5ef6873b9cf947cd85c8a7258 Author: Krzysztof Kozlowski Date: Thu Oct 13 17:06:10 2022 -0400 arm64: dts: qcom: msm8998-oneplus-cheeseburger: fix backlight pin function There is no "normal" function, so use "gpio" for backlight button pin configuration. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013210612.95994-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8998-oneplus-cheeseburger.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3d5e948d1b87e8531d842f4c98f56e0bb1a5c60 Author: Krzysztof Kozlowski Date: Thu Oct 13 17:06:09 2022 -0400 arm64: dts: qcom: msm8998: add gpio-ranges to TLMM Qualcomm pinctrl bindings and drivers expect gpio-ranges property. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013210612.95994-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8998.dtsi | 1 + 1 file changed, 1 insertion(+) commit 54a8d54b51839df625d376eb8684e51ceec08629 Author: Luca Weiss Date: Wed Oct 12 23:56:13 2022 +0200 arm64: dts: qcom: msm8996: remove bogus ufs_variant node This ufs_variant node seems to be a remnant from downstream devicetree. As it doesn't seem to be used by anything upstream, remove it from the dtsi. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221012215613.32054-1-luca@z3ntu.xyz arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ---- 1 file changed, 4 deletions(-) commit 048a765ac5712397cb58e374a7e1087c34875b5f Author: Krzysztof Kozlowski Date: Tue Oct 11 15:02:30 2022 -0400 arm64: dts: qcom: sdm630: 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. All nodes for GPIOs must also define the function property. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221011190231.76784-3-krzysztof.kozlowski@linaro.org .../arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts | 6 +- .../boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 18 +-- arch/arm64/boot/dts/qcom/sdm630.dtsi | 121 ++++++++++----------- .../dts/qcom/sdm636-sony-xperia-ganges-mermaid.dts | 2 +- .../arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 6 +- 5 files changed, 75 insertions(+), 78 deletions(-) commit 06783c3ae8899aa71abc795d3d6490a4afa9ed99 Author: Krzysztof Kozlowski Date: Tue Oct 11 15:02:29 2022 -0400 arm64: dts: qcom: sdm630: correct I2C8 pin functions The I2C8 pins are split into i2c8_a (GPIO30 and GPIO31) and i2c8_b (GPIO44 and GPIO52). Correct the name of function for I2C8 pins. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221011190231.76784-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 804ec4dad48c4fc7844c66b5febe9dbc6198f8b5 Author: Krzysztof Kozlowski Date: Tue Oct 11 15:02:28 2022 -0400 arm64: dts: qcom: sdm630: add UART pin functions Configure UART1 and UART2 pins to respective functions in default state, otherwise the pins might stay as GPIOs. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221011190231.76784-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 978bc4c578a6d7baffc5646b0f327da036b3051b Author: Dmitry Torokhov Date: Wed Sep 28 18:15:56 2022 -0700 arm64: dts: qcom: msm8916-samsung-a2015: fix polarity of "enable" line of NFC chip According to s3fwrn5 driver code the "enable" GPIO line is driven "high" when chip is not in use (mode is S3FWRN5_MODE_COLD), and is driven "low" when chip is in use. s3fwrn5_phy_power_ctrl(): ... gpio_set_value(phy->gpio_en, 1); ... if (mode != S3FWRN5_MODE_COLD) { msleep(S3FWRN5_EN_WAIT_TIME); gpio_set_value(phy->gpio_en, 0); msleep(S3FWRN5_EN_WAIT_TIME); } Therefore the line described by "en-gpios" property should be annotated as "active low". The wakeup gpio appears to have correct polarity (active high). Signed-off-by: Dmitry Torokhov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220929011557.4165216-2-dmitry.torokhov@gmail.com arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5aa332c5e7ca2469c9ff55cf294eddb33a2c8e4b Author: Krzysztof Kozlowski Date: Wed Sep 28 17:25:01 2022 +0200 dt-bindings: qcom: document preferred compatible naming Compatibles can come in two formats. Either "vendor,ip-soc" or "vendor,soc-ip". Qualcomm bindings were mixing both of usages, so add a DT schema file documenting preferred policy and enforcing it for all new compatibles, except few existing patterns. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Reviewed-by: Dmitry Baryshkov Reviewed-by: Bhupesh Sharma Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928152501.490840-1-krzysztof.kozlowski@linaro.org .../devicetree/bindings/arm/qcom-soc.yaml | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 6414b1177e2e4f229b7807009f17ccf9491c6a44 Author: Krzysztof Kozlowski Date: Wed Sep 28 17:20:24 2022 +0200 arm64: dts: qcom: msm8996: align node names with DT schema New slimbus DT schema expect only SLIMbus bus nodes to be named "slimbus". In case of Qualcomm SLIMbus NGD, the bus node is what was called "ngd". Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928152027.489543-9-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 880d93355135515d842a41b7ff50f27daaeb3bec Author: Krzysztof Kozlowski Date: Wed Sep 28 17:20:23 2022 +0200 arm64: dts: qcom: sdm845: align node names with DT schema New slimbus DT schema expect only SLIMbus bus nodes to be named "slimbus". In case of Qualcomm SLIMbus NGD, the bus node is what was called "ngd". Signed-off-by: Krzysztof Kozlowski Tested-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928152027.489543-8-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3cc63b981bab83e8e439629e94ea96c1b3ae5888 Author: Krzysztof Kozlowski Date: Wed Sep 28 17:20:22 2022 +0200 arm64: dts: qcom: msm8996: drop unused slimbus dmas Bindings document only two DMA channels. Linux driver also does not use remaining rx2/tx2. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928152027.489543-7-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7b027503c3620bcc8f60f3cef30ee3bc7f7aeede Author: Krzysztof Kozlowski Date: Wed Sep 28 17:20:21 2022 +0200 arm64: dts: qcom: sdm845: drop unused slimbus dmas Bindings document only two DMA channels. Linux driver also does not use remaining rx2/tx2. Signed-off-by: Krzysztof Kozlowski Tested-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928152027.489543-6-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e92a949e436e9956a2f99a07f9f4f640f42d8f99 Author: Krzysztof Kozlowski Date: Wed Sep 28 17:20:20 2022 +0200 arm64: dts: qcom: mms8996: correct slimbus children unit addresses Correct slimbus address/size cells to match bindings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928152027.489543-5-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 251ba7ee1674cb7608fa2c5da6c188e976e83481 Author: Krzysztof Kozlowski Date: Wed Sep 28 17:20:19 2022 +0200 arm64: dts: qcom: sdm845: correct slimbus children unit addresses slimbus uses address-cells=2, so correct children unit addresses. Signed-off-by: Krzysztof Kozlowski Tested-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928152027.489543-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9eae83f9ec9cee5cbc615fd6bc4221c7d62c07d5 Author: Krzysztof Kozlowski Date: Wed Sep 28 17:20:18 2022 +0200 arm64: dts: qcom: msm8996: drop unused slimbus reg-mames Drop undocumented reg-names from slimbus node - there is only one address range and Linux implementation does not use it. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928152027.489543-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 - 1 file changed, 1 deletion(-) commit 0a4594886dd904b73541188c875bf378c463cbbc Author: Krzysztof Kozlowski Date: Wed Sep 28 17:20:17 2022 +0200 arm64: dts: qcom: sdm845: drop unused slimbus properties Drop properties from slimbus node: unneeded status and downstream-related qcom,apps-ch-pipes/qcom,ea-pc (not documented, not used). Signed-off-by: Krzysztof Kozlowski Tested-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220928152027.489543-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 3 --- 1 file changed, 3 deletions(-) commit 4d29e016eb72d14fa4fb4e5c90c880d260b8b281 Author: Robert Marko Date: Tue Sep 27 22:14:15 2022 +0200 arm64: dts: qcom: cp01-c1: use "okay" instead of "ok" Use "okay" instead of "ok" in USB nodes as "ok" is deprecated. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927201415.1265191-2-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f493bf2e70c6540f79fda3b28d636f1dd486d17a Author: Robert Marko Date: Tue Sep 27 22:14:14 2022 +0200 arm64: dts: qcom: cp01-c1: remove bootargs-append bootargs-append is a leftover from the vendor SDK, and does not exist in the mainline kernel at all, so remove it. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927201415.1265191-1-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 1 - 1 file changed, 1 deletion(-) commit feeef118fda562cf9081edef8ad464d89db070f4 Author: Robert Marko Date: Tue Sep 27 22:12:18 2022 +0200 arm64: dts: qcom: ipq6018: move ARMv8 timer out of SoC node The ARM timer is usually considered not part of SoC node, just like other ARM designed blocks (PMU, PSCI). This fixes dtbs_check warning: arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: soc: timer: {'compatible': ['arm,armv8-timer'], 'interrupts': [[1, 2, 3848], [1, 3, 3848], [1, 4, 3848], [1, 1, 3848]]} should not be valid under {'type': 'object'} From schema: dtschema/schemas/simple-bus.yaml Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927201218.1264506-2-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq6018.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8857b0ab6a562c473c5bded0efda9390b82a84d4 Author: Robert Marko Date: Tue Sep 27 22:12:17 2022 +0200 arm64: dts: qcom: ipq6018: fix NAND node name Per schema it should be nand-controller@79b0000 instead of nand@79b0000. Fix it to match nand-controller.yaml requirements. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927201218.1264506-1-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d455f20402a0a31ae77a3fb924106c46a7898a46 Author: Dmitry Baryshkov Date: Sat Sep 24 12:01:08 2022 +0300 arm64: dts: qcom: sm8250: change DSI PHY node name to generic one Change DSI PHY node names from custom 'dsi-phy' to the generic 'phy'. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924090108.166934-10-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e176b550b34a1be6674867fb97d12dce2ad9bdb Author: Dmitry Baryshkov Date: Sat Sep 24 12:01:07 2022 +0300 arm64: dts: qcom: sdm845: change DSI PHY node name to generic one Change DSI PHY node names from custom 'dsi-phy' to the generic 'phy'. Signed-off-by: Dmitry Baryshkov Tested-by: Steev Klimaszewski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924090108.166934-9-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b76c00443e06ef7e45297b0c71b6bb62d830dd2b Author: Dmitry Baryshkov Date: Sat Sep 24 12:01:06 2022 +0300 arm64: dts: qcom: sdm660: change DSI PHY node name to generic one Change DSI PHY node names from custom 'dsi-phy' to the generic 'phy'. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924090108.166934-8-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm660.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e922200b5733b363afa21c9e198963d882470c32 Author: Dmitry Baryshkov Date: Sat Sep 24 12:01:05 2022 +0300 arm64: dts: qcom: sdm630: change DSI PHY node name to generic one Change DSI PHY node names from custom 'dsi-phy' to the generic 'phy'. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924090108.166934-7-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2372bd2d5be6afd945f83b7980c1ca7254a3b66d Author: Dmitry Baryshkov Date: Sat Sep 24 12:01:04 2022 +0300 arm64: dts: qcom: sc7180: change DSI PHY node name to generic one Change DSI PHY node names from custom 'dsi-phy' to the generic 'phy'. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924090108.166934-6-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 649119dbbdcccda5b29fd618d1d0546890c59bed Author: Dmitry Baryshkov Date: Sat Sep 24 12:01:03 2022 +0300 arm64: dts: qcom: msm8996: change DSI PHY node name to generic one Change DSI PHY node names from custom 'dsi-phy' to the generic 'phy'. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924090108.166934-5-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b03852c244baaf931c0e3908ff81d68206e10fd7 Author: Dmitry Baryshkov Date: Sat Sep 24 12:01:02 2022 +0300 arm64: dts: qcom: msm8916: change DSI PHY node name to generic one Change DSI PHY node names from custom 'dsi-phy' to the generic 'phy'. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924090108.166934-4-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7e2ce42f61bd72e903952427538e2411b3a1429 Author: Johan Hovold Date: Wed Sep 21 10:00:50 2022 +0200 arm64: dts: qcom: sc8280xp: add rpmh-stats node Add a node describing the RPMh shared memory that can be used to retrieve statistics for the SoC low-power modes. Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220921080050.21383-1-johan+linaro@kernel.org arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 732479bda06e1dfe5f46bfc682d94f40dff0af1f Author: Konrad Dybcio Date: Wed Sep 21 02:47:41 2022 +0200 arm64: dts: qcom: msm8998-yoshino: Fix up SMD regulators formatting Add a new line between each subnode and make the { } consistent. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220921004741.152765-1-konrad.dybcio@somainline.org .../boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 33 +++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 151d6e9cc22a8a5e9bd47a99723aa4ab60821faf Author: Dmitry Baryshkov Date: Mon Sep 19 22:00:37 2022 +0300 arm64: dts: qcom: nile: correct firmware paths Correct firmware paths for the Sony Xperia Nile devices to include the SoC name. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220919190037.2122284-7-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c53532f7825c98ede6f80f9549e33443465aaf6a Author: Dmitry Baryshkov Date: Mon Sep 19 22:00:36 2022 +0300 arm64: dts: qcom: pdx223: correct firmware paths Correct firmware paths for the Sony Xperia 1 IV to include the SoC name. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220919190037.2122284-6-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f0a577c3a80790f4249be76a6b9712003deb93a5 Author: Dmitry Baryshkov Date: Mon Sep 19 22:00:35 2022 +0300 arm64: dts: qcom: sagami: correct firmware paths Correct firmware paths for the Sony Xperia Sagami devices to include the SoC name, vendor and platform names. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220919190037.2122284-5-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6dae44d91e42da017d12b3dfeb546cbe2b9c9306 Author: Dmitry Baryshkov Date: Mon Sep 19 22:00:34 2022 +0300 arm64: dts: qcom: ifc6560: correct firmware paths Correct firmware paths for the Inforce IFC6560 to include the SoC name. Do not include the platform name, since the board uses test-signed firmware. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220919190037.2122284-4-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fa1fb7814f556a630b219033cd5de72e978537c Author: Dmitry Baryshkov Date: Mon Sep 19 22:00:33 2022 +0300 arm64: dts: qcom: miix-630: correct firmware paths Correct firmware paths for the Lenovo Miix 630 to include the SoC name. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220919190037.2122284-3-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d1473d7ba78ed15cfe7e08c1d8b5f2b21d60bbd Author: Dmitry Baryshkov Date: Mon Sep 19 22:00:32 2022 +0300 arm64: dts: qcom: w737: correct firmware paths Correct firmware paths for the Samsung Galaxy Book2 to include the SoC name. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220919190037.2122284-2-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bcf429831ecb4810caf1454f6692352401616ad4 Author: Joel Selvaraj Date: Thu Sep 8 22:54:47 2022 -0500 arm64: dts: qcom: sdm845-xiaomi-beryllium-ebbg: introduce Xiaomi Poco F1 EBBG variant Introduce support for the Xiaomi Poco F1 EBBG variant. The EBBG variant uses EBBG FT8719 panel manufactured by EBBG. Signed-off-by: Joel Selvaraj Reviewed-by: Marijn Suijten Reviewed-by: Krzysztof Kozlowski Reviewed-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220909035447.36674-4-joelselvaraj.oss@gmail.com arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-ebbg.dts | 15 +++++++++++++++ 2 files changed, 16 insertions(+) commit 341fdef8ea49448a0c44a17ab442a1d25e4481fa Author: Joel Selvaraj Date: Thu Sep 8 22:54:46 2022 -0500 dt-bindings: arm: qcom: Add Xiaomi Poco F1 EBBG variant bindings Add documentation for "xiaomi,beryllium-ebbg" device. Signed-off-by: Joel Selvaraj Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220909035447.36674-3-joelselvaraj.oss@gmail.com Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit dd6459a0890a17e136c539abda07f8b671615c29 Author: Joel Selvaraj Date: Thu Sep 8 22:54:45 2022 -0500 arm64: dts: qcom: split beryllium dts into common dtsi and tianma dts There are two panel variants of Xiaomi Poco F1. Tianma and EBBG panel. The previous beryllium dts supported the Tianma variant. In order to add support for EBBG variant, the common nodes from beryllium dts are moved to a new common dtsi and to make the variants distinguishable, sdm845-xiaomi-beryllium.dts is now named as sdm845-xiaomi-beryllium-tianma.dts. The model property is updated to distinguish between the variants. The compatibility property is moved to the tianma variant, but it is not updated to avoid any further conflict with other projects/users that might depend on it. Signed-off-by: Joel Selvaraj Reviewed-by: Marijn Suijten Reviewed-by: Caleb Connolly Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220909035447.36674-2-joelselvaraj.oss@gmail.com arch/arm64/boot/dts/qcom/Makefile | 2 +- ...-beryllium.dts => sdm845-xiaomi-beryllium-common.dtsi} | 11 +++++------ .../boot/dts/qcom/sdm845-xiaomi-beryllium-tianma.dts | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 7 deletions(-) commit 65b35e04d2656305320c453df2824c8413fe7150 Author: Dmitry Baryshkov Date: Fri Sep 9 01:28:50 2022 +0300 arm64: dts: qcom: sm8450: add display clock controller Add device node for display clock controller on Qualcomm SM8450 platform Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220908222850.3552050-5-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit c95243eeae587c0fbcaaf53bec9233400005c973 Author: Krzysztof Kozlowski Date: Thu Sep 8 10:09:37 2022 +0200 arm64: dts: qcom: use generic node name "gpio" in SPMI PMIC GPIO controller nodes are named by convention just "gpio", not "gpios". Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220908080938.29199-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/pm6150.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm6150l.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm6350.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm660.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm660l.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm7325.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8005.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8994.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8998.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmi8994.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmi8998.dtsi | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) commit 80edac18ac173f0f0130c2164f75ddadcd68fa7f Author: Rajeev Nandan Date: Wed Sep 7 17:05:53 2022 +0530 arm64: dts: qcom: sc7280: assign DSI clock source parents Assign DSI clock source parents to DSI PHY clocks. Signed-off-by: Rajeev Nandan Cc: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1662550553-28933-1-git-send-email-quic_rajeevny@quicinc.com arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 4ce9c4ebe26c2bc5ad39738f94a873bee150707d Author: Bryan O'Donoghue Date: Wed Sep 7 01:01:05 2022 +0100 arm64: dts: qcom: sm8250: Drop redundant phy-names from DSI controller phy-names has been marked deprecated. Remove it from the sm8250 DSI controller block. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220907000105.786265-12-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 4c182dff8e4556f6872e9834ed279cd2955305f2 Author: Bryan O'Donoghue Date: Wed Sep 7 01:01:04 2022 +0100 arm64: dts: qcom: sdm845: Drop redundant phy-names from DSI controller phy-names has been marked deprecated. Remove it from the sdm845 DSI controller block. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Tested-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220907000105.786265-11-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 325821c74b2d04b6683f5d5bd4dbaa4e3fbbbb40 Author: Bryan O'Donoghue Date: Wed Sep 7 01:01:03 2022 +0100 arm64: dts: qcom: sdm630: Drop redundant phy-names from DSI controller phy-names has been marked deprecated. Remove it from the sdm630 DSI controller block. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220907000105.786265-10-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 1 - 1 file changed, 1 deletion(-) commit 99a4d3d8204d7ecb6c70afa50c9e23ecebbf7f20 Author: Bryan O'Donoghue Date: Wed Sep 7 01:01:02 2022 +0100 arm64: dts: qcom: sdm660: Drop redundant phy-names from DSI controller phy-names has been marked deprecated. Remove it from the sdm660 DSI controller block. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220907000105.786265-9-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sdm660.dtsi | 1 - 1 file changed, 1 deletion(-) commit c427b8e28d7d040a092adaacf4d2b5905c226242 Author: Bryan O'Donoghue Date: Wed Sep 7 01:01:01 2022 +0100 arm64: dts: qcom: sc7280: Drop redundant phy-names from DSI controller phy-names has been marked deprecated. Remove it from the sc7280 DSI controller block. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220907000105.786265-8-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sc7280.dtsi | 1 - 1 file changed, 1 deletion(-) commit 95dc5fd99972fd0535ee82639ebbbcacf5175521 Author: Bryan O'Donoghue Date: Wed Sep 7 01:01:00 2022 +0100 arm64: dts: qcom: sc7180: Drop redundant phy-names from DSI controller phy-names has been marked deprecated. Remove it from the sc7180 DSI controller block. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220907000105.786265-7-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/sc7180.dtsi | 1 - 1 file changed, 1 deletion(-) commit 02875b55fb451390d5bf95c59e85912c6933eabe Author: Bryan O'Donoghue Date: Wed Sep 7 01:00:59 2022 +0100 arm64: dts: qcom: msm8996: Drop redundant phy-names from DSI controller phy-names has been marked deprecated. Remove it from the msm8996 DSI controller block. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220907000105.786265-6-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 -- 1 file changed, 2 deletions(-) commit da4a7c1431d656889c265d7fafaf3d6beaa05c1a Author: Bryan O'Donoghue Date: Wed Sep 7 01:00:58 2022 +0100 arm64: dts: qcom: msm8916: Drop redundant phy-names from DSI controller phy-names has been marked deprecated. Remove it from the msm8916 DSI controller block. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220907000105.786265-5-bryan.odonoghue@linaro.org arch/arm64/boot/dts/qcom/msm8916.dtsi | 1 - 1 file changed, 1 deletion(-) commit 3b08e3fdf056cf30ecb1413d2bcb1353a333024b Author: Krishna Kurapati Date: Tue Sep 6 21:45:33 2022 +0530 arm64: dts: qcom: sc7280: Update SNPS Phy params for SC7280 IDP device Overriding the SNPS Phy tuning parameters for SC7280 IDP device. Signed-off-by: Krishna Kurapati Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1662480933-12326-4-git-send-email-quic_kriskura@quicinc.com arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit c50e30b7e2614d140929280377337ec01bdbdc84 Author: Matthias Kaehlcke Date: Thu Sep 1 10:29:50 2022 -0700 arm64: dts: qcom: sc7180: Configure USB as wakeup source The dwc3 USB controller of the sc7180 supports USB remote wakeup, configure it as a wakeup source. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220901102946.v2.1.I347ea409ee3134bd32a29e33fecd1a6ef32085a0@changeid arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit b318c53e9c383b26d7972175e8ca60dc3552b4d2 Author: Vladimir Zapolskiy Date: Thu Sep 1 10:35:04 2022 +0300 arm64: dts: qcom: sm8450: Add description of camera control interfaces Add description of two CCI controllers found on QCOM SM8450. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220901073504.3077363-1-vladimir.zapolskiy@linaro.org arch/arm64/boot/dts/qcom/sm8450.dtsi | 142 +++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) commit 2f72a4f54cdb4fd0ebea9a2dea65756d3e676be2 Author: Yunlong Jia Date: Thu Sep 1 02:49:58 2022 +0000 arm64: dts: qcom: Add sc7180-pazquel360 Create first version device tree for pazquel360 pazquel360 is convertible and the pazquel it is based on is clamshell. sku 20 for lte & wifi sku 21 for wifi only sku 22 for lte w/o esim & wifi Signed-off-by: Yunlong Jia Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220901024827.v3.2.Iea2d2918adfff2825b87d428b5732717425c196f@changeid arch/arm64/boot/dts/qcom/Makefile | 2 + .../dts/qcom/sc7180-trogdor-pazquel360-lte.dts | 22 ++++++++++ .../dts/qcom/sc7180-trogdor-pazquel360-wifi.dts | 17 ++++++++ .../boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi | 50 ++++++++++++++++++++++ 4 files changed, 91 insertions(+) commit 185d192d0a7b565a24b3f7456a2f84f169ab087a Author: Yunlong Jia Date: Thu Sep 1 02:49:57 2022 +0000 dt-bindings: arm: qcom: Document additional skus for sc7180 pazquel360 pazquel360 is an extension project based on pazquel. We create 3 sku on pazquel360: sku 20 for LTE with physical SIM _and_ eSIM and WiFi sku 21 for WiFi only sku 22 for LTE with only a physical SIM Both sku20 and sku22 are LTE SKUs. One has the eSIM stuffed and one doesn't. There is a single shared device tree for the two. Signed-off-by: Yunlong Jia Acked-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220901024827.v3.1.I3aa360986c0e7377ea5e96c116f014ff1ab8c968@changeid Documentation/devicetree/bindings/arm/qcom.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) commit eaac4e55a6f419541da4983cd6d36f5d5de658ec Author: Dmitry Baryshkov Date: Tue Aug 9 22:54:22 2022 -0500 arm64: dts: qcom: sdm845: add displayport node Add displayport controller device node, describing DisplayPort hardware block on SDM845. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220810035424.2796777-3-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 82 +++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 2 deletions(-) commit d6838f267f16189a8c1954a7a6bfa36fb79896f7 Author: Dmitry Baryshkov Date: Tue Aug 9 22:54:21 2022 -0500 arm64: dts: qcom: sdm845: switch usb_1 phy to use combo usb+dp phy Change sdm845's usb_1_qmpphy to use combo usb+dp phy bindings, rather than just usb phy. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220810035424.2796777-2-bjorn.andersson@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit ff02ac621634e82c0c34d02a79d402ae700cdfd0 Author: Stephan Gerhold Date: Mon Jul 18 16:03:40 2022 +0200 arm64: dts: qcom: msm8916: Drop MSS fallback compatible MSM8916 was originally using the "qcom,q6v5-pil" compatible for the MSS remoteproc. Later it was decided to use SoC-specific compatibles instead, so "qcom,msm8916-mss-pil" is now the preferred compatible. Commit 60a05ed059a0 ("arm64: dts: qcom: msm8916: Add MSM8916-specific compatibles to SCM/MSS") updated the MSM8916 device tree to make use of the new compatible but still kept the old "qcom,q6v5-pil" as fallback. This is inconsistent with other SoCs and conflicts with the description in the binding documentation (which says that only one compatible should be present). Also, it has no functional advantage since older kernels could not handle this DT anyway (e.g. "power-domains" in the MSS node is only supported by kernels that also support "qcom,msm8916-mss-pil"). Make this consistent with other SoCs by using only the "qcom,msm8916-mss-pil" compatible. Fixes: 60a05ed059a0 ("arm64: dts: qcom: msm8916: Add MSM8916-specific compatibles to SCM/MSS") Signed-off-by: Stephan Gerhold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220718140344.1831731-2-stephan.gerhold@kernkonzept.com arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c24c9d53e001a38ac1637674304987ab061a38eb Author: Krzysztof Kozlowski Date: Mon Sep 19 18:33:33 2022 +0200 arm64: dts: qcom: correct white-space before { Add missing space or remove redundant one before opening {. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220919163333.129989-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8998.dtsi | 8 ++++---- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 4 ++-- arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 8 ++++---- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 6 +++--- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 8 ++++---- arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 4 ++-- arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts | 6 +++--- 10 files changed, 25 insertions(+), 25 deletions(-) commit 37eac5a5fe27b1ab189d12064ffdd7db42f26900 Author: Konrad Dybcio Date: Sat Oct 8 20:17:13 2022 +0200 arm64: dts: qcom: sm8250-edo: Add NXP PN553 NFC Add a node for NXP PN553 NFC, using the nxp-nci driver. Signed-off-by: Konrad Dybcio Tested-by: Marijn Suijten Reviewed-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221008181714.253634-1-konrad.dybcio@somainline.org arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 9bce41fab14da8f21027dc9847535ef5e22cbe8b Author: Krzysztof Kozlowski Date: Mon Oct 10 07:44:14 2022 -0400 arm64: dts: qcom: sdm845-cheza: fix AP suspend pin bias There is no "bias-no-pull" property. Assume intentions were disabling bias. Fixes: 79e7739f7b87 ("arm64: dts: qcom: sdm845-cheza: add initial cheza dt") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221010114417.29859-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9905370560d9c29adc15f4937c5a0c0dac05f0b4 Author: Krzysztof Kozlowski Date: Mon Oct 10 07:44:13 2022 -0400 arm64: dts: qcom: sdm845-db845c: correct SPI2 pins drive strength The pin configuration (done with generic pin controller helpers and as expressed by bindings) requires children nodes with either: 1. "pins" property and the actual configuration, 2. another set of nodes with above point. The qup_spi2_default pin configuration uses alreaady the second method with a "pinmux" child, so configure drive-strength similarly in "pinconf". Otherwise the PIN drive strength would not be applied. Fixes: 8d23a0040475 ("arm64: dts: qcom: db845c: add Low speed expansion i2c and spi nodes") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221010114417.29859-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 780f836fe071a9e8703fe6a05ae00129acf83391 Author: Krzysztof Kozlowski Date: Mon Oct 10 07:44:12 2022 -0400 arm64: dts: qcom: sdm630: fix UART1 pin bias There is no "bias-no-pull" property. Assume intentions were disabling bias. Fixes: b190fb010664 ("arm64: dts: qcom: sdm630: Add sdm630 dts file") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221010114417.29859-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 378c2064264e18b61922c388c09faba544ce7a15 Author: Robert Marko Date: Fri Aug 19 00:18:15 2022 +0200 arm64: dts: qcom: ipq8074-hk01: add VQMMC supply Since now we have control over the PMP8074 PMIC providing various system voltages including L11 which provides the SDIO/eMMC I/O voltage set it as the SDHCI VQMMC supply. This allows SDHCI controller to switch to 1.8V I/O mode and support high speed modes like HS200 and HS400. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818221815.346233-5-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074-hk01.dts | 2 ++ 1 file changed, 2 insertions(+) commit 01da7baf018c4977a260b40e7e6978133c9ef824 Author: Robert Marko Date: Fri Aug 19 00:18:14 2022 +0200 arm64: dts: qcom: add PMP8074 DTSI PMP8074 is a companion PMIC to the Qualcomm IPQ8074 series that is controlled via SPMI. Add DTSI for it providing GPIO, regulator, RTC and VADC support. RTC is disabled by default as there is no built-in battery so it will loose time unless board vendor added a battery, so make it optional. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818221815.346233-4-robimarko@gmail.com arch/arm64/boot/dts/qcom/pmp8074.dtsi | 125 ++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit fd8bdb451c6541b40e5977defcfebfe51713a538 Author: Robert Marko Date: Fri Aug 19 00:08:49 2022 +0200 arm64: dts: qcom: ipq8074: add clocks to APCS APCS now has support for providing the APSS clocks as the child device for IPQ8074. So, add the A53 PLL and XO clocks in order to use APCS as the CPU clocksource for APSS scaling. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818220849.339732-4-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit ad1e0b475963eda26a76fd5c2be41d0c852bffba Merge: 887ac08946cc 40b21d466a86 Author: Bjorn Andersson Date: Mon Oct 17 14:40:27 2022 -0500 Merge branch '20220818220628.339366-8-robimarko@gmail.com' into HEAD commit 887ac08946cc0f2a2b915140fcf8d4365ca9393d Author: Robert Marko Date: Fri Aug 19 00:02:45 2022 +0200 arm64: dts: qcom: ipq8074: add thermal nodes IPQ8074 has a tsens v2.3.0 peripheral which monitors temperatures around the various subsystems on the die. So lets add the tsens and thermal zone nodes, passive CPU cooling will come in later patches after CPU frequency scaling is supported. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818220245.338396-5-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074.dtsi | 96 +++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit cc22efbec0110181725b1f5f6778155a2e352522 Author: John Garry Date: Mon Oct 17 17:20:35 2022 +0800 scsi: libsas: Update SATA dev FIS in sas_ata_task_done() In sas_ata_task_done(), for commands which complete with error we set the SATA dev FIS status field with ATA_ERR. In ata_eh_analyze_tf() this would be interpreted as a HSM error. Set ATA_DRDY, which will lead libata to judge as a device error, which is a safer bet. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1665998435-199946-9-git-send-email-john.garry@huawei.com Reviewed-by: Niklas Cassel Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_ata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e8d43642f2f9bbed9e7823c6e5b6fd7c7fbc3dc Author: John Garry Date: Mon Oct 17 17:20:34 2022 +0800 scsi: libsas: Make sas_{alloc, alloc_slow, free}_task() private We have no users outside libsas any longer, so make sas_alloc_task(), sas_alloc_slow_task(), and sas_free_task() private. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1665998435-199946-8-git-send-email-john.garry@huawei.com Tested-by: Damien Le Moal Tested-by: Niklas Cassel # pm80xx Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_init.c | 3 --- drivers/scsi/libsas/sas_internal.h | 4 ++++ include/scsi/libsas.h | 4 ---- 3 files changed, 4 insertions(+), 7 deletions(-) commit 811be570a9a8df96b4fd43ff00837b947bbaf49b Author: John Garry Date: Mon Oct 17 17:20:33 2022 +0800 scsi: pm8001: Use sas_ata_device_link_abort() to handle NCQ errors In commit c6b9ef5779c3 ("[SCSI] pm80xx: NCQ error handling changes") the driver had support added to handle NCQ errors but much of what is done in this handling is duplicated from the libata EH. In that named commit we handle in 2x main steps: a. Issue read log ext10 to examine and clear the errors b. Issue SATA_ABORT all command Indeed, in libata EH, we do similar to above: a. ata_do_eh() -> ata_eh_autopsy() -> ata_eh_link_autopsy() -> ata_eh_analyze_ncq_error() -> ata_eh_read_log_10h() b. ata_do_eh() -> ata_eh_recover() which will issue a device soft reset or hard reset Since there is so much duplication, use sas_ata_device_link_abort() which will abort all pending IOs and kick of ATA EH which will do the steps, above. However we will not follow the advisory to send the SATA_ABORT all command after the autopsy in read log ext10. Indeed, in libsas EH, we already send a per-task SATA_ABORT command, and this is prior to the ATA EH kicking in and issuing the read log ext10 in the recovery process. I judge that this is ok as the SATA_ABORT command does not actually send any protocol on the link to abort I/O on the other side, so would not change any state on the disk (for the read log ext10 command). Signed-off-by: John Garry Link: https://lore.kernel.org/r/1665998435-199946-7-git-send-email-john.garry@huawei.com Tested-by: Damien Le Moal Tested-by: Niklas Cassel # pm80xx Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_hwi.c | 171 +++------------------------------------ drivers/scsi/pm8001/pm8001_sas.c | 6 -- drivers/scsi/pm8001/pm8001_sas.h | 5 -- drivers/scsi/pm8001/pm80xx_hwi.c | 163 ++----------------------------------- 4 files changed, 19 insertions(+), 326 deletions(-) commit 0b639decf65160b1afd9993019be37d7869c0340 Author: John Garry Date: Mon Oct 17 17:20:32 2022 +0800 scsi: pm8001: Modify task abort handling for SATA task When we try to abort a SATA task, the CCB of the task which we are trying to avoid may still complete. In this case, we should not touch the task associated with that CCB as we can race with libsas freeing the last later in sas_eh_handle_sas_errors() -> sas_eh_finish_cmd() for when TASK_IS_ABORTED is returned from sas_scsi_find_task() Signed-off-by: John Garry Link: https://lore.kernel.org/r/1665998435-199946-6-git-send-email-john.garry@huawei.com Tested-by: Damien Le Moal Tested-by: Niklas Cassel # pm80xx Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_hwi.c | 15 +++++++++++++-- drivers/scsi/pm8001/pm8001_sas.c | 8 ++++++++ drivers/scsi/pm8001/pm80xx_hwi.c | 14 ++++++++++---- 3 files changed, 31 insertions(+), 6 deletions(-) commit 4ef4f1a6155571d3d53583a4e8e7ccbbec220b8a Author: Xingui Yang Date: Mon Oct 17 17:20:31 2022 +0800 scsi: hisi_sas: Modify v3 HW SATA disk error state completion processing When an NCQ error occurs, the controller will abnormally complete the I/Os that are newly delivered to disk, and bit8 in CQ dw3 will be set which indicates that the SATA disk is in error state. The current processing flow is to set ts->stat to SAS_OPEN_REJECT and then sas_ata_task_done() will set FIS stat to ATA_ERR. After analyzing the I/O by ata_eh_analyze_tf(), err_mask will set to AC_ERR_HSM. If media error occurs for four times within 10 minutes and the chip rejects new I/Os for four times, NCQ will be disabled due to excessive errors, which is undesirable. Therefore, use sas_task_abort() to handle abnormally completed I/Os when SATA disk is in error state, as these abnormally completed I/Os are already processed by sas_ata_device_link_abort() and qc->flag are set to ATA_QCFLAG_FAILED. If sas_task_abort() is used, qc->err_mask will not be modified in EH. Unlike the current process flow, it will not increase the count of ECAT_TOUT_HSM and not turn off NCQ. Like other I/Os on the disk that do not have an error but do not return after the NCQ error, they are retried after the EH. Signed-off-by: Xingui Yang Signed-off-by: John Garry Link: https://lore.kernel.org/r/1665998435-199946-5-git-send-email-john.garry@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 930d97dabdd56681aef752a35475f0212a171741 Author: Xingui Yang Date: Mon Oct 17 17:20:30 2022 +0800 scsi: hisi_sas: Add SATA_DISK_ERR bit handling for v3 hw When CQ header dw3 SATA_DISK_ERR is set it means this SATA disk is in error state and the current IPTT is invalid. An invalid IPTT does not correspond to any slot. In this scenario, new I/Os that delivered to disk will be rejected by the controller and all I/Os remaining in the disk should be aborted, which we add here with the sas_ata_device_link_abort() call. In hisi_sas_abort_task() we don't want to issue a soft reset as it may cause info to be lost in the target disk for the ATA EH autopsy. In this case, just release resources - the disk won't return other I/Os normally after NCQ Error, so this is safe. Signed-off-by: Xingui Yang Signed-off-by: John Garry Link: https://lore.kernel.org/r/1665998435-199946-4-git-send-email-john.garry@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c | 18 ++++++++++++- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 48 ++++++++++++++++++++++++++++++++-- 3 files changed, 64 insertions(+), 3 deletions(-) commit 4b329abc91800d23941ac773e69b322a13981ecb Author: Xingui Yang Date: Mon Oct 17 17:20:29 2022 +0800 scsi: hisi_sas: Move slot variable definition in hisi_sas_abort_task() Each branch currently defines a slot variable independently, and it is neater to move it to the function head. Signed-off-by: Xingui Yang Signed-off-by: John Garry Link: https://lore.kernel.org/r/1665998435-199946-3-git-send-email-john.garry@huawei.com Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 44112922674b94a7d699dfff6307fc830018df7c Author: John Garry Date: Mon Oct 17 17:20:28 2022 +0800 scsi: libsas: Add sas_ata_device_link_abort() Similar to how AHCI handles NCQ errors in ahci_error_intr() -> ata_port_abort() -> ata_do_link_abort(), add an NCQ error handler for LLDDs to call to initiate a link abort. This will mark all outstanding QCs as failed and kick-off EH. Note: A "force reset" argument is added for drivers which require the ATA error handling to always reset the device. A driver may require this feature for when SATA device per-SCSI cmnd resources are only released during reset for ATA EH. As such, we need an option to force reset to be done, regardless of what any EH autopsy decides. The SATA device FIS fields are set to indicate a device error from ata_eh_analyze_tf(). Suggested-by: Damien Le Moal Suggested-by: Niklas Cassel Signed-off-by: John Garry Link: https://lore.kernel.org/r/1665998435-199946-2-git-send-email-john.garry@huawei.com Tested-by: Damien Le Moal Tested-by: Niklas Cassel # pm80xx Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_ata.c | 15 +++++++++++++++ include/scsi/sas_ata.h | 6 ++++++ 2 files changed, 21 insertions(+) commit f74354670fc6dfc2ac3fcf2ec2c4e5ae9155433c Author: Andrzej Hajda Date: Mon Oct 17 10:55:25 2022 +0200 drm/i915: fix clear mask in GEN7_MISCCPCTL update GEN7_DOP_CLOCK_GATE_ENABLE bit should be cleared, not inverse. The bug was introduced during conversion to intel_uncore_rmw helper. Suggested-by: Matt Roper Fixes: 8cee664d3eb6f8 ("drm/i915: use proper helper for register updates") Signed-off-by: Andrzej Hajda Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221017085525.3898649-1-andrzej.hajda@intel.com drivers/gpu/drm/i915/i915_irq.c | 4 ++-- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 80c1fb2ee7b88e1e03bbbd5b3e19cbae28b95dcf Author: Radhakrishna Sripada Date: Tue Oct 11 08:38:51 2022 -0700 drm/i915: Use graphics ver, rel info for media on old platforms Platforms prior to MTL do not have a separate media and graphics version. On platforms where GMD id is not supported, reuse the graphics ip version, release info for media. The rest of the IP graphics, display versions would be copied during driver creation. While at it warn if GMD is not used for platforms greater than gen12. v2: - Use simple assignment to copy contents of the structure(JaniN) Fixes: c2c7075225ef ("drm/i915: Read graphics/media/display arch version from hw") Cc: Jani Nikula Cc: Lucas De Marchi Cc: Matt Roper Cc: Ville Syrjälä Signed-off-by: Radhakrishna Sripada Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221011153851.3781507-2-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/intel_device_info.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ef7e222cd68f7b7c654f23fce51e8be888a3d7ee Author: Radhakrishna Sripada Date: Tue Oct 11 08:38:50 2022 -0700 drm/i915: Add intel_ prefix to struct ip_version Rename struct ip_version to intel_ip_version to comply with the naming conventions for structures. Suggested-by: Jani Nikula Signed-off-by: Radhakrishna Sripada Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221011153851.3781507-1-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_device_info.h | 8 ++++---- drivers/gpu/drm/i915/intel_step.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit e104c74427a67158b59d5a7da9b00362e7f5fe53 Author: Yang Yingliang Date: Tue Sep 13 11:19:56 2022 +0800 clk: keystone: syscon-clk: Use dev_err_probe() helper dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220913031956.984475-1-yangyingliang@huawei.com Signed-off-by: Stephen Boyd drivers/clk/keystone/syscon-clk.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 4c6b2abf074e987da9919fae8e9dad811f497be8 Author: Yang Yingliang Date: Tue Sep 13 11:24:03 2022 +0800 clk: bulk: Use dev_err_probe() helper in __clk_bulk_get() dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220913032403.1007902-1-yangyingliang@huawei.com Signed-off-by: Stephen Boyd drivers/clk/clk-bulk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1ea1543fed17408a285bbd736aefbd83ebf693d8 Author: Matti Vaittinen Date: Fri Aug 19 22:17:53 2022 +0300 clk: cdce925: simplify using devm_regulator_get_enable() Simplify the driver using devm_regulator_get_enable() instead of open-coding the devm_add_action_or_reset(). A (minor?) functional change is that we don't print an error in case of a deferred probe. Now we also print the error no matter which of the involved calls caused the failure. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/1f46b06be44527a93cd0bfd5de2fa8e2899524ab.1660934107.git.mazziesaccount@gmail.com Signed-off-by: Stephen Boyd drivers/clk/clk-cdce925.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit dc62c7e6ed5351058bbb57495e73fa6b3757587a Author: Damien Le Moal Date: Fri Oct 14 11:39:27 2022 +0900 ata: pata_ftide010: Remove build dependency on OF The pata_ftide010 can be built without CONFIG_OF being enabled, as long as the macro of_match_ptr() is not used when initializing the platform driver .of_match_table field. Remove the use of this macro and the build dependency on OF. Signed-off-by: Damien Le Moal Reviewed-by: Linus Walleij Reviewed-by: Sergey Shtylyov drivers/ata/Kconfig | 1 - drivers/ata/pata_ftide010.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 6c4c900b7397365c1c1559fce90a50f1937921ee Author: Damien Le Moal Date: Thu Oct 13 17:30:34 2022 +0900 ata: sata_gemini: Remove dependency on OF for compile tests If CONFIG_OF is disabled, then using the macro of_match_ptr() results in the gemini_sata_of_match variable being unused, which generates a compilation warning and a compilation error if CONFIG_WERROR is enabled. Removing the use of this macro by directly assigning the gemini_sata_of_match match table to the .of_match_table field in the platform driver definition allows removing the dependency on OF for compile tests, thus improving compile test coverage. Fixes: f7220eac752f ("ata: Kconfig: fix sata gemini compile test condition") Signed-off-by: Damien Le Moal Reviewed-by: Linus Walleij drivers/ata/Kconfig | 2 +- drivers/ata/sata_gemini.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c8c39c7427b7dfaf799d785ed0b5f2b631757cf4 Author: Luca Weiss Date: Sun Oct 16 11:00:33 2022 +0200 dt-bindings: soc: qcom: aoss: Add sc8280xp compatible Document the aoss-qmp compatible for sc8280xp. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221016090035.565350-4-luca@z3ntu.xyz Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml | 1 + 1 file changed, 1 insertion(+) commit fa2d6ed19899462758ea807e93dd972240f836f4 Author: Konrad Dybcio Date: Sat Oct 15 13:55:35 2022 +0200 dt-bindings: firmware: document Qualcomm SM6375 SCM Document the compatible for Qualcomm SM6375 SCM. SCM consumes a single clock (core / RPM_SMD_CE1_CLK), though it does not matter whether Linux enables it, as one of the billion levels of firmware ensures it's on anyway. Still, mark it as used for the sake of correctness. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221015115535.150037-1-konrad.dybcio@somainline.org Documentation/devicetree/bindings/firmware/qcom,scm.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 367b9c70e9b25fe9ad5346b0f3544682d8b112b9 Author: Stephen Boyd Date: Fri Oct 14 17:49:34 2022 -0700 soc: qcom: stats: Mark device as having no PM support This driver purely exposes information from memory to the kernel. Let's mark it as not having any device PM functionality, so that during suspend we skip even trying to call a suspend function on this device. This clears up suspend logs more than anything else, but it also shaves a few cycles off suspend. Cc: Konrad Dybcio Signed-off-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221015004934.3930651-2-swboyd@chromium.org drivers/soc/qcom/qcom_stats.c | 2 ++ 1 file changed, 2 insertions(+) commit 5f7e2cb56af6800a4158514cc27921141e67ae19 Author: Stephen Boyd Date: Fri Oct 14 17:49:33 2022 -0700 soc: qcom: cmd-db: Mark device as having no PM support This driver purely exposes information from memory to the kernel. Let's mark it as not having any device PM functionality, so that during suspend we skip even trying to call a suspend function on this device. This clears up suspend logs more than anything else, but it also shaves a few cycles off suspend. Cc: Konrad Dybcio Signed-off-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221015004934.3930651-1-swboyd@chromium.org drivers/soc/qcom/cmd-db.c | 2 ++ 1 file changed, 2 insertions(+) commit 5c97a94cc3707ca7ed652131717f331678e887c9 Author: Krzysztof Kozlowski Date: Tue Oct 11 15:02:31 2022 -0400 dt-bindings: pinctrl: qcom,sdm630: convert to dtschema Convert Qualcomm SDM630 and SDM660 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221011190231.76784-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sdm630-pinctrl.yaml | 188 ++++++++++++++++++++ .../bindings/pinctrl/qcom,sdm660-pinctrl.txt | 191 --------------------- 2 files changed, 188 insertions(+), 191 deletions(-) commit a42b1ee868361f1cb0492f1bdaefb43e0751e468 Author: Luca Weiss Date: Thu Oct 13 21:06:57 2022 +0200 ARM: dts: qcom: apq8064: fix coresight compatible There's a typo missing the arm, prefix of arm,coresight-etb10. Fix it to make devicetree validation happier. Signed-off-by: Luca Weiss Fixes: 7a5c275fd821 ("ARM: dts: qcom: Add apq8064 CoreSight components") Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013190657.48499-3-luca@z3ntu.xyz arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 891bcfe02470c79489987d643ba0010c0b16f896 Author: Luca Weiss Date: Thu Oct 13 21:06:56 2022 +0200 ARM: dts: qcom: apq8084: fix compatible for l2-cache The compatible "qcom,arch-cache" for l2-cache does not exist, and all other Qualcomm boards use just "cache" for it. Fix it. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013190657.48499-2-luca@z3ntu.xyz arch/arm/boot/dts/qcom-apq8084.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f917ec31d3eb0f2c657f36d299d39bd8d051e03 Author: Luca Weiss Date: Thu Oct 13 21:06:55 2022 +0200 ARM: dts: qcom: ipq8064-rb3011: fix nand node validation The devicetree documentation for the nand node requires the subnode be called nand@ and no compatible is needed. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013190657.48499-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8ad78282a43f6effe86530b9980ba456b98d7cbc Author: Krzysztof Kozlowski Date: Sun Oct 2 11:20:00 2022 +0200 ARM: dts: qcom: correct indentation Do not use spaces for indentation. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221002092000.68844-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dba79c34605d60cb02c2951c701ea0bc16937153 Author: Krzysztof Kozlowski Date: Fri Sep 30 22:05:29 2022 +0200 dt-bindings: pinctrl: qcom,sdm845: convert to dtschema Convert Qualcomm SDM845 pin controller bindings to DT schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, their children with '-pins'). Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220930200529.331223-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sdm845-pinctrl.txt | 176 --------------------- .../bindings/pinctrl/qcom,sdm845-pinctrl.yaml | 158 ++++++++++++++++++ 2 files changed, 158 insertions(+), 176 deletions(-) commit f15623bda1dcb37007b930496e2955cca12f30d8 Author: Matti Lehtimäki Date: Wed Sep 28 00:49:39 2022 +0300 ARM: dts: qcom: Add support for Samsung Galaxy Tab 4 10.1 (SM-T530) Add a device tree for the Samsung Galaxy Tab 4 10.1 (SM-T530) wifi tablet based on the apq8026 platform. Currently supported are accelerometer sensor, hall sensor, internal storage, physical buttons (power & volume), screen (based on simple-framebuffer set up by the bootloader), sdcard, touchscreen and USB. Signed-off-by: Matti Lehtimäki Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927214940.244480-4-matti.lehtimaki@gmail.com arch/arm/boot/dts/Makefile | 1 + .../boot/dts/qcom-apq8026-samsung-matisse-wifi.dts | 453 +++++++++++++++++++++ 2 files changed, 454 insertions(+) commit 198f7b7cbb737ba7e7ac9c2ee744746b7faf9a9c Author: Matti Lehtimäki Date: Wed Sep 28 00:49:38 2022 +0300 dt-bindings: arm: qcom: Document samsung,matisse-wifi device Add binding documentation for Samsung Galaxy Tab 4 10.1 (2014) wifi tablet which is based on Snapdragon 400 (apq8026) SoC. Signed-off-by: Matti Lehtimäki Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927214940.244480-3-matti.lehtimaki@gmail.com Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit fe11928be2e3d46113cba831f21e155820072ec9 Author: Matti Lehtimäki Date: Wed Sep 28 00:49:37 2022 +0300 ARM: dts: qcom: pm8226: Add node for the GPIOs The PM8226 provides 8 GPIOs. Add a node to support them. Signed-off-by: Matti Lehtimäki Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927214940.244480-2-matti.lehtimaki@gmail.com arch/arm/boot/dts/qcom-pm8226.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2875a2f3f18359517e1720cf252ee5e7c2d6c29d Author: Stephen Boyd Date: Mon Oct 3 13:31:03 2022 -0700 clk: xilinx: Drop duplicate depends on COMMON_CLK This entire Kconfig file is only included within the if COMMON_CLK section of the drivers/clk/Kconfig file. That makes the depends on COMMON_CLK here redundant. Remove it. Cc: Shubhrajyoti Datta Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20221003203103.2705007-1-sboyd@kernel.org drivers/clk/xilinx/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da76bc88bde1dc3f547078282e30a88c371699ad Author: Luca Weiss Date: Sun Sep 25 21:06:21 2022 +0200 ARM: dts: qcom: pmx65: use node name "gpio" for spmi-gpio All other usages of qcom,spmi-gpio use the gpio@ node name, and this is also validated by the dt binding check. Fix it. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220925190622.111505-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-pmx65.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 106ef3bda21006fe37b62c85931230a6355d78d3 Author: Rahul Tanwar Date: Thu Oct 13 14:48:33 2022 +0800 clk: mxl: Fix a clk entry by adding relevant flags One of the clock entry "dcl" clk has some HW limitations. One is that its rate can only by changed by changing its parent clk's rate & two is that HW does not support enable/disable for this clk. Handle above two limitations by adding relevant flags. Add standard flag CLK_SET_RATE_PARENT to handle rate change and add driver internal flag DIV_CLK_NO_MASK to handle enable/disable. Fixes: d058fd9e8984 ("clk: intel: Add CGU clock driver for a new SoC") Reviewed-by: Yi xin Zhu Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/a4770e7225f8a0c03c8ab2ba80434a4e8e9afb17.1665642720.git.rtanwar@maxlinear.com Signed-off-by: Stephen Boyd drivers/clk/x86/clk-cgu.c | 5 +++-- drivers/clk/x86/clk-cgu.h | 1 + drivers/clk/x86/clk-lgm.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) commit a5d49bd369b8588c0ee9d4d0a2c0160558a3ab69 Author: Rahul Tanwar Date: Thu Oct 13 14:48:32 2022 +0800 clk: mxl: Add option to override gate clks In MxL's LGM SoC, gate clocks can be controlled either from CGU clk driver i.e. this driver or directly from power management driver/daemon. It is dependent on the power policy/profile requirements of the end product. To support such use cases, provide option to override gate clks enable/disable by adding a flag GATE_CLK_HW which controls if these gate clks are controlled by HW i.e. this driver or overridden in order to allow it to be controlled by power profiles instead. Reviewed-by: Yi xin Zhu Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/bdc9c89317b5d338a6c4f1d49386b696e947a672.1665642720.git.rtanwar@maxlinear.com [sboyd@kernel.org: Add braces on many line if-else] Signed-off-by: Stephen Boyd drivers/clk/x86/clk-cgu.c | 16 +++++++++++++++- drivers/clk/x86/clk-cgu.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) commit 5da0f6fedb18d447cbe6d8aa5be33291bce1e7ba Author: Luca Weiss Date: Sun Sep 25 19:56:30 2022 +0200 ARM: dts: qcom: msm8974-sony-*: fix multi-led node name The name rgb-led is not allowed, multi-led is supposed to be used. /arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine-amami.dtb: pm8941@1: pwm: 'rgb-led' does not match any of the regexes: '^led@[0-9a-f]$', 'pinctrl-[0-9]+' From schema: /Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml Signed-off-by: Luca Weiss Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220925175631.103535-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1e27c4cd1741892b9984d571e4ad1476eb0c9b00 Author: Luca Weiss Date: Sun Sep 25 19:32:03 2022 +0200 ARM: dts: qcom: msm8974: Remove bogus *-cells from smd-edge The bindings check complains that #address-cells and #size-cells shouldn't be in the smd-edge node. Remove it. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220925173203.96117-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-msm8974.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 078d683252d9ceb06661cd3fc07b6fd58ef06548 Author: Luca Weiss Date: Sun Sep 25 18:13:17 2022 +0200 ARM: dts: qcom: apq8084: add tsens interrupt Add the interrupt for tsens, based on the information from downstream msm-3.4 dts. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220925161317.76356-2-luca@z3ntu.xyz arch/arm/boot/dts/qcom-apq8084.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 23fa8ec64963b504071bdd0bdc6ade28cd7ecca1 Author: Luca Weiss Date: Sun Sep 25 18:13:16 2022 +0200 ARM: dts: qcom: msm8974: fix tsens compatible Bindings mandate the use of the fallback compatible qcom,tsens-v0_1 for msm8974. Add it to fix the warning. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220925161317.76356-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-apq8084.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d780386cd44a2f44c90abdb41487f4cdb8be7213 Author: Krzysztof Kozlowski Date: Sun Sep 25 13:21:23 2022 +0200 arm64: defconfig: enable rest of Qualcomm ARMv8 SoCs pinctrl drivers Enable rest of Qualcomm ARMv8 SoCs pin controller drivers (MSM8953, MSM8976, QCM2290). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220925112123.148897-2-krzysztof.kozlowski@linaro.org arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit cea42b8d79663fde7a7138b838dab0b931f4e128 Author: Krzysztof Kozlowski Date: Sun Sep 25 13:21:22 2022 +0200 ARM: qcom_defconfig: enable rest of ARMv7 SoCs pinctrl drivers Enable rest of ARMv7 SoCs pin controller drivers. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220925112123.148897-1-krzysztof.kozlowski@linaro.org arch/arm/configs/qcom_defconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 6d28bc945dea4628516b207e0f68199bbc063848 Author: Luca Weiss Date: Sat Sep 24 17:44:22 2022 +0200 ARM: dts: qcom: add 'chassis-type' property Add the chassis-type property to arm32 Qualcomm watches, phones and tablets. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924154422.9896-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts | 1 + arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 1 + arch/arm/boot/dts/qcom-apq8064-sony-xperia-lagan-yuga.dts | 1 + arch/arm/boot/dts/qcom-msm8226-samsung-s3ve3g.dts | 1 + arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 1 + arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine-amami.dts | 1 + arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine-honami.dts | 1 + arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts | 1 + arch/arm/boot/dts/qcom-msm8974pro-samsung-klte.dts | 1 + arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dts | 1 + 10 files changed, 10 insertions(+) commit 28743e25fa1c867675bd8ff976eb92d4251f13a1 Author: Dmitry Osipenko Date: Mon Oct 17 20:22:29 2022 +0300 dma-buf: Remove obsoleted internal lock The internal dma-buf lock isn't needed anymore because the updated locking specification claims that dma-buf reservation must be locked by importers, and thus, the internal data is already protected by the reservation lock. Remove the obsoleted internal lock. Acked-by: Sumit Semwal Acked-by: Christian König Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-22-dmitry.osipenko@collabora.com drivers/dma-buf/dma-buf.c | 14 ++++---------- include/linux/dma-buf.h | 9 --------- 2 files changed, 4 insertions(+), 19 deletions(-) commit 23543b3c4f7fe4ee03d624d0584ec8429d4e7a15 Author: Dmitry Osipenko Date: Mon Oct 17 20:22:28 2022 +0300 media: videobuf2: Stop using internal dma-buf lock All drivers that use dma-bufs have been moved to the updated locking specification and now dma-buf reservation is guaranteed to be locked by importers during the mapping operations. There is no need to take the internal dma-buf lock anymore. Remove locking from the videobuf2 memory allocators. Acked-by: Tomasz Figa Acked-by: Hans Verkuil Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-21-dmitry.osipenko@collabora.com drivers/media/common/videobuf2/videobuf2-dma-contig.c | 11 +---------- drivers/media/common/videobuf2/videobuf2-dma-sg.c | 11 +---------- drivers/media/common/videobuf2/videobuf2-vmalloc.c | 11 +---------- 3 files changed, 3 insertions(+), 30 deletions(-) commit ae2e7f28a170c01fdea420f1284e2f163198c9aa Author: Dmitry Osipenko Date: Mon Oct 17 20:22:27 2022 +0300 dma-buf: Document dynamic locking convention Add documentation for the dynamic locking convention. The documentation tells dma-buf API users when they should take the reservation lock and when not. Acked-by: Sumit Semwal Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-20-dmitry.osipenko@collabora.com Documentation/driver-api/dma-buf.rst | 6 ++++ drivers/dma-buf/dma-buf.c | 64 ++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) commit d078fd9b8daa282a0c713daa433315940bbf8188 Author: Dmitry Osipenko Date: Mon Oct 17 20:22:26 2022 +0300 dma-buf: Move dma_buf_mmap() to dynamic locking specification Move dma_buf_mmap() function to the dynamic locking specification by taking the reservation lock. Neither of the today's drivers take the reservation lock within the mmap() callback, hence it's safe to enforce the locking. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-19-dmitry.osipenko@collabora.com drivers/dma-buf/dma-buf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 47e982d5195d76c621d21d2f1911159175d0839e Author: Dmitry Osipenko Date: Mon Oct 17 20:22:25 2022 +0300 dma-buf: Move dma_buf_map_attachment() to dynamic locking specification Move dma-buf attachment mapping functions to the dynamic locking specification by asserting that the reservation lock is held. Acked-by: Sumit Semwal Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-18-dmitry.osipenko@collabora.com drivers/dma-buf/dma-buf.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 809d9c72c2f83ef7225379908e125eb4b662232c Author: Dmitry Osipenko Date: Mon Oct 17 20:22:24 2022 +0300 dma-buf: Move dma_buf_attach() to dynamic locking specification Move dma-buf attachment API functions to the dynamic locking specification by taking the reservation lock around the mapping operations. The strict locking convention prevents deadlock situations for dma-buf importers and exporters. Acked-by: Sumit Semwal Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-17-dmitry.osipenko@collabora.com drivers/dma-buf/dma-buf.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 34c7797f9ef498e722dfaebf2a35b75d70d8cf64 Author: Dmitry Osipenko Date: Mon Oct 17 20:22:23 2022 +0300 dma-buf: Move dma_buf_vmap() to dynamic locking specification Move dma_buf_vmap/vunmap() functions to the dynamic locking specification by asserting that the reservation lock is held. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-16-dmitry.osipenko@collabora.com drivers/dma-buf/dma-buf.c | 4 ++++ 1 file changed, 4 insertions(+) commit 50f0ddcdee2db940d5c4ebc2fdc3c06d703e14fc Author: Dmitry Osipenko Date: Mon Oct 17 20:22:22 2022 +0300 media: tegra-vde: Prepare to dynamic dma-buf locking specification Prepare Tegra video decoder driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-15-dmitry.osipenko@collabora.com drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a26ee3b71896d4e0d52d866fd16cc42da7106e6f Author: Dmitry Osipenko Date: Mon Oct 17 20:22:21 2022 +0300 media: videobuf2: Prepare to dynamic dma-buf locking specification Prepare V4L2 memory allocators to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Tomasz Figa Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-14-dmitry.osipenko@collabora.com drivers/media/common/videobuf2/videobuf2-dma-contig.c | 11 ++++++----- drivers/media/common/videobuf2/videobuf2-dma-sg.c | 8 ++++---- drivers/media/common/videobuf2/videobuf2-vmalloc.c | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) commit e841ad86e7bffc865f5e7a96c36006c49489c675 Author: Dmitry Osipenko Date: Mon Oct 17 20:22:20 2022 +0300 xen/gntdev: Prepare to dynamic dma-buf locking specification Prepare gntdev driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Juergen Gross Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-13-dmitry.osipenko@collabora.com drivers/xen/gntdev-dmabuf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7475f7248ebaf1cd29d6cb21b4523bfcc30eb332 Author: Luca Weiss Date: Sat Sep 24 16:51:25 2022 +0200 ARM: dts: qcom: fix node name for rpm-msg-ram Adjust the name to match the bindings and fix the following validation error: /arch/arm/boot/dts/qcom-apq8026-huawei-sturgeon.dtb: memory@fc428000: $nodename:0: 'memory@fc428000' does not match '^sram(@.*)?' From schema: /Documentation/devicetree/bindings/sram/sram.yaml Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924145126.24978-1-luca@z3ntu.xyz arch/arm/boot/dts/qcom-apq8084.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8226.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 791da5c7fedbc1d662445ec030d8f86872f6184c Author: Dmitry Osipenko Date: Mon Oct 17 20:22:19 2022 +0300 misc: fastrpc: Prepare to dynamic dma-buf locking specification Prepare fastrpc to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Acked-by: Srinivas Kandagatla Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-12-dmitry.osipenko@collabora.com drivers/misc/fastrpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 21c9c5c0784f1b5e9c9e61dece97f3f97956e5f6 Author: Dmitry Osipenko Date: Mon Oct 17 20:22:18 2022 +0300 RDMA/umem: Prepare to dynamic dma-buf locking specification Prepare InfiniBand drivers to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Jason Gunthorpe Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-11-dmitry.osipenko@collabora.com drivers/infiniband/core/umem_dmabuf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 03a75fd6c6282b4e5aafa87e5ae52dd02868829a Author: Dmitry Osipenko Date: Mon Oct 17 20:22:17 2022 +0300 drm/etnaviv: Prepare to dynamic dma-buf locking specification Prepare Etnaviv driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-10-dmitry.osipenko@collabora.com drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f66d48c8cc8d996cf10ca9d2ec0d27bb1754dc13 Author: Dmitry Osipenko Date: Mon Oct 17 20:22:16 2022 +0300 drm/tegra: Prepare to dynamic dma-buf locking specification Prepare Tegra DRM driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-9-dmitry.osipenko@collabora.com drivers/gpu/drm/tegra/gem.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 8b0baa8136641c41d02cd6e1b4e701d10f45c88d Author: Dmitry Osipenko Date: Mon Oct 17 20:22:15 2022 +0300 drm/omapdrm: Prepare to dynamic dma-buf locking specification Prepare OMAP DRM driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-8-dmitry.osipenko@collabora.com drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f2d8e15ba18b708ab937b31f4af39ebd804eef1b Author: Dmitry Osipenko Date: Mon Oct 17 20:22:14 2022 +0300 drm/i915: Prepare to dynamic dma-buf locking specification Prepare i915 driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions and handling cases where importer now holds the reservation lock. Acked-by: Christian König Reviewed-by: Michael J. Ruhl Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-7-dmitry.osipenko@collabora.com drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_object.c | 14 ++++++++++++++ drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 16 ++++++++-------- 3 files changed, 23 insertions(+), 9 deletions(-) commit e4ea542846d0ef2127d4feb75b7de78ab1266ead Author: Dmitry Osipenko Date: Mon Oct 17 20:22:13 2022 +0300 drm/armada: Prepare to dynamic dma-buf locking specification Prepare Armada driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-6-dmitry.osipenko@collabora.com drivers/gpu/drm/armada/armada_gem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ac530e0b1fc0fc69c634f9204b03f5aaccd55355 Author: Dmitry Osipenko Date: Mon Oct 17 20:22:12 2022 +0300 drm/prime: Prepare to dynamic dma-buf locking specification Prepare DRM prime core to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-5-dmitry.osipenko@collabora.com drivers/gpu/drm/drm_prime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 79e2cf2e7a193473dfb0da3b9b869682b43dc60f Author: Dmitry Osipenko Date: Mon Oct 17 20:22:11 2022 +0300 drm/gem: Take reservation lock for vmap/vunmap operations The new common dma-buf locking convention will require buffer importers to hold the reservation lock around mapping operations. Make DRM GEM core to take the lock around the vmapping operations and update DRM drivers to use the locked functions for the case where DRM core now holds the lock. This patch prepares DRM core and drivers to the common dynamic dma-buf locking convention. Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-4-dmitry.osipenko@collabora.com drivers/gpu/drm/drm_client.c | 4 ++-- drivers/gpu/drm/drm_gem.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/drm_gem_dma_helper.c | 6 +++--- drivers/gpu/drm/drm_gem_framebuffer_helper.c | 6 +++--- drivers/gpu/drm/drm_gem_ttm_helper.c | 9 +-------- drivers/gpu/drm/lima/lima_sched.c | 4 ++-- drivers/gpu/drm/panfrost/panfrost_dump.c | 4 ++-- drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 6 +++--- drivers/gpu/drm/qxl/qxl_object.c | 17 +++++++++-------- drivers/gpu/drm/qxl/qxl_prime.c | 4 ++-- include/drm/drm_gem.h | 3 +++ 11 files changed, 54 insertions(+), 33 deletions(-) commit 19d6634d8789573a9212ce78dbb4348ffd4f7f78 Author: Dmitry Osipenko Date: Mon Oct 17 20:22:10 2022 +0300 dma-buf: Add unlocked variant of attachment-mapping functions Add unlocked variant of dma_buf_map/unmap_attachment() that will be used by drivers that don't take the reservation lock explicitly. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-3-dmitry.osipenko@collabora.com drivers/dma-buf/dma-buf.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/dma-buf.h | 6 ++++++ 2 files changed, 59 insertions(+) commit 56e5abba8c3ec5c6098007693f9cefafaa2aa010 Author: Dmitry Osipenko Date: Mon Oct 17 20:22:09 2022 +0300 dma-buf: Add unlocked variant of vmapping functions Add unlocked variant of dma_buf_vmap/vunmap() that will be utilized by drivers that don't take the reservation lock explicitly. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-2-dmitry.osipenko@collabora.com drivers/dma-buf/dma-buf.c | 43 +++++++++++++++++++++++++++++++++++++++++++ include/linux/dma-buf.h | 2 ++ 2 files changed, 45 insertions(+) commit 798e65cdd910a59a34de365ff9e00c186fb568b4 Author: Dmitry Baryshkov Date: Sat Sep 24 12:01:01 2022 +0300 ARM: dts: qcom-msm8974: change DSI PHY node name to generic one Change DSI PHY node names from custom 'dsi-phy' to the generic 'phy'. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924090108.166934-3-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf6cea98662dc9ecf7707076b10499785870ff23 Author: Dmitry Baryshkov Date: Sat Sep 24 12:01:00 2022 +0300 ARM: dts: qcom-apq8064: change DSI PHY node name to generic one Change DSI PHY node names from custom 'dsi-phy' to the generic 'phy'. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220924090108.166934-2-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65eed754c9bf211c81007cb9a87526669274742f Author: Krzysztof Kozlowski Date: Tue Sep 20 17:04:14 2022 +0200 ARM: dts: qcom: msm8974: switch TCSR mutex to MMIO The TCSR mutex bindings allow device to be described only with address space (so it uses MMIO, not syscon regmap). This seems reasonable, as TCSR mutex is actually a dedicated IO address space, and it also fixes DT schema checks: qcom-msm8974-sony-xperia-rhine-amami.dtb: tcsr-mutex: 'reg' is a required property qcom-msm8974-sony-xperia-rhine-amami.dtb: tcsr-mutex: 'syscon' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Tested-by: Luca Weiss # fairphone-fp2 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220920150414.637634-4-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-msm8974.dtsi | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 118fa7657c29c5308268fe813c1fe6c763e56da3 Author: Krzysztof Kozlowski Date: Tue Sep 20 17:04:13 2022 +0200 ARM: dts: qcom: msm8974: add missing TCSR syscon compatible TCSR syscon node should come with dedicated compatible. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Tested-by: Luca Weiss # fairphone-fp2 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220920150414.637634-3-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58504acd918320f28dd02f265bd0adda680b2cfa Author: Liu Shixin Date: Mon Sep 26 21:00:25 2022 +0800 memory: tegra186-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220926130025.1061373-5-liushixin2@huawei.com drivers/memory/tegra/tegra186-emc.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 47f377856f522077a2cf92e0a839d874374b94d4 Author: Liu Shixin Date: Mon Sep 26 21:00:24 2022 +0800 memory: tegra210-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220926130025.1061373-4-liushixin2@huawei.com drivers/memory/tegra/tegra210-emc-core.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 43fe67a3d14d31638e6c04ed95407bc7e4becb87 Author: Liu Shixin Date: Mon Sep 26 21:00:23 2022 +0800 memory: tegra30-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220926130025.1061373-3-liushixin2@huawei.com drivers/memory/tegra/tegra30-emc.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit c83856405e54bd83dff8f5a38560735e6f3707de Author: Liu Shixin Date: Mon Sep 26 21:00:22 2022 +0800 memory: tegra20-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220926130025.1061373-2-liushixin2@huawei.com drivers/memory/tegra/tegra20-emc.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 97c742d92f3b11353842c1fcb67e9811cc17bde3 Author: Marek Vasut Date: Tue Sep 27 00:20:03 2022 +0200 dt-bindings: memory-controller: st,stm32: Fix st,fmc2_ebi-cs-write-address-setup-ns The property st,fmc2_ebi-cs-write-address-setup-ns should really be st,fmc2-ebi-cs-write-address-setup-ns (there is underscore _ between fmc2 and ebi and there should be a dash - instead). This is a remnant from conversion of old non-upstream bindings. Fix it. Signed-off-by: Marek Vasut Acked-by: Rob Herring Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220926222003.527171-1-marex@denx.de .../devicetree/bindings/memory-controllers/st,stm32-fmc2-ebi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fec7d99239cfae22ab80423dbc86ec36b71772d4 Author: Krzysztof Kozlowski Date: Wed Aug 10 14:11:31 2022 +0300 ARM: dts: sunplus: sp7021: drop incorrect spi-max-frequency spi-max-frequency is a property of a SPI slave device, not controller: sunplus-sp7021-demo-v3.dtb: spi@f480: Unevaluated properties are not allowed ('spi-max-frequency' was unexpected) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220810111131.281262-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/sunplus-sp7021.dtsi | 3 --- 1 file changed, 3 deletions(-) commit a014f0ecddc458d91f038efddcd5e55f951c8580 Author: Krzysztof Kozlowski Date: Wed Aug 10 16:02:12 2022 +0300 ARM: dts: am335x: drop panel endpoint unit address The endpoint in panel port node should not have unit address: am335x-evmsk.dtb: panel: port:endpoint@0: 'reg' is a required property Signed-off-by: Krzysztof Kozlowski Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20220810130212.400371-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/am335x-evm.dts | 2 +- arch/arm/boot/dts/am335x-evmsk.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 93e948da390a75eee30be8fb8cb1945c65c933d0 Author: Krzysztof Kozlowski Date: Thu Sep 8 10:09:36 2022 +0200 ARM: dts: qcom: use generic node name "gpio" in SPMI PMIC GPIO controller nodes are named by convention just "gpio", not "gpios". Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220908080938.29199-1-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-pm8941.dtsi | 2 +- arch/arm/boot/dts/qcom-pma8084.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0b01159afd5a0b782610fc113c4d8c0594b6e43d Author: Bryan O'Donoghue Date: Wed Sep 7 01:00:57 2022 +0100 ARM: dts: qcom: msm8974: Drop redundant phy-names from DSI controller phy-names has been marked deprecated. Remove it from the msm8974 DSI controller block. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220907000105.786265-4-bryan.odonoghue@linaro.org arch/arm/boot/dts/qcom-msm8974.dtsi | 1 - 1 file changed, 1 deletion(-) commit 645953bae8ae89e072af3b78bd648c0035d806c0 Author: Bryan O'Donoghue Date: Wed Sep 7 01:00:56 2022 +0100 ARM: dts: qcom: apq8064: Drop redundant phy-names from DSI controller phy-names has been marked deprecated. Remove it from the apq8064 DSI controller block. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220907000105.786265-3-bryan.odonoghue@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 1 - 1 file changed, 1 deletion(-) commit b3372fa74d2a7f840bea706607ee2224dfd24039 Author: Hamza Mahfooz Date: Fri Oct 14 10:29:46 2022 -0400 drm/amd/display: add an ASSERT() to irq service functions Currently, if we encounter unimplemented functions, it is difficult to tell what caused them just by looking at dmesg and that is compounded by the fact that it is often hard to reproduce said issues, for instance we have had reports of this condition being triggered when removing a secondary display that is setup in mirror mode and is connected using usb-c. So, to have access to more detailed debugging information, add an ASSERT() to dal_irq_service_ack() and dal_irq_service_set() that only triggers when we encounter an unimplemented function. Reviewed-by: Harry Wentland Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit e299b00adf3d4505132e624894f549422ad05eeb Author: Nathan Chancellor Date: Mon Oct 17 09:28:38 2022 -0700 drm/amdkfd: Fix type of reset_type parameter in hqd_destroy() callback When booting a kernel compiled with CONFIG_CFI_CLANG on a machine with an RX 6700 XT, there is a CFI failure in kfd_destroy_mqd_cp(): [ 12.894543] CFI failure at kfd_destroy_mqd_cp+0x2a/0x40 [amdgpu] (target: hqd_destroy_v10_3+0x0/0x260 [amdgpu]; expected type: 0x8594d794) Clang's kernel Control Flow Integrity (kCFI) makes sure that all indirect call targets have a type that exactly matches the function pointer prototype. In this case, hqd_destroy()'s third parameter, reset_type, should have a type of 'uint32_t' but every implementation of this callback has a third parameter type of 'enum kfd_preempt_type'. Update the function pointer prototype to match reality so that there is no more CFI violation. Link: https://github.com/ClangBuiltLinux/linux/issues/1738 Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a2c554262d39f81be7422fd8bee2f2fe3779f7f5 Author: Fabio M. De Francesco Date: Sun Oct 16 19:41:58 2022 +0200 drm/amd/amdgpu: 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 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 are still valid. Since its use in amdgpu/amdgpu_ttm.c is safe, it should be preferred. Therefore, replace kmap() with kmap_local_page() in amdgpu/amdgpu_ttm.c. Suggested-by: Ira Weiny Acked-by: Christian König Signed-off-by: Fabio M. De Francesco Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cdabbde1ed262090bff45929e1f5c1153ba5003e Author: Fabio M. De Francesco Date: Thu Oct 13 23:07:14 2022 +0200 drm/radeon: 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 radeon_ttm_gtt_read(). Cc: "Venkataramanan, Anirudh" Reviewed-by: Kees Cook Reviewed-by: Christian König Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45950d88709ce1cd77756aec2e78b2b8dfc58894 Author: Guenter Roeck Date: Thu Oct 13 11:25:23 2022 -0700 drm/amd/display: Increase frame size limit for display_mode_vba_util_32.o Building 32-bit images may fail with the following error. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c: In function ‘dml32_UseMinimumDCFCLK’: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:3142:1: error: the frame size of 1096 bytes is larger than 1024 bytes This is seen when building i386:allmodconfig with any of the following compilers. gcc (Debian 12.2.0-3) 12.2.0 gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 The problem is not seen if the compiler supports GCC_PLUGIN_LATENT_ENTROPY because in that case CONFIG_FRAME_WARN is already set to 2048 even for 32-bit builds. dml32_UseMinimumDCFCLK() was introduced with commit dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321"). It declares a large number of local variables. Increase the frame size for the affected file to 2048, similar to other files in the same directory, to enable 32-bit build tests with affected compilers. Fixes: dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321") Cc: Aurabindo Pillai Reported-by: Łukasz Bartosik Signed-off-by: Guenter Roeck Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c0ca748205dc815505c6de79ecf565953390b66 Author: Hawking Zhang Date: Fri Oct 14 15:17:43 2022 +0800 drm/amdgpu: move convert_error_address out of umc_ras RAS error address translation algorithm is common across dGPU and A + A platform as along as the SOC integrates the same generation of UMC IP. UMC RAS is managed by x86 MCA on A + A platform, umc_ras in GPU driver is not initialized at all on A + A platform. In such case, any umc_ras callback implemented for dGPU config shouldn't be invoked from A + A specific callback. The change moves convert_error_address out of dGPU umc_ras structure and makes it share between A + A and dGPU config. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 3 --- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 7 +++---- drivers/gpu/drm/amd/amdgpu/umc_v6_7.h | 4 +++- 4 files changed, 18 insertions(+), 12 deletions(-) commit 027bf0cee89a27325a9a4f2240c21dd5fb81e4fa Author: Tim Huang Date: Thu Sep 29 15:06:47 2022 +0800 drm/amd/pm: add SMU IP v13.0.4 IF version define to V7 The pmfw has changed the driver interface version, so keep same with the fw. Signed-off-by: Tim Huang Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1bb3afc0527ab55d118852b398fd0f1d2fe802d Author: Tim Huang Date: Thu Sep 29 14:39:21 2022 +0800 drm/amd/pm: update SMU IP v13.0.4 driver interface version Update the SMU driver interface version to V7. Signed-off-by: Tim Huang Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x .../amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_4.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 5af392a89bd009aced92e9079589bd82f249010a Author: ZhenGuo Yin Date: Wed Oct 12 16:54:38 2022 +0800 drm/amd/pm: Init pm_attr_list when dpm is disabled [Why] In SRIOV multi-vf, dpm is always disabled, and pm_attr_list won't be initialized. There will be a NULL pointer call trace after removing the dpm check condition in amdgpu_pm_sysfs_fini. BUG: kernel NULL pointer dereference, address: 0000000000000000 RIP: 0010:amdgpu_device_attr_remove_groups+0x20/0x90 [amdgpu] Call Trace: amdgpu_pm_sysfs_fini+0x2f/0x40 [amdgpu] amdgpu_device_fini_hw+0xdf/0x290 [amdgpu] [How] List pm_attr_list should be initialized when dpm is disabled. Fixes: a6ad27cec585fe ("drm/amd/pm: Remove redundant check condition") Signed-off-by: ZhenGuo Yin Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b31d6ada8346574ce04656e5ce9676ec763f5144 Author: Evan Quan Date: Thu Sep 29 10:50:44 2022 +0800 drm/amd/pm: disable cstate feature for gpu reset scenario Suggested by PMFW team and same as what did for gfxoff feature. This can address some Mode1Reset failures observed on SMU13.0.0. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++ drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 8 ++++++++ drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 9 +++++++++ 3 files changed, 25 insertions(+) commit 3cf377ee8df7dc4ae5e543c37833ae5a5b2a78d3 Author: Evan Quan Date: Thu Sep 29 10:30:01 2022 +0800 drm/amd/pm: fulfill SMU13.0.7 cstate control interface Fulfill the functionality for cstate control. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c6863be231791fa80dca203b9295780488671195 Author: Evan Quan Date: Thu Sep 29 10:24:51 2022 +0800 drm/amd/pm: fulfill SMU13.0.0 cstate control interface Fulfill the functionality for cstate control. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 82835055c62fa49b50dc00736743e8f99ed93638 Author: YiPeng Chai Date: Wed Sep 28 15:52:02 2022 +0800 drm/amdgpu: Add sriov vf ras support in amdgpu_ras_asic_supported V2: Add sriov vf ras support in amdgpu_ras_asic_supported. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 073285efde229ae82d3b853c7f4bcca81f97a55f Author: YiPeng Chai Date: Tue Sep 27 14:06:42 2022 +0800 drm/amdgpu: Enable ras support for mp0 v13_0_0 and v13_0_10 V1: Enable ras support for CHIP_IP_DISCOVERY asic type. V2: 1. Change commit comment. 2. Enable ras support for mp0 v13_0_0 and v13_0_10. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2e26bf1e461fb934cbd5e34142068705ceba1fc1 Author: YiPeng Chai Date: Tue Sep 27 13:16:27 2022 +0800 drm/amdgpu: Enable gmc soft reset on gmc_v11_0_3 Enable gmc soft reset on gmc_v11_0_3. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 1 file changed, 1 insertion(+) commit bbce8cdb8390c4cae8ebe99f13a82c846995e8d9 Author: Likun Gao Date: Mon Jul 25 20:02:40 2022 +0800 drm/amdgpu: skip mes self test for gc 11.0.3 Temporary disable mes self teset for gc 11.0.3. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7faf684b15f5533142ebeed5ec09d5ea9d9239c4 Author: Kenneth Feng Date: Mon Sep 26 17:15:04 2022 +0800 drm/amd/pm: skip loading pptable from driver on secure board for smu_v13_0_10 skip loading pptable from driver on secure board since it's loaded from psp. Signed-off-by: Kenneth Feng Reviewed-by: Guan Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4ecdb30ec49d76ccb803c9b9c1464fcf27d6d041 Author: Kenneth Feng Date: Wed Sep 7 17:05:34 2022 +0800 drm/amd/amdgpu: enable gfx clock gating features on smu_v13_0_10 enable gfx clock gating features on smu_v13_0_10 Signed-off-by: Kenneth Feng Reviewed-by: Jack Gui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/soc21.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit e77422a5d4518109511334e6c2274422fa1559c8 Author: Kenneth Feng Date: Wed Sep 7 15:40:34 2022 +0800 drm/amd/pm: remove the pptable id override on smu_v13_0_10 remove the pptable id override on smu_v13_0_10, and the id is fetched from vbios now. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 --- 1 file changed, 3 deletions(-) commit 8a7b97672dfdb97691dfb15e350b38339f7c69f3 Author: Kenneth Feng Date: Sat Jul 30 10:58:37 2022 +0800 drm/amd/pm: temporarily disable thermal alert on smu_v13_0_10 temporarily disable thermal alert on smu_v13_0_10 due to kfd test fail. will enable it again after confirming the thermal hardware setting. Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e5b781c56d46c44c52caa915f1b65064f2f7c1ba Author: Asher Song Date: Fri Oct 14 11:36:33 2022 +0800 drm/amdgpu: Revert "drm/amdgpu: getting fan speed pwm for vega10 properly" This reverts commit 16fb4dca95daa9d8e037201166a58de8284f4268. Unfortunately, that commit causes fan monitors can't be read and written properly. Fixes: 16fb4dca95daa9 ("drm/amdgpu: getting fan speed pwm for vega10 properly") Signed-off-by: Asher Song Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher .../drm/amd/pm/powerplay/hwmgr/vega10_thermal.c | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) commit 16e311612456df01308585b89227854b1f495041 Author: Victor Zhao Date: Thu Oct 13 15:53:19 2022 +0800 drm/amdgpu: Refactor mode2 reset logic for v11.0.7 - refactor mode2 on v11.0.7 to align with aldebaran - comment out using mode2 reset as default for now, will introduce another controller to replace previous reset_level_mask v2: squash in unused variable removal (Alex) Signed-off-by: Victor Zhao Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit b98a1648d6616d288e888c6dc6dcd4fa543585b3 Author: Victor Zhao Date: Thu Oct 13 11:06:33 2022 +0800 Revert "drm/amdgpu: let mode2 reset fallback to default when failure" This reverts commit dac6b80818ac2353631c5a33d140d8d5508e2957. This commit reverted the AMDGPU_SKIP_MODE2_RESET as it conflicts with the original design of reset handler. Will redesign it. Fixes: dac6b80818ac23 ("drm/amdgpu: let mode2 reset fallback to default when failure") Signed-off-by: Victor Zhao Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +------ drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 6 ------ drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 3 +-- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 1 - drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 1 - drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 1 - 9 files changed, 2 insertions(+), 20 deletions(-) commit 6aa5893926371ebc6c2b6ca6ad37b2aec3a11d29 Author: Victor Zhao Date: Thu Oct 13 10:42:04 2022 +0800 Revert "drm/amdgpu: add debugfs amdgpu_reset_level" This reverts commit 5bd8d53f6fa53eab5433698d1362dae2aa53c1cc. This commit breaks the reset logic for aldebaran, revert it for now. Will move the mask inside the reset handler. Fixes: 5bd8d53f6fa53e ("drm/amdgpu: add debugfs amdgpu_reset_level") Signed-off-by: Victor Zhao Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ---- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 8 -------- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 --- 4 files changed, 17 deletions(-) commit a7310d8de3ba60a6ec4294392daf747b8333b3b2 Author: Danijel Slivka Date: Tue Oct 4 15:39:44 2022 +0200 drm/amdgpu: set vm_update_mode=0 as default for Sienna Cichlid in SRIOV case For asic with VF MMIO access protection avoid using CPU for VM table updates. CPU pagetable updates have issues with HDP flush as VF MMIO access protection blocks write to mmBIF_BX_DEV0_EPF0_VF0_HDP_MEM_COHERENCY_FLUSH_CNTL register during sriov runtime. v3: introduce virtualization capability flag AMDGPU_VF_MMIO_ACCESS_PROTECT which indicates that VF MMIO write access is not allowed in sriov runtime Signed-off-by: Danijel Slivka Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++++- 3 files changed, 15 insertions(+), 1 deletion(-) commit 7fe441d8b77a1e4fe09099092945d27607dda69b Author: Yang Yingliang Date: Wed Oct 12 15:37:07 2022 +0800 drm/amdgpu/si_dma: remove unused variable in si_dma_stop() After commit 571c05365892 ("drm/amdgpu: switch sdma buffer function tear down to a helper"), the variable 'ring' is not used anymore, it can be removed. Signed-off-by: Yang Yingliang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 -- 1 file changed, 2 deletions(-) commit eb1670787eb7b9fe339631605dda1a53603a7699 Author: Alex Deucher Date: Mon Oct 3 15:09:57 2022 -0400 drm/amdgpu: convert amdgpu_amdkfd_gpuvm.c to IP version checks For consistency with the rest of the code. Acked-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 886f1816c2ad9e5bf594549cc4977df7a533dde9 Author: Alex Deucher Date: Mon Oct 3 15:00:47 2022 -0400 drm/amdgpu: convert vega20_ih.c to IP version checks For consistency with newer asics. Acked-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e9ff000b5a2a6b2f34828ebcfb0a829ce2dcdc2a Author: Hawking Zhang Date: Tue Aug 31 15:30:08 2021 +0800 drm/amdgpu: update psp_fw_type enum in amdgpu_ucode header To match with the definition in psp firmware Acked-by: Christian König Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 + 1 file changed, 1 insertion(+) commit 7a94c8602fbe585fac636dae355cf73b53d50866 Author: Hawking Zhang Date: Tue May 17 22:10:41 2022 +0800 drm/amdgpu: extend HWIP_MAX_INSTANCE to 28 more ip instances are available Acked-by: Christian König Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfa8cb055fef348c896b70b9ac13d1838665031a Author: Yifan Zhang Date: Sun Oct 9 14:37:06 2022 +0800 drm/amdgpu: allow secure submission on gfx11 and sdma6 This patch to allow secure submission on gfx11 and sdma6. Signed-off-by: Yifan Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 1 + 2 files changed, 2 insertions(+) commit 97074216917b4188f0af3e52cc5b3f2b277bbbca Author: Yifan Zhang Date: Sun Oct 9 14:35:20 2022 +0800 drm/amdgpu: add tmz support for GC 11.0.1 this patch to add tmz support for GC 11.0.1. Signed-off-by: Yifan Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 + 1 file changed, 1 insertion(+) commit 19f7ad36ab7e5273a59d3e4e906e5e940a4733a8 Author: Neil Armstrong Date: Mon Oct 17 12:23:05 2022 +0200 dt-bindings: pinctrl: convert qcom,mdm9615-pinctrl.txt to dt-schema Convert the MDM9515 pinctrl bindings to dt-schema. Keep the parsing of pin configuration subnodes consistent with other Qualcomm schemas (children named with '-state' suffix, optional children with '-pins'). Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20221005-mdm9615-pinctrl-yaml-v2-1-639fe67a04be@linaro.org [krzk: drop function from required] Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,mdm9615-pinctrl.txt | 161 --------------------- .../bindings/pinctrl/qcom,mdm9615-pinctrl.yaml | 119 +++++++++++++++ 2 files changed, 119 insertions(+), 161 deletions(-) commit eaabee88a88a26b108be8d120fc072dfaf462cef Author: Rahul Tanwar Date: Thu Oct 13 14:48:31 2022 +0800 clk: mxl: Remove redundant spinlocks Patch 1/4 of this patch series switches from direct readl/writel based register access to regmap based register access. Instead of using direct readl/writel, regmap API's are used to read, write & read-modify-write clk registers. Regmap API's already use their own spinlocks to serialize the register accesses across multiple cores in which case additional driver spinlocks becomes redundant. Hence, remove redundant spinlocks from driver in this patch 2/4. Reviewed-by: Yi xin Zhu Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/a8a02c8773b88924503a9fdaacd37dd2e6488bf3.1665642720.git.rtanwar@maxlinear.com Signed-off-by: Stephen Boyd drivers/clk/x86/clk-cgu-pll.c | 13 ------- drivers/clk/x86/clk-cgu.c | 80 +++++-------------------------------------- drivers/clk/x86/clk-cgu.h | 6 ---- drivers/clk/x86/clk-lgm.c | 1 - 4 files changed, 9 insertions(+), 91 deletions(-) commit 036177310bac5534de44ff6a7b60a4d2c0b6567c Author: Rahul Tanwar Date: Thu Oct 13 14:48:30 2022 +0800 clk: mxl: Switch from direct readl/writel based IO to regmap based IO Earlier version of driver used direct io remapped register read writes using readl/writel. But we need secure boot access which is only possible when registers are read & written using regmap. This is because the security bus/hook is written & coupled only with regmap layer. Switch the driver from direct readl/writel based register accesses to regmap based register accesses. Additionally, update the license headers to latest status. Reviewed-by: Yi xin Zhu Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/2610331918206e0e3bd18babb39393a558fb34f9.1665642720.git.rtanwar@maxlinear.com Signed-off-by: Stephen Boyd drivers/clk/x86/Kconfig | 5 +++-- drivers/clk/x86/clk-cgu-pll.c | 10 ++++++---- drivers/clk/x86/clk-cgu.c | 5 +++-- drivers/clk/x86/clk-cgu.h | 38 +++++++++++++++++++++----------------- drivers/clk/x86/clk-lgm.c | 13 +++++++++---- 5 files changed, 42 insertions(+), 29 deletions(-) commit b136468a0024ea90c1259767c732eed12ce6edba Author: Corentin Labbe Date: Tue Sep 27 07:55:04 2022 +0000 clk: rockchip: use proper crypto0 name on rk3399 RK3399 has 2 crypto instance, named crypto0 and crypto1 in the TRM. Only reset for crypto1 is correctly named, but crypto0 is not. Since nobody use them, add a 0 to be consistent with the TRM and crypto1 entries. Acked-by: Rob Herring Signed-off-by: Corentin Labbe Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20220927075511.3147847-27-clabbe@baylibre.com Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3399-cru.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 21f213e67ecb7488c0fda145d7956e09ecdd43a9 Author: Daniele Ceraolo Spurio Date: Thu Oct 13 13:32:45 2022 -0700 drm/i915/huc: bump timeout for delayed load and reduce print verbosity We're observing sporadic HuC delayed load timeouts in CI, due to mei_pxp binding completing later than we expected. HuC is still loaded when the bind occurs, but in the meantime i915 has started allowing submission to the VCS engines even if HuC is not there. In most of the cases I've observed, the timeout was due to the init/resume of another driver between i915 and mei hitting errors and thus adding an extra delay, but HuC was still loaded before userspace could submit, because the whole resume process time was increased by the delays. Given that there is no upper bound to the delay that can be introduced by other drivers, I've reached the following compromise with the media team: 1) i915 is going to bump the timeout to 5s, to reduce the probability of reaching it. We still expect HuC to be loaded before userspace starts submitting, so increasing the timeout should have no impact on normal operations, but in case something weird happens we don't want to stall video submissions for too long. 2) The media driver will cope with the failing submissions that manage to go through between i915 init/resume complete and HuC loading, if any ever happen. This could cause a small corruption of video playback immediately after a resume (we should be safe on boot because the media driver polls the HUC_STATUS ioctl before starting submissions). Since we're accepting the timeout as a valid outcome, I'm also reducing the print verbosity from error to notice. v2: use separate prints for MEI GSC and MEI PXP init timeouts (John) v3: add MISSING_CASE to the if-else chain (John) References: https://gitlab.freedesktop.org/drm/intel/-/issues/7033 Fixes: 27536e03271d ("drm/i915/huc: track delayed HuC load with a fence") Signed-off-by: Daniele Ceraolo Spurio Cc: Tony Ye Cc: John Harrison Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221013203245.1801788-1-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_huc.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 847eec69f01a28ca44f5ac7e1d71d3a60263d680 Author: José Roberto de Souza Date: Mon Oct 17 06:24:32 2022 -0700 drm/i915: Extend Wa_1607297627 to Alderlake-P Workaround 1607297627 was missed for Alderlake-P, so here extending it to it and adding the fixes tag so this WA is backported to all stable kernels. v2: - fixed subject - added Fixes tag BSpec: 54369 Cc: # v5.17+ Fixes: dfb924e33927 ("drm/i915/adlp: Remove require_force_probe protection") Reviewed-by: Lucas De Marchi Cc: Tvrtko Ursulin Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20221017132432.112850-1-jose.souza@intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e0d8259355cb846f9cf2e38f6ba3430aecb9ebcc Author: Paul Moore Date: Thu Sep 22 21:50:22 2022 -0400 selinux: increase the deprecation sleep for checkreqprot and runtime disable Further the checkreqprot and runtime disable deprecation efforts by increasing the sleep time from 5 to 15 seconds to help make this more noticeable for any users who are still using these knobs. Acked-by: Casey Schaufler Signed-off-by: Paul Moore security/selinux/selinuxfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8bd4da0f0626ae9a82099d3d99cd6efd4355879b Author: Kees Cook Date: Tue Oct 11 13:01:10 2022 -0700 pstore/ram: Move internal definitions out of kernel-wide include Most of the details of the ram backend are entirely internal to the backend itself. Leave only what is needed to instantiate a ram backend in the kernel-wide header. Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Signed-off-by: Kees Cook Reviewed-and-tested-by: Guilherme G. Piccoli Link: https://lore.kernel.org/r/20221011200112.731334-4-keescook@chromium.org fs/pstore/ram.c | 3 +- fs/pstore/ram_core.c | 3 +- fs/pstore/ram_internal.h | 98 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/pstore_ram.h | 99 ---------------------------------------------- 4 files changed, 102 insertions(+), 101 deletions(-) commit 6daf4e82bd54ef004ace4dd6deed60a32c282a95 Author: Kees Cook Date: Tue Oct 11 13:01:09 2022 -0700 pstore/ram: Move pmsg init earlier Since the ftrace area can vary in size based on CPU count, move pmsg initialization earlier so it will have a stable location. Suggested-by: Paramjit Oberoi Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Signed-off-by: Kees Cook Reviewed: Guilherme G. Piccoli Link: https://lore.kernel.org/r/20221011200112.731334-3-keescook@chromium.org fs/pstore/ram.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3219122b8cdd580f0793e803d4e80ecd7384cf17 Author: Kees Cook Date: Tue Oct 11 13:01:08 2022 -0700 pstore/ram: Consolidate kfree() paths There's no reason to keep separate kfree() paths: either all allocations succeeded, or not. Everything is torn down in the case of failure, so adjust the callers to reflect this. Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Signed-off-by: Kees Cook Reviewed-and-tested-by: Guilherme G. Piccoli Link: https://lore.kernel.org/r/20221011200112.731334-2-keescook@chromium.org fs/pstore/ram.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 893c5f1de620fb0134ddef37dfd850f6c639162b Author: Guilherme G. Piccoli Date: Thu Oct 6 19:42:11 2022 -0300 efi: pstore: Follow convention for the efi-pstore backend name For some reason, the efi-pstore backend name (exposed through the pstore infrastructure) is hardcoded as "efi", whereas all the other backends follow a kind of convention in using the module name. Let's do it here as well, to make user's life easier (they might use this info for unloading the module backend, for example). Cc: Ard Biesheuvel Signed-off-by: Guilherme G. Piccoli Acked-by: Ard Biesheuvel Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221006224212.569555-8-gpiccoli@igalia.com drivers/firmware/efi/efi-pstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a14f1982e6b476c84938c9ca011d258a6bba24d Author: Guilherme G. Piccoli Date: Thu Oct 6 19:42:07 2022 -0300 pstore: Inform unregistered backend names as well Currently we only show the registered ones in the kernel log; users that change backend for some reason require first to unregister the current one, so let's confirm this operation with a message in the log. Signed-off-by: Guilherme G. Piccoli Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221006224212.569555-4-gpiccoli@igalia.com fs/pstore/platform.c | 2 ++ 1 file changed, 2 insertions(+) commit 8f5de3fd38b7e64112017bb1630f9df6e1b3331d Author: Guilherme G. Piccoli Date: Thu Oct 6 19:42:06 2022 -0300 pstore: Expose kmsg_bytes as a module parameter Currently this tuning is only exposed as a filesystem option, but most Linux distros automatically mount pstore, hence changing this setting requires remounting it. Also, if that mount option wasn't explicitly set it doesn't show up in mount information, so users cannot check what is the current value of kmsg_bytes. Let's then expose it as a module parameter, allowing both user visibility at all times (even if not manually set) and also the possibility of setting that as a boot/module parameter. Signed-off-by: Guilherme G. Piccoli Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221006224212.569555-3-gpiccoli@igalia.com fs/pstore/platform.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d85644dc5cf4023bf1a325f476d58a16bcc0798b Author: Guilherme G. Piccoli Date: Thu Oct 6 19:42:05 2022 -0300 pstore: Improve error reporting in case of backend overlap The pstore infrastructure supports one single backend at a time; trying to load a another backend causes an error and displays a message, introduced on commit 0d7cd09a3dbb ("pstore: Improve register_pstore() error reporting"). Happens that this message is not really clear about the situation, also the current error returned (-EPERM) isn't accurate, whereas -EBUSY makes more sense. We have another place in the code that relies in the -EBUSY return for a similar check. So, make it consistent here by returning -EBUSY and using a similar message in both scenarios. Signed-off-by: Guilherme G. Piccoli Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20221006224212.569555-2-gpiccoli@igalia.com fs/pstore/platform.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 99b3b837855b987563bcfb397cf9ddd88262814b Author: Qiujun Huang Date: Sun Sep 4 23:17:13 2022 +0800 pstore/zone: Use GFP_ATOMIC to allocate zone buffer There is a case found when triggering a panic_on_oom, pstore fails to dump kmsg. Because psz_kmsg_write_record can't get the new buffer. Handle this by using GFP_ATOMIC to allocate a buffer at lower watermark. Signed-off-by: Qiujun Huang Fixes: 335426c6dcdd ("pstore/zone: Provide way to skip "broken" zone for MTD devices") Cc: WeiXiong Liao Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/CAJRQjofRCF7wjrYmw3D7zd5QZnwHQq+F8U-mJDJ6NZ4bddYdLA@mail.gmail.com fs/pstore/zone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 082f9bc60f337fdf4bbb89b5b5d6f8aee9c98d6b Author: Luca Weiss Date: Thu Sep 22 10:29:23 2022 +0200 soc: qcom: spmi-pmic: add more PMIC SUBTYPE IDs Add more IDs that are found in the downstream msm-4.19 kernel under the path include/linux/qpnp/qpnp-revid.h. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Reviewed-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220922082925.17975-2-luca.weiss@fairphone.com include/soc/qcom/qcom-spmi-pmic.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e0b0da53b7bcf4d55ea9506db151b9596703d4e5 Author: Luca Weiss Date: Thu Sep 22 10:29:22 2022 +0200 soc: qcom: spmi-pmic: convert hex numbers to lowercase There are some IDs that are written in uppercase. For consistency convert them to lowercase. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Reviewed-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220922082925.17975-1-luca.weiss@fairphone.com include/soc/qcom/qcom-spmi-pmic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1ae55caf9e93b9b24aab6bc81524bc33f11b3dd9 Author: Dmitry Baryshkov Date: Sun Jul 24 17:04:21 2022 +0300 arm64: dts: qcom: msm8996pro: expand Adreno OPP table There are minor differeces between msm8996 and msm8996pro in terms of GPU frequencies support. For example msm8996pro supports 652.8 MHz frequency for the Adreno. Reclect these differences in msm8996pro.dtsi. Signed-off-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220724140421.1933004-8-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996pro.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 0d440d811e6e2f37093e54db55bc27fe66678170 Author: Dmitry Baryshkov Date: Sun Jul 24 17:04:20 2022 +0300 arm64: dts: qcom: msm8996: fix GPU OPP table Fix Adreno OPP table according to the msm-3.18. Enable 624 MHz for the speed bin 3 and 560 MHz for bins 2 and 3. Fixes: 69cc3114ab0f ("arm64: dts: Add Adreno GPU definitions") Signed-off-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220724140421.1933004-7-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f1646de452ae8a9b858cefc2087c0ab93ac5c0ad Author: Dmitry Baryshkov Date: Sun Jul 24 17:04:19 2022 +0300 arm64: dts: qcom: msm8996: add support for speed bin 3 Add support for msm8996, speed bin 3. It supports full range of frequencies on the power cluster, but is limited to 1.8 GHz on performance cluster. Signed-off-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220724140421.1933004-6-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 74 +++++++++++++++++------------------ 1 file changed, 37 insertions(+), 37 deletions(-) commit 0154caaa2b748e7414a4ec3c6ee60e8f483b2d4f Author: Dmitry Baryshkov Date: Sun Jul 24 17:04:18 2022 +0300 arm64: dts: qcom: msm8996: fix supported-hw in cpufreq OPP tables Adjust MSM8996 cpufreq tables according to tables in msm-3.18. Some of the frequencies are not supported on speed bins other than 0. Also other speed bins support intermediate topmost frequencies, not supported on speed bin 0. Implement all these differencies. Fixes: 90173a954a22 ("arm64: dts: qcom: msm8996: Add CPU opps") Signed-off-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220724140421.1933004-5-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 38 ++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit cea41be7ca66f0cdd0fa8e76ca799eed149d91c3 Author: Yassine Oudjana Date: Sun Jul 24 17:04:17 2022 +0300 arm64: dts: qcom: msm8996-xiaomi-scorpio, natrium: Use MSM8996 Pro The Xiaomi Mi Note 2 has the MSM8996 Pro SoC. Rename the dts to match, include msm8996pro.dtsi, and add the qcom,msm8996pro compatible. To do that, the msm8996.dtsi include in msm8996-xiaomi-common has to be moved to msm8996-xiaomi-gemini, the only device that needs it included after this change. Since MSM8996Pro is largely compatible with MSM8996, keep old compatible too rather than insiting on qcom,msm8996pro only. This allows the code that doesn't yet know about msm8996pro to continue supporting these devices. [DB: Dropped msm-id changes.] Signed-off-by: Yassine Oudjana [DB: Applied the same change to Xiaomi Mi 5s Plus (natrium).] Signed-off-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220724140421.1933004-4-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/Makefile | 4 ++-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 3 --- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 1 + .../{msm8996-xiaomi-natrium.dts => msm8996pro-xiaomi-natrium.dts} | 3 ++- .../{msm8996-xiaomi-scorpio.dts => msm8996pro-xiaomi-scorpio.dts} | 3 ++- 5 files changed, 7 insertions(+), 7 deletions(-) commit 8898c9748a872866f8c2973e719b26bf7c6ab64e Author: Yassine Oudjana Date: Sun Jul 24 17:04:16 2022 +0300 arm64: dts: qcom: msm8996: Add MSM8996 Pro support Qualcomm MSM8996 Pro is a variant of MSM8996 with higher frequencies supported both on CPU and GPU. There are other minor hardware differencies in the CPU and GPU regulators and bus fabrics. However this results in significant differences between 8996 and 8996 Pro CPU OPP tables. Judging from msm-3.18 there are only few common frequencies supported by both msm8996 and msm8996pro. Rather than hacking the tables for msm8996, split msm8996pro support into a separate file. Later this would allow having additional customizations for the CBF, CPR, retulators, etc. [DB: dropped all non-CPU-OPP changes] Fixes: 90173a954a22 ("arm64: dts: qcom: msm8996: Add CPU opps") Signed-off-by: Yassine Oudjana [DB: Realigned supported-hw to keep compat with current cpufreq driver] Signed-off-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220724140421.1933004-3-dmitry.baryshkov@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 82 +++++----- arch/arm64/boot/dts/qcom/msm8996pro.dtsi | 266 +++++++++++++++++++++++++++++++ 2 files changed, 307 insertions(+), 41 deletions(-) commit 358ef0c03e7ce62ab197af02e91b843b92ef4717 Author: Dmitry Baryshkov Date: Sun Jul 24 17:04:15 2022 +0300 dt-bindings: arm: qcom: separate msm8996pro bindings Xiaomi Mi 5s Plus (natrium) and Xiaomi Mi Note 2 (scorpio) use MSM8996Pro rather than plain MSM8996. Describe this in the arm/qcom.yaml bindings. Since MSM8996Pro is largely compatible with MSM8996, keep old compatible too rather than insiting on qcom,msm8996pro only. This allows the code that doesn't yet know about msm8996pro to continue supporting these devices. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220724140421.1933004-2-dmitry.baryshkov@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit dd1651572165ffbe52e3d1aa184c04a9c11d3a03 Author: Judy Hsiao Date: Thu Jul 21 08:38:49 2022 +0000 arm64: dts: qcom: sc7280: Include sc7280-herobrine-audio-rt5682.dtsi in herobrine-r1 Include sc7280-herobrine-audio-rt5682.dtsi in herobrine-r1 as it uses rt5682 codec. Signed-off-by: Judy Hsiao Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220721083849.1571744-4-judyhsiao@chromium.org arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts | 1 + 1 file changed, 1 insertion(+) commit 1c5b7afeaf5b6568dc2f36d444d70ad9f6632582 Author: Judy Hsiao Date: Thu Jul 21 08:38:48 2022 +0000 arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi Audio dtsi for sc7280 boards that using rt5682 headset codec: 1. Add dt nodes for sound card which use I2S playback and record through rt5682s and I2S playback through max98357a. 2. Enable lpass cpu node and add pin control and dai-links. Signed-off-by: Judy Hsiao Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220721083849.1571744-3-judyhsiao@chromium.org .../dts/qcom/sc7280-herobrine-audio-rt5682.dtsi | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) commit a1afae1ac6e71f9995fd87fea3a116859fd64fe1 Author: Judy Hsiao Date: Thu Jul 21 08:38:47 2022 +0000 arm64: dts: qcom: sc7280: herobrine: Add pinconf settings for mi2s1 1. Add drive strength property for mi2s1 on sc7280 based platforms. 2. Disable the pull-up for mi2s1 lines. Signed-off-by: Judy Hsiao Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220721083849.1571744-2-judyhsiao@chromium.org arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 50979953c0c41e929e5f955800da68e1bb24c7ab Author: Ankur Arora Date: Thu Oct 6 17:49:43 2022 -0700 audit: unify audit_filter_{uring(), inode_name(), syscall()} audit_filter_uring(), audit_filter_inode_name() are substantially similar to audit_filter_syscall(). Move the core logic to __audit_filter_op() which can be parametrized for all three. On a Skylakex system, getpid() latency (all results aggregated across 12 boot cycles): Min Mean Median Max pstdev (ns) (ns) (ns) (ns) - 196.63 207.86 206.60 230.98 (+- 3.92%) + 183.73 196.95 192.31 232.49 (+- 6.04%) Performance counter stats for 'bin/getpid' (3 runs) go from: cycles 805.58 ( +- 4.11% ) instructions 1654.11 ( +- .05% ) IPC 2.06 ( +- 3.39% ) branches 430.02 ( +- .05% ) branch-misses 1.55 ( +- 7.09% ) L1-dcache-loads 440.01 ( +- .09% ) L1-dcache-load-misses 9.05 ( +- 74.03% ) to: cycles 765.37 ( +- 6.66% ) instructions 1677.07 ( +- 0.04% ) IPC 2.20 ( +- 5.90% ) branches 431.10 ( +- 0.04% ) branch-misses 1.60 ( +- 11.25% ) L1-dcache-loads 521.04 ( +- 0.05% ) L1-dcache-load-misses 6.92 ( +- 77.60% ) (Both aggregated over 12 boot cycles.) The increased L1-dcache-loads are due to some intermediate values now coming from the stack. The improvement in cycles is due to a slightly denser loop (the list parameter in the list_for_each_entry_rcu() exit check now comes from a register rather than a constant as before.) Signed-off-by: Ankur Arora Signed-off-by: Paul Moore kernel/auditsc.c | 76 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 37 deletions(-) commit 069545997510833281f45f83e097017b9fef19b7 Author: Ankur Arora Date: Tue Sep 27 15:59:42 2022 -0700 audit: cache ctx->major in audit_filter_syscall() ctx->major contains the current syscall number. This is, of course, a constant for the duration of the syscall. Unfortunately, GCC's alias analysis cannot prove that it is not modified via a pointer in the audit_filter_syscall() loop, and so always loads it from memory. In and of itself the load isn't very expensive (ops dependent on the ctx->major load are only used to determine the direction of control flow and have short dependence chains and, in any case the related branches get predicted perfectly in the fastpath) but still cache ctx->major in a local for two reasons: * ctx->major is in the first cacheline of struct audit_context and has similar alignment as audit_entry::list audit_entry. For cases with a lot of audit rules, doing this reduces one source of contention from a potentially busy cache-set. * audit_in_mask() (called in the hot loop in audit_filter_syscall()) does cast manipulation and error checking on ctx->major: audit_in_mask(const struct audit_krule *rule, unsigned long val): if (val > 0xffffffff) return false; word = AUDIT_WORD(val); if (word >= AUDIT_BITMASK_SIZE) return false; bit = AUDIT_BIT(val); return rule->mask[word] & bit; The clauses related to the rule need to be evaluated in the loop, but the rest is unnecessarily re-evaluated for every loop iteration. (Note, however, that most of these are cheap ALU ops and the branches are perfectly predicted. However, see discussion on cycles improvement below for more on why it is still worth hoisting.) On a Skylakex system change in getpid() latency (aggregated over 12 boot cycles): Min Mean Median Max pstdev (ns) (ns) (ns) (ns) - 201.30 216.14 216.22 228.46 (+- 1.45%) + 196.63 207.86 206.60 230.98 (+- 3.92%) Performance counter stats for 'bin/getpid' (3 runs) go from: cycles 836.89 ( +- .80% ) instructions 2000.19 ( +- .03% ) IPC 2.39 ( +- .83% ) branches 430.14 ( +- .03% ) branch-misses 1.48 ( +- 3.37% ) L1-dcache-loads 471.11 ( +- .05% ) L1-dcache-load-misses 7.62 ( +- 46.98% ) to: cycles 805.58 ( +- 4.11% ) instructions 1654.11 ( +- .05% ) IPC 2.06 ( +- 3.39% ) branches 430.02 ( +- .05% ) branch-misses 1.55 ( +- 7.09% ) L1-dcache-loads 440.01 ( +- .09% ) L1-dcache-load-misses 9.05 ( +- 74.03% ) (Both aggregated over 12 boot cycles.) instructions: we reduce around 8 instructions/iteration because some of the computation is now hoisted out of the loop (branch count does not change because GCC, for reasons unclear, only hoists the computations while keeping the basic-blocks.) cycles: improve by about 5% (in aggregate and looking at individual run numbers.) This is likely because we now waste fewer pipeline resources on unnecessary instructions which allows the control flow to speculatively execute further ahead shortening the execution of the loop a little. The final gating factor on the performance of this loop remains the long dependence chain due to the linked-list load. Signed-off-by: Ankur Arora Signed-off-by: Paul Moore kernel/auditsc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 963c336ef8a76b235fea1a77d8d6075f2618de01 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:36 2022 +0300 ARM: dts: qcom: msm8660: drop qcom, prefix from SSBI node name Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-24-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-msm8660.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 621f3a4fe0282d2e60eed4a81e9f9e84b34f18ab Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:35 2022 +0300 ARM: dts: qcom: msm8660: drop unit ids from PMIC nodes On MSM8660 the PMICs are connected using SSBI devices, which do not have any addressing scheme. Drop the unused unit ids from PMIC device nodes. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-23-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-msm8660.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be60ae9be73fb6463a0687d4aa1fb40418faa3b2 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:34 2022 +0300 ARM: dts: qcom: apq8060-dragonboard: use labels to patch device tree Use labels to add device-specific properties to DT nodes rather than duplicating SoC DT structure in the device DT. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-22-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 1774 ++++++++++++------------ arch/arm/boot/dts/qcom-msm8660.dtsi | 51 +- 2 files changed, 911 insertions(+), 914 deletions(-) commit cdaf1f11809257b8c5c1fe417c6e0764721b0cf3 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:33 2022 +0300 ARM: dts: qcom: msm8660: move pm8058 LED devices to the main DT file Declare PM8058 LED devices in the main msm8660 DT file to allow them to be used by other devices. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-21-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 12 ++++-------- arch/arm/boot/dts/qcom-msm8660.dtsi | 26 +++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 9 deletions(-) commit 07573320d7df01914453e52307744f8011e9430e Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:32 2022 +0300 ARM: dts: qcom: msm8960: drop amba device node The separate amba device node doesn't add anything significant to the DT. The OF parsing code already creates amba_device or platform_device depending on the compatibility lists. Drop the amba node and reorder sdcc nodes according to node addresses. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-20-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-msm8960.dtsi | 68 +++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 37 deletions(-) commit e0fec2efd508e57e7370ee1cd89a60217ece5205 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:31 2022 +0300 ARM: dts: qcom: msm8960-cdp: drop unit ids from regulator node Drop the unused unit id from the gpio-regulator node, there is no addessing scheme in the /regulators node. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-19-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-msm8960-cdp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ccc49d643d6d80126e6949def3f63f2586d43d8 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:30 2022 +0300 ARM: dts: qcom: msm8960: drop qcom, prefix from SSBI node name Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-18-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-msm8960.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44c6b2c22bd350b4a2cd93367deed21adc6143c0 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:29 2022 +0300 ARM: dts: qcom: msm8960: drop unit ids from PMIC nodes On MSM8960 the PMICs are connected using SSBI devices, which do not have any addressing scheme. Drop the unused unit ids from PMIC device nodes. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-17-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-msm8960.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8041a9be6f3862062d26d951d9f9c74823a76595 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:28 2022 +0300 ARM: dts: qcom: apq8064: fix the riva-pil node id Fix the address of the riva-pil node. The first region address is 0x3200800, so the node should also be called riva-pil@3200800. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-16-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d36ee0683d86c66b5705de23ab8b3d466671de4f Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:27 2022 +0300 ARM: dts: qcom: apq8064: drop qcom, prefix from SSBI node name Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-15-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db259c5e5a995ed02028615d7d3fa85c7b9ae096 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:26 2022 +0300 ARM: dts: qcom: apq8064: drop unit ids from PMIC nodes On APQ8064 the PMICs are connected using SSBI devices, which do not have any addressing scheme. Drop the unused unit ids from PMIC device nodes. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-14-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 967b4b52bfd1dc1490fa8a38a91df1a30a5c66ca Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:25 2022 +0300 ARM: dts: qcom: apq8064: drop amba device node The separate amba device node doesn't add anything significant to the DT. The OF parsing code already creates amba_device or platform_device depending on the compatibility lists. Drop the amba node and reorder sdcc and sdcc bam nodes according to node addresses. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-13-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 131 +++++++++++++++++------------------- 1 file changed, 62 insertions(+), 69 deletions(-) commit e10c147eb6ad997288b4ff33289791cf167336b6 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:24 2022 +0300 ARM: dts: qcom: apq8064-sony-xperia-lagan-yuga: use labels to patch device tree Use labels to add device-specific properties to DT nodes rather than duplicating SoC DT structure in the device DT. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-12-dmitry.baryshkov@linaro.org .../dts/qcom-apq8064-sony-xperia-lagan-yuga.dts | 649 ++++++++++----------- 1 file changed, 318 insertions(+), 331 deletions(-) commit ab1605f45421a1ef112cc917dab8d3b3367813f8 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:23 2022 +0300 ARM: dts: qcom: apq8064-cm-qs600: pull SDCC pwrseq node up one level There are no need to add additional simple-bus nodes just to populate a single pwrseq device. Pull it up one level into /. While we are at it also fix node name replacing underscore with dash. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-11-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 5586f54d62237580c58ca0d432a9d17c72fb650d Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:22 2022 +0300 ARM: dts: qcom: apq8064-cm-qs600: pull 3p3v regulator from soc node The 3.3V regulator is not part of the SoC, so pull it from the SoC node. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-10-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit efbc351abf4770a84e36b1c58ee76ba1cd699864 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:21 2022 +0300 ARM: dts: qcom: apq8064-cm-qs600: use labels to patch device tree Use labels to add device-specific properties to DT nodes rather than duplicating SoC DT structure in the device DT. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-9-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts | 372 ++++++++++++++-------------- 1 file changed, 183 insertions(+), 189 deletions(-) commit 5998a762981ad77b44d4389b501a7c114d08a65e Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:20 2022 +0300 ARM: dts: qcom: apq8064-nexus7-flo: fix node name for ext 3p3v regulator Rename ext 3p3v regulator node, fixing the 'node has a unit name, but no reg or ranges property' warning. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-8-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2aadb0e9835962fb1d4e0a214293b0592c5e8b70 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:19 2022 +0300 ARM: dts: qcom: apq8064-flo: use labels to patch device tree Use labels to add device-specific properties to DT nodes rather than duplicating SoC DT structure in the device DT. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-7-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 521 ++++++++++----------- 1 file changed, 255 insertions(+), 266 deletions(-) commit 36e9b3420768e2c883eaa443de53df167c589922 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:18 2022 +0300 ARM: dts: qcom: apq8064-ifc6410: pull SDCC pwrseq node up one level There are no need to add additional simple-bus nodes just to populate a single pwrseq device. Pull it up one level into /. While we are at it also fix node name replacing underscore with dash. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-6-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 5564d5337f839a24439dda4dbd9477e52a0eeaf5 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:17 2022 +0300 ARM: dts: qcom: apq8064-ifc6410: fix user1 LED node name There are no address-cells for the gpio-leds child nodes, so rename led@1 node to led-user1. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-5-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 632546ad232761b65ffc8cca5499c6e8b6d67222 Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:16 2022 +0300 ARM: dts: qcom: apq8064-ifc6410: pull ext-3p3v regulator from soc node The ext 3.3V regulator is not part of the SoC, so pull it from the SoC node. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-4-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 3c9c03cf5033f5a7d5f455f1223fa99f43799b1e Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:15 2022 +0300 ARM: dts: qcom: apq8064-ifc6410: use labels to patch device tree Use labels to add device-specific properties to DT nodes rather than duplicating SoC DT structure in the device DT. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-3-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 525 ++++++++++++++--------------- arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- 2 files changed, 255 insertions(+), 272 deletions(-) commit 9707fc66ab40c62b459cf83fa9a32c4b7f39dc0c Author: Dmitry Baryshkov Date: Fri Sep 30 21:52:14 2022 +0300 ARM: dts: qcom: apq8064: disable HDMI nodes by default Disable HDMI nodes. Individual board can enable them if required. The only APQ8064 board that has working HDMI output is IFC6410, which enables these devices explicitly. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930185236.867655-2-dmitry.baryshkov@linaro.org arch/arm/boot/dts/qcom-apq8064.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 6cd72414abc7345e277fcab5e1c763c3a017dc6a Author: Krzysztof Kozlowski Date: Thu Oct 6 14:46:31 2022 +0200 ARM: dts: qcom: msm8974: 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: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221006124659.217540-7-krzysztof.kozlowski@linaro.org .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) commit df9c86025510c45a6d90669347129e8000e1bbbc Author: Krzysztof Kozlowski Date: Thu Oct 6 14:46:30 2022 +0200 ARM: dts: qcom: msm8226: 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: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221006124659.217540-6-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts | 6 +++--- arch/arm/boot/dts/qcom-msm8226.dtsi | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) commit bda79af488a3e75769433fb961800c39bb07b29c Author: Krzysztof Kozlowski Date: Thu Oct 6 14:46:29 2022 +0200 ARM: dts: qcom: sdx55: 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. Schema also requires 'function' property, so two nodes for the same gpio (mux and config) should be merged into one. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221006124659.217540-5-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts | 45 ++++++++---------------- 1 file changed, 15 insertions(+), 30 deletions(-) commit 0139f183bcddcf5b36f805254bb0f0625963f783 Author: Krzysztof Kozlowski Date: Thu Oct 6 14:46:28 2022 +0200 ARM: dts: qcom: sdx55: add gpio-ranges to TLMM pinctrl Add required gpio-ranges property to TLMM pinctrl node: qcom-sdx55-mtp.dtb: pinctrl@f100000: 'gpio-ranges' is a required property Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221006124659.217540-4-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-sdx55.dtsi | 1 + 1 file changed, 1 insertion(+) commit 4dca1ca2d74a6d9626421431c0ec0390b361e51b Author: Krzysztof Kozlowski Date: Mon Sep 26 11:21:04 2022 +0200 ARM: dts: qcom: align RPM regulators node name with bindings Node names should be generic and new DT schema expects RPM regulators node to be just "regulators". Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220926092104.111449-4-krzysztof.kozlowski@linaro.org arch/arm/boot/dts/qcom-apq8026-asus-sparrow.dts | 2 +- arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts | 2 +- arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 4 ++-- arch/arm/boot/dts/qcom-apq8084.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 4 ++-- arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi | 4 ++-- arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts | 4 ++-- arch/arm/boot/dts/qcom-msm8974pro-samsung-klte.dts | 2 +- arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dts | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) commit afc7b849ebcf063ca84a79c749d4996a8781fc55 Author: Jeff Johnson Date: Wed Sep 14 16:47:05 2022 -0700 soc: qcom: pdr: Make QMI message rules const Commit ff6d365898d4 ("soc: qcom: qmi: use const for struct qmi_elem_info") allows QMI message encoding/decoding rules to be const, so do that for QCOM PDR. Signed-off-by: Jeff Johnson Reviewed-by: Alex Elder Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220914234705.28405-5-quic_jjohnson@quicinc.com drivers/soc/qcom/pdr_internal.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 3a39049f88e4e92823bcc43fa8f148cf7dfdda67 Author: Bjorn Andersson Date: Thu Sep 15 13:55:59 2022 -0700 soc: qcom: rpmhpd: Use highest corner until sync_state In some cases the hardware that the bootloader has left configured depends on RPMH power domains for their operation up until the point where the related Linux device driver probes and can inherit that configuration, or power down the hardware gracefully. Unfortunately as Linux probes the releavant drivers in sequence there are periods during the Linux boot flow where either the genpd refcount will reach 0, or worse where the active performance_state votes does not meet the requirements of the state that the hardware was left in. One specific example of this is during boot of e.g. SM8150/SC8180X, where the display clock controller probes, without any particular performance state needs (to access its registers). This will drop the MMCX rail to MIN_SVS, which isn't sufficient to sustain the clock rates that the later probing MDP is configured to. This results in an unrecoverable system state. Handle both these cases by keeping the RPMH power-domais that are referenced voted for highest state, until sync_state indicates that all devices referencing the RPMH power-domain driver has been probed. Signed-off-by: Bjorn Andersson Reviewed-by: Caleb Connolly Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov [bjorn: Added print for sync_state errors] Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220915205559.14574-1-quic_bjorande@quicinc.com drivers/soc/qcom/rpmhpd.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit a30c3c6a351c42c8a843f7631f0364dfddf337c7 Author: Konrad Dybcio Date: Wed Sep 21 02:45:33 2022 +0200 soc: qcom: smd-rpm: Add SM6375 compatible Add a compatible for the SM6375 SoC. Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220921004534.151990-2-konrad.dybcio@somainline.org drivers/soc/qcom/smd-rpm.c | 1 + 1 file changed, 1 insertion(+) commit c7617580b44bb5ad04461ddd085fd4b2dd6eba19 Author: Konrad Dybcio Date: Wed Sep 21 02:45:32 2022 +0200 dt-bindings: soc: qcom: qcom,smd-rpm: Add a compatible for SM6375 Document the compatible for SM6375. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220921004534.151990-1-konrad.dybcio@somainline.org Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 1 + 1 file changed, 1 insertion(+) commit 7fd0a9316a10eb0d61ea130f67da81814d5695b2 Author: Krzysztof Kozlowski Date: Mon Sep 26 11:21:02 2022 +0200 dt-bindings: soc: qcom: smd-rpm: add qcom,glink-channels The Qualcomm Resource Power Manager (RPM) over SMD bindings contain compatibles and description for RPM devices on two different communication channels: SMD and GLINK. Except the difference in the parent node, they use different properties for describing name of channel qcom,smd-channels or qcom,glink-channels. The first one is already present but second is missing: qcom/sm6125-sony-xperia-seine-pdx201.dtb: rpm-requests: 'qcom,glink-channels' does not match any of the regexes: '^regulators(-[01])?$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220926092104.111449-2-krzysztof.kozlowski@linaro.org .../devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit c6b349832caf3e9e7ec484c89202914fa24fd1f4 Author: Krzysztof Kozlowski Date: Mon Sep 26 11:21:01 2022 +0200 dt-bindings: soc: qcom: smd-rpm: add PMIC regulators nodes The Qualcomm RPM over SMD contains devices for one or two PMIC regulators - already used in several DTS files. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220926092104.111449-1-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 1e9dd807c609d1598fa56a1d65074a6eeb89f705 Author: Gustavo A. R. Silva Date: Mon Sep 26 18:01:08 2022 -0500 soc: qcom: smd-rpm: 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 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/224 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/YzIvNIyPhWaG2DTr@work drivers/soc/qcom/smd-rpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5faeae4eac74685c3eda3e55bc3725a331ecd09d Author: Richard Acayan Date: Tue Oct 4 18:11:30 2022 -0400 soc: qcom: rpmhpd: add sdm670 power domains The Snapdragon 670 has similar power domains to SDM845 but no EBI power domain. Add a new array for them to avoid requesting a power domain which is unsupported by the hardware. Signed-off-by: Richard Acayan Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221004221130.14076-3-mailingradian@gmail.com drivers/soc/qcom/rpmhpd.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 9ba5080e688d0e37a0d93bb63d83199d464debf4 Author: Richard Acayan Date: Tue Oct 4 18:11:29 2022 -0400 dt-bindings: power: rpmpd: add sdm670 power domains Add the RPMh power domain IDs and compatible string for Snapdragon 670 to make SDM670 power domains accessible to the device trees. Signed-off-by: Richard Acayan Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221004221130.14076-2-mailingradian@gmail.com Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 + include/dt-bindings/power/qcom-rpmpd.h | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 34ec89e68db2682469a9a51d9ed4022ee3992389 Author: Krzysztof Kozlowski Date: Tue Aug 30 09:57:43 2022 +0300 soc: qcom: socinfo: create soc_id table from bindings The Qualcomm SoC ID values are encoded in few places: DTS files, Devicetree bindings (both used by some of Qualcomm bootloaders or tools) and in soc_id table of socinfo driver. Do not duplicate the actual values in the last one but use the constants from the bindings. Tested by comparing output object file (exactly the same). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220830065744.161163-3-krzysztof.kozlowski@linaro.org drivers/soc/qcom/socinfo.c | 265 +++++++++++++++++++++++---------------------- 1 file changed, 136 insertions(+), 129 deletions(-) commit a79a4b3097bc28b0b617c4994c9fe4a4e1d00096 Author: Krzysztof Kozlowski Date: Tue Aug 30 09:57:42 2022 +0300 dt-bindings: arm: qcom: document qcom,msm-id and qcom,board-id The top level qcom,msm-id and qcom,board-id properties are utilized by bootloaders on Qualcomm MSM platforms to determine which device tree should be used and passed to the kernel. The commit b32e592d3c28 ("devicetree: bindings: Document qcom board compatible format") from 2015 was a consensus during discussion about upstreaming qcom,msm-id and qcom,board-id fields. There are however still problems with that consensus: 1. It was reached 7 years ago but it turned out its implementation did not reach all possible products. 2. Initially additional tool (dtbTool) was needed for parsing these fields to create a QCDT image consisting of multiple DTBs, later the bootloaders were improved and they use these qcom,msm-id and qcom,board-id properties directly. 3. Extracting relevant information from the board compatible requires this additional tool (dtbTool), which makes the build process more complicated and not easily reproducible (DTBs are modified after the kernel build). 4. Some versions of Qualcomm bootloaders expect these properties even when booting with a single DTB. The community is stuck with these bootloaders thus they require properties in the DTBs. Since several upstreamed Qualcomm SoC-based boards require these properties to properly boot and the properties are reportedly used by bootloaders, document them along with the bindings header with constants used by: bootloader, some DTS and socinfo driver. Link: https://lore.kernel.org/r/a3c932d1-a102-ce18-deea-18cbbd05ecab@linaro.org/ Co-developed-by: Kumar Gala Signed-off-by: Kumar Gala Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220830065744.161163-2-krzysztof.kozlowski@linaro.org Documentation/devicetree/bindings/arm/qcom.yaml | 120 ++++++++++++++++++ include/dt-bindings/arm/qcom,ids.h | 155 ++++++++++++++++++++++++ 2 files changed, 275 insertions(+) commit 3f54a39819324e7adba8ff3c0e2bd97f218bb956 Author: Wolfram Sang Date: Thu Aug 18 23:01:06 2022 +0200 soc: qcom: 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 [bjorn: Only applied qcom-part of patch] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818210106.7349-1-wsa+renesas@sang-engineering.com drivers/soc/qcom/smp2p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7da54ced3a79ffaa687d99a4b7bfb7591202de9a Author: Dmitry Baryshkov Date: Thu Sep 29 12:12:16 2022 +0300 dt-bindings: clock: split qcom,gcc-sdm660 to the separate file Move schema for the GCC on SDM630/SDM636/SDM660 to a separate file to be able to define device-specific clock properties. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220929091216.471136-1-dmitry.baryshkov@linaro.org .../devicetree/bindings/clock/qcom,gcc-other.yaml | 3 -- .../devicetree/bindings/clock/qcom,gcc-sdm660.yaml | 61 ++++++++++++++++++++++ 2 files changed, 61 insertions(+), 3 deletions(-) commit e3e9a5803807302221060e80880feee1b0be5765 Author: Rajendra Nayak Date: Tue Sep 27 16:12:33 2022 +0530 arm64: dts: qcom: sc7280: Add required-opps for i2c qup-i2c devices on sc7280 are clocked with a fixed clock (19.2 MHz) Though qup-i2c does not support DVFS, it still needs to vote for a performance state on 'CX' to satisfy the 19.2 Mhz clock frequency requirement. Use 'required-opps' to pass this information from device tree, and also add the power-domains property to specify the CX power-domain. Signed-off-by: Rajendra Nayak Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927104233.29376-1-quic_rjendra@quicinc.com arch/arm64/boot/dts/qcom/sc7280.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 5d6fc6321db1b0ea4df0c4654ccb0432f740fcf4 Author: Rajendra Nayak Date: Tue Sep 27 15:56:46 2022 +0530 arm64: dts: qcom: sc7180: Add required-opps for USB USB has a requirement to put a performance state vote on 'cx' while active. Use 'required-opps' to pass this information from device tree, and since all the GDSCs in GCC (including USB) are sub-domains of cx, we also add cx as a power-domain for GCC. Now when any of the consumers of the GDSCs (in this case USB) votes on a perforamance state, genpd framework can identify that the GDSC itself does not support a performance state and it then propogates the vote to the parent, which in this case is cx. This change would also mean that any GDSC in GCC thats left enabled during low power state (perhaps because its marked with a ALWAYS_ON flag) can prevent the system from entering low power since that would prevent cx from transitioning to low power. Ideally any consumers that would need to have their devices (partially) powered to support wakeups should look at making the resp. GDSCs transtion to a Retention (PWRSTS_RET) state instead of leaving them ALWAYS_ON. Signed-off-by: Rajendra Nayak Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220927102646.14785-1-quic_rjendra@quicinc.com arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 9c2eb59712cc21a183772e9837dec2305b14a423 Author: Krishna Kurapati Date: Thu Sep 29 20:08:10 2022 +0530 arm64: dts: qcom: sc7280: Update SNPS Phy params for SC7280 Add SNPS HS Phy tuning parameters for herobrine variant of SC7280 devices. Signed-off-by: Krishna Kurapati Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1664462290-29869-1-git-send-email-quic_kriskura@quicinc.com arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 58c4a0b6f4bdf8c3c2b4aad7f980e4019cc0fc83 Author: Krzysztof Kozlowski Date: Fri Sep 30 21:20:39 2022 +0200 arm64: dts: qcom: sdm845-xiaomi-polaris: fix codec pin conf name Fix typo in the codec's pin name to be configured. Mismatched name caused the pin configuration to be ignored. Fixes: be497abe19bf ("arm64: dts: qcom: Add support for Xiaomi Mi Mix2s") Signed-off-by: Krzysztof Kozlowski Tested-by: Molly Sophia Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192039.240486-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3638ea010c37e1e6d93474c4b3368f403600413f Author: Krzysztof Kozlowski Date: Fri Sep 30 21:20:38 2022 +0200 arm64: dts: qcom: sdm850-samsung-w737: correct I2C12 pins drive strength The pin configuration (done with generic pin controller helpers and as expressed by bindings) requires children nodes with either: 1. "pins" property and the actual configuration, 2. another set of nodes with above point. The qup_i2c12_default pin configuration used second method - with a "pinmux" child. Fixes: d4b341269efb ("arm64: dts: qcom: Add support for Samsung Galaxy Book2") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192039.240486-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fd49776d8f458bba5499384131eddc0b8bcaf50c Author: Krzysztof Kozlowski Date: Fri Sep 30 21:20:37 2022 +0200 arm64: dts: qcom: sdm850-lenovo-yoga-c630: correct I2C12 pins drive strength The pin configuration (done with generic pin controller helpers and as expressed by bindings) requires children nodes with either: 1. "pins" property and the actual configuration, 2. another set of nodes with above point. The qup_i2c12_default pin configuration used second method - with a "pinmux" child. Fixes: 44acee207844 ("arm64: dts: qcom: Add Lenovo Yoga C630") Cc: Signed-off-by: Krzysztof Kozlowski Tested-by: Steev Klimaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192039.240486-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 179baddcc6905e6e657c35c3a380afe55b67c98d Author: Krzysztof Kozlowski Date: Fri Sep 30 21:29:48 2022 +0200 arm64: dts: qcom: sm6125: 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. Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192954.242546-11-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm6125.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f20a687fddf42f7d55a4992b9ecc3a663c34a6b7 Author: Krzysztof Kozlowski Date: Fri Sep 30 21:29:47 2022 +0200 arm64: dts: qcom: sm6125-sony-xperia: add missing SD CD GPIO functions Add default GPIO function to SD card detect pins on SM6125 Sony Xperia, as required by bindings: qcom/sm6125-sony-xperia-seine-pdx201.dtb: pinctrl@500000: sdc2-off-state: 'oneOf' conditional failed, one must be fixed: 'pins' is a required property 'function' is a required property 'clk-pins', 'cmd-pins', 'data-pins', 'sd-cd-pins' do not match any of the regexes: 'pinctrl-[0-9]+' Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192954.242546-10-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts | 2 ++ 1 file changed, 2 insertions(+) commit 72e69d4d8d3e460806311f2b53b1807e3ca1112a Author: Krzysztof Kozlowski Date: Fri Sep 30 21:29:46 2022 +0200 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. qcom/sdm845-lg-judyln.dtb: gpios@c000: 'vol-up-active-pins' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+' Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192954.242546-9-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 305dd3f89b492de7672bf53e016e7dcf14ba9e85 Author: Krzysztof Kozlowski Date: Fri Sep 30 21:29:45 2022 +0200 arm64: dts: qcom: msm8953: 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. qcom/sdm632-fairphone-fp3.dtb: pinctrl@1000000: 'cd-off-pins', 'cd-on-pins', 'gpio-key-default-pins', .... do not match any of the regexes: '-state$', 'pinctrl-[0-9]+' Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192954.242546-8-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8953.dtsi | 70 +++++++++++++++++------------------ 1 file changed, 35 insertions(+), 35 deletions(-) commit d0ca0de64537d129d7f4f7e878a8c20eea751a7c Author: Krzysztof Kozlowski Date: Fri Sep 30 21:29:44 2022 +0200 arm64: dts: qcom: sc7280-idp-ec-h1: add missing QUP GPIO functions Add default GPIO function to SPI10 and SPI14 chip-select pins on SC7280 IDP, as required by bindings. Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192954.242546-7-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 442b13a72a20e30b1883e425a49b337e9fa85069 Author: Krzysztof Kozlowski Date: Fri Sep 30 21:29:43 2022 +0200 arm64: dts: qcom: sc7280-herobrine: correct number of gpio-line-names There are 175 GPIOs (gpio0-174). Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192954.242546-6-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dts | 1 + arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker-r0.dts | 1 - arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts | 1 - arch/arm64/boot/dts/qcom/sc7280-herobrine-villager.dtsi | 1 - 4 files changed, 1 insertion(+), 3 deletions(-) commit ec0872a68dcf9fba109fd7ac51843a49984f7586 Author: Krzysztof Kozlowski Date: Fri Sep 30 21:29:42 2022 +0200 arm64: dts: qcom: sc7280: align TLMM pin configuration with DT schema (really) DT schema expects TLMM pin configuration nodes to be named with '-state' suffix and their optional children with '-pins' suffix. I already tried to do this in commit d801357a0573 ("arm64: dts: qcom: sc7280: align TLMM pin configuration with DT schema") and I missed the fact that these nodes were not part of "state" node. Bindings did not catch these errors due to its own issues. Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192954.242546-5-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts | 8 +- arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 44 ++-- arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi | 8 +- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 26 +- arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi | 20 +- arch/arm64/boot/dts/qcom/sc7280.dtsi | 316 ++++++++++++------------- 6 files changed, 211 insertions(+), 211 deletions(-) commit 91c4431b0204d720bee3062fa8e6c6ac789100b4 Author: Krzysztof Kozlowski Date: Fri Sep 30 21:29:41 2022 +0200 arm64: dts: qcom: sc8280xp: 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. qcom/sc8280xp-crd.dtb: pinctrl@f100000: kybd-default-state: 'oneOf' conditional failed, one must be fixed: 'pins' is a required property 'function' is a required property 'disable', 'int-n', 'reset' do not match any of the regexes: 'pinctrl-[0-9]+' 'disable', 'int-n', 'reset' do not match any of the regexes: '-pins$', 'pinctrl-[0-9]+' Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192954.242546-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 12 ++++++------ arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 7ff4a646fae3697b039c6b684786a1e309e8445c Author: Krzysztof Kozlowski Date: Fri Sep 30 21:29:40 2022 +0200 arm64: dts: qcom: sm8250-sony-xperia-edo: fix touchscreen bias-disable The property to disable bias is "bias-disable". Fixes: e76c7e1f15fe ("arm64: dts: qcom: sm8250-edo: Add Samsung touchscreen") Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192954.242546-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f76361749b607d52cb8eb9a7398999ee6cf17767 Author: Krzysztof Kozlowski Date: Fri Sep 30 21:29:39 2022 +0200 arm64: dts: qcom: sm8250: 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. Drop also unneeded split between mux and config. Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220930192954.242546-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 12 +- arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 38 +- .../boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 16 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 556 ++++++++------------- 4 files changed, 239 insertions(+), 383 deletions(-) commit e7e24786cf904e22e0472ac9a5ad35bcbd3fb7a3 Author: Richard Acayan Date: Sat Oct 1 17:19:33 2022 -0400 arm64: dts: qcom: add gpi-dma fallback compatible The dt schema for gpi-dma has been updated with a new fallback compatible string. Add the compatible strings to existing device trees. Signed-off-by: Richard Acayan Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221001211934.62511-4-mailingradian@gmail.com arch/arm64/boot/dts/qcom/sm8150.dtsi | 6 +++--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 20afb6751739264ea41993877de93923911dfdc3 Author: Krzysztof Kozlowski Date: Thu Oct 6 14:46:27 2022 +0200 arm64: dts: qcom: ipq6018: 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: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221006124659.217540-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 4 ++-- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 4871d3c38893c8a585e3e96364b7fb91cda8322e Author: Krzysztof Kozlowski Date: Thu Oct 6 14:46:26 2022 +0200 arm64: dts: qcom: ipq6018-cp01-c1: use BLSPI1 pins When BLSPI1 (originally SPI0, later renamed in commit f82c48d46852 ("arm64: dts: qcom: ipq6018: correct QUP peripheral labels")) was added, the device node lacked respective pin configuration assignment. Fixes: 5bf635621245 ("arm64: dts: ipq6018: Add a few device nodes") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221006124659.217540-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 2 ++ 1 file changed, 2 insertions(+) commit 028fe09cda0a0d568e6a7d65b0336d32600b480c Author: Krzysztof Kozlowski Date: Thu Oct 6 16:45:17 2022 +0200 arm64: dts: qcom: sm8150: 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: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221006144518.256956-1-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 60 ++-- .../boot/dts/qcom/sm8150-microsoft-surface-duo.dts | 2 +- arch/arm64/boot/dts/qcom/sm8150.dtsi | 376 +++++++-------------- 3 files changed, 157 insertions(+), 281 deletions(-) commit e0b6c1ff512db643050e4a09020d7c0b69c82807 Author: Krzysztof Kozlowski Date: Sat Sep 10 11:14:21 2022 +0200 arm64: dts: qcom: sm8250: use generic name for LPASS clock controller The node names should be generic according to Devicetree specification, so use "clock-controller" instead of "cc". The bindings so far did not define this name (as child of APR service). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220910091428.50418-9-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf4a15e409ff1287506fac51c343821d846fc1bc Author: Krzysztof Kozlowski Date: Sat Sep 10 11:14:20 2022 +0200 arm64: dts: qcom: qrb5165-rb5: align dai node names with dtschema DT schema expects DAI node names to be "dai": qcom/qrb5165-rb5.dtb: dais: 'qi2s@16', 'qi2s@20' do not match any of the regexes: '^dai@[0-9]+$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220910091428.50418-8-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b401d49395c3fbb082e84c1df3ad77495876c18 Author: Krzysztof Kozlowski Date: Sat Sep 10 11:14:19 2022 +0200 arm64: dts: qcom: msm8996: align dai node names with dtschema DT schema expects DAI node names to be "dai": qcom/msm8996-mtp.dtb: dais: 'hdmi@1' does not match any of the regexes: '^dai@[0-9]+$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220910091428.50418-7-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 074240974e08a50faf434fa61c8bb7859871c774 Author: Krzysztof Kozlowski Date: Sat Sep 10 11:14:18 2022 +0200 arm64: dts: qcom: sdm845: align dai node names with dtschema DT schema expects DAI node names to be "dai": qcom/sdm845-xiaomi-beryllium.dtb: dais: 'qi2s@22' does not match any of the regexes: '^dai@[0-9]+$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220910091428.50418-6-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit c05b95d3286734c83e384240eb41d9867ce11027 Author: Krzysztof Kozlowski Date: Sat Sep 10 11:14:17 2022 +0200 arm64: dts: qcom: msm8996: fix APR services nodes DT schema expects APR services node names to be "service" and to have an unit address (as it has a "reg" property): qcom/msm8996-xiaomi-gemini.dtb: apr: 'power-domains', 'q6adm', 'q6afe', 'q6asm', 'qcom,smd-channels' do not match any of the regexes: '^service@[1-9a-d]$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220910091428.50418-5-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/msm8996.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a22609bf9fee17f9045b5b1847f2585200cd1920 Author: Krzysztof Kozlowski Date: Sat Sep 10 11:14:16 2022 +0200 arm64: dts: qcom: sm8250: align APR services node names with dtschema DT schema expects APR services node names to be "service": qcom/sm8250-sony-xperia-edo-pdx203.dtb: remoteproc@17300000: glink-edge:apr:service@7: 'dais' does not match any of the regexes: '^.*@[0-9a-f]+$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220910091428.50418-4-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sm8250.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a3692a5edc5681d47fede71efeeaa065ebcad8d9 Author: Krzysztof Kozlowski Date: Sat Sep 10 11:14:15 2022 +0200 arm64: dts: qcom: sdm845: align APR services node names with dtschema DT schema expects APR services node names to be "service": qcom/sdm630-sony-xperia-nile-voyager.dtb: remoteproc@15700000: glink-edge:apr:service@4: 'dais' does not match any of the regexes: '^.*@[0-9a-f]+$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Tested-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220910091428.50418-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm845.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit aa27f316de7fbf3155ffde20a6daa4041d15ac5e Author: Krzysztof Kozlowski Date: Sat Sep 10 11:14:14 2022 +0200 arm64: dts: qcom: sdm630: align APR services node names with dtschema DT schema expects APR services node names to be "service": qcom/sdm850-lenovo-yoga-c630.dtb: remoteproc-adsp: glink-edge:apr: 'apr-service@3', 'apr-service@4', 'apr-service@7', 'apr-service@8', 'qcom,glink-channels', 'qcom,intents' do not match any of the regexes: '^service@[1-9a-d]$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220910091428.50418-2-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/sdm630.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 372698e8df2619bf76b047c9a600d1f659d7868b Author: Krzysztof Kozlowski Date: Mon Sep 26 11:21:03 2022 +0200 arm64: dts: qcom: align RPM regulators node name with bindings Node names should be generic and new DT schema expects RPM regulators node to be just "regulators". Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220926092104.111449-3-krzysztof.kozlowski@linaro.org arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 4 ++-- arch/arm64/boot/dts/qcom/apq8096-ifc6640.dts | 2 +- arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dts | 4 ++-- arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 2 +- arch/arm64/boot/dts/qcom/msm8996-xiaomi-natrium.dts | 2 +- arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts | 2 +- arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts | 4 ++-- arch/arm64/boot/dts/qcom/msm8998-mtp.dts | 4 ++-- arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 2 +- arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts | 4 ++-- arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 2 +- arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 4 ++-- 22 files changed, 35 insertions(+), 35 deletions(-) commit fe6d5b8de04780e7ec27037b836324b59fade45b Author: Robert Marko Date: Fri Aug 19 00:06:28 2022 +0200 arm64: dts: qcom: ipq8074: add A53 PLL node Add the required node for A53 PLL which will be used to provide the CPU clock via APCS for APSS scaling. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818220628.339366-9-robimarko@gmail.com arch/arm64/boot/dts/qcom/ipq8074.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3b87d9f436b6893503f43f487d3bc6091d9db178 Author: Paul Moore Date: Mon Oct 17 14:08:09 2022 -0400 fs: edit a comment made in bad taste I know nobody likes a buzzkill, but I figure it's best to keep the bad jokes appropriate for small children. Signed-off-by: Paul Moore include/linux/fs_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 117bd98daca0fb1f4264e711f73ab76739e83466 Author: Yuan Can Date: Sat Sep 24 02:50:41 2022 +0000 firmware: raspberrypi: Use dev_err_probe() to simplify code 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. Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20220924025041.29389-1-yuancan@huawei.com Signed-off-by: Florian Fainelli drivers/firmware/raspberrypi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit a7ec65fc7e83f342d1392cac69e4f60c7a7cc4ba Author: Matt Roper Date: Fri Oct 14 16:02:39 2022 -0700 drm/i915/xelpmp: Add multicast steering for media GT MTL's media IP (Xe_LPM+) only has a single type of steering ("OAADDRM") which selects between media slice 0 and media slice 1. We'll always steer to media slice 0 unless it is fused off (which is the case when VD0, VE0, and SFC0 are all reported as unavailable). Bspec: 67789 Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-15-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 18 ++++++++++++++++-- drivers/gpu/drm/i915/gt/intel_gt_types.h | 1 + drivers/gpu/drm/i915/gt/intel_workarounds.c | 17 +++++++++++++++-- 3 files changed, 32 insertions(+), 4 deletions(-) commit f32898c94a105c221e6fe957aee833e7fc98f95f Author: Matt Roper Date: Fri Oct 14 16:02:38 2022 -0700 drm/i915/xelpg: Add multicast steering MTL's graphics IP (Xe_LPG) once again changes the multicast register types and steering details. Key changes from past platforms: * The number of instances of some MCR types (NODE, OAAL2, and GAM) vary according to the MTL subplatform and cannot be read from fuse registers. However steering to instance #0 will always provided a non-terminated value, so we can lump these all into a single "instance0" table. * The MCR steering register (and its bitfields) has changed. Unlike past platforms, we will be explicitly steering all types of MCR accesses, including those for "SLICE" and "DSS" ranges; we no longer rely on implicit steering. On previous platforms, various hardware/firmware agents that needed to access registers typically had their own steering control registers, allowing them to perform multicast steering without clobbering the CPU/kernel steering. Starting with MTL, more of these agents now share a single steering register (0xFD4) and it is no longer safe for us to assume that the value will remain unchanged from how we initialized it during startup. There is also a slight chance of race conditions between the driver and a hardware/firmware agent, so the hardware provides a semaphore register that can be used to coordinate access to the steering register. Support for the semaphore register will be introduced in a future patch. v2: - Use Xe_LPG terminology instead of "MTL 3D" since it's the IP version we're matching on now rather than the platform. - Don't combine l3bank and mslice masks into a union. It's not related to the other changes here and we might still need both of them on some future platform. - Separate debug dumping of steering settings to a separate helper function. (Tvrtko) - Update debug dumping to include DSS ranges (and future-proof it so that any new ranges added on future platforms will also be dumped). - Restore MULTICAST bit at the end of rw_with_mcr_steering_fw() if we cleared it. Also force the MULTICAST bit to true at the beginning of multicast writes just to be safe. (Bala) Bspec: 67788, 67112 Cc: Radhakrishna Sripada Cc: Balasubramani Vivekanandan Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-14-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 135 ++++++++++++++++++++++++---- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 5 ++ drivers/gpu/drm/i915/gt/intel_gt_types.h | 1 + drivers/gpu/drm/i915/gt/intel_workarounds.c | 33 +++++-- drivers/gpu/drm/i915/i915_pci.c | 1 + 5 files changed, 154 insertions(+), 21 deletions(-) commit 58bc2453ab8a4b5e1f2969e09c12ab69b8aaaf98 Author: Matt Roper Date: Fri Oct 14 16:02:37 2022 -0700 drm/i915: Define multicast registers as a new type Rather than treating multicast registers as 'i915_reg_t' let's define them as a completely new type. This will allow the compiler to help us make sure we're using multicast-aware functions to operate on multicast registers. This plan does break down a bit in places where we're just maintaining heterogeneous lists of registers (e.g., various MMIO whitelists used by perf, GVT, etc.) rather than performing reads/writes. We only really care about the offset in those cases, so for now we can "cast" the registers as non-MCR, leaving us with a list of i915_reg_t's, but we may want to look for better ways to store mixed collections of i915_reg_t and i915_mcr_reg_t in the future. v2: - Add TLB invalidation registers v3: - Make type checking of i915_mmio_reg_offset() stricter. It will accept either i915_reg_t or i915_mcr_reg_t, but will now raise a compile error if any other type is passed, even if that type contains a 'reg' field. (Jani) - Drop a ton of GVT changes; allowing i915_mmio_reg_offset() to take either an i915_reg_t or an i915_mcr_reg_t means that the huge lists of MMIO_D*() macros used in GVT will continue to work without modification. We need only make changes to structures that have an explicit i915_reg_t in them now. Cc: Jani Nikula Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-13-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt.c | 16 +++++-- drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 51 ++++++++++++++--------- drivers/gpu/drm/i915/gt/intel_gt_mcr.h | 18 ++++---- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 27 ++++++++---- drivers/gpu/drm/i915/gt/intel_workarounds.c | 32 +++++++------- drivers/gpu/drm/i915/gt/intel_workarounds_types.h | 5 ++- drivers/gpu/drm/i915/gt/selftest_workarounds.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 4 +- drivers/gpu/drm/i915/gvt/handlers.c | 2 +- drivers/gpu/drm/i915/gvt/mmio_context.c | 14 +++---- drivers/gpu/drm/i915/i915_reg_defs.h | 27 ++++++------ 12 files changed, 117 insertions(+), 83 deletions(-) commit 9e49bda902bc3e88e3530b3b93a95f727e8aa141 Author: Matt Roper Date: Fri Oct 14 16:02:36 2022 -0700 drm/i915/gt: Add MCR-specific workaround initializers Let's be more explicit about which of our workarounds are updating MCR registers. Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-12-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 433 +++++++++++++--------- drivers/gpu/drm/i915/gt/intel_workarounds_types.h | 4 +- 2 files changed, 263 insertions(+), 174 deletions(-) commit cf35f6afb92643633f4ecbb386ab8a572cca0386 Author: Matt Roper Date: Fri Oct 14 16:02:35 2022 -0700 drm/i915/guc: Handle save/restore of MCR registers explicitly MCR registers can be placed on the GuC's save/restore list, but at the moment they are always handled in a multicast manner (i.e., the GuC reads one instance to save the value and then does a multicast write to restore that single value to all instances). In the future the GuC will probably give us an alternate interface to do unicast per-instance save/restore operations, so we should be very clear about which registers on the list are MCR registers (and in the future which save/restore behavior we want for them). Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-11-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 55 ++++++++++++++++++------------ 1 file changed, 34 insertions(+), 21 deletions(-) commit 46c507f03a46108e5a93acc06a060601ac9b83d6 Author: Matt Roper Date: Fri Oct 14 16:02:34 2022 -0700 drm/i915/gt: Always use MCR functions on multicast registers Rather than relying on the implicit behavior of intel_uncore_*() functions, let's always use the intel_gt_mcr_*() functions to operate on multicast/replicated registers. v2: - Add TLB invalidation registers v3: - Switch more uncore operations in mmio_invalidate_full() to MCR operations for Xe_HP. (Bala) Cc: Balasubramani Vivekanandan Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-10-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt.c | 58 +++++++++++++++++++++---------- drivers/gpu/drm/i915/gt/intel_mocs.c | 13 +++---- drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 12 ++++--- drivers/gpu/drm/i915/intel_pm.c | 19 +++++----- 4 files changed, 65 insertions(+), 37 deletions(-) commit a9e69428b1b4bb0fcf5a55f13d87557de723d7ed Author: Matt Roper Date: Fri Oct 14 16:02:33 2022 -0700 drm/i915: Define MCR registers explicitly Rather than using the same _MMIO() macro to define MCR registers as singleton registers, let's use a new MCR_REG() macro to make it clear that these registers are special and should be handled accordingly. For now MCR_REG() will still generate an i915_reg_t with the given offset, but we'll change that in future patches. Bspec: 66673, 66696, 66534, 67609 Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-9-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 134 ++++++++++++++++---------------- 1 file changed, 68 insertions(+), 66 deletions(-) commit 3068bec83eea324b299105ec69a3f42c7968c6c0 Author: Matt Roper Date: Fri Oct 14 16:02:32 2022 -0700 drm/i915/gt: Add intel_gt_mcr_wait_for_reg_fw() Xe_HP has some MCR registers that need to be polled for completion of operations like TLB invalidation. Those registers are in the GAM range, which rolls up the status from each unit into the 'primary' instance's value. This makes it useful to have a dedicated 'wait for register' function that handles this on MCR registers, similar to the __intel_wait_for_register_fw() function we already have for regular registers. Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-8-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 55 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_gt_mcr.h | 7 +++++ 2 files changed, 62 insertions(+) commit ab1b2d40d626bfb94d10e182a891fd21154234ef Author: Matt Roper Date: Fri Oct 14 16:02:31 2022 -0700 drm/i915/xehp: Check for faults on primary GAM On Xe_HP the fault registers are now in a multicast register range. However as part of the GAM these registers follow special rules and we need only read from the "primary" GAM's instance to get the information we need. So a single intel_gt_mcr_read_any() (which will automatically steer to the primary GAM) is sufficient; we don't need to loop over each instance of the MCR register. v2: - Update more instances of fault registers. (Bala) Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-7-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt.c | 52 ++++++++++++++++++++++++++++++----- drivers/gpu/drm/i915/i915_gpu_error.c | 12 ++++++-- 2 files changed, 55 insertions(+), 9 deletions(-) commit 851435ec3686c513b469f8d3d9f8bd405a312412 Author: Matt Roper Date: Fri Oct 14 16:02:30 2022 -0700 drm/i915/gt: Add intel_gt_mcr_multicast_rmw() operation There are cases where we wish to read from any non-terminated MCR register instance (or the primary instance in the case of GAM ranges), clear/set some bits, and then write the value back out to the register in a multicast manner. Adding a "multicast RMW" will avoid the need to open-code this. v2: - Return a u32 to align with the recent change to intel_uncore_rmw. Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-6-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 28 ++++++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_gt_mcr.h | 3 +++ 2 files changed, 31 insertions(+) commit e4abeab94658cdf27f75a824f33ab9ad81d47f96 Author: Matt Roper Date: Fri Oct 14 16:02:29 2022 -0700 drm/i915/gt: Correct prefix on a few registers We have a few registers that have existed for several hardware generations, but are only used by the driver on Xe_HP and beyond. In cases where the Xe_HP version of the register is now replicated and uses multicast behavior, but earlier generations were singleton, let's change the register prefix to "XEHP_" to help clarify that we're using the newer multicast form of the register. Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-5-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 8 ++++---- drivers/gpu/drm/i915/gt/intel_workarounds.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) commit fb8af9205595dd79e1051974e1214fbed16f3d74 Author: Matt Roper Date: Fri Oct 14 16:02:28 2022 -0700 drm/i915/gt: Drop a few unused register definitions Let's drop a few register definitions that are unused anywhere in the driver today. Since the referenced offsets are part of what is now considered a multicast register region, the current definitions would not be correct for use on any future platform. Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-4-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 17 ----------------- 1 file changed, 17 deletions(-) commit 77fa9efc16a901ba451695362fa503cf1556e0c4 Author: Matt Roper Date: Fri Oct 14 16:02:27 2022 -0700 drm/i915/xehp: Create separate reg definitions for new MCR registers Starting in Xe_HP, several registers our driver works with have been converted from singleton registers into replicated registers with multicast behavior. Although the registers are still located at the same MMIO offsets as on previous platforms, let's duplicate the register definitions in preparation for upcoming patches that will handle multicast registers in a special manner. The registers that are now replicated on Xe_HP are: * PAT_INDEX (mslice replication) * FF_MODE2 (gslice replication) * COMMON_SLICE_CHICKEN3 (gslice replication) * SLICE_COMMON_ECO_CHICKEN1 (gslice replication) * SLICE_UNIT_LEVEL_CLKGATE (gslice replication) * LNCFCMOCS (lncf replication) Note that there are a couple places in selftest_mocs.c where the gen9 version of LNCFCMOCS is still used without regards for which platform we're on. Those cases are just doing an offset lookup and not issuing any CPU reads/writes of the register, so the potentially multicast nature of the register doesn't come into play. v2: - Add commit message note about the unconditional GEN9_LNCFCMOCS usage in selftest_mocs. (Bala) - Include some additional TLB registers. Bspec: 66534 Cc: Balasubramani Vivekanandan Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-3-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_ggtt.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_gt.c | 18 ++++++++++++++++-- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 26 +++++++++++++++++++------- drivers/gpu/drm/i915/gt/intel_gtt.c | 22 +++++++++++++++++++--- drivers/gpu/drm/i915/gt/intel_gtt.h | 2 +- drivers/gpu/drm/i915/gt/intel_mocs.c | 5 ++++- drivers/gpu/drm/i915/gt/intel_workarounds.c | 24 ++++++++++++------------ drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 7 +++++-- 8 files changed, 78 insertions(+), 30 deletions(-) commit dfa13f1bfc8648041da6f39ca95364f1030af3b9 Author: Matt Roper Date: Fri Oct 14 16:02:26 2022 -0700 drm/i915/gen8: Create separate reg definitions for new MCR registers Gen8 was the first time our hardware had multicast registers (or at least the first time the multicast nature was exposed and MMIO accesses could be steered). There are some registers that transitioned from singleton behavior to multicast during the gen7 -> gen8 transition; let's duplicate the register definitions for those registers in preparation for upcoming patches that will handle MCR registers in a special manner. The registers adjusted are: * MISCCPCTL * SAMPLER_INSTDONE * ROW_INSTDONE * ROW_CHICKEN2 * HALF_SLICE_CHICKEN1 * HALF_SLICE_CHICKEN3 v2: - Use the gen8 version of HALF_SLICE_CHICKEN3 in GVT's gen9 engine MMIO list. (Bala) - Update to the gen8 version of MISCCPCTL in a couple new workarounds that were recently added for DG2/PVC. (Bala) Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221014230239.1023689-2-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 11 ++++++++++- drivers/gpu/drm/i915/gt/intel_workarounds.c | 26 +++++++++++++------------- drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 4 ++-- drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 2 +- drivers/gpu/drm/i915/gvt/handlers.c | 2 +- drivers/gpu/drm/i915/gvt/mmio_context.c | 2 +- drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 11 ++++++----- 9 files changed, 37 insertions(+), 27 deletions(-) commit 0eaaf138fff0b61ff28707502fdea9bdbade3958 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:35 2022 -0400 dt-bindings: pinctrl: qcom,sc8280xp: fix indentation in example (remaining piece) Bindings example should be indented with 4-spaces. Previous adjustment missefd one spot. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-35-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-pinctrl.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb65ee4a3c1dc17359d86147288c9e0e65491304 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:34 2022 -0400 dt-bindings: pinctrl: qcom,sc7280: fix matching pin config The TLMM pin controller follows generic pin-controller bindings, so should have subnodes with '-state' and '-pins'. Otherwise the subnodes (level one and two) are not properly matched. This method also unifies the bindings with other Qualcomm TLMM and LPASS pinctrl bindings. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-34-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 7947f01598418c999be7a5cf0371221bdacd1721 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:33 2022 -0400 dt-bindings: pinctrl: qcom,sdx65: use common TLMM schema Reference common Qualcomm TLMM pin controller schema, to bring common properties, other pinctrl schemas and additional checks, like function required only for GPIOs. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-33-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sdx65-pinctrl.yaml | 42 +++++----------------- 1 file changed, 8 insertions(+), 34 deletions(-) commit c535fe66f4a5df69c57faca1fc04a6c1b50240b9 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:32 2022 -0400 dt-bindings: pinctrl: qcom,sdx65: fix matching pin config The TLMM pin controller follows generic pin-controller bindings, so should have subnodes with '-state' and '-pins'. Otherwise the subnodes (level one and two) are not properly matched. This method also unifies the bindings with other Qualcomm TLMM and LPASS pinctrl bindings. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-32-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,sdx65-pinctrl.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4e0434d4788be2cbb44ce1918ac492c1fd6c195b Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:31 2022 -0400 dt-bindings: pinctrl: qcom,sdx55: fix indentation in example Bindings example should be indented with 4-spaces. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-31-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sdx55-pinctrl.yaml | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) commit fd583a4f6db479a8e3f4ed3390b1cc3c258ace63 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:30 2022 -0400 dt-bindings: pinctrl: qcom,sdx55: use common TLMM schema Reference common Qualcomm TLMM pin controller schema, to bring common properties, other pinctrl schemas and additional checks, like function required only for GPIOs. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-30-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,sdx55-pinctrl.yaml | 44 ++++------------------ 1 file changed, 7 insertions(+), 37 deletions(-) commit 8cd7d9e14fd861c402ccdf243678439036ef7eeb Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:29 2022 -0400 dt-bindings: pinctrl: qcom,sdx55: fix matching pin config The TLMM pin controller follows generic pin-controller bindings, so should have subnodes with '-state' and '-pins'. Otherwise the subnodes (level one and two) are not properly matched. qcom-sdx55-telit-fn980-tlb.dtb: pinctrl@f100000: 'pcie_ep_clkreq_default', 'pcie_ep_perst_default', 'pcie_ep_wake_default' do not match any of the regexes: '-pins$', 'pinctrl-[0-9]+' This method also unifies the bindings with other Qualcomm TLMM and LPASS pinctrl bindings. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-29-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 7e300b5a1f00e8c8c8c0c62979c43d292a791473 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:28 2022 -0400 dt-bindings: pinctrl: qcom,qcm2290: use common TLMM schema Reference common Qualcomm TLMM pin controller schema, to bring common properties, other pinctrl schemas and additional checks, like function required only for GPIOs. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-28-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,qcm2290-pinctrl.yaml | 43 +++------------------- 1 file changed, 6 insertions(+), 37 deletions(-) commit 7d3da666f2c0f9416f6d1a2c436b87a6d9f61e79 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:27 2022 -0400 dt-bindings: pinctrl: qcom,qcm2290: fix matching pin config The TLMM pin controller follows generic pin-controller bindings, so should have subnodes with '-state' and '-pins'. Otherwise the subnodes (level one and two) are not properly matched. This method also unifies the bindings with other Qualcomm TLMM and LPASS pinctrl bindings. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-27-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9fb8c097b933c42b15c0c67d52c24e26e2fc7c34 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:26 2022 -0400 dt-bindings: pinctrl: qcom,mdm9607: fix indentation in example Bindings example should be indented with 4-spaces. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-26-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,mdm9607-pinctrl.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 590d1b93bf75d84fbb21e066c8a7de351f3d0323 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:25 2022 -0400 dt-bindings: pinctrl: qcom,mdm9607: do not require function on non-GPIOs Certain pins, like SDcard related, do not have functions and such should not be required. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-25-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-pinctrl.yaml | 1 - 1 file changed, 1 deletion(-) commit 479cc0adcd7412815962b9bf69f4288f79cfd18e Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:24 2022 -0400 dt-bindings: pinctrl: qcom,msm8953: fix indentation in example Bindings example should be indented with 4-spaces. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-24-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8953-pinctrl.yaml | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) commit f695e8d8c8e45ed8d8b563dcd656df326d44707e Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:23 2022 -0400 dt-bindings: pinctrl: qcom,msm8953: use common TLMM schema Reference common Qualcomm TLMM pin controller schema, to bring common properties, other pinctrl schemas and additional checks, like function required only for GPIOs. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-23-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8953-pinctrl.yaml | 46 ++++------------------ 1 file changed, 7 insertions(+), 39 deletions(-) commit ce4762ae0228024961d70a38631cc9177f7f8818 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:22 2022 -0400 dt-bindings: pinctrl: qcom,msm8953: fix matching pin config The TLMM pin controller follows generic pin-controller bindings, so should have subnodes with '-state' and '-pins'. Otherwise the subnodes (level one and two) are not properly matched. This method also unifies the bindings with other Qualcomm TLMM and LPASS pinctrl bindings. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-22-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 6471d94807c33b9c2f0d806ee0d78b984626a819 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:21 2022 -0400 dt-bindings: pinctrl: qcom,msm8909-tlmm: fix indentation in example Bindings example should be indented with 4-spaces. Reviewed-by: Bjorn Andersson Reviewed-by: Stephan Gerhold Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-21-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8909-tlmm.yaml | 60 +++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 0ec9c96fdaab2ee920bf58747af78e0f98697bb3 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:20 2022 -0400 dt-bindings: pinctrl: qcom,msm8909-tlmm: do not require function on non-GPIOs Certain pins, like SDcard related, do not have functions and such should not be required. Reviewed-by: Bjorn Andersson Reviewed-by: Stephan Gerhold Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-20-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml | 1 - 1 file changed, 1 deletion(-) commit 07741416a0922197899696e1a109f0cc58d4944d Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:19 2022 -0400 dt-bindings: pinctrl: qcom,msm8909-tlmm: fix matching pin config The TLMM pin controller follows generic pin-controller bindings, so should have subnodes with '-state' and '-pins'. Otherwise the subnodes (level one and two) are not properly matched. This method also unifies the bindings with other Qualcomm TLMM and LPASS pinctrl bindings. Reviewed-by: Bjorn Andersson Reviewed-by: Stephan Gerhold Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-19-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 1780bac7c11c341f99ab10a83ede9e96464c5f91 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:18 2022 -0400 dt-bindings: pinctrl: qcom,msm8226: fix indentation in example Bindings example should be indented with 4-spaces. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-18-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8226-pinctrl.yaml | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) commit ca3a311c3a8db80ec3965d9ac02499f9536d3393 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:17 2022 -0400 dt-bindings: pinctrl: qcom,msm8226: add functions and input-enable The MSM8226 pinctrl driver supports input-enable, blsp_i2c4, blsp_uart4 and sdc3 functions and DTS already uses it: qcom-msm8226-samsung-s3ve3g.dtb: pinctrl@fd510000: 'blsp1-i2c1', 'blsp1-i2c2', 'blsp1-i2c3', 'blsp1-i2c4', 'blsp1-i2c5' ... qcom-apq8026-lg-lenok.dtb: pinctrl@fd510000: touch-state: 'oneOf' conditional failed, one must be fixed: 'input-enable' does not match any of the regexes: 'pinctrl-[0-9]+' Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-17-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4799452e1823c6c9ca8b05d47e116871b0c5921f Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:16 2022 -0400 dt-bindings: pinctrl: qcom,msm8226: use common TLMM schema Reference common Qualcomm TLMM pin controller schema, to bring common properties, other pinctrl schemas and additional checks, like function required only for GPIOs. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-16-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,msm8226-pinctrl.yaml | 40 ++++------------------ 1 file changed, 7 insertions(+), 33 deletions(-) commit 43dc3f2bc1140c9dd93b5aad4e8e52f3b2c2fef4 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:15 2022 -0400 dt-bindings: pinctrl: qcom,msm8226: fix matching pin config The TLMM pin controller follows generic pin-controller bindings, so should have subnodes with '-state' and '-pins'. Otherwise the subnodes (level one and two) are not properly matched. This method also unifies the bindings with other Qualcomm TLMM and LPASS pinctrl bindings. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-15-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 4c05adcaa6054a2a6f229b1598615028816aad19 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:14 2022 -0400 dt-bindings: pinctrl: qcom,ipq6018: fix indentation in example Bindings example should be indented with 4-spaces. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-14-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,ipq6018-pinctrl.yaml | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 0a1879f298b2d160173994ea34ea0ca096241f48 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:13 2022 -0400 dt-bindings: pinctrl: qcom,ipq6018: use common TLMM schema Reference common Qualcomm TLMM pin controller schema, to bring common properties, other pinctrl schemas and additional checks, like function required only for GPIOs. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-13-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,ipq6018-pinctrl.yaml | 45 ++++------------------ 1 file changed, 7 insertions(+), 38 deletions(-) commit 1379f6750e207b091f4425b53d7b81a902e9620d Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:12 2022 -0400 dt-bindings: pinctrl: qcom,ipq6018: fix matching pin config The TLMM pin controller follows generic pin-controller bindings, so should have subnodes with '-state' and '-pins'. Otherwise the subnodes (level one and two) are not properly matched. This method also unifies the bindings with other Qualcomm TLMM and LPASS pinctrl bindings. Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-12-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 5cf95fcd6d75375195d15cabfaed835e76eec4c1 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:11 2022 -0400 dt-bindings: pinctrl: qcom,ipq6018: increase number of pins in pinmux One pinxmux node can have more than 4 pins to configure: ['gpio1', 'gpio3', 'gpio4', 'gpio5', 'gpio6', 'gpio7', 'gpio8', 'gpio10', 'gpio11', 'gpio12', 'gpio13', 'gpio14', 'gpio15', 'gpio17'] is too long Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-11-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d6f7ee5f7efc21724250f9c42f74aa8785e682b Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:10 2022 -0400 dt-bindings: pinctrl: qcom,ipq6018: correct BLSP6->BLSP0 functions The pin controller driver has BLSP functions from 0 to 5, not 1 to 6. Add missing blsp0_i2c, blsp0_spi (already used in ipq6018-cp01-c1) and blsp0_uart. Drop blsp6_i2c and blsp6_spi. This fixes dtbs_check warning: ipq6018-cp01-c1.dtb: pinctrl@1000000: spi-0-state: 'oneOf' conditional failed, one must be fixed: 'bias-pull-down', 'drive-strength', 'function', 'pins' do not match any of the regexes: '-pins$', 'pinctrl-[0-9]+' 'blsp0_spi' is not one of ['adsp_ext', 'alsp_int', ..... Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-10-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6664924176497c40f20380eae298241e3b175217 Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:09 2022 -0400 dt-bindings: pinctrl: qcom,ipq6018: add qpic_pad function The IPQ6018 pinctrl driver supports qpic_pad and DTS already uses it: 'qpic_pad' is not one of ['adsp_ext', 'alsp_int', 'atest_bbrx0', ... Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-9-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1b88672e7fd9f83f3a6f507747dc95b8a4d40f4b Author: Krzysztof Kozlowski Date: Sun Oct 16 13:00:08 2022 -0400 dt-bindings: pinctrl: qcom,tlmm-common: add common check for function Certain pins, like SDcard related, do not have functions and such should not be required. Add a check for this in common Qualcomm TLMM pin controller schema. Reviewed-by: Bjorn Andersson Reviewed-by: Stephan Gerhold Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221016170035.35014-8-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../bindings/pinctrl/qcom,tlmm-common.yaml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit a76a13c89a59e9310c6dafb1eb7f43bf04ea001f Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:29 2022 +0200 dt-bindings: pinctrl: qcom,sm8250-lpass-lpi: add bias-bus-hold and input-enable The existing SC7280 LPASS pin controller nodes use bias-bus-hold and input-enable, so allow them. Squash also blank lines for readability. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220927153429.55365-13-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sm8250-lpass-lpi-pinctrl.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 13e4319b57fdecf7144239d9e631960d873b7675 Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:28 2022 +0200 dt-bindings: pinctrl: qcom,sc7280-lpass-lpi: add bias-bus-hold The existing SC7280 LPASS pin controller nodes use bias-bus-hold, so allow it. Squash also blank lines for readability. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220927153429.55365-12-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a849cbd18aa2da5db84502111742431dcd57555b Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:27 2022 +0200 dt-bindings: pinctrl: qcom,sm8450-lpass-lpi: fix matching pin config The LPASS pin controller follows generic pin-controller bindings, so just like TLMM, should have subnodes with '-state' and '-pins'. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220927153429.55365-11-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../pinctrl/qcom,sm8450-lpass-lpi-pinctrl.yaml | 36 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit 351123e62b793e92f6348dd27a03cc035c5a3b6d Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:26 2022 +0200 dt-bindings: pinctrl: qcom,sm8250-lpass-lpi: fix matching pin config The LPASS pin controller follows generic pin-controller bindings, so just like TLMM, should have subnodes with '-state' and '-pins'. qcom/qrb5165-rb5.dtb: pinctrl@33c0000: wsa-swr-active-pins: 'pins' is a required property Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220927153429.55365-10-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../pinctrl/qcom,sm8250-lpass-lpi-pinctrl.yaml | 36 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit b47a6c8b771c62140b619a288acdd5ee46e29272 Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:25 2022 +0200 dt-bindings: pinctrl: qcom,sc8280xp-lpass-lpi: fix matching pin config The LPASS pin controller follows generic pin-controller bindings, so just like TLMM, should have subnodes with '-state' and '-pins'. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220927153429.55365-9-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../pinctrl/qcom,sc8280xp-lpass-lpi-pinctrl.yaml | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit cb70c0d8b50a4051743fb42d2fc730f268864361 Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:24 2022 +0200 dt-bindings: pinctrl: qcom,sc7280-lpass-lpi: fix matching pin config The LPASS pin controller follows generic pin-controller bindings, so just like TLMM, should have subnodes with '-state' and '-pins'. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220927153429.55365-8-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 2f1aad93a1d4a86bb1249f7f94f4e696cde20232 Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:23 2022 +0200 dt-bindings: pinctrl: qcom,sm8450-lpass-lpi: fix gpio pattern Fix double ']' in GPIO pattern to properly match "pins" property. Otherwise schema for pins state fails. Fixes: 4faa4e73011d ("dt-bindings: pinctrl: qcom: Add sm8450 lpass lpi pinctrl bindings") Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220927153429.55365-7-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sm8450-lpass-lpi-pinctrl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 793b96bf484d9c8c05266254721ce96534d79800 Author: Krzysztof Kozlowski Date: Tue Sep 27 17:34:22 2022 +0200 dt-bindings: pinctrl: qcom,sc8280xp-lpass-lpi: fix gpio pattern Fix double ']' in GPIO pattern to properly match "pins" property. Otherwise schema for pins state fails. Fixes: 958bb025f5b3 ("dt-bindings: pinctrl: qcom: Add sc8280xp lpass lpi pinctrl bindings") Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220927153429.55365-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/pinctrl/qcom,sc8280xp-lpass-lpi-pinctrl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c608966f3f9c2dca596967501d00753282b395fc Author: Zhang Yuchen Date: Sun Oct 9 17:18:09 2022 +0800 ipmi: fix msg stack when IPMI is disconnected If you continue to access and send messages at a high frequency (once every 55s) when the IPMI is disconnected, messages will accumulate in intf->[hp_]xmit_msg. If it lasts long enough, it takes up a lot of memory. The reason is that if IPMI is disconnected, each message will be set to IDLE after it returns to HOSED through IDLE->ERROR0->HOSED. The next message goes through the same process when it comes in. This process needs to wait for IBF_TIMEOUT * (MAX_ERROR_RETRIES + 1) = 55s. Each message takes 55S to destroy. This results in a continuous increase in memory. I find that if I wait 5 seconds after the first message fails, the status changes to ERROR0 in smi_timeout(). The next message will return the error code IPMI_NOT_IN_MY_STATE_ERR directly without wait. This is more in line with our needs. So instead of setting each message state to IDLE after it reaches the state HOSED, set state to ERROR0. After testing, the problem has been solved, no matter how many consecutive sends, will not cause continuous memory growth. It also returns to normal immediately after the IPMI is restored. In addition, the HOSED state should also count as invalid. So the HOSED is removed from the invalid judgment in start_kcs_transaction(). The verification operations are as follows: 1. Use BPF to record the ipmi_alloc/free_smi_msg(). $ bpftrace -e 'kretprobe:ipmi_alloc_recv_msg {printf("alloc %p\n",retval);} kprobe:free_recv_msg {printf("free %p\n",arg0)}' 2. Exec `date; time for x in $(seq 1 2); do ipmitool mc info; done`. 3. Record the output of `time` and when free all msgs. Before: `time` takes 120s, This is because `ipmitool mc info` send 4 msgs and waits only 15 seconds for each message. Last msg is free after 440s. $ bpftrace -e 'kretprobe:ipmi_alloc_recv_msg {printf("alloc %p\n",retval);} kprobe:free_recv_msg {printf("free %p\n",arg0)}' Oct 05 11:40:55 Attaching 2 probes... Oct 05 11:41:12 alloc 0xffff9558a05f0c00 Oct 05 11:41:27 alloc 0xffff9558a05f1a00 Oct 05 11:41:42 alloc 0xffff9558a05f0000 Oct 05 11:41:57 alloc 0xffff9558a05f1400 Oct 05 11:42:07 free 0xffff9558a05f0c00 Oct 05 11:42:07 alloc 0xffff9558a05f7000 Oct 05 11:42:22 alloc 0xffff9558a05f2a00 Oct 05 11:42:37 alloc 0xffff9558a05f5a00 Oct 05 11:42:52 alloc 0xffff9558a05f3a00 Oct 05 11:43:02 free 0xffff9558a05f1a00 Oct 05 11:43:57 free 0xffff9558a05f0000 Oct 05 11:44:52 free 0xffff9558a05f1400 Oct 05 11:45:47 free 0xffff9558a05f7000 Oct 05 11:46:42 free 0xffff9558a05f2a00 Oct 05 11:47:37 free 0xffff9558a05f5a00 Oct 05 11:48:32 free 0xffff9558a05f3a00 $ root@dc00-pb003-t106-n078:~# date;time for x in $(seq 1 2); do ipmitool mc info; done Wed Oct 5 11:41:12 CST 2022 No data available Get Device ID command failed No data available No data available No valid response received Get Device ID command failed: Unspecified error No data available Get Device ID command failed No data available No data available No valid response received No data available Get Device ID command failed real 1m55.052s user 0m0.001s sys 0m0.001s After: `time` takes 55s, all msgs is returned and free after 55s. $ bpftrace -e 'kretprobe:ipmi_alloc_recv_msg {printf("alloc %p\n",retval);} kprobe:free_recv_msg {printf("free %p\n",arg0)}' Oct 07 16:30:35 Attaching 2 probes... Oct 07 16:30:45 alloc 0xffff955943aa9800 Oct 07 16:31:00 alloc 0xffff955943aacc00 Oct 07 16:31:15 alloc 0xffff955943aa8c00 Oct 07 16:31:30 alloc 0xffff955943aaf600 Oct 07 16:31:40 free 0xffff955943aa9800 Oct 07 16:31:40 free 0xffff955943aacc00 Oct 07 16:31:40 free 0xffff955943aa8c00 Oct 07 16:31:40 free 0xffff955943aaf600 Oct 07 16:31:40 alloc 0xffff9558ec8f7e00 Oct 07 16:31:40 free 0xffff9558ec8f7e00 Oct 07 16:31:40 alloc 0xffff9558ec8f7800 Oct 07 16:31:40 free 0xffff9558ec8f7800 Oct 07 16:31:40 alloc 0xffff9558ec8f7e00 Oct 07 16:31:40 free 0xffff9558ec8f7e00 Oct 07 16:31:40 alloc 0xffff9558ec8f7800 Oct 07 16:31:40 free 0xffff9558ec8f7800 root@dc00-pb003-t106-n078:~# date;time for x in $(seq 1 2); do ipmitool mc info; done Fri Oct 7 16:30:45 CST 2022 No data available Get Device ID command failed No data available No data available No valid response received Get Device ID command failed: Unspecified error Get Device ID command failed: 0xd5 Command not supported in present state Get Device ID command failed: Command not supported in present state real 0m55.038s user 0m0.001s sys 0m0.001s Signed-off-by: Zhang Yuchen Message-Id: <20221009091811.40240-2-zhangyuchen.lcr@bytedance.com> Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_kcs_sm.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 36992eb6b9b83f7f9cdc8e74fb5799d7b52e83e9 Author: Zhang Yuchen Date: Fri Oct 7 17:26:17 2022 +0800 ipmi: fix memleak when unload ipmi driver After the IPMI disconnect problem, the memory kept rising and we tried to unload the driver to free the memory. However, only part of the free memory is recovered after the driver is uninstalled. Using ebpf to hook free functions, we find that neither ipmi_user nor ipmi_smi_msg is free, only ipmi_recv_msg is free. We find that the deliver_smi_err_response call in clean_smi_msgs does the destroy processing on each message from the xmit_msg queue without checking the return value and free ipmi_smi_msg. deliver_smi_err_response is called only at this location. Adding the free handling has no effect. To verify, try using ebpf to trace the free function. $ bpftrace -e 'kretprobe:ipmi_alloc_recv_msg {printf("alloc rcv %p\n",retval);} kprobe:free_recv_msg {printf("free recv %p\n", arg0)} kretprobe:ipmi_alloc_smi_msg {printf("alloc smi %p\n", retval);} kprobe:free_smi_msg {printf("free smi %p\n",arg0)}' Signed-off-by: Zhang Yuchen Message-Id: <20221007092617.87597-4-zhangyuchen.lcr@bytedance.com> [Fixed the comment above handle_one_recv_msg().] Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f6f1234d98cce69578bfac79df147a1f6660596c Author: Zhang Yuchen Date: Fri Oct 7 17:26:16 2022 +0800 ipmi: fix long wait in unload when IPMI disconnect When fixing the problem mentioned in PATCH1, we also found the following problem: If the IPMI is disconnected and in the sending process, the uninstallation driver will be stuck for a long time. The main problem is that uninstalling the driver waits for curr_msg to be sent or HOSED. After stopping tasklet, the only place to trigger the timeout mechanism is the circular poll in shutdown_smi. The poll function delays 10us and calls smi_event_handler(smi_info,10). Smi_event_handler deducts 10us from kcs->ibf_timeout. But the poll func is followed by schedule_timeout_uninterruptible(1). The time consumed here is not counted in kcs->ibf_timeout. So when 10us is deducted from kcs->ibf_timeout, at least 1 jiffies has actually passed. The waiting time has increased by more than a hundredfold. Now instead of calling poll(). call smi_event_handler() directly and calculate the elapsed time. For verification, you can directly use ebpf to check the kcs-> ibf_timeout for each call to kcs_event() when IPMI is disconnected. Decrement at normal rate before unloading. The decrement rate becomes very slow after unloading. $ bpftrace -e 'kprobe:kcs_event {printf("kcs->ibftimeout : %d\n", *(arg0+584));}' Signed-off-by: Zhang Yuchen Message-Id: <20221007092617.87597-3-zhangyuchen.lcr@bytedance.com> Signed-off-by: Corey Minyard Cc: stable@vger.kernel.org drivers/char/ipmi/ipmi_si_intf.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit f90bc0f97f2b65af233a37b2e32fc81871a1e3cf Author: Andrew Jeffery Date: Sat Aug 13 00:17:41 2022 +0930 ipmi: kcs: Poll OBF briefly to reduce OBE latency The ASPEED KCS devices don't provide a BMC-side interrupt for the host reading the output data register (ODR). The act of the host reading ODR clears the output buffer full (OBF) flag in the status register (STR), informing the BMC it can transmit a subsequent byte. On the BMC side the KCS client must enable the OBE event *and* perform a subsequent read of STR anyway to avoid races - the polling provides a window for the host to read ODR if data was freshly written while minimising BMC-side latency. Fixes: 28651e6c4237 ("ipmi: kcs_bmc: Allow clients to control KCS IRQ state") Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Message-Id: <20220812144741.240315-1-andrew@aj.id.au> Signed-off-by: Corey Minyard drivers/char/ipmi/kcs_bmc_aspeed.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit c25c782d349e10b1d6bcabf2e949111e0a8376cc Author: Quan Nguyen Date: Tue Oct 4 16:31:05 2022 +0700 bindings: ipmi: Add binding for SSIF BMC driver Add device tree binding document for the SSIF BMC driver. Signed-off-by: Quan Nguyen Reviewed-by: Rob Herring Message-Id: <20221004093106.1653317-3-quan@os.amperecomputing.com> Signed-off-by: Corey Minyard .../devicetree/bindings/ipmi/ssif-bmc.yaml | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit dd2bc5cc9e25554546f16661f8de1dcb8033dde0 Author: Quan Nguyen Date: Tue Oct 4 16:31:04 2022 +0700 ipmi: ssif_bmc: Add SSIF BMC driver The SMBus system interface (SSIF) IPMI BMC driver can be used to perform in-band IPMI communication with their host in management (BMC) side. Thanks Dan for the copy_from_user() fix in the link below. Link: https://lore.kernel.org/linux-arm-kernel/20220310114119.13736-4-quan@os.amperecomputing.com/ Signed-off-by: Quan Nguyen Message-Id: <20221004093106.1653317-2-quan@os.amperecomputing.com> Signed-off-by: Corey Minyard drivers/char/ipmi/Kconfig | 10 + drivers/char/ipmi/Makefile | 1 + drivers/char/ipmi/ssif_bmc.c | 873 +++++++++++++++++++++++++++++++++++++ include/uapi/linux/ipmi_ssif_bmc.h | 18 + 4 files changed, 902 insertions(+) commit 5c9a92dec3235b0c1d51e92860f8014753161593 Author: Peter Zijlstra (Intel) Date: Mon Oct 17 16:41:20 2022 +0200 x86/bugs: Add retbleed=force Debug aid, allows running retbleed=force,stuff on non-affected uarchs Signed-off-by: Peter Zijlstra (Intel) arch/x86/kernel/cpu/bugs.c | 2 ++ 1 file changed, 2 insertions(+) commit d82a0345cf218f5050f5ad913e1ae6c579105731 Author: Thomas Gleixner Date: Thu Sep 15 13:11:38 2022 +0200 x86/retbleed: Add call depth tracking mitigation The fully secure mitigation for RSB underflow on Intel SKL CPUs is IBRS, which inflicts up to 30% penalty for pathological syscall heavy work loads. Software based call depth tracking and RSB refill is not perfect, but reduces the attack surface massively. The penalty for the pathological case is about 8% which is still annoying but definitely more palatable than IBRS. Add a retbleed=stuff command line option to enable the call depth tracking and software refill of the RSB. This gives admins a choice. IBeeRS are safe and cause headaches, call depth tracking is considered to be s(t)ufficiently safe. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111149.029587352@infradead.org arch/x86/kernel/cpu/bugs.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit ee3e2469b3463d28ca4cde20e0283319ac6a562d Author: Peter Zijlstra Date: Thu Sep 15 13:11:37 2022 +0200 x86/ftrace: Make it call depth tracking aware Since ftrace has trampolines, don't use thunks for the __fentry__ site but instead require that every function called from there includes accounting. This very much includes all the direct-call functions. Additionally, ftrace uses ROP tricks in two places: - return_to_handler(), and - ftrace_regs_caller() when pt_regs->orig_ax is set by a direct-call. return_to_handler() already uses a retpoline to replace an indirect-jump to defeat IBT, since this is a jump-type retpoline, make sure there is no accounting done and ALTERNATIVE the RET into a ret. ftrace_regs_caller() does much the same and gets the same treatment. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111148.927545073@infradead.org arch/x86/include/asm/nospec-branch.h | 9 +++++++++ arch/x86/kernel/callthunks.c | 2 +- arch/x86/kernel/ftrace.c | 16 ++++++++++++---- arch/x86/kernel/ftrace_64.S | 22 ++++++++++++++++++++-- arch/x86/net/bpf_jit_comp.c | 6 ++++++ kernel/trace/trace_selftest.c | 9 ++++++++- samples/ftrace/ftrace-direct-modify.c | 3 +++ samples/ftrace/ftrace-direct-multi-modify.c | 3 +++ samples/ftrace/ftrace-direct-multi.c | 2 ++ samples/ftrace/ftrace-direct-too.c | 2 ++ samples/ftrace/ftrace-direct.c | 2 ++ 11 files changed, 68 insertions(+), 8 deletions(-) commit 36b64f101219dd9e6e4f0ea880b64e8a90da547b Author: Peter Zijlstra Date: Thu Sep 15 13:11:36 2022 +0200 x86/ftrace: Rebalance RSB ftrace_regs_caller() uses a PUSH;RET pattern to tail-call into a direct-call function, this unbalances the RSB, fix that. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111148.823216933@infradead.org arch/x86/kernel/ftrace_64.S | 11 +++++++++++ 1 file changed, 11 insertions(+) commit eac828eaef295cd0cc8b58f55fa5c8401fdc2370 Author: Peter Zijlstra Date: Thu Sep 15 13:11:35 2022 +0200 x86/ftrace: Remove ftrace_epilogue() Remove the weird jumps to RET and simply use RET. This then promotes ftrace_stub() to a real function; which becomes important for kcfi. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111148.719080593@infradead.org arch/x86/kernel/ftrace_64.S | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit b2e9dfe54be4d023124d588d6f03d16a9c0d2507 Author: Thomas Gleixner Date: Thu Sep 15 13:11:34 2022 +0200 x86/bpf: Emit call depth accounting if required Ensure that calls in BPF jitted programs are emitting call depth accounting when enabled to keep the call/return balanced. The return thunk jump is already injected due to the earlier retbleed mitigations. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111148.615413406@infradead.org arch/x86/include/asm/alternative.h | 6 ++++++ arch/x86/kernel/callthunks.c | 19 +++++++++++++++++++ arch/x86/net/bpf_jit_comp.c | 32 +++++++++++++++++++++++--------- 3 files changed, 48 insertions(+), 9 deletions(-) commit 396e0b8e09e86440c2119d12c2101110d3cd5bf9 Author: Peter Zijlstra Date: Thu Sep 15 13:11:33 2022 +0200 x86/orc: Make it callthunk aware Callthunks addresses on the stack would confuse the ORC unwinder. Handle them correctly and tell ORC to proceed further down the stack. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111148.511637628@infradead.org arch/x86/include/asm/alternative.h | 5 +++++ arch/x86/kernel/callthunks.c | 13 +++++++++++++ arch/x86/kernel/unwind_orc.c | 21 ++++++++++++++++++++- 3 files changed, 38 insertions(+), 1 deletion(-) commit f1389181622a08d6f1c71407a64df36b809d632b Author: Peter Zijlstra Date: Thu Sep 15 13:11:32 2022 +0200 kallsyms: Take callthunks into account Since the pre-symbol function padding is an integral part of the symbol make kallsyms report it as part of the symbol by reporting it as sym-x instead of prev_sym+y. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111148.409656012@infradead.org kernel/kallsyms.c | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) commit 7825451fa4dc04660f1f53d236e4302161d0ebd1 Author: Peter Zijlstra Date: Thu Sep 15 13:11:31 2022 +0200 static_call: Add call depth tracking support When indirect calls are switched to direct calls then it has to be ensured that the call target is not the function, but the call thunk when call depth tracking is enabled. But static calls are available before call thunks have been set up. Ensure a second run through the static call patching code after call thunks have been created. When call thunks are not enabled this has no side effects. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111148.306100465@infradead.org arch/x86/include/asm/alternative.h | 5 +++++ arch/x86/kernel/callthunks.c | 18 ++++++++++++++++++ arch/x86/kernel/static_call.c | 1 + include/linux/static_call.h | 2 ++ kernel/static_call_inline.c | 23 ++++++++++++++++++----- 5 files changed, 44 insertions(+), 5 deletions(-) commit f5c1bb2afe93396d41c5cbdcb909b08a75b8dde4 Author: Thomas Gleixner Date: Thu Sep 15 13:11:30 2022 +0200 x86/calldepth: Add ret/call counting for debug Add a debuigfs mechanism to validate the accounting, e.g. vs. call/ret balance and to gather statistics about the stuffing to call ratio. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111148.204285506@infradead.org arch/x86/include/asm/nospec-branch.h | 36 +++++++++++++++++++++--- arch/x86/kernel/callthunks.c | 53 ++++++++++++++++++++++++++++++++++++ arch/x86/lib/retpoline.S | 7 ++++- 3 files changed, 91 insertions(+), 5 deletions(-) commit bbaceb189a21d7245e8063701fe10985396028f9 Author: Thomas Gleixner Date: Thu Sep 15 13:11:29 2022 +0200 x86/retbleed: Add SKL call thunk Add the actual SKL call thunk for call depth accounting. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111148.101125588@infradead.org arch/x86/kernel/callthunks.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 3b6c1747da48ff40ab746b0e860cffe83619f5c5 Author: Peter Zijlstra Date: Thu Sep 15 13:11:28 2022 +0200 x86/retpoline: Add SKL retthunk retpolines Ensure that retpolines do the proper call accounting so that the return accounting works correctly. Specifically; retpolines are used to replace both 'jmp *%reg' and 'call *%reg', however these two cases do not have the same accounting requirements. Therefore split things up and provide two different retpoline arrays for SKL. The 'jmp *%reg' case needs no accounting, the __x86_indirect_jump_thunk_array[] covers this. The retpoline is changed to not use the return thunk; it's a simple call;ret construct. [ strictly speaking it should do: andq $(~0x1f), PER_CPU_VAR(__x86_call_depth) but we can argue this can be covered by the fuzz we already have in the accounting depth (12) vs the RSB depth (16) ] The 'call *%reg' case does need accounting, the __x86_indirect_call_thunk_array[] covers this. Again, this retpoline avoids the use of the return-thunk, in this case to avoid double accounting. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111147.996634749@infradead.org arch/x86/include/asm/nospec-branch.h | 12 ++++++ arch/x86/kernel/alternative.c | 59 ++++++++++++++++++++++++++++-- arch/x86/lib/retpoline.S | 71 ++++++++++++++++++++++++++++++++---- arch/x86/net/bpf_jit_comp.c | 5 ++- 4 files changed, 135 insertions(+), 12 deletions(-) commit 5d8213864ade86b48fc492584ea86d65a62f892e Author: Thomas Gleixner Date: Thu Sep 15 13:11:27 2022 +0200 x86/retbleed: Add SKL return thunk To address the Intel SKL RSB underflow issue in software it's required to do call depth tracking. Provide a return thunk for call depth tracking on Intel SKL CPUs. The tracking does not use a counter. It uses uses arithmetic shift right on call entry and logical shift left on return. The depth tracking variable is initialized to 0x8000.... when the call depth is zero. The arithmetic shift right sign extends the MSB and saturates after the 12th call. The shift count is 5 so the tracking covers 12 nested calls. On return the variable is shifted left logically so it becomes zero again. CALL RET 0: 0x8000000000000000 0x0000000000000000 1: 0xfc00000000000000 0xf000000000000000 ... 11: 0xfffffffffffffff8 0xfffffffffffffc00 12: 0xffffffffffffffff 0xffffffffffffffe0 After a return buffer fill the depth is credited 12 calls before the next stuffing has to take place. There is a inaccuracy for situations like this: 10 calls 5 returns 3 calls 4 returns 3 calls .... The shift count might cause this to be off by one in either direction, but there is still a cushion vs. the RSB depth. The algorithm does not claim to be perfect, but it should obfuscate the problem enough to make exploitation extremly difficult. The theory behind this is: RSB is a stack with depth 16 which is filled on every call. On the return path speculation "pops" entries to speculate down the call chain. Once the speculative RSB is empty it switches to other predictors, e.g. the Branch History Buffer, which can be mistrained by user space and misguide the speculation path to a gadget. Call depth tracking is designed to break this speculation path by stuffing speculation trap calls into the RSB which are never getting a corresponding return executed. This stalls the prediction path until it gets resteered, The assumption is that stuffing at the 12th return is sufficient to break the speculation before it hits the underflow and the fallback to the other predictors. Testing confirms that it works. Johannes, one of the retbleed researchers. tried to attack this approach but failed. There is obviously no scientific proof that this will withstand future research progress, but all we can do right now is to speculate about it. The SAR/SHL usage was suggested by Andi Kleen. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111147.890071690@infradead.org arch/x86/entry/entry_64.S | 10 +-- arch/x86/include/asm/current.h | 3 + arch/x86/include/asm/nospec-branch.h | 121 +++++++++++++++++++++++++++++++++-- arch/x86/kernel/asm-offsets.c | 3 + arch/x86/kvm/svm/vmenter.S | 1 + arch/x86/lib/retpoline.S | 31 +++++++++ 6 files changed, 159 insertions(+), 10 deletions(-) commit 52354973573cc260ff2fc661cb28ff8eaa7b879b Author: Peter Zijlstra Date: Thu Sep 15 13:11:26 2022 +0200 x86/asm: Provide ALTERNATIVE_3 Fairly straight forward adaptation/extention of ALTERNATIVE_2. Required for call depth tracking. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111147.787711192@infradead.org arch/x86/include/asm/alternative.h | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) commit 770ae1b709528a6a173b5c7b183818ee9b45e376 Author: Peter Zijlstra Date: Thu Sep 15 13:11:25 2022 +0200 x86/returnthunk: Allow different return thunks In preparation for call depth tracking on Intel SKL CPUs, make it possible to patch in a SKL specific return thunk. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111147.680469665@infradead.org arch/x86/include/asm/nospec-branch.h | 6 ++++++ arch/x86/kernel/alternative.c | 17 +++++++++++++---- arch/x86/kernel/ftrace.c | 2 +- arch/x86/kernel/static_call.c | 2 +- arch/x86/net/bpf_jit_comp.c | 2 +- 5 files changed, 22 insertions(+), 7 deletions(-) commit eaf44c816ed8d1ef94c354e3ed47d53cd5a5cb13 Author: Thomas Gleixner Date: Thu Sep 15 13:11:24 2022 +0200 x86/modules: Add call patching As for the builtins create call thunks and patch the call sites to call the thunk on Intel SKL CPUs for retbleed mitigation. Note, that module init functions are ignored for sake of simplicity because loading modules is not something which is done in high frequent loops and the attacker has not really a handle on when this happens in order to launch a matching attack. The depth tracking will still work for calls into the builtins and because the call is not accounted it will underflow faster and overstuff, but that's mitigated by the saturating counter and the side effect is only temporary. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111147.575673066@infradead.org arch/x86/include/asm/alternative.h | 5 +++++ arch/x86/kernel/callthunks.c | 19 +++++++++++++++++++ arch/x86/kernel/module.c | 20 +++++++++++++++++++- 3 files changed, 43 insertions(+), 1 deletion(-) commit e81dc127ef69887c72735a3e3868930e2bf313ed Author: Thomas Gleixner Date: Thu Sep 15 13:11:23 2022 +0200 x86/callthunks: Add call patching for call depth tracking Mitigating the Intel SKL RSB underflow issue in software requires to track the call depth. That is every CALL and every RET need to be intercepted and additional code injected. The existing retbleed mitigations already include means of redirecting RET to __x86_return_thunk; this can be re-purposed and RET can be redirected to another function doing RET accounting. CALL accounting will use the function padding introduced in prior patches. For each CALL instruction, the destination symbol's padding is rewritten to do the accounting and the CALL instruction is adjusted to call into the padding. This ensures only affected CPUs pay the overhead of this accounting. Unaffected CPUs will leave the padding unused and have their 'JMP __x86_return_thunk' replaced with an actual 'RET' instruction. Objtool has been modified to supply a .call_sites section that lists all the 'CALL' instructions. Additionally the paravirt instruction sites are iterated since they will have been patched from an indirect call to direct calls (or direct instructions in which case it'll be ignored). Module handling and the actual thunk code for SKL will be added in subsequent steps. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111147.470877038@infradead.org arch/x86/Kconfig | 12 ++ arch/x86/include/asm/alternative.h | 12 ++ arch/x86/kernel/Makefile | 2 + arch/x86/kernel/alternative.c | 6 + arch/x86/kernel/callthunks.c | 251 +++++++++++++++++++++++++++++++++++ arch/x86/kernel/head_64.S | 1 + arch/x86/kernel/relocate_kernel_64.S | 5 +- arch/x86/kernel/vmlinux.lds.S | 8 -- 8 files changed, 287 insertions(+), 10 deletions(-) commit 239f2e248ef12840178a3ed1a217f19b5fbfde26 Author: Thomas Gleixner Date: Thu Sep 15 13:11:22 2022 +0200 x86/paravirt: Make struct paravirt_call_site unconditionally available For the upcoming call thunk patching it's less ifdeffery when the data structure is unconditionally available. The code can then be trivially fenced off with IS_ENABLED(). Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111147.367853167@infradead.org arch/x86/include/asm/paravirt.h | 4 ++-- arch/x86/include/asm/paravirt_types.h | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) commit c22cf380c79c4bb0e502b0343f57271b17626424 Author: Thomas Gleixner Date: Thu Sep 15 13:11:21 2022 +0200 x86/entry: Make some entry symbols global paranoid_entry(), error_entry() and xen_error_entry() have to be exempted from call accounting by thunk patching because they are before UNTRAIN_RET. Expose them so they are available in the alternative code. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111147.265598113@infradead.org arch/x86/entry/entry_64.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit fe54d0793796ccdb213d8ea7bff0b49903b6afaa Author: Thomas Gleixner Date: Thu Sep 15 13:11:20 2022 +0200 x86/alternatives: Provide text_poke_copy_locked() The upcoming call thunk patching must hold text_mutex and needs access to text_poke_copy(), which takes text_mutex. Provide a _locked postfixed variant to expose the inner workings. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111147.159977224@infradead.org arch/x86/include/asm/text-patching.h | 1 + arch/x86/kernel/alternative.c | 37 +++++++++++++++++++++--------------- 2 files changed, 23 insertions(+), 15 deletions(-) commit 80e4c1cd42fff110bfdae8fce7ac4f22465f9664 Author: Thomas Gleixner Date: Thu Sep 15 13:11:19 2022 +0200 x86/retbleed: Add X86_FEATURE_CALL_DEPTH Intel SKL CPUs fall back to other predictors when the RSB underflows. The only microcode mitigation is IBRS which is insanely expensive. It comes with performance drops of up to 30% depending on the workload. A way less expensive, but nevertheless horrible mitigation is to track the call depth in software and overeagerly fill the RSB when returns underflow the software counter. Provide a configuration symbol and a CPU misfeature bit. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111147.056176424@infradead.org arch/x86/Kconfig | 19 +++++++++++++++++++ arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/disabled-features.h | 9 ++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) commit bea75b33895f7f87f0c40023e36a2d087e87ffa1 Author: Thomas Gleixner Date: Thu Sep 15 13:11:18 2022 +0200 x86/Kconfig: Introduce function padding Now that all functions are 16 byte aligned, add 16 bytes of NOP padding in front of each function. This prepares things for software call stack tracking and kCFI/FineIBT. This significantly increases kernel .text size, around 5.1% on a x86_64-defconfig-ish build. However, per the random access argument used for alignment, these 16 extra bytes are code that wouldn't be used. Performance measurements back this up by showing no significant performance regressions. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111146.950884492@infradead.org arch/x86/Kconfig | 20 ++++++++++++++++- arch/x86/Makefile | 6 +++++ arch/x86/entry/vdso/Makefile | 3 ++- arch/x86/include/asm/linkage.h | 51 +++++++++++++++++++++++++++++++++++++++--- include/linux/bpf.h | 4 ++++ 5 files changed, 79 insertions(+), 5 deletions(-) commit 8f7c0d8b23c3f5f740a48db31ebadef28af17a22 Author: Thomas Gleixner Date: Thu Sep 15 13:11:17 2022 +0200 x86/Kconfig: Add CONFIG_CALL_THUNKS In preparation for mitigating the Intel SKL RSB underflow issue in software, add a new configuration symbol which allows to build the required call thunk infrastructure conditionally. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111146.849523555@infradead.org arch/x86/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit cb855971d717a2dd752241f66fedad9dc178388c Author: Thomas Gleixner Date: Thu Sep 15 13:11:16 2022 +0200 x86/putuser: Provide room for padding Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111146.746429822@infradead.org arch/x86/lib/putuser.S | 62 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 13 deletions(-) commit ef79ed20e3ae9ee9ac2e0f3a4e12814893972e63 Author: Peter Zijlstra Date: Thu Sep 15 13:11:14 2022 +0200 x86/entry: Make sync_regs() invocation a tail call No point in having a call there. Spare the call/ret overhead. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111146.539578813@infradead.org arch/x86/entry/entry_64.S | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 5a9c361a416fc3a3301e859ff09587cc1b933eb8 Author: Peter Zijlstra Date: Mon Jul 11 11:49:50 2022 +0200 objtool: Allow STT_NOTYPE -> STT_FUNC+0 sibling-calls Teach objtool about STT_NOTYPE -> STT_FUNC+0 sibling calls. Doing do allows slightly simpler .S files. There is a slight complication in that we specifically do not want to allow sibling calls from symbol holes (previously covered by STT_WEAK symbols) -- such things exist where a weak function has a .cold subfunction for example. Additionally, STT_NOTYPE tail-calls are allowed to happen with a modified stack frame, they don't need to obey the normal rules after all. Signed-off-by: Peter Zijlstra (Intel) tools/objtool/check.c | 74 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 27 deletions(-) commit dbcdbdfdf137b49144204571f1a5e5dc01b8aaad Author: Peter Zijlstra Date: Thu Sep 22 22:03:50 2022 +0200 objtool: Rework instruction -> symbol mapping Currently insn->func contains a instruction -> symbol link for STT_FUNC symbols. A NULL value is assumed to mean STT_NOTYPE. However, there are also instructions not covered by any symbol at all. This can happen due to __weak symbols for example. Since the current scheme cannot differentiate between no symbol and STT_NOTYPE symbol, change things around. Make insn->sym point to any symbol type such that !insn->sym means no symbol and add a helper insn_func() that check the sym->type to retain the old functionality. This then prepares the way to add code that depends on the distinction between STT_NOTYPE and no symbol at all. Signed-off-by: Peter Zijlstra (Intel) tools/objtool/check.c | 105 ++++++++++++++++++---------------- tools/objtool/include/objtool/check.h | 12 +++- 2 files changed, 66 insertions(+), 51 deletions(-) commit 08ef8c40112b8cd157515cd532f65cb82c934a76 Author: Peter Zijlstra Date: Thu Sep 15 13:11:13 2022 +0200 objtool: Allow symbol range comparisons for IBT/ENDBR A semi common pattern is where code checks if a code address is within a specific range. All text addresses require either ENDBR or ANNOTATE_ENDBR, however the ANNOTATE_NOENDBR past the range is unnatural. Instead, suppress this warning when this is exactly at the end of a symbol that itself starts with either ENDBR/ANNOTATE_ENDBR. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111146.434642471@infradead.org arch/x86/entry/entry_64_compat.S | 1 - tools/objtool/check.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) commit 5da6aea375cde499fdfac3cde4f26df4a840eb9f Author: Peter Zijlstra Date: Thu Sep 15 13:11:12 2022 +0200 objtool: Fix find_{symbol,func}_containing() The current find_{symbol,func}_containing() functions are broken in the face of overlapping symbols, exactly the case that is needed for a new ibt/endbr supression. Import interval_tree_generic.h into the tools tree and convert the symbol tree to an interval tree to support proper range stabs. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111146.330203761@infradead.org tools/include/linux/interval_tree_generic.h | 187 ++++++++++++++++++++++++++++ tools/objtool/elf.c | 93 ++++++-------- tools/objtool/include/objtool/elf.h | 3 +- 3 files changed, 229 insertions(+), 54 deletions(-) commit 0c0a6d8934e2081df93ba0bfc0cf615cc9c06988 Author: Peter Zijlstra Date: Thu Sep 15 13:11:10 2022 +0200 objtool: Add --hacks=skylake Make the call/func sections selectable via the --hacks option. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111146.120821440@infradead.org scripts/Makefile.lib | 1 + tools/objtool/builtin-check.c | 7 ++++++- tools/objtool/check.c | 10 ++++++---- tools/objtool/include/objtool/builtin.h | 1 + 4 files changed, 14 insertions(+), 5 deletions(-) commit 00abd38408127a57861698a8bffba65849de6bbd Author: Peter Zijlstra Date: Thu Sep 15 13:11:09 2022 +0200 objtool: Add .call_sites section In preparation for call depth tracking provide a section which collects all direct calls. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111146.016511961@infradead.org arch/x86/kernel/vmlinux.lds.S | 7 +++++ tools/objtool/check.c | 51 +++++++++++++++++++++++++++++++++ tools/objtool/include/objtool/objtool.h | 1 + tools/objtool/objtool.c | 1 + 4 files changed, 60 insertions(+) commit 6644ee846cb983437063da8fd24b7cae671fd019 Author: Peter Zijlstra Date: Thu Sep 15 13:11:08 2022 +0200 objtool: Track init section For future usage of .init.text exclusion track the init section in the instruction decoder and use the result in retpoline validation. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111145.910334431@infradead.org tools/objtool/check.c | 17 ++++++++++------- tools/objtool/include/objtool/elf.h | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) commit 61c6065ef7ec0447a280179d04b2d81c80c2f479 Author: Peter Zijlstra Date: Thu Sep 15 13:11:07 2022 +0200 objtool: Allow !PC relative relocations Objtool doesn't currently much like per-cpu usage in alternatives: arch/x86/entry/entry_64.o: warning: objtool: .altinstr_replacement+0xf: unsupported relocation in alternatives section f: 65 c7 04 25 00 00 00 00 00 00 00 80 movl $0x80000000,%gs:0x0 13: R_X86_64_32S __x86_call_depth Since the R_X86_64_32S relocation is location invariant (it's computation doesn't include P - the address of the location itself), it can be trivially allowed. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111145.806607235@infradead.org tools/objtool/arch/x86/decode.c | 24 ++++++++++++++++++++++++ tools/objtool/check.c | 2 +- tools/objtool/include/objtool/arch.h | 2 ++ 3 files changed, 27 insertions(+), 1 deletion(-) commit 5b71ac8a2a3185da34a6556e791b533b48183a41 Author: Peter Zijlstra (Intel) Date: Mon Oct 17 16:41:06 2022 +0200 x86: Fixup asm-offsets duplicate It turns out that 'stack_canary_offset' is a variable name; shadowing that with a #define is ripe of fail when the asm-offsets.h header gets included. Rename the thing. Signed-off-by: Peter Zijlstra (Intel) arch/x86/entry/entry_64.S | 2 +- arch/x86/kernel/asm-offsets_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7fcecafebed90d03f35bec6e147fc0b5f6e1bc71 Author: Thomas Gleixner Date: Thu Sep 15 13:11:06 2022 +0200 x86/softirq: Move softirq pending next to current task Another hot variable which is strict per CPU and benefits from being in the same cache line. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111145.702133710@infradead.org arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/hardirq.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit d7b6d709a76a4f4ef3108ac41e1b39eb80f5c084 Author: Thomas Gleixner Date: Thu Sep 15 13:11:05 2022 +0200 x86/percpu: Move irq_stack variables next to current_task Further extend struct pcpu_hot with the hard and soft irq stack pointers. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111145.599170752@infradead.org arch/x86/include/asm/current.h | 6 ++++++ arch/x86/include/asm/irq_stack.h | 12 ++++++------ arch/x86/include/asm/processor.h | 4 ---- arch/x86/kernel/cpu/common.c | 3 --- arch/x86/kernel/dumpstack_32.c | 4 ++-- arch/x86/kernel/dumpstack_64.c | 2 +- arch/x86/kernel/irq_32.c | 13 +++++-------- arch/x86/kernel/irq_64.c | 6 +++--- arch/x86/kernel/process_64.c | 2 +- 9 files changed, 24 insertions(+), 28 deletions(-) commit c063a217bc0726c2560138229de5673dbb253a02 Author: Thomas Gleixner Date: Thu Sep 15 13:11:04 2022 +0200 x86/percpu: Move current_top_of_stack next to current_task Extend the struct pcpu_hot cacheline with current_top_of_stack; another very frequently used value. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111145.493038635@infradead.org arch/x86/entry/entry_32.S | 4 ++-- arch/x86/entry/entry_64.S | 6 +++--- arch/x86/entry/entry_64_compat.S | 6 +++--- arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/processor.h | 4 +--- arch/x86/kernel/asm-offsets.c | 2 ++ arch/x86/kernel/cpu/common.c | 12 +----------- arch/x86/kernel/process_32.c | 4 ++-- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- arch/x86/kernel/traps.c | 4 ++-- 11 files changed, 19 insertions(+), 28 deletions(-) commit 7443b296e699e6922f5be243c8d2e316de8cacbe Author: Thomas Gleixner Date: Thu Sep 15 13:11:03 2022 +0200 x86/percpu: Move cpu_number next to current_task Also add cpu_number to the pcpu_hot structure, it is often referenced and this cacheline is there. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111145.387678283@infradead.org arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/smp.h | 12 +++++------- arch/x86/kernel/setup_percpu.c | 5 +---- 3 files changed, 7 insertions(+), 11 deletions(-) commit 64701838bf0575ef8acb1ad2db5934e864f3e6c3 Author: Thomas Gleixner Date: Thu Sep 15 13:11:02 2022 +0200 x86/percpu: Move preempt_count next to current_task Add preempt_count to pcpu_hot, since it is once of the most used per-cpu variables. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111145.284170644@infradead.org arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/preempt.h | 27 ++++++++++++++------------- arch/x86/kernel/cpu/common.c | 8 +------- 3 files changed, 16 insertions(+), 20 deletions(-) commit e57ef2ed97c1d078973298658a8096644a1e9e09 Author: Thomas Gleixner Date: Thu Sep 15 13:11:01 2022 +0200 x86: Put hot per CPU variables into a struct The layout of per-cpu variables is at the mercy of the compiler. This can lead to random performance fluctuations from build to build. Create a structure to hold some of the hottest per-cpu variables, starting with current_task. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111145.179707194@infradead.org arch/x86/include/asm/current.h | 19 ++++++++++++++++--- arch/x86/kernel/cpu/common.c | 14 +++++--------- arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- 5 files changed, 24 insertions(+), 15 deletions(-) commit fdc9ee7e97aa2c1dfa7ebb092fffec40ffa59108 Author: Thomas Gleixner Date: Thu Sep 15 13:11:00 2022 +0200 crypto: x86/poly1305: Remove custom function alignment SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111145.073285765@infradead.org arch/x86/crypto/poly1305-x86_64-cryptogams.pl | 1 - 1 file changed, 1 deletion(-) commit e2c9475e88f70820270ca5cc81a1ae2fda262278 Author: Thomas Gleixner Date: Thu Sep 15 13:10:59 2022 +0200 crypto: twofish: Remove redundant alignments SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes. Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111144.971229477@infradead.org arch/x86/crypto/twofish-avx-x86_64-asm_64.S | 2 -- 1 file changed, 2 deletions(-) commit 2f93238b87ddbbe1b050ec48ab5843fc61346adb Author: Thomas Gleixner Date: Thu Sep 15 13:10:58 2022 +0200 crypto: x86/sm[34]: Remove redundant alignments SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes. Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous. ( this code couldn't seem to make up it's mind about what alignment it actually wanted, randomly mixing 8 and 16 bytes ) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111144.868540856@infradead.org arch/x86/crypto/sm3-avx-asm_64.S | 1 - arch/x86/crypto/sm4-aesni-avx-asm_64.S | 7 ------- arch/x86/crypto/sm4-aesni-avx2-asm_64.S | 6 ------ 3 files changed, 14 deletions(-) commit 3ba56d0b87113785413dfc5b9910d45001cc4eeb Author: Thomas Gleixner Date: Thu Sep 15 13:10:57 2022 +0200 crypto: x86/sha256: Remove custom alignments SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111144.766564176@infradead.org arch/x86/crypto/sha256-avx-asm.S | 1 - arch/x86/crypto/sha256-avx2-asm.S | 1 - arch/x86/crypto/sha256-ssse3-asm.S | 1 - arch/x86/crypto/sha256_ni_asm.S | 1 - 4 files changed, 4 deletions(-) commit c2a3ce6fdb122b12bc4cfffd28ecf8a9fb0d6736 Author: Thomas Gleixner Date: Thu Sep 15 13:10:56 2022 +0200 crypto: x86/sha1: Remove custom alignments SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111144.662580589@infradead.org arch/x86/crypto/sha1_ni_asm.S | 1 - 1 file changed, 1 deletion(-) commit 8b44221671ec45d725a4558ff7aa5ea90ecfc885 Author: Thomas Gleixner Date: Thu Sep 15 13:10:55 2022 +0200 crypto: x86/serpent: Remove redundant alignments SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes. Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111144.558544791@infradead.org arch/x86/crypto/serpent-avx-x86_64-asm_64.S | 2 -- arch/x86/crypto/serpent-avx2-asm_64.S | 2 -- 2 files changed, 4 deletions(-) commit ba1b270c20dfb7f7b7a076b1a97ef4b7dcb539b5 Author: Thomas Gleixner Date: Thu Sep 15 13:10:54 2022 +0200 crypto: x86/crct10dif-pcl: Remove redundant alignments SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes. Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111144.456602381@infradead.org arch/x86/crypto/crct10dif-pcl-asm_64.S | 1 - 1 file changed, 1 deletion(-) commit 88cdf02551f9aef9284d778ecd375c400555d900 Author: Thomas Gleixner Date: Thu Sep 15 13:10:53 2022 +0200 crypto: x86/cast5: Remove redundant alignments SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes. Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111144.353555711@infradead.org arch/x86/crypto/cast5-avx-x86_64-asm_64.S | 2 -- 1 file changed, 2 deletions(-) commit f6dabc817e1f0da8f4088734ad0b9814adad0bce Author: Thomas Gleixner Date: Thu Sep 15 13:10:52 2022 +0200 crypto: x86/camellia: Remove redundant alignments SYM_FUNC_START*() and friends already imply alignment, remove custom alignment hacks to make code consistent. This prepares for future function call ABI changes. Also, with having pushed the function alignment to 16 bytes, this custom alignment is completely superfluous. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111144.248229966@infradead.org arch/x86/crypto/camellia-aesni-avx-asm_64.S | 2 -- arch/x86/crypto/camellia-aesni-avx2-asm_64.S | 4 ---- 2 files changed, 6 deletions(-) commit 67e93ddd5d0b84ac17bddb13d98533e425282421 Author: Thomas Gleixner Date: Thu Sep 15 13:10:51 2022 +0200 x86/entry: Align SYM_CODE_START() variants Explicitly align a bunch of commonly called SYM_CODE_START() symbols. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111144.144068841@infradead.org arch/x86/entry/entry_64.S | 16 ++++++++++------ arch/x86/entry/thunk_64.S | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) commit 1d293758e548aa6ff65e4dd3f5a9bc2a34b38ce3 Author: Thomas Gleixner Date: Thu Sep 15 13:10:50 2022 +0200 x86/paravirt: Properly align PV functions Ensure inline asm functions are consistently aligned with compiler generated and SYM_FUNC_START*() functions. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220915111144.038540008@infradead.org arch/x86/include/asm/paravirt.h | 1 + arch/x86/include/asm/qspinlock_paravirt.h | 2 +- arch/x86/kernel/kvm.c | 1 + arch/x86/kernel/paravirt.c | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) commit 1934dc9a8a92fda36ab80cfd55edab1708dcdf9a Author: Peter Zijlstra Date: Thu Sep 15 13:10:49 2022 +0200 x86/error_inject: Align function properly Ensure inline asm functions are consistently aligned with compiler generated and SYM_FUNC_START*() functions. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111143.930201368@infradead.org arch/x86/lib/error-inject.c | 1 + 1 file changed, 1 insertion(+) commit 8eb5d34e77c63fde8af21c691bcf6e3cd87f7829 Author: Thomas Gleixner Date: Thu Sep 15 13:10:48 2022 +0200 x86/asm: Differentiate between code and function alignment Create SYM_F_ALIGN to differentiate alignment requirements between SYM_CODE and SYM_FUNC. This distinction is useful later when adding padding in front of functions; IOW this allows following the compiler's patchable-function-entry option. [peterz: Changelog] Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111143.824822743@infradead.org arch/x86/include/asm/linkage.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit d49a0626216b95cd4bf696f6acf55f39a16ab0bb Author: Peter Zijlstra Date: Thu Sep 15 13:10:47 2022 +0200 arch: Introduce CONFIG_FUNCTION_ALIGNMENT Generic function-alignment infrastructure. Architectures can select FUNCTION_ALIGNMENT_xxB symbols; the FUNCTION_ALIGNMENT symbol is then set to the largest such selected size, 0 otherwise. From this the -falign-functions compiler argument and __ALIGN macro are set. This incorporates the DEBUG_FORCE_FUNCTION_ALIGN_64B knob and future alignment requirements for x86_64 (later in this series) into a single place. NOTE: also removes the 0x90 filler byte from the generic __ALIGN primitive, that value makes no sense outside of x86. NOTE: .balign 0 reverts to a no-op. Requested-by: Linus Torvalds Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111143.719248727@infradead.org Makefile | 4 ++-- arch/Kconfig | 24 ++++++++++++++++++++++++ arch/ia64/Kconfig | 1 + arch/ia64/Makefile | 2 +- arch/x86/Kconfig | 2 ++ arch/x86/boot/compressed/head_64.S | 8 ++++++++ arch/x86/include/asm/linkage.h | 4 +--- include/asm-generic/vmlinux.lds.h | 4 ++-- include/linux/linkage.h | 4 ++-- lib/Kconfig.debug | 1 + 10 files changed, 44 insertions(+), 10 deletions(-) commit 24a9c543d2114d416f84e386c2fa90089bd97e4c Author: Thomas Gleixner Date: Thu Sep 15 13:10:46 2022 +0200 x86: Sanitize linker script The section ordering in the text section is more than suboptimal: ALIGN_ENTRY_TEXT_BEGIN ENTRY_TEXT ALIGN_ENTRY_TEXT_END SOFTIRQENTRY_TEXT STATIC_CALL_TEXT INDIRECT_THUNK_TEXT ENTRY_TEXT is in a seperate PMD so it can be mapped into the cpu entry area when KPTI is enabled. That means the sections after it are also in a seperate PMD. That's wasteful especially as the indirect thunk text is a hotpath on retpoline enabled systems and the static call text is fairly hot on 32bit. Move the entry text section last so that the other sections share a PMD with the text before it. This is obviously just best effort and not guaranteed when the previous text is just at a PMD boundary. The text section placement needs an overhaul in general. There is e.g. no point to have debugfs, sysfs, cpuhotplug and other rarely used functions next to hot path text. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111143.614728935@infradead.org arch/x86/kernel/vmlinux.lds.S | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit b26d66f8dace32c46ce58147002964ce8cdfde5f Author: Thomas Gleixner Date: Thu Sep 15 13:10:45 2022 +0200 x86/vdso: Ensure all kernel code is seen by objtool extable.c is kernel code and not part of the VDSO Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111143.512144110@infradead.org arch/x86/entry/vdso/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 4c4eb3ecc91f4fee6d6bf7cfbc1e21f2e38d19ff Author: Thomas Gleixner Date: Thu Sep 15 13:10:44 2022 +0200 x86/modules: Set VM_FLUSH_RESET_PERMS in module_alloc() Instead of resetting permissions all over the place when freeing module memory tell the vmalloc code to do so. Avoids the exercise for the next upcoming user. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111143.406703869@infradead.org arch/x86/kernel/ftrace.c | 2 -- arch/x86/kernel/kprobes/core.c | 1 - arch/x86/kernel/module.c | 9 +++++---- 3 files changed, 5 insertions(+), 7 deletions(-) commit 2cb15faaedeb67f52f2ddc32b5ca152acfc422c2 Author: Thomas Gleixner Date: Thu Sep 15 13:10:43 2022 +0200 x86/cpu: Re-enable stackprotector Commit 5416c2663517 ("x86: make sure load_percpu_segment has no stackprotector") disabled the stackprotector for cpu/common.c because of load_percpu_segment(). Back then the boot stack canary was initialized very early in start_kernel(). Switching the per CPU area by loading the GDT caused the stackprotector to fail with paravirt enabled kernels as the GSBASE was not updated yet. In hindsight a wrong change because it would have been sufficient to ensure that the canary is the same in both per CPU areas. Commit d55535232c3d ("random: move rand_initialize() earlier") moved the stack canary initialization to a later point in the init sequence. As a consequence the per CPU stack canary is 0 when switching the per CPU areas, so there is no requirement anymore to exclude this file. Add a comment to load_percpu_segment(). Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111143.303010511@infradead.org arch/x86/kernel/cpu/Makefile | 3 --- arch/x86/kernel/cpu/common.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit 1f19e2d50baf6515991844eaa8a84a0b0037da70 Author: Thomas Gleixner Date: Thu Sep 15 13:10:42 2022 +0200 x86/cpu: Get rid of redundant switch_to_new_gdt() invocations The only place where switch_to_new_gdt() is required is early boot to switch from the early GDT to the direct GDT. Any other invocation is completely redundant because it does not change anything. Secondary CPUs come out of the ASM code with GDT and GSBASE correctly set up. The same is true for XEN_PV. Remove all the voodoo invocations which are left overs from the ancient past, rename the function to switch_gdt_and_percpu_base() and mark it init. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111143.198076128@infradead.org arch/x86/include/asm/processor.h | 2 +- arch/x86/kernel/cpu/common.c | 17 ++++++----------- arch/x86/kernel/setup_percpu.c | 2 +- arch/x86/kernel/smpboot.c | 6 +++++- arch/x86/xen/enlighten_pv.c | 2 +- 5 files changed, 14 insertions(+), 15 deletions(-) commit b5636d45aae42aa345b4c7918bdef245ed63da68 Author: Thomas Gleixner Date: Thu Sep 15 13:10:41 2022 +0200 x86/cpu: Remove segment load from switch_to_new_gdt() On 32bit FS and on 64bit GS segments are already set up correctly, but load_percpu_segment() still sets [FG]S after switching from the early GDT to the direct GDT. For 32bit the segment load has no side effects, but on 64bit it causes GSBASE to become 0, which means that any per CPU access before GSBASE is set to the new value is going to fault. That's the reason why the whole file containing this code has stackprotector removed. But that's a pointless exercise for both 32 and 64 bit as the relevant segment selector is already correct. Loading the new GDT does not change that. Remove the segment loads and add comments. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111143.097052006@infradead.org arch/x86/include/asm/processor.h | 1 - arch/x86/kernel/cpu/common.c | 47 ++++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 17 deletions(-) commit 7556419180a304b9999c2c33162aec3da2d0deb9 Author: Aristeu Rozanski Date: Wed Sep 28 08:48:15 2022 -0400 EDAC/i5000: Mark as BROKEN i5000_edac supports very old hardware which isn't available and it's been broken for single/dual channel for many years without anyone noticing. Marking as BROKEN. Signed-off-by: Aristeu Rozanski Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220921181009.oxytvicy6sry6it7@redhat.com drivers/edac/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3548eda8ae284d6d412d59f11cd20fc7df05362b Author: Chen Lifu Date: Tue Aug 23 10:18:21 2022 +0800 x86/tsc: Make art_related_clocksource static The symbol is not used outside of the file, so mark it static. Fixes the following warning: arch/x86/kernel/tsc.c:53:20: warning: symbol 'art_related_clocksource' was not declared. Should it be static? Signed-off-by: Chen Lifu Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20220823021821.3052159-1-chenlifu@huawei.com arch/x86/kernel/tsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8be3f96ceddb911539a53d87a66da84a04502366 Author: ye xingchen Date: Wed Oct 12 01:26:29 2022 +0000 timers: Replace in_irq() with in_hardirq() Replace the obsolete and ambiguous macro in_irq() with new macro in_hardirq(). Signed-off-by: ye xingchen Signed-off-by: Thomas Gleixner Acked-by: John Stultz Link: https://lore.kernel.org/r/20221012012629.334966-1-ye.xingchen@zte.com.cn kernel/time/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c1bf1e3209ecb163b9d74b134776ce8c326fd4f Author: Hai Pham Date: Wed Oct 12 16:06:51 2022 +0200 arm64: dts: renesas: white-hawk-cpu: Add QSPI FLASH support Describe the QSPI FLASH on the White Hawk CPU board. Signed-off-by: Hai Pham Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/c3a01a8de924d6a3fcdb1ee0284544ad2ea5c8ec.1665583435.git.geert+renesas@glider.be .../boot/dts/renesas/r8a779g0-white-hawk-cpu.dtsi | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit d5014bede5e2bc88b53f6e374493f1418eacfc42 Author: Hai Pham Date: Wed Oct 12 16:06:50 2022 +0200 arm64: dts: renesas: r8a779g0: Add RPC node Add a device node for the SPI Multi I/O Bus Controller (RPC-IF) on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Hai Pham Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/6da7a035d56a943336f68dc0da77a47dba3dd69e.1665583435.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 34bd9009d987d858349e118480a1083ce81ce77d Author: Takeshi Kihara Date: Wed Oct 12 09:12:34 2022 +0200 arm64: dts: renesas: white-hawk-cpu: Add eMMC support Describe the eMMC on the White Hawk CPU board. Signed-off-by: Takeshi Kihara Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/253cd479e55486dd0d3e3804add405e41c32d53b.1665558371.git.geert+renesas@glider.be .../boot/dts/renesas/r8a779g0-white-hawk-cpu.dtsi | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit bc7bf9131abad6d3701a40662ad959a1baf838e1 Author: Geert Uytterhoeven Date: Wed Oct 12 09:12:33 2022 +0200 arm64: dts: renesas: r8a779g0: Add SDHI node Add a device node for the SD Card/MMC Interface on the Renesas R-Car V4H (R8A779G0) SoC. Based on a patch in the BSP by Takeshi Kihara. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/d2d5cf982a380699483edf7a632441628ee73183.1665558371.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit c02734d6e4ceaf4cec3e5ec0aa17ca66e9bc280d Author: Lad Prabhakar Date: Mon Oct 10 00:00:40 2022 +0100 arm64: dts: renesas: rzg2l: Drop WDT2 nodes On members of the RZ/G2L family, WDT CH2 is specifically meant to check the operation of the Cortex-M33 CPU. Using it from a Cortex-A55 CPU would result in unexpected behaviour. Hence drop all WDT2 nodes and their references from the affected SoC and SoM DTSI files. Signed-off-by: Lad Prabhakar Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20221009230044.10961-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 15 --------------- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 15 --------------- arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 15 --------------- arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi | 5 ----- arch/arm64/boot/dts/renesas/rzg2lc-smarc-som.dtsi | 5 ----- 5 files changed, 55 deletions(-) commit 1e15c02cf8c8085d0e6e548bfa2ee0b2f6231221 Author: Linus Walleij Date: Mon Aug 15 22:30:44 2022 +0200 ARM: dts: ux500: Add GPS to the Kyle This adds the GPS chip to the Kyle device tree. Link: https://lore.kernel.org/r/20220815203044.468686-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-ux500-samsung-kyle.dts | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit a26b17fa52294c0f92e6b0f5a471649467f07af2 Author: Linus Walleij Date: Thu Jul 21 17:36:10 2022 +0200 ARM: dts: DBx500 cryp and hash uses power domain The cryp and hash blocks of the DBx500 uses the VAPE power domain, the special regulator is a leftover that is not used anymore. Link: https://lore.kernel.org/r/20220721153610.1053845-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-dbx5x0.dtsi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7341b2c1b9c8997ffb87b5bfdb8feaf02b52d8bf Author: Linus Walleij Date: Mon Aug 15 21:34:40 2022 +0200 ARM: dts: ux500: Fix up the Janice NFC chip The NFC chip in Janice is a PNX544 not PNX547 and it is on I2C address 0x2b. Fix it up. This is only mounted in Janice models designated GT-I9070P. Cc: Stefan Hansson Link: https://lore.kernel.org/r/20220815193440.388695-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-ux500-samsung-janice.dts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 7b7c66ec81d80581939d3d774491acd761808f20 Author: Krzysztof Kozlowski Date: Wed Aug 10 14:10:37 2022 +0300 ARM: dts: ste: ux500: align SPI node name 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/20220810111037.280959-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij arch/arm/boot/dts/ste-ux500-samsung-codina-tmo.dts | 2 +- arch/arm/boot/dts/ste-ux500-samsung-codina.dts | 2 +- arch/arm/boot/dts/ste-ux500-samsung-gavini.dts | 2 +- arch/arm/boot/dts/ste-ux500-samsung-janice.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit a7e6dbd6ac034480d7fde95ecf2259d27e5655b1 Author: Tom Fitzhenry Date: Sun Oct 2 20:28:09 2022 +1100 arm64: dts: rockchip: add BT/wifi nodes to Pinephone Pro Pinephone Pro includes a AzureWave AW-CM256SM wifi (sdio0) and bt (uart0) combo module, which is based on Cypress CYP43455 (BCM43455). The CYP43455 datasheet ("Power-Up Sequence and Timing") documents: * needing to wait 10ms between consecutive WL_REG_ON toggles * needing to wait 110ms between power-on and SDIO access. Signed-off-by: Tom Fitzhenry Reviewed-by: Ondřej Jirman Link: https://lore.kernel.org/r/20221002092809.451501-1-tom@tom-fitzhenry.me.uk Signed-off-by: Heiko Stuebner .../boot/dts/rockchip/rk3399-pinephone-pro.dts | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 0522cd8112204d124d714eee7e9f0cac6de999d9 Author: Chukun Pan Date: Thu Oct 6 23:25:24 2022 +0800 arm64: dts: rockchip: Add PCIe v3 nodes to rock-3a Add Nodes to Radxa ROCK3 Model A board to support PCIe v3. Tested-by: Anand Moon Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20221006152524.502445-3-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 49665ab0ed5eed4fa7b8a6b236ff2df681c89673 Author: Chukun Pan Date: Thu Oct 6 23:25:23 2022 +0800 arm64: dts: rockchip: Add regulator suffix to rock-3a Add -regulator suffix to regulator names on Radxa ROCK3 Model A board. This makes the naming more consistent. Signed-off-by: Chukun Pan Acked-by: Michael Riesch Link: https://lore.kernel.org/r/20221006152524.502445-2-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4b192aa09b3c3615c79f8c60704a2efd15e500d0 Author: Siarhei Volkau Date: Sun Oct 16 16:26:48 2022 +0300 ASoC: codecs: jz4725b: add missed microphone widgets Microphone input can be single ended or differential, although known SoCs with that codec expose MIC1P only. Also there is 20dB mic boost in the Mic1 path. Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221016132648.3011729-8-lis8215@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/jz4725b.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 616c291820d155cbad258ecae5c7dbca2c01f07f Author: Siarhei Volkau Date: Sun Oct 16 16:26:47 2022 +0300 ASoC: codecs: jz4725b: add missed Mixer inputs The Mixer couples analog input from 4 sources (DAC, Line In, Mic 1, Mic 2) each input has its own gain & mute controls. At the moment only DAC is implemented fully and Line In path can be switched on/off. The patch implements Mic 1 and Mic 2 paths and fully implements Line In path. Manual states that these controls (16.6.3.3 Programmable attenuation: GOi) gain varies from -22.5dB to +6.0dB with 1.5dB step. Also there's extra values below the minimum, but they behave the same as the minimum value. Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221016132648.3011729-7-lis8215@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/jz4725b.c | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) commit e6233ee25059de0eeac6ed3d9d49737afdbd5087 Author: Siarhei Volkau Date: Sun Oct 16 16:26:46 2022 +0300 ASoC: codecs: jz4725b: use right control for Master Playback At the moment DAC control is used as Master Playback control, this is incorrect as DAC's output goes to a Mixer. The Mixer couples analog input from 4 sources (DAC, Line In, Mic 1, Mic 2) each input has its own gain & mute controls. Output of the Mixer goes to Output Stage control which is the best suite for the new Playback Master. However, it doesn't have mute capability. The patch implements Output Stage control as a new master and renames old Master to DAC. Rest of mixer inputs will be implemented in the next patch in the series. Manual states that Output stage control (16.6.3.5 Programmable output amplifier: PGAT) gain varies from -33.5dB to +4.5dB, gain step isn't fixed and has 3 opts. Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221016132648.3011729-6-lis8215@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/jz4725b.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 62d0cee4e6f592a8c6da9e969f404e907ae65d88 Author: Cezary Rojewski Date: Mon Oct 10 14:19:55 2022 +0200 ASoC: codecs: hda: Fix spelling error in log message To improve readability. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-16-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/codecs/hda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfced33e1eb868b1085c7cfadfb71e6e497059cb Author: Cezary Rojewski Date: Mon Oct 10 14:19:54 2022 +0200 ASoC: Intel: avs: Simplify log control for SKL Loop only till the actual number of AudioDSP cores, not the value of mask made from said number. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-15-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/skl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 263e3e2dfef7a9d39c91bbd2ff61bd0619c68e3b Author: Cezary Rojewski Date: Mon Oct 10 14:19:53 2022 +0200 ASoC: Intel: avs: Simplify ignore_fw_version description Reword the parameter description to drop any confusion regarding its purpose. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-14-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65edda6015682a31d82111b7a417eaa8232547f8 Author: Cezary Rojewski Date: Mon Oct 10 14:19:52 2022 +0200 ASoC: Intel: avs: Do not print IPC error message twice ENABLE_LOGS and SYSTEM_TIME IPCs call LARGE_CONFIG_SET internally which dumps an error message in case of an error. There is no need to repeat the process in the top level handler. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/messages.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 2d27a1caf8ef0c443486b18de2fada3120e3fbe1 Author: Cezary Rojewski Date: Mon Oct 10 14:19:51 2022 +0200 ASoC: Intel: avs: Do not treat unsupported IPCs as invalid Utilize NOT_SUPPORTED status code to differentiate between unsupported and invalid requests. Skip over error paths if it is the former that is communicated by the base firmware. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/avs.h | 4 +++- sound/soc/intel/avs/messages.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 18a787909ca6bac3a3a3235c08d68a4a9838fe7b Author: Cezary Rojewski Date: Mon Oct 10 14:19:50 2022 +0200 ASoC: Intel: avs: Do not reuse msg between different IPC handlers While LOG_BUFFER_STATUS is a simple notification with only one meaningful field, same message ptr shall not be reused for two different handlers. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/apl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e331b534d3b1a5a36a7bc1e7a85e21d2561aa2e6 Author: Amadeusz Sławiński Date: Mon Oct 10 14:19:49 2022 +0200 ASoC: Intel: avs: Add missing include to HDA board In some configurations board fails to compile due to missing header. Add it to fix build. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/hdaudio.c | 1 + 1 file changed, 1 insertion(+) commit e720e68b3fa25268e1df8a6d91d3bdb80f4fc38a Author: Cezary Rojewski Date: Mon Oct 10 14:19:48 2022 +0200 ASoC: Intel: avs: Simplify d0ix disabling routine No need to atomic_add_return(1) when there is atomic_inc_return() available. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1356811abf785b995dd74750fc75efffa3d7656 Author: Cezary Rojewski Date: Mon Oct 10 14:19:47 2022 +0200 ASoC: Intel: avs: Add missing SKL-based device IDs Enable additional SKL-based configurations by filling device ID table with new entries. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit fecc00b448a9b89c858468318bfdddbc5bd9dc6d Author: Amadeusz Sławiński Date: Mon Oct 10 14:19:46 2022 +0200 ASoC: Intel: avs: Support da7219 on both KBL and APL KBL and APL devices use same codec but have different clock, so it must be set appropriately depending on device. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/da7219.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8b2446eaa45a3be5bb5c6fb79cc745d228dac431 Author: Cezary Rojewski Date: Mon Oct 10 14:19:45 2022 +0200 ASoC: Intel: avs: Support AML with rt286 configuration ACPI ID of INT343A signals rt286 device for SKL, KBL and AML platforms. Add the missing AML entry. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/board_selection.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9d0737fa0e7530313634c0ecd75f09a95ba8d44a Author: Amadeusz Sławiński Date: Mon Oct 10 14:19:44 2022 +0200 ASoC: Intel: avs: Add quirk for KBL-R RVP platform KBL-R RVPs contain built-in rt298 codec which requires different PLL clock and .dai_fmt configuration than seen on other boards. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/rt298.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 953dbd1cef18ce9ac0d69c1bd735b929fe52a17e Author: Amadeusz Sławiński Date: Mon Oct 10 14:19:43 2022 +0200 ASoC: codecs: rt298: Add quirk for KBL-R RVP platform KBL-R RVP platforms also use combojack, so we need to enable that configuration for them. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt298.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 23ae34e033b2c0e5e88237af82b163b296fd6aa9 Author: Cezary Rojewski Date: Mon Oct 10 14:19:42 2022 +0200 ASoC: Intel: avs: Fix potential RX buffer overflow If an event caused firmware to return invalid RX size for LARGE_CONFIG_GET, memcpy_fromio() could end up copying too many bytes. Fix by utilizing min_t(). Reported-by: CoolStar Fixes: f14a1c5a9f83 ("ASoC: Intel: avs: Add module management requests") Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/ipc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 83375566a7a7042cb34b24986d100f46bfa0c1e5 Author: Cezary Rojewski Date: Mon Oct 10 14:19:41 2022 +0200 ASoC: Intel: avs: Fix DMA mask assignment Spelling error leads to incorrect behavior when setting up DMA mask. Fixes: a5bbbde2b81e ("ASoC: Intel: avs: Use helper function to set up DMA") Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20221010121955.718168-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e12ef2b2e3f65c4fba895262363c499476848a1 Author: Yang Yingliang Date: Wed Sep 28 22:58:52 2022 +0800 spi: cadence-quadspi: Use devm_platform_{get_and_}ioremap_resource() Use the devm_platform_{get_and}_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220928145852.1882221-2-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-cadence-quadspi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit a008ae9f8336d79df589eb343a38080a4b98340d Author: Yang Yingliang Date: Wed Sep 28 22:58:51 2022 +0800 spi: bcm63xx: Use devm_platform_get_and_ioremap_resource() Use the devm_platform_get_and_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220928145852.1882221-1-yangyingliang@huawei.com Signed-off-by: Mark Brown drivers/spi/spi-bcm63xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1cc0cbea7167af524a7f7b2d0d2f19f7a324e807 Author: Tharun Kumar P Date: Thu Oct 6 10:35:13 2022 +0530 spi: microchip: pci1xxxx: Add driver for SPI controller of PCI1XXXX PCIe switch Microchip pci1xxxx is a PCIe switch with a multi-function endpoint on one of its downstream ports. SPI is one of the functions in the multi-function endpoint. This function has 2 SPI masters, operates at a maximum frequency of 30 MHz and supports 7 client devices per master. This patch adds complete functionality to the SPI function except for suspend and resume. Signed-off-by: Tharun Kumar P Link: https://lore.kernel.org/r/20221006050514.115564-2-tharunkumar.pasumarthi@microchip.com Signed-off-by: Mark Brown drivers/spi/Kconfig | 9 + drivers/spi/Makefile | 1 + drivers/spi/spi-pci1xxxx.c | 397 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 407 insertions(+) commit 8f4b3d2f653937956fdc68b665c621dfa3cf2fa7 Author: Jiapeng Chong Date: Mon Oct 17 17:21:41 2022 +0800 spi: microchip-core: Remove the unused function mchp_corespi_enable() The function mchp_corespi_enable() is defined in the spi-microchip-core.c file, but not called elsewhere, so delete this unused function. drivers/spi/spi-microchip-core.c:122:20: warning: unused function 'mchp_corespi_enable'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2418 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20221017092141.9789-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown drivers/spi/spi-microchip-core.c | 9 --------- 1 file changed, 9 deletions(-) commit 9f879fb1a7b6c964dcde96c4cca8eb4444318560 Author: Vijendar Mukunda Date: Mon Oct 10 15:09:40 2022 +0530 ASoC: amd: Update Pink Sardine platform ACP register header Update Pink Sardine platform ACP register header with Soundwire Controller specific registers and other ACP registers. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20221010093941.2354783-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown include/sound/acp62_chip_offset_byte.h | 214 +++++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) commit 2adfc688777e58f22f691d08728dd74d76177fd9 Author: Marcin Wojtas Date: Mon Sep 26 13:05:33 2022 +0200 ASoC: kirkwood: enable Kirkwood driver for Armada 38x platforms The audio unit of Marvell Armada38x SoC is similar to the ones comprised by other Marvell SoCs (Kirkwood, Dove and Armada 370). Therefore KW audio driver can be used to support it and this commit adds new compatible string to identify Armada 38x variant. Two new memory regions are added: first one for PLL configuration and the second one for choosing one of audio I/O modes (I2S or S/PDIF). For the latter purpose a new optional DT property is added ('spdif-mode'). kirkwood-i2s driver is extended by adding a new init function for Armada 38x flavor and also a routine that enables PLL output (i.e. MCLK) configuration. Signed-off-by: Marcin Wojtas Tested-by: Star_Automation Reviewed-by: Nadav Haklai Reviewed-by: Lior Amsalem Tested-by: Lior Amsalem Signed-off-by: Hezi Shahmoon Reviewed-by: Neta Zur Hershkovits [pali: Fix support for pre-38x SoCs] Signed-off-by: Pali Rohár Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220926110533.13475-1-pali@kernel.org Signed-off-by: Mark Brown .../devicetree/bindings/sound/mvebu-audio.txt | 14 ++- sound/soc/kirkwood/kirkwood-i2s.c | 135 ++++++++++++++++++++- sound/soc/kirkwood/kirkwood.h | 2 + 3 files changed, 148 insertions(+), 3 deletions(-) commit fb07a8493a7b205116c9825b16267a07ffae129c Author: Yang Yingliang Date: Wed Sep 21 23:31:23 2022 +0800 ASoC: cs42l83: change cs42l83_regmap to static cs42l83_regmap is only used in cs42l83-i2c.c now, change it to static. Fixes: 94d5f62a91aa ("ASoC: cs42l83: Extend CS42L42 support to new part") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220921153123.1508144-1-yangyingliang@huawei.com Signed-off-by: Mark Brown sound/soc/codecs/cs42l83-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a0de73cf9dc044d65ad40112fd00025e225bc83 Author: Viorel Suman Date: Thu Oct 13 20:36:51 2022 +0800 ASoC: ak4458: add optional reset control to instead of gpio Add optional reset control instead of GPIO to manage codec PDN pin. As there is reference counter for reset control, so need to remove one ak4458_reset in runtime resume to make the reference counter balance. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1665664611-21350-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/codecs/ak4458.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 29dbfeecab85fc998d8c5c29473da33d272d0c85 Author: Shengjiu Wang Date: Fri Sep 23 17:31:34 2022 +0800 ASoC: fsl_micfil: Add Hardware Voice Activity Detector support The Hardware Voice Activity Detector (HWVAD) is a block responsible for detect voice activity in a channel selected by the user. It can be configured in Envelope-based or Energy-based mode. There are additional two interrupts for HWVAD, one is event interrupt, another is error interrupt. Enable hwvad in parallel with recording. when voice activity detected, HWVAD will be disabled and alsa control notification is triggerred. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1663925494-9941-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_micfil.c | 434 +++++++++++++++++++++++++++++++++++++++++++++ sound/soc/fsl/fsl_micfil.h | 6 +- 2 files changed, 439 insertions(+), 1 deletion(-) commit 98059ddfd1ada95fc9f535ea9c08618aa44ad5d3 Author: Shang XiaoJing Date: Tue Sep 27 22:09:48 2022 +0800 ASoC: ti: davinci-mcasp: Use DIV_ROUND_UP() instead of open-coding it Use DIV_ROUND_UP() instead of open-coding it, which intents and makes it more clear what is going on for the casual reviewer. The Coccinelle references Commit e4d8aef21403 ("ALSA: usb: Use DIV_ROUND_UP() instead of open-coding it"). Signed-off-by: Shang XiaoJing Link: https://lore.kernel.org/r/20220927140948.17696-5-shangxiaojing@huawei.com Signed-off-by: Mark Brown sound/soc/ti/davinci-mcasp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4aa2b05a24a83cc618fab4c4d343f2179962e5ed Author: Shang XiaoJing Date: Tue Sep 27 22:09:47 2022 +0800 ASoC: rsnd: Use DIV_ROUND_UP() instead of open-coding it Use DIV_ROUND_UP() instead of open-coding it, which intents and makes it more clear what is going on for the casual reviewer. The Coccinelle references Commit e4d8aef21403 ("ALSA: usb: Use DIV_ROUND_UP() instead of open-coding it"). Signed-off-by: Shang XiaoJing Link: https://lore.kernel.org/r/20220927140948.17696-4-shangxiaojing@huawei.com Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c54402609820427ff6f725f9182216e7cfe7cfa7 Author: Shang XiaoJing Date: Tue Sep 27 22:09:46 2022 +0800 ASoC: wm8978: Use DIV_ROUND_UP() instead of open-coding it Use DIV_ROUND_UP() instead of open-coding it, which intents and makes it more clear what is going on for the casual reviewer. The Coccinelle references Commit e4d8aef21403 ("ALSA: usb: Use DIV_ROUND_UP() instead of open-coding it"). Signed-off-by: Shang XiaoJing Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20220927140948.17696-3-shangxiaojing@huawei.com Signed-off-by: Mark Brown sound/soc/codecs/wm8978.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff091dd23b423e19c8191928daedf62eab6ce523 Author: Shang XiaoJing Date: Tue Sep 27 22:09:45 2022 +0800 ASoC: cs35l36: Use DIV_ROUND_UP() instead of open-coding it Use DIV_ROUND_UP() instead of open-coding it, which intents and makes it more clear what is going on for the casual reviewer. The Coccinelle references Commit e4d8aef21403 ("ALSA: usb: Use DIV_ROUND_UP() instead of open-coding it"). Signed-off-by: Shang XiaoJing Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20220927140948.17696-2-shangxiaojing@huawei.com Signed-off-by: Mark Brown sound/soc/codecs/cs35l36.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b48440ea390bada41928920446928beb3652a76 Author: Chancel Liu Date: Fri Sep 30 14:44:41 2022 +0800 ASoC: imx-rpmsg: Assign platform driver used by machine driver to link with Each ASoC platform driver is named by rpmsg channel. ASoC machine driver can parse "fsl,rpmsg-channel-name" property to figure out which ASoC platform driver it should link with. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20220930064441.2548505-8-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/imx-rpmsg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f26c1bb8a8ebe72748a3bb6f5d75079b642a33e8 Author: Chancel Liu Date: Fri Sep 30 14:44:40 2022 +0800 ASoC: fsl_rpmsg: Multi-channel support in CPU DAI driver Some sound card based on rpmsg may support multi-channel. This patch expands the maximum channels to 32. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20220930064441.2548505-7-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_rpmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76a874caeab596972f529968aa0d19d4ba1d2197 Author: Chancel Liu Date: Fri Sep 30 14:44:39 2022 +0800 ASoC: fsl_rpmsg: Register different ASoC machine devices This driver helps register ASoC machine device thus use of PLATFORM_DEVID_AUTO macro in API can automatically create device for each sound card based on rpmsg. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20220930064441.2548505-6-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_rpmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdc0f6ca1c079ba790e0e227cff6164feae90460 Author: Chancel Liu Date: Fri Sep 30 14:44:38 2022 +0800 ASoC: imx-pcm-rpmsg: Multi-channel support for sound card based on rpmsg Some sound card based on rpmsg may support multi-channel. The number of channels can be sent to Cortex-M in rpmsg for process. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20220930064441.2548505-5-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/imx-pcm-rpmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2c2a947b3412f6edb9a86f5b12d6420958e67ba Author: Chancel Liu Date: Fri Sep 30 14:44:37 2022 +0800 ASoC: imx-pcm-rpmsg: Register different platform drivers This patch can register different ASoC platform drivers if there are several rpmsg channels. Thus sound cards based on different rpmsg channels can link to their respective platform drivers. Besides, the name of driver is equal to the name of rpmsg channel. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20220930064441.2548505-4-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/imx-pcm-rpmsg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f04189e0b85f6bbd10679e71061bf6d1ced5c539 Author: Chancel Liu Date: Fri Sep 30 14:44:36 2022 +0800 ASoC: imx-audio-rpmsg: Create rpmsg channel for MICFIL Rpmsg channel for MICFIL can also be created through rpmsg name service announcement. If this driver is probed, Cortex-A can access MICFIL which is actually controlled by Cortex-M through rpmsg channel for MICFIL. This driver also helps register ASoC platform device thus use of PLATFORM_DEVID_AUTO macro in API can automatically create device for each rpmsg channel. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20220930064441.2548505-3-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/imx-audio-rpmsg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3570e6873b1a506bca4b5788d71141944c55132c Author: Chancel Liu Date: Fri Sep 30 14:44:35 2022 +0800 ASoC: dt-bindings: fsl_rpmsg: Add a property to assign the rpmsg channel Add a string property to assign the rpmsg channel this sound card sits on. This property can be omitted if there is only one sound card and it sits on "rpmsg-audio-channel". Signed-off-by: Chancel Liu Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220930064441.2548505-2-chancel.liu@nxp.com Signed-off-by: Mark Brown .../devicetree/bindings/sound/fsl,rpmsg.yaml | 36 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit 999ce9967a2f5a64c4bd04ae1edf0a979cf68833 Author: Amadeusz Sławiński Date: Fri Sep 30 14:45:38 2022 +0200 ASoC: Intel: avs: Load max98927 on target platform In order to load proper board configuration it needs to be looked up in ACPI. Add board configuration for MAXIM 98927 codec present on Chromebooks. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20220930124538.354992-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/board_selection.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1c993300ab1cec9a0a6a3c417614a1d9f35b175b Author: Amadeusz Sławiński Date: Fri Sep 30 14:45:37 2022 +0200 ASoC: Intel: avs: Add max98927 machine board To support AVS-max98927 configuration add machine board connecting AVS platform component driver with max98927 codec one. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20220930124538.354992-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/avs/boards/Kconfig | 10 ++ sound/soc/intel/avs/boards/Makefile | 2 + sound/soc/intel/avs/boards/max98927.c | 236 ++++++++++++++++++++++++++++++++++ 3 files changed, 248 insertions(+) commit 74a6a948c8fc28c8937e24178739979b3cd2ce14 Author: Doug Brown Date: Sun Oct 2 20:24:14 2022 -0700 ASoC: codecs: allow WM8961 to be selected by the user Allow the WM8961 driver to be enabled independently now that it is usable with devicetree. Signed-off-by: Doug Brown Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20221003032414.248326-4-doug@schmorgal.com Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c96851ee8195c820b765c6a7effcec79c81eb9c6 Author: Doug Brown Date: Sun Oct 2 20:24:13 2022 -0700 ASoC: wm8961: add support for devicetree Add support for devicetree to the WM8961 driver so it can be used with modern DT-based kernels. Signed-off-by: Doug Brown Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20221003032414.248326-3-doug@schmorgal.com Signed-off-by: Mark Brown sound/soc/codecs/wm8961.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b9b0d88d87e5565e8d12bcf22ec601e8b4658dc6 Author: Doug Brown Date: Sun Oct 2 20:24:12 2022 -0700 ASoC: dt-bindings: add schema for WM8961 Create a simple DT schema for the existing Wolfson WM8961 driver so that DT support can be added to the driver. Signed-off-by: Doug Brown Acked-by: Charles Keepax Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221003032414.248326-2-doug@schmorgal.com Signed-off-by: Mark Brown .../devicetree/bindings/sound/wlf,wm8961.yaml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 77cda4b9710fd88769997859eb3b7033bfe37e40 Merge: 9abf2313adc1 6a43cd02ddbc Author: Mark Brown Date: Mon Oct 17 12:47:33 2022 +0100 Merge existing fixes from spi/for-6.1 into new branch commit 2a9ad0cc15d6b3f2475acdcd091bd0f6757ba7d8 Merge: 9abf2313adc1 c9a3545b1d77 Author: Mark Brown Date: Mon Oct 17 12:47:15 2022 +0100 Merge existing fixes from asoc/for-6.1 into new branch commit d6882992fe8182e3122be34af3f491948a8b9069 Author: Aurelien Jarno Date: Fri Sep 30 07:12:46 2022 +0200 arm64: dts: rockchip: Add IR receiver node to ODROID-M1 Add the infrared receiver and its associated pinctrl entry. Note that there is an external pullup to VCC3V3_SYS. Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-14-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 35b28582aa3dfd7b6861b7ebc72798b0ff50ed41 Author: Aurelien Jarno Date: Fri Sep 30 07:12:45 2022 +0200 arm64: dts: rockchip: Add PCIEe v3 nodes to ODROID-M1 Add nodes to ODROID-M1 to support PCIe v3 on the M2 slot. Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-13-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 6a5a04d52ccc42e0e59ff69fca9c1db7e08ba44b Author: Aurelien Jarno Date: Fri Sep 30 07:12:44 2022 +0200 arm64: dts: rockchip: Add SATA support to ODROID-M1 Enable the Combo PHY and SATA nodes in ODROID-M1. Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-12-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9984ef562653c8d0beb51021fc286706b6ec4802 Author: Aurelien Jarno Date: Fri Sep 30 07:12:43 2022 +0200 arm64: dts: rockchip: Enable the USB 3.0 ports on ODROID-M1 The Rockchip RK3568 has two USB XHCI controllers. The USB 2.0 signals are connected to a PHY providing one host-only port and one OTG port. The USB 3.0 signals are connected to two USB3.0/PCIE/SATA combo PHY. The ODROID M1 has 2 type A USB 3.0 connectors, with the USB 3.0 signals connected to the two combo PHYs. For the USB 2.0 signals, one connector is connected to the host-only PHY and uses the same power switch as the USB 2.0 ports. The other connector has its own power switch and is connected to the OTG PHY, which is also connected to a device only micro-USB connector. The purpose of this micro-USB connector is for firmware update using the Rockusb vendor specific USB class. Therefore it does not make sense to enable this port on Linux, and the PHY is forced to host mode. Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-11-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 49 ++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) commit 4685d7b68aaac199ab0d950d2047405bf551f964 Author: Aurelien Jarno Date: Fri Sep 30 07:12:42 2022 +0200 arm64: dts: rockchip: Enable the USB 2.0 ports on ODROID-M1 The Rockchip RK3568 has two USB OHCI/EHCI controllers connected to a PHY providing one host-only port and one OTG port. On the ODROID-M1, they are both used in host mode. The USB ports are powered by a DC/DC converter providing 5V and named VCC5V0_SYS on the schematics, followed by a power switch. Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-10-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 61 +++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit cb80b3455c7cadc4c1157879930e919f607d557c Author: Aurelien Jarno Date: Fri Sep 30 07:12:41 2022 +0200 arm64: dts: rockchip: Enable the GPU on ODROID-M1 Enable the GPU core on the Rockchip RK3568 ODROID-M1. Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-9-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 1ca7ddddf36494f0f6afd4f35d37827323271f39 Author: Aurelien Jarno Date: Fri Sep 30 07:12:40 2022 +0200 arm64: dts: rockchip: Enable HDMI audio on ODROID-M1. This enables the i2s0 controller and the hdmi-sound node on the ODROID-M1. Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-8-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 913404aa2e60610f9cae375069dae97e11d726ed Author: Aurelien Jarno Date: Fri Sep 30 07:12:39 2022 +0200 arm64: dts: rockchip: Enable vop2 and hdmi tx on ODROID-M1 Enable the RK356x Video Output Processor (VOP) 2 on ODROID M1. Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-7-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 78f858447cb78cac7259093d095fb783328b835c Author: Aurelien Jarno Date: Fri Sep 30 07:12:38 2022 +0200 arm64: dts: rockchip: Add analog audio on ODROID-M1 On the ODROID-M1, the I2S1 TDM controller is connected to the rk809 codec in I2S mode. It is used to provide a stereo headphones output and a mono speaker output. A GPIO with an external pullup is used as an headphone detection input. Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-6-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 43 ++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit 9f96204b7dcf94d03cad41194447c665d10675b7 Author: Aurelien Jarno Date: Fri Sep 30 07:12:37 2022 +0200 arm64: dts: rockchip: Add NOR flash to ODROID-M1 Enable the Rockchip Serial Flash Controller for the ODROID-M1 and add the corresponding SPI NOR flash entry. The SFC is used in dual I/O mode and not quad I/O mode, as the FSPI_D2 pin is shared with the EMMC_RSTn pin. The partitions addresses and sizes are taken from the ODROID-M1 Partition Table page on the ODROID wiki. Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-5-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 58 +++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit f5511bd8498da222b6455038a0cf3e7d2b2dfc7e Author: Aurelien Jarno Date: Fri Sep 30 07:12:36 2022 +0200 arm64: dts: rockchip: add thermal support to ODROID-M1 Add the thermal nodes for the ODROID-M1. Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-4-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit fd35832677032980df230f02509d6c016664cc89 Author: Dongjin Kim Date: Fri Sep 30 07:12:35 2022 +0200 arm64: dts: rockchip: Add Hardkernel ODROID-M1 board This patch is to add a device tree for new board Hardkernel ODROID-M1 based on Rockchip RK3568, includes basic peripherals - uart/eMMC/uSD/i2c and on-board ethernet. Signed-off-by: Dongjin Kim [aurelien@aurel32.net: addressed issues from initial review] Signed-off-by: Aurelien Jarno Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-3-aurelien@aurel32.net Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 414 ++++++++++++++++++++++ 2 files changed, 415 insertions(+) commit 19cc53eb2ce63c0e5adc2fd89494fb16f383ac10 Author: Dongjin Kim Date: Fri Sep 30 07:12:34 2022 +0200 dt-bindings: rockchip: Add Hardkernel ODROID-M1 board Add device tree binding for Hardkernel ODROID-M1 board based on RK3568 SoC. Signed-off-by: Dongjin Kim Signed-off-by: Aurelien Jarno Acked-by: Krzysztof Kozlowski Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20220930051246.391614-2-aurelien@aurel32.net Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit f3ff1d12bb2f6ebdbd12f0cafc02fe170bad6e7f Author: Quentin Schulz Date: Mon Oct 17 12:25:25 2022 +0200 dt-bindings: arm: rockchip: add Theobroma Systems PX30-µQ7 (Ringneck) with Haikou Add entry for the Theobroma Systems PX30-µQ7 (Ringneck) with Haikou devkit. Acked-by: Krzysztof Kozlowski Signed-off-by: Quentin Schulz Link: https://lore.kernel.org/r/20220930-upstream-ringneck-v2-2-6671694b6934@theobroma-systems.com Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit c484cf93f61b4b982f88e9e86dccb7047e1f2b3d Author: Quentin Schulz Date: Mon Oct 17 12:25:24 2022 +0200 arm64: dts: rockchip: add PX30-µQ7 (Ringneck) SoM with Haikou baseboard The PX30-uQ7 (Ringneck) SoM is a µQseven-compatible (40mmx70mm, MXM-230 connector) system-on-module from Theobroma Systems[1], featuring the Rockchip PX30. It provides the following feature set: * up to 4GB DDR4 * up to 128GB on-module eMMC (with 8-bit 1.8V interface) * SD card (on a baseboard) via edge connector * Fast Ethernet with on-module TI DP83825I PHY * MIPI-DSI/LVDS * MIPI-CSI * USB - 1x USB 2.0 dual-role - 3x USB 2.0 host * on-module STM32 Cortex-M0 companion controller, implementing: - low-power RTC functionality (ISL1208 emulation) - fan controller (AMC6821 emulation) - USB<->CAN bridge controller * on-module Espressif ESP32 for Bluetooth + 2.4GHz WiFi * on-module NXP SE05x Secure Element [1] https://www.theobroma-systems.com/som-product/px30-%C2%B5q7/ Signed-off-by: Quentin Schulz Link: https://lore.kernel.org/r/20220930-upstream-ringneck-v2-1-6671694b6934@theobroma-systems.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/px30-ringneck-haikou.dts | 232 +++++++++++++ arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 382 +++++++++++++++++++++ 3 files changed, 615 insertions(+) commit b3acbca3c80e612478b354e43c1480c3fc15873e Author: Lad Prabhakar Date: Mon Sep 19 11:46:06 2022 +0100 soc: renesas: Kconfig: Explicitly select GPIOLIB and PINCTRL config under SOC_RENESAS GPIOLIB and PINCTRL config options are required by all ARM32/ARM64/RISC-V Renesas SoCs, so instead of selecting them under ARCH_RENESAS for each architecture just explicitly select them under SOC_RENESAS config option which will be visible for all the three architectures (if ARCH_RENESAS is enabled). Suggested-by: Geert Uytterhoeven Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20220919104606.96553-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/soc/renesas/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 4a76d4ab8487aa003cc06b46fc0b0614c436be51 Author: CongDang Date: Fri Oct 7 17:34:02 2022 +0200 arm64: dts: renesas: r8a779g0: Add TPU device node Add a device node for the 16-Bit Timer Pulse Unit (TPU) on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: CongDang Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/b98acb22fdd1bcc6a9ca8a4255f85e04c571975c.1665156417.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5b9d1306ef463f3e6643ea5fbfe2af654d7915a4 Author: CongDang Date: Fri Oct 7 17:34:01 2022 +0200 arm64: dts: renesas: r8a779g0: Add PWM device nodes Add device nodes for the PWM timers on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: CongDang Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/6a2df8c9f751993ae40aa8f196f4124e384b0aab.1665156417.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 100 ++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) commit a4290d407aa9fd174d8053878783d466d3124e38 Author: Geert Uytterhoeven Date: Fri Oct 7 17:20:03 2022 +0200 arm64: dts: renesas: r8a779g0: Fix HSCIF0 "brg_int" clock As serial communication requires a clock signal, the High Speed Serial Communication Interfaces with FIFO (HSCIF) are clocked by a clock that is not affected by Spread Spectrum or Fractional Multiplication. Hence change the clock input for the HSCIF0 Baud Rate Generator internal clock from the S0D3_PER clock to the SASYNCPERD1 clock (which has the same clock rate), cfr. R-Car V4H Hardware User's Manual rev. 0.54. Fixes: 987da486d84a5643 ("arm64: dts: renesas: Add Renesas R8A779G0 SoC support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/a5bd4148f92806f7c8e577d383370f810315f586.1665155947.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d66e379731f79ae5039a869c0fde22a4f6a6a91 Author: Mario Limonciello Date: Thu Oct 13 08:47:29 2022 -0500 pinctrl: amd: Add dynamic debugging for active GPIOs Some laptops have been reported to wake up from s2idle when plugging in the AC adapter or by closing the lid. This is a surprising behavior that is further clarified by commit cb3e7d624c3ff ("PM: wakeup: Add extra debugging statement for multiple active IRQs"). With that commit in place the following interaction can be seen when the lid is closed: [ 28.946038] PM: suspend-to-idle [ 28.946083] ACPI: EC: ACPI EC GPE status set [ 28.946101] ACPI: PM: Rearming ACPI SCI for wakeup [ 28.950152] Timekeeping suspended for 3.320 seconds [ 28.950152] PM: Triggering wakeup from IRQ 9 [ 28.950152] ACPI: EC: ACPI EC GPE status set [ 28.950152] ACPI: EC: ACPI EC GPE dispatched [ 28.995057] ACPI: EC: ACPI EC work flushed [ 28.995075] ACPI: PM: Rearming ACPI SCI for wakeup [ 28.995131] PM: Triggering wakeup from IRQ 9 [ 28.995271] ACPI: EC: ACPI EC GPE status set [ 28.995291] ACPI: EC: ACPI EC GPE dispatched [ 29.098556] ACPI: EC: ACPI EC work flushed [ 29.207020] ACPI: EC: ACPI EC work flushed [ 29.207037] ACPI: PM: Rearming ACPI SCI for wakeup [ 29.211095] Timekeeping suspended for 0.739 seconds [ 29.211095] PM: Triggering wakeup from IRQ 9 [ 29.211079] PM: Triggering wakeup from IRQ 7 [ 29.211095] ACPI: PM: ACPI non-EC GPE wakeup [ 29.211095] PM: resume from suspend-to-idle * IRQ9 on this laptop is used for the ACPI SCI. * IRQ7 on this laptop is used for the GPIO controller. What has occurred is when the lid was closed the EC woke up the SoC from it's deepest sleep state and the kernel's s2idle loop processed all EC events. When it was finished processing EC events, it checked for any other reasons to wake (break the s2idle loop). The IRQ for the GPIO controller was active so the loop broke, and then this IRQ was processed. This is not a kernel bug but it is certainly a surprising behavior, and to better debug it we should have a dynamic debugging message that we can enact to catch it. Acked-by: Basavaraj Natikar Acked-by: Kai-Heng Feng Acked-by: Mark Pearson Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20221013134729.5592-2-mario.limonciello@amd.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1d81689d9f3f77a7272dfd1670ad4ebd029ed22a Author: Andy Shevchenko Date: Mon Oct 10 10:56:15 2022 +0300 pinctrl: st: Switch to use fwnode instead of of_node The OF node in the GPIO library is deprecated and soon will be removed. GPIO library now accepts fwnode as a firmware node, so switch the driver to use it. Signed-off-by: Andy Shevchenko Reviewed-by: Patrice Chotard Reviewed-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20221010075615.43244-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab6dc0a22b05199aa3efe2dd79d9b67a00bf01c3 Author: Kuninori Morimoto Date: Mon Oct 3 02:11:11 2022 +0000 arm64: dts: renesas: condor-common: Add missing bootargs This patch adds missing bootargs for V3H Condor board. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h70lhd1c.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/condor-common.dtsi | 1 + 1 file changed, 1 insertion(+) commit 92378fd2ba593425308f3b21ff29936ead02a090 Author: Geert Uytterhoeven Date: Wed Sep 28 14:47:19 2022 +0200 arm64: dts: renesas: white-hawk-cpu: Add PCA9654 I/O Expander Describe the PCA9654 I/O Expander on the White Hawk CPU board. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/e75ea6feaedc013c504a032a6cf1cb7dd809ce27.1664369170.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-cpu.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b6ce840b974f9be906e1ba30cedaba8b94a0320f Author: Geert Uytterhoeven Date: Wed Sep 28 14:45:48 2022 +0200 arm64: dts: renesas: r8a779g0: Add INTC-EX node Add the device node for the Interrupt Controller for External Devices (INTC-EX) on the Renesas R-Car V4H (R8A779G0) SoC, which serves external IRQ pins IRQ[0-5]. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/f2e5adf62a7666db7350d9596a907bc7f9e81d43.1664369015.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e076807315cb62ec3bc94f9a473bcb0caf4f2760 Author: Geert Uytterhoeven Date: Mon Sep 26 17:26:24 2022 +0200 arm64: dts: renesas: r8a779g0: Add MSIOF nodes Add device nodes for the Clock-Synchronized Serial Interfaces with FIFO (MSIOF) on the Renesas R-Car V4H (R8A779G0) SoC, including DMA support. Based on patches in the BSP by Thanh Quan. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/450921ef6d8c30ca2953a1665c8597f6a69d01f2.1664204771.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 96 +++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit 08f282888effdf6f2e8b4c6e77ec7a9b0b3f58a0 Author: Geert Uytterhoeven Date: Mon Sep 26 17:26:23 2022 +0200 arm64: dts: renesas: r8a779g0: Add DMA support Add device nodes for the Direct Memory Access Controllers for System (SYS-DMAC) on the Renesas R-Car V4H (R8A779G0) SoC. Link all DMA consumers to the corresponding DMA controller channels. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1ea45b51f897a11d9477be4ac54fdb0efcc624e1.1664204771.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 91 +++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit affab0af979a331adae2d1f7f86afe8ecf81b5fc Author: Lad Prabhakar Date: Wed Sep 21 09:22:21 2022 +0100 arm64: dts: renesas: rzg2ul-smarc: Move spi1 pinmux to carrier board DTSI spi1 is available on the RZ/G2UL SMARC EVK carrier board (PMOD0), hence moving the spi1 pinmux from SoM to carrier board. This is to keep consistency with the other SMARC EVKs. Also while moving the pinmux rename rspi1 to spi1 to be consistent with other SMARC EVK DTSIs. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20220921082221.10599-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/rzg2ul-smarc-pinfunction.dtsi | 7 +++++++ arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) commit 29df86bbbad007eb1863c9d31473122c87c3e771 Author: Lad Prabhakar Date: Mon Sep 19 10:21:30 2022 +0100 arm64: dts: renesas: rzg2lc-smarc: Include SoM DTSI into board DTS Move including the rzg2lc-smarc-som.dtsi from the carrier board rzg2lc-smarc.dtsi to the actual RZ/G2LC SMARC EVK board dts r9a07g044c2-smarc.dts. Also move the SW1 related macros along with PMOD1_SER0 to board dts so that we have all the configuration options in the same file. This patch is to keep consistency with other SMARC EVKs (RZ/G2L, RZ/G2UL) and it makes sense not include the SoM into the carrier board as we might in future have a different carrier board with the same SoM. Suggested-by: Geert Uytterhoeven Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20220919092130.93074-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r9a07g044c2-smarc.dts | 30 +++++++++++++++++++++++ arch/arm64/boot/dts/renesas/rzg2lc-smarc.dtsi | 28 --------------------- 2 files changed, 30 insertions(+), 28 deletions(-) commit a039dfb96ad24666d6947b8ab631449441152efe Author: Andy Shevchenko Date: Mon Oct 10 15:52:21 2022 +0300 pinctrl: cy8c95x0: Implement ->gpio_request_enable() and ->gpio_set_direction() Without ->gpio_request_enable() and ->gpio_set_direction() callbacks it's not possible to mux GPIO via standard GPIO interfaces (like `gpioget` or `gpioset` tools in user space). Implement those functions to fill the above mentioned gap. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221010125221.28275-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-cy8c95x0.c | 112 ++++++++++++++++++++++--------------- 1 file changed, 68 insertions(+), 44 deletions(-) commit 9b3148d6d626d484fd038d25409602190d89eee7 Author: Andy Shevchenko Date: Mon Oct 10 15:52:20 2022 +0300 pinctrl: cy8c95x0: Extract cy8c95x0_set_mode() helper The code in newly introduced cy8c95x0_set_mode() helper may be used later on by another function. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221010125221.28275-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-cy8c95x0.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit eaa4c8f953ba1d2eafb1c961aa9321beb71f21c9 Author: Ryan Wanner Date: Fri Oct 7 08:16:47 2022 -0700 pinctrl: at91-pio4: Add persist state case in config Adding persist state case to atmel_conf_pin_config_group_set() function. After adding configuration support for userspace gpiod api, there was an extra flag PIN_CONFIG_PERSIST_STATE that was not passed in before. Based on other drivers like TI drivers, added a switch case and return ENOTSUPP in that case. Signed-off-by: Ryan Wanner Acked-by: Nicolas Ferre Tested-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221007151647.98222-3-Ryan.Wanner@microchip.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-at91-pio4.c | 4 ++++ 1 file changed, 4 insertions(+) commit fcd7631748575706210ef05a787fccbeb4d79898 Author: Ryan Wanner Date: Fri Oct 7 08:16:46 2022 -0700 pinctrl: at91-pio4: Add configuration to userspace Adding support for line bias flags that have been implented in gpio API. There are functions in the gpiod library that can control line bias from userspace this adds that functionality to this driver. Adding .pin_config_set allows the driver's pin configuration to be accessed from userspace. The general idea for this as been taken from stm32, intel, and rockchip drivers that have userspace access for bias flags. Signed-off-by: Ryan Wanner Tested-by: Nicolas Ferre # on sama5d27 som1 ek Acked-by: Nicolas Ferre Tested-by: Nicolas Ferre Link: https://lore.kernel.org/r/20221007151647.98222-2-Ryan.Wanner@microchip.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-at91-pio4.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit aef1bef2dfdd6e1bf003cb745eb3941bca01b714 Author: Sam Shih Date: Sat Oct 8 18:48:06 2022 +0200 pinctrl: mt7986: allow configuring uart rx/tx and rts/cts separately Some mt7986 boards use uart rts/cts pins as gpio, This patch allows to change rts/cts to gpio mode, but keep rx/tx as UART function. Signed-off-by: Frank Wunderlich Signed-off-by: Sam Shih Link: https://lore.kernel.org/r/20221008164807.113590-1-linux@fw-web.de Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt7986.c | 32 ++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit c29a017f9df34d190fbc7917d30dbefce7d9dc1f Merge: d4a596eddb90 9abf2313adc1 Author: Dmitry Torokhov Date: Mon Oct 17 02:36:32 2022 -0700 Merge tag 'v6.1-rc1' into next Merge with mainline to bring in the latest changes to twl4030 driver. commit f5a681d238885f238a5f06fcfda625a90d87a327 Author: Christophe Leroy Date: Fri Sep 2 14:42:09 2022 +0200 arm64: Remove CONFIG_ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO is not used anymore, remove it. Signed-off-by: Christophe Leroy Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski arch/arm64/Kconfig | 12 ------------ 1 file changed, 12 deletions(-) commit 8937944f4ee4f5763de8784ccdb068d93d9b0f3e Author: Christophe Leroy Date: Fri Sep 2 14:42:08 2022 +0200 arm: Remove CONFIG_ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO is not used anymore, remove it. Signed-off-by: Christophe Leroy Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski arch/arm/Kconfig | 21 --------------------- 1 file changed, 21 deletions(-) commit f71806d8dc6c053b5a5344536380c5b2bb82b3fc Author: Christophe Leroy Date: Fri Sep 2 14:42:07 2022 +0200 x86: Remove CONFIG_ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO is not used anymore, remove it. Signed-off-by: Christophe Leroy Reviewed-by: Andy Shevchenko Acked-by: Thomas Gleixner Signed-off-by: Bartosz Golaszewski arch/x86/Kconfig | 5 ----- 1 file changed, 5 deletions(-) commit a6a924abf865d232f93d317f054be263c86f903c Author: Dale B Stimson Date: Thu Oct 13 08:45:26 2022 -0700 drm/i915/hwmon: Extend power/energy for XEHPSDV Extend hwmon power/energy for XEHPSDV especially per gt level energy usage. v2: Update to latest HWMON spec (Ashutosh) v3: Fix review comments (Ashutosh) v4: Fix review comments (Anshuman) v5: s/hwmon_device_register_with_info/ devm_hwmon_device_register_with_info/ (Ashutosh) v6: Change contact to intel-gfx (Rodrigo) GEN12_RPSTAT1 is available for all Gen12+ (Andi) Signed-off-by: Ashutosh Dixit Signed-off-by: Dale B Stimson Signed-off-by: Badal Nilawar Acked-by: Guenter Roeck Reviewed-by: Ashutosh Dixit Reviewed-by: Anshuman Gupta Reviewed-by: Andi Shyti Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221013154526.2105579-8-ashutosh.dixit@intel.com .../ABI/testing/sysfs-driver-intel-i915-hwmon | 7 +- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 5 + drivers/gpu/drm/i915/i915_hwmon.c | 101 ++++++++++++++++++++- 3 files changed, 110 insertions(+), 3 deletions(-) commit 61164d220f524945d4006263bb4946a023f0dbb4 Author: Richard Acayan Date: Thu Oct 13 20:19:34 2022 -0400 pinctrl: qcom: add sdm670 pinctrl The Snapdragon 670 has a Top-Level Mode Multiplexer (TLMM) for various features. Add a driver to support it. Link: https://android.googlesource.com/kernel/msm/+/de5a12173c7fa6d65bedee9ad36af55b2dbfeb36%5E%21/#F6 Link: https://android.googlesource.com/kernel/msm/+/04f083156d9b9f3bfcf204c1c6da88632fbb3863%5E%21/#F22 Link: https://android.googlesource.com/kernel/msm/+/54837652e3400ecc63ccc78b2193faf4f349a32e%5E%21/#F0 Link: https://android.googlesource.com/kernel/msm/+/f0409b07174ceca217f8b7fd255418feff06092d%5E%21/#F0 Signed-off-by: Richard Acayan Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221014001934.4995-4-mailingradian@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/Kconfig | 10 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-sdm670.c | 1345 +++++++++++++++++++++++++++++++++ 3 files changed, 1356 insertions(+) commit f764b84848e81508d65bac69c77ed2ed165eb511 Author: Richard Acayan Date: Thu Oct 13 20:19:33 2022 -0400 pinctrl: qcom: do not reinitialize gpio valid mask It may be necessary for some devices to specify reserved gpios in the device-specific DTS, in addition to the reserved gpios common to all devices with a given SoC. Remove this bitmap_fill() call so that the settings applied to the gpio valid mask by DTS are not overridden by the driver's reserved gpios. Signed-off-by: Richard Acayan Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221014001934.4995-3-mailingradian@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5887bc1ced74a46f457634466b92f45b1ab03083 Author: Richard Acayan Date: Thu Oct 13 20:19:32 2022 -0400 dt-bindings: pinctrl: qcom: add sdm670 pinctrl There is a new driver for the Snapdragon 670 TLMM (Top-Level Mode Multiplexer). Document it. Adapted from qcom,sm6350-pinctrl.yaml. Signed-off-by: Richard Acayan Reviewed-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221014001934.4995-2-mailingradian@gmail.com Signed-off-by: Linus Walleij .../bindings/pinctrl/qcom,sdm670-tlmm.yaml | 127 +++++++++++++++++++++ 1 file changed, 127 insertions(+) commit 4c2572fe0ae742c2fa25b6fbb06ef4b3cd08b454 Author: Ashutosh Dixit Date: Thu Oct 13 08:45:25 2022 -0700 drm/i915/hwmon: Expose power1_max_interval Expose power1_max_interval, that is the tau corresponding to PL1, as a custom hwmon attribute. Some bit manipulation is needed because of the format of PKG_PWR_LIM_1_TIME in GT0_PACKAGE_RAPL_LIMIT register (1.x * power(2,y)). v2: Update date and kernel version in Documentation (Badal) v3: Cleaned up hwm_power1_max_interval_store() (Badal) v4: - Fixed review comments (Anshuman) - In hwm_power1_max_interval_store() get PKG_MAX_WIN from pkg_power_sku when it is valid (Ashutosh) - KernelVersion: 6.2, Date: February 2023 in doc (Tvrtko) v5: On some of the DGFX setups it is seen that although pkg_power_sku is valid the field PKG_WIN_MAX is not populated. So it is decided to stick to default value of PKG_WIN_MAX (Ashutosh) v6: Change contact to intel-gfx (Rodrigo) Fixed variable types in hwm_power1_max_interval_store (Andi) Documented PKG_MAX_WIN_DEFAULT (Andi) Removed else in hwm_attributes_visible (Andi) Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar Acked-by: Guenter Roeck Reviewed-by: Anshuman Gupta Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221013154526.2105579-7-ashutosh.dixit@intel.com .../ABI/testing/sysfs-driver-intel-i915-hwmon | 9 ++ drivers/gpu/drm/i915/i915_hwmon.c | 119 ++++++++++++++++++++- drivers/gpu/drm/i915/intel_mchbar_regs.h | 7 ++ 3 files changed, 134 insertions(+), 1 deletion(-) commit c8939848f7e4b01fe37295529f8b94e93ffbdd16 Author: Ashutosh Dixit Date: Thu Oct 13 08:45:24 2022 -0700 drm/i915/hwmon: Expose card reactive critical power Expose the card reactive critical (I1) power. I1 is exposed as power1_crit in microwatts (typically for client products) or as curr1_crit in milliamperes (typically for server). v2: Add curr1_crit functionality (Ashutosh) v3: Use HWMON_CHANNEL_INFO to define power1_crit, curr1_crit (Badal) v4: Use hwm_ prefix for static functions (Ashutosh) v5: KernelVersion: 6.2, Date: February 2023 in doc (Tvrtko) v6: Change contact to intel-gfx (Rodrigo) Cc: Sujaritha Sundaresan Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar Acked-by: Guenter Roeck Reviewed-by: Anshuman Gupta Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221013154526.2105579-6-ashutosh.dixit@intel.com .../ABI/testing/sysfs-driver-intel-i915-hwmon | 26 ++++++ drivers/gpu/drm/i915/i915_hwmon.c | 95 +++++++++++++++++++++- drivers/gpu/drm/i915/i915_reg.h | 6 ++ 3 files changed, 126 insertions(+), 1 deletion(-) commit c41b8bdcc2973ca10c6f5c5c60d007a41f080a89 Author: Dale B Stimson Date: Thu Oct 13 08:45:23 2022 -0700 drm/i915/hwmon: Show device level energy usage Use i915 HWMON to display device level energy input. v2: Updated the date and kernel version in feature description v3: - Cleaned up hwm_energy function and removed unused function i915_hwmon_energy_status_get (Ashutosh) v4: KernelVersion: 6.2, Date: February 2023 in doc (Tvrtko) v5: Change contact to intel-gfx (Rodrigo) Change return type of hwm_energy to void (Andi) Signed-off-by: Dale B Stimson Signed-off-by: Ashutosh Dixit Signed-off-by: Riana Tauro Signed-off-by: Badal Nilawar Acked-by: Guenter Roeck Reviewed-by: Ashutosh Dixit Reviewed-by: Anshuman Gupta Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221013154526.2105579-5-ashutosh.dixit@intel.com .../ABI/testing/sysfs-driver-intel-i915-hwmon | 8 ++ drivers/gpu/drm/i915/i915_hwmon.c | 106 ++++++++++++++++++++- drivers/gpu/drm/i915/intel_mchbar_regs.h | 2 + 3 files changed, 114 insertions(+), 2 deletions(-) commit a27e292b8a54e24f85181d949fac8c51fdec8ff3 Author: Ahmad Fatoum Date: Sun Oct 2 14:57:53 2022 +0200 Documentation/x86/boot: Reserve type_of_loader=13 for barebox barebox[1], a bootloader for mostly ARM and MIPS embedded systems, can also be built as EFI payload for x86[2] to provide redundant power-fail safe, watchdog-supervised boot up. Since its v2015.09.0 release, it has been booting Linux on x86 with type_of_loader=0xff[3]. Reserve 13, the next free id, so that can be used instead in the future. [1]: https://www.barebox.org/ [2]: https://www.barebox.org/doc/latest/boards/efi.html [3]: https://elixir.bootlin.com/barebox/v2022.09.0/source/common/efi/payload/image.c#L217 Signed-off-by: Ahmad Fatoum Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221002125752.3400831-1-a.fatoum@pengutronix.de Documentation/x86/boot.rst | 1 + 1 file changed, 1 insertion(+) commit 99f55efb79114f7bc38e9c769f06f5bacb5e9d21 Author: Dale B Stimson Date: Thu Oct 13 08:45:22 2022 -0700 drm/i915/hwmon: Power PL1 limit and TDP setting Use i915 HWMON to display/modify dGfx power PL1 limit and TDP setting. v2: - Fix review comments (Ashutosh) - Do not restore power1_max upon module unload/load sequence because on production systems modules are always loaded and not unloaded/reloaded (Ashutosh) - Fix review comments (Jani) - Remove endianness conversion (Ashutosh) v3: Add power1_rated_max (Ashutosh) v4: - Use macro HWMON_CHANNEL_INFO to define power channel (Guenter) - Update the date and kernel version in Documentation (Badal) v5: Use hwm_ prefix for static functions (Ashutosh) v6: Fix review comments (Ashutosh) v7: - Define PCU_PACKAGE_POWER_SKU for DG1,DG2 and move PKG_PKG_TDP to intel_mchbar_regs.h (Anshuman) - KernelVersion: 6.2, Date: February 2023 in doc (Tvrtko) v8: Change contact to intel-gfx (Rodrigo) Minor change to val_sku_unit init (Andi) Cc: Guenter Roeck Signed-off-by: Dale B Stimson Signed-off-by: Ashutosh Dixit Signed-off-by: Riana Tauro Signed-off-by: Badal Nilawar Acked-by: Guenter Roeck Reviewed-by: Ashutosh Dixit Reviewed-by: Anshuman Gupta Reviewed-by: Andi Shyti Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221013154526.2105579-4-ashutosh.dixit@intel.com .../ABI/testing/sysfs-driver-intel-i915-hwmon | 20 +++ drivers/gpu/drm/i915/i915_hwmon.c | 154 +++++++++++++++++++++ drivers/gpu/drm/i915/intel_mchbar_regs.h | 12 ++ 3 files changed, 186 insertions(+) commit f8572bb675250ee527d9ba35fa1ce17480407399 Author: Riana Tauro Date: Thu Oct 13 08:45:21 2022 -0700 drm/i915/hwmon: Add HWMON current voltage support Use i915 HWMON subsystem to display current input voltage. v2: - Updated date and kernel version in feature description - Fixed review comments (Ashutosh) v3: Use macro HWMON_CHANNEL_INFO to define hwmon channel (Guenter) v4: - Fixed review comments (Ashutosh) - Use hwm_ prefix for static functions (Ashutosh) v5: Added unit of voltage as millivolts (Ashutosh) v6: KernelVersion: 6.2, Date: February 2023 in doc (Tvrtko) v7: Change contact to intel-gfx (Rodrigo) GEN12_RPSTAT1 is available for all Gen12+ (Andi) Added Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon to MAINTAINERS Cc: Guenter Roeck Cc: Anshuman Gupta Signed-off-by: Riana Tauro Signed-off-by: Badal Nilawar Signed-off-by: Ashutosh Dixit Acked-by: Guenter Roeck Reviewed-by: Ashutosh Dixit Reviewed-by: Anshuman Gupta Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221013154526.2105579-3-ashutosh.dixit@intel.com .../ABI/testing/sysfs-driver-intel-i915-hwmon | 7 +++ MAINTAINERS | 1 + drivers/gpu/drm/i915/gt/intel_gt_regs.h | 3 ++ drivers/gpu/drm/i915/i915_hwmon.c | 53 ++++++++++++++++++++++ 4 files changed, 64 insertions(+) commit b3b088e28183b84080b7f0a0b8da84ec42b4b0e8 Author: Dale B Stimson Date: Thu Oct 13 08:45:20 2022 -0700 drm/i915/hwmon: Add HWMON infrastructure The i915 HWMON module will be used to expose voltage, power and energy values for dGfx. Here we set up i915 hwmon infrastructure including i915 hwmon registration, basic data structures and functions. v2: - Create HWMON infra patch (Ashutosh) - Fixed review comments (Jani) - Remove "select HWMON" from i915/Kconfig (Jani) v3: Use hwm_ prefix for static functions (Ashutosh) v4: s/#ifdef CONFIG_HWMON/#if IS_REACHABLE(CONFIG_HWMON)/ since the former doesn't work if hwmon is compiled as a module (Guenter) v5: Fixed review comments (Jani) v6: s/kzalloc/devm_kzalloc/ (Andi) v7: s/hwmon_device_register_with_info/ devm_hwmon_device_register_with_info/ (Ashutosh) Cc: Guenter Roeck Signed-off-by: Dale B Stimson Signed-off-by: Ashutosh Dixit Signed-off-by: Riana Tauro Signed-off-by: Badal Nilawar Acked-by: Guenter Roeck Reviewed-by: Ashutosh Dixit Reviewed-by: Anshuman Gupta Reviewed-by: Andi Shyti Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221013154526.2105579-2-ashutosh.dixit@intel.com drivers/gpu/drm/i915/Makefile | 3 + drivers/gpu/drm/i915/i915_driver.c | 5 ++ drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_hwmon.c | 122 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_hwmon.h | 20 ++++++ 5 files changed, 152 insertions(+) commit f2b470f036770805ebd20fb5cfe800395c7215af Author: Christophe Leroy Date: Fri Sep 2 14:42:06 2022 +0200 Documentation: gpio: Remove text about ARCH_NR_GPIOS ARCH_NR_GPIOS have been removed, clean up the documentation. After this patch, the only place when ARCH_NR_GPIOS remains is in translations/zh_CN/gpio.txt and translations/zh_TW/gpio.txt. I don't have the skills to update that, anyway those two files are already out of sync as they are still mentionning ARCH_REQUIRE_GPIOLIB which was removed by commit 65053e1a7743 ("gpio: delete ARCH_[WANTS_OPTIONAL|REQUIRE]_GPIOLIB") Signed-off-by: Christophe Leroy Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski Documentation/driver-api/gpio/legacy.rst | 5 ----- 1 file changed, 5 deletions(-) commit 7b61212f2a07a5afd213c8876e52b5c9946441e2 Author: Christophe Leroy Date: Fri Sep 2 14:42:05 2022 +0200 gpiolib: Get rid of ARCH_NR_GPIOS Since commit 14e85c0e69d5 ("gpio: remove gpio_descs global array") there is no limitation on the number of GPIOs that can be allocated in the system since the allocation is fully dynamic. ARCH_NR_GPIOS is today only used in order to provide downwards gpiobase allocation from that value, while static allocation is performed upwards from 0. However that has the disadvantage of limiting the number of GPIOs that can be registered in the system. To overcome this limitation without requiring each and every platform to provide its 'best-guess' maximum number, rework the allocation to allocate upwards, allowing approx 2 millions of GPIOs. In order to still allow static allocation for legacy drivers, define GPIO_DYNAMIC_BASE with the value 512 as the start for dynamic allocation. The 512 value is chosen because it is the end of the current default range so all current static allocations are expected to be below that value. Of course that's just a rough estimate based on the default value, but assuming static allocations come first, even if there are more static allocations it should fit under the 512 value. In the future, it is expected that all static allocations go away and then dynamic allocation will be patched to start at 0. Signed-off-by: Christophe Leroy Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski arch/arm/include/asm/gpio.h | 1 - drivers/gpio/gpiolib.c | 10 ++++----- include/asm-generic/gpio.h | 55 +++++++++++++++++---------------------------- 3 files changed, 26 insertions(+), 40 deletions(-) commit 502df79b860563d79143be7a1453c2b3224cd836 Author: Christophe Leroy Date: Fri Sep 2 14:42:04 2022 +0200 gpiolib: Warn on drivers still using static gpiobase allocation In the preparation of getting completely rid of static gpiobase allocation in the future, emit a warning in drivers still doing so. Signed-off-by: Christophe Leroy Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 3 +++ 1 file changed, 3 insertions(+) commit 95e827a1b0b7c8334d24da7b4a2d17ec5aa7374c Author: Christophe Leroy Date: Fri Sep 2 14:42:03 2022 +0200 gpio: davinci: Stop using ARCH_NR_GPIOS Since commit 14e85c0e69d5 ("gpio: remove gpio_descs global array") there is no global limitation anymore on the number of GPIOs in the system so don't clamp the number of GPIOs with ARCH_NR_GPIOS. Signed-off-by: Christophe Leroy Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-davinci.c | 3 --- 1 file changed, 3 deletions(-) commit 95b39792c6646322e0684f1a1aa395ee82b6f3fb Author: Christophe Leroy Date: Fri Sep 2 14:42:02 2022 +0200 gpio: aggregator: Stop using ARCH_NR_GPIOS ARCH_NR_GPIOS is used locally in aggr_parse() as the maximum number of GPIOs to be aggregated together by the driver since commit ec75039d5550 ("gpio: aggregator: Use bitmap_parselist() for parsing GPIO offsets"). Don't rely on the total possible number of GPIOs in the system but define a local arbitrary macro for that, set to 512 which should be large enough as it is also the default value for ARCH_NR_GPIOS. Signed-off-by: Christophe Leroy Reviewed-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-aggregator.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 317627a4a19e2a6f8d60e3e2eefe6dfd87059d79 Author: Davide Ciminaghi Date: Fri Sep 2 14:42:01 2022 +0200 gpio: Remove sta2x11 GPIO driver The Connext chip has 4 gpio cells looking very similar to those of the Nomadik, whose gpio/pinctrl driver (already featuring devicetree support) will be used instead of the sta2x11 specific one. Signed-off-by: Davide Ciminaghi Acked-by: Giancarlo Asnaghi Acked-by: Linus Walleij Signed-off-by: Christophe Leroy Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 8 - drivers/gpio/Makefile | 1 - drivers/gpio/gpio-sta2x11.c | 411 -------------------------------------------- 3 files changed, 420 deletions(-) commit 00e8f7153bcdecc5c31e307c7c17fecf42308fc4 Author: Kees Cook Date: Sat Sep 3 00:37:06 2022 -0700 x86/paravirt: Remove clobber bitmask from .parainstructions The u16 "clobber" value is not used in .parainstructions since commit 27876f3882fd ("x86/paravirt: Remove clobbers from struct paravirt_patch_site") Remove the u16 from the section macro, the argument from all macros, and all now-unused CLBR_* macros. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220903073706.3193746-1-keescook@chromium.org arch/x86/include/asm/paravirt_types.h | 61 +++++++---------------------------- 1 file changed, 12 insertions(+), 49 deletions(-) commit 8ada020ade3bc4125b639a1dca50a6df687dd986 Author: Yang Yingliang Date: Sun Sep 25 10:12:58 2022 +0800 pinctrl: ocelot: add missing destroy_workqueue() in error path in ocelot_pinctrl_probe() Using devm_add_action_or_reset() to make workqueue device-managed, so it can be destroy whenever the driver is unbound. Fixes: c297561bc98a ("pinctrl: ocelot: Fix interrupt controller") Signed-off-by: Yang Yingliang Reviewed-by: Horatiu Vultur Link: https://lore.kernel.org/r/20220925021258.1492905-1-yangyingliang@huawei.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-ocelot.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit afb8d5f4311585a9d79ca45da3e53c382e826e7b Author: Andy Shevchenko Date: Wed Oct 5 16:33:37 2022 +0300 pinctrl: actions: make irq_chip immutable Since recently, the kernel is nagging about mutable irq_chips: "not an immutable chip, please consider fixing it!" Drop the unneeded copy, flag it as IRQCHIP_IMMUTABLE, add the new helper functions and call the appropriate gpiolib functions. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221005133337.19245-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/actions/pinctrl-owl.c | 39 +++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit bf08ce132cd069afc45635e1ffeb6adb0523cc60 Author: Stephen Kitt Date: Wed Oct 12 16:25:23 2022 +0200 drivers/gpio: use simple i2c probe All these drivers have an i2c probe function which doesn't use the "struct i2c_device_id *id" parameter, so they can trivially be converted to the "probe_new" style of probe with a single argument. This is part of an ongoing transition to single-argument i2c probe functions. Old-style probe functions involve a call to i2c_match_id: in drivers/i2c/i2c-core-base.c, /* * When there are no more users of probe(), * rename probe_new to probe. */ if (driver->probe_new) status = driver->probe_new(client); else if (driver->probe) status = driver->probe(client, i2c_match_id(driver->id_table, client)); else status = -EINVAL; Drivers which don't need the second parameter can be declared using probe_new instead, avoiding the call to i2c_match_id. Drivers which do can still be converted to probe_new-style, calling i2c_match_id themselves (as is done currently for of_match_id). This change was done using the following Coccinelle script, and fixed up for whitespace changes: @ rule1 @ identifier fn; identifier client, id; @@ - static int fn(struct i2c_client *client, const struct i2c_device_id *id) + static int fn(struct i2c_client *client) { ...when != id } @ rule2 depends on rule1 @ identifier rule1.fn; identifier driver; @@ struct i2c_driver driver = { - .probe + .probe_new = ( fn | - &fn + fn ) , }; Signed-off-by: Stephen Kitt Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-gw-pld.c | 5 ++--- drivers/gpio/gpio-max7300.c | 5 ++--- drivers/gpio/gpio-tpic2810.c | 5 ++--- drivers/gpio/gpio-ts4900.c | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) commit 576d6b40dcceade7d77e88f63e621349c6937bc3 Author: Biju Das Date: Wed Oct 5 12:18:55 2022 +0100 clk: renesas: r9a07g044: Add MTU3a clock and reset entry Add MTU3a clock and reset entry to CPG driver. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20221005111855.553436-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a07g044-cpg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2d93887cb4bac0a36ce9e146956f631ab7994680 Author: Johan Hovold Date: Mon Oct 17 08:50:13 2022 +0200 phy: qcom-qmp-pcie: drop bogus register update Since commit 0d58280cf1e6 ("phy: Update PHY power control sequence") the PHY is powered on before configuring the registers and only the MSM8996 PCIe PHY, which includes the POWER_DOWN_CONTROL register in its PCS initialisation table, may possibly require a second update afterwards. To make things worse, the POWER_DOWN_CONTROL register lies at a different offset on more recent SoCs so that the second update, which still used a hard-coded offset, would write to an unrelated register (e.g. a revision-id register on SC8280XP). As the MSM8996 PCIe PHY is now handled by a separate driver, simply drop the bogus register update. Fixes: e4d8b05ad5f9 ("phy: qcom-qmp: Use proper PWRDOWN offset for sm8150 USB") added support Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov #RB3 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221017065013.19647-12-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 6 ------ 1 file changed, 6 deletions(-) commit 5b76f5ec63e0bfd20d955fc9d09dc2cff7742bec Author: Johan Hovold Date: Mon Oct 17 08:50:12 2022 +0200 phy: qcom-qmp-pcie: clean up clock lists Keep the clock lists together and sorted by symbol name. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221017065013.19647-11-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 645d3d04702401e002928b934b830bd25be9e277 Author: Johan Hovold Date: Mon Oct 17 08:50:11 2022 +0200 phy: qcom-qmp-usb: clean up power-down handling Always define the POWER_DOWN_CONTROL register instead of falling back to the v2 (and v3) offset during power on and power off. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221017065013.19647-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 2d3068cf8d9aa80cfbe2dd4226abbf425c26f8b7 Author: Johan Hovold Date: Mon Oct 17 08:50:10 2022 +0200 phy: qcom-qmp-ufs: clean up power-down handling Always define the POWER_DOWN_CONTROL register instead of falling back to the v2 (and v4) offset during power on and power off. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221017065013.19647-9-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 2e52ddf045a08fcae8dc4c88d10aa01252dd4165 Author: Johan Hovold Date: Mon Oct 17 08:50:09 2022 +0200 phy: qcom-qmp-combo: clean up power-down handling Always define the POWER_DOWN_CONTROL register instead of falling back to the v2 (and v3) offset during power on and power off. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221017065013.19647-8-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 4d3701f94f274ac67cddd1e87a2311a2a40c0138 Author: Johan Hovold Date: Mon Oct 17 08:50:08 2022 +0200 phy: qcom-qmp-pcie-msm8996: clean up power-down handling This driver uses v2 registers only so drop the unnecessary POWER_DOWN_CONTROL override. Note that this register is already hard-coded when powering on the PHY. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221017065013.19647-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 5b68d95c3fc72b4a89b9c7549e1ef638a01a3e15 Author: Johan Hovold Date: Mon Oct 17 08:50:07 2022 +0200 phy: qcom-qmp-pcie: move power-down update Move the power-down-control register update that powers on the PHY to the power-on handler so that it matches the power-off handler. Note that the power-on handler is currently always called directly after init. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221017065013.19647-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6d5b1e2067aef151747b4ec1cd927d44b61e4293 Author: Johan Hovold Date: Mon Oct 17 08:50:06 2022 +0200 phy: qcom-qmp-pcie: clean up power-down handling Always define the POWER_DOWN_CONTROL register instead of falling back to the v2 offset during power on and power off. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221017065013.19647-5-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 4567bb1799d253ceb81ba9c9837ae13a86e4b50a Author: Johan Hovold Date: Mon Oct 17 08:50:05 2022 +0200 phy: qcom-qmp-pcie: drop unused common-block registers Drop the common-block register defines that are unused since the QMP driver split. Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221017065013.19647-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 9 --------- 1 file changed, 9 deletions(-) commit f823346de8b1fa44bbab3ef62d40e9616332c7ee Author: Johan Hovold Date: Mon Oct 17 08:50:04 2022 +0200 phy: qcom-qmp-combo: drop unused UFS reset Drop the unused UFS reset code which isn't used since the QMP driver split. Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221017065013.19647-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 9 --------- 1 file changed, 9 deletions(-) commit 8d3bf72497a8def5dc75e10a2229f1c692598b97 Author: Johan Hovold Date: Mon Oct 17 08:50:03 2022 +0200 phy: qcom-qmp: fix obsolete lane comments All QMP drivers but the MSM8996 and combo ones handle exactly one PHY and the corresponding memory resources are not per-lane, but per PHY. Update the obsolete comments. Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221017065013.19647-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 864010561d8ce63506cb34063bb5db6e96bfefc3 Author: Geert Uytterhoeven Date: Wed Sep 28 14:32:43 2022 +0200 clk: renesas: r8a779g0: Add INTC-EX clock Add the module clock used by the Interrupt Controller for External Devices (INTC-EX) aka IRQC on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/8b5ab900ebce8c38604292a5138da11ad2cb072c.1664368268.git.geert+renesas@glider.be drivers/clk/renesas/r8a779g0-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit e0b07ff0371da45cf85e5291997d8b209aa112f1 Author: Geert Uytterhoeven Date: Mon Sep 26 17:01:49 2022 +0200 clk: renesas: r8a779g0: Add MSIOF clocks Add the module clocks used by the Clock-Synchronized Serial Interfaces with FIFO (MSIOF) on the Renesas R-Car V4H (R8A779G0) SoC. Extracted from a larger patch in the BSP by Kazuya Mizuguchi. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/3cb2f1798145099a46134862c6bcbdcc29ca7410.1664204336.git.geert+renesas@glider.be drivers/clk/renesas/r8a779g0-cpg-mssr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 81e8dd07445eb330855d340a90918b872afa9232 Author: Geert Uytterhoeven Date: Mon Sep 26 17:01:48 2022 +0200 clk: renesas: r8a779g0: Add SYS-DMAC clocks Add the module clocks used by the Direct Memory Access Controllers for System (SYS-DMAC) on the Renesas R-Car V4H (R8A779G0) SoC. Extracted from a larger patch in the BSP by Kazuya Mizuguchi. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/d9f8322d362c7cebb29bfa7e128b4974882c4a7d.1664204336.git.geert+renesas@glider.be drivers/clk/renesas/r8a779g0-cpg-mssr.c | 2 ++ 1 file changed, 2 insertions(+) commit a3b4137a4d4023e6662a2e35579516c7a44bc1cb Author: Yoshihiro Shimoda Date: Thu Sep 22 14:13:58 2022 +0900 clk: renesas: r8a779f0: Add Ethernet Switch clocks Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20220922051358.3442191-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a779f0-cpg-mssr.c | 2 ++ 1 file changed, 2 insertions(+) commit c516ad419568450dea3a89011bb6e5db4f22d653 Author: Lad Prabhakar Date: Wed Sep 21 09:00:51 2022 +0100 clk: renesas: rzg2l: Fix typo in function name Fix typo, rzg2l_mod_clock__get_sibling -> rzg2l_mod_clock_get_sibling Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20220921080051.5604-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/rzg2l-cpg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1625fbc1f73f1fa8f77c38ea554cc0b2327b156b Author: Biju Das Date: Mon Sep 19 09:41:10 2022 +0100 clk: renesas: rzg2l: Support sd clk mux round operation Currently, determine_rate() is not doing any round operation and due to this it always selects a lower clock source compared to the closest higher one. Support sd clk mux round operation by passing CLK_MUX_ROUND_CLOSEST flag to clk_mux_determine_rate_flags(). Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20220919084110.3065156-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/rzg2l-cpg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a84ed1919fb3fc767ae3aad13bbff8ea8eaceedd Author: Dmitry Baryshkov Date: Tue Sep 27 12:22:06 2022 +0300 PCI: qcom-ep: Setup PHY to work in EP mode Call phy_set_mode_ext() to notify the PHY driver that the PHY is being used in the EP mode. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Jingoo Han Reviewed-by: Johan Hovold Signed-off-by: Dmitry Baryshkov Acked-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20220927092207.161501-6-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/pci/controller/dwc/pcie-qcom-ep.c | 5 +++++ 1 file changed, 5 insertions(+) commit f90747d1b641aad244cca7d6aa20aa25f33ae8e4 Author: Dmitry Baryshkov Date: Tue Sep 27 12:22:05 2022 +0300 PCI: qcom: Setup PHY to work in RC mode Call phy_set_mode_ext() to notify the PHY driver that the PHY is being used in the RC mode. Reviewed-by: Jingoo Han Reviewed-by: Johan Hovold Signed-off-by: Dmitry Baryshkov Acked-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20220927092207.161501-5-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/pci/controller/dwc/pcie-qcom.c | 5 +++++ 1 file changed, 5 insertions(+) commit f5682f13b7ab0bbdffd11934afe4b5c011d5be74 Author: Dmitry Baryshkov Date: Tue Sep 27 12:22:04 2022 +0300 phy: qcom-qmp-pcie: Support SM8450 PCIe1 PHY in EP mode Add support for using PCIe1 (gen4x2) in EP mode on SM8450. The tables to program are mostly common with the RC mode tables, so only register difference are split into separate RC and EP tables. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220927092207.161501-4-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 78 +++++++++++++++++----- drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v5_20.h | 1 + 2 files changed, 64 insertions(+), 15 deletions(-) commit 11bf53a38c82baef349b4efc6a84f069dab7085a Author: Dmitry Baryshkov Date: Tue Sep 27 12:22:03 2022 +0300 phy: qcom-qmp-pcie: support separate tables for EP mode The PCIe QMP PHY requires different programming sequences when being used for the RC (Root Complex) or for the EP (End Point) modes. Allow selecting the submode and thus selecting a set of PHY programming tables. Since the RC and EP modes share common some common init sequence, the common sequence is kept in the main table and the sequence differences are pushed to the extra tables. Reviewed-by: Johan Hovold Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220927092207.161501-3-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 46 +++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) commit 2566ad8ec418934c213cb50fd2084ffd896a2fea Author: Dmitry Baryshkov Date: Tue Sep 27 12:22:02 2022 +0300 phy: qcom-qmp-pcie: split register tables into common and extra parts SM8250 configuration tables are split into two parts: the common one and the PHY-specific tables. Make this split more formal. Rather than having a blind renamed copy of all QMP table fields, add separate struct qmp_phy_cfg_tables and add two instances of this structure to the struct qmp_phy_cfg. Later on this will be used to support different PHY modes (RC vs EP). Reviewed-by: Johan Hovold Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220927092207.161501-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 406 +++++++++++++++++-------------- 1 file changed, 222 insertions(+), 184 deletions(-) commit 1d30800c0c0ae1d086ffad2bdf0ba4403370f132 Author: Borislav Petkov Date: Tue Aug 9 17:32:02 2022 +0200 x86/bugs: Use sysfs_emit() Those mitigations are very talkative; use the printing helper which pays attention to the buffer size. Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220809153419.10182-1-bp@alien8.de arch/x86/kernel/cpu/bugs.c | 103 ++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 52 deletions(-) commit b01d622d76134e9401970ffd3fbbb9a7051f976a Author: Pali Rohár Date: Tue Sep 20 14:11:54 2022 +0200 phy: marvell: phy-mvebu-a3700-comphy: Reset COMPHY registers before USB 3.0 power on Turris MOX board with older ARM Trusted Firmware version v1.5 is not able to detect any USB 3.0 device connected to USB-A port on Mox-A module after commit 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support"). On the other hand USB 2.0 devices connected to the same USB-A port are working fine. It looks as if the older firmware configures COMPHY registers for USB 3.0 somehow incompatibly for kernel driver. Experiments show that resetting COMPHY registers via setting SFT_RST auto-clearing bit in COMPHY_SFT_RESET register fixes this issue. Reset the COMPHY in mvebu_a3700_comphy_usb3_power_on() function as a first step after selecting COMPHY lane and USB 3.0 function. With this change Turris MOX board can successfully detect USB 3.0 devices again. Before the above mentioned commit this reset was implemented in PHY reset method, so this is the reason why there was no issue with older firmware version then. Fixes: 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support") Reported-by: Marek Behún Signed-off-by: Pali Rohár Tested-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20220920121154.30115-1-pali@kernel.org Signed-off-by: Vinod Koul drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 3 +++ 1 file changed, 3 insertions(+) commit dce9edff16ee8df20e791e82e0704c4667cc3908 Author: Richard Zhu Date: Thu Oct 13 09:47:02 2022 +0800 phy: freescale: imx8m-pcie: Add i.MX8MP PCIe PHY support Add i.MX8MP PCIe PHY support. Signed-off-by: Richard Zhu Signed-off-by: Lucas Stach Tested-by: Marek Vasut Tested-by: Richard Leitner Tested-by: Alexander Stein Reviewed-by: Lucas Stach Reviewed-by: Ahmad Fatoum Link: https://lore.kernel.org/r/1665625622-20551-5-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Vinod Koul drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit ca679c49c4463595499a053ba94328acb574fffa Author: Richard Zhu Date: Thu Oct 13 09:47:01 2022 +0800 phy: freescale: imx8m-pcie: Refine i.MX8MM PCIe PHY driver To make it more flexible and easy to expand. Refine i.MX8MM PCIe PHY driver. - Use gpr compatible string to avoid the codes duplications when add another platform PCIe PHY support. - Re-arrange the codes to let it more flexible and easy to expand. No functional change. Re-arrange the TX tuning, since internal registers can be wrote through APB interface before assertion of CMN_RST. Signed-off-by: Richard Zhu Signed-off-by: Lucas Stach Tested-by: Marek Vasut Tested-by: Richard Leitner Tested-by: Alexander Stein Reviewed-by: Lucas Stach Reviewed-by: Ahmad Fatoum Link: https://lore.kernel.org/r/1665625622-20551-4-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Vinod Koul drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 106 ++++++++++++++++++----------- 1 file changed, 66 insertions(+), 40 deletions(-) commit e9e7dca53bf5a5bddf70c87157660a29cdcdd2d8 Author: Richard Zhu Date: Thu Oct 13 09:47:00 2022 +0800 phy: freescale: imx8m-pcie: Refine register definitions No function changes, refine PHY register definitions. - Keep align with other CMN PHY registers, refine the definitions of PHY_CMN_REG75. - Remove two BIT definitions that are not used at all. Signed-off-by: Richard Zhu Signed-off-by: Lucas Stach Tested-by: Marek Vasut Tested-by: Richard Leitner Tested-by: Alexander Stein Reviewed-by: Lucas Stach Link: https://lore.kernel.org/r/1665625622-20551-3-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Vinod Koul drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 25caed3dcadacd0443dce4fb820e4a33029bba40 Author: Richard Zhu Date: Thu Oct 13 09:46:59 2022 +0800 dt-binding: phy: Add i.MX8MP PCIe PHY binding Add i.MX8MP PCIe PHY binding. On i.MX8MM, the initialized default value of PERST bit(BIT3) of SRC_PCIEPHY_RCR is 1b'1. But i.MX8MP has one inversed default value 1b'0 of PERST bit. And the PERST bit should be kept 1b'1 after power and clocks are stable. So add one more PERST explicitly for i.MX8MP PCIe PHY. Signed-off-by: Richard Zhu Tested-by: Marek Vasut Tested-by: Richard Leitner Tested-by: Alexander Stein Reviewed-by: Lucas Stach Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1665625622-20551-2-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Vinod Koul .../devicetree/bindings/phy/fsl,imx8-pcie-phy.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit e27ecef8a8ccc13c54df54f5d100aa608de4c306 Author: Matt Ranostay Date: Sat Oct 15 13:11:23 2022 -0700 phy: ti: phy-j721e-wiz: add j784s4-wiz-10g module support Add support for j784s4-wiz-10g device which has two core reference clocks (e.g core_ref_clk, core_ref1_clk) which requires an additional mux selection option. Acked-by: Roger Quadros Signed-off-by: Matt Ranostay Link: https://lore.kernel.org/r/20221015201123.195477-3-mranostay@ti.com Signed-off-by: Vinod Koul drivers/phy/ti/phy-j721e-wiz.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit cbdbe312c9b6f9dbf698c3db1a5bec4140fe1c21 Author: Matt Ranostay Date: Sat Oct 15 13:11:22 2022 -0700 dt-bindings: phy-j721e-wiz: add j784s4 compatible string Add ti,j784s4-wiz-10g compatible string to binding documentation. Signed-off-by: Matt Ranostay Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221015201123.195477-2-mranostay@ti.com Signed-off-by: Vinod Koul Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml | 1 + 1 file changed, 1 insertion(+) commit f37722ac71cc8b5ab86f4b3c4d9b9388e1315e8b Author: Dan Carpenter Date: Fri Oct 14 12:25:06 2022 +0300 phy: stm32: fix an error code in probe If "index > usbphyc->nphys" is true then this returns success but it should return -EINVAL. Fixes: 94c358da3a05 ("phy: stm32: add support for STM32 USB PHY Controller (USBPHYC)") Signed-off-by: Dan Carpenter Reviewed-by: Amelie Delaunay Link: https://lore.kernel.org/r/Y0kq8j6S+5nDdMpr@kili Signed-off-by: Vinod Koul drivers/phy/st/phy-stm32-usbphyc.c | 2 ++ 1 file changed, 2 insertions(+) commit 1dea5edc90855cab8359b599128e3f322803cd09 Author: Christophe Leroy Date: Thu Oct 6 07:17:07 2022 +0200 ata: pata_mpc52xx: Replace NO_IRQ with 0 NO_IRQ is used to check the return of irq_of_parse_and_map(). On some architecture NO_IRQ is 0, on other architectures it is -1. irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ. So use 0 instead of using NO_IRQ. Signed-off-by: Christophe Leroy Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal drivers/ata/pata_mpc52xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ba09d202657d2004859f4c05fa3272873ceb08f Author: Niklas Cassel Date: Mon Oct 3 21:46:52 2022 +0200 ata: libahci: read correct status and error field for NCQ commands Currently, for PIO commands, ahci_qc_fill_rtf() reads the status and error fields from the PIO Setup FIS area of the Received FIS Structure. For any non-PIO command, ahci_qc_fill_rtf() currently reads the status and error fields from the D2H Register FIS area of the Received FIS Structure. This is simply not correct. According to the SATA 3.5a specification: 11.10 DMA DATA-IN command protocol and 11.11 DMA DATA-OUT command protocol: READ DMA and WRITE DMA (non-NCQ commands) will end with the Send_status state, which transmits a Register D2H FIS. Likewise, in: 11.15 FPDMA QUEUED command protocol: READ FPDMA QUEUED and WRITE FPDMA QUEUED (NCQ commands) will end with the SendStatus state, which transmits a Set Device Bits FIS. So, for NCQ commands, there is never a D2H Register FIS sent. Reading the status and error fields from the D2H Register FIS area for a NCQ command, will result in us returning the status and error values for the last non-NCQ command, which is incorrect. Update ahci_qc_fill_rtf() to read the status and error fields from the correct area in the Received FIS Structure for NCQ commands. Once reason why this has not been detected before, could be because, in case of an NCQ error, ata_eh_analyze_ncq_error() will overwrite the (incorrect) status and error values set by ahci_qc_fill_rtf(). However, even successful NCQ commands can have bits set in the status field (e.g. the sense data available bit), so it is mandatory to read the status from the correct area also for NCQ commands. Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal drivers/ata/libahci.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 013115d90e007585bb85b45a5dc301ef1be62aab Author: Niklas Cassel Date: Mon Sep 26 20:53:08 2022 +0000 ata: libata: fetch sense data for ATA devices supporting sense reporting Currently, the sense data reporting feature set is enabled for all ATA devices which supports the feature set (ata_id_has_sense_reporting()), see ata_dev_config_sense_reporting(). However, even if sense data reporting is enabled, and the device indicates that sense data is available, the sense data is only fetched for ATA ZAC devices. For regular ATA devices, the available sense data is never fetched, it is simply ignored. Instead, libata will use the ERROR + STATUS fields and map them to a very generic and reduced set of sense data, see ata_gen_ata_sense() and ata_to_sense_error(). When sense data reporting was first implemented, regular ATA devices did fetch the sense data from the device. However, this was restricted to only ATA ZAC devices in commit ca156e006add ("libata: don't request sense data on !ZAC ATA devices"). With recent changes related to sense data and NCQ autosense, we want to, once again, fetch the sense data for all ATA devices supporting sense reporting. ata_gen_ata_sense() should only be used for devices that don't support the sense data reporting feature set. hopefully the features will be more robust this time around. It is not just ZAC, many new ATA features, e.g. Command Duration Limits, relies on working NCQ autosense and sense data. Therefore, it is not really an option to avoid fetching the sense data forever. If we encounter a device that is misbehaving because the sense data is actually fetched, then that device should be quirked such that it never enables the sense data reporting feature set in the first place, since such a device is obviously not compliant with the specification. The order in which we will try to add sense data to a scsi_cmnd: 1) NCQ autosense (if supported) - ata_eh_analyze_ncq_error() 2) REQUEST SENSE DATA EXT (if supported) - ata_eh_request_sense() 3) error + status field translation - ata_gen_ata_sense(), called by ata_scsi_qc_complete() if neither 1) or 2) is supported. Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal drivers/ata/libata-eh.c | 3 +-- drivers/ata/libata-sata.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 4b89ad8e5e1233bfe642e0185e34ad5e1cefb19e Author: Niklas Cassel Date: Mon Sep 26 20:53:07 2022 +0000 ata: libata: only set sense valid flag if sense data is valid While this shouldn't be needed if all devices that claim that they support NCQ autosense (ata_id_has_ncq_autosense()) and/or the sense data reporting feature (ata_id_has_sense_reporting()), actually supported those features. However, there might be some old ATA devices that either have these bits set, even when they don't support those features, or they simply return malformed data when using those features. These devices should be quirked, but in order to try to minimize the impact for the users of these such devices, it was suggested by Damien Le Moal that it might be a good idea to sanity check the sense data received from the device. If the sense data looks bogus, then the sense data is never added to the scsi_cmnd command. Introduce a new function, ata_scsi_sense_is_valid(), and use it in all places where sense data is received from the device. Suggested-by: Damien Le Moal Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal drivers/ata/libata-eh.c | 6 ++++-- drivers/ata/libata-sata.c | 11 +++++++---- drivers/ata/libata-scsi.c | 16 ++++++++++++++++ drivers/ata/libata.h | 1 + 4 files changed, 28 insertions(+), 6 deletions(-) commit 461ec040677127510d018c06e64d868e5e91be75 Author: Niklas Cassel Date: Mon Sep 26 20:53:06 2022 +0000 ata: libata: clarify when ata_eh_request_sense() will be called ata_eh_request_sense() returns early when flag ATA_QCFLAG_SENSE_VALID is set. However, since the call to ata_eh_request_sense() is guarded by a ATA_SENSE bit conditional, the logical conclusion for the reader is that all checks are performed at the call site. Highlight the fact that the sense data will not be fetched if flag ATA_QCFLAG_SENSE_VALID is already set by adding an additional check to the existing guarding conditional. No functional change. Additionally, add a comment explaining that ata_eh_analyze_tf() will only fetch the sense data if: -It was a non-NCQ command that failed, or -It was a NCQ command that failed, but the sense data was not included in the NCQ command error log (i.e. NCQ autosense is not supported). Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal drivers/ata/libata-eh.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 7390896b3484d44cbdb8bc4859964314ac66d3c9 Author: Niklas Cassel Date: Mon Sep 26 20:53:06 2022 +0000 ata: libata: fix NCQ autosense logic Currently, the logic if we should call ata_scsi_set_sense() (and set flag ATA_QCFLAG_SENSE_VALID to indicate that we have successfully added sense data to the struct ata_queued_cmd) looks like this: if (dev->class == ATA_DEV_ZAC && ((qc->result_tf.status & ATA_SENSE) || qc->result_tf.auxiliary)) The problem with this is that a drive can support the NCQ command error log without supporting NCQ autosense. On such a drive, if the failing command has sense data, the status field in the NCQ command error log will have the ATA_SENSE bit set. It is just that this sense data is not included in the NCQ command error log when NCQ autosense is not supported. Instead the sense data has to be fetched using the REQUEST SENSE DATA EXT command. Therefore, we should only add the sense data if the drive supports NCQ autosense AND the ATA_SENSE bit is set in the status field. Fix this, and at the same time, remove the duplicated ATA_DEV_ZAC check. The struct ata_taskfile supplied to ata_eh_read_log_10h() is memset:ed before calling the function, so simply checking if qc->result_tf.auxiliary is set is sufficient to tell us that the log actually contained sense data. Fixes: d238ffd59d3c ("libata: do not attempt to retrieve sense code twice") Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal drivers/ata/libata-sata.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit d9504c65be2a0794822363f3d75bb41e9c8b3691 Author: Damien Le Moal Date: Mon Sep 26 20:53:05 2022 +0000 scsi: Define the COMPLETED sense key Add the definition for the COMPLETED sense key in scsi_proto.h. While at it, cleanup the white lines around the sense keys macro definitions. Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel Acked-by: Martin K. Petersen include/scsi/scsi_proto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 91924d9bb1df2a234a0e055c550abdbd49412071 Author: Christian Göttsche Date: Wed Oct 12 19:46:22 2022 +0200 of: declare string literals const of_overlay_action_name() returns a string literal from a function local array. Modifying string literals is undefined behavior which usage of const pointer can avoid. of_overlay_action_name() is currently only used once in overlay_notify() to print the returned value. While on it declare the data array const as well. Reported by Clang: In file included from arch/x86/kernel/asm-offsets.c:22: In file included from arch/x86/kernel/../kvm/vmx/vmx.h:5: In file included from ./include/linux/kvm_host.h:19: In file included from ./include/linux/msi.h:23: In file included from ./arch/x86/include/asm/msi.h:5: In file included from ./arch/x86/include/asm/irqdomain.h:5: In file included from ./include/linux/irqdomain.h:35: ./include/linux/of.h:1555:3: error: initializing 'char *' with an expression of type 'const char[5]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] "init", ^~~~~~ ./include/linux/of.h:1556:3: error: initializing 'char *' with an expression of type 'const char[10]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] "pre-apply", ^~~~~~~~~~~ ./include/linux/of.h:1557:3: error: initializing 'char *' with an expression of type 'const char[11]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] "post-apply", ^~~~~~~~~~~~ ./include/linux/of.h:1558:3: error: initializing 'char *' with an expression of type 'const char[11]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] "pre-remove", ^~~~~~~~~~~~ ./include/linux/of.h:1559:3: error: initializing 'char *' with an expression of type 'const char[12]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] "post-remove", ^~~~~~~~~~~~~ Signed-off-by: Christian Göttsche Reviewed-by: Frank Rowand Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20221012174622.45006-1-cgzones@googlemail.com Signed-off-by: Rob Herring include/linux/of.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32e8f9b3144496c76ad659c255246ecee7b47669 Author: Yang Yingliang Date: Sat Oct 8 19:56:17 2022 +0800 of/platform: use of_address_count() helper Use of_address_count() to instead of open-coding it. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221008115617.3583890-3-yangyingliang@huawei.com Signed-off-by: Rob Herring drivers/of/platform.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 16988c742968d5ceb2e832a57bd277f51f0a59d7 Author: Yang Yingliang Date: Sat Oct 8 19:56:16 2022 +0800 of/address: introduce of_address_count() helper Introduce of_address_count() helper to count the IO resources instead of open-coding it. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221008115617.3583890-2-yangyingliang@huawei.com Signed-off-by: Rob Herring include/linux/of_address.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f8ced2abe6df374cd6bbe7bc642397d439315033 Author: Zeng Heng Date: Wed Oct 12 20:47:35 2022 +0800 drm/ttm: Remove unnecessary drm_mm_clean Remove unnecessary `drm_mm_clean` calling in `ttm_range_man_fini_nocheck`, due to effective check is already included in the following `drm_mm_takedown`. Signed-off-by: Zeng Heng Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221012124735.1702700-1-zengheng4@huawei.com Signed-off-by: Christian König drivers/gpu/drm/ttm/ttm_range_manager.c | 1 - 1 file changed, 1 deletion(-) commit 530f789766996c9298c02ac8b59cee6934322c6b Author: Maíra Canal Date: Sat Oct 1 19:34:22 2022 -0300 drm/tests: Split drm_test_dp_mst_sideband_msg_req_decode into parameterized tests The drm_test_dp_mst_sideband_msg_req_decode repeats the same test structure with different parameters. This could be better represented by parameterized tests, provided by KUnit. In addition to the parameterization of the tests, the test case for the client ID was changed: instead of using get_random_bytes to generate the client ID, the client ID is now hardcoded in the test case. This doesn't affect the assertively of the tests, as this test case only compare the data going in with the data going out and it doesn't transform the data itself in any way. So, convert drm_test_dp_mst_sideband_msg_req_decode into parameterized tests and make the tests' allocations and prints completely managed by KUnit. Signed-off-by: Maíra Canal Reviewed-by: Michał Winiarski Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221001223422.857505-2-mcanal@igalia.com drivers/gpu/drm/tests/drm_dp_mst_helper_test.c | 370 ++++++++++++++++--------- 1 file changed, 243 insertions(+), 127 deletions(-) commit d32f7960fb9370b9756f1668a7093a7afdaef72c Author: Maíra Canal Date: Sat Oct 1 19:34:21 2022 -0300 drm/tests: Split drm_test_dp_mst_calc_pbn_mode into parameterized tests The drm_test_dp_mst_calc_pbn_mode is based on a loop that executes tests for a couple of test cases. This could be better represented by parameterized tests, provided by KUnit. So, convert the drm_test_dp_mst_calc_pbn_mode into parameterized tests. Signed-off-by: Maíra Canal Reviewed-by: Michał Winiarski Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221001223422.857505-1-mcanal@igalia.com drivers/gpu/drm/tests/drm_dp_mst_helper_test.c | 77 ++++++++++++++++++-------- 1 file changed, 53 insertions(+), 24 deletions(-) commit 202fb33be38c98f7bc9f0fa370cd13d189b4f9d8 Author: Thomas Zimmermann Date: Thu Oct 13 13:29:23 2022 +0200 drm/ast: Avoid reprogramming primary-plane scanout address Some AST-based BMCs stop display output for up to 5 seconds after reprogramming the scanout address. As the address is fixed, avoid re-setting the address' value. v2: * only update offset if it changed (Jocelyn) Reported-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20221013112923.769-9-tzimmermann@suse.de drivers/gpu/drm/ast/ast_mode.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit f2fa5a99ca81ce1056539e83c705f3d6bec62e31 Author: Thomas Zimmermann Date: Thu Oct 13 13:29:22 2022 +0200 drm/ast: Convert ast to SHMEM Replace GEM VRAM helpers with GEM SHMEM helpers in ast. Avoids OOM errors when allocating video memory. Also adds support for dma-buf functionality. Aspeed display hardware supports display resolutions of FullHD and higher at 32-bit pixel depth. But the amount of video memory is in the range of 8 MiB to 32 MiB, which adds constraints to the actually available resolutions. As atomic modesetting with VRAM helpers requires double buffering in video memory, ast fails to pageflip in some configurations. For example, FullHD with an active cursor plane does not work on devices with 16 MiB of video memory. Resolve this problem by converting the ast driver to GEM SHMEM helpers. Keep the buffer objects in system memory and copy to video memory on pageflips via shadow-plane helpers. Userspace used to require shadow planes for decent performance, but that's now provided by the driver. To replace the memory management, the patch also implements damage handling for the primary plane. With GEM SHMEM helpers, dma-buf import and export is now supported by ast. This allows easier screen mirroring across devices or with an Aspeed-based BMC. A corresponding feature request is available at [1]. v2: * fix typos in commit message (Jocelyn) Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://lore.kernel.org/dri-devel/20220901124451.2523077-1-oushixiong@kylinos.cn/ # [1] Link: https://patchwork.freedesktop.org/patch/msgid/20221013112923.769-8-tzimmermann@suse.de drivers/gpu/drm/ast/Kconfig | 4 +- drivers/gpu/drm/ast/ast_drv.c | 4 +- drivers/gpu/drm/ast/ast_drv.h | 13 ++- drivers/gpu/drm/ast/ast_main.c | 5 +- drivers/gpu/drm/ast/ast_mm.c | 14 +-- drivers/gpu/drm/ast/ast_mode.c | 204 ++++++++++++++++++++++------------------- 6 files changed, 129 insertions(+), 115 deletions(-) commit d95dcfc4e3e747b7cee9077bfd18f6e5ccab1d12 Author: Thomas Zimmermann Date: Thu Oct 13 13:29:21 2022 +0200 drm/ast: Style cleanups in plane code Rename some of the variables in the plane code to better reflect the old and new state during checks and updates. Change some indention as well. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20221013112923.769-7-tzimmermann@suse.de drivers/gpu/drm/ast/ast_mode.c | 104 ++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 59 deletions(-) commit 537a1db9c5cd73989ed1aba38015281fab2b01d7 Author: Thomas Zimmermann Date: Thu Oct 13 13:29:20 2022 +0200 drm/ast: Rename struct ast_cursor_plane to struct ast_plane Rename the plane structure struct ast_cursor_plane to struct ast_plane as it will be used for the primary plane as well. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20221013112923.769-6-tzimmermann@suse.de drivers/gpu/drm/ast/ast_drv.h | 15 +++++++++------ drivers/gpu/drm/ast/ast_mode.c | 22 +++++++++++----------- 2 files changed, 20 insertions(+), 17 deletions(-) commit aa7c88650f705631f1e7ea03ea14171b0530b9ef Author: Thomas Zimmermann Date: Thu Oct 13 13:29:19 2022 +0200 drm/ast: Remove cursor double buffering Update the cursor image via damage handling in-place. The cursor's double buffering has no visible effect on the output, so remove it. Done in preparation of switching ast to GEM SHMEM helpers. Removing double buffering will allow us to use the same data structure for primary and cursor plane. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20221013112923.769-5-tzimmermann@suse.de drivers/gpu/drm/ast/ast_drv.h | 12 ++---- drivers/gpu/drm/ast/ast_mode.c | 83 ++++++++++++++++-------------------------- 2 files changed, 35 insertions(+), 60 deletions(-) commit 963a2ba2adb51f677f2be875bb516fa636eaab47 Author: Thomas Zimmermann Date: Thu Oct 13 13:29:18 2022 +0200 drm/ast: Do not call drm_atomic_add_affected_planes() There's no need to add planes to the atomic state. Remove the call to drm_atomic_add_affected_planes() from ast. On full modesets, the DRM helpers already add a CRTC's planes to the atomic state; see drm_atomic_helper_check_modeset(). There's no reason to call drm_atomic_add_affected_planes() unconditionally in the CRTC's atomic_check() in ast. It's also too late, as the atomic_check() of the added planes will not be called before the commit. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20221013112923.769-4-tzimmermann@suse.de drivers/gpu/drm/ast/ast_mode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0432a5044bb39fc542516cdec58e5041afad486c Author: Thomas Zimmermann Date: Thu Oct 13 13:29:17 2022 +0200 drm/ast: Call drm_atomic_helper_check_plane_state() unconditionally Always call drm_atomic_helper_check_plane_state() in each plane's atomic_check function. At the minimum, it needs to set or clear the plane state's 'visible' field. Otherwise the plane-state handling is bogus and would keep updating planes that have been disabled. While at it, also warn if the primary plane has been enabled, but is not visible. This cannot legally happen as the plane always covers the entire screen. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20221013112923.769-3-tzimmermann@suse.de drivers/gpu/drm/ast/ast_mode.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit 1fe182154984fa7942f8aafc268e9922e553cb13 Author: Thomas Zimmermann Date: Thu Oct 13 13:29:16 2022 +0200 drm/ast: Acquire I/O-register lock in atomic_commit_tail function Hold I/O-register lock in atomic_commit_tail to protect all pipeline updates at once. Protects modesetting against concurrent EDID reads. Complex modesetting operations involve mode changes and plane updates. These steps used to be protected individually against concurrent I/O. Make all this atomic wrt to reading display modes via EDID. The EDID code in the connector's get_modes helper already acquires the necessary lock. A similar issue was fixed in commit 2d70b9a1482e ("drm/mgag200: Acquire I/O-register lock in atomic_commit_tail function") for mgag200. v2: * fix typo in commit message (Jocelyn) Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20221013112923.769-2-tzimmermann@suse.de drivers/gpu/drm/ast/ast_mode.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 6cba31e33e770d9b5e9973278573cfef90583fcc Author: Kieran Bingham Date: Fri Sep 30 11:39:55 2022 +0300 drm: lcdif: Add support for YUV planes The LCDIF includes a color space converter that supports YUV input. Use it to support YUV planes, either through the converter if the output format is RGB, or in conversion bypass mode otherwise. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Reviewed-by: Marek Vasut Reviewed-by: Kieran Bingham Reviewed-by: Liu Ying Signed-off-by: Marek Vasut Link: https://patchwork.freedesktop.org/patch/msgid/20220930083955.31580-5-laurent.pinchart@ideasonboard.com drivers/gpu/drm/mxsfb/lcdif_kms.c | 245 ++++++++++++++++++++++++++++++++----- drivers/gpu/drm/mxsfb/lcdif_regs.h | 5 +- 2 files changed, 220 insertions(+), 30 deletions(-) commit ec39dee8b25229a646271815cc86a8fc865525cf Author: Laurent Pinchart Date: Fri Sep 30 11:39:54 2022 +0300 drm: lcdif: Switch to limited range for RGB to YUV conversion Up to and including v1.3, HDMI supported limited quantization range only for YCbCr. HDMI v1.4 introduced selectable quantization ranges, but this feature isn't supported in the dw-hdmi driver that is used in conjunction with the LCDIF in the i.MX8MP. The HDMI YCbCr output is thus always advertised in the AVI infoframe as limited range. The LCDIF driver, on the other hand, configures the CSC to produce full range YCbCr. This mismatch results in loss of details and incorrect colours. Fix it by switching to limited range YCbCr. The coefficients are copied from drivers/media/platforms/nxp/imx-pxp.c for coherency, as the hardware is most likely identical. Fixes: 9db35bb349a0 ("drm: lcdif: Add support for i.MX8MP LCDIF variant") Signed-off-by: Laurent Pinchart Reviewed-by: Marek Vasut Reviewed-by: Kieran Bingham Reviewed-by: Liu Ying Signed-off-by: Marek Vasut Link: https://patchwork.freedesktop.org/patch/msgid/20220930083955.31580-4-laurent.pinchart@ideasonboard.com drivers/gpu/drm/mxsfb/lcdif_kms.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 664a7eca9bfa73b9cd2e48a4668f159f65c1d74e Author: Laurent Pinchart Date: Fri Sep 30 11:39:53 2022 +0300 drm: lcdif: Don't use BIT() for multi-bit register fields The BIT() macro is meant to represent a single bit. Don't use it for values of register fields that span multiple bits. Signed-off-by: Laurent Pinchart Reviewed-by: Marek Vasut Reviewed-by: Kieran Bingham Reviewed-by: Liu Ying Signed-off-by: Marek Vasut Link: https://patchwork.freedesktop.org/patch/msgid/20220930083955.31580-3-laurent.pinchart@ideasonboard.com drivers/gpu/drm/mxsfb/lcdif_regs.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit a5552dd9c2455685c76971e46578c59c069a7923 Author: Laurent Pinchart Date: Fri Sep 30 11:39:52 2022 +0300 drm: lcdif: Fix indentation in lcdif_regs.h A couple of the register macro values are incorrectly indented. Fix them. Signed-off-by: Laurent Pinchart Reviewed-by: Marek Vasut Reviewed-by: Kieran Bingham Reviewed-by: Liu Ying Signed-off-by: Marek Vasut Link: https://patchwork.freedesktop.org/patch/msgid/20220930083955.31580-2-laurent.pinchart@ideasonboard.com drivers/gpu/drm/mxsfb/lcdif_regs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d54576a074a29d4901d0a693cd84e1a89057f694 Author: Matthew Auld Date: Tue Oct 4 12:49:15 2022 +0100 drm/i915/uapi: expose GTT alignment On some platforms we potentially have different alignment restrictions depending on the memory type. We also now have different alignment restrictions for the same region across different kernel versions. Extend the region query to return the minimum required GTT alignment. Testcase: igt@gem_create@create-ext-placement-alignment Testcase: igt@i915_query@query-regions-sanity-check Suggested-by: Lionel Landwerlin Signed-off-by: Matthew Auld Cc: Michal Mrozek Cc: Thomas Hellström Cc: Stuart Summers Cc: Jordan Justen Cc: Yang A Shi Cc: Nirmoy Das Cc: Niranjana Vishwanathapura Reviewed-by: Nirmoy Das Acked-by: Jordan Justen Link: https://patchwork.freedesktop.org/patch/msgid/20221004114915.221708-2-matthew.auld@intel.com drivers/gpu/drm/i915/i915_query.c | 1 + include/uapi/drm/i915_drm.h | 29 +++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) commit 8133a6daad4e72748e239a02775a853ca7ed798b Author: Matthew Auld Date: Tue Oct 4 12:49:14 2022 +0100 drm/i915: enable PS64 support for DG2 It turns out that on production DG2/ATS HW we should have support for PS64. This feature allows to provide a 64K TLB hint at the PTE level, which is a lot more flexible than the current method of enabling 64K GTT pages for the entire page-table, since that leads to all kinds of annoying restrictions, as documented in: commit caa574ffc4aaf4f29b890223878c63e2e7772f62 Author: Matthew Auld Date: Sat Feb 19 00:17:49 2022 +0530 drm/i915/uapi: document behaviour for DG2 64K support On discrete platforms like DG2, we need to support a minimum page size of 64K when dealing with device local-memory. This is quite tricky for various reasons, so try to document the new implicit uapi for this. With PS64, we can now drop the 2M GTT alignment restriction, and instead only require 64K or larger when dealing with lmem. We still use the compact-pt layout when possible, but only when we are certain that this doesn't interfere with userspace. Note that this is a change in uAPI behaviour, but hopefully shouldn't be a concern (IGT is at least able to autodetect the alignment), since we are only making the GTT alignment constraint less restrictive. Based on a patch from CQ Tang. v2: update the comment wrt scratch page v3: (Nirmoy) - Fix the selftest to actually use the random size, plus some comment improvements, also drop the rem stuff. Reported-by: Michal Mrozek Signed-off-by: Matthew Auld Cc: Lionel Landwerlin Cc: Thomas Hellström Cc: Stuart Summers Cc: Jordan Justen Cc: Yang A Shi Cc: Nirmoy Das Cc: Niranjana Vishwanathapura Reviewed-by: Nirmoy Das Acked-by: Michal Mrozek Link: https://patchwork.freedesktop.org/patch/msgid/20221004114915.221708-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 157 +++++++++++++++++++++++- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 81 ++++++------ drivers/gpu/drm/i915/gt/intel_gtt.c | 21 +--- drivers/gpu/drm/i915/gt/intel_gtt.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 7 -- drivers/gpu/drm/i915/i915_pci.c | 2 - drivers/gpu/drm/i915/i915_vma.c | 9 +- drivers/gpu/drm/i915/intel_device_info.h | 1 - drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 9 +- include/uapi/drm/i915_drm.h | 36 ++---- 10 files changed, 218 insertions(+), 106 deletions(-) commit e8162192636577dcfd87a530b7e6ab10559d6089 Author: Imre Deak Date: Fri Oct 7 16:33:07 2022 +0300 drm/i915: Fix simulated GPU reset wrt. encoder HW readout The GPU reset involves a display suspend/resume sequence, but this is done without suspending/resuming the encoders. The encoder HW readout code during resume however assumes that the encoders were suspended/resumed, at least on TypeC platforms where the TC PHYs must be left in a disconnected state during encoder-suspend, and the PHY's TypeC mode must be initialized already during encoder-resume. Since the above issue occurs only in case the display recovery during GPU reset is simulated in CI tests (on new platforms w/o the GPU reset clobbering the display), this patch fixes the issue by simply restoring the saved display state in this case w/o doing a display HW state readout / sanitization first. This also fixes the WARN below introduced by commit a82796a2e332 ("drm/i915: Fix TypeC mode initialization during system resume") <4> [319.983309] ------------[ cut here ]------------ <4> [319.983313] i915 0000:00:02.0: drm_WARN_ON(dig_port->tc_link_refcount != 1) <4> [319.983341] WARNING: CPU: 10 PID: 268 at drivers/gpu/drm/i915/display/intel_tc.c:751 intel_tc_port_sanitize_mode+0x239/0x290 [i915] <4> [319.983407] Modules linked in: fuse snd_hda_codec_hdmi i915 x86_pkg_temp_thermal mei_hdcp coretemp wmi_bmof r8153_ecm cdc_ether kvm_intel usbnet r8152 mii kvm prime_numbers snd_hda_intel ttm snd_intel_dspcfg irqbypass drm_buddy e1000e crct10dif_pclmul snd_hda_codec crc32_pclmul drm_display_helper ptp snd_hwdep ghash_clmulni_intel snd_hda_core drm_kms_helper pps_core mei_me syscopyarea video i2c_i801 snd_pcm sysfillrect i2c_smbus sysimgblt mei fb_sys_fops intel_lpss_pci wmi <4> [319.983483] CPU: 10 PID: 268 Comm: kworker/10:1H Not tainted 6.0.0-rc7-CI_DRM_12200-g394e575b57e9+ #1 <4> [319.983486] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-P LP5 RVP, BIOS ADLPFWI1.R00.2313.A00.2107301001 07/30/2021 <4> [319.983488] Workqueue: events_highpri heartbeat [i915] <4> [319.983536] RIP: 0010:intel_tc_port_sanitize_mode+0x239/0x290 [i915] <4> [319.983600] Code: 85 d2 75 03 48 8b 17 48 89 14 24 e8 e1 dc 2d e1 48 8b 14 24 48 c7 c1 f8 db 5b a0 48 c7 c7 3e 3c 5e a0 48 89 c6 e8 45 d7 66 e1 <0f> 0b e9 20 fe ff ff 0f 0b 49 c7 c0 8b 3c 5e a0 e9 9e fe ff ff 48 <4> [319.983601] RSP: 0018:ffffc90001617a30 EFLAGS: 00010286 <4> [319.983604] RAX: 0000000000000000 RBX: ffff88811f9d2000 RCX: 0000000000000001 <4> [319.983606] RDX: 0000000080000001 RSI: ffffffff8231e8cd RDI: 00000000ffffffff <4> [319.983607] RBP: ffff888121e98000 R08: 0000000000000000 R09: c0000000ffffc134 <4> [319.983608] R10: 00000000000d6078 R11: ffffc900016178c8 R12: ffff88811f9d3838 <4> [319.983609] R13: ffff88811f9d397d R14: ffff888121e98000 R15: 0000000000000000 <4> [319.983611] FS: 0000000000000000(0000) GS:ffff8882a7300000(0000) knlGS:0000000000000000 <4> [319.983612] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [319.983613] CR2: 00007fe7397f1e18 CR3: 0000000006612003 CR4: 0000000000770ee0 <4> [319.983615] PKRU: 55555554 <4> [319.983616] Call Trace: <4> [319.983617] <4> [319.983621] intel_ddi_sync_state+0x3f/0x90 [i915] <4> [319.983698] intel_modeset_setup_hw_state+0x3a3/0x1440 [i915] <4> [319.983777] ? intel_gt_reset_global+0xeb/0x160 [i915] <4> [319.983839] ? __intel_display_resume+0x15/0xe0 [i915] <4> [319.983909] __intel_display_resume+0x15/0xe0 [i915] <4> [319.983979] intel_display_finish_reset+0x58/0x130 [i915] <4> [319.984048] intel_gt_reset_global+0xf3/0x160 [i915] <4> [319.984107] ? intel_reset_guc.cold.62+0x5d/0x5d [i915] <4> [319.984189] ? 0xffffffff81000000 <4> [319.984192] ? queue_work_node+0x90/0x90 <4> [319.984202] intel_gt_handle_error+0x2c2/0x410 [i915] <4> [319.984267] ? _raw_spin_unlock_irqrestore+0x54/0x70 <4> [319.984271] ? lockdep_hardirqs_on+0xbf/0x140 <4> [319.984276] ? intel_guc_find_hung_context+0x19e/0x1d0 [i915] <4> [319.984352] reset_engine+0x99/0xd0 [i915] <4> [319.984399] ? __drm_printfn_seq_file+0x20/0x20 <4> [319.984406] heartbeat+0x4cd/0x4f0 [i915] <4> [319.984454] process_one_work+0x272/0x5b0 <4> [319.984461] worker_thread+0x37/0x370 <4> [319.984465] ? process_one_work+0x5b0/0x5b0 <4> [319.984467] kthread+0xed/0x120 <4> [319.984470] ? kthread_complete_and_exit+0x20/0x20 <4> [319.984474] ret_from_fork+0x1f/0x30 <4> [319.984484] <4> [319.984485] irq event stamp: 36107 <4> [319.984487] hardirqs last enabled at (36113): [] __up_console_sem+0x66/0x70 <4> [319.984492] hardirqs last disabled at (36118): [] __up_console_sem+0x4b/0x70 <4> [319.984494] softirqs last enabled at (34316): [] __do_softirq+0x323/0x48e <4> [319.984497] softirqs last disabled at (34309): [] irq_exit_rcu+0xb8/0xe0 <4> [319.984499] ---[ end trace 0000000000000000 ]--- v2: - Instead of trying to fix the suspend/resume sequence, restore simply the state w/o the HW readout/sanitization step. (Ville) References: https://lore.kernel.org/intel-gfx/20221005175251.3586272-1-imre.deak@intel.com/T/#mcfac180a67f6048096d09fa04347aa088291fafb Closes: https://gitlab.freedesktop.org/drm/intel/issues/7021 Cc: Mika Kahola Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221007133307.3805735-1-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_display.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit d405bc2c3d82126f58e143708af55105876cf6af Author: Thomas Zimmermann Date: Tue Oct 11 17:07:12 2022 +0200 drm/ofdrm: Support big-endian scanout buffers All DRM formats assume little-endian byte order. On big-endian systems, it is likely that the scanout buffer is in big endian as well. Update the format accordingly and add endianness conversion to the format-helper library. Also opt-in to allocated buffers in host format by default. Suggested-by: Geert Uytterhoeven Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221011150712.3928-6-tzimmermann@suse.de drivers/gpu/drm/drm_format_helper.c | 10 +++++++ drivers/gpu/drm/tiny/ofdrm.c | 55 +++++++++++++++++++++++++++++++++++-- 2 files changed, 63 insertions(+), 2 deletions(-) commit 4bbb9061081c49ded4908c7716a03f7faf4eb65d Author: Thomas Zimmermann Date: Tue Oct 11 17:07:11 2022 +0200 drm/ofdrm: Support color management Support the CRTC's color-management property and implement each model's palette support. The OF hardware has different methods of setting the palette. The respective code has been taken from fbdev's offb and refactored into per-model device functions. The device functions integrate this functionality into the overall modesetting. As palette handling is a CRTC property that depends on the primary plane's color format, the plane's atomic_check helper now updates the format field in ofdrm's custom CRTC state. The CRTC's atomic_flush helper updates the palette for the format as needed. v4: * use cpu_to_be32() (Geert) v3: * lookup CRTC state with drm_atomic_get_new_crtc_state() * access HW palette with writeb(), writel(), and readl() (Ben) * declare register values as u32 Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221011150712.3928-5-tzimmermann@suse.de drivers/gpu/drm/tiny/ofdrm.c | 442 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 437 insertions(+), 5 deletions(-) commit f496834e167451afc5f0c699ada143a7641b4e85 Author: Thomas Zimmermann Date: Tue Oct 11 17:07:10 2022 +0200 drm/ofdrm: Add per-model device function Add a per-model device-function structure in preparation of adding color-management support. Detection of the individual models has been taken from fbdev's offb. v3: * define constants for PCI ids (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221011150712.3928-4-tzimmermann@suse.de drivers/gpu/drm/tiny/ofdrm.c | 125 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit 4113744354b3bafe4e0355c967e4217605627b8b Author: Thomas Zimmermann Date: Tue Oct 11 17:07:09 2022 +0200 drm/ofdrm: Add CRTC state Add a dedicated CRTC state to ofdrm to later store information for palette updates. v3: * rework CRTC state helpers (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221011150712.3928-3-tzimmermann@suse.de drivers/gpu/drm/tiny/ofdrm.c | 59 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) commit c8a17756c42581ba1a567d1dd3b69e8f5619a7d8 Author: Thomas Zimmermann Date: Tue Oct 11 17:07:08 2022 +0200 drm/ofdrm: Add ofdrm for Open Firmware framebuffers Open Firmware provides basic display output via the 'display' node. DT platform code already provides a device that represents the node's framebuffer. Add a DRM driver for the device. The display mode and color format is pre-initialized by the system's firmware. Runtime modesetting via DRM is not possible. The display is useful during early boot stages or as error fallback. Similar functionality is already provided by fbdev's offb driver, which is insufficient for modern userspace. The old driver includes support for BootX device tree, which can be found on old 32-bit PowerPC Macintosh systems. If these are still in use, the functionality can be added to ofdrm or implemented in a new driver. As with simpledrm, the fbdev driver cannot be selected if ofdrm is already enabled. Two notable points about the driver: * Reading the framebuffer aperture from the device tree is not reliable on all systems. Ofdrm takes the heuristics and a comment from offb to pick the correct range. * No resource management may be tied to the underlying PCI device. Otherwise the handover to the native driver will fail with a resource conflict. PCI management is therefore done as part of the platform device's cleanup. The driver has been tested on qemu's ppc64le emulation. The device hand-over has been tested with bochs. v5: * use drm_atomic_helper_check_crtc_primary_plane() v4: * set preferred depth to the correct value * set bpp value for console emulation * output scanout-buffer parameters with drm_dbg() v3: * reintegrate FWFB helpers into ofdrm * use damage iterator * sync GEM BOs with drm_gem_fb_{begin,end}_cpu_access() * fix various atomic_check helpers * remove CRTC atomic_{enable,disable} (Javier) * compute stride with drm_format_info_min_pitch() (Daniel) v2: * removed simple-pipe helpers * built driver on top of FWFB helpers * merged all init code into single function * make PCI support optional (Michal) * support COMPILE_TEST (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas convert Link: https://patchwork.freedesktop.org/patch/msgid/20221011150712.3928-2-tzimmermann@suse.de MAINTAINERS | 1 + drivers/gpu/drm/tiny/Kconfig | 13 + drivers/gpu/drm/tiny/Makefile | 1 + drivers/gpu/drm/tiny/ofdrm.c | 763 ++++++++++++++++++++++++++++++++++++++++++ drivers/video/fbdev/Kconfig | 1 + 5 files changed, 779 insertions(+) commit b8c4f4db24368fb6ba6283b9c3a67da04db22751 Author: Lukas Bulwahn Date: Thu Sep 29 12:15:15 2022 +0200 xtensa: 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 Message-Id: <20220929101515.354-1-lukas.bulwahn@gmail.com> Signed-off-by: Max Filippov arch/xtensa/configs/audio_kc705_defconfig | 1 - arch/xtensa/configs/cadence_csp_defconfig | 4 ---- arch/xtensa/configs/generic_kc705_defconfig | 1 - arch/xtensa/configs/nommu_kc705_defconfig | 1 - arch/xtensa/configs/smp_lx200_defconfig | 1 - arch/xtensa/configs/xip_kc705_defconfig | 1 - 6 files changed, 9 deletions(-) commit 166fb177e4706b9eace88f06687ae1fedf79c143 Author: Max Filippov Date: Thu Oct 13 15:42:40 2022 -0700 MAINTAINERS: update the 'T:' entry for xtensa All development activity for xtensa architecture have been routed through the github.com/jcmvbkbc/linux-xtensa tree for the last few years. Update the 'T:' entry in the MAINTAINERS file to reflect that. Github deprecated the git:// links about a year ago, so let's move to the https:// URLs instead. Reported-by: Conor Dooley Link: https://github.blog/2021-09-01-improving-git-protocol-security-github/ Signed-off-by: Palmer Dabbelt Signed-off-by: Max Filippov MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62c69e89e81bfbdb9a87ae3e0599dcc6aacf786b Author: Hou Tao Date: Tue Oct 11 15:12:49 2022 +0800 selftests/bpf: Use sys_pidfd_open() helper when possible SYS_pidfd_open may be undefined for old glibc, so using sys_pidfd_open() helper defined in task_local_storage_helpers.h instead to fix potential build failure. And according to commit 7615d9e1780e ("arch: wire-up pidfd_open()"), the syscall number of pidfd_open is always 434 except for alpha architure, so update the definition of __NR_pidfd_open accordingly. Signed-off-by: Hou Tao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221011071249.3471760-1-houtao@huaweicloud.com tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 10 +++------- tools/testing/selftests/bpf/task_local_storage_helpers.h | 4 ++++ 2 files changed, 7 insertions(+), 7 deletions(-) commit e94e0a2d3730cd718a3a67682b038b05fa40d2a7 Merge: 6e73e683b6e9 d0d382f95a92 Author: Andrii Nakryiko Date: Thu Oct 13 08:50:08 2022 -0700 Merge branch 'libbpf: fix fuzzer-reported issues' Shung-Hsi Yu says: ==================== Hi, this patch set fixes several fuzzer-reported issues of libbpf when dealing with (malformed) BPF object file: - patch #1 fix out-of-bound heap write reported by oss-fuzz (currently incorrectly marked as fixed) - patch #2 and #3 fix null-pointer dereference found by locally-run fuzzer. v2: - Rebase to bpf-next - Move elf_getshdrnum() closer to where it's result is used in patch #1, as suggested by Andrii - Touch up the comment in bpf_object__elf_collect(), replacing mention of e_shnum with elf_getshdrnum() - Minor wording change in commit message of patch #1 to for better readability - Remove extra note that comes after commit message in patch #1 v1: https://lore.kernel.org/bpf/20221007174816.17536-1-shung-hsi.yu@suse.com/ ==================== Signed-off-by: Andrii Nakryiko commit 6e73e683b6e93f8d475ef6d6813928a860c8d124 Merge: de9c8d848d90 cbc1c998da59 Author: Andrii Nakryiko Date: Thu Oct 13 08:37:56 2022 -0700 Merge branch 'Fix bugs found by ASAN when running selftests' Xu Kuohai says: ==================== From: Xu Kuohai This series fixes bugs found by ASAN when running bpf selftests on arm64. v4: - Address Andrii's suggestions v3: https://lore.kernel.org/bpf/5311e154-c2d4-91a5-ccb8-f5adede579ed@huawei.com - Fix error failure of case test_xdp_adjust_tail_grow exposed by this series v2: https://lore.kernel.org/bpf/20221010070454.577433-1-xukuohai@huaweicloud.com - Rebase and fix conflict v1: https://lore.kernel.org/bpf/20221009131830.395569-1-xukuohai@huaweicloud.com ==================== Signed-off-by: Andrii Nakryiko commit d0d382f95a9270dcf803539d6781d6bd67e3f5b2 Author: Shung-Hsi Yu Date: Wed Oct 12 10:23:53 2022 +0800 libbpf: Fix null-pointer dereference in find_prog_by_sec_insn() When there are no program sections, obj->programs is left unallocated, and find_prog_by_sec_insn()'s search lands on &obj->programs[0] == NULL, and will cause null-pointer dereference in the following access to prog->sec_idx. Guard the search with obj->nr_programs similar to what's being done in __bpf_program__iter() to prevent null-pointer access from happening. Fixes: db2b8b06423c ("libbpf: Support CO-RE relocations for multi-prog sections") Signed-off-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221012022353.7350-4-shung-hsi.yu@suse.com tools/lib/bpf/libbpf.c | 3 +++ 1 file changed, 3 insertions(+) commit 35a855509e6ee3442477c8ebc6827b5b5d32a7b5 Author: Shung-Hsi Yu Date: Wed Oct 12 10:23:52 2022 +0800 libbpf: Deal with section with no data gracefully ELF section data pointer returned by libelf may be NULL (if section has SHT_NOBITS), so null check section data pointer before attempting to copy license and kversion section. Fixes: cb1e5e961991 ("bpf tools: Collect version and license from ELF sections") Signed-off-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221012022353.7350-3-shung-hsi.yu@suse.com tools/lib/bpf/libbpf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 51deedc9b8680953437dfe359e5268120de10e30 Author: Shung-Hsi Yu Date: Wed Oct 12 10:23:51 2022 +0800 libbpf: Use elf_getshdrnum() instead of e_shnum This commit replace e_shnum with the elf_getshdrnum() helper to fix two oss-fuzz-reported heap-buffer overflow in __bpf_object__open. Both reports are incorrectly marked as fixed and while still being reproducible in the latest libbpf. # clusterfuzz-testcase-minimized-bpf-object-fuzzer-5747922482888704 libbpf: loading object 'fuzz-object' from buffer libbpf: sec_cnt is 0 libbpf: elf: section(1) .data, size 0, link 538976288, flags 2020202020202020, type=2 libbpf: elf: section(2) .data, size 32, link 538976288, flags 202020202020ff20, type=1 ================================================================= ==13==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000000c0 at pc 0x0000005a7b46 bp 0x7ffd12214af0 sp 0x7ffd12214ae8 WRITE of size 4 at 0x6020000000c0 thread T0 SCARINESS: 46 (4-byte-write-heap-buffer-overflow-far-from-bounds) #0 0x5a7b45 in bpf_object__elf_collect /src/libbpf/src/libbpf.c:3414:24 #1 0x5733c0 in bpf_object_open /src/libbpf/src/libbpf.c:7223:16 #2 0x5739fd in bpf_object__open_mem /src/libbpf/src/libbpf.c:7263:20 ... The issue lie in libbpf's direct use of e_shnum field in ELF header as the section header count. Where as libelf implemented an extra logic that, when e_shnum == 0 && e_shoff != 0, will use sh_size member of the initial section header as the real section header count (part of ELF spec to accommodate situation where section header counter is larger than SHN_LORESERVE). The above inconsistency lead to libbpf writing into a zero-entry calloc area. So intead of using e_shnum directly, use the elf_getshdrnum() helper provided by libelf to retrieve the section header counter into sec_cnt. Fixes: 0d6988e16a12 ("libbpf: Fix section counting logic") Fixes: 25bbbd7a444b ("libbpf: Remove assumptions about uniqueness of .rodata/.data/.bss maps") Signed-off-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40868 Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40957 Link: https://lore.kernel.org/bpf/20221012022353.7350-2-shung-hsi.yu@suse.com tools/lib/bpf/libbpf.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit cbc1c998da59687e8bbc4667154a72eead2daf2d Author: Xu Kuohai Date: Tue Oct 11 08:01:08 2022 -0400 selftest/bpf: Fix error usage of ASSERT_OK in xdp_adjust_tail.c xdp_adjust_tail.c calls ASSERT_OK() to check the return value of bpf_prog_test_load(), but the condition is not correct. Fix it. Fixes: 791cad025051 ("bpf: selftests: Get rid of CHECK macro in xdp_adjust_tail.c") Signed-off-by: Xu Kuohai Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20221011120108.782373-7-xukuohai@huaweicloud.com tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4abdb1d5b250df4b5b3afd394d5e2fa516064c04 Author: Xu Kuohai Date: Tue Oct 11 08:01:07 2022 -0400 selftests/bpf: Fix error failure of case test_xdp_adjust_tail_grow test_xdp_adjust_tail_grow failed with ipv6: test_xdp_adjust_tail_grow:FAIL:ipv6 unexpected error: -28 (errno 28) The reason is that this test case tests ipv4 before ipv6, and when ipv4 test finished, topts.data_size_out was set to 54, which is smaller than the ipv6 output data size 114, so ipv6 test fails with NOSPC error. Fix it by reset topts.data_size_out to sizeof(buf) before testing ipv6. Fixes: 04fcb5f9a104 ("selftests/bpf: Migrate from bpf_prog_test_run") Signed-off-by: Xu Kuohai Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20221011120108.782373-6-xukuohai@huaweicloud.com tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c | 1 + 1 file changed, 1 insertion(+) commit 6d2e21dc4db3933db65293552ecc1ede26febeca Author: Xu Kuohai Date: Tue Oct 11 08:01:06 2022 -0400 selftest/bpf: Fix memory leak in kprobe_multi_test The get_syms() function in kprobe_multi_test.c does not free the string memory allocated by sscanf correctly. Fix it. Fixes: 5b6c7e5c4434 ("selftests/bpf: Add attach bench test") Signed-off-by: Xu Kuohai Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20221011120108.782373-5-xukuohai@huaweicloud.com .../selftests/bpf/prog_tests/kprobe_multi_test.c | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) commit 6e8280b958c5d7edc514cf347a800b23b7732b2b Author: Xu Kuohai Date: Tue Oct 11 08:01:05 2022 -0400 selftests/bpf: Fix memory leak caused by not destroying skeleton Some test cases does not destroy skeleton object correctly, causing ASAN to report memory leak warning. Fix it. Fixes: 0ef6740e9777 ("selftests/bpf: Add tests for kptr_ref refcounting") Fixes: 1642a3945e22 ("selftests/bpf: Add struct argument tests with fentry/fexit programs.") Signed-off-by: Xu Kuohai Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20221011120108.782373-4-xukuohai@huaweicloud.com tools/testing/selftests/bpf/prog_tests/map_kptr.c | 3 ++- tools/testing/selftests/bpf/prog_tests/tracing_struct.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 0dc9254e03704c75f2ebc9cbef2ce4de83fba603 Author: Xu Kuohai Date: Tue Oct 11 08:01:04 2022 -0400 libbpf: Fix memory leak in parse_usdt_arg() In the arm64 version of parse_usdt_arg(), when sscanf returns 2, reg_name is allocated but not freed. Fix it. Fixes: 0f8619929c57 ("libbpf: Usdt aarch64 arg parsing support") Signed-off-by: Xu Kuohai Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20221011120108.782373-3-xukuohai@huaweicloud.com tools/lib/bpf/usdt.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 93c660ca40b5d2f7c1b1626e955a8e9fa30e0749 Author: Xu Kuohai Date: Tue Oct 11 08:01:03 2022 -0400 libbpf: Fix use-after-free in btf_dump_name_dups ASAN reports an use-after-free in btf_dump_name_dups: ERROR: AddressSanitizer: heap-use-after-free on address 0xffff927006db at pc 0xaaaab5dfb618 bp 0xffffdd89b890 sp 0xffffdd89b928 READ of size 2 at 0xffff927006db thread T0 #0 0xaaaab5dfb614 in __interceptor_strcmp.part.0 (test_progs+0x21b614) #1 0xaaaab635f144 in str_equal_fn tools/lib/bpf/btf_dump.c:127 #2 0xaaaab635e3e0 in hashmap_find_entry tools/lib/bpf/hashmap.c:143 #3 0xaaaab635e72c in hashmap__find tools/lib/bpf/hashmap.c:212 #4 0xaaaab6362258 in btf_dump_name_dups tools/lib/bpf/btf_dump.c:1525 #5 0xaaaab636240c in btf_dump_resolve_name tools/lib/bpf/btf_dump.c:1552 #6 0xaaaab6362598 in btf_dump_type_name tools/lib/bpf/btf_dump.c:1567 #7 0xaaaab6360b48 in btf_dump_emit_struct_def tools/lib/bpf/btf_dump.c:912 #8 0xaaaab6360630 in btf_dump_emit_type tools/lib/bpf/btf_dump.c:798 #9 0xaaaab635f720 in btf_dump__dump_type tools/lib/bpf/btf_dump.c:282 #10 0xaaaab608523c in test_btf_dump_incremental tools/testing/selftests/bpf/prog_tests/btf_dump.c:236 #11 0xaaaab6097530 in test_btf_dump tools/testing/selftests/bpf/prog_tests/btf_dump.c:875 #12 0xaaaab6314ed0 in run_one_test tools/testing/selftests/bpf/test_progs.c:1062 #13 0xaaaab631a0a8 in main tools/testing/selftests/bpf/test_progs.c:1697 #14 0xffff9676d214 in __libc_start_main ../csu/libc-start.c:308 #15 0xaaaab5d65990 (test_progs+0x185990) 0xffff927006db is located 11 bytes inside of 16-byte region [0xffff927006d0,0xffff927006e0) freed by thread T0 here: #0 0xaaaab5e2c7c4 in realloc (test_progs+0x24c7c4) #1 0xaaaab634f4a0 in libbpf_reallocarray tools/lib/bpf/libbpf_internal.h:191 #2 0xaaaab634f840 in libbpf_add_mem tools/lib/bpf/btf.c:163 #3 0xaaaab636643c in strset_add_str_mem tools/lib/bpf/strset.c:106 #4 0xaaaab6366560 in strset__add_str tools/lib/bpf/strset.c:157 #5 0xaaaab6352d70 in btf__add_str tools/lib/bpf/btf.c:1519 #6 0xaaaab6353e10 in btf__add_field tools/lib/bpf/btf.c:2032 #7 0xaaaab6084fcc in test_btf_dump_incremental tools/testing/selftests/bpf/prog_tests/btf_dump.c:232 #8 0xaaaab6097530 in test_btf_dump tools/testing/selftests/bpf/prog_tests/btf_dump.c:875 #9 0xaaaab6314ed0 in run_one_test tools/testing/selftests/bpf/test_progs.c:1062 #10 0xaaaab631a0a8 in main tools/testing/selftests/bpf/test_progs.c:1697 #11 0xffff9676d214 in __libc_start_main ../csu/libc-start.c:308 #12 0xaaaab5d65990 (test_progs+0x185990) previously allocated by thread T0 here: #0 0xaaaab5e2c7c4 in realloc (test_progs+0x24c7c4) #1 0xaaaab634f4a0 in libbpf_reallocarray tools/lib/bpf/libbpf_internal.h:191 #2 0xaaaab634f840 in libbpf_add_mem tools/lib/bpf/btf.c:163 #3 0xaaaab636643c in strset_add_str_mem tools/lib/bpf/strset.c:106 #4 0xaaaab6366560 in strset__add_str tools/lib/bpf/strset.c:157 #5 0xaaaab6352d70 in btf__add_str tools/lib/bpf/btf.c:1519 #6 0xaaaab6353ff0 in btf_add_enum_common tools/lib/bpf/btf.c:2070 #7 0xaaaab6354080 in btf__add_enum tools/lib/bpf/btf.c:2102 #8 0xaaaab6082f50 in test_btf_dump_incremental tools/testing/selftests/bpf/prog_tests/btf_dump.c:162 #9 0xaaaab6097530 in test_btf_dump tools/testing/selftests/bpf/prog_tests/btf_dump.c:875 #10 0xaaaab6314ed0 in run_one_test tools/testing/selftests/bpf/test_progs.c:1062 #11 0xaaaab631a0a8 in main tools/testing/selftests/bpf/test_progs.c:1697 #12 0xffff9676d214 in __libc_start_main ../csu/libc-start.c:308 #13 0xaaaab5d65990 (test_progs+0x185990) The reason is that the key stored in hash table name_map is a string address, and the string memory is allocated by realloc() function, when the memory is resized by realloc() later, the old memory may be freed, so the address stored in name_map references to a freed memory, causing use-after-free. Fix it by storing duplicated string address in name_map. Fixes: 919d2b1dbb07 ("libbpf: Allow modification of BTF and add btf__add_str API") Signed-off-by: Xu Kuohai Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20221011120108.782373-2-xukuohai@huaweicloud.com tools/lib/bpf/btf_dump.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit df19817f3ff3de28e87139b6d172c0094402e1f2 Author: Jonathan Corbet Date: Tue Sep 27 10:45:50 2022 -0600 docs: sphinx-pre-install: don't require the RTD theme We don't default to the RTD theme anymore, so sphinx-pre-install need not insist on installing it. Acked-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/sphinx/requirements.txt | 1 - scripts/sphinx-pre-install | 8 -------- 2 files changed, 9 deletions(-) commit 26d797ffc1c06f05ccc06f70977ebe386d628f14 Author: Jonathan Corbet Date: Tue Sep 27 10:41:15 2022 -0600 docs: update sphinx.rst to reflect the default theme change We don't default to Read The Docs anymore; update the docs to match. Acked-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/doc-guide/sphinx.rst | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 2056b920c615566084cd9aa105b54b62a516161e Author: Jonathan Corbet Date: Mon Sep 26 17:48:59 2022 -0600 docs: tweak some Alabaster style parameters This is just the beginning: tighten up the layout a bit to improve the information density in the browser. Also reconfigure the page width in terms of character units (em) rather than pixels, making it more display-independent. To that end, add a custom.css file to tweak Alabaster CSS settings. Acked-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 3 +++ Documentation/sphinx-static/custom.css | 14 ++++++++++++++ 2 files changed, 17 insertions(+) commit d5389d3145ef0e47463f620835131557c99a331d Author: Jonathan Corbet Date: Fri Sep 23 16:28:57 2022 -0600 docs: Switch the default HTML theme to alabaster The read-the-docs theme is not entirely attractive and doesn't give us control over the left column. "Alabaster" is deemed the default Sphinx theme, it is currently maintained and shipped bundled with Sphinx itself, so there is no need to install it separately. Switch over to this theme as the default for building kernel documentation; the DOCS_THEME environment variable can still be used to select a different theme. Acked-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/conf.py | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 1eb303dc5fa5967f9e5edc04df1f9cf161614ad0 Merge: 0b8b4a0633da 877d95dcfd0a Author: Jonathan Corbet Date: Thu Oct 13 10:37:56 2022 -0600 Merge branch 'docs-mw' into docs-next commit de9c8d848d90cf2e53aced50b350827442ca5a4f Author: Martin KaFai Lau Date: Wed Oct 12 15:12:35 2022 -0700 selftests/bpf: S/iptables/iptables-legacy/ in the bpf_nf and xdp_synproxy test The recent vm image in CI has reported error in selftests that use the iptables command. Manu Bretelle has pointed out the difference in the recent vm image that the iptables is sym-linked to the iptables-nft. With this knowledge, I can also reproduce the CI error by manually running with the 'iptables-nft'. This patch is to replace the iptables command with iptables-legacy to unblock the CI tests. Signed-off-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20221012221235.3529719-1-martin.lau@linux.dev tools/testing/selftests/bpf/prog_tests/bpf_nf.c | 6 +++--- tools/testing/selftests/bpf/prog_tests/xdp_synproxy.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 9a0cdcd6649b76f0b7ceec0e55b0a718321e34d3 Author: Abhinav Kumar Date: Tue Oct 11 14:10:49 2022 -0700 drm/bridge: adv7533: remove dynamic lane switching from adv7533 bridge adv7533 bridge tries to dynamically switch lanes based on the mode by detaching and attaching the mipi dsi device. This approach is incorrect because this method of dynamic switch of detaching and attaching the mipi dsi device also results in removing and adding the component which is not necessary. This approach is also prone to deadlocks. So for example, on the db410c whenever this path is executed with lockdep enabled, this results in a deadlock due to below ordering of locks. -> #1 (crtc_ww_class_acquire){+.+.}-{0:0}: lock_acquire+0x6c/0x90 drm_modeset_acquire_init+0xf4/0x150 drmm_mode_config_init+0x220/0x770 msm_drm_bind+0x13c/0x654 try_to_bring_up_aggregate_device+0x164/0x1d0 __component_add+0xa8/0x174 component_add+0x18/0x2c dsi_dev_attach+0x24/0x30 dsi_host_attach+0x98/0x14c devm_mipi_dsi_attach+0x38/0xb0 adv7533_attach_dsi+0x8c/0x110 adv7511_probe+0x5a0/0x930 i2c_device_probe+0x30c/0x350 really_probe.part.0+0x9c/0x2b0 __driver_probe_device+0x98/0x144 driver_probe_device+0xac/0x14c __device_attach_driver+0xbc/0x124 bus_for_each_drv+0x78/0xd0 __device_attach+0xa8/0x1c0 device_initial_probe+0x18/0x24 bus_probe_device+0xa0/0xac deferred_probe_work_func+0x90/0xd0 process_one_work+0x28c/0x6b0 worker_thread+0x240/0x444 kthread+0x110/0x114 ret_from_fork+0x10/0x20 -> #0 (component_mutex){+.+.}-{3:3}: __lock_acquire+0x1280/0x20ac lock_acquire.part.0+0xe0/0x230 lock_acquire+0x6c/0x90 __mutex_lock+0x84/0x400 mutex_lock_nested+0x3c/0x70 component_del+0x34/0x170 dsi_dev_detach+0x24/0x30 dsi_host_detach+0x20/0x64 mipi_dsi_detach+0x2c/0x40 adv7533_mode_set+0x64/0x90 adv7511_bridge_mode_set+0x210/0x214 drm_bridge_chain_mode_set+0x5c/0x84 crtc_set_mode+0x18c/0x1dc drm_atomic_helper_commit_modeset_disables+0x40/0x50 msm_atomic_commit_tail+0x1d0/0x6e0 commit_tail+0xa4/0x180 drm_atomic_helper_commit+0x178/0x3b0 drm_atomic_commit+0xa4/0xe0 drm_client_modeset_commit_atomic+0x228/0x284 drm_client_modeset_commit_locked+0x64/0x1d0 drm_client_modeset_commit+0x34/0x60 drm_fb_helper_lastclose+0x74/0xcc drm_lastclose+0x3c/0x80 drm_release+0xfc/0x114 __fput+0x70/0x224 ____fput+0x14/0x20 task_work_run+0x88/0x1a0 do_exit+0x350/0xa50 do_group_exit+0x38/0xa4 __wake_up_parent+0x0/0x34 invoke_syscall+0x48/0x114 el0_svc_common.constprop.0+0x60/0x11c do_el0_svc+0x30/0xc0 el0_svc+0x58/0x100 el0t_64_sync_handler+0x1b0/0x1bc el0t_64_sync+0x18c/0x190 Due to above reasons, remove the dynamic lane switching code from adv7533 bridge chip and filter out the modes which would need different number of lanes as compared to the initialization time using the mode_valid callback. This can be potentially re-introduced by using the pre_enable() callback but this needs to be evaluated first whether such an approach will work so this will be done with a separate change. changes since RFC: - Fix commit text and add TODO comment changes in v2: - Fix checkpatch formatting errors Fixes: 62b2f026cd8e ("drm/bridge: adv7533: Change number of DSI lanes dynamically") Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/16 Suggested-by: Dmitry Baryshkov Signed-off-by: Abhinav Kumar Reviewed-by: Robert Foss Link: https://lore.kernel.org/r/1661797363-7564-1-git-send-email-quic_abhinavk@quicinc.com Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/1665522649-3423-1-git-send-email-quic_abhinavk@quicinc.com drivers/gpu/drm/bridge/adv7511/adv7511.h | 3 ++- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 18 ++++++++++++++---- drivers/gpu/drm/bridge/adv7511/adv7533.c | 25 +++++++++++++------------ 3 files changed, 29 insertions(+), 17 deletions(-) commit 7fed7fa340691ef4b78f5f3aebde44715128d868 Author: Javier Martinez Canillas Date: Tue Oct 11 18:51:36 2022 +0200 drm/crtc-helper: Add a drm_crtc_helper_atomic_check() helper Provides a default CRTC state check handler for CRTCs that only have one primary plane attached. There are some drivers that duplicate this logic in their helpers, such as simpledrm and ssd130x. Factor out this common code into a CRTC helper and make drivers use it. Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221011165136.469750-5-javierm@redhat.com drivers/gpu/drm/drm_crtc_helper.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/drm_plane_helper.c | 4 +++- drivers/gpu/drm/solomon/ssd130x.c | 14 ++------------ drivers/gpu/drm/tiny/simpledrm.c | 14 ++------------ include/drm/drm_crtc_helper.h | 2 ++ 5 files changed, 35 insertions(+), 25 deletions(-) commit 6c3d9cf400dc085de0bde33dde73d47c71b7b2df Author: Javier Martinez Canillas Date: Tue Oct 11 18:51:35 2022 +0200 drm/ssd130x: Do not call drm_atomic_add_affected_planes() There's no need to add planes to the atomic state. Remove the call to drm_atomic_add_affected_planes() from ssd130x. On full modesets, the DRM helpers already add a CRTC's planes to the atomic state; see drm_atomic_helper_check_modeset(). There's no reason to call drm_atomic_add_affected_planes() unconditionally in the CRTC's atomic_check() in ssd130x. It's also too late, as the atomic_check() of the added planes will not be called before the commit. Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221011165136.469750-4-javierm@redhat.com drivers/gpu/drm/solomon/ssd130x.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 3339aa186cc11fece96b77e2d4bc80678f90b440 Author: Javier Martinez Canillas Date: Tue Oct 11 18:51:34 2022 +0200 drm/simpledrm: Do not call drm_atomic_add_affected_planes() There's no need to add planes to the atomic state. Remove the call to drm_atomic_add_affected_planes() from simpledrm. On full modesets, the DRM helpers already add a CRTC's planes to the atomic state; see drm_atomic_helper_check_modeset(). There's no reason to call drm_atomic_add_affected_planes() unconditionally in the CRTC's atomic_check() in simpledrm. It's also too late, as the atomic_check() of the added planes will not be called before the commit. Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221011165136.469750-3-javierm@redhat.com drivers/gpu/drm/tiny/simpledrm.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 9cebffdf0d9c2b045fa3ecde43a2c0014953087a Author: Javier Martinez Canillas Date: Tue Oct 11 18:51:33 2022 +0200 drm/mgag200: Do not call drm_atomic_add_affected_planes() There's no need to add planes to the atomic state. Remove the call to drm_atomic_add_affected_planes() from mgag200. On full modesets, the DRM helpers already add a CRTC's planes to the atomic state; see drm_atomic_helper_check_modeset(). There's no reason to call drm_atomic_add_affected_planes() unconditionally in the CRTC's atomic_check() in mgag200. It's also too late, as the atomic_check() of the added planes will not be called before the commit. Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221011165136.469750-2-javierm@redhat.com drivers/gpu/drm/mgag200/mgag200_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 473118917cc33b98510880458c724bd833653db6 Author: Peter Kosyh Date: Mon Oct 3 12:12:17 2022 +0300 wifi: ath10k: Check return value of ath10k_get_arvif() in ath10k_wmi_event_tdls_peer() Return value of a function ath10k_get_arvif() is dereferenced without checking for null in ath10k_wmi_event_tdls_peer(), but it is usually checked for this function. Make ath10k_wmi_event_tdls_peer() do check retval of ath10k_get_arvif(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Peter Kosyh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221003091217.322598-1-pkosyh@yandex.ru drivers/net/wireless/ath/ath10k/wmi-tlv.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3811fa1f231f1a3e29759efef4992116604aab8b Author: Sowmiya Sree Elavalagan Date: Tue Oct 11 15:23:46 2022 +0530 wifi: ath11k: Fix firmware crash on vdev delete race condition Current code does not wait for vdev delete completion on vdev create failures and tries to send another vdev create followed by vdev set param to firmware with same vdev id. This causes firmware crash. Fix this crash by waiting for vdev delete completion on vdev create failures. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.6.0.1-00905-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sowmiya Sree Elavalagan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com drivers/net/wireless/ath/ath11k/mac.c | 60 +++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 23 deletions(-) commit 9cf06d6ef7fd08adf51568b704ab7ba6007b6fe8 Author: ruanjinjie Date: Sat Sep 24 17:25:16 2022 +0800 drm/nouveau/disp: fix cast removes address space of expression warnings When build Linux kernel with 'make C=2', encounter the following warnings: ./drivers/gpu/drm/nouveau/dispnv50/disp.c:134:34: warning: cast removes address space '__iomem' of expression ./drivers/gpu/drm/nouveau/dispnv50/disp.c:197:34: warning: cast removes address space '__iomem' of expression The data type of dmac->_push.mem.object.map.ptr is 'void __iomem *', but converted to 'u32 *' directly and cause above warnings, now recover their data types to fix these warnings. Signed-off-by: ruanjinjie Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220924092516.10007-1-ruanjinjie@huawei.com drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8be91fbfc7dd2d69762d510cc29c3b52d3ef4db Author: Alexander Aring Date: Mon Sep 5 22:34:12 2022 +0200 ieee802154: atusb: add support for trac feature This patch adds support for reading the trac register if atusb firmware reports tx done. There is currently a feature to compare a sequence number, if the payload is 1 it tells the driver only the sequence number is available if it's two there is additional the trac status register as payload. Currently the atusb_in_good() function determines if it's a tx done or rx done if according the payload length. This patch is doing the same and assumes this behaviour. Signed-off-by: Alexander Aring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20220905203412.1322947-10-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt drivers/net/ieee802154/atusb.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) commit ca0022425b3303786a563f8e40c26164970eb632 Author: Jani Nikula Date: Tue Oct 11 17:08:30 2022 +0300 drm: split build lists one per line and sort While it takes more vertical space, sorted build lists with one object per line are arguably easier to manage, especially when there are conflicting changes. Split anything with more than one object file. v2: also split drm_cache.o and put it after drm_bridge.o (Andi) Signed-off-by: Jani Nikula Reviewed-by: Andi Shyti Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221011140830.3257655-1-jani.nikula@intel.com drivers/gpu/drm/Makefile | 107 ++++++++++++++++++++++++++++----------- drivers/gpu/drm/display/Makefile | 14 ++--- 2 files changed, 85 insertions(+), 36 deletions(-) commit 3a22550ab50a2bed1779c7d03c9f0239d33cc514 Author: Miquel Raynal Date: Mon Sep 5 22:27:24 2022 +0200 net: mac802154: Avoid displaying misleading debug information With DEBUG defined, any frame received will see its MHR fields (fc and addresses, mainly) being printed in the kernel log buffer, unconditionally. In most cases this is fine, but in some specific cases (like Acknowledgment frames, where both the source and destination addressing fields are omitted), it displays garbage which is misleading. Only print the addressing fields when they are present, which clarifies the logs. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20220905202724.1322046-1-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0218277df5a527c9e9474aa0e4e4e2f4bbc6f5cc Author: Miquel Raynal Date: Fri Oct 7 10:53:09 2022 +0200 mac802154: Avoid delivering frames received in a non satisfying filtering mode We must avoid the situation where one interface disables address filtering and AACK on the PHY while another interface expects to run with AACK and address filtering enabled. Just ignore the frames on the concerned interface if this happens. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221007085310.503366-8-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/rx.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit a4b5b4c56dd8b1dd46b2f13cb09f5f8031978f86 Author: Miquel Raynal Date: Fri Oct 7 10:53:08 2022 +0200 mac802154: Drop IEEE802154_HW_RX_DROP_BAD_CKSUM This IEEE802154_HW_RX_DROP_BAD_CKSUM flag was only used by hwsim to reflect the fact that it would not validate the checksum (FCS). So this was only useful while the only filtering level hwsim was capable of was "NONE". Now that the driver has been improved we no longer need this flag. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221007085310.503366-7-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt drivers/net/ieee802154/mac802154_hwsim.c | 3 ++- include/net/mac802154.h | 4 ---- net/mac802154/rx.c | 7 ++----- 3 files changed, 4 insertions(+), 10 deletions(-) commit ea562d8c486eebd2707bcd193974078a2a47affc Author: Miquel Raynal Date: Fri Oct 7 10:53:07 2022 +0200 ieee802154: hwsim: Implement address filtering We have access to the address filters being theoretically applied, we also have access to the actual filtering level applied, so let's add a proper frame validation sequence in hwsim. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221007085310.503366-6-miquel.raynal@bootlin.com [stefan@datenfreihafen.org: fixup some checkpatch warnings] Signed-off-by: Stefan Schmidt drivers/net/ieee802154/mac802154_hwsim.c | 110 ++++++++++++++++++++++++++++++- include/net/ieee802154_netdev.h | 8 +++ 2 files changed, 116 insertions(+), 2 deletions(-) commit a87815b7bbcd10d7e113c366eb6310c5898ff952 Author: Miquel Raynal Date: Fri Oct 7 10:53:06 2022 +0200 ieee802154: hwsim: Record the address filter values As a first step, introduce a basic implementation for the ->set_hw_addr_filt() hook. In a second step, the values recorded here will be used to perform proper filtering during reception. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221007085310.503366-5-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt drivers/net/ieee802154/mac802154_hwsim.c | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit ac8037c35bd1fb1799d39f52205f813e6585b58b Author: Alexander Aring Date: Fri Oct 7 10:53:05 2022 +0200 mac802154: set filter at drv_start() The current filtering level is set on the first interface up on a wpan phy. If we support scan functionality we need to change the filtering level on the fly on an operational phy and switching back again. This patch will move the receive mode parameter e.g. address filter and promiscuous mode to the drv_start() functionality to allow changing the receive mode on an operational phy not on first ifup only. In future this should be handled on driver layer because each hardware has it's own way to enter a specific filtering level. However this should offer to switch to mode IEEE802154_FILTERING_NONE and back to IEEE802154_FILTERING_4_FRAME_FIELDS. Only IEEE802154_FILTERING_4_FRAME_FIELDS and IEEE802154_FILTERING_NONE are somewhat supported by current hardware. All other filtering levels can be supported in future but will end in IEEE802154_FILTERING_NONE as the receive part can kind of "emulate" those receive paths by doing additional filtering routines. There are in total three filtering levels in the code: - the per-interface default level (should not be changed) - the required per-interface level (mac commands may play with it) - the actual per-PHY (hw) level that is currently in use Signed-off-by: Alexander Aring [ Link: https://lore.kernel.org/r/20221007085310.503366-4-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt include/net/cfg802154.h | 7 +++-- net/mac802154/cfg.c | 2 +- net/mac802154/driver-ops.h | 71 +++++++++++++++++++++++++++++++++++++++++++- net/mac802154/ieee802154_i.h | 12 ++++++++ net/mac802154/iface.c | 44 ++++++++++----------------- net/mac802154/rx.c | 12 +++++++- 6 files changed, 115 insertions(+), 33 deletions(-) commit e9d8d9c4084dadfa5a68a2e6e4e4dda7a0a728ba Author: Alexander Aring Date: Fri Oct 7 10:53:04 2022 +0200 mac802154: move receive parameters above start This patch moves all receive parameters above the drv_start() functionality to make it accessibile in the drv_start() function. Signed-off-by: Alexander Aring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20221007085310.503366-3-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/driver-ops.h | 190 ++++++++++++++++++++++----------------------- 1 file changed, 95 insertions(+), 95 deletions(-) commit a6a6163b9a934df5965792d60af1f53aa51fdd39 Author: Miquel Raynal Date: Fri Oct 7 10:53:03 2022 +0200 mac802154: Introduce filtering levels The 802154 specification details several filtering levels in which the PHY and the MAC could be. The amount of filtering will vary if they are in promiscuous mode or in scanning mode. Otherwise they are expected to do some very basic checks, such as enforcing the frame validity. Either the PHY is able to do so, and the MAC has nothing to do, or the PHY has a lower filtering level than expected and the MAC should take over. For now we just define these levels in an enumeration. In a second time, we will add a per-PHY parameter showing the expected filtering level as well as a per device current filtering level, and will initialize all these fields. In a third time, we will use them to apply more filtering by software when the PHY is limited. Indeed, if the drivers know they cannot reach the requested level of filtering, they will overwrite the "current filtering" parameter so that it reflects what they do. Then, in the core, the expected filtering level will be used to decide whether some additional software processing is needed or not. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20221007085310.503366-2-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt include/linux/ieee802154.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit e55427b46852f11ca37f33abb7d7ec76bb4c9ed3 Author: Andi Shyti Date: Tue Oct 11 15:59:40 2022 +0200 drm/i915/trace: Remove unused frequency trace Commit 3e7abf814193 ("drm/i915: Extract GT render power state management") removes the "trace_intel_gpu_freq_change()" trace points but their definition was left without users. Remove it. Suggested-by: Tvrtko Ursulin Signed-off-by: Andi Shyti Cc: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221011135940.367048-1-andi.shyti@linux.intel.com drivers/gpu/drm/i915/i915_trace.h | 15 --------------- 1 file changed, 15 deletions(-) commit dfc3082da9c97112007b6d585e28c1aeb8618acb Author: Yang Yingliang Date: Thu Sep 15 15:12:58 2022 +0800 net: ieee802154: mcr20a: Switch to use dev_err_probe() helper dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220915071258.678536-1-yangyingliang@huawei.com Signed-off-by: Stefan Schmidt drivers/net/ieee802154/mcr20a.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 3f9b09ccf7d5f23066b02881a737bee42def9d1a Author: Baochen Qiang Date: Mon Oct 10 11:32:37 2022 +0800 wifi: ath11k: Send PME message during wakeup from D3cold We are seeing system stuck on some specific platforms due to WLAN chip fails to wakeup from D3cold state. With this flag, firmware will send PME message during wakeup and this issue is gone. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 Signed-off-by: Baochen Qiang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221010033237.415478-1-quic_bqiang@quicinc.com drivers/net/wireless/ath/ath11k/qmi.c | 3 +++ 1 file changed, 3 insertions(+) commit c362daa213cdeb0a9e7c2ed84849544c24505720 Author: Manikanta Pubbisetty Date: Fri Oct 7 10:41:30 2022 +0530 wifi: ath11k: add support to configure channel dwell time Add support to configure channel dwell time during scan. Dwell time help to stay on the channel for a specified duration during scan and aid userspace in finding WiFi networks. Very useful in passive scans where longer dwell times are needed to find the WiFi networks. Configure channel dwell time from duration of the scan request received from mac80211 when the duration is non-zero. When the scan request does not have duration value, use the default ones, the current implementation. Advertise corresponding feature flag NL80211_EXT_FEATURE_SET_SCAN_DWELL to enable the feature. Change is applicable for all ath11k hardware. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Manikanta Pubbisetty Reviewed-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com drivers/net/wireless/ath/ath11k/mac.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit 638b26652b0438563a76ec90014c8cba34db982b Author: Karthikeyan Periyasamy Date: Thu Oct 6 06:28:42 2022 +0530 wifi: ath11k: suppress add interface error In the VIF (other than monitor type) creation request, we should not throw the error code when the monitor VIF creation fails, since the actual VIF creation succeeds. If we throw the error code from driver then the actual VIF creation get fail. So suppress the monitor VIF creation error by throwing warning message instead of error code. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.6.0.1-00760-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221006005842.8599-1-quic_periyasa@quicinc.com drivers/net/wireless/ath/ath11k/mac.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 3ff51d7416ee1ea2d771051a0ffa1ec8be054768 Author: Aditya Kumar Singh Date: Wed Oct 5 15:24:30 2022 +0530 wifi: ath11k: fix firmware assert during bandwidth change for peer sta Currently, ath11k sends peer assoc command for each peer to firmware when bandwidth changes. Peer assoc command is a bulky command and if many clients are connected, this could lead to firmware buffer getting overflowed leading to a firmware assert. However, during bandwidth change, only phymode and bandwidth also can be updated by WMI set peer param command. This makes the overall command light when compared to peer assoc and for multi-client cases, firmware buffer overflow also does not occur. Remove sending peer assoc command during sta bandwidth change and instead add sending WMI set peer param command for phymode and bandwidth. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 Fixes: f187fe8e3bc65 ("ath11k: fix firmware crash during channel switch") Signed-off-by: Aditya Kumar Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221005095430.19890-1-quic_adisi@quicinc.com drivers/net/wireless/ath/ath11k/core.h | 2 + drivers/net/wireless/ath/ath11k/mac.c | 122 +++++++++++++++++++++++---------- 2 files changed, 87 insertions(+), 37 deletions(-) commit b6702a942a069c2a975478d719e98d83cdae1797 Author: Shigeru Yoshida Date: Mon Oct 10 03:32:23 2022 +0900 wifi: ar5523: Fix use-after-free on ar5523_cmd() timed out syzkaller reported use-after-free with the stack trace like below [1]: [ 38.960489][ C3] ================================================================== [ 38.963216][ C3] BUG: KASAN: use-after-free in ar5523_cmd_tx_cb+0x220/0x240 [ 38.964950][ C3] Read of size 8 at addr ffff888048e03450 by task swapper/3/0 [ 38.966363][ C3] [ 38.967053][ C3] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 6.0.0-09039-ga6afa4199d3d-dirty #18 [ 38.968464][ C3] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-1.fc36 04/01/2014 [ 38.969959][ C3] Call Trace: [ 38.970841][ C3] [ 38.971663][ C3] dump_stack_lvl+0xfc/0x174 [ 38.972620][ C3] print_report.cold+0x2c3/0x752 [ 38.973626][ C3] ? ar5523_cmd_tx_cb+0x220/0x240 [ 38.974644][ C3] kasan_report+0xb1/0x1d0 [ 38.975720][ C3] ? ar5523_cmd_tx_cb+0x220/0x240 [ 38.976831][ C3] ar5523_cmd_tx_cb+0x220/0x240 [ 38.978412][ C3] __usb_hcd_giveback_urb+0x353/0x5b0 [ 38.979755][ C3] usb_hcd_giveback_urb+0x385/0x430 [ 38.981266][ C3] dummy_timer+0x140c/0x34e0 [ 38.982925][ C3] ? notifier_call_chain+0xb5/0x1e0 [ 38.984761][ C3] ? rcu_read_lock_sched_held+0xb/0x60 [ 38.986242][ C3] ? lock_release+0x51c/0x790 [ 38.987323][ C3] ? _raw_read_unlock_irqrestore+0x37/0x70 [ 38.988483][ C3] ? __wake_up_common_lock+0xde/0x130 [ 38.989621][ C3] ? reacquire_held_locks+0x4a0/0x4a0 [ 38.990777][ C3] ? lock_acquire+0x472/0x550 [ 38.991919][ C3] ? rcu_read_lock_sched_held+0xb/0x60 [ 38.993138][ C3] ? lock_acquire+0x472/0x550 [ 38.994890][ C3] ? dummy_urb_enqueue+0x860/0x860 [ 38.996266][ C3] ? do_raw_spin_unlock+0x16f/0x230 [ 38.997670][ C3] ? dummy_urb_enqueue+0x860/0x860 [ 38.999116][ C3] call_timer_fn+0x1a0/0x6a0 [ 39.000668][ C3] ? add_timer_on+0x4a0/0x4a0 [ 39.002137][ C3] ? reacquire_held_locks+0x4a0/0x4a0 [ 39.003809][ C3] ? __next_timer_interrupt+0x226/0x2a0 [ 39.005509][ C3] __run_timers.part.0+0x69a/0xac0 [ 39.007025][ C3] ? dummy_urb_enqueue+0x860/0x860 [ 39.008716][ C3] ? call_timer_fn+0x6a0/0x6a0 [ 39.010254][ C3] ? cpuacct_percpu_seq_show+0x10/0x10 [ 39.011795][ C3] ? kvm_sched_clock_read+0x14/0x40 [ 39.013277][ C3] ? sched_clock_cpu+0x69/0x2b0 [ 39.014724][ C3] run_timer_softirq+0xb6/0x1d0 [ 39.016196][ C3] __do_softirq+0x1d2/0x9be [ 39.017616][ C3] __irq_exit_rcu+0xeb/0x190 [ 39.019004][ C3] irq_exit_rcu+0x5/0x20 [ 39.020361][ C3] sysvec_apic_timer_interrupt+0x8f/0xb0 [ 39.021965][ C3] [ 39.023237][ C3] In ar5523_probe(), ar5523_host_available() calls ar5523_cmd() as below (there are other functions which finally call ar5523_cmd()): ar5523_probe() -> ar5523_host_available() -> ar5523_cmd_read() -> ar5523_cmd() If ar5523_cmd() timed out, then ar5523_host_available() failed and ar5523_probe() freed the device structure. So, ar5523_cmd_tx_cb() might touch the freed structure. This patch fixes this issue by canceling in-flight tx cmd if submitted urb timed out. Link: https://syzkaller.appspot.com/bug?id=9e12b2d54300842b71bdd18b54971385ff0d0d3a [1] Reported-by: syzbot+95001b1fd6dfcc716c29@syzkaller.appspotmail.com Signed-off-by: Shigeru Yoshida Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221009183223.420015-1-syoshida@redhat.com drivers/net/wireless/ath/ar5523/ar5523.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2577a58df24417dcdd35a3ba5b9e4e419a7d1234 Author: Kees Cook Date: Thu Oct 6 12:20:51 2022 -0700 wifi: carl9170: Remove -Warray-bounds exception GCC-12 emits false positive -Warray-bounds warnings with CONFIG_UBSAN_SHIFT (-fsanitize=shift). This is fixed in GCC 13[1], and there is top-level Makefile logic to remove -Warray-bounds for known-bad GCC versions staring with commit f0be87c42cbd ("gcc-12: disable '-Warray-bounds' universally for now"). Remove the local work-around. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105679 Signed-off-by: Kees Cook Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221006192051.1742930-1-keescook@chromium.org drivers/net/wireless/ath/carl9170/Makefile | 5 ----- 1 file changed, 5 deletions(-) commit d31ada3b511141f4b78cae5a05cc2dad887c40b7 Author: David Vernet Date: Tue Oct 11 11:52:55 2022 -0500 selftests/bpf: Alphabetize DENYLISTs The DENYLIST and DENYLIST.s390x files are used to specify testcases which should not be run on CI. Currently, testcases are appended to the end of these files as needed. This can make it a pain to resolve merge conflicts. This patch alphabetizes the DENYLIST files to ease this burden. Signed-off-by: David Vernet Acked-by: Daniel Müller Link: https://lore.kernel.org/r/20221011165255.774014-1-void@manifault.com Signed-off-by: Martin KaFai Lau tools/testing/selftests/bpf/DENYLIST | 3 ++- tools/testing/selftests/bpf/DENYLIST.s390x | 41 +++++++++++++++--------------- 2 files changed, 23 insertions(+), 21 deletions(-) commit b8fe87b816851d08a31c7c9589855c8535672299 Author: Ping-Ke Shih Date: Sun Oct 9 20:54:03 2022 +0800 wifi: rtw89: 8852b: add basic attributes of chip_info Add 8852b specific constant tables and basic attributes containing common chip_ops, firmware name, supported TX/RX NSS, number of CAM, coexistence version, control register set, and so on. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221009125403.19662-10-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b.c | 235 ++++++++++++++++++++++++++ 1 file changed, 235 insertions(+) commit 572fd2ab377b123e52b442d015f9605409a21ad9 Author: Ping-Ke Shih Date: Sun Oct 9 20:54:02 2022 +0800 wifi: rtw89: 8852b: add functions to control BB to assist RF calibrations When we are going to do RF calibrations, they need BB helpers to control TX PLCP, power, path and mode. Also, it they need helpers to backup and restore some registers before and after RF calibrations. Then, use flow of RF calibrations will be like backup registers, configure calibration, configure TX parameters, measure calibration result, and finally restore registers. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221009125403.19662-9-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b.c | 288 ++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852b.h | 44 ++++ 2 files changed, 332 insertions(+) commit 8915a256538d0e81fe02c5f68368e5787df261d5 Author: Ping-Ke Shih Date: Sun Oct 9 20:54:01 2022 +0800 wifi: rtw89: 8852b: add chip_ops to configure TX/RX path To support variant models, such as 1x1 or 1T2R, we need this chip_ops to change the path accordingly. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221009125403.19662-8-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/reg.h | 4 + drivers/net/wireless/realtek/rtw89/rtw8852b.c | 112 ++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852b.h | 3 + 3 files changed, 119 insertions(+) commit bf958f76cf97663d79b4f90a08d38c5b9bb56082 Author: Ping-Ke Shih Date: Sun Oct 9 20:54:00 2022 +0800 wifi: rtw89: 8852b: add chip_ops to query PPDU Add to parse PPDU to get frequency and RSSI of received packets. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221009125403.19662-7-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b.c | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 98bf0ddf20fc2d70d11f1af6e041ee4fad1392ac Author: Ping-Ke Shih Date: Sun Oct 9 20:53:59 2022 +0800 wifi: rtw89: 8852b: add chip_ops related to BT coexistence These chip_ops are used to assist BT coexistence module to control chip specific operations, such as initial, pre-AGC, BT grant, set wifi priority and tx power, RX gain, and get BT counter. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221009125403.19662-6-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/reg.h | 1 + drivers/net/wireless/realtek/rtw89/rtw8852b.c | 305 ++++++++++++++++++++++++++ 2 files changed, 306 insertions(+) commit 8f88474ce3eca2dd8fb4e08d4b6ab71e76312e3e Author: Ping-Ke Shih Date: Sun Oct 9 20:53:58 2022 +0800 wifi: rtw89: 8852b: add chip_ops to get thermal Thermal value reflects temperature that will affect RF performance, so we re-calibrate RF characteristics if delta of thermal over a threshold. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221009125403.19662-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit a804479839e1cf502a76c407f3e07135ddbe5032 Author: Ping-Ke Shih Date: Sun Oct 9 20:53:57 2022 +0800 wifi: rtw89: 8852b: add basic baseband chip_ops chip_ops::bb_reset is to reset baseband state after loading parameters, because its state could be unpredictable at that moment. The other is chip_ops::bb_sethw that is to set some baseband settings not including in parameter tables. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221009125403.19662-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b.c | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit b23b36efbdac603c491197dae1d27a3c5ac4b01c Author: Ping-Ke Shih Date: Sun Oct 9 20:53:56 2022 +0800 wifi: rtw89: 8852b: add power on/off functions We need power on function to enable hardware circuits of MAC/BB/RF, and then download firmware and load PHY parameters. After more settings, it starts to work. When it enters idle, use power off function to have the lowest power consumption. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221009125403.19662-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac.h | 1 + drivers/net/wireless/realtek/rtw89/reg.h | 18 +++ drivers/net/wireless/realtek/rtw89/rtw8852b.c | 192 ++++++++++++++++++++++++++ 3 files changed, 211 insertions(+) commit d0a95ef3ed86762d2356fd5443bebe7a6ef140c7 Author: Ping-Ke Shih Date: Sun Oct 9 20:53:55 2022 +0800 wifi: rtw89: 8852b: add chip_ops::set_channel_help This chip_ops is to assist set_channel, because we need setup and restore hardware before and after set_channel. Before set_channel, we stop transmitting, reset PPDU status, disable TSSI, and disable ADC. After set_channel, do opposite things in reverse order. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221009125403.19662-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b.c | 84 +++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) commit 6e5971503e7dc5e496fb357268242d69abb73f45 Author: Bitterblue Smith Date: Sat Oct 8 13:58:36 2022 +0300 wifi: rtl8xxxu: Update module description Make the title more future-proof, using rtw88 as a model. Mention support for RTL8723BU, RTL8192EU, and RTL8188FU. Correct the module name. Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/ecb7512a-07e8-112d-c815-1494582de5f8@gmail.com drivers/net/wireless/realtek/rtl8xxxu/Kconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6f103aeb5e985ac08f3a4a049a2c17294f40cff9 Author: Bitterblue Smith Date: Sat Oct 8 13:56:09 2022 +0300 wifi: rtl8xxxu: Fix reading the vendor of combo chips The wifi + bluetooth combo chips (RTL8723AU and RTL8723BU) read the chip vendor from the wrong register because the val32 variable gets overwritten. Add one more variable to avoid this. This had no real effect on RTL8723BU. It may have had an effect on RTL8723AU. Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/24af8024-2f07-552b-93d8-38823d8e3cb0@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 79cac25e51a6add887151916e96622871328f1e8 Author: Bitterblue Smith Date: Sat Oct 8 13:54:22 2022 +0300 wifi: rtl8xxxu: Make some arrays const All the initialisation tables, plus rtl8xxxu_rfregs. Most of them were already static. Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/9407f219-a7ba-676e-3d99-154d67b312d2@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 8 ++++---- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 10 +++++----- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 10 +++++----- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 12 ++++++------ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 2 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 8 ++++---- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 22 +++++++++++----------- 7 files changed, 36 insertions(+), 36 deletions(-) commit 636123a8357f465ba453480ed55fb206d9c961e7 Author: Anusha Srivatsa Date: Mon Oct 10 13:21:35 2022 -0700 drm/i915/display: Add DC5 counter and DMC debugfs entries for MTL MTL and dgfx use the same DC5 counter. While at it, this patch also adds the corresponding debugfs entries. Some cleanup wrt dc3co register which makes the code more readable. Driver loads all firmware that it finds in the firmware binary but platform doesn't *need* all of them. Cleaning the previous debugs entries to reflect which firmware is needed and if the needed firmware is loaded or not. MTL needs both Pipe A and Pipe B DMC to be loaded along with Main DMC. BSpec: 49788 Cc: Lucas De Marchi Cc: Radhakrishna Sripada Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221010202135.28388-1-anusha.srivatsa@intel.com drivers/gpu/drm/i915/display/intel_dmc.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 0b8b4a0633da790d285d023acc2ac7cb1623a858 Merge: df39f6bb3c59 ff2be4420863 Author: Jonathan Corbet Date: Tue Oct 11 11:03:28 2022 -0600 Merge branch 'docs-mw' into docs-next commit 478132050360a5cf19cc1b3fc9fcf1e56a483481 Author: Po-Hao Huang Date: Fri Oct 7 12:59:00 2022 +0800 wifi: rtw89: fix wrong bandwidth settings after scan Set channel in driver side to configure Tx power and channel index correctly after scan. Before this, beacons with bandwidth larger than 20M bandwidth will be dropped by mac80211 due to frequency mismatch. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221007045900.10823-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/fw.c | 1 + 1 file changed, 1 insertion(+) commit 54997c24767b51bd762ff942431e8d37b535dc2e Author: Po-Hao Huang Date: Fri Oct 7 12:58:59 2022 +0800 wifi: rtw89: correct 6 GHz scan behavior Change active scan behavior to fit 6GHz requirements. There are many different rules on active scan between 6GHz and 2GHz/5GHz, so if the SSID is not specified, do fast passive scanning and limit number of probe requests we send for now until new firmware can support all rules. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221007045900.10823-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/fw.c | 28 ++++++++++++++++++++++------ drivers/net/wireless/realtek/rtw89/fw.h | 1 + 2 files changed, 23 insertions(+), 6 deletions(-) commit 6b0698984eb02f3e0dfd3c152df69f87c903e07f Author: Ping-Ke Shih Date: Wed Oct 5 16:32:12 2022 +0800 wifi: rtw89: 8852b: add chip_ops::set_channel set_channel is main function to configure channel and bandwidth for all layers, namely MAC, BB and RF. Additionally, MAC layer enables CCK rate checking to avoid wrong rate from driver. BB layer configures SCO (Sample Clock Offset) for CCK, TX gain error/offset, and reset baseband hardware circuit after all configurations done. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221005083212.45683-7-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/phy.c | 9 + drivers/net/wireless/realtek/rtw89/phy.h | 2 + drivers/net/wireless/realtek/rtw89/reg.h | 58 ++- drivers/net/wireless/realtek/rtw89/rtw8852b.c | 564 ++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c | 256 ++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.h | 14 + 7 files changed, 903 insertions(+), 1 deletion(-) commit 6e5125bcbaf810520969c121c7f12f20b8f3987d Author: Ping-Ke Shih Date: Wed Oct 5 16:32:11 2022 +0800 wifi: rtw89: make generic functions to convert subband gain index The gain tables use different domain index, so we need to convert the index from subband of chandef. Since these conversion functions can share with 8852b, make generic functions for further use. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221005083212.45683-6-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/phy.h | 44 +++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852c.c | 46 ++------------------------- 2 files changed, 46 insertions(+), 44 deletions(-) commit 3e870b4817333a1a4b01805073da3e00449acf43 Author: Ping-Ke Shih Date: Wed Oct 5 16:32:10 2022 +0800 wifi: rtw89: 8852b: add HFC quota arrays HFC is short for HCI flow control. These arrays are used to set quota according to operating modes, which are SCC or download firmware. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221005083212.45683-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b.c | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit d0c820cc5bcf768598ca3e9f6e29f3e4e5589827 Author: Ping-Ke Shih Date: Wed Oct 5 16:32:09 2022 +0800 wifi: rtw89: 8852b: set proper configuration before loading NCTL Before loading RF NCTL table, we need to configure IQK/DPK clock and reset them, and then polling NCTL state ready. Since 8852BE needs additional one setting, add it by this patch. Also, give them proper names. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221005083212.45683-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/phy.c | 12 +++++++----- drivers/net/wireless/realtek/rtw89/reg.h | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) commit 0935bb1527d711b1af8e89d4ba200c302fb5ab2b Author: Eric Huang Date: Wed Oct 5 16:32:08 2022 +0800 wifi: rtw89: parse PHY status only when PPDU is to_self Without this fix, some non-self packets are used to count CFO (center frequency offset), and average CFO has unstable variation. Then, it causes unexpected performance. Signed-off-by: Eric Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221005083212.45683-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 3 +++ 1 file changed, 3 insertions(+) commit 127da1aa61859c1eb27d7fc2d5b936e9e528815d Author: Ching-Te Ku Date: Wed Oct 5 16:32:07 2022 +0800 wifi: rtw89: coex: move chip_ops::btc_bt_aci_imp to a generic code This chunk is to set fixed BT LNA2 at level5 when WiFi/BT shared BTG RFC to improve BT anti-interference ability from adjacent channel. Since all chips use the same setting, remove chip_ops::btc_bt_aci_imp. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221005083212.45683-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/coex.c | 9 +++++++-- drivers/net/wireless/realtek/rtw89/core.h | 1 - drivers/net/wireless/realtek/rtw89/rtw8852a.c | 14 -------------- drivers/net/wireless/realtek/rtw89/rtw8852c.c | 14 -------------- 4 files changed, 7 insertions(+), 31 deletions(-) commit 8cee664d3eb6f80eb7ecc46b9a32214f0fe629d3 Author: Andrzej Hajda Date: Thu Oct 6 18:32:00 2022 +0200 drm/i915: use proper helper for register updates There is special helper for register read/modify/write. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221006163200.2803722-5-andrzej.hajda@intel.com drivers/gpu/drm/i915/display/intel_tc.c | 9 +- drivers/gpu/drm/i915/i915_irq.c | 227 ++++++++++++-------------------- drivers/gpu/drm/i915/intel_pm.c | 60 +++------ drivers/gpu/drm/i915/vlv_suspend.c | 28 ++-- 4 files changed, 112 insertions(+), 212 deletions(-) commit 06b975d58fd6105e3fad8b3a1122749f79dd7df3 Author: Andrzej Hajda Date: Thu Oct 6 18:31:59 2022 +0200 drm/i915: make intel_uncore_rmw() write unconditionally Two small changes in intel_uncore_rmw will allow to use it more broadly: - write register unconditionally, for use with latch registers, - return old value of the register, IRQ cleanup and similar. If we really want to keep write-only-if-changed feature maybe other helper will be more suitable for it, intel_uncore_rmw name suggests unconditional write. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Acked-by: Jani Nikula Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221006163200.2803722-4-andrzej.hajda@intel.com drivers/gpu/drm/i915/intel_uncore.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e58c2cac2c21f2785d4ab9f4ddf6d9e7a92dd8e7 Author: Andrzej Hajda Date: Thu Oct 6 18:31:58 2022 +0200 drm/i915/display: Use intel_uncore alias if defined Alias is shorter and more readable. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221006163200.2803722-3-andrzej.hajda@intel.com drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3703060d17b0c35d8eece6c12550dba759e52c6a Author: Andrzej Hajda Date: Thu Oct 6 22:48:44 2022 +0200 drm/i915/display: remove drm_device aliases drm_device pointers are unwelcome. Signed-off-by: Andrzej Hajda Signed-off-by: Andi Shyti Acked-by: Jani Nikula Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221006204844.2831303-1-andrzej.hajda@intel.com drivers/gpu/drm/i915/display/icl_dsi.c | 9 ++-- drivers/gpu/drm/i915/display/intel_display.c | 9 ++-- .../gpu/drm/i915/display/intel_display_debugfs.c | 51 +++++++++------------- drivers/gpu/drm/i915/display/intel_display_power.c | 3 +- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++- drivers/gpu/drm/i915/display/intel_hotplug.c | 28 +++++------- drivers/gpu/drm/i915/display/intel_lpe_audio.c | 5 +-- drivers/gpu/drm/i915/display/intel_lvds.c | 11 +++-- drivers/gpu/drm/i915/display/intel_opregion.c | 7 ++- drivers/gpu/drm/i915/display/intel_pipe_crc.c | 9 ++-- drivers/gpu/drm/i915/display/intel_psr.c | 5 +-- drivers/gpu/drm/i915/display/intel_tv.c | 5 +-- drivers/gpu/drm/i915/display/vlv_dsi.c | 9 ++-- drivers/gpu/drm/i915/i915_driver.c | 18 +++----- drivers/gpu/drm/i915/i915_irq.c | 3 +- 15 files changed, 74 insertions(+), 105 deletions(-) commit bd52407221b4702af690456b2b6006fa6440e893 Author: Xiu Jianfeng Date: Sat Sep 24 17:28:20 2022 +0800 optee: Add __init/__exit annotations to module init/exit funcs Add missing __init/__exit annotations to module init/exit funcs. Reviewed-by: Sumit Garg Signed-off-by: Xiu Jianfeng Signed-off-by: Jens Wiklander drivers/tee/optee/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 16ef02bad239f11f322df8425d302be62f0443ce Author: Fedor Pchelkin Date: Sun Oct 9 00:15:32 2022 +0300 wifi: ath9k: verify the expected usb_endpoints are present The bug arises when a USB device claims to be an ATH9K but doesn't have the expected endpoints. (In this case there was an interrupt endpoint where the driver expected a bulk endpoint.) The kernel needs to be able to handle such devices without getting an internal error. usb 1-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 3 PID: 500 at drivers/usb/core/urb.c:493 usb_submit_urb+0xce2/0x1430 drivers/usb/core/urb.c:493 Modules linked in: CPU: 3 PID: 500 Comm: kworker/3:2 Not tainted 5.10.135-syzkaller #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Workqueue: events request_firmware_work_func RIP: 0010:usb_submit_urb+0xce2/0x1430 drivers/usb/core/urb.c:493 Call Trace: ath9k_hif_usb_alloc_rx_urbs drivers/net/wireless/ath/ath9k/hif_usb.c:908 [inline] ath9k_hif_usb_alloc_urbs+0x75e/0x1010 drivers/net/wireless/ath/ath9k/hif_usb.c:1019 ath9k_hif_usb_dev_init drivers/net/wireless/ath/ath9k/hif_usb.c:1109 [inline] ath9k_hif_usb_firmware_cb+0x142/0x530 drivers/net/wireless/ath/ath9k/hif_usb.c:1242 request_firmware_work_func+0x12e/0x240 drivers/base/firmware_loader/main.c:1097 process_one_work+0x9af/0x1600 kernel/workqueue.c:2279 worker_thread+0x61d/0x12f0 kernel/workqueue.c:2425 kthread+0x3b4/0x4a0 kernel/kthread.c:313 ret_from_fork+0x22/0x30 arch/x86/entry/entry_64.S:299 Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Suggested-by: Alan Stern 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/20221008211532.74583-1-pchelkin@ispras.ru drivers/net/wireless/ath/ath9k/hif_usb.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit dd95f2239fc846795fc926787c3ae0ca701c9840 Author: Fedor Pchelkin Date: Sat Oct 8 14:49:17 2022 +0300 wifi: ath9k: hif_usb: Fix use-after-free in ath9k_hif_usb_reg_in_cb() It is possible that skb is freed in ath9k_htc_rx_msg(), then usb_submit_urb() fails and we try to free skb again. It causes use-after-free bug. Moreover, if alloc_skb() fails, urb->context becomes NULL but rx_buf is not freed and there can be a memory leak. The patch removes unnecessary nskb and makes skb processing more clear: it is supposed that ath9k_htc_rx_msg() either frees old skb or passes its managing to another callback function. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 3deff76095c4 ("ath9k_htc: Increase URB count for REG_IN pipe") 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/20221008114917.21404-1-pchelkin@ispras.ru drivers/net/wireless/ath/ath9k/hif_usb.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit d174768932a89c20f2ef6dee2602221143995c29 Author: Kees Cook Date: Thu Oct 6 12:20:54 2022 -0700 wifi: ath9k: Remove -Warray-bounds exception GCC-12 emits false positive -Warray-bounds warnings with CONFIG_UBSAN_SHIFT (-fsanitize=shift). This is fixed in GCC 13[1], and there is top-level Makefile logic to remove -Warray-bounds for known-bad GCC versions staring with commit f0be87c42cbd ("gcc-12: disable '-Warray-bounds' universally for now"). Remove the local work-around. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105679 Signed-off-by: Kees Cook Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221006192054.1742982-1-keescook@chromium.org drivers/net/wireless/ath/ath9k/Makefile | 5 ----- 1 file changed, 5 deletions(-) commit c2a94de38c74e86f49124ac14f093d6a5c377a90 Author: Fedor Pchelkin Date: Mon Jul 25 18:13:59 2022 +0300 wifi: ath9k: hif_usb: fix memory leak of urbs in ath9k_hif_usb_dealloc_tx_urbs() Syzkaller reports a long-known leak of urbs in ath9k_hif_usb_dealloc_tx_urbs(). The cause of the leak is that usb_get_urb() is called but usb_free_urb() (or usb_put_urb()) is not called inside usb_kill_urb() as urb->dev or urb->ep fields have not been initialized and usb_kill_urb() returns immediately. The patch removes trying to kill urbs located in hif_dev->tx.tx_buf because hif_dev->tx.tx_buf is not supposed to contain urbs which are in pending state (the pending urbs are stored in hif_dev->tx.tx_pending). The tx.tx_lock is acquired so there should not be any changes in the list. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 03fb92a432ea ("ath9k: hif_usb: fix race condition between usb_get_urb() and usb_kill_anchored_urbs()") 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/20220725151359.283704-1-pchelkin@ispras.ru drivers/net/wireless/ath/ath9k/hif_usb.c | 4 ---- 1 file changed, 4 deletions(-) commit 53991aedcd34760be23f1b0ef312e39b6add84af Author: John Johansen Date: Mon Oct 10 12:15:10 2022 -0700 apparmor: Fix unpack_profile() warn: passing zero to 'ERR_PTR' unpack_profile() sets a default error on entry but this gets overridden by error assignment by functions called in its body. If an error check that was relying on the default value is triggered after one of these error assignments then zero will be passed to ERR_PTR. Fix this by setting up a default -EPROTO assignment in the error path and while we are at it make sure the correct error is returned in non-default cases. Fixes: 217af7e2f4de ("apparmor: refactor profile rules and attachments") Reported-by: kernel test robot Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit f6ac03ebeb07ed70bdb8fbde9e1d69f8e9707565 Merge: 2e30960097f6 a9c7c18b5759 Author: Andrii Nakryiko Date: Mon Oct 10 16:49:45 2022 -0700 Merge branch 'Add _opts variant for bpf_*_get_fd_by_id()' Roberto Sassu says: ==================== From: Roberto Sassu Add the _opts variant for bpf_*_get_fd_by_id() functions, to be able to pass to the kernel more options, when requesting a fd of an eBPF object. Pass the options through a newly introduced structure, bpf_get_fd_by_id_opts, which currently contains open_flags (the other two members are for compatibility and for padding). open_flags allows the caller to request specific permissions to access a map (e.g. read-only). This is useful for example in the situation where a map is write-protected. Besides patches 2-6, which introduce the new variants and the data structure, patch 1 fixes the LIBBPF_1.0.0 declaration in libbpf.map. Changelog v1: - Don't CC stable kernel mailing list for patch 1 (suggested by Andrii) - Rename bpf_get_fd_opts struct to bpf_get_fd_by_id_opts (suggested by Andrii) - Move declaration of _opts variants after non-opts variants (suggested by Andrii) - Correctly initialize bpf_map_info, fix style issues, use map from skeleton, check valid fd in the test (suggested by Andrii) - Rename libbpf_get_fd_opts test to libbpf_get_fd_by_id_opts ==================== Signed-off-by: Andrii Nakryiko commit a9c7c18b57594c72a63fad749021b743c65a098b Author: Roberto Sassu Date: Thu Oct 6 13:07:36 2022 +0200 selftests/bpf: Add tests for _opts variants of bpf_*_get_fd_by_id() Introduce the data_input map, write-protected with a small eBPF program implementing the lsm/bpf_map hook. Then, ensure that bpf_map_get_fd_by_id() and bpf_map_get_fd_by_id_opts() with NULL opts don't succeed due to requesting read-write access to the write-protected map. Also, ensure that bpf_map_get_fd_by_id_opts() with open_flags in opts set to BPF_F_RDONLY instead succeeds. After obtaining a read-only fd, ensure that only map lookup succeeds and not update. Ensure that update works only with the read-write fd obtained at program loading time, when the write protection was not yet enabled. Finally, ensure that the other _opts variants of bpf_*_get_fd_by_id() don't work if the BPF_F_RDONLY flag is set in opts (due to the kernel not handling the open_flags member of bpf_attr). Signed-off-by: Roberto Sassu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221006110736.84253-7-roberto.sassu@huaweicloud.com tools/testing/selftests/bpf/DENYLIST.s390x | 1 + .../bpf/prog_tests/libbpf_get_fd_by_id_opts.c | 87 ++++++++++++++++++++++ .../bpf/progs/test_libbpf_get_fd_by_id_opts.c | 36 +++++++++ 3 files changed, 124 insertions(+) commit 97c8f9dd5db839f2387785ee936d0a5b257b31d3 Author: Roberto Sassu Date: Thu Oct 6 13:07:35 2022 +0200 libbpf: Introduce bpf_link_get_fd_by_id_opts() Introduce bpf_link_get_fd_by_id_opts(), for symmetry with bpf_map_get_fd_by_id_opts(), to let the caller pass the newly introduced data structure bpf_get_fd_by_id_opts. Keep the existing bpf_link_get_fd_by_id(), and call bpf_link_get_fd_by_id_opts() with NULL as opts argument, to prevent setting open_flags. Currently, the kernel does not support non-zero open_flags for bpf_link_get_fd_by_id_opts(), and a call with them will result in an error returned by the bpf() system call. The caller should always pass zero open_flags. Signed-off-by: Roberto Sassu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221006110736.84253-6-roberto.sassu@huaweicloud.com tools/lib/bpf/bpf.c | 12 +++++++++++- tools/lib/bpf/bpf.h | 2 ++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) commit 2ce7cbf2ba71bb03542af739af80e86b6855ae48 Author: Roberto Sassu Date: Thu Oct 6 13:07:34 2022 +0200 libbpf: Introduce bpf_btf_get_fd_by_id_opts() Introduce bpf_btf_get_fd_by_id_opts(), for symmetry with bpf_map_get_fd_by_id_opts(), to let the caller pass the newly introduced data structure bpf_get_fd_by_id_opts. Keep the existing bpf_btf_get_fd_by_id(), and call bpf_btf_get_fd_by_id_opts() with NULL as opts argument, to prevent setting open_flags. Currently, the kernel does not support non-zero open_flags for bpf_btf_get_fd_by_id_opts(), and a call with them will result in an error returned by the bpf() system call. The caller should always pass zero open_flags. Signed-off-by: Roberto Sassu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221006110736.84253-5-roberto.sassu@huaweicloud.com tools/lib/bpf/bpf.c | 12 +++++++++++- tools/lib/bpf/bpf.h | 2 ++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) commit 8f13f168ea14333ac971e5404800b7fb3658e782 Author: Roberto Sassu Date: Thu Oct 6 13:07:33 2022 +0200 libbpf: Introduce bpf_prog_get_fd_by_id_opts() Introduce bpf_prog_get_fd_by_id_opts(), for symmetry with bpf_map_get_fd_by_id_opts(), to let the caller pass the newly introduced data structure bpf_get_fd_by_id_opts. Keep the existing bpf_prog_get_fd_by_id(), and call bpf_prog_get_fd_by_id_opts() with NULL as opts argument, to prevent setting open_flags. Currently, the kernel does not support non-zero open_flags for bpf_prog_get_fd_by_id_opts(), and a call with them will result in an error returned by the bpf() system call. The caller should always pass zero open_flags. Signed-off-by: Roberto Sassu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221006110736.84253-4-roberto.sassu@huaweicloud.com tools/lib/bpf/bpf.c | 12 +++++++++++- tools/lib/bpf/bpf.h | 2 ++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) commit 243e300563b1b39ac669c7698742931427699184 Author: Roberto Sassu Date: Thu Oct 6 13:07:32 2022 +0200 libbpf: Introduce bpf_get_fd_by_id_opts and bpf_map_get_fd_by_id_opts() Define a new data structure called bpf_get_fd_by_id_opts, with the member open_flags, to be used by callers of the _opts variants of bpf_*_get_fd_by_id() to specify the permissions needed for the file descriptor to be obtained. Also, introduce bpf_map_get_fd_by_id_opts(), to let the caller pass a bpf_get_fd_by_id_opts structure. Finally, keep the existing bpf_map_get_fd_by_id(), and call bpf_map_get_fd_by_id_opts() with NULL as opts argument, to request read-write permissions (current behavior). Signed-off-by: Roberto Sassu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221006110736.84253-3-roberto.sassu@huaweicloud.com tools/lib/bpf/bpf.c | 12 +++++++++++- tools/lib/bpf/bpf.h | 10 ++++++++++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) commit 7a366da2d2ba86316d3ec408f70d19b63916f9ce Author: Roberto Sassu Date: Thu Oct 6 13:07:31 2022 +0200 libbpf: Fix LIBBPF_1.0.0 declaration in libbpf.map Add the missing LIBBPF_0.8.0 at the end of the LIBBPF_1.0.0 declaration, similarly to other version declarations. Signed-off-by: Roberto Sassu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221006110736.84253-2-roberto.sassu@huaweicloud.com tools/lib/bpf/libbpf.map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df39f6bb3c59784acf0c31f2c5e7eee3a4fea354 Merge: 05fff6ba04ee 4e3ce6d04da3 Author: Jonathan Corbet Date: Mon Oct 10 13:12:56 2022 -0600 Merge branch 'docs-mw' into docs-next commit ee21a175ecfa821b74822881d354c7f848930738 Author: John Johansen Date: Mon Oct 10 11:18:50 2022 -0700 apparmor: fix uninitialize table variable in error in unpack_trans_table The error path has one case where *table is uninitialized, initialize it. Fixes: a0792e2ceddc ("apparmor: make transition table unpack generic so it can be reused") Reported-by: kernel test robot Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4a596eddb90114f5f5f32a440057a175517b090 Author: Colin Ian King Date: Mon Oct 10 11:00:10 2022 -0700 Input: dlink-dir685-touchkeys - make array bl_data static const Don't populate the read-only array bl_data on the stack but instead make it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Reviewed-by: Linus Walleij Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20221005154852.320056-1-colin.i.king@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/keyboard/dlink-dir685-touchkeys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48a4dec82f15cc53190c3c8f385700dd9c581dcd Author: Jean Delvare Date: Mon Oct 10 11:05:02 2022 -0700 Input: atmel_captouch - 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. As a matter of fact, dropping the alternative dependency on COMPILE_TEST allows removing preprocessor directives, which will speed up the build. Signed-off-by: Jean Delvare Link: https://lore.kernel.org/r/20221004102606.5d49e5d7@endymion.delvare Signed-off-by: Dmitry Torokhov drivers/input/misc/Kconfig | 2 +- drivers/input/misc/atmel_captouch.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit bc2472538c0d1cce334ffc9e97df0614cd2b1469 Author: Thomas Hellström Date: Wed Oct 5 14:11:59 2022 +0200 drm/i915: Fix display problems after resume Commit 39a2bd34c933 ("drm/i915: Use the vma resource as argument for gtt binding / unbinding") introduced a regression that due to the vma resource tracking of the binding state, dpt ptes were not correctly repopulated. Fix this by clearing the vma resource state before repopulating. The state will subsequently be restored by the bind_vma operation. Fixes: 39a2bd34c933 ("drm/i915: Use the vma resource as argument for gtt binding / unbinding") Signed-off-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220912121957.31310-1-thomas.hellstrom@linux.intel.com Cc: Matthew Auld Cc: intel-gfx@lists.freedesktop.org Cc: # v5.18+ Reported-and-tested-by: Kevin Boulain Tested-by: David de Sousa Reviewed-by: Matthew Auld Reviewed-by: Andrzej Hajda Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221005121159.340245-1-thomas.hellstrom@linux.intel.com drivers/gpu/drm/i915/gt/intel_ggtt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit bfc82b2277db8e2210aa31492998d6e806eae9e4 Author: Ville Syrjälä Date: Sat Oct 8 00:11:08 2022 +0300 drm/i915: Enable atomic by default on ctg/elk The watermark code for ctg/elk has been atomic ready for a long time so let's just flip the switch now that some of the last CxSR issues have been sorted out (which granted was a problem for vlv/chv as well despite them already having atomic enabled by default). v2: Rebase Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221007211108.3883-2-ville.syrjala@linux.intel.com Acked-by: Jani Nikula drivers/gpu/drm/i915/intel_device_info.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f38f614fa995f9555d7238df50253d550a7b5607 Author: Ville Syrjälä Date: Sat Oct 8 00:11:07 2022 +0300 drm/i915: Do the DRIVER_ATOMIC feature disable later Currently we do the DRIVER_ATOMIC disable as almost the first thing during pci probe. That involves the use of DISPLAY_VER() which is perhaps a bit sketchy now that we may need to read that out from the hardware itself. Looks like we do populate a default value for it anyway so the current does at least still work. But let's make this safer anyway and move the code into intel_device_info_runtime_init() where we also handle the same thing for the !HAS_DISPLAY case. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221007211108.3883-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/i915_driver.c | 4 ---- drivers/gpu/drm/i915/intel_device_info.c | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) commit 53d0ce0c56d9330f137936b8850d4a5f2f70907d Author: Johannes Berg Date: Mon Oct 10 19:17:46 2022 +0200 wifi: realtek: remove duplicated wake_tx_queue By accident, the previous patch duplicated the initialization of the wake_tx_queue callback. Fix that by removing the new initializations. Fixes: a790cc3a4fad ("wifi: mac80211: add wake_tx_queue callback to drivers") Signed-off-by: Johannes Berg drivers/net/wireless/realtek/rtw88/mac80211.c | 1 - drivers/net/wireless/realtek/rtw89/mac80211.c | 1 - 2 files changed, 2 deletions(-) commit 83d495a5b4b8cb6791e3ec6c14bd792e9c196cf9 Author: Vinay Belgaumkar Date: Wed Oct 5 08:59:43 2022 -0700 drm/i915/slpc: Update the frequency debugfs Read the values stored in the SLPC structures. Remove the fields that are no longer valid (like RPS interrupts) as well. v2: Move all functionality changes to this patch (Jani) v3: Fix compile warning and if condition (Jani) Signed-off-by: Vinay Belgaumkar Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221005155943.34747-3-vinay.belgaumkar@intel.com drivers/gpu/drm/i915/gt/intel_rps.c | 46 ++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) commit cf51cc7b2dec8ef3e3bed537ff12c503674ec180 Author: Vinay Belgaumkar Date: Wed Oct 5 08:59:42 2022 -0700 drm/i915: Add a wrapper for frequency debugfs Move it to the RPS source file. v2: Separate out code movement and functional changes (Jani) Signed-off-by: Vinay Belgaumkar Reviewed-by: Jani Nikula Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221005155943.34747-2-vinay.belgaumkar@intel.com drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 157 +------------------------ drivers/gpu/drm/i915/gt/intel_rps.c | 163 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_rps.h | 3 + 3 files changed, 167 insertions(+), 156 deletions(-) commit 8d87088e4e6d4e66f63447c7f9a4b6c3db6e61c2 Author: Teresa Remmet Date: Thu Sep 1 15:19:51 2022 +0200 drm/bridge: tc358775: Do not soft reset i2c-slave controller Soft reset during tc_bridge_enable() is triggered by setting all available reset control bits in the SYSRST register. But as noted in the data sheet resetting the i2c-slave controller should be only done over DSI and is only useful for chip debugging. So do not set RSTI2CS (bit0). Signed-off-by: Teresa Remmet Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220901131951.1116512-1-t.remmet@phytec.de drivers/gpu/drm/bridge/tc358775.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 499143e5b413104d0b242e385cb929cd3ac858eb Author: Mateusz Kwiatkowski Date: Thu Sep 29 18:31:19 2022 +0200 drm/vc4: vec: Fix definition of PAL-M mode PAL-M is a Brazilian analog TV standard that uses a PAL-style chroma subcarrier at 3.575611[888111] MHz on top of 525-line (480i60) timings. This commit makes the driver actually use the proper VEC preset for this mode instead of just changing PAL subcarrier frequency. Acked-by: Noralf Trønnes Signed-off-by: Mateusz Kwiatkowski Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v4-25-60d38873f782@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/vc4/vc4_vec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8b6e28ea0a51a74af6a2684591a3471742f90647 Author: Geert Uytterhoeven Date: Thu Sep 29 18:31:07 2022 +0200 drm/modes: parse_cmdline: Add support for named modes containing dashes It is fairly common for named video modes to contain dashes (e.g. "tt-mid" on Atari, "dblntsc-ff" on Amiga). Currently such mode names are not recognized, as the dash is considered to be a separator between mode name and bpp. Fix this by skipping any dashes that are not followed immediately by a digit when looking for the separator. Signed-off-by: Geert Uytterhoeven Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v4-13-60d38873f782@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/drm_modes.c | 2 ++ 1 file changed, 2 insertions(+) commit 90c258ba4a36f610302cdea6ff3b4e1a0811f50e Author: Maxime Ripard Date: Thu Sep 29 18:31:06 2022 +0200 drm/modes: Only consider bpp and refresh before options Some video= options might have a value that contains a dash. However, the command line parsing mode considers all dashes as the separator between the mode and the bpp count. Let's rework the parsing code a bit to only consider a dash as the bpp separator if it before a comma, the options separator. A follow-up patch will add a unit-test for this once such an option is introduced. Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v4-12-60d38873f782@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/drm_modes.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 941731a2684251e8854366c75df19185f586c784 Author: Maxime Ripard Date: Thu Sep 29 18:31:00 2022 +0200 drm/atomic: Add TV subconnector property to get/set_property The subconnector property was created by drm_mode_create_tv_properties(), but wasn't exposed to the userspace through the generic atomic_get/set_property implementation, and wasn't stored in any generic state structure. Let's solve this. Reviewed-by: Noralf Trønnes Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v4-6-60d38873f782@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/drm_atomic_uapi.c | 4 ++++ include/drm/drm_connector.h | 2 ++ 2 files changed, 6 insertions(+) commit d0236008f833e058c6abbcbf725cfa60a4d3efc5 Author: Maxime Ripard Date: Thu Sep 29 18:30:59 2022 +0200 drm/connector: Rename subconnector state variable There is two TV subconnector related properties registered by drm_mode_create_tv_properties(): subconnector and select subconnector. While the select subconnector property is stored in the kernel by the drm_tv_connector_state structure, the subconnector property isn't stored anywhere. Worse, the select subconnector property is stored in a field called subconnector, creating some ambiguity about which property content we're accessing. Let's rename that field to one called select_subconnector to make it move obvious what it's about. Acked-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v4-5-60d38873f782@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/drm_atomic_uapi.c | 4 ++-- include/drm/drm_connector.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 05e70e32f712e9fdf8a351caf97ba60fa8b71b44 Author: Maxime Ripard Date: Thu Sep 29 18:30:58 2022 +0200 drm/atomic-helper: Rename drm_atomic_helper_connector_tv_reset to avoid ambiguity We currently have two sets of TV properties. The first one is there to deal with analog TV properties, creating properties such as the TV mode, subconnectors, saturation, hue and so on. It's created by calling the drm_mode_create_tv_properties() function. The second one is there to deal with properties that might be useful on a TV, creating the overscan margins for example. It's created by calling the drm_mode_create_tv_margin_properties(). However, we also have a drm_atomic_helper_connector_tv_reset() function that will reset the TV margin properties to their default values, and thus is supposed to be called for the latter set. This creates an ambiguity due to the inconsistent naming. We can thus rename the drm_atomic_helper_connector_tv_reset() function to drm_atomic_helper_connector_tv_margins_reset() to remove that ambiguity and hopefully make it more obvious. Acked-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v4-4-60d38873f782@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/drm_atomic_state_helper.c | 6 +++--- drivers/gpu/drm/gud/gud_connector.c | 2 +- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- include/drm/drm_atomic_state_helper.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 542bbaa736026c99237d6d93e4fff46762a55ff7 Author: Maxime Ripard Date: Thu Sep 29 18:30:56 2022 +0200 drm/tests: Order Kunit tests in Makefile Since we've recently added a ton of tests, the list starts to be a bit of a mess and creates unneeded conflicts. Let's order it alphabetically. Acked-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v4-2-60d38873f782@cerno.tech Signed-off-by: Maxime Ripard drivers/gpu/drm/tests/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit e161d4b60ae3a5356e07202e0bfedb5fad82c6aa Author: Colin Ian King Date: Wed Oct 5 16:55:58 2022 +0100 wifi: ath9k: Make arrays prof_prio and channelmap static const Don't populate the read-only arrays prof_prio and channelmap on the stack but instead make them static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221005155558.320556-1-colin.i.king@gmail.com drivers/net/wireless/ath/ath9k/mci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a797f479bf3e02c6d179c2e6aeace7f9b22b0acd Author: Colin Ian King Date: Wed Sep 28 15:38:34 2022 +0100 wifi: ath11k: Fix spelling mistake "chnange" -> "change" There is a spelling mistake in an ath11k_dbg debug message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928143834.35189-1-colin.i.king@gmail.com drivers/net/wireless/ath/ath11k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d99884ad9e3673a12879bc2830f6e5a66cccbd78 Author: Wen Gong Date: Thu Oct 6 18:17:47 2022 +0300 wifi: ath11k: avoid deadlock during regulatory update in ath11k_regd_update() Running this test in a loop it is easy to reproduce an rtnl deadlock: iw reg set FI ifconfig wlan0 down What happens is that thread A (workqueue) tries to update the regulatory: try to acquire the rtnl_lock of ar->regd_update_work rtnl_lock+0x17/0x20 ath11k_regd_update+0x15a/0x260 [ath11k] ath11k_regd_update_work+0x15/0x20 [ath11k] process_one_work+0x228/0x670 worker_thread+0x4d/0x440 kthread+0x16d/0x1b0 ret_from_fork+0x22/0x30 And thread B (ifconfig) tries to stop the interface: try to cancel_work_sync(&ar->regd_update_work) in ath11k_mac_op_stop(). ifconfig 3109 [003] 2414.232506: probe: ath11k_mac_op_stop: (ffffffffc14187a0) drv_stop+0x30 ([mac80211]) ieee80211_do_stop+0x5d2 ([mac80211]) ieee80211_stop+0x3e ([mac80211]) __dev_close_many+0x9e ([kernel.kallsyms]) __dev_change_flags+0xbe ([kernel.kallsyms]) dev_change_flags+0x23 ([kernel.kallsyms]) devinet_ioctl+0x5e3 ([kernel.kallsyms]) inet_ioctl+0x197 ([kernel.kallsyms]) sock_do_ioctl+0x4d ([kernel.kallsyms]) sock_ioctl+0x264 ([kernel.kallsyms]) __x64_sys_ioctl+0x92 ([kernel.kallsyms]) do_syscall_64+0x3a ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe+0x63 ([kernel.kallsyms]) __GI___ioctl+0x7 (/lib/x86_64-linux-gnu/libc-2.23.so) The sequence of deadlock is: 1. Thread B calls rtnl_lock(). 2. Thread A starts to run and calls rtnl_lock() from within ath11k_regd_update_work(), then enters wait state because the lock is owned by thread B. 3. Thread B continues to run and tries to call cancel_work_sync(&ar->regd_update_work), but thread A is in ath11k_regd_update_work() waiting for rtnl_lock(). So cancel_work_sync() forever waits for ath11k_regd_update_work() to finish and we have a deadlock. Fix this by switching from using regulatory_set_wiphy_regd_sync() to regulatory_set_wiphy_regd(). Now cfg80211 will schedule another workqueue which handles the locking on it's own. So the ath11k workqueue can simply exit without taking any locks, avoiding the deadlock. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 Signed-off-by: Wen Gong [kvalo: improve commit log] Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221006151747.13757-1-kvalo@kernel.org drivers/net/wireless/ath/ath11k/reg.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 107395f9cf4419fa29b553a00872a27e579ae304 Author: Alexander Wetzel Date: Sun Oct 9 18:30:40 2022 +0200 wifi: mac80211: Drop support for TX push path All drivers are now using mac80211 internal queues (iTXQs). Drop mac80211 internal support for the old push path. Signed-off-by: Alexander Wetzel Signed-off-by: Johannes Berg net/mac80211/cfg.c | 3 -- net/mac80211/debugfs.c | 4 +-- net/mac80211/debugfs_netdev.c | 3 +- net/mac80211/debugfs_sta.c | 6 ++-- net/mac80211/ieee80211_i.h | 1 - net/mac80211/iface.c | 69 ++----------------------------------------- net/mac80211/main.c | 11 ++----- net/mac80211/rx.c | 3 -- net/mac80211/sta_info.c | 51 +++++++++++++------------------- net/mac80211/tdls.c | 1 - net/mac80211/tx.c | 28 +++--------------- net/mac80211/util.c | 53 ++++----------------------------- net/mac80211/wme.c | 63 +++++---------------------------------- net/mac80211/wme.h | 4 +-- 14 files changed, 48 insertions(+), 252 deletions(-) commit dfd2d876b3fda1790bc0239ba4c6967e25d16e91 Merge: a790cc3a4fad 10d5ea5a436d Author: Johannes Berg Date: Mon Oct 10 11:03:31 2022 +0200 Merge remote-tracking branch 'wireless/main' into wireless-next Pull in wireless/main content since some new code would otherwise conflict with it. Signed-off-by: Johannes Berg commit a790cc3a4fad75048295571a350b95b87e022a5a Author: Alexander Wetzel Date: Sun Oct 9 18:30:39 2022 +0200 wifi: mac80211: add wake_tx_queue callback to drivers mac80211 is fully switching over to the internal TX queue (iTXQ) implementation. Update all drivers not yet providing the now mandatory wake_tx_queue() callback. As an side effect the netdev interfaces of all updated drivers will switch to the noqueue qdisc. Signed-off-by: Alexander Wetzel [add staging drivers] Signed-off-by: Johannes Berg drivers/net/wireless/admtek/adm8211.c | 1 + drivers/net/wireless/ath/ar5523/ar5523.c | 1 + drivers/net/wireless/ath/ath11k/mac.c | 1 + drivers/net/wireless/ath/ath5k/mac80211-ops.c | 1 + drivers/net/wireless/ath/ath9k/htc_drv_main.c | 1 + drivers/net/wireless/ath/carl9170/main.c | 1 + drivers/net/wireless/ath/wcn36xx/main.c | 1 + drivers/net/wireless/atmel/at76c50x-usb.c | 1 + drivers/net/wireless/broadcom/b43/main.c | 1 + drivers/net/wireless/broadcom/b43legacy/main.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c | 1 + drivers/net/wireless/intel/iwlegacy/3945-mac.c | 1 + drivers/net/wireless/intel/iwlegacy/4965-mac.c | 1 + drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | 1 + drivers/net/wireless/intersil/p54/main.c | 1 + drivers/net/wireless/mac80211_hwsim.c | 1 + drivers/net/wireless/marvell/libertas_tf/main.c | 1 + drivers/net/wireless/marvell/mwl8k.c | 1 + drivers/net/wireless/mediatek/mt7601u/main.c | 1 + drivers/net/wireless/purelifi/plfxlc/mac.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2800pci.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 1 + drivers/net/wireless/ralink/rt2x00/rt61pci.c | 1 + drivers/net/wireless/ralink/rt2x00/rt73usb.c | 1 + drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 1 + drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 1 + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 1 + drivers/net/wireless/realtek/rtlwifi/core.c | 1 + drivers/net/wireless/realtek/rtw88/mac80211.c | 1 + drivers/net/wireless/realtek/rtw89/mac80211.c | 1 + drivers/net/wireless/rsi/rsi_91x_mac80211.c | 1 + drivers/net/wireless/silabs/wfx/main.c | 1 + drivers/net/wireless/st/cw1200/main.c | 1 + drivers/net/wireless/ti/wl1251/main.c | 1 + drivers/net/wireless/ti/wlcore/main.c | 1 + drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 1 + drivers/staging/vt6655/device_main.c | 1 + drivers/staging/vt6656/main_usb.c | 1 + 42 files changed, 42 insertions(+) commit c850e31f79f049af5022f07cd9961605b4470d0b Author: Alexander Wetzel Date: Sun Oct 9 18:30:38 2022 +0200 wifi: mac80211: add internal handler for wake_tx_queue Start to align the TX handling to only use internal TX queues (iTXQs): Provide a handler for drivers not having a custom wake_tx_queue callback and update the documentation. Signed-off-by: Alexander Wetzel Signed-off-by: Johannes Berg include/net/mac80211.h | 51 +++++++++++++++++++++++++++++++------------------- net/mac80211/util.c | 46 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 19 deletions(-) commit f1d8e2bf877d3d322aa7149c43bbc99466014eed Author: Colin Ian King Date: Fri Oct 7 20:53:45 2022 +0100 drm/i915/perf: remove redundant variable 'taken' The assignment to variable taken is redundant and so it can be removed as well as the variable too. Cleans up clang-scan build warnings: warning: Although the value stored to 'taken' is used in the enclosing expression, the value is never actually read from 'taken' [deadcode.DeadStores] Signed-off-by: Colin Ian King Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221007195345.2749911-1-colin.i.king@gmail.com drivers/gpu/drm/i915/i915_perf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 178ce94a15c970b66663e097d694bae6679e9a69 Author: Colin Ian King Date: Fri Oct 7 20:47:45 2022 +0100 drm/i915/gem: remove redundant assignments to variable ret The variable ret is being assigned with a value that is never read both before and after a while-loop. The variable is being re-assigned inside the while-loop and afterwards on the call to the function i915_gem_object_lock_interruptible. Remove the redundants assignments. Cleans up clang scan-build warnings: warning: Although the value stored to 'ret' is used in the enclosing expression, the value is never actually read from 'ret' [deadcode.DeadStores] warning: Value stored to 'ret' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221007194745.2749277-1-colin.i.king@gmail.com drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8f2fd57d834d83fb4f5e0f39a3415bcbe4c1d3b6 Author: Thomas Zimmermann Date: Fri Oct 7 14:43:38 2022 +0200 drm/atomic-helper: Replace drm_atomic_helper_check_crtc_state() Rename the atomic helper function drm_atomic_helper_check_crtc_state() to drm_atomic_helper_check_crtc_primary_plane() and only check for an attached primary plane. Adapt callers. Instead of having one big function to check for various CRTC state conditions, we rather want smaller functions that drivers can pick individually. v5: * rebase on top of udl changes Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221007124338.24152-3-tzimmermann@suse.de drivers/gpu/drm/ast/ast_mode.c | 8 ++--- drivers/gpu/drm/drm_atomic_helper.c | 52 ++++++++++++--------------------- drivers/gpu/drm/drm_simple_kms_helper.c | 6 +++- drivers/gpu/drm/mgag200/mgag200_mode.c | 8 ++--- drivers/gpu/drm/solomon/ssd130x.c | 6 +++- drivers/gpu/drm/tiny/simpledrm.c | 6 +++- drivers/gpu/drm/udl/udl_modeset.c | 5 +++- include/drm/drm_atomic_helper.h | 3 +- 8 files changed, 46 insertions(+), 48 deletions(-) commit dbbf933d365da1a76a540211bee3d57bde520194 Author: Thomas Zimmermann Date: Fri Oct 7 14:43:37 2022 +0200 drm/atomic-helper: Don't allocate new plane state in CRTC check In drm_atomic_helper_check_crtc_state(), do not add a new plane state to the global state if it does not exist already. Adding a new plane state will result in overhead for the plane during the atomic-commit step. For the test in drm_atomic_helper_check_crtc_state() to succeed, it is important that the CRTC has an enabled primary plane after the commit. Simply testing the CRTC state's plane_mask for a primary plane is sufficient. Note that the helper still only tests for an attached primary plane. Drivers have to ensure that the plane contains valid pixel information. v5: * fix commit description (Javier) v3: * test for a primary plane in plane_mask (Ville) v2: * remove unnecessary test for plane->crtc (Ville) * inline drm_atomic_get_next_plane_state() (Ville) * acquire plane lock before accessing plane->state (Ville) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Fixes: d6b9af1097fe ("drm/atomic-helper: Add helper drm_atomic_helper_check_crtc_state()") Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20221007124338.24152-2-tzimmermann@suse.de drivers/gpu/drm/drm_atomic_helper.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 599cc77efae7e4dc5700be2f422dac331e7b4d06 Author: Ville Syrjälä Date: Wed Jun 22 18:54:51 2022 +0300 drm/i915: Write watermarks for disabled pipes on gmch platforms We've excluded gmch platforms from writing the final watermarks for any disabled pipe. IIRC the reason was perhaps some lingering issue with the watermark merging across the pipes. But I can't really see any reason for this anymore, so let's unify this behaviour. The main benefit being more consistency in register dumps when we don't have stale watermarks hanging around in the registers. Functionally there should be no difference as the hardware just ignore all of it when the pipe is disabled. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220622155452.32587-9-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy drivers/gpu/drm/i915/display/intel_display.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit eadbd867177e1d72b2ff71b7ba0dffcae4dabc64 Author: Ville Syrjälä Date: Wed Jun 22 18:54:50 2022 +0300 drm/i915: Fix pipe gamma enable/disable vs. CxSR on gmch platforms Like most other plane control register bits, the pipe gamma enable bit is also blocked by CxSR. So make sure we kick the machine out of CxSR before trying to change that bit. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220622155452.32587-8-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy drivers/gpu/drm/i915/display/intel_color.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8c45f31c320d0a49e5cd8621db07e4b3701c52a7 Author: Ville Syrjälä Date: Wed Jun 22 18:54:49 2022 +0300 drm/i915: Fix g4x/vlv/chv CxSR vs. format/tiling/rotation changes On g4x/vlv/chv the hardware seems incapable of changing the pixel format, rotation, or YUV->RGB CSC matrix while in CxSR. Additionally on VLV/CHV the sprites seem incapable of tiling changes while in CxSR. On g4x CxSR is not even possible with the sprite enabled. Curiously the primary plane seems perfectly happy when changing tiling during CxSR. Pimp up the code to account for these when determining whether CxSR needs to be disabled. Since it looks like most of the plane control register bits are affected let's just compare that. But in the name of efficiency we'll make an exception for the primary plane tiling changes (avoids some extra vblank waits). v2: Just use the pre-computed plane control register values Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220622155452.32587-7-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy drivers/gpu/drm/i915/display/intel_atomic_plane.c | 53 +++++++++++++++++++---- 1 file changed, 45 insertions(+), 8 deletions(-) commit a2b1d9ecaa755c4795a84a046b075bbf351cd6af Author: Ville Syrjälä Date: Tue Oct 4 18:09:29 2022 +0300 drm/i915: Clean up some namespacing Rename a few functions from intel_crtc_foo_init() to intel_foo_crtc_init() so that the namespaec clearly indicates what feature/file we're talking about. I left out intel_crtc_crc_init() because the whole crc stuff uses intel_crtc_ as its namespace currently. Suggested-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221004150929.23910-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_color.c | 2 +- drivers/gpu/drm/i915/display/intel_color.h | 2 +- drivers/gpu/drm/i915/display/intel_crtc.c | 4 ++-- drivers/gpu/drm/i915/display/intel_drrs.c | 4 ++-- drivers/gpu/drm/i915/display/intel_drrs.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit 2e30960097f6bc1a0dff89c0bcbc4138e3506d7c Author: Jie Meng Date: Wed Oct 5 10:00:39 2022 -0700 bpf, x64: Remove unnecessary check on existence of SSE2 SSE2 and hence lfence are architectural in x86-64 and no need to check whether they're supported in CPU. SSE2's CPUID flag is still set to maintain backward compatibility with older code or code shared with x86, but bpf_jit_comp.c is compiled under x86-64 exclusively so the check is redundant. Signed-off-by: Jie Meng Signed-off-by: Daniel Borkmann Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20221005170039.3936894-1-jmeng@fb.com arch/x86/net/bpf_jit_comp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0ff57171d6d225558c81a69439d5323e35b40549 Author: Vinayak Yadawad Date: Wed Sep 7 18:14:48 2022 +0530 cfg80211: Update Transition Disable policy during port authorization In case of 4way handshake offload, transition disable policy updated by the AP during EAPOL 3/4 is not updated to the upper layer. This results in mismatch between transition disable policy between the upper layer and the driver. This patch addresses this issue by updating transition disable policy as part of port authorization indication. Signed-off-by: Vinayak Yadawad Signed-off-by: Johannes Berg drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- include/net/cfg80211.h | 4 +++- include/uapi/linux/nl80211.h | 3 +++ net/wireless/core.h | 5 ++++- net/wireless/nl80211.c | 8 +++++++- net/wireless/nl80211.h | 3 ++- net/wireless/sme.c | 12 ++++++++---- net/wireless/util.c | 4 +++- 8 files changed, 31 insertions(+), 10 deletions(-) commit 4857ed9385fbd25060051cc42a93c3074de2f4dd Author: Peter Seiderer Date: Thu Sep 15 21:52:43 2022 +0200 wifi: mac80211: minstrel_ht: remove unused has_mrr member from struct minstrel_priv Remove unused has_mrr (has multi-rate retry capabilities) member from struct minstrel_priv (only set once in minstrel_ht_alloc, never used again). Signed-off-by: Peter Seiderer Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel_ht.c | 3 --- net/mac80211/rc80211_minstrel_ht.h | 1 - 2 files changed, 4 deletions(-) commit 9d13aff91ecd3f077b432df35291c945bde585be Author: Johannes Berg Date: Wed Oct 5 14:08:41 2022 +0200 wifi: mac80211: fix ifdef symbol name This should of course be CONFIG_, not CPTCFG_, which is an artifact from working with backports. Fixes: 9dd1953846c7 ("wifi: nl80211/mac80211: clarify link ID in control port TX") Signed-off-by: Johannes Berg net/mac80211/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8d0b807b4a223ae499d43e4baa6c45f946f42d5 Author: Johannes Berg Date: Fri Sep 30 13:24:11 2022 +0200 wifi: mac80211: remove support for AddBA with fragmentation HE added support for dynamic fragmentation inside aggregation sessions, but no existing driver ever advertises it. Thus, remove the code for now, it cannot work as-is in MLO. For it to properly work in MLO, we'd need to validate that the frag level is identical across all the link bands/iftypes, which is a good amount of complex code that's just not worth it as long as no driver has support for it. Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 2e82be13c6a33cb8befd557f168c92fb363107df Author: Johannes Berg Date: Mon Sep 19 19:01:19 2022 +0200 wifi: mac80211: agg-rx: avoid band check If the deflink of the station is on 6 GHz, then it won't have HT. If at the same time we're using MLO, then vif.bss_conf isn't used, and thus vif.bss_conf.chandef.chan is NULL, causing the code to crash. Fix this by just checking for both HT and HE, and refusing the aggregation session if both are not present. This might be a bit wrong since it would accept an aggregation session from a peer that has HE but no HT on 2.4 or 5 GHz, but such a peer shouldn't exist in the first place, and it probably supports aggregation if it has HE support. Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69e0d04e2b0b3a6ffdd2794eb65b3daf6ae5cbf7 Author: Johannes Berg Date: Fri Sep 30 12:54:30 2022 +0200 wifi: mac80211: prohibit IEEE80211_HT_CAP_DELAY_BA with MLO This won't work right at least with the code as it is, so at least for now just assume it's never set for MLO. It may very well never change, almost no drivers support it. Signed-off-by: Johannes Berg net/mac80211/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit cb04b5ef855c210a6e8e3e64fae9e2da9100f72e Author: Johannes Berg Date: Thu Sep 15 14:57:47 2022 +0200 wifi: mac80211: don't clear DTIM period after setting it Fix the code that sets the DTIM period to always propagate it into link->conf->dtim_period and not overwrite it, while still preferring to set it from the beacon data if available. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit e406121e1860e7789ebfa0e1b6853e48dde8b879 Author: Johannes Berg Date: Mon Sep 19 19:19:30 2022 +0200 wifi: mac80211: change AddBA deny error message If the station has no HT, we deny the aggregation session but the error message talks about QoS; change it to say HT instead. Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a693ce0033707a49e951769cc230ef870ff76a8 Author: Johannes Berg Date: Tue Sep 20 22:43:53 2022 +0200 wifi: mac80211: mlme: mark assoc link in output It's useful to know which link was used for the association, mark it when printing the links. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 85176a3fcd9748558cff72d4cdff5465b8732282 Author: Johannes Berg Date: Wed Sep 21 23:01:46 2022 +0200 wifi: mac80211: check link ID in auth/assoc continuation Ensure that the link ID matches in auth/assoc continuation, otherwise we need to reset all the data. Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 1 + net/mac80211/mlme.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 78a6a43aaf87180ec7425a2a90468e1b4d09a1ec Author: Johannes Berg Date: Wed Sep 21 02:44:58 2022 +0200 wifi: mac80211: mlme: fix null-ptr deref on failed assoc If association to an AP without a link 0 fails, then we crash in tracing because it assumes that either ap_mld_addr or link 0 BSS is valid, since we clear sdata->vif.valid_links and then don't add the ap_mld_addr to the struct. Since we clear also sdata->vif.cfg.ap_addr, keep a local copy of it and assign it earlier, before clearing valid_links, to fix this. Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Johannes Berg net/mac80211/mlme.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1177aaa7fe9373c762cd5bf5f5de8517bac989d5 Author: Johannes Berg Date: Sat Sep 17 03:14:53 2022 +0200 wifi: fix multi-link element subelement iteration The subelements obviously start after the common data, including the common multi-link element structure definition itself. This bug was possibly just hidden by the higher bits of the control being set to 0, so the iteration just found one bogus element and most of the code could continue anyway. Fixes: 0f48b8b88aa9 ("wifi: ieee80211: add definitions for multi-link element") Signed-off-by: Johannes Berg include/linux/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3630c4f82ae43682bf84e6ddcbd7e97285d4699 Author: Johannes Berg Date: Tue Sep 27 11:39:23 2022 +0200 wifi: mac80211: add RCU _check() link access variants We might sometimes need to use RCU and locking in the same code path, so add the two variants link_conf_dereference_check() and link_sta_dereference_check(). Signed-off-by: Johannes Berg include/net/mac80211.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3903963ed93dda7923144fd8b25fdfe0c3fd7437 Author: Johannes Berg Date: Fri Sep 16 19:15:52 2022 +0200 wifi: mac80211: fix AddBA response addressing Since this frame is addressed from/to an MLD, it should be built with the correct AP MLD address (in station mode) to be encrypted properly. Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9beed8de806644b59729d862e66e8a4eef894fa8 Author: Johannes Berg Date: Mon Sep 26 15:45:04 2022 +0200 wifi: mac80211: set internal scan request BSSID If any driver relies entirely on the scan request BSSID, then that would be wrong for internal scans. Initialize it to the broadcast address since we don't otherwise use the field. Signed-off-by: Johannes Berg net/mac80211/main.c | 2 ++ 1 file changed, 2 insertions(+) commit 0143ea09b63d58ed3e19ffdfc444cc23d8d877b6 Author: Haim Dreyfuss Date: Sun Sep 11 22:01:42 2022 +0300 wifi: mac80211: advertise TWT requester only with HW support Currently, we rely only on the AP capability. If the AP supports TWT responder we will advertise TWT requester even if the driver or HW doesn't support it. Fix this by checking the HW capability. Signed-off-by: Haim Dreyfuss Signed-off-by: Johannes Berg net/mac80211/mlme.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit 9a886df0c36928039fc760eb8129c1d7f4bc418e Author: Johannes Berg Date: Tue Sep 6 22:42:25 2022 +0200 wifi: mac80211: use link_id in ieee80211_change_bss() We should set the parameters here per link, except unfortunately ap_isolate, but we can't really change that anymore so it'll remain a quirk in the API in that you need to change it on one of the valid links and it'll apply to all. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit 1e0f8cc96b7162075d2e3b6bef856497884a3ae8 Author: Johannes Berg Date: Tue Sep 6 22:37:03 2022 +0200 wifi: nl80211: use link ID in NL80211_CMD_SET_BSS We clearly need the link ID here, to know the right BSS to configure. Use/require it. Signed-off-by: Johannes Berg include/net/cfg80211.h | 2 ++ net/wireless/nl80211.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) commit f7ee304111584b1822c960b0b5e7ebbe3d4e406b Author: Johannes Berg Date: Tue Sep 6 22:25:50 2022 +0200 wifi: mac80211: transmit AddBA with MLD address This management frame is intended for the MLD so we treat it in mac80211 as MLD addressed as well, and should therefore use the MLD address of the AP for the BSSID field in the frame, address translation applies. Signed-off-by: Johannes Berg net/mac80211/agg-tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d5e6171493695e962592657430a749f9f0d0728 Author: Johannes Berg Date: Tue Sep 6 22:18:19 2022 +0200 wifi: mac80211: wme: use ap_addr instead of deflink BSSID We use this to look up the destination station, so it needs to be the MLD address of the AP for an MLO; use ap_addr instead of the BSSID. Signed-off-by: Johannes Berg net/mac80211/wme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2d052a3c41aa7815714a18911819efde0d7d384 Author: Ilan Peer Date: Thu Sep 8 11:31:10 2022 +0300 wifi: mac80211: Process association status for affiliated links In case the AP returned a non success status for one of the links, do not activate the link. Signed-off-by: Ilan Peer Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/mlme.c | 40 +++++++++++++++++++++++++++++++++++----- 2 files changed, 37 insertions(+), 5 deletions(-) commit 45ebac4f059b92906e7e86dd1a780739f883857c Author: Ilan Peer Date: Tue Sep 6 11:48:56 2022 +0300 wifi: mac80211: Parse station profile from association response When processing an association response frame for a Multi-Link connection, extract the per station profile for each additional link, and use it for parsing the link elements. As the Multi-Link element might be fragmented, add support for reassembling a fragmented element. To simplify memory management logic, extend 'struct ieee802_11_elems' to hold a scratch buffer, which is used for the defragmentation. Once an element is reconstructed in the scratch area, point the corresponding element pointer to it. Currently only defragmentation of Multi-Link element and the contained per-STA profile subelement is supported. Signed-off-by: Ilan Peer Signed-off-by: Johannes Berg include/linux/ieee80211.h | 1 + net/mac80211/ieee80211_i.h | 26 +++++++- net/mac80211/mlme.c | 17 ++++- net/mac80211/util.c | 150 ++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 188 insertions(+), 6 deletions(-) commit fb99c7d4d6d0fb4fe5a953e0c5f6c37a5b796b98 Author: Ilan Peer Date: Sun Sep 11 16:55:12 2022 +0300 wifi: cfg80211/mac80211: Fix ML element common size validation The Multi-Link element can be fragmented, thus its size can exceed 254. Thus, modify ieee80211_mle_size_ok() to use 'size_t len' instead of 'u8 len'. Signed-off-by: Ilan Peer Signed-off-by: Johannes Berg include/linux/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1403b109c9a5244dc6ab79154f04eecc209ef3d2 Author: Ilan Peer Date: Wed Sep 7 17:23:09 2022 +0300 wifi: cfg80211/mac80211: Fix ML element common size calculation The common size is part of the length in the data so don't add it again. Signed-off-by: Ilan Peer Signed-off-by: Johannes Berg include/linux/ieee80211.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 7b6f08771bf6045c32a2a1e18201c1aeeb78d72a Author: Ilan Peer Date: Wed Sep 7 10:34:30 2022 +0300 wifi: ieee80211: Support validating ML station profile length Add a function to validate EHT Multi-Link per station profile length. Signed-off-by: Ilan Peer Signed-off-by: Johannes Berg include/linux/ieee80211.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 53ad07e9823bca10c26e71d662b58c3e80e8ff2a Author: Johannes Berg Date: Tue Sep 6 11:27:57 2022 +0200 wifi: cfg80211: support reporting failed links For assoc and connect result APIs, support reporting failed links; they should still come with the BSS pointer in the case of assoc, so they're released correctly. In the case of connect result, this is optional. Signed-off-by: Johannes Berg include/net/cfg80211.h | 7 +++++++ net/wireless/mlme.c | 4 ++++ net/wireless/nl80211.c | 5 ++++- net/wireless/sme.c | 14 ++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) commit 9b41a9d7dca0159723172a47097b3f2352e37e44 Author: Johannes Berg Date: Wed Oct 5 13:52:26 2022 +0200 wifi: mac80211: recalc station aggregate data during link switch During link switching, the active links change, so we need to recalculate the aggregate data in the stations. Signed-off-by: Johannes Berg net/mac80211/link.c | 17 +++++++++++++++++ net/mac80211/sta_info.c | 33 ++++++++++++++++++++++++--------- net/mac80211/sta_info.h | 2 ++ 3 files changed, 43 insertions(+), 9 deletions(-) commit c2b6b1c13e17cdef76e01349f4aa6f035cfad063 Author: Benjamin Berg Date: Tue Sep 6 17:24:10 2022 +0200 wifi: mac80211: include link address in debugfs Add the link address to the per-link information, but only if we are using MLO. Signed-off-by: Benjamin Berg Signed-off-by: Johannes Berg net/mac80211/debugfs_sta.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit d2caad527c191563116809990081ab4fc0dafdb6 Author: Benjamin Berg Date: Tue Sep 6 14:26:52 2022 +0200 wifi: mac80211: add API to show the link STAs in debugfs Create debugfs data per-link. For drivers, there is a new operation link_sta_add_debugfs which will always be called. For non-MLO, the station directory will be used directly rather than creating a corresponding subdirectory. As such, non-MLO drivers can simply continue to create the data from sta_debugfs_add. Signed-off-by: Benjamin Berg [add missing inlines if !CONFIG_MAC80211_DEBUGFS] Signed-off-by: Johannes Berg include/net/mac80211.h | 11 ++++ net/mac80211/debugfs_sta.c | 127 +++++++++++++++++++++++++++++++++++++-------- net/mac80211/debugfs_sta.h | 12 +++++ net/mac80211/driver-ops.c | 27 +++++++++- net/mac80211/driver-ops.h | 16 ++++++ net/mac80211/sta_info.c | 25 +++++++++ net/mac80211/sta_info.h | 5 ++ 7 files changed, 200 insertions(+), 23 deletions(-) commit 1d9e4c91db17c9bf6f94ac234a4d4f2bffd52b97 Author: Benjamin Berg Date: Tue Sep 6 19:02:04 2022 +0200 wifi: mac80211: add pointer from link STA to STA While often not needed, this considerably simplifies going from a link to the STA. This helps in cases such as debugfs where a single pointer should allow accessing a specific link and the STA. Signed-off-by: Benjamin Berg Signed-off-by: Johannes Berg include/net/mac80211.h | 3 +++ net/mac80211/sta_info.c | 1 + 2 files changed, 4 insertions(+) commit 1b8db07f233a2acc0053a18960a742f354b78436 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:55 2022 +0200 drm/udl: Add constants for commands Add constants for the various commands that the driver can send to the device and update the respective helper functions. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-17-tzimmermann@suse.de drivers/gpu/drm/udl/udl_drv.h | 10 ---------- drivers/gpu/drm/udl/udl_modeset.c | 16 +++++++++------- drivers/gpu/drm/udl/udl_proto.h | 15 +++++++++++++++ drivers/gpu/drm/udl/udl_transfer.c | 7 ++++--- 4 files changed, 28 insertions(+), 20 deletions(-) commit 44f29ad9a4d3131afbc616ad15e4bdf4586cf9a0 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:54 2022 +0200 drm/udl: Add register constants for framebuffer scanout addresses Add register constants for the framebuffer scanout addresses and update the related helper functions. No functional changes. v2: * extract address bytes with helper macros (Javier) * fix comments Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-16-tzimmermann@suse.de drivers/gpu/drm/udl/udl_modeset.c | 33 ++++++++++++++++++++++++--------- drivers/gpu/drm/udl/udl_proto.h | 14 ++++++++++++++ 2 files changed, 38 insertions(+), 9 deletions(-) commit cb7b995dcb20d1ab16f41498c65d8f395f095896 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:53 2022 +0200 drm/udl: Add register constants for video locks Add register constants for the video lock. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-15-tzimmermann@suse.de drivers/gpu/drm/udl/udl_modeset.c | 4 ++-- drivers/gpu/drm/udl/udl_proto.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit ed24ed48be13fb8a866862f371614d546172cf6f Author: Thomas Zimmermann Date: Thu Oct 6 11:53:52 2022 +0200 drm/udl: Add register constants for color depth Add the register constants for setting the color depth. The driver only uses 16bpp. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-14-tzimmermann@suse.de drivers/gpu/drm/udl/udl_modeset.c | 2 +- drivers/gpu/drm/udl/udl_proto.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 9869e40df1a72eede80b4816d6e522e57a6fd97b Author: Thomas Zimmermann Date: Thu Oct 6 11:53:51 2022 +0200 drm/udl: Add constants for display-mode registers Add constants for the registers the contain various display-mode parameters and update the mode-setting function. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-13-tzimmermann@suse.de drivers/gpu/drm/udl/udl_modeset.c | 102 ++++++++++++-------------------------- drivers/gpu/drm/udl/udl_proto.h | 15 ++++++ 2 files changed, 47 insertions(+), 70 deletions(-) commit ff76e82c05a5d35994c2452ac4dcbd2bdd467204 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:50 2022 +0200 drm/udl: Move register constants to udl_proto.h Move the existing register constants to a new file in preparation of adding more of them. Renaming is intentional. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-12-tzimmermann@suse.de drivers/gpu/drm/udl/udl_drv.h | 9 --------- drivers/gpu/drm/udl/udl_modeset.c | 11 +++++------ drivers/gpu/drm/udl/udl_proto.h | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 15 deletions(-) commit fcc21447c79816b40feddfc707006e9c72f3445e Author: Thomas Zimmermann Date: Thu Oct 6 11:53:49 2022 +0200 drm/udl: Use damage iterator Use a damage iterator to process damage areas individually. Merging damage areas can result in large updates of unchanged framebuffer regions. As USB is rather slow, it's better to process damage areas individually and hence minimize USB-transfered data. As part of the change, move drm_gem_fb_{begin,end}_cpu_access() into the plane's atomic_update helper. To avoid overhead and intermediate writers, we want to synchronize buffers and reserve access only once before copying damage areas of the framebuffer. v2: * clarify commit message (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-11-tzimmermann@suse.de drivers/gpu/drm/udl/udl_modeset.c | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit ca2bd373eb6632d5c37323755030fea6364937d0 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:48 2022 +0200 drm/udl: Support DRM hot-unplugging Add drm_dev_enter() and drm_dev_exit() to the various modesetting functions that interact with the device. After hot-unplugging the device, these functions will return early. So far, the udl driver relied on USB interfaces to handle unplugging of the device. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-10-tzimmermann@suse.de drivers/gpu/drm/udl/udl_modeset.c | 43 +++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) commit 890e4de83898c9f34623f67b2129edfc37277ca3 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:47 2022 +0200 drm/udl: Simplify modesetting in CRTC's enable function Inline a modesetting helper in the CRTC's enable function. Build the command set directly in the USB URB's buffer and drop an intermediate buffer. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-9-tzimmermann@suse.de drivers/gpu/drm/udl/udl_drv.h | 3 -- drivers/gpu/drm/udl/udl_modeset.c | 61 +++++++++------------------------------ 2 files changed, 14 insertions(+), 50 deletions(-) commit 72d73dd3a95c7e879c18a0eae8fd2af89b5b3347 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:46 2022 +0200 drm/udl: Convert to atomic-modesetting helpers Replace simple-KMS helpers with regular atomic-modesetting helpers. The simple-KMS helpers introduce a mid-layer abstraction without added functionality. Using regular atomic helpers makes the driver's implementation more discoverable and simplifies code sharing. The conversion effectively open-codes the simple-KMS functions and data structure within udl. No functional changes. v2: * don't use the atomic_disable plane helper Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-8-tzimmermann@suse.de drivers/gpu/drm/udl/udl_drv.h | 9 ++- drivers/gpu/drm/udl/udl_modeset.c | 157 +++++++++++++++++++++++++------------- 2 files changed, 112 insertions(+), 54 deletions(-) commit efaa418fd75ebe8dbca57fd10a003910e46fc5a3 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:45 2022 +0200 drm/udl: Remove udl_simple_display_pipe_mode_valid() Remove the empty function udl_simple_display_pipe_mode_valid() and let simple-KMS helpers accept the modes. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-7-tzimmermann@suse.de drivers/gpu/drm/udl/udl_modeset.c | 8 -------- 1 file changed, 8 deletions(-) commit 0862cfd3e22f3f936927f2f7381c2519ba034c6e Author: Thomas Zimmermann Date: Thu Oct 6 11:53:44 2022 +0200 drm/udl: Move connector to modesetting code Move the connector next to the rest of the modesetting code. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-6-tzimmermann@suse.de drivers/gpu/drm/udl/Makefile | 2 +- drivers/gpu/drm/udl/udl_connector.c | 132 ------------------------------------ drivers/gpu/drm/udl/udl_connector.h | 21 ------ drivers/gpu/drm/udl/udl_drv.h | 11 +++ drivers/gpu/drm/udl/udl_modeset.c | 122 +++++++++++++++++++++++++++++++++ 5 files changed, 134 insertions(+), 154 deletions(-) commit 43858eb41e0dde6e48565c13cdabac95b5d9df90 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:43 2022 +0200 drm/udl: Various improvements to the connector Add style fixes, better error handling and reporting, and minor clean-up changes to the connector code before moving the code to the rest of the modesetting pipeline. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-5-tzimmermann@suse.de drivers/gpu/drm/udl/udl_connector.c | 64 +++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 24 deletions(-) commit 2c1eafc40e53312864bf2fdccb55052dcbd9e8b2 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:42 2022 +0200 drm/udl: Use USB timeout constant when reading EDID Set the USB control-message timeout to the USB default of 5 seconds. Done for consistency with other uses of usb_control_msg() in udl and other drivers. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-4-tzimmermann@suse.de drivers/gpu/drm/udl/udl_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c020f66013b6136a68a3a4ad74cc7af3b3310586 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:41 2022 +0200 drm/udl: Test pixel limit in mode-config's mode-valid function The sku_pixel_limit is a per-device property, similar to the amount of available video memory. Move the respective mode-valid test from the connector to the mode-config structure. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-3-tzimmermann@suse.de drivers/gpu/drm/udl/udl_connector.c | 14 -------------- drivers/gpu/drm/udl/udl_modeset.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) commit 59a811faa74f4326fe2d48d2b334c0ee95922628 Author: Thomas Zimmermann Date: Thu Oct 6 11:53:40 2022 +0200 drm/udl: Rename struct udl_drm_connector to struct udl_connector Remove the _drm_ infix from struct udl_drm_connector and introduce a macro for upcasting from struct drm_connector. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-2-tzimmermann@suse.de drivers/gpu/drm/udl/udl_connector.c | 19 +++++-------------- drivers/gpu/drm/udl/udl_connector.h | 10 ++++++++-- 2 files changed, 13 insertions(+), 16 deletions(-) commit 1d2d941bc140b34587b4c889699fb0f89d29937f Author: Jiri Olsa Date: Thu Oct 6 10:31:06 2022 +0200 selftests/bpf: Add missing bpf_iter_vma_offset__destroy call Adding missing bpf_iter_vma_offset__destroy call and using in-skeletin link pointer so we don't need extra bpf_link__destroy call. Fixes: b3e1331eb925 ("selftests/bpf: Test parameterized task BPF iterators.") Cc: Kui-Feng Lee Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20221006083106.117987-1-jolsa@kernel.org Signed-off-by: Martin KaFai Lau tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 43d3f3b94efc134317d40ec7c69ae1180ed5ac9c Author: Lucas Stach Date: Fri Sep 9 11:30:00 2022 +0200 drm/fourcc: add Vivante tile status modifiers The tile status modifiers can be combined with all of the usual color buffer modifiers. When they are present an additional plane is added to the surfaces to share the tile status buffer. The TS modifiers describe the interpretation of the tag bits in this buffer. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Reviewed-by: Guido Günther Link: https://patchwork.freedesktop.org/patch/msgid/20220909093000.3458413-1-l.stach@pengutronix.de include/uapi/drm/drm_fourcc.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 8206e4e95230daeeba43c59fc7c39656883ecd62 Author: Yonghong Song Date: Wed Oct 5 22:34:29 2022 -0700 selftests/bpf: Add selftest deny_namespace to s390x deny list BPF CI reported that selftest deny_namespace failed with s390x. test_unpriv_userns_create_no_bpf:PASS:no-bpf unpriv new user ns 0 nsec test_deny_namespace:PASS:skel load 0 nsec libbpf: prog 'test_userns_create': failed to attach: ERROR: strerror_r(-524)=22 libbpf: prog 'test_userns_create': failed to auto-attach: -524 test_deny_namespace:FAIL:attach unexpected error: -524 (errno 524) #57/1 deny_namespace/unpriv_userns_create_no_bpf:FAIL #57 deny_namespace:FAIL BPF program test_userns_create is a BPF LSM type program which is based on trampoline and s390x does not support s390x. Let add the test to x390x deny list to avoid this failure in BPF CI. Signed-off-by: Yonghong Song Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20221006053429.3549165-1-yhs@fb.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/DENYLIST.s390x | 1 + 1 file changed, 1 insertion(+) commit ce3e44a09dce74ca68fa56c23333378d936969b0 Author: Andrii Nakryiko Date: Wed Oct 5 21:24:52 2022 -0700 scripts/bpf_doc.py: update logic to not assume sequential enum values Relax bpf_doc.py's expectation of all BPF_FUNC_xxx enumerators having sequential values increasing by one. Instead, only make sure that relative order of BPF helper descriptions in comments matches enumerators definitions order. Also additionally make sure that helper IDs are not duplicated. And also make sure that for cases when we have multiple descriptions for the same BPF helper (e.g., for bpf_get_socket_cookie()), all such descriptions are grouped together. Such checks should capture all the same (and more) issues in upstream UAPI headers, but also handle backported kernels correctly. Reported-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20221006042452.2089843-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov scripts/bpf_doc.py | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) commit 8a76145a2ec2a81dfe34d7ac42e8c242f095e8c8 Author: Andrii Nakryiko Date: Wed Oct 5 21:24:51 2022 -0700 bpf: explicitly define BPF_FUNC_xxx integer values Historically enum bpf_func_id's BPF_FUNC_xxx enumerators relied on implicit sequential values being assigned by compiler. This is convenient, as new BPF helpers are always added at the very end, but it also has its downsides, some of them being: - with over 200 helpers now it's very hard to know what's each helper's ID, which is often important to know when working with BPF assembly (e.g., by dumping raw bpf assembly instructions with llvm-objdump -d command). it's possible to work around this by looking into vmlinux.h, dumping /sys/btf/kernel/vmlinux, looking at libbpf-provided bpf_helper_defs.h, etc. But it always feels like an unnecessary step and one should be able to quickly figure this out from UAPI header. - when backporting and cherry-picking only some BPF helpers onto older kernels it's important to be able to skip some enum values for helpers that weren't backported, but preserve absolute integer IDs to keep BPF helper IDs stable so that BPF programs stay portable across upstream and backported kernels. While neither problem is insurmountable, they come up frequently enough and are annoying enough to warrant improving the situation. And for the backporting the problem can easily go unnoticed for a while, especially if backport is done with people not very familiar with BPF subsystem overall. Anyways, it's easy to fix this by making sure that __BPF_FUNC_MAPPER macro provides explicit helper IDs. Unfortunately that would potentially break existing users that use UAPI-exposed __BPF_FUNC_MAPPER and are expected to pass macro that accepts only symbolic helper identifier (e.g., map_lookup_elem for bpf_map_lookup_elem() helper). As such, we need to introduce a new macro (___BPF_FUNC_MAPPER) which would specify both identifier and integer ID, but in such a way as to allow existing __BPF_FUNC_MAPPER be expressed in terms of new ___BPF_FUNC_MAPPER macro. And that's what this patch is doing. To avoid duplication and allow __BPF_FUNC_MAPPER stay *exactly* the same, ___BPF_FUNC_MAPPER accepts arbitrary "context" arguments, which can be used to pass any extra macros, arguments, and whatnot. In our case we use this to pass original user-provided macro that expects single argument and __BPF_FUNC_MAPPER is using it's own three-argument __BPF_FUNC_MAPPER_APPLY intermediate macro to impedance-match new and old "callback" macros. Once we resolve this, we use new ___BPF_FUNC_MAPPER to define enum bpf_func_id with explicit values. The other users of __BPF_FUNC_MAPPER in kernel (namely in kernel/bpf/disasm.c) are kept exactly the same both as demonstration that backwards compat works, but also to avoid unnecessary code churn. Note that new ___BPF_FUNC_MAPPER() doesn't forcefully insert comma between values, as that might not be appropriate in all possible cases where ___BPF_FUNC_MAPPER might be used by users. This doesn't reduce usability, as it's trivial to insert that comma inside "callback" macro. To validate all the manually specified IDs are exactly right, we used BTF to compare before and after values: $ bpftool btf dump file ~/linux-build/default/vmlinux | rg bpf_func_id -A 211 > after.txt $ git stash # stach UAPI changes $ make -j90 ... re-building kernel without UAPI changes ... $ bpftool btf dump file ~/linux-build/default/vmlinux | rg bpf_func_id -A 211 > before.txt $ diff -u before.txt after.txt --- before.txt 2022-10-05 10:48:18.119195916 -0700 +++ after.txt 2022-10-05 10:46:49.446615025 -0700 @@ -1,4 +1,4 @@ -[14576] ENUM 'bpf_func_id' encoding=UNSIGNED size=4 vlen=211 +[9560] ENUM 'bpf_func_id' encoding=UNSIGNED size=4 vlen=211 'BPF_FUNC_unspec' val=0 'BPF_FUNC_map_lookup_elem' val=1 'BPF_FUNC_map_update_elem' val=2 As can be seen from diff above, the only thing that changed was resulting BTF type ID of ENUM bpf_func_id, not any of the enumerators, their names or integer values. The only other place that needed fixing was scripts/bpf_doc.py used to generate man pages and bpf_helper_defs.h header for libbpf and selftests. That script is tightly-coupled to exact shape of ___BPF_FUNC_MAPPER macro definition, so had to be trivially adapted. Cc: Quentin Monnet Reported-by: Andrea Terzolo Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Acked-by: Jiri Olsa Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20221006042452.2089843-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov include/uapi/linux/bpf.h | 432 +++++++++++++++++++++-------------------- scripts/bpf_doc.py | 19 +- tools/include/uapi/linux/bpf.h | 432 +++++++++++++++++++++-------------------- 3 files changed, 447 insertions(+), 436 deletions(-) commit 0da9493e841b92fc08c2d73612a9b0be285a1be0 Author: Matthew Auld Date: Wed Oct 5 16:31:48 2022 +0100 drm/i915: restore stolen memory behaviour for DG2 Restore the previous behaviour here where we compare the pci_resource_len() with the actual lmem_size, and not the dsm size, since dsm here is just some subset snipped off the end of the lmem. Otherwise we will incorrectly report an io_size > 0 on small-bar systems. It doesn't looks like MTL is expecting small-bar with its stolen memory, based on: GEM_BUG_ON(pci_resource_len(pdev, GEN12_LMEM_BAR) != SZ_256M) GEM_BUG_ON((dsm_size + SZ_8M) > lmem_size) So just move the HAS_BAR2_SMEM_STOLEN() check first, which then ignores the small bar part, and we can go back to checking lmem_size against the BAR size. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7007 Fixes: dbb2ffbfd708 ("drm/i915/mtl: enable local stolen memory") Signed-off-by: Matthew Auld Cc: Aravind Iddamsetty Cc: Lucas De Marchi Cc: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221005153148.758822-2-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 49d1310a76dd6ae7b4a2cd27732d46fe58aa8177 Author: Matthew Auld Date: Wed Oct 5 16:31:47 2022 +0100 drm/i915: add back GEN12_BDSM_MASK The mask was added in commit e5f415bfc5c2 ("drm/i915: Add missing mask when reading GEN12_DSMBASE"), but then looks to be dropped in some unrelated code movement in commit dbb2ffbfd708 ("drm/i915/mtl: enable local stolen memory") without explanation. Add it back. Fixes: dbb2ffbfd708 ("drm/i915/mtl: enable local stolen memory") Signed-off-by: Matthew Auld Cc: Aravind Iddamsetty Cc: Lucas De Marchi Cc: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221005153148.758822-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf867d6a746c942c8ebf4aed0a28cc13ad796caa Author: Radhakrishna Sripada Date: Tue Oct 4 17:20:13 2022 -0700 drm/i915/mtl: Add MTP ddc pin configuration Meteorlake PCH reuses Alderlake vbt, DE pin mapping. Extend ADL-P pin mapping for Meteorlake. Bspec: 20124 does not have the mapping for MTP. Based on Bspec:49306, 64051, it is concluded that MTP and ADL-P PCH have the same vbt -> DE pin pair mapping. Reviewed-by: Lucas De Marchi Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20221005002534.2966978-1-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/display/intel_bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60df8c4d32d47fa5e91d02811dadcb97a0bd097e Author: Andrii Nakryiko Date: Wed Oct 5 09:14:50 2022 -0700 selftests/bpf: add BPF object fixup step to veristat Add a step to attempt to "fix up" BPF object file to make it possible to successfully load it. E.g., set non-zero size for BPF maps that expect max_entries set, but BPF object file itself doesn't have declarative max_entries values specified. Another issue was with automatic map pinning. Pinning has no effect on BPF verification process itself but can interfere when validating multiple related programs and object files, so veristat disabled all the pinning explicitly. In the future more such fix up heuristics could be added to accommodate common patterns encountered in practice. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221005161450.1064469-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 6df2eb45e378f38ca42776276e7bb5b5078c12cf Author: Andrii Nakryiko Date: Wed Oct 5 09:14:49 2022 -0700 selftests/bpf: avoid reporting +100% difference in veristat for actual 0% In special case when both base and comparison values are 0, veristat currently reports "+0 (+100%)" difference, which is quite confusing. Fix it up to be "+0 (+0%)". Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221005161450.1064469-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/veristat.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 2a72f5951ac6d613216a93ae3e172cabb04aaefc Author: Andrii Nakryiko Date: Wed Oct 5 09:14:48 2022 -0700 selftests/bpf: allow requesting log level 2 in test_verifier Log level 1 on successfully verified programs are basically equivalent to log level 4 (stats-only), so it's useful to be able to request more verbose logs at log level 2. Teach test_verifier to recognize -vv as "very verbose" mode switch and use log level 2 in such mode. Also force verifier stats regradless of -v or -vv, they are very minimal and useful to be always emitted in verbose mode. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221005161450.1064469-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/test_verifier.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit fdd0640b639070efb58226c96cea5861150e8dce Author: Javier Martinez Canillas Date: Fri Sep 30 17:29:44 2022 +0200 drm/ssd130x: Iterate over damage clips instead of using a merged rect The drm_atomic_helper_damage_merged() helper merges all the damage clips into one rectangle. If there are multiple damage clips that aren't close to each other, the resulting rectangle could be quite big. Instead of using that function helper, iterate over all the damage clips and update them one by one. Suggested-by: Jocelyn Falempe Signed-off-by: Javier Martinez Canillas Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220930152944.2584356-1-javierm@redhat.com drivers/gpu/drm/solomon/ssd130x.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit d503f1176b14f722a40ea5110312614982f9a80b Author: Eduard Zingerman Date: Sat Oct 1 13:44:25 2022 +0300 selftests/bpf: Test btf dump for struct with padding only fields Structures with zero regular fields but some padding constitute a special case in btf_dump.c:btf_dump_emit_struct_def with regards to newline before closing '}'. Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221001104425.415768-2-eddyz87@gmail.com tools/testing/selftests/bpf/progs/btf_dump_test_case_padding.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 44a726c3f23cf762ef4ce3c1709aefbcbe97f62c Author: Eduard Zingerman Date: Sat Oct 1 13:44:24 2022 +0300 bpftool: Print newline before '}' for struct with padding only fields btf_dump_emit_struct_def attempts to print empty structures at a single line, e.g. `struct empty {}`. However, it has to account for a case when there are no regular but some padding fields in the struct. In such case `vlen` would be zero, but size would be non-zero. E.g. here is struct bpf_timer from vmlinux.h before this patch: struct bpf_timer { long: 64; long: 64;}; And after this patch: struct bpf_dynptr { long: 64; long: 64; }; Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221001104425.415768-1-eddyz87@gmail.com tools/lib/bpf/btf_dump.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ce7fcf7003865a63983545fd8f84c04deb1b5dfd Author: Jocelyn Falempe Date: Fri Sep 30 11:47:54 2022 +0200 drm/ast: Add Atomic gamma lut support for aspeed The current ast driver only supports legacy gamma interface. This also fixes a Gnome3/Wayland error which incorrectly adds gamma to atomic commit: "Page flip discarded: CRTC property (GAMMA_LUT) not found" I only tested remotely, so I wasn't able to check that it had an effect on the VGA output. But when activating "Night Light" in Gnome, ast_crtc_load_lut() is called. v2: use the same functions as mgag200. handle 16bits color mode. v3: Check gamma_lut size in atomic check. v4: revert 16bits mode, v1 was correct. make sure gamma table are set when primary plane format changes. remove rgb888 format that is not used. Signed-off-by: Jocelyn Falempe Tested-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220930094754.745626-1-jfalempe@redhat.com drivers/gpu/drm/ast/ast_mode.c | 87 +++++++++++++++++++++++++++++++++--------- 1 file changed, 70 insertions(+), 17 deletions(-) commit 562d2dd8702806c636ba81c43b23394b29c60acc Author: Jason Yen Date: Fri Sep 30 12:25:06 2022 +0800 drm/bridge: ps8640: Add software to support aux defer This chip can not handle aux defer if the host directly program its aux registers to access edid/dpcd. So we need let software to handle the aux defer situation. Signed-off-by: Jason Yen Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220930042506.2529522-1-jason.yen@paradetech.corp-partner.google.com drivers/gpu/drm/bridge/parade-ps8640.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 65b698bf400f00ab452d5f27ecad84ab8c826014 Author: Christian König Date: Thu Sep 29 19:53:53 2022 +0200 drm/sched: add missing NULL check in drm_sched_get_cleanup_job v2 Otherwise we would crash if the job is not resubmitted. v2: fix second usage of s_fence->parent as well. Signed-off-by: Christian König Reviewed-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20221004132831.134986-1-christian.koenig@amd.com drivers/gpu/drm/scheduler/sched_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7c022f516fbe2d4b1b4abdd1c4b7687ec81a6ed9 Author: Christian König Date: Tue Sep 27 18:43:03 2022 +0200 drm/scheduler: fix fence ref counting We leaked dependency fences when processes were beeing killed. Additional to that grab a reference to the last scheduled fence. Signed-off-by: Christian König Reviewed-by: Andrey Grodzovsky Link: https://patchwork.freedesktop.org/patch/msgid/20220929180151.139751-1-christian.koenig@amd.com drivers/gpu/drm/scheduler/sched_entity.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7024f80efcce8122fe8db3e0b4c096eb199333eb Author: Matthew Auld Date: Tue Oct 4 14:19:16 2022 +0100 drm/i915: check memory is mappable in read_from_page On small-bar systems we could be given something non-mappable here, which leads to nasty oops. Make this nicer by checking if the resource is mappable or not, and return an error otherwise. v2: drop GEM_BUG_ON(flags & I915_BO_ALLOC_GPU_ONLY) Signed-off-by: Matthew Auld Cc: Jianshui Yu Cc: Ville Syrjälä Cc: Nirmoy Das Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20221004131916.233474-5-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_object.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit e3afc690188be8e4385d13d1b0e7f0ba01caea40 Author: Matthew Auld Date: Tue Oct 4 14:19:15 2022 +0100 drm/i915/display: consider DG2_RC_CCS_CC when migrating buffers For these types of display buffers, we need to able to CPU access some part of the backing memory in prepare_plane_clear_colors(). As a result we need to ensure we always place in the mappable part of lmem, which becomes necessary on small-bar systems. v2(Nirmoy & Ville): - Add some commentary for why we need to CPU access the buffer. - Split out the other changes, so we just consider the display change here. v3: - Handle this in the dpt path. v4(Ville): - Drop the intel_fb_rc_ccs_cc_plane() sanity check in pin_and_fence_fb_obj(), since we can also trigger this on DG1 it seems. Fixes: eb1c535f0d69 ("drm/i915: turn on small BAR support") Reported-by: Jianshui Yu Signed-off-by: Matthew Auld Cc: Ville Syrjälä Cc: Nirmoy Das Reviewed-by: Ville Syrjälä Acked-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20221004131916.233474-4-matthew.auld@intel.com drivers/gpu/drm/i915/display/intel_fb_pin.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 999f4562077208b683f0519e5f1aa1e5c2fd2191 Author: Matthew Auld Date: Tue Oct 4 14:19:14 2022 +0100 drm/i915: allow control over the flags when migrating In the next patch we want to move the object (if the current resource is not compatible), to the mappable part of lmem for some display buffers. Currently that requires being able to unset the I915_BO_ALLOC_GPU_ONLY hint. Signed-off-by: Matthew Auld Cc: Jianshui Yu Cc: Ville Syrjälä Cc: Nirmoy Das Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20221004131916.233474-3-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_object.c | 37 +++++++++++++++++++++++- drivers/gpu/drm/i915/gem/i915_gem_object.h | 4 +++ drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 3 +- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 5 ++-- 4 files changed, 45 insertions(+), 4 deletions(-) commit 5769f64ff09aab23a9045fa13b464fb5070d3fb2 Author: Matthew Auld Date: Tue Oct 4 14:19:13 2022 +0100 drm/i915/display: handle migration for dpt On platforms like DG2, it looks like the dpt path here is missing the migrate-to-lmem step on discrete platforms. v2: - Move the vma_pin() under the for_i915_gem_ww(), otherwise the object can be moved after dropping the lock and then doing the pin. Fixes: 33e7a975103c ("drm/i915/xelpd: First stab at DPT support") Signed-off-by: Matthew Auld Cc: Jianshui Yu Cc: Ville Syrjälä Cc: Nirmoy Das Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221004131916.233474-2-matthew.auld@intel.com drivers/gpu/drm/i915/display/intel_fb_pin.c | 51 +++++++++++++++++++---------- 1 file changed, 33 insertions(+), 18 deletions(-) commit 3bce981f58421a0a111f04f594ad654afff9f95c Author: Matthew Auld Date: Tue Oct 4 14:19:12 2022 +0100 drm/i915: remove the TODO in pin_and_fence_fb_obj The copy is async (if there even is one), but when later updating the GGTT we always sync against the binding, which will in turn sync against any moves. Signed-off-by: Matthew Auld Cc: Jianshui Yu Cc: Ville Syrjälä Cc: Nirmoy Das Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20221004131916.233474-1-matthew.auld@intel.com drivers/gpu/drm/i915/display/intel_fb_pin.c | 1 - 1 file changed, 1 deletion(-) commit 0add082cebac8555ee3972ba768ae5c01db7a498 Author: Tvrtko Ursulin Date: Mon Oct 3 13:16:30 2022 +0100 drm/i915/guc: Fix revocation of non-persistent contexts Patch which added graceful exit for non-persistent contexts missed the fact it is not enough to set the exiting flag on a context and let the backend handle it from there. GuC backend cannot handle it because it runs independently in the firmware and driver might not see the requests ever again. Patch also missed the fact some usages of intel_context_is_banned in the GuC backend needed replacing with newly introduced intel_context_is_schedulable. Fix the first issue by calling into backend revoke when we know this is the last chance to do it. Fix the second issue by replacing intel_context_is_banned with intel_context_is_schedulable, which should always be safe since latter is a superset of the former. v2: * Just call ce->ops->revoke unconditionally. (Andrzej) Signed-off-by: Tvrtko Ursulin Fixes: 45c64ecf97ee ("drm/i915: Improve user experience and driver robustness under SIGINT or similar") Cc: Andrzej Hajda Cc: John Harrison Cc: Daniele Ceraolo Spurio Cc: # v6.0+ Reviewed-by: Andrzej Hajda Acked-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221003121630.694249-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gem/i915_gem_context.c | 8 +------ drivers/gpu/drm/i915/gt/intel_context.c | 5 ++--- drivers/gpu/drm/i915/gt/intel_context.h | 3 +-- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 26 +++++++++++------------ 4 files changed, 17 insertions(+), 25 deletions(-) commit 8af9d4068e86dd5c3221ee495ec09537c7fb458b Author: Kees Cook Date: Sat Oct 1 20:24:28 2022 -0700 wifi: atmel: Avoid clashing function prototypes When built with Control Flow Integrity, function prototypes between caller and function declaration must match. These mismatches are visible at compile time with the new -Wcast-function-type-strict in Clang[1]. Of the 1549 warnings found, 188 come from the atmel driver. For example: drivers/net/wireless/atmel/atmel.c:2518:2: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, void *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict] (iw_handler) atmel_config_commit, /* SIOCSIWCOMMIT */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The atmel Wireless Extension handler callbacks (iw_handler) use a union for the data argument. Actually use the union and perform explicit member selection in the function body instead of having a function prototype mismatch. There are no resulting binary differences. This patch is a cleanup based on Brad Spengler/PaX Team's modifications to the atmel driver in their last public patch of grsecurity/PaX based on my understanding of the code. Changes or omissions from the original code are mine and don't reflect the original grsecurity/PaX code. [1] https://reviews.llvm.org/D134831 Cc: Simon Kelley Cc: Kalle Valo Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221002032428.4091540-1-keescook@chromium.org drivers/net/wireless/atmel/atmel.c | 164 ++++++++++++++++++------------------- 1 file changed, 80 insertions(+), 84 deletions(-) commit 732dd91db3d3a1b7a767598549ffed358c9fbb89 Author: Ping-Ke Shih Date: Fri Sep 30 21:44:17 2022 +0800 wifi: rtw89: add to dump TX FIFO 0/1 for 8852C MAC maintains TX FIFO to transmit packets with meta data to BB layer. To debug abnormal transmission, we need to dump the content to dig problem. Since FIFO of 8852C locates on different address with different size and need additional switch to enable read operation, this patch adds the changes accordingly. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220930134417.10282-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/debug.c | 21 +++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/mac.c | 2 ++ drivers/net/wireless/realtek/rtw89/mac.h | 4 ++++ 3 files changed, 27 insertions(+) commit d187691ab63f53f199a07904422e0911bc6f9390 Author: Ping-Ke Shih Date: Fri Sep 30 21:44:16 2022 +0800 wifi: rtw89: 8852c: set pin MUX to enable BT firmware log 8852CE is a combo chip, and WiFi driver controls pin MUX. To output BT firmware log to specific hardware pin, set pin MUX to achieve. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220930134417.10282-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/reg.h | 4 ++++ drivers/net/wireless/realtek/rtw89/rtw8852c.c | 3 +++ 2 files changed, 7 insertions(+) commit c6a9d360874a41dc972c44c0949916da55199f85 Author: Ping-Ke Shih Date: Fri Sep 30 21:36:59 2022 +0800 wifi: rtw89: phy: ignore warning of bb gain cfg_type 4 The new BB parameters add new cfg_tpe 4 to improve performance of eFEM modules (rfe_type >= 50), but we are using iFEM modules for now, so this warning can be ignored. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220930133659.7789-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/phy.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a9ee25c32fd4569f63cd34def9a013fb3dad8e01 Author: Ping-Ke Shih Date: Fri Sep 30 21:36:58 2022 +0800 wifi: rtw89: 8852c: update BB parameters to v28 Update BB parameters along with internal tag HALBB_027_067_07. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220930133659.7789-1-pkshih@realtek.com .../net/wireless/realtek/rtw89/rtw8852c_table.c | 988 ++++++++++++++++++--- 1 file changed, 879 insertions(+), 109 deletions(-) commit 3be11416204a7aecbdba8c843849f204c631b8e6 Author: Ping-Ke Shih Date: Fri Sep 30 21:33:18 2022 +0800 wifi: rtw89: 8852c: rfk: correct miscoding delay of DPK Using mdelay() can work well, but calibration causes too much time. Use proper udelay() to get shorter time and the same result. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220930133318.6335-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68b0ce5bb4002cd657963cb876f0ff51729f9bfc Author: Ping-Ke Shih Date: Fri Sep 30 21:33:17 2022 +0800 wifi: rtw89: 8852c: correct set of IQK backup registers IQK can change the values of this register set, so need to backup and restore the values. During we rewrite IQK, the policy is changed. Some values are controlled and filled by IQK, and don't need to restore after IQK. Therefore, remove this kind of registers from this array. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220930133318.6335-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1562bdef925117dcd5a5678417c01f703be99589 Author: Prasanna Kerekoppa Date: Thu Sep 29 00:06:13 2022 -0500 brcmfmac: Fix AP interface delete issue Fixes the ap interface delete issue. Fix is to make sure interface is created with supported version. Patch has been verified by creating and deleting AP interface. Signed-off-by: Prasanna Kerekoppa Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220929050614.31518-4-ian.lin@infineon.com .../broadcom/brcm80211/brcmfmac/cfg80211.c | 101 ++++++++++++++++++--- 1 file changed, 90 insertions(+), 11 deletions(-) commit 4388827b87d849e51053e098c4e12c707b9fef34 Author: Wright Feng Date: Thu Sep 29 00:06:12 2022 -0500 brcmfmac: support station interface creation version 1, 2 and 3 To create virtual station interface for RSDB and VSDB, we add interface creation version 1, 2 and 3 supports The structures of each version are different and only version 3 and later version are able to get interface creating version from firmware side. The patch has been verified two concurrent stations pings test with interface create version 1: 89342(4359b1)-PCIE: 9.40.100 interface create version 2: 4373a0-sdio: 13.10.271 interface create version 3: 4373a0-sdio: 13.35.48 Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220929050614.31518-3-ian.lin@infineon.com .../broadcom/brcm80211/brcmfmac/cfg80211.c | 148 +++++++++++++++++---- 1 file changed, 124 insertions(+), 24 deletions(-) commit 2b5fb30f8ff55c7d0e8cd6a06c9be1de6129f5a7 Author: Wright Feng Date: Thu Sep 29 00:06:11 2022 -0500 brcmfmac: add creating station interface support With RSDB device, it is able to control two station interfaces concurrently. So we add creating station interface support and allow user to create it via cfg80211. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220929050614.31518-2-ian.lin@infineon.com .../broadcom/brcm80211/brcmfmac/cfg80211.c | 81 ++++++++++++++++++---- .../wireless/broadcom/brcm80211/brcmfmac/core.h | 1 + 2 files changed, 70 insertions(+), 12 deletions(-) commit dd3abfe4e6b679e4258f922540da2277f962eb1f Author: Ville Syrjälä Date: Tue Sep 27 20:00:05 2022 +0300 drm/edid: Make version checks less convoluted Get rid of the confusing version_greater() stuff and simply compare edid->revision directly everwhere. Half the places already did it this way, and since we actually reject any EDID with edid->version!=1 it's a perfectly sane thing to do. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927170006.27855-9-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit f72f9529b0ba69d0d00563f54868c5efbf00e88d Author: Ville Syrjälä Date: Tue Sep 27 20:00:04 2022 +0300 drm/edid: Unconfuse preferred timing stuff a bit For EDID 1.4 the first detailed timing is always preferred, for older EDIDs there was a feature flag to indicate the same. While correct, the code setting that up is rather confusing. Restate it in a slightly more straightforward manner. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927170006.27855-8-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bf72b5ef6e2b4e7d1a8a7086757a651831f907cc Author: Ville Syrjälä Date: Tue Sep 27 20:00:03 2022 +0300 drm/edid: Use the correct formula for standard timings Prefer the timing formula indicated by the range descriptor for generating the non-DMT standard timings. Previously we just used CVT for all EDID 1.4 continuous frequency displays without even checking if the range descriptor indicates otherwise. Now we check the range descriptor first, and fall back to CVT if nothing else was indicated. EDID 1.4 more or less deprecates GTF/GTF2 but there are still a lot of 1.4 EDIDs out there that don't advertise CVT support, so seems safer to use the formula the EDID actually reports as supported. For EDID 1.3 we use GTF2 if indicated (as before), and for EDID 1.2+ we now just use GTF without even checking the feature flag. There seem to be quite a few EDIDs out there that don't set the GTF feature flag but still include a GTF range descriptor and non-DMT standard timings. This to me seems to be roughly what appendix B of EDID 1.4 suggests should be done. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927170006.27855-7-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 49 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) commit 9ed15f91310ceb722aa346ea58831ae0478d8018 Author: Ville Syrjälä Date: Tue Sep 27 20:00:02 2022 +0300 drm/edid: Use GTF2 for inferred modes For some reason we only use the secondary GTF curve for the standard timings. Use it for inferred modes as well. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927170006.27855-6-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 47d4ae2192cb44ccf845c5cca79f9cb6d8394f09 Author: José Roberto de Souza Date: Wed Sep 7 11:15:43 2022 +0300 drm/i915/mtl: Extend PSR support Meteorlake and display 14 platform don't have any PSR differences when comparing to Alderlake-P display, so it was only necessary to extend some checks to properly program hardware. BSpec: 55229, 49196 Cc: Mika Kahola Signed-off-by: José Roberto de Souza Signed-off-by: Jouni Högander Reviewed-by: Stanislav Lisovskiy Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20220907081543.92268-1-mika.kahola@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 31 ++++++++++++++++++++----------- drivers/gpu/drm/i915/i915_reg.h | 5 +++++ 2 files changed, 25 insertions(+), 11 deletions(-) commit 86101bb7e00401e060fa2eaaa141e40ccb379e18 Author: Ville Syrjälä Date: Tue Sep 27 20:00:01 2022 +0300 drm/edid: Extract drm_gtf2_mode() Extract the GTF vs. GTF2 logic into a separate function. We'll have a second user soon. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927170006.27855-5-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 47 +++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) commit ca2582c66b930c14b28f158afeb42a8d178c78b7 Author: Ville Syrjälä Date: Tue Sep 27 20:00:00 2022 +0300 drm/edid: Only parse VRR range for continuous frequency displays Since we only use the parsed vrefresh range to determine if VRR should be supported we should only accept continuous frequency displays here. Cc: Manasi Navare Cc: Nicholas Kazlauskas Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927170006.27855-4-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit afd4429eba283ea284ccf1e910bef649226f892d Author: Ville Syrjälä Date: Tue Sep 27 19:59:59 2022 +0300 drm/edid: Define more flags Replace a bunch of hex constants with proper definitions. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927170006.27855-3-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 18 +++++++++--------- include/drm/drm_edid.h | 14 +++++++++----- 2 files changed, 18 insertions(+), 14 deletions(-) commit 67d7469a1772e013eee0adcb3963149576d89342 Author: Ville Syrjälä Date: Tue Sep 27 19:59:58 2022 +0300 drm/edid: Clarify why we only accept the "range limits only" descriptor The current comment fails to clarify why we only accept the "range limits only" variant of the range descriptor. Reword it to make some actual sense. Cc: Nicholas Kazlauskas Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Manasi Navare Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927170006.27855-2-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 5e931c88b6912a4614994ea9198929b5241b1a1b Author: Ankit Nautiyal Date: Fri Sep 16 15:35:51 2022 +0530 drm/edid: Avoid multiple log lines for HFVSDB parsing Replace multiple log lines with a single log line at the end of parsing HF-VSDB. Also use drm_dbg_kms instead of DRM_DBG_KMS, and add log for DSC1.2 support. v2: Fixed the formatting issues in the logging (Jani). Signed-off-by: Ankit Nautiyal Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220916100551.2531750-5-ankit.k.nautiyal@intel.com drivers/gpu/drm/drm_edid.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit a07e6f56b3eb0bdc8fe42d04296fe66ea8ad4380 Author: Ankit Nautiyal Date: Fri Sep 16 15:35:50 2022 +0530 drm/edid: Refactor HFVSDB parsing for DSC1.2 DSC capabilities are given in bytes 11-13 of VSDB (i.e. bytes 8-10 of SCDS). Since minimum length of Data block is 7, all bytes greater than 7 must be read only after checking the length of the data block. This patch adds check for data block length before reading relavant DSC bytes. Signed-off-by: Ankit Nautiyal Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220916100551.2531750-4-ankit.k.nautiyal@intel.com drivers/gpu/drm/drm_edid.c | 93 ++++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 44 deletions(-) commit 5e706c4db90cd7fd8d9b883efced08558379934f Author: Ankit Nautiyal Date: Fri Sep 16 15:35:49 2022 +0530 drm/edid: Split DSC parsing into separate function Move the DSC parsing logic into separate function. v2: Rebase. Signed-off-by: Ankit Nautiyal Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220916100551.2531750-3-ankit.k.nautiyal@intel.com drivers/gpu/drm/drm_edid.c | 128 ++++++++++++++++++++++++--------------------- 1 file changed, 69 insertions(+), 59 deletions(-) commit 18feaf6d0784dcba888859109676adf1e0260dfd Author: Ankit Nautiyal Date: Fri Sep 16 15:35:48 2022 +0530 drm/edid: Fix minimum bpc supported with DSC1.2 for HDMI sink HF-VSDB/SCDB has bits to advertise support for 16, 12 and 10 bpc. If none of the bits are set, the minimum bpc supported with DSC is 8. This patch corrects the min bpc supported to be 8, instead of 0. Fixes: 76ee7b905678 ("drm/edid: Parse DSC1.2 cap fields from HFVSDB block") Cc: Ankit Nautiyal Cc: Uma Shankar Cc: Jani Nikula Cc: Maarten Lankhorst v2: s/DSC1.2/DSC 1.2 Signed-off-by: Ankit Nautiyal Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220916100551.2531750-2-ankit.k.nautiyal@intel.com drivers/gpu/drm/drm_edid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 42172b551c0b9042d830e84beff5abd721cb5413 Author: Matt Roper Date: Wed Sep 7 14:24:10 2022 -0700 drm/i915: Document and future-proof preemption control policy Intel hardware allows some preemption settings to be controlled either by the kernel-mode driver exclusively, or placed under control of the user-mode drivers; on Linux we always select the userspace control option. The various registers involved in this are not documented very clearly; let's add some clarifying comments to help explain how this all works and provide some history on why our Linux drivers take the approach they do (which I believe differs from the path taken by certain other operating systems' drivers). While we're at it, let's also remove the graphics version 12 upper bound on this programming. As described, we don't have any plans to move away from UMD control of preemption settings on future platforms, and there's currently no reason to believe that the hardware will fundamentally change how these registers and settings work after version 12. Bspec: 45921, 45858, 45863 Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Lionel Landwerlin Suggested-by: Joonas Lahtinen Signed-off-by: Matt Roper Reviewed-by: Wayne Boyer Acked-by: Tapani Pälli Link: https://patchwork.freedesktop.org/patch/msgid/20220907212410.22623-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 58 +++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) commit 22d9a2554dfa41301071c7ebb7002efa306a9290 Author: Ville Syrjälä Date: Mon Oct 3 14:32:49 2022 +0300 drm/i915: Setup final panel drrs_type already during init Now that we track the VBT drrs type per-panel we can move the has_drrs_modes() check to the panel init rather than doing it for every intel_panel_drrs_type() call. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003113249.16213-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_panel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d1af925ba062d78580a98ed8b1a013c0ac2b54ae Author: Ville Syrjälä Date: Mon Oct 3 14:32:48 2022 +0300 drm/i915: Tighten DRRS capability reporting Only report DRRS capability for the connector if its fixed_modes list contains at least two modes capable of seamless DRRS switch between them. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003113249.16213-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_panel.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 26b15eb0940c9a52aa997f6e6f00e3a6e628f107 Author: Matthew Auld Date: Mon Oct 3 18:28:19 2022 +0100 drm/i915/ttm: implement access_memory It looks like we need this for local-memory, if we want to use ptrace. Something more is still needed if we want to handle non-mappable memory, which looks quite annoying. v2: - ttm_bo_kmap doesn't seem to work well here, and seems to expect contiguous resource. v3(Andi): - s/PAGE_SIZE/bytes/ when passing in the size of the mapping. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6989 Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221003172819.99245-1-matthew.auld@intel.com drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit f633a206ca3485adcfef4186b0c0f1ab03743b25 Author: Simon Ser Date: Wed Aug 24 19:43:42 2022 +0200 drm: document uAPI page-flip flags Document flags accepted by the page-flip and atomic IOCTLs. v2 (Pekka): - Mention DRM_EVENT_FLIP_COMPLETE in DRM_MODE_PAGE_FLIP_EVENT docs. - Expand DRM_MODE_ATOMIC_NONBLOCK and DRM_MODE_ATOMIC_ALLOW_MODESET description. v3: - Fix struct field ref syntax (Daniel) - Clarify when artifacts are no longer displayed (Daniel) - Add note about sinks deciding to show artifacts on their own (Pekka, Daniel) v4: - Fix typo (Pekka) Signed-off-by: Simon Ser Reviewed-by: Pekka Paalanen Acked-by: Daniel Vetter Cc: Ville Syrjala Link: https://patchwork.freedesktop.org/patch/505107/ include/uapi/drm/drm_mode.h | 63 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) commit c24538f538ef2f70c10f4326c1c0efd6ec6561c9 Author: Gwan-gyeong Mun Date: Mon Oct 3 20:02:42 2022 +0300 drm/i915/gt: Remove unused function prototype Remove unused function prototype; intel_gt_create_kobj() Cc: Andi Shyti Signed-off-by: Gwan-gyeong Mun Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221003170242.1246830-1-gwan-gyeong.mun@intel.com drivers/gpu/drm/i915/gt/intel_gt_sysfs.h | 5 ----- 1 file changed, 5 deletions(-) commit 5515a8e30eaa8ae0d57ec59c908716cf2af114ae Author: Muhammad Usama Anjum Date: Tue Oct 4 13:45:15 2022 +0500 apparmor: store return value of unpack_perms_table() to signed variable The unpack_perms_table() can return error which is negative value. Store the return value to a signed variable. policy->size is unsigned variable. It shouldn't be used to store the return status. Fixes: 2d6b2dea7f3c ("apparmor: add the ability for policy to specify a permission table") Signed-off-by: Muhammad Usama Anjum Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 96c92551b5ec2c0c5b0de0b4fa36cec27d4ae5ae Author: Jilin Yuan Date: Wed Sep 7 19:36:44 2022 +0800 drm/edid: fix repeated words in comments Delete the redundant word 'on'. Signed-off-by: Jilin Yuan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20220907113644.32831-1-yuanjilin@cdjrlc.com drivers/gpu/drm/drm_edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 439adf72726462a0245822d1434f908d451a46ad Author: Pin-yen Lin Date: Tue Oct 4 12:49:43 2022 +0800 drm/bridge: it6505: Add pre_enable/post_disable callback Add atomic_pre_enable and atomic_post_disable callback to make sure the bridge is not powered off until atomic_post_disable is called. This prevents a power leakage when it6505 is powered off, but the upstream DRM bridge is still sending display signals. Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver") Signed-off-by: Pin-yen Lin Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221004044943.2407781-3-treapking@chromium.org drivers/gpu/drm/bridge/ite-it6505.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 10517777d302d2e09bee3bf272dd28c0b0c8f3d0 Author: Pin-yen Lin Date: Tue Oct 4 12:49:42 2022 +0800 drm/bridge: it6505: Adapt runtime power management framework Use pm_runtime_(get|put)_sync to control the bridge power, and add SET_SYSTEM_SLEEP_PM_OPS with pm_runtime_force_(suspend|resume) to it6505 driver. Without SET_SYSTEM_SLEEP_PM_OPS, the bridge will be powered on unnecessarily when no external display is connected. Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver") Signed-off-by: Pin-yen Lin Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221004044943.2407781-2-treapking@chromium.org drivers/gpu/drm/bridge/ite-it6505.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 5671c8b56c320e17c9d61e8578dc7e6fa4a704ed Author: Wright Feng Date: Wed Sep 28 22:10:01 2022 -0500 brcmfmac: dump dongle memory when attaching failed To enhance FW debugging, we add dongle memory dump when hitting attaching failure with PCIE bus. It can help developer to get more information about dongle trap reason and root cause. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220929031001.9962-4-ian.lin@infineon.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) commit 2aca4f3734bd717e04943ddf340d49ab62299a00 Author: Wright Feng Date: Wed Sep 28 22:10:00 2022 -0500 brcmfmac: return error when getting invalid max_flowrings from dongle When firmware hit trap at initialization, host will read abnormal max_flowrings number from dongle, and it will cause kernel panic when doing iowrite to initialize dongle ring. To detect this error at early stage, we directly return error when getting invalid max_flowrings(>256). Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220929031001.9962-3-ian.lin@infineon.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 4 ++++ 1 file changed, 4 insertions(+) commit dcb485dfc83bfa407e6dbdfb99f02be1446692ce Author: Wright Feng Date: Wed Sep 28 22:09:59 2022 -0500 brcmfmac: add a timer to read console periodically in PCIE bus Currently, host only reads console buffer when receiving mailbox data or hit crash with PCIE bus. Therefore, we add timer in PCIE code to read console buffer periodically to help developer and user check firmware message when there is no data transmission between host and dongle. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220929031001.9962-2-ian.lin@infineon.com .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 6 + .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 125 +++++++++++++++++++++ .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 - 3 files changed, 131 insertions(+), 2 deletions(-) commit 62ccb2e6f208ea754f62883be5a775f00bd559ab Author: Ramesh Rangavittal Date: Wed Sep 28 20:25:27 2022 -0500 brcmfmac: Fix authentication latency caused by OBSS stats survey Auto Channel Select feature of HostAP uses dump_survey to fetch OBSS statistics. When the device is in the middle of an authentication sequence or just at the end of authentication completion, running dump_survey would trigger a channel change. The channel change in-turn can cause packet loss, resulting in authentication delay. With this change, dump_survey won't be run when authentication or association is in progress, hence resolving the issue. Signed-off-by: Ramesh Rangavittal Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220929012527.4152-5-ian.lin@infineon.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 25076fe2a6024bcac009af1b737b184f65826476 Author: Double Lo Date: Wed Sep 28 20:25:26 2022 -0500 brcmfmac: fix CERT-P2P:5.1.10 failure This patch fix CERT-P2P:5.1.10 failure at step 18 Group formation failed due to chip is under dump survey. Decrease the dump survery duration to pass this certification case. Signed-off-by: Double Lo Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220929012527.4152-4-ian.lin@infineon.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 216647e6aaaf14773d85b6681eca1344bcd14757 Author: Wright Feng Date: Wed Sep 28 20:25:25 2022 -0500 brcmfmac: fix firmware trap while dumping obss stats When doing dump_survey, host will call "dump_obss" iovar to firmware side. Host need to make sure the HW clock in dongle is on, or there is high probability that firmware gets trap because register or shared memory access failed. To fix this, we disable mpc when doing dump obss and set it back after that. [28350.512799] brcmfmac: brcmf_dump_obss: dump_obss error (-52) [28743.402314] ieee80211 phy0: brcmf_fw_crashed: Firmware has halted or crashed [28745.869430] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout [28745.877546] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220929012527.4152-3-ian.lin@infineon.com .../broadcom/brcm80211/brcmfmac/cfg80211.c | 38 ++++++++++------------ 1 file changed, 17 insertions(+), 21 deletions(-) commit 6c04deae1438e5df59fc4848795248fc34961f51 Author: Wright Feng Date: Wed Sep 28 20:25:24 2022 -0500 brcmfmac: Add dump_survey cfg80211 ops for HostApd AutoChannelSelection To enable ACS feature in Hostap daemon, dump_survey cfg80211 ops and dump obss survey command in firmware side are needed. This patch is for adding dump_survey feature and adding DUMP_OBSS feature flag to check if firmware supports dump_obss iovar. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Ian Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220929012527.4152-2-ian.lin@infineon.com .../broadcom/brcm80211/brcmfmac/cfg80211.c | 256 +++++++++++++++++++++ .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 3 +- .../wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +- 3 files changed, 261 insertions(+), 2 deletions(-) commit 791082ec0ab843e0be07c8ce3678e4c2afd2e33d Author: Bitterblue Smith Date: Wed Sep 28 23:36:51 2022 +0300 wifi: rtl8xxxu: gen2: Turn on the rate control Re-enable the function rtl8xxxu_gen2_report_connect. It informs the firmware when connecting to a network. This makes the firmware enable the rate control, which makes the upload faster. It also informs the firmware when disconnecting from a network. In the past this made reconnecting impossible because it was sending the auth on queue 0x7 (TXDESC_QUEUE_VO) instead of queue 0x12 (TXDESC_QUEUE_MGNT): wlp0s20f0u3: send auth to 90:55:de:__:__:__ (try 1/3) wlp0s20f0u3: send auth to 90:55:de:__:__:__ (try 2/3) wlp0s20f0u3: send auth to 90:55:de:__:__:__ (try 3/3) wlp0s20f0u3: authentication with 90:55:de:__:__:__ timed out Probably the firmware disables the unnecessary TX queues when it knows it's disconnected. However, this was fixed in commit edd5747aa12e ("wifi: rtl8xxxu: Fix skb misuse in TX queue selection"). Fixes: c59f13bbead4 ("rtl8xxxu: Work around issue with 8192eu and 8723bu devices not reconnecting") Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/43200afc-0c65-ee72-48f8-231edd1df493@gmail.com drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c888183b21f36a247bb166ca9365705611bea847 Author: Bitterblue Smith Date: Thu Sep 29 00:16:46 2022 +0300 wifi: rtl8xxxu: Support new chip RTL8188FU This chip is found in the cheapest USB adapters, e.g. 1.17 USD with VAT and shipping from China included. It's a gen 2 chip, similar to the RTL8723BU, but without Bluetooth. Features: 2.4 GHz, b/g/n mode, 1T1R, 150 Mbps. The vendor driver rtl8188fu version 4.3.23.6_20964.20170110 [0] was used as reference. The CD shipped with the device includes a newer driver, version 5.11.5-1-g12f7cde4b.20201102, but that one couldn't complete the WPA2 key exchange thing for whatever reason. [0] https://github.com/kelebek333/rtl8188fu Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/b14f299d-3248-98fe-eee1-ba50d2e76c74@gmail.com drivers/net/wireless/realtek/rtl8xxxu/Makefile | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 56 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 1679 ++++++++++++++++++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 3 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 137 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 19 + 9 files changed, 1874 insertions(+), 25 deletions(-) commit 9695dc2e4be90315471ea4c672836929f5c403fe Author: Ping-Ke Shih Date: Wed Sep 28 16:43:36 2022 +0800 wifi: rtw89: 8852be: add 8852BE PCI entry 8852BE has two variants with different ID. One is 10ec:b852 that is a main model with 2x2 antenna, and the other is 10ec:b85b that is a 1x1 model. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928084336.34981-10-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b.h | 2 + drivers/net/wireless/realtek/rtw89/rtw8852be.c | 64 ++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) commit 134cf7c01517d5cfaab940cacbb41525659de5f6 Author: Ping-Ke Shih Date: Wed Sep 28 16:43:35 2022 +0800 wifi: rtw89: 8852b: add chip_ops to read phy cap This efuse region is to store PHY calibration, and it is a separated region from the region that stores MAC address. Then, use these data to configure via chip_ops::power_trim that is a calibration mechanism of TX power. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928084336.34981-9-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 4 + drivers/net/wireless/realtek/rtw89/rtw8852b.c | 184 ++++++++++++++++++++++++++ 2 files changed, 188 insertions(+) commit 132dc4fe5b587c0a62fc90d78e7413944fa06669 Author: Ping-Ke Shih Date: Wed Sep 28 16:43:34 2022 +0800 wifi: rtw89: 8852b: add chip_ops to read efuse efuse stores individual data about a chip itself, such as MAC address, country code, RF and crystal calibration data, and so on. Define a struct to help access efuse content, and copy them into a common struct. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928084336.34981-8-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852b.c | 106 ++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8852b.h | 75 ++++++++++++++++++ 2 files changed, 181 insertions(+) commit 08484e1f6e6fd670c722756baea4833436ca8fb5 Author: Ping-Ke Shih Date: Wed Sep 28 16:43:33 2022 +0800 wifi: rtw89: 8852b: add chip_ops::set_txpwr This chip_ops is to set TX power according to country, channel, rate and so on. Since shared code is used to configure TX power, we only implement specific part in this patch. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928084336.34981-7-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac.c | 1 + drivers/net/wireless/realtek/rtw89/reg.h | 5 + drivers/net/wireless/realtek/rtw89/rtw8852b.c | 200 +++++++++++++++++++++++++- drivers/net/wireless/realtek/rtw89/rtw8852b.h | 13 ++ 4 files changed, 218 insertions(+), 1 deletion(-) commit b902161645879ac820dfbb561667cd08be569538 Author: Zong-Zhe Yang Date: Wed Sep 28 16:43:32 2022 +0800 wifi: rtw89: debug: txpwr_table considers sign Previously, value of each field is just shown as unsigned. Now, we start to show them with sign to make things more intuitive during debugging. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928084336.34981-6-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/debug.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 9b43bd1ac0a8e29b678768f93645cc1b39571278 Author: Zong-Zhe Yang Date: Wed Sep 28 16:43:31 2022 +0800 wifi: rtw89: phy: make generic txpwr setting functions Previously, we thought control registers or setting things for TX power series may change according to chip. So, setting functions are implemented chip by chip. However, until now, the functions keep the same among chips, at least 8852A, 8852C, and 8852B. There is a sufficient number of chips to share generic setting functions. So, we now remake them including TX power by rate, TX power offset, TX power limit, and TX power limit RU as generic ones in phy.c. Besides, there are some code refinements in the generic ones, but almost all of the logic doesn't change. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928084336.34981-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 4 + drivers/net/wireless/realtek/rtw89/phy.c | 167 ++++++++++++++++++++++++-- drivers/net/wireless/realtek/rtw89/phy.h | 25 ++-- drivers/net/wireless/realtek/rtw89/rtw8852a.c | 145 +--------------------- drivers/net/wireless/realtek/rtw89/rtw8852a.h | 1 - drivers/net/wireless/realtek/rtw89/rtw8852c.c | 145 +--------------------- drivers/net/wireless/realtek/rtw89/rtw8852c.h | 1 - 7 files changed, 184 insertions(+), 304 deletions(-) commit 2b379eb443e2a4bd6fb2cbd300e12aeff45cff57 Author: Ping-Ke Shih Date: Wed Sep 28 16:43:30 2022 +0800 wifi: rtw89: 8852b: add tables for RFK These tables are used by RFK to assist to configure PHY and RF registers. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928084336.34981-4-pkshih@realtek.com .../wireless/realtek/rtw89/rtw8852b_rfk_table.c | 794 +++++++++++++++++++++ .../wireless/realtek/rtw89/rtw8852b_rfk_table.h | 62 ++ 2 files changed, 856 insertions(+) commit 3e65a0ae142a97bb9b2e0a988e1ddf55fe289cf0 Author: Ping-Ke Shih Date: Wed Sep 28 16:43:29 2022 +0800 wifi: rtw89: 8852b: add BB and RF tables (2 of 2) These tables contain BB and RF parameters that driver will load them into registers. It also contains TX power according to country, band, rate and so on. Increasing thermal can cause TX power degraded, so power tracking tables are defined to compensate TX power. Internal version of these tables: - HALRF_029_00_014 (R32) - HALBB_027_046_05 Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928084336.34981-3-pkshih@realtek.com .../net/wireless/realtek/rtw89/rtw8852b_table.c | 9628 ++++++++++++++++++++ 1 file changed, 9628 insertions(+) commit c8b5fc2e1d2f6a11fe2ba82da8b0c39bb379b529 Author: Ping-Ke Shih Date: Wed Sep 28 16:43:28 2022 +0800 wifi: rtw89: 8852b: add BB and RF tables (1 of 2) These tables contain BB and RF parameters that driver will load them into registers. It also contains TX power according to country, band, rate and so on. Increasing thermal can cause TX power degraded, so power tracking tables are defined to compensate TX power. Internal version of these tables: - HALRF_029_00_014 (R32) - HALBB_027_046_05 Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928084336.34981-2-pkshih@realtek.com .../net/wireless/realtek/rtw89/rtw8852b_table.c | 13249 +++++++++++++++++++ .../net/wireless/realtek/rtw89/rtw8852b_table.h | 30 + 2 files changed, 13279 insertions(+) commit 32490541682bf8ea445e9bd29c866981851e0912 Author: John Johansen Date: Mon Oct 3 01:30:38 2022 -0700 apparmor: Fix kunit test for out of bounds array The apparmor kunit tests are failing on the out of bounds array check with the following failure # policy_unpack_test_unpack_array_out_of_bounds: EXPECTATION FAILED at security/apparmor/policy_unpack_test.c:178 Expected unpack_array(puf->e, name, &array_size) == 1, but unpack_array(puf->e, name, &array_size) == -1 # policy_unpack_test_unpack_array_out_of_bounds: EXPECTATION FAILED at security/apparmor/policy_unpack_test.c:180 Expected array_size == 0, but array_size == 64192 not ok 5 - policy_unpack_test_unpack_array_out_of_bounds This is because unpack_array changed to allow distinguishing between the array not being present and an error. In the error case the array size is not set and should not be tested. Reported-by: kernel test robot Fixes: 995a5b64620e ("apparmor: make unpack_array return a trianary value") Signed-off-by: John Johansen security/apparmor/policy_unpack_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a2f31df06b7aa1769f12ec6f9ae7f18e78582cad Author: John Johansen Date: Thu Sep 29 06:48:10 2022 -0700 apparmor: Fix decompression of rawdata for read back to userspace The rawdata readback has a few of problems. First if compression is enabled when the data is read then the compressed data is read out instead decompressing the data. Second if compression of the data fails, the code does not handle holding onto the raw_data in uncompressed form. Third if the compression is enabled/disabled after the rawdata was loaded, the check against the global control of whether to use compression does not reflect what was already done to the data. Fix these by always storing the compressed size, along with the original data size even if compression fails or is not used. And use this to detect whether the rawdata is actually compressed. Fixes: 52ccc20c652b ("apparmor: use zstd compression for profile data") Signed-off-by: John Johansen Acked-by: Jon Tourville security/apparmor/apparmorfs.c | 2 +- security/apparmor/policy_unpack.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 70f24a9f9084b7fffd95daa707cce8e339b189dd Author: John Johansen Date: Thu Sep 29 06:24:29 2022 -0700 apparmor: Fix undefined references to zstd_ symbols Unfortunately the switch to using zstd compression did not properly ifdef all the code that uses zstd_ symbols. So that if exporting of binary policy is disabled in the config the compile will fail with the following errors security/apparmor/lsm.c:1545: undefined reference to `zstd_min_clevel' aarch64-linux-ld: security/apparmor/lsm.c:1545: undefined reference to `zstd_max_clevel' Reported-by: kernel test robot Fixes: 52ccc20c652b ("apparmor: use zstd compression for profile data") Signed-off-by: John Johansen Acked-by: Jon Tourville security/apparmor/apparmorfs.c | 4 ++-- security/apparmor/include/apparmor.h | 11 +++++++++++ security/apparmor/lsm.c | 5 ++--- 3 files changed, 15 insertions(+), 5 deletions(-) commit 14d37a7f14569adbf7a019710762271fa2a9e739 Author: John Johansen Date: Sun Sep 25 15:36:45 2022 -0700 apparmor: make sure the decompression ctx is promperly initialized The decompress ctx was not properly initialized when reading raw profile data back to userspace. Reported-by: kernel test robot Fixes: 52ccc20c652b ("apparmor: use zstd compression for profile data") Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 73c7e91c8bc98a5da94be62a9a4ba2793f86a97b Author: John Johansen Date: Sat Sep 24 22:34:07 2022 -0700 apparmor: Remove unnecessary size check when unpacking trans_table The index into the trans_table has a max size of 2^24 bits which the code was testing but this is unnecessary as unpack_array can only unpack a table of 2^16 bits in size so the table unpacked will never be larger than what can be indexed, and any test here is redundant. Reported-by: kernel test robot Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 1ddece8cd0f43582085497eacff2e3cd37f93d1f Author: John Johansen Date: Sat Sep 24 22:25:25 2022 -0700 apparmor: Fix doc comment for compute_fperms When compute_fperms was moved to policy_compat and made static it was renamed from aa_compute_fperms to just compute_fperms to help indicate it is only available statically. Unfortunately the doc comment did not also get updated to reflect the change. Reported-by: kernel test robot Signed-off-by: John Johansen security/apparmor/policy_compat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65f7f666f21ce374628d58b3cc48515070f31e72 Author: Xiu Jianfeng Date: Wed Sep 14 15:46:07 2022 +0800 apparmor: make __aa_path_perm() static Make __aa_path_perm() static as it's only used inside apparmor/file.c. Signed-off-by: Xiu Jianfeng Signed-off-by: John Johansen security/apparmor/file.c | 7 ++++--- security/apparmor/include/file.h | 3 --- 2 files changed, 4 insertions(+), 6 deletions(-) commit adaa9a3f72e6f98538bfac54f6dc4afc0537f410 Author: Gaosheng Cui Date: Fri Sep 23 17:21:18 2022 +0800 apparmor: Simplify obtain the newest label on a cred In aa_get_task_label(), aa_get_newest_cred_label(__task_cred(task)) can do the same things as aa_get_newest_label(__aa_task_raw_label(task)), so we can replace it and remove __aa_task_raw_label() to simplify the code. Signed-off-by: Gaosheng Cui Signed-off-by: John Johansen security/apparmor/include/cred.h | 13 ------------- security/apparmor/task.c | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) commit 1f939c6bd1512d0b39b470396740added3cb403f Author: John Johansen Date: Tue Sep 20 04:01:28 2022 -0700 apparmor: Fix regression in stacking due to label flags The unconfined label flag is not being computed correctly. It should only be set if all the profiles in the vector are set, which is different than what is required for the debug and stale flag that are set if any on the profile flags are set. Fixes: c1ed5da19765 ("apparmor: allow label to carry debug flags") Signed-off-by: John Johansen security/apparmor/label.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 961f3e3de14467f3babe252f7b6cc44a36ebba64 Author: John Johansen Date: Sun Sep 11 22:05:26 2022 -0700 apparmor: fix aa_class_names[] to match reserved classes The class name map did not have the reserved names added. Fix this Signed-off-by: John Johansen security/apparmor/audit.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 1ad22fcc4d0d2fb2e0f35aed555a86d016d5e590 Author: John Johansen Date: Mon Sep 5 20:47:36 2022 -0700 apparmor: rework profile->rules to be a list Convert profile->rules to a list as the next step towards supporting multiple rulesets in a profile. For this step only support a single list entry item. The logic for iterating the list will come as a separate step. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 3 ++- security/apparmor/capability.c | 6 ++++-- security/apparmor/domain.c | 24 ++++++++++++++++-------- security/apparmor/file.c | 6 ++++-- security/apparmor/include/policy.h | 17 ++++++++++++++++- security/apparmor/ipc.c | 5 +++-- security/apparmor/lib.c | 6 ++++-- security/apparmor/lsm.c | 7 +++++-- security/apparmor/mount.c | 13 +++++++++---- security/apparmor/net.c | 6 ++++-- security/apparmor/policy.c | 37 ++++++++++++++++++++++++++++++++++--- security/apparmor/policy_ns.c | 6 ++++-- security/apparmor/policy_unpack.c | 34 ++++++++++++++++++---------------- security/apparmor/resource.c | 19 +++++++++++++------ security/apparmor/task.c | 10 ++++++---- 15 files changed, 142 insertions(+), 57 deletions(-) commit 217af7e2f4deb629aaa49622685ccfee923898ca Author: John Johansen Date: Fri Jul 29 17:17:31 2022 -0700 apparmor: refactor profile rules and attachments In preparation for moving from a single set of rules and a single attachment to multiple rulesets and attachments separate from the profile refactor attachment information and ruleset info into their own structures. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 27 ++++----- security/apparmor/capability.c | 12 ++-- security/apparmor/domain.c | 81 ++++++++++++++----------- security/apparmor/file.c | 14 +++-- security/apparmor/include/label.h | 9 +-- security/apparmor/include/perms.h | 3 +- security/apparmor/include/policy.h | 84 +++++++++++++++----------- security/apparmor/ipc.c | 9 +-- security/apparmor/label.c | 45 +++++++------- security/apparmor/lib.c | 13 ++-- security/apparmor/lsm.c | 4 +- security/apparmor/mount.c | 31 +++++----- security/apparmor/net.c | 24 ++++---- security/apparmor/policy.c | 44 +++++++++----- security/apparmor/policy_ns.c | 4 +- security/apparmor/policy_unpack.c | 118 +++++++++++++++++++------------------ security/apparmor/resource.c | 15 ++--- security/apparmor/task.c | 10 ++-- 18 files changed, 308 insertions(+), 239 deletions(-) commit 3bf3d728a58d7dcf2bbf179e3263fb8651f6097b Author: John Johansen Date: Tue Sep 6 00:38:20 2022 -0700 apparmor: verify loaded permission bits masks don't overlap Add an additional verification that loaded permission sets don't overlap in ways that are not intended. This will help ensure that permission accumulation can't result in an invalid permission set. Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) commit 3dfd16ab697ff23973b6fbb89808372bcd008dd1 Author: John Johansen Date: Mon Sep 5 23:57:51 2022 -0700 apparmor: cleanup: move perm accumulation into perms.h Perm accumulation is going to be used much more frequently so let the compiler figure out if it can be optimized when used. Signed-off-by: John Johansen security/apparmor/include/perms.h | 53 +++++++++++++++++++++++++++++++++++++++ security/apparmor/lib.c | 52 -------------------------------------- 2 files changed, 53 insertions(+), 52 deletions(-) commit 0bece4fa97a2bd397da66d4fced78f76eb214a3e Author: John Johansen Date: Mon Sep 5 23:53:29 2022 -0700 apparmor: make sure perm indexes are accumulated accumulate permission indexes on a first encountered basis. This favors original rulesets so that new ones can not override without profile replacement. Signed-off-by: John Johansen security/apparmor/include/file.h | 4 ++-- security/apparmor/include/perms.h | 9 +++++++++ security/apparmor/lib.c | 14 ++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) commit 670f31774ab6bf8e2d756f27444b035b9be8a0c9 Author: John Johansen Date: Fri Aug 26 13:32:34 2022 -0700 apparmor: verify permission table indexes While the dfa xindex's are verified, the indexes in the permission table are not currently verified. Fix this. Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit fd1b2b95a21177eaa9e26989637e477be4d93b2f Author: John Johansen Date: Fri Aug 26 08:53:42 2022 -0700 apparmor: add the ability for policy to specify a permission table Currently permissions are encoded in the dfa accept entries that are then mapped to an internal permission structure. This limits the permissions that userspace can specify, so allow userspace to directly specify the permission table. Signed-off-by: John Johansen security/apparmor/include/policy.h | 5 +- security/apparmor/policy_unpack.c | 104 +++++++++++++++++++++++++++++++++---- 2 files changed, 98 insertions(+), 11 deletions(-) commit 371e50a0b19f9765bfb9e4f172e72f4e9a4625bc Author: John Johansen Date: Fri Aug 26 09:26:57 2022 -0700 apparmor: make unpack_array return a trianary value currently unpack_array() does not return an error nor whether the array is not present. The ability to detect an error or the array not being present is needed so rework the unpack_array() to return the needed information. Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 43 +++++++++++++++++++++------------- security/apparmor/policy_unpack_test.c | 12 +++++----- 2 files changed, 33 insertions(+), 22 deletions(-) commit ad596ea74e746d60bb7e13f3adde097a08b2089b Author: John Johansen Date: Mon Jul 18 16:53:17 2022 -0700 apparmor: group dfa policydb unpacking There are currently three policydb rule groupings (xmatch, file, policydb) that each do their own slightly different thing. Group them into a single routine and unify. This extends/unifies dfa features by - all dfas are allowed having an optional start field - all dfas are allowed having a string/transition table Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 101 ++++++++++++++++++++++++-------------- 1 file changed, 63 insertions(+), 38 deletions(-) commit a0792e2ceddc1bff8bda34a82b5ef7f00cbe7a9f Author: John Johansen Date: Tue Aug 23 01:06:15 2022 -0700 apparmor: make transition table unpack generic so it can be reused Currently the transition table is tied to the file dfa. Make it so we can unpack a transition table against any dfa. Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 22fac8a051191113becc0da62bf88b0ba8ce6c08 Author: John Johansen Date: Tue Dec 17 15:40:41 2019 -0800 apparmor: add user mode flag Allow the profile to contain a user mode prompt flag. This works similar to complain mode but will try to send messages to a userspace daemon. If the daemon is not present or timesout regular informent will occur. Signed-off-by: John Johansen security/apparmor/include/policy.h | 3 +++ security/apparmor/include/policy_unpack.h | 1 + security/apparmor/lib.c | 7 ++----- security/apparmor/policy.c | 1 + security/apparmor/policy_unpack.c | 2 ++ 5 files changed, 9 insertions(+), 5 deletions(-) commit 8c4b785a86be1219f7d50f7b38266c454d6a9bbc Author: John Johansen Date: Tue Apr 19 16:25:55 2022 -0700 apparmor: add mediation class information to auditing Audit messages currently don't contain the mediation class which can make them less clear than they should be in some circumstances. With newer mediation classes coming this potential confusion will become worse. Fix this by adding the mediatin class to the messages. Signed-off-by: John Johansen security/apparmor/audit.c | 28 ++++++++++++++++++++++++++++ security/apparmor/capability.c | 2 +- security/apparmor/file.c | 2 +- security/apparmor/include/apparmor.h | 2 +- security/apparmor/include/audit.h | 8 ++++++-- security/apparmor/include/net.h | 1 + security/apparmor/ipc.c | 2 +- security/apparmor/lib.c | 2 +- security/apparmor/lsm.c | 3 ++- security/apparmor/mount.c | 2 +- security/apparmor/policy.c | 2 +- security/apparmor/policy_unpack.c | 2 +- security/apparmor/resource.c | 3 ++- security/apparmor/task.c | 2 +- 14 files changed, 48 insertions(+), 13 deletions(-) commit 90917d5b6866df79d892087ba51b46c983d2fcfe Author: John Johansen Date: Sat Jul 16 03:33:43 2022 -0700 apparmor: extend permissions to support a label and tag string add indexes for label and tag entries. Rename the domain table to the str_table as its a shared string table with label and tags. Signed-off-by: John Johansen security/apparmor/domain.c | 18 ------------------ security/apparmor/include/domain.h | 6 ------ security/apparmor/include/lib.h | 6 ++++++ security/apparmor/include/perms.h | 2 ++ security/apparmor/include/policy.h | 6 ++++-- security/apparmor/lib.c | 19 +++++++++++++++++++ security/apparmor/policy_unpack.c | 2 +- 7 files changed, 32 insertions(+), 27 deletions(-) commit caa9f579ca7255e9d6c25f072447d895c5928c97 Author: John Johansen Date: Sun Aug 21 22:48:32 2022 -0700 apparmor: isolate policy backwards compatibility to its own file The details of mapping old policy into newer policy formats clutters up the unpack code and makes it possible to accidentally use old mappings in code, so isolate the mapping code into its own file. This will become more important when the dfa remapping code lands, as it will greatly expand the compat code base. Signed-off-by: John Johansen security/apparmor/Makefile | 3 +- security/apparmor/include/policy_compat.h | 33 ++++ security/apparmor/include/policy_unpack.h | 1 + security/apparmor/policy_compat.c | 319 ++++++++++++++++++++++++++++++ security/apparmor/policy_unpack.c | 290 +-------------------------- 5 files changed, 359 insertions(+), 287 deletions(-) commit ae6d35ed0a481824a8730c39d5b319c8a76ea00e Author: John Johansen Date: Sat Jul 16 03:29:19 2022 -0700 apparmor: extend xindex size Allow the xindex to have 2^24 entries. Signed-off-by: John Johansen security/apparmor/include/file.h | 23 +++++++++++------------ security/apparmor/include/perms.h | 2 +- security/apparmor/policy_unpack.c | 8 ++++---- 3 files changed, 16 insertions(+), 17 deletions(-) commit b06a62ebf5a3f041b22def1608f1a8ab9bbfa951 Author: John Johansen Date: Mon May 16 04:37:08 2022 -0700 apparmor: move dfa perm macros into policy_unpack Now that the permission remapping macros aren't needed anywhere except during profile unpack, move them. Signed-off-by: John Johansen security/apparmor/include/file.h | 51 --------------------------------------- security/apparmor/policy_unpack.c | 49 +++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 51 deletions(-) commit 3c076531c5529c94cee330dffc4615ad02bb6edb Author: John Johansen Date: Tue May 10 02:21:22 2022 -0700 apparmor: extend policydb permission set by making use of the xbits The policydb permission set has left the xbits unused. Make them available for mediation. Note: that this does not bring full auditing control of the permissions as there are not enough bits. The quieting of denials is provided as that is used more than forced auditing of allowed permissions. Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 1cf26c3d2c4c2098e39a9905174d7842b531e693 Author: John Johansen Date: Sat May 7 01:58:36 2022 -0700 apparmor: fix apparmor mediating locking non-fs unix sockets the v8 and earlier policy does not encode the locking permission for no-fs unix sockets. However the kernel is enforcing mediation. Add the AA_MAY_LOCK perm to v8 and earlier computed perm mask which will grant permission for all current abi profiles, but still allow specifying auditing of the operation if needed. Link: http://bugs.launchpad.net/bugs/1780227 Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 1b5a6198f5a9d0aa5497da0dc4bcd4fc166ee516 Author: John Johansen Date: Fri May 6 18:57:12 2022 -0700 apparmor: Fix abi check to include v8 abi The v8 abi is supported by the kernel but the userspace supported version check does not allow for it. This was missed when v8 was added due to a bug in the userspace compiler which was setting an older abi version for v8 encoding (which is forward compatible except on the network encoding). However it is possible to detect the network encoding by checking the policydb network support which the code does. The end result was that missing the abi flag worked until userspace was fixed and began correctly checking for the v8 abi version. Fixes: 56974a6fcfef ("apparmor: add base infastructure for socket mediation") Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33fc95d8293cfca352ac875668857293e22d7d51 Author: John Johansen Date: Mon Jan 17 13:43:49 2022 -0800 apparmor: preparse for state being more than just an integer Convert from an unsigned int to a state_t for state position. This is a step in prepping for the state position carrying some additional flags, and a limited form of backtracking to support variables. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- security/apparmor/domain.c | 25 ++++++++-------- security/apparmor/file.c | 12 ++++---- security/apparmor/include/file.h | 8 +++--- security/apparmor/include/label.h | 6 ++-- security/apparmor/include/lib.h | 4 +-- security/apparmor/include/match.h | 28 +++++++++--------- security/apparmor/include/policy.h | 14 ++++----- security/apparmor/ipc.c | 2 +- security/apparmor/label.c | 14 ++++----- security/apparmor/lib.c | 2 +- security/apparmor/match.c | 58 ++++++++++++++++++-------------------- security/apparmor/mount.c | 10 +++---- security/apparmor/net.c | 2 +- security/apparmor/policy_unpack.c | 16 +++++------ 15 files changed, 101 insertions(+), 102 deletions(-) commit e844fe9b51c984472ea98be3b2d1201ba9ee3213 Author: John Johansen Date: Sat Jul 16 01:53:46 2022 -0700 apparmor: convert policy lookup to use accept as an index Remap polidydb dfa accept table from embedded perms to an index, and then move the perm lookup to use the accept entry as an index into the perm table. This is done so that the perm table can be separated from the dfa, allowing dfa accept to index to share expanded permission sets. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- security/apparmor/include/perms.h | 8 -------- security/apparmor/include/policy.h | 12 ++++++++++++ security/apparmor/label.c | 6 +++--- security/apparmor/mount.c | 8 ++++---- security/apparmor/net.c | 2 +- security/apparmor/policy_unpack.c | 19 ++++++++++++------- 7 files changed, 33 insertions(+), 24 deletions(-) commit bf690f59d0429c62de4db1234f16557eedcb39bf Author: John Johansen Date: Sat Apr 10 02:09:44 2021 -0700 apparmor: cleanup shared permission struct The shared permissions struct has the stop field which is unneeded and the "reserved" subtree field commented which is needed. Also reorganize so that the entries are logically grouped. Signed-off-by: John Johansen security/apparmor/include/perms.h | 17 +++++++---------- security/apparmor/lib.c | 4 ++-- 2 files changed, 9 insertions(+), 12 deletions(-) commit 2d63dd43ae334ec6f5374d37bb06c4cc57621b3c Author: John Johansen Date: Fri Nov 13 23:36:09 2020 -0800 apparmor: convert xmatch lookup to use accept as an index Remap xmatch dfa accept table from embedded perms to an index and then move xmatch lookup to use accept entry to index into the xmatch table. This is step towards unifying permission lookup and reducing the size of permissions tables. Signed-off-by: John Johansen security/apparmor/domain.c | 10 ++++++---- security/apparmor/policy_unpack.c | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) commit 7572fea31e3e5c4c19154ccc064eb1f83dfe1333 Author: John Johansen Date: Fri Nov 13 01:46:23 2020 -0800 apparmor: convert fperm lookup to use accept as an index Remap file dfa accept table from embedded perms to index and then move fperm lookup to use the accept entry as an index into the fperm table. This is a step toward unifying permission lookup. Signed-off-by: John Johansen security/apparmor/file.c | 6 +++-- security/apparmor/policy_unpack.c | 57 +++++++++++++++++++++++++++------------ 2 files changed, 44 insertions(+), 19 deletions(-) commit 048d49544455b3e3a535c4ec89057ea5ca8676f0 Author: John Johansen Date: Sat Nov 21 01:42:40 2020 -0800 apparmor: convert xmatch to using the new shared policydb struct continue permission unification by converting xmatch to use the policydb struct that is used by the other profile dfas. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- security/apparmor/domain.c | 22 ++++++++++++---------- security/apparmor/include/apparmor.h | 1 + security/apparmor/include/policy.h | 4 +--- security/apparmor/policy.c | 3 +-- security/apparmor/policy_unpack.c | 25 ++++++++++++------------- 6 files changed, 28 insertions(+), 29 deletions(-) commit 53bdc46f4bdd20d477afb374767cabe627fd04ae Author: John Johansen Date: Thu Nov 19 10:37:48 2020 -0800 apparmor: combine file_rules and aa_policydb into a single shared struct file_rules and policydb are almost the same and will need the same features in the future so combine them. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 3 ++- security/apparmor/domain.c | 7 ++++--- security/apparmor/file.c | 20 ++++++++++--------- security/apparmor/include/file.h | 39 ++++---------------------------------- security/apparmor/include/policy.h | 14 +++++++++++--- security/apparmor/policy.c | 5 ++--- security/apparmor/policy_unpack.c | 11 ++++++----- 7 files changed, 40 insertions(+), 59 deletions(-) commit e2967ede22978f132cd52929edff96c701bde0eb Author: John Johansen Date: Tue Nov 17 01:38:16 2020 -0800 apparmor: compute policydb permission on profile load Rather than computing policydb permissions for each access permissions can be computed once on profile load and stored for lookup. Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- security/apparmor/include/perms.h | 13 +++++++-- security/apparmor/include/policy.h | 1 + security/apparmor/label.c | 6 ++--- security/apparmor/lib.c | 42 ----------------------------- security/apparmor/mount.c | 53 +++++++++++++----------------------- security/apparmor/net.c | 2 +- security/apparmor/policy.c | 2 +- security/apparmor/policy_unpack.c | 55 +++++++++++++++++++++++++++++++++++++- 9 files changed, 90 insertions(+), 86 deletions(-) commit e48ffd24c1d87dba227225615790cd059a707adb Author: John Johansen Date: Fri Nov 13 16:30:47 2020 -0800 apparmor: convert xmatch to use aa_perms structure Convert xmatch from using perms encoded in the accept entry of the dfa to the common external aa_perms in a table. Signed-off-by: John Johansen security/apparmor/domain.c | 4 ++-- security/apparmor/include/policy.h | 3 ++- security/apparmor/policy_unpack.c | 13 +++++++++---- 3 files changed, 13 insertions(+), 7 deletions(-) commit 0310f093ba95e7640c886298de36560c123df5bd Author: John Johansen Date: Thu Nov 12 10:26:26 2020 -0800 apparmor: rework and cleanup fperm computation shorten the name of some of the mapping functions which shortens line lengths. change the mapping so it returns the perm table instead of operating directly on the file struct. Handle potential memory allocation failure. Signed-off-by: John Johansen security/apparmor/policy_unpack.c | 70 +++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 32 deletions(-) commit 754f209b811ac462e00ed0f79b48047c446f5c43 Author: John Johansen Date: Thu Nov 12 10:07:25 2020 -0800 apparmor: move fperm computation into policy_unpack fperm computation is only needed during policy_unpack so move the code there to isolate it fromt the run time code. Signed-off-by: John Johansen security/apparmor/file.c | 97 -------------------------------------- security/apparmor/include/file.h | 1 - security/apparmor/policy_unpack.c | 98 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 98 deletions(-) commit b5b57993504f91785fa70e002e5e494fb549726e Author: Mike Salvatore Date: Sun May 31 10:52:06 2020 -0400 apparmor: compute xmatch permissions on profile load Rather than computing xmatch permissions each time access is requested, these permissions can be computed once on profile load and stored for lookup. Signed-off-by: Mike Salvatore Signed-off-by: John Johansen security/apparmor/domain.c | 4 ++-- security/apparmor/include/policy.h | 2 ++ security/apparmor/policy.c | 1 + security/apparmor/policy_unpack.c | 22 +++++++++++++++++++++- 4 files changed, 26 insertions(+), 3 deletions(-) commit 408d53e923bd852d5d80243a642004163db53a87 Author: Mike Salvatore Date: Mon Mar 30 16:43:29 2020 -0400 apparmor: compute file permissions on profile load Rather than computing file permissions for each file access, file permissions can be computed once on profile load and stored for lookup. Signed-off-by: Mike Salvatore Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 2 +- security/apparmor/domain.c | 10 +-- security/apparmor/file.c | 128 ++++++++++++++++++++++++++------------ security/apparmor/include/file.h | 15 ++++- security/apparmor/policy_unpack.c | 3 + 5 files changed, 110 insertions(+), 48 deletions(-) commit 2218d08123362c63bab257caf5ec3bc1a6e87ae9 Author: Jon Tourville Date: Mon Jul 11 11:36:09 2022 -0500 apparmor: expose compression level limits in sysfs Create two new files in apparmor's sysfs: /sys/kernel/security/apparmor/raw_data_compression_level_min /sys/kernel/security/apparmor/raw_data_compression_level_max These correspond to the minimum and maximum zstd compression levels that can be assigned to the apparmor module parameter raw_data_compression_level. Signed-off-by: Jon Tourville Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit f4d6b94b40c966ddd9eeb0d451e8a02c595ec7e3 Author: Jon Tourville Date: Mon Jul 11 11:36:08 2022 -0500 apparmor: use zstd compression for profile data Change the algorithm used by apparmor to compress profile data from zlib to zstd, using the new zstd API introduced in 5.16. Zstd provides a larger range of compression levels than zlib and significantly better performance at the default level (for a relatively small increase in compressed size). The apparmor module parameter raw_data_compression_level is now clamped to the minimum and maximum compression levels reported by the zstd library. A compression level of 0 retains the previous behavior of disabling policy compression instead of using zstd's behavior, which is to use the default compression level. Signed-off-by: Jon Tourville Signed-off-by: John Johansen security/apparmor/Kconfig | 4 +- security/apparmor/apparmorfs.c | 60 +++++++++------------ security/apparmor/lsm.c | 10 ++-- security/apparmor/policy_unpack.c | 109 +++++++++++++++++--------------------- 4 files changed, 81 insertions(+), 102 deletions(-) commit f47acc4b7c43d566bf42816335830c4c17f9c200 Author: John Johansen Date: Tue Sep 6 14:03:44 2022 -0700 apparmor: reserve mediation classes Reserve mediation classes that exist in out of tree development branches or are used by userspace mediation helpers. Signed-off-by: John Johansen security/apparmor/include/apparmor.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 9c4557efc558a68e4cd973490fd936d6e3414db8 Author: John Johansen Date: Tue Sep 6 03:39:55 2022 -0700 apparmor: fix lockdep warning when removing a namespace Fix the following lockdep warning [ 1119.158984] ============================================ [ 1119.158988] WARNING: possible recursive locking detected [ 1119.158996] 6.0.0-rc1+ #257 Tainted: G E N [ 1119.158999] -------------------------------------------- [ 1119.159001] bash/80100 is trying to acquire lock: [ 1119.159007] ffff88803e79b4a0 (&ns->lock/1){+.+.}-{4:4}, at: destroy_ns.part.0+0x43/0x140 [ 1119.159028] but task is already holding lock: [ 1119.159030] ffff8881009764a0 (&ns->lock/1){+.+.}-{4:4}, at: aa_remove_profiles+0x3f0/0x640 [ 1119.159040] other info that might help us debug this: [ 1119.159042] Possible unsafe locking scenario: [ 1119.159043] CPU0 [ 1119.159045] ---- [ 1119.159047] lock(&ns->lock/1); [ 1119.159051] lock(&ns->lock/1); [ 1119.159055] *** DEADLOCK *** Which is caused by an incorrect lockdep nesting notation Fixes: feb3c766a3ab ("apparmor: fix possible recursive lock warning in __aa_create_ns") Signed-off-by: John Johansen security/apparmor/policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c73275cf6834787ca090317f1d20dbfa3b7f05aa Author: Gaosheng Cui Date: Tue Aug 23 09:15:03 2022 +0800 apparmor: fix a memleak in multi_transaction_new() In multi_transaction_new(), the variable t is not freed or passed out on the failure of copy_from_user(t->data, buf, size), which could lead to a memleak. Fix this bug by adding a put_multi_transaction(t) in the error path. Fixes: 1dea3b41e84c5 ("apparmor: speed up transactional queries") Signed-off-by: Gaosheng Cui Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 353b6bf2c4f14f0049cc8db5c2cca26882ff76b4 Author: Wei Yongjun Date: Thu Sep 15 16:34:37 2022 +0000 drm/panel: ws2401: Silent no spi_device_id warning Add spi_device_id entries to silent following SPI warning: SPI driver ws2401-panel has no spi_device_id for samsung,lms380kf01 Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20220915163437.2519754-1-weiyongjun@huaweicloud.com drivers/gpu/drm/panel/panel-widechips-ws2401.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b4c1b4ce5d273c9d2be360f6a655aeeb884f67e3 Author: Wei Yongjun Date: Thu Sep 15 16:34:31 2022 +0000 drm/panel: tpg110: Silent no spi_device_id warning Add spi_device_id entries to silent following SPI warning: SPI driver tpo-tpg110-panel has no spi_device_id for tpo,tpg110 Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20220915163431.2519736-1-weiyongjun@huaweicloud.com drivers/gpu/drm/panel/panel-tpo-tpg110.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bd8eb086611a7eb6bd03da2f4c3bddc64d082201 Author: Wei Yongjun Date: Thu Sep 15 16:31:56 2022 +0000 drm/panel: db7430: Silent no spi_device_id warning Add spi_device_id entries to silent following SPI warning: SPI driver db7430-panel has no spi_device_id for samsung,lms397kf04 Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20220915163156.2519577-1-weiyongjun@huaweicloud.com drivers/gpu/drm/panel/panel-samsung-db7430.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a70eebb80022148dfd4d5f60fffd1914ff8e3683 Author: Daniele Ceraolo Spurio Date: Tue Sep 27 17:41:44 2022 -0700 drm/i915/huc: define gsc-compatible HuC fw for DG2 The fw name is different and we need to record the fact that the blob is gsc-loaded, so add a new macro to help. Note: A-step DG2 G10 does not support HuC loading via GSC and would require a separate firmware to be loaded the legacy way, but that's not a production stepping so we're not going to bother. v2: rebase on new fw fetch logic Signed-off-by: Daniele Ceraolo Spurio Cc: Tony Ye Acked-by: Tony Ye Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-15-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit b76c14c8fb2af1e481d51a4eeab8e0c0594824c0 Author: Daniele Ceraolo Spurio Date: Tue Sep 27 17:41:43 2022 -0700 drm/i915/huc: better define HuC status getparam possible return values. The current HuC status getparam return values are a bit confusing in regards to what happens in some scenarios. In particular, most of the error cases cause the ioctl to return an error, but a couple of them, INIT_FAIL and LOAD_FAIL, are not explicitly handled and neither is their expected return value documented; these 2 error cases therefore end up into the catch-all umbrella of the "HuC not loaded" case, with this case therefore including both some error scenarios and the load in progress one. The updates included in this patch change the handling so that all error cases behave the same way, i.e. return an errno code, and so that the HuC load in progress case is unambiguous. The patch also includes a small change to the FW init path to make sure we always transition to an error state if something goes wrong. Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Tony Ye Acked-by: Tvrtko Ursulin Acked-by: Tony Ye Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-14-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc.c | 1 + drivers/gpu/drm/i915/gt/uc/intel_huc.c | 14 +++++++------- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 - include/uapi/drm/i915_drm.h | 16 ++++++++++++++++ 4 files changed, 24 insertions(+), 8 deletions(-) commit e6177ec586d19fc62bba833ca0f6939f1a750928 Author: Daniele Ceraolo Spurio Date: Tue Sep 27 17:41:42 2022 -0700 drm/i915/huc: stall media submission until HuC is loaded Wait on the fence to be signalled to avoid the submissions finding HuC not yet loaded. v2: use dedicaded wait_queue_entry for waiting in HuC load, as submitq can't be re-used for it. Signed-off-by: Daniele Ceraolo Spurio Cc: Tony Ye Acked-by: Tony Ye Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-13-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_huc.h | 6 ++++++ drivers/gpu/drm/i915/i915_request.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_request.h | 5 +++++ 3 files changed, 35 insertions(+) commit 27536e03271da3dafcdddf735102041a26ad5bd0 Author: Daniele Ceraolo Spurio Date: Tue Sep 27 17:41:41 2022 -0700 drm/i915/huc: track delayed HuC load with a fence Given that HuC load is delayed on DG2, this patch adds support for a fence that can be used to wait for load completion. No waiters are added in this patch (they're coming up in the next one), to keep the focus of the patch on the tracking logic. The full HuC loading flow on boot DG2 is as follows: 1) i915 exports the GSC as an aux device; 2) the mei-gsc driver is loaded on the aux device; 3) the mei-pxp component is loaded; 4) mei-pxp calls back into i915 and we load the HuC. Between steps 1 and 2 there can be several seconds of gap, mainly due to the kernel doing other work during the boot. The resume flow is slightly different, because we don't need to re-expose or re-probe the aux device, so we go directly to step 3 once i915 and mei-gsc have completed their resume flow. Here's an example of the boot timing, captured with some logs added to i915: [ 17.908307] [drm] adding GSC device [ 17.915717] [drm] i915 probe done [ 22.282917] [drm] mei-gsc bound [ 22.938153] [drm] HuC authenticated Also to note is that if something goes wrong during GSC HW init the mei-gsc driver will still bind, but steps 3 and 4 will not happen. The status tracking is done by registering a bus_notifier to receive a callback when the mei-gsc driver binds, with a large enough timeout to account for delays. Once mei-gsc is bound, we switch to a smaller timeout to wait for the mei-pxp component to load. The fence is signalled on HuC load complete or if anything goes wrong in any of the tracking steps. Timeout are enforced via hrtimer callbacks. v2: fix includes (Jani) v5: gsc_notifier() remove unneeded () Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-12-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/intel_gsc.c | 22 +++- drivers/gpu/drm/i915/gt/uc/intel_huc.c | 199 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/uc/intel_huc.h | 23 ++++ 3 files changed, 241 insertions(+), 3 deletions(-) commit 087b681805f1de084f89f1041af67295aa981192 Author: Daniele Ceraolo Spurio Date: Tue Sep 27 17:41:40 2022 -0700 drm/i915/dg2: setup HuC loading via GSC The GSC will perform both the load and the authentication, so we just need to check the auth bit after the GSC has replied. Since we require the PXP module to load the HuC, the earliest we can trigger the load is during the pxp_bind operation. Note that GSC-loaded HuC survives GT reset, so we need to just mark it as ready when we re-init the GT HW. V2: move setting of HuC fw error state to the failure path of the HuC auth function, so it covers both the legacy and new auth flows V4: 1. Fix typo in the commit message 2. style fix in intel_huc_wait_for_auth_complete() Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-11-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_huc.c | 41 ++++++++++++++++++++----------- drivers/gpu/drm/i915/gt/uc/intel_huc.h | 2 ++ drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c | 34 +++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h | 1 + drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 14 ++++++++++- 5 files changed, 77 insertions(+), 15 deletions(-) commit 887a193b4fb13e886d34bea4a1d8711fd775c7cf Author: Tomas Winkler Date: Tue Sep 27 17:41:39 2022 -0700 drm/i915/pxp: add huc authentication and loading command Add support for loading HuC via a pxp stream command. V4: 1. Remove unnecessary include in intel_pxp_huc.h (Jani) 2. Adjust copyright year to 2022 Signed-off-by: Tomas Winkler Signed-off-by: Vitaly Lubart Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-10-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/pxp/intel_pxp_huc.c | 69 ++++++++++++++++++++++ drivers/gpu/drm/i915/pxp/intel_pxp_huc.h | 13 ++++ drivers/gpu/drm/i915/pxp/intel_pxp_tee_interface.h | 23 +++++++- 4 files changed, 106 insertions(+), 2 deletions(-) commit 9058f9d795ea9ad59fd579249a6d724d78dfeaf8 Author: Vitaly Lubart Date: Tue Sep 27 17:41:38 2022 -0700 drm/i915/pxp: implement function for sending tee stream command Command to be sent via the stream interface are written to a local memory page, whose address is then provided to the GSC. The interface supports providing a full sg with multiple pages for both input and output messages, but since for now we only aim to support short and synchronous messages we can use a single page for both input and output. Note that the mei interface expects an sg of 4k pages, while our lmem pages are 64k. If we ever need to support more than 4k we'll need to convert. Added a TODO comment to the code to record this. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Cc: Rodrigo Vivi Cc: Alan Previn Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-9-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 115 ++++++++++++++++++++++++++++- drivers/gpu/drm/i915/pxp/intel_pxp_tee.h | 5 ++ drivers/gpu/drm/i915/pxp/intel_pxp_types.h | 6 ++ 3 files changed, 125 insertions(+), 1 deletion(-) commit c5be8fc973830675a6463836e32b9a6e47852447 Author: Daniele Ceraolo Spurio Date: Tue Sep 27 17:41:37 2022 -0700 drm/i915/pxp: load the pxp module when we have a gsc-loaded huc The mei_pxp module is required to send the command to load authenticate the HuC to the GSC even if pxp is not in use for protected content management. Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-8-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/Makefile | 10 +++++---- drivers/gpu/drm/i915/pxp/intel_pxp.c | 32 ++++++++++++++++++---------- drivers/gpu/drm/i915/pxp/intel_pxp.h | 32 ---------------------------- drivers/gpu/drm/i915/pxp/intel_pxp_irq.h | 8 +++++++ drivers/gpu/drm/i915/pxp/intel_pxp_session.c | 8 ++++++- drivers/gpu/drm/i915/pxp/intel_pxp_session.h | 11 +++++++--- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 10 ++++++--- 7 files changed, 57 insertions(+), 54 deletions(-) commit bd58904a328fe53a5b8b8f03127c98b072e0986d Author: Tomas Winkler Date: Tue Sep 27 17:41:36 2022 -0700 mei: pxp: support matching with a gfx discrete card With on-boards graphics card, both i915 and MEI are in the same device hierarchy with the same parent, while for discrete gfx card the MEI is its child device. Adjust the match function for that scenario by matching MEI parent device with i915. Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Cc: Vitaly Lubart Cc: Greg Kroah-Hartman Reviewed-by: Alan Previn Reviewed-by: Greg Kroah-Hartman Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-7-daniele.ceraolospurio@intel.com drivers/misc/mei/pxp/mei_pxp.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit c72891256a8068a4c6e335f3e6944e53539230bb Author: Vitaly Lubart Date: Tue Sep 27 17:41:35 2022 -0700 mei: pxp: add command streamer API to the PXP driver The discrete graphics card with GSC firmware using command streamer API hence it requires to enhance pxp module with the new gsc_command() handler. The handler is implemented via mei_pxp_gsc_command() which is just a thin wrapper around mei_cldev_send_gsc_command() Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Cc: Greg Kroah-Hartman Reviewed-by: Alan Previn Reviewed-by: Greg Kroah-Hartman Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-6-daniele.ceraolospurio@intel.com drivers/misc/mei/pxp/mei_pxp.c | 25 +++++++++++++++++++++++++ include/drm/i915_pxp_tee_interface.h | 5 +++++ 2 files changed, 30 insertions(+) commit 2266e58a1c08efacc97a46fd3793a3b1a9323741 Author: Vitaly Lubart Date: Tue Sep 27 17:41:34 2022 -0700 mei: bus: extend bus API to support command streamer API Add mei bus API for sending gsc commands: mei_cldev_send_gsc_command() The GSC commands are originated in the graphics stack and are in form of SGL DMA buffers. The GSC commands are synchronous, the response is received in the same call on the out sg list buffers. The function setups pointers for in and out sg lists in the mei sgl extended header and sends it to the firmware. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Cc: Greg Kroah-Hartman Reviewed-by: Greg Kroah-Hartman Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-5-daniele.ceraolospurio@intel.com drivers/misc/mei/bus.c | 126 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/mei_cl_bus.h | 6 +++ 2 files changed, 132 insertions(+) commit 2af56dde08a1ae9ef8cfb1186d78d2b9620dc997 Author: Tomas Winkler Date: Tue Sep 27 17:41:33 2022 -0700 mei: adjust extended header kdocs Fix kdoc for struct mei_ext_hdr and mei_ext_begin(). Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Cc: Greg Kroah-Hartman Reviewed-by: Greg Kroah-Hartman Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-4-daniele.ceraolospurio@intel.com drivers/misc/mei/hw.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5d5bc18971543e82f6adf0b31745cf6545bc47a7 Author: Tomas Winkler Date: Tue Sep 27 17:41:32 2022 -0700 mei: bus: enable sending gsc commands GSC command is and extended header containing a scatter gather list and without a data buffer. Using MEI_CL_IO_SGL flag, the caller send the GSC command as a data and the function internally moves it to the extended header. Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Cc: Vitaly Lubart Cc: Greg Kroah-Hartman Reviewed-by: Greg Kroah-Hartman Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-3-daniele.ceraolospurio@intel.com drivers/misc/mei/bus.c | 20 ++++++++++++++++++-- drivers/misc/mei/mei_dev.h | 4 ++++ 2 files changed, 22 insertions(+), 2 deletions(-) commit 4ed1cc997f24c861df7a13d6309479b980d901b2 Author: Tomas Winkler Date: Tue Sep 27 17:41:31 2022 -0700 mei: add support to GSC extended header GSC extend header is of variable size and data is provided in a sgl list inside the header and not in the data buffers, need to enable the path. Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Cc: Vitaly Lubart Cc: Greg Kroah-Hartman Reviewed-by: Greg Kroah-Hartman Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-2-daniele.ceraolospurio@intel.com drivers/misc/mei/client.c | 55 ++++++++++++++++++++++-------- drivers/misc/mei/hbm.c | 13 +++++++ drivers/misc/mei/hw-me.c | 7 +++- drivers/misc/mei/hw.h | 81 ++++++++++++++++++++++++++++++++++++++++++++ drivers/misc/mei/interrupt.c | 47 +++++++++++++++++++++---- drivers/misc/mei/mei_dev.h | 4 +++ 6 files changed, 184 insertions(+), 23 deletions(-) commit 97acb6a8fcc4e5c2cdc2693a35acdc5a7461aaa3 Merge: 6fa964c045a6 7860d720a84c Author: Tvrtko Ursulin Date: Mon Oct 3 17:04:02 2022 +0100 Merge drm/drm-next into drm-intel-gt-next Daniele needs 84d4333c1e28 ("misc/mei: Add NULL check to component match callback functions") in order to merge the DG2 HuC patches. Signed-off-by: Tvrtko Ursulin commit 9519c86523ea136e981ceff30489cdb7b2ecae08 Author: Ville Syrjälä Date: Mon Oct 3 14:32:47 2022 +0300 drm/i915: Fix locking in DRRS debugfs Grab the crtc mutex so that looking at the crtc state is actually safe. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003113249.16213-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_drrs.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit adc831bfc8852034d0834a5a8bf7e35e2faeb8b2 Author: Ville Syrjälä Date: Mon Oct 3 14:32:46 2022 +0300 drm/i915: Make DRRS debugfs per-crtc/connector Since I already broke anything that relied on the old contents of the DRRS debugfs files might as well finish the breakage and convert the files to be per-crtc/connector so we don't need to have annoying code in igt to parse these. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003113249.16213-4-ville.syrjala@linux.intel.com .../gpu/drm/i915/display/intel_display_debugfs.c | 4 +- drivers/gpu/drm/i915/display/intel_drrs.c | 134 ++++++++++----------- drivers/gpu/drm/i915/display/intel_drrs.h | 3 +- 3 files changed, 69 insertions(+), 72 deletions(-) commit 2e25c1fba7145f610c7e4744f3ed99ffff559152 Author: Ville Syrjälä Date: Mon Oct 3 14:32:45 2022 +0300 drm/i915: Make the DRRS debugfs contents more consistent The stuff in the DRRS debugs is currently a hodgepode mix of camelcase, lowercase, spaces, undescores, you name it. Convert over to a reasonably common style. Also move the busy bits thing to be the last sine it's generally the least interesting thing in there. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003113249.16213-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_drrs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 61564e6c5a4addf170b75415c4ac86282784a072 Author: Ville Syrjälä Date: Mon Oct 3 14:32:44 2022 +0300 drm/i915: Move DRRS debugfs next to the implementation Move the DRRS debugfs stuff next to the actual implementation so that it's easier to deal with the whole. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003113249.16213-2-ville.syrjala@linux.intel.com .../gpu/drm/i915/display/intel_display_debugfs.c | 96 +------------------ drivers/gpu/drm/i915/display/intel_drrs.c | 106 +++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_drrs.h | 1 + 3 files changed, 108 insertions(+), 95 deletions(-) commit df2f59c5857b56a5cc40b6562b032c5d8d50cdfc Author: Ville Syrjälä Date: Tue Sep 27 21:24:55 2022 +0300 drm/i915: Reject excessive dotclocks early Make sure modes with crazy big dotclocks are rejected early, so as to not cause problems for subsequent code via integer overflows and whatnot. These would eventually be rejected in intel_crtc_compute_pipe_mode() but that is now too late as we do the clock computations a bit earlier than that. And we don't want to just reorder the two since we still want to check the final computed dotclock against the hardware limit to make sure we didn't end up above the limit due to rounding/etc. Fixes: 0ff0e219d9b8 ("drm/i915: Compute clocks earlier") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927182455.3422-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit d5c45330c8986aff945de997383e19b5b7a85b9a Author: Ville Syrjälä Date: Mon Oct 3 14:15:44 2022 +0300 drm/i915: Simplify modifier lookup in watermark code Replace the huge modifier lists in the watermark code with a few calls to intel_fb.c. Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-7-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_fb.c | 13 +++++++++++++ drivers/gpu/drm/i915/display/intel_fb.h | 1 + drivers/gpu/drm/i915/display/skl_watermark.c | 22 +++------------------- 3 files changed, 17 insertions(+), 19 deletions(-) commit 334810f82024815283a6e7febd3d2de1fed6c232 Author: Ville Syrjälä Date: Mon Oct 3 14:15:43 2022 +0300 drm/i915: Fix watermark calculations for DG2 CCS+CC modifier Take the DG2 CCS+CC modifier into account when calculating the watermarks. Othwerwise we'll calculate the watermarks thinking this tile-4 modifier is linear. The rc_surface part is actually a nop since that is not used for any glk+ platform. Cc: stable@vger.kernel.org Fixes: 680025dcc400 ("drm/i915/dg2: Add support for DG2 clear color compression") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f25d9f81a8e09ace4f04106995550bae1f522143 Author: Ville Syrjälä Date: Mon Oct 3 14:15:42 2022 +0300 drm/i915: Fix watermark calculations for DG2 CCS modifiers Take the DG2 CCS modifiers into account when calculating the watermarks. Othwerwise we'll calculate the watermarks thinking these tile-4 modifiers are linear. The rc_surface part is actually a nop since that is not used for any glk+ platform. Cc: stable@vger.kernel.org Fixes: 4c3afa72138c ("drm/i915/dg2: Add support for DG2 render and media compression") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a627455bbe50a111475d7a42beb58fa64bd96c83 Author: Ville Syrjälä Date: Mon Oct 3 14:15:41 2022 +0300 drm/i915: Fix watermark calculations for gen12+ CCS+CC modifier Take the gen12+ CCS+CC modifier into account when calculating the watermarks. Othwerwise we'll calculate the watermarks thinking this Y-tiled modifier is linear. The rc_surface part is actually a nop since that is not used for any glk+ platform. Cc: stable@vger.kernel.org Fixes: d1e2775e9b96 ("drm/i915/tgl: Add Clear Color support for TGL Render Decompression") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 91c9651425fe955b1387f3637607dda005f3f710 Author: Ville Syrjälä Date: Mon Oct 3 14:15:40 2022 +0300 drm/i915: Fix watermark calculations for gen12+ MC CCS modifier Take the gen12+ MC CCS modifier into account when calculating the watermarks. Othwerwise we'll calculate the watermarks thinking this Y-tiled modifier is linear. The rc_surface part is actually a nop since that is not used for any glk+ platform. v2: Split RC CCS vs. MC CCS to separate patches Cc: stable@vger.kernel.org Fixes: 2dfbf9d2873a ("drm/i915/tgl: Gen-12 display can decompress surfaces compressed by the media engine") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a89a96a586114f67598c6391c75678b4dba5c2da Author: Ville Syrjälä Date: Mon Oct 3 14:15:39 2022 +0300 drm/i915: Fix watermark calculations for gen12+ RC CCS modifier Take the gen12+ RC CCS modifier into account when calculating the watermarks. Othwerwise we'll calculate the watermarks thinking this Y-tiled modifier is linear. The rc_surface part is actually a nop since that is not used for any glk+ platform. v2: Split RC CCS vs. MC CCS to separate patches Cc: stable@vger.kernel.org Fixes: b3e57bccd68a ("drm/i915/tgl: Gen-12 render decompression") Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8da8e32e0b095613af2c2ce4b322240269164a8e Author: Jouni Högander Date: Mon Oct 3 10:20:11 2022 +0300 drm/i915/psr: Fix PSR_IMR/IIR field handling Current PSR code is supposed to use TRANSCODER_EDP to force 0 shift for bits in PSR_IMR/IIR registers: /* * gen12+ has registers relative to transcoder and one per transcoder * using the same bit definition: handle it as TRANSCODER_EDP to force * 0 shift in bit definition */ At the time of writing the code assumption "TRANSCODER_EDP == 0" was made. This is not the case and all fields in PSR_IMR and PSR_IIR are shifted incorrectly if DISPLAY_VER >= 12. Fix this by adding separate register field defines for >=12 and add bit getter functions to keep code readability. v4: - Remove EDP from TGL definitions (José) - Use REG_BIT and REG_GENMASK (José) v3: - Add separate register field defines (José) - Add bit getter functions (José) v2: - Improve commit message (José) Cc: José Roberto de Souza Cc: Mika Kahola Fixes: 8241cfbe67f4 ("drm/i915/tgl: Access the right register when handling PSR interruptions") Signed-off-by: Jouni Högander Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20221003072011.72408-1-jouni.hogander@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 78 +++++++++++++++++++------------- drivers/gpu/drm/i915/i915_reg.h | 16 +++++-- 2 files changed, 59 insertions(+), 35 deletions(-) commit 6fa964c045a6bc3321a9186e87bfbcfd1059b0f1 Author: Tejas Upadhyay Date: Fri Sep 30 19:02:23 2022 +0530 drm/i915/ehl: Update MOCS table for EHL Add these extra EHL entries back since we have drm-tip commit 13d29c823738 ("drm/i915/ehl: unconditionally flush the pages on acquire") introduces proper flushing to make it work as expected. Cc: Chris Wilson Cc: Matthew Auld Fixes: 046091758b50 ("Revert "drm/i915/ehl: Update MOCS table for EHL"") Signed-off-by: Matt Roper Signed-off-by: Tejas Upadhyay Acked-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220930133223.2757282-1-tejas.upadhyay@intel.com drivers/gpu/drm/i915/gt/intel_mocs.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d263545ef0a32a087ec9dd89edb2ee1be1de629f Author: Lucas De Marchi Date: Thu Sep 29 22:09:03 2022 -0700 drm/i915/gt: Fix platform prefix Different handling for XeHP and later platforms should be using the xehp prefix, not gen125. Rename them. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220930050903.3479619-4-lucas.demarchi@intel.com drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 24 +++++++++++----------- drivers/gpu/drm/i915/gt/gen8_engine_cs.h | 12 +++++------ .../gpu/drm/i915/gt/intel_execlists_submission.c | 4 ++-- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) commit b1f80a5aaa9e8e1c2cbaf5bd65bb27bcaefb33d3 Author: Lucas De Marchi Date: Thu Sep 29 22:09:02 2022 -0700 drm/i915/gt: Document function to decode register state context It's not obvious how the encode/decode of the per platform tables is done. Document it so while adding tables for new platforms people can be confident they right things is being done. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220930050903.3479619-3-lucas.demarchi@intel.com drivers/gpu/drm/i915/gt/intel_lrc.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit c3d5cfe7b978acea8c0613fb3a068d376ad93463 Author: Lucas De Marchi Date: Thu Sep 29 22:09:01 2022 -0700 drm/i915: Fix __gen125_emit_bb_start() without WA ce->wa_bb_page is allocated only for graphics version 12. However __gen125_emit_bb_start() is used for any graphics version >= 12.50. For the currently supported platforms this is not an issue, but for future ones there's a mismatch causing the jump to `wa_offset + DG2_PREDICATE_RESULT_BB` to be invalid since wa_offset is not correct. As in other places in the driver, check for graphics version "greater or equal" to future-proof the support for new platforms. Cc: Matt Roper Cc: Matthew Auld Cc: Chris Wilson Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220930050903.3479619-2-lucas.demarchi@intel.com drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 2 ++ drivers/gpu/drm/i915/gt/intel_lrc.c | 19 +++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) commit dbb2ffbfd708b2d0f1b7fe0083c5e3333d0fe35b Author: Aravind Iddamsetty Date: Thu Sep 29 17:16:58 2022 +0530 drm/i915/mtl: enable local stolen memory As an integrated GPU, MTL does not have local memory and HAS_LMEM() returns false. However the platform's stolen memory is presented via BAR2 (i.e., the BAR we traditionally consider to be the GMADR on IGFX) and should be managed by the driver the same way that local memory is on dgpu platforms (which includes setting the "lmem" bit on page table entries). We use the term "local stolen memory" to refer to this model. The major difference from the traditional BAR2 (GMADR) is that the stolen area is mapped via the BAR2 while in the former BAR2 is an aperture into the GTT VA through which access are made into stolen area. BSPEC: 53098, 63830 v2: 1. dropped is_dsm_invalid, updated valid_stolen_size check from Lucas (Jani, Lucas) 2. drop lmembar_is_igpu_stolen 3. revert to referring GFXMEM_BAR as GEN12_LMEM_BAR (Lucas) v3:(Jani) 1. rename get_mtl_gms_size to mtl_get_gms_size 2. define register for MMIO address v4:(Matt) 1. Use REG_FIELD_GET to read GMS value 2. replace the calculations with SZ_256M/SZ_8M v5: Include more details to commit message on how it is different from earlier platforms (Anshuman) Cc: Matt Roper Cc: Lucas De Marchi Cc: Jani Nikula Signed-off-by: CQ Tang Signed-off-by: Aravind Iddamsetty Original-author: CQ Tang Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220929114658.145287-1-aravind.iddamsetty@intel.com drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 83 ++++++++++++++++++++++++------ drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/i915_reg.h | 4 ++ 4 files changed, 76 insertions(+), 16 deletions(-) commit df71c6e4d5e54a79a772c3f8a3676ab6bf169c46 Author: Ming Qian Date: Fri Aug 12 15:22:09 2022 +0800 media: imx-jpeg: Lock on ioctl encoder/decoder stop cmd the ioctl encoder/decoder cmd is under queue lock, and buf_done is in the irq, it can't be locked with the mutex, they are not synchronized. when v4l2_update_last_buf_state is called to handle the encoder/decoder stop cmd, the last src buffer may be done at the same time. so it's possible that last_src_buf is set, but the output rdy_queue is empty, then driver won't mark it stopped, as v4l2_m2m_is_last_draining_src_buf() will always return false and v4l2_m2m_dst_buf_is_last() return false too. In this case, the drain will be blocked. add the hw lock around the ioctl encoder/decoder cmd, to synchronize with the buf_done. Fixes: 4911c5acf935 ("media: imx-jpeg: Implement drain using v4l2-mem2mem helpers") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ccc9f1db9c6b06205f35d4dcbd19a9cb16a25d03 Author: Ming Qian Date: Tue Sep 27 11:12:17 2022 +0800 media: imx-jpeg: Support contiguous and non contiguous format mxc-jpeg supports non contiguous format nv12m, and in order to compatible with the devices that only support contiguous format nv12, jpeg can support nv12 and nv12m in the same time. Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil [hverkuil: document is_rgb variable] drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 226 ++++++++++++++++++++----- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h | 8 +- 2 files changed, 186 insertions(+), 48 deletions(-) commit d45da67caedacd500879de5e649360cc70777af7 Author: Yuan Can Date: Sat Sep 24 06:32:04 2022 +0000 fs/ntfs3: Use strcmp to determine attribute type The way of determin attribute type is just matching name with the predefined string, do this with strcmp to simplify the code. Signed-off-by: Yuan Can Signed-off-by: Konstantin Komarov fs/ntfs3/xattr.c | 44 ++++++++++++++------------------------------ 1 file changed, 14 insertions(+), 30 deletions(-) commit 887bfc546097fbe8071dac13b2fef73b77920899 Author: Hawkins Jiawei Date: Fri Sep 23 19:09:04 2022 +0800 fs/ntfs3: Fix slab-out-of-bounds read in run_unpack Syzkaller reports slab-out-of-bounds bug as follows: ================================================================== BUG: KASAN: slab-out-of-bounds in run_unpack+0x8b7/0x970 fs/ntfs3/run.c:944 Read of size 1 at addr ffff88801bbdff02 by task syz-executor131/3611 [...] Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 run_unpack+0x8b7/0x970 fs/ntfs3/run.c:944 run_unpack_ex+0xb0/0x7c0 fs/ntfs3/run.c:1057 ntfs_read_mft fs/ntfs3/inode.c:368 [inline] ntfs_iget5+0xc20/0x3280 fs/ntfs3/inode.c:501 ntfs_loadlog_and_replay+0x124/0x5d0 fs/ntfs3/fsntfs.c:272 ntfs_fill_super+0x1eff/0x37f0 fs/ntfs3/super.c:1018 get_tree_bdev+0x440/0x760 fs/super.c:1323 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd [...] The buggy address belongs to the physical page: page:ffffea00006ef600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1bbd8 head:ffffea00006ef600 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801bbdfe00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801bbdfe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801bbdff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801bbdff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801bbe0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Kernel will tries to read record and parse MFT from disk in ntfs_read_mft(). Yet the problem is that during enumerating attributes in record, kernel doesn't check whether run_off field loading from the disk is a valid value. To be more specific, if attr->nres.run_off is larger than attr->size, kernel will passes an invalid argument run_buf_size in run_unpack_ex(), which having an integer overflow. Then this invalid argument will triggers the slab-out-of-bounds Read bug as above. This patch solves it by adding the sanity check between the offset to packed runs and attribute size. link: https://lore.kernel.org/all/0000000000009145fc05e94bd5c3@google.com/#t Reported-and-tested-by: syzbot+8d6fbb27a6aded64b25b@syzkaller.appspotmail.com Signed-off-by: Hawkins Jiawei Signed-off-by: Konstantin Komarov fs/ntfs3/inode.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 54e45702b648b7c0000e90b3e9b890e367e16ea8 Author: Edward Lo Date: Fri Sep 23 00:50:23 2022 +0800 fs/ntfs3: Validate resident attribute name Though we already have some sanity checks while enumerating attributes, resident attribute names aren't included. This patch checks the resident attribute names are in the valid ranges. [ 259.209031] BUG: KASAN: slab-out-of-bounds in ni_create_attr_list+0x1e1/0x850 [ 259.210770] Write of size 426 at addr ffff88800632f2b2 by task exp/255 [ 259.211551] [ 259.212035] CPU: 0 PID: 255 Comm: exp Not tainted 6.0.0-rc6 #37 [ 259.212955] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 259.214387] Call Trace: [ 259.214640] [ 259.214895] dump_stack_lvl+0x49/0x63 [ 259.215284] print_report.cold+0xf5/0x689 [ 259.215565] ? kasan_poison+0x3c/0x50 [ 259.215778] ? kasan_unpoison+0x28/0x60 [ 259.215991] ? ni_create_attr_list+0x1e1/0x850 [ 259.216270] kasan_report+0xa7/0x130 [ 259.216481] ? ni_create_attr_list+0x1e1/0x850 [ 259.216719] kasan_check_range+0x15a/0x1d0 [ 259.216939] memcpy+0x3c/0x70 [ 259.217136] ni_create_attr_list+0x1e1/0x850 [ 259.217945] ? __rcu_read_unlock+0x5b/0x280 [ 259.218384] ? ni_remove_attr+0x2e0/0x2e0 [ 259.218712] ? kernel_text_address+0xcf/0xe0 [ 259.219064] ? __kernel_text_address+0x12/0x40 [ 259.219434] ? arch_stack_walk+0x9e/0xf0 [ 259.219668] ? __this_cpu_preempt_check+0x13/0x20 [ 259.219904] ? sysvec_apic_timer_interrupt+0x57/0xc0 [ 259.220140] ? asm_sysvec_apic_timer_interrupt+0x1b/0x20 [ 259.220561] ni_ins_attr_ext+0x52c/0x5c0 [ 259.220984] ? ni_create_attr_list+0x850/0x850 [ 259.221532] ? run_deallocate+0x120/0x120 [ 259.221972] ? vfs_setxattr+0x128/0x300 [ 259.222688] ? setxattr+0x126/0x140 [ 259.222921] ? path_setxattr+0x164/0x180 [ 259.223431] ? __x64_sys_setxattr+0x6d/0x80 [ 259.223828] ? entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 259.224417] ? mi_find_attr+0x3c/0xf0 [ 259.224772] ni_insert_attr+0x1ba/0x420 [ 259.225216] ? ni_ins_attr_ext+0x5c0/0x5c0 [ 259.225504] ? ntfs_read_ea+0x119/0x450 [ 259.225775] ni_insert_resident+0xc0/0x1c0 [ 259.226316] ? ni_insert_nonresident+0x400/0x400 [ 259.227001] ? __kasan_kmalloc+0x88/0xb0 [ 259.227468] ? __kmalloc+0x192/0x320 [ 259.227773] ntfs_set_ea+0x6bf/0xb30 [ 259.228216] ? ftrace_graph_ret_addr+0x2a/0xb0 [ 259.228494] ? entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 259.228838] ? ntfs_read_ea+0x450/0x450 [ 259.229098] ? is_bpf_text_address+0x24/0x40 [ 259.229418] ? kernel_text_address+0xcf/0xe0 [ 259.229681] ? __kernel_text_address+0x12/0x40 [ 259.229948] ? unwind_get_return_address+0x3a/0x60 [ 259.230271] ? write_profile+0x270/0x270 [ 259.230537] ? arch_stack_walk+0x9e/0xf0 [ 259.230836] ntfs_setxattr+0x114/0x5c0 [ 259.231099] ? ntfs_set_acl_ex+0x2e0/0x2e0 [ 259.231529] ? evm_protected_xattr_common+0x6d/0x100 [ 259.231817] ? posix_xattr_acl+0x13/0x80 [ 259.232073] ? evm_protect_xattr+0x1f7/0x440 [ 259.232351] __vfs_setxattr+0xda/0x120 [ 259.232635] ? xattr_resolve_name+0x180/0x180 [ 259.232912] __vfs_setxattr_noperm+0x93/0x300 [ 259.233219] __vfs_setxattr_locked+0x141/0x160 [ 259.233492] ? kasan_poison+0x3c/0x50 [ 259.233744] vfs_setxattr+0x128/0x300 [ 259.234002] ? __vfs_setxattr_locked+0x160/0x160 [ 259.234837] do_setxattr+0xb8/0x170 [ 259.235567] ? vmemdup_user+0x53/0x90 [ 259.236212] setxattr+0x126/0x140 [ 259.236491] ? do_setxattr+0x170/0x170 [ 259.236791] ? debug_smp_processor_id+0x17/0x20 [ 259.237232] ? kasan_quarantine_put+0x57/0x180 [ 259.237605] ? putname+0x80/0xa0 [ 259.237870] ? __kasan_slab_free+0x11c/0x1b0 [ 259.238234] ? putname+0x80/0xa0 [ 259.238500] ? preempt_count_sub+0x18/0xc0 [ 259.238775] ? __mnt_want_write+0xaa/0x100 [ 259.238990] ? mnt_want_write+0x8b/0x150 [ 259.239290] path_setxattr+0x164/0x180 [ 259.239605] ? setxattr+0x140/0x140 [ 259.239849] ? debug_smp_processor_id+0x17/0x20 [ 259.240174] ? fpregs_assert_state_consistent+0x67/0x80 [ 259.240411] __x64_sys_setxattr+0x6d/0x80 [ 259.240715] do_syscall_64+0x3b/0x90 [ 259.240934] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 259.241697] RIP: 0033:0x7fc6b26e4469 [ 259.242647] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 088 [ 259.244512] RSP: 002b:00007ffc3c7841f8 EFLAGS: 00000217 ORIG_RAX: 00000000000000bc [ 259.245086] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc6b26e4469 [ 259.246025] RDX: 00007ffc3c784380 RSI: 00007ffc3c7842e0 RDI: 00007ffc3c784238 [ 259.246961] RBP: 00007ffc3c788410 R08: 0000000000000001 R09: 00007ffc3c7884f8 [ 259.247775] R10: 000000000000007f R11: 0000000000000217 R12: 00000000004004e0 [ 259.248534] R13: 00007ffc3c7884f0 R14: 0000000000000000 R15: 0000000000000000 [ 259.249368] [ 259.249644] [ 259.249888] Allocated by task 255: [ 259.250283] kasan_save_stack+0x26/0x50 [ 259.250957] __kasan_kmalloc+0x88/0xb0 [ 259.251826] __kmalloc+0x192/0x320 [ 259.252745] ni_create_attr_list+0x11e/0x850 [ 259.253298] ni_ins_attr_ext+0x52c/0x5c0 [ 259.253685] ni_insert_attr+0x1ba/0x420 [ 259.253974] ni_insert_resident+0xc0/0x1c0 [ 259.254311] ntfs_set_ea+0x6bf/0xb30 [ 259.254629] ntfs_setxattr+0x114/0x5c0 [ 259.254859] __vfs_setxattr+0xda/0x120 [ 259.255155] __vfs_setxattr_noperm+0x93/0x300 [ 259.255445] __vfs_setxattr_locked+0x141/0x160 [ 259.255862] vfs_setxattr+0x128/0x300 [ 259.256251] do_setxattr+0xb8/0x170 [ 259.256522] setxattr+0x126/0x140 [ 259.256911] path_setxattr+0x164/0x180 [ 259.257308] __x64_sys_setxattr+0x6d/0x80 [ 259.257637] do_syscall_64+0x3b/0x90 [ 259.257970] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 259.258550] [ 259.258772] The buggy address belongs to the object at ffff88800632f000 [ 259.258772] which belongs to the cache kmalloc-1k of size 1024 [ 259.260190] The buggy address is located 690 bytes inside of [ 259.260190] 1024-byte region [ffff88800632f000, ffff88800632f400) [ 259.261412] [ 259.261743] The buggy address belongs to the physical page: [ 259.262354] page:0000000081e8cac9 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x632c [ 259.263722] head:0000000081e8cac9 order:2 compound_mapcount:0 compound_pincount:0 [ 259.264284] flags: 0xfffffc0010200(slab|head|node=0|zone=1|lastcpupid=0x1fffff) [ 259.265312] raw: 000fffffc0010200 ffffea0000060d00 dead000000000004 ffff888001041dc0 [ 259.265772] raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 [ 259.266305] page dumped because: kasan: bad access detected [ 259.266588] [ 259.266728] Memory state around the buggy address: [ 259.267225] ffff88800632f300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 259.267841] ffff88800632f380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 259.269111] >ffff88800632f400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 259.269626] ^ [ 259.270162] ffff88800632f480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 259.270810] ffff88800632f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc Signed-off-by: Edward Lo Signed-off-by: Konstantin Komarov fs/ntfs3/record.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4d42ecda239cc13738d6fd84d098a32e67b368b9 Author: Edward Lo Date: Thu Sep 22 15:30:44 2022 +0800 fs/ntfs3: Validate buffer length while parsing index indx_read is called when we have some NTFS directory operations that need more information from the index buffers. This adds a sanity check to make sure the returned index buffer length is legit, or we may have some out-of-bound memory accesses. [ 560.897595] BUG: KASAN: slab-out-of-bounds in hdr_find_e.isra.0+0x10c/0x320 [ 560.898321] Read of size 2 at addr ffff888009497238 by task exp/245 [ 560.898760] [ 560.899129] CPU: 0 PID: 245 Comm: exp Not tainted 6.0.0-rc6 #37 [ 560.899505] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 560.900170] Call Trace: [ 560.900407] [ 560.900732] dump_stack_lvl+0x49/0x63 [ 560.901108] print_report.cold+0xf5/0x689 [ 560.901395] ? hdr_find_e.isra.0+0x10c/0x320 [ 560.901716] kasan_report+0xa7/0x130 [ 560.901950] ? hdr_find_e.isra.0+0x10c/0x320 [ 560.902208] __asan_load2+0x68/0x90 [ 560.902427] hdr_find_e.isra.0+0x10c/0x320 [ 560.902846] ? cmp_uints+0xe0/0xe0 [ 560.903363] ? cmp_sdh+0x90/0x90 [ 560.903883] ? ntfs_bread_run+0x190/0x190 [ 560.904196] ? rwsem_down_read_slowpath+0x750/0x750 [ 560.904969] ? ntfs_fix_post_read+0xe0/0x130 [ 560.905259] ? __kasan_check_write+0x14/0x20 [ 560.905599] ? up_read+0x1a/0x90 [ 560.905853] ? indx_read+0x22c/0x380 [ 560.906096] indx_find+0x2ef/0x470 [ 560.906352] ? indx_find_buffer+0x2d0/0x2d0 [ 560.906692] ? __kasan_kmalloc+0x88/0xb0 [ 560.906977] dir_search_u+0x196/0x2f0 [ 560.907220] ? ntfs_nls_to_utf16+0x450/0x450 [ 560.907464] ? __kasan_check_write+0x14/0x20 [ 560.907747] ? mutex_lock+0x8f/0xe0 [ 560.907970] ? __mutex_lock_slowpath+0x20/0x20 [ 560.908214] ? kmem_cache_alloc+0x143/0x4b0 [ 560.908459] ntfs_lookup+0xe0/0x100 [ 560.908788] __lookup_slow+0x116/0x220 [ 560.909050] ? lookup_fast+0x1b0/0x1b0 [ 560.909309] ? lookup_fast+0x13f/0x1b0 [ 560.909601] walk_component+0x187/0x230 [ 560.909944] link_path_walk.part.0+0x3f0/0x660 [ 560.910285] ? handle_lookup_down+0x90/0x90 [ 560.910618] ? path_init+0x642/0x6e0 [ 560.911084] ? percpu_counter_add_batch+0x6e/0xf0 [ 560.912559] ? __alloc_file+0x114/0x170 [ 560.913008] path_openat+0x19c/0x1d10 [ 560.913419] ? getname_flags+0x73/0x2b0 [ 560.913815] ? kasan_save_stack+0x3a/0x50 [ 560.914125] ? kasan_save_stack+0x26/0x50 [ 560.914542] ? __kasan_slab_alloc+0x6d/0x90 [ 560.914924] ? kmem_cache_alloc+0x143/0x4b0 [ 560.915339] ? getname_flags+0x73/0x2b0 [ 560.915647] ? getname+0x12/0x20 [ 560.916114] ? __x64_sys_open+0x4c/0x60 [ 560.916460] ? path_lookupat.isra.0+0x230/0x230 [ 560.916867] ? __isolate_free_page+0x2e0/0x2e0 [ 560.917194] do_filp_open+0x15c/0x1f0 [ 560.917448] ? may_open_dev+0x60/0x60 [ 560.917696] ? expand_files+0xa4/0x3a0 [ 560.917923] ? __kasan_check_write+0x14/0x20 [ 560.918185] ? _raw_spin_lock+0x88/0xdb [ 560.918409] ? _raw_spin_lock_irqsave+0x100/0x100 [ 560.918783] ? _find_next_bit+0x4a/0x130 [ 560.919026] ? _raw_spin_unlock+0x19/0x40 [ 560.919276] ? alloc_fd+0x14b/0x2d0 [ 560.919635] do_sys_openat2+0x32a/0x4b0 [ 560.920035] ? file_open_root+0x230/0x230 [ 560.920336] ? __rcu_read_unlock+0x5b/0x280 [ 560.920813] do_sys_open+0x99/0xf0 [ 560.921208] ? filp_open+0x60/0x60 [ 560.921482] ? exit_to_user_mode_prepare+0x49/0x180 [ 560.921867] __x64_sys_open+0x4c/0x60 [ 560.922128] do_syscall_64+0x3b/0x90 [ 560.922369] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 560.923030] RIP: 0033:0x7f7dff2e4469 [ 560.923681] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 088 [ 560.924451] RSP: 002b:00007ffd41a210b8 EFLAGS: 00000206 ORIG_RAX: 0000000000000002 [ 560.925168] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7dff2e4469 [ 560.925655] RDX: 0000000000000000 RSI: 0000000000000002 RDI: 00007ffd41a211f0 [ 560.926085] RBP: 00007ffd41a252a0 R08: 00007f7dff60fba0 R09: 00007ffd41a25388 [ 560.926405] R10: 0000000000400b80 R11: 0000000000000206 R12: 00000000004004e0 [ 560.926867] R13: 00007ffd41a25380 R14: 0000000000000000 R15: 0000000000000000 [ 560.927241] [ 560.927491] [ 560.927755] Allocated by task 245: [ 560.928409] kasan_save_stack+0x26/0x50 [ 560.929271] __kasan_kmalloc+0x88/0xb0 [ 560.929778] __kmalloc+0x192/0x320 [ 560.930023] indx_read+0x249/0x380 [ 560.930224] indx_find+0x2a2/0x470 [ 560.930695] dir_search_u+0x196/0x2f0 [ 560.930892] ntfs_lookup+0xe0/0x100 [ 560.931115] __lookup_slow+0x116/0x220 [ 560.931323] walk_component+0x187/0x230 [ 560.931570] link_path_walk.part.0+0x3f0/0x660 [ 560.931791] path_openat+0x19c/0x1d10 [ 560.932008] do_filp_open+0x15c/0x1f0 [ 560.932226] do_sys_openat2+0x32a/0x4b0 [ 560.932413] do_sys_open+0x99/0xf0 [ 560.932709] __x64_sys_open+0x4c/0x60 [ 560.933417] do_syscall_64+0x3b/0x90 [ 560.933776] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 560.934235] [ 560.934486] The buggy address belongs to the object at ffff888009497000 [ 560.934486] which belongs to the cache kmalloc-512 of size 512 [ 560.935239] The buggy address is located 56 bytes to the right of [ 560.935239] 512-byte region [ffff888009497000, ffff888009497200) [ 560.936153] [ 560.937326] The buggy address belongs to the physical page: [ 560.938228] page:0000000062a3dfae refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x9496 [ 560.939616] head:0000000062a3dfae order:1 compound_mapcount:0 compound_pincount:0 [ 560.940219] flags: 0xfffffc0010200(slab|head|node=0|zone=1|lastcpupid=0x1fffff) [ 560.942702] raw: 000fffffc0010200 ffffea0000164f80 dead000000000005 ffff888001041c80 [ 560.943932] raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 [ 560.944568] page dumped because: kasan: bad access detected [ 560.945735] [ 560.946112] Memory state around the buggy address: [ 560.946870] ffff888009497100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 560.947242] ffff888009497180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 560.947611] >ffff888009497200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 560.947915] ^ [ 560.948249] ffff888009497280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 560.948687] ffff888009497300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc Signed-off-by: Edward Lo Signed-off-by: Konstantin Komarov fs/ntfs3/index.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e001e60869390686809663c02bceb1d3922548fb Author: Dan Carpenter Date: Mon Sep 12 18:08:51 2022 +0300 fs/ntfs3: Harden against integer overflows Smatch complains that the "add_bytes" is not to be trusted. Use size_add() to prevent an integer overflow. Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations") Signed-off-by: Dan Carpenter Signed-off-by: Konstantin Komarov fs/ntfs3/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f1dc7d9756e66f3f876839ea174df2e656b7f79 Author: Edward Lo Date: Fri Sep 9 09:04:00 2022 +0800 fs/ntfs3: Validate attribute name offset Although the attribute name length is checked before comparing it to some common names (e.g., $I30), the offset isn't. This adds a sanity check for the attribute name offset, guarantee the validity and prevent possible out-of-bound memory accesses. [ 191.720056] BUG: unable to handle page fault for address: ffffebde00000008 [ 191.721060] #PF: supervisor read access in kernel mode [ 191.721586] #PF: error_code(0x0000) - not-present page [ 191.722079] PGD 0 P4D 0 [ 191.722571] Oops: 0000 [#1] PREEMPT SMP KASAN NOPTI [ 191.723179] CPU: 0 PID: 244 Comm: mount Not tainted 6.0.0-rc4 #28 [ 191.723749] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 191.724832] RIP: 0010:kfree+0x56/0x3b0 [ 191.725870] Code: 80 48 01 d8 0f 82 65 03 00 00 48 c7 c2 00 00 00 80 48 2b 15 2c 06 dd 01 48 01 d0 48 c1 e8 0c 48 c1 e0 06 48 03 05 0a 069 [ 191.727375] RSP: 0018:ffff8880076f7878 EFLAGS: 00000286 [ 191.727897] RAX: ffffebde00000000 RBX: 0000000000000040 RCX: ffffffff8528d5b9 [ 191.728531] RDX: 0000777f80000000 RSI: ffffffff8522d49c RDI: 0000000000000040 [ 191.729183] RBP: ffff8880076f78a0 R08: 0000000000000000 R09: 0000000000000000 [ 191.729628] R10: ffff888008949fd8 R11: ffffed10011293fd R12: 0000000000000040 [ 191.730158] R13: ffff888008949f98 R14: ffff888008949ec0 R15: ffff888008949fb0 [ 191.730645] FS: 00007f3520cd7e40(0000) GS:ffff88805ba00000(0000) knlGS:0000000000000000 [ 191.731328] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 191.731667] CR2: ffffebde00000008 CR3: 0000000009704000 CR4: 00000000000006f0 [ 191.732568] Call Trace: [ 191.733231] [ 191.733860] kvfree+0x2c/0x40 [ 191.734632] ni_clear+0x180/0x290 [ 191.735085] ntfs_evict_inode+0x45/0x70 [ 191.735495] evict+0x199/0x280 [ 191.735996] iput.part.0+0x286/0x320 [ 191.736438] iput+0x32/0x50 [ 191.736811] iget_failed+0x23/0x30 [ 191.737270] ntfs_iget5+0x337/0x1890 [ 191.737629] ? ntfs_clear_mft_tail+0x20/0x260 [ 191.738201] ? ntfs_get_block_bmap+0x70/0x70 [ 191.738482] ? ntfs_objid_init+0xf6/0x140 [ 191.738779] ? ntfs_reparse_init+0x140/0x140 [ 191.739266] ntfs_fill_super+0x121b/0x1b50 [ 191.739623] ? put_ntfs+0x1d0/0x1d0 [ 191.739984] ? asm_sysvec_apic_timer_interrupt+0x1b/0x20 [ 191.740466] ? put_ntfs+0x1d0/0x1d0 [ 191.740787] ? sb_set_blocksize+0x6a/0x80 [ 191.741272] get_tree_bdev+0x232/0x370 [ 191.741829] ? put_ntfs+0x1d0/0x1d0 [ 191.742669] ntfs_fs_get_tree+0x15/0x20 [ 191.743132] vfs_get_tree+0x4c/0x130 [ 191.743457] path_mount+0x654/0xfe0 [ 191.743938] ? putname+0x80/0xa0 [ 191.744271] ? finish_automount+0x2e0/0x2e0 [ 191.744582] ? putname+0x80/0xa0 [ 191.745053] ? kmem_cache_free+0x1c4/0x440 [ 191.745403] ? putname+0x80/0xa0 [ 191.745616] do_mount+0xd6/0xf0 [ 191.745887] ? path_mount+0xfe0/0xfe0 [ 191.746287] ? __kasan_check_write+0x14/0x20 [ 191.746582] __x64_sys_mount+0xca/0x110 [ 191.746850] do_syscall_64+0x3b/0x90 [ 191.747122] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 191.747517] RIP: 0033:0x7f351fee948a [ 191.748332] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008 [ 191.749341] RSP: 002b:00007ffd51cf3af8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 [ 191.749960] RAX: ffffffffffffffda RBX: 000055b903733060 RCX: 00007f351fee948a [ 191.750589] RDX: 000055b903733260 RSI: 000055b9037332e0 RDI: 000055b90373bce0 [ 191.751115] RBP: 0000000000000000 R08: 000055b903733280 R09: 0000000000000020 [ 191.751537] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 000055b90373bce0 [ 191.751946] R13: 000055b903733260 R14: 0000000000000000 R15: 00000000ffffffff [ 191.752519] [ 191.752782] Modules linked in: [ 191.753785] CR2: ffffebde00000008 [ 191.754937] ---[ end trace 0000000000000000 ]--- [ 191.755429] RIP: 0010:kfree+0x56/0x3b0 [ 191.755725] Code: 80 48 01 d8 0f 82 65 03 00 00 48 c7 c2 00 00 00 80 48 2b 15 2c 06 dd 01 48 01 d0 48 c1 e8 0c 48 c1 e0 06 48 03 05 0a 069 [ 191.756744] RSP: 0018:ffff8880076f7878 EFLAGS: 00000286 [ 191.757218] RAX: ffffebde00000000 RBX: 0000000000000040 RCX: ffffffff8528d5b9 [ 191.757580] RDX: 0000777f80000000 RSI: ffffffff8522d49c RDI: 0000000000000040 [ 191.758016] RBP: ffff8880076f78a0 R08: 0000000000000000 R09: 0000000000000000 [ 191.758570] R10: ffff888008949fd8 R11: ffffed10011293fd R12: 0000000000000040 [ 191.758957] R13: ffff888008949f98 R14: ffff888008949ec0 R15: ffff888008949fb0 [ 191.759317] FS: 00007f3520cd7e40(0000) GS:ffff88805ba00000(0000) knlGS:0000000000000000 [ 191.759711] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 191.760118] CR2: ffffebde00000008 CR3: 0000000009704000 CR4: 00000000000006f0 Signed-off-by: Edward Lo Signed-off-by: Konstantin Komarov fs/ntfs3/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit c1ca8ef0262b25493631ecbd9cb8c9893e1481a1 Author: Edward Lo Date: Fri Sep 9 09:03:10 2022 +0800 fs/ntfs3: Add null pointer check for inode operations This adds a sanity check for the i_op pointer of the inode which is returned after reading Root directory MFT record. We should check the i_op is valid before trying to create the root dentry, otherwise we may encounter a NPD while mounting a image with a funny Root directory MFT record. [ 114.484325] BUG: kernel NULL pointer dereference, address: 0000000000000008 [ 114.484811] #PF: supervisor read access in kernel mode [ 114.485084] #PF: error_code(0x0000) - not-present page [ 114.485606] PGD 0 P4D 0 [ 114.485975] Oops: 0000 [#1] PREEMPT SMP KASAN NOPTI [ 114.486570] CPU: 0 PID: 237 Comm: mount Tainted: G B 6.0.0-rc4 #28 [ 114.486977] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 114.488169] RIP: 0010:d_flags_for_inode+0xe0/0x110 [ 114.488816] Code: 24 f7 ff 49 83 3e 00 74 41 41 83 cd 02 66 44 89 6b 02 eb 92 48 8d 7b 20 e8 6d 24 f7 ff 4c 8b 73 20 49 8d 7e 08 e8 60 241 [ 114.490326] RSP: 0018:ffff8880065e7aa8 EFLAGS: 00000296 [ 114.490695] RAX: 0000000000000001 RBX: ffff888008ccd750 RCX: ffffffff84af2aea [ 114.490986] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff87abd020 [ 114.491364] RBP: ffff8880065e7ac8 R08: 0000000000000001 R09: fffffbfff0f57a05 [ 114.491675] R10: ffffffff87abd027 R11: fffffbfff0f57a04 R12: 0000000000000000 [ 114.491954] R13: 0000000000000008 R14: 0000000000000000 R15: ffff888008ccd750 [ 114.492397] FS: 00007fdc8a627e40(0000) GS:ffff888058200000(0000) knlGS:0000000000000000 [ 114.492797] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 114.493150] CR2: 0000000000000008 CR3: 00000000013ba000 CR4: 00000000000006f0 [ 114.493671] Call Trace: [ 114.493890] [ 114.494075] __d_instantiate+0x24/0x1c0 [ 114.494505] d_instantiate.part.0+0x35/0x50 [ 114.494754] d_make_root+0x53/0x80 [ 114.494998] ntfs_fill_super+0x1232/0x1b50 [ 114.495260] ? put_ntfs+0x1d0/0x1d0 [ 114.495499] ? vsprintf+0x20/0x20 [ 114.495723] ? set_blocksize+0x95/0x150 [ 114.495964] get_tree_bdev+0x232/0x370 [ 114.496272] ? put_ntfs+0x1d0/0x1d0 [ 114.496502] ntfs_fs_get_tree+0x15/0x20 [ 114.496859] vfs_get_tree+0x4c/0x130 [ 114.497099] path_mount+0x654/0xfe0 [ 114.497507] ? putname+0x80/0xa0 [ 114.497933] ? finish_automount+0x2e0/0x2e0 [ 114.498362] ? putname+0x80/0xa0 [ 114.498571] ? kmem_cache_free+0x1c4/0x440 [ 114.498819] ? putname+0x80/0xa0 [ 114.499069] do_mount+0xd6/0xf0 [ 114.499343] ? path_mount+0xfe0/0xfe0 [ 114.499683] ? __kasan_check_write+0x14/0x20 [ 114.500133] __x64_sys_mount+0xca/0x110 [ 114.500592] do_syscall_64+0x3b/0x90 [ 114.500930] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 114.501294] RIP: 0033:0x7fdc898e948a [ 114.501542] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008 [ 114.502716] RSP: 002b:00007ffd793e58f8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 [ 114.503175] RAX: ffffffffffffffda RBX: 0000564b2228f060 RCX: 00007fdc898e948a [ 114.503588] RDX: 0000564b2228f260 RSI: 0000564b2228f2e0 RDI: 0000564b22297ce0 [ 114.504925] RBP: 0000000000000000 R08: 0000564b2228f280 R09: 0000000000000020 [ 114.505484] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 0000564b22297ce0 [ 114.505823] R13: 0000564b2228f260 R14: 0000000000000000 R15: 00000000ffffffff [ 114.506562] [ 114.506887] Modules linked in: [ 114.507648] CR2: 0000000000000008 [ 114.508884] ---[ end trace 0000000000000000 ]--- [ 114.509675] RIP: 0010:d_flags_for_inode+0xe0/0x110 [ 114.510140] Code: 24 f7 ff 49 83 3e 00 74 41 41 83 cd 02 66 44 89 6b 02 eb 92 48 8d 7b 20 e8 6d 24 f7 ff 4c 8b 73 20 49 8d 7e 08 e8 60 241 [ 114.511762] RSP: 0018:ffff8880065e7aa8 EFLAGS: 00000296 [ 114.512401] RAX: 0000000000000001 RBX: ffff888008ccd750 RCX: ffffffff84af2aea [ 114.513103] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff87abd020 [ 114.513512] RBP: ffff8880065e7ac8 R08: 0000000000000001 R09: fffffbfff0f57a05 [ 114.513831] R10: ffffffff87abd027 R11: fffffbfff0f57a04 R12: 0000000000000000 [ 114.514757] R13: 0000000000000008 R14: 0000000000000000 R15: ffff888008ccd750 [ 114.515411] FS: 00007fdc8a627e40(0000) GS:ffff888058200000(0000) knlGS:0000000000000000 [ 114.515794] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 114.516208] CR2: 0000000000000008 CR3: 00000000013ba000 CR4: 00000000000006f0 Signed-off-by: Edward Lo Signed-off-by: Konstantin Komarov fs/ntfs3/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a4e7ce6bc03389d75bc62eb6de66cb5efc55839 Author: Daniel Pinto Date: Wed Sep 7 02:45:13 2022 +0100 fs/ntfs3: Fix junction point resolution The ntfs3 file system driver does not convert the target path of junction points to a proper Linux path. As junction points targets are always absolute paths (they start with a drive letter), all junctions will result in broken links. Translate the targets of junction points to relative paths so they point to directories inside the mounted volume. Note that Windows allows junction points to reference directories in another drive. However, as there is no way to know which drive the junctions refer to, we assume they always target the same file system they are in. Link: https://bugzilla.kernel.org/show_bug.cgi?id=214833 Signed-off-by: Daniel Pinto Signed-off-by: Konstantin Komarov fs/ntfs3/inode.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 101 insertions(+), 2 deletions(-) commit caad9dd8792a2622737b7273cb34835fd9536cd2 Author: Shigeru Yoshida Date: Tue Aug 23 23:46:25 2022 +0900 fs/ntfs3: Avoid UBSAN error on true_sectors_per_clst() syzbot reported UBSAN error as below: [ 76.901829][ T6677] ================================================================================ [ 76.903908][ T6677] UBSAN: shift-out-of-bounds in fs/ntfs3/super.c:675:13 [ 76.905363][ T6677] shift exponent -247 is negative This patch avoid this error. Link: https://syzkaller.appspot.com/bug?id=b0299c09a14aababf0f1c862dd4ebc8ab9eb0179 Fixes: a3b774342fa7 (fs/ntfs3: validate BOOT sectors_per_clusters) Cc: Author: Randy Dunlap Reported-by: syzbot+35b87c668935bb55e666@syzkaller.appspotmail.com Signed-off-by: Shigeru Yoshida Signed-off-by: Konstantin Komarov fs/ntfs3/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51e76a232f8c037f1d9e9922edc25b003d5f3414 Author: Shigeru Yoshida Date: Tue Aug 23 19:32:05 2022 +0900 fs/ntfs3: Fix memory leak on ntfs_fill_super() error path syzbot reported kmemleak as below: BUG: memory leak unreferenced object 0xffff8880122f1540 (size 32): comm "a.out", pid 6664, jiffies 4294939771 (age 25.500s) 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 ed ff ed ff 00 00 00 00 ................ backtrace: [] ntfs_init_fs_context+0x22/0x1c0 [] alloc_fs_context+0x217/0x430 [] path_mount+0x704/0x1080 [] __x64_sys_mount+0x18c/0x1d0 [] do_syscall_64+0x34/0xb0 [] entry_SYSCALL_64_after_hwframe+0x63/0xcd This patch fixes this issue by freeing mount options on error path of ntfs_fill_super(). Reported-by: syzbot+9d67170b20e8f94351c8@syzkaller.appspotmail.com Signed-off-by: Shigeru Yoshida Signed-off-by: Konstantin Komarov fs/ntfs3/super.c | 1 + 1 file changed, 1 insertion(+) commit 92f017c4aee6e2bb79593adeacccbea3afe62223 Author: Kenneth Lee Date: Thu Aug 18 22:51:17 2022 -0700 fs/ntfs3: Use kmalloc_array for allocating multiple elements Prefer using kmalloc_array(a, b) over kmalloc(a * b) as this improves semantics since kmalloc is intended for allocating an array of memory. Signed-off-by: Kenneth Lee Signed-off-by: Konstantin Komarov fs/ntfs3/bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d5c9e79b726cc473d40e9cb60976dbe8e669624 Author: Alon Zahavi Date: Mon Aug 15 14:07:12 2022 +0300 fs/ntfs3: Fix attr_punch_hole() null pointer derenference The bug occours due to a misuse of `attr` variable instead of `attr_b`. `attr` is being initialized as NULL, then being derenfernced as `attr->res.data_size`. This bug causes a crash of the ntfs3 driver itself, If compiled directly to the kernel, it crashes the whole system. Signed-off-by: Alon Zahavi Co-developed-by: Tal Lossos Signed-off-by: Tal Lossos Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f27b92ec0926efa3eadcebb97a90faba12e16041 Author: Marc Aurèle La France Date: Wed Aug 10 14:28:04 2022 -0600 fs/ntfs3: Fix [df]mask display in /proc/mounts ntfs3's dmask and fmask mount options are 16-bit quantities but are displayed as 1-extended 32-bit values in /proc/mounts. Fix this by circumventing integer promotion. Signed-off-by: Marc Aurèle La France Signed-off-by: Konstantin Komarov fs/ntfs3/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2681631c29739509eec59cc0b34e977bb04c6cf1 Author: Edward Lo Date: Sun Aug 7 01:05:18 2022 +0800 fs/ntfs3: Add null pointer check to attr_load_runs_vcn Some metadata files are handled before MFT. This adds a null pointer check for some corner cases that could lead to NPD while reading these metadata files for a malformed NTFS image. [ 240.190827] BUG: kernel NULL pointer dereference, address: 0000000000000158 [ 240.191583] #PF: supervisor read access in kernel mode [ 240.191956] #PF: error_code(0x0000) - not-present page [ 240.192391] PGD 0 P4D 0 [ 240.192897] Oops: 0000 [#1] PREEMPT SMP KASAN NOPTI [ 240.193805] CPU: 0 PID: 242 Comm: mount Tainted: G B 5.19.0+ #17 [ 240.194477] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 240.195152] RIP: 0010:ni_find_attr+0xae/0x300 [ 240.195679] Code: c8 48 c7 45 88 c0 4e 5e 86 c7 00 f1 f1 f1 f1 c7 40 04 00 f3 f3 f3 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 e8 e2 d9f [ 240.196642] RSP: 0018:ffff88800812f690 EFLAGS: 00000286 [ 240.197019] RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffffffff85ef037a [ 240.197523] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff88e95f60 [ 240.197877] RBP: ffff88800812f738 R08: 0000000000000001 R09: fffffbfff11d2bed [ 240.198292] R10: ffffffff88e95f67 R11: fffffbfff11d2bec R12: 0000000000000000 [ 240.198647] R13: 0000000000000080 R14: 0000000000000000 R15: 0000000000000000 [ 240.199410] FS: 00007f233c33be40(0000) GS:ffff888058200000(0000) knlGS:0000000000000000 [ 240.199895] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 240.200314] CR2: 0000000000000158 CR3: 0000000004d32000 CR4: 00000000000006f0 [ 240.200839] Call Trace: [ 240.201104] [ 240.201502] ? ni_load_mi+0x80/0x80 [ 240.202297] ? ___slab_alloc+0x465/0x830 [ 240.202614] attr_load_runs_vcn+0x8c/0x1a0 [ 240.202886] ? __kasan_slab_alloc+0x32/0x90 [ 240.203157] ? attr_data_write_resident+0x250/0x250 [ 240.203543] mi_read+0x133/0x2c0 [ 240.203785] mi_get+0x70/0x140 [ 240.204012] ni_load_mi_ex+0xfa/0x190 [ 240.204346] ? ni_std5+0x90/0x90 [ 240.204588] ? __kasan_kmalloc+0x88/0xb0 [ 240.204859] ni_enum_attr_ex+0xf1/0x1c0 [ 240.205107] ? ni_fname_type.part.0+0xd0/0xd0 [ 240.205600] ? ntfs_load_attr_list+0xbe/0x300 [ 240.205864] ? ntfs_cmp_names_cpu+0x125/0x180 [ 240.206157] ntfs_iget5+0x56c/0x1870 [ 240.206510] ? ntfs_get_block_bmap+0x70/0x70 [ 240.206776] ? __kasan_kmalloc+0x88/0xb0 [ 240.207030] ? set_blocksize+0x95/0x150 [ 240.207545] ntfs_fill_super+0xb8f/0x1e20 [ 240.207839] ? put_ntfs+0x1d0/0x1d0 [ 240.208069] ? vsprintf+0x20/0x20 [ 240.208467] ? mutex_unlock+0x81/0xd0 [ 240.208846] ? set_blocksize+0x95/0x150 [ 240.209221] get_tree_bdev+0x232/0x370 [ 240.209804] ? put_ntfs+0x1d0/0x1d0 [ 240.210519] ntfs_fs_get_tree+0x15/0x20 [ 240.210991] vfs_get_tree+0x4c/0x130 [ 240.211455] path_mount+0x645/0xfd0 [ 240.211806] ? putname+0x80/0xa0 [ 240.212112] ? finish_automount+0x2e0/0x2e0 [ 240.212559] ? kmem_cache_free+0x110/0x390 [ 240.212906] ? putname+0x80/0xa0 [ 240.213329] do_mount+0xd6/0xf0 [ 240.213829] ? path_mount+0xfd0/0xfd0 [ 240.214246] ? __kasan_check_write+0x14/0x20 [ 240.214774] __x64_sys_mount+0xca/0x110 [ 240.215080] do_syscall_64+0x3b/0x90 [ 240.215442] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 240.215811] RIP: 0033:0x7f233b4e948a [ 240.216104] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008 [ 240.217615] RSP: 002b:00007fff02211ec8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 [ 240.218718] RAX: ffffffffffffffda RBX: 0000561cdc35b060 RCX: 00007f233b4e948a [ 240.219556] RDX: 0000561cdc35b260 RSI: 0000561cdc35b2e0 RDI: 0000561cdc363af0 [ 240.219975] RBP: 0000000000000000 R08: 0000561cdc35b280 R09: 0000000000000020 [ 240.220403] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 0000561cdc363af0 [ 240.220803] R13: 0000561cdc35b260 R14: 0000000000000000 R15: 00000000ffffffff [ 240.221256] [ 240.221567] Modules linked in: [ 240.222028] CR2: 0000000000000158 [ 240.223291] ---[ end trace 0000000000000000 ]--- [ 240.223669] RIP: 0010:ni_find_attr+0xae/0x300 [ 240.224058] Code: c8 48 c7 45 88 c0 4e 5e 86 c7 00 f1 f1 f1 f1 c7 40 04 00 f3 f3 f3 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 e8 e2 d9f [ 240.225033] RSP: 0018:ffff88800812f690 EFLAGS: 00000286 [ 240.225968] RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffffffff85ef037a [ 240.226624] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff88e95f60 [ 240.227307] RBP: ffff88800812f738 R08: 0000000000000001 R09: fffffbfff11d2bed [ 240.227816] R10: ffffffff88e95f67 R11: fffffbfff11d2bec R12: 0000000000000000 [ 240.228330] R13: 0000000000000080 R14: 0000000000000000 R15: 0000000000000000 [ 240.228729] FS: 00007f233c33be40(0000) GS:ffff888058200000(0000) knlGS:0000000000000000 [ 240.229281] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 240.230298] CR2: 0000000000000158 CR3: 0000000004d32000 CR4: 00000000000006f0 Signed-off-by: Edward Lo Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6db620863f8528ed9a9aa5ad323b26554a17881d Author: Edward Lo Date: Sat Aug 6 00:47:27 2022 +0800 fs/ntfs3: Validate data run offset This adds sanity checks for data run offset. We should make sure data run offset is legit before trying to unpack them, otherwise we may encounter use-after-free or some unexpected memory access behaviors. [ 82.940342] BUG: KASAN: use-after-free in run_unpack+0x2e3/0x570 [ 82.941180] Read of size 1 at addr ffff888008a8487f by task mount/240 [ 82.941670] [ 82.942069] CPU: 0 PID: 240 Comm: mount Not tainted 5.19.0+ #15 [ 82.942482] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 82.943720] Call Trace: [ 82.944204] [ 82.944471] dump_stack_lvl+0x49/0x63 [ 82.944908] print_report.cold+0xf5/0x67b [ 82.945141] ? __wait_on_bit+0x106/0x120 [ 82.945750] ? run_unpack+0x2e3/0x570 [ 82.946626] kasan_report+0xa7/0x120 [ 82.947046] ? run_unpack+0x2e3/0x570 [ 82.947280] __asan_load1+0x51/0x60 [ 82.947483] run_unpack+0x2e3/0x570 [ 82.947709] ? memcpy+0x4e/0x70 [ 82.947927] ? run_pack+0x7a0/0x7a0 [ 82.948158] run_unpack_ex+0xad/0x3f0 [ 82.948399] ? mi_enum_attr+0x14a/0x200 [ 82.948717] ? run_unpack+0x570/0x570 [ 82.949072] ? ni_enum_attr_ex+0x1b2/0x1c0 [ 82.949332] ? ni_fname_type.part.0+0xd0/0xd0 [ 82.949611] ? mi_read+0x262/0x2c0 [ 82.949970] ? ntfs_cmp_names_cpu+0x125/0x180 [ 82.950249] ntfs_iget5+0x632/0x1870 [ 82.950621] ? ntfs_get_block_bmap+0x70/0x70 [ 82.951192] ? evict+0x223/0x280 [ 82.951525] ? iput.part.0+0x286/0x320 [ 82.951969] ntfs_fill_super+0x1321/0x1e20 [ 82.952436] ? put_ntfs+0x1d0/0x1d0 [ 82.952822] ? vsprintf+0x20/0x20 [ 82.953188] ? mutex_unlock+0x81/0xd0 [ 82.953379] ? set_blocksize+0x95/0x150 [ 82.954001] get_tree_bdev+0x232/0x370 [ 82.954438] ? put_ntfs+0x1d0/0x1d0 [ 82.954700] ntfs_fs_get_tree+0x15/0x20 [ 82.955049] vfs_get_tree+0x4c/0x130 [ 82.955292] path_mount+0x645/0xfd0 [ 82.955615] ? putname+0x80/0xa0 [ 82.955955] ? finish_automount+0x2e0/0x2e0 [ 82.956310] ? kmem_cache_free+0x110/0x390 [ 82.956723] ? putname+0x80/0xa0 [ 82.957023] do_mount+0xd6/0xf0 [ 82.957411] ? path_mount+0xfd0/0xfd0 [ 82.957638] ? __kasan_check_write+0x14/0x20 [ 82.957948] __x64_sys_mount+0xca/0x110 [ 82.958310] do_syscall_64+0x3b/0x90 [ 82.958719] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 82.959341] RIP: 0033:0x7fd0d1ce948a [ 82.960193] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008 [ 82.961532] RSP: 002b:00007ffe59ff69a8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 [ 82.962527] RAX: ffffffffffffffda RBX: 0000564dcc107060 RCX: 00007fd0d1ce948a [ 82.963266] RDX: 0000564dcc107260 RSI: 0000564dcc1072e0 RDI: 0000564dcc10fce0 [ 82.963686] RBP: 0000000000000000 R08: 0000564dcc107280 R09: 0000000000000020 [ 82.964272] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 0000564dcc10fce0 [ 82.964785] R13: 0000564dcc107260 R14: 0000000000000000 R15: 00000000ffffffff Signed-off-by: Edward Lo Signed-off-by: Konstantin Komarov fs/ntfs3/attrib.c | 13 +++++++++++++ fs/ntfs3/attrlist.c | 5 +++++ fs/ntfs3/frecord.c | 14 ++++++++++++++ fs/ntfs3/fslog.c | 9 +++++++++ fs/ntfs3/inode.c | 5 +++++ 5 files changed, 46 insertions(+) commit e19c6277652efba203af4ecd8eed4bd30a0054c9 Author: edward lo Date: Mon Aug 1 18:20:51 2022 +0800 fs/ntfs3: Add overflow check for attribute size The offset addition could overflow and pass the used size check given an attribute with very large size (e.g., 0xffffff7f) while parsing MFT attributes. This could lead to out-of-bound memory R/W if we try to access the next attribute derived by Add2Ptr(attr, asize) [ 32.963847] BUG: unable to handle page fault for address: ffff956a83c76067 [ 32.964301] #PF: supervisor read access in kernel mode [ 32.964526] #PF: error_code(0x0000) - not-present page [ 32.964893] PGD 4dc01067 P4D 4dc01067 PUD 0 [ 32.965316] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 32.965727] CPU: 0 PID: 243 Comm: mount Not tainted 5.19.0+ #6 [ 32.966050] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 32.966628] RIP: 0010:mi_enum_attr+0x44/0x110 [ 32.967239] Code: 89 f0 48 29 c8 48 89 c1 39 c7 0f 86 94 00 00 00 8b 56 04 83 fa 17 0f 86 88 00 00 00 89 d0 01 ca 48 01 f0 8d 4a 08 39 f9a [ 32.968101] RSP: 0018:ffffba15c06a7c38 EFLAGS: 00000283 [ 32.968364] RAX: ffff956a83c76067 RBX: ffff956983c76050 RCX: 000000000000006f [ 32.968651] RDX: 0000000000000067 RSI: ffff956983c760e8 RDI: 00000000000001c8 [ 32.968963] RBP: ffffba15c06a7c38 R08: 0000000000000064 R09: 00000000ffffff7f [ 32.969249] R10: 0000000000000007 R11: ffff956983c760e8 R12: ffff95698225e000 [ 32.969870] R13: 0000000000000000 R14: ffffba15c06a7cd8 R15: ffff95698225e170 [ 32.970655] FS: 00007fdab8189e40(0000) GS:ffff9569fdc00000(0000) knlGS:0000000000000000 [ 32.971098] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 32.971378] CR2: ffff956a83c76067 CR3: 0000000002c58000 CR4: 00000000000006f0 [ 32.972098] Call Trace: [ 32.972842] [ 32.973341] ni_enum_attr_ex+0xda/0xf0 [ 32.974087] ntfs_iget5+0x1db/0xde0 [ 32.974386] ? slab_post_alloc_hook+0x53/0x270 [ 32.974778] ? ntfs_fill_super+0x4c7/0x12a0 [ 32.975115] ntfs_fill_super+0x5d6/0x12a0 [ 32.975336] get_tree_bdev+0x175/0x270 [ 32.975709] ? put_ntfs+0x150/0x150 [ 32.975956] ntfs_fs_get_tree+0x15/0x20 [ 32.976191] vfs_get_tree+0x2a/0xc0 [ 32.976374] ? capable+0x19/0x20 [ 32.976572] path_mount+0x484/0xaa0 [ 32.977025] ? putname+0x57/0x70 [ 32.977380] do_mount+0x80/0xa0 [ 32.977555] __x64_sys_mount+0x8b/0xe0 [ 32.978105] do_syscall_64+0x3b/0x90 [ 32.978830] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 32.979311] RIP: 0033:0x7fdab72e948a [ 32.980015] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008 [ 32.981251] RSP: 002b:00007ffd15b87588 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 [ 32.981832] RAX: ffffffffffffffda RBX: 0000557de0aaf060 RCX: 00007fdab72e948a [ 32.982234] RDX: 0000557de0aaf260 RSI: 0000557de0aaf2e0 RDI: 0000557de0ab7ce0 [ 32.982714] RBP: 0000000000000000 R08: 0000557de0aaf280 R09: 0000000000000020 [ 32.983046] R10: 00000000c0ed0000 R11: 0000000000000206 R12: 0000557de0ab7ce0 [ 32.983494] R13: 0000557de0aaf260 R14: 0000000000000000 R15: 00000000ffffffff [ 32.984094] [ 32.984352] Modules linked in: [ 32.984753] CR2: ffff956a83c76067 [ 32.985911] ---[ end trace 0000000000000000 ]--- [ 32.986555] RIP: 0010:mi_enum_attr+0x44/0x110 [ 32.987217] Code: 89 f0 48 29 c8 48 89 c1 39 c7 0f 86 94 00 00 00 8b 56 04 83 fa 17 0f 86 88 00 00 00 89 d0 01 ca 48 01 f0 8d 4a 08 39 f9a [ 32.988232] RSP: 0018:ffffba15c06a7c38 EFLAGS: 00000283 [ 32.988532] RAX: ffff956a83c76067 RBX: ffff956983c76050 RCX: 000000000000006f [ 32.988916] RDX: 0000000000000067 RSI: ffff956983c760e8 RDI: 00000000000001c8 [ 32.989356] RBP: ffffba15c06a7c38 R08: 0000000000000064 R09: 00000000ffffff7f [ 32.989994] R10: 0000000000000007 R11: ffff956983c760e8 R12: ffff95698225e000 [ 32.990415] R13: 0000000000000000 R14: ffffba15c06a7cd8 R15: ffff95698225e170 [ 32.991011] FS: 00007fdab8189e40(0000) GS:ffff9569fdc00000(0000) knlGS:0000000000000000 [ 32.991524] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 32.991936] CR2: ffff956a83c76067 CR3: 0000000002c58000 CR4: 00000000000006f0 This patch adds an overflow check Signed-off-by: edward lo Signed-off-by: Konstantin Komarov fs/ntfs3/record.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0b66046266690454dc04e6307bcff4a5605b42a1 Author: edward lo Date: Mon Aug 1 15:37:31 2022 +0800 fs/ntfs3: Validate BOOT record_size When the NTFS BOOT record_size field < 0, it represents a shift value. However, there is no sanity check on the shift result and the sbi->record_bits calculation through blksize_bits() assumes the size always > 256, which could lead to NPD while mounting a malformed NTFS image. [ 318.675159] BUG: kernel NULL pointer dereference, address: 0000000000000158 [ 318.675682] #PF: supervisor read access in kernel mode [ 318.675869] #PF: error_code(0x0000) - not-present page [ 318.676246] PGD 0 P4D 0 [ 318.676502] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 318.676934] CPU: 0 PID: 259 Comm: mount Not tainted 5.19.0 #5 [ 318.677289] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 318.678136] RIP: 0010:ni_find_attr+0x2d/0x1c0 [ 318.678656] Code: 89 ca 4d 89 c7 41 56 41 55 41 54 41 89 cc 55 48 89 fd 53 48 89 d3 48 83 ec 20 65 48 8b 04 25 28 00 00 00 48 89 44 24 180 [ 318.679848] RSP: 0018:ffffa6c8c0297bd8 EFLAGS: 00000246 [ 318.680104] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000080 [ 318.680790] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 318.681679] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 318.682577] R10: 0000000000000000 R11: 0000000000000005 R12: 0000000000000080 [ 318.683015] R13: ffff8d5582e68400 R14: 0000000000000100 R15: 0000000000000000 [ 318.683618] FS: 00007fd9e1c81e40(0000) GS:ffff8d55fdc00000(0000) knlGS:0000000000000000 [ 318.684280] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 318.684651] CR2: 0000000000000158 CR3: 0000000002e1a000 CR4: 00000000000006f0 [ 318.685623] Call Trace: [ 318.686607] [ 318.686872] ? ntfs_alloc_inode+0x1a/0x60 [ 318.687235] attr_load_runs_vcn+0x2b/0xa0 [ 318.687468] mi_read+0xbb/0x250 [ 318.687576] ntfs_iget5+0x114/0xd90 [ 318.687750] ntfs_fill_super+0x588/0x11b0 [ 318.687953] ? put_ntfs+0x130/0x130 [ 318.688065] ? snprintf+0x49/0x70 [ 318.688164] ? put_ntfs+0x130/0x130 [ 318.688256] get_tree_bdev+0x16a/0x260 [ 318.688407] vfs_get_tree+0x20/0xb0 [ 318.688519] path_mount+0x2dc/0x9b0 [ 318.688877] do_mount+0x74/0x90 [ 318.689142] __x64_sys_mount+0x89/0xd0 [ 318.689636] do_syscall_64+0x3b/0x90 [ 318.689998] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 318.690318] RIP: 0033:0x7fd9e133c48a [ 318.690687] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008 [ 318.691357] RSP: 002b:00007ffd374406c8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 [ 318.691632] RAX: ffffffffffffffda RBX: 0000564d0b051080 RCX: 00007fd9e133c48a [ 318.691920] RDX: 0000564d0b051280 RSI: 0000564d0b051300 RDI: 0000564d0b0596a0 [ 318.692123] RBP: 0000000000000000 R08: 0000564d0b0512a0 R09: 0000000000000020 [ 318.692349] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 0000564d0b0596a0 [ 318.692673] R13: 0000564d0b051280 R14: 0000000000000000 R15: 00000000ffffffff [ 318.693007] [ 318.693271] Modules linked in: [ 318.693614] CR2: 0000000000000158 [ 318.694446] ---[ end trace 0000000000000000 ]--- [ 318.694779] RIP: 0010:ni_find_attr+0x2d/0x1c0 [ 318.694952] Code: 89 ca 4d 89 c7 41 56 41 55 41 54 41 89 cc 55 48 89 fd 53 48 89 d3 48 83 ec 20 65 48 8b 04 25 28 00 00 00 48 89 44 24 180 [ 318.696042] RSP: 0018:ffffa6c8c0297bd8 EFLAGS: 00000246 [ 318.696531] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000080 [ 318.698114] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 318.699286] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 318.699795] R10: 0000000000000000 R11: 0000000000000005 R12: 0000000000000080 [ 318.700236] R13: ffff8d5582e68400 R14: 0000000000000100 R15: 0000000000000000 [ 318.700973] FS: 00007fd9e1c81e40(0000) GS:ffff8d55fdc00000(0000) knlGS:0000000000000000 [ 318.701688] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 318.702190] CR2: 0000000000000158 CR3: 0000000002e1a000 CR4: 00000000000006f0 [ 318.726510] mount (259) used greatest stack depth: 13320 bytes left This patch adds a sanity check. Signed-off-by: edward lo Signed-off-by: Konstantin Komarov fs/ntfs3/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43f03acbc1ec73beea9700f46f9cfdec388614d2 Author: Konstantin Komarov Date: Fri Sep 23 13:35:22 2022 +0300 fs/ntfs3: Rename variables and add comment After renaming we don't need to split code in two lines. Signed-off-by: Konstantin Komarov fs/ntfs3/frecord.c | 1 + fs/ntfs3/fslog.c | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 13 deletions(-) commit a3a956c78efaa202b1d75190136671cf6e87bfbe Author: Konstantin Komarov Date: Fri Sep 23 12:42:18 2022 +0300 fs/ntfs3: Add option "nocase" This commit adds mount option and additional functions. Signed-off-by: Konstantin Komarov fs/ntfs3/index.c | 2 +- fs/ntfs3/namei.c | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ntfs3/ntfs_fs.h | 4 ++ fs/ntfs3/super.c | 6 +++ fs/ntfs3/upcase.c | 12 +++++ 5 files changed, 162 insertions(+), 1 deletion(-) commit ae6b47b5653e986e1dcaeb1ca7d13a04aeefdcfe Author: Konstantin Komarov Date: Mon Sep 12 18:54:06 2022 +0300 fs/ntfs3: Change destroy_inode to free_inode Many filesystems already use free_inode callback, so we will use it too from now on. Signed-off-by: Konstantin Komarov fs/ntfs3/super.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 098250db5dfcc01161fd64e9bce5b012280a85b3 Author: Konstantin Komarov Date: Mon Sep 12 18:28:51 2022 +0300 fs/ntfs3: Add hidedotfiles option With this option all files with filename[0] == '.' will have FILE_ATTRIBUTE_HIDDEN attribute. Signed-off-by: Konstantin Komarov fs/ntfs3/inode.c | 4 ++++ fs/ntfs3/ntfs_fs.h | 1 + fs/ntfs3/super.c | 5 +++++ 3 files changed, 10 insertions(+) commit 8b450a82a3dc3108b3718b68edf58c60aeed1801 Author: Ming Qian Date: Tue Sep 27 11:12:16 2022 +0800 media: imx-jpeg: Implement g_selection and s_selection The codec can support any image size WxH, with arbitrary W (image width) and H (image height) dimensions. But it requires buffer alignment, so driver can report the aligned resolution through the g_fmt, and report the actual resolution through the g_selection. For encoder, it even support to encode a smaller jpeg than the original picture through s_selection api. For the decoder, we do not support cropping a portion smaller than the original picture, due to hardware limitations (wrapper side). Fixes: 9e7aa76cdb02 ("media: imx-jpeg: Align upwards buffer size") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 327 ++++++++++++++++--------- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h | 1 + 2 files changed, 208 insertions(+), 120 deletions(-) commit bd6ae049b7be4785082e5c3c0a80e8c9e3ff2fc6 Author: Konstantin Komarov Date: Fri Sep 9 19:12:31 2022 +0300 fs/ntfs3: Add comments about cluster size This commit adds additional info about CONFIG_NTFS3_64BIT_CLUSTER Signed-off-by: Konstantin Komarov fs/ntfs3/frecord.c | 2 +- fs/ntfs3/record.c | 4 ++++ fs/ntfs3/super.c | 24 ++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) commit bf8460d2f4e6a135998a8318f870caeed3106641 Author: kyrie wu Date: Thu Sep 29 17:08:17 2022 +0800 mtk-jpegdec: add stop cmd interface for jpgdec Add stop cmd interface for jpgdec to stop stream Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 3 +++ 1 file changed, 3 insertions(+) commit 52f68114857fe55ecb640257e51680e24531466d Author: kyrie wu Date: Thu Sep 29 17:08:16 2022 +0800 media: mtk-jpegdec: refactor jpegdec func interface refactor the func interface of mtk_jpeg_dec_set_config for decode Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil .../media/platform/mediatek/jpeg/mtk_jpeg_core.c | 38 +++++++++++++-- .../media/platform/mediatek/jpeg/mtk_jpeg_core.h | 1 + .../media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 55 ++++++++++++---------- .../media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.h | 3 +- .../platform/mediatek/jpeg/mtk_jpeg_dec_reg.h | 1 + 5 files changed, 66 insertions(+), 32 deletions(-) commit 7915282498e398861a1db7f52ce0252ecc562104 Author: kyrie wu Date: Thu Sep 29 17:08:15 2022 +0800 media: mtk-jpegdec: add output pic reorder interface add output reorder func to reorder the output images to ensure the output pic is consistent with the input images. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil .../media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 47 +++++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) commit dedc21500334b97b80d4ca37ab683cde214fcb03 Author: kyrie wu Date: Thu Sep 29 17:08:14 2022 +0800 media: mtk-jpegdec: add jpeg decode worker interface Add jpeg decoding worker to ensure that three HWs run in parallel in MT8195. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil .../media/platform/mediatek/jpeg/mtk_jpeg_core.c | 196 +++++++++++++++++++++ .../media/platform/mediatek/jpeg/mtk_jpeg_core.h | 11 ++ .../media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 39 ++-- 3 files changed, 234 insertions(+), 12 deletions(-) commit e5f969dd937705289b95f91a018ace6a5ab3f5a2 Author: kyrie wu Date: Thu Sep 29 17:08:13 2022 +0800 media: mtk-jpegdec: add jpegdec timeout func interface Generalizes jpegdec timeout func interfaces to handle HW timeout. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil .../media/platform/mediatek/jpeg/mtk_jpeg_core.h | 4 ++++ .../media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 24 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 0fa49df4222f31be08242d41c415215e4ee43b13 Author: kyrie wu Date: Thu Sep 29 17:08:12 2022 +0800 media: mtk-jpegdec: support jpegdec multi-hardware support jpegdec multi-hardware includes HW0/HW1/HW2. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil drivers/media/platform/mediatek/jpeg/Makefile | 5 +- .../media/platform/mediatek/jpeg/mtk_jpeg_core.h | 42 +++++ .../media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 169 +++++++++++++++++++++ 3 files changed, 214 insertions(+), 2 deletions(-) commit 08d530a8da706f157e9dcb4d9b7b4f0eff908ab9 Author: kyrie wu Date: Thu Sep 29 17:08:11 2022 +0800 media: mtk-jpegdec: export jpeg decoder functions mtk jpeg decoder is built as a module, export some functions to make them visible by other modules. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4c83f6f0b1400d0daa5df01ba0e7e64441e1c350 Author: kyrie wu Date: Thu Sep 29 17:08:10 2022 +0800 dt-bindings: mediatek: Add mediatek,mt8195-jpgdec compatible Add mediatek,mt8195-jpgdec compatible to binding document. Signed-off-by: kyrie wu Signed-off-by: irui wang Reviewed-by: Rob Herring Acked-by: Krzysztof Kozlowski Signed-off-by: Hans Verkuil .../bindings/media/mediatek,mt8195-jpegdec.yaml | 168 +++++++++++++++++++++ 1 file changed, 168 insertions(+) commit 8f1f08a6337efe26553ba905fa42d1c68e3bb39b Author: kyrie wu Date: Thu Sep 29 17:08:09 2022 +0800 mtk-jpegenc: add stop cmd interface for jpgenc Add stop cmd interface for jpgenc to stop stream Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 841a58decd87616c6b10431742133366781a08b5 Author: kyrie wu Date: Thu Sep 29 17:08:08 2022 +0800 mtk-jpegenc: add output pic reorder interface There are two HWs in mt8195. Since the two HWs run in parallel, it is necessary to reorder the output images to ensure that the order is consistent with the input images. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil .../media/platform/mediatek/jpeg/mtk_jpeg_core.c | 11 +---- .../media/platform/mediatek/jpeg/mtk_jpeg_core.h | 43 ++++++++++++++------ .../media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c | 1 + .../media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.h | 3 +- .../media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c | 47 +++++++++++++++++++++- 5 files changed, 81 insertions(+), 24 deletions(-) commit 5fb1c2361e5630491d2a2f9359654eb022601bc0 Author: kyrie wu Date: Thu Sep 29 17:08:07 2022 +0800 mtk-jpegenc: add jpeg encode worker interface Add jpeg encoding worker to ensure that two HWs run in parallel in MT8195. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil .../media/platform/mediatek/jpeg/mtk_jpeg_core.c | 183 ++++++++++++++++++++- .../media/platform/mediatek/jpeg/mtk_jpeg_core.h | 20 +++ .../media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c | 42 +++-- 3 files changed, 232 insertions(+), 13 deletions(-) commit faa7a062ab0440831946c5cf89780f4d0574df9c Author: kyrie wu Date: Thu Sep 29 17:08:06 2022 +0800 mtk-jpegenc: add jpegenc timeout func interface Generalizes jpegenc timeout func interfaces to handle HW timeout. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil .../media/platform/mediatek/jpeg/mtk_jpeg_core.h | 10 +++++++++ .../media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c | 25 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit 934e8bccac9542540493a4e5257d6b0db4162478 Author: kyrie wu Date: Thu Sep 29 17:08:05 2022 +0800 mtk-jpegenc: support jpegenc multi-hardware support jpeg encode multi-hardware includes HW0 and HW1. Signed-off-by: kyrie wu Signed-off-by: irui wang Reported-by: kernel test robot Signed-off-by: Hans Verkuil drivers/media/platform/mediatek/jpeg/Makefile | 11 +- .../media/platform/mediatek/jpeg/mtk_jpeg_core.c | 69 +++++---- .../media/platform/mediatek/jpeg/mtk_jpeg_core.h | 42 ++++++ .../media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c | 161 +++++++++++++++++++++ 4 files changed, 249 insertions(+), 34 deletions(-) commit 8eecf7b3bfb906c1610ee3bbebb9ca4b3755ef9f Author: kyrie wu Date: Thu Sep 29 17:08:04 2022 +0800 mtk-jpegenc: export jpeg encoder functions mtk jpeg encoder is built as a module, export some functions to make them visible by other modules. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6611830fa3969a76d5acf1bb385f804504d34a74 Author: kyrie wu Date: Thu Sep 29 17:08:03 2022 +0800 dt-bindings: mediatek: Add mediatek, mt8195-jpgenc compatible Add mediatek,mt8195-jpgenc compatible to binding document. Signed-off-by: kyrie wu Signed-off-by: irui wang Reviewed-by: Rob Herring Acked-by: Krzysztof Kozlowski Signed-off-by: Hans Verkuil .../bindings/media/mediatek,mt8195-jpegenc.yaml | 147 +++++++++++++++++++++ 1 file changed, 147 insertions(+) commit c3720e65c9013a7b2a5dbb63e6bf6d74a35dd894 Author: Ming Qian Date: Thu Aug 4 17:38:41 2022 +0800 media: imx-jpeg: Disable useless interrupt to avoid kernel panic There is a hardware bug that the interrupt STMBUF_HALF may be triggered after or when disable interrupt. It may led to unexpected kernel panic. And interrupt STMBUF_HALF and STMBUF_RTND have no other effect. So disable them and the unused interrupts. meanwhile clear the interrupt status when disable interrupt. Signed-off-by: Ming Qian Reviewed-by: Mirela Rabulea Signed-off-by: Hans Verkuil drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c76c2e92bcffef66a096de81e086d1acdc5ee944 Author: Ming Qian Date: Tue Jul 26 17:04:27 2022 +0800 media: imx-jpeg: Don't clear stop state in handling dynamic resolution change In dynamic resolution change, streamoff and streamon on the capture queue may be called, the V4L2_DEC_CMD_STOP cmd may be called before driver parsed the jpeg header. don't clear the stop state in streamoff of handling the dynamic resolution change, otherwise the drain may not complete. Fixes: 4911c5acf9351 ("media: imx-jpeg: Implement drain using v4l2-mem2mem helpers") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2c0a1dea8d936d3de0dc8a7674fd8a0014faa126 Author: Jianhua Lin Date: Tue Jul 19 18:02:14 2022 +0800 dt-bindings: media: mediatek-jpeg-encoder: Add MT8188 compatible string Add compatible for MT8188 jpeg encoder. Signed-off-by: Jianhua Lin Acked-by: Krzysztof Kozlowski Signed-off-by: Hans Verkuil Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml | 1 + 1 file changed, 1 insertion(+) commit 11edcbb23eb8af93e4f4f3bf28b1f0dc422f0308 Author: Jianhua Lin Date: Tue Jul 19 18:02:13 2022 +0800 dt-bindings: media: mediatek-jpeg-decoder: Add MT8188 compatible string Add compatible for MT8188 jpeg decoder. Signed-off-by: Jianhua Lin Acked-by: Krzysztof Kozlowski Signed-off-by: Hans Verkuil Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.yaml | 1 + 1 file changed, 1 insertion(+) commit cfed9632ca8e8bdf0128745ae2400b72c4292886 Author: Ming Qian Date: Mon Jul 18 10:37:37 2022 +0800 media: imx-jpeg: Add a timeout mechanism for each frame Add a timeout mechanism for each frame. If the frame can't be decoded or encoded, driver can cancel it to avoid hang. Fixes: 2db16c6ed72ce ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Signed-off-by: Ming Qian Reviewed-by: Mirela Rabulea Signed-off-by: Hans Verkuil drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 55 ++++++++++++++++++++++---- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h | 1 + 2 files changed, 49 insertions(+), 7 deletions(-) commit 2bcc3b48c8ddf2d83cf00a00c0d021970c271fff Author: Jason Wang Date: Sat Jul 16 20:25:43 2022 +0800 media: imx-jpeg: Remove unnecessary memset() after dma_alloc_coherent() The `dma_alloc_coherent()' already zeroes out memory for us, so we don't need the redundant memset(). Signed-off-by: Jason Wang Signed-off-by: Hans Verkuil drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 1 - 1 file changed, 1 deletion(-) commit 08fb97de03aa2205c6791301bd83a095abc1949c Author: Andrey Grodzovsky Date: Fri Sep 30 00:12:58 2022 -0400 drm/sched: Add FIFO sched policy to run queue When many entities are competing for the same run queue on the same scheduler, we observe an unusually long wait times and some jobs get starved. This has been observed on GPUVis. The issue is due to the Round Robin policy used by schedulers to pick up the next entity's job queue for execution. Under stress of many entities and long job queues within entity some jobs could be stuck for very long time in it's entity's queue before being popped from the queue and executed while for other entities with smaller job queues a job might execute earlier even though that job arrived later then the job in the long queue. Fix: Add FIFO selection policy to entities in run queue, chose next entity on run queue in such order that if job on one entity arrived earlier then job on another entity the first job will start executing earlier regardless of the length of the entity's job queue. v2: Switch to rb tree structure for entities based on TS of oldest job waiting in the job queue of an entity. Improves next entity extraction to O(1). Entity TS update O(log N) where N is the number of entities in the run-queue Drop default option in module control parameter. v3: Various cosmetical fixes and minor refactoring of fifo update function. (Luben) v4: Switch drm_sched_rq_select_entity_fifo to in order search (Luben) v5: Fix up drm_sched_rq_select_entity_fifo loop (Luben) v6: Add missing drm_sched_rq_remove_fifo_locked v7: Fix ts sampling bug and more cosmetic stuff (Luben) v8: Fix module parameter string (Luben) Cc: Luben Tuikov Cc: Christian König Cc: Direct Rendering Infrastructure - Development Cc: AMD Graphics Signed-off-by: Andrey Grodzovsky Tested-by: Yunxiang Li (Teddy) Signed-off-by: Luben Tuikov Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20220930041258.1050247-1-luben.tuikov@amd.com drivers/gpu/drm/scheduler/sched_entity.c | 20 +++++++ drivers/gpu/drm/scheduler/sched_main.c | 96 +++++++++++++++++++++++++++++++- include/drm/gpu_scheduler.h | 32 +++++++++++ 3 files changed, 145 insertions(+), 3 deletions(-) commit 0c31611437b7155f115919a24f31673ffe94deee Author: Ville Syrjälä Date: Wed Sep 28 09:08:13 2022 +0300 drm/i915: Add some debug prints for intel_modeset_all_pipes() Print out on which pipes, and for what reason, we are forcing a full modeset. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220928060813.23264-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_cdclk.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 6 +++++- drivers/gpu/drm/i915/display/intel_display.h | 3 ++- drivers/gpu/drm/i915/display/skl_watermark.c | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) commit 296cd8ecfd305dae76722bb683943cdfefe7f4d3 Author: Ville Syrjälä Date: Thu Sep 29 10:15:16 2022 +0300 drm/i915: Change glk_load_degamma_lut() calling convention Make glk_load_degamma_lut() more like most everyone else and pass in the LUT explicitly. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220929071521.26612-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_color.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 7671fc6265266abcbefcef4527ded35b48ba07ea Author: Ville Syrjälä Date: Thu Sep 29 10:15:15 2022 +0300 drm/i915: Clean up intel_color_init_hooks() Remove a bunch of pointless curly brackets and do the s/dev_priv/i915/ while at it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220929071521.26612-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_color.c | 43 +++++++++++++++--------------- 1 file changed, 21 insertions(+), 22 deletions(-) commit 2a40e5848a9526c3ad5d35e1aab4c04df117693b Author: Ville Syrjälä Date: Thu Sep 29 10:15:14 2022 +0300 drm/i915: Simplify the intel_color_init_hooks() if ladder Get rid of the funny hsw vs. ivb extra indentation level in intel_color_init_hooks(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220929071521.26612-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_color.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 064751a6c5dc719d28a490268f140d4d9cf379d4 Author: Ville Syrjälä Date: Thu Sep 29 10:15:13 2022 +0300 drm/i915: Split up intel_color_init() intel_color_init() does both device level and crtc level stuff. Split it up accordingly. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220929071521.26612-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_color.c | 15 +++++++++------ drivers/gpu/drm/i915/display/intel_color.h | 4 +++- drivers/gpu/drm/i915/display/intel_crtc.c | 3 +-- drivers/gpu/drm/i915/display/intel_display.c | 1 + 4 files changed, 14 insertions(+), 9 deletions(-) commit 319b0869f51c16034c48627d77ec62fc3b9dccfe Author: Ville Syrjälä Date: Thu Sep 29 10:15:12 2022 +0300 drm/i915: Remove PLL asserts from .load_luts() .load_luts() potentially runs from the vblank worker, and is under a deadline to complete within the vblank. Thus we can't do expesive stuff like talk to the Punit, etc. To that end get rid of the assert_dsi_pll_enabled() call for vlv/chv. We'll just have to trust that the PLL is already enabled here. And I don't think the normal assert_pll_enabled() really buys us anything useful on gmch platforms either, so nuke that one too. We don't have corresponding asserts in the ilk+ codepaths anyway despite the hardware (IIRC) still requiring the clock to be enabled when we access the LUT. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220929071521.26612-2-ville.syrjala@linux.intel.com Acked-by: Jani Nikula drivers/gpu/drm/i915/display/intel_color.c | 11 ----------- 1 file changed, 11 deletions(-) commit f74878433d5ade360447da5d92e9c2e535780d80 Author: Wen Gong Date: Wed Sep 28 03:38:32 2022 -0400 wifi: ath11k: fix warning in dma_free_coherent() of memory chunks while recovery Commit 26f3a021b37c ("ath11k: allocate smaller chunks of memory for firmware") and commit f6f92968e1e5 ("ath11k: qmi: try to allocate a big block of DMA memory first") change ath11k to allocate the memory chunks for target twice while wlan load. It fails for the 1st time because of large memory and then changed to allocate many small chunks for the 2nd time sometimes as below log. 1st time failed: [10411.640620] ath11k_pci 0000:05:00.0: qmi firmware request memory request [10411.640625] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 6881280 [10411.640630] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 3784704 [10411.640658] ath11k_pci 0000:05:00.0: qmi dma allocation failed (6881280 B type 1), will try later with small size [10411.640671] ath11k_pci 0000:05:00.0: qmi delays mem_request 2 [10411.640677] ath11k_pci 0000:05:00.0: qmi respond memory request delayed 1 2nd time success: [10411.642004] ath11k_pci 0000:05:00.0: qmi firmware request memory request [10411.642008] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288 [10411.642012] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288 [10411.642014] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288 [10411.642016] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288 [10411.642018] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288 [10411.642020] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288 [10411.642022] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288 [10411.642024] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288 [10411.642027] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288 [10411.642029] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288 [10411.642031] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 458752 [10411.642033] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 131072 [10411.642035] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288 [10411.642037] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288 [10411.642039] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288 [10411.642041] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288 [10411.642043] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288 [10411.642045] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 524288 [10411.642047] ath11k_pci 0000:05:00.0: qmi mem seg type 4 size 491520 [10411.642049] ath11k_pci 0000:05:00.0: qmi mem seg type 1 size 524288 And then commit 5962f370ce41 ("ath11k: Reuse the available memory after firmware reload") skip the ath11k_qmi_free_resource() which frees the memory chunks while recovery, after that, when run recovery test on WCN6855, a warning happened every time as below and finally leads fail for recovery. [ 159.570318] BUG: Bad page state in process kworker/u16:5 pfn:33300 [ 159.570320] page:0000000096ffdbb9 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x33300 [ 159.570324] flags: 0xfffffc0000000(node=0|zone=1|lastcpupid=0x1fffff) [ 159.570329] raw: 000fffffc0000000 0000000000000000 dead000000000122 0000000000000000 [ 159.570332] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 [ 159.570334] page dumped because: nonzero _refcount [ 159.570440] firewire_ohci syscopyarea sysfillrect psmouse sdhci_pci ahci sysimgblt firewire_core fb_sys_fops libahci crc_itu_t cqhci drm sdhci e1000e wmi video [ 159.570460] CPU: 2 PID: 217 Comm: kworker/u16:5 Kdump: loaded Tainted: G B 5.19.0-rc1-wt-ath+ #3 [ 159.570465] Hardware name: LENOVO 418065C/418065C, BIOS 83ET63WW (1.33 ) 07/29/2011 [ 159.570467] Workqueue: qmi_msg_handler qmi_data_ready_work [qmi_helpers] [ 159.570475] Call Trace: [ 159.570476] [ 159.570478] dump_stack_lvl+0x49/0x5f [ 159.570486] dump_stack+0x10/0x12 [ 159.570493] bad_page+0xab/0xf0 [ 159.570502] check_free_page_bad+0x66/0x70 [ 159.570511] __free_pages_ok+0x530/0x9a0 [ 159.570517] ? __dev_printk+0x58/0x6b [ 159.570525] ? _dev_printk+0x56/0x72 [ 159.570534] ? qmi_decode+0x119/0x470 [qmi_helpers] [ 159.570543] __free_pages+0x91/0xd0 [ 159.570548] dma_free_contiguous+0x50/0x60 [ 159.570556] dma_direct_free+0xe5/0x140 [ 159.570564] dma_free_attrs+0x35/0x50 [ 159.570570] ath11k_qmi_msg_mem_request_cb+0x2ae/0x3c0 [ath11k] [ 159.570620] qmi_invoke_handler+0xac/0xe0 [qmi_helpers] [ 159.570630] qmi_handle_message+0x6d/0x180 [qmi_helpers] [ 159.570643] qmi_data_ready_work+0x2ca/0x440 [qmi_helpers] [ 159.570656] process_one_work+0x227/0x440 [ 159.570667] worker_thread+0x31/0x3d0 [ 159.570676] ? process_one_work+0x440/0x440 [ 159.570685] kthread+0xfe/0x130 [ 159.570692] ? kthread_complete_and_exit+0x20/0x20 [ 159.570701] ret_from_fork+0x22/0x30 [ 159.570712] The reason is because when wlan start to recovery, the type, size and count is not same for the 1st and 2nd QMI_WLFW_REQUEST_MEM_IND message, Then it leads the parameter size is not correct for the dma_free_coherent(). For the chunk[1], the actual dma size is 524288 which allocate in the 2nd time of the initial wlan load phase, and the size which pass to dma_free_coherent() is 3784704 which is got in the 1st time of recovery phase, then warning above happened. Change to use prev_size of struct target_mem_chunk for the paramter of dma_free_coherent() since prev_size is the real size of last load/recovery. Also change to check both type and size of struct target_mem_chunk to reuse the memory to avoid mismatch buffer size for target. Then the warning disappear and recovery success. When the 1st QMI_WLFW_REQUEST_MEM_IND for recovery arrived, the trunk[0] is freed in ath11k_qmi_alloc_target_mem_chunk() and then dma_alloc_coherent() failed caused by large size, and then trunk[1] is freed in ath11k_qmi_free_target_mem_chunk(), the left 18 trunks will be reuse for the 2nd QMI_WLFW_REQUEST_MEM_IND message. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 Fixes: 5962f370ce41 ("ath11k: Reuse the available memory after firmware reload") Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928073832.16251-1-quic_wgong@quicinc.com drivers/net/wireless/ath/ath11k/qmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 45d2e268369b0c768d5a644f319758bcfd370521 Author: Baochen Qiang Date: Wed Sep 28 09:51:40 2022 +0800 wifi: ath11k: Don't exit on wakeup failure Currently, ath11k_pcic_read() returns an error if wakeup() fails, this makes firmware crash debug quite hard because we can get nothing. Change to go ahead on wakeup failure, in that case we still may get something valid to check. There should be no mislead due to incorrect content because we are aware of the failure with the log printed. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Baochen Qiang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220928015140.5431-1-quic_bqiang@quicinc.com drivers/net/wireless/ath/ath11k/pcic.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 9ec6e20776abda3ca03ab97b1caa8310074427c1 Author: Gustavo A. R. Silva Date: Mon Sep 26 16:44:57 2022 -0500 carl9170: 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 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/215 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/YzIdWc8QSdZFHBYg@work drivers/net/wireless/ath/carl9170/wlan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d0e7d1eea9e7379b8709a71283eaadd94af37ca Author: Matt Roper Date: Wed Sep 28 08:55:11 2022 -0700 drm/i915/mtl: Define engine context layouts The part of the media and blitter engine contexts that we care about for setting up an initial state on MTL are nearly similar to DG2 (and PVC). The difference being PRT_BB_STATE being replaced with NOP. For render/compute engines, the part of the context images are nearly the same, although the layout had a very slight change --- one POSH register was removed and the placement of some LRI/noops adjusted slightly to compensate. v2: - Dg2, mtl xcs offsets slightly vary. Use a separate offsets array(Bala) - Add missing nop in xcs offsets(Bala) v3: - Fix the spacing for nop in xcs offset(MattR) v4: - Fix rcs register offset(MattR) v4.1: - Fix commit message(Lucas) Bspec: 46261, 46260, 45585 Cc: Balasubramani Vivekanandan Cc: Licas De Marchi Signed-off-by: Matt Roper Signed-off-by: Radhakrishna Sripada Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220928155511.2379663-1-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/gt/intel_lrc.c | 84 ++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 2 deletions(-) commit 05fff6ba04eef8b88bb94734b66731bef3d8d34b Merge: 3ef859a4f6c9 69d517e6e210 Author: Jonathan Corbet Date: Thu Sep 29 13:29:16 2022 -0600 Merge branch 'docs-mw' into docs-next commit e26ec8aebfbbb38cb3733d64b793e5c0085cbcee Author: Prathap Kumar Valsan Date: Tue Sep 27 19:13:13 2022 +0200 drm/i915/gt: Flush to global observation point before breadcrumb write Add flag to pipecontrol instruction to ensure in-flight writes are flushed to global observation point. Also split the pipecontrol instruction like we have in gen8. References: https://gitlab.freedesktop.org/drm/intel/-/issues/5886 Signed-off-by: Prathap Kumar Valsan Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220927171313.6553-1-nirmoy.das@intel.com drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit da3dbdfea49cbaef41f37a566470b27df3e0e9ab Author: Nirmoy Das Date: Fri Sep 23 09:35:15 2022 +0200 drm/i915: remove excessive i915_gem_drain_freed_objects i915_gem_drain_workqueue() call i915_gem_drain_freed_objects() so no need to call that again. Reviewed-by: Tvrtko Ursulin Signed-off-by: Nirmoy Das Reviewed-by: Andrzej Hajda Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220923073515.23093-2-nirmoy.das@intel.com drivers/gpu/drm/i915/i915_gem.c | 2 -- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 - 2 files changed, 3 deletions(-) commit c50cec9bab620927445e9c7c050a8fae536557b8 Author: Nirmoy Das Date: Fri Sep 23 09:35:14 2022 +0200 drm/i915: Fix a potential UAF at device unload i915_gem_drain_freed_objects() might not be enough to free all the objects and RCU delayed work might get scheduled after the i915 device struct gets freed. Call i915_gem_drain_workqueue() to catch all RCU delayed work. Suggested-by: Chris Wilson Acked-by: Tvrtko Ursulin Signed-off-by: Nirmoy Das Reviewed-by: Andrzej Hajda Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220923073515.23093-1-nirmoy.das@intel.com drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59cfc750f537b973e17583ce8f14a913401a5ac0 Author: Riana Tauro Date: Fri Sep 23 16:30:43 2022 +0530 drm/i915/guc/slpc: Add SLPC selftest live_slpc_power A fundamental assumption is that at lower frequencies, not only do we run slower, but we save power compared to higher frequencies. live_slpc_power checks if running at low frequency saves power v2: re-use code to measure power fixed cosmetic review comments (Vinay) Signed-off-by: Riana Tauro Reviewed-by: Vinay Belgaumkar Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20220923110043.789178-4-riana.tauro@intel.com drivers/gpu/drm/i915/gt/selftest_slpc.c | 127 +++++++++++++++++++++++++++++--- 1 file changed, 118 insertions(+), 9 deletions(-) commit ac4e8560248f8c33c11b96a05ad64cfd1eb39665 Author: Riana Tauro Date: Fri Sep 23 16:30:42 2022 +0530 drm/i915/selftests: Add helper function measure_power move the power measurement and the triangle filter to a different function. No functional changes. Signed-off-by: Riana Tauro Reviewed-by: Vinay Belgaumkar Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20220923110043.789178-3-riana.tauro@intel.com drivers/gpu/drm/i915/gt/selftest_rps.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit c09ae4edd11062cd147328c77926330596277097 Author: Riana Tauro Date: Fri Sep 23 16:30:41 2022 +0530 drm/i915/guc/slpc: Run SLPC selftests on all tiles Run slpc selftests on all tiles Signed-off-by: Riana Tauro Reviewed-by: Vinay Belgaumkar Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20220923110043.789178-2-riana.tauro@intel.com drivers/gpu/drm/i915/gt/selftest_slpc.c | 45 +++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 8 deletions(-) commit 3dbf20e483cf3f31e287ad3152ffadd15a482e4f Author: Ville Syrjälä Date: Tue Sep 27 21:06:15 2022 +0300 drm/i915: Allow alternate fixed modes always for LVDS As with eDP let's stop considering the VBTs DRRS knobs and just always accept all otherwise suitable EDID modes. This appears to be how Windows does it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927180615.25476-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_lvds.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 55cfeecc2197de68e9cc30f77c711dcbcdf27510 Author: Ville Syrjälä Date: Tue Sep 27 21:06:14 2022 +0300 drm/i915: Allow alternate fixed modes always for eDP Stop considering VBT's static DRRS support when deciding whether to use alternate fixed modes or not. It looks like Windows more or less just uses that to decide whether to automagically switch refresh rates on AC<->battery changes, or perhaps whether to even expose a control for that in some UI thing. Either way it seems happy to always use all EDID modes, and I guess the DRRS/VRR stuff more or less adjusts how said modes get actually used. Let's do the same and just accept all the suitable looking modes from EDID, whether we have DRRS or VRR. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6323 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6484 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927180615.25476-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit eb89e83c152b122a94e79527d63cb7c79823c37e Author: Ville Syrjälä Date: Tue Sep 27 21:06:13 2022 +0300 drm/i915: Simplify intel_panel_add_edid_alt_fixed_modes() Since commit a5810f551d0a ("drm/i915: Allow more varied alternate fixed modes for panels") intel_panel_add_edid_alt_fixed_modes() no longer considers vrr vs. drrs separately. So no reason to pass them as separate parameters either. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220927180615.25476-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dp.c | 2 +- drivers/gpu/drm/i915/display/intel_lvds.c | 3 +-- drivers/gpu/drm/i915/display/intel_panel.c | 4 ++-- drivers/gpu/drm/i915/display/intel_panel.h | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) commit b801d71493bbb9ec8dd4526bbec41f709621cb97 Author: Niranjana Vishwanathapura Date: Tue Sep 27 11:13:46 2022 -0700 drm/i915: Remove unwanted pointer unpacking In await_fence_array(), unpacking syncobj pointer is not needed. Remove it. Reviewed-by: Tvrtko Ursulin Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220927181346.1187-1-niranjana.vishwanathapura@intel.com drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 5 ----- 1 file changed, 5 deletions(-) commit 00d942e779c24581932125a58d8b9a2938e9e7ce Author: Gustavo A. R. Silva Date: Tue Sep 27 09:18:55 2022 +0300 wifi: ath10k: 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/212 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/YzIcoloIQBDqGlgc@work drivers/net/wireless/ath/ath10k/htt.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e5398f92d1ca4aa4244616519fbf6dc155302b33 Author: Liu Shixin Date: Tue Sep 27 09:18:54 2022 +0300 wifi: wil6210: debugfs: use DEFINE_SHOW_ATTRIBUTE to simplify fw_capabilities/fw_version Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220922142858.3250469-1-liushixin2@huawei.com drivers/net/wireless/ath/wil6210/debugfs.c | 36 +++++------------------------- 1 file changed, 6 insertions(+), 30 deletions(-) commit 81e60b2dfb2744ab6642c4aa62534b4f711fdc5d Author: Aditya Kumar Singh Date: Tue Sep 27 09:18:54 2022 +0300 wifi: ath11k: stop tx queues immediately upon firmware exit Currently, recovery flag is set immediately upon firmware exit but tx queues are stopped once firmware arrives back and is ready which is during ath11k_core_restart. Once ieee80211 hw restart is completed, tx queues are resumed. If during the time delta between firmware exit and firmware ready, mac80211 send packets, currently ath11k will drop it since recovery flag will be set. But warning prints will come - "ath11k c000000.wifi: failed to transmit frame -108" If more tx packets are there, this could lead to flooding of above print. However, actually tx queues should be stopped immediately when firmware leaves. This will prevent packets to get dropped when firmware is recovering. Add fix to stop tx queues immediately after firmware exit. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220923170235.18873-1-quic_adisi@quicinc.com drivers/net/wireless/ath/ath11k/core.c | 5 +---- drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/qmi.c | 3 +++ 3 files changed, 5 insertions(+), 4 deletions(-) commit 1e88da4f6d8938bef42b3bc6e9c68c795b46ce0f Author: John Harrison Date: Thu Sep 22 13:12:09 2022 -0700 drm/i915/guc: Enable compute scheduling on DG2 DG2 has issues. To work around one of these the GuC must schedule apps in an exclusive manner across both RCS and CCS. That is, if a context from app X is running on RCS then all CCS engines must sit idle even if there are contexts from apps Y, Z, ... waiting to run. A certain OS favours RCS to the total starvation of CCS. Linux does not. Hence the GuC now has a scheduling policy setting to control this abitration. Signed-off-by: John Harrison Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20220922201209.1446343-2-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gt/uc/abi/guc_actions_abi.h | 1 + drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h | 9 ++- drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 22 ++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 93 +++++++++++++++++++++++ 4 files changed, 124 insertions(+), 1 deletion(-) commit 3ef859a4f6c97253b75eb53d259b7789fb92d875 Merge: 5479d6d4bf12 49beeea7ebdb Author: Jonathan Corbet Date: Tue Sep 27 13:23:18 2022 -0600 Merge branch 'docs-mw' into docs-next commit abf46db341bd87261d0b3128bac9bdc204570284 Author: Alan Previn Date: Thu Sep 22 23:45:42 2022 -0700 drm/i915/pxp: Add firmware status when ARB session fails Add firmware status using a drm_warn when ARB session fails or else a drm_dbg when the ARB session register slot bit did get set. Signed-off-by: Alan Previn Reviewed-by: Juston Li Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220923064542.415252-2-alan.previn.teres.alexis@intel.com drivers/gpu/drm/i915/pxp/intel_pxp_session.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 3 +++ 2 files changed, 4 insertions(+) commit d24e7855ef7242a045d20af9c2a58474fe238993 Author: Chris Wilson Date: Fri Sep 16 13:48:23 2022 -0700 drm/i915/gt: Bump the reset-failure timeout to 60s If attempting to perform a GT reset takes long than 5 seconds (including resetting the display for gen3/4), then we declare all hope lost and discard all user work and wedge the device to prevent further misbehaviour. 5 seconds is too short a time for such drastic action, as we may be stuck on other timeouts and watchdogs. If we allow a little bit longer before hitting the big red button, we should at the very least capture other hung task indicators pointing towards the reason why the reset was hanging; and allow more marginal cases the extra headroom to complete the reset without further collateral damage. Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/6448 Signed-off-by: Chris Wilson Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220916204823.1897089-1-ashutosh.dixit@intel.com drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86b972ef1091882d66672399c6f8ebdd12a3b707 Author: Ville Syrjälä Date: Mon Sep 26 22:30:21 2022 +0300 drm/i915: Round to closest in g4x+ HDMI clock readout On pre-ddi platforms we have slightly different code being used for HDMI TMDS clock to dotclock conversion between the state computation and state readout. Both of these need to round the same way in order to not get a mismatch between the computed and read out states. Fix up the rounding direction in the readout path to match what is used during state computation. Another option would to just use intel_crtc_dotclock() in the readout path as well, but I don't really want to do that as the current code more accurately represents how the hardware really works; The HDMI port register defines whether we're actually outputting 8bpc or 12bpc over HDMI, and the PIPECONF bpc setting just defines what goes over FDI between the CPU and PCH. The fact that we try to cram all that into a single pipe_bpp during state computation is perhaps not entirely great... Fixes: f2c9df101095 ("drm/i915: Round TMDS clock to nearest") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220926193021.23287-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/g4x_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a82796a2e332d108b2d3aff38509caad370f69b5 Author: Imre Deak Date: Thu Sep 22 20:21:48 2022 +0300 drm/i915: Fix TypeC mode initialization during system resume During system resume DP MST requires AUX to be working already before the HW state readout of the given encoder. Since AUX requires the encoder/PHY TypeC mode to be initialized, which atm only happens during HW state readout, these AUX transfers can change the TypeC mode incorrectly (disconnecting the PHY for an enabled encoder) and trigger the state check WARNs in intel_tc_port_sanitize(). Fix this by initializing the TypeC mode earlier both during driver loading and system resume and making sure that the mode can't change until the encoder's state is read out. While at it add the missing DocBook comments and rename intel_tc_port_sanitize()->intel_tc_port_sanitize_mode() for consistency. Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20220922172148.2913088-1-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 8 +++- drivers/gpu/drm/i915/display/intel_tc.c | 66 ++++++++++++++++++++++++-------- drivers/gpu/drm/i915/display/intel_tc.h | 3 +- 3 files changed, 60 insertions(+), 17 deletions(-) commit f28d42663eb063173f63ee294465d2f336da325f Author: Chris Wilson Date: Mon Sep 26 16:50:18 2022 +0100 drm/i915/gt: Move scratch page into system memory on all platforms The scratch page should never be accessed, and is only assigned as a filler page to redirection invalid userspace access. It is not of a performance concern and so we prefer to have a single consistent configuration across all platforms, reducing the pressure on device memory and avoiding the direct device access that would be required to initialise the scratch page. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220926155018.109678-1-matthew.auld@intel.com drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 43 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) commit e5cedf9859b29642f8908f7e8949d983c748e2d0 Author: Nirmoy Das Date: Fri Sep 23 16:37:30 2022 +0200 drm/i915: Improve debug print in vm_fault_ttm Print the error code returned by __i915_ttm_migrate() for better debuggability. v2: Fix kernel test robot warning. v3: Fix dim checkpatch warning. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6889 Acked-by: Matthew Auld Signed-off-by: Nirmoy Das Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220923143730.13498-1-nirmoy.das@intel.com drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c286558f58535cf97b717b946d6c96d774a09d17 Author: Chris Wilson Date: Mon Sep 26 16:33:33 2022 +0100 drm/i915/gt: Use i915_vm_put on ppgtt_create error paths Now that the scratch page and page directories have a reference back to the i915_address_space, we cannot do an immediate free of the ppgtt upon error as those buffer objects will perform a later i915_vm_put in their deferred frees. The downside is that by replacing the onion unwind along the error paths, the ppgtt cleanup must handle a partially constructed vm. This includes ensuring that the vm->cleanup is set prior to the error path. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6900 Signed-off-by: Chris Wilson Fixes: 4d8151ae5329 ("drm/i915: Don't free shared locks while shared") Cc: Thomas Hellström Cc: Matthew Auld Cc: # v5.14+ Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220926153333.102195-1-matthew.auld@intel.com drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 16 +++++----- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 58 +++++++++++++++++++----------------- drivers/gpu/drm/i915/gt/intel_gtt.c | 3 ++ 3 files changed, 41 insertions(+), 36 deletions(-) commit e731a2d2fa13eaa584f4730d619e8e89061e4f6e Author: Ville Syrjälä Date: Wed Sep 21 15:23:41 2022 +0300 drm/i915: Nuke intel_get_shared_dpll_id() Each PLL knows its own ID so intel_get_shared_dpll_id() is pointless. Get rid of it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220921122343.13061-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_ddi.c | 4 ++-- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 22 ---------------------- drivers/gpu/drm/i915/display/intel_dpll_mgr.h | 3 --- 3 files changed, 2 insertions(+), 27 deletions(-) commit 8a549e8d19f401a717f72cc035f5df6b4d128564 Author: Ville Syrjälä Date: Wed Sep 21 15:23:40 2022 +0300 drm/i915: Always initialize dpll.lock Initialize the dll.lock mutex whether or not we manage to initialize the rest of the dpll mgr. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220921122343.13061-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 073a12f45fb8e3b21c9e08c36a2528d9f9e38d83 Author: Ville Syrjälä Date: Thu Sep 22 00:15:25 2022 +0300 drm/i915: WARN if PLL ref/unref got messed up Spew a WARN if we try to ref/unref the same DPLL multiple times for the same pipe. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220921211525.10675-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit aa07d34d9f2fba6cad41c85ead441dde27882fd5 Author: Ville Syrjälä Date: Thu Sep 22 22:13:50 2022 +0300 drm/i915: Pimp DPLL ref/unref debugs We currently have a debug message in intel_reference_shared_dpll() but no counterpart in intel_unreference_shared_dpll(). Add one. Switch to the [CRTC:...] notation for the pipe name while at it. v2: Use drm_dbg_kms() instead of drm_dbg() (Jani) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220922191350.4303-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit fea1beb60db55abc05b2def917bff8e40825d3ed Author: Ville Syrjälä Date: Thu Sep 22 22:13:14 2022 +0300 drm/i915: Don't bail early from intel_dp_initial_fastset_check() Do all the checks in intel_dp_initial_fastset_check() instead of bailing out on the first condition that triggers. This makes for better debug logs since we see all the reasons why the full modeset computation is forced. Also avoid the risk of someone accidentally adding a check later in the function that would require connectors_changed=true (ie. no fastset at all), but an earlier check may have already bailed out with just mode_changed=true (ie. fastset is still possible). Pimp the debugs with the encoder id+name while at it. v2: Call the return variable 'fastset' to convey its meaning Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220922191314.4252-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dp.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit eddb4afcb6c533d3f75f5f1a77e292fece27570e Author: Ville Syrjälä Date: Thu Sep 22 22:12:36 2022 +0300 drm/i915: Force DPLL calculation for TC ports after readout We always allocate two DPLLs (TC and TBT) for TC ports. This is because we can't know ahead of time wherher we need to put the PHY into DP-Alt or TBT mode. However during readout we can obviously only read out the state of the DPLL that the port is actually using. Thus the state after readout will not have both DPLLs populated. We run into problems if during readout the TC port is in DP-Alt mode, but we then perform a modeset on the port without going through the full .compute_config() machinery, and during said modeset the port cannot be switched back into DP-Alt mode and we need to take the TBT fallback path. Such a modeset can happen eg. due to cdclk reprogramming. This wasn't a problem earlier because we did all the DPLL calculations much later in the modeset. So even if flagged a modeset very late we'd still have gone through the DPLL calculations. But now all the DPLL calculations happen much earlier and so we need to deal with it, or else we'll attempt a modeset without a DPLL. To guarantee that we always have both DPLLs fully cal/ulated for TC ports force a full modeset computation during the initial commit. v2: Avoid bitwise operation on bool (Jani) Call the return variable 'fastset' to convey its meaning Reported-by: Lee Shawn C Fixes: b000abd3b3d2 ("drm/i915: Do .crtc_compute_clock() earlier") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220922191236.4194-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_ddi.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 86570b7b126bd516aba770d1fc4c971c55c66dca Author: Jani Nikula Date: Fri Sep 16 11:26:42 2022 +0300 drm/i915: fix device info for devices without display Commit 00c6cbfd4e8a ("drm/i915: move pipe_mask and cpu_transcoder_mask to runtime info") moved the pipe_mask member from struct intel_device_info to intel_runtime_info, but overlooked some of our platforms initializing device info .display = {}. This is significant, as pipe_mask is the single point of truth for a device having a display or not; the platforms in question left pipe_mask to whatever was set for the platforms they "inherit" from in the complex macro scheme we have. Add new NO_DISPLAY macro initializing .__runtime.pipe_mask = 0, which will cause the device info .display sub-struct to be zeroed in intel_device_info_runtime_init(). A better solution (or simply audit of proper use of HAS_DISPLAY() checks) is required before moving forward with [1]. Also clear all the display related members in runtime info if there's no display. The latter is a bit tedious, but it's for completeness at this time, to ensure similar functionality as before. [1] https://lore.kernel.org/r/dfda1bf67f02ceb07c280b7a13216405fd1f7a34.1660137416.git.jani.nikula@intel.com Fixes: 00c6cbfd4e8a ("drm/i915: move pipe_mask and cpu_transcoder_mask to runtime info") Cc: Lucas De Marchi Cc: Maarten Lankhort Signed-off-by: Jani Nikula Reviewed-by: Gwan-gyeong Mun Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220916082642.3451961-1-jani.nikula@intel.com drivers/gpu/drm/i915/i915_pci.c | 11 ++++++----- drivers/gpu/drm/i915/intel_device_info.c | 6 ++++++ 2 files changed, 12 insertions(+), 5 deletions(-) commit 2d28094b26be804369fcf92315123ff07f3d4e0e Author: Ville Syrjälä Date: Wed Jun 22 18:54:48 2022 +0300 drm/i915: Add missing invalidate to g4x wm readout Let's not forget to mark the unused watermark levels as invalid after the readout. The vlv/chv codepath has this but the g4x didn't for some reason. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220622155452.32587-6-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy drivers/gpu/drm/i915/intel_pm.c | 2 ++ 1 file changed, 2 insertions(+) commit 59f13af3b645e647247de14cc06f0d04c5cc24ae Author: Ville Syrjälä Date: Wed Jun 22 18:54:47 2022 +0300 drm/i915: Simplify up vlv watermark sanitation We can simplify the vlv watermark sanitation by reusing the second half of vlv_compute_pipe_wm() to convert the sanitized raw watermarks into the proper form to be used as the optimal/intermediate watermarks. Also to be consistent with normal watermark computation the sanitized watermarks should be all 0 for any disabled plane. Previously we zeroed out the watermarks only up to the level (ie. PM2/5/DVDFS) that was enabled. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220622155452.32587-5-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy drivers/gpu/drm/i915/intel_pm.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 6340120014e8a82263f38c724ea8f3611cc0d074 Author: Ville Syrjälä Date: Wed Jun 22 18:54:46 2022 +0300 drm/i915: Simplify up g4x watermark sanitation We can simplify the g4x watermark sanitation by reusing the second half of g4x_compute_pipe_wm() to convert the sanitized raw watermarks into the proper form to be used as the optimal/intermediate watermarks. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220622155452.32587-4-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy drivers/gpu/drm/i915/intel_pm.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit ed57cfd9d54a772a1b60de6dd9f4e90fdba72a4a Author: Ville Syrjälä Date: Wed Jun 22 18:54:45 2022 +0300 drm/i915: Split vlv_compute_pipe_wm() into two Split vlv_compute_pipe_wm() into two halves. The first half computes the new raw watermarks, and the second half munges those up into real watermarks for the particular pipe. We can reuse the second half for watermark sanitation as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220622155452.32587-3-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy drivers/gpu/drm/i915/intel_pm.c | 114 ++++++++++++++++++++++------------------ 1 file changed, 64 insertions(+), 50 deletions(-) commit 543ba9d6873b47982aa32c88a18177427e51ae25 Author: Ville Syrjälä Date: Wed Jun 22 18:54:44 2022 +0300 drm/i915: Split g4x_compute_pipe_wm() into two Split g4x_compute_pipe_wm() into two halves. The first half computes the new raw watermarks, and the second half munges those up into real watermarks for the particular pipe. We can reuse the second half for watermark sanitation as well. Reviewed-by: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220622155452.32587-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_pm.c | 54 +++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 23 deletions(-) commit bde544e1d7017f3169b4d97b2e19c2d28066d87c Author: Ville Syrjälä Date: Mon Sep 12 14:18:12 2022 +0300 drm/i915: Don't init eDP if we can't find a fixed mode In the unlikely case of not finding a fixed mode don't register the eDP connector. I think there are some places where we'd oops if we didn't have a fixed mode for eDP so presumable this doesn't typically happen. But better safe than sorry. Also pimp the debugs with the encoder id+name. I think dumping the encoder rather than the connector provides more information here (eg. to match against the port information in the VBT). We can also drop the extra check from intel_edp_add_properties(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-14-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dp.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 8648c6048d4dc4d9294b7e7617c220bf446be0e7 Author: Ville Syrjälä Date: Mon Sep 12 14:18:11 2022 +0300 drm/i915: Clean up connector->*_allowed setup All the connectors are zero initialized so no need to clear the *_allowed flags we don't support. Only leave the ones we want to set. And while at it switch to booleans instead of ints. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-13-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/icl_dsi.c | 2 -- drivers/gpu/drm/i915/display/intel_crt.c | 7 ++----- drivers/gpu/drm/i915/display/intel_dp.c | 1 - drivers/gpu/drm/i915/display/intel_dvo.c | 2 -- drivers/gpu/drm/i915/display/intel_hdmi.c | 5 ++--- drivers/gpu/drm/i915/display/intel_lvds.c | 2 -- drivers/gpu/drm/i915/display/intel_sdvo.c | 3 +-- drivers/gpu/drm/i915/display/intel_tv.c | 2 -- drivers/gpu/drm/i915/display/vlv_dsi.c | 2 -- 9 files changed, 5 insertions(+), 21 deletions(-) commit 6ac2f04ba1c4a81ff1e205625eaeae1ead152720 Author: Ville Syrjälä Date: Mon Sep 12 14:18:10 2022 +0300 drm/i915: Extract intel_attach_scaling_mode_property() Consolidate the scaling_mode property setup into a single place. The one slight complicateion here is that GMCH platforms can't do the CENTER mode except on the LVDS port. But we can deal with that by just checking the connector type. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-12-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/icl_dsi.c | 10 +--------- drivers/gpu/drm/i915/display/intel_connector.c | 18 ++++++++++++++++++ drivers/gpu/drm/i915/display/intel_connector.h | 1 + drivers/gpu/drm/i915/display/intel_dp.c | 10 +--------- drivers/gpu/drm/i915/display/intel_lvds.c | 10 +--------- drivers/gpu/drm/i915/display/vlv_dsi.c | 11 +---------- 6 files changed, 23 insertions(+), 37 deletions(-) commit ab6214f3c3dbabdb4409e84fe7c1c43cb79c6c56 Author: Ville Syrjälä Date: Mon Sep 12 14:18:09 2022 +0300 drm/i915: Move eDP scaling_mode prop setup to the proper place We have an eDP specific intel_edp_add_properties() so move the eDP scaling_mode property setup there from intel_dp_add_properties(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-11-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dp.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 2f0f603a377237c9359d96184e2a6d8ae8299c9f Author: Ville Syrjälä Date: Mon Sep 12 14:18:08 2022 +0300 drm/i915: Extract intel_lvds_add_properties() Move the LVDS connector property setup to a dedicated function to depollute intel_lvds_init() a bit. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_lvds.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 9c7183a326521769bbddf155ea8f16aa9473de0c Author: Ville Syrjälä Date: Mon Sep 12 14:18:07 2022 +0300 drm/i915: Extract intel_dp_mst_add_properties() Move the DP MST connector property setup into its own function so it's not spread all over intel_dp_add_mst_connector(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dp_mst.c | 46 +++++++++++++++++++---------- 1 file changed, 30 insertions(+), 16 deletions(-) commit d7e4a2574520950613d29370ddd41c54a041589a Author: Ville Syrjälä Date: Mon Sep 12 14:18:06 2022 +0300 drm/i915: Extract intel_tv_add_properties() Pull all the TV connector property setup into its own neat function. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_tv.c | 80 ++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 37 deletions(-) commit 6f7dd8e7d9f6039aa5c286726a941cf5344a784d Author: Ville Syrjälä Date: Mon Sep 12 14:18:05 2022 +0300 drm/i915: Extract intel_edp_backlight_setup() Pull the eDP backlight setup into its own function. No reason to pollute intel_edp_init_connector() with all the mundane details. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-7-ville.syrjala@linux.intel.com Reviewed-by: Luca Coelho Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dp.c | 51 +++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 21 deletions(-) commit 5e800d92313497a5a9fc7053890e870888181192 Author: Ville Syrjälä Date: Mon Sep 12 14:18:04 2022 +0300 drm/i915: Pass intel_encoder to to_lvds_encoder() Most of our encoder type cast stuff already operates on intel_encoder rather than drm_encoder. Switch to_lvds_encoder() over as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-6-ville.syrjala@linux.intel.com Reviewed-by: Luca Coelho Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_lvds.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 49fd54034a523a9241cd73cda6da485112bf4414 Author: Ville Syrjälä Date: Mon Sep 12 14:18:03 2022 +0300 drm/i915: Use BIT() when dealing with output types Most places that deal with output types already use BIT() but a few places still use manual shifts. Convert the stragglers over to BIT(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-5-ville.syrjala@linux.intel.com Reviewed-by: Luca Coelho Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/g4x_hdmi.c | 4 ++-- drivers/gpu/drm/i915/display/intel_crt.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 4 ++-- drivers/gpu/drm/i915/display/intel_display_types.h | 9 +++++---- drivers/gpu/drm/i915/display/intel_dvo.c | 4 ++-- 5 files changed, 12 insertions(+), 11 deletions(-) commit 10c8cbeebd81d2e01437d59a4e47dc3de5925113 Author: Ville Syrjälä Date: Mon Sep 12 14:18:02 2022 +0300 drm/i915: Drop pointless 'budget' variable Just return the thing directly from the switch statement. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-4-ville.syrjala@linux.intel.com Reviewed-by: Luca Coelho Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 6a08cbda458e824ac824dddc6a07ed50efd0af70 Author: Ville Syrjälä Date: Mon Sep 12 14:18:01 2022 +0300 drm/i915: Clean up transcoder_to_stream_enc_status() Drop the pointless middle man variable and just return the correct thing directly. And while at it change the return type to u32 since this is a register value we're returning. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-3-ville.syrjala@linux.intel.com Reviewed-by: Luca Coelho Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 60c0df33da03c5aebcc5fb46363a1b58c784570e Author: Ville Syrjälä Date: Mon Sep 12 14:18:00 2022 +0300 drm/i915: Drop pointless middle man variable No need for the 'procmon' variable here. Just return the correct thing from the switch statement directly. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-2-ville.syrjala@linux.intel.com Reviewed-by: Luca Coelho Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_combo_phy.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 107ba1a2c705f4358f2602ec2f2fd821bb651f42 Author: Chris Wilson Date: Wed Sep 21 15:52:58 2022 +0200 drm/i915/gt: Restrict forced preemption to the active context When we submit a new pair of contexts to ELSP for execution, we start a timer by which point we expect the HW to have switched execution to the pending contexts. If the promotion to the new pair of contexts has not occurred, we declare the executing context to have hung and force the preemption to take place by resetting the engine and resubmitting the new contexts. This can lead to an unfair situation where almost all of the preemption timeout is consumed by the first context which just switches into the second context immediately prior to the timer firing and triggering the preemption reset (assuming that the timer interrupts before we process the CS events for the context switch). The second context hasn't yet had a chance to yield to the incoming ELSP (and send the ACk for the promotion) and so ends up being blamed for the reset. If we see that a context switch has occurred since setting the preemption timeout, but have not yet received the ACK for the ELSP promotion, rearm the preemption timer and check again. This is especially significant if the first context was not schedulable and so we used the shortest timer possible, greatly increasing the chance of accidentally blaming the second innocent context. Fixes: 3a7a92aba8fb ("drm/i915/execlists: Force preemption") Fixes: d12acee84ffb ("drm/i915/execlists: Cancel banned contexts on schedule-out") Reported-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Andi Shyti Reviewed-by: Andrzej Hajda Tested-by: Andrzej Hajda Cc: # v5.5+ Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220921135258.1714873-1-andrzej.hajda@intel.com drivers/gpu/drm/i915/gt/intel_engine_types.h | 15 +++++++++++++++ .../gpu/drm/i915/gt/intel_execlists_submission.c | 21 ++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) commit d09aa852585aa12e8ca0aff1425c9806a6f42772 Author: Jani Nikula Date: Wed Sep 14 19:35:14 2022 +0300 drm/i915: move i915_coherent_map_type() to i915_gem_pages.c and un-inline The inline function has no place in i915_drv.h. Move it away, un-inline, and untangle some header dependencies while at it. Cc: Matthew Auld Cc: Tvrtko Ursulin Signed-off-by: Jani Nikula Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220914163514.1837467-1-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_dpt.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_object.h | 4 ++++ drivers/gpu/drm/i915/gem/i915_gem_pages.c | 12 ++++++++++++ drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 1 + drivers/gpu/drm/i915/gt/intel_gsc.c | 1 + drivers/gpu/drm/i915/gt/intel_migrate.c | 1 + drivers/gpu/drm/i915/gt/selftest_migrate.c | 1 + drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 1 + drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 13 ------------- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 1 + 11 files changed, 24 insertions(+), 13 deletions(-) commit 71690148dbcf2331a54e40da26970402bd07a527 Author: Gustavo Sousa Date: Thu Sep 22 13:49:49 2022 -0300 drm/i915: Move hotplug inversion logic into separate helper Use *_hpd_invert() helpers whenever possible to isolate logic specific to hotplug inversion from common HPD setup logic to improve readability and maintainability of the source code. While we only define dg1_hpd_invert() here, future platforms are likely to have different hotplug inversion needs, thus it makes sense grouping different implementations under a common suffix. v2: Fix coding style and prefer to use small *_hdp_invert() helpers instead of a generic one. CC: Jani Nikula CC: Lucas De Marchi Signed-off-by: Gustavo Sousa Reviewed-by: Jani Nikula Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220922164949.163985-1-gustavo.sousa@intel.com drivers/gpu/drm/i915/i915_irq.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 8146d588bfc822b5377dfc0a227af77a57f7177f Author: Niranjana Vishwanathapura Date: Thu Sep 22 14:39:16 2022 -0700 drm/i915: Remove unused function parameter The function parameter 'exclude' in funciton i915_sw_fence_await_reservation() is not used. Remove it. Reviewed-by: Tvrtko Ursulin Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20220922213916.12112-1-niranjana.vishwanathapura@intel.com drivers/gpu/drm/i915/display/intel_atomic_plane.c | 5 ++--- drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 2 +- drivers/gpu/drm/i915/i915_sw_fence.c | 1 - drivers/gpu/drm/i915/i915_sw_fence.h | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) commit 944ca7d8b12f9ed4abaa4e63223b62bd9b653b5c Author: José Roberto de Souza Date: Thu Sep 15 18:46:47 2022 -0700 drm/i915: Parse and set stepping for platforms with GMD Expand the current stepping convention to accommodate the GMD stepping info. Typically GMD step maps to letter stepping by "A + step %4" and number to "A + step /4" i.e, GMD step 0 maps to STEP_A0, 1 to _A1, 2 to _A2, 3 to _A3, 4 to STEP_B0... Future platforms might break this formulae and may require a table mapping to decode GMD step compatible with the convention. v2: - Pass the updated ip version structure v3: - Skip using GMD to step table(MattR) Cc: Balasubramani Vivekanandan Cc: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Radhakrishna Sripada Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20220916014648.1310346-3-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/intel_step.c | 25 +++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_step.h | 28 +++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) commit c2c7075225ef7366a1ccc1cf4b7205c391ec7c9b Author: Matt Roper Date: Thu Sep 15 18:46:46 2022 -0700 drm/i915: Read graphics/media/display arch version from hw Going forward, the hardware teams no longer consider new platforms to have a "generation" in the way we've defined it for past platforms. Instead, each IP block (graphics, media, display) will have their own architecture major.minor versions and stepping ID's which should be read directly from a register in the MMIO space. Bspec: 63361, 64111 v2: - Move the IP version readout to intel_device_info.c - Convert the macro into a function v3: - Move subplatform init to runtime early init - Cache runtime ver, release info to compare with hardware values. - Use IP_VER for snaity check(MattR) v4: - Minor doccumentation changes. - Normalize HAS_GMD_ID macro value.(JaniN) Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20220916014648.1310346-2-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 3 ++ drivers/gpu/drm/i915/i915_driver.c | 3 +- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 7 ++++ drivers/gpu/drm/i915/intel_device_info.c | 67 +++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_device_info.h | 8 +++- 7 files changed, 88 insertions(+), 3 deletions(-) commit 4bce244272513ebb4d13c570e9fbca28497015b2 Author: Marco Felsch Date: Fri Aug 26 21:07:28 2022 +0200 drm/etnaviv: disable tx clock gating for GC7000 rev6203 The i.MX8MN SoC errata sheet mentions ERR050226: "GPU: Texture L2 Cache idle signal may incorrectly clock gate the texture engine in GPU". The workaround is to disable the corresponding clock gatings. While on it move the clock gating check for rev6202 into the same check to bundle them. Signed-off-by: Marco Felsch Reviewed-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d37c120b73128690434cc093952439eef9d56af1 Author: Lucas Stach Date: Fri Sep 16 12:40:31 2022 +0200 drm/etnaviv: don't truncate physical page address While the interface for the MMU mapping takes phys_addr_t to hold a full 64bit address when necessary and MMUv2 is able to map physical addresses with up to 40bit, etnaviv_iommu_map() truncates the address to 32bits. Fix this by using the correct type. Fixes: 931e97f3afd8 ("drm/etnaviv: mmuv2: support 40 bit phys address") Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45810b4c5c33f785053169f053f282fbfd04e93e Author: Matt Atwood Date: Tue Sep 20 13:43:59 2022 -0700 drm/i915/dg2: introduce Wa_22015475538 Wa_22015475538 applies to all DG2 (and ATSM) skus. The workaround implementation is identical to Wa_16011620976. LSC_CHICKEN_BIT_0_UDW is a general render register instead of rcs so adding this move to the proper wa init function. bspec:54077 Signed-off-by: Matt Atwood Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220920204359.103370-1-matthew.s.atwood@intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 7d33fd02dd943c7f8003e95930d15d92529fe917 Author: Tvrtko Ursulin Date: Thu Jun 30 13:57:16 2022 +0100 drm/i915/selftests: Remove flush_scheduled_work() from live_execlists There are ongoing efforts to remove usages of flush_scheduled_work() from drivers in order to avoid several cases of potentential problems when flushing is done from certain contexts. Remove the call from the live_execlists selftest. Its purpose was to be thorough and sync with the execlists capture state handling, but that is not strictly required for the test to function and can be removed. Signed-off-by: Tvrtko Ursulin Cc: Tetsuo Handa Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20220630125716.50835-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/selftest_execlists.c | 2 -- 1 file changed, 2 deletions(-) commit 958349ff710b79d85f35be73d1b09991f67b3423 Author: Ville Syrjälä Date: Fri Sep 16 19:52:05 2022 +0300 drm/i915/fbc: Remove stale FIXME Remove the old tales about 90/270 degree rotation effectively preventing FBC. That hasn't been true since we stopped demanding the fence is present in commit 691f7ba58d52 ("drm/i915/display/fbc: Make fences a nice-to-have for GEN9+") Also fix up the multiline comment formatting while at it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220916165206.1499-2-ville.syrjala@linux.intel.com Reviewed-by: Luca Coeho drivers/gpu/drm/i915/display/intel_fbc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 559f701db082a26f057463e14480cdf3306b1d91 Author: Ville Syrjälä Date: Fri Sep 16 19:52:04 2022 +0300 drm/i915: Nuke stale plane cdclk ratio FIXMEs The plane ratio stuff got implemented in commit bb6ae9e653dc ("drm/i915: Allow planes to declare their minimum acceptable cdclk") so these FIXMEs have no business being here. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220916165206.1499-1-ville.syrjala@linux.intel.com Reviewed-by: Luca Coelho drivers/gpu/drm/i915/display/intel_cdclk.c | 8 -------- 1 file changed, 8 deletions(-) commit 783f6f852cc061e59962e53aa9824aa785de0d8c Author: Lucas De Marchi Date: Wed Sep 7 16:08:41 2022 -0700 drm/i915: Noop lrc_init_wa_ctx() on recent/future platforms Except for graphics version 8 and 9, nothing is done in lrc_init_wa_ctx(). Assume this won't be needed on future platforms as well and remove the warning. Note that this function is not called for anything below version 8 since those don't use either guc or execlist, i.e. HAS_EXECLISTS() is false. Reviewed-by: Balasubramani Vivekanandan Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220907230841.1703574-1-lucas.demarchi@intel.com drivers/gpu/drm/i915/gt/intel_lrc.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit c40bd3b14f72446115241563ee0ce7273aa04f35 Author: Lucas De Marchi Date: Fri Sep 16 10:36:08 2022 -0700 drm/i915/dgfx: Make failure to setup stolen non-fatal There is no reason to consider the setup of Data Stolen Memory fatal on dgfx and non-fatal on integrated. Move the debug and error propagation around so both have the same behavior: non-fatal. Before this change, loading i915 on a system with TGL + DG2 would result in just TGL succeeding the initialization (without stolen). Now loading i915 on the same system with an injected failure in i915_gem_init_stolen(): $ dmesg | grep stolen i915 0000:00:02.0: [drm] Injected failure, disabling use of stolen memory i915 0000:00:02.0: [drm:init_stolen_smem [i915]] Skip stolen region: failed to setup i915 0000:03:00.0: [drm] Injected failure, disabling use of stolen memory i915 0000:03:00.0: [drm:init_stolen_lmem [i915]] Skip stolen region: failed to setup Both GPUs are still available: $ sudo build/tools/lsgpu card1 Intel Dg2 (Gen12) drm:/dev/dri/card1 └─renderD129 drm:/dev/dri/renderD129 card0 Intel Tigerlake (Gen12) drm:/dev/dri/card0 └─renderD128 drm:/dev/dri/renderD128 Reviewed-by: Wayne Boyer Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220915-stolen-v2-3-20ff797de047@intel.com drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 51 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 25 deletions(-) commit 3d99597c6496b9319f7522e0d073afab314d518a Author: Lucas De Marchi Date: Fri Sep 16 10:36:07 2022 -0700 drm/i915: Split i915_gem_init_stolen() Add some helpers: adjust_stolen(), request_smem_stolen_() and init_reserved_stolen() that are now called by i915_gem_init_stolen() to initialize each part of the Data Stolen Memory region. Main goal is to split the reserved part within the stolen, also known as WOPCM, as its calculation changes often per platform and is a big source of confusion when handling stolen memory. Reviewed-by: Wayne Boyer Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220915-stolen-v2-2-20ff797de047@intel.com drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 143 +++++++++++++++++------------ 1 file changed, 85 insertions(+), 58 deletions(-) commit e5f415bfc5c2c94fbb124f8aabfc638168a44cf4 Author: Lucas De Marchi Date: Fri Sep 16 10:36:06 2022 -0700 drm/i915: Add missing mask when reading GEN12_DSMBASE DSMBASE register is defined so BDSM bitfield contains the bits 63 to 20 of the base address of stolen. For the supported platforms bits 0-19 are zero but that may not be true in future. Add the missing mask. v2: Use REG_GENMASK64() Acked-by: Aravind Iddamsetty Reviewed-by: Caz Yokoyama Reviewed-by: Wayne Boyer Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20220915-stolen-v2-1-20ff797de047@intel.com drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 07a70f38e9c33b3c614668b12a847f9fe65a4e25 Author: Matt Roper Date: Thu Sep 15 18:43:45 2022 -0700 drm/i915: Split GAM and MSLICE steering Although the bspec lists several MMIO ranges as "MSLICE," it turns out that a subset of these are of a "GAM" subclass that has unique rules and doesn't followed regular mslice steering behavior. * Xe_HP SDV: GAM ranges must always be steered to 0,0. These registers share the regular steering control register (0xFDC) with other steering types * DG2: GAM ranges must always be steered to 1,0. GAM registers have a dedicated steering control register (0xFE0) so we can set the value once at startup and rely on implicit steering. Technically the hardware default should already be set to 1,0 properly, but it never hurts to ensure that in the driver. Bspec: 66534 Signed-off-by: Matt Roper Reviewed-by: Prathap Kumar Valsan Link: https://patchwork.freedesktop.org/patch/msgid/20220916014345.3317739-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 24 ++++++++++++++++++++++-- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/gt/intel_gt_types.h | 1 + drivers/gpu/drm/i915/gt/intel_workarounds.c | 10 ++++++++++ 4 files changed, 34 insertions(+), 2 deletions(-) commit 2d63e6a3d97132449451c2f66fe24a2dc4e2938f Author: Greg Kroah-Hartman Date: Wed Sep 21 11:13:41 2022 +0200 scripts: coccicheck: use "grep -E" instead of "egrep" The latest version of grep claims that egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the vdso Makefile to use "grep -E" instead. Cc: Julia Lawall Cc: Nicolas Palix Cc: cocci@inria.fr Signed-off-by: Greg Kroah-Hartman scripts/coccicheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb7818989976317cc2e78008aa2df7b9fe423c86 Author: Nirmoy Das Date: Tue Sep 20 19:06:28 2022 +0200 drm/i915: Do not cleanup obj with NULL bo->resource For delayed BO release i915_ttm_delete_mem_notify() gets called twice, once with proper bo->resource and another time with NULL. We shouldn't do anything for the 2nd time as we already cleaned up the obj once. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6850 Fixes: ad74457a6b5a96 ("drm/i915/dgfx: Release mmap on rpm suspend") Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220920170628.3391-1-nirmoy.das@intel.com drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d2d201095e9f141d6a9fb44320afce761f8b5c2 Author: Ashutosh Dixit Date: Mon Sep 19 09:24:01 2022 -0700 drm/i915: Perf_limit_reasons are only available for Gen11+ Register GT0_PERF_LIMIT_REASONS (0x1381a8) is available only for Gen11+. Therefore ensure perf_limit_reasons sysfs/debugfs files are created only for Gen11+. Otherwise on Gen < 5 accessing these files results in the following oops: <1> [88.829420] BUG: unable to handle page fault for address: ffffc90000bb81a8 <1> [88.829438] #PF: supervisor read access in kernel mode <1> [88.829447] #PF: error_code(0x0000) - not-present page Bspec: 20008 Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/6863 Fixes: fe5979665f64 ("drm/i915/debugfs: Add perf_limit_reasons in debugfs") Fixes: fa68bff7cf27 ("drm/i915/gt: Add sysfs throttle frequency interfaces") Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20220919162401.2077713-1-ashutosh.dixit@intel.com drivers/gpu/drm/i915/gt/intel_gt.c | 4 ++++ drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 10 +++++++++- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 15 +++++++++++---- 3 files changed, 24 insertions(+), 5 deletions(-) commit 9045c0529c40c1a9227d58cfb494033c82274a7d Author: Ville Syrjälä Date: Mon Jun 20 21:29:17 2022 +0300 drm/i915/fbc: Use lockdep_assert_held() Replace the mutex_is_locked() stuff with lockdep_assert_held() since that's what it's there for. Also sprinkle these around so that we have more or less mirrored coverage for the enable vs. disable instead of the current situation where the asserts seem to be more or less randomly thrown around. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220620182917.10765-2-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola drivers/gpu/drm/i915/display/intel_fbc.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit bff0d857053bdacbde1e0deea3b468de3a2b7234 Author: Ville Syrjälä Date: Mon Jun 20 21:29:16 2022 +0300 drm/i915/fbc: Move flip_pending assignmnt Move the flip_pending assignment into __intel_fbc_post_update() from intel_fbc_post_update(). Now mirrors the pre_update() side. The only reason the assignment was in the higher level function is that we used to call __intel_fbc_post_update() from elsewhere as well. That got cleaned up in commit b39d2c620242 ("drm/i915/fbc: Call intel_fbc_activate() directly from frontbuffer flush") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220620182917.10765-1-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola drivers/gpu/drm/i915/display/intel_fbc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 429a09553559297cc4e021fff2253f4035d3be2e Author: Ville Syrjälä Date: Fri Sep 16 23:41:32 2022 +0300 drm/i915: WARN if a port should use VBT provided vswing tables We don't parse the VBT vswing/preemphassis tables at all currently. Let's WARN if a port wants to use them so we get a heads up that whether we really need to implement this stuff or not. My current stash contains no VBTs with this bit set. v2: Move to print_ddi_port() (Jani) Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220916204132.10469-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/display/intel_bios.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ad3aa7c31efa5a09b0dba42e66cfdf77e0db7dc2 Author: Chris Wilson Date: Fri Sep 16 11:24:03 2022 +0200 drm/i915/gem: Really move i915_gem_context.link under ref protection i915_perf assumes that it can use the i915_gem_context reference to protect its i915->gem.contexts.list iteration. However, this requires that we do not remove the context from the list until after we drop the final reference and release the struct. If, as currently, we remove the context from the list during context_close(), the link.next pointer may be poisoned while we are holding the context reference and cause a GPF: [ 4070.573157] i915 0000:00:02.0: [drm:i915_perf_open_ioctl [i915]] filtering on ctx_id=0x1fffff ctx_id_mask=0x1fffff [ 4070.574881] general protection fault, probably for non-canonical address 0xdead000000000100: 0000 [#1] PREEMPT SMP [ 4070.574897] CPU: 1 PID: 284392 Comm: amd_performance Tainted: G E 5.17.9 #180 [ 4070.574903] Hardware name: Intel Corporation NUC7i5BNK/NUC7i5BNB, BIOS BNKBL357.86A.0052.2017.0918.1346 09/18/2017 [ 4070.574907] RIP: 0010:oa_configure_all_contexts.isra.0+0x222/0x350 [i915] [ 4070.574982] Code: 08 e8 32 6e 10 e1 4d 8b 6d 50 b8 ff ff ff ff 49 83 ed 50 f0 41 0f c1 04 24 83 f8 01 0f 84 e3 00 00 00 85 c0 0f 8e fa 00 00 00 <49> 8b 45 50 48 8d 70 b0 49 8d 45 50 48 39 44 24 10 0f 85 34 fe ff [ 4070.574990] RSP: 0018:ffffc90002077b78 EFLAGS: 00010202 [ 4070.574995] RAX: 0000000000000002 RBX: 0000000000000002 RCX: 0000000000000000 [ 4070.575000] RDX: 0000000000000001 RSI: ffffc90002077b20 RDI: ffff88810ddc7c68 [ 4070.575004] RBP: 0000000000000001 R08: ffff888103242648 R09: fffffffffffffffc [ 4070.575008] R10: ffffffff82c50bc0 R11: 0000000000025c80 R12: ffff888101bf1860 [ 4070.575012] R13: dead0000000000b0 R14: ffffc90002077c04 R15: ffff88810be5cabc [ 4070.575016] FS: 00007f1ed50c0780(0000) GS:ffff88885ec80000(0000) knlGS:0000000000000000 [ 4070.575021] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4070.575025] CR2: 00007f1ed5590280 CR3: 000000010ef6f005 CR4: 00000000003706e0 [ 4070.575029] Call Trace: [ 4070.575033] [ 4070.575037] lrc_configure_all_contexts+0x13e/0x150 [i915] [ 4070.575103] gen8_enable_metric_set+0x4d/0x90 [i915] [ 4070.575164] i915_perf_open_ioctl+0xbc0/0x1500 [i915] [ 4070.575224] ? asm_common_interrupt+0x1e/0x40 [ 4070.575232] ? i915_oa_init_reg_state+0x110/0x110 [i915] [ 4070.575290] drm_ioctl_kernel+0x85/0x110 [ 4070.575296] ? update_load_avg+0x5f/0x5e0 [ 4070.575302] drm_ioctl+0x1d3/0x370 [ 4070.575307] ? i915_oa_init_reg_state+0x110/0x110 [i915] [ 4070.575382] ? gen8_gt_irq_handler+0x46/0x130 [i915] [ 4070.575445] __x64_sys_ioctl+0x3c4/0x8d0 [ 4070.575451] ? __do_softirq+0xaa/0x1d2 [ 4070.575456] do_syscall_64+0x35/0x80 [ 4070.575461] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 4070.575467] RIP: 0033:0x7f1ed5c10397 [ 4070.575471] Code: 3c 1c e8 1c ff ff ff 85 c0 79 87 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a9 da 0d 00 f7 d8 64 89 01 48 [ 4070.575478] RSP: 002b:00007ffd65c8d7a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 4070.575484] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00007f1ed5c10397 [ 4070.575488] RDX: 00007ffd65c8d7c0 RSI: 0000000040106476 RDI: 0000000000000006 [ 4070.575492] RBP: 00005620972f9c60 R08: 000000000000000a R09: 0000000000000005 [ 4070.575496] R10: 000000000000000d R11: 0000000000000246 R12: 000000000000000a [ 4070.575500] R13: 000000000000000d R14: 0000000000000000 R15: 00007ffd65c8d7c0 [ 4070.575505] [ 4070.575507] Modules linked in: nls_ascii(E) nls_cp437(E) vfat(E) fat(E) i915(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) crct10dif_pclmul(E) crc32_pclmul(E) crc32c_intel(E) aesni_intel(E) crypto_simd(E) intel_gtt(E) cryptd(E) ttm(E) rapl(E) intel_cstate(E) drm_kms_helper(E) cfbfillrect(E) syscopyarea(E) cfbimgblt(E) intel_uncore(E) sysfillrect(E) mei_me(E) sysimgblt(E) i2c_i801(E) fb_sys_fops(E) mei(E) intel_pch_thermal(E) i2c_smbus(E) cfbcopyarea(E) video(E) button(E) efivarfs(E) autofs4(E) [ 4070.575549] ---[ end trace 0000000000000000 ]--- v3: fix incorrect syntax of spin_lock() replacing spin_lock_irqsave() v2: irqsave not required in a worker, neither conversion to irq safe elsewhere (Tvrtko), - perf: it's safe to call gen8_configure_context() even if context has been closed, no need to check, - drop unrelated cleanup (Andi, Tvrtko) Reported-by: Mark Janes Closes: https://gitlab.freedesktop.org/drm/intel/issues/6222 References: a4e7ccdac38e ("drm/i915: Move context management under GEM") Fixes: f8246cf4d9a9 ("drm/i915/gem: Drop free_work for GEM contexts") Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Signed-off-by: Janusz Krzysztofik Cc: Tvrtko Ursulin Cc: # v5.12+ Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220916092403.201355-3-janusz.krzysztofik@linux.intel.com drivers/gpu/drm/i915/gem/i915_gem_context.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1cec34442408a77ba5396b19725fed2c398005c3 Author: Janusz Krzysztofik Date: Fri Sep 16 11:24:02 2022 +0200 drm/i915/gem: Flush contexts on driver release Due to i915_perf assuming that it can use the i915_gem_context reference to protect its i915->gem.contexts.list iteration, we need to defer removal of the context from the list until last reference to the context is put. However, there is a risk of triggering kernel warning on contexts list not empty at driver release time if we deleagate that task to a worker for i915_gem_context_release_work(), unless that work is flushed first. Unfortunately, it is not flushed on driver release. Fix it. Instead of additionally calling flush_workqueue(), either directly or via a new dedicated wrapper around it, replace last call to i915_gem_drain_freed_objects() with existing i915_gem_drain_workqueue() that performs both tasks. Fixes: 75eefd82581f ("drm/i915: Release i915_gem_context from a worker") Suggested-by: Chris Wilson Signed-off-by: Janusz Krzysztofik Reviewed-by: Andi Shyti Cc: stable@kernel.org # v5.16+ Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220916092403.201355-2-janusz.krzysztofik@linux.intel.com drivers/gpu/drm/i915/i915_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 14f2f9bf34b180aa90b2088836f5153cb56db95e Author: Matt Roper Date: Fri Sep 9 17:16:31 2022 -0700 drm/i915/mtl: Add MTL forcewake support MTL has separate forcewake tables for the primary/render GT and the media GT; each GT's intel_uncore will use a separate forcewake table and should only initialize the domains that are relevant to that GT. The GT ack register also moves to a new location of (GSI base + 0xDFC) on this platform. Note that although our uncore handlers take care of transparently redirecting all register accesses in the media GT's GSI range to their new offset at 0x380000, the forcewake ranges listed in the table should use the final, post-translation offsets. NOTE: There are two ranges in the media IP that have multicast registers where the two register instances reside in different power wells (either VD0 or VD2). We don't have an easy way to deal with this today (and in fact we don't even access these register ranges in the driver today), so for now we just mark those ranges as FORCEWAKE_ALL which will cause all of the media power wells to be grabbed, ensuring proper operation. If we start reading/writing in those ranges in the future, we can re-visit whether it's worth adding extra steering complexity into our forcewake support. Bspec: 67788, 67789, 52077 Cc: Radhakrishna Sripada Signed-off-by: Matt Roper Reviewed-by: Harish Chegondi Link: https://patchwork.freedesktop.org/patch/msgid/20220910001631.1986601-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_gt_regs.h | 5 + drivers/gpu/drm/i915/intel_uncore.c | 258 ++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_uncore.h | 2 + drivers/gpu/drm/i915/selftests/intel_uncore.c | 4 + 4 files changed, 258 insertions(+), 11 deletions(-) commit 48176104003058e2ba540fd815ec46c350d65926 Author: Jani Nikula Date: Fri Sep 16 14:38:50 2022 +0300 drm/i915/display: remove ipc_enabled from struct drm_i915_private The ipc_enabled member was supposed to be moved under the display wm sub-struct, but due to a rebase fail only the new one was added and the old one was left behind. Finish the job. Fixes: 70296670f672 ("drm/i915/display: move IPC under display wm sub-struct") Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220916113850.3712354-1-jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 -- 1 file changed, 2 deletions(-) commit dd890d428fe157f661e19e17c12349c785a97d4b Author: Jani Nikula Date: Fri Sep 16 16:06:34 2022 +0300 drm/i915/hotplug: refactor hotplug init slightly Rename intel_hpd_init_work() to the more generic intel_hpd_init_early(), and move the hotplug storm initialization there. This lets us move the HPD_STORM_DEFAULT_THRESHOLD macro to intel_hotplug.c too. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220916130634.3781122-2-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_hotplug.c | 22 +++++++++++++++++----- drivers/gpu/drm/i915/display/intel_hotplug.h | 2 +- drivers/gpu/drm/i915/i915_drv.h | 3 --- drivers/gpu/drm/i915/i915_irq.c | 11 +---------- 4 files changed, 19 insertions(+), 19 deletions(-) commit 1bed8b07342069ebfbab6794e5ce3084c3eb9bc8 Author: Jani Nikula Date: Fri Sep 16 16:06:33 2022 +0300 drm/i915/hotplug: move hotplug storm debugfs to intel_hotplug.c The debugfs should be where the implementation details are. v2: Rebase Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220916130634.3781122-1-jani.nikula@intel.com .../gpu/drm/i915/display/intel_display_debugfs.c | 160 +------------------- drivers/gpu/drm/i915/display/intel_hotplug.c | 166 +++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_hotplug.h | 1 + 3 files changed, 169 insertions(+), 158 deletions(-) commit 01f0ce3e859619ea84104d668a87ace924bd12df Author: John Harrison Date: Mon Sep 12 18:09:29 2022 -0700 drm/i915/guc: Fix release build bug in 'remove log size module parameters' A patch was merged to remove the GuC log size override module parameters. That patch was broken and caused kernel error messages on boot in non CONFIG_DEBUG_GUC|GEM builds: [ 12.085121] i915 0000:00:02.0: [drm] *ERROR* Zero GuC log crash dump size! [ 12.092035] i915 0000:00:02.0: [drm] *ERROR* Zero GuC log debug size! So fit it. Fixes: f54e515c9180 ("drm/i915/guc: Remove log size module parameters") Cc: Joonas Lahtinen Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Alan Previn Cc: Jani Nikula Cc: Lucas De Marchi Cc: Matthew Brost Cc: Julia Lawall Cc: Chris Wilson Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20220913010929.2734885-2-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) commit 835a4d18353492577093eff7cb6fa866f6e7014f Author: Ashutosh Dixit Date: Sat Sep 10 07:38:44 2022 -0700 drm/i915/rps: Freq caps for MTL For MTL, when reading from HW, RP0, RP1 (actuall RPe) and RPn freq use an entirely different set of registers with different fields, bitwidths and units. v2: Move MTL check into a separate function (Jani) Cc: Jani Nikula Cc: Badal Nilawar Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20220910143844.1755324-4-ashutosh.dixit@intel.com drivers/gpu/drm/i915/gt/intel_rps.c | 46 +++++++++++++++++++++++++++++-------- drivers/gpu/drm/i915/i915_reg.h | 9 ++++++++ 2 files changed, 46 insertions(+), 9 deletions(-) commit 1551b9164f6194ffee78935d1ff515f697619483 Author: Ashutosh Dixit Date: Sat Sep 10 07:38:43 2022 -0700 drm/i915/mtl: PERF_LIMIT_REASONS changes for MTL PERF_LIMIT_REASONS register for MTL media gt is different now. v2: Avoid static inline for intel_gt_perf_limit_reasons_reg() (Jani) Cc: Jani Nikula Cc: Badal Nilawar Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20220910143844.1755324-3-ashutosh.dixit@intel.com drivers/gpu/drm/i915/gt/intel_gt.c | 6 ++++++ drivers/gpu/drm/i915/gt/intel_gt.h | 1 + drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 6 +++--- drivers/gpu/drm/i915/i915_reg.h | 1 + 5 files changed, 13 insertions(+), 5 deletions(-) commit fe5979665f6408092ff6072dc894b74a192cbb53 Author: Tilak Tangudu Date: Sat Sep 10 07:38:42 2022 -0700 drm/i915/debugfs: Add perf_limit_reasons in debugfs Add perf_limit_reasons in debugfs. The upper 16 perf_limit_reasons RW "log" bits are identical to the lower 16 RO "status" bits except that the "log" bits remain set until cleared, thereby ensuring the throttling occurrence is not missed. The clear fop clears the upper 16 "log" bits, the get fop gets all 32 "log" and "status" bits. v2: Expand commit message and clarify "log" and "status" bits in comment (Rodrigo) Cc: Rodrigo Vivi Signed-off-by: Ashutosh Dixit Signed-off-by: Tilak Tangudu Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20220910143844.1755324-2-ashutosh.dixit@intel.com drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 31 +++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 32 insertions(+) commit f569ae759472fbe1f6fdddc7398360d43fdcc199 Author: Tvrtko Ursulin Date: Thu Sep 15 16:26:54 2022 -0700 drm/i915: Handle all GTs on driver (un)load paths This, along with the changes already landed in commit 1c66a12ab431 ("drm/i915: Handle each GT on init/release and suspend/resume") makes engines from all GTs actually known to the driver. To accomplish this we need to sprinkle a lot of for_each_gt calls around but is otherwise pretty un-eventuful. v2: - Consolidate adjacent GT loops in a couple places. (Daniele) Cc: Daniele Ceraolo Spurio Signed-off-by: Tvrtko Ursulin Signed-off-by: Matt Roper Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220915232654.3283095-5-matthew.d.roper@intel.com drivers/gpu/drm/i915/i915_driver.c | 3 ++- drivers/gpu/drm/i915/i915_gem.c | 43 +++++++++++++++++++++++++++----------- 2 files changed, 33 insertions(+), 13 deletions(-) commit 4b3823ff7fa5bd000aa73384ec1f611980d00855 Author: Tvrtko Ursulin Date: Thu Sep 15 16:26:53 2022 -0700 drm/i915: Make GEM suspend all GTs Walk all GTs when suspending. Signed-off-by: Tvrtko Ursulin Signed-off-by: Matt Roper Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220915232654.3283095-4-matthew.d.roper@intel.com drivers/gpu/drm/i915/gem/i915_gem_pm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit e23a40040819a7a3fcda3c6cedaeff80ad20c231 Author: Tvrtko Ursulin Date: Thu Sep 15 16:26:52 2022 -0700 drm/i915: Make GEM resume all engines Walk all GTs from i915_gem_resume when resuming engines. Cc: Andi Shyti Signed-off-by: Tvrtko Ursulin Signed-off-by: Matt Roper Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20220915232654.3283095-3-matthew.d.roper@intel.com drivers/gpu/drm/i915/gem/i915_gem_pm.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 78a033433a5ae4fee85511ee075bc9a48312c79e Author: Chris Wilson Date: Thu Sep 15 16:26:51 2022 -0700 drm/i915/gt: Cleanup partial engine discovery failures If we abort driver initialisation in the middle of gt/engine discovery, some engines will be fully setup and some not. Those incompletely setup engines only have 'engine->release == NULL' and so will leak any of the common objects allocated. v2: - Drop the destroy_pinned_context() helper for now. It's not really worth it with just a single callsite at the moment. (Janusz) Signed-off-by: Chris Wilson Cc: Janusz Krzysztofik Signed-off-by: Matt Roper Reviewed-by: Janusz Krzysztofik Link: https://patchwork.freedesktop.org/patch/msgid/20220915232654.3283095-2-matthew.d.roper@intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 61a6920bb604df3a0e389a2a9479e1e233e4461d Author: Doug Brown Date: Sat Sep 10 13:29:39 2022 -0700 drm/etnaviv: fix power register offset on GC300 Older GC300 revisions have their power registers at an offset of 0x200 rather than 0x100. Add new gpu_read_power and gpu_write_power functions to encapsulate accesses to the power addresses and fix the addresses. Signed-off-by: Doug Brown Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_dump.c | 7 ++++++- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 20 ++++++++++---------- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 21 +++++++++++++++++++++ 3 files changed, 37 insertions(+), 11 deletions(-) commit cc7d3fb446a91f24978a6aa59cbb578f92e22242 Author: Doug Brown Date: Sat Sep 10 13:29:38 2022 -0700 drm/etnaviv: add missing quirks for GC300 The GC300's features register doesn't specify that a 2D pipe is available, and like the GC600, its idle register reports zero bits where modules aren't present. Signed-off-by: Doug Brown Reviewed-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 332f847212e43d584019a8264895f25cf92aa647 Author: Lucas Stach Date: Thu Jul 14 12:31:43 2022 +0200 drm/etnaviv: reap idle mapping if it doesn't match the softpin address When a idle BO, which is held open by another process, gets freed by userspace and subsequently referenced again by e.g. importing it again, userspace may assign a different softpin VA than the last time around. As the kernel GEM object still exists, we likely have a idle mapping with the old VA still cached, if it hasn't been reaped in the meantime. As the context matches, we then simply try to resurrect this mapping by increasing the refcount. As the VA in this mapping does not match the new softpin address, we consequently fail the otherwise valid submit. Instead of failing, reap the idle mapping. Cc: stable@vger.kernel.org # 5.19 Signed-off-by: Lucas Stach Reviewed-by: Guido Günther drivers/gpu/drm/etnaviv/etnaviv_gem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5a40837debaa9dcc71765d32ce1a15be068b6cc2 Author: Lucas Stach Date: Thu Jul 14 12:31:42 2022 +0200 drm/etnaviv: move idle mapping reaping into separate function The same logic is already used in two different places and now it will also be needed outside of the compilation unit, so split it into a separate function. Cc: stable@vger.kernel.org # 5.19 Signed-off-by: Lucas Stach Reviewed-by: Guido Günther drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 23 +++++++++++++++-------- drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 1 + 2 files changed, 16 insertions(+), 8 deletions(-) commit 6cffb1c27f2d05047c7f569c425fd56d11ae89b2 Author: T.J. Mercier Date: Wed Jul 6 18:29:24 2022 +0000 drm/etnaviv: Remove duplicate call to drm_gem_free_mmap_offset The docs explicitly say the drm_gem_object_release function already calls this, and this does not appear to be a prerequisite for the call to etnaviv_gem_ops.release. Signed-off-by: T.J. Mercier Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem.c | 1 - 1 file changed, 1 deletion(-) commit f51d753f81c0862e18af48d701a57128572883ed Author: Christian Gmeiner Date: Fri Jun 3 14:37:05 2022 +0200 drm/etnaviv: print offender task information on hangcheck recovery Track the pid per submit, so we can print the name and cmdline of the task which submitted the batch that caused the gpu to hang. Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem.h | 1 + drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 6 ++++++ drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 18 +++++++++++++++++- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 2 +- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 2 +- 5 files changed, 26 insertions(+), 3 deletions(-) commit d90fdb9138262e2c68e4305965348dc065f5c7a3 Author: Jilin Yuan Date: Fri Jul 8 23:15:38 2022 +0800 net/ieee802154: fix repeated words in comments Delete the redundant word 'was'. Signed-off-by: Jilin Yuan Link: https://lore.kernel.org/r/20220708151538.51483-1-yuanjilin@cdjrlc.com Signed-off-by: Stefan Schmidt drivers/net/ieee802154/ca8210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbdaa5ba6bd6955f7e7f9228e4d815cc5e43fe5b Author: Miquel Raynal Date: Fri Jun 17 21:29:14 2022 +0200 net: mac802154: Fix a Tx warning check The purpose of the netif_is_down() helper was to ensure that the network interface used was still up when performing the transmission. What it actually did was to check if _all_ interfaces were up. This was not noticed at that time because I did not use interfaces at all before discussing with Alexander Aring about how to handle coordinators properly. Drop the helper and call netif_running() on the right sub interface object directly. Fixes: 4f790184139b ("net: mac802154: Add a warning in the slow path") Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220617192914.1275611-1-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/ieee802154_i.h | 8 ++++++-- net/mac802154/tx.c | 31 ++++++++----------------------- 2 files changed, 14 insertions(+), 25 deletions(-) commit 6c1c78d0182fcbfe953bf5a0c3e71204d176b887 Author: Alexander Aring Date: Mon Jun 13 00:37:35 2022 -0400 mac802154: fix atomic_dec_and_test checks We need to call wake_up() when hold_txs reaches zero. The semantic of atomic_dec_and_test() is that it returns true when it's zero. Fixes: f0feb3490473 ("net: mac802154: Introduce a tx queue flushing mechanism") Signed-off-by: Alexander Aring Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20220613043735.1039895-3-aahringo@redhat.com Signed-off-by: Stefan Schmidt net/mac802154/tx.c | 4 ++-- net/mac802154/util.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 2ec2f6bed4d12a7ed74ed179a5d2879b117105d1 Author: Alexander Aring Date: Mon Jun 13 00:37:34 2022 -0400 mac802154: util: fix release queue handling The semantic of atomic_dec_and_test() is to return true if zero is reached and we need call ieee802154_wake_queue() when zero is reached. Fixes: 20a19d1df3e4 ("net: mac802154: Bring the ability to hold the transmit queue") Signed-off-by: Alexander Aring Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20220613043735.1039895-2-aahringo@redhat.com Signed-off-by: Stefan Schmidt net/mac802154/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f790184139beb8b35a1f4f9a4b6731c6eef1763 Author: Miquel Raynal Date: Thu May 19 17:05:16 2022 +0200 net: mac802154: Add a warning in the slow path In order to be able to detect possible conflicts between the net interface core and the ieee802154 core, let's add a warning in the slow path: we want to be sure that whenever we start an asynchronous MLME transmission (which can be fully asynchronous) the net core somehow agrees that this transmission is possible, ie. the device was not stopped. Warning in this case would allow us to track down more easily possible issues with the MLME logic if we ever get reports. Unlike in the hot path, such a situation cannot be handled. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220519150516.443078-12-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/tx.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 2b13db13af50a5dcdb944723c828915a50f0c3b2 Author: Miquel Raynal Date: Thu May 19 17:05:15 2022 +0200 net: mac802154: Add a warning in the hot path We should never start a transmission after the queue has been stopped. But because it might work we don't kill the function here but rather warn loudly the user that something is wrong. Set a flag when the queue should remain stopped. Reset this flag when the queue actually gets restarded. Just check this value to know if a transmission is legitimate, warn if it is not. Turn the flags variable into an unsigned long to allow the use of atomic helpers on it. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220519150516.443078-11-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt include/net/cfg802154.h | 5 ++++- net/mac802154/tx.c | 16 +++++++++++++++- net/mac802154/util.c | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) commit ddd9ee7cda122ac55571b8b11b51ef1e71918b63 Author: Miquel Raynal Date: Thu May 19 17:05:14 2022 +0200 net: mac802154: Introduce a synchronous API for MLME commands This is the slow path, we need to wait for each command to be processed before continuing so let's introduce an helper which does the transmission and blocks until it gets notified of its asynchronous completion. This helper is going to be used when introducing scan support. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220519150516.443078-10-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/ieee802154_i.h | 4 ++++ net/mac802154/tx.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit f0feb34904735ffa21fe7b0c50f9f9527ec74b7a Author: Miquel Raynal Date: Thu May 19 17:05:13 2022 +0200 net: mac802154: Introduce a tx queue flushing mechanism Right now we are able to stop a queue but we have no indication if a transmission is ongoing or not. Thanks to recent additions, we can track the number of ongoing transmissions so we know if the last transmission is over. Adding on top of it an internal wait queue also allows to be woken up asynchronously when this happens. If, beforehands, we marked the queue to be held and stopped it, we end up flushing and stopping the tx queue. Thanks to this feature, we will soon be able to introduce a synchronous transmit API. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220519150516.443078-9-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt include/net/cfg802154.h | 1 + net/ieee802154/core.c | 1 + net/mac802154/cfg.c | 2 +- net/mac802154/ieee802154_i.h | 1 + net/mac802154/tx.c | 26 ++++++++++++++++++++++++-- net/mac802154/util.c | 6 ++++-- 6 files changed, 32 insertions(+), 5 deletions(-) commit a40612f399eabe23424acf5985643a35d4f2832e Author: Miquel Raynal Date: Thu May 19 17:05:12 2022 +0200 net: mac802154: Introduce a helper to disable the queue Sometimes calling the stop queue helper is not enough because it does not hold any lock. In order to be safe and avoid racy situations when trying to (soon) sync the Tx queue, for instance before sending an MLME frame, let's now introduce an helper which actually hold the necessary locks when doing so. Suggested-by: Alexander Aring Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220519150516.443078-8-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/ieee802154_i.h | 12 ++++++++++++ net/mac802154/util.c | 14 ++++++++++++++ 2 files changed, 26 insertions(+) commit 226730e1aa2844b6e5499a6fe6bea4db17a894a8 Author: Miquel Raynal Date: Thu May 19 17:05:11 2022 +0200 net: mac802154: Create a hot tx path Let's rename the current Tx path to show that this is the "hot" Tx path. We will soon introduce a slower Tx path for MLME commands. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220519150516.443078-7-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/tx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 20a19d1df3e4079cbaa045ec89bbefb831d4705d Author: Miquel Raynal Date: Thu May 19 17:05:10 2022 +0200 net: mac802154: Bring the ability to hold the transmit queue Create a hold_txs atomic variable and increment/decrement it when relevant, ie. when we want to hold the queue or release it: currently all the "stopped" situations are suitable, but very soon we will more extensively use this feature for MLME purposes. Upon release, the atomic counter is decremented and checked. If it is back to 0, then the netif queue gets woken up. This makes the whole process fully transparent, provided that all the users of ieee802154_wake/stop_queue() now call ieee802154_hold/release_queue() instead. In no situation individual drivers should call any of these helpers manually in order to avoid messing with the counters. There are other functions more suited for this purpose which have been introduced, such as the _xmit_complete() and _xmit_error() helpers which will handle all that for them. One advantage is that, as no more drivers call the stop/wake helpers directly, we can safely stop exporting them and only declare the hold/release ones in a header only accessible to the core. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220519150516.443078-6-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt include/net/cfg802154.h | 6 +++-- include/net/mac802154.h | 27 ----------------------- net/ieee802154/core.c | 2 ++ net/mac802154/cfg.c | 4 ++-- net/mac802154/ieee802154_i.h | 19 ++++++++++++++++ net/mac802154/tx.c | 6 ++--- net/mac802154/util.c | 52 ++++++++++++++++++++++++++++++++++++++------ 7 files changed, 75 insertions(+), 41 deletions(-) commit bde000ae459f2829ed88e967f7fa7665b4e3afaf Author: Miquel Raynal Date: Thu May 19 17:05:09 2022 +0200 net: mac802154: Follow the count of ongoing transmissions In order to create a synchronous API for MLME command purposes, we need to be able to track the end of the ongoing transmissions. Let's introduce an atomic variable which is incremented when a transmission starts and decremented when relevant so that we know at any moment whether there is an ongoing transmission. The counter gets decremented in the following situations: - The operation is asynchronous and there was a failure during the offloading process. - The operation is synchronous and the synchronous operation failed. - The operation finished, either successfully or not. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220519150516.443078-5-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt include/net/cfg802154.h | 3 +++ net/mac802154/tx.c | 3 +++ net/mac802154/util.c | 2 ++ 3 files changed, 8 insertions(+) commit d08d951a9ae7e30fc0421a1af2b4193ce4aa6b3e Author: Miquel Raynal Date: Thu May 19 17:05:08 2022 +0200 net: mac802154: Enhance the error path in the main tx helper Before adding more logic in the error path, let's move the wake queue call there, rename the default label and create an additional one. There is no functional change. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220519150516.443078-4-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/tx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 983a974b40f66d202b075ab8ac584c698a3fc141 Author: Miquel Raynal Date: Thu May 19 17:05:07 2022 +0200 net: mac802154: Rename the main tx_work struct This entry is dedicated to synchronous transmissions done by drivers without async hook. Make this clearer that this is not a work that any driver can use by at least prefixing it with "sync_". While at it, let's enhance the comment explaining why we choose one or the other. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220519150516.443078-3-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/ieee802154_i.h | 2 +- net/mac802154/main.c | 2 +- net/mac802154/tx.c | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) commit be8c6d86d558860bbc493ad3fbc51fc96ab0c2e4 Author: Miquel Raynal Date: Thu May 19 17:05:06 2022 +0200 net: mac802154: Rename the synchronous xmit worker There are currently two driver hooks: one is synchronous, the other is not. We cannot rely on driver implementations to provide a synchronous API (which is related to the bus medium more than a wish to have a synchronized implementation) so we are going to introduce a sync API above any kind of driver transmit function. In order to clarify what this worker is for (synchronous driver implementation), let's rename it so that people don't get bothered by the fact that their driver does not make use of the "xmit worker" which is a too generic name. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220519150516.443078-2-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt net/mac802154/ieee802154_i.h | 2 +- net/mac802154/main.c | 2 +- net/mac802154/tx.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 88a309465b3f05a100c3b81966982c0f9f5d23a6 Author: Tom Rix Date: Thu Jan 20 05:20:06 2022 -0800 lib: zstd: clean up double word in comment. Remove the second 'a' and 'into'. Signed-off-by: Tom Rix Signed-off-by: Nick Terrell include/linux/zstd_lib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)